diff --git a/.gitignore b/.gitignore deleted file mode 100644 index f3468a2d9..000000000 --- a/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -# General -*.class -target/ -src/.DS_Store -.idea/ -.DS_Store -.gitignore -*.log -logs/ diff --git a/clients/algo/CHANGELOG.md b/clients/algo/CHANGELOG.md index 9a88c2fba..f89d610c7 100644 --- a/clients/algo/CHANGELOG.md +++ b/clients/algo/CHANGELOG.md @@ -1,10 +1,40 @@ # Changelog +## 2.0.0 - 2026-07-29 + +### Changed (4) + +- Modified parameter `clientAlgoId`: + - minLength `0` → `32` + - maxLength `null` → `32` + - affected methods: + - `timeWeightedAveragePriceFutureAlgo()` (`POST /sapi/v1/algo/futures/newOrderTwap`) + - `volumeParticipationFutureAlgo()` (`POST /sapi/v1/algo/futures/newOrderVp`) + - `timeWeightedAveragePriceSpotAlgo()` (`POST /sapi/v1/algo/spot/newOrderTwap`) +- Modified parameter `positionSide`: + - enum added: `BOTH`, `LONG`, `SHORT` + - affected methods: + - `timeWeightedAveragePriceFutureAlgo()` (`POST /sapi/v1/algo/futures/newOrderTwap`) + - `volumeParticipationFutureAlgo()` (`POST /sapi/v1/algo/futures/newOrderVp`) +- Modified parameter `side`: + - enum added: `BUY`, `SELL` + - affected methods: + - `queryHistoricalAlgoOrdersFutureAlgo()` (`GET /sapi/v1/algo/futures/historicalOrders`) + - `timeWeightedAveragePriceFutureAlgo()` (`POST /sapi/v1/algo/futures/newOrderTwap`) + - `volumeParticipationFutureAlgo()` (`POST /sapi/v1/algo/futures/newOrderVp`) + - `queryHistoricalAlgoOrdersSpotAlgo()` (`GET /sapi/v1/algo/spot/historicalOrders`) + - `timeWeightedAveragePriceSpotAlgo()` (`POST /sapi/v1/algo/spot/newOrderTwap`) +- Modified parameter `urgency`: + - enum added: `LOW`, `MEDIUM`, `HIGH` + - affected methods: + - `volumeParticipationFutureAlgo()` (`POST /sapi/v1/algo/futures/newOrderVp`) + ## 1.2.2 - 2026-04-30 - Update `binance/common` module to version `2.4.2`. ## 1.2.1 - 2025-08-07 + - Update `binance/common` module to version `2.0.0`. - Add `Content-Type` header only if there is a body. @@ -21,4 +51,4 @@ ## 1.0.0 - 2025-04-24 -- Initial release \ No newline at end of file +- Initial release diff --git a/clients/algo/docs/FutureAlgoApi.md b/clients/algo/docs/FutureAlgoApi.md index dd72cb227..66383705e 100644 --- a/clients/algo/docs/FutureAlgoApi.md +++ b/clients/algo/docs/FutureAlgoApi.md @@ -4,21 +4,21 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**cancelAlgoOrderFutureAlgo**](FutureAlgoApi.md#cancelAlgoOrderFutureAlgo) | **DELETE** /sapi/v1/algo/futures/order | Cancel Algo Order(TRADE) | -| [**queryCurrentAlgoOpenOrdersFutureAlgo**](FutureAlgoApi.md#queryCurrentAlgoOpenOrdersFutureAlgo) | **GET** /sapi/v1/algo/futures/openOrders | Query Current Algo Open Orders(USER_DATA) | -| [**queryHistoricalAlgoOrdersFutureAlgo**](FutureAlgoApi.md#queryHistoricalAlgoOrdersFutureAlgo) | **GET** /sapi/v1/algo/futures/historicalOrders | Query Historical Algo Orders(USER_DATA) | -| [**querySubOrdersFutureAlgo**](FutureAlgoApi.md#querySubOrdersFutureAlgo) | **GET** /sapi/v1/algo/futures/subOrders | Query Sub Orders(USER_DATA) | -| [**timeWeightedAveragePriceFutureAlgo**](FutureAlgoApi.md#timeWeightedAveragePriceFutureAlgo) | **POST** /sapi/v1/algo/futures/newOrderTwap | Time-Weighted Average Price(Twap) New Order(TRADE) | -| [**volumeParticipationFutureAlgo**](FutureAlgoApi.md#volumeParticipationFutureAlgo) | **POST** /sapi/v1/algo/futures/newOrderVp | Volume Participation(VP) New Order (TRADE) | +| [**cancelAlgoOrderFutureAlgo**](FutureAlgoApi.md#cancelAlgoOrderFutureAlgo) | **DELETE** /sapi/v1/algo/futures/order | Cancel Futures Algo Order (TRADE) | +| [**queryCurrentAlgoOpenOrdersFutureAlgo**](FutureAlgoApi.md#queryCurrentAlgoOpenOrdersFutureAlgo) | **GET** /sapi/v1/algo/futures/openOrders | Query Current Futures Algo Open Orders (USER_DATA) | +| [**queryHistoricalAlgoOrdersFutureAlgo**](FutureAlgoApi.md#queryHistoricalAlgoOrdersFutureAlgo) | **GET** /sapi/v1/algo/futures/historicalOrders | Query Historical Futures Algo Orders (USER_DATA) | +| [**querySubOrdersFutureAlgo**](FutureAlgoApi.md#querySubOrdersFutureAlgo) | **GET** /sapi/v1/algo/futures/subOrders | Query Futures Sub Orders (USER_DATA) | +| [**timeWeightedAveragePriceFutureAlgo**](FutureAlgoApi.md#timeWeightedAveragePriceFutureAlgo) | **POST** /sapi/v1/algo/futures/newOrderTwap | Time-Weighted Futures Average Price (Twap) New Order (TRADE) | +| [**volumeParticipationFutureAlgo**](FutureAlgoApi.md#volumeParticipationFutureAlgo) | **POST** /sapi/v1/algo/futures/newOrderVp | Volume Participation (VP) New Order (TRADE) | # **cancelAlgoOrderFutureAlgo** > CancelAlgoOrderFutureAlgoResponse cancelAlgoOrderFutureAlgo(algoId, recvWindow) -Cancel Algo Order(TRADE) +Cancel Futures Algo Order (TRADE) -Cancel an active order. * You need to enable `Futures Trading Permission` for the api key which requests this endpoint. * Base URL: https://api.binance.com Weight: 1 +Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - You need to enable `Futures Trading Permission` for the API key that requests this endpoint. - Base URL: `https://api.binance.com` ### Example ```java @@ -35,8 +35,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FutureAlgoApi apiInstance = new FutureAlgoApi(defaultClient); - Long algoId = 56L; // Long | eg. 14511 - Long recvWindow = 56L; // Long | + Long algoId = 1L; // Long | eg. 14511 + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { CancelAlgoOrderFutureAlgoResponse result = apiInstance.cancelAlgoOrderFutureAlgo(algoId, recvWindow); System.out.println(result); @@ -56,7 +56,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **algoId** | **Long**| eg. 14511 | | -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -80,9 +80,9 @@ No authorization required # **queryCurrentAlgoOpenOrdersFutureAlgo** > QueryCurrentAlgoOpenOrdersFutureAlgoResponse queryCurrentAlgoOpenOrdersFutureAlgo(recvWindow) -Query Current Algo Open Orders(USER_DATA) +Query Current Futures Algo Open Orders (USER_DATA) -Query Current Algo Open Orders * You need to enable `Futures Trading Permission` for the api key which requests this endpoint. * Base URL: https://api.binance.com Weight: 1 +Query Current Algo Open Orders Weight(IP): 1 Security Type: USER_DATA Notes: - You need to enable `Futures Trading Permission` for the API key that requests this endpoint. - Base URL: `https://api.binance.com` ### Example ```java @@ -99,7 +99,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FutureAlgoApi apiInstance = new FutureAlgoApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { QueryCurrentAlgoOpenOrdersFutureAlgoResponse result = apiInstance.queryCurrentAlgoOpenOrdersFutureAlgo(recvWindow); System.out.println(result); @@ -118,7 +118,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -142,9 +142,9 @@ No authorization required # **queryHistoricalAlgoOrdersFutureAlgo** > QueryHistoricalAlgoOrdersFutureAlgoResponse queryHistoricalAlgoOrdersFutureAlgo(symbol, side, startTime, endTime, page, pageSize, recvWindow) -Query Historical Algo Orders(USER_DATA) +Query Historical Futures Algo Orders (USER_DATA) -Query Historical Algo Order * You need to enable `Futures Trading Permission` for the api key which requests this endpoint. * Base URL: https://api.binance.com Weight: 1 +Query Historical Algo Order Weight(IP): 1 Security Type: USER_DATA Notes: - You need to enable `Futures Trading Permission` for the API key that requests this endpoint. - Base URL: `https://api.binance.com` ### Example ```java @@ -161,13 +161,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FutureAlgoApi apiInstance = new FutureAlgoApi(defaultClient); - String symbol = "symbol_example"; // String | Trading symbol eg. BTCUSDT - String side = "side_example"; // String | BUY or SELL - Long startTime = 56L; // Long | in milliseconds eg.1641522717552 - Long endTime = 56L; // Long | in milliseconds eg.1641522526562 - Long page = 56L; // Long | Default is 1 - Long pageSize = 56L; // Long | MIN 1, MAX 100; Default 100 - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Trading symbol eg. BTCUSDT + Side side = Side.fromValue("BUY"); // Side | BUY or SELL + Long startTime = 1623319461670L; // Long | in milliseconds eg.1641522717552 + Long endTime = 1641782889000L; // Long | in milliseconds eg.1641522526562 + Long page = 1L; // Long | Page number + Long pageSize = 100L; // Long | Records per page + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { QueryHistoricalAlgoOrdersFutureAlgoResponse result = apiInstance.queryHistoricalAlgoOrdersFutureAlgo(symbol, side, startTime, endTime, page, pageSize, recvWindow); System.out.println(result); @@ -187,12 +187,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **symbol** | **String**| Trading symbol eg. BTCUSDT | [optional] | -| **side** | **String**| BUY or SELL | [optional] | +| **side** | [**Side**](.md)| BUY or SELL | [optional] [enum: BUY, SELL] | | **startTime** | **Long**| in milliseconds eg.1641522717552 | [optional] | | **endTime** | **Long**| in milliseconds eg.1641522526562 | [optional] | -| **page** | **Long**| Default is 1 | [optional] | -| **pageSize** | **Long**| MIN 1, MAX 100; Default 100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **page** | **Long**| Page number | [optional] | +| **pageSize** | **Long**| Records per page | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -216,9 +216,9 @@ No authorization required # **querySubOrdersFutureAlgo** > QuerySubOrdersFutureAlgoResponse querySubOrdersFutureAlgo(algoId, page, pageSize, recvWindow) -Query Sub Orders(USER_DATA) +Query Futures Sub Orders (USER_DATA) -Get respective sub orders for a specified algoId * You need to enable `Futures Trading Permission` for the api key which requests this endpoint. * Base URL: https://api.binance.com Weight: 1 +Get respective sub orders for a specified algoId Weight(IP): 1 Security Type: USER_DATA Notes: - You need to enable `Futures Trading Permission` for the API key that requests this endpoint. - Base URL: `https://api.binance.com` ### Example ```java @@ -235,10 +235,10 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FutureAlgoApi apiInstance = new FutureAlgoApi(defaultClient); - Long algoId = 56L; // Long | eg. 14511 - Long page = 56L; // Long | Default is 1 - Long pageSize = 56L; // Long | MIN 1, MAX 100; Default 100 - Long recvWindow = 56L; // Long | + Long algoId = 1L; // Long | eg. 14511 + Long page = 1L; // Long | Page number + Long pageSize = 100L; // Long | Records per page + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { QuerySubOrdersFutureAlgoResponse result = apiInstance.querySubOrdersFutureAlgo(algoId, page, pageSize, recvWindow); System.out.println(result); @@ -258,9 +258,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **algoId** | **Long**| eg. 14511 | | -| **page** | **Long**| Default is 1 | [optional] | -| **pageSize** | **Long**| MIN 1, MAX 100; Default 100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **page** | **Long**| Page number | [optional] | +| **pageSize** | **Long**| Records per page | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -284,9 +284,9 @@ No authorization required # **timeWeightedAveragePriceFutureAlgo** > TimeWeightedAveragePriceFutureAlgoResponse timeWeightedAveragePriceFutureAlgo(timeWeightedAveragePriceFutureAlgoRequest) -Time-Weighted Average Price(Twap) New Order(TRADE) +Time-Weighted Futures Average Price (Twap) New Order (TRADE) -Send in a Twap new order. Only support on USDⓈ-M Contracts. * Total Algo open orders max allowed: `30` orders. * Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. * Receiving `\"success\": true` does not mean that your order will be executed. Please use the query order endpoints(`GET sapi/v1/algo/futures/openOrders` or `GET sapi/v1/algo/futures/historicalOrders`) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive `\"success\": true`, but the order status will be `expired` after we check it. * `quantity` * 60 / `duration` should be larger than minQty * `duration` cannot be less than 5 mins or more than 24 hours. * For delivery contracts, TWAP end time should be one hour earlier than the delivery time of the symbol. * You need to enable `Futures Trading Permission` for the api key which requests this endpoint. * Base URL: https://api.binance.com Weight: 3000 +Send in a Twap new order. Only support on USDⓈ-M Contracts. Weight(UID): 3000 Security Type: TRADE Notes: - Other info: - Total Algo open orders max allowed: `30` orders. - Leverage and position mode follow your futures account settings. - Receiving `\"success\": true` does not guarantee execution; query order endpoints for final status. - If balance/position constraints fail, response may still return success but order status becomes `expired`. - `quantity * 60 / duration` must be greater than `minQty`. - `duration` cannot be less than 5 minutes or greater than 24 hours. - For delivery contracts, TWAP end time should be one hour earlier than symbol delivery time. - You need to enable the corresponding permission for the API key requesting this endpoint: - `Futures Trading Permission` — for Classic Trading Account mode - `Portfolio Margin Trading Permission` — for Portfolio Margin Account mode - Base URL: `https://api.binance.com` ### Example ```java @@ -346,9 +346,9 @@ No authorization required # **volumeParticipationFutureAlgo** > VolumeParticipationFutureAlgoResponse volumeParticipationFutureAlgo(volumeParticipationFutureAlgoRequest) -Volume Participation(VP) New Order (TRADE) +Volume Participation (VP) New Order (TRADE) -Send in a VP new order. Only support on USDⓈ-M Contracts. * Total Algo open orders max allowed: `10` orders. * Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. * Receiving `\"success\": true` does not mean that your order will be executed. Please use the query order endpoints(`GET sapi/v1/algo/futures/openOrders` or `GET sapi/v1/algo/futures/historicalOrders`) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive `\"success\": true`, but the order status will be `expired` after we check it. * You need to enable `Futures Trading Permission` for the api key which requests this endpoint. * Base URL: https://api.binance.com Weight: 300 +Send in a VP new order. Only support on USDⓈ-M Contracts. Weight(UID): 300 Security Type: TRADE Notes: - Other info: - Total Algo open orders max allowed: `10` orders. - Leverage and position mode follow your futures account settings. - Receiving `\"success\": true` does not guarantee execution; query order endpoints for final status. - If balance/position constraints fail, response may still return success but order status becomes `expired`. - You need to enable the corresponding permission for the API key requesting this endpoint: - `Futures Trading Permission` — for Classic Trading Account mode - `Portfolio Margin Trading Permission` — for Portfolio Margin Account mode - Base URL: `https://api.binance.com` ### Example ```java diff --git a/clients/algo/docs/PositionSide.md b/clients/algo/docs/PositionSide.md new file mode 100644 index 000000000..6355e97a3 --- /dev/null +++ b/clients/algo/docs/PositionSide.md @@ -0,0 +1,15 @@ + + +# PositionSide + +## Enum + + +* `BOTH` (value: `"BOTH"`) + +* `LONG` (value: `"LONG"`) + +* `SHORT` (value: `"SHORT"`) + + + diff --git a/clients/algo/docs/QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner.md b/clients/algo/docs/QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner.md index 3b21c9a23..1ee3e9088 100644 --- a/clients/algo/docs/QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner.md +++ b/clients/algo/docs/QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**algoId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**totalQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**executedAmt** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**clientAlgoId** | **String** | | [optional] | -|**bookTime** | **Long** | | [optional] | -|**endTime** | **Long** | | [optional] | -|**algoStatus** | **String** | | [optional] | -|**algoType** | **String** | | [optional] | -|**urgency** | **String** | | [optional] | +|**algoId** | **Long** | Algo order ID | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**side** | **String** | Trading side | [optional] | +|**positionSide** | **String** | Position side | [optional] | +|**totalQty** | **String** | Total order quantity | [optional] | +|**executedQty** | **String** | Executed quantity | [optional] | +|**executedAmt** | **String** | Executed amount | [optional] | +|**avgPrice** | **String** | Average execution price | [optional] | +|**clientAlgoId** | **String** | Client-defined algo order ID | [optional] | +|**bookTime** | **Long** | Order creation time | [optional] | +|**endTime** | **Long** | End time | [optional] | +|**algoStatus** | **String** | Algo order status | [optional] | +|**algoType** | **String** | Algo order type | [optional] | +|**urgency** | **String** | Execution urgency | [optional] | diff --git a/clients/algo/docs/QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner.md b/clients/algo/docs/QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner.md index ab7aeeb18..6f6454e4d 100644 --- a/clients/algo/docs/QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner.md +++ b/clients/algo/docs/QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner.md @@ -7,19 +7,19 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**algoId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**totalQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**executedAmt** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**clientAlgoId** | **String** | | [optional] | -|**bookTime** | **Long** | | [optional] | -|**endTime** | **Long** | | [optional] | -|**algoStatus** | **String** | | [optional] | -|**algoType** | **String** | | [optional] | -|**urgency** | **String** | | [optional] | +|**algoId** | **Long** | Algo order ID | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**side** | **String** | Trading side | [optional] | +|**totalQty** | **String** | Total order quantity | [optional] | +|**executedQty** | **String** | Executed quantity | [optional] | +|**executedAmt** | **String** | Executed amount | [optional] | +|**avgPrice** | **String** | Average execution price | [optional] | +|**clientAlgoId** | **String** | Client-defined algo order ID | [optional] | +|**bookTime** | **Long** | Order creation time | [optional] | +|**endTime** | **Long** | End time | [optional] | +|**algoStatus** | **String** | Algo order status | [optional] | +|**algoType** | **String** | Algo order type | [optional] | +|**urgency** | **String** | Execution urgency | [optional] | diff --git a/clients/algo/docs/QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner.md b/clients/algo/docs/QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner.md index 659374186..fb57b7ec3 100644 --- a/clients/algo/docs/QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner.md +++ b/clients/algo/docs/QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**algoId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**totalQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**executedAmt** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**clientAlgoId** | **String** | | [optional] | -|**bookTime** | **Long** | | [optional] | -|**endTime** | **Long** | | [optional] | -|**algoStatus** | **String** | | [optional] | -|**algoType** | **String** | | [optional] | -|**urgency** | **String** | | [optional] | +|**algoId** | **Long** | Algo order ID | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**side** | **String** | Trading side | [optional] | +|**positionSide** | **String** | Position side | [optional] | +|**totalQty** | **String** | Total order quantity | [optional] | +|**executedQty** | **String** | Executed quantity | [optional] | +|**executedAmt** | **String** | Executed amount | [optional] | +|**avgPrice** | **String** | Average execution price | [optional] | +|**clientAlgoId** | **String** | Client-defined algo order ID | [optional] | +|**bookTime** | **Long** | Order creation time | [optional] | +|**endTime** | **Long** | End time | [optional] | +|**algoStatus** | **String** | Algo order status | [optional] | +|**algoType** | **String** | Algo order type | [optional] | +|**urgency** | **String** | Execution urgency | [optional] | diff --git a/clients/algo/docs/QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner.md b/clients/algo/docs/QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner.md index 52bacccf4..db018345c 100644 --- a/clients/algo/docs/QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner.md +++ b/clients/algo/docs/QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner.md @@ -7,19 +7,19 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**algoId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**totalQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**executedAmt** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**clientAlgoId** | **String** | | [optional] | -|**bookTime** | **Long** | | [optional] | -|**endTime** | **Long** | | [optional] | -|**algoStatus** | **String** | | [optional] | -|**algoType** | **String** | | [optional] | -|**urgency** | **String** | | [optional] | +|**algoId** | **Long** | Algo order ID | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**side** | **String** | Trading side | [optional] | +|**totalQty** | **String** | Total order quantity | [optional] | +|**executedQty** | **String** | Executed quantity | [optional] | +|**executedAmt** | **String** | Executed amount | [optional] | +|**avgPrice** | **String** | Average execution price | [optional] | +|**clientAlgoId** | **String** | Client-defined algo order ID | [optional] | +|**bookTime** | **Long** | Order creation time | [optional] | +|**endTime** | **Long** | End time | [optional] | +|**algoStatus** | **String** | Algo order status | [optional] | +|**algoType** | **String** | Algo order type | [optional] | +|**urgency** | **String** | Execution urgency | [optional] | diff --git a/clients/algo/docs/QuerySubOrdersFutureAlgoResponseSubOrdersInner.md b/clients/algo/docs/QuerySubOrdersFutureAlgoResponseSubOrdersInner.md index 412239812..d8dbf35ff 100644 --- a/clients/algo/docs/QuerySubOrdersFutureAlgoResponseSubOrdersInner.md +++ b/clients/algo/docs/QuerySubOrdersFutureAlgoResponseSubOrdersInner.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**algoId** | **Long** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**orderStatus** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**executedAmt** | **String** | | [optional] | -|**feeAmt** | **String** | | [optional] | -|**feeAsset** | **String** | | [optional] | -|**bookTime** | **Long** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**subId** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | +|**algoId** | **Long** | Algo order ID | [optional] | +|**orderId** | **Long** | Sub-order ID | [optional] | +|**orderStatus** | **String** | Sub-order status | [optional] | +|**executedQty** | **String** | Executed quantity | [optional] | +|**executedAmt** | **String** | Executed amount | [optional] | +|**feeAmt** | **String** | Fee amount | [optional] | +|**feeAsset** | **String** | Fee asset | [optional] | +|**bookTime** | **Long** | Order creation time | [optional] | +|**avgPrice** | **String** | Average execution price | [optional] | +|**side** | **String** | Trading side | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**subId** | **Long** | Sub-order execution sequence ID | [optional] | +|**timeInForce** | **String** | Time in force | [optional] | +|**origQty** | **String** | Original order quantity | [optional] | diff --git a/clients/algo/docs/Side.md b/clients/algo/docs/Side.md new file mode 100644 index 000000000..689c903df --- /dev/null +++ b/clients/algo/docs/Side.md @@ -0,0 +1,13 @@ + + +# Side + +## Enum + + +* `BUY` (value: `"BUY"`) + +* `SELL` (value: `"SELL"`) + + + diff --git a/clients/algo/docs/SpotAlgoApi.md b/clients/algo/docs/SpotAlgoApi.md index e4a39663e..0ff467cdc 100644 --- a/clients/algo/docs/SpotAlgoApi.md +++ b/clients/algo/docs/SpotAlgoApi.md @@ -4,20 +4,20 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**cancelAlgoOrderSpotAlgo**](SpotAlgoApi.md#cancelAlgoOrderSpotAlgo) | **DELETE** /sapi/v1/algo/spot/order | Cancel Algo Order(TRADE) | -| [**queryCurrentAlgoOpenOrdersSpotAlgo**](SpotAlgoApi.md#queryCurrentAlgoOpenOrdersSpotAlgo) | **GET** /sapi/v1/algo/spot/openOrders | Query Current Algo Open Orders(USER_DATA) | -| [**queryHistoricalAlgoOrdersSpotAlgo**](SpotAlgoApi.md#queryHistoricalAlgoOrdersSpotAlgo) | **GET** /sapi/v1/algo/spot/historicalOrders | Query Historical Algo Orders(USER_DATA) | -| [**querySubOrdersSpotAlgo**](SpotAlgoApi.md#querySubOrdersSpotAlgo) | **GET** /sapi/v1/algo/spot/subOrders | Query Sub Orders(USER_DATA) | -| [**timeWeightedAveragePriceSpotAlgo**](SpotAlgoApi.md#timeWeightedAveragePriceSpotAlgo) | **POST** /sapi/v1/algo/spot/newOrderTwap | Time-Weighted Average Price(Twap) New Order(TRADE) | +| [**cancelAlgoOrderSpotAlgo**](SpotAlgoApi.md#cancelAlgoOrderSpotAlgo) | **DELETE** /sapi/v1/algo/spot/order | Cancel Spot Algo Order (TRADE) | +| [**queryCurrentAlgoOpenOrdersSpotAlgo**](SpotAlgoApi.md#queryCurrentAlgoOpenOrdersSpotAlgo) | **GET** /sapi/v1/algo/spot/openOrders | Query Current Spot Algo Open Orders (USER_DATA) | +| [**queryHistoricalAlgoOrdersSpotAlgo**](SpotAlgoApi.md#queryHistoricalAlgoOrdersSpotAlgo) | **GET** /sapi/v1/algo/spot/historicalOrders | Query Historical Spot Algo Orders (USER_DATA) | +| [**querySubOrdersSpotAlgo**](SpotAlgoApi.md#querySubOrdersSpotAlgo) | **GET** /sapi/v1/algo/spot/subOrders | Query Spot Sub Orders (USER_DATA) | +| [**timeWeightedAveragePriceSpotAlgo**](SpotAlgoApi.md#timeWeightedAveragePriceSpotAlgo) | **POST** /sapi/v1/algo/spot/newOrderTwap | Time-Weighted Spot Average Price(Twap) New Order (TRADE) | # **cancelAlgoOrderSpotAlgo** > CancelAlgoOrderSpotAlgoResponse cancelAlgoOrderSpotAlgo(algoId, recvWindow) -Cancel Algo Order(TRADE) +Cancel Spot Algo Order (TRADE) -Cancel an open TWAP order Weight: 1 +Cancel an open TWAP order Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -34,8 +34,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); SpotAlgoApi apiInstance = new SpotAlgoApi(defaultClient); - Long algoId = 56L; // Long | eg. 14511 - Long recvWindow = 56L; // Long | + Long algoId = 14511L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { CancelAlgoOrderSpotAlgoResponse result = apiInstance.cancelAlgoOrderSpotAlgo(algoId, recvWindow); System.out.println(result); @@ -54,8 +54,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **algoId** | **Long**| eg. 14511 | | -| **recvWindow** | **Long**| | [optional] | +| **algoId** | **Long**| | | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -79,9 +79,9 @@ No authorization required # **queryCurrentAlgoOpenOrdersSpotAlgo** > QueryCurrentAlgoOpenOrdersSpotAlgoResponse queryCurrentAlgoOpenOrdersSpotAlgo(recvWindow) -Query Current Algo Open Orders(USER_DATA) +Query Current Spot Algo Open Orders (USER_DATA) -Get all open SPOT TWAP orders Weight: 1 +Get all open SPOT TWAP orders Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -98,7 +98,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); SpotAlgoApi apiInstance = new SpotAlgoApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { QueryCurrentAlgoOpenOrdersSpotAlgoResponse result = apiInstance.queryCurrentAlgoOpenOrdersSpotAlgo(recvWindow); System.out.println(result); @@ -117,7 +117,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -141,9 +141,9 @@ No authorization required # **queryHistoricalAlgoOrdersSpotAlgo** > QueryHistoricalAlgoOrdersSpotAlgoResponse queryHistoricalAlgoOrdersSpotAlgo(symbol, side, startTime, endTime, page, pageSize, recvWindow) -Query Historical Algo Orders(USER_DATA) +Query Historical Spot Algo Orders (USER_DATA) -Get all historical SPOT TWAP orders Weight: 1 +Get all historical SPOT TWAP orders Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -160,13 +160,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); SpotAlgoApi apiInstance = new SpotAlgoApi(defaultClient); - String symbol = "symbol_example"; // String | Trading symbol eg. BTCUSDT - String side = "side_example"; // String | BUY or SELL - Long startTime = 56L; // Long | in milliseconds eg.1641522717552 - Long endTime = 56L; // Long | in milliseconds eg.1641522526562 - Long page = 56L; // Long | Default is 1 - Long pageSize = 56L; // Long | MIN 1, MAX 100; Default 100 - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Trading symbol + Side side = Side.fromValue("BUY"); // Side | + Long startTime = 1623319461670L; // Long | in milliseconds eg.1641522717552 + Long endTime = 1641782889000L; // Long | in milliseconds eg.1641522526562 + Long page = 1L; // Long | Page number + Long pageSize = 10L; // Long | Records per page + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { QueryHistoricalAlgoOrdersSpotAlgoResponse result = apiInstance.queryHistoricalAlgoOrdersSpotAlgo(symbol, side, startTime, endTime, page, pageSize, recvWindow); System.out.println(result); @@ -185,13 +185,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| Trading symbol eg. BTCUSDT | [optional] | -| **side** | **String**| BUY or SELL | [optional] | +| **symbol** | **String**| Trading symbol | [optional] | +| **side** | [**Side**](.md)| | [optional] [enum: BUY, SELL] | | **startTime** | **Long**| in milliseconds eg.1641522717552 | [optional] | | **endTime** | **Long**| in milliseconds eg.1641522526562 | [optional] | -| **page** | **Long**| Default is 1 | [optional] | -| **pageSize** | **Long**| MIN 1, MAX 100; Default 100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **page** | **Long**| Page number | [optional] | +| **pageSize** | **Long**| Records per page | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -215,9 +215,9 @@ No authorization required # **querySubOrdersSpotAlgo** > QuerySubOrdersSpotAlgoResponse querySubOrdersSpotAlgo(algoId, page, pageSize, recvWindow) -Query Sub Orders(USER_DATA) +Query Spot Sub Orders (USER_DATA) -Get respective sub orders for a specified algoId Weight: 1 +Get respective sub orders for a specified algoId Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -234,10 +234,10 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); SpotAlgoApi apiInstance = new SpotAlgoApi(defaultClient); - Long algoId = 56L; // Long | eg. 14511 - Long page = 56L; // Long | Default is 1 - Long pageSize = 56L; // Long | MIN 1, MAX 100; Default 100 - Long recvWindow = 56L; // Long | + Long algoId = 1L; // Long | eg. 14511 + Long page = 1L; // Long | Page number + Long pageSize = 10L; // Long | Records per page + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { QuerySubOrdersSpotAlgoResponse result = apiInstance.querySubOrdersSpotAlgo(algoId, page, pageSize, recvWindow); System.out.println(result); @@ -257,9 +257,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **algoId** | **Long**| eg. 14511 | | -| **page** | **Long**| Default is 1 | [optional] | -| **pageSize** | **Long**| MIN 1, MAX 100; Default 100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **page** | **Long**| Page number | [optional] | +| **pageSize** | **Long**| Records per page | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -283,9 +283,9 @@ No authorization required # **timeWeightedAveragePriceSpotAlgo** > TimeWeightedAveragePriceSpotAlgoResponse timeWeightedAveragePriceSpotAlgo(timeWeightedAveragePriceSpotAlgoRequest) -Time-Weighted Average Price(Twap) New Order(TRADE) +Time-Weighted Spot Average Price(Twap) New Order (TRADE) -Place a new spot TWAP order with Algo service. * Total Algo open orders max allowed: `20` orders. Weight: 3000 +Place a new spot TWAP order with Algo service. Weight(UID): 3000 Security Type: TRADE Notes: - Total Algo open orders max allowed: `20` orders. ### Example ```java diff --git a/clients/algo/docs/TimeWeightedAveragePriceFutureAlgoRequest.md b/clients/algo/docs/TimeWeightedAveragePriceFutureAlgoRequest.md index fc9b70b48..35aecf274 100644 --- a/clients/algo/docs/TimeWeightedAveragePriceFutureAlgoRequest.md +++ b/clients/algo/docs/TimeWeightedAveragePriceFutureAlgoRequest.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | -|**side** | **String** | | | -|**positionSide** | **String** | | [optional] | -|**quantity** | **Double** | | | -|**duration** | **Long** | | | -|**clientAlgoId** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**limitPrice** | **Double** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**symbol** | **String** | Trading symbol eg. BTCUSDT | | +|**side** | **Side** | | | +|**positionSide** | **PositionSide** | | [optional] | +|**quantity** | **Double** | Quantity of base asset; The notional (`quantity` * `mark price(base asset)`) must be more than the equivalent of 1,000 USDT and less than the equivalent of 1,000,000 USDT | | +|**duration** | **Long** | Duration for TWAP orders in seconds | | +|**clientAlgoId** | **String** | A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value | [optional] | +|**reduceOnly** | **Boolean** | \"true\" or \"false\". Default \"false\"; Cannot be sent in Hedge Mode; Cannot be sent when you open a position | [optional] | +|**limitPrice** | **Double** | Limit price of the order; If it is not sent, will place order by market price by default | [optional] | +|**recvWindow** | **Long** | Request validity window in milliseconds | [optional] | diff --git a/clients/algo/docs/TimeWeightedAveragePriceSpotAlgoRequest.md b/clients/algo/docs/TimeWeightedAveragePriceSpotAlgoRequest.md index 00cccb8b7..e2829b3b9 100644 --- a/clients/algo/docs/TimeWeightedAveragePriceSpotAlgoRequest.md +++ b/clients/algo/docs/TimeWeightedAveragePriceSpotAlgoRequest.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | -|**side** | **String** | | | -|**quantity** | **Double** | | | -|**duration** | **Long** | | | -|**clientAlgoId** | **String** | | [optional] | -|**limitPrice** | **Double** | | [optional] | +|**symbol** | **String** | Trading symbol eg. BTCUSDT | | +|**side** | **Side** | | | +|**quantity** | **Double** | Quantity of base asset; Maximum notional per order is 200k, 2mm or 10mm, depending on symbol. Please reduce your size if you order is above the maximum notional per order. | | +|**duration** | **Long** | Duration for TWAP orders in seconds | | +|**clientAlgoId** | **String** | A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value | [optional] | +|**limitPrice** | **Double** | Limit price of the order; If it is not sent, will place order by market price by default | [optional] | diff --git a/clients/algo/docs/Urgency.md b/clients/algo/docs/Urgency.md new file mode 100644 index 000000000..bbc000068 --- /dev/null +++ b/clients/algo/docs/Urgency.md @@ -0,0 +1,15 @@ + + +# Urgency + +## Enum + + +* `LOW` (value: `"LOW"`) + +* `MEDIUM` (value: `"MEDIUM"`) + +* `HIGH` (value: `"HIGH"`) + + + diff --git a/clients/algo/docs/VolumeParticipationFutureAlgoRequest.md b/clients/algo/docs/VolumeParticipationFutureAlgoRequest.md index 1b86f3377..f193aadef 100644 --- a/clients/algo/docs/VolumeParticipationFutureAlgoRequest.md +++ b/clients/algo/docs/VolumeParticipationFutureAlgoRequest.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | -|**side** | **String** | | | -|**positionSide** | **String** | | [optional] | -|**quantity** | **Double** | | | -|**urgency** | **String** | | | -|**clientAlgoId** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**limitPrice** | **Double** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**symbol** | **String** | Trading symbol eg. BTCUSDT | | +|**side** | **Side** | | | +|**positionSide** | **PositionSide** | | [optional] | +|**quantity** | **Double** | Quantity of base asset; The notional (`quantity` * `mark price(base asset)`) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT | | +|**urgency** | **Urgency** | | | +|**clientAlgoId** | **String** | A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value | [optional] | +|**reduceOnly** | **Boolean** | \"true\" or \"false\". Default \"false\"; Cannot be sent in Hedge Mode; Cannot be sent when you open a position | [optional] | +|**limitPrice** | **Double** | Limit price of the order; If it is not sent, will place order by market price by default | [optional] | +|**recvWindow** | **Long** | Request validity window in milliseconds | [optional] | diff --git a/clients/algo/docs/rest-api/migration-guide.md b/clients/algo/docs/rest-api/migration-guide.md index cefdba291..1cfdff376 100644 --- a/clients/algo/docs/rest-api/migration-guide.md +++ b/clients/algo/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-algo - 1.2.1 + 2.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-algo - 1.2.1 + 2.0.0 ``` diff --git a/clients/algo/example_rest.md b/clients/algo/example_rest.md index d2de10623..033852978 100644 --- a/clients/algo/example_rest.md +++ b/clients/algo/example_rest.md @@ -1,26 +1,26 @@ ## FutureAlgo -[DELETE /sapi/v1/algo/futures/order](https://developers.binance.com/docs/algo/future-algo/Cancel-Algo-Order) - cancelAlgoOrderFutureAlgo - [CancelAlgoOrderFutureAlgoExample.java:47](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/CancelAlgoOrderFutureAlgoExample.java#L47) +[DELETE /sapi/v1/algo/futures/order](https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#cancel-algo-order-future-algo) - cancelAlgoOrderFutureAlgo - [CancelAlgoOrderFutureAlgoExample.java:37](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/CancelAlgoOrderFutureAlgoExample.java#L37) -[GET /sapi/v1/algo/futures/openOrders](https://developers.binance.com/docs/algo/future-algo/Query-Current-Algo-Open-Orders) - queryCurrentAlgoOpenOrdersFutureAlgo - [QueryCurrentAlgoOpenOrdersFutureAlgoExample.java:47](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QueryCurrentAlgoOpenOrdersFutureAlgoExample.java#L47) +[GET /sapi/v1/algo/futures/openOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#query-current-algo-open-orders-future-algo) - queryCurrentAlgoOpenOrdersFutureAlgo - [QueryCurrentAlgoOpenOrdersFutureAlgoExample.java:37](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QueryCurrentAlgoOpenOrdersFutureAlgoExample.java#L37) -[GET /sapi/v1/algo/futures/historicalOrders](https://developers.binance.com/docs/algo/future-algo/Query-Historical-Algo-Orders) - queryHistoricalAlgoOrdersFutureAlgo - [QueryHistoricalAlgoOrdersFutureAlgoExample.java:47](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QueryHistoricalAlgoOrdersFutureAlgoExample.java#L47) +[GET /sapi/v1/algo/futures/historicalOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#query-historical-algo-orders-future-algo) - queryHistoricalAlgoOrdersFutureAlgo - [QueryHistoricalAlgoOrdersFutureAlgoExample.java:38](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QueryHistoricalAlgoOrdersFutureAlgoExample.java#L38) -[GET /sapi/v1/algo/futures/subOrders](https://developers.binance.com/docs/algo/future-algo/Query-Sub-Orders) - querySubOrdersFutureAlgo - [QuerySubOrdersFutureAlgoExample.java:48](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QuerySubOrdersFutureAlgoExample.java#L48) +[GET /sapi/v1/algo/futures/subOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#query-sub-orders-future-algo) - querySubOrdersFutureAlgo - [QuerySubOrdersFutureAlgoExample.java:37](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QuerySubOrdersFutureAlgoExample.java#L37) -[POST /sapi/v1/algo/futures/newOrderTwap](https://developers.binance.com/docs/algo/future-algo/Time-Weighted-Average-Price-New-Order) - timeWeightedAveragePriceFutureAlgo - [TimeWeightedAveragePriceFutureAlgoExample.java:60](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/TimeWeightedAveragePriceFutureAlgoExample.java#L60) +[POST /sapi/v1/algo/futures/newOrderTwap](https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#time-weighted-average-price-future-algo) - timeWeightedAveragePriceFutureAlgo - [TimeWeightedAveragePriceFutureAlgoExample.java:48](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/TimeWeightedAveragePriceFutureAlgoExample.java#L48) -[POST /sapi/v1/algo/futures/newOrderVp](https://developers.binance.com/docs/algo/future-algo/Volume-Participation-New-Order) - volumeParticipationFutureAlgo - [VolumeParticipationFutureAlgoExample.java:57](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/VolumeParticipationFutureAlgoExample.java#L57) +[POST /sapi/v1/algo/futures/newOrderVp](https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#volume-participation-future-algo) - volumeParticipationFutureAlgo - [VolumeParticipationFutureAlgoExample.java:46](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/VolumeParticipationFutureAlgoExample.java#L46) ## SpotAlgo -[DELETE /sapi/v1/algo/spot/order](https://developers.binance.com/docs/algo/spot-algo/Cancel-Algo-Order) - cancelAlgoOrderSpotAlgo - [CancelAlgoOrderSpotAlgoExample.java:46](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/CancelAlgoOrderSpotAlgoExample.java#L46) +[DELETE /sapi/v1/algo/spot/order](https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/spot-algo#cancel-algo-order-spot-algo) - cancelAlgoOrderSpotAlgo - [CancelAlgoOrderSpotAlgoExample.java:35](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/CancelAlgoOrderSpotAlgoExample.java#L35) -[GET /sapi/v1/algo/spot/openOrders](https://developers.binance.com/docs/algo/spot-algo/Query-Current-Algo-Open-Orders) - queryCurrentAlgoOpenOrdersSpotAlgo - [QueryCurrentAlgoOpenOrdersSpotAlgoExample.java:46](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QueryCurrentAlgoOpenOrdersSpotAlgoExample.java#L46) +[GET /sapi/v1/algo/spot/openOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/spot-algo#query-current-algo-open-orders-spot-algo) - queryCurrentAlgoOpenOrdersSpotAlgo - [QueryCurrentAlgoOpenOrdersSpotAlgoExample.java:35](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QueryCurrentAlgoOpenOrdersSpotAlgoExample.java#L35) -[GET /sapi/v1/algo/spot/historicalOrders](https://developers.binance.com/docs/algo/spot-algo/Query-Historical-Algo-Orders) - queryHistoricalAlgoOrdersSpotAlgo - [QueryHistoricalAlgoOrdersSpotAlgoExample.java:46](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QueryHistoricalAlgoOrdersSpotAlgoExample.java#L46) +[GET /sapi/v1/algo/spot/historicalOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/spot-algo#query-historical-algo-orders-spot-algo) - queryHistoricalAlgoOrdersSpotAlgo - [QueryHistoricalAlgoOrdersSpotAlgoExample.java:36](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QueryHistoricalAlgoOrdersSpotAlgoExample.java#L36) -[GET /sapi/v1/algo/spot/subOrders](https://developers.binance.com/docs/algo/spot-algo/Query-Sub-Orders) - querySubOrdersSpotAlgo - [QuerySubOrdersSpotAlgoExample.java:46](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QuerySubOrdersSpotAlgoExample.java#L46) +[GET /sapi/v1/algo/spot/subOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/spot-algo#query-sub-orders-spot-algo) - querySubOrdersSpotAlgo - [QuerySubOrdersSpotAlgoExample.java:35](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QuerySubOrdersSpotAlgoExample.java#L35) -[POST /sapi/v1/algo/spot/newOrderTwap](https://developers.binance.com/docs/algo/spot-algo/Time-Weighted-Average-Price-New-Order) - timeWeightedAveragePriceSpotAlgo - [TimeWeightedAveragePriceSpotAlgoExample.java:48](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/TimeWeightedAveragePriceSpotAlgoExample.java#L48) +[POST /sapi/v1/algo/spot/newOrderTwap](https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/spot-algo#time-weighted-average-price-spot-algo) - timeWeightedAveragePriceSpotAlgo - [TimeWeightedAveragePriceSpotAlgoExample.java:38](/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/TimeWeightedAveragePriceSpotAlgoExample.java#L38) diff --git a/clients/algo/pom.xml b/clients/algo/pom.xml index 01251e4fd..7ffaab36c 100644 --- a/clients/algo/pom.xml +++ b/clients/algo/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-algo algo - 1.2.2 + 2.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/JSON.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/JSON.java index a869aaf40..f92508d59 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/JSON.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/AlgoRestApi.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/AlgoRestApi.java index 13bfa582b..903167cb1 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/AlgoRestApi.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/AlgoRestApi.java @@ -9,6 +9,7 @@ import com.binance.connector.client.algo.rest.model.QueryHistoricalAlgoOrdersSpotAlgoResponse; import com.binance.connector.client.algo.rest.model.QuerySubOrdersFutureAlgoResponse; import com.binance.connector.client.algo.rest.model.QuerySubOrdersSpotAlgoResponse; +import com.binance.connector.client.algo.rest.model.Side; import com.binance.connector.client.algo.rest.model.TimeWeightedAveragePriceFutureAlgoRequest; import com.binance.connector.client.algo.rest.model.TimeWeightedAveragePriceFutureAlgoResponse; import com.binance.connector.client.algo.rest.model.TimeWeightedAveragePriceSpotAlgoRequest; @@ -35,12 +36,12 @@ public AlgoRestApi(ApiClient apiClient) { } /** - * Cancel Algo Order(TRADE) Cancel an active order. * You need to enable `Futures Trading - * Permission` for the api key which requests this endpoint. * Base URL: - * https://api.binance.com Weight: 1 + * Cancel Futures Algo Order (TRADE) Cancel an active order. Weight(IP): 1 Security Type: TRADE + * Notes: - You need to enable `Futures Trading Permission` for the API key that + * requests this endpoint. - Base URL: `https://api.binance.com` * * @param algoId eg. 14511 (required) - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<CancelAlgoOrderFutureAlgoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -51,8 +52,9 @@ public AlgoRestApi(ApiClient apiClient) { * 200 Cancel Algo Order - * * - * @see Cancel - * Algo Order(TRADE) Documentation + * @see Cancel + * Futures Algo Order (TRADE) Documentation */ public ApiResponse cancelAlgoOrderFutureAlgo( Long algoId, Long recvWindow) throws ApiException { @@ -60,11 +62,11 @@ public ApiResponse cancelAlgoOrderFutureAlgo( } /** - * Query Current Algo Open Orders(USER_DATA) Query Current Algo Open Orders * You need to enable - * `Futures Trading Permission` for the api key which requests this endpoint. * Base - * URL: https://api.binance.com Weight: 1 + * Query Current Futures Algo Open Orders (USER_DATA) Query Current Algo Open Orders Weight(IP): + * 1 Security Type: USER_DATA Notes: - You need to enable `Futures Trading Permission` + * for the API key that requests this endpoint. - Base URL: `https://api.binance.com` * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QueryCurrentAlgoOpenOrdersFutureAlgoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -76,8 +78,8 @@ public ApiResponse cancelAlgoOrderFutureAlgo( * * * @see Query - * Current Algo Open Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#query-current-algo-open-orders-future-algo">Query + * Current Futures Algo Open Orders (USER_DATA) Documentation */ public ApiResponse queryCurrentAlgoOpenOrdersFutureAlgo(Long recvWindow) throws ApiException { @@ -85,17 +87,17 @@ public ApiResponse cancelAlgoOrderFutureAlgo( } /** - * Query Historical Algo Orders(USER_DATA) Query Historical Algo Order * You need to enable - * `Futures Trading Permission` for the api key which requests this endpoint. * Base - * URL: https://api.binance.com Weight: 1 + * Query Historical Futures Algo Orders (USER_DATA) Query Historical Algo Order Weight(IP): 1 + * Security Type: USER_DATA Notes: - You need to enable `Futures Trading Permission` + * for the API key that requests this endpoint. - Base URL: `https://api.binance.com` * * @param symbol Trading symbol eg. BTCUSDT (optional) * @param side BUY or SELL (optional) * @param startTime in milliseconds eg.1641522717552 (optional) * @param endTime in milliseconds eg.1641522526562 (optional) - * @param page Default is 1 (optional) - * @param pageSize MIN 1, MAX 100; Default 100 (optional) - * @param recvWindow (optional) + * @param page Page number (optional) + * @param pageSize Records per page (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QueryHistoricalAlgoOrdersFutureAlgoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -107,13 +109,13 @@ public ApiResponse cancelAlgoOrderFutureAlgo( * * * @see Query - * Historical Algo Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#query-historical-algo-orders-future-algo">Query + * Historical Futures Algo Orders (USER_DATA) Documentation */ public ApiResponse queryHistoricalAlgoOrdersFutureAlgo( String symbol, - String side, + Side side, Long startTime, Long endTime, Long page, @@ -125,14 +127,15 @@ public ApiResponse cancelAlgoOrderFutureAlgo( } /** - * Query Sub Orders(USER_DATA) Get respective sub orders for a specified algoId * You need to - * enable `Futures Trading Permission` for the api key which requests this endpoint. * - * Base URL: https://api.binance.com Weight: 1 + * Query Futures Sub Orders (USER_DATA) Get respective sub orders for a specified algoId + * Weight(IP): 1 Security Type: USER_DATA Notes: - You need to enable `Futures Trading + * Permission` for the API key that requests this endpoint. - Base URL: + * `https://api.binance.com` * * @param algoId eg. 14511 (required) - * @param page Default is 1 (optional) - * @param pageSize MIN 1, MAX 100; Default 100 (optional) - * @param recvWindow (optional) + * @param page Page number (optional) + * @param pageSize Records per page (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QuerySubOrdersFutureAlgoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -143,8 +146,9 @@ public ApiResponse cancelAlgoOrderFutureAlgo( * 200 Sub Orders - * * - * @see Query - * Sub Orders(USER_DATA) Documentation + * @see Query + * Futures Sub Orders (USER_DATA) Documentation */ public ApiResponse querySubOrdersFutureAlgo( Long algoId, Long page, Long pageSize, Long recvWindow) throws ApiException { @@ -152,21 +156,19 @@ public ApiResponse querySubOrdersFutureAlgo( } /** - * Time-Weighted Average Price(Twap) New Order(TRADE) Send in a Twap new order. Only support on - * USDⓈ-M Contracts. * Total Algo open orders max allowed: `30` orders. * Leverage of - * symbols and position mode will be the same as your futures account settings. You can set up - * through the trading page or fapi. * Receiving `\"success\": true` does - * not mean that your order will be executed. Please use the query order endpoints(`GET - * sapi/v1/algo/futures/openOrders` or `GET - * sapi/v1/algo/futures/historicalOrders`) to check the order status. For example: Your - * futures balance is insufficient, or open position with reduce only or position side is - * inconsistent with your own setting. In these cases you will receive - * `\"success\": true`, but the order status will be `expired` - * after we check it. * `quantity` * 60 / `duration` should be larger than - * minQty * `duration` cannot be less than 5 mins or more than 24 hours. * For - * delivery contracts, TWAP end time should be one hour earlier than the delivery time of the - * symbol. * You need to enable `Futures Trading Permission` for the api key which - * requests this endpoint. * Base URL: https://api.binance.com Weight: 3000 + * Time-Weighted Futures Average Price (Twap) New Order (TRADE) Send in a Twap new order. Only + * support on USDⓈ-M Contracts. Weight(UID): 3000 Security Type: TRADE Notes: - Other info: - + * Total Algo open orders max allowed: `30` orders. - Leverage and position mode + * follow your futures account settings. - Receiving `\"success\": true` + * does not guarantee execution; query order endpoints for final status. - If balance/position + * constraints fail, response may still return success but order status becomes + * `expired`. - `quantity * 60 / duration` must be greater than + * `minQty`. - `duration` cannot be less than 5 minutes or greater than 24 + * hours. - For delivery contracts, TWAP end time should be one hour earlier than symbol + * delivery time. - You need to enable the corresponding permission for the API key requesting + * this endpoint: - `Futures Trading Permission` — for Classic Trading Account mode - + * `Portfolio Margin Trading Permission` — for Portfolio Margin Account mode - Base + * URL: `https://api.binance.com` * * @param timeWeightedAveragePriceFutureAlgoRequest (required) * @return ApiResponse<TimeWeightedAveragePriceFutureAlgoResponse> @@ -180,8 +182,8 @@ public ApiResponse querySubOrdersFutureAlgo( * * * @see Time-Weighted - * Average Price(Twap) New Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#time-weighted-average-price-future-algo">Time-Weighted + * Futures Average Price (Twap) New Order (TRADE) Documentation */ public ApiResponse timeWeightedAveragePriceFutureAlgo( @@ -193,18 +195,16 @@ public ApiResponse querySubOrdersFutureAlgo( } /** - * Volume Participation(VP) New Order (TRADE) Send in a VP new order. Only support on USDⓈ-M - * Contracts. * Total Algo open orders max allowed: `10` orders. * Leverage of symbols - * and position mode will be the same as your futures account settings. You can set up through - * the trading page or fapi. * Receiving `\"success\": true` does not mean - * that your order will be executed. Please use the query order endpoints(`GET - * sapi/v1/algo/futures/openOrders` or `GET - * sapi/v1/algo/futures/historicalOrders`) to check the order status. For example: Your - * futures balance is insufficient, or open position with reduce only or position side is - * inconsistent with your own setting. In these cases you will receive - * `\"success\": true`, but the order status will be `expired` - * after we check it. * You need to enable `Futures Trading Permission` for the api - * key which requests this endpoint. * Base URL: https://api.binance.com Weight: 300 + * Volume Participation (VP) New Order (TRADE) Send in a VP new order. Only support on USDⓈ-M + * Contracts. Weight(UID): 300 Security Type: TRADE Notes: - Other info: - Total Algo open + * orders max allowed: `10` orders. - Leverage and position mode follow your futures + * account settings. - Receiving `\"success\": true` does not guarantee + * execution; query order endpoints for final status. - If balance/position constraints fail, + * response may still return success but order status becomes `expired`. - You need to + * enable the corresponding permission for the API key requesting this endpoint: - `Futures + * Trading Permission` — for Classic Trading Account mode - `Portfolio Margin Trading + * Permission` — for Portfolio Margin Account mode - Base URL: + * `https://api.binance.com` * * @param volumeParticipationFutureAlgoRequest (required) * @return ApiResponse<VolumeParticipationFutureAlgoResponse> @@ -218,8 +218,8 @@ public ApiResponse querySubOrdersFutureAlgo( * * * @see Volume - * Participation(VP) New Order (TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#volume-participation-future-algo">Volume + * Participation (VP) New Order (TRADE) Documentation */ public ApiResponse volumeParticipationFutureAlgo( VolumeParticipationFutureAlgoRequest volumeParticipationFutureAlgoRequest) @@ -228,10 +228,10 @@ public ApiResponse volumeParticipationFut } /** - * Cancel Algo Order(TRADE) Cancel an open TWAP order Weight: 1 + * Cancel Spot Algo Order (TRADE) Cancel an open TWAP order Weight(IP): 1 Security Type: TRADE * - * @param algoId eg. 14511 (required) - * @param recvWindow (optional) + * @param algoId (required) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<CancelAlgoOrderSpotAlgoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -242,8 +242,9 @@ public ApiResponse volumeParticipationFut * 200 Cancel Algo Order - * * - * @see Cancel - * Algo Order(TRADE) Documentation + * @see Cancel + * Spot Algo Order (TRADE) Documentation */ public ApiResponse cancelAlgoOrderSpotAlgo( Long algoId, Long recvWindow) throws ApiException { @@ -251,9 +252,10 @@ public ApiResponse cancelAlgoOrderSpotAlgo( } /** - * Query Current Algo Open Orders(USER_DATA) Get all open SPOT TWAP orders Weight: 1 + * Query Current Spot Algo Open Orders (USER_DATA) Get all open SPOT TWAP orders Weight(IP): 1 + * Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QueryCurrentAlgoOpenOrdersSpotAlgoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -265,8 +267,8 @@ public ApiResponse cancelAlgoOrderSpotAlgo( * * * @see Query - * Current Algo Open Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/spot-algo#query-current-algo-open-orders-spot-algo">Query + * Current Spot Algo Open Orders (USER_DATA) Documentation */ public ApiResponse queryCurrentAlgoOpenOrdersSpotAlgo(Long recvWindow) throws ApiException { @@ -274,15 +276,16 @@ public ApiResponse cancelAlgoOrderSpotAlgo( } /** - * Query Historical Algo Orders(USER_DATA) Get all historical SPOT TWAP orders Weight: 1 + * Query Historical Spot Algo Orders (USER_DATA) Get all historical SPOT TWAP orders Weight(IP): + * 1 Security Type: USER_DATA * - * @param symbol Trading symbol eg. BTCUSDT (optional) - * @param side BUY or SELL (optional) + * @param symbol Trading symbol (optional) + * @param side (optional) * @param startTime in milliseconds eg.1641522717552 (optional) * @param endTime in milliseconds eg.1641522526562 (optional) - * @param page Default is 1 (optional) - * @param pageSize MIN 1, MAX 100; Default 100 (optional) - * @param recvWindow (optional) + * @param page Page number (optional) + * @param pageSize Records per page (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QueryHistoricalAlgoOrdersSpotAlgoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -294,12 +297,12 @@ public ApiResponse cancelAlgoOrderSpotAlgo( * * * @see Query - * Historical Algo Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/spot-algo#query-historical-algo-orders-spot-algo">Query + * Historical Spot Algo Orders (USER_DATA) Documentation */ public ApiResponse queryHistoricalAlgoOrdersSpotAlgo( String symbol, - String side, + Side side, Long startTime, Long endTime, Long page, @@ -311,12 +314,13 @@ public ApiResponse queryHistoricalAlg } /** - * Query Sub Orders(USER_DATA) Get respective sub orders for a specified algoId Weight: 1 + * Query Spot Sub Orders (USER_DATA) Get respective sub orders for a specified algoId + * Weight(IP): 1 Security Type: USER_DATA * * @param algoId eg. 14511 (required) - * @param page Default is 1 (optional) - * @param pageSize MIN 1, MAX 100; Default 100 (optional) - * @param recvWindow (optional) + * @param page Page number (optional) + * @param pageSize Records per page (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QuerySubOrdersSpotAlgoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -327,8 +331,9 @@ public ApiResponse queryHistoricalAlg * 200 Sub Orders - * * - * @see Query Sub - * Orders(USER_DATA) Documentation + * @see Query + * Spot Sub Orders (USER_DATA) Documentation */ public ApiResponse querySubOrdersSpotAlgo( Long algoId, Long page, Long pageSize, Long recvWindow) throws ApiException { @@ -336,8 +341,9 @@ public ApiResponse querySubOrdersSpotAlgo( } /** - * Time-Weighted Average Price(Twap) New Order(TRADE) Place a new spot TWAP order with Algo - * service. * Total Algo open orders max allowed: `20` orders. Weight: 3000 + * Time-Weighted Spot Average Price(Twap) New Order (TRADE) Place a new spot TWAP order with + * Algo service. Weight(UID): 3000 Security Type: TRADE Notes: - Total Algo open orders max + * allowed: `20` orders. * * @param timeWeightedAveragePriceSpotAlgoRequest (required) * @return ApiResponse<TimeWeightedAveragePriceSpotAlgoResponse> @@ -351,8 +357,8 @@ public ApiResponse querySubOrdersSpotAlgo( * * * @see Time-Weighted - * Average Price(Twap) New Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/spot-algo#time-weighted-average-price-spot-algo">Time-Weighted + * Spot Average Price(Twap) New Order (TRADE) Documentation */ public ApiResponse timeWeightedAveragePriceSpotAlgo( TimeWeightedAveragePriceSpotAlgoRequest timeWeightedAveragePriceSpotAlgoRequest) diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/FutureAlgoApi.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/FutureAlgoApi.java index aab02feaf..8e489104d 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/FutureAlgoApi.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/FutureAlgoApi.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -16,6 +16,7 @@ import com.binance.connector.client.algo.rest.model.QueryCurrentAlgoOpenOrdersFutureAlgoResponse; import com.binance.connector.client.algo.rest.model.QueryHistoricalAlgoOrdersFutureAlgoResponse; import com.binance.connector.client.algo.rest.model.QuerySubOrdersFutureAlgoResponse; +import com.binance.connector.client.algo.rest.model.Side; import com.binance.connector.client.algo.rest.model.TimeWeightedAveragePriceFutureAlgoRequest; import com.binance.connector.client.algo.rest.model.TimeWeightedAveragePriceFutureAlgoResponse; import com.binance.connector.client.algo.rest.model.VolumeParticipationFutureAlgoRequest; @@ -51,7 +52,7 @@ public class FutureAlgoApi { private static final String USER_AGENT = String.format( - "binance-algo/1.2.1 (Java/%s; %s; %s)", + "binance-algo/2.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -92,7 +93,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * Build call for cancelAlgoOrderFutureAlgo * * @param algoId eg. 14511 (required) - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -102,8 +103,9 @@ public void setCustomBaseUrl(String customBaseUrl) { * 200 Cancel Algo Order - * * - * @see Cancel - * Algo Order(TRADE) Documentation + * @see Cancel + * Futures Algo Order (TRADE) Documentation */ private okhttp3.Call cancelAlgoOrderFutureAlgoCall(Long algoId, Long recvWindow) throws ApiException { @@ -202,12 +204,12 @@ private okhttp3.Call cancelAlgoOrderFutureAlgoValidateBeforeCall(Long algoId, Lo } /** - * Cancel Algo Order(TRADE) Cancel an active order. * You need to enable `Futures Trading - * Permission` for the api key which requests this endpoint. * Base URL: - * https://api.binance.com Weight: 1 + * Cancel Futures Algo Order (TRADE) Cancel an active order. Weight(IP): 1 Security Type: TRADE + * Notes: - You need to enable `Futures Trading Permission` for the API key that + * requests this endpoint. - Base URL: `https://api.binance.com` * * @param algoId eg. 14511 (required) - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<CancelAlgoOrderFutureAlgoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -218,11 +220,12 @@ private okhttp3.Call cancelAlgoOrderFutureAlgoValidateBeforeCall(Long algoId, Lo * 200 Cancel Algo Order - * * - * @see Cancel - * Algo Order(TRADE) Documentation + * @see Cancel + * Futures Algo Order (TRADE) Documentation */ public ApiResponse cancelAlgoOrderFutureAlgo( - @NotNull Long algoId, Long recvWindow) throws ApiException { + @NotNull Long algoId, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = cancelAlgoOrderFutureAlgoValidateBeforeCall(algoId, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -232,7 +235,7 @@ public ApiResponse cancelAlgoOrderFutureAlgo( /** * Build call for queryCurrentAlgoOpenOrdersFutureAlgo * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -243,8 +246,8 @@ public ApiResponse cancelAlgoOrderFutureAlgo( * * * @see Query - * Current Algo Open Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#query-current-algo-open-orders-future-algo">Query + * Current Futures Algo Open Orders (USER_DATA) Documentation */ private okhttp3.Call queryCurrentAlgoOpenOrdersFutureAlgoCall(Long recvWindow) throws ApiException { @@ -339,11 +342,11 @@ private okhttp3.Call queryCurrentAlgoOpenOrdersFutureAlgoValidateBeforeCall(Long } /** - * Query Current Algo Open Orders(USER_DATA) Query Current Algo Open Orders * You need to enable - * `Futures Trading Permission` for the api key which requests this endpoint. * Base - * URL: https://api.binance.com Weight: 1 + * Query Current Futures Algo Open Orders (USER_DATA) Query Current Algo Open Orders Weight(IP): + * 1 Security Type: USER_DATA Notes: - You need to enable `Futures Trading Permission` + * for the API key that requests this endpoint. - Base URL: `https://api.binance.com` * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QueryCurrentAlgoOpenOrdersFutureAlgoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -355,11 +358,11 @@ private okhttp3.Call queryCurrentAlgoOpenOrdersFutureAlgoValidateBeforeCall(Long * * * @see Query - * Current Algo Open Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#query-current-algo-open-orders-future-algo">Query + * Current Futures Algo Open Orders (USER_DATA) Documentation */ public ApiResponse - queryCurrentAlgoOpenOrdersFutureAlgo(Long recvWindow) throws ApiException { + queryCurrentAlgoOpenOrdersFutureAlgo(@Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryCurrentAlgoOpenOrdersFutureAlgoValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = @@ -374,9 +377,9 @@ private okhttp3.Call queryCurrentAlgoOpenOrdersFutureAlgoValidateBeforeCall(Long * @param side BUY or SELL (optional) * @param startTime in milliseconds eg.1641522717552 (optional) * @param endTime in milliseconds eg.1641522526562 (optional) - * @param page Default is 1 (optional) - * @param pageSize MIN 1, MAX 100; Default 100 (optional) - * @param recvWindow (optional) + * @param page Page number (optional) + * @param pageSize Records per page (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -387,12 +390,12 @@ private okhttp3.Call queryCurrentAlgoOpenOrdersFutureAlgoValidateBeforeCall(Long * * * @see Query - * Historical Algo Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#query-historical-algo-orders-future-algo">Query + * Historical Futures Algo Orders (USER_DATA) Documentation */ private okhttp3.Call queryHistoricalAlgoOrdersFutureAlgoCall( String symbol, - String side, + Side side, Long startTime, Long endTime, Long page, @@ -484,7 +487,7 @@ private okhttp3.Call queryHistoricalAlgoOrdersFutureAlgoCall( @SuppressWarnings("rawtypes") private okhttp3.Call queryHistoricalAlgoOrdersFutureAlgoValidateBeforeCall( String symbol, - String side, + Side side, Long startTime, Long endTime, Long page, @@ -508,7 +511,7 @@ private okhttp3.Call queryHistoricalAlgoOrdersFutureAlgoValidateBeforeCall( .getMethod( "queryHistoricalAlgoOrdersFutureAlgo", String.class, - String.class, + Side.class, Long.class, Long.class, Long.class, @@ -533,17 +536,17 @@ private okhttp3.Call queryHistoricalAlgoOrdersFutureAlgoValidateBeforeCall( } /** - * Query Historical Algo Orders(USER_DATA) Query Historical Algo Order * You need to enable - * `Futures Trading Permission` for the api key which requests this endpoint. * Base - * URL: https://api.binance.com Weight: 1 + * Query Historical Futures Algo Orders (USER_DATA) Query Historical Algo Order Weight(IP): 1 + * Security Type: USER_DATA Notes: - You need to enable `Futures Trading Permission` + * for the API key that requests this endpoint. - Base URL: `https://api.binance.com` * * @param symbol Trading symbol eg. BTCUSDT (optional) * @param side BUY or SELL (optional) * @param startTime in milliseconds eg.1641522717552 (optional) * @param endTime in milliseconds eg.1641522526562 (optional) - * @param page Default is 1 (optional) - * @param pageSize MIN 1, MAX 100; Default 100 (optional) - * @param recvWindow (optional) + * @param page Page number (optional) + * @param pageSize Records per page (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QueryHistoricalAlgoOrdersFutureAlgoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -555,18 +558,18 @@ private okhttp3.Call queryHistoricalAlgoOrdersFutureAlgoValidateBeforeCall( * * * @see Query - * Historical Algo Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#query-historical-algo-orders-future-algo">Query + * Historical Futures Algo Orders (USER_DATA) Documentation */ public ApiResponse queryHistoricalAlgoOrdersFutureAlgo( String symbol, - String side, + Side side, Long startTime, Long endTime, Long page, - Long pageSize, - Long recvWindow) + @Min(1L) @Max(100L) Long pageSize, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryHistoricalAlgoOrdersFutureAlgoValidateBeforeCall( @@ -580,9 +583,9 @@ private okhttp3.Call queryHistoricalAlgoOrdersFutureAlgoValidateBeforeCall( * Build call for querySubOrdersFutureAlgo * * @param algoId eg. 14511 (required) - * @param page Default is 1 (optional) - * @param pageSize MIN 1, MAX 100; Default 100 (optional) - * @param recvWindow (optional) + * @param page Page number (optional) + * @param pageSize Records per page (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -592,8 +595,9 @@ private okhttp3.Call queryHistoricalAlgoOrdersFutureAlgoValidateBeforeCall( * 200 Sub Orders - * * - * @see Query - * Sub Orders(USER_DATA) Documentation + * @see Query + * Futures Sub Orders (USER_DATA) Documentation */ private okhttp3.Call querySubOrdersFutureAlgoCall( Long algoId, Long page, Long pageSize, Long recvWindow) throws ApiException { @@ -706,14 +710,15 @@ private okhttp3.Call querySubOrdersFutureAlgoValidateBeforeCall( } /** - * Query Sub Orders(USER_DATA) Get respective sub orders for a specified algoId * You need to - * enable `Futures Trading Permission` for the api key which requests this endpoint. * - * Base URL: https://api.binance.com Weight: 1 + * Query Futures Sub Orders (USER_DATA) Get respective sub orders for a specified algoId + * Weight(IP): 1 Security Type: USER_DATA Notes: - You need to enable `Futures Trading + * Permission` for the API key that requests this endpoint. - Base URL: + * `https://api.binance.com` * * @param algoId eg. 14511 (required) - * @param page Default is 1 (optional) - * @param pageSize MIN 1, MAX 100; Default 100 (optional) - * @param recvWindow (optional) + * @param page Page number (optional) + * @param pageSize Records per page (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QuerySubOrdersFutureAlgoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -724,11 +729,16 @@ private okhttp3.Call querySubOrdersFutureAlgoValidateBeforeCall( * 200 Sub Orders - * * - * @see Query - * Sub Orders(USER_DATA) Documentation + * @see Query + * Futures Sub Orders (USER_DATA) Documentation */ public ApiResponse querySubOrdersFutureAlgo( - @NotNull Long algoId, Long page, Long pageSize, Long recvWindow) throws ApiException { + @NotNull Long algoId, + Long page, + @Min(1L) @Max(100L) Long pageSize, + @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = querySubOrdersFutureAlgoValidateBeforeCall(algoId, page, pageSize, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -750,8 +760,8 @@ public ApiResponse querySubOrdersFutureAlgo( * * * @see Time-Weighted - * Average Price(Twap) New Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#time-weighted-average-price-future-algo">Time-Weighted + * Futures Average Price (Twap) New Order (TRADE) Documentation */ private okhttp3.Call timeWeightedAveragePriceFutureAlgoCall( TimeWeightedAveragePriceFutureAlgoRequest timeWeightedAveragePriceFutureAlgoRequest) @@ -895,21 +905,19 @@ private okhttp3.Call timeWeightedAveragePriceFutureAlgoValidateBeforeCall( } /** - * Time-Weighted Average Price(Twap) New Order(TRADE) Send in a Twap new order. Only support on - * USDⓈ-M Contracts. * Total Algo open orders max allowed: `30` orders. * Leverage of - * symbols and position mode will be the same as your futures account settings. You can set up - * through the trading page or fapi. * Receiving `\"success\": true` does - * not mean that your order will be executed. Please use the query order endpoints(`GET - * sapi/v1/algo/futures/openOrders` or `GET - * sapi/v1/algo/futures/historicalOrders`) to check the order status. For example: Your - * futures balance is insufficient, or open position with reduce only or position side is - * inconsistent with your own setting. In these cases you will receive - * `\"success\": true`, but the order status will be `expired` - * after we check it. * `quantity` * 60 / `duration` should be larger than - * minQty * `duration` cannot be less than 5 mins or more than 24 hours. * For - * delivery contracts, TWAP end time should be one hour earlier than the delivery time of the - * symbol. * You need to enable `Futures Trading Permission` for the api key which - * requests this endpoint. * Base URL: https://api.binance.com Weight: 3000 + * Time-Weighted Futures Average Price (Twap) New Order (TRADE) Send in a Twap new order. Only + * support on USDⓈ-M Contracts. Weight(UID): 3000 Security Type: TRADE Notes: - Other info: - + * Total Algo open orders max allowed: `30` orders. - Leverage and position mode + * follow your futures account settings. - Receiving `\"success\": true` + * does not guarantee execution; query order endpoints for final status. - If balance/position + * constraints fail, response may still return success but order status becomes + * `expired`. - `quantity * 60 / duration` must be greater than + * `minQty`. - `duration` cannot be less than 5 minutes or greater than 24 + * hours. - For delivery contracts, TWAP end time should be one hour earlier than symbol + * delivery time. - You need to enable the corresponding permission for the API key requesting + * this endpoint: - `Futures Trading Permission` — for Classic Trading Account mode - + * `Portfolio Margin Trading Permission` — for Portfolio Margin Account mode - Base + * URL: `https://api.binance.com` * * @param timeWeightedAveragePriceFutureAlgoRequest (required) * @return ApiResponse<TimeWeightedAveragePriceFutureAlgoResponse> @@ -923,8 +931,8 @@ private okhttp3.Call timeWeightedAveragePriceFutureAlgoValidateBeforeCall( * * * @see Time-Weighted - * Average Price(Twap) New Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#time-weighted-average-price-future-algo">Time-Weighted + * Futures Average Price (Twap) New Order (TRADE) Documentation */ public ApiResponse timeWeightedAveragePriceFutureAlgo( @@ -954,8 +962,8 @@ private okhttp3.Call timeWeightedAveragePriceFutureAlgoValidateBeforeCall( * * * @see Volume - * Participation(VP) New Order (TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#volume-participation-future-algo">Volume + * Participation (VP) New Order (TRADE) Documentation */ private okhttp3.Call volumeParticipationFutureAlgoCall( VolumeParticipationFutureAlgoRequest volumeParticipationFutureAlgoRequest) @@ -1097,18 +1105,16 @@ private okhttp3.Call volumeParticipationFutureAlgoValidateBeforeCall( } /** - * Volume Participation(VP) New Order (TRADE) Send in a VP new order. Only support on USDⓈ-M - * Contracts. * Total Algo open orders max allowed: `10` orders. * Leverage of symbols - * and position mode will be the same as your futures account settings. You can set up through - * the trading page or fapi. * Receiving `\"success\": true` does not mean - * that your order will be executed. Please use the query order endpoints(`GET - * sapi/v1/algo/futures/openOrders` or `GET - * sapi/v1/algo/futures/historicalOrders`) to check the order status. For example: Your - * futures balance is insufficient, or open position with reduce only or position side is - * inconsistent with your own setting. In these cases you will receive - * `\"success\": true`, but the order status will be `expired` - * after we check it. * You need to enable `Futures Trading Permission` for the api - * key which requests this endpoint. * Base URL: https://api.binance.com Weight: 300 + * Volume Participation (VP) New Order (TRADE) Send in a VP new order. Only support on USDⓈ-M + * Contracts. Weight(UID): 300 Security Type: TRADE Notes: - Other info: - Total Algo open + * orders max allowed: `10` orders. - Leverage and position mode follow your futures + * account settings. - Receiving `\"success\": true` does not guarantee + * execution; query order endpoints for final status. - If balance/position constraints fail, + * response may still return success but order status becomes `expired`. - You need to + * enable the corresponding permission for the API key requesting this endpoint: - `Futures + * Trading Permission` — for Classic Trading Account mode - `Portfolio Margin Trading + * Permission` — for Portfolio Margin Account mode - Base URL: + * `https://api.binance.com` * * @param volumeParticipationFutureAlgoRequest (required) * @return ApiResponse<VolumeParticipationFutureAlgoResponse> @@ -1122,8 +1128,8 @@ private okhttp3.Call volumeParticipationFutureAlgoValidateBeforeCall( * * * @see Volume - * Participation(VP) New Order (TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#volume-participation-future-algo">Volume + * Participation (VP) New Order (TRADE) Documentation */ public ApiResponse volumeParticipationFutureAlgo( @Valid @NotNull diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/SpotAlgoApi.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/SpotAlgoApi.java index 9f6a170b6..ac57d4be0 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/SpotAlgoApi.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/SpotAlgoApi.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -16,6 +16,7 @@ import com.binance.connector.client.algo.rest.model.QueryCurrentAlgoOpenOrdersSpotAlgoResponse; import com.binance.connector.client.algo.rest.model.QueryHistoricalAlgoOrdersSpotAlgoResponse; import com.binance.connector.client.algo.rest.model.QuerySubOrdersSpotAlgoResponse; +import com.binance.connector.client.algo.rest.model.Side; import com.binance.connector.client.algo.rest.model.TimeWeightedAveragePriceSpotAlgoRequest; import com.binance.connector.client.algo.rest.model.TimeWeightedAveragePriceSpotAlgoResponse; import com.binance.connector.client.common.ApiClient; @@ -49,7 +50,7 @@ public class SpotAlgoApi { private static final String USER_AGENT = String.format( - "binance-algo/1.2.1 (Java/%s; %s; %s)", + "binance-algo/2.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -89,8 +90,8 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for cancelAlgoOrderSpotAlgo * - * @param algoId eg. 14511 (required) - * @param recvWindow (optional) + * @param algoId (required) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -100,8 +101,9 @@ public void setCustomBaseUrl(String customBaseUrl) { * 200 Cancel Algo Order - * * - * @see Cancel - * Algo Order(TRADE) Documentation + * @see Cancel + * Spot Algo Order (TRADE) Documentation */ private okhttp3.Call cancelAlgoOrderSpotAlgoCall(Long algoId, Long recvWindow) throws ApiException { @@ -200,10 +202,10 @@ private okhttp3.Call cancelAlgoOrderSpotAlgoValidateBeforeCall(Long algoId, Long } /** - * Cancel Algo Order(TRADE) Cancel an open TWAP order Weight: 1 + * Cancel Spot Algo Order (TRADE) Cancel an open TWAP order Weight(IP): 1 Security Type: TRADE * - * @param algoId eg. 14511 (required) - * @param recvWindow (optional) + * @param algoId (required) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<CancelAlgoOrderSpotAlgoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -214,11 +216,12 @@ private okhttp3.Call cancelAlgoOrderSpotAlgoValidateBeforeCall(Long algoId, Long * 200 Cancel Algo Order - * * - * @see Cancel - * Algo Order(TRADE) Documentation + * @see Cancel + * Spot Algo Order (TRADE) Documentation */ public ApiResponse cancelAlgoOrderSpotAlgo( - @NotNull Long algoId, Long recvWindow) throws ApiException { + @NotNull Long algoId, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = cancelAlgoOrderSpotAlgoValidateBeforeCall(algoId, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -228,7 +231,7 @@ public ApiResponse cancelAlgoOrderSpotAlgo( /** * Build call for queryCurrentAlgoOpenOrdersSpotAlgo * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -239,8 +242,8 @@ public ApiResponse cancelAlgoOrderSpotAlgo( * * * @see Query - * Current Algo Open Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/spot-algo#query-current-algo-open-orders-spot-algo">Query + * Current Spot Algo Open Orders (USER_DATA) Documentation */ private okhttp3.Call queryCurrentAlgoOpenOrdersSpotAlgoCall(Long recvWindow) throws ApiException { @@ -335,9 +338,10 @@ private okhttp3.Call queryCurrentAlgoOpenOrdersSpotAlgoValidateBeforeCall(Long r } /** - * Query Current Algo Open Orders(USER_DATA) Get all open SPOT TWAP orders Weight: 1 + * Query Current Spot Algo Open Orders (USER_DATA) Get all open SPOT TWAP orders Weight(IP): 1 + * Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QueryCurrentAlgoOpenOrdersSpotAlgoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -349,11 +353,11 @@ private okhttp3.Call queryCurrentAlgoOpenOrdersSpotAlgoValidateBeforeCall(Long r * * * @see Query - * Current Algo Open Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/spot-algo#query-current-algo-open-orders-spot-algo">Query + * Current Spot Algo Open Orders (USER_DATA) Documentation */ public ApiResponse - queryCurrentAlgoOpenOrdersSpotAlgo(Long recvWindow) throws ApiException { + queryCurrentAlgoOpenOrdersSpotAlgo(@Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryCurrentAlgoOpenOrdersSpotAlgoValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = @@ -364,13 +368,13 @@ private okhttp3.Call queryCurrentAlgoOpenOrdersSpotAlgoValidateBeforeCall(Long r /** * Build call for queryHistoricalAlgoOrdersSpotAlgo * - * @param symbol Trading symbol eg. BTCUSDT (optional) - * @param side BUY or SELL (optional) + * @param symbol Trading symbol (optional) + * @param side (optional) * @param startTime in milliseconds eg.1641522717552 (optional) * @param endTime in milliseconds eg.1641522526562 (optional) - * @param page Default is 1 (optional) - * @param pageSize MIN 1, MAX 100; Default 100 (optional) - * @param recvWindow (optional) + * @param page Page number (optional) + * @param pageSize Records per page (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -381,12 +385,12 @@ private okhttp3.Call queryCurrentAlgoOpenOrdersSpotAlgoValidateBeforeCall(Long r * * * @see Query - * Historical Algo Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/spot-algo#query-historical-algo-orders-spot-algo">Query + * Historical Spot Algo Orders (USER_DATA) Documentation */ private okhttp3.Call queryHistoricalAlgoOrdersSpotAlgoCall( String symbol, - String side, + Side side, Long startTime, Long endTime, Long page, @@ -478,7 +482,7 @@ private okhttp3.Call queryHistoricalAlgoOrdersSpotAlgoCall( @SuppressWarnings("rawtypes") private okhttp3.Call queryHistoricalAlgoOrdersSpotAlgoValidateBeforeCall( String symbol, - String side, + Side side, Long startTime, Long endTime, Long page, @@ -502,7 +506,7 @@ private okhttp3.Call queryHistoricalAlgoOrdersSpotAlgoValidateBeforeCall( .getMethod( "queryHistoricalAlgoOrdersSpotAlgo", String.class, - String.class, + Side.class, Long.class, Long.class, Long.class, @@ -527,15 +531,16 @@ private okhttp3.Call queryHistoricalAlgoOrdersSpotAlgoValidateBeforeCall( } /** - * Query Historical Algo Orders(USER_DATA) Get all historical SPOT TWAP orders Weight: 1 + * Query Historical Spot Algo Orders (USER_DATA) Get all historical SPOT TWAP orders Weight(IP): + * 1 Security Type: USER_DATA * - * @param symbol Trading symbol eg. BTCUSDT (optional) - * @param side BUY or SELL (optional) + * @param symbol Trading symbol (optional) + * @param side (optional) * @param startTime in milliseconds eg.1641522717552 (optional) * @param endTime in milliseconds eg.1641522526562 (optional) - * @param page Default is 1 (optional) - * @param pageSize MIN 1, MAX 100; Default 100 (optional) - * @param recvWindow (optional) + * @param page Page number (optional) + * @param pageSize Records per page (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QueryHistoricalAlgoOrdersSpotAlgoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -547,17 +552,17 @@ private okhttp3.Call queryHistoricalAlgoOrdersSpotAlgoValidateBeforeCall( * * * @see Query - * Historical Algo Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/spot-algo#query-historical-algo-orders-spot-algo">Query + * Historical Spot Algo Orders (USER_DATA) Documentation */ public ApiResponse queryHistoricalAlgoOrdersSpotAlgo( String symbol, - String side, + Side side, Long startTime, Long endTime, Long page, - Long pageSize, - Long recvWindow) + @Min(1L) @Max(100L) Long pageSize, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryHistoricalAlgoOrdersSpotAlgoValidateBeforeCall( @@ -571,9 +576,9 @@ public ApiResponse queryHistoricalAlg * Build call for querySubOrdersSpotAlgo * * @param algoId eg. 14511 (required) - * @param page Default is 1 (optional) - * @param pageSize MIN 1, MAX 100; Default 100 (optional) - * @param recvWindow (optional) + * @param page Page number (optional) + * @param pageSize Records per page (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -583,8 +588,9 @@ public ApiResponse queryHistoricalAlg * 200 Sub Orders - * * - * @see Query Sub - * Orders(USER_DATA) Documentation + * @see Query + * Spot Sub Orders (USER_DATA) Documentation */ private okhttp3.Call querySubOrdersSpotAlgoCall( Long algoId, Long page, Long pageSize, Long recvWindow) throws ApiException { @@ -697,12 +703,13 @@ private okhttp3.Call querySubOrdersSpotAlgoValidateBeforeCall( } /** - * Query Sub Orders(USER_DATA) Get respective sub orders for a specified algoId Weight: 1 + * Query Spot Sub Orders (USER_DATA) Get respective sub orders for a specified algoId + * Weight(IP): 1 Security Type: USER_DATA * * @param algoId eg. 14511 (required) - * @param page Default is 1 (optional) - * @param pageSize MIN 1, MAX 100; Default 100 (optional) - * @param recvWindow (optional) + * @param page Page number (optional) + * @param pageSize Records per page (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QuerySubOrdersSpotAlgoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -713,11 +720,16 @@ private okhttp3.Call querySubOrdersSpotAlgoValidateBeforeCall( * 200 Sub Orders - * * - * @see Query Sub - * Orders(USER_DATA) Documentation + * @see Query + * Spot Sub Orders (USER_DATA) Documentation */ public ApiResponse querySubOrdersSpotAlgo( - @NotNull Long algoId, Long page, Long pageSize, Long recvWindow) throws ApiException { + @NotNull Long algoId, + Long page, + @Min(1L) @Max(100L) Long pageSize, + @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = querySubOrdersSpotAlgoValidateBeforeCall(algoId, page, pageSize, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -739,8 +751,8 @@ public ApiResponse querySubOrdersSpotAlgo( * * * @see Time-Weighted - * Average Price(Twap) New Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/spot-algo#time-weighted-average-price-spot-algo">Time-Weighted + * Spot Average Price(Twap) New Order (TRADE) Documentation */ private okhttp3.Call timeWeightedAveragePriceSpotAlgoCall( TimeWeightedAveragePriceSpotAlgoRequest timeWeightedAveragePriceSpotAlgoRequest) @@ -869,8 +881,9 @@ private okhttp3.Call timeWeightedAveragePriceSpotAlgoValidateBeforeCall( } /** - * Time-Weighted Average Price(Twap) New Order(TRADE) Place a new spot TWAP order with Algo - * service. * Total Algo open orders max allowed: `20` orders. Weight: 3000 + * Time-Weighted Spot Average Price(Twap) New Order (TRADE) Place a new spot TWAP order with + * Algo service. Weight(UID): 3000 Security Type: TRADE Notes: - Total Algo open orders max + * allowed: `20` orders. * * @param timeWeightedAveragePriceSpotAlgoRequest (required) * @return ApiResponse<TimeWeightedAveragePriceSpotAlgoResponse> @@ -884,8 +897,8 @@ private okhttp3.Call timeWeightedAveragePriceSpotAlgoValidateBeforeCall( * * * @see Time-Weighted - * Average Price(Twap) New Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/spot-algo#time-weighted-average-price-spot-algo">Time-Weighted + * Spot Average Price(Twap) New Order (TRADE) Documentation */ public ApiResponse timeWeightedAveragePriceSpotAlgo( @Valid @NotNull diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/CancelAlgoOrderFutureAlgoResponse.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/CancelAlgoOrderFutureAlgoResponse.java index 98c23302d..94c1b29ba 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/CancelAlgoOrderFutureAlgoResponse.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/CancelAlgoOrderFutureAlgoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelAlgoOrderFutureAlgoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelAlgoOrderFutureAlgoResponse { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/CancelAlgoOrderSpotAlgoResponse.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/CancelAlgoOrderSpotAlgoResponse.java index b36d6a110..24952f9fa 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/CancelAlgoOrderSpotAlgoResponse.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/CancelAlgoOrderSpotAlgoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelAlgoOrderSpotAlgoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelAlgoOrderSpotAlgoResponse { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/PositionSide.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/PositionSide.java new file mode 100644 index 000000000..1efcf124a --- /dev/null +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/PositionSide.java @@ -0,0 +1,78 @@ +/* + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.algo.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** + * Default `BOTH` for One-way Mode ; `LONG` or `SHORT` for Hedge Mode. + * It must be sent in Hedge Mode. + */ +@JsonAdapter(PositionSide.Adapter.class) +public enum PositionSide { + BOTH("BOTH"), + + LONG("LONG"), + + SHORT("SHORT"); + + private String value; + + PositionSide(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PositionSide fromValue(String value) { + for (PositionSide b : PositionSide.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PositionSide enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PositionSide read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PositionSide.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PositionSide.fromValue(value); + } +} diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryCurrentAlgoOpenOrdersFutureAlgoResponse.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryCurrentAlgoOpenOrdersFutureAlgoResponse.java index 20cebc703..5e8802f9c 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryCurrentAlgoOpenOrdersFutureAlgoResponse.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryCurrentAlgoOpenOrdersFutureAlgoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryCurrentAlgoOpenOrdersFutureAlgoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCurrentAlgoOpenOrdersFutureAlgoResponse { public static final String SERIALIZED_NAME_TOTAL = "total"; diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner.java index 16fc55c1a..c0ce3b11a 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; @@ -129,7 +129,7 @@ public QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner algoId( } /** - * Get algoId + * Algo order ID * * @return algoId */ @@ -149,7 +149,7 @@ public QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner symbol( } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -169,7 +169,7 @@ public QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner side( } /** - * Get side + * Trading side * * @return side */ @@ -189,7 +189,7 @@ public QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner positionSide( } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -209,7 +209,7 @@ public QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner totalQty( } /** - * Get totalQty + * Total order quantity * * @return totalQty */ @@ -229,7 +229,7 @@ public QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner executedQty( } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -249,7 +249,7 @@ public QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner executedAmt( } /** - * Get executedAmt + * Executed amount * * @return executedAmt */ @@ -269,7 +269,7 @@ public QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner avgPrice( } /** - * Get avgPrice + * Average execution price * * @return avgPrice */ @@ -289,7 +289,7 @@ public QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner clientAlgoId( } /** - * Get clientAlgoId + * Client-defined algo order ID * * @return clientAlgoId */ @@ -309,7 +309,7 @@ public QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner bookTime( } /** - * Get bookTime + * Order creation time * * @return bookTime */ @@ -329,7 +329,7 @@ public QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner endTime( } /** - * Get endTime + * End time * * @return endTime */ @@ -349,7 +349,7 @@ public QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner algoStatus( } /** - * Get algoStatus + * Algo order status * * @return algoStatus */ @@ -369,7 +369,7 @@ public QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner algoType( } /** - * Get algoType + * Algo order type * * @return algoType */ @@ -389,7 +389,7 @@ public QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner urgency( } /** - * Get urgency + * Execution urgency * * @return urgency */ diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryCurrentAlgoOpenOrdersSpotAlgoResponse.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryCurrentAlgoOpenOrdersSpotAlgoResponse.java index b62514f6b..071961ecf 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryCurrentAlgoOpenOrdersSpotAlgoResponse.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryCurrentAlgoOpenOrdersSpotAlgoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryCurrentAlgoOpenOrdersSpotAlgoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCurrentAlgoOpenOrdersSpotAlgoResponse { public static final String SERIALIZED_NAME_TOTAL = "total"; diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner.java index 10b6d6e05..f21be869c 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; @@ -123,7 +123,7 @@ public QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner algoId( } /** - * Get algoId + * Algo order ID * * @return algoId */ @@ -143,7 +143,7 @@ public QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner symbol( } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -163,7 +163,7 @@ public QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner side( } /** - * Get side + * Trading side * * @return side */ @@ -183,7 +183,7 @@ public QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner totalQty( } /** - * Get totalQty + * Total order quantity * * @return totalQty */ @@ -203,7 +203,7 @@ public QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner executedQty( } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -223,7 +223,7 @@ public QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner executedAmt( } /** - * Get executedAmt + * Executed amount * * @return executedAmt */ @@ -243,7 +243,7 @@ public QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner avgPrice( } /** - * Get avgPrice + * Average execution price * * @return avgPrice */ @@ -263,7 +263,7 @@ public QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner clientAlgoId( } /** - * Get clientAlgoId + * Client-defined algo order ID * * @return clientAlgoId */ @@ -283,7 +283,7 @@ public QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner bookTime( } /** - * Get bookTime + * Order creation time * * @return bookTime */ @@ -303,7 +303,7 @@ public QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner endTime( } /** - * Get endTime + * End time * * @return endTime */ @@ -323,7 +323,7 @@ public QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner algoStatus( } /** - * Get algoStatus + * Algo order status * * @return algoStatus */ @@ -343,7 +343,7 @@ public QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner algoType( } /** - * Get algoType + * Algo order type * * @return algoType */ @@ -363,7 +363,7 @@ public QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner urgency( } /** - * Get urgency + * Execution urgency * * @return urgency */ diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryHistoricalAlgoOrdersFutureAlgoResponse.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryHistoricalAlgoOrdersFutureAlgoResponse.java index e27791830..5d7cb152b 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryHistoricalAlgoOrdersFutureAlgoResponse.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryHistoricalAlgoOrdersFutureAlgoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryHistoricalAlgoOrdersFutureAlgoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryHistoricalAlgoOrdersFutureAlgoResponse { public static final String SERIALIZED_NAME_TOTAL = "total"; diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner.java index 53ca7eef8..ad397b07c 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; @@ -129,7 +129,7 @@ public QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner algoId( } /** - * Get algoId + * Algo order ID * * @return algoId */ @@ -149,7 +149,7 @@ public QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner symbol( } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -169,7 +169,7 @@ public QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner side( } /** - * Get side + * Trading side * * @return side */ @@ -189,7 +189,7 @@ public QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner positionSide( } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -209,7 +209,7 @@ public QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner totalQty( } /** - * Get totalQty + * Total order quantity * * @return totalQty */ @@ -229,7 +229,7 @@ public QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner executedQty( } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -249,7 +249,7 @@ public QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner executedAmt( } /** - * Get executedAmt + * Executed amount * * @return executedAmt */ @@ -269,7 +269,7 @@ public QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner avgPrice( } /** - * Get avgPrice + * Average execution price * * @return avgPrice */ @@ -289,7 +289,7 @@ public QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner clientAlgoId( } /** - * Get clientAlgoId + * Client-defined algo order ID * * @return clientAlgoId */ @@ -309,7 +309,7 @@ public QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner bookTime( } /** - * Get bookTime + * Order creation time * * @return bookTime */ @@ -329,7 +329,7 @@ public QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner endTime( } /** - * Get endTime + * End time * * @return endTime */ @@ -349,7 +349,7 @@ public QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner algoStatus( } /** - * Get algoStatus + * Algo order status * * @return algoStatus */ @@ -369,7 +369,7 @@ public QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner algoType( } /** - * Get algoType + * Algo order type * * @return algoType */ @@ -389,7 +389,7 @@ public QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner urgency( } /** - * Get urgency + * Execution urgency * * @return urgency */ diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryHistoricalAlgoOrdersSpotAlgoResponse.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryHistoricalAlgoOrdersSpotAlgoResponse.java index a171a3de4..c9352bfcd 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryHistoricalAlgoOrdersSpotAlgoResponse.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryHistoricalAlgoOrdersSpotAlgoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryHistoricalAlgoOrdersSpotAlgoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryHistoricalAlgoOrdersSpotAlgoResponse { public static final String SERIALIZED_NAME_TOTAL = "total"; diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner.java index 95ded3e3b..9839fcaeb 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; @@ -123,7 +123,7 @@ public QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner algoId( } /** - * Get algoId + * Algo order ID * * @return algoId */ @@ -143,7 +143,7 @@ public QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner symbol( } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -163,7 +163,7 @@ public QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner side( } /** - * Get side + * Trading side * * @return side */ @@ -183,7 +183,7 @@ public QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner totalQty( } /** - * Get totalQty + * Total order quantity * * @return totalQty */ @@ -203,7 +203,7 @@ public QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner executedQty( } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -223,7 +223,7 @@ public QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner executedAmt( } /** - * Get executedAmt + * Executed amount * * @return executedAmt */ @@ -243,7 +243,7 @@ public QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner avgPrice( } /** - * Get avgPrice + * Average execution price * * @return avgPrice */ @@ -263,7 +263,7 @@ public QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner clientAlgoId( } /** - * Get clientAlgoId + * Client-defined algo order ID * * @return clientAlgoId */ @@ -283,7 +283,7 @@ public QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner bookTime( } /** - * Get bookTime + * Order creation time * * @return bookTime */ @@ -303,7 +303,7 @@ public QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner endTime( } /** - * Get endTime + * End time * * @return endTime */ @@ -323,7 +323,7 @@ public QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner algoStatus( } /** - * Get algoStatus + * Algo order status * * @return algoStatus */ @@ -343,7 +343,7 @@ public QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner algoType( } /** - * Get algoType + * Algo order type * * @return algoType */ @@ -363,7 +363,7 @@ public QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner urgency( } /** - * Get urgency + * Execution urgency * * @return urgency */ diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QuerySubOrdersFutureAlgoResponse.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QuerySubOrdersFutureAlgoResponse.java index 9ef815cd0..3af24d082 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QuerySubOrdersFutureAlgoResponse.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QuerySubOrdersFutureAlgoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QuerySubOrdersFutureAlgoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySubOrdersFutureAlgoResponse { public static final String SERIALIZED_NAME_TOTAL = "total"; diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QuerySubOrdersFutureAlgoResponseSubOrdersInner.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QuerySubOrdersFutureAlgoResponseSubOrdersInner.java index 94b4af5c9..ed6044f78 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QuerySubOrdersFutureAlgoResponseSubOrdersInner.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QuerySubOrdersFutureAlgoResponseSubOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QuerySubOrdersFutureAlgoResponseSubOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySubOrdersFutureAlgoResponseSubOrdersInner { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; @@ -129,7 +129,7 @@ public QuerySubOrdersFutureAlgoResponseSubOrdersInner algoId( } /** - * Get algoId + * Algo order ID * * @return algoId */ @@ -149,7 +149,7 @@ public QuerySubOrdersFutureAlgoResponseSubOrdersInner orderId( } /** - * Get orderId + * Sub-order ID * * @return orderId */ @@ -169,7 +169,7 @@ public QuerySubOrdersFutureAlgoResponseSubOrdersInner orderStatus( } /** - * Get orderStatus + * Sub-order status * * @return orderStatus */ @@ -189,7 +189,7 @@ public QuerySubOrdersFutureAlgoResponseSubOrdersInner executedQty( } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -209,7 +209,7 @@ public QuerySubOrdersFutureAlgoResponseSubOrdersInner executedAmt( } /** - * Get executedAmt + * Executed amount * * @return executedAmt */ @@ -229,7 +229,7 @@ public QuerySubOrdersFutureAlgoResponseSubOrdersInner feeAmt( } /** - * Get feeAmt + * Fee amount * * @return feeAmt */ @@ -249,7 +249,7 @@ public QuerySubOrdersFutureAlgoResponseSubOrdersInner feeAsset( } /** - * Get feeAsset + * Fee asset * * @return feeAsset */ @@ -269,7 +269,7 @@ public QuerySubOrdersFutureAlgoResponseSubOrdersInner bookTime( } /** - * Get bookTime + * Order creation time * * @return bookTime */ @@ -289,7 +289,7 @@ public QuerySubOrdersFutureAlgoResponseSubOrdersInner avgPrice( } /** - * Get avgPrice + * Average execution price * * @return avgPrice */ @@ -309,7 +309,7 @@ public QuerySubOrdersFutureAlgoResponseSubOrdersInner side( } /** - * Get side + * Trading side * * @return side */ @@ -329,7 +329,7 @@ public QuerySubOrdersFutureAlgoResponseSubOrdersInner symbol( } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -349,7 +349,7 @@ public QuerySubOrdersFutureAlgoResponseSubOrdersInner subId( } /** - * Get subId + * Sub-order execution sequence ID * * @return subId */ @@ -369,7 +369,7 @@ public QuerySubOrdersFutureAlgoResponseSubOrdersInner timeInForce( } /** - * Get timeInForce + * Time in force * * @return timeInForce */ @@ -389,7 +389,7 @@ public QuerySubOrdersFutureAlgoResponseSubOrdersInner origQty( } /** - * Get origQty + * Original order quantity * * @return origQty */ diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QuerySubOrdersSpotAlgoResponse.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QuerySubOrdersSpotAlgoResponse.java index 75f35c651..d86366250 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QuerySubOrdersSpotAlgoResponse.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QuerySubOrdersSpotAlgoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QuerySubOrdersSpotAlgoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySubOrdersSpotAlgoResponse { public static final String SERIALIZED_NAME_TOTAL = "total"; diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/Side.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/Side.java new file mode 100644 index 000000000..0c48367a7 --- /dev/null +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/Side.java @@ -0,0 +1,72 @@ +/* + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.algo.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Trading side ( BUY or SELL ) */ +@JsonAdapter(Side.Adapter.class) +public enum Side { + BUY("BUY"), + + SELL("SELL"); + + private String value; + + Side(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Side fromValue(String value) { + for (Side b : Side.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Side enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Side read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Side.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Side.fromValue(value); + } +} diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceFutureAlgoRequest.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceFutureAlgoRequest.java index 78346d49c..e9818588e 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceFutureAlgoRequest.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceFutureAlgoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** TimeWeightedAveragePriceFutureAlgoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TimeWeightedAveragePriceFutureAlgoRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -47,13 +47,13 @@ public class TimeWeightedAveragePriceFutureAlgoRequest { @SerializedName(SERIALIZED_NAME_SIDE) @jakarta.annotation.Nonnull - private String side; + private Side side; public static final String SERIALIZED_NAME_POSITION_SIDE = "positionSide"; @SerializedName(SERIALIZED_NAME_POSITION_SIDE) @jakarta.annotation.Nullable - private String positionSide; + private PositionSide positionSide; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @@ -100,7 +100,7 @@ public TimeWeightedAveragePriceFutureAlgoRequest symbol( } /** - * Get symbol + * Trading symbol eg. BTCUSDT * * @return symbol */ @@ -114,7 +114,7 @@ public void setSymbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; } - public TimeWeightedAveragePriceFutureAlgoRequest side(@jakarta.annotation.Nonnull String side) { + public TimeWeightedAveragePriceFutureAlgoRequest side(@jakarta.annotation.Nonnull Side side) { this.side = side; return this; } @@ -126,16 +126,17 @@ public TimeWeightedAveragePriceFutureAlgoRequest side(@jakarta.annotation.Nonnul */ @jakarta.annotation.Nonnull @NotNull - public String getSide() { + @Valid + public Side getSide() { return side; } - public void setSide(@jakarta.annotation.Nonnull String side) { + public void setSide(@jakarta.annotation.Nonnull Side side) { this.side = side; } public TimeWeightedAveragePriceFutureAlgoRequest positionSide( - @jakarta.annotation.Nullable String positionSide) { + @jakarta.annotation.Nullable PositionSide positionSide) { this.positionSide = positionSide; return this; } @@ -146,11 +147,12 @@ public TimeWeightedAveragePriceFutureAlgoRequest positionSide( * @return positionSide */ @jakarta.annotation.Nullable - public String getPositionSide() { + @Valid + public PositionSide getPositionSide() { return positionSide; } - public void setPositionSide(@jakarta.annotation.Nullable String positionSide) { + public void setPositionSide(@jakarta.annotation.Nullable PositionSide positionSide) { this.positionSide = positionSide; } @@ -161,7 +163,9 @@ public TimeWeightedAveragePriceFutureAlgoRequest quantity( } /** - * Get quantity + * Quantity of base asset; The notional (`quantity` * `mark price(base + * asset)`) must be more than the equivalent of 1,000 USDT and less than the equivalent of + * 1,000,000 USDT * * @return quantity */ @@ -183,12 +187,14 @@ public TimeWeightedAveragePriceFutureAlgoRequest duration( } /** - * Get duration + * Duration for TWAP orders in seconds minimum: 300 maximum: 86400 * * @return duration */ @jakarta.annotation.Nonnull @NotNull + @Min(300L) + @Max(86400L) public Long getDuration() { return duration; } @@ -204,11 +210,13 @@ public TimeWeightedAveragePriceFutureAlgoRequest clientAlgoId( } /** - * Get clientAlgoId + * A unique id among Algo orders (length should be 32 characters), If it is not sent, we will + * give default value * * @return clientAlgoId */ @jakarta.annotation.Nullable + @Size(min = 32, max = 32) public String getClientAlgoId() { return clientAlgoId; } @@ -224,7 +232,8 @@ public TimeWeightedAveragePriceFutureAlgoRequest reduceOnly( } /** - * Get reduceOnly + * \"true\" or \"false\". Default \"false\"; Cannot be sent in + * Hedge Mode; Cannot be sent when you open a position * * @return reduceOnly */ @@ -244,7 +253,7 @@ public TimeWeightedAveragePriceFutureAlgoRequest limitPrice( } /** - * Get limitPrice + * Limit price of the order; If it is not sent, will place order by market price by default * * @return limitPrice */ @@ -265,11 +274,12 @@ public TimeWeightedAveragePriceFutureAlgoRequest recvWindow( } /** - * Get recvWindow + * Request validity window in milliseconds maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -459,20 +469,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("symbol").toString())); } - if (!jsonObj.get("side").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `side` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("side").toString())); - } - if ((jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) - && !jsonObj.get("positionSide").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `positionSide` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("positionSide").toString())); + // validate the required field `side` + Side.validateJsonElement(jsonObj.get("side")); + // validate the optional field `positionSide` + if (jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) { + PositionSide.validateJsonElement(jsonObj.get("positionSide")); } if ((jsonObj.get("clientAlgoId") != null && !jsonObj.get("clientAlgoId").isJsonNull()) && !jsonObj.get("clientAlgoId").isJsonPrimitive()) { diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceFutureAlgoResponse.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceFutureAlgoResponse.java index 6629f03fa..ac789fa56 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceFutureAlgoResponse.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceFutureAlgoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TimeWeightedAveragePriceFutureAlgoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TimeWeightedAveragePriceFutureAlgoResponse { public static final String SERIALIZED_NAME_CLIENT_ALGO_ID = "clientAlgoId"; diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceSpotAlgoRequest.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceSpotAlgoRequest.java index 97b230aea..b60eec9f7 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceSpotAlgoRequest.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceSpotAlgoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** TimeWeightedAveragePriceSpotAlgoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TimeWeightedAveragePriceSpotAlgoRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -47,7 +47,7 @@ public class TimeWeightedAveragePriceSpotAlgoRequest { @SerializedName(SERIALIZED_NAME_SIDE) @jakarta.annotation.Nonnull - private String side; + private Side side; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @@ -82,7 +82,7 @@ public TimeWeightedAveragePriceSpotAlgoRequest symbol( } /** - * Get symbol + * Trading symbol eg. BTCUSDT * * @return symbol */ @@ -96,7 +96,7 @@ public void setSymbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; } - public TimeWeightedAveragePriceSpotAlgoRequest side(@jakarta.annotation.Nonnull String side) { + public TimeWeightedAveragePriceSpotAlgoRequest side(@jakarta.annotation.Nonnull Side side) { this.side = side; return this; } @@ -108,11 +108,12 @@ public TimeWeightedAveragePriceSpotAlgoRequest side(@jakarta.annotation.Nonnull */ @jakarta.annotation.Nonnull @NotNull - public String getSide() { + @Valid + public Side getSide() { return side; } - public void setSide(@jakarta.annotation.Nonnull String side) { + public void setSide(@jakarta.annotation.Nonnull Side side) { this.side = side; } @@ -123,7 +124,8 @@ public TimeWeightedAveragePriceSpotAlgoRequest quantity( } /** - * Get quantity + * Quantity of base asset; Maximum notional per order is 200k, 2mm or 10mm, depending on symbol. + * Please reduce your size if you order is above the maximum notional per order. * * @return quantity */ @@ -145,12 +147,14 @@ public TimeWeightedAveragePriceSpotAlgoRequest duration( } /** - * Get duration + * Duration for TWAP orders in seconds minimum: 300 maximum: 86400 * * @return duration */ @jakarta.annotation.Nonnull @NotNull + @Min(300L) + @Max(86400L) public Long getDuration() { return duration; } @@ -166,11 +170,13 @@ public TimeWeightedAveragePriceSpotAlgoRequest clientAlgoId( } /** - * Get clientAlgoId + * A unique id among Algo orders (length should be 32 characters), If it is not sent, we will + * give default value * * @return clientAlgoId */ @jakarta.annotation.Nullable + @Size(min = 32, max = 32) public String getClientAlgoId() { return clientAlgoId; } @@ -186,7 +192,7 @@ public TimeWeightedAveragePriceSpotAlgoRequest limitPrice( } /** - * Get limitPrice + * Limit price of the order; If it is not sent, will place order by market price by default * * @return limitPrice */ @@ -347,13 +353,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("symbol").toString())); } - if (!jsonObj.get("side").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `side` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("side").toString())); - } + // validate the required field `side` + Side.validateJsonElement(jsonObj.get("side")); if ((jsonObj.get("clientAlgoId") != null && !jsonObj.get("clientAlgoId").isJsonNull()) && !jsonObj.get("clientAlgoId").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceSpotAlgoResponse.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceSpotAlgoResponse.java index b29378814..2a778d653 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceSpotAlgoResponse.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceSpotAlgoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TimeWeightedAveragePriceSpotAlgoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TimeWeightedAveragePriceSpotAlgoResponse { public static final String SERIALIZED_NAME_CLIENT_ALGO_ID = "clientAlgoId"; diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/Urgency.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/Urgency.java new file mode 100644 index 000000000..002ed7391 --- /dev/null +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/Urgency.java @@ -0,0 +1,75 @@ +/* + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.algo.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Represent the relative speed of the current execution; ENUM: LOW, MEDIUM, HIGH */ +@JsonAdapter(Urgency.Adapter.class) +public enum Urgency { + LOW("LOW"), + + MEDIUM("MEDIUM"), + + HIGH("HIGH"); + + private String value; + + Urgency(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Urgency fromValue(String value) { + for (Urgency b : Urgency.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Urgency enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Urgency read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Urgency.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Urgency.fromValue(value); + } +} diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/VolumeParticipationFutureAlgoRequest.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/VolumeParticipationFutureAlgoRequest.java index 9104015fd..de7feac17 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/VolumeParticipationFutureAlgoRequest.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/VolumeParticipationFutureAlgoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** VolumeParticipationFutureAlgoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class VolumeParticipationFutureAlgoRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -47,13 +47,13 @@ public class VolumeParticipationFutureAlgoRequest { @SerializedName(SERIALIZED_NAME_SIDE) @jakarta.annotation.Nonnull - private String side; + private Side side; public static final String SERIALIZED_NAME_POSITION_SIDE = "positionSide"; @SerializedName(SERIALIZED_NAME_POSITION_SIDE) @jakarta.annotation.Nullable - private String positionSide; + private PositionSide positionSide; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @@ -65,7 +65,7 @@ public class VolumeParticipationFutureAlgoRequest { @SerializedName(SERIALIZED_NAME_URGENCY) @jakarta.annotation.Nonnull - private String urgency; + private Urgency urgency; public static final String SERIALIZED_NAME_CLIENT_ALGO_ID = "clientAlgoId"; @@ -99,7 +99,7 @@ public VolumeParticipationFutureAlgoRequest symbol(@jakarta.annotation.Nonnull S } /** - * Get symbol + * Trading symbol eg. BTCUSDT * * @return symbol */ @@ -113,7 +113,7 @@ public void setSymbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; } - public VolumeParticipationFutureAlgoRequest side(@jakarta.annotation.Nonnull String side) { + public VolumeParticipationFutureAlgoRequest side(@jakarta.annotation.Nonnull Side side) { this.side = side; return this; } @@ -125,16 +125,17 @@ public VolumeParticipationFutureAlgoRequest side(@jakarta.annotation.Nonnull Str */ @jakarta.annotation.Nonnull @NotNull - public String getSide() { + @Valid + public Side getSide() { return side; } - public void setSide(@jakarta.annotation.Nonnull String side) { + public void setSide(@jakarta.annotation.Nonnull Side side) { this.side = side; } public VolumeParticipationFutureAlgoRequest positionSide( - @jakarta.annotation.Nullable String positionSide) { + @jakarta.annotation.Nullable PositionSide positionSide) { this.positionSide = positionSide; return this; } @@ -145,11 +146,12 @@ public VolumeParticipationFutureAlgoRequest positionSide( * @return positionSide */ @jakarta.annotation.Nullable - public String getPositionSide() { + @Valid + public PositionSide getPositionSide() { return positionSide; } - public void setPositionSide(@jakarta.annotation.Nullable String positionSide) { + public void setPositionSide(@jakarta.annotation.Nullable PositionSide positionSide) { this.positionSide = positionSide; } @@ -160,7 +162,9 @@ public VolumeParticipationFutureAlgoRequest quantity( } /** - * Get quantity + * Quantity of base asset; The notional (`quantity` * `mark price(base + * asset)`) must be more than the equivalent of 10,000 USDT and less than the equivalent of + * 1,000,000 USDT * * @return quantity */ @@ -176,7 +180,7 @@ public void setQuantity(@jakarta.annotation.Nonnull Double quantity) { } public VolumeParticipationFutureAlgoRequest urgency( - @jakarta.annotation.Nonnull String urgency) { + @jakarta.annotation.Nonnull Urgency urgency) { this.urgency = urgency; return this; } @@ -188,11 +192,12 @@ public VolumeParticipationFutureAlgoRequest urgency( */ @jakarta.annotation.Nonnull @NotNull - public String getUrgency() { + @Valid + public Urgency getUrgency() { return urgency; } - public void setUrgency(@jakarta.annotation.Nonnull String urgency) { + public void setUrgency(@jakarta.annotation.Nonnull Urgency urgency) { this.urgency = urgency; } @@ -203,11 +208,13 @@ public VolumeParticipationFutureAlgoRequest clientAlgoId( } /** - * Get clientAlgoId + * A unique id among Algo orders (length should be 32 characters), If it is not sent, we will + * give default value * * @return clientAlgoId */ @jakarta.annotation.Nullable + @Size(min = 32, max = 32) public String getClientAlgoId() { return clientAlgoId; } @@ -223,7 +230,8 @@ public VolumeParticipationFutureAlgoRequest reduceOnly( } /** - * Get reduceOnly + * \"true\" or \"false\". Default \"false\"; Cannot be sent in + * Hedge Mode; Cannot be sent when you open a position * * @return reduceOnly */ @@ -243,7 +251,7 @@ public VolumeParticipationFutureAlgoRequest limitPrice( } /** - * Get limitPrice + * Limit price of the order; If it is not sent, will place order by market price by default * * @return limitPrice */ @@ -264,11 +272,12 @@ public VolumeParticipationFutureAlgoRequest recvWindow( } /** - * Get recvWindow + * Request validity window in milliseconds maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -453,28 +462,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("symbol").toString())); } - if (!jsonObj.get("side").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `side` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("side").toString())); - } - if ((jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) - && !jsonObj.get("positionSide").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `positionSide` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("positionSide").toString())); - } - if (!jsonObj.get("urgency").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `urgency` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("urgency").toString())); + // validate the required field `side` + Side.validateJsonElement(jsonObj.get("side")); + // validate the optional field `positionSide` + if (jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) { + PositionSide.validateJsonElement(jsonObj.get("positionSide")); } + // validate the required field `urgency` + Urgency.validateJsonElement(jsonObj.get("urgency")); if ((jsonObj.get("clientAlgoId") != null && !jsonObj.get("clientAlgoId").isJsonNull()) && !jsonObj.get("clientAlgoId").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/VolumeParticipationFutureAlgoResponse.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/VolumeParticipationFutureAlgoResponse.java index 37a2bb90f..013bc992c 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/VolumeParticipationFutureAlgoResponse.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/VolumeParticipationFutureAlgoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** VolumeParticipationFutureAlgoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class VolumeParticipationFutureAlgoResponse { public static final String SERIALIZED_NAME_CLIENT_ALGO_ID = "clientAlgoId"; diff --git a/clients/algo/src/test/java/com/binance/connector/client/algo/rest/api/FutureAlgoApiTest.java b/clients/algo/src/test/java/com/binance/connector/client/algo/rest/api/FutureAlgoApiTest.java index 0546f16b0..9a762d8b8 100644 --- a/clients/algo/src/test/java/com/binance/connector/client/algo/rest/api/FutureAlgoApiTest.java +++ b/clients/algo/src/test/java/com/binance/connector/client/algo/rest/api/FutureAlgoApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -18,8 +18,10 @@ import com.binance.connector.client.algo.rest.model.QueryCurrentAlgoOpenOrdersFutureAlgoResponse; import com.binance.connector.client.algo.rest.model.QueryHistoricalAlgoOrdersFutureAlgoResponse; import com.binance.connector.client.algo.rest.model.QuerySubOrdersFutureAlgoResponse; +import com.binance.connector.client.algo.rest.model.Side; import com.binance.connector.client.algo.rest.model.TimeWeightedAveragePriceFutureAlgoRequest; import com.binance.connector.client.algo.rest.model.TimeWeightedAveragePriceFutureAlgoResponse; +import com.binance.connector.client.algo.rest.model.Urgency; import com.binance.connector.client.algo.rest.model.VolumeParticipationFutureAlgoRequest; import com.binance.connector.client.algo.rest.model.VolumeParticipationFutureAlgoResponse; import com.binance.connector.client.common.ApiClient; @@ -32,6 +34,7 @@ import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -83,15 +86,16 @@ public void initApiClient() throws ApiException { } /** - * Cancel Algo Order(TRADE) + * Cancel Futures Algo Order (TRADE) * - *

Cancel an active order. * You need to enable `Futures Trading Permission` for - * the api key which requests this endpoint. * Base URL: https://api.binance.com Weight: 1 + *

Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - You need to enable + * `Futures Trading Permission` for the API key that requests this endpoint. - Base + * URL: `https://api.binance.com` * * @throws ApiException if the Api call fails */ @Test - public void cancelAlgoOrderFutureAlgoTest() throws ApiException, CryptoException { + public void cancelAlgoOrderFutureAlgoTest() throws ApiException, CryptoException, IOException { Long algoId = 1L; Long recvWindow = 5000L; ApiResponse response = @@ -107,8 +111,7 @@ public void cancelAlgoOrderFutureAlgoTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "algoId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("algoId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "4dcc675276dcc7a5eddf3f11f98e221dc22b447b227be14ec73a51c61602f2a5", actualRequest.url().queryParameter("signature")); @@ -116,15 +119,17 @@ public void cancelAlgoOrderFutureAlgoTest() throws ApiException, CryptoException } /** - * Query Current Algo Open Orders(USER_DATA) + * Query Current Futures Algo Open Orders (USER_DATA) * - *

Query Current Algo Open Orders * You need to enable `Futures Trading Permission` - * for the api key which requests this endpoint. * Base URL: https://api.binance.com Weight: 1 + *

Query Current Algo Open Orders Weight(IP): 1 Security Type: USER_DATA Notes: - You need to + * enable `Futures Trading Permission` for the API key that requests this endpoint. - + * Base URL: `https://api.binance.com` * * @throws ApiException if the Api call fails */ @Test - public void queryCurrentAlgoOpenOrdersFutureAlgoTest() throws ApiException, CryptoException { + public void queryCurrentAlgoOpenOrdersFutureAlgoTest() + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.queryCurrentAlgoOpenOrdersFutureAlgo(recvWindow); @@ -139,25 +144,29 @@ public void queryCurrentAlgoOpenOrdersFutureAlgoTest() throws ApiException, Cryp Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/algo/futures/openOrders", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/algo/futures/openOrders", actualRequest.url().encodedPath()); } /** - * Query Historical Algo Orders(USER_DATA) + * Query Historical Futures Algo Orders (USER_DATA) * - *

Query Historical Algo Order * You need to enable `Futures Trading Permission` - * for the api key which requests this endpoint. * Base URL: https://api.binance.com Weight: 1 + *

Query Historical Algo Order Weight(IP): 1 Security Type: USER_DATA Notes: - You need to + * enable `Futures Trading Permission` for the API key that requests this endpoint. - + * Base URL: `https://api.binance.com` * * @throws ApiException if the Api call fails */ @Test - public void queryHistoricalAlgoOrdersFutureAlgoTest() throws ApiException, CryptoException { + public void queryHistoricalAlgoOrdersFutureAlgoTest() + throws ApiException, CryptoException, IOException { String symbol = "BTCUSDT"; - String side = "BUY"; + Side side = Side.BUY; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long page = 1L; @@ -178,25 +187,25 @@ public void queryHistoricalAlgoOrdersFutureAlgoTest() throws ApiException, Crypt Request actualRequest = captorValue.request(); assertEquals( - "symbol=BTCUSDT&side=BUY&startTime=1623319461670&endTime=1641782889000&page=1&pageSize=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "symbol=BTCUSDT&side=BUY&startTime=1623319461670&endTime=1641782889000&page=1&pageSize=100&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "0e8d5de4dda9f55852d3ecc886e0ca289d66e4696a2fc21f553d9348242a14f1", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/algo/futures/historicalOrders", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/algo/futures/historicalOrders", actualRequest.url().encodedPath()); } /** - * Query Sub Orders(USER_DATA) + * Query Futures Sub Orders (USER_DATA) * - *

Get respective sub orders for a specified algoId * You need to enable `Futures - * Trading Permission` for the api key which requests this endpoint. * Base URL: - * https://api.binance.com Weight: 1 + *

Get respective sub orders for a specified algoId Weight(IP): 1 Security Type: USER_DATA + * Notes: - You need to enable `Futures Trading Permission` for the API key that + * requests this endpoint. - Base URL: `https://api.binance.com` * * @throws ApiException if the Api call fails */ @Test - public void querySubOrdersFutureAlgoTest() throws ApiException, CryptoException { + public void querySubOrdersFutureAlgoTest() throws ApiException, CryptoException, IOException { Long algoId = 1L; Long page = 1L; Long pageSize = 100L; @@ -214,9 +223,7 @@ public void querySubOrdersFutureAlgoTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "algoId=1&page=1&pageSize=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + assertEquals("algoId=1&page=1&pageSize=100&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "a862a7c54c6a5c1f71b2563d1d86c61f8763cb9514dc20641231cc60f7ac0445", actualRequest.url().queryParameter("signature")); @@ -224,32 +231,30 @@ public void querySubOrdersFutureAlgoTest() throws ApiException, CryptoException } /** - * Time-Weighted Average Price(Twap) New Order(TRADE) + * Time-Weighted Futures Average Price (Twap) New Order (TRADE) * - *

Send in a Twap new order. Only support on USDⓈ-M Contracts. * Total Algo open orders max - * allowed: `30` orders. * Leverage of symbols and position mode will be the same as - * your futures account settings. You can set up through the trading page or fapi. * Receiving - * `\"success\": true` does not mean that your order will be executed. - * Please use the query order endpoints(`GET sapi/v1/algo/futures/openOrders` or - * `GET sapi/v1/algo/futures/historicalOrders`) to check the order status. For - * example: Your futures balance is insufficient, or open position with reduce only or position - * side is inconsistent with your own setting. In these cases you will receive - * `\"success\": true`, but the order status will be `expired` - * after we check it. * `quantity` * 60 / `duration` should be larger than - * minQty * `duration` cannot be less than 5 mins or more than 24 hours. * For - * delivery contracts, TWAP end time should be one hour earlier than the delivery time of the - * symbol. * You need to enable `Futures Trading Permission` for the api key which - * requests this endpoint. * Base URL: https://api.binance.com Weight: 3000 + *

Send in a Twap new order. Only support on USDⓈ-M Contracts. Weight(UID): 3000 Security + * Type: TRADE Notes: - Other info: - Total Algo open orders max allowed: `30` orders. + * - Leverage and position mode follow your futures account settings. - Receiving + * `\"success\": true` does not guarantee execution; query order endpoints + * for final status. - If balance/position constraints fail, response may still return success + * but order status becomes `expired`. - `quantity * 60 / duration` must be + * greater than `minQty`. - `duration` cannot be less than 5 minutes or + * greater than 24 hours. - For delivery contracts, TWAP end time should be one hour earlier + * than symbol delivery time. - You need to enable the corresponding permission for the API key + * requesting this endpoint: - `Futures Trading Permission` — for Classic Trading + * Account mode - `Portfolio Margin Trading Permission` — for Portfolio Margin Account + * mode - Base URL: `https://api.binance.com` * * @throws ApiException if the Api call fails */ @Test - public void timeWeightedAveragePriceFutureAlgoTest() throws ApiException, CryptoException { + public void timeWeightedAveragePriceFutureAlgoTest() + throws ApiException, CryptoException, IOException { TimeWeightedAveragePriceFutureAlgoRequest timeWeightedAveragePriceFutureAlgoRequest = new TimeWeightedAveragePriceFutureAlgoRequest(); - timeWeightedAveragePriceFutureAlgoRequest.symbol("BTCUSDT"); - timeWeightedAveragePriceFutureAlgoRequest.side("BUY"); + timeWeightedAveragePriceFutureAlgoRequest.side(Side.BUY); timeWeightedAveragePriceFutureAlgoRequest.quantity(1d); timeWeightedAveragePriceFutureAlgoRequest.duration(5000L); @@ -267,40 +272,38 @@ public void timeWeightedAveragePriceFutureAlgoTest() throws ApiException, Crypto Request actualRequest = captorValue.request(); assertEquals( - "timestamp=1736393892000duration=5000&symbol=BTCUSDT&side=BUY&quantity=1", - signInputCaptor.getValue()); + "timestamp=1736393892000duration=5000&symbol=BTCUSDT&side=BUY&quantity=1", signInputCaptor.getValue()); assertEquals( "cedadcc9e9190f0546a7247d2b7b627c8814e5e1f47b616211656ed04130a1a6", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/algo/futures/newOrderTwap", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/algo/futures/newOrderTwap", actualRequest.url().encodedPath()); } /** - * Volume Participation(VP) New Order (TRADE) + * Volume Participation (VP) New Order (TRADE) * - *

Send in a VP new order. Only support on USDⓈ-M Contracts. * Total Algo open orders max - * allowed: `10` orders. * Leverage of symbols and position mode will be the same as - * your futures account settings. You can set up through the trading page or fapi. * Receiving - * `\"success\": true` does not mean that your order will be executed. - * Please use the query order endpoints(`GET sapi/v1/algo/futures/openOrders` or - * `GET sapi/v1/algo/futures/historicalOrders`) to check the order status. For - * example: Your futures balance is insufficient, or open position with reduce only or position - * side is inconsistent with your own setting. In these cases you will receive - * `\"success\": true`, but the order status will be `expired` - * after we check it. * You need to enable `Futures Trading Permission` for the api - * key which requests this endpoint. * Base URL: https://api.binance.com Weight: 300 + *

Send in a VP new order. Only support on USDⓈ-M Contracts. Weight(UID): 300 Security Type: + * TRADE Notes: - Other info: - Total Algo open orders max allowed: `10` orders. - + * Leverage and position mode follow your futures account settings. - Receiving + * `\"success\": true` does not guarantee execution; query order endpoints + * for final status. - If balance/position constraints fail, response may still return success + * but order status becomes `expired`. - You need to enable the corresponding + * permission for the API key requesting this endpoint: - `Futures Trading Permission` + * — for Classic Trading Account mode - `Portfolio Margin Trading Permission` — for + * Portfolio Margin Account mode - Base URL: `https://api.binance.com` * * @throws ApiException if the Api call fails */ @Test - public void volumeParticipationFutureAlgoTest() throws ApiException, CryptoException { + public void volumeParticipationFutureAlgoTest() + throws ApiException, CryptoException, IOException { VolumeParticipationFutureAlgoRequest volumeParticipationFutureAlgoRequest = new VolumeParticipationFutureAlgoRequest(); - volumeParticipationFutureAlgoRequest.symbol("BTCUSDT"); - volumeParticipationFutureAlgoRequest.side("BUY"); + volumeParticipationFutureAlgoRequest.side(Side.BUY); volumeParticipationFutureAlgoRequest.quantity(1d); - volumeParticipationFutureAlgoRequest.urgency("LOW"); + volumeParticipationFutureAlgoRequest.urgency(Urgency.LOW); ApiResponse response = api.volumeParticipationFutureAlgo(volumeParticipationFutureAlgoRequest); @@ -315,9 +318,7 @@ public void volumeParticipationFutureAlgoTest() throws ApiException, CryptoExcep Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "timestamp=1736393892000symbol=BTCUSDT&side=BUY&quantity=1&urgency=LOW", - signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&side=BUY&quantity=1&urgency=LOW", signInputCaptor.getValue()); assertEquals( "9e2d0455a2944d1f036cd1f966b9b5c9db75725ee79e38c7f94e49cf6b30e586", actualRequest.url().queryParameter("signature")); diff --git a/clients/algo/src/test/java/com/binance/connector/client/algo/rest/api/SpotAlgoApiTest.java b/clients/algo/src/test/java/com/binance/connector/client/algo/rest/api/SpotAlgoApiTest.java index 514484827..c931268f2 100644 --- a/clients/algo/src/test/java/com/binance/connector/client/algo/rest/api/SpotAlgoApiTest.java +++ b/clients/algo/src/test/java/com/binance/connector/client/algo/rest/api/SpotAlgoApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Algo REST API - * OpenAPI Specification for the Binance Algo REST API + * Algo Trading REST API + * Programmatic access to Binance’s execution algorithms for creating and managing Spot and Futures algo orders. * * The version of the OpenAPI document: 1.0.0 * @@ -18,6 +18,7 @@ import com.binance.connector.client.algo.rest.model.QueryCurrentAlgoOpenOrdersSpotAlgoResponse; import com.binance.connector.client.algo.rest.model.QueryHistoricalAlgoOrdersSpotAlgoResponse; import com.binance.connector.client.algo.rest.model.QuerySubOrdersSpotAlgoResponse; +import com.binance.connector.client.algo.rest.model.Side; import com.binance.connector.client.algo.rest.model.TimeWeightedAveragePriceSpotAlgoRequest; import com.binance.connector.client.algo.rest.model.TimeWeightedAveragePriceSpotAlgoResponse; import com.binance.connector.client.common.ApiClient; @@ -30,6 +31,7 @@ import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -81,15 +83,15 @@ public void initApiClient() throws ApiException { } /** - * Cancel Algo Order(TRADE) + * Cancel Spot Algo Order (TRADE) * - *

Cancel an open TWAP order Weight: 1 + *

Cancel an open TWAP order Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void cancelAlgoOrderSpotAlgoTest() throws ApiException, CryptoException { - Long algoId = 1L; + public void cancelAlgoOrderSpotAlgoTest() throws ApiException, CryptoException, IOException { + Long algoId = 14511L; Long recvWindow = 5000L; ApiResponse response = api.cancelAlgoOrderSpotAlgo(algoId, recvWindow); @@ -104,23 +106,23 @@ public void cancelAlgoOrderSpotAlgoTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("algoId=14511&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "algoId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "4dcc675276dcc7a5eddf3f11f98e221dc22b447b227be14ec73a51c61602f2a5", + "7e97b50e23065ea20f9c765a8a2c529c739296123417a24943cf07ae2806dc37", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/algo/spot/order", actualRequest.url().encodedPath()); } /** - * Query Current Algo Open Orders(USER_DATA) + * Query Current Spot Algo Open Orders (USER_DATA) * - *

Get all open SPOT TWAP orders Weight: 1 + *

Get all open SPOT TWAP orders Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryCurrentAlgoOpenOrdersSpotAlgoTest() throws ApiException, CryptoException { + public void queryCurrentAlgoOpenOrdersSpotAlgoTest() + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.queryCurrentAlgoOpenOrdersSpotAlgo(recvWindow); @@ -135,28 +137,31 @@ public void queryCurrentAlgoOpenOrdersSpotAlgoTest() throws ApiException, Crypto Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/algo/spot/openOrders", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/algo/spot/openOrders", actualRequest.url().encodedPath()); } /** - * Query Historical Algo Orders(USER_DATA) + * Query Historical Spot Algo Orders (USER_DATA) * - *

Get all historical SPOT TWAP orders Weight: 1 + *

Get all historical SPOT TWAP orders Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryHistoricalAlgoOrdersSpotAlgoTest() throws ApiException, CryptoException { + public void queryHistoricalAlgoOrdersSpotAlgoTest() + throws ApiException, CryptoException, IOException { String symbol = "BTCUSDT"; - String side = "BUY"; + Side side = Side.BUY; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long page = 1L; - Long pageSize = 100L; + Long pageSize = 10L; Long recvWindow = 5000L; ApiResponse response = api.queryHistoricalAlgoOrdersSpotAlgo( @@ -173,26 +178,25 @@ public void queryHistoricalAlgoOrdersSpotAlgoTest() throws ApiException, CryptoE Request actualRequest = captorValue.request(); assertEquals( - "symbol=BTCUSDT&side=BUY&startTime=1623319461670&endTime=1641782889000&page=1&pageSize=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "symbol=BTCUSDT&side=BUY&startTime=1623319461670&endTime=1641782889000&page=1&pageSize=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "0e8d5de4dda9f55852d3ecc886e0ca289d66e4696a2fc21f553d9348242a14f1", + "2089aa2e5f9888581470a24fc9a55bf741b98825263730d7eddc93fb90b8ed6a", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/algo/spot/historicalOrders", actualRequest.url().encodedPath()); } /** - * Query Sub Orders(USER_DATA) + * Query Spot Sub Orders (USER_DATA) * - *

Get respective sub orders for a specified algoId Weight: 1 + *

Get respective sub orders for a specified algoId Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void querySubOrdersSpotAlgoTest() throws ApiException, CryptoException { + public void querySubOrdersSpotAlgoTest() throws ApiException, CryptoException, IOException { Long algoId = 1L; Long page = 1L; - Long pageSize = 100L; + Long pageSize = 10L; Long recvWindow = 5000L; ApiResponse response = api.querySubOrdersSpotAlgo(algoId, page, pageSize, recvWindow); @@ -207,30 +211,28 @@ public void querySubOrdersSpotAlgoTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("algoId=1&page=1&pageSize=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "algoId=1&page=1&pageSize=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "a862a7c54c6a5c1f71b2563d1d86c61f8763cb9514dc20641231cc60f7ac0445", + "8f08b0b682ccd10346cafd6844e4eeffd3ac897353e3a75701c8ef72a6094a79", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/algo/spot/subOrders", actualRequest.url().encodedPath()); } /** - * Time-Weighted Average Price(Twap) New Order(TRADE) + * Time-Weighted Spot Average Price(Twap) New Order (TRADE) * - *

Place a new spot TWAP order with Algo service. * Total Algo open orders max allowed: - * `20` orders. Weight: 3000 + *

Place a new spot TWAP order with Algo service. Weight(UID): 3000 Security Type: TRADE + * Notes: - Total Algo open orders max allowed: `20` orders. * * @throws ApiException if the Api call fails */ @Test - public void timeWeightedAveragePriceSpotAlgoTest() throws ApiException, CryptoException { + public void timeWeightedAveragePriceSpotAlgoTest() + throws ApiException, CryptoException, IOException { TimeWeightedAveragePriceSpotAlgoRequest timeWeightedAveragePriceSpotAlgoRequest = new TimeWeightedAveragePriceSpotAlgoRequest(); - timeWeightedAveragePriceSpotAlgoRequest.symbol("BTCUSDT"); - timeWeightedAveragePriceSpotAlgoRequest.side("BUY"); + timeWeightedAveragePriceSpotAlgoRequest.side(Side.BUY); timeWeightedAveragePriceSpotAlgoRequest.quantity(1d); timeWeightedAveragePriceSpotAlgoRequest.duration(5000L); @@ -248,8 +250,7 @@ public void timeWeightedAveragePriceSpotAlgoTest() throws ApiException, CryptoEx Request actualRequest = captorValue.request(); assertEquals( - "timestamp=1736393892000duration=5000&symbol=BTCUSDT&side=BUY&quantity=1", - signInputCaptor.getValue()); + "timestamp=1736393892000duration=5000&symbol=BTCUSDT&side=BUY&quantity=1", signInputCaptor.getValue()); assertEquals( "cedadcc9e9190f0546a7247d2b7b627c8814e5e1f47b616211656ed04130a1a6", actualRequest.url().queryParameter("signature")); diff --git a/clients/alpha/CHANGELOG.md b/clients/alpha/CHANGELOG.md index 88ff42e69..d50a30bb3 100644 --- a/clients/alpha/CHANGELOG.md +++ b/clients/alpha/CHANGELOG.md @@ -1,9 +1,26 @@ # Changelog +## 2.0.0 - 2026-07-29 + +### Added (1) + +#### REST API + +- `fullDepth()` (`GET /bapi/defi/v1/public/alpha-trade/fullDepth`) + +### Changed (1) + +#### REST API + +- Modified parameter `interval`: + - enum added: `1s`, `15s`, `1m`, `3m`, `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `6h`, `8h`, `12h`, `1d`, `3d`, `1w`, `1M` + - affected methods: + - `klines()` (`GET /bapi/defi/v1/public/alpha-trade/klines`) + ## 1.0.1 - 2026-04-30 - Update `binance/common` module to version `2.4.2`. ## 1.0.0 - 2026-01-20 -- Initial release \ No newline at end of file +- Initial release diff --git a/clients/alpha/docs/AggregateTradeStreamRequest.md b/clients/alpha/docs/AggregateTradeStreamRequest.md new file mode 100644 index 000000000..071d32ca2 --- /dev/null +++ b/clients/alpha/docs/AggregateTradeStreamRequest.md @@ -0,0 +1,14 @@ + + +# AggregateTradeStreamRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to subscribe, in lowercase stream format. | [optional] | + + + diff --git a/clients/alpha/docs/AggregateTradeStreamResponse.md b/clients/alpha/docs/AggregateTradeStreamResponse.md new file mode 100644 index 000000000..de6fd591e --- /dev/null +++ b/clients/alpha/docs/AggregateTradeStreamResponse.md @@ -0,0 +1,22 @@ + + +# AggregateTradeStreamResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time (ms) | [optional] | +|**T** | **Long** | Trade time (ms) | [optional] | +|**aLowerCase** | **Long** | Aggregated trade ID | [optional] | +|**fLowerCase** | **Long** | First trade ID in the aggregation | [optional] | +|**lLowerCase** | **Long** | Last trade ID in the aggregation | [optional] | +|**mLowerCase** | **Boolean** | Is the buyer the market maker | [optional] | +|**pLowerCase** | **String** | Price | [optional] | +|**qLowerCase** | **String** | Quantity | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | + + + diff --git a/clients/alpha/docs/AggregatedTradesResponse.md b/clients/alpha/docs/AggregatedTradesResponse.md index 00e952687..efe889646 100644 --- a/clients/alpha/docs/AggregatedTradesResponse.md +++ b/clients/alpha/docs/AggregatedTradesResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **String** | | [optional] | -|**message** | **String** | | [optional] | -|**messageDetail** | **String** | | [optional] | -|**data** | [**List<AggregatedTradesResponseDataInner>**](AggregatedTradesResponseDataInner.md) | | [optional] | +|**code** | **String** | API response code. \"000000\" indicates success. | [optional] | +|**message** | **String** | Response message. | [optional] | +|**messageDetail** | **String** | Detailed response message. | [optional] | +|**data** | [**List<AggregatedTradesResponseDataInner>**](AggregatedTradesResponseDataInner.md) | Array of aggregated trades. | [optional] | diff --git a/clients/alpha/docs/AggregatedTradesResponseDataInner.md b/clients/alpha/docs/AggregatedTradesResponseDataInner.md index bdc5696cd..1f229f524 100644 --- a/clients/alpha/docs/AggregatedTradesResponseDataInner.md +++ b/clients/alpha/docs/AggregatedTradesResponseDataInner.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**aLowerCase** | **Long** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**fLowerCase** | **Long** | | [optional] | -|**lLowerCase** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | +|**aLowerCase** | **Long** | Aggregate trade ID. | [optional] | +|**pLowerCase** | **String** | Trade price. | [optional] | +|**qLowerCase** | **String** | Trade quantity. | [optional] | +|**fLowerCase** | **Long** | First trade ID in the aggregation. | [optional] | +|**lLowerCase** | **Long** | Last trade ID in the aggregation. | [optional] | +|**T** | **Long** | Trade timestamp in milliseconds. | [optional] | +|**mLowerCase** | **Boolean** | Whether buyer is the market maker (deprecated). | [optional] | diff --git a/clients/alpha/docs/AllBookTickerStreamRequest.md b/clients/alpha/docs/AllBookTickerStreamRequest.md new file mode 100644 index 000000000..bbac66cc3 --- /dev/null +++ b/clients/alpha/docs/AllBookTickerStreamRequest.md @@ -0,0 +1,13 @@ + + +# AllBookTickerStreamRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | + + + diff --git a/clients/alpha/docs/AllBookTickerStreamResponse.md b/clients/alpha/docs/AllBookTickerStreamResponse.md new file mode 100644 index 000000000..c152d1f15 --- /dev/null +++ b/clients/alpha/docs/AllBookTickerStreamResponse.md @@ -0,0 +1,21 @@ + + +# AllBookTickerStreamResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eLowerCase** | **String** | eventType | [optional] | +|**E** | **Long** | eventTime | [optional] | +|**T** | **Long** | transactionTime | [optional] | +|**uLowerCase** | **Long** | updateId | [optional] | +|**sLowerCase** | **String** | symbol | [optional] | +|**bLowerCase** | **String** | bid1Price | [optional] | +|**B** | **String** | bid1Quantity | [optional] | +|**aLowerCase** | **String** | ask1Price | [optional] | +|**A** | **String** | ask1Quantity | [optional] | + + + diff --git a/clients/alpha/docs/AllMiniTickerStreamRequest.md b/clients/alpha/docs/AllMiniTickerStreamRequest.md new file mode 100644 index 000000000..b4bce368b --- /dev/null +++ b/clients/alpha/docs/AllMiniTickerStreamRequest.md @@ -0,0 +1,13 @@ + + +# AllMiniTickerStreamRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | + + + diff --git a/clients/alpha/docs/AllMiniTickerStreamResponse.md b/clients/alpha/docs/AllMiniTickerStreamResponse.md new file mode 100644 index 000000000..965972abd --- /dev/null +++ b/clients/alpha/docs/AllMiniTickerStreamResponse.md @@ -0,0 +1,21 @@ + + +# AllMiniTickerStreamResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eLowerCase** | **String** | eventType | [optional] | +|**E** | **Long** | eventTime | [optional] | +|**sLowerCase** | **String** | symbol | [optional] | +|**cLowerCase** | **String** | closePrice | [optional] | +|**oLowerCase** | **String** | openPrice | [optional] | +|**hLowerCase** | **String** | highPrice | [optional] | +|**lLowerCase** | **String** | lowPrice | [optional] | +|**vLowerCase** | **String** | volume | [optional] | +|**qLowerCase** | **String** | quoteVolume | [optional] | + + + diff --git a/clients/alpha/docs/AllTickerStreamRequest.md b/clients/alpha/docs/AllTickerStreamRequest.md new file mode 100644 index 000000000..4f0e51b40 --- /dev/null +++ b/clients/alpha/docs/AllTickerStreamRequest.md @@ -0,0 +1,13 @@ + + +# AllTickerStreamRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | + + + diff --git a/clients/alpha/docs/AllTickerStreamResponse.md b/clients/alpha/docs/AllTickerStreamResponse.md new file mode 100644 index 000000000..340f06b7e --- /dev/null +++ b/clients/alpha/docs/AllTickerStreamResponse.md @@ -0,0 +1,30 @@ + + +# AllTickerStreamResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eLowerCase** | **String** | eventType | [optional] | +|**E** | **Long** | eventTime | [optional] | +|**sLowerCase** | **String** | symbol | [optional] | +|**pLowerCase** | **String** | priceChange | [optional] | +|**P** | **String** | priceChangePercent | [optional] | +|**wLowerCase** | **String** | averagePrice | [optional] | +|**cLowerCase** | **String** | closePrice | [optional] | +|**Q** | **String** | lastTradeVolume | [optional] | +|**oLowerCase** | **String** | openPrice | [optional] | +|**hLowerCase** | **String** | highPrice | [optional] | +|**lLowerCase** | **String** | lowPrice | [optional] | +|**vLowerCase** | **String** | volume | [optional] | +|**qLowerCase** | **String** | quoteVolume | [optional] | +|**O** | **Long** | startTime | [optional] | +|**C** | **Long** | endTime | [optional] | +|**F** | **Long** | firstTradeId | [optional] | +|**L** | **Long** | lastTradeId | [optional] | +|**nLowerCase** | **Long** | tradeNum | [optional] | + + + diff --git a/clients/alpha/docs/AllTokens24hTickerStreamRequest.md b/clients/alpha/docs/AllTokens24hTickerStreamRequest.md new file mode 100644 index 000000000..fe870100b --- /dev/null +++ b/clients/alpha/docs/AllTokens24hTickerStreamRequest.md @@ -0,0 +1,13 @@ + + +# AllTokens24hTickerStreamRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | + + + diff --git a/clients/alpha/docs/AllTokens24hTickerStreamResponse.md b/clients/alpha/docs/AllTokens24hTickerStreamResponse.md new file mode 100644 index 000000000..4c7e65f4d --- /dev/null +++ b/clients/alpha/docs/AllTokens24hTickerStreamResponse.md @@ -0,0 +1,14 @@ + + +# AllTokens24hTickerStreamResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eLowerCase** | **String** | Event type | [optional] | +|**dLowerCase** | [**List<AllTokens24hTickerStreamResponseDInner>**](AllTokens24hTickerStreamResponseDInner.md) | Per-token 24-hour ticker metrics | [optional] | + + + diff --git a/clients/alpha/docs/AllTokens24hTickerStreamResponseDInner.md b/clients/alpha/docs/AllTokens24hTickerStreamResponseDInner.md new file mode 100644 index 000000000..eb1c0916b --- /dev/null +++ b/clients/alpha/docs/AllTokens24hTickerStreamResponseDInner.md @@ -0,0 +1,23 @@ + + +# AllTokens24hTickerStreamResponseDInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ca** | **String** | Contract address@chain ID | [optional] | +|**cnt24** | **Long** | Number of trades in the last 24 hours | [optional] | +|**fdv** | **String** | Fully diluted valuation | [optional] | +|**hc** | **String** | Number of holders | [optional] | +|**liq** | **String** | Liquidity | [optional] | +|**mc** | **String** | Market cap | [optional] | +|**pLowerCase** | **String** | Current price | [optional] | +|**pc24** | **String** | 24-hour price change percent | [optional] | +|**sLowerCase** | **String** | Token short identifier | [optional] | +|**tLowerCase** | **Long** | Event timestamp in milliseconds | [optional] | +|**vol24** | **String** | 24-hour volume | [optional] | + + + diff --git a/clients/alpha/docs/BookTickerStreamRequest.md b/clients/alpha/docs/BookTickerStreamRequest.md new file mode 100644 index 000000000..12a9d50c4 --- /dev/null +++ b/clients/alpha/docs/BookTickerStreamRequest.md @@ -0,0 +1,14 @@ + + +# BookTickerStreamRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to subscribe, in lowercase stream format. | [optional] | + + + diff --git a/clients/alpha/docs/BookTickerStreamResponse.md b/clients/alpha/docs/BookTickerStreamResponse.md new file mode 100644 index 000000000..fb306d081 --- /dev/null +++ b/clients/alpha/docs/BookTickerStreamResponse.md @@ -0,0 +1,21 @@ + + +# BookTickerStreamResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eLowerCase** | **String** | eventType | [optional] | +|**E** | **Long** | eventTime | [optional] | +|**T** | **Long** | transactionTime | [optional] | +|**uLowerCase** | **Long** | updateId | [optional] | +|**sLowerCase** | **String** | symbol | [optional] | +|**bLowerCase** | **String** | bid1Price | [optional] | +|**B** | **String** | bid1Quantity | [optional] | +|**aLowerCase** | **String** | ask1Price | [optional] | +|**A** | **String** | ask1Quantity | [optional] | + + + diff --git a/clients/alpha/docs/ContractKlineStreamRequest.md b/clients/alpha/docs/ContractKlineStreamRequest.md new file mode 100644 index 000000000..4b8123dd3 --- /dev/null +++ b/clients/alpha/docs/ContractKlineStreamRequest.md @@ -0,0 +1,16 @@ + + +# ContractKlineStreamRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | +|**contractAddress** | **String** | Contract address. | [optional] | +|**chainId** | **String** | Chain ID. | [optional] | +|**interval** | **Interval** | | [optional] | + + + diff --git a/clients/alpha/docs/ContractKlineStreamResponse.md b/clients/alpha/docs/ContractKlineStreamResponse.md new file mode 100644 index 000000000..5b97d31ab --- /dev/null +++ b/clients/alpha/docs/ContractKlineStreamResponse.md @@ -0,0 +1,15 @@ + + +# ContractKlineStreamResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ca** | **String** | Contract address@Chain ID | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**kLowerCase** | [**ContractKlineStreamResponseK**](ContractKlineStreamResponseK.md) | | [optional] | + + + diff --git a/clients/alpha/docs/ContractKlineStreamResponseK.md b/clients/alpha/docs/ContractKlineStreamResponseK.md new file mode 100644 index 000000000..79dd9844c --- /dev/null +++ b/clients/alpha/docs/ContractKlineStreamResponseK.md @@ -0,0 +1,21 @@ + + +# ContractKlineStreamResponseK + +Kline payload + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**oLowerCase** | **String** | Open price | [optional] | +|**cLowerCase** | **String** | Close price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | Volume | [optional] | +|**ot** | **Long** | Kline open time | [optional] | +|**ct** | **Long** | Kline close time | [optional] | +|**iLowerCase** | **String** | Interval | [optional] | + + + diff --git a/clients/alpha/docs/DefaultApi.md b/clients/alpha/docs/DefaultApi.md new file mode 100644 index 000000000..4fa2c68fb --- /dev/null +++ b/clients/alpha/docs/DefaultApi.md @@ -0,0 +1,827 @@ +# DefaultApi + +All URIs are relative to *http://localhost* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**aggregateTradeStream**](DefaultApi.md#aggregateTradeStream) | **POST** /<symbol>@aggTrade | Aggregate Trade Stream | +| [**allBookTickerStream**](DefaultApi.md#allBookTickerStream) | **POST** /!bookTicker | All Book Ticker Stream | +| [**allMiniTickerStream**](DefaultApi.md#allMiniTickerStream) | **POST** /!miniTicker@arr | All Mini Ticker Stream | +| [**allTickerStream**](DefaultApi.md#allTickerStream) | **POST** /!ticker@arr | All Ticker Stream | +| [**allTokens24hTickerStream**](DefaultApi.md#allTokens24hTickerStream) | **POST** /came@allTokens@ticker24 | All Tokens 24h Ticker Stream | +| [**bookTickerStream**](DefaultApi.md#bookTickerStream) | **POST** /<symbol>@bookTicker | Book Ticker Stream | +| [**contractKlineStream**](DefaultApi.md#contractKlineStream) | **POST** /came@<contractAddress>@<chainId>@kline_<interval> | Contract Kline Stream | +| [**fullDepthStream**](DefaultApi.md#fullDepthStream) | **POST** /<symbol>@fulldepth@<interval> | Full Depth Stream | +| [**klineStream**](DefaultApi.md#klineStream) | **POST** /<symbol>@kline_<interval> | Kline Stream | +| [**miniTickerStream**](DefaultApi.md#miniTickerStream) | **POST** /<symbol>@miniTicker | Mini Ticker Stream | +| [**partialDepthStream**](DefaultApi.md#partialDepthStream) | **POST** /<symbol>@depth<levels>@<interval> | Partial Depth Stream | +| [**tickerStream**](DefaultApi.md#tickerStream) | **POST** /<symbol>@ticker | Ticker Stream | +| [**tradeStream**](DefaultApi.md#tradeStream) | **POST** /<symbol>@trade | Trade Stream | + + + +# **aggregateTradeStream** +> AggregateTradeStreamResponse aggregateTradeStream(aggregateTradeStreamRequest) + +Aggregate Trade Stream + +Pushes aggregate trade updates for a symbol. + +### Example +```java +// Import classes: +import com.binance.connector.client.alpha.ApiClient; +import com.binance.connector.client.alpha.ApiException; +import com.binance.connector.client.alpha.Configuration; +import com.binance.connector.client.alpha.models.*; +import com.binance.connector.client.alpha.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + AggregateTradeStreamRequest aggregateTradeStreamRequest = new AggregateTradeStreamRequest(); // AggregateTradeStreamRequest | + try { + AggregateTradeStreamResponse result = apiInstance.aggregateTradeStream(aggregateTradeStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#aggregateTradeStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **aggregateTradeStreamRequest** | [**AggregateTradeStreamRequest**](AggregateTradeStreamRequest.md)| | | + +### Return type + +[**AggregateTradeStreamResponse**](AggregateTradeStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Aggregate Trade Stream | - | + + +# **allBookTickerStream** +> AllBookTickerStreamResponse allBookTickerStream(allBookTickerStreamRequest) + +All Book Ticker Stream + +Pushes best bid/ask updates for all symbols. + +### Example +```java +// Import classes: +import com.binance.connector.client.alpha.ApiClient; +import com.binance.connector.client.alpha.ApiException; +import com.binance.connector.client.alpha.Configuration; +import com.binance.connector.client.alpha.models.*; +import com.binance.connector.client.alpha.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + AllBookTickerStreamRequest allBookTickerStreamRequest = new AllBookTickerStreamRequest(); // AllBookTickerStreamRequest | + try { + AllBookTickerStreamResponse result = apiInstance.allBookTickerStream(allBookTickerStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#allBookTickerStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **allBookTickerStreamRequest** | [**AllBookTickerStreamRequest**](AllBookTickerStreamRequest.md)| | | + +### Return type + +[**AllBookTickerStreamResponse**](AllBookTickerStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | All Book Ticker Stream | - | + + +# **allMiniTickerStream** +> AllMiniTickerStreamResponse allMiniTickerStream(allMiniTickerStreamRequest) + +All Mini Ticker Stream + +Pushes mini ticker statistics for all symbols. + +### Example +```java +// Import classes: +import com.binance.connector.client.alpha.ApiClient; +import com.binance.connector.client.alpha.ApiException; +import com.binance.connector.client.alpha.Configuration; +import com.binance.connector.client.alpha.models.*; +import com.binance.connector.client.alpha.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + AllMiniTickerStreamRequest allMiniTickerStreamRequest = new AllMiniTickerStreamRequest(); // AllMiniTickerStreamRequest | + try { + AllMiniTickerStreamResponse result = apiInstance.allMiniTickerStream(allMiniTickerStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#allMiniTickerStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **allMiniTickerStreamRequest** | [**AllMiniTickerStreamRequest**](AllMiniTickerStreamRequest.md)| | | + +### Return type + +[**AllMiniTickerStreamResponse**](AllMiniTickerStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | All Mini Ticker Stream | - | + + +# **allTickerStream** +> AllTickerStreamResponse allTickerStream(allTickerStreamRequest) + +All Ticker Stream + +Pushes full ticker statistics for all symbols. + +### Example +```java +// Import classes: +import com.binance.connector.client.alpha.ApiClient; +import com.binance.connector.client.alpha.ApiException; +import com.binance.connector.client.alpha.Configuration; +import com.binance.connector.client.alpha.models.*; +import com.binance.connector.client.alpha.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + AllTickerStreamRequest allTickerStreamRequest = new AllTickerStreamRequest(); // AllTickerStreamRequest | + try { + AllTickerStreamResponse result = apiInstance.allTickerStream(allTickerStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#allTickerStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **allTickerStreamRequest** | [**AllTickerStreamRequest**](AllTickerStreamRequest.md)| | | + +### Return type + +[**AllTickerStreamResponse**](AllTickerStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | All Ticker Stream | - | + + +# **allTokens24hTickerStream** +> AllTokens24hTickerStreamResponse allTokens24hTickerStream(allTokens24hTickerStreamRequest) + +All Tokens 24h Ticker Stream + +Pushes 24h ticker-like metrics for all tokens. + +### Example +```java +// Import classes: +import com.binance.connector.client.alpha.ApiClient; +import com.binance.connector.client.alpha.ApiException; +import com.binance.connector.client.alpha.Configuration; +import com.binance.connector.client.alpha.models.*; +import com.binance.connector.client.alpha.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + AllTokens24hTickerStreamRequest allTokens24hTickerStreamRequest = new AllTokens24hTickerStreamRequest(); // AllTokens24hTickerStreamRequest | + try { + AllTokens24hTickerStreamResponse result = apiInstance.allTokens24hTickerStream(allTokens24hTickerStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#allTokens24hTickerStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **allTokens24hTickerStreamRequest** | [**AllTokens24hTickerStreamRequest**](AllTokens24hTickerStreamRequest.md)| | | + +### Return type + +[**AllTokens24hTickerStreamResponse**](AllTokens24hTickerStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | All Tokens 24h Ticker Stream | - | + + +# **bookTickerStream** +> BookTickerStreamResponse bookTickerStream(bookTickerStreamRequest) + +Book Ticker Stream + +Pushes best bid/ask updates for a symbol. + +### Example +```java +// Import classes: +import com.binance.connector.client.alpha.ApiClient; +import com.binance.connector.client.alpha.ApiException; +import com.binance.connector.client.alpha.Configuration; +import com.binance.connector.client.alpha.models.*; +import com.binance.connector.client.alpha.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + BookTickerStreamRequest bookTickerStreamRequest = new BookTickerStreamRequest(); // BookTickerStreamRequest | + try { + BookTickerStreamResponse result = apiInstance.bookTickerStream(bookTickerStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#bookTickerStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bookTickerStreamRequest** | [**BookTickerStreamRequest**](BookTickerStreamRequest.md)| | | + +### Return type + +[**BookTickerStreamResponse**](BookTickerStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Book Ticker Stream | - | + + +# **contractKlineStream** +> ContractKlineStreamResponse contractKlineStream(contractKlineStreamRequest) + +Contract Kline Stream + +Pushes kline updates by contractAddress@chainId. + +### Example +```java +// Import classes: +import com.binance.connector.client.alpha.ApiClient; +import com.binance.connector.client.alpha.ApiException; +import com.binance.connector.client.alpha.Configuration; +import com.binance.connector.client.alpha.models.*; +import com.binance.connector.client.alpha.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + ContractKlineStreamRequest contractKlineStreamRequest = new ContractKlineStreamRequest(); // ContractKlineStreamRequest | + try { + ContractKlineStreamResponse result = apiInstance.contractKlineStream(contractKlineStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#contractKlineStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **contractKlineStreamRequest** | [**ContractKlineStreamRequest**](ContractKlineStreamRequest.md)| | | + +### Return type + +[**ContractKlineStreamResponse**](ContractKlineStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Contract Kline Stream | - | + + +# **fullDepthStream** +> FullDepthStreamResponse fullDepthStream(fullDepthStreamRequest) + +Full Depth Stream + +Returns all available depth, including UI and API orders. + +### Example +```java +// Import classes: +import com.binance.connector.client.alpha.ApiClient; +import com.binance.connector.client.alpha.ApiException; +import com.binance.connector.client.alpha.Configuration; +import com.binance.connector.client.alpha.models.*; +import com.binance.connector.client.alpha.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + FullDepthStreamRequest fullDepthStreamRequest = new FullDepthStreamRequest(); // FullDepthStreamRequest | + try { + FullDepthStreamResponse result = apiInstance.fullDepthStream(fullDepthStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#fullDepthStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **fullDepthStreamRequest** | [**FullDepthStreamRequest**](FullDepthStreamRequest.md)| | | + +### Return type + +[**FullDepthStreamResponse**](FullDepthStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Full Depth Stream | - | + + +# **klineStream** +> KlineStreamResponse klineStream(klineStreamRequest) + +Kline Stream + +Pushes kline updates for a symbol. + +### Example +```java +// Import classes: +import com.binance.connector.client.alpha.ApiClient; +import com.binance.connector.client.alpha.ApiException; +import com.binance.connector.client.alpha.Configuration; +import com.binance.connector.client.alpha.models.*; +import com.binance.connector.client.alpha.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + KlineStreamRequest klineStreamRequest = new KlineStreamRequest(); // KlineStreamRequest | + try { + KlineStreamResponse result = apiInstance.klineStream(klineStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#klineStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **klineStreamRequest** | [**KlineStreamRequest**](KlineStreamRequest.md)| | | + +### Return type + +[**KlineStreamResponse**](KlineStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Kline Stream | - | + + +# **miniTickerStream** +> MiniTickerStreamResponse miniTickerStream(miniTickerStreamRequest) + +Mini Ticker Stream + +Pushes 24h rolling mini ticker statistics. + +### Example +```java +// Import classes: +import com.binance.connector.client.alpha.ApiClient; +import com.binance.connector.client.alpha.ApiException; +import com.binance.connector.client.alpha.Configuration; +import com.binance.connector.client.alpha.models.*; +import com.binance.connector.client.alpha.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + MiniTickerStreamRequest miniTickerStreamRequest = new MiniTickerStreamRequest(); // MiniTickerStreamRequest | + try { + MiniTickerStreamResponse result = apiInstance.miniTickerStream(miniTickerStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#miniTickerStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **miniTickerStreamRequest** | [**MiniTickerStreamRequest**](MiniTickerStreamRequest.md)| | | + +### Return type + +[**MiniTickerStreamResponse**](MiniTickerStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Mini Ticker Stream | - | + + +# **partialDepthStream** +> PartialDepthStreamResponse partialDepthStream(partialDepthStreamRequest) + +Partial Depth Stream + +Pushes partial depth updates (UI orders only). + +### Example +```java +// Import classes: +import com.binance.connector.client.alpha.ApiClient; +import com.binance.connector.client.alpha.ApiException; +import com.binance.connector.client.alpha.Configuration; +import com.binance.connector.client.alpha.models.*; +import com.binance.connector.client.alpha.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + PartialDepthStreamRequest partialDepthStreamRequest = new PartialDepthStreamRequest(); // PartialDepthStreamRequest | + try { + PartialDepthStreamResponse result = apiInstance.partialDepthStream(partialDepthStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#partialDepthStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **partialDepthStreamRequest** | [**PartialDepthStreamRequest**](PartialDepthStreamRequest.md)| | | + +### Return type + +[**PartialDepthStreamResponse**](PartialDepthStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Partial Depth Stream | - | + + +# **tickerStream** +> TickerStreamResponse tickerStream(tickerStreamRequest) + +Ticker Stream + +Pushes full 24h rolling ticker statistics. + +### Example +```java +// Import classes: +import com.binance.connector.client.alpha.ApiClient; +import com.binance.connector.client.alpha.ApiException; +import com.binance.connector.client.alpha.Configuration; +import com.binance.connector.client.alpha.models.*; +import com.binance.connector.client.alpha.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + TickerStreamRequest tickerStreamRequest = new TickerStreamRequest(); // TickerStreamRequest | + try { + TickerStreamResponse result = apiInstance.tickerStream(tickerStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#tickerStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tickerStreamRequest** | [**TickerStreamRequest**](TickerStreamRequest.md)| | | + +### Return type + +[**TickerStreamResponse**](TickerStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ticker Stream | - | + + +# **tradeStream** +> TradeStreamResponse tradeStream(tradeStreamRequest) + +Trade Stream + +Pushes raw trade updates for a symbol. + +### Example +```java +// Import classes: +import com.binance.connector.client.alpha.ApiClient; +import com.binance.connector.client.alpha.ApiException; +import com.binance.connector.client.alpha.Configuration; +import com.binance.connector.client.alpha.models.*; +import com.binance.connector.client.alpha.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + TradeStreamRequest tradeStreamRequest = new TradeStreamRequest(); // TradeStreamRequest | + try { + TradeStreamResponse result = apiInstance.tradeStream(tradeStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#tradeStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tradeStreamRequest** | [**TradeStreamRequest**](TradeStreamRequest.md)| | | + +### Return type + +[**TradeStreamResponse**](TradeStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Trade Stream | - | + diff --git a/clients/alpha/docs/FullDepthResponse.md b/clients/alpha/docs/FullDepthResponse.md new file mode 100644 index 000000000..b42e2d88b --- /dev/null +++ b/clients/alpha/docs/FullDepthResponse.md @@ -0,0 +1,17 @@ + + +# FullDepthResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **String** | API response code. \"000000\" indicates success. | [optional] | +|**message** | **String** | Response message. | [optional] | +|**messageDetail** | **String** | Detailed response message. | [optional] | +|**success** | **Boolean** | Whether request is successful. | [optional] | +|**data** | [**FullDepthResponseData**](FullDepthResponseData.md) | | [optional] | + + + diff --git a/clients/alpha/docs/FullDepthResponseData.md b/clients/alpha/docs/FullDepthResponseData.md new file mode 100644 index 000000000..21c0aa3b0 --- /dev/null +++ b/clients/alpha/docs/FullDepthResponseData.md @@ -0,0 +1,19 @@ + + +# FullDepthResponseData + +Order book data. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**lastUpdateId** | **Long** | Last order book update ID. | [optional] | +|**symbol** | **String** | Trading pair symbol. | [optional] | +|**bids** | **List<List<String>>** | Bid orders. Each entry is [price, quantity]. | [optional] | +|**asks** | **List<List<String>>** | Ask orders. Each entry is [price, quantity]. | [optional] | +|**E** | **Long** | Event time in milliseconds. | [optional] | +|**T** | **Long** | Transaction time in milliseconds. | [optional] | + + + diff --git a/clients/alpha/docs/FullDepthStreamRequest.md b/clients/alpha/docs/FullDepthStreamRequest.md new file mode 100644 index 000000000..72ac4903f --- /dev/null +++ b/clients/alpha/docs/FullDepthStreamRequest.md @@ -0,0 +1,15 @@ + + +# FullDepthStreamRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to subscribe, in lowercase stream format. | [optional] | +|**interval** | **Interval** | | [optional] | + + + diff --git a/clients/alpha/docs/FullDepthStreamResponse.md b/clients/alpha/docs/FullDepthStreamResponse.md new file mode 100644 index 000000000..f073ba2e2 --- /dev/null +++ b/clients/alpha/docs/FullDepthStreamResponse.md @@ -0,0 +1,21 @@ + + +# FullDepthStreamResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time (ms) | [optional] | +|**T** | **Long** | Matching time (ms) | [optional] | +|**U** | **Long** | First updateId in this event | [optional] | +|**uLowerCase** | **Long** | Last updateId in this event | [optional] | +|**pu** | **Long** | Previous updateId from the last push | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**bLowerCase** | **List<List<String>>** | bids to be updated | [optional] | +|**aLowerCase** | **List<List<String>>** | asks to be updated | [optional] | + + + diff --git a/clients/alpha/docs/GetExchangeInfoResponse.md b/clients/alpha/docs/GetExchangeInfoResponse.md index d57725410..7ea187a5a 100644 --- a/clients/alpha/docs/GetExchangeInfoResponse.md +++ b/clients/alpha/docs/GetExchangeInfoResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **String** | | [optional] | -|**message** | **String** | | [optional] | -|**messageDetail** | **String** | | [optional] | -|**success** | **Boolean** | | [optional] | +|**code** | **String** | API response code. \"000000\" indicates success. | [optional] | +|**message** | **String** | Response message. | [optional] | +|**messageDetail** | **String** | Detailed response message. | [optional] | +|**success** | **Boolean** | Whether request is successful. | [optional] | |**data** | [**GetExchangeInfoResponseData**](GetExchangeInfoResponseData.md) | | [optional] | diff --git a/clients/alpha/docs/GetExchangeInfoResponseData.md b/clients/alpha/docs/GetExchangeInfoResponseData.md index 7685dee66..ab452e010 100644 --- a/clients/alpha/docs/GetExchangeInfoResponseData.md +++ b/clients/alpha/docs/GetExchangeInfoResponseData.md @@ -2,15 +2,16 @@ # GetExchangeInfoResponseData +Exchange metadata, including assets and symbols. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**timezone** | **String** | | [optional] | -|**assets** | [**List<GetExchangeInfoResponseDataAssetsInner>**](GetExchangeInfoResponseDataAssetsInner.md) | | [optional] | -|**symbols** | [**List<GetExchangeInfoResponseDataSymbolsInner>**](GetExchangeInfoResponseDataSymbolsInner.md) | | [optional] | -|**orderTypes** | **String** | | [optional] | +|**timezone** | **String** | Timezone of market data. | [optional] | +|**assets** | [**List<GetExchangeInfoResponseDataAssetsInner>**](GetExchangeInfoResponseDataAssetsInner.md) | Supported assets. | [optional] | +|**symbols** | [**List<GetExchangeInfoResponseDataSymbolsInner>**](GetExchangeInfoResponseDataSymbolsInner.md) | Supported trading symbols. | [optional] | +|**orderTypes** | **String** | Order types metadata returned by backend. | [optional] | diff --git a/clients/alpha/docs/GetExchangeInfoResponseDataAssetsInner.md b/clients/alpha/docs/GetExchangeInfoResponseDataAssetsInner.md index fa3f88eb9..ac995c57e 100644 --- a/clients/alpha/docs/GetExchangeInfoResponseDataAssetsInner.md +++ b/clients/alpha/docs/GetExchangeInfoResponseDataAssetsInner.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | +|**asset** | **String** | Asset symbol. | [optional] | diff --git a/clients/alpha/docs/GetExchangeInfoResponseDataSymbolsInner.md b/clients/alpha/docs/GetExchangeInfoResponseDataSymbolsInner.md index ac3936c12..2be1d8c80 100644 --- a/clients/alpha/docs/GetExchangeInfoResponseDataSymbolsInner.md +++ b/clients/alpha/docs/GetExchangeInfoResponseDataSymbolsInner.md @@ -7,16 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**baseAsset** | **String** | | [optional] | -|**quoteAsset** | **String** | | [optional] | -|**pricePrecision** | **Long** | | [optional] | -|**quantityPrecision** | **Long** | | [optional] | -|**baseAssetPrecision** | **Long** | | [optional] | -|**quotePrecision** | **Long** | | [optional] | -|**filters** | [**List<GetExchangeInfoResponseDataSymbolsInnerFiltersInner>**](GetExchangeInfoResponseDataSymbolsInnerFiltersInner.md) | | [optional] | -|**orderTypes** | **List<String>** | | [optional] | +|**symbol** | **String** | Trading symbol. | [optional] | +|**status** | **String** | Trading status. | [optional] | +|**baseAsset** | **String** | Base asset symbol. | [optional] | +|**quoteAsset** | **String** | Quote asset symbol. | [optional] | +|**pricePrecision** | **Long** | Allowed precision for price. | [optional] | +|**quantityPrecision** | **Long** | Allowed precision for quantity. | [optional] | +|**baseAssetPrecision** | **Long** | Base asset precision. | [optional] | +|**quotePrecision** | **Long** | Quote asset precision. | [optional] | +|**filters** | [**List<GetExchangeInfoResponseDataSymbolsInnerFiltersInner>**](GetExchangeInfoResponseDataSymbolsInnerFiltersInner.md) | Trading filters and constraints. | [optional] | +|**orderTypes** | **List<String>** | Supported order types for this symbol. | [optional] | diff --git a/clients/alpha/docs/GetExchangeInfoResponseDataSymbolsInnerFiltersInner.md b/clients/alpha/docs/GetExchangeInfoResponseDataSymbolsInnerFiltersInner.md index 368bf84ed..8acadc386 100644 --- a/clients/alpha/docs/GetExchangeInfoResponseDataSymbolsInnerFiltersInner.md +++ b/clients/alpha/docs/GetExchangeInfoResponseDataSymbolsInnerFiltersInner.md @@ -7,22 +7,22 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**filterType** | **String** | | [optional] | -|**minPrice** | **String** | | [optional] | -|**maxPrice** | **String** | | [optional] | -|**tickSize** | **String** | | [optional] | -|**stepSize** | **String** | | [optional] | -|**maxQty** | **String** | | [optional] | -|**minQty** | **String** | | [optional] | -|**limit** | **Long** | | [optional] | -|**minNotional** | **String** | | [optional] | -|**maxNotional** | **String** | | [optional] | -|**multiplierDown** | **String** | | [optional] | -|**multiplierUp** | **String** | | [optional] | -|**bidMultiplierUp** | **String** | | [optional] | -|**askMultiplierUp** | **String** | | [optional] | -|**bidMultiplierDown** | **String** | | [optional] | -|**askMultiplierDown** | **String** | | [optional] | +|**filterType** | **String** | Filter type. | [optional] | +|**minPrice** | **String** | Minimum price. | [optional] | +|**maxPrice** | **String** | Maximum price. | [optional] | +|**tickSize** | **String** | Tick size. | [optional] | +|**stepSize** | **String** | Step size. | [optional] | +|**maxQty** | **String** | Maximum quantity. | [optional] | +|**minQty** | **String** | Minimum quantity. | [optional] | +|**limit** | **Long** | Maximum allowed orders for this rule. | [optional] | +|**minNotional** | **String** | Minimum notional value. | [optional] | +|**maxNotional** | **String** | Maximum notional value. | [optional] | +|**multiplierDown** | **String** | Lower multiplier bound. | [optional] | +|**multiplierUp** | **String** | Upper multiplier bound. | [optional] | +|**bidMultiplierUp** | **String** | Upper multiplier bound for bids. | [optional] | +|**askMultiplierUp** | **String** | Upper multiplier bound for asks. | [optional] | +|**bidMultiplierDown** | **String** | Lower multiplier bound for bids. | [optional] | +|**askMultiplierDown** | **String** | Lower multiplier bound for asks. | [optional] | diff --git a/clients/alpha/docs/Interval.md b/clients/alpha/docs/Interval.md new file mode 100644 index 000000000..dd8d6b519 --- /dev/null +++ b/clients/alpha/docs/Interval.md @@ -0,0 +1,23 @@ + + +# Interval + +## Enum + + +* `INTERVAL_1s` (value: `"1s"`) + +* `INTERVAL_1m` (value: `"1m"`) + +* `INTERVAL_5m` (value: `"5m"`) + +* `INTERVAL_15m` (value: `"15m"`) + +* `INTERVAL_1h` (value: `"1h"`) + +* `INTERVAL_4h` (value: `"4h"`) + +* `INTERVAL_1d` (value: `"1d"`) + + + diff --git a/clients/alpha/docs/KlineStreamRequest.md b/clients/alpha/docs/KlineStreamRequest.md new file mode 100644 index 000000000..a6e7b7805 --- /dev/null +++ b/clients/alpha/docs/KlineStreamRequest.md @@ -0,0 +1,15 @@ + + +# KlineStreamRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to subscribe, in lowercase stream format. | [optional] | +|**interval** | **Interval** | | [optional] | + + + diff --git a/clients/alpha/docs/KlineStreamResponse.md b/clients/alpha/docs/KlineStreamResponse.md new file mode 100644 index 000000000..ed7bc8121 --- /dev/null +++ b/clients/alpha/docs/KlineStreamResponse.md @@ -0,0 +1,16 @@ + + +# KlineStreamResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eLowerCase** | **String** | eventType | [optional] | +|**E** | **Long** | eventTime | [optional] | +|**sLowerCase** | **String** | symbol | [optional] | +|**kLowerCase** | [**KlineStreamResponseK**](KlineStreamResponseK.md) | | [optional] | + + + diff --git a/clients/alpha/docs/KlineStreamResponseK.md b/clients/alpha/docs/KlineStreamResponseK.md new file mode 100644 index 000000000..40e7698fb --- /dev/null +++ b/clients/alpha/docs/KlineStreamResponseK.md @@ -0,0 +1,29 @@ + + +# KlineStreamResponseK + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tLowerCase** | **Long** | startTime | [optional] | +|**T** | **Long** | endTime | [optional] | +|**sLowerCase** | **String** | symbol | [optional] | +|**iLowerCase** | **String** | interval | [optional] | +|**fLowerCase** | **Long** | firstTradeId | [optional] | +|**L** | **Long** | lastTradeId | [optional] | +|**oLowerCase** | **String** | openPrice | [optional] | +|**cLowerCase** | **String** | closePrice | [optional] | +|**hLowerCase** | **String** | highPrice | [optional] | +|**lLowerCase** | **String** | lowPrice | [optional] | +|**vLowerCase** | **String** | volume | [optional] | +|**nLowerCase** | **Long** | tradeNum | [optional] | +|**xLowerCase** | **Boolean** | klineComplete | [optional] | +|**qLowerCase** | **String** | quoteAssetVolume | [optional] | +|**V** | **String** | takerBuyBaseAssetVolume | [optional] | +|**Q** | **String** | takerBuyQuoteAssetVolume | [optional] | +|**B** | **String** | ignore | [optional] | + + + diff --git a/clients/alpha/docs/KlinesResponse.md b/clients/alpha/docs/KlinesResponse.md index 9faabf9ee..43844676e 100644 --- a/clients/alpha/docs/KlinesResponse.md +++ b/clients/alpha/docs/KlinesResponse.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **String** | | [optional] | -|**message** | **String** | | [optional] | -|**messageDetail** | **String** | | [optional] | -|**success** | **Boolean** | | [optional] | -|**data** | **List<KlinesResponseDataItem>** | | [optional] | +|**code** | **String** | API response code. \"000000\" indicates success. | [optional] | +|**message** | **String** | Response message. | [optional] | +|**messageDetail** | **String** | Detailed response message. | [optional] | +|**success** | **Boolean** | Whether request is successful. | [optional] | +|**data** | **List<List<KlinesResponseDataInnerInner>>** | Array of kline rows. Each row contains: open time, open, high, low, close, volume, close time, quote volume, trade count, taker buy base volume, taker buy quote volume, and a static 0. | [optional] | diff --git a/clients/alpha/docs/KlinesResponseDataInnerInner.md b/clients/alpha/docs/KlinesResponseDataInnerInner.md new file mode 100644 index 000000000..6d20cb435 --- /dev/null +++ b/clients/alpha/docs/KlinesResponseDataInnerInner.md @@ -0,0 +1,12 @@ + + +# KlinesResponseDataInnerInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/alpha/docs/KlinesResponseDataItem.md b/clients/alpha/docs/KlinesResponseDataItem.md deleted file mode 100644 index cf48027e9..000000000 --- a/clients/alpha/docs/KlinesResponseDataItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# KlinesResponseDataItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/alpha/docs/KlinesResponseDataItemInner.md b/clients/alpha/docs/KlinesResponseDataItemInner.md deleted file mode 100644 index 05d30dde2..000000000 --- a/clients/alpha/docs/KlinesResponseDataItemInner.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# KlinesResponseDataItemInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/alpha/docs/Levels.md b/clients/alpha/docs/Levels.md new file mode 100644 index 000000000..cf3348fbc --- /dev/null +++ b/clients/alpha/docs/Levels.md @@ -0,0 +1,15 @@ + + +# Levels + +## Enum + + +* `LEVELS_5` (value: `"5"`) + +* `LEVELS_10` (value: `"10"`) + +* `LEVELS_20` (value: `"20"`) + + + diff --git a/clients/alpha/docs/Limit.md b/clients/alpha/docs/Limit.md new file mode 100644 index 000000000..83bdd88a4 --- /dev/null +++ b/clients/alpha/docs/Limit.md @@ -0,0 +1,23 @@ + + +# Limit + +## Enum + + +* `LIMIT_5` (value: `5l`) + +* `LIMIT_10` (value: `10l`) + +* `LIMIT_20` (value: `20l`) + +* `LIMIT_50` (value: `50l`) + +* `LIMIT_100` (value: `100l`) + +* `LIMIT_500` (value: `500l`) + +* `LIMIT_1000` (value: `1000l`) + + + diff --git a/clients/alpha/docs/MarketDataApi.md b/clients/alpha/docs/MarketDataApi.md index 9a637b4f4..f1ccbaec8 100644 --- a/clients/alpha/docs/MarketDataApi.md +++ b/clients/alpha/docs/MarketDataApi.md @@ -5,9 +5,10 @@ All URIs are relative to *https://www.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**aggregatedTrades**](MarketDataApi.md#aggregatedTrades) | **GET** /bapi/defi/v1/public/alpha-trade/agg-trades | Aggregated Trades | +| [**fullDepth**](MarketDataApi.md#fullDepth) | **GET** /bapi/defi/v1/public/alpha-trade/fullDepth | Full Depth | | [**getExchangeInfo**](MarketDataApi.md#getExchangeInfo) | **GET** /bapi/defi/v1/public/alpha-trade/get-exchange-info | Get Exchange Info | -| [**klines**](MarketDataApi.md#klines) | **GET** /bapi/defi/v1/public/alpha-trade/klines | Klines (Candlestick Data) | -| [**ticker**](MarketDataApi.md#ticker) | **GET** /bapi/defi/v1/public/alpha-trade/ticker | Ticker (24hr Price Statistics) | +| [**klines**](MarketDataApi.md#klines) | **GET** /bapi/defi/v1/public/alpha-trade/klines | Klines | +| [**ticker**](MarketDataApi.md#ticker) | **GET** /bapi/defi/v1/public/alpha-trade/ticker | Ticker | | [**tokenList**](MarketDataApi.md#tokenList) | **GET** /bapi/defi/v1/public/wallet-direct/buw/wallet/cex/alpha/all/token/list | Token List | @@ -17,7 +18,7 @@ All URIs are relative to *https://www.binance.com* Aggregated Trades -Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history. Weight: 0 +Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history. ### Example ```java @@ -34,11 +35,11 @@ public class Example { defaultClient.setBasePath("https://www.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | e.g., \"ALPHA_175USDT\" – use token ID from Token List - Long fromId = 56L; // Long | starting trade ID to fetch from - Long startTime = 56L; // Long | start timestamp (milliseconds) - Long endTime = 56L; // Long | end timestamp (milliseconds) - Long limit = 56L; // Long | number of results to return (default 500, max 1000) + String symbol = "ALPHA_118USDC"; // String | Trading pair symbol, e.g. ALPHA_118USDC (use token ID from Token List). + Long fromId = 58470L; // Long | Starting aggregate trade ID to fetch from. + Long startTime = 1752568680000L; // Long | Start timestamp in milliseconds. + Long endTime = 1752572280000L; // Long | End timestamp in milliseconds. + Long limit = 500L; // Long | Number of results to return. try { AggregatedTradesResponse result = apiInstance.aggregatedTrades(symbol, fromId, startTime, endTime, limit); System.out.println(result); @@ -57,11 +58,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| e.g., \"ALPHA_175USDT\" – use token ID from Token List | | -| **fromId** | **Long**| starting trade ID to fetch from | [optional] | -| **startTime** | **Long**| start timestamp (milliseconds) | [optional] | -| **endTime** | **Long**| end timestamp (milliseconds) | [optional] | -| **limit** | **Long**| number of results to return (default 500, max 1000) | [optional] | +| **symbol** | **String**| Trading pair symbol, e.g. ALPHA_118USDC (use token ID from Token List). | | +| **fromId** | **Long**| Starting aggregate trade ID to fetch from. | [optional] | +| **startTime** | **Long**| Start timestamp in milliseconds. | [optional] | +| **endTime** | **Long**| End timestamp in milliseconds. | [optional] | +| **limit** | **Long**| Number of results to return. | [optional] | ### Return type @@ -81,13 +82,77 @@ No authorization required |-------------|-------------|------------------| | **200** | Aggregated Trades | - | + +# **fullDepth** +> FullDepthResponse fullDepth(symbol, limit) + +Full Depth + +Fetches the full order book depth (UI & API orders) for a symbol, including bid and ask orders with their prices and quantities. + +### Example +```java +// Import classes: +import com.binance.connector.client.alpha.ApiClient; +import com.binance.connector.client.alpha.ApiException; +import com.binance.connector.client.alpha.Configuration; +import com.binance.connector.client.alpha.models.*; +import com.binance.connector.client.alpha.rest.api.MarketDataApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://www.binance.com"); + + MarketDataApi apiInstance = new MarketDataApi(defaultClient); + String symbol = "ALPHA_175USDT"; // String | Trading pair symbol, e.g. ALPHA_175USDT (use token ID from Token List). + Limit limit = Limit.fromValue("5"); // Limit | Number of price levels to return. Valid values: 5, 10, 20, 50, 100, 500, 1000. + try { + FullDepthResponse result = apiInstance.fullDepth(symbol, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MarketDataApi#fullDepth"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **symbol** | **String**| Trading pair symbol, e.g. ALPHA_175USDT (use token ID from Token List). | | +| **limit** | [**Limit**](.md)| Number of price levels to return. Valid values: 5, 10, 20, 50, 100, 500, 1000. | [optional] [default to 500] [enum: 5, 10, 20, 50, 100, 500, 1000] | + +### Return type + +[**FullDepthResponse**](FullDepthResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Full Depth | - | + # **getExchangeInfo** > GetExchangeInfoResponse getExchangeInfo() Get Exchange Info -Fetches general exchange information, such as supported symbols, rate limits, and server time. Weight: 0 +Fetches general exchange information, such as supported symbols, rate limits, and server time. ### Example ```java @@ -143,9 +208,9 @@ No authorization required # **klines** > KlinesResponse klines(symbol, interval, limit, startTime, endTime) -Klines (Candlestick Data) +Klines -Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis. Weight: 0 +Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis. ### Example ```java @@ -162,11 +227,11 @@ public class Example { defaultClient.setBasePath("https://www.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | e.g., \"ALPHA_175USDT\" – use token ID from Token List - String interval = "interval_example"; // String | e.g., \"1h\" – supported intervals: 1s, 15s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M - Long limit = 56L; // Long | number of results to return (default 500, max 1000) - Long startTime = 56L; // Long | start timestamp (milliseconds) - Long endTime = 56L; // Long | end timestamp (milliseconds) + String symbol = "ALPHA_175USDT"; // String | Trading pair symbol, e.g. ALPHA_175USDT (use token ID from Token List). + Interval interval = Interval.fromValue("1s"); // Interval | Kline interval. + Long limit = 500L; // Long | Number of klines to return. + Long startTime = 1752642000000L; // Long | Start timestamp in milliseconds. + Long endTime = 1752645599999L; // Long | End timestamp in milliseconds. try { KlinesResponse result = apiInstance.klines(symbol, interval, limit, startTime, endTime); System.out.println(result); @@ -185,11 +250,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| e.g., \"ALPHA_175USDT\" – use token ID from Token List | | -| **interval** | **String**| e.g., \"1h\" – supported intervals: 1s, 15s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M | | -| **limit** | **Long**| number of results to return (default 500, max 1000) | [optional] | -| **startTime** | **Long**| start timestamp (milliseconds) | [optional] | -| **endTime** | **Long**| end timestamp (milliseconds) | [optional] | +| **symbol** | **String**| Trading pair symbol, e.g. ALPHA_175USDT (use token ID from Token List). | | +| **interval** | [**Interval**](.md)| Kline interval. | [enum: 1s, 15s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] | +| **limit** | **Long**| Number of klines to return. | [optional] | +| **startTime** | **Long**| Start timestamp in milliseconds. | [optional] | +| **endTime** | **Long**| End timestamp in milliseconds. | [optional] | ### Return type @@ -213,9 +278,9 @@ No authorization required # **ticker** > TickerResponse ticker(symbol) -Ticker (24hr Price Statistics) +Ticker -Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes. Weight: 0 +Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes. ### Example ```java @@ -232,7 +297,7 @@ public class Example { defaultClient.setBasePath("https://www.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | e.g., \"ALPHA_175USDT\" – use token ID from Token List + String symbol = "ALPHA_175USDT"; // String | Trading pair symbol, e.g. ALPHA_175USDT (use token ID from Token List). try { TickerResponse result = apiInstance.ticker(symbol); System.out.println(result); @@ -251,7 +316,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| e.g., \"ALPHA_175USDT\" – use token ID from Token List | | +| **symbol** | **String**| Trading pair symbol, e.g. ALPHA_175USDT (use token ID from Token List). | | ### Return type @@ -277,7 +342,7 @@ No authorization required Token List -Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints. Weight: 0 +Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints. ### Example ```java diff --git a/clients/alpha/docs/MiniTickerStreamRequest.md b/clients/alpha/docs/MiniTickerStreamRequest.md new file mode 100644 index 000000000..14781dce0 --- /dev/null +++ b/clients/alpha/docs/MiniTickerStreamRequest.md @@ -0,0 +1,14 @@ + + +# MiniTickerStreamRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to subscribe, in lowercase stream format. | [optional] | + + + diff --git a/clients/alpha/docs/MiniTickerStreamResponse.md b/clients/alpha/docs/MiniTickerStreamResponse.md new file mode 100644 index 000000000..14afebe72 --- /dev/null +++ b/clients/alpha/docs/MiniTickerStreamResponse.md @@ -0,0 +1,21 @@ + + +# MiniTickerStreamResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eLowerCase** | **String** | eventType | [optional] | +|**E** | **Long** | eventTime | [optional] | +|**sLowerCase** | **String** | symbol | [optional] | +|**cLowerCase** | **String** | closePrice | [optional] | +|**oLowerCase** | **String** | openPrice | [optional] | +|**hLowerCase** | **String** | highPrice | [optional] | +|**lLowerCase** | **String** | lowPrice | [optional] | +|**vLowerCase** | **String** | volume | [optional] | +|**qLowerCase** | **String** | quoteVolume | [optional] | + + + diff --git a/clients/alpha/docs/PartialDepthStreamRequest.md b/clients/alpha/docs/PartialDepthStreamRequest.md new file mode 100644 index 000000000..77b5382f5 --- /dev/null +++ b/clients/alpha/docs/PartialDepthStreamRequest.md @@ -0,0 +1,16 @@ + + +# PartialDepthStreamRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to subscribe, in lowercase stream format. | [optional] | +|**levels** | **Levels** | | [optional] | +|**interval** | **Interval** | | [optional] | + + + diff --git a/clients/alpha/docs/PartialDepthStreamResponse.md b/clients/alpha/docs/PartialDepthStreamResponse.md new file mode 100644 index 000000000..6763e4e49 --- /dev/null +++ b/clients/alpha/docs/PartialDepthStreamResponse.md @@ -0,0 +1,21 @@ + + +# PartialDepthStreamResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eLowerCase** | **String** | eventType | [optional] | +|**E** | **Long** | eventTime | [optional] | +|**T** | **Long** | transactionTime | [optional] | +|**U** | **Long** | firstUpdateId | [optional] | +|**uLowerCase** | **Long** | lastUpdateId | [optional] | +|**pu** | **Long** | previousUpdateId | [optional] | +|**sLowerCase** | **String** | symbol | [optional] | +|**bLowerCase** | **List<List<String>>** | bids to be updated | [optional] | +|**aLowerCase** | **List<List<String>>** | asks to be updated | [optional] | + + + diff --git a/clients/alpha/docs/TickerResponse.md b/clients/alpha/docs/TickerResponse.md index 36647980a..0863b4839 100644 --- a/clients/alpha/docs/TickerResponse.md +++ b/clients/alpha/docs/TickerResponse.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **String** | | [optional] | -|**message** | **String** | | [optional] | -|**messageDetail** | **String** | | [optional] | +|**code** | **String** | API response code. \"000000\" indicates success. | [optional] | +|**message** | **String** | Response message. | [optional] | +|**messageDetail** | **String** | Detailed response message. | [optional] | |**data** | [**TickerResponseData**](TickerResponseData.md) | | [optional] | -|**success** | **Boolean** | | [optional] | +|**success** | **Boolean** | Whether request is successful. | [optional] | diff --git a/clients/alpha/docs/TickerResponseData.md b/clients/alpha/docs/TickerResponseData.md index 3dc6688b3..c65df64f5 100644 --- a/clients/alpha/docs/TickerResponseData.md +++ b/clients/alpha/docs/TickerResponseData.md @@ -2,27 +2,28 @@ # TickerResponseData +24-hour rolling window ticker statistics. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**priceChange** | **String** | | [optional] | -|**priceChangePercent** | **String** | | [optional] | -|**weightedAvgPrice** | **String** | | [optional] | -|**lastPrice** | **String** | | [optional] | -|**lastQty** | **String** | | [optional] | -|**openPrice** | **String** | | [optional] | -|**highPrice** | **String** | | [optional] | -|**lowPrice** | **String** | | [optional] | -|**volume** | **String** | | [optional] | -|**quoteVolume** | **String** | | [optional] | -|**openTime** | **Long** | | [optional] | -|**closeTime** | **Long** | | [optional] | -|**firstId** | **Long** | | [optional] | -|**lastId** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**symbol** | **String** | Trading pair symbol. | [optional] | +|**priceChange** | **String** | Absolute price change in the 24h window. | [optional] | +|**priceChangePercent** | **String** | Percentage price change in the 24h window. | [optional] | +|**weightedAvgPrice** | **String** | Weighted average price in the 24h window. | [optional] | +|**lastPrice** | **String** | Latest traded price. | [optional] | +|**lastQty** | **String** | Quantity of the latest trade. | [optional] | +|**openPrice** | **String** | Opening price of the 24h window. | [optional] | +|**highPrice** | **String** | Highest price in the 24h window. | [optional] | +|**lowPrice** | **String** | Lowest price in the 24h window. | [optional] | +|**volume** | **String** | Base asset volume in the 24h window. | [optional] | +|**quoteVolume** | **String** | Quote asset volume in the 24h window. | [optional] | +|**openTime** | **Long** | Start time of the 24h window (milliseconds). | [optional] | +|**closeTime** | **Long** | End time of the 24h window (milliseconds). | [optional] | +|**firstId** | **Long** | First trade ID in the 24h window. | [optional] | +|**lastId** | **Long** | Last trade ID in the 24h window. | [optional] | +|**count** | **Long** | Total number of trades in the 24h window. | [optional] | diff --git a/clients/alpha/docs/TickerStreamRequest.md b/clients/alpha/docs/TickerStreamRequest.md new file mode 100644 index 000000000..00b8ac584 --- /dev/null +++ b/clients/alpha/docs/TickerStreamRequest.md @@ -0,0 +1,14 @@ + + +# TickerStreamRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to subscribe, in lowercase stream format. | [optional] | + + + diff --git a/clients/alpha/docs/TickerStreamResponse.md b/clients/alpha/docs/TickerStreamResponse.md new file mode 100644 index 000000000..37e45281f --- /dev/null +++ b/clients/alpha/docs/TickerStreamResponse.md @@ -0,0 +1,30 @@ + + +# TickerStreamResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eLowerCase** | **String** | eventType | [optional] | +|**E** | **Long** | eventTime | [optional] | +|**sLowerCase** | **String** | symbol | [optional] | +|**pLowerCase** | **String** | priceChange | [optional] | +|**P** | **String** | priceChangePercent | [optional] | +|**wLowerCase** | **String** | averagePrice | [optional] | +|**cLowerCase** | **String** | closePrice | [optional] | +|**Q** | **String** | lastTradeVolume | [optional] | +|**oLowerCase** | **String** | openPrice | [optional] | +|**hLowerCase** | **String** | highPrice | [optional] | +|**lLowerCase** | **String** | lowPrice | [optional] | +|**vLowerCase** | **String** | volume | [optional] | +|**qLowerCase** | **String** | quoteVolume | [optional] | +|**O** | **Long** | startTime | [optional] | +|**C** | **Long** | endTime | [optional] | +|**F** | **Long** | firstTradeId | [optional] | +|**L** | **Long** | lastTradeId | [optional] | +|**nLowerCase** | **Long** | tradeNum | [optional] | + + + diff --git a/clients/alpha/docs/TokenListResponse.md b/clients/alpha/docs/TokenListResponse.md index e79071c31..ac9d305b7 100644 --- a/clients/alpha/docs/TokenListResponse.md +++ b/clients/alpha/docs/TokenListResponse.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **String** | | [optional] | -|**message** | **String** | | [optional] | -|**messageDetail** | **String** | | [optional] | -|**success** | **Boolean** | | [optional] | -|**data** | [**List<TokenListResponseDataInner>**](TokenListResponseDataInner.md) | | [optional] | +|**code** | **String** | API response code. \"000000\" indicates success. | [optional] | +|**message** | **String** | Response message. | [optional] | +|**messageDetail** | **String** | Detailed response message. | [optional] | +|**success** | **Boolean** | Whether request is successful. | [optional] | +|**data** | [**List<TokenListResponseDataInner>**](TokenListResponseDataInner.md) | List of ALPHA tokens and metadata. | [optional] | diff --git a/clients/alpha/docs/TokenListResponseDataInner.md b/clients/alpha/docs/TokenListResponseDataInner.md index c19b44261..27b51b255 100644 --- a/clients/alpha/docs/TokenListResponseDataInner.md +++ b/clients/alpha/docs/TokenListResponseDataInner.md @@ -7,17 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tokenId** | **String** | | [optional] | -|**chainId** | **String** | | [optional] | -|**chainIconUrl** | **String** | | [optional] | -|**chainName** | **String** | | [optional] | -|**contractAddress** | **String** | | [optional] | -|**name** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**iconUrl** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**percentChange24h** | **String** | | [optional] | -|**volume24h** | **String** | | [optional] | +|**tokenId** | **String** | Unique token identifier. | [optional] | +|**chainId** | **String** | Chain ID. | [optional] | +|**chainIconUrl** | **String** | Chain icon URL. | [optional] | +|**chainName** | **String** | Chain name. | [optional] | +|**contractAddress** | **String** | Token contract address. | [optional] | +|**name** | **String** | Token name. | [optional] | +|**symbol** | **String** | Token symbol. | [optional] | +|**iconUrl** | **String** | Token icon URL. | [optional] | +|**price** | **String** | Latest token price. | [optional] | +|**percentChange24h** | **String** | 24-hour price change percentage. | [optional] | +|**volume24h** | **String** | 24-hour trading volume. | [optional] | |**marketCap** | **String** | | [optional] | |**fdv** | **String** | | [optional] | |**liquidity** | **String** | | [optional] | @@ -32,7 +32,7 @@ |**denomination** | **Long** | | [optional] | |**offline** | **Boolean** | | [optional] | |**tradeDecimal** | **Long** | | [optional] | -|**alphaId** | **String** | | [optional] | +|**alphaId** | **String** | ALPHA token ID, e.g. ALPHA_175. | [optional] | |**offsell** | **Boolean** | | [optional] | |**priceHigh24h** | **String** | | [optional] | |**priceLow24h** | **String** | | [optional] | diff --git a/clients/alpha/docs/TradeStreamRequest.md b/clients/alpha/docs/TradeStreamRequest.md new file mode 100644 index 000000000..553b9b192 --- /dev/null +++ b/clients/alpha/docs/TradeStreamRequest.md @@ -0,0 +1,14 @@ + + +# TradeStreamRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to subscribe, in lowercase stream format. | [optional] | + + + diff --git a/clients/alpha/docs/TradeStreamResponse.md b/clients/alpha/docs/TradeStreamResponse.md new file mode 100644 index 000000000..d3c3634e5 --- /dev/null +++ b/clients/alpha/docs/TradeStreamResponse.md @@ -0,0 +1,20 @@ + + +# TradeStreamResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eLowerCase** | **String** | eventType | [optional] | +|**E** | **Long** | eventTime | [optional] | +|**T** | **Long** | tradeTime | [optional] | +|**sLowerCase** | **String** | symbol | [optional] | +|**tLowerCase** | **Long** | tradeId | [optional] | +|**pLowerCase** | **String** | fillPrice | [optional] | +|**qLowerCase** | **String** | fillQty | [optional] | +|**mLowerCase** | **Boolean** | isBuyerMaker | [optional] | + + + diff --git a/clients/alpha/docs/rest-api/migration-guide.md b/clients/alpha/docs/rest-api/migration-guide.md index a6e01542e..74245ce49 100644 --- a/clients/alpha/docs/rest-api/migration-guide.md +++ b/clients/alpha/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-alpha - 1.0.0 + 2.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-alpha - 1.0.0 + 2.0.0 ``` diff --git a/clients/alpha/example_rest.md b/clients/alpha/example_rest.md index 9b33e4d80..44db3e4b1 100644 --- a/clients/alpha/example_rest.md +++ b/clients/alpha/example_rest.md @@ -1,12 +1,14 @@ ## MarketData -[GET /bapi/defi/v1/public/alpha-trade/agg-trades](https://developers.binance.com/docs/alpha/market-data/rest-api/Aggregated-Trades) - aggregatedTrades - [AggregatedTradesExample.java:47](/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/AggregatedTradesExample.java#L47) +[GET /bapi/defi/v1/public/alpha-trade/agg-trades](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#aggregated-trades) - aggregatedTrades - [AggregatedTradesExample.java:36](/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/AggregatedTradesExample.java#L36) -[GET /bapi/defi/v1/public/alpha-trade/get-exchange-info](https://developers.binance.com/docs/alpha/market-data/rest-api/Get-Exchange-Info) - getExchangeInfo - [GetExchangeInfoExample.java:47](/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/GetExchangeInfoExample.java#L47) +[GET /bapi/defi/v1/public/alpha-trade/fullDepth](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#full-depth) - fullDepth - [FullDepthExample.java:37](/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/FullDepthExample.java#L37) -[GET /bapi/defi/v1/public/alpha-trade/klines](https://developers.binance.com/docs/alpha/market-data/rest-api/Klines) - klines - [KlinesExample.java:47](/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/KlinesExample.java#L47) +[GET /bapi/defi/v1/public/alpha-trade/get-exchange-info](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#get-exchange-info) - getExchangeInfo - [GetExchangeInfoExample.java:36](/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/GetExchangeInfoExample.java#L36) -[GET /bapi/defi/v1/public/alpha-trade/ticker](https://developers.binance.com/docs/alpha/market-data/rest-api/24hr-ticker-price-change) - ticker - [TickerExample.java:47](/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/TickerExample.java#L47) +[GET /bapi/defi/v1/public/alpha-trade/klines](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#klines) - klines - [KlinesExample.java:37](/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/KlinesExample.java#L37) -[GET /bapi/defi/v1/public/wallet-direct/buw/wallet/cex/alpha/all/token/list](https://developers.binance.com/docs/alpha/market-data/rest-api/Token-List) - tokenList - [TokenListExample.java:47](/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/TokenListExample.java#L47) +[GET /bapi/defi/v1/public/alpha-trade/ticker](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#ticker) - ticker - [TickerExample.java:36](/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/TickerExample.java#L36) + +[GET /bapi/defi/v1/public/wallet-direct/buw/wallet/cex/alpha/all/token/list](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#token-list) - tokenList - [TokenListExample.java:36](/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/TokenListExample.java#L36) diff --git a/clients/alpha/example_websocket_stream.md b/clients/alpha/example_websocket_stream.md new file mode 100644 index 000000000..7c3f149bc --- /dev/null +++ b/clients/alpha/example_websocket_stream.md @@ -0,0 +1,28 @@ +## Default + +[@aggTrade](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#aggregate-trade-stream) - aggregateTradeStream - [AggregateTradeStreamExample.java:31](/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AggregateTradeStreamExample.java#L31) + +[!bookTicker](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#all-book-ticker-stream) - allBookTickerStream - [AllBookTickerStreamExample.java:31](/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AllBookTickerStreamExample.java#L31) + +[!miniTicker@arr](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#all-mini-ticker-stream) - allMiniTickerStream - [AllMiniTickerStreamExample.java:31](/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AllMiniTickerStreamExample.java#L31) + +[!ticker@arr](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#all-ticker-stream) - allTickerStream - [AllTickerStreamExample.java:31](/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AllTickerStreamExample.java#L31) + +[came@allTokens@ticker24](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#all-tokens24h-ticker-stream) - allTokens24hTickerStream - [AllTokens24hTickerStreamExample.java:31](/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AllTokens24hTickerStreamExample.java#L31) + +[@bookTicker](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#book-ticker-stream) - bookTickerStream - [BookTickerStreamExample.java:31](/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/BookTickerStreamExample.java#L31) + +[came@@@kline_](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#contract-kline-stream) - contractKlineStream - [ContractKlineStreamExample.java:31](/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/ContractKlineStreamExample.java#L31) + +[@fulldepth@](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#full-depth-stream) - fullDepthStream - [FullDepthStreamExample.java:31](/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/FullDepthStreamExample.java#L31) + +[@kline_](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#kline-stream) - klineStream - [KlineStreamExample.java:31](/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/KlineStreamExample.java#L31) + +[@miniTicker](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#mini-ticker-stream) - miniTickerStream - [MiniTickerStreamExample.java:31](/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/MiniTickerStreamExample.java#L31) + +[@depth@](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#partial-depth-stream) - partialDepthStream - [PartialDepthStreamExample.java:31](/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/PartialDepthStreamExample.java#L31) + +[@ticker](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#ticker-stream) - tickerStream - [TickerStreamExample.java:31](/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/TickerStreamExample.java#L31) + +[@trade](https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#trade-stream) - tradeStream - [TradeStreamExample.java:31](/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/TradeStreamExample.java#L31) + diff --git a/clients/alpha/pom.xml b/clients/alpha/pom.xml index 28e3b85cd..4836e7e6c 100644 --- a/clients/alpha/pom.xml +++ b/clients/alpha/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-alpha alpha - 1.0.1 + 2.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/JSON.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/JSON.java index dfb0750b9..6ec7163af 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/JSON.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Alpha REST API - * OpenAPI Specification for the Binance Alpha REST API + * Alpha Trading REST API + * APIs for Binance Alpha Trading. * * The version of the OpenAPI document: 1.0.0 * @@ -114,6 +114,12 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.alpha.rest.model.AggregatedTradesResponseDataInner .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.rest.model.FullDepthResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.rest.model.FullDepthResponseData + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.alpha.rest.model.GetExchangeInfoResponse .CustomTypeAdapterFactory()); @@ -134,10 +140,7 @@ private static Class getClassByDiscriminator( new com.binance.connector.client.alpha.rest.model.KlinesResponse .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.alpha.rest.model.KlinesResponseDataItem - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.alpha.rest.model.KlinesResponseDataItemInner + new com.binance.connector.client.alpha.rest.model.KlinesResponseDataInnerInner .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.alpha.rest.model.TickerResponse diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/api/AlphaRestApi.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/api/AlphaRestApi.java index 218e2c46d..12bd86703 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/api/AlphaRestApi.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/api/AlphaRestApi.java @@ -2,8 +2,11 @@ import com.binance.connector.client.alpha.rest.AlphaRestApiUtil; import com.binance.connector.client.alpha.rest.model.AggregatedTradesResponse; +import com.binance.connector.client.alpha.rest.model.FullDepthResponse; import com.binance.connector.client.alpha.rest.model.GetExchangeInfoResponse; +import com.binance.connector.client.alpha.rest.model.Interval; import com.binance.connector.client.alpha.rest.model.KlinesResponse; +import com.binance.connector.client.alpha.rest.model.Limit; import com.binance.connector.client.alpha.rest.model.TickerResponse; import com.binance.connector.client.alpha.rest.model.TokenListResponse; import com.binance.connector.client.common.ApiClient; @@ -25,13 +28,14 @@ public AlphaRestApi(ApiClient apiClient) { /** * Aggregated Trades Retrieves compressed, aggregated historical trades for a specific symbol. - * Useful for recent trade history. Weight: 0 + * Useful for recent trade history. * - * @param symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List (required) - * @param fromId starting trade ID to fetch from (optional) - * @param startTime start timestamp (milliseconds) (optional) - * @param endTime end timestamp (milliseconds) (optional) - * @param limit number of results to return (default 500, max 1000) (optional) + * @param symbol Trading pair symbol, e.g. ALPHA_118USDC (use token ID from Token List). + * (required) + * @param fromId Starting aggregate trade ID to fetch from. (optional) + * @param startTime Start timestamp in milliseconds. (optional) + * @param endTime End timestamp in milliseconds. (optional) + * @param limit Number of results to return. (optional) * @return ApiResponse<AggregatedTradesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -43,7 +47,7 @@ public AlphaRestApi(ApiClient apiClient) { * * * @see Aggregated + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#aggregated-trades">Aggregated * Trades Documentation */ public ApiResponse aggregatedTrades( @@ -52,9 +56,36 @@ public ApiResponse aggregatedTrades( return marketDataApi.aggregatedTrades(symbol, fromId, startTime, endTime, limit); } + /** + * Full Depth Fetches the full order book depth (UI & API orders) for a symbol, including + * bid and ask orders with their prices and quantities. + * + * @param symbol Trading pair symbol, e.g. ALPHA_175USDT (use token ID from Token List). + * (required) + * @param limit Number of price levels to return. Valid values: 5, 10, 20, 50, 100, 500, 1000. + * (optional, default to 500) + * @return ApiResponse<FullDepthResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Full Depth -
+ * + * @see Full + * Depth Documentation + */ + public ApiResponse fullDepth(String symbol, Limit limit) + throws ApiException { + return marketDataApi.fullDepth(symbol, limit); + } + /** * Get Exchange Info Fetches general exchange information, such as supported symbols, rate - * limits, and server time. Weight: 0 + * limits, and server time. * * @return ApiResponse<GetExchangeInfoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -67,7 +98,7 @@ public ApiResponse aggregatedTrades( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#get-exchange-info">Get * Exchange Info Documentation */ public ApiResponse getExchangeInfo() throws ApiException { @@ -75,16 +106,15 @@ public ApiResponse getExchangeInfo() throws ApiExceptio } /** - * Klines (Candlestick Data) Fetches Kline/candlestick bars for a symbol, which include - * open/high/low/close prices and volume over intervals. Useful for charting and analysis. - * Weight: 0 + * Klines Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices + * and volume over intervals. Useful for charting and analysis. * - * @param symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List (required) - * @param interval e.g., \"1h\" – supported intervals: 1s, 15s, 1m, 3m, 5m, 15m, 30m, - * 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M (required) - * @param limit number of results to return (default 500, max 1000) (optional) - * @param startTime start timestamp (milliseconds) (optional) - * @param endTime end timestamp (milliseconds) (optional) + * @param symbol Trading pair symbol, e.g. ALPHA_175USDT (use token ID from Token List). + * (required) + * @param interval Kline interval. (required) + * @param limit Number of klines to return. (optional) + * @param startTime Start timestamp in milliseconds. (optional) + * @param endTime End timestamp in milliseconds. (optional) * @return ApiResponse<KlinesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -95,20 +125,22 @@ public ApiResponse getExchangeInfo() throws ApiExceptio * 200 Klines - * * - * @see Klines - * (Candlestick Data) Documentation + * @see Klines + * Documentation */ public ApiResponse klines( - String symbol, String interval, Long limit, Long startTime, Long endTime) + String symbol, Interval interval, Long limit, Long startTime, Long endTime) throws ApiException { return marketDataApi.klines(symbol, interval, limit, startTime, endTime); } /** - * Ticker (24hr Price Statistics) Gets the 24-hour rolling window price change statistics for a - * symbol, including volume and price changes. Weight: 0 + * Ticker Gets the 24-hour rolling window price change statistics for a symbol, including volume + * and price changes. * - * @param symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List (required) + * @param symbol Trading pair symbol, e.g. ALPHA_175USDT (use token ID from Token List). + * (required) * @return ApiResponse<TickerResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -120,8 +152,8 @@ public ApiResponse klines( * * * @see Ticker - * (24hr Price Statistics) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#ticker">Ticker + * Documentation */ public ApiResponse ticker(String symbol) throws ApiException { return marketDataApi.ticker(symbol); @@ -129,7 +161,7 @@ public ApiResponse ticker(String symbol) throws ApiException { /** * Token List Retrieves a list of all available ALPHA tokens, including their IDs and symbols. - * Use this to find the token ID for constructing symbols in other endpoints. Weight: 0 + * Use this to find the token ID for constructing symbols in other endpoints. * * @return ApiResponse<TokenListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -142,7 +174,7 @@ public ApiResponse ticker(String symbol) throws ApiException { * * * @see Token + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#token-list">Token * List Documentation */ public ApiResponse tokenList() throws ApiException { diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/api/MarketDataApi.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/api/MarketDataApi.java index 2d65c8e74..d7f0a8ea8 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/api/MarketDataApi.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/api/MarketDataApi.java @@ -1,6 +1,6 @@ /* - * Binance Alpha REST API - * OpenAPI Specification for the Binance Alpha REST API + * Alpha Trading REST API + * APIs for Binance Alpha Trading. * * The version of the OpenAPI document: 1.0.0 * @@ -13,8 +13,11 @@ package com.binance.connector.client.alpha.rest.api; import com.binance.connector.client.alpha.rest.model.AggregatedTradesResponse; +import com.binance.connector.client.alpha.rest.model.FullDepthResponse; import com.binance.connector.client.alpha.rest.model.GetExchangeInfoResponse; +import com.binance.connector.client.alpha.rest.model.Interval; import com.binance.connector.client.alpha.rest.model.KlinesResponse; +import com.binance.connector.client.alpha.rest.model.Limit; import com.binance.connector.client.alpha.rest.model.TickerResponse; import com.binance.connector.client.alpha.rest.model.TokenListResponse; import com.binance.connector.client.common.ApiClient; @@ -46,7 +49,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-alpha/1.0.0 (Java/%s; %s; %s)", + "binance-alpha/2.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -86,11 +89,12 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for aggregatedTrades * - * @param symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List (required) - * @param fromId starting trade ID to fetch from (optional) - * @param startTime start timestamp (milliseconds) (optional) - * @param endTime end timestamp (milliseconds) (optional) - * @param limit number of results to return (default 500, max 1000) (optional) + * @param symbol Trading pair symbol, e.g. ALPHA_118USDC (use token ID from Token List). + * (required) + * @param fromId Starting aggregate trade ID to fetch from. (optional) + * @param startTime Start timestamp in milliseconds. (optional) + * @param endTime End timestamp in milliseconds. (optional) + * @param limit Number of results to return. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -101,7 +105,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Aggregated + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#aggregated-trades">Aggregated * Trades Documentation */ private okhttp3.Call aggregatedTradesCall( @@ -222,13 +226,14 @@ private okhttp3.Call aggregatedTradesValidateBeforeCall( /** * Aggregated Trades Retrieves compressed, aggregated historical trades for a specific symbol. - * Useful for recent trade history. Weight: 0 + * Useful for recent trade history. * - * @param symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List (required) - * @param fromId starting trade ID to fetch from (optional) - * @param startTime start timestamp (milliseconds) (optional) - * @param endTime end timestamp (milliseconds) (optional) - * @param limit number of results to return (default 500, max 1000) (optional) + * @param symbol Trading pair symbol, e.g. ALPHA_118USDC (use token ID from Token List). + * (required) + * @param fromId Starting aggregate trade ID to fetch from. (optional) + * @param startTime Start timestamp in milliseconds. (optional) + * @param endTime End timestamp in milliseconds. (optional) + * @param limit Number of results to return. (optional) * @return ApiResponse<AggregatedTradesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -240,11 +245,15 @@ private okhttp3.Call aggregatedTradesValidateBeforeCall( * * * @see Aggregated + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#aggregated-trades">Aggregated * Trades Documentation */ public ApiResponse aggregatedTrades( - @NotNull String symbol, Long fromId, Long startTime, Long endTime, Long limit) + @NotNull String symbol, + Long fromId, + Long startTime, + Long endTime, + @Max(1000L) Long limit) throws ApiException { okhttp3.Call localVarCall = aggregatedTradesValidateBeforeCall(symbol, fromId, startTime, endTime, limit); @@ -253,6 +262,148 @@ public ApiResponse aggregatedTrades( return localVarApiClient.execute(localVarCall, localVarReturnType); } + /** + * Build call for fullDepth + * + * @param symbol Trading pair symbol, e.g. ALPHA_175USDT (use token ID from Token List). + * (required) + * @param limit Number of price levels to return. Valid values: 5, 10, 20, 50, 100, 500, 1000. + * (optional, default to 500) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Full Depth -
+ * + * @see Full + * Depth Documentation + */ + private okhttp3.Call fullDepthCall(String symbol, Limit limit) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/bapi/defi/v1/public/alpha-trade/fullDepth"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (symbol != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("symbol", symbol)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fullDepthValidateBeforeCall(String symbol, Limit limit) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {symbol, limit}; + Method method = this.getClass().getMethod("fullDepth", String.class, Limit.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return fullDepthCall(symbol, limit); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Full Depth Fetches the full order book depth (UI & API orders) for a symbol, including + * bid and ask orders with their prices and quantities. + * + * @param symbol Trading pair symbol, e.g. ALPHA_175USDT (use token ID from Token List). + * (required) + * @param limit Number of price levels to return. Valid values: 5, 10, 20, 50, 100, 500, 1000. + * (optional, default to 500) + * @return ApiResponse<FullDepthResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Full Depth -
+ * + * @see Full + * Depth Documentation + */ + public ApiResponse fullDepth(@NotNull String symbol, Limit limit) + throws ApiException { + okhttp3.Call localVarCall = fullDepthValidateBeforeCall(symbol, limit); + java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + /** * Build call for getExchangeInfo * @@ -266,7 +417,7 @@ public ApiResponse aggregatedTrades( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#get-exchange-info">Get * Exchange Info Documentation */ private okhttp3.Call getExchangeInfoCall() throws ApiException { @@ -355,7 +506,7 @@ private okhttp3.Call getExchangeInfoValidateBeforeCall() throws ApiException { /** * Get Exchange Info Fetches general exchange information, such as supported symbols, rate - * limits, and server time. Weight: 0 + * limits, and server time. * * @return ApiResponse<GetExchangeInfoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -368,7 +519,7 @@ private okhttp3.Call getExchangeInfoValidateBeforeCall() throws ApiException { * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#get-exchange-info">Get * Exchange Info Documentation */ public ApiResponse getExchangeInfo() throws ApiException { @@ -381,12 +532,12 @@ public ApiResponse getExchangeInfo() throws ApiExceptio /** * Build call for klines * - * @param symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List (required) - * @param interval e.g., \"1h\" – supported intervals: 1s, 15s, 1m, 3m, 5m, 15m, 30m, - * 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M (required) - * @param limit number of results to return (default 500, max 1000) (optional) - * @param startTime start timestamp (milliseconds) (optional) - * @param endTime end timestamp (milliseconds) (optional) + * @param symbol Trading pair symbol, e.g. ALPHA_175USDT (use token ID from Token List). + * (required) + * @param interval Kline interval. (required) + * @param limit Number of klines to return. (optional) + * @param startTime Start timestamp in milliseconds. (optional) + * @param endTime End timestamp in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -396,11 +547,12 @@ public ApiResponse getExchangeInfo() throws ApiExceptio * 200 Klines - * * - * @see Klines - * (Candlestick Data) Documentation + * @see Klines + * Documentation */ private okhttp3.Call klinesCall( - String symbol, String interval, Long limit, Long startTime, Long endTime) + String symbol, Interval interval, Long limit, Long startTime, Long endTime) throws ApiException { String basePath = null; // Operation Servers @@ -477,7 +629,7 @@ private okhttp3.Call klinesCall( @SuppressWarnings("rawtypes") private okhttp3.Call klinesValidateBeforeCall( - String symbol, String interval, Long limit, Long startTime, Long endTime) + String symbol, Interval interval, Long limit, Long startTime, Long endTime) throws ApiException { try { Validator validator = @@ -494,7 +646,7 @@ private okhttp3.Call klinesValidateBeforeCall( .getMethod( "klines", String.class, - String.class, + Interval.class, Long.class, Long.class, Long.class); @@ -516,16 +668,15 @@ private okhttp3.Call klinesValidateBeforeCall( } /** - * Klines (Candlestick Data) Fetches Kline/candlestick bars for a symbol, which include - * open/high/low/close prices and volume over intervals. Useful for charting and analysis. - * Weight: 0 + * Klines Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices + * and volume over intervals. Useful for charting and analysis. * - * @param symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List (required) - * @param interval e.g., \"1h\" – supported intervals: 1s, 15s, 1m, 3m, 5m, 15m, 30m, - * 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M (required) - * @param limit number of results to return (default 500, max 1000) (optional) - * @param startTime start timestamp (milliseconds) (optional) - * @param endTime end timestamp (milliseconds) (optional) + * @param symbol Trading pair symbol, e.g. ALPHA_175USDT (use token ID from Token List). + * (required) + * @param interval Kline interval. (required) + * @param limit Number of klines to return. (optional) + * @param startTime Start timestamp in milliseconds. (optional) + * @param endTime End timestamp in milliseconds. (optional) * @return ApiResponse<KlinesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -536,13 +687,14 @@ private okhttp3.Call klinesValidateBeforeCall( * 200 Klines - * * - * @see Klines - * (Candlestick Data) Documentation + * @see Klines + * Documentation */ public ApiResponse klines( @NotNull String symbol, - @NotNull String interval, - Long limit, + @NotNull Interval interval, + @Max(1500L) Long limit, Long startTime, Long endTime) throws ApiException { @@ -555,7 +707,8 @@ public ApiResponse klines( /** * Build call for ticker * - * @param symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List (required) + * @param symbol Trading pair symbol, e.g. ALPHA_175USDT (use token ID from Token List). + * (required) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -566,8 +719,8 @@ public ApiResponse klines( * * * @see Ticker - * (24hr Price Statistics) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#ticker">Ticker + * Documentation */ private okhttp3.Call tickerCall(String symbol) throws ApiException { String basePath = null; @@ -658,10 +811,11 @@ private okhttp3.Call tickerValidateBeforeCall(String symbol) throws ApiException } /** - * Ticker (24hr Price Statistics) Gets the 24-hour rolling window price change statistics for a - * symbol, including volume and price changes. Weight: 0 + * Ticker Gets the 24-hour rolling window price change statistics for a symbol, including volume + * and price changes. * - * @param symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List (required) + * @param symbol Trading pair symbol, e.g. ALPHA_175USDT (use token ID from Token List). + * (required) * @return ApiResponse<TickerResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -673,8 +827,8 @@ private okhttp3.Call tickerValidateBeforeCall(String symbol) throws ApiException * * * @see Ticker - * (24hr Price Statistics) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#ticker">Ticker + * Documentation */ public ApiResponse ticker(@NotNull String symbol) throws ApiException { okhttp3.Call localVarCall = tickerValidateBeforeCall(symbol); @@ -695,7 +849,7 @@ public ApiResponse ticker(@NotNull String symbol) throws ApiExce * * * @see Token + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#token-list">Token * List Documentation */ private okhttp3.Call tokenListCall() throws ApiException { @@ -785,7 +939,7 @@ private okhttp3.Call tokenListValidateBeforeCall() throws ApiException { /** * Token List Retrieves a list of all available ALPHA tokens, including their IDs and symbols. - * Use this to find the token ID for constructing symbols in other endpoints. Weight: 0 + * Use this to find the token ID for constructing symbols in other endpoints. * * @return ApiResponse<TokenListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -798,7 +952,7 @@ private okhttp3.Call tokenListValidateBeforeCall() throws ApiException { * * * @see Token + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/rest-api/market-data#token-list">Token * List Documentation */ public ApiResponse tokenList() throws ApiException { diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/AggregatedTradesResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/AggregatedTradesResponse.java index f76fd530c..1dc221d99 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/AggregatedTradesResponse.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/AggregatedTradesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Alpha REST API - * OpenAPI Specification for the Binance Alpha REST API + * Alpha Trading REST API + * APIs for Binance Alpha Trading. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** AggregatedTradesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AggregatedTradesResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -74,7 +74,7 @@ public AggregatedTradesResponse code(@jakarta.annotation.Nullable String code) { } /** - * Get code + * API response code. \"000000\" indicates success. * * @return code */ @@ -93,7 +93,7 @@ public AggregatedTradesResponse message(@jakarta.annotation.Nullable String mess } /** - * Get message + * Response message. * * @return message */ @@ -113,7 +113,7 @@ public AggregatedTradesResponse messageDetail( } /** - * Get messageDetail + * Detailed response message. * * @return messageDetail */ @@ -141,7 +141,7 @@ public AggregatedTradesResponse addDataItem(AggregatedTradesResponseDataInner da } /** - * Get data + * Array of aggregated trades. * * @return data */ diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/AggregatedTradesResponseDataInner.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/AggregatedTradesResponseDataInner.java index 37a133539..c185a953f 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/AggregatedTradesResponseDataInner.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/AggregatedTradesResponseDataInner.java @@ -1,6 +1,6 @@ /* - * Binance Alpha REST API - * OpenAPI Specification for the Binance Alpha REST API + * Alpha Trading REST API + * APIs for Binance Alpha Trading. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AggregatedTradesResponseDataInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AggregatedTradesResponseDataInner { public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; @@ -87,7 +87,7 @@ public AggregatedTradesResponseDataInner aLowerCase( } /** - * Get aLowerCase + * Aggregate trade ID. * * @return aLowerCase */ @@ -107,7 +107,7 @@ public AggregatedTradesResponseDataInner pLowerCase( } /** - * Get pLowerCase + * Trade price. * * @return pLowerCase */ @@ -127,7 +127,7 @@ public AggregatedTradesResponseDataInner qLowerCase( } /** - * Get qLowerCase + * Trade quantity. * * @return qLowerCase */ @@ -147,7 +147,7 @@ public AggregatedTradesResponseDataInner fLowerCase( } /** - * Get fLowerCase + * First trade ID in the aggregation. * * @return fLowerCase */ @@ -167,7 +167,7 @@ public AggregatedTradesResponseDataInner lLowerCase( } /** - * Get lLowerCase + * Last trade ID in the aggregation. * * @return lLowerCase */ @@ -186,7 +186,7 @@ public AggregatedTradesResponseDataInner T(@jakarta.annotation.Nullable Long T) } /** - * Get T + * Trade timestamp in milliseconds. * * @return T */ @@ -206,7 +206,7 @@ public AggregatedTradesResponseDataInner mLowerCase( } /** - * Get mLowerCase + * Whether buyer is the market maker (deprecated). * * @return mLowerCase */ diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/FullDepthResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/FullDepthResponse.java new file mode 100644 index 000000000..3e0a72437 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/FullDepthResponse.java @@ -0,0 +1,360 @@ +/* + * Alpha Trading REST API + * APIs for Binance Alpha Trading. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.rest.model; + +import com.binance.connector.client.alpha.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** FullDepthResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class FullDepthResponse { + public static final String SERIALIZED_NAME_CODE = "code"; + + @SerializedName(SERIALIZED_NAME_CODE) + @jakarta.annotation.Nullable + private String code; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + + @SerializedName(SERIALIZED_NAME_MESSAGE) + @jakarta.annotation.Nullable + private String message; + + public static final String SERIALIZED_NAME_MESSAGE_DETAIL = "messageDetail"; + + @SerializedName(SERIALIZED_NAME_MESSAGE_DETAIL) + @jakarta.annotation.Nullable + private String messageDetail; + + public static final String SERIALIZED_NAME_SUCCESS = "success"; + + @SerializedName(SERIALIZED_NAME_SUCCESS) + @jakarta.annotation.Nullable + private Boolean success; + + public static final String SERIALIZED_NAME_DATA = "data"; + + @SerializedName(SERIALIZED_NAME_DATA) + @jakarta.annotation.Nullable + private FullDepthResponseData data; + + public FullDepthResponse() {} + + public FullDepthResponse code(@jakarta.annotation.Nullable String code) { + this.code = code; + return this; + } + + /** + * API response code. \"000000\" indicates success. + * + * @return code + */ + @jakarta.annotation.Nullable + public String getCode() { + return code; + } + + public void setCode(@jakarta.annotation.Nullable String code) { + this.code = code; + } + + public FullDepthResponse message(@jakarta.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * Response message. + * + * @return message + */ + @jakarta.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(@jakarta.annotation.Nullable String message) { + this.message = message; + } + + public FullDepthResponse messageDetail(@jakarta.annotation.Nullable String messageDetail) { + this.messageDetail = messageDetail; + return this; + } + + /** + * Detailed response message. + * + * @return messageDetail + */ + @jakarta.annotation.Nullable + public String getMessageDetail() { + return messageDetail; + } + + public void setMessageDetail(@jakarta.annotation.Nullable String messageDetail) { + this.messageDetail = messageDetail; + } + + public FullDepthResponse success(@jakarta.annotation.Nullable Boolean success) { + this.success = success; + return this; + } + + /** + * Whether request is successful. + * + * @return success + */ + @jakarta.annotation.Nullable + public Boolean getSuccess() { + return success; + } + + public void setSuccess(@jakarta.annotation.Nullable Boolean success) { + this.success = success; + } + + public FullDepthResponse data(@jakarta.annotation.Nullable FullDepthResponseData data) { + this.data = data; + return this; + } + + /** + * Get data + * + * @return data + */ + @jakarta.annotation.Nullable + @Valid + public FullDepthResponseData getData() { + return data; + } + + public void setData(@jakarta.annotation.Nullable FullDepthResponseData data) { + this.data = data; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FullDepthResponse fullDepthResponse = (FullDepthResponse) o; + return Objects.equals(this.code, fullDepthResponse.code) + && Objects.equals(this.message, fullDepthResponse.message) + && Objects.equals(this.messageDetail, fullDepthResponse.messageDetail) + && Objects.equals(this.success, fullDepthResponse.success) + && Objects.equals(this.data, fullDepthResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(code, message, messageDetail, success, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FullDepthResponse {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" messageDetail: ").append(toIndentedString(messageDetail)).append("\n"); + sb.append(" success: ").append(toIndentedString(success)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object codeValue = getCode(); + String codeValueAsString = ""; + codeValueAsString = codeValue.toString(); + sb.append("code=").append(urlEncode(codeValueAsString)).append(""); + Object messageValue = getMessage(); + String messageValueAsString = ""; + messageValueAsString = messageValue.toString(); + sb.append("message=").append(urlEncode(messageValueAsString)).append(""); + Object messageDetailValue = getMessageDetail(); + String messageDetailValueAsString = ""; + messageDetailValueAsString = messageDetailValue.toString(); + sb.append("messageDetail=").append(urlEncode(messageDetailValueAsString)).append(""); + Object successValue = getSuccess(); + String successValueAsString = ""; + successValueAsString = successValue.toString(); + sb.append("success=").append(urlEncode(successValueAsString)).append(""); + Object dataValue = getData(); + String dataValueAsString = ""; + dataValueAsString = dataValue.toString(); + sb.append("data=").append(urlEncode(dataValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("message"); + openapiFields.add("messageDetail"); + openapiFields.add("success"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FullDepthResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FullDepthResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FullDepthResponse is not found in the" + + " empty JSON string", + FullDepthResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) + && !jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `code` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("code").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) + && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `message` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("message").toString())); + } + if ((jsonObj.get("messageDetail") != null && !jsonObj.get("messageDetail").isJsonNull()) + && !jsonObj.get("messageDetail").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `messageDetail` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("messageDetail").toString())); + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + FullDepthResponseData.validateJsonElement(jsonObj.get("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FullDepthResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FullDepthResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(FullDepthResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FullDepthResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FullDepthResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of FullDepthResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of FullDepthResponse + * @throws IOException if the JSON string is invalid with respect to FullDepthResponse + */ + public static FullDepthResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FullDepthResponse.class); + } + + /** + * Convert an instance of FullDepthResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/FullDepthResponseData.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/FullDepthResponseData.java new file mode 100644 index 000000000..1f79ba815 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/FullDepthResponseData.java @@ -0,0 +1,419 @@ +/* + * Alpha Trading REST API + * APIs for Binance Alpha Trading. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.rest.model; + +import com.binance.connector.client.alpha.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** Order book data. */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class FullDepthResponseData { + public static final String SERIALIZED_NAME_LAST_UPDATE_ID = "lastUpdateId"; + + @SerializedName(SERIALIZED_NAME_LAST_UPDATE_ID) + @jakarta.annotation.Nullable + private Long lastUpdateId; + + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_BIDS = "bids"; + + @SerializedName(SERIALIZED_NAME_BIDS) + @jakarta.annotation.Nullable + private List> bids; + + public static final String SERIALIZED_NAME_ASKS = "asks"; + + @SerializedName(SERIALIZED_NAME_ASKS) + @jakarta.annotation.Nullable + private List> asks; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public FullDepthResponseData() {} + + public FullDepthResponseData lastUpdateId(@jakarta.annotation.Nullable Long lastUpdateId) { + this.lastUpdateId = lastUpdateId; + return this; + } + + /** + * Last order book update ID. + * + * @return lastUpdateId + */ + @jakarta.annotation.Nullable + public Long getLastUpdateId() { + return lastUpdateId; + } + + public void setLastUpdateId(@jakarta.annotation.Nullable Long lastUpdateId) { + this.lastUpdateId = lastUpdateId; + } + + public FullDepthResponseData symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Trading pair symbol. + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public FullDepthResponseData bids(@jakarta.annotation.Nullable List> bids) { + this.bids = bids; + return this; + } + + public FullDepthResponseData addBidsItem(List bidsItem) { + if (this.bids == null) { + this.bids = new ArrayList<>(); + } + this.bids.add(bidsItem); + return this; + } + + /** + * Bid orders. Each entry is [price, quantity]. + * + * @return bids + */ + @jakarta.annotation.Nullable + @Valid + public List> getBids() { + return bids; + } + + public void setBids(@jakarta.annotation.Nullable List> bids) { + this.bids = bids; + } + + public FullDepthResponseData asks(@jakarta.annotation.Nullable List> asks) { + this.asks = asks; + return this; + } + + public FullDepthResponseData addAsksItem(List asksItem) { + if (this.asks == null) { + this.asks = new ArrayList<>(); + } + this.asks.add(asksItem); + return this; + } + + /** + * Ask orders. Each entry is [price, quantity]. + * + * @return asks + */ + @jakarta.annotation.Nullable + @Valid + public List> getAsks() { + return asks; + } + + public void setAsks(@jakarta.annotation.Nullable List> asks) { + this.asks = asks; + } + + public FullDepthResponseData E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event time in milliseconds. + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public FullDepthResponseData T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * Transaction time in milliseconds. + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FullDepthResponseData fullDepthResponseData = (FullDepthResponseData) o; + return Objects.equals(this.lastUpdateId, fullDepthResponseData.lastUpdateId) + && Objects.equals(this.symbol, fullDepthResponseData.symbol) + && Objects.equals(this.bids, fullDepthResponseData.bids) + && Objects.equals(this.asks, fullDepthResponseData.asks) + && Objects.equals(this.E, fullDepthResponseData.E) + && Objects.equals(this.T, fullDepthResponseData.T); + } + + @Override + public int hashCode() { + return Objects.hash(lastUpdateId, symbol, bids, asks, E, T); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FullDepthResponseData {\n"); + sb.append(" lastUpdateId: ").append(toIndentedString(lastUpdateId)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" bids: ").append(toIndentedString(bids)).append("\n"); + sb.append(" asks: ").append(toIndentedString(asks)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object lastUpdateIdValue = getLastUpdateId(); + String lastUpdateIdValueAsString = ""; + lastUpdateIdValueAsString = lastUpdateIdValue.toString(); + sb.append("lastUpdateId=").append(urlEncode(lastUpdateIdValueAsString)).append(""); + Object symbolValue = getSymbol(); + String symbolValueAsString = ""; + symbolValueAsString = symbolValue.toString(); + sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); + Object bidsValue = getBids(); + String bidsValueAsString = ""; + bidsValueAsString = + (String) + ((Collection) bidsValue) + .stream().map(Object::toString).collect(Collectors.joining(",")); + sb.append("bids=").append(urlEncode(bidsValueAsString)).append(""); + Object asksValue = getAsks(); + String asksValueAsString = ""; + asksValueAsString = + (String) + ((Collection) asksValue) + .stream().map(Object::toString).collect(Collectors.joining(",")); + sb.append("asks=").append(urlEncode(asksValueAsString)).append(""); + Object EValue = getE(); + String EValueAsString = ""; + EValueAsString = EValue.toString(); + sb.append("E=").append(urlEncode(EValueAsString)).append(""); + Object TValue = getT(); + String TValueAsString = ""; + TValueAsString = TValue.toString(); + sb.append("T=").append(urlEncode(TValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("lastUpdateId"); + openapiFields.add("symbol"); + openapiFields.add("bids"); + openapiFields.add("asks"); + openapiFields.add("E"); + openapiFields.add("T"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FullDepthResponseData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FullDepthResponseData.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FullDepthResponseData is not found in" + + " the empty JSON string", + FullDepthResponseData.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("bids") != null + && !jsonObj.get("bids").isJsonNull() + && !jsonObj.get("bids").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `bids` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("bids").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("asks") != null + && !jsonObj.get("asks").isJsonNull() + && !jsonObj.get("asks").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `asks` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("asks").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FullDepthResponseData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FullDepthResponseData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(FullDepthResponseData.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FullDepthResponseData value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FullDepthResponseData read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of FullDepthResponseData given an JSON string + * + * @param jsonString JSON string + * @return An instance of FullDepthResponseData + * @throws IOException if the JSON string is invalid with respect to FullDepthResponseData + */ + public static FullDepthResponseData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FullDepthResponseData.class); + } + + /** + * Convert an instance of FullDepthResponseData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponse.java index 36d5ac880..de056de8a 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponse.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Alpha REST API - * OpenAPI Specification for the Binance Alpha REST API + * Alpha Trading REST API + * APIs for Binance Alpha Trading. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetExchangeInfoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetExchangeInfoResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -75,7 +75,7 @@ public GetExchangeInfoResponse code(@jakarta.annotation.Nullable String code) { } /** - * Get code + * API response code. \"000000\" indicates success. * * @return code */ @@ -94,7 +94,7 @@ public GetExchangeInfoResponse message(@jakarta.annotation.Nullable String messa } /** - * Get message + * Response message. * * @return message */ @@ -114,7 +114,7 @@ public GetExchangeInfoResponse messageDetail( } /** - * Get messageDetail + * Detailed response message. * * @return messageDetail */ @@ -133,7 +133,7 @@ public GetExchangeInfoResponse success(@jakarta.annotation.Nullable Boolean succ } /** - * Get success + * Whether request is successful. * * @return success */ diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponseData.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponseData.java index f5e004914..0e6c50e47 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponseData.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponseData.java @@ -1,6 +1,6 @@ /* - * Binance Alpha REST API - * OpenAPI Specification for the Binance Alpha REST API + * Alpha Trading REST API + * APIs for Binance Alpha Trading. * * The version of the OpenAPI document: 1.0.0 * @@ -37,10 +37,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** GetExchangeInfoResponseData */ +/** Exchange metadata, including assets and symbols. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetExchangeInfoResponseData { public static final String SERIALIZED_NAME_TIMEZONE = "timezone"; @@ -74,7 +74,7 @@ public GetExchangeInfoResponseData timezone(@jakarta.annotation.Nullable String } /** - * Get timezone + * Timezone of market data. * * @return timezone */ @@ -104,7 +104,7 @@ public GetExchangeInfoResponseData addAssetsItem( } /** - * Get assets + * Supported assets. * * @return assets */ @@ -137,7 +137,7 @@ public GetExchangeInfoResponseData addSymbolsItem( } /** - * Get symbols + * Supported trading symbols. * * @return symbols */ @@ -159,7 +159,7 @@ public GetExchangeInfoResponseData orderTypes(@jakarta.annotation.Nullable Strin } /** - * Get orderTypes + * Order types metadata returned by backend. * * @return orderTypes */ diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponseDataAssetsInner.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponseDataAssetsInner.java index b7dfe2e7e..010c6146e 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponseDataAssetsInner.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponseDataAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Alpha REST API - * OpenAPI Specification for the Binance Alpha REST API + * Alpha Trading REST API + * APIs for Binance Alpha Trading. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetExchangeInfoResponseDataAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetExchangeInfoResponseDataAssetsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -50,7 +50,7 @@ public GetExchangeInfoResponseDataAssetsInner asset(@jakarta.annotation.Nullable } /** - * Get asset + * Asset symbol. * * @return asset */ diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponseDataSymbolsInner.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponseDataSymbolsInner.java index 6072304e9..9b529fc50 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponseDataSymbolsInner.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponseDataSymbolsInner.java @@ -1,6 +1,6 @@ /* - * Binance Alpha REST API - * OpenAPI Specification for the Binance Alpha REST API + * Alpha Trading REST API + * APIs for Binance Alpha Trading. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetExchangeInfoResponseDataSymbolsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetExchangeInfoResponseDataSymbolsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -111,7 +111,7 @@ public GetExchangeInfoResponseDataSymbolsInner symbol( } /** - * Get symbol + * Trading symbol. * * @return symbol */ @@ -131,7 +131,7 @@ public GetExchangeInfoResponseDataSymbolsInner status( } /** - * Get status + * Trading status. * * @return status */ @@ -151,7 +151,7 @@ public GetExchangeInfoResponseDataSymbolsInner baseAsset( } /** - * Get baseAsset + * Base asset symbol. * * @return baseAsset */ @@ -171,7 +171,7 @@ public GetExchangeInfoResponseDataSymbolsInner quoteAsset( } /** - * Get quoteAsset + * Quote asset symbol. * * @return quoteAsset */ @@ -191,7 +191,7 @@ public GetExchangeInfoResponseDataSymbolsInner pricePrecision( } /** - * Get pricePrecision + * Allowed precision for price. * * @return pricePrecision */ @@ -211,7 +211,7 @@ public GetExchangeInfoResponseDataSymbolsInner quantityPrecision( } /** - * Get quantityPrecision + * Allowed precision for quantity. * * @return quantityPrecision */ @@ -231,7 +231,7 @@ public GetExchangeInfoResponseDataSymbolsInner baseAssetPrecision( } /** - * Get baseAssetPrecision + * Base asset precision. * * @return baseAssetPrecision */ @@ -251,7 +251,7 @@ public GetExchangeInfoResponseDataSymbolsInner quotePrecision( } /** - * Get quotePrecision + * Quote asset precision. * * @return quotePrecision */ @@ -281,7 +281,7 @@ public GetExchangeInfoResponseDataSymbolsInner addFiltersItem( } /** - * Get filters + * Trading filters and constraints. * * @return filters */ @@ -312,7 +312,7 @@ public GetExchangeInfoResponseDataSymbolsInner addOrderTypesItem(String orderTyp } /** - * Get orderTypes + * Supported order types for this symbol. * * @return orderTypes */ diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponseDataSymbolsInnerFiltersInner.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponseDataSymbolsInnerFiltersInner.java index 06fef0ce7..148e5b2bb 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponseDataSymbolsInnerFiltersInner.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/GetExchangeInfoResponseDataSymbolsInnerFiltersInner.java @@ -1,6 +1,6 @@ /* - * Binance Alpha REST API - * OpenAPI Specification for the Binance Alpha REST API + * Alpha Trading REST API + * APIs for Binance Alpha Trading. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetExchangeInfoResponseDataSymbolsInnerFiltersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetExchangeInfoResponseDataSymbolsInnerFiltersInner { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; @@ -141,7 +141,7 @@ public GetExchangeInfoResponseDataSymbolsInnerFiltersInner filterType( } /** - * Get filterType + * Filter type. * * @return filterType */ @@ -161,7 +161,7 @@ public GetExchangeInfoResponseDataSymbolsInnerFiltersInner minPrice( } /** - * Get minPrice + * Minimum price. * * @return minPrice */ @@ -181,7 +181,7 @@ public GetExchangeInfoResponseDataSymbolsInnerFiltersInner maxPrice( } /** - * Get maxPrice + * Maximum price. * * @return maxPrice */ @@ -201,7 +201,7 @@ public GetExchangeInfoResponseDataSymbolsInnerFiltersInner tickSize( } /** - * Get tickSize + * Tick size. * * @return tickSize */ @@ -221,7 +221,7 @@ public GetExchangeInfoResponseDataSymbolsInnerFiltersInner stepSize( } /** - * Get stepSize + * Step size. * * @return stepSize */ @@ -241,7 +241,7 @@ public GetExchangeInfoResponseDataSymbolsInnerFiltersInner maxQty( } /** - * Get maxQty + * Maximum quantity. * * @return maxQty */ @@ -261,7 +261,7 @@ public GetExchangeInfoResponseDataSymbolsInnerFiltersInner minQty( } /** - * Get minQty + * Minimum quantity. * * @return minQty */ @@ -281,7 +281,7 @@ public GetExchangeInfoResponseDataSymbolsInnerFiltersInner limit( } /** - * Get limit + * Maximum allowed orders for this rule. * * @return limit */ @@ -301,7 +301,7 @@ public GetExchangeInfoResponseDataSymbolsInnerFiltersInner minNotional( } /** - * Get minNotional + * Minimum notional value. * * @return minNotional */ @@ -321,7 +321,7 @@ public GetExchangeInfoResponseDataSymbolsInnerFiltersInner maxNotional( } /** - * Get maxNotional + * Maximum notional value. * * @return maxNotional */ @@ -341,7 +341,7 @@ public GetExchangeInfoResponseDataSymbolsInnerFiltersInner multiplierDown( } /** - * Get multiplierDown + * Lower multiplier bound. * * @return multiplierDown */ @@ -361,7 +361,7 @@ public GetExchangeInfoResponseDataSymbolsInnerFiltersInner multiplierUp( } /** - * Get multiplierUp + * Upper multiplier bound. * * @return multiplierUp */ @@ -381,7 +381,7 @@ public GetExchangeInfoResponseDataSymbolsInnerFiltersInner bidMultiplierUp( } /** - * Get bidMultiplierUp + * Upper multiplier bound for bids. * * @return bidMultiplierUp */ @@ -401,7 +401,7 @@ public GetExchangeInfoResponseDataSymbolsInnerFiltersInner askMultiplierUp( } /** - * Get askMultiplierUp + * Upper multiplier bound for asks. * * @return askMultiplierUp */ @@ -421,7 +421,7 @@ public GetExchangeInfoResponseDataSymbolsInnerFiltersInner bidMultiplierDown( } /** - * Get bidMultiplierDown + * Lower multiplier bound for bids. * * @return bidMultiplierDown */ @@ -441,7 +441,7 @@ public GetExchangeInfoResponseDataSymbolsInnerFiltersInner askMultiplierDown( } /** - * Get askMultiplierDown + * Lower multiplier bound for asks. * * @return askMultiplierDown */ diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/Interval.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/Interval.java new file mode 100644 index 000000000..cafebce15 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/Interval.java @@ -0,0 +1,103 @@ +/* + * Alpha Trading REST API + * APIs for Binance Alpha Trading. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets interval */ +@JsonAdapter(Interval.Adapter.class) +public enum Interval { + INTERVAL_1s("1s"), + + INTERVAL_15s("15s"), + + INTERVAL_1m("1m"), + + INTERVAL_3m("3m"), + + INTERVAL_5m("5m"), + + INTERVAL_15m("15m"), + + INTERVAL_30m("30m"), + + INTERVAL_1h("1h"), + + INTERVAL_2h("2h"), + + INTERVAL_4h("4h"), + + INTERVAL_6h("6h"), + + INTERVAL_8h("8h"), + + INTERVAL_12h("12h"), + + INTERVAL_1d("1d"), + + INTERVAL_3d("3d"), + + INTERVAL_1w("1w"), + + INTERVAL_1M("1M"); + + private String value; + + Interval(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Interval fromValue(String value) { + for (Interval b : Interval.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Interval enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Interval read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Interval.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Interval.fromValue(value); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/KlinesResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/KlinesResponse.java index a8e214543..1505b7f51 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/KlinesResponse.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/KlinesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Alpha REST API - * OpenAPI Specification for the Binance Alpha REST API + * Alpha Trading REST API + * APIs for Binance Alpha Trading. * * The version of the OpenAPI document: 1.0.0 * @@ -39,7 +39,7 @@ /** KlinesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlinesResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -69,7 +69,7 @@ public class KlinesResponse { @SerializedName(SERIALIZED_NAME_DATA) @jakarta.annotation.Nullable - private List data; + private List> data; public KlinesResponse() {} @@ -79,7 +79,7 @@ public KlinesResponse code(@jakarta.annotation.Nullable String code) { } /** - * Get code + * API response code. \"000000\" indicates success. * * @return code */ @@ -98,7 +98,7 @@ public KlinesResponse message(@jakarta.annotation.Nullable String message) { } /** - * Get message + * Response message. * * @return message */ @@ -117,7 +117,7 @@ public KlinesResponse messageDetail(@jakarta.annotation.Nullable String messageD } /** - * Get messageDetail + * Detailed response message. * * @return messageDetail */ @@ -136,7 +136,7 @@ public KlinesResponse success(@jakarta.annotation.Nullable Boolean success) { } /** - * Get success + * Whether request is successful. * * @return success */ @@ -149,12 +149,13 @@ public void setSuccess(@jakarta.annotation.Nullable Boolean success) { this.success = success; } - public KlinesResponse data(@jakarta.annotation.Nullable List data) { + public KlinesResponse data( + @jakarta.annotation.Nullable List> data) { this.data = data; return this; } - public KlinesResponse addDataItem(KlinesResponseDataItem dataItem) { + public KlinesResponse addDataItem(List dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -163,17 +164,20 @@ public KlinesResponse addDataItem(KlinesResponseDataItem dataItem) { } /** - * Get data + * Array of kline rows. Each row contains: open time, open, high, low, close, volume, close + * time, quote volume, trade count, taker buy base volume, taker buy quote volume, and a static + * 0. * * @return data */ @jakarta.annotation.Nullable @Valid - public List getData() { + public List> getData() { return data; } - public void setData(@jakarta.annotation.Nullable List data) { + public void setData( + @jakarta.annotation.Nullable List> data) { this.data = data; } diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/KlinesResponseDataInnerInner.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/KlinesResponseDataInnerInner.java new file mode 100644 index 000000000..f62fd6259 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/KlinesResponseDataInnerInner.java @@ -0,0 +1,309 @@ +/* + * Alpha Trading REST API + * APIs for Binance Alpha Trading. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.rest.model; + +import com.binance.connector.client.alpha.rest.JSON; +import com.binance.connector.client.common.AbstractOpenApiSchema; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonPrimitive; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.hibernate.validator.constraints.*; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class KlinesResponseDataInnerInner extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(KlinesResponseDataInnerInner.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!KlinesResponseDataInnerInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'KlinesResponseDataInnerInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterString = + gson.getDelegateAdapter(this, TypeToken.get(String.class)); + final TypeAdapter adapterLong = + gson.getDelegateAdapter(this, TypeToken.get(Long.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, KlinesResponseDataInnerInner value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `String` + if (value.getActualInstance() instanceof String) { + JsonPrimitive primitive = + adapterString + .toJsonTree((String) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + // check if the actual instance is of the type `Long` + if (value.getActualInstance() instanceof Long) { + JsonPrimitive primitive = + adapterLong + .toJsonTree((Long) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " Long, String"); + } + + @Override + public KlinesResponseDataInnerInner read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize String + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterString; + match++; + log.log(Level.FINER, "Input data matches schema 'String'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for String failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'String'", + e); + } + // deserialize Long + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterLong; + match++; + log.log(Level.FINER, "Input data matches schema 'Long'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for Long failed with `%s`.", + e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Long'", e); + } + + if (match == 1) { + KlinesResponseDataInnerInner ret = + new KlinesResponseDataInnerInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for" + + " KlinesResponseDataInnerInner: %d classes match" + + " result, expected 1. Detailed failure message" + + " for oneOf schemas: %s. JSON: %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public KlinesResponseDataInnerInner() { + super("oneOf", Boolean.FALSE); + } + + public KlinesResponseDataInnerInner(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("String", String.class); + schemas.put("Long", Long.class); + } + + @Override + public Map> getSchemas() { + return KlinesResponseDataInnerInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: Long, String + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof String) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Long) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Long, String"); + } + + /** + * Get the actual instance, which can be the following: Long, String + * + * @return The actual instance (Long, String) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `String`. If the actual instance is not `String`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String) super.getActualInstance(); + } + + /** + * Get the actual instance of `Long`. If the actual instance is not `Long`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `Long` + * @throws ClassCastException if the instance is not `Long` + */ + public Long getLong() throws ClassCastException { + return (Long) super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * KlinesResponseDataInnerInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with String + try { + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for String failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Long + try { + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for Long failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for KlinesResponseDataInnerInner with oneOf" + + " schemas: Long, String. %d class(es) match the result, expected" + + " 1. Detailed failure message for oneOf schemas: %s. JSON: %s", + validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of KlinesResponseDataInnerInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of KlinesResponseDataInnerInner + * @throws IOException if the JSON string is invalid with respect to + * KlinesResponseDataInnerInner + */ + public static KlinesResponseDataInnerInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, KlinesResponseDataInnerInner.class); + } + + /** + * Convert an instance of KlinesResponseDataInnerInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/KlinesResponseDataItem.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/KlinesResponseDataItem.java deleted file mode 100644 index df24fb813..000000000 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/KlinesResponseDataItem.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Binance Alpha REST API - * OpenAPI Specification for the Binance Alpha REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.alpha.rest.model; - -import com.binance.connector.client.alpha.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** KlinesResponseDataItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class KlinesResponseDataItem extends ArrayList { - public KlinesResponseDataItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class KlinesResponseDataItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to KlinesResponseDataItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - KlinesResponseDataItemInner.validateJsonElement(element); - } - if (jsonElement == null) { - if (!KlinesResponseDataItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in KlinesResponseDataItem is not found in" - + " the empty JSON string", - KlinesResponseDataItem.openapiRequiredFields.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!KlinesResponseDataItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'KlinesResponseDataItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(KlinesResponseDataItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, KlinesResponseDataItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public KlinesResponseDataItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of KlinesResponseDataItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of KlinesResponseDataItem - * @throws IOException if the JSON string is invalid with respect to KlinesResponseDataItem - */ - public static KlinesResponseDataItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, KlinesResponseDataItem.class); - } - - /** - * Convert an instance of KlinesResponseDataItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/KlinesResponseDataItemInner.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/KlinesResponseDataItemInner.java deleted file mode 100644 index 0a6e60717..000000000 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/KlinesResponseDataItemInner.java +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Binance Alpha REST API - * OpenAPI Specification for the Binance Alpha REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.alpha.rest.model; - -import com.binance.connector.client.alpha.rest.JSON; -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonPrimitive; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class KlinesResponseDataItemInner extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(KlinesResponseDataItemInner.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!KlinesResponseDataItemInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'KlinesResponseDataItemInner' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterString = - gson.getDelegateAdapter(this, TypeToken.get(String.class)); - final TypeAdapter adapterLong = - gson.getDelegateAdapter(this, TypeToken.get(Long.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, KlinesResponseDataItemInner value) - throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `String` - if (value.getActualInstance() instanceof String) { - JsonPrimitive primitive = - adapterString - .toJsonTree((String) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - // check if the actual instance is of the type `Long` - if (value.getActualInstance() instanceof Long) { - JsonPrimitive primitive = - adapterLong - .toJsonTree((Long) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " Long, String"); - } - - @Override - public KlinesResponseDataItemInner read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize String - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterString; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for String failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'String'", - e); - } - // deserialize Long - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterLong; - match++; - log.log(Level.FINER, "Input data matches schema 'Long'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for Long failed with `%s`.", - e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Long'", e); - } - - if (match == 1) { - KlinesResponseDataItemInner ret = new KlinesResponseDataItemInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for" - + " KlinesResponseDataItemInner: %d classes match" - + " result, expected 1. Detailed failure message" - + " for oneOf schemas: %s. JSON: %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public KlinesResponseDataItemInner() { - super("oneOf", Boolean.FALSE); - } - - public KlinesResponseDataItemInner(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("String", String.class); - schemas.put("Long", Long.class); - } - - @Override - public Map> getSchemas() { - return KlinesResponseDataItemInner.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Long, String - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof String) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Long) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Long, String"); - } - - /** - * Get the actual instance, which can be the following: Long, String - * - * @return The actual instance (Long, String) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } - - /** - * Get the actual instance of `Long`. If the actual instance is not `Long`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Long` - * @throws ClassCastException if the instance is not `Long` - */ - public Long getLong() throws ClassCastException { - return (Long) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * KlinesResponseDataItemInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with String - try { - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for String failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Long - try { - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for Long failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for KlinesResponseDataItemInner with oneOf" - + " schemas: Long, String. %d class(es) match the result, expected" - + " 1. Detailed failure message for oneOf schemas: %s. JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of KlinesResponseDataItemInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of KlinesResponseDataItemInner - * @throws IOException if the JSON string is invalid with respect to KlinesResponseDataItemInner - */ - public static KlinesResponseDataItemInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, KlinesResponseDataItemInner.class); - } - - /** - * Convert an instance of KlinesResponseDataItemInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/Limit.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/Limit.java new file mode 100644 index 000000000..56e5480d8 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/Limit.java @@ -0,0 +1,82 @@ +/* + * Alpha Trading REST API + * APIs for Binance Alpha Trading. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets limit */ +@JsonAdapter(Limit.Adapter.class) +public enum Limit { + LIMIT_5(5l), + + LIMIT_10(10l), + + LIMIT_20(20l), + + LIMIT_50(50l), + + LIMIT_100(100l), + + LIMIT_500(500l), + + LIMIT_1000(1000l); + + private Long value; + + Limit(Long value) { + this.value = value; + } + + public Long getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Limit fromValue(Long value) { + for (Limit b : Limit.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Limit enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Limit read(final JsonReader jsonReader) throws IOException { + Long value = jsonReader.nextLong(); + return Limit.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + Long value = jsonElement.getAsLong(); + Limit.fromValue(value); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/TickerResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/TickerResponse.java index 1b4c22b21..78291f1e8 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/TickerResponse.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/TickerResponse.java @@ -1,6 +1,6 @@ /* - * Binance Alpha REST API - * OpenAPI Specification for the Binance Alpha REST API + * Alpha Trading REST API + * APIs for Binance Alpha Trading. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** TickerResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -75,7 +75,7 @@ public TickerResponse code(@jakarta.annotation.Nullable String code) { } /** - * Get code + * API response code. \"000000\" indicates success. * * @return code */ @@ -94,7 +94,7 @@ public TickerResponse message(@jakarta.annotation.Nullable String message) { } /** - * Get message + * Response message. * * @return message */ @@ -113,7 +113,7 @@ public TickerResponse messageDetail(@jakarta.annotation.Nullable String messageD } /** - * Get messageDetail + * Detailed response message. * * @return messageDetail */ @@ -152,7 +152,7 @@ public TickerResponse success(@jakarta.annotation.Nullable Boolean success) { } /** - * Get success + * Whether request is successful. * * @return success */ diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/TickerResponseData.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/TickerResponseData.java index 51263c06d..6b709ec0f 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/TickerResponseData.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/TickerResponseData.java @@ -1,6 +1,6 @@ /* - * Binance Alpha REST API - * OpenAPI Specification for the Binance Alpha REST API + * Alpha Trading REST API + * APIs for Binance Alpha Trading. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** TickerResponseData */ +/** 24-hour rolling window ticker statistics. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerResponseData { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -140,7 +140,7 @@ public TickerResponseData symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Trading pair symbol. * * @return symbol */ @@ -159,7 +159,7 @@ public TickerResponseData priceChange(@jakarta.annotation.Nullable String priceC } /** - * Get priceChange + * Absolute price change in the 24h window. * * @return priceChange */ @@ -179,7 +179,7 @@ public TickerResponseData priceChangePercent( } /** - * Get priceChangePercent + * Percentage price change in the 24h window. * * @return priceChangePercent */ @@ -199,7 +199,7 @@ public TickerResponseData weightedAvgPrice( } /** - * Get weightedAvgPrice + * Weighted average price in the 24h window. * * @return weightedAvgPrice */ @@ -218,7 +218,7 @@ public TickerResponseData lastPrice(@jakarta.annotation.Nullable String lastPric } /** - * Get lastPrice + * Latest traded price. * * @return lastPrice */ @@ -237,7 +237,7 @@ public TickerResponseData lastQty(@jakarta.annotation.Nullable String lastQty) { } /** - * Get lastQty + * Quantity of the latest trade. * * @return lastQty */ @@ -256,7 +256,7 @@ public TickerResponseData openPrice(@jakarta.annotation.Nullable String openPric } /** - * Get openPrice + * Opening price of the 24h window. * * @return openPrice */ @@ -275,7 +275,7 @@ public TickerResponseData highPrice(@jakarta.annotation.Nullable String highPric } /** - * Get highPrice + * Highest price in the 24h window. * * @return highPrice */ @@ -294,7 +294,7 @@ public TickerResponseData lowPrice(@jakarta.annotation.Nullable String lowPrice) } /** - * Get lowPrice + * Lowest price in the 24h window. * * @return lowPrice */ @@ -313,7 +313,7 @@ public TickerResponseData volume(@jakarta.annotation.Nullable String volume) { } /** - * Get volume + * Base asset volume in the 24h window. * * @return volume */ @@ -332,7 +332,7 @@ public TickerResponseData quoteVolume(@jakarta.annotation.Nullable String quoteV } /** - * Get quoteVolume + * Quote asset volume in the 24h window. * * @return quoteVolume */ @@ -351,7 +351,7 @@ public TickerResponseData openTime(@jakarta.annotation.Nullable Long openTime) { } /** - * Get openTime + * Start time of the 24h window (milliseconds). * * @return openTime */ @@ -370,7 +370,7 @@ public TickerResponseData closeTime(@jakarta.annotation.Nullable Long closeTime) } /** - * Get closeTime + * End time of the 24h window (milliseconds). * * @return closeTime */ @@ -389,7 +389,7 @@ public TickerResponseData firstId(@jakarta.annotation.Nullable Long firstId) { } /** - * Get firstId + * First trade ID in the 24h window. * * @return firstId */ @@ -408,7 +408,7 @@ public TickerResponseData lastId(@jakarta.annotation.Nullable Long lastId) { } /** - * Get lastId + * Last trade ID in the 24h window. * * @return lastId */ @@ -427,7 +427,7 @@ public TickerResponseData count(@jakarta.annotation.Nullable Long count) { } /** - * Get count + * Total number of trades in the 24h window. * * @return count */ diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/TokenListResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/TokenListResponse.java index 5010a9ff3..5b2e506ce 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/TokenListResponse.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/TokenListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Alpha REST API - * OpenAPI Specification for the Binance Alpha REST API + * Alpha Trading REST API + * APIs for Binance Alpha Trading. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** TokenListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TokenListResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -80,7 +80,7 @@ public TokenListResponse code(@jakarta.annotation.Nullable String code) { } /** - * Get code + * API response code. \"000000\" indicates success. * * @return code */ @@ -99,7 +99,7 @@ public TokenListResponse message(@jakarta.annotation.Nullable String message) { } /** - * Get message + * Response message. * * @return message */ @@ -118,7 +118,7 @@ public TokenListResponse messageDetail(@jakarta.annotation.Nullable String messa } /** - * Get messageDetail + * Detailed response message. * * @return messageDetail */ @@ -137,7 +137,7 @@ public TokenListResponse success(@jakarta.annotation.Nullable Boolean success) { } /** - * Get success + * Whether request is successful. * * @return success */ @@ -165,7 +165,7 @@ public TokenListResponse addDataItem(TokenListResponseDataInner dataItem) { } /** - * Get data + * List of ALPHA tokens and metadata. * * @return data */ diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/TokenListResponseDataInner.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/TokenListResponseDataInner.java index 89751c016..311af49c7 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/TokenListResponseDataInner.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/model/TokenListResponseDataInner.java @@ -1,6 +1,6 @@ /* - * Binance Alpha REST API - * OpenAPI Specification for the Binance Alpha REST API + * Alpha Trading REST API + * APIs for Binance Alpha Trading. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TokenListResponseDataInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TokenListResponseDataInner { public static final String SERIALIZED_NAME_TOKEN_ID = "tokenId"; @@ -272,7 +272,7 @@ public TokenListResponseDataInner tokenId(@jakarta.annotation.Nullable String to } /** - * Get tokenId + * Unique token identifier. * * @return tokenId */ @@ -291,7 +291,7 @@ public TokenListResponseDataInner chainId(@jakarta.annotation.Nullable String ch } /** - * Get chainId + * Chain ID. * * @return chainId */ @@ -311,7 +311,7 @@ public TokenListResponseDataInner chainIconUrl( } /** - * Get chainIconUrl + * Chain icon URL. * * @return chainIconUrl */ @@ -330,7 +330,7 @@ public TokenListResponseDataInner chainName(@jakarta.annotation.Nullable String } /** - * Get chainName + * Chain name. * * @return chainName */ @@ -350,7 +350,7 @@ public TokenListResponseDataInner contractAddress( } /** - * Get contractAddress + * Token contract address. * * @return contractAddress */ @@ -369,7 +369,7 @@ public TokenListResponseDataInner name(@jakarta.annotation.Nullable String name) } /** - * Get name + * Token name. * * @return name */ @@ -388,7 +388,7 @@ public TokenListResponseDataInner symbol(@jakarta.annotation.Nullable String sym } /** - * Get symbol + * Token symbol. * * @return symbol */ @@ -407,7 +407,7 @@ public TokenListResponseDataInner iconUrl(@jakarta.annotation.Nullable String ic } /** - * Get iconUrl + * Token icon URL. * * @return iconUrl */ @@ -426,7 +426,7 @@ public TokenListResponseDataInner price(@jakarta.annotation.Nullable String pric } /** - * Get price + * Latest token price. * * @return price */ @@ -446,7 +446,7 @@ public TokenListResponseDataInner percentChange24h( } /** - * Get percentChange24h + * 24-hour price change percentage. * * @return percentChange24h */ @@ -465,7 +465,7 @@ public TokenListResponseDataInner volume24h(@jakarta.annotation.Nullable String } /** - * Get volume24h + * 24-hour trading volume. * * @return volume24h */ @@ -752,7 +752,7 @@ public TokenListResponseDataInner alphaId(@jakarta.annotation.Nullable String al } /** - * Get alphaId + * ALPHA token ID, e.g. ALPHA_175. * * @return alphaId */ diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/AlphaWebSocketStreamsUtil.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/AlphaWebSocketStreamsUtil.java new file mode 100644 index 000000000..1bfbcf392 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/AlphaWebSocketStreamsUtil.java @@ -0,0 +1,22 @@ +package com.binance.connector.client.alpha.websocket.stream; + +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; + +public class AlphaWebSocketStreamsUtil { + private static final String BASE_URL = "wss://nbstream.binance.com/w3w/wsa/stream"; + private static final boolean HAS_TIME_UNIT = false; + + public static WebSocketClientConfiguration getClientConfiguration() { + return getClientConfiguration(""); + } + + public static WebSocketClientConfiguration getClientConfiguration(String path) { + WebSocketClientConfiguration clientConfiguration = new WebSocketClientConfiguration(); + if (!HAS_TIME_UNIT) { + clientConfiguration.setTimeUnit(null); + } + clientConfiguration.setUrl(BASE_URL + path + "/stream"); + clientConfiguration.setAutoLogon(false); + return clientConfiguration; + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/JSON.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/JSON.java new file mode 100644 index 000000000..68cae9ee0 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/JSON.java @@ -0,0 +1,499 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream; + +import com.binance.connector.client.common.DecimalFormatter; +import com.binance.connector.client.common.websocket.service.DeserializeExclusionStrategy; +import com.binance.connector.client.common.websocket.service.RequestIdModifierFactory; +import com.binance.connector.client.common.websocket.service.SerializeExclusionStrategy; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import com.google.gson.JsonParseException; +import com.google.gson.JsonPrimitive; +import com.google.gson.JsonSerializer; +import com.google.gson.TypeAdapter; +import com.google.gson.internal.bind.util.ISO8601Utils; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.gsonfire.GsonFireBuilder; +import java.io.IOException; +import java.io.StringReader; +import java.lang.reflect.Type; +import java.text.DateFormat; +import java.text.DecimalFormat; +import java.text.ParseException; +import java.text.ParsePosition; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Date; +import java.util.Map; +import okio.ByteString; + +/* + * A JSON utility class + * + * NOTE: in the future, this class may be converted to static, which may break + * backward-compatibility + */ +public class JSON { + private static Gson gson; + private static boolean isLenientOnJson = false; + private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); + private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = + new OffsetDateTimeTypeAdapter(); + private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); + + @SuppressWarnings("unchecked") + public static GsonBuilder createGson() { + GsonFireBuilder fireBuilder = new GsonFireBuilder(); + GsonBuilder builder = fireBuilder.createGsonBuilder(); + return builder; + } + + private static String getDiscriminatorValue( + JsonElement readElement, String discriminatorField) { + JsonElement element = readElement.getAsJsonObject().get(discriminatorField); + if (null == element) { + throw new IllegalArgumentException( + "missing discriminator field: <" + discriminatorField + ">"); + } + return element.getAsString(); + } + + /** + * Returns the Java class that implements the OpenAPI schema for the specified discriminator + * value. + * + * @param classByDiscriminatorValue The map of discriminator values to Java classes. + * @param discriminatorValue The value of the OpenAPI discriminator in the input data. + * @return The Java class that implements the OpenAPI schema + */ + private static Class getClassByDiscriminator( + Map classByDiscriminatorValue, String discriminatorValue) { + Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); + if (null == clazz) { + throw new IllegalArgumentException( + "cannot determine model class of name: <" + discriminatorValue + ">"); + } + return clazz; + } + + static { + GsonBuilder gsonBuilder = createGson(); + gsonBuilder + .registerTypeAdapter( + Double.class, + (JsonSerializer) + (src, typeOfSrc, context) -> { + DecimalFormat df = DecimalFormatter.getFormatter(); + return new JsonPrimitive(df.format(src)); + }) + .addSerializationExclusionStrategy(new SerializeExclusionStrategy()) + .addDeserializationExclusionStrategy(new DeserializeExclusionStrategy()); + gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); + gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); + gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); + gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); + gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .AggregateTradeStreamRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .AggregateTradeStreamResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .AllBookTickerStreamRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .AllBookTickerStreamResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .AllMiniTickerStreamRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .AllMiniTickerStreamResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model.AllTickerStreamRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .AllTickerStreamResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .AllTokens24hTickerStreamRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .AllTokens24hTickerStreamResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .AllTokens24hTickerStreamResponseDInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .BookTickerStreamRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .BookTickerStreamResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .ContractKlineStreamRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .ContractKlineStreamResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .ContractKlineStreamResponseK.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model.FullDepthStreamRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .FullDepthStreamResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model.KlineStreamRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model.KlineStreamResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model.KlineStreamResponseK + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .MiniTickerStreamRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .MiniTickerStreamResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .PartialDepthStreamRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model + .PartialDepthStreamResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model.TickerStreamRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model.TickerStreamResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model.TradeStreamRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.alpha.websocket.stream.model.TradeStreamResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new RequestIdModifierFactory()); + gson = gsonBuilder.create(); + } + + /** + * Get Gson. + * + * @return Gson + */ + public static Gson getGson() { + return gson; + } + + /** + * Set Gson. + * + * @param gson Gson + */ + public static void setGson(Gson gson) { + JSON.gson = gson; + } + + public static void setLenientOnJson(boolean lenientOnJson) { + isLenientOnJson = lenientOnJson; + } + + /** + * Serialize the given Java object into JSON string. + * + * @param obj Object + * @return String representation of the JSON + */ + public static String serialize(Object obj) { + return gson.toJson(obj); + } + + /** + * Deserialize the given JSON string to Java object. + * + * @param Type + * @param body The JSON string + * @param returnType The type to deserialize into + * @return The deserialized Java object + */ + @SuppressWarnings("unchecked") + public static T deserialize(String body, Type returnType) { + try { + if (isLenientOnJson) { + JsonReader jsonReader = new JsonReader(new StringReader(body)); + // see + // https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + jsonReader.setLenient(true); + return gson.fromJson(jsonReader, returnType); + } else { + return gson.fromJson(body, returnType); + } + } catch (JsonParseException e) { + // Fallback processing when failed to parse JSON form response body: + // return the response body string directly for the String return type; + if (returnType.equals(String.class)) { + return (T) body; + } else { + throw (e); + } + } + } + + /** Gson TypeAdapter for Byte Array type */ + public static class ByteArrayAdapter extends TypeAdapter { + + @Override + public void write(JsonWriter out, byte[] value) throws IOException { + if (value == null) { + out.nullValue(); + } else { + out.value(ByteString.of(value).base64()); + } + } + + @Override + public byte[] read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String bytesAsBase64 = in.nextString(); + ByteString byteString = ByteString.decodeBase64(bytesAsBase64); + return byteString.toByteArray(); + } + } + } + + /** Gson TypeAdapter for JSR310 OffsetDateTime type */ + public static class OffsetDateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public OffsetDateTimeTypeAdapter() { + this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + + public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, OffsetDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public OffsetDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + if (date.endsWith("+0000")) { + date = date.substring(0, date.length() - 5) + "Z"; + } + return OffsetDateTime.parse(date, formatter); + } + } + } + + /** Gson TypeAdapter for JSR310 LocalDate type */ + public static class LocalDateTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTypeAdapter() { + this(DateTimeFormatter.ISO_LOCAL_DATE); + } + + public LocalDateTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return LocalDate.parse(date, formatter); + } + } + } + + public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + offsetDateTimeTypeAdapter.setFormat(dateFormat); + } + + public static void setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + } + + /** + * Gson TypeAdapter for java.sql.Date type If the dateFormat is null, a simple "yyyy-MM-dd" + * format will be used (more efficient than SimpleDateFormat). + */ + public static class SqlDateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public SqlDateTypeAdapter() {} + + public SqlDateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, java.sql.Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = date.toString(); + } + out.value(value); + } + } + + @Override + public java.sql.Date read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return new java.sql.Date(dateFormat.parse(date).getTime()); + } + return new java.sql.Date( + ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } + } + + /** + * Gson TypeAdapter for java.util.Date type If the dateFormat is null, ISO8601Utils will be + * used. + */ + public static class DateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public DateTypeAdapter() {} + + public DateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = ISO8601Utils.format(date, true); + } + out.value(value); + } + } + + @Override + public Date read(JsonReader in) throws IOException { + try { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return dateFormat.parse(date); + } + return ISO8601Utils.parse(date, new ParsePosition(0)); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } catch (IllegalArgumentException e) { + throw new JsonParseException(e); + } + } + } + + public static void setDateFormat(DateFormat dateFormat) { + dateTypeAdapter.setFormat(dateFormat); + } + + public static void setSqlDateFormat(DateFormat dateFormat) { + sqlDateTypeAdapter.setFormat(dateFormat); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/api/AlphaWebSocketStreams.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/api/AlphaWebSocketStreams.java new file mode 100644 index 000000000..12f8e2b8c --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/api/AlphaWebSocketStreams.java @@ -0,0 +1,141 @@ +package com.binance.connector.client.alpha.websocket.stream.api; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.alpha.websocket.stream.model.AggregateTradeStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.AggregateTradeStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.AllBookTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.AllBookTickerStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.AllMiniTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.AllMiniTickerStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.AllTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.AllTickerStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.AllTokens24hTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.AllTokens24hTickerStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.BookTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.BookTickerStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.ContractKlineStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.ContractKlineStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.FullDepthStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.FullDepthStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.KlineStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.KlineStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.MiniTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.MiniTickerStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.PartialDepthStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.PartialDepthStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.TickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.TickerStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.TradeStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.TradeStreamResponse; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.SystemUtil; +import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionInterface; +import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionPoolWrapper; +import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionWrapper; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; +import java.util.Random; + +public class AlphaWebSocketStreams { + private static final String USER_AGENT = + String.format( + "binance-alpha/2.0.0 (Java/%s; %s; %s)", + SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); + + private final StreamConnectionInterface connection; + + private DefaultApi defaultApi; + + public AlphaWebSocketStreams(WebSocketClientConfiguration configuration) { + this( + configuration.getUsePool() + ? new StreamConnectionPoolWrapper(configuration, JSON.getGson()) + : new StreamConnectionWrapper(configuration, JSON.getGson())); + } + + public AlphaWebSocketStreams(StreamConnectionInterface connection) { + connection.setUserAgent(USER_AGENT); + if (!connection.isConnected()) { + connection.connect(); + } + this.connection = connection; + + this.defaultApi = new DefaultApi(connection); + } + + public void stop() throws Exception { + if (connection != null && connection.isConnected()) { + connection.stop(); + } + } + + public StreamBlockingQueueWrapper aggregateTradeStream( + AggregateTradeStreamRequest aggregateTradeStreamRequest) throws ApiException { + return defaultApi.aggregateTradeStream(aggregateTradeStreamRequest); + } + + public StreamBlockingQueueWrapper allBookTickerStream( + AllBookTickerStreamRequest allBookTickerStreamRequest) throws ApiException { + return defaultApi.allBookTickerStream(allBookTickerStreamRequest); + } + + public StreamBlockingQueueWrapper allMiniTickerStream( + AllMiniTickerStreamRequest allMiniTickerStreamRequest) throws ApiException { + return defaultApi.allMiniTickerStream(allMiniTickerStreamRequest); + } + + public StreamBlockingQueueWrapper allTickerStream( + AllTickerStreamRequest allTickerStreamRequest) throws ApiException { + return defaultApi.allTickerStream(allTickerStreamRequest); + } + + public StreamBlockingQueueWrapper allTokens24hTickerStream( + AllTokens24hTickerStreamRequest allTokens24hTickerStreamRequest) throws ApiException { + return defaultApi.allTokens24hTickerStream(allTokens24hTickerStreamRequest); + } + + public StreamBlockingQueueWrapper bookTickerStream( + BookTickerStreamRequest bookTickerStreamRequest) throws ApiException { + return defaultApi.bookTickerStream(bookTickerStreamRequest); + } + + public StreamBlockingQueueWrapper contractKlineStream( + ContractKlineStreamRequest contractKlineStreamRequest) throws ApiException { + return defaultApi.contractKlineStream(contractKlineStreamRequest); + } + + public StreamBlockingQueueWrapper fullDepthStream( + FullDepthStreamRequest fullDepthStreamRequest) throws ApiException { + return defaultApi.fullDepthStream(fullDepthStreamRequest); + } + + public StreamBlockingQueueWrapper klineStream( + KlineStreamRequest klineStreamRequest) throws ApiException { + return defaultApi.klineStream(klineStreamRequest); + } + + public StreamBlockingQueueWrapper miniTickerStream( + MiniTickerStreamRequest miniTickerStreamRequest) throws ApiException { + return defaultApi.miniTickerStream(miniTickerStreamRequest); + } + + public StreamBlockingQueueWrapper partialDepthStream( + PartialDepthStreamRequest partialDepthStreamRequest) throws ApiException { + return defaultApi.partialDepthStream(partialDepthStreamRequest); + } + + public StreamBlockingQueueWrapper tickerStream( + TickerStreamRequest tickerStreamRequest) throws ApiException { + return defaultApi.tickerStream(tickerStreamRequest); + } + + public StreamBlockingQueueWrapper tradeStream( + TradeStreamRequest tradeStreamRequest) throws ApiException { + return defaultApi.tradeStream(tradeStreamRequest); + } + + public String getRequestID() { + Random rand = new Random(); + return Integer.toString(Math.abs(rand.nextInt())); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/api/DefaultApi.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/api/DefaultApi.java new file mode 100644 index 000000000..fa358371b --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/api/DefaultApi.java @@ -0,0 +1,1181 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.api; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.alpha.websocket.stream.model.AggregateTradeStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.AggregateTradeStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.AllBookTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.AllBookTickerStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.AllMiniTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.AllMiniTickerStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.AllTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.AllTickerStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.AllTokens24hTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.AllTokens24hTickerStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.BookTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.BookTickerStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.ContractKlineStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.ContractKlineStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.FullDepthStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.FullDepthStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.KlineStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.KlineStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.MiniTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.MiniTickerStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.PartialDepthStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.PartialDepthStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.TickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.TickerStreamResponse; +import com.binance.connector.client.alpha.websocket.stream.model.TradeStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.TradeStreamResponse; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.SystemUtil; +import com.binance.connector.client.common.exception.ConstraintViolationException; +import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionInterface; +import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionPoolWrapper; +import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionWrapper; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.dtos.RequestWrapperDTO; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueue; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; +import com.google.gson.reflect.TypeToken; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Validation; +import jakarta.validation.Validator; +import jakarta.validation.constraints.*; +import java.util.Collections; +import java.util.Map; +import java.util.Random; +import java.util.Set; +import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; + +public class DefaultApi { + private static final String USER_AGENT = + String.format( + "binance-alpha/2.0.0 (Java/%s; %s; %s)", + SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); + + private StreamConnectionInterface connection; + + public DefaultApi() {} + + public DefaultApi(WebSocketClientConfiguration configuration) { + this( + configuration.getUsePool() + ? new StreamConnectionPoolWrapper(configuration, JSON.getGson()) + : new StreamConnectionWrapper(configuration, JSON.getGson())); + } + + public DefaultApi(StreamConnectionInterface connection) { + connection.setUserAgent(USER_AGENT); + if (!connection.isConnected()) { + connection.connect(); + } + this.connection = connection; + } + + public StreamConnectionInterface getConnection() { + return connection; + } + + /** + * Aggregate Trade Stream Pushes aggregate trade updates for a symbol. + * + * @param aggregateTradeStreamRequest (required) + * @return AggregateTradeStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Aggregate Trade Stream -
+ * + * @see Aggregate + * Trade Stream Documentation + */ + public StreamBlockingQueueWrapper aggregateTradeStream( + AggregateTradeStreamRequest aggregateTradeStreamRequest) throws ApiException { + StreamBlockingQueue queue = aggregateTradeStreamRaw(aggregateTradeStreamRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue aggregateTradeStreamRaw( + AggregateTradeStreamRequest aggregateTradeStreamRequest) throws ApiException { + aggregateTradeStreamValidateBeforeCall(aggregateTradeStreamRequest); + + String methodName = + "/@aggTrade" + .substring(1) + .replace( + "", + aggregateTradeStreamRequest.getId() != null + ? aggregateTradeStreamRequest.getId().toString() + : "") + .replace( + "", + aggregateTradeStreamRequest.getSymbol() != null + ? aggregateTradeStreamRequest.getSymbol().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void aggregateTradeStreamValidateBeforeCall( + AggregateTradeStreamRequest aggregateTradeStreamRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(aggregateTradeStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * All Book Ticker Stream Pushes best bid/ask updates for all symbols. + * + * @param allBookTickerStreamRequest (required) + * @return AllBookTickerStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 All Book Ticker Stream -
+ * + * @see All + * Book Ticker Stream Documentation + */ + public StreamBlockingQueueWrapper allBookTickerStream( + AllBookTickerStreamRequest allBookTickerStreamRequest) throws ApiException { + StreamBlockingQueue queue = allBookTickerStreamRaw(allBookTickerStreamRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue allBookTickerStreamRaw( + AllBookTickerStreamRequest allBookTickerStreamRequest) throws ApiException { + allBookTickerStreamValidateBeforeCall(allBookTickerStreamRequest); + + String methodName = + "/!bookTicker" + .substring(1) + .replace( + "", + allBookTickerStreamRequest.getId() != null + ? allBookTickerStreamRequest.getId().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void allBookTickerStreamValidateBeforeCall( + AllBookTickerStreamRequest allBookTickerStreamRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(allBookTickerStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * All Mini Ticker Stream Pushes mini ticker statistics for all symbols. + * + * @param allMiniTickerStreamRequest (required) + * @return AllMiniTickerStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 All Mini Ticker Stream -
+ * + * @see All + * Mini Ticker Stream Documentation + */ + public StreamBlockingQueueWrapper allMiniTickerStream( + AllMiniTickerStreamRequest allMiniTickerStreamRequest) throws ApiException { + StreamBlockingQueue queue = allMiniTickerStreamRaw(allMiniTickerStreamRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue allMiniTickerStreamRaw( + AllMiniTickerStreamRequest allMiniTickerStreamRequest) throws ApiException { + allMiniTickerStreamValidateBeforeCall(allMiniTickerStreamRequest); + + String methodName = + "/!miniTicker@arr" + .substring(1) + .replace( + "", + allMiniTickerStreamRequest.getId() != null + ? allMiniTickerStreamRequest.getId().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void allMiniTickerStreamValidateBeforeCall( + AllMiniTickerStreamRequest allMiniTickerStreamRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(allMiniTickerStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * All Ticker Stream Pushes full ticker statistics for all symbols. + * + * @param allTickerStreamRequest (required) + * @return AllTickerStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 All Ticker Stream -
+ * + * @see All + * Ticker Stream Documentation + */ + public StreamBlockingQueueWrapper allTickerStream( + AllTickerStreamRequest allTickerStreamRequest) throws ApiException { + StreamBlockingQueue queue = allTickerStreamRaw(allTickerStreamRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue allTickerStreamRaw( + AllTickerStreamRequest allTickerStreamRequest) throws ApiException { + allTickerStreamValidateBeforeCall(allTickerStreamRequest); + + String methodName = + "/!ticker@arr" + .substring(1) + .replace( + "", + allTickerStreamRequest.getId() != null + ? allTickerStreamRequest.getId().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void allTickerStreamValidateBeforeCall(AllTickerStreamRequest allTickerStreamRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(allTickerStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * All Tokens 24h Ticker Stream Pushes 24h ticker-like metrics for all tokens. + * + * @param allTokens24hTickerStreamRequest (required) + * @return AllTokens24hTickerStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 All Tokens 24h Ticker Stream -
+ * + * @see All + * Tokens 24h Ticker Stream Documentation + */ + public StreamBlockingQueueWrapper allTokens24hTickerStream( + AllTokens24hTickerStreamRequest allTokens24hTickerStreamRequest) throws ApiException { + StreamBlockingQueue queue = + allTokens24hTickerStreamRaw(allTokens24hTickerStreamRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue allTokens24hTickerStreamRaw( + AllTokens24hTickerStreamRequest allTokens24hTickerStreamRequest) throws ApiException { + allTokens24hTickerStreamValidateBeforeCall(allTokens24hTickerStreamRequest); + + String methodName = + "/came@allTokens@ticker24" + .substring(1) + .replace( + "", + allTokens24hTickerStreamRequest.getId() != null + ? allTokens24hTickerStreamRequest.getId().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void allTokens24hTickerStreamValidateBeforeCall( + AllTokens24hTickerStreamRequest allTokens24hTickerStreamRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(allTokens24hTickerStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Book Ticker Stream Pushes best bid/ask updates for a symbol. + * + * @param bookTickerStreamRequest (required) + * @return BookTickerStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Book Ticker Stream -
+ * + * @see Book + * Ticker Stream Documentation + */ + public StreamBlockingQueueWrapper bookTickerStream( + BookTickerStreamRequest bookTickerStreamRequest) throws ApiException { + StreamBlockingQueue queue = bookTickerStreamRaw(bookTickerStreamRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue bookTickerStreamRaw( + BookTickerStreamRequest bookTickerStreamRequest) throws ApiException { + bookTickerStreamValidateBeforeCall(bookTickerStreamRequest); + + String methodName = + "/@bookTicker" + .substring(1) + .replace( + "", + bookTickerStreamRequest.getId() != null + ? bookTickerStreamRequest.getId().toString() + : "") + .replace( + "", + bookTickerStreamRequest.getSymbol() != null + ? bookTickerStreamRequest.getSymbol().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void bookTickerStreamValidateBeforeCall(BookTickerStreamRequest bookTickerStreamRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(bookTickerStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Contract Kline Stream Pushes kline updates by contractAddress@chainId. + * + * @param contractKlineStreamRequest (required) + * @return ContractKlineStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Contract Kline Stream -
+ * + * @see Contract + * Kline Stream Documentation + */ + public StreamBlockingQueueWrapper contractKlineStream( + ContractKlineStreamRequest contractKlineStreamRequest) throws ApiException { + StreamBlockingQueue queue = contractKlineStreamRaw(contractKlineStreamRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue contractKlineStreamRaw( + ContractKlineStreamRequest contractKlineStreamRequest) throws ApiException { + contractKlineStreamValidateBeforeCall(contractKlineStreamRequest); + + String methodName = + "/came@@@kline_" + .substring(1) + .replace( + "", + contractKlineStreamRequest.getId() != null + ? contractKlineStreamRequest.getId().toString() + : "") + .replace( + "", + contractKlineStreamRequest.getContractAddress() != null + ? contractKlineStreamRequest.getContractAddress().toString() + : "") + .replace( + "", + contractKlineStreamRequest.getChainId() != null + ? contractKlineStreamRequest.getChainId().toString() + : "") + .replace( + "", + contractKlineStreamRequest.getInterval() != null + ? contractKlineStreamRequest.getInterval().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void contractKlineStreamValidateBeforeCall( + ContractKlineStreamRequest contractKlineStreamRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(contractKlineStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Full Depth Stream Returns all available depth, including UI and API orders. + * + * @param fullDepthStreamRequest (required) + * @return FullDepthStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Full Depth Stream -
+ * + * @see Full + * Depth Stream Documentation + */ + public StreamBlockingQueueWrapper fullDepthStream( + FullDepthStreamRequest fullDepthStreamRequest) throws ApiException { + StreamBlockingQueue queue = fullDepthStreamRaw(fullDepthStreamRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue fullDepthStreamRaw( + FullDepthStreamRequest fullDepthStreamRequest) throws ApiException { + fullDepthStreamValidateBeforeCall(fullDepthStreamRequest); + + String methodName = + "/@fulldepth@" + .substring(1) + .replace( + "", + fullDepthStreamRequest.getId() != null + ? fullDepthStreamRequest.getId().toString() + : "") + .replace( + "", + fullDepthStreamRequest.getSymbol() != null + ? fullDepthStreamRequest.getSymbol().toString() + : "") + .replace( + "", + fullDepthStreamRequest.getInterval() != null + ? fullDepthStreamRequest.getInterval().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void fullDepthStreamValidateBeforeCall(FullDepthStreamRequest fullDepthStreamRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(fullDepthStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Kline Stream Pushes kline updates for a symbol. + * + * @param klineStreamRequest (required) + * @return KlineStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Kline Stream -
+ * + * @see Kline + * Stream Documentation + */ + public StreamBlockingQueueWrapper klineStream( + KlineStreamRequest klineStreamRequest) throws ApiException { + StreamBlockingQueue queue = klineStreamRaw(klineStreamRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue klineStreamRaw(KlineStreamRequest klineStreamRequest) + throws ApiException { + klineStreamValidateBeforeCall(klineStreamRequest); + + String methodName = + "/@kline_" + .substring(1) + .replace( + "", + klineStreamRequest.getId() != null + ? klineStreamRequest.getId().toString() + : "") + .replace( + "", + klineStreamRequest.getSymbol() != null + ? klineStreamRequest.getSymbol().toString() + : "") + .replace( + "", + klineStreamRequest.getInterval() != null + ? klineStreamRequest.getInterval().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void klineStreamValidateBeforeCall(KlineStreamRequest klineStreamRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(klineStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Mini Ticker Stream Pushes 24h rolling mini ticker statistics. + * + * @param miniTickerStreamRequest (required) + * @return MiniTickerStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Mini Ticker Stream -
+ * + * @see Mini + * Ticker Stream Documentation + */ + public StreamBlockingQueueWrapper miniTickerStream( + MiniTickerStreamRequest miniTickerStreamRequest) throws ApiException { + StreamBlockingQueue queue = miniTickerStreamRaw(miniTickerStreamRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue miniTickerStreamRaw( + MiniTickerStreamRequest miniTickerStreamRequest) throws ApiException { + miniTickerStreamValidateBeforeCall(miniTickerStreamRequest); + + String methodName = + "/@miniTicker" + .substring(1) + .replace( + "", + miniTickerStreamRequest.getId() != null + ? miniTickerStreamRequest.getId().toString() + : "") + .replace( + "", + miniTickerStreamRequest.getSymbol() != null + ? miniTickerStreamRequest.getSymbol().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void miniTickerStreamValidateBeforeCall(MiniTickerStreamRequest miniTickerStreamRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(miniTickerStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Partial Depth Stream Pushes partial depth updates (UI orders only). + * + * @param partialDepthStreamRequest (required) + * @return PartialDepthStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Partial Depth Stream -
+ * + * @see Partial + * Depth Stream Documentation + */ + public StreamBlockingQueueWrapper partialDepthStream( + PartialDepthStreamRequest partialDepthStreamRequest) throws ApiException { + StreamBlockingQueue queue = partialDepthStreamRaw(partialDepthStreamRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue partialDepthStreamRaw( + PartialDepthStreamRequest partialDepthStreamRequest) throws ApiException { + partialDepthStreamValidateBeforeCall(partialDepthStreamRequest); + + String methodName = + "/@depth@" + .substring(1) + .replace( + "", + partialDepthStreamRequest.getId() != null + ? partialDepthStreamRequest.getId().toString() + : "") + .replace( + "", + partialDepthStreamRequest.getSymbol() != null + ? partialDepthStreamRequest.getSymbol().toString() + : "") + .replace( + "", + partialDepthStreamRequest.getLevels() != null + ? partialDepthStreamRequest.getLevels().toString() + : "") + .replace( + "", + partialDepthStreamRequest.getInterval() != null + ? partialDepthStreamRequest.getInterval().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void partialDepthStreamValidateBeforeCall( + PartialDepthStreamRequest partialDepthStreamRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(partialDepthStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Ticker Stream Pushes full 24h rolling ticker statistics. + * + * @param tickerStreamRequest (required) + * @return TickerStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Ticker Stream -
+ * + * @see Ticker + * Stream Documentation + */ + public StreamBlockingQueueWrapper tickerStream( + TickerStreamRequest tickerStreamRequest) throws ApiException { + StreamBlockingQueue queue = tickerStreamRaw(tickerStreamRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue tickerStreamRaw(TickerStreamRequest tickerStreamRequest) + throws ApiException { + tickerStreamValidateBeforeCall(tickerStreamRequest); + + String methodName = + "/@ticker" + .substring(1) + .replace( + "", + tickerStreamRequest.getId() != null + ? tickerStreamRequest.getId().toString() + : "") + .replace( + "", + tickerStreamRequest.getSymbol() != null + ? tickerStreamRequest.getSymbol().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void tickerStreamValidateBeforeCall(TickerStreamRequest tickerStreamRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(tickerStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Trade Stream Pushes raw trade updates for a symbol. + * + * @param tradeStreamRequest (required) + * @return TradeStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Trade Stream -
+ * + * @see Trade + * Stream Documentation + */ + public StreamBlockingQueueWrapper tradeStream( + TradeStreamRequest tradeStreamRequest) throws ApiException { + StreamBlockingQueue queue = tradeStreamRaw(tradeStreamRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue tradeStreamRaw(TradeStreamRequest tradeStreamRequest) + throws ApiException { + tradeStreamValidateBeforeCall(tradeStreamRequest); + + String methodName = + "/@trade" + .substring(1) + .replace( + "", + tradeStreamRequest.getId() != null + ? tradeStreamRequest.getId().toString() + : "") + .replace( + "", + tradeStreamRequest.getSymbol() != null + ? tradeStreamRequest.getSymbol().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void tradeStreamValidateBeforeCall(TradeStreamRequest tradeStreamRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(tradeStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + public String getRequestID() { + Random rand = new Random(); + return Integer.toString(Math.abs(rand.nextInt())); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AbstractOpenApiSchema.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AbstractOpenApiSchema.java new file mode 100644 index 000000000..e98029939 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AbstractOpenApiSchema.java @@ -0,0 +1,145 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import java.util.Map; +import java.util.Objects; + +/** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map> getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + // @JsonValue + public Object getActualInstance() { + return instance; + } + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) { + this.instance = instance; + } + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf + * schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema) object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) + && Objects.equals(this.isNullable, a.isNullable) + && Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AggregateTradeStreamRequest.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AggregateTradeStreamRequest.java new file mode 100644 index 000000000..76920e7b1 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AggregateTradeStreamRequest.java @@ -0,0 +1,279 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AggregateTradeStreamRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AggregateTradeStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Integer id; + + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public AggregateTradeStreamRequest() {} + + public AggregateTradeStreamRequest id(@jakarta.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Integer id) { + this.id = id; + } + + public AggregateTradeStreamRequest symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Symbol to subscribe, in lowercase stream format. + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AggregateTradeStreamRequest aggregateTradeStreamRequest = (AggregateTradeStreamRequest) o; + return Objects.equals(this.id, aggregateTradeStreamRequest.id) + && Objects.equals(this.symbol, aggregateTradeStreamRequest.symbol); + } + + @Override + public int hashCode() { + return Objects.hash(id, symbol); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AggregateTradeStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Integer idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("symbol"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * AggregateTradeStreamRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AggregateTradeStreamRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AggregateTradeStreamRequest is not" + + " found in the empty JSON string", + AggregateTradeStreamRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AggregateTradeStreamRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AggregateTradeStreamRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AggregateTradeStreamRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AggregateTradeStreamRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AggregateTradeStreamRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AggregateTradeStreamRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AggregateTradeStreamRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AggregateTradeStreamRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AggregateTradeStreamRequest + * @throws IOException if the JSON string is invalid with respect to AggregateTradeStreamRequest + */ + public static AggregateTradeStreamRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AggregateTradeStreamRequest.class); + } + + /** + * Convert an instance of AggregateTradeStreamRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AggregateTradeStreamResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AggregateTradeStreamResponse.java new file mode 100644 index 000000000..f8216c811 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AggregateTradeStreamResponse.java @@ -0,0 +1,613 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AggregateTradeStreamResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AggregateTradeStreamResponse extends BaseDTO { + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private Long aLowerCase; + + public static final String SERIALIZED_NAME_F_LOWER_CASE = "f"; + + @SerializedName(SERIALIZED_NAME_F_LOWER_CASE) + @jakarta.annotation.Nullable + private Long fLowerCase; + + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; + + @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) + @jakarta.annotation.Nullable + private Long lLowerCase; + + public static final String SERIALIZED_NAME_M_LOWER_CASE = "m"; + + @SerializedName(SERIALIZED_NAME_M_LOWER_CASE) + @jakarta.annotation.Nullable + private Boolean mLowerCase; + + public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; + + @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) + @jakarta.annotation.Nullable + private String pLowerCase; + + public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; + + @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) + @jakarta.annotation.Nullable + private String qLowerCase; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public AggregateTradeStreamResponse() {} + + public AggregateTradeStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * Event type + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public AggregateTradeStreamResponse E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event time (ms) + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public AggregateTradeStreamResponse T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * Trade time (ms) + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + public AggregateTradeStreamResponse aLowerCase(@jakarta.annotation.Nullable Long aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + /** + * Aggregated trade ID + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + public Long getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable Long aLowerCase) { + this.aLowerCase = aLowerCase; + } + + public AggregateTradeStreamResponse fLowerCase(@jakarta.annotation.Nullable Long fLowerCase) { + this.fLowerCase = fLowerCase; + return this; + } + + /** + * First trade ID in the aggregation + * + * @return fLowerCase + */ + @jakarta.annotation.Nullable + public Long getfLowerCase() { + return fLowerCase; + } + + public void setfLowerCase(@jakarta.annotation.Nullable Long fLowerCase) { + this.fLowerCase = fLowerCase; + } + + public AggregateTradeStreamResponse lLowerCase(@jakarta.annotation.Nullable Long lLowerCase) { + this.lLowerCase = lLowerCase; + return this; + } + + /** + * Last trade ID in the aggregation + * + * @return lLowerCase + */ + @jakarta.annotation.Nullable + public Long getlLowerCase() { + return lLowerCase; + } + + public void setlLowerCase(@jakarta.annotation.Nullable Long lLowerCase) { + this.lLowerCase = lLowerCase; + } + + public AggregateTradeStreamResponse mLowerCase( + @jakarta.annotation.Nullable Boolean mLowerCase) { + this.mLowerCase = mLowerCase; + return this; + } + + /** + * Is the buyer the market maker + * + * @return mLowerCase + */ + @jakarta.annotation.Nullable + public Boolean getmLowerCase() { + return mLowerCase; + } + + public void setmLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { + this.mLowerCase = mLowerCase; + } + + public AggregateTradeStreamResponse pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + return this; + } + + /** + * Price + * + * @return pLowerCase + */ + @jakarta.annotation.Nullable + public String getpLowerCase() { + return pLowerCase; + } + + public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + } + + public AggregateTradeStreamResponse qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + return this; + } + + /** + * Quantity + * + * @return qLowerCase + */ + @jakarta.annotation.Nullable + public String getqLowerCase() { + return qLowerCase; + } + + public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + } + + public AggregateTradeStreamResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * Symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AggregateTradeStreamResponse aggregateTradeStreamResponse = + (AggregateTradeStreamResponse) o; + return Objects.equals(this.eLowerCase, aggregateTradeStreamResponse.eLowerCase) + && Objects.equals(this.E, aggregateTradeStreamResponse.E) + && Objects.equals(this.T, aggregateTradeStreamResponse.T) + && Objects.equals(this.aLowerCase, aggregateTradeStreamResponse.aLowerCase) + && Objects.equals(this.fLowerCase, aggregateTradeStreamResponse.fLowerCase) + && Objects.equals(this.lLowerCase, aggregateTradeStreamResponse.lLowerCase) + && Objects.equals(this.mLowerCase, aggregateTradeStreamResponse.mLowerCase) + && Objects.equals(this.pLowerCase, aggregateTradeStreamResponse.pLowerCase) + && Objects.equals(this.qLowerCase, aggregateTradeStreamResponse.qLowerCase) + && Objects.equals(this.sLowerCase, aggregateTradeStreamResponse.sLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash( + eLowerCase, + E, + T, + aLowerCase, + fLowerCase, + lLowerCase, + mLowerCase, + pLowerCase, + qLowerCase, + sLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AggregateTradeStreamResponse {\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" fLowerCase: ").append(toIndentedString(fLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append(" mLowerCase: ").append(toIndentedString(mLowerCase)).append("\n"); + sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); + sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + Long aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = aLowerCaseValue.toString(); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + Long fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + String fLowerCaseValueAsString = fLowerCaseValue.toString(); + valMap.put("fLowerCase", fLowerCaseValueAsString); + } + Long lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + Boolean mLowerCaseValue = getmLowerCase(); + if (mLowerCaseValue != null) { + String mLowerCaseValueAsString = mLowerCaseValue.toString(); + valMap.put("mLowerCase", mLowerCaseValueAsString); + } + String pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + String pLowerCaseValueAsString = pLowerCaseValue.toString(); + valMap.put("pLowerCase", pLowerCaseValueAsString); + } + String qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + String qLowerCaseValueAsString = qLowerCaseValue.toString(); + valMap.put("qLowerCase", qLowerCaseValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + Object fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + valMap.put("fLowerCase", fLowerCaseValue); + } + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); + } + Object mLowerCaseValue = getmLowerCase(); + if (mLowerCaseValue != null) { + valMap.put("mLowerCase", mLowerCaseValue); + } + Object pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + valMap.put("pLowerCase", pLowerCaseValue); + } + Object qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + valMap.put("qLowerCase", qLowerCaseValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("e"); + openapiFields.add("E"); + openapiFields.add("T"); + openapiFields.add("a"); + openapiFields.add("f"); + openapiFields.add("l"); + openapiFields.add("m"); + openapiFields.add("p"); + openapiFields.add("q"); + openapiFields.add("s"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * AggregateTradeStreamResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AggregateTradeStreamResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AggregateTradeStreamResponse is not" + + " found in the empty JSON string", + AggregateTradeStreamResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AggregateTradeStreamResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AggregateTradeStreamResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) + && !jsonObj.get("p").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `p` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("p").toString())); + } + if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) + && !jsonObj.get("q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("q").toString())); + } + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AggregateTradeStreamResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AggregateTradeStreamResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(AggregateTradeStreamResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AggregateTradeStreamResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AggregateTradeStreamResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AggregateTradeStreamResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AggregateTradeStreamResponse + * @throws IOException if the JSON string is invalid with respect to + * AggregateTradeStreamResponse + */ + public static AggregateTradeStreamResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AggregateTradeStreamResponse.class); + } + + /** + * Convert an instance of AggregateTradeStreamResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllBookTickerStreamRequest.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllBookTickerStreamRequest.java new file mode 100644 index 000000000..95389b414 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllBookTickerStreamRequest.java @@ -0,0 +1,233 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AllBookTickerStreamRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AllBookTickerStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Integer id; + + public AllBookTickerStreamRequest() {} + + public AllBookTickerStreamRequest id(@jakarta.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Integer id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllBookTickerStreamRequest allBookTickerStreamRequest = (AllBookTickerStreamRequest) o; + return Objects.equals(this.id, allBookTickerStreamRequest.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllBookTickerStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Integer idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AllBookTickerStreamRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AllBookTickerStreamRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AllBookTickerStreamRequest is not" + + " found in the empty JSON string", + AllBookTickerStreamRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AllBookTickerStreamRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AllBookTickerStreamRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AllBookTickerStreamRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AllBookTickerStreamRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AllBookTickerStreamRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AllBookTickerStreamRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AllBookTickerStreamRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AllBookTickerStreamRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AllBookTickerStreamRequest + * @throws IOException if the JSON string is invalid with respect to AllBookTickerStreamRequest + */ + public static AllBookTickerStreamRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AllBookTickerStreamRequest.class); + } + + /** + * Convert an instance of AllBookTickerStreamRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllBookTickerStreamResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllBookTickerStreamResponse.java new file mode 100644 index 000000000..b38c9671c --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllBookTickerStreamResponse.java @@ -0,0 +1,578 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AllBookTickerStreamResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AllBookTickerStreamResponse extends BaseDTO { + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; + + @SerializedName(SERIALIZED_NAME_U_LOWER_CASE) + @jakarta.annotation.Nullable + private Long uLowerCase; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_B_LOWER_CASE = "b"; + + @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) + @jakarta.annotation.Nullable + private String bLowerCase; + + public static final String SERIALIZED_NAME_B = "B"; + + @SerializedName(SERIALIZED_NAME_B) + @jakarta.annotation.Nullable + private String B; + + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private String aLowerCase; + + public static final String SERIALIZED_NAME_A = "A"; + + @SerializedName(SERIALIZED_NAME_A) + @jakarta.annotation.Nullable + private String A; + + public AllBookTickerStreamResponse() {} + + public AllBookTickerStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * eventType + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public AllBookTickerStreamResponse E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * eventTime + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public AllBookTickerStreamResponse T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * transactionTime + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + public AllBookTickerStreamResponse uLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + return this; + } + + /** + * updateId + * + * @return uLowerCase + */ + @jakarta.annotation.Nullable + public Long getuLowerCase() { + return uLowerCase; + } + + public void setuLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + } + + public AllBookTickerStreamResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public AllBookTickerStreamResponse bLowerCase(@jakarta.annotation.Nullable String bLowerCase) { + this.bLowerCase = bLowerCase; + return this; + } + + /** + * bid1Price + * + * @return bLowerCase + */ + @jakarta.annotation.Nullable + public String getbLowerCase() { + return bLowerCase; + } + + public void setbLowerCase(@jakarta.annotation.Nullable String bLowerCase) { + this.bLowerCase = bLowerCase; + } + + public AllBookTickerStreamResponse B(@jakarta.annotation.Nullable String B) { + this.B = B; + return this; + } + + /** + * bid1Quantity + * + * @return B + */ + @jakarta.annotation.Nullable + public String getB() { + return B; + } + + public void setB(@jakarta.annotation.Nullable String B) { + this.B = B; + } + + public AllBookTickerStreamResponse aLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + /** + * ask1Price + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + public String getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + } + + public AllBookTickerStreamResponse A(@jakarta.annotation.Nullable String A) { + this.A = A; + return this; + } + + /** + * ask1Quantity + * + * @return A + */ + @jakarta.annotation.Nullable + public String getA() { + return A; + } + + public void setA(@jakarta.annotation.Nullable String A) { + this.A = A; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllBookTickerStreamResponse allBookTickerStreamResponse = (AllBookTickerStreamResponse) o; + return Objects.equals(this.eLowerCase, allBookTickerStreamResponse.eLowerCase) + && Objects.equals(this.E, allBookTickerStreamResponse.E) + && Objects.equals(this.T, allBookTickerStreamResponse.T) + && Objects.equals(this.uLowerCase, allBookTickerStreamResponse.uLowerCase) + && Objects.equals(this.sLowerCase, allBookTickerStreamResponse.sLowerCase) + && Objects.equals(this.bLowerCase, allBookTickerStreamResponse.bLowerCase) + && Objects.equals(this.B, allBookTickerStreamResponse.B) + && Objects.equals(this.aLowerCase, allBookTickerStreamResponse.aLowerCase) + && Objects.equals(this.A, allBookTickerStreamResponse.A); + } + + @Override + public int hashCode() { + return Objects.hash(eLowerCase, E, T, uLowerCase, sLowerCase, bLowerCase, B, aLowerCase, A); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllBookTickerStreamResponse {\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); + sb.append(" B: ").append(toIndentedString(B)).append("\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" A: ").append(toIndentedString(A)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + Long uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + String uLowerCaseValueAsString = uLowerCaseValue.toString(); + valMap.put("uLowerCase", uLowerCaseValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + String bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + String bLowerCaseValueAsString = bLowerCaseValue.toString(); + valMap.put("bLowerCase", bLowerCaseValueAsString); + } + String BValue = getB(); + if (BValue != null) { + String BValueAsString = BValue.toString(); + valMap.put("B", BValueAsString); + } + String aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = aLowerCaseValue.toString(); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + String AValue = getA(); + if (AValue != null) { + String AValueAsString = AValue.toString(); + valMap.put("A", AValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + Object uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + valMap.put("uLowerCase", uLowerCaseValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + valMap.put("bLowerCase", bLowerCaseValue); + } + Object BValue = getB(); + if (BValue != null) { + valMap.put("B", BValue); + } + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + Object AValue = getA(); + if (AValue != null) { + valMap.put("A", AValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("e"); + openapiFields.add("E"); + openapiFields.add("T"); + openapiFields.add("u"); + openapiFields.add("s"); + openapiFields.add("b"); + openapiFields.add("B"); + openapiFields.add("a"); + openapiFields.add("A"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * AllBookTickerStreamResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AllBookTickerStreamResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AllBookTickerStreamResponse is not" + + " found in the empty JSON string", + AllBookTickerStreamResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AllBookTickerStreamResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AllBookTickerStreamResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("b") != null && !jsonObj.get("b").isJsonNull()) + && !jsonObj.get("b").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `b` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("b").toString())); + } + if ((jsonObj.get("B") != null && !jsonObj.get("B").isJsonNull()) + && !jsonObj.get("B").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `B` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("B").toString())); + } + if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) + && !jsonObj.get("a").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `a` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("a").toString())); + } + if ((jsonObj.get("A") != null && !jsonObj.get("A").isJsonNull()) + && !jsonObj.get("A").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `A` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("A").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AllBookTickerStreamResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AllBookTickerStreamResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AllBookTickerStreamResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AllBookTickerStreamResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AllBookTickerStreamResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AllBookTickerStreamResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AllBookTickerStreamResponse + * @throws IOException if the JSON string is invalid with respect to AllBookTickerStreamResponse + */ + public static AllBookTickerStreamResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AllBookTickerStreamResponse.class); + } + + /** + * Convert an instance of AllBookTickerStreamResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllMiniTickerStreamRequest.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllMiniTickerStreamRequest.java new file mode 100644 index 000000000..50ec410a2 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllMiniTickerStreamRequest.java @@ -0,0 +1,233 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AllMiniTickerStreamRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AllMiniTickerStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Integer id; + + public AllMiniTickerStreamRequest() {} + + public AllMiniTickerStreamRequest id(@jakarta.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Integer id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllMiniTickerStreamRequest allMiniTickerStreamRequest = (AllMiniTickerStreamRequest) o; + return Objects.equals(this.id, allMiniTickerStreamRequest.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllMiniTickerStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Integer idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AllMiniTickerStreamRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AllMiniTickerStreamRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AllMiniTickerStreamRequest is not" + + " found in the empty JSON string", + AllMiniTickerStreamRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AllMiniTickerStreamRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AllMiniTickerStreamRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AllMiniTickerStreamRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AllMiniTickerStreamRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AllMiniTickerStreamRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AllMiniTickerStreamRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AllMiniTickerStreamRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AllMiniTickerStreamRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AllMiniTickerStreamRequest + * @throws IOException if the JSON string is invalid with respect to AllMiniTickerStreamRequest + */ + public static AllMiniTickerStreamRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AllMiniTickerStreamRequest.class); + } + + /** + * Convert an instance of AllMiniTickerStreamRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllMiniTickerStreamResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllMiniTickerStreamResponse.java new file mode 100644 index 000000000..801b50cef --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllMiniTickerStreamResponse.java @@ -0,0 +1,603 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AllMiniTickerStreamResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AllMiniTickerStreamResponse extends BaseDTO { + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; + + @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) + @jakarta.annotation.Nullable + private String cLowerCase; + + public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; + + @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) + @jakarta.annotation.Nullable + private String oLowerCase; + + public static final String SERIALIZED_NAME_H_LOWER_CASE = "h"; + + @SerializedName(SERIALIZED_NAME_H_LOWER_CASE) + @jakarta.annotation.Nullable + private String hLowerCase; + + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; + + @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) + @jakarta.annotation.Nullable + private String lLowerCase; + + public static final String SERIALIZED_NAME_V_LOWER_CASE = "v"; + + @SerializedName(SERIALIZED_NAME_V_LOWER_CASE) + @jakarta.annotation.Nullable + private String vLowerCase; + + public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; + + @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) + @jakarta.annotation.Nullable + private String qLowerCase; + + public AllMiniTickerStreamResponse() {} + + public AllMiniTickerStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * eventType + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public AllMiniTickerStreamResponse E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * eventTime + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public AllMiniTickerStreamResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public AllMiniTickerStreamResponse cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + return this; + } + + /** + * closePrice + * + * @return cLowerCase + */ + @jakarta.annotation.Nullable + public String getcLowerCase() { + return cLowerCase; + } + + public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + } + + public AllMiniTickerStreamResponse oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + return this; + } + + /** + * openPrice + * + * @return oLowerCase + */ + @jakarta.annotation.Nullable + public String getoLowerCase() { + return oLowerCase; + } + + public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + } + + public AllMiniTickerStreamResponse hLowerCase(@jakarta.annotation.Nullable String hLowerCase) { + this.hLowerCase = hLowerCase; + return this; + } + + /** + * highPrice + * + * @return hLowerCase + */ + @jakarta.annotation.Nullable + public String gethLowerCase() { + return hLowerCase; + } + + public void sethLowerCase(@jakarta.annotation.Nullable String hLowerCase) { + this.hLowerCase = hLowerCase; + } + + public AllMiniTickerStreamResponse lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + return this; + } + + /** + * lowPrice + * + * @return lLowerCase + */ + @jakarta.annotation.Nullable + public String getlLowerCase() { + return lLowerCase; + } + + public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + } + + public AllMiniTickerStreamResponse vLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + return this; + } + + /** + * volume + * + * @return vLowerCase + */ + @jakarta.annotation.Nullable + public String getvLowerCase() { + return vLowerCase; + } + + public void setvLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + } + + public AllMiniTickerStreamResponse qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + return this; + } + + /** + * quoteVolume + * + * @return qLowerCase + */ + @jakarta.annotation.Nullable + public String getqLowerCase() { + return qLowerCase; + } + + public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllMiniTickerStreamResponse allMiniTickerStreamResponse = (AllMiniTickerStreamResponse) o; + return Objects.equals(this.eLowerCase, allMiniTickerStreamResponse.eLowerCase) + && Objects.equals(this.E, allMiniTickerStreamResponse.E) + && Objects.equals(this.sLowerCase, allMiniTickerStreamResponse.sLowerCase) + && Objects.equals(this.cLowerCase, allMiniTickerStreamResponse.cLowerCase) + && Objects.equals(this.oLowerCase, allMiniTickerStreamResponse.oLowerCase) + && Objects.equals(this.hLowerCase, allMiniTickerStreamResponse.hLowerCase) + && Objects.equals(this.lLowerCase, allMiniTickerStreamResponse.lLowerCase) + && Objects.equals(this.vLowerCase, allMiniTickerStreamResponse.vLowerCase) + && Objects.equals(this.qLowerCase, allMiniTickerStreamResponse.qLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash( + eLowerCase, + E, + sLowerCase, + cLowerCase, + oLowerCase, + hLowerCase, + lLowerCase, + vLowerCase, + qLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllMiniTickerStreamResponse {\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); + sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); + sb.append(" hLowerCase: ").append(toIndentedString(hLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); + sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + String cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + String cLowerCaseValueAsString = cLowerCaseValue.toString(); + valMap.put("cLowerCase", cLowerCaseValueAsString); + } + String oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + String oLowerCaseValueAsString = oLowerCaseValue.toString(); + valMap.put("oLowerCase", oLowerCaseValueAsString); + } + String hLowerCaseValue = gethLowerCase(); + if (hLowerCaseValue != null) { + String hLowerCaseValueAsString = hLowerCaseValue.toString(); + valMap.put("hLowerCase", hLowerCaseValueAsString); + } + String lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + String vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + String vLowerCaseValueAsString = vLowerCaseValue.toString(); + valMap.put("vLowerCase", vLowerCaseValueAsString); + } + String qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + String qLowerCaseValueAsString = qLowerCaseValue.toString(); + valMap.put("qLowerCase", qLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + valMap.put("cLowerCase", cLowerCaseValue); + } + Object oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + valMap.put("oLowerCase", oLowerCaseValue); + } + Object hLowerCaseValue = gethLowerCase(); + if (hLowerCaseValue != null) { + valMap.put("hLowerCase", hLowerCaseValue); + } + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); + } + Object vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + valMap.put("vLowerCase", vLowerCaseValue); + } + Object qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + valMap.put("qLowerCase", qLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("e"); + openapiFields.add("E"); + openapiFields.add("s"); + openapiFields.add("c"); + openapiFields.add("o"); + openapiFields.add("h"); + openapiFields.add("l"); + openapiFields.add("v"); + openapiFields.add("q"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * AllMiniTickerStreamResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AllMiniTickerStreamResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AllMiniTickerStreamResponse is not" + + " found in the empty JSON string", + AllMiniTickerStreamResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AllMiniTickerStreamResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AllMiniTickerStreamResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) + && !jsonObj.get("c").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `c` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("c").toString())); + } + if ((jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) + && !jsonObj.get("o").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `o` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("o").toString())); + } + if ((jsonObj.get("h") != null && !jsonObj.get("h").isJsonNull()) + && !jsonObj.get("h").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `h` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("h").toString())); + } + if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) + && !jsonObj.get("l").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `l` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("l").toString())); + } + if ((jsonObj.get("v") != null && !jsonObj.get("v").isJsonNull()) + && !jsonObj.get("v").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `v` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("v").toString())); + } + if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) + && !jsonObj.get("q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("q").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AllMiniTickerStreamResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AllMiniTickerStreamResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AllMiniTickerStreamResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AllMiniTickerStreamResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AllMiniTickerStreamResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AllMiniTickerStreamResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AllMiniTickerStreamResponse + * @throws IOException if the JSON string is invalid with respect to AllMiniTickerStreamResponse + */ + public static AllMiniTickerStreamResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AllMiniTickerStreamResponse.class); + } + + /** + * Convert an instance of AllMiniTickerStreamResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllTickerStreamRequest.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllTickerStreamRequest.java new file mode 100644 index 000000000..b44042ae1 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllTickerStreamRequest.java @@ -0,0 +1,232 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AllTickerStreamRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AllTickerStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Integer id; + + public AllTickerStreamRequest() {} + + public AllTickerStreamRequest id(@jakarta.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Integer id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllTickerStreamRequest allTickerStreamRequest = (AllTickerStreamRequest) o; + return Objects.equals(this.id, allTickerStreamRequest.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllTickerStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Integer idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AllTickerStreamRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AllTickerStreamRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AllTickerStreamRequest is not found in" + + " the empty JSON string", + AllTickerStreamRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AllTickerStreamRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AllTickerStreamRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AllTickerStreamRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AllTickerStreamRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AllTickerStreamRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AllTickerStreamRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AllTickerStreamRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AllTickerStreamRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AllTickerStreamRequest + * @throws IOException if the JSON string is invalid with respect to AllTickerStreamRequest + */ + public static AllTickerStreamRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AllTickerStreamRequest.class); + } + + /** + * Convert an instance of AllTickerStreamRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllTickerStreamResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllTickerStreamResponse.java new file mode 100644 index 000000000..a97a62463 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllTickerStreamResponse.java @@ -0,0 +1,976 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AllTickerStreamResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AllTickerStreamResponse extends BaseDTO { + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; + + @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) + @jakarta.annotation.Nullable + private String pLowerCase; + + public static final String SERIALIZED_NAME_P = "P"; + + @SerializedName(SERIALIZED_NAME_P) + @jakarta.annotation.Nullable + private String P; + + public static final String SERIALIZED_NAME_W_LOWER_CASE = "w"; + + @SerializedName(SERIALIZED_NAME_W_LOWER_CASE) + @jakarta.annotation.Nullable + private String wLowerCase; + + public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; + + @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) + @jakarta.annotation.Nullable + private String cLowerCase; + + public static final String SERIALIZED_NAME_Q = "Q"; + + @SerializedName(SERIALIZED_NAME_Q) + @jakarta.annotation.Nullable + private String Q; + + public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; + + @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) + @jakarta.annotation.Nullable + private String oLowerCase; + + public static final String SERIALIZED_NAME_H_LOWER_CASE = "h"; + + @SerializedName(SERIALIZED_NAME_H_LOWER_CASE) + @jakarta.annotation.Nullable + private String hLowerCase; + + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; + + @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) + @jakarta.annotation.Nullable + private String lLowerCase; + + public static final String SERIALIZED_NAME_V_LOWER_CASE = "v"; + + @SerializedName(SERIALIZED_NAME_V_LOWER_CASE) + @jakarta.annotation.Nullable + private String vLowerCase; + + public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; + + @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) + @jakarta.annotation.Nullable + private String qLowerCase; + + public static final String SERIALIZED_NAME_O = "O"; + + @SerializedName(SERIALIZED_NAME_O) + @jakarta.annotation.Nullable + private Long O; + + public static final String SERIALIZED_NAME_C = "C"; + + @SerializedName(SERIALIZED_NAME_C) + @jakarta.annotation.Nullable + private Long C; + + public static final String SERIALIZED_NAME_F = "F"; + + @SerializedName(SERIALIZED_NAME_F) + @jakarta.annotation.Nullable + private Long F; + + public static final String SERIALIZED_NAME_L = "L"; + + @SerializedName(SERIALIZED_NAME_L) + @jakarta.annotation.Nullable + private Long L; + + public static final String SERIALIZED_NAME_N_LOWER_CASE = "n"; + + @SerializedName(SERIALIZED_NAME_N_LOWER_CASE) + @jakarta.annotation.Nullable + private Long nLowerCase; + + public AllTickerStreamResponse() {} + + public AllTickerStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * eventType + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public AllTickerStreamResponse E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * eventTime + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public AllTickerStreamResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public AllTickerStreamResponse pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + return this; + } + + /** + * priceChange + * + * @return pLowerCase + */ + @jakarta.annotation.Nullable + public String getpLowerCase() { + return pLowerCase; + } + + public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + } + + public AllTickerStreamResponse P(@jakarta.annotation.Nullable String P) { + this.P = P; + return this; + } + + /** + * priceChangePercent + * + * @return P + */ + @jakarta.annotation.Nullable + public String getP() { + return P; + } + + public void setP(@jakarta.annotation.Nullable String P) { + this.P = P; + } + + public AllTickerStreamResponse wLowerCase(@jakarta.annotation.Nullable String wLowerCase) { + this.wLowerCase = wLowerCase; + return this; + } + + /** + * averagePrice + * + * @return wLowerCase + */ + @jakarta.annotation.Nullable + public String getwLowerCase() { + return wLowerCase; + } + + public void setwLowerCase(@jakarta.annotation.Nullable String wLowerCase) { + this.wLowerCase = wLowerCase; + } + + public AllTickerStreamResponse cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + return this; + } + + /** + * closePrice + * + * @return cLowerCase + */ + @jakarta.annotation.Nullable + public String getcLowerCase() { + return cLowerCase; + } + + public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + } + + public AllTickerStreamResponse Q(@jakarta.annotation.Nullable String Q) { + this.Q = Q; + return this; + } + + /** + * lastTradeVolume + * + * @return Q + */ + @jakarta.annotation.Nullable + public String getQ() { + return Q; + } + + public void setQ(@jakarta.annotation.Nullable String Q) { + this.Q = Q; + } + + public AllTickerStreamResponse oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + return this; + } + + /** + * openPrice + * + * @return oLowerCase + */ + @jakarta.annotation.Nullable + public String getoLowerCase() { + return oLowerCase; + } + + public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + } + + public AllTickerStreamResponse hLowerCase(@jakarta.annotation.Nullable String hLowerCase) { + this.hLowerCase = hLowerCase; + return this; + } + + /** + * highPrice + * + * @return hLowerCase + */ + @jakarta.annotation.Nullable + public String gethLowerCase() { + return hLowerCase; + } + + public void sethLowerCase(@jakarta.annotation.Nullable String hLowerCase) { + this.hLowerCase = hLowerCase; + } + + public AllTickerStreamResponse lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + return this; + } + + /** + * lowPrice + * + * @return lLowerCase + */ + @jakarta.annotation.Nullable + public String getlLowerCase() { + return lLowerCase; + } + + public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + } + + public AllTickerStreamResponse vLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + return this; + } + + /** + * volume + * + * @return vLowerCase + */ + @jakarta.annotation.Nullable + public String getvLowerCase() { + return vLowerCase; + } + + public void setvLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + } + + public AllTickerStreamResponse qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + return this; + } + + /** + * quoteVolume + * + * @return qLowerCase + */ + @jakarta.annotation.Nullable + public String getqLowerCase() { + return qLowerCase; + } + + public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + } + + public AllTickerStreamResponse O(@jakarta.annotation.Nullable Long O) { + this.O = O; + return this; + } + + /** + * startTime + * + * @return O + */ + @jakarta.annotation.Nullable + public Long getO() { + return O; + } + + public void setO(@jakarta.annotation.Nullable Long O) { + this.O = O; + } + + public AllTickerStreamResponse C(@jakarta.annotation.Nullable Long C) { + this.C = C; + return this; + } + + /** + * endTime + * + * @return C + */ + @jakarta.annotation.Nullable + public Long getC() { + return C; + } + + public void setC(@jakarta.annotation.Nullable Long C) { + this.C = C; + } + + public AllTickerStreamResponse F(@jakarta.annotation.Nullable Long F) { + this.F = F; + return this; + } + + /** + * firstTradeId + * + * @return F + */ + @jakarta.annotation.Nullable + public Long getF() { + return F; + } + + public void setF(@jakarta.annotation.Nullable Long F) { + this.F = F; + } + + public AllTickerStreamResponse L(@jakarta.annotation.Nullable Long L) { + this.L = L; + return this; + } + + /** + * lastTradeId + * + * @return L + */ + @jakarta.annotation.Nullable + public Long getL() { + return L; + } + + public void setL(@jakarta.annotation.Nullable Long L) { + this.L = L; + } + + public AllTickerStreamResponse nLowerCase(@jakarta.annotation.Nullable Long nLowerCase) { + this.nLowerCase = nLowerCase; + return this; + } + + /** + * tradeNum + * + * @return nLowerCase + */ + @jakarta.annotation.Nullable + public Long getnLowerCase() { + return nLowerCase; + } + + public void setnLowerCase(@jakarta.annotation.Nullable Long nLowerCase) { + this.nLowerCase = nLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllTickerStreamResponse allTickerStreamResponse = (AllTickerStreamResponse) o; + return Objects.equals(this.eLowerCase, allTickerStreamResponse.eLowerCase) + && Objects.equals(this.E, allTickerStreamResponse.E) + && Objects.equals(this.sLowerCase, allTickerStreamResponse.sLowerCase) + && Objects.equals(this.pLowerCase, allTickerStreamResponse.pLowerCase) + && Objects.equals(this.P, allTickerStreamResponse.P) + && Objects.equals(this.wLowerCase, allTickerStreamResponse.wLowerCase) + && Objects.equals(this.cLowerCase, allTickerStreamResponse.cLowerCase) + && Objects.equals(this.Q, allTickerStreamResponse.Q) + && Objects.equals(this.oLowerCase, allTickerStreamResponse.oLowerCase) + && Objects.equals(this.hLowerCase, allTickerStreamResponse.hLowerCase) + && Objects.equals(this.lLowerCase, allTickerStreamResponse.lLowerCase) + && Objects.equals(this.vLowerCase, allTickerStreamResponse.vLowerCase) + && Objects.equals(this.qLowerCase, allTickerStreamResponse.qLowerCase) + && Objects.equals(this.O, allTickerStreamResponse.O) + && Objects.equals(this.C, allTickerStreamResponse.C) + && Objects.equals(this.F, allTickerStreamResponse.F) + && Objects.equals(this.L, allTickerStreamResponse.L) + && Objects.equals(this.nLowerCase, allTickerStreamResponse.nLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash( + eLowerCase, + E, + sLowerCase, + pLowerCase, + P, + wLowerCase, + cLowerCase, + Q, + oLowerCase, + hLowerCase, + lLowerCase, + vLowerCase, + qLowerCase, + O, + C, + F, + L, + nLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllTickerStreamResponse {\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); + sb.append(" P: ").append(toIndentedString(P)).append("\n"); + sb.append(" wLowerCase: ").append(toIndentedString(wLowerCase)).append("\n"); + sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); + sb.append(" Q: ").append(toIndentedString(Q)).append("\n"); + sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); + sb.append(" hLowerCase: ").append(toIndentedString(hLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); + sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append(" O: ").append(toIndentedString(O)).append("\n"); + sb.append(" C: ").append(toIndentedString(C)).append("\n"); + sb.append(" F: ").append(toIndentedString(F)).append("\n"); + sb.append(" L: ").append(toIndentedString(L)).append("\n"); + sb.append(" nLowerCase: ").append(toIndentedString(nLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + String pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + String pLowerCaseValueAsString = pLowerCaseValue.toString(); + valMap.put("pLowerCase", pLowerCaseValueAsString); + } + String PValue = getP(); + if (PValue != null) { + String PValueAsString = PValue.toString(); + valMap.put("P", PValueAsString); + } + String wLowerCaseValue = getwLowerCase(); + if (wLowerCaseValue != null) { + String wLowerCaseValueAsString = wLowerCaseValue.toString(); + valMap.put("wLowerCase", wLowerCaseValueAsString); + } + String cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + String cLowerCaseValueAsString = cLowerCaseValue.toString(); + valMap.put("cLowerCase", cLowerCaseValueAsString); + } + String QValue = getQ(); + if (QValue != null) { + String QValueAsString = QValue.toString(); + valMap.put("Q", QValueAsString); + } + String oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + String oLowerCaseValueAsString = oLowerCaseValue.toString(); + valMap.put("oLowerCase", oLowerCaseValueAsString); + } + String hLowerCaseValue = gethLowerCase(); + if (hLowerCaseValue != null) { + String hLowerCaseValueAsString = hLowerCaseValue.toString(); + valMap.put("hLowerCase", hLowerCaseValueAsString); + } + String lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + String vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + String vLowerCaseValueAsString = vLowerCaseValue.toString(); + valMap.put("vLowerCase", vLowerCaseValueAsString); + } + String qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + String qLowerCaseValueAsString = qLowerCaseValue.toString(); + valMap.put("qLowerCase", qLowerCaseValueAsString); + } + Long OValue = getO(); + if (OValue != null) { + String OValueAsString = OValue.toString(); + valMap.put("O", OValueAsString); + } + Long CValue = getC(); + if (CValue != null) { + String CValueAsString = CValue.toString(); + valMap.put("C", CValueAsString); + } + Long FValue = getF(); + if (FValue != null) { + String FValueAsString = FValue.toString(); + valMap.put("F", FValueAsString); + } + Long LValue = getL(); + if (LValue != null) { + String LValueAsString = LValue.toString(); + valMap.put("L", LValueAsString); + } + Long nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + String nLowerCaseValueAsString = nLowerCaseValue.toString(); + valMap.put("nLowerCase", nLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + valMap.put("pLowerCase", pLowerCaseValue); + } + Object PValue = getP(); + if (PValue != null) { + valMap.put("P", PValue); + } + Object wLowerCaseValue = getwLowerCase(); + if (wLowerCaseValue != null) { + valMap.put("wLowerCase", wLowerCaseValue); + } + Object cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + valMap.put("cLowerCase", cLowerCaseValue); + } + Object QValue = getQ(); + if (QValue != null) { + valMap.put("Q", QValue); + } + Object oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + valMap.put("oLowerCase", oLowerCaseValue); + } + Object hLowerCaseValue = gethLowerCase(); + if (hLowerCaseValue != null) { + valMap.put("hLowerCase", hLowerCaseValue); + } + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); + } + Object vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + valMap.put("vLowerCase", vLowerCaseValue); + } + Object qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + valMap.put("qLowerCase", qLowerCaseValue); + } + Object OValue = getO(); + if (OValue != null) { + valMap.put("O", OValue); + } + Object CValue = getC(); + if (CValue != null) { + valMap.put("C", CValue); + } + Object FValue = getF(); + if (FValue != null) { + valMap.put("F", FValue); + } + Object LValue = getL(); + if (LValue != null) { + valMap.put("L", LValue); + } + Object nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + valMap.put("nLowerCase", nLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("e"); + openapiFields.add("E"); + openapiFields.add("s"); + openapiFields.add("p"); + openapiFields.add("P"); + openapiFields.add("w"); + openapiFields.add("c"); + openapiFields.add("Q"); + openapiFields.add("o"); + openapiFields.add("h"); + openapiFields.add("l"); + openapiFields.add("v"); + openapiFields.add("q"); + openapiFields.add("O"); + openapiFields.add("C"); + openapiFields.add("F"); + openapiFields.add("L"); + openapiFields.add("n"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AllTickerStreamResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AllTickerStreamResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AllTickerStreamResponse is not found" + + " in the empty JSON string", + AllTickerStreamResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AllTickerStreamResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AllTickerStreamResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) + && !jsonObj.get("p").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `p` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("p").toString())); + } + if ((jsonObj.get("P") != null && !jsonObj.get("P").isJsonNull()) + && !jsonObj.get("P").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `P` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("P").toString())); + } + if ((jsonObj.get("w") != null && !jsonObj.get("w").isJsonNull()) + && !jsonObj.get("w").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `w` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("w").toString())); + } + if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) + && !jsonObj.get("c").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `c` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("c").toString())); + } + if ((jsonObj.get("Q") != null && !jsonObj.get("Q").isJsonNull()) + && !jsonObj.get("Q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("Q").toString())); + } + if ((jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) + && !jsonObj.get("o").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `o` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("o").toString())); + } + if ((jsonObj.get("h") != null && !jsonObj.get("h").isJsonNull()) + && !jsonObj.get("h").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `h` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("h").toString())); + } + if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) + && !jsonObj.get("l").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `l` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("l").toString())); + } + if ((jsonObj.get("v") != null && !jsonObj.get("v").isJsonNull()) + && !jsonObj.get("v").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `v` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("v").toString())); + } + if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) + && !jsonObj.get("q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("q").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AllTickerStreamResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AllTickerStreamResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AllTickerStreamResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AllTickerStreamResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AllTickerStreamResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AllTickerStreamResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AllTickerStreamResponse + * @throws IOException if the JSON string is invalid with respect to AllTickerStreamResponse + */ + public static AllTickerStreamResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AllTickerStreamResponse.class); + } + + /** + * Convert an instance of AllTickerStreamResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllTokens24hTickerStreamRequest.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllTokens24hTickerStreamRequest.java new file mode 100644 index 000000000..72e96ff41 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllTokens24hTickerStreamRequest.java @@ -0,0 +1,238 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AllTokens24hTickerStreamRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AllTokens24hTickerStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Integer id; + + public AllTokens24hTickerStreamRequest() {} + + public AllTokens24hTickerStreamRequest id(@jakarta.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Integer id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllTokens24hTickerStreamRequest allTokens24hTickerStreamRequest = + (AllTokens24hTickerStreamRequest) o; + return Objects.equals(this.id, allTokens24hTickerStreamRequest.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllTokens24hTickerStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Integer idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * AllTokens24hTickerStreamRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AllTokens24hTickerStreamRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AllTokens24hTickerStreamRequest is not" + + " found in the empty JSON string", + AllTokens24hTickerStreamRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AllTokens24hTickerStreamRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AllTokens24hTickerStreamRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AllTokens24hTickerStreamRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AllTokens24hTickerStreamRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(AllTokens24hTickerStreamRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AllTokens24hTickerStreamRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AllTokens24hTickerStreamRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AllTokens24hTickerStreamRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AllTokens24hTickerStreamRequest + * @throws IOException if the JSON string is invalid with respect to + * AllTokens24hTickerStreamRequest + */ + public static AllTokens24hTickerStreamRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AllTokens24hTickerStreamRequest.class); + } + + /** + * Convert an instance of AllTokens24hTickerStreamRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllTokens24hTickerStreamResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllTokens24hTickerStreamResponse.java new file mode 100644 index 000000000..d0ddfeff0 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllTokens24hTickerStreamResponse.java @@ -0,0 +1,322 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AllTokens24hTickerStreamResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AllTokens24hTickerStreamResponse extends BaseDTO { + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_D_LOWER_CASE = "d"; + + @SerializedName(SERIALIZED_NAME_D_LOWER_CASE) + @jakarta.annotation.Nullable + private List<@Valid AllTokens24hTickerStreamResponseDInner> dLowerCase; + + public AllTokens24hTickerStreamResponse() {} + + public AllTokens24hTickerStreamResponse eLowerCase( + @jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * Event type + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public AllTokens24hTickerStreamResponse dLowerCase( + @jakarta.annotation.Nullable + List<@Valid AllTokens24hTickerStreamResponseDInner> dLowerCase) { + this.dLowerCase = dLowerCase; + return this; + } + + public AllTokens24hTickerStreamResponse addDLowerCaseItem( + AllTokens24hTickerStreamResponseDInner dLowerCaseItem) { + if (this.dLowerCase == null) { + this.dLowerCase = new ArrayList<>(); + } + this.dLowerCase.add(dLowerCaseItem); + return this; + } + + /** + * Per-token 24-hour ticker metrics + * + * @return dLowerCase + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid AllTokens24hTickerStreamResponseDInner> getdLowerCase() { + return dLowerCase; + } + + public void setdLowerCase( + @jakarta.annotation.Nullable + List<@Valid AllTokens24hTickerStreamResponseDInner> dLowerCase) { + this.dLowerCase = dLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllTokens24hTickerStreamResponse allTokens24hTickerStreamResponse = + (AllTokens24hTickerStreamResponse) o; + return Objects.equals(this.eLowerCase, allTokens24hTickerStreamResponse.eLowerCase) + && Objects.equals(this.dLowerCase, allTokens24hTickerStreamResponse.dLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash(eLowerCase, dLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllTokens24hTickerStreamResponse {\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" dLowerCase: ").append(toIndentedString(dLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + List<@Valid AllTokens24hTickerStreamResponseDInner> dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + String dLowerCaseValueAsString = JSON.getGson().toJson(dLowerCaseValue); + valMap.put("dLowerCase", dLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + valMap.put("dLowerCase", dLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("e"); + openapiFields.add("d"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * AllTokens24hTickerStreamResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AllTokens24hTickerStreamResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AllTokens24hTickerStreamResponse is" + + " not found in the empty JSON string", + AllTokens24hTickerStreamResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AllTokens24hTickerStreamResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AllTokens24hTickerStreamResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + if (jsonObj.get("d") != null && !jsonObj.get("d").isJsonNull()) { + JsonArray jsonArraydLowerCase = jsonObj.getAsJsonArray("d"); + if (jsonArraydLowerCase != null) { + // ensure the json data is an array + if (!jsonObj.get("d").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `d` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("d").toString())); + } + + // validate the optional field `d` (array) + for (int i = 0; i < jsonArraydLowerCase.size(); i++) { + AllTokens24hTickerStreamResponseDInner.validateJsonElement( + jsonArraydLowerCase.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AllTokens24hTickerStreamResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AllTokens24hTickerStreamResponse' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(AllTokens24hTickerStreamResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AllTokens24hTickerStreamResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AllTokens24hTickerStreamResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AllTokens24hTickerStreamResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AllTokens24hTickerStreamResponse + * @throws IOException if the JSON string is invalid with respect to + * AllTokens24hTickerStreamResponse + */ + public static AllTokens24hTickerStreamResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AllTokens24hTickerStreamResponse.class); + } + + /** + * Convert an instance of AllTokens24hTickerStreamResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllTokens24hTickerStreamResponseDInner.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllTokens24hTickerStreamResponseDInner.java new file mode 100644 index 000000000..9d056c838 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/AllTokens24hTickerStreamResponseDInner.java @@ -0,0 +1,691 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AllTokens24hTickerStreamResponseDInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AllTokens24hTickerStreamResponseDInner extends BaseDTO { + public static final String SERIALIZED_NAME_CA = "ca"; + + @SerializedName(SERIALIZED_NAME_CA) + @jakarta.annotation.Nullable + private String ca; + + public static final String SERIALIZED_NAME_CNT24 = "cnt24"; + + @SerializedName(SERIALIZED_NAME_CNT24) + @jakarta.annotation.Nullable + private Long cnt24; + + public static final String SERIALIZED_NAME_FDV = "fdv"; + + @SerializedName(SERIALIZED_NAME_FDV) + @jakarta.annotation.Nullable + private String fdv; + + public static final String SERIALIZED_NAME_HC = "hc"; + + @SerializedName(SERIALIZED_NAME_HC) + @jakarta.annotation.Nullable + private String hc; + + public static final String SERIALIZED_NAME_LIQ = "liq"; + + @SerializedName(SERIALIZED_NAME_LIQ) + @jakarta.annotation.Nullable + private String liq; + + public static final String SERIALIZED_NAME_MC = "mc"; + + @SerializedName(SERIALIZED_NAME_MC) + @jakarta.annotation.Nullable + private String mc; + + public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; + + @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) + @jakarta.annotation.Nullable + private String pLowerCase; + + public static final String SERIALIZED_NAME_PC24 = "pc24"; + + @SerializedName(SERIALIZED_NAME_PC24) + @jakarta.annotation.Nullable + private String pc24; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; + + @SerializedName(SERIALIZED_NAME_T_LOWER_CASE) + @jakarta.annotation.Nullable + private Long tLowerCase; + + public static final String SERIALIZED_NAME_VOL24 = "vol24"; + + @SerializedName(SERIALIZED_NAME_VOL24) + @jakarta.annotation.Nullable + private String vol24; + + public AllTokens24hTickerStreamResponseDInner() {} + + public AllTokens24hTickerStreamResponseDInner ca(@jakarta.annotation.Nullable String ca) { + this.ca = ca; + return this; + } + + /** + * Contract address@chain ID + * + * @return ca + */ + @jakarta.annotation.Nullable + public String getCa() { + return ca; + } + + public void setCa(@jakarta.annotation.Nullable String ca) { + this.ca = ca; + } + + public AllTokens24hTickerStreamResponseDInner cnt24(@jakarta.annotation.Nullable Long cnt24) { + this.cnt24 = cnt24; + return this; + } + + /** + * Number of trades in the last 24 hours + * + * @return cnt24 + */ + @jakarta.annotation.Nullable + public Long getCnt24() { + return cnt24; + } + + public void setCnt24(@jakarta.annotation.Nullable Long cnt24) { + this.cnt24 = cnt24; + } + + public AllTokens24hTickerStreamResponseDInner fdv(@jakarta.annotation.Nullable String fdv) { + this.fdv = fdv; + return this; + } + + /** + * Fully diluted valuation + * + * @return fdv + */ + @jakarta.annotation.Nullable + public String getFdv() { + return fdv; + } + + public void setFdv(@jakarta.annotation.Nullable String fdv) { + this.fdv = fdv; + } + + public AllTokens24hTickerStreamResponseDInner hc(@jakarta.annotation.Nullable String hc) { + this.hc = hc; + return this; + } + + /** + * Number of holders + * + * @return hc + */ + @jakarta.annotation.Nullable + public String getHc() { + return hc; + } + + public void setHc(@jakarta.annotation.Nullable String hc) { + this.hc = hc; + } + + public AllTokens24hTickerStreamResponseDInner liq(@jakarta.annotation.Nullable String liq) { + this.liq = liq; + return this; + } + + /** + * Liquidity + * + * @return liq + */ + @jakarta.annotation.Nullable + public String getLiq() { + return liq; + } + + public void setLiq(@jakarta.annotation.Nullable String liq) { + this.liq = liq; + } + + public AllTokens24hTickerStreamResponseDInner mc(@jakarta.annotation.Nullable String mc) { + this.mc = mc; + return this; + } + + /** + * Market cap + * + * @return mc + */ + @jakarta.annotation.Nullable + public String getMc() { + return mc; + } + + public void setMc(@jakarta.annotation.Nullable String mc) { + this.mc = mc; + } + + public AllTokens24hTickerStreamResponseDInner pLowerCase( + @jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + return this; + } + + /** + * Current price + * + * @return pLowerCase + */ + @jakarta.annotation.Nullable + public String getpLowerCase() { + return pLowerCase; + } + + public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + } + + public AllTokens24hTickerStreamResponseDInner pc24(@jakarta.annotation.Nullable String pc24) { + this.pc24 = pc24; + return this; + } + + /** + * 24-hour price change percent + * + * @return pc24 + */ + @jakarta.annotation.Nullable + public String getPc24() { + return pc24; + } + + public void setPc24(@jakarta.annotation.Nullable String pc24) { + this.pc24 = pc24; + } + + public AllTokens24hTickerStreamResponseDInner sLowerCase( + @jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * Token short identifier + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public AllTokens24hTickerStreamResponseDInner tLowerCase( + @jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; + return this; + } + + /** + * Event timestamp in milliseconds + * + * @return tLowerCase + */ + @jakarta.annotation.Nullable + public Long gettLowerCase() { + return tLowerCase; + } + + public void settLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; + } + + public AllTokens24hTickerStreamResponseDInner vol24(@jakarta.annotation.Nullable String vol24) { + this.vol24 = vol24; + return this; + } + + /** + * 24-hour volume + * + * @return vol24 + */ + @jakarta.annotation.Nullable + public String getVol24() { + return vol24; + } + + public void setVol24(@jakarta.annotation.Nullable String vol24) { + this.vol24 = vol24; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllTokens24hTickerStreamResponseDInner allTokens24hTickerStreamResponseDInner = + (AllTokens24hTickerStreamResponseDInner) o; + return Objects.equals(this.ca, allTokens24hTickerStreamResponseDInner.ca) + && Objects.equals(this.cnt24, allTokens24hTickerStreamResponseDInner.cnt24) + && Objects.equals(this.fdv, allTokens24hTickerStreamResponseDInner.fdv) + && Objects.equals(this.hc, allTokens24hTickerStreamResponseDInner.hc) + && Objects.equals(this.liq, allTokens24hTickerStreamResponseDInner.liq) + && Objects.equals(this.mc, allTokens24hTickerStreamResponseDInner.mc) + && Objects.equals( + this.pLowerCase, allTokens24hTickerStreamResponseDInner.pLowerCase) + && Objects.equals(this.pc24, allTokens24hTickerStreamResponseDInner.pc24) + && Objects.equals( + this.sLowerCase, allTokens24hTickerStreamResponseDInner.sLowerCase) + && Objects.equals( + this.tLowerCase, allTokens24hTickerStreamResponseDInner.tLowerCase) + && Objects.equals(this.vol24, allTokens24hTickerStreamResponseDInner.vol24); + } + + @Override + public int hashCode() { + return Objects.hash( + ca, cnt24, fdv, hc, liq, mc, pLowerCase, pc24, sLowerCase, tLowerCase, vol24); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllTokens24hTickerStreamResponseDInner {\n"); + sb.append(" ca: ").append(toIndentedString(ca)).append("\n"); + sb.append(" cnt24: ").append(toIndentedString(cnt24)).append("\n"); + sb.append(" fdv: ").append(toIndentedString(fdv)).append("\n"); + sb.append(" hc: ").append(toIndentedString(hc)).append("\n"); + sb.append(" liq: ").append(toIndentedString(liq)).append("\n"); + sb.append(" mc: ").append(toIndentedString(mc)).append("\n"); + sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); + sb.append(" pc24: ").append(toIndentedString(pc24)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" tLowerCase: ").append(toIndentedString(tLowerCase)).append("\n"); + sb.append(" vol24: ").append(toIndentedString(vol24)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String caValue = getCa(); + if (caValue != null) { + String caValueAsString = caValue.toString(); + valMap.put("ca", caValueAsString); + } + Long cnt24Value = getCnt24(); + if (cnt24Value != null) { + String cnt24ValueAsString = cnt24Value.toString(); + valMap.put("cnt24", cnt24ValueAsString); + } + String fdvValue = getFdv(); + if (fdvValue != null) { + String fdvValueAsString = fdvValue.toString(); + valMap.put("fdv", fdvValueAsString); + } + String hcValue = getHc(); + if (hcValue != null) { + String hcValueAsString = hcValue.toString(); + valMap.put("hc", hcValueAsString); + } + String liqValue = getLiq(); + if (liqValue != null) { + String liqValueAsString = liqValue.toString(); + valMap.put("liq", liqValueAsString); + } + String mcValue = getMc(); + if (mcValue != null) { + String mcValueAsString = mcValue.toString(); + valMap.put("mc", mcValueAsString); + } + String pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + String pLowerCaseValueAsString = pLowerCaseValue.toString(); + valMap.put("pLowerCase", pLowerCaseValueAsString); + } + String pc24Value = getPc24(); + if (pc24Value != null) { + String pc24ValueAsString = pc24Value.toString(); + valMap.put("pc24", pc24ValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + Long tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + String tLowerCaseValueAsString = tLowerCaseValue.toString(); + valMap.put("tLowerCase", tLowerCaseValueAsString); + } + String vol24Value = getVol24(); + if (vol24Value != null) { + String vol24ValueAsString = vol24Value.toString(); + valMap.put("vol24", vol24ValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object caValue = getCa(); + if (caValue != null) { + valMap.put("ca", caValue); + } + Object cnt24Value = getCnt24(); + if (cnt24Value != null) { + valMap.put("cnt24", cnt24Value); + } + Object fdvValue = getFdv(); + if (fdvValue != null) { + valMap.put("fdv", fdvValue); + } + Object hcValue = getHc(); + if (hcValue != null) { + valMap.put("hc", hcValue); + } + Object liqValue = getLiq(); + if (liqValue != null) { + valMap.put("liq", liqValue); + } + Object mcValue = getMc(); + if (mcValue != null) { + valMap.put("mc", mcValue); + } + Object pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + valMap.put("pLowerCase", pLowerCaseValue); + } + Object pc24Value = getPc24(); + if (pc24Value != null) { + valMap.put("pc24", pc24Value); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + valMap.put("tLowerCase", tLowerCaseValue); + } + Object vol24Value = getVol24(); + if (vol24Value != null) { + valMap.put("vol24", vol24Value); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ca"); + openapiFields.add("cnt24"); + openapiFields.add("fdv"); + openapiFields.add("hc"); + openapiFields.add("liq"); + openapiFields.add("mc"); + openapiFields.add("p"); + openapiFields.add("pc24"); + openapiFields.add("s"); + openapiFields.add("t"); + openapiFields.add("vol24"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * AllTokens24hTickerStreamResponseDInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AllTokens24hTickerStreamResponseDInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AllTokens24hTickerStreamResponseDInner" + + " is not found in the empty JSON string", + AllTokens24hTickerStreamResponseDInner.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AllTokens24hTickerStreamResponseDInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AllTokens24hTickerStreamResponseDInner` properties. JSON:" + + " %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ca") != null && !jsonObj.get("ca").isJsonNull()) + && !jsonObj.get("ca").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ca` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ca").toString())); + } + if ((jsonObj.get("fdv") != null && !jsonObj.get("fdv").isJsonNull()) + && !jsonObj.get("fdv").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `fdv` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("fdv").toString())); + } + if ((jsonObj.get("hc") != null && !jsonObj.get("hc").isJsonNull()) + && !jsonObj.get("hc").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `hc` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("hc").toString())); + } + if ((jsonObj.get("liq") != null && !jsonObj.get("liq").isJsonNull()) + && !jsonObj.get("liq").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `liq` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("liq").toString())); + } + if ((jsonObj.get("mc") != null && !jsonObj.get("mc").isJsonNull()) + && !jsonObj.get("mc").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `mc` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("mc").toString())); + } + if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) + && !jsonObj.get("p").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `p` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("p").toString())); + } + if ((jsonObj.get("pc24") != null && !jsonObj.get("pc24").isJsonNull()) + && !jsonObj.get("pc24").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pc24` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("pc24").toString())); + } + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("vol24") != null && !jsonObj.get("vol24").isJsonNull()) + && !jsonObj.get("vol24").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `vol24` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("vol24").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AllTokens24hTickerStreamResponseDInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AllTokens24hTickerStreamResponseDInner' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(AllTokens24hTickerStreamResponseDInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, AllTokens24hTickerStreamResponseDInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AllTokens24hTickerStreamResponseDInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AllTokens24hTickerStreamResponseDInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of AllTokens24hTickerStreamResponseDInner + * @throws IOException if the JSON string is invalid with respect to + * AllTokens24hTickerStreamResponseDInner + */ + public static AllTokens24hTickerStreamResponseDInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, AllTokens24hTickerStreamResponseDInner.class); + } + + /** + * Convert an instance of AllTokens24hTickerStreamResponseDInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/BookTickerStreamRequest.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/BookTickerStreamRequest.java new file mode 100644 index 000000000..df296953d --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/BookTickerStreamRequest.java @@ -0,0 +1,278 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** BookTickerStreamRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class BookTickerStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Integer id; + + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public BookTickerStreamRequest() {} + + public BookTickerStreamRequest id(@jakarta.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Integer id) { + this.id = id; + } + + public BookTickerStreamRequest symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Symbol to subscribe, in lowercase stream format. + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BookTickerStreamRequest bookTickerStreamRequest = (BookTickerStreamRequest) o; + return Objects.equals(this.id, bookTickerStreamRequest.id) + && Objects.equals(this.symbol, bookTickerStreamRequest.symbol); + } + + @Override + public int hashCode() { + return Objects.hash(id, symbol); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BookTickerStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Integer idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("symbol"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BookTickerStreamRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BookTickerStreamRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in BookTickerStreamRequest is not found" + + " in the empty JSON string", + BookTickerStreamRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BookTickerStreamRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `BookTickerStreamRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BookTickerStreamRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BookTickerStreamRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(BookTickerStreamRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, BookTickerStreamRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BookTickerStreamRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of BookTickerStreamRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of BookTickerStreamRequest + * @throws IOException if the JSON string is invalid with respect to BookTickerStreamRequest + */ + public static BookTickerStreamRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BookTickerStreamRequest.class); + } + + /** + * Convert an instance of BookTickerStreamRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/BookTickerStreamResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/BookTickerStreamResponse.java new file mode 100644 index 000000000..c644ffabf --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/BookTickerStreamResponse.java @@ -0,0 +1,577 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** BookTickerStreamResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class BookTickerStreamResponse extends BaseDTO { + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; + + @SerializedName(SERIALIZED_NAME_U_LOWER_CASE) + @jakarta.annotation.Nullable + private Long uLowerCase; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_B_LOWER_CASE = "b"; + + @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) + @jakarta.annotation.Nullable + private String bLowerCase; + + public static final String SERIALIZED_NAME_B = "B"; + + @SerializedName(SERIALIZED_NAME_B) + @jakarta.annotation.Nullable + private String B; + + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private String aLowerCase; + + public static final String SERIALIZED_NAME_A = "A"; + + @SerializedName(SERIALIZED_NAME_A) + @jakarta.annotation.Nullable + private String A; + + public BookTickerStreamResponse() {} + + public BookTickerStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * eventType + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public BookTickerStreamResponse E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * eventTime + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public BookTickerStreamResponse T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * transactionTime + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + public BookTickerStreamResponse uLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + return this; + } + + /** + * updateId + * + * @return uLowerCase + */ + @jakarta.annotation.Nullable + public Long getuLowerCase() { + return uLowerCase; + } + + public void setuLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + } + + public BookTickerStreamResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public BookTickerStreamResponse bLowerCase(@jakarta.annotation.Nullable String bLowerCase) { + this.bLowerCase = bLowerCase; + return this; + } + + /** + * bid1Price + * + * @return bLowerCase + */ + @jakarta.annotation.Nullable + public String getbLowerCase() { + return bLowerCase; + } + + public void setbLowerCase(@jakarta.annotation.Nullable String bLowerCase) { + this.bLowerCase = bLowerCase; + } + + public BookTickerStreamResponse B(@jakarta.annotation.Nullable String B) { + this.B = B; + return this; + } + + /** + * bid1Quantity + * + * @return B + */ + @jakarta.annotation.Nullable + public String getB() { + return B; + } + + public void setB(@jakarta.annotation.Nullable String B) { + this.B = B; + } + + public BookTickerStreamResponse aLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + /** + * ask1Price + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + public String getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + } + + public BookTickerStreamResponse A(@jakarta.annotation.Nullable String A) { + this.A = A; + return this; + } + + /** + * ask1Quantity + * + * @return A + */ + @jakarta.annotation.Nullable + public String getA() { + return A; + } + + public void setA(@jakarta.annotation.Nullable String A) { + this.A = A; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BookTickerStreamResponse bookTickerStreamResponse = (BookTickerStreamResponse) o; + return Objects.equals(this.eLowerCase, bookTickerStreamResponse.eLowerCase) + && Objects.equals(this.E, bookTickerStreamResponse.E) + && Objects.equals(this.T, bookTickerStreamResponse.T) + && Objects.equals(this.uLowerCase, bookTickerStreamResponse.uLowerCase) + && Objects.equals(this.sLowerCase, bookTickerStreamResponse.sLowerCase) + && Objects.equals(this.bLowerCase, bookTickerStreamResponse.bLowerCase) + && Objects.equals(this.B, bookTickerStreamResponse.B) + && Objects.equals(this.aLowerCase, bookTickerStreamResponse.aLowerCase) + && Objects.equals(this.A, bookTickerStreamResponse.A); + } + + @Override + public int hashCode() { + return Objects.hash(eLowerCase, E, T, uLowerCase, sLowerCase, bLowerCase, B, aLowerCase, A); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BookTickerStreamResponse {\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); + sb.append(" B: ").append(toIndentedString(B)).append("\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" A: ").append(toIndentedString(A)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + Long uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + String uLowerCaseValueAsString = uLowerCaseValue.toString(); + valMap.put("uLowerCase", uLowerCaseValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + String bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + String bLowerCaseValueAsString = bLowerCaseValue.toString(); + valMap.put("bLowerCase", bLowerCaseValueAsString); + } + String BValue = getB(); + if (BValue != null) { + String BValueAsString = BValue.toString(); + valMap.put("B", BValueAsString); + } + String aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = aLowerCaseValue.toString(); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + String AValue = getA(); + if (AValue != null) { + String AValueAsString = AValue.toString(); + valMap.put("A", AValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + Object uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + valMap.put("uLowerCase", uLowerCaseValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + valMap.put("bLowerCase", bLowerCaseValue); + } + Object BValue = getB(); + if (BValue != null) { + valMap.put("B", BValue); + } + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + Object AValue = getA(); + if (AValue != null) { + valMap.put("A", AValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("e"); + openapiFields.add("E"); + openapiFields.add("T"); + openapiFields.add("u"); + openapiFields.add("s"); + openapiFields.add("b"); + openapiFields.add("B"); + openapiFields.add("a"); + openapiFields.add("A"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BookTickerStreamResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BookTickerStreamResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in BookTickerStreamResponse is not found" + + " in the empty JSON string", + BookTickerStreamResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BookTickerStreamResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `BookTickerStreamResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("b") != null && !jsonObj.get("b").isJsonNull()) + && !jsonObj.get("b").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `b` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("b").toString())); + } + if ((jsonObj.get("B") != null && !jsonObj.get("B").isJsonNull()) + && !jsonObj.get("B").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `B` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("B").toString())); + } + if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) + && !jsonObj.get("a").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `a` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("a").toString())); + } + if ((jsonObj.get("A") != null && !jsonObj.get("A").isJsonNull()) + && !jsonObj.get("A").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `A` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("A").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BookTickerStreamResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BookTickerStreamResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(BookTickerStreamResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, BookTickerStreamResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BookTickerStreamResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of BookTickerStreamResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of BookTickerStreamResponse + * @throws IOException if the JSON string is invalid with respect to BookTickerStreamResponse + */ + public static BookTickerStreamResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BookTickerStreamResponse.class); + } + + /** + * Convert an instance of BookTickerStreamResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/ContractKlineStreamRequest.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/ContractKlineStreamRequest.java new file mode 100644 index 000000000..0b0ca8414 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/ContractKlineStreamRequest.java @@ -0,0 +1,367 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ContractKlineStreamRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ContractKlineStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Integer id; + + public static final String SERIALIZED_NAME_CONTRACT_ADDRESS = "contractAddress"; + + @SerializedName(SERIALIZED_NAME_CONTRACT_ADDRESS) + @jakarta.annotation.Nullable + private String contractAddress; + + public static final String SERIALIZED_NAME_CHAIN_ID = "chainId"; + + @SerializedName(SERIALIZED_NAME_CHAIN_ID) + @jakarta.annotation.Nullable + private String chainId; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private Interval interval; + + public ContractKlineStreamRequest() {} + + public ContractKlineStreamRequest id(@jakarta.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Integer id) { + this.id = id; + } + + public ContractKlineStreamRequest contractAddress( + @jakarta.annotation.Nullable String contractAddress) { + this.contractAddress = contractAddress; + return this; + } + + /** + * Contract address. + * + * @return contractAddress + */ + @jakarta.annotation.Nullable + public String getContractAddress() { + return contractAddress; + } + + public void setContractAddress(@jakarta.annotation.Nullable String contractAddress) { + this.contractAddress = contractAddress; + } + + public ContractKlineStreamRequest chainId(@jakarta.annotation.Nullable String chainId) { + this.chainId = chainId; + return this; + } + + /** + * Chain ID. + * + * @return chainId + */ + @jakarta.annotation.Nullable + public String getChainId() { + return chainId; + } + + public void setChainId(@jakarta.annotation.Nullable String chainId) { + this.chainId = chainId; + } + + public ContractKlineStreamRequest interval(@jakarta.annotation.Nullable Interval interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + @Valid + public Interval getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable Interval interval) { + this.interval = interval; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContractKlineStreamRequest contractKlineStreamRequest = (ContractKlineStreamRequest) o; + return Objects.equals(this.id, contractKlineStreamRequest.id) + && Objects.equals(this.contractAddress, contractKlineStreamRequest.contractAddress) + && Objects.equals(this.chainId, contractKlineStreamRequest.chainId) + && Objects.equals(this.interval, contractKlineStreamRequest.interval); + } + + @Override + public int hashCode() { + return Objects.hash(id, contractAddress, chainId, interval); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContractKlineStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" contractAddress: ").append(toIndentedString(contractAddress)).append("\n"); + sb.append(" chainId: ").append(toIndentedString(chainId)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Integer idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + String contractAddressValue = getContractAddress(); + if (contractAddressValue != null) { + String contractAddressValueAsString = contractAddressValue.toString(); + valMap.put("contractAddress", contractAddressValueAsString); + } + String chainIdValue = getChainId(); + if (chainIdValue != null) { + String chainIdValueAsString = chainIdValue.toString(); + valMap.put("chainId", chainIdValueAsString); + } + Interval intervalValue = getInterval(); + if (intervalValue != null) { + String intervalValueAsString = intervalValue.toString(); + valMap.put("interval", intervalValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object contractAddressValue = getContractAddress(); + if (contractAddressValue != null) { + valMap.put("contractAddress", contractAddressValue); + } + Object chainIdValue = getChainId(); + if (chainIdValue != null) { + valMap.put("chainId", chainIdValue); + } + Object intervalValue = getInterval(); + if (intervalValue != null) { + valMap.put("interval", intervalValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("contractAddress"); + openapiFields.add("chainId"); + openapiFields.add("interval"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ContractKlineStreamRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ContractKlineStreamRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ContractKlineStreamRequest is not" + + " found in the empty JSON string", + ContractKlineStreamRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ContractKlineStreamRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ContractKlineStreamRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("contractAddress") != null && !jsonObj.get("contractAddress").isJsonNull()) + && !jsonObj.get("contractAddress").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `contractAddress` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("contractAddress").toString())); + } + if ((jsonObj.get("chainId") != null && !jsonObj.get("chainId").isJsonNull()) + && !jsonObj.get("chainId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `chainId` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("chainId").toString())); + } + // validate the optional field `interval` + if (jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) { + Interval.validateJsonElement(jsonObj.get("interval")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ContractKlineStreamRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ContractKlineStreamRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ContractKlineStreamRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ContractKlineStreamRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ContractKlineStreamRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ContractKlineStreamRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ContractKlineStreamRequest + * @throws IOException if the JSON string is invalid with respect to ContractKlineStreamRequest + */ + public static ContractKlineStreamRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ContractKlineStreamRequest.class); + } + + /** + * Convert an instance of ContractKlineStreamRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/ContractKlineStreamResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/ContractKlineStreamResponse.java new file mode 100644 index 000000000..3abdb3311 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/ContractKlineStreamResponse.java @@ -0,0 +1,332 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ContractKlineStreamResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ContractKlineStreamResponse extends BaseDTO { + public static final String SERIALIZED_NAME_CA = "ca"; + + @SerializedName(SERIALIZED_NAME_CA) + @jakarta.annotation.Nullable + private String ca; + + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_K_LOWER_CASE = "k"; + + @SerializedName(SERIALIZED_NAME_K_LOWER_CASE) + @jakarta.annotation.Nullable + private ContractKlineStreamResponseK kLowerCase; + + public ContractKlineStreamResponse() {} + + public ContractKlineStreamResponse ca(@jakarta.annotation.Nullable String ca) { + this.ca = ca; + return this; + } + + /** + * Contract address@Chain ID + * + * @return ca + */ + @jakarta.annotation.Nullable + public String getCa() { + return ca; + } + + public void setCa(@jakarta.annotation.Nullable String ca) { + this.ca = ca; + } + + public ContractKlineStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * Event type + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public ContractKlineStreamResponse kLowerCase( + @jakarta.annotation.Nullable ContractKlineStreamResponseK kLowerCase) { + this.kLowerCase = kLowerCase; + return this; + } + + /** + * Get kLowerCase + * + * @return kLowerCase + */ + @jakarta.annotation.Nullable + @Valid + public ContractKlineStreamResponseK getkLowerCase() { + return kLowerCase; + } + + public void setkLowerCase( + @jakarta.annotation.Nullable ContractKlineStreamResponseK kLowerCase) { + this.kLowerCase = kLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContractKlineStreamResponse contractKlineStreamResponse = (ContractKlineStreamResponse) o; + return Objects.equals(this.ca, contractKlineStreamResponse.ca) + && Objects.equals(this.eLowerCase, contractKlineStreamResponse.eLowerCase) + && Objects.equals(this.kLowerCase, contractKlineStreamResponse.kLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash(ca, eLowerCase, kLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContractKlineStreamResponse {\n"); + sb.append(" ca: ").append(toIndentedString(ca)).append("\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" kLowerCase: ").append(toIndentedString(kLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String caValue = getCa(); + if (caValue != null) { + String caValueAsString = caValue.toString(); + valMap.put("ca", caValueAsString); + } + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + ContractKlineStreamResponseK kLowerCaseValue = getkLowerCase(); + if (kLowerCaseValue != null) { + String kLowerCaseValueAsString = JSON.getGson().toJson(kLowerCaseValue); + valMap.put("kLowerCase", kLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object caValue = getCa(); + if (caValue != null) { + valMap.put("ca", caValue); + } + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object kLowerCaseValue = getkLowerCase(); + if (kLowerCaseValue != null) { + valMap.put("kLowerCase", kLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ca"); + openapiFields.add("e"); + openapiFields.add("k"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ContractKlineStreamResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ContractKlineStreamResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ContractKlineStreamResponse is not" + + " found in the empty JSON string", + ContractKlineStreamResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ContractKlineStreamResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ContractKlineStreamResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ca") != null && !jsonObj.get("ca").isJsonNull()) + && !jsonObj.get("ca").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ca` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ca").toString())); + } + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + // validate the optional field `k` + if (jsonObj.get("k") != null && !jsonObj.get("k").isJsonNull()) { + ContractKlineStreamResponseK.validateJsonElement(jsonObj.get("k")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ContractKlineStreamResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ContractKlineStreamResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ContractKlineStreamResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ContractKlineStreamResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ContractKlineStreamResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ContractKlineStreamResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ContractKlineStreamResponse + * @throws IOException if the JSON string is invalid with respect to ContractKlineStreamResponse + */ + public static ContractKlineStreamResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ContractKlineStreamResponse.class); + } + + /** + * Convert an instance of ContractKlineStreamResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/ContractKlineStreamResponseK.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/ContractKlineStreamResponseK.java new file mode 100644 index 000000000..30d93008d --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/ContractKlineStreamResponseK.java @@ -0,0 +1,545 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** Kline payload */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ContractKlineStreamResponseK extends BaseDTO { + public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; + + @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) + @jakarta.annotation.Nullable + private String oLowerCase; + + public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; + + @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) + @jakarta.annotation.Nullable + private String cLowerCase; + + public static final String SERIALIZED_NAME_H_LOWER_CASE = "h"; + + @SerializedName(SERIALIZED_NAME_H_LOWER_CASE) + @jakarta.annotation.Nullable + private String hLowerCase; + + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; + + @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) + @jakarta.annotation.Nullable + private String lLowerCase; + + public static final String SERIALIZED_NAME_V_LOWER_CASE = "v"; + + @SerializedName(SERIALIZED_NAME_V_LOWER_CASE) + @jakarta.annotation.Nullable + private String vLowerCase; + + public static final String SERIALIZED_NAME_OT = "ot"; + + @SerializedName(SERIALIZED_NAME_OT) + @jakarta.annotation.Nullable + private Long ot; + + public static final String SERIALIZED_NAME_CT = "ct"; + + @SerializedName(SERIALIZED_NAME_CT) + @jakarta.annotation.Nullable + private Long ct; + + public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; + + @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) + @jakarta.annotation.Nullable + private String iLowerCase; + + public ContractKlineStreamResponseK() {} + + public ContractKlineStreamResponseK oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + return this; + } + + /** + * Open price + * + * @return oLowerCase + */ + @jakarta.annotation.Nullable + public String getoLowerCase() { + return oLowerCase; + } + + public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + } + + public ContractKlineStreamResponseK cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + return this; + } + + /** + * Close price + * + * @return cLowerCase + */ + @jakarta.annotation.Nullable + public String getcLowerCase() { + return cLowerCase; + } + + public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + } + + public ContractKlineStreamResponseK hLowerCase(@jakarta.annotation.Nullable String hLowerCase) { + this.hLowerCase = hLowerCase; + return this; + } + + /** + * High price + * + * @return hLowerCase + */ + @jakarta.annotation.Nullable + public String gethLowerCase() { + return hLowerCase; + } + + public void sethLowerCase(@jakarta.annotation.Nullable String hLowerCase) { + this.hLowerCase = hLowerCase; + } + + public ContractKlineStreamResponseK lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + return this; + } + + /** + * Low price + * + * @return lLowerCase + */ + @jakarta.annotation.Nullable + public String getlLowerCase() { + return lLowerCase; + } + + public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + } + + public ContractKlineStreamResponseK vLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + return this; + } + + /** + * Volume + * + * @return vLowerCase + */ + @jakarta.annotation.Nullable + public String getvLowerCase() { + return vLowerCase; + } + + public void setvLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + } + + public ContractKlineStreamResponseK ot(@jakarta.annotation.Nullable Long ot) { + this.ot = ot; + return this; + } + + /** + * Kline open time + * + * @return ot + */ + @jakarta.annotation.Nullable + public Long getOt() { + return ot; + } + + public void setOt(@jakarta.annotation.Nullable Long ot) { + this.ot = ot; + } + + public ContractKlineStreamResponseK ct(@jakarta.annotation.Nullable Long ct) { + this.ct = ct; + return this; + } + + /** + * Kline close time + * + * @return ct + */ + @jakarta.annotation.Nullable + public Long getCt() { + return ct; + } + + public void setCt(@jakarta.annotation.Nullable Long ct) { + this.ct = ct; + } + + public ContractKlineStreamResponseK iLowerCase(@jakarta.annotation.Nullable String iLowerCase) { + this.iLowerCase = iLowerCase; + return this; + } + + /** + * Interval + * + * @return iLowerCase + */ + @jakarta.annotation.Nullable + public String getiLowerCase() { + return iLowerCase; + } + + public void setiLowerCase(@jakarta.annotation.Nullable String iLowerCase) { + this.iLowerCase = iLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContractKlineStreamResponseK contractKlineStreamResponseK = + (ContractKlineStreamResponseK) o; + return Objects.equals(this.oLowerCase, contractKlineStreamResponseK.oLowerCase) + && Objects.equals(this.cLowerCase, contractKlineStreamResponseK.cLowerCase) + && Objects.equals(this.hLowerCase, contractKlineStreamResponseK.hLowerCase) + && Objects.equals(this.lLowerCase, contractKlineStreamResponseK.lLowerCase) + && Objects.equals(this.vLowerCase, contractKlineStreamResponseK.vLowerCase) + && Objects.equals(this.ot, contractKlineStreamResponseK.ot) + && Objects.equals(this.ct, contractKlineStreamResponseK.ct) + && Objects.equals(this.iLowerCase, contractKlineStreamResponseK.iLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash( + oLowerCase, cLowerCase, hLowerCase, lLowerCase, vLowerCase, ot, ct, iLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContractKlineStreamResponseK {\n"); + sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); + sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); + sb.append(" hLowerCase: ").append(toIndentedString(hLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); + sb.append(" ot: ").append(toIndentedString(ot)).append("\n"); + sb.append(" ct: ").append(toIndentedString(ct)).append("\n"); + sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + String oLowerCaseValueAsString = oLowerCaseValue.toString(); + valMap.put("oLowerCase", oLowerCaseValueAsString); + } + String cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + String cLowerCaseValueAsString = cLowerCaseValue.toString(); + valMap.put("cLowerCase", cLowerCaseValueAsString); + } + String hLowerCaseValue = gethLowerCase(); + if (hLowerCaseValue != null) { + String hLowerCaseValueAsString = hLowerCaseValue.toString(); + valMap.put("hLowerCase", hLowerCaseValueAsString); + } + String lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + String vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + String vLowerCaseValueAsString = vLowerCaseValue.toString(); + valMap.put("vLowerCase", vLowerCaseValueAsString); + } + Long otValue = getOt(); + if (otValue != null) { + String otValueAsString = otValue.toString(); + valMap.put("ot", otValueAsString); + } + Long ctValue = getCt(); + if (ctValue != null) { + String ctValueAsString = ctValue.toString(); + valMap.put("ct", ctValueAsString); + } + String iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + String iLowerCaseValueAsString = iLowerCaseValue.toString(); + valMap.put("iLowerCase", iLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + valMap.put("oLowerCase", oLowerCaseValue); + } + Object cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + valMap.put("cLowerCase", cLowerCaseValue); + } + Object hLowerCaseValue = gethLowerCase(); + if (hLowerCaseValue != null) { + valMap.put("hLowerCase", hLowerCaseValue); + } + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); + } + Object vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + valMap.put("vLowerCase", vLowerCaseValue); + } + Object otValue = getOt(); + if (otValue != null) { + valMap.put("ot", otValue); + } + Object ctValue = getCt(); + if (ctValue != null) { + valMap.put("ct", ctValue); + } + Object iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + valMap.put("iLowerCase", iLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("o"); + openapiFields.add("c"); + openapiFields.add("h"); + openapiFields.add("l"); + openapiFields.add("v"); + openapiFields.add("ot"); + openapiFields.add("ct"); + openapiFields.add("i"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ContractKlineStreamResponseK + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ContractKlineStreamResponseK.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ContractKlineStreamResponseK is not" + + " found in the empty JSON string", + ContractKlineStreamResponseK.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ContractKlineStreamResponseK.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ContractKlineStreamResponseK` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) + && !jsonObj.get("o").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `o` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("o").toString())); + } + if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) + && !jsonObj.get("c").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `c` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("c").toString())); + } + if ((jsonObj.get("h") != null && !jsonObj.get("h").isJsonNull()) + && !jsonObj.get("h").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `h` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("h").toString())); + } + if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) + && !jsonObj.get("l").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `l` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("l").toString())); + } + if ((jsonObj.get("v") != null && !jsonObj.get("v").isJsonNull()) + && !jsonObj.get("v").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `v` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("v").toString())); + } + if ((jsonObj.get("i") != null && !jsonObj.get("i").isJsonNull()) + && !jsonObj.get("i").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `i` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("i").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ContractKlineStreamResponseK.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ContractKlineStreamResponseK' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ContractKlineStreamResponseK.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ContractKlineStreamResponseK value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ContractKlineStreamResponseK read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ContractKlineStreamResponseK given an JSON string + * + * @param jsonString JSON string + * @return An instance of ContractKlineStreamResponseK + * @throws IOException if the JSON string is invalid with respect to + * ContractKlineStreamResponseK + */ + public static ContractKlineStreamResponseK fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ContractKlineStreamResponseK.class); + } + + /** + * Convert an instance of ContractKlineStreamResponseK to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/FullDepthStreamRequest.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/FullDepthStreamRequest.java new file mode 100644 index 000000000..eb77fa346 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/FullDepthStreamRequest.java @@ -0,0 +1,320 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** FullDepthStreamRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class FullDepthStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Integer id; + + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private Interval interval; + + public FullDepthStreamRequest() {} + + public FullDepthStreamRequest id(@jakarta.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Integer id) { + this.id = id; + } + + public FullDepthStreamRequest symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Symbol to subscribe, in lowercase stream format. + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public FullDepthStreamRequest interval(@jakarta.annotation.Nullable Interval interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + @Valid + public Interval getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable Interval interval) { + this.interval = interval; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FullDepthStreamRequest fullDepthStreamRequest = (FullDepthStreamRequest) o; + return Objects.equals(this.id, fullDepthStreamRequest.id) + && Objects.equals(this.symbol, fullDepthStreamRequest.symbol) + && Objects.equals(this.interval, fullDepthStreamRequest.interval); + } + + @Override + public int hashCode() { + return Objects.hash(id, symbol, interval); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FullDepthStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Integer idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + Interval intervalValue = getInterval(); + if (intervalValue != null) { + String intervalValueAsString = intervalValue.toString(); + valMap.put("interval", intervalValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + Object intervalValue = getInterval(); + if (intervalValue != null) { + valMap.put("interval", intervalValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("symbol"); + openapiFields.add("interval"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FullDepthStreamRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FullDepthStreamRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FullDepthStreamRequest is not found in" + + " the empty JSON string", + FullDepthStreamRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FullDepthStreamRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `FullDepthStreamRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + // validate the optional field `interval` + if (jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) { + Interval.validateJsonElement(jsonObj.get("interval")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FullDepthStreamRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FullDepthStreamRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(FullDepthStreamRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FullDepthStreamRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FullDepthStreamRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of FullDepthStreamRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FullDepthStreamRequest + * @throws IOException if the JSON string is invalid with respect to FullDepthStreamRequest + */ + public static FullDepthStreamRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FullDepthStreamRequest.class); + } + + /** + * Convert an instance of FullDepthStreamRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/FullDepthStreamResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/FullDepthStreamResponse.java new file mode 100644 index 000000000..b7942b4a0 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/FullDepthStreamResponse.java @@ -0,0 +1,587 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** FullDepthStreamResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class FullDepthStreamResponse extends BaseDTO { + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public static final String SERIALIZED_NAME_U = "U"; + + @SerializedName(SERIALIZED_NAME_U) + @jakarta.annotation.Nullable + private Long U; + + public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; + + @SerializedName(SERIALIZED_NAME_U_LOWER_CASE) + @jakarta.annotation.Nullable + private Long uLowerCase; + + public static final String SERIALIZED_NAME_PU = "pu"; + + @SerializedName(SERIALIZED_NAME_PU) + @jakarta.annotation.Nullable + private Long pu; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_B_LOWER_CASE = "b"; + + @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) + @jakarta.annotation.Nullable + private List> bLowerCase; + + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private List> aLowerCase; + + public FullDepthStreamResponse() {} + + public FullDepthStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * Event type + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public FullDepthStreamResponse E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event time (ms) + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public FullDepthStreamResponse T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * Matching time (ms) + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + public FullDepthStreamResponse U(@jakarta.annotation.Nullable Long U) { + this.U = U; + return this; + } + + /** + * First updateId in this event + * + * @return U + */ + @jakarta.annotation.Nullable + public Long getU() { + return U; + } + + public void setU(@jakarta.annotation.Nullable Long U) { + this.U = U; + } + + public FullDepthStreamResponse uLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + return this; + } + + /** + * Last updateId in this event + * + * @return uLowerCase + */ + @jakarta.annotation.Nullable + public Long getuLowerCase() { + return uLowerCase; + } + + public void setuLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + } + + public FullDepthStreamResponse pu(@jakarta.annotation.Nullable Long pu) { + this.pu = pu; + return this; + } + + /** + * Previous updateId from the last push + * + * @return pu + */ + @jakarta.annotation.Nullable + public Long getPu() { + return pu; + } + + public void setPu(@jakarta.annotation.Nullable Long pu) { + this.pu = pu; + } + + public FullDepthStreamResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * Symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public FullDepthStreamResponse bLowerCase( + @jakarta.annotation.Nullable List> bLowerCase) { + this.bLowerCase = bLowerCase; + return this; + } + + public FullDepthStreamResponse addBLowerCaseItem(List bLowerCaseItem) { + if (this.bLowerCase == null) { + this.bLowerCase = new ArrayList<>(); + } + this.bLowerCase.add(bLowerCaseItem); + return this; + } + + /** + * bids to be updated + * + * @return bLowerCase + */ + @jakarta.annotation.Nullable + @Valid + public List> getbLowerCase() { + return bLowerCase; + } + + public void setbLowerCase(@jakarta.annotation.Nullable List> bLowerCase) { + this.bLowerCase = bLowerCase; + } + + public FullDepthStreamResponse aLowerCase( + @jakarta.annotation.Nullable List> aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + public FullDepthStreamResponse addALowerCaseItem(List aLowerCaseItem) { + if (this.aLowerCase == null) { + this.aLowerCase = new ArrayList<>(); + } + this.aLowerCase.add(aLowerCaseItem); + return this; + } + + /** + * asks to be updated + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + @Valid + public List> getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable List> aLowerCase) { + this.aLowerCase = aLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FullDepthStreamResponse fullDepthStreamResponse = (FullDepthStreamResponse) o; + return Objects.equals(this.eLowerCase, fullDepthStreamResponse.eLowerCase) + && Objects.equals(this.E, fullDepthStreamResponse.E) + && Objects.equals(this.T, fullDepthStreamResponse.T) + && Objects.equals(this.U, fullDepthStreamResponse.U) + && Objects.equals(this.uLowerCase, fullDepthStreamResponse.uLowerCase) + && Objects.equals(this.pu, fullDepthStreamResponse.pu) + && Objects.equals(this.sLowerCase, fullDepthStreamResponse.sLowerCase) + && Objects.equals(this.bLowerCase, fullDepthStreamResponse.bLowerCase) + && Objects.equals(this.aLowerCase, fullDepthStreamResponse.aLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash( + eLowerCase, E, T, U, uLowerCase, pu, sLowerCase, bLowerCase, aLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FullDepthStreamResponse {\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" U: ").append(toIndentedString(U)).append("\n"); + sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); + sb.append(" pu: ").append(toIndentedString(pu)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + Long UValue = getU(); + if (UValue != null) { + String UValueAsString = UValue.toString(); + valMap.put("U", UValueAsString); + } + Long uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + String uLowerCaseValueAsString = uLowerCaseValue.toString(); + valMap.put("uLowerCase", uLowerCaseValueAsString); + } + Long puValue = getPu(); + if (puValue != null) { + String puValueAsString = puValue.toString(); + valMap.put("pu", puValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + List> bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + String bLowerCaseValueAsString = JSON.getGson().toJson(bLowerCaseValue); + valMap.put("bLowerCase", bLowerCaseValueAsString); + } + List> aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = JSON.getGson().toJson(aLowerCaseValue); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + Object UValue = getU(); + if (UValue != null) { + valMap.put("U", UValue); + } + Object uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + valMap.put("uLowerCase", uLowerCaseValue); + } + Object puValue = getPu(); + if (puValue != null) { + valMap.put("pu", puValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + valMap.put("bLowerCase", bLowerCaseValue); + } + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("e"); + openapiFields.add("E"); + openapiFields.add("T"); + openapiFields.add("U"); + openapiFields.add("u"); + openapiFields.add("pu"); + openapiFields.add("s"); + openapiFields.add("b"); + openapiFields.add("a"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FullDepthStreamResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FullDepthStreamResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FullDepthStreamResponse is not found" + + " in the empty JSON string", + FullDepthStreamResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FullDepthStreamResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `FullDepthStreamResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("b") != null + && !jsonObj.get("b").isJsonNull() + && !jsonObj.get("b").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `b` to be an array in the JSON string but got `%s`", + jsonObj.get("b").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("a") != null + && !jsonObj.get("a").isJsonNull() + && !jsonObj.get("a").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `a` to be an array in the JSON string but got `%s`", + jsonObj.get("a").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FullDepthStreamResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FullDepthStreamResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(FullDepthStreamResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FullDepthStreamResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FullDepthStreamResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of FullDepthStreamResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of FullDepthStreamResponse + * @throws IOException if the JSON string is invalid with respect to FullDepthStreamResponse + */ + public static FullDepthStreamResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FullDepthStreamResponse.class); + } + + /** + * Convert an instance of FullDepthStreamResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/Interval.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/Interval.java new file mode 100644 index 000000000..dfd197539 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/Interval.java @@ -0,0 +1,83 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets interval */ +@JsonAdapter(Interval.Adapter.class) +public enum Interval { + INTERVAL_1s("1s"), + + INTERVAL_1m("1m"), + + INTERVAL_5m("5m"), + + INTERVAL_15m("15m"), + + INTERVAL_1h("1h"), + + INTERVAL_4h("4h"), + + INTERVAL_1d("1d"); + + private String value; + + Interval(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Interval fromValue(String value) { + for (Interval b : Interval.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Interval enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Interval read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Interval.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Interval.fromValue(value); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/KlineStreamRequest.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/KlineStreamRequest.java new file mode 100644 index 000000000..c147193d8 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/KlineStreamRequest.java @@ -0,0 +1,320 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** KlineStreamRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class KlineStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Integer id; + + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private Interval interval; + + public KlineStreamRequest() {} + + public KlineStreamRequest id(@jakarta.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Integer id) { + this.id = id; + } + + public KlineStreamRequest symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Symbol to subscribe, in lowercase stream format. + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public KlineStreamRequest interval(@jakarta.annotation.Nullable Interval interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + @Valid + public Interval getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable Interval interval) { + this.interval = interval; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + KlineStreamRequest klineStreamRequest = (KlineStreamRequest) o; + return Objects.equals(this.id, klineStreamRequest.id) + && Objects.equals(this.symbol, klineStreamRequest.symbol) + && Objects.equals(this.interval, klineStreamRequest.interval); + } + + @Override + public int hashCode() { + return Objects.hash(id, symbol, interval); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KlineStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Integer idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + Interval intervalValue = getInterval(); + if (intervalValue != null) { + String intervalValueAsString = intervalValue.toString(); + valMap.put("interval", intervalValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + Object intervalValue = getInterval(); + if (intervalValue != null) { + valMap.put("interval", intervalValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("symbol"); + openapiFields.add("interval"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to KlineStreamRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!KlineStreamRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in KlineStreamRequest is not found in the" + + " empty JSON string", + KlineStreamRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!KlineStreamRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `KlineStreamRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + // validate the optional field `interval` + if (jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) { + Interval.validateJsonElement(jsonObj.get("interval")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!KlineStreamRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'KlineStreamRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(KlineStreamRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, KlineStreamRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public KlineStreamRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of KlineStreamRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of KlineStreamRequest + * @throws IOException if the JSON string is invalid with respect to KlineStreamRequest + */ + public static KlineStreamRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, KlineStreamRequest.class); + } + + /** + * Convert an instance of KlineStreamRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/KlineStreamResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/KlineStreamResponse.java new file mode 100644 index 000000000..505ca3636 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/KlineStreamResponse.java @@ -0,0 +1,366 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** KlineStreamResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class KlineStreamResponse extends BaseDTO { + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_K_LOWER_CASE = "k"; + + @SerializedName(SERIALIZED_NAME_K_LOWER_CASE) + @jakarta.annotation.Nullable + private KlineStreamResponseK kLowerCase; + + public KlineStreamResponse() {} + + public KlineStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * eventType + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public KlineStreamResponse E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * eventTime + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public KlineStreamResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public KlineStreamResponse kLowerCase( + @jakarta.annotation.Nullable KlineStreamResponseK kLowerCase) { + this.kLowerCase = kLowerCase; + return this; + } + + /** + * Get kLowerCase + * + * @return kLowerCase + */ + @jakarta.annotation.Nullable + @Valid + public KlineStreamResponseK getkLowerCase() { + return kLowerCase; + } + + public void setkLowerCase(@jakarta.annotation.Nullable KlineStreamResponseK kLowerCase) { + this.kLowerCase = kLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + KlineStreamResponse klineStreamResponse = (KlineStreamResponse) o; + return Objects.equals(this.eLowerCase, klineStreamResponse.eLowerCase) + && Objects.equals(this.E, klineStreamResponse.E) + && Objects.equals(this.sLowerCase, klineStreamResponse.sLowerCase) + && Objects.equals(this.kLowerCase, klineStreamResponse.kLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash(eLowerCase, E, sLowerCase, kLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KlineStreamResponse {\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" kLowerCase: ").append(toIndentedString(kLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + KlineStreamResponseK kLowerCaseValue = getkLowerCase(); + if (kLowerCaseValue != null) { + String kLowerCaseValueAsString = JSON.getGson().toJson(kLowerCaseValue); + valMap.put("kLowerCase", kLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object kLowerCaseValue = getkLowerCase(); + if (kLowerCaseValue != null) { + valMap.put("kLowerCase", kLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("e"); + openapiFields.add("E"); + openapiFields.add("s"); + openapiFields.add("k"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to KlineStreamResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!KlineStreamResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in KlineStreamResponse is not found in" + + " the empty JSON string", + KlineStreamResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!KlineStreamResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `KlineStreamResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + // validate the optional field `k` + if (jsonObj.get("k") != null && !jsonObj.get("k").isJsonNull()) { + KlineStreamResponseK.validateJsonElement(jsonObj.get("k")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!KlineStreamResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'KlineStreamResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(KlineStreamResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, KlineStreamResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public KlineStreamResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of KlineStreamResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of KlineStreamResponse + * @throws IOException if the JSON string is invalid with respect to KlineStreamResponse + */ + public static KlineStreamResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, KlineStreamResponse.class); + } + + /** + * Convert an instance of KlineStreamResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/KlineStreamResponseK.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/KlineStreamResponseK.java new file mode 100644 index 000000000..e0d641b1d --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/KlineStreamResponseK.java @@ -0,0 +1,929 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** KlineStreamResponseK */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class KlineStreamResponseK extends BaseDTO { + public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; + + @SerializedName(SERIALIZED_NAME_T_LOWER_CASE) + @jakarta.annotation.Nullable + private Long tLowerCase; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; + + @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) + @jakarta.annotation.Nullable + private String iLowerCase; + + public static final String SERIALIZED_NAME_F_LOWER_CASE = "f"; + + @SerializedName(SERIALIZED_NAME_F_LOWER_CASE) + @jakarta.annotation.Nullable + private Long fLowerCase; + + public static final String SERIALIZED_NAME_L = "L"; + + @SerializedName(SERIALIZED_NAME_L) + @jakarta.annotation.Nullable + private Long L; + + public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; + + @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) + @jakarta.annotation.Nullable + private String oLowerCase; + + public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; + + @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) + @jakarta.annotation.Nullable + private String cLowerCase; + + public static final String SERIALIZED_NAME_H_LOWER_CASE = "h"; + + @SerializedName(SERIALIZED_NAME_H_LOWER_CASE) + @jakarta.annotation.Nullable + private String hLowerCase; + + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; + + @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) + @jakarta.annotation.Nullable + private String lLowerCase; + + public static final String SERIALIZED_NAME_V_LOWER_CASE = "v"; + + @SerializedName(SERIALIZED_NAME_V_LOWER_CASE) + @jakarta.annotation.Nullable + private String vLowerCase; + + public static final String SERIALIZED_NAME_N_LOWER_CASE = "n"; + + @SerializedName(SERIALIZED_NAME_N_LOWER_CASE) + @jakarta.annotation.Nullable + private Long nLowerCase; + + public static final String SERIALIZED_NAME_X_LOWER_CASE = "x"; + + @SerializedName(SERIALIZED_NAME_X_LOWER_CASE) + @jakarta.annotation.Nullable + private Boolean xLowerCase; + + public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; + + @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) + @jakarta.annotation.Nullable + private String qLowerCase; + + public static final String SERIALIZED_NAME_V = "V"; + + @SerializedName(SERIALIZED_NAME_V) + @jakarta.annotation.Nullable + private String V; + + public static final String SERIALIZED_NAME_Q = "Q"; + + @SerializedName(SERIALIZED_NAME_Q) + @jakarta.annotation.Nullable + private String Q; + + public static final String SERIALIZED_NAME_B = "B"; + + @SerializedName(SERIALIZED_NAME_B) + @jakarta.annotation.Nullable + private String B; + + public KlineStreamResponseK() {} + + public KlineStreamResponseK tLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; + return this; + } + + /** + * startTime + * + * @return tLowerCase + */ + @jakarta.annotation.Nullable + public Long gettLowerCase() { + return tLowerCase; + } + + public void settLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; + } + + public KlineStreamResponseK T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * endTime + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + public KlineStreamResponseK sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public KlineStreamResponseK iLowerCase(@jakarta.annotation.Nullable String iLowerCase) { + this.iLowerCase = iLowerCase; + return this; + } + + /** + * interval + * + * @return iLowerCase + */ + @jakarta.annotation.Nullable + public String getiLowerCase() { + return iLowerCase; + } + + public void setiLowerCase(@jakarta.annotation.Nullable String iLowerCase) { + this.iLowerCase = iLowerCase; + } + + public KlineStreamResponseK fLowerCase(@jakarta.annotation.Nullable Long fLowerCase) { + this.fLowerCase = fLowerCase; + return this; + } + + /** + * firstTradeId + * + * @return fLowerCase + */ + @jakarta.annotation.Nullable + public Long getfLowerCase() { + return fLowerCase; + } + + public void setfLowerCase(@jakarta.annotation.Nullable Long fLowerCase) { + this.fLowerCase = fLowerCase; + } + + public KlineStreamResponseK L(@jakarta.annotation.Nullable Long L) { + this.L = L; + return this; + } + + /** + * lastTradeId + * + * @return L + */ + @jakarta.annotation.Nullable + public Long getL() { + return L; + } + + public void setL(@jakarta.annotation.Nullable Long L) { + this.L = L; + } + + public KlineStreamResponseK oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + return this; + } + + /** + * openPrice + * + * @return oLowerCase + */ + @jakarta.annotation.Nullable + public String getoLowerCase() { + return oLowerCase; + } + + public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + } + + public KlineStreamResponseK cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + return this; + } + + /** + * closePrice + * + * @return cLowerCase + */ + @jakarta.annotation.Nullable + public String getcLowerCase() { + return cLowerCase; + } + + public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + } + + public KlineStreamResponseK hLowerCase(@jakarta.annotation.Nullable String hLowerCase) { + this.hLowerCase = hLowerCase; + return this; + } + + /** + * highPrice + * + * @return hLowerCase + */ + @jakarta.annotation.Nullable + public String gethLowerCase() { + return hLowerCase; + } + + public void sethLowerCase(@jakarta.annotation.Nullable String hLowerCase) { + this.hLowerCase = hLowerCase; + } + + public KlineStreamResponseK lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + return this; + } + + /** + * lowPrice + * + * @return lLowerCase + */ + @jakarta.annotation.Nullable + public String getlLowerCase() { + return lLowerCase; + } + + public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + } + + public KlineStreamResponseK vLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + return this; + } + + /** + * volume + * + * @return vLowerCase + */ + @jakarta.annotation.Nullable + public String getvLowerCase() { + return vLowerCase; + } + + public void setvLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + } + + public KlineStreamResponseK nLowerCase(@jakarta.annotation.Nullable Long nLowerCase) { + this.nLowerCase = nLowerCase; + return this; + } + + /** + * tradeNum + * + * @return nLowerCase + */ + @jakarta.annotation.Nullable + public Long getnLowerCase() { + return nLowerCase; + } + + public void setnLowerCase(@jakarta.annotation.Nullable Long nLowerCase) { + this.nLowerCase = nLowerCase; + } + + public KlineStreamResponseK xLowerCase(@jakarta.annotation.Nullable Boolean xLowerCase) { + this.xLowerCase = xLowerCase; + return this; + } + + /** + * klineComplete + * + * @return xLowerCase + */ + @jakarta.annotation.Nullable + public Boolean getxLowerCase() { + return xLowerCase; + } + + public void setxLowerCase(@jakarta.annotation.Nullable Boolean xLowerCase) { + this.xLowerCase = xLowerCase; + } + + public KlineStreamResponseK qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + return this; + } + + /** + * quoteAssetVolume + * + * @return qLowerCase + */ + @jakarta.annotation.Nullable + public String getqLowerCase() { + return qLowerCase; + } + + public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + } + + public KlineStreamResponseK V(@jakarta.annotation.Nullable String V) { + this.V = V; + return this; + } + + /** + * takerBuyBaseAssetVolume + * + * @return V + */ + @jakarta.annotation.Nullable + public String getV() { + return V; + } + + public void setV(@jakarta.annotation.Nullable String V) { + this.V = V; + } + + public KlineStreamResponseK Q(@jakarta.annotation.Nullable String Q) { + this.Q = Q; + return this; + } + + /** + * takerBuyQuoteAssetVolume + * + * @return Q + */ + @jakarta.annotation.Nullable + public String getQ() { + return Q; + } + + public void setQ(@jakarta.annotation.Nullable String Q) { + this.Q = Q; + } + + public KlineStreamResponseK B(@jakarta.annotation.Nullable String B) { + this.B = B; + return this; + } + + /** + * ignore + * + * @return B + */ + @jakarta.annotation.Nullable + public String getB() { + return B; + } + + public void setB(@jakarta.annotation.Nullable String B) { + this.B = B; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + KlineStreamResponseK klineStreamResponseK = (KlineStreamResponseK) o; + return Objects.equals(this.tLowerCase, klineStreamResponseK.tLowerCase) + && Objects.equals(this.T, klineStreamResponseK.T) + && Objects.equals(this.sLowerCase, klineStreamResponseK.sLowerCase) + && Objects.equals(this.iLowerCase, klineStreamResponseK.iLowerCase) + && Objects.equals(this.fLowerCase, klineStreamResponseK.fLowerCase) + && Objects.equals(this.L, klineStreamResponseK.L) + && Objects.equals(this.oLowerCase, klineStreamResponseK.oLowerCase) + && Objects.equals(this.cLowerCase, klineStreamResponseK.cLowerCase) + && Objects.equals(this.hLowerCase, klineStreamResponseK.hLowerCase) + && Objects.equals(this.lLowerCase, klineStreamResponseK.lLowerCase) + && Objects.equals(this.vLowerCase, klineStreamResponseK.vLowerCase) + && Objects.equals(this.nLowerCase, klineStreamResponseK.nLowerCase) + && Objects.equals(this.xLowerCase, klineStreamResponseK.xLowerCase) + && Objects.equals(this.qLowerCase, klineStreamResponseK.qLowerCase) + && Objects.equals(this.V, klineStreamResponseK.V) + && Objects.equals(this.Q, klineStreamResponseK.Q) + && Objects.equals(this.B, klineStreamResponseK.B); + } + + @Override + public int hashCode() { + return Objects.hash( + tLowerCase, + T, + sLowerCase, + iLowerCase, + fLowerCase, + L, + oLowerCase, + cLowerCase, + hLowerCase, + lLowerCase, + vLowerCase, + nLowerCase, + xLowerCase, + qLowerCase, + V, + Q, + B); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KlineStreamResponseK {\n"); + sb.append(" tLowerCase: ").append(toIndentedString(tLowerCase)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); + sb.append(" fLowerCase: ").append(toIndentedString(fLowerCase)).append("\n"); + sb.append(" L: ").append(toIndentedString(L)).append("\n"); + sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); + sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); + sb.append(" hLowerCase: ").append(toIndentedString(hLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); + sb.append(" nLowerCase: ").append(toIndentedString(nLowerCase)).append("\n"); + sb.append(" xLowerCase: ").append(toIndentedString(xLowerCase)).append("\n"); + sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append(" V: ").append(toIndentedString(V)).append("\n"); + sb.append(" Q: ").append(toIndentedString(Q)).append("\n"); + sb.append(" B: ").append(toIndentedString(B)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + String tLowerCaseValueAsString = tLowerCaseValue.toString(); + valMap.put("tLowerCase", tLowerCaseValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + String iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + String iLowerCaseValueAsString = iLowerCaseValue.toString(); + valMap.put("iLowerCase", iLowerCaseValueAsString); + } + Long fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + String fLowerCaseValueAsString = fLowerCaseValue.toString(); + valMap.put("fLowerCase", fLowerCaseValueAsString); + } + Long LValue = getL(); + if (LValue != null) { + String LValueAsString = LValue.toString(); + valMap.put("L", LValueAsString); + } + String oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + String oLowerCaseValueAsString = oLowerCaseValue.toString(); + valMap.put("oLowerCase", oLowerCaseValueAsString); + } + String cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + String cLowerCaseValueAsString = cLowerCaseValue.toString(); + valMap.put("cLowerCase", cLowerCaseValueAsString); + } + String hLowerCaseValue = gethLowerCase(); + if (hLowerCaseValue != null) { + String hLowerCaseValueAsString = hLowerCaseValue.toString(); + valMap.put("hLowerCase", hLowerCaseValueAsString); + } + String lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + String vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + String vLowerCaseValueAsString = vLowerCaseValue.toString(); + valMap.put("vLowerCase", vLowerCaseValueAsString); + } + Long nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + String nLowerCaseValueAsString = nLowerCaseValue.toString(); + valMap.put("nLowerCase", nLowerCaseValueAsString); + } + Boolean xLowerCaseValue = getxLowerCase(); + if (xLowerCaseValue != null) { + String xLowerCaseValueAsString = xLowerCaseValue.toString(); + valMap.put("xLowerCase", xLowerCaseValueAsString); + } + String qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + String qLowerCaseValueAsString = qLowerCaseValue.toString(); + valMap.put("qLowerCase", qLowerCaseValueAsString); + } + String VValue = getV(); + if (VValue != null) { + String VValueAsString = VValue.toString(); + valMap.put("V", VValueAsString); + } + String QValue = getQ(); + if (QValue != null) { + String QValueAsString = QValue.toString(); + valMap.put("Q", QValueAsString); + } + String BValue = getB(); + if (BValue != null) { + String BValueAsString = BValue.toString(); + valMap.put("B", BValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + valMap.put("tLowerCase", tLowerCaseValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + valMap.put("iLowerCase", iLowerCaseValue); + } + Object fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + valMap.put("fLowerCase", fLowerCaseValue); + } + Object LValue = getL(); + if (LValue != null) { + valMap.put("L", LValue); + } + Object oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + valMap.put("oLowerCase", oLowerCaseValue); + } + Object cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + valMap.put("cLowerCase", cLowerCaseValue); + } + Object hLowerCaseValue = gethLowerCase(); + if (hLowerCaseValue != null) { + valMap.put("hLowerCase", hLowerCaseValue); + } + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); + } + Object vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + valMap.put("vLowerCase", vLowerCaseValue); + } + Object nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + valMap.put("nLowerCase", nLowerCaseValue); + } + Object xLowerCaseValue = getxLowerCase(); + if (xLowerCaseValue != null) { + valMap.put("xLowerCase", xLowerCaseValue); + } + Object qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + valMap.put("qLowerCase", qLowerCaseValue); + } + Object VValue = getV(); + if (VValue != null) { + valMap.put("V", VValue); + } + Object QValue = getQ(); + if (QValue != null) { + valMap.put("Q", QValue); + } + Object BValue = getB(); + if (BValue != null) { + valMap.put("B", BValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("t"); + openapiFields.add("T"); + openapiFields.add("s"); + openapiFields.add("i"); + openapiFields.add("f"); + openapiFields.add("L"); + openapiFields.add("o"); + openapiFields.add("c"); + openapiFields.add("h"); + openapiFields.add("l"); + openapiFields.add("v"); + openapiFields.add("n"); + openapiFields.add("x"); + openapiFields.add("q"); + openapiFields.add("V"); + openapiFields.add("Q"); + openapiFields.add("B"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to KlineStreamResponseK + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!KlineStreamResponseK.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in KlineStreamResponseK is not found in" + + " the empty JSON string", + KlineStreamResponseK.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!KlineStreamResponseK.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `KlineStreamResponseK` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("i") != null && !jsonObj.get("i").isJsonNull()) + && !jsonObj.get("i").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `i` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("i").toString())); + } + if ((jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) + && !jsonObj.get("o").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `o` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("o").toString())); + } + if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) + && !jsonObj.get("c").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `c` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("c").toString())); + } + if ((jsonObj.get("h") != null && !jsonObj.get("h").isJsonNull()) + && !jsonObj.get("h").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `h` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("h").toString())); + } + if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) + && !jsonObj.get("l").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `l` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("l").toString())); + } + if ((jsonObj.get("v") != null && !jsonObj.get("v").isJsonNull()) + && !jsonObj.get("v").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `v` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("v").toString())); + } + if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) + && !jsonObj.get("q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("q").toString())); + } + if ((jsonObj.get("V") != null && !jsonObj.get("V").isJsonNull()) + && !jsonObj.get("V").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `V` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("V").toString())); + } + if ((jsonObj.get("Q") != null && !jsonObj.get("Q").isJsonNull()) + && !jsonObj.get("Q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("Q").toString())); + } + if ((jsonObj.get("B") != null && !jsonObj.get("B").isJsonNull()) + && !jsonObj.get("B").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `B` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("B").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!KlineStreamResponseK.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'KlineStreamResponseK' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(KlineStreamResponseK.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, KlineStreamResponseK value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public KlineStreamResponseK read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of KlineStreamResponseK given an JSON string + * + * @param jsonString JSON string + * @return An instance of KlineStreamResponseK + * @throws IOException if the JSON string is invalid with respect to KlineStreamResponseK + */ + public static KlineStreamResponseK fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, KlineStreamResponseK.class); + } + + /** + * Convert an instance of KlineStreamResponseK to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/Levels.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/Levels.java new file mode 100644 index 000000000..440da1179 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/Levels.java @@ -0,0 +1,75 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets levels */ +@JsonAdapter(Levels.Adapter.class) +public enum Levels { + LEVELS_5("5"), + + LEVELS_10("10"), + + LEVELS_20("20"); + + private String value; + + Levels(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Levels fromValue(String value) { + for (Levels b : Levels.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Levels enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Levels read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Levels.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Levels.fromValue(value); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/MiniTickerStreamRequest.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/MiniTickerStreamRequest.java new file mode 100644 index 000000000..15fdb28d3 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/MiniTickerStreamRequest.java @@ -0,0 +1,278 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** MiniTickerStreamRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class MiniTickerStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Integer id; + + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public MiniTickerStreamRequest() {} + + public MiniTickerStreamRequest id(@jakarta.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Integer id) { + this.id = id; + } + + public MiniTickerStreamRequest symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Symbol to subscribe, in lowercase stream format. + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MiniTickerStreamRequest miniTickerStreamRequest = (MiniTickerStreamRequest) o; + return Objects.equals(this.id, miniTickerStreamRequest.id) + && Objects.equals(this.symbol, miniTickerStreamRequest.symbol); + } + + @Override + public int hashCode() { + return Objects.hash(id, symbol); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MiniTickerStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Integer idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("symbol"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MiniTickerStreamRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MiniTickerStreamRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in MiniTickerStreamRequest is not found" + + " in the empty JSON string", + MiniTickerStreamRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MiniTickerStreamRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `MiniTickerStreamRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MiniTickerStreamRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MiniTickerStreamRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(MiniTickerStreamRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, MiniTickerStreamRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MiniTickerStreamRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of MiniTickerStreamRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of MiniTickerStreamRequest + * @throws IOException if the JSON string is invalid with respect to MiniTickerStreamRequest + */ + public static MiniTickerStreamRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MiniTickerStreamRequest.class); + } + + /** + * Convert an instance of MiniTickerStreamRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/MiniTickerStreamResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/MiniTickerStreamResponse.java new file mode 100644 index 000000000..3e132fd2e --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/MiniTickerStreamResponse.java @@ -0,0 +1,602 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** MiniTickerStreamResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class MiniTickerStreamResponse extends BaseDTO { + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; + + @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) + @jakarta.annotation.Nullable + private String cLowerCase; + + public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; + + @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) + @jakarta.annotation.Nullable + private String oLowerCase; + + public static final String SERIALIZED_NAME_H_LOWER_CASE = "h"; + + @SerializedName(SERIALIZED_NAME_H_LOWER_CASE) + @jakarta.annotation.Nullable + private String hLowerCase; + + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; + + @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) + @jakarta.annotation.Nullable + private String lLowerCase; + + public static final String SERIALIZED_NAME_V_LOWER_CASE = "v"; + + @SerializedName(SERIALIZED_NAME_V_LOWER_CASE) + @jakarta.annotation.Nullable + private String vLowerCase; + + public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; + + @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) + @jakarta.annotation.Nullable + private String qLowerCase; + + public MiniTickerStreamResponse() {} + + public MiniTickerStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * eventType + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public MiniTickerStreamResponse E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * eventTime + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public MiniTickerStreamResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public MiniTickerStreamResponse cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + return this; + } + + /** + * closePrice + * + * @return cLowerCase + */ + @jakarta.annotation.Nullable + public String getcLowerCase() { + return cLowerCase; + } + + public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + } + + public MiniTickerStreamResponse oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + return this; + } + + /** + * openPrice + * + * @return oLowerCase + */ + @jakarta.annotation.Nullable + public String getoLowerCase() { + return oLowerCase; + } + + public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + } + + public MiniTickerStreamResponse hLowerCase(@jakarta.annotation.Nullable String hLowerCase) { + this.hLowerCase = hLowerCase; + return this; + } + + /** + * highPrice + * + * @return hLowerCase + */ + @jakarta.annotation.Nullable + public String gethLowerCase() { + return hLowerCase; + } + + public void sethLowerCase(@jakarta.annotation.Nullable String hLowerCase) { + this.hLowerCase = hLowerCase; + } + + public MiniTickerStreamResponse lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + return this; + } + + /** + * lowPrice + * + * @return lLowerCase + */ + @jakarta.annotation.Nullable + public String getlLowerCase() { + return lLowerCase; + } + + public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + } + + public MiniTickerStreamResponse vLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + return this; + } + + /** + * volume + * + * @return vLowerCase + */ + @jakarta.annotation.Nullable + public String getvLowerCase() { + return vLowerCase; + } + + public void setvLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + } + + public MiniTickerStreamResponse qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + return this; + } + + /** + * quoteVolume + * + * @return qLowerCase + */ + @jakarta.annotation.Nullable + public String getqLowerCase() { + return qLowerCase; + } + + public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MiniTickerStreamResponse miniTickerStreamResponse = (MiniTickerStreamResponse) o; + return Objects.equals(this.eLowerCase, miniTickerStreamResponse.eLowerCase) + && Objects.equals(this.E, miniTickerStreamResponse.E) + && Objects.equals(this.sLowerCase, miniTickerStreamResponse.sLowerCase) + && Objects.equals(this.cLowerCase, miniTickerStreamResponse.cLowerCase) + && Objects.equals(this.oLowerCase, miniTickerStreamResponse.oLowerCase) + && Objects.equals(this.hLowerCase, miniTickerStreamResponse.hLowerCase) + && Objects.equals(this.lLowerCase, miniTickerStreamResponse.lLowerCase) + && Objects.equals(this.vLowerCase, miniTickerStreamResponse.vLowerCase) + && Objects.equals(this.qLowerCase, miniTickerStreamResponse.qLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash( + eLowerCase, + E, + sLowerCase, + cLowerCase, + oLowerCase, + hLowerCase, + lLowerCase, + vLowerCase, + qLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MiniTickerStreamResponse {\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); + sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); + sb.append(" hLowerCase: ").append(toIndentedString(hLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); + sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + String cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + String cLowerCaseValueAsString = cLowerCaseValue.toString(); + valMap.put("cLowerCase", cLowerCaseValueAsString); + } + String oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + String oLowerCaseValueAsString = oLowerCaseValue.toString(); + valMap.put("oLowerCase", oLowerCaseValueAsString); + } + String hLowerCaseValue = gethLowerCase(); + if (hLowerCaseValue != null) { + String hLowerCaseValueAsString = hLowerCaseValue.toString(); + valMap.put("hLowerCase", hLowerCaseValueAsString); + } + String lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + String vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + String vLowerCaseValueAsString = vLowerCaseValue.toString(); + valMap.put("vLowerCase", vLowerCaseValueAsString); + } + String qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + String qLowerCaseValueAsString = qLowerCaseValue.toString(); + valMap.put("qLowerCase", qLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + valMap.put("cLowerCase", cLowerCaseValue); + } + Object oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + valMap.put("oLowerCase", oLowerCaseValue); + } + Object hLowerCaseValue = gethLowerCase(); + if (hLowerCaseValue != null) { + valMap.put("hLowerCase", hLowerCaseValue); + } + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); + } + Object vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + valMap.put("vLowerCase", vLowerCaseValue); + } + Object qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + valMap.put("qLowerCase", qLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("e"); + openapiFields.add("E"); + openapiFields.add("s"); + openapiFields.add("c"); + openapiFields.add("o"); + openapiFields.add("h"); + openapiFields.add("l"); + openapiFields.add("v"); + openapiFields.add("q"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MiniTickerStreamResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MiniTickerStreamResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in MiniTickerStreamResponse is not found" + + " in the empty JSON string", + MiniTickerStreamResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MiniTickerStreamResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `MiniTickerStreamResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) + && !jsonObj.get("c").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `c` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("c").toString())); + } + if ((jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) + && !jsonObj.get("o").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `o` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("o").toString())); + } + if ((jsonObj.get("h") != null && !jsonObj.get("h").isJsonNull()) + && !jsonObj.get("h").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `h` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("h").toString())); + } + if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) + && !jsonObj.get("l").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `l` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("l").toString())); + } + if ((jsonObj.get("v") != null && !jsonObj.get("v").isJsonNull()) + && !jsonObj.get("v").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `v` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("v").toString())); + } + if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) + && !jsonObj.get("q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("q").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MiniTickerStreamResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MiniTickerStreamResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(MiniTickerStreamResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, MiniTickerStreamResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MiniTickerStreamResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of MiniTickerStreamResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of MiniTickerStreamResponse + * @throws IOException if the JSON string is invalid with respect to MiniTickerStreamResponse + */ + public static MiniTickerStreamResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MiniTickerStreamResponse.class); + } + + /** + * Convert an instance of MiniTickerStreamResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/PartialDepthStreamRequest.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/PartialDepthStreamRequest.java new file mode 100644 index 000000000..9e27adac4 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/PartialDepthStreamRequest.java @@ -0,0 +1,363 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** PartialDepthStreamRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class PartialDepthStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Integer id; + + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_LEVELS = "levels"; + + @SerializedName(SERIALIZED_NAME_LEVELS) + @jakarta.annotation.Nullable + private Levels levels; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private Interval interval; + + public PartialDepthStreamRequest() {} + + public PartialDepthStreamRequest id(@jakarta.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Integer id) { + this.id = id; + } + + public PartialDepthStreamRequest symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Symbol to subscribe, in lowercase stream format. + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public PartialDepthStreamRequest levels(@jakarta.annotation.Nullable Levels levels) { + this.levels = levels; + return this; + } + + /** + * Get levels + * + * @return levels + */ + @jakarta.annotation.Nullable + @Valid + public Levels getLevels() { + return levels; + } + + public void setLevels(@jakarta.annotation.Nullable Levels levels) { + this.levels = levels; + } + + public PartialDepthStreamRequest interval(@jakarta.annotation.Nullable Interval interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + @Valid + public Interval getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable Interval interval) { + this.interval = interval; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PartialDepthStreamRequest partialDepthStreamRequest = (PartialDepthStreamRequest) o; + return Objects.equals(this.id, partialDepthStreamRequest.id) + && Objects.equals(this.symbol, partialDepthStreamRequest.symbol) + && Objects.equals(this.levels, partialDepthStreamRequest.levels) + && Objects.equals(this.interval, partialDepthStreamRequest.interval); + } + + @Override + public int hashCode() { + return Objects.hash(id, symbol, levels, interval); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PartialDepthStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" levels: ").append(toIndentedString(levels)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Integer idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + Levels levelsValue = getLevels(); + if (levelsValue != null) { + String levelsValueAsString = levelsValue.toString(); + valMap.put("levels", levelsValueAsString); + } + Interval intervalValue = getInterval(); + if (intervalValue != null) { + String intervalValueAsString = intervalValue.toString(); + valMap.put("interval", intervalValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + Object levelsValue = getLevels(); + if (levelsValue != null) { + valMap.put("levels", levelsValue); + } + Object intervalValue = getInterval(); + if (intervalValue != null) { + valMap.put("interval", intervalValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("symbol"); + openapiFields.add("levels"); + openapiFields.add("interval"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PartialDepthStreamRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PartialDepthStreamRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PartialDepthStreamRequest is not found" + + " in the empty JSON string", + PartialDepthStreamRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PartialDepthStreamRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `PartialDepthStreamRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + // validate the optional field `levels` + if (jsonObj.get("levels") != null && !jsonObj.get("levels").isJsonNull()) { + Levels.validateJsonElement(jsonObj.get("levels")); + } + // validate the optional field `interval` + if (jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) { + Interval.validateJsonElement(jsonObj.get("interval")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PartialDepthStreamRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PartialDepthStreamRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PartialDepthStreamRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PartialDepthStreamRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PartialDepthStreamRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of PartialDepthStreamRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of PartialDepthStreamRequest + * @throws IOException if the JSON string is invalid with respect to PartialDepthStreamRequest + */ + public static PartialDepthStreamRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PartialDepthStreamRequest.class); + } + + /** + * Convert an instance of PartialDepthStreamRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/PartialDepthStreamResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/PartialDepthStreamResponse.java new file mode 100644 index 000000000..a3fe23839 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/PartialDepthStreamResponse.java @@ -0,0 +1,587 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** PartialDepthStreamResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class PartialDepthStreamResponse extends BaseDTO { + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public static final String SERIALIZED_NAME_U = "U"; + + @SerializedName(SERIALIZED_NAME_U) + @jakarta.annotation.Nullable + private Long U; + + public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; + + @SerializedName(SERIALIZED_NAME_U_LOWER_CASE) + @jakarta.annotation.Nullable + private Long uLowerCase; + + public static final String SERIALIZED_NAME_PU = "pu"; + + @SerializedName(SERIALIZED_NAME_PU) + @jakarta.annotation.Nullable + private Long pu; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_B_LOWER_CASE = "b"; + + @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) + @jakarta.annotation.Nullable + private List> bLowerCase; + + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private List> aLowerCase; + + public PartialDepthStreamResponse() {} + + public PartialDepthStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * eventType + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public PartialDepthStreamResponse E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * eventTime + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public PartialDepthStreamResponse T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * transactionTime + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + public PartialDepthStreamResponse U(@jakarta.annotation.Nullable Long U) { + this.U = U; + return this; + } + + /** + * firstUpdateId + * + * @return U + */ + @jakarta.annotation.Nullable + public Long getU() { + return U; + } + + public void setU(@jakarta.annotation.Nullable Long U) { + this.U = U; + } + + public PartialDepthStreamResponse uLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + return this; + } + + /** + * lastUpdateId + * + * @return uLowerCase + */ + @jakarta.annotation.Nullable + public Long getuLowerCase() { + return uLowerCase; + } + + public void setuLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + } + + public PartialDepthStreamResponse pu(@jakarta.annotation.Nullable Long pu) { + this.pu = pu; + return this; + } + + /** + * previousUpdateId + * + * @return pu + */ + @jakarta.annotation.Nullable + public Long getPu() { + return pu; + } + + public void setPu(@jakarta.annotation.Nullable Long pu) { + this.pu = pu; + } + + public PartialDepthStreamResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public PartialDepthStreamResponse bLowerCase( + @jakarta.annotation.Nullable List> bLowerCase) { + this.bLowerCase = bLowerCase; + return this; + } + + public PartialDepthStreamResponse addBLowerCaseItem(List bLowerCaseItem) { + if (this.bLowerCase == null) { + this.bLowerCase = new ArrayList<>(); + } + this.bLowerCase.add(bLowerCaseItem); + return this; + } + + /** + * bids to be updated + * + * @return bLowerCase + */ + @jakarta.annotation.Nullable + @Valid + public List> getbLowerCase() { + return bLowerCase; + } + + public void setbLowerCase(@jakarta.annotation.Nullable List> bLowerCase) { + this.bLowerCase = bLowerCase; + } + + public PartialDepthStreamResponse aLowerCase( + @jakarta.annotation.Nullable List> aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + public PartialDepthStreamResponse addALowerCaseItem(List aLowerCaseItem) { + if (this.aLowerCase == null) { + this.aLowerCase = new ArrayList<>(); + } + this.aLowerCase.add(aLowerCaseItem); + return this; + } + + /** + * asks to be updated + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + @Valid + public List> getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable List> aLowerCase) { + this.aLowerCase = aLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PartialDepthStreamResponse partialDepthStreamResponse = (PartialDepthStreamResponse) o; + return Objects.equals(this.eLowerCase, partialDepthStreamResponse.eLowerCase) + && Objects.equals(this.E, partialDepthStreamResponse.E) + && Objects.equals(this.T, partialDepthStreamResponse.T) + && Objects.equals(this.U, partialDepthStreamResponse.U) + && Objects.equals(this.uLowerCase, partialDepthStreamResponse.uLowerCase) + && Objects.equals(this.pu, partialDepthStreamResponse.pu) + && Objects.equals(this.sLowerCase, partialDepthStreamResponse.sLowerCase) + && Objects.equals(this.bLowerCase, partialDepthStreamResponse.bLowerCase) + && Objects.equals(this.aLowerCase, partialDepthStreamResponse.aLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash( + eLowerCase, E, T, U, uLowerCase, pu, sLowerCase, bLowerCase, aLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PartialDepthStreamResponse {\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" U: ").append(toIndentedString(U)).append("\n"); + sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); + sb.append(" pu: ").append(toIndentedString(pu)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + Long UValue = getU(); + if (UValue != null) { + String UValueAsString = UValue.toString(); + valMap.put("U", UValueAsString); + } + Long uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + String uLowerCaseValueAsString = uLowerCaseValue.toString(); + valMap.put("uLowerCase", uLowerCaseValueAsString); + } + Long puValue = getPu(); + if (puValue != null) { + String puValueAsString = puValue.toString(); + valMap.put("pu", puValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + List> bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + String bLowerCaseValueAsString = JSON.getGson().toJson(bLowerCaseValue); + valMap.put("bLowerCase", bLowerCaseValueAsString); + } + List> aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = JSON.getGson().toJson(aLowerCaseValue); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + Object UValue = getU(); + if (UValue != null) { + valMap.put("U", UValue); + } + Object uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + valMap.put("uLowerCase", uLowerCaseValue); + } + Object puValue = getPu(); + if (puValue != null) { + valMap.put("pu", puValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + valMap.put("bLowerCase", bLowerCaseValue); + } + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("e"); + openapiFields.add("E"); + openapiFields.add("T"); + openapiFields.add("U"); + openapiFields.add("u"); + openapiFields.add("pu"); + openapiFields.add("s"); + openapiFields.add("b"); + openapiFields.add("a"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PartialDepthStreamResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PartialDepthStreamResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PartialDepthStreamResponse is not" + + " found in the empty JSON string", + PartialDepthStreamResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PartialDepthStreamResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `PartialDepthStreamResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("b") != null + && !jsonObj.get("b").isJsonNull() + && !jsonObj.get("b").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `b` to be an array in the JSON string but got `%s`", + jsonObj.get("b").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("a") != null + && !jsonObj.get("a").isJsonNull() + && !jsonObj.get("a").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `a` to be an array in the JSON string but got `%s`", + jsonObj.get("a").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PartialDepthStreamResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PartialDepthStreamResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PartialDepthStreamResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PartialDepthStreamResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PartialDepthStreamResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of PartialDepthStreamResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of PartialDepthStreamResponse + * @throws IOException if the JSON string is invalid with respect to PartialDepthStreamResponse + */ + public static PartialDepthStreamResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PartialDepthStreamResponse.class); + } + + /** + * Convert an instance of PartialDepthStreamResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/TickerStreamRequest.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/TickerStreamRequest.java new file mode 100644 index 000000000..c129c2830 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/TickerStreamRequest.java @@ -0,0 +1,277 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** TickerStreamRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class TickerStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Integer id; + + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public TickerStreamRequest() {} + + public TickerStreamRequest id(@jakarta.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Integer id) { + this.id = id; + } + + public TickerStreamRequest symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Symbol to subscribe, in lowercase stream format. + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TickerStreamRequest tickerStreamRequest = (TickerStreamRequest) o; + return Objects.equals(this.id, tickerStreamRequest.id) + && Objects.equals(this.symbol, tickerStreamRequest.symbol); + } + + @Override + public int hashCode() { + return Objects.hash(id, symbol); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TickerStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Integer idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("symbol"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TickerStreamRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TickerStreamRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in TickerStreamRequest is not found in" + + " the empty JSON string", + TickerStreamRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TickerStreamRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `TickerStreamRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TickerStreamRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TickerStreamRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(TickerStreamRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, TickerStreamRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TickerStreamRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of TickerStreamRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of TickerStreamRequest + * @throws IOException if the JSON string is invalid with respect to TickerStreamRequest + */ + public static TickerStreamRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TickerStreamRequest.class); + } + + /** + * Convert an instance of TickerStreamRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/TickerStreamResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/TickerStreamResponse.java new file mode 100644 index 000000000..0b0207ec5 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/TickerStreamResponse.java @@ -0,0 +1,975 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** TickerStreamResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class TickerStreamResponse extends BaseDTO { + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; + + @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) + @jakarta.annotation.Nullable + private String pLowerCase; + + public static final String SERIALIZED_NAME_P = "P"; + + @SerializedName(SERIALIZED_NAME_P) + @jakarta.annotation.Nullable + private String P; + + public static final String SERIALIZED_NAME_W_LOWER_CASE = "w"; + + @SerializedName(SERIALIZED_NAME_W_LOWER_CASE) + @jakarta.annotation.Nullable + private String wLowerCase; + + public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; + + @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) + @jakarta.annotation.Nullable + private String cLowerCase; + + public static final String SERIALIZED_NAME_Q = "Q"; + + @SerializedName(SERIALIZED_NAME_Q) + @jakarta.annotation.Nullable + private String Q; + + public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; + + @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) + @jakarta.annotation.Nullable + private String oLowerCase; + + public static final String SERIALIZED_NAME_H_LOWER_CASE = "h"; + + @SerializedName(SERIALIZED_NAME_H_LOWER_CASE) + @jakarta.annotation.Nullable + private String hLowerCase; + + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; + + @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) + @jakarta.annotation.Nullable + private String lLowerCase; + + public static final String SERIALIZED_NAME_V_LOWER_CASE = "v"; + + @SerializedName(SERIALIZED_NAME_V_LOWER_CASE) + @jakarta.annotation.Nullable + private String vLowerCase; + + public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; + + @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) + @jakarta.annotation.Nullable + private String qLowerCase; + + public static final String SERIALIZED_NAME_O = "O"; + + @SerializedName(SERIALIZED_NAME_O) + @jakarta.annotation.Nullable + private Long O; + + public static final String SERIALIZED_NAME_C = "C"; + + @SerializedName(SERIALIZED_NAME_C) + @jakarta.annotation.Nullable + private Long C; + + public static final String SERIALIZED_NAME_F = "F"; + + @SerializedName(SERIALIZED_NAME_F) + @jakarta.annotation.Nullable + private Long F; + + public static final String SERIALIZED_NAME_L = "L"; + + @SerializedName(SERIALIZED_NAME_L) + @jakarta.annotation.Nullable + private Long L; + + public static final String SERIALIZED_NAME_N_LOWER_CASE = "n"; + + @SerializedName(SERIALIZED_NAME_N_LOWER_CASE) + @jakarta.annotation.Nullable + private Long nLowerCase; + + public TickerStreamResponse() {} + + public TickerStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * eventType + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public TickerStreamResponse E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * eventTime + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public TickerStreamResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public TickerStreamResponse pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + return this; + } + + /** + * priceChange + * + * @return pLowerCase + */ + @jakarta.annotation.Nullable + public String getpLowerCase() { + return pLowerCase; + } + + public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + } + + public TickerStreamResponse P(@jakarta.annotation.Nullable String P) { + this.P = P; + return this; + } + + /** + * priceChangePercent + * + * @return P + */ + @jakarta.annotation.Nullable + public String getP() { + return P; + } + + public void setP(@jakarta.annotation.Nullable String P) { + this.P = P; + } + + public TickerStreamResponse wLowerCase(@jakarta.annotation.Nullable String wLowerCase) { + this.wLowerCase = wLowerCase; + return this; + } + + /** + * averagePrice + * + * @return wLowerCase + */ + @jakarta.annotation.Nullable + public String getwLowerCase() { + return wLowerCase; + } + + public void setwLowerCase(@jakarta.annotation.Nullable String wLowerCase) { + this.wLowerCase = wLowerCase; + } + + public TickerStreamResponse cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + return this; + } + + /** + * closePrice + * + * @return cLowerCase + */ + @jakarta.annotation.Nullable + public String getcLowerCase() { + return cLowerCase; + } + + public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + } + + public TickerStreamResponse Q(@jakarta.annotation.Nullable String Q) { + this.Q = Q; + return this; + } + + /** + * lastTradeVolume + * + * @return Q + */ + @jakarta.annotation.Nullable + public String getQ() { + return Q; + } + + public void setQ(@jakarta.annotation.Nullable String Q) { + this.Q = Q; + } + + public TickerStreamResponse oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + return this; + } + + /** + * openPrice + * + * @return oLowerCase + */ + @jakarta.annotation.Nullable + public String getoLowerCase() { + return oLowerCase; + } + + public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + } + + public TickerStreamResponse hLowerCase(@jakarta.annotation.Nullable String hLowerCase) { + this.hLowerCase = hLowerCase; + return this; + } + + /** + * highPrice + * + * @return hLowerCase + */ + @jakarta.annotation.Nullable + public String gethLowerCase() { + return hLowerCase; + } + + public void sethLowerCase(@jakarta.annotation.Nullable String hLowerCase) { + this.hLowerCase = hLowerCase; + } + + public TickerStreamResponse lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + return this; + } + + /** + * lowPrice + * + * @return lLowerCase + */ + @jakarta.annotation.Nullable + public String getlLowerCase() { + return lLowerCase; + } + + public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + } + + public TickerStreamResponse vLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + return this; + } + + /** + * volume + * + * @return vLowerCase + */ + @jakarta.annotation.Nullable + public String getvLowerCase() { + return vLowerCase; + } + + public void setvLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + } + + public TickerStreamResponse qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + return this; + } + + /** + * quoteVolume + * + * @return qLowerCase + */ + @jakarta.annotation.Nullable + public String getqLowerCase() { + return qLowerCase; + } + + public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + } + + public TickerStreamResponse O(@jakarta.annotation.Nullable Long O) { + this.O = O; + return this; + } + + /** + * startTime + * + * @return O + */ + @jakarta.annotation.Nullable + public Long getO() { + return O; + } + + public void setO(@jakarta.annotation.Nullable Long O) { + this.O = O; + } + + public TickerStreamResponse C(@jakarta.annotation.Nullable Long C) { + this.C = C; + return this; + } + + /** + * endTime + * + * @return C + */ + @jakarta.annotation.Nullable + public Long getC() { + return C; + } + + public void setC(@jakarta.annotation.Nullable Long C) { + this.C = C; + } + + public TickerStreamResponse F(@jakarta.annotation.Nullable Long F) { + this.F = F; + return this; + } + + /** + * firstTradeId + * + * @return F + */ + @jakarta.annotation.Nullable + public Long getF() { + return F; + } + + public void setF(@jakarta.annotation.Nullable Long F) { + this.F = F; + } + + public TickerStreamResponse L(@jakarta.annotation.Nullable Long L) { + this.L = L; + return this; + } + + /** + * lastTradeId + * + * @return L + */ + @jakarta.annotation.Nullable + public Long getL() { + return L; + } + + public void setL(@jakarta.annotation.Nullable Long L) { + this.L = L; + } + + public TickerStreamResponse nLowerCase(@jakarta.annotation.Nullable Long nLowerCase) { + this.nLowerCase = nLowerCase; + return this; + } + + /** + * tradeNum + * + * @return nLowerCase + */ + @jakarta.annotation.Nullable + public Long getnLowerCase() { + return nLowerCase; + } + + public void setnLowerCase(@jakarta.annotation.Nullable Long nLowerCase) { + this.nLowerCase = nLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TickerStreamResponse tickerStreamResponse = (TickerStreamResponse) o; + return Objects.equals(this.eLowerCase, tickerStreamResponse.eLowerCase) + && Objects.equals(this.E, tickerStreamResponse.E) + && Objects.equals(this.sLowerCase, tickerStreamResponse.sLowerCase) + && Objects.equals(this.pLowerCase, tickerStreamResponse.pLowerCase) + && Objects.equals(this.P, tickerStreamResponse.P) + && Objects.equals(this.wLowerCase, tickerStreamResponse.wLowerCase) + && Objects.equals(this.cLowerCase, tickerStreamResponse.cLowerCase) + && Objects.equals(this.Q, tickerStreamResponse.Q) + && Objects.equals(this.oLowerCase, tickerStreamResponse.oLowerCase) + && Objects.equals(this.hLowerCase, tickerStreamResponse.hLowerCase) + && Objects.equals(this.lLowerCase, tickerStreamResponse.lLowerCase) + && Objects.equals(this.vLowerCase, tickerStreamResponse.vLowerCase) + && Objects.equals(this.qLowerCase, tickerStreamResponse.qLowerCase) + && Objects.equals(this.O, tickerStreamResponse.O) + && Objects.equals(this.C, tickerStreamResponse.C) + && Objects.equals(this.F, tickerStreamResponse.F) + && Objects.equals(this.L, tickerStreamResponse.L) + && Objects.equals(this.nLowerCase, tickerStreamResponse.nLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash( + eLowerCase, + E, + sLowerCase, + pLowerCase, + P, + wLowerCase, + cLowerCase, + Q, + oLowerCase, + hLowerCase, + lLowerCase, + vLowerCase, + qLowerCase, + O, + C, + F, + L, + nLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TickerStreamResponse {\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); + sb.append(" P: ").append(toIndentedString(P)).append("\n"); + sb.append(" wLowerCase: ").append(toIndentedString(wLowerCase)).append("\n"); + sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); + sb.append(" Q: ").append(toIndentedString(Q)).append("\n"); + sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); + sb.append(" hLowerCase: ").append(toIndentedString(hLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); + sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append(" O: ").append(toIndentedString(O)).append("\n"); + sb.append(" C: ").append(toIndentedString(C)).append("\n"); + sb.append(" F: ").append(toIndentedString(F)).append("\n"); + sb.append(" L: ").append(toIndentedString(L)).append("\n"); + sb.append(" nLowerCase: ").append(toIndentedString(nLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + String pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + String pLowerCaseValueAsString = pLowerCaseValue.toString(); + valMap.put("pLowerCase", pLowerCaseValueAsString); + } + String PValue = getP(); + if (PValue != null) { + String PValueAsString = PValue.toString(); + valMap.put("P", PValueAsString); + } + String wLowerCaseValue = getwLowerCase(); + if (wLowerCaseValue != null) { + String wLowerCaseValueAsString = wLowerCaseValue.toString(); + valMap.put("wLowerCase", wLowerCaseValueAsString); + } + String cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + String cLowerCaseValueAsString = cLowerCaseValue.toString(); + valMap.put("cLowerCase", cLowerCaseValueAsString); + } + String QValue = getQ(); + if (QValue != null) { + String QValueAsString = QValue.toString(); + valMap.put("Q", QValueAsString); + } + String oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + String oLowerCaseValueAsString = oLowerCaseValue.toString(); + valMap.put("oLowerCase", oLowerCaseValueAsString); + } + String hLowerCaseValue = gethLowerCase(); + if (hLowerCaseValue != null) { + String hLowerCaseValueAsString = hLowerCaseValue.toString(); + valMap.put("hLowerCase", hLowerCaseValueAsString); + } + String lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + String vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + String vLowerCaseValueAsString = vLowerCaseValue.toString(); + valMap.put("vLowerCase", vLowerCaseValueAsString); + } + String qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + String qLowerCaseValueAsString = qLowerCaseValue.toString(); + valMap.put("qLowerCase", qLowerCaseValueAsString); + } + Long OValue = getO(); + if (OValue != null) { + String OValueAsString = OValue.toString(); + valMap.put("O", OValueAsString); + } + Long CValue = getC(); + if (CValue != null) { + String CValueAsString = CValue.toString(); + valMap.put("C", CValueAsString); + } + Long FValue = getF(); + if (FValue != null) { + String FValueAsString = FValue.toString(); + valMap.put("F", FValueAsString); + } + Long LValue = getL(); + if (LValue != null) { + String LValueAsString = LValue.toString(); + valMap.put("L", LValueAsString); + } + Long nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + String nLowerCaseValueAsString = nLowerCaseValue.toString(); + valMap.put("nLowerCase", nLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + valMap.put("pLowerCase", pLowerCaseValue); + } + Object PValue = getP(); + if (PValue != null) { + valMap.put("P", PValue); + } + Object wLowerCaseValue = getwLowerCase(); + if (wLowerCaseValue != null) { + valMap.put("wLowerCase", wLowerCaseValue); + } + Object cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + valMap.put("cLowerCase", cLowerCaseValue); + } + Object QValue = getQ(); + if (QValue != null) { + valMap.put("Q", QValue); + } + Object oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + valMap.put("oLowerCase", oLowerCaseValue); + } + Object hLowerCaseValue = gethLowerCase(); + if (hLowerCaseValue != null) { + valMap.put("hLowerCase", hLowerCaseValue); + } + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); + } + Object vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + valMap.put("vLowerCase", vLowerCaseValue); + } + Object qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + valMap.put("qLowerCase", qLowerCaseValue); + } + Object OValue = getO(); + if (OValue != null) { + valMap.put("O", OValue); + } + Object CValue = getC(); + if (CValue != null) { + valMap.put("C", CValue); + } + Object FValue = getF(); + if (FValue != null) { + valMap.put("F", FValue); + } + Object LValue = getL(); + if (LValue != null) { + valMap.put("L", LValue); + } + Object nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + valMap.put("nLowerCase", nLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("e"); + openapiFields.add("E"); + openapiFields.add("s"); + openapiFields.add("p"); + openapiFields.add("P"); + openapiFields.add("w"); + openapiFields.add("c"); + openapiFields.add("Q"); + openapiFields.add("o"); + openapiFields.add("h"); + openapiFields.add("l"); + openapiFields.add("v"); + openapiFields.add("q"); + openapiFields.add("O"); + openapiFields.add("C"); + openapiFields.add("F"); + openapiFields.add("L"); + openapiFields.add("n"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TickerStreamResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TickerStreamResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in TickerStreamResponse is not found in" + + " the empty JSON string", + TickerStreamResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TickerStreamResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `TickerStreamResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) + && !jsonObj.get("p").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `p` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("p").toString())); + } + if ((jsonObj.get("P") != null && !jsonObj.get("P").isJsonNull()) + && !jsonObj.get("P").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `P` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("P").toString())); + } + if ((jsonObj.get("w") != null && !jsonObj.get("w").isJsonNull()) + && !jsonObj.get("w").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `w` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("w").toString())); + } + if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) + && !jsonObj.get("c").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `c` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("c").toString())); + } + if ((jsonObj.get("Q") != null && !jsonObj.get("Q").isJsonNull()) + && !jsonObj.get("Q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("Q").toString())); + } + if ((jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) + && !jsonObj.get("o").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `o` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("o").toString())); + } + if ((jsonObj.get("h") != null && !jsonObj.get("h").isJsonNull()) + && !jsonObj.get("h").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `h` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("h").toString())); + } + if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) + && !jsonObj.get("l").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `l` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("l").toString())); + } + if ((jsonObj.get("v") != null && !jsonObj.get("v").isJsonNull()) + && !jsonObj.get("v").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `v` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("v").toString())); + } + if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) + && !jsonObj.get("q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("q").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TickerStreamResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TickerStreamResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(TickerStreamResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, TickerStreamResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TickerStreamResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of TickerStreamResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of TickerStreamResponse + * @throws IOException if the JSON string is invalid with respect to TickerStreamResponse + */ + public static TickerStreamResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TickerStreamResponse.class); + } + + /** + * Convert an instance of TickerStreamResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/TradeStreamRequest.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/TradeStreamRequest.java new file mode 100644 index 000000000..4a5f1686f --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/TradeStreamRequest.java @@ -0,0 +1,277 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** TradeStreamRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class TradeStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Integer id; + + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public TradeStreamRequest() {} + + public TradeStreamRequest id(@jakarta.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Integer id) { + this.id = id; + } + + public TradeStreamRequest symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Symbol to subscribe, in lowercase stream format. + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TradeStreamRequest tradeStreamRequest = (TradeStreamRequest) o; + return Objects.equals(this.id, tradeStreamRequest.id) + && Objects.equals(this.symbol, tradeStreamRequest.symbol); + } + + @Override + public int hashCode() { + return Objects.hash(id, symbol); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TradeStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Integer idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("symbol"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TradeStreamRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TradeStreamRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in TradeStreamRequest is not found in the" + + " empty JSON string", + TradeStreamRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TradeStreamRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `TradeStreamRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TradeStreamRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TradeStreamRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(TradeStreamRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, TradeStreamRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TradeStreamRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of TradeStreamRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of TradeStreamRequest + * @throws IOException if the JSON string is invalid with respect to TradeStreamRequest + */ + public static TradeStreamRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TradeStreamRequest.class); + } + + /** + * Convert an instance of TradeStreamRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/TradeStreamResponse.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/TradeStreamResponse.java new file mode 100644 index 000000000..33739a542 --- /dev/null +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/model/TradeStreamResponse.java @@ -0,0 +1,524 @@ +/* + * Alpha WebSocket Market Streams + * Access Alpha market streams over WebSocket. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.alpha.websocket.stream.model; + +import com.binance.connector.client.alpha.websocket.stream.JSON; +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** TradeStreamResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class TradeStreamResponse extends BaseDTO { + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; + + @SerializedName(SERIALIZED_NAME_T_LOWER_CASE) + @jakarta.annotation.Nullable + private Long tLowerCase; + + public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; + + @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) + @jakarta.annotation.Nullable + private String pLowerCase; + + public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; + + @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) + @jakarta.annotation.Nullable + private String qLowerCase; + + public static final String SERIALIZED_NAME_M_LOWER_CASE = "m"; + + @SerializedName(SERIALIZED_NAME_M_LOWER_CASE) + @jakarta.annotation.Nullable + private Boolean mLowerCase; + + public TradeStreamResponse() {} + + public TradeStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * eventType + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public TradeStreamResponse E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * eventTime + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public TradeStreamResponse T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * tradeTime + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + public TradeStreamResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public TradeStreamResponse tLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; + return this; + } + + /** + * tradeId + * + * @return tLowerCase + */ + @jakarta.annotation.Nullable + public Long gettLowerCase() { + return tLowerCase; + } + + public void settLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; + } + + public TradeStreamResponse pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + return this; + } + + /** + * fillPrice + * + * @return pLowerCase + */ + @jakarta.annotation.Nullable + public String getpLowerCase() { + return pLowerCase; + } + + public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + } + + public TradeStreamResponse qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + return this; + } + + /** + * fillQty + * + * @return qLowerCase + */ + @jakarta.annotation.Nullable + public String getqLowerCase() { + return qLowerCase; + } + + public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + } + + public TradeStreamResponse mLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { + this.mLowerCase = mLowerCase; + return this; + } + + /** + * isBuyerMaker + * + * @return mLowerCase + */ + @jakarta.annotation.Nullable + public Boolean getmLowerCase() { + return mLowerCase; + } + + public void setmLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { + this.mLowerCase = mLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TradeStreamResponse tradeStreamResponse = (TradeStreamResponse) o; + return Objects.equals(this.eLowerCase, tradeStreamResponse.eLowerCase) + && Objects.equals(this.E, tradeStreamResponse.E) + && Objects.equals(this.T, tradeStreamResponse.T) + && Objects.equals(this.sLowerCase, tradeStreamResponse.sLowerCase) + && Objects.equals(this.tLowerCase, tradeStreamResponse.tLowerCase) + && Objects.equals(this.pLowerCase, tradeStreamResponse.pLowerCase) + && Objects.equals(this.qLowerCase, tradeStreamResponse.qLowerCase) + && Objects.equals(this.mLowerCase, tradeStreamResponse.mLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash( + eLowerCase, E, T, sLowerCase, tLowerCase, pLowerCase, qLowerCase, mLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TradeStreamResponse {\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" tLowerCase: ").append(toIndentedString(tLowerCase)).append("\n"); + sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); + sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append(" mLowerCase: ").append(toIndentedString(mLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + Long tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + String tLowerCaseValueAsString = tLowerCaseValue.toString(); + valMap.put("tLowerCase", tLowerCaseValueAsString); + } + String pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + String pLowerCaseValueAsString = pLowerCaseValue.toString(); + valMap.put("pLowerCase", pLowerCaseValueAsString); + } + String qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + String qLowerCaseValueAsString = qLowerCaseValue.toString(); + valMap.put("qLowerCase", qLowerCaseValueAsString); + } + Boolean mLowerCaseValue = getmLowerCase(); + if (mLowerCaseValue != null) { + String mLowerCaseValueAsString = mLowerCaseValue.toString(); + valMap.put("mLowerCase", mLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + valMap.put("tLowerCase", tLowerCaseValue); + } + Object pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + valMap.put("pLowerCase", pLowerCaseValue); + } + Object qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + valMap.put("qLowerCase", qLowerCaseValue); + } + Object mLowerCaseValue = getmLowerCase(); + if (mLowerCaseValue != null) { + valMap.put("mLowerCase", mLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("e"); + openapiFields.add("E"); + openapiFields.add("T"); + openapiFields.add("s"); + openapiFields.add("t"); + openapiFields.add("p"); + openapiFields.add("q"); + openapiFields.add("m"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TradeStreamResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TradeStreamResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in TradeStreamResponse is not found in" + + " the empty JSON string", + TradeStreamResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TradeStreamResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `TradeStreamResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) + && !jsonObj.get("p").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `p` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("p").toString())); + } + if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) + && !jsonObj.get("q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("q").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TradeStreamResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TradeStreamResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(TradeStreamResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, TradeStreamResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TradeStreamResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of TradeStreamResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of TradeStreamResponse + * @throws IOException if the JSON string is invalid with respect to TradeStreamResponse + */ + public static TradeStreamResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TradeStreamResponse.class); + } + + /** + * Convert an instance of TradeStreamResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/alpha/src/test/java/com/binance/connector/client/alpha/rest/api/MarketDataApiTest.java b/clients/alpha/src/test/java/com/binance/connector/client/alpha/rest/api/MarketDataApiTest.java index 020cc7745..735a70f46 100644 --- a/clients/alpha/src/test/java/com/binance/connector/client/alpha/rest/api/MarketDataApiTest.java +++ b/clients/alpha/src/test/java/com/binance/connector/client/alpha/rest/api/MarketDataApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Alpha REST API - * OpenAPI Specification for the Binance Alpha REST API + * Alpha Trading REST API + * APIs for Binance Alpha Trading. * * The version of the OpenAPI document: 1.0.0 * @@ -15,8 +15,11 @@ import static org.junit.Assert.assertEquals; import com.binance.connector.client.alpha.rest.model.AggregatedTradesResponse; +import com.binance.connector.client.alpha.rest.model.FullDepthResponse; import com.binance.connector.client.alpha.rest.model.GetExchangeInfoResponse; +import com.binance.connector.client.alpha.rest.model.Interval; import com.binance.connector.client.alpha.rest.model.KlinesResponse; +import com.binance.connector.client.alpha.rest.model.Limit; import com.binance.connector.client.alpha.rest.model.TickerResponse; import com.binance.connector.client.alpha.rest.model.TokenListResponse; import com.binance.connector.client.common.ApiClient; @@ -29,6 +32,7 @@ import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -83,16 +87,16 @@ public void initApiClient() throws ApiException { * Aggregated Trades * *

Retrieves compressed, aggregated historical trades for a specific symbol. Useful for - * recent trade history. Weight: 0 + * recent trade history. * * @throws ApiException if the Api call fails */ @Test - public void aggregatedTradesTest() throws ApiException, CryptoException { - String symbol = ""; - Long fromId = 1L; - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; + public void aggregatedTradesTest() throws ApiException, CryptoException, IOException { + String symbol = "ALPHA_118USDC"; + Long fromId = 58470L; + Long startTime = 1752568680000L; + Long endTime = 1752572280000L; Long limit = 500L; ApiResponse response = api.aggregatedTrades(symbol, fromId, startTime, endTime, limit); @@ -109,16 +113,41 @@ public void aggregatedTradesTest() throws ApiException, CryptoException { assertEquals("/bapi/defi/v1/public/alpha-trade/agg-trades", actualRequest.url().encodedPath()); } + /** + * Full Depth + * + *

Fetches the full order book depth (UI & API orders) for a symbol, including bid and + * ask orders with their prices and quantities. + * + * @throws ApiException if the Api call fails + */ + @Test + public void fullDepthTest() throws ApiException, CryptoException, IOException { + String symbol = "ALPHA_175USDT"; + Limit limit = Limit.LIMIT_5; + ApiResponse response = api.fullDepth(symbol, limit); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals("/bapi/defi/v1/public/alpha-trade/fullDepth", actualRequest.url().encodedPath()); + } + /** * Get Exchange Info * *

Fetches general exchange information, such as supported symbols, rate limits, and server - * time. Weight: 0 + * time. * * @throws ApiException if the Api call fails */ @Test - public void getExchangeInfoTest() throws ApiException, CryptoException { + public void getExchangeInfoTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.getExchangeInfo(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -134,20 +163,20 @@ public void getExchangeInfoTest() throws ApiException, CryptoException { } /** - * Klines (Candlestick Data) + * Klines * *

Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and - * volume over intervals. Useful for charting and analysis. Weight: 0 + * volume over intervals. Useful for charting and analysis. * * @throws ApiException if the Api call fails */ @Test - public void klinesTest() throws ApiException, CryptoException { - String symbol = ""; - String interval = ""; + public void klinesTest() throws ApiException, CryptoException, IOException { + String symbol = "ALPHA_175USDT"; + Interval interval = Interval.INTERVAL_1s; Long limit = 500L; - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; + Long startTime = 1752642000000L; + Long endTime = 1752645599999L; ApiResponse response = api.klines(symbol, interval, limit, startTime, endTime); @@ -163,16 +192,16 @@ public void klinesTest() throws ApiException, CryptoException { } /** - * Ticker (24hr Price Statistics) + * Ticker * *

Gets the 24-hour rolling window price change statistics for a symbol, including volume and - * price changes. Weight: 0 + * price changes. * * @throws ApiException if the Api call fails */ @Test - public void tickerTest() throws ApiException, CryptoException { - String symbol = ""; + public void tickerTest() throws ApiException, CryptoException, IOException { + String symbol = "ALPHA_175USDT"; ApiResponse response = api.ticker(symbol); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -190,12 +219,12 @@ public void tickerTest() throws ApiException, CryptoException { * Token List * *

Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this - * to find the token ID for constructing symbols in other endpoints. Weight: 0 + * to find the token ID for constructing symbols in other endpoints. * * @throws ApiException if the Api call fails */ @Test - public void tokenListTest() throws ApiException, CryptoException { + public void tokenListTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.tokenList(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); diff --git a/clients/c2c/CHANGELOG.md b/clients/c2c/CHANGELOG.md index 51dbca7ca..b21d9ab47 100644 --- a/clients/c2c/CHANGELOG.md +++ b/clients/c2c/CHANGELOG.md @@ -1,5 +1,41 @@ # Changelog +## 4.0.0 - 2026-07-29 + +### Changed (3) + +- Deleted parameter `recvWindow` + - affected methods: + - `getC2CTradeHistory()` (`GET /sapi/v1/c2c/orderMatch/listUserOrderHistory`) +- Modified parameter `tradeType`: + - enum added: `BUY`, `SELL` + - affected methods: + - `getC2CTradeHistory()` (`GET /sapi/v1/c2c/orderMatch/listUserOrderHistory`) +- Modified response for `getC2CTradeHistory()` (`GET /sapi/v1/c2c/orderMatch/listUserOrderHistory`): + - property `message` added + - property `success` added + - property `total` added + - property `code` added + - property `data` added + - property `asset` deleted + - property `counterPartNickName` deleted + - property `unitPrice` deleted + - property `orderStatus` deleted + - property `totalPrice` deleted + - property `advNo` deleted + - property `amount` deleted + - property `orderNumber` deleted + - property `fiatSymbol` deleted + - property `takerAmount` deleted + - property `takerCommissionRate` deleted + - property `additionalKycVerify` deleted + - property `tradeType` deleted + - property `createTime` deleted + - property `fiat` deleted + - property `payMethodName` deleted + - property `commission` deleted + - property `takerCommission` deleted + ## 3.0.0 - 2026-05-04 ### Changed (1) diff --git a/clients/c2c/docs/C2CApi.md b/clients/c2c/docs/C2CApi.md deleted file mode 100644 index 5ac49935b..000000000 --- a/clients/c2c/docs/C2CApi.md +++ /dev/null @@ -1,81 +0,0 @@ -# C2CApi - -All URIs are relative to *https://api.binance.com* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**getC2CTradeHistory**](C2CApi.md#getC2CTradeHistory) | **GET** /sapi/v1/c2c/orderMatch/listUserOrderHistory | Get C2C Trade History (USER_DATA) | - - - -# **getC2CTradeHistory** -> GetC2CTradeHistoryResponse getC2CTradeHistory(tradeType, startTimestamp, endTimestamp, page, rows, recvWindow) - -Get C2C Trade History (USER_DATA) - -Get C2C Trade History * The max interval between startTimestamp and endTimestamp is 30 days. * If startTimestamp and endTimestamp are not sent, the recent 30 days' data will be returned. * You can only view data from the past 6 months. To see all C2C orders, please check https://c2c.binance.com/en/fiatOrder Weight: 1 - -### Example -```java -// Import classes: -import com.binance.connector.client.c2c.ApiClient; -import com.binance.connector.client.c2c.ApiException; -import com.binance.connector.client.c2c.Configuration; -import com.binance.connector.client.c2c.models.*; -import com.binance.connector.client.c2c.rest.api.C2CApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - C2CApi apiInstance = new C2CApi(defaultClient); - String tradeType = "tradeType_example"; // String | BUY, SELL - Long startTimestamp = 56L; // Long | - Long endTimestamp = 56L; // Long | - Long page = 56L; // Long | Default 1 - Long rows = 56L; // Long | default 100, max 100 - Long recvWindow = 56L; // Long | - try { - GetC2CTradeHistoryResponse result = apiInstance.getC2CTradeHistory(tradeType, startTimestamp, endTimestamp, page, rows, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling C2CApi#getC2CTradeHistory"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **tradeType** | **String**| BUY, SELL | [optional] | -| **startTimestamp** | **Long**| | [optional] | -| **endTimestamp** | **Long**| | [optional] | -| **page** | **Long**| Default 1 | [optional] | -| **rows** | **Long**| default 100, max 100 | [optional] | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**GetC2CTradeHistoryResponse**](GetC2CTradeHistoryResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Get C2C Trade History | - | - diff --git a/clients/c2c/docs/DefaultApi.md b/clients/c2c/docs/DefaultApi.md new file mode 100644 index 000000000..2d017caf1 --- /dev/null +++ b/clients/c2c/docs/DefaultApi.md @@ -0,0 +1,79 @@ +# DefaultApi + +All URIs are relative to *https://api.binance.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getC2CTradeHistory**](DefaultApi.md#getC2CTradeHistory) | **GET** /sapi/v1/c2c/orderMatch/listUserOrderHistory | Get C2C Trade History (USER_DATA) | + + + +# **getC2CTradeHistory** +> GetC2CTradeHistoryResponse getC2CTradeHistory(tradeType, startTimestamp, endTimestamp, page, rows) + +Get C2C Trade History (USER_DATA) + +Get C2C Trade History Weight(IP): 1 Security Type: USER_DATA Notes: - The max interval between `startTimestamp` and `endTimestamp` is 30 days. - If `startTimestamp` and `endTimestamp` are not sent, the recent 30 days' data is returned. - You can only view data from the past 6 months. For all C2C orders, check `https://c2c.binance.com/en/fiatOrder`. + +### Example +```java +// Import classes: +import com.binance.connector.client.c2c.ApiClient; +import com.binance.connector.client.c2c.ApiException; +import com.binance.connector.client.c2c.Configuration; +import com.binance.connector.client.c2c.models.*; +import com.binance.connector.client.c2c.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + TradeType tradeType = TradeType.fromValue("BUY"); // TradeType | Trade side filter + Long startTimestamp = 1770736694138L; // Long | + Long endTimestamp = 1770736694138L; // Long | + Long page = 1L; // Long | Page number + Long rows = 100L; // Long | Number of records per page + try { + GetC2CTradeHistoryResponse result = apiInstance.getC2CTradeHistory(tradeType, startTimestamp, endTimestamp, page, rows); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getC2CTradeHistory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tradeType** | [**TradeType**](.md)| Trade side filter | [optional] [enum: BUY, SELL] | +| **startTimestamp** | **Long**| | [optional] | +| **endTimestamp** | **Long**| | [optional] | +| **page** | **Long**| Page number | [optional] | +| **rows** | **Long**| Number of records per page | [optional] | + +### Return type + +[**GetC2CTradeHistoryResponse**](GetC2CTradeHistoryResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Get C2C Trade History | - | + diff --git a/clients/c2c/docs/GetC2CTradeHistoryResponse.md b/clients/c2c/docs/GetC2CTradeHistoryResponse.md index 45bac4d5f..1e1240159 100644 --- a/clients/c2c/docs/GetC2CTradeHistoryResponse.md +++ b/clients/c2c/docs/GetC2CTradeHistoryResponse.md @@ -7,24 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderNumber** | **String** | | [optional] | -|**advNo** | **String** | | [optional] | -|**tradeType** | **String** | | [optional] | -|**asset** | **String** | | [optional] | -|**fiat** | **String** | | [optional] | -|**fiatSymbol** | **String** | | [optional] | -|**amount** | **String** | | [optional] | -|**totalPrice** | **String** | | [optional] | -|**unitPrice** | **String** | | [optional] | -|**orderStatus** | **String** | | [optional] | -|**createTime** | **Long** | | [optional] | -|**commission** | **String** | | [optional] | -|**takerCommissionRate** | **String** | | [optional] | -|**takerCommission** | **String** | | [optional] | -|**takerAmount** | **String** | | [optional] | -|**counterPartNickName** | **String** | | [optional] | -|**payMethodName** | **String** | | [optional] | -|**additionalKycVerify** | **Long** | | [optional] | +|**code** | **String** | API response code. \"000000\" indicates success. | [optional] | +|**message** | **String** | Response message. | [optional] | +|**data** | [**List<GetC2CTradeHistoryResponseDataInner>**](GetC2CTradeHistoryResponseDataInner.md) | | [optional] | +|**total** | **Long** | Total number of records | [optional] | +|**success** | **Boolean** | Whether request is successful | [optional] | diff --git a/clients/c2c/docs/GetC2CTradeHistoryResponseDataInner.md b/clients/c2c/docs/GetC2CTradeHistoryResponseDataInner.md new file mode 100644 index 000000000..d0bb6236f --- /dev/null +++ b/clients/c2c/docs/GetC2CTradeHistoryResponseDataInner.md @@ -0,0 +1,31 @@ + + +# GetC2CTradeHistoryResponseDataInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**orderNumber** | **String** | | [optional] | +|**advNo** | **String** | | [optional] | +|**tradeType** | **String** | | [optional] | +|**asset** | **String** | | [optional] | +|**fiat** | **String** | | [optional] | +|**fiatSymbol** | **String** | | [optional] | +|**amount** | **String** | Quantity (in Crypto) | [optional] | +|**totalPrice** | **String** | Total order amount in fiat | [optional] | +|**unitPrice** | **String** | Unit Price (in Fiat) | [optional] | +|**orderStatus** | **String** | | [optional] | +|**createTime** | **Long** | Order creation timestamp in milliseconds | [optional] | +|**commission** | **String** | Transaction Fee (in Crypto) | [optional] | +|**counterPartNickName** | **String** | Counterparty nickname | [optional] | +|**payMethodName** | **String** | Identifier of the payment method | [optional] | +|**additionalKycVerify** | **Long** | KYC verification status. 0: not required, 1: not verified, 2: verified | [optional] | +|**takerCommissionRate** | **String** | Taker commission rate | [optional] | +|**takerCommission** | **String** | Taker commission amount | [optional] | +|**takerAmount** | **String** | Taker trade amount | [optional] | +|**advertisementRole** | **String** | | [optional] | + + + diff --git a/clients/c2c/docs/TradeType.md b/clients/c2c/docs/TradeType.md new file mode 100644 index 000000000..deefae8e7 --- /dev/null +++ b/clients/c2c/docs/TradeType.md @@ -0,0 +1,13 @@ + + +# TradeType + +## Enum + + +* `BUY` (value: `"BUY"`) + +* `SELL` (value: `"SELL"`) + + + diff --git a/clients/c2c/docs/rest-api/migration-guide.md b/clients/c2c/docs/rest-api/migration-guide.md index 69d880075..ea35294b2 100644 --- a/clients/c2c/docs/rest-api/migration-guide.md +++ b/clients/c2c/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-c2c - 3.0.0 + 4.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-c2c - 3.0.0 + 4.0.0 ``` diff --git a/clients/c2c/example_rest.md b/clients/c2c/example_rest.md index 38821f678..176a1c3fd 100644 --- a/clients/c2c/example_rest.md +++ b/clients/c2c/example_rest.md @@ -1,4 +1,4 @@ -## C2C +## Default -[GET /sapi/v1/c2c/orderMatch/listUserOrderHistory](https://developers.binance.com/docs/c2c/rest-api/Get-C2C-Trade-History) - getC2CTradeHistory - [GetC2CTradeHistoryExample.java:49](/examples/c2c/src/main/java/com/binance/connector/client/c2c/rest/c2c/GetC2CTradeHistoryExample.java#L49) +[GET /sapi/v1/c2c/orderMatch/listUserOrderHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-c2-c/api/rest-api/~#get-c2-ctrade-history) - getC2CTradeHistory - [GetC2CTradeHistoryExample.java:40](/examples/c2c/src/main/java/com/binance/connector/client/c2c/rest/defaultpkg/GetC2CTradeHistoryExample.java#L40) diff --git a/clients/c2c/pom.xml b/clients/c2c/pom.xml index 59cbf7362..51821e425 100644 --- a/clients/c2c/pom.xml +++ b/clients/c2c/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-c2c c2c - 3.0.0 + 4.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/JSON.java b/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/JSON.java index 7d015c495..447971ef6 100644 --- a/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/JSON.java +++ b/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance C2C REST API - * OpenAPI Specification for the Binance C2C REST API + * C2C REST API + * Query fiat transaction history via the C2C REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -111,6 +111,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.c2c.rest.model.GetC2CTradeHistoryResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.c2c.rest.model.GetC2CTradeHistoryResponseDataInner + .CustomTypeAdapterFactory()); gson = gsonBuilder.create(); } diff --git a/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/api/C2CApi.java b/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/api/C2CApi.java deleted file mode 100644 index cf8a1bdac..000000000 --- a/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/api/C2CApi.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Binance C2C REST API - * OpenAPI Specification for the Binance C2C REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.c2c.rest.api; - -import com.binance.connector.client.c2c.rest.model.GetC2CTradeHistoryResponse; -import com.binance.connector.client.common.ApiClient; -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.Pair; -import com.binance.connector.client.common.SystemUtil; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.exception.ConstraintViolationException; -import com.google.gson.reflect.TypeToken; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.Validation; -import jakarta.validation.Validator; -import jakarta.validation.constraints.*; -import jakarta.validation.executable.ExecutableValidator; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; - -public class C2CApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - private static final String USER_AGENT = - String.format( - "binance-c2c/3.0.0 (Java/%s; %s; %s)", - SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); - private static final boolean HAS_TIME_UNIT = false; - - public C2CApi(ClientConfiguration clientConfiguration) { - this(new ApiClient(clientConfiguration)); - } - - public C2CApi(ApiClient apiClient) { - apiClient.setUserAgent(USER_AGENT); - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for getC2CTradeHistory - * - * @param tradeType BUY, SELL (optional) - * @param startTimestamp (optional) - * @param endTimestamp (optional) - * @param page Default 1 (optional) - * @param rows default 100, max 100 (optional) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get C2C Trade History -
- * - * @see Get C2C - * Trade History (USER_DATA) Documentation - */ - private okhttp3.Call getC2CTradeHistoryCall( - String tradeType, - Long startTimestamp, - Long endTimestamp, - Long page, - Long rows, - Long recvWindow) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/c2c/orderMatch/listUserOrderHistory"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (tradeType != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("tradeType", tradeType)); - } - - if (startTimestamp != null) { - localVarQueryParams.addAll( - localVarApiClient.parameterToPair("startTimestamp", startTimestamp)); - } - - if (endTimestamp != null) { - localVarQueryParams.addAll( - localVarApiClient.parameterToPair("endTimestamp", endTimestamp)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (rows != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("rows", rows)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getC2CTradeHistoryValidateBeforeCall( - String tradeType, - Long startTimestamp, - Long endTimestamp, - Long page, - Long rows, - Long recvWindow) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = { - tradeType, startTimestamp, endTimestamp, page, rows, recvWindow - }; - Method method = - this.getClass() - .getMethod( - "getC2CTradeHistory", - String.class, - Long.class, - Long.class, - Long.class, - Long.class, - Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return getC2CTradeHistoryCall( - tradeType, startTimestamp, endTimestamp, page, rows, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Get C2C Trade History (USER_DATA) Get C2C Trade History * The max interval between - * startTimestamp and endTimestamp is 30 days. * If startTimestamp and endTimestamp are not - * sent, the recent 30 days' data will be returned. * You can only view data from the past 6 - * months. To see all C2C orders, please check https://c2c.binance.com/en/fiatOrder Weight: 1 - * - * @param tradeType BUY, SELL (optional) - * @param startTimestamp (optional) - * @param endTimestamp (optional) - * @param page Default 1 (optional) - * @param rows default 100, max 100 (optional) - * @param recvWindow (optional) - * @return ApiResponse<GetC2CTradeHistoryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get C2C Trade History -
- * - * @see Get C2C - * Trade History (USER_DATA) Documentation - */ - public ApiResponse getC2CTradeHistory( - String tradeType, - Long startTimestamp, - Long endTimestamp, - Long page, - Long rows, - Long recvWindow) - throws ApiException { - okhttp3.Call localVarCall = - getC2CTradeHistoryValidateBeforeCall( - tradeType, startTimestamp, endTimestamp, page, rows, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } -} diff --git a/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/api/C2cRestApi.java b/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/api/C2cRestApi.java index 9cc194a92..4404cd475 100644 --- a/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/api/C2cRestApi.java +++ b/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/api/C2cRestApi.java @@ -2,6 +2,7 @@ import com.binance.connector.client.c2c.rest.C2cRestApiUtil; import com.binance.connector.client.c2c.rest.model.GetC2CTradeHistoryResponse; +import com.binance.connector.client.c2c.rest.model.TradeType; import com.binance.connector.client.common.ApiClient; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -9,28 +10,29 @@ public class C2cRestApi { - private final C2CApi c2CApi; + private final DefaultApi defaultApi; public C2cRestApi(ClientConfiguration configuration) { this(C2cRestApiUtil.getDefaultClient(configuration)); } public C2cRestApi(ApiClient apiClient) { - this.c2CApi = new C2CApi(apiClient); + this.defaultApi = new DefaultApi(apiClient); } /** - * Get C2C Trade History (USER_DATA) Get C2C Trade History * The max interval between - * startTimestamp and endTimestamp is 30 days. * If startTimestamp and endTimestamp are not - * sent, the recent 30 days' data will be returned. * You can only view data from the past 6 - * months. To see all C2C orders, please check https://c2c.binance.com/en/fiatOrder Weight: 1 + * Get C2C Trade History (USER_DATA) Get C2C Trade History Weight(IP): 1 Security Type: + * USER_DATA Notes: - The max interval between `startTimestamp` and + * `endTimestamp` is 30 days. - If `startTimestamp` and + * `endTimestamp` are not sent, the recent 30 days' data is returned. - You can + * only view data from the past 6 months. For all C2C orders, check + * `https://c2c.binance.com/en/fiatOrder`. * - * @param tradeType BUY, SELL (optional) + * @param tradeType Trade side filter (optional) * @param startTimestamp (optional) * @param endTimestamp (optional) - * @param page Default 1 (optional) - * @param rows default 100, max 100 (optional) - * @param recvWindow (optional) + * @param page Page number (optional) + * @param rows Number of records per page (optional) * @return ApiResponse<GetC2CTradeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -41,18 +43,13 @@ public C2cRestApi(ApiClient apiClient) { * 200 Get C2C Trade History - * * - * @see Get C2C - * Trade History (USER_DATA) Documentation + * @see Get + * C2C Trade History (USER_DATA) Documentation */ public ApiResponse getC2CTradeHistory( - String tradeType, - Long startTimestamp, - Long endTimestamp, - Long page, - Long rows, - Long recvWindow) + TradeType tradeType, Long startTimestamp, Long endTimestamp, Long page, Long rows) throws ApiException { - return c2CApi.getC2CTradeHistory( - tradeType, startTimestamp, endTimestamp, page, rows, recvWindow); + return defaultApi.getC2CTradeHistory(tradeType, startTimestamp, endTimestamp, page, rows); } } diff --git a/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/api/DefaultApi.java b/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/api/DefaultApi.java new file mode 100644 index 000000000..6ab6e1a25 --- /dev/null +++ b/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/api/DefaultApi.java @@ -0,0 +1,263 @@ +/* + * C2C REST API + * Query fiat transaction history via the C2C REST API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.c2c.rest.api; + +import com.binance.connector.client.c2c.rest.model.GetC2CTradeHistoryResponse; +import com.binance.connector.client.c2c.rest.model.TradeType; +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.Pair; +import com.binance.connector.client.common.SystemUtil; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.exception.ConstraintViolationException; +import com.google.gson.reflect.TypeToken; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Validation; +import jakarta.validation.Validator; +import jakarta.validation.constraints.*; +import jakarta.validation.executable.ExecutableValidator; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; + +public class DefaultApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + private static final String USER_AGENT = + String.format( + "binance-c2c/4.0.0 (Java/%s; %s; %s)", + SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); + private static final boolean HAS_TIME_UNIT = false; + + public DefaultApi(ClientConfiguration clientConfiguration) { + this(new ApiClient(clientConfiguration)); + } + + public DefaultApi(ApiClient apiClient) { + apiClient.setUserAgent(USER_AGENT); + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getC2CTradeHistory + * + * @param tradeType Trade side filter (optional) + * @param startTimestamp (optional) + * @param endTimestamp (optional) + * @param page Page number (optional) + * @param rows Number of records per page (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get C2C Trade History -
+ * + * @see Get + * C2C Trade History (USER_DATA) Documentation + */ + private okhttp3.Call getC2CTradeHistoryCall( + TradeType tradeType, Long startTimestamp, Long endTimestamp, Long page, Long rows) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/c2c/orderMatch/listUserOrderHistory"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tradeType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tradeType", tradeType)); + } + + if (startTimestamp != null) { + localVarQueryParams.addAll( + localVarApiClient.parameterToPair("startTimestamp", startTimestamp)); + } + + if (endTimestamp != null) { + localVarQueryParams.addAll( + localVarApiClient.parameterToPair("endTimestamp", endTimestamp)); + } + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (rows != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("rows", rows)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getC2CTradeHistoryValidateBeforeCall( + TradeType tradeType, Long startTimestamp, Long endTimestamp, Long page, Long rows) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {tradeType, startTimestamp, endTimestamp, page, rows}; + Method method = + this.getClass() + .getMethod( + "getC2CTradeHistory", + TradeType.class, + Long.class, + Long.class, + Long.class, + Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return getC2CTradeHistoryCall(tradeType, startTimestamp, endTimestamp, page, rows); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Get C2C Trade History (USER_DATA) Get C2C Trade History Weight(IP): 1 Security Type: + * USER_DATA Notes: - The max interval between `startTimestamp` and + * `endTimestamp` is 30 days. - If `startTimestamp` and + * `endTimestamp` are not sent, the recent 30 days' data is returned. - You can + * only view data from the past 6 months. For all C2C orders, check + * `https://c2c.binance.com/en/fiatOrder`. + * + * @param tradeType Trade side filter (optional) + * @param startTimestamp (optional) + * @param endTimestamp (optional) + * @param page Page number (optional) + * @param rows Number of records per page (optional) + * @return ApiResponse<GetC2CTradeHistoryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get C2C Trade History -
+ * + * @see Get + * C2C Trade History (USER_DATA) Documentation + */ + public ApiResponse getC2CTradeHistory( + TradeType tradeType, + Long startTimestamp, + Long endTimestamp, + Long page, + @Max(100L) Long rows) + throws ApiException { + okhttp3.Call localVarCall = + getC2CTradeHistoryValidateBeforeCall( + tradeType, startTimestamp, endTimestamp, page, rows); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } +} diff --git a/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/model/GetC2CTradeHistoryResponse.java b/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/model/GetC2CTradeHistoryResponse.java index 5a7449e7a..29354b7b7 100644 --- a/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/model/GetC2CTradeHistoryResponse.java +++ b/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/model/GetC2CTradeHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance C2C REST API - * OpenAPI Specification for the Binance C2C REST API + * C2C REST API + * Query fiat transaction history via the C2C REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -14,6 +14,7 @@ import com.binance.connector.client.c2c.rest.JSON; import com.google.gson.Gson; +import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; @@ -22,475 +23,161 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; import java.util.HashSet; +import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; /** GetC2CTradeHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetC2CTradeHistoryResponse { - public static final String SERIALIZED_NAME_ORDER_NUMBER = "orderNumber"; + public static final String SERIALIZED_NAME_CODE = "code"; - @SerializedName(SERIALIZED_NAME_ORDER_NUMBER) + @SerializedName(SERIALIZED_NAME_CODE) @jakarta.annotation.Nullable - private String orderNumber; + private String code; - public static final String SERIALIZED_NAME_ADV_NO = "advNo"; + public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_ADV_NO) + @SerializedName(SERIALIZED_NAME_MESSAGE) @jakarta.annotation.Nullable - private String advNo; + private String message; - public static final String SERIALIZED_NAME_TRADE_TYPE = "tradeType"; + public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_TRADE_TYPE) + @SerializedName(SERIALIZED_NAME_DATA) @jakarta.annotation.Nullable - private String tradeType; + private List<@Valid GetC2CTradeHistoryResponseDataInner> data; - public static final String SERIALIZED_NAME_ASSET = "asset"; + public static final String SERIALIZED_NAME_TOTAL = "total"; - @SerializedName(SERIALIZED_NAME_ASSET) + @SerializedName(SERIALIZED_NAME_TOTAL) @jakarta.annotation.Nullable - private String asset; + private Long total; - public static final String SERIALIZED_NAME_FIAT = "fiat"; + public static final String SERIALIZED_NAME_SUCCESS = "success"; - @SerializedName(SERIALIZED_NAME_FIAT) + @SerializedName(SERIALIZED_NAME_SUCCESS) @jakarta.annotation.Nullable - private String fiat; - - public static final String SERIALIZED_NAME_FIAT_SYMBOL = "fiatSymbol"; - - @SerializedName(SERIALIZED_NAME_FIAT_SYMBOL) - @jakarta.annotation.Nullable - private String fiatSymbol; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - - @SerializedName(SERIALIZED_NAME_AMOUNT) - @jakarta.annotation.Nullable - private String amount; - - public static final String SERIALIZED_NAME_TOTAL_PRICE = "totalPrice"; - - @SerializedName(SERIALIZED_NAME_TOTAL_PRICE) - @jakarta.annotation.Nullable - private String totalPrice; - - public static final String SERIALIZED_NAME_UNIT_PRICE = "unitPrice"; - - @SerializedName(SERIALIZED_NAME_UNIT_PRICE) - @jakarta.annotation.Nullable - private String unitPrice; - - public static final String SERIALIZED_NAME_ORDER_STATUS = "orderStatus"; - - @SerializedName(SERIALIZED_NAME_ORDER_STATUS) - @jakarta.annotation.Nullable - private String orderStatus; - - public static final String SERIALIZED_NAME_CREATE_TIME = "createTime"; - - @SerializedName(SERIALIZED_NAME_CREATE_TIME) - @jakarta.annotation.Nullable - private Long createTime; - - public static final String SERIALIZED_NAME_COMMISSION = "commission"; - - @SerializedName(SERIALIZED_NAME_COMMISSION) - @jakarta.annotation.Nullable - private String commission; - - public static final String SERIALIZED_NAME_TAKER_COMMISSION_RATE = "takerCommissionRate"; - - @SerializedName(SERIALIZED_NAME_TAKER_COMMISSION_RATE) - @jakarta.annotation.Nullable - private String takerCommissionRate; - - public static final String SERIALIZED_NAME_TAKER_COMMISSION = "takerCommission"; - - @SerializedName(SERIALIZED_NAME_TAKER_COMMISSION) - @jakarta.annotation.Nullable - private String takerCommission; - - public static final String SERIALIZED_NAME_TAKER_AMOUNT = "takerAmount"; - - @SerializedName(SERIALIZED_NAME_TAKER_AMOUNT) - @jakarta.annotation.Nullable - private String takerAmount; - - public static final String SERIALIZED_NAME_COUNTER_PART_NICK_NAME = "counterPartNickName"; - - @SerializedName(SERIALIZED_NAME_COUNTER_PART_NICK_NAME) - @jakarta.annotation.Nullable - private String counterPartNickName; - - public static final String SERIALIZED_NAME_PAY_METHOD_NAME = "payMethodName"; - - @SerializedName(SERIALIZED_NAME_PAY_METHOD_NAME) - @jakarta.annotation.Nullable - private String payMethodName; - - public static final String SERIALIZED_NAME_ADDITIONAL_KYC_VERIFY = "additionalKycVerify"; - - @SerializedName(SERIALIZED_NAME_ADDITIONAL_KYC_VERIFY) - @jakarta.annotation.Nullable - private Long additionalKycVerify; + private Boolean success; public GetC2CTradeHistoryResponse() {} - public GetC2CTradeHistoryResponse orderNumber(@jakarta.annotation.Nullable String orderNumber) { - this.orderNumber = orderNumber; - return this; - } - - /** - * Get orderNumber - * - * @return orderNumber - */ - @jakarta.annotation.Nullable - public String getOrderNumber() { - return orderNumber; - } - - public void setOrderNumber(@jakarta.annotation.Nullable String orderNumber) { - this.orderNumber = orderNumber; - } - - public GetC2CTradeHistoryResponse advNo(@jakarta.annotation.Nullable String advNo) { - this.advNo = advNo; - return this; - } - - /** - * Get advNo - * - * @return advNo - */ - @jakarta.annotation.Nullable - public String getAdvNo() { - return advNo; - } - - public void setAdvNo(@jakarta.annotation.Nullable String advNo) { - this.advNo = advNo; - } - - public GetC2CTradeHistoryResponse tradeType(@jakarta.annotation.Nullable String tradeType) { - this.tradeType = tradeType; - return this; - } - - /** - * Get tradeType - * - * @return tradeType - */ - @jakarta.annotation.Nullable - public String getTradeType() { - return tradeType; - } - - public void setTradeType(@jakarta.annotation.Nullable String tradeType) { - this.tradeType = tradeType; - } - - public GetC2CTradeHistoryResponse asset(@jakarta.annotation.Nullable String asset) { - this.asset = asset; - return this; - } - - /** - * Get asset - * - * @return asset - */ - @jakarta.annotation.Nullable - public String getAsset() { - return asset; - } - - public void setAsset(@jakarta.annotation.Nullable String asset) { - this.asset = asset; - } - - public GetC2CTradeHistoryResponse fiat(@jakarta.annotation.Nullable String fiat) { - this.fiat = fiat; - return this; - } - - /** - * Get fiat - * - * @return fiat - */ - @jakarta.annotation.Nullable - public String getFiat() { - return fiat; - } - - public void setFiat(@jakarta.annotation.Nullable String fiat) { - this.fiat = fiat; - } - - public GetC2CTradeHistoryResponse fiatSymbol(@jakarta.annotation.Nullable String fiatSymbol) { - this.fiatSymbol = fiatSymbol; - return this; - } - - /** - * Get fiatSymbol - * - * @return fiatSymbol - */ - @jakarta.annotation.Nullable - public String getFiatSymbol() { - return fiatSymbol; - } - - public void setFiatSymbol(@jakarta.annotation.Nullable String fiatSymbol) { - this.fiatSymbol = fiatSymbol; - } - - public GetC2CTradeHistoryResponse amount(@jakarta.annotation.Nullable String amount) { - this.amount = amount; - return this; - } - - /** - * Get amount - * - * @return amount - */ - @jakarta.annotation.Nullable - public String getAmount() { - return amount; - } - - public void setAmount(@jakarta.annotation.Nullable String amount) { - this.amount = amount; - } - - public GetC2CTradeHistoryResponse totalPrice(@jakarta.annotation.Nullable String totalPrice) { - this.totalPrice = totalPrice; - return this; - } - - /** - * Get totalPrice - * - * @return totalPrice - */ - @jakarta.annotation.Nullable - public String getTotalPrice() { - return totalPrice; - } - - public void setTotalPrice(@jakarta.annotation.Nullable String totalPrice) { - this.totalPrice = totalPrice; - } - - public GetC2CTradeHistoryResponse unitPrice(@jakarta.annotation.Nullable String unitPrice) { - this.unitPrice = unitPrice; - return this; - } - - /** - * Get unitPrice - * - * @return unitPrice - */ - @jakarta.annotation.Nullable - public String getUnitPrice() { - return unitPrice; - } - - public void setUnitPrice(@jakarta.annotation.Nullable String unitPrice) { - this.unitPrice = unitPrice; - } - - public GetC2CTradeHistoryResponse orderStatus(@jakarta.annotation.Nullable String orderStatus) { - this.orderStatus = orderStatus; - return this; - } - - /** - * Get orderStatus - * - * @return orderStatus - */ - @jakarta.annotation.Nullable - public String getOrderStatus() { - return orderStatus; - } - - public void setOrderStatus(@jakarta.annotation.Nullable String orderStatus) { - this.orderStatus = orderStatus; - } - - public GetC2CTradeHistoryResponse createTime(@jakarta.annotation.Nullable Long createTime) { - this.createTime = createTime; - return this; - } - - /** - * Get createTime - * - * @return createTime - */ - @jakarta.annotation.Nullable - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(@jakarta.annotation.Nullable Long createTime) { - this.createTime = createTime; - } - - public GetC2CTradeHistoryResponse commission(@jakarta.annotation.Nullable String commission) { - this.commission = commission; - return this; - } - - /** - * Get commission - * - * @return commission - */ - @jakarta.annotation.Nullable - public String getCommission() { - return commission; - } - - public void setCommission(@jakarta.annotation.Nullable String commission) { - this.commission = commission; - } - - public GetC2CTradeHistoryResponse takerCommissionRate( - @jakarta.annotation.Nullable String takerCommissionRate) { - this.takerCommissionRate = takerCommissionRate; + public GetC2CTradeHistoryResponse code(@jakarta.annotation.Nullable String code) { + this.code = code; return this; } /** - * Get takerCommissionRate + * API response code. \"000000\" indicates success. * - * @return takerCommissionRate + * @return code */ @jakarta.annotation.Nullable - public String getTakerCommissionRate() { - return takerCommissionRate; + public String getCode() { + return code; } - public void setTakerCommissionRate(@jakarta.annotation.Nullable String takerCommissionRate) { - this.takerCommissionRate = takerCommissionRate; + public void setCode(@jakarta.annotation.Nullable String code) { + this.code = code; } - public GetC2CTradeHistoryResponse takerCommission( - @jakarta.annotation.Nullable String takerCommission) { - this.takerCommission = takerCommission; + public GetC2CTradeHistoryResponse message(@jakarta.annotation.Nullable String message) { + this.message = message; return this; } /** - * Get takerCommission + * Response message. * - * @return takerCommission + * @return message */ @jakarta.annotation.Nullable - public String getTakerCommission() { - return takerCommission; + public String getMessage() { + return message; } - public void setTakerCommission(@jakarta.annotation.Nullable String takerCommission) { - this.takerCommission = takerCommission; + public void setMessage(@jakarta.annotation.Nullable String message) { + this.message = message; } - public GetC2CTradeHistoryResponse takerAmount(@jakarta.annotation.Nullable String takerAmount) { - this.takerAmount = takerAmount; + public GetC2CTradeHistoryResponse data( + @jakarta.annotation.Nullable List<@Valid GetC2CTradeHistoryResponseDataInner> data) { + this.data = data; return this; } - /** - * Get takerAmount - * - * @return takerAmount - */ - @jakarta.annotation.Nullable - public String getTakerAmount() { - return takerAmount; - } - - public void setTakerAmount(@jakarta.annotation.Nullable String takerAmount) { - this.takerAmount = takerAmount; - } - - public GetC2CTradeHistoryResponse counterPartNickName( - @jakarta.annotation.Nullable String counterPartNickName) { - this.counterPartNickName = counterPartNickName; + public GetC2CTradeHistoryResponse addDataItem(GetC2CTradeHistoryResponseDataInner dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); return this; } /** - * Get counterPartNickName + * Get data * - * @return counterPartNickName + * @return data */ @jakarta.annotation.Nullable - public String getCounterPartNickName() { - return counterPartNickName; + @Valid + public List<@Valid GetC2CTradeHistoryResponseDataInner> getData() { + return data; } - public void setCounterPartNickName(@jakarta.annotation.Nullable String counterPartNickName) { - this.counterPartNickName = counterPartNickName; + public void setData( + @jakarta.annotation.Nullable List<@Valid GetC2CTradeHistoryResponseDataInner> data) { + this.data = data; } - public GetC2CTradeHistoryResponse payMethodName( - @jakarta.annotation.Nullable String payMethodName) { - this.payMethodName = payMethodName; + public GetC2CTradeHistoryResponse total(@jakarta.annotation.Nullable Long total) { + this.total = total; return this; } /** - * Get payMethodName + * Total number of records * - * @return payMethodName + * @return total */ @jakarta.annotation.Nullable - public String getPayMethodName() { - return payMethodName; + public Long getTotal() { + return total; } - public void setPayMethodName(@jakarta.annotation.Nullable String payMethodName) { - this.payMethodName = payMethodName; + public void setTotal(@jakarta.annotation.Nullable Long total) { + this.total = total; } - public GetC2CTradeHistoryResponse additionalKycVerify( - @jakarta.annotation.Nullable Long additionalKycVerify) { - this.additionalKycVerify = additionalKycVerify; + public GetC2CTradeHistoryResponse success(@jakarta.annotation.Nullable Boolean success) { + this.success = success; return this; } /** - * Get additionalKycVerify + * Whether request is successful * - * @return additionalKycVerify + * @return success */ @jakarta.annotation.Nullable - public Long getAdditionalKycVerify() { - return additionalKycVerify; + public Boolean getSuccess() { + return success; } - public void setAdditionalKycVerify(@jakarta.annotation.Nullable Long additionalKycVerify) { - this.additionalKycVerify = additionalKycVerify; + public void setSuccess(@jakarta.annotation.Nullable Boolean success) { + this.success = success; } @Override @@ -502,80 +189,27 @@ public boolean equals(Object o) { return false; } GetC2CTradeHistoryResponse getC2CTradeHistoryResponse = (GetC2CTradeHistoryResponse) o; - return Objects.equals(this.orderNumber, getC2CTradeHistoryResponse.orderNumber) - && Objects.equals(this.advNo, getC2CTradeHistoryResponse.advNo) - && Objects.equals(this.tradeType, getC2CTradeHistoryResponse.tradeType) - && Objects.equals(this.asset, getC2CTradeHistoryResponse.asset) - && Objects.equals(this.fiat, getC2CTradeHistoryResponse.fiat) - && Objects.equals(this.fiatSymbol, getC2CTradeHistoryResponse.fiatSymbol) - && Objects.equals(this.amount, getC2CTradeHistoryResponse.amount) - && Objects.equals(this.totalPrice, getC2CTradeHistoryResponse.totalPrice) - && Objects.equals(this.unitPrice, getC2CTradeHistoryResponse.unitPrice) - && Objects.equals(this.orderStatus, getC2CTradeHistoryResponse.orderStatus) - && Objects.equals(this.createTime, getC2CTradeHistoryResponse.createTime) - && Objects.equals(this.commission, getC2CTradeHistoryResponse.commission) - && Objects.equals( - this.takerCommissionRate, getC2CTradeHistoryResponse.takerCommissionRate) - && Objects.equals(this.takerCommission, getC2CTradeHistoryResponse.takerCommission) - && Objects.equals(this.takerAmount, getC2CTradeHistoryResponse.takerAmount) - && Objects.equals( - this.counterPartNickName, getC2CTradeHistoryResponse.counterPartNickName) - && Objects.equals(this.payMethodName, getC2CTradeHistoryResponse.payMethodName) - && Objects.equals( - this.additionalKycVerify, getC2CTradeHistoryResponse.additionalKycVerify); + return Objects.equals(this.code, getC2CTradeHistoryResponse.code) + && Objects.equals(this.message, getC2CTradeHistoryResponse.message) + && Objects.equals(this.data, getC2CTradeHistoryResponse.data) + && Objects.equals(this.total, getC2CTradeHistoryResponse.total) + && Objects.equals(this.success, getC2CTradeHistoryResponse.success); } @Override public int hashCode() { - return Objects.hash( - orderNumber, - advNo, - tradeType, - asset, - fiat, - fiatSymbol, - amount, - totalPrice, - unitPrice, - orderStatus, - createTime, - commission, - takerCommissionRate, - takerCommission, - takerAmount, - counterPartNickName, - payMethodName, - additionalKycVerify); + return Objects.hash(code, message, data, total, success); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GetC2CTradeHistoryResponse {\n"); - sb.append(" orderNumber: ").append(toIndentedString(orderNumber)).append("\n"); - sb.append(" advNo: ").append(toIndentedString(advNo)).append("\n"); - sb.append(" tradeType: ").append(toIndentedString(tradeType)).append("\n"); - sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); - sb.append(" fiat: ").append(toIndentedString(fiat)).append("\n"); - sb.append(" fiatSymbol: ").append(toIndentedString(fiatSymbol)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" totalPrice: ").append(toIndentedString(totalPrice)).append("\n"); - sb.append(" unitPrice: ").append(toIndentedString(unitPrice)).append("\n"); - sb.append(" orderStatus: ").append(toIndentedString(orderStatus)).append("\n"); - sb.append(" createTime: ").append(toIndentedString(createTime)).append("\n"); - sb.append(" commission: ").append(toIndentedString(commission)).append("\n"); - sb.append(" takerCommissionRate: ") - .append(toIndentedString(takerCommissionRate)) - .append("\n"); - sb.append(" takerCommission: ").append(toIndentedString(takerCommission)).append("\n"); - sb.append(" takerAmount: ").append(toIndentedString(takerAmount)).append("\n"); - sb.append(" counterPartNickName: ") - .append(toIndentedString(counterPartNickName)) - .append("\n"); - sb.append(" payMethodName: ").append(toIndentedString(payMethodName)).append("\n"); - sb.append(" additionalKycVerify: ") - .append(toIndentedString(additionalKycVerify)) - .append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" success: ").append(toIndentedString(success)).append("\n"); sb.append("}"); return sb.toString(); } @@ -583,84 +217,29 @@ public String toString() { public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); - Object orderNumberValue = getOrderNumber(); - String orderNumberValueAsString = ""; - orderNumberValueAsString = orderNumberValue.toString(); - sb.append("orderNumber=").append(urlEncode(orderNumberValueAsString)).append(""); - Object advNoValue = getAdvNo(); - String advNoValueAsString = ""; - advNoValueAsString = advNoValue.toString(); - sb.append("advNo=").append(urlEncode(advNoValueAsString)).append(""); - Object tradeTypeValue = getTradeType(); - String tradeTypeValueAsString = ""; - tradeTypeValueAsString = tradeTypeValue.toString(); - sb.append("tradeType=").append(urlEncode(tradeTypeValueAsString)).append(""); - Object assetValue = getAsset(); - String assetValueAsString = ""; - assetValueAsString = assetValue.toString(); - sb.append("asset=").append(urlEncode(assetValueAsString)).append(""); - Object fiatValue = getFiat(); - String fiatValueAsString = ""; - fiatValueAsString = fiatValue.toString(); - sb.append("fiat=").append(urlEncode(fiatValueAsString)).append(""); - Object fiatSymbolValue = getFiatSymbol(); - String fiatSymbolValueAsString = ""; - fiatSymbolValueAsString = fiatSymbolValue.toString(); - sb.append("fiatSymbol=").append(urlEncode(fiatSymbolValueAsString)).append(""); - Object amountValue = getAmount(); - String amountValueAsString = ""; - amountValueAsString = amountValue.toString(); - sb.append("amount=").append(urlEncode(amountValueAsString)).append(""); - Object totalPriceValue = getTotalPrice(); - String totalPriceValueAsString = ""; - totalPriceValueAsString = totalPriceValue.toString(); - sb.append("totalPrice=").append(urlEncode(totalPriceValueAsString)).append(""); - Object unitPriceValue = getUnitPrice(); - String unitPriceValueAsString = ""; - unitPriceValueAsString = unitPriceValue.toString(); - sb.append("unitPrice=").append(urlEncode(unitPriceValueAsString)).append(""); - Object orderStatusValue = getOrderStatus(); - String orderStatusValueAsString = ""; - orderStatusValueAsString = orderStatusValue.toString(); - sb.append("orderStatus=").append(urlEncode(orderStatusValueAsString)).append(""); - Object createTimeValue = getCreateTime(); - String createTimeValueAsString = ""; - createTimeValueAsString = createTimeValue.toString(); - sb.append("createTime=").append(urlEncode(createTimeValueAsString)).append(""); - Object commissionValue = getCommission(); - String commissionValueAsString = ""; - commissionValueAsString = commissionValue.toString(); - sb.append("commission=").append(urlEncode(commissionValueAsString)).append(""); - Object takerCommissionRateValue = getTakerCommissionRate(); - String takerCommissionRateValueAsString = ""; - takerCommissionRateValueAsString = takerCommissionRateValue.toString(); - sb.append("takerCommissionRate=") - .append(urlEncode(takerCommissionRateValueAsString)) - .append(""); - Object takerCommissionValue = getTakerCommission(); - String takerCommissionValueAsString = ""; - takerCommissionValueAsString = takerCommissionValue.toString(); - sb.append("takerCommission=").append(urlEncode(takerCommissionValueAsString)).append(""); - Object takerAmountValue = getTakerAmount(); - String takerAmountValueAsString = ""; - takerAmountValueAsString = takerAmountValue.toString(); - sb.append("takerAmount=").append(urlEncode(takerAmountValueAsString)).append(""); - Object counterPartNickNameValue = getCounterPartNickName(); - String counterPartNickNameValueAsString = ""; - counterPartNickNameValueAsString = counterPartNickNameValue.toString(); - sb.append("counterPartNickName=") - .append(urlEncode(counterPartNickNameValueAsString)) - .append(""); - Object payMethodNameValue = getPayMethodName(); - String payMethodNameValueAsString = ""; - payMethodNameValueAsString = payMethodNameValue.toString(); - sb.append("payMethodName=").append(urlEncode(payMethodNameValueAsString)).append(""); - Object additionalKycVerifyValue = getAdditionalKycVerify(); - String additionalKycVerifyValueAsString = ""; - additionalKycVerifyValueAsString = additionalKycVerifyValue.toString(); - sb.append("additionalKycVerify=") - .append(urlEncode(additionalKycVerifyValueAsString)) - .append(""); + Object codeValue = getCode(); + String codeValueAsString = ""; + codeValueAsString = codeValue.toString(); + sb.append("code=").append(urlEncode(codeValueAsString)).append(""); + Object messageValue = getMessage(); + String messageValueAsString = ""; + messageValueAsString = messageValue.toString(); + sb.append("message=").append(urlEncode(messageValueAsString)).append(""); + Object dataValue = getData(); + String dataValueAsString = ""; + dataValueAsString = + (String) + ((Collection) dataValue) + .stream().map(Object::toString).collect(Collectors.joining(",")); + sb.append("data=").append(urlEncode(dataValueAsString)).append(""); + Object totalValue = getTotal(); + String totalValueAsString = ""; + totalValueAsString = totalValue.toString(); + sb.append("total=").append(urlEncode(totalValueAsString)).append(""); + Object successValue = getSuccess(); + String successValueAsString = ""; + successValueAsString = successValue.toString(); + sb.append("success=").append(urlEncode(successValueAsString)).append(""); return sb.toString(); } @@ -689,24 +268,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("orderNumber"); - openapiFields.add("advNo"); - openapiFields.add("tradeType"); - openapiFields.add("asset"); - openapiFields.add("fiat"); - openapiFields.add("fiatSymbol"); - openapiFields.add("amount"); - openapiFields.add("totalPrice"); - openapiFields.add("unitPrice"); - openapiFields.add("orderStatus"); - openapiFields.add("createTime"); - openapiFields.add("commission"); - openapiFields.add("takerCommissionRate"); - openapiFields.add("takerCommission"); - openapiFields.add("takerAmount"); - openapiFields.add("counterPartNickName"); - openapiFields.add("payMethodName"); - openapiFields.add("additionalKycVerify"); + openapiFields.add("code"); + openapiFields.add("message"); + openapiFields.add("data"); + openapiFields.add("total"); + openapiFields.add("success"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -730,135 +296,40 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("orderNumber") != null && !jsonObj.get("orderNumber").isJsonNull()) - && !jsonObj.get("orderNumber").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `orderNumber` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("orderNumber").toString())); - } - if ((jsonObj.get("advNo") != null && !jsonObj.get("advNo").isJsonNull()) - && !jsonObj.get("advNo").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `advNo` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("advNo").toString())); - } - if ((jsonObj.get("tradeType") != null && !jsonObj.get("tradeType").isJsonNull()) - && !jsonObj.get("tradeType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tradeType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("tradeType").toString())); - } - if ((jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) - && !jsonObj.get("asset").isJsonPrimitive()) { + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) + && !jsonObj.get("code").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `asset` to be a primitive type in the JSON string" + "Expected the field `code` to be a primitive type in the JSON string" + " but got `%s`", - jsonObj.get("asset").toString())); - } - if ((jsonObj.get("fiat") != null && !jsonObj.get("fiat").isJsonNull()) - && !jsonObj.get("fiat").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `fiat` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("fiat").toString())); - } - if ((jsonObj.get("fiatSymbol") != null && !jsonObj.get("fiatSymbol").isJsonNull()) - && !jsonObj.get("fiatSymbol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `fiatSymbol` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("fiatSymbol").toString())); + jsonObj.get("code").toString())); } - if ((jsonObj.get("amount") != null && !jsonObj.get("amount").isJsonNull()) - && !jsonObj.get("amount").isJsonPrimitive()) { + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) + && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `amount` to be a primitive type in the JSON string" + "Expected the field `message` to be a primitive type in the JSON string" + " but got `%s`", - jsonObj.get("amount").toString())); - } - if ((jsonObj.get("totalPrice") != null && !jsonObj.get("totalPrice").isJsonNull()) - && !jsonObj.get("totalPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `totalPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("totalPrice").toString())); - } - if ((jsonObj.get("unitPrice") != null && !jsonObj.get("unitPrice").isJsonNull()) - && !jsonObj.get("unitPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `unitPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("unitPrice").toString())); - } - if ((jsonObj.get("orderStatus") != null && !jsonObj.get("orderStatus").isJsonNull()) - && !jsonObj.get("orderStatus").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `orderStatus` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("orderStatus").toString())); - } - if ((jsonObj.get("commission") != null && !jsonObj.get("commission").isJsonNull()) - && !jsonObj.get("commission").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `commission` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("commission").toString())); - } - if ((jsonObj.get("takerCommissionRate") != null - && !jsonObj.get("takerCommissionRate").isJsonNull()) - && !jsonObj.get("takerCommissionRate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `takerCommissionRate` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("takerCommissionRate").toString())); - } - if ((jsonObj.get("takerCommission") != null && !jsonObj.get("takerCommission").isJsonNull()) - && !jsonObj.get("takerCommission").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `takerCommission` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("takerCommission").toString())); - } - if ((jsonObj.get("takerAmount") != null && !jsonObj.get("takerAmount").isJsonNull()) - && !jsonObj.get("takerAmount").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `takerAmount` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("takerAmount").toString())); - } - if ((jsonObj.get("counterPartNickName") != null - && !jsonObj.get("counterPartNickName").isJsonNull()) - && !jsonObj.get("counterPartNickName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `counterPartNickName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("counterPartNickName").toString())); + jsonObj.get("message").toString())); } - if ((jsonObj.get("payMethodName") != null && !jsonObj.get("payMethodName").isJsonNull()) - && !jsonObj.get("payMethodName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `payMethodName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("payMethodName").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + GetC2CTradeHistoryResponseDataInner.validateJsonElement(jsonArraydata.get(i)); + } + ; + } } } diff --git a/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/model/GetC2CTradeHistoryResponseDataInner.java b/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/model/GetC2CTradeHistoryResponseDataInner.java new file mode 100644 index 000000000..06ee7b62d --- /dev/null +++ b/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/model/GetC2CTradeHistoryResponseDataInner.java @@ -0,0 +1,983 @@ +/* + * C2C REST API + * Query fiat transaction history via the C2C REST API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.c2c.rest.model; + +import com.binance.connector.client.c2c.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** GetC2CTradeHistoryResponseDataInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class GetC2CTradeHistoryResponseDataInner { + public static final String SERIALIZED_NAME_ORDER_NUMBER = "orderNumber"; + + @SerializedName(SERIALIZED_NAME_ORDER_NUMBER) + @jakarta.annotation.Nullable + private String orderNumber; + + public static final String SERIALIZED_NAME_ADV_NO = "advNo"; + + @SerializedName(SERIALIZED_NAME_ADV_NO) + @jakarta.annotation.Nullable + private String advNo; + + public static final String SERIALIZED_NAME_TRADE_TYPE = "tradeType"; + + @SerializedName(SERIALIZED_NAME_TRADE_TYPE) + @jakarta.annotation.Nullable + private String tradeType; + + public static final String SERIALIZED_NAME_ASSET = "asset"; + + @SerializedName(SERIALIZED_NAME_ASSET) + @jakarta.annotation.Nullable + private String asset; + + public static final String SERIALIZED_NAME_FIAT = "fiat"; + + @SerializedName(SERIALIZED_NAME_FIAT) + @jakarta.annotation.Nullable + private String fiat; + + public static final String SERIALIZED_NAME_FIAT_SYMBOL = "fiatSymbol"; + + @SerializedName(SERIALIZED_NAME_FIAT_SYMBOL) + @jakarta.annotation.Nullable + private String fiatSymbol; + + public static final String SERIALIZED_NAME_AMOUNT = "amount"; + + @SerializedName(SERIALIZED_NAME_AMOUNT) + @jakarta.annotation.Nullable + private String amount; + + public static final String SERIALIZED_NAME_TOTAL_PRICE = "totalPrice"; + + @SerializedName(SERIALIZED_NAME_TOTAL_PRICE) + @jakarta.annotation.Nullable + private String totalPrice; + + public static final String SERIALIZED_NAME_UNIT_PRICE = "unitPrice"; + + @SerializedName(SERIALIZED_NAME_UNIT_PRICE) + @jakarta.annotation.Nullable + private String unitPrice; + + public static final String SERIALIZED_NAME_ORDER_STATUS = "orderStatus"; + + @SerializedName(SERIALIZED_NAME_ORDER_STATUS) + @jakarta.annotation.Nullable + private String orderStatus; + + public static final String SERIALIZED_NAME_CREATE_TIME = "createTime"; + + @SerializedName(SERIALIZED_NAME_CREATE_TIME) + @jakarta.annotation.Nullable + private Long createTime; + + public static final String SERIALIZED_NAME_COMMISSION = "commission"; + + @SerializedName(SERIALIZED_NAME_COMMISSION) + @jakarta.annotation.Nullable + private String commission; + + public static final String SERIALIZED_NAME_COUNTER_PART_NICK_NAME = "counterPartNickName"; + + @SerializedName(SERIALIZED_NAME_COUNTER_PART_NICK_NAME) + @jakarta.annotation.Nullable + private String counterPartNickName; + + public static final String SERIALIZED_NAME_PAY_METHOD_NAME = "payMethodName"; + + @SerializedName(SERIALIZED_NAME_PAY_METHOD_NAME) + @jakarta.annotation.Nullable + private String payMethodName; + + public static final String SERIALIZED_NAME_ADDITIONAL_KYC_VERIFY = "additionalKycVerify"; + + @SerializedName(SERIALIZED_NAME_ADDITIONAL_KYC_VERIFY) + @jakarta.annotation.Nullable + private Long additionalKycVerify; + + public static final String SERIALIZED_NAME_TAKER_COMMISSION_RATE = "takerCommissionRate"; + + @SerializedName(SERIALIZED_NAME_TAKER_COMMISSION_RATE) + @jakarta.annotation.Nullable + private String takerCommissionRate; + + public static final String SERIALIZED_NAME_TAKER_COMMISSION = "takerCommission"; + + @SerializedName(SERIALIZED_NAME_TAKER_COMMISSION) + @jakarta.annotation.Nullable + private String takerCommission; + + public static final String SERIALIZED_NAME_TAKER_AMOUNT = "takerAmount"; + + @SerializedName(SERIALIZED_NAME_TAKER_AMOUNT) + @jakarta.annotation.Nullable + private String takerAmount; + + public static final String SERIALIZED_NAME_ADVERTISEMENT_ROLE = "advertisementRole"; + + @SerializedName(SERIALIZED_NAME_ADVERTISEMENT_ROLE) + @jakarta.annotation.Nullable + private String advertisementRole; + + public GetC2CTradeHistoryResponseDataInner() {} + + public GetC2CTradeHistoryResponseDataInner orderNumber( + @jakarta.annotation.Nullable String orderNumber) { + this.orderNumber = orderNumber; + return this; + } + + /** + * Get orderNumber + * + * @return orderNumber + */ + @jakarta.annotation.Nullable + public String getOrderNumber() { + return orderNumber; + } + + public void setOrderNumber(@jakarta.annotation.Nullable String orderNumber) { + this.orderNumber = orderNumber; + } + + public GetC2CTradeHistoryResponseDataInner advNo(@jakarta.annotation.Nullable String advNo) { + this.advNo = advNo; + return this; + } + + /** + * Get advNo + * + * @return advNo + */ + @jakarta.annotation.Nullable + public String getAdvNo() { + return advNo; + } + + public void setAdvNo(@jakarta.annotation.Nullable String advNo) { + this.advNo = advNo; + } + + public GetC2CTradeHistoryResponseDataInner tradeType( + @jakarta.annotation.Nullable String tradeType) { + this.tradeType = tradeType; + return this; + } + + /** + * Get tradeType + * + * @return tradeType + */ + @jakarta.annotation.Nullable + public String getTradeType() { + return tradeType; + } + + public void setTradeType(@jakarta.annotation.Nullable String tradeType) { + this.tradeType = tradeType; + } + + public GetC2CTradeHistoryResponseDataInner asset(@jakarta.annotation.Nullable String asset) { + this.asset = asset; + return this; + } + + /** + * Get asset + * + * @return asset + */ + @jakarta.annotation.Nullable + public String getAsset() { + return asset; + } + + public void setAsset(@jakarta.annotation.Nullable String asset) { + this.asset = asset; + } + + public GetC2CTradeHistoryResponseDataInner fiat(@jakarta.annotation.Nullable String fiat) { + this.fiat = fiat; + return this; + } + + /** + * Get fiat + * + * @return fiat + */ + @jakarta.annotation.Nullable + public String getFiat() { + return fiat; + } + + public void setFiat(@jakarta.annotation.Nullable String fiat) { + this.fiat = fiat; + } + + public GetC2CTradeHistoryResponseDataInner fiatSymbol( + @jakarta.annotation.Nullable String fiatSymbol) { + this.fiatSymbol = fiatSymbol; + return this; + } + + /** + * Get fiatSymbol + * + * @return fiatSymbol + */ + @jakarta.annotation.Nullable + public String getFiatSymbol() { + return fiatSymbol; + } + + public void setFiatSymbol(@jakarta.annotation.Nullable String fiatSymbol) { + this.fiatSymbol = fiatSymbol; + } + + public GetC2CTradeHistoryResponseDataInner amount(@jakarta.annotation.Nullable String amount) { + this.amount = amount; + return this; + } + + /** + * Quantity (in Crypto) + * + * @return amount + */ + @jakarta.annotation.Nullable + public String getAmount() { + return amount; + } + + public void setAmount(@jakarta.annotation.Nullable String amount) { + this.amount = amount; + } + + public GetC2CTradeHistoryResponseDataInner totalPrice( + @jakarta.annotation.Nullable String totalPrice) { + this.totalPrice = totalPrice; + return this; + } + + /** + * Total order amount in fiat + * + * @return totalPrice + */ + @jakarta.annotation.Nullable + public String getTotalPrice() { + return totalPrice; + } + + public void setTotalPrice(@jakarta.annotation.Nullable String totalPrice) { + this.totalPrice = totalPrice; + } + + public GetC2CTradeHistoryResponseDataInner unitPrice( + @jakarta.annotation.Nullable String unitPrice) { + this.unitPrice = unitPrice; + return this; + } + + /** + * Unit Price (in Fiat) + * + * @return unitPrice + */ + @jakarta.annotation.Nullable + public String getUnitPrice() { + return unitPrice; + } + + public void setUnitPrice(@jakarta.annotation.Nullable String unitPrice) { + this.unitPrice = unitPrice; + } + + public GetC2CTradeHistoryResponseDataInner orderStatus( + @jakarta.annotation.Nullable String orderStatus) { + this.orderStatus = orderStatus; + return this; + } + + /** + * Get orderStatus + * + * @return orderStatus + */ + @jakarta.annotation.Nullable + public String getOrderStatus() { + return orderStatus; + } + + public void setOrderStatus(@jakarta.annotation.Nullable String orderStatus) { + this.orderStatus = orderStatus; + } + + public GetC2CTradeHistoryResponseDataInner createTime( + @jakarta.annotation.Nullable Long createTime) { + this.createTime = createTime; + return this; + } + + /** + * Order creation timestamp in milliseconds + * + * @return createTime + */ + @jakarta.annotation.Nullable + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(@jakarta.annotation.Nullable Long createTime) { + this.createTime = createTime; + } + + public GetC2CTradeHistoryResponseDataInner commission( + @jakarta.annotation.Nullable String commission) { + this.commission = commission; + return this; + } + + /** + * Transaction Fee (in Crypto) + * + * @return commission + */ + @jakarta.annotation.Nullable + public String getCommission() { + return commission; + } + + public void setCommission(@jakarta.annotation.Nullable String commission) { + this.commission = commission; + } + + public GetC2CTradeHistoryResponseDataInner counterPartNickName( + @jakarta.annotation.Nullable String counterPartNickName) { + this.counterPartNickName = counterPartNickName; + return this; + } + + /** + * Counterparty nickname + * + * @return counterPartNickName + */ + @jakarta.annotation.Nullable + public String getCounterPartNickName() { + return counterPartNickName; + } + + public void setCounterPartNickName(@jakarta.annotation.Nullable String counterPartNickName) { + this.counterPartNickName = counterPartNickName; + } + + public GetC2CTradeHistoryResponseDataInner payMethodName( + @jakarta.annotation.Nullable String payMethodName) { + this.payMethodName = payMethodName; + return this; + } + + /** + * Identifier of the payment method + * + * @return payMethodName + */ + @jakarta.annotation.Nullable + public String getPayMethodName() { + return payMethodName; + } + + public void setPayMethodName(@jakarta.annotation.Nullable String payMethodName) { + this.payMethodName = payMethodName; + } + + public GetC2CTradeHistoryResponseDataInner additionalKycVerify( + @jakarta.annotation.Nullable Long additionalKycVerify) { + this.additionalKycVerify = additionalKycVerify; + return this; + } + + /** + * KYC verification status. 0: not required, 1: not verified, 2: verified + * + * @return additionalKycVerify + */ + @jakarta.annotation.Nullable + public Long getAdditionalKycVerify() { + return additionalKycVerify; + } + + public void setAdditionalKycVerify(@jakarta.annotation.Nullable Long additionalKycVerify) { + this.additionalKycVerify = additionalKycVerify; + } + + public GetC2CTradeHistoryResponseDataInner takerCommissionRate( + @jakarta.annotation.Nullable String takerCommissionRate) { + this.takerCommissionRate = takerCommissionRate; + return this; + } + + /** + * Taker commission rate + * + * @return takerCommissionRate + */ + @jakarta.annotation.Nullable + public String getTakerCommissionRate() { + return takerCommissionRate; + } + + public void setTakerCommissionRate(@jakarta.annotation.Nullable String takerCommissionRate) { + this.takerCommissionRate = takerCommissionRate; + } + + public GetC2CTradeHistoryResponseDataInner takerCommission( + @jakarta.annotation.Nullable String takerCommission) { + this.takerCommission = takerCommission; + return this; + } + + /** + * Taker commission amount + * + * @return takerCommission + */ + @jakarta.annotation.Nullable + public String getTakerCommission() { + return takerCommission; + } + + public void setTakerCommission(@jakarta.annotation.Nullable String takerCommission) { + this.takerCommission = takerCommission; + } + + public GetC2CTradeHistoryResponseDataInner takerAmount( + @jakarta.annotation.Nullable String takerAmount) { + this.takerAmount = takerAmount; + return this; + } + + /** + * Taker trade amount + * + * @return takerAmount + */ + @jakarta.annotation.Nullable + public String getTakerAmount() { + return takerAmount; + } + + public void setTakerAmount(@jakarta.annotation.Nullable String takerAmount) { + this.takerAmount = takerAmount; + } + + public GetC2CTradeHistoryResponseDataInner advertisementRole( + @jakarta.annotation.Nullable String advertisementRole) { + this.advertisementRole = advertisementRole; + return this; + } + + /** + * Get advertisementRole + * + * @return advertisementRole + */ + @jakarta.annotation.Nullable + public String getAdvertisementRole() { + return advertisementRole; + } + + public void setAdvertisementRole(@jakarta.annotation.Nullable String advertisementRole) { + this.advertisementRole = advertisementRole; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetC2CTradeHistoryResponseDataInner getC2CTradeHistoryResponseDataInner = + (GetC2CTradeHistoryResponseDataInner) o; + return Objects.equals(this.orderNumber, getC2CTradeHistoryResponseDataInner.orderNumber) + && Objects.equals(this.advNo, getC2CTradeHistoryResponseDataInner.advNo) + && Objects.equals(this.tradeType, getC2CTradeHistoryResponseDataInner.tradeType) + && Objects.equals(this.asset, getC2CTradeHistoryResponseDataInner.asset) + && Objects.equals(this.fiat, getC2CTradeHistoryResponseDataInner.fiat) + && Objects.equals(this.fiatSymbol, getC2CTradeHistoryResponseDataInner.fiatSymbol) + && Objects.equals(this.amount, getC2CTradeHistoryResponseDataInner.amount) + && Objects.equals(this.totalPrice, getC2CTradeHistoryResponseDataInner.totalPrice) + && Objects.equals(this.unitPrice, getC2CTradeHistoryResponseDataInner.unitPrice) + && Objects.equals(this.orderStatus, getC2CTradeHistoryResponseDataInner.orderStatus) + && Objects.equals(this.createTime, getC2CTradeHistoryResponseDataInner.createTime) + && Objects.equals(this.commission, getC2CTradeHistoryResponseDataInner.commission) + && Objects.equals( + this.counterPartNickName, + getC2CTradeHistoryResponseDataInner.counterPartNickName) + && Objects.equals( + this.payMethodName, getC2CTradeHistoryResponseDataInner.payMethodName) + && Objects.equals( + this.additionalKycVerify, + getC2CTradeHistoryResponseDataInner.additionalKycVerify) + && Objects.equals( + this.takerCommissionRate, + getC2CTradeHistoryResponseDataInner.takerCommissionRate) + && Objects.equals( + this.takerCommission, getC2CTradeHistoryResponseDataInner.takerCommission) + && Objects.equals(this.takerAmount, getC2CTradeHistoryResponseDataInner.takerAmount) + && Objects.equals( + this.advertisementRole, + getC2CTradeHistoryResponseDataInner.advertisementRole); + } + + @Override + public int hashCode() { + return Objects.hash( + orderNumber, + advNo, + tradeType, + asset, + fiat, + fiatSymbol, + amount, + totalPrice, + unitPrice, + orderStatus, + createTime, + commission, + counterPartNickName, + payMethodName, + additionalKycVerify, + takerCommissionRate, + takerCommission, + takerAmount, + advertisementRole); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetC2CTradeHistoryResponseDataInner {\n"); + sb.append(" orderNumber: ").append(toIndentedString(orderNumber)).append("\n"); + sb.append(" advNo: ").append(toIndentedString(advNo)).append("\n"); + sb.append(" tradeType: ").append(toIndentedString(tradeType)).append("\n"); + sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append(" fiat: ").append(toIndentedString(fiat)).append("\n"); + sb.append(" fiatSymbol: ").append(toIndentedString(fiatSymbol)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" totalPrice: ").append(toIndentedString(totalPrice)).append("\n"); + sb.append(" unitPrice: ").append(toIndentedString(unitPrice)).append("\n"); + sb.append(" orderStatus: ").append(toIndentedString(orderStatus)).append("\n"); + sb.append(" createTime: ").append(toIndentedString(createTime)).append("\n"); + sb.append(" commission: ").append(toIndentedString(commission)).append("\n"); + sb.append(" counterPartNickName: ") + .append(toIndentedString(counterPartNickName)) + .append("\n"); + sb.append(" payMethodName: ").append(toIndentedString(payMethodName)).append("\n"); + sb.append(" additionalKycVerify: ") + .append(toIndentedString(additionalKycVerify)) + .append("\n"); + sb.append(" takerCommissionRate: ") + .append(toIndentedString(takerCommissionRate)) + .append("\n"); + sb.append(" takerCommission: ").append(toIndentedString(takerCommission)).append("\n"); + sb.append(" takerAmount: ").append(toIndentedString(takerAmount)).append("\n"); + sb.append(" advertisementRole: ").append(toIndentedString(advertisementRole)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object orderNumberValue = getOrderNumber(); + String orderNumberValueAsString = ""; + orderNumberValueAsString = orderNumberValue.toString(); + sb.append("orderNumber=").append(urlEncode(orderNumberValueAsString)).append(""); + Object advNoValue = getAdvNo(); + String advNoValueAsString = ""; + advNoValueAsString = advNoValue.toString(); + sb.append("advNo=").append(urlEncode(advNoValueAsString)).append(""); + Object tradeTypeValue = getTradeType(); + String tradeTypeValueAsString = ""; + tradeTypeValueAsString = tradeTypeValue.toString(); + sb.append("tradeType=").append(urlEncode(tradeTypeValueAsString)).append(""); + Object assetValue = getAsset(); + String assetValueAsString = ""; + assetValueAsString = assetValue.toString(); + sb.append("asset=").append(urlEncode(assetValueAsString)).append(""); + Object fiatValue = getFiat(); + String fiatValueAsString = ""; + fiatValueAsString = fiatValue.toString(); + sb.append("fiat=").append(urlEncode(fiatValueAsString)).append(""); + Object fiatSymbolValue = getFiatSymbol(); + String fiatSymbolValueAsString = ""; + fiatSymbolValueAsString = fiatSymbolValue.toString(); + sb.append("fiatSymbol=").append(urlEncode(fiatSymbolValueAsString)).append(""); + Object amountValue = getAmount(); + String amountValueAsString = ""; + amountValueAsString = amountValue.toString(); + sb.append("amount=").append(urlEncode(amountValueAsString)).append(""); + Object totalPriceValue = getTotalPrice(); + String totalPriceValueAsString = ""; + totalPriceValueAsString = totalPriceValue.toString(); + sb.append("totalPrice=").append(urlEncode(totalPriceValueAsString)).append(""); + Object unitPriceValue = getUnitPrice(); + String unitPriceValueAsString = ""; + unitPriceValueAsString = unitPriceValue.toString(); + sb.append("unitPrice=").append(urlEncode(unitPriceValueAsString)).append(""); + Object orderStatusValue = getOrderStatus(); + String orderStatusValueAsString = ""; + orderStatusValueAsString = orderStatusValue.toString(); + sb.append("orderStatus=").append(urlEncode(orderStatusValueAsString)).append(""); + Object createTimeValue = getCreateTime(); + String createTimeValueAsString = ""; + createTimeValueAsString = createTimeValue.toString(); + sb.append("createTime=").append(urlEncode(createTimeValueAsString)).append(""); + Object commissionValue = getCommission(); + String commissionValueAsString = ""; + commissionValueAsString = commissionValue.toString(); + sb.append("commission=").append(urlEncode(commissionValueAsString)).append(""); + Object counterPartNickNameValue = getCounterPartNickName(); + String counterPartNickNameValueAsString = ""; + counterPartNickNameValueAsString = counterPartNickNameValue.toString(); + sb.append("counterPartNickName=") + .append(urlEncode(counterPartNickNameValueAsString)) + .append(""); + Object payMethodNameValue = getPayMethodName(); + String payMethodNameValueAsString = ""; + payMethodNameValueAsString = payMethodNameValue.toString(); + sb.append("payMethodName=").append(urlEncode(payMethodNameValueAsString)).append(""); + Object additionalKycVerifyValue = getAdditionalKycVerify(); + String additionalKycVerifyValueAsString = ""; + additionalKycVerifyValueAsString = additionalKycVerifyValue.toString(); + sb.append("additionalKycVerify=") + .append(urlEncode(additionalKycVerifyValueAsString)) + .append(""); + Object takerCommissionRateValue = getTakerCommissionRate(); + String takerCommissionRateValueAsString = ""; + takerCommissionRateValueAsString = takerCommissionRateValue.toString(); + sb.append("takerCommissionRate=") + .append(urlEncode(takerCommissionRateValueAsString)) + .append(""); + Object takerCommissionValue = getTakerCommission(); + String takerCommissionValueAsString = ""; + takerCommissionValueAsString = takerCommissionValue.toString(); + sb.append("takerCommission=").append(urlEncode(takerCommissionValueAsString)).append(""); + Object takerAmountValue = getTakerAmount(); + String takerAmountValueAsString = ""; + takerAmountValueAsString = takerAmountValue.toString(); + sb.append("takerAmount=").append(urlEncode(takerAmountValueAsString)).append(""); + Object advertisementRoleValue = getAdvertisementRole(); + String advertisementRoleValueAsString = ""; + advertisementRoleValueAsString = advertisementRoleValue.toString(); + sb.append("advertisementRole=") + .append(urlEncode(advertisementRoleValueAsString)) + .append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("orderNumber"); + openapiFields.add("advNo"); + openapiFields.add("tradeType"); + openapiFields.add("asset"); + openapiFields.add("fiat"); + openapiFields.add("fiatSymbol"); + openapiFields.add("amount"); + openapiFields.add("totalPrice"); + openapiFields.add("unitPrice"); + openapiFields.add("orderStatus"); + openapiFields.add("createTime"); + openapiFields.add("commission"); + openapiFields.add("counterPartNickName"); + openapiFields.add("payMethodName"); + openapiFields.add("additionalKycVerify"); + openapiFields.add("takerCommissionRate"); + openapiFields.add("takerCommission"); + openapiFields.add("takerAmount"); + openapiFields.add("advertisementRole"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * GetC2CTradeHistoryResponseDataInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetC2CTradeHistoryResponseDataInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetC2CTradeHistoryResponseDataInner is" + + " not found in the empty JSON string", + GetC2CTradeHistoryResponseDataInner.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("orderNumber") != null && !jsonObj.get("orderNumber").isJsonNull()) + && !jsonObj.get("orderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `orderNumber` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("orderNumber").toString())); + } + if ((jsonObj.get("advNo") != null && !jsonObj.get("advNo").isJsonNull()) + && !jsonObj.get("advNo").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `advNo` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("advNo").toString())); + } + if ((jsonObj.get("tradeType") != null && !jsonObj.get("tradeType").isJsonNull()) + && !jsonObj.get("tradeType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tradeType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("tradeType").toString())); + } + if ((jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) + && !jsonObj.get("asset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `asset` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("asset").toString())); + } + if ((jsonObj.get("fiat") != null && !jsonObj.get("fiat").isJsonNull()) + && !jsonObj.get("fiat").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `fiat` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("fiat").toString())); + } + if ((jsonObj.get("fiatSymbol") != null && !jsonObj.get("fiatSymbol").isJsonNull()) + && !jsonObj.get("fiatSymbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `fiatSymbol` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("fiatSymbol").toString())); + } + if ((jsonObj.get("amount") != null && !jsonObj.get("amount").isJsonNull()) + && !jsonObj.get("amount").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `amount` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("amount").toString())); + } + if ((jsonObj.get("totalPrice") != null && !jsonObj.get("totalPrice").isJsonNull()) + && !jsonObj.get("totalPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `totalPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("totalPrice").toString())); + } + if ((jsonObj.get("unitPrice") != null && !jsonObj.get("unitPrice").isJsonNull()) + && !jsonObj.get("unitPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `unitPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("unitPrice").toString())); + } + if ((jsonObj.get("orderStatus") != null && !jsonObj.get("orderStatus").isJsonNull()) + && !jsonObj.get("orderStatus").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `orderStatus` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("orderStatus").toString())); + } + if ((jsonObj.get("commission") != null && !jsonObj.get("commission").isJsonNull()) + && !jsonObj.get("commission").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `commission` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("commission").toString())); + } + if ((jsonObj.get("counterPartNickName") != null + && !jsonObj.get("counterPartNickName").isJsonNull()) + && !jsonObj.get("counterPartNickName").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `counterPartNickName` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("counterPartNickName").toString())); + } + if ((jsonObj.get("payMethodName") != null && !jsonObj.get("payMethodName").isJsonNull()) + && !jsonObj.get("payMethodName").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `payMethodName` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("payMethodName").toString())); + } + if ((jsonObj.get("takerCommissionRate") != null + && !jsonObj.get("takerCommissionRate").isJsonNull()) + && !jsonObj.get("takerCommissionRate").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `takerCommissionRate` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("takerCommissionRate").toString())); + } + if ((jsonObj.get("takerCommission") != null && !jsonObj.get("takerCommission").isJsonNull()) + && !jsonObj.get("takerCommission").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `takerCommission` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("takerCommission").toString())); + } + if ((jsonObj.get("takerAmount") != null && !jsonObj.get("takerAmount").isJsonNull()) + && !jsonObj.get("takerAmount").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `takerAmount` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("takerAmount").toString())); + } + if ((jsonObj.get("advertisementRole") != null + && !jsonObj.get("advertisementRole").isJsonNull()) + && !jsonObj.get("advertisementRole").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `advertisementRole` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("advertisementRole").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetC2CTradeHistoryResponseDataInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetC2CTradeHistoryResponseDataInner' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(GetC2CTradeHistoryResponseDataInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GetC2CTradeHistoryResponseDataInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetC2CTradeHistoryResponseDataInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetC2CTradeHistoryResponseDataInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetC2CTradeHistoryResponseDataInner + * @throws IOException if the JSON string is invalid with respect to + * GetC2CTradeHistoryResponseDataInner + */ + public static GetC2CTradeHistoryResponseDataInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, GetC2CTradeHistoryResponseDataInner.class); + } + + /** + * Convert an instance of GetC2CTradeHistoryResponseDataInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/model/TradeType.java b/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/model/TradeType.java new file mode 100644 index 000000000..b2b109fed --- /dev/null +++ b/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/model/TradeType.java @@ -0,0 +1,73 @@ +/* + * C2C REST API + * Query fiat transaction history via the C2C REST API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.c2c.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets tradeType */ +@JsonAdapter(TradeType.Adapter.class) +public enum TradeType { + BUY("BUY"), + + SELL("SELL"); + + private String value; + + TradeType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TradeType fromValue(String value) { + for (TradeType b : TradeType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TradeType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TradeType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TradeType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TradeType.fromValue(value); + } +} diff --git a/clients/c2c/src/test/java/com/binance/connector/client/c2c/rest/api/C2CApiTest.java b/clients/c2c/src/test/java/com/binance/connector/client/c2c/rest/api/C2CApiTest.java index 1d297d3e0..b24930694 100644 --- a/clients/c2c/src/test/java/com/binance/connector/client/c2c/rest/api/C2CApiTest.java +++ b/clients/c2c/src/test/java/com/binance/connector/client/c2c/rest/api/C2CApiTest.java @@ -15,6 +15,7 @@ import static org.junit.Assert.assertEquals; import com.binance.connector.client.c2c.rest.model.GetC2CTradeHistoryResponse; +import com.binance.connector.client.c2c.rest.model.TradeType; import com.binance.connector.client.common.ApiClient; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -36,7 +37,7 @@ /** API tests for C2CApi */ public class C2CApiTest { - private C2CApi api; + private C2cRestApi api; private ApiClient apiClientSpy; private SignatureGenerator signatureGeneratorSpy; @@ -72,7 +73,7 @@ public void initApiClient() throws ApiException { Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); - api = new C2CApi(apiClientSpy); + api = new C2cRestApi(apiClientSpy); } /** @@ -87,30 +88,23 @@ public void initApiClient() throws ApiException { */ @Test public void getC2CTradeHistoryTest() throws ApiException, CryptoException { - String tradeType = "BUY"; + TradeType tradeType = TradeType.BUY; Long startTimestamp = 1623319461670L; Long endTimestamp = 1641782889000L; Long page = 1L; Long rows = 100L; - Long recvWindow = 5000L; ApiResponse response = - api.getC2CTradeHistory(tradeType, startTimestamp, endTimestamp, page, rows, recvWindow); + api.getC2CTradeHistory(tradeType, startTimestamp, endTimestamp, page, rows); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); - ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); - Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); assertEquals( - "tradeType=BUY&startTimestamp=1623319461670&endTimestamp=1641782889000&page=1&rows=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "b832525dad5bec73a86b8ad4a5bda7aaa6e4708aeb1c6f85d37ef00a5aefc693", + null, actualRequest.url().queryParameter("signature")); assertEquals( "/sapi/v1/c2c/orderMatch/listUserOrderHistory", actualRequest.url().encodedPath()); diff --git a/clients/c2c/src/test/java/com/binance/connector/client/c2c/rest/api/DefaultApiTest.java b/clients/c2c/src/test/java/com/binance/connector/client/c2c/rest/api/DefaultApiTest.java new file mode 100644 index 000000000..9d3cd7c6f --- /dev/null +++ b/clients/c2c/src/test/java/com/binance/connector/client/c2c/rest/api/DefaultApiTest.java @@ -0,0 +1,112 @@ +/* + * C2C REST API + * Query fiat transaction history via the C2C REST API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.c2c.rest.api; + +import static org.junit.Assert.assertEquals; + +import com.binance.connector.client.c2c.rest.model.GetC2CTradeHistoryResponse; +import com.binance.connector.client.c2c.rest.model.TradeType; +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.auth.BinanceAuthenticationFactory; +import com.binance.connector.client.common.auth.SignatureAuthentication; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.common.sign.HmacSignatureGenerator; +import com.binance.connector.client.common.sign.SignatureGenerator; +import jakarta.validation.constraints.*; +import java.io.IOException; +import okhttp3.Call; +import okhttp3.Request; +import org.bouncycastle.crypto.CryptoException; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; + +/** API tests for DefaultApi */ +public class DefaultApiTest { + + private DefaultApi api; + private ApiClient apiClientSpy; + private SignatureGenerator signatureGeneratorSpy; + + @BeforeEach + public void initApiClient() throws ApiException { + ClientConfiguration clientConfiguration = new ClientConfiguration(); + clientConfiguration.setUrl("http://localhost:8080"); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setSecretKey("secretKey"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + + HmacSignatureGenerator signatureGenerator = + new HmacSignatureGenerator(signatureConfiguration.getSecretKey()); + signatureGeneratorSpy = Mockito.spy(signatureGenerator); + SignatureAuthentication signatureAuthentication = + new SignatureAuthentication( + signatureConfiguration.getApiKey(), signatureGeneratorSpy); + SignatureAuthentication authenticationSpy = Mockito.spy(signatureAuthentication); + Mockito.doReturn("1736393892000").when(authenticationSpy).buildTimestamp(); + + BinanceAuthenticationFactory factoryMock = Mockito.mock(BinanceAuthenticationFactory.class); + Mockito.doReturn(authenticationSpy) + .when(factoryMock) + .getAuthentication(signatureConfiguration); + + ApiClient apiClient = new ApiClient(clientConfiguration, factoryMock); + + apiClientSpy = Mockito.spy(apiClient); + Mockito.doReturn(new ApiResponse<>(200, null)) + .when(apiClientSpy) + .execute(Mockito.any(), Mockito.any(java.lang.reflect.Type.class)); + Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); + Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); + + api = new DefaultApi(apiClientSpy); + } + + /** + * Get C2C Trade History (USER_DATA) + * + *

Get C2C Trade History Weight(IP): 1 Security Type: USER_DATA Notes: - The max interval + * between `startTimestamp` and `endTimestamp` is 30 days. - If + * `startTimestamp` and `endTimestamp` are not sent, the recent 30 days' + * data is returned. - You can only view data from the past 6 months. For all C2C orders, check + * `https://c2c.binance.com/en/fiatOrder`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getC2CTradeHistoryTest() throws ApiException, CryptoException, IOException { + TradeType tradeType = TradeType.BUY; + Long startTimestamp = 1770736694138L; + Long endTimestamp = 1770736694138L; + Long page = 1L; + Long rows = 100L; + ApiResponse response = + api.getC2CTradeHistory(tradeType, startTimestamp, endTimestamp, page, rows); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + null, actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/c2c/orderMatch/listUserOrderHistory", actualRequest.url().encodedPath()); + } +} diff --git a/clients/common/pom.xml b/clients/common/pom.xml index 298fecba4..cfd509203 100644 --- a/clients/common/pom.xml +++ b/clients/common/pom.xml @@ -5,11 +5,11 @@ io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 binance-common common - 2.5.0 + 2.5.1 jar \ No newline at end of file diff --git a/clients/convert/CHANGELOG.md b/clients/convert/CHANGELOG.md index d7c47c3bb..3803eb14b 100644 --- a/clients/convert/CHANGELOG.md +++ b/clients/convert/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## 3.0.0 - 2026-07-29 + +### Changed (4) + +- Modified parameter `expiredType`: + - enum added: `1_D`, `3_D`, `7_D`, `30_D` + - affected methods: + - `placeLimitOrder()` (`POST /sapi/v1/convert/limit/placeOrder`) +- Modified parameter `side`: + - enum added: `BUY`, `SELL` + - affected methods: + - `placeLimitOrder()` (`POST /sapi/v1/convert/limit/placeOrder`) +- Modified parameter `validTime`: + - enum added: `10s`, `30s`, `1m` + - affected methods: + - `sendQuoteRequest()` (`POST /sapi/v1/convert/getQuote`) +- Modified parameter `walletType`: + - enum added: `SPOT`, `FUNDING`, `EARN`, `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN`, `SPOT_EARN` + - affected methods: + - `sendQuoteRequest()` (`POST /sapi/v1/convert/getQuote`) + - `placeLimitOrder()` (`POST /sapi/v1/convert/limit/placeOrder`) + ## 2.0.1 - 2026-04-30 - Update `binance/common` module to version `2.4.2`.| diff --git a/clients/convert/docs/AcceptQuoteRequest.md b/clients/convert/docs/AcceptQuoteRequest.md index 6cf165bb1..b551cec5a 100644 --- a/clients/convert/docs/AcceptQuoteRequest.md +++ b/clients/convert/docs/AcceptQuoteRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**quoteId** | **String** | | | -|**recvWindow** | **Long** | | [optional] | +|**recvWindow** | **Long** | Request validity window in milliseconds | [optional] | diff --git a/clients/convert/docs/AcceptQuoteResponse.md b/clients/convert/docs/AcceptQuoteResponse.md index 952d10eb6..7059a15aa 100644 --- a/clients/convert/docs/AcceptQuoteResponse.md +++ b/clients/convert/docs/AcceptQuoteResponse.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**orderId** | **String** | | [optional] | |**createTime** | **Long** | | [optional] | -|**orderStatus** | **String** | | [optional] | +|**orderStatus** | **String** | Order processing status | [optional] | diff --git a/clients/convert/docs/CancelLimitOrderRequest.md b/clients/convert/docs/CancelLimitOrderRequest.md index 33912d193..64eb8a068 100644 --- a/clients/convert/docs/CancelLimitOrderRequest.md +++ b/clients/convert/docs/CancelLimitOrderRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **String** | | | -|**recvWindow** | **Long** | | [optional] | +|**orderId** | **Long** | The orderId from `placeOrder` api | | +|**recvWindow** | **Long** | Request validity window in milliseconds | [optional] | diff --git a/clients/convert/docs/ExpiredType.md b/clients/convert/docs/ExpiredType.md new file mode 100644 index 000000000..af035cb07 --- /dev/null +++ b/clients/convert/docs/ExpiredType.md @@ -0,0 +1,17 @@ + + +# ExpiredType + +## Enum + + +* `EXPIRED_TYPE_1_D` (value: `"1_D"`) + +* `EXPIRED_TYPE_3_D` (value: `"3_D"`) + +* `EXPIRED_TYPE_7_D` (value: `"7_D"`) + +* `EXPIRED_TYPE_30_D` (value: `"30_D"`) + + + diff --git a/clients/convert/docs/GetConvertTradeHistoryResponseListInner.md b/clients/convert/docs/GetConvertTradeHistoryResponseListInner.md index a672c0ec7..bd1d145b4 100644 --- a/clients/convert/docs/GetConvertTradeHistoryResponseListInner.md +++ b/clients/convert/docs/GetConvertTradeHistoryResponseListInner.md @@ -9,13 +9,13 @@ |------------ | ------------- | ------------- | -------------| |**quoteId** | **String** | | [optional] | |**orderId** | **Long** | | [optional] | -|**orderStatus** | **String** | | [optional] | -|**fromAsset** | **String** | | [optional] | -|**fromAmount** | **String** | | [optional] | -|**toAsset** | **String** | | [optional] | -|**toAmount** | **String** | | [optional] | -|**ratio** | **String** | | [optional] | -|**inverseRatio** | **String** | | [optional] | +|**orderStatus** | **String** | Order status | [optional] | +|**fromAsset** | **String** | Source asset | [optional] | +|**fromAmount** | **String** | Source amount | [optional] | +|**toAsset** | **String** | Destination asset | [optional] | +|**toAmount** | **String** | Destination amount | [optional] | +|**ratio** | **String** | Price ratio | [optional] | +|**inverseRatio** | **String** | Inverse price ratio | [optional] | |**createTime** | **Long** | | [optional] | diff --git a/clients/convert/docs/ListAllConvertPairsResponseInner.md b/clients/convert/docs/ListAllConvertPairsResponseInner.md index cd1d74d19..f9816c76b 100644 --- a/clients/convert/docs/ListAllConvertPairsResponseInner.md +++ b/clients/convert/docs/ListAllConvertPairsResponseInner.md @@ -12,7 +12,7 @@ |**fromAssetMinAmount** | **String** | | [optional] | |**fromAssetMaxAmount** | **String** | | [optional] | |**toAssetMinAmount** | **String** | | [optional] | -|**toAssetMaxAmount** | **String** | | [optional] | +|**toAssetMaxAmount** | **String** | 9E+24 signals that this symbol has a very large upper limit close to infinity | [optional] | diff --git a/clients/convert/docs/MarketDataApi.md b/clients/convert/docs/MarketDataApi.md index c47323bd6..f91c761fc 100644 --- a/clients/convert/docs/MarketDataApi.md +++ b/clients/convert/docs/MarketDataApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**listAllConvertPairs**](MarketDataApi.md#listAllConvertPairs) | **GET** /sapi/v1/convert/exchangeInfo | List All Convert Pairs | -| [**queryOrderQuantityPrecisionPerAsset**](MarketDataApi.md#queryOrderQuantityPrecisionPerAsset) | **GET** /sapi/v1/convert/assetInfo | Query order quantity precision per asset(USER_DATA) | +| [**queryOrderQuantityPrecisionPerAsset**](MarketDataApi.md#queryOrderQuantityPrecisionPerAsset) | **GET** /sapi/v1/convert/assetInfo | Query order quantity precision per asset (USER_DATA) | @@ -14,7 +14,7 @@ All URIs are relative to *https://api.binance.com* List All Convert Pairs -Query for all convertible token pairs and the tokens’ respective upper/lower limits * User needs to supply either or both of the input parameter * If not defined for both fromAsset and toAsset, only partial token pairs will be returned Weight: 3000(IP) +Query for all convertible token pairs and the tokens’ respective upper/lower limits Weight(IP): 3000 Notes: - User needs to supply either or both input parameters. - If only one of `fromAsset` and `toAsset` is provided, only partial token pairs are returned. ### Example ```java @@ -31,8 +31,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String fromAsset = "fromAsset_example"; // String | User spends coin - String toAsset = "toAsset_example"; // String | User receives coin + String fromAsset = "BTC"; // String | User spends coin + String toAsset = "USDT"; // String | User receives coin try { ListAllConvertPairsResponse result = apiInstance.listAllConvertPairs(fromAsset, toAsset); System.out.println(result); @@ -76,9 +76,9 @@ No authorization required # **queryOrderQuantityPrecisionPerAsset** > QueryOrderQuantityPrecisionPerAssetResponse queryOrderQuantityPrecisionPerAsset(recvWindow) -Query order quantity precision per asset(USER_DATA) +Query order quantity precision per asset (USER_DATA) -Query for supported asset’s precision information Weight: 100(IP) +Query for supported asset’s precision information Weight(IP): 100 Security Type: USER_DATA ### Example ```java @@ -95,7 +95,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { QueryOrderQuantityPrecisionPerAssetResponse result = apiInstance.queryOrderQuantityPrecisionPerAsset(recvWindow); System.out.println(result); @@ -114,7 +114,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| The value cannot be greater than 60000 | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type diff --git a/clients/convert/docs/PlaceLimitOrderRequest.md b/clients/convert/docs/PlaceLimitOrderRequest.md index f92dbb692..628558e47 100644 --- a/clients/convert/docs/PlaceLimitOrderRequest.md +++ b/clients/convert/docs/PlaceLimitOrderRequest.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**baseAsset** | **String** | | | -|**quoteAsset** | **String** | | | -|**limitPrice** | **Double** | | | -|**baseAmount** | **Double** | | [optional] | -|**quoteAmount** | **Double** | | [optional] | -|**side** | **String** | | | -|**walletType** | **String** | | [optional] | -|**expiredType** | **String** | | | -|**recvWindow** | **Long** | | [optional] | +|**baseAsset** | **String** | base asset (use the response `fromIsBase` from `GET /sapi/v1/convert/exchangeInfo` api to check which one is baseAsset ) | | +|**quoteAsset** | **String** | quote asset | | +|**limitPrice** | **Double** | Symbol limit price (from baseAsset to quoteAsset) | | +|**baseAmount** | **Double** | Base asset amount. (One of `baseAmount` or `quoteAmount` is required) | [optional] | +|**quoteAmount** | **Double** | Quote asset amount. (One of `baseAmount` or `quoteAmount` is required) | [optional] | +|**side** | **Side** | | | +|**walletType** | **WalletType** | | [optional] | +|**expiredType** | **ExpiredType** | | | +|**recvWindow** | **Long** | Request validity window in milliseconds | [optional] | diff --git a/clients/convert/docs/SendQuoteRequestRequest.md b/clients/convert/docs/SendQuoteRequestRequest.md index 3b272d9c1..716e49b55 100644 --- a/clients/convert/docs/SendQuoteRequestRequest.md +++ b/clients/convert/docs/SendQuoteRequestRequest.md @@ -9,11 +9,11 @@ |------------ | ------------- | ------------- | -------------| |**fromAsset** | **String** | | | |**toAsset** | **String** | | | -|**fromAmount** | **Double** | | [optional] | -|**toAmount** | **Double** | | [optional] | -|**walletType** | **String** | | [optional] | -|**validTime** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**fromAmount** | **Double** | When specified, it is the amount you will be debited after the conversion | [optional] | +|**toAmount** | **Double** | When specified, it is the amount you will be credited after the conversion | [optional] | +|**walletType** | **WalletType** | | [optional] | +|**validTime** | **ValidTime** | | [optional] | +|**recvWindow** | **Long** | Request validity window in milliseconds | [optional] | diff --git a/clients/convert/docs/Side.md b/clients/convert/docs/Side.md new file mode 100644 index 000000000..689c903df --- /dev/null +++ b/clients/convert/docs/Side.md @@ -0,0 +1,13 @@ + + +# Side + +## Enum + + +* `BUY` (value: `"BUY"`) + +* `SELL` (value: `"SELL"`) + + + diff --git a/clients/convert/docs/TradeApi.md b/clients/convert/docs/TradeApi.md index b71980902..920f5401b 100644 --- a/clients/convert/docs/TradeApi.md +++ b/clients/convert/docs/TradeApi.md @@ -5,12 +5,12 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**acceptQuote**](TradeApi.md#acceptQuote) | **POST** /sapi/v1/convert/acceptQuote | Accept Quote (TRADE) | -| [**cancelLimitOrder**](TradeApi.md#cancelLimitOrder) | **POST** /sapi/v1/convert/limit/cancelOrder | Cancel limit order (USER_DATA) | -| [**getConvertTradeHistory**](TradeApi.md#getConvertTradeHistory) | **GET** /sapi/v1/convert/tradeFlow | Get Convert Trade History(USER_DATA) | -| [**orderStatus**](TradeApi.md#orderStatus) | **GET** /sapi/v1/convert/orderStatus | Order status(USER_DATA) | -| [**placeLimitOrder**](TradeApi.md#placeLimitOrder) | **POST** /sapi/v1/convert/limit/placeOrder | Place limit order (USER_DATA) | +| [**cancelLimitOrder**](TradeApi.md#cancelLimitOrder) | **POST** /sapi/v1/convert/limit/cancelOrder | Cancel limit order (TRADE) | +| [**getConvertTradeHistory**](TradeApi.md#getConvertTradeHistory) | **GET** /sapi/v1/convert/tradeFlow | Get Convert Trade History (USER_DATA) | +| [**orderStatus**](TradeApi.md#orderStatus) | **GET** /sapi/v1/convert/orderStatus | Order status (USER_DATA) | +| [**placeLimitOrder**](TradeApi.md#placeLimitOrder) | **POST** /sapi/v1/convert/limit/placeOrder | Place limit order (TRADE) | | [**queryLimitOpenOrders**](TradeApi.md#queryLimitOpenOrders) | **GET** /sapi/v1/convert/limit/queryOpenOrders | Query limit open orders (USER_DATA) | -| [**sendQuoteRequest**](TradeApi.md#sendQuoteRequest) | **POST** /sapi/v1/convert/getQuote | Send Quote Request(USER_DATA) | +| [**sendQuoteRequest**](TradeApi.md#sendQuoteRequest) | **POST** /sapi/v1/convert/getQuote | Send Quote Request (TRADE) | @@ -19,7 +19,7 @@ All URIs are relative to *https://api.binance.com* Accept Quote (TRADE) -Accept the offered quote by quote ID. Weight: 500(UID) +Accept the offered quote by quote ID. Weight(UID): 500 Security Type: TRADE ### Example ```java @@ -79,9 +79,9 @@ No authorization required # **cancelLimitOrder** > CancelLimitOrderResponse cancelLimitOrder(cancelLimitOrderRequest) -Cancel limit order (USER_DATA) +Cancel limit order (TRADE) -Enable users to cancel a limit order Weight: 200(UID) +Enable users to cancel a limit order Weight(UID): 200 Security Type: TRADE ### Example ```java @@ -141,9 +141,9 @@ No authorization required # **getConvertTradeHistory** > GetConvertTradeHistoryResponse getConvertTradeHistory(startTime, endTime, limit, recvWindow) -Get Convert Trade History(USER_DATA) +Get Convert Trade History (USER_DATA) -Get Convert Trade History * The max interval between startTime and endTime is 30 days. Weight: 3000 +Get Convert Trade History Weight(UID): 3000 Security Type: USER_DATA Notes: - The max interval between `startTime` and `endTime` is 30 days. ### Example ```java @@ -160,10 +160,10 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | Default 100, Max 1000 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long limit = 100L; // Long | Number of records to return + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { GetConvertTradeHistoryResponse result = apiInstance.getConvertTradeHistory(startTime, endTime, limit, recvWindow); System.out.println(result); @@ -184,8 +184,8 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **startTime** | **Long**| | | | **endTime** | **Long**| | | -| **limit** | **Long**| Default 100, Max 1000 | [optional] | -| **recvWindow** | **Long**| The value cannot be greater than 60000 | [optional] | +| **limit** | **Long**| Number of records to return | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -209,9 +209,9 @@ No authorization required # **orderStatus** > OrderStatusResponse orderStatus(orderId, quoteId) -Order status(USER_DATA) +Order status (USER_DATA) -Query order status by order ID. Weight: 100(UID) +Query order status by order ID. Weight(UID): 100 Security Type: USER_DATA ### Example ```java @@ -228,8 +228,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String orderId = "orderId_example"; // String | Either orderId or quoteId is required - String quoteId = "quoteId_example"; // String | Either orderId or quoteId is required + String orderId = "1"; // String | Either orderId or quoteId is required + String quoteId = "1"; // String | Either orderId or quoteId is required try { OrderStatusResponse result = apiInstance.orderStatus(orderId, quoteId); System.out.println(result); @@ -273,9 +273,9 @@ No authorization required # **placeLimitOrder** > PlaceLimitOrderResponse placeLimitOrder(placeLimitOrderRequest) -Place limit order (USER_DATA) +Place limit order (TRADE) -Enable users to place a limit order * `baseAsset` or `quoteAsset` can be determined via `exchangeInfo` endpoint. * Limit price is defined from `baseAsset` to `quoteAsset`. * Either `baseAmount` or `quoteAmount` is used. Weight: 500(UID) +Enable users to place a limit order Weight(UID): 500 Security Type: TRADE Notes: - `baseAsset` and `quoteAsset` can be determined via the `exchangeInfo` endpoint. - Limit price is defined from `baseAsset` to `quoteAsset`. - Exactly one of `baseAmount` or `quoteAmount` should be sent. ### Example ```java @@ -337,7 +337,7 @@ No authorization required Query limit open orders (USER_DATA) -Request a quote for the requested token pairs Weight: 3000(UID) +Query current open limit orders Weight(UID): 3000 Security Type: USER_DATA ### Example ```java @@ -354,7 +354,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { QueryLimitOpenOrdersResponse result = apiInstance.queryLimitOpenOrders(recvWindow); System.out.println(result); @@ -373,7 +373,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| The value cannot be greater than 60000 | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -397,9 +397,9 @@ No authorization required # **sendQuoteRequest** > SendQuoteRequestResponse sendQuoteRequest(sendQuoteRequestRequest) -Send Quote Request(USER_DATA) +Send Quote Request (TRADE) -Request a quote for the requested token pairs * Either fromAmount or toAmount should be sent * `quoteId` will be returned only if you have enough funds to convert Weight: 200(UID) +Request a quote for the requested token pairs Weight(UID): 200 Security Type: TRADE Notes: - Either `fromAmount` or `toAmount` should be sent. - `quoteId` is returned only if you have enough funds to convert. ### Example ```java diff --git a/clients/convert/docs/ValidTime.md b/clients/convert/docs/ValidTime.md new file mode 100644 index 000000000..46fa1e1e1 --- /dev/null +++ b/clients/convert/docs/ValidTime.md @@ -0,0 +1,15 @@ + + +# ValidTime + +## Enum + + +* `VALID_TIME_10s` (value: `"10s"`) + +* `VALID_TIME_30s` (value: `"30s"`) + +* `VALID_TIME_1m` (value: `"1m"`) + + + diff --git a/clients/convert/docs/WalletType.md b/clients/convert/docs/WalletType.md new file mode 100644 index 000000000..e84ed9c59 --- /dev/null +++ b/clients/convert/docs/WalletType.md @@ -0,0 +1,23 @@ + + +# WalletType + +## Enum + + +* `SPOT` (value: `"SPOT"`) + +* `FUNDING` (value: `"FUNDING"`) + +* `EARN` (value: `"EARN"`) + +* `SPOT_FUNDING` (value: `"SPOT_FUNDING"`) + +* `FUNDING_EARN` (value: `"FUNDING_EARN"`) + +* `SPOT_FUNDING_EARN` (value: `"SPOT_FUNDING_EARN"`) + +* `SPOT_EARN` (value: `"SPOT_EARN"`) + + + diff --git a/clients/convert/docs/rest-api/migration-guide.md b/clients/convert/docs/rest-api/migration-guide.md index 270ea57ef..b95ffef60 100644 --- a/clients/convert/docs/rest-api/migration-guide.md +++ b/clients/convert/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-convert - 2.0.0 + 3.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-convert - 2.0.0 + 3.0.0 ``` diff --git a/clients/convert/example_rest.md b/clients/convert/example_rest.md index c02776ba2..41daf08bf 100644 --- a/clients/convert/example_rest.md +++ b/clients/convert/example_rest.md @@ -1,22 +1,22 @@ ## MarketData -[GET /sapi/v1/convert/exchangeInfo](https://developers.binance.com/docs/convert/market-data/) - listAllConvertPairs - [ListAllConvertPairsExample.java:48](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/marketdata/ListAllConvertPairsExample.java#L48) +[GET /sapi/v1/convert/exchangeInfo](https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/market-data#list-all-convert-pairs) - listAllConvertPairs - [ListAllConvertPairsExample.java:38](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/marketdata/ListAllConvertPairsExample.java#L38) -[GET /sapi/v1/convert/assetInfo](https://developers.binance.com/docs/convert/market-data/Query-order-quantity-precision-per-asset) - queryOrderQuantityPrecisionPerAsset - [QueryOrderQuantityPrecisionPerAssetExample.java:46](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/marketdata/QueryOrderQuantityPrecisionPerAssetExample.java#L46) +[GET /sapi/v1/convert/assetInfo](https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/market-data#query-order-quantity-precision-per-asset) - queryOrderQuantityPrecisionPerAsset - [QueryOrderQuantityPrecisionPerAssetExample.java:35](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/marketdata/QueryOrderQuantityPrecisionPerAssetExample.java#L35) ## Trade -[POST /sapi/v1/convert/acceptQuote](https://developers.binance.com/docs/convert/trade/Accept-Quote) - acceptQuote - [AcceptQuoteExample.java:47](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/AcceptQuoteExample.java#L47) +[POST /sapi/v1/convert/acceptQuote](https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#accept-quote) - acceptQuote - [AcceptQuoteExample.java:36](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/AcceptQuoteExample.java#L36) -[POST /sapi/v1/convert/limit/cancelOrder](https://developers.binance.com/docs/convert/trade/Cancel-Order) - cancelLimitOrder - [CancelLimitOrderExample.java:47](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/CancelLimitOrderExample.java#L47) +[POST /sapi/v1/convert/limit/cancelOrder](https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#cancel-limit-order) - cancelLimitOrder - [CancelLimitOrderExample.java:36](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/CancelLimitOrderExample.java#L36) -[GET /sapi/v1/convert/tradeFlow](https://developers.binance.com/docs/convert/trade/Get-Convert-Trade-History) - getConvertTradeHistory - [GetConvertTradeHistoryExample.java:47](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/GetConvertTradeHistoryExample.java#L47) +[GET /sapi/v1/convert/tradeFlow](https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#get-convert-trade-history) - getConvertTradeHistory - [GetConvertTradeHistoryExample.java:36](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/GetConvertTradeHistoryExample.java#L36) -[GET /sapi/v1/convert/orderStatus](https://developers.binance.com/docs/convert/trade/Order-Status) - orderStatus - [OrderStatusExample.java:46](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/OrderStatusExample.java#L46) +[GET /sapi/v1/convert/orderStatus](https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#order-status) - orderStatus - [OrderStatusExample.java:35](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/OrderStatusExample.java#L35) -[POST /sapi/v1/convert/limit/placeOrder](https://developers.binance.com/docs/convert/trade/Place-Order) - placeLimitOrder - [PlaceLimitOrderExample.java:50](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/PlaceLimitOrderExample.java#L50) +[POST /sapi/v1/convert/limit/placeOrder](https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#place-limit-order) - placeLimitOrder - [PlaceLimitOrderExample.java:42](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/PlaceLimitOrderExample.java#L42) -[GET /sapi/v1/convert/limit/queryOpenOrders](https://developers.binance.com/docs/convert/trade/Query-Order) - queryLimitOpenOrders - [QueryLimitOpenOrdersExample.java:46](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/QueryLimitOpenOrdersExample.java#L46) +[GET /sapi/v1/convert/limit/queryOpenOrders](https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#query-limit-open-orders) - queryLimitOpenOrders - [QueryLimitOpenOrdersExample.java:35](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/QueryLimitOpenOrdersExample.java#L35) -[POST /sapi/v1/convert/getQuote](https://developers.binance.com/docs/convert/trade/Send-quote-request) - sendQuoteRequest - [SendQuoteRequestExample.java:49](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/SendQuoteRequestExample.java#L49) +[POST /sapi/v1/convert/getQuote](https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#send-quote-request) - sendQuoteRequest - [SendQuoteRequestExample.java:38](/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/SendQuoteRequestExample.java#L38) diff --git a/clients/convert/pom.xml b/clients/convert/pom.xml index cdb78aba8..67badcb6d 100644 --- a/clients/convert/pom.xml +++ b/clients/convert/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-convert convert - 2.0.1 + 3.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/JSON.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/JSON.java index 043299b0f..1128b9ffc 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/JSON.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/ConvertRestApi.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/ConvertRestApi.java index b367d472b..7f64a824a 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/ConvertRestApi.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/ConvertRestApi.java @@ -35,9 +35,9 @@ public ConvertRestApi(ApiClient apiClient) { /** * List All Convert Pairs Query for all convertible token pairs and the tokens’ respective - * upper/lower limits * User needs to supply either or both of the input parameter * If not - * defined for both fromAsset and toAsset, only partial token pairs will be returned Weight: - * 3000(IP) + * upper/lower limits Weight(IP): 3000 Notes: - User needs to supply either or both input + * parameters. - If only one of `fromAsset` and `toAsset` is provided, only + * partial token pairs are returned. * * @param fromAsset User spends coin (optional) * @param toAsset User receives coin (optional) @@ -51,8 +51,9 @@ public ConvertRestApi(ApiClient apiClient) { * 200 List All Convert Pairs - * * - * @see List All Convert - * Pairs Documentation + * @see List + * All Convert Pairs Documentation */ public ApiResponse listAllConvertPairs( String fromAsset, String toAsset) throws ApiException { @@ -60,10 +61,10 @@ public ApiResponse listAllConvertPairs( } /** - * Query order quantity precision per asset(USER_DATA) Query for supported asset’s precision - * information Weight: 100(IP) + * Query order quantity precision per asset (USER_DATA) Query for supported asset’s precision + * information Weight(IP): 100 Security Type: USER_DATA * - * @param recvWindow The value cannot be greater than 60000 (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QueryOrderQuantityPrecisionPerAssetResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -75,8 +76,8 @@ public ApiResponse listAllConvertPairs( * * * @see Query - * order quantity precision per asset(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/market-data#query-order-quantity-precision-per-asset">Query + * order quantity precision per asset (USER_DATA) Documentation */ public ApiResponse queryOrderQuantityPrecisionPerAsset(Long recvWindow) throws ApiException { @@ -84,7 +85,8 @@ public ApiResponse listAllConvertPairs( } /** - * Accept Quote (TRADE) Accept the offered quote by quote ID. Weight: 500(UID) + * Accept Quote (TRADE) Accept the offered quote by quote ID. Weight(UID): 500 Security Type: + * TRADE * * @param acceptQuoteRequest (required) * @return ApiResponse<AcceptQuoteResponse> @@ -97,8 +99,9 @@ public ApiResponse listAllConvertPairs( * 200 Accept Quote - * * - * @see Accept Quote - * (TRADE) Documentation + * @see Accept + * Quote (TRADE) Documentation */ public ApiResponse acceptQuote(AcceptQuoteRequest acceptQuoteRequest) throws ApiException { @@ -106,7 +109,8 @@ public ApiResponse acceptQuote(AcceptQuoteRequest acceptQuo } /** - * Cancel limit order (USER_DATA) Enable users to cancel a limit order Weight: 200(UID) + * Cancel limit order (TRADE) Enable users to cancel a limit order Weight(UID): 200 Security + * Type: TRADE * * @param cancelLimitOrderRequest (required) * @return ApiResponse<CancelLimitOrderResponse> @@ -119,8 +123,9 @@ public ApiResponse acceptQuote(AcceptQuoteRequest acceptQuo * 200 Cancel limit order - * * - * @see Cancel limit - * order (USER_DATA) Documentation + * @see Cancel + * limit order (TRADE) Documentation */ public ApiResponse cancelLimitOrder( CancelLimitOrderRequest cancelLimitOrderRequest) throws ApiException { @@ -128,13 +133,14 @@ public ApiResponse cancelLimitOrder( } /** - * Get Convert Trade History(USER_DATA) Get Convert Trade History * The max interval between - * startTime and endTime is 30 days. Weight: 3000 + * Get Convert Trade History (USER_DATA) Get Convert Trade History Weight(UID): 3000 Security + * Type: USER_DATA Notes: - The max interval between `startTime` and + * `endTime` is 30 days. * * @param startTime (required) * @param endTime (required) - * @param limit Default 100, Max 1000 (optional) - * @param recvWindow The value cannot be greater than 60000 (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetConvertTradeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -146,8 +152,8 @@ public ApiResponse cancelLimitOrder( * * * @see Get - * Convert Trade History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#get-convert-trade-history">Get + * Convert Trade History (USER_DATA) Documentation */ public ApiResponse getConvertTradeHistory( Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { @@ -155,7 +161,8 @@ public ApiResponse getConvertTradeHistory( } /** - * Order status(USER_DATA) Query order status by order ID. Weight: 100(UID) + * Order status (USER_DATA) Query order status by order ID. Weight(UID): 100 Security Type: + * USER_DATA * * @param orderId Either orderId or quoteId is required (optional) * @param quoteId Either orderId or quoteId is required (optional) @@ -169,8 +176,9 @@ public ApiResponse getConvertTradeHistory( * 200 Order status - * * - * @see Order - * status(USER_DATA) Documentation + * @see Order + * status (USER_DATA) Documentation */ public ApiResponse orderStatus(String orderId, String quoteId) throws ApiException { @@ -178,10 +186,11 @@ public ApiResponse orderStatus(String orderId, String quote } /** - * Place limit order (USER_DATA) Enable users to place a limit order * `baseAsset` or - * `quoteAsset` can be determined via `exchangeInfo` endpoint. * Limit price - * is defined from `baseAsset` to `quoteAsset`. * Either - * `baseAmount` or `quoteAmount` is used. Weight: 500(UID) + * Place limit order (TRADE) Enable users to place a limit order Weight(UID): 500 Security Type: + * TRADE Notes: - `baseAsset` and `quoteAsset` can be determined via the + * `exchangeInfo` endpoint. - Limit price is defined from `baseAsset` to + * `quoteAsset`. - Exactly one of `baseAmount` or `quoteAmount` + * should be sent. * * @param placeLimitOrderRequest (required) * @return ApiResponse<PlaceLimitOrderResponse> @@ -194,8 +203,9 @@ public ApiResponse orderStatus(String orderId, String quote * 200 Place limit order - * * - * @see Place limit - * order (USER_DATA) Documentation + * @see Place + * limit order (TRADE) Documentation */ public ApiResponse placeLimitOrder( PlaceLimitOrderRequest placeLimitOrderRequest) throws ApiException { @@ -203,10 +213,10 @@ public ApiResponse placeLimitOrder( } /** - * Query limit open orders (USER_DATA) Request a quote for the requested token pairs Weight: - * 3000(UID) + * Query limit open orders (USER_DATA) Query current open limit orders Weight(UID): 3000 + * Security Type: USER_DATA * - * @param recvWindow The value cannot be greater than 60000 (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QueryLimitOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -217,8 +227,9 @@ public ApiResponse placeLimitOrder( * 200 limit open orders - * * - * @see Query limit open - * orders (USER_DATA) Documentation + * @see Query + * limit open orders (USER_DATA) Documentation */ public ApiResponse queryLimitOpenOrders(Long recvWindow) throws ApiException { @@ -226,9 +237,9 @@ public ApiResponse queryLimitOpenOrders(Long recvW } /** - * Send Quote Request(USER_DATA) Request a quote for the requested token pairs * Either - * fromAmount or toAmount should be sent * `quoteId` will be returned only if you have - * enough funds to convert Weight: 200(UID) + * Send Quote Request (TRADE) Request a quote for the requested token pairs Weight(UID): 200 + * Security Type: TRADE Notes: - Either `fromAmount` or `toAmount` should be + * sent. - `quoteId` is returned only if you have enough funds to convert. * * @param sendQuoteRequestRequest (required) * @return ApiResponse<SendQuoteRequestResponse> @@ -241,8 +252,9 @@ public ApiResponse queryLimitOpenOrders(Long recvW * 200 Send Quote Request - * * - * @see Send - * Quote Request(USER_DATA) Documentation + * @see Send + * Quote Request (TRADE) Documentation */ public ApiResponse sendQuoteRequest( SendQuoteRequestRequest sendQuoteRequestRequest) throws ApiException { diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/MarketDataApi.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/MarketDataApi.java index ef5f7e166..1169db86a 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/MarketDataApi.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/MarketDataApi.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -43,7 +43,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-convert/2.0.0 (Java/%s; %s; %s)", + "binance-convert/3.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -94,8 +94,9 @@ public void setCustomBaseUrl(String customBaseUrl) { * 200 List All Convert Pairs - * * - * @see List All Convert - * Pairs Documentation + * @see List + * All Convert Pairs Documentation */ private okhttp3.Call listAllConvertPairsCall(String fromAsset, String toAsset) throws ApiException { @@ -194,9 +195,9 @@ private okhttp3.Call listAllConvertPairsValidateBeforeCall(String fromAsset, Str /** * List All Convert Pairs Query for all convertible token pairs and the tokens’ respective - * upper/lower limits * User needs to supply either or both of the input parameter * If not - * defined for both fromAsset and toAsset, only partial token pairs will be returned Weight: - * 3000(IP) + * upper/lower limits Weight(IP): 3000 Notes: - User needs to supply either or both input + * parameters. - If only one of `fromAsset` and `toAsset` is provided, only + * partial token pairs are returned. * * @param fromAsset User spends coin (optional) * @param toAsset User receives coin (optional) @@ -210,8 +211,9 @@ private okhttp3.Call listAllConvertPairsValidateBeforeCall(String fromAsset, Str * 200 List All Convert Pairs - * * - * @see List All Convert - * Pairs Documentation + * @see List + * All Convert Pairs Documentation */ public ApiResponse listAllConvertPairs( String fromAsset, String toAsset) throws ApiException { @@ -224,7 +226,7 @@ public ApiResponse listAllConvertPairs( /** * Build call for queryOrderQuantityPrecisionPerAsset * - * @param recvWindow The value cannot be greater than 60000 (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -235,8 +237,8 @@ public ApiResponse listAllConvertPairs( * * * @see Query - * order quantity precision per asset(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/market-data#query-order-quantity-precision-per-asset">Query + * order quantity precision per asset (USER_DATA) Documentation */ private okhttp3.Call queryOrderQuantityPrecisionPerAssetCall(Long recvWindow) throws ApiException { @@ -331,10 +333,10 @@ private okhttp3.Call queryOrderQuantityPrecisionPerAssetValidateBeforeCall(Long } /** - * Query order quantity precision per asset(USER_DATA) Query for supported asset’s precision - * information Weight: 100(IP) + * Query order quantity precision per asset (USER_DATA) Query for supported asset’s precision + * information Weight(IP): 100 Security Type: USER_DATA * - * @param recvWindow The value cannot be greater than 60000 (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QueryOrderQuantityPrecisionPerAssetResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -346,11 +348,11 @@ private okhttp3.Call queryOrderQuantityPrecisionPerAssetValidateBeforeCall(Long * * * @see Query - * order quantity precision per asset(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/market-data#query-order-quantity-precision-per-asset">Query + * order quantity precision per asset (USER_DATA) Documentation */ public ApiResponse - queryOrderQuantityPrecisionPerAsset(Long recvWindow) throws ApiException { + queryOrderQuantityPrecisionPerAsset(@Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryOrderQuantityPrecisionPerAssetValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/TradeApi.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/TradeApi.java index 3d62d0bd8..25b00c3fe 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/TradeApi.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/TradeApi.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -54,7 +54,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-convert/2.0.0 (Java/%s; %s; %s)", + "binance-convert/3.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -104,8 +104,9 @@ public void setCustomBaseUrl(String customBaseUrl) { * 200 Accept Quote - * * - * @see Accept Quote - * (TRADE) Documentation + * @see Accept + * Quote (TRADE) Documentation */ private okhttp3.Call acceptQuoteCall(AcceptQuoteRequest acceptQuoteRequest) throws ApiException { @@ -203,7 +204,8 @@ private okhttp3.Call acceptQuoteValidateBeforeCall(AcceptQuoteRequest acceptQuot } /** - * Accept Quote (TRADE) Accept the offered quote by quote ID. Weight: 500(UID) + * Accept Quote (TRADE) Accept the offered quote by quote ID. Weight(UID): 500 Security Type: + * TRADE * * @param acceptQuoteRequest (required) * @return ApiResponse<AcceptQuoteResponse> @@ -216,8 +218,9 @@ private okhttp3.Call acceptQuoteValidateBeforeCall(AcceptQuoteRequest acceptQuot * 200 Accept Quote - * * - * @see Accept Quote - * (TRADE) Documentation + * @see Accept + * Quote (TRADE) Documentation */ public ApiResponse acceptQuote( @Valid @NotNull AcceptQuoteRequest acceptQuoteRequest) throws ApiException { @@ -240,8 +243,9 @@ public ApiResponse acceptQuote( * 200 Cancel limit order - * * - * @see Cancel limit - * order (USER_DATA) Documentation + * @see Cancel + * limit order (TRADE) Documentation */ private okhttp3.Call cancelLimitOrderCall(CancelLimitOrderRequest cancelLimitOrderRequest) throws ApiException { @@ -340,7 +344,8 @@ private okhttp3.Call cancelLimitOrderValidateBeforeCall( } /** - * Cancel limit order (USER_DATA) Enable users to cancel a limit order Weight: 200(UID) + * Cancel limit order (TRADE) Enable users to cancel a limit order Weight(UID): 200 Security + * Type: TRADE * * @param cancelLimitOrderRequest (required) * @return ApiResponse<CancelLimitOrderResponse> @@ -353,8 +358,9 @@ private okhttp3.Call cancelLimitOrderValidateBeforeCall( * 200 Cancel limit order - * * - * @see Cancel limit - * order (USER_DATA) Documentation + * @see Cancel + * limit order (TRADE) Documentation */ public ApiResponse cancelLimitOrder( @Valid @NotNull CancelLimitOrderRequest cancelLimitOrderRequest) throws ApiException { @@ -369,8 +375,8 @@ public ApiResponse cancelLimitOrder( * * @param startTime (required) * @param endTime (required) - * @param limit Default 100, Max 1000 (optional) - * @param recvWindow The value cannot be greater than 60000 (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -381,8 +387,8 @@ public ApiResponse cancelLimitOrder( * * * @see Get - * Convert Trade History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#get-convert-trade-history">Get + * Convert Trade History (USER_DATA) Documentation */ private okhttp3.Call getConvertTradeHistoryCall( Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { @@ -495,13 +501,14 @@ private okhttp3.Call getConvertTradeHistoryValidateBeforeCall( } /** - * Get Convert Trade History(USER_DATA) Get Convert Trade History * The max interval between - * startTime and endTime is 30 days. Weight: 3000 + * Get Convert Trade History (USER_DATA) Get Convert Trade History Weight(UID): 3000 Security + * Type: USER_DATA Notes: - The max interval between `startTime` and + * `endTime` is 30 days. * * @param startTime (required) * @param endTime (required) - * @param limit Default 100, Max 1000 (optional) - * @param recvWindow The value cannot be greater than 60000 (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetConvertTradeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -513,11 +520,14 @@ private okhttp3.Call getConvertTradeHistoryValidateBeforeCall( * * * @see Get - * Convert Trade History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#get-convert-trade-history">Get + * Convert Trade History (USER_DATA) Documentation */ public ApiResponse getConvertTradeHistory( - @NotNull Long startTime, @NotNull Long endTime, Long limit, Long recvWindow) + @NotNull Long startTime, + @NotNull Long endTime, + @Max(1000L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getConvertTradeHistoryValidateBeforeCall(startTime, endTime, limit, recvWindow); @@ -540,8 +550,9 @@ public ApiResponse getConvertTradeHistory( * 200 Order status - * * - * @see Order - * status(USER_DATA) Documentation + * @see Order + * status (USER_DATA) Documentation */ private okhttp3.Call orderStatusCall(String orderId, String quoteId) throws ApiException { String basePath = null; @@ -638,7 +649,8 @@ private okhttp3.Call orderStatusValidateBeforeCall(String orderId, String quoteI } /** - * Order status(USER_DATA) Query order status by order ID. Weight: 100(UID) + * Order status (USER_DATA) Query order status by order ID. Weight(UID): 100 Security Type: + * USER_DATA * * @param orderId Either orderId or quoteId is required (optional) * @param quoteId Either orderId or quoteId is required (optional) @@ -652,8 +664,9 @@ private okhttp3.Call orderStatusValidateBeforeCall(String orderId, String quoteI * 200 Order status - * * - * @see Order - * status(USER_DATA) Documentation + * @see Order + * status (USER_DATA) Documentation */ public ApiResponse orderStatus(String orderId, String quoteId) throws ApiException { @@ -676,8 +689,9 @@ public ApiResponse orderStatus(String orderId, String quote * 200 Place limit order - * * - * @see Place limit - * order (USER_DATA) Documentation + * @see Place + * limit order (TRADE) Documentation */ private okhttp3.Call placeLimitOrderCall(PlaceLimitOrderRequest placeLimitOrderRequest) throws ApiException { @@ -811,10 +825,11 @@ private okhttp3.Call placeLimitOrderValidateBeforeCall( } /** - * Place limit order (USER_DATA) Enable users to place a limit order * `baseAsset` or - * `quoteAsset` can be determined via `exchangeInfo` endpoint. * Limit price - * is defined from `baseAsset` to `quoteAsset`. * Either - * `baseAmount` or `quoteAmount` is used. Weight: 500(UID) + * Place limit order (TRADE) Enable users to place a limit order Weight(UID): 500 Security Type: + * TRADE Notes: - `baseAsset` and `quoteAsset` can be determined via the + * `exchangeInfo` endpoint. - Limit price is defined from `baseAsset` to + * `quoteAsset`. - Exactly one of `baseAmount` or `quoteAmount` + * should be sent. * * @param placeLimitOrderRequest (required) * @return ApiResponse<PlaceLimitOrderResponse> @@ -827,8 +842,9 @@ private okhttp3.Call placeLimitOrderValidateBeforeCall( * 200 Place limit order - * * - * @see Place limit - * order (USER_DATA) Documentation + * @see Place + * limit order (TRADE) Documentation */ public ApiResponse placeLimitOrder( @Valid @NotNull PlaceLimitOrderRequest placeLimitOrderRequest) throws ApiException { @@ -841,7 +857,7 @@ public ApiResponse placeLimitOrder( /** * Build call for queryLimitOpenOrders * - * @param recvWindow The value cannot be greater than 60000 (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -851,8 +867,9 @@ public ApiResponse placeLimitOrder( * 200 limit open orders - * * - * @see Query limit open - * orders (USER_DATA) Documentation + * @see Query + * limit open orders (USER_DATA) Documentation */ private okhttp3.Call queryLimitOpenOrdersCall(Long recvWindow) throws ApiException { String basePath = null; @@ -945,10 +962,10 @@ private okhttp3.Call queryLimitOpenOrdersValidateBeforeCall(Long recvWindow) } /** - * Query limit open orders (USER_DATA) Request a quote for the requested token pairs Weight: - * 3000(UID) + * Query limit open orders (USER_DATA) Query current open limit orders Weight(UID): 3000 + * Security Type: USER_DATA * - * @param recvWindow The value cannot be greater than 60000 (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QueryLimitOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -959,11 +976,12 @@ private okhttp3.Call queryLimitOpenOrdersValidateBeforeCall(Long recvWindow) * 200 limit open orders - * * - * @see Query limit open - * orders (USER_DATA) Documentation + * @see Query + * limit open orders (USER_DATA) Documentation */ - public ApiResponse queryLimitOpenOrders(Long recvWindow) - throws ApiException { + public ApiResponse queryLimitOpenOrders( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryLimitOpenOrdersValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -983,8 +1001,9 @@ public ApiResponse queryLimitOpenOrders(Long recvW * 200 Send Quote Request - * * - * @see Send - * Quote Request(USER_DATA) Documentation + * @see Send + * Quote Request (TRADE) Documentation */ private okhttp3.Call sendQuoteRequestCall(SendQuoteRequestRequest sendQuoteRequestRequest) throws ApiException { @@ -1108,9 +1127,9 @@ private okhttp3.Call sendQuoteRequestValidateBeforeCall( } /** - * Send Quote Request(USER_DATA) Request a quote for the requested token pairs * Either - * fromAmount or toAmount should be sent * `quoteId` will be returned only if you have - * enough funds to convert Weight: 200(UID) + * Send Quote Request (TRADE) Request a quote for the requested token pairs Weight(UID): 200 + * Security Type: TRADE Notes: - Either `fromAmount` or `toAmount` should be + * sent. - `quoteId` is returned only if you have enough funds to convert. * * @param sendQuoteRequestRequest (required) * @return ApiResponse<SendQuoteRequestResponse> @@ -1123,8 +1142,9 @@ private okhttp3.Call sendQuoteRequestValidateBeforeCall( * 200 Send Quote Request - * * - * @see Send - * Quote Request(USER_DATA) Documentation + * @see Send + * Quote Request (TRADE) Documentation */ public ApiResponse sendQuoteRequest( @Valid @NotNull SendQuoteRequestRequest sendQuoteRequestRequest) throws ApiException { diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/AcceptQuoteRequest.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/AcceptQuoteRequest.java index be3bf8f7d..f30e6972e 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/AcceptQuoteRequest.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/AcceptQuoteRequest.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AcceptQuoteRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AcceptQuoteRequest { public static final String SERIALIZED_NAME_QUOTE_ID = "quoteId"; @@ -76,11 +76,12 @@ public AcceptQuoteRequest recvWindow(@jakarta.annotation.Nullable Long recvWindo } /** - * Get recvWindow + * Request validity window in milliseconds maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/AcceptQuoteResponse.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/AcceptQuoteResponse.java index 684d8ac44..4df18fa8d 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/AcceptQuoteResponse.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/AcceptQuoteResponse.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AcceptQuoteResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AcceptQuoteResponse { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -100,7 +100,7 @@ public AcceptQuoteResponse orderStatus(@jakarta.annotation.Nullable String order } /** - * Get orderStatus + * Order processing status * * @return orderStatus */ diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/CancelLimitOrderRequest.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/CancelLimitOrderRequest.java index 2dd067fb3..14e97e56e 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/CancelLimitOrderRequest.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/CancelLimitOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,13 +34,13 @@ /** CancelLimitOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelLimitOrderRequest { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @SerializedName(SERIALIZED_NAME_ORDER_ID) @jakarta.annotation.Nonnull - private String orderId; + private Long orderId; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -50,23 +50,23 @@ public class CancelLimitOrderRequest { public CancelLimitOrderRequest() {} - public CancelLimitOrderRequest orderId(@jakarta.annotation.Nonnull String orderId) { + public CancelLimitOrderRequest orderId(@jakarta.annotation.Nonnull Long orderId) { this.orderId = orderId; return this; } /** - * Get orderId + * The orderId from `placeOrder` api * * @return orderId */ @jakarta.annotation.Nonnull @NotNull - public String getOrderId() { + public Long getOrderId() { return orderId; } - public void setOrderId(@jakarta.annotation.Nonnull String orderId) { + public void setOrderId(@jakarta.annotation.Nonnull Long orderId) { this.orderId = orderId; } @@ -76,11 +76,12 @@ public CancelLimitOrderRequest recvWindow(@jakarta.annotation.Nullable Long recv } /** - * Get recvWindow + * Request validity window in milliseconds maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -192,13 +193,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("orderId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `orderId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("orderId").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/CancelLimitOrderResponse.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/CancelLimitOrderResponse.java index d3eb52b5e..0a2295559 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/CancelLimitOrderResponse.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/CancelLimitOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelLimitOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelLimitOrderResponse { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/ExpiredType.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/ExpiredType.java new file mode 100644 index 000000000..21e7ed061 --- /dev/null +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/ExpiredType.java @@ -0,0 +1,77 @@ +/* + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.convert.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Order expiry duration. 1_D, 3_D, 7_D, 30_D (D means day) */ +@JsonAdapter(ExpiredType.Adapter.class) +public enum ExpiredType { + EXPIRED_TYPE_1_D("1_D"), + + EXPIRED_TYPE_3_D("3_D"), + + EXPIRED_TYPE_7_D("7_D"), + + EXPIRED_TYPE_30_D("30_D"); + + private String value; + + ExpiredType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ExpiredType fromValue(String value) { + for (ExpiredType b : ExpiredType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ExpiredType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ExpiredType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ExpiredType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ExpiredType.fromValue(value); + } +} diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/GetConvertTradeHistoryResponse.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/GetConvertTradeHistoryResponse.java index db2263c3c..c467a8218 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/GetConvertTradeHistoryResponse.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/GetConvertTradeHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetConvertTradeHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetConvertTradeHistoryResponse { public static final String SERIALIZED_NAME_LIST = "list"; diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/GetConvertTradeHistoryResponseListInner.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/GetConvertTradeHistoryResponseListInner.java index 64ec5cc1a..5e1012758 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/GetConvertTradeHistoryResponseListInner.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/GetConvertTradeHistoryResponseListInner.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetConvertTradeHistoryResponseListInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetConvertTradeHistoryResponseListInner { public static final String SERIALIZED_NAME_QUOTE_ID = "quoteId"; @@ -145,7 +145,7 @@ public GetConvertTradeHistoryResponseListInner orderStatus( } /** - * Get orderStatus + * Order status * * @return orderStatus */ @@ -165,7 +165,7 @@ public GetConvertTradeHistoryResponseListInner fromAsset( } /** - * Get fromAsset + * Source asset * * @return fromAsset */ @@ -185,7 +185,7 @@ public GetConvertTradeHistoryResponseListInner fromAmount( } /** - * Get fromAmount + * Source amount * * @return fromAmount */ @@ -205,7 +205,7 @@ public GetConvertTradeHistoryResponseListInner toAsset( } /** - * Get toAsset + * Destination asset * * @return toAsset */ @@ -225,7 +225,7 @@ public GetConvertTradeHistoryResponseListInner toAmount( } /** - * Get toAmount + * Destination amount * * @return toAmount */ @@ -245,7 +245,7 @@ public GetConvertTradeHistoryResponseListInner ratio( } /** - * Get ratio + * Price ratio * * @return ratio */ @@ -265,7 +265,7 @@ public GetConvertTradeHistoryResponseListInner inverseRatio( } /** - * Get inverseRatio + * Inverse price ratio * * @return inverseRatio */ diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/ListAllConvertPairsResponse.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/ListAllConvertPairsResponse.java index 2d8bb06ec..a7dc74e71 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/ListAllConvertPairsResponse.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/ListAllConvertPairsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ListAllConvertPairsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ListAllConvertPairsResponse extends ArrayList { public ListAllConvertPairsResponse() {} diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/ListAllConvertPairsResponseInner.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/ListAllConvertPairsResponseInner.java index 9d8b397d4..256ef7dc9 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/ListAllConvertPairsResponseInner.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/ListAllConvertPairsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ListAllConvertPairsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ListAllConvertPairsResponseInner { public static final String SERIALIZED_NAME_FROM_ASSET = "fromAsset"; @@ -180,7 +180,7 @@ public ListAllConvertPairsResponseInner toAssetMaxAmount( } /** - * Get toAssetMaxAmount + * 9E+24 signals that this symbol has a very large upper limit close to infinity * * @return toAssetMaxAmount */ diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/OrderStatusResponse.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/OrderStatusResponse.java index 1d87d1cb8..77a02b0fa 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/OrderStatusResponse.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/OrderStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderStatusResponse { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/PlaceLimitOrderRequest.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/PlaceLimitOrderRequest.java index dba41a8d9..ea03fff3b 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/PlaceLimitOrderRequest.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/PlaceLimitOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** PlaceLimitOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PlaceLimitOrderRequest { public static final String SERIALIZED_NAME_BASE_ASSET = "baseAsset"; @@ -71,19 +71,19 @@ public class PlaceLimitOrderRequest { @SerializedName(SERIALIZED_NAME_SIDE) @jakarta.annotation.Nonnull - private String side; + private Side side; public static final String SERIALIZED_NAME_WALLET_TYPE = "walletType"; @SerializedName(SERIALIZED_NAME_WALLET_TYPE) @jakarta.annotation.Nullable - private String walletType; + private WalletType walletType = WalletType.SPOT; public static final String SERIALIZED_NAME_EXPIRED_TYPE = "expiredType"; @SerializedName(SERIALIZED_NAME_EXPIRED_TYPE) @jakarta.annotation.Nonnull - private String expiredType; + private ExpiredType expiredType; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -99,7 +99,8 @@ public PlaceLimitOrderRequest baseAsset(@jakarta.annotation.Nonnull String baseA } /** - * Get baseAsset + * base asset (use the response `fromIsBase` from `GET + * /sapi/v1/convert/exchangeInfo` api to check which one is baseAsset ) * * @return baseAsset */ @@ -119,7 +120,7 @@ public PlaceLimitOrderRequest quoteAsset(@jakarta.annotation.Nonnull String quot } /** - * Get quoteAsset + * quote asset * * @return quoteAsset */ @@ -139,7 +140,7 @@ public PlaceLimitOrderRequest limitPrice(@jakarta.annotation.Nonnull Double limi } /** - * Get limitPrice + * Symbol limit price (from baseAsset to quoteAsset) * * @return limitPrice */ @@ -160,7 +161,7 @@ public PlaceLimitOrderRequest baseAmount(@jakarta.annotation.Nullable Double bas } /** - * Get baseAmount + * Base asset amount. (One of `baseAmount` or `quoteAmount` is required) * * @return baseAmount */ @@ -180,7 +181,7 @@ public PlaceLimitOrderRequest quoteAmount(@jakarta.annotation.Nullable Double qu } /** - * Get quoteAmount + * Quote asset amount. (One of `baseAmount` or `quoteAmount` is required) * * @return quoteAmount */ @@ -194,7 +195,7 @@ public void setQuoteAmount(@jakarta.annotation.Nullable Double quoteAmount) { this.quoteAmount = quoteAmount; } - public PlaceLimitOrderRequest side(@jakarta.annotation.Nonnull String side) { + public PlaceLimitOrderRequest side(@jakarta.annotation.Nonnull Side side) { this.side = side; return this; } @@ -206,15 +207,16 @@ public PlaceLimitOrderRequest side(@jakarta.annotation.Nonnull String side) { */ @jakarta.annotation.Nonnull @NotNull - public String getSide() { + @Valid + public Side getSide() { return side; } - public void setSide(@jakarta.annotation.Nonnull String side) { + public void setSide(@jakarta.annotation.Nonnull Side side) { this.side = side; } - public PlaceLimitOrderRequest walletType(@jakarta.annotation.Nullable String walletType) { + public PlaceLimitOrderRequest walletType(@jakarta.annotation.Nullable WalletType walletType) { this.walletType = walletType; return this; } @@ -225,15 +227,16 @@ public PlaceLimitOrderRequest walletType(@jakarta.annotation.Nullable String wal * @return walletType */ @jakarta.annotation.Nullable - public String getWalletType() { + @Valid + public WalletType getWalletType() { return walletType; } - public void setWalletType(@jakarta.annotation.Nullable String walletType) { + public void setWalletType(@jakarta.annotation.Nullable WalletType walletType) { this.walletType = walletType; } - public PlaceLimitOrderRequest expiredType(@jakarta.annotation.Nonnull String expiredType) { + public PlaceLimitOrderRequest expiredType(@jakarta.annotation.Nonnull ExpiredType expiredType) { this.expiredType = expiredType; return this; } @@ -245,11 +248,12 @@ public PlaceLimitOrderRequest expiredType(@jakarta.annotation.Nonnull String exp */ @jakarta.annotation.Nonnull @NotNull - public String getExpiredType() { + @Valid + public ExpiredType getExpiredType() { return expiredType; } - public void setExpiredType(@jakarta.annotation.Nonnull String expiredType) { + public void setExpiredType(@jakarta.annotation.Nonnull ExpiredType expiredType) { this.expiredType = expiredType; } @@ -259,11 +263,12 @@ public PlaceLimitOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvW } /** - * Get recvWindow + * Request validity window in milliseconds maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -451,28 +456,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("quoteAsset").toString())); } - if (!jsonObj.get("side").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `side` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("side").toString())); - } - if ((jsonObj.get("walletType") != null && !jsonObj.get("walletType").isJsonNull()) - && !jsonObj.get("walletType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `walletType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("walletType").toString())); - } - if (!jsonObj.get("expiredType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `expiredType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("expiredType").toString())); + // validate the required field `side` + Side.validateJsonElement(jsonObj.get("side")); + // validate the optional field `walletType` + if (jsonObj.get("walletType") != null && !jsonObj.get("walletType").isJsonNull()) { + WalletType.validateJsonElement(jsonObj.get("walletType")); } + // validate the required field `expiredType` + ExpiredType.validateJsonElement(jsonObj.get("expiredType")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/PlaceLimitOrderResponse.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/PlaceLimitOrderResponse.java index 35d1cc1da..6d3fb83bd 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/PlaceLimitOrderResponse.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/PlaceLimitOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PlaceLimitOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PlaceLimitOrderResponse { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/QueryLimitOpenOrdersResponse.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/QueryLimitOpenOrdersResponse.java index f54a22643..94575def1 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/QueryLimitOpenOrdersResponse.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/QueryLimitOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryLimitOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryLimitOpenOrdersResponse { public static final String SERIALIZED_NAME_LIST = "list"; diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/QueryLimitOpenOrdersResponseListInner.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/QueryLimitOpenOrdersResponseListInner.java index a796e9c4d..93863507e 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/QueryLimitOpenOrdersResponseListInner.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/QueryLimitOpenOrdersResponseListInner.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryLimitOpenOrdersResponseListInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryLimitOpenOrdersResponseListInner { public static final String SERIALIZED_NAME_QUOTE_ID = "quoteId"; diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/QueryOrderQuantityPrecisionPerAssetResponse.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/QueryOrderQuantityPrecisionPerAssetResponse.java index d96f92887..162b703c3 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/QueryOrderQuantityPrecisionPerAssetResponse.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/QueryOrderQuantityPrecisionPerAssetResponse.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryOrderQuantityPrecisionPerAssetResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryOrderQuantityPrecisionPerAssetResponse extends ArrayList { public QueryOrderQuantityPrecisionPerAssetResponse() {} diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/QueryOrderQuantityPrecisionPerAssetResponseInner.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/QueryOrderQuantityPrecisionPerAssetResponseInner.java index 8056eca78..810231beb 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/QueryOrderQuantityPrecisionPerAssetResponseInner.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/QueryOrderQuantityPrecisionPerAssetResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryOrderQuantityPrecisionPerAssetResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryOrderQuantityPrecisionPerAssetResponseInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/SendQuoteRequestRequest.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/SendQuoteRequestRequest.java index c19aba03e..a31101aec 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/SendQuoteRequestRequest.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/SendQuoteRequestRequest.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** SendQuoteRequestRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SendQuoteRequestRequest { public static final String SERIALIZED_NAME_FROM_ASSET = "fromAsset"; @@ -65,13 +65,13 @@ public class SendQuoteRequestRequest { @SerializedName(SERIALIZED_NAME_WALLET_TYPE) @jakarta.annotation.Nullable - private String walletType; + private WalletType walletType = WalletType.SPOT; public static final String SERIALIZED_NAME_VALID_TIME = "validTime"; @SerializedName(SERIALIZED_NAME_VALID_TIME) @jakarta.annotation.Nullable - private String validTime; + private ValidTime validTime = ValidTime.VALID_TIME_10s; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -127,7 +127,7 @@ public SendQuoteRequestRequest fromAmount(@jakarta.annotation.Nullable Double fr } /** - * Get fromAmount + * When specified, it is the amount you will be debited after the conversion * * @return fromAmount */ @@ -147,7 +147,7 @@ public SendQuoteRequestRequest toAmount(@jakarta.annotation.Nullable Double toAm } /** - * Get toAmount + * When specified, it is the amount you will be credited after the conversion * * @return toAmount */ @@ -161,7 +161,7 @@ public void setToAmount(@jakarta.annotation.Nullable Double toAmount) { this.toAmount = toAmount; } - public SendQuoteRequestRequest walletType(@jakarta.annotation.Nullable String walletType) { + public SendQuoteRequestRequest walletType(@jakarta.annotation.Nullable WalletType walletType) { this.walletType = walletType; return this; } @@ -172,15 +172,16 @@ public SendQuoteRequestRequest walletType(@jakarta.annotation.Nullable String wa * @return walletType */ @jakarta.annotation.Nullable - public String getWalletType() { + @Valid + public WalletType getWalletType() { return walletType; } - public void setWalletType(@jakarta.annotation.Nullable String walletType) { + public void setWalletType(@jakarta.annotation.Nullable WalletType walletType) { this.walletType = walletType; } - public SendQuoteRequestRequest validTime(@jakarta.annotation.Nullable String validTime) { + public SendQuoteRequestRequest validTime(@jakarta.annotation.Nullable ValidTime validTime) { this.validTime = validTime; return this; } @@ -191,11 +192,12 @@ public SendQuoteRequestRequest validTime(@jakarta.annotation.Nullable String val * @return validTime */ @jakarta.annotation.Nullable - public String getValidTime() { + @Valid + public ValidTime getValidTime() { return validTime; } - public void setValidTime(@jakarta.annotation.Nullable String validTime) { + public void setValidTime(@jakarta.annotation.Nullable ValidTime validTime) { this.validTime = validTime; } @@ -205,11 +207,12 @@ public SendQuoteRequestRequest recvWindow(@jakarta.annotation.Nullable Long recv } /** - * Get recvWindow + * Request validity window in milliseconds maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -372,21 +375,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("toAsset").toString())); } - if ((jsonObj.get("walletType") != null && !jsonObj.get("walletType").isJsonNull()) - && !jsonObj.get("walletType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `walletType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("walletType").toString())); + // validate the optional field `walletType` + if (jsonObj.get("walletType") != null && !jsonObj.get("walletType").isJsonNull()) { + WalletType.validateJsonElement(jsonObj.get("walletType")); } - if ((jsonObj.get("validTime") != null && !jsonObj.get("validTime").isJsonNull()) - && !jsonObj.get("validTime").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `validTime` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("validTime").toString())); + // validate the optional field `validTime` + if (jsonObj.get("validTime") != null && !jsonObj.get("validTime").isJsonNull()) { + ValidTime.validateJsonElement(jsonObj.get("validTime")); } } diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/SendQuoteRequestResponse.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/SendQuoteRequestResponse.java index 8e10ccc35..a0e31e2ee 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/SendQuoteRequestResponse.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/SendQuoteRequestResponse.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SendQuoteRequestResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SendQuoteRequestResponse { public static final String SERIALIZED_NAME_QUOTE_ID = "quoteId"; diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/Side.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/Side.java new file mode 100644 index 000000000..0365af5e1 --- /dev/null +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/Side.java @@ -0,0 +1,72 @@ +/* + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.convert.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** `BUY` or `SELL` */ +@JsonAdapter(Side.Adapter.class) +public enum Side { + BUY("BUY"), + + SELL("SELL"); + + private String value; + + Side(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Side fromValue(String value) { + for (Side b : Side.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Side enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Side read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Side.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Side.fromValue(value); + } +} diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/ValidTime.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/ValidTime.java new file mode 100644 index 000000000..64a33d950 --- /dev/null +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/ValidTime.java @@ -0,0 +1,75 @@ +/* + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.convert.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Quote valid duration. Supported values: 10s, 30s, 1m. Default is 10s. */ +@JsonAdapter(ValidTime.Adapter.class) +public enum ValidTime { + VALID_TIME_10s("10s"), + + VALID_TIME_30s("30s"), + + VALID_TIME_1m("1m"); + + private String value; + + ValidTime(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ValidTime fromValue(String value) { + for (ValidTime b : ValidTime.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ValidTime enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ValidTime read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ValidTime.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ValidTime.fromValue(value); + } +} diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/WalletType.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/WalletType.java new file mode 100644 index 000000000..40331c432 --- /dev/null +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/model/WalletType.java @@ -0,0 +1,88 @@ +/* + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.convert.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** + * Wallet to use for payment. Supported values: `SPOT`, `FUNDING`, + * `EARN`. Combined wallets also supported: `SPOT_FUNDING`, + * `FUNDING_EARN`, `SPOT_FUNDING_EARN`, `SPOT_EARN`. Default is + * `SPOT`. + */ +@JsonAdapter(WalletType.Adapter.class) +public enum WalletType { + SPOT("SPOT"), + + FUNDING("FUNDING"), + + EARN("EARN"), + + SPOT_FUNDING("SPOT_FUNDING"), + + FUNDING_EARN("FUNDING_EARN"), + + SPOT_FUNDING_EARN("SPOT_FUNDING_EARN"), + + SPOT_EARN("SPOT_EARN"); + + private String value; + + WalletType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static WalletType fromValue(String value) { + for (WalletType b : WalletType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final WalletType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public WalletType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return WalletType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + WalletType.fromValue(value); + } +} diff --git a/clients/convert/src/test/java/com/binance/connector/client/convert/rest/api/MarketDataApiTest.java b/clients/convert/src/test/java/com/binance/connector/client/convert/rest/api/MarketDataApiTest.java index 32ff2af80..5c191e382 100644 --- a/clients/convert/src/test/java/com/binance/connector/client/convert/rest/api/MarketDataApiTest.java +++ b/clients/convert/src/test/java/com/binance/connector/client/convert/rest/api/MarketDataApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -26,6 +26,7 @@ import com.binance.connector.client.convert.rest.model.ListAllConvertPairsResponse; import com.binance.connector.client.convert.rest.model.QueryOrderQuantityPrecisionPerAssetResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -79,16 +80,17 @@ public void initApiClient() throws ApiException { /** * List All Convert Pairs * - *

Query for all convertible token pairs and the tokens’ respective upper/lower limits * User - * needs to supply either or both of the input parameter * If not defined for both fromAsset and - * toAsset, only partial token pairs will be returned Weight: 3000(IP) + *

Query for all convertible token pairs and the tokens’ respective upper/lower limits + * Weight(IP): 3000 Notes: - User needs to supply either or both input parameters. - If only one + * of `fromAsset` and `toAsset` is provided, only partial token pairs are + * returned. * * @throws ApiException if the Api call fails */ @Test - public void listAllConvertPairsTest() throws ApiException, CryptoException { - String fromAsset = ""; - String toAsset = ""; + public void listAllConvertPairsTest() throws ApiException, CryptoException, IOException { + String fromAsset = "BTC"; + String toAsset = "USDT"; ApiResponse response = api.listAllConvertPairs(fromAsset, toAsset); @@ -99,19 +101,21 @@ public void listAllConvertPairsTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/convert/exchangeInfo", actualRequest.url().encodedPath()); } /** - * Query order quantity precision per asset(USER_DATA) + * Query order quantity precision per asset (USER_DATA) * - *

Query for supported asset’s precision information Weight: 100(IP) + *

Query for supported asset’s precision information Weight(IP): 100 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryOrderQuantityPrecisionPerAssetTest() throws ApiException, CryptoException { + public void queryOrderQuantityPrecisionPerAssetTest() + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.queryOrderQuantityPrecisionPerAsset(recvWindow); @@ -126,10 +130,12 @@ public void queryOrderQuantityPrecisionPerAssetTest() throws ApiException, Crypt Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/convert/assetInfo", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/convert/assetInfo", actualRequest.url().encodedPath()); } } diff --git a/clients/convert/src/test/java/com/binance/connector/client/convert/rest/api/TradeApiTest.java b/clients/convert/src/test/java/com/binance/connector/client/convert/rest/api/TradeApiTest.java index 94ac43337..859c285d7 100644 --- a/clients/convert/src/test/java/com/binance/connector/client/convert/rest/api/TradeApiTest.java +++ b/clients/convert/src/test/java/com/binance/connector/client/convert/rest/api/TradeApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Convert REST API - * OpenAPI Specification for the Binance Convert REST API + * Convert REST API + * Request quotes and execute cryptocurrency conversions via the Convert REST API. * * The version of the OpenAPI document: 1.0.0 * @@ -27,6 +27,7 @@ import com.binance.connector.client.convert.rest.model.AcceptQuoteResponse; import com.binance.connector.client.convert.rest.model.CancelLimitOrderRequest; import com.binance.connector.client.convert.rest.model.CancelLimitOrderResponse; +import com.binance.connector.client.convert.rest.model.ExpiredType; import com.binance.connector.client.convert.rest.model.GetConvertTradeHistoryResponse; import com.binance.connector.client.convert.rest.model.OrderStatusResponse; import com.binance.connector.client.convert.rest.model.PlaceLimitOrderRequest; @@ -34,7 +35,9 @@ import com.binance.connector.client.convert.rest.model.QueryLimitOpenOrdersResponse; import com.binance.connector.client.convert.rest.model.SendQuoteRequestRequest; import com.binance.connector.client.convert.rest.model.SendQuoteRequestResponse; +import com.binance.connector.client.convert.rest.model.Side; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -88,14 +91,13 @@ public void initApiClient() throws ApiException { /** * Accept Quote (TRADE) * - *

Accept the offered quote by quote ID. Weight: 500(UID) + *

Accept the offered quote by quote ID. Weight(UID): 500 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void acceptQuoteTest() throws ApiException, CryptoException { + public void acceptQuoteTest() throws ApiException, CryptoException, IOException { AcceptQuoteRequest acceptQuoteRequest = new AcceptQuoteRequest(); - acceptQuoteRequest.quoteId("1"); ApiResponse response = api.acceptQuote(acceptQuoteRequest); @@ -111,24 +113,21 @@ public void acceptQuoteTest() throws ApiException, CryptoException { Request actualRequest = captorValue.request(); assertEquals("timestamp=1736393892000quoteId=1", signInputCaptor.getValue()); - assertEquals( - "0624eea4af8a8321e2c84e368ed873d71a9a5c971e629175b93556bd22fc325d", - actualRequest.url().queryParameter("signature")); + assertEquals("0624eea4af8a8321e2c84e368ed873d71a9a5c971e629175b93556bd22fc325d", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/convert/acceptQuote", actualRequest.url().encodedPath()); } /** - * Cancel limit order (USER_DATA) + * Cancel limit order (TRADE) * - *

Enable users to cancel a limit order Weight: 200(UID) + *

Enable users to cancel a limit order Weight(UID): 200 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void cancelLimitOrderTest() throws ApiException, CryptoException { + public void cancelLimitOrderTest() throws ApiException, CryptoException, IOException { CancelLimitOrderRequest cancelLimitOrderRequest = new CancelLimitOrderRequest(); - - cancelLimitOrderRequest.orderId("1"); + cancelLimitOrderRequest.orderId(1603680255057330400L); ApiResponse response = api.cancelLimitOrder(cancelLimitOrderRequest); @@ -143,23 +142,22 @@ public void cancelLimitOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000orderId=1", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000orderId=1603680255057330400", signInputCaptor.getValue()); assertEquals( - "ad8bc32c069fb75b8afba1bc7d8f4dc63cd336877366a3b3bc88918201410d88", - actualRequest.url().queryParameter("signature")); + "83424da7c2b384ef0fb39fe576358ccb7a47a64b02d6ebc41e84c2f76333d777", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/convert/limit/cancelOrder", actualRequest.url().encodedPath()); } /** - * Get Convert Trade History(USER_DATA) + * Get Convert Trade History (USER_DATA) * - *

Get Convert Trade History * The max interval between startTime and endTime is 30 days. - * Weight: 3000 + *

Get Convert Trade History Weight(UID): 3000 Security Type: USER_DATA Notes: - The max + * interval between `startTime` and `endTime` is 30 days. * * @throws ApiException if the Api call fails */ @Test - public void getConvertTradeHistoryTest() throws ApiException, CryptoException { + public void getConvertTradeHistoryTest() throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long limit = 100L; @@ -177,9 +175,7 @@ public void getConvertTradeHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + assertEquals("startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "23689f3330f331d9db9c46c9dc87d2217486442f1746adfdda02c10e3dbde13e", actualRequest.url().queryParameter("signature")); @@ -187,14 +183,14 @@ public void getConvertTradeHistoryTest() throws ApiException, CryptoException { } /** - * Order status(USER_DATA) + * Order status (USER_DATA) * - *

Query order status by order ID. Weight: 100(UID) + *

Query order status by order ID. Weight(UID): 100 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void orderStatusTest() throws ApiException, CryptoException { + public void orderStatusTest() throws ApiException, CryptoException, IOException { String orderId = "1"; String quoteId = "1"; ApiResponse response = api.orderStatus(orderId, quoteId); @@ -210,31 +206,29 @@ public void orderStatusTest() throws ApiException, CryptoException { Request actualRequest = captorValue.request(); assertEquals("orderId=1"eId=1×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "c8ea02b290636497dfc9f4f59d01ea6ceff503bf1955b020615bd7bb133a81c4", - actualRequest.url().queryParameter("signature")); + assertEquals("c8ea02b290636497dfc9f4f59d01ea6ceff503bf1955b020615bd7bb133a81c4", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/convert/orderStatus", actualRequest.url().encodedPath()); } /** - * Place limit order (USER_DATA) + * Place limit order (TRADE) * - *

Enable users to place a limit order * `baseAsset` or `quoteAsset` can - * be determined via `exchangeInfo` endpoint. * Limit price is defined from - * `baseAsset` to `quoteAsset`. * Either `baseAmount` or - * `quoteAmount` is used. Weight: 500(UID) + *

Enable users to place a limit order Weight(UID): 500 Security Type: TRADE Notes: - + * `baseAsset` and `quoteAsset` can be determined via the + * `exchangeInfo` endpoint. - Limit price is defined from `baseAsset` to + * `quoteAsset`. - Exactly one of `baseAmount` or `quoteAmount` + * should be sent. * * @throws ApiException if the Api call fails */ @Test - public void placeLimitOrderTest() throws ApiException, CryptoException { + public void placeLimitOrderTest() throws ApiException, CryptoException, IOException { PlaceLimitOrderRequest placeLimitOrderRequest = new PlaceLimitOrderRequest(); - - placeLimitOrderRequest.baseAsset(""); - placeLimitOrderRequest.quoteAsset(""); + placeLimitOrderRequest.baseAsset("BTC"); + placeLimitOrderRequest.quoteAsset("USDT"); placeLimitOrderRequest.limitPrice(1d); - placeLimitOrderRequest.side("BUY"); - placeLimitOrderRequest.expiredType(""); + placeLimitOrderRequest.side(Side.BUY); + placeLimitOrderRequest.expiredType(ExpiredType.EXPIRED_TYPE_1_D); ApiResponse response = api.placeLimitOrder(placeLimitOrderRequest); @@ -248,26 +242,23 @@ public void placeLimitOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000side=BUY&expiredType=1_D&limitPrice=1&walletType=SPOT&baseAsset=BTC"eAsset=USDT", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000side=BUY&expiredType=&limitPrice=1&baseAsset="eAsset=", - signInputCaptor.getValue()); - assertEquals( - "0b0040dc5224dd86dca84f3c74daab95c4ea74140366237133aac2bf814f1f91", - actualRequest.url().queryParameter("signature")); + "c81e0902397aa66deaa3db6a952fd561a8876e267b910bb198db369ea62e0068", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/convert/limit/placeOrder", actualRequest.url().encodedPath()); } /** * Query limit open orders (USER_DATA) * - *

Request a quote for the requested token pairs Weight: 3000(UID) + *

Query current open limit orders Weight(UID): 3000 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryLimitOpenOrdersTest() throws ApiException, CryptoException { - ApiResponse response = - api.queryLimitOpenOrders(null); + public void queryLimitOpenOrdersTest() throws ApiException, CryptoException, IOException { + Long recvWindow = 5000L; + ApiResponse response = api.queryLimitOpenOrders(recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -279,28 +270,27 @@ public void queryLimitOpenOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000", signInputCaptor.getValue()); + assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/convert/limit/queryOpenOrders", actualRequest.url().encodedPath()); } /** - * Send Quote Request(USER_DATA) + * Send Quote Request (TRADE) * - *

Request a quote for the requested token pairs * Either fromAmount or toAmount should be - * sent * `quoteId` will be returned only if you have enough funds to convert Weight: - * 200(UID) + *

Request a quote for the requested token pairs Weight(UID): 200 Security Type: TRADE Notes: + * - Either `fromAmount` or `toAmount` should be sent. - `quoteId` + * is returned only if you have enough funds to convert. * * @throws ApiException if the Api call fails */ @Test - public void sendQuoteRequestTest() throws ApiException, CryptoException { + public void sendQuoteRequestTest() throws ApiException, CryptoException, IOException { SendQuoteRequestRequest sendQuoteRequestRequest = new SendQuoteRequestRequest(); - - sendQuoteRequestRequest.fromAsset(""); - sendQuoteRequestRequest.toAsset(""); + sendQuoteRequestRequest.fromAsset("BTC"); + sendQuoteRequestRequest.toAsset("USDT"); ApiResponse response = api.sendQuoteRequest(sendQuoteRequestRequest); @@ -315,10 +305,9 @@ public void sendQuoteRequestTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000toAsset=&fromAsset=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000toAsset=USDT&walletType=SPOT&validTime=10s&fromAsset=BTC", signInputCaptor.getValue()); assertEquals( - "b018f458ed01eaa557ea9adbacf293f684bee81ed29da077d1a5e54a264000c3", - actualRequest.url().queryParameter("signature")); + "a87b4d643bd96609d7656c396eff6bae425242c552cf59a60f70cac71b38187c", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/convert/getQuote", actualRequest.url().encodedPath()); } } diff --git a/clients/copy-trading/CHANGELOG.md b/clients/copy-trading/CHANGELOG.md index 3a330d7d4..f4d52b973 100644 --- a/clients/copy-trading/CHANGELOG.md +++ b/clients/copy-trading/CHANGELOG.md @@ -1,10 +1,15 @@ # Changelog +## 2.0.0 - 2026-07-29 + +- Update descriptions and examples. + ## 1.2.2 - 2026-04-30 - Update `binance/common` module to version `2.4.2`.| ## 1.2.1 - 2025-08-07 + - Update `binance/common` module to version `2.0.0`. - Add `Content-Type` header only if there is a body. @@ -21,4 +26,4 @@ ## 1.0.0 - 2025-04-24 -- Initial release \ No newline at end of file +- Initial release diff --git a/clients/copy-trading/docs/FutureCopyTradingApi.md b/clients/copy-trading/docs/FutureCopyTradingApi.md index dcedfbc2e..289891890 100644 --- a/clients/copy-trading/docs/FutureCopyTradingApi.md +++ b/clients/copy-trading/docs/FutureCopyTradingApi.md @@ -4,17 +4,17 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getFuturesLeadTraderStatus**](FutureCopyTradingApi.md#getFuturesLeadTraderStatus) | **GET** /sapi/v1/copyTrading/futures/userStatus | Get Futures Lead Trader Status(TRADE) | -| [**getFuturesLeadTradingSymbolWhitelist**](FutureCopyTradingApi.md#getFuturesLeadTradingSymbolWhitelist) | **GET** /sapi/v1/copyTrading/futures/leadSymbol | Get Futures Lead Trading Symbol Whitelist(USER_DATA) | +| [**getFuturesLeadTraderStatus**](FutureCopyTradingApi.md#getFuturesLeadTraderStatus) | **GET** /sapi/v1/copyTrading/futures/userStatus | Get Futures Lead Trader Status (TRADE) | +| [**getFuturesLeadTradingSymbolWhitelist**](FutureCopyTradingApi.md#getFuturesLeadTradingSymbolWhitelist) | **GET** /sapi/v1/copyTrading/futures/leadSymbol | Get Futures Lead Trading Symbol Whitelist (USER_DATA) | # **getFuturesLeadTraderStatus** > GetFuturesLeadTraderStatusResponse getFuturesLeadTraderStatus(recvWindow) -Get Futures Lead Trader Status(TRADE) +Get Futures Lead Trader Status (TRADE) -Get Futures Lead Trader Status Weight: 20 +Get Futures Lead Trader Status Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -31,7 +31,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FutureCopyTradingApi apiInstance = new FutureCopyTradingApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { GetFuturesLeadTraderStatusResponse result = apiInstance.getFuturesLeadTraderStatus(recvWindow); System.out.println(result); @@ -50,7 +50,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -74,9 +74,9 @@ No authorization required # **getFuturesLeadTradingSymbolWhitelist** > GetFuturesLeadTradingSymbolWhitelistResponse getFuturesLeadTradingSymbolWhitelist(recvWindow) -Get Futures Lead Trading Symbol Whitelist(USER_DATA) +Get Futures Lead Trading Symbol Whitelist (USER_DATA) -Get Futures Lead Trading Symbol Whitelist Weight: 20 +Get Futures Lead Trading Symbol Whitelist Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -93,7 +93,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FutureCopyTradingApi apiInstance = new FutureCopyTradingApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { GetFuturesLeadTradingSymbolWhitelistResponse result = apiInstance.getFuturesLeadTradingSymbolWhitelist(recvWindow); System.out.println(result); @@ -112,7 +112,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type diff --git a/clients/copy-trading/docs/GetFuturesLeadTraderStatusResponse.md b/clients/copy-trading/docs/GetFuturesLeadTraderStatusResponse.md index c6e0a307f..2fc50f06c 100644 --- a/clients/copy-trading/docs/GetFuturesLeadTraderStatusResponse.md +++ b/clients/copy-trading/docs/GetFuturesLeadTraderStatusResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **String** | | [optional] | -|**message** | **String** | | [optional] | +|**code** | **String** | API response code. \"000000\" indicates success. | [optional] | +|**message** | **String** | Response message. | [optional] | |**data** | [**GetFuturesLeadTraderStatusResponseData**](GetFuturesLeadTraderStatusResponseData.md) | | [optional] | -|**success** | **Boolean** | | [optional] | +|**success** | **Boolean** | Whether request is successful | [optional] | diff --git a/clients/copy-trading/docs/GetFuturesLeadTraderStatusResponseData.md b/clients/copy-trading/docs/GetFuturesLeadTraderStatusResponseData.md index ed3db01ca..3e073eeff 100644 --- a/clients/copy-trading/docs/GetFuturesLeadTraderStatusResponseData.md +++ b/clients/copy-trading/docs/GetFuturesLeadTraderStatusResponseData.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**isLeadTrader** | **Boolean** | | [optional] | -|**time** | **Long** | | [optional] | +|**isLeadTrader** | **Boolean** | Whether the user is a futures lead trader | [optional] | +|**time** | **Long** | Server timestamp in milliseconds | [optional] | diff --git a/clients/copy-trading/docs/GetFuturesLeadTradingSymbolWhitelistResponse.md b/clients/copy-trading/docs/GetFuturesLeadTradingSymbolWhitelistResponse.md index 0d513dc1f..88514d912 100644 --- a/clients/copy-trading/docs/GetFuturesLeadTradingSymbolWhitelistResponse.md +++ b/clients/copy-trading/docs/GetFuturesLeadTradingSymbolWhitelistResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **String** | | [optional] | -|**message** | **String** | | [optional] | -|**data** | [**List<GetFuturesLeadTradingSymbolWhitelistResponseDataInner>**](GetFuturesLeadTradingSymbolWhitelistResponseDataInner.md) | | [optional] | +|**code** | **String** | API response code. \"000000\" indicates success. | [optional] | +|**message** | **String** | Response message. | [optional] | +|**data** | [**List<GetFuturesLeadTradingSymbolWhitelistResponseDataInner>**](GetFuturesLeadTradingSymbolWhitelistResponseDataInner.md) | Whitelisted symbols for futures lead trading | [optional] | diff --git a/clients/copy-trading/docs/GetFuturesLeadTradingSymbolWhitelistResponseDataInner.md b/clients/copy-trading/docs/GetFuturesLeadTradingSymbolWhitelistResponseDataInner.md index 1fa612f9e..e5fe4a027 100644 --- a/clients/copy-trading/docs/GetFuturesLeadTradingSymbolWhitelistResponseDataInner.md +++ b/clients/copy-trading/docs/GetFuturesLeadTradingSymbolWhitelistResponseDataInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**baseAsset** | **String** | | [optional] | -|**quoteAsset** | **String** | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**baseAsset** | **String** | Base asset | [optional] | +|**quoteAsset** | **String** | Quote asset | [optional] | diff --git a/clients/copy-trading/docs/rest-api/migration-guide.md b/clients/copy-trading/docs/rest-api/migration-guide.md index fc28fdac4..35e1bc12e 100644 --- a/clients/copy-trading/docs/rest-api/migration-guide.md +++ b/clients/copy-trading/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-copy-trading - 1.2.1 + 2.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-copy-trading - 1.2.1 + 2.0.0 ``` diff --git a/clients/copy-trading/example_rest.md b/clients/copy-trading/example_rest.md index e906a5385..cf298c080 100644 --- a/clients/copy-trading/example_rest.md +++ b/clients/copy-trading/example_rest.md @@ -1,6 +1,6 @@ ## FutureCopyTrading -[GET /sapi/v1/copyTrading/futures/userStatus](https://developers.binance.com/docs/copy_trading/future-copy-trading/Get-Futures-Lead-Trader-Status) - getFuturesLeadTraderStatus - [GetFuturesLeadTraderStatusExample.java:47](/examples/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/futurecopytrading/GetFuturesLeadTraderStatusExample.java#L47) +[GET /sapi/v1/copyTrading/futures/userStatus](https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trader-status) - getFuturesLeadTraderStatus - [GetFuturesLeadTraderStatusExample.java:36](/examples/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/futurecopytrading/GetFuturesLeadTraderStatusExample.java#L36) -[GET /sapi/v1/copyTrading/futures/leadSymbol](https://developers.binance.com/docs/copy_trading/future-copy-trading/Get-Futures-Lead-Trading-Symbol-Whitelist) - getFuturesLeadTradingSymbolWhitelist - [GetFuturesLeadTradingSymbolWhitelistExample.java:47](/examples/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/futurecopytrading/GetFuturesLeadTradingSymbolWhitelistExample.java#L47) +[GET /sapi/v1/copyTrading/futures/leadSymbol](https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trading-symbol-whitelist) - getFuturesLeadTradingSymbolWhitelist - [GetFuturesLeadTradingSymbolWhitelistExample.java:36](/examples/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/futurecopytrading/GetFuturesLeadTradingSymbolWhitelistExample.java#L36) diff --git a/clients/copy-trading/pom.xml b/clients/copy-trading/pom.xml index f58033d6c..a3e3e4776 100644 --- a/clients/copy-trading/pom.xml +++ b/clients/copy-trading/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-copy-trading copy-trading - 1.2.2 + 2.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/JSON.java b/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/JSON.java index fcb25fade..b2e5d86be 100644 --- a/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/JSON.java +++ b/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Copy Trading REST API - * OpenAPI Specification for the Binance Copy Trading REST API + * Copy Trading REST API + * Automate lead trading via the Copy Trading API. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/api/CopyTradingRestApi.java b/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/api/CopyTradingRestApi.java index 333c01ead..b2e0865a7 100644 --- a/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/api/CopyTradingRestApi.java +++ b/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/api/CopyTradingRestApi.java @@ -21,9 +21,10 @@ public CopyTradingRestApi(ApiClient apiClient) { } /** - * Get Futures Lead Trader Status(TRADE) Get Futures Lead Trader Status Weight: 20 + * Get Futures Lead Trader Status (TRADE) Get Futures Lead Trader Status Weight(IP): 1 Security + * Type: TRADE * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFuturesLeadTraderStatusResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -35,8 +36,8 @@ public CopyTradingRestApi(ApiClient apiClient) { * * * @see Get - * Futures Lead Trader Status(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trader-status">Get + * Futures Lead Trader Status (TRADE) Documentation */ public ApiResponse getFuturesLeadTraderStatus( Long recvWindow) throws ApiException { @@ -44,10 +45,10 @@ public ApiResponse getFuturesLeadTraderStatu } /** - * Get Futures Lead Trading Symbol Whitelist(USER_DATA) Get Futures Lead Trading Symbol - * Whitelist Weight: 20 + * Get Futures Lead Trading Symbol Whitelist (USER_DATA) Get Futures Lead Trading Symbol + * Whitelist Weight(IP): 1 Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -59,8 +60,8 @@ public ApiResponse getFuturesLeadTraderStatu * * * @see Get - * Futures Lead Trading Symbol Whitelist(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trading-symbol-whitelist">Get + * Futures Lead Trading Symbol Whitelist (USER_DATA) Documentation */ public ApiResponse getFuturesLeadTradingSymbolWhitelist(Long recvWindow) throws ApiException { diff --git a/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/api/FutureCopyTradingApi.java b/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/api/FutureCopyTradingApi.java index 7c079bc66..57687e67b 100644 --- a/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/api/FutureCopyTradingApi.java +++ b/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/api/FutureCopyTradingApi.java @@ -1,6 +1,6 @@ /* - * Binance Copy Trading REST API - * OpenAPI Specification for the Binance Copy Trading REST API + * Copy Trading REST API + * Automate lead trading via the Copy Trading API. * * The version of the OpenAPI document: 1.0.0 * @@ -43,7 +43,7 @@ public class FutureCopyTradingApi { private static final String USER_AGENT = String.format( - "binance-copy-trading/1.2.1 (Java/%s; %s; %s)", + "binance-copy-trading/2.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -83,7 +83,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for getFuturesLeadTraderStatus * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -94,8 +94,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Get - * Futures Lead Trader Status(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trader-status">Get + * Futures Lead Trader Status (TRADE) Documentation */ private okhttp3.Call getFuturesLeadTraderStatusCall(Long recvWindow) throws ApiException { String basePath = null; @@ -188,9 +188,10 @@ private okhttp3.Call getFuturesLeadTraderStatusValidateBeforeCall(Long recvWindo } /** - * Get Futures Lead Trader Status(TRADE) Get Futures Lead Trader Status Weight: 20 + * Get Futures Lead Trader Status (TRADE) Get Futures Lead Trader Status Weight(IP): 1 Security + * Type: TRADE * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFuturesLeadTraderStatusResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -202,11 +203,11 @@ private okhttp3.Call getFuturesLeadTraderStatusValidateBeforeCall(Long recvWindo * * * @see Get - * Futures Lead Trader Status(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trader-status">Get + * Futures Lead Trader Status (TRADE) Documentation */ public ApiResponse getFuturesLeadTraderStatus( - Long recvWindow) throws ApiException { + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFuturesLeadTraderStatusValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -216,7 +217,7 @@ public ApiResponse getFuturesLeadTraderStatu /** * Build call for getFuturesLeadTradingSymbolWhitelist * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -227,8 +228,8 @@ public ApiResponse getFuturesLeadTraderStatu * * * @see Get - * Futures Lead Trading Symbol Whitelist(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trading-symbol-whitelist">Get + * Futures Lead Trading Symbol Whitelist (USER_DATA) Documentation */ private okhttp3.Call getFuturesLeadTradingSymbolWhitelistCall(Long recvWindow) throws ApiException { @@ -323,10 +324,10 @@ private okhttp3.Call getFuturesLeadTradingSymbolWhitelistValidateBeforeCall(Long } /** - * Get Futures Lead Trading Symbol Whitelist(USER_DATA) Get Futures Lead Trading Symbol - * Whitelist Weight: 20 + * Get Futures Lead Trading Symbol Whitelist (USER_DATA) Get Futures Lead Trading Symbol + * Whitelist Weight(IP): 1 Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -338,11 +339,11 @@ private okhttp3.Call getFuturesLeadTradingSymbolWhitelistValidateBeforeCall(Long * * * @see Get - * Futures Lead Trading Symbol Whitelist(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trading-symbol-whitelist">Get + * Futures Lead Trading Symbol Whitelist (USER_DATA) Documentation */ public ApiResponse - getFuturesLeadTradingSymbolWhitelist(Long recvWindow) throws ApiException { + getFuturesLeadTradingSymbolWhitelist(@Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFuturesLeadTradingSymbolWhitelistValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = diff --git a/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/model/GetFuturesLeadTraderStatusResponse.java b/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/model/GetFuturesLeadTraderStatusResponse.java index 73d0d680b..3f3de92cf 100644 --- a/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/model/GetFuturesLeadTraderStatusResponse.java +++ b/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/model/GetFuturesLeadTraderStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Copy Trading REST API - * OpenAPI Specification for the Binance Copy Trading REST API + * Copy Trading REST API + * Automate lead trading via the Copy Trading API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetFuturesLeadTraderStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFuturesLeadTraderStatusResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -69,7 +69,7 @@ public GetFuturesLeadTraderStatusResponse code(@jakarta.annotation.Nullable Stri } /** - * Get code + * API response code. \"000000\" indicates success. * * @return code */ @@ -88,7 +88,7 @@ public GetFuturesLeadTraderStatusResponse message(@jakarta.annotation.Nullable S } /** - * Get message + * Response message. * * @return message */ @@ -129,7 +129,7 @@ public GetFuturesLeadTraderStatusResponse success( } /** - * Get success + * Whether request is successful * * @return success */ diff --git a/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/model/GetFuturesLeadTraderStatusResponseData.java b/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/model/GetFuturesLeadTraderStatusResponseData.java index 984dfe0ae..08ad7634b 100644 --- a/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/model/GetFuturesLeadTraderStatusResponseData.java +++ b/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/model/GetFuturesLeadTraderStatusResponseData.java @@ -1,6 +1,6 @@ /* - * Binance Copy Trading REST API - * OpenAPI Specification for the Binance Copy Trading REST API + * Copy Trading REST API + * Automate lead trading via the Copy Trading API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFuturesLeadTraderStatusResponseData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFuturesLeadTraderStatusResponseData { public static final String SERIALIZED_NAME_IS_LEAD_TRADER = "isLeadTrader"; @@ -57,7 +57,7 @@ public GetFuturesLeadTraderStatusResponseData isLeadTrader( } /** - * Get isLeadTrader + * Whether the user is a futures lead trader * * @return isLeadTrader */ @@ -76,7 +76,7 @@ public GetFuturesLeadTraderStatusResponseData time(@jakarta.annotation.Nullable } /** - * Get time + * Server timestamp in milliseconds * * @return time */ diff --git a/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/model/GetFuturesLeadTradingSymbolWhitelistResponse.java b/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/model/GetFuturesLeadTradingSymbolWhitelistResponse.java index 25df6b6be..df8961cb1 100644 --- a/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/model/GetFuturesLeadTradingSymbolWhitelistResponse.java +++ b/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/model/GetFuturesLeadTradingSymbolWhitelistResponse.java @@ -1,6 +1,6 @@ /* - * Binance Copy Trading REST API - * OpenAPI Specification for the Binance Copy Trading REST API + * Copy Trading REST API + * Automate lead trading via the Copy Trading API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetFuturesLeadTradingSymbolWhitelistResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFuturesLeadTradingSymbolWhitelistResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -69,7 +69,7 @@ public GetFuturesLeadTradingSymbolWhitelistResponse code( } /** - * Get code + * API response code. \"000000\" indicates success. * * @return code */ @@ -89,7 +89,7 @@ public GetFuturesLeadTradingSymbolWhitelistResponse message( } /** - * Get message + * Response message. * * @return message */ @@ -119,7 +119,7 @@ public GetFuturesLeadTradingSymbolWhitelistResponse addDataItem( } /** - * Get data + * Whitelisted symbols for futures lead trading * * @return data */ diff --git a/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/model/GetFuturesLeadTradingSymbolWhitelistResponseDataInner.java b/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/model/GetFuturesLeadTradingSymbolWhitelistResponseDataInner.java index fce8a3075..06da22114 100644 --- a/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/model/GetFuturesLeadTradingSymbolWhitelistResponseDataInner.java +++ b/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/model/GetFuturesLeadTradingSymbolWhitelistResponseDataInner.java @@ -1,6 +1,6 @@ /* - * Binance Copy Trading REST API - * OpenAPI Specification for the Binance Copy Trading REST API + * Copy Trading REST API + * Automate lead trading via the Copy Trading API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFuturesLeadTradingSymbolWhitelistResponseDataInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFuturesLeadTradingSymbolWhitelistResponseDataInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public GetFuturesLeadTradingSymbolWhitelistResponseDataInner symbol( } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -83,7 +83,7 @@ public GetFuturesLeadTradingSymbolWhitelistResponseDataInner baseAsset( } /** - * Get baseAsset + * Base asset * * @return baseAsset */ @@ -103,7 +103,7 @@ public GetFuturesLeadTradingSymbolWhitelistResponseDataInner quoteAsset( } /** - * Get quoteAsset + * Quote asset * * @return quoteAsset */ diff --git a/clients/copy-trading/src/test/java/com/binance/connector/client/copy_trading/rest/api/FutureCopyTradingApiTest.java b/clients/copy-trading/src/test/java/com/binance/connector/client/copy_trading/rest/api/FutureCopyTradingApiTest.java index 545d22b57..87b81c155 100644 --- a/clients/copy-trading/src/test/java/com/binance/connector/client/copy_trading/rest/api/FutureCopyTradingApiTest.java +++ b/clients/copy-trading/src/test/java/com/binance/connector/client/copy_trading/rest/api/FutureCopyTradingApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Copy Trading REST API - * OpenAPI Specification for the Binance Copy Trading REST API + * Copy Trading REST API + * Automate lead trading via the Copy Trading API. * * The version of the OpenAPI document: 1.0.0 * @@ -26,6 +26,7 @@ import com.binance.connector.client.copy_trading.rest.model.GetFuturesLeadTraderStatusResponse; import com.binance.connector.client.copy_trading.rest.model.GetFuturesLeadTradingSymbolWhitelistResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -77,14 +78,14 @@ public void initApiClient() throws ApiException { } /** - * Get Futures Lead Trader Status(TRADE) + * Get Futures Lead Trader Status (TRADE) * - *

Get Futures Lead Trader Status Weight: 20 + *

Get Futures Lead Trader Status Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void getFuturesLeadTraderStatusTest() throws ApiException, CryptoException { + public void getFuturesLeadTraderStatusTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getFuturesLeadTraderStatus(recvWindow); @@ -107,14 +108,15 @@ public void getFuturesLeadTraderStatusTest() throws ApiException, CryptoExceptio } /** - * Get Futures Lead Trading Symbol Whitelist(USER_DATA) + * Get Futures Lead Trading Symbol Whitelist (USER_DATA) * - *

Get Futures Lead Trading Symbol Whitelist Weight: 20 + *

Get Futures Lead Trading Symbol Whitelist Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getFuturesLeadTradingSymbolWhitelistTest() throws ApiException, CryptoException { + public void getFuturesLeadTradingSymbolWhitelistTest() + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getFuturesLeadTradingSymbolWhitelist(recvWindow); @@ -129,10 +131,12 @@ public void getFuturesLeadTradingSymbolWhitelistTest() throws ApiException, Cryp Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/copyTrading/futures/leadSymbol", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/copyTrading/futures/leadSymbol", actualRequest.url().encodedPath()); } } diff --git a/clients/crypto-loan/CHANGELOG.md b/clients/crypto-loan/CHANGELOG.md index cd0a584bc..35318bc48 100644 --- a/clients/crypto-loan/CHANGELOG.md +++ b/clients/crypto-loan/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## 5.0.0 - 2026-07-29 + +### Changed (3) + +- Modified parameter `direction`: + - enum added: `ADDITIONAL`, `REDUCED` + - affected methods: + - `flexibleLoanAdjustLtv()` (`POST /sapi/v2/loan/flexible/adjust/ltv`) +- Modified parameter `repaymentType`: + - enum added: `1`, `2` + - affected methods: + - `flexibleLoanRepay()` (`POST /sapi/v2/loan/flexible/repay`) +- Modified parameter `type`: + - enum added: `borrowIn`, `collateralSpent`, `repayAmount`, `collateralReturn`, `addCollateral`, `removeCollateral`, `collateralReturnAfterLiquidation` + - affected methods: + - `getCryptoLoansIncomeHistory()` (`GET /sapi/v1/loan/income`) + +### Removed (1) + +- `checkCollateralRepayRateStableRate()` (`GET /sapi/v1/loan/repay/collateral/rate`) + ## 4.0.1 - 2026-04-30 - Update `binance/common` module to version `2.4.2`. diff --git a/clients/crypto-loan/docs/CheckCollateralRepayRateStableRateResponse.md b/clients/crypto-loan/docs/CheckCollateralRepayRateStableRateResponse.md deleted file mode 100644 index 4da91617e..000000000 --- a/clients/crypto-loan/docs/CheckCollateralRepayRateStableRateResponse.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# CheckCollateralRepayRateStableRateResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loanlCoin** | **String** | | [optional] | -|**collateralCoin** | **String** | | [optional] | -|**repayAmount** | **String** | | [optional] | -|**rate** | **String** | | [optional] | - - - diff --git a/clients/crypto-loan/docs/Direction.md b/clients/crypto-loan/docs/Direction.md new file mode 100644 index 000000000..de522bd86 --- /dev/null +++ b/clients/crypto-loan/docs/Direction.md @@ -0,0 +1,13 @@ + + +# Direction + +## Enum + + +* `ADDITIONAL` (value: `"ADDITIONAL"`) + +* `REDUCED` (value: `"REDUCED"`) + + + diff --git a/clients/crypto-loan/docs/FlexibleLoanAdjustLTVRequest.md b/clients/crypto-loan/docs/FlexibleLoanAdjustLTVRequest.md new file mode 100644 index 000000000..83d3b5dde --- /dev/null +++ b/clients/crypto-loan/docs/FlexibleLoanAdjustLTVRequest.md @@ -0,0 +1,17 @@ + + +# FlexibleLoanAdjustLtvRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**loanCoin** | **String** | | | +|**collateralCoin** | **String** | | | +|**adjustmentAmount** | **Double** | | | +|**direction** | **Direction** | | | +|**recvWindow** | **Long** | Request validity window in milliseconds | [optional] | + + + diff --git a/clients/crypto-loan/docs/FlexibleLoanAdjustLTVResponse.md b/clients/crypto-loan/docs/FlexibleLoanAdjustLTVResponse.md new file mode 100644 index 000000000..f6f4e8207 --- /dev/null +++ b/clients/crypto-loan/docs/FlexibleLoanAdjustLTVResponse.md @@ -0,0 +1,18 @@ + + +# FlexibleLoanAdjustLtvResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**loanCoin** | **String** | | [optional] | +|**collateralCoin** | **String** | | [optional] | +|**direction** | **String** | | [optional] | +|**adjustmentAmount** | **String** | | [optional] | +|**currentLTV** | **String** | | [optional] | +|**status** | **String** | Succeeds, Failed, Processing | [optional] | + + + diff --git a/clients/crypto-loan/docs/FlexibleLoanAdjustLtvRequest.md b/clients/crypto-loan/docs/FlexibleLoanAdjustLtvRequest.md deleted file mode 100644 index 6a348e13c..000000000 --- a/clients/crypto-loan/docs/FlexibleLoanAdjustLtvRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# FlexibleLoanAdjustLtvRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loanCoin** | **String** | | | -|**collateralCoin** | **String** | | | -|**adjustmentAmount** | **Double** | | | -|**direction** | **String** | | | -|**recvWindow** | **Long** | | [optional] | - - - diff --git a/clients/crypto-loan/docs/FlexibleLoanAdjustLtvResponse.md b/clients/crypto-loan/docs/FlexibleLoanAdjustLtvResponse.md deleted file mode 100644 index 266f30a78..000000000 --- a/clients/crypto-loan/docs/FlexibleLoanAdjustLtvResponse.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# FlexibleLoanAdjustLtvResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loanCoin** | **String** | | [optional] | -|**collateralCoin** | **String** | | [optional] | -|**direction** | **String** | | [optional] | -|**adjustmentAmount** | **String** | | [optional] | -|**currentLTV** | **String** | | [optional] | -|**status** | **String** | | [optional] | - - - diff --git a/clients/crypto-loan/docs/FlexibleLoanBorrowRequest.md b/clients/crypto-loan/docs/FlexibleLoanBorrowRequest.md index bae1abc8b..df3c8a27a 100644 --- a/clients/crypto-loan/docs/FlexibleLoanBorrowRequest.md +++ b/clients/crypto-loan/docs/FlexibleLoanBorrowRequest.md @@ -8,10 +8,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**loanCoin** | **String** | | | -|**loanAmount** | **Double** | | [optional] | +|**loanAmount** | **Double** | Mandatory when collateralAmount is empty | [optional] | |**collateralCoin** | **String** | | | -|**collateralAmount** | **Double** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**collateralAmount** | **Double** | Mandatory when loanAmount is empty | [optional] | +|**recvWindow** | **Long** | Request validity window in milliseconds | [optional] | diff --git a/clients/crypto-loan/docs/FlexibleLoanRepayRequest.md b/clients/crypto-loan/docs/FlexibleLoanRepayRequest.md index fb4db08ae..7a46bf9cd 100644 --- a/clients/crypto-loan/docs/FlexibleLoanRepayRequest.md +++ b/clients/crypto-loan/docs/FlexibleLoanRepayRequest.md @@ -10,10 +10,10 @@ |**loanCoin** | **String** | | | |**collateralCoin** | **String** | | | |**repayAmount** | **Double** | | | -|**collateralReturn** | **Boolean** | | [optional] | -|**fullRepayment** | **Boolean** | | [optional] | -|**repaymentType** | **Long** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**collateralReturn** | **Boolean** | TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order and lower LTV. | [optional] | +|**fullRepayment** | **Boolean** | TRUE: Full repayment; FALSE: Partial repayment based on loan amount | [optional] | +|**repaymentType** | **RepaymentType** | | [optional] | +|**recvWindow** | **Long** | Request validity window in milliseconds | [optional] | diff --git a/clients/crypto-loan/docs/FlexibleLoanRepayResponse.md b/clients/crypto-loan/docs/FlexibleLoanRepayResponse.md index cb4b769bd..36a9ac25d 100644 --- a/clients/crypto-loan/docs/FlexibleLoanRepayResponse.md +++ b/clients/crypto-loan/docs/FlexibleLoanRepayResponse.md @@ -13,7 +13,7 @@ |**remainingCollateral** | **String** | | [optional] | |**fullRepayment** | **Boolean** | | [optional] | |**currentLTV** | **String** | | [optional] | -|**repayStatus** | **String** | | [optional] | +|**repayStatus** | **String** | REPAID, REPAYING, FAILED | [optional] | diff --git a/clients/crypto-loan/docs/FlexibleRateApi.md b/clients/crypto-loan/docs/FlexibleRateApi.md index 920eb31c1..215f0d27a 100644 --- a/clients/crypto-loan/docs/FlexibleRateApi.md +++ b/clients/crypto-loan/docs/FlexibleRateApi.md @@ -4,27 +4,27 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**checkCollateralRepayRate**](FlexibleRateApi.md#checkCollateralRepayRate) | **GET** /sapi/v2/loan/flexible/repay/rate | Check Collateral Repay Rate (USER_DATA) | -| [**flexibleLoanAdjustLtv**](FlexibleRateApi.md#flexibleLoanAdjustLtv) | **POST** /sapi/v2/loan/flexible/adjust/ltv | Flexible Loan Adjust LTV(TRADE) | -| [**flexibleLoanBorrow**](FlexibleRateApi.md#flexibleLoanBorrow) | **POST** /sapi/v2/loan/flexible/borrow | Flexible Loan Borrow(TRADE) | -| [**flexibleLoanRepay**](FlexibleRateApi.md#flexibleLoanRepay) | **POST** /sapi/v2/loan/flexible/repay | Flexible Loan Repay(TRADE) | -| [**getFlexibleLoanAssetsData**](FlexibleRateApi.md#getFlexibleLoanAssetsData) | **GET** /sapi/v2/loan/flexible/loanable/data | Get Flexible Loan Assets Data(USER_DATA) | -| [**getFlexibleLoanBorrowHistory**](FlexibleRateApi.md#getFlexibleLoanBorrowHistory) | **GET** /sapi/v2/loan/flexible/borrow/history | Get Flexible Loan Borrow History(USER_DATA) | -| [**getFlexibleLoanCollateralAssetsData**](FlexibleRateApi.md#getFlexibleLoanCollateralAssetsData) | **GET** /sapi/v2/loan/flexible/collateral/data | Get Flexible Loan Collateral Assets Data(USER_DATA) | +| [**checkCollateralRepayRate**](FlexibleRateApi.md#checkCollateralRepayRate) | **GET** /sapi/v2/loan/flexible/repay/rate | Check Collateral Flexible Repay Rate (USER_DATA) | +| [**flexibleLoanAdjustLtv**](FlexibleRateApi.md#flexibleLoanAdjustLtv) | **POST** /sapi/v2/loan/flexible/adjust/ltv | Flexible Loan Adjust LTV (TRADE) | +| [**flexibleLoanBorrow**](FlexibleRateApi.md#flexibleLoanBorrow) | **POST** /sapi/v2/loan/flexible/borrow | Flexible Loan Borrow (TRADE) | +| [**flexibleLoanRepay**](FlexibleRateApi.md#flexibleLoanRepay) | **POST** /sapi/v2/loan/flexible/repay | Flexible Loan Repay (TRADE) | +| [**getFlexibleLoanAssetsData**](FlexibleRateApi.md#getFlexibleLoanAssetsData) | **GET** /sapi/v2/loan/flexible/loanable/data | Get Flexible Loan Assets Data (USER_DATA) | +| [**getFlexibleLoanBorrowHistory**](FlexibleRateApi.md#getFlexibleLoanBorrowHistory) | **GET** /sapi/v2/loan/flexible/borrow/history | Get Flexible Loan Borrow History (USER_DATA) | +| [**getFlexibleLoanCollateralAssetsData**](FlexibleRateApi.md#getFlexibleLoanCollateralAssetsData) | **GET** /sapi/v2/loan/flexible/collateral/data | Get Flexible Loan Collateral Assets Data (USER_DATA) | | [**getFlexibleLoanInterestRateHistory**](FlexibleRateApi.md#getFlexibleLoanInterestRateHistory) | **GET** /sapi/v2/loan/interestRateHistory | Get Flexible Loan Interest Rate History (USER_DATA) | | [**getFlexibleLoanLiquidationHistory**](FlexibleRateApi.md#getFlexibleLoanLiquidationHistory) | **GET** /sapi/v2/loan/flexible/liquidation/history | Get Flexible Loan Liquidation History (USER_DATA) | -| [**getFlexibleLoanLtvAdjustmentHistory**](FlexibleRateApi.md#getFlexibleLoanLtvAdjustmentHistory) | **GET** /sapi/v2/loan/flexible/ltv/adjustment/history | Get Flexible Loan LTV Adjustment History(USER_DATA) | -| [**getFlexibleLoanOngoingOrders**](FlexibleRateApi.md#getFlexibleLoanOngoingOrders) | **GET** /sapi/v2/loan/flexible/ongoing/orders | Get Flexible Loan Ongoing Orders(USER_DATA) | -| [**getFlexibleLoanRepaymentHistory**](FlexibleRateApi.md#getFlexibleLoanRepaymentHistory) | **GET** /sapi/v2/loan/flexible/repay/history | Get Flexible Loan Repayment History(USER_DATA) | +| [**getFlexibleLoanLtvAdjustmentHistory**](FlexibleRateApi.md#getFlexibleLoanLtvAdjustmentHistory) | **GET** /sapi/v2/loan/flexible/ltv/adjustment/history | Get Flexible Loan LTV Adjustment History (USER_DATA) | +| [**getFlexibleLoanOngoingOrders**](FlexibleRateApi.md#getFlexibleLoanOngoingOrders) | **GET** /sapi/v2/loan/flexible/ongoing/orders | Get Flexible Loan Ongoing Orders (USER_DATA) | +| [**getFlexibleLoanRepaymentHistory**](FlexibleRateApi.md#getFlexibleLoanRepaymentHistory) | **GET** /sapi/v2/loan/flexible/repay/history | Get Flexible Loan Repayment History (USER_DATA) | # **checkCollateralRepayRate** > CheckCollateralRepayRateResponse checkCollateralRepayRate(loanCoin, collateralCoin, recvWindow) -Check Collateral Repay Rate (USER_DATA) +Check Collateral Flexible Repay Rate (USER_DATA) - Weight: 6000 +Get the latest rate of collateral coin/loan coin when using collateral repay. Weight(IP): 6000 Security Type: USER_DATA ### Example ```java @@ -41,9 +41,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleRateApi apiInstance = new FlexibleRateApi(defaultClient); - String loanCoin = "loanCoin_example"; // String | - String collateralCoin = "collateralCoin_example"; // String | - Long recvWindow = 56L; // Long | + String loanCoin = "BUSD"; // String | + String collateralCoin = "BNB"; // String | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { CheckCollateralRepayRateResponse result = apiInstance.checkCollateralRepayRate(loanCoin, collateralCoin, recvWindow); System.out.println(result); @@ -64,7 +64,7 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **loanCoin** | **String**| | | | **collateralCoin** | **String**| | | -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -88,9 +88,9 @@ No authorization required # **flexibleLoanAdjustLtv** > FlexibleLoanAdjustLtvResponse flexibleLoanAdjustLtv(flexibleLoanAdjustLtvRequest) -Flexible Loan Adjust LTV(TRADE) +Flexible Loan Adjust LTV (TRADE) -Flexible Loan Adjust LTV * API Key needs Spot & Margin Trading permission for this endpoint Weight: 6000 +Flexible Loan Adjust LTV Weight(UID): 6000 Security Type: TRADE Notes: - API key needs Spot & Margin Trading permission for this endpoint. ### Example ```java @@ -150,9 +150,9 @@ No authorization required # **flexibleLoanBorrow** > FlexibleLoanBorrowResponse flexibleLoanBorrow(flexibleLoanBorrowRequest) -Flexible Loan Borrow(TRADE) +Flexible Loan Borrow (TRADE) -Borrow Flexible Loan * Only available for master account * You can customize LTV by entering loanAmount and collateralAmount. Weight: 6000 +Borrow Flexible Loan Weight(IP): 6000 Security Type: TRADE Notes: - This endpoint is available for both master and sub-accounts. - You can customize LTV by entering `loanAmount` and `collateralAmount`. ### Example ```java @@ -212,9 +212,9 @@ No authorization required # **flexibleLoanRepay** > FlexibleLoanRepayResponse flexibleLoanRepay(flexibleLoanRepayRequest) -Flexible Loan Repay(TRADE) +Flexible Loan Repay (TRADE) -Flexible Loan Repay * repayAmount is mandatory even fullRepayment = FALSE Weight: 6000 +Flexible Loan Repay Weight(IP): 6000 Security Type: TRADE Notes: - `repayAmount` is mandatory even when `fullRepayment = FALSE`. ### Example ```java @@ -274,9 +274,9 @@ No authorization required # **getFlexibleLoanAssetsData** > GetFlexibleLoanAssetsDataResponse getFlexibleLoanAssetsData(loanCoin, recvWindow) -Get Flexible Loan Assets Data(USER_DATA) +Get Flexible Loan Assets Data (USER_DATA) -Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value. Weight: 400 +Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 Security Type: USER_DATA ### Example ```java @@ -293,8 +293,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleRateApi apiInstance = new FlexibleRateApi(defaultClient); - String loanCoin = "loanCoin_example"; // String | - Long recvWindow = 56L; // Long | + String loanCoin = "BUSD"; // String | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { GetFlexibleLoanAssetsDataResponse result = apiInstance.getFlexibleLoanAssetsData(loanCoin, recvWindow); System.out.println(result); @@ -314,7 +314,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **loanCoin** | **String**| | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -338,9 +338,9 @@ No authorization required # **getFlexibleLoanBorrowHistory** > GetFlexibleLoanBorrowHistoryResponse getFlexibleLoanBorrowHistory(loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) -Get Flexible Loan Borrow History(USER_DATA) +Get Flexible Loan Borrow History (USER_DATA) -Get Flexible Loan Borrow History * If startTime and endTime are not sent, the recent 90-day data will be returned. * The max interval between startTime and endTime is 180 days. Weight: 400 +Get Flexible Loan Borrow History. It can be used to check history before 2024-02-27 08:00. Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and `endTime` are not sent, the recent 90-day data is returned. - The max interval between `startTime` and `endTime` is 180 days. ### Example ```java @@ -357,13 +357,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleRateApi apiInstance = new FlexibleRateApi(defaultClient); - String loanCoin = "loanCoin_example"; // String | - String collateralCoin = "collateralCoin_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Current querying page. Start from 1; default: 1; max: 1000 - Long limit = 56L; // Long | Default: 10; max: 100 - Long recvWindow = 56L; // Long | + String loanCoin = "BUSD"; // String | + String collateralCoin = "BNB"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Current querying page + Long limit = 10L; // Long | Number of records to return + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { GetFlexibleLoanBorrowHistoryResponse result = apiInstance.getFlexibleLoanBorrowHistory(loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow); System.out.println(result); @@ -386,9 +386,9 @@ public class Example { | **collateralCoin** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Current querying page. Start from 1; default: 1; max: 1000 | [optional] | -| **limit** | **Long**| Default: 10; max: 100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Current querying page | [optional] | +| **limit** | **Long**| Number of records to return | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -412,9 +412,9 @@ No authorization required # **getFlexibleLoanCollateralAssetsData** > GetFlexibleLoanCollateralAssetsDataResponse getFlexibleLoanCollateralAssetsData(collateralCoin, recvWindow) -Get Flexible Loan Collateral Assets Data(USER_DATA) +Get Flexible Loan Collateral Assets Data (USER_DATA) -Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value. Weight: 400 +Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value. Weight(IP): 400 Security Type: USER_DATA ### Example ```java @@ -431,8 +431,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleRateApi apiInstance = new FlexibleRateApi(defaultClient); - String collateralCoin = "collateralCoin_example"; // String | - Long recvWindow = 56L; // Long | + String collateralCoin = "BNB"; // String | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { GetFlexibleLoanCollateralAssetsDataResponse result = apiInstance.getFlexibleLoanCollateralAssetsData(collateralCoin, recvWindow); System.out.println(result); @@ -452,7 +452,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **collateralCoin** | **String**| | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -478,7 +478,7 @@ No authorization required Get Flexible Loan Interest Rate History (USER_DATA) -Check Flexible Loan interest rate history * If startTime and endTime are not sent, the recent 90-day data will be returned * The max interval between startTime and endTime is 90 days. * Time based on UTC+0. Weight: 400 +Check Flexible Loan interest rate history Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and `endTime` are not sent, the recent 90-day data is returned. - The max interval between `startTime` and `endTime` is 90 days. - Time is based on UTC+0. ### Example ```java @@ -495,12 +495,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleRateApi apiInstance = new FlexibleRateApi(defaultClient); - String coin = "coin_example"; // String | - Long recvWindow = 56L; // Long | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Current querying page. Start from 1; default: 1; max: 1000 - Long limit = 56L; // Long | Default: 10; max: 100 + String coin = "USDT"; // String | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Current querying page + Long limit = 10L; // Long | Number of records to return try { GetFlexibleLoanInterestRateHistoryResponse result = apiInstance.getFlexibleLoanInterestRateHistory(coin, recvWindow, startTime, endTime, current, limit); System.out.println(result); @@ -520,11 +520,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **coin** | **String**| | | -| **recvWindow** | **Long**| | | +| **recvWindow** | **Long**| Request validity window in milliseconds | | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Current querying page. Start from 1; default: 1; max: 1000 | [optional] | -| **limit** | **Long**| Default: 10; max: 100 | [optional] | +| **current** | **Long**| Current querying page | [optional] | +| **limit** | **Long**| Number of records to return | [optional] | ### Return type @@ -550,7 +550,7 @@ No authorization required Get Flexible Loan Liquidation History (USER_DATA) - Weight: 400 +Get Flexible Loan Liquidation History Weight(IP): 400 Security Type: USER_DATA ### Example ```java @@ -567,13 +567,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleRateApi apiInstance = new FlexibleRateApi(defaultClient); - String loanCoin = "loanCoin_example"; // String | - String collateralCoin = "collateralCoin_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Current querying page. Start from 1; default: 1; max: 1000 - Long limit = 56L; // Long | Default: 10; max: 100 - Long recvWindow = 56L; // Long | + String loanCoin = "BUSD"; // String | + String collateralCoin = "BNB"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Current querying page + Long limit = 10L; // Long | Number of records to return + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { GetFlexibleLoanLiquidationHistoryResponse result = apiInstance.getFlexibleLoanLiquidationHistory(loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow); System.out.println(result); @@ -596,9 +596,9 @@ public class Example { | **collateralCoin** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Current querying page. Start from 1; default: 1; max: 1000 | [optional] | -| **limit** | **Long**| Default: 10; max: 100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Current querying page | [optional] | +| **limit** | **Long**| Number of records to return | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -622,9 +622,9 @@ No authorization required # **getFlexibleLoanLtvAdjustmentHistory** > GetFlexibleLoanLtvAdjustmentHistoryResponse getFlexibleLoanLtvAdjustmentHistory(loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) -Get Flexible Loan LTV Adjustment History(USER_DATA) +Get Flexible Loan LTV Adjustment History (USER_DATA) -Get Flexible Loan LTV Adjustment History * If startTime and endTime are not sent, the recent 90-day data will be returned. * The max interval between startTime and endTime is 180 days. Weight: 400 +Get Flexible Loan LTV Adjustment History. It can be used to check history before 2024-02-27 08:00. Weight(UID): 400 Security Type: USER_DATA Notes: - If `startTime` and `endTime` are not sent, the recent 90-day data is returned. - The max interval between `startTime` and `endTime` is 180 days. ### Example ```java @@ -641,13 +641,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleRateApi apiInstance = new FlexibleRateApi(defaultClient); - String loanCoin = "loanCoin_example"; // String | - String collateralCoin = "collateralCoin_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Current querying page. Start from 1; default: 1; max: 1000 - Long limit = 56L; // Long | Default: 10; max: 100 - Long recvWindow = 56L; // Long | + String loanCoin = "BUSD"; // String | + String collateralCoin = "BNB"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Current querying page + Long limit = 10L; // Long | Number of records to return + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { GetFlexibleLoanLtvAdjustmentHistoryResponse result = apiInstance.getFlexibleLoanLtvAdjustmentHistory(loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow); System.out.println(result); @@ -670,9 +670,9 @@ public class Example { | **collateralCoin** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Current querying page. Start from 1; default: 1; max: 1000 | [optional] | -| **limit** | **Long**| Default: 10; max: 100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Current querying page | [optional] | +| **limit** | **Long**| Number of records to return | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -696,9 +696,9 @@ No authorization required # **getFlexibleLoanOngoingOrders** > GetFlexibleLoanOngoingOrdersResponse getFlexibleLoanOngoingOrders(loanCoin, collateralCoin, current, limit, recvWindow) -Get Flexible Loan Ongoing Orders(USER_DATA) +Get Flexible Loan Ongoing Orders (USER_DATA) -Get Flexible Loan Ongoing Orders Weight: 300 +Get Flexible Loan Ongoing Orders Weight(IP): 300 Security Type: USER_DATA ### Example ```java @@ -715,11 +715,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleRateApi apiInstance = new FlexibleRateApi(defaultClient); - String loanCoin = "loanCoin_example"; // String | - String collateralCoin = "collateralCoin_example"; // String | - Long current = 56L; // Long | Current querying page. Start from 1; default: 1; max: 1000 - Long limit = 56L; // Long | Default: 10; max: 100 - Long recvWindow = 56L; // Long | + String loanCoin = "BUSD"; // String | + String collateralCoin = "BNB"; // String | + Long current = 1L; // Long | Current querying page + Long limit = 10L; // Long | Number of records to return + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { GetFlexibleLoanOngoingOrdersResponse result = apiInstance.getFlexibleLoanOngoingOrders(loanCoin, collateralCoin, current, limit, recvWindow); System.out.println(result); @@ -740,9 +740,9 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **loanCoin** | **String**| | [optional] | | **collateralCoin** | **String**| | [optional] | -| **current** | **Long**| Current querying page. Start from 1; default: 1; max: 1000 | [optional] | -| **limit** | **Long**| Default: 10; max: 100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Current querying page | [optional] | +| **limit** | **Long**| Number of records to return | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -766,9 +766,9 @@ No authorization required # **getFlexibleLoanRepaymentHistory** > GetFlexibleLoanRepaymentHistoryResponse getFlexibleLoanRepaymentHistory(loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) -Get Flexible Loan Repayment History(USER_DATA) +Get Flexible Loan Repayment History (USER_DATA) -Get Flexible Loan Repayment History * If startTime and endTime are not sent, the recent 90-day data will be returned. * The max interval between startTime and endTime is 180 days. Weight: 400 +Get Flexible Loan Repayment History. It can be used to check history before 2024-02-27 08:00. Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and `endTime` are not sent, the recent 90-day data is returned. - The max interval between `startTime` and `endTime` is 180 days. ### Example ```java @@ -785,13 +785,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleRateApi apiInstance = new FlexibleRateApi(defaultClient); - String loanCoin = "loanCoin_example"; // String | - String collateralCoin = "collateralCoin_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Current querying page. Start from 1; default: 1; max: 1000 - Long limit = 56L; // Long | Default: 10; max: 100 - Long recvWindow = 56L; // Long | + String loanCoin = "BUSD"; // String | + String collateralCoin = "BNB"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Current querying page + Long limit = 10L; // Long | Number of records to return + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { GetFlexibleLoanRepaymentHistoryResponse result = apiInstance.getFlexibleLoanRepaymentHistory(loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow); System.out.println(result); @@ -814,9 +814,9 @@ public class Example { | **collateralCoin** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Current querying page. Start from 1; default: 1; max: 1000 | [optional] | -| **limit** | **Long**| Default: 10; max: 100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Current querying page | [optional] | +| **limit** | **Long**| Number of records to return | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type diff --git a/clients/crypto-loan/docs/GetFlexibleLoanLtvAdjustmentHistoryResponse.md b/clients/crypto-loan/docs/GetFlexibleLoanLTVAdjustmentHistoryResponse.md similarity index 100% rename from clients/crypto-loan/docs/GetFlexibleLoanLtvAdjustmentHistoryResponse.md rename to clients/crypto-loan/docs/GetFlexibleLoanLTVAdjustmentHistoryResponse.md diff --git a/clients/crypto-loan/docs/GetFlexibleLoanLtvAdjustmentHistoryResponseRowsInner.md b/clients/crypto-loan/docs/GetFlexibleLoanLTVAdjustmentHistoryResponseRowsInner.md similarity index 100% rename from clients/crypto-loan/docs/GetFlexibleLoanLtvAdjustmentHistoryResponseRowsInner.md rename to clients/crypto-loan/docs/GetFlexibleLoanLTVAdjustmentHistoryResponseRowsInner.md diff --git a/clients/crypto-loan/docs/GetLoanBorrowHistoryResponseRowsInner.md b/clients/crypto-loan/docs/GetLoanBorrowHistoryResponseRowsInner.md index f593ae449..ffe8e5330 100644 --- a/clients/crypto-loan/docs/GetLoanBorrowHistoryResponseRowsInner.md +++ b/clients/crypto-loan/docs/GetLoanBorrowHistoryResponseRowsInner.md @@ -15,7 +15,7 @@ |**collateralCoin** | **String** | | [optional] | |**initialCollateralAmount** | **String** | | [optional] | |**borrowTime** | **Long** | | [optional] | -|**status** | **String** | | [optional] | +|**status** | **String** | Accruing_Interest, Overdue, Liquidating, Repaying, Repaid, Liquidated, Pending, Failed | [optional] | diff --git a/clients/crypto-loan/docs/GetLoanLtvAdjustmentHistoryResponse.md b/clients/crypto-loan/docs/GetLoanLTVAdjustmentHistoryResponse.md similarity index 100% rename from clients/crypto-loan/docs/GetLoanLtvAdjustmentHistoryResponse.md rename to clients/crypto-loan/docs/GetLoanLTVAdjustmentHistoryResponse.md diff --git a/clients/crypto-loan/docs/GetLoanLtvAdjustmentHistoryResponseRowsInner.md b/clients/crypto-loan/docs/GetLoanLTVAdjustmentHistoryResponseRowsInner.md similarity index 100% rename from clients/crypto-loan/docs/GetLoanLtvAdjustmentHistoryResponseRowsInner.md rename to clients/crypto-loan/docs/GetLoanLTVAdjustmentHistoryResponseRowsInner.md diff --git a/clients/crypto-loan/docs/OrderType.md b/clients/crypto-loan/docs/OrderType.md new file mode 100644 index 000000000..7373b83bb --- /dev/null +++ b/clients/crypto-loan/docs/OrderType.md @@ -0,0 +1,23 @@ + + +# OrderType + +## Enum + + +* `borrowIn` (value: `"borrowIn"`) + +* `collateralSpent` (value: `"collateralSpent"`) + +* `repayAmount` (value: `"repayAmount"`) + +* `collateralReturn` (value: `"collateralReturn"`) + +* `addCollateral` (value: `"addCollateral"`) + +* `removeCollateral` (value: `"removeCollateral"`) + +* `collateralReturnAfterLiquidation` (value: `"collateralReturnAfterLiquidation"`) + + + diff --git a/clients/crypto-loan/docs/RepaymentType.md b/clients/crypto-loan/docs/RepaymentType.md new file mode 100644 index 000000000..e4f75ae5e --- /dev/null +++ b/clients/crypto-loan/docs/RepaymentType.md @@ -0,0 +1,13 @@ + + +# RepaymentType + +## Enum + + +* `REPAYMENT_TYPE_1` (value: `1l`) + +* `REPAYMENT_TYPE_2` (value: `2l`) + + + diff --git a/clients/crypto-loan/docs/StableRateApi.md b/clients/crypto-loan/docs/StableRateApi.md index 532b25a4d..bd6de4655 100644 --- a/clients/crypto-loan/docs/StableRateApi.md +++ b/clients/crypto-loan/docs/StableRateApi.md @@ -4,88 +4,19 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**checkCollateralRepayRateStableRate**](StableRateApi.md#checkCollateralRepayRateStableRate) | **GET** /sapi/v1/loan/repay/collateral/rate | Check Collateral Repay Rate(USER_DATA) | -| [**getCryptoLoansIncomeHistory**](StableRateApi.md#getCryptoLoansIncomeHistory) | **GET** /sapi/v1/loan/income | Get Crypto Loans Income History(USER_DATA) | -| [**getLoanBorrowHistory**](StableRateApi.md#getLoanBorrowHistory) | **GET** /sapi/v1/loan/borrow/history | Get Loan Borrow History(USER_DATA) | -| [**getLoanLtvAdjustmentHistory**](StableRateApi.md#getLoanLtvAdjustmentHistory) | **GET** /sapi/v1/loan/ltv/adjustment/history | Get Loan LTV Adjustment History(USER_DATA) | -| [**getLoanRepaymentHistory**](StableRateApi.md#getLoanRepaymentHistory) | **GET** /sapi/v1/loan/repay/history | Get Loan Repayment History(USER_DATA) | +| [**getCryptoLoansIncomeHistory**](StableRateApi.md#getCryptoLoansIncomeHistory) | **GET** /sapi/v1/loan/income | Get Crypto Loans Income History (USER_DATA) | +| [**getLoanBorrowHistory**](StableRateApi.md#getLoanBorrowHistory) | **GET** /sapi/v1/loan/borrow/history | Get Loan Borrow History (USER_DATA) | +| [**getLoanLtvAdjustmentHistory**](StableRateApi.md#getLoanLtvAdjustmentHistory) | **GET** /sapi/v1/loan/ltv/adjustment/history | Get Loan LTV Adjustment History (USER_DATA) | +| [**getLoanRepaymentHistory**](StableRateApi.md#getLoanRepaymentHistory) | **GET** /sapi/v1/loan/repay/history | Get Loan Repayment History (USER_DATA) | - -# **checkCollateralRepayRateStableRate** -> CheckCollateralRepayRateStableRateResponse checkCollateralRepayRateStableRate(loanCoin, collateralCoin, repayAmount, recvWindow) - -Check Collateral Repay Rate(USER_DATA) - -Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second. Weight: 6000 - -### Example -```java -// Import classes: -import com.binance.connector.client.crypto_loan.ApiClient; -import com.binance.connector.client.crypto_loan.ApiException; -import com.binance.connector.client.crypto_loan.Configuration; -import com.binance.connector.client.crypto_loan.models.*; -import com.binance.connector.client.crypto_loan.rest.api.StableRateApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - StableRateApi apiInstance = new StableRateApi(defaultClient); - String loanCoin = "loanCoin_example"; // String | - String collateralCoin = "collateralCoin_example"; // String | - Double repayAmount = 3.4D; // Double | repay amount of loanCoin - Long recvWindow = 56L; // Long | - try { - CheckCollateralRepayRateStableRateResponse result = apiInstance.checkCollateralRepayRateStableRate(loanCoin, collateralCoin, repayAmount, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling StableRateApi#checkCollateralRepayRateStableRate"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **loanCoin** | **String**| | | -| **collateralCoin** | **String**| | | -| **repayAmount** | **Double**| repay amount of loanCoin | | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**CheckCollateralRepayRateStableRateResponse**](CheckCollateralRepayRateStableRateResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Check Collateral Repay Rate | - | - # **getCryptoLoansIncomeHistory** > GetCryptoLoansIncomeHistoryResponse getCryptoLoansIncomeHistory(asset, type, startTime, endTime, limit, recvWindow) -Get Crypto Loans Income History(USER_DATA) +Get Crypto Loans Income History (USER_DATA) -Get Crypto Loans Income History * If startTime and endTime are not sent, the recent 7-day data will be returned. * The max interval between startTime and endTime is 30 days. Weight: 6000 +Get Crypto Loans Income History Weight(UID): 6000 Security Type: USER_DATA Notes: - If `startTime` and `endTime` are both omitted, the most recent 7 days of data are returned. - The maximum interval between `startTime` and `endTime` is 30 days. ### Example ```java @@ -102,12 +33,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); StableRateApi apiInstance = new StableRateApi(defaultClient); - String asset = "asset_example"; // String | - String type = "type_example"; // String | All types will be returned by default. Enum:`borrowIn` ,`collateralSpent`, `repayAmount`, `collateralReturn`(Collateral return after repayment), `addCollateral`, `removeCollateral`, `collateralReturnAfterLiquidation` - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | Default: 10; max: 100 - Long recvWindow = 56L; // Long | + String asset = "BUSD"; // String | + OrderType type = OrderType.fromValue("borrowIn"); // OrderType | All types will be returned by default. + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long limit = 10L; // Long | Number of records to return + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { GetCryptoLoansIncomeHistoryResponse result = apiInstance.getCryptoLoansIncomeHistory(asset, type, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -127,11 +58,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **asset** | **String**| | [optional] | -| **type** | **String**| All types will be returned by default. Enum:`borrowIn` ,`collateralSpent`, `repayAmount`, `collateralReturn`(Collateral return after repayment), `addCollateral`, `removeCollateral`, `collateralReturnAfterLiquidation` | [optional] | +| **type** | [**OrderType**](.md)| All types will be returned by default. | [optional] [enum: borrowIn, collateralSpent, repayAmount, collateralReturn, addCollateral, removeCollateral, collateralReturnAfterLiquidation] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **limit** | **Long**| Default: 10; max: 100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **limit** | **Long**| Number of records to return | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -155,9 +86,9 @@ No authorization required # **getLoanBorrowHistory** > GetLoanBorrowHistoryResponse getLoanBorrowHistory(orderId, loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) -Get Loan Borrow History(USER_DATA) +Get Loan Borrow History (USER_DATA) -Get Loan Borrow History * If startTime and endTime are not sent, the recent 90-day data will be returned. * The max interval between startTime and endTime is 180 days. Weight: 400 +Get Loan Borrow History Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and `endTime` are not sent, the recent 90-day data is returned. - The max interval between `startTime` and `endTime` is 180 days. ### Example ```java @@ -174,14 +105,14 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); StableRateApi apiInstance = new StableRateApi(defaultClient); - Long orderId = 56L; // Long | orderId in `POST /sapi/v1/loan/borrow` - String loanCoin = "loanCoin_example"; // String | - String collateralCoin = "collateralCoin_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Current querying page. Start from 1; default: 1; max: 1000 - Long limit = 56L; // Long | Default: 10; max: 100 - Long recvWindow = 56L; // Long | + Long orderId = 1L; // Long | orderId in `POST /sapi/v1/loan/borrow` + String loanCoin = "BUSD"; // String | + String collateralCoin = "BNB"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Current querying page + Long limit = 10L; // Long | Number of records to return + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { GetLoanBorrowHistoryResponse result = apiInstance.getLoanBorrowHistory(orderId, loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow); System.out.println(result); @@ -205,9 +136,9 @@ public class Example { | **collateralCoin** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Current querying page. Start from 1; default: 1; max: 1000 | [optional] | -| **limit** | **Long**| Default: 10; max: 100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Current querying page | [optional] | +| **limit** | **Long**| Number of records to return | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -231,9 +162,9 @@ No authorization required # **getLoanLtvAdjustmentHistory** > GetLoanLtvAdjustmentHistoryResponse getLoanLtvAdjustmentHistory(orderId, loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) -Get Loan LTV Adjustment History(USER_DATA) +Get Loan LTV Adjustment History (USER_DATA) -Get Loan LTV Adjustment History * If startTime and endTime are not sent, the recent 90-day data will be returned. * The max interval between startTime and endTime is 180 days. Weight: 400 +Get Loan LTV Adjustment History Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and `endTime` are not sent, the recent 90-day data is returned. - The max interval between `startTime` and `endTime` is 180 days. ### Example ```java @@ -250,14 +181,14 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); StableRateApi apiInstance = new StableRateApi(defaultClient); - Long orderId = 56L; // Long | orderId in `POST /sapi/v1/loan/borrow` - String loanCoin = "loanCoin_example"; // String | - String collateralCoin = "collateralCoin_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Current querying page. Start from 1; default: 1; max: 1000 - Long limit = 56L; // Long | Default: 10; max: 100 - Long recvWindow = 56L; // Long | + Long orderId = 1L; // Long | orderId in `POST /sapi/v1/loan/borrow` + String loanCoin = "BUSD"; // String | + String collateralCoin = "BNB"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Current querying page + Long limit = 10L; // Long | Number of records to return + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { GetLoanLtvAdjustmentHistoryResponse result = apiInstance.getLoanLtvAdjustmentHistory(orderId, loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow); System.out.println(result); @@ -281,9 +212,9 @@ public class Example { | **collateralCoin** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Current querying page. Start from 1; default: 1; max: 1000 | [optional] | -| **limit** | **Long**| Default: 10; max: 100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Current querying page | [optional] | +| **limit** | **Long**| Number of records to return | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -307,9 +238,9 @@ No authorization required # **getLoanRepaymentHistory** > GetLoanRepaymentHistoryResponse getLoanRepaymentHistory(orderId, loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) -Get Loan Repayment History(USER_DATA) +Get Loan Repayment History (USER_DATA) -Get Loan Repayment History * If startTime and endTime are not sent, the recent 90-day data will be returned. * The max interval between startTime and endTime is 180 days. Weight: 400 +Get Loan Repayment History Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and `endTime` are not sent, the recent 90-day data is returned. - The max interval between `startTime` and `endTime` is 180 days. ### Example ```java @@ -326,14 +257,14 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); StableRateApi apiInstance = new StableRateApi(defaultClient); - Long orderId = 56L; // Long | orderId in `POST /sapi/v1/loan/borrow` - String loanCoin = "loanCoin_example"; // String | - String collateralCoin = "collateralCoin_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Current querying page. Start from 1; default: 1; max: 1000 - Long limit = 56L; // Long | Default: 10; max: 100 - Long recvWindow = 56L; // Long | + Long orderId = 1L; // Long | orderId in `POST /sapi/v1/loan/borrow` + String loanCoin = "BUSD"; // String | + String collateralCoin = "BNB"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Current querying page + Long limit = 10L; // Long | Number of records to return + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { GetLoanRepaymentHistoryResponse result = apiInstance.getLoanRepaymentHistory(orderId, loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow); System.out.println(result); @@ -357,9 +288,9 @@ public class Example { | **collateralCoin** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Current querying page. Start from 1; default: 1; max: 1000 | [optional] | -| **limit** | **Long**| Default: 10; max: 100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Current querying page | [optional] | +| **limit** | **Long**| Number of records to return | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type diff --git a/clients/crypto-loan/docs/rest-api/migration-guide.md b/clients/crypto-loan/docs/rest-api/migration-guide.md index c7b1cb403..5279b392a 100644 --- a/clients/crypto-loan/docs/rest-api/migration-guide.md +++ b/clients/crypto-loan/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-crypto-loan - 4.0.0 + 5.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-crypto-loan - 4.0.0 + 5.0.0 ``` diff --git a/clients/crypto-loan/example_rest.md b/clients/crypto-loan/example_rest.md index b87c09266..549a968a4 100644 --- a/clients/crypto-loan/example_rest.md +++ b/clients/crypto-loan/example_rest.md @@ -1,38 +1,36 @@ ## FlexibleRate -[GET /sapi/v2/loan/flexible/repay/rate](https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate) - checkCollateralRepayRate - [CheckCollateralRepayRateExample.java:47](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/CheckCollateralRepayRateExample.java#L47) +[GET /sapi/v2/loan/flexible/repay/rate](https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#check-collateral-repay-rate) - checkCollateralRepayRate - [CheckCollateralRepayRateExample.java:37](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/CheckCollateralRepayRateExample.java#L37) -[POST /sapi/v2/loan/flexible/adjust/ltv](https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Adjust-LTV) - flexibleLoanAdjustLtv - [FlexibleLoanAdjustLtvExample.java:49](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanAdjustLtvExample.java#L49) +[POST /sapi/v2/loan/flexible/adjust/ltv](https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#flexible-loan-adjust-ltv) - flexibleLoanAdjustLtv - [FlexibleLoanAdjustLtvExample.java:39](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanAdjustLtvExample.java#L39) -[POST /sapi/v2/loan/flexible/borrow](https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Borrow) - flexibleLoanBorrow - [FlexibleLoanBorrowExample.java:49](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanBorrowExample.java#L49) +[POST /sapi/v2/loan/flexible/borrow](https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#flexible-loan-borrow) - flexibleLoanBorrow - [FlexibleLoanBorrowExample.java:39](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanBorrowExample.java#L39) -[POST /sapi/v2/loan/flexible/repay](https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay) - flexibleLoanRepay - [FlexibleLoanRepayExample.java:49](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanRepayExample.java#L49) +[POST /sapi/v2/loan/flexible/repay](https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#flexible-loan-repay) - flexibleLoanRepay - [FlexibleLoanRepayExample.java:38](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanRepayExample.java#L38) -[GET /sapi/v2/loan/flexible/loanable/data](https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Assets-Data) - getFlexibleLoanAssetsData - [GetFlexibleLoanAssetsDataExample.java:48](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanAssetsDataExample.java#L48) +[GET /sapi/v2/loan/flexible/loanable/data](https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-assets-data) - getFlexibleLoanAssetsData - [GetFlexibleLoanAssetsDataExample.java:37](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanAssetsDataExample.java#L37) -[GET /sapi/v2/loan/flexible/borrow/history](https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History) - getFlexibleLoanBorrowHistory - [GetFlexibleLoanBorrowHistoryExample.java:49](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanBorrowHistoryExample.java#L49) +[GET /sapi/v2/loan/flexible/borrow/history](https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-borrow-history) - getFlexibleLoanBorrowHistory - [GetFlexibleLoanBorrowHistoryExample.java:39](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanBorrowHistoryExample.java#L39) -[GET /sapi/v2/loan/flexible/collateral/data](https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data) - getFlexibleLoanCollateralAssetsData - [GetFlexibleLoanCollateralAssetsDataExample.java:48](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanCollateralAssetsDataExample.java#L48) +[GET /sapi/v2/loan/flexible/collateral/data](https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-collateral-assets-data) - getFlexibleLoanCollateralAssetsData - [GetFlexibleLoanCollateralAssetsDataExample.java:37](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanCollateralAssetsDataExample.java#L37) -[GET /sapi/v2/loan/interestRateHistory](https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Interest-Rate-History) - getFlexibleLoanInterestRateHistory - [GetFlexibleLoanInterestRateHistoryExample.java:49](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanInterestRateHistoryExample.java#L49) +[GET /sapi/v2/loan/interestRateHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-interest-rate-history) - getFlexibleLoanInterestRateHistory - [GetFlexibleLoanInterestRateHistoryExample.java:39](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanInterestRateHistoryExample.java#L39) -[GET /sapi/v2/loan/flexible/liquidation/history](https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Liquidation-History) - getFlexibleLoanLiquidationHistory - [GetFlexibleLoanLiquidationHistoryExample.java:47](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanLiquidationHistoryExample.java#L47) +[GET /sapi/v2/loan/flexible/liquidation/history](https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-liquidation-history) - getFlexibleLoanLiquidationHistory - [GetFlexibleLoanLiquidationHistoryExample.java:36](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanLiquidationHistoryExample.java#L36) -[GET /sapi/v2/loan/flexible/ltv/adjustment/history](https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History) - getFlexibleLoanLtvAdjustmentHistory - [GetFlexibleLoanLtvAdjustmentHistoryExample.java:49](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanLtvAdjustmentHistoryExample.java#L49) +[GET /sapi/v2/loan/flexible/ltv/adjustment/history](https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-ltv-adjustment-history) - getFlexibleLoanLtvAdjustmentHistory - [GetFlexibleLoanLtvAdjustmentHistoryExample.java:39](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanLtvAdjustmentHistoryExample.java#L39) -[GET /sapi/v2/loan/flexible/ongoing/orders](https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Ongoing-Orders) - getFlexibleLoanOngoingOrders - [GetFlexibleLoanOngoingOrdersExample.java:47](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanOngoingOrdersExample.java#L47) +[GET /sapi/v2/loan/flexible/ongoing/orders](https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-ongoing-orders) - getFlexibleLoanOngoingOrders - [GetFlexibleLoanOngoingOrdersExample.java:36](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanOngoingOrdersExample.java#L36) -[GET /sapi/v2/loan/flexible/repay/history](https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History) - getFlexibleLoanRepaymentHistory - [GetFlexibleLoanRepaymentHistoryExample.java:49](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanRepaymentHistoryExample.java#L49) +[GET /sapi/v2/loan/flexible/repay/history](https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-repayment-history) - getFlexibleLoanRepaymentHistory - [GetFlexibleLoanRepaymentHistoryExample.java:39](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanRepaymentHistoryExample.java#L39) ## StableRate -[GET /sapi/v1/loan/repay/collateral/rate](https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Check-Collateral-Repay-Rate) - checkCollateralRepayRateStableRate - [CheckCollateralRepayRateStableRateExample.java:48](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/CheckCollateralRepayRateStableRateExample.java#L48) +[GET /sapi/v1/loan/income](https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/stable-rate#get-crypto-loans-income-history) - getCryptoLoansIncomeHistory - [GetCryptoLoansIncomeHistoryExample.java:40](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetCryptoLoansIncomeHistoryExample.java#L40) -[GET /sapi/v1/loan/income](https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History) - getCryptoLoansIncomeHistory - [GetCryptoLoansIncomeHistoryExample.java:49](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetCryptoLoansIncomeHistoryExample.java#L49) +[GET /sapi/v1/loan/borrow/history](https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/stable-rate#get-loan-borrow-history) - getLoanBorrowHistory - [GetLoanBorrowHistoryExample.java:39](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanBorrowHistoryExample.java#L39) -[GET /sapi/v1/loan/borrow/history](https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History) - getLoanBorrowHistory - [GetLoanBorrowHistoryExample.java:48](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanBorrowHistoryExample.java#L48) +[GET /sapi/v1/loan/ltv/adjustment/history](https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/stable-rate#get-loan-ltv-adjustment-history) - getLoanLtvAdjustmentHistory - [GetLoanLtvAdjustmentHistoryExample.java:39](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanLtvAdjustmentHistoryExample.java#L39) -[GET /sapi/v1/loan/ltv/adjustment/history](https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History) - getLoanLtvAdjustmentHistory - [GetLoanLtvAdjustmentHistoryExample.java:49](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanLtvAdjustmentHistoryExample.java#L49) - -[GET /sapi/v1/loan/repay/history](https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History) - getLoanRepaymentHistory - [GetLoanRepaymentHistoryExample.java:48](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanRepaymentHistoryExample.java#L48) +[GET /sapi/v1/loan/repay/history](https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/stable-rate#get-loan-repayment-history) - getLoanRepaymentHistory - [GetLoanRepaymentHistoryExample.java:39](/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanRepaymentHistoryExample.java#L39) diff --git a/clients/crypto-loan/pom.xml b/clients/crypto-loan/pom.xml index bdba8ecbb..36fbd2df4 100644 --- a/clients/crypto-loan/pom.xml +++ b/clients/crypto-loan/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-crypto-loan crypto-loan - 4.0.1 + 5.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/JSON.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/JSON.java index 1193fa542..07bbb81d7 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/JSON.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -111,9 +111,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.crypto_loan.rest.model .CheckCollateralRepayRateResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.crypto_loan.rest.model - .CheckCollateralRepayRateStableRateResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.crypto_loan.rest.model.FlexibleLoanAdjustLtvRequest .CustomTypeAdapterFactory()); diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/CryptoLoanRestApi.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/CryptoLoanRestApi.java index cf7fdd9a3..038897170 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/CryptoLoanRestApi.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/CryptoLoanRestApi.java @@ -6,7 +6,6 @@ import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.crypto_loan.rest.CryptoLoanRestApiUtil; import com.binance.connector.client.crypto_loan.rest.model.CheckCollateralRepayRateResponse; -import com.binance.connector.client.crypto_loan.rest.model.CheckCollateralRepayRateStableRateResponse; import com.binance.connector.client.crypto_loan.rest.model.FlexibleLoanAdjustLtvRequest; import com.binance.connector.client.crypto_loan.rest.model.FlexibleLoanAdjustLtvResponse; import com.binance.connector.client.crypto_loan.rest.model.FlexibleLoanBorrowRequest; @@ -25,6 +24,7 @@ import com.binance.connector.client.crypto_loan.rest.model.GetLoanBorrowHistoryResponse; import com.binance.connector.client.crypto_loan.rest.model.GetLoanLtvAdjustmentHistoryResponse; import com.binance.connector.client.crypto_loan.rest.model.GetLoanRepaymentHistoryResponse; +import com.binance.connector.client.crypto_loan.rest.model.OrderType; public class CryptoLoanRestApi { @@ -41,11 +41,12 @@ public CryptoLoanRestApi(ApiClient apiClient) { } /** - * Check Collateral Repay Rate (USER_DATA) Weight: 6000 + * Check Collateral Flexible Repay Rate (USER_DATA) Get the latest rate of collateral coin/loan + * coin when using collateral repay. Weight(IP): 6000 Security Type: USER_DATA * * @param loanCoin (required) * @param collateralCoin (required) - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<CheckCollateralRepayRateResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -57,8 +58,8 @@ public CryptoLoanRestApi(ApiClient apiClient) { * * * @see Check - * Collateral Repay Rate (USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#check-collateral-repay-rate">Check + * Collateral Flexible Repay Rate (USER_DATA) Documentation */ public ApiResponse checkCollateralRepayRate( String loanCoin, String collateralCoin, Long recvWindow) throws ApiException { @@ -66,8 +67,8 @@ public ApiResponse checkCollateralRepayRate( } /** - * Flexible Loan Adjust LTV(TRADE) Flexible Loan Adjust LTV * API Key needs Spot & Margin - * Trading permission for this endpoint Weight: 6000 + * Flexible Loan Adjust LTV (TRADE) Flexible Loan Adjust LTV Weight(UID): 6000 Security Type: + * TRADE Notes: - API key needs Spot & Margin Trading permission for this endpoint. * * @param flexibleLoanAdjustLtvRequest (required) * @return ApiResponse<FlexibleLoanAdjustLtvResponse> @@ -81,8 +82,8 @@ public ApiResponse checkCollateralRepayRate( * * * @see Flexible - * Loan Adjust LTV(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#flexible-loan-adjust-ltv">Flexible + * Loan Adjust LTV (TRADE) Documentation */ public ApiResponse flexibleLoanAdjustLtv( FlexibleLoanAdjustLtvRequest flexibleLoanAdjustLtvRequest) throws ApiException { @@ -90,8 +91,9 @@ public ApiResponse flexibleLoanAdjustLtv( } /** - * Flexible Loan Borrow(TRADE) Borrow Flexible Loan * Only available for master account * You - * can customize LTV by entering loanAmount and collateralAmount. Weight: 6000 + * Flexible Loan Borrow (TRADE) Borrow Flexible Loan Weight(IP): 6000 Security Type: TRADE + * Notes: - This endpoint is available for both master and sub-accounts. - You can customize LTV + * by entering `loanAmount` and `collateralAmount`. * * @param flexibleLoanBorrowRequest (required) * @return ApiResponse<FlexibleLoanBorrowResponse> @@ -105,8 +107,8 @@ public ApiResponse flexibleLoanAdjustLtv( * * * @see Flexible - * Loan Borrow(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#flexible-loan-borrow">Flexible + * Loan Borrow (TRADE) Documentation */ public ApiResponse flexibleLoanBorrow( FlexibleLoanBorrowRequest flexibleLoanBorrowRequest) throws ApiException { @@ -114,8 +116,8 @@ public ApiResponse flexibleLoanBorrow( } /** - * Flexible Loan Repay(TRADE) Flexible Loan Repay * repayAmount is mandatory even fullRepayment - * = FALSE Weight: 6000 + * Flexible Loan Repay (TRADE) Flexible Loan Repay Weight(IP): 6000 Security Type: TRADE Notes: + * - `repayAmount` is mandatory even when `fullRepayment = FALSE`. * * @param flexibleLoanRepayRequest (required) * @return ApiResponse<FlexibleLoanRepayResponse> @@ -129,8 +131,8 @@ public ApiResponse flexibleLoanBorrow( * * * @see Flexible - * Loan Repay(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#flexible-loan-repay">Flexible + * Loan Repay (TRADE) Documentation */ public ApiResponse flexibleLoanRepay( FlexibleLoanRepayRequest flexibleLoanRepayRequest) throws ApiException { @@ -138,11 +140,12 @@ public ApiResponse flexibleLoanRepay( } /** - * Get Flexible Loan Assets Data(USER_DATA) Get interest rate and borrow limit of flexible - * loanable assets. The borrow limit is shown in USD value. Weight: 400 + * Get Flexible Loan Assets Data (USER_DATA) Get interest rate and borrow limit of flexible + * loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 Security Type: + * USER_DATA * * @param loanCoin (optional) - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFlexibleLoanAssetsDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -154,8 +157,8 @@ public ApiResponse flexibleLoanRepay( * * * @see Get - * Flexible Loan Assets Data(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-assets-data">Get + * Flexible Loan Assets Data (USER_DATA) Documentation */ public ApiResponse getFlexibleLoanAssetsData( String loanCoin, Long recvWindow) throws ApiException { @@ -163,17 +166,19 @@ public ApiResponse getFlexibleLoanAssetsData( } /** - * Get Flexible Loan Borrow History(USER_DATA) Get Flexible Loan Borrow History * If startTime - * and endTime are not sent, the recent 90-day data will be returned. * The max interval between - * startTime and endTime is 180 days. Weight: 400 + * Get Flexible Loan Borrow History (USER_DATA) Get Flexible Loan Borrow History. It can be used + * to check history before 2024-02-27 08:00. Weight(IP): 400 Security Type: USER_DATA Notes: - + * If `startTime` and `endTime` are not sent, the recent 90-day data is + * returned. - The max interval between `startTime` and `endTime` is 180 + * days. * * @param loanCoin (optional) * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFlexibleLoanBorrowHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -185,8 +190,8 @@ public ApiResponse getFlexibleLoanAssetsData( * * * @see Get - * Flexible Loan Borrow History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-borrow-history">Get + * Flexible Loan Borrow History (USER_DATA) Documentation */ public ApiResponse getFlexibleLoanBorrowHistory( String loanCoin, @@ -202,12 +207,12 @@ public ApiResponse getFlexibleLoanBorrowHi } /** - * Get Flexible Loan Collateral Assets Data(USER_DATA) Get LTV information and collateral limit - * of flexible loan's collateral assets. The collateral limit is shown in USD value. Weight: - * 400 + * Get Flexible Loan Collateral Assets Data (USER_DATA) Get LTV information and collateral limit + * of flexible loan's collateral assets. The collateral limit is shown in USD value. + * Weight(IP): 400 Security Type: USER_DATA * * @param collateralCoin (optional) - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFlexibleLoanCollateralAssetsDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -219,8 +224,8 @@ public ApiResponse getFlexibleLoanBorrowHi * * * @see Get - * Flexible Loan Collateral Assets Data(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-collateral-assets-data">Get + * Flexible Loan Collateral Assets Data (USER_DATA) Documentation */ public ApiResponse getFlexibleLoanCollateralAssetsData(String collateralCoin, Long recvWindow) @@ -230,15 +235,16 @@ public ApiResponse getFlexibleLoanBorrowHi /** * Get Flexible Loan Interest Rate History (USER_DATA) Check Flexible Loan interest rate history - * * If startTime and endTime are not sent, the recent 90-day data will be returned * The max - * interval between startTime and endTime is 90 days. * Time based on UTC+0. Weight: 400 + * Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and + * `endTime` are not sent, the recent 90-day data is returned. - The max interval + * between `startTime` and `endTime` is 90 days. - Time is based on UTC+0. * * @param coin (required) - * @param recvWindow (required) + * @param recvWindow Request validity window in milliseconds (required) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) * @return ApiResponse<GetFlexibleLoanInterestRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -250,7 +256,7 @@ public ApiResponse getFlexibleLoanBorrowHi * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-interest-rate-history">Get * Flexible Loan Interest Rate History (USER_DATA) Documentation */ public ApiResponse @@ -267,15 +273,16 @@ public ApiResponse getFlexibleLoanBorrowHi } /** - * Get Flexible Loan Liquidation History (USER_DATA) Weight: 400 + * Get Flexible Loan Liquidation History (USER_DATA) Get Flexible Loan Liquidation History + * Weight(IP): 400 Security Type: USER_DATA * * @param loanCoin (optional) * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFlexibleLoanLiquidationHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -287,7 +294,7 @@ public ApiResponse getFlexibleLoanBorrowHi * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-liquidation-history">Get * Flexible Loan Liquidation History (USER_DATA) Documentation */ public ApiResponse getFlexibleLoanLiquidationHistory( @@ -304,17 +311,19 @@ public ApiResponse getFlexibleLoanLiq } /** - * Get Flexible Loan LTV Adjustment History(USER_DATA) Get Flexible Loan LTV Adjustment History - * * If startTime and endTime are not sent, the recent 90-day data will be returned. * The max - * interval between startTime and endTime is 180 days. Weight: 400 + * Get Flexible Loan LTV Adjustment History (USER_DATA) Get Flexible Loan LTV Adjustment + * History. It can be used to check history before 2024-02-27 08:00. Weight(UID): 400 Security + * Type: USER_DATA Notes: - If `startTime` and `endTime` are not sent, the + * recent 90-day data is returned. - The max interval between `startTime` and + * `endTime` is 180 days. * * @param loanCoin (optional) * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFlexibleLoanLtvAdjustmentHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -326,8 +335,8 @@ public ApiResponse getFlexibleLoanLiq * * * @see Get - * Flexible Loan LTV Adjustment History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-ltv-adjustment-history">Get + * Flexible Loan LTV Adjustment History (USER_DATA) Documentation */ public ApiResponse getFlexibleLoanLtvAdjustmentHistory( @@ -344,13 +353,14 @@ public ApiResponse getFlexibleLoanLiq } /** - * Get Flexible Loan Ongoing Orders(USER_DATA) Get Flexible Loan Ongoing Orders Weight: 300 + * Get Flexible Loan Ongoing Orders (USER_DATA) Get Flexible Loan Ongoing Orders Weight(IP): 300 + * Security Type: USER_DATA * * @param loanCoin (optional) * @param collateralCoin (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFlexibleLoanOngoingOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -362,8 +372,8 @@ public ApiResponse getFlexibleLoanLiq * * * @see Get - * Flexible Loan Ongoing Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-ongoing-orders">Get + * Flexible Loan Ongoing Orders (USER_DATA) Documentation */ public ApiResponse getFlexibleLoanOngoingOrders( String loanCoin, String collateralCoin, Long current, Long limit, Long recvWindow) @@ -373,17 +383,19 @@ public ApiResponse getFlexibleLoanOngoingO } /** - * Get Flexible Loan Repayment History(USER_DATA) Get Flexible Loan Repayment History * If - * startTime and endTime are not sent, the recent 90-day data will be returned. * The max - * interval between startTime and endTime is 180 days. Weight: 400 + * Get Flexible Loan Repayment History (USER_DATA) Get Flexible Loan Repayment History. It can + * be used to check history before 2024-02-27 08:00. Weight(IP): 400 Security Type: USER_DATA + * Notes: - If `startTime` and `endTime` are not sent, the recent 90-day + * data is returned. - The max interval between `startTime` and `endTime` is + * 180 days. * * @param loanCoin (optional) * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFlexibleLoanRepaymentHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -395,8 +407,8 @@ public ApiResponse getFlexibleLoanOngoingO * * * @see Get - * Flexible Loan Repayment History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-repayment-history">Get + * Flexible Loan Repayment History (USER_DATA) Documentation */ public ApiResponse getFlexibleLoanRepaymentHistory( String loanCoin, @@ -412,50 +424,17 @@ public ApiResponse getFlexibleLoanRepay } /** - * Check Collateral Repay Rate(USER_DATA) Get the the rate of collateral coin / loan coin when - * using collateral repay, the rate will be valid within 8 second. Weight: 6000 - * - * @param loanCoin (required) - * @param collateralCoin (required) - * @param repayAmount repay amount of loanCoin (required) - * @param recvWindow (optional) - * @return ApiResponse<CheckCollateralRepayRateStableRateResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Check Collateral Repay Rate -
- * - * @see Check - * Collateral Repay Rate(USER_DATA) Documentation - */ - public ApiResponse - checkCollateralRepayRateStableRate( - String loanCoin, String collateralCoin, Double repayAmount, Long recvWindow) - throws ApiException { - return stableRateApi.checkCollateralRepayRateStableRate( - loanCoin, collateralCoin, repayAmount, recvWindow); - } - - /** - * Get Crypto Loans Income History(USER_DATA) Get Crypto Loans Income History * If startTime and - * endTime are not sent, the recent 7-day data will be returned. * The max interval between - * startTime and endTime is 30 days. Weight: 6000 + * Get Crypto Loans Income History (USER_DATA) Get Crypto Loans Income History Weight(UID): 6000 + * Security Type: USER_DATA Notes: - If `startTime` and `endTime` are both + * omitted, the most recent 7 days of data are returned. - The maximum interval between + * `startTime` and `endTime` is 30 days. * * @param asset (optional) - * @param type All types will be returned by default. Enum:`borrowIn` - * ,`collateralSpent`, `repayAmount`, - * `collateralReturn`(Collateral return after repayment), - * `addCollateral`, `removeCollateral`, - * `collateralReturnAfterLiquidation` (optional) + * @param type All types will be returned by default. (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetCryptoLoansIncomeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -467,29 +446,30 @@ public ApiResponse getFlexibleLoanRepay * * * @see Get - * Crypto Loans Income History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/stable-rate#get-crypto-loans-income-history">Get + * Crypto Loans Income History (USER_DATA) Documentation */ public ApiResponse getCryptoLoansIncomeHistory( - String asset, String type, Long startTime, Long endTime, Long limit, Long recvWindow) + String asset, OrderType type, Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { return stableRateApi.getCryptoLoansIncomeHistory( asset, type, startTime, endTime, limit, recvWindow); } /** - * Get Loan Borrow History(USER_DATA) Get Loan Borrow History * If startTime and endTime are not - * sent, the recent 90-day data will be returned. * The max interval between startTime and - * endTime is 180 days. Weight: 400 + * Get Loan Borrow History (USER_DATA) Get Loan Borrow History Weight(IP): 400 Security Type: + * USER_DATA Notes: - If `startTime` and `endTime` are not sent, the recent + * 90-day data is returned. - The max interval between `startTime` and + * `endTime` is 180 days. * * @param orderId orderId in `POST /sapi/v1/loan/borrow` (optional) * @param loanCoin (optional) * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetLoanBorrowHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -501,8 +481,8 @@ public ApiResponse getCryptoLoansIncomeHist * * * @see Get - * Loan Borrow History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/stable-rate#get-loan-borrow-history">Get + * Loan Borrow History (USER_DATA) Documentation */ public ApiResponse getLoanBorrowHistory( Long orderId, @@ -519,18 +499,19 @@ public ApiResponse getLoanBorrowHistory( } /** - * Get Loan LTV Adjustment History(USER_DATA) Get Loan LTV Adjustment History * If startTime and - * endTime are not sent, the recent 90-day data will be returned. * The max interval between - * startTime and endTime is 180 days. Weight: 400 + * Get Loan LTV Adjustment History (USER_DATA) Get Loan LTV Adjustment History Weight(IP): 400 + * Security Type: USER_DATA Notes: - If `startTime` and `endTime` are not + * sent, the recent 90-day data is returned. - The max interval between `startTime` + * and `endTime` is 180 days. * * @param orderId orderId in `POST /sapi/v1/loan/borrow` (optional) * @param loanCoin (optional) * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetLoanLtvAdjustmentHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -542,8 +523,8 @@ public ApiResponse getLoanBorrowHistory( * * * @see Get - * Loan LTV Adjustment History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/stable-rate#get-loan-ltv-adjustment-history">Get + * Loan LTV Adjustment History (USER_DATA) Documentation */ public ApiResponse getLoanLtvAdjustmentHistory( Long orderId, @@ -560,18 +541,19 @@ public ApiResponse getLoanLtvAdjustmentHist } /** - * Get Loan Repayment History(USER_DATA) Get Loan Repayment History * If startTime and endTime - * are not sent, the recent 90-day data will be returned. * The max interval between startTime - * and endTime is 180 days. Weight: 400 + * Get Loan Repayment History (USER_DATA) Get Loan Repayment History Weight(IP): 400 Security + * Type: USER_DATA Notes: - If `startTime` and `endTime` are not sent, the + * recent 90-day data is returned. - The max interval between `startTime` and + * `endTime` is 180 days. * * @param orderId orderId in `POST /sapi/v1/loan/borrow` (optional) * @param loanCoin (optional) * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetLoanRepaymentHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -583,8 +565,8 @@ public ApiResponse getLoanLtvAdjustmentHist * * * @see Get - * Loan Repayment History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/stable-rate#get-loan-repayment-history">Get + * Loan Repayment History (USER_DATA) Documentation */ public ApiResponse getLoanRepaymentHistory( Long orderId, diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/FlexibleRateApi.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/FlexibleRateApi.java index 3d8259492..a4dc2b8e7 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/FlexibleRateApi.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/FlexibleRateApi.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -58,7 +58,7 @@ public class FlexibleRateApi { private static final String USER_AGENT = String.format( - "binance-crypto-loan/4.0.0 (Java/%s; %s; %s)", + "binance-crypto-loan/5.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -100,7 +100,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * @param loanCoin (required) * @param collateralCoin (required) - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -111,8 +111,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Check - * Collateral Repay Rate (USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#check-collateral-repay-rate">Check + * Collateral Flexible Repay Rate (USER_DATA) Documentation */ private okhttp3.Call checkCollateralRepayRateCall( String loanCoin, String collateralCoin, Long recvWindow) throws ApiException { @@ -221,11 +221,12 @@ private okhttp3.Call checkCollateralRepayRateValidateBeforeCall( } /** - * Check Collateral Repay Rate (USER_DATA) Weight: 6000 + * Check Collateral Flexible Repay Rate (USER_DATA) Get the latest rate of collateral coin/loan + * coin when using collateral repay. Weight(IP): 6000 Security Type: USER_DATA * * @param loanCoin (required) * @param collateralCoin (required) - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<CheckCollateralRepayRateResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -237,11 +238,11 @@ private okhttp3.Call checkCollateralRepayRateValidateBeforeCall( * * * @see Check - * Collateral Repay Rate (USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#check-collateral-repay-rate">Check + * Collateral Flexible Repay Rate (USER_DATA) Documentation */ public ApiResponse checkCollateralRepayRate( - @NotNull String loanCoin, @NotNull String collateralCoin, Long recvWindow) + @NotNull String loanCoin, @NotNull String collateralCoin, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = checkCollateralRepayRateValidateBeforeCall(loanCoin, collateralCoin, recvWindow); @@ -264,8 +265,8 @@ public ApiResponse checkCollateralRepayRate( * * * @see Flexible - * Loan Adjust LTV(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#flexible-loan-adjust-ltv">Flexible + * Loan Adjust LTV (TRADE) Documentation */ private okhttp3.Call flexibleLoanAdjustLtvCall( FlexibleLoanAdjustLtvRequest flexibleLoanAdjustLtvRequest) throws ApiException { @@ -381,8 +382,8 @@ private okhttp3.Call flexibleLoanAdjustLtvValidateBeforeCall( } /** - * Flexible Loan Adjust LTV(TRADE) Flexible Loan Adjust LTV * API Key needs Spot & Margin - * Trading permission for this endpoint Weight: 6000 + * Flexible Loan Adjust LTV (TRADE) Flexible Loan Adjust LTV Weight(UID): 6000 Security Type: + * TRADE Notes: - API key needs Spot & Margin Trading permission for this endpoint. * * @param flexibleLoanAdjustLtvRequest (required) * @return ApiResponse<FlexibleLoanAdjustLtvResponse> @@ -396,8 +397,8 @@ private okhttp3.Call flexibleLoanAdjustLtvValidateBeforeCall( * * * @see Flexible - * Loan Adjust LTV(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#flexible-loan-adjust-ltv">Flexible + * Loan Adjust LTV (TRADE) Documentation */ public ApiResponse flexibleLoanAdjustLtv( @Valid @NotNull FlexibleLoanAdjustLtvRequest flexibleLoanAdjustLtvRequest) @@ -423,8 +424,8 @@ public ApiResponse flexibleLoanAdjustLtv( * * * @see Flexible - * Loan Borrow(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#flexible-loan-borrow">Flexible + * Loan Borrow (TRADE) Documentation */ private okhttp3.Call flexibleLoanBorrowCall(FlexibleLoanBorrowRequest flexibleLoanBorrowRequest) throws ApiException { @@ -542,8 +543,9 @@ private okhttp3.Call flexibleLoanBorrowValidateBeforeCall( } /** - * Flexible Loan Borrow(TRADE) Borrow Flexible Loan * Only available for master account * You - * can customize LTV by entering loanAmount and collateralAmount. Weight: 6000 + * Flexible Loan Borrow (TRADE) Borrow Flexible Loan Weight(IP): 6000 Security Type: TRADE + * Notes: - This endpoint is available for both master and sub-accounts. - You can customize LTV + * by entering `loanAmount` and `collateralAmount`. * * @param flexibleLoanBorrowRequest (required) * @return ApiResponse<FlexibleLoanBorrowResponse> @@ -557,8 +559,8 @@ private okhttp3.Call flexibleLoanBorrowValidateBeforeCall( * * * @see Flexible - * Loan Borrow(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#flexible-loan-borrow">Flexible + * Loan Borrow (TRADE) Documentation */ public ApiResponse flexibleLoanBorrow( @Valid @NotNull FlexibleLoanBorrowRequest flexibleLoanBorrowRequest) @@ -583,8 +585,8 @@ public ApiResponse flexibleLoanBorrow( * * * @see Flexible - * Loan Repay(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#flexible-loan-repay">Flexible + * Loan Repay (TRADE) Documentation */ private okhttp3.Call flexibleLoanRepayCall(FlexibleLoanRepayRequest flexibleLoanRepayRequest) throws ApiException { @@ -707,8 +709,8 @@ private okhttp3.Call flexibleLoanRepayValidateBeforeCall( } /** - * Flexible Loan Repay(TRADE) Flexible Loan Repay * repayAmount is mandatory even fullRepayment - * = FALSE Weight: 6000 + * Flexible Loan Repay (TRADE) Flexible Loan Repay Weight(IP): 6000 Security Type: TRADE Notes: + * - `repayAmount` is mandatory even when `fullRepayment = FALSE`. * * @param flexibleLoanRepayRequest (required) * @return ApiResponse<FlexibleLoanRepayResponse> @@ -722,8 +724,8 @@ private okhttp3.Call flexibleLoanRepayValidateBeforeCall( * * * @see Flexible - * Loan Repay(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#flexible-loan-repay">Flexible + * Loan Repay (TRADE) Documentation */ public ApiResponse flexibleLoanRepay( @Valid @NotNull FlexibleLoanRepayRequest flexibleLoanRepayRequest) throws ApiException { @@ -737,7 +739,7 @@ public ApiResponse flexibleLoanRepay( * Build call for getFlexibleLoanAssetsData * * @param loanCoin (optional) - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -748,8 +750,8 @@ public ApiResponse flexibleLoanRepay( * * * @see Get - * Flexible Loan Assets Data(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-assets-data">Get + * Flexible Loan Assets Data (USER_DATA) Documentation */ private okhttp3.Call getFlexibleLoanAssetsDataCall(String loanCoin, Long recvWindow) throws ApiException { @@ -849,11 +851,12 @@ private okhttp3.Call getFlexibleLoanAssetsDataValidateBeforeCall( } /** - * Get Flexible Loan Assets Data(USER_DATA) Get interest rate and borrow limit of flexible - * loanable assets. The borrow limit is shown in USD value. Weight: 400 + * Get Flexible Loan Assets Data (USER_DATA) Get interest rate and borrow limit of flexible + * loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 Security Type: + * USER_DATA * * @param loanCoin (optional) - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFlexibleLoanAssetsDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -865,11 +868,11 @@ private okhttp3.Call getFlexibleLoanAssetsDataValidateBeforeCall( * * * @see Get - * Flexible Loan Assets Data(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-assets-data">Get + * Flexible Loan Assets Data (USER_DATA) Documentation */ public ApiResponse getFlexibleLoanAssetsData( - String loanCoin, Long recvWindow) throws ApiException { + String loanCoin, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFlexibleLoanAssetsDataValidateBeforeCall(loanCoin, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -884,9 +887,9 @@ public ApiResponse getFlexibleLoanAssetsData( * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -897,8 +900,8 @@ public ApiResponse getFlexibleLoanAssetsData( * * * @see Get - * Flexible Loan Borrow History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-borrow-history">Get + * Flexible Loan Borrow History (USER_DATA) Documentation */ private okhttp3.Call getFlexibleLoanBorrowHistoryCall( String loanCoin, @@ -1044,17 +1047,19 @@ private okhttp3.Call getFlexibleLoanBorrowHistoryValidateBeforeCall( } /** - * Get Flexible Loan Borrow History(USER_DATA) Get Flexible Loan Borrow History * If startTime - * and endTime are not sent, the recent 90-day data will be returned. * The max interval between - * startTime and endTime is 180 days. Weight: 400 + * Get Flexible Loan Borrow History (USER_DATA) Get Flexible Loan Borrow History. It can be used + * to check history before 2024-02-27 08:00. Weight(IP): 400 Security Type: USER_DATA Notes: - + * If `startTime` and `endTime` are not sent, the recent 90-day data is + * returned. - The max interval between `startTime` and `endTime` is 180 + * days. * * @param loanCoin (optional) * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFlexibleLoanBorrowHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1066,17 +1071,17 @@ private okhttp3.Call getFlexibleLoanBorrowHistoryValidateBeforeCall( * * * @see Get - * Flexible Loan Borrow History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-borrow-history">Get + * Flexible Loan Borrow History (USER_DATA) Documentation */ public ApiResponse getFlexibleLoanBorrowHistory( String loanCoin, String collateralCoin, Long startTime, Long endTime, - Long current, - Long limit, - Long recvWindow) + @Min(1L) @Max(1000L) Long current, + @Max(100L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFlexibleLoanBorrowHistoryValidateBeforeCall( @@ -1090,7 +1095,7 @@ public ApiResponse getFlexibleLoanBorrowHi * Build call for getFlexibleLoanCollateralAssetsData * * @param collateralCoin (optional) - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1101,8 +1106,8 @@ public ApiResponse getFlexibleLoanBorrowHi * * * @see Get - * Flexible Loan Collateral Assets Data(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-collateral-assets-data">Get + * Flexible Loan Collateral Assets Data (USER_DATA) Documentation */ private okhttp3.Call getFlexibleLoanCollateralAssetsDataCall( String collateralCoin, Long recvWindow) throws ApiException { @@ -1206,12 +1211,12 @@ private okhttp3.Call getFlexibleLoanCollateralAssetsDataValidateBeforeCall( } /** - * Get Flexible Loan Collateral Assets Data(USER_DATA) Get LTV information and collateral limit - * of flexible loan's collateral assets. The collateral limit is shown in USD value. Weight: - * 400 + * Get Flexible Loan Collateral Assets Data (USER_DATA) Get LTV information and collateral limit + * of flexible loan's collateral assets. The collateral limit is shown in USD value. + * Weight(IP): 400 Security Type: USER_DATA * * @param collateralCoin (optional) - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFlexibleLoanCollateralAssetsDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1223,11 +1228,11 @@ private okhttp3.Call getFlexibleLoanCollateralAssetsDataValidateBeforeCall( * * * @see Get - * Flexible Loan Collateral Assets Data(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-collateral-assets-data">Get + * Flexible Loan Collateral Assets Data (USER_DATA) Documentation */ public ApiResponse - getFlexibleLoanCollateralAssetsData(String collateralCoin, Long recvWindow) + getFlexibleLoanCollateralAssetsData(String collateralCoin, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFlexibleLoanCollateralAssetsDataValidateBeforeCall(collateralCoin, recvWindow); @@ -1240,11 +1245,11 @@ private okhttp3.Call getFlexibleLoanCollateralAssetsDataValidateBeforeCall( * Build call for getFlexibleLoanInterestRateHistory * * @param coin (required) - * @param recvWindow (required) + * @param recvWindow Request validity window in milliseconds (required) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1255,7 +1260,7 @@ private okhttp3.Call getFlexibleLoanCollateralAssetsDataValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-interest-rate-history">Get * Flexible Loan Interest Rate History (USER_DATA) Documentation */ private okhttp3.Call getFlexibleLoanInterestRateHistoryCall( @@ -1383,15 +1388,16 @@ private okhttp3.Call getFlexibleLoanInterestRateHistoryValidateBeforeCall( /** * Get Flexible Loan Interest Rate History (USER_DATA) Check Flexible Loan interest rate history - * * If startTime and endTime are not sent, the recent 90-day data will be returned * The max - * interval between startTime and endTime is 90 days. * Time based on UTC+0. Weight: 400 + * Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and + * `endTime` are not sent, the recent 90-day data is returned. - The max interval + * between `startTime` and `endTime` is 90 days. - Time is based on UTC+0. * * @param coin (required) - * @param recvWindow (required) + * @param recvWindow Request validity window in milliseconds (required) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) * @return ApiResponse<GetFlexibleLoanInterestRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1403,17 +1409,17 @@ private okhttp3.Call getFlexibleLoanInterestRateHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-interest-rate-history">Get * Flexible Loan Interest Rate History (USER_DATA) Documentation */ public ApiResponse getFlexibleLoanInterestRateHistory( @NotNull String coin, - @NotNull Long recvWindow, + @NotNull @Max(60000L) Long recvWindow, Long startTime, Long endTime, - Long current, - Long limit) + @Min(1L) @Max(1000L) Long current, + @Max(100L) Long limit) throws ApiException { okhttp3.Call localVarCall = getFlexibleLoanInterestRateHistoryValidateBeforeCall( @@ -1430,9 +1436,9 @@ private okhttp3.Call getFlexibleLoanInterestRateHistoryValidateBeforeCall( * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1443,7 +1449,7 @@ private okhttp3.Call getFlexibleLoanInterestRateHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-liquidation-history">Get * Flexible Loan Liquidation History (USER_DATA) Documentation */ private okhttp3.Call getFlexibleLoanLiquidationHistoryCall( @@ -1590,15 +1596,16 @@ private okhttp3.Call getFlexibleLoanLiquidationHistoryValidateBeforeCall( } /** - * Get Flexible Loan Liquidation History (USER_DATA) Weight: 400 + * Get Flexible Loan Liquidation History (USER_DATA) Get Flexible Loan Liquidation History + * Weight(IP): 400 Security Type: USER_DATA * * @param loanCoin (optional) * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFlexibleLoanLiquidationHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1610,7 +1617,7 @@ private okhttp3.Call getFlexibleLoanLiquidationHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-liquidation-history">Get * Flexible Loan Liquidation History (USER_DATA) Documentation */ public ApiResponse getFlexibleLoanLiquidationHistory( @@ -1618,9 +1625,9 @@ public ApiResponse getFlexibleLoanLiq String collateralCoin, Long startTime, Long endTime, - Long current, - Long limit, - Long recvWindow) + @Min(1L) @Max(1000L) Long current, + @Max(100L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFlexibleLoanLiquidationHistoryValidateBeforeCall( @@ -1637,9 +1644,9 @@ public ApiResponse getFlexibleLoanLiq * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1650,8 +1657,8 @@ public ApiResponse getFlexibleLoanLiq * * * @see Get - * Flexible Loan LTV Adjustment History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-ltv-adjustment-history">Get + * Flexible Loan LTV Adjustment History (USER_DATA) Documentation */ private okhttp3.Call getFlexibleLoanLtvAdjustmentHistoryCall( String loanCoin, @@ -1797,17 +1804,19 @@ private okhttp3.Call getFlexibleLoanLtvAdjustmentHistoryValidateBeforeCall( } /** - * Get Flexible Loan LTV Adjustment History(USER_DATA) Get Flexible Loan LTV Adjustment History - * * If startTime and endTime are not sent, the recent 90-day data will be returned. * The max - * interval between startTime and endTime is 180 days. Weight: 400 + * Get Flexible Loan LTV Adjustment History (USER_DATA) Get Flexible Loan LTV Adjustment + * History. It can be used to check history before 2024-02-27 08:00. Weight(UID): 400 Security + * Type: USER_DATA Notes: - If `startTime` and `endTime` are not sent, the + * recent 90-day data is returned. - The max interval between `startTime` and + * `endTime` is 180 days. * * @param loanCoin (optional) * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFlexibleLoanLtvAdjustmentHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1819,8 +1828,8 @@ private okhttp3.Call getFlexibleLoanLtvAdjustmentHistoryValidateBeforeCall( * * * @see Get - * Flexible Loan LTV Adjustment History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-ltv-adjustment-history">Get + * Flexible Loan LTV Adjustment History (USER_DATA) Documentation */ public ApiResponse getFlexibleLoanLtvAdjustmentHistory( @@ -1828,9 +1837,9 @@ private okhttp3.Call getFlexibleLoanLtvAdjustmentHistoryValidateBeforeCall( String collateralCoin, Long startTime, Long endTime, - Long current, - Long limit, - Long recvWindow) + @Min(1L) @Max(1000L) Long current, + @Max(100L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFlexibleLoanLtvAdjustmentHistoryValidateBeforeCall( @@ -1845,9 +1854,9 @@ private okhttp3.Call getFlexibleLoanLtvAdjustmentHistoryValidateBeforeCall( * * @param loanCoin (optional) * @param collateralCoin (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1858,8 +1867,8 @@ private okhttp3.Call getFlexibleLoanLtvAdjustmentHistoryValidateBeforeCall( * * * @see Get - * Flexible Loan Ongoing Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-ongoing-orders">Get + * Flexible Loan Ongoing Orders (USER_DATA) Documentation */ private okhttp3.Call getFlexibleLoanOngoingOrdersCall( String loanCoin, String collateralCoin, Long current, Long limit, Long recvWindow) @@ -1981,13 +1990,14 @@ private okhttp3.Call getFlexibleLoanOngoingOrdersValidateBeforeCall( } /** - * Get Flexible Loan Ongoing Orders(USER_DATA) Get Flexible Loan Ongoing Orders Weight: 300 + * Get Flexible Loan Ongoing Orders (USER_DATA) Get Flexible Loan Ongoing Orders Weight(IP): 300 + * Security Type: USER_DATA * * @param loanCoin (optional) * @param collateralCoin (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFlexibleLoanOngoingOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1999,11 +2009,15 @@ private okhttp3.Call getFlexibleLoanOngoingOrdersValidateBeforeCall( * * * @see Get - * Flexible Loan Ongoing Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-ongoing-orders">Get + * Flexible Loan Ongoing Orders (USER_DATA) Documentation */ public ApiResponse getFlexibleLoanOngoingOrders( - String loanCoin, String collateralCoin, Long current, Long limit, Long recvWindow) + String loanCoin, + String collateralCoin, + @Min(1L) @Max(1000L) Long current, + @Max(100L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFlexibleLoanOngoingOrdersValidateBeforeCall( @@ -2020,9 +2034,9 @@ public ApiResponse getFlexibleLoanOngoingO * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2033,8 +2047,8 @@ public ApiResponse getFlexibleLoanOngoingO * * * @see Get - * Flexible Loan Repayment History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-repayment-history">Get + * Flexible Loan Repayment History (USER_DATA) Documentation */ private okhttp3.Call getFlexibleLoanRepaymentHistoryCall( String loanCoin, @@ -2180,17 +2194,19 @@ private okhttp3.Call getFlexibleLoanRepaymentHistoryValidateBeforeCall( } /** - * Get Flexible Loan Repayment History(USER_DATA) Get Flexible Loan Repayment History * If - * startTime and endTime are not sent, the recent 90-day data will be returned. * The max - * interval between startTime and endTime is 180 days. Weight: 400 + * Get Flexible Loan Repayment History (USER_DATA) Get Flexible Loan Repayment History. It can + * be used to check history before 2024-02-27 08:00. Weight(IP): 400 Security Type: USER_DATA + * Notes: - If `startTime` and `endTime` are not sent, the recent 90-day + * data is returned. - The max interval between `startTime` and `endTime` is + * 180 days. * * @param loanCoin (optional) * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetFlexibleLoanRepaymentHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2202,17 +2218,17 @@ private okhttp3.Call getFlexibleLoanRepaymentHistoryValidateBeforeCall( * * * @see Get - * Flexible Loan Repayment History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/flexible-rate#get-flexible-loan-repayment-history">Get + * Flexible Loan Repayment History (USER_DATA) Documentation */ public ApiResponse getFlexibleLoanRepaymentHistory( String loanCoin, String collateralCoin, Long startTime, Long endTime, - Long current, - Long limit, - Long recvWindow) + @Min(1L) @Max(1000L) Long current, + @Max(100L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFlexibleLoanRepaymentHistoryValidateBeforeCall( diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/StableRateApi.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/StableRateApi.java index 27443e60b..42e2446ff 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/StableRateApi.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/StableRateApi.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -15,16 +15,15 @@ import com.binance.connector.client.common.ApiClient; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.DecimalFormatter; import com.binance.connector.client.common.Pair; import com.binance.connector.client.common.SystemUtil; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.exception.ConstraintViolationException; -import com.binance.connector.client.crypto_loan.rest.model.CheckCollateralRepayRateStableRateResponse; import com.binance.connector.client.crypto_loan.rest.model.GetCryptoLoansIncomeHistoryResponse; import com.binance.connector.client.crypto_loan.rest.model.GetLoanBorrowHistoryResponse; import com.binance.connector.client.crypto_loan.rest.model.GetLoanLtvAdjustmentHistoryResponse; import com.binance.connector.client.crypto_loan.rest.model.GetLoanRepaymentHistoryResponse; +import com.binance.connector.client.crypto_loan.rest.model.OrderType; import com.google.gson.reflect.TypeToken; import jakarta.validation.ConstraintViolation; import jakarta.validation.Validation; @@ -47,7 +46,7 @@ public class StableRateApi { private static final String USER_AGENT = String.format( - "binance-crypto-loan/4.0.0 (Java/%s; %s; %s)", + "binance-crypto-loan/5.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -84,192 +83,15 @@ public void setCustomBaseUrl(String customBaseUrl) { this.localCustomBaseUrl = customBaseUrl; } - /** - * Build call for checkCollateralRepayRateStableRate - * - * @param loanCoin (required) - * @param collateralCoin (required) - * @param repayAmount repay amount of loanCoin (required) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Check Collateral Repay Rate -
- * - * @see Check - * Collateral Repay Rate(USER_DATA) Documentation - */ - private okhttp3.Call checkCollateralRepayRateStableRateCall( - String loanCoin, String collateralCoin, Double repayAmount, Long recvWindow) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/loan/repay/collateral/rate"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (loanCoin != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("loanCoin", loanCoin)); - } - - if (collateralCoin != null) { - localVarQueryParams.addAll( - localVarApiClient.parameterToPair("collateralCoin", collateralCoin)); - } - - if (repayAmount != null) { - localVarQueryParams.addAll( - localVarApiClient.parameterToPair( - "repayAmount", DecimalFormatter.getFormatter().format(repayAmount))); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call checkCollateralRepayRateStableRateValidateBeforeCall( - String loanCoin, String collateralCoin, Double repayAmount, Long recvWindow) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {loanCoin, collateralCoin, repayAmount, recvWindow}; - Method method = - this.getClass() - .getMethod( - "checkCollateralRepayRateStableRate", - String.class, - String.class, - Double.class, - Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return checkCollateralRepayRateStableRateCall( - loanCoin, collateralCoin, repayAmount, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Check Collateral Repay Rate(USER_DATA) Get the the rate of collateral coin / loan coin when - * using collateral repay, the rate will be valid within 8 second. Weight: 6000 - * - * @param loanCoin (required) - * @param collateralCoin (required) - * @param repayAmount repay amount of loanCoin (required) - * @param recvWindow (optional) - * @return ApiResponse<CheckCollateralRepayRateStableRateResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Check Collateral Repay Rate -
- * - * @see Check - * Collateral Repay Rate(USER_DATA) Documentation - */ - public ApiResponse - checkCollateralRepayRateStableRate( - @NotNull String loanCoin, - @NotNull String collateralCoin, - @NotNull Double repayAmount, - Long recvWindow) - throws ApiException { - okhttp3.Call localVarCall = - checkCollateralRepayRateStableRateValidateBeforeCall( - loanCoin, collateralCoin, repayAmount, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - /** * Build call for getCryptoLoansIncomeHistory * * @param asset (optional) - * @param type All types will be returned by default. Enum:`borrowIn` - * ,`collateralSpent`, `repayAmount`, - * `collateralReturn`(Collateral return after repayment), - * `addCollateral`, `removeCollateral`, - * `collateralReturnAfterLiquidation` (optional) + * @param type All types will be returned by default. (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -280,11 +102,11 @@ private okhttp3.Call checkCollateralRepayRateStableRateValidateBeforeCall( * * * @see Get - * Crypto Loans Income History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/stable-rate#get-crypto-loans-income-history">Get + * Crypto Loans Income History (USER_DATA) Documentation */ private okhttp3.Call getCryptoLoansIncomeHistoryCall( - String asset, String type, Long startTime, Long endTime, Long limit, Long recvWindow) + String asset, OrderType type, Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { String basePath = null; // Operation Servers @@ -366,7 +188,7 @@ private okhttp3.Call getCryptoLoansIncomeHistoryCall( @SuppressWarnings("rawtypes") private okhttp3.Call getCryptoLoansIncomeHistoryValidateBeforeCall( - String asset, String type, Long startTime, Long endTime, Long limit, Long recvWindow) + String asset, OrderType type, Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { try { Validator validator = @@ -383,7 +205,7 @@ private okhttp3.Call getCryptoLoansIncomeHistoryValidateBeforeCall( .getMethod( "getCryptoLoansIncomeHistory", String.class, - String.class, + OrderType.class, Long.class, Long.class, Long.class, @@ -407,20 +229,17 @@ private okhttp3.Call getCryptoLoansIncomeHistoryValidateBeforeCall( } /** - * Get Crypto Loans Income History(USER_DATA) Get Crypto Loans Income History * If startTime and - * endTime are not sent, the recent 7-day data will be returned. * The max interval between - * startTime and endTime is 30 days. Weight: 6000 + * Get Crypto Loans Income History (USER_DATA) Get Crypto Loans Income History Weight(UID): 6000 + * Security Type: USER_DATA Notes: - If `startTime` and `endTime` are both + * omitted, the most recent 7 days of data are returned. - The maximum interval between + * `startTime` and `endTime` is 30 days. * * @param asset (optional) - * @param type All types will be returned by default. Enum:`borrowIn` - * ,`collateralSpent`, `repayAmount`, - * `collateralReturn`(Collateral return after repayment), - * `addCollateral`, `removeCollateral`, - * `collateralReturnAfterLiquidation` (optional) + * @param type All types will be returned by default. (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetCryptoLoansIncomeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -432,11 +251,16 @@ private okhttp3.Call getCryptoLoansIncomeHistoryValidateBeforeCall( * * * @see Get - * Crypto Loans Income History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/stable-rate#get-crypto-loans-income-history">Get + * Crypto Loans Income History (USER_DATA) Documentation */ public ApiResponse getCryptoLoansIncomeHistory( - String asset, String type, Long startTime, Long endTime, Long limit, Long recvWindow) + String asset, + OrderType type, + Long startTime, + Long endTime, + @Max(100L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getCryptoLoansIncomeHistoryValidateBeforeCall( @@ -454,9 +278,9 @@ public ApiResponse getCryptoLoansIncomeHist * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -467,8 +291,8 @@ public ApiResponse getCryptoLoansIncomeHist * * * @see Get - * Loan Borrow History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/stable-rate#get-loan-borrow-history">Get + * Loan Borrow History (USER_DATA) Documentation */ private okhttp3.Call getLoanBorrowHistoryCall( Long orderId, @@ -628,18 +452,19 @@ private okhttp3.Call getLoanBorrowHistoryValidateBeforeCall( } /** - * Get Loan Borrow History(USER_DATA) Get Loan Borrow History * If startTime and endTime are not - * sent, the recent 90-day data will be returned. * The max interval between startTime and - * endTime is 180 days. Weight: 400 + * Get Loan Borrow History (USER_DATA) Get Loan Borrow History Weight(IP): 400 Security Type: + * USER_DATA Notes: - If `startTime` and `endTime` are not sent, the recent + * 90-day data is returned. - The max interval between `startTime` and + * `endTime` is 180 days. * * @param orderId orderId in `POST /sapi/v1/loan/borrow` (optional) * @param loanCoin (optional) * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetLoanBorrowHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -651,8 +476,8 @@ private okhttp3.Call getLoanBorrowHistoryValidateBeforeCall( * * * @see Get - * Loan Borrow History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/stable-rate#get-loan-borrow-history">Get + * Loan Borrow History (USER_DATA) Documentation */ public ApiResponse getLoanBorrowHistory( Long orderId, @@ -660,9 +485,9 @@ public ApiResponse getLoanBorrowHistory( String collateralCoin, Long startTime, Long endTime, - Long current, - Long limit, - Long recvWindow) + @Min(1L) @Max(1000L) Long current, + @Max(100L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getLoanBorrowHistoryValidateBeforeCall( @@ -687,9 +512,9 @@ public ApiResponse getLoanBorrowHistory( * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -700,8 +525,8 @@ public ApiResponse getLoanBorrowHistory( * * * @see Get - * Loan LTV Adjustment History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/stable-rate#get-loan-ltv-adjustment-history">Get + * Loan LTV Adjustment History (USER_DATA) Documentation */ private okhttp3.Call getLoanLtvAdjustmentHistoryCall( Long orderId, @@ -861,18 +686,19 @@ private okhttp3.Call getLoanLtvAdjustmentHistoryValidateBeforeCall( } /** - * Get Loan LTV Adjustment History(USER_DATA) Get Loan LTV Adjustment History * If startTime and - * endTime are not sent, the recent 90-day data will be returned. * The max interval between - * startTime and endTime is 180 days. Weight: 400 + * Get Loan LTV Adjustment History (USER_DATA) Get Loan LTV Adjustment History Weight(IP): 400 + * Security Type: USER_DATA Notes: - If `startTime` and `endTime` are not + * sent, the recent 90-day data is returned. - The max interval between `startTime` + * and `endTime` is 180 days. * * @param orderId orderId in `POST /sapi/v1/loan/borrow` (optional) * @param loanCoin (optional) * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetLoanLtvAdjustmentHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -884,8 +710,8 @@ private okhttp3.Call getLoanLtvAdjustmentHistoryValidateBeforeCall( * * * @see Get - * Loan LTV Adjustment History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/stable-rate#get-loan-ltv-adjustment-history">Get + * Loan LTV Adjustment History (USER_DATA) Documentation */ public ApiResponse getLoanLtvAdjustmentHistory( Long orderId, @@ -893,9 +719,9 @@ public ApiResponse getLoanLtvAdjustmentHist String collateralCoin, Long startTime, Long endTime, - Long current, - Long limit, - Long recvWindow) + @Min(1L) @Max(1000L) Long current, + @Max(100L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getLoanLtvAdjustmentHistoryValidateBeforeCall( @@ -920,9 +746,9 @@ public ApiResponse getLoanLtvAdjustmentHist * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -933,8 +759,8 @@ public ApiResponse getLoanLtvAdjustmentHist * * * @see Get - * Loan Repayment History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/stable-rate#get-loan-repayment-history">Get + * Loan Repayment History (USER_DATA) Documentation */ private okhttp3.Call getLoanRepaymentHistoryCall( Long orderId, @@ -1094,18 +920,19 @@ private okhttp3.Call getLoanRepaymentHistoryValidateBeforeCall( } /** - * Get Loan Repayment History(USER_DATA) Get Loan Repayment History * If startTime and endTime - * are not sent, the recent 90-day data will be returned. * The max interval between startTime - * and endTime is 180 days. Weight: 400 + * Get Loan Repayment History (USER_DATA) Get Loan Repayment History Weight(IP): 400 Security + * Type: USER_DATA Notes: - If `startTime` and `endTime` are not sent, the + * recent 90-day data is returned. - The max interval between `startTime` and + * `endTime` is 180 days. * * @param orderId orderId in `POST /sapi/v1/loan/borrow` (optional) * @param loanCoin (optional) * @param collateralCoin (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) - * @param recvWindow (optional) + * @param current Current querying page (optional) + * @param limit Number of records to return (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetLoanRepaymentHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1117,8 +944,8 @@ private okhttp3.Call getLoanRepaymentHistoryValidateBeforeCall( * * * @see Get - * Loan Repayment History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-crypto-loan/api/rest-api/stable-rate#get-loan-repayment-history">Get + * Loan Repayment History (USER_DATA) Documentation */ public ApiResponse getLoanRepaymentHistory( Long orderId, @@ -1126,9 +953,9 @@ public ApiResponse getLoanRepaymentHistory( String collateralCoin, Long startTime, Long endTime, - Long current, - Long limit, - Long recvWindow) + @Min(1L) @Max(1000L) Long current, + @Max(100L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getLoanRepaymentHistoryValidateBeforeCall( diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/CheckCollateralRepayRateResponse.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/CheckCollateralRepayRateResponse.java index dc50945c3..748e4491b 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/CheckCollateralRepayRateResponse.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/CheckCollateralRepayRateResponse.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CheckCollateralRepayRateResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CheckCollateralRepayRateResponse { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/CheckCollateralRepayRateStableRateResponse.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/CheckCollateralRepayRateStableRateResponse.java deleted file mode 100644 index 5f6640b0b..000000000 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/CheckCollateralRepayRateStableRateResponse.java +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.crypto_loan.rest.model; - -import com.binance.connector.client.crypto_loan.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** CheckCollateralRepayRateStableRateResponse */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CheckCollateralRepayRateStableRateResponse { - public static final String SERIALIZED_NAME_LOANL_COIN = "loanlCoin"; - - @SerializedName(SERIALIZED_NAME_LOANL_COIN) - @jakarta.annotation.Nullable - private String loanlCoin; - - public static final String SERIALIZED_NAME_COLLATERAL_COIN = "collateralCoin"; - - @SerializedName(SERIALIZED_NAME_COLLATERAL_COIN) - @jakarta.annotation.Nullable - private String collateralCoin; - - public static final String SERIALIZED_NAME_REPAY_AMOUNT = "repayAmount"; - - @SerializedName(SERIALIZED_NAME_REPAY_AMOUNT) - @jakarta.annotation.Nullable - private String repayAmount; - - public static final String SERIALIZED_NAME_RATE = "rate"; - - @SerializedName(SERIALIZED_NAME_RATE) - @jakarta.annotation.Nullable - private String rate; - - public CheckCollateralRepayRateStableRateResponse() {} - - public CheckCollateralRepayRateStableRateResponse loanlCoin( - @jakarta.annotation.Nullable String loanlCoin) { - this.loanlCoin = loanlCoin; - return this; - } - - /** - * Get loanlCoin - * - * @return loanlCoin - */ - @jakarta.annotation.Nullable - public String getLoanlCoin() { - return loanlCoin; - } - - public void setLoanlCoin(@jakarta.annotation.Nullable String loanlCoin) { - this.loanlCoin = loanlCoin; - } - - public CheckCollateralRepayRateStableRateResponse collateralCoin( - @jakarta.annotation.Nullable String collateralCoin) { - this.collateralCoin = collateralCoin; - return this; - } - - /** - * Get collateralCoin - * - * @return collateralCoin - */ - @jakarta.annotation.Nullable - public String getCollateralCoin() { - return collateralCoin; - } - - public void setCollateralCoin(@jakarta.annotation.Nullable String collateralCoin) { - this.collateralCoin = collateralCoin; - } - - public CheckCollateralRepayRateStableRateResponse repayAmount( - @jakarta.annotation.Nullable String repayAmount) { - this.repayAmount = repayAmount; - return this; - } - - /** - * Get repayAmount - * - * @return repayAmount - */ - @jakarta.annotation.Nullable - public String getRepayAmount() { - return repayAmount; - } - - public void setRepayAmount(@jakarta.annotation.Nullable String repayAmount) { - this.repayAmount = repayAmount; - } - - public CheckCollateralRepayRateStableRateResponse rate( - @jakarta.annotation.Nullable String rate) { - this.rate = rate; - return this; - } - - /** - * Get rate - * - * @return rate - */ - @jakarta.annotation.Nullable - public String getRate() { - return rate; - } - - public void setRate(@jakarta.annotation.Nullable String rate) { - this.rate = rate; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckCollateralRepayRateStableRateResponse checkCollateralRepayRateStableRateResponse = - (CheckCollateralRepayRateStableRateResponse) o; - return Objects.equals(this.loanlCoin, checkCollateralRepayRateStableRateResponse.loanlCoin) - && Objects.equals( - this.collateralCoin, - checkCollateralRepayRateStableRateResponse.collateralCoin) - && Objects.equals( - this.repayAmount, checkCollateralRepayRateStableRateResponse.repayAmount) - && Objects.equals(this.rate, checkCollateralRepayRateStableRateResponse.rate); - } - - @Override - public int hashCode() { - return Objects.hash(loanlCoin, collateralCoin, repayAmount, rate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckCollateralRepayRateStableRateResponse {\n"); - sb.append(" loanlCoin: ").append(toIndentedString(loanlCoin)).append("\n"); - sb.append(" collateralCoin: ").append(toIndentedString(collateralCoin)).append("\n"); - sb.append(" repayAmount: ").append(toIndentedString(repayAmount)).append("\n"); - sb.append(" rate: ").append(toIndentedString(rate)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object loanlCoinValue = getLoanlCoin(); - String loanlCoinValueAsString = ""; - loanlCoinValueAsString = loanlCoinValue.toString(); - sb.append("loanlCoin=").append(urlEncode(loanlCoinValueAsString)).append(""); - Object collateralCoinValue = getCollateralCoin(); - String collateralCoinValueAsString = ""; - collateralCoinValueAsString = collateralCoinValue.toString(); - sb.append("collateralCoin=").append(urlEncode(collateralCoinValueAsString)).append(""); - Object repayAmountValue = getRepayAmount(); - String repayAmountValueAsString = ""; - repayAmountValueAsString = repayAmountValue.toString(); - sb.append("repayAmount=").append(urlEncode(repayAmountValueAsString)).append(""); - Object rateValue = getRate(); - String rateValueAsString = ""; - rateValueAsString = rateValue.toString(); - sb.append("rate=").append(urlEncode(rateValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("loanlCoin"); - openapiFields.add("collateralCoin"); - openapiFields.add("repayAmount"); - openapiFields.add("rate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * CheckCollateralRepayRateStableRateResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CheckCollateralRepayRateStableRateResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " CheckCollateralRepayRateStableRateResponse is not found in" - + " the empty JSON string", - CheckCollateralRepayRateStableRateResponse.openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("loanlCoin") != null && !jsonObj.get("loanlCoin").isJsonNull()) - && !jsonObj.get("loanlCoin").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `loanlCoin` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("loanlCoin").toString())); - } - if ((jsonObj.get("collateralCoin") != null && !jsonObj.get("collateralCoin").isJsonNull()) - && !jsonObj.get("collateralCoin").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `collateralCoin` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("collateralCoin").toString())); - } - if ((jsonObj.get("repayAmount") != null && !jsonObj.get("repayAmount").isJsonNull()) - && !jsonObj.get("repayAmount").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `repayAmount` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("repayAmount").toString())); - } - if ((jsonObj.get("rate") != null && !jsonObj.get("rate").isJsonNull()) - && !jsonObj.get("rate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `rate` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("rate").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckCollateralRepayRateStableRateResponse.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'CheckCollateralRepayRateStableRateResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CheckCollateralRepayRateStableRateResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, CheckCollateralRepayRateStableRateResponse value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckCollateralRepayRateStableRateResponse read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CheckCollateralRepayRateStableRateResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckCollateralRepayRateStableRateResponse - * @throws IOException if the JSON string is invalid with respect to - * CheckCollateralRepayRateStableRateResponse - */ - public static CheckCollateralRepayRateStableRateResponse fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, CheckCollateralRepayRateStableRateResponse.class); - } - - /** - * Convert an instance of CheckCollateralRepayRateStableRateResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/Direction.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/Direction.java new file mode 100644 index 000000000..c32b28a7a --- /dev/null +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/Direction.java @@ -0,0 +1,73 @@ +/* + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.crypto_loan.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets direction */ +@JsonAdapter(Direction.Adapter.class) +public enum Direction { + ADDITIONAL("ADDITIONAL"), + + REDUCED("REDUCED"); + + private String value; + + Direction(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Direction fromValue(String value) { + for (Direction b : Direction.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Direction enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Direction read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Direction.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Direction.fromValue(value); + } +} diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanAdjustLtvRequest.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanAdjustLtvRequest.java index 2584b90a8..7bee6a139 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanAdjustLtvRequest.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanAdjustLtvRequest.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** FlexibleLoanAdjustLtvRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FlexibleLoanAdjustLtvRequest { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; @@ -59,7 +59,7 @@ public class FlexibleLoanAdjustLtvRequest { @SerializedName(SERIALIZED_NAME_DIRECTION) @jakarta.annotation.Nonnull - private String direction; + private Direction direction; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -132,7 +132,7 @@ public void setAdjustmentAmount(@jakarta.annotation.Nonnull Double adjustmentAmo this.adjustmentAmount = adjustmentAmount; } - public FlexibleLoanAdjustLtvRequest direction(@jakarta.annotation.Nonnull String direction) { + public FlexibleLoanAdjustLtvRequest direction(@jakarta.annotation.Nonnull Direction direction) { this.direction = direction; return this; } @@ -144,11 +144,12 @@ public FlexibleLoanAdjustLtvRequest direction(@jakarta.annotation.Nonnull String */ @jakarta.annotation.Nonnull @NotNull - public String getDirection() { + @Valid + public Direction getDirection() { return direction; } - public void setDirection(@jakarta.annotation.Nonnull String direction) { + public void setDirection(@jakarta.annotation.Nonnull Direction direction) { this.direction = direction; } @@ -158,11 +159,12 @@ public FlexibleLoanAdjustLtvRequest recvWindow(@jakarta.annotation.Nullable Long } /** - * Get recvWindow + * Request validity window in milliseconds maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -315,13 +317,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("collateralCoin").toString())); } - if (!jsonObj.get("direction").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `direction` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("direction").toString())); - } + // validate the required field `direction` + Direction.validateJsonElement(jsonObj.get("direction")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanAdjustLtvResponse.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanAdjustLtvResponse.java index 68a7aefef..6a1a8a237 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanAdjustLtvResponse.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanAdjustLtvResponse.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FlexibleLoanAdjustLtvResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FlexibleLoanAdjustLtvResponse { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; @@ -178,7 +178,7 @@ public FlexibleLoanAdjustLtvResponse status(@jakarta.annotation.Nullable String } /** - * Get status + * Succeeds, Failed, Processing * * @return status */ diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanBorrowRequest.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanBorrowRequest.java index 4eef6e804..472e2012a 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanBorrowRequest.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanBorrowRequest.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** FlexibleLoanBorrowRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FlexibleLoanBorrowRequest { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; @@ -95,7 +95,7 @@ public FlexibleLoanBorrowRequest loanAmount(@jakarta.annotation.Nullable Double } /** - * Get loanAmount + * Mandatory when collateralAmount is empty * * @return loanAmount */ @@ -137,7 +137,7 @@ public FlexibleLoanBorrowRequest collateralAmount( } /** - * Get collateralAmount + * Mandatory when loanAmount is empty * * @return collateralAmount */ @@ -157,11 +157,12 @@ public FlexibleLoanBorrowRequest recvWindow(@jakarta.annotation.Nullable Long re } /** - * Get recvWindow + * Request validity window in milliseconds maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanBorrowResponse.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanBorrowResponse.java index 42ad3639f..a3657f5b0 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanBorrowResponse.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanBorrowResponse.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FlexibleLoanBorrowResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FlexibleLoanBorrowResponse { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanRepayRequest.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanRepayRequest.java index 8f2040558..5c1cfa440 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanRepayRequest.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanRepayRequest.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** FlexibleLoanRepayRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FlexibleLoanRepayRequest { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; @@ -59,19 +59,19 @@ public class FlexibleLoanRepayRequest { @SerializedName(SERIALIZED_NAME_COLLATERAL_RETURN) @jakarta.annotation.Nullable - private Boolean collateralReturn; + private Boolean collateralReturn = true; public static final String SERIALIZED_NAME_FULL_REPAYMENT = "fullRepayment"; @SerializedName(SERIALIZED_NAME_FULL_REPAYMENT) @jakarta.annotation.Nullable - private Boolean fullRepayment; + private Boolean fullRepayment = false; public static final String SERIALIZED_NAME_REPAYMENT_TYPE = "repaymentType"; @SerializedName(SERIALIZED_NAME_REPAYMENT_TYPE) @jakarta.annotation.Nullable - private Long repaymentType; + private RepaymentType repaymentType = RepaymentType.REPAYMENT_TYPE_1; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -150,7 +150,8 @@ public FlexibleLoanRepayRequest collateralReturn( } /** - * Get collateralReturn + * TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order and + * lower LTV. * * @return collateralReturn */ @@ -170,7 +171,7 @@ public FlexibleLoanRepayRequest fullRepayment( } /** - * Get fullRepayment + * TRUE: Full repayment; FALSE: Partial repayment based on loan amount * * @return fullRepayment */ @@ -183,7 +184,8 @@ public void setFullRepayment(@jakarta.annotation.Nullable Boolean fullRepayment) this.fullRepayment = fullRepayment; } - public FlexibleLoanRepayRequest repaymentType(@jakarta.annotation.Nullable Long repaymentType) { + public FlexibleLoanRepayRequest repaymentType( + @jakarta.annotation.Nullable RepaymentType repaymentType) { this.repaymentType = repaymentType; return this; } @@ -194,11 +196,12 @@ public FlexibleLoanRepayRequest repaymentType(@jakarta.annotation.Nullable Long * @return repaymentType */ @jakarta.annotation.Nullable - public Long getRepaymentType() { + @Valid + public RepaymentType getRepaymentType() { return repaymentType; } - public void setRepaymentType(@jakarta.annotation.Nullable Long repaymentType) { + public void setRepaymentType(@jakarta.annotation.Nullable RepaymentType repaymentType) { this.repaymentType = repaymentType; } @@ -208,11 +211,12 @@ public FlexibleLoanRepayRequest recvWindow(@jakarta.annotation.Nullable Long rec } /** - * Get recvWindow + * Request validity window in milliseconds maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -382,6 +386,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("collateralCoin").toString())); } + // validate the optional field `repaymentType` + if (jsonObj.get("repaymentType") != null && !jsonObj.get("repaymentType").isJsonNull()) { + RepaymentType.validateJsonElement(jsonObj.get("repaymentType")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanRepayResponse.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanRepayResponse.java index 567519f1b..e6d7186dd 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanRepayResponse.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/FlexibleLoanRepayResponse.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FlexibleLoanRepayResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FlexibleLoanRepayResponse { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; @@ -204,7 +204,7 @@ public FlexibleLoanRepayResponse repayStatus(@jakarta.annotation.Nullable String } /** - * Get repayStatus + * REPAID, REPAYING, FAILED * * @return repayStatus */ diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetCryptoLoansIncomeHistoryResponse.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetCryptoLoansIncomeHistoryResponse.java index 7cc597406..8100b52f7 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetCryptoLoansIncomeHistoryResponse.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetCryptoLoansIncomeHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetCryptoLoansIncomeHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCryptoLoansIncomeHistoryResponse extends ArrayList { public GetCryptoLoansIncomeHistoryResponse() {} diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetCryptoLoansIncomeHistoryResponseInner.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetCryptoLoansIncomeHistoryResponseInner.java index 6c042e013..52dfc6bdc 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetCryptoLoansIncomeHistoryResponseInner.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetCryptoLoansIncomeHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetCryptoLoansIncomeHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCryptoLoansIncomeHistoryResponseInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanAssetsDataResponse.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanAssetsDataResponse.java index 432062926..c7904a402 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanAssetsDataResponse.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanAssetsDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetFlexibleLoanAssetsDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleLoanAssetsDataResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanAssetsDataResponseRowsInner.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanAssetsDataResponseRowsInner.java index f16b62c04..9b73b28eb 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanAssetsDataResponseRowsInner.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanAssetsDataResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFlexibleLoanAssetsDataResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleLoanAssetsDataResponseRowsInner { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanBorrowHistoryResponse.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanBorrowHistoryResponse.java index 825f1b682..eaefe21e3 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanBorrowHistoryResponse.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanBorrowHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetFlexibleLoanBorrowHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleLoanBorrowHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanBorrowHistoryResponseRowsInner.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanBorrowHistoryResponseRowsInner.java index 436f0fccf..1465f845d 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanBorrowHistoryResponseRowsInner.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanBorrowHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFlexibleLoanBorrowHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleLoanBorrowHistoryResponseRowsInner { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanCollateralAssetsDataResponse.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanCollateralAssetsDataResponse.java index 64c44d874..3719f1f05 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanCollateralAssetsDataResponse.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanCollateralAssetsDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetFlexibleLoanCollateralAssetsDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleLoanCollateralAssetsDataResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanCollateralAssetsDataResponseRowsInner.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanCollateralAssetsDataResponseRowsInner.java index 5d1c7ae75..c86c1a96c 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanCollateralAssetsDataResponseRowsInner.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanCollateralAssetsDataResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFlexibleLoanCollateralAssetsDataResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleLoanCollateralAssetsDataResponseRowsInner { public static final String SERIALIZED_NAME_COLLATERAL_COIN = "collateralCoin"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanInterestRateHistoryResponse.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanInterestRateHistoryResponse.java index 8f629b3bf..d3a2d4d1d 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanInterestRateHistoryResponse.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanInterestRateHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetFlexibleLoanInterestRateHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleLoanInterestRateHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanInterestRateHistoryResponseRowsInner.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanInterestRateHistoryResponseRowsInner.java index 91e16c6b2..05d4693a2 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanInterestRateHistoryResponseRowsInner.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanInterestRateHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFlexibleLoanInterestRateHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleLoanInterestRateHistoryResponseRowsInner { public static final String SERIALIZED_NAME_COIN = "coin"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanLiquidationHistoryResponse.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanLiquidationHistoryResponse.java index 7cd6f3b2b..8cfa26ff6 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanLiquidationHistoryResponse.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanLiquidationHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetFlexibleLoanLiquidationHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleLoanLiquidationHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanLiquidationHistoryResponseRowsInner.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanLiquidationHistoryResponseRowsInner.java index 261c1cc10..ee829a5cf 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanLiquidationHistoryResponseRowsInner.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanLiquidationHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFlexibleLoanLiquidationHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleLoanLiquidationHistoryResponseRowsInner { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanLtvAdjustmentHistoryResponse.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanLtvAdjustmentHistoryResponse.java index debfed21d..0e8770fe7 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanLtvAdjustmentHistoryResponse.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanLtvAdjustmentHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetFlexibleLoanLtvAdjustmentHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleLoanLtvAdjustmentHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanLtvAdjustmentHistoryResponseRowsInner.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanLtvAdjustmentHistoryResponseRowsInner.java index 1d291c994..634954b03 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanLtvAdjustmentHistoryResponseRowsInner.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanLtvAdjustmentHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFlexibleLoanLtvAdjustmentHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleLoanLtvAdjustmentHistoryResponseRowsInner { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanOngoingOrdersResponse.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanOngoingOrdersResponse.java index 78eea088c..b298e642a 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanOngoingOrdersResponse.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanOngoingOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetFlexibleLoanOngoingOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleLoanOngoingOrdersResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanOngoingOrdersResponseRowsInner.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanOngoingOrdersResponseRowsInner.java index 0b95c5a41..04877a20c 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanOngoingOrdersResponseRowsInner.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanOngoingOrdersResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFlexibleLoanOngoingOrdersResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleLoanOngoingOrdersResponseRowsInner { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanRepaymentHistoryResponse.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanRepaymentHistoryResponse.java index 5c56ad130..28f85de6e 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanRepaymentHistoryResponse.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanRepaymentHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetFlexibleLoanRepaymentHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleLoanRepaymentHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanRepaymentHistoryResponseRowsInner.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanRepaymentHistoryResponseRowsInner.java index 5c1158724..60f59eda9 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanRepaymentHistoryResponseRowsInner.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetFlexibleLoanRepaymentHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFlexibleLoanRepaymentHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleLoanRepaymentHistoryResponseRowsInner { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanBorrowHistoryResponse.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanBorrowHistoryResponse.java index 6f70f78b2..29cfdaf07 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanBorrowHistoryResponse.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanBorrowHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetLoanBorrowHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLoanBorrowHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanBorrowHistoryResponseRowsInner.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanBorrowHistoryResponseRowsInner.java index e0ab5c660..a5009c1d6 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanBorrowHistoryResponseRowsInner.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanBorrowHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetLoanBorrowHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLoanBorrowHistoryResponseRowsInner { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -261,7 +261,7 @@ public GetLoanBorrowHistoryResponseRowsInner status( } /** - * Get status + * Accruing_Interest, Overdue, Liquidating, Repaying, Repaid, Liquidated, Pending, Failed * * @return status */ diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanLtvAdjustmentHistoryResponse.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanLtvAdjustmentHistoryResponse.java index d5143fefd..18d7aceac 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanLtvAdjustmentHistoryResponse.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanLtvAdjustmentHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetLoanLtvAdjustmentHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLoanLtvAdjustmentHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanLtvAdjustmentHistoryResponseRowsInner.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanLtvAdjustmentHistoryResponseRowsInner.java index 85e0c19fc..085a8310e 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanLtvAdjustmentHistoryResponseRowsInner.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanLtvAdjustmentHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetLoanLtvAdjustmentHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLoanLtvAdjustmentHistoryResponseRowsInner { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanRepaymentHistoryResponse.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanRepaymentHistoryResponse.java index f10a10721..0d2b52e8a 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanRepaymentHistoryResponse.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanRepaymentHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetLoanRepaymentHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLoanRepaymentHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanRepaymentHistoryResponseRowsInner.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanRepaymentHistoryResponseRowsInner.java index 83c323e60..a73b21ac3 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanRepaymentHistoryResponseRowsInner.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/GetLoanRepaymentHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetLoanRepaymentHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLoanRepaymentHistoryResponseRowsInner { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/OrderType.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/OrderType.java new file mode 100644 index 000000000..9df8e8473 --- /dev/null +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/OrderType.java @@ -0,0 +1,83 @@ +/* + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.crypto_loan.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets orderType */ +@JsonAdapter(OrderType.Adapter.class) +public enum OrderType { + borrowIn("borrowIn"), + + collateralSpent("collateralSpent"), + + repayAmount("repayAmount"), + + collateralReturn("collateralReturn"), + + addCollateral("addCollateral"), + + removeCollateral("removeCollateral"), + + collateralReturnAfterLiquidation("collateralReturnAfterLiquidation"); + + private String value; + + OrderType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderType fromValue(String value) { + for (OrderType b : OrderType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderType.fromValue(value); + } +} diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/RepaymentType.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/RepaymentType.java new file mode 100644 index 000000000..e0e0cd18b --- /dev/null +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/model/RepaymentType.java @@ -0,0 +1,73 @@ +/* + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.crypto_loan.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** 1: Repayment with loan asset; 2: Repayment with collateral */ +@JsonAdapter(RepaymentType.Adapter.class) +public enum RepaymentType { + REPAYMENT_TYPE_1(1l), + + REPAYMENT_TYPE_2(2l); + + private Long value; + + RepaymentType(Long value) { + this.value = value; + } + + public Long getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static RepaymentType fromValue(Long value) { + for (RepaymentType b : RepaymentType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final RepaymentType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public RepaymentType read(final JsonReader jsonReader) throws IOException { + Long value = jsonReader.nextLong(); + return RepaymentType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + Long value = jsonElement.getAsLong(); + RepaymentType.fromValue(value); + } +} diff --git a/clients/crypto-loan/src/test/java/com/binance/connector/client/crypto_loan/rest/api/FlexibleRateApiTest.java b/clients/crypto-loan/src/test/java/com/binance/connector/client/crypto_loan/rest/api/FlexibleRateApiTest.java index 9f0903599..800c2a90e 100644 --- a/clients/crypto-loan/src/test/java/com/binance/connector/client/crypto_loan/rest/api/FlexibleRateApiTest.java +++ b/clients/crypto-loan/src/test/java/com/binance/connector/client/crypto_loan/rest/api/FlexibleRateApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -24,6 +24,7 @@ import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; import com.binance.connector.client.crypto_loan.rest.model.CheckCollateralRepayRateResponse; +import com.binance.connector.client.crypto_loan.rest.model.Direction; import com.binance.connector.client.crypto_loan.rest.model.FlexibleLoanAdjustLtvRequest; import com.binance.connector.client.crypto_loan.rest.model.FlexibleLoanAdjustLtvResponse; import com.binance.connector.client.crypto_loan.rest.model.FlexibleLoanBorrowRequest; @@ -33,11 +34,13 @@ import com.binance.connector.client.crypto_loan.rest.model.GetFlexibleLoanAssetsDataResponse; import com.binance.connector.client.crypto_loan.rest.model.GetFlexibleLoanBorrowHistoryResponse; import com.binance.connector.client.crypto_loan.rest.model.GetFlexibleLoanCollateralAssetsDataResponse; +import com.binance.connector.client.crypto_loan.rest.model.GetFlexibleLoanInterestRateHistoryResponse; import com.binance.connector.client.crypto_loan.rest.model.GetFlexibleLoanLiquidationHistoryResponse; import com.binance.connector.client.crypto_loan.rest.model.GetFlexibleLoanLtvAdjustmentHistoryResponse; import com.binance.connector.client.crypto_loan.rest.model.GetFlexibleLoanOngoingOrdersResponse; import com.binance.connector.client.crypto_loan.rest.model.GetFlexibleLoanRepaymentHistoryResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -89,16 +92,17 @@ public void initApiClient() throws ApiException { } /** - * Check Collateral Repay Rate (USER_DATA) + * Check Collateral Flexible Repay Rate (USER_DATA) * - *

Weight: 6000 + *

Get the latest rate of collateral coin/loan coin when using collateral repay. Weight(IP): + * 6000 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void checkCollateralRepayRateTest() throws ApiException, CryptoException { - String loanCoin = ""; - String collateralCoin = ""; + public void checkCollateralRepayRateTest() throws ApiException, CryptoException, IOException { + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long recvWindow = 5000L; ApiResponse response = api.checkCollateralRepayRate(loanCoin, collateralCoin, recvWindow); @@ -113,32 +117,29 @@ public void checkCollateralRepayRateTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("loanCoin=BUSD&collateralCoin=BNB&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "loanCoin=&collateralCoin=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "f49759cc0241450a3fbea110128c62034563a77fc6c27127278cd4e405221aa5", + "d928699696f9c267362b3ebbfee53b6a4b0d4f68bd6d71d8e8bbdceda8f83471", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v2/loan/flexible/repay/rate", actualRequest.url().encodedPath()); } /** - * Flexible Loan Adjust LTV(TRADE) + * Flexible Loan Adjust LTV (TRADE) * - *

Flexible Loan Adjust LTV * API Key needs Spot & Margin Trading permission for this - * endpoint Weight: 6000 + *

Flexible Loan Adjust LTV Weight(UID): 6000 Security Type: TRADE Notes: - API key needs + * Spot & Margin Trading permission for this endpoint. * * @throws ApiException if the Api call fails */ @Test - public void flexibleLoanAdjustLtvTest() throws ApiException, CryptoException { + public void flexibleLoanAdjustLtvTest() throws ApiException, CryptoException, IOException { FlexibleLoanAdjustLtvRequest flexibleLoanAdjustLtvRequest = new FlexibleLoanAdjustLtvRequest(); - - flexibleLoanAdjustLtvRequest.loanCoin(""); - flexibleLoanAdjustLtvRequest.collateralCoin(""); + flexibleLoanAdjustLtvRequest.loanCoin("BUSD"); + flexibleLoanAdjustLtvRequest.collateralCoin("BNB"); flexibleLoanAdjustLtvRequest.adjustmentAmount(1d); - flexibleLoanAdjustLtvRequest.direction(""); + flexibleLoanAdjustLtvRequest.direction(Direction.ADDITIONAL); ApiResponse response = api.flexibleLoanAdjustLtv(flexibleLoanAdjustLtvRequest); @@ -153,29 +154,27 @@ public void flexibleLoanAdjustLtvTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000collateralCoin=BNB&loanCoin=BUSD&adjustmentAmount=1&direction=ADDITIONAL", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000collateralCoin=&loanCoin=&adjustmentAmount=1&direction=", - signInputCaptor.getValue()); - assertEquals( - "120fe5c873088b09decd8c270c42e9103ac3f348610822ddbe5289943918baba", + "d03ac468f3616df1e9fef9f71d49dab050a34e66e4485c9912bf6a6f137ab45e", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v2/loan/flexible/adjust/ltv", actualRequest.url().encodedPath()); } /** - * Flexible Loan Borrow(TRADE) + * Flexible Loan Borrow (TRADE) * - *

Borrow Flexible Loan * Only available for master account * You can customize LTV by - * entering loanAmount and collateralAmount. Weight: 6000 + *

Borrow Flexible Loan Weight(IP): 6000 Security Type: TRADE Notes: - This endpoint is + * available for both master and sub-accounts. - You can customize LTV by entering + * `loanAmount` and `collateralAmount`. * * @throws ApiException if the Api call fails */ @Test - public void flexibleLoanBorrowTest() throws ApiException, CryptoException { + public void flexibleLoanBorrowTest() throws ApiException, CryptoException, IOException { FlexibleLoanBorrowRequest flexibleLoanBorrowRequest = new FlexibleLoanBorrowRequest(); - - flexibleLoanBorrowRequest.loanCoin(""); - flexibleLoanBorrowRequest.collateralCoin(""); + flexibleLoanBorrowRequest.loanCoin("BUSD"); + flexibleLoanBorrowRequest.collateralCoin("BNB"); ApiResponse response = api.flexibleLoanBorrow(flexibleLoanBorrowRequest); @@ -190,28 +189,25 @@ public void flexibleLoanBorrowTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000collateralCoin=BNB&loanCoin=BUSD", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000collateralCoin=&loanCoin=", signInputCaptor.getValue()); - assertEquals( - "4ce6b14df8387f7fad89b74f1f6fc807a3864ed56315be51e7e2b637e342a67d", - actualRequest.url().queryParameter("signature")); + "98137ddb1b5ed3156359ea512911509a84e6ebac0075ba7d28bd1490abc5dbed", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v2/loan/flexible/borrow", actualRequest.url().encodedPath()); } /** - * Flexible Loan Repay(TRADE) + * Flexible Loan Repay (TRADE) * - *

Flexible Loan Repay * repayAmount is mandatory even fullRepayment = FALSE Weight: - * 6000 + *

Flexible Loan Repay Weight(IP): 6000 Security Type: TRADE Notes: - `repayAmount` + * is mandatory even when `fullRepayment = FALSE`. * * @throws ApiException if the Api call fails */ @Test - public void flexibleLoanRepayTest() throws ApiException, CryptoException { + public void flexibleLoanRepayTest() throws ApiException, CryptoException, IOException { FlexibleLoanRepayRequest flexibleLoanRepayRequest = new FlexibleLoanRepayRequest(); - - flexibleLoanRepayRequest.loanCoin(""); - flexibleLoanRepayRequest.collateralCoin(""); + flexibleLoanRepayRequest.loanCoin("BUSD"); + flexibleLoanRepayRequest.collateralCoin("BNB"); flexibleLoanRepayRequest.repayAmount(1d); ApiResponse response = @@ -227,26 +223,23 @@ public void flexibleLoanRepayTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000repaymentType=1&collateralCoin=BNB&loanCoin=BUSD&repayAmount=1&collateralReturn=true&fullRepayment=false", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000collateralCoin=&loanCoin=&repayAmount=1", - signInputCaptor.getValue()); - assertEquals( - "4901a7e5ee97147bb48abeb186304109d2e7b3a0533db9f895624d8b331d6ea4", - actualRequest.url().queryParameter("signature")); + "eb68927bc8457d0eaf536f856dc730749bdc4c85df617e5ce55e32f92083f254", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v2/loan/flexible/repay", actualRequest.url().encodedPath()); } /** - * Get Flexible Loan Assets Data(USER_DATA) + * Get Flexible Loan Assets Data (USER_DATA) * *

Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown - * in USD value. Weight: 400 + * in USD value. Weight(IP): 400 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getFlexibleLoanAssetsDataTest() throws ApiException, CryptoException { - String loanCoin = ""; + public void getFlexibleLoanAssetsDataTest() throws ApiException, CryptoException, IOException { + String loanCoin = "BUSD"; Long recvWindow = 5000L; ApiResponse response = api.getFlexibleLoanAssetsData(loanCoin, recvWindow); @@ -261,27 +254,28 @@ public void getFlexibleLoanAssetsDataTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("loanCoin=BUSD&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "loanCoin=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "2a09517b57df001aaf35228b8642b62271321de1e3714ccb1f56606355218630", + "4c36c88954f57e8fccdb28fb7981875357d1ab4e4da5fe88aadb5d4ee66e26d2", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v2/loan/flexible/loanable/data", actualRequest.url().encodedPath()); } /** - * Get Flexible Loan Borrow History(USER_DATA) + * Get Flexible Loan Borrow History (USER_DATA) * - *

Get Flexible Loan Borrow History * If startTime and endTime are not sent, the recent - * 90-day data will be returned. * The max interval between startTime and endTime is 180 days. - * Weight: 400 + *

Get Flexible Loan Borrow History. It can be used to check history before 2024-02-27 08:00. + * Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and + * `endTime` are not sent, the recent 90-day data is returned. - The max interval + * between `startTime` and `endTime` is 180 days. * * @throws ApiException if the Api call fails */ @Test - public void getFlexibleLoanBorrowHistoryTest() throws ApiException, CryptoException { - String loanCoin = ""; - String collateralCoin = ""; + public void getFlexibleLoanBorrowHistoryTest() + throws ApiException, CryptoException, IOException { + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -301,26 +295,25 @@ public void getFlexibleLoanBorrowHistoryTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("loanCoin=BUSD&collateralCoin=BNB&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "loanCoin=&collateralCoin=&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "783b1032640c844b7bd8cd7e911ea212f1e43d197e20e7a1b21d63e572fd75c7", + "5c70ec5e8a0aaca2384e8591a263b36421afe71042a57ce1f37ce29a44e225b8", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v2/loan/flexible/borrow/history", actualRequest.url().encodedPath()); } /** - * Get Flexible Loan Collateral Assets Data(USER_DATA) + * Get Flexible Loan Collateral Assets Data (USER_DATA) * *

Get LTV information and collateral limit of flexible loan's collateral assets. The - * collateral limit is shown in USD value. Weight: 400 + * collateral limit is shown in USD value. Weight(IP): 400 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getFlexibleLoanCollateralAssetsDataTest() throws ApiException, CryptoException { - String collateralCoin = ""; + public void getFlexibleLoanCollateralAssetsDataTest() + throws ApiException, CryptoException, IOException { + String collateralCoin = "BNB"; Long recvWindow = 5000L; ApiResponse response = api.getFlexibleLoanCollateralAssetsData(collateralCoin, recvWindow); @@ -336,25 +329,68 @@ public void getFlexibleLoanCollateralAssetsDataTest() throws ApiException, Crypt Request actualRequest = captorValue.request(); assertEquals( - "collateralCoin=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "collateralCoin=BNB&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "55075b58719a54df8f08bc09d0797b888e135d419c7e19dfe4987b5f83354c8e", + "83c9ad503abb8d5660cde608b81e985b91d25feeff0d51c344b86d842bfaa44b", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v2/loan/flexible/collateral/data", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v2/loan/flexible/collateral/data", actualRequest.url().encodedPath()); + } + + /** + * Get Flexible Loan Interest Rate History (USER_DATA) + * + *

Check Flexible Loan interest rate history Weight(IP): 400 Security Type: USER_DATA Notes: + * - If `startTime` and `endTime` are not sent, the recent 90-day data is + * returned. - The max interval between `startTime` and `endTime` is 90 + * days. - Time is based on UTC+0. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getFlexibleLoanInterestRateHistoryTest() + throws ApiException, CryptoException, IOException { + String coin = "USDT"; + Long recvWindow = 5000L; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long limit = 10L; + ApiResponse response = + api.getFlexibleLoanInterestRateHistory( + coin, recvWindow, startTime, endTime, current, limit); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + "coin=USDT&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "280639a911b1fb845012f755918969756593d9854fefaed7dbe1e00020403a61", + actualRequest.url().queryParameter("signature")); + assertEquals( + "/sapi/v2/loan/interestRateHistory", actualRequest.url().encodedPath()); } /** * Get Flexible Loan Liquidation History (USER_DATA) * - *

Weight: 400 + *

Get Flexible Loan Liquidation History Weight(IP): 400 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getFlexibleLoanLiquidationHistoryTest() throws ApiException, CryptoException { - String loanCoin = ""; - String collateralCoin = ""; + public void getFlexibleLoanLiquidationHistoryTest() + throws ApiException, CryptoException, IOException { + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -375,28 +411,28 @@ public void getFlexibleLoanLiquidationHistoryTest() throws ApiException, CryptoE Request actualRequest = captorValue.request(); assertEquals( - "loanCoin=&collateralCoin=&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "loanCoin=BUSD&collateralCoin=BNB&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "783b1032640c844b7bd8cd7e911ea212f1e43d197e20e7a1b21d63e572fd75c7", + "5c70ec5e8a0aaca2384e8591a263b36421afe71042a57ce1f37ce29a44e225b8", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v2/loan/flexible/liquidation/history", actualRequest.url().encodedPath()); + assertEquals("/sapi/v2/loan/flexible/liquidation/history", actualRequest.url().encodedPath()); } /** - * Get Flexible Loan LTV Adjustment History(USER_DATA) + * Get Flexible Loan LTV Adjustment History (USER_DATA) * - *

Get Flexible Loan LTV Adjustment History * If startTime and endTime are not sent, the - * recent 90-day data will be returned. * The max interval between startTime and endTime is 180 - * days. Weight: 400 + *

Get Flexible Loan LTV Adjustment History. It can be used to check history before + * 2024-02-27 08:00. Weight(UID): 400 Security Type: USER_DATA Notes: - If `startTime` + * and `endTime` are not sent, the recent 90-day data is returned. - The max interval + * between `startTime` and `endTime` is 180 days. * * @throws ApiException if the Api call fails */ @Test - public void getFlexibleLoanLtvAdjustmentHistoryTest() throws ApiException, CryptoException { - String loanCoin = ""; - String collateralCoin = ""; + public void getFlexibleLoanLtvAdjustmentHistoryTest() + throws ApiException, CryptoException, IOException { + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -417,26 +453,26 @@ public void getFlexibleLoanLtvAdjustmentHistoryTest() throws ApiException, Crypt Request actualRequest = captorValue.request(); assertEquals( - "loanCoin=&collateralCoin=&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "loanCoin=BUSD&collateralCoin=BNB&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "783b1032640c844b7bd8cd7e911ea212f1e43d197e20e7a1b21d63e572fd75c7", + "5c70ec5e8a0aaca2384e8591a263b36421afe71042a57ce1f37ce29a44e225b8", actualRequest.url().queryParameter("signature")); assertEquals( "/sapi/v2/loan/flexible/ltv/adjustment/history", actualRequest.url().encodedPath()); } /** - * Get Flexible Loan Ongoing Orders(USER_DATA) + * Get Flexible Loan Ongoing Orders (USER_DATA) * - *

Get Flexible Loan Ongoing Orders Weight: 300 + *

Get Flexible Loan Ongoing Orders Weight(IP): 300 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getFlexibleLoanOngoingOrdersTest() throws ApiException, CryptoException { - String loanCoin = ""; - String collateralCoin = ""; + public void getFlexibleLoanOngoingOrdersTest() + throws ApiException, CryptoException, IOException { + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long current = 1L; Long limit = 10L; Long recvWindow = 5000L; @@ -454,28 +490,28 @@ public void getFlexibleLoanOngoingOrdersTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("loanCoin=BUSD&collateralCoin=BNB¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "loanCoin=&collateralCoin=¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "60ca806a57899002561ea1a2fe27470825b14c95b4a19144c49b7d0458c28733", + "c647c04381b9743e45d7006d34ef2df8f4338f2b71f6c1379270a7c78b9eb087", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v2/loan/flexible/ongoing/orders", actualRequest.url().encodedPath()); } /** - * Get Flexible Loan Repayment History(USER_DATA) + * Get Flexible Loan Repayment History (USER_DATA) * - *

Get Flexible Loan Repayment History * If startTime and endTime are not sent, the recent - * 90-day data will be returned. * The max interval between startTime and endTime is 180 days. - * Weight: 400 + *

Get Flexible Loan Repayment History. It can be used to check history before 2024-02-27 + * 08:00. Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and + * `endTime` are not sent, the recent 90-day data is returned. - The max interval + * between `startTime` and `endTime` is 180 days. * * @throws ApiException if the Api call fails */ @Test - public void getFlexibleLoanRepaymentHistoryTest() throws ApiException, CryptoException { - String loanCoin = ""; - String collateralCoin = ""; + public void getFlexibleLoanRepaymentHistoryTest() + throws ApiException, CryptoException, IOException { + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -495,11 +531,9 @@ public void getFlexibleLoanRepaymentHistoryTest() throws ApiException, CryptoExc Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("loanCoin=BUSD&collateralCoin=BNB&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "loanCoin=&collateralCoin=&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "783b1032640c844b7bd8cd7e911ea212f1e43d197e20e7a1b21d63e572fd75c7", + "5c70ec5e8a0aaca2384e8591a263b36421afe71042a57ce1f37ce29a44e225b8", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v2/loan/flexible/repay/history", actualRequest.url().encodedPath()); } diff --git a/clients/crypto-loan/src/test/java/com/binance/connector/client/crypto_loan/rest/api/StableRateApiTest.java b/clients/crypto-loan/src/test/java/com/binance/connector/client/crypto_loan/rest/api/StableRateApiTest.java index 972813302..8eb038a16 100644 --- a/clients/crypto-loan/src/test/java/com/binance/connector/client/crypto_loan/rest/api/StableRateApiTest.java +++ b/clients/crypto-loan/src/test/java/com/binance/connector/client/crypto_loan/rest/api/StableRateApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Crypto Loan REST API - * OpenAPI Specification for the Binance Crypto Loan REST API + * Crypto Loan REST API + * Access Binance Crypto Loans to query assets, subscribe to loans, and manage loan positions. * * The version of the OpenAPI document: 1.0.0 * @@ -23,12 +23,13 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; -import com.binance.connector.client.crypto_loan.rest.model.CheckCollateralRepayRateStableRateResponse; import com.binance.connector.client.crypto_loan.rest.model.GetCryptoLoansIncomeHistoryResponse; import com.binance.connector.client.crypto_loan.rest.model.GetLoanBorrowHistoryResponse; import com.binance.connector.client.crypto_loan.rest.model.GetLoanLtvAdjustmentHistoryResponse; import com.binance.connector.client.crypto_loan.rest.model.GetLoanRepaymentHistoryResponse; +import com.binance.connector.client.crypto_loan.rest.model.OrderType; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -80,55 +81,20 @@ public void initApiClient() throws ApiException { } /** - * Check Collateral Repay Rate(USER_DATA) + * Get Crypto Loans Income History (USER_DATA) * - *

Get the the rate of collateral coin / loan coin when using collateral repay, the rate will - * be valid within 8 second. Weight: 6000 + *

Get Crypto Loans Income History Weight(UID): 6000 Security Type: USER_DATA Notes: - If + * `startTime` and `endTime` are both omitted, the most recent 7 days of + * data are returned. - The maximum interval between `startTime` and + * `endTime` is 30 days. * * @throws ApiException if the Api call fails */ @Test - public void checkCollateralRepayRateStableRateTest() throws ApiException, CryptoException { - String loanCoin = ""; - String collateralCoin = ""; - Double repayAmount = 1d; - Long recvWindow = 5000L; - ApiResponse response = - api.checkCollateralRepayRateStableRate( - loanCoin, collateralCoin, repayAmount, recvWindow); - - ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); - Mockito.verify(apiClientSpy) - .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); - - ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); - Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - - Call captorValue = callArgumentCaptor.getValue(); - Request actualRequest = captorValue.request(); - - assertEquals( - "loanCoin=&collateralCoin=&repayAmount=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "daf94761a57c1455fad13013a2f9ee4ce20c3214895583fec61620ef05b9a867", - actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/loan/repay/collateral/rate", actualRequest.url().encodedPath()); - } - - /** - * Get Crypto Loans Income History(USER_DATA) - * - *

Get Crypto Loans Income History * If startTime and endTime are not sent, the recent 7-day - * data will be returned. * The max interval between startTime and endTime is 30 days. Weight: - * 6000 - * - * @throws ApiException if the Api call fails - */ - @Test - public void getCryptoLoansIncomeHistoryTest() throws ApiException, CryptoException { - String asset = ""; - String type = "1"; + public void getCryptoLoansIncomeHistoryTest() + throws ApiException, CryptoException, IOException { + String asset = "BUSD"; + OrderType type = OrderType.borrowIn; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long limit = 10L; @@ -146,28 +112,28 @@ public void getCryptoLoansIncomeHistoryTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("asset=BUSD&type=borrowIn&startTime=1623319461670&endTime=1641782889000&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "asset=&type=1&startTime=1623319461670&endTime=1641782889000&limit=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "fc6cecaab649b163a845cc9e78ea8541f91768db6412aab193710efb1c4155fb", + "b0dbea90dc8b771494ba76c8682f1b4df66dd5aff20d97822203b06c71c2f8d6", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/loan/income", actualRequest.url().encodedPath()); } /** - * Get Loan Borrow History(USER_DATA) + * Get Loan Borrow History (USER_DATA) * - *

Get Loan Borrow History * If startTime and endTime are not sent, the recent 90-day data - * will be returned. * The max interval between startTime and endTime is 180 days. Weight: 400 + *

Get Loan Borrow History Weight(IP): 400 Security Type: USER_DATA Notes: - If + * `startTime` and `endTime` are not sent, the recent 90-day data is + * returned. - The max interval between `startTime` and `endTime` is 180 + * days. * * @throws ApiException if the Api call fails */ @Test - public void getLoanBorrowHistoryTest() throws ApiException, CryptoException { + public void getLoanBorrowHistoryTest() throws ApiException, CryptoException, IOException { Long orderId = 1L; - String loanCoin = ""; - String collateralCoin = ""; + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -194,29 +160,29 @@ public void getLoanBorrowHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("orderId=1&loanCoin=BUSD&collateralCoin=BNB&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "orderId=1&loanCoin=&collateralCoin=&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "da8d1cb7245414268128e1a179781fd57029b19e851de2ccfb330a48eccc3a41", + "7874a99dfd8cee9b5d8d79f31b9b1061c0f67adcddfdf5ecc2f08290d2ee111a", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/loan/borrow/history", actualRequest.url().encodedPath()); } /** - * Get Loan LTV Adjustment History(USER_DATA) + * Get Loan LTV Adjustment History (USER_DATA) * - *

Get Loan LTV Adjustment History * If startTime and endTime are not sent, the recent 90-day - * data will be returned. * The max interval between startTime and endTime is 180 days. Weight: - * 400 + *

Get Loan LTV Adjustment History Weight(IP): 400 Security Type: USER_DATA Notes: - If + * `startTime` and `endTime` are not sent, the recent 90-day data is + * returned. - The max interval between `startTime` and `endTime` is 180 + * days. * * @throws ApiException if the Api call fails */ @Test - public void getLoanLtvAdjustmentHistoryTest() throws ApiException, CryptoException { + public void getLoanLtvAdjustmentHistoryTest() + throws ApiException, CryptoException, IOException { Long orderId = 1L; - String loanCoin = ""; - String collateralCoin = ""; + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -243,28 +209,28 @@ public void getLoanLtvAdjustmentHistoryTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("orderId=1&loanCoin=BUSD&collateralCoin=BNB&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "orderId=1&loanCoin=&collateralCoin=&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "da8d1cb7245414268128e1a179781fd57029b19e851de2ccfb330a48eccc3a41", + "7874a99dfd8cee9b5d8d79f31b9b1061c0f67adcddfdf5ecc2f08290d2ee111a", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/loan/ltv/adjustment/history", actualRequest.url().encodedPath()); } /** - * Get Loan Repayment History(USER_DATA) + * Get Loan Repayment History (USER_DATA) * - *

Get Loan Repayment History * If startTime and endTime are not sent, the recent 90-day data - * will be returned. * The max interval between startTime and endTime is 180 days. Weight: 400 + *

Get Loan Repayment History Weight(IP): 400 Security Type: USER_DATA Notes: - If + * `startTime` and `endTime` are not sent, the recent 90-day data is + * returned. - The max interval between `startTime` and `endTime` is 180 + * days. * * @throws ApiException if the Api call fails */ @Test - public void getLoanRepaymentHistoryTest() throws ApiException, CryptoException { + public void getLoanRepaymentHistoryTest() throws ApiException, CryptoException, IOException { Long orderId = 1L; - String loanCoin = ""; - String collateralCoin = ""; + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -291,11 +257,9 @@ public void getLoanRepaymentHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("orderId=1&loanCoin=BUSD&collateralCoin=BNB&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "orderId=1&loanCoin=&collateralCoin=&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "da8d1cb7245414268128e1a179781fd57029b19e851de2ccfb330a48eccc3a41", + "7874a99dfd8cee9b5d8d79f31b9b1061c0f67adcddfdf5ecc2f08290d2ee111a", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/loan/repay/history", actualRequest.url().encodedPath()); } diff --git a/clients/derivatives-trading-coin-futures/CHANGELOG.md b/clients/derivatives-trading-coin-futures/CHANGELOG.md index 621b4e9d7..d6c268a5c 100644 --- a/clients/derivatives-trading-coin-futures/CHANGELOG.md +++ b/clients/derivatives-trading-coin-futures/CHANGELOG.md @@ -1,5 +1,165 @@ # Changelog +## 8.0.0 - 2026-07-29 + +### Added (1) + +#### WebSocket Streams + +- `indexPriceStream()` (`@indexPrice@` stream) + +### Changed (24) + +#### REST API + +- Modified parameter `batchOrders`: + - items: required added: `symbol`, `side`, `type`, `quantity` + - items.`activationPrice`: type `string` → `number` + - items.`callbackRate`: type `string` → `number` + - items.`price`: type `string` → `number` + - items.`priceMatch`: enum removed: `NONE` + - items.`priceProtect`: enum added: `true`, `false` + - items.`quantity`: type `string` → `number` + - items.`reduceOnly`: enum added: `true`, `false` + - items.`selfTradePreventionMode`: enum removed: `NONE` + - items.`stopPrice`: type `string` → `number` + - items.`activationPrice`: type `string` → `number` + - items.`callbackRate`: type `string` → `number` + - items.`price`: type `string` → `number` + - items.`priceMatch`: enum removed: `NONE` + - items.`priceProtect`: enum added: `true`, `false` + - items.`quantity`: type `string` → `number` + - items.`reduceOnly`: enum added: `true`, `false` + - items.`selfTradePreventionMode`: enum removed: `NONE` + - items.`stopPrice`: type `string` → `number` + - affected methods: + - `placeMultipleOrders()` (`POST /dapi/v1/batchOrders`) +- Modified parameter `batchOrders`: + - items: required added: `symbol`, `side`, `timestamp` + - items: property `timestamp` added + - items.`orderId`: type `string` → `integer` + - items.`price`: type `string` → `number` + - items.`quantity`: type `string` → `number` + - items.`recvWindow`: type `string` → `integer` + - items: item property `timestamp` added + - items.`orderId`: type `string` → `integer` + - items.`price`: type `string` → `number` + - items.`quantity`: type `string` → `number` + - items.`recvWindow`: type `string` → `integer` + - affected methods: + - `modifyMultipleOrders()` (`PUT /dapi/v1/batchOrders`) +- Modified parameter `contractType`: + - enum removed: `CURRENT_QUARTER_DELIVERING`, `NEXT_QUARTER_DELIVERING`, `PERPETUAL_DELIVERING` + - affected methods: + - `continuousContractKlineCandlestickData()` (`GET /dapi/v1/continuousKlines`) + - `basis()` (`GET /futures/data/basis`) +- Modified parameter `contractType`: + - enum removed: `CURRENT_QUARTER_DELIVERING`, `NEXT_QUARTER_DELIVERING`, `PERPETUAL_DELIVERING` + - enum added: `ALL` + - affected methods: + - `openInterestStatistics()` (`GET /futures/data/openInterestHist`) + - `takerBuySellVolume()` (`GET /futures/data/takerBuySellVol`) +- Modified parameter `incomeType`: + - enum added: `TRANSFER`, `WELCOME_BONUS`, `FUNDING_FEE`, `REALIZED_PNL`, `COMMISSION`, `INSURANCE_CLEAR`, `DELIVERED_SETTELMENT` + - affected methods: + - `getIncomeHistory()` (`GET /dapi/v1/income`) +- Modified parameter `orderIdList`: + - maxItems `null` → `10` + - affected methods: + - `cancelMultipleOrders()` (`DELETE /dapi/v1/batchOrders`) +- Modified parameter `origClientOrderIdList`: + - maxItems `null` → `10` + - affected methods: + - `cancelMultipleOrders()` (`DELETE /dapi/v1/batchOrders`) +- Modified parameter `priceMatch`: + - enum removed: `NONE` + - affected methods: + - `newOrder()` (`POST /dapi/v1/order`) + - `modifyOrder()` (`PUT /dapi/v1/order`) +- Modified parameter `priceProtect`: + - enum added: `true`, `false` + - affected methods: + - `newOrder()` (`POST /dapi/v1/order`) +- Modified parameter `reduceOnly`: + - enum added: `true`, `false` + - affected methods: + - `newOrder()` (`POST /dapi/v1/order`) +- Modified parameter `type`: + - type `string` → `integer` + - enum removed: `LIMIT`, `MARKET`, `STOP`, `STOP_MARKET`, `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`, `TRAILING_STOP_MARKET` + - affected methods: + - `modifyIsolatedPositionMargin()` (`POST /dapi/v1/positionMargin`) +- Modified response for `placeMultipleOrders()` (`POST /dapi/v1/batchOrders`): + - items: property `closePosition` added + - items: item property `closePosition` added + +- Modified response for `orderBook()` (`GET /dapi/v1/depth`): + - `asks`.items: minItems `0` → `2` + - `asks`.items: maxItems `null` → `2` + - `bids`.items: minItems `0` → `2` + - `bids`.items: maxItems `null` → `2` + +- Modified response for `markPriceKlineCandlestickData()` (`GET /dapi/v1/markPriceKlines`): + - items.items: oneOf added 2 schema(s) + - items.items: oneOf removed 2 schema(s) + +#### WebSocket API + +- Modified parameter `closePosition`: + - enum added: `true`, `false` + - affected methods: + - `newOrder()` (`order.place` method) +- Modified parameter `priceMatch`: + - enum removed: `NONE` + - affected methods: + - `modifyOrder()` (`order.modify` method) + - `newOrder()` (`order.place` method) +- Modified parameter `priceProtect`: + - enum added: `true`, `false` + - affected methods: + - `newOrder()` (`order.place` method) +- Modified parameter `reduceOnly`: + - enum added: `true`, `false` + - affected methods: + - `newOrder()` (`order.place` method) +- Modified response for `queryOrder()` (`order.status` method): + - `result`: property `cumQty` added + +#### WebSocket Streams + +- Modified parameter `contractType`: + - enum added: `perpetual`, `current_quarter`, `next_quarter` + - affected methods: + - `continuousContractKlineCandlestickStreams()` (`_@continuousKline_` stream) +- Modified parameter `interval`: + - enum added: `1m`, `3m`, `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `6h`, `8h`, `12h`, `1d`, `3d`, `1w`, `1M` + - affected methods: + - `indexKlineCandlestickStreams()` (`@indexPriceKline_` stream) + - `continuousContractKlineCandlestickStreams()` (`_@continuousKline_` stream) + - `klineCandlestickStreams()` (`@kline_` stream) + - `markPriceKlineCandlestickStreams()` (`@markPriceKline_` stream) +- Modified parameter `levels`: + - type `integer` → `string` + - enum added: `5`, `10`, `20` + - affected methods: + - `partialBookDepthStreams()` (`@depth@` stream) +- Modified parameter `updateSpeed`: + - enum added: `1s` + - affected methods: + - `markPriceOfAllSymbolsOfAPair()` (`@markPrice@` stream) + - `markPriceStream()` (`@markPrice@` stream) +- Modified parameter `updateSpeed`: + - enum added: `100ms`, `500ms` + - affected methods: + - `partialBookDepthStreams()` (`@depth@` stream) + - `diffBookDepthStreams()` (`@depth@` stream) + +### Removed (1) + +#### WebSocket Streams + +- `/@indexPrice()` (`@indexPrice` stream) + ## 7.1.1 - 2026-05-04 - Added stop method for WebSocket diff --git a/clients/derivatives-trading-coin-futures/docs/AccountApi.md b/clients/derivatives-trading-coin-futures/docs/AccountApi.md index ca612a041..ced927283 100644 --- a/clients/derivatives-trading-coin-futures/docs/AccountApi.md +++ b/clients/derivatives-trading-coin-futures/docs/AccountApi.md @@ -4,17 +4,17 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**accountInformation**](AccountApi.md#accountInformation) | **POST** /account.status | Account Information(USER_DATA) | -| [**futuresAccountBalance**](AccountApi.md#futuresAccountBalance) | **POST** /account.balance | Futures Account Balance(USER_DATA) | +| [**accountInformation**](AccountApi.md#accountInformation) | **POST** /account.status | Account Information (USER_DATA) | +| [**futuresAccountBalance**](AccountApi.md#futuresAccountBalance) | **POST** /account.balance | Futures Account Balance (USER_DATA) | # **accountInformation** > AccountInformationResponse accountInformation(accountInformationRequest) -Account Information(USER_DATA) +Account Information (USER_DATA) -Get current account information. User in single-asset/ multi-assets mode will see different value, see comments in response section for detail. Weight: 5 +Get current account information. User in single-asset/ multi-assets mode will see different value, see comments in response section for detail. Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -50,7 +50,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountInformationRequest** | [**AccountInformationRequest**](AccountInformationRequest.md)| | | +| **accountInformationRequest** | [**AccountInformationRequest**](AccountInformationRequest.md)| | [optional] | ### Return type @@ -74,9 +74,9 @@ No authorization required # **futuresAccountBalance** > FuturesAccountBalanceResponse futuresAccountBalance(futuresAccountBalanceRequest) -Futures Account Balance(USER_DATA) +Futures Account Balance (USER_DATA) -Query account balance info Weight: 5 +Futures Account Balance Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -112,7 +112,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **futuresAccountBalanceRequest** | [**FuturesAccountBalanceRequest**](FuturesAccountBalanceRequest.md)| | | +| **futuresAccountBalanceRequest** | [**FuturesAccountBalanceRequest**](FuturesAccountBalanceRequest.md)| | [optional] | ### Return type diff --git a/clients/derivatives-trading-coin-futures/docs/AccountConfigUpdate.md b/clients/derivatives-trading-coin-futures/docs/AccountConfigUpdate.md index 5de8d4592..d7e614971 100644 --- a/clients/derivatives-trading-coin-futures/docs/AccountConfigUpdate.md +++ b/clients/derivatives-trading-coin-futures/docs/AccountConfigUpdate.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction Time | [optional] | |**ac** | [**AccountConfigUpdateAc**](AccountConfigUpdateAc.md) | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AccountConfigUpdateAc.md b/clients/derivatives-trading-coin-futures/docs/AccountConfigUpdateAc.md index c1ad4a50d..60ff5d13c 100644 --- a/clients/derivatives-trading-coin-futures/docs/AccountConfigUpdateAc.md +++ b/clients/derivatives-trading-coin-futures/docs/AccountConfigUpdateAc.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**lLowerCase** | **Long** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**lLowerCase** | **Long** | Leverage | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AccountInformationResponse.md b/clients/derivatives-trading-coin-futures/docs/AccountInformationResponse.md index 0610d47b8..5c64a41df 100644 --- a/clients/derivatives-trading-coin-futures/docs/AccountInformationResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/AccountInformationResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**status** | **Long** | | [optional] | +|**id** | **String** | positionId | [optional] | +|**status** | **Long** | Enum:completed,processing | [optional] | |**result** | [**AccountInformationResponseResult**](AccountInformationResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountInformationResponseRateLimitsInner>**](AccountInformationResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<AccountInformationResponseRateLimitsInner>**](AccountInformationResponseRateLimitsInner.md) | Rate limit definitions. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseAssetsInner.md b/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseAssetsInner.md index 8262d4a5a..0eeed1526 100644 --- a/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseAssetsInner.md +++ b/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseAssetsInner.md @@ -7,19 +7,19 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**walletBalance** | **String** | | [optional] | -|**unrealizedProfit** | **String** | | [optional] | -|**marginBalance** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**positionInitialMargin** | **String** | | [optional] | -|**openOrderInitialMargin** | **String** | | [optional] | -|**maxWithdrawAmount** | **String** | | [optional] | -|**crossWalletBalance** | **String** | | [optional] | -|**crossUnPnl** | **String** | | [optional] | -|**availableBalance** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**asset** | **String** | asset name | [optional] | +|**walletBalance** | **String** | total wallet balance | [optional] | +|**unrealizedProfit** | **String** | unrealized profit or loss | [optional] | +|**marginBalance** | **String** | margin balance | [optional] | +|**maintMargin** | **String** | maintenance margin | [optional] | +|**initialMargin** | **String** | total intial margin required with the latest mark price | [optional] | +|**positionInitialMargin** | **String** | positions margin required with the latest mark price | [optional] | +|**openOrderInitialMargin** | **String** | open orders intial margin required with the latest mark price | [optional] | +|**maxWithdrawAmount** | **String** | maximum amount for transfer out | [optional] | +|**crossWalletBalance** | **String** | wallet balance for crossed margin | [optional] | +|**crossUnPnl** | **String** | total unrealized profit or loss of crossed positions | [optional] | +|**availableBalance** | **String** | available margin balance | [optional] | +|**updateTime** | **Long** | update time | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AccountInformationResponsePositionsInner.md b/clients/derivatives-trading-coin-futures/docs/AccountInformationResponsePositionsInner.md index 68fba8c13..5f498204a 100644 --- a/clients/derivatives-trading-coin-futures/docs/AccountInformationResponsePositionsInner.md +++ b/clients/derivatives-trading-coin-futures/docs/AccountInformationResponsePositionsInner.md @@ -7,21 +7,21 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**positionAmt** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**unrealizedProfit** | **String** | | [optional] | -|**positionInitialMargin** | **String** | | [optional] | -|**openOrderInitialMargin** | **String** | | [optional] | -|**leverage** | **String** | | [optional] | -|**isolated** | **Boolean** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**entryPrice** | **String** | | [optional] | -|**breakEvenPrice** | **String** | | [optional] | -|**maxQty** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**notionalValue** | **String** | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**positionAmt** | **String** | position amount | [optional] | +|**initialMargin** | **String** | total intial margin required with the latest mark price | [optional] | +|**maintMargin** | **String** | maintenance margin | [optional] | +|**unrealizedProfit** | **String** | unrealized profit or loss | [optional] | +|**positionInitialMargin** | **String** | positions margin required with the latest mark price | [optional] | +|**openOrderInitialMargin** | **String** | open orders intial margin required with the latest mark price | [optional] | +|**leverage** | **String** | Leverage value. | [optional] | +|**isolated** | **Boolean** | Whether isolated margin mode is enabled. | [optional] | +|**positionSide** | **String** | Position side | [optional] | +|**entryPrice** | **String** | Position entry price. | [optional] | +|**breakEvenPrice** | **String** | break-even price | [optional] | +|**maxQty** | **String** | maximum quantity of base asset | [optional] | +|**updateTime** | **Long** | update time | [optional] | +|**notionalValue** | **String** | Notional value. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseRateLimitsInner.md b/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseRateLimitsInner.md index ddf51ee30..c76ce24ed 100644 --- a/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseRateLimitsInner.md +++ b/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseRateLimitsInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**rateLimitType** | **String** | | [optional] | -|**interval** | **String** | | [optional] | -|**intervalNum** | **Long** | | [optional] | -|**limit** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**rateLimitType** | **String** | Rate limit type. | [optional] | +|**interval** | **String** | Rate limit interval. | [optional] | +|**intervalNum** | **Long** | Rate limit interval multiplier. | [optional] | +|**limit** | **Long** | Maximum allowed orders for this rule. | [optional] | +|**count** | **Long** | Total number of trades in the 24h window. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseResult.md b/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseResult.md index 19a150609..8521e44e6 100644 --- a/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseResult.md +++ b/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseResult.md @@ -2,18 +2,19 @@ # AccountInformationResponseResult +Indicates that combined is set to true. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**feeTier** | **Long** | | [optional] | -|**canTrade** | **Boolean** | | [optional] | -|**canDeposit** | **Boolean** | | [optional] | -|**canWithdraw** | **Boolean** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**assets** | [**List<AccountInformationResponseResultAssetsInner>**](AccountInformationResponseResultAssetsInner.md) | | [optional] | -|**positions** | [**List<AccountInformationResponseResultPositionsInner>**](AccountInformationResponseResultPositionsInner.md) | | [optional] | +|**feeTier** | **Long** | Fee tier level. | [optional] | +|**canTrade** | **Boolean** | Whether trading is enabled. | [optional] | +|**canDeposit** | **Boolean** | Whether deposits are enabled. | [optional] | +|**canWithdraw** | **Boolean** | Whether withdrawals are enabled. | [optional] | +|**updateTime** | **Long** | update time | [optional] | +|**assets** | [**List<AccountInformationResponseResultAssetsInner>**](AccountInformationResponseResultAssetsInner.md) | Supported assets. | [optional] | +|**positions** | [**List<AccountInformationResponseResultPositionsInner>**](AccountInformationResponseResultPositionsInner.md) | Position list. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseResultAssetsInner.md b/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseResultAssetsInner.md index c0a71893b..bca3e9358 100644 --- a/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseResultAssetsInner.md +++ b/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseResultAssetsInner.md @@ -7,19 +7,19 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**walletBalance** | **String** | | [optional] | -|**unrealizedProfit** | **String** | | [optional] | -|**marginBalance** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**positionInitialMargin** | **String** | | [optional] | -|**openOrderInitialMargin** | **String** | | [optional] | -|**maxWithdrawAmount** | **String** | | [optional] | -|**crossWalletBalance** | **String** | | [optional] | -|**crossUnPnl** | **String** | | [optional] | -|**availableBalance** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**asset** | **String** | asset name | [optional] | +|**walletBalance** | **String** | total wallet balance | [optional] | +|**unrealizedProfit** | **String** | unrealized profit or loss | [optional] | +|**marginBalance** | **String** | margin balance | [optional] | +|**maintMargin** | **String** | maintenance margin | [optional] | +|**initialMargin** | **String** | total intial margin required with the latest mark price | [optional] | +|**positionInitialMargin** | **String** | positions margin required with the latest mark price | [optional] | +|**openOrderInitialMargin** | **String** | open orders intial margin required with the latest mark price | [optional] | +|**maxWithdrawAmount** | **String** | maximum amount for transfer out | [optional] | +|**crossWalletBalance** | **String** | wallet balance for crossed margin | [optional] | +|**crossUnPnl** | **String** | total unrealized profit or loss of crossed positions | [optional] | +|**availableBalance** | **String** | available margin balance | [optional] | +|**updateTime** | **Long** | update time | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseResultPositionsInner.md b/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseResultPositionsInner.md index a1c53c031..213da60da 100644 --- a/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseResultPositionsInner.md +++ b/clients/derivatives-trading-coin-futures/docs/AccountInformationResponseResultPositionsInner.md @@ -7,22 +7,22 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**unrealizedProfit** | **String** | | [optional] | -|**positionInitialMargin** | **String** | | [optional] | -|**openOrderInitialMargin** | **String** | | [optional] | -|**leverage** | **String** | | [optional] | -|**isolated** | **Boolean** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**entryPrice** | **String** | | [optional] | -|**maxQty** | **String** | | [optional] | -|**notionalValue** | **String** | | [optional] | -|**isolatedWallet** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**positionAmt** | **String** | | [optional] | -|**breakEvenPrice** | **String** | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**initialMargin** | **String** | total intial margin required with the latest mark price | [optional] | +|**maintMargin** | **String** | maintenance margin | [optional] | +|**unrealizedProfit** | **String** | unrealized profit or loss | [optional] | +|**positionInitialMargin** | **String** | positions margin required with the latest mark price | [optional] | +|**openOrderInitialMargin** | **String** | open orders intial margin required with the latest mark price | [optional] | +|**leverage** | **String** | Leverage value. | [optional] | +|**isolated** | **Boolean** | Whether isolated margin mode is enabled. | [optional] | +|**positionSide** | **String** | Position side | [optional] | +|**entryPrice** | **String** | Position entry price. | [optional] | +|**maxQty** | **String** | maximum quantity of base asset | [optional] | +|**notionalValue** | **String** | Notional value. | [optional] | +|**isolatedWallet** | **String** | Isolated wallet balance. | [optional] | +|**updateTime** | **Long** | update time | [optional] | +|**positionAmt** | **String** | position amount | [optional] | +|**breakEvenPrice** | **String** | break-even price | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AccountTradeListResponseInner.md b/clients/derivatives-trading-coin-futures/docs/AccountTradeListResponseInner.md index 6687ff0e0..9f7ab4221 100644 --- a/clients/derivatives-trading-coin-futures/docs/AccountTradeListResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/AccountTradeListResponseInner.md @@ -7,22 +7,22 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**id** | **Long** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**pair** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**qty** | **String** | | [optional] | -|**realizedPnl** | **String** | | [optional] | -|**marginAsset** | **String** | | [optional] | -|**baseQty** | **String** | | [optional] | -|**commission** | **String** | | [optional] | -|**commissionAsset** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**buyer** | **Boolean** | | [optional] | -|**maker** | **Boolean** | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**id** | **Long** | positionId | [optional] | +|**orderId** | **Long** | Sub-order ID | [optional] | +|**pair** | **String** | Pair | [optional] | +|**side** | **String** | Trading side | [optional] | +|**price** | **String** | Latest token price. | [optional] | +|**qty** | **String** | Quantity. | [optional] | +|**realizedPnl** | **String** | Realized PnL. | [optional] | +|**marginAsset** | **String** | Margin asset. | [optional] | +|**baseQty** | **String** | Base asset quantity. | [optional] | +|**commission** | **String** | Transaction Fee (in Crypto) | [optional] | +|**commissionAsset** | **String** | Commission asset. | [optional] | +|**time** | **Long** | Time | [optional] | +|**positionSide** | **String** | Position side | [optional] | +|**buyer** | **Boolean** | Whether the trade is a buy side for the account. | [optional] | +|**maker** | **Boolean** | Whether the account is maker in this trade. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AccountUpdate.md b/clients/derivatives-trading-coin-futures/docs/AccountUpdate.md index 53b53487c..c2473d223 100644 --- a/clients/derivatives-trading-coin-futures/docs/AccountUpdate.md +++ b/clients/derivatives-trading-coin-futures/docs/AccountUpdate.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**iLowerCase** | **String** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction | [optional] | +|**iLowerCase** | **String** | Account Alias | [optional] | |**aLowerCase** | [**AccountUpdateA**](AccountUpdateA.md) | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AccountUpdateA.md b/clients/derivatives-trading-coin-futures/docs/AccountUpdateA.md index b3859d2e6..4c6d870cf 100644 --- a/clients/derivatives-trading-coin-futures/docs/AccountUpdateA.md +++ b/clients/derivatives-trading-coin-futures/docs/AccountUpdateA.md @@ -2,13 +2,14 @@ # AccountUpdateA +Update Data ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**mLowerCase** | **String** | | [optional] | -|**B** | [**List<AccountUpdateABInner>**](AccountUpdateABInner.md) | | [optional] | +|**mLowerCase** | **String** | Event reason type | [optional] | +|**B** | [**List<AccountUpdateABInner>**](AccountUpdateABInner.md) | Balances | [optional] | |**P** | [**List<AccountUpdateAPInner>**](AccountUpdateAPInner.md) | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AccountUpdateABInner.md b/clients/derivatives-trading-coin-futures/docs/AccountUpdateABInner.md index 3380c37bb..1fc7fee81 100644 --- a/clients/derivatives-trading-coin-futures/docs/AccountUpdateABInner.md +++ b/clients/derivatives-trading-coin-futures/docs/AccountUpdateABInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**aLowerCase** | **String** | | [optional] | -|**wb** | **String** | | [optional] | -|**cw** | **String** | | [optional] | -|**bc** | **String** | | [optional] | +|**aLowerCase** | **String** | Asset | [optional] | +|**wb** | **String** | Wallet Balance | [optional] | +|**cw** | **String** | Cross Wallet Balance | [optional] | +|**bc** | **String** | Balance Change except PnL and Commission | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AccountUpdateAPInner.md b/clients/derivatives-trading-coin-futures/docs/AccountUpdateAPInner.md index 2621e1c33..edc0aacd2 100644 --- a/clients/derivatives-trading-coin-futures/docs/AccountUpdateAPInner.md +++ b/clients/derivatives-trading-coin-futures/docs/AccountUpdateAPInner.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**pa** | **String** | | [optional] | -|**ep** | **String** | | [optional] | -|**bep** | **String** | | [optional] | -|**cr** | **String** | | [optional] | -|**up** | **String** | | [optional] | -|**mt** | **String** | | [optional] | -|**iw** | **String** | | [optional] | -|**ps** | **String** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**pa** | **String** | Position Amount | [optional] | +|**ep** | **String** | Entry Price | [optional] | +|**bep** | **String** | Break-Even Price | [optional] | +|**cr** | **String** | (Pre-fee) Accumulated Realized | [optional] | +|**up** | **String** | Unrealized PnL | [optional] | +|**mt** | **String** | Margin Type | [optional] | +|**iw** | **String** | Isolated Wallet (if isolated position) | [optional] | +|**ps** | **String** | Position Side | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AggregateTradeStreamsRequest.md b/clients/derivatives-trading-coin-futures/docs/AggregateTradeStreamsRequest.md index 4b4e29d6d..26d1c0f14 100644 --- a/clients/derivatives-trading-coin-futures/docs/AggregateTradeStreamsRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/AggregateTradeStreamsRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AggregateTradeStreamsResponse.md b/clients/derivatives-trading-coin-futures/docs/AggregateTradeStreamsResponse.md index 801658ee4..e35d7c466 100644 --- a/clients/derivatives-trading-coin-futures/docs/AggregateTradeStreamsResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/AggregateTradeStreamsResponse.md @@ -7,16 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**aLowerCase** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**fLowerCase** | **Long** | | [optional] | -|**lLowerCase** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**aLowerCase** | **Long** | Aggregate trade ID | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**pLowerCase** | **String** | Price | [optional] | +|**qLowerCase** | **String** | Quantity | [optional] | +|**fLowerCase** | **Long** | First trade ID | [optional] | +|**lLowerCase** | **Long** | Last trade ID | [optional] | +|**T** | **Long** | Trade time | [optional] | +|**mLowerCase** | **Boolean** | Is the buyer the market maker? | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AllBookTickersStreamRequest.md b/clients/derivatives-trading-coin-futures/docs/AllBookTickersStreamRequest.md index 9e7456d15..42103273f 100644 --- a/clients/derivatives-trading-coin-futures/docs/AllBookTickersStreamRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/AllBookTickersStreamRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AllBookTickersStreamResponse.md b/clients/derivatives-trading-coin-futures/docs/AllBookTickersStreamResponse.md index bc37855cc..f6c8153d2 100644 --- a/clients/derivatives-trading-coin-futures/docs/AllBookTickersStreamResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/AllBookTickersStreamResponse.md @@ -7,16 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**B** | **String** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**A** | **String** | | [optional] | -|**T** | **Long** | | [optional] | -|**E** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**uLowerCase** | **Long** | Order book update Id | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**bLowerCase** | **String** | Best bid price | [optional] | +|**B** | **String** | Best bid qty | [optional] | +|**aLowerCase** | **String** | Best ask price | [optional] | +|**A** | **String** | Best ask qty | [optional] | +|**T** | **Long** | Transaction time | [optional] | +|**E** | **Long** | Event time | [optional] | +|**ps** | **String** | Pair | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AllMarketLiquidationOrderStreamsRequest.md b/clients/derivatives-trading-coin-futures/docs/AllMarketLiquidationOrderStreamsRequest.md index 20469db31..287ecd28c 100644 --- a/clients/derivatives-trading-coin-futures/docs/AllMarketLiquidationOrderStreamsRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/AllMarketLiquidationOrderStreamsRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AllMarketLiquidationOrderStreamsResponse.md b/clients/derivatives-trading-coin-futures/docs/AllMarketLiquidationOrderStreamsResponse.md index 50e6ac6f1..55a4f486d 100644 --- a/clients/derivatives-trading-coin-futures/docs/AllMarketLiquidationOrderStreamsResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/AllMarketLiquidationOrderStreamsResponse.md @@ -7,9 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event Type | [optional] | +|**E** | **Long** | Event Time | [optional] | |**oLowerCase** | [**AllMarketLiquidationOrderStreamsResponseO**](AllMarketLiquidationOrderStreamsResponseO.md) | | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AllMarketLiquidationOrderStreamsResponseO.md b/clients/derivatives-trading-coin-futures/docs/AllMarketLiquidationOrderStreamsResponseO.md index 713752fcd..0b154f713 100644 --- a/clients/derivatives-trading-coin-futures/docs/AllMarketLiquidationOrderStreamsResponseO.md +++ b/clients/derivatives-trading-coin-futures/docs/AllMarketLiquidationOrderStreamsResponseO.md @@ -2,23 +2,24 @@ # AllMarketLiquidationOrderStreamsResponseO +Order Type ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**S** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**ap** | **String** | | [optional] | -|**X** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**zLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**ps** | **String** | Pair | [optional] | +|**S** | **String** | Side | [optional] | +|**oLowerCase** | **String** | Order Type | [optional] | +|**fLowerCase** | **String** | Time in Force | [optional] | +|**qLowerCase** | **String** | Original Quantity | [optional] | +|**pLowerCase** | **String** | Price | [optional] | +|**ap** | **String** | Average Price | [optional] | +|**X** | **String** | Order Status | [optional] | +|**lLowerCase** | **String** | Order Last Filled Quantity | [optional] | +|**zLowerCase** | **String** | Order Filled Accumulated Quantity | [optional] | +|**T** | **Long** | Order Trade Time | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AllMarketMiniTickersStreamRequest.md b/clients/derivatives-trading-coin-futures/docs/AllMarketMiniTickersStreamRequest.md index 48ae4d418..566240090 100644 --- a/clients/derivatives-trading-coin-futures/docs/AllMarketMiniTickersStreamRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/AllMarketMiniTickersStreamRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AllMarketMiniTickersStreamResponseInner.md b/clients/derivatives-trading-coin-futures/docs/AllMarketMiniTickersStreamResponseInner.md index 4d5d289e3..16f39f05a 100644 --- a/clients/derivatives-trading-coin-futures/docs/AllMarketMiniTickersStreamResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/AllMarketMiniTickersStreamResponseInner.md @@ -7,16 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**ps** | **String** | Pair | [optional] | +|**cLowerCase** | **String** | Close price | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | Total traded volume | [optional] | +|**qLowerCase** | **String** | Total traded base asset volume | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AllMarketTickersStreamsRequest.md b/clients/derivatives-trading-coin-futures/docs/AllMarketTickersStreamsRequest.md index b6879bca3..e69f511b2 100644 --- a/clients/derivatives-trading-coin-futures/docs/AllMarketTickersStreamsRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/AllMarketTickersStreamsRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AllMarketTickersStreamsResponseInner.md b/clients/derivatives-trading-coin-futures/docs/AllMarketTickersStreamsResponseInner.md index 2d47152e2..057b0e8d3 100644 --- a/clients/derivatives-trading-coin-futures/docs/AllMarketTickersStreamsResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/AllMarketTickersStreamsResponseInner.md @@ -7,25 +7,26 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**wLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**O** | **Long** | | [optional] | -|**C** | **Long** | | [optional] | -|**F** | **Long** | | [optional] | -|**L** | **Long** | | [optional] | -|**nLowerCase** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**pLowerCase** | **String** | Price change | [optional] | +|**P** | **String** | Price change percent | [optional] | +|**wLowerCase** | **String** | Weighted average price | [optional] | +|**cLowerCase** | **String** | Last price | [optional] | +|**Q** | **String** | Last quantity | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | Total traded volume | [optional] | +|**qLowerCase** | **String** | Total traded base asset volume | [optional] | +|**O** | **Long** | Statistics open time | [optional] | +|**C** | **Long** | Statistics close time | [optional] | +|**F** | **Long** | First trade ID | [optional] | +|**L** | **Long** | Last trade Id | [optional] | +|**nLowerCase** | **Long** | Total number of trades | [optional] | +|**ps** | **String** | Pair | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AllOrdersResponseInner.md b/clients/derivatives-trading-coin-futures/docs/AllOrdersResponseInner.md index aebca14d3..b7d67ed1b 100644 --- a/clients/derivatives-trading-coin-futures/docs/AllOrdersResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/AllOrdersResponseInner.md @@ -7,32 +7,32 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgPrice** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**cumBase** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**closePosition** | **Boolean** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**priceMatch** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | +|**avgPrice** | **String** | Average execution price | [optional] | +|**clientOrderId** | **String** | Client order ID. | [optional] | +|**cumBase** | **String** | Cumulative base asset amount. | [optional] | +|**executedQty** | **String** | Executed quantity | [optional] | +|**orderId** | **Long** | Sub-order ID | [optional] | +|**origQty** | **String** | Original order quantity | [optional] | +|**origType** | **String** | Original order type. | [optional] | +|**price** | **String** | Latest token price. | [optional] | +|**reduceOnly** | **Boolean** | Whether the order is reduce-only. | [optional] | +|**side** | **String** | Trading side | [optional] | +|**positionSide** | **String** | Position side | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**closePosition** | **Boolean** | if Close-All | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**pair** | **String** | Pair | [optional] | +|**time** | **Long** | Time | [optional] | +|**timeInForce** | **String** | Time in force | [optional] | +|**type** | **String** | Order type. | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**updateTime** | **Long** | update time | [optional] | +|**workingType** | **String** | Stop trigger price type. | [optional] | +|**priceProtect** | **Boolean** | if conditional order trigger is protected | [optional] | +|**priceMatch** | **String** | price match mode | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AutoCancelAllOpenOrdersRequest.md b/clients/derivatives-trading-coin-futures/docs/AutoCancelAllOpenOrdersRequest.md index 0f5049ab4..b08601e25 100644 --- a/clients/derivatives-trading-coin-futures/docs/AutoCancelAllOpenOrdersRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/AutoCancelAllOpenOrdersRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**countdownTime** | **Long** | | | +|**countdownTime** | **Long** | countdown time, 1000 for 1 second. 0 to cancel the timer | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/AutoCancelAllOpenOrdersResponse.md b/clients/derivatives-trading-coin-futures/docs/AutoCancelAllOpenOrdersResponse.md index 80717cd32..2619ca910 100644 --- a/clients/derivatives-trading-coin-futures/docs/AutoCancelAllOpenOrdersResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/AutoCancelAllOpenOrdersResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**countdownTime** | **String** | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**countdownTime** | **String** | Countdown cancellation time in milliseconds. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/BasisResponseInner.md b/clients/derivatives-trading-coin-futures/docs/BasisResponseInner.md index f105a23d9..28a6ad017 100644 --- a/clients/derivatives-trading-coin-futures/docs/BasisResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/BasisResponseInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**indexPrice** | **String** | | [optional] | -|**contractType** | **String** | | [optional] | -|**basisRate** | **String** | | [optional] | -|**futuresPrice** | **String** | | [optional] | -|**annualizedBasisRate** | **String** | | [optional] | -|**basis** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**timestamp** | **Long** | | [optional] | +|**indexPrice** | **String** | index price | [optional] | +|**contractType** | **String** | Contract type. | [optional] | +|**basisRate** | **String** | Basis rate. | [optional] | +|**futuresPrice** | **String** | Futures price. | [optional] | +|**annualizedBasisRate** | **String** | Annualized basis rate. | [optional] | +|**basis** | **String** | Basis value. | [optional] | +|**pair** | **String** | Pair | [optional] | +|**timestamp** | **Long** | Timestamp in milliseconds. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/BatchOrders.md b/clients/derivatives-trading-coin-futures/docs/BatchOrders.md index 480679d28..a3c432630 100644 --- a/clients/derivatives-trading-coin-futures/docs/BatchOrders.md +++ b/clients/derivatives-trading-coin-futures/docs/BatchOrders.md @@ -2,6 +2,7 @@ # BatchOrders +order list. Max 5 orders ## Properties diff --git a/clients/derivatives-trading-coin-futures/docs/BatchOrdersInner.md b/clients/derivatives-trading-coin-futures/docs/BatchOrdersInner.md index e5565a25a..eae4fd183 100644 --- a/clients/derivatives-trading-coin-futures/docs/BatchOrdersInner.md +++ b/clients/derivatives-trading-coin-futures/docs/BatchOrdersInner.md @@ -7,13 +7,23 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **String** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**side** | [**SideEnum**](#SideEnum) | | [optional] | -|**quantity** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**recvWindow** | **String** | | [optional] | +|**symbol** | **String** | Symbol | | +|**side** | [**SideEnum**](#SideEnum) | | | +|**positionSide** | [**PositionSideEnum**](#PositionSideEnum) | Default `BOTH` for One-way Mode ; `LONG` or `SHORT` for Hedge Mode. It must be sent with Hedge Mode. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | **After CM migration, stop-type values (`STOP`, `STOP_MARKET`, `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`, `TRAILING_STOP_MARKET`) are no longer accepted on a per-element basis and will return element-level `-4120`. Use the new `/dapi/v1/algoOrder` endpoint instead.** | | +|**timeInForce** | [**TimeInForceEnum**](#TimeInForceEnum) | | [optional] | +|**quantity** | **Double** | quantity measured by contract number | | +|**reduceOnly** | [**ReduceOnlyEnum**](#ReduceOnlyEnum) | | [optional] | +|**price** | **Double** | Order price | [optional] | +|**newClientOrderId** | **String** | A unique id among open orders. Automatically generated if not sent. Can only be string following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,36}$` | [optional] | +|**stopPrice** | **Double** | Used with `STOP/STOP_MARKET` or `TAKE_PROFIT/TAKE_PROFIT_MARKET` orders. | [optional] | +|**activationPrice** | **Double** | Used with `TRAILING_STOP_MARKET` orders, default as the latest price(supporting different `workingType`) | [optional] | +|**callbackRate** | **Double** | Used with `TRAILING_STOP_MARKET` orders, min 0.1, max 4 where 1 for 1% | [optional] | +|**workingType** | [**WorkingTypeEnum**](#WorkingTypeEnum) | | [optional] | +|**priceProtect** | [**PriceProtectEnum**](#PriceProtectEnum) | Used with `STOP/STOP_MARKET` or `TAKE_PROFIT/TAKE_PROFIT_MARKET` orders. | [optional] | +|**newOrderRespType** | [**NewOrderRespTypeEnum**](#NewOrderRespTypeEnum) | | [optional] | +|**priceMatch** | [**PriceMatchEnum**](#PriceMatchEnum) | only avaliable for `LIMIT`/`STOP`/`TAKE_PROFIT` order; can'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 | [optional] | @@ -26,3 +36,99 @@ +## Enum: PositionSideEnum + +| Name | Value | +|---- | -----| +| BOTH | "BOTH" | +| LONG | "LONG" | +| SHORT | "SHORT" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIMIT | "LIMIT" | +| MARKET | "MARKET" | +| STOP | "STOP" | +| STOP_MARKET | "STOP_MARKET" | +| TAKE_PROFIT | "TAKE_PROFIT" | +| TAKE_PROFIT_MARKET | "TAKE_PROFIT_MARKET" | +| TRAILING_STOP_MARKET | "TRAILING_STOP_MARKET" | + + + +## Enum: TimeInForceEnum + +| Name | Value | +|---- | -----| +| GTC | "GTC" | +| IOC | "IOC" | +| FOK | "FOK" | +| GTX | "GTX" | + + + +## Enum: ReduceOnlyEnum + +| Name | Value | +|---- | -----| +| TRUE | "true" | +| FALSE | "false" | + + + +## Enum: WorkingTypeEnum + +| Name | Value | +|---- | -----| +| MARK_PRICE | "MARK_PRICE" | +| CONTRACT_PRICE | "CONTRACT_PRICE" | + + + +## Enum: PriceProtectEnum + +| Name | Value | +|---- | -----| +| TRUE | "true" | +| FALSE | "false" | + + + +## Enum: NewOrderRespTypeEnum + +| Name | Value | +|---- | -----| +| ACK | "ACK" | +| RESULT | "RESULT" | + + + +## Enum: PriceMatchEnum + +| Name | Value | +|---- | -----| +| OPPONENT | "OPPONENT" | +| OPPONENT_5 | "OPPONENT_5" | +| OPPONENT_10 | "OPPONENT_10" | +| OPPONENT_20 | "OPPONENT_20" | +| QUEUE | "QUEUE" | +| QUEUE_5 | "QUEUE_5" | +| QUEUE_10 | "QUEUE_10" | +| QUEUE_20 | "QUEUE_20" | + + + +## Enum: SelfTradePreventionModeEnum + +| Name | Value | +|---- | -----| +| EXPIRE_TAKER | "EXPIRE_TAKER" | +| EXPIRE_MAKER | "EXPIRE_MAKER" | +| EXPIRE_BOTH | "EXPIRE_BOTH" | + + + diff --git a/clients/derivatives-trading-coin-futures/docs/BatchOrdersPlaceMultipleOrders.md b/clients/derivatives-trading-coin-futures/docs/BatchOrdersPlaceMultipleOrders.md deleted file mode 100644 index d41e556fc..000000000 --- a/clients/derivatives-trading-coin-futures/docs/BatchOrdersPlaceMultipleOrders.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# BatchOrdersPlaceMultipleOrders - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-coin-futures/docs/BatchOrdersPlaceMultipleOrdersInner.md b/clients/derivatives-trading-coin-futures/docs/BatchOrdersPlaceMultipleOrdersInner.md deleted file mode 100644 index d54581b14..000000000 --- a/clients/derivatives-trading-coin-futures/docs/BatchOrdersPlaceMultipleOrdersInner.md +++ /dev/null @@ -1,118 +0,0 @@ - - -# BatchOrdersPlaceMultipleOrdersInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**side** | [**SideEnum**](#SideEnum) | | [optional] | -|**positionSide** | [**PositionSideEnum**](#PositionSideEnum) | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | -|**timeInForce** | [**TimeInForceEnum**](#TimeInForceEnum) | | [optional] | -|**quantity** | **String** | | [optional] | -|**reduceOnly** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**newClientOrderId** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**activationPrice** | **String** | | [optional] | -|**callbackRate** | **String** | | [optional] | -|**workingType** | [**WorkingTypeEnum**](#WorkingTypeEnum) | | [optional] | -|**priceProtect** | **String** | | [optional] | -|**newOrderRespType** | [**NewOrderRespTypeEnum**](#NewOrderRespTypeEnum) | | [optional] | -|**priceMatch** | [**PriceMatchEnum**](#PriceMatchEnum) | | [optional] | -|**selfTradePreventionMode** | [**SelfTradePreventionModeEnum**](#SelfTradePreventionModeEnum) | | [optional] | - - - -## Enum: SideEnum - -| Name | Value | -|---- | -----| -| BUY | "BUY" | -| SELL | "SELL" | - - - -## Enum: PositionSideEnum - -| Name | Value | -|---- | -----| -| BOTH | "BOTH" | -| LONG | "LONG" | -| SHORT | "SHORT" | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| LIMIT | "LIMIT" | -| MARKET | "MARKET" | -| STOP | "STOP" | -| STOP_MARKET | "STOP_MARKET" | -| TAKE_PROFIT | "TAKE_PROFIT" | -| TAKE_PROFIT_MARKET | "TAKE_PROFIT_MARKET" | -| TRAILING_STOP_MARKET | "TRAILING_STOP_MARKET" | - - - -## Enum: TimeInForceEnum - -| Name | Value | -|---- | -----| -| GTC | "GTC" | -| IOC | "IOC" | -| FOK | "FOK" | -| GTX | "GTX" | - - - -## Enum: WorkingTypeEnum - -| Name | Value | -|---- | -----| -| MARK_PRICE | "MARK_PRICE" | -| CONTRACT_PRICE | "CONTRACT_PRICE" | - - - -## Enum: NewOrderRespTypeEnum - -| Name | Value | -|---- | -----| -| ACK | "ACK" | -| RESULT | "RESULT" | - - - -## Enum: PriceMatchEnum - -| Name | Value | -|---- | -----| -| NONE | "NONE" | -| OPPONENT | "OPPONENT" | -| OPPONENT_5 | "OPPONENT_5" | -| OPPONENT_10 | "OPPONENT_10" | -| OPPONENT_20 | "OPPONENT_20" | -| QUEUE | "QUEUE" | -| QUEUE_5 | "QUEUE_5" | -| QUEUE_10 | "QUEUE_10" | -| QUEUE_20 | "QUEUE_20" | - - - -## Enum: SelfTradePreventionModeEnum - -| Name | Value | -|---- | -----| -| NONE | "NONE" | -| EXPIRE_TAKER | "EXPIRE_TAKER" | -| EXPIRE_BOTH | "EXPIRE_BOTH" | -| EXPIRE_MAKER | "EXPIRE_MAKER" | - - - diff --git a/clients/derivatives-trading-coin-futures/docs/CancelAllOpenOrdersResponse.md b/clients/derivatives-trading-coin-futures/docs/CancelAllOpenOrdersResponse.md index abe438241..5e91a7c10 100644 --- a/clients/derivatives-trading-coin-futures/docs/CancelAllOpenOrdersResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/CancelAllOpenOrdersResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **Long** | | [optional] | -|**msg** | **String** | | [optional] | +|**code** | **Long** | API response code. \"000000\" indicates success. | [optional] | +|**msg** | **String** | Message details. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/CancelMultipleOrdersResponseInner.md b/clients/derivatives-trading-coin-futures/docs/CancelMultipleOrdersResponseInner.md index ca94020b3..4262cda4a 100644 --- a/clients/derivatives-trading-coin-futures/docs/CancelMultipleOrdersResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/CancelMultipleOrdersResponseInner.md @@ -7,34 +7,32 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgPrice** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**cumQty** | **String** | | [optional] | -|**cumBase** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**closePosition** | **Boolean** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**priceMatch** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**code** | **Long** | | [optional] | -|**msg** | **String** | | [optional] | +|**clientOrderId** | **String** | Client order ID. | [optional] | +|**cumQty** | **String** | Cumulative filled quantity. | [optional] | +|**executedQty** | **String** | Executed quantity | [optional] | +|**orderId** | **Long** | Sub-order ID | [optional] | +|**origQty** | **String** | Original order quantity | [optional] | +|**price** | **String** | Latest token price. | [optional] | +|**reduceOnly** | **Boolean** | Whether the order is reduce-only. | [optional] | +|**side** | **String** | Trading side | [optional] | +|**positionSide** | **String** | Position side | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**closePosition** | **Boolean** | if Close-All | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**pair** | **String** | Pair | [optional] | +|**timeInForce** | **String** | Time in force | [optional] | +|**origType** | **String** | Original order type. | [optional] | +|**type** | **String** | Order type. | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**workingType** | **String** | Stop trigger price type. | [optional] | +|**priceProtect** | **Boolean** | if conditional order trigger is protected | [optional] | +|**priceMatch** | **String** | price match mode | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**updateTime** | **Long** | update time | [optional] | +|**code** | **Long** | API response code. \"000000\" indicates success. | [optional] | +|**msg** | **String** | Message details. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/CancelOrderResponse.md b/clients/derivatives-trading-coin-futures/docs/CancelOrderResponse.md index 04d7e2d2a..460a6b0d3 100644 --- a/clients/derivatives-trading-coin-futures/docs/CancelOrderResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/CancelOrderResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**status** | **Long** | | [optional] | +|**id** | **String** | positionId | [optional] | +|**status** | **Long** | Enum:completed,processing | [optional] | |**result** | [**CancelOrderResponseResult**](CancelOrderResponseResult.md) | | [optional] | -|**rateLimits** | [**List<CancelOrderResponseRateLimitsInner>**](CancelOrderResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<CancelOrderResponseRateLimitsInner>**](CancelOrderResponseRateLimitsInner.md) | Rate limit definitions. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/CancelOrderResponseRateLimitsInner.md b/clients/derivatives-trading-coin-futures/docs/CancelOrderResponseRateLimitsInner.md index 7eab82b9c..124ebb514 100644 --- a/clients/derivatives-trading-coin-futures/docs/CancelOrderResponseRateLimitsInner.md +++ b/clients/derivatives-trading-coin-futures/docs/CancelOrderResponseRateLimitsInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**rateLimitType** | **String** | | [optional] | -|**interval** | **String** | | [optional] | -|**intervalNum** | **Long** | | [optional] | -|**limit** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**rateLimitType** | **String** | Rate limit type. | [optional] | +|**interval** | **String** | Rate limit interval. | [optional] | +|**intervalNum** | **Long** | Rate limit interval multiplier. | [optional] | +|**limit** | **Long** | Maximum allowed orders for this rule. | [optional] | +|**count** | **Long** | Total number of trades in the 24h window. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/CancelOrderResponseResult.md b/clients/derivatives-trading-coin-futures/docs/CancelOrderResponseResult.md index 38800e364..f654afeb6 100644 --- a/clients/derivatives-trading-coin-futures/docs/CancelOrderResponseResult.md +++ b/clients/derivatives-trading-coin-futures/docs/CancelOrderResponseResult.md @@ -2,33 +2,32 @@ # CancelOrderResponseResult +Indicates that combined is set to true. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cumQty** | **String** | | [optional] | -|**cumBase** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**closePosition** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**origType** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**orderId** | **Long** | Sub-order ID | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**pair** | **String** | Pair | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**clientOrderId** | **String** | Client order ID. | [optional] | +|**price** | **String** | Latest token price. | [optional] | +|**origQty** | **String** | Original order quantity | [optional] | +|**executedQty** | **String** | Executed quantity | [optional] | +|**cumQty** | **String** | Cumulative filled quantity. | [optional] | +|**timeInForce** | **String** | Time in force | [optional] | +|**type** | **String** | Order type. | [optional] | +|**reduceOnly** | **Boolean** | Whether the order is reduce-only. | [optional] | +|**closePosition** | **Boolean** | if Close-All | [optional] | +|**side** | **String** | Trading side | [optional] | +|**positionSide** | **String** | Position side | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**workingType** | **String** | Stop trigger price type. | [optional] | +|**priceProtect** | **Boolean** | if conditional order trigger is protected | [optional] | +|**origType** | **String** | Original order type. | [optional] | +|**updateTime** | **Long** | update time | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ChangeInitialLeverageRequest.md b/clients/derivatives-trading-coin-futures/docs/ChangeInitialLeverageRequest.md index 259567e9f..d1b629757 100644 --- a/clients/derivatives-trading-coin-futures/docs/ChangeInitialLeverageRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/ChangeInitialLeverageRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | -|**leverage** | **Long** | | | +|**symbol** | **String** | Symbol | | +|**leverage** | **Long** | target initial leverage: int from 1 to 125 | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ChangeInitialLeverageResponse.md b/clients/derivatives-trading-coin-futures/docs/ChangeInitialLeverageResponse.md index fa0a34c8b..e4d6d23ea 100644 --- a/clients/derivatives-trading-coin-futures/docs/ChangeInitialLeverageResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/ChangeInitialLeverageResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**leverage** | **Long** | | [optional] | -|**maxQty** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | +|**leverage** | **Long** | Leverage value. | [optional] | +|**maxQty** | **String** | maximum quantity of base asset | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ChangeMarginTypeRequest.md b/clients/derivatives-trading-coin-futures/docs/ChangeMarginTypeRequest.md index e5fc24622..46eed0be8 100644 --- a/clients/derivatives-trading-coin-futures/docs/ChangeMarginTypeRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/ChangeMarginTypeRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | +|**symbol** | **String** | Symbol | | |**marginType** | **MarginType** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ChangeMarginTypeResponse.md b/clients/derivatives-trading-coin-futures/docs/ChangeMarginTypeResponse.md index 52ffe2872..d12b23ab9 100644 --- a/clients/derivatives-trading-coin-futures/docs/ChangeMarginTypeResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/ChangeMarginTypeResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **Long** | | [optional] | -|**msg** | **String** | | [optional] | +|**code** | **Long** | API response code. \"000000\" indicates success. | [optional] | +|**msg** | **String** | Message details. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ChangePositionModeRequest.md b/clients/derivatives-trading-coin-futures/docs/ChangePositionModeRequest.md index 8697d7ca6..b54d8d6a3 100644 --- a/clients/derivatives-trading-coin-futures/docs/ChangePositionModeRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/ChangePositionModeRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**dualSidePosition** | **String** | | | +|**dualSidePosition** | **String** | \"true\": Hedge Mode; \"false\": One-way Mode | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ChangePositionModeResponse.md b/clients/derivatives-trading-coin-futures/docs/ChangePositionModeResponse.md index d5722448b..152a9db3d 100644 --- a/clients/derivatives-trading-coin-futures/docs/ChangePositionModeResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/ChangePositionModeResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **Long** | | [optional] | -|**msg** | **String** | | [optional] | +|**code** | **Long** | API response code. \"000000\" indicates success. | [optional] | +|**msg** | **String** | Message details. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/CheckServerTimeResponse.md b/clients/derivatives-trading-coin-futures/docs/CheckServerTimeResponse.md index 19c4361d1..c5a10afcb 100644 --- a/clients/derivatives-trading-coin-futures/docs/CheckServerTimeResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/CheckServerTimeResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**serverTime** | **Long** | | [optional] | +|**serverTime** | **Long** | Ignore please. If you want to check current server time, please check via \"GET /dapi/v1/time\" | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ClassicPortfolioMarginAccountInformationResponse.md b/clients/derivatives-trading-coin-futures/docs/ClassicPortfolioMarginAccountInformationResponse.md deleted file mode 100644 index 5834e221c..000000000 --- a/clients/derivatives-trading-coin-futures/docs/ClassicPortfolioMarginAccountInformationResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ClassicPortfolioMarginAccountInformationResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**maxWithdrawAmountUSD** | **String** | | [optional] | -|**asset** | **String** | | [optional] | -|**maxWithdrawAmount** | **String** | | [optional] | - - - diff --git a/clients/derivatives-trading-coin-futures/docs/ClosePosition.md b/clients/derivatives-trading-coin-futures/docs/ClosePosition.md new file mode 100644 index 000000000..733d33a1b --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/ClosePosition.md @@ -0,0 +1,13 @@ + + +# ClosePosition + +## Enum + + +* `TRUE` (value: `"true"`) + +* `FALSE` (value: `"false"`) + + + diff --git a/clients/derivatives-trading-coin-futures/docs/CloseUserDataStreamResponse.md b/clients/derivatives-trading-coin-futures/docs/CloseUserDataStreamResponse.md index 9e26aa806..f661c020c 100644 --- a/clients/derivatives-trading-coin-futures/docs/CloseUserDataStreamResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/CloseUserDataStreamResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**status** | **Long** | | [optional] | -|**result** | **Object** | | [optional] | -|**rateLimits** | [**List<CloseUserDataStreamResponseRateLimitsInner>**](CloseUserDataStreamResponseRateLimitsInner.md) | | [optional] | +|**id** | **String** | positionId | [optional] | +|**status** | **Long** | Enum:completed,processing | [optional] | +|**result** | **Object** | Indicates that combined is set to true. | [optional] | +|**rateLimits** | [**List<CloseUserDataStreamResponseRateLimitsInner>**](CloseUserDataStreamResponseRateLimitsInner.md) | Rate limit definitions. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/CloseUserDataStreamResponseRateLimitsInner.md b/clients/derivatives-trading-coin-futures/docs/CloseUserDataStreamResponseRateLimitsInner.md index 29daca530..7e75f99c7 100644 --- a/clients/derivatives-trading-coin-futures/docs/CloseUserDataStreamResponseRateLimitsInner.md +++ b/clients/derivatives-trading-coin-futures/docs/CloseUserDataStreamResponseRateLimitsInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**rateLimitType** | **String** | | [optional] | -|**interval** | **String** | | [optional] | -|**intervalNum** | **Long** | | [optional] | -|**limit** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**rateLimitType** | **String** | Rate limit type. | [optional] | +|**interval** | **String** | Rate limit interval. | [optional] | +|**intervalNum** | **Long** | Rate limit interval multiplier. | [optional] | +|**limit** | **Long** | Maximum allowed orders for this rule. | [optional] | +|**count** | **Long** | Total number of trades in the 24h window. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/CompressedAggregateTradesListResponseInner.md b/clients/derivatives-trading-coin-futures/docs/CompressedAggregateTradesListResponseInner.md index f47e75fcd..e4aa14152 100644 --- a/clients/derivatives-trading-coin-futures/docs/CompressedAggregateTradesListResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/CompressedAggregateTradesListResponseInner.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**aLowerCase** | **Long** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**fLowerCase** | **Long** | | [optional] | -|**lLowerCase** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | +|**aLowerCase** | **Long** | Aggregate tradeId | [optional] | +|**pLowerCase** | **String** | Price | [optional] | +|**qLowerCase** | **String** | Quantity | [optional] | +|**fLowerCase** | **Long** | First tradeId | [optional] | +|**lLowerCase** | **Long** | Last tradeId | [optional] | +|**T** | **Long** | Timestamp | [optional] | +|**mLowerCase** | **Boolean** | Was the buyer the maker? | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickDataItem.md b/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickDataItem.md new file mode 100644 index 000000000..3e480a78d --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickDataItem.md @@ -0,0 +1,12 @@ + + +# ContinuousContractKlineCandlestickDataItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickDataItemInner.md b/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickDataItemInner.md new file mode 100644 index 000000000..7dc34b4c6 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickDataItemInner.md @@ -0,0 +1,12 @@ + + +# ContinuousContractKlineCandlestickDataItemInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickDataResponseItem.md b/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickDataResponseItem.md deleted file mode 100644 index 5030fbf08..000000000 --- a/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickDataResponseItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# ContinuousContractKlineCandlestickDataResponseItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickDataResponseItemInner.md b/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickDataResponseItemInner.md deleted file mode 100644 index db6bd383b..000000000 --- a/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickDataResponseItemInner.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# ContinuousContractKlineCandlestickDataResponseItemInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickStreamsRequest.md b/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickStreamsRequest.md index 25d1e9ee5..de4621cad 100644 --- a/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickStreamsRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickStreamsRequest.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**pair** | **String** | | | -|**contractType** | **String** | | | -|**interval** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**pair** | **String** | The pair parameter | [optional] | +|**contractType** | **ContractType** | | [optional] | +|**interval** | **Interval** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickStreamsResponse.md b/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickStreamsResponse.md index 4c963a2ef..1d45cb73a 100644 --- a/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickStreamsResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickStreamsResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**ps** | **String** | | [optional] | -|**ct** | **String** | | [optional] | +|**eLowerCase** | **String** | eventType | [optional] | +|**E** | **Long** | eventTime | [optional] | +|**ps** | **String** | Pair | [optional] | +|**ct** | **String** | Contract type | [optional] | |**kLowerCase** | [**ContinuousContractKlineCandlestickStreamsResponseK**](ContinuousContractKlineCandlestickStreamsResponseK.md) | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickStreamsResponseK.md b/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickStreamsResponseK.md index 2dbe619bd..54127c8a3 100644 --- a/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickStreamsResponseK.md +++ b/clients/derivatives-trading-coin-futures/docs/ContinuousContractKlineCandlestickStreamsResponseK.md @@ -2,27 +2,28 @@ # ContinuousContractKlineCandlestickStreamsResponseK +Kline payload ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tLowerCase** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**fLowerCase** | **Long** | | [optional] | -|**L** | **Long** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**nLowerCase** | **Long** | | [optional] | -|**xLowerCase** | **Boolean** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**V** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**B** | **String** | | [optional] | +|**tLowerCase** | **Long** | Kline start time | [optional] | +|**T** | **Long** | transactionTime | [optional] | +|**iLowerCase** | **String** | interval | [optional] | +|**fLowerCase** | **Long** | First update ID | [optional] | +|**L** | **Long** | Last update ID | [optional] | +|**oLowerCase** | **String** | openPrice | [optional] | +|**cLowerCase** | **String** | closePrice | [optional] | +|**hLowerCase** | **String** | highPrice | [optional] | +|**lLowerCase** | **String** | lowPrice | [optional] | +|**vLowerCase** | **String** | volume | [optional] | +|**nLowerCase** | **Long** | tradeNum | [optional] | +|**xLowerCase** | **Boolean** | Is this kline closed? | [optional] | +|**qLowerCase** | **String** | quoteVolume | [optional] | +|**V** | **String** | Taker buy volume | [optional] | +|**Q** | **String** | lastTradeVolume | [optional] | +|**B** | **String** | Best bid qty | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ContractInfoStreamRequest.md b/clients/derivatives-trading-coin-futures/docs/ContractInfoStreamRequest.md index 035a6cc65..b7309a2a9 100644 --- a/clients/derivatives-trading-coin-futures/docs/ContractInfoStreamRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/ContractInfoStreamRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ContractInfoStreamResponse.md b/clients/derivatives-trading-coin-futures/docs/ContractInfoStreamResponse.md index fa886e353..7832e2c78 100644 --- a/clients/derivatives-trading-coin-futures/docs/ContractInfoStreamResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/ContractInfoStreamResponse.md @@ -7,15 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**ct** | **String** | | [optional] | -|**dt** | **Long** | | [optional] | -|**ot** | **Long** | | [optional] | -|**cs** | **String** | | [optional] | -|**bks** | [**List<ContractInfoStreamResponseBksInner>**](ContractInfoStreamResponseBksInner.md) | | [optional] | +|**eLowerCase** | **String** | Event Type | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**ps** | **String** | Pair | [optional] | +|**ct** | **String** | Contract type | [optional] | +|**dt** | **Long** | Delivery date time | [optional] | +|**ot** | **Long** | onboard date time | [optional] | +|**cs** | **String** | Contract status | [optional] | +|**bks** | [**List<ContractInfoStreamResponseBksInner>**](ContractInfoStreamResponseBksInner.md) | Bracket list. | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ContractInfoStreamResponseBksInner.md b/clients/derivatives-trading-coin-futures/docs/ContractInfoStreamResponseBksInner.md index b08b0e2ad..05b17cda6 100644 --- a/clients/derivatives-trading-coin-futures/docs/ContractInfoStreamResponseBksInner.md +++ b/clients/derivatives-trading-coin-futures/docs/ContractInfoStreamResponseBksInner.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**bs** | **Long** | | [optional] | -|**bnf** | **Long** | | [optional] | -|**bnc** | **Long** | | [optional] | -|**mmr** | **Double** | | [optional] | -|**cf** | **Long** | | [optional] | -|**mi** | **Long** | | [optional] | -|**ma** | **Long** | | [optional] | +|**bs** | **Long** | Notional bracket | [optional] | +|**bnf** | **Long** | Floor notional of this bracket | [optional] | +|**bnc** | **Long** | Cap notional of this bracket | [optional] | +|**mmr** | **Double** | Maintenance ratio for this bracket | [optional] | +|**cf** | **Long** | Auxiliary number for quick calculation | [optional] | +|**mi** | **Long** | Min leverage for this bracket | [optional] | +|**ma** | **Long** | Max leverage for this bracket | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ContractType.md b/clients/derivatives-trading-coin-futures/docs/ContractType.md index 21f0e22b1..74457b715 100644 --- a/clients/derivatives-trading-coin-futures/docs/ContractType.md +++ b/clients/derivatives-trading-coin-futures/docs/ContractType.md @@ -5,17 +5,11 @@ ## Enum -* `PERPETUAL` (value: `"PERPETUAL"`) +* `perpetual` (value: `"perpetual"`) -* `CURRENT_QUARTER` (value: `"CURRENT_QUARTER"`) +* `current_quarter` (value: `"current_quarter"`) -* `NEXT_QUARTER` (value: `"NEXT_QUARTER"`) - -* `CURRENT_QUARTER_DELIVERING` (value: `"CURRENT_QUARTER_DELIVERING"`) - -* `NEXT_QUARTER_DELIVERING` (value: `"NEXT_QUARTER_DELIVERING"`) - -* `PERPETUAL_DELIVERING` (value: `"PERPETUAL_DELIVERING"`) +* `next_quarter` (value: `"next_quarter"`) diff --git a/clients/derivatives-trading-coin-futures/docs/DefaultApi.md b/clients/derivatives-trading-coin-futures/docs/DefaultApi.md new file mode 100644 index 000000000..0acd2fdc0 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/DefaultApi.md @@ -0,0 +1,1205 @@ +# DefaultApi + +All URIs are relative to *http://localhost* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**aggregateTradeStreams**](DefaultApi.md#aggregateTradeStreams) | **POST** /<symbol>@aggTrade | Aggregate Trade Streams | +| [**allBookTickersStream**](DefaultApi.md#allBookTickersStream) | **POST** /!bookTicker | All Book Tickers Stream | +| [**allMarketLiquidationOrderStreams**](DefaultApi.md#allMarketLiquidationOrderStreams) | **POST** /!forceOrder@arr | All Market Liquidation Order Streams | +| [**allMarketMiniTickersStream**](DefaultApi.md#allMarketMiniTickersStream) | **POST** /!miniTicker@arr | All Market Mini Tickers Stream | +| [**allMarketTickersStreams**](DefaultApi.md#allMarketTickersStreams) | **POST** /!ticker@arr | All Market Tickers Streams | +| [**continuousContractKlineCandlestickStreams**](DefaultApi.md#continuousContractKlineCandlestickStreams) | **POST** /<pair>_<contractType>@continuousKline_<interval> | Continuous Contract Kline/Candlestick Streams | +| [**contractInfoStream**](DefaultApi.md#contractInfoStream) | **POST** /!contractInfo | Contract Info Stream | +| [**diffBookDepthStreams**](DefaultApi.md#diffBookDepthStreams) | **POST** /<symbol>@depth@<updateSpeed> | Diff. Book Depth Streams | +| [**indexKlineCandlestickStreams**](DefaultApi.md#indexKlineCandlestickStreams) | **POST** /<pair>@indexPriceKline_<interval> | Index Kline/Candlestick Streams | +| [**indexPriceStream**](DefaultApi.md#indexPriceStream) | **POST** /<pair>@indexPrice@<updateSpeed> | Index Price Stream | +| [**individualSymbolBookTickerStreams**](DefaultApi.md#individualSymbolBookTickerStreams) | **POST** /<symbol>@bookTicker | Individual Symbol Book Ticker Streams | +| [**individualSymbolMiniTickerStream**](DefaultApi.md#individualSymbolMiniTickerStream) | **POST** /<symbol>@miniTicker | Individual Symbol Mini Ticker Stream | +| [**individualSymbolTickerStreams**](DefaultApi.md#individualSymbolTickerStreams) | **POST** /<symbol>@ticker | Individual Symbol Ticker Streams | +| [**klineCandlestickStreams**](DefaultApi.md#klineCandlestickStreams) | **POST** /<symbol>@kline_<interval> | Kline/Candlestick Streams | +| [**markPriceKlineCandlestickStreams**](DefaultApi.md#markPriceKlineCandlestickStreams) | **POST** /<symbol>@markPriceKline_<interval> | Mark Price Kline/Candlestick Streams | +| [**markPriceOfAllSymbolsOfAPair**](DefaultApi.md#markPriceOfAllSymbolsOfAPair) | **POST** /<pair>@markPrice@<updateSpeed> | Mark Price of All Symbols of a Pair | +| [**markPriceStream**](DefaultApi.md#markPriceStream) | **POST** /<symbol>@markPrice@<updateSpeed> | Mark Price Stream | +| [**marketLiquidationOrderStreams**](DefaultApi.md#marketLiquidationOrderStreams) | **POST** /<symbol>@forceOrder | Market Liquidation Order Streams | +| [**partialBookDepthStreams**](DefaultApi.md#partialBookDepthStreams) | **POST** /<symbol>@depth<levels>@<updateSpeed> | Partial Book Depth Streams | + + + +# **aggregateTradeStreams** +> AggregateTradeStreamsResponse aggregateTradeStreams(aggregateTradeStreamsRequest) + +Aggregate Trade Streams + +The Aggregate Trade Streams push market trade information that is aggregated for fills with same price and taking side every 100 milliseconds. > **After CM migration**, the payload is appended with a new `st` field (`1` = UM, `2` = CM). Update Speed: 100ms + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + AggregateTradeStreamsRequest aggregateTradeStreamsRequest = new AggregateTradeStreamsRequest(); // AggregateTradeStreamsRequest | + try { + AggregateTradeStreamsResponse result = apiInstance.aggregateTradeStreams(aggregateTradeStreamsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#aggregateTradeStreams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **aggregateTradeStreamsRequest** | [**AggregateTradeStreamsRequest**](AggregateTradeStreamsRequest.md)| | | + +### Return type + +[**AggregateTradeStreamsResponse**](AggregateTradeStreamsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Aggregate Trade Streams | - | + + +# **allBookTickersStream** +> AllBookTickersStreamResponse allBookTickersStream(allBookTickersStreamRequest) + +All Book Tickers Stream + +Pushes any update to the best bid or ask's price or quantity in real-time for all symbols. > **After CM migration**, this stream pushes the merged UM + CM universe (subscribable on both `fstream` and `dstream`); each payload is appended with a new `st` field (`1` = UM, `2` = CM). Update Speed: Real-time + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + AllBookTickersStreamRequest allBookTickersStreamRequest = new AllBookTickersStreamRequest(); // AllBookTickersStreamRequest | + try { + AllBookTickersStreamResponse result = apiInstance.allBookTickersStream(allBookTickersStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#allBookTickersStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **allBookTickersStreamRequest** | [**AllBookTickersStreamRequest**](AllBookTickersStreamRequest.md)| | | + +### Return type + +[**AllBookTickersStreamResponse**](AllBookTickersStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | All Book Tickers Stream | - | + + +# **allMarketLiquidationOrderStreams** +> AllMarketLiquidationOrderStreamsResponse allMarketLiquidationOrderStreams(allMarketLiquidationOrderStreamsRequest) + +All Market Liquidation Order Streams + +The All Liquidation Order Snapshot Streams push force liquidation order information for all symbols in the market. For each symbol,only the latest one liquidation order within 1000ms will be pushed as the snapshot. If no liquidation happens in the interval of 1000ms, no stream will be pushed. > **After CM migration**, this stream pushes the merged UM + CM universe (subscribable on both `fstream` and `dstream`); each payload is appended with a new `st` field (`1` = UM, `2` = CM). Update Speed: 1000ms + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + AllMarketLiquidationOrderStreamsRequest allMarketLiquidationOrderStreamsRequest = new AllMarketLiquidationOrderStreamsRequest(); // AllMarketLiquidationOrderStreamsRequest | + try { + AllMarketLiquidationOrderStreamsResponse result = apiInstance.allMarketLiquidationOrderStreams(allMarketLiquidationOrderStreamsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#allMarketLiquidationOrderStreams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **allMarketLiquidationOrderStreamsRequest** | [**AllMarketLiquidationOrderStreamsRequest**](AllMarketLiquidationOrderStreamsRequest.md)| | | + +### Return type + +[**AllMarketLiquidationOrderStreamsResponse**](AllMarketLiquidationOrderStreamsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | All Market Liquidation Order Streams | - | + + +# **allMarketMiniTickersStream** +> AllMarketMiniTickersStreamResponse allMarketMiniTickersStream(allMarketMiniTickersStreamRequest) + +All Market Mini Tickers Stream + +24hr rolling window mini-ticker statistics for all symbols. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Note that only tickers that have changed will be present in the array. > **After CM migration**, this stream pushes the merged UM + CM universe (subscribable on both `fstream` and `dstream`); each payload is appended with a new `st` field (`1` = UM, `2` = CM). Update Speed: 1000ms + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + AllMarketMiniTickersStreamRequest allMarketMiniTickersStreamRequest = new AllMarketMiniTickersStreamRequest(); // AllMarketMiniTickersStreamRequest | + try { + AllMarketMiniTickersStreamResponse result = apiInstance.allMarketMiniTickersStream(allMarketMiniTickersStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#allMarketMiniTickersStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **allMarketMiniTickersStreamRequest** | [**AllMarketMiniTickersStreamRequest**](AllMarketMiniTickersStreamRequest.md)| | | + +### Return type + +[**AllMarketMiniTickersStreamResponse**](AllMarketMiniTickersStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | All Market Mini Tickers Stream | - | + + +# **allMarketTickersStreams** +> AllMarketTickersStreamsResponse allMarketTickersStreams(allMarketTickersStreamsRequest) + +All Market Tickers Streams + +24hr rolling window ticker statistics for all symbols. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Note that only tickers that have changed will be present in the array. > **After CM migration**, this stream pushes the merged UM + CM universe (subscribable on both `fstream` and `dstream`); each payload is appended with a new `st` field (`1` = UM, `2` = CM). Update Speed: 1000ms + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + AllMarketTickersStreamsRequest allMarketTickersStreamsRequest = new AllMarketTickersStreamsRequest(); // AllMarketTickersStreamsRequest | + try { + AllMarketTickersStreamsResponse result = apiInstance.allMarketTickersStreams(allMarketTickersStreamsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#allMarketTickersStreams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **allMarketTickersStreamsRequest** | [**AllMarketTickersStreamsRequest**](AllMarketTickersStreamsRequest.md)| | | + +### Return type + +[**AllMarketTickersStreamsResponse**](AllMarketTickersStreamsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | All Market Tickers Streams | - | + + +# **continuousContractKlineCandlestickStreams** +> ContinuousContractKlineCandlestickStreamsResponse continuousContractKlineCandlestickStreams(continuousContractKlineCandlestickStreamsRequest) + +Continuous Contract Kline/Candlestick Streams + +Kline update every second > **After CM migration**, both `fstream` and `dstream` may subscribe to either UM or CM symbols on this stream. Update Speed: 250ms + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + ContinuousContractKlineCandlestickStreamsRequest continuousContractKlineCandlestickStreamsRequest = new ContinuousContractKlineCandlestickStreamsRequest(); // ContinuousContractKlineCandlestickStreamsRequest | + try { + ContinuousContractKlineCandlestickStreamsResponse result = apiInstance.continuousContractKlineCandlestickStreams(continuousContractKlineCandlestickStreamsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#continuousContractKlineCandlestickStreams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **continuousContractKlineCandlestickStreamsRequest** | [**ContinuousContractKlineCandlestickStreamsRequest**](ContinuousContractKlineCandlestickStreamsRequest.md)| | | + +### Return type + +[**ContinuousContractKlineCandlestickStreamsResponse**](ContinuousContractKlineCandlestickStreamsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Continuous Contract Kline/Candlestick Streams | - | + + +# **contractInfoStream** +> ContractInfoStreamResponse contractInfoStream(contractInfoStreamRequest) + +Contract Info Stream + +ContractInfo stream pushes when contract info updates(listing/settlement/contract bracket update). bks field only shows up when bracket gets updated. > **After CM migration**, this stream pushes the merged UM + CM universe (subscribable on both `fstream` and `dstream`); each payload is appended with a new `st` field (`1` = UM, `2` = CM). Update Speed: Real-time + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + ContractInfoStreamRequest contractInfoStreamRequest = new ContractInfoStreamRequest(); // ContractInfoStreamRequest | + try { + ContractInfoStreamResponse result = apiInstance.contractInfoStream(contractInfoStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#contractInfoStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **contractInfoStreamRequest** | [**ContractInfoStreamRequest**](ContractInfoStreamRequest.md)| | | + +### Return type + +[**ContractInfoStreamResponse**](ContractInfoStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Contract Info Stream | - | + + +# **diffBookDepthStreams** +> DiffBookDepthStreamsResponse diffBookDepthStreams(diffBookDepthStreamsRequest) + +Diff. Book Depth Streams + +Bids and asks, pushed every 250 milliseconds, 500 milliseconds, or 100 milliseconds > **After CM migration**, the payload is appended with a new `st` field (`1` = UM, `2` = CM). Update Speed: 250ms or 500ms or 100ms + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + DiffBookDepthStreamsRequest diffBookDepthStreamsRequest = new DiffBookDepthStreamsRequest(); // DiffBookDepthStreamsRequest | + try { + DiffBookDepthStreamsResponse result = apiInstance.diffBookDepthStreams(diffBookDepthStreamsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#diffBookDepthStreams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **diffBookDepthStreamsRequest** | [**DiffBookDepthStreamsRequest**](DiffBookDepthStreamsRequest.md)| | | + +### Return type + +[**DiffBookDepthStreamsResponse**](DiffBookDepthStreamsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Diff. Book Depth Streams | - | + + +# **indexKlineCandlestickStreams** +> IndexKlineCandlestickStreamsResponse indexKlineCandlestickStreams(indexKlineCandlestickStreamsRequest) + +Index Kline/Candlestick Streams + +Index Kline/Candlestick Streams > **After CM migration**, both `fstream` and `dstream` may subscribe to CM symbols on this stream. Update Speed: 250ms + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + IndexKlineCandlestickStreamsRequest indexKlineCandlestickStreamsRequest = new IndexKlineCandlestickStreamsRequest(); // IndexKlineCandlestickStreamsRequest | + try { + IndexKlineCandlestickStreamsResponse result = apiInstance.indexKlineCandlestickStreams(indexKlineCandlestickStreamsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#indexKlineCandlestickStreams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **indexKlineCandlestickStreamsRequest** | [**IndexKlineCandlestickStreamsRequest**](IndexKlineCandlestickStreamsRequest.md)| | | + +### Return type + +[**IndexKlineCandlestickStreamsResponse**](IndexKlineCandlestickStreamsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Index Kline/Candlestick Streams | - | + + +# **indexPriceStream** +> IndexPriceStreamResponse indexPriceStream(indexPriceStreamRequest) + +Index Price Stream + +Index Price Stream Update Speed: 3000ms OR 1000ms + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + IndexPriceStreamRequest indexPriceStreamRequest = new IndexPriceStreamRequest(); // IndexPriceStreamRequest | + try { + IndexPriceStreamResponse result = apiInstance.indexPriceStream(indexPriceStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#indexPriceStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **indexPriceStreamRequest** | [**IndexPriceStreamRequest**](IndexPriceStreamRequest.md)| | | + +### Return type + +[**IndexPriceStreamResponse**](IndexPriceStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Index Price Stream | - | + + +# **individualSymbolBookTickerStreams** +> IndividualSymbolBookTickerStreamsResponse individualSymbolBookTickerStreams(individualSymbolBookTickerStreamsRequest) + +Individual Symbol Book Ticker Streams + +Pushes any update to the best bid or ask's price or quantity in real-time for a specified symbol. > **After CM migration**, the payload is appended with a new `st` field (`1` = UM, `2` = CM). Update Speed: Real-time + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + IndividualSymbolBookTickerStreamsRequest individualSymbolBookTickerStreamsRequest = new IndividualSymbolBookTickerStreamsRequest(); // IndividualSymbolBookTickerStreamsRequest | + try { + IndividualSymbolBookTickerStreamsResponse result = apiInstance.individualSymbolBookTickerStreams(individualSymbolBookTickerStreamsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#individualSymbolBookTickerStreams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **individualSymbolBookTickerStreamsRequest** | [**IndividualSymbolBookTickerStreamsRequest**](IndividualSymbolBookTickerStreamsRequest.md)| | | + +### Return type + +[**IndividualSymbolBookTickerStreamsResponse**](IndividualSymbolBookTickerStreamsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Individual Symbol Book Ticker Streams | - | + + +# **individualSymbolMiniTickerStream** +> IndividualSymbolMiniTickerStreamResponse individualSymbolMiniTickerStream(individualSymbolMiniTickerStreamRequest) + +Individual Symbol Mini Ticker Stream + +24hr rolling window mini-ticker statistics for a single symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. > **After CM migration**, the payload is appended with a new `st` field (`1` = UM, `2` = CM). Update Speed: 500ms + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + IndividualSymbolMiniTickerStreamRequest individualSymbolMiniTickerStreamRequest = new IndividualSymbolMiniTickerStreamRequest(); // IndividualSymbolMiniTickerStreamRequest | + try { + IndividualSymbolMiniTickerStreamResponse result = apiInstance.individualSymbolMiniTickerStream(individualSymbolMiniTickerStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#individualSymbolMiniTickerStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **individualSymbolMiniTickerStreamRequest** | [**IndividualSymbolMiniTickerStreamRequest**](IndividualSymbolMiniTickerStreamRequest.md)| | | + +### Return type + +[**IndividualSymbolMiniTickerStreamResponse**](IndividualSymbolMiniTickerStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Individual Symbol Mini Ticker Stream | - | + + +# **individualSymbolTickerStreams** +> IndividualSymbolTickerStreamsResponse individualSymbolTickerStreams(individualSymbolTickerStreamsRequest) + +Individual Symbol Ticker Streams + +24hr rolling window ticker statistics for a single symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. > **After CM migration**, the payload is appended with a new `st` field (`1` = UM, `2` = CM). Update Speed: 500ms + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + IndividualSymbolTickerStreamsRequest individualSymbolTickerStreamsRequest = new IndividualSymbolTickerStreamsRequest(); // IndividualSymbolTickerStreamsRequest | + try { + IndividualSymbolTickerStreamsResponse result = apiInstance.individualSymbolTickerStreams(individualSymbolTickerStreamsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#individualSymbolTickerStreams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **individualSymbolTickerStreamsRequest** | [**IndividualSymbolTickerStreamsRequest**](IndividualSymbolTickerStreamsRequest.md)| | | + +### Return type + +[**IndividualSymbolTickerStreamsResponse**](IndividualSymbolTickerStreamsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Individual Symbol Ticker Streams | - | + + +# **klineCandlestickStreams** +> KlineCandlestickStreamsResponse klineCandlestickStreams(klineCandlestickStreamsRequest) + +Kline/Candlestick Streams + +The Kline/Candlestick Stream push updates to the current klines/candlestick every 250 milliseconds (if existing). > **After CM migration**, both `fstream` and `dstream` may subscribe to either UM or CM symbols on this stream. Update Speed: 250ms + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + KlineCandlestickStreamsRequest klineCandlestickStreamsRequest = new KlineCandlestickStreamsRequest(); // KlineCandlestickStreamsRequest | + try { + KlineCandlestickStreamsResponse result = apiInstance.klineCandlestickStreams(klineCandlestickStreamsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#klineCandlestickStreams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **klineCandlestickStreamsRequest** | [**KlineCandlestickStreamsRequest**](KlineCandlestickStreamsRequest.md)| | | + +### Return type + +[**KlineCandlestickStreamsResponse**](KlineCandlestickStreamsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Kline/Candlestick Streams | - | + + +# **markPriceKlineCandlestickStreams** +> MarkPriceKlineCandlestickStreamsResponse markPriceKlineCandlestickStreams(markPriceKlineCandlestickStreamsRequest) + +Mark Price Kline/Candlestick Streams + +Mark Price Kline/Candlestick Streams > **After CM migration**, both `fstream` and `dstream` may subscribe to CM symbols on this stream. Update Speed: 250ms + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + MarkPriceKlineCandlestickStreamsRequest markPriceKlineCandlestickStreamsRequest = new MarkPriceKlineCandlestickStreamsRequest(); // MarkPriceKlineCandlestickStreamsRequest | + try { + MarkPriceKlineCandlestickStreamsResponse result = apiInstance.markPriceKlineCandlestickStreams(markPriceKlineCandlestickStreamsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#markPriceKlineCandlestickStreams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **markPriceKlineCandlestickStreamsRequest** | [**MarkPriceKlineCandlestickStreamsRequest**](MarkPriceKlineCandlestickStreamsRequest.md)| | | + +### Return type + +[**MarkPriceKlineCandlestickStreamsResponse**](MarkPriceKlineCandlestickStreamsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Mark Price Kline/Candlestick Streams | - | + + +# **markPriceOfAllSymbolsOfAPair** +> MarkPriceOfAllSymbolsOfAPairResponse markPriceOfAllSymbolsOfAPair(markPriceOfAllSymbolsOfAPairRequest) + +Mark Price of All Symbols of a Pair + +Mark Price of All Symbols of a Pair > **After CM migration**, the payload is appended with a new `st` field (`1` = UM, `2` = CM); both `fstream` and `dstream` may subscribe to either UM or CM symbols on this stream. Update Speed: 3000ms OR 1000ms + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + MarkPriceOfAllSymbolsOfAPairRequest markPriceOfAllSymbolsOfAPairRequest = new MarkPriceOfAllSymbolsOfAPairRequest(); // MarkPriceOfAllSymbolsOfAPairRequest | + try { + MarkPriceOfAllSymbolsOfAPairResponse result = apiInstance.markPriceOfAllSymbolsOfAPair(markPriceOfAllSymbolsOfAPairRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#markPriceOfAllSymbolsOfAPair"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **markPriceOfAllSymbolsOfAPairRequest** | [**MarkPriceOfAllSymbolsOfAPairRequest**](MarkPriceOfAllSymbolsOfAPairRequest.md)| | | + +### Return type + +[**MarkPriceOfAllSymbolsOfAPairResponse**](MarkPriceOfAllSymbolsOfAPairResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Mark Price of All Symbols of a Pair | - | + + +# **markPriceStream** +> MarkPriceStreamResponse markPriceStream(markPriceStreamRequest) + +Mark Price Stream + +Mark price update stream > **After CM migration**, the payload is appended with a new `st` field (`1` = UM, `2` = CM); both `fstream` and `dstream` may subscribe to either UM or CM symbols on this stream. Update Speed: 3000ms OR 1000ms + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + MarkPriceStreamRequest markPriceStreamRequest = new MarkPriceStreamRequest(); // MarkPriceStreamRequest | + try { + MarkPriceStreamResponse result = apiInstance.markPriceStream(markPriceStreamRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#markPriceStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **markPriceStreamRequest** | [**MarkPriceStreamRequest**](MarkPriceStreamRequest.md)| | | + +### Return type + +[**MarkPriceStreamResponse**](MarkPriceStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Mark Price Stream | - | + + +# **marketLiquidationOrderStreams** +> MarketLiquidationOrderStreamsResponse marketLiquidationOrderStreams(marketLiquidationOrderStreamsRequest) + +Market Liquidation Order Streams + +The Liquidation Order Snapshot Streams push force liquidation order information for specific symbol. For each symbol,only the latest one liquidation order within 1000ms will be pushed as the snapshot. If no liquidation happens in the interval of 1000ms, no stream will be pushed. Update Speed: 1000ms + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + MarketLiquidationOrderStreamsRequest marketLiquidationOrderStreamsRequest = new MarketLiquidationOrderStreamsRequest(); // MarketLiquidationOrderStreamsRequest | + try { + MarketLiquidationOrderStreamsResponse result = apiInstance.marketLiquidationOrderStreams(marketLiquidationOrderStreamsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#marketLiquidationOrderStreams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **marketLiquidationOrderStreamsRequest** | [**MarketLiquidationOrderStreamsRequest**](MarketLiquidationOrderStreamsRequest.md)| | | + +### Return type + +[**MarketLiquidationOrderStreamsResponse**](MarketLiquidationOrderStreamsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Liquidation Order Streams | - | + + +# **partialBookDepthStreams** +> PartialBookDepthStreamsResponse partialBookDepthStreams(partialBookDepthStreamsRequest) + +Partial Book Depth Streams + +Top levels bids and asks. > **After CM migration**, the payload is appended with a new `st` field (`1` = UM, `2` = CM). Update Speed: 250ms, 500ms or 100ms + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; +import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; +import com.binance.connector.client.derivatives_trading_coin_futures.models.*; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + PartialBookDepthStreamsRequest partialBookDepthStreamsRequest = new PartialBookDepthStreamsRequest(); // PartialBookDepthStreamsRequest | + try { + PartialBookDepthStreamsResponse result = apiInstance.partialBookDepthStreams(partialBookDepthStreamsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#partialBookDepthStreams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **partialBookDepthStreamsRequest** | [**PartialBookDepthStreamsRequest**](PartialBookDepthStreamsRequest.md)| | | + +### Return type + +[**PartialBookDepthStreamsResponse**](PartialBookDepthStreamsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Partial Book Depth Streams | - | + diff --git a/clients/derivatives-trading-coin-futures/docs/DiffBookDepthStreamsRequest.md b/clients/derivatives-trading-coin-futures/docs/DiffBookDepthStreamsRequest.md index 9b25eb2d8..de2ee4ff2 100644 --- a/clients/derivatives-trading-coin-futures/docs/DiffBookDepthStreamsRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/DiffBookDepthStreamsRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | -|**updateSpeed** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | +|**updateSpeed** | **UpdateSpeed** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/DiffBookDepthStreamsResponse.md b/clients/derivatives-trading-coin-futures/docs/DiffBookDepthStreamsResponse.md index 69558843a..31b1da760 100644 --- a/clients/derivatives-trading-coin-futures/docs/DiffBookDepthStreamsResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/DiffBookDepthStreamsResponse.md @@ -7,16 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**U** | **Long** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**pu** | **Long** | | [optional] | -|**bLowerCase** | **List<DiffBookDepthStreamsResponseBItem>** | | [optional] | -|**aLowerCase** | **List<DiffBookDepthStreamsResponseAItem>** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**T** | **Long** | Transction time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**ps** | **String** | Pair | [optional] | +|**U** | **Long** | First update ID in event | [optional] | +|**uLowerCase** | **Long** | Final update ID in event | [optional] | +|**pu** | **Long** | Final update Id in last stream(ie `u` in last stream) | [optional] | +|**bLowerCase** | **List<List<String>>** | Bids to be updated | [optional] | +|**aLowerCase** | **List<List<String>>** | Asks to be updated | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/DiffBookDepthStreamsResponseAItem.md b/clients/derivatives-trading-coin-futures/docs/DiffBookDepthStreamsResponseAItem.md deleted file mode 100644 index e95d11d71..000000000 --- a/clients/derivatives-trading-coin-futures/docs/DiffBookDepthStreamsResponseAItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# DiffBookDepthStreamsResponseAItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-coin-futures/docs/DiffBookDepthStreamsResponseBItem.md b/clients/derivatives-trading-coin-futures/docs/DiffBookDepthStreamsResponseBItem.md deleted file mode 100644 index dce623f51..000000000 --- a/clients/derivatives-trading-coin-futures/docs/DiffBookDepthStreamsResponseBItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# DiffBookDepthStreamsResponseBItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-coin-futures/docs/ExchangeInformationResponse.md b/clients/derivatives-trading-coin-futures/docs/ExchangeInformationResponse.md index d6088e510..edbebd117 100644 --- a/clients/derivatives-trading-coin-futures/docs/ExchangeInformationResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/ExchangeInformationResponse.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**exchangeFilters** | **List<String>** | | [optional] | -|**rateLimits** | [**List<ExchangeInformationResponseRateLimitsInner>**](ExchangeInformationResponseRateLimitsInner.md) | | [optional] | -|**serverTime** | **Long** | | [optional] | -|**symbols** | [**List<ExchangeInformationResponseSymbolsInner>**](ExchangeInformationResponseSymbolsInner.md) | | [optional] | -|**timezone** | **String** | | [optional] | +|**exchangeFilters** | **List<String>** | Exchange filters. | [optional] | +|**rateLimits** | [**List<ExchangeInformationResponseRateLimitsInner>**](ExchangeInformationResponseRateLimitsInner.md) | Rate limit definitions. | [optional] | +|**serverTime** | **Long** | Ignore please. If you want to check current server time, please check via \"GET /dapi/v1/time\" | [optional] | +|**symbols** | [**List<ExchangeInformationResponseSymbolsInner>**](ExchangeInformationResponseSymbolsInner.md) | Supported trading symbols. | [optional] | +|**timezone** | **String** | Timezone of market data. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ExchangeInformationResponseRateLimitsInner.md b/clients/derivatives-trading-coin-futures/docs/ExchangeInformationResponseRateLimitsInner.md index ef75b5b38..96d98b7c7 100644 --- a/clients/derivatives-trading-coin-futures/docs/ExchangeInformationResponseRateLimitsInner.md +++ b/clients/derivatives-trading-coin-futures/docs/ExchangeInformationResponseRateLimitsInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**interval** | **String** | | [optional] | -|**intervalNum** | **Long** | | [optional] | -|**limit** | **Long** | | [optional] | -|**rateLimitType** | **String** | | [optional] | +|**interval** | **String** | Rate limit interval. | [optional] | +|**intervalNum** | **Long** | Rate limit interval multiplier. | [optional] | +|**limit** | **Long** | Maximum allowed orders for this rule. | [optional] | +|**rateLimitType** | **String** | Rate limit type. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ExchangeInformationResponseSymbolsInner.md b/clients/derivatives-trading-coin-futures/docs/ExchangeInformationResponseSymbolsInner.md index ceaf70a18..318c5e690 100644 --- a/clients/derivatives-trading-coin-futures/docs/ExchangeInformationResponseSymbolsInner.md +++ b/clients/derivatives-trading-coin-futures/docs/ExchangeInformationResponseSymbolsInner.md @@ -7,31 +7,31 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**filters** | [**List<ExchangeInformationResponseSymbolsInnerFiltersInner>**](ExchangeInformationResponseSymbolsInnerFiltersInner.md) | | [optional] | -|**orderTypes** | **List<String>** | | [optional] | -|**timeInForce** | **List<String>** | | [optional] | -|**liquidationFee** | **String** | | [optional] | -|**marketTakeBound** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**contractType** | **String** | | [optional] | -|**deliveryDate** | **Long** | | [optional] | -|**onboardDate** | **Long** | | [optional] | -|**contractStatus** | **String** | | [optional] | -|**contractSize** | **Long** | | [optional] | -|**quoteAsset** | **String** | | [optional] | -|**baseAsset** | **String** | | [optional] | -|**marginAsset** | **String** | | [optional] | -|**pricePrecision** | **Long** | | [optional] | -|**quantityPrecision** | **Long** | | [optional] | -|**baseAssetPrecision** | **Long** | | [optional] | -|**quotePrecision** | **Long** | | [optional] | -|**equalQtyPrecision** | **Long** | | [optional] | -|**triggerProtect** | **String** | | [optional] | -|**maintMarginPercent** | **String** | | [optional] | -|**requiredMarginPercent** | **String** | | [optional] | -|**underlyingType** | **String** | | [optional] | -|**underlyingSubType** | **List<String>** | | [optional] | +|**filters** | [**List<ExchangeInformationResponseSymbolsInnerFiltersInner>**](ExchangeInformationResponseSymbolsInnerFiltersInner.md) | Trading filters and constraints. | [optional] | +|**orderTypes** | **List<String>** | Supported order types. | [optional] | +|**timeInForce** | **List<String>** | Time in force | [optional] | +|**liquidationFee** | **String** | liquidation fee rate | [optional] | +|**marketTakeBound** | **String** | the max price difference rate( from mark price) a market order can make | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**pair** | **String** | Pair | [optional] | +|**contractType** | **String** | Contract type. | [optional] | +|**deliveryDate** | **Long** | Delivery timestamp. | [optional] | +|**onboardDate** | **Long** | Onboard timestamp. | [optional] | +|**contractStatus** | **String** | Contract status. | [optional] | +|**contractSize** | **Long** | Contract size. | [optional] | +|**quoteAsset** | **String** | Quote asset symbol. | [optional] | +|**baseAsset** | **String** | Base asset symbol. | [optional] | +|**marginAsset** | **String** | Margin asset. | [optional] | +|**pricePrecision** | **Long** | please do not use it as tickSize | [optional] | +|**quantityPrecision** | **Long** | please do not use it as stepSize | [optional] | +|**baseAssetPrecision** | **Long** | Base asset precision. | [optional] | +|**quotePrecision** | **Long** | Quote asset precision. | [optional] | +|**equalQtyPrecision** | **Long** | ignore | [optional] | +|**triggerProtect** | **String** | threshold for algo order with \"priceProtect\" | [optional] | +|**maintMarginPercent** | **String** | ignore | [optional] | +|**requiredMarginPercent** | **String** | ignore | [optional] | +|**underlyingType** | **String** | Underlying asset type. | [optional] | +|**underlyingSubType** | **List<String>** | Underlying asset sub-type. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ExchangeInformationResponseSymbolsInnerFiltersInner.md b/clients/derivatives-trading-coin-futures/docs/ExchangeInformationResponseSymbolsInnerFiltersInner.md index 255492ae3..86bcb1ebc 100644 --- a/clients/derivatives-trading-coin-futures/docs/ExchangeInformationResponseSymbolsInnerFiltersInner.md +++ b/clients/derivatives-trading-coin-futures/docs/ExchangeInformationResponseSymbolsInnerFiltersInner.md @@ -7,17 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**filterType** | **String** | | [optional] | -|**maxPrice** | **String** | | [optional] | -|**minPrice** | **String** | | [optional] | -|**tickSize** | **String** | | [optional] | -|**maxQty** | **String** | | [optional] | -|**minQty** | **String** | | [optional] | -|**stepSize** | **String** | | [optional] | -|**limit** | **Long** | | [optional] | -|**multiplierUp** | **String** | | [optional] | -|**multiplierDown** | **String** | | [optional] | -|**multiplierDecimal** | **String** | | [optional] | +|**filterType** | **String** | Filter type. | [optional] | +|**maxPrice** | **String** | Maximum price. | [optional] | +|**minPrice** | **String** | Minimum price. | [optional] | +|**tickSize** | **String** | Tick size. | [optional] | +|**maxQty** | **String** | maximum quantity of base asset | [optional] | +|**minQty** | **String** | Minimum quantity. | [optional] | +|**stepSize** | **String** | Step size. | [optional] | +|**limit** | **Long** | Maximum allowed orders for this rule. | [optional] | +|**multiplierUp** | **String** | Upper multiplier bound. | [optional] | +|**multiplierDown** | **String** | Lower multiplier bound. | [optional] | +|**multiplierDecimal** | **String** | Multiplier decimal precision. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/FuturesAccountBalanceResponse.md b/clients/derivatives-trading-coin-futures/docs/FuturesAccountBalanceResponse.md index b94e892ca..61b2b7499 100644 --- a/clients/derivatives-trading-coin-futures/docs/FuturesAccountBalanceResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/FuturesAccountBalanceResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**status** | **Long** | | [optional] | -|**result** | [**List<FuturesAccountBalanceResponseResultInner>**](FuturesAccountBalanceResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountInformationResponseRateLimitsInner>**](AccountInformationResponseRateLimitsInner.md) | | [optional] | +|**id** | **String** | positionId | [optional] | +|**status** | **Long** | Enum:completed,processing | [optional] | +|**result** | [**List<FuturesAccountBalanceResponseResultInner>**](FuturesAccountBalanceResponseResultInner.md) | Indicates that combined is set to true. | [optional] | +|**rateLimits** | [**List<AccountInformationResponseRateLimitsInner>**](AccountInformationResponseRateLimitsInner.md) | Rate limit definitions. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/FuturesAccountBalanceResponseInner.md b/clients/derivatives-trading-coin-futures/docs/FuturesAccountBalanceResponseInner.md index 75d985dd2..bfe704f28 100644 --- a/clients/derivatives-trading-coin-futures/docs/FuturesAccountBalanceResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/FuturesAccountBalanceResponseInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**accountAlias** | **String** | | [optional] | -|**asset** | **String** | | [optional] | -|**balance** | **String** | | [optional] | -|**withdrawAvailable** | **String** | | [optional] | -|**crossWalletBalance** | **String** | | [optional] | -|**crossUnPnl** | **String** | | [optional] | -|**availableBalance** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**accountAlias** | **String** | unique account code | [optional] | +|**asset** | **String** | asset name | [optional] | +|**balance** | **String** | Account balance. | [optional] | +|**withdrawAvailable** | **String** | Available amount for withdrawal. | [optional] | +|**crossWalletBalance** | **String** | wallet balance for crossed margin | [optional] | +|**crossUnPnl** | **String** | total unrealized profit or loss of crossed positions | [optional] | +|**availableBalance** | **String** | available margin balance | [optional] | +|**updateTime** | **Long** | update time | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/FuturesAccountBalanceResponseResultInner.md b/clients/derivatives-trading-coin-futures/docs/FuturesAccountBalanceResponseResultInner.md index 65ae25975..2ba174a88 100644 --- a/clients/derivatives-trading-coin-futures/docs/FuturesAccountBalanceResponseResultInner.md +++ b/clients/derivatives-trading-coin-futures/docs/FuturesAccountBalanceResponseResultInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**accountAlias** | **String** | | [optional] | -|**asset** | **String** | | [optional] | -|**balance** | **String** | | [optional] | -|**withdrawAvailable** | **String** | | [optional] | -|**crossWalletBalance** | **String** | | [optional] | -|**crossUnPnl** | **String** | | [optional] | -|**availableBalance** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**accountAlias** | **String** | unique account code | [optional] | +|**asset** | **String** | asset name | [optional] | +|**balance** | **String** | Account balance. | [optional] | +|**withdrawAvailable** | **String** | Available amount for withdrawal. | [optional] | +|**crossWalletBalance** | **String** | wallet balance for crossed margin | [optional] | +|**crossUnPnl** | **String** | total unrealized profit or loss of crossed positions | [optional] | +|**availableBalance** | **String** | available margin balance | [optional] | +|**updateTime** | **Long** | update time | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/GetCurrentPositionModeResponse.md b/clients/derivatives-trading-coin-futures/docs/GetCurrentPositionModeResponse.md index 78962bfb0..7267b944a 100644 --- a/clients/derivatives-trading-coin-futures/docs/GetCurrentPositionModeResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/GetCurrentPositionModeResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**dualSidePosition** | **Boolean** | | [optional] | +|**dualSidePosition** | **Boolean** | Whether dual-side position mode is enabled. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/GetDownloadIdForFuturesOrderHistoryResponse.md b/clients/derivatives-trading-coin-futures/docs/GetDownloadIdForFuturesOrderHistoryResponse.md index b79ff8a17..44e0dbc6f 100644 --- a/clients/derivatives-trading-coin-futures/docs/GetDownloadIdForFuturesOrderHistoryResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/GetDownloadIdForFuturesOrderHistoryResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgCostTimestampOfLast30d** | **Long** | | [optional] | -|**downloadId** | **String** | | [optional] | +|**avgCostTimestampOfLast30d** | **Long** | Average time taken for data download in the past 30 days | [optional] | +|**downloadId** | **String** | Download task ID. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/GetDownloadIdForFuturesTradeHistoryResponse.md b/clients/derivatives-trading-coin-futures/docs/GetDownloadIdForFuturesTradeHistoryResponse.md index fe36e8228..fda1ec54b 100644 --- a/clients/derivatives-trading-coin-futures/docs/GetDownloadIdForFuturesTradeHistoryResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/GetDownloadIdForFuturesTradeHistoryResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgCostTimestampOfLast30d** | **Long** | | [optional] | -|**downloadId** | **String** | | [optional] | +|**avgCostTimestampOfLast30d** | **Long** | Average time taken for data download in the past 30 days | [optional] | +|**downloadId** | **String** | Download task ID. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/GetDownloadIdForFuturesTransactionHistoryResponse.md b/clients/derivatives-trading-coin-futures/docs/GetDownloadIdForFuturesTransactionHistoryResponse.md index 8b247a5e7..d31781290 100644 --- a/clients/derivatives-trading-coin-futures/docs/GetDownloadIdForFuturesTransactionHistoryResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/GetDownloadIdForFuturesTransactionHistoryResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgCostTimestampOfLast30d** | **Long** | | [optional] | -|**downloadId** | **String** | | [optional] | +|**avgCostTimestampOfLast30d** | **Long** | Average time taken for data download in the past 30 days | [optional] | +|**downloadId** | **String** | Download task ID. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/GetFundingRateHistoryOfPerpetualFuturesResponseInner.md b/clients/derivatives-trading-coin-futures/docs/GetFundingRateHistoryOfPerpetualFuturesResponseInner.md index 105ce64cb..ea1bf59f5 100644 --- a/clients/derivatives-trading-coin-futures/docs/GetFundingRateHistoryOfPerpetualFuturesResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/GetFundingRateHistoryOfPerpetualFuturesResponseInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**fundingTime** | **Long** | | [optional] | -|**fundingRate** | **String** | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**fundingTime** | **Long** | Funding time. | [optional] | +|**fundingRate** | **String** | Funding rate. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/GetFundingRateInfoResponseInner.md b/clients/derivatives-trading-coin-futures/docs/GetFundingRateInfoResponseInner.md index c35bc0545..81d57e5fd 100644 --- a/clients/derivatives-trading-coin-futures/docs/GetFundingRateInfoResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/GetFundingRateInfoResponseInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**adjustedFundingRateCap** | **String** | | [optional] | -|**adjustedFundingRateFloor** | **String** | | [optional] | -|**fundingIntervalHours** | **Long** | | [optional] | -|**disclaimer** | **Boolean** | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**adjustedFundingRateCap** | **String** | Adjusted funding rate cap. | [optional] | +|**adjustedFundingRateFloor** | **String** | Adjusted funding rate floor. | [optional] | +|**fundingIntervalHours** | **Long** | Funding interval in hours. | [optional] | +|**disclaimer** | **Boolean** | Disclaimer text. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/GetFuturesOrderHistoryDownloadLinkByIdResponse.md b/clients/derivatives-trading-coin-futures/docs/GetFuturesOrderHistoryDownloadLinkByIdResponse.md index 41d4b3d80..40fffd99b 100644 --- a/clients/derivatives-trading-coin-futures/docs/GetFuturesOrderHistoryDownloadLinkByIdResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/GetFuturesOrderHistoryDownloadLinkByIdResponse.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**downloadId** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**url** | **String** | | [optional] | -|**notified** | **Boolean** | | [optional] | -|**expirationTimestamp** | **Long** | | [optional] | -|**isExpired** | **String** | | [optional] | +|**downloadId** | **String** | Download task ID. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**url** | **String** | The link is mapped to download id | [optional] | +|**notified** | **Boolean** | ignore | [optional] | +|**expirationTimestamp** | **Long** | The link would expire after this timestamp | [optional] | +|**isExpired** | **String** | Whether the record is expired. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/GetFuturesTradeDownloadLinkByIdResponse.md b/clients/derivatives-trading-coin-futures/docs/GetFuturesTradeDownloadLinkByIdResponse.md index 519dd8a4e..78fafe74a 100644 --- a/clients/derivatives-trading-coin-futures/docs/GetFuturesTradeDownloadLinkByIdResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/GetFuturesTradeDownloadLinkByIdResponse.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**downloadId** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**url** | **String** | | [optional] | -|**notified** | **Boolean** | | [optional] | -|**expirationTimestamp** | **Long** | | [optional] | -|**isExpired** | **String** | | [optional] | +|**downloadId** | **String** | Download task ID. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**url** | **String** | The link is mapped to download id | [optional] | +|**notified** | **Boolean** | ignore | [optional] | +|**expirationTimestamp** | **Long** | The link would expire after this timestamp | [optional] | +|**isExpired** | **String** | Whether the record is expired. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/GetFuturesTransactionHistoryDownloadLinkByIdResponse.md b/clients/derivatives-trading-coin-futures/docs/GetFuturesTransactionHistoryDownloadLinkByIdResponse.md index 56a95eded..23cd37b68 100644 --- a/clients/derivatives-trading-coin-futures/docs/GetFuturesTransactionHistoryDownloadLinkByIdResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/GetFuturesTransactionHistoryDownloadLinkByIdResponse.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**downloadId** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**url** | **String** | | [optional] | -|**notified** | **Boolean** | | [optional] | -|**expirationTimestamp** | **Long** | | [optional] | -|**isExpired** | **String** | | [optional] | +|**downloadId** | **String** | Download task ID. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**url** | **String** | The link is mapped to download id | [optional] | +|**notified** | **Boolean** | ignore | [optional] | +|**expirationTimestamp** | **Long** | The link would expire after this timestamp | [optional] | +|**isExpired** | **String** | Whether the record is expired. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/GetIncomeHistoryResponseInner.md b/clients/derivatives-trading-coin-futures/docs/GetIncomeHistoryResponseInner.md index 1dac3715f..a1bfbd8bb 100644 --- a/clients/derivatives-trading-coin-futures/docs/GetIncomeHistoryResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/GetIncomeHistoryResponseInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**incomeType** | **String** | | [optional] | -|**income** | **String** | | [optional] | -|**asset** | **String** | | [optional] | -|**info** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**tranId** | **String** | | [optional] | -|**tradeId** | **String** | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**incomeType** | **String** | income type | [optional] | +|**income** | **String** | income amount | [optional] | +|**asset** | **String** | asset name | [optional] | +|**info** | **String** | extra information | [optional] | +|**time** | **Long** | Time | [optional] | +|**tranId** | **String** | transaction id | [optional] | +|**tradeId** | **String** | Trade ID. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/GetOrderModifyHistoryResponseInner.md b/clients/derivatives-trading-coin-futures/docs/GetOrderModifyHistoryResponseInner.md index 5f66a6f66..7100ce8d7 100644 --- a/clients/derivatives-trading-coin-futures/docs/GetOrderModifyHistoryResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/GetOrderModifyHistoryResponseInner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amendmentId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**time** | **Long** | | [optional] | +|**amendmentId** | **Long** | Order modification ID | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**pair** | **String** | Pair | [optional] | +|**orderId** | **Long** | Sub-order ID | [optional] | +|**clientOrderId** | **String** | Client order ID. | [optional] | +|**time** | **Long** | Time | [optional] | |**amendment** | [**GetOrderModifyHistoryResponseInnerAmendment**](GetOrderModifyHistoryResponseInnerAmendment.md) | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/GetOrderModifyHistoryResponseInnerAmendment.md b/clients/derivatives-trading-coin-futures/docs/GetOrderModifyHistoryResponseInnerAmendment.md index 93e358b46..9248d67e6 100644 --- a/clients/derivatives-trading-coin-futures/docs/GetOrderModifyHistoryResponseInnerAmendment.md +++ b/clients/derivatives-trading-coin-futures/docs/GetOrderModifyHistoryResponseInnerAmendment.md @@ -2,6 +2,7 @@ # GetOrderModifyHistoryResponseInnerAmendment +Order amendment details. ## Properties @@ -9,7 +10,8 @@ |------------ | ------------- | ------------- | -------------| |**price** | [**GetOrderModifyHistoryResponseInnerAmendmentPrice**](GetOrderModifyHistoryResponseInnerAmendmentPrice.md) | | [optional] | |**origQty** | [**GetOrderModifyHistoryResponseInnerAmendmentOrigQty**](GetOrderModifyHistoryResponseInnerAmendmentOrigQty.md) | | [optional] | -|**count** | **Long** | | [optional] | +|**count** | **Long** | Total number of trades in the 24h window. | [optional] | +|**modifyId** | **Long** | user-defined modification identifier, only returned if provided in the request | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/GetOrderModifyHistoryResponseInnerAmendmentOrigQty.md b/clients/derivatives-trading-coin-futures/docs/GetOrderModifyHistoryResponseInnerAmendmentOrigQty.md index f4878dc97..b833296e4 100644 --- a/clients/derivatives-trading-coin-futures/docs/GetOrderModifyHistoryResponseInnerAmendmentOrigQty.md +++ b/clients/derivatives-trading-coin-futures/docs/GetOrderModifyHistoryResponseInnerAmendmentOrigQty.md @@ -2,13 +2,14 @@ # GetOrderModifyHistoryResponseInnerAmendmentOrigQty +Original order quantity ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**before** | **String** | | [optional] | -|**after** | **String** | | [optional] | +|**before** | **String** | Before value. | [optional] | +|**after** | **String** | After value. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/GetOrderModifyHistoryResponseInnerAmendmentPrice.md b/clients/derivatives-trading-coin-futures/docs/GetOrderModifyHistoryResponseInnerAmendmentPrice.md index 458419a8a..7d10e4220 100644 --- a/clients/derivatives-trading-coin-futures/docs/GetOrderModifyHistoryResponseInnerAmendmentPrice.md +++ b/clients/derivatives-trading-coin-futures/docs/GetOrderModifyHistoryResponseInnerAmendmentPrice.md @@ -2,13 +2,14 @@ # GetOrderModifyHistoryResponseInnerAmendmentPrice +Latest token price. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**before** | **String** | | [optional] | -|**after** | **String** | | [optional] | +|**before** | **String** | Before value. | [optional] | +|**after** | **String** | After value. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/GetPositionMarginChangeHistoryResponseInner.md b/clients/derivatives-trading-coin-futures/docs/GetPositionMarginChangeHistoryResponseInner.md index b4fa4e7a0..162b9e33d 100644 --- a/clients/derivatives-trading-coin-futures/docs/GetPositionMarginChangeHistoryResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/GetPositionMarginChangeHistoryResponseInner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amount** | **String** | | [optional] | -|**asset** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**type** | **Long** | | [optional] | -|**positionSide** | **String** | | [optional] | +|**amount** | **String** | Amount. | [optional] | +|**asset** | **String** | asset name | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**time** | **Long** | Time | [optional] | +|**type** | **Long** | Order type. | [optional] | +|**positionSide** | **String** | Position side | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/GridUpdate.md b/clients/derivatives-trading-coin-futures/docs/GridUpdate.md index 6ef473aed..df04862f5 100644 --- a/clients/derivatives-trading-coin-futures/docs/GridUpdate.md +++ b/clients/derivatives-trading-coin-futures/docs/GridUpdate.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**T** | **Long** | | [optional] | -|**E** | **Long** | | [optional] | +|**T** | **Long** | Transaction Time | [optional] | +|**E** | **Long** | Event Time | [optional] | |**gu** | [**GridUpdateGu**](GridUpdateGu.md) | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/GridUpdateGu.md b/clients/derivatives-trading-coin-futures/docs/GridUpdateGu.md index 350ff7bbd..d1fd4a725 100644 --- a/clients/derivatives-trading-coin-futures/docs/GridUpdateGu.md +++ b/clients/derivatives-trading-coin-futures/docs/GridUpdateGu.md @@ -7,16 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**si** | **Long** | | [optional] | -|**st** | **String** | | [optional] | -|**ss** | **String** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**rLowerCase** | **String** | | [optional] | -|**up** | **String** | | [optional] | -|**uq** | **String** | | [optional] | -|**uf** | **String** | | [optional] | -|**mp** | **String** | | [optional] | -|**ut** | **Long** | | [optional] | +|**si** | **Long** | Strategy ID | [optional] | +|**st** | **String** | Strategy Type | [optional] | +|**ss** | **String** | Strategy Status | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**rLowerCase** | **String** | Realized PNL | [optional] | +|**up** | **String** | Unmatched Average Price | [optional] | +|**uq** | **String** | Unmatched Qty | [optional] | +|**uf** | **String** | Unmatched Fee | [optional] | +|**mp** | **String** | Matched PNL | [optional] | +|**ut** | **Long** | Update Time | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/IncomeType.md b/clients/derivatives-trading-coin-futures/docs/IncomeType.md new file mode 100644 index 000000000..a928c3096 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/IncomeType.md @@ -0,0 +1,23 @@ + + +# IncomeType + +## Enum + + +* `TRANSFER` (value: `"TRANSFER"`) + +* `WELCOME_BONUS` (value: `"WELCOME_BONUS"`) + +* `FUNDING_FEE` (value: `"FUNDING_FEE"`) + +* `REALIZED_PNL` (value: `"REALIZED_PNL"`) + +* `COMMISSION` (value: `"COMMISSION"`) + +* `INSURANCE_CLEAR` (value: `"INSURANCE_CLEAR"`) + +* `DELIVERED_SETTELMENT` (value: `"DELIVERED_SETTELMENT"`) + + + diff --git a/clients/derivatives-trading-coin-futures/docs/IndexKlineCandlestickStreamsRequest.md b/clients/derivatives-trading-coin-futures/docs/IndexKlineCandlestickStreamsRequest.md index cd7ab3a74..ad0c39c3e 100644 --- a/clients/derivatives-trading-coin-futures/docs/IndexKlineCandlestickStreamsRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/IndexKlineCandlestickStreamsRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**pair** | **String** | | | -|**interval** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**pair** | **String** | The pair parameter | [optional] | +|**interval** | **Interval** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/IndexKlineCandlestickStreamsResponse.md b/clients/derivatives-trading-coin-futures/docs/IndexKlineCandlestickStreamsResponse.md index 9de3201df..e9afee037 100644 --- a/clients/derivatives-trading-coin-futures/docs/IndexKlineCandlestickStreamsResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/IndexKlineCandlestickStreamsResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**ps** | **String** | | [optional] | +|**eLowerCase** | **String** | eventType | [optional] | +|**E** | **Long** | eventTime | [optional] | +|**ps** | **String** | Pair | [optional] | |**kLowerCase** | [**IndexKlineCandlestickStreamsResponseK**](IndexKlineCandlestickStreamsResponseK.md) | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/IndexKlineCandlestickStreamsResponseK.md b/clients/derivatives-trading-coin-futures/docs/IndexKlineCandlestickStreamsResponseK.md index 9fe7889d3..bb7d654c5 100644 --- a/clients/derivatives-trading-coin-futures/docs/IndexKlineCandlestickStreamsResponseK.md +++ b/clients/derivatives-trading-coin-futures/docs/IndexKlineCandlestickStreamsResponseK.md @@ -2,28 +2,29 @@ # IndexKlineCandlestickStreamsResponseK +Kline payload ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tLowerCase** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**fLowerCase** | **Long** | | [optional] | -|**L** | **Long** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**nLowerCase** | **Long** | | [optional] | -|**xLowerCase** | **Boolean** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**V** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**B** | **String** | | [optional] | +|**tLowerCase** | **Long** | Kline start time | [optional] | +|**T** | **Long** | transactionTime | [optional] | +|**sLowerCase** | **String** | symbol | [optional] | +|**iLowerCase** | **String** | interval | [optional] | +|**fLowerCase** | **Long** | Ignore | [optional] | +|**L** | **Long** | Ignore | [optional] | +|**oLowerCase** | **String** | openPrice | [optional] | +|**cLowerCase** | **String** | closePrice | [optional] | +|**hLowerCase** | **String** | highPrice | [optional] | +|**lLowerCase** | **String** | lowPrice | [optional] | +|**vLowerCase** | **String** | volume | [optional] | +|**nLowerCase** | **Long** | tradeNum | [optional] | +|**xLowerCase** | **Boolean** | Is this kline closed? | [optional] | +|**qLowerCase** | **String** | quoteVolume | [optional] | +|**V** | **String** | Taker buy volume | [optional] | +|**Q** | **String** | lastTradeVolume | [optional] | +|**B** | **String** | Best bid qty | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/IndexPriceAndMarkPriceResponseInner.md b/clients/derivatives-trading-coin-futures/docs/IndexPriceAndMarkPriceResponseInner.md index deba3f403..ec5c782b2 100644 --- a/clients/derivatives-trading-coin-futures/docs/IndexPriceAndMarkPriceResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/IndexPriceAndMarkPriceResponseInner.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**markPrice** | **String** | | [optional] | -|**indexPrice** | **String** | | [optional] | -|**estimatedSettlePrice** | **String** | | [optional] | -|**lastFundingRate** | **String** | | [optional] | -|**interestRate** | **String** | | [optional] | -|**nextFundingTime** | **Long** | | [optional] | -|**time** | **Long** | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**pair** | **String** | Pair | [optional] | +|**markPrice** | **String** | mark price | [optional] | +|**indexPrice** | **String** | index price | [optional] | +|**estimatedSettlePrice** | **String** | Estimated Settle Price, only useful in the last hour before the settlement starts. | [optional] | +|**lastFundingRate** | **String** | the lasted funding rate, for perpetual contract symbols only. For delivery symbols, \"\" will be shown. | [optional] | +|**interestRate** | **String** | the base asset interest rate, for perpetual contract symbols only. For delivery symbols, \"\" will be shown. | [optional] | +|**nextFundingTime** | **Long** | For perpetual contract symbols only. For delivery symbols, 0 will be shown | [optional] | +|**time** | **Long** | Time | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/IndexPriceKlineCandlestickDataItem.md b/clients/derivatives-trading-coin-futures/docs/IndexPriceKlineCandlestickDataItem.md new file mode 100644 index 000000000..99aaf6cf4 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/IndexPriceKlineCandlestickDataItem.md @@ -0,0 +1,12 @@ + + +# IndexPriceKlineCandlestickDataItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-coin-futures/docs/IndexPriceKlineCandlestickDataItemInner.md b/clients/derivatives-trading-coin-futures/docs/IndexPriceKlineCandlestickDataItemInner.md new file mode 100644 index 000000000..8b4e9e127 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/IndexPriceKlineCandlestickDataItemInner.md @@ -0,0 +1,12 @@ + + +# IndexPriceKlineCandlestickDataItemInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-coin-futures/docs/IndexPriceKlineCandlestickDataResponseItem.md b/clients/derivatives-trading-coin-futures/docs/IndexPriceKlineCandlestickDataResponseItem.md deleted file mode 100644 index e9be08351..000000000 --- a/clients/derivatives-trading-coin-futures/docs/IndexPriceKlineCandlestickDataResponseItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# IndexPriceKlineCandlestickDataResponseItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-coin-futures/docs/IndexPriceKlineCandlestickDataResponseItemInner.md b/clients/derivatives-trading-coin-futures/docs/IndexPriceKlineCandlestickDataResponseItemInner.md deleted file mode 100644 index b8b5f7f02..000000000 --- a/clients/derivatives-trading-coin-futures/docs/IndexPriceKlineCandlestickDataResponseItemInner.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# IndexPriceKlineCandlestickDataResponseItemInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-coin-futures/docs/IndexPriceStreamRequest.md b/clients/derivatives-trading-coin-futures/docs/IndexPriceStreamRequest.md index 8edf487cb..6681473d4 100644 --- a/clients/derivatives-trading-coin-futures/docs/IndexPriceStreamRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/IndexPriceStreamRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**pair** | **String** | | | -|**updateSpeed** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**pair** | **String** | The pair parameter | [optional] | +|**updateSpeed** | **UpdateSpeed** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/IndexPriceStreamResponse.md b/clients/derivatives-trading-coin-futures/docs/IndexPriceStreamResponse.md index 99f46d3c1..426f2e15e 100644 --- a/clients/derivatives-trading-coin-futures/docs/IndexPriceStreamResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/IndexPriceStreamResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**iLowerCase** | **String** | Pair | [optional] | +|**pLowerCase** | **String** | Index Price | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/IndividualSymbolBookTickerStreamsRequest.md b/clients/derivatives-trading-coin-futures/docs/IndividualSymbolBookTickerStreamsRequest.md index f63eeed12..303bb8024 100644 --- a/clients/derivatives-trading-coin-futures/docs/IndividualSymbolBookTickerStreamsRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/IndividualSymbolBookTickerStreamsRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/IndividualSymbolBookTickerStreamsResponse.md b/clients/derivatives-trading-coin-futures/docs/IndividualSymbolBookTickerStreamsResponse.md index d9e28b6e1..ca1c447a9 100644 --- a/clients/derivatives-trading-coin-futures/docs/IndividualSymbolBookTickerStreamsResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/IndividualSymbolBookTickerStreamsResponse.md @@ -7,16 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**B** | **String** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**A** | **String** | | [optional] | -|**T** | **Long** | | [optional] | -|**E** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**uLowerCase** | **Long** | Order book update Id | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**bLowerCase** | **String** | Best bid price | [optional] | +|**B** | **String** | Best bid qty | [optional] | +|**aLowerCase** | **String** | Best ask price | [optional] | +|**A** | **String** | Best ask qty | [optional] | +|**T** | **Long** | Transaction time | [optional] | +|**E** | **Long** | Event time | [optional] | +|**ps** | **String** | Pair | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/IndividualSymbolMiniTickerStreamRequest.md b/clients/derivatives-trading-coin-futures/docs/IndividualSymbolMiniTickerStreamRequest.md index 454a94e71..52cca8ef8 100644 --- a/clients/derivatives-trading-coin-futures/docs/IndividualSymbolMiniTickerStreamRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/IndividualSymbolMiniTickerStreamRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/IndividualSymbolMiniTickerStreamResponse.md b/clients/derivatives-trading-coin-futures/docs/IndividualSymbolMiniTickerStreamResponse.md index 71165af24..9bdecd672 100644 --- a/clients/derivatives-trading-coin-futures/docs/IndividualSymbolMiniTickerStreamResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/IndividualSymbolMiniTickerStreamResponse.md @@ -7,16 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**ps** | **String** | Pair | [optional] | +|**cLowerCase** | **String** | Close price | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | Total traded volume | [optional] | +|**qLowerCase** | **String** | Total traded base asset volume | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/IndividualSymbolTickerStreamsRequest.md b/clients/derivatives-trading-coin-futures/docs/IndividualSymbolTickerStreamsRequest.md index 031c3dc4d..b249def8d 100644 --- a/clients/derivatives-trading-coin-futures/docs/IndividualSymbolTickerStreamsRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/IndividualSymbolTickerStreamsRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/IndividualSymbolTickerStreamsResponse.md b/clients/derivatives-trading-coin-futures/docs/IndividualSymbolTickerStreamsResponse.md index bccf93ece..672c8235f 100644 --- a/clients/derivatives-trading-coin-futures/docs/IndividualSymbolTickerStreamsResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/IndividualSymbolTickerStreamsResponse.md @@ -7,25 +7,26 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**wLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**O** | **Long** | | [optional] | -|**C** | **Long** | | [optional] | -|**F** | **Long** | | [optional] | -|**L** | **Long** | | [optional] | -|**nLowerCase** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**pLowerCase** | **String** | Price change | [optional] | +|**P** | **String** | Price change percent | [optional] | +|**wLowerCase** | **String** | Weighted average price | [optional] | +|**cLowerCase** | **String** | Last price | [optional] | +|**Q** | **String** | Last quantity | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | Total traded volume | [optional] | +|**qLowerCase** | **String** | Total traded base asset volume | [optional] | +|**O** | **Long** | Statistics open time | [optional] | +|**C** | **Long** | Statistics close time | [optional] | +|**F** | **Long** | First trade ID | [optional] | +|**L** | **Long** | Last trade Id | [optional] | +|**nLowerCase** | **Long** | Total number of trades | [optional] | +|**ps** | **String** | Pair | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/KeepaliveUserDataStreamResponse.md b/clients/derivatives-trading-coin-futures/docs/KeepaliveUserDataStreamResponse.md index 64e8d4723..6d2d31292 100644 --- a/clients/derivatives-trading-coin-futures/docs/KeepaliveUserDataStreamResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/KeepaliveUserDataStreamResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**status** | **Long** | | [optional] | +|**id** | **String** | positionId | [optional] | +|**status** | **Long** | Enum:completed,processing | [optional] | |**result** | [**KeepaliveUserDataStreamResponseResult**](KeepaliveUserDataStreamResponseResult.md) | | [optional] | -|**rateLimits** | [**List<CloseUserDataStreamResponseRateLimitsInner>**](CloseUserDataStreamResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<CloseUserDataStreamResponseRateLimitsInner>**](CloseUserDataStreamResponseRateLimitsInner.md) | Rate limit definitions. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/KeepaliveUserDataStreamResponseResult.md b/clients/derivatives-trading-coin-futures/docs/KeepaliveUserDataStreamResponseResult.md index aff4087cd..139836514 100644 --- a/clients/derivatives-trading-coin-futures/docs/KeepaliveUserDataStreamResponseResult.md +++ b/clients/derivatives-trading-coin-futures/docs/KeepaliveUserDataStreamResponseResult.md @@ -2,12 +2,13 @@ # KeepaliveUserDataStreamResponseResult +Indicates that combined is set to true. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**listenKey** | **String** | | [optional] | +|**listenKey** | **String** | Listen key. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/KlineCandlestickDataItem.md b/clients/derivatives-trading-coin-futures/docs/KlineCandlestickDataItem.md new file mode 100644 index 000000000..70a2b6dc0 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/KlineCandlestickDataItem.md @@ -0,0 +1,12 @@ + + +# KlineCandlestickDataItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-coin-futures/docs/KlineCandlestickDataResponseItem.md b/clients/derivatives-trading-coin-futures/docs/KlineCandlestickDataResponseItem.md deleted file mode 100644 index 77012692f..000000000 --- a/clients/derivatives-trading-coin-futures/docs/KlineCandlestickDataResponseItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# KlineCandlestickDataResponseItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-coin-futures/docs/KlineCandlestickStreamsRequest.md b/clients/derivatives-trading-coin-futures/docs/KlineCandlestickStreamsRequest.md index b33491322..7371ed58a 100644 --- a/clients/derivatives-trading-coin-futures/docs/KlineCandlestickStreamsRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/KlineCandlestickStreamsRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | -|**interval** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | +|**interval** | **Interval** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/KlineCandlestickStreamsResponse.md b/clients/derivatives-trading-coin-futures/docs/KlineCandlestickStreamsResponse.md index 8f66d35fe..d9e18771b 100644 --- a/clients/derivatives-trading-coin-futures/docs/KlineCandlestickStreamsResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/KlineCandlestickStreamsResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | |**kLowerCase** | [**KlineCandlestickStreamsResponseK**](KlineCandlestickStreamsResponseK.md) | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/KlineCandlestickStreamsResponseK.md b/clients/derivatives-trading-coin-futures/docs/KlineCandlestickStreamsResponseK.md index 7cc125bf3..1981a1344 100644 --- a/clients/derivatives-trading-coin-futures/docs/KlineCandlestickStreamsResponseK.md +++ b/clients/derivatives-trading-coin-futures/docs/KlineCandlestickStreamsResponseK.md @@ -2,28 +2,29 @@ # KlineCandlestickStreamsResponseK +Kline payload ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tLowerCase** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**fLowerCase** | **Long** | | [optional] | -|**L** | **Long** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**nLowerCase** | **Long** | | [optional] | -|**xLowerCase** | **Boolean** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**V** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**B** | **String** | | [optional] | +|**tLowerCase** | **Long** | Kline start time | [optional] | +|**T** | **Long** | Kline close time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**iLowerCase** | **String** | Interval | [optional] | +|**fLowerCase** | **Long** | First trade ID | [optional] | +|**L** | **Long** | Last trade ID | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**cLowerCase** | **String** | Close price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | volume | [optional] | +|**nLowerCase** | **Long** | Number of trades | [optional] | +|**xLowerCase** | **Boolean** | Is this kline closed? | [optional] | +|**qLowerCase** | **String** | Base asset volume | [optional] | +|**V** | **String** | Taker buy volume | [optional] | +|**Q** | **String** | Taker buy base asset volume | [optional] | +|**B** | **String** | Ignore | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/Levels.md b/clients/derivatives-trading-coin-futures/docs/Levels.md new file mode 100644 index 000000000..cf3348fbc --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/Levels.md @@ -0,0 +1,15 @@ + + +# Levels + +## Enum + + +* `LEVELS_5` (value: `"5"`) + +* `LEVELS_10` (value: `"10"`) + +* `LEVELS_20` (value: `"20"`) + + + diff --git a/clients/derivatives-trading-coin-futures/docs/LiquidationOrderStreamsRequest.md b/clients/derivatives-trading-coin-futures/docs/LiquidationOrderStreamsRequest.md deleted file mode 100644 index 93d8692fe..000000000 --- a/clients/derivatives-trading-coin-futures/docs/LiquidationOrderStreamsRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# LiquidationOrderStreamsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | - - - diff --git a/clients/derivatives-trading-coin-futures/docs/LiquidationOrderStreamsResponse.md b/clients/derivatives-trading-coin-futures/docs/LiquidationOrderStreamsResponse.md deleted file mode 100644 index 51a0fff33..000000000 --- a/clients/derivatives-trading-coin-futures/docs/LiquidationOrderStreamsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# LiquidationOrderStreamsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**oLowerCase** | [**AllMarketLiquidationOrderStreamsResponseO**](AllMarketLiquidationOrderStreamsResponseO.md) | | [optional] | - - - diff --git a/clients/derivatives-trading-coin-futures/docs/Listenkeyexpired.md b/clients/derivatives-trading-coin-futures/docs/Listenkeyexpired.md index 26089b05e..38ea4af81 100644 --- a/clients/derivatives-trading-coin-futures/docs/Listenkeyexpired.md +++ b/clients/derivatives-trading-coin-futures/docs/Listenkeyexpired.md @@ -1,13 +1,13 @@ -# Listenkeyexpired +# ListenKeyExpired ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | |**listenKey** | **String** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/LongShortRatioResponseInner.md b/clients/derivatives-trading-coin-futures/docs/LongShortRatioResponseInner.md index 290beeb6e..1a95b9e69 100644 --- a/clients/derivatives-trading-coin-futures/docs/LongShortRatioResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/LongShortRatioResponseInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**pair** | **String** | | [optional] | -|**longShortRatio** | **String** | | [optional] | -|**longAccount** | **String** | | [optional] | -|**shortAccount** | **String** | | [optional] | -|**timestamp** | **Long** | | [optional] | +|**pair** | **String** | Pair | [optional] | +|**longShortRatio** | **String** | Long/short ratio. | [optional] | +|**longAccount** | **String** | 64.42% | [optional] | +|**shortAccount** | **String** | 35.58% | [optional] | +|**timestamp** | **Long** | Timestamp in milliseconds. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/MarginCall.md b/clients/derivatives-trading-coin-futures/docs/MarginCall.md index 3028d1cd2..495aa67ee 100644 --- a/clients/derivatives-trading-coin-futures/docs/MarginCall.md +++ b/clients/derivatives-trading-coin-futures/docs/MarginCall.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**cw** | **String** | | [optional] | -|**pLowerCase** | [**List<MarginCallPInner>**](MarginCallPInner.md) | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**iLowerCase** | **String** | Account Alias | [optional] | +|**cw** | **String** | Cross Wallet Balance. Only pushed with crossed position margin call | [optional] | +|**pLowerCase** | [**List<MarginCallPInner>**](MarginCallPInner.md) | Position(s) of Margin Call | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/MarginCallPInner.md b/clients/derivatives-trading-coin-futures/docs/MarginCallPInner.md index 0cdf73fb5..2c0aebaf0 100644 --- a/clients/derivatives-trading-coin-futures/docs/MarginCallPInner.md +++ b/clients/derivatives-trading-coin-futures/docs/MarginCallPInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**pa** | **String** | | [optional] | -|**mt** | **String** | | [optional] | -|**iw** | **String** | | [optional] | -|**mp** | **String** | | [optional] | -|**up** | **String** | | [optional] | -|**mm** | **String** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**ps** | **String** | Position Side | [optional] | +|**pa** | **String** | Position Amount | [optional] | +|**mt** | **String** | Margin Type | [optional] | +|**iw** | **String** | Isolated Wallet (if isolated position) | [optional] | +|**mp** | **String** | Mark Price | [optional] | +|**up** | **String** | Unrealized PnL | [optional] | +|**mm** | **String** | Maintenance Margin Required | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickDataItem.md b/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickDataItem.md new file mode 100644 index 000000000..83d32d591 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickDataItem.md @@ -0,0 +1,12 @@ + + +# MarkPriceKlineCandlestickDataItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickDataResponseItem.md b/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickDataResponseItem.md deleted file mode 100644 index 0b3da4bea..000000000 --- a/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickDataResponseItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# MarkPriceKlineCandlestickDataResponseItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickDataResponseItemInner.md b/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickDataResponseItemInner.md deleted file mode 100644 index c2586aaa7..000000000 --- a/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickDataResponseItemInner.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# MarkPriceKlineCandlestickDataResponseItemInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickStreamsRequest.md b/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickStreamsRequest.md index f32327b10..cfa2478d4 100644 --- a/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickStreamsRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickStreamsRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | -|**interval** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | +|**interval** | **Interval** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickStreamsResponse.md b/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickStreamsResponse.md index 93b141493..f36843e49 100644 --- a/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickStreamsResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickStreamsResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**ps** | **String** | | [optional] | +|**eLowerCase** | **String** | Event Name | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**ps** | **String** | Pair | [optional] | |**kLowerCase** | [**MarkPriceKlineCandlestickStreamsResponseK**](MarkPriceKlineCandlestickStreamsResponseK.md) | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickStreamsResponseK.md b/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickStreamsResponseK.md index 1408a9aef..16a898134 100644 --- a/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickStreamsResponseK.md +++ b/clients/derivatives-trading-coin-futures/docs/MarkPriceKlineCandlestickStreamsResponseK.md @@ -2,28 +2,29 @@ # MarkPriceKlineCandlestickStreamsResponseK +Kline payload ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tLowerCase** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**fLowerCase** | **Long** | | [optional] | -|**L** | **Long** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**nLowerCase** | **Long** | | [optional] | -|**xLowerCase** | **Boolean** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**V** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**B** | **String** | | [optional] | +|**tLowerCase** | **Long** | Kline start time | [optional] | +|**T** | **Long** | Kline close time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**iLowerCase** | **String** | Interval | [optional] | +|**fLowerCase** | **Long** | ignore | [optional] | +|**L** | **Long** | ignore | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**cLowerCase** | **String** | Close price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | ignore | [optional] | +|**nLowerCase** | **Long** | Number of basic data | [optional] | +|**xLowerCase** | **Boolean** | Is this kline closed? | [optional] | +|**qLowerCase** | **String** | ignore | [optional] | +|**V** | **String** | ignore | [optional] | +|**Q** | **String** | ignore | [optional] | +|**B** | **String** | ignore | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/MarkPriceOfAllSymbolsOfAPairRequest.md b/clients/derivatives-trading-coin-futures/docs/MarkPriceOfAllSymbolsOfAPairRequest.md index d2f3efb4c..24d3cb354 100644 --- a/clients/derivatives-trading-coin-futures/docs/MarkPriceOfAllSymbolsOfAPairRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/MarkPriceOfAllSymbolsOfAPairRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**pair** | **String** | | | -|**updateSpeed** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**pair** | **String** | The pair parameter | [optional] | +|**updateSpeed** | **UpdateSpeed** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/MarkPriceOfAllSymbolsOfAPairResponseInner.md b/clients/derivatives-trading-coin-futures/docs/MarkPriceOfAllSymbolsOfAPairResponseInner.md index 7c9da27f0..476b5cdf2 100644 --- a/clients/derivatives-trading-coin-futures/docs/MarkPriceOfAllSymbolsOfAPairResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/MarkPriceOfAllSymbolsOfAPairResponseInner.md @@ -7,14 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**rLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**pLowerCase** | **String** | Mark Price | [optional] | +|**P** | **String** | Estimated Settle Price, only useful in the last hour before the settlement starts. | [optional] | +|**iLowerCase** | **String** | Index Price | [optional] | +|**rLowerCase** | **String** | funding rate for perpetual symbol, \"\" will be shown for delivery symbol | [optional] | +|**T** | **Long** | next funding time for perpetual symbol, 0 will be shown for delivery symbol | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/MarkPriceStreamRequest.md b/clients/derivatives-trading-coin-futures/docs/MarkPriceStreamRequest.md index 57128622e..ad321dc7c 100644 --- a/clients/derivatives-trading-coin-futures/docs/MarkPriceStreamRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/MarkPriceStreamRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | -|**updateSpeed** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | +|**updateSpeed** | **UpdateSpeed** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/MarkPriceStreamResponse.md b/clients/derivatives-trading-coin-futures/docs/MarkPriceStreamResponse.md index c4b62a4af..16b6f56b6 100644 --- a/clients/derivatives-trading-coin-futures/docs/MarkPriceStreamResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/MarkPriceStreamResponse.md @@ -7,14 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**rLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**pLowerCase** | **String** | Mark Price | [optional] | +|**P** | **String** | Estimated Settle Price, only useful in the last hour before the settlement starts. | [optional] | +|**iLowerCase** | **String** | Index Price | [optional] | +|**rLowerCase** | **String** | funding rate for perpetual symbol, \"\" will be shown for delivery symbol | [optional] | +|**T** | **Long** | next funding time for perpetual symbol, 0 will be shown for delivery symbol | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/MarketDataApi.md b/clients/derivatives-trading-coin-futures/docs/MarketDataApi.md index 147776d13..bc43fb026 100644 --- a/clients/derivatives-trading-coin-futures/docs/MarketDataApi.md +++ b/clients/derivatives-trading-coin-futures/docs/MarketDataApi.md @@ -16,7 +16,7 @@ All URIs are relative to *https://dapi.binance.com* | [**klineCandlestickData**](MarketDataApi.md#klineCandlestickData) | **GET** /dapi/v1/klines | Kline/Candlestick Data | | [**longShortRatio**](MarketDataApi.md#longShortRatio) | **GET** /futures/data/globalLongShortAccountRatio | Long/Short Ratio | | [**markPriceKlineCandlestickData**](MarketDataApi.md#markPriceKlineCandlestickData) | **GET** /dapi/v1/markPriceKlines | Mark Price Kline/Candlestick Data | -| [**oldTradesLookup**](MarketDataApi.md#oldTradesLookup) | **GET** /dapi/v1/historicalTrades | Old Trades Lookup(MARKET_DATA) | +| [**oldTradesLookup**](MarketDataApi.md#oldTradesLookup) | **GET** /dapi/v1/historicalTrades | Old Trades Lookup (MARKET_DATA) | | [**openInterest**](MarketDataApi.md#openInterest) | **GET** /dapi/v1/openInterest | Open Interest | | [**openInterestStatistics**](MarketDataApi.md#openInterestStatistics) | **GET** /futures/data/openInterestHist | Open Interest Statistics | | [**orderBook**](MarketDataApi.md#orderBook) | **GET** /dapi/v1/depth | Order Book | @@ -28,8 +28,8 @@ All URIs are relative to *https://dapi.binance.com* | [**takerBuySellVolume**](MarketDataApi.md#takerBuySellVolume) | **GET** /futures/data/takerBuySellVol | Taker Buy/Sell Volume | | [**testConnectivity**](MarketDataApi.md#testConnectivity) | **GET** /dapi/v1/ping | Test Connectivity | | [**ticker24hrPriceChangeStatistics**](MarketDataApi.md#ticker24hrPriceChangeStatistics) | **GET** /dapi/v1/ticker/24hr | 24hr Ticker Price Change Statistics | -| [**topTraderLongShortRatioAccounts**](MarketDataApi.md#topTraderLongShortRatioAccounts) | **GET** /futures/data/topLongShortAccountRatio | Top Trader Long/Short Ratio (Accounts) | -| [**topTraderLongShortRatioPositions**](MarketDataApi.md#topTraderLongShortRatioPositions) | **GET** /futures/data/topLongShortPositionRatio | Top Trader Long/Short Ratio (Positions) | +| [**topTraderLongShortRatioAccounts**](MarketDataApi.md#topTraderLongShortRatioAccounts) | **GET** /futures/data/topLongShortAccountRatio | Top Trader Long/Short Account Ratio | +| [**topTraderLongShortRatioPositions**](MarketDataApi.md#topTraderLongShortRatioPositions) | **GET** /futures/data/topLongShortPositionRatio | Top Trader Long/Short Position Ratio | @@ -38,7 +38,7 @@ All URIs are relative to *https://dapi.binance.com* Basis -Query basis * If startTime and endTime are not sent, the most recent data is returned. * Only the data of the latest 30 days is available. Weight: 1 +Query basis Weight(IP): 1 Notes: - If startTime and endTime are not sent, the most recent data is returned. - Only the data of the latest 30 days is available. ### Example ```java @@ -55,12 +55,12 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String pair = "pair_example"; // String | BTCUSD - ContractType contractType = ContractType.fromValue("PERPETUAL"); // ContractType | ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL - Period period = Period.fromValue("5m"); // Period | \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - Long limit = 56L; // Long | Default 100; max 1000 - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | + String pair = "pair_example"; // String | Pair. + ContractType contractType = ContractType.fromValue("ALL"); // ContractType | Contract type. + Period period = Period.fromValue("5m"); // Period | Period interval. + Long limit = 30L; // Long | Maximum number of records to return. + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | try { BasisResponse result = apiInstance.basis(pair, contractType, period, limit, startTime, endTime); System.out.println(result); @@ -79,10 +79,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **pair** | **String**| BTCUSD | | -| **contractType** | [**ContractType**](.md)| ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL | [enum: PERPETUAL, CURRENT_QUARTER, NEXT_QUARTER, CURRENT_QUARTER_DELIVERING, NEXT_QUARTER_DELIVERING, PERPETUAL_DELIVERING] | -| **period** | [**Period**](.md)| \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" | [enum: 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **pair** | **String**| Pair. | | +| **contractType** | [**ContractType**](.md)| Contract type. | [enum: ALL, PERPETUAL, CURRENT_QUARTER, NEXT_QUARTER] | +| **period** | [**Period**](.md)| Period interval. | [enum: 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d] | +| **limit** | **Long**| Maximum number of records to return. | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | @@ -110,7 +110,7 @@ No authorization required Check Server time -Test connectivity to the Rest API and get the current server time. Weight: 1 +Test connectivity to the Rest API and get the current server time. Weight(IP): 1 ### Example ```java @@ -168,7 +168,7 @@ No authorization required Compressed/Aggregate Trades List -Get compressed, aggregate trades. Market trades that fill in 100ms with the same price and the same taking side will have the quantity aggregated. * support querying futures trade histories that are not older than one year * If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 1 hour. * If `fromId`, `startTime`, and `endTime` are not sent, the most recent aggregate trades will be returned. * Only market trades will be aggregated and returned, which means the insurance fund trades and ADL trades won't be aggregated. * Sending both `startTime`/`endTime` and `fromId` might cause response timeout, please send either `fromId` or `startTime`/`endTime` Weight: 20 +Get compressed, aggregate trades. Market trades that fill in 100ms with the same price and the same taking side will have the quantity aggregated. Weight(IP): 20 Notes: - support querying futures trade histories that are not older than 24 hours - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 1 hour. - If `fromId`, `startTime`, and `endTime` are not sent, the most recent aggregate trades will be returned. - Only market trades will be aggregated and returned, which means the insurance fund trades and ADL trades won't be aggregated. - Sending both `startTime`/`endTime` and `fromId` might cause response timeout, please send either `fromId` or `startTime`/`endTime` ### Example ```java @@ -185,11 +185,11 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | - Long fromId = 56L; // Long | ID to get aggregate trades from INCLUSIVE. - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | Default 100; max 1000 + String symbol = "symbol_example"; // String | Symbol + Long fromId = 1L; // Long | ID to get aggregate trades from INCLUSIVE. + Long startTime = 1623319461670L; // Long | Timestamp in ms to get aggregate trades from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get aggregate trades until INCLUSIVE. + Long limit = 30L; // Long | Maximum number of records to return. try { CompressedAggregateTradesListResponse result = apiInstance.compressedAggregateTradesList(symbol, fromId, startTime, endTime, limit); System.out.println(result); @@ -208,11 +208,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **fromId** | **Long**| ID to get aggregate trades from INCLUSIVE. | [optional] | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **startTime** | **Long**| Timestamp in ms to get aggregate trades from INCLUSIVE. | [optional] | +| **endTime** | **Long**| Timestamp in ms to get aggregate trades until INCLUSIVE. | [optional] | +| **limit** | **Long**| Maximum number of records to return. | [optional] | ### Return type @@ -238,7 +238,7 @@ No authorization required Continuous Contract Kline/Candlestick Data -Kline/candlestick bars for a specific contract type. Klines are uniquely identified by their open time. * Contract type: * PERPETUAL * CURRENT_QUARTER * NEXT_QUARTER 1000 | 10 * The difference between `startTime` and `endTime` can only be up to 200 days * Between `startTime` and `endTime`, the most recent `limit` data from `endTime` will be returned: * If `startTime` and `endTime` are not sent, current timestamp will be set as `endTime`, and the most recent data will be returned. * If `startTime` is sent only, the timestamp of 200 days after `startTime` will be set as `endTime`(up to the current time) * If `endTime` is sent only, the timestamp of 200 days before `endTime` will be set as `startTime` Weight: based on parameter LIMIT LIMIT | weight ---|--- [1,100) | 1 [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 +Kline/candlestick bars for a specific contract type. Klines are uniquely identified by their open time. Weight: based on parameter `LIMIT` | LIMIT | weight | | --- | --- | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - The difference between `startTime` and `endTime` can only be up to 200 days - Between `startTime` and `endTime`, the most recent `limit` data from `endTime` will be returned: - If `startTime` and `endTime` are not sent, current timestamp will be set as `endTime`, and the most recent data will be returned. - If `startTime` is sent only, the timestamp of 200 days after `startTime` will be set as `endTime`(up to the current time) - If `endTime` is sent only, the timestamp of 200 days before `endTime` will be set as `startTime` ### Example ```java @@ -255,12 +255,12 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String pair = "pair_example"; // String | BTCUSD - ContractType contractType = ContractType.fromValue("PERPETUAL"); // ContractType | ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL - Interval interval = Interval.fromValue("1m"); // Interval | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | Default 100; max 1000 + String pair = "BTCUSD"; // String | After CM migration, accepts both CM and UM pair values. + ContractType contractType = ContractType.fromValue("ALL"); // ContractType | + Interval interval = Interval.fromValue("1m"); // Interval | Interval + Long startTime = 1623319461670L; // Long | Start time + Long endTime = 1641782889000L; // Long | End time + Long limit = 30L; // Long | Maximum number of records to return. try { ContinuousContractKlineCandlestickDataResponse result = apiInstance.continuousContractKlineCandlestickData(pair, contractType, interval, startTime, endTime, limit); System.out.println(result); @@ -279,12 +279,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **pair** | **String**| BTCUSD | | -| **contractType** | [**ContractType**](.md)| ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL | [enum: PERPETUAL, CURRENT_QUARTER, NEXT_QUARTER, CURRENT_QUARTER_DELIVERING, NEXT_QUARTER_DELIVERING, PERPETUAL_DELIVERING] | -| **interval** | [**Interval**](.md)| | [enum: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **pair** | **String**| After CM migration, accepts both CM and UM pair values. | | +| **contractType** | [**ContractType**](.md)| | [enum: ALL, PERPETUAL, CURRENT_QUARTER, NEXT_QUARTER] | +| **interval** | [**Interval**](.md)| Interval | [enum: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] | +| **startTime** | **Long**| Start time | [optional] | +| **endTime** | **Long**| End time | [optional] | +| **limit** | **Long**| Maximum number of records to return. | [optional] | ### Return type @@ -310,7 +310,7 @@ No authorization required Exchange Information -Current exchange trading rules and symbol information Weight: 1 +Current exchange trading rules and symbol information Weight(IP): 1 ### Example ```java @@ -368,7 +368,7 @@ No authorization required Get Funding Rate History of Perpetual Futures -Get Funding Rate History of Perpetual Futures * empty array will be returned for delivery symbols. Weight: 1 +Get Funding Rate History of Perpetual Futures Weight(IP): 1 Notes: - empty array will be returned for delivery symbols. ### Example ```java @@ -385,10 +385,10 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | Default 100; max 1000 + String symbol = "symbol_example"; // String | Symbol + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding rate from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding rate until INCLUSIVE. + Long limit = 30L; // Long | Maximum number of records to return. try { GetFundingRateHistoryOfPerpetualFuturesResponse result = apiInstance.getFundingRateHistoryOfPerpetualFutures(symbol, startTime, endTime, limit); System.out.println(result); @@ -407,10 +407,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **symbol** | **String**| Symbol | | +| **startTime** | **Long**| Timestamp in ms to get funding rate from INCLUSIVE. | [optional] | +| **endTime** | **Long**| Timestamp in ms to get funding rate until INCLUSIVE. | [optional] | +| **limit** | **Long**| Maximum number of records to return. | [optional] | ### Return type @@ -436,7 +436,7 @@ No authorization required Get Funding Rate Info -Query funding rate info for symbols that had FundingRateCap/ FundingRateFloor / fundingIntervalHours adjustment Weight: 0 +Query funding rate info for symbols that had FundingRateCap/FundingRateFloor/fundingIntervalHours adjustment ### Example ```java @@ -494,7 +494,7 @@ No authorization required Index Price and Mark Price -Query index price and mark price Weight: 10 +Query index price and mark price Weight(IP): 10 ### Example ```java @@ -511,8 +511,8 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | - String pair = "pair_example"; // String | + String symbol = "BTCUSD_PERP"; // String | + String pair = "BTCUSD"; // String | try { IndexPriceAndMarkPriceResponse result = apiInstance.indexPriceAndMarkPrice(symbol, pair); System.out.println(result); @@ -558,7 +558,7 @@ No authorization required Index Price Kline/Candlestick Data -Kline/candlestick bars for the index price of a pair. Klines are uniquely identified by their open time. 1000 | 10 * The difference between `startTime` and `endTime` can only be up to 200 days * Between `startTime` and `endTime`, the most recent `limit` data from `endTime` will be returned: * If `startTime` and `endTime` are not sent, current timestamp will be set as `endTime`, and the most recent data will be returned. * If `startTime` is sent only, the timestamp of 200 days after `startTime` will be set as `endTime`(up to the current time) * If `endTime` is sent only, the timestamp of 200 days before `endTime` will be set as `startTime` Weight: based on parameter LIMIT LIMIT | weight ---|--- [1,100) | 1 [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 +Kline/candlestick bars for the index price of a pair. Klines are uniquely identified by their open time. Weight: Based on parameter `LIMIT` | LIMIT | weight | | --- | --- | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - The difference between `startTime` and `endTime` can only be up to 200 days - Between `startTime` and `endTime`, the most recent `limit` data from `endTime` will be returned: - If `startTime` and `endTime` are not sent, current timestamp will be set as `endTime`, and the most recent data will be returned. - If `startTime` is sent only, the timestamp of 200 days after `startTime` will be set as `endTime`(up to the current time) - If `endTime` is sent only, the timestamp of 200 days before `endTime` will be set as `startTime` ### Example ```java @@ -575,11 +575,11 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String pair = "pair_example"; // String | BTCUSD - Interval interval = Interval.fromValue("1m"); // Interval | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | Default 100; max 1000 + String pair = "BTCUSD"; // String | After CM migration, accepts both CM and UM pair values. + Interval interval = Interval.fromValue("1m"); // Interval | Interval + Long startTime = 1623319461670L; // Long | Start time + Long endTime = 1641782889000L; // Long | End time + Long limit = 30L; // Long | Maximum number of records to return. try { IndexPriceKlineCandlestickDataResponse result = apiInstance.indexPriceKlineCandlestickData(pair, interval, startTime, endTime, limit); System.out.println(result); @@ -598,11 +598,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **pair** | **String**| BTCUSD | | -| **interval** | [**Interval**](.md)| | [enum: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **pair** | **String**| After CM migration, accepts both CM and UM pair values. | | +| **interval** | [**Interval**](.md)| Interval | [enum: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] | +| **startTime** | **Long**| Start time | [optional] | +| **endTime** | **Long**| End time | [optional] | +| **limit** | **Long**| Maximum number of records to return. | [optional] | ### Return type @@ -628,7 +628,7 @@ No authorization required Kline/Candlestick Data -Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. 1000 | 10 * The difference between `startTime` and `endTime` can only be up to 200 days * Between `startTime` and `endTime`, the most recent `limit` data from `endTime` will be returned: * If `startTime` and `endTime` are not sent, current timestamp will be set as `endTime`, and the most recent data will be returned. * If `startTime` is sent only, the timestamp of 200 days after `startTime` will be set as `endTime`(up to the current time) * If `endTime` is sent only, the timestamp of 200 days before `endTime` will be set as `startTime` Weight: based on parameter LIMIT LIMIT | weight ---|--- [1,100) | 1 [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 +Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. Weight: Based on parameter `LIMIT` | LIMIT | weight | | --- | --- | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - The difference between `startTime` and `endTime` can only be up to 200 days - Between `startTime` and `endTime`, the most recent `limit` data from `endTime` will be returned: - If `startTime` and `endTime` are not sent, current timestamp will be set as `endTime`, and the most recent data will be returned. - If `startTime` is sent only, the timestamp of 200 days after `startTime` will be set as `endTime`(up to the current time) - If `endTime` is sent only, the timestamp of 200 days before `endTime` will be set as `startTime` ### Example ```java @@ -645,11 +645,11 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | - Interval interval = Interval.fromValue("1m"); // Interval | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | Default 100; max 1000 + String symbol = "BTCUSD"; // String | After CM migration, accepts both CM and UM symbols. + Interval interval = Interval.fromValue("1m"); // Interval | Interval + Long startTime = 1623319461670L; // Long | Start time + Long endTime = 1641782889000L; // Long | End time + Long limit = 30L; // Long | Maximum number of records to return. try { KlineCandlestickDataResponse result = apiInstance.klineCandlestickData(symbol, interval, startTime, endTime, limit); System.out.println(result); @@ -668,11 +668,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | -| **interval** | [**Interval**](.md)| | [enum: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **symbol** | **String**| After CM migration, accepts both CM and UM symbols. | | +| **interval** | [**Interval**](.md)| Interval | [enum: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] | +| **startTime** | **Long**| Start time | [optional] | +| **endTime** | **Long**| End time | [optional] | +| **limit** | **Long**| Maximum number of records to return. | [optional] | ### Return type @@ -698,7 +698,7 @@ No authorization required Long/Short Ratio -Query symbol Long/Short Ratio * If startTime and endTime are not sent, the most recent data is returned. * Only the data of the latest 30 days is available. Weight: 1 +Query symbol Long/Short Ratio Weight(IP): 1 Notes: - If startTime and endTime are not sent, the most recent data is returned. - Only the data of the latest 30 days is available. ### Example ```java @@ -716,10 +716,10 @@ public class Example { MarketDataApi apiInstance = new MarketDataApi(defaultClient); String pair = "pair_example"; // String | BTCUSD - Period period = Period.fromValue("5m"); // Period | \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - Long limit = 56L; // Long | Default 100; max 1000 - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | + Period period = Period.fromValue("5m"); // Period | + Long limit = 30L; // Long | Maximum number of records to return. + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | try { LongShortRatioResponse result = apiInstance.longShortRatio(pair, period, limit, startTime, endTime); System.out.println(result); @@ -739,8 +739,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **pair** | **String**| BTCUSD | | -| **period** | [**Period**](.md)| \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" | [enum: 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **period** | [**Period**](.md)| | [enum: 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d] | +| **limit** | **Long**| Maximum number of records to return. | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | @@ -768,7 +768,7 @@ No authorization required Mark Price Kline/Candlestick Data -Kline/candlestick bars for the mark price of a symbol. Klines are uniquely identified by their open time. 1000 | 10 * The difference between `startTime` and `endTime` can only be up to 200 days * Between `startTime` and `endTime`, the most recent `limit` data from `endTime` will be returned: * If `startTime` and `endTime` are not sent, current timestamp will be set as `endTime`, and the most recent data will be returned. * If `startTime` is sent only, the timestamp of 200 days after `startTime` will be set as `endTime`(up to the current time) * If `endTime` is sent only, the timestamp of 200 days before `endTime` will be set as `startTime` Weight: based on parameter LIMIT LIMIT | weight ---|--- [1,100) | 1 [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 +Kline/candlestick bars for the mark price of a symbol. Klines are uniquely identified by their open time. Weight: Based on parameter `LIMIT` | LIMIT | weight | | --- | --- | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - The difference between `startTime` and `endTime` can only be up to 200 days - Between `startTime` and `endTime`, the most recent `limit` data from `endTime` will be returned: - If `startTime` and `endTime` are not sent, current timestamp will be set as `endTime`, and the most recent data will be returned. - If `startTime` is sent only, the timestamp of 200 days after `startTime` will be set as `endTime`(up to the current time) - If `endTime` is sent only, the timestamp of 200 days before `endTime` will be set as `startTime` ### Example ```java @@ -785,11 +785,11 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | - Interval interval = Interval.fromValue("1m"); // Interval | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | Default 100; max 1000 + String symbol = "BTCUSD"; // String | After CM migration, accepts both CM and UM symbols. + Interval interval = Interval.fromValue("1m"); // Interval | Interval + Long startTime = 1623319461670L; // Long | Start time + Long endTime = 1641782889000L; // Long | End time + Long limit = 30L; // Long | Maximum number of records to return. try { MarkPriceKlineCandlestickDataResponse result = apiInstance.markPriceKlineCandlestickData(symbol, interval, startTime, endTime, limit); System.out.println(result); @@ -808,11 +808,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | -| **interval** | [**Interval**](.md)| | [enum: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **symbol** | **String**| After CM migration, accepts both CM and UM symbols. | | +| **interval** | [**Interval**](.md)| Interval | [enum: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] | +| **startTime** | **Long**| Start time | [optional] | +| **endTime** | **Long**| End time | [optional] | +| **limit** | **Long**| Maximum number of records to return. | [optional] | ### Return type @@ -836,9 +836,9 @@ No authorization required # **oldTradesLookup** > OldTradesLookupResponse oldTradesLookup(symbol, limit, fromId) -Old Trades Lookup(MARKET_DATA) +Old Trades Lookup (MARKET_DATA) -Get older market historical trades. * Market trades means trades filled in the order book. Only market trades will be returned, which means the insurance fund trades and ADL trades won't be returned. Weight: 20 +Get older market historical trades. Weight(IP): 20 Security Type: MARKET_DATA Notes: - Market trades means trades filled in the order book. Only market trades will be returned, which means the insurance fund trades and ADL trades won't be returned. - Only supports data from within the last one month ### Example ```java @@ -855,9 +855,9 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | - Long limit = 56L; // Long | Default 100; max 1000 - Long fromId = 56L; // Long | ID to get aggregate trades from INCLUSIVE. + String symbol = "symbol_example"; // String | Symbol + Long limit = 30L; // Long | Maximum number of records to return. + Long fromId = 595103L; // Long | TradeId to fetch from. Default gets most recent trades. try { OldTradesLookupResponse result = apiInstance.oldTradesLookup(symbol, limit, fromId); System.out.println(result); @@ -876,9 +876,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | -| **limit** | **Long**| Default 100; max 1000 | [optional] | -| **fromId** | **Long**| ID to get aggregate trades from INCLUSIVE. | [optional] | +| **symbol** | **String**| Symbol | | +| **limit** | **Long**| Maximum number of records to return. | [optional] | +| **fromId** | **Long**| TradeId to fetch from. Default gets most recent trades. | [optional] | ### Return type @@ -904,7 +904,7 @@ No authorization required Open Interest -Get present open interest of a specific symbol. Weight: 1 +Get present open interest of a specific symbol. Weight(IP): 1 ### Example ```java @@ -921,7 +921,7 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | + String symbol = "BTCUSD_200626"; // String | Symbol try { OpenInterestResponse result = apiInstance.openInterest(symbol); System.out.println(result); @@ -940,7 +940,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | ### Return type @@ -966,7 +966,7 @@ No authorization required Open Interest Statistics -Query open interest stats * If startTime and endTime are not sent, the most recent data is returned. * Only the data of the latest 30 days is available. Weight: 1 +Query open interest stats Weight(IP): 1 Notes: - If startTime and endTime are not sent, the most recent data is returned. - Only the data of the latest 30 days is available. ### Example ```java @@ -983,12 +983,12 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String pair = "pair_example"; // String | BTCUSD - ContractType contractType = ContractType.fromValue("PERPETUAL"); // ContractType | ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL - Period period = Period.fromValue("5m"); // Period | \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - Long limit = 56L; // Long | Default 100; max 1000 - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | + String pair = "BTCUSD"; // String | + ContractType contractType = ContractType.fromValue("ALL"); // ContractType | + Period period = Period.fromValue("5m"); // Period | + Long limit = 30L; // Long | Maximum number of records to return. + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | try { OpenInterestStatisticsResponse result = apiInstance.openInterestStatistics(pair, contractType, period, limit, startTime, endTime); System.out.println(result); @@ -1007,10 +1007,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **pair** | **String**| BTCUSD | | -| **contractType** | [**ContractType**](.md)| ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL | [enum: PERPETUAL, CURRENT_QUARTER, NEXT_QUARTER, CURRENT_QUARTER_DELIVERING, NEXT_QUARTER_DELIVERING, PERPETUAL_DELIVERING] | -| **period** | [**Period**](.md)| \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" | [enum: 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **pair** | **String**| | | +| **contractType** | [**ContractType**](.md)| | [enum: ALL, PERPETUAL, CURRENT_QUARTER, NEXT_QUARTER] | +| **period** | [**Period**](.md)| | [enum: 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d] | +| **limit** | **Long**| Maximum number of records to return. | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | @@ -1038,7 +1038,7 @@ No authorization required Order Book -Query orderbook on specific symbol Weight: Adjusted based on the limit: Limit | Weight ------------ | ------------ 5, 10, 20, 50 | 2 100 | 5 500 | 10 1000 | 20 +Query orderbook on specific symbol Weight: Adjusted based on the limit: | Limit | Weight | | ------------ | ------------ | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | 20 | ### Example ```java @@ -1055,8 +1055,8 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | - Long limit = 56L; // Long | Default 100; max 1000 + String symbol = "BTCUSD_PERP"; // String | Symbol + Long limit = 500L; // Long | Valid limits:[5, 10, 20, 50, 100, 500, 1000]. try { OrderBookResponse result = apiInstance.orderBook(symbol, limit); System.out.println(result); @@ -1075,8 +1075,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **symbol** | **String**| Symbol | | +| **limit** | **Long**| Valid limits:[5, 10, 20, 50, 100, 500, 1000]. | [optional] | ### Return type @@ -1102,7 +1102,7 @@ No authorization required Premium index Kline Data -Premium index kline bars of a symbol. Klines are uniquely identified by their open time. * If startTime and endTime are not sent, the most recent klines are returned. Weight: based on parameter LIMIT | LIMIT | weight | | ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | +Premium index kline bars of a symbol. Klines are uniquely identified by their open time. Weight: Based on parameter `LIMIT` | LIMIT | weight | | ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - If startTime and endTime are not sent, the most recent klines are returned. ### Example ```java @@ -1119,11 +1119,11 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | - Interval interval = Interval.fromValue("1m"); // Interval | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | Default 100; max 1000 + String symbol = "BTCUSD"; // String | After CM migration, accepts both CM and UM symbols. + Interval interval = Interval.fromValue("1m"); // Interval | Interval + Long startTime = 1623319461670L; // Long | Start time + Long endTime = 1641782889000L; // Long | End time + Long limit = 30L; // Long | Maximum number of records to return. try { PremiumIndexKlineDataResponse result = apiInstance.premiumIndexKlineData(symbol, interval, startTime, endTime, limit); System.out.println(result); @@ -1142,11 +1142,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | -| **interval** | [**Interval**](.md)| | [enum: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **symbol** | **String**| After CM migration, accepts both CM and UM symbols. | | +| **interval** | [**Interval**](.md)| Interval | [enum: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] | +| **startTime** | **Long**| Start time | [optional] | +| **endTime** | **Long**| End time | [optional] | +| **limit** | **Long**| Maximum number of records to return. | [optional] | ### Return type @@ -1172,7 +1172,7 @@ No authorization required Query Index Price Constituents -Query index price constituents Weight: 1 +Query index price constituents Weight(IP): 1 ### Example ```java @@ -1189,7 +1189,7 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | + String symbol = "BTCUSD"; // String | Symbol try { QueryIndexPriceConstituentsResponse result = apiInstance.queryIndexPriceConstituents(symbol); System.out.println(result); @@ -1208,7 +1208,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | ### Return type @@ -1234,7 +1234,7 @@ No authorization required Recent Trades List -Get recent market trades * Market trades means trades filled in the order book. Only market trades will be returned, which means the insurance fund trades and ADL trades won't be returned. Weight: 5 +Get recent market trades Weight(IP): 5 Notes: - Market trades means trades filled in the order book. Only market trades will be returned, which means the insurance fund trades and ADL trades won't be returned. ### Example ```java @@ -1251,8 +1251,8 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | - Long limit = 56L; // Long | Default 100; max 1000 + String symbol = "BTCUSD"; // String | Symbol + Long limit = 30L; // Long | Maximum number of records to return. try { RecentTradesListResponse result = apiInstance.recentTradesList(symbol, limit); System.out.println(result); @@ -1271,8 +1271,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **symbol** | **String**| Symbol | | +| **limit** | **Long**| Maximum number of records to return. | [optional] | ### Return type @@ -1298,7 +1298,7 @@ No authorization required Symbol Order Book Ticker -Best price/qty on the order book for a symbol or symbols. * Symbol and pair cannot be sent together * If a pair is sent,tickers for all symbols of the pair will be returned * If either a pair or symbol is sent, tickers for all symbols of all pairs will be returned Weight: 2 for a single symbol, 5 when the symbol parameter is omitted +Best price/qty on the order book for a symbol or symbols. Weight: **2** for a single symbol, **5** when the symbol parameter is omitted Notes: - Symbol and pair cannot be sent together - If a pair is sent,tickers for all symbols of the pair will be returned - If either a pair or symbol is sent, tickers for all symbols of all pairs will be returned ### Example ```java @@ -1315,8 +1315,8 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | - String pair = "pair_example"; // String | + String symbol = "BTCUSD_200626"; // String | Symbol + String pair = "BTCUSD"; // String | Symbol try { SymbolOrderBookTickerResponse result = apiInstance.symbolOrderBookTicker(symbol, pair); System.out.println(result); @@ -1335,8 +1335,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | [optional] | -| **pair** | **String**| | [optional] | +| **symbol** | **String**| Symbol | [optional] | +| **pair** | **String**| Symbol | [optional] | ### Return type @@ -1362,7 +1362,7 @@ No authorization required Symbol Price Ticker -Latest price for a symbol or symbols. * Symbol and pair cannot be sent together * If a pair is sent,tickers for all symbols of the pair will be returned * If either a pair or symbol is sent, tickers for all symbols of all pairs will be returned Weight: 1 for a single symbol, 2 when the symbol parameter is omitted +Latest price for a symbol or symbols. Weight: **1** for a single symbol, **2** when the symbol parameter is omitted Notes: - Symbol and pair cannot be sent together - If a pair is sent,tickers for all symbols of the pair will be returned - If either a pair or symbol is sent, tickers for all symbols of all pairs will be returned ### Example ```java @@ -1379,8 +1379,8 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | - String pair = "pair_example"; // String | + String symbol = "BTCUSD_200626"; // String | Symbol + String pair = "BTCUSD"; // String | Pair try { SymbolPriceTickerResponse result = apiInstance.symbolPriceTicker(symbol, pair); System.out.println(result); @@ -1399,8 +1399,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | [optional] | -| **pair** | **String**| | [optional] | +| **symbol** | **String**| Symbol | [optional] | +| **pair** | **String**| Pair | [optional] | ### Return type @@ -1426,7 +1426,7 @@ No authorization required Taker Buy/Sell Volume -Taker Buy Volume: the total volume of buy orders filled by takers within the period. Taker Sell Volume: the total volume of sell orders filled by takers within the period. * If startTime and endTime are not sent, the most recent data is returned. * Only the data of the latest 30 days is available. Weight: 1 +Taker Buy Volume: the total volume of buy orders filled by takers within the period. Taker Sell Volume: the total volume of sell orders filled by takers within the period. Weight(IP): 1 Notes: - If startTime and endTime are not sent, the most recent data is returned. - Only the data of the latest 30 days is available. ### Example ```java @@ -1443,12 +1443,12 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String pair = "pair_example"; // String | BTCUSD - ContractType contractType = ContractType.fromValue("PERPETUAL"); // ContractType | ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL - Period period = Period.fromValue("5m"); // Period | \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - Long limit = 56L; // Long | Default 100; max 1000 - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | + String pair = "BTCUSD"; // String | + ContractType contractType = ContractType.fromValue("ALL"); // ContractType | + Period period = Period.fromValue("5m"); // Period | + Long limit = 30L; // Long | Maximum number of records to return. + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | try { TakerBuySellVolumeResponse result = apiInstance.takerBuySellVolume(pair, contractType, period, limit, startTime, endTime); System.out.println(result); @@ -1467,10 +1467,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **pair** | **String**| BTCUSD | | -| **contractType** | [**ContractType**](.md)| ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL | [enum: PERPETUAL, CURRENT_QUARTER, NEXT_QUARTER, CURRENT_QUARTER_DELIVERING, NEXT_QUARTER_DELIVERING, PERPETUAL_DELIVERING] | -| **period** | [**Period**](.md)| \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" | [enum: 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **pair** | **String**| | | +| **contractType** | [**ContractType**](.md)| | [enum: ALL, PERPETUAL, CURRENT_QUARTER, NEXT_QUARTER] | +| **period** | [**Period**](.md)| | [enum: 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d] | +| **limit** | **Long**| Maximum number of records to return. | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | @@ -1498,7 +1498,7 @@ No authorization required Test Connectivity -Test connectivity to the Rest API. Weight: 1 +Test connectivity to the Rest API. Weight(IP): 1 ### Example ```java @@ -1555,7 +1555,7 @@ No authorization required 24hr Ticker Price Change Statistics -24 hour rolling window price change statistics. * Symbol and pair cannot be sent together * If a pair is sent,tickers for all symbols of the pair will be returned * If either a pair or symbol is sent, tickers for all symbols of all pairs will be returned Weight: 1 for a single symbol, 40 when the symbol parameter is omitted Careful when accessing this with no symbol. +24 hour rolling window price change statistics. Weight: **1** for a single symbol, **40** when the symbol parameter is omitted **Careful** when accessing this with no symbol. Notes: - Symbol and pair cannot be sent together - If a pair is sent,tickers for all symbols of the pair will be returned - If either a pair or symbol is sent, tickers for all symbols of all pairs will be returned ### Example ```java @@ -1572,8 +1572,8 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | - String pair = "pair_example"; // String | + String symbol = "BTCUSD_200925"; // String | Symbol + String pair = "BTCUSD"; // String | Pair try { Ticker24hrPriceChangeStatisticsResponse result = apiInstance.ticker24hrPriceChangeStatistics(symbol, pair); System.out.println(result); @@ -1592,8 +1592,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | [optional] | -| **pair** | **String**| | [optional] | +| **symbol** | **String**| Symbol | [optional] | +| **pair** | **String**| Pair | [optional] | ### Return type @@ -1617,9 +1617,9 @@ No authorization required # **topTraderLongShortRatioAccounts** > TopTraderLongShortRatioAccountsResponse topTraderLongShortRatioAccounts(symbol, period, limit, startTime, endTime) -Top Trader Long/Short Ratio (Accounts) +Top Trader Long/Short Account Ratio -The proportion of net long and net short accounts to total accounts of the top 20% users with the highest margin balance. Each account is counted once only. Long Account % = Accounts of top traders with net long positions / Total accounts of top traders with open positions Short Account % = Accounts of top traders with net short positions / Total accounts of top traders with open positions Long/Short Ratio (Accounts) = Long Account % / Short Account % * If startTime and endTime are not sent, the most recent data is returned. * Only the data of the latest 30 days is available. Weight: 1 +The proportion of net long and net short accounts to total accounts of the top 20% users with the highest margin balance. Each account is counted once only. Long Account % = Accounts of top traders with net long positions / Total accounts of top traders with open positions Short Account % = Accounts of top traders with net short positions / Total accounts of top traders with open positions Long/Short Ratio (Accounts) = Long Account % / Short Account % Weight(IP): 1 Security Type: Accounts Notes: - If startTime and endTime are not sent, the most recent data is returned. - Only the data of the latest 30 days is available. ### Example ```java @@ -1636,11 +1636,11 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | - Period period = Period.fromValue("5m"); // Period | \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - Long limit = 56L; // Long | Default 100; max 1000 - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | + String symbol = "symbol_example"; // String | Symbol + Period period = Period.fromValue("5m"); // Period | + Long limit = 30L; // Long | Maximum number of records to return. + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | try { TopTraderLongShortRatioAccountsResponse result = apiInstance.topTraderLongShortRatioAccounts(symbol, period, limit, startTime, endTime); System.out.println(result); @@ -1659,9 +1659,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | -| **period** | [**Period**](.md)| \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" | [enum: 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **symbol** | **String**| Symbol | | +| **period** | [**Period**](.md)| | [enum: 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d] | +| **limit** | **Long**| Maximum number of records to return. | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | @@ -1687,9 +1687,9 @@ No authorization required # **topTraderLongShortRatioPositions** > TopTraderLongShortRatioPositionsResponse topTraderLongShortRatioPositions(pair, period, limit, startTime, endTime) -Top Trader Long/Short Ratio (Positions) +Top Trader Long/Short Position Ratio -The proportion of net long and net short positions to total open positions of the top 20% users with the highest margin balance. Long Position % = Long positions of top traders / Total open positions of top traders Short Position % = Short positions of top traders / Total open positions of top traders Long/Short Ratio (Positions) = Long Position % / Short Position % * If startTime and endTime are not sent, the most recent data is returned. * Only the data of the latest 30 days is available. Weight: 1 +The proportion of net long and net short positions to total open positions of the top 20% users with the highest margin balance. Long Position % = Long positions of top traders / Total open positions of top traders Short Position % = Short positions of top traders / Total open positions of top traders Long/Short Ratio (Positions) = Long Position % / Short Position % Weight(IP): 1 Security Type: Positions Notes: - If startTime and endTime are not sent, the most recent data is returned. - Only the data of the latest 30 days is available. ### Example ```java @@ -1706,11 +1706,11 @@ public class Example { defaultClient.setBasePath("https://dapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String pair = "pair_example"; // String | BTCUSD - Period period = Period.fromValue("5m"); // Period | \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - Long limit = 56L; // Long | Default 100; max 1000 - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | + String pair = "BTCUSD"; // String | + Period period = Period.fromValue("5m"); // Period | + Long limit = 30L; // Long | Maximum number of records to return. + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | try { TopTraderLongShortRatioPositionsResponse result = apiInstance.topTraderLongShortRatioPositions(pair, period, limit, startTime, endTime); System.out.println(result); @@ -1729,9 +1729,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **pair** | **String**| BTCUSD | | -| **period** | [**Period**](.md)| \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" | [enum: 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **pair** | **String**| | | +| **period** | [**Period**](.md)| | [enum: 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d] | +| **limit** | **Long**| Maximum number of records to return. | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/MarketLiquidationOrderStreamsRequest.md b/clients/derivatives-trading-coin-futures/docs/MarketLiquidationOrderStreamsRequest.md new file mode 100644 index 000000000..aa018f887 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/MarketLiquidationOrderStreamsRequest.md @@ -0,0 +1,14 @@ + + +# MarketLiquidationOrderStreamsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | + + + diff --git a/clients/derivatives-trading-coin-futures/docs/MarketLiquidationOrderStreamsResponse.md b/clients/derivatives-trading-coin-futures/docs/MarketLiquidationOrderStreamsResponse.md new file mode 100644 index 000000000..7fe58ee44 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/MarketLiquidationOrderStreamsResponse.md @@ -0,0 +1,15 @@ + + +# MarketLiquidationOrderStreamsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eLowerCase** | **String** | Event Type | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**oLowerCase** | [**AllMarketLiquidationOrderStreamsResponseO**](AllMarketLiquidationOrderStreamsResponseO.md) | | [optional] | + + + diff --git a/clients/derivatives-trading-coin-futures/docs/ModifyIsolatedPositionMarginRequest.md b/clients/derivatives-trading-coin-futures/docs/ModifyIsolatedPositionMarginRequest.md index cd609ddeb..baee7075b 100644 --- a/clients/derivatives-trading-coin-futures/docs/ModifyIsolatedPositionMarginRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/ModifyIsolatedPositionMarginRequest.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | +|**symbol** | **String** | Symbol | | |**positionSide** | **PositionSide** | | [optional] | -|**amount** | **Double** | | | -|**type** | **Type** | | | +|**amount** | **Double** | Margin asset | | +|**type** | **Long** | 1: Add position margin,2: Reduce position margin | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ModifyIsolatedPositionMarginResponse.md b/clients/derivatives-trading-coin-futures/docs/ModifyIsolatedPositionMarginResponse.md index c8583e214..ab12b549d 100644 --- a/clients/derivatives-trading-coin-futures/docs/ModifyIsolatedPositionMarginResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/ModifyIsolatedPositionMarginResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amount** | **Double** | | [optional] | -|**code** | **Long** | | [optional] | -|**msg** | **String** | | [optional] | -|**type** | **Long** | | [optional] | +|**amount** | **Double** | Amount. | [optional] | +|**code** | **Long** | API response code. \"000000\" indicates success. | [optional] | +|**msg** | **String** | Message details. | [optional] | +|**type** | **Long** | Order type. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ModifyMultipleOrdersResponseInner.md b/clients/derivatives-trading-coin-futures/docs/ModifyMultipleOrdersResponseInner.md index a8f19fa1f..d9dd10fc6 100644 --- a/clients/derivatives-trading-coin-futures/docs/ModifyMultipleOrdersResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/ModifyMultipleOrdersResponseInner.md @@ -7,32 +7,31 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cumQty** | **String** | | [optional] | -|**cumBase** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**closePosition** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**origType** | **String** | | [optional] | -|**priceMatch** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**code** | **Long** | | [optional] | -|**msg** | **String** | | [optional] | +|**orderId** | **Long** | Sub-order ID | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**pair** | **String** | Pair | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**clientOrderId** | **String** | Client order ID. | [optional] | +|**modifyId** | **Long** | user-defined modification identifier, only returned if provided in the request | [optional] | +|**price** | **String** | Latest token price. | [optional] | +|**origQty** | **String** | Original order quantity | [optional] | +|**executedQty** | **String** | Executed quantity | [optional] | +|**cumQty** | **String** | Cumulative filled quantity. | [optional] | +|**timeInForce** | **String** | Time in force | [optional] | +|**type** | **String** | Order type. | [optional] | +|**reduceOnly** | **Boolean** | Whether the order is reduce-only. | [optional] | +|**closePosition** | **Boolean** | if Close-All | [optional] | +|**side** | **String** | Trading side | [optional] | +|**positionSide** | **String** | Position side | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**workingType** | **String** | Stop trigger price type. | [optional] | +|**priceProtect** | **Boolean** | if conditional order trigger is protected | [optional] | +|**origType** | **String** | Original order type. | [optional] | +|**priceMatch** | **String** | price match mode | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**updateTime** | **Long** | update time | [optional] | +|**code** | **Long** | API response code. \"000000\" indicates success. | [optional] | +|**msg** | **String** | Message details. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ModifyOrderRequest.md b/clients/derivatives-trading-coin-futures/docs/ModifyOrderRequest.md index 55d72cbff..f3d693dfc 100644 --- a/clients/derivatives-trading-coin-futures/docs/ModifyOrderRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/ModifyOrderRequest.md @@ -12,9 +12,10 @@ |**origClientOrderId** | **String** | | [optional] | |**symbol** | **String** | | | |**side** | **Side** | | | -|**quantity** | **Double** | | | +|**quantity** | **Double** | Order quantity, cannot be sent with `closePosition=true` | | |**price** | **Double** | | | |**priceMatch** | **PriceMatch** | | [optional] | +|**modifyId** | **Long** | User-defined modification identifier, returned as-is in the response. Optional; not validated for uniqueness. | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ModifyOrderResponse.md b/clients/derivatives-trading-coin-futures/docs/ModifyOrderResponse.md index d7b9ca5bd..c265a28d2 100644 --- a/clients/derivatives-trading-coin-futures/docs/ModifyOrderResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/ModifyOrderResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**status** | **Long** | | [optional] | +|**id** | **String** | positionId | [optional] | +|**status** | **Long** | Enum:completed,processing | [optional] | |**result** | [**ModifyOrderResponseResult**](ModifyOrderResponseResult.md) | | [optional] | -|**rateLimits** | [**List<CancelOrderResponseRateLimitsInner>**](CancelOrderResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<CancelOrderResponseRateLimitsInner>**](CancelOrderResponseRateLimitsInner.md) | Rate limit definitions. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ModifyOrderResponseResult.md b/clients/derivatives-trading-coin-futures/docs/ModifyOrderResponseResult.md index 4cfa01953..7c3aa7808 100644 --- a/clients/derivatives-trading-coin-futures/docs/ModifyOrderResponseResult.md +++ b/clients/derivatives-trading-coin-futures/docs/ModifyOrderResponseResult.md @@ -2,33 +2,33 @@ # ModifyOrderResponseResult +Indicates that combined is set to true. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cumQty** | **String** | | [optional] | -|**cumBase** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**closePosition** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**origType** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**orderId** | **Long** | Sub-order ID | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**pair** | **String** | Pair | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**clientOrderId** | **String** | Client order ID. | [optional] | +|**modifyId** | **Long** | user-defined modification identifier, only returned if provided in the request | [optional] | +|**price** | **String** | Latest token price. | [optional] | +|**origQty** | **String** | Original order quantity | [optional] | +|**executedQty** | **String** | Executed quantity | [optional] | +|**cumQty** | **String** | Cumulative filled quantity. | [optional] | +|**timeInForce** | **String** | Time in force | [optional] | +|**type** | **String** | Order type. | [optional] | +|**reduceOnly** | **Boolean** | Whether the order is reduce-only. | [optional] | +|**closePosition** | **Boolean** | if Close-All | [optional] | +|**side** | **String** | Trading side | [optional] | +|**positionSide** | **String** | Position side | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**workingType** | **String** | Stop trigger price type. | [optional] | +|**priceProtect** | **Boolean** | if conditional order trigger is protected | [optional] | +|**origType** | **String** | Original order type. | [optional] | +|**updateTime** | **Long** | update time | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/NewOrderRequest.md b/clients/derivatives-trading-coin-futures/docs/NewOrderRequest.md index 35524dcf9..1cd92709d 100644 --- a/clients/derivatives-trading-coin-futures/docs/NewOrderRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/NewOrderRequest.md @@ -11,18 +11,18 @@ |**symbol** | **String** | | | |**side** | **Side** | | | |**positionSide** | **PositionSide** | | [optional] | -|**type** | **Type** | | | +|**type** | **OrderType** | | | |**timeInForce** | **TimeInForce** | | [optional] | -|**quantity** | **Double** | | [optional] | -|**reduceOnly** | **String** | | [optional] | +|**quantity** | **Double** | Quantity measured by contract number, Cannot be sent with `closePosition`=`true` | [optional] | +|**reduceOnly** | **ReduceOnly** | | [optional] | |**price** | **Double** | | [optional] | -|**newClientOrderId** | **String** | | [optional] | -|**stopPrice** | **Double** | | [optional] | -|**closePosition** | **String** | | [optional] | -|**activationPrice** | **Double** | | [optional] | -|**callbackRate** | **Double** | | [optional] | +|**newClientOrderId** | **String** | A unique id among open orders. Automatically generated if not sent. Can only be string following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,36}$` | [optional] | +|**stopPrice** | **Double** | Used with `STOP/STOP_MARKET` or `TAKE_PROFIT/TAKE_PROFIT_MARKET` orders. | [optional] | +|**closePosition** | **ClosePosition** | | [optional] | +|**activationPrice** | **Double** | Used with `TRAILING_STOP_MARKET` orders, default as the latest price(supporting different workingType) | [optional] | +|**callbackRate** | **Double** | Used with `TRAILING_STOP_MARKET` orders, min 0.1, max 10 where 1 for 1% | [optional] | |**workingType** | **WorkingType** | | [optional] | -|**priceProtect** | **String** | | [optional] | +|**priceProtect** | **PriceProtect** | | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**priceMatch** | **PriceMatch** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/NewOrderResponse.md b/clients/derivatives-trading-coin-futures/docs/NewOrderResponse.md index 714ec1108..11d465f8b 100644 --- a/clients/derivatives-trading-coin-futures/docs/NewOrderResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/NewOrderResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**status** | **Long** | | [optional] | +|**id** | **String** | positionId | [optional] | +|**status** | **Long** | Enum:completed,processing | [optional] | |**result** | [**NewOrderResponseResult**](NewOrderResponseResult.md) | | [optional] | -|**rateLimits** | [**List<CancelOrderResponseRateLimitsInner>**](CancelOrderResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<CancelOrderResponseRateLimitsInner>**](CancelOrderResponseRateLimitsInner.md) | Rate limit definitions. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/NewOrderResponseResult.md b/clients/derivatives-trading-coin-futures/docs/NewOrderResponseResult.md index 0bc158492..f655b0bc3 100644 --- a/clients/derivatives-trading-coin-futures/docs/NewOrderResponseResult.md +++ b/clients/derivatives-trading-coin-futures/docs/NewOrderResponseResult.md @@ -2,33 +2,32 @@ # NewOrderResponseResult +Indicates that combined is set to true. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cumQty** | **String** | | [optional] | -|**cumBase** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**closePosition** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**origType** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**orderId** | **Long** | Sub-order ID | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**pair** | **String** | Pair | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**clientOrderId** | **String** | Client order ID. | [optional] | +|**price** | **String** | Latest token price. | [optional] | +|**origQty** | **String** | Original order quantity | [optional] | +|**executedQty** | **String** | Executed quantity | [optional] | +|**cumQty** | **String** | Cumulative filled quantity. | [optional] | +|**timeInForce** | **String** | Time in force | [optional] | +|**type** | **String** | Order type. | [optional] | +|**reduceOnly** | **Boolean** | Whether the order is reduce-only. | [optional] | +|**closePosition** | **Boolean** | if Close-All | [optional] | +|**side** | **String** | Trading side | [optional] | +|**positionSide** | **String** | Position side | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**workingType** | **String** | Stop trigger price type. | [optional] | +|**priceProtect** | **Boolean** | if conditional order trigger is protected | [optional] | +|**origType** | **String** | Original order type. | [optional] | +|**updateTime** | **Long** | update time | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/NotionalBracketForPairResponseInner.md b/clients/derivatives-trading-coin-futures/docs/NotionalBracketForPairResponseInner.md index a7b79b710..a5b9ad316 100644 --- a/clients/derivatives-trading-coin-futures/docs/NotionalBracketForPairResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/NotionalBracketForPairResponseInner.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**pair** | **String** | | [optional] | -|**brackets** | [**List<NotionalBracketForPairResponseInnerBracketsInner>**](NotionalBracketForPairResponseInnerBracketsInner.md) | | [optional] | +|**pair** | **String** | Pair | [optional] | +|**brackets** | [**List<NotionalBracketForPairResponseInnerBracketsInner>**](NotionalBracketForPairResponseInnerBracketsInner.md) | Leverage bracket details. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/NotionalBracketForPairResponseInnerBracketsInner.md b/clients/derivatives-trading-coin-futures/docs/NotionalBracketForPairResponseInnerBracketsInner.md index 8d28f6539..62eb36bd3 100644 --- a/clients/derivatives-trading-coin-futures/docs/NotionalBracketForPairResponseInnerBracketsInner.md +++ b/clients/derivatives-trading-coin-futures/docs/NotionalBracketForPairResponseInnerBracketsInner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**bracket** | **Long** | | [optional] | -|**initialLeverage** | **Long** | | [optional] | -|**qtyCap** | **Long** | | [optional] | -|**qtylFloor** | **Long** | | [optional] | -|**maintMarginRatio** | **Double** | | [optional] | -|**cum** | **Double** | | [optional] | +|**bracket** | **Long** | bracket level | [optional] | +|**initialLeverage** | **Long** | the maximum leverage | [optional] | +|**qtyCap** | **Long** | upper edge of base asset quantity | [optional] | +|**qtylFloor** | **Long** | lower edge of base asset quantity | [optional] | +|**maintMarginRatio** | **Double** | Maintenance margin ratio. | [optional] | +|**cum** | **Double** | Cumulative value. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/NotionalBracketForSymbolResponseInner.md b/clients/derivatives-trading-coin-futures/docs/NotionalBracketForSymbolResponseInner.md index a7c673cf3..2538ae18d 100644 --- a/clients/derivatives-trading-coin-futures/docs/NotionalBracketForSymbolResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/NotionalBracketForSymbolResponseInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**notionalCoef** | **Double** | | [optional] | -|**brackets** | [**List<NotionalBracketForPairResponseInnerBracketsInner>**](NotionalBracketForPairResponseInnerBracketsInner.md) | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**notionalCoef** | **Double** | user symbol bracket multiplier, only appears when user's symbol bracket is adjusted | [optional] | +|**brackets** | [**List<NotionalBracketForPairResponseInnerBracketsInner>**](NotionalBracketForPairResponseInnerBracketsInner.md) | Leverage bracket details. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/OldTradesLookupResponseInner.md b/clients/derivatives-trading-coin-futures/docs/OldTradesLookupResponseInner.md index 4a5880573..75a7cf6b9 100644 --- a/clients/derivatives-trading-coin-futures/docs/OldTradesLookupResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/OldTradesLookupResponseInner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**qty** | **String** | | [optional] | -|**baseQty** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**isBuyerMaker** | **Boolean** | | [optional] | +|**id** | **Long** | positionId | [optional] | +|**price** | **String** | Latest token price. | [optional] | +|**qty** | **String** | Quantity. | [optional] | +|**baseQty** | **String** | Base asset quantity. | [optional] | +|**time** | **Long** | Time | [optional] | +|**isBuyerMaker** | **Boolean** | Whether buyer is market maker. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/OpenInterestResponse.md b/clients/derivatives-trading-coin-futures/docs/OpenInterestResponse.md index bea52cb08..177d61017 100644 --- a/clients/derivatives-trading-coin-futures/docs/OpenInterestResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/OpenInterestResponse.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**openInterest** | **String** | | [optional] | -|**contractType** | **String** | | [optional] | -|**time** | **Long** | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**pair** | **String** | Pair | [optional] | +|**openInterest** | **String** | Open interest. | [optional] | +|**contractType** | **String** | Contract type. | [optional] | +|**time** | **Long** | Time | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/OpenInterestStatisticsResponseInner.md b/clients/derivatives-trading-coin-futures/docs/OpenInterestStatisticsResponseInner.md index c6b51f42f..1393241b0 100644 --- a/clients/derivatives-trading-coin-futures/docs/OpenInterestStatisticsResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/OpenInterestStatisticsResponseInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**pair** | **String** | | [optional] | -|**contractType** | **String** | | [optional] | -|**sumOpenInterest** | **String** | | [optional] | -|**sumOpenInterestValue** | **String** | | [optional] | -|**timestamp** | **Long** | | [optional] | +|**pair** | **String** | Pair | [optional] | +|**contractType** | **String** | Contract type. | [optional] | +|**sumOpenInterest** | **String** | unit: cont | [optional] | +|**sumOpenInterestValue** | **String** | unit: base asset | [optional] | +|**timestamp** | **Long** | Timestamp in milliseconds. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/OrderBookResponse.md b/clients/derivatives-trading-coin-futures/docs/OrderBookResponse.md index 5ff02375e..516d99304 100644 --- a/clients/derivatives-trading-coin-futures/docs/OrderBookResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/OrderBookResponse.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**lastUpdateId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**bids** | **List<OrderBookResponseBidsItem>** | | [optional] | -|**asks** | **List<OrderBookResponseAsksItem>** | | [optional] | +|**lastUpdateId** | **Long** | Last update ID. | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**pair** | **String** | Pair | [optional] | +|**E** | **Long** | Message output time | [optional] | +|**T** | **Long** | Transaction time | [optional] | +|**bids** | **List<List<String>>** | Bid orders. Each entry is [price, quantity]. | [optional] | +|**asks** | **List<List<String>>** | Ask orders. Each entry is [price, quantity]. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/OrderBookResponseAsksItem.md b/clients/derivatives-trading-coin-futures/docs/OrderBookResponseAsksItem.md deleted file mode 100644 index 44fa39180..000000000 --- a/clients/derivatives-trading-coin-futures/docs/OrderBookResponseAsksItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# OrderBookResponseAsksItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-coin-futures/docs/OrderBookResponseBidsItem.md b/clients/derivatives-trading-coin-futures/docs/OrderBookResponseBidsItem.md deleted file mode 100644 index 5f8f02644..000000000 --- a/clients/derivatives-trading-coin-futures/docs/OrderBookResponseBidsItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# OrderBookResponseBidsItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-coin-futures/docs/OrderTradeUpdate.md b/clients/derivatives-trading-coin-futures/docs/OrderTradeUpdate.md index f11013838..2f86a8a6f 100644 --- a/clients/derivatives-trading-coin-futures/docs/OrderTradeUpdate.md +++ b/clients/derivatives-trading-coin-futures/docs/OrderTradeUpdate.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**iLowerCase** | **String** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction Time | [optional] | +|**iLowerCase** | **String** | Account Alias | [optional] | |**oLowerCase** | [**OrderTradeUpdateO**](OrderTradeUpdateO.md) | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/OrderTradeUpdateO.md b/clients/derivatives-trading-coin-futures/docs/OrderTradeUpdateO.md index dd9e5bc49..e732efe85 100644 --- a/clients/derivatives-trading-coin-futures/docs/OrderTradeUpdateO.md +++ b/clients/derivatives-trading-coin-futures/docs/OrderTradeUpdateO.md @@ -7,41 +7,42 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**S** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**ap** | **String** | | [optional] | -|**sp** | **String** | | [optional] | -|**xLowerCase** | **String** | | [optional] | -|**X** | **String** | | [optional] | -|**iLowerCase** | **Long** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**zLowerCase** | **String** | | [optional] | -|**L** | **String** | | [optional] | -|**ma** | **String** | | [optional] | -|**N** | **String** | | [optional] | -|**nLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | -|**tLowerCase** | **Long** | | [optional] | -|**rp** | **String** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | -|**R** | **Boolean** | | [optional] | -|**wt** | **String** | | [optional] | -|**ot** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**cp** | **Boolean** | | [optional] | -|**AP** | **String** | | [optional] | -|**cr** | **String** | | [optional] | -|**pP** | **Boolean** | | [optional] | -|**V** | **String** | | [optional] | -|**pm** | **String** | | [optional] | -|**er** | **String** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**cLowerCase** | **String** | Client Order Id | [optional] | +|**S** | **String** | Side | [optional] | +|**oLowerCase** | **String** | Order Type | [optional] | +|**fLowerCase** | **String** | Time in Force | [optional] | +|**qLowerCase** | **String** | Original Quantity | [optional] | +|**pLowerCase** | **String** | Original Price | [optional] | +|**ap** | **String** | Average Price | [optional] | +|**sp** | **String** | Stop Price. Please ignore with TRAILING_STOP_MARKET order | [optional] | +|**xLowerCase** | **String** | Execution Type | [optional] | +|**X** | **String** | Order Status | [optional] | +|**iLowerCase** | **Long** | Order Id | [optional] | +|**M** | **String** | modifyId, only pushed for AMENDMENT (order modification) events when a modifyId was provided in the request | [optional] | +|**lLowerCase** | **String** | Order Last Filled Quantity | [optional] | +|**zLowerCase** | **String** | Order Filled Accumulated Quantity | [optional] | +|**L** | **String** | Last Filled Price | [optional] | +|**ma** | **String** | Margin Asset | [optional] | +|**N** | **String** | Commission Asset | [optional] | +|**nLowerCase** | **String** | Commission | [optional] | +|**T** | **Long** | Order Trade Time | [optional] | +|**tLowerCase** | **Long** | Trade Id | [optional] | +|**rp** | **String** | Realized Profit of the trade | [optional] | +|**bLowerCase** | **String** | Bid quantity of base asset | [optional] | +|**aLowerCase** | **String** | Ask quantity of base asset | [optional] | +|**mLowerCase** | **Boolean** | Is this trade the maker side? | [optional] | +|**R** | **Boolean** | Is this reduce only | [optional] | +|**wt** | **String** | Stop Price Working Type | [optional] | +|**ot** | **String** | Original Order Type | [optional] | +|**ps** | **String** | Position Side | [optional] | +|**cp** | **Boolean** | If Close-All, pushed with conditional order | [optional] | +|**AP** | **String** | Activation Price, only pushed with TRAILING_STOP_MARKET order | [optional] | +|**cr** | **String** | Callback Rate, only pushed with TRAILING_STOP_MARKET order | [optional] | +|**pP** | **Boolean** | If conditional order trigger is protected | [optional] | +|**V** | **String** | STP mode | [optional] | +|**pm** | **String** | Price match mode | [optional] | +|**er** | **String** | Expiry Reason | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/OrderType.md b/clients/derivatives-trading-coin-futures/docs/OrderType.md new file mode 100644 index 000000000..e3daf64b5 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/OrderType.md @@ -0,0 +1,23 @@ + + +# OrderType + +## Enum + + +* `LIMIT` (value: `"LIMIT"`) + +* `MARKET` (value: `"MARKET"`) + +* `STOP` (value: `"STOP"`) + +* `STOP_MARKET` (value: `"STOP_MARKET"`) + +* `TAKE_PROFIT` (value: `"TAKE_PROFIT"`) + +* `TAKE_PROFIT_MARKET` (value: `"TAKE_PROFIT_MARKET"`) + +* `TRAILING_STOP_MARKET` (value: `"TRAILING_STOP_MARKET"`) + + + diff --git a/clients/derivatives-trading-coin-futures/docs/PartialBookDepthStreamsRequest.md b/clients/derivatives-trading-coin-futures/docs/PartialBookDepthStreamsRequest.md index 1ccf85f6e..b9e26969e 100644 --- a/clients/derivatives-trading-coin-futures/docs/PartialBookDepthStreamsRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/PartialBookDepthStreamsRequest.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | -|**levels** | **Long** | | | -|**updateSpeed** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | +|**levels** | **Levels** | | [optional] | +|**updateSpeed** | **UpdateSpeed** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/PartialBookDepthStreamsResponse.md b/clients/derivatives-trading-coin-futures/docs/PartialBookDepthStreamsResponse.md index 610cfb50d..901402d7c 100644 --- a/clients/derivatives-trading-coin-futures/docs/PartialBookDepthStreamsResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/PartialBookDepthStreamsResponse.md @@ -7,16 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**U** | **Long** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**pu** | **Long** | | [optional] | -|**bLowerCase** | **List<PartialBookDepthStreamsResponseBItem>** | | [optional] | -|**aLowerCase** | **List<PartialBookDepthStreamsResponseAItem>** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**T** | **Long** | Transaction time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**ps** | **String** | Pair | [optional] | +|**U** | **Long** | First update ID in event | [optional] | +|**uLowerCase** | **Long** | updateId | [optional] | +|**pu** | **Long** | Final update Id in last stream(ie `u` in last stream) | [optional] | +|**bLowerCase** | **List<List<String>>** | Bids to be updated | [optional] | +|**aLowerCase** | **List<List<String>>** | Asks to be updated | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/PartialBookDepthStreamsResponseAItem.md b/clients/derivatives-trading-coin-futures/docs/PartialBookDepthStreamsResponseAItem.md deleted file mode 100644 index bc99fa2fb..000000000 --- a/clients/derivatives-trading-coin-futures/docs/PartialBookDepthStreamsResponseAItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# PartialBookDepthStreamsResponseAItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-coin-futures/docs/PartialBookDepthStreamsResponseBItem.md b/clients/derivatives-trading-coin-futures/docs/PartialBookDepthStreamsResponseBItem.md deleted file mode 100644 index e10d46136..000000000 --- a/clients/derivatives-trading-coin-futures/docs/PartialBookDepthStreamsResponseBItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# PartialBookDepthStreamsResponseBItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-coin-futures/docs/PlaceMultipleOrdersRequest.md b/clients/derivatives-trading-coin-futures/docs/PlaceMultipleOrdersRequest.md index 22e63396a..7c31f8d3b 100644 --- a/clients/derivatives-trading-coin-futures/docs/PlaceMultipleOrdersRequest.md +++ b/clients/derivatives-trading-coin-futures/docs/PlaceMultipleOrdersRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**batchOrders** | **BatchOrdersPlaceMultipleOrders** | | | +|**batchOrders** | **BatchOrders** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/PlaceMultipleOrdersResponseInner.md b/clients/derivatives-trading-coin-futures/docs/PlaceMultipleOrdersResponseInner.md index 1e8afb8e0..2de8843c8 100644 --- a/clients/derivatives-trading-coin-futures/docs/PlaceMultipleOrdersResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/PlaceMultipleOrdersResponseInner.md @@ -7,33 +7,32 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**clientOrderId** | **String** | | [optional] | -|**cumQty** | **String** | | [optional] | -|**cumBase** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**priceMatch** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**code** | **Long** | | [optional] | -|**msg** | **String** | | [optional] | +|**clientOrderId** | **String** | Client order ID. | [optional] | +|**cumQty** | **String** | Cumulative filled quantity. | [optional] | +|**executedQty** | **String** | Executed quantity | [optional] | +|**orderId** | **Long** | Sub-order ID | [optional] | +|**origQty** | **String** | Original order quantity | [optional] | +|**price** | **String** | Latest token price. | [optional] | +|**reduceOnly** | **Boolean** | Whether the order is reduce-only. | [optional] | +|**side** | **String** | Trading side | [optional] | +|**positionSide** | **String** | Position side | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**closePosition** | **Boolean** | if Close-All | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**pair** | **String** | Pair | [optional] | +|**timeInForce** | **String** | Time in force | [optional] | +|**type** | **String** | Order type. | [optional] | +|**origType** | **String** | Original order type. | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**updateTime** | **Long** | update time | [optional] | +|**workingType** | **String** | Stop trigger price type. | [optional] | +|**priceProtect** | **Boolean** | if conditional order trigger is protected | [optional] | +|**priceMatch** | **String** | price match mode | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**code** | **Long** | API response code. \"000000\" indicates success. | [optional] | +|**msg** | **String** | Message details. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/PortfolioMarginEndpointsApi.md b/clients/derivatives-trading-coin-futures/docs/PortfolioMarginEndpointsApi.md deleted file mode 100644 index eb68c1438..000000000 --- a/clients/derivatives-trading-coin-futures/docs/PortfolioMarginEndpointsApi.md +++ /dev/null @@ -1,73 +0,0 @@ -# PortfolioMarginEndpointsApi - -All URIs are relative to *https://dapi.binance.com* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**classicPortfolioMarginAccountInformation**](PortfolioMarginEndpointsApi.md#classicPortfolioMarginAccountInformation) | **GET** /dapi/v1/pmAccountInfo | Classic Portfolio Margin Account Information (USER_DATA) | - - - -# **classicPortfolioMarginAccountInformation** -> ClassicPortfolioMarginAccountInformationResponse classicPortfolioMarginAccountInformation(asset, recvWindow) - -Classic Portfolio Margin Account Information (USER_DATA) - -Get Classic Portfolio Margin current account information. * maxWithdrawAmount is for asset transfer out to the spot wallet. Weight: 5 - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.PortfolioMarginEndpointsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://dapi.binance.com"); - - PortfolioMarginEndpointsApi apiInstance = new PortfolioMarginEndpointsApi(defaultClient); - String asset = "asset_example"; // String | - Long recvWindow = 56L; // Long | - try { - ClassicPortfolioMarginAccountInformationResponse result = apiInstance.classicPortfolioMarginAccountInformation(asset, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortfolioMarginEndpointsApi#classicPortfolioMarginAccountInformation"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **asset** | **String**| | | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**ClassicPortfolioMarginAccountInformationResponse**](ClassicPortfolioMarginAccountInformationResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Classic Portfolio Margin Account Information | - | - diff --git a/clients/derivatives-trading-coin-futures/docs/PositionAdlQuantileEstimationResponseInner.md b/clients/derivatives-trading-coin-futures/docs/PositionAdlQuantileEstimationResponseInner.md index fa89ff981..e62b9af97 100644 --- a/clients/derivatives-trading-coin-futures/docs/PositionAdlQuantileEstimationResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/PositionAdlQuantileEstimationResponseInner.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | |**adlQuantile** | [**PositionAdlQuantileEstimationResponseInnerAdlQuantile**](PositionAdlQuantileEstimationResponseInnerAdlQuantile.md) | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/PositionAdlQuantileEstimationResponseInnerAdlQuantile.md b/clients/derivatives-trading-coin-futures/docs/PositionAdlQuantileEstimationResponseInnerAdlQuantile.md index bdd41883c..3521d2462 100644 --- a/clients/derivatives-trading-coin-futures/docs/PositionAdlQuantileEstimationResponseInnerAdlQuantile.md +++ b/clients/derivatives-trading-coin-futures/docs/PositionAdlQuantileEstimationResponseInnerAdlQuantile.md @@ -2,15 +2,16 @@ # PositionAdlQuantileEstimationResponseInnerAdlQuantile +ADL quantile information. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**LONG** | **Long** | | [optional] | -|**SHORT** | **Long** | | [optional] | -|**HEDGE** | **Long** | | [optional] | -|**BOTH** | **Long** | | [optional] | +|**LONG** | **Long** | adl quantile for \"LONG\" position in hedge mode | [optional] | +|**SHORT** | **Long** | adl qauntile for \"SHORT\" position in hedge mode | [optional] | +|**HEDGE** | **Long** | Hedge mode ADL quantile. | [optional] | +|**BOTH** | **Long** | One-way mode ADL quantile. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/PositionInformationResponse.md b/clients/derivatives-trading-coin-futures/docs/PositionInformationResponse.md index 944889af6..5a1e6bbe1 100644 --- a/clients/derivatives-trading-coin-futures/docs/PositionInformationResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/PositionInformationResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**status** | **Long** | | [optional] | -|**result** | [**List<PositionInformationResponseResultInner>**](PositionInformationResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountInformationResponseRateLimitsInner>**](AccountInformationResponseRateLimitsInner.md) | | [optional] | +|**id** | **String** | positionId | [optional] | +|**status** | **Long** | Enum:completed,processing | [optional] | +|**result** | [**List<PositionInformationResponseResultInner>**](PositionInformationResponseResultInner.md) | Indicates that combined is set to true. | [optional] | +|**rateLimits** | [**List<AccountInformationResponseRateLimitsInner>**](AccountInformationResponseRateLimitsInner.md) | Rate limit definitions. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/PositionInformationResponseInner.md b/clients/derivatives-trading-coin-futures/docs/PositionInformationResponseInner.md index d183d596c..e2c5f11f5 100644 --- a/clients/derivatives-trading-coin-futures/docs/PositionInformationResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/PositionInformationResponseInner.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**positionAmt** | **String** | | [optional] | -|**entryPrice** | **String** | | [optional] | -|**breakEvenPrice** | **String** | | [optional] | -|**markPrice** | **String** | | [optional] | -|**unRealizedProfit** | **String** | | [optional] | -|**liquidationPrice** | **String** | | [optional] | -|**leverage** | **String** | | [optional] | -|**maxQty** | **String** | | [optional] | -|**marginType** | **String** | | [optional] | -|**isolatedMargin** | **String** | | [optional] | -|**isAutoAddMargin** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**positionAmt** | **String** | position amount | [optional] | +|**entryPrice** | **String** | Position entry price. | [optional] | +|**breakEvenPrice** | **String** | break-even price | [optional] | +|**markPrice** | **String** | mark price | [optional] | +|**unRealizedProfit** | **String** | Unrealized profit. | [optional] | +|**liquidationPrice** | **String** | Liquidation price. | [optional] | +|**leverage** | **String** | Leverage value. | [optional] | +|**maxQty** | **String** | maximum quantity of base asset | [optional] | +|**marginType** | **String** | Margin type. | [optional] | +|**isolatedMargin** | **String** | Isolated margin amount. | [optional] | +|**isAutoAddMargin** | **String** | Whether auto-add margin is enabled. | [optional] | +|**positionSide** | **String** | Position side | [optional] | +|**updateTime** | **Long** | update time | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/PositionInformationResponseResultInner.md b/clients/derivatives-trading-coin-futures/docs/PositionInformationResponseResultInner.md index cad5b2c98..22e50eb63 100644 --- a/clients/derivatives-trading-coin-futures/docs/PositionInformationResponseResultInner.md +++ b/clients/derivatives-trading-coin-futures/docs/PositionInformationResponseResultInner.md @@ -7,22 +7,22 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**positionAmt** | **String** | | [optional] | -|**entryPrice** | **String** | | [optional] | -|**markPrice** | **String** | | [optional] | -|**unRealizedProfit** | **String** | | [optional] | -|**liquidationPrice** | **String** | | [optional] | -|**leverage** | **String** | | [optional] | -|**maxQty** | **String** | | [optional] | -|**marginType** | **String** | | [optional] | -|**isolatedMargin** | **String** | | [optional] | -|**isAutoAddMargin** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**notionalValue** | **String** | | [optional] | -|**isolatedWallet** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**breakEvenPrice** | **String** | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**positionAmt** | **String** | position amount | [optional] | +|**entryPrice** | **String** | Position entry price. | [optional] | +|**markPrice** | **String** | mark price | [optional] | +|**unRealizedProfit** | **String** | Unrealized profit. | [optional] | +|**liquidationPrice** | **String** | Liquidation price. | [optional] | +|**leverage** | **String** | Leverage value. | [optional] | +|**maxQty** | **String** | maximum quantity of base asset | [optional] | +|**marginType** | **String** | Margin type. | [optional] | +|**isolatedMargin** | **String** | Isolated margin amount. | [optional] | +|**isAutoAddMargin** | **String** | Whether auto-add margin is enabled. | [optional] | +|**positionSide** | **String** | Position side | [optional] | +|**notionalValue** | **String** | Notional value. | [optional] | +|**isolatedWallet** | **String** | Isolated wallet balance. | [optional] | +|**updateTime** | **Long** | update time | [optional] | +|**breakEvenPrice** | **String** | break-even price | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/PremiumIndexKlineDataItem.md b/clients/derivatives-trading-coin-futures/docs/PremiumIndexKlineDataItem.md new file mode 100644 index 000000000..a7d990bf4 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/PremiumIndexKlineDataItem.md @@ -0,0 +1,12 @@ + + +# PremiumIndexKlineDataItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-coin-futures/docs/PremiumIndexKlineDataItemInner.md b/clients/derivatives-trading-coin-futures/docs/PremiumIndexKlineDataItemInner.md new file mode 100644 index 000000000..5ed6247c9 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/PremiumIndexKlineDataItemInner.md @@ -0,0 +1,12 @@ + + +# PremiumIndexKlineDataItemInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-coin-futures/docs/PremiumIndexKlineDataResponseItem.md b/clients/derivatives-trading-coin-futures/docs/PremiumIndexKlineDataResponseItem.md deleted file mode 100644 index 506f22c8e..000000000 --- a/clients/derivatives-trading-coin-futures/docs/PremiumIndexKlineDataResponseItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# PremiumIndexKlineDataResponseItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-coin-futures/docs/PremiumIndexKlineDataResponseItemInner.md b/clients/derivatives-trading-coin-futures/docs/PremiumIndexKlineDataResponseItemInner.md deleted file mode 100644 index 7de523a09..000000000 --- a/clients/derivatives-trading-coin-futures/docs/PremiumIndexKlineDataResponseItemInner.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# PremiumIndexKlineDataResponseItemInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-coin-futures/docs/PriceMatch.md b/clients/derivatives-trading-coin-futures/docs/PriceMatch.md index 1801e3c02..214d8c098 100644 --- a/clients/derivatives-trading-coin-futures/docs/PriceMatch.md +++ b/clients/derivatives-trading-coin-futures/docs/PriceMatch.md @@ -5,8 +5,6 @@ ## Enum -* `NONE` (value: `"NONE"`) - * `OPPONENT` (value: `"OPPONENT"`) * `OPPONENT_5` (value: `"OPPONENT_5"`) diff --git a/clients/derivatives-trading-coin-futures/docs/PriceProtect.md b/clients/derivatives-trading-coin-futures/docs/PriceProtect.md new file mode 100644 index 000000000..a4c3ac525 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/PriceProtect.md @@ -0,0 +1,13 @@ + + +# PriceProtect + +## Enum + + +* `TRUE` (value: `"true"`) + +* `FALSE` (value: `"false"`) + + + diff --git a/clients/derivatives-trading-coin-futures/docs/QueryCurrentOpenOrderResponse.md b/clients/derivatives-trading-coin-futures/docs/QueryCurrentOpenOrderResponse.md index a21487804..29377034e 100644 --- a/clients/derivatives-trading-coin-futures/docs/QueryCurrentOpenOrderResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/QueryCurrentOpenOrderResponse.md @@ -7,32 +7,32 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgPrice** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**cumBase** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**closePosition** | **Boolean** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**priceMatch** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | +|**avgPrice** | **String** | Average execution price | [optional] | +|**clientOrderId** | **String** | Client order ID. | [optional] | +|**cumBase** | **String** | Cumulative base asset amount. | [optional] | +|**executedQty** | **String** | Executed quantity | [optional] | +|**orderId** | **Long** | Sub-order ID | [optional] | +|**origQty** | **String** | Original order quantity | [optional] | +|**origType** | **String** | Original order type. | [optional] | +|**price** | **String** | Latest token price. | [optional] | +|**reduceOnly** | **Boolean** | Whether the order is reduce-only. | [optional] | +|**side** | **String** | Trading side | [optional] | +|**positionSide** | **String** | Position side | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**closePosition** | **Boolean** | if Close-All | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**pair** | **String** | Pair | [optional] | +|**time** | **Long** | Time | [optional] | +|**timeInForce** | **String** | Time in force | [optional] | +|**type** | **String** | Order type. | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**updateTime** | **Long** | update time | [optional] | +|**workingType** | **String** | Stop trigger price type. | [optional] | +|**priceProtect** | **Boolean** | if conditional order trigger is protected | [optional] | +|**priceMatch** | **String** | price match mode | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/QueryIndexPriceConstituentsResponse.md b/clients/derivatives-trading-coin-futures/docs/QueryIndexPriceConstituentsResponse.md index 44ccc2335..0d94bfacc 100644 --- a/clients/derivatives-trading-coin-futures/docs/QueryIndexPriceConstituentsResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/QueryIndexPriceConstituentsResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**constituents** | [**List<QueryIndexPriceConstituentsResponseConstituentsInner>**](QueryIndexPriceConstituentsResponseConstituentsInner.md) | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**time** | **Long** | Time | [optional] | +|**constituents** | [**List<QueryIndexPriceConstituentsResponseConstituentsInner>**](QueryIndexPriceConstituentsResponseConstituentsInner.md) | Constituent list. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/QueryIndexPriceConstituentsResponseConstituentsInner.md b/clients/derivatives-trading-coin-futures/docs/QueryIndexPriceConstituentsResponseConstituentsInner.md index 20fc71bf4..6b65aae62 100644 --- a/clients/derivatives-trading-coin-futures/docs/QueryIndexPriceConstituentsResponseConstituentsInner.md +++ b/clients/derivatives-trading-coin-futures/docs/QueryIndexPriceConstituentsResponseConstituentsInner.md @@ -7,8 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**exchange** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | +|**exchange** | **String** | Exchange identifier. | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**price** | **String** | Price | [optional] | +|**weight** | **String** | Weight | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/QueryOrderResponse.md b/clients/derivatives-trading-coin-futures/docs/QueryOrderResponse.md index 0c3e10696..c5d1091c1 100644 --- a/clients/derivatives-trading-coin-futures/docs/QueryOrderResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/QueryOrderResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**status** | **Long** | | [optional] | +|**id** | **String** | positionId | [optional] | +|**status** | **Long** | Enum:completed,processing | [optional] | |**result** | [**QueryOrderResponseResult**](QueryOrderResponseResult.md) | | [optional] | -|**rateLimits** | [**List<CancelOrderResponseRateLimitsInner>**](CancelOrderResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<CancelOrderResponseRateLimitsInner>**](CancelOrderResponseRateLimitsInner.md) | Rate limit definitions. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/QueryOrderResponseResult.md b/clients/derivatives-trading-coin-futures/docs/QueryOrderResponseResult.md index 986e2d19d..cda2a1fae 100644 --- a/clients/derivatives-trading-coin-futures/docs/QueryOrderResponseResult.md +++ b/clients/derivatives-trading-coin-futures/docs/QueryOrderResponseResult.md @@ -2,35 +2,37 @@ # QueryOrderResponseResult +Indicates that combined is set to true. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cumBase** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**closePosition** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**origType** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**priceMatch** | **String** | | [optional] | +|**orderId** | **Long** | Sub-order ID | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**pair** | **String** | Pair | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**clientOrderId** | **String** | Client order ID. | [optional] | +|**price** | **String** | Latest token price. | [optional] | +|**avgPrice** | **String** | Average execution price | [optional] | +|**origQty** | **String** | Original order quantity | [optional] | +|**executedQty** | **String** | Executed quantity | [optional] | +|**cumQty** | **String** | Cumulative filled quantity. | [optional] | +|**cumBase** | **String** | Cumulative base asset amount. | [optional] | +|**timeInForce** | **String** | Time in force | [optional] | +|**type** | **String** | Order type. | [optional] | +|**reduceOnly** | **Boolean** | Whether the order is reduce-only. | [optional] | +|**closePosition** | **Boolean** | if Close-All | [optional] | +|**side** | **String** | Trading side | [optional] | +|**positionSide** | **String** | Position side | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**workingType** | **String** | Stop trigger price type. | [optional] | +|**priceProtect** | **Boolean** | if conditional order trigger is protected | [optional] | +|**origType** | **String** | Original order type. | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**time** | **Long** | Time | [optional] | +|**updateTime** | **Long** | update time | [optional] | +|**priceMatch** | **String** | price match mode | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/RecentTradesListResponseInner.md b/clients/derivatives-trading-coin-futures/docs/RecentTradesListResponseInner.md index 190c08ed0..a82e6f1b7 100644 --- a/clients/derivatives-trading-coin-futures/docs/RecentTradesListResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/RecentTradesListResponseInner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**qty** | **String** | | [optional] | -|**baseQty** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**isBuyerMaker** | **Boolean** | | [optional] | +|**id** | **Long** | positionId | [optional] | +|**price** | **String** | Latest token price. | [optional] | +|**qty** | **String** | Quantity. | [optional] | +|**baseQty** | **String** | Base asset quantity. | [optional] | +|**time** | **Long** | Time | [optional] | +|**isBuyerMaker** | **Boolean** | Whether buyer is market maker. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/ReduceOnly.md b/clients/derivatives-trading-coin-futures/docs/ReduceOnly.md new file mode 100644 index 000000000..7561f86f6 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/ReduceOnly.md @@ -0,0 +1,13 @@ + + +# ReduceOnly + +## Enum + + +* `TRUE` (value: `"true"`) + +* `FALSE` (value: `"false"`) + + + diff --git a/clients/derivatives-trading-coin-futures/docs/StartUserDataStreamResponse.md b/clients/derivatives-trading-coin-futures/docs/StartUserDataStreamResponse.md index 7a5963410..efaec2339 100644 --- a/clients/derivatives-trading-coin-futures/docs/StartUserDataStreamResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/StartUserDataStreamResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**status** | **Long** | | [optional] | +|**id** | **String** | positionId | [optional] | +|**status** | **Long** | Enum:completed,processing | [optional] | |**result** | [**StartUserDataStreamResponseResult**](StartUserDataStreamResponseResult.md) | | [optional] | -|**rateLimits** | [**List<StartUserDataStreamResponseRateLimitsInner>**](StartUserDataStreamResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<CloseUserDataStreamResponseRateLimitsInner>**](CloseUserDataStreamResponseRateLimitsInner.md) | Rate limit definitions. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/StartUserDataStreamResponseRateLimitsInner.md b/clients/derivatives-trading-coin-futures/docs/StartUserDataStreamResponseRateLimitsInner.md deleted file mode 100644 index a6de552ae..000000000 --- a/clients/derivatives-trading-coin-futures/docs/StartUserDataStreamResponseRateLimitsInner.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# StartUserDataStreamResponseRateLimitsInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**rateLimitType** | **String** | | [optional] | -|**interval** | **String** | | [optional] | -|**intervalNum** | **Long** | | [optional] | -|**limit** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | - - - diff --git a/clients/derivatives-trading-coin-futures/docs/StartUserDataStreamResponseResult.md b/clients/derivatives-trading-coin-futures/docs/StartUserDataStreamResponseResult.md index ac9ec751f..74c459419 100644 --- a/clients/derivatives-trading-coin-futures/docs/StartUserDataStreamResponseResult.md +++ b/clients/derivatives-trading-coin-futures/docs/StartUserDataStreamResponseResult.md @@ -2,12 +2,13 @@ # StartUserDataStreamResponseResult +Indicates that combined is set to true. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**listenKey** | **String** | | [optional] | +|**listenKey** | **String** | Listen key. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/StrategyUpdate.md b/clients/derivatives-trading-coin-futures/docs/StrategyUpdate.md index cf642fdff..dae334a49 100644 --- a/clients/derivatives-trading-coin-futures/docs/StrategyUpdate.md +++ b/clients/derivatives-trading-coin-futures/docs/StrategyUpdate.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**T** | **Long** | | [optional] | -|**E** | **Long** | | [optional] | +|**T** | **Long** | Transaction Time | [optional] | +|**E** | **Long** | Event Time | [optional] | |**su** | [**StrategyUpdateSu**](StrategyUpdateSu.md) | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/StrategyUpdateSu.md b/clients/derivatives-trading-coin-futures/docs/StrategyUpdateSu.md index e9329247c..21fd32e8d 100644 --- a/clients/derivatives-trading-coin-futures/docs/StrategyUpdateSu.md +++ b/clients/derivatives-trading-coin-futures/docs/StrategyUpdateSu.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**si** | **Long** | | [optional] | -|**st** | **String** | | [optional] | -|**ss** | **String** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**ut** | **Long** | | [optional] | -|**cLowerCase** | **Long** | | [optional] | +|**si** | **Long** | Strategy ID | [optional] | +|**st** | **String** | Strategy Type | [optional] | +|**ss** | **String** | Strategy Status | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**ut** | **Long** | Update Time | [optional] | +|**cLowerCase** | **Long** | opCode | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/SymbolOrderBookTickerResponseInner.md b/clients/derivatives-trading-coin-futures/docs/SymbolOrderBookTickerResponseInner.md index 8f90ff296..65a095a93 100644 --- a/clients/derivatives-trading-coin-futures/docs/SymbolOrderBookTickerResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/SymbolOrderBookTickerResponseInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**lastUpdateId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**bidPrice** | **String** | | [optional] | -|**bidQty** | **String** | | [optional] | -|**askPrice** | **String** | | [optional] | -|**askQty** | **String** | | [optional] | -|**time** | **Long** | | [optional] | +|**lastUpdateId** | **Long** | Last update ID. | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**pair** | **String** | Pair | [optional] | +|**bidPrice** | **String** | Best bid price. | [optional] | +|**bidQty** | **String** | Best bid quantity. | [optional] | +|**askPrice** | **String** | Best ask price. | [optional] | +|**askQty** | **String** | Best ask quantity. | [optional] | +|**time** | **Long** | Time | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/SymbolPriceTickerResponseInner.md b/clients/derivatives-trading-coin-futures/docs/SymbolPriceTickerResponseInner.md index 24321aba9..2cd30cded 100644 --- a/clients/derivatives-trading-coin-futures/docs/SymbolPriceTickerResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/SymbolPriceTickerResponseInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**time** | **Long** | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**ps** | **String** | Pair | [optional] | +|**price** | **String** | Latest token price. | [optional] | +|**time** | **Long** | Time | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/TakerBuySellVolumeResponseInner.md b/clients/derivatives-trading-coin-futures/docs/TakerBuySellVolumeResponseInner.md index a9b5a678f..3cce0d21e 100644 --- a/clients/derivatives-trading-coin-futures/docs/TakerBuySellVolumeResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/TakerBuySellVolumeResponseInner.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**pair** | **String** | | [optional] | -|**contractType** | **String** | | [optional] | -|**takerBuyVol** | **String** | | [optional] | -|**takerSellVol** | **String** | | [optional] | -|**takerBuyVolValue** | **String** | | [optional] | -|**takerSellVolValue** | **String** | | [optional] | -|**timestamp** | **Long** | | [optional] | +|**pair** | **String** | Pair | [optional] | +|**contractType** | **String** | Contract type. | [optional] | +|**takerBuyVol** | **String** | unit: cont | [optional] | +|**takerSellVol** | **String** | unit: cont | [optional] | +|**takerBuyVolValue** | **String** | unit: base asset | [optional] | +|**takerSellVolValue** | **String** | unit: base asset | [optional] | +|**timestamp** | **Long** | Timestamp in milliseconds. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/Ticker24hrPriceChangeStatisticsResponseInner.md b/clients/derivatives-trading-coin-futures/docs/Ticker24hrPriceChangeStatisticsResponseInner.md index f2cb8b889..d8611ed2b 100644 --- a/clients/derivatives-trading-coin-futures/docs/Ticker24hrPriceChangeStatisticsResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/Ticker24hrPriceChangeStatisticsResponseInner.md @@ -7,23 +7,23 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**priceChange** | **String** | | [optional] | -|**priceChangePercent** | **String** | | [optional] | -|**weightedAvgPrice** | **String** | | [optional] | -|**lastPrice** | **String** | | [optional] | -|**lastQty** | **String** | | [optional] | -|**openPrice** | **String** | | [optional] | -|**highPrice** | **String** | | [optional] | -|**lowPrice** | **String** | | [optional] | -|**volume** | **String** | | [optional] | -|**baseVolume** | **String** | | [optional] | -|**openTime** | **Long** | | [optional] | -|**closeTime** | **Long** | | [optional] | -|**firstId** | **Long** | | [optional] | -|**lastId** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**pair** | **String** | Pair | [optional] | +|**priceChange** | **String** | Absolute price change in the 24h window. | [optional] | +|**priceChangePercent** | **String** | Percentage price change in the 24h window. | [optional] | +|**weightedAvgPrice** | **String** | Weighted average price in the 24h window. | [optional] | +|**lastPrice** | **String** | Latest traded price. | [optional] | +|**lastQty** | **String** | Quantity of the latest trade. | [optional] | +|**openPrice** | **String** | Opening price of the 24h window. | [optional] | +|**highPrice** | **String** | Highest price in the 24h window. | [optional] | +|**lowPrice** | **String** | Lowest price in the 24h window. | [optional] | +|**volume** | **String** | Base asset volume in the 24h window. | [optional] | +|**baseVolume** | **String** | Base asset volume. | [optional] | +|**openTime** | **Long** | Start time of the 24h window (milliseconds). | [optional] | +|**closeTime** | **Long** | End time of the 24h window (milliseconds). | [optional] | +|**firstId** | **Long** | First tradeId | [optional] | +|**lastId** | **Long** | Last tradeId | [optional] | +|**count** | **Long** | Total number of trades in the 24h window. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/TopTraderLongShortRatioAccountsResponseInner.md b/clients/derivatives-trading-coin-futures/docs/TopTraderLongShortRatioAccountsResponseInner.md index 4a4dd0149..7fdfac9bf 100644 --- a/clients/derivatives-trading-coin-futures/docs/TopTraderLongShortRatioAccountsResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/TopTraderLongShortRatioAccountsResponseInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**pair** | **String** | | [optional] | -|**longShortRatio** | **String** | | [optional] | -|**longAccount** | **String** | | [optional] | -|**shortAccount** | **String** | | [optional] | -|**timestamp** | **Long** | | [optional] | +|**pair** | **String** | Pair | [optional] | +|**longShortRatio** | **String** | Long/short ratio. | [optional] | +|**longAccount** | **String** | 64.42% | [optional] | +|**shortAccount** | **String** | 35.58% | [optional] | +|**timestamp** | **Long** | Timestamp in milliseconds. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/TopTraderLongShortRatioPositionsResponseInner.md b/clients/derivatives-trading-coin-futures/docs/TopTraderLongShortRatioPositionsResponseInner.md index f6130b2c3..e9a04c17a 100644 --- a/clients/derivatives-trading-coin-futures/docs/TopTraderLongShortRatioPositionsResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/TopTraderLongShortRatioPositionsResponseInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**pair** | **String** | | [optional] | -|**longShortRatio** | **String** | | [optional] | -|**longPosition** | **String** | | [optional] | -|**shortPosition** | **String** | | [optional] | -|**timestamp** | **Long** | | [optional] | +|**pair** | **String** | Pair | [optional] | +|**longShortRatio** | **String** | Long/short ratio. | [optional] | +|**longPosition** | **String** | 64.42% | [optional] | +|**shortPosition** | **String** | 44.04% | [optional] | +|**timestamp** | **Long** | Timestamp in milliseconds. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/TradeApi.md b/clients/derivatives-trading-coin-futures/docs/TradeApi.md index ab23e5677..eab31501e 100644 --- a/clients/derivatives-trading-coin-futures/docs/TradeApi.md +++ b/clients/derivatives-trading-coin-futures/docs/TradeApi.md @@ -6,8 +6,8 @@ All URIs are relative to *http://localhost* |------------- | ------------- | -------------| | [**cancelOrder**](TradeApi.md#cancelOrder) | **POST** /order.cancel | Cancel Order (TRADE) | | [**modifyOrder**](TradeApi.md#modifyOrder) | **POST** /order.modify | Modify Order (TRADE) | -| [**newOrder**](TradeApi.md#newOrder) | **POST** /order.place | New Order(TRADE) | -| [**positionInformation**](TradeApi.md#positionInformation) | **POST** /account.position | Position Information(USER_DATA) | +| [**newOrder**](TradeApi.md#newOrder) | **POST** /order.place | New Order (TRADE) | +| [**positionInformation**](TradeApi.md#positionInformation) | **POST** /account.position | Position Information (USER_DATA) | | [**queryOrder**](TradeApi.md#queryOrder) | **POST** /order.status | Query Order (USER_DATA) | @@ -17,7 +17,7 @@ All URIs are relative to *http://localhost* Cancel Order (TRADE) -Cancel an active order. * Either `orderId` or `origClientOrderId` must be sent. Weight: 1 +Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - Either `orderId` or `origClientOrderId` must be sent. ### Example ```java @@ -79,7 +79,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 * Either `orderId` or `origClientOrderId` must be sent, and the `orderId` will prevail if both are sent. * Both `quantity` and `price` must be sent, which is different from dapi modify order endpoint. * When the new `quantity` or `price` doesn'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 `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 Weight: 1 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 1 on IP rate limit(x-mbx-used-weight-1m) +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); 1 on IP rate limit(x-mbx-used-weight-1m) Security Type: TRADE Notes: - Either `orderId` or `origClientOrderId` must be sent, and the `orderId` will prevail if both are sent. - Both `quantity` and `price` must be sent. - When the new `quantity` or `price` doesn'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 `quantity` <= `executedQty` - When the order is `GTX` and the new price will cause it to be executed immediately - One order can only be modified for less than 10000 times. ### Example ```java @@ -139,9 +139,9 @@ No authorization required # **newOrder** > NewOrderResponse newOrder(newOrderRequest) -New Order(TRADE) +New Order (TRADE) -Send in a new order. * Order with type `STOP`, parameter `timeInForce` can be sent ( default `GTC`). * Order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent ( default `GTC`). * Condition orders will be triggered when: * If parameter `priceProtect` is sent as true: * when price reaches the `stopPrice`,the difference rate between \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the symbol * \"triggerProtect\" of a symbol can be got from `GET /dapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed <= `activationPrice`, and the latest price >= the lowest price * (1 + `callbackRate`) * SELL: the highest price after order placed >= `activationPrice`, and the latest price <= the highest price * (1 - `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. * BUY: `activationPrice` should be smaller than latest price. * SELL: `activationPrice` should be larger than latest price. * If `newOrderRespType` is sent as `RESULT`: * `MARKET` order: the final FILLED result of the order will be return directly. * `LIMIT` order with special `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be returned directly. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with `closePosition=true`: * Follow the same rules for condition orders. * If triggered,**close all** current long position(if `SELL`) or current short position(if `BUY`). * Cannot be used with `quantity` parameter * Cannot be used with `reduceOnly` parameter * In Hedge Mode, cannot be used with `BUY` orders in `LONG` position side. and cannot be used with `SELL` orders in `SHORT` position side Weight: 0 +Send in a new order. Weight(IP): 0 Security Type: TRADE Notes: - Additional mandatory parameters based on `type`: | Type | Additional mandatory parameters | | :---: | --- | | `LIMIT` | `timeInForce`, `quantity`, `price` | | `MARKET` | `quantity` | | `STOP/TAKE_PROFIT` | `quantity`, `price`, `stopPrice` | | `STOP_MARKET/TAKE_PROFIT_MARKET` | `stopPrice` | | `TRAILING_STOP_MARKET` | `callbackRate` | - Order with type `STOP`, parameter `timeInForce` can be sent ( default `GTC`). * Order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent ( default `GTC`). * Condition orders will be triggered when: - If parameter `priceProtect` is sent as true: - when price reaches the `stopPrice`,the difference rate between \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the symbol - \"triggerProtect\" of a symbol can be got from `GET /dapi/v1/exchangeInfo` - `STOP`, `STOP_MARKET`: - BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` - `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` - SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - `TRAILING_STOP_MARKET`: - BUY: the lowest price after order placed <= `activationPrice`, and the latest price >= the lowest price * (1 + `callbackRate`) - SELL: the highest price after order placed >= `activationPrice`, and the latest price <= the highest price * (1 - `callbackRate`) - For `TRAILING_STOP_MARKET`, if you got such error code. - BUY: `activationPrice` should be smaller than latest price. - SELL: `activationPrice` should be larger than latest price. - If `newOrderRespType` is sent as `RESULT`: - `MARKET` order: the final FILLED result of the order will be return directly. - `LIMIT` order with special `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be returned directly. - `STOP_MARKET`, `TAKE_PROFIT_MARKET` with `closePosition=true`: - Follow the same rules for condition orders. - If triggered,**close all** current long position(if `SELL`) or current short position(if `BUY`). - Cannot be used with `quantity` parameter - Cannot be used with `reduceOnly` parameter - In Hedge Mode, cannot be used with `BUY` orders in `LONG` position side. and cannot be used with `SELL` orders in `SHORT` position side ### Example ```java @@ -201,9 +201,9 @@ No authorization required # **positionInformation** > PositionInformationResponse positionInformation(positionInformationRequest) -Position Information(USER_DATA) +Position Information (USER_DATA) -Get current position information. * Please use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 5 +Get current position information. Weight(IP): 5 Security Type: USER_DATA Notes: - Please use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. ### Example ```java @@ -239,7 +239,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **positionInformationRequest** | [**PositionInformationRequest**](PositionInformationRequest.md)| | | +| **positionInformationRequest** | [**PositionInformationRequest**](PositionInformationRequest.md)| | [optional] | ### Return type @@ -265,7 +265,7 @@ No authorization required Query Order (USER_DATA) -Check an order's status. * These orders will not be found: * order status is `CANCELED` or `EXPIRED` **AND** order has NO filled trade **AND** created time + 3 days < current time * order create time + 90 days < current time * Either `orderId` or `origClientOrderId` must be sent. * `orderId` is self-increment for each specific `symbol` Weight: 1 +Check an order's status. * These orders will not be found: * order status is `CANCELED` or `EXPIRED` **AND** order has NO filled trade **AND** created time + 3 days < current time * order create time + 90 days < current time Weight(IP): 1 Security Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be sent. ### Example ```java diff --git a/clients/derivatives-trading-coin-futures/docs/Type.md b/clients/derivatives-trading-coin-futures/docs/Type.md deleted file mode 100644 index 1ae4395f9..000000000 --- a/clients/derivatives-trading-coin-futures/docs/Type.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# Type - -## Enum - - -* `LIMIT` (value: `"LIMIT"`) - -* `MARKET` (value: `"MARKET"`) - -* `STOP` (value: `"STOP"`) - -* `STOP_MARKET` (value: `"STOP_MARKET"`) - -* `TAKE_PROFIT` (value: `"TAKE_PROFIT"`) - -* `TAKE_PROFIT_MARKET` (value: `"TAKE_PROFIT_MARKET"`) - -* `TRAILING_STOP_MARKET` (value: `"TRAILING_STOP_MARKET"`) - - - diff --git a/clients/derivatives-trading-coin-futures/docs/UpdateSpeed.md b/clients/derivatives-trading-coin-futures/docs/UpdateSpeed.md new file mode 100644 index 000000000..2605774ce --- /dev/null +++ b/clients/derivatives-trading-coin-futures/docs/UpdateSpeed.md @@ -0,0 +1,13 @@ + + +# UpdateSpeed + +## Enum + + +* `UPDATE_SPEED_100ms` (value: `"100ms"`) + +* `UPDATE_SPEED_500ms` (value: `"500ms"`) + + + diff --git a/clients/derivatives-trading-coin-futures/docs/UserCommissionRateResponse.md b/clients/derivatives-trading-coin-futures/docs/UserCommissionRateResponse.md index 9e34492bc..194197cc6 100644 --- a/clients/derivatives-trading-coin-futures/docs/UserCommissionRateResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/UserCommissionRateResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**makerCommissionRate** | **String** | | [optional] | -|**takerCommissionRate** | **String** | | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**makerCommissionRate** | **String** | 0.015% | [optional] | +|**takerCommissionRate** | **String** | Taker commission rate. | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/UserDataStreamEventsResponse.md b/clients/derivatives-trading-coin-futures/docs/UserDataStreamEventsResponse.md index ec1133582..f50c5f714 100644 --- a/clients/derivatives-trading-coin-futures/docs/UserDataStreamEventsResponse.md +++ b/clients/derivatives-trading-coin-futures/docs/UserDataStreamEventsResponse.md @@ -7,17 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction Time | [optional] | |**ac** | [**AccountConfigUpdateAc**](AccountConfigUpdateAc.md) | | [optional] | -|**iLowerCase** | **String** | | [optional] | +|**iLowerCase** | **String** | Account Alias | [optional] | |**aLowerCase** | [**AccountUpdateA**](AccountUpdateA.md) | | [optional] | |**gu** | [**GridUpdateGu**](GridUpdateGu.md) | | [optional] | -|**cw** | **String** | | [optional] | -|**pLowerCase** | [**List<MarginCallPInner>**](MarginCallPInner.md) | | [optional] | +|**listenKey** | **String** | | [optional] | +|**cw** | **String** | Cross Wallet Balance. Only pushed with crossed position margin call | [optional] | +|**pLowerCase** | [**List<MarginCallPInner>**](MarginCallPInner.md) | Position(s) of Margin Call | [optional] | |**oLowerCase** | [**OrderTradeUpdateO**](OrderTradeUpdateO.md) | | [optional] | |**su** | [**StrategyUpdateSu**](StrategyUpdateSu.md) | | [optional] | -|**listenKey** | **String** | | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/UserDataStreamsApi.md b/clients/derivatives-trading-coin-futures/docs/UserDataStreamsApi.md index 023e9cd5a..1b1601ec7 100644 --- a/clients/derivatives-trading-coin-futures/docs/UserDataStreamsApi.md +++ b/clients/derivatives-trading-coin-futures/docs/UserDataStreamsApi.md @@ -15,7 +15,7 @@ All URIs are relative to *http://localhost* Close User Data Stream (USER_STREAM) -Close out a user data stream. Weight: 1 +Close out a user data stream. Weight(IP): 1 Security Type: USER_STREAM ### Example ```java @@ -51,7 +51,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **closeUserDataStreamRequest** | [**CloseUserDataStreamRequest**](CloseUserDataStreamRequest.md)| | | +| **closeUserDataStreamRequest** | [**CloseUserDataStreamRequest**](CloseUserDataStreamRequest.md)| | [optional] | ### Return type @@ -77,7 +77,7 @@ No authorization required Keepalive User Data Stream (USER_STREAM) -Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 60 minutes. Weight: 1 +Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 60 minutes. Weight(IP): 1 Security Type: USER_STREAM ### Example ```java @@ -113,7 +113,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **keepaliveUserDataStreamRequest** | [**KeepaliveUserDataStreamRequest**](KeepaliveUserDataStreamRequest.md)| | | +| **keepaliveUserDataStreamRequest** | [**KeepaliveUserDataStreamRequest**](KeepaliveUserDataStreamRequest.md)| | [optional] | ### Return type @@ -139,7 +139,7 @@ No authorization required Start User Data Stream (USER_STREAM) -Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 1 +Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight(IP): 1 Security Type: USER_STREAM ### Example ```java @@ -175,7 +175,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **startUserDataStreamRequest** | [**StartUserDataStreamRequest**](StartUserDataStreamRequest.md)| | | +| **startUserDataStreamRequest** | [**StartUserDataStreamRequest**](StartUserDataStreamRequest.md)| | [optional] | ### Return type diff --git a/clients/derivatives-trading-coin-futures/docs/UsersForceOrdersResponseInner.md b/clients/derivatives-trading-coin-futures/docs/UsersForceOrdersResponseInner.md index 9fe39fb66..0eb20f000 100644 --- a/clients/derivatives-trading-coin-futures/docs/UsersForceOrdersResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/UsersForceOrdersResponseInner.md @@ -7,28 +7,28 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cumBase** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**closePosition** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**origType** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**orderId** | **Long** | Sub-order ID | [optional] | +|**symbol** | **String** | Trading symbol | [optional] | +|**pair** | **String** | Pair | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**clientOrderId** | **String** | Client order ID. | [optional] | +|**price** | **String** | Latest token price. | [optional] | +|**avgPrice** | **String** | Average execution price | [optional] | +|**origQty** | **String** | Original order quantity | [optional] | +|**executedQty** | **String** | Executed quantity | [optional] | +|**cumBase** | **String** | Cumulative base asset amount. | [optional] | +|**timeInForce** | **String** | Time in force | [optional] | +|**type** | **String** | Order type. | [optional] | +|**reduceOnly** | **Boolean** | Whether the order is reduce-only. | [optional] | +|**closePosition** | **Boolean** | if Close-All | [optional] | +|**side** | **String** | Trading side | [optional] | +|**positionSide** | **String** | Position side | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**workingType** | **String** | Stop trigger price type. | [optional] | +|**priceProtect** | **Boolean** | if conditional order trigger is protected | [optional] | +|**origType** | **String** | Original order type. | [optional] | +|**time** | **Long** | Time | [optional] | +|**updateTime** | **Long** | update time | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/WebsocketMarketStreamsApi.md b/clients/derivatives-trading-coin-futures/docs/WebsocketMarketStreamsApi.md deleted file mode 100644 index fa6a74f39..000000000 --- a/clients/derivatives-trading-coin-futures/docs/WebsocketMarketStreamsApi.md +++ /dev/null @@ -1,1205 +0,0 @@ -# WebsocketMarketStreamsApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**aggregateTradeStreams**](WebsocketMarketStreamsApi.md#aggregateTradeStreams) | **POST** /<symbol>@aggTrade | Aggregate Trade Streams | -| [**allBookTickersStream**](WebsocketMarketStreamsApi.md#allBookTickersStream) | **POST** /!bookTicker | All Book Tickers Stream | -| [**allMarketLiquidationOrderStreams**](WebsocketMarketStreamsApi.md#allMarketLiquidationOrderStreams) | **POST** /!forceOrder@arr | All Market Liquidation Order Streams | -| [**allMarketMiniTickersStream**](WebsocketMarketStreamsApi.md#allMarketMiniTickersStream) | **POST** /!miniTicker@arr | All Market Mini Tickers Stream | -| [**allMarketTickersStreams**](WebsocketMarketStreamsApi.md#allMarketTickersStreams) | **POST** /!ticker@arr | All Market Tickers Streams | -| [**continuousContractKlineCandlestickStreams**](WebsocketMarketStreamsApi.md#continuousContractKlineCandlestickStreams) | **POST** /<pair>_<contractType>@continuousKline_<interval> | Continuous Contract Kline/Candlestick Streams | -| [**contractInfoStream**](WebsocketMarketStreamsApi.md#contractInfoStream) | **POST** /!contractInfo | Contract Info Stream | -| [**diffBookDepthStreams**](WebsocketMarketStreamsApi.md#diffBookDepthStreams) | **POST** /<symbol>@depth@<updateSpeed> | Diff. Book Depth Streams | -| [**indexKlineCandlestickStreams**](WebsocketMarketStreamsApi.md#indexKlineCandlestickStreams) | **POST** /<pair>@indexPriceKline_<interval> | Index Kline/Candlestick Streams | -| [**indexPriceStream**](WebsocketMarketStreamsApi.md#indexPriceStream) | **POST** /<pair>@indexPrice@<updateSpeed> | Index Price Stream | -| [**individualSymbolBookTickerStreams**](WebsocketMarketStreamsApi.md#individualSymbolBookTickerStreams) | **POST** /<symbol>@bookTicker | Individual Symbol Book Ticker Streams | -| [**individualSymbolMiniTickerStream**](WebsocketMarketStreamsApi.md#individualSymbolMiniTickerStream) | **POST** /<symbol>@miniTicker | Individual Symbol Mini Ticker Stream | -| [**individualSymbolTickerStreams**](WebsocketMarketStreamsApi.md#individualSymbolTickerStreams) | **POST** /<symbol>@ticker | Individual Symbol Ticker Streams | -| [**klineCandlestickStreams**](WebsocketMarketStreamsApi.md#klineCandlestickStreams) | **POST** /<symbol>@kline_<interval> | Kline/Candlestick Streams | -| [**liquidationOrderStreams**](WebsocketMarketStreamsApi.md#liquidationOrderStreams) | **POST** /<symbol>@forceOrder | Liquidation Order Streams | -| [**markPriceKlineCandlestickStreams**](WebsocketMarketStreamsApi.md#markPriceKlineCandlestickStreams) | **POST** /<symbol>@markPriceKline_<interval> | Mark Price Kline/Candlestick Streams | -| [**markPriceOfAllSymbolsOfAPair**](WebsocketMarketStreamsApi.md#markPriceOfAllSymbolsOfAPair) | **POST** /<pair>@markPrice@<updateSpeed> | Mark Price of All Symbols of a Pair | -| [**markPriceStream**](WebsocketMarketStreamsApi.md#markPriceStream) | **POST** /<symbol>@markPrice@<updateSpeed> | Mark Price Stream | -| [**partialBookDepthStreams**](WebsocketMarketStreamsApi.md#partialBookDepthStreams) | **POST** /<symbol>@depth<levels>@<updateSpeed> | Partial Book Depth Streams | - - - -# **aggregateTradeStreams** -> AggregateTradeStreamsResponse aggregateTradeStreams(aggregateTradeStreamsRequest) - -Aggregate Trade Streams - -The Aggregate Trade Streams push market trade information that is aggregated for fills with same price and taking side every 100 milliseconds. Update Speed: 100ms - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - AggregateTradeStreamsRequest aggregateTradeStreamsRequest = new AggregateTradeStreamsRequest(); // AggregateTradeStreamsRequest | - try { - AggregateTradeStreamsResponse result = apiInstance.aggregateTradeStreams(aggregateTradeStreamsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#aggregateTradeStreams"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **aggregateTradeStreamsRequest** | [**AggregateTradeStreamsRequest**](AggregateTradeStreamsRequest.md)| | | - -### Return type - -[**AggregateTradeStreamsResponse**](AggregateTradeStreamsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Aggregate Trade Streams | - | - - -# **allBookTickersStream** -> AllBookTickersStreamResponse allBookTickersStream(allBookTickersStreamRequest) - -All Book Tickers Stream - -Pushes any update to the best bid or ask's price or quantity in real-time for all symbols. Update Speed: Real-time - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - AllBookTickersStreamRequest allBookTickersStreamRequest = new AllBookTickersStreamRequest(); // AllBookTickersStreamRequest | - try { - AllBookTickersStreamResponse result = apiInstance.allBookTickersStream(allBookTickersStreamRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#allBookTickersStream"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **allBookTickersStreamRequest** | [**AllBookTickersStreamRequest**](AllBookTickersStreamRequest.md)| | | - -### Return type - -[**AllBookTickersStreamResponse**](AllBookTickersStreamResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | All Book Tickers Stream | - | - - -# **allMarketLiquidationOrderStreams** -> AllMarketLiquidationOrderStreamsResponse allMarketLiquidationOrderStreams(allMarketLiquidationOrderStreamsRequest) - -All Market Liquidation Order Streams - -The All Liquidation Order Snapshot Streams push force liquidation order information for all symbols in the market. For each symbol,only the latest one liquidation order within 1000ms will be pushed as the snapshot. If no liquidation happens in the interval of 1000ms, no stream will be pushed. Update Speed: 1000ms - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - AllMarketLiquidationOrderStreamsRequest allMarketLiquidationOrderStreamsRequest = new AllMarketLiquidationOrderStreamsRequest(); // AllMarketLiquidationOrderStreamsRequest | - try { - AllMarketLiquidationOrderStreamsResponse result = apiInstance.allMarketLiquidationOrderStreams(allMarketLiquidationOrderStreamsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#allMarketLiquidationOrderStreams"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **allMarketLiquidationOrderStreamsRequest** | [**AllMarketLiquidationOrderStreamsRequest**](AllMarketLiquidationOrderStreamsRequest.md)| | | - -### Return type - -[**AllMarketLiquidationOrderStreamsResponse**](AllMarketLiquidationOrderStreamsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | All Market Liquidation Order Streams | - | - - -# **allMarketMiniTickersStream** -> AllMarketMiniTickersStreamResponse allMarketMiniTickersStream(allMarketMiniTickersStreamRequest) - -All Market Mini Tickers Stream - -24hr rolling window mini-ticker statistics for all symbols. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Note that only tickers that have changed will be present in the array. Update Speed: 1000ms - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - AllMarketMiniTickersStreamRequest allMarketMiniTickersStreamRequest = new AllMarketMiniTickersStreamRequest(); // AllMarketMiniTickersStreamRequest | - try { - AllMarketMiniTickersStreamResponse result = apiInstance.allMarketMiniTickersStream(allMarketMiniTickersStreamRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#allMarketMiniTickersStream"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **allMarketMiniTickersStreamRequest** | [**AllMarketMiniTickersStreamRequest**](AllMarketMiniTickersStreamRequest.md)| | | - -### Return type - -[**AllMarketMiniTickersStreamResponse**](AllMarketMiniTickersStreamResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | All Market Mini Tickers Stream | - | - - -# **allMarketTickersStreams** -> AllMarketTickersStreamsResponse allMarketTickersStreams(allMarketTickersStreamsRequest) - -All Market Tickers Streams - -24hr rolling window ticker statistics for all symbols. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Note that only tickers that have changed will be present in the array. Update Speed: 1000ms - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - AllMarketTickersStreamsRequest allMarketTickersStreamsRequest = new AllMarketTickersStreamsRequest(); // AllMarketTickersStreamsRequest | - try { - AllMarketTickersStreamsResponse result = apiInstance.allMarketTickersStreams(allMarketTickersStreamsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#allMarketTickersStreams"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **allMarketTickersStreamsRequest** | [**AllMarketTickersStreamsRequest**](AllMarketTickersStreamsRequest.md)| | | - -### Return type - -[**AllMarketTickersStreamsResponse**](AllMarketTickersStreamsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | All Market Tickers Streams | - | - - -# **continuousContractKlineCandlestickStreams** -> ContinuousContractKlineCandlestickStreamsResponse continuousContractKlineCandlestickStreams(continuousContractKlineCandlestickStreamsRequest) - -Continuous Contract Kline/Candlestick Streams - -Kline update every second Update Speed: 250ms - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - ContinuousContractKlineCandlestickStreamsRequest continuousContractKlineCandlestickStreamsRequest = new ContinuousContractKlineCandlestickStreamsRequest(); // ContinuousContractKlineCandlestickStreamsRequest | - try { - ContinuousContractKlineCandlestickStreamsResponse result = apiInstance.continuousContractKlineCandlestickStreams(continuousContractKlineCandlestickStreamsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#continuousContractKlineCandlestickStreams"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **continuousContractKlineCandlestickStreamsRequest** | [**ContinuousContractKlineCandlestickStreamsRequest**](ContinuousContractKlineCandlestickStreamsRequest.md)| | | - -### Return type - -[**ContinuousContractKlineCandlestickStreamsResponse**](ContinuousContractKlineCandlestickStreamsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Continuous Contract Kline/Candlestick Streams | - | - - -# **contractInfoStream** -> ContractInfoStreamResponse contractInfoStream(contractInfoStreamRequest) - -Contract Info Stream - -ContractInfo stream pushes when contract info updates(listing/settlement/contract bracket update). `bks` field only shows up when bracket gets updated. Update Speed: Real-time - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - ContractInfoStreamRequest contractInfoStreamRequest = new ContractInfoStreamRequest(); // ContractInfoStreamRequest | - try { - ContractInfoStreamResponse result = apiInstance.contractInfoStream(contractInfoStreamRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#contractInfoStream"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **contractInfoStreamRequest** | [**ContractInfoStreamRequest**](ContractInfoStreamRequest.md)| | | - -### Return type - -[**ContractInfoStreamResponse**](ContractInfoStreamResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Contract Info Stream | - | - - -# **diffBookDepthStreams** -> DiffBookDepthStreamsResponse diffBookDepthStreams(diffBookDepthStreamsRequest) - -Diff. Book Depth Streams - -Bids and asks, pushed every 250 milliseconds, 500 milliseconds, or 100 milliseconds Update Speed: 250ms or 500ms or 100ms - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - DiffBookDepthStreamsRequest diffBookDepthStreamsRequest = new DiffBookDepthStreamsRequest(); // DiffBookDepthStreamsRequest | - try { - DiffBookDepthStreamsResponse result = apiInstance.diffBookDepthStreams(diffBookDepthStreamsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#diffBookDepthStreams"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **diffBookDepthStreamsRequest** | [**DiffBookDepthStreamsRequest**](DiffBookDepthStreamsRequest.md)| | | - -### Return type - -[**DiffBookDepthStreamsResponse**](DiffBookDepthStreamsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Diff. Book Depth Streams | - | - - -# **indexKlineCandlestickStreams** -> IndexKlineCandlestickStreamsResponse indexKlineCandlestickStreams(indexKlineCandlestickStreamsRequest) - -Index Kline/Candlestick Streams - -Index Kline/Candlestick Streams Update Speed: 250ms - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - IndexKlineCandlestickStreamsRequest indexKlineCandlestickStreamsRequest = new IndexKlineCandlestickStreamsRequest(); // IndexKlineCandlestickStreamsRequest | - try { - IndexKlineCandlestickStreamsResponse result = apiInstance.indexKlineCandlestickStreams(indexKlineCandlestickStreamsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#indexKlineCandlestickStreams"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **indexKlineCandlestickStreamsRequest** | [**IndexKlineCandlestickStreamsRequest**](IndexKlineCandlestickStreamsRequest.md)| | | - -### Return type - -[**IndexKlineCandlestickStreamsResponse**](IndexKlineCandlestickStreamsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Index Kline/Candlestick Streams | - | - - -# **indexPriceStream** -> IndexPriceStreamResponse indexPriceStream(indexPriceStreamRequest) - -Index Price Stream - -Index Price Stream Update Speed: 3000ms OR 1000ms - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - IndexPriceStreamRequest indexPriceStreamRequest = new IndexPriceStreamRequest(); // IndexPriceStreamRequest | - try { - IndexPriceStreamResponse result = apiInstance.indexPriceStream(indexPriceStreamRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#indexPriceStream"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **indexPriceStreamRequest** | [**IndexPriceStreamRequest**](IndexPriceStreamRequest.md)| | | - -### Return type - -[**IndexPriceStreamResponse**](IndexPriceStreamResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Index Price Stream | - | - - -# **individualSymbolBookTickerStreams** -> IndividualSymbolBookTickerStreamsResponse individualSymbolBookTickerStreams(individualSymbolBookTickerStreamsRequest) - -Individual Symbol Book Ticker Streams - -Pushes any update to the best bid or ask's price or quantity in real-time for a specified symbol. Update Speed: Real-time - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - IndividualSymbolBookTickerStreamsRequest individualSymbolBookTickerStreamsRequest = new IndividualSymbolBookTickerStreamsRequest(); // IndividualSymbolBookTickerStreamsRequest | - try { - IndividualSymbolBookTickerStreamsResponse result = apiInstance.individualSymbolBookTickerStreams(individualSymbolBookTickerStreamsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#individualSymbolBookTickerStreams"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **individualSymbolBookTickerStreamsRequest** | [**IndividualSymbolBookTickerStreamsRequest**](IndividualSymbolBookTickerStreamsRequest.md)| | | - -### Return type - -[**IndividualSymbolBookTickerStreamsResponse**](IndividualSymbolBookTickerStreamsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Individual Symbol Book Ticker Streams | - | - - -# **individualSymbolMiniTickerStream** -> IndividualSymbolMiniTickerStreamResponse individualSymbolMiniTickerStream(individualSymbolMiniTickerStreamRequest) - -Individual Symbol Mini Ticker Stream - -24hr rolling window mini-ticker statistics for a single symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Update Speed: 500ms - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - IndividualSymbolMiniTickerStreamRequest individualSymbolMiniTickerStreamRequest = new IndividualSymbolMiniTickerStreamRequest(); // IndividualSymbolMiniTickerStreamRequest | - try { - IndividualSymbolMiniTickerStreamResponse result = apiInstance.individualSymbolMiniTickerStream(individualSymbolMiniTickerStreamRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#individualSymbolMiniTickerStream"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **individualSymbolMiniTickerStreamRequest** | [**IndividualSymbolMiniTickerStreamRequest**](IndividualSymbolMiniTickerStreamRequest.md)| | | - -### Return type - -[**IndividualSymbolMiniTickerStreamResponse**](IndividualSymbolMiniTickerStreamResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Individual Symbol Mini Ticker Stream | - | - - -# **individualSymbolTickerStreams** -> IndividualSymbolTickerStreamsResponse individualSymbolTickerStreams(individualSymbolTickerStreamsRequest) - -Individual Symbol Ticker Streams - -24hr rolling window ticker statistics for a single symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Update Speed: 500ms - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - IndividualSymbolTickerStreamsRequest individualSymbolTickerStreamsRequest = new IndividualSymbolTickerStreamsRequest(); // IndividualSymbolTickerStreamsRequest | - try { - IndividualSymbolTickerStreamsResponse result = apiInstance.individualSymbolTickerStreams(individualSymbolTickerStreamsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#individualSymbolTickerStreams"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **individualSymbolTickerStreamsRequest** | [**IndividualSymbolTickerStreamsRequest**](IndividualSymbolTickerStreamsRequest.md)| | | - -### Return type - -[**IndividualSymbolTickerStreamsResponse**](IndividualSymbolTickerStreamsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Individual Symbol Ticker Streams | - | - - -# **klineCandlestickStreams** -> KlineCandlestickStreamsResponse klineCandlestickStreams(klineCandlestickStreamsRequest) - -Kline/Candlestick Streams - -The Kline/Candlestick Stream push updates to the current klines/candlestick every 250 milliseconds (if existing). Update Speed: 250ms - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - KlineCandlestickStreamsRequest klineCandlestickStreamsRequest = new KlineCandlestickStreamsRequest(); // KlineCandlestickStreamsRequest | - try { - KlineCandlestickStreamsResponse result = apiInstance.klineCandlestickStreams(klineCandlestickStreamsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#klineCandlestickStreams"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **klineCandlestickStreamsRequest** | [**KlineCandlestickStreamsRequest**](KlineCandlestickStreamsRequest.md)| | | - -### Return type - -[**KlineCandlestickStreamsResponse**](KlineCandlestickStreamsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Kline/Candlestick Streams | - | - - -# **liquidationOrderStreams** -> LiquidationOrderStreamsResponse liquidationOrderStreams(liquidationOrderStreamsRequest) - -Liquidation Order Streams - -The Liquidation Order Snapshot Streams push force liquidation order information for specific symbol. For each symbol,only the latest one liquidation order within 1000ms will be pushed as the snapshot. If no liquidation happens in the interval of 1000ms, no stream will be pushed. Update Speed: 1000ms - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - LiquidationOrderStreamsRequest liquidationOrderStreamsRequest = new LiquidationOrderStreamsRequest(); // LiquidationOrderStreamsRequest | - try { - LiquidationOrderStreamsResponse result = apiInstance.liquidationOrderStreams(liquidationOrderStreamsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#liquidationOrderStreams"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **liquidationOrderStreamsRequest** | [**LiquidationOrderStreamsRequest**](LiquidationOrderStreamsRequest.md)| | | - -### Return type - -[**LiquidationOrderStreamsResponse**](LiquidationOrderStreamsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Liquidation Order Streams | - | - - -# **markPriceKlineCandlestickStreams** -> MarkPriceKlineCandlestickStreamsResponse markPriceKlineCandlestickStreams(markPriceKlineCandlestickStreamsRequest) - -Mark Price Kline/Candlestick Streams - -Mark Price Kline/Candlestick Streams Update Speed: 250ms - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - MarkPriceKlineCandlestickStreamsRequest markPriceKlineCandlestickStreamsRequest = new MarkPriceKlineCandlestickStreamsRequest(); // MarkPriceKlineCandlestickStreamsRequest | - try { - MarkPriceKlineCandlestickStreamsResponse result = apiInstance.markPriceKlineCandlestickStreams(markPriceKlineCandlestickStreamsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#markPriceKlineCandlestickStreams"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **markPriceKlineCandlestickStreamsRequest** | [**MarkPriceKlineCandlestickStreamsRequest**](MarkPriceKlineCandlestickStreamsRequest.md)| | | - -### Return type - -[**MarkPriceKlineCandlestickStreamsResponse**](MarkPriceKlineCandlestickStreamsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Mark Price Kline/Candlestick Streams | - | - - -# **markPriceOfAllSymbolsOfAPair** -> MarkPriceOfAllSymbolsOfAPairResponse markPriceOfAllSymbolsOfAPair(markPriceOfAllSymbolsOfAPairRequest) - -Mark Price of All Symbols of a Pair - -Mark Price of All Symbols of a Pair Update Speed: 3000ms OR 1000ms - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - MarkPriceOfAllSymbolsOfAPairRequest markPriceOfAllSymbolsOfAPairRequest = new MarkPriceOfAllSymbolsOfAPairRequest(); // MarkPriceOfAllSymbolsOfAPairRequest | - try { - MarkPriceOfAllSymbolsOfAPairResponse result = apiInstance.markPriceOfAllSymbolsOfAPair(markPriceOfAllSymbolsOfAPairRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#markPriceOfAllSymbolsOfAPair"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **markPriceOfAllSymbolsOfAPairRequest** | [**MarkPriceOfAllSymbolsOfAPairRequest**](MarkPriceOfAllSymbolsOfAPairRequest.md)| | | - -### Return type - -[**MarkPriceOfAllSymbolsOfAPairResponse**](MarkPriceOfAllSymbolsOfAPairResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Mark Price of All Symbols of a Pair | - | - - -# **markPriceStream** -> MarkPriceStreamResponse markPriceStream(markPriceStreamRequest) - -Mark Price Stream - -Mark price update stream Update Speed: 3000ms OR 1000ms - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - MarkPriceStreamRequest markPriceStreamRequest = new MarkPriceStreamRequest(); // MarkPriceStreamRequest | - try { - MarkPriceStreamResponse result = apiInstance.markPriceStream(markPriceStreamRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#markPriceStream"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **markPriceStreamRequest** | [**MarkPriceStreamRequest**](MarkPriceStreamRequest.md)| | | - -### Return type - -[**MarkPriceStreamResponse**](MarkPriceStreamResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Mark Price Stream | - | - - -# **partialBookDepthStreams** -> PartialBookDepthStreamsResponse partialBookDepthStreams(partialBookDepthStreamsRequest) - -Partial Book Depth Streams - -Top **<levels\\>** bids and asks, Valid **<levels\\>** are 5, 10, or 20. Update Speed: 250ms, 500ms or 100ms - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_coin_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_coin_futures.ApiException; -import com.binance.connector.client.derivatives_trading_coin_futures.Configuration; -import com.binance.connector.client.derivatives_trading_coin_futures.models.*; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.WebsocketMarketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebsocketMarketStreamsApi apiInstance = new WebsocketMarketStreamsApi(defaultClient); - PartialBookDepthStreamsRequest partialBookDepthStreamsRequest = new PartialBookDepthStreamsRequest(); // PartialBookDepthStreamsRequest | - try { - PartialBookDepthStreamsResponse result = apiInstance.partialBookDepthStreams(partialBookDepthStreamsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebsocketMarketStreamsApi#partialBookDepthStreams"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **partialBookDepthStreamsRequest** | [**PartialBookDepthStreamsRequest**](PartialBookDepthStreamsRequest.md)| | | - -### Return type - -[**PartialBookDepthStreamsResponse**](PartialBookDepthStreamsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Partial Book Depth Streams | - | - diff --git a/clients/derivatives-trading-coin-futures/docs/rest-api/migration-guide.md b/clients/derivatives-trading-coin-futures/docs/rest-api/migration-guide.md index f68bb4b70..d4172f336 100644 --- a/clients/derivatives-trading-coin-futures/docs/rest-api/migration-guide.md +++ b/clients/derivatives-trading-coin-futures/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-derivatives-trading-coin-futures - 7.1.1 + 8.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-derivatives-trading-coin-futures - 7.1.1 + 8.0.0 ``` diff --git a/clients/derivatives-trading-coin-futures/example_rest.md b/clients/derivatives-trading-coin-futures/example_rest.md index 232f2b3bd..e5a4d1e9f 100644 --- a/clients/derivatives-trading-coin-futures/example_rest.md +++ b/clients/derivatives-trading-coin-futures/example_rest.md @@ -1,140 +1,136 @@ ## Account -[GET /dapi/v1/account](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Account-Information) - accountInformation - [AccountInformationExample.java:50](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/AccountInformationExample.java#L50) +[GET /dapi/v1/account](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#account-information) - accountInformation - [AccountInformationExample.java:39](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/AccountInformationExample.java#L39) -[GET /dapi/v1/balance](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Futures-Account-Balance) - futuresAccountBalance - [FuturesAccountBalanceExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/FuturesAccountBalanceExample.java#L47) +[GET /dapi/v1/balance](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#futures-account-balance) - futuresAccountBalance - [FuturesAccountBalanceExample.java:36](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/FuturesAccountBalanceExample.java#L36) -[GET /dapi/v1/positionSide/dual](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Get-Current-Position-Mode) - getCurrentPositionMode - [GetCurrentPositionModeExample.java:48](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetCurrentPositionModeExample.java#L48) +[GET /dapi/v1/positionSide/dual](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-current-position-mode) - getCurrentPositionMode - [GetCurrentPositionModeExample.java:37](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetCurrentPositionModeExample.java#L37) -[GET /dapi/v1/order/asyn](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Order-History) - getDownloadIdForFuturesOrderHistory - [GetDownloadIdForFuturesOrderHistoryExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesOrderHistoryExample.java#L49) +[GET /dapi/v1/order/asyn](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-download-id-for-futures-order-history) - getDownloadIdForFuturesOrderHistory - [GetDownloadIdForFuturesOrderHistoryExample.java:40](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesOrderHistoryExample.java#L40) -[GET /dapi/v1/trade/asyn](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Trade-History) - getDownloadIdForFuturesTradeHistory - [GetDownloadIdForFuturesTradeHistoryExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesTradeHistoryExample.java#L49) +[GET /dapi/v1/trade/asyn](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-download-id-for-futures-trade-history) - getDownloadIdForFuturesTradeHistory - [GetDownloadIdForFuturesTradeHistoryExample.java:40](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesTradeHistoryExample.java#L40) -[GET /dapi/v1/income/asyn](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Transaction-History) - getDownloadIdForFuturesTransactionHistory - [GetDownloadIdForFuturesTransactionHistoryExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesTransactionHistoryExample.java#L49) +[GET /dapi/v1/income/asyn](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-download-id-for-futures-transaction-history) - getDownloadIdForFuturesTransactionHistory - [GetDownloadIdForFuturesTransactionHistoryExample.java:40](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesTransactionHistoryExample.java#L40) -[GET /dapi/v1/order/asyn/id](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Get-Futures-Order-History-Download-Link-by-Id) - getFuturesOrderHistoryDownloadLinkById - [GetFuturesOrderHistoryDownloadLinkByIdExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesOrderHistoryDownloadLinkByIdExample.java#L47) +[GET /dapi/v1/order/asyn/id](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-futures-order-history-download-link-by-id) - getFuturesOrderHistoryDownloadLinkById - [GetFuturesOrderHistoryDownloadLinkByIdExample.java:37](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesOrderHistoryDownloadLinkByIdExample.java#L37) -[GET /dapi/v1/trade/asyn/id](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Get-Futures-Trade-Download-Link-by-Id) - getFuturesTradeDownloadLinkById - [GetFuturesTradeDownloadLinkByIdExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesTradeDownloadLinkByIdExample.java#L47) +[GET /dapi/v1/trade/asyn/id](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-futures-trade-download-link-by-id) - getFuturesTradeDownloadLinkById - [GetFuturesTradeDownloadLinkByIdExample.java:37](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesTradeDownloadLinkByIdExample.java#L37) -[GET /dapi/v1/income/asyn/id](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Get-Futures-Transaction-History-Download-Link-by-Id) - getFuturesTransactionHistoryDownloadLinkById - [GetFuturesTransactionHistoryDownloadLinkByIdExample.java:48](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesTransactionHistoryDownloadLinkByIdExample.java#L48) +[GET /dapi/v1/income/asyn/id](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-futures-transaction-history-download-link-by-id) - getFuturesTransactionHistoryDownloadLinkById - [GetFuturesTransactionHistoryDownloadLinkByIdExample.java:37](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesTransactionHistoryDownloadLinkByIdExample.java#L37) -[GET /dapi/v1/income](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Get-Income-History) - getIncomeHistory - [GetIncomeHistoryExample.java:50](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetIncomeHistoryExample.java#L50) +[GET /dapi/v1/income](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-income-history) - getIncomeHistory - [GetIncomeHistoryExample.java:40](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetIncomeHistoryExample.java#L40) -[GET /dapi/v1/leverageBracket](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Notional-Bracket-for-Pair) - notionalBracketForPair - [NotionalBracketForPairExample.java:51](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/NotionalBracketForPairExample.java#L51) +[GET /dapi/v1/leverageBracket](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#notional-bracket-for-pair) - notionalBracketForPair - [NotionalBracketForPairExample.java:40](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/NotionalBracketForPairExample.java#L40) -[GET /dapi/v2/leverageBracket](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Notional-Bracket-for-Symbol) - notionalBracketForSymbol - [NotionalBracketForSymbolExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/NotionalBracketForSymbolExample.java#L47) +[GET /dapi/v2/leverageBracket](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#notional-bracket-for-symbol) - notionalBracketForSymbol - [NotionalBracketForSymbolExample.java:37](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/NotionalBracketForSymbolExample.java#L37) -[GET /dapi/v1/commissionRate](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/User-Commission-Rate) - userCommissionRate - [UserCommissionRateExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/UserCommissionRateExample.java#L47) +[GET /dapi/v1/commissionRate](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#user-commission-rate) - userCommissionRate - [UserCommissionRateExample.java:36](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/UserCommissionRateExample.java#L36) ## MarketData -[GET /futures/data/basis](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Basis) - basis - [BasisExample.java:50](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/BasisExample.java#L50) +[GET /futures/data/basis](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#basis) - basis - [BasisExample.java:39](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/BasisExample.java#L39) -[GET /dapi/v1/time](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Check-Server-time) - checkServerTime - [CheckServerTimeExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/CheckServerTimeExample.java#L47) +[GET /dapi/v1/time](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#check-server-time) - checkServerTime - [CheckServerTimeExample.java:36](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/CheckServerTimeExample.java#L36) -[GET /dapi/v1/aggTrades](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List) - compressedAggregateTradesList - [CompressedAggregateTradesListExample.java:56](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/CompressedAggregateTradesListExample.java#L56) +[GET /dapi/v1/aggTrades](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#compressed-aggregate-trades-list) - compressedAggregateTradesList - [CompressedAggregateTradesListExample.java:45](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/CompressedAggregateTradesListExample.java#L45) -[GET /dapi/v1/continuousKlines](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data) - continuousContractKlineCandlestickData - [ContinuousContractKlineCandlestickDataExample.java:59](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/ContinuousContractKlineCandlestickDataExample.java#L59) +[GET /dapi/v1/continuousKlines](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#continuous-contract-kline-candlestick-data) - continuousContractKlineCandlestickData - [ContinuousContractKlineCandlestickDataExample.java:48](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/ContinuousContractKlineCandlestickDataExample.java#L48) -[GET /dapi/v1/exchangeInfo](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Exchange-Information) - exchangeInformation - [ExchangeInformationExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/ExchangeInformationExample.java#L47) +[GET /dapi/v1/exchangeInfo](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#exchange-information) - exchangeInformation - [ExchangeInformationExample.java:36](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/ExchangeInformationExample.java#L36) -[GET /dapi/v1/fundingRate](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Rate-History-of-Perpetual-Futures) - getFundingRateHistoryOfPerpetualFutures - [GetFundingRateHistoryOfPerpetualFuturesExample.java:48](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/GetFundingRateHistoryOfPerpetualFuturesExample.java#L48) +[GET /dapi/v1/fundingRate](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#get-funding-rate-history-of-perpetual-futures) - getFundingRateHistoryOfPerpetualFutures - [GetFundingRateHistoryOfPerpetualFuturesExample.java:37](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/GetFundingRateHistoryOfPerpetualFuturesExample.java#L37) -[GET /dapi/v1/fundingInfo](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Info) - getFundingRateInfo - [GetFundingRateInfoExample.java:48](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/GetFundingRateInfoExample.java#L48) +[GET /dapi/v1/fundingInfo](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#get-funding-rate-info) - getFundingRateInfo - [GetFundingRateInfoExample.java:37](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/GetFundingRateInfoExample.java#L37) -[GET /dapi/v1/premiumIndex](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-and-Mark-Price) - indexPriceAndMarkPrice - [IndexPriceAndMarkPriceExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/IndexPriceAndMarkPriceExample.java#L47) +[GET /dapi/v1/premiumIndex](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#index-price-and-mark-price) - indexPriceAndMarkPrice - [IndexPriceAndMarkPriceExample.java:36](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/IndexPriceAndMarkPriceExample.java#L36) -[GET /dapi/v1/indexPriceKlines](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data) - indexPriceKlineCandlestickData - [IndexPriceKlineCandlestickDataExample.java:58](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/IndexPriceKlineCandlestickDataExample.java#L58) +[GET /dapi/v1/indexPriceKlines](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#index-price-kline-candlestick-data) - indexPriceKlineCandlestickData - [IndexPriceKlineCandlestickDataExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/IndexPriceKlineCandlestickDataExample.java#L47) -[GET /dapi/v1/klines](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Kline-Candlestick-Data) - klineCandlestickData - [KlineCandlestickDataExample.java:57](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/KlineCandlestickDataExample.java#L57) +[GET /dapi/v1/klines](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#kline-candlestick-data) - klineCandlestickData - [KlineCandlestickDataExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/KlineCandlestickDataExample.java#L47) -[GET /futures/data/globalLongShortAccountRatio](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Long-Short-Ratio) - longShortRatio - [LongShortRatioExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/LongShortRatioExample.java#L49) +[GET /futures/data/globalLongShortAccountRatio](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#long-short-ratio) - longShortRatio - [LongShortRatioExample.java:38](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/LongShortRatioExample.java#L38) -[GET /dapi/v1/markPriceKlines](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data) - markPriceKlineCandlestickData - [MarkPriceKlineCandlestickDataExample.java:58](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/MarkPriceKlineCandlestickDataExample.java#L58) +[GET /dapi/v1/markPriceKlines](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#mark-price-kline-candlestick-data) - markPriceKlineCandlestickData - [MarkPriceKlineCandlestickDataExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/MarkPriceKlineCandlestickDataExample.java#L47) -[GET /dapi/v1/historicalTrades](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Old-Trades-Lookup) - oldTradesLookup - [OldTradesLookupExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OldTradesLookupExample.java#L49) +[GET /dapi/v1/historicalTrades](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#old-trades-lookup) - oldTradesLookup - [OldTradesLookupExample.java:39](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OldTradesLookupExample.java#L39) -[GET /dapi/v1/openInterest](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest) - openInterest - [OpenInterestExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OpenInterestExample.java#L47) +[GET /dapi/v1/openInterest](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#open-interest) - openInterest - [OpenInterestExample.java:36](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OpenInterestExample.java#L36) -[GET /futures/data/openInterestHist](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest-Statistics) - openInterestStatistics - [OpenInterestStatisticsExample.java:50](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OpenInterestStatisticsExample.java#L50) +[GET /futures/data/openInterestHist](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#open-interest-statistics) - openInterestStatistics - [OpenInterestStatisticsExample.java:39](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OpenInterestStatisticsExample.java#L39) -[GET /dapi/v1/depth](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Order-Book) - orderBook - [OrderBookExample.java:48](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OrderBookExample.java#L48) +[GET /dapi/v1/depth](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#order-book) - orderBook - [OrderBookExample.java:37](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OrderBookExample.java#L37) -[GET /dapi/v1/premiumIndexKlines](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Premium-index-Kline-Data) - premiumIndexKlineData - [PremiumIndexKlineDataExample.java:51](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/PremiumIndexKlineDataExample.java#L51) +[GET /dapi/v1/premiumIndexKlines](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#premium-index-kline-data) - premiumIndexKlineData - [PremiumIndexKlineDataExample.java:40](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/PremiumIndexKlineDataExample.java#L40) -[GET /dapi/v1/constituents](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Index-Constituents) - queryIndexPriceConstituents - [QueryIndexPriceConstituentsExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/QueryIndexPriceConstituentsExample.java#L47) +[GET /dapi/v1/constituents](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#query-index-price-constituents) - queryIndexPriceConstituents - [QueryIndexPriceConstituentsExample.java:36](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/QueryIndexPriceConstituentsExample.java#L36) -[GET /dapi/v1/trades](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Recent-Trades-List) - recentTradesList - [RecentTradesListExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/RecentTradesListExample.java#L49) +[GET /dapi/v1/trades](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#recent-trades-list) - recentTradesList - [RecentTradesListExample.java:38](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/RecentTradesListExample.java#L38) -[GET /dapi/v1/ticker/bookTicker](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker) - symbolOrderBookTicker - [SymbolOrderBookTickerExample.java:50](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/SymbolOrderBookTickerExample.java#L50) +[GET /dapi/v1/ticker/bookTicker](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#symbol-order-book-ticker) - symbolOrderBookTicker - [SymbolOrderBookTickerExample.java:39](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/SymbolOrderBookTickerExample.java#L39) -[GET /dapi/v1/ticker/price](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Symbol-Price-Ticker) - symbolPriceTicker - [SymbolPriceTickerExample.java:50](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/SymbolPriceTickerExample.java#L50) +[GET /dapi/v1/ticker/price](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#symbol-price-ticker) - symbolPriceTicker - [SymbolPriceTickerExample.java:39](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/SymbolPriceTickerExample.java#L39) -[GET /futures/data/takerBuySellVol](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Taker-Buy-Sell-Volume) - takerBuySellVolume - [TakerBuySellVolumeExample.java:52](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TakerBuySellVolumeExample.java#L52) +[GET /futures/data/takerBuySellVol](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#taker-buy-sell-volume) - takerBuySellVolume - [TakerBuySellVolumeExample.java:41](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TakerBuySellVolumeExample.java#L41) -[GET /dapi/v1/ping](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Test-Connectivity) - testConnectivity - [TestConnectivityExample.java:45](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TestConnectivityExample.java#L45) +[GET /dapi/v1/ping](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#test-connectivity) - testConnectivity - [TestConnectivityExample.java:34](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TestConnectivityExample.java#L34) -[GET /dapi/v1/ticker/24hr](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics) - ticker24hrPriceChangeStatistics - [Ticker24hrPriceChangeStatisticsExample.java:51](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java#L51) +[GET /dapi/v1/ticker/24hr](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#ticker24hr-price-change-statistics) - ticker24hrPriceChangeStatistics - [Ticker24hrPriceChangeStatisticsExample.java:40](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java#L40) -[GET /futures/data/topLongShortAccountRatio](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio) - topTraderLongShortRatioAccounts - [TopTraderLongShortRatioAccountsExample.java:54](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TopTraderLongShortRatioAccountsExample.java#L54) +[GET /futures/data/topLongShortAccountRatio](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#top-trader-long-short-ratio-accounts) - topTraderLongShortRatioAccounts - [TopTraderLongShortRatioAccountsExample.java:44](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TopTraderLongShortRatioAccountsExample.java#L44) -[GET /futures/data/topLongShortPositionRatio](https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Top-Trader-Long-Short-Ratio) - topTraderLongShortRatioPositions - [TopTraderLongShortRatioPositionsExample.java:53](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TopTraderLongShortRatioPositionsExample.java#L53) - -## PortfolioMarginEndpoints - -[GET /dapi/v1/pmAccountInfo](https://developers.binance.com/docs/derivatives/coin-margined-futures/portfolio-margin-endpoints/Classic-Portfolio-Margin-Account-Information) - classicPortfolioMarginAccountInformation - [ClassicPortfolioMarginAccountInformationExample.java:48](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/portfoliomarginendpoints/ClassicPortfolioMarginAccountInformationExample.java#L48) +[GET /futures/data/topLongShortPositionRatio](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#top-trader-long-short-ratio-positions) - topTraderLongShortRatioPositions - [TopTraderLongShortRatioPositionsExample.java:43](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TopTraderLongShortRatioPositionsExample.java#L43) ## Trade -[GET /dapi/v1/userTrades](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Account-Trade-List) - accountTradeList - [AccountTradeListExample.java:53](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AccountTradeListExample.java#L53) +[GET /dapi/v1/userTrades](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#account-trade-list) - accountTradeList - [AccountTradeListExample.java:43](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AccountTradeListExample.java#L43) -[GET /dapi/v1/allOrders](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/All-Orders) - allOrders - [AllOrdersExample.java:55](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AllOrdersExample.java#L55) +[GET /dapi/v1/allOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#all-orders) - allOrders - [AllOrdersExample.java:44](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AllOrdersExample.java#L44) -[POST /dapi/v1/countdownCancelAll](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Auto-Cancel-All-Open-Orders) - autoCancelAllOpenOrders - [AutoCancelAllOpenOrdersExample.java:57](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AutoCancelAllOpenOrdersExample.java#L57) +[POST /dapi/v1/countdownCancelAll](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#auto-cancel-all-open-orders) - autoCancelAllOpenOrders - [AutoCancelAllOpenOrdersExample.java:46](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AutoCancelAllOpenOrdersExample.java#L46) -[DELETE /dapi/v1/allOpenOrders](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Cancel-All-Open-Orders) - cancelAllOpenOrders - [CancelAllOpenOrdersExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelAllOpenOrdersExample.java#L47) +[DELETE /dapi/v1/allOpenOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#cancel-all-open-orders) - cancelAllOpenOrders - [CancelAllOpenOrdersExample.java:36](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelAllOpenOrdersExample.java#L36) -[DELETE /dapi/v1/batchOrders](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Cancel-Multiple-Orders) - cancelMultipleOrders - [CancelMultipleOrdersExample.java:50](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelMultipleOrdersExample.java#L50) +[DELETE /dapi/v1/batchOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#cancel-multiple-orders) - cancelMultipleOrders - [CancelMultipleOrdersExample.java:39](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelMultipleOrdersExample.java#L39) -[DELETE /dapi/v1/order](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Cancel-Order) - cancelOrder - [CancelOrderExample.java:48](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelOrderExample.java#L48) +[DELETE /dapi/v1/order](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#cancel-order) - cancelOrder - [CancelOrderExample.java:37](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelOrderExample.java#L37) -[POST /dapi/v1/leverage](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Change-Initial-Leverage) - changeInitialLeverage - [ChangeInitialLeverageExample.java:50](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangeInitialLeverageExample.java#L50) +[POST /dapi/v1/leverage](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#change-initial-leverage) - changeInitialLeverage - [ChangeInitialLeverageExample.java:39](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangeInitialLeverageExample.java#L39) -[POST /dapi/v1/marginType](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Change-Margin-Type) - changeMarginType - [ChangeMarginTypeExample.java:51](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangeMarginTypeExample.java#L51) +[POST /dapi/v1/marginType](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#change-margin-type) - changeMarginType - [ChangeMarginTypeExample.java:40](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangeMarginTypeExample.java#L40) -[POST /dapi/v1/positionSide/dual](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Change-Position-Mode) - changePositionMode - [ChangePositionModeExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangePositionModeExample.java#L49) +[POST /dapi/v1/positionSide/dual](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#change-position-mode) - changePositionMode - [ChangePositionModeExample.java:41](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangePositionModeExample.java#L41) -[GET /dapi/v1/openOrders](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Current-All-Open-Orders) - currentAllOpenOrders - [CurrentAllOpenOrdersExample.java:48](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CurrentAllOpenOrdersExample.java#L48) +[GET /dapi/v1/openOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#current-all-open-orders) - currentAllOpenOrders - [CurrentAllOpenOrdersExample.java:38](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CurrentAllOpenOrdersExample.java#L38) -[GET /dapi/v1/orderAmendment](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Get-Order-Modify-History) - getOrderModifyHistory - [GetOrderModifyHistoryExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/GetOrderModifyHistoryExample.java#L49) +[GET /dapi/v1/orderAmendment](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#get-order-modify-history) - getOrderModifyHistory - [GetOrderModifyHistoryExample.java:39](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/GetOrderModifyHistoryExample.java#L39) -[GET /dapi/v1/positionMargin/history](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Get-Position-Margin-Change-History) - getPositionMarginChangeHistory - [GetPositionMarginChangeHistoryExample.java:48](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/GetPositionMarginChangeHistoryExample.java#L48) +[GET /dapi/v1/positionMargin/history](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#get-position-margin-change-history) - getPositionMarginChangeHistory - [GetPositionMarginChangeHistoryExample.java:36](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/GetPositionMarginChangeHistoryExample.java#L36) -[POST /dapi/v1/positionMargin](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin) - modifyIsolatedPositionMargin - [ModifyIsolatedPositionMarginExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyIsolatedPositionMarginExample.java#L49) +[POST /dapi/v1/positionMargin](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#modify-isolated-position-margin) - modifyIsolatedPositionMargin - [ModifyIsolatedPositionMarginExample.java:38](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyIsolatedPositionMarginExample.java#L38) -[PUT /dapi/v1/batchOrders](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Modify-Multiple-Orders) - modifyMultipleOrders - [ModifyMultipleOrdersExample.java:52](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyMultipleOrdersExample.java#L52) +[PUT /dapi/v1/batchOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#modify-multiple-orders) - modifyMultipleOrders - [ModifyMultipleOrdersExample.java:44](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyMultipleOrdersExample.java#L44) -[PUT /dapi/v1/order](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Modify-Order) - modifyOrder - [ModifyOrderExample.java:58](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyOrderExample.java#L58) +[PUT /dapi/v1/order](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#modify-order) - modifyOrder - [ModifyOrderExample.java:48](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyOrderExample.java#L48) -[POST /dapi/v1/order](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/New-Order) - newOrder - [NewOrderExample.java:85](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/NewOrderExample.java#L85) +[POST /dapi/v1/order](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#new-order) - newOrder - [NewOrderExample.java:74](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/NewOrderExample.java#L74) -[POST /dapi/v1/batchOrders](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Place-Multiple-Orders) - placeMultipleOrders - [PlaceMultipleOrdersExample.java:51](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PlaceMultipleOrdersExample.java#L51) +[POST /dapi/v1/batchOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#place-multiple-orders) - placeMultipleOrders - [PlaceMultipleOrdersExample.java:43](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PlaceMultipleOrdersExample.java#L43) -[GET /dapi/v1/adlQuantile](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Position-ADL-Quantile-Estimation) - positionAdlQuantileEstimation - [PositionAdlQuantileEstimationExample.java:55](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PositionAdlQuantileEstimationExample.java#L55) +[GET /dapi/v1/adlQuantile](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#position-adl-quantile-estimation) - positionAdlQuantileEstimation - [PositionAdlQuantileEstimationExample.java:44](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PositionAdlQuantileEstimationExample.java#L44) -[GET /dapi/v1/positionRisk](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Position-Information) - positionInformation - [PositionInformationExample.java:52](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PositionInformationExample.java#L52) +[GET /dapi/v1/positionRisk](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#position-information) - positionInformation - [PositionInformationExample.java:43](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PositionInformationExample.java#L43) -[GET /dapi/v1/openOrder](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Query-Current-Open-Order) - queryCurrentOpenOrder - [QueryCurrentOpenOrderExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/QueryCurrentOpenOrderExample.java#L49) +[GET /dapi/v1/openOrder](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#query-current-open-order) - queryCurrentOpenOrder - [QueryCurrentOpenOrderExample.java:39](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/QueryCurrentOpenOrderExample.java#L39) -[GET /dapi/v1/order](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Query-Order) - queryOrder - [QueryOrderExample.java:50](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/QueryOrderExample.java#L50) +[GET /dapi/v1/order](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#query-order) - queryOrder - [QueryOrderExample.java:39](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/QueryOrderExample.java#L39) -[GET /dapi/v1/forceOrders](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Users-Force-Orders) - usersForceOrders - [UsersForceOrdersExample.java:50](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/UsersForceOrdersExample.java#L50) +[GET /dapi/v1/forceOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#users-force-orders) - usersForceOrders - [UsersForceOrdersExample.java:40](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/UsersForceOrdersExample.java#L40) ## UserDataStreams -[DELETE /dapi/v1/listenKey](https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Close-User-Data-Stream) - closeUserDataStream - [CloseUserDataStreamExample.java:45](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/CloseUserDataStreamExample.java#L45) +[DELETE /dapi/v1/listenKey](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/user-data-streams#close-user-data-stream) - closeUserDataStream - [CloseUserDataStreamExample.java:34](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/CloseUserDataStreamExample.java#L34) -[PUT /dapi/v1/listenKey](https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Keepalive-User-Data-Stream) - keepaliveUserDataStream - [KeepaliveUserDataStreamExample.java:48](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/KeepaliveUserDataStreamExample.java#L48) +[PUT /dapi/v1/listenKey](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/user-data-streams#keepalive-user-data-stream) - keepaliveUserDataStream - [KeepaliveUserDataStreamExample.java:37](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/KeepaliveUserDataStreamExample.java#L37) -[POST /dapi/v1/listenKey](https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Start-User-Data-Stream) - startUserDataStream - [StartUserDataStreamExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/StartUserDataStreamExample.java#L49) +[POST /dapi/v1/listenKey](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/user-data-streams#start-user-data-stream) - startUserDataStream - [StartUserDataStreamExample.java:39](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/StartUserDataStreamExample.java#L39) diff --git a/clients/derivatives-trading-coin-futures/example_websocket_api.md b/clients/derivatives-trading-coin-futures/example_websocket_api.md index 738333e10..efbb6d308 100644 --- a/clients/derivatives-trading-coin-futures/example_websocket_api.md +++ b/clients/derivatives-trading-coin-futures/example_websocket_api.md @@ -1,26 +1,26 @@ ## Account -[account.status](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/websocket-api/Account-Information) - accountInformation - [AccountInformationExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/account/AccountInformationExample.java#L49) +[account.status](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/account#account-information) - accountInformation - [AccountInformationExample.java:38](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/account/AccountInformationExample.java#L38) -[account.balance](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/websocket-api/Futures-Account-Balance) - futuresAccountBalance - [FuturesAccountBalanceExample.java:48](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/account/FuturesAccountBalanceExample.java#L48) +[account.balance](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/account#futures-account-balance) - futuresAccountBalance - [FuturesAccountBalanceExample.java:36](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/account/FuturesAccountBalanceExample.java#L36) ## Trade -[order.cancel](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Cancel-Order) - cancelOrder - [CancelOrderExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/CancelOrderExample.java#L49) +[order.cancel](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/trade#cancel-order) - cancelOrder - [CancelOrderExample.java:37](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/CancelOrderExample.java#L37) -[order.modify](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Modify-Order) - modifyOrder - [ModifyOrderExample.java:60](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/ModifyOrderExample.java#L60) +[order.modify](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/trade#modify-order) - modifyOrder - [ModifyOrderExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/ModifyOrderExample.java#L49) -[order.place](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/New-Order) - newOrder - [NewOrderExample.java:80](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/NewOrderExample.java#L80) +[order.place](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/trade#new-order) - newOrder - [NewOrderExample.java:74](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/NewOrderExample.java#L74) -[account.position](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Position-Information) - positionInformation - [PositionInformationExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/PositionInformationExample.java#L49) +[account.position](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/trade#position-information) - positionInformation - [PositionInformationExample.java:38](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/PositionInformationExample.java#L38) -[order.status](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Query-Order) - queryOrder - [QueryOrderExample.java:52](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/QueryOrderExample.java#L52) +[order.status](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/trade#query-order) - queryOrder - [QueryOrderExample.java:40](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/QueryOrderExample.java#L40) ## UserDataStreams -[userDataStream.stop](https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Close-User-Data-Stream-Wsp) - closeUserDataStream - [CloseUserDataStreamExample.java:48](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/CloseUserDataStreamExample.java#L48) +[userDataStream.stop](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/user-data-streams#close-user-data-stream) - closeUserDataStream - [CloseUserDataStreamExample.java:36](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/CloseUserDataStreamExample.java#L36) -[userDataStream.ping](https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Keepalive-User-Data-Stream-Wsp) - keepaliveUserDataStream - [KeepaliveUserDataStreamExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/KeepaliveUserDataStreamExample.java#L49) +[userDataStream.ping](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/user-data-streams#keepalive-user-data-stream) - keepaliveUserDataStream - [KeepaliveUserDataStreamExample.java:38](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/KeepaliveUserDataStreamExample.java#L38) -[userDataStream.start](https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Start-User-Data-Stream-Wsp) - startUserDataStream - [StartUserDataStreamExample.java:50](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/StartUserDataStreamExample.java#L50) +[userDataStream.start](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/user-data-streams#start-user-data-stream) - startUserDataStream - [StartUserDataStreamExample.java:39](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/StartUserDataStreamExample.java#L39) diff --git a/clients/derivatives-trading-coin-futures/example_websocket_stream.md b/clients/derivatives-trading-coin-futures/example_websocket_stream.md index f6db3f131..453986fe0 100644 --- a/clients/derivatives-trading-coin-futures/example_websocket_stream.md +++ b/clients/derivatives-trading-coin-futures/example_websocket_stream.md @@ -1,40 +1,40 @@ -## WebsocketMarketStreams +## Default -[@aggTrade](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Aggregate-Trade-Streams) - aggregateTradeStreams - [AggregateTradeStreamsExample.java:44](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AggregateTradeStreamsExample.java#L44) +[@aggTrade](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#aggregate-trade-streams) - aggregateTradeStreams - [AggregateTradeStreamsExample.java:34](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AggregateTradeStreamsExample.java#L34) -[!bookTicker](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/All-Book-Tickers-Stream) - allBookTickersStream - [AllBookTickersStreamExample.java:44](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AllBookTickersStreamExample.java#L44) +[!bookTicker](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#all-book-tickers-stream) - allBookTickersStream - [AllBookTickersStreamExample.java:35](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AllBookTickersStreamExample.java#L35) -[!forceOrder@arr](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams) - allMarketLiquidationOrderStreams - [AllMarketLiquidationOrderStreamsExample.java:46](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AllMarketLiquidationOrderStreamsExample.java#L46) +[!forceOrder@arr](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#all-market-liquidation-order-streams) - allMarketLiquidationOrderStreams - [AllMarketLiquidationOrderStreamsExample.java:37](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AllMarketLiquidationOrderStreamsExample.java#L37) -[!miniTicker@arr](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/All-Market-Mini-Tickers-Stream) - allMarketMiniTickersStream - [AllMarketMiniTickersStreamExample.java:45](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AllMarketMiniTickersStreamExample.java#L45) +[!miniTicker@arr](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#all-market-mini-tickers-stream) - allMarketMiniTickersStream - [AllMarketMiniTickersStreamExample.java:36](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AllMarketMiniTickersStreamExample.java#L36) -[!ticker@arr](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/All-Market-Tickers-Streams) - allMarketTickersStreams - [AllMarketTickersStreamsExample.java:45](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AllMarketTickersStreamsExample.java#L45) +[!ticker@arr](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#all-market-tickers-streams) - allMarketTickersStreams - [AllMarketTickersStreamsExample.java:36](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AllMarketTickersStreamsExample.java#L36) -[_@continuousKline_](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Continuous-Contract-Kline-Candlestick-Streams) - continuousContractKlineCandlestickStreams - [ContinuousContractKlineCandlestickStreamsExample.java:43](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/ContinuousContractKlineCandlestickStreamsExample.java#L43) +[_@continuousKline_](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#continuous-contract-kline-candlestick-streams) - continuousContractKlineCandlestickStreams - [ContinuousContractKlineCandlestickStreamsExample.java:33](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/ContinuousContractKlineCandlestickStreamsExample.java#L33) -[!contractInfo](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Contract-Info-Stream) - contractInfoStream - [ContractInfoStreamExample.java:45](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/ContractInfoStreamExample.java#L45) +[!contractInfo](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#contract-info-stream) - contractInfoStream - [ContractInfoStreamExample.java:35](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/ContractInfoStreamExample.java#L35) -[@depth@](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams) - diffBookDepthStreams - [DiffBookDepthStreamsExample.java:44](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/DiffBookDepthStreamsExample.java#L44) +[@depth@](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#diff-book-depth-streams) - diffBookDepthStreams - [DiffBookDepthStreamsExample.java:33](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/DiffBookDepthStreamsExample.java#L33) -[@indexPriceKline_](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Index-Kline-Candlestick-Streams) - indexKlineCandlestickStreams - [IndexKlineCandlestickStreamsExample.java:43](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndexKlineCandlestickStreamsExample.java#L43) +[@indexPriceKline_](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#index-kline-candlestick-streams) - indexKlineCandlestickStreams - [IndexKlineCandlestickStreamsExample.java:32](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndexKlineCandlestickStreamsExample.java#L32) -[@indexPrice@](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Index-Price-Stream) - indexPriceStream - [IndexPriceStreamExample.java:43](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndexPriceStreamExample.java#L43) +[@indexPrice@](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#index-price-stream) - indexPriceStream - [IndexPriceStreamExample.java:31](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndexPriceStreamExample.java#L31) -[@bookTicker](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Individual-Symbol-Book-Ticker-Streams) - individualSymbolBookTickerStreams - [IndividualSymbolBookTickerStreamsExample.java:44](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndividualSymbolBookTickerStreamsExample.java#L44) +[@bookTicker](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#individual-symbol-book-ticker-streams) - individualSymbolBookTickerStreams - [IndividualSymbolBookTickerStreamsExample.java:34](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndividualSymbolBookTickerStreamsExample.java#L34) -[@miniTicker](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Individual-Symbol-Mini-Ticker-Stream) - individualSymbolMiniTickerStream - [IndividualSymbolMiniTickerStreamExample.java:45](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndividualSymbolMiniTickerStreamExample.java#L45) +[@miniTicker](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#individual-symbol-mini-ticker-stream) - individualSymbolMiniTickerStream - [IndividualSymbolMiniTickerStreamExample.java:34](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndividualSymbolMiniTickerStreamExample.java#L34) -[@ticker](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Individual-Symbol-Ticker-Streams) - individualSymbolTickerStreams - [IndividualSymbolTickerStreamsExample.java:44](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndividualSymbolTickerStreamsExample.java#L44) +[@ticker](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#individual-symbol-ticker-streams) - individualSymbolTickerStreams - [IndividualSymbolTickerStreamsExample.java:34](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndividualSymbolTickerStreamsExample.java#L34) -[@kline_](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Kline-Candlestick-Streams) - klineCandlestickStreams - [KlineCandlestickStreamsExample.java:44](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/KlineCandlestickStreamsExample.java#L44) +[@kline_](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#kline-candlestick-streams) - klineCandlestickStreams - [KlineCandlestickStreamsExample.java:34](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/KlineCandlestickStreamsExample.java#L34) -[@forceOrder](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Liquidation-Order-Streams) - liquidationOrderStreams - [LiquidationOrderStreamsExample.java:46](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/LiquidationOrderStreamsExample.java#L46) +[@markPriceKline_](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#mark-price-kline-candlestick-streams) - markPriceKlineCandlestickStreams - [MarkPriceKlineCandlestickStreamsExample.java:32](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/MarkPriceKlineCandlestickStreamsExample.java#L32) -[@markPriceKline_](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Mark-Price-Kline-Candlestick-Streams) - markPriceKlineCandlestickStreams - [MarkPriceKlineCandlestickStreamsExample.java:43](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/MarkPriceKlineCandlestickStreamsExample.java#L43) +[@markPrice@](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#mark-price-of-all-symbols-of-apair) - markPriceOfAllSymbolsOfAPair - [MarkPriceOfAllSymbolsOfAPairExample.java:34](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/MarkPriceOfAllSymbolsOfAPairExample.java#L34) -[@markPrice@](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Mark-Price-of-All-Symbols-of-a-Pair) - markPriceOfAllSymbolsOfAPair - [MarkPriceOfAllSymbolsOfAPairExample.java:43](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/MarkPriceOfAllSymbolsOfAPairExample.java#L43) +[@markPrice@](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#mark-price-stream) - markPriceStream - [MarkPriceStreamExample.java:34](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/MarkPriceStreamExample.java#L34) -[@markPrice@](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Mark-Price-Stream) - markPriceStream - [MarkPriceStreamExample.java:43](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/MarkPriceStreamExample.java#L43) +[@forceOrder](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#market-liquidation-order-streams) - marketLiquidationOrderStreams - [MarketLiquidationOrderStreamsExample.java:34](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/MarketLiquidationOrderStreamsExample.java#L34) -[@depth@](https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Partial-Book-Depth-Streams) - partialBookDepthStreams - [PartialBookDepthStreamsExample.java:44](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/PartialBookDepthStreamsExample.java#L44) +[@depth@](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-streams/~#partial-book-depth-streams) - partialBookDepthStreams - [PartialBookDepthStreamsExample.java:33](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/PartialBookDepthStreamsExample.java#L33) diff --git a/clients/derivatives-trading-coin-futures/pom.xml b/clients/derivatives-trading-coin-futures/pom.xml index b6cf2fcbb..dc92dc91c 100644 --- a/clients/derivatives-trading-coin-futures/pom.xml +++ b/clients/derivatives-trading-coin-futures/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-derivatives-trading-coin-futures derivatives-trading-coin-futures - 7.1.1 + 8.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/JSON.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/JSON.java index 11a409ef7..c084c831d 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/JSON.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -147,12 +147,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model .BatchOrdersInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .BatchOrdersPlaceMultipleOrders.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .BatchOrdersPlaceMultipleOrdersInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model .CancelAllOpenOrdersResponse.CustomTypeAdapterFactory()); @@ -186,10 +180,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model .CheckServerTimeResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .ClassicPortfolioMarginAccountInformationResponse - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model .CompressedAggregateTradesListResponse.CustomTypeAdapterFactory()); @@ -198,15 +188,14 @@ private static Class getClassByDiscriminator( .CompressedAggregateTradesListResponseInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .ContinuousContractKlineCandlestickDataResponse.CustomTypeAdapterFactory()); + .ContinuousContractKlineCandlestickDataItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .ContinuousContractKlineCandlestickDataResponseItem + .ContinuousContractKlineCandlestickDataItemInner .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .ContinuousContractKlineCandlestickDataResponseItemInner - .CustomTypeAdapterFactory()); + .ContinuousContractKlineCandlestickDataResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model .CurrentAllOpenOrdersResponse.CustomTypeAdapterFactory()); @@ -303,23 +292,22 @@ private static Class getClassByDiscriminator( .IndexPriceAndMarkPriceResponseInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .IndexPriceKlineCandlestickDataResponse.CustomTypeAdapterFactory()); + .IndexPriceKlineCandlestickDataItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .IndexPriceKlineCandlestickDataResponseItem.CustomTypeAdapterFactory()); + .IndexPriceKlineCandlestickDataItemInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .IndexPriceKlineCandlestickDataResponseItemInner - .CustomTypeAdapterFactory()); + .IndexPriceKlineCandlestickDataResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model .KeepaliveUserDataStreamResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .KlineCandlestickDataResponse.CustomTypeAdapterFactory()); + .KlineCandlestickDataItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .KlineCandlestickDataResponseItem.CustomTypeAdapterFactory()); + .KlineCandlestickDataResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model .LongShortRatioResponse.CustomTypeAdapterFactory()); @@ -328,13 +316,10 @@ private static Class getClassByDiscriminator( .LongShortRatioResponseInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .MarkPriceKlineCandlestickDataResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .MarkPriceKlineCandlestickDataResponseItem.CustomTypeAdapterFactory()); + .MarkPriceKlineCandlestickDataItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .MarkPriceKlineCandlestickDataResponseItemInner.CustomTypeAdapterFactory()); + .MarkPriceKlineCandlestickDataResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model .ModifyIsolatedPositionMarginRequest.CustomTypeAdapterFactory()); @@ -396,12 +381,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model .OrderBookResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .OrderBookResponseAsksItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .OrderBookResponseBidsItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model .OrderIdList.CustomTypeAdapterFactory()); @@ -435,13 +414,13 @@ private static Class getClassByDiscriminator( .PositionInformationResponseInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .PremiumIndexKlineDataResponse.CustomTypeAdapterFactory()); + .PremiumIndexKlineDataItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .PremiumIndexKlineDataResponseItem.CustomTypeAdapterFactory()); + .PremiumIndexKlineDataItemInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model - .PremiumIndexKlineDataResponseItemInner.CustomTypeAdapterFactory()); + .PremiumIndexKlineDataResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.rest.model .QueryCurrentOpenOrderResponse.CustomTypeAdapterFactory()); diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/AccountApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/AccountApi.java index 88c2fc814..41834d8de 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/AccountApi.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/AccountApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -29,6 +29,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetFuturesTradeDownloadLinkByIdResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetFuturesTransactionHistoryDownloadLinkByIdResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetIncomeHistoryResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.IncomeType; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.NotionalBracketForPairResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.NotionalBracketForSymbolResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.UserCommissionRateResponse; @@ -54,7 +55,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-coin-futures/7.1.1 (Java/%s; %s; %s)", + "binance-derivatives-trading-coin-futures/8.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -105,7 +106,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#account-information">Account * Information (USER_DATA) Documentation */ private okhttp3.Call accountInformationCall(Long recvWindow) throws ApiException { @@ -198,10 +199,10 @@ private okhttp3.Call accountInformationValidateBeforeCall(Long recvWindow) throw } /** - * Account Information (USER_DATA) Get current account information. * for One-way Mode user, the - * \"positions\" will only show the \"BOTH\" positions * for Hedge Mode - * user, the \"positions\" will show \"BOTH\", \"LONG\", and - * \"SHORT\" positions. Weight: 5 + * Account Information (USER_DATA) Get current account information. Weight(IP): 5 Security Type: + * USER_DATA Notes: - for One-way Mode user, the \"positions\" will only show the + * \"BOTH\" positions - for Hedge Mode user, the \"positions\" will show + * \"BOTH\", \"LONG\", and \"SHORT\" positions. * * @param recvWindow (optional) * @return ApiResponse<AccountInformationResponse> @@ -215,10 +216,10 @@ private okhttp3.Call accountInformationValidateBeforeCall(Long recvWindow) throw * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#account-information">Account * Information (USER_DATA) Documentation */ - public ApiResponse accountInformation(Long recvWindow) + public ApiResponse accountInformation(@Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = accountInformationValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = @@ -240,7 +241,7 @@ public ApiResponse accountInformation(Long recvWindo * * * @see Futures + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#futures-account-balance">Futures * Account Balance (USER_DATA) Documentation */ private okhttp3.Call futuresAccountBalanceCall(Long recvWindow) throws ApiException { @@ -334,7 +335,8 @@ private okhttp3.Call futuresAccountBalanceValidateBeforeCall(Long recvWindow) } /** - * Futures Account Balance (USER_DATA) Check futures account balance Weight: 1 + * Futures Account Balance (USER_DATA) Check futures account balance Weight(IP): 1 Security + * Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<FuturesAccountBalanceResponse> @@ -348,11 +350,11 @@ private okhttp3.Call futuresAccountBalanceValidateBeforeCall(Long recvWindow) * * * @see Futures + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#futures-account-balance">Futures * Account Balance (USER_DATA) Documentation */ - public ApiResponse futuresAccountBalance(Long recvWindow) - throws ApiException { + public ApiResponse futuresAccountBalance( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = futuresAccountBalanceValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -373,8 +375,8 @@ public ApiResponse futuresAccountBalance(Long rec * * * @see Get - * Current Position Mode(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-current-position-mode">Get + * Current Position Mode (USER_DATA) Documentation */ private okhttp3.Call getCurrentPositionModeCall(Long recvWindow) throws ApiException { String basePath = null; @@ -467,8 +469,8 @@ private okhttp3.Call getCurrentPositionModeValidateBeforeCall(Long recvWindow) } /** - * Get Current Position Mode(USER_DATA) Get user's position mode (Hedge Mode or One-way Mode - * ) on ***EVERY symbol*** Weight: 30 + * Get Current Position Mode (USER_DATA) Get user's position mode (Hedge Mode or One-way + * Mode ) on ***EVERY symbol*** Weight(IP): 30 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetCurrentPositionModeResponse> @@ -482,11 +484,11 @@ private okhttp3.Call getCurrentPositionModeValidateBeforeCall(Long recvWindow) * * * @see Get - * Current Position Mode(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-current-position-mode">Get + * Current Position Mode (USER_DATA) Documentation */ - public ApiResponse getCurrentPositionMode(Long recvWindow) - throws ApiException { + public ApiResponse getCurrentPositionMode( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getCurrentPositionModeValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -509,7 +511,7 @@ public ApiResponse getCurrentPositionMode(Long r * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-download-id-for-futures-order-history">Get * Download Id For Futures Order History (USER_DATA) Documentation */ private okhttp3.Call getDownloadIdForFuturesOrderHistoryCall( @@ -619,9 +621,11 @@ private okhttp3.Call getDownloadIdForFuturesOrderHistoryValidateBeforeCall( /** * Get Download Id For Futures Order History (USER_DATA) Get Download Id For Futures Order - * History * Request Limitation is 10 times per month, shared by front end download page and - * rest api * The time between `startTime` and `endTime` can not be longer - * than 1 year Weight: 5 + * History Weight(IP): 1000 Security Type: USER_DATA Notes: - Request Limitation is 8 times per + * month, shared by front end download page and rest api - This endpoint uses the IP rate limit + * bucket and costs 1000 weight per call. The maximum is 2 calls per minute; the 3rd call within + * the same minute will trigger a ban. - The time between `startTime` and + * `endTime` can not be longer than 1 year * * @param startTime Timestamp in ms (required) * @param endTime Timestamp in ms (required) @@ -637,12 +641,12 @@ private okhttp3.Call getDownloadIdForFuturesOrderHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-download-id-for-futures-order-history">Get * Download Id For Futures Order History (USER_DATA) Documentation */ public ApiResponse getDownloadIdForFuturesOrderHistory( - @NotNull Long startTime, @NotNull Long endTime, Long recvWindow) + @NotNull Long startTime, @NotNull Long endTime, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getDownloadIdForFuturesOrderHistoryValidateBeforeCall( @@ -668,7 +672,7 @@ private okhttp3.Call getDownloadIdForFuturesOrderHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-download-id-for-futures-trade-history">Get * Download Id For Futures Trade History (USER_DATA) Documentation */ private okhttp3.Call getDownloadIdForFuturesTradeHistoryCall( @@ -778,9 +782,11 @@ private okhttp3.Call getDownloadIdForFuturesTradeHistoryValidateBeforeCall( /** * Get Download Id For Futures Trade History (USER_DATA) Get download id for futures trade - * history * Request Limitation is 5 times per month, shared by front end download page and rest - * api * The time between `startTime` and `endTime` can not be longer than 1 - * year Weight: 5 + * history Weight(IP): 1000 Security Type: USER_DATA Notes: - Request Limitation is 8 times per + * month, shared by front end download page and rest api - This endpoint uses the IP rate limit + * bucket and costs 1000 weight per call. The maximum is 2 calls per minute; the 3rd call within + * the same minute will trigger a ban. - The time between `startTime` and + * `endTime` can not be longer than 1 year * * @param startTime Timestamp in ms (required) * @param endTime Timestamp in ms (required) @@ -796,12 +802,12 @@ private okhttp3.Call getDownloadIdForFuturesTradeHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-download-id-for-futures-trade-history">Get * Download Id For Futures Trade History (USER_DATA) Documentation */ public ApiResponse getDownloadIdForFuturesTradeHistory( - @NotNull Long startTime, @NotNull Long endTime, Long recvWindow) + @NotNull Long startTime, @NotNull Long endTime, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getDownloadIdForFuturesTradeHistoryValidateBeforeCall( @@ -827,8 +833,8 @@ private okhttp3.Call getDownloadIdForFuturesTradeHistoryValidateBeforeCall( * * * @see Get - * Download Id For Futures Transaction History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-download-id-for-futures-transaction-history">Get + * Download Id For Futures Transaction History (USER_DATA) Documentation */ private okhttp3.Call getDownloadIdForFuturesTransactionHistoryCall( Long startTime, Long endTime, Long recvWindow) throws ApiException { @@ -937,10 +943,12 @@ private okhttp3.Call getDownloadIdForFuturesTransactionHistoryValidateBeforeCall } /** - * Get Download Id For Futures Transaction History(USER_DATA) Get download id for futures - * transaction history * Request Limitation is 5 times per month, shared by front end download - * page and rest api * The time between `startTime` and `endTime` can not be - * longer than 1 year Weight: 5 + * Get Download Id For Futures Transaction History (USER_DATA) Get download id for futures + * transaction history Weight(IP): 1000 Security Type: USER_DATA Notes: - Request Limitation is + * 8 times per month, shared by front end download page and rest api - This endpoint uses the IP + * rate limit bucket and costs 1000 weight per call. The maximum is 2 calls per minute; the 3rd + * call within the same minute will trigger a ban. - The time between `startTime` and + * `endTime` can not be longer than 1 year * * @param startTime Timestamp in ms (required) * @param endTime Timestamp in ms (required) @@ -956,12 +964,12 @@ private okhttp3.Call getDownloadIdForFuturesTransactionHistoryValidateBeforeCall * * * @see Get - * Download Id For Futures Transaction History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-download-id-for-futures-transaction-history">Get + * Download Id For Futures Transaction History (USER_DATA) Documentation */ public ApiResponse getDownloadIdForFuturesTransactionHistory( - @NotNull Long startTime, @NotNull Long endTime, Long recvWindow) + @NotNull Long startTime, @NotNull Long endTime, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getDownloadIdForFuturesTransactionHistoryValidateBeforeCall( @@ -986,7 +994,7 @@ private okhttp3.Call getDownloadIdForFuturesTransactionHistoryValidateBeforeCall * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-futures-order-history-download-link-by-id">Get * Futures Order History Download Link by Id (USER_DATA) Documentation */ private okhttp3.Call getFuturesOrderHistoryDownloadLinkByIdCall( @@ -1091,7 +1099,7 @@ private okhttp3.Call getFuturesOrderHistoryDownloadLinkByIdValidateBeforeCall( /** * Get Futures Order History Download Link by Id (USER_DATA) Get futures order history download - * link by Id * Download link expiration: 24h Weight: 5 + * link by Id Weight(IP): 5 Security Type: USER_DATA Notes: - Download link expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -1106,12 +1114,12 @@ private okhttp3.Call getFuturesOrderHistoryDownloadLinkByIdValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-futures-order-history-download-link-by-id">Get * Futures Order History Download Link by Id (USER_DATA) Documentation */ public ApiResponse - getFuturesOrderHistoryDownloadLinkById(@NotNull String downloadId, Long recvWindow) - throws ApiException { + getFuturesOrderHistoryDownloadLinkById( + @NotNull String downloadId, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFuturesOrderHistoryDownloadLinkByIdValidateBeforeCall(downloadId, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1134,8 +1142,8 @@ private okhttp3.Call getFuturesOrderHistoryDownloadLinkByIdValidateBeforeCall( * * * @see Get - * Futures Trade Download Link by Id(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-futures-trade-download-link-by-id">Get + * Futures Trade Download Link by Id (USER_DATA) Documentation */ private okhttp3.Call getFuturesTradeDownloadLinkByIdCall(String downloadId, Long recvWindow) throws ApiException { @@ -1235,8 +1243,8 @@ private okhttp3.Call getFuturesTradeDownloadLinkByIdValidateBeforeCall( } /** - * Get Futures Trade Download Link by Id(USER_DATA) Get futures trade download link by Id * - * Download link expiration: 24h Weight: 5 + * Get Futures Trade Download Link by Id (USER_DATA) Get futures trade download link by Id + * Weight(IP): 5 Security Type: USER_DATA Notes: - Download link expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -1251,11 +1259,11 @@ private okhttp3.Call getFuturesTradeDownloadLinkByIdValidateBeforeCall( * * * @see Get - * Futures Trade Download Link by Id(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-futures-trade-download-link-by-id">Get + * Futures Trade Download Link by Id (USER_DATA) Documentation */ public ApiResponse getFuturesTradeDownloadLinkById( - @NotNull String downloadId, Long recvWindow) throws ApiException { + @NotNull String downloadId, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFuturesTradeDownloadLinkByIdValidateBeforeCall(downloadId, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1278,7 +1286,7 @@ public ApiResponse getFuturesTradeDownl * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-futures-transaction-history-download-link-by-id">Get * Futures Transaction History Download Link by Id (USER_DATA) Documentation */ private okhttp3.Call getFuturesTransactionHistoryDownloadLinkByIdCall( @@ -1383,7 +1391,8 @@ private okhttp3.Call getFuturesTransactionHistoryDownloadLinkByIdValidateBeforeC /** * Get Futures Transaction History Download Link by Id (USER_DATA) Get futures transaction - * history download link by Id * Download link expiration: 24h Weight: 5 + * history download link by Id Weight(IP): 5 Security Type: USER_DATA Notes: - Download link + * expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -1398,12 +1407,12 @@ private okhttp3.Call getFuturesTransactionHistoryDownloadLinkByIdValidateBeforeC * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-futures-transaction-history-download-link-by-id">Get * Futures Transaction History Download Link by Id (USER_DATA) Documentation */ public ApiResponse getFuturesTransactionHistoryDownloadLinkById( - @NotNull String downloadId, Long recvWindow) throws ApiException { + @NotNull String downloadId, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFuturesTransactionHistoryDownloadLinkByIdValidateBeforeCall( downloadId, recvWindow); @@ -1415,14 +1424,12 @@ private okhttp3.Call getFuturesTransactionHistoryDownloadLinkByIdValidateBeforeC /** * Build call for getIncomeHistory * - * @param symbol (optional) - * @param incomeType \"TRANSFER\",\"WELCOME_BONUS\", - * \"FUNDING_FEE\", \"REALIZED_PNL\", \"COMMISSION\", - * \"INSURANCE_CLEAR\", and \"DELIVERED_SETTELMENT\" (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param page (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (optional) + * @param incomeType Income type. (optional) + * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) + * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) + * @param page Page number (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1434,12 +1441,12 @@ private okhttp3.Call getFuturesTransactionHistoryDownloadLinkByIdValidateBeforeC * * * @see Get - * Income History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-income-history">Get + * Income History (USER_DATA) Documentation */ private okhttp3.Call getIncomeHistoryCall( String symbol, - String incomeType, + IncomeType incomeType, Long startTime, Long endTime, Long page, @@ -1531,7 +1538,7 @@ private okhttp3.Call getIncomeHistoryCall( @SuppressWarnings("rawtypes") private okhttp3.Call getIncomeHistoryValidateBeforeCall( String symbol, - String incomeType, + IncomeType incomeType, Long startTime, Long endTime, Long page, @@ -1555,7 +1562,7 @@ private okhttp3.Call getIncomeHistoryValidateBeforeCall( .getMethod( "getIncomeHistory", String.class, - String.class, + IncomeType.class, Long.class, Long.class, Long.class, @@ -1580,19 +1587,17 @@ private okhttp3.Call getIncomeHistoryValidateBeforeCall( } /** - * Get Income History(USER_DATA) Get income history * If `incomeType ` is not sent, - * all kinds of flow will be returned * \"trandId\" is unique in the same - * \"incomeType\" for a user * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 20 + * Get Income History (USER_DATA) Get income history Weight(IP): 20 Security Type: USER_DATA + * Notes: - If `incomeType ` is not sent, all kinds of flow will be returned - + * \"trandId\" is unique in the same \"incomeType\" for a user - The time + * between `startTime` and `endTime` can not be longer than 1 year * - * @param symbol (optional) - * @param incomeType \"TRANSFER\",\"WELCOME_BONUS\", - * \"FUNDING_FEE\", \"REALIZED_PNL\", \"COMMISSION\", - * \"INSURANCE_CLEAR\", and \"DELIVERED_SETTELMENT\" (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param page (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (optional) + * @param incomeType Income type. (optional) + * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) + * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) + * @param page Page number (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return ApiResponse<GetIncomeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1605,17 +1610,17 @@ private okhttp3.Call getIncomeHistoryValidateBeforeCall( * * * @see Get - * Income History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-income-history">Get + * Income History (USER_DATA) Documentation */ public ApiResponse getIncomeHistory( String symbol, - String incomeType, + IncomeType incomeType, Long startTime, Long endTime, Long page, - Long limit, - Long recvWindow) + @Max(1000L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getIncomeHistoryValidateBeforeCall( @@ -1640,8 +1645,8 @@ public ApiResponse getIncomeHistory( * * * @see Notional - * Bracket for Pair(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#notional-bracket-for-pair">Notional + * Bracket for Pair (USER_DATA) Documentation */ private okhttp3.Call notionalBracketForPairCall(String pair, Long recvWindow) throws ApiException { @@ -1740,11 +1745,11 @@ private okhttp3.Call notionalBracketForPairValidateBeforeCall(String pair, Long } /** - * Notional Bracket for Pair(USER_DATA) **Not recommended to continue using this v1 endpoint** + * Notional Bracket for Pair (USER_DATA) **Not recommended to continue using this v1 endpoint** * Get the pair's default notional bracket list, may return ambiguous values when there have * been multiple different `symbol` brackets under the `pair`, suggest using * the following `GET /dapi/v2/leverageBracket` query instead to get the specific - * `symbol` notional bracket list. Weight: 1 + * `symbol` notional bracket list. Weight(IP): 1 Security Type: USER_DATA * * @param pair (optional) * @param recvWindow (optional) @@ -1759,11 +1764,11 @@ private okhttp3.Call notionalBracketForPairValidateBeforeCall(String pair, Long * * * @see Notional - * Bracket for Pair(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#notional-bracket-for-pair">Notional + * Bracket for Pair (USER_DATA) Documentation */ public ApiResponse notionalBracketForPair( - String pair, Long recvWindow) throws ApiException { + String pair, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = notionalBracketForPairValidateBeforeCall(pair, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -1785,8 +1790,8 @@ public ApiResponse notionalBracketForPair( * * * @see Notional - * Bracket for Symbol(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#notional-bracket-for-symbol">Notional + * Bracket for Symbol (USER_DATA) Documentation */ private okhttp3.Call notionalBracketForSymbolCall(String symbol, Long recvWindow) throws ApiException { @@ -1885,7 +1890,9 @@ private okhttp3.Call notionalBracketForSymbolValidateBeforeCall(String symbol, L } /** - * Notional Bracket for Symbol(USER_DATA) Get the symbol's notional bracket list. Weight: 1 + * Notional Bracket for Symbol (USER_DATA) Get the symbol's notional bracket list. Weight: 1 + * (after CM migration: 1 with `symbol` / 2 without `symbol`) Security Type: + * USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -1900,11 +1907,11 @@ private okhttp3.Call notionalBracketForSymbolValidateBeforeCall(String symbol, L * * * @see Notional - * Bracket for Symbol(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#notional-bracket-for-symbol">Notional + * Bracket for Symbol (USER_DATA) Documentation */ public ApiResponse notionalBracketForSymbol( - String symbol, Long recvWindow) throws ApiException { + String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = notionalBracketForSymbolValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -1914,7 +1921,7 @@ public ApiResponse notionalBracketForSymbol( /** * Build call for userCommissionRate * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1926,7 +1933,7 @@ public ApiResponse notionalBracketForSymbol( * * * @see User + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#user-commission-rate">User * Commission Rate (USER_DATA) Documentation */ private okhttp3.Call userCommissionRateCall(String symbol, Long recvWindow) @@ -2026,9 +2033,10 @@ private okhttp3.Call userCommissionRateValidateBeforeCall(String symbol, Long re } /** - * User Commission Rate (USER_DATA) Query user commission rate Weight: 20 + * User Commission Rate (USER_DATA) Query user commission rate Weight(IP): 20 Security Type: + * USER_DATA * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<UserCommissionRateResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2041,11 +2049,11 @@ private okhttp3.Call userCommissionRateValidateBeforeCall(String symbol, Long re * * * @see User + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#user-commission-rate">User * Commission Rate (USER_DATA) Documentation */ public ApiResponse userCommissionRate( - @NotNull String symbol, Long recvWindow) throws ApiException { + @NotNull String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = userCommissionRateValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/DerivativesTradingCoinFuturesRestApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/DerivativesTradingCoinFuturesRestApi.java index 97ea12516..285d25b6f 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/DerivativesTradingCoinFuturesRestApi.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/DerivativesTradingCoinFuturesRestApi.java @@ -22,7 +22,6 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ChangePositionModeRequest; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ChangePositionModeResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.CheckServerTimeResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ClassicPortfolioMarginAccountInformationResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.CompressedAggregateTradesListResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ContinuousContractKlineCandlestickDataResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ContractType; @@ -41,6 +40,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetIncomeHistoryResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetOrderModifyHistoryResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetPositionMarginChangeHistoryResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.IncomeType; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.IndexPriceAndMarkPriceResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.IndexPriceKlineCandlestickDataResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Interval; @@ -81,7 +81,6 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Ticker24hrPriceChangeStatisticsResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.TopTraderLongShortRatioAccountsResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.TopTraderLongShortRatioPositionsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Type; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.UserCommissionRateResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.UsersForceOrdersResponse; @@ -89,7 +88,6 @@ public class DerivativesTradingCoinFuturesRestApi { private final AccountApi accountApi; private final MarketDataApi marketDataApi; - private final PortfolioMarginEndpointsApi portfolioMarginEndpointsApi; private final TradeApi tradeApi; private final UserDataStreamsApi userDataStreamsApi; @@ -100,16 +98,15 @@ public DerivativesTradingCoinFuturesRestApi(ClientConfiguration configuration) { public DerivativesTradingCoinFuturesRestApi(ApiClient apiClient) { this.accountApi = new AccountApi(apiClient); this.marketDataApi = new MarketDataApi(apiClient); - this.portfolioMarginEndpointsApi = new PortfolioMarginEndpointsApi(apiClient); this.tradeApi = new TradeApi(apiClient); this.userDataStreamsApi = new UserDataStreamsApi(apiClient); } /** - * Account Information (USER_DATA) Get current account information. * for One-way Mode user, the - * \"positions\" will only show the \"BOTH\" positions * for Hedge Mode - * user, the \"positions\" will show \"BOTH\", \"LONG\", and - * \"SHORT\" positions. Weight: 5 + * Account Information (USER_DATA) Get current account information. Weight(IP): 5 Security Type: + * USER_DATA Notes: - for One-way Mode user, the \"positions\" will only show the + * \"BOTH\" positions - for Hedge Mode user, the \"positions\" will show + * \"BOTH\", \"LONG\", and \"SHORT\" positions. * * @param recvWindow (optional) * @return ApiResponse<AccountInformationResponse> @@ -123,7 +120,7 @@ public DerivativesTradingCoinFuturesRestApi(ApiClient apiClient) { * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#account-information">Account * Information (USER_DATA) Documentation */ public ApiResponse accountInformation(Long recvWindow) @@ -132,7 +129,8 @@ public ApiResponse accountInformation(Long recvWindo } /** - * Futures Account Balance (USER_DATA) Check futures account balance Weight: 1 + * Futures Account Balance (USER_DATA) Check futures account balance Weight(IP): 1 Security + * Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<FuturesAccountBalanceResponse> @@ -146,7 +144,7 @@ public ApiResponse accountInformation(Long recvWindo * * * @see Futures + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#futures-account-balance">Futures * Account Balance (USER_DATA) Documentation */ public ApiResponse futuresAccountBalance(Long recvWindow) @@ -155,8 +153,8 @@ public ApiResponse futuresAccountBalance(Long rec } /** - * Get Current Position Mode(USER_DATA) Get user's position mode (Hedge Mode or One-way Mode - * ) on ***EVERY symbol*** Weight: 30 + * Get Current Position Mode (USER_DATA) Get user's position mode (Hedge Mode or One-way + * Mode ) on ***EVERY symbol*** Weight(IP): 30 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetCurrentPositionModeResponse> @@ -170,8 +168,8 @@ public ApiResponse futuresAccountBalance(Long rec * * * @see Get - * Current Position Mode(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-current-position-mode">Get + * Current Position Mode (USER_DATA) Documentation */ public ApiResponse getCurrentPositionMode(Long recvWindow) throws ApiException { @@ -180,9 +178,11 @@ public ApiResponse getCurrentPositionMode(Long r /** * Get Download Id For Futures Order History (USER_DATA) Get Download Id For Futures Order - * History * Request Limitation is 10 times per month, shared by front end download page and - * rest api * The time between `startTime` and `endTime` can not be longer - * than 1 year Weight: 5 + * History Weight(IP): 1000 Security Type: USER_DATA Notes: - Request Limitation is 8 times per + * month, shared by front end download page and rest api - This endpoint uses the IP rate limit + * bucket and costs 1000 weight per call. The maximum is 2 calls per minute; the 3rd call within + * the same minute will trigger a ban. - The time between `startTime` and + * `endTime` can not be longer than 1 year * * @param startTime Timestamp in ms (required) * @param endTime Timestamp in ms (required) @@ -198,7 +198,7 @@ public ApiResponse getCurrentPositionMode(Long r * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-download-id-for-futures-order-history">Get * Download Id For Futures Order History (USER_DATA) Documentation */ public ApiResponse @@ -209,9 +209,11 @@ public ApiResponse getCurrentPositionMode(Long r /** * Get Download Id For Futures Trade History (USER_DATA) Get download id for futures trade - * history * Request Limitation is 5 times per month, shared by front end download page and rest - * api * The time between `startTime` and `endTime` can not be longer than 1 - * year Weight: 5 + * history Weight(IP): 1000 Security Type: USER_DATA Notes: - Request Limitation is 8 times per + * month, shared by front end download page and rest api - This endpoint uses the IP rate limit + * bucket and costs 1000 weight per call. The maximum is 2 calls per minute; the 3rd call within + * the same minute will trigger a ban. - The time between `startTime` and + * `endTime` can not be longer than 1 year * * @param startTime Timestamp in ms (required) * @param endTime Timestamp in ms (required) @@ -227,7 +229,7 @@ public ApiResponse getCurrentPositionMode(Long r * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-download-id-for-futures-trade-history">Get * Download Id For Futures Trade History (USER_DATA) Documentation */ public ApiResponse @@ -237,10 +239,12 @@ public ApiResponse getCurrentPositionMode(Long r } /** - * Get Download Id For Futures Transaction History(USER_DATA) Get download id for futures - * transaction history * Request Limitation is 5 times per month, shared by front end download - * page and rest api * The time between `startTime` and `endTime` can not be - * longer than 1 year Weight: 5 + * Get Download Id For Futures Transaction History (USER_DATA) Get download id for futures + * transaction history Weight(IP): 1000 Security Type: USER_DATA Notes: - Request Limitation is + * 8 times per month, shared by front end download page and rest api - This endpoint uses the IP + * rate limit bucket and costs 1000 weight per call. The maximum is 2 calls per minute; the 3rd + * call within the same minute will trigger a ban. - The time between `startTime` and + * `endTime` can not be longer than 1 year * * @param startTime Timestamp in ms (required) * @param endTime Timestamp in ms (required) @@ -256,8 +260,8 @@ public ApiResponse getCurrentPositionMode(Long r * * * @see Get - * Download Id For Futures Transaction History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-download-id-for-futures-transaction-history">Get + * Download Id For Futures Transaction History (USER_DATA) Documentation */ public ApiResponse getDownloadIdForFuturesTransactionHistory(Long startTime, Long endTime, Long recvWindow) @@ -267,7 +271,7 @@ public ApiResponse getCurrentPositionMode(Long r /** * Get Futures Order History Download Link by Id (USER_DATA) Get futures order history download - * link by Id * Download link expiration: 24h Weight: 5 + * link by Id Weight(IP): 5 Security Type: USER_DATA Notes: - Download link expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -282,7 +286,7 @@ public ApiResponse getCurrentPositionMode(Long r * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-futures-order-history-download-link-by-id">Get * Futures Order History Download Link by Id (USER_DATA) Documentation */ public ApiResponse @@ -292,8 +296,8 @@ public ApiResponse getCurrentPositionMode(Long r } /** - * Get Futures Trade Download Link by Id(USER_DATA) Get futures trade download link by Id * - * Download link expiration: 24h Weight: 5 + * Get Futures Trade Download Link by Id (USER_DATA) Get futures trade download link by Id + * Weight(IP): 5 Security Type: USER_DATA Notes: - Download link expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -308,8 +312,8 @@ public ApiResponse getCurrentPositionMode(Long r * * * @see Get - * Futures Trade Download Link by Id(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-futures-trade-download-link-by-id">Get + * Futures Trade Download Link by Id (USER_DATA) Documentation */ public ApiResponse getFuturesTradeDownloadLinkById( String downloadId, Long recvWindow) throws ApiException { @@ -318,7 +322,8 @@ public ApiResponse getFuturesTradeDownl /** * Get Futures Transaction History Download Link by Id (USER_DATA) Get futures transaction - * history download link by Id * Download link expiration: 24h Weight: 5 + * history download link by Id Weight(IP): 5 Security Type: USER_DATA Notes: - Download link + * expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -333,7 +338,7 @@ public ApiResponse getFuturesTradeDownl * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-futures-transaction-history-download-link-by-id">Get * Futures Transaction History Download Link by Id (USER_DATA) Documentation */ public ApiResponse @@ -343,19 +348,17 @@ public ApiResponse getFuturesTradeDownl } /** - * Get Income History(USER_DATA) Get income history * If `incomeType ` is not sent, - * all kinds of flow will be returned * \"trandId\" is unique in the same - * \"incomeType\" for a user * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 20 + * Get Income History (USER_DATA) Get income history Weight(IP): 20 Security Type: USER_DATA + * Notes: - If `incomeType ` is not sent, all kinds of flow will be returned - + * \"trandId\" is unique in the same \"incomeType\" for a user - The time + * between `startTime` and `endTime` can not be longer than 1 year * - * @param symbol (optional) - * @param incomeType \"TRANSFER\",\"WELCOME_BONUS\", - * \"FUNDING_FEE\", \"REALIZED_PNL\", \"COMMISSION\", - * \"INSURANCE_CLEAR\", and \"DELIVERED_SETTELMENT\" (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param page (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (optional) + * @param incomeType Income type. (optional) + * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) + * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) + * @param page Page number (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return ApiResponse<GetIncomeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -368,12 +371,12 @@ public ApiResponse getFuturesTradeDownl * * * @see Get - * Income History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-income-history">Get + * Income History (USER_DATA) Documentation */ public ApiResponse getIncomeHistory( String symbol, - String incomeType, + IncomeType incomeType, Long startTime, Long endTime, Long page, @@ -385,11 +388,11 @@ public ApiResponse getIncomeHistory( } /** - * Notional Bracket for Pair(USER_DATA) **Not recommended to continue using this v1 endpoint** + * Notional Bracket for Pair (USER_DATA) **Not recommended to continue using this v1 endpoint** * Get the pair's default notional bracket list, may return ambiguous values when there have * been multiple different `symbol` brackets under the `pair`, suggest using * the following `GET /dapi/v2/leverageBracket` query instead to get the specific - * `symbol` notional bracket list. Weight: 1 + * `symbol` notional bracket list. Weight(IP): 1 Security Type: USER_DATA * * @param pair (optional) * @param recvWindow (optional) @@ -404,8 +407,8 @@ public ApiResponse getIncomeHistory( * * * @see Notional - * Bracket for Pair(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#notional-bracket-for-pair">Notional + * Bracket for Pair (USER_DATA) Documentation */ public ApiResponse notionalBracketForPair( String pair, Long recvWindow) throws ApiException { @@ -413,7 +416,9 @@ public ApiResponse notionalBracketForPair( } /** - * Notional Bracket for Symbol(USER_DATA) Get the symbol's notional bracket list. Weight: 1 + * Notional Bracket for Symbol (USER_DATA) Get the symbol's notional bracket list. Weight: 1 + * (after CM migration: 1 with `symbol` / 2 without `symbol`) Security Type: + * USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -428,8 +433,8 @@ public ApiResponse notionalBracketForPair( * * * @see Notional - * Bracket for Symbol(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#notional-bracket-for-symbol">Notional + * Bracket for Symbol (USER_DATA) Documentation */ public ApiResponse notionalBracketForSymbol( String symbol, Long recvWindow) throws ApiException { @@ -437,9 +442,10 @@ public ApiResponse notionalBracketForSymbol( } /** - * User Commission Rate (USER_DATA) Query user commission rate Weight: 20 + * User Commission Rate (USER_DATA) Query user commission rate Weight(IP): 20 Security Type: + * USER_DATA * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<UserCommissionRateResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -452,7 +458,7 @@ public ApiResponse notionalBracketForSymbol( * * * @see User + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#user-commission-rate">User * Commission Rate (USER_DATA) Documentation */ public ApiResponse userCommissionRate( @@ -461,15 +467,13 @@ public ApiResponse userCommissionRate( } /** - * Basis Query basis * If startTime and endTime are not sent, the most recent data is returned. - * * Only the data of the latest 30 days is available. Weight: 1 + * Basis Query basis Weight(IP): 1 Notes: - If startTime and endTime are not sent, the most + * recent data is returned. - Only the data of the latest 30 days is available. * - * @param pair BTCUSD (required) - * @param contractType ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param pair Pair. (required) + * @param contractType Contract type. (required) + * @param period Period interval. (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<BasisResponse> @@ -483,7 +487,7 @@ public ApiResponse userCommissionRate( * * * @see Basis + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#basis">Basis * Documentation */ public ApiResponse basis( @@ -498,8 +502,8 @@ public ApiResponse basis( } /** - * Check Server time Test connectivity to the Rest API and get the current server time. Weight: - * 1 + * Check Server time Test connectivity to the Rest API and get the current server time. + * Weight(IP): 1 * * @return ApiResponse<CheckServerTimeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -512,7 +516,7 @@ public ApiResponse basis( * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#check-server-time">Check * Server time Documentation */ public ApiResponse checkServerTime() throws ApiException { @@ -521,22 +525,22 @@ public ApiResponse checkServerTime() throws ApiExceptio /** * Compressed/Aggregate Trades List Get compressed, aggregate trades. Market trades that fill in - * 100ms with the same price and the same taking side will have the quantity aggregated. * - * support querying futures trade histories that are not older than one year * If both - * `startTime` and `endTime` are sent, time between `startTime` - * and `endTime` must be less than 1 hour. * If `fromId`, - * `startTime`, and `endTime` are not sent, the most recent aggregate trades - * will be returned. * Only market trades will be aggregated and returned, which means the - * insurance fund trades and ADL trades won't be aggregated. * Sending both - * `startTime`/`endTime` and `fromId` might cause response - * timeout, please send either `fromId` or `startTime`/`endTime` - * Weight: 20 - * - * @param symbol (required) + * 100ms with the same price and the same taking side will have the quantity aggregated. + * Weight(IP): 20 Notes: - support querying futures trade histories that are not older than 24 + * hours - If both `startTime` and `endTime` are sent, time between + * `startTime` and `endTime` must be less than 1 hour. - If + * `fromId`, `startTime`, and `endTime` are not sent, the most + * recent aggregate trades will be returned. - Only market trades will be aggregated and + * returned, which means the insurance fund trades and ADL trades won't be aggregated. - + * Sending both `startTime`/`endTime` and `fromId` might cause + * response timeout, please send either `fromId` or + * `startTime`/`endTime` + * + * @param symbol Symbol (required) * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) + * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) + * @param limit Maximum number of records to return. (optional) * @return ApiResponse<CompressedAggregateTradesListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -548,7 +552,7 @@ public ApiResponse checkServerTime() throws ApiExceptio * * * @see Compressed/Aggregate + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#compressed-aggregate-trades-list">Compressed/Aggregate * Trades List Documentation */ public ApiResponse compressedAggregateTradesList( @@ -560,24 +564,24 @@ public ApiResponse compressedAggregateTra /** * Continuous Contract Kline/Candlestick Data Kline/candlestick bars for a specific contract - * type. Klines are uniquely identified by their open time. * Contract type: * PERPETUAL * - * CURRENT_QUARTER * NEXT_QUARTER 1000 | 10 * The difference between `startTime` and - * `endTime` can only be up to 200 days * Between `startTime` and + * type. Klines are uniquely identified by their open time. Weight: based on parameter + * `LIMIT` | LIMIT | weight | | --- | --- | | [1,100) | 1 | | [100, 500) | 2 | | [500, + * 1000] | 5 | | > 1000 | 10 | Notes: - The difference between `startTime` and + * `endTime` can only be up to 200 days - Between `startTime` and * `endTime`, the most recent `limit` data from `endTime` will be - * returned: * If `startTime` and `endTime` are not sent, current timestamp - * will be set as `endTime`, and the most recent data will be returned. * If + * returned: - If `startTime` and `endTime` are not sent, current timestamp + * will be set as `endTime`, and the most recent data will be returned. - If * `startTime` is sent only, the timestamp of 200 days after `startTime` - * will be set as `endTime`(up to the current time) * If `endTime` is sent + * will be set as `endTime`(up to the current time) - If `endTime` is sent * only, the timestamp of 200 days before `endTime` will be set as - * `startTime` Weight: based on parameter LIMIT LIMIT | weight ---|--- [1,100) | 1 - * [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 - * - * @param pair BTCUSD (required) - * @param contractType ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL (required) - * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * `startTime` + * + * @param pair After CM migration, accepts both CM and UM pair values. (required) + * @param contractType (required) + * @param interval Interval (required) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @return ApiResponse<ContinuousContractKlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -589,7 +593,7 @@ public ApiResponse compressedAggregateTra * * * @see Continuous + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#continuous-contract-kline-candlestick-data">Continuous * Contract Kline/Candlestick Data Documentation */ public ApiResponse @@ -606,7 +610,7 @@ public ApiResponse compressedAggregateTra } /** - * Exchange Information Current exchange trading rules and symbol information Weight: 1 + * Exchange Information Current exchange trading rules and symbol information Weight(IP): 1 * * @return ApiResponse<ExchangeInformationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -619,7 +623,7 @@ public ApiResponse compressedAggregateTra * * * @see Exchange + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#exchange-information">Exchange * Information Documentation */ public ApiResponse exchangeInformation() throws ApiException { @@ -627,13 +631,13 @@ public ApiResponse exchangeInformation() throws Api } /** - * Get Funding Rate History of Perpetual Futures Get Funding Rate History of Perpetual Futures * - * empty array will be returned for delivery symbols. Weight: 1 + * Get Funding Rate History of Perpetual Futures Get Funding Rate History of Perpetual Futures + * Weight(IP): 1 Notes: - empty array will be returned for delivery symbols. * - * @param symbol (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (required) + * @param startTime Timestamp in ms to get funding rate from INCLUSIVE. (optional) + * @param endTime Timestamp in ms to get funding rate until INCLUSIVE. (optional) + * @param limit Maximum number of records to return. (optional) * @return ApiResponse<GetFundingRateHistoryOfPerpetualFuturesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -645,7 +649,7 @@ public ApiResponse exchangeInformation() throws Api * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#get-funding-rate-history-of-perpetual-futures">Get * Funding Rate History of Perpetual Futures Documentation */ public ApiResponse @@ -656,8 +660,8 @@ public ApiResponse exchangeInformation() throws Api } /** - * Get Funding Rate Info Query funding rate info for symbols that had FundingRateCap/ - * FundingRateFloor / fundingIntervalHours adjustment Weight: 0 + * Get Funding Rate Info Query funding rate info for symbols that had + * FundingRateCap/FundingRateFloor/fundingIntervalHours adjustment * * @return ApiResponse<GetFundingRateInfoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -670,7 +674,7 @@ public ApiResponse exchangeInformation() throws Api * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#get-funding-rate-info">Get * Funding Rate Info Documentation */ public ApiResponse getFundingRateInfo() throws ApiException { @@ -678,7 +682,7 @@ public ApiResponse getFundingRateInfo() throws ApiEx } /** - * Index Price and Mark Price Query index price and mark price Weight: 10 + * Index Price and Mark Price Query index price and mark price Weight(IP): 10 * * @param symbol (optional) * @param pair (optional) @@ -693,7 +697,7 @@ public ApiResponse getFundingRateInfo() throws ApiEx * * * @see Index + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#index-price-and-mark-price">Index * Price and Mark Price Documentation */ public ApiResponse indexPriceAndMarkPrice( @@ -703,22 +707,23 @@ public ApiResponse indexPriceAndMarkPrice( /** * Index Price Kline/Candlestick Data Kline/candlestick bars for the index price of a pair. - * Klines are uniquely identified by their open time. 1000 | 10 * The difference between - * `startTime` and `endTime` can only be up to 200 days * Between - * `startTime` and `endTime`, the most recent `limit` data from - * `endTime` will be returned: * If `startTime` and `endTime` are - * not sent, current timestamp will be set as `endTime`, and the most recent data will - * be returned. * If `startTime` is sent only, the timestamp of 200 days after - * `startTime` will be set as `endTime`(up to the current time) * If - * `endTime` is sent only, the timestamp of 200 days before `endTime` will - * be set as `startTime` Weight: based on parameter LIMIT LIMIT | weight ---|--- - * [1,100) | 1 [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 + * Klines are uniquely identified by their open time. Weight: Based on parameter + * `LIMIT` | LIMIT | weight | | --- | --- | | [1,100) | 1 | | [100, 500) | 2 | | [500, + * 1000] | 5 | | > 1000 | 10 | Notes: - The difference between `startTime` and + * `endTime` can only be up to 200 days - Between `startTime` and + * `endTime`, the most recent `limit` data from `endTime` will be + * returned: - If `startTime` and `endTime` are not sent, current timestamp + * will be set as `endTime`, and the most recent data will be returned. - If + * `startTime` is sent only, the timestamp of 200 days after `startTime` + * will be set as `endTime`(up to the current time) - If `endTime` is sent + * only, the timestamp of 200 days before `endTime` will be set as + * `startTime` * - * @param pair BTCUSD (required) - * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param pair After CM migration, accepts both CM and UM pair values. (required) + * @param interval Interval (required) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @return ApiResponse<IndexPriceKlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -730,7 +735,7 @@ public ApiResponse indexPriceAndMarkPrice( * * * @see Index + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#index-price-kline-candlestick-data">Index * Price Kline/Candlestick Data Documentation */ public ApiResponse indexPriceKlineCandlestickData( @@ -742,22 +747,22 @@ public ApiResponse indexPriceKlineCandle /** * Kline/Candlestick Data Kline/candlestick bars for a symbol. Klines are uniquely identified by - * their open time. 1000 | 10 * The difference between `startTime` and - * `endTime` can only be up to 200 days * Between `startTime` and - * `endTime`, the most recent `limit` data from `endTime` will be - * returned: * If `startTime` and `endTime` are not sent, current timestamp - * will be set as `endTime`, and the most recent data will be returned. * If - * `startTime` is sent only, the timestamp of 200 days after `startTime` - * will be set as `endTime`(up to the current time) * If `endTime` is sent - * only, the timestamp of 200 days before `endTime` will be set as - * `startTime` Weight: based on parameter LIMIT LIMIT | weight ---|--- [1,100) | 1 - * [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 + * their open time. Weight: Based on parameter `LIMIT` | LIMIT | weight | | --- | --- + * | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - The + * difference between `startTime` and `endTime` can only be up to 200 days - + * Between `startTime` and `endTime`, the most recent `limit` data + * from `endTime` will be returned: - If `startTime` and `endTime` + * are not sent, current timestamp will be set as `endTime`, and the most recent data + * will be returned. - If `startTime` is sent only, the timestamp of 200 days after + * `startTime` will be set as `endTime`(up to the current time) - If + * `endTime` is sent only, the timestamp of 200 days before `endTime` will + * be set as `startTime` * - * @param symbol (required) - * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol After CM migration, accepts both CM and UM symbols. (required) + * @param interval Interval (required) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @return ApiResponse<KlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -769,7 +774,7 @@ public ApiResponse indexPriceKlineCandle * * * @see Kline/Candlestick + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#kline-candlestick-data">Kline/Candlestick * Data Documentation */ public ApiResponse klineCandlestickData( @@ -779,14 +784,13 @@ public ApiResponse klineCandlestickData( } /** - * Long/Short Ratio Query symbol Long/Short Ratio * If startTime and endTime are not sent, the - * most recent data is returned. * Only the data of the latest 30 days is available. Weight: 1 + * Long/Short Ratio Query symbol Long/Short Ratio Weight(IP): 1 Notes: - If startTime and + * endTime are not sent, the most recent data is returned. - Only the data of the latest 30 days + * is available. * * @param pair BTCUSD (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<LongShortRatioResponse> @@ -800,7 +804,7 @@ public ApiResponse klineCandlestickData( * * * @see Long/Short + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#long-short-ratio">Long/Short * Ratio Documentation */ public ApiResponse longShortRatio( @@ -811,22 +815,23 @@ public ApiResponse longShortRatio( /** * Mark Price Kline/Candlestick Data Kline/candlestick bars for the mark price of a symbol. - * Klines are uniquely identified by their open time. 1000 | 10 * The difference between - * `startTime` and `endTime` can only be up to 200 days * Between - * `startTime` and `endTime`, the most recent `limit` data from - * `endTime` will be returned: * If `startTime` and `endTime` are - * not sent, current timestamp will be set as `endTime`, and the most recent data will - * be returned. * If `startTime` is sent only, the timestamp of 200 days after - * `startTime` will be set as `endTime`(up to the current time) * If - * `endTime` is sent only, the timestamp of 200 days before `endTime` will - * be set as `startTime` Weight: based on parameter LIMIT LIMIT | weight ---|--- - * [1,100) | 1 [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 + * Klines are uniquely identified by their open time. Weight: Based on parameter + * `LIMIT` | LIMIT | weight | | --- | --- | | [1,100) | 1 | | [100, 500) | 2 | | [500, + * 1000] | 5 | | > 1000 | 10 | Notes: - The difference between `startTime` and + * `endTime` can only be up to 200 days - Between `startTime` and + * `endTime`, the most recent `limit` data from `endTime` will be + * returned: - If `startTime` and `endTime` are not sent, current timestamp + * will be set as `endTime`, and the most recent data will be returned. - If + * `startTime` is sent only, the timestamp of 200 days after `startTime` + * will be set as `endTime`(up to the current time) - If `endTime` is sent + * only, the timestamp of 200 days before `endTime` will be set as + * `startTime` * - * @param symbol (required) - * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol After CM migration, accepts both CM and UM symbols. (required) + * @param interval Interval (required) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @return ApiResponse<MarkPriceKlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -838,7 +843,7 @@ public ApiResponse longShortRatio( * * * @see Mark + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#mark-price-kline-candlestick-data">Mark * Price Kline/Candlestick Data Documentation */ public ApiResponse markPriceKlineCandlestickData( @@ -849,13 +854,14 @@ public ApiResponse markPriceKlineCandlest } /** - * Old Trades Lookup(MARKET_DATA) Get older market historical trades. * Market trades means - * trades filled in the order book. Only market trades will be returned, which means the - * insurance fund trades and ADL trades won't be returned. Weight: 20 + * Old Trades Lookup (MARKET_DATA) Get older market historical trades. Weight(IP): 20 Security + * Type: MARKET_DATA Notes: - Market trades means trades filled in the order book. Only market + * trades will be returned, which means the insurance fund trades and ADL trades won't be + * returned. - Only supports data from within the last one month * - * @param symbol (required) - * @param limit Default 100; max 1000 (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) + * @param symbol Symbol (required) + * @param limit Maximum number of records to return. (optional) + * @param fromId TradeId to fetch from. Default gets most recent trades. (optional) * @return ApiResponse<OldTradesLookupResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -867,8 +873,8 @@ public ApiResponse markPriceKlineCandlest * * * @see Old - * Trades Lookup(MARKET_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#old-trades-lookup">Old + * Trades Lookup (MARKET_DATA) Documentation */ public ApiResponse oldTradesLookup( String symbol, Long limit, Long fromId) throws ApiException { @@ -876,9 +882,9 @@ public ApiResponse oldTradesLookup( } /** - * Open Interest Get present open interest of a specific symbol. Weight: 1 + * Open Interest Get present open interest of a specific symbol. Weight(IP): 1 * - * @param symbol (required) + * @param symbol Symbol (required) * @return ApiResponse<OpenInterestResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -890,7 +896,7 @@ public ApiResponse oldTradesLookup( * * * @see Open + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#open-interest">Open * Interest Documentation */ public ApiResponse openInterest(String symbol) throws ApiException { @@ -898,16 +904,14 @@ public ApiResponse openInterest(String symbol) throws ApiE } /** - * Open Interest Statistics Query open interest stats * If startTime and endTime are not sent, - * the most recent data is returned. * Only the data of the latest 30 days is available. Weight: - * 1 + * Open Interest Statistics Query open interest stats Weight(IP): 1 Notes: - If startTime and + * endTime are not sent, the most recent data is returned. - Only the data of the latest 30 days + * is available. * - * @param pair BTCUSD (required) - * @param contractType ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param pair (required) + * @param contractType (required) + * @param period (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<OpenInterestStatisticsResponse> @@ -921,7 +925,7 @@ public ApiResponse openInterest(String symbol) throws ApiE * * * @see Open + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#open-interest-statistics">Open * Interest Statistics Documentation */ public ApiResponse openInterestStatistics( @@ -937,11 +941,12 @@ public ApiResponse openInterestStatistics( } /** - * Order Book Query orderbook on specific symbol Weight: Adjusted based on the limit: Limit | - * Weight ------------ | ------------ 5, 10, 20, 50 | 2 100 | 5 500 | 10 1000 | 20 + * Order Book Query orderbook on specific symbol Weight: Adjusted based on the limit: | Limit | + * Weight | | ------------ | ------------ | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | + * 1000 | 20 | * - * @param symbol (required) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (required) + * @param limit Valid limits:[5, 10, 20, 50, 100, 500, 1000]. (optional) * @return ApiResponse<OrderBookResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -953,7 +958,7 @@ public ApiResponse openInterestStatistics( * * * @see Order + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#order-book">Order * Book Documentation */ public ApiResponse orderBook(String symbol, Long limit) throws ApiException { @@ -962,15 +967,15 @@ public ApiResponse orderBook(String symbol, Long limit) throw /** * Premium index Kline Data Premium index kline bars of a symbol. Klines are uniquely identified - * by their open time. * If startTime and endTime are not sent, the most recent klines are - * returned. Weight: based on parameter LIMIT | LIMIT | weight | | ----------- | ------ | | - * [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | - * - * @param symbol (required) - * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * by their open time. Weight: Based on parameter `LIMIT` | LIMIT | weight | | + * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | + * 10 | Notes: - If startTime and endTime are not sent, the most recent klines are returned. + * + * @param symbol After CM migration, accepts both CM and UM symbols. (required) + * @param interval Interval (required) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @return ApiResponse<PremiumIndexKlineDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -982,7 +987,7 @@ public ApiResponse orderBook(String symbol, Long limit) throw * * * @see Premium + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#premium-index-kline-data">Premium * index Kline Data Documentation */ public ApiResponse premiumIndexKlineData( @@ -992,9 +997,9 @@ public ApiResponse premiumIndexKlineData( } /** - * Query Index Price Constituents Query index price constituents Weight: 1 + * Query Index Price Constituents Query index price constituents Weight(IP): 1 * - * @param symbol (required) + * @param symbol Symbol (required) * @return ApiResponse<QueryIndexPriceConstituentsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1006,7 +1011,7 @@ public ApiResponse premiumIndexKlineData( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#query-index-price-constituents">Query * Index Price Constituents Documentation */ public ApiResponse queryIndexPriceConstituents( @@ -1015,12 +1020,12 @@ public ApiResponse queryIndexPriceConstitue } /** - * Recent Trades List Get recent market trades * Market trades means trades filled in the order - * book. Only market trades will be returned, which means the insurance fund trades and ADL - * trades won't be returned. Weight: 5 + * Recent Trades List Get recent market trades Weight(IP): 5 Notes: - Market trades means trades + * filled in the order book. Only market trades will be returned, which means the insurance fund + * trades and ADL trades won't be returned. * - * @param symbol (required) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (required) + * @param limit Maximum number of records to return. (optional) * @return ApiResponse<RecentTradesListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1032,7 +1037,7 @@ public ApiResponse queryIndexPriceConstitue * * * @see Recent + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#recent-trades-list">Recent * Trades List Documentation */ public ApiResponse recentTradesList(String symbol, Long limit) @@ -1041,13 +1046,14 @@ public ApiResponse recentTradesList(String symbol, Lon } /** - * Symbol Order Book Ticker Best price/qty on the order book for a symbol or symbols. * Symbol - * and pair cannot be sent together * If a pair is sent,tickers for all symbols of the pair will - * be returned * If either a pair or symbol is sent, tickers for all symbols of all pairs will - * be returned Weight: 2 for a single symbol, 5 when the symbol parameter is omitted + * Symbol Order Book Ticker Best price/qty on the order book for a symbol or symbols. Weight: + * **2** for a single symbol, **5** when the symbol parameter is omitted Notes: - Symbol and + * pair cannot be sent together - If a pair is sent,tickers for all symbols of the pair will be + * returned - If either a pair or symbol is sent, tickers for all symbols of all pairs will be + * returned * - * @param symbol (optional) - * @param pair (optional) + * @param symbol Symbol (optional) + * @param pair Symbol (optional) * @return ApiResponse<SymbolOrderBookTickerResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1059,7 +1065,7 @@ public ApiResponse recentTradesList(String symbol, Lon * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#symbol-order-book-ticker">Symbol * Order Book Ticker Documentation */ public ApiResponse symbolOrderBookTicker( @@ -1068,13 +1074,13 @@ public ApiResponse symbolOrderBookTicker( } /** - * Symbol Price Ticker Latest price for a symbol or symbols. * Symbol and pair cannot be sent - * together * If a pair is sent,tickers for all symbols of the pair will be returned * If either - * a pair or symbol is sent, tickers for all symbols of all pairs will be returned Weight: 1 for - * a single symbol, 2 when the symbol parameter is omitted + * Symbol Price Ticker Latest price for a symbol or symbols. Weight: **1** for a single symbol, + * **2** when the symbol parameter is omitted Notes: - Symbol and pair cannot be sent together - + * If a pair is sent,tickers for all symbols of the pair will be returned - If either a pair or + * symbol is sent, tickers for all symbols of all pairs will be returned * - * @param symbol (optional) - * @param pair (optional) + * @param symbol Symbol (optional) + * @param pair Pair (optional) * @return ApiResponse<SymbolPriceTickerResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1086,7 +1092,7 @@ public ApiResponse symbolOrderBookTicker( * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#symbol-price-ticker">Symbol * Price Ticker Documentation */ public ApiResponse symbolPriceTicker(String symbol, String pair) @@ -1097,15 +1103,13 @@ public ApiResponse symbolPriceTicker(String symbol, S /** * Taker Buy/Sell Volume Taker Buy Volume: the total volume of buy orders filled by takers * within the period. Taker Sell Volume: the total volume of sell orders filled by takers within - * the period. * If startTime and endTime are not sent, the most recent data is returned. * Only - * the data of the latest 30 days is available. Weight: 1 + * the period. Weight(IP): 1 Notes: - If startTime and endTime are not sent, the most recent + * data is returned. - Only the data of the latest 30 days is available. * - * @param pair BTCUSD (required) - * @param contractType ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param pair (required) + * @param contractType (required) + * @param period (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<TakerBuySellVolumeResponse> @@ -1119,7 +1123,7 @@ public ApiResponse symbolPriceTicker(String symbol, S * * * @see Taker + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#taker-buy-sell-volume">Taker * Buy/Sell Volume Documentation */ public ApiResponse takerBuySellVolume( @@ -1135,7 +1139,7 @@ public ApiResponse takerBuySellVolume( } /** - * Test Connectivity Test connectivity to the Rest API. Weight: 1 + * Test Connectivity Test connectivity to the Rest API. Weight(IP): 1 * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1148,7 +1152,7 @@ public ApiResponse takerBuySellVolume( * * * @see Test + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#test-connectivity">Test * Connectivity Documentation */ public void testConnectivity() throws ApiException { @@ -1156,14 +1160,14 @@ public void testConnectivity() throws ApiException { } /** - * 24hr Ticker Price Change Statistics 24 hour rolling window price change statistics. * Symbol - * and pair cannot be sent together * If a pair is sent,tickers for all symbols of the pair will - * be returned * If either a pair or symbol is sent, tickers for all symbols of all pairs will - * be returned Weight: 1 for a single symbol, 40 when the symbol parameter is omitted Careful - * when accessing this with no symbol. + * 24hr Ticker Price Change Statistics 24 hour rolling window price change statistics. Weight: + * **1** for a single symbol, **40** when the symbol parameter is omitted **Careful** when + * accessing this with no symbol. Notes: - Symbol and pair cannot be sent together - If a pair + * is sent,tickers for all symbols of the pair will be returned - If either a pair or symbol is + * sent, tickers for all symbols of all pairs will be returned * - * @param symbol (optional) - * @param pair (optional) + * @param symbol Symbol (optional) + * @param pair Pair (optional) * @return ApiResponse<Ticker24hrPriceChangeStatisticsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1175,7 +1179,7 @@ public void testConnectivity() throws ApiException { * * * @see 24hr + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#ticker24hr-price-change-statistics">24hr * Ticker Price Change Statistics Documentation */ public ApiResponse ticker24hrPriceChangeStatistics( @@ -1184,20 +1188,18 @@ public ApiResponse ticker24hrPriceChang } /** - * Top Trader Long/Short Ratio (Accounts) The proportion of net long and net short accounts to + * Top Trader Long/Short Account Ratio The proportion of net long and net short accounts to * total accounts of the top 20% users with the highest margin balance. Each account is counted * once only. Long Account % = Accounts of top traders with net long positions / Total * accounts of top traders with open positions Short Account % = Accounts of top traders * with net short positions / Total accounts of top traders with open positions Long/Short Ratio - * (Accounts) = Long Account % / Short Account % * If startTime and endTime are not sent, - * the most recent data is returned. * Only the data of the latest 30 days is available. Weight: - * 1 + * (Accounts) = Long Account % / Short Account % Weight(IP): 1 Security Type: Accounts + * Notes: - If startTime and endTime are not sent, the most recent data is returned. - Only the + * data of the latest 30 days is available. * - * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (required) + * @param period (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<TopTraderLongShortRatioAccountsResponse> @@ -1211,8 +1213,8 @@ public ApiResponse ticker24hrPriceChang * * * @see Top - * Trader Long/Short Ratio (Accounts) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#top-trader-long-short-ratio-accounts">Top + * Trader Long/Short Account Ratio Documentation */ public ApiResponse topTraderLongShortRatioAccounts( String symbol, Period period, Long limit, Long startTime, Long endTime) @@ -1222,19 +1224,17 @@ public ApiResponse topTraderLongShortRa } /** - * Top Trader Long/Short Ratio (Positions) The proportion of net long and net short positions to + * Top Trader Long/Short Position Ratio The proportion of net long and net short positions to * total open positions of the top 20% users with the highest margin balance. Long Position % * = Long positions of top traders / Total open positions of top traders Short Position % * = Short positions of top traders / Total open positions of top traders Long/Short Ratio - * (Positions) = Long Position % / Short Position % * If startTime and endTime are not - * sent, the most recent data is returned. * Only the data of the latest 30 days is available. - * Weight: 1 + * (Positions) = Long Position % / Short Position % Weight(IP): 1 Security Type: Positions + * Notes: - If startTime and endTime are not sent, the most recent data is returned. - Only the + * data of the latest 30 days is available. * - * @param pair BTCUSD (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param pair (required) + * @param period (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<TopTraderLongShortRatioPositionsResponse> @@ -1248,8 +1248,8 @@ public ApiResponse topTraderLongShortRa * * * @see Top - * Trader Long/Short Ratio (Positions) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#top-trader-long-short-ratio-positions">Top + * Trader Long/Short Position Ratio Documentation */ public ApiResponse topTraderLongShortRatioPositions( String pair, Period period, Long limit, Long startTime, Long endTime) @@ -1259,49 +1259,22 @@ public ApiResponse topTraderLongShortR } /** - * Classic Portfolio Margin Account Information (USER_DATA) Get Classic Portfolio Margin current - * account information. * maxWithdrawAmount is for asset transfer out to the spot wallet. - * Weight: 5 - * - * @param asset (required) - * @param recvWindow (optional) - * @return ApiResponse<ClassicPortfolioMarginAccountInformationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Classic Portfolio Margin Account Information -
- * - * @see Classic - * Portfolio Margin Account Information (USER_DATA) Documentation - */ - public ApiResponse - classicPortfolioMarginAccountInformation(String asset, Long recvWindow) - throws ApiException { - return portfolioMarginEndpointsApi.classicPortfolioMarginAccountInformation( - asset, recvWindow); - } - - /** - * Account Trade List (USER_DATA) Get trades for a specific account and symbol. * Either symbol - * or pair must be sent * Symbol and pair cannot be sent together * Pair and fromId cannot be - * sent together * OrderId can only be sent together with symbol * If a pair is sent,tickers for - * all symbols of the pair will be returned * The parameter `fromId` cannot be sent - * with `startTime` or `endTime` * If startTime and endTime are both not - * sent, then the last 7 days' data will be returned. * The time between startTime and - * endTime cannot be longer than 7 days. Weight: 20 with symbol,40 with pair + * Account Trade List (USER_DATA) Get trades for a specific account and symbol. Weight: **20** + * with symbol,**40** with pair (after CM migration: **5** flat) Security Type: USER_DATA Notes: + * - Either symbol or pair must be sent - Symbol and pair cannot be sent together - Pair and + * fromId cannot be sent together - OrderId can only be sent together with symbol - If a pair is + * sent,tickers for all symbols of the pair will be returned - The parameter `fromId` + * cannot be sent with `startTime` or `endTime` - If startTime and endTime + * are both not sent, then the last 7 days' data will be returned. - The time between + * startTime and endTime cannot be longer than 7 days. * - * @param symbol (optional) - * @param pair (optional) - * @param orderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (optional) + * @param pair pair (optional) + * @param orderId Order ID (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return ApiResponse<AccountTradeListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1314,13 +1287,13 @@ public ApiResponse topTraderLongShortR * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#account-trade-list">Account * Trade List (USER_DATA) Documentation */ public ApiResponse accountTradeList( String symbol, String pair, - Long orderId, + String orderId, Long startTime, Long endTime, Long fromId, @@ -1334,20 +1307,21 @@ public ApiResponse accountTradeList( /** * All Orders (USER_DATA) Get all account orders; active, canceled, or filled. * These orders * will not be found: * order status is CANCELED or EXPIRED AND order has NO filled trade AND - * created time + 3 days < current time * order create time + 90 days < current time * - * Either `symbol` or `pair` must be sent. * `pair` can't be - * sent with `orderId` * If `orderId` is set, it will get orders >= - * that `orderId`. Otherwise most recent orders are returned. * If orderId is set, it - * will get orders >= that orderId. Otherwise most recent orders are returned. * The - * query time period must be less then 7 days( default as the recent 7 days). Weight: 20 with - * symbol, 40 with pair - * - * @param symbol (optional) - * @param pair (optional) + * created time + 3 days < current time * order create time + 90 days < current time + * Weight: **20** with symbol, **40** with pair (after CM migration: **5** flat) Security Type: + * USER_DATA Notes: - Either `symbol` or `pair` must be sent. - + * `pair` can't be sent with `orderId` - If `orderId` is set, + * it will get orders >= that `orderId`. Otherwise most recent orders are + * returned. - If orderId is set, it will get orders >= that orderId. Otherwise most + * recent orders are returned. - The query time period must be less then 7 days( default as the + * recent 7 days). + * + * @param symbol Symbol (optional) + * @param pair Pair (optional) * @param orderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return ApiResponse<AllOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1360,7 +1334,7 @@ public ApiResponse accountTradeList( * * * @see All + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#all-orders">All * Orders (USER_DATA) Documentation */ public ApiResponse allOrders( @@ -1385,7 +1359,8 @@ public ApiResponse allOrders( * to be too precise or too small. * Example usage: Call this endpoint at 30s intervals with an * countdownTime of 120000 (120s). If this endpoint is not called within 120 seconds, all your * orders of the specified symbol will be automatically canceled. If this endpoint is called - * with an countdownTime of 0, the countdown timer will be stopped. Weight: 10 + * with an countdownTime of 0, the countdown timer will be stopped. Weight(IP): 10 Security + * Type: TRADE * * @param autoCancelAllOpenOrdersRequest (required) * @return ApiResponse<AutoCancelAllOpenOrdersResponse> @@ -1399,7 +1374,7 @@ public ApiResponse allOrders( * * * @see Auto-Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#auto-cancel-all-open-orders">Auto-Cancel * All Open Orders (TRADE) Documentation */ public ApiResponse autoCancelAllOpenOrders( @@ -1408,9 +1383,9 @@ public ApiResponse autoCancelAllOpenOrders( } /** - * Cancel All Open Orders(TRADE) Cancel All Open Orders Weight: 1 + * Cancel All Open Orders (TRADE) Cancel All Open Orders Weight(IP): 1 Security Type: TRADE * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<CancelAllOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1423,8 +1398,8 @@ public ApiResponse autoCancelAllOpenOrders( * * * @see Cancel - * All Open Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#cancel-all-open-orders">Cancel + * All Open Orders (TRADE) Documentation */ public ApiResponse cancelAllOpenOrders( String symbol, Long recvWindow) throws ApiException { @@ -1432,14 +1407,12 @@ public ApiResponse cancelAllOpenOrders( } /** - * Cancel Multiple Orders(TRADE) Cancel Multiple Orders * Either `orderIdList` or - * `origClientOrderIdList ` must be sent. Weight: 1 + * Cancel Multiple Orders (TRADE) Cancel Multiple Orders Weight(IP): 1 Security Type: TRADE + * Notes: - Either `orderIdList` or `origClientOrderIdList ` must be sent. * - * @param symbol (required) - * @param orderIdList max length 10 <br /> e.g. [1234567,2345678] (optional) - * @param origClientOrderIdList max length 10<br /> e.g. - * [\"my_id_1\",\"my_id_2\"], encode the double quotes. No space after - * comma. (optional) + * @param symbol Symbol (required) + * @param orderIdList Order IDs to cancel. (optional) + * @param origClientOrderIdList Original client order IDs to cancel. (optional) * @param recvWindow (optional) * @return ApiResponse<CancelMultipleOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1452,8 +1425,8 @@ public ApiResponse cancelAllOpenOrders( * * * @see Cancel - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#cancel-multiple-orders">Cancel + * Multiple Orders (TRADE) Documentation */ public ApiResponse cancelMultipleOrders( String symbol, @@ -1466,12 +1439,12 @@ public ApiResponse cancelMultipleOrders( } /** - * Cancel Order (TRADE) Cancel an active order. * Either `orderId` or - * `origClientOrderId` must be sent. Weight: 1 + * Cancel Order (TRADE) Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - + * Either `orderId` or `origClientOrderId` must be sent. * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) * @param recvWindow (optional) * @return ApiResponse<CancelOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1484,7 +1457,7 @@ public ApiResponse cancelMultipleOrders( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#cancel-order">Cancel * Order (TRADE) Documentation */ public ApiResponse cancelOrder( @@ -1496,7 +1469,7 @@ public ApiResponse cancelOrder( /** * Change Initial Leverage (TRADE) Change user's initial leverage in the specific symbol * market. For Hedge Mode, LONG and SHORT positions of one symbol use the same initial leverage - * and share a total notional value. Weight: 1 + * and share a total notional value. Weight(IP): 1 Security Type: TRADE * * @param changeInitialLeverageRequest (required) * @return ApiResponse<ChangeInitialLeverageResponse> @@ -1510,7 +1483,7 @@ public ApiResponse cancelOrder( * * * @see Change + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#change-initial-leverage">Change * Initial Leverage (TRADE) Documentation */ public ApiResponse changeInitialLeverage( @@ -1521,7 +1494,8 @@ public ApiResponse changeInitialLeverage( /** * Change Margin Type (TRADE) Change user's margin type in the specific symbol market.For * Hedge Mode, LONG and SHORT positions of one symbol use the same margin type. With ISOLATED - * margin type, margins of the LONG and SHORT positions are isolated from each other. Weight: 1 + * margin type, margins of the LONG and SHORT positions are isolated from each other. + * Weight(IP): 1 Security Type: TRADE * * @param changeMarginTypeRequest (required) * @return ApiResponse<ChangeMarginTypeResponse> @@ -1535,7 +1509,7 @@ public ApiResponse changeInitialLeverage( * * * @see Change + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#change-margin-type">Change * Margin Type (TRADE) Documentation */ public ApiResponse changeMarginType( @@ -1544,8 +1518,12 @@ public ApiResponse changeMarginType( } /** - * Change Position Mode(TRADE) Change user's position mode (Hedge Mode or One-way Mode ) on - * ***EVERY symbol*** Weight: 1 + * Change Position Mode (TRADE) Change user's position mode (Hedge Mode or One-way Mode ) on + * ***EVERY symbol***. **After CM migration**, UM and CM share the **same** + * `dualSidePosition` setting. Calling this endpoint flips both UM and CM at once. If + * either side has any open order or open position, the change is rejected: - `-4067` + * (open orders exist) - `-4068` (open position exists) Weight(IP): 1 Security Type: + * TRADE * * @param changePositionModeRequest (required) * @return ApiResponse<ChangePositionModeResponse> @@ -1559,8 +1537,8 @@ public ApiResponse changeMarginType( * * * @see Change - * Position Mode(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#change-position-mode">Change + * Position Mode (TRADE) Documentation */ public ApiResponse changePositionMode( ChangePositionModeRequest changePositionModeRequest) throws ApiException { @@ -1569,10 +1547,12 @@ public ApiResponse changePositionMode( /** * Current All Open Orders (USER_DATA) Get all open orders on a symbol. **Careful** when - * accessing this with no symbol. Weight: 1 for a single symbol, 40 for mutltiple symbols + * accessing this with no symbol. Weight(IP): null Weight: **1** for a single symbol, **40** for + * mutltiple symbols Security Type: USER_DATA * - * @param symbol (optional) - * @param pair (optional) + * @param symbol Symbol. **After CM migration, an invalid `symbol` returns + * `-1121` (previously a silent `200`).** (optional) + * @param pair Pair (optional) * @param recvWindow (optional) * @return ApiResponse<CurrentAllOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1585,7 +1565,7 @@ public ApiResponse changePositionMode( * * * @see Current + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#current-all-open-orders">Current * All Open Orders (USER_DATA) Documentation */ public ApiResponse currentAllOpenOrders( @@ -1594,17 +1574,17 @@ public ApiResponse currentAllOpenOrders( } /** - * Get Order Modify History (USER_DATA) Get order modification history * Either - * `orderId` or `origClientOrderId` must be sent, and the - * `orderId` will prevail if both are sent. * Order modify history longer than 3 month - * is not avaliable Weight: 1 + * Get Order Modify History (USER_DATA) Get order modification history Weight(IP): 1 Security + * Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be + * sent, and the `orderId` will prevail if both are sent. - Order modify history + * longer than 3 month is not avaliable * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) + * @param startTime Timestamp in ms to get modification history from INCLUSIVE (optional) + * @param endTime Timestamp in ms to get modification history until INCLUSIVE (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return ApiResponse<GetOrderModifyHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1617,7 +1597,7 @@ public ApiResponse currentAllOpenOrders( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#get-order-modify-history">Get * Order Modify History (USER_DATA) Documentation */ public ApiResponse getOrderModifyHistory( @@ -1634,13 +1614,14 @@ public ApiResponse getOrderModifyHistory( } /** - * Get Position Margin Change History(TRADE) Get position margin change history Weight: 1 + * Get Position Margin Change History (TRADE) Get position margin change history Weight(IP): 1 + * Security Type: TRADE * * @param symbol (required) * @param type 1: Add position margin,2: Reduce position margin (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return ApiResponse<GetPositionMarginChangeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1653,19 +1634,19 @@ public ApiResponse getOrderModifyHistory( * * * @see Get - * Position Margin Change History(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#get-position-margin-change-history">Get + * Position Margin Change History (TRADE) Documentation */ public ApiResponse getPositionMarginChangeHistory( - String symbol, Type type, Long startTime, Long endTime, Long limit, Long recvWindow) + String symbol, Long type, Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { return tradeApi.getPositionMarginChangeHistory( symbol, type, startTime, endTime, limit, recvWindow); } /** - * Modify Isolated Position Margin(TRADE) Modify Isolated Position Margin * Only for isolated - * symbol Weight: 1 + * Modify Isolated Position Margin (TRADE) Modify Isolated Position Margin Weight(IP): 1 + * Security Type: TRADE Notes: - Only for isolated symbol * * @param modifyIsolatedPositionMarginRequest (required) * @return ApiResponse<ModifyIsolatedPositionMarginResponse> @@ -1679,8 +1660,8 @@ public ApiResponse getPositionMarginChan * * * @see Modify - * Isolated Position Margin(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#modify-isolated-position-margin">Modify + * Isolated Position Margin (TRADE) Documentation */ public ApiResponse modifyIsolatedPositionMargin( ModifyIsolatedPositionMarginRequest modifyIsolatedPositionMarginRequest) @@ -1689,11 +1670,13 @@ public ApiResponse modifyIsolatedPositionM } /** - * Modify Multiple Orders(TRADE) Modify Multiple Orders * Parameter rules are same with - * `Modify Order` * Batch modify orders are processed concurrently, and the order of - * matching is not guaranteed. * The order of returned contents for batch modify orders is the - * same as the order of the order list. * One order can only be modfied for less than 10000 - * times Weight: 5 + * Modify Multiple Orders (TRADE) Modify Multiple Orders Weight(IP): 5 Security Type: TRADE + * Notes: - Parameter rules are same with `Modify Order` - Batch modify orders are + * processed concurrently, and the order of matching is not guaranteed. - The order of returned + * contents for batch modify orders is the same as the order of the order list. - One order can + * only be modfied for less than 10000 times - `modifyId` is an optional user-defined + * identifier passed through as-is; the server does not validate its uniqueness. If omitted, it + * is not included in the response. * * @param modifyMultipleOrdersRequest (required) * @return ApiResponse<ModifyMultipleOrdersResponse> @@ -1707,8 +1690,8 @@ public ApiResponse modifyIsolatedPositionM * * * @see Modify - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#modify-multiple-orders">Modify + * Multiple Orders (TRADE) Documentation */ public ApiResponse modifyMultipleOrders( ModifyMultipleOrdersRequest modifyMultipleOrdersRequest) throws ApiException { @@ -1717,16 +1700,16 @@ public ApiResponse modifyMultipleOrders( /** * Modify Order (TRADE) Order modify function, currently only LIMIT order modification is - * supported, modified orders will be reordered in the match queue * Either `orderId` - * or `origClientOrderId` must be sent, and the `orderId` will prevail if - * both are sent. * Either `quantity` or `price` must be sent. * When the - * new `quantity` or `price` doesn'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 `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 Weight: - * 1 + * supported, modified orders will be reordered in the match queue Weight(IP): 1 Security Type: + * TRADE Notes: - Either `orderId` or `origClientOrderId` must be sent, and + * the `orderId` will prevail if both are sent. - Either `quantity` or + * `price` must be sent. *(After CM migration, both `quantity` and + * `price` are required.)* - When the new `quantity` or `price` + * doesn'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 + * `quantity` - 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 * * @param modifyOrderRequest (required) * @return ApiResponse<ModifyOrderResponse> @@ -1740,7 +1723,7 @@ public ApiResponse modifyMultipleOrders( * * * @see Modify + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#modify-order">Modify * Order (TRADE) Documentation */ public ApiResponse modifyOrder(ModifyOrderRequest modifyOrderRequest) @@ -1749,43 +1732,42 @@ public ApiResponse modifyOrder(ModifyOrderRequest modifyOrd } /** - * New Order (TRADE) Send in a new order. * Order with type `STOP`, parameter - * `timeInForce` can be sent ( default `GTC`). * Order with type - * `TAKE_PROFIT`, parameter `timeInForce` can be sent ( default - * `GTC`). * Condition orders will be triggered when: * If - * parameter`priceProtect`is sent as true: * when price reaches the + * New Order (TRADE) Send in a new order. Weight: 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: - Additional mandatory parameters based on `type`: - Order with type + * `STOP`, parameter `timeInForce` can be sent ( default `GTC`). - + * Order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent ( + * default `GTC`). - Condition orders will be triggered when: - If + * parameter`priceProtect`is sent as true: - when price reaches the * `stopPrice` ,the difference rate between \"MARK_PRICE\" and * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /dapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed `<= - * `activationPrice`, and the latest price >`= the lowest price * (1 + - * `callbackRate`) * SELL: the highest price after order placed >= - * `activationPrice`, and the latest price <= the highest price * (1 - - * `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. - * ``{\"code\": -2021, \"msg\": \"Order would immediately - * trigger.\"}`` means that the parameters you send do not meet the following - * requirements: * BUY: `activationPrice` should be smaller than latest price. * SELL: - * `activationPrice` should be larger than latest price. * If `newOrderRespType - * ` is sent as `RESULT` : * `MARKET` order: the final FILLED result of - * the order will be return directly. * `LIMIT` order with special + * symbol - \"triggerProtect\" of a symbol can be got from `GET + * /dapi/v1/exchangeInfo` - `STOP`, `STOP_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - + * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") + * -`TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - + * `TRAILING_STOP_MARKET`: - BUY: the lowest price after order placed + * ``= the lowest price * (1 + `callbackRate`) - SELL: the highest + * price after order placed >= `activationPrice`, and the latest price - For + * `TRAILING_STOP_MARKET`, if you got such error code. > `{\"code\": + * -2021, \"msg\": \"Order would immediately trigger.\"}` > means + * that the parameters you send do not meet the following requirements: - BUY: + * `activationPrice` should be smaller than latest price. - SELL: + * `activationPrice` should be larger than latest price. - If `newOrderRespType + * ` is sent as `RESULT` : - `MARKET` order: the final FILLED result of + * the order will be return directly. - `LIMIT` order with special * `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be - * returned directly. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` parameter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with + * returned directly. - `STOP_MARKET`, `TAKE_PROFIT_MARKET` with + * `closePosition`=`true`: - Follow the same rules for condition + * orders. - If triggered,**close all** current long position( if `SELL`) or current + * short position( if `BUY`). - Cannot be used with `quantity` parameter - + * Cannot be used with `reduceOnly` parameter - In Hedge Mode,cannot be used with * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * + * `SELL` orders in `SHORT` position side - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC`. Weight: 1 on 1min order rate - * limit(X-MBX-ORDER-COUNT-1M)\\ 0 on IP rate limit(x-mbx-used-weight-1m) + * `IOC` or `GTC`. * * @param newOrderRequest (required) * @return ApiResponse<NewOrderResponse> @@ -1799,7 +1781,7 @@ public ApiResponse modifyOrder(ModifyOrderRequest modifyOrd * * * @see New + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#new-order">New * Order (TRADE) Documentation */ public ApiResponse newOrder(NewOrderRequest newOrderRequest) @@ -1808,10 +1790,12 @@ public ApiResponse newOrder(NewOrderRequest newOrderRequest) } /** - * Place Multiple Orders(TRADE) Place multiple orders * Parameter rules are same with `New + * Place Multiple Orders (TRADE) Place multiple orders * Parameter rules are same with `New * Order` * Batch orders are processed concurrently, and the order of matching is not * guaranteed. * The order of returned contents for batch orders is the same as the order of the - * order list. Weight: 5 + * order list. Weight(IP): 5 Security Type: TRADE Notes: - `batchOrders` must be a + * JSON array of order parameter objects. - Example: + * `/dapi/v1/batchOrders?batchOrders=[{\"type\":\"LIMIT\",\"timeInForce\":\"GTC\",\"symbol\":\"BTCUSD_PERP\",\"side\":\"BUY\",\"price\":\"10001\",\"quantity\":\"1\"}]` * * @param placeMultipleOrdersRequest (required) * @return ApiResponse<PlaceMultipleOrdersResponse> @@ -1825,8 +1809,8 @@ public ApiResponse newOrder(NewOrderRequest newOrderRequest) * * * @see Place - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#place-multiple-orders">Place + * Multiple Orders (TRADE) Documentation */ public ApiResponse placeMultipleOrders( PlaceMultipleOrdersRequest placeMultipleOrdersRequest) throws ApiException { @@ -1834,7 +1818,7 @@ public ApiResponse placeMultipleOrders( } /** - * Position ADL Quantile Estimation(USER_DATA) Query position ADL quantile estimation * Values + * Position ADL Quantile Estimation (USER_DATA) Query position ADL quantile estimation * Values * update every 30s. * Values 0, 1, 2, 3, 4 shows the queue position and possibility of ADL from * low to high. * For positions of the symbol are in One-way Mode or isolated margined in Hedge * Mode, \"LONG\", \"SHORT\", and \"BOTH\" will be returned to @@ -1842,7 +1826,7 @@ public ApiResponse placeMultipleOrders( * symbol are crossed margined in Hedge Mode: * \"HEDGE\" as a sign will be returned * instead of \"BOTH\"; * A same value caculated on unrealized pnls on long and short * sides' positions will be shown for \"LONG\" and \"SHORT\" when there - * are positions in both of long and short sides. Weight: 5 + * are positions in both of long and short sides. Weight(IP): 5 Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -1857,8 +1841,8 @@ public ApiResponse placeMultipleOrders( * * * @see Position - * ADL Quantile Estimation(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#position-adl-quantile-estimation">Position + * ADL Quantile Estimation (USER_DATA) Documentation */ public ApiResponse positionAdlQuantileEstimation( String symbol, Long recvWindow) throws ApiException { @@ -1866,13 +1850,14 @@ public ApiResponse positionAdlQuantileEst } /** - * Position Information(USER_DATA) Get current account information. * If neither - * `marginAsset` nor `pair` is sent, positions of all symbols with - * `TRADING` status will be returned. * for One-way Mode user, the response will only - * show the \"BOTH\" positions * for Hedge Mode user, the response will show - * \"BOTH\", \"LONG\", and \"SHORT\" positions. Please use with - * user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. - * Weight: 1 + * Position Information (USER_DATA) Get current account information. Weight(IP): 1 Security + * Type: USER_DATA Notes: - If neither `marginAsset` nor `pair` is sent, + * positions of all symbols with `TRADING` status will be returned. - for One-way Mode + * user, the response will only show the \"BOTH\" positions - for Hedge Mode user, the + * response will show \"BOTH\", \"LONG\", and \"SHORT\" positions. + * **Note** > Please use with user data stream `ACCOUNT_UPDATE` to meet your + * timeliness and accuracy needs. - Please use with user data stream ACCOUNT_UPDATE to meet your + * timeliness and accuracy needs. * * @param marginAsset (optional) * @param pair (optional) @@ -1888,8 +1873,8 @@ public ApiResponse positionAdlQuantileEst * * * @see Position - * Information(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#position-information">Position + * Information (USER_DATA) Documentation */ public ApiResponse positionInformation( String marginAsset, String pair, Long recvWindow) throws ApiException { @@ -1897,13 +1882,14 @@ public ApiResponse positionInformation( } /** - * Query Current Open Order(USER_DATA) Query Current Open Order * Either`orderId` or - * `origClientOrderId` must be sent * If the queried order has been filled or - * cancelled, the error message \"Order does not exist\" will be returned. Weight: 1 + * Query Current Open Order (USER_DATA) Query Current Open Order Weight(IP): 1 Security Type: + * USER_DATA Notes: - Either`orderId` or `origClientOrderId` must be sent - + * If the queried order has been filled or cancelled, the error message \"Order does not + * exist\" will be returned. * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) * @param recvWindow (optional) * @return ApiResponse<QueryCurrentOpenOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1916,8 +1902,8 @@ public ApiResponse positionInformation( * * * @see Query - * Current Open Order(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#query-current-open-order">Query + * Current Open Order (USER_DATA) Documentation */ public ApiResponse queryCurrentOpenOrder( String symbol, Long orderId, String origClientOrderId, Long recvWindow) @@ -1928,12 +1914,13 @@ public ApiResponse queryCurrentOpenOrder( /** * Query Order (USER_DATA) Check an order's status. * These orders will not be found: * * order status is CANCELED or EXPIRED AND order has NO filled trade AND created time + 3 days - * < current time * order create time + 90 days < current time * Either - * `orderId` or `origClientOrderId` must be sent. Weight: 1 + * < current time * order create time + 90 days < current time Weight(IP): 1 Security + * Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be + * sent. * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) * @param recvWindow (optional) * @return ApiResponse<QueryOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1946,7 +1933,7 @@ public ApiResponse queryCurrentOpenOrder( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#query-order">Query * Order (USER_DATA) Documentation */ public ApiResponse queryOrder( @@ -1956,17 +1943,16 @@ public ApiResponse queryOrder( } /** - * User's Force Orders(USER_DATA) User's Force Orders * If \"autoCloseType\" - * is not sent, orders with both of the types will be returned * If \"startTime\" is - * not sent, data within 200 days before \"endTime\" can be queried Weight: 20 with - * symbol, 50 without symbol + * User's Force Orders (USER_DATA) User's Force Orders Weight: **20** (after CM + * migration: **20** with symbol / **50** without symbol) Security Type: USER_DATA Notes: - If + * \"autoCloseType\" is not sent, orders with both of the types will be returned - + * Only support querying data in the past 90 days * * @param symbol (optional) - * @param autoCloseType \"LIQUIDATION\" for liquidation orders, \"ADL\" for - * ADL orders. (optional) + * @param autoCloseType (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return ApiResponse<UsersForceOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1979,8 +1965,8 @@ public ApiResponse queryOrder( * * * @see User's - * Force Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#users-force-orders">User's + * Force Orders (USER_DATA) Documentation */ public ApiResponse usersForceOrders( String symbol, @@ -1995,7 +1981,8 @@ public ApiResponse usersForceOrders( } /** - * Close User Data Stream(USER_STREAM) Close out a user data stream. Weight: 1 + * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight(IP): 1 Security + * Type: USER_STREAM * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2008,8 +1995,8 @@ public ApiResponse usersForceOrders( * * * @see Close - * User Data Stream(USER_STREAM) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/user-data-streams#close-user-data-stream">Close + * User Data Stream (USER_STREAM) Documentation */ public void closeUserDataStream() throws ApiException { userDataStreamsApi.closeUserDataStream(); @@ -2017,7 +2004,7 @@ public void closeUserDataStream() throws ApiException { /** * Keepalive User Data Stream (USER_STREAM) Keepalive a user data stream to prevent a time out. - * User data streams will close after 60 minutes. Weight: 1 + * User data streams will close after 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * * @return ApiResponse<KeepaliveUserDataStreamResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2030,7 +2017,7 @@ public void closeUserDataStream() throws ApiException { * * * @see Keepalive + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/user-data-streams#keepalive-user-data-stream">Keepalive * User Data Stream (USER_STREAM) Documentation */ public ApiResponse keepaliveUserDataStream() @@ -2042,7 +2029,7 @@ public ApiResponse keepaliveUserDataStream() * Start User Data Stream (USER_STREAM) Start a new user data stream. The stream will close * after 60 minutes unless a keepalive is sent. If the account has an active * `listenKey`, that `listenKey` will be returned and its validity will be - * extended for 60 minutes. Weight: 1 + * extended for 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * * @return ApiResponse<StartUserDataStreamResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2055,7 +2042,7 @@ public ApiResponse keepaliveUserDataStream() * * * @see Start + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/user-data-streams#start-user-data-stream">Start * User Data Stream (USER_STREAM) Documentation */ public ApiResponse startUserDataStream() throws ApiException { diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/MarketDataApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/MarketDataApi.java index a471b4715..c325322a0 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/MarketDataApi.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/MarketDataApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -69,7 +69,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-coin-futures/7.1.1 (Java/%s; %s; %s)", + "binance-derivatives-trading-coin-futures/8.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -109,12 +109,10 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for basis * - * @param pair BTCUSD (required) - * @param contractType ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param pair Pair. (required) + * @param contractType Contract type. (required) + * @param period Period interval. (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return Call to execute @@ -127,7 +125,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Basis + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#basis">Basis * Documentation */ private okhttp3.Call basisCall( @@ -263,15 +261,13 @@ private okhttp3.Call basisValidateBeforeCall( } /** - * Basis Query basis * If startTime and endTime are not sent, the most recent data is returned. - * * Only the data of the latest 30 days is available. Weight: 1 + * Basis Query basis Weight(IP): 1 Notes: - If startTime and endTime are not sent, the most + * recent data is returned. - Only the data of the latest 30 days is available. * - * @param pair BTCUSD (required) - * @param contractType ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param pair Pair. (required) + * @param contractType Contract type. (required) + * @param period Period interval. (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<BasisResponse> @@ -285,14 +281,14 @@ private okhttp3.Call basisValidateBeforeCall( * * * @see Basis + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#basis">Basis * Documentation */ public ApiResponse basis( @NotNull String pair, @NotNull ContractType contractType, @NotNull Period period, - Long limit, + @Max(500L) Long limit, Long startTime, Long endTime) throws ApiException { @@ -315,7 +311,7 @@ public ApiResponse basis( * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#check-server-time">Check * Server time Documentation */ private okhttp3.Call checkServerTimeCall() throws ApiException { @@ -403,8 +399,8 @@ private okhttp3.Call checkServerTimeValidateBeforeCall() throws ApiException { } /** - * Check Server time Test connectivity to the Rest API and get the current server time. Weight: - * 1 + * Check Server time Test connectivity to the Rest API and get the current server time. + * Weight(IP): 1 * * @return ApiResponse<CheckServerTimeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -417,7 +413,7 @@ private okhttp3.Call checkServerTimeValidateBeforeCall() throws ApiException { * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#check-server-time">Check * Server time Documentation */ public ApiResponse checkServerTime() throws ApiException { @@ -430,11 +426,11 @@ public ApiResponse checkServerTime() throws ApiExceptio /** * Build call for compressedAggregateTradesList * - * @param symbol (required) + * @param symbol Symbol (required) * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) + * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) + * @param limit Maximum number of records to return. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -445,7 +441,7 @@ public ApiResponse checkServerTime() throws ApiExceptio * * * @see Compressed/Aggregate + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#compressed-aggregate-trades-list">Compressed/Aggregate * Trades List Documentation */ private okhttp3.Call compressedAggregateTradesListCall( @@ -566,22 +562,22 @@ private okhttp3.Call compressedAggregateTradesListValidateBeforeCall( /** * Compressed/Aggregate Trades List Get compressed, aggregate trades. Market trades that fill in - * 100ms with the same price and the same taking side will have the quantity aggregated. * - * support querying futures trade histories that are not older than one year * If both - * `startTime` and `endTime` are sent, time between `startTime` - * and `endTime` must be less than 1 hour. * If `fromId`, - * `startTime`, and `endTime` are not sent, the most recent aggregate trades - * will be returned. * Only market trades will be aggregated and returned, which means the - * insurance fund trades and ADL trades won't be aggregated. * Sending both - * `startTime`/`endTime` and `fromId` might cause response - * timeout, please send either `fromId` or `startTime`/`endTime` - * Weight: 20 + * 100ms with the same price and the same taking side will have the quantity aggregated. + * Weight(IP): 20 Notes: - support querying futures trade histories that are not older than 24 + * hours - If both `startTime` and `endTime` are sent, time between + * `startTime` and `endTime` must be less than 1 hour. - If + * `fromId`, `startTime`, and `endTime` are not sent, the most + * recent aggregate trades will be returned. - Only market trades will be aggregated and + * returned, which means the insurance fund trades and ADL trades won't be aggregated. - + * Sending both `startTime`/`endTime` and `fromId` might cause + * response timeout, please send either `fromId` or + * `startTime`/`endTime` * - * @param symbol (required) + * @param symbol Symbol (required) * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) + * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) + * @param limit Maximum number of records to return. (optional) * @return ApiResponse<CompressedAggregateTradesListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -593,11 +589,15 @@ private okhttp3.Call compressedAggregateTradesListValidateBeforeCall( * * * @see Compressed/Aggregate + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#compressed-aggregate-trades-list">Compressed/Aggregate * Trades List Documentation */ public ApiResponse compressedAggregateTradesList( - @NotNull String symbol, Long fromId, Long startTime, Long endTime, Long limit) + @NotNull String symbol, + Long fromId, + Long startTime, + Long endTime, + @Max(1000L) Long limit) throws ApiException { okhttp3.Call localVarCall = compressedAggregateTradesListValidateBeforeCall( @@ -610,12 +610,12 @@ public ApiResponse compressedAggregateTra /** * Build call for continuousContractKlineCandlestickData * - * @param pair BTCUSD (required) - * @param contractType ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL (required) - * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param pair After CM migration, accepts both CM and UM pair values. (required) + * @param contractType (required) + * @param interval Interval (required) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -626,7 +626,7 @@ public ApiResponse compressedAggregateTra * * * @see Continuous + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#continuous-contract-kline-candlestick-data">Continuous * Contract Kline/Candlestick Data Documentation */ private okhttp3.Call continuousContractKlineCandlestickDataCall( @@ -764,24 +764,24 @@ private okhttp3.Call continuousContractKlineCandlestickDataValidateBeforeCall( /** * Continuous Contract Kline/Candlestick Data Kline/candlestick bars for a specific contract - * type. Klines are uniquely identified by their open time. * Contract type: * PERPETUAL * - * CURRENT_QUARTER * NEXT_QUARTER 1000 | 10 * The difference between `startTime` and - * `endTime` can only be up to 200 days * Between `startTime` and + * type. Klines are uniquely identified by their open time. Weight: based on parameter + * `LIMIT` | LIMIT | weight | | --- | --- | | [1,100) | 1 | | [100, 500) | 2 | | [500, + * 1000] | 5 | | > 1000 | 10 | Notes: - The difference between `startTime` and + * `endTime` can only be up to 200 days - Between `startTime` and * `endTime`, the most recent `limit` data from `endTime` will be - * returned: * If `startTime` and `endTime` are not sent, current timestamp - * will be set as `endTime`, and the most recent data will be returned. * If + * returned: - If `startTime` and `endTime` are not sent, current timestamp + * will be set as `endTime`, and the most recent data will be returned. - If * `startTime` is sent only, the timestamp of 200 days after `startTime` - * will be set as `endTime`(up to the current time) * If `endTime` is sent + * will be set as `endTime`(up to the current time) - If `endTime` is sent * only, the timestamp of 200 days before `endTime` will be set as - * `startTime` Weight: based on parameter LIMIT LIMIT | weight ---|--- [1,100) | 1 - * [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 + * `startTime` * - * @param pair BTCUSD (required) - * @param contractType ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL (required) - * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param pair After CM migration, accepts both CM and UM pair values. (required) + * @param contractType (required) + * @param interval Interval (required) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @return ApiResponse<ContinuousContractKlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -793,7 +793,7 @@ private okhttp3.Call continuousContractKlineCandlestickDataValidateBeforeCall( * * * @see Continuous + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#continuous-contract-kline-candlestick-data">Continuous * Contract Kline/Candlestick Data Documentation */ public ApiResponse @@ -803,7 +803,7 @@ private okhttp3.Call continuousContractKlineCandlestickDataValidateBeforeCall( @NotNull Interval interval, Long startTime, Long endTime, - Long limit) + @Max(1500L) Long limit) throws ApiException { okhttp3.Call localVarCall = continuousContractKlineCandlestickDataValidateBeforeCall( @@ -826,7 +826,7 @@ private okhttp3.Call continuousContractKlineCandlestickDataValidateBeforeCall( * * * @see Exchange + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#exchange-information">Exchange * Information Documentation */ private okhttp3.Call exchangeInformationCall() throws ApiException { @@ -914,7 +914,7 @@ private okhttp3.Call exchangeInformationValidateBeforeCall() throws ApiException } /** - * Exchange Information Current exchange trading rules and symbol information Weight: 1 + * Exchange Information Current exchange trading rules and symbol information Weight(IP): 1 * * @return ApiResponse<ExchangeInformationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -927,7 +927,7 @@ private okhttp3.Call exchangeInformationValidateBeforeCall() throws ApiException * * * @see Exchange + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#exchange-information">Exchange * Information Documentation */ public ApiResponse exchangeInformation() throws ApiException { @@ -940,10 +940,10 @@ public ApiResponse exchangeInformation() throws Api /** * Build call for getFundingRateHistoryOfPerpetualFutures * - * @param symbol (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (required) + * @param startTime Timestamp in ms to get funding rate from INCLUSIVE. (optional) + * @param endTime Timestamp in ms to get funding rate until INCLUSIVE. (optional) + * @param limit Maximum number of records to return. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -954,7 +954,7 @@ public ApiResponse exchangeInformation() throws Api * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#get-funding-rate-history-of-perpetual-futures">Get * Funding Rate History of Perpetual Futures Documentation */ private okhttp3.Call getFundingRateHistoryOfPerpetualFuturesCall( @@ -1068,13 +1068,13 @@ private okhttp3.Call getFundingRateHistoryOfPerpetualFuturesValidateBeforeCall( } /** - * Get Funding Rate History of Perpetual Futures Get Funding Rate History of Perpetual Futures * - * empty array will be returned for delivery symbols. Weight: 1 + * Get Funding Rate History of Perpetual Futures Get Funding Rate History of Perpetual Futures + * Weight(IP): 1 Notes: - empty array will be returned for delivery symbols. * - * @param symbol (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (required) + * @param startTime Timestamp in ms to get funding rate from INCLUSIVE. (optional) + * @param endTime Timestamp in ms to get funding rate until INCLUSIVE. (optional) + * @param limit Maximum number of records to return. (optional) * @return ApiResponse<GetFundingRateHistoryOfPerpetualFuturesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1086,12 +1086,12 @@ private okhttp3.Call getFundingRateHistoryOfPerpetualFuturesValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#get-funding-rate-history-of-perpetual-futures">Get * Funding Rate History of Perpetual Futures Documentation */ public ApiResponse getFundingRateHistoryOfPerpetualFutures( - @NotNull String symbol, Long startTime, Long endTime, Long limit) + @NotNull String symbol, Long startTime, Long endTime, @Max(1000L) Long limit) throws ApiException { okhttp3.Call localVarCall = getFundingRateHistoryOfPerpetualFuturesValidateBeforeCall( @@ -1114,7 +1114,7 @@ private okhttp3.Call getFundingRateHistoryOfPerpetualFuturesValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#get-funding-rate-info">Get * Funding Rate Info Documentation */ private okhttp3.Call getFundingRateInfoCall() throws ApiException { @@ -1202,8 +1202,8 @@ private okhttp3.Call getFundingRateInfoValidateBeforeCall() throws ApiException } /** - * Get Funding Rate Info Query funding rate info for symbols that had FundingRateCap/ - * FundingRateFloor / fundingIntervalHours adjustment Weight: 0 + * Get Funding Rate Info Query funding rate info for symbols that had + * FundingRateCap/FundingRateFloor/fundingIntervalHours adjustment * * @return ApiResponse<GetFundingRateInfoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1216,7 +1216,7 @@ private okhttp3.Call getFundingRateInfoValidateBeforeCall() throws ApiException * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#get-funding-rate-info">Get * Funding Rate Info Documentation */ public ApiResponse getFundingRateInfo() throws ApiException { @@ -1241,7 +1241,7 @@ public ApiResponse getFundingRateInfo() throws ApiEx * * * @see Index + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#index-price-and-mark-price">Index * Price and Mark Price Documentation */ private okhttp3.Call indexPriceAndMarkPriceCall(String symbol, String pair) @@ -1340,7 +1340,7 @@ private okhttp3.Call indexPriceAndMarkPriceValidateBeforeCall(String symbol, Str } /** - * Index Price and Mark Price Query index price and mark price Weight: 10 + * Index Price and Mark Price Query index price and mark price Weight(IP): 10 * * @param symbol (optional) * @param pair (optional) @@ -1355,7 +1355,7 @@ private okhttp3.Call indexPriceAndMarkPriceValidateBeforeCall(String symbol, Str * * * @see Index + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#index-price-and-mark-price">Index * Price and Mark Price Documentation */ public ApiResponse indexPriceAndMarkPrice( @@ -1369,11 +1369,11 @@ public ApiResponse indexPriceAndMarkPrice( /** * Build call for indexPriceKlineCandlestickData * - * @param pair BTCUSD (required) - * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param pair After CM migration, accepts both CM and UM pair values. (required) + * @param interval Interval (required) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1384,7 +1384,7 @@ public ApiResponse indexPriceAndMarkPrice( * * * @see Index + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#index-price-kline-candlestick-data">Index * Price Kline/Candlestick Data Documentation */ private okhttp3.Call indexPriceKlineCandlestickDataCall( @@ -1506,22 +1506,23 @@ private okhttp3.Call indexPriceKlineCandlestickDataValidateBeforeCall( /** * Index Price Kline/Candlestick Data Kline/candlestick bars for the index price of a pair. - * Klines are uniquely identified by their open time. 1000 | 10 * The difference between - * `startTime` and `endTime` can only be up to 200 days * Between - * `startTime` and `endTime`, the most recent `limit` data from - * `endTime` will be returned: * If `startTime` and `endTime` are - * not sent, current timestamp will be set as `endTime`, and the most recent data will - * be returned. * If `startTime` is sent only, the timestamp of 200 days after - * `startTime` will be set as `endTime`(up to the current time) * If - * `endTime` is sent only, the timestamp of 200 days before `endTime` will - * be set as `startTime` Weight: based on parameter LIMIT LIMIT | weight ---|--- - * [1,100) | 1 [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 + * Klines are uniquely identified by their open time. Weight: Based on parameter + * `LIMIT` | LIMIT | weight | | --- | --- | | [1,100) | 1 | | [100, 500) | 2 | | [500, + * 1000] | 5 | | > 1000 | 10 | Notes: - The difference between `startTime` and + * `endTime` can only be up to 200 days - Between `startTime` and + * `endTime`, the most recent `limit` data from `endTime` will be + * returned: - If `startTime` and `endTime` are not sent, current timestamp + * will be set as `endTime`, and the most recent data will be returned. - If + * `startTime` is sent only, the timestamp of 200 days after `startTime` + * will be set as `endTime`(up to the current time) - If `endTime` is sent + * only, the timestamp of 200 days before `endTime` will be set as + * `startTime` * - * @param pair BTCUSD (required) - * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param pair After CM migration, accepts both CM and UM pair values. (required) + * @param interval Interval (required) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @return ApiResponse<IndexPriceKlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1533,7 +1534,7 @@ private okhttp3.Call indexPriceKlineCandlestickDataValidateBeforeCall( * * * @see Index + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#index-price-kline-candlestick-data">Index * Price Kline/Candlestick Data Documentation */ public ApiResponse indexPriceKlineCandlestickData( @@ -1541,7 +1542,7 @@ public ApiResponse indexPriceKlineCandle @NotNull Interval interval, Long startTime, Long endTime, - Long limit) + @Max(1500L) Long limit) throws ApiException { okhttp3.Call localVarCall = indexPriceKlineCandlestickDataValidateBeforeCall( @@ -1554,11 +1555,11 @@ public ApiResponse indexPriceKlineCandle /** * Build call for klineCandlestickData * - * @param symbol (required) - * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol After CM migration, accepts both CM and UM symbols. (required) + * @param interval Interval (required) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1569,7 +1570,7 @@ public ApiResponse indexPriceKlineCandle * * * @see Kline/Candlestick + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#kline-candlestick-data">Kline/Candlestick * Data Documentation */ private okhttp3.Call klineCandlestickDataCall( @@ -1690,22 +1691,22 @@ private okhttp3.Call klineCandlestickDataValidateBeforeCall( /** * Kline/Candlestick Data Kline/candlestick bars for a symbol. Klines are uniquely identified by - * their open time. 1000 | 10 * The difference between `startTime` and - * `endTime` can only be up to 200 days * Between `startTime` and - * `endTime`, the most recent `limit` data from `endTime` will be - * returned: * If `startTime` and `endTime` are not sent, current timestamp - * will be set as `endTime`, and the most recent data will be returned. * If - * `startTime` is sent only, the timestamp of 200 days after `startTime` - * will be set as `endTime`(up to the current time) * If `endTime` is sent - * only, the timestamp of 200 days before `endTime` will be set as - * `startTime` Weight: based on parameter LIMIT LIMIT | weight ---|--- [1,100) | 1 - * [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 + * their open time. Weight: Based on parameter `LIMIT` | LIMIT | weight | | --- | --- + * | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - The + * difference between `startTime` and `endTime` can only be up to 200 days - + * Between `startTime` and `endTime`, the most recent `limit` data + * from `endTime` will be returned: - If `startTime` and `endTime` + * are not sent, current timestamp will be set as `endTime`, and the most recent data + * will be returned. - If `startTime` is sent only, the timestamp of 200 days after + * `startTime` will be set as `endTime`(up to the current time) - If + * `endTime` is sent only, the timestamp of 200 days before `endTime` will + * be set as `startTime` * - * @param symbol (required) - * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol After CM migration, accepts both CM and UM symbols. (required) + * @param interval Interval (required) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @return ApiResponse<KlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1717,7 +1718,7 @@ private okhttp3.Call klineCandlestickDataValidateBeforeCall( * * * @see Kline/Candlestick + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#kline-candlestick-data">Kline/Candlestick * Data Documentation */ public ApiResponse klineCandlestickData( @@ -1725,7 +1726,7 @@ public ApiResponse klineCandlestickData( @NotNull Interval interval, Long startTime, Long endTime, - Long limit) + @Max(1500L) Long limit) throws ApiException { okhttp3.Call localVarCall = klineCandlestickDataValidateBeforeCall(symbol, interval, startTime, endTime, limit); @@ -1738,10 +1739,8 @@ public ApiResponse klineCandlestickData( * Build call for longShortRatio * * @param pair BTCUSD (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return Call to execute @@ -1754,7 +1753,7 @@ public ApiResponse klineCandlestickData( * * * @see Long/Short + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#long-short-ratio">Long/Short * Ratio Documentation */ private okhttp3.Call longShortRatioCall( @@ -1874,14 +1873,13 @@ private okhttp3.Call longShortRatioValidateBeforeCall( } /** - * Long/Short Ratio Query symbol Long/Short Ratio * If startTime and endTime are not sent, the - * most recent data is returned. * Only the data of the latest 30 days is available. Weight: 1 + * Long/Short Ratio Query symbol Long/Short Ratio Weight(IP): 1 Notes: - If startTime and + * endTime are not sent, the most recent data is returned. - Only the data of the latest 30 days + * is available. * * @param pair BTCUSD (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<LongShortRatioResponse> @@ -1895,11 +1893,15 @@ private okhttp3.Call longShortRatioValidateBeforeCall( * * * @see Long/Short + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#long-short-ratio">Long/Short * Ratio Documentation */ public ApiResponse longShortRatio( - @NotNull String pair, @NotNull Period period, Long limit, Long startTime, Long endTime) + @NotNull String pair, + @NotNull Period period, + @Max(500L) Long limit, + Long startTime, + Long endTime) throws ApiException { okhttp3.Call localVarCall = longShortRatioValidateBeforeCall(pair, period, limit, startTime, endTime); @@ -1911,11 +1913,11 @@ public ApiResponse longShortRatio( /** * Build call for markPriceKlineCandlestickData * - * @param symbol (required) - * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol After CM migration, accepts both CM and UM symbols. (required) + * @param interval Interval (required) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1926,7 +1928,7 @@ public ApiResponse longShortRatio( * * * @see Mark + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#mark-price-kline-candlestick-data">Mark * Price Kline/Candlestick Data Documentation */ private okhttp3.Call markPriceKlineCandlestickDataCall( @@ -2048,22 +2050,23 @@ private okhttp3.Call markPriceKlineCandlestickDataValidateBeforeCall( /** * Mark Price Kline/Candlestick Data Kline/candlestick bars for the mark price of a symbol. - * Klines are uniquely identified by their open time. 1000 | 10 * The difference between - * `startTime` and `endTime` can only be up to 200 days * Between - * `startTime` and `endTime`, the most recent `limit` data from - * `endTime` will be returned: * If `startTime` and `endTime` are - * not sent, current timestamp will be set as `endTime`, and the most recent data will - * be returned. * If `startTime` is sent only, the timestamp of 200 days after - * `startTime` will be set as `endTime`(up to the current time) * If - * `endTime` is sent only, the timestamp of 200 days before `endTime` will - * be set as `startTime` Weight: based on parameter LIMIT LIMIT | weight ---|--- - * [1,100) | 1 [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 + * Klines are uniquely identified by their open time. Weight: Based on parameter + * `LIMIT` | LIMIT | weight | | --- | --- | | [1,100) | 1 | | [100, 500) | 2 | | [500, + * 1000] | 5 | | > 1000 | 10 | Notes: - The difference between `startTime` and + * `endTime` can only be up to 200 days - Between `startTime` and + * `endTime`, the most recent `limit` data from `endTime` will be + * returned: - If `startTime` and `endTime` are not sent, current timestamp + * will be set as `endTime`, and the most recent data will be returned. - If + * `startTime` is sent only, the timestamp of 200 days after `startTime` + * will be set as `endTime`(up to the current time) - If `endTime` is sent + * only, the timestamp of 200 days before `endTime` will be set as + * `startTime` * - * @param symbol (required) - * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol After CM migration, accepts both CM and UM symbols. (required) + * @param interval Interval (required) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @return ApiResponse<MarkPriceKlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2075,7 +2078,7 @@ private okhttp3.Call markPriceKlineCandlestickDataValidateBeforeCall( * * * @see Mark + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#mark-price-kline-candlestick-data">Mark * Price Kline/Candlestick Data Documentation */ public ApiResponse markPriceKlineCandlestickData( @@ -2083,7 +2086,7 @@ public ApiResponse markPriceKlineCandlest @NotNull Interval interval, Long startTime, Long endTime, - Long limit) + @Max(1500L) Long limit) throws ApiException { okhttp3.Call localVarCall = markPriceKlineCandlestickDataValidateBeforeCall( @@ -2096,9 +2099,9 @@ public ApiResponse markPriceKlineCandlest /** * Build call for oldTradesLookup * - * @param symbol (required) - * @param limit Default 100; max 1000 (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) + * @param symbol Symbol (required) + * @param limit Maximum number of records to return. (optional) + * @param fromId TradeId to fetch from. Default gets most recent trades. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2109,8 +2112,8 @@ public ApiResponse markPriceKlineCandlest * * * @see Old - * Trades Lookup(MARKET_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#old-trades-lookup">Old + * Trades Lookup (MARKET_DATA) Documentation */ private okhttp3.Call oldTradesLookupCall(String symbol, Long limit, Long fromId) throws ApiException { @@ -2213,13 +2216,14 @@ private okhttp3.Call oldTradesLookupValidateBeforeCall(String symbol, Long limit } /** - * Old Trades Lookup(MARKET_DATA) Get older market historical trades. * Market trades means - * trades filled in the order book. Only market trades will be returned, which means the - * insurance fund trades and ADL trades won't be returned. Weight: 20 + * Old Trades Lookup (MARKET_DATA) Get older market historical trades. Weight(IP): 20 Security + * Type: MARKET_DATA Notes: - Market trades means trades filled in the order book. Only market + * trades will be returned, which means the insurance fund trades and ADL trades won't be + * returned. - Only supports data from within the last one month * - * @param symbol (required) - * @param limit Default 100; max 1000 (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) + * @param symbol Symbol (required) + * @param limit Maximum number of records to return. (optional) + * @param fromId TradeId to fetch from. Default gets most recent trades. (optional) * @return ApiResponse<OldTradesLookupResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2231,11 +2235,11 @@ private okhttp3.Call oldTradesLookupValidateBeforeCall(String symbol, Long limit * * * @see Old - * Trades Lookup(MARKET_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#old-trades-lookup">Old + * Trades Lookup (MARKET_DATA) Documentation */ public ApiResponse oldTradesLookup( - @NotNull String symbol, Long limit, Long fromId) throws ApiException { + @NotNull String symbol, @Max(500L) Long limit, Long fromId) throws ApiException { okhttp3.Call localVarCall = oldTradesLookupValidateBeforeCall(symbol, limit, fromId); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -2245,7 +2249,7 @@ public ApiResponse oldTradesLookup( /** * Build call for openInterest * - * @param symbol (required) + * @param symbol Symbol (required) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2256,7 +2260,7 @@ public ApiResponse oldTradesLookup( * * * @see Open + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#open-interest">Open * Interest Documentation */ private okhttp3.Call openInterestCall(String symbol) throws ApiException { @@ -2348,9 +2352,9 @@ private okhttp3.Call openInterestValidateBeforeCall(String symbol) throws ApiExc } /** - * Open Interest Get present open interest of a specific symbol. Weight: 1 + * Open Interest Get present open interest of a specific symbol. Weight(IP): 1 * - * @param symbol (required) + * @param symbol Symbol (required) * @return ApiResponse<OpenInterestResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2362,7 +2366,7 @@ private okhttp3.Call openInterestValidateBeforeCall(String symbol) throws ApiExc * * * @see Open + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#open-interest">Open * Interest Documentation */ public ApiResponse openInterest(@NotNull String symbol) @@ -2376,12 +2380,10 @@ public ApiResponse openInterest(@NotNull String symbol) /** * Build call for openInterestStatistics * - * @param pair BTCUSD (required) - * @param contractType ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param pair (required) + * @param contractType (required) + * @param period (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return Call to execute @@ -2394,7 +2396,7 @@ public ApiResponse openInterest(@NotNull String symbol) * * * @see Open + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#open-interest-statistics">Open * Interest Statistics Documentation */ private okhttp3.Call openInterestStatisticsCall( @@ -2531,16 +2533,14 @@ private okhttp3.Call openInterestStatisticsValidateBeforeCall( } /** - * Open Interest Statistics Query open interest stats * If startTime and endTime are not sent, - * the most recent data is returned. * Only the data of the latest 30 days is available. Weight: - * 1 + * Open Interest Statistics Query open interest stats Weight(IP): 1 Notes: - If startTime and + * endTime are not sent, the most recent data is returned. - Only the data of the latest 30 days + * is available. * - * @param pair BTCUSD (required) - * @param contractType ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param pair (required) + * @param contractType (required) + * @param period (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<OpenInterestStatisticsResponse> @@ -2554,14 +2554,14 @@ private okhttp3.Call openInterestStatisticsValidateBeforeCall( * * * @see Open + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#open-interest-statistics">Open * Interest Statistics Documentation */ public ApiResponse openInterestStatistics( @NotNull String pair, @NotNull ContractType contractType, @NotNull Period period, - Long limit, + @Max(500L) Long limit, Long startTime, Long endTime) throws ApiException { @@ -2576,8 +2576,8 @@ public ApiResponse openInterestStatistics( /** * Build call for orderBook * - * @param symbol (required) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (required) + * @param limit Valid limits:[5, 10, 20, 50, 100, 500, 1000]. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2588,7 +2588,7 @@ public ApiResponse openInterestStatistics( * * * @see Order + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#order-book">Order * Book Documentation */ private okhttp3.Call orderBookCall(String symbol, Long limit) throws ApiException { @@ -2685,11 +2685,12 @@ private okhttp3.Call orderBookValidateBeforeCall(String symbol, Long limit) } /** - * Order Book Query orderbook on specific symbol Weight: Adjusted based on the limit: Limit | - * Weight ------------ | ------------ 5, 10, 20, 50 | 2 100 | 5 500 | 10 1000 | 20 + * Order Book Query orderbook on specific symbol Weight: Adjusted based on the limit: | Limit | + * Weight | | ------------ | ------------ | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | + * 1000 | 20 | * - * @param symbol (required) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (required) + * @param limit Valid limits:[5, 10, 20, 50, 100, 500, 1000]. (optional) * @return ApiResponse<OrderBookResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2701,10 +2702,10 @@ private okhttp3.Call orderBookValidateBeforeCall(String symbol, Long limit) * * * @see Order + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#order-book">Order * Book Documentation */ - public ApiResponse orderBook(@NotNull String symbol, Long limit) + public ApiResponse orderBook(@NotNull String symbol, @Max(1000L) Long limit) throws ApiException { okhttp3.Call localVarCall = orderBookValidateBeforeCall(symbol, limit); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -2714,11 +2715,11 @@ public ApiResponse orderBook(@NotNull String symbol, Long lim /** * Build call for premiumIndexKlineData * - * @param symbol (required) - * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol After CM migration, accepts both CM and UM symbols. (required) + * @param interval Interval (required) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2729,7 +2730,7 @@ public ApiResponse orderBook(@NotNull String symbol, Long lim * * * @see Premium + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#premium-index-kline-data">Premium * index Kline Data Documentation */ private okhttp3.Call premiumIndexKlineDataCall( @@ -2850,15 +2851,15 @@ private okhttp3.Call premiumIndexKlineDataValidateBeforeCall( /** * Premium index Kline Data Premium index kline bars of a symbol. Klines are uniquely identified - * by their open time. * If startTime and endTime are not sent, the most recent klines are - * returned. Weight: based on parameter LIMIT | LIMIT | weight | | ----------- | ------ | | - * [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | + * by their open time. Weight: Based on parameter `LIMIT` | LIMIT | weight | | + * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | + * 10 | Notes: - If startTime and endTime are not sent, the most recent klines are returned. * - * @param symbol (required) - * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol After CM migration, accepts both CM and UM symbols. (required) + * @param interval Interval (required) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @return ApiResponse<PremiumIndexKlineDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2870,7 +2871,7 @@ private okhttp3.Call premiumIndexKlineDataValidateBeforeCall( * * * @see Premium + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#premium-index-kline-data">Premium * index Kline Data Documentation */ public ApiResponse premiumIndexKlineData( @@ -2878,7 +2879,7 @@ public ApiResponse premiumIndexKlineData( @NotNull Interval interval, Long startTime, Long endTime, - Long limit) + @Max(1500L) Long limit) throws ApiException { okhttp3.Call localVarCall = premiumIndexKlineDataValidateBeforeCall( @@ -2891,7 +2892,7 @@ public ApiResponse premiumIndexKlineData( /** * Build call for queryIndexPriceConstituents * - * @param symbol (required) + * @param symbol Symbol (required) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2902,7 +2903,7 @@ public ApiResponse premiumIndexKlineData( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#query-index-price-constituents">Query * Index Price Constituents Documentation */ private okhttp3.Call queryIndexPriceConstituentsCall(String symbol) throws ApiException { @@ -2995,9 +2996,9 @@ private okhttp3.Call queryIndexPriceConstituentsValidateBeforeCall(String symbol } /** - * Query Index Price Constituents Query index price constituents Weight: 1 + * Query Index Price Constituents Query index price constituents Weight(IP): 1 * - * @param symbol (required) + * @param symbol Symbol (required) * @return ApiResponse<QueryIndexPriceConstituentsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3009,7 +3010,7 @@ private okhttp3.Call queryIndexPriceConstituentsValidateBeforeCall(String symbol * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#query-index-price-constituents">Query * Index Price Constituents Documentation */ public ApiResponse queryIndexPriceConstituents( @@ -3023,8 +3024,8 @@ public ApiResponse queryIndexPriceConstitue /** * Build call for recentTradesList * - * @param symbol (required) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (required) + * @param limit Maximum number of records to return. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -3035,7 +3036,7 @@ public ApiResponse queryIndexPriceConstitue * * * @see Recent + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#recent-trades-list">Recent * Trades List Documentation */ private okhttp3.Call recentTradesListCall(String symbol, Long limit) throws ApiException { @@ -3132,12 +3133,12 @@ private okhttp3.Call recentTradesListValidateBeforeCall(String symbol, Long limi } /** - * Recent Trades List Get recent market trades * Market trades means trades filled in the order - * book. Only market trades will be returned, which means the insurance fund trades and ADL - * trades won't be returned. Weight: 5 + * Recent Trades List Get recent market trades Weight(IP): 5 Notes: - Market trades means trades + * filled in the order book. Only market trades will be returned, which means the insurance fund + * trades and ADL trades won't be returned. * - * @param symbol (required) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (required) + * @param limit Maximum number of records to return. (optional) * @return ApiResponse<RecentTradesListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3149,11 +3150,11 @@ private okhttp3.Call recentTradesListValidateBeforeCall(String symbol, Long limi * * * @see Recent + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#recent-trades-list">Recent * Trades List Documentation */ public ApiResponse recentTradesList( - @NotNull String symbol, Long limit) throws ApiException { + @NotNull String symbol, @Max(1000L) Long limit) throws ApiException { okhttp3.Call localVarCall = recentTradesListValidateBeforeCall(symbol, limit); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -3163,8 +3164,8 @@ public ApiResponse recentTradesList( /** * Build call for symbolOrderBookTicker * - * @param symbol (optional) - * @param pair (optional) + * @param symbol Symbol (optional) + * @param pair Symbol (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -3175,7 +3176,7 @@ public ApiResponse recentTradesList( * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#symbol-order-book-ticker">Symbol * Order Book Ticker Documentation */ private okhttp3.Call symbolOrderBookTickerCall(String symbol, String pair) throws ApiException { @@ -3273,13 +3274,14 @@ private okhttp3.Call symbolOrderBookTickerValidateBeforeCall(String symbol, Stri } /** - * Symbol Order Book Ticker Best price/qty on the order book for a symbol or symbols. * Symbol - * and pair cannot be sent together * If a pair is sent,tickers for all symbols of the pair will - * be returned * If either a pair or symbol is sent, tickers for all symbols of all pairs will - * be returned Weight: 2 for a single symbol, 5 when the symbol parameter is omitted + * Symbol Order Book Ticker Best price/qty on the order book for a symbol or symbols. Weight: + * **2** for a single symbol, **5** when the symbol parameter is omitted Notes: - Symbol and + * pair cannot be sent together - If a pair is sent,tickers for all symbols of the pair will be + * returned - If either a pair or symbol is sent, tickers for all symbols of all pairs will be + * returned * - * @param symbol (optional) - * @param pair (optional) + * @param symbol Symbol (optional) + * @param pair Symbol (optional) * @return ApiResponse<SymbolOrderBookTickerResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3291,7 +3293,7 @@ private okhttp3.Call symbolOrderBookTickerValidateBeforeCall(String symbol, Stri * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#symbol-order-book-ticker">Symbol * Order Book Ticker Documentation */ public ApiResponse symbolOrderBookTicker( @@ -3305,8 +3307,8 @@ public ApiResponse symbolOrderBookTicker( /** * Build call for symbolPriceTicker * - * @param symbol (optional) - * @param pair (optional) + * @param symbol Symbol (optional) + * @param pair Pair (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -3317,7 +3319,7 @@ public ApiResponse symbolOrderBookTicker( * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#symbol-price-ticker">Symbol * Price Ticker Documentation */ private okhttp3.Call symbolPriceTickerCall(String symbol, String pair) throws ApiException { @@ -3415,13 +3417,13 @@ private okhttp3.Call symbolPriceTickerValidateBeforeCall(String symbol, String p } /** - * Symbol Price Ticker Latest price for a symbol or symbols. * Symbol and pair cannot be sent - * together * If a pair is sent,tickers for all symbols of the pair will be returned * If either - * a pair or symbol is sent, tickers for all symbols of all pairs will be returned Weight: 1 for - * a single symbol, 2 when the symbol parameter is omitted + * Symbol Price Ticker Latest price for a symbol or symbols. Weight: **1** for a single symbol, + * **2** when the symbol parameter is omitted Notes: - Symbol and pair cannot be sent together - + * If a pair is sent,tickers for all symbols of the pair will be returned - If either a pair or + * symbol is sent, tickers for all symbols of all pairs will be returned * - * @param symbol (optional) - * @param pair (optional) + * @param symbol Symbol (optional) + * @param pair Pair (optional) * @return ApiResponse<SymbolPriceTickerResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3433,7 +3435,7 @@ private okhttp3.Call symbolPriceTickerValidateBeforeCall(String symbol, String p * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#symbol-price-ticker">Symbol * Price Ticker Documentation */ public ApiResponse symbolPriceTicker(String symbol, String pair) @@ -3447,12 +3449,10 @@ public ApiResponse symbolPriceTicker(String symbol, S /** * Build call for takerBuySellVolume * - * @param pair BTCUSD (required) - * @param contractType ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param pair (required) + * @param contractType (required) + * @param period (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return Call to execute @@ -3465,7 +3465,7 @@ public ApiResponse symbolPriceTicker(String symbol, S * * * @see Taker + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#taker-buy-sell-volume">Taker * Buy/Sell Volume Documentation */ private okhttp3.Call takerBuySellVolumeCall( @@ -3604,15 +3604,13 @@ private okhttp3.Call takerBuySellVolumeValidateBeforeCall( /** * Taker Buy/Sell Volume Taker Buy Volume: the total volume of buy orders filled by takers * within the period. Taker Sell Volume: the total volume of sell orders filled by takers within - * the period. * If startTime and endTime are not sent, the most recent data is returned. * Only - * the data of the latest 30 days is available. Weight: 1 + * the period. Weight(IP): 1 Notes: - If startTime and endTime are not sent, the most recent + * data is returned. - Only the data of the latest 30 days is available. * - * @param pair BTCUSD (required) - * @param contractType ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param pair (required) + * @param contractType (required) + * @param period (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<TakerBuySellVolumeResponse> @@ -3626,14 +3624,14 @@ private okhttp3.Call takerBuySellVolumeValidateBeforeCall( * * * @see Taker + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#taker-buy-sell-volume">Taker * Buy/Sell Volume Documentation */ public ApiResponse takerBuySellVolume( @NotNull String pair, @NotNull ContractType contractType, @NotNull Period period, - Long limit, + @Max(500L) Long limit, Long startTime, Long endTime) throws ApiException { @@ -3658,7 +3656,7 @@ public ApiResponse takerBuySellVolume( * * * @see Test + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#test-connectivity">Test * Connectivity Documentation */ private okhttp3.Call testConnectivityCall() throws ApiException { @@ -3746,7 +3744,7 @@ private okhttp3.Call testConnectivityValidateBeforeCall() throws ApiException { } /** - * Test Connectivity Test connectivity to the Rest API. Weight: 1 + * Test Connectivity Test connectivity to the Rest API. Weight(IP): 1 * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -3759,7 +3757,7 @@ private okhttp3.Call testConnectivityValidateBeforeCall() throws ApiException { * * * @see Test + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#test-connectivity">Test * Connectivity Documentation */ public ApiResponse testConnectivity() throws ApiException { @@ -3770,8 +3768,8 @@ public ApiResponse testConnectivity() throws ApiException { /** * Build call for ticker24hrPriceChangeStatistics * - * @param symbol (optional) - * @param pair (optional) + * @param symbol Symbol (optional) + * @param pair Pair (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -3782,7 +3780,7 @@ public ApiResponse testConnectivity() throws ApiException { * * * @see 24hr + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#ticker24hr-price-change-statistics">24hr * Ticker Price Change Statistics Documentation */ private okhttp3.Call ticker24hrPriceChangeStatisticsCall(String symbol, String pair) @@ -3883,14 +3881,14 @@ private okhttp3.Call ticker24hrPriceChangeStatisticsValidateBeforeCall( } /** - * 24hr Ticker Price Change Statistics 24 hour rolling window price change statistics. * Symbol - * and pair cannot be sent together * If a pair is sent,tickers for all symbols of the pair will - * be returned * If either a pair or symbol is sent, tickers for all symbols of all pairs will - * be returned Weight: 1 for a single symbol, 40 when the symbol parameter is omitted Careful - * when accessing this with no symbol. + * 24hr Ticker Price Change Statistics 24 hour rolling window price change statistics. Weight: + * **1** for a single symbol, **40** when the symbol parameter is omitted **Careful** when + * accessing this with no symbol. Notes: - Symbol and pair cannot be sent together - If a pair + * is sent,tickers for all symbols of the pair will be returned - If either a pair or symbol is + * sent, tickers for all symbols of all pairs will be returned * - * @param symbol (optional) - * @param pair (optional) + * @param symbol Symbol (optional) + * @param pair Pair (optional) * @return ApiResponse<Ticker24hrPriceChangeStatisticsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3902,7 +3900,7 @@ private okhttp3.Call ticker24hrPriceChangeStatisticsValidateBeforeCall( * * * @see 24hr + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#ticker24hr-price-change-statistics">24hr * Ticker Price Change Statistics Documentation */ public ApiResponse ticker24hrPriceChangeStatistics( @@ -3916,11 +3914,9 @@ public ApiResponse ticker24hrPriceChang /** * Build call for topTraderLongShortRatioAccounts * - * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (required) + * @param period (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return Call to execute @@ -3933,8 +3929,8 @@ public ApiResponse ticker24hrPriceChang * * * @see Top - * Trader Long/Short Ratio (Accounts) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#top-trader-long-short-ratio-accounts">Top + * Trader Long/Short Account Ratio Documentation */ private okhttp3.Call topTraderLongShortRatioAccountsCall( String symbol, Period period, Long limit, Long startTime, Long endTime) @@ -4054,20 +4050,18 @@ private okhttp3.Call topTraderLongShortRatioAccountsValidateBeforeCall( } /** - * Top Trader Long/Short Ratio (Accounts) The proportion of net long and net short accounts to + * Top Trader Long/Short Account Ratio The proportion of net long and net short accounts to * total accounts of the top 20% users with the highest margin balance. Each account is counted * once only. Long Account % = Accounts of top traders with net long positions / Total * accounts of top traders with open positions Short Account % = Accounts of top traders * with net short positions / Total accounts of top traders with open positions Long/Short Ratio - * (Accounts) = Long Account % / Short Account % * If startTime and endTime are not sent, - * the most recent data is returned. * Only the data of the latest 30 days is available. Weight: - * 1 + * (Accounts) = Long Account % / Short Account % Weight(IP): 1 Security Type: Accounts + * Notes: - If startTime and endTime are not sent, the most recent data is returned. - Only the + * data of the latest 30 days is available. * - * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (required) + * @param period (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<TopTraderLongShortRatioAccountsResponse> @@ -4081,13 +4075,13 @@ private okhttp3.Call topTraderLongShortRatioAccountsValidateBeforeCall( * * * @see Top - * Trader Long/Short Ratio (Accounts) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#top-trader-long-short-ratio-accounts">Top + * Trader Long/Short Account Ratio Documentation */ public ApiResponse topTraderLongShortRatioAccounts( @NotNull String symbol, @NotNull Period period, - Long limit, + @Max(500L) Long limit, Long startTime, Long endTime) throws ApiException { @@ -4102,11 +4096,9 @@ public ApiResponse topTraderLongShortRa /** * Build call for topTraderLongShortRatioPositions * - * @param pair BTCUSD (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param pair (required) + * @param period (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return Call to execute @@ -4119,8 +4111,8 @@ public ApiResponse topTraderLongShortRa * * * @see Top - * Trader Long/Short Ratio (Positions) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#top-trader-long-short-ratio-positions">Top + * Trader Long/Short Position Ratio Documentation */ private okhttp3.Call topTraderLongShortRatioPositionsCall( String pair, Period period, Long limit, Long startTime, Long endTime) @@ -4240,19 +4232,17 @@ private okhttp3.Call topTraderLongShortRatioPositionsValidateBeforeCall( } /** - * Top Trader Long/Short Ratio (Positions) The proportion of net long and net short positions to + * Top Trader Long/Short Position Ratio The proportion of net long and net short positions to * total open positions of the top 20% users with the highest margin balance. Long Position % * = Long positions of top traders / Total open positions of top traders Short Position % * = Short positions of top traders / Total open positions of top traders Long/Short Ratio - * (Positions) = Long Position % / Short Position % * If startTime and endTime are not - * sent, the most recent data is returned. * Only the data of the latest 30 days is available. - * Weight: 1 + * (Positions) = Long Position % / Short Position % Weight(IP): 1 Security Type: Positions + * Notes: - If startTime and endTime are not sent, the most recent data is returned. - Only the + * data of the latest 30 days is available. * - * @param pair BTCUSD (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param pair (required) + * @param period (required) + * @param limit Maximum number of records to return. (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<TopTraderLongShortRatioPositionsResponse> @@ -4266,11 +4256,15 @@ private okhttp3.Call topTraderLongShortRatioPositionsValidateBeforeCall( * * * @see Top - * Trader Long/Short Ratio (Positions) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#top-trader-long-short-ratio-positions">Top + * Trader Long/Short Position Ratio Documentation */ public ApiResponse topTraderLongShortRatioPositions( - @NotNull String pair, @NotNull Period period, Long limit, Long startTime, Long endTime) + @NotNull String pair, + @NotNull Period period, + @Max(500L) Long limit, + Long startTime, + Long endTime) throws ApiException { okhttp3.Call localVarCall = topTraderLongShortRatioPositionsValidateBeforeCall( diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/PortfolioMarginEndpointsApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/PortfolioMarginEndpointsApi.java deleted file mode 100644 index 6c966cc42..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/PortfolioMarginEndpointsApi.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.rest.api; - -import com.binance.connector.client.common.ApiClient; -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.Pair; -import com.binance.connector.client.common.SystemUtil; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.exception.ConstraintViolationException; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ClassicPortfolioMarginAccountInformationResponse; -import com.google.gson.reflect.TypeToken; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.Validation; -import jakarta.validation.Validator; -import jakarta.validation.constraints.*; -import jakarta.validation.executable.ExecutableValidator; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; - -public class PortfolioMarginEndpointsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - private static final String USER_AGENT = - String.format( - "binance-derivatives-trading-coin-futures/7.1.1 (Java/%s; %s; %s)", - SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); - private static final boolean HAS_TIME_UNIT = false; - - public PortfolioMarginEndpointsApi(ClientConfiguration clientConfiguration) { - this(new ApiClient(clientConfiguration)); - } - - public PortfolioMarginEndpointsApi(ApiClient apiClient) { - apiClient.setUserAgent(USER_AGENT); - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for classicPortfolioMarginAccountInformation - * - * @param asset (required) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Classic Portfolio Margin Account Information -
- * - * @see Classic - * Portfolio Margin Account Information (USER_DATA) Documentation - */ - private okhttp3.Call classicPortfolioMarginAccountInformationCall(String asset, Long recvWindow) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/dapi/v1/pmAccountInfo"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (asset != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("asset", asset)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call classicPortfolioMarginAccountInformationValidateBeforeCall( - String asset, Long recvWindow) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {asset, recvWindow}; - Method method = - this.getClass() - .getMethod( - "classicPortfolioMarginAccountInformation", - String.class, - Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return classicPortfolioMarginAccountInformationCall(asset, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Classic Portfolio Margin Account Information (USER_DATA) Get Classic Portfolio Margin current - * account information. * maxWithdrawAmount is for asset transfer out to the spot wallet. - * Weight: 5 - * - * @param asset (required) - * @param recvWindow (optional) - * @return ApiResponse<ClassicPortfolioMarginAccountInformationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Classic Portfolio Margin Account Information -
- * - * @see Classic - * Portfolio Margin Account Information (USER_DATA) Documentation - */ - public ApiResponse - classicPortfolioMarginAccountInformation(@NotNull String asset, Long recvWindow) - throws ApiException { - okhttp3.Call localVarCall = - classicPortfolioMarginAccountInformationValidateBeforeCall(asset, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/TradeApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/TradeApi.java index 6773cc585..904b2d17b 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/TradeApi.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/TradeApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -54,7 +54,6 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.PositionInformationResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.QueryCurrentOpenOrderResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.QueryOrderResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Type; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.UsersForceOrdersResponse; import com.google.gson.reflect.TypeToken; import jakarta.validation.ConstraintViolation; @@ -79,7 +78,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-coin-futures/7.1.1 (Java/%s; %s; %s)", + "binance-derivatives-trading-coin-futures/8.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -119,13 +118,13 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for accountTradeList * - * @param symbol (optional) - * @param pair (optional) - * @param orderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (optional) + * @param pair pair (optional) + * @param orderId Order ID (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -137,13 +136,13 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#account-trade-list">Account * Trade List (USER_DATA) Documentation */ private okhttp3.Call accountTradeListCall( String symbol, String pair, - Long orderId, + String orderId, Long startTime, Long endTime, Long fromId, @@ -240,7 +239,7 @@ private okhttp3.Call accountTradeListCall( private okhttp3.Call accountTradeListValidateBeforeCall( String symbol, String pair, - Long orderId, + String orderId, Long startTime, Long endTime, Long fromId, @@ -265,7 +264,7 @@ private okhttp3.Call accountTradeListValidateBeforeCall( "accountTradeList", String.class, String.class, - Long.class, + String.class, Long.class, Long.class, Long.class, @@ -290,21 +289,22 @@ private okhttp3.Call accountTradeListValidateBeforeCall( } /** - * Account Trade List (USER_DATA) Get trades for a specific account and symbol. * Either symbol - * or pair must be sent * Symbol and pair cannot be sent together * Pair and fromId cannot be - * sent together * OrderId can only be sent together with symbol * If a pair is sent,tickers for - * all symbols of the pair will be returned * The parameter `fromId` cannot be sent - * with `startTime` or `endTime` * If startTime and endTime are both not - * sent, then the last 7 days' data will be returned. * The time between startTime and - * endTime cannot be longer than 7 days. Weight: 20 with symbol,40 with pair - * - * @param symbol (optional) - * @param pair (optional) - * @param orderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * Account Trade List (USER_DATA) Get trades for a specific account and symbol. Weight: **20** + * with symbol,**40** with pair (after CM migration: **5** flat) Security Type: USER_DATA Notes: + * - Either symbol or pair must be sent - Symbol and pair cannot be sent together - Pair and + * fromId cannot be sent together - OrderId can only be sent together with symbol - If a pair is + * sent,tickers for all symbols of the pair will be returned - The parameter `fromId` + * cannot be sent with `startTime` or `endTime` - If startTime and endTime + * are both not sent, then the last 7 days' data will be returned. - The time between + * startTime and endTime cannot be longer than 7 days. + * + * @param symbol Symbol (optional) + * @param pair pair (optional) + * @param orderId Order ID (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return ApiResponse<AccountTradeListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -317,18 +317,18 @@ private okhttp3.Call accountTradeListValidateBeforeCall( * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#account-trade-list">Account * Trade List (USER_DATA) Documentation */ public ApiResponse accountTradeList( String symbol, String pair, - Long orderId, + String orderId, Long startTime, Long endTime, Long fromId, - Long limit, - Long recvWindow) + @Max(1000L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = accountTradeListValidateBeforeCall( @@ -341,12 +341,12 @@ public ApiResponse accountTradeList( /** * Build call for allOrders * - * @param symbol (optional) - * @param pair (optional) + * @param symbol Symbol (optional) + * @param pair Pair (optional) * @param orderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -358,7 +358,7 @@ public ApiResponse accountTradeList( * * * @see All + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#all-orders">All * Orders (USER_DATA) Documentation */ private okhttp3.Call allOrdersCall( @@ -505,20 +505,21 @@ private okhttp3.Call allOrdersValidateBeforeCall( /** * All Orders (USER_DATA) Get all account orders; active, canceled, or filled. * These orders * will not be found: * order status is CANCELED or EXPIRED AND order has NO filled trade AND - * created time + 3 days < current time * order create time + 90 days < current time * - * Either `symbol` or `pair` must be sent. * `pair` can't be - * sent with `orderId` * If `orderId` is set, it will get orders >= - * that `orderId`. Otherwise most recent orders are returned. * If orderId is set, it - * will get orders >= that orderId. Otherwise most recent orders are returned. * The - * query time period must be less then 7 days( default as the recent 7 days). Weight: 20 with - * symbol, 40 with pair - * - * @param symbol (optional) - * @param pair (optional) + * created time + 3 days < current time * order create time + 90 days < current time + * Weight: **20** with symbol, **40** with pair (after CM migration: **5** flat) Security Type: + * USER_DATA Notes: - Either `symbol` or `pair` must be sent. - + * `pair` can't be sent with `orderId` - If `orderId` is set, + * it will get orders >= that `orderId`. Otherwise most recent orders are + * returned. - If orderId is set, it will get orders >= that orderId. Otherwise most + * recent orders are returned. - The query time period must be less then 7 days( default as the + * recent 7 days). + * + * @param symbol Symbol (optional) + * @param pair Pair (optional) * @param orderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return ApiResponse<AllOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -531,7 +532,7 @@ private okhttp3.Call allOrdersValidateBeforeCall( * * * @see All + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#all-orders">All * Orders (USER_DATA) Documentation */ public ApiResponse allOrders( @@ -540,8 +541,8 @@ public ApiResponse allOrders( Long orderId, Long startTime, Long endTime, - Long limit, - Long recvWindow) + @Max(100L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = allOrdersValidateBeforeCall( @@ -564,7 +565,7 @@ public ApiResponse allOrders( * * * @see Auto-Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#auto-cancel-all-open-orders">Auto-Cancel * All Open Orders (TRADE) Documentation */ private okhttp3.Call autoCancelAllOpenOrdersCall( @@ -681,7 +682,8 @@ private okhttp3.Call autoCancelAllOpenOrdersValidateBeforeCall( * to be too precise or too small. * Example usage: Call this endpoint at 30s intervals with an * countdownTime of 120000 (120s). If this endpoint is not called within 120 seconds, all your * orders of the specified symbol will be automatically canceled. If this endpoint is called - * with an countdownTime of 0, the countdown timer will be stopped. Weight: 10 + * with an countdownTime of 0, the countdown timer will be stopped. Weight(IP): 10 Security + * Type: TRADE * * @param autoCancelAllOpenOrdersRequest (required) * @return ApiResponse<AutoCancelAllOpenOrdersResponse> @@ -695,7 +697,7 @@ private okhttp3.Call autoCancelAllOpenOrdersValidateBeforeCall( * * * @see Auto-Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#auto-cancel-all-open-orders">Auto-Cancel * All Open Orders (TRADE) Documentation */ public ApiResponse autoCancelAllOpenOrders( @@ -711,7 +713,7 @@ public ApiResponse autoCancelAllOpenOrders( /** * Build call for cancelAllOpenOrders * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -723,8 +725,8 @@ public ApiResponse autoCancelAllOpenOrders( * * * @see Cancel - * All Open Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#cancel-all-open-orders">Cancel + * All Open Orders (TRADE) Documentation */ private okhttp3.Call cancelAllOpenOrdersCall(String symbol, Long recvWindow) throws ApiException { @@ -823,9 +825,9 @@ private okhttp3.Call cancelAllOpenOrdersValidateBeforeCall(String symbol, Long r } /** - * Cancel All Open Orders(TRADE) Cancel All Open Orders Weight: 1 + * Cancel All Open Orders (TRADE) Cancel All Open Orders Weight(IP): 1 Security Type: TRADE * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<CancelAllOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -838,11 +840,11 @@ private okhttp3.Call cancelAllOpenOrdersValidateBeforeCall(String symbol, Long r * * * @see Cancel - * All Open Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#cancel-all-open-orders">Cancel + * All Open Orders (TRADE) Documentation */ public ApiResponse cancelAllOpenOrders( - @NotNull String symbol, Long recvWindow) throws ApiException { + @NotNull String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = cancelAllOpenOrdersValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -852,11 +854,9 @@ public ApiResponse cancelAllOpenOrders( /** * Build call for cancelMultipleOrders * - * @param symbol (required) - * @param orderIdList max length 10 <br /> e.g. [1234567,2345678] (optional) - * @param origClientOrderIdList max length 10<br /> e.g. - * [\"my_id_1\",\"my_id_2\"], encode the double quotes. No space after - * comma. (optional) + * @param symbol Symbol (required) + * @param orderIdList Order IDs to cancel. (optional) + * @param origClientOrderIdList Original client order IDs to cancel. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -868,8 +868,8 @@ public ApiResponse cancelAllOpenOrders( * * * @see Cancel - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#cancel-multiple-orders">Cancel + * Multiple Orders (TRADE) Documentation */ private okhttp3.Call cancelMultipleOrdersCall( String symbol, @@ -994,14 +994,12 @@ private okhttp3.Call cancelMultipleOrdersValidateBeforeCall( } /** - * Cancel Multiple Orders(TRADE) Cancel Multiple Orders * Either `orderIdList` or - * `origClientOrderIdList ` must be sent. Weight: 1 + * Cancel Multiple Orders (TRADE) Cancel Multiple Orders Weight(IP): 1 Security Type: TRADE + * Notes: - Either `orderIdList` or `origClientOrderIdList ` must be sent. * - * @param symbol (required) - * @param orderIdList max length 10 <br /> e.g. [1234567,2345678] (optional) - * @param origClientOrderIdList max length 10<br /> e.g. - * [\"my_id_1\",\"my_id_2\"], encode the double quotes. No space after - * comma. (optional) + * @param symbol Symbol (required) + * @param orderIdList Order IDs to cancel. (optional) + * @param origClientOrderIdList Original client order IDs to cancel. (optional) * @param recvWindow (optional) * @return ApiResponse<CancelMultipleOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1014,14 +1012,14 @@ private okhttp3.Call cancelMultipleOrdersValidateBeforeCall( * * * @see Cancel - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#cancel-multiple-orders">Cancel + * Multiple Orders (TRADE) Documentation */ public ApiResponse cancelMultipleOrders( @NotNull String symbol, - OrderIdList orderIdList, - OrigClientOrderIdList origClientOrderIdList, - Long recvWindow) + @Size(max = 10) OrderIdList orderIdList, + @Size(max = 10) OrigClientOrderIdList origClientOrderIdList, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = cancelMultipleOrdersValidateBeforeCall( @@ -1034,9 +1032,9 @@ public ApiResponse cancelMultipleOrders( /** * Build call for cancelOrder * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1048,7 +1046,7 @@ public ApiResponse cancelMultipleOrders( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#cancel-order">Cancel * Order (TRADE) Documentation */ private okhttp3.Call cancelOrderCall( @@ -1165,12 +1163,12 @@ private okhttp3.Call cancelOrderValidateBeforeCall( } /** - * Cancel Order (TRADE) Cancel an active order. * Either `orderId` or - * `origClientOrderId` must be sent. Weight: 1 + * Cancel Order (TRADE) Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - + * Either `orderId` or `origClientOrderId` must be sent. * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) * @param recvWindow (optional) * @return ApiResponse<CancelOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1183,11 +1181,14 @@ private okhttp3.Call cancelOrderValidateBeforeCall( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#cancel-order">Cancel * Order (TRADE) Documentation */ public ApiResponse cancelOrder( - @NotNull String symbol, Long orderId, String origClientOrderId, Long recvWindow) + @NotNull String symbol, + Long orderId, + String origClientOrderId, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = cancelOrderValidateBeforeCall(symbol, orderId, origClientOrderId, recvWindow); @@ -1210,7 +1211,7 @@ public ApiResponse cancelOrder( * * * @see Change + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#change-initial-leverage">Change * Initial Leverage (TRADE) Documentation */ private okhttp3.Call changeInitialLeverageCall( @@ -1317,7 +1318,7 @@ private okhttp3.Call changeInitialLeverageValidateBeforeCall( /** * Change Initial Leverage (TRADE) Change user's initial leverage in the specific symbol * market. For Hedge Mode, LONG and SHORT positions of one symbol use the same initial leverage - * and share a total notional value. Weight: 1 + * and share a total notional value. Weight(IP): 1 Security Type: TRADE * * @param changeInitialLeverageRequest (required) * @return ApiResponse<ChangeInitialLeverageResponse> @@ -1331,7 +1332,7 @@ private okhttp3.Call changeInitialLeverageValidateBeforeCall( * * * @see Change + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#change-initial-leverage">Change * Initial Leverage (TRADE) Documentation */ public ApiResponse changeInitialLeverage( @@ -1358,7 +1359,7 @@ public ApiResponse changeInitialLeverage( * * * @see Change + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#change-margin-type">Change * Margin Type (TRADE) Documentation */ private okhttp3.Call changeMarginTypeCall(ChangeMarginTypeRequest changeMarginTypeRequest) @@ -1464,7 +1465,8 @@ private okhttp3.Call changeMarginTypeValidateBeforeCall( /** * Change Margin Type (TRADE) Change user's margin type in the specific symbol market.For * Hedge Mode, LONG and SHORT positions of one symbol use the same margin type. With ISOLATED - * margin type, margins of the LONG and SHORT positions are isolated from each other. Weight: 1 + * margin type, margins of the LONG and SHORT positions are isolated from each other. + * Weight(IP): 1 Security Type: TRADE * * @param changeMarginTypeRequest (required) * @return ApiResponse<ChangeMarginTypeResponse> @@ -1478,7 +1480,7 @@ private okhttp3.Call changeMarginTypeValidateBeforeCall( * * * @see Change + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#change-margin-type">Change * Margin Type (TRADE) Documentation */ public ApiResponse changeMarginType( @@ -1503,8 +1505,8 @@ public ApiResponse changeMarginType( * * * @see Change - * Position Mode(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#change-position-mode">Change + * Position Mode (TRADE) Documentation */ private okhttp3.Call changePositionModeCall(ChangePositionModeRequest changePositionModeRequest) throws ApiException { @@ -1605,8 +1607,12 @@ private okhttp3.Call changePositionModeValidateBeforeCall( } /** - * Change Position Mode(TRADE) Change user's position mode (Hedge Mode or One-way Mode ) on - * ***EVERY symbol*** Weight: 1 + * Change Position Mode (TRADE) Change user's position mode (Hedge Mode or One-way Mode ) on + * ***EVERY symbol***. **After CM migration**, UM and CM share the **same** + * `dualSidePosition` setting. Calling this endpoint flips both UM and CM at once. If + * either side has any open order or open position, the change is rejected: - `-4067` + * (open orders exist) - `-4068` (open position exists) Weight(IP): 1 Security Type: + * TRADE * * @param changePositionModeRequest (required) * @return ApiResponse<ChangePositionModeResponse> @@ -1620,8 +1626,8 @@ private okhttp3.Call changePositionModeValidateBeforeCall( * * * @see Change - * Position Mode(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#change-position-mode">Change + * Position Mode (TRADE) Documentation */ public ApiResponse changePositionMode( @Valid @NotNull ChangePositionModeRequest changePositionModeRequest) @@ -1635,8 +1641,9 @@ public ApiResponse changePositionMode( /** * Build call for currentAllOpenOrders * - * @param symbol (optional) - * @param pair (optional) + * @param symbol Symbol. **After CM migration, an invalid `symbol` returns + * `-1121` (previously a silent `200`).** (optional) + * @param pair Pair (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1648,7 +1655,7 @@ public ApiResponse changePositionMode( * * * @see Current + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#current-all-open-orders">Current * All Open Orders (USER_DATA) Documentation */ private okhttp3.Call currentAllOpenOrdersCall(String symbol, String pair, Long recvWindow) @@ -1755,10 +1762,12 @@ private okhttp3.Call currentAllOpenOrdersValidateBeforeCall( /** * Current All Open Orders (USER_DATA) Get all open orders on a symbol. **Careful** when - * accessing this with no symbol. Weight: 1 for a single symbol, 40 for mutltiple symbols + * accessing this with no symbol. Weight(IP): null Weight: **1** for a single symbol, **40** for + * mutltiple symbols Security Type: USER_DATA * - * @param symbol (optional) - * @param pair (optional) + * @param symbol Symbol. **After CM migration, an invalid `symbol` returns + * `-1121` (previously a silent `200`).** (optional) + * @param pair Pair (optional) * @param recvWindow (optional) * @return ApiResponse<CurrentAllOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1771,11 +1780,11 @@ private okhttp3.Call currentAllOpenOrdersValidateBeforeCall( * * * @see Current + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#current-all-open-orders">Current * All Open Orders (USER_DATA) Documentation */ public ApiResponse currentAllOpenOrders( - String symbol, String pair, Long recvWindow) throws ApiException { + String symbol, String pair, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = currentAllOpenOrdersValidateBeforeCall(symbol, pair, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1786,12 +1795,12 @@ public ApiResponse currentAllOpenOrders( /** * Build call for getOrderModifyHistory * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) + * @param startTime Timestamp in ms to get modification history from INCLUSIVE (optional) + * @param endTime Timestamp in ms to get modification history until INCLUSIVE (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1803,7 +1812,7 @@ public ApiResponse currentAllOpenOrders( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#get-order-modify-history">Get * Order Modify History (USER_DATA) Documentation */ private okhttp3.Call getOrderModifyHistoryCall( @@ -1950,17 +1959,17 @@ private okhttp3.Call getOrderModifyHistoryValidateBeforeCall( } /** - * Get Order Modify History (USER_DATA) Get order modification history * Either - * `orderId` or `origClientOrderId` must be sent, and the - * `orderId` will prevail if both are sent. * Order modify history longer than 3 month - * is not avaliable Weight: 1 - * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * Get Order Modify History (USER_DATA) Get order modification history Weight(IP): 1 Security + * Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be + * sent, and the `orderId` will prevail if both are sent. - Order modify history + * longer than 3 month is not avaliable + * + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) + * @param startTime Timestamp in ms to get modification history from INCLUSIVE (optional) + * @param endTime Timestamp in ms to get modification history until INCLUSIVE (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return ApiResponse<GetOrderModifyHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1973,7 +1982,7 @@ private okhttp3.Call getOrderModifyHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#get-order-modify-history">Get * Order Modify History (USER_DATA) Documentation */ public ApiResponse getOrderModifyHistory( @@ -1982,8 +1991,8 @@ public ApiResponse getOrderModifyHistory( String origClientOrderId, Long startTime, Long endTime, - Long limit, - Long recvWindow) + @Max(100L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getOrderModifyHistoryValidateBeforeCall( @@ -1998,9 +2007,9 @@ public ApiResponse getOrderModifyHistory( * * @param symbol (required) * @param type 1: Add position margin,2: Reduce position margin (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2012,11 +2021,11 @@ public ApiResponse getOrderModifyHistory( * * * @see Get - * Position Margin Change History(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#get-position-margin-change-history">Get + * Position Margin Change History (TRADE) Documentation */ private okhttp3.Call getPositionMarginChangeHistoryCall( - String symbol, Type type, Long startTime, Long endTime, Long limit, Long recvWindow) + String symbol, Long type, Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { String basePath = null; // Operation Servers @@ -2098,7 +2107,7 @@ private okhttp3.Call getPositionMarginChangeHistoryCall( @SuppressWarnings("rawtypes") private okhttp3.Call getPositionMarginChangeHistoryValidateBeforeCall( - String symbol, Type type, Long startTime, Long endTime, Long limit, Long recvWindow) + String symbol, Long type, Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { try { Validator validator = @@ -2115,7 +2124,7 @@ private okhttp3.Call getPositionMarginChangeHistoryValidateBeforeCall( .getMethod( "getPositionMarginChangeHistory", String.class, - Type.class, + Long.class, Long.class, Long.class, Long.class, @@ -2139,13 +2148,14 @@ private okhttp3.Call getPositionMarginChangeHistoryValidateBeforeCall( } /** - * Get Position Margin Change History(TRADE) Get position margin change history Weight: 1 + * Get Position Margin Change History (TRADE) Get position margin change history Weight(IP): 1 + * Security Type: TRADE * * @param symbol (required) * @param type 1: Add position margin,2: Reduce position margin (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return ApiResponse<GetPositionMarginChangeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2158,16 +2168,16 @@ private okhttp3.Call getPositionMarginChangeHistoryValidateBeforeCall( * * * @see Get - * Position Margin Change History(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#get-position-margin-change-history">Get + * Position Margin Change History (TRADE) Documentation */ public ApiResponse getPositionMarginChangeHistory( @NotNull String symbol, - Type type, + Long type, Long startTime, Long endTime, Long limit, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getPositionMarginChangeHistoryValidateBeforeCall( @@ -2191,8 +2201,8 @@ public ApiResponse getPositionMarginChan * * * @see Modify - * Isolated Position Margin(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#modify-isolated-position-margin">Modify + * Isolated Position Margin (TRADE) Documentation */ private okhttp3.Call modifyIsolatedPositionMarginCall( ModifyIsolatedPositionMarginRequest modifyIsolatedPositionMarginRequest) @@ -2313,8 +2323,8 @@ private okhttp3.Call modifyIsolatedPositionMarginValidateBeforeCall( } /** - * Modify Isolated Position Margin(TRADE) Modify Isolated Position Margin * Only for isolated - * symbol Weight: 1 + * Modify Isolated Position Margin (TRADE) Modify Isolated Position Margin Weight(IP): 1 + * Security Type: TRADE Notes: - Only for isolated symbol * * @param modifyIsolatedPositionMarginRequest (required) * @return ApiResponse<ModifyIsolatedPositionMarginResponse> @@ -2328,8 +2338,8 @@ private okhttp3.Call modifyIsolatedPositionMarginValidateBeforeCall( * * * @see Modify - * Isolated Position Margin(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#modify-isolated-position-margin">Modify + * Isolated Position Margin (TRADE) Documentation */ public ApiResponse modifyIsolatedPositionMargin( @Valid @NotNull ModifyIsolatedPositionMarginRequest modifyIsolatedPositionMarginRequest) @@ -2355,8 +2365,8 @@ public ApiResponse modifyIsolatedPositionM * * * @see Modify - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#modify-multiple-orders">Modify + * Multiple Orders (TRADE) Documentation */ private okhttp3.Call modifyMultipleOrdersCall( ModifyMultipleOrdersRequest modifyMultipleOrdersRequest) throws ApiException { @@ -2457,11 +2467,13 @@ private okhttp3.Call modifyMultipleOrdersValidateBeforeCall( } /** - * Modify Multiple Orders(TRADE) Modify Multiple Orders * Parameter rules are same with - * `Modify Order` * Batch modify orders are processed concurrently, and the order of - * matching is not guaranteed. * The order of returned contents for batch modify orders is the - * same as the order of the order list. * One order can only be modfied for less than 10000 - * times Weight: 5 + * Modify Multiple Orders (TRADE) Modify Multiple Orders Weight(IP): 5 Security Type: TRADE + * Notes: - Parameter rules are same with `Modify Order` - Batch modify orders are + * processed concurrently, and the order of matching is not guaranteed. - The order of returned + * contents for batch modify orders is the same as the order of the order list. - One order can + * only be modfied for less than 10000 times - `modifyId` is an optional user-defined + * identifier passed through as-is; the server does not validate its uniqueness. If omitted, it + * is not included in the response. * * @param modifyMultipleOrdersRequest (required) * @return ApiResponse<ModifyMultipleOrdersResponse> @@ -2475,8 +2487,8 @@ private okhttp3.Call modifyMultipleOrdersValidateBeforeCall( * * * @see Modify - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#modify-multiple-orders">Modify + * Multiple Orders (TRADE) Documentation */ public ApiResponse modifyMultipleOrders( @Valid @NotNull ModifyMultipleOrdersRequest modifyMultipleOrdersRequest) @@ -2502,7 +2514,7 @@ public ApiResponse modifyMultipleOrders( * * * @see Modify + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#modify-order">Modify * Order (TRADE) Documentation */ private okhttp3.Call modifyOrderCall(ModifyOrderRequest modifyOrderRequest) @@ -2562,6 +2574,10 @@ private okhttp3.Call modifyOrderCall(ModifyOrderRequest modifyOrderRequest) localVarFormParams.put("priceMatch", modifyOrderRequest.getPriceMatch()); } + if (modifyOrderRequest.getModifyId() != null) { + localVarFormParams.put("modifyId", modifyOrderRequest.getModifyId()); + } + if (modifyOrderRequest.getRecvWindow() != null) { localVarFormParams.put("recvWindow", modifyOrderRequest.getRecvWindow()); } @@ -2629,16 +2645,16 @@ private okhttp3.Call modifyOrderValidateBeforeCall(ModifyOrderRequest modifyOrde /** * Modify Order (TRADE) Order modify function, currently only LIMIT order modification is - * supported, modified orders will be reordered in the match queue * Either `orderId` - * or `origClientOrderId` must be sent, and the `orderId` will prevail if - * both are sent. * Either `quantity` or `price` must be sent. * When the - * new `quantity` or `price` doesn'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 `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 Weight: - * 1 + * supported, modified orders will be reordered in the match queue Weight(IP): 1 Security Type: + * TRADE Notes: - Either `orderId` or `origClientOrderId` must be sent, and + * the `orderId` will prevail if both are sent. - Either `quantity` or + * `price` must be sent. *(After CM migration, both `quantity` and + * `price` are required.)* - When the new `quantity` or `price` + * doesn'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 + * `quantity` - 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 * * @param modifyOrderRequest (required) * @return ApiResponse<ModifyOrderResponse> @@ -2652,7 +2668,7 @@ private okhttp3.Call modifyOrderValidateBeforeCall(ModifyOrderRequest modifyOrde * * * @see Modify + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#modify-order">Modify * Order (TRADE) Documentation */ public ApiResponse modifyOrder( @@ -2677,7 +2693,7 @@ public ApiResponse modifyOrder( * * * @see New + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#new-order">New * Order (TRADE) Documentation */ private okhttp3.Call newOrderCall(NewOrderRequest newOrderRequest) throws ApiException { @@ -2721,8 +2737,8 @@ private okhttp3.Call newOrderCall(NewOrderRequest newOrderRequest) throws ApiExc localVarFormParams.put("type", newOrderRequest.getType()); } - if (newOrderRequest.getTimeInForce() != null) { - localVarFormParams.put("timeInForce", newOrderRequest.getTimeInForce()); + if (newOrderRequest.getReduceOnly() != null) { + localVarFormParams.put("reduceOnly", newOrderRequest.getReduceOnly()); } if (newOrderRequest.getQuantity() != null) { @@ -2731,10 +2747,6 @@ private okhttp3.Call newOrderCall(NewOrderRequest newOrderRequest) throws ApiExc DecimalFormatter.getFormatter().format(newOrderRequest.getQuantity())); } - if (newOrderRequest.getReduceOnly() != null) { - localVarFormParams.put("reduceOnly", newOrderRequest.getReduceOnly()); - } - if (newOrderRequest.getPrice() != null) { localVarFormParams.put( "price", DecimalFormatter.getFormatter().format(newOrderRequest.getPrice())); @@ -2766,6 +2778,10 @@ private okhttp3.Call newOrderCall(NewOrderRequest newOrderRequest) throws ApiExc DecimalFormatter.getFormatter().format(newOrderRequest.getCallbackRate())); } + if (newOrderRequest.getTimeInForce() != null) { + localVarFormParams.put("timeInForce", newOrderRequest.getTimeInForce()); + } + if (newOrderRequest.getWorkingType() != null) { localVarFormParams.put("workingType", newOrderRequest.getWorkingType()); } @@ -2853,43 +2869,42 @@ private okhttp3.Call newOrderValidateBeforeCall(NewOrderRequest newOrderRequest) } /** - * New Order (TRADE) Send in a new order. * Order with type `STOP`, parameter - * `timeInForce` can be sent ( default `GTC`). * Order with type - * `TAKE_PROFIT`, parameter `timeInForce` can be sent ( default - * `GTC`). * Condition orders will be triggered when: * If - * parameter`priceProtect`is sent as true: * when price reaches the + * New Order (TRADE) Send in a new order. Weight: 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: - Additional mandatory parameters based on `type`: - Order with type + * `STOP`, parameter `timeInForce` can be sent ( default `GTC`). - + * Order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent ( + * default `GTC`). - Condition orders will be triggered when: - If + * parameter`priceProtect`is sent as true: - when price reaches the * `stopPrice` ,the difference rate between \"MARK_PRICE\" and * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /dapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed `<= - * `activationPrice`, and the latest price >`= the lowest price * (1 + - * `callbackRate`) * SELL: the highest price after order placed >= - * `activationPrice`, and the latest price <= the highest price * (1 - - * `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. - * ``{\"code\": -2021, \"msg\": \"Order would immediately - * trigger.\"}`` means that the parameters you send do not meet the following - * requirements: * BUY: `activationPrice` should be smaller than latest price. * SELL: - * `activationPrice` should be larger than latest price. * If `newOrderRespType - * ` is sent as `RESULT` : * `MARKET` order: the final FILLED result of - * the order will be return directly. * `LIMIT` order with special + * symbol - \"triggerProtect\" of a symbol can be got from `GET + * /dapi/v1/exchangeInfo` - `STOP`, `STOP_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - + * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") + * -`TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - + * `TRAILING_STOP_MARKET`: - BUY: the lowest price after order placed + * ``= the lowest price * (1 + `callbackRate`) - SELL: the highest + * price after order placed >= `activationPrice`, and the latest price - For + * `TRAILING_STOP_MARKET`, if you got such error code. > `{\"code\": + * -2021, \"msg\": \"Order would immediately trigger.\"}` > means + * that the parameters you send do not meet the following requirements: - BUY: + * `activationPrice` should be smaller than latest price. - SELL: + * `activationPrice` should be larger than latest price. - If `newOrderRespType + * ` is sent as `RESULT` : - `MARKET` order: the final FILLED result of + * the order will be return directly. - `LIMIT` order with special * `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be - * returned directly. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` parameter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with + * returned directly. - `STOP_MARKET`, `TAKE_PROFIT_MARKET` with + * `closePosition`=`true`: - Follow the same rules for condition + * orders. - If triggered,**close all** current long position( if `SELL`) or current + * short position( if `BUY`). - Cannot be used with `quantity` parameter - + * Cannot be used with `reduceOnly` parameter - In Hedge Mode,cannot be used with * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * + * `SELL` orders in `SHORT` position side - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC`. Weight: 1 on 1min order rate - * limit(X-MBX-ORDER-COUNT-1M)\\ 0 on IP rate limit(x-mbx-used-weight-1m) + * `IOC` or `GTC`. * * @param newOrderRequest (required) * @return ApiResponse<NewOrderResponse> @@ -2903,7 +2918,7 @@ private okhttp3.Call newOrderValidateBeforeCall(NewOrderRequest newOrderRequest) * * * @see New + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#new-order">New * Order (TRADE) Documentation */ public ApiResponse newOrder(@Valid @NotNull NewOrderRequest newOrderRequest) @@ -2927,8 +2942,8 @@ public ApiResponse newOrder(@Valid @NotNull NewOrderRequest ne * * * @see Place - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#place-multiple-orders">Place + * Multiple Orders (TRADE) Documentation */ private okhttp3.Call placeMultipleOrdersCall( PlaceMultipleOrdersRequest placeMultipleOrdersRequest) throws ApiException { @@ -3029,10 +3044,12 @@ private okhttp3.Call placeMultipleOrdersValidateBeforeCall( } /** - * Place Multiple Orders(TRADE) Place multiple orders * Parameter rules are same with `New + * Place Multiple Orders (TRADE) Place multiple orders * Parameter rules are same with `New * Order` * Batch orders are processed concurrently, and the order of matching is not * guaranteed. * The order of returned contents for batch orders is the same as the order of the - * order list. Weight: 5 + * order list. Weight(IP): 5 Security Type: TRADE Notes: - `batchOrders` must be a + * JSON array of order parameter objects. - Example: + * `/dapi/v1/batchOrders?batchOrders=[{\"type\":\"LIMIT\",\"timeInForce\":\"GTC\",\"symbol\":\"BTCUSD_PERP\",\"side\":\"BUY\",\"price\":\"10001\",\"quantity\":\"1\"}]` * * @param placeMultipleOrdersRequest (required) * @return ApiResponse<PlaceMultipleOrdersResponse> @@ -3046,8 +3063,8 @@ private okhttp3.Call placeMultipleOrdersValidateBeforeCall( * * * @see Place - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#place-multiple-orders">Place + * Multiple Orders (TRADE) Documentation */ public ApiResponse placeMultipleOrders( @Valid @NotNull PlaceMultipleOrdersRequest placeMultipleOrdersRequest) @@ -3074,8 +3091,8 @@ public ApiResponse placeMultipleOrders( * * * @see Position - * ADL Quantile Estimation(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#position-adl-quantile-estimation">Position + * ADL Quantile Estimation (USER_DATA) Documentation */ private okhttp3.Call positionAdlQuantileEstimationCall(String symbol, Long recvWindow) throws ApiException { @@ -3175,7 +3192,7 @@ private okhttp3.Call positionAdlQuantileEstimationValidateBeforeCall( } /** - * Position ADL Quantile Estimation(USER_DATA) Query position ADL quantile estimation * Values + * Position ADL Quantile Estimation (USER_DATA) Query position ADL quantile estimation * Values * update every 30s. * Values 0, 1, 2, 3, 4 shows the queue position and possibility of ADL from * low to high. * For positions of the symbol are in One-way Mode or isolated margined in Hedge * Mode, \"LONG\", \"SHORT\", and \"BOTH\" will be returned to @@ -3183,7 +3200,7 @@ private okhttp3.Call positionAdlQuantileEstimationValidateBeforeCall( * symbol are crossed margined in Hedge Mode: * \"HEDGE\" as a sign will be returned * instead of \"BOTH\"; * A same value caculated on unrealized pnls on long and short * sides' positions will be shown for \"LONG\" and \"SHORT\" when there - * are positions in both of long and short sides. Weight: 5 + * are positions in both of long and short sides. Weight(IP): 5 Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -3198,11 +3215,11 @@ private okhttp3.Call positionAdlQuantileEstimationValidateBeforeCall( * * * @see Position - * ADL Quantile Estimation(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#position-adl-quantile-estimation">Position + * ADL Quantile Estimation (USER_DATA) Documentation */ public ApiResponse positionAdlQuantileEstimation( - String symbol, Long recvWindow) throws ApiException { + String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = positionAdlQuantileEstimationValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -3226,8 +3243,8 @@ public ApiResponse positionAdlQuantileEst * * * @see Position - * Information(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#position-information">Position + * Information (USER_DATA) Documentation */ private okhttp3.Call positionInformationCall(String marginAsset, String pair, Long recvWindow) throws ApiException { @@ -3333,13 +3350,14 @@ private okhttp3.Call positionInformationValidateBeforeCall( } /** - * Position Information(USER_DATA) Get current account information. * If neither - * `marginAsset` nor `pair` is sent, positions of all symbols with - * `TRADING` status will be returned. * for One-way Mode user, the response will only - * show the \"BOTH\" positions * for Hedge Mode user, the response will show - * \"BOTH\", \"LONG\", and \"SHORT\" positions. Please use with - * user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. - * Weight: 1 + * Position Information (USER_DATA) Get current account information. Weight(IP): 1 Security + * Type: USER_DATA Notes: - If neither `marginAsset` nor `pair` is sent, + * positions of all symbols with `TRADING` status will be returned. - for One-way Mode + * user, the response will only show the \"BOTH\" positions - for Hedge Mode user, the + * response will show \"BOTH\", \"LONG\", and \"SHORT\" positions. + * **Note** > Please use with user data stream `ACCOUNT_UPDATE` to meet your + * timeliness and accuracy needs. - Please use with user data stream ACCOUNT_UPDATE to meet your + * timeliness and accuracy needs. * * @param marginAsset (optional) * @param pair (optional) @@ -3355,11 +3373,11 @@ private okhttp3.Call positionInformationValidateBeforeCall( * * * @see Position - * Information(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#position-information">Position + * Information (USER_DATA) Documentation */ public ApiResponse positionInformation( - String marginAsset, String pair, Long recvWindow) throws ApiException { + String marginAsset, String pair, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = positionInformationValidateBeforeCall(marginAsset, pair, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -3370,9 +3388,9 @@ public ApiResponse positionInformation( /** * Build call for queryCurrentOpenOrder * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3384,8 +3402,8 @@ public ApiResponse positionInformation( * * * @see Query - * Current Open Order(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#query-current-open-order">Query + * Current Open Order (USER_DATA) Documentation */ private okhttp3.Call queryCurrentOpenOrderCall( String symbol, Long orderId, String origClientOrderId, Long recvWindow) @@ -3501,13 +3519,14 @@ private okhttp3.Call queryCurrentOpenOrderValidateBeforeCall( } /** - * Query Current Open Order(USER_DATA) Query Current Open Order * Either`orderId` or - * `origClientOrderId` must be sent * If the queried order has been filled or - * cancelled, the error message \"Order does not exist\" will be returned. Weight: 1 - * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * Query Current Open Order (USER_DATA) Query Current Open Order Weight(IP): 1 Security Type: + * USER_DATA Notes: - Either`orderId` or `origClientOrderId` must be sent - + * If the queried order has been filled or cancelled, the error message \"Order does not + * exist\" will be returned. + * + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) * @param recvWindow (optional) * @return ApiResponse<QueryCurrentOpenOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -3520,11 +3539,14 @@ private okhttp3.Call queryCurrentOpenOrderValidateBeforeCall( * * * @see Query - * Current Open Order(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#query-current-open-order">Query + * Current Open Order (USER_DATA) Documentation */ public ApiResponse queryCurrentOpenOrder( - @NotNull String symbol, Long orderId, String origClientOrderId, Long recvWindow) + @NotNull String symbol, + Long orderId, + String origClientOrderId, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryCurrentOpenOrderValidateBeforeCall( @@ -3537,9 +3559,9 @@ public ApiResponse queryCurrentOpenOrder( /** * Build call for queryOrder * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3551,7 +3573,7 @@ public ApiResponse queryCurrentOpenOrder( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#query-order">Query * Order (USER_DATA) Documentation */ private okhttp3.Call queryOrderCall( @@ -3670,12 +3692,13 @@ private okhttp3.Call queryOrderValidateBeforeCall( /** * Query Order (USER_DATA) Check an order's status. * These orders will not be found: * * order status is CANCELED or EXPIRED AND order has NO filled trade AND created time + 3 days - * < current time * order create time + 90 days < current time * Either - * `orderId` or `origClientOrderId` must be sent. Weight: 1 + * < current time * order create time + 90 days < current time Weight(IP): 1 Security + * Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be + * sent. * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) * @param recvWindow (optional) * @return ApiResponse<QueryOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -3688,11 +3711,14 @@ private okhttp3.Call queryOrderValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#query-order">Query * Order (USER_DATA) Documentation */ public ApiResponse queryOrder( - @NotNull String symbol, Long orderId, String origClientOrderId, Long recvWindow) + @NotNull String symbol, + Long orderId, + String origClientOrderId, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryOrderValidateBeforeCall(symbol, orderId, origClientOrderId, recvWindow); @@ -3705,11 +3731,10 @@ public ApiResponse queryOrder( * Build call for usersForceOrders * * @param symbol (optional) - * @param autoCloseType \"LIQUIDATION\" for liquidation orders, \"ADL\" for - * ADL orders. (optional) + * @param autoCloseType (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3721,8 +3746,8 @@ public ApiResponse queryOrder( * * * @see User's - * Force Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#users-force-orders">User's + * Force Orders (USER_DATA) Documentation */ private okhttp3.Call usersForceOrdersCall( String symbol, @@ -3861,17 +3886,16 @@ private okhttp3.Call usersForceOrdersValidateBeforeCall( } /** - * User's Force Orders(USER_DATA) User's Force Orders * If \"autoCloseType\" - * is not sent, orders with both of the types will be returned * If \"startTime\" is - * not sent, data within 200 days before \"endTime\" can be queried Weight: 20 with - * symbol, 50 without symbol + * User's Force Orders (USER_DATA) User's Force Orders Weight: **20** (after CM + * migration: **20** with symbol / **50** without symbol) Security Type: USER_DATA Notes: - If + * \"autoCloseType\" is not sent, orders with both of the types will be returned - + * Only support querying data in the past 90 days * * @param symbol (optional) - * @param autoCloseType \"LIQUIDATION\" for liquidation orders, \"ADL\" for - * ADL orders. (optional) + * @param autoCloseType (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return ApiResponse<UsersForceOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -3884,16 +3908,16 @@ private okhttp3.Call usersForceOrdersValidateBeforeCall( * * * @see User's - * Force Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#users-force-orders">User's + * Force Orders (USER_DATA) Documentation */ public ApiResponse usersForceOrders( String symbol, AutoCloseType autoCloseType, Long startTime, Long endTime, - Long limit, - Long recvWindow) + @Max(100L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = usersForceOrdersValidateBeforeCall( diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/UserDataStreamsApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/UserDataStreamsApi.java index ea0950725..f58368763 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/UserDataStreamsApi.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/UserDataStreamsApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -43,7 +43,7 @@ public class UserDataStreamsApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-coin-futures/7.1.1 (Java/%s; %s; %s)", + "binance-derivatives-trading-coin-futures/8.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -93,8 +93,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Close - * User Data Stream(USER_STREAM) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/user-data-streams#close-user-data-stream">Close + * User Data Stream (USER_STREAM) Documentation */ private okhttp3.Call closeUserDataStreamCall() throws ApiException { String basePath = null; @@ -181,7 +181,8 @@ private okhttp3.Call closeUserDataStreamValidateBeforeCall() throws ApiException } /** - * Close User Data Stream(USER_STREAM) Close out a user data stream. Weight: 1 + * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight(IP): 1 Security + * Type: USER_STREAM * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -194,8 +195,8 @@ private okhttp3.Call closeUserDataStreamValidateBeforeCall() throws ApiException * * * @see Close - * User Data Stream(USER_STREAM) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/user-data-streams#close-user-data-stream">Close + * User Data Stream (USER_STREAM) Documentation */ public ApiResponse closeUserDataStream() throws ApiException { okhttp3.Call localVarCall = closeUserDataStreamValidateBeforeCall(); @@ -215,7 +216,7 @@ public ApiResponse closeUserDataStream() throws ApiException { * * * @see Keepalive + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/user-data-streams#keepalive-user-data-stream">Keepalive * User Data Stream (USER_STREAM) Documentation */ private okhttp3.Call keepaliveUserDataStreamCall() throws ApiException { @@ -304,7 +305,7 @@ private okhttp3.Call keepaliveUserDataStreamValidateBeforeCall() throws ApiExcep /** * Keepalive User Data Stream (USER_STREAM) Keepalive a user data stream to prevent a time out. - * User data streams will close after 60 minutes. Weight: 1 + * User data streams will close after 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * * @return ApiResponse<KeepaliveUserDataStreamResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -317,7 +318,7 @@ private okhttp3.Call keepaliveUserDataStreamValidateBeforeCall() throws ApiExcep * * * @see Keepalive + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/user-data-streams#keepalive-user-data-stream">Keepalive * User Data Stream (USER_STREAM) Documentation */ public ApiResponse keepaliveUserDataStream() @@ -341,7 +342,7 @@ public ApiResponse keepaliveUserDataStream() * * * @see Start + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/user-data-streams#start-user-data-stream">Start * User Data Stream (USER_STREAM) Documentation */ private okhttp3.Call startUserDataStreamCall() throws ApiException { @@ -432,7 +433,7 @@ private okhttp3.Call startUserDataStreamValidateBeforeCall() throws ApiException * Start User Data Stream (USER_STREAM) Start a new user data stream. The stream will close * after 60 minutes unless a keepalive is sent. If the account has an active * `listenKey`, that `listenKey` will be returned and its validity will be - * extended for 60 minutes. Weight: 1 + * extended for 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * * @return ApiResponse<StartUserDataStreamResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -445,7 +446,7 @@ private okhttp3.Call startUserDataStreamValidateBeforeCall() throws ApiException * * * @see Start + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/user-data-streams#start-user-data-stream">Start * User Data Stream (USER_STREAM) Documentation */ public ApiResponse startUserDataStream() throws ApiException { diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountInformationResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountInformationResponse.java index 5f5f70433..799b97219 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountInformationResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountInformationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** AccountInformationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationResponse { public static final String SERIALIZED_NAME_ASSETS = "assets"; @@ -103,7 +103,7 @@ public AccountInformationResponse addAssetsItem( } /** - * Get assets + * Supported assets. * * @return assets */ @@ -136,7 +136,7 @@ public AccountInformationResponse addPositionsItem( } /** - * Get positions + * Position list. * * @return positions */ @@ -158,7 +158,7 @@ public AccountInformationResponse canDeposit(@jakarta.annotation.Nullable Boolea } /** - * Get canDeposit + * Whether deposits are enabled. * * @return canDeposit */ @@ -177,7 +177,7 @@ public AccountInformationResponse canTrade(@jakarta.annotation.Nullable Boolean } /** - * Get canTrade + * Whether trading is enabled. * * @return canTrade */ @@ -197,7 +197,7 @@ public AccountInformationResponse canWithdraw( } /** - * Get canWithdraw + * Whether withdrawals are enabled. * * @return canWithdraw */ @@ -216,7 +216,7 @@ public AccountInformationResponse feeTier(@jakarta.annotation.Nullable Long feeT } /** - * Get feeTier + * Fee tier level. * * @return feeTier */ @@ -235,7 +235,7 @@ public AccountInformationResponse updateTime(@jakarta.annotation.Nullable Long u } /** - * Get updateTime + * update time * * @return updateTime */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountInformationResponseAssetsInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountInformationResponseAssetsInner.java index 936a4ad0f..7e4014e07 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountInformationResponseAssetsInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountInformationResponseAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountInformationResponseAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationResponseAssetsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -122,7 +122,7 @@ public AccountInformationResponseAssetsInner asset(@jakarta.annotation.Nullable } /** - * Get asset + * asset name * * @return asset */ @@ -142,7 +142,7 @@ public AccountInformationResponseAssetsInner walletBalance( } /** - * Get walletBalance + * total wallet balance * * @return walletBalance */ @@ -162,7 +162,7 @@ public AccountInformationResponseAssetsInner unrealizedProfit( } /** - * Get unrealizedProfit + * unrealized profit or loss * * @return unrealizedProfit */ @@ -182,7 +182,7 @@ public AccountInformationResponseAssetsInner marginBalance( } /** - * Get marginBalance + * margin balance * * @return marginBalance */ @@ -202,7 +202,7 @@ public AccountInformationResponseAssetsInner maintMargin( } /** - * Get maintMargin + * maintenance margin * * @return maintMargin */ @@ -222,7 +222,7 @@ public AccountInformationResponseAssetsInner initialMargin( } /** - * Get initialMargin + * total intial margin required with the latest mark price * * @return initialMargin */ @@ -242,7 +242,7 @@ public AccountInformationResponseAssetsInner positionInitialMargin( } /** - * Get positionInitialMargin + * positions margin required with the latest mark price * * @return positionInitialMargin */ @@ -263,7 +263,7 @@ public AccountInformationResponseAssetsInner openOrderInitialMargin( } /** - * Get openOrderInitialMargin + * open orders intial margin required with the latest mark price * * @return openOrderInitialMargin */ @@ -284,7 +284,7 @@ public AccountInformationResponseAssetsInner maxWithdrawAmount( } /** - * Get maxWithdrawAmount + * maximum amount for transfer out * * @return maxWithdrawAmount */ @@ -304,7 +304,7 @@ public AccountInformationResponseAssetsInner crossWalletBalance( } /** - * Get crossWalletBalance + * wallet balance for crossed margin * * @return crossWalletBalance */ @@ -324,7 +324,7 @@ public AccountInformationResponseAssetsInner crossUnPnl( } /** - * Get crossUnPnl + * total unrealized profit or loss of crossed positions * * @return crossUnPnl */ @@ -344,7 +344,7 @@ public AccountInformationResponseAssetsInner availableBalance( } /** - * Get availableBalance + * available margin balance * * @return availableBalance */ @@ -364,7 +364,7 @@ public AccountInformationResponseAssetsInner updateTime( } /** - * Get updateTime + * update time * * @return updateTime */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountInformationResponsePositionsInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountInformationResponsePositionsInner.java index 2793aa9cd..e5d5e783b 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountInformationResponsePositionsInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountInformationResponsePositionsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountInformationResponsePositionsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationResponsePositionsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -135,7 +135,7 @@ public AccountInformationResponsePositionsInner symbol( } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -155,7 +155,7 @@ public AccountInformationResponsePositionsInner positionAmt( } /** - * Get positionAmt + * position amount * * @return positionAmt */ @@ -175,7 +175,7 @@ public AccountInformationResponsePositionsInner initialMargin( } /** - * Get initialMargin + * total intial margin required with the latest mark price * * @return initialMargin */ @@ -195,7 +195,7 @@ public AccountInformationResponsePositionsInner maintMargin( } /** - * Get maintMargin + * maintenance margin * * @return maintMargin */ @@ -215,7 +215,7 @@ public AccountInformationResponsePositionsInner unrealizedProfit( } /** - * Get unrealizedProfit + * unrealized profit or loss * * @return unrealizedProfit */ @@ -235,7 +235,7 @@ public AccountInformationResponsePositionsInner positionInitialMargin( } /** - * Get positionInitialMargin + * positions margin required with the latest mark price * * @return positionInitialMargin */ @@ -256,7 +256,7 @@ public AccountInformationResponsePositionsInner openOrderInitialMargin( } /** - * Get openOrderInitialMargin + * open orders intial margin required with the latest mark price * * @return openOrderInitialMargin */ @@ -277,7 +277,7 @@ public AccountInformationResponsePositionsInner leverage( } /** - * Get leverage + * Leverage value. * * @return leverage */ @@ -297,7 +297,7 @@ public AccountInformationResponsePositionsInner isolated( } /** - * Get isolated + * Whether isolated margin mode is enabled. * * @return isolated */ @@ -317,7 +317,7 @@ public AccountInformationResponsePositionsInner positionSide( } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -337,7 +337,7 @@ public AccountInformationResponsePositionsInner entryPrice( } /** - * Get entryPrice + * Position entry price. * * @return entryPrice */ @@ -357,7 +357,7 @@ public AccountInformationResponsePositionsInner breakEvenPrice( } /** - * Get breakEvenPrice + * break-even price * * @return breakEvenPrice */ @@ -377,7 +377,7 @@ public AccountInformationResponsePositionsInner maxQty( } /** - * Get maxQty + * maximum quantity of base asset * * @return maxQty */ @@ -397,7 +397,7 @@ public AccountInformationResponsePositionsInner updateTime( } /** - * Get updateTime + * update time * * @return updateTime */ @@ -417,7 +417,7 @@ public AccountInformationResponsePositionsInner notionalValue( } /** - * Get notionalValue + * Notional value. * * @return notionalValue */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountTradeListResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountTradeListResponse.java index 0afa55d8b..d68c4eb3e 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountTradeListResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountTradeListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountTradeListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountTradeListResponse extends ArrayList { public AccountTradeListResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountTradeListResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountTradeListResponseInner.java index 0d4cb5995..f6ece7624 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountTradeListResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountTradeListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountTradeListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountTradeListResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -140,7 +140,7 @@ public AccountTradeListResponseInner symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -159,7 +159,7 @@ public AccountTradeListResponseInner id(@jakarta.annotation.Nullable Long id) { } /** - * Get id + * positionId * * @return id */ @@ -178,7 +178,7 @@ public AccountTradeListResponseInner orderId(@jakarta.annotation.Nullable Long o } /** - * Get orderId + * Sub-order ID * * @return orderId */ @@ -197,7 +197,7 @@ public AccountTradeListResponseInner pair(@jakarta.annotation.Nullable String pa } /** - * Get pair + * Pair * * @return pair */ @@ -216,7 +216,7 @@ public AccountTradeListResponseInner side(@jakarta.annotation.Nullable String si } /** - * Get side + * Trading side * * @return side */ @@ -235,7 +235,7 @@ public AccountTradeListResponseInner price(@jakarta.annotation.Nullable String p } /** - * Get price + * Latest token price. * * @return price */ @@ -254,7 +254,7 @@ public AccountTradeListResponseInner qty(@jakarta.annotation.Nullable String qty } /** - * Get qty + * Quantity. * * @return qty */ @@ -274,7 +274,7 @@ public AccountTradeListResponseInner realizedPnl( } /** - * Get realizedPnl + * Realized PnL. * * @return realizedPnl */ @@ -294,7 +294,7 @@ public AccountTradeListResponseInner marginAsset( } /** - * Get marginAsset + * Margin asset. * * @return marginAsset */ @@ -313,7 +313,7 @@ public AccountTradeListResponseInner baseQty(@jakarta.annotation.Nullable String } /** - * Get baseQty + * Base asset quantity. * * @return baseQty */ @@ -333,7 +333,7 @@ public AccountTradeListResponseInner commission( } /** - * Get commission + * Transaction Fee (in Crypto) * * @return commission */ @@ -353,7 +353,7 @@ public AccountTradeListResponseInner commissionAsset( } /** - * Get commissionAsset + * Commission asset. * * @return commissionAsset */ @@ -372,7 +372,7 @@ public AccountTradeListResponseInner time(@jakarta.annotation.Nullable Long time } /** - * Get time + * Time * * @return time */ @@ -392,7 +392,7 @@ public AccountTradeListResponseInner positionSide( } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -411,7 +411,7 @@ public AccountTradeListResponseInner buyer(@jakarta.annotation.Nullable Boolean } /** - * Get buyer + * Whether the trade is a buy side for the account. * * @return buyer */ @@ -430,7 +430,7 @@ public AccountTradeListResponseInner maker(@jakarta.annotation.Nullable Boolean } /** - * Get maker + * Whether the account is maker in this trade. * * @return maker */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AllOrdersResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AllOrdersResponse.java index 50237e81b..8f0623928 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AllOrdersResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AllOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AllOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllOrdersResponse extends ArrayList { public AllOrdersResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AllOrdersResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AllOrdersResponseInner.java index 0f772d9f4..cf1752caf 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AllOrdersResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AllOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AllOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllOrdersResponseInner { public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; @@ -201,7 +201,7 @@ public AllOrdersResponseInner avgPrice(@jakarta.annotation.Nullable String avgPr } /** - * Get avgPrice + * Average execution price * * @return avgPrice */ @@ -220,7 +220,7 @@ public AllOrdersResponseInner clientOrderId(@jakarta.annotation.Nullable String } /** - * Get clientOrderId + * Client order ID. * * @return clientOrderId */ @@ -239,7 +239,7 @@ public AllOrdersResponseInner cumBase(@jakarta.annotation.Nullable String cumBas } /** - * Get cumBase + * Cumulative base asset amount. * * @return cumBase */ @@ -258,7 +258,7 @@ public AllOrdersResponseInner executedQty(@jakarta.annotation.Nullable String ex } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -277,7 +277,7 @@ public AllOrdersResponseInner orderId(@jakarta.annotation.Nullable Long orderId) } /** - * Get orderId + * Sub-order ID * * @return orderId */ @@ -296,7 +296,7 @@ public AllOrdersResponseInner origQty(@jakarta.annotation.Nullable String origQt } /** - * Get origQty + * Original order quantity * * @return origQty */ @@ -315,7 +315,7 @@ public AllOrdersResponseInner origType(@jakarta.annotation.Nullable String origT } /** - * Get origType + * Original order type. * * @return origType */ @@ -334,7 +334,7 @@ public AllOrdersResponseInner price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Latest token price. * * @return price */ @@ -353,7 +353,7 @@ public AllOrdersResponseInner reduceOnly(@jakarta.annotation.Nullable Boolean re } /** - * Get reduceOnly + * Whether the order is reduce-only. * * @return reduceOnly */ @@ -372,7 +372,7 @@ public AllOrdersResponseInner side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Trading side * * @return side */ @@ -391,7 +391,7 @@ public AllOrdersResponseInner positionSide(@jakarta.annotation.Nullable String p } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -410,7 +410,7 @@ public AllOrdersResponseInner status(@jakarta.annotation.Nullable String status) } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -429,7 +429,7 @@ public AllOrdersResponseInner stopPrice(@jakarta.annotation.Nullable String stop } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -449,7 +449,7 @@ public AllOrdersResponseInner closePosition( } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -468,7 +468,7 @@ public AllOrdersResponseInner symbol(@jakarta.annotation.Nullable String symbol) } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -487,7 +487,7 @@ public AllOrdersResponseInner pair(@jakarta.annotation.Nullable String pair) { } /** - * Get pair + * Pair * * @return pair */ @@ -506,7 +506,7 @@ public AllOrdersResponseInner time(@jakarta.annotation.Nullable Long time) { } /** - * Get time + * Time * * @return time */ @@ -525,7 +525,7 @@ public AllOrdersResponseInner timeInForce(@jakarta.annotation.Nullable String ti } /** - * Get timeInForce + * Time in force * * @return timeInForce */ @@ -544,7 +544,7 @@ public AllOrdersResponseInner type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Order type. * * @return type */ @@ -563,7 +563,7 @@ public AllOrdersResponseInner activatePrice(@jakarta.annotation.Nullable String } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -582,7 +582,7 @@ public AllOrdersResponseInner priceRate(@jakarta.annotation.Nullable String pric } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -601,7 +601,7 @@ public AllOrdersResponseInner updateTime(@jakarta.annotation.Nullable Long updat } /** - * Get updateTime + * update time * * @return updateTime */ @@ -620,7 +620,7 @@ public AllOrdersResponseInner workingType(@jakarta.annotation.Nullable String wo } /** - * Get workingType + * Stop trigger price type. * * @return workingType */ @@ -639,7 +639,7 @@ public AllOrdersResponseInner priceProtect(@jakarta.annotation.Nullable Boolean } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -658,7 +658,7 @@ public AllOrdersResponseInner priceMatch(@jakarta.annotation.Nullable String pri } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -678,7 +678,7 @@ public AllOrdersResponseInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AutoCancelAllOpenOrdersRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AutoCancelAllOpenOrdersRequest.java index a25862dd8..42cb9e7c4 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AutoCancelAllOpenOrdersRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AutoCancelAllOpenOrdersRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AutoCancelAllOpenOrdersRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AutoCancelAllOpenOrdersRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -83,7 +83,7 @@ public AutoCancelAllOpenOrdersRequest countdownTime( } /** - * Get countdownTime + * countdown time, 1000 for 1 second. 0 to cancel the timer * * @return countdownTime */ @@ -103,11 +103,12 @@ public AutoCancelAllOpenOrdersRequest recvWindow(@jakarta.annotation.Nullable Lo } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AutoCancelAllOpenOrdersResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AutoCancelAllOpenOrdersResponse.java index 48e12c14d..bd6a9bd2a 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AutoCancelAllOpenOrdersResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AutoCancelAllOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AutoCancelAllOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AutoCancelAllOpenOrdersResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -56,7 +56,7 @@ public AutoCancelAllOpenOrdersResponse symbol(@jakarta.annotation.Nullable Strin } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -76,7 +76,7 @@ public AutoCancelAllOpenOrdersResponse countdownTime( } /** - * Get countdownTime + * Countdown cancellation time in milliseconds. * * @return countdownTime */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AutoCloseType.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AutoCloseType.java index 27b3a30f6..aedb9eb04 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AutoCloseType.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AutoCloseType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BasisResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BasisResponse.java index 66bb6b2ad..31b7f1e59 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BasisResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BasisResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** BasisResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BasisResponse extends ArrayList { public BasisResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BasisResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BasisResponseInner.java index 2285081b2..cb095ac5a 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BasisResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BasisResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** BasisResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BasisResponseInner { public static final String SERIALIZED_NAME_INDEX_PRICE = "indexPrice"; @@ -92,7 +92,7 @@ public BasisResponseInner indexPrice(@jakarta.annotation.Nullable String indexPr } /** - * Get indexPrice + * index price * * @return indexPrice */ @@ -111,7 +111,7 @@ public BasisResponseInner contractType(@jakarta.annotation.Nullable String contr } /** - * Get contractType + * Contract type. * * @return contractType */ @@ -130,7 +130,7 @@ public BasisResponseInner basisRate(@jakarta.annotation.Nullable String basisRat } /** - * Get basisRate + * Basis rate. * * @return basisRate */ @@ -149,7 +149,7 @@ public BasisResponseInner futuresPrice(@jakarta.annotation.Nullable String futur } /** - * Get futuresPrice + * Futures price. * * @return futuresPrice */ @@ -169,7 +169,7 @@ public BasisResponseInner annualizedBasisRate( } /** - * Get annualizedBasisRate + * Annualized basis rate. * * @return annualizedBasisRate */ @@ -188,7 +188,7 @@ public BasisResponseInner basis(@jakarta.annotation.Nullable String basis) { } /** - * Get basis + * Basis value. * * @return basis */ @@ -207,7 +207,7 @@ public BasisResponseInner pair(@jakarta.annotation.Nullable String pair) { } /** - * Get pair + * Pair * * @return pair */ @@ -226,7 +226,7 @@ public BasisResponseInner timestamp(@jakarta.annotation.Nullable Long timestamp) } /** - * Get timestamp + * Timestamp in milliseconds. * * @return timestamp */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrders.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrders.java index 3b5e4dd9c..87da58ab8 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrders.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrders.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** BatchOrders */ +/** order list. Max 5 orders */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BatchOrders extends ArrayList { public BatchOrders() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrdersInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrdersInner.java index 8333d50c5..70197e7ab 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrdersInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -35,36 +36,557 @@ /** BatchOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BatchOrdersInner { - public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nonnull + private String symbol; + + /** Gets or Sets side */ + @JsonAdapter(SideEnum.Adapter.class) + public enum SideEnum { + BUY("BUY"), + + SELL("SELL"); + + private String value; + + SideEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SideEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SideEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SideEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SideEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SIDE = "side"; + + @SerializedName(SERIALIZED_NAME_SIDE) + @jakarta.annotation.Nonnull + private SideEnum side; + + /** + * Default `BOTH` for One-way Mode ; `LONG` or `SHORT` for Hedge + * Mode. It must be sent with Hedge Mode. + */ + @JsonAdapter(PositionSideEnum.Adapter.class) + public enum PositionSideEnum { + BOTH("BOTH"), + + LONG("LONG"), + + SHORT("SHORT"); + + private String value; + + PositionSideEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PositionSideEnum fromValue(String value) { + for (PositionSideEnum b : PositionSideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PositionSideEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PositionSideEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PositionSideEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PositionSideEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_POSITION_SIDE = "positionSide"; + + @SerializedName(SERIALIZED_NAME_POSITION_SIDE) + @jakarta.annotation.Nullable + private PositionSideEnum positionSide; + + /** + * **After CM migration, stop-type values (`STOP`, `STOP_MARKET`, + * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`, `TRAILING_STOP_MARKET`) + * are no longer accepted on a per-element basis and will return element-level + * `-4120`. Use the new `/dapi/v1/algoOrder` endpoint instead.** + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIMIT("LIMIT"), + + MARKET("MARKET"), + + STOP("STOP"), + + STOP_MARKET("STOP_MARKET"), + + TAKE_PROFIT("TAKE_PROFIT"), + + TAKE_PROFIT_MARKET("TAKE_PROFIT_MARKET"), + + TRAILING_STOP_MARKET("TRAILING_STOP_MARKET"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @jakarta.annotation.Nonnull + private TypeEnum type; + + /** Gets or Sets timeInForce */ + @JsonAdapter(TimeInForceEnum.Adapter.class) + public enum TimeInForceEnum { + GTC("GTC"), + + IOC("IOC"), + + FOK("FOK"), + + GTX("GTX"); + + private String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TimeInForceEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TimeInForceEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TimeInForceEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TimeInForceEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; + + @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) + @jakarta.annotation.Nullable + private TimeInForceEnum timeInForce; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + + @SerializedName(SERIALIZED_NAME_QUANTITY) + @jakarta.annotation.Nonnull + private Double quantity; + + /** Gets or Sets reduceOnly */ + @JsonAdapter(ReduceOnlyEnum.Adapter.class) + public enum ReduceOnlyEnum { + TRUE("true"), + + FALSE("false"); + + private String value; + + ReduceOnlyEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ReduceOnlyEnum fromValue(String value) { + for (ReduceOnlyEnum b : ReduceOnlyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ReduceOnlyEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ReduceOnlyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ReduceOnlyEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ReduceOnlyEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; + + @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) + @jakarta.annotation.Nullable + private ReduceOnlyEnum reduceOnly = ReduceOnlyEnum.FALSE; + + public static final String SERIALIZED_NAME_PRICE = "price"; + + @SerializedName(SERIALIZED_NAME_PRICE) + @jakarta.annotation.Nullable + private Double price; + + public static final String SERIALIZED_NAME_NEW_CLIENT_ORDER_ID = "newClientOrderId"; + + @SerializedName(SERIALIZED_NAME_NEW_CLIENT_ORDER_ID) + @jakarta.annotation.Nullable + private String newClientOrderId; + + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + + @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @jakarta.annotation.Nullable + private Double stopPrice; + + public static final String SERIALIZED_NAME_ACTIVATION_PRICE = "activationPrice"; + + @SerializedName(SERIALIZED_NAME_ACTIVATION_PRICE) + @jakarta.annotation.Nullable + private Double activationPrice; + + public static final String SERIALIZED_NAME_CALLBACK_RATE = "callbackRate"; + + @SerializedName(SERIALIZED_NAME_CALLBACK_RATE) + @jakarta.annotation.Nullable + private Double callbackRate; + + /** Gets or Sets workingType */ + @JsonAdapter(WorkingTypeEnum.Adapter.class) + public enum WorkingTypeEnum { + MARK_PRICE("MARK_PRICE"), + + CONTRACT_PRICE("CONTRACT_PRICE"); + + private String value; + + WorkingTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static WorkingTypeEnum fromValue(String value) { + for (WorkingTypeEnum b : WorkingTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final WorkingTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public WorkingTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return WorkingTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + WorkingTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_WORKING_TYPE = "workingType"; + + @SerializedName(SERIALIZED_NAME_WORKING_TYPE) + @jakarta.annotation.Nullable + private WorkingTypeEnum workingType = WorkingTypeEnum.CONTRACT_PRICE; + + /** + * Used with `STOP/STOP_MARKET` or `TAKE_PROFIT/TAKE_PROFIT_MARKET` orders. + */ + @JsonAdapter(PriceProtectEnum.Adapter.class) + public enum PriceProtectEnum { + TRUE("true"), + + FALSE("false"); + + private String value; + + PriceProtectEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PriceProtectEnum fromValue(String value) { + for (PriceProtectEnum b : PriceProtectEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PriceProtectEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PriceProtectEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PriceProtectEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PriceProtectEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PRICE_PROTECT = "priceProtect"; + + @SerializedName(SERIALIZED_NAME_PRICE_PROTECT) + @jakarta.annotation.Nullable + private PriceProtectEnum priceProtect = PriceProtectEnum.FALSE; + + /** Gets or Sets newOrderRespType */ + @JsonAdapter(NewOrderRespTypeEnum.Adapter.class) + public enum NewOrderRespTypeEnum { + ACK("ACK"), + + RESULT("RESULT"); + + private String value; + + NewOrderRespTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static NewOrderRespTypeEnum fromValue(String value) { + for (NewOrderRespTypeEnum b : NewOrderRespTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final NewOrderRespTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public NewOrderRespTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return NewOrderRespTypeEnum.fromValue(value); + } + } - @SerializedName(SERIALIZED_NAME_ORDER_ID) - @jakarta.annotation.Nullable - private String orderId; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + NewOrderRespTypeEnum.fromValue(value); + } + } - public static final String SERIALIZED_NAME_ORIG_CLIENT_ORDER_ID = "origClientOrderId"; + public static final String SERIALIZED_NAME_NEW_ORDER_RESP_TYPE = "newOrderRespType"; - @SerializedName(SERIALIZED_NAME_ORIG_CLIENT_ORDER_ID) + @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESP_TYPE) @jakarta.annotation.Nullable - private String origClientOrderId; + private NewOrderRespTypeEnum newOrderRespType = NewOrderRespTypeEnum.ACK; - public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + /** + * only avaliable for `LIMIT`/`STOP`/`TAKE_PROFIT` order; + * can't be passed together with `price` + */ + @JsonAdapter(PriceMatchEnum.Adapter.class) + public enum PriceMatchEnum { + OPPONENT("OPPONENT"), - @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nullable - private String symbol; + OPPONENT_5("OPPONENT_5"), - /** Gets or Sets side */ - @JsonAdapter(SideEnum.Adapter.class) - public enum SideEnum { - BUY("BUY"), + OPPONENT_10("OPPONENT_10"), - SELL("SELL"); + OPPONENT_20("OPPONENT_20"), + + QUEUE("QUEUE"), + + QUEUE_5("QUEUE_5"), + + QUEUE_10("QUEUE_10"), + + QUEUE_20("QUEUE_20"); private String value; - SideEnum(String value) { + PriceMatchEnum(String value) { this.value = value; } @@ -77,8 +599,8 @@ public String toString() { return String.valueOf(value); } - public static SideEnum fromValue(String value) { - for (SideEnum b : SideEnum.values()) { + public static PriceMatchEnum fromValue(String value) { + for (PriceMatchEnum b : PriceMatchEnum.values()) { if (b.value.equals(value)) { return b; } @@ -86,184 +608,449 @@ public static SideEnum fromValue(String value) { throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static class Adapter extends TypeAdapter { + public static class Adapter extends TypeAdapter { @Override - public void write(final JsonWriter jsonWriter, final SideEnum enumeration) + public void write(final JsonWriter jsonWriter, final PriceMatchEnum enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override - public SideEnum read(final JsonReader jsonReader) throws IOException { + public PriceMatchEnum read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); - return SideEnum.fromValue(value); + return PriceMatchEnum.fromValue(value); } } public static void validateJsonElement(JsonElement jsonElement) throws IOException { String value = jsonElement.getAsString(); - SideEnum.fromValue(value); + PriceMatchEnum.fromValue(value); } } - public static final String SERIALIZED_NAME_SIDE = "side"; + public static final String SERIALIZED_NAME_PRICE_MATCH = "priceMatch"; - @SerializedName(SERIALIZED_NAME_SIDE) + @SerializedName(SERIALIZED_NAME_PRICE_MATCH) @jakarta.annotation.Nullable - private SideEnum side; + private PriceMatchEnum priceMatch; - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + /** + * `EXPIRE_TAKER`:expire taker order when STP triggers/ + * `EXPIRE_MAKER`:expire taker order when STP triggers/ `EXPIRE_BOTH`:expire + * both orders when STP triggers + */ + @JsonAdapter(SelfTradePreventionModeEnum.Adapter.class) + public enum SelfTradePreventionModeEnum { + EXPIRE_TAKER("EXPIRE_TAKER"), - @SerializedName(SERIALIZED_NAME_QUANTITY) - @jakarta.annotation.Nullable - private String quantity; + EXPIRE_MAKER("EXPIRE_MAKER"), - public static final String SERIALIZED_NAME_PRICE = "price"; + EXPIRE_BOTH("EXPIRE_BOTH"); - @SerializedName(SERIALIZED_NAME_PRICE) - @jakarta.annotation.Nullable - private String price; + private String value; + + SelfTradePreventionModeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SelfTradePreventionModeEnum fromValue(String value) { + for (SelfTradePreventionModeEnum b : SelfTradePreventionModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write( + final JsonWriter jsonWriter, final SelfTradePreventionModeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; + @Override + public SelfTradePreventionModeEnum read(final JsonReader jsonReader) + throws IOException { + String value = jsonReader.nextString(); + return SelfTradePreventionModeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SelfTradePreventionModeEnum.fromValue(value); + } + } - @SerializedName(SERIALIZED_NAME_RECV_WINDOW) + public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = + "selfTradePreventionMode"; + + @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) @jakarta.annotation.Nullable - private String recvWindow; + private SelfTradePreventionModeEnum selfTradePreventionMode = + SelfTradePreventionModeEnum.EXPIRE_MAKER; public BatchOrdersInner() {} - public BatchOrdersInner orderId(@jakarta.annotation.Nullable String orderId) { - this.orderId = orderId; + public BatchOrdersInner symbol(@jakarta.annotation.Nonnull String symbol) { + this.symbol = symbol; return this; } /** - * Get orderId + * Symbol * - * @return orderId + * @return symbol */ - @jakarta.annotation.Nullable - public String getOrderId() { - return orderId; + @jakarta.annotation.Nonnull + @NotNull + public String getSymbol() { + return symbol; } - public void setOrderId(@jakarta.annotation.Nullable String orderId) { - this.orderId = orderId; + public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + this.symbol = symbol; } - public BatchOrdersInner origClientOrderId( - @jakarta.annotation.Nullable String origClientOrderId) { - this.origClientOrderId = origClientOrderId; + public BatchOrdersInner side(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; return this; } /** - * Get origClientOrderId + * Get side * - * @return origClientOrderId + * @return side */ - @jakarta.annotation.Nullable - public String getOrigClientOrderId() { - return origClientOrderId; + @jakarta.annotation.Nonnull + @NotNull + public SideEnum getSide() { + return side; } - public void setOrigClientOrderId(@jakarta.annotation.Nullable String origClientOrderId) { - this.origClientOrderId = origClientOrderId; + public void setSide(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; } - public BatchOrdersInner symbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; + public BatchOrdersInner positionSide( + @jakarta.annotation.Nullable PositionSideEnum positionSide) { + this.positionSide = positionSide; return this; } /** - * Get symbol + * Default `BOTH` for One-way Mode ; `LONG` or `SHORT` for Hedge + * Mode. It must be sent with Hedge Mode. * - * @return symbol + * @return positionSide */ @jakarta.annotation.Nullable - public String getSymbol() { - return symbol; + public PositionSideEnum getPositionSide() { + return positionSide; } - public void setSymbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; + public void setPositionSide(@jakarta.annotation.Nullable PositionSideEnum positionSide) { + this.positionSide = positionSide; } - public BatchOrdersInner side(@jakarta.annotation.Nullable SideEnum side) { - this.side = side; + public BatchOrdersInner type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; return this; } /** - * Get side + * **After CM migration, stop-type values (`STOP`, `STOP_MARKET`, + * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`, `TRAILING_STOP_MARKET`) + * are no longer accepted on a per-element basis and will return element-level + * `-4120`. Use the new `/dapi/v1/algoOrder` endpoint instead.** * - * @return side + * @return type + */ + @jakarta.annotation.Nonnull + @NotNull + public TypeEnum getType() { + return type; + } + + public void setType(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public BatchOrdersInner timeInForce(@jakarta.annotation.Nullable TimeInForceEnum timeInForce) { + this.timeInForce = timeInForce; + return this; + } + + /** + * Get timeInForce + * + * @return timeInForce */ @jakarta.annotation.Nullable - public SideEnum getSide() { - return side; + public TimeInForceEnum getTimeInForce() { + return timeInForce; } - public void setSide(@jakarta.annotation.Nullable SideEnum side) { - this.side = side; + public void setTimeInForce(@jakarta.annotation.Nullable TimeInForceEnum timeInForce) { + this.timeInForce = timeInForce; } - public BatchOrdersInner quantity(@jakarta.annotation.Nullable String quantity) { + public BatchOrdersInner quantity(@jakarta.annotation.Nonnull Double quantity) { this.quantity = quantity; return this; } /** - * Get quantity + * quantity measured by contract number * * @return quantity */ - @jakarta.annotation.Nullable - public String getQuantity() { + @jakarta.annotation.Nonnull + @NotNull + @Valid + public Double getQuantity() { return quantity; } - public void setQuantity(@jakarta.annotation.Nullable String quantity) { + public void setQuantity(@jakarta.annotation.Nonnull Double quantity) { this.quantity = quantity; } - public BatchOrdersInner price(@jakarta.annotation.Nullable String price) { + public BatchOrdersInner reduceOnly(@jakarta.annotation.Nullable ReduceOnlyEnum reduceOnly) { + this.reduceOnly = reduceOnly; + return this; + } + + /** + * Get reduceOnly + * + * @return reduceOnly + */ + @jakarta.annotation.Nullable + public ReduceOnlyEnum getReduceOnly() { + return reduceOnly; + } + + public void setReduceOnly(@jakarta.annotation.Nullable ReduceOnlyEnum reduceOnly) { + this.reduceOnly = reduceOnly; + } + + public BatchOrdersInner price(@jakarta.annotation.Nullable Double price) { this.price = price; return this; } /** - * Get price + * Order price * * @return price */ @jakarta.annotation.Nullable - public String getPrice() { + @Valid + public Double getPrice() { return price; } - public void setPrice(@jakarta.annotation.Nullable String price) { + public void setPrice(@jakarta.annotation.Nullable Double price) { this.price = price; } - public BatchOrdersInner recvWindow(@jakarta.annotation.Nullable String recvWindow) { - this.recvWindow = recvWindow; + public BatchOrdersInner newClientOrderId(@jakarta.annotation.Nullable String newClientOrderId) { + this.newClientOrderId = newClientOrderId; + return this; + } + + /** + * A unique id among open orders. Automatically generated if not sent. Can only be string + * following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,36}$` + * + * @return newClientOrderId + */ + @jakarta.annotation.Nullable + public String getNewClientOrderId() { + return newClientOrderId; + } + + public void setNewClientOrderId(@jakarta.annotation.Nullable String newClientOrderId) { + this.newClientOrderId = newClientOrderId; + } + + public BatchOrdersInner stopPrice(@jakarta.annotation.Nullable Double stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + /** + * Used with `STOP/STOP_MARKET` or `TAKE_PROFIT/TAKE_PROFIT_MARKET` orders. + * + * @return stopPrice + */ + @jakarta.annotation.Nullable + @Valid + public Double getStopPrice() { + return stopPrice; + } + + public void setStopPrice(@jakarta.annotation.Nullable Double stopPrice) { + this.stopPrice = stopPrice; + } + + public BatchOrdersInner activationPrice(@jakarta.annotation.Nullable Double activationPrice) { + this.activationPrice = activationPrice; + return this; + } + + /** + * Used with `TRAILING_STOP_MARKET` orders, default as the latest price(supporting + * different `workingType`) + * + * @return activationPrice + */ + @jakarta.annotation.Nullable + @Valid + public Double getActivationPrice() { + return activationPrice; + } + + public void setActivationPrice(@jakarta.annotation.Nullable Double activationPrice) { + this.activationPrice = activationPrice; + } + + public BatchOrdersInner callbackRate(@jakarta.annotation.Nullable Double callbackRate) { + this.callbackRate = callbackRate; + return this; + } + + /** + * Used with `TRAILING_STOP_MARKET` orders, min 0.1, max 4 where 1 for 1% minimum: 0.1 + * maximum: 4 + * + * @return callbackRate + */ + @jakarta.annotation.Nullable + @Valid + @DecimalMin("0.1") + @DecimalMax("4") + public Double getCallbackRate() { + return callbackRate; + } + + public void setCallbackRate(@jakarta.annotation.Nullable Double callbackRate) { + this.callbackRate = callbackRate; + } + + public BatchOrdersInner workingType(@jakarta.annotation.Nullable WorkingTypeEnum workingType) { + this.workingType = workingType; + return this; + } + + /** + * Get workingType + * + * @return workingType + */ + @jakarta.annotation.Nullable + public WorkingTypeEnum getWorkingType() { + return workingType; + } + + public void setWorkingType(@jakarta.annotation.Nullable WorkingTypeEnum workingType) { + this.workingType = workingType; + } + + public BatchOrdersInner priceProtect( + @jakarta.annotation.Nullable PriceProtectEnum priceProtect) { + this.priceProtect = priceProtect; + return this; + } + + /** + * Used with `STOP/STOP_MARKET` or `TAKE_PROFIT/TAKE_PROFIT_MARKET` orders. + * + * @return priceProtect + */ + @jakarta.annotation.Nullable + public PriceProtectEnum getPriceProtect() { + return priceProtect; + } + + public void setPriceProtect(@jakarta.annotation.Nullable PriceProtectEnum priceProtect) { + this.priceProtect = priceProtect; + } + + public BatchOrdersInner newOrderRespType( + @jakarta.annotation.Nullable NewOrderRespTypeEnum newOrderRespType) { + this.newOrderRespType = newOrderRespType; + return this; + } + + /** + * Get newOrderRespType + * + * @return newOrderRespType + */ + @jakarta.annotation.Nullable + public NewOrderRespTypeEnum getNewOrderRespType() { + return newOrderRespType; + } + + public void setNewOrderRespType( + @jakarta.annotation.Nullable NewOrderRespTypeEnum newOrderRespType) { + this.newOrderRespType = newOrderRespType; + } + + public BatchOrdersInner priceMatch(@jakarta.annotation.Nullable PriceMatchEnum priceMatch) { + this.priceMatch = priceMatch; + return this; + } + + /** + * only avaliable for `LIMIT`/`STOP`/`TAKE_PROFIT` order; + * can't be passed together with `price` + * + * @return priceMatch + */ + @jakarta.annotation.Nullable + public PriceMatchEnum getPriceMatch() { + return priceMatch; + } + + public void setPriceMatch(@jakarta.annotation.Nullable PriceMatchEnum priceMatch) { + this.priceMatch = priceMatch; + } + + public BatchOrdersInner selfTradePreventionMode( + @jakarta.annotation.Nullable SelfTradePreventionModeEnum selfTradePreventionMode) { + this.selfTradePreventionMode = selfTradePreventionMode; return this; } /** - * Get recvWindow + * `EXPIRE_TAKER`:expire taker order when STP triggers/ + * `EXPIRE_MAKER`:expire taker order when STP triggers/ `EXPIRE_BOTH`:expire + * both orders when STP triggers * - * @return recvWindow + * @return selfTradePreventionMode */ @jakarta.annotation.Nullable - public String getRecvWindow() { - return recvWindow; + public SelfTradePreventionModeEnum getSelfTradePreventionMode() { + return selfTradePreventionMode; } - public void setRecvWindow(@jakarta.annotation.Nullable String recvWindow) { - this.recvWindow = recvWindow; + public void setSelfTradePreventionMode( + @jakarta.annotation.Nullable SelfTradePreventionModeEnum selfTradePreventionMode) { + this.selfTradePreventionMode = selfTradePreventionMode; } @Override @@ -275,31 +1062,71 @@ public boolean equals(Object o) { return false; } BatchOrdersInner batchOrdersInner = (BatchOrdersInner) o; - return Objects.equals(this.orderId, batchOrdersInner.orderId) - && Objects.equals(this.origClientOrderId, batchOrdersInner.origClientOrderId) - && Objects.equals(this.symbol, batchOrdersInner.symbol) + return Objects.equals(this.symbol, batchOrdersInner.symbol) && Objects.equals(this.side, batchOrdersInner.side) + && Objects.equals(this.positionSide, batchOrdersInner.positionSide) + && Objects.equals(this.type, batchOrdersInner.type) + && Objects.equals(this.timeInForce, batchOrdersInner.timeInForce) && Objects.equals(this.quantity, batchOrdersInner.quantity) + && Objects.equals(this.reduceOnly, batchOrdersInner.reduceOnly) && Objects.equals(this.price, batchOrdersInner.price) - && Objects.equals(this.recvWindow, batchOrdersInner.recvWindow); + && Objects.equals(this.newClientOrderId, batchOrdersInner.newClientOrderId) + && Objects.equals(this.stopPrice, batchOrdersInner.stopPrice) + && Objects.equals(this.activationPrice, batchOrdersInner.activationPrice) + && Objects.equals(this.callbackRate, batchOrdersInner.callbackRate) + && Objects.equals(this.workingType, batchOrdersInner.workingType) + && Objects.equals(this.priceProtect, batchOrdersInner.priceProtect) + && Objects.equals(this.newOrderRespType, batchOrdersInner.newOrderRespType) + && Objects.equals(this.priceMatch, batchOrdersInner.priceMatch) + && Objects.equals( + this.selfTradePreventionMode, batchOrdersInner.selfTradePreventionMode); } @Override public int hashCode() { - return Objects.hash(orderId, origClientOrderId, symbol, side, quantity, price, recvWindow); + return Objects.hash( + symbol, + side, + positionSide, + type, + timeInForce, + quantity, + reduceOnly, + price, + newClientOrderId, + stopPrice, + activationPrice, + callbackRate, + workingType, + priceProtect, + newOrderRespType, + priceMatch, + selfTradePreventionMode); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BatchOrdersInner {\n"); - sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); - sb.append(" origClientOrderId: ").append(toIndentedString(origClientOrderId)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); + sb.append(" positionSide: ").append(toIndentedString(positionSide)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); + sb.append(" newClientOrderId: ").append(toIndentedString(newClientOrderId)).append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" activationPrice: ").append(toIndentedString(activationPrice)).append("\n"); + sb.append(" callbackRate: ").append(toIndentedString(callbackRate)).append("\n"); + sb.append(" workingType: ").append(toIndentedString(workingType)).append("\n"); + sb.append(" priceProtect: ").append(toIndentedString(priceProtect)).append("\n"); + sb.append(" newOrderRespType: ").append(toIndentedString(newOrderRespType)).append("\n"); + sb.append(" priceMatch: ").append(toIndentedString(priceMatch)).append("\n"); + sb.append(" selfTradePreventionMode: ") + .append(toIndentedString(selfTradePreventionMode)) + .append("\n"); sb.append("}"); return sb.toString(); } @@ -307,16 +1134,6 @@ public String toString() { public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); - Object orderIdValue = getOrderId(); - String orderIdValueAsString = ""; - orderIdValueAsString = orderIdValue.toString(); - sb.append("orderId=").append(urlEncode(orderIdValueAsString)).append(""); - Object origClientOrderIdValue = getOrigClientOrderId(); - String origClientOrderIdValueAsString = ""; - origClientOrderIdValueAsString = origClientOrderIdValue.toString(); - sb.append("origClientOrderId=") - .append(urlEncode(origClientOrderIdValueAsString)) - .append(""); Object symbolValue = getSymbol(); String symbolValueAsString = ""; symbolValueAsString = symbolValue.toString(); @@ -325,18 +1142,68 @@ public String toUrlQueryString() { String sideValueAsString = ""; sideValueAsString = sideValue.toString(); sb.append("side=").append(urlEncode(sideValueAsString)).append(""); + Object positionSideValue = getPositionSide(); + String positionSideValueAsString = ""; + positionSideValueAsString = positionSideValue.toString(); + sb.append("positionSide=").append(urlEncode(positionSideValueAsString)).append(""); + Object typeValue = getType(); + String typeValueAsString = ""; + typeValueAsString = typeValue.toString(); + sb.append("type=").append(urlEncode(typeValueAsString)).append(""); + Object timeInForceValue = getTimeInForce(); + String timeInForceValueAsString = ""; + timeInForceValueAsString = timeInForceValue.toString(); + sb.append("timeInForce=").append(urlEncode(timeInForceValueAsString)).append(""); Object quantityValue = getQuantity(); String quantityValueAsString = ""; quantityValueAsString = quantityValue.toString(); sb.append("quantity=").append(urlEncode(quantityValueAsString)).append(""); + Object reduceOnlyValue = getReduceOnly(); + String reduceOnlyValueAsString = ""; + reduceOnlyValueAsString = reduceOnlyValue.toString(); + sb.append("reduceOnly=").append(urlEncode(reduceOnlyValueAsString)).append(""); Object priceValue = getPrice(); String priceValueAsString = ""; priceValueAsString = priceValue.toString(); sb.append("price=").append(urlEncode(priceValueAsString)).append(""); - Object recvWindowValue = getRecvWindow(); - String recvWindowValueAsString = ""; - recvWindowValueAsString = recvWindowValue.toString(); - sb.append("recvWindow=").append(urlEncode(recvWindowValueAsString)).append(""); + Object newClientOrderIdValue = getNewClientOrderId(); + String newClientOrderIdValueAsString = ""; + newClientOrderIdValueAsString = newClientOrderIdValue.toString(); + sb.append("newClientOrderId=").append(urlEncode(newClientOrderIdValueAsString)).append(""); + Object stopPriceValue = getStopPrice(); + String stopPriceValueAsString = ""; + stopPriceValueAsString = stopPriceValue.toString(); + sb.append("stopPrice=").append(urlEncode(stopPriceValueAsString)).append(""); + Object activationPriceValue = getActivationPrice(); + String activationPriceValueAsString = ""; + activationPriceValueAsString = activationPriceValue.toString(); + sb.append("activationPrice=").append(urlEncode(activationPriceValueAsString)).append(""); + Object callbackRateValue = getCallbackRate(); + String callbackRateValueAsString = ""; + callbackRateValueAsString = callbackRateValue.toString(); + sb.append("callbackRate=").append(urlEncode(callbackRateValueAsString)).append(""); + Object workingTypeValue = getWorkingType(); + String workingTypeValueAsString = ""; + workingTypeValueAsString = workingTypeValue.toString(); + sb.append("workingType=").append(urlEncode(workingTypeValueAsString)).append(""); + Object priceProtectValue = getPriceProtect(); + String priceProtectValueAsString = ""; + priceProtectValueAsString = priceProtectValue.toString(); + sb.append("priceProtect=").append(urlEncode(priceProtectValueAsString)).append(""); + Object newOrderRespTypeValue = getNewOrderRespType(); + String newOrderRespTypeValueAsString = ""; + newOrderRespTypeValueAsString = newOrderRespTypeValue.toString(); + sb.append("newOrderRespType=").append(urlEncode(newOrderRespTypeValueAsString)).append(""); + Object priceMatchValue = getPriceMatch(); + String priceMatchValueAsString = ""; + priceMatchValueAsString = priceMatchValue.toString(); + sb.append("priceMatch=").append(urlEncode(priceMatchValueAsString)).append(""); + Object selfTradePreventionModeValue = getSelfTradePreventionMode(); + String selfTradePreventionModeValueAsString = ""; + selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); + sb.append("selfTradePreventionMode=") + .append(urlEncode(selfTradePreventionModeValueAsString)) + .append(""); return sb.toString(); } @@ -365,16 +1232,30 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("orderId"); - openapiFields.add("origClientOrderId"); openapiFields.add("symbol"); openapiFields.add("side"); + openapiFields.add("positionSide"); + openapiFields.add("type"); + openapiFields.add("timeInForce"); openapiFields.add("quantity"); + openapiFields.add("reduceOnly"); openapiFields.add("price"); - openapiFields.add("recvWindow"); + openapiFields.add("newClientOrderId"); + openapiFields.add("stopPrice"); + openapiFields.add("activationPrice"); + openapiFields.add("callbackRate"); + openapiFields.add("workingType"); + openapiFields.add("priceProtect"); + openapiFields.add("newOrderRespType"); + openapiFields.add("priceMatch"); + openapiFields.add("selfTradePreventionMode"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("symbol"); + openapiRequiredFields.add("side"); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("quantity"); } /** @@ -394,67 +1275,150 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti BatchOrdersInner.openapiRequiredFields.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : BatchOrdersInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("orderId") != null && !jsonObj.get("orderId").isJsonNull()) - && !jsonObj.get("orderId").isJsonPrimitive()) { + if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `orderId` to be a primitive type in the JSON string" + "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", - jsonObj.get("orderId").toString())); + jsonObj.get("symbol").toString())); } - if ((jsonObj.get("origClientOrderId") != null - && !jsonObj.get("origClientOrderId").isJsonNull()) - && !jsonObj.get("origClientOrderId").isJsonPrimitive()) { + if (!jsonObj.get("side").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `origClientOrderId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("origClientOrderId").toString())); + "Expected the field `side` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("side").toString())); } - if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) - && !jsonObj.get("symbol").isJsonPrimitive()) { + // validate the required field `side` + SideEnum.validateJsonElement(jsonObj.get("side")); + if ((jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) + && !jsonObj.get("positionSide").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `symbol` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("symbol").toString())); + "Expected the field `positionSide` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("positionSide").toString())); } - if ((jsonObj.get("side") != null && !jsonObj.get("side").isJsonNull()) - && !jsonObj.get("side").isJsonPrimitive()) { + // validate the optional field `positionSide` + if (jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) { + PositionSideEnum.validateJsonElement(jsonObj.get("positionSide")); + } + if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `side` to be a primitive type in the JSON string" + "Expected the field `type` to be a primitive type in the JSON string" + " but got `%s`", - jsonObj.get("side").toString())); + jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) + && !jsonObj.get("timeInForce").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `timeInForce` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("timeInForce").toString())); } - // validate the optional field `side` - if (jsonObj.get("side") != null && !jsonObj.get("side").isJsonNull()) { - SideEnum.validateJsonElement(jsonObj.get("side")); + // validate the optional field `timeInForce` + if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { + TimeInForceEnum.validateJsonElement(jsonObj.get("timeInForce")); } - if ((jsonObj.get("quantity") != null && !jsonObj.get("quantity").isJsonNull()) - && !jsonObj.get("quantity").isJsonPrimitive()) { + if ((jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) + && !jsonObj.get("reduceOnly").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `quantity` to be a primitive type in the JSON" + "Expected the field `reduceOnly` to be a primitive type in the JSON" + " string but got `%s`", - jsonObj.get("quantity").toString())); + jsonObj.get("reduceOnly").toString())); + } + // validate the optional field `reduceOnly` + if (jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) { + ReduceOnlyEnum.validateJsonElement(jsonObj.get("reduceOnly")); } - if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) - && !jsonObj.get("price").isJsonPrimitive()) { + if ((jsonObj.get("newClientOrderId") != null + && !jsonObj.get("newClientOrderId").isJsonNull()) + && !jsonObj.get("newClientOrderId").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `price` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("price").toString())); + "Expected the field `newClientOrderId` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("newClientOrderId").toString())); + } + if ((jsonObj.get("workingType") != null && !jsonObj.get("workingType").isJsonNull()) + && !jsonObj.get("workingType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingType").toString())); } - if ((jsonObj.get("recvWindow") != null && !jsonObj.get("recvWindow").isJsonNull()) - && !jsonObj.get("recvWindow").isJsonPrimitive()) { + // validate the optional field `workingType` + if (jsonObj.get("workingType") != null && !jsonObj.get("workingType").isJsonNull()) { + WorkingTypeEnum.validateJsonElement(jsonObj.get("workingType")); + } + if ((jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) + && !jsonObj.get("priceProtect").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `priceProtect` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("priceProtect").toString())); + } + // validate the optional field `priceProtect` + if (jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) { + PriceProtectEnum.validateJsonElement(jsonObj.get("priceProtect")); + } + if ((jsonObj.get("newOrderRespType") != null + && !jsonObj.get("newOrderRespType").isJsonNull()) + && !jsonObj.get("newOrderRespType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `newOrderRespType` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("newOrderRespType").toString())); + } + // validate the optional field `newOrderRespType` + if (jsonObj.get("newOrderRespType") != null + && !jsonObj.get("newOrderRespType").isJsonNull()) { + NewOrderRespTypeEnum.validateJsonElement(jsonObj.get("newOrderRespType")); + } + if ((jsonObj.get("priceMatch") != null && !jsonObj.get("priceMatch").isJsonNull()) + && !jsonObj.get("priceMatch").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `recvWindow` to be a primitive type in the JSON" + "Expected the field `priceMatch` to be a primitive type in the JSON" + " string but got `%s`", - jsonObj.get("recvWindow").toString())); + jsonObj.get("priceMatch").toString())); + } + // validate the optional field `priceMatch` + if (jsonObj.get("priceMatch") != null && !jsonObj.get("priceMatch").isJsonNull()) { + PriceMatchEnum.validateJsonElement(jsonObj.get("priceMatch")); + } + if ((jsonObj.get("selfTradePreventionMode") != null + && !jsonObj.get("selfTradePreventionMode").isJsonNull()) + && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `selfTradePreventionMode` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("selfTradePreventionMode").toString())); + } + // validate the optional field `selfTradePreventionMode` + if (jsonObj.get("selfTradePreventionMode") != null + && !jsonObj.get("selfTradePreventionMode").isJsonNull()) { + SelfTradePreventionModeEnum.validateJsonElement(jsonObj.get("selfTradePreventionMode")); } } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrdersPlaceMultipleOrders.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrdersPlaceMultipleOrders.java deleted file mode 100644 index 6cf7c5fb3..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrdersPlaceMultipleOrders.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** BatchOrdersPlaceMultipleOrders */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class BatchOrdersPlaceMultipleOrders extends ArrayList { - public BatchOrdersPlaceMultipleOrders() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BatchOrdersPlaceMultipleOrders {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * BatchOrdersPlaceMultipleOrders - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - BatchOrdersPlaceMultipleOrdersInner.validateJsonElement(element); - } - if (jsonElement == null) { - if (!BatchOrdersPlaceMultipleOrders.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in BatchOrdersPlaceMultipleOrders is not" - + " found in the empty JSON string", - BatchOrdersPlaceMultipleOrders.openapiRequiredFields.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BatchOrdersPlaceMultipleOrders.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BatchOrdersPlaceMultipleOrders' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(BatchOrdersPlaceMultipleOrders.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, BatchOrdersPlaceMultipleOrders value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public BatchOrdersPlaceMultipleOrders read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of BatchOrdersPlaceMultipleOrders given an JSON string - * - * @param jsonString JSON string - * @return An instance of BatchOrdersPlaceMultipleOrders - * @throws IOException if the JSON string is invalid with respect to - * BatchOrdersPlaceMultipleOrders - */ - public static BatchOrdersPlaceMultipleOrders fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BatchOrdersPlaceMultipleOrders.class); - } - - /** - * Convert an instance of BatchOrdersPlaceMultipleOrders to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrdersPlaceMultipleOrdersInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrdersPlaceMultipleOrdersInner.java deleted file mode 100644 index ac9dc794d..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrdersPlaceMultipleOrdersInner.java +++ /dev/null @@ -1,1385 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** BatchOrdersPlaceMultipleOrdersInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class BatchOrdersPlaceMultipleOrdersInner { - public static final String SERIALIZED_NAME_SYMBOL = "symbol"; - - @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nullable - private String symbol; - - /** Gets or Sets side */ - @JsonAdapter(SideEnum.Adapter.class) - public enum SideEnum { - BUY("BUY"), - - SELL("SELL"); - - private String value; - - SideEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static SideEnum fromValue(String value) { - for (SideEnum b : SideEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final SideEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public SideEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return SideEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - SideEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_SIDE = "side"; - - @SerializedName(SERIALIZED_NAME_SIDE) - @jakarta.annotation.Nullable - private SideEnum side; - - /** Gets or Sets positionSide */ - @JsonAdapter(PositionSideEnum.Adapter.class) - public enum PositionSideEnum { - BOTH("BOTH"), - - LONG("LONG"), - - SHORT("SHORT"); - - private String value; - - PositionSideEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PositionSideEnum fromValue(String value) { - for (PositionSideEnum b : PositionSideEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PositionSideEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PositionSideEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PositionSideEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PositionSideEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_POSITION_SIDE = "positionSide"; - - @SerializedName(SERIALIZED_NAME_POSITION_SIDE) - @jakarta.annotation.Nullable - private PositionSideEnum positionSide; - - /** Gets or Sets type */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LIMIT("LIMIT"), - - MARKET("MARKET"), - - STOP("STOP"), - - STOP_MARKET("STOP_MARKET"), - - TAKE_PROFIT("TAKE_PROFIT"), - - TAKE_PROFIT_MARKET("TAKE_PROFIT_MARKET"), - - TRAILING_STOP_MARKET("TRAILING_STOP_MARKET"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @jakarta.annotation.Nullable - private TypeEnum type; - - /** Gets or Sets timeInForce */ - @JsonAdapter(TimeInForceEnum.Adapter.class) - public enum TimeInForceEnum { - GTC("GTC"), - - IOC("IOC"), - - FOK("FOK"), - - GTX("GTX"); - - private String value; - - TimeInForceEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TimeInForceEnum fromValue(String value) { - for (TimeInForceEnum b : TimeInForceEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TimeInForceEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TimeInForceEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TimeInForceEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TimeInForceEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; - - @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) - @jakarta.annotation.Nullable - private TimeInForceEnum timeInForce; - - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; - - @SerializedName(SERIALIZED_NAME_QUANTITY) - @jakarta.annotation.Nullable - private String quantity; - - public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; - - @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) - @jakarta.annotation.Nullable - private String reduceOnly; - - public static final String SERIALIZED_NAME_PRICE = "price"; - - @SerializedName(SERIALIZED_NAME_PRICE) - @jakarta.annotation.Nullable - private String price; - - public static final String SERIALIZED_NAME_NEW_CLIENT_ORDER_ID = "newClientOrderId"; - - @SerializedName(SERIALIZED_NAME_NEW_CLIENT_ORDER_ID) - @jakarta.annotation.Nullable - private String newClientOrderId; - - public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; - - @SerializedName(SERIALIZED_NAME_STOP_PRICE) - @jakarta.annotation.Nullable - private String stopPrice; - - public static final String SERIALIZED_NAME_ACTIVATION_PRICE = "activationPrice"; - - @SerializedName(SERIALIZED_NAME_ACTIVATION_PRICE) - @jakarta.annotation.Nullable - private String activationPrice; - - public static final String SERIALIZED_NAME_CALLBACK_RATE = "callbackRate"; - - @SerializedName(SERIALIZED_NAME_CALLBACK_RATE) - @jakarta.annotation.Nullable - private String callbackRate; - - /** Gets or Sets workingType */ - @JsonAdapter(WorkingTypeEnum.Adapter.class) - public enum WorkingTypeEnum { - MARK_PRICE("MARK_PRICE"), - - CONTRACT_PRICE("CONTRACT_PRICE"); - - private String value; - - WorkingTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static WorkingTypeEnum fromValue(String value) { - for (WorkingTypeEnum b : WorkingTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final WorkingTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public WorkingTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return WorkingTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - WorkingTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_WORKING_TYPE = "workingType"; - - @SerializedName(SERIALIZED_NAME_WORKING_TYPE) - @jakarta.annotation.Nullable - private WorkingTypeEnum workingType; - - public static final String SERIALIZED_NAME_PRICE_PROTECT = "priceProtect"; - - @SerializedName(SERIALIZED_NAME_PRICE_PROTECT) - @jakarta.annotation.Nullable - private String priceProtect; - - /** Gets or Sets newOrderRespType */ - @JsonAdapter(NewOrderRespTypeEnum.Adapter.class) - public enum NewOrderRespTypeEnum { - ACK("ACK"), - - RESULT("RESULT"); - - private String value; - - NewOrderRespTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static NewOrderRespTypeEnum fromValue(String value) { - for (NewOrderRespTypeEnum b : NewOrderRespTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final NewOrderRespTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public NewOrderRespTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return NewOrderRespTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - NewOrderRespTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_NEW_ORDER_RESP_TYPE = "newOrderRespType"; - - @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESP_TYPE) - @jakarta.annotation.Nullable - private NewOrderRespTypeEnum newOrderRespType; - - /** Gets or Sets priceMatch */ - @JsonAdapter(PriceMatchEnum.Adapter.class) - public enum PriceMatchEnum { - NONE("NONE"), - - OPPONENT("OPPONENT"), - - OPPONENT_5("OPPONENT_5"), - - OPPONENT_10("OPPONENT_10"), - - OPPONENT_20("OPPONENT_20"), - - QUEUE("QUEUE"), - - QUEUE_5("QUEUE_5"), - - QUEUE_10("QUEUE_10"), - - QUEUE_20("QUEUE_20"); - - private String value; - - PriceMatchEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PriceMatchEnum fromValue(String value) { - for (PriceMatchEnum b : PriceMatchEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PriceMatchEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PriceMatchEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PriceMatchEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PriceMatchEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PRICE_MATCH = "priceMatch"; - - @SerializedName(SERIALIZED_NAME_PRICE_MATCH) - @jakarta.annotation.Nullable - private PriceMatchEnum priceMatch; - - /** Gets or Sets selfTradePreventionMode */ - @JsonAdapter(SelfTradePreventionModeEnum.Adapter.class) - public enum SelfTradePreventionModeEnum { - NONE("NONE"), - - EXPIRE_TAKER("EXPIRE_TAKER"), - - EXPIRE_BOTH("EXPIRE_BOTH"), - - EXPIRE_MAKER("EXPIRE_MAKER"); - - private String value; - - SelfTradePreventionModeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static SelfTradePreventionModeEnum fromValue(String value) { - for (SelfTradePreventionModeEnum b : SelfTradePreventionModeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write( - final JsonWriter jsonWriter, final SelfTradePreventionModeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public SelfTradePreventionModeEnum read(final JsonReader jsonReader) - throws IOException { - String value = jsonReader.nextString(); - return SelfTradePreventionModeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - SelfTradePreventionModeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = - "selfTradePreventionMode"; - - @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) - @jakarta.annotation.Nullable - private SelfTradePreventionModeEnum selfTradePreventionMode; - - public BatchOrdersPlaceMultipleOrdersInner() {} - - public BatchOrdersPlaceMultipleOrdersInner symbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - return this; - } - - /** - * Get symbol - * - * @return symbol - */ - @jakarta.annotation.Nullable - public String getSymbol() { - return symbol; - } - - public void setSymbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - } - - public BatchOrdersPlaceMultipleOrdersInner side(@jakarta.annotation.Nullable SideEnum side) { - this.side = side; - return this; - } - - /** - * Get side - * - * @return side - */ - @jakarta.annotation.Nullable - public SideEnum getSide() { - return side; - } - - public void setSide(@jakarta.annotation.Nullable SideEnum side) { - this.side = side; - } - - public BatchOrdersPlaceMultipleOrdersInner positionSide( - @jakarta.annotation.Nullable PositionSideEnum positionSide) { - this.positionSide = positionSide; - return this; - } - - /** - * Get positionSide - * - * @return positionSide - */ - @jakarta.annotation.Nullable - public PositionSideEnum getPositionSide() { - return positionSide; - } - - public void setPositionSide(@jakarta.annotation.Nullable PositionSideEnum positionSide) { - this.positionSide = positionSide; - } - - public BatchOrdersPlaceMultipleOrdersInner type(@jakarta.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @jakarta.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(@jakarta.annotation.Nullable TypeEnum type) { - this.type = type; - } - - public BatchOrdersPlaceMultipleOrdersInner timeInForce( - @jakarta.annotation.Nullable TimeInForceEnum timeInForce) { - this.timeInForce = timeInForce; - return this; - } - - /** - * Get timeInForce - * - * @return timeInForce - */ - @jakarta.annotation.Nullable - public TimeInForceEnum getTimeInForce() { - return timeInForce; - } - - public void setTimeInForce(@jakarta.annotation.Nullable TimeInForceEnum timeInForce) { - this.timeInForce = timeInForce; - } - - public BatchOrdersPlaceMultipleOrdersInner quantity( - @jakarta.annotation.Nullable String quantity) { - this.quantity = quantity; - return this; - } - - /** - * Get quantity - * - * @return quantity - */ - @jakarta.annotation.Nullable - public String getQuantity() { - return quantity; - } - - public void setQuantity(@jakarta.annotation.Nullable String quantity) { - this.quantity = quantity; - } - - public BatchOrdersPlaceMultipleOrdersInner reduceOnly( - @jakarta.annotation.Nullable String reduceOnly) { - this.reduceOnly = reduceOnly; - return this; - } - - /** - * Get reduceOnly - * - * @return reduceOnly - */ - @jakarta.annotation.Nullable - public String getReduceOnly() { - return reduceOnly; - } - - public void setReduceOnly(@jakarta.annotation.Nullable String reduceOnly) { - this.reduceOnly = reduceOnly; - } - - public BatchOrdersPlaceMultipleOrdersInner price(@jakarta.annotation.Nullable String price) { - this.price = price; - return this; - } - - /** - * Get price - * - * @return price - */ - @jakarta.annotation.Nullable - public String getPrice() { - return price; - } - - public void setPrice(@jakarta.annotation.Nullable String price) { - this.price = price; - } - - public BatchOrdersPlaceMultipleOrdersInner newClientOrderId( - @jakarta.annotation.Nullable String newClientOrderId) { - this.newClientOrderId = newClientOrderId; - return this; - } - - /** - * Get newClientOrderId - * - * @return newClientOrderId - */ - @jakarta.annotation.Nullable - public String getNewClientOrderId() { - return newClientOrderId; - } - - public void setNewClientOrderId(@jakarta.annotation.Nullable String newClientOrderId) { - this.newClientOrderId = newClientOrderId; - } - - public BatchOrdersPlaceMultipleOrdersInner stopPrice( - @jakarta.annotation.Nullable String stopPrice) { - this.stopPrice = stopPrice; - return this; - } - - /** - * Get stopPrice - * - * @return stopPrice - */ - @jakarta.annotation.Nullable - public String getStopPrice() { - return stopPrice; - } - - public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { - this.stopPrice = stopPrice; - } - - public BatchOrdersPlaceMultipleOrdersInner activationPrice( - @jakarta.annotation.Nullable String activationPrice) { - this.activationPrice = activationPrice; - return this; - } - - /** - * Get activationPrice - * - * @return activationPrice - */ - @jakarta.annotation.Nullable - public String getActivationPrice() { - return activationPrice; - } - - public void setActivationPrice(@jakarta.annotation.Nullable String activationPrice) { - this.activationPrice = activationPrice; - } - - public BatchOrdersPlaceMultipleOrdersInner callbackRate( - @jakarta.annotation.Nullable String callbackRate) { - this.callbackRate = callbackRate; - return this; - } - - /** - * Get callbackRate - * - * @return callbackRate - */ - @jakarta.annotation.Nullable - public String getCallbackRate() { - return callbackRate; - } - - public void setCallbackRate(@jakarta.annotation.Nullable String callbackRate) { - this.callbackRate = callbackRate; - } - - public BatchOrdersPlaceMultipleOrdersInner workingType( - @jakarta.annotation.Nullable WorkingTypeEnum workingType) { - this.workingType = workingType; - return this; - } - - /** - * Get workingType - * - * @return workingType - */ - @jakarta.annotation.Nullable - public WorkingTypeEnum getWorkingType() { - return workingType; - } - - public void setWorkingType(@jakarta.annotation.Nullable WorkingTypeEnum workingType) { - this.workingType = workingType; - } - - public BatchOrdersPlaceMultipleOrdersInner priceProtect( - @jakarta.annotation.Nullable String priceProtect) { - this.priceProtect = priceProtect; - return this; - } - - /** - * Get priceProtect - * - * @return priceProtect - */ - @jakarta.annotation.Nullable - public String getPriceProtect() { - return priceProtect; - } - - public void setPriceProtect(@jakarta.annotation.Nullable String priceProtect) { - this.priceProtect = priceProtect; - } - - public BatchOrdersPlaceMultipleOrdersInner newOrderRespType( - @jakarta.annotation.Nullable NewOrderRespTypeEnum newOrderRespType) { - this.newOrderRespType = newOrderRespType; - return this; - } - - /** - * Get newOrderRespType - * - * @return newOrderRespType - */ - @jakarta.annotation.Nullable - public NewOrderRespTypeEnum getNewOrderRespType() { - return newOrderRespType; - } - - public void setNewOrderRespType( - @jakarta.annotation.Nullable NewOrderRespTypeEnum newOrderRespType) { - this.newOrderRespType = newOrderRespType; - } - - public BatchOrdersPlaceMultipleOrdersInner priceMatch( - @jakarta.annotation.Nullable PriceMatchEnum priceMatch) { - this.priceMatch = priceMatch; - return this; - } - - /** - * Get priceMatch - * - * @return priceMatch - */ - @jakarta.annotation.Nullable - public PriceMatchEnum getPriceMatch() { - return priceMatch; - } - - public void setPriceMatch(@jakarta.annotation.Nullable PriceMatchEnum priceMatch) { - this.priceMatch = priceMatch; - } - - public BatchOrdersPlaceMultipleOrdersInner selfTradePreventionMode( - @jakarta.annotation.Nullable SelfTradePreventionModeEnum selfTradePreventionMode) { - this.selfTradePreventionMode = selfTradePreventionMode; - return this; - } - - /** - * Get selfTradePreventionMode - * - * @return selfTradePreventionMode - */ - @jakarta.annotation.Nullable - public SelfTradePreventionModeEnum getSelfTradePreventionMode() { - return selfTradePreventionMode; - } - - public void setSelfTradePreventionMode( - @jakarta.annotation.Nullable SelfTradePreventionModeEnum selfTradePreventionMode) { - this.selfTradePreventionMode = selfTradePreventionMode; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BatchOrdersPlaceMultipleOrdersInner batchOrdersPlaceMultipleOrdersInner = - (BatchOrdersPlaceMultipleOrdersInner) o; - return Objects.equals(this.symbol, batchOrdersPlaceMultipleOrdersInner.symbol) - && Objects.equals(this.side, batchOrdersPlaceMultipleOrdersInner.side) - && Objects.equals( - this.positionSide, batchOrdersPlaceMultipleOrdersInner.positionSide) - && Objects.equals(this.type, batchOrdersPlaceMultipleOrdersInner.type) - && Objects.equals(this.timeInForce, batchOrdersPlaceMultipleOrdersInner.timeInForce) - && Objects.equals(this.quantity, batchOrdersPlaceMultipleOrdersInner.quantity) - && Objects.equals(this.reduceOnly, batchOrdersPlaceMultipleOrdersInner.reduceOnly) - && Objects.equals(this.price, batchOrdersPlaceMultipleOrdersInner.price) - && Objects.equals( - this.newClientOrderId, batchOrdersPlaceMultipleOrdersInner.newClientOrderId) - && Objects.equals(this.stopPrice, batchOrdersPlaceMultipleOrdersInner.stopPrice) - && Objects.equals( - this.activationPrice, batchOrdersPlaceMultipleOrdersInner.activationPrice) - && Objects.equals( - this.callbackRate, batchOrdersPlaceMultipleOrdersInner.callbackRate) - && Objects.equals(this.workingType, batchOrdersPlaceMultipleOrdersInner.workingType) - && Objects.equals( - this.priceProtect, batchOrdersPlaceMultipleOrdersInner.priceProtect) - && Objects.equals( - this.newOrderRespType, batchOrdersPlaceMultipleOrdersInner.newOrderRespType) - && Objects.equals(this.priceMatch, batchOrdersPlaceMultipleOrdersInner.priceMatch) - && Objects.equals( - this.selfTradePreventionMode, - batchOrdersPlaceMultipleOrdersInner.selfTradePreventionMode); - } - - @Override - public int hashCode() { - return Objects.hash( - symbol, - side, - positionSide, - type, - timeInForce, - quantity, - reduceOnly, - price, - newClientOrderId, - stopPrice, - activationPrice, - callbackRate, - workingType, - priceProtect, - newOrderRespType, - priceMatch, - selfTradePreventionMode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BatchOrdersPlaceMultipleOrdersInner {\n"); - sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); - sb.append(" side: ").append(toIndentedString(side)).append("\n"); - sb.append(" positionSide: ").append(toIndentedString(positionSide)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); - sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" newClientOrderId: ").append(toIndentedString(newClientOrderId)).append("\n"); - sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); - sb.append(" activationPrice: ").append(toIndentedString(activationPrice)).append("\n"); - sb.append(" callbackRate: ").append(toIndentedString(callbackRate)).append("\n"); - sb.append(" workingType: ").append(toIndentedString(workingType)).append("\n"); - sb.append(" priceProtect: ").append(toIndentedString(priceProtect)).append("\n"); - sb.append(" newOrderRespType: ").append(toIndentedString(newOrderRespType)).append("\n"); - sb.append(" priceMatch: ").append(toIndentedString(priceMatch)).append("\n"); - sb.append(" selfTradePreventionMode: ") - .append(toIndentedString(selfTradePreventionMode)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object symbolValue = getSymbol(); - String symbolValueAsString = ""; - symbolValueAsString = symbolValue.toString(); - sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); - Object sideValue = getSide(); - String sideValueAsString = ""; - sideValueAsString = sideValue.toString(); - sb.append("side=").append(urlEncode(sideValueAsString)).append(""); - Object positionSideValue = getPositionSide(); - String positionSideValueAsString = ""; - positionSideValueAsString = positionSideValue.toString(); - sb.append("positionSide=").append(urlEncode(positionSideValueAsString)).append(""); - Object typeValue = getType(); - String typeValueAsString = ""; - typeValueAsString = typeValue.toString(); - sb.append("type=").append(urlEncode(typeValueAsString)).append(""); - Object timeInForceValue = getTimeInForce(); - String timeInForceValueAsString = ""; - timeInForceValueAsString = timeInForceValue.toString(); - sb.append("timeInForce=").append(urlEncode(timeInForceValueAsString)).append(""); - Object quantityValue = getQuantity(); - String quantityValueAsString = ""; - quantityValueAsString = quantityValue.toString(); - sb.append("quantity=").append(urlEncode(quantityValueAsString)).append(""); - Object reduceOnlyValue = getReduceOnly(); - String reduceOnlyValueAsString = ""; - reduceOnlyValueAsString = reduceOnlyValue.toString(); - sb.append("reduceOnly=").append(urlEncode(reduceOnlyValueAsString)).append(""); - Object priceValue = getPrice(); - String priceValueAsString = ""; - priceValueAsString = priceValue.toString(); - sb.append("price=").append(urlEncode(priceValueAsString)).append(""); - Object newClientOrderIdValue = getNewClientOrderId(); - String newClientOrderIdValueAsString = ""; - newClientOrderIdValueAsString = newClientOrderIdValue.toString(); - sb.append("newClientOrderId=").append(urlEncode(newClientOrderIdValueAsString)).append(""); - Object stopPriceValue = getStopPrice(); - String stopPriceValueAsString = ""; - stopPriceValueAsString = stopPriceValue.toString(); - sb.append("stopPrice=").append(urlEncode(stopPriceValueAsString)).append(""); - Object activationPriceValue = getActivationPrice(); - String activationPriceValueAsString = ""; - activationPriceValueAsString = activationPriceValue.toString(); - sb.append("activationPrice=").append(urlEncode(activationPriceValueAsString)).append(""); - Object callbackRateValue = getCallbackRate(); - String callbackRateValueAsString = ""; - callbackRateValueAsString = callbackRateValue.toString(); - sb.append("callbackRate=").append(urlEncode(callbackRateValueAsString)).append(""); - Object workingTypeValue = getWorkingType(); - String workingTypeValueAsString = ""; - workingTypeValueAsString = workingTypeValue.toString(); - sb.append("workingType=").append(urlEncode(workingTypeValueAsString)).append(""); - Object priceProtectValue = getPriceProtect(); - String priceProtectValueAsString = ""; - priceProtectValueAsString = priceProtectValue.toString(); - sb.append("priceProtect=").append(urlEncode(priceProtectValueAsString)).append(""); - Object newOrderRespTypeValue = getNewOrderRespType(); - String newOrderRespTypeValueAsString = ""; - newOrderRespTypeValueAsString = newOrderRespTypeValue.toString(); - sb.append("newOrderRespType=").append(urlEncode(newOrderRespTypeValueAsString)).append(""); - Object priceMatchValue = getPriceMatch(); - String priceMatchValueAsString = ""; - priceMatchValueAsString = priceMatchValue.toString(); - sb.append("priceMatch=").append(urlEncode(priceMatchValueAsString)).append(""); - Object selfTradePreventionModeValue = getSelfTradePreventionMode(); - String selfTradePreventionModeValueAsString = ""; - selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); - sb.append("selfTradePreventionMode=") - .append(urlEncode(selfTradePreventionModeValueAsString)) - .append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("symbol"); - openapiFields.add("side"); - openapiFields.add("positionSide"); - openapiFields.add("type"); - openapiFields.add("timeInForce"); - openapiFields.add("quantity"); - openapiFields.add("reduceOnly"); - openapiFields.add("price"); - openapiFields.add("newClientOrderId"); - openapiFields.add("stopPrice"); - openapiFields.add("activationPrice"); - openapiFields.add("callbackRate"); - openapiFields.add("workingType"); - openapiFields.add("priceProtect"); - openapiFields.add("newOrderRespType"); - openapiFields.add("priceMatch"); - openapiFields.add("selfTradePreventionMode"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * BatchOrdersPlaceMultipleOrdersInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BatchOrdersPlaceMultipleOrdersInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in BatchOrdersPlaceMultipleOrdersInner is" - + " not found in the empty JSON string", - BatchOrdersPlaceMultipleOrdersInner.openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) - && !jsonObj.get("symbol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `symbol` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("symbol").toString())); - } - if ((jsonObj.get("side") != null && !jsonObj.get("side").isJsonNull()) - && !jsonObj.get("side").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `side` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("side").toString())); - } - // validate the optional field `side` - if (jsonObj.get("side") != null && !jsonObj.get("side").isJsonNull()) { - SideEnum.validateJsonElement(jsonObj.get("side")); - } - if ((jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) - && !jsonObj.get("positionSide").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `positionSide` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("positionSide").toString())); - } - // validate the optional field `positionSide` - if (jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) { - PositionSideEnum.validateJsonElement(jsonObj.get("positionSide")); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) - && !jsonObj.get("timeInForce").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `timeInForce` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("timeInForce").toString())); - } - // validate the optional field `timeInForce` - if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { - TimeInForceEnum.validateJsonElement(jsonObj.get("timeInForce")); - } - if ((jsonObj.get("quantity") != null && !jsonObj.get("quantity").isJsonNull()) - && !jsonObj.get("quantity").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `quantity` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("quantity").toString())); - } - if ((jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) - && !jsonObj.get("reduceOnly").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reduceOnly` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reduceOnly").toString())); - } - if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) - && !jsonObj.get("price").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `price` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("price").toString())); - } - if ((jsonObj.get("newClientOrderId") != null - && !jsonObj.get("newClientOrderId").isJsonNull()) - && !jsonObj.get("newClientOrderId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `newClientOrderId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("newClientOrderId").toString())); - } - if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) - && !jsonObj.get("stopPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `stopPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("stopPrice").toString())); - } - if ((jsonObj.get("activationPrice") != null && !jsonObj.get("activationPrice").isJsonNull()) - && !jsonObj.get("activationPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `activationPrice` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("activationPrice").toString())); - } - if ((jsonObj.get("callbackRate") != null && !jsonObj.get("callbackRate").isJsonNull()) - && !jsonObj.get("callbackRate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `callbackRate` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("callbackRate").toString())); - } - if ((jsonObj.get("workingType") != null && !jsonObj.get("workingType").isJsonNull()) - && !jsonObj.get("workingType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `workingType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("workingType").toString())); - } - // validate the optional field `workingType` - if (jsonObj.get("workingType") != null && !jsonObj.get("workingType").isJsonNull()) { - WorkingTypeEnum.validateJsonElement(jsonObj.get("workingType")); - } - if ((jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) - && !jsonObj.get("priceProtect").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `priceProtect` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("priceProtect").toString())); - } - if ((jsonObj.get("newOrderRespType") != null - && !jsonObj.get("newOrderRespType").isJsonNull()) - && !jsonObj.get("newOrderRespType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `newOrderRespType` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("newOrderRespType").toString())); - } - // validate the optional field `newOrderRespType` - if (jsonObj.get("newOrderRespType") != null - && !jsonObj.get("newOrderRespType").isJsonNull()) { - NewOrderRespTypeEnum.validateJsonElement(jsonObj.get("newOrderRespType")); - } - if ((jsonObj.get("priceMatch") != null && !jsonObj.get("priceMatch").isJsonNull()) - && !jsonObj.get("priceMatch").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `priceMatch` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("priceMatch").toString())); - } - // validate the optional field `priceMatch` - if (jsonObj.get("priceMatch") != null && !jsonObj.get("priceMatch").isJsonNull()) { - PriceMatchEnum.validateJsonElement(jsonObj.get("priceMatch")); - } - if ((jsonObj.get("selfTradePreventionMode") != null - && !jsonObj.get("selfTradePreventionMode").isJsonNull()) - && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `selfTradePreventionMode` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("selfTradePreventionMode").toString())); - } - // validate the optional field `selfTradePreventionMode` - if (jsonObj.get("selfTradePreventionMode") != null - && !jsonObj.get("selfTradePreventionMode").isJsonNull()) { - SelfTradePreventionModeEnum.validateJsonElement(jsonObj.get("selfTradePreventionMode")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BatchOrdersPlaceMultipleOrdersInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BatchOrdersPlaceMultipleOrdersInner' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(BatchOrdersPlaceMultipleOrdersInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, BatchOrdersPlaceMultipleOrdersInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BatchOrdersPlaceMultipleOrdersInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of BatchOrdersPlaceMultipleOrdersInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of BatchOrdersPlaceMultipleOrdersInner - * @throws IOException if the JSON string is invalid with respect to - * BatchOrdersPlaceMultipleOrdersInner - */ - public static BatchOrdersPlaceMultipleOrdersInner fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, BatchOrdersPlaceMultipleOrdersInner.class); - } - - /** - * Convert an instance of BatchOrdersPlaceMultipleOrdersInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CancelAllOpenOrdersResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CancelAllOpenOrdersResponse.java index 7cdfa732a..12af9a1c8 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CancelAllOpenOrdersResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CancelAllOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelAllOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelAllOpenOrdersResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -56,7 +56,7 @@ public CancelAllOpenOrdersResponse code(@jakarta.annotation.Nullable Long code) } /** - * Get code + * API response code. \"000000\" indicates success. * * @return code */ @@ -75,7 +75,7 @@ public CancelAllOpenOrdersResponse msg(@jakarta.annotation.Nullable String msg) } /** - * Get msg + * Message details. * * @return msg */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CancelMultipleOrdersResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CancelMultipleOrdersResponse.java index 8c37e4df6..0c6237543 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CancelMultipleOrdersResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CancelMultipleOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelMultipleOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelMultipleOrdersResponse extends ArrayList { public CancelMultipleOrdersResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CancelMultipleOrdersResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CancelMultipleOrdersResponseInner.java index 025c1ecd0..1a162625a 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CancelMultipleOrdersResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CancelMultipleOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,14 +34,8 @@ /** CancelMultipleOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelMultipleOrdersResponseInner { - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE) - @jakarta.annotation.Nullable - private String avgPrice; - public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @SerializedName(SERIALIZED_NAME_CLIENT_ORDER_ID) @@ -54,12 +48,6 @@ public class CancelMultipleOrdersResponseInner { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_BASE = "cumBase"; - - @SerializedName(SERIALIZED_NAME_CUM_BASE) - @jakarta.annotation.Nullable - private String cumBase; - public static final String SERIALIZED_NAME_EXECUTED_QTY = "executedQty"; @SerializedName(SERIALIZED_NAME_EXECUTED_QTY) @@ -78,12 +66,6 @@ public class CancelMultipleOrdersResponseInner { @jakarta.annotation.Nullable private String origQty; - public static final String SERIALIZED_NAME_ORIG_TYPE = "origType"; - - @SerializedName(SERIALIZED_NAME_ORIG_TYPE) - @jakarta.annotation.Nullable - private String origType; - public static final String SERIALIZED_NAME_PRICE = "price"; @SerializedName(SERIALIZED_NAME_PRICE) @@ -144,6 +126,12 @@ public class CancelMultipleOrdersResponseInner { @jakarta.annotation.Nullable private String timeInForce; + public static final String SERIALIZED_NAME_ORIG_TYPE = "origType"; + + @SerializedName(SERIALIZED_NAME_ORIG_TYPE) + @jakarta.annotation.Nullable + private String origType; + public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -207,26 +195,6 @@ public class CancelMultipleOrdersResponseInner { public CancelMultipleOrdersResponseInner() {} - public CancelMultipleOrdersResponseInner avgPrice( - @jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - return this; - } - - /** - * Get avgPrice - * - * @return avgPrice - */ - @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; - } - - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - } - public CancelMultipleOrdersResponseInner clientOrderId( @jakarta.annotation.Nullable String clientOrderId) { this.clientOrderId = clientOrderId; @@ -234,7 +202,7 @@ public CancelMultipleOrdersResponseInner clientOrderId( } /** - * Get clientOrderId + * Client order ID. * * @return clientOrderId */ @@ -253,7 +221,7 @@ public CancelMultipleOrdersResponseInner cumQty(@jakarta.annotation.Nullable Str } /** - * Get cumQty + * Cumulative filled quantity. * * @return cumQty */ @@ -266,25 +234,6 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public CancelMultipleOrdersResponseInner cumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - return this; - } - - /** - * Get cumBase - * - * @return cumBase - */ - @jakarta.annotation.Nullable - public String getCumBase() { - return cumBase; - } - - public void setCumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - } - public CancelMultipleOrdersResponseInner executedQty( @jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; @@ -292,7 +241,7 @@ public CancelMultipleOrdersResponseInner executedQty( } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -311,7 +260,7 @@ public CancelMultipleOrdersResponseInner orderId(@jakarta.annotation.Nullable Lo } /** - * Get orderId + * Sub-order ID * * @return orderId */ @@ -330,7 +279,7 @@ public CancelMultipleOrdersResponseInner origQty(@jakarta.annotation.Nullable St } /** - * Get origQty + * Original order quantity * * @return origQty */ @@ -343,33 +292,13 @@ public void setOrigQty(@jakarta.annotation.Nullable String origQty) { this.origQty = origQty; } - public CancelMultipleOrdersResponseInner origType( - @jakarta.annotation.Nullable String origType) { - this.origType = origType; - return this; - } - - /** - * Get origType - * - * @return origType - */ - @jakarta.annotation.Nullable - public String getOrigType() { - return origType; - } - - public void setOrigType(@jakarta.annotation.Nullable String origType) { - this.origType = origType; - } - public CancelMultipleOrdersResponseInner price(@jakarta.annotation.Nullable String price) { this.price = price; return this; } /** - * Get price + * Latest token price. * * @return price */ @@ -389,7 +318,7 @@ public CancelMultipleOrdersResponseInner reduceOnly( } /** - * Get reduceOnly + * Whether the order is reduce-only. * * @return reduceOnly */ @@ -408,7 +337,7 @@ public CancelMultipleOrdersResponseInner side(@jakarta.annotation.Nullable Strin } /** - * Get side + * Trading side * * @return side */ @@ -428,7 +357,7 @@ public CancelMultipleOrdersResponseInner positionSide( } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -447,7 +376,7 @@ public CancelMultipleOrdersResponseInner status(@jakarta.annotation.Nullable Str } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -467,7 +396,7 @@ public CancelMultipleOrdersResponseInner stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -487,7 +416,7 @@ public CancelMultipleOrdersResponseInner closePosition( } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -506,7 +435,7 @@ public CancelMultipleOrdersResponseInner symbol(@jakarta.annotation.Nullable Str } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -525,7 +454,7 @@ public CancelMultipleOrdersResponseInner pair(@jakarta.annotation.Nullable Strin } /** - * Get pair + * Pair * * @return pair */ @@ -545,7 +474,7 @@ public CancelMultipleOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time in force * * @return timeInForce */ @@ -558,13 +487,33 @@ public void setTimeInForce(@jakarta.annotation.Nullable String timeInForce) { this.timeInForce = timeInForce; } + public CancelMultipleOrdersResponseInner origType( + @jakarta.annotation.Nullable String origType) { + this.origType = origType; + return this; + } + + /** + * Original order type. + * + * @return origType + */ + @jakarta.annotation.Nullable + public String getOrigType() { + return origType; + } + + public void setOrigType(@jakarta.annotation.Nullable String origType) { + this.origType = origType; + } + public CancelMultipleOrdersResponseInner type(@jakarta.annotation.Nullable String type) { this.type = type; return this; } /** - * Get type + * Order type. * * @return type */ @@ -584,7 +533,7 @@ public CancelMultipleOrdersResponseInner activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -604,7 +553,7 @@ public CancelMultipleOrdersResponseInner priceRate( } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -624,7 +573,7 @@ public CancelMultipleOrdersResponseInner workingType( } /** - * Get workingType + * Stop trigger price type. * * @return workingType */ @@ -644,7 +593,7 @@ public CancelMultipleOrdersResponseInner priceProtect( } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -664,7 +613,7 @@ public CancelMultipleOrdersResponseInner priceMatch( } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -684,7 +633,7 @@ public CancelMultipleOrdersResponseInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -705,7 +654,7 @@ public CancelMultipleOrdersResponseInner updateTime( } /** - * Get updateTime + * update time * * @return updateTime */ @@ -724,7 +673,7 @@ public CancelMultipleOrdersResponseInner code(@jakarta.annotation.Nullable Long } /** - * Get code + * API response code. \"000000\" indicates success. * * @return code */ @@ -743,7 +692,7 @@ public CancelMultipleOrdersResponseInner msg(@jakarta.annotation.Nullable String } /** - * Get msg + * Message details. * * @return msg */ @@ -766,15 +715,11 @@ public boolean equals(Object o) { } CancelMultipleOrdersResponseInner cancelMultipleOrdersResponseInner = (CancelMultipleOrdersResponseInner) o; - return Objects.equals(this.avgPrice, cancelMultipleOrdersResponseInner.avgPrice) - && Objects.equals( - this.clientOrderId, cancelMultipleOrdersResponseInner.clientOrderId) + return Objects.equals(this.clientOrderId, cancelMultipleOrdersResponseInner.clientOrderId) && Objects.equals(this.cumQty, cancelMultipleOrdersResponseInner.cumQty) - && Objects.equals(this.cumBase, cancelMultipleOrdersResponseInner.cumBase) && Objects.equals(this.executedQty, cancelMultipleOrdersResponseInner.executedQty) && Objects.equals(this.orderId, cancelMultipleOrdersResponseInner.orderId) && Objects.equals(this.origQty, cancelMultipleOrdersResponseInner.origQty) - && Objects.equals(this.origType, cancelMultipleOrdersResponseInner.origType) && Objects.equals(this.price, cancelMultipleOrdersResponseInner.price) && Objects.equals(this.reduceOnly, cancelMultipleOrdersResponseInner.reduceOnly) && Objects.equals(this.side, cancelMultipleOrdersResponseInner.side) @@ -786,6 +731,7 @@ public boolean equals(Object o) { && Objects.equals(this.symbol, cancelMultipleOrdersResponseInner.symbol) && Objects.equals(this.pair, cancelMultipleOrdersResponseInner.pair) && Objects.equals(this.timeInForce, cancelMultipleOrdersResponseInner.timeInForce) + && Objects.equals(this.origType, cancelMultipleOrdersResponseInner.origType) && Objects.equals(this.type, cancelMultipleOrdersResponseInner.type) && Objects.equals( this.activatePrice, cancelMultipleOrdersResponseInner.activatePrice) @@ -804,14 +750,11 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - avgPrice, clientOrderId, cumQty, - cumBase, executedQty, orderId, origQty, - origType, price, reduceOnly, side, @@ -822,6 +765,7 @@ public int hashCode() { symbol, pair, timeInForce, + origType, type, activatePrice, priceRate, @@ -838,14 +782,11 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CancelMultipleOrdersResponseInner {\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumBase: ").append(toIndentedString(cumBase)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); - sb.append(" origType: ").append(toIndentedString(origType)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); @@ -856,6 +797,7 @@ public String toString() { sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" pair: ").append(toIndentedString(pair)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); + sb.append(" origType: ").append(toIndentedString(origType)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" activatePrice: ").append(toIndentedString(activatePrice)).append("\n"); sb.append(" priceRate: ").append(toIndentedString(priceRate)).append("\n"); @@ -875,10 +817,6 @@ public String toString() { public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); - Object avgPriceValue = getAvgPrice(); - String avgPriceValueAsString = ""; - avgPriceValueAsString = avgPriceValue.toString(); - sb.append("avgPrice=").append(urlEncode(avgPriceValueAsString)).append(""); Object clientOrderIdValue = getClientOrderId(); String clientOrderIdValueAsString = ""; clientOrderIdValueAsString = clientOrderIdValue.toString(); @@ -887,10 +825,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = ""; cumQtyValueAsString = cumQtyValue.toString(); sb.append("cumQty=").append(urlEncode(cumQtyValueAsString)).append(""); - Object cumBaseValue = getCumBase(); - String cumBaseValueAsString = ""; - cumBaseValueAsString = cumBaseValue.toString(); - sb.append("cumBase=").append(urlEncode(cumBaseValueAsString)).append(""); Object executedQtyValue = getExecutedQty(); String executedQtyValueAsString = ""; executedQtyValueAsString = executedQtyValue.toString(); @@ -903,10 +837,6 @@ public String toUrlQueryString() { String origQtyValueAsString = ""; origQtyValueAsString = origQtyValue.toString(); sb.append("origQty=").append(urlEncode(origQtyValueAsString)).append(""); - Object origTypeValue = getOrigType(); - String origTypeValueAsString = ""; - origTypeValueAsString = origTypeValue.toString(); - sb.append("origType=").append(urlEncode(origTypeValueAsString)).append(""); Object priceValue = getPrice(); String priceValueAsString = ""; priceValueAsString = priceValue.toString(); @@ -947,6 +877,10 @@ public String toUrlQueryString() { String timeInForceValueAsString = ""; timeInForceValueAsString = timeInForceValue.toString(); sb.append("timeInForce=").append(urlEncode(timeInForceValueAsString)).append(""); + Object origTypeValue = getOrigType(); + String origTypeValueAsString = ""; + origTypeValueAsString = origTypeValue.toString(); + sb.append("origType=").append(urlEncode(origTypeValueAsString)).append(""); Object typeValue = getType(); String typeValueAsString = ""; typeValueAsString = typeValue.toString(); @@ -1017,14 +951,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("avgPrice"); openapiFields.add("clientOrderId"); openapiFields.add("cumQty"); - openapiFields.add("cumBase"); openapiFields.add("executedQty"); openapiFields.add("orderId"); openapiFields.add("origQty"); - openapiFields.add("origType"); openapiFields.add("price"); openapiFields.add("reduceOnly"); openapiFields.add("side"); @@ -1035,6 +966,7 @@ private String toIndentedString(Object o) { openapiFields.add("symbol"); openapiFields.add("pair"); openapiFields.add("timeInForce"); + openapiFields.add("origType"); openapiFields.add("type"); openapiFields.add("activatePrice"); openapiFields.add("priceRate"); @@ -1070,14 +1002,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("clientOrderId") != null && !jsonObj.get("clientOrderId").isJsonNull()) && !jsonObj.get("clientOrderId").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1094,14 +1018,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumBase") != null && !jsonObj.get("cumBase").isJsonNull()) - && !jsonObj.get("cumBase").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumBase` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("cumBase").toString())); - } if ((jsonObj.get("executedQty") != null && !jsonObj.get("executedQty").isJsonNull()) && !jsonObj.get("executedQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1118,14 +1034,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("origQty").toString())); } - if ((jsonObj.get("origType") != null && !jsonObj.get("origType").isJsonNull()) - && !jsonObj.get("origType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `origType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("origType").toString())); - } if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) && !jsonObj.get("price").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1190,6 +1098,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("timeInForce").toString())); } + if ((jsonObj.get("origType") != null && !jsonObj.get("origType").isJsonNull()) + && !jsonObj.get("origType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `origType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("origType").toString())); + } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CancelOrderResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CancelOrderResponse.java index 485ec8b9b..ff965a0bc 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CancelOrderResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CancelOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,14 +34,8 @@ /** CancelOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelOrderResponse { - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE) - @jakarta.annotation.Nullable - private String avgPrice; - public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @SerializedName(SERIALIZED_NAME_CLIENT_ORDER_ID) @@ -54,12 +48,6 @@ public class CancelOrderResponse { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_BASE = "cumBase"; - - @SerializedName(SERIALIZED_NAME_CUM_BASE) - @jakarta.annotation.Nullable - private String cumBase; - public static final String SERIALIZED_NAME_EXECUTED_QTY = "executedQty"; @SerializedName(SERIALIZED_NAME_EXECUTED_QTY) @@ -78,12 +66,6 @@ public class CancelOrderResponse { @jakarta.annotation.Nullable private String origQty; - public static final String SERIALIZED_NAME_ORIG_TYPE = "origType"; - - @SerializedName(SERIALIZED_NAME_ORIG_TYPE) - @jakarta.annotation.Nullable - private String origType; - public static final String SERIALIZED_NAME_PRICE = "price"; @SerializedName(SERIALIZED_NAME_PRICE) @@ -144,6 +126,12 @@ public class CancelOrderResponse { @jakarta.annotation.Nullable private String timeInForce; + public static final String SERIALIZED_NAME_ORIG_TYPE = "origType"; + + @SerializedName(SERIALIZED_NAME_ORIG_TYPE) + @jakarta.annotation.Nullable + private String origType; + public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -195,32 +183,13 @@ public class CancelOrderResponse { public CancelOrderResponse() {} - public CancelOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - return this; - } - - /** - * Get avgPrice - * - * @return avgPrice - */ - @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; - } - - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - } - public CancelOrderResponse clientOrderId(@jakarta.annotation.Nullable String clientOrderId) { this.clientOrderId = clientOrderId; return this; } /** - * Get clientOrderId + * Client order ID. * * @return clientOrderId */ @@ -239,7 +208,7 @@ public CancelOrderResponse cumQty(@jakarta.annotation.Nullable String cumQty) { } /** - * Get cumQty + * Cumulative filled quantity. * * @return cumQty */ @@ -252,32 +221,13 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public CancelOrderResponse cumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - return this; - } - - /** - * Get cumBase - * - * @return cumBase - */ - @jakarta.annotation.Nullable - public String getCumBase() { - return cumBase; - } - - public void setCumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - } - public CancelOrderResponse executedQty(@jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; return this; } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -296,7 +246,7 @@ public CancelOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Sub-order ID * * @return orderId */ @@ -315,7 +265,7 @@ public CancelOrderResponse origQty(@jakarta.annotation.Nullable String origQty) } /** - * Get origQty + * Original order quantity * * @return origQty */ @@ -328,32 +278,13 @@ public void setOrigQty(@jakarta.annotation.Nullable String origQty) { this.origQty = origQty; } - public CancelOrderResponse origType(@jakarta.annotation.Nullable String origType) { - this.origType = origType; - return this; - } - - /** - * Get origType - * - * @return origType - */ - @jakarta.annotation.Nullable - public String getOrigType() { - return origType; - } - - public void setOrigType(@jakarta.annotation.Nullable String origType) { - this.origType = origType; - } - public CancelOrderResponse price(@jakarta.annotation.Nullable String price) { this.price = price; return this; } /** - * Get price + * Latest token price. * * @return price */ @@ -372,7 +303,7 @@ public CancelOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean reduc } /** - * Get reduceOnly + * Whether the order is reduce-only. * * @return reduceOnly */ @@ -391,7 +322,7 @@ public CancelOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Trading side * * @return side */ @@ -410,7 +341,7 @@ public CancelOrderResponse positionSide(@jakarta.annotation.Nullable String posi } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -429,7 +360,7 @@ public CancelOrderResponse status(@jakarta.annotation.Nullable String status) { } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -448,7 +379,7 @@ public CancelOrderResponse stopPrice(@jakarta.annotation.Nullable String stopPri } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -467,7 +398,7 @@ public CancelOrderResponse closePosition(@jakarta.annotation.Nullable Boolean cl } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -486,7 +417,7 @@ public CancelOrderResponse symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -505,7 +436,7 @@ public CancelOrderResponse pair(@jakarta.annotation.Nullable String pair) { } /** - * Get pair + * Pair * * @return pair */ @@ -524,7 +455,7 @@ public CancelOrderResponse timeInForce(@jakarta.annotation.Nullable String timeI } /** - * Get timeInForce + * Time in force * * @return timeInForce */ @@ -537,13 +468,32 @@ public void setTimeInForce(@jakarta.annotation.Nullable String timeInForce) { this.timeInForce = timeInForce; } + public CancelOrderResponse origType(@jakarta.annotation.Nullable String origType) { + this.origType = origType; + return this; + } + + /** + * Original order type. + * + * @return origType + */ + @jakarta.annotation.Nullable + public String getOrigType() { + return origType; + } + + public void setOrigType(@jakarta.annotation.Nullable String origType) { + this.origType = origType; + } + public CancelOrderResponse type(@jakarta.annotation.Nullable String type) { this.type = type; return this; } /** - * Get type + * Order type. * * @return type */ @@ -562,7 +512,7 @@ public CancelOrderResponse activatePrice(@jakarta.annotation.Nullable String act } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -581,7 +531,7 @@ public CancelOrderResponse priceRate(@jakarta.annotation.Nullable String priceRa } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -600,7 +550,7 @@ public CancelOrderResponse updateTime(@jakarta.annotation.Nullable Long updateTi } /** - * Get updateTime + * update time * * @return updateTime */ @@ -619,7 +569,7 @@ public CancelOrderResponse workingType(@jakarta.annotation.Nullable String worki } /** - * Get workingType + * Stop trigger price type. * * @return workingType */ @@ -638,7 +588,7 @@ public CancelOrderResponse priceProtect(@jakarta.annotation.Nullable Boolean pri } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -657,7 +607,7 @@ public CancelOrderResponse priceMatch(@jakarta.annotation.Nullable String priceM } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -677,7 +627,7 @@ public CancelOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -700,14 +650,11 @@ public boolean equals(Object o) { return false; } CancelOrderResponse cancelOrderResponse = (CancelOrderResponse) o; - return Objects.equals(this.avgPrice, cancelOrderResponse.avgPrice) - && Objects.equals(this.clientOrderId, cancelOrderResponse.clientOrderId) + return Objects.equals(this.clientOrderId, cancelOrderResponse.clientOrderId) && Objects.equals(this.cumQty, cancelOrderResponse.cumQty) - && Objects.equals(this.cumBase, cancelOrderResponse.cumBase) && Objects.equals(this.executedQty, cancelOrderResponse.executedQty) && Objects.equals(this.orderId, cancelOrderResponse.orderId) && Objects.equals(this.origQty, cancelOrderResponse.origQty) - && Objects.equals(this.origType, cancelOrderResponse.origType) && Objects.equals(this.price, cancelOrderResponse.price) && Objects.equals(this.reduceOnly, cancelOrderResponse.reduceOnly) && Objects.equals(this.side, cancelOrderResponse.side) @@ -718,6 +665,7 @@ public boolean equals(Object o) { && Objects.equals(this.symbol, cancelOrderResponse.symbol) && Objects.equals(this.pair, cancelOrderResponse.pair) && Objects.equals(this.timeInForce, cancelOrderResponse.timeInForce) + && Objects.equals(this.origType, cancelOrderResponse.origType) && Objects.equals(this.type, cancelOrderResponse.type) && Objects.equals(this.activatePrice, cancelOrderResponse.activatePrice) && Objects.equals(this.priceRate, cancelOrderResponse.priceRate) @@ -732,14 +680,11 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - avgPrice, clientOrderId, cumQty, - cumBase, executedQty, orderId, origQty, - origType, price, reduceOnly, side, @@ -750,6 +695,7 @@ public int hashCode() { symbol, pair, timeInForce, + origType, type, activatePrice, priceRate, @@ -764,14 +710,11 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CancelOrderResponse {\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumBase: ").append(toIndentedString(cumBase)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); - sb.append(" origType: ").append(toIndentedString(origType)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); @@ -782,6 +725,7 @@ public String toString() { sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" pair: ").append(toIndentedString(pair)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); + sb.append(" origType: ").append(toIndentedString(origType)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" activatePrice: ").append(toIndentedString(activatePrice)).append("\n"); sb.append(" priceRate: ").append(toIndentedString(priceRate)).append("\n"); @@ -799,10 +743,6 @@ public String toString() { public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); - Object avgPriceValue = getAvgPrice(); - String avgPriceValueAsString = ""; - avgPriceValueAsString = avgPriceValue.toString(); - sb.append("avgPrice=").append(urlEncode(avgPriceValueAsString)).append(""); Object clientOrderIdValue = getClientOrderId(); String clientOrderIdValueAsString = ""; clientOrderIdValueAsString = clientOrderIdValue.toString(); @@ -811,10 +751,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = ""; cumQtyValueAsString = cumQtyValue.toString(); sb.append("cumQty=").append(urlEncode(cumQtyValueAsString)).append(""); - Object cumBaseValue = getCumBase(); - String cumBaseValueAsString = ""; - cumBaseValueAsString = cumBaseValue.toString(); - sb.append("cumBase=").append(urlEncode(cumBaseValueAsString)).append(""); Object executedQtyValue = getExecutedQty(); String executedQtyValueAsString = ""; executedQtyValueAsString = executedQtyValue.toString(); @@ -827,10 +763,6 @@ public String toUrlQueryString() { String origQtyValueAsString = ""; origQtyValueAsString = origQtyValue.toString(); sb.append("origQty=").append(urlEncode(origQtyValueAsString)).append(""); - Object origTypeValue = getOrigType(); - String origTypeValueAsString = ""; - origTypeValueAsString = origTypeValue.toString(); - sb.append("origType=").append(urlEncode(origTypeValueAsString)).append(""); Object priceValue = getPrice(); String priceValueAsString = ""; priceValueAsString = priceValue.toString(); @@ -871,6 +803,10 @@ public String toUrlQueryString() { String timeInForceValueAsString = ""; timeInForceValueAsString = timeInForceValue.toString(); sb.append("timeInForce=").append(urlEncode(timeInForceValueAsString)).append(""); + Object origTypeValue = getOrigType(); + String origTypeValueAsString = ""; + origTypeValueAsString = origTypeValue.toString(); + sb.append("origType=").append(urlEncode(origTypeValueAsString)).append(""); Object typeValue = getType(); String typeValueAsString = ""; typeValueAsString = typeValue.toString(); @@ -933,14 +869,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("avgPrice"); openapiFields.add("clientOrderId"); openapiFields.add("cumQty"); - openapiFields.add("cumBase"); openapiFields.add("executedQty"); openapiFields.add("orderId"); openapiFields.add("origQty"); - openapiFields.add("origType"); openapiFields.add("price"); openapiFields.add("reduceOnly"); openapiFields.add("side"); @@ -951,6 +884,7 @@ private String toIndentedString(Object o) { openapiFields.add("symbol"); openapiFields.add("pair"); openapiFields.add("timeInForce"); + openapiFields.add("origType"); openapiFields.add("type"); openapiFields.add("activatePrice"); openapiFields.add("priceRate"); @@ -982,14 +916,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("clientOrderId") != null && !jsonObj.get("clientOrderId").isJsonNull()) && !jsonObj.get("clientOrderId").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1006,14 +932,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumBase") != null && !jsonObj.get("cumBase").isJsonNull()) - && !jsonObj.get("cumBase").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumBase` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("cumBase").toString())); - } if ((jsonObj.get("executedQty") != null && !jsonObj.get("executedQty").isJsonNull()) && !jsonObj.get("executedQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1030,14 +948,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("origQty").toString())); } - if ((jsonObj.get("origType") != null && !jsonObj.get("origType").isJsonNull()) - && !jsonObj.get("origType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `origType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("origType").toString())); - } if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) && !jsonObj.get("price").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1102,6 +1012,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("timeInForce").toString())); } + if ((jsonObj.get("origType") != null && !jsonObj.get("origType").isJsonNull()) + && !jsonObj.get("origType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `origType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("origType").toString())); + } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangeInitialLeverageRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangeInitialLeverageRequest.java index aacc4f374..112ae9c11 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangeInitialLeverageRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangeInitialLeverageRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangeInitialLeverageRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeInitialLeverageRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -62,7 +62,7 @@ public ChangeInitialLeverageRequest symbol(@jakarta.annotation.Nonnull String sy } /** - * Get symbol + * Symbol * * @return symbol */ @@ -82,7 +82,7 @@ public ChangeInitialLeverageRequest leverage(@jakarta.annotation.Nonnull Long le } /** - * Get leverage + * target initial leverage: int from 1 to 125 * * @return leverage */ @@ -102,11 +102,12 @@ public ChangeInitialLeverageRequest recvWindow(@jakarta.annotation.Nullable Long } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangeInitialLeverageResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangeInitialLeverageResponse.java index 6970047a4..62b1b90fb 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangeInitialLeverageResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangeInitialLeverageResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangeInitialLeverageResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeInitialLeverageResponse { public static final String SERIALIZED_NAME_LEVERAGE = "leverage"; @@ -62,7 +62,7 @@ public ChangeInitialLeverageResponse leverage(@jakarta.annotation.Nullable Long } /** - * Get leverage + * Leverage value. * * @return leverage */ @@ -81,7 +81,7 @@ public ChangeInitialLeverageResponse maxQty(@jakarta.annotation.Nullable String } /** - * Get maxQty + * maximum quantity of base asset * * @return maxQty */ @@ -100,7 +100,7 @@ public ChangeInitialLeverageResponse symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * Trading symbol * * @return symbol */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangeMarginTypeRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangeMarginTypeRequest.java index 37eaef6da..acdcb98d0 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangeMarginTypeRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangeMarginTypeRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** ChangeMarginTypeRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeMarginTypeRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public ChangeMarginTypeRequest symbol(@jakarta.annotation.Nonnull String symbol) } /** - * Get symbol + * Symbol * * @return symbol */ @@ -104,11 +104,12 @@ public ChangeMarginTypeRequest recvWindow(@jakarta.annotation.Nullable Long recv } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangeMarginTypeResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangeMarginTypeResponse.java index 606cf6b85..f0377d94b 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangeMarginTypeResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangeMarginTypeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangeMarginTypeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeMarginTypeResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -56,7 +56,7 @@ public ChangeMarginTypeResponse code(@jakarta.annotation.Nullable Long code) { } /** - * Get code + * API response code. \"000000\" indicates success. * * @return code */ @@ -75,7 +75,7 @@ public ChangeMarginTypeResponse msg(@jakarta.annotation.Nullable String msg) { } /** - * Get msg + * Message details. * * @return msg */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangePositionModeRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangePositionModeRequest.java index 2eb2967b3..7cde00cda 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangePositionModeRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangePositionModeRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangePositionModeRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangePositionModeRequest { public static final String SERIALIZED_NAME_DUAL_SIDE_POSITION = "dualSidePosition"; @@ -57,7 +57,7 @@ public ChangePositionModeRequest dualSidePosition( } /** - * Get dualSidePosition + * \"true\": Hedge Mode; \"false\": One-way Mode * * @return dualSidePosition */ @@ -77,11 +77,12 @@ public ChangePositionModeRequest recvWindow(@jakarta.annotation.Nullable Long re } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangePositionModeResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangePositionModeResponse.java index ea675e04f..c1f770b14 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangePositionModeResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ChangePositionModeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangePositionModeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangePositionModeResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -56,7 +56,7 @@ public ChangePositionModeResponse code(@jakarta.annotation.Nullable Long code) { } /** - * Get code + * API response code. \"000000\" indicates success. * * @return code */ @@ -75,7 +75,7 @@ public ChangePositionModeResponse msg(@jakarta.annotation.Nullable String msg) { } /** - * Get msg + * Message details. * * @return msg */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CheckServerTimeResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CheckServerTimeResponse.java index ec1e34d98..adc3a2e9b 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CheckServerTimeResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CheckServerTimeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CheckServerTimeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CheckServerTimeResponse { public static final String SERIALIZED_NAME_SERVER_TIME = "serverTime"; @@ -50,7 +50,8 @@ public CheckServerTimeResponse serverTime(@jakarta.annotation.Nullable Long serv } /** - * Get serverTime + * Ignore please. If you want to check current server time, please check via \"GET + * /dapi/v1/time\" * * @return serverTime */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ClassicPortfolioMarginAccountInformationResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ClassicPortfolioMarginAccountInformationResponse.java deleted file mode 100644 index f9c809d65..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ClassicPortfolioMarginAccountInformationResponse.java +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** ClassicPortfolioMarginAccountInformationResponse */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ClassicPortfolioMarginAccountInformationResponse { - public static final String SERIALIZED_NAME_MAX_WITHDRAW_AMOUNT_U_S_D = "maxWithdrawAmountUSD"; - - @SerializedName(SERIALIZED_NAME_MAX_WITHDRAW_AMOUNT_U_S_D) - @jakarta.annotation.Nullable - private String maxWithdrawAmountUSD; - - public static final String SERIALIZED_NAME_ASSET = "asset"; - - @SerializedName(SERIALIZED_NAME_ASSET) - @jakarta.annotation.Nullable - private String asset; - - public static final String SERIALIZED_NAME_MAX_WITHDRAW_AMOUNT = "maxWithdrawAmount"; - - @SerializedName(SERIALIZED_NAME_MAX_WITHDRAW_AMOUNT) - @jakarta.annotation.Nullable - private String maxWithdrawAmount; - - public ClassicPortfolioMarginAccountInformationResponse() {} - - public ClassicPortfolioMarginAccountInformationResponse maxWithdrawAmountUSD( - @jakarta.annotation.Nullable String maxWithdrawAmountUSD) { - this.maxWithdrawAmountUSD = maxWithdrawAmountUSD; - return this; - } - - /** - * Get maxWithdrawAmountUSD - * - * @return maxWithdrawAmountUSD - */ - @jakarta.annotation.Nullable - public String getMaxWithdrawAmountUSD() { - return maxWithdrawAmountUSD; - } - - public void setMaxWithdrawAmountUSD(@jakarta.annotation.Nullable String maxWithdrawAmountUSD) { - this.maxWithdrawAmountUSD = maxWithdrawAmountUSD; - } - - public ClassicPortfolioMarginAccountInformationResponse asset( - @jakarta.annotation.Nullable String asset) { - this.asset = asset; - return this; - } - - /** - * Get asset - * - * @return asset - */ - @jakarta.annotation.Nullable - public String getAsset() { - return asset; - } - - public void setAsset(@jakarta.annotation.Nullable String asset) { - this.asset = asset; - } - - public ClassicPortfolioMarginAccountInformationResponse maxWithdrawAmount( - @jakarta.annotation.Nullable String maxWithdrawAmount) { - this.maxWithdrawAmount = maxWithdrawAmount; - return this; - } - - /** - * Get maxWithdrawAmount - * - * @return maxWithdrawAmount - */ - @jakarta.annotation.Nullable - public String getMaxWithdrawAmount() { - return maxWithdrawAmount; - } - - public void setMaxWithdrawAmount(@jakarta.annotation.Nullable String maxWithdrawAmount) { - this.maxWithdrawAmount = maxWithdrawAmount; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClassicPortfolioMarginAccountInformationResponse - classicPortfolioMarginAccountInformationResponse = - (ClassicPortfolioMarginAccountInformationResponse) o; - return Objects.equals( - this.maxWithdrawAmountUSD, - classicPortfolioMarginAccountInformationResponse.maxWithdrawAmountUSD) - && Objects.equals( - this.asset, classicPortfolioMarginAccountInformationResponse.asset) - && Objects.equals( - this.maxWithdrawAmount, - classicPortfolioMarginAccountInformationResponse.maxWithdrawAmount); - } - - @Override - public int hashCode() { - return Objects.hash(maxWithdrawAmountUSD, asset, maxWithdrawAmount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClassicPortfolioMarginAccountInformationResponse {\n"); - sb.append(" maxWithdrawAmountUSD: ") - .append(toIndentedString(maxWithdrawAmountUSD)) - .append("\n"); - sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); - sb.append(" maxWithdrawAmount: ").append(toIndentedString(maxWithdrawAmount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object maxWithdrawAmountUSDValue = getMaxWithdrawAmountUSD(); - String maxWithdrawAmountUSDValueAsString = ""; - maxWithdrawAmountUSDValueAsString = maxWithdrawAmountUSDValue.toString(); - sb.append("maxWithdrawAmountUSD=") - .append(urlEncode(maxWithdrawAmountUSDValueAsString)) - .append(""); - Object assetValue = getAsset(); - String assetValueAsString = ""; - assetValueAsString = assetValue.toString(); - sb.append("asset=").append(urlEncode(assetValueAsString)).append(""); - Object maxWithdrawAmountValue = getMaxWithdrawAmount(); - String maxWithdrawAmountValueAsString = ""; - maxWithdrawAmountValueAsString = maxWithdrawAmountValue.toString(); - sb.append("maxWithdrawAmount=") - .append(urlEncode(maxWithdrawAmountValueAsString)) - .append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("maxWithdrawAmountUSD"); - openapiFields.add("asset"); - openapiFields.add("maxWithdrawAmount"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ClassicPortfolioMarginAccountInformationResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ClassicPortfolioMarginAccountInformationResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " ClassicPortfolioMarginAccountInformationResponse is not" - + " found in the empty JSON string", - ClassicPortfolioMarginAccountInformationResponse - .openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("maxWithdrawAmountUSD") != null - && !jsonObj.get("maxWithdrawAmountUSD").isJsonNull()) - && !jsonObj.get("maxWithdrawAmountUSD").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `maxWithdrawAmountUSD` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("maxWithdrawAmountUSD").toString())); - } - if ((jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) - && !jsonObj.get("asset").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `asset` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("asset").toString())); - } - if ((jsonObj.get("maxWithdrawAmount") != null - && !jsonObj.get("maxWithdrawAmount").isJsonNull()) - && !jsonObj.get("maxWithdrawAmount").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `maxWithdrawAmount` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("maxWithdrawAmount").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ClassicPortfolioMarginAccountInformationResponse.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'ClassicPortfolioMarginAccountInformationResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, - TypeToken.get(ClassicPortfolioMarginAccountInformationResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, - ClassicPortfolioMarginAccountInformationResponse value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ClassicPortfolioMarginAccountInformationResponse read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ClassicPortfolioMarginAccountInformationResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ClassicPortfolioMarginAccountInformationResponse - * @throws IOException if the JSON string is invalid with respect to - * ClassicPortfolioMarginAccountInformationResponse - */ - public static ClassicPortfolioMarginAccountInformationResponse fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, ClassicPortfolioMarginAccountInformationResponse.class); - } - - /** - * Convert an instance of ClassicPortfolioMarginAccountInformationResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CompressedAggregateTradesListResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CompressedAggregateTradesListResponse.java index 232c6303b..3acb5fdf4 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CompressedAggregateTradesListResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CompressedAggregateTradesListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CompressedAggregateTradesListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CompressedAggregateTradesListResponse extends ArrayList { public CompressedAggregateTradesListResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CompressedAggregateTradesListResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CompressedAggregateTradesListResponseInner.java index 8821612ad..72f6ab2c7 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CompressedAggregateTradesListResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CompressedAggregateTradesListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CompressedAggregateTradesListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CompressedAggregateTradesListResponseInner { public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; @@ -87,7 +87,7 @@ public CompressedAggregateTradesListResponseInner aLowerCase( } /** - * Get aLowerCase + * Aggregate tradeId * * @return aLowerCase */ @@ -107,7 +107,7 @@ public CompressedAggregateTradesListResponseInner pLowerCase( } /** - * Get pLowerCase + * Price * * @return pLowerCase */ @@ -127,7 +127,7 @@ public CompressedAggregateTradesListResponseInner qLowerCase( } /** - * Get qLowerCase + * Quantity * * @return qLowerCase */ @@ -147,7 +147,7 @@ public CompressedAggregateTradesListResponseInner fLowerCase( } /** - * Get fLowerCase + * First tradeId * * @return fLowerCase */ @@ -167,7 +167,7 @@ public CompressedAggregateTradesListResponseInner lLowerCase( } /** - * Get lLowerCase + * Last tradeId * * @return lLowerCase */ @@ -186,7 +186,7 @@ public CompressedAggregateTradesListResponseInner T(@jakarta.annotation.Nullable } /** - * Get T + * Timestamp * * @return T */ @@ -206,7 +206,7 @@ public CompressedAggregateTradesListResponseInner mLowerCase( } /** - * Get mLowerCase + * Was the buyer the maker? * * @return mLowerCase */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContinuousContractKlineCandlestickDataItem.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContinuousContractKlineCandlestickDataItem.java new file mode 100644 index 000000000..69dbe754c --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContinuousContractKlineCandlestickDataItem.java @@ -0,0 +1,193 @@ +/* + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** ContinuousContractKlineCandlestickDataItem */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ContinuousContractKlineCandlestickDataItem extends ArrayList { + public ContinuousContractKlineCandlestickDataItem() {} + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContinuousContractKlineCandlestickDataItem {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ContinuousContractKlineCandlestickDataItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be a array type in the JSON string but got" + + " `%s`", + jsonElement.toString())); + } + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for (JsonElement element : array) { + ContinuousContractKlineCandlestickDataItemInner.validateJsonElement(element); + } + if (jsonElement == null) { + if (!ContinuousContractKlineCandlestickDataItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " ContinuousContractKlineCandlestickDataItem is not found in" + + " the empty JSON string", + ContinuousContractKlineCandlestickDataItem.openapiRequiredFields + .toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ContinuousContractKlineCandlestickDataItem.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'ContinuousContractKlineCandlestickDataItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ContinuousContractKlineCandlestickDataItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, ContinuousContractKlineCandlestickDataItem value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); + elementAdapter.write(out, obj); + } + + @Override + public ContinuousContractKlineCandlestickDataItem read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ContinuousContractKlineCandlestickDataItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of ContinuousContractKlineCandlestickDataItem + * @throws IOException if the JSON string is invalid with respect to + * ContinuousContractKlineCandlestickDataItem + */ + public static ContinuousContractKlineCandlestickDataItem fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, ContinuousContractKlineCandlestickDataItem.class); + } + + /** + * Convert an instance of ContinuousContractKlineCandlestickDataItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContinuousContractKlineCandlestickDataItemInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContinuousContractKlineCandlestickDataItemInner.java new file mode 100644 index 000000000..dd5e87698 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContinuousContractKlineCandlestickDataItemInner.java @@ -0,0 +1,317 @@ +/* + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; + +import com.binance.connector.client.common.AbstractOpenApiSchema; +import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonPrimitive; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.hibernate.validator.constraints.*; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ContinuousContractKlineCandlestickDataItemInner extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(ContinuousContractKlineCandlestickDataItemInner.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ContinuousContractKlineCandlestickDataItemInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'ContinuousContractKlineCandlestickDataItemInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterLong = + gson.getDelegateAdapter(this, TypeToken.get(Long.class)); + final TypeAdapter adapterString = + gson.getDelegateAdapter(this, TypeToken.get(String.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, + ContinuousContractKlineCandlestickDataItemInner value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `Long` + if (value.getActualInstance() instanceof Long) { + JsonPrimitive primitive = + adapterLong + .toJsonTree((Long) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + // check if the actual instance is of the type `String` + if (value.getActualInstance() instanceof String) { + JsonPrimitive primitive = + adapterString + .toJsonTree((String) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " Long, String"); + } + + @Override + public ContinuousContractKlineCandlestickDataItemInner read(JsonReader in) + throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize Long + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterLong; + match++; + log.log(Level.FINER, "Input data matches schema 'Long'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for Long failed with `%s`.", + e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Long'", e); + } + // deserialize String + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterString; + match++; + log.log(Level.FINER, "Input data matches schema 'String'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for String failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'String'", + e); + } + + if (match == 1) { + ContinuousContractKlineCandlestickDataItemInner ret = + new ContinuousContractKlineCandlestickDataItemInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for" + + " ContinuousContractKlineCandlestickDataItemInner:" + + " %d classes match result, expected 1. Detailed" + + " failure message for oneOf schemas: %s. JSON:" + + " %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public ContinuousContractKlineCandlestickDataItemInner() { + super("oneOf", Boolean.FALSE); + } + + public ContinuousContractKlineCandlestickDataItemInner(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Long", Long.class); + schemas.put("String", String.class); + } + + @Override + public Map> getSchemas() { + return ContinuousContractKlineCandlestickDataItemInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: Long, String + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof Long) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof String) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Long, String"); + } + + /** + * Get the actual instance, which can be the following: Long, String + * + * @return The actual instance (Long, String) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Long`. If the actual instance is not `Long`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `Long` + * @throws ClassCastException if the instance is not `Long` + */ + public Long getLong() throws ClassCastException { + return (Long) super.getActualInstance(); + } + + /** + * Get the actual instance of `String`. If the actual instance is not `String`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String) super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ContinuousContractKlineCandlestickDataItemInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with Long + try { + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for Long failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with String + try { + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for String failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for" + + " ContinuousContractKlineCandlestickDataItemInner with oneOf" + + " schemas: Long, String. %d class(es) match the result, expected" + + " 1. Detailed failure message for oneOf schemas: %s. JSON: %s", + validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of ContinuousContractKlineCandlestickDataItemInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ContinuousContractKlineCandlestickDataItemInner + * @throws IOException if the JSON string is invalid with respect to + * ContinuousContractKlineCandlestickDataItemInner + */ + public static ContinuousContractKlineCandlestickDataItemInner fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, ContinuousContractKlineCandlestickDataItemInner.class); + } + + /** + * Convert an instance of ContinuousContractKlineCandlestickDataItemInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContinuousContractKlineCandlestickDataResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContinuousContractKlineCandlestickDataResponse.java index 375ebf47d..ffd923de7 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContinuousContractKlineCandlestickDataResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContinuousContractKlineCandlestickDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,9 +34,9 @@ /** ContinuousContractKlineCandlestickDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ContinuousContractKlineCandlestickDataResponse - extends ArrayList { + extends ArrayList { public ContinuousContractKlineCandlestickDataResponse() {} @Override @@ -118,7 +118,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - ContinuousContractKlineCandlestickDataResponseItem.validateJsonElement(element); + ContinuousContractKlineCandlestickDataItem.validateJsonElement(element); } if (jsonElement == null) { if (!ContinuousContractKlineCandlestickDataResponse.openapiRequiredFields diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContinuousContractKlineCandlestickDataResponseItem.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContinuousContractKlineCandlestickDataResponseItem.java deleted file mode 100644 index 2a4bc794d..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContinuousContractKlineCandlestickDataResponseItem.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** ContinuousContractKlineCandlestickDataResponseItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ContinuousContractKlineCandlestickDataResponseItem extends ArrayList { - public ContinuousContractKlineCandlestickDataResponseItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ContinuousContractKlineCandlestickDataResponseItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ContinuousContractKlineCandlestickDataResponseItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - ContinuousContractKlineCandlestickDataResponseItemInner.validateJsonElement(element); - } - if (jsonElement == null) { - if (!ContinuousContractKlineCandlestickDataResponseItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " ContinuousContractKlineCandlestickDataResponseItem is not" - + " found in the empty JSON string", - ContinuousContractKlineCandlestickDataResponseItem - .openapiRequiredFields - .toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ContinuousContractKlineCandlestickDataResponseItem.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'ContinuousContractKlineCandlestickDataResponseItem' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, - TypeToken.get( - ContinuousContractKlineCandlestickDataResponseItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, - ContinuousContractKlineCandlestickDataResponseItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public ContinuousContractKlineCandlestickDataResponseItem read( - JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ContinuousContractKlineCandlestickDataResponseItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of ContinuousContractKlineCandlestickDataResponseItem - * @throws IOException if the JSON string is invalid with respect to - * ContinuousContractKlineCandlestickDataResponseItem - */ - public static ContinuousContractKlineCandlestickDataResponseItem fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, ContinuousContractKlineCandlestickDataResponseItem.class); - } - - /** - * Convert an instance of ContinuousContractKlineCandlestickDataResponseItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContinuousContractKlineCandlestickDataResponseItemInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContinuousContractKlineCandlestickDataResponseItemInner.java deleted file mode 100644 index 15adeed06..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContinuousContractKlineCandlestickDataResponseItemInner.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; - -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonPrimitive; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ContinuousContractKlineCandlestickDataResponseItemInner extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger( - ContinuousContractKlineCandlestickDataResponseItemInner.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ContinuousContractKlineCandlestickDataResponseItemInner.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'ContinuousContractKlineCandlestickDataResponseItemInner' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterLong = - gson.getDelegateAdapter(this, TypeToken.get(Long.class)); - final TypeAdapter adapterString = - gson.getDelegateAdapter(this, TypeToken.get(String.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, - ContinuousContractKlineCandlestickDataResponseItemInner value) - throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `Long` - if (value.getActualInstance() instanceof Long) { - JsonPrimitive primitive = - adapterLong - .toJsonTree((Long) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - // check if the actual instance is of the type `String` - if (value.getActualInstance() instanceof String) { - JsonPrimitive primitive = - adapterString - .toJsonTree((String) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " Long, String"); - } - - @Override - public ContinuousContractKlineCandlestickDataResponseItemInner read( - JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize Long - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterLong; - match++; - log.log(Level.FINER, "Input data matches schema 'Long'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for Long failed with `%s`.", - e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Long'", e); - } - // deserialize String - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterString; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for String failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'String'", - e); - } - - if (match == 1) { - ContinuousContractKlineCandlestickDataResponseItemInner ret = - new ContinuousContractKlineCandlestickDataResponseItemInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for" - + " ContinuousContractKlineCandlestickDataResponseItemInner:" - + " %d classes match result, expected 1. Detailed" - + " failure message for oneOf schemas: %s. JSON:" - + " %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public ContinuousContractKlineCandlestickDataResponseItemInner() { - super("oneOf", Boolean.FALSE); - } - - public ContinuousContractKlineCandlestickDataResponseItemInner(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Long", Long.class); - schemas.put("String", String.class); - } - - @Override - public Map> getSchemas() { - return ContinuousContractKlineCandlestickDataResponseItemInner.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Long, String - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof Long) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof String) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Long, String"); - } - - /** - * Get the actual instance, which can be the following: Long, String - * - * @return The actual instance (Long, String) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Long`. If the actual instance is not `Long`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Long` - * @throws ClassCastException if the instance is not `Long` - */ - public Long getLong() throws ClassCastException { - return (Long) super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ContinuousContractKlineCandlestickDataResponseItemInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Long - try { - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for Long failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with String - try { - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for String failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for" - + " ContinuousContractKlineCandlestickDataResponseItemInner with" - + " oneOf schemas: Long, String. %d class(es) match the result," - + " expected 1. Detailed failure message for oneOf schemas: %s." - + " JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of ContinuousContractKlineCandlestickDataResponseItemInner given an JSON - * string - * - * @param jsonString JSON string - * @return An instance of ContinuousContractKlineCandlestickDataResponseItemInner - * @throws IOException if the JSON string is invalid with respect to - * ContinuousContractKlineCandlestickDataResponseItemInner - */ - public static ContinuousContractKlineCandlestickDataResponseItemInner fromJson( - String jsonString) throws IOException { - return JSON.getGson() - .fromJson( - jsonString, ContinuousContractKlineCandlestickDataResponseItemInner.class); - } - - /** - * Convert an instance of ContinuousContractKlineCandlestickDataResponseItemInner to an JSON - * string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContractType.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContractType.java index 2f037627a..b2ccc2c37 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContractType.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ContractType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -24,17 +24,13 @@ /** Gets or Sets contractType */ @JsonAdapter(ContractType.Adapter.class) public enum ContractType { + ALL("ALL"), + PERPETUAL("PERPETUAL"), CURRENT_QUARTER("CURRENT_QUARTER"), - NEXT_QUARTER("NEXT_QUARTER"), - - CURRENT_QUARTER_DELIVERING("CURRENT_QUARTER_DELIVERING"), - - NEXT_QUARTER_DELIVERING("NEXT_QUARTER_DELIVERING"), - - PERPETUAL_DELIVERING("PERPETUAL_DELIVERING"); + NEXT_QUARTER("NEXT_QUARTER"); private String value; diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CurrentAllOpenOrdersResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CurrentAllOpenOrdersResponse.java index d72194ebf..6e8c43e3d 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CurrentAllOpenOrdersResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/CurrentAllOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CurrentAllOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CurrentAllOpenOrdersResponse extends ArrayList { public CurrentAllOpenOrdersResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ExchangeInformationResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ExchangeInformationResponse.java index 121e63a76..c5bda8ea1 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ExchangeInformationResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ExchangeInformationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** ExchangeInformationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInformationResponse { public static final String SERIALIZED_NAME_EXCHANGE_FILTERS = "exchangeFilters"; @@ -89,7 +89,7 @@ public ExchangeInformationResponse addExchangeFiltersItem(String exchangeFilters } /** - * Get exchangeFilters + * Exchange filters. * * @return exchangeFilters */ @@ -119,7 +119,7 @@ public ExchangeInformationResponse addRateLimitsItem( } /** - * Get rateLimits + * Rate limit definitions. * * @return rateLimits */ @@ -141,7 +141,8 @@ public ExchangeInformationResponse serverTime(@jakarta.annotation.Nullable Long } /** - * Get serverTime + * Ignore please. If you want to check current server time, please check via \"GET + * /dapi/v1/time\" * * @return serverTime */ @@ -171,7 +172,7 @@ public ExchangeInformationResponse addSymbolsItem( } /** - * Get symbols + * Supported trading symbols. * * @return symbols */ @@ -193,7 +194,7 @@ public ExchangeInformationResponse timezone(@jakarta.annotation.Nullable String } /** - * Get timezone + * Timezone of market data. * * @return timezone */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ExchangeInformationResponseRateLimitsInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ExchangeInformationResponseRateLimitsInner.java index d0c25b32e..005a10b59 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ExchangeInformationResponseRateLimitsInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ExchangeInformationResponseRateLimitsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ExchangeInformationResponseRateLimitsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInformationResponseRateLimitsInner { public static final String SERIALIZED_NAME_INTERVAL = "interval"; @@ -69,7 +69,7 @@ public ExchangeInformationResponseRateLimitsInner interval( } /** - * Get interval + * Rate limit interval. * * @return interval */ @@ -89,7 +89,7 @@ public ExchangeInformationResponseRateLimitsInner intervalNum( } /** - * Get intervalNum + * Rate limit interval multiplier. * * @return intervalNum */ @@ -109,7 +109,7 @@ public ExchangeInformationResponseRateLimitsInner limit( } /** - * Get limit + * Maximum allowed orders for this rule. * * @return limit */ @@ -129,7 +129,7 @@ public ExchangeInformationResponseRateLimitsInner rateLimitType( } /** - * Get rateLimitType + * Rate limit type. * * @return rateLimitType */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ExchangeInformationResponseSymbolsInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ExchangeInformationResponseSymbolsInner.java index 2cfec841d..946125b86 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ExchangeInformationResponseSymbolsInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ExchangeInformationResponseSymbolsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** ExchangeInformationResponseSymbolsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInformationResponseSymbolsInner { public static final String SERIALIZED_NAME_FILTERS = "filters"; @@ -211,7 +211,7 @@ public ExchangeInformationResponseSymbolsInner addFiltersItem( } /** - * Get filters + * Trading filters and constraints. * * @return filters */ @@ -242,7 +242,7 @@ public ExchangeInformationResponseSymbolsInner addOrderTypesItem(String orderTyp } /** - * Get orderTypes + * Supported order types. * * @return orderTypes */ @@ -270,7 +270,7 @@ public ExchangeInformationResponseSymbolsInner addTimeInForceItem(String timeInF } /** - * Get timeInForce + * Time in force * * @return timeInForce */ @@ -290,7 +290,7 @@ public ExchangeInformationResponseSymbolsInner liquidationFee( } /** - * Get liquidationFee + * liquidation fee rate * * @return liquidationFee */ @@ -310,7 +310,7 @@ public ExchangeInformationResponseSymbolsInner marketTakeBound( } /** - * Get marketTakeBound + * the max price difference rate( from mark price) a market order can make * * @return marketTakeBound */ @@ -330,7 +330,7 @@ public ExchangeInformationResponseSymbolsInner symbol( } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -349,7 +349,7 @@ public ExchangeInformationResponseSymbolsInner pair(@jakarta.annotation.Nullable } /** - * Get pair + * Pair * * @return pair */ @@ -369,7 +369,7 @@ public ExchangeInformationResponseSymbolsInner contractType( } /** - * Get contractType + * Contract type. * * @return contractType */ @@ -389,7 +389,7 @@ public ExchangeInformationResponseSymbolsInner deliveryDate( } /** - * Get deliveryDate + * Delivery timestamp. * * @return deliveryDate */ @@ -409,7 +409,7 @@ public ExchangeInformationResponseSymbolsInner onboardDate( } /** - * Get onboardDate + * Onboard timestamp. * * @return onboardDate */ @@ -429,7 +429,7 @@ public ExchangeInformationResponseSymbolsInner contractStatus( } /** - * Get contractStatus + * Contract status. * * @return contractStatus */ @@ -449,7 +449,7 @@ public ExchangeInformationResponseSymbolsInner contractSize( } /** - * Get contractSize + * Contract size. * * @return contractSize */ @@ -469,7 +469,7 @@ public ExchangeInformationResponseSymbolsInner quoteAsset( } /** - * Get quoteAsset + * Quote asset symbol. * * @return quoteAsset */ @@ -489,7 +489,7 @@ public ExchangeInformationResponseSymbolsInner baseAsset( } /** - * Get baseAsset + * Base asset symbol. * * @return baseAsset */ @@ -509,7 +509,7 @@ public ExchangeInformationResponseSymbolsInner marginAsset( } /** - * Get marginAsset + * Margin asset. * * @return marginAsset */ @@ -529,7 +529,7 @@ public ExchangeInformationResponseSymbolsInner pricePrecision( } /** - * Get pricePrecision + * please do not use it as tickSize * * @return pricePrecision */ @@ -549,7 +549,7 @@ public ExchangeInformationResponseSymbolsInner quantityPrecision( } /** - * Get quantityPrecision + * please do not use it as stepSize * * @return quantityPrecision */ @@ -569,7 +569,7 @@ public ExchangeInformationResponseSymbolsInner baseAssetPrecision( } /** - * Get baseAssetPrecision + * Base asset precision. * * @return baseAssetPrecision */ @@ -589,7 +589,7 @@ public ExchangeInformationResponseSymbolsInner quotePrecision( } /** - * Get quotePrecision + * Quote asset precision. * * @return quotePrecision */ @@ -609,7 +609,7 @@ public ExchangeInformationResponseSymbolsInner equalQtyPrecision( } /** - * Get equalQtyPrecision + * ignore * * @return equalQtyPrecision */ @@ -629,7 +629,7 @@ public ExchangeInformationResponseSymbolsInner triggerProtect( } /** - * Get triggerProtect + * threshold for algo order with \"priceProtect\" * * @return triggerProtect */ @@ -649,7 +649,7 @@ public ExchangeInformationResponseSymbolsInner maintMarginPercent( } /** - * Get maintMarginPercent + * ignore * * @return maintMarginPercent */ @@ -669,7 +669,7 @@ public ExchangeInformationResponseSymbolsInner requiredMarginPercent( } /** - * Get requiredMarginPercent + * ignore * * @return requiredMarginPercent */ @@ -690,7 +690,7 @@ public ExchangeInformationResponseSymbolsInner underlyingType( } /** - * Get underlyingType + * Underlying asset type. * * @return underlyingType */ @@ -719,7 +719,7 @@ public ExchangeInformationResponseSymbolsInner addUnderlyingSubTypeItem( } /** - * Get underlyingSubType + * Underlying asset sub-type. * * @return underlyingSubType */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ExchangeInformationResponseSymbolsInnerFiltersInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ExchangeInformationResponseSymbolsInnerFiltersInner.java index 4ab07d7d1..314acceff 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ExchangeInformationResponseSymbolsInnerFiltersInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ExchangeInformationResponseSymbolsInnerFiltersInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ExchangeInformationResponseSymbolsInnerFiltersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInformationResponseSymbolsInnerFiltersInner { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; @@ -111,7 +111,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner filterType( } /** - * Get filterType + * Filter type. * * @return filterType */ @@ -131,7 +131,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner maxPrice( } /** - * Get maxPrice + * Maximum price. * * @return maxPrice */ @@ -151,7 +151,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner minPrice( } /** - * Get minPrice + * Minimum price. * * @return minPrice */ @@ -171,7 +171,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner tickSize( } /** - * Get tickSize + * Tick size. * * @return tickSize */ @@ -191,7 +191,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner maxQty( } /** - * Get maxQty + * maximum quantity of base asset * * @return maxQty */ @@ -211,7 +211,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner minQty( } /** - * Get minQty + * Minimum quantity. * * @return minQty */ @@ -231,7 +231,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner stepSize( } /** - * Get stepSize + * Step size. * * @return stepSize */ @@ -251,7 +251,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner limit( } /** - * Get limit + * Maximum allowed orders for this rule. * * @return limit */ @@ -271,7 +271,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner multiplierUp( } /** - * Get multiplierUp + * Upper multiplier bound. * * @return multiplierUp */ @@ -291,7 +291,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner multiplierDown( } /** - * Get multiplierDown + * Lower multiplier bound. * * @return multiplierDown */ @@ -311,7 +311,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner multiplierDecimal( } /** - * Get multiplierDecimal + * Multiplier decimal precision. * * @return multiplierDecimal */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/FuturesAccountBalanceResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/FuturesAccountBalanceResponse.java index 5dba5c214..f0f207c01 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/FuturesAccountBalanceResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/FuturesAccountBalanceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FuturesAccountBalanceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesAccountBalanceResponse extends ArrayList { public FuturesAccountBalanceResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/FuturesAccountBalanceResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/FuturesAccountBalanceResponseInner.java index 2f0111989..c6d2d5124 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/FuturesAccountBalanceResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/FuturesAccountBalanceResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FuturesAccountBalanceResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesAccountBalanceResponseInner { public static final String SERIALIZED_NAME_ACCOUNT_ALIAS = "accountAlias"; @@ -93,7 +93,7 @@ public FuturesAccountBalanceResponseInner accountAlias( } /** - * Get accountAlias + * unique account code * * @return accountAlias */ @@ -112,7 +112,7 @@ public FuturesAccountBalanceResponseInner asset(@jakarta.annotation.Nullable Str } /** - * Get asset + * asset name * * @return asset */ @@ -131,7 +131,7 @@ public FuturesAccountBalanceResponseInner balance(@jakarta.annotation.Nullable S } /** - * Get balance + * Account balance. * * @return balance */ @@ -151,7 +151,7 @@ public FuturesAccountBalanceResponseInner withdrawAvailable( } /** - * Get withdrawAvailable + * Available amount for withdrawal. * * @return withdrawAvailable */ @@ -171,7 +171,7 @@ public FuturesAccountBalanceResponseInner crossWalletBalance( } /** - * Get crossWalletBalance + * wallet balance for crossed margin * * @return crossWalletBalance */ @@ -191,7 +191,7 @@ public FuturesAccountBalanceResponseInner crossUnPnl( } /** - * Get crossUnPnl + * total unrealized profit or loss of crossed positions * * @return crossUnPnl */ @@ -211,7 +211,7 @@ public FuturesAccountBalanceResponseInner availableBalance( } /** - * Get availableBalance + * available margin balance * * @return availableBalance */ @@ -231,7 +231,7 @@ public FuturesAccountBalanceResponseInner updateTime( } /** - * Get updateTime + * update time * * @return updateTime */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetCurrentPositionModeResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetCurrentPositionModeResponse.java index 24f532b63..4e9af382c 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetCurrentPositionModeResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetCurrentPositionModeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetCurrentPositionModeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCurrentPositionModeResponse { public static final String SERIALIZED_NAME_DUAL_SIDE_POSITION = "dualSidePosition"; @@ -51,7 +51,7 @@ public GetCurrentPositionModeResponse dualSidePosition( } /** - * Get dualSidePosition + * Whether dual-side position mode is enabled. * * @return dualSidePosition */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetDownloadIdForFuturesOrderHistoryResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetDownloadIdForFuturesOrderHistoryResponse.java index 0bc7414f3..e6f54517e 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetDownloadIdForFuturesOrderHistoryResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetDownloadIdForFuturesOrderHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetDownloadIdForFuturesOrderHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDownloadIdForFuturesOrderHistoryResponse { public static final String SERIALIZED_NAME_AVG_COST_TIMESTAMP_OF_LAST30D = "avgCostTimestampOfLast30d"; @@ -58,7 +58,7 @@ public GetDownloadIdForFuturesOrderHistoryResponse avgCostTimestampOfLast30d( } /** - * Get avgCostTimestampOfLast30d + * Average time taken for data download in the past 30 days * * @return avgCostTimestampOfLast30d */ @@ -79,7 +79,7 @@ public GetDownloadIdForFuturesOrderHistoryResponse downloadId( } /** - * Get downloadId + * Download task ID. * * @return downloadId */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetDownloadIdForFuturesTradeHistoryResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetDownloadIdForFuturesTradeHistoryResponse.java index 34e8e1db3..9eaff4ab9 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetDownloadIdForFuturesTradeHistoryResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetDownloadIdForFuturesTradeHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetDownloadIdForFuturesTradeHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDownloadIdForFuturesTradeHistoryResponse { public static final String SERIALIZED_NAME_AVG_COST_TIMESTAMP_OF_LAST30D = "avgCostTimestampOfLast30d"; @@ -58,7 +58,7 @@ public GetDownloadIdForFuturesTradeHistoryResponse avgCostTimestampOfLast30d( } /** - * Get avgCostTimestampOfLast30d + * Average time taken for data download in the past 30 days * * @return avgCostTimestampOfLast30d */ @@ -79,7 +79,7 @@ public GetDownloadIdForFuturesTradeHistoryResponse downloadId( } /** - * Get downloadId + * Download task ID. * * @return downloadId */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetDownloadIdForFuturesTransactionHistoryResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetDownloadIdForFuturesTransactionHistoryResponse.java index 683e614dc..0e2febc49 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetDownloadIdForFuturesTransactionHistoryResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetDownloadIdForFuturesTransactionHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetDownloadIdForFuturesTransactionHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDownloadIdForFuturesTransactionHistoryResponse { public static final String SERIALIZED_NAME_AVG_COST_TIMESTAMP_OF_LAST30D = "avgCostTimestampOfLast30d"; @@ -58,7 +58,7 @@ public GetDownloadIdForFuturesTransactionHistoryResponse avgCostTimestampOfLast3 } /** - * Get avgCostTimestampOfLast30d + * Average time taken for data download in the past 30 days * * @return avgCostTimestampOfLast30d */ @@ -79,7 +79,7 @@ public GetDownloadIdForFuturesTransactionHistoryResponse downloadId( } /** - * Get downloadId + * Download task ID. * * @return downloadId */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFundingRateHistoryOfPerpetualFuturesResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFundingRateHistoryOfPerpetualFuturesResponse.java index 6f1251204..0f00bc24b 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFundingRateHistoryOfPerpetualFuturesResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFundingRateHistoryOfPerpetualFuturesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFundingRateHistoryOfPerpetualFuturesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFundingRateHistoryOfPerpetualFuturesResponse extends ArrayList { public GetFundingRateHistoryOfPerpetualFuturesResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFundingRateHistoryOfPerpetualFuturesResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFundingRateHistoryOfPerpetualFuturesResponseInner.java index eb76be19a..4774457c2 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFundingRateHistoryOfPerpetualFuturesResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFundingRateHistoryOfPerpetualFuturesResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFundingRateHistoryOfPerpetualFuturesResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFundingRateHistoryOfPerpetualFuturesResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public GetFundingRateHistoryOfPerpetualFuturesResponseInner symbol( } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -83,7 +83,7 @@ public GetFundingRateHistoryOfPerpetualFuturesResponseInner fundingTime( } /** - * Get fundingTime + * Funding time. * * @return fundingTime */ @@ -103,7 +103,7 @@ public GetFundingRateHistoryOfPerpetualFuturesResponseInner fundingRate( } /** - * Get fundingRate + * Funding rate. * * @return fundingRate */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFundingRateInfoResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFundingRateInfoResponse.java index fa9d8c576..6927411df 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFundingRateInfoResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFundingRateInfoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFundingRateInfoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFundingRateInfoResponse extends ArrayList { public GetFundingRateInfoResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFundingRateInfoResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFundingRateInfoResponseInner.java index 78cf760f4..af9a6c93a 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFundingRateInfoResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFundingRateInfoResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFundingRateInfoResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFundingRateInfoResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -75,7 +75,7 @@ public GetFundingRateInfoResponseInner symbol(@jakarta.annotation.Nullable Strin } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -95,7 +95,7 @@ public GetFundingRateInfoResponseInner adjustedFundingRateCap( } /** - * Get adjustedFundingRateCap + * Adjusted funding rate cap. * * @return adjustedFundingRateCap */ @@ -116,7 +116,7 @@ public GetFundingRateInfoResponseInner adjustedFundingRateFloor( } /** - * Get adjustedFundingRateFloor + * Adjusted funding rate floor. * * @return adjustedFundingRateFloor */ @@ -137,7 +137,7 @@ public GetFundingRateInfoResponseInner fundingIntervalHours( } /** - * Get fundingIntervalHours + * Funding interval in hours. * * @return fundingIntervalHours */ @@ -157,7 +157,7 @@ public GetFundingRateInfoResponseInner disclaimer( } /** - * Get disclaimer + * Disclaimer text. * * @return disclaimer */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFuturesOrderHistoryDownloadLinkByIdResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFuturesOrderHistoryDownloadLinkByIdResponse.java index a45f22652..9a8c9c687 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFuturesOrderHistoryDownloadLinkByIdResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFuturesOrderHistoryDownloadLinkByIdResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFuturesOrderHistoryDownloadLinkByIdResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFuturesOrderHistoryDownloadLinkByIdResponse { public static final String SERIALIZED_NAME_DOWNLOAD_ID = "downloadId"; @@ -81,7 +81,7 @@ public GetFuturesOrderHistoryDownloadLinkByIdResponse downloadId( } /** - * Get downloadId + * Download task ID. * * @return downloadId */ @@ -101,7 +101,7 @@ public GetFuturesOrderHistoryDownloadLinkByIdResponse status( } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -121,7 +121,7 @@ public GetFuturesOrderHistoryDownloadLinkByIdResponse url( } /** - * Get url + * The link is mapped to download id * * @return url */ @@ -141,7 +141,7 @@ public GetFuturesOrderHistoryDownloadLinkByIdResponse notified( } /** - * Get notified + * ignore * * @return notified */ @@ -161,7 +161,7 @@ public GetFuturesOrderHistoryDownloadLinkByIdResponse expirationTimestamp( } /** - * Get expirationTimestamp + * The link would expire after this timestamp * * @return expirationTimestamp */ @@ -181,7 +181,7 @@ public GetFuturesOrderHistoryDownloadLinkByIdResponse isExpired( } /** - * Get isExpired + * Whether the record is expired. * * @return isExpired */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFuturesTradeDownloadLinkByIdResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFuturesTradeDownloadLinkByIdResponse.java index 18cd172fc..307b87b00 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFuturesTradeDownloadLinkByIdResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFuturesTradeDownloadLinkByIdResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFuturesTradeDownloadLinkByIdResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFuturesTradeDownloadLinkByIdResponse { public static final String SERIALIZED_NAME_DOWNLOAD_ID = "downloadId"; @@ -81,7 +81,7 @@ public GetFuturesTradeDownloadLinkByIdResponse downloadId( } /** - * Get downloadId + * Download task ID. * * @return downloadId */ @@ -101,7 +101,7 @@ public GetFuturesTradeDownloadLinkByIdResponse status( } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -120,7 +120,7 @@ public GetFuturesTradeDownloadLinkByIdResponse url(@jakarta.annotation.Nullable } /** - * Get url + * The link is mapped to download id * * @return url */ @@ -140,7 +140,7 @@ public GetFuturesTradeDownloadLinkByIdResponse notified( } /** - * Get notified + * ignore * * @return notified */ @@ -160,7 +160,7 @@ public GetFuturesTradeDownloadLinkByIdResponse expirationTimestamp( } /** - * Get expirationTimestamp + * The link would expire after this timestamp * * @return expirationTimestamp */ @@ -180,7 +180,7 @@ public GetFuturesTradeDownloadLinkByIdResponse isExpired( } /** - * Get isExpired + * Whether the record is expired. * * @return isExpired */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFuturesTransactionHistoryDownloadLinkByIdResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFuturesTransactionHistoryDownloadLinkByIdResponse.java index 5b56d461a..5e51b7504 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFuturesTransactionHistoryDownloadLinkByIdResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetFuturesTransactionHistoryDownloadLinkByIdResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFuturesTransactionHistoryDownloadLinkByIdResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFuturesTransactionHistoryDownloadLinkByIdResponse { public static final String SERIALIZED_NAME_DOWNLOAD_ID = "downloadId"; @@ -81,7 +81,7 @@ public GetFuturesTransactionHistoryDownloadLinkByIdResponse downloadId( } /** - * Get downloadId + * Download task ID. * * @return downloadId */ @@ -101,7 +101,7 @@ public GetFuturesTransactionHistoryDownloadLinkByIdResponse status( } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -121,7 +121,7 @@ public GetFuturesTransactionHistoryDownloadLinkByIdResponse url( } /** - * Get url + * The link is mapped to download id * * @return url */ @@ -141,7 +141,7 @@ public GetFuturesTransactionHistoryDownloadLinkByIdResponse notified( } /** - * Get notified + * ignore * * @return notified */ @@ -161,7 +161,7 @@ public GetFuturesTransactionHistoryDownloadLinkByIdResponse expirationTimestamp( } /** - * Get expirationTimestamp + * The link would expire after this timestamp * * @return expirationTimestamp */ @@ -181,7 +181,7 @@ public GetFuturesTransactionHistoryDownloadLinkByIdResponse isExpired( } /** - * Get isExpired + * Whether the record is expired. * * @return isExpired */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetIncomeHistoryResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetIncomeHistoryResponse.java index 4830ff340..87b898562 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetIncomeHistoryResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetIncomeHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetIncomeHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetIncomeHistoryResponse extends ArrayList { public GetIncomeHistoryResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetIncomeHistoryResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetIncomeHistoryResponseInner.java index 143c277fa..d0a85775f 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetIncomeHistoryResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetIncomeHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetIncomeHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetIncomeHistoryResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -92,7 +92,7 @@ public GetIncomeHistoryResponseInner symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -112,7 +112,7 @@ public GetIncomeHistoryResponseInner incomeType( } /** - * Get incomeType + * income type * * @return incomeType */ @@ -131,7 +131,7 @@ public GetIncomeHistoryResponseInner income(@jakarta.annotation.Nullable String } /** - * Get income + * income amount * * @return income */ @@ -150,7 +150,7 @@ public GetIncomeHistoryResponseInner asset(@jakarta.annotation.Nullable String a } /** - * Get asset + * asset name * * @return asset */ @@ -169,7 +169,7 @@ public GetIncomeHistoryResponseInner info(@jakarta.annotation.Nullable String in } /** - * Get info + * extra information * * @return info */ @@ -188,7 +188,7 @@ public GetIncomeHistoryResponseInner time(@jakarta.annotation.Nullable Long time } /** - * Get time + * Time * * @return time */ @@ -207,7 +207,7 @@ public GetIncomeHistoryResponseInner tranId(@jakarta.annotation.Nullable String } /** - * Get tranId + * transaction id * * @return tranId */ @@ -226,7 +226,7 @@ public GetIncomeHistoryResponseInner tradeId(@jakarta.annotation.Nullable String } /** - * Get tradeId + * Trade ID. * * @return tradeId */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponse.java index c48f3b4cc..202a78cad 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetOrderModifyHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOrderModifyHistoryResponse extends ArrayList { public GetOrderModifyHistoryResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponseInner.java index fefd2b332..6845c1c21 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetOrderModifyHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOrderModifyHistoryResponseInner { public static final String SERIALIZED_NAME_AMENDMENT_ID = "amendmentId"; @@ -88,7 +88,7 @@ public GetOrderModifyHistoryResponseInner amendmentId( } /** - * Get amendmentId + * Order modification ID * * @return amendmentId */ @@ -107,7 +107,7 @@ public GetOrderModifyHistoryResponseInner symbol(@jakarta.annotation.Nullable St } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -126,7 +126,7 @@ public GetOrderModifyHistoryResponseInner pair(@jakarta.annotation.Nullable Stri } /** - * Get pair + * Pair * * @return pair */ @@ -145,7 +145,7 @@ public GetOrderModifyHistoryResponseInner orderId(@jakarta.annotation.Nullable L } /** - * Get orderId + * Sub-order ID * * @return orderId */ @@ -165,7 +165,7 @@ public GetOrderModifyHistoryResponseInner clientOrderId( } /** - * Get clientOrderId + * Client order ID. * * @return clientOrderId */ @@ -184,7 +184,7 @@ public GetOrderModifyHistoryResponseInner time(@jakarta.annotation.Nullable Long } /** - * Get time + * Time * * @return time */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendment.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendment.java index 9e1e5bf24..50f96d65a 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendment.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendment.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -32,10 +32,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** GetOrderModifyHistoryResponseInnerAmendment */ +/** Order amendment details. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOrderModifyHistoryResponseInnerAmendment { public static final String SERIALIZED_NAME_PRICE = "price"; @@ -55,6 +55,12 @@ public class GetOrderModifyHistoryResponseInnerAmendment { @jakarta.annotation.Nullable private Long count; + public static final String SERIALIZED_NAME_MODIFY_ID = "modifyId"; + + @SerializedName(SERIALIZED_NAME_MODIFY_ID) + @jakarta.annotation.Nullable + private Long modifyId; + public GetOrderModifyHistoryResponseInnerAmendment() {} public GetOrderModifyHistoryResponseInnerAmendment price( @@ -110,7 +116,7 @@ public GetOrderModifyHistoryResponseInnerAmendment count( } /** - * Get count + * Total number of trades in the 24h window. * * @return count */ @@ -123,6 +129,26 @@ public void setCount(@jakarta.annotation.Nullable Long count) { this.count = count; } + public GetOrderModifyHistoryResponseInnerAmendment modifyId( + @jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + return this; + } + + /** + * user-defined modification identifier, only returned if provided in the request + * + * @return modifyId + */ + @jakarta.annotation.Nullable + public Long getModifyId() { + return modifyId; + } + + public void setModifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -135,12 +161,14 @@ public boolean equals(Object o) { (GetOrderModifyHistoryResponseInnerAmendment) o; return Objects.equals(this.price, getOrderModifyHistoryResponseInnerAmendment.price) && Objects.equals(this.origQty, getOrderModifyHistoryResponseInnerAmendment.origQty) - && Objects.equals(this.count, getOrderModifyHistoryResponseInnerAmendment.count); + && Objects.equals(this.count, getOrderModifyHistoryResponseInnerAmendment.count) + && Objects.equals( + this.modifyId, getOrderModifyHistoryResponseInnerAmendment.modifyId); } @Override public int hashCode() { - return Objects.hash(price, origQty, count); + return Objects.hash(price, origQty, count, modifyId); } @Override @@ -150,6 +178,7 @@ public String toString() { sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" modifyId: ").append(toIndentedString(modifyId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -169,6 +198,10 @@ public String toUrlQueryString() { String countValueAsString = ""; countValueAsString = countValue.toString(); sb.append("count=").append(urlEncode(countValueAsString)).append(""); + Object modifyIdValue = getModifyId(); + String modifyIdValueAsString = ""; + modifyIdValueAsString = modifyIdValue.toString(); + sb.append("modifyId=").append(urlEncode(modifyIdValueAsString)).append(""); return sb.toString(); } @@ -200,6 +233,7 @@ private String toIndentedString(Object o) { openapiFields.add("price"); openapiFields.add("origQty"); openapiFields.add("count"); + openapiFields.add("modifyId"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendmentOrigQty.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendmentOrigQty.java index 630672637..7fe721d1d 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendmentOrigQty.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendmentOrigQty.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** GetOrderModifyHistoryResponseInnerAmendmentOrigQty */ +/** Original order quantity */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOrderModifyHistoryResponseInnerAmendmentOrigQty { public static final String SERIALIZED_NAME_BEFORE = "before"; @@ -57,7 +57,7 @@ public GetOrderModifyHistoryResponseInnerAmendmentOrigQty before( } /** - * Get before + * Before value. * * @return before */ @@ -77,7 +77,7 @@ public GetOrderModifyHistoryResponseInnerAmendmentOrigQty after( } /** - * Get after + * After value. * * @return after */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendmentPrice.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendmentPrice.java index ec4748a5c..ece94d6c5 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendmentPrice.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendmentPrice.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** GetOrderModifyHistoryResponseInnerAmendmentPrice */ +/** Latest token price. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOrderModifyHistoryResponseInnerAmendmentPrice { public static final String SERIALIZED_NAME_BEFORE = "before"; @@ -57,7 +57,7 @@ public GetOrderModifyHistoryResponseInnerAmendmentPrice before( } /** - * Get before + * Before value. * * @return before */ @@ -77,7 +77,7 @@ public GetOrderModifyHistoryResponseInnerAmendmentPrice after( } /** - * Get after + * After value. * * @return after */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetPositionMarginChangeHistoryResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetPositionMarginChangeHistoryResponse.java index a35b7cb20..a66cbfbda 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetPositionMarginChangeHistoryResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetPositionMarginChangeHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetPositionMarginChangeHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetPositionMarginChangeHistoryResponse extends ArrayList { public GetPositionMarginChangeHistoryResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetPositionMarginChangeHistoryResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetPositionMarginChangeHistoryResponseInner.java index aeea9418b..0277c2b1d 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetPositionMarginChangeHistoryResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/GetPositionMarginChangeHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetPositionMarginChangeHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetPositionMarginChangeHistoryResponseInner { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -81,7 +81,7 @@ public GetPositionMarginChangeHistoryResponseInner amount( } /** - * Get amount + * Amount. * * @return amount */ @@ -101,7 +101,7 @@ public GetPositionMarginChangeHistoryResponseInner asset( } /** - * Get asset + * asset name * * @return asset */ @@ -121,7 +121,7 @@ public GetPositionMarginChangeHistoryResponseInner symbol( } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -141,7 +141,7 @@ public GetPositionMarginChangeHistoryResponseInner time( } /** - * Get time + * Time * * @return time */ @@ -161,7 +161,7 @@ public GetPositionMarginChangeHistoryResponseInner type( } /** - * Get type + * Order type. * * @return type */ @@ -181,7 +181,7 @@ public GetPositionMarginChangeHistoryResponseInner positionSide( } /** - * Get positionSide + * Position side * * @return positionSide */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IncomeType.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IncomeType.java new file mode 100644 index 000000000..e69cd8dc8 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IncomeType.java @@ -0,0 +1,83 @@ +/* + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets incomeType */ +@JsonAdapter(IncomeType.Adapter.class) +public enum IncomeType { + TRANSFER("TRANSFER"), + + WELCOME_BONUS("WELCOME_BONUS"), + + FUNDING_FEE("FUNDING_FEE"), + + REALIZED_PNL("REALIZED_PNL"), + + COMMISSION("COMMISSION"), + + INSURANCE_CLEAR("INSURANCE_CLEAR"), + + DELIVERED_SETTELMENT("DELIVERED_SETTELMENT"); + + private String value; + + IncomeType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static IncomeType fromValue(String value) { + for (IncomeType b : IncomeType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final IncomeType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public IncomeType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return IncomeType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + IncomeType.fromValue(value); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceAndMarkPriceResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceAndMarkPriceResponse.java index 65c57d1d7..cbb51a030 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceAndMarkPriceResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceAndMarkPriceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** IndexPriceAndMarkPriceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndexPriceAndMarkPriceResponse extends ArrayList { public IndexPriceAndMarkPriceResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceAndMarkPriceResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceAndMarkPriceResponseInner.java index 02cda186c..6f88bb531 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceAndMarkPriceResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceAndMarkPriceResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** IndexPriceAndMarkPriceResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndexPriceAndMarkPriceResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -98,7 +98,7 @@ public IndexPriceAndMarkPriceResponseInner symbol(@jakarta.annotation.Nullable S } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -117,7 +117,7 @@ public IndexPriceAndMarkPriceResponseInner pair(@jakarta.annotation.Nullable Str } /** - * Get pair + * Pair * * @return pair */ @@ -137,7 +137,7 @@ public IndexPriceAndMarkPriceResponseInner markPrice( } /** - * Get markPrice + * mark price * * @return markPrice */ @@ -157,7 +157,7 @@ public IndexPriceAndMarkPriceResponseInner indexPrice( } /** - * Get indexPrice + * index price * * @return indexPrice */ @@ -177,7 +177,7 @@ public IndexPriceAndMarkPriceResponseInner estimatedSettlePrice( } /** - * Get estimatedSettlePrice + * Estimated Settle Price, only useful in the last hour before the settlement starts. * * @return estimatedSettlePrice */ @@ -197,7 +197,8 @@ public IndexPriceAndMarkPriceResponseInner lastFundingRate( } /** - * Get lastFundingRate + * the lasted funding rate, for perpetual contract symbols only. For delivery symbols, + * \"\" will be shown. * * @return lastFundingRate */ @@ -217,7 +218,8 @@ public IndexPriceAndMarkPriceResponseInner interestRate( } /** - * Get interestRate + * the base asset interest rate, for perpetual contract symbols only. For delivery symbols, + * \"\" will be shown. * * @return interestRate */ @@ -237,7 +239,7 @@ public IndexPriceAndMarkPriceResponseInner nextFundingTime( } /** - * Get nextFundingTime + * For perpetual contract symbols only. For delivery symbols, 0 will be shown * * @return nextFundingTime */ @@ -256,7 +258,7 @@ public IndexPriceAndMarkPriceResponseInner time(@jakarta.annotation.Nullable Lon } /** - * Get time + * Time * * @return time */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceKlineCandlestickDataItem.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceKlineCandlestickDataItem.java new file mode 100644 index 000000000..b2ccbfb8c --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceKlineCandlestickDataItem.java @@ -0,0 +1,189 @@ +/* + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** IndexPriceKlineCandlestickDataItem */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class IndexPriceKlineCandlestickDataItem extends ArrayList { + public IndexPriceKlineCandlestickDataItem() {} + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IndexPriceKlineCandlestickDataItem {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * IndexPriceKlineCandlestickDataItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be a array type in the JSON string but got" + + " `%s`", + jsonElement.toString())); + } + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for (JsonElement element : array) { + IndexPriceKlineCandlestickDataItemInner.validateJsonElement(element); + } + if (jsonElement == null) { + if (!IndexPriceKlineCandlestickDataItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in IndexPriceKlineCandlestickDataItem is" + + " not found in the empty JSON string", + IndexPriceKlineCandlestickDataItem.openapiRequiredFields + .toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!IndexPriceKlineCandlestickDataItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IndexPriceKlineCandlestickDataItem' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(IndexPriceKlineCandlestickDataItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, IndexPriceKlineCandlestickDataItem value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); + elementAdapter.write(out, obj); + } + + @Override + public IndexPriceKlineCandlestickDataItem read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of IndexPriceKlineCandlestickDataItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of IndexPriceKlineCandlestickDataItem + * @throws IOException if the JSON string is invalid with respect to + * IndexPriceKlineCandlestickDataItem + */ + public static IndexPriceKlineCandlestickDataItem fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, IndexPriceKlineCandlestickDataItem.class); + } + + /** + * Convert an instance of IndexPriceKlineCandlestickDataItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceKlineCandlestickDataItemInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceKlineCandlestickDataItemInner.java new file mode 100644 index 000000000..a57481dad --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceKlineCandlestickDataItemInner.java @@ -0,0 +1,315 @@ +/* + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; + +import com.binance.connector.client.common.AbstractOpenApiSchema; +import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonPrimitive; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.hibernate.validator.constraints.*; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class IndexPriceKlineCandlestickDataItemInner extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(IndexPriceKlineCandlestickDataItemInner.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!IndexPriceKlineCandlestickDataItemInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes 'IndexPriceKlineCandlestickDataItemInner' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterLong = + gson.getDelegateAdapter(this, TypeToken.get(Long.class)); + final TypeAdapter adapterString = + gson.getDelegateAdapter(this, TypeToken.get(String.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, IndexPriceKlineCandlestickDataItemInner value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `Long` + if (value.getActualInstance() instanceof Long) { + JsonPrimitive primitive = + adapterLong + .toJsonTree((Long) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + // check if the actual instance is of the type `String` + if (value.getActualInstance() instanceof String) { + JsonPrimitive primitive = + adapterString + .toJsonTree((String) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " Long, String"); + } + + @Override + public IndexPriceKlineCandlestickDataItemInner read(JsonReader in) + throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize Long + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterLong; + match++; + log.log(Level.FINER, "Input data matches schema 'Long'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for Long failed with `%s`.", + e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Long'", e); + } + // deserialize String + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterString; + match++; + log.log(Level.FINER, "Input data matches schema 'String'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for String failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'String'", + e); + } + + if (match == 1) { + IndexPriceKlineCandlestickDataItemInner ret = + new IndexPriceKlineCandlestickDataItemInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for" + + " IndexPriceKlineCandlestickDataItemInner: %d" + + " classes match result, expected 1. Detailed" + + " failure message for oneOf schemas: %s. JSON:" + + " %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public IndexPriceKlineCandlestickDataItemInner() { + super("oneOf", Boolean.FALSE); + } + + public IndexPriceKlineCandlestickDataItemInner(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Long", Long.class); + schemas.put("String", String.class); + } + + @Override + public Map> getSchemas() { + return IndexPriceKlineCandlestickDataItemInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: Long, String + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof Long) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof String) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Long, String"); + } + + /** + * Get the actual instance, which can be the following: Long, String + * + * @return The actual instance (Long, String) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Long`. If the actual instance is not `Long`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `Long` + * @throws ClassCastException if the instance is not `Long` + */ + public Long getLong() throws ClassCastException { + return (Long) super.getActualInstance(); + } + + /** + * Get the actual instance of `String`. If the actual instance is not `String`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String) super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * IndexPriceKlineCandlestickDataItemInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with Long + try { + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for Long failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with String + try { + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for String failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for IndexPriceKlineCandlestickDataItemInner" + + " with oneOf schemas: Long, String. %d class(es) match the" + + " result, expected 1. Detailed failure message for oneOf schemas:" + + " %s. JSON: %s", + validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of IndexPriceKlineCandlestickDataItemInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of IndexPriceKlineCandlestickDataItemInner + * @throws IOException if the JSON string is invalid with respect to + * IndexPriceKlineCandlestickDataItemInner + */ + public static IndexPriceKlineCandlestickDataItemInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, IndexPriceKlineCandlestickDataItemInner.class); + } + + /** + * Convert an instance of IndexPriceKlineCandlestickDataItemInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceKlineCandlestickDataResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceKlineCandlestickDataResponse.java index 4575500ca..4432fe939 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceKlineCandlestickDataResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceKlineCandlestickDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,9 +34,9 @@ /** IndexPriceKlineCandlestickDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndexPriceKlineCandlestickDataResponse - extends ArrayList { + extends ArrayList { public IndexPriceKlineCandlestickDataResponse() {} @Override @@ -118,7 +118,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - IndexPriceKlineCandlestickDataResponseItem.validateJsonElement(element); + IndexPriceKlineCandlestickDataItem.validateJsonElement(element); } if (jsonElement == null) { if (!IndexPriceKlineCandlestickDataResponse.openapiRequiredFields diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceKlineCandlestickDataResponseItem.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceKlineCandlestickDataResponseItem.java deleted file mode 100644 index 12cc73973..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceKlineCandlestickDataResponseItem.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** IndexPriceKlineCandlestickDataResponseItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class IndexPriceKlineCandlestickDataResponseItem extends ArrayList { - public IndexPriceKlineCandlestickDataResponseItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IndexPriceKlineCandlestickDataResponseItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * IndexPriceKlineCandlestickDataResponseItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - IndexPriceKlineCandlestickDataResponseItemInner.validateJsonElement(element); - } - if (jsonElement == null) { - if (!IndexPriceKlineCandlestickDataResponseItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " IndexPriceKlineCandlestickDataResponseItem is not found in" - + " the empty JSON string", - IndexPriceKlineCandlestickDataResponseItem.openapiRequiredFields - .toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IndexPriceKlineCandlestickDataResponseItem.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'IndexPriceKlineCandlestickDataResponseItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(IndexPriceKlineCandlestickDataResponseItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, IndexPriceKlineCandlestickDataResponseItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public IndexPriceKlineCandlestickDataResponseItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of IndexPriceKlineCandlestickDataResponseItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of IndexPriceKlineCandlestickDataResponseItem - * @throws IOException if the JSON string is invalid with respect to - * IndexPriceKlineCandlestickDataResponseItem - */ - public static IndexPriceKlineCandlestickDataResponseItem fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, IndexPriceKlineCandlestickDataResponseItem.class); - } - - /** - * Convert an instance of IndexPriceKlineCandlestickDataResponseItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceKlineCandlestickDataResponseItemInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceKlineCandlestickDataResponseItemInner.java deleted file mode 100644 index 101379ad6..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/IndexPriceKlineCandlestickDataResponseItemInner.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; - -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonPrimitive; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class IndexPriceKlineCandlestickDataResponseItemInner extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(IndexPriceKlineCandlestickDataResponseItemInner.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IndexPriceKlineCandlestickDataResponseItemInner.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'IndexPriceKlineCandlestickDataResponseItemInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterLong = - gson.getDelegateAdapter(this, TypeToken.get(Long.class)); - final TypeAdapter adapterString = - gson.getDelegateAdapter(this, TypeToken.get(String.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, - IndexPriceKlineCandlestickDataResponseItemInner value) - throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `Long` - if (value.getActualInstance() instanceof Long) { - JsonPrimitive primitive = - adapterLong - .toJsonTree((Long) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - // check if the actual instance is of the type `String` - if (value.getActualInstance() instanceof String) { - JsonPrimitive primitive = - adapterString - .toJsonTree((String) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " Long, String"); - } - - @Override - public IndexPriceKlineCandlestickDataResponseItemInner read(JsonReader in) - throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize Long - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterLong; - match++; - log.log(Level.FINER, "Input data matches schema 'Long'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for Long failed with `%s`.", - e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Long'", e); - } - // deserialize String - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterString; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for String failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'String'", - e); - } - - if (match == 1) { - IndexPriceKlineCandlestickDataResponseItemInner ret = - new IndexPriceKlineCandlestickDataResponseItemInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for" - + " IndexPriceKlineCandlestickDataResponseItemInner:" - + " %d classes match result, expected 1. Detailed" - + " failure message for oneOf schemas: %s. JSON:" - + " %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public IndexPriceKlineCandlestickDataResponseItemInner() { - super("oneOf", Boolean.FALSE); - } - - public IndexPriceKlineCandlestickDataResponseItemInner(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Long", Long.class); - schemas.put("String", String.class); - } - - @Override - public Map> getSchemas() { - return IndexPriceKlineCandlestickDataResponseItemInner.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Long, String - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof Long) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof String) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Long, String"); - } - - /** - * Get the actual instance, which can be the following: Long, String - * - * @return The actual instance (Long, String) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Long`. If the actual instance is not `Long`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Long` - * @throws ClassCastException if the instance is not `Long` - */ - public Long getLong() throws ClassCastException { - return (Long) super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * IndexPriceKlineCandlestickDataResponseItemInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Long - try { - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for Long failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with String - try { - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for String failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for" - + " IndexPriceKlineCandlestickDataResponseItemInner with oneOf" - + " schemas: Long, String. %d class(es) match the result, expected" - + " 1. Detailed failure message for oneOf schemas: %s. JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of IndexPriceKlineCandlestickDataResponseItemInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of IndexPriceKlineCandlestickDataResponseItemInner - * @throws IOException if the JSON string is invalid with respect to - * IndexPriceKlineCandlestickDataResponseItemInner - */ - public static IndexPriceKlineCandlestickDataResponseItemInner fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, IndexPriceKlineCandlestickDataResponseItemInner.class); - } - - /** - * Convert an instance of IndexPriceKlineCandlestickDataResponseItemInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Interval.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Interval.java index f3879af72..4b2ae5484 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Interval.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Interval.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/KeepaliveUserDataStreamResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/KeepaliveUserDataStreamResponse.java index 80f099d16..c5c6c945c 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/KeepaliveUserDataStreamResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/KeepaliveUserDataStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** KeepaliveUserDataStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KeepaliveUserDataStreamResponse { public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; @@ -51,7 +51,7 @@ public KeepaliveUserDataStreamResponse listenKey( } /** - * Get listenKey + * Listen key. * * @return listenKey */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/KlineCandlestickDataItem.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/KlineCandlestickDataItem.java new file mode 100644 index 000000000..be8b55740 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/KlineCandlestickDataItem.java @@ -0,0 +1,183 @@ +/* + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** KlineCandlestickDataItem */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class KlineCandlestickDataItem extends ArrayList { + public KlineCandlestickDataItem() {} + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KlineCandlestickDataItem {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to KlineCandlestickDataItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be a array type in the JSON string but got" + + " `%s`", + jsonElement.toString())); + } + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for (JsonElement element : array) { + ContinuousContractKlineCandlestickDataItemInner.validateJsonElement(element); + } + if (jsonElement == null) { + if (!KlineCandlestickDataItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in KlineCandlestickDataItem is not found" + + " in the empty JSON string", + KlineCandlestickDataItem.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!KlineCandlestickDataItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'KlineCandlestickDataItem' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(KlineCandlestickDataItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, KlineCandlestickDataItem value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); + elementAdapter.write(out, obj); + } + + @Override + public KlineCandlestickDataItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of KlineCandlestickDataItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of KlineCandlestickDataItem + * @throws IOException if the JSON string is invalid with respect to KlineCandlestickDataItem + */ + public static KlineCandlestickDataItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, KlineCandlestickDataItem.class); + } + + /** + * Convert an instance of KlineCandlestickDataItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/KlineCandlestickDataResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/KlineCandlestickDataResponse.java index 1d70c2eb4..495a0eef0 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/KlineCandlestickDataResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/KlineCandlestickDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,8 +34,8 @@ /** KlineCandlestickDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class KlineCandlestickDataResponse extends ArrayList { + comments = "Generator version: 7.22.0") +public class KlineCandlestickDataResponse extends ArrayList { public KlineCandlestickDataResponse() {} @Override @@ -117,7 +117,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - KlineCandlestickDataResponseItem.validateJsonElement(element); + KlineCandlestickDataItem.validateJsonElement(element); } if (jsonElement == null) { if (!KlineCandlestickDataResponse.openapiRequiredFields diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/KlineCandlestickDataResponseItem.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/KlineCandlestickDataResponseItem.java deleted file mode 100644 index 588fe2679..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/KlineCandlestickDataResponseItem.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** KlineCandlestickDataResponseItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class KlineCandlestickDataResponseItem extends ArrayList { - public KlineCandlestickDataResponseItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class KlineCandlestickDataResponseItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * KlineCandlestickDataResponseItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - ContinuousContractKlineCandlestickDataResponseItemInner.validateJsonElement(element); - } - if (jsonElement == null) { - if (!KlineCandlestickDataResponseItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in KlineCandlestickDataResponseItem is" - + " not found in the empty JSON string", - KlineCandlestickDataResponseItem.openapiRequiredFields.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!KlineCandlestickDataResponseItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'KlineCandlestickDataResponseItem' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(KlineCandlestickDataResponseItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, KlineCandlestickDataResponseItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public KlineCandlestickDataResponseItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of KlineCandlestickDataResponseItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of KlineCandlestickDataResponseItem - * @throws IOException if the JSON string is invalid with respect to - * KlineCandlestickDataResponseItem - */ - public static KlineCandlestickDataResponseItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, KlineCandlestickDataResponseItem.class); - } - - /** - * Convert an instance of KlineCandlestickDataResponseItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/LongShortRatioResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/LongShortRatioResponse.java index 7236590f5..9a4d21158 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/LongShortRatioResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/LongShortRatioResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** LongShortRatioResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class LongShortRatioResponse extends ArrayList { public LongShortRatioResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/LongShortRatioResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/LongShortRatioResponseInner.java index 4b7bfd119..cb91ae2a4 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/LongShortRatioResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/LongShortRatioResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** LongShortRatioResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class LongShortRatioResponseInner { public static final String SERIALIZED_NAME_PAIR = "pair"; @@ -74,7 +74,7 @@ public LongShortRatioResponseInner pair(@jakarta.annotation.Nullable String pair } /** - * Get pair + * Pair * * @return pair */ @@ -94,7 +94,7 @@ public LongShortRatioResponseInner longShortRatio( } /** - * Get longShortRatio + * Long/short ratio. * * @return longShortRatio */ @@ -114,7 +114,7 @@ public LongShortRatioResponseInner longAccount( } /** - * Get longAccount + * 64.42% * * @return longAccount */ @@ -134,7 +134,7 @@ public LongShortRatioResponseInner shortAccount( } /** - * Get shortAccount + * 35.58% * * @return shortAccount */ @@ -153,7 +153,7 @@ public LongShortRatioResponseInner timestamp(@jakarta.annotation.Nullable Long t } /** - * Get timestamp + * Timestamp in milliseconds. * * @return timestamp */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/MarginType.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/MarginType.java index aafd3294d..2eabdfa5a 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/MarginType.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/MarginType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/MarkPriceKlineCandlestickDataItem.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/MarkPriceKlineCandlestickDataItem.java new file mode 100644 index 000000000..1c89cf68b --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/MarkPriceKlineCandlestickDataItem.java @@ -0,0 +1,188 @@ +/* + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** MarkPriceKlineCandlestickDataItem */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class MarkPriceKlineCandlestickDataItem extends ArrayList { + public MarkPriceKlineCandlestickDataItem() {} + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MarkPriceKlineCandlestickDataItem {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * MarkPriceKlineCandlestickDataItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be a array type in the JSON string but got" + + " `%s`", + jsonElement.toString())); + } + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for (JsonElement element : array) { + IndexPriceKlineCandlestickDataItemInner.validateJsonElement(element); + } + if (jsonElement == null) { + if (!MarkPriceKlineCandlestickDataItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in MarkPriceKlineCandlestickDataItem is" + + " not found in the empty JSON string", + MarkPriceKlineCandlestickDataItem.openapiRequiredFields + .toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MarkPriceKlineCandlestickDataItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MarkPriceKlineCandlestickDataItem' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(MarkPriceKlineCandlestickDataItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, MarkPriceKlineCandlestickDataItem value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); + elementAdapter.write(out, obj); + } + + @Override + public MarkPriceKlineCandlestickDataItem read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of MarkPriceKlineCandlestickDataItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of MarkPriceKlineCandlestickDataItem + * @throws IOException if the JSON string is invalid with respect to + * MarkPriceKlineCandlestickDataItem + */ + public static MarkPriceKlineCandlestickDataItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MarkPriceKlineCandlestickDataItem.class); + } + + /** + * Convert an instance of MarkPriceKlineCandlestickDataItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/MarkPriceKlineCandlestickDataResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/MarkPriceKlineCandlestickDataResponse.java index 021d96d5d..3082266c0 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/MarkPriceKlineCandlestickDataResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/MarkPriceKlineCandlestickDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,9 +34,9 @@ /** MarkPriceKlineCandlestickDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceKlineCandlestickDataResponse - extends ArrayList { + extends ArrayList { public MarkPriceKlineCandlestickDataResponse() {} @Override @@ -118,7 +118,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - MarkPriceKlineCandlestickDataResponseItem.validateJsonElement(element); + MarkPriceKlineCandlestickDataItem.validateJsonElement(element); } if (jsonElement == null) { if (!MarkPriceKlineCandlestickDataResponse.openapiRequiredFields diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/MarkPriceKlineCandlestickDataResponseItem.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/MarkPriceKlineCandlestickDataResponseItem.java deleted file mode 100644 index 334c10c8d..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/MarkPriceKlineCandlestickDataResponseItem.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** MarkPriceKlineCandlestickDataResponseItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MarkPriceKlineCandlestickDataResponseItem extends ArrayList { - public MarkPriceKlineCandlestickDataResponseItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MarkPriceKlineCandlestickDataResponseItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * MarkPriceKlineCandlestickDataResponseItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - MarkPriceKlineCandlestickDataResponseItemInner.validateJsonElement(element); - } - if (jsonElement == null) { - if (!MarkPriceKlineCandlestickDataResponseItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " MarkPriceKlineCandlestickDataResponseItem is not found in" - + " the empty JSON string", - MarkPriceKlineCandlestickDataResponseItem.openapiRequiredFields - .toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MarkPriceKlineCandlestickDataResponseItem.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'MarkPriceKlineCandlestickDataResponseItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(MarkPriceKlineCandlestickDataResponseItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, MarkPriceKlineCandlestickDataResponseItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public MarkPriceKlineCandlestickDataResponseItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MarkPriceKlineCandlestickDataResponseItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of MarkPriceKlineCandlestickDataResponseItem - * @throws IOException if the JSON string is invalid with respect to - * MarkPriceKlineCandlestickDataResponseItem - */ - public static MarkPriceKlineCandlestickDataResponseItem fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, MarkPriceKlineCandlestickDataResponseItem.class); - } - - /** - * Convert an instance of MarkPriceKlineCandlestickDataResponseItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/MarkPriceKlineCandlestickDataResponseItemInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/MarkPriceKlineCandlestickDataResponseItemInner.java deleted file mode 100644 index b4d953639..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/MarkPriceKlineCandlestickDataResponseItemInner.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; - -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonPrimitive; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MarkPriceKlineCandlestickDataResponseItemInner extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(MarkPriceKlineCandlestickDataResponseItemInner.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MarkPriceKlineCandlestickDataResponseItemInner.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'MarkPriceKlineCandlestickDataResponseItemInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterLong = - gson.getDelegateAdapter(this, TypeToken.get(Long.class)); - final TypeAdapter adapterString = - gson.getDelegateAdapter(this, TypeToken.get(String.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, - MarkPriceKlineCandlestickDataResponseItemInner value) - throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `Long` - if (value.getActualInstance() instanceof Long) { - JsonPrimitive primitive = - adapterLong - .toJsonTree((Long) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - // check if the actual instance is of the type `String` - if (value.getActualInstance() instanceof String) { - JsonPrimitive primitive = - adapterString - .toJsonTree((String) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " Long, String"); - } - - @Override - public MarkPriceKlineCandlestickDataResponseItemInner read(JsonReader in) - throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize Long - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterLong; - match++; - log.log(Level.FINER, "Input data matches schema 'Long'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for Long failed with `%s`.", - e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Long'", e); - } - // deserialize String - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterString; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for String failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'String'", - e); - } - - if (match == 1) { - MarkPriceKlineCandlestickDataResponseItemInner ret = - new MarkPriceKlineCandlestickDataResponseItemInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for" - + " MarkPriceKlineCandlestickDataResponseItemInner:" - + " %d classes match result, expected 1. Detailed" - + " failure message for oneOf schemas: %s. JSON:" - + " %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public MarkPriceKlineCandlestickDataResponseItemInner() { - super("oneOf", Boolean.FALSE); - } - - public MarkPriceKlineCandlestickDataResponseItemInner(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Long", Long.class); - schemas.put("String", String.class); - } - - @Override - public Map> getSchemas() { - return MarkPriceKlineCandlestickDataResponseItemInner.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Long, String - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof Long) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof String) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Long, String"); - } - - /** - * Get the actual instance, which can be the following: Long, String - * - * @return The actual instance (Long, String) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Long`. If the actual instance is not `Long`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Long` - * @throws ClassCastException if the instance is not `Long` - */ - public Long getLong() throws ClassCastException { - return (Long) super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * MarkPriceKlineCandlestickDataResponseItemInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Long - try { - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for Long failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with String - try { - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for String failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for" - + " MarkPriceKlineCandlestickDataResponseItemInner with oneOf" - + " schemas: Long, String. %d class(es) match the result, expected" - + " 1. Detailed failure message for oneOf schemas: %s. JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of MarkPriceKlineCandlestickDataResponseItemInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of MarkPriceKlineCandlestickDataResponseItemInner - * @throws IOException if the JSON string is invalid with respect to - * MarkPriceKlineCandlestickDataResponseItemInner - */ - public static MarkPriceKlineCandlestickDataResponseItemInner fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, MarkPriceKlineCandlestickDataResponseItemInner.class); - } - - /** - * Convert an instance of MarkPriceKlineCandlestickDataResponseItemInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyIsolatedPositionMarginRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyIsolatedPositionMarginRequest.java index d1c2f92ec..58dd3e836 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyIsolatedPositionMarginRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyIsolatedPositionMarginRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** ModifyIsolatedPositionMarginRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyIsolatedPositionMarginRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -59,7 +59,7 @@ public class ModifyIsolatedPositionMarginRequest { @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private Type type; + private Long type; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -75,7 +75,7 @@ public ModifyIsolatedPositionMarginRequest symbol(@jakarta.annotation.Nonnull St } /** - * Get symbol + * Symbol * * @return symbol */ @@ -116,7 +116,7 @@ public ModifyIsolatedPositionMarginRequest amount(@jakarta.annotation.Nonnull Do } /** - * Get amount + * Margin asset * * @return amount */ @@ -131,24 +131,23 @@ public void setAmount(@jakarta.annotation.Nonnull Double amount) { this.amount = amount; } - public ModifyIsolatedPositionMarginRequest type(@jakarta.annotation.Nonnull Type type) { + public ModifyIsolatedPositionMarginRequest type(@jakarta.annotation.Nonnull Long type) { this.type = type; return this; } /** - * Get type + * 1: Add position margin,2: Reduce position margin * * @return type */ @jakarta.annotation.Nonnull @NotNull - @Valid - public Type getType() { + public Long getType() { return type; } - public void setType(@jakarta.annotation.Nonnull Type type) { + public void setType(@jakarta.annotation.Nonnull Long type) { this.type = type; } @@ -159,11 +158,12 @@ public ModifyIsolatedPositionMarginRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -313,8 +313,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) { PositionSide.validateJsonElement(jsonObj.get("positionSide")); } - // validate the required field `type` - Type.validateJsonElement(jsonObj.get("type")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyIsolatedPositionMarginResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyIsolatedPositionMarginResponse.java index 87a49cab0..dd12412ec 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyIsolatedPositionMarginResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyIsolatedPositionMarginResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** ModifyIsolatedPositionMarginResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyIsolatedPositionMarginResponse { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -69,7 +69,7 @@ public ModifyIsolatedPositionMarginResponse amount(@jakarta.annotation.Nullable } /** - * Get amount + * Amount. * * @return amount */ @@ -89,7 +89,7 @@ public ModifyIsolatedPositionMarginResponse code(@jakarta.annotation.Nullable Lo } /** - * Get code + * API response code. \"000000\" indicates success. * * @return code */ @@ -108,7 +108,7 @@ public ModifyIsolatedPositionMarginResponse msg(@jakarta.annotation.Nullable Str } /** - * Get msg + * Message details. * * @return msg */ @@ -127,7 +127,7 @@ public ModifyIsolatedPositionMarginResponse type(@jakarta.annotation.Nullable Lo } /** - * Get type + * Order type. * * @return type */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyMultipleOrdersRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyMultipleOrdersRequest.java index e10fcc5b0..214f764f9 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyMultipleOrdersRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyMultipleOrdersRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** ModifyMultipleOrdersRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyMultipleOrdersRequest { public static final String SERIALIZED_NAME_BATCH_ORDERS = "batchOrders"; @@ -79,11 +79,12 @@ public ModifyMultipleOrdersRequest recvWindow(@jakarta.annotation.Nullable Long } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyMultipleOrdersResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyMultipleOrdersResponse.java index 6945d667b..ce30093f0 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyMultipleOrdersResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyMultipleOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ModifyMultipleOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyMultipleOrdersResponse extends ArrayList { public ModifyMultipleOrdersResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyMultipleOrdersResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyMultipleOrdersResponseInner.java index 220d30070..6bb1912d2 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyMultipleOrdersResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyMultipleOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ModifyMultipleOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyMultipleOrdersResponseInner { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -66,17 +66,17 @@ public class ModifyMultipleOrdersResponseInner { @jakarta.annotation.Nullable private String clientOrderId; - public static final String SERIALIZED_NAME_PRICE = "price"; + public static final String SERIALIZED_NAME_MODIFY_ID = "modifyId"; - @SerializedName(SERIALIZED_NAME_PRICE) + @SerializedName(SERIALIZED_NAME_MODIFY_ID) @jakarta.annotation.Nullable - private String price; + private Long modifyId; - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; + public static final String SERIALIZED_NAME_PRICE = "price"; - @SerializedName(SERIALIZED_NAME_AVG_PRICE) + @SerializedName(SERIALIZED_NAME_PRICE) @jakarta.annotation.Nullable - private String avgPrice; + private String price; public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; @@ -96,12 +96,6 @@ public class ModifyMultipleOrdersResponseInner { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_BASE = "cumBase"; - - @SerializedName(SERIALIZED_NAME_CUM_BASE) - @jakarta.annotation.Nullable - private String cumBase; - public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) @@ -201,7 +195,7 @@ public ModifyMultipleOrdersResponseInner orderId(@jakarta.annotation.Nullable Lo } /** - * Get orderId + * Sub-order ID * * @return orderId */ @@ -220,7 +214,7 @@ public ModifyMultipleOrdersResponseInner symbol(@jakarta.annotation.Nullable Str } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -239,7 +233,7 @@ public ModifyMultipleOrdersResponseInner pair(@jakarta.annotation.Nullable Strin } /** - * Get pair + * Pair * * @return pair */ @@ -258,7 +252,7 @@ public ModifyMultipleOrdersResponseInner status(@jakarta.annotation.Nullable Str } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -278,7 +272,7 @@ public ModifyMultipleOrdersResponseInner clientOrderId( } /** - * Get clientOrderId + * Client order ID. * * @return clientOrderId */ @@ -291,43 +285,42 @@ public void setClientOrderId(@jakarta.annotation.Nullable String clientOrderId) this.clientOrderId = clientOrderId; } - public ModifyMultipleOrdersResponseInner price(@jakarta.annotation.Nullable String price) { - this.price = price; + public ModifyMultipleOrdersResponseInner modifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; return this; } /** - * Get price + * user-defined modification identifier, only returned if provided in the request * - * @return price + * @return modifyId */ @jakarta.annotation.Nullable - public String getPrice() { - return price; + public Long getModifyId() { + return modifyId; } - public void setPrice(@jakarta.annotation.Nullable String price) { - this.price = price; + public void setModifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; } - public ModifyMultipleOrdersResponseInner avgPrice( - @jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; + public ModifyMultipleOrdersResponseInner price(@jakarta.annotation.Nullable String price) { + this.price = price; return this; } /** - * Get avgPrice + * Latest token price. * - * @return avgPrice + * @return price */ @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; + public String getPrice() { + return price; } - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; + public void setPrice(@jakarta.annotation.Nullable String price) { + this.price = price; } public ModifyMultipleOrdersResponseInner origQty(@jakarta.annotation.Nullable String origQty) { @@ -336,7 +329,7 @@ public ModifyMultipleOrdersResponseInner origQty(@jakarta.annotation.Nullable St } /** - * Get origQty + * Original order quantity * * @return origQty */ @@ -356,7 +349,7 @@ public ModifyMultipleOrdersResponseInner executedQty( } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -375,7 +368,7 @@ public ModifyMultipleOrdersResponseInner cumQty(@jakarta.annotation.Nullable Str } /** - * Get cumQty + * Cumulative filled quantity. * * @return cumQty */ @@ -388,25 +381,6 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public ModifyMultipleOrdersResponseInner cumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - return this; - } - - /** - * Get cumBase - * - * @return cumBase - */ - @jakarta.annotation.Nullable - public String getCumBase() { - return cumBase; - } - - public void setCumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - } - public ModifyMultipleOrdersResponseInner timeInForce( @jakarta.annotation.Nullable String timeInForce) { this.timeInForce = timeInForce; @@ -414,7 +388,7 @@ public ModifyMultipleOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time in force * * @return timeInForce */ @@ -433,7 +407,7 @@ public ModifyMultipleOrdersResponseInner type(@jakarta.annotation.Nullable Strin } /** - * Get type + * Order type. * * @return type */ @@ -453,7 +427,7 @@ public ModifyMultipleOrdersResponseInner reduceOnly( } /** - * Get reduceOnly + * Whether the order is reduce-only. * * @return reduceOnly */ @@ -473,7 +447,7 @@ public ModifyMultipleOrdersResponseInner closePosition( } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -492,7 +466,7 @@ public ModifyMultipleOrdersResponseInner side(@jakarta.annotation.Nullable Strin } /** - * Get side + * Trading side * * @return side */ @@ -512,7 +486,7 @@ public ModifyMultipleOrdersResponseInner positionSide( } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -532,7 +506,7 @@ public ModifyMultipleOrdersResponseInner stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -552,7 +526,7 @@ public ModifyMultipleOrdersResponseInner workingType( } /** - * Get workingType + * Stop trigger price type. * * @return workingType */ @@ -572,7 +546,7 @@ public ModifyMultipleOrdersResponseInner priceProtect( } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -592,7 +566,7 @@ public ModifyMultipleOrdersResponseInner origType( } /** - * Get origType + * Original order type. * * @return origType */ @@ -612,7 +586,7 @@ public ModifyMultipleOrdersResponseInner priceMatch( } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -632,7 +606,7 @@ public ModifyMultipleOrdersResponseInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -653,7 +627,7 @@ public ModifyMultipleOrdersResponseInner updateTime( } /** - * Get updateTime + * update time * * @return updateTime */ @@ -672,7 +646,7 @@ public ModifyMultipleOrdersResponseInner code(@jakarta.annotation.Nullable Long } /** - * Get code + * API response code. \"000000\" indicates success. * * @return code */ @@ -691,7 +665,7 @@ public ModifyMultipleOrdersResponseInner msg(@jakarta.annotation.Nullable String } /** - * Get msg + * Message details. * * @return msg */ @@ -720,12 +694,11 @@ public boolean equals(Object o) { && Objects.equals(this.status, modifyMultipleOrdersResponseInner.status) && Objects.equals( this.clientOrderId, modifyMultipleOrdersResponseInner.clientOrderId) + && Objects.equals(this.modifyId, modifyMultipleOrdersResponseInner.modifyId) && Objects.equals(this.price, modifyMultipleOrdersResponseInner.price) - && Objects.equals(this.avgPrice, modifyMultipleOrdersResponseInner.avgPrice) && Objects.equals(this.origQty, modifyMultipleOrdersResponseInner.origQty) && Objects.equals(this.executedQty, modifyMultipleOrdersResponseInner.executedQty) && Objects.equals(this.cumQty, modifyMultipleOrdersResponseInner.cumQty) - && Objects.equals(this.cumBase, modifyMultipleOrdersResponseInner.cumBase) && Objects.equals(this.timeInForce, modifyMultipleOrdersResponseInner.timeInForce) && Objects.equals(this.type, modifyMultipleOrdersResponseInner.type) && Objects.equals(this.reduceOnly, modifyMultipleOrdersResponseInner.reduceOnly) @@ -754,12 +727,11 @@ public int hashCode() { pair, status, clientOrderId, + modifyId, price, - avgPrice, origQty, executedQty, cumQty, - cumBase, timeInForce, type, reduceOnly, @@ -786,12 +758,11 @@ public String toString() { sb.append(" pair: ").append(toIndentedString(pair)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); + sb.append(" modifyId: ").append(toIndentedString(modifyId)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumBase: ").append(toIndentedString(cumBase)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); @@ -836,14 +807,14 @@ public String toUrlQueryString() { String clientOrderIdValueAsString = ""; clientOrderIdValueAsString = clientOrderIdValue.toString(); sb.append("clientOrderId=").append(urlEncode(clientOrderIdValueAsString)).append(""); + Object modifyIdValue = getModifyId(); + String modifyIdValueAsString = ""; + modifyIdValueAsString = modifyIdValue.toString(); + sb.append("modifyId=").append(urlEncode(modifyIdValueAsString)).append(""); Object priceValue = getPrice(); String priceValueAsString = ""; priceValueAsString = priceValue.toString(); sb.append("price=").append(urlEncode(priceValueAsString)).append(""); - Object avgPriceValue = getAvgPrice(); - String avgPriceValueAsString = ""; - avgPriceValueAsString = avgPriceValue.toString(); - sb.append("avgPrice=").append(urlEncode(avgPriceValueAsString)).append(""); Object origQtyValue = getOrigQty(); String origQtyValueAsString = ""; origQtyValueAsString = origQtyValue.toString(); @@ -856,10 +827,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = ""; cumQtyValueAsString = cumQtyValue.toString(); sb.append("cumQty=").append(urlEncode(cumQtyValueAsString)).append(""); - Object cumBaseValue = getCumBase(); - String cumBaseValueAsString = ""; - cumBaseValueAsString = cumBaseValue.toString(); - sb.append("cumBase=").append(urlEncode(cumBaseValueAsString)).append(""); Object timeInForceValue = getTimeInForce(); String timeInForceValueAsString = ""; timeInForceValueAsString = timeInForceValue.toString(); @@ -955,12 +922,11 @@ private String toIndentedString(Object o) { openapiFields.add("pair"); openapiFields.add("status"); openapiFields.add("clientOrderId"); + openapiFields.add("modifyId"); openapiFields.add("price"); - openapiFields.add("avgPrice"); openapiFields.add("origQty"); openapiFields.add("executedQty"); openapiFields.add("cumQty"); - openapiFields.add("cumBase"); openapiFields.add("timeInForce"); openapiFields.add("type"); openapiFields.add("reduceOnly"); @@ -1041,14 +1007,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("price").toString())); } - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) && !jsonObj.get("origQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1073,14 +1031,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumBase") != null && !jsonObj.get("cumBase").isJsonNull()) - && !jsonObj.get("cumBase").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumBase` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("cumBase").toString())); - } if ((jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) && !jsonObj.get("timeInForce").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyOrderRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyOrderRequest.java index f4d085980..35e29249a 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyOrderRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** ModifyOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyOrderRequest { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -79,6 +79,12 @@ public class ModifyOrderRequest { @jakarta.annotation.Nullable private PriceMatch priceMatch; + public static final String SERIALIZED_NAME_MODIFY_ID = "modifyId"; + + @SerializedName(SERIALIZED_NAME_MODIFY_ID) + @jakarta.annotation.Nullable + private Long modifyId; + public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @SerializedName(SERIALIZED_NAME_RECV_WINDOW) @@ -93,7 +99,7 @@ public ModifyOrderRequest orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Order ID * * @return orderId */ @@ -113,7 +119,7 @@ public ModifyOrderRequest origClientOrderId( } /** - * Get origClientOrderId + * Client order ID * * @return origClientOrderId */ @@ -132,7 +138,7 @@ public ModifyOrderRequest symbol(@jakarta.annotation.Nonnull String symbol) { } /** - * Get symbol + * Symbol * * @return symbol */ @@ -173,7 +179,8 @@ public ModifyOrderRequest quantity(@jakarta.annotation.Nullable Double quantity) } /** - * Get quantity + * Order quantity, cannot be sent with `closePosition=true`. **After CM + * migration, this parameter becomes mandatory** (must be sent together with `price`). * * @return quantity */ @@ -193,7 +200,8 @@ public ModifyOrderRequest price(@jakarta.annotation.Nullable Double price) { } /** - * Get price + * Order price. **After CM migration, this parameter becomes mandatory** (must be sent together + * with `quantity`). * * @return price */ @@ -227,17 +235,38 @@ public void setPriceMatch(@jakarta.annotation.Nullable PriceMatch priceMatch) { this.priceMatch = priceMatch; } + public ModifyOrderRequest modifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + return this; + } + + /** + * User-defined modification identifier, returned as-is in the response. Optional; not validated + * for uniqueness. + * + * @return modifyId + */ + @jakarta.annotation.Nullable + public Long getModifyId() { + return modifyId; + } + + public void setModifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + } + public ModifyOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) { this.recvWindow = recvWindow; return this; } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -262,13 +291,22 @@ public boolean equals(Object o) { && Objects.equals(this.quantity, modifyOrderRequest.quantity) && Objects.equals(this.price, modifyOrderRequest.price) && Objects.equals(this.priceMatch, modifyOrderRequest.priceMatch) + && Objects.equals(this.modifyId, modifyOrderRequest.modifyId) && Objects.equals(this.recvWindow, modifyOrderRequest.recvWindow); } @Override public int hashCode() { return Objects.hash( - orderId, origClientOrderId, symbol, side, quantity, price, priceMatch, recvWindow); + orderId, + origClientOrderId, + symbol, + side, + quantity, + price, + priceMatch, + modifyId, + recvWindow); } @Override @@ -282,6 +320,7 @@ public String toString() { sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" priceMatch: ").append(toIndentedString(priceMatch)).append("\n"); + sb.append(" modifyId: ").append(toIndentedString(modifyId)).append("\n"); sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); sb.append("}"); return sb.toString(); @@ -320,6 +359,10 @@ public String toUrlQueryString() { String priceMatchValueAsString = ""; priceMatchValueAsString = priceMatchValue.toString(); sb.append("priceMatch=").append(urlEncode(priceMatchValueAsString)).append(""); + Object modifyIdValue = getModifyId(); + String modifyIdValueAsString = ""; + modifyIdValueAsString = modifyIdValue.toString(); + sb.append("modifyId=").append(urlEncode(modifyIdValueAsString)).append(""); Object recvWindowValue = getRecvWindow(); String recvWindowValueAsString = ""; recvWindowValueAsString = recvWindowValue.toString(); @@ -359,6 +402,7 @@ private String toIndentedString(Object o) { openapiFields.add("quantity"); openapiFields.add("price"); openapiFields.add("priceMatch"); + openapiFields.add("modifyId"); openapiFields.add("recvWindow"); // a set of required properties/fields (JSON key names) diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyOrderResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyOrderResponse.java index 0d9359d5c..d01592f31 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyOrderResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ModifyOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ModifyOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyOrderResponse { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -66,17 +66,17 @@ public class ModifyOrderResponse { @jakarta.annotation.Nullable private String clientOrderId; - public static final String SERIALIZED_NAME_PRICE = "price"; + public static final String SERIALIZED_NAME_MODIFY_ID = "modifyId"; - @SerializedName(SERIALIZED_NAME_PRICE) + @SerializedName(SERIALIZED_NAME_MODIFY_ID) @jakarta.annotation.Nullable - private String price; + private Long modifyId; - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; + public static final String SERIALIZED_NAME_PRICE = "price"; - @SerializedName(SERIALIZED_NAME_AVG_PRICE) + @SerializedName(SERIALIZED_NAME_PRICE) @jakarta.annotation.Nullable - private String avgPrice; + private String price; public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; @@ -96,12 +96,6 @@ public class ModifyOrderResponse { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_BASE = "cumBase"; - - @SerializedName(SERIALIZED_NAME_CUM_BASE) - @jakarta.annotation.Nullable - private String cumBase; - public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) @@ -189,7 +183,7 @@ public ModifyOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Sub-order ID * * @return orderId */ @@ -208,7 +202,7 @@ public ModifyOrderResponse symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -227,7 +221,7 @@ public ModifyOrderResponse pair(@jakarta.annotation.Nullable String pair) { } /** - * Get pair + * Pair * * @return pair */ @@ -246,7 +240,7 @@ public ModifyOrderResponse status(@jakarta.annotation.Nullable String status) { } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -265,7 +259,7 @@ public ModifyOrderResponse clientOrderId(@jakarta.annotation.Nullable String cli } /** - * Get clientOrderId + * Client order ID. * * @return clientOrderId */ @@ -278,42 +272,42 @@ public void setClientOrderId(@jakarta.annotation.Nullable String clientOrderId) this.clientOrderId = clientOrderId; } - public ModifyOrderResponse price(@jakarta.annotation.Nullable String price) { - this.price = price; + public ModifyOrderResponse modifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; return this; } /** - * Get price + * user-defined modification identifier, only returned if provided in the request * - * @return price + * @return modifyId */ @jakarta.annotation.Nullable - public String getPrice() { - return price; + public Long getModifyId() { + return modifyId; } - public void setPrice(@jakarta.annotation.Nullable String price) { - this.price = price; + public void setModifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; } - public ModifyOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; + public ModifyOrderResponse price(@jakarta.annotation.Nullable String price) { + this.price = price; return this; } /** - * Get avgPrice + * Latest token price. * - * @return avgPrice + * @return price */ @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; + public String getPrice() { + return price; } - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; + public void setPrice(@jakarta.annotation.Nullable String price) { + this.price = price; } public ModifyOrderResponse origQty(@jakarta.annotation.Nullable String origQty) { @@ -322,7 +316,7 @@ public ModifyOrderResponse origQty(@jakarta.annotation.Nullable String origQty) } /** - * Get origQty + * Original order quantity * * @return origQty */ @@ -341,7 +335,7 @@ public ModifyOrderResponse executedQty(@jakarta.annotation.Nullable String execu } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -360,7 +354,7 @@ public ModifyOrderResponse cumQty(@jakarta.annotation.Nullable String cumQty) { } /** - * Get cumQty + * Cumulative filled quantity. * * @return cumQty */ @@ -373,32 +367,13 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public ModifyOrderResponse cumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - return this; - } - - /** - * Get cumBase - * - * @return cumBase - */ - @jakarta.annotation.Nullable - public String getCumBase() { - return cumBase; - } - - public void setCumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - } - public ModifyOrderResponse timeInForce(@jakarta.annotation.Nullable String timeInForce) { this.timeInForce = timeInForce; return this; } /** - * Get timeInForce + * Time in force * * @return timeInForce */ @@ -417,7 +392,7 @@ public ModifyOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Order type. * * @return type */ @@ -436,7 +411,7 @@ public ModifyOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean reduc } /** - * Get reduceOnly + * Whether the order is reduce-only. * * @return reduceOnly */ @@ -455,7 +430,7 @@ public ModifyOrderResponse closePosition(@jakarta.annotation.Nullable Boolean cl } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -474,7 +449,7 @@ public ModifyOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Trading side * * @return side */ @@ -493,7 +468,7 @@ public ModifyOrderResponse positionSide(@jakarta.annotation.Nullable String posi } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -512,7 +487,7 @@ public ModifyOrderResponse stopPrice(@jakarta.annotation.Nullable String stopPri } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -531,7 +506,7 @@ public ModifyOrderResponse workingType(@jakarta.annotation.Nullable String worki } /** - * Get workingType + * Stop trigger price type. * * @return workingType */ @@ -550,7 +525,7 @@ public ModifyOrderResponse priceProtect(@jakarta.annotation.Nullable Boolean pri } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -569,7 +544,7 @@ public ModifyOrderResponse origType(@jakarta.annotation.Nullable String origType } /** - * Get origType + * Original order type. * * @return origType */ @@ -588,7 +563,7 @@ public ModifyOrderResponse priceMatch(@jakarta.annotation.Nullable String priceM } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -608,7 +583,7 @@ public ModifyOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -628,7 +603,7 @@ public ModifyOrderResponse updateTime(@jakarta.annotation.Nullable Long updateTi } /** - * Get updateTime + * update time * * @return updateTime */ @@ -655,12 +630,11 @@ public boolean equals(Object o) { && Objects.equals(this.pair, modifyOrderResponse.pair) && Objects.equals(this.status, modifyOrderResponse.status) && Objects.equals(this.clientOrderId, modifyOrderResponse.clientOrderId) + && Objects.equals(this.modifyId, modifyOrderResponse.modifyId) && Objects.equals(this.price, modifyOrderResponse.price) - && Objects.equals(this.avgPrice, modifyOrderResponse.avgPrice) && Objects.equals(this.origQty, modifyOrderResponse.origQty) && Objects.equals(this.executedQty, modifyOrderResponse.executedQty) && Objects.equals(this.cumQty, modifyOrderResponse.cumQty) - && Objects.equals(this.cumBase, modifyOrderResponse.cumBase) && Objects.equals(this.timeInForce, modifyOrderResponse.timeInForce) && Objects.equals(this.type, modifyOrderResponse.type) && Objects.equals(this.reduceOnly, modifyOrderResponse.reduceOnly) @@ -685,12 +659,11 @@ public int hashCode() { pair, status, clientOrderId, + modifyId, price, - avgPrice, origQty, executedQty, cumQty, - cumBase, timeInForce, type, reduceOnly, @@ -715,12 +688,11 @@ public String toString() { sb.append(" pair: ").append(toIndentedString(pair)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); + sb.append(" modifyId: ").append(toIndentedString(modifyId)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumBase: ").append(toIndentedString(cumBase)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); @@ -763,14 +735,14 @@ public String toUrlQueryString() { String clientOrderIdValueAsString = ""; clientOrderIdValueAsString = clientOrderIdValue.toString(); sb.append("clientOrderId=").append(urlEncode(clientOrderIdValueAsString)).append(""); + Object modifyIdValue = getModifyId(); + String modifyIdValueAsString = ""; + modifyIdValueAsString = modifyIdValue.toString(); + sb.append("modifyId=").append(urlEncode(modifyIdValueAsString)).append(""); Object priceValue = getPrice(); String priceValueAsString = ""; priceValueAsString = priceValue.toString(); sb.append("price=").append(urlEncode(priceValueAsString)).append(""); - Object avgPriceValue = getAvgPrice(); - String avgPriceValueAsString = ""; - avgPriceValueAsString = avgPriceValue.toString(); - sb.append("avgPrice=").append(urlEncode(avgPriceValueAsString)).append(""); Object origQtyValue = getOrigQty(); String origQtyValueAsString = ""; origQtyValueAsString = origQtyValue.toString(); @@ -783,10 +755,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = ""; cumQtyValueAsString = cumQtyValue.toString(); sb.append("cumQty=").append(urlEncode(cumQtyValueAsString)).append(""); - Object cumBaseValue = getCumBase(); - String cumBaseValueAsString = ""; - cumBaseValueAsString = cumBaseValue.toString(); - sb.append("cumBase=").append(urlEncode(cumBaseValueAsString)).append(""); Object timeInForceValue = getTimeInForce(); String timeInForceValueAsString = ""; timeInForceValueAsString = timeInForceValue.toString(); @@ -874,12 +842,11 @@ private String toIndentedString(Object o) { openapiFields.add("pair"); openapiFields.add("status"); openapiFields.add("clientOrderId"); + openapiFields.add("modifyId"); openapiFields.add("price"); - openapiFields.add("avgPrice"); openapiFields.add("origQty"); openapiFields.add("executedQty"); openapiFields.add("cumQty"); - openapiFields.add("cumBase"); openapiFields.add("timeInForce"); openapiFields.add("type"); openapiFields.add("reduceOnly"); @@ -956,14 +923,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("price").toString())); } - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) && !jsonObj.get("origQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -988,14 +947,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumBase") != null && !jsonObj.get("cumBase").isJsonNull()) - && !jsonObj.get("cumBase").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumBase` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("cumBase").toString())); - } if ((jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) && !jsonObj.get("timeInForce").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NewOrderRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NewOrderRequest.java index c289d04ad..91980c97d 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NewOrderRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NewOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** NewOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewOrderRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -59,13 +59,13 @@ public class NewOrderRequest { @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private Type type; + private OrderType type; - public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; + public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; - @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) + @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) @jakarta.annotation.Nullable - private TimeInForce timeInForce; + private ReduceOnly reduceOnly = ReduceOnly.FALSE; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @@ -73,12 +73,6 @@ public class NewOrderRequest { @jakarta.annotation.Nullable private Double quantity; - public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; - - @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) - @jakarta.annotation.Nullable - private String reduceOnly; - public static final String SERIALIZED_NAME_PRICE = "price"; @SerializedName(SERIALIZED_NAME_PRICE) @@ -115,23 +109,29 @@ public class NewOrderRequest { @jakarta.annotation.Nullable private Double callbackRate; + public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; + + @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) + @jakarta.annotation.Nullable + private TimeInForce timeInForce; + public static final String SERIALIZED_NAME_WORKING_TYPE = "workingType"; @SerializedName(SERIALIZED_NAME_WORKING_TYPE) @jakarta.annotation.Nullable - private WorkingType workingType; + private WorkingType workingType = WorkingType.CONTRACT_PRICE; public static final String SERIALIZED_NAME_PRICE_PROTECT = "priceProtect"; @SerializedName(SERIALIZED_NAME_PRICE_PROTECT) @jakarta.annotation.Nullable - private String priceProtect; + private PriceProtect priceProtect = PriceProtect.FALSE; public static final String SERIALIZED_NAME_NEW_ORDER_RESP_TYPE = "newOrderRespType"; @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESP_TYPE) @jakarta.annotation.Nullable - private NewOrderRespType newOrderRespType; + private NewOrderRespType newOrderRespType = NewOrderRespType.ACK; public static final String SERIALIZED_NAME_PRICE_MATCH = "priceMatch"; @@ -144,7 +144,7 @@ public class NewOrderRequest { @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) @jakarta.annotation.Nullable - private SelfTradePreventionMode selfTradePreventionMode; + private SelfTradePreventionMode selfTradePreventionMode = SelfTradePreventionMode.EXPIRE_MAKER; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -160,7 +160,7 @@ public NewOrderRequest symbol(@jakarta.annotation.Nonnull String symbol) { } /** - * Get symbol + * Symbol * * @return symbol */ @@ -215,7 +215,7 @@ public void setPositionSide(@jakarta.annotation.Nullable PositionSide positionSi this.positionSide = positionSide; } - public NewOrderRequest type(@jakarta.annotation.Nonnull Type type) { + public NewOrderRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -228,32 +228,32 @@ public NewOrderRequest type(@jakarta.annotation.Nonnull Type type) { @jakarta.annotation.Nonnull @NotNull @Valid - public Type getType() { + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull Type type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } - public NewOrderRequest timeInForce(@jakarta.annotation.Nullable TimeInForce timeInForce) { - this.timeInForce = timeInForce; + public NewOrderRequest reduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { + this.reduceOnly = reduceOnly; return this; } /** - * Get timeInForce + * Get reduceOnly * - * @return timeInForce + * @return reduceOnly */ @jakarta.annotation.Nullable @Valid - public TimeInForce getTimeInForce() { - return timeInForce; + public ReduceOnly getReduceOnly() { + return reduceOnly; } - public void setTimeInForce(@jakarta.annotation.Nullable TimeInForce timeInForce) { - this.timeInForce = timeInForce; + public void setReduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { + this.reduceOnly = reduceOnly; } public NewOrderRequest quantity(@jakarta.annotation.Nullable Double quantity) { @@ -262,7 +262,8 @@ public NewOrderRequest quantity(@jakarta.annotation.Nullable Double quantity) { } /** - * Get quantity + * quantity measured by contract number, Cannot be sent with + * `closePosition`=`true` * * @return quantity */ @@ -276,32 +277,13 @@ public void setQuantity(@jakarta.annotation.Nullable Double quantity) { this.quantity = quantity; } - public NewOrderRequest reduceOnly(@jakarta.annotation.Nullable String reduceOnly) { - this.reduceOnly = reduceOnly; - return this; - } - - /** - * Get reduceOnly - * - * @return reduceOnly - */ - @jakarta.annotation.Nullable - public String getReduceOnly() { - return reduceOnly; - } - - public void setReduceOnly(@jakarta.annotation.Nullable String reduceOnly) { - this.reduceOnly = reduceOnly; - } - public NewOrderRequest price(@jakarta.annotation.Nullable Double price) { this.price = price; return this; } /** - * Get price + * Order price * * @return price */ @@ -321,7 +303,8 @@ public NewOrderRequest newClientOrderId(@jakarta.annotation.Nullable String newC } /** - * Get newClientOrderId + * A unique id among open orders. Automatically generated if not sent. Can only be string + * following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,36}$` * * @return newClientOrderId */ @@ -340,7 +323,7 @@ public NewOrderRequest stopPrice(@jakarta.annotation.Nullable Double stopPrice) } /** - * Get stopPrice + * Used with `STOP/STOP_MARKET` or `TAKE_PROFIT/TAKE_PROFIT_MARKET` orders. * * @return stopPrice */ @@ -360,7 +343,8 @@ public NewOrderRequest closePosition(@jakarta.annotation.Nullable String closePo } /** - * Get closePosition + * `true`, `false`;Close-All,used with `STOP_MARKET` or + * `TAKE_PROFIT_MARKET`. * * @return closePosition */ @@ -379,7 +363,8 @@ public NewOrderRequest activationPrice(@jakarta.annotation.Nullable Double activ } /** - * Get activationPrice + * Used with `TRAILING_STOP_MARKET` orders, default as the latest price(supporting + * different `workingType`) * * @return activationPrice */ @@ -399,7 +384,7 @@ public NewOrderRequest callbackRate(@jakarta.annotation.Nullable Double callback } /** - * Get callbackRate + * Used with `TRAILING_STOP_MARKET` orders, min 0.1, max 10 where 1 for 1% * * @return callbackRate */ @@ -413,6 +398,26 @@ public void setCallbackRate(@jakarta.annotation.Nullable Double callbackRate) { this.callbackRate = callbackRate; } + public NewOrderRequest timeInForce(@jakarta.annotation.Nullable TimeInForce timeInForce) { + this.timeInForce = timeInForce; + return this; + } + + /** + * Get timeInForce + * + * @return timeInForce + */ + @jakarta.annotation.Nullable + @Valid + public TimeInForce getTimeInForce() { + return timeInForce; + } + + public void setTimeInForce(@jakarta.annotation.Nullable TimeInForce timeInForce) { + this.timeInForce = timeInForce; + } + public NewOrderRequest workingType(@jakarta.annotation.Nullable WorkingType workingType) { this.workingType = workingType; return this; @@ -433,7 +438,7 @@ public void setWorkingType(@jakarta.annotation.Nullable WorkingType workingType) this.workingType = workingType; } - public NewOrderRequest priceProtect(@jakarta.annotation.Nullable String priceProtect) { + public NewOrderRequest priceProtect(@jakarta.annotation.Nullable PriceProtect priceProtect) { this.priceProtect = priceProtect; return this; } @@ -444,11 +449,12 @@ public NewOrderRequest priceProtect(@jakarta.annotation.Nullable String pricePro * @return priceProtect */ @jakarta.annotation.Nullable - public String getPriceProtect() { + @Valid + public PriceProtect getPriceProtect() { return priceProtect; } - public void setPriceProtect(@jakarta.annotation.Nullable String priceProtect) { + public void setPriceProtect(@jakarta.annotation.Nullable PriceProtect priceProtect) { this.priceProtect = priceProtect; } @@ -522,11 +528,12 @@ public NewOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -548,15 +555,15 @@ public boolean equals(Object o) { && Objects.equals(this.side, newOrderRequest.side) && Objects.equals(this.positionSide, newOrderRequest.positionSide) && Objects.equals(this.type, newOrderRequest.type) - && Objects.equals(this.timeInForce, newOrderRequest.timeInForce) - && Objects.equals(this.quantity, newOrderRequest.quantity) && Objects.equals(this.reduceOnly, newOrderRequest.reduceOnly) + && Objects.equals(this.quantity, newOrderRequest.quantity) && Objects.equals(this.price, newOrderRequest.price) && Objects.equals(this.newClientOrderId, newOrderRequest.newClientOrderId) && Objects.equals(this.stopPrice, newOrderRequest.stopPrice) && Objects.equals(this.closePosition, newOrderRequest.closePosition) && Objects.equals(this.activationPrice, newOrderRequest.activationPrice) && Objects.equals(this.callbackRate, newOrderRequest.callbackRate) + && Objects.equals(this.timeInForce, newOrderRequest.timeInForce) && Objects.equals(this.workingType, newOrderRequest.workingType) && Objects.equals(this.priceProtect, newOrderRequest.priceProtect) && Objects.equals(this.newOrderRespType, newOrderRequest.newOrderRespType) @@ -573,15 +580,15 @@ public int hashCode() { side, positionSide, type, - timeInForce, - quantity, reduceOnly, + quantity, price, newClientOrderId, stopPrice, closePosition, activationPrice, callbackRate, + timeInForce, workingType, priceProtect, newOrderRespType, @@ -598,15 +605,15 @@ public String toString() { sb.append(" side: ").append(toIndentedString(side)).append("\n"); sb.append(" positionSide: ").append(toIndentedString(positionSide)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" newClientOrderId: ").append(toIndentedString(newClientOrderId)).append("\n"); sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); sb.append(" closePosition: ").append(toIndentedString(closePosition)).append("\n"); sb.append(" activationPrice: ").append(toIndentedString(activationPrice)).append("\n"); sb.append(" callbackRate: ").append(toIndentedString(callbackRate)).append("\n"); + sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" workingType: ").append(toIndentedString(workingType)).append("\n"); sb.append(" priceProtect: ").append(toIndentedString(priceProtect)).append("\n"); sb.append(" newOrderRespType: ").append(toIndentedString(newOrderRespType)).append("\n"); @@ -638,18 +645,14 @@ public String toUrlQueryString() { String typeValueAsString = ""; typeValueAsString = typeValue.toString(); sb.append("type=").append(urlEncode(typeValueAsString)).append(""); - Object timeInForceValue = getTimeInForce(); - String timeInForceValueAsString = ""; - timeInForceValueAsString = timeInForceValue.toString(); - sb.append("timeInForce=").append(urlEncode(timeInForceValueAsString)).append(""); - Object quantityValue = getQuantity(); - String quantityValueAsString = ""; - quantityValueAsString = quantityValue.toString(); - sb.append("quantity=").append(urlEncode(quantityValueAsString)).append(""); Object reduceOnlyValue = getReduceOnly(); String reduceOnlyValueAsString = ""; reduceOnlyValueAsString = reduceOnlyValue.toString(); sb.append("reduceOnly=").append(urlEncode(reduceOnlyValueAsString)).append(""); + Object quantityValue = getQuantity(); + String quantityValueAsString = ""; + quantityValueAsString = quantityValue.toString(); + sb.append("quantity=").append(urlEncode(quantityValueAsString)).append(""); Object priceValue = getPrice(); String priceValueAsString = ""; priceValueAsString = priceValue.toString(); @@ -674,6 +677,10 @@ public String toUrlQueryString() { String callbackRateValueAsString = ""; callbackRateValueAsString = callbackRateValue.toString(); sb.append("callbackRate=").append(urlEncode(callbackRateValueAsString)).append(""); + Object timeInForceValue = getTimeInForce(); + String timeInForceValueAsString = ""; + timeInForceValueAsString = timeInForceValue.toString(); + sb.append("timeInForce=").append(urlEncode(timeInForceValueAsString)).append(""); Object workingTypeValue = getWorkingType(); String workingTypeValueAsString = ""; workingTypeValueAsString = workingTypeValue.toString(); @@ -732,15 +739,15 @@ private String toIndentedString(Object o) { openapiFields.add("side"); openapiFields.add("positionSide"); openapiFields.add("type"); - openapiFields.add("timeInForce"); - openapiFields.add("quantity"); openapiFields.add("reduceOnly"); + openapiFields.add("quantity"); openapiFields.add("price"); openapiFields.add("newClientOrderId"); openapiFields.add("stopPrice"); openapiFields.add("closePosition"); openapiFields.add("activationPrice"); openapiFields.add("callbackRate"); + openapiFields.add("timeInForce"); openapiFields.add("workingType"); openapiFields.add("priceProtect"); openapiFields.add("newOrderRespType"); @@ -797,18 +804,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti PositionSide.validateJsonElement(jsonObj.get("positionSide")); } // validate the required field `type` - Type.validateJsonElement(jsonObj.get("type")); - // validate the optional field `timeInForce` - if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { - TimeInForce.validateJsonElement(jsonObj.get("timeInForce")); - } - if ((jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) - && !jsonObj.get("reduceOnly").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reduceOnly` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reduceOnly").toString())); + OrderType.validateJsonElement(jsonObj.get("type")); + // validate the optional field `reduceOnly` + if (jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) { + ReduceOnly.validateJsonElement(jsonObj.get("reduceOnly")); } if ((jsonObj.get("newClientOrderId") != null && !jsonObj.get("newClientOrderId").isJsonNull()) @@ -827,17 +826,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("closePosition").toString())); } + // validate the optional field `timeInForce` + if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { + TimeInForce.validateJsonElement(jsonObj.get("timeInForce")); + } // validate the optional field `workingType` if (jsonObj.get("workingType") != null && !jsonObj.get("workingType").isJsonNull()) { WorkingType.validateJsonElement(jsonObj.get("workingType")); } - if ((jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) - && !jsonObj.get("priceProtect").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `priceProtect` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("priceProtect").toString())); + // validate the optional field `priceProtect` + if (jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) { + PriceProtect.validateJsonElement(jsonObj.get("priceProtect")); } // validate the optional field `newOrderRespType` if (jsonObj.get("newOrderRespType") != null diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NewOrderRespType.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NewOrderRespType.java index cf93ef51b..1dbd0e7c7 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NewOrderRespType.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NewOrderRespType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NewOrderResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NewOrderResponse.java index 1fcd38dd3..2108177cc 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NewOrderResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NewOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** NewOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewOrderResponse { public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -48,12 +48,6 @@ public class NewOrderResponse { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_BASE = "cumBase"; - - @SerializedName(SERIALIZED_NAME_CUM_BASE) - @jakarta.annotation.Nullable - private String cumBase; - public static final String SERIALIZED_NAME_EXECUTED_QTY = "executedQty"; @SerializedName(SERIALIZED_NAME_EXECUTED_QTY) @@ -66,12 +60,6 @@ public class NewOrderResponse { @jakarta.annotation.Nullable private Long orderId; - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE) - @jakarta.annotation.Nullable - private String avgPrice; - public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; @SerializedName(SERIALIZED_NAME_ORIG_QTY) @@ -90,6 +78,12 @@ public class NewOrderResponse { @jakarta.annotation.Nullable private Boolean reduceOnly; + public static final String SERIALIZED_NAME_CLOSE_POSITION = "closePosition"; + + @SerializedName(SERIALIZED_NAME_CLOSE_POSITION) + @jakarta.annotation.Nullable + private Boolean closePosition; + public static final String SERIALIZED_NAME_SIDE = "side"; @SerializedName(SERIALIZED_NAME_SIDE) @@ -114,12 +108,6 @@ public class NewOrderResponse { @jakarta.annotation.Nullable private String stopPrice; - public static final String SERIALIZED_NAME_CLOSE_POSITION = "closePosition"; - - @SerializedName(SERIALIZED_NAME_CLOSE_POSITION) - @jakarta.annotation.Nullable - private Boolean closePosition; - public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -201,7 +189,7 @@ public NewOrderResponse clientOrderId(@jakarta.annotation.Nullable String client } /** - * Get clientOrderId + * Client order ID. * * @return clientOrderId */ @@ -220,7 +208,7 @@ public NewOrderResponse cumQty(@jakarta.annotation.Nullable String cumQty) { } /** - * Get cumQty + * Cumulative filled quantity. * * @return cumQty */ @@ -233,32 +221,13 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public NewOrderResponse cumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - return this; - } - - /** - * Get cumBase - * - * @return cumBase - */ - @jakarta.annotation.Nullable - public String getCumBase() { - return cumBase; - } - - public void setCumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - } - public NewOrderResponse executedQty(@jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; return this; } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -277,7 +246,7 @@ public NewOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Sub-order ID * * @return orderId */ @@ -290,32 +259,13 @@ public void setOrderId(@jakarta.annotation.Nullable Long orderId) { this.orderId = orderId; } - public NewOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - return this; - } - - /** - * Get avgPrice - * - * @return avgPrice - */ - @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; - } - - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - } - public NewOrderResponse origQty(@jakarta.annotation.Nullable String origQty) { this.origQty = origQty; return this; } /** - * Get origQty + * Original order quantity * * @return origQty */ @@ -334,7 +284,7 @@ public NewOrderResponse price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Latest token price. * * @return price */ @@ -353,7 +303,7 @@ public NewOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean reduceOn } /** - * Get reduceOnly + * Whether the order is reduce-only. * * @return reduceOnly */ @@ -366,13 +316,32 @@ public void setReduceOnly(@jakarta.annotation.Nullable Boolean reduceOnly) { this.reduceOnly = reduceOnly; } + public NewOrderResponse closePosition(@jakarta.annotation.Nullable Boolean closePosition) { + this.closePosition = closePosition; + return this; + } + + /** + * if Close-All + * + * @return closePosition + */ + @jakarta.annotation.Nullable + public Boolean getClosePosition() { + return closePosition; + } + + public void setClosePosition(@jakarta.annotation.Nullable Boolean closePosition) { + this.closePosition = closePosition; + } + public NewOrderResponse side(@jakarta.annotation.Nullable String side) { this.side = side; return this; } /** - * Get side + * Trading side * * @return side */ @@ -391,7 +360,7 @@ public NewOrderResponse positionSide(@jakarta.annotation.Nullable String positio } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -410,7 +379,7 @@ public NewOrderResponse status(@jakarta.annotation.Nullable String status) { } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -429,7 +398,7 @@ public NewOrderResponse stopPrice(@jakarta.annotation.Nullable String stopPrice) } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -442,32 +411,13 @@ public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { this.stopPrice = stopPrice; } - public NewOrderResponse closePosition(@jakarta.annotation.Nullable Boolean closePosition) { - this.closePosition = closePosition; - return this; - } - - /** - * Get closePosition - * - * @return closePosition - */ - @jakarta.annotation.Nullable - public Boolean getClosePosition() { - return closePosition; - } - - public void setClosePosition(@jakarta.annotation.Nullable Boolean closePosition) { - this.closePosition = closePosition; - } - public NewOrderResponse symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -486,7 +436,7 @@ public NewOrderResponse pair(@jakarta.annotation.Nullable String pair) { } /** - * Get pair + * Pair * * @return pair */ @@ -505,7 +455,7 @@ public NewOrderResponse timeInForce(@jakarta.annotation.Nullable String timeInFo } /** - * Get timeInForce + * Time in force * * @return timeInForce */ @@ -524,7 +474,7 @@ public NewOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Order type. * * @return type */ @@ -543,7 +493,7 @@ public NewOrderResponse origType(@jakarta.annotation.Nullable String origType) { } /** - * Get origType + * Original order type. * * @return origType */ @@ -562,7 +512,7 @@ public NewOrderResponse activatePrice(@jakarta.annotation.Nullable String activa } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -581,7 +531,7 @@ public NewOrderResponse priceRate(@jakarta.annotation.Nullable String priceRate) } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -600,7 +550,7 @@ public NewOrderResponse updateTime(@jakarta.annotation.Nullable Long updateTime) } /** - * Get updateTime + * update time * * @return updateTime */ @@ -619,7 +569,7 @@ public NewOrderResponse workingType(@jakarta.annotation.Nullable String workingT } /** - * Get workingType + * Stop trigger price type. * * @return workingType */ @@ -638,7 +588,7 @@ public NewOrderResponse priceProtect(@jakarta.annotation.Nullable Boolean priceP } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -657,7 +607,7 @@ public NewOrderResponse priceMatch(@jakarta.annotation.Nullable String priceMatc } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -677,7 +627,7 @@ public NewOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -702,18 +652,16 @@ public boolean equals(Object o) { NewOrderResponse newOrderResponse = (NewOrderResponse) o; return Objects.equals(this.clientOrderId, newOrderResponse.clientOrderId) && Objects.equals(this.cumQty, newOrderResponse.cumQty) - && Objects.equals(this.cumBase, newOrderResponse.cumBase) && Objects.equals(this.executedQty, newOrderResponse.executedQty) && Objects.equals(this.orderId, newOrderResponse.orderId) - && Objects.equals(this.avgPrice, newOrderResponse.avgPrice) && Objects.equals(this.origQty, newOrderResponse.origQty) && Objects.equals(this.price, newOrderResponse.price) && Objects.equals(this.reduceOnly, newOrderResponse.reduceOnly) + && Objects.equals(this.closePosition, newOrderResponse.closePosition) && Objects.equals(this.side, newOrderResponse.side) && Objects.equals(this.positionSide, newOrderResponse.positionSide) && Objects.equals(this.status, newOrderResponse.status) && Objects.equals(this.stopPrice, newOrderResponse.stopPrice) - && Objects.equals(this.closePosition, newOrderResponse.closePosition) && Objects.equals(this.symbol, newOrderResponse.symbol) && Objects.equals(this.pair, newOrderResponse.pair) && Objects.equals(this.timeInForce, newOrderResponse.timeInForce) @@ -734,18 +682,16 @@ public int hashCode() { return Objects.hash( clientOrderId, cumQty, - cumBase, executedQty, orderId, - avgPrice, origQty, price, reduceOnly, + closePosition, side, positionSide, status, stopPrice, - closePosition, symbol, pair, timeInForce, @@ -766,18 +712,16 @@ public String toString() { sb.append("class NewOrderResponse {\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumBase: ").append(toIndentedString(cumBase)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); + sb.append(" closePosition: ").append(toIndentedString(closePosition)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); sb.append(" positionSide: ").append(toIndentedString(positionSide)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); - sb.append(" closePosition: ").append(toIndentedString(closePosition)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" pair: ").append(toIndentedString(pair)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); @@ -807,10 +751,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = ""; cumQtyValueAsString = cumQtyValue.toString(); sb.append("cumQty=").append(urlEncode(cumQtyValueAsString)).append(""); - Object cumBaseValue = getCumBase(); - String cumBaseValueAsString = ""; - cumBaseValueAsString = cumBaseValue.toString(); - sb.append("cumBase=").append(urlEncode(cumBaseValueAsString)).append(""); Object executedQtyValue = getExecutedQty(); String executedQtyValueAsString = ""; executedQtyValueAsString = executedQtyValue.toString(); @@ -819,10 +759,6 @@ public String toUrlQueryString() { String orderIdValueAsString = ""; orderIdValueAsString = orderIdValue.toString(); sb.append("orderId=").append(urlEncode(orderIdValueAsString)).append(""); - Object avgPriceValue = getAvgPrice(); - String avgPriceValueAsString = ""; - avgPriceValueAsString = avgPriceValue.toString(); - sb.append("avgPrice=").append(urlEncode(avgPriceValueAsString)).append(""); Object origQtyValue = getOrigQty(); String origQtyValueAsString = ""; origQtyValueAsString = origQtyValue.toString(); @@ -835,6 +771,10 @@ public String toUrlQueryString() { String reduceOnlyValueAsString = ""; reduceOnlyValueAsString = reduceOnlyValue.toString(); sb.append("reduceOnly=").append(urlEncode(reduceOnlyValueAsString)).append(""); + Object closePositionValue = getClosePosition(); + String closePositionValueAsString = ""; + closePositionValueAsString = closePositionValue.toString(); + sb.append("closePosition=").append(urlEncode(closePositionValueAsString)).append(""); Object sideValue = getSide(); String sideValueAsString = ""; sideValueAsString = sideValue.toString(); @@ -851,10 +791,6 @@ public String toUrlQueryString() { String stopPriceValueAsString = ""; stopPriceValueAsString = stopPriceValue.toString(); sb.append("stopPrice=").append(urlEncode(stopPriceValueAsString)).append(""); - Object closePositionValue = getClosePosition(); - String closePositionValueAsString = ""; - closePositionValueAsString = closePositionValue.toString(); - sb.append("closePosition=").append(urlEncode(closePositionValueAsString)).append(""); Object symbolValue = getSymbol(); String symbolValueAsString = ""; symbolValueAsString = symbolValue.toString(); @@ -935,18 +871,16 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("clientOrderId"); openapiFields.add("cumQty"); - openapiFields.add("cumBase"); openapiFields.add("executedQty"); openapiFields.add("orderId"); - openapiFields.add("avgPrice"); openapiFields.add("origQty"); openapiFields.add("price"); openapiFields.add("reduceOnly"); + openapiFields.add("closePosition"); openapiFields.add("side"); openapiFields.add("positionSide"); openapiFields.add("status"); openapiFields.add("stopPrice"); - openapiFields.add("closePosition"); openapiFields.add("symbol"); openapiFields.add("pair"); openapiFields.add("timeInForce"); @@ -998,14 +932,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumBase") != null && !jsonObj.get("cumBase").isJsonNull()) - && !jsonObj.get("cumBase").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumBase` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("cumBase").toString())); - } if ((jsonObj.get("executedQty") != null && !jsonObj.get("executedQty").isJsonNull()) && !jsonObj.get("executedQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1014,14 +940,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("executedQty").toString())); } - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) && !jsonObj.get("origQty").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForPairResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForPairResponse.java index 84975835a..e085ca38d 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForPairResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForPairResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** NotionalBracketForPairResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NotionalBracketForPairResponse extends ArrayList { public NotionalBracketForPairResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForPairResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForPairResponseInner.java index 631be7f27..e80bd59c0 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForPairResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForPairResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** NotionalBracketForPairResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NotionalBracketForPairResponseInner { public static final String SERIALIZED_NAME_PAIR = "pair"; @@ -62,7 +62,7 @@ public NotionalBracketForPairResponseInner pair(@jakarta.annotation.Nullable Str } /** - * Get pair + * Pair * * @return pair */ @@ -92,7 +92,7 @@ public NotionalBracketForPairResponseInner addBracketsItem( } /** - * Get brackets + * Leverage bracket details. * * @return brackets */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForPairResponseInnerBracketsInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForPairResponseInnerBracketsInner.java index f9909a192..cd36adcfd 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForPairResponseInnerBracketsInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForPairResponseInnerBracketsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** NotionalBracketForPairResponseInnerBracketsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NotionalBracketForPairResponseInnerBracketsInner { public static final String SERIALIZED_NAME_BRACKET = "bracket"; @@ -82,7 +82,7 @@ public NotionalBracketForPairResponseInnerBracketsInner bracket( } /** - * Get bracket + * bracket level * * @return bracket */ @@ -102,7 +102,7 @@ public NotionalBracketForPairResponseInnerBracketsInner initialLeverage( } /** - * Get initialLeverage + * the maximum leverage * * @return initialLeverage */ @@ -122,7 +122,7 @@ public NotionalBracketForPairResponseInnerBracketsInner qtyCap( } /** - * Get qtyCap + * upper edge of base asset quantity * * @return qtyCap */ @@ -142,7 +142,7 @@ public NotionalBracketForPairResponseInnerBracketsInner qtylFloor( } /** - * Get qtylFloor + * lower edge of base asset quantity * * @return qtylFloor */ @@ -162,7 +162,7 @@ public NotionalBracketForPairResponseInnerBracketsInner maintMarginRatio( } /** - * Get maintMarginRatio + * Maintenance margin ratio. * * @return maintMarginRatio */ @@ -183,7 +183,7 @@ public NotionalBracketForPairResponseInnerBracketsInner cum( } /** - * Get cum + * Cumulative value. * * @return cum */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForSymbolResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForSymbolResponse.java index 23f164f44..b306cd6c4 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForSymbolResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForSymbolResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** NotionalBracketForSymbolResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NotionalBracketForSymbolResponse extends ArrayList { public NotionalBracketForSymbolResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForSymbolResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForSymbolResponseInner.java index fdb870554..b93f11111 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForSymbolResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/NotionalBracketForSymbolResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** NotionalBracketForSymbolResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NotionalBracketForSymbolResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -69,7 +69,7 @@ public NotionalBracketForSymbolResponseInner symbol( } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -89,7 +89,7 @@ public NotionalBracketForSymbolResponseInner notionalCoef( } /** - * Get notionalCoef + * user symbol bracket multiplier, only appears when user's symbol bracket is adjusted * * @return notionalCoef */ @@ -120,7 +120,7 @@ public NotionalBracketForSymbolResponseInner addBracketsItem( } /** - * Get brackets + * Leverage bracket details. * * @return brackets */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OldTradesLookupResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OldTradesLookupResponse.java index 9e1333149..b0bad4a06 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OldTradesLookupResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OldTradesLookupResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OldTradesLookupResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OldTradesLookupResponse extends ArrayList { public OldTradesLookupResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OldTradesLookupResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OldTradesLookupResponseInner.java index b2b71c4bc..ab831ac88 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OldTradesLookupResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OldTradesLookupResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OldTradesLookupResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OldTradesLookupResponseInner { public static final String SERIALIZED_NAME_ID = "id"; @@ -80,7 +80,7 @@ public OldTradesLookupResponseInner id(@jakarta.annotation.Nullable Long id) { } /** - * Get id + * positionId * * @return id */ @@ -99,7 +99,7 @@ public OldTradesLookupResponseInner price(@jakarta.annotation.Nullable String pr } /** - * Get price + * Latest token price. * * @return price */ @@ -118,7 +118,7 @@ public OldTradesLookupResponseInner qty(@jakarta.annotation.Nullable String qty) } /** - * Get qty + * Quantity. * * @return qty */ @@ -137,7 +137,7 @@ public OldTradesLookupResponseInner baseQty(@jakarta.annotation.Nullable String } /** - * Get baseQty + * Base asset quantity. * * @return baseQty */ @@ -156,7 +156,7 @@ public OldTradesLookupResponseInner time(@jakarta.annotation.Nullable Long time) } /** - * Get time + * Time * * @return time */ @@ -176,7 +176,7 @@ public OldTradesLookupResponseInner isBuyerMaker( } /** - * Get isBuyerMaker + * Whether buyer is market maker. * * @return isBuyerMaker */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OpenInterestResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OpenInterestResponse.java index 470ab384a..c6c736012 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OpenInterestResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OpenInterestResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OpenInterestResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenInterestResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -74,7 +74,7 @@ public OpenInterestResponse symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -93,7 +93,7 @@ public OpenInterestResponse pair(@jakarta.annotation.Nullable String pair) { } /** - * Get pair + * Pair * * @return pair */ @@ -112,7 +112,7 @@ public OpenInterestResponse openInterest(@jakarta.annotation.Nullable String ope } /** - * Get openInterest + * Open interest. * * @return openInterest */ @@ -131,7 +131,7 @@ public OpenInterestResponse contractType(@jakarta.annotation.Nullable String con } /** - * Get contractType + * Contract type. * * @return contractType */ @@ -150,7 +150,7 @@ public OpenInterestResponse time(@jakarta.annotation.Nullable Long time) { } /** - * Get time + * Time * * @return time */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OpenInterestStatisticsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OpenInterestStatisticsResponse.java index 072f0b1b9..9ec9d44b3 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OpenInterestStatisticsResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OpenInterestStatisticsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OpenInterestStatisticsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenInterestStatisticsResponse extends ArrayList { public OpenInterestStatisticsResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OpenInterestStatisticsResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OpenInterestStatisticsResponseInner.java index 3e5c7156c..33d51b4fc 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OpenInterestStatisticsResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OpenInterestStatisticsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OpenInterestStatisticsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenInterestStatisticsResponseInner { public static final String SERIALIZED_NAME_PAIR = "pair"; @@ -74,7 +74,7 @@ public OpenInterestStatisticsResponseInner pair(@jakarta.annotation.Nullable Str } /** - * Get pair + * Pair * * @return pair */ @@ -94,7 +94,7 @@ public OpenInterestStatisticsResponseInner contractType( } /** - * Get contractType + * Contract type. * * @return contractType */ @@ -114,7 +114,7 @@ public OpenInterestStatisticsResponseInner sumOpenInterest( } /** - * Get sumOpenInterest + * unit: cont * * @return sumOpenInterest */ @@ -134,7 +134,7 @@ public OpenInterestStatisticsResponseInner sumOpenInterestValue( } /** - * Get sumOpenInterestValue + * unit: base asset * * @return sumOpenInterestValue */ @@ -154,7 +154,7 @@ public OpenInterestStatisticsResponseInner timestamp( } /** - * Get timestamp + * Timestamp in milliseconds. * * @return timestamp */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrderBookResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrderBookResponse.java index c581670d5..735458daa 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrderBookResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrderBookResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -39,7 +39,7 @@ /** OrderBookResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderBookResponse { public static final String SERIALIZED_NAME_LAST_UPDATE_ID = "lastUpdateId"; @@ -75,13 +75,13 @@ public class OrderBookResponse { @SerializedName(SERIALIZED_NAME_BIDS) @jakarta.annotation.Nullable - private List bids; + private List> bids; public static final String SERIALIZED_NAME_ASKS = "asks"; @SerializedName(SERIALIZED_NAME_ASKS) @jakarta.annotation.Nullable - private List asks; + private List> asks; public OrderBookResponse() {} @@ -91,7 +91,7 @@ public OrderBookResponse lastUpdateId(@jakarta.annotation.Nullable Long lastUpda } /** - * Get lastUpdateId + * Last update ID. * * @return lastUpdateId */ @@ -110,7 +110,7 @@ public OrderBookResponse symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -129,7 +129,7 @@ public OrderBookResponse pair(@jakarta.annotation.Nullable String pair) { } /** - * Get pair + * Pair * * @return pair */ @@ -148,7 +148,7 @@ public OrderBookResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Message output time * * @return E */ @@ -167,7 +167,7 @@ public OrderBookResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction time * * @return T */ @@ -180,13 +180,12 @@ public void setT(@jakarta.annotation.Nullable Long T) { this.T = T; } - public OrderBookResponse bids( - @jakarta.annotation.Nullable List bids) { + public OrderBookResponse bids(@jakarta.annotation.Nullable List> bids) { this.bids = bids; return this; } - public OrderBookResponse addBidsItem(OrderBookResponseBidsItem bidsItem) { + public OrderBookResponse addBidsItem(List bidsItem) { if (this.bids == null) { this.bids = new ArrayList<>(); } @@ -195,27 +194,26 @@ public OrderBookResponse addBidsItem(OrderBookResponseBidsItem bidsItem) { } /** - * Get bids + * Bid orders. Each entry is [price, quantity]. * * @return bids */ @jakarta.annotation.Nullable @Valid - public List getBids() { + public List> getBids() { return bids; } - public void setBids(@jakarta.annotation.Nullable List bids) { + public void setBids(@jakarta.annotation.Nullable List> bids) { this.bids = bids; } - public OrderBookResponse asks( - @jakarta.annotation.Nullable List asks) { + public OrderBookResponse asks(@jakarta.annotation.Nullable List> asks) { this.asks = asks; return this; } - public OrderBookResponse addAsksItem(OrderBookResponseAsksItem asksItem) { + public OrderBookResponse addAsksItem(List asksItem) { if (this.asks == null) { this.asks = new ArrayList<>(); } @@ -224,17 +222,17 @@ public OrderBookResponse addAsksItem(OrderBookResponseAsksItem asksItem) { } /** - * Get asks + * Ask orders. Each entry is [price, quantity]. * * @return asks */ @jakarta.annotation.Nullable @Valid - public List getAsks() { + public List> getAsks() { return asks; } - public void setAsks(@jakarta.annotation.Nullable List asks) { + public void setAsks(@jakarta.annotation.Nullable List> asks) { this.asks = asks; } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrderBookResponseAsksItem.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrderBookResponseAsksItem.java deleted file mode 100644 index 3a1cce1dc..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrderBookResponseAsksItem.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** OrderBookResponseAsksItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OrderBookResponseAsksItem extends ArrayList { - public OrderBookResponseAsksItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrderBookResponseAsksItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OrderBookResponseAsksItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - if (!element.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected array items to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - } - if (jsonElement == null) { - if (!OrderBookResponseAsksItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OrderBookResponseAsksItem is not found" - + " in the empty JSON string", - OrderBookResponseAsksItem.openapiRequiredFields.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrderBookResponseAsksItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OrderBookResponseAsksItem' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(OrderBookResponseAsksItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OrderBookResponseAsksItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public OrderBookResponseAsksItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OrderBookResponseAsksItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrderBookResponseAsksItem - * @throws IOException if the JSON string is invalid with respect to OrderBookResponseAsksItem - */ - public static OrderBookResponseAsksItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OrderBookResponseAsksItem.class); - } - - /** - * Convert an instance of OrderBookResponseAsksItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrderBookResponseBidsItem.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrderBookResponseBidsItem.java deleted file mode 100644 index 39f16d5ac..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrderBookResponseBidsItem.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** OrderBookResponseBidsItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OrderBookResponseBidsItem extends ArrayList { - public OrderBookResponseBidsItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrderBookResponseBidsItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OrderBookResponseBidsItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - if (!element.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected array items to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - } - if (jsonElement == null) { - if (!OrderBookResponseBidsItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OrderBookResponseBidsItem is not found" - + " in the empty JSON string", - OrderBookResponseBidsItem.openapiRequiredFields.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrderBookResponseBidsItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OrderBookResponseBidsItem' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(OrderBookResponseBidsItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OrderBookResponseBidsItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public OrderBookResponseBidsItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OrderBookResponseBidsItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrderBookResponseBidsItem - * @throws IOException if the JSON string is invalid with respect to OrderBookResponseBidsItem - */ - public static OrderBookResponseBidsItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OrderBookResponseBidsItem.class); - } - - /** - * Convert an instance of OrderBookResponseBidsItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrderIdList.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrderIdList.java index a44232d0d..b2ea715cf 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrderIdList.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrderIdList.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderIdList */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderIdList extends ArrayList { public OrderIdList() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrderType.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrderType.java new file mode 100644 index 000000000..6db94366d --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrderType.java @@ -0,0 +1,88 @@ +/* + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** + * **After CM migration, stop-type values (`STOP`, `STOP_MARKET`, + * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`, `TRAILING_STOP_MARKET`) are no + * longer accepted by this endpoint and will return `-4120`. Use the new + * `/dapi/v1/algoOrder` endpoint instead.** + */ +@JsonAdapter(OrderType.Adapter.class) +public enum OrderType { + LIMIT("LIMIT"), + + MARKET("MARKET"), + + STOP("STOP"), + + STOP_MARKET("STOP_MARKET"), + + TAKE_PROFIT("TAKE_PROFIT"), + + TAKE_PROFIT_MARKET("TAKE_PROFIT_MARKET"), + + TRAILING_STOP_MARKET("TRAILING_STOP_MARKET"); + + private String value; + + OrderType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderType fromValue(String value) { + for (OrderType b : OrderType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderType.fromValue(value); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrigClientOrderIdList.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrigClientOrderIdList.java index 5836f2a42..41c6367f3 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrigClientOrderIdList.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/OrigClientOrderIdList.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrigClientOrderIdList */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrigClientOrderIdList extends ArrayList { public OrigClientOrderIdList() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Period.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Period.java index 492e2f9dc..9e66c713d 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Period.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Period.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PlaceMultipleOrdersRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PlaceMultipleOrdersRequest.java index 0832bc93a..f1d3ca6ae 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PlaceMultipleOrdersRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PlaceMultipleOrdersRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,13 +35,13 @@ /** PlaceMultipleOrdersRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PlaceMultipleOrdersRequest { public static final String SERIALIZED_NAME_BATCH_ORDERS = "batchOrders"; @SerializedName(SERIALIZED_NAME_BATCH_ORDERS) @jakarta.annotation.Nonnull - private BatchOrdersPlaceMultipleOrders batchOrders; + private BatchOrders batchOrders; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -52,7 +52,7 @@ public class PlaceMultipleOrdersRequest { public PlaceMultipleOrdersRequest() {} public PlaceMultipleOrdersRequest batchOrders( - @jakarta.annotation.Nonnull BatchOrdersPlaceMultipleOrders batchOrders) { + @jakarta.annotation.Nonnull BatchOrders batchOrders) { this.batchOrders = batchOrders; return this; } @@ -65,12 +65,11 @@ public PlaceMultipleOrdersRequest batchOrders( @jakarta.annotation.Nonnull @NotNull @Valid - public BatchOrdersPlaceMultipleOrders getBatchOrders() { + public BatchOrders getBatchOrders() { return batchOrders; } - public void setBatchOrders( - @jakarta.annotation.Nonnull BatchOrdersPlaceMultipleOrders batchOrders) { + public void setBatchOrders(@jakarta.annotation.Nonnull BatchOrders batchOrders) { this.batchOrders = batchOrders; } @@ -80,11 +79,12 @@ public PlaceMultipleOrdersRequest recvWindow(@jakarta.annotation.Nullable Long r } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PlaceMultipleOrdersResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PlaceMultipleOrdersResponse.java index 8e0b2857a..373a48dc4 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PlaceMultipleOrdersResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PlaceMultipleOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PlaceMultipleOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PlaceMultipleOrdersResponse extends ArrayList { public PlaceMultipleOrdersResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PlaceMultipleOrdersResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PlaceMultipleOrdersResponseInner.java index 00f1cfd50..088b3af3c 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PlaceMultipleOrdersResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PlaceMultipleOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PlaceMultipleOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PlaceMultipleOrdersResponseInner { public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -48,12 +48,6 @@ public class PlaceMultipleOrdersResponseInner { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_BASE = "cumBase"; - - @SerializedName(SERIALIZED_NAME_CUM_BASE) - @jakarta.annotation.Nullable - private String cumBase; - public static final String SERIALIZED_NAME_EXECUTED_QTY = "executedQty"; @SerializedName(SERIALIZED_NAME_EXECUTED_QTY) @@ -66,12 +60,6 @@ public class PlaceMultipleOrdersResponseInner { @jakarta.annotation.Nullable private Long orderId; - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE) - @jakarta.annotation.Nullable - private String avgPrice; - public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; @SerializedName(SERIALIZED_NAME_ORIG_QTY) @@ -114,6 +102,12 @@ public class PlaceMultipleOrdersResponseInner { @jakarta.annotation.Nullable private String stopPrice; + public static final String SERIALIZED_NAME_CLOSE_POSITION = "closePosition"; + + @SerializedName(SERIALIZED_NAME_CLOSE_POSITION) + @jakarta.annotation.Nullable + private Boolean closePosition; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -208,7 +202,7 @@ public PlaceMultipleOrdersResponseInner clientOrderId( } /** - * Get clientOrderId + * Client order ID. * * @return clientOrderId */ @@ -227,7 +221,7 @@ public PlaceMultipleOrdersResponseInner cumQty(@jakarta.annotation.Nullable Stri } /** - * Get cumQty + * Cumulative filled quantity. * * @return cumQty */ @@ -240,25 +234,6 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public PlaceMultipleOrdersResponseInner cumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - return this; - } - - /** - * Get cumBase - * - * @return cumBase - */ - @jakarta.annotation.Nullable - public String getCumBase() { - return cumBase; - } - - public void setCumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - } - public PlaceMultipleOrdersResponseInner executedQty( @jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; @@ -266,7 +241,7 @@ public PlaceMultipleOrdersResponseInner executedQty( } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -285,7 +260,7 @@ public PlaceMultipleOrdersResponseInner orderId(@jakarta.annotation.Nullable Lon } /** - * Get orderId + * Sub-order ID * * @return orderId */ @@ -298,32 +273,13 @@ public void setOrderId(@jakarta.annotation.Nullable Long orderId) { this.orderId = orderId; } - public PlaceMultipleOrdersResponseInner avgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - return this; - } - - /** - * Get avgPrice - * - * @return avgPrice - */ - @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; - } - - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - } - public PlaceMultipleOrdersResponseInner origQty(@jakarta.annotation.Nullable String origQty) { this.origQty = origQty; return this; } /** - * Get origQty + * Original order quantity * * @return origQty */ @@ -342,7 +298,7 @@ public PlaceMultipleOrdersResponseInner price(@jakarta.annotation.Nullable Strin } /** - * Get price + * Latest token price. * * @return price */ @@ -362,7 +318,7 @@ public PlaceMultipleOrdersResponseInner reduceOnly( } /** - * Get reduceOnly + * Whether the order is reduce-only. * * @return reduceOnly */ @@ -381,7 +337,7 @@ public PlaceMultipleOrdersResponseInner side(@jakarta.annotation.Nullable String } /** - * Get side + * Trading side * * @return side */ @@ -401,7 +357,7 @@ public PlaceMultipleOrdersResponseInner positionSide( } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -420,7 +376,7 @@ public PlaceMultipleOrdersResponseInner status(@jakarta.annotation.Nullable Stri } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -440,7 +396,7 @@ public PlaceMultipleOrdersResponseInner stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -453,13 +409,33 @@ public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { this.stopPrice = stopPrice; } + public PlaceMultipleOrdersResponseInner closePosition( + @jakarta.annotation.Nullable Boolean closePosition) { + this.closePosition = closePosition; + return this; + } + + /** + * if Close-All + * + * @return closePosition + */ + @jakarta.annotation.Nullable + public Boolean getClosePosition() { + return closePosition; + } + + public void setClosePosition(@jakarta.annotation.Nullable Boolean closePosition) { + this.closePosition = closePosition; + } + public PlaceMultipleOrdersResponseInner symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -478,7 +454,7 @@ public PlaceMultipleOrdersResponseInner pair(@jakarta.annotation.Nullable String } /** - * Get pair + * Pair * * @return pair */ @@ -498,7 +474,7 @@ public PlaceMultipleOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time in force * * @return timeInForce */ @@ -517,7 +493,7 @@ public PlaceMultipleOrdersResponseInner type(@jakarta.annotation.Nullable String } /** - * Get type + * Order type. * * @return type */ @@ -536,7 +512,7 @@ public PlaceMultipleOrdersResponseInner origType(@jakarta.annotation.Nullable St } /** - * Get origType + * Original order type. * * @return origType */ @@ -556,7 +532,7 @@ public PlaceMultipleOrdersResponseInner activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -576,7 +552,7 @@ public PlaceMultipleOrdersResponseInner priceRate( } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -596,7 +572,7 @@ public PlaceMultipleOrdersResponseInner updateTime( } /** - * Get updateTime + * update time * * @return updateTime */ @@ -616,7 +592,7 @@ public PlaceMultipleOrdersResponseInner workingType( } /** - * Get workingType + * Stop trigger price type. * * @return workingType */ @@ -636,7 +612,7 @@ public PlaceMultipleOrdersResponseInner priceProtect( } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -656,7 +632,7 @@ public PlaceMultipleOrdersResponseInner priceMatch( } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -676,7 +652,7 @@ public PlaceMultipleOrdersResponseInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -696,7 +672,7 @@ public PlaceMultipleOrdersResponseInner code(@jakarta.annotation.Nullable Long c } /** - * Get code + * API response code. \"000000\" indicates success. * * @return code */ @@ -715,7 +691,7 @@ public PlaceMultipleOrdersResponseInner msg(@jakarta.annotation.Nullable String } /** - * Get msg + * Message details. * * @return msg */ @@ -740,10 +716,8 @@ public boolean equals(Object o) { (PlaceMultipleOrdersResponseInner) o; return Objects.equals(this.clientOrderId, placeMultipleOrdersResponseInner.clientOrderId) && Objects.equals(this.cumQty, placeMultipleOrdersResponseInner.cumQty) - && Objects.equals(this.cumBase, placeMultipleOrdersResponseInner.cumBase) && Objects.equals(this.executedQty, placeMultipleOrdersResponseInner.executedQty) && Objects.equals(this.orderId, placeMultipleOrdersResponseInner.orderId) - && Objects.equals(this.avgPrice, placeMultipleOrdersResponseInner.avgPrice) && Objects.equals(this.origQty, placeMultipleOrdersResponseInner.origQty) && Objects.equals(this.price, placeMultipleOrdersResponseInner.price) && Objects.equals(this.reduceOnly, placeMultipleOrdersResponseInner.reduceOnly) @@ -751,6 +725,8 @@ public boolean equals(Object o) { && Objects.equals(this.positionSide, placeMultipleOrdersResponseInner.positionSide) && Objects.equals(this.status, placeMultipleOrdersResponseInner.status) && Objects.equals(this.stopPrice, placeMultipleOrdersResponseInner.stopPrice) + && Objects.equals( + this.closePosition, placeMultipleOrdersResponseInner.closePosition) && Objects.equals(this.symbol, placeMultipleOrdersResponseInner.symbol) && Objects.equals(this.pair, placeMultipleOrdersResponseInner.pair) && Objects.equals(this.timeInForce, placeMultipleOrdersResponseInner.timeInForce) @@ -775,10 +751,8 @@ public int hashCode() { return Objects.hash( clientOrderId, cumQty, - cumBase, executedQty, orderId, - avgPrice, origQty, price, reduceOnly, @@ -786,6 +760,7 @@ public int hashCode() { positionSide, status, stopPrice, + closePosition, symbol, pair, timeInForce, @@ -808,10 +783,8 @@ public String toString() { sb.append("class PlaceMultipleOrdersResponseInner {\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumBase: ").append(toIndentedString(cumBase)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); @@ -819,6 +792,7 @@ public String toString() { sb.append(" positionSide: ").append(toIndentedString(positionSide)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" closePosition: ").append(toIndentedString(closePosition)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" pair: ").append(toIndentedString(pair)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); @@ -850,10 +824,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = ""; cumQtyValueAsString = cumQtyValue.toString(); sb.append("cumQty=").append(urlEncode(cumQtyValueAsString)).append(""); - Object cumBaseValue = getCumBase(); - String cumBaseValueAsString = ""; - cumBaseValueAsString = cumBaseValue.toString(); - sb.append("cumBase=").append(urlEncode(cumBaseValueAsString)).append(""); Object executedQtyValue = getExecutedQty(); String executedQtyValueAsString = ""; executedQtyValueAsString = executedQtyValue.toString(); @@ -862,10 +832,6 @@ public String toUrlQueryString() { String orderIdValueAsString = ""; orderIdValueAsString = orderIdValue.toString(); sb.append("orderId=").append(urlEncode(orderIdValueAsString)).append(""); - Object avgPriceValue = getAvgPrice(); - String avgPriceValueAsString = ""; - avgPriceValueAsString = avgPriceValue.toString(); - sb.append("avgPrice=").append(urlEncode(avgPriceValueAsString)).append(""); Object origQtyValue = getOrigQty(); String origQtyValueAsString = ""; origQtyValueAsString = origQtyValue.toString(); @@ -894,6 +860,10 @@ public String toUrlQueryString() { String stopPriceValueAsString = ""; stopPriceValueAsString = stopPriceValue.toString(); sb.append("stopPrice=").append(urlEncode(stopPriceValueAsString)).append(""); + Object closePositionValue = getClosePosition(); + String closePositionValueAsString = ""; + closePositionValueAsString = closePositionValue.toString(); + sb.append("closePosition=").append(urlEncode(closePositionValueAsString)).append(""); Object symbolValue = getSymbol(); String symbolValueAsString = ""; symbolValueAsString = symbolValue.toString(); @@ -982,10 +952,8 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("clientOrderId"); openapiFields.add("cumQty"); - openapiFields.add("cumBase"); openapiFields.add("executedQty"); openapiFields.add("orderId"); - openapiFields.add("avgPrice"); openapiFields.add("origQty"); openapiFields.add("price"); openapiFields.add("reduceOnly"); @@ -993,6 +961,7 @@ private String toIndentedString(Object o) { openapiFields.add("positionSide"); openapiFields.add("status"); openapiFields.add("stopPrice"); + openapiFields.add("closePosition"); openapiFields.add("symbol"); openapiFields.add("pair"); openapiFields.add("timeInForce"); @@ -1047,14 +1016,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumBase") != null && !jsonObj.get("cumBase").isJsonNull()) - && !jsonObj.get("cumBase").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumBase` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("cumBase").toString())); - } if ((jsonObj.get("executedQty") != null && !jsonObj.get("executedQty").isJsonNull()) && !jsonObj.get("executedQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1063,14 +1024,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("executedQty").toString())); } - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) && !jsonObj.get("origQty").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionAdlQuantileEstimationResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionAdlQuantileEstimationResponse.java index 75add4082..0321d37f8 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionAdlQuantileEstimationResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionAdlQuantileEstimationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PositionAdlQuantileEstimationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionAdlQuantileEstimationResponse extends ArrayList { public PositionAdlQuantileEstimationResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionAdlQuantileEstimationResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionAdlQuantileEstimationResponseInner.java index d6f6a5cc0..f658b9316 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionAdlQuantileEstimationResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionAdlQuantileEstimationResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** PositionAdlQuantileEstimationResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionAdlQuantileEstimationResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -58,7 +58,7 @@ public PositionAdlQuantileEstimationResponseInner symbol( } /** - * Get symbol + * Trading symbol * * @return symbol */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionAdlQuantileEstimationResponseInnerAdlQuantile.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionAdlQuantileEstimationResponseInnerAdlQuantile.java index 1056ac841..3beeecd0f 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionAdlQuantileEstimationResponseInnerAdlQuantile.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionAdlQuantileEstimationResponseInnerAdlQuantile.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** PositionAdlQuantileEstimationResponseInnerAdlQuantile */ +/** ADL quantile information. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionAdlQuantileEstimationResponseInnerAdlQuantile { public static final String SERIALIZED_NAME_L_O_N_G = "LONG"; @@ -69,7 +69,7 @@ public PositionAdlQuantileEstimationResponseInnerAdlQuantile LONG( } /** - * Get LONG + * adl quantile for \"LONG\" position in hedge mode * * @return LONG */ @@ -89,7 +89,7 @@ public PositionAdlQuantileEstimationResponseInnerAdlQuantile SHORT( } /** - * Get SHORT + * adl qauntile for \"SHORT\" position in hedge mode * * @return SHORT */ @@ -109,7 +109,7 @@ public PositionAdlQuantileEstimationResponseInnerAdlQuantile HEDGE( } /** - * Get HEDGE + * Hedge mode ADL quantile. * * @return HEDGE */ @@ -129,7 +129,7 @@ public PositionAdlQuantileEstimationResponseInnerAdlQuantile BOTH( } /** - * Get BOTH + * One-way mode ADL quantile. * * @return BOTH */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionInformationResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionInformationResponse.java index c9640f4d4..9f68c8b4a 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionInformationResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionInformationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PositionInformationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionInformationResponse extends ArrayList { public PositionInformationResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionInformationResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionInformationResponseInner.java index 9d5914140..6cebc9f7d 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionInformationResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionInformationResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PositionInformationResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionInformationResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -128,7 +128,7 @@ public PositionInformationResponseInner symbol(@jakarta.annotation.Nullable Stri } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -148,7 +148,7 @@ public PositionInformationResponseInner positionAmt( } /** - * Get positionAmt + * position amount * * @return positionAmt */ @@ -168,7 +168,7 @@ public PositionInformationResponseInner entryPrice( } /** - * Get entryPrice + * Position entry price. * * @return entryPrice */ @@ -188,7 +188,7 @@ public PositionInformationResponseInner breakEvenPrice( } /** - * Get breakEvenPrice + * break-even price * * @return breakEvenPrice */ @@ -208,7 +208,7 @@ public PositionInformationResponseInner markPrice( } /** - * Get markPrice + * mark price * * @return markPrice */ @@ -228,7 +228,7 @@ public PositionInformationResponseInner unRealizedProfit( } /** - * Get unRealizedProfit + * Unrealized profit. * * @return unRealizedProfit */ @@ -248,7 +248,7 @@ public PositionInformationResponseInner liquidationPrice( } /** - * Get liquidationPrice + * Liquidation price. * * @return liquidationPrice */ @@ -267,7 +267,7 @@ public PositionInformationResponseInner leverage(@jakarta.annotation.Nullable St } /** - * Get leverage + * Leverage value. * * @return leverage */ @@ -286,7 +286,7 @@ public PositionInformationResponseInner maxQty(@jakarta.annotation.Nullable Stri } /** - * Get maxQty + * maximum quantity of base asset * * @return maxQty */ @@ -306,7 +306,7 @@ public PositionInformationResponseInner marginType( } /** - * Get marginType + * Margin type. * * @return marginType */ @@ -326,7 +326,7 @@ public PositionInformationResponseInner isolatedMargin( } /** - * Get isolatedMargin + * Isolated margin amount. * * @return isolatedMargin */ @@ -346,7 +346,7 @@ public PositionInformationResponseInner isAutoAddMargin( } /** - * Get isAutoAddMargin + * Whether auto-add margin is enabled. * * @return isAutoAddMargin */ @@ -366,7 +366,7 @@ public PositionInformationResponseInner positionSide( } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -386,7 +386,7 @@ public PositionInformationResponseInner updateTime( } /** - * Get updateTime + * update time * * @return updateTime */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionSide.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionSide.java index 7e33143e3..9ccb59cee 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionSide.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PositionSide.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets positionSide */ +/** + * Default `BOTH` for One-way Mode ; `LONG` or `SHORT` for Hedge Mode. + * It must be sent with Hedge Mode. + */ @JsonAdapter(PositionSide.Adapter.class) public enum PositionSide { BOTH("BOTH"), diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PremiumIndexKlineDataItem.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PremiumIndexKlineDataItem.java new file mode 100644 index 000000000..a22c81095 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PremiumIndexKlineDataItem.java @@ -0,0 +1,183 @@ +/* + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** PremiumIndexKlineDataItem */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class PremiumIndexKlineDataItem extends ArrayList { + public PremiumIndexKlineDataItem() {} + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PremiumIndexKlineDataItem {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PremiumIndexKlineDataItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be a array type in the JSON string but got" + + " `%s`", + jsonElement.toString())); + } + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for (JsonElement element : array) { + PremiumIndexKlineDataItemInner.validateJsonElement(element); + } + if (jsonElement == null) { + if (!PremiumIndexKlineDataItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PremiumIndexKlineDataItem is not found" + + " in the empty JSON string", + PremiumIndexKlineDataItem.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PremiumIndexKlineDataItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PremiumIndexKlineDataItem' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PremiumIndexKlineDataItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PremiumIndexKlineDataItem value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); + elementAdapter.write(out, obj); + } + + @Override + public PremiumIndexKlineDataItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of PremiumIndexKlineDataItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of PremiumIndexKlineDataItem + * @throws IOException if the JSON string is invalid with respect to PremiumIndexKlineDataItem + */ + public static PremiumIndexKlineDataItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PremiumIndexKlineDataItem.class); + } + + /** + * Convert an instance of PremiumIndexKlineDataItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PremiumIndexKlineDataItemInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PremiumIndexKlineDataItemInner.java new file mode 100644 index 000000000..204bb41e1 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PremiumIndexKlineDataItemInner.java @@ -0,0 +1,311 @@ +/* + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; + +import com.binance.connector.client.common.AbstractOpenApiSchema; +import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonPrimitive; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.hibernate.validator.constraints.*; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class PremiumIndexKlineDataItemInner extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(PremiumIndexKlineDataItemInner.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PremiumIndexKlineDataItemInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PremiumIndexKlineDataItemInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterLong = + gson.getDelegateAdapter(this, TypeToken.get(Long.class)); + final TypeAdapter adapterString = + gson.getDelegateAdapter(this, TypeToken.get(String.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PremiumIndexKlineDataItemInner value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `Long` + if (value.getActualInstance() instanceof Long) { + JsonPrimitive primitive = + adapterLong + .toJsonTree((Long) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + // check if the actual instance is of the type `String` + if (value.getActualInstance() instanceof String) { + JsonPrimitive primitive = + adapterString + .toJsonTree((String) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " Long, String"); + } + + @Override + public PremiumIndexKlineDataItemInner read(JsonReader in) + throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize Long + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterLong; + match++; + log.log(Level.FINER, "Input data matches schema 'Long'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for Long failed with `%s`.", + e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Long'", e); + } + // deserialize String + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterString; + match++; + log.log(Level.FINER, "Input data matches schema 'String'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for String failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'String'", + e); + } + + if (match == 1) { + PremiumIndexKlineDataItemInner ret = + new PremiumIndexKlineDataItemInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for" + + " PremiumIndexKlineDataItemInner: %d classes" + + " match result, expected 1. Detailed failure" + + " message for oneOf schemas: %s. JSON: %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public PremiumIndexKlineDataItemInner() { + super("oneOf", Boolean.FALSE); + } + + public PremiumIndexKlineDataItemInner(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Long", Long.class); + schemas.put("String", String.class); + } + + @Override + public Map> getSchemas() { + return PremiumIndexKlineDataItemInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: Long, String + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof Long) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof String) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Long, String"); + } + + /** + * Get the actual instance, which can be the following: Long, String + * + * @return The actual instance (Long, String) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Long`. If the actual instance is not `Long`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `Long` + * @throws ClassCastException if the instance is not `Long` + */ + public Long getLong() throws ClassCastException { + return (Long) super.getActualInstance(); + } + + /** + * Get the actual instance of `String`. If the actual instance is not `String`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String) super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * PremiumIndexKlineDataItemInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with Long + try { + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for Long failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with String + try { + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for String failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for PremiumIndexKlineDataItemInner with" + + " oneOf schemas: Long, String. %d class(es) match the result," + + " expected 1. Detailed failure message for oneOf schemas: %s." + + " JSON: %s", + validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of PremiumIndexKlineDataItemInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PremiumIndexKlineDataItemInner + * @throws IOException if the JSON string is invalid with respect to + * PremiumIndexKlineDataItemInner + */ + public static PremiumIndexKlineDataItemInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PremiumIndexKlineDataItemInner.class); + } + + /** + * Convert an instance of PremiumIndexKlineDataItemInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PremiumIndexKlineDataResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PremiumIndexKlineDataResponse.java index 37126ccc2..8dae97eb9 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PremiumIndexKlineDataResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PremiumIndexKlineDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,8 +34,8 @@ /** PremiumIndexKlineDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PremiumIndexKlineDataResponse extends ArrayList { + comments = "Generator version: 7.22.0") +public class PremiumIndexKlineDataResponse extends ArrayList { public PremiumIndexKlineDataResponse() {} @Override @@ -117,7 +117,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - PremiumIndexKlineDataResponseItem.validateJsonElement(element); + PremiumIndexKlineDataItem.validateJsonElement(element); } if (jsonElement == null) { if (!PremiumIndexKlineDataResponse.openapiRequiredFields diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PremiumIndexKlineDataResponseItem.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PremiumIndexKlineDataResponseItem.java deleted file mode 100644 index 93c2ee9ec..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PremiumIndexKlineDataResponseItem.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** PremiumIndexKlineDataResponseItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PremiumIndexKlineDataResponseItem extends ArrayList { - public PremiumIndexKlineDataResponseItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PremiumIndexKlineDataResponseItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * PremiumIndexKlineDataResponseItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - PremiumIndexKlineDataResponseItemInner.validateJsonElement(element); - } - if (jsonElement == null) { - if (!PremiumIndexKlineDataResponseItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PremiumIndexKlineDataResponseItem is" - + " not found in the empty JSON string", - PremiumIndexKlineDataResponseItem.openapiRequiredFields - .toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PremiumIndexKlineDataResponseItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PremiumIndexKlineDataResponseItem' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(PremiumIndexKlineDataResponseItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PremiumIndexKlineDataResponseItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public PremiumIndexKlineDataResponseItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PremiumIndexKlineDataResponseItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of PremiumIndexKlineDataResponseItem - * @throws IOException if the JSON string is invalid with respect to - * PremiumIndexKlineDataResponseItem - */ - public static PremiumIndexKlineDataResponseItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PremiumIndexKlineDataResponseItem.class); - } - - /** - * Convert an instance of PremiumIndexKlineDataResponseItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PremiumIndexKlineDataResponseItemInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PremiumIndexKlineDataResponseItemInner.java deleted file mode 100644 index 16c7cd914..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PremiumIndexKlineDataResponseItemInner.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; - -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonPrimitive; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PremiumIndexKlineDataResponseItemInner extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(PremiumIndexKlineDataResponseItemInner.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PremiumIndexKlineDataResponseItemInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PremiumIndexKlineDataResponseItemInner' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterLong = - gson.getDelegateAdapter(this, TypeToken.get(Long.class)); - final TypeAdapter adapterString = - gson.getDelegateAdapter(this, TypeToken.get(String.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, PremiumIndexKlineDataResponseItemInner value) - throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `Long` - if (value.getActualInstance() instanceof Long) { - JsonPrimitive primitive = - adapterLong - .toJsonTree((Long) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - // check if the actual instance is of the type `String` - if (value.getActualInstance() instanceof String) { - JsonPrimitive primitive = - adapterString - .toJsonTree((String) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " Long, String"); - } - - @Override - public PremiumIndexKlineDataResponseItemInner read(JsonReader in) - throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize Long - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterLong; - match++; - log.log(Level.FINER, "Input data matches schema 'Long'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for Long failed with `%s`.", - e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Long'", e); - } - // deserialize String - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterString; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for String failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'String'", - e); - } - - if (match == 1) { - PremiumIndexKlineDataResponseItemInner ret = - new PremiumIndexKlineDataResponseItemInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for" - + " PremiumIndexKlineDataResponseItemInner: %d" - + " classes match result, expected 1. Detailed" - + " failure message for oneOf schemas: %s. JSON:" - + " %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public PremiumIndexKlineDataResponseItemInner() { - super("oneOf", Boolean.FALSE); - } - - public PremiumIndexKlineDataResponseItemInner(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Long", Long.class); - schemas.put("String", String.class); - } - - @Override - public Map> getSchemas() { - return PremiumIndexKlineDataResponseItemInner.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Long, String - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof Long) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof String) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Long, String"); - } - - /** - * Get the actual instance, which can be the following: Long, String - * - * @return The actual instance (Long, String) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Long`. If the actual instance is not `Long`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Long` - * @throws ClassCastException if the instance is not `Long` - */ - public Long getLong() throws ClassCastException { - return (Long) super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * PremiumIndexKlineDataResponseItemInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Long - try { - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for Long failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with String - try { - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for String failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for PremiumIndexKlineDataResponseItemInner" - + " with oneOf schemas: Long, String. %d class(es) match the" - + " result, expected 1. Detailed failure message for oneOf schemas:" - + " %s. JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of PremiumIndexKlineDataResponseItemInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of PremiumIndexKlineDataResponseItemInner - * @throws IOException if the JSON string is invalid with respect to - * PremiumIndexKlineDataResponseItemInner - */ - public static PremiumIndexKlineDataResponseItemInner fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, PremiumIndexKlineDataResponseItemInner.class); - } - - /** - * Convert an instance of PremiumIndexKlineDataResponseItemInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PriceMatch.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PriceMatch.java index 38d34caab..a00d99c06 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PriceMatch.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PriceMatch.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -21,11 +21,12 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets priceMatch */ +/** + * only avaliable for `LIMIT`/`STOP`/`TAKE_PROFIT` order; Can't be + * passed together with `price` + */ @JsonAdapter(PriceMatch.Adapter.class) public enum PriceMatch { - NONE("NONE"), - OPPONENT("OPPONENT"), OPPONENT_5("OPPONENT_5"), diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PriceProtect.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PriceProtect.java new file mode 100644 index 000000000..a50d25050 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/PriceProtect.java @@ -0,0 +1,76 @@ +/* + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** + * \"true\" or \"false\". Used with `STOP/STOP_MARKET` or + * `TAKE_PROFIT/TAKE_PROFIT_MARKET` orders. + */ +@JsonAdapter(PriceProtect.Adapter.class) +public enum PriceProtect { + TRUE("true"), + + FALSE("false"); + + private String value; + + PriceProtect(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PriceProtect fromValue(String value) { + for (PriceProtect b : PriceProtect.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PriceProtect enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PriceProtect read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PriceProtect.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PriceProtect.fromValue(value); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/QueryCurrentOpenOrderResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/QueryCurrentOpenOrderResponse.java index c5b097117..1af8a20b0 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/QueryCurrentOpenOrderResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/QueryCurrentOpenOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCurrentOpenOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCurrentOpenOrderResponse { public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; @@ -201,7 +201,7 @@ public QueryCurrentOpenOrderResponse avgPrice(@jakarta.annotation.Nullable Strin } /** - * Get avgPrice + * Average execution price * * @return avgPrice */ @@ -221,7 +221,7 @@ public QueryCurrentOpenOrderResponse clientOrderId( } /** - * Get clientOrderId + * Client order ID. * * @return clientOrderId */ @@ -240,7 +240,7 @@ public QueryCurrentOpenOrderResponse cumBase(@jakarta.annotation.Nullable String } /** - * Get cumBase + * Cumulative base asset amount. * * @return cumBase */ @@ -260,7 +260,7 @@ public QueryCurrentOpenOrderResponse executedQty( } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -279,7 +279,7 @@ public QueryCurrentOpenOrderResponse orderId(@jakarta.annotation.Nullable Long o } /** - * Get orderId + * Sub-order ID * * @return orderId */ @@ -298,7 +298,7 @@ public QueryCurrentOpenOrderResponse origQty(@jakarta.annotation.Nullable String } /** - * Get origQty + * Original order quantity * * @return origQty */ @@ -317,7 +317,7 @@ public QueryCurrentOpenOrderResponse origType(@jakarta.annotation.Nullable Strin } /** - * Get origType + * Original order type. * * @return origType */ @@ -336,7 +336,7 @@ public QueryCurrentOpenOrderResponse price(@jakarta.annotation.Nullable String p } /** - * Get price + * Latest token price. * * @return price */ @@ -356,7 +356,7 @@ public QueryCurrentOpenOrderResponse reduceOnly( } /** - * Get reduceOnly + * Whether the order is reduce-only. * * @return reduceOnly */ @@ -375,7 +375,7 @@ public QueryCurrentOpenOrderResponse side(@jakarta.annotation.Nullable String si } /** - * Get side + * Trading side * * @return side */ @@ -395,7 +395,7 @@ public QueryCurrentOpenOrderResponse positionSide( } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -414,7 +414,7 @@ public QueryCurrentOpenOrderResponse status(@jakarta.annotation.Nullable String } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -433,7 +433,7 @@ public QueryCurrentOpenOrderResponse stopPrice(@jakarta.annotation.Nullable Stri } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -453,7 +453,7 @@ public QueryCurrentOpenOrderResponse closePosition( } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -472,7 +472,7 @@ public QueryCurrentOpenOrderResponse symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -491,7 +491,7 @@ public QueryCurrentOpenOrderResponse pair(@jakarta.annotation.Nullable String pa } /** - * Get pair + * Pair * * @return pair */ @@ -510,7 +510,7 @@ public QueryCurrentOpenOrderResponse time(@jakarta.annotation.Nullable Long time } /** - * Get time + * Time * * @return time */ @@ -530,7 +530,7 @@ public QueryCurrentOpenOrderResponse timeInForce( } /** - * Get timeInForce + * Time in force * * @return timeInForce */ @@ -549,7 +549,7 @@ public QueryCurrentOpenOrderResponse type(@jakarta.annotation.Nullable String ty } /** - * Get type + * Order type. * * @return type */ @@ -569,7 +569,7 @@ public QueryCurrentOpenOrderResponse activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -588,7 +588,7 @@ public QueryCurrentOpenOrderResponse priceRate(@jakarta.annotation.Nullable Stri } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -607,7 +607,7 @@ public QueryCurrentOpenOrderResponse updateTime(@jakarta.annotation.Nullable Lon } /** - * Get updateTime + * update time * * @return updateTime */ @@ -627,7 +627,7 @@ public QueryCurrentOpenOrderResponse workingType( } /** - * Get workingType + * Stop trigger price type. * * @return workingType */ @@ -647,7 +647,7 @@ public QueryCurrentOpenOrderResponse priceProtect( } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -667,7 +667,7 @@ public QueryCurrentOpenOrderResponse priceMatch( } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -687,7 +687,7 @@ public QueryCurrentOpenOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/QueryIndexPriceConstituentsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/QueryIndexPriceConstituentsResponse.java index 0cfdc662e..d50c67890 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/QueryIndexPriceConstituentsResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/QueryIndexPriceConstituentsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryIndexPriceConstituentsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryIndexPriceConstituentsResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -68,7 +68,7 @@ public QueryIndexPriceConstituentsResponse symbol(@jakarta.annotation.Nullable S } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -87,7 +87,7 @@ public QueryIndexPriceConstituentsResponse time(@jakarta.annotation.Nullable Lon } /** - * Get time + * Time * * @return time */ @@ -118,7 +118,7 @@ public QueryIndexPriceConstituentsResponse addConstituentsItem( } /** - * Get constituents + * Constituent list. * * @return constituents */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/QueryIndexPriceConstituentsResponseConstituentsInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/QueryIndexPriceConstituentsResponseConstituentsInner.java index 766dc742b..21f058fc9 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/QueryIndexPriceConstituentsResponseConstituentsInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/QueryIndexPriceConstituentsResponseConstituentsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryIndexPriceConstituentsResponseConstituentsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryIndexPriceConstituentsResponseConstituentsInner { public static final String SERIALIZED_NAME_EXCHANGE = "exchange"; @@ -48,6 +48,18 @@ public class QueryIndexPriceConstituentsResponseConstituentsInner { @jakarta.annotation.Nullable private String symbol; + public static final String SERIALIZED_NAME_PRICE = "price"; + + @SerializedName(SERIALIZED_NAME_PRICE) + @jakarta.annotation.Nullable + private String price; + + public static final String SERIALIZED_NAME_WEIGHT = "weight"; + + @SerializedName(SERIALIZED_NAME_WEIGHT) + @jakarta.annotation.Nullable + private String weight; + public QueryIndexPriceConstituentsResponseConstituentsInner() {} public QueryIndexPriceConstituentsResponseConstituentsInner exchange( @@ -57,7 +69,7 @@ public QueryIndexPriceConstituentsResponseConstituentsInner exchange( } /** - * Get exchange + * Exchange identifier. * * @return exchange */ @@ -77,7 +89,7 @@ public QueryIndexPriceConstituentsResponseConstituentsInner symbol( } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -90,6 +102,46 @@ public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } + public QueryIndexPriceConstituentsResponseConstituentsInner price( + @jakarta.annotation.Nullable String price) { + this.price = price; + return this; + } + + /** + * Price + * + * @return price + */ + @jakarta.annotation.Nullable + public String getPrice() { + return price; + } + + public void setPrice(@jakarta.annotation.Nullable String price) { + this.price = price; + } + + public QueryIndexPriceConstituentsResponseConstituentsInner weight( + @jakarta.annotation.Nullable String weight) { + this.weight = weight; + return this; + } + + /** + * Weight + * + * @return weight + */ + @jakarta.annotation.Nullable + public String getWeight() { + return weight; + } + + public void setWeight(@jakarta.annotation.Nullable String weight) { + this.weight = weight; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -105,12 +157,16 @@ public boolean equals(Object o) { this.exchange, queryIndexPriceConstituentsResponseConstituentsInner.exchange) && Objects.equals( - this.symbol, queryIndexPriceConstituentsResponseConstituentsInner.symbol); + this.symbol, queryIndexPriceConstituentsResponseConstituentsInner.symbol) + && Objects.equals( + this.price, queryIndexPriceConstituentsResponseConstituentsInner.price) + && Objects.equals( + this.weight, queryIndexPriceConstituentsResponseConstituentsInner.weight); } @Override public int hashCode() { - return Objects.hash(exchange, symbol); + return Objects.hash(exchange, symbol, price, weight); } @Override @@ -119,6 +175,8 @@ public String toString() { sb.append("class QueryIndexPriceConstituentsResponseConstituentsInner {\n"); sb.append(" exchange: ").append(toIndentedString(exchange)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" price: ").append(toIndentedString(price)).append("\n"); + sb.append(" weight: ").append(toIndentedString(weight)).append("\n"); sb.append("}"); return sb.toString(); } @@ -134,6 +192,14 @@ public String toUrlQueryString() { String symbolValueAsString = ""; symbolValueAsString = symbolValue.toString(); sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); + Object priceValue = getPrice(); + String priceValueAsString = ""; + priceValueAsString = priceValue.toString(); + sb.append("price=").append(urlEncode(priceValueAsString)).append(""); + Object weightValue = getWeight(); + String weightValueAsString = ""; + weightValueAsString = weightValue.toString(); + sb.append("weight=").append(urlEncode(weightValueAsString)).append(""); return sb.toString(); } @@ -164,6 +230,8 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("exchange"); openapiFields.add("symbol"); + openapiFields.add("price"); + openapiFields.add("weight"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -207,6 +275,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("symbol").toString())); } + if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) + && !jsonObj.get("price").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `price` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("price").toString())); + } + if ((jsonObj.get("weight") != null && !jsonObj.get("weight").isJsonNull()) + && !jsonObj.get("weight").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `weight` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("weight").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/QueryOrderResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/QueryOrderResponse.java index 00fe85969..2a26df472 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/QueryOrderResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/QueryOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryOrderResponse { public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; @@ -201,7 +201,7 @@ public QueryOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPrice) } /** - * Get avgPrice + * Average execution price * * @return avgPrice */ @@ -220,7 +220,7 @@ public QueryOrderResponse clientOrderId(@jakarta.annotation.Nullable String clie } /** - * Get clientOrderId + * Client order ID. * * @return clientOrderId */ @@ -239,7 +239,7 @@ public QueryOrderResponse cumBase(@jakarta.annotation.Nullable String cumBase) { } /** - * Get cumBase + * Cumulative base asset amount. * * @return cumBase */ @@ -258,7 +258,7 @@ public QueryOrderResponse executedQty(@jakarta.annotation.Nullable String execut } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -277,7 +277,7 @@ public QueryOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Sub-order ID * * @return orderId */ @@ -296,7 +296,7 @@ public QueryOrderResponse origQty(@jakarta.annotation.Nullable String origQty) { } /** - * Get origQty + * Original order quantity * * @return origQty */ @@ -315,7 +315,7 @@ public QueryOrderResponse origType(@jakarta.annotation.Nullable String origType) } /** - * Get origType + * Original order type. * * @return origType */ @@ -334,7 +334,7 @@ public QueryOrderResponse price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Latest token price. * * @return price */ @@ -353,7 +353,7 @@ public QueryOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean reduce } /** - * Get reduceOnly + * Whether the order is reduce-only. * * @return reduceOnly */ @@ -372,7 +372,7 @@ public QueryOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Trading side * * @return side */ @@ -391,7 +391,7 @@ public QueryOrderResponse positionSide(@jakarta.annotation.Nullable String posit } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -410,7 +410,7 @@ public QueryOrderResponse status(@jakarta.annotation.Nullable String status) { } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -429,7 +429,7 @@ public QueryOrderResponse stopPrice(@jakarta.annotation.Nullable String stopPric } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -448,7 +448,7 @@ public QueryOrderResponse closePosition(@jakarta.annotation.Nullable Boolean clo } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -467,7 +467,7 @@ public QueryOrderResponse symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -486,7 +486,7 @@ public QueryOrderResponse pair(@jakarta.annotation.Nullable String pair) { } /** - * Get pair + * Pair * * @return pair */ @@ -505,7 +505,7 @@ public QueryOrderResponse time(@jakarta.annotation.Nullable Long time) { } /** - * Get time + * Time * * @return time */ @@ -524,7 +524,7 @@ public QueryOrderResponse timeInForce(@jakarta.annotation.Nullable String timeIn } /** - * Get timeInForce + * Time in force * * @return timeInForce */ @@ -543,7 +543,7 @@ public QueryOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Order type. * * @return type */ @@ -562,7 +562,7 @@ public QueryOrderResponse activatePrice(@jakarta.annotation.Nullable String acti } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -581,7 +581,7 @@ public QueryOrderResponse priceRate(@jakarta.annotation.Nullable String priceRat } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -600,7 +600,7 @@ public QueryOrderResponse updateTime(@jakarta.annotation.Nullable Long updateTim } /** - * Get updateTime + * update time * * @return updateTime */ @@ -619,7 +619,7 @@ public QueryOrderResponse workingType(@jakarta.annotation.Nullable String workin } /** - * Get workingType + * Stop trigger price type. * * @return workingType */ @@ -638,7 +638,7 @@ public QueryOrderResponse priceProtect(@jakarta.annotation.Nullable Boolean pric } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -657,7 +657,7 @@ public QueryOrderResponse priceMatch(@jakarta.annotation.Nullable String priceMa } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -677,7 +677,7 @@ public QueryOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/RecentTradesListResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/RecentTradesListResponse.java index e713c52f4..1c28cba0d 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/RecentTradesListResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/RecentTradesListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RecentTradesListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RecentTradesListResponse extends ArrayList { public RecentTradesListResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/RecentTradesListResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/RecentTradesListResponseInner.java index 1b5d11faf..4baf39671 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/RecentTradesListResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/RecentTradesListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RecentTradesListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RecentTradesListResponseInner { public static final String SERIALIZED_NAME_ID = "id"; @@ -80,7 +80,7 @@ public RecentTradesListResponseInner id(@jakarta.annotation.Nullable Long id) { } /** - * Get id + * positionId * * @return id */ @@ -99,7 +99,7 @@ public RecentTradesListResponseInner price(@jakarta.annotation.Nullable String p } /** - * Get price + * Latest token price. * * @return price */ @@ -118,7 +118,7 @@ public RecentTradesListResponseInner qty(@jakarta.annotation.Nullable String qty } /** - * Get qty + * Quantity. * * @return qty */ @@ -137,7 +137,7 @@ public RecentTradesListResponseInner baseQty(@jakarta.annotation.Nullable String } /** - * Get baseQty + * Base asset quantity. * * @return baseQty */ @@ -156,7 +156,7 @@ public RecentTradesListResponseInner time(@jakarta.annotation.Nullable Long time } /** - * Get time + * Time * * @return time */ @@ -176,7 +176,7 @@ public RecentTradesListResponseInner isBuyerMaker( } /** - * Get isBuyerMaker + * Whether buyer is market maker. * * @return isBuyerMaker */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ReduceOnly.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ReduceOnly.java new file mode 100644 index 000000000..2f8d66d2c --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/ReduceOnly.java @@ -0,0 +1,76 @@ +/* + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** + * \"true\" or \"false\". Cannot be sent in Hedge Mode; cannot be sent with + * `closePosition`=`true`(Close-All) + */ +@JsonAdapter(ReduceOnly.Adapter.class) +public enum ReduceOnly { + TRUE("true"), + + FALSE("false"); + + private String value; + + ReduceOnly(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ReduceOnly fromValue(String value) { + for (ReduceOnly b : ReduceOnly.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ReduceOnly enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ReduceOnly read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ReduceOnly.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ReduceOnly.fromValue(value); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SelfTradePreventionMode.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SelfTradePreventionMode.java index f2426e56d..923f59fb5 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SelfTradePreventionMode.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SelfTradePreventionMode.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets selfTradePreventionMode */ +/** + * `EXPIRE_TAKER`:expire taker order when STP triggers/ `EXPIRE_MAKER`:expire + * taker order when STP triggers/ `EXPIRE_BOTH`:expire both orders when STP triggers + */ @JsonAdapter(SelfTradePreventionMode.Adapter.class) public enum SelfTradePreventionMode { NONE("NONE"), diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Side.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Side.java index 2b274e613..da616feda 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Side.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Side.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/StartUserDataStreamResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/StartUserDataStreamResponse.java index 1fc37c197..dabea3c8a 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/StartUserDataStreamResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/StartUserDataStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** StartUserDataStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class StartUserDataStreamResponse { public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; @@ -50,7 +50,7 @@ public StartUserDataStreamResponse listenKey(@jakarta.annotation.Nullable String } /** - * Get listenKey + * Listen key. * * @return listenKey */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SymbolOrderBookTickerResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SymbolOrderBookTickerResponse.java index d0233d1a1..c24af33ae 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SymbolOrderBookTickerResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SymbolOrderBookTickerResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SymbolOrderBookTickerResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolOrderBookTickerResponse extends ArrayList { public SymbolOrderBookTickerResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SymbolOrderBookTickerResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SymbolOrderBookTickerResponseInner.java index 1de5b532e..c8d3d8e84 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SymbolOrderBookTickerResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SymbolOrderBookTickerResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SymbolOrderBookTickerResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolOrderBookTickerResponseInner { public static final String SERIALIZED_NAME_LAST_UPDATE_ID = "lastUpdateId"; @@ -93,7 +93,7 @@ public SymbolOrderBookTickerResponseInner lastUpdateId( } /** - * Get lastUpdateId + * Last update ID. * * @return lastUpdateId */ @@ -112,7 +112,7 @@ public SymbolOrderBookTickerResponseInner symbol(@jakarta.annotation.Nullable St } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -131,7 +131,7 @@ public SymbolOrderBookTickerResponseInner pair(@jakarta.annotation.Nullable Stri } /** - * Get pair + * Pair * * @return pair */ @@ -151,7 +151,7 @@ public SymbolOrderBookTickerResponseInner bidPrice( } /** - * Get bidPrice + * Best bid price. * * @return bidPrice */ @@ -170,7 +170,7 @@ public SymbolOrderBookTickerResponseInner bidQty(@jakarta.annotation.Nullable St } /** - * Get bidQty + * Best bid quantity. * * @return bidQty */ @@ -190,7 +190,7 @@ public SymbolOrderBookTickerResponseInner askPrice( } /** - * Get askPrice + * Best ask price. * * @return askPrice */ @@ -209,7 +209,7 @@ public SymbolOrderBookTickerResponseInner askQty(@jakarta.annotation.Nullable St } /** - * Get askQty + * Best ask quantity. * * @return askQty */ @@ -228,7 +228,7 @@ public SymbolOrderBookTickerResponseInner time(@jakarta.annotation.Nullable Long } /** - * Get time + * Time * * @return time */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SymbolPriceTickerResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SymbolPriceTickerResponse.java index 6dee1c16a..3c78d3983 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SymbolPriceTickerResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SymbolPriceTickerResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SymbolPriceTickerResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolPriceTickerResponse extends ArrayList { public SymbolPriceTickerResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SymbolPriceTickerResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SymbolPriceTickerResponseInner.java index c0cc55cdc..ea24d894a 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SymbolPriceTickerResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SymbolPriceTickerResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SymbolPriceTickerResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolPriceTickerResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -68,7 +68,7 @@ public SymbolPriceTickerResponseInner symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -87,7 +87,7 @@ public SymbolPriceTickerResponseInner ps(@jakarta.annotation.Nullable String ps) } /** - * Get ps + * Pair * * @return ps */ @@ -106,7 +106,7 @@ public SymbolPriceTickerResponseInner price(@jakarta.annotation.Nullable String } /** - * Get price + * Latest token price. * * @return price */ @@ -125,7 +125,7 @@ public SymbolPriceTickerResponseInner time(@jakarta.annotation.Nullable Long tim } /** - * Get time + * Time * * @return time */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TakerBuySellVolumeResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TakerBuySellVolumeResponse.java index 8af59c7c5..9fcac8557 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TakerBuySellVolumeResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TakerBuySellVolumeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TakerBuySellVolumeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TakerBuySellVolumeResponse extends ArrayList { public TakerBuySellVolumeResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TakerBuySellVolumeResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TakerBuySellVolumeResponseInner.java index b235e8b0f..25c6181d0 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TakerBuySellVolumeResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TakerBuySellVolumeResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TakerBuySellVolumeResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TakerBuySellVolumeResponseInner { public static final String SERIALIZED_NAME_PAIR = "pair"; @@ -86,7 +86,7 @@ public TakerBuySellVolumeResponseInner pair(@jakarta.annotation.Nullable String } /** - * Get pair + * Pair * * @return pair */ @@ -106,7 +106,7 @@ public TakerBuySellVolumeResponseInner contractType( } /** - * Get contractType + * Contract type. * * @return contractType */ @@ -126,7 +126,7 @@ public TakerBuySellVolumeResponseInner takerBuyVol( } /** - * Get takerBuyVol + * unit: cont * * @return takerBuyVol */ @@ -146,7 +146,7 @@ public TakerBuySellVolumeResponseInner takerSellVol( } /** - * Get takerSellVol + * unit: cont * * @return takerSellVol */ @@ -166,7 +166,7 @@ public TakerBuySellVolumeResponseInner takerBuyVolValue( } /** - * Get takerBuyVolValue + * unit: base asset * * @return takerBuyVolValue */ @@ -186,7 +186,7 @@ public TakerBuySellVolumeResponseInner takerSellVolValue( } /** - * Get takerSellVolValue + * unit: base asset * * @return takerSellVolValue */ @@ -205,7 +205,7 @@ public TakerBuySellVolumeResponseInner timestamp(@jakarta.annotation.Nullable Lo } /** - * Get timestamp + * Timestamp in milliseconds. * * @return timestamp */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse.java index 22a23ba53..20ab5b5e1 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** Ticker24hrPriceChangeStatisticsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrPriceChangeStatisticsResponse extends ArrayList { public Ticker24hrPriceChangeStatisticsResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Ticker24hrPriceChangeStatisticsResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Ticker24hrPriceChangeStatisticsResponseInner.java index c9849aca6..98ed07129 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Ticker24hrPriceChangeStatisticsResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Ticker24hrPriceChangeStatisticsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** Ticker24hrPriceChangeStatisticsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrPriceChangeStatisticsResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -147,7 +147,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner symbol( } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -167,7 +167,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner pair( } /** - * Get pair + * Pair * * @return pair */ @@ -187,7 +187,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner priceChange( } /** - * Get priceChange + * Absolute price change in the 24h window. * * @return priceChange */ @@ -207,7 +207,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner priceChangePercent( } /** - * Get priceChangePercent + * Percentage price change in the 24h window. * * @return priceChangePercent */ @@ -227,7 +227,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner weightedAvgPrice( } /** - * Get weightedAvgPrice + * Weighted average price in the 24h window. * * @return weightedAvgPrice */ @@ -247,7 +247,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner lastPrice( } /** - * Get lastPrice + * Latest traded price. * * @return lastPrice */ @@ -267,7 +267,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner lastQty( } /** - * Get lastQty + * Quantity of the latest trade. * * @return lastQty */ @@ -287,7 +287,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner openPrice( } /** - * Get openPrice + * Opening price of the 24h window. * * @return openPrice */ @@ -307,7 +307,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner highPrice( } /** - * Get highPrice + * Highest price in the 24h window. * * @return highPrice */ @@ -327,7 +327,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner lowPrice( } /** - * Get lowPrice + * Lowest price in the 24h window. * * @return lowPrice */ @@ -347,7 +347,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner volume( } /** - * Get volume + * Base asset volume in the 24h window. * * @return volume */ @@ -367,7 +367,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner baseVolume( } /** - * Get baseVolume + * Base asset volume. * * @return baseVolume */ @@ -387,7 +387,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner openTime( } /** - * Get openTime + * Start time of the 24h window (milliseconds). * * @return openTime */ @@ -407,7 +407,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner closeTime( } /** - * Get closeTime + * End time of the 24h window (milliseconds). * * @return closeTime */ @@ -427,7 +427,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner firstId( } /** - * Get firstId + * First tradeId * * @return firstId */ @@ -447,7 +447,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner lastId( } /** - * Get lastId + * Last tradeId * * @return lastId */ @@ -467,7 +467,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner count( } /** - * Get count + * Total number of trades in the 24h window. * * @return count */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TimeInForce.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TimeInForce.java index 89a25bc45..ca6937cd1 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TimeInForce.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TopTraderLongShortRatioAccountsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TopTraderLongShortRatioAccountsResponse.java index 78159f43e..78f81a499 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TopTraderLongShortRatioAccountsResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TopTraderLongShortRatioAccountsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TopTraderLongShortRatioAccountsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TopTraderLongShortRatioAccountsResponse extends ArrayList { public TopTraderLongShortRatioAccountsResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TopTraderLongShortRatioAccountsResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TopTraderLongShortRatioAccountsResponseInner.java index 34dcf2493..6cf260a30 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TopTraderLongShortRatioAccountsResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TopTraderLongShortRatioAccountsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TopTraderLongShortRatioAccountsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TopTraderLongShortRatioAccountsResponseInner { public static final String SERIALIZED_NAME_PAIR = "pair"; @@ -75,7 +75,7 @@ public TopTraderLongShortRatioAccountsResponseInner pair( } /** - * Get pair + * Pair * * @return pair */ @@ -95,7 +95,7 @@ public TopTraderLongShortRatioAccountsResponseInner longShortRatio( } /** - * Get longShortRatio + * Long/short ratio. * * @return longShortRatio */ @@ -115,7 +115,7 @@ public TopTraderLongShortRatioAccountsResponseInner longAccount( } /** - * Get longAccount + * 64.42% * * @return longAccount */ @@ -135,7 +135,7 @@ public TopTraderLongShortRatioAccountsResponseInner shortAccount( } /** - * Get shortAccount + * 35.58% * * @return shortAccount */ @@ -155,7 +155,7 @@ public TopTraderLongShortRatioAccountsResponseInner timestamp( } /** - * Get timestamp + * Timestamp in milliseconds. * * @return timestamp */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TopTraderLongShortRatioPositionsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TopTraderLongShortRatioPositionsResponse.java index ebdef7ec1..573ed419d 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TopTraderLongShortRatioPositionsResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TopTraderLongShortRatioPositionsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TopTraderLongShortRatioPositionsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TopTraderLongShortRatioPositionsResponse extends ArrayList { public TopTraderLongShortRatioPositionsResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TopTraderLongShortRatioPositionsResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TopTraderLongShortRatioPositionsResponseInner.java index 35e0f53ed..3726edd94 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TopTraderLongShortRatioPositionsResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/TopTraderLongShortRatioPositionsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TopTraderLongShortRatioPositionsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TopTraderLongShortRatioPositionsResponseInner { public static final String SERIALIZED_NAME_PAIR = "pair"; @@ -75,7 +75,7 @@ public TopTraderLongShortRatioPositionsResponseInner pair( } /** - * Get pair + * Pair * * @return pair */ @@ -95,7 +95,7 @@ public TopTraderLongShortRatioPositionsResponseInner longShortRatio( } /** - * Get longShortRatio + * Long/short ratio. * * @return longShortRatio */ @@ -115,7 +115,7 @@ public TopTraderLongShortRatioPositionsResponseInner longPosition( } /** - * Get longPosition + * 64.42% * * @return longPosition */ @@ -135,7 +135,7 @@ public TopTraderLongShortRatioPositionsResponseInner shortPosition( } /** - * Get shortPosition + * 44.04% * * @return shortPosition */ @@ -155,7 +155,7 @@ public TopTraderLongShortRatioPositionsResponseInner timestamp( } /** - * Get timestamp + * Timestamp in milliseconds. * * @return timestamp */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Type.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Type.java deleted file mode 100644 index d57388dd2..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/Type.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.rest.model; - -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import org.hibernate.validator.constraints.*; - -/** Gets or Sets type */ -@JsonAdapter(Type.Adapter.class) -public enum Type { - LIMIT("LIMIT"), - - MARKET("MARKET"), - - STOP("STOP"), - - STOP_MARKET("STOP_MARKET"), - - TAKE_PROFIT("TAKE_PROFIT"), - - TAKE_PROFIT_MARKET("TAKE_PROFIT_MARKET"), - - TRAILING_STOP_MARKET("TRAILING_STOP_MARKET"); - - private String value; - - Type(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static Type fromValue(String value) { - for (Type b : Type.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final Type enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public Type read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return Type.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - Type.fromValue(value); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/UserCommissionRateResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/UserCommissionRateResponse.java index 8e1f5439a..d778260b5 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/UserCommissionRateResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/UserCommissionRateResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UserCommissionRateResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserCommissionRateResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -62,7 +62,7 @@ public UserCommissionRateResponse symbol(@jakarta.annotation.Nullable String sym } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -82,7 +82,7 @@ public UserCommissionRateResponse makerCommissionRate( } /** - * Get makerCommissionRate + * 0.015% * * @return makerCommissionRate */ @@ -102,7 +102,7 @@ public UserCommissionRateResponse takerCommissionRate( } /** - * Get takerCommissionRate + * Taker commission rate. * * @return takerCommissionRate */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/UsersForceOrdersResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/UsersForceOrdersResponse.java index 0153f2bb6..8d9c0a781 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/UsersForceOrdersResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/UsersForceOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UsersForceOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UsersForceOrdersResponse extends ArrayList { public UsersForceOrdersResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/UsersForceOrdersResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/UsersForceOrdersResponseInner.java index bf33c88d3..293eda133 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/UsersForceOrdersResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/UsersForceOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UsersForceOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UsersForceOrdersResponseInner { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -176,7 +176,7 @@ public UsersForceOrdersResponseInner orderId(@jakarta.annotation.Nullable Long o } /** - * Get orderId + * Sub-order ID * * @return orderId */ @@ -195,7 +195,7 @@ public UsersForceOrdersResponseInner symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -214,7 +214,7 @@ public UsersForceOrdersResponseInner pair(@jakarta.annotation.Nullable String pa } /** - * Get pair + * Pair * * @return pair */ @@ -233,7 +233,7 @@ public UsersForceOrdersResponseInner status(@jakarta.annotation.Nullable String } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -253,7 +253,7 @@ public UsersForceOrdersResponseInner clientOrderId( } /** - * Get clientOrderId + * Client order ID. * * @return clientOrderId */ @@ -272,7 +272,7 @@ public UsersForceOrdersResponseInner price(@jakarta.annotation.Nullable String p } /** - * Get price + * Latest token price. * * @return price */ @@ -291,7 +291,7 @@ public UsersForceOrdersResponseInner avgPrice(@jakarta.annotation.Nullable Strin } /** - * Get avgPrice + * Average execution price * * @return avgPrice */ @@ -310,7 +310,7 @@ public UsersForceOrdersResponseInner origQty(@jakarta.annotation.Nullable String } /** - * Get origQty + * Original order quantity * * @return origQty */ @@ -330,7 +330,7 @@ public UsersForceOrdersResponseInner executedQty( } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -349,7 +349,7 @@ public UsersForceOrdersResponseInner cumBase(@jakarta.annotation.Nullable String } /** - * Get cumBase + * Cumulative base asset amount. * * @return cumBase */ @@ -369,7 +369,7 @@ public UsersForceOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time in force * * @return timeInForce */ @@ -388,7 +388,7 @@ public UsersForceOrdersResponseInner type(@jakarta.annotation.Nullable String ty } /** - * Get type + * Order type. * * @return type */ @@ -408,7 +408,7 @@ public UsersForceOrdersResponseInner reduceOnly( } /** - * Get reduceOnly + * Whether the order is reduce-only. * * @return reduceOnly */ @@ -428,7 +428,7 @@ public UsersForceOrdersResponseInner closePosition( } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -447,7 +447,7 @@ public UsersForceOrdersResponseInner side(@jakarta.annotation.Nullable String si } /** - * Get side + * Trading side * * @return side */ @@ -467,7 +467,7 @@ public UsersForceOrdersResponseInner positionSide( } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -486,7 +486,7 @@ public UsersForceOrdersResponseInner stopPrice(@jakarta.annotation.Nullable Stri } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -506,7 +506,7 @@ public UsersForceOrdersResponseInner workingType( } /** - * Get workingType + * Stop trigger price type. * * @return workingType */ @@ -526,7 +526,7 @@ public UsersForceOrdersResponseInner priceProtect( } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -545,7 +545,7 @@ public UsersForceOrdersResponseInner origType(@jakarta.annotation.Nullable Strin } /** - * Get origType + * Original order type. * * @return origType */ @@ -564,7 +564,7 @@ public UsersForceOrdersResponseInner time(@jakarta.annotation.Nullable Long time } /** - * Get time + * Time * * @return time */ @@ -583,7 +583,7 @@ public UsersForceOrdersResponseInner updateTime(@jakarta.annotation.Nullable Lon } /** - * Get updateTime + * update time * * @return updateTime */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/WorkingType.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/WorkingType.java index c80916144..80eb97a61 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/WorkingType.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/WorkingType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets workingType */ +/** 'stopPrice triggered by: \"MARK_PRICE\", \"CONTRACT_PRICE\". */ @JsonAdapter(WorkingType.Adapter.class) public enum WorkingType { MARK_PRICE("MARK_PRICE"), diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/JSON.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/JSON.java index c6585fca6..265558d73 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/JSON.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -211,10 +211,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.websocket.api .model.StartUserDataStreamResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_coin_futures.websocket.api - .model.StartUserDataStreamResponseRateLimitsInner - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.websocket.api .model.StartUserDataStreamResponseResult.CustomTypeAdapterFactory()); diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/AccountApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/AccountApi.java index 2cb2721c7..645a1f403 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/AccountApi.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/AccountApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -43,11 +43,11 @@ public ConnectionInterface getConnection() { } /** - * Account Information(USER_DATA) Get current account information. User in single-asset/ + * Account Information (USER_DATA) Get current account information. User in single-asset/ * multi-assets mode will see different value, see comments in response section for detail. - * Weight: 5 + * Weight(IP): 5 Security Type: USER_DATA * - * @param accountInformationRequest (required) + * @param accountInformationRequest (optional) * @return AccountInformationResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -59,8 +59,8 @@ public ConnectionInterface getConnection() { * * * @see Account - * Information(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/account#account-information">Account + * Information (USER_DATA) Documentation */ public CompletableFuture accountInformation( AccountInformationRequest accountInformationRequest) throws ApiException { @@ -107,9 +107,10 @@ private void accountInformationValidateBeforeCall( } /** - * Futures Account Balance(USER_DATA) Query account balance info Weight: 5 + * Futures Account Balance (USER_DATA) Futures Account Balance Weight(IP): 5 Security Type: + * USER_DATA * - * @param futuresAccountBalanceRequest (required) + * @param futuresAccountBalanceRequest (optional) * @return FuturesAccountBalanceResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -121,8 +122,8 @@ private void accountInformationValidateBeforeCall( * * * @see Futures - * Account Balance(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/account#futures-account-balance">Futures + * Account Balance (USER_DATA) Documentation */ public CompletableFuture futuresAccountBalance( FuturesAccountBalanceRequest futuresAccountBalanceRequest) throws ApiException { diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/DerivativesTradingCoinFuturesWebSocketApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/DerivativesTradingCoinFuturesWebSocketApi.java index 6c4145ce5..7c6aa3b96 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/DerivativesTradingCoinFuturesWebSocketApi.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/DerivativesTradingCoinFuturesWebSocketApi.java @@ -34,7 +34,7 @@ public class DerivativesTradingCoinFuturesWebSocketApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-coin-futures/7.1.1 (Java/%s; %s; %s)", + "binance-derivatives-trading-coin-futures/8.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final ConnectionInterface connection; diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/TradeApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/TradeApi.java index 99d23f967..b756c046b 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/TradeApi.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/TradeApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -49,8 +49,8 @@ public ConnectionInterface getConnection() { } /** - * Cancel Order (TRADE) Cancel an active order. * Either `orderId` or - * `origClientOrderId` must be sent. Weight: 1 + * Cancel Order (TRADE) Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - + * Either `orderId` or `origClientOrderId` must be sent. * * @param cancelOrderRequest (required) * @return CancelOrderResponse @@ -64,7 +64,7 @@ public ConnectionInterface getConnection() { * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/trade#cancel-order">Cancel * Order (TRADE) Documentation */ public CompletableFuture cancelOrder(CancelOrderRequest cancelOrderRequest) @@ -112,18 +112,18 @@ private void cancelOrderValidateBeforeCall(CancelOrderRequest cancelOrderRequest /** * Modify Order (TRADE) Order modify function, currently only LIMIT order modification is - * supported, modified orders will be reordered in the match queue * Either `orderId` - * or `origClientOrderId` must be sent, and the `orderId` will prevail if - * both are sent. * Both `quantity` and `price` must be sent, which is - * different from dapi modify order endpoint. * When the new `quantity` or - * `price` doesn'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 `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 Weight: 1 on 10s order rate + * 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); 1 on IP rate - * limit(x-mbx-used-weight-1m) + * limit(x-mbx-used-weight-1m) Security Type: TRADE Notes: - Either `orderId` or + * `origClientOrderId` must be sent, and the `orderId` will prevail if both + * are sent. - Both `quantity` and `price` must be sent. - When the new + * `quantity` or `price` doesn'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 `quantity` + * <= `executedQty` - When the order is `GTX` and the new price will + * cause it to be executed immediately - One order can only be modified for less than 10000 + * times. * * @param modifyOrderRequest (required) * @return ModifyOrderResponse @@ -137,7 +137,7 @@ private void cancelOrderValidateBeforeCall(CancelOrderRequest cancelOrderRequest * * * @see Modify + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/trade#modify-order">Modify * Order (TRADE) Documentation */ public CompletableFuture modifyOrder(ModifyOrderRequest modifyOrderRequest) @@ -184,37 +184,43 @@ private void modifyOrderValidateBeforeCall(ModifyOrderRequest modifyOrderRequest } /** - * New Order(TRADE) Send in a new order. * Order with type `STOP`, parameter - * `timeInForce` can be sent ( default `GTC`). * Order with type - * `TAKE_PROFIT`, parameter `timeInForce` can be sent ( default - * `GTC`). * Condition orders will be triggered when: * If parameter - * `priceProtect` is sent as true: * when price reaches the `stopPrice`,the + * New Order (TRADE) Send in a new order. Weight(IP): 0 Security Type: TRADE Notes: - Additional + * mandatory parameters based on `type`: | Type | Additional mandatory parameters | | + * :---: | --- | | `LIMIT` | `timeInForce`, `quantity`, + * `price` | | `MARKET` | `quantity` | | + * `STOP/TAKE_PROFIT` | `quantity`, `price`, `stopPrice` + * | | `STOP_MARKET/TAKE_PROFIT_MARKET` | `stopPrice` | | + * `TRAILING_STOP_MARKET` | `callbackRate` | - Order with type + * `STOP`, parameter `timeInForce` can be sent ( default `GTC`). * + * Order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent ( + * default `GTC`). * Condition orders will be triggered when: - If parameter + * `priceProtect` is sent as true: - when price reaches the `stopPrice`,the * difference rate between \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be - * larger than the \"triggerProtect\" of the symbol * \"triggerProtect\" of - * a symbol can be got from `GET /dapi/v1/exchangeInfo` * `STOP`, - * `STOP_MARKET`: * BUY: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` * SELL: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` * - * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` * + * larger than the \"triggerProtect\" of the symbol - \"triggerProtect\" of + * a symbol can be got from `GET /dapi/v1/exchangeInfo` - `STOP`, + * `STOP_MARKET`: - BUY: latest price (\"MARK_PRICE\" or + * \"CONTRACT_PRICE\") >= `stopPrice` - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` - + * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `stopPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order + * `stopPrice` - `TRAILING_STOP_MARKET`: - BUY: the lowest price after order * placed <= `activationPrice`, and the latest price >= the lowest - * price * (1 + `callbackRate`) * SELL: the highest price after order placed + * price * (1 + `callbackRate`) - SELL: the highest price after order placed * >= `activationPrice`, and the latest price <= the highest price * - * (1 - `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error - * code. * BUY: `activationPrice` should be smaller than latest price. * SELL: - * `activationPrice` should be larger than latest price. * If - * `newOrderRespType` is sent as `RESULT`: * `MARKET` order: the - * final FILLED result of the order will be return directly. * `LIMIT` order with + * (1 - `callbackRate`) - For `TRAILING_STOP_MARKET`, if you got such error + * code. - BUY: `activationPrice` should be smaller than latest price. - SELL: + * `activationPrice` should be larger than latest price. - If + * `newOrderRespType` is sent as `RESULT`: - `MARKET` order: the + * final FILLED result of the order will be return directly. - `LIMIT` order with * special `timeInForce`: the final status result of the order(FILLED or EXPIRED) will - * be returned directly. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition=true`: * Follow the same rules for condition orders. * If + * be returned directly. - `STOP_MARKET`, `TAKE_PROFIT_MARKET` with + * `closePosition=true`: - Follow the same rules for condition orders. - If * triggered,**close all** current long position(if `SELL`) or current short - * position(if `BUY`). * Cannot be used with `quantity` parameter * Cannot - * be used with `reduceOnly` parameter * In Hedge Mode, cannot be used with + * position(if `BUY`). - Cannot be used with `quantity` parameter - Cannot + * be used with `reduceOnly` parameter - In Hedge Mode, cannot be used with * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side Weight: 0 + * `SELL` orders in `SHORT` position side * * @param newOrderRequest (required) * @return NewOrderResponse @@ -228,8 +234,8 @@ private void modifyOrderValidateBeforeCall(ModifyOrderRequest modifyOrderRequest * * * @see New - * Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/trade#new-order">New + * Order (TRADE) Documentation */ public CompletableFuture newOrder(NewOrderRequest newOrderRequest) throws ApiException { @@ -274,10 +280,11 @@ private void newOrderValidateBeforeCall(NewOrderRequest newOrderRequest) throws } /** - * Position Information(USER_DATA) Get current position information. * Please use with user data - * stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 5 + * Position Information (USER_DATA) Get current position information. Weight(IP): 5 Security + * Type: USER_DATA Notes: - Please use with user data stream `ACCOUNT_UPDATE` to meet + * your timeliness and accuracy needs. * - * @param positionInformationRequest (required) + * @param positionInformationRequest (optional) * @return PositionInformationResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -289,8 +296,8 @@ private void newOrderValidateBeforeCall(NewOrderRequest newOrderRequest) throws * * * @see Position - * Information(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/trade#position-information">Position + * Information (USER_DATA) Documentation */ public CompletableFuture positionInformation( PositionInformationRequest positionInformationRequest) throws ApiException { @@ -340,8 +347,8 @@ private void positionInformationValidateBeforeCall( * Query Order (USER_DATA) Check an order's status. * These orders will not be found: * * order status is `CANCELED` or `EXPIRED` **AND** order has NO filled trade * **AND** created time + 3 days < current time * order create time + 90 days < current - * time * Either `orderId` or `origClientOrderId` must be sent. * - * `orderId` is self-increment for each specific `symbol` Weight: 1 + * time Weight(IP): 1 Security Type: USER_DATA Notes: - Either `orderId` or + * `origClientOrderId` must be sent. * * @param queryOrderRequest (required) * @return QueryOrderResponse @@ -355,7 +362,7 @@ private void positionInformationValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/trade#query-order">Query * Order (USER_DATA) Documentation */ public CompletableFuture queryOrder(QueryOrderRequest queryOrderRequest) diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/UserDataStreamsApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/UserDataStreamsApi.java index 5d4e29406..c1839cc94 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/UserDataStreamsApi.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/UserDataStreamsApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -45,9 +45,10 @@ public ConnectionInterface getConnection() { } /** - * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight: 1 + * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight(IP): 1 Security + * Type: USER_STREAM * - * @param closeUserDataStreamRequest (required) + * @param closeUserDataStreamRequest (optional) * @return CloseUserDataStreamResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -59,7 +60,7 @@ public ConnectionInterface getConnection() { * * * @see Close + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/user-data-streams#close-user-data-stream">Close * User Data Stream (USER_STREAM) Documentation */ public CompletableFuture closeUserDataStream( @@ -111,9 +112,9 @@ private void closeUserDataStreamValidateBeforeCall( /** * Keepalive User Data Stream (USER_STREAM) Keepalive a user data stream to prevent a time out. * User data streams will close after 60 minutes. It's recommended to send a ping about - * every 60 minutes. Weight: 1 + * every 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * - * @param keepaliveUserDataStreamRequest (required) + * @param keepaliveUserDataStreamRequest (optional) * @return KeepaliveUserDataStreamResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -125,7 +126,7 @@ private void closeUserDataStreamValidateBeforeCall( * * * @see Keepalive + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/user-data-streams#keepalive-user-data-stream">Keepalive * User Data Stream (USER_STREAM) Documentation */ public CompletableFuture keepaliveUserDataStream( @@ -180,9 +181,9 @@ private void keepaliveUserDataStreamValidateBeforeCall( * Start User Data Stream (USER_STREAM) Start a new user data stream. The stream will close * after 60 minutes unless a keepalive is sent. If the account has an active * `listenKey`, that `listenKey` will be returned and its validity will be - * extended for 60 minutes. Weight: 1 + * extended for 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * - * @param startUserDataStreamRequest (required) + * @param startUserDataStreamRequest (optional) * @return StartUserDataStreamResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -194,7 +195,7 @@ private void keepaliveUserDataStreamValidateBeforeCall( * * * @see Start + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/ws-api/user-data-streams#start-user-data-stream">Start * User Data Stream (USER_STREAM) Documentation */ public CompletableFuture startUserDataStream( diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AbstractOpenApiSchema.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AbstractOpenApiSchema.java index 3b7b34b3e..7499dd03b 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AbstractOpenApiSchema.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AbstractOpenApiSchema.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -18,7 +18,7 @@ /** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationRequest.java index 2e3d8b884..d880d334b 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountInformationRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -78,11 +78,12 @@ public AccountInformationRequest recvWindow(@jakarta.annotation.Nullable Long re } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponse.java index cb58e9df2..c97edade1 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** AccountInformationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -75,7 +75,7 @@ public AccountInformationResponse id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * positionId * * @return id */ @@ -94,7 +94,7 @@ public AccountInformationResponse status(@jakarta.annotation.Nullable Long statu } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -145,7 +145,7 @@ public AccountInformationResponse addRateLimitsItem( } /** - * Get rateLimits + * Rate limit definitions. * * @return rateLimits */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponseRateLimitsInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponseRateLimitsInner.java index d5a01b617..4938fabc4 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponseRateLimitsInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponseRateLimitsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountInformationResponseRateLimitsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationResponseRateLimitsInner extends BaseDTO { public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; @@ -78,7 +78,7 @@ public AccountInformationResponseRateLimitsInner rateLimitType( } /** - * Get rateLimitType + * Rate limit type. * * @return rateLimitType */ @@ -98,7 +98,7 @@ public AccountInformationResponseRateLimitsInner interval( } /** - * Get interval + * Rate limit interval. * * @return interval */ @@ -118,7 +118,7 @@ public AccountInformationResponseRateLimitsInner intervalNum( } /** - * Get intervalNum + * Rate limit interval multiplier. * * @return intervalNum */ @@ -138,7 +138,7 @@ public AccountInformationResponseRateLimitsInner limit( } /** - * Get limit + * Maximum allowed orders for this rule. * * @return limit */ @@ -158,7 +158,7 @@ public AccountInformationResponseRateLimitsInner count( } /** - * Get count + * Total number of trades in the 24h window. * * @return count */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponseResult.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponseResult.java index 0dffd5fc8..374a48a70 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponseResult.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,10 +38,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** AccountInformationResponseResult */ +/** Indicates that combined is set to true. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_FEE_TIER = "feeTier"; @@ -93,7 +93,7 @@ public AccountInformationResponseResult feeTier(@jakarta.annotation.Nullable Lon } /** - * Get feeTier + * Fee tier level. * * @return feeTier */ @@ -113,7 +113,7 @@ public AccountInformationResponseResult canTrade( } /** - * Get canTrade + * Whether trading is enabled. * * @return canTrade */ @@ -133,7 +133,7 @@ public AccountInformationResponseResult canDeposit( } /** - * Get canDeposit + * Whether deposits are enabled. * * @return canDeposit */ @@ -153,7 +153,7 @@ public AccountInformationResponseResult canWithdraw( } /** - * Get canWithdraw + * Whether withdrawals are enabled. * * @return canWithdraw */ @@ -173,7 +173,7 @@ public AccountInformationResponseResult updateTime( } /** - * Get updateTime + * update time * * @return updateTime */ @@ -203,7 +203,7 @@ public AccountInformationResponseResult addAssetsItem( } /** - * Get assets + * Supported assets. * * @return assets */ @@ -236,7 +236,7 @@ public AccountInformationResponseResult addPositionsItem( } /** - * Get positions + * Position list. * * @return positions */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponseResultAssetsInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponseResultAssetsInner.java index 643a2f4e9..2c6bbc325 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponseResultAssetsInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponseResultAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountInformationResponseResultAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationResponseResultAssetsInner extends BaseDTO { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -126,7 +126,7 @@ public AccountInformationResponseResultAssetsInner asset( } /** - * Get asset + * asset name * * @return asset */ @@ -146,7 +146,7 @@ public AccountInformationResponseResultAssetsInner walletBalance( } /** - * Get walletBalance + * total wallet balance * * @return walletBalance */ @@ -166,7 +166,7 @@ public AccountInformationResponseResultAssetsInner unrealizedProfit( } /** - * Get unrealizedProfit + * unrealized profit or loss * * @return unrealizedProfit */ @@ -186,7 +186,7 @@ public AccountInformationResponseResultAssetsInner marginBalance( } /** - * Get marginBalance + * margin balance * * @return marginBalance */ @@ -206,7 +206,7 @@ public AccountInformationResponseResultAssetsInner maintMargin( } /** - * Get maintMargin + * maintenance margin * * @return maintMargin */ @@ -226,7 +226,7 @@ public AccountInformationResponseResultAssetsInner initialMargin( } /** - * Get initialMargin + * total intial margin required with the latest mark price * * @return initialMargin */ @@ -246,7 +246,7 @@ public AccountInformationResponseResultAssetsInner positionInitialMargin( } /** - * Get positionInitialMargin + * positions margin required with the latest mark price * * @return positionInitialMargin */ @@ -267,7 +267,7 @@ public AccountInformationResponseResultAssetsInner openOrderInitialMargin( } /** - * Get openOrderInitialMargin + * open orders intial margin required with the latest mark price * * @return openOrderInitialMargin */ @@ -288,7 +288,7 @@ public AccountInformationResponseResultAssetsInner maxWithdrawAmount( } /** - * Get maxWithdrawAmount + * maximum amount for transfer out * * @return maxWithdrawAmount */ @@ -308,7 +308,7 @@ public AccountInformationResponseResultAssetsInner crossWalletBalance( } /** - * Get crossWalletBalance + * wallet balance for crossed margin * * @return crossWalletBalance */ @@ -328,7 +328,7 @@ public AccountInformationResponseResultAssetsInner crossUnPnl( } /** - * Get crossUnPnl + * total unrealized profit or loss of crossed positions * * @return crossUnPnl */ @@ -348,7 +348,7 @@ public AccountInformationResponseResultAssetsInner availableBalance( } /** - * Get availableBalance + * available margin balance * * @return availableBalance */ @@ -368,7 +368,7 @@ public AccountInformationResponseResultAssetsInner updateTime( } /** - * Get updateTime + * update time * * @return updateTime */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponseResultPositionsInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponseResultPositionsInner.java index aa919e78c..4b9b781ec 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponseResultPositionsInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/AccountInformationResponseResultPositionsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountInformationResponseResultPositionsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationResponseResultPositionsInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -144,7 +144,7 @@ public AccountInformationResponseResultPositionsInner symbol( } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -164,7 +164,7 @@ public AccountInformationResponseResultPositionsInner initialMargin( } /** - * Get initialMargin + * total intial margin required with the latest mark price * * @return initialMargin */ @@ -184,7 +184,7 @@ public AccountInformationResponseResultPositionsInner maintMargin( } /** - * Get maintMargin + * maintenance margin * * @return maintMargin */ @@ -204,7 +204,7 @@ public AccountInformationResponseResultPositionsInner unrealizedProfit( } /** - * Get unrealizedProfit + * unrealized profit or loss * * @return unrealizedProfit */ @@ -224,7 +224,7 @@ public AccountInformationResponseResultPositionsInner positionInitialMargin( } /** - * Get positionInitialMargin + * positions margin required with the latest mark price * * @return positionInitialMargin */ @@ -245,7 +245,7 @@ public AccountInformationResponseResultPositionsInner openOrderInitialMargin( } /** - * Get openOrderInitialMargin + * open orders intial margin required with the latest mark price * * @return openOrderInitialMargin */ @@ -266,7 +266,7 @@ public AccountInformationResponseResultPositionsInner leverage( } /** - * Get leverage + * Leverage value. * * @return leverage */ @@ -286,7 +286,7 @@ public AccountInformationResponseResultPositionsInner isolated( } /** - * Get isolated + * Whether isolated margin mode is enabled. * * @return isolated */ @@ -306,7 +306,7 @@ public AccountInformationResponseResultPositionsInner positionSide( } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -326,7 +326,7 @@ public AccountInformationResponseResultPositionsInner entryPrice( } /** - * Get entryPrice + * Position entry price. * * @return entryPrice */ @@ -346,7 +346,7 @@ public AccountInformationResponseResultPositionsInner maxQty( } /** - * Get maxQty + * maximum quantity of base asset * * @return maxQty */ @@ -366,7 +366,7 @@ public AccountInformationResponseResultPositionsInner notionalValue( } /** - * Get notionalValue + * Notional value. * * @return notionalValue */ @@ -386,7 +386,7 @@ public AccountInformationResponseResultPositionsInner isolatedWallet( } /** - * Get isolatedWallet + * Isolated wallet balance. * * @return isolatedWallet */ @@ -406,7 +406,7 @@ public AccountInformationResponseResultPositionsInner updateTime( } /** - * Get updateTime + * update time * * @return updateTime */ @@ -426,7 +426,7 @@ public AccountInformationResponseResultPositionsInner positionAmt( } /** - * Get positionAmt + * position amount * * @return positionAmt */ @@ -446,7 +446,7 @@ public AccountInformationResponseResultPositionsInner breakEvenPrice( } /** - * Get breakEvenPrice + * break-even price * * @return breakEvenPrice */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CancelOrderRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CancelOrderRequest.java index 3358656db..78d1b1400 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CancelOrderRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CancelOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** CancelOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelOrderRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -155,11 +155,12 @@ public CancelOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvWindo } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CancelOrderResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CancelOrderResponse.java index 286d4871d..9040a57b6 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CancelOrderResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CancelOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** CancelOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelOrderResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -75,7 +75,7 @@ public CancelOrderResponse id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * positionId * * @return id */ @@ -94,7 +94,7 @@ public CancelOrderResponse status(@jakarta.annotation.Nullable Long status) { } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -145,7 +145,7 @@ public CancelOrderResponse addRateLimitsItem( } /** - * Get rateLimits + * Rate limit definitions. * * @return rateLimits */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CancelOrderResponseRateLimitsInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CancelOrderResponseRateLimitsInner.java index 87350c6e0..ce2873d61 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CancelOrderResponseRateLimitsInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CancelOrderResponseRateLimitsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** CancelOrderResponseRateLimitsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelOrderResponseRateLimitsInner extends BaseDTO { public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; @@ -78,7 +78,7 @@ public CancelOrderResponseRateLimitsInner rateLimitType( } /** - * Get rateLimitType + * Rate limit type. * * @return rateLimitType */ @@ -98,7 +98,7 @@ public CancelOrderResponseRateLimitsInner interval( } /** - * Get interval + * Rate limit interval. * * @return interval */ @@ -118,7 +118,7 @@ public CancelOrderResponseRateLimitsInner intervalNum( } /** - * Get intervalNum + * Rate limit interval multiplier. * * @return intervalNum */ @@ -137,7 +137,7 @@ public CancelOrderResponseRateLimitsInner limit(@jakarta.annotation.Nullable Lon } /** - * Get limit + * Maximum allowed orders for this rule. * * @return limit */ @@ -156,7 +156,7 @@ public CancelOrderResponseRateLimitsInner count(@jakarta.annotation.Nullable Lon } /** - * Get count + * Total number of trades in the 24h window. * * @return count */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CancelOrderResponseResult.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CancelOrderResponseResult.java index 010c7bcb9..119e00a33 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CancelOrderResponseResult.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CancelOrderResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** CancelOrderResponseResult */ +/** Indicates that combined is set to true. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelOrderResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -75,12 +75,6 @@ public class CancelOrderResponseResult extends BaseDTO { @jakarta.annotation.Nullable private String price; - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE) - @jakarta.annotation.Nullable - private String avgPrice; - public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; @SerializedName(SERIALIZED_NAME_ORIG_QTY) @@ -99,12 +93,6 @@ public class CancelOrderResponseResult extends BaseDTO { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_BASE = "cumBase"; - - @SerializedName(SERIALIZED_NAME_CUM_BASE) - @jakarta.annotation.Nullable - private String cumBase; - public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) @@ -179,7 +167,7 @@ public CancelOrderResponseResult orderId(@jakarta.annotation.Nullable Long order } /** - * Get orderId + * Sub-order ID * * @return orderId */ @@ -198,7 +186,7 @@ public CancelOrderResponseResult symbol(@jakarta.annotation.Nullable String symb } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -217,7 +205,7 @@ public CancelOrderResponseResult pair(@jakarta.annotation.Nullable String pair) } /** - * Get pair + * Pair * * @return pair */ @@ -236,7 +224,7 @@ public CancelOrderResponseResult status(@jakarta.annotation.Nullable String stat } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -256,7 +244,7 @@ public CancelOrderResponseResult clientOrderId( } /** - * Get clientOrderId + * Client order ID. * * @return clientOrderId */ @@ -275,7 +263,7 @@ public CancelOrderResponseResult price(@jakarta.annotation.Nullable String price } /** - * Get price + * Latest token price. * * @return price */ @@ -288,32 +276,13 @@ public void setPrice(@jakarta.annotation.Nullable String price) { this.price = price; } - public CancelOrderResponseResult avgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - return this; - } - - /** - * Get avgPrice - * - * @return avgPrice - */ - @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; - } - - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - } - public CancelOrderResponseResult origQty(@jakarta.annotation.Nullable String origQty) { this.origQty = origQty; return this; } /** - * Get origQty + * Original order quantity * * @return origQty */ @@ -332,7 +301,7 @@ public CancelOrderResponseResult executedQty(@jakarta.annotation.Nullable String } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -351,7 +320,7 @@ public CancelOrderResponseResult cumQty(@jakarta.annotation.Nullable String cumQ } /** - * Get cumQty + * Cumulative filled quantity. * * @return cumQty */ @@ -364,32 +333,13 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public CancelOrderResponseResult cumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - return this; - } - - /** - * Get cumBase - * - * @return cumBase - */ - @jakarta.annotation.Nullable - public String getCumBase() { - return cumBase; - } - - public void setCumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - } - public CancelOrderResponseResult timeInForce(@jakarta.annotation.Nullable String timeInForce) { this.timeInForce = timeInForce; return this; } /** - * Get timeInForce + * Time in force * * @return timeInForce */ @@ -408,7 +358,7 @@ public CancelOrderResponseResult type(@jakarta.annotation.Nullable String type) } /** - * Get type + * Order type. * * @return type */ @@ -427,7 +377,7 @@ public CancelOrderResponseResult reduceOnly(@jakarta.annotation.Nullable Boolean } /** - * Get reduceOnly + * Whether the order is reduce-only. * * @return reduceOnly */ @@ -447,7 +397,7 @@ public CancelOrderResponseResult closePosition( } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -466,7 +416,7 @@ public CancelOrderResponseResult side(@jakarta.annotation.Nullable String side) } /** - * Get side + * Trading side * * @return side */ @@ -486,7 +436,7 @@ public CancelOrderResponseResult positionSide( } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -505,7 +455,7 @@ public CancelOrderResponseResult stopPrice(@jakarta.annotation.Nullable String s } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -524,7 +474,7 @@ public CancelOrderResponseResult workingType(@jakarta.annotation.Nullable String } /** - * Get workingType + * Stop trigger price type. * * @return workingType */ @@ -544,7 +494,7 @@ public CancelOrderResponseResult priceProtect( } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -563,7 +513,7 @@ public CancelOrderResponseResult origType(@jakarta.annotation.Nullable String or } /** - * Get origType + * Original order type. * * @return origType */ @@ -582,7 +532,7 @@ public CancelOrderResponseResult updateTime(@jakarta.annotation.Nullable Long up } /** - * Get updateTime + * update time * * @return updateTime */ @@ -610,11 +560,9 @@ public boolean equals(Object o) { && Objects.equals(this.status, cancelOrderResponseResult.status) && Objects.equals(this.clientOrderId, cancelOrderResponseResult.clientOrderId) && Objects.equals(this.price, cancelOrderResponseResult.price) - && Objects.equals(this.avgPrice, cancelOrderResponseResult.avgPrice) && Objects.equals(this.origQty, cancelOrderResponseResult.origQty) && Objects.equals(this.executedQty, cancelOrderResponseResult.executedQty) && Objects.equals(this.cumQty, cancelOrderResponseResult.cumQty) - && Objects.equals(this.cumBase, cancelOrderResponseResult.cumBase) && Objects.equals(this.timeInForce, cancelOrderResponseResult.timeInForce) && Objects.equals(this.type, cancelOrderResponseResult.type) && Objects.equals(this.reduceOnly, cancelOrderResponseResult.reduceOnly) @@ -637,11 +585,9 @@ public int hashCode() { status, clientOrderId, price, - avgPrice, origQty, executedQty, cumQty, - cumBase, timeInForce, type, reduceOnly, @@ -665,11 +611,9 @@ public String toString() { sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumBase: ").append(toIndentedString(cumBase)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); @@ -719,11 +663,6 @@ public String toUrlQueryString() { String priceValueAsString = priceValue.toString(); valMap.put("price", priceValueAsString); } - String avgPriceValue = getAvgPrice(); - if (avgPriceValue != null) { - String avgPriceValueAsString = avgPriceValue.toString(); - valMap.put("avgPrice", avgPriceValueAsString); - } String origQtyValue = getOrigQty(); if (origQtyValue != null) { String origQtyValueAsString = origQtyValue.toString(); @@ -739,11 +678,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = cumQtyValue.toString(); valMap.put("cumQty", cumQtyValueAsString); } - String cumBaseValue = getCumBase(); - if (cumBaseValue != null) { - String cumBaseValueAsString = cumBaseValue.toString(); - valMap.put("cumBase", cumBaseValueAsString); - } String timeInForceValue = getTimeInForce(); if (timeInForceValue != null) { String timeInForceValueAsString = timeInForceValue.toString(); @@ -834,10 +768,6 @@ public Map toMap() { if (priceValue != null) { valMap.put("price", priceValue); } - Object avgPriceValue = getAvgPrice(); - if (avgPriceValue != null) { - valMap.put("avgPrice", avgPriceValue); - } Object origQtyValue = getOrigQty(); if (origQtyValue != null) { valMap.put("origQty", origQtyValue); @@ -850,10 +780,6 @@ public Map toMap() { if (cumQtyValue != null) { valMap.put("cumQty", cumQtyValue); } - Object cumBaseValue = getCumBase(); - if (cumBaseValue != null) { - valMap.put("cumBase", cumBaseValue); - } Object timeInForceValue = getTimeInForce(); if (timeInForceValue != null) { valMap.put("timeInForce", timeInForceValue); @@ -930,11 +856,9 @@ private String toIndentedString(Object o) { openapiFields.add("status"); openapiFields.add("clientOrderId"); openapiFields.add("price"); - openapiFields.add("avgPrice"); openapiFields.add("origQty"); openapiFields.add("executedQty"); openapiFields.add("cumQty"); - openapiFields.add("cumBase"); openapiFields.add("timeInForce"); openapiFields.add("type"); openapiFields.add("reduceOnly"); @@ -1021,14 +945,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("price").toString())); } - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) && !jsonObj.get("origQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1053,14 +969,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumBase") != null && !jsonObj.get("cumBase").isJsonNull()) - && !jsonObj.get("cumBase").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumBase` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("cumBase").toString())); - } if ((jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) && !jsonObj.get("timeInForce").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ClosePosition.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ClosePosition.java new file mode 100644 index 000000000..17aa0fe2d --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ClosePosition.java @@ -0,0 +1,76 @@ +/* + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** + * `true`, `false`;Close-All,used with `STOP_MARKET` or + * `TAKE_PROFIT_MARKET`. + */ +@JsonAdapter(ClosePosition.Adapter.class) +public enum ClosePosition { + TRUE("true"), + + FALSE("false"); + + private String value; + + ClosePosition(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ClosePosition fromValue(String value) { + for (ClosePosition b : ClosePosition.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ClosePosition enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ClosePosition read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ClosePosition.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ClosePosition.fromValue(value); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CloseUserDataStreamRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CloseUserDataStreamRequest.java index 1ca6ff3c1..1f16524b3 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CloseUserDataStreamRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CloseUserDataStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** CloseUserDataStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CloseUserDataStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CloseUserDataStreamResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CloseUserDataStreamResponse.java index 765899db0..2668980e6 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CloseUserDataStreamResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CloseUserDataStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** CloseUserDataStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CloseUserDataStreamResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -75,7 +75,7 @@ public CloseUserDataStreamResponse id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * positionId * * @return id */ @@ -94,7 +94,7 @@ public CloseUserDataStreamResponse status(@jakarta.annotation.Nullable Long stat } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -113,7 +113,7 @@ public CloseUserDataStreamResponse result(@jakarta.annotation.Nullable Object re } /** - * Get result + * Indicates that combined is set to true. * * @return result */ @@ -143,7 +143,7 @@ public CloseUserDataStreamResponse addRateLimitsItem( } /** - * Get rateLimits + * Rate limit definitions. * * @return rateLimits */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CloseUserDataStreamResponseRateLimitsInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CloseUserDataStreamResponseRateLimitsInner.java index 0a26ae870..8d60cdd20 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CloseUserDataStreamResponseRateLimitsInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/CloseUserDataStreamResponseRateLimitsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** CloseUserDataStreamResponseRateLimitsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CloseUserDataStreamResponseRateLimitsInner extends BaseDTO { public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; @@ -78,7 +78,7 @@ public CloseUserDataStreamResponseRateLimitsInner rateLimitType( } /** - * Get rateLimitType + * Rate limit type. * * @return rateLimitType */ @@ -98,7 +98,7 @@ public CloseUserDataStreamResponseRateLimitsInner interval( } /** - * Get interval + * Rate limit interval. * * @return interval */ @@ -118,7 +118,7 @@ public CloseUserDataStreamResponseRateLimitsInner intervalNum( } /** - * Get intervalNum + * Rate limit interval multiplier. * * @return intervalNum */ @@ -138,7 +138,7 @@ public CloseUserDataStreamResponseRateLimitsInner limit( } /** - * Get limit + * Maximum allowed orders for this rule. * * @return limit */ @@ -158,7 +158,7 @@ public CloseUserDataStreamResponseRateLimitsInner count( } /** - * Get count + * Total number of trades in the 24h window. * * @return count */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/FuturesAccountBalanceRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/FuturesAccountBalanceRequest.java index f501cbf3f..6057fd189 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/FuturesAccountBalanceRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/FuturesAccountBalanceRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** FuturesAccountBalanceRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesAccountBalanceRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -78,11 +78,12 @@ public FuturesAccountBalanceRequest recvWindow(@jakarta.annotation.Nullable Long } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/FuturesAccountBalanceResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/FuturesAccountBalanceResponse.java index cf6bbe43a..60e892c40 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/FuturesAccountBalanceResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/FuturesAccountBalanceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** FuturesAccountBalanceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesAccountBalanceResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -75,7 +75,7 @@ public FuturesAccountBalanceResponse id(@jakarta.annotation.Nullable String id) } /** - * Get id + * positionId * * @return id */ @@ -94,7 +94,7 @@ public FuturesAccountBalanceResponse status(@jakarta.annotation.Nullable Long st } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -124,7 +124,7 @@ public FuturesAccountBalanceResponse addResultItem( } /** - * Get result + * Indicates that combined is set to true. * * @return result */ @@ -157,7 +157,7 @@ public FuturesAccountBalanceResponse addRateLimitsItem( } /** - * Get rateLimits + * Rate limit definitions. * * @return rateLimits */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/FuturesAccountBalanceResponseResultInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/FuturesAccountBalanceResponseResultInner.java index 612383229..8ff6f9604 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/FuturesAccountBalanceResponseResultInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/FuturesAccountBalanceResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** FuturesAccountBalanceResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesAccountBalanceResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_ACCOUNT_ALIAS = "accountAlias"; @@ -96,7 +96,7 @@ public FuturesAccountBalanceResponseResultInner accountAlias( } /** - * Get accountAlias + * unique account code * * @return accountAlias */ @@ -116,7 +116,7 @@ public FuturesAccountBalanceResponseResultInner asset( } /** - * Get asset + * asset name * * @return asset */ @@ -136,7 +136,7 @@ public FuturesAccountBalanceResponseResultInner balance( } /** - * Get balance + * Account balance. * * @return balance */ @@ -156,7 +156,7 @@ public FuturesAccountBalanceResponseResultInner withdrawAvailable( } /** - * Get withdrawAvailable + * Available amount for withdrawal. * * @return withdrawAvailable */ @@ -176,7 +176,7 @@ public FuturesAccountBalanceResponseResultInner crossWalletBalance( } /** - * Get crossWalletBalance + * wallet balance for crossed margin * * @return crossWalletBalance */ @@ -196,7 +196,7 @@ public FuturesAccountBalanceResponseResultInner crossUnPnl( } /** - * Get crossUnPnl + * total unrealized profit or loss of crossed positions * * @return crossUnPnl */ @@ -216,7 +216,7 @@ public FuturesAccountBalanceResponseResultInner availableBalance( } /** - * Get availableBalance + * available margin balance * * @return availableBalance */ @@ -236,7 +236,7 @@ public FuturesAccountBalanceResponseResultInner updateTime( } /** - * Get updateTime + * update time * * @return updateTime */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/KeepaliveUserDataStreamRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/KeepaliveUserDataStreamRequest.java index 73714b133..fa96511a8 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/KeepaliveUserDataStreamRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/KeepaliveUserDataStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** KeepaliveUserDataStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KeepaliveUserDataStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/KeepaliveUserDataStreamResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/KeepaliveUserDataStreamResponse.java index a27d37c75..2e2c3e97e 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/KeepaliveUserDataStreamResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/KeepaliveUserDataStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** KeepaliveUserDataStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KeepaliveUserDataStreamResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -75,7 +75,7 @@ public KeepaliveUserDataStreamResponse id(@jakarta.annotation.Nullable String id } /** - * Get id + * positionId * * @return id */ @@ -94,7 +94,7 @@ public KeepaliveUserDataStreamResponse status(@jakarta.annotation.Nullable Long } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -146,7 +146,7 @@ public KeepaliveUserDataStreamResponse addRateLimitsItem( } /** - * Get rateLimits + * Rate limit definitions. * * @return rateLimits */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/KeepaliveUserDataStreamResponseResult.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/KeepaliveUserDataStreamResponseResult.java index 729c926c0..bd7e16a66 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/KeepaliveUserDataStreamResponseResult.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/KeepaliveUserDataStreamResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** KeepaliveUserDataStreamResponseResult */ +/** Indicates that combined is set to true. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KeepaliveUserDataStreamResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; @@ -54,7 +54,7 @@ public KeepaliveUserDataStreamResponseResult listenKey( } /** - * Get listenKey + * Listen key. * * @return listenKey */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ModifyOrderRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ModifyOrderRequest.java index df2c4468f..c7bb48261 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ModifyOrderRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ModifyOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -39,7 +39,7 @@ /** ModifyOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyOrderRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -89,6 +89,12 @@ public class ModifyOrderRequest extends BaseDTO { @jakarta.annotation.Nullable private PriceMatch priceMatch; + public static final String SERIALIZED_NAME_MODIFY_ID = "modifyId"; + + @SerializedName(SERIALIZED_NAME_MODIFY_ID) + @jakarta.annotation.Nullable + private Long modifyId; + public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @SerializedName(SERIALIZED_NAME_RECV_WINDOW) @@ -202,7 +208,7 @@ public ModifyOrderRequest quantity(@jakarta.annotation.Nonnull Double quantity) } /** - * Get quantity + * Order quantity, cannot be sent with `closePosition=true` * * @return quantity */ @@ -258,17 +264,38 @@ public void setPriceMatch(@jakarta.annotation.Nullable PriceMatch priceMatch) { this.priceMatch = priceMatch; } + public ModifyOrderRequest modifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + return this; + } + + /** + * User-defined modification identifier, returned as-is in the response. Optional; not validated + * for uniqueness. + * + * @return modifyId + */ + @jakarta.annotation.Nullable + public Long getModifyId() { + return modifyId; + } + + public void setModifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + } + public ModifyOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) { this.recvWindow = recvWindow; return this; } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -294,6 +321,7 @@ public boolean equals(Object o) { && Objects.equals(this.quantity, modifyOrderRequest.quantity) && Objects.equals(this.price, modifyOrderRequest.price) && Objects.equals(this.priceMatch, modifyOrderRequest.priceMatch) + && Objects.equals(this.modifyId, modifyOrderRequest.modifyId) && Objects.equals(this.recvWindow, modifyOrderRequest.recvWindow); } @@ -308,6 +336,7 @@ public int hashCode() { quantity, price, priceMatch, + modifyId, recvWindow); } @@ -323,6 +352,7 @@ public String toString() { sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" priceMatch: ").append(toIndentedString(priceMatch)).append("\n"); + sb.append(" modifyId: ").append(toIndentedString(modifyId)).append("\n"); sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); sb.append("}"); return sb.toString(); @@ -372,6 +402,11 @@ public String toUrlQueryString() { String priceMatchValueAsString = priceMatchValue.toString(); valMap.put("priceMatch", priceMatchValueAsString); } + Long modifyIdValue = getModifyId(); + if (modifyIdValue != null) { + String modifyIdValueAsString = modifyIdValue.toString(); + valMap.put("modifyId", modifyIdValueAsString); + } Long recvWindowValue = getRecvWindow(); if (recvWindowValue != null) { String recvWindowValueAsString = recvWindowValue.toString(); @@ -420,6 +455,10 @@ public Map toMap() { if (priceMatchValue != null) { valMap.put("priceMatch", priceMatchValue); } + Object modifyIdValue = getModifyId(); + if (modifyIdValue != null) { + valMap.put("modifyId", modifyIdValue); + } Object recvWindowValue = getRecvWindow(); if (recvWindowValue != null) { valMap.put("recvWindow", recvWindowValue); @@ -458,6 +497,7 @@ private String toIndentedString(Object o) { openapiFields.add("quantity"); openapiFields.add("price"); openapiFields.add("priceMatch"); + openapiFields.add("modifyId"); openapiFields.add("recvWindow"); // a set of required properties/fields (JSON key names) diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ModifyOrderResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ModifyOrderResponse.java index 854d31d84..31620b1a4 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ModifyOrderResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ModifyOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** ModifyOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyOrderResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -75,7 +75,7 @@ public ModifyOrderResponse id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * positionId * * @return id */ @@ -94,7 +94,7 @@ public ModifyOrderResponse status(@jakarta.annotation.Nullable Long status) { } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -145,7 +145,7 @@ public ModifyOrderResponse addRateLimitsItem( } /** - * Get rateLimits + * Rate limit definitions. * * @return rateLimits */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ModifyOrderResponseResult.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ModifyOrderResponseResult.java index 8e7f682e5..a22d5b3db 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ModifyOrderResponseResult.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ModifyOrderResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** ModifyOrderResponseResult */ +/** Indicates that combined is set to true. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyOrderResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -69,17 +69,17 @@ public class ModifyOrderResponseResult extends BaseDTO { @jakarta.annotation.Nullable private String clientOrderId; - public static final String SERIALIZED_NAME_PRICE = "price"; + public static final String SERIALIZED_NAME_MODIFY_ID = "modifyId"; - @SerializedName(SERIALIZED_NAME_PRICE) + @SerializedName(SERIALIZED_NAME_MODIFY_ID) @jakarta.annotation.Nullable - private String price; + private Long modifyId; - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; + public static final String SERIALIZED_NAME_PRICE = "price"; - @SerializedName(SERIALIZED_NAME_AVG_PRICE) + @SerializedName(SERIALIZED_NAME_PRICE) @jakarta.annotation.Nullable - private String avgPrice; + private String price; public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; @@ -99,12 +99,6 @@ public class ModifyOrderResponseResult extends BaseDTO { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_BASE = "cumBase"; - - @SerializedName(SERIALIZED_NAME_CUM_BASE) - @jakarta.annotation.Nullable - private String cumBase; - public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) @@ -179,7 +173,7 @@ public ModifyOrderResponseResult orderId(@jakarta.annotation.Nullable Long order } /** - * Get orderId + * Sub-order ID * * @return orderId */ @@ -198,7 +192,7 @@ public ModifyOrderResponseResult symbol(@jakarta.annotation.Nullable String symb } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -217,7 +211,7 @@ public ModifyOrderResponseResult pair(@jakarta.annotation.Nullable String pair) } /** - * Get pair + * Pair * * @return pair */ @@ -236,7 +230,7 @@ public ModifyOrderResponseResult status(@jakarta.annotation.Nullable String stat } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -256,7 +250,7 @@ public ModifyOrderResponseResult clientOrderId( } /** - * Get clientOrderId + * Client order ID. * * @return clientOrderId */ @@ -269,42 +263,42 @@ public void setClientOrderId(@jakarta.annotation.Nullable String clientOrderId) this.clientOrderId = clientOrderId; } - public ModifyOrderResponseResult price(@jakarta.annotation.Nullable String price) { - this.price = price; + public ModifyOrderResponseResult modifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; return this; } /** - * Get price + * user-defined modification identifier, only returned if provided in the request * - * @return price + * @return modifyId */ @jakarta.annotation.Nullable - public String getPrice() { - return price; + public Long getModifyId() { + return modifyId; } - public void setPrice(@jakarta.annotation.Nullable String price) { - this.price = price; + public void setModifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; } - public ModifyOrderResponseResult avgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; + public ModifyOrderResponseResult price(@jakarta.annotation.Nullable String price) { + this.price = price; return this; } /** - * Get avgPrice + * Latest token price. * - * @return avgPrice + * @return price */ @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; + public String getPrice() { + return price; } - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; + public void setPrice(@jakarta.annotation.Nullable String price) { + this.price = price; } public ModifyOrderResponseResult origQty(@jakarta.annotation.Nullable String origQty) { @@ -313,7 +307,7 @@ public ModifyOrderResponseResult origQty(@jakarta.annotation.Nullable String ori } /** - * Get origQty + * Original order quantity * * @return origQty */ @@ -332,7 +326,7 @@ public ModifyOrderResponseResult executedQty(@jakarta.annotation.Nullable String } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -351,7 +345,7 @@ public ModifyOrderResponseResult cumQty(@jakarta.annotation.Nullable String cumQ } /** - * Get cumQty + * Cumulative filled quantity. * * @return cumQty */ @@ -364,32 +358,13 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public ModifyOrderResponseResult cumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - return this; - } - - /** - * Get cumBase - * - * @return cumBase - */ - @jakarta.annotation.Nullable - public String getCumBase() { - return cumBase; - } - - public void setCumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - } - public ModifyOrderResponseResult timeInForce(@jakarta.annotation.Nullable String timeInForce) { this.timeInForce = timeInForce; return this; } /** - * Get timeInForce + * Time in force * * @return timeInForce */ @@ -408,7 +383,7 @@ public ModifyOrderResponseResult type(@jakarta.annotation.Nullable String type) } /** - * Get type + * Order type. * * @return type */ @@ -427,7 +402,7 @@ public ModifyOrderResponseResult reduceOnly(@jakarta.annotation.Nullable Boolean } /** - * Get reduceOnly + * Whether the order is reduce-only. * * @return reduceOnly */ @@ -447,7 +422,7 @@ public ModifyOrderResponseResult closePosition( } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -466,7 +441,7 @@ public ModifyOrderResponseResult side(@jakarta.annotation.Nullable String side) } /** - * Get side + * Trading side * * @return side */ @@ -486,7 +461,7 @@ public ModifyOrderResponseResult positionSide( } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -505,7 +480,7 @@ public ModifyOrderResponseResult stopPrice(@jakarta.annotation.Nullable String s } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -524,7 +499,7 @@ public ModifyOrderResponseResult workingType(@jakarta.annotation.Nullable String } /** - * Get workingType + * Stop trigger price type. * * @return workingType */ @@ -544,7 +519,7 @@ public ModifyOrderResponseResult priceProtect( } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -563,7 +538,7 @@ public ModifyOrderResponseResult origType(@jakarta.annotation.Nullable String or } /** - * Get origType + * Original order type. * * @return origType */ @@ -582,7 +557,7 @@ public ModifyOrderResponseResult updateTime(@jakarta.annotation.Nullable Long up } /** - * Get updateTime + * update time * * @return updateTime */ @@ -609,12 +584,11 @@ public boolean equals(Object o) { && Objects.equals(this.pair, modifyOrderResponseResult.pair) && Objects.equals(this.status, modifyOrderResponseResult.status) && Objects.equals(this.clientOrderId, modifyOrderResponseResult.clientOrderId) + && Objects.equals(this.modifyId, modifyOrderResponseResult.modifyId) && Objects.equals(this.price, modifyOrderResponseResult.price) - && Objects.equals(this.avgPrice, modifyOrderResponseResult.avgPrice) && Objects.equals(this.origQty, modifyOrderResponseResult.origQty) && Objects.equals(this.executedQty, modifyOrderResponseResult.executedQty) && Objects.equals(this.cumQty, modifyOrderResponseResult.cumQty) - && Objects.equals(this.cumBase, modifyOrderResponseResult.cumBase) && Objects.equals(this.timeInForce, modifyOrderResponseResult.timeInForce) && Objects.equals(this.type, modifyOrderResponseResult.type) && Objects.equals(this.reduceOnly, modifyOrderResponseResult.reduceOnly) @@ -636,12 +610,11 @@ public int hashCode() { pair, status, clientOrderId, + modifyId, price, - avgPrice, origQty, executedQty, cumQty, - cumBase, timeInForce, type, reduceOnly, @@ -664,12 +637,11 @@ public String toString() { sb.append(" pair: ").append(toIndentedString(pair)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); + sb.append(" modifyId: ").append(toIndentedString(modifyId)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumBase: ").append(toIndentedString(cumBase)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); @@ -714,16 +686,16 @@ public String toUrlQueryString() { String clientOrderIdValueAsString = clientOrderIdValue.toString(); valMap.put("clientOrderId", clientOrderIdValueAsString); } + Long modifyIdValue = getModifyId(); + if (modifyIdValue != null) { + String modifyIdValueAsString = modifyIdValue.toString(); + valMap.put("modifyId", modifyIdValueAsString); + } String priceValue = getPrice(); if (priceValue != null) { String priceValueAsString = priceValue.toString(); valMap.put("price", priceValueAsString); } - String avgPriceValue = getAvgPrice(); - if (avgPriceValue != null) { - String avgPriceValueAsString = avgPriceValue.toString(); - valMap.put("avgPrice", avgPriceValueAsString); - } String origQtyValue = getOrigQty(); if (origQtyValue != null) { String origQtyValueAsString = origQtyValue.toString(); @@ -739,11 +711,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = cumQtyValue.toString(); valMap.put("cumQty", cumQtyValueAsString); } - String cumBaseValue = getCumBase(); - if (cumBaseValue != null) { - String cumBaseValueAsString = cumBaseValue.toString(); - valMap.put("cumBase", cumBaseValueAsString); - } String timeInForceValue = getTimeInForce(); if (timeInForceValue != null) { String timeInForceValueAsString = timeInForceValue.toString(); @@ -830,14 +797,14 @@ public Map toMap() { if (clientOrderIdValue != null) { valMap.put("clientOrderId", clientOrderIdValue); } + Object modifyIdValue = getModifyId(); + if (modifyIdValue != null) { + valMap.put("modifyId", modifyIdValue); + } Object priceValue = getPrice(); if (priceValue != null) { valMap.put("price", priceValue); } - Object avgPriceValue = getAvgPrice(); - if (avgPriceValue != null) { - valMap.put("avgPrice", avgPriceValue); - } Object origQtyValue = getOrigQty(); if (origQtyValue != null) { valMap.put("origQty", origQtyValue); @@ -850,10 +817,6 @@ public Map toMap() { if (cumQtyValue != null) { valMap.put("cumQty", cumQtyValue); } - Object cumBaseValue = getCumBase(); - if (cumBaseValue != null) { - valMap.put("cumBase", cumBaseValue); - } Object timeInForceValue = getTimeInForce(); if (timeInForceValue != null) { valMap.put("timeInForce", timeInForceValue); @@ -929,12 +892,11 @@ private String toIndentedString(Object o) { openapiFields.add("pair"); openapiFields.add("status"); openapiFields.add("clientOrderId"); + openapiFields.add("modifyId"); openapiFields.add("price"); - openapiFields.add("avgPrice"); openapiFields.add("origQty"); openapiFields.add("executedQty"); openapiFields.add("cumQty"); - openapiFields.add("cumBase"); openapiFields.add("timeInForce"); openapiFields.add("type"); openapiFields.add("reduceOnly"); @@ -1021,14 +983,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("price").toString())); } - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) && !jsonObj.get("origQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1053,14 +1007,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumBase") != null && !jsonObj.get("cumBase").isJsonNull()) - && !jsonObj.get("cumBase").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumBase` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("cumBase").toString())); - } if ((jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) && !jsonObj.get("timeInForce").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/NewOrderRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/NewOrderRequest.java index 4f44245c1..73630b56e 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/NewOrderRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/NewOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -39,7 +39,7 @@ /** NewOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewOrderRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -69,7 +69,7 @@ public class NewOrderRequest extends BaseDTO { @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private Type type; + private OrderType type; public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @@ -87,7 +87,7 @@ public class NewOrderRequest extends BaseDTO { @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) @jakarta.annotation.Nullable - private String reduceOnly; + private ReduceOnly reduceOnly; public static final String SERIALIZED_NAME_PRICE = "price"; @@ -111,7 +111,7 @@ public class NewOrderRequest extends BaseDTO { @SerializedName(SERIALIZED_NAME_CLOSE_POSITION) @jakarta.annotation.Nullable - private String closePosition; + private ClosePosition closePosition; public static final String SERIALIZED_NAME_ACTIVATION_PRICE = "activationPrice"; @@ -135,7 +135,7 @@ public class NewOrderRequest extends BaseDTO { @SerializedName(SERIALIZED_NAME_PRICE_PROTECT) @jakarta.annotation.Nullable - private String priceProtect; + private PriceProtect priceProtect; public static final String SERIALIZED_NAME_NEW_ORDER_RESP_TYPE = "newOrderRespType"; @@ -244,7 +244,7 @@ public void setPositionSide(@jakarta.annotation.Nullable PositionSide positionSi this.positionSide = positionSide; } - public NewOrderRequest type(@jakarta.annotation.Nonnull Type type) { + public NewOrderRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -257,11 +257,11 @@ public NewOrderRequest type(@jakarta.annotation.Nonnull Type type) { @jakarta.annotation.Nonnull @NotNull @Valid - public Type getType() { + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull Type type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } @@ -291,7 +291,8 @@ public NewOrderRequest quantity(@jakarta.annotation.Nullable Double quantity) { } /** - * Get quantity + * Quantity measured by contract number, Cannot be sent with + * `closePosition`=`true` * * @return quantity */ @@ -305,7 +306,7 @@ public void setQuantity(@jakarta.annotation.Nullable Double quantity) { this.quantity = quantity; } - public NewOrderRequest reduceOnly(@jakarta.annotation.Nullable String reduceOnly) { + public NewOrderRequest reduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { this.reduceOnly = reduceOnly; return this; } @@ -316,11 +317,12 @@ public NewOrderRequest reduceOnly(@jakarta.annotation.Nullable String reduceOnly * @return reduceOnly */ @jakarta.annotation.Nullable - public String getReduceOnly() { + @Valid + public ReduceOnly getReduceOnly() { return reduceOnly; } - public void setReduceOnly(@jakarta.annotation.Nullable String reduceOnly) { + public void setReduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { this.reduceOnly = reduceOnly; } @@ -350,7 +352,8 @@ public NewOrderRequest newClientOrderId(@jakarta.annotation.Nullable String newC } /** - * Get newClientOrderId + * A unique id among open orders. Automatically generated if not sent. Can only be string + * following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,36}$` * * @return newClientOrderId */ @@ -369,7 +372,7 @@ public NewOrderRequest stopPrice(@jakarta.annotation.Nullable Double stopPrice) } /** - * Get stopPrice + * Used with `STOP/STOP_MARKET` or `TAKE_PROFIT/TAKE_PROFIT_MARKET` orders. * * @return stopPrice */ @@ -383,7 +386,7 @@ public void setStopPrice(@jakarta.annotation.Nullable Double stopPrice) { this.stopPrice = stopPrice; } - public NewOrderRequest closePosition(@jakarta.annotation.Nullable String closePosition) { + public NewOrderRequest closePosition(@jakarta.annotation.Nullable ClosePosition closePosition) { this.closePosition = closePosition; return this; } @@ -394,11 +397,12 @@ public NewOrderRequest closePosition(@jakarta.annotation.Nullable String closePo * @return closePosition */ @jakarta.annotation.Nullable - public String getClosePosition() { + @Valid + public ClosePosition getClosePosition() { return closePosition; } - public void setClosePosition(@jakarta.annotation.Nullable String closePosition) { + public void setClosePosition(@jakarta.annotation.Nullable ClosePosition closePosition) { this.closePosition = closePosition; } @@ -408,7 +412,8 @@ public NewOrderRequest activationPrice(@jakarta.annotation.Nullable Double activ } /** - * Get activationPrice + * Used with `TRAILING_STOP_MARKET` orders, default as the latest price(supporting + * different workingType) * * @return activationPrice */ @@ -428,7 +433,7 @@ public NewOrderRequest callbackRate(@jakarta.annotation.Nullable Double callback } /** - * Get callbackRate + * Used with `TRAILING_STOP_MARKET` orders, min 0.1, max 10 where 1 for 1% * * @return callbackRate */ @@ -462,7 +467,7 @@ public void setWorkingType(@jakarta.annotation.Nullable WorkingType workingType) this.workingType = workingType; } - public NewOrderRequest priceProtect(@jakarta.annotation.Nullable String priceProtect) { + public NewOrderRequest priceProtect(@jakarta.annotation.Nullable PriceProtect priceProtect) { this.priceProtect = priceProtect; return this; } @@ -473,11 +478,12 @@ public NewOrderRequest priceProtect(@jakarta.annotation.Nullable String pricePro * @return priceProtect */ @jakarta.annotation.Nullable - public String getPriceProtect() { + @Valid + public PriceProtect getPriceProtect() { return priceProtect; } - public void setPriceProtect(@jakarta.annotation.Nullable String priceProtect) { + public void setPriceProtect(@jakarta.annotation.Nullable PriceProtect priceProtect) { this.priceProtect = priceProtect; } @@ -551,11 +557,12 @@ public NewOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -675,7 +682,7 @@ public String toUrlQueryString() { String positionSideValueAsString = positionSideValue.toString(); valMap.put("positionSide", positionSideValueAsString); } - Type typeValue = getType(); + OrderType typeValue = getType(); if (typeValue != null) { String typeValueAsString = typeValue.toString(); valMap.put("type", typeValueAsString); @@ -690,7 +697,7 @@ public String toUrlQueryString() { String quantityValueAsString = DecimalFormatter.getFormatter().format(quantityValue); valMap.put("quantity", quantityValueAsString); } - String reduceOnlyValue = getReduceOnly(); + ReduceOnly reduceOnlyValue = getReduceOnly(); if (reduceOnlyValue != null) { String reduceOnlyValueAsString = reduceOnlyValue.toString(); valMap.put("reduceOnly", reduceOnlyValueAsString); @@ -710,7 +717,7 @@ public String toUrlQueryString() { String stopPriceValueAsString = DecimalFormatter.getFormatter().format(stopPriceValue); valMap.put("stopPrice", stopPriceValueAsString); } - String closePositionValue = getClosePosition(); + ClosePosition closePositionValue = getClosePosition(); if (closePositionValue != null) { String closePositionValueAsString = closePositionValue.toString(); valMap.put("closePosition", closePositionValueAsString); @@ -732,7 +739,7 @@ public String toUrlQueryString() { String workingTypeValueAsString = workingTypeValue.toString(); valMap.put("workingType", workingTypeValueAsString); } - String priceProtectValue = getPriceProtect(); + PriceProtect priceProtectValue = getPriceProtect(); if (priceProtectValue != null) { String priceProtectValueAsString = priceProtectValue.toString(); valMap.put("priceProtect", priceProtectValueAsString); @@ -964,18 +971,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti PositionSide.validateJsonElement(jsonObj.get("positionSide")); } // validate the required field `type` - Type.validateJsonElement(jsonObj.get("type")); + OrderType.validateJsonElement(jsonObj.get("type")); // validate the optional field `timeInForce` if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { TimeInForce.validateJsonElement(jsonObj.get("timeInForce")); } - if ((jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) - && !jsonObj.get("reduceOnly").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reduceOnly` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reduceOnly").toString())); + // validate the optional field `reduceOnly` + if (jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) { + ReduceOnly.validateJsonElement(jsonObj.get("reduceOnly")); } if ((jsonObj.get("newClientOrderId") != null && !jsonObj.get("newClientOrderId").isJsonNull()) @@ -986,25 +989,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " JSON string but got `%s`", jsonObj.get("newClientOrderId").toString())); } - if ((jsonObj.get("closePosition") != null && !jsonObj.get("closePosition").isJsonNull()) - && !jsonObj.get("closePosition").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `closePosition` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("closePosition").toString())); + // validate the optional field `closePosition` + if (jsonObj.get("closePosition") != null && !jsonObj.get("closePosition").isJsonNull()) { + ClosePosition.validateJsonElement(jsonObj.get("closePosition")); } // validate the optional field `workingType` if (jsonObj.get("workingType") != null && !jsonObj.get("workingType").isJsonNull()) { WorkingType.validateJsonElement(jsonObj.get("workingType")); } - if ((jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) - && !jsonObj.get("priceProtect").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `priceProtect` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("priceProtect").toString())); + // validate the optional field `priceProtect` + if (jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) { + PriceProtect.validateJsonElement(jsonObj.get("priceProtect")); } // validate the optional field `newOrderRespType` if (jsonObj.get("newOrderRespType") != null diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/NewOrderRespType.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/NewOrderRespType.java index 7326292a2..0caa5631f 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/NewOrderRespType.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/NewOrderRespType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/NewOrderResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/NewOrderResponse.java index d6046ca2d..dd60770ec 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/NewOrderResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/NewOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** NewOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewOrderResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -75,7 +75,7 @@ public NewOrderResponse id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * positionId * * @return id */ @@ -94,7 +94,7 @@ public NewOrderResponse status(@jakarta.annotation.Nullable Long status) { } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -143,7 +143,7 @@ public NewOrderResponse addRateLimitsItem(CancelOrderResponseRateLimitsInner rat } /** - * Get rateLimits + * Rate limit definitions. * * @return rateLimits */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/NewOrderResponseResult.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/NewOrderResponseResult.java index e841806c7..de89aeaa5 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/NewOrderResponseResult.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/NewOrderResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** NewOrderResponseResult */ +/** Indicates that combined is set to true. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewOrderResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -75,12 +75,6 @@ public class NewOrderResponseResult extends BaseDTO { @jakarta.annotation.Nullable private String price; - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE) - @jakarta.annotation.Nullable - private String avgPrice; - public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; @SerializedName(SERIALIZED_NAME_ORIG_QTY) @@ -99,12 +93,6 @@ public class NewOrderResponseResult extends BaseDTO { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_BASE = "cumBase"; - - @SerializedName(SERIALIZED_NAME_CUM_BASE) - @jakarta.annotation.Nullable - private String cumBase; - public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) @@ -179,7 +167,7 @@ public NewOrderResponseResult orderId(@jakarta.annotation.Nullable Long orderId) } /** - * Get orderId + * Sub-order ID * * @return orderId */ @@ -198,7 +186,7 @@ public NewOrderResponseResult symbol(@jakarta.annotation.Nullable String symbol) } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -217,7 +205,7 @@ public NewOrderResponseResult pair(@jakarta.annotation.Nullable String pair) { } /** - * Get pair + * Pair * * @return pair */ @@ -236,7 +224,7 @@ public NewOrderResponseResult status(@jakarta.annotation.Nullable String status) } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -255,7 +243,7 @@ public NewOrderResponseResult clientOrderId(@jakarta.annotation.Nullable String } /** - * Get clientOrderId + * Client order ID. * * @return clientOrderId */ @@ -274,7 +262,7 @@ public NewOrderResponseResult price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Latest token price. * * @return price */ @@ -287,32 +275,13 @@ public void setPrice(@jakarta.annotation.Nullable String price) { this.price = price; } - public NewOrderResponseResult avgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - return this; - } - - /** - * Get avgPrice - * - * @return avgPrice - */ - @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; - } - - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - } - public NewOrderResponseResult origQty(@jakarta.annotation.Nullable String origQty) { this.origQty = origQty; return this; } /** - * Get origQty + * Original order quantity * * @return origQty */ @@ -331,7 +300,7 @@ public NewOrderResponseResult executedQty(@jakarta.annotation.Nullable String ex } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -350,7 +319,7 @@ public NewOrderResponseResult cumQty(@jakarta.annotation.Nullable String cumQty) } /** - * Get cumQty + * Cumulative filled quantity. * * @return cumQty */ @@ -363,32 +332,13 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public NewOrderResponseResult cumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - return this; - } - - /** - * Get cumBase - * - * @return cumBase - */ - @jakarta.annotation.Nullable - public String getCumBase() { - return cumBase; - } - - public void setCumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - } - public NewOrderResponseResult timeInForce(@jakarta.annotation.Nullable String timeInForce) { this.timeInForce = timeInForce; return this; } /** - * Get timeInForce + * Time in force * * @return timeInForce */ @@ -407,7 +357,7 @@ public NewOrderResponseResult type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Order type. * * @return type */ @@ -426,7 +376,7 @@ public NewOrderResponseResult reduceOnly(@jakarta.annotation.Nullable Boolean re } /** - * Get reduceOnly + * Whether the order is reduce-only. * * @return reduceOnly */ @@ -446,7 +396,7 @@ public NewOrderResponseResult closePosition( } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -465,7 +415,7 @@ public NewOrderResponseResult side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Trading side * * @return side */ @@ -484,7 +434,7 @@ public NewOrderResponseResult positionSide(@jakarta.annotation.Nullable String p } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -503,7 +453,7 @@ public NewOrderResponseResult stopPrice(@jakarta.annotation.Nullable String stop } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -522,7 +472,7 @@ public NewOrderResponseResult workingType(@jakarta.annotation.Nullable String wo } /** - * Get workingType + * Stop trigger price type. * * @return workingType */ @@ -541,7 +491,7 @@ public NewOrderResponseResult priceProtect(@jakarta.annotation.Nullable Boolean } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -560,7 +510,7 @@ public NewOrderResponseResult origType(@jakarta.annotation.Nullable String origT } /** - * Get origType + * Original order type. * * @return origType */ @@ -579,7 +529,7 @@ public NewOrderResponseResult updateTime(@jakarta.annotation.Nullable Long updat } /** - * Get updateTime + * update time * * @return updateTime */ @@ -607,11 +557,9 @@ public boolean equals(Object o) { && Objects.equals(this.status, newOrderResponseResult.status) && Objects.equals(this.clientOrderId, newOrderResponseResult.clientOrderId) && Objects.equals(this.price, newOrderResponseResult.price) - && Objects.equals(this.avgPrice, newOrderResponseResult.avgPrice) && Objects.equals(this.origQty, newOrderResponseResult.origQty) && Objects.equals(this.executedQty, newOrderResponseResult.executedQty) && Objects.equals(this.cumQty, newOrderResponseResult.cumQty) - && Objects.equals(this.cumBase, newOrderResponseResult.cumBase) && Objects.equals(this.timeInForce, newOrderResponseResult.timeInForce) && Objects.equals(this.type, newOrderResponseResult.type) && Objects.equals(this.reduceOnly, newOrderResponseResult.reduceOnly) @@ -634,11 +582,9 @@ public int hashCode() { status, clientOrderId, price, - avgPrice, origQty, executedQty, cumQty, - cumBase, timeInForce, type, reduceOnly, @@ -662,11 +608,9 @@ public String toString() { sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumBase: ").append(toIndentedString(cumBase)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); @@ -716,11 +660,6 @@ public String toUrlQueryString() { String priceValueAsString = priceValue.toString(); valMap.put("price", priceValueAsString); } - String avgPriceValue = getAvgPrice(); - if (avgPriceValue != null) { - String avgPriceValueAsString = avgPriceValue.toString(); - valMap.put("avgPrice", avgPriceValueAsString); - } String origQtyValue = getOrigQty(); if (origQtyValue != null) { String origQtyValueAsString = origQtyValue.toString(); @@ -736,11 +675,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = cumQtyValue.toString(); valMap.put("cumQty", cumQtyValueAsString); } - String cumBaseValue = getCumBase(); - if (cumBaseValue != null) { - String cumBaseValueAsString = cumBaseValue.toString(); - valMap.put("cumBase", cumBaseValueAsString); - } String timeInForceValue = getTimeInForce(); if (timeInForceValue != null) { String timeInForceValueAsString = timeInForceValue.toString(); @@ -831,10 +765,6 @@ public Map toMap() { if (priceValue != null) { valMap.put("price", priceValue); } - Object avgPriceValue = getAvgPrice(); - if (avgPriceValue != null) { - valMap.put("avgPrice", avgPriceValue); - } Object origQtyValue = getOrigQty(); if (origQtyValue != null) { valMap.put("origQty", origQtyValue); @@ -847,10 +777,6 @@ public Map toMap() { if (cumQtyValue != null) { valMap.put("cumQty", cumQtyValue); } - Object cumBaseValue = getCumBase(); - if (cumBaseValue != null) { - valMap.put("cumBase", cumBaseValue); - } Object timeInForceValue = getTimeInForce(); if (timeInForceValue != null) { valMap.put("timeInForce", timeInForceValue); @@ -927,11 +853,9 @@ private String toIndentedString(Object o) { openapiFields.add("status"); openapiFields.add("clientOrderId"); openapiFields.add("price"); - openapiFields.add("avgPrice"); openapiFields.add("origQty"); openapiFields.add("executedQty"); openapiFields.add("cumQty"); - openapiFields.add("cumBase"); openapiFields.add("timeInForce"); openapiFields.add("type"); openapiFields.add("reduceOnly"); @@ -1018,14 +942,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("price").toString())); } - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) && !jsonObj.get("origQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1050,14 +966,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumBase") != null && !jsonObj.get("cumBase").isJsonNull()) - && !jsonObj.get("cumBase").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumBase` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("cumBase").toString())); - } if ((jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) && !jsonObj.get("timeInForce").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/OrderType.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/OrderType.java new file mode 100644 index 000000000..8f2f5f9e1 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/OrderType.java @@ -0,0 +1,88 @@ +/* + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** + * **After CM migration, stop-type values (`STOP`, `STOP_MARKET`, + * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`, `TRAILING_STOP_MARKET`) are no + * longer accepted and will return `-4120`. Use the REST `/dapi/v1/algoOrder` + * endpoint instead.** + */ +@JsonAdapter(OrderType.Adapter.class) +public enum OrderType { + LIMIT("LIMIT"), + + MARKET("MARKET"), + + STOP("STOP"), + + STOP_MARKET("STOP_MARKET"), + + TAKE_PROFIT("TAKE_PROFIT"), + + TAKE_PROFIT_MARKET("TAKE_PROFIT_MARKET"), + + TRAILING_STOP_MARKET("TRAILING_STOP_MARKET"); + + private String value; + + OrderType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderType fromValue(String value) { + for (OrderType b : OrderType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderType.fromValue(value); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PositionInformationRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PositionInformationRequest.java index 595a3dd31..146e213b8 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PositionInformationRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PositionInformationRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** PositionInformationRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionInformationRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -128,11 +128,12 @@ public PositionInformationRequest recvWindow(@jakarta.annotation.Nullable Long r } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PositionInformationResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PositionInformationResponse.java index da56e984f..9588f30a2 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PositionInformationResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PositionInformationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** PositionInformationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionInformationResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -75,7 +75,7 @@ public PositionInformationResponse id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * positionId * * @return id */ @@ -94,7 +94,7 @@ public PositionInformationResponse status(@jakarta.annotation.Nullable Long stat } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -124,7 +124,7 @@ public PositionInformationResponse addResultItem( } /** - * Get result + * Indicates that combined is set to true. * * @return result */ @@ -157,7 +157,7 @@ public PositionInformationResponse addRateLimitsItem( } /** - * Get rateLimits + * Rate limit definitions. * * @return rateLimits */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PositionInformationResponseResultInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PositionInformationResponseResultInner.java index 65bfa8831..5297c483a 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PositionInformationResponseResultInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PositionInformationResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** PositionInformationResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionInformationResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -144,7 +144,7 @@ public PositionInformationResponseResultInner symbol( } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -164,7 +164,7 @@ public PositionInformationResponseResultInner positionAmt( } /** - * Get positionAmt + * position amount * * @return positionAmt */ @@ -184,7 +184,7 @@ public PositionInformationResponseResultInner entryPrice( } /** - * Get entryPrice + * Position entry price. * * @return entryPrice */ @@ -204,7 +204,7 @@ public PositionInformationResponseResultInner markPrice( } /** - * Get markPrice + * mark price * * @return markPrice */ @@ -224,7 +224,7 @@ public PositionInformationResponseResultInner unRealizedProfit( } /** - * Get unRealizedProfit + * Unrealized profit. * * @return unRealizedProfit */ @@ -244,7 +244,7 @@ public PositionInformationResponseResultInner liquidationPrice( } /** - * Get liquidationPrice + * Liquidation price. * * @return liquidationPrice */ @@ -264,7 +264,7 @@ public PositionInformationResponseResultInner leverage( } /** - * Get leverage + * Leverage value. * * @return leverage */ @@ -284,7 +284,7 @@ public PositionInformationResponseResultInner maxQty( } /** - * Get maxQty + * maximum quantity of base asset * * @return maxQty */ @@ -304,7 +304,7 @@ public PositionInformationResponseResultInner marginType( } /** - * Get marginType + * Margin type. * * @return marginType */ @@ -324,7 +324,7 @@ public PositionInformationResponseResultInner isolatedMargin( } /** - * Get isolatedMargin + * Isolated margin amount. * * @return isolatedMargin */ @@ -344,7 +344,7 @@ public PositionInformationResponseResultInner isAutoAddMargin( } /** - * Get isAutoAddMargin + * Whether auto-add margin is enabled. * * @return isAutoAddMargin */ @@ -364,7 +364,7 @@ public PositionInformationResponseResultInner positionSide( } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -384,7 +384,7 @@ public PositionInformationResponseResultInner notionalValue( } /** - * Get notionalValue + * Notional value. * * @return notionalValue */ @@ -404,7 +404,7 @@ public PositionInformationResponseResultInner isolatedWallet( } /** - * Get isolatedWallet + * Isolated wallet balance. * * @return isolatedWallet */ @@ -424,7 +424,7 @@ public PositionInformationResponseResultInner updateTime( } /** - * Get updateTime + * update time * * @return updateTime */ @@ -444,7 +444,7 @@ public PositionInformationResponseResultInner breakEvenPrice( } /** - * Get breakEvenPrice + * break-even price * * @return breakEvenPrice */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PositionSide.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PositionSide.java index fd784ee19..07c231c3d 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PositionSide.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PositionSide.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets positionSide */ +/** + * Default `BOTH` for One-way Mode; `LONG` or `SHORT` for Hedge Mode. + * It must be sent in Hedge Mode. + */ @JsonAdapter(PositionSide.Adapter.class) public enum PositionSide { BOTH("BOTH"), diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PriceMatch.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PriceMatch.java index ab4ba404b..ed2d3d046 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PriceMatch.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PriceMatch.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -21,11 +21,12 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets priceMatch */ +/** + * only available for `LIMIT`/`STOP`/`TAKE_PROFIT` order; Can't be + * passed together with `price` + */ @JsonAdapter(PriceMatch.Adapter.class) public enum PriceMatch { - NONE("NONE"), - OPPONENT("OPPONENT"), OPPONENT_5("OPPONENT_5"), diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PriceProtect.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PriceProtect.java new file mode 100644 index 000000000..157233cd3 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/PriceProtect.java @@ -0,0 +1,75 @@ +/* + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** + * Used with `STOP/STOP_MARKET` or `TAKE_PROFIT/TAKE_PROFIT_MARKET` orders.' + */ +@JsonAdapter(PriceProtect.Adapter.class) +public enum PriceProtect { + TRUE("true"), + + FALSE("false"); + + private String value; + + PriceProtect(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PriceProtect fromValue(String value) { + for (PriceProtect b : PriceProtect.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PriceProtect enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PriceProtect read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PriceProtect.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PriceProtect.fromValue(value); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/QueryOrderRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/QueryOrderRequest.java index 7f95e62a3..c745e0e05 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/QueryOrderRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/QueryOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** QueryOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryOrderRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -155,11 +155,12 @@ public QueryOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/QueryOrderResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/QueryOrderResponse.java index ed967f93d..aa014dd05 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/QueryOrderResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/QueryOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** QueryOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryOrderResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -75,7 +75,7 @@ public QueryOrderResponse id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * positionId * * @return id */ @@ -94,7 +94,7 @@ public QueryOrderResponse status(@jakarta.annotation.Nullable Long status) { } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -143,7 +143,7 @@ public QueryOrderResponse addRateLimitsItem(CancelOrderResponseRateLimitsInner r } /** - * Get rateLimits + * Rate limit definitions. * * @return rateLimits */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/QueryOrderResponseResult.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/QueryOrderResponseResult.java index 0bbe25455..1c86e1a0b 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/QueryOrderResponseResult.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/QueryOrderResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** QueryOrderResponseResult */ +/** Indicates that combined is set to true. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryOrderResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -93,6 +93,12 @@ public class QueryOrderResponseResult extends BaseDTO { @jakarta.annotation.Nullable private String executedQty; + public static final String SERIALIZED_NAME_CUM_QTY = "cumQty"; + + @SerializedName(SERIALIZED_NAME_CUM_QTY) + @jakarta.annotation.Nullable + private String cumQty; + public static final String SERIALIZED_NAME_CUM_BASE = "cumBase"; @SerializedName(SERIALIZED_NAME_CUM_BASE) @@ -192,7 +198,7 @@ public QueryOrderResponseResult orderId(@jakarta.annotation.Nullable Long orderI } /** - * Get orderId + * Sub-order ID * * @return orderId */ @@ -211,7 +217,7 @@ public QueryOrderResponseResult symbol(@jakarta.annotation.Nullable String symbo } /** - * Get symbol + * Trading symbol * * @return symbol */ @@ -230,7 +236,7 @@ public QueryOrderResponseResult pair(@jakarta.annotation.Nullable String pair) { } /** - * Get pair + * Pair * * @return pair */ @@ -249,7 +255,7 @@ public QueryOrderResponseResult status(@jakarta.annotation.Nullable String statu } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -269,7 +275,7 @@ public QueryOrderResponseResult clientOrderId( } /** - * Get clientOrderId + * Client order ID. * * @return clientOrderId */ @@ -288,7 +294,7 @@ public QueryOrderResponseResult price(@jakarta.annotation.Nullable String price) } /** - * Get price + * Latest token price. * * @return price */ @@ -307,7 +313,7 @@ public QueryOrderResponseResult avgPrice(@jakarta.annotation.Nullable String avg } /** - * Get avgPrice + * Average execution price * * @return avgPrice */ @@ -326,7 +332,7 @@ public QueryOrderResponseResult origQty(@jakarta.annotation.Nullable String orig } /** - * Get origQty + * Original order quantity * * @return origQty */ @@ -345,7 +351,7 @@ public QueryOrderResponseResult executedQty(@jakarta.annotation.Nullable String } /** - * Get executedQty + * Executed quantity * * @return executedQty */ @@ -358,13 +364,32 @@ public void setExecutedQty(@jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; } + public QueryOrderResponseResult cumQty(@jakarta.annotation.Nullable String cumQty) { + this.cumQty = cumQty; + return this; + } + + /** + * Cumulative filled quantity. + * + * @return cumQty + */ + @jakarta.annotation.Nullable + public String getCumQty() { + return cumQty; + } + + public void setCumQty(@jakarta.annotation.Nullable String cumQty) { + this.cumQty = cumQty; + } + public QueryOrderResponseResult cumBase(@jakarta.annotation.Nullable String cumBase) { this.cumBase = cumBase; return this; } /** - * Get cumBase + * Cumulative base asset amount. * * @return cumBase */ @@ -383,7 +408,7 @@ public QueryOrderResponseResult timeInForce(@jakarta.annotation.Nullable String } /** - * Get timeInForce + * Time in force * * @return timeInForce */ @@ -402,7 +427,7 @@ public QueryOrderResponseResult type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Order type. * * @return type */ @@ -421,7 +446,7 @@ public QueryOrderResponseResult reduceOnly(@jakarta.annotation.Nullable Boolean } /** - * Get reduceOnly + * Whether the order is reduce-only. * * @return reduceOnly */ @@ -441,7 +466,7 @@ public QueryOrderResponseResult closePosition( } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -460,7 +485,7 @@ public QueryOrderResponseResult side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Trading side * * @return side */ @@ -479,7 +504,7 @@ public QueryOrderResponseResult positionSide(@jakarta.annotation.Nullable String } /** - * Get positionSide + * Position side * * @return positionSide */ @@ -498,7 +523,7 @@ public QueryOrderResponseResult stopPrice(@jakarta.annotation.Nullable String st } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -517,7 +542,7 @@ public QueryOrderResponseResult workingType(@jakarta.annotation.Nullable String } /** - * Get workingType + * Stop trigger price type. * * @return workingType */ @@ -537,7 +562,7 @@ public QueryOrderResponseResult priceProtect( } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -556,7 +581,7 @@ public QueryOrderResponseResult origType(@jakarta.annotation.Nullable String ori } /** - * Get origType + * Original order type. * * @return origType */ @@ -576,7 +601,7 @@ public QueryOrderResponseResult selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -596,7 +621,7 @@ public QueryOrderResponseResult time(@jakarta.annotation.Nullable Long time) { } /** - * Get time + * Time * * @return time */ @@ -615,7 +640,7 @@ public QueryOrderResponseResult updateTime(@jakarta.annotation.Nullable Long upd } /** - * Get updateTime + * update time * * @return updateTime */ @@ -634,7 +659,7 @@ public QueryOrderResponseResult priceMatch(@jakarta.annotation.Nullable String p } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -665,6 +690,7 @@ public boolean equals(Object o) { && Objects.equals(this.avgPrice, queryOrderResponseResult.avgPrice) && Objects.equals(this.origQty, queryOrderResponseResult.origQty) && Objects.equals(this.executedQty, queryOrderResponseResult.executedQty) + && Objects.equals(this.cumQty, queryOrderResponseResult.cumQty) && Objects.equals(this.cumBase, queryOrderResponseResult.cumBase) && Objects.equals(this.timeInForce, queryOrderResponseResult.timeInForce) && Objects.equals(this.type, queryOrderResponseResult.type) @@ -696,6 +722,7 @@ public int hashCode() { avgPrice, origQty, executedQty, + cumQty, cumBase, timeInForce, type, @@ -726,6 +753,7 @@ public String toString() { sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); + sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); sb.append(" cumBase: ").append(toIndentedString(cumBase)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); @@ -796,6 +824,11 @@ public String toUrlQueryString() { String executedQtyValueAsString = executedQtyValue.toString(); valMap.put("executedQty", executedQtyValueAsString); } + String cumQtyValue = getCumQty(); + if (cumQtyValue != null) { + String cumQtyValueAsString = cumQtyValue.toString(); + valMap.put("cumQty", cumQtyValueAsString); + } String cumBaseValue = getCumBase(); if (cumBaseValue != null) { String cumBaseValueAsString = cumBaseValue.toString(); @@ -918,6 +951,10 @@ public Map toMap() { if (executedQtyValue != null) { valMap.put("executedQty", executedQtyValue); } + Object cumQtyValue = getCumQty(); + if (cumQtyValue != null) { + valMap.put("cumQty", cumQtyValue); + } Object cumBaseValue = getCumBase(); if (cumBaseValue != null) { valMap.put("cumBase", cumBaseValue); @@ -1013,6 +1050,7 @@ private String toIndentedString(Object o) { openapiFields.add("avgPrice"); openapiFields.add("origQty"); openapiFields.add("executedQty"); + openapiFields.add("cumQty"); openapiFields.add("cumBase"); openapiFields.add("timeInForce"); openapiFields.add("type"); @@ -1127,6 +1165,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("executedQty").toString())); } + if ((jsonObj.get("cumQty") != null && !jsonObj.get("cumQty").isJsonNull()) + && !jsonObj.get("cumQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `cumQty` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("cumQty").toString())); + } if ((jsonObj.get("cumBase") != null && !jsonObj.get("cumBase").isJsonNull()) && !jsonObj.get("cumBase").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ReduceOnly.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ReduceOnly.java new file mode 100644 index 000000000..e43e0dcdf --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/ReduceOnly.java @@ -0,0 +1,76 @@ +/* + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** + * Cannot be sent in Hedge Mode; cannot be sent with `closePosition`=`true` + * (Close-All)\" + */ +@JsonAdapter(ReduceOnly.Adapter.class) +public enum ReduceOnly { + TRUE("true"), + + FALSE("false"); + + private String value; + + ReduceOnly(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ReduceOnly fromValue(String value) { + for (ReduceOnly b : ReduceOnly.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ReduceOnly enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ReduceOnly read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ReduceOnly.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ReduceOnly.fromValue(value); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/SelfTradePreventionMode.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/SelfTradePreventionMode.java index 36b0d8c4f..db23cee19 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/SelfTradePreventionMode.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/SelfTradePreventionMode.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,11 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets selfTradePreventionMode */ +/** + * `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 + */ @JsonAdapter(SelfTradePreventionMode.Adapter.class) public enum SelfTradePreventionMode { NONE("NONE"), diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/Side.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/Side.java index 267d84cf4..46d55ca16 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/Side.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/Side.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/StartUserDataStreamRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/StartUserDataStreamRequest.java index d15b94912..342e99ea1 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/StartUserDataStreamRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/StartUserDataStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** StartUserDataStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class StartUserDataStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/StartUserDataStreamResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/StartUserDataStreamResponse.java index 6763a7d3e..1237e54b7 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/StartUserDataStreamResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/StartUserDataStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** StartUserDataStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class StartUserDataStreamResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class StartUserDataStreamResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid StartUserDataStreamResponseRateLimitsInner> rateLimits; + private List<@Valid CloseUserDataStreamResponseRateLimitsInner> rateLimits; public StartUserDataStreamResponse() {} @@ -75,7 +75,7 @@ public StartUserDataStreamResponse id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * positionId * * @return id */ @@ -94,7 +94,7 @@ public StartUserDataStreamResponse status(@jakarta.annotation.Nullable Long stat } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -130,13 +130,13 @@ public void setResult(@jakarta.annotation.Nullable StartUserDataStreamResponseRe public StartUserDataStreamResponse rateLimits( @jakarta.annotation.Nullable - List<@Valid StartUserDataStreamResponseRateLimitsInner> rateLimits) { + List<@Valid CloseUserDataStreamResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public StartUserDataStreamResponse addRateLimitsItem( - StartUserDataStreamResponseRateLimitsInner rateLimitsItem) { + CloseUserDataStreamResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -145,19 +145,19 @@ public StartUserDataStreamResponse addRateLimitsItem( } /** - * Get rateLimits + * Rate limit definitions. * * @return rateLimits */ @jakarta.annotation.Nullable @Valid - public List<@Valid StartUserDataStreamResponseRateLimitsInner> getRateLimits() { + public List<@Valid CloseUserDataStreamResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid StartUserDataStreamResponseRateLimitsInner> rateLimits) { + List<@Valid CloseUserDataStreamResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -212,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid StartUserDataStreamResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid CloseUserDataStreamResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -336,7 +336,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - StartUserDataStreamResponseRateLimitsInner.validateJsonElement( + CloseUserDataStreamResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/StartUserDataStreamResponseRateLimitsInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/StartUserDataStreamResponseRateLimitsInner.java deleted file mode 100644 index 0f3a035af..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/StartUserDataStreamResponseRateLimitsInner.java +++ /dev/null @@ -1,419 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** StartUserDataStreamResponseRateLimitsInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class StartUserDataStreamResponseRateLimitsInner extends BaseDTO { - public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; - - @SerializedName(SERIALIZED_NAME_RATE_LIMIT_TYPE) - @jakarta.annotation.Nullable - private String rateLimitType; - - public static final String SERIALIZED_NAME_INTERVAL = "interval"; - - @SerializedName(SERIALIZED_NAME_INTERVAL) - @jakarta.annotation.Nullable - private String interval; - - public static final String SERIALIZED_NAME_INTERVAL_NUM = "intervalNum"; - - @SerializedName(SERIALIZED_NAME_INTERVAL_NUM) - @jakarta.annotation.Nullable - private Long intervalNum; - - public static final String SERIALIZED_NAME_LIMIT = "limit"; - - @SerializedName(SERIALIZED_NAME_LIMIT) - @jakarta.annotation.Nullable - private Long limit; - - public static final String SERIALIZED_NAME_COUNT = "count"; - - @SerializedName(SERIALIZED_NAME_COUNT) - @jakarta.annotation.Nullable - private Long count; - - public StartUserDataStreamResponseRateLimitsInner() {} - - public StartUserDataStreamResponseRateLimitsInner rateLimitType( - @jakarta.annotation.Nullable String rateLimitType) { - this.rateLimitType = rateLimitType; - return this; - } - - /** - * Get rateLimitType - * - * @return rateLimitType - */ - @jakarta.annotation.Nullable - public String getRateLimitType() { - return rateLimitType; - } - - public void setRateLimitType(@jakarta.annotation.Nullable String rateLimitType) { - this.rateLimitType = rateLimitType; - } - - public StartUserDataStreamResponseRateLimitsInner interval( - @jakarta.annotation.Nullable String interval) { - this.interval = interval; - return this; - } - - /** - * Get interval - * - * @return interval - */ - @jakarta.annotation.Nullable - public String getInterval() { - return interval; - } - - public void setInterval(@jakarta.annotation.Nullable String interval) { - this.interval = interval; - } - - public StartUserDataStreamResponseRateLimitsInner intervalNum( - @jakarta.annotation.Nullable Long intervalNum) { - this.intervalNum = intervalNum; - return this; - } - - /** - * Get intervalNum - * - * @return intervalNum - */ - @jakarta.annotation.Nullable - public Long getIntervalNum() { - return intervalNum; - } - - public void setIntervalNum(@jakarta.annotation.Nullable Long intervalNum) { - this.intervalNum = intervalNum; - } - - public StartUserDataStreamResponseRateLimitsInner limit( - @jakarta.annotation.Nullable Long limit) { - this.limit = limit; - return this; - } - - /** - * Get limit - * - * @return limit - */ - @jakarta.annotation.Nullable - public Long getLimit() { - return limit; - } - - public void setLimit(@jakarta.annotation.Nullable Long limit) { - this.limit = limit; - } - - public StartUserDataStreamResponseRateLimitsInner count( - @jakarta.annotation.Nullable Long count) { - this.count = count; - return this; - } - - /** - * Get count - * - * @return count - */ - @jakarta.annotation.Nullable - public Long getCount() { - return count; - } - - public void setCount(@jakarta.annotation.Nullable Long count) { - this.count = count; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartUserDataStreamResponseRateLimitsInner startUserDataStreamResponseRateLimitsInner = - (StartUserDataStreamResponseRateLimitsInner) o; - return Objects.equals( - this.rateLimitType, - startUserDataStreamResponseRateLimitsInner.rateLimitType) - && Objects.equals( - this.interval, startUserDataStreamResponseRateLimitsInner.interval) - && Objects.equals( - this.intervalNum, startUserDataStreamResponseRateLimitsInner.intervalNum) - && Objects.equals(this.limit, startUserDataStreamResponseRateLimitsInner.limit) - && Objects.equals(this.count, startUserDataStreamResponseRateLimitsInner.count); - } - - @Override - public int hashCode() { - return Objects.hash(rateLimitType, interval, intervalNum, limit, count); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StartUserDataStreamResponseRateLimitsInner {\n"); - sb.append(" rateLimitType: ").append(toIndentedString(rateLimitType)).append("\n"); - sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); - sb.append(" intervalNum: ").append(toIndentedString(intervalNum)).append("\n"); - sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String rateLimitTypeValue = getRateLimitType(); - if (rateLimitTypeValue != null) { - String rateLimitTypeValueAsString = rateLimitTypeValue.toString(); - valMap.put("rateLimitType", rateLimitTypeValueAsString); - } - String intervalValue = getInterval(); - if (intervalValue != null) { - String intervalValueAsString = intervalValue.toString(); - valMap.put("interval", intervalValueAsString); - } - Long intervalNumValue = getIntervalNum(); - if (intervalNumValue != null) { - String intervalNumValueAsString = intervalNumValue.toString(); - valMap.put("intervalNum", intervalNumValueAsString); - } - Long limitValue = getLimit(); - if (limitValue != null) { - String limitValueAsString = limitValue.toString(); - valMap.put("limit", limitValueAsString); - } - Long countValue = getCount(); - if (countValue != null) { - String countValueAsString = countValue.toString(); - valMap.put("count", countValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object rateLimitTypeValue = getRateLimitType(); - if (rateLimitTypeValue != null) { - valMap.put("rateLimitType", rateLimitTypeValue); - } - Object intervalValue = getInterval(); - if (intervalValue != null) { - valMap.put("interval", intervalValue); - } - Object intervalNumValue = getIntervalNum(); - if (intervalNumValue != null) { - valMap.put("intervalNum", intervalNumValue); - } - Object limitValue = getLimit(); - if (limitValue != null) { - valMap.put("limit", limitValue); - } - Object countValue = getCount(); - if (countValue != null) { - valMap.put("count", countValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("rateLimitType"); - openapiFields.add("interval"); - openapiFields.add("intervalNum"); - openapiFields.add("limit"); - openapiFields.add("count"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * StartUserDataStreamResponseRateLimitsInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StartUserDataStreamResponseRateLimitsInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " StartUserDataStreamResponseRateLimitsInner is not found in" - + " the empty JSON string", - StartUserDataStreamResponseRateLimitsInner.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!StartUserDataStreamResponseRateLimitsInner.openapiFields.contains( - entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `StartUserDataStreamResponseRateLimitsInner` properties." - + " JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("rateLimitType") != null && !jsonObj.get("rateLimitType").isJsonNull()) - && !jsonObj.get("rateLimitType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `rateLimitType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("rateLimitType").toString())); - } - if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) - && !jsonObj.get("interval").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `interval` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("interval").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StartUserDataStreamResponseRateLimitsInner.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'StartUserDataStreamResponseRateLimitsInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(StartUserDataStreamResponseRateLimitsInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, StartUserDataStreamResponseRateLimitsInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StartUserDataStreamResponseRateLimitsInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of StartUserDataStreamResponseRateLimitsInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of StartUserDataStreamResponseRateLimitsInner - * @throws IOException if the JSON string is invalid with respect to - * StartUserDataStreamResponseRateLimitsInner - */ - public static StartUserDataStreamResponseRateLimitsInner fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, StartUserDataStreamResponseRateLimitsInner.class); - } - - /** - * Convert an instance of StartUserDataStreamResponseRateLimitsInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/StartUserDataStreamResponseResult.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/StartUserDataStreamResponseResult.java index fe220ee6a..7d1883201 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/StartUserDataStreamResponseResult.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/StartUserDataStreamResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** StartUserDataStreamResponseResult */ +/** Indicates that combined is set to true. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class StartUserDataStreamResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; @@ -54,7 +54,7 @@ public StartUserDataStreamResponseResult listenKey( } /** - * Get listenKey + * Listen key. * * @return listenKey */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/TimeInForce.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/TimeInForce.java index 8442f33bb..af220b6a4 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/TimeInForce.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/TimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/Type.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/Type.java deleted file mode 100644 index 95157b7c7..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/Type.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model; - -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import org.hibernate.validator.constraints.*; - -/** Gets or Sets type */ -@JsonAdapter(Type.Adapter.class) -public enum Type { - LIMIT("LIMIT"), - - MARKET("MARKET"), - - STOP("STOP"), - - STOP_MARKET("STOP_MARKET"), - - TAKE_PROFIT("TAKE_PROFIT"), - - TAKE_PROFIT_MARKET("TAKE_PROFIT_MARKET"), - - TRAILING_STOP_MARKET("TRAILING_STOP_MARKET"); - - private String value; - - Type(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static Type fromValue(String value) { - for (Type b : Type.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final Type enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public Type read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return Type.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - Type.fromValue(value); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/WorkingType.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/WorkingType.java index 5829f90c0..b11a2dbe2 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/WorkingType.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/WorkingType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API + * Futures (COIN-M) WebSocket API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets workingType */ +/** + * stopPrice triggered by: \"MARK_PRICE\", \"CONTRACT_PRICE\". Default + * \"CONTRACT_PRICE\" + */ @JsonAdapter(WorkingType.Adapter.class) public enum WorkingType { MARK_PRICE("MARK_PRICE"), diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/JSON.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/JSON.java index eb8444331..414cedbbd 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/JSON.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -113,42 +113,7 @@ public static GsonBuilder createGson() { "listenKeyExpired", com.binance.connector.client .derivatives_trading_coin_futures.websocket - .stream.model.Listenkeyexpired.class); - classByDiscriminatorValue.put( - "accountConfigUpdate", - com.binance.connector.client - .derivatives_trading_coin_futures.websocket - .stream.model.AccountConfigUpdate.class); - classByDiscriminatorValue.put( - "accountUpdate", - com.binance.connector.client - .derivatives_trading_coin_futures.websocket - .stream.model.AccountUpdate.class); - classByDiscriminatorValue.put( - "gridUpdate", - com.binance.connector.client - .derivatives_trading_coin_futures.websocket - .stream.model.GridUpdate.class); - classByDiscriminatorValue.put( - "listenkeyexpired", - com.binance.connector.client - .derivatives_trading_coin_futures.websocket - .stream.model.Listenkeyexpired.class); - classByDiscriminatorValue.put( - "marginCall", - com.binance.connector.client - .derivatives_trading_coin_futures.websocket - .stream.model.MarginCall.class); - classByDiscriminatorValue.put( - "orderTradeUpdate", - com.binance.connector.client - .derivatives_trading_coin_futures.websocket - .stream.model.OrderTradeUpdate.class); - classByDiscriminatorValue.put( - "strategyUpdate", - com.binance.connector.client - .derivatives_trading_coin_futures.websocket - .stream.model.StrategyUpdate.class); + .stream.model.ListenKeyExpired.class); classByDiscriminatorValue.put( "UserDataStreamEventsResponse", com.binance.connector.client @@ -294,12 +259,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream .model.DiffBookDepthStreamsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream - .model.DiffBookDepthStreamsResponseAItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream - .model.DiffBookDepthStreamsResponseBItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream .model.GridUpdate.CustomTypeAdapterFactory()); @@ -351,13 +310,7 @@ private static Class getClassByDiscriminator( .model.KlineCandlestickStreamsResponseK.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream - .model.LiquidationOrderStreamsRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream - .model.LiquidationOrderStreamsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream - .model.Listenkeyexpired.CustomTypeAdapterFactory()); + .model.ListenKeyExpired.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream .model.MarginCall.CustomTypeAdapterFactory()); @@ -392,22 +345,22 @@ private static Class getClassByDiscriminator( .model.MarkPriceStreamResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream - .model.OrderTradeUpdate.CustomTypeAdapterFactory()); + .model.MarketLiquidationOrderStreamsRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream - .model.OrderTradeUpdateO.CustomTypeAdapterFactory()); + .model.MarketLiquidationOrderStreamsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream - .model.PartialBookDepthStreamsRequest.CustomTypeAdapterFactory()); + .model.OrderTradeUpdate.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream - .model.PartialBookDepthStreamsResponse.CustomTypeAdapterFactory()); + .model.OrderTradeUpdateO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream - .model.PartialBookDepthStreamsResponseAItem.CustomTypeAdapterFactory()); + .model.PartialBookDepthStreamsRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream - .model.PartialBookDepthStreamsResponseBItem.CustomTypeAdapterFactory()); + .model.PartialBookDepthStreamsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream .model.StrategyUpdate.CustomTypeAdapterFactory()); diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DefaultApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DefaultApi.java new file mode 100644 index 000000000..c567cc234 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DefaultApi.java @@ -0,0 +1,1861 @@ +/* + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.SystemUtil; +import com.binance.connector.client.common.exception.ConstraintViolationException; +import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionInterface; +import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionPoolWrapper; +import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionWrapper; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.dtos.RequestWrapperDTO; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueue; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AggregateTradeStreamsRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AggregateTradeStreamsResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllBookTickersStreamRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllBookTickersStreamResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketLiquidationOrderStreamsRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketLiquidationOrderStreamsResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketMiniTickersStreamRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketMiniTickersStreamResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketTickersStreamsRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketTickersStreamsResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.ContinuousContractKlineCandlestickStreamsRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.ContinuousContractKlineCandlestickStreamsResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.ContractInfoStreamRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.ContractInfoStreamResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.DiffBookDepthStreamsRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.DiffBookDepthStreamsResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndexKlineCandlestickStreamsRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndexKlineCandlestickStreamsResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndexPriceStreamRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndexPriceStreamResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolBookTickerStreamsRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolBookTickerStreamsResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolMiniTickerStreamRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolMiniTickerStreamResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolTickerStreamsRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolTickerStreamsResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.KlineCandlestickStreamsRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.KlineCandlestickStreamsResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceKlineCandlestickStreamsRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceKlineCandlestickStreamsResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceOfAllSymbolsOfAPairRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceOfAllSymbolsOfAPairResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceStreamRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceStreamResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarketLiquidationOrderStreamsRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarketLiquidationOrderStreamsResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.PartialBookDepthStreamsRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.PartialBookDepthStreamsResponse; +import com.google.gson.reflect.TypeToken; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Validation; +import jakarta.validation.Validator; +import jakarta.validation.constraints.*; +import java.util.Collections; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; + +public class DefaultApi { + private static final String USER_AGENT = + String.format( + "binance-derivatives-trading-coin-futures/8.0.0 (Java/%s; %s; %s)", + SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); + + private StreamConnectionInterface connection; + + public DefaultApi() {} + + public DefaultApi(WebSocketClientConfiguration configuration) { + this( + configuration.getUsePool() + ? new StreamConnectionPoolWrapper(configuration, JSON.getGson()) + : new StreamConnectionWrapper(configuration, JSON.getGson())); + } + + public DefaultApi(StreamConnectionInterface connection) { + connection.setUserAgent(USER_AGENT); + if (!connection.isConnected()) { + connection.connect(); + } + this.connection = connection; + } + + public StreamConnectionInterface getConnection() { + return connection; + } + + /** + * Aggregate Trade Streams The Aggregate Trade Streams push market trade information that is + * aggregated for fills with same price and taking side every 100 milliseconds. > **After CM + * migration**, the payload is appended with a new `st` field (`1` = + * UM, `2` = CM). Update Speed: 100ms + * + * @param aggregateTradeStreamsRequest (required) + * @return AggregateTradeStreamsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Aggregate Trade Streams -
+ * + * @see Aggregate + * Trade Streams Documentation + */ + public StreamBlockingQueueWrapper aggregateTradeStreams( + AggregateTradeStreamsRequest aggregateTradeStreamsRequest) throws ApiException { + StreamBlockingQueue queue = aggregateTradeStreamsRaw(aggregateTradeStreamsRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue aggregateTradeStreamsRaw( + AggregateTradeStreamsRequest aggregateTradeStreamsRequest) throws ApiException { + aggregateTradeStreamsValidateBeforeCall(aggregateTradeStreamsRequest); + + String methodName = + "/@aggTrade" + .substring(1) + .replace( + "", + aggregateTradeStreamsRequest.getId() != null + ? aggregateTradeStreamsRequest.getId().toString() + : "") + .replace( + "", + aggregateTradeStreamsRequest.getSymbol() != null + ? aggregateTradeStreamsRequest.getSymbol().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void aggregateTradeStreamsValidateBeforeCall( + AggregateTradeStreamsRequest aggregateTradeStreamsRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(aggregateTradeStreamsRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * All Book Tickers Stream Pushes any update to the best bid or ask's price or quantity in + * real-time for all symbols. > **After CM migration**, this stream pushes the merged UM + CM + * universe (subscribable on both `fstream` and `dstream`); each payload is + * appended with a new `st` field (`1` = UM, `2` = CM). + * Update Speed: Real-time + * + * @param allBookTickersStreamRequest (required) + * @return AllBookTickersStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 All Book Tickers Stream -
+ * + * @see All + * Book Tickers Stream Documentation + */ + public StreamBlockingQueueWrapper allBookTickersStream( + AllBookTickersStreamRequest allBookTickersStreamRequest) throws ApiException { + StreamBlockingQueue queue = allBookTickersStreamRaw(allBookTickersStreamRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue allBookTickersStreamRaw( + AllBookTickersStreamRequest allBookTickersStreamRequest) throws ApiException { + allBookTickersStreamValidateBeforeCall(allBookTickersStreamRequest); + + String methodName = + "/!bookTicker" + .substring(1) + .replace( + "", + allBookTickersStreamRequest.getId() != null + ? allBookTickersStreamRequest.getId().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void allBookTickersStreamValidateBeforeCall( + AllBookTickersStreamRequest allBookTickersStreamRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(allBookTickersStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * All Market Liquidation Order Streams The All Liquidation Order Snapshot Streams push force + * liquidation order information for all symbols in the market. For each symbol,only the latest + * one liquidation order within 1000ms will be pushed as the snapshot. If no liquidation happens + * in the interval of 1000ms, no stream will be pushed. > **After CM migration**, this stream + * pushes the merged UM + CM universe (subscribable on both `fstream` and + * `dstream`); each payload is appended with a new `st` field (`1` + * = UM, `2` = CM). Update Speed: 1000ms + * + * @param allMarketLiquidationOrderStreamsRequest (required) + * @return AllMarketLiquidationOrderStreamsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 All Market Liquidation Order Streams -
+ * + * @see All + * Market Liquidation Order Streams Documentation + */ + public StreamBlockingQueueWrapper + allMarketLiquidationOrderStreams( + AllMarketLiquidationOrderStreamsRequest allMarketLiquidationOrderStreamsRequest) + throws ApiException { + StreamBlockingQueue queue = + allMarketLiquidationOrderStreamsRaw(allMarketLiquidationOrderStreamsRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue allMarketLiquidationOrderStreamsRaw( + AllMarketLiquidationOrderStreamsRequest allMarketLiquidationOrderStreamsRequest) + throws ApiException { + allMarketLiquidationOrderStreamsValidateBeforeCall(allMarketLiquidationOrderStreamsRequest); + + String methodName = + "/!forceOrder@arr" + .substring(1) + .replace( + "", + allMarketLiquidationOrderStreamsRequest.getId() != null + ? allMarketLiquidationOrderStreamsRequest.getId().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void allMarketLiquidationOrderStreamsValidateBeforeCall( + AllMarketLiquidationOrderStreamsRequest allMarketLiquidationOrderStreamsRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(allMarketLiquidationOrderStreamsRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * All Market Mini Tickers Stream 24hr rolling window mini-ticker statistics for all symbols. + * These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to + * 24hrs before. Note that only tickers that have changed will be present in the array. > + * **After CM migration**, this stream pushes the merged UM + CM universe (subscribable on both + * `fstream` and `dstream`); each payload is appended with a new + * `st` field (`1` = UM, `2` = CM). Update Speed: 1000ms + * + * @param allMarketMiniTickersStreamRequest (required) + * @return AllMarketMiniTickersStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 All Market Mini Tickers Stream -
+ * + * @see All + * Market Mini Tickers Stream Documentation + */ + public StreamBlockingQueueWrapper + allMarketMiniTickersStream( + AllMarketMiniTickersStreamRequest allMarketMiniTickersStreamRequest) + throws ApiException { + StreamBlockingQueue queue = + allMarketMiniTickersStreamRaw(allMarketMiniTickersStreamRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue allMarketMiniTickersStreamRaw( + AllMarketMiniTickersStreamRequest allMarketMiniTickersStreamRequest) + throws ApiException { + allMarketMiniTickersStreamValidateBeforeCall(allMarketMiniTickersStreamRequest); + + String methodName = + "/!miniTicker@arr" + .substring(1) + .replace( + "", + allMarketMiniTickersStreamRequest.getId() != null + ? allMarketMiniTickersStreamRequest.getId().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void allMarketMiniTickersStreamValidateBeforeCall( + AllMarketMiniTickersStreamRequest allMarketMiniTickersStreamRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(allMarketMiniTickersStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * All Market Tickers Streams 24hr rolling window ticker statistics for all symbols. These are + * NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs + * before. Note that only tickers that have changed will be present in the array. > **After + * CM migration**, this stream pushes the merged UM + CM universe (subscribable on both + * `fstream` and `dstream`); each payload is appended with a new + * `st` field (`1` = UM, `2` = CM). Update Speed: 1000ms + * + * @param allMarketTickersStreamsRequest (required) + * @return AllMarketTickersStreamsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 All Market Tickers Streams -
+ * + * @see All + * Market Tickers Streams Documentation + */ + public StreamBlockingQueueWrapper allMarketTickersStreams( + AllMarketTickersStreamsRequest allMarketTickersStreamsRequest) throws ApiException { + StreamBlockingQueue queue = + allMarketTickersStreamsRaw(allMarketTickersStreamsRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue allMarketTickersStreamsRaw( + AllMarketTickersStreamsRequest allMarketTickersStreamsRequest) throws ApiException { + allMarketTickersStreamsValidateBeforeCall(allMarketTickersStreamsRequest); + + String methodName = + "/!ticker@arr" + .substring(1) + .replace( + "", + allMarketTickersStreamsRequest.getId() != null + ? allMarketTickersStreamsRequest.getId().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void allMarketTickersStreamsValidateBeforeCall( + AllMarketTickersStreamsRequest allMarketTickersStreamsRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(allMarketTickersStreamsRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Continuous Contract Kline/Candlestick Streams Kline update every second > **After CM + * migration**, both `fstream` and `dstream` may subscribe to either UM or + * CM symbols on this stream. Update Speed: 250ms + * + * @param continuousContractKlineCandlestickStreamsRequest (required) + * @return ContinuousContractKlineCandlestickStreamsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Continuous Contract Kline/Candlestick Streams -
+ * + * @see Continuous + * Contract Kline/Candlestick Streams Documentation + */ + public StreamBlockingQueueWrapper + continuousContractKlineCandlestickStreams( + ContinuousContractKlineCandlestickStreamsRequest + continuousContractKlineCandlestickStreamsRequest) + throws ApiException { + StreamBlockingQueue queue = + continuousContractKlineCandlestickStreamsRaw( + continuousContractKlineCandlestickStreamsRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue continuousContractKlineCandlestickStreamsRaw( + ContinuousContractKlineCandlestickStreamsRequest + continuousContractKlineCandlestickStreamsRequest) + throws ApiException { + continuousContractKlineCandlestickStreamsValidateBeforeCall( + continuousContractKlineCandlestickStreamsRequest); + + String methodName = + "/_@continuousKline_" + .substring(1) + .replace( + "", + continuousContractKlineCandlestickStreamsRequest.getId() != null + ? continuousContractKlineCandlestickStreamsRequest + .getId() + .toString() + : "") + .replace( + "", + continuousContractKlineCandlestickStreamsRequest.getPair() != null + ? continuousContractKlineCandlestickStreamsRequest + .getPair() + .toString() + : "") + .replace( + "", + continuousContractKlineCandlestickStreamsRequest.getContractType() + != null + ? continuousContractKlineCandlestickStreamsRequest + .getContractType() + .toString() + : "") + .replace( + "", + continuousContractKlineCandlestickStreamsRequest.getInterval() + != null + ? continuousContractKlineCandlestickStreamsRequest + .getInterval() + .toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void continuousContractKlineCandlestickStreamsValidateBeforeCall( + ContinuousContractKlineCandlestickStreamsRequest + continuousContractKlineCandlestickStreamsRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(continuousContractKlineCandlestickStreamsRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Contract Info Stream ContractInfo stream pushes when contract info + * updates(listing/settlement/contract bracket update). bks field only shows up when bracket + * gets updated. > **After CM migration**, this stream pushes the merged UM + CM universe + * (subscribable on both `fstream` and `dstream`); each payload is appended + * with a new `st` field (`1` = UM, `2` = CM). Update + * Speed: Real-time + * + * @param contractInfoStreamRequest (required) + * @return ContractInfoStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Contract Info Stream -
+ * + * @see Contract + * Info Stream Documentation + */ + public StreamBlockingQueueWrapper contractInfoStream( + ContractInfoStreamRequest contractInfoStreamRequest) throws ApiException { + StreamBlockingQueue queue = contractInfoStreamRaw(contractInfoStreamRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue contractInfoStreamRaw( + ContractInfoStreamRequest contractInfoStreamRequest) throws ApiException { + contractInfoStreamValidateBeforeCall(contractInfoStreamRequest); + + String methodName = + "/!contractInfo" + .substring(1) + .replace( + "", + contractInfoStreamRequest.getId() != null + ? contractInfoStreamRequest.getId().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void contractInfoStreamValidateBeforeCall( + ContractInfoStreamRequest contractInfoStreamRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(contractInfoStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Diff. Book Depth Streams Bids and asks, pushed every 250 milliseconds, 500 milliseconds, or + * 100 milliseconds > **After CM migration**, the payload is appended with a new + * `st` field (`1` = UM, `2` = CM). Update Speed: 250ms + * or 500ms or 100ms + * + * @param diffBookDepthStreamsRequest (required) + * @return DiffBookDepthStreamsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Diff. Book Depth Streams -
+ * + * @see Diff. + * Book Depth Streams Documentation + */ + public StreamBlockingQueueWrapper diffBookDepthStreams( + DiffBookDepthStreamsRequest diffBookDepthStreamsRequest) throws ApiException { + StreamBlockingQueue queue = diffBookDepthStreamsRaw(diffBookDepthStreamsRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue diffBookDepthStreamsRaw( + DiffBookDepthStreamsRequest diffBookDepthStreamsRequest) throws ApiException { + diffBookDepthStreamsValidateBeforeCall(diffBookDepthStreamsRequest); + + String methodName = + "/@depth@" + .substring(1) + .replace( + "", + diffBookDepthStreamsRequest.getId() != null + ? diffBookDepthStreamsRequest.getId().toString() + : "") + .replace( + "", + diffBookDepthStreamsRequest.getSymbol() != null + ? diffBookDepthStreamsRequest.getSymbol().toString() + : "") + .replace( + "", + diffBookDepthStreamsRequest.getUpdateSpeed() != null + ? diffBookDepthStreamsRequest.getUpdateSpeed().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void diffBookDepthStreamsValidateBeforeCall( + DiffBookDepthStreamsRequest diffBookDepthStreamsRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(diffBookDepthStreamsRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Index Kline/Candlestick Streams Index Kline/Candlestick Streams > **After CM migration**, + * both `fstream` and `dstream` may subscribe to CM symbols on this stream. + * Update Speed: 250ms + * + * @param indexKlineCandlestickStreamsRequest (required) + * @return IndexKlineCandlestickStreamsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Index Kline/Candlestick Streams -
+ * + * @see Index + * Kline/Candlestick Streams Documentation + */ + public StreamBlockingQueueWrapper + indexKlineCandlestickStreams( + IndexKlineCandlestickStreamsRequest indexKlineCandlestickStreamsRequest) + throws ApiException { + StreamBlockingQueue queue = + indexKlineCandlestickStreamsRaw(indexKlineCandlestickStreamsRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue indexKlineCandlestickStreamsRaw( + IndexKlineCandlestickStreamsRequest indexKlineCandlestickStreamsRequest) + throws ApiException { + indexKlineCandlestickStreamsValidateBeforeCall(indexKlineCandlestickStreamsRequest); + + String methodName = + "/@indexPriceKline_" + .substring(1) + .replace( + "", + indexKlineCandlestickStreamsRequest.getId() != null + ? indexKlineCandlestickStreamsRequest.getId().toString() + : "") + .replace( + "", + indexKlineCandlestickStreamsRequest.getPair() != null + ? indexKlineCandlestickStreamsRequest.getPair().toString() + : "") + .replace( + "", + indexKlineCandlestickStreamsRequest.getInterval() != null + ? indexKlineCandlestickStreamsRequest + .getInterval() + .toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void indexKlineCandlestickStreamsValidateBeforeCall( + IndexKlineCandlestickStreamsRequest indexKlineCandlestickStreamsRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(indexKlineCandlestickStreamsRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Index Price Stream Index Price Stream Update Speed: 3000ms OR 1000ms + * + * @param indexPriceStreamRequest (required) + * @return IndexPriceStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Index Price Stream -
+ * + * @see Index + * Price Stream Documentation + */ + public StreamBlockingQueueWrapper indexPriceStream( + IndexPriceStreamRequest indexPriceStreamRequest) throws ApiException { + StreamBlockingQueue queue = indexPriceStreamRaw(indexPriceStreamRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue indexPriceStreamRaw( + IndexPriceStreamRequest indexPriceStreamRequest) throws ApiException { + indexPriceStreamValidateBeforeCall(indexPriceStreamRequest); + + String methodName = + "/@indexPrice@" + .substring(1) + .replace( + "", + indexPriceStreamRequest.getId() != null + ? indexPriceStreamRequest.getId().toString() + : "") + .replace( + "", + indexPriceStreamRequest.getPair() != null + ? indexPriceStreamRequest.getPair().toString() + : "") + .replace( + "", + indexPriceStreamRequest.getUpdateSpeed() != null + ? indexPriceStreamRequest.getUpdateSpeed().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void indexPriceStreamValidateBeforeCall(IndexPriceStreamRequest indexPriceStreamRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(indexPriceStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Individual Symbol Book Ticker Streams Pushes any update to the best bid or ask's price or + * quantity in real-time for a specified symbol. > **After CM migration**, the payload is + * appended with a new `st` field (`1` = UM, `2` = CM). + * Update Speed: Real-time + * + * @param individualSymbolBookTickerStreamsRequest (required) + * @return IndividualSymbolBookTickerStreamsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Individual Symbol Book Ticker Streams -
+ * + * @see Individual + * Symbol Book Ticker Streams Documentation + */ + public StreamBlockingQueueWrapper + individualSymbolBookTickerStreams( + IndividualSymbolBookTickerStreamsRequest + individualSymbolBookTickerStreamsRequest) + throws ApiException { + StreamBlockingQueue queue = + individualSymbolBookTickerStreamsRaw(individualSymbolBookTickerStreamsRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue individualSymbolBookTickerStreamsRaw( + IndividualSymbolBookTickerStreamsRequest individualSymbolBookTickerStreamsRequest) + throws ApiException { + individualSymbolBookTickerStreamsValidateBeforeCall( + individualSymbolBookTickerStreamsRequest); + + String methodName = + "/@bookTicker" + .substring(1) + .replace( + "", + individualSymbolBookTickerStreamsRequest.getId() != null + ? individualSymbolBookTickerStreamsRequest + .getId() + .toString() + : "") + .replace( + "", + individualSymbolBookTickerStreamsRequest.getSymbol() != null + ? individualSymbolBookTickerStreamsRequest + .getSymbol() + .toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void individualSymbolBookTickerStreamsValidateBeforeCall( + IndividualSymbolBookTickerStreamsRequest individualSymbolBookTickerStreamsRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(individualSymbolBookTickerStreamsRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Individual Symbol Mini Ticker Stream 24hr rolling window mini-ticker statistics for a single + * symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window from + * requestTime to 24hrs before. > **After CM migration**, the payload is appended with a new + * `st` field (`1` = UM, `2` = CM). Update Speed: 500ms + * + * @param individualSymbolMiniTickerStreamRequest (required) + * @return IndividualSymbolMiniTickerStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Individual Symbol Mini Ticker Stream -
+ * + * @see Individual + * Symbol Mini Ticker Stream Documentation + */ + public StreamBlockingQueueWrapper + individualSymbolMiniTickerStream( + IndividualSymbolMiniTickerStreamRequest individualSymbolMiniTickerStreamRequest) + throws ApiException { + StreamBlockingQueue queue = + individualSymbolMiniTickerStreamRaw(individualSymbolMiniTickerStreamRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue individualSymbolMiniTickerStreamRaw( + IndividualSymbolMiniTickerStreamRequest individualSymbolMiniTickerStreamRequest) + throws ApiException { + individualSymbolMiniTickerStreamValidateBeforeCall(individualSymbolMiniTickerStreamRequest); + + String methodName = + "/@miniTicker" + .substring(1) + .replace( + "", + individualSymbolMiniTickerStreamRequest.getId() != null + ? individualSymbolMiniTickerStreamRequest.getId().toString() + : "") + .replace( + "", + individualSymbolMiniTickerStreamRequest.getSymbol() != null + ? individualSymbolMiniTickerStreamRequest + .getSymbol() + .toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void individualSymbolMiniTickerStreamValidateBeforeCall( + IndividualSymbolMiniTickerStreamRequest individualSymbolMiniTickerStreamRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(individualSymbolMiniTickerStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Individual Symbol Ticker Streams 24hr rolling window ticker statistics for a single symbol. + * These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to + * 24hrs before. > **After CM migration**, the payload is appended with a new `st` + * field (`1` = UM, `2` = CM). Update Speed: 500ms + * + * @param individualSymbolTickerStreamsRequest (required) + * @return IndividualSymbolTickerStreamsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Individual Symbol Ticker Streams -
+ * + * @see Individual + * Symbol Ticker Streams Documentation + */ + public StreamBlockingQueueWrapper + individualSymbolTickerStreams( + IndividualSymbolTickerStreamsRequest individualSymbolTickerStreamsRequest) + throws ApiException { + StreamBlockingQueue queue = + individualSymbolTickerStreamsRaw(individualSymbolTickerStreamsRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue individualSymbolTickerStreamsRaw( + IndividualSymbolTickerStreamsRequest individualSymbolTickerStreamsRequest) + throws ApiException { + individualSymbolTickerStreamsValidateBeforeCall(individualSymbolTickerStreamsRequest); + + String methodName = + "/@ticker" + .substring(1) + .replace( + "", + individualSymbolTickerStreamsRequest.getId() != null + ? individualSymbolTickerStreamsRequest.getId().toString() + : "") + .replace( + "", + individualSymbolTickerStreamsRequest.getSymbol() != null + ? individualSymbolTickerStreamsRequest + .getSymbol() + .toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void individualSymbolTickerStreamsValidateBeforeCall( + IndividualSymbolTickerStreamsRequest individualSymbolTickerStreamsRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(individualSymbolTickerStreamsRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Kline/Candlestick Streams The Kline/Candlestick Stream push updates to the current + * klines/candlestick every 250 milliseconds (if existing). > **After CM migration**, both + * `fstream` and `dstream` may subscribe to either UM or CM symbols on this + * stream. Update Speed: 250ms + * + * @param klineCandlestickStreamsRequest (required) + * @return KlineCandlestickStreamsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Kline/Candlestick Streams -
+ * + * @see Kline/Candlestick + * Streams Documentation + */ + public StreamBlockingQueueWrapper klineCandlestickStreams( + KlineCandlestickStreamsRequest klineCandlestickStreamsRequest) throws ApiException { + StreamBlockingQueue queue = + klineCandlestickStreamsRaw(klineCandlestickStreamsRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue klineCandlestickStreamsRaw( + KlineCandlestickStreamsRequest klineCandlestickStreamsRequest) throws ApiException { + klineCandlestickStreamsValidateBeforeCall(klineCandlestickStreamsRequest); + + String methodName = + "/@kline_" + .substring(1) + .replace( + "", + klineCandlestickStreamsRequest.getId() != null + ? klineCandlestickStreamsRequest.getId().toString() + : "") + .replace( + "", + klineCandlestickStreamsRequest.getSymbol() != null + ? klineCandlestickStreamsRequest.getSymbol().toString() + : "") + .replace( + "", + klineCandlestickStreamsRequest.getInterval() != null + ? klineCandlestickStreamsRequest.getInterval().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void klineCandlestickStreamsValidateBeforeCall( + KlineCandlestickStreamsRequest klineCandlestickStreamsRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(klineCandlestickStreamsRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Mark Price Kline/Candlestick Streams Mark Price Kline/Candlestick Streams > **After CM + * migration**, both `fstream` and `dstream` may subscribe to CM symbols on + * this stream. Update Speed: 250ms + * + * @param markPriceKlineCandlestickStreamsRequest (required) + * @return MarkPriceKlineCandlestickStreamsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Mark Price Kline/Candlestick Streams -
+ * + * @see Mark + * Price Kline/Candlestick Streams Documentation + */ + public StreamBlockingQueueWrapper + markPriceKlineCandlestickStreams( + MarkPriceKlineCandlestickStreamsRequest markPriceKlineCandlestickStreamsRequest) + throws ApiException { + StreamBlockingQueue queue = + markPriceKlineCandlestickStreamsRaw(markPriceKlineCandlestickStreamsRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue markPriceKlineCandlestickStreamsRaw( + MarkPriceKlineCandlestickStreamsRequest markPriceKlineCandlestickStreamsRequest) + throws ApiException { + markPriceKlineCandlestickStreamsValidateBeforeCall(markPriceKlineCandlestickStreamsRequest); + + String methodName = + "/@markPriceKline_" + .substring(1) + .replace( + "", + markPriceKlineCandlestickStreamsRequest.getId() != null + ? markPriceKlineCandlestickStreamsRequest.getId().toString() + : "") + .replace( + "", + markPriceKlineCandlestickStreamsRequest.getSymbol() != null + ? markPriceKlineCandlestickStreamsRequest + .getSymbol() + .toString() + : "") + .replace( + "", + markPriceKlineCandlestickStreamsRequest.getInterval() != null + ? markPriceKlineCandlestickStreamsRequest + .getInterval() + .toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void markPriceKlineCandlestickStreamsValidateBeforeCall( + MarkPriceKlineCandlestickStreamsRequest markPriceKlineCandlestickStreamsRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(markPriceKlineCandlestickStreamsRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Mark Price of All Symbols of a Pair Mark Price of All Symbols of a Pair > **After CM + * migration**, the payload is appended with a new `st` field (`1` = + * UM, `2` = CM); both `fstream` and `dstream` may subscribe + * to either UM or CM symbols on this stream. Update Speed: 3000ms OR 1000ms + * + * @param markPriceOfAllSymbolsOfAPairRequest (required) + * @return MarkPriceOfAllSymbolsOfAPairResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Mark Price of All Symbols of a Pair -
+ * + * @see Mark + * Price of All Symbols of a Pair Documentation + */ + public StreamBlockingQueueWrapper + markPriceOfAllSymbolsOfAPair( + MarkPriceOfAllSymbolsOfAPairRequest markPriceOfAllSymbolsOfAPairRequest) + throws ApiException { + StreamBlockingQueue queue = + markPriceOfAllSymbolsOfAPairRaw(markPriceOfAllSymbolsOfAPairRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue markPriceOfAllSymbolsOfAPairRaw( + MarkPriceOfAllSymbolsOfAPairRequest markPriceOfAllSymbolsOfAPairRequest) + throws ApiException { + markPriceOfAllSymbolsOfAPairValidateBeforeCall(markPriceOfAllSymbolsOfAPairRequest); + + String methodName = + "/@markPrice@" + .substring(1) + .replace( + "", + markPriceOfAllSymbolsOfAPairRequest.getId() != null + ? markPriceOfAllSymbolsOfAPairRequest.getId().toString() + : "") + .replace( + "", + markPriceOfAllSymbolsOfAPairRequest.getPair() != null + ? markPriceOfAllSymbolsOfAPairRequest.getPair().toString() + : "") + .replace( + "", + markPriceOfAllSymbolsOfAPairRequest.getUpdateSpeed() != null + ? markPriceOfAllSymbolsOfAPairRequest + .getUpdateSpeed() + .toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void markPriceOfAllSymbolsOfAPairValidateBeforeCall( + MarkPriceOfAllSymbolsOfAPairRequest markPriceOfAllSymbolsOfAPairRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(markPriceOfAllSymbolsOfAPairRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Mark Price Stream Mark price update stream > **After CM migration**, the payload is + * appended with a new `st` field (`1` = UM, `2` = CM); + * both `fstream` and `dstream` may subscribe to either UM or CM symbols on + * this stream. Update Speed: 3000ms OR 1000ms + * + * @param markPriceStreamRequest (required) + * @return MarkPriceStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Mark Price Stream -
+ * + * @see Mark + * Price Stream Documentation + */ + public StreamBlockingQueueWrapper markPriceStream( + MarkPriceStreamRequest markPriceStreamRequest) throws ApiException { + StreamBlockingQueue queue = markPriceStreamRaw(markPriceStreamRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue markPriceStreamRaw( + MarkPriceStreamRequest markPriceStreamRequest) throws ApiException { + markPriceStreamValidateBeforeCall(markPriceStreamRequest); + + String methodName = + "/@markPrice@" + .substring(1) + .replace( + "", + markPriceStreamRequest.getId() != null + ? markPriceStreamRequest.getId().toString() + : "") + .replace( + "", + markPriceStreamRequest.getSymbol() != null + ? markPriceStreamRequest.getSymbol().toString() + : "") + .replace( + "", + markPriceStreamRequest.getUpdateSpeed() != null + ? markPriceStreamRequest.getUpdateSpeed().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void markPriceStreamValidateBeforeCall(MarkPriceStreamRequest markPriceStreamRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(markPriceStreamRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Market Liquidation Order Streams The Liquidation Order Snapshot Streams push force + * liquidation order information for specific symbol. For each symbol,only the latest one + * liquidation order within 1000ms will be pushed as the snapshot. If no liquidation happens in + * the interval of 1000ms, no stream will be pushed. Update Speed: 1000ms + * + * @param marketLiquidationOrderStreamsRequest (required) + * @return MarketLiquidationOrderStreamsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Liquidation Order Streams -
+ * + * @see Market + * Liquidation Order Streams Documentation + */ + public StreamBlockingQueueWrapper + marketLiquidationOrderStreams( + MarketLiquidationOrderStreamsRequest marketLiquidationOrderStreamsRequest) + throws ApiException { + StreamBlockingQueue queue = + marketLiquidationOrderStreamsRaw(marketLiquidationOrderStreamsRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue marketLiquidationOrderStreamsRaw( + MarketLiquidationOrderStreamsRequest marketLiquidationOrderStreamsRequest) + throws ApiException { + marketLiquidationOrderStreamsValidateBeforeCall(marketLiquidationOrderStreamsRequest); + + String methodName = + "/@forceOrder" + .substring(1) + .replace( + "", + marketLiquidationOrderStreamsRequest.getId() != null + ? marketLiquidationOrderStreamsRequest.getId().toString() + : "") + .replace( + "", + marketLiquidationOrderStreamsRequest.getSymbol() != null + ? marketLiquidationOrderStreamsRequest + .getSymbol() + .toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void marketLiquidationOrderStreamsValidateBeforeCall( + MarketLiquidationOrderStreamsRequest marketLiquidationOrderStreamsRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(marketLiquidationOrderStreamsRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Partial Book Depth Streams Top levels bids and asks. > **After CM migration**, the payload + * is appended with a new `st` field (`1` = UM, `2` = + * CM). Update Speed: 250ms, 500ms or 100ms + * + * @param partialBookDepthStreamsRequest (required) + * @return PartialBookDepthStreamsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Partial Book Depth Streams -
+ * + * @see Partial + * Book Depth Streams Documentation + */ + public StreamBlockingQueueWrapper partialBookDepthStreams( + PartialBookDepthStreamsRequest partialBookDepthStreamsRequest) throws ApiException { + StreamBlockingQueue queue = + partialBookDepthStreamsRaw(partialBookDepthStreamsRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue partialBookDepthStreamsRaw( + PartialBookDepthStreamsRequest partialBookDepthStreamsRequest) throws ApiException { + partialBookDepthStreamsValidateBeforeCall(partialBookDepthStreamsRequest); + + String methodName = + "/@depth@" + .substring(1) + .replace( + "", + partialBookDepthStreamsRequest.getId() != null + ? partialBookDepthStreamsRequest.getId().toString() + : "") + .replace( + "", + partialBookDepthStreamsRequest.getSymbol() != null + ? partialBookDepthStreamsRequest.getSymbol().toString() + : "") + .replace( + "", + partialBookDepthStreamsRequest.getLevels() != null + ? partialBookDepthStreamsRequest.getLevels().toString() + : "") + .replace( + "", + partialBookDepthStreamsRequest.getUpdateSpeed() != null + ? partialBookDepthStreamsRequest.getUpdateSpeed().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void partialBookDepthStreamsValidateBeforeCall( + PartialBookDepthStreamsRequest partialBookDepthStreamsRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(partialBookDepthStreamsRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + public String getRequestID() { + return UUID.randomUUID().toString(); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DerivativesTradingCoinFuturesWebSocketStreams.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DerivativesTradingCoinFuturesWebSocketStreams.java index 2fadcbb4d..7712aba5a 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DerivativesTradingCoinFuturesWebSocketStreams.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DerivativesTradingCoinFuturesWebSocketStreams.java @@ -38,14 +38,14 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolTickerStreamsResponse; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.KlineCandlestickStreamsRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.KlineCandlestickStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.LiquidationOrderStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.LiquidationOrderStreamsResponse; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceKlineCandlestickStreamsRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceKlineCandlestickStreamsResponse; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceOfAllSymbolsOfAPairRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceOfAllSymbolsOfAPairResponse; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceStreamRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceStreamResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarketLiquidationOrderStreamsRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarketLiquidationOrderStreamsResponse; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.PartialBookDepthStreamsRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.PartialBookDepthStreamsResponse; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.UserDataStreamEventsResponse; @@ -58,12 +58,12 @@ public class DerivativesTradingCoinFuturesWebSocketStreams { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-coin-futures/7.1.1 (Java/%s; %s; %s)", + "binance-derivatives-trading-coin-futures/8.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final StreamConnectionInterface connection; - private WebsocketMarketStreamsApi websocketMarketStreamsApi; + private DefaultApi defaultApi; public DerivativesTradingCoinFuturesWebSocketStreams( WebSocketClientConfiguration configuration) { @@ -80,7 +80,7 @@ public DerivativesTradingCoinFuturesWebSocketStreams(StreamConnectionInterface c } this.connection = connection; - this.websocketMarketStreamsApi = new WebsocketMarketStreamsApi(connection); + this.defaultApi = new DefaultApi(connection); } public void stop() throws Exception { @@ -91,33 +91,31 @@ public void stop() throws Exception { public StreamBlockingQueueWrapper aggregateTradeStreams( AggregateTradeStreamsRequest aggregateTradeStreamsRequest) throws ApiException { - return websocketMarketStreamsApi.aggregateTradeStreams(aggregateTradeStreamsRequest); + return defaultApi.aggregateTradeStreams(aggregateTradeStreamsRequest); } public StreamBlockingQueueWrapper allBookTickersStream( AllBookTickersStreamRequest allBookTickersStreamRequest) throws ApiException { - return websocketMarketStreamsApi.allBookTickersStream(allBookTickersStreamRequest); + return defaultApi.allBookTickersStream(allBookTickersStreamRequest); } public StreamBlockingQueueWrapper allMarketLiquidationOrderStreams( AllMarketLiquidationOrderStreamsRequest allMarketLiquidationOrderStreamsRequest) throws ApiException { - return websocketMarketStreamsApi.allMarketLiquidationOrderStreams( - allMarketLiquidationOrderStreamsRequest); + return defaultApi.allMarketLiquidationOrderStreams(allMarketLiquidationOrderStreamsRequest); } public StreamBlockingQueueWrapper allMarketMiniTickersStream( AllMarketMiniTickersStreamRequest allMarketMiniTickersStreamRequest) throws ApiException { - return websocketMarketStreamsApi.allMarketMiniTickersStream( - allMarketMiniTickersStreamRequest); + return defaultApi.allMarketMiniTickersStream(allMarketMiniTickersStreamRequest); } public StreamBlockingQueueWrapper allMarketTickersStreams( AllMarketTickersStreamsRequest allMarketTickersStreamsRequest) throws ApiException { - return websocketMarketStreamsApi.allMarketTickersStreams(allMarketTickersStreamsRequest); + return defaultApi.allMarketTickersStreams(allMarketTickersStreamsRequest); } public StreamBlockingQueueWrapper @@ -125,31 +123,30 @@ public StreamBlockingQueueWrapper allMarketTick ContinuousContractKlineCandlestickStreamsRequest continuousContractKlineCandlestickStreamsRequest) throws ApiException { - return websocketMarketStreamsApi.continuousContractKlineCandlestickStreams( + return defaultApi.continuousContractKlineCandlestickStreams( continuousContractKlineCandlestickStreamsRequest); } public StreamBlockingQueueWrapper contractInfoStream( ContractInfoStreamRequest contractInfoStreamRequest) throws ApiException { - return websocketMarketStreamsApi.contractInfoStream(contractInfoStreamRequest); + return defaultApi.contractInfoStream(contractInfoStreamRequest); } public StreamBlockingQueueWrapper diffBookDepthStreams( DiffBookDepthStreamsRequest diffBookDepthStreamsRequest) throws ApiException { - return websocketMarketStreamsApi.diffBookDepthStreams(diffBookDepthStreamsRequest); + return defaultApi.diffBookDepthStreams(diffBookDepthStreamsRequest); } public StreamBlockingQueueWrapper indexKlineCandlestickStreams( IndexKlineCandlestickStreamsRequest indexKlineCandlestickStreamsRequest) throws ApiException { - return websocketMarketStreamsApi.indexKlineCandlestickStreams( - indexKlineCandlestickStreamsRequest); + return defaultApi.indexKlineCandlestickStreams(indexKlineCandlestickStreamsRequest); } public StreamBlockingQueueWrapper indexPriceStream( IndexPriceStreamRequest indexPriceStreamRequest) throws ApiException { - return websocketMarketStreamsApi.indexPriceStream(indexPriceStreamRequest); + return defaultApi.indexPriceStream(indexPriceStreamRequest); } public StreamBlockingQueueWrapper @@ -157,7 +154,7 @@ public StreamBlockingQueueWrapper indexPriceStream( IndividualSymbolBookTickerStreamsRequest individualSymbolBookTickerStreamsRequest) throws ApiException { - return websocketMarketStreamsApi.individualSymbolBookTickerStreams( + return defaultApi.individualSymbolBookTickerStreams( individualSymbolBookTickerStreamsRequest); } @@ -165,52 +162,50 @@ public StreamBlockingQueueWrapper indexPriceStream( individualSymbolMiniTickerStream( IndividualSymbolMiniTickerStreamRequest individualSymbolMiniTickerStreamRequest) throws ApiException { - return websocketMarketStreamsApi.individualSymbolMiniTickerStream( - individualSymbolMiniTickerStreamRequest); + return defaultApi.individualSymbolMiniTickerStream(individualSymbolMiniTickerStreamRequest); } public StreamBlockingQueueWrapper individualSymbolTickerStreams( IndividualSymbolTickerStreamsRequest individualSymbolTickerStreamsRequest) throws ApiException { - return websocketMarketStreamsApi.individualSymbolTickerStreams( - individualSymbolTickerStreamsRequest); + return defaultApi.individualSymbolTickerStreams(individualSymbolTickerStreamsRequest); } public StreamBlockingQueueWrapper klineCandlestickStreams( KlineCandlestickStreamsRequest klineCandlestickStreamsRequest) throws ApiException { - return websocketMarketStreamsApi.klineCandlestickStreams(klineCandlestickStreamsRequest); - } - - public StreamBlockingQueueWrapper liquidationOrderStreams( - LiquidationOrderStreamsRequest liquidationOrderStreamsRequest) throws ApiException { - return websocketMarketStreamsApi.liquidationOrderStreams(liquidationOrderStreamsRequest); + return defaultApi.klineCandlestickStreams(klineCandlestickStreamsRequest); } public StreamBlockingQueueWrapper markPriceKlineCandlestickStreams( MarkPriceKlineCandlestickStreamsRequest markPriceKlineCandlestickStreamsRequest) throws ApiException { - return websocketMarketStreamsApi.markPriceKlineCandlestickStreams( - markPriceKlineCandlestickStreamsRequest); + return defaultApi.markPriceKlineCandlestickStreams(markPriceKlineCandlestickStreamsRequest); } public StreamBlockingQueueWrapper markPriceOfAllSymbolsOfAPair( MarkPriceOfAllSymbolsOfAPairRequest markPriceOfAllSymbolsOfAPairRequest) throws ApiException { - return websocketMarketStreamsApi.markPriceOfAllSymbolsOfAPair( - markPriceOfAllSymbolsOfAPairRequest); + return defaultApi.markPriceOfAllSymbolsOfAPair(markPriceOfAllSymbolsOfAPairRequest); } public StreamBlockingQueueWrapper markPriceStream( MarkPriceStreamRequest markPriceStreamRequest) throws ApiException { - return websocketMarketStreamsApi.markPriceStream(markPriceStreamRequest); + return defaultApi.markPriceStream(markPriceStreamRequest); + } + + public StreamBlockingQueueWrapper + marketLiquidationOrderStreams( + MarketLiquidationOrderStreamsRequest marketLiquidationOrderStreamsRequest) + throws ApiException { + return defaultApi.marketLiquidationOrderStreams(marketLiquidationOrderStreamsRequest); } public StreamBlockingQueueWrapper partialBookDepthStreams( PartialBookDepthStreamsRequest partialBookDepthStreamsRequest) throws ApiException { - return websocketMarketStreamsApi.partialBookDepthStreams(partialBookDepthStreamsRequest); + return defaultApi.partialBookDepthStreams(partialBookDepthStreamsRequest); } /** diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/WebsocketMarketStreamsApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/WebsocketMarketStreamsApi.java deleted file mode 100644 index 1a92d9f68..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/WebsocketMarketStreamsApi.java +++ /dev/null @@ -1,1821 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.SystemUtil; -import com.binance.connector.client.common.exception.ConstraintViolationException; -import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionInterface; -import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionPoolWrapper; -import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionWrapper; -import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; -import com.binance.connector.client.common.websocket.dtos.RequestWrapperDTO; -import com.binance.connector.client.common.websocket.service.StreamBlockingQueue; -import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AggregateTradeStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AggregateTradeStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllBookTickersStreamRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllBookTickersStreamResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketLiquidationOrderStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketLiquidationOrderStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketMiniTickersStreamRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketMiniTickersStreamResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketTickersStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketTickersStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.ContinuousContractKlineCandlestickStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.ContinuousContractKlineCandlestickStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.ContractInfoStreamRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.ContractInfoStreamResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.DiffBookDepthStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.DiffBookDepthStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndexKlineCandlestickStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndexKlineCandlestickStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndexPriceStreamRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndexPriceStreamResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolBookTickerStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolBookTickerStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolMiniTickerStreamRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolMiniTickerStreamResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolTickerStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolTickerStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.KlineCandlestickStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.KlineCandlestickStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.LiquidationOrderStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.LiquidationOrderStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceKlineCandlestickStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceKlineCandlestickStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceOfAllSymbolsOfAPairRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceOfAllSymbolsOfAPairResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceStreamRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceStreamResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.PartialBookDepthStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.PartialBookDepthStreamsResponse; -import com.google.gson.reflect.TypeToken; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.Validation; -import jakarta.validation.Validator; -import jakarta.validation.constraints.*; -import java.util.Collections; -import java.util.Map; -import java.util.Set; -import java.util.UUID; -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; - -public class WebsocketMarketStreamsApi { - private static final String USER_AGENT = - String.format( - "binance-derivatives-trading-coin-futures/7.1.1 (Java/%s; %s; %s)", - SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); - - private StreamConnectionInterface connection; - - public WebsocketMarketStreamsApi() {} - - public WebsocketMarketStreamsApi(WebSocketClientConfiguration configuration) { - this( - configuration.getUsePool() - ? new StreamConnectionPoolWrapper(configuration, JSON.getGson()) - : new StreamConnectionWrapper(configuration, JSON.getGson())); - } - - public WebsocketMarketStreamsApi(StreamConnectionInterface connection) { - connection.setUserAgent(USER_AGENT); - if (!connection.isConnected()) { - connection.connect(); - } - this.connection = connection; - } - - public StreamConnectionInterface getConnection() { - return connection; - } - - /** - * Aggregate Trade Streams The Aggregate Trade Streams push market trade information that is - * aggregated for fills with same price and taking side every 100 milliseconds. Update Speed: - * 100ms - * - * @param aggregateTradeStreamsRequest (required) - * @return AggregateTradeStreamsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Aggregate Trade Streams -
- * - * @see Aggregate - * Trade Streams Documentation - */ - public StreamBlockingQueueWrapper aggregateTradeStreams( - AggregateTradeStreamsRequest aggregateTradeStreamsRequest) throws ApiException { - StreamBlockingQueue queue = aggregateTradeStreamsRaw(aggregateTradeStreamsRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue aggregateTradeStreamsRaw( - AggregateTradeStreamsRequest aggregateTradeStreamsRequest) throws ApiException { - aggregateTradeStreamsValidateBeforeCall(aggregateTradeStreamsRequest); - - String methodName = - "/@aggTrade" - .substring(1) - .replace( - "", - aggregateTradeStreamsRequest.getId() != null - ? aggregateTradeStreamsRequest.getId().toString() - : "") - .replace( - "", - aggregateTradeStreamsRequest.getSymbol() != null - ? aggregateTradeStreamsRequest.getSymbol().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void aggregateTradeStreamsValidateBeforeCall( - AggregateTradeStreamsRequest aggregateTradeStreamsRequest) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(aggregateTradeStreamsRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * All Book Tickers Stream Pushes any update to the best bid or ask's price or quantity in - * real-time for all symbols. Update Speed: Real-time - * - * @param allBookTickersStreamRequest (required) - * @return AllBookTickersStreamResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 All Book Tickers Stream -
- * - * @see All - * Book Tickers Stream Documentation - */ - public StreamBlockingQueueWrapper allBookTickersStream( - AllBookTickersStreamRequest allBookTickersStreamRequest) throws ApiException { - StreamBlockingQueue queue = allBookTickersStreamRaw(allBookTickersStreamRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue allBookTickersStreamRaw( - AllBookTickersStreamRequest allBookTickersStreamRequest) throws ApiException { - allBookTickersStreamValidateBeforeCall(allBookTickersStreamRequest); - - String methodName = - "/!bookTicker" - .substring(1) - .replace( - "", - allBookTickersStreamRequest.getId() != null - ? allBookTickersStreamRequest.getId().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void allBookTickersStreamValidateBeforeCall( - AllBookTickersStreamRequest allBookTickersStreamRequest) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(allBookTickersStreamRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * All Market Liquidation Order Streams The All Liquidation Order Snapshot Streams push force - * liquidation order information for all symbols in the market. For each symbol,only the latest - * one liquidation order within 1000ms will be pushed as the snapshot. If no liquidation happens - * in the interval of 1000ms, no stream will be pushed. Update Speed: 1000ms - * - * @param allMarketLiquidationOrderStreamsRequest (required) - * @return AllMarketLiquidationOrderStreamsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 All Market Liquidation Order Streams -
- * - * @see All - * Market Liquidation Order Streams Documentation - */ - public StreamBlockingQueueWrapper - allMarketLiquidationOrderStreams( - AllMarketLiquidationOrderStreamsRequest allMarketLiquidationOrderStreamsRequest) - throws ApiException { - StreamBlockingQueue queue = - allMarketLiquidationOrderStreamsRaw(allMarketLiquidationOrderStreamsRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue allMarketLiquidationOrderStreamsRaw( - AllMarketLiquidationOrderStreamsRequest allMarketLiquidationOrderStreamsRequest) - throws ApiException { - allMarketLiquidationOrderStreamsValidateBeforeCall(allMarketLiquidationOrderStreamsRequest); - - String methodName = - "/!forceOrder@arr" - .substring(1) - .replace( - "", - allMarketLiquidationOrderStreamsRequest.getId() != null - ? allMarketLiquidationOrderStreamsRequest.getId().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void allMarketLiquidationOrderStreamsValidateBeforeCall( - AllMarketLiquidationOrderStreamsRequest allMarketLiquidationOrderStreamsRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(allMarketLiquidationOrderStreamsRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * All Market Mini Tickers Stream 24hr rolling window mini-ticker statistics for all symbols. - * These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to - * 24hrs before. Note that only tickers that have changed will be present in the array. Update - * Speed: 1000ms - * - * @param allMarketMiniTickersStreamRequest (required) - * @return AllMarketMiniTickersStreamResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 All Market Mini Tickers Stream -
- * - * @see All - * Market Mini Tickers Stream Documentation - */ - public StreamBlockingQueueWrapper - allMarketMiniTickersStream( - AllMarketMiniTickersStreamRequest allMarketMiniTickersStreamRequest) - throws ApiException { - StreamBlockingQueue queue = - allMarketMiniTickersStreamRaw(allMarketMiniTickersStreamRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue allMarketMiniTickersStreamRaw( - AllMarketMiniTickersStreamRequest allMarketMiniTickersStreamRequest) - throws ApiException { - allMarketMiniTickersStreamValidateBeforeCall(allMarketMiniTickersStreamRequest); - - String methodName = - "/!miniTicker@arr" - .substring(1) - .replace( - "", - allMarketMiniTickersStreamRequest.getId() != null - ? allMarketMiniTickersStreamRequest.getId().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void allMarketMiniTickersStreamValidateBeforeCall( - AllMarketMiniTickersStreamRequest allMarketMiniTickersStreamRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(allMarketMiniTickersStreamRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * All Market Tickers Streams 24hr rolling window ticker statistics for all symbols. These are - * NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs - * before. Note that only tickers that have changed will be present in the array. Update Speed: - * 1000ms - * - * @param allMarketTickersStreamsRequest (required) - * @return AllMarketTickersStreamsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 All Market Tickers Streams -
- * - * @see All - * Market Tickers Streams Documentation - */ - public StreamBlockingQueueWrapper allMarketTickersStreams( - AllMarketTickersStreamsRequest allMarketTickersStreamsRequest) throws ApiException { - StreamBlockingQueue queue = - allMarketTickersStreamsRaw(allMarketTickersStreamsRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue allMarketTickersStreamsRaw( - AllMarketTickersStreamsRequest allMarketTickersStreamsRequest) throws ApiException { - allMarketTickersStreamsValidateBeforeCall(allMarketTickersStreamsRequest); - - String methodName = - "/!ticker@arr" - .substring(1) - .replace( - "", - allMarketTickersStreamsRequest.getId() != null - ? allMarketTickersStreamsRequest.getId().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void allMarketTickersStreamsValidateBeforeCall( - AllMarketTickersStreamsRequest allMarketTickersStreamsRequest) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(allMarketTickersStreamsRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Continuous Contract Kline/Candlestick Streams Kline update every second Update Speed: 250ms - * - * @param continuousContractKlineCandlestickStreamsRequest (required) - * @return ContinuousContractKlineCandlestickStreamsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Continuous Contract Kline/Candlestick Streams -
- * - * @see Continuous - * Contract Kline/Candlestick Streams Documentation - */ - public StreamBlockingQueueWrapper - continuousContractKlineCandlestickStreams( - ContinuousContractKlineCandlestickStreamsRequest - continuousContractKlineCandlestickStreamsRequest) - throws ApiException { - StreamBlockingQueue queue = - continuousContractKlineCandlestickStreamsRaw( - continuousContractKlineCandlestickStreamsRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue continuousContractKlineCandlestickStreamsRaw( - ContinuousContractKlineCandlestickStreamsRequest - continuousContractKlineCandlestickStreamsRequest) - throws ApiException { - continuousContractKlineCandlestickStreamsValidateBeforeCall( - continuousContractKlineCandlestickStreamsRequest); - - String methodName = - "/_@continuousKline_" - .substring(1) - .replace( - "", - continuousContractKlineCandlestickStreamsRequest.getId() != null - ? continuousContractKlineCandlestickStreamsRequest - .getId() - .toString() - : "") - .replace( - "", - continuousContractKlineCandlestickStreamsRequest.getPair() != null - ? continuousContractKlineCandlestickStreamsRequest - .getPair() - .toString() - : "") - .replace( - "", - continuousContractKlineCandlestickStreamsRequest.getContractType() - != null - ? continuousContractKlineCandlestickStreamsRequest - .getContractType() - .toString() - : "") - .replace( - "", - continuousContractKlineCandlestickStreamsRequest.getInterval() - != null - ? continuousContractKlineCandlestickStreamsRequest - .getInterval() - .toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void continuousContractKlineCandlestickStreamsValidateBeforeCall( - ContinuousContractKlineCandlestickStreamsRequest - continuousContractKlineCandlestickStreamsRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(continuousContractKlineCandlestickStreamsRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Contract Info Stream ContractInfo stream pushes when contract info - * updates(listing/settlement/contract bracket update). `bks` field only shows up when - * bracket gets updated. Update Speed: Real-time - * - * @param contractInfoStreamRequest (required) - * @return ContractInfoStreamResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Contract Info Stream -
- * - * @see Contract - * Info Stream Documentation - */ - public StreamBlockingQueueWrapper contractInfoStream( - ContractInfoStreamRequest contractInfoStreamRequest) throws ApiException { - StreamBlockingQueue queue = contractInfoStreamRaw(contractInfoStreamRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue contractInfoStreamRaw( - ContractInfoStreamRequest contractInfoStreamRequest) throws ApiException { - contractInfoStreamValidateBeforeCall(contractInfoStreamRequest); - - String methodName = - "/!contractInfo" - .substring(1) - .replace( - "", - contractInfoStreamRequest.getId() != null - ? contractInfoStreamRequest.getId().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void contractInfoStreamValidateBeforeCall( - ContractInfoStreamRequest contractInfoStreamRequest) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(contractInfoStreamRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Diff. Book Depth Streams Bids and asks, pushed every 250 milliseconds, 500 milliseconds, or - * 100 milliseconds Update Speed: 250ms or 500ms or 100ms - * - * @param diffBookDepthStreamsRequest (required) - * @return DiffBookDepthStreamsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Diff. Book Depth Streams -
- * - * @see Diff. - * Book Depth Streams Documentation - */ - public StreamBlockingQueueWrapper diffBookDepthStreams( - DiffBookDepthStreamsRequest diffBookDepthStreamsRequest) throws ApiException { - StreamBlockingQueue queue = diffBookDepthStreamsRaw(diffBookDepthStreamsRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue diffBookDepthStreamsRaw( - DiffBookDepthStreamsRequest diffBookDepthStreamsRequest) throws ApiException { - diffBookDepthStreamsValidateBeforeCall(diffBookDepthStreamsRequest); - - String methodName = - "/@depth@" - .substring(1) - .replace( - "", - diffBookDepthStreamsRequest.getId() != null - ? diffBookDepthStreamsRequest.getId().toString() - : "") - .replace( - "", - diffBookDepthStreamsRequest.getSymbol() != null - ? diffBookDepthStreamsRequest.getSymbol().toString() - : "") - .replace( - "", - diffBookDepthStreamsRequest.getUpdateSpeed() != null - ? diffBookDepthStreamsRequest.getUpdateSpeed().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void diffBookDepthStreamsValidateBeforeCall( - DiffBookDepthStreamsRequest diffBookDepthStreamsRequest) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(diffBookDepthStreamsRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Index Kline/Candlestick Streams Index Kline/Candlestick Streams Update Speed: 250ms - * - * @param indexKlineCandlestickStreamsRequest (required) - * @return IndexKlineCandlestickStreamsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Index Kline/Candlestick Streams -
- * - * @see Index - * Kline/Candlestick Streams Documentation - */ - public StreamBlockingQueueWrapper - indexKlineCandlestickStreams( - IndexKlineCandlestickStreamsRequest indexKlineCandlestickStreamsRequest) - throws ApiException { - StreamBlockingQueue queue = - indexKlineCandlestickStreamsRaw(indexKlineCandlestickStreamsRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue indexKlineCandlestickStreamsRaw( - IndexKlineCandlestickStreamsRequest indexKlineCandlestickStreamsRequest) - throws ApiException { - indexKlineCandlestickStreamsValidateBeforeCall(indexKlineCandlestickStreamsRequest); - - String methodName = - "/@indexPriceKline_" - .substring(1) - .replace( - "", - indexKlineCandlestickStreamsRequest.getId() != null - ? indexKlineCandlestickStreamsRequest.getId().toString() - : "") - .replace( - "", - indexKlineCandlestickStreamsRequest.getPair() != null - ? indexKlineCandlestickStreamsRequest.getPair().toString() - : "") - .replace( - "", - indexKlineCandlestickStreamsRequest.getInterval() != null - ? indexKlineCandlestickStreamsRequest - .getInterval() - .toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void indexKlineCandlestickStreamsValidateBeforeCall( - IndexKlineCandlestickStreamsRequest indexKlineCandlestickStreamsRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(indexKlineCandlestickStreamsRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Index Price Stream Index Price Stream Update Speed: 3000ms OR 1000ms - * - * @param indexPriceStreamRequest (required) - * @return IndexPriceStreamResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Index Price Stream -
- * - * @see Index - * Price Stream Documentation - */ - public StreamBlockingQueueWrapper indexPriceStream( - IndexPriceStreamRequest indexPriceStreamRequest) throws ApiException { - StreamBlockingQueue queue = indexPriceStreamRaw(indexPriceStreamRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue indexPriceStreamRaw( - IndexPriceStreamRequest indexPriceStreamRequest) throws ApiException { - indexPriceStreamValidateBeforeCall(indexPriceStreamRequest); - - String methodName = - "/@indexPrice@" - .substring(1) - .replace( - "", - indexPriceStreamRequest.getId() != null - ? indexPriceStreamRequest.getId().toString() - : "") - .replace( - "", - indexPriceStreamRequest.getPair() != null - ? indexPriceStreamRequest.getPair().toString() - : "") - .replace( - "", - indexPriceStreamRequest.getUpdateSpeed() != null - ? indexPriceStreamRequest.getUpdateSpeed().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void indexPriceStreamValidateBeforeCall(IndexPriceStreamRequest indexPriceStreamRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(indexPriceStreamRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Individual Symbol Book Ticker Streams Pushes any update to the best bid or ask's price or - * quantity in real-time for a specified symbol. Update Speed: Real-time - * - * @param individualSymbolBookTickerStreamsRequest (required) - * @return IndividualSymbolBookTickerStreamsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Individual Symbol Book Ticker Streams -
- * - * @see Individual - * Symbol Book Ticker Streams Documentation - */ - public StreamBlockingQueueWrapper - individualSymbolBookTickerStreams( - IndividualSymbolBookTickerStreamsRequest - individualSymbolBookTickerStreamsRequest) - throws ApiException { - StreamBlockingQueue queue = - individualSymbolBookTickerStreamsRaw(individualSymbolBookTickerStreamsRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue individualSymbolBookTickerStreamsRaw( - IndividualSymbolBookTickerStreamsRequest individualSymbolBookTickerStreamsRequest) - throws ApiException { - individualSymbolBookTickerStreamsValidateBeforeCall( - individualSymbolBookTickerStreamsRequest); - - String methodName = - "/@bookTicker" - .substring(1) - .replace( - "", - individualSymbolBookTickerStreamsRequest.getId() != null - ? individualSymbolBookTickerStreamsRequest - .getId() - .toString() - : "") - .replace( - "", - individualSymbolBookTickerStreamsRequest.getSymbol() != null - ? individualSymbolBookTickerStreamsRequest - .getSymbol() - .toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void individualSymbolBookTickerStreamsValidateBeforeCall( - IndividualSymbolBookTickerStreamsRequest individualSymbolBookTickerStreamsRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(individualSymbolBookTickerStreamsRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Individual Symbol Mini Ticker Stream 24hr rolling window mini-ticker statistics for a single - * symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window from - * requestTime to 24hrs before. Update Speed: 500ms - * - * @param individualSymbolMiniTickerStreamRequest (required) - * @return IndividualSymbolMiniTickerStreamResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Individual Symbol Mini Ticker Stream -
- * - * @see Individual - * Symbol Mini Ticker Stream Documentation - */ - public StreamBlockingQueueWrapper - individualSymbolMiniTickerStream( - IndividualSymbolMiniTickerStreamRequest individualSymbolMiniTickerStreamRequest) - throws ApiException { - StreamBlockingQueue queue = - individualSymbolMiniTickerStreamRaw(individualSymbolMiniTickerStreamRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue individualSymbolMiniTickerStreamRaw( - IndividualSymbolMiniTickerStreamRequest individualSymbolMiniTickerStreamRequest) - throws ApiException { - individualSymbolMiniTickerStreamValidateBeforeCall(individualSymbolMiniTickerStreamRequest); - - String methodName = - "/@miniTicker" - .substring(1) - .replace( - "", - individualSymbolMiniTickerStreamRequest.getId() != null - ? individualSymbolMiniTickerStreamRequest.getId().toString() - : "") - .replace( - "", - individualSymbolMiniTickerStreamRequest.getSymbol() != null - ? individualSymbolMiniTickerStreamRequest - .getSymbol() - .toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void individualSymbolMiniTickerStreamValidateBeforeCall( - IndividualSymbolMiniTickerStreamRequest individualSymbolMiniTickerStreamRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(individualSymbolMiniTickerStreamRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Individual Symbol Ticker Streams 24hr rolling window ticker statistics for a single symbol. - * These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to - * 24hrs before. Update Speed: 500ms - * - * @param individualSymbolTickerStreamsRequest (required) - * @return IndividualSymbolTickerStreamsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Individual Symbol Ticker Streams -
- * - * @see Individual - * Symbol Ticker Streams Documentation - */ - public StreamBlockingQueueWrapper - individualSymbolTickerStreams( - IndividualSymbolTickerStreamsRequest individualSymbolTickerStreamsRequest) - throws ApiException { - StreamBlockingQueue queue = - individualSymbolTickerStreamsRaw(individualSymbolTickerStreamsRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue individualSymbolTickerStreamsRaw( - IndividualSymbolTickerStreamsRequest individualSymbolTickerStreamsRequest) - throws ApiException { - individualSymbolTickerStreamsValidateBeforeCall(individualSymbolTickerStreamsRequest); - - String methodName = - "/@ticker" - .substring(1) - .replace( - "", - individualSymbolTickerStreamsRequest.getId() != null - ? individualSymbolTickerStreamsRequest.getId().toString() - : "") - .replace( - "", - individualSymbolTickerStreamsRequest.getSymbol() != null - ? individualSymbolTickerStreamsRequest - .getSymbol() - .toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void individualSymbolTickerStreamsValidateBeforeCall( - IndividualSymbolTickerStreamsRequest individualSymbolTickerStreamsRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(individualSymbolTickerStreamsRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Kline/Candlestick Streams The Kline/Candlestick Stream push updates to the current - * klines/candlestick every 250 milliseconds (if existing). Update Speed: 250ms - * - * @param klineCandlestickStreamsRequest (required) - * @return KlineCandlestickStreamsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Kline/Candlestick Streams -
- * - * @see Kline/Candlestick - * Streams Documentation - */ - public StreamBlockingQueueWrapper klineCandlestickStreams( - KlineCandlestickStreamsRequest klineCandlestickStreamsRequest) throws ApiException { - StreamBlockingQueue queue = - klineCandlestickStreamsRaw(klineCandlestickStreamsRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue klineCandlestickStreamsRaw( - KlineCandlestickStreamsRequest klineCandlestickStreamsRequest) throws ApiException { - klineCandlestickStreamsValidateBeforeCall(klineCandlestickStreamsRequest); - - String methodName = - "/@kline_" - .substring(1) - .replace( - "", - klineCandlestickStreamsRequest.getId() != null - ? klineCandlestickStreamsRequest.getId().toString() - : "") - .replace( - "", - klineCandlestickStreamsRequest.getSymbol() != null - ? klineCandlestickStreamsRequest.getSymbol().toString() - : "") - .replace( - "", - klineCandlestickStreamsRequest.getInterval() != null - ? klineCandlestickStreamsRequest.getInterval().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void klineCandlestickStreamsValidateBeforeCall( - KlineCandlestickStreamsRequest klineCandlestickStreamsRequest) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(klineCandlestickStreamsRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Liquidation Order Streams The Liquidation Order Snapshot Streams push force liquidation order - * information for specific symbol. For each symbol,only the latest one liquidation order within - * 1000ms will be pushed as the snapshot. If no liquidation happens in the interval of 1000ms, - * no stream will be pushed. Update Speed: 1000ms - * - * @param liquidationOrderStreamsRequest (required) - * @return LiquidationOrderStreamsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Liquidation Order Streams -
- * - * @see Liquidation - * Order Streams Documentation - */ - public StreamBlockingQueueWrapper liquidationOrderStreams( - LiquidationOrderStreamsRequest liquidationOrderStreamsRequest) throws ApiException { - StreamBlockingQueue queue = - liquidationOrderStreamsRaw(liquidationOrderStreamsRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue liquidationOrderStreamsRaw( - LiquidationOrderStreamsRequest liquidationOrderStreamsRequest) throws ApiException { - liquidationOrderStreamsValidateBeforeCall(liquidationOrderStreamsRequest); - - String methodName = - "/@forceOrder" - .substring(1) - .replace( - "", - liquidationOrderStreamsRequest.getId() != null - ? liquidationOrderStreamsRequest.getId().toString() - : "") - .replace( - "", - liquidationOrderStreamsRequest.getSymbol() != null - ? liquidationOrderStreamsRequest.getSymbol().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void liquidationOrderStreamsValidateBeforeCall( - LiquidationOrderStreamsRequest liquidationOrderStreamsRequest) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(liquidationOrderStreamsRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Mark Price Kline/Candlestick Streams Mark Price Kline/Candlestick Streams Update Speed: 250ms - * - * @param markPriceKlineCandlestickStreamsRequest (required) - * @return MarkPriceKlineCandlestickStreamsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Mark Price Kline/Candlestick Streams -
- * - * @see Mark - * Price Kline/Candlestick Streams Documentation - */ - public StreamBlockingQueueWrapper - markPriceKlineCandlestickStreams( - MarkPriceKlineCandlestickStreamsRequest markPriceKlineCandlestickStreamsRequest) - throws ApiException { - StreamBlockingQueue queue = - markPriceKlineCandlestickStreamsRaw(markPriceKlineCandlestickStreamsRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue markPriceKlineCandlestickStreamsRaw( - MarkPriceKlineCandlestickStreamsRequest markPriceKlineCandlestickStreamsRequest) - throws ApiException { - markPriceKlineCandlestickStreamsValidateBeforeCall(markPriceKlineCandlestickStreamsRequest); - - String methodName = - "/@markPriceKline_" - .substring(1) - .replace( - "", - markPriceKlineCandlestickStreamsRequest.getId() != null - ? markPriceKlineCandlestickStreamsRequest.getId().toString() - : "") - .replace( - "", - markPriceKlineCandlestickStreamsRequest.getSymbol() != null - ? markPriceKlineCandlestickStreamsRequest - .getSymbol() - .toString() - : "") - .replace( - "", - markPriceKlineCandlestickStreamsRequest.getInterval() != null - ? markPriceKlineCandlestickStreamsRequest - .getInterval() - .toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void markPriceKlineCandlestickStreamsValidateBeforeCall( - MarkPriceKlineCandlestickStreamsRequest markPriceKlineCandlestickStreamsRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(markPriceKlineCandlestickStreamsRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Mark Price of All Symbols of a Pair Mark Price of All Symbols of a Pair Update Speed: 3000ms - * OR 1000ms - * - * @param markPriceOfAllSymbolsOfAPairRequest (required) - * @return MarkPriceOfAllSymbolsOfAPairResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Mark Price of All Symbols of a Pair -
- * - * @see Mark - * Price of All Symbols of a Pair Documentation - */ - public StreamBlockingQueueWrapper - markPriceOfAllSymbolsOfAPair( - MarkPriceOfAllSymbolsOfAPairRequest markPriceOfAllSymbolsOfAPairRequest) - throws ApiException { - StreamBlockingQueue queue = - markPriceOfAllSymbolsOfAPairRaw(markPriceOfAllSymbolsOfAPairRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue markPriceOfAllSymbolsOfAPairRaw( - MarkPriceOfAllSymbolsOfAPairRequest markPriceOfAllSymbolsOfAPairRequest) - throws ApiException { - markPriceOfAllSymbolsOfAPairValidateBeforeCall(markPriceOfAllSymbolsOfAPairRequest); - - String methodName = - "/@markPrice@" - .substring(1) - .replace( - "", - markPriceOfAllSymbolsOfAPairRequest.getId() != null - ? markPriceOfAllSymbolsOfAPairRequest.getId().toString() - : "") - .replace( - "", - markPriceOfAllSymbolsOfAPairRequest.getPair() != null - ? markPriceOfAllSymbolsOfAPairRequest.getPair().toString() - : "") - .replace( - "", - markPriceOfAllSymbolsOfAPairRequest.getUpdateSpeed() != null - ? markPriceOfAllSymbolsOfAPairRequest - .getUpdateSpeed() - .toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void markPriceOfAllSymbolsOfAPairValidateBeforeCall( - MarkPriceOfAllSymbolsOfAPairRequest markPriceOfAllSymbolsOfAPairRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(markPriceOfAllSymbolsOfAPairRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Mark Price Stream Mark price update stream Update Speed: 3000ms OR 1000ms - * - * @param markPriceStreamRequest (required) - * @return MarkPriceStreamResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Mark Price Stream -
- * - * @see Mark - * Price Stream Documentation - */ - public StreamBlockingQueueWrapper markPriceStream( - MarkPriceStreamRequest markPriceStreamRequest) throws ApiException { - StreamBlockingQueue queue = markPriceStreamRaw(markPriceStreamRequest); - - TypeToken typeToken = new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue markPriceStreamRaw( - MarkPriceStreamRequest markPriceStreamRequest) throws ApiException { - markPriceStreamValidateBeforeCall(markPriceStreamRequest); - - String methodName = - "/@markPrice@" - .substring(1) - .replace( - "", - markPriceStreamRequest.getId() != null - ? markPriceStreamRequest.getId().toString() - : "") - .replace( - "", - markPriceStreamRequest.getSymbol() != null - ? markPriceStreamRequest.getSymbol().toString() - : "") - .replace( - "", - markPriceStreamRequest.getUpdateSpeed() != null - ? markPriceStreamRequest.getUpdateSpeed().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void markPriceStreamValidateBeforeCall(MarkPriceStreamRequest markPriceStreamRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(markPriceStreamRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Partial Book Depth Streams Top **<levels\\>** bids and asks, Valid **<levels\\>** - * are 5, 10, or 20. Update Speed: 250ms, 500ms or 100ms - * - * @param partialBookDepthStreamsRequest (required) - * @return PartialBookDepthStreamsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Partial Book Depth Streams -
- * - * @see Partial - * Book Depth Streams Documentation - */ - public StreamBlockingQueueWrapper partialBookDepthStreams( - PartialBookDepthStreamsRequest partialBookDepthStreamsRequest) throws ApiException { - StreamBlockingQueue queue = - partialBookDepthStreamsRaw(partialBookDepthStreamsRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue partialBookDepthStreamsRaw( - PartialBookDepthStreamsRequest partialBookDepthStreamsRequest) throws ApiException { - partialBookDepthStreamsValidateBeforeCall(partialBookDepthStreamsRequest); - - String methodName = - "/@depth@" - .substring(1) - .replace( - "", - partialBookDepthStreamsRequest.getId() != null - ? partialBookDepthStreamsRequest.getId().toString() - : "") - .replace( - "", - partialBookDepthStreamsRequest.getSymbol() != null - ? partialBookDepthStreamsRequest.getSymbol().toString() - : "") - .replace( - "", - partialBookDepthStreamsRequest.getLevels() != null - ? partialBookDepthStreamsRequest.getLevels().toString() - : "") - .replace( - "", - partialBookDepthStreamsRequest.getUpdateSpeed() != null - ? partialBookDepthStreamsRequest.getUpdateSpeed().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void partialBookDepthStreamsValidateBeforeCall( - PartialBookDepthStreamsRequest partialBookDepthStreamsRequest) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(partialBookDepthStreamsRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - public String getRequestID() { - return UUID.randomUUID().toString(); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AbstractOpenApiSchema.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AbstractOpenApiSchema.java index c14324b2a..5718d2dbf 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AbstractOpenApiSchema.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AbstractOpenApiSchema.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -18,7 +18,7 @@ /** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountConfigUpdate.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountConfigUpdate.java index 06f0e387e..419b5d4a9 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountConfigUpdate.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountConfigUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** AccountConfigUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountConfigUpdate extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -66,7 +66,7 @@ public AccountConfigUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -85,7 +85,7 @@ public AccountConfigUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountConfigUpdateAc.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountConfigUpdateAc.java index 874689da0..8b5c1c595 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountConfigUpdateAc.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountConfigUpdateAc.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountConfigUpdateAc */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountConfigUpdateAc extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -59,7 +59,7 @@ public AccountConfigUpdateAc sLowerCase(@jakarta.annotation.Nullable String sLow } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -78,7 +78,7 @@ public AccountConfigUpdateAc lLowerCase(@jakarta.annotation.Nullable Long lLower } /** - * Get lLowerCase + * Leverage * * @return lLowerCase */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdate.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdate.java index 4ca186ade..c5adf994b 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdate.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** AccountUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountUpdate extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -72,7 +72,7 @@ public AccountUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -91,7 +91,7 @@ public AccountUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction * * @return T */ @@ -110,7 +110,7 @@ public AccountUpdate iLowerCase(@jakarta.annotation.Nullable String iLowerCase) } /** - * Get iLowerCase + * Account Alias * * @return iLowerCase */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateA.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateA.java index 4dc09f3c1..005444ace 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateA.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateA.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,10 +38,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** AccountUpdateA */ +/** Update Data */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountUpdateA extends BaseDTO { public static final String SERIALIZED_NAME_M_LOWER_CASE = "m"; @@ -69,7 +69,7 @@ public AccountUpdateA mLowerCase(@jakarta.annotation.Nullable String mLowerCase) } /** - * Get mLowerCase + * Event reason type * * @return mLowerCase */ @@ -96,7 +96,7 @@ public AccountUpdateA addBItem(AccountUpdateABInner BItem) { } /** - * Get B + * Balances * * @return B */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateABInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateABInner.java index acd6a8891..913bd43f6 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateABInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateABInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountUpdateABInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountUpdateABInner extends BaseDTO { public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; @@ -71,7 +71,7 @@ public AccountUpdateABInner aLowerCase(@jakarta.annotation.Nullable String aLowe } /** - * Get aLowerCase + * Asset * * @return aLowerCase */ @@ -90,7 +90,7 @@ public AccountUpdateABInner wb(@jakarta.annotation.Nullable String wb) { } /** - * Get wb + * Wallet Balance * * @return wb */ @@ -109,7 +109,7 @@ public AccountUpdateABInner cw(@jakarta.annotation.Nullable String cw) { } /** - * Get cw + * Cross Wallet Balance * * @return cw */ @@ -128,7 +128,7 @@ public AccountUpdateABInner bc(@jakarta.annotation.Nullable String bc) { } /** - * Get bc + * Balance Change except PnL and Commission * * @return bc */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateAPInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateAPInner.java index e99ebd1d7..2cfe0d131 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateAPInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateAPInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountUpdateAPInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountUpdateAPInner extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -101,7 +101,7 @@ public AccountUpdateAPInner sLowerCase(@jakarta.annotation.Nullable String sLowe } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -120,7 +120,7 @@ public AccountUpdateAPInner pa(@jakarta.annotation.Nullable String pa) { } /** - * Get pa + * Position Amount * * @return pa */ @@ -139,7 +139,7 @@ public AccountUpdateAPInner ep(@jakarta.annotation.Nullable String ep) { } /** - * Get ep + * Entry Price * * @return ep */ @@ -158,7 +158,7 @@ public AccountUpdateAPInner bep(@jakarta.annotation.Nullable String bep) { } /** - * Get bep + * Break-Even Price * * @return bep */ @@ -177,7 +177,7 @@ public AccountUpdateAPInner cr(@jakarta.annotation.Nullable String cr) { } /** - * Get cr + * (Pre-fee) Accumulated Realized * * @return cr */ @@ -196,7 +196,7 @@ public AccountUpdateAPInner up(@jakarta.annotation.Nullable String up) { } /** - * Get up + * Unrealized PnL * * @return up */ @@ -215,7 +215,7 @@ public AccountUpdateAPInner mt(@jakarta.annotation.Nullable String mt) { } /** - * Get mt + * Margin Type * * @return mt */ @@ -234,7 +234,7 @@ public AccountUpdateAPInner iw(@jakarta.annotation.Nullable String iw) { } /** - * Get iw + * Isolated Wallet (if isolated position) * * @return iw */ @@ -253,7 +253,7 @@ public AccountUpdateAPInner ps(@jakarta.annotation.Nullable String ps) { } /** - * Get ps + * Position Side * * @return ps */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AggregateTradeStreamsRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AggregateTradeStreamsRequest.java index 66da3484c..a05d04c2a 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AggregateTradeStreamsRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AggregateTradeStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AggregateTradeStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AggregateTradeStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,7 +48,7 @@ public class AggregateTradeStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public AggregateTradeStreamsRequest() {} @@ -59,7 +59,7 @@ public AggregateTradeStreamsRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -72,23 +72,22 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public AggregateTradeStreamsRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public AggregateTradeStreamsRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -185,7 +184,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -218,16 +216,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AggregateTradeStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -237,7 +225,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AggregateTradeStreamsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AggregateTradeStreamsResponse.java index d6254d49e..77f4b7d1b 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AggregateTradeStreamsResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AggregateTradeStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AggregateTradeStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AggregateTradeStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -99,6 +99,12 @@ public class AggregateTradeStreamsResponse extends BaseDTO { @jakarta.annotation.Nullable private Boolean mLowerCase; + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public AggregateTradeStreamsResponse() {} public AggregateTradeStreamsResponse eLowerCase( @@ -108,7 +114,7 @@ public AggregateTradeStreamsResponse eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -127,7 +133,7 @@ public AggregateTradeStreamsResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -146,7 +152,7 @@ public AggregateTradeStreamsResponse aLowerCase(@jakarta.annotation.Nullable Lon } /** - * Get aLowerCase + * Aggregate trade ID * * @return aLowerCase */ @@ -166,7 +172,7 @@ public AggregateTradeStreamsResponse sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -186,7 +192,7 @@ public AggregateTradeStreamsResponse pLowerCase( } /** - * Get pLowerCase + * Price * * @return pLowerCase */ @@ -206,7 +212,7 @@ public AggregateTradeStreamsResponse qLowerCase( } /** - * Get qLowerCase + * Quantity * * @return qLowerCase */ @@ -225,7 +231,7 @@ public AggregateTradeStreamsResponse fLowerCase(@jakarta.annotation.Nullable Lon } /** - * Get fLowerCase + * First trade ID * * @return fLowerCase */ @@ -244,7 +250,7 @@ public AggregateTradeStreamsResponse lLowerCase(@jakarta.annotation.Nullable Lon } /** - * Get lLowerCase + * Last trade ID * * @return lLowerCase */ @@ -263,7 +269,7 @@ public AggregateTradeStreamsResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Trade time * * @return T */ @@ -283,7 +289,7 @@ public AggregateTradeStreamsResponse mLowerCase( } /** - * Get mLowerCase + * Is the buyer the market maker? * * @return mLowerCase */ @@ -296,6 +302,25 @@ public void setmLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { this.mLowerCase = mLowerCase; } + public AggregateTradeStreamsResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -315,7 +340,8 @@ public boolean equals(Object o) { && Objects.equals(this.fLowerCase, aggregateTradeStreamsResponse.fLowerCase) && Objects.equals(this.lLowerCase, aggregateTradeStreamsResponse.lLowerCase) && Objects.equals(this.T, aggregateTradeStreamsResponse.T) - && Objects.equals(this.mLowerCase, aggregateTradeStreamsResponse.mLowerCase); + && Objects.equals(this.mLowerCase, aggregateTradeStreamsResponse.mLowerCase) + && Objects.equals(this.st, aggregateTradeStreamsResponse.st); } @Override @@ -330,7 +356,8 @@ public int hashCode() { fLowerCase, lLowerCase, T, - mLowerCase); + mLowerCase, + st); } @Override @@ -347,6 +374,7 @@ public String toString() { sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); sb.append(" T: ").append(toIndentedString(T)).append("\n"); sb.append(" mLowerCase: ").append(toIndentedString(mLowerCase)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -405,6 +433,11 @@ public String toUrlQueryString() { String mLowerCaseValueAsString = mLowerCaseValue.toString(); valMap.put("mLowerCase", mLowerCaseValueAsString); } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -456,6 +489,10 @@ public Map toMap() { if (mLowerCaseValue != null) { valMap.put("mLowerCase", mLowerCaseValue); } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -492,6 +529,7 @@ private String toIndentedString(Object o) { openapiFields.add("l"); openapiFields.add("T"); openapiFields.add("m"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllBookTickersStreamRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllBookTickersStreamRequest.java index dc1c74156..b46779600 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllBookTickersStreamRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllBookTickersStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AllBookTickersStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllBookTickersStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -53,7 +53,7 @@ public AllBookTickersStreamRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Unique WebSocket request ID. * * @return id */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllBookTickersStreamResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllBookTickersStreamResponse.java index f256e9aaa..5c82c913d 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllBookTickersStreamResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllBookTickersStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AllBookTickersStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllBookTickersStreamResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -57,12 +57,6 @@ public class AllBookTickersStreamResponse extends BaseDTO { @jakarta.annotation.Nullable private String sLowerCase; - public static final String SERIALIZED_NAME_PS = "ps"; - - @SerializedName(SERIALIZED_NAME_PS) - @jakarta.annotation.Nullable - private String ps; - public static final String SERIALIZED_NAME_B_LOWER_CASE = "b"; @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) @@ -99,6 +93,18 @@ public class AllBookTickersStreamResponse extends BaseDTO { @jakarta.annotation.Nullable private Long E; + public static final String SERIALIZED_NAME_PS = "ps"; + + @SerializedName(SERIALIZED_NAME_PS) + @jakarta.annotation.Nullable + private String ps; + + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public AllBookTickersStreamResponse() {} public AllBookTickersStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { @@ -107,7 +113,7 @@ public AllBookTickersStreamResponse eLowerCase(@jakarta.annotation.Nullable Stri } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -126,7 +132,7 @@ public AllBookTickersStreamResponse uLowerCase(@jakarta.annotation.Nullable Long } /** - * Get uLowerCase + * Order book update Id * * @return uLowerCase */ @@ -145,7 +151,7 @@ public AllBookTickersStreamResponse sLowerCase(@jakarta.annotation.Nullable Stri } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -158,32 +164,13 @@ public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { this.sLowerCase = sLowerCase; } - public AllBookTickersStreamResponse ps(@jakarta.annotation.Nullable String ps) { - this.ps = ps; - return this; - } - - /** - * Get ps - * - * @return ps - */ - @jakarta.annotation.Nullable - public String getPs() { - return ps; - } - - public void setPs(@jakarta.annotation.Nullable String ps) { - this.ps = ps; - } - public AllBookTickersStreamResponse bLowerCase(@jakarta.annotation.Nullable String bLowerCase) { this.bLowerCase = bLowerCase; return this; } /** - * Get bLowerCase + * Best bid price * * @return bLowerCase */ @@ -202,7 +189,7 @@ public AllBookTickersStreamResponse B(@jakarta.annotation.Nullable String B) { } /** - * Get B + * Best bid qty * * @return B */ @@ -221,7 +208,7 @@ public AllBookTickersStreamResponse aLowerCase(@jakarta.annotation.Nullable Stri } /** - * Get aLowerCase + * Best ask price * * @return aLowerCase */ @@ -240,7 +227,7 @@ public AllBookTickersStreamResponse A(@jakarta.annotation.Nullable String A) { } /** - * Get A + * Best ask qty * * @return A */ @@ -259,7 +246,7 @@ public AllBookTickersStreamResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction time * * @return T */ @@ -278,7 +265,7 @@ public AllBookTickersStreamResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -291,6 +278,44 @@ public void setE(@jakarta.annotation.Nullable Long E) { this.E = E; } + public AllBookTickersStreamResponse ps(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + return this; + } + + /** + * Pair + * + * @return ps + */ + @jakarta.annotation.Nullable + public String getPs() { + return ps; + } + + public void setPs(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + } + + public AllBookTickersStreamResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -304,19 +329,20 @@ public boolean equals(Object o) { return Objects.equals(this.eLowerCase, allBookTickersStreamResponse.eLowerCase) && Objects.equals(this.uLowerCase, allBookTickersStreamResponse.uLowerCase) && Objects.equals(this.sLowerCase, allBookTickersStreamResponse.sLowerCase) - && Objects.equals(this.ps, allBookTickersStreamResponse.ps) && Objects.equals(this.bLowerCase, allBookTickersStreamResponse.bLowerCase) && Objects.equals(this.B, allBookTickersStreamResponse.B) && Objects.equals(this.aLowerCase, allBookTickersStreamResponse.aLowerCase) && Objects.equals(this.A, allBookTickersStreamResponse.A) && Objects.equals(this.T, allBookTickersStreamResponse.T) - && Objects.equals(this.E, allBookTickersStreamResponse.E); + && Objects.equals(this.E, allBookTickersStreamResponse.E) + && Objects.equals(this.ps, allBookTickersStreamResponse.ps) + && Objects.equals(this.st, allBookTickersStreamResponse.st); } @Override public int hashCode() { return Objects.hash( - eLowerCase, uLowerCase, sLowerCase, ps, bLowerCase, B, aLowerCase, A, T, E); + eLowerCase, uLowerCase, sLowerCase, bLowerCase, B, aLowerCase, A, T, E, ps, st); } @Override @@ -326,13 +352,14 @@ public String toString() { sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); - sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); sb.append(" B: ").append(toIndentedString(B)).append("\n"); sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); sb.append(" A: ").append(toIndentedString(A)).append("\n"); sb.append(" T: ").append(toIndentedString(T)).append("\n"); sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -356,11 +383,6 @@ public String toUrlQueryString() { String sLowerCaseValueAsString = sLowerCaseValue.toString(); valMap.put("sLowerCase", sLowerCaseValueAsString); } - String psValue = getPs(); - if (psValue != null) { - String psValueAsString = psValue.toString(); - valMap.put("ps", psValueAsString); - } String bLowerCaseValue = getbLowerCase(); if (bLowerCaseValue != null) { String bLowerCaseValueAsString = bLowerCaseValue.toString(); @@ -391,6 +413,16 @@ public String toUrlQueryString() { String EValueAsString = EValue.toString(); valMap.put("E", EValueAsString); } + String psValue = getPs(); + if (psValue != null) { + String psValueAsString = psValue.toString(); + valMap.put("ps", psValueAsString); + } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -414,10 +446,6 @@ public Map toMap() { if (sLowerCaseValue != null) { valMap.put("sLowerCase", sLowerCaseValue); } - Object psValue = getPs(); - if (psValue != null) { - valMap.put("ps", psValue); - } Object bLowerCaseValue = getbLowerCase(); if (bLowerCaseValue != null) { valMap.put("bLowerCase", bLowerCaseValue); @@ -442,6 +470,14 @@ public Map toMap() { if (EValue != null) { valMap.put("E", EValue); } + Object psValue = getPs(); + if (psValue != null) { + valMap.put("ps", psValue); + } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -471,13 +507,14 @@ private String toIndentedString(Object o) { openapiFields.add("e"); openapiFields.add("u"); openapiFields.add("s"); - openapiFields.add("ps"); openapiFields.add("b"); openapiFields.add("B"); openapiFields.add("a"); openapiFields.add("A"); openapiFields.add("T"); openapiFields.add("E"); + openapiFields.add("ps"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -530,14 +567,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("s").toString())); } - if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) - && !jsonObj.get("ps").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ps` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("ps").toString())); - } if ((jsonObj.get("b") != null && !jsonObj.get("b").isJsonNull()) && !jsonObj.get("b").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -570,6 +599,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("A").toString())); } + if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) + && !jsonObj.get("ps").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ps` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ps").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsRequest.java index 0391c14d9..9ec750de9 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AllMarketLiquidationOrderStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketLiquidationOrderStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -53,7 +53,7 @@ public AllMarketLiquidationOrderStreamsRequest id(@jakarta.annotation.Nullable S } /** - * Get id + * Unique WebSocket request ID. * * @return id */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsResponse.java index 329b9b88f..088bf09bb 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** AllMarketLiquidationOrderStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketLiquidationOrderStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -58,6 +58,12 @@ public class AllMarketLiquidationOrderStreamsResponse extends BaseDTO { @jakarta.annotation.Nullable private AllMarketLiquidationOrderStreamsResponseO oLowerCase; + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public AllMarketLiquidationOrderStreamsResponse() {} public AllMarketLiquidationOrderStreamsResponse eLowerCase( @@ -67,7 +73,7 @@ public AllMarketLiquidationOrderStreamsResponse eLowerCase( } /** - * Get eLowerCase + * Event Type * * @return eLowerCase */ @@ -86,7 +92,7 @@ public AllMarketLiquidationOrderStreamsResponse E(@jakarta.annotation.Nullable L } /** - * Get E + * Event Time * * @return E */ @@ -121,6 +127,25 @@ public void setoLowerCase( this.oLowerCase = oLowerCase; } + public AllMarketLiquidationOrderStreamsResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -134,12 +159,13 @@ public boolean equals(Object o) { return Objects.equals(this.eLowerCase, allMarketLiquidationOrderStreamsResponse.eLowerCase) && Objects.equals(this.E, allMarketLiquidationOrderStreamsResponse.E) && Objects.equals( - this.oLowerCase, allMarketLiquidationOrderStreamsResponse.oLowerCase); + this.oLowerCase, allMarketLiquidationOrderStreamsResponse.oLowerCase) + && Objects.equals(this.st, allMarketLiquidationOrderStreamsResponse.st); } @Override public int hashCode() { - return Objects.hash(eLowerCase, E, oLowerCase); + return Objects.hash(eLowerCase, E, oLowerCase, st); } @Override @@ -149,6 +175,7 @@ public String toString() { sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); sb.append(" E: ").append(toIndentedString(E)).append("\n"); sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -172,6 +199,11 @@ public String toUrlQueryString() { String oLowerCaseValueAsString = JSON.getGson().toJson(oLowerCaseValue); valMap.put("oLowerCase", oLowerCaseValueAsString); } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -195,6 +227,10 @@ public Map toMap() { if (oLowerCaseValue != null) { valMap.put("oLowerCase", oLowerCaseValue); } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -224,6 +260,7 @@ private String toIndentedString(Object o) { openapiFields.add("e"); openapiFields.add("E"); openapiFields.add("o"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsResponseO.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsResponseO.java index 4d1d8e75f..8e5965deb 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsResponseO.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsResponseO.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** AllMarketLiquidationOrderStreamsResponseO */ +/** Order Type */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketLiquidationOrderStreamsResponseO extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -120,7 +120,7 @@ public AllMarketLiquidationOrderStreamsResponseO sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -139,7 +139,7 @@ public AllMarketLiquidationOrderStreamsResponseO ps(@jakarta.annotation.Nullable } /** - * Get ps + * Pair * * @return ps */ @@ -158,7 +158,7 @@ public AllMarketLiquidationOrderStreamsResponseO S(@jakarta.annotation.Nullable } /** - * Get S + * Side * * @return S */ @@ -178,7 +178,7 @@ public AllMarketLiquidationOrderStreamsResponseO oLowerCase( } /** - * Get oLowerCase + * Order Type * * @return oLowerCase */ @@ -198,7 +198,7 @@ public AllMarketLiquidationOrderStreamsResponseO fLowerCase( } /** - * Get fLowerCase + * Time in Force * * @return fLowerCase */ @@ -218,7 +218,7 @@ public AllMarketLiquidationOrderStreamsResponseO qLowerCase( } /** - * Get qLowerCase + * Original Quantity * * @return qLowerCase */ @@ -238,7 +238,7 @@ public AllMarketLiquidationOrderStreamsResponseO pLowerCase( } /** - * Get pLowerCase + * Price * * @return pLowerCase */ @@ -257,7 +257,7 @@ public AllMarketLiquidationOrderStreamsResponseO ap(@jakarta.annotation.Nullable } /** - * Get ap + * Average Price * * @return ap */ @@ -276,7 +276,7 @@ public AllMarketLiquidationOrderStreamsResponseO X(@jakarta.annotation.Nullable } /** - * Get X + * Order Status * * @return X */ @@ -296,7 +296,7 @@ public AllMarketLiquidationOrderStreamsResponseO lLowerCase( } /** - * Get lLowerCase + * Order Last Filled Quantity * * @return lLowerCase */ @@ -316,7 +316,7 @@ public AllMarketLiquidationOrderStreamsResponseO zLowerCase( } /** - * Get zLowerCase + * Order Filled Accumulated Quantity * * @return zLowerCase */ @@ -335,7 +335,7 @@ public AllMarketLiquidationOrderStreamsResponseO T(@jakarta.annotation.Nullable } /** - * Get T + * Order Trade Time * * @return T */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketMiniTickersStreamRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketMiniTickersStreamRequest.java index dca8dbe8a..d7ddfe602 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketMiniTickersStreamRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketMiniTickersStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AllMarketMiniTickersStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketMiniTickersStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -53,7 +53,7 @@ public AllMarketMiniTickersStreamRequest id(@jakarta.annotation.Nullable String } /** - * Get id + * Unique WebSocket request ID. * * @return id */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketMiniTickersStreamResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketMiniTickersStreamResponse.java index 9574b67e9..e33c7f492 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketMiniTickersStreamResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketMiniTickersStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** AllMarketMiniTickersStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketMiniTickersStreamResponse extends ArrayList { public AllMarketMiniTickersStreamResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketMiniTickersStreamResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketMiniTickersStreamResponseInner.java index 591a6b1be..a831d5e11 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketMiniTickersStreamResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketMiniTickersStreamResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AllMarketMiniTickersStreamResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketMiniTickersStreamResponseInner extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -99,6 +99,12 @@ public class AllMarketMiniTickersStreamResponseInner extends BaseDTO { @jakarta.annotation.Nullable private String qLowerCase; + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public AllMarketMiniTickersStreamResponseInner() {} public AllMarketMiniTickersStreamResponseInner eLowerCase( @@ -108,7 +114,7 @@ public AllMarketMiniTickersStreamResponseInner eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -127,7 +133,7 @@ public AllMarketMiniTickersStreamResponseInner E(@jakarta.annotation.Nullable Lo } /** - * Get E + * Event time * * @return E */ @@ -147,7 +153,7 @@ public AllMarketMiniTickersStreamResponseInner sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -166,7 +172,7 @@ public AllMarketMiniTickersStreamResponseInner ps(@jakarta.annotation.Nullable S } /** - * Get ps + * Pair * * @return ps */ @@ -186,7 +192,7 @@ public AllMarketMiniTickersStreamResponseInner cLowerCase( } /** - * Get cLowerCase + * Close price * * @return cLowerCase */ @@ -206,7 +212,7 @@ public AllMarketMiniTickersStreamResponseInner oLowerCase( } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -226,7 +232,7 @@ public AllMarketMiniTickersStreamResponseInner hLowerCase( } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -246,7 +252,7 @@ public AllMarketMiniTickersStreamResponseInner lLowerCase( } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -266,7 +272,7 @@ public AllMarketMiniTickersStreamResponseInner vLowerCase( } /** - * Get vLowerCase + * Total traded volume * * @return vLowerCase */ @@ -286,7 +292,7 @@ public AllMarketMiniTickersStreamResponseInner qLowerCase( } /** - * Get qLowerCase + * Total traded base asset volume * * @return qLowerCase */ @@ -299,6 +305,25 @@ public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { this.qLowerCase = qLowerCase; } + public AllMarketMiniTickersStreamResponseInner st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -325,7 +350,8 @@ public boolean equals(Object o) { && Objects.equals( this.vLowerCase, allMarketMiniTickersStreamResponseInner.vLowerCase) && Objects.equals( - this.qLowerCase, allMarketMiniTickersStreamResponseInner.qLowerCase); + this.qLowerCase, allMarketMiniTickersStreamResponseInner.qLowerCase) + && Objects.equals(this.st, allMarketMiniTickersStreamResponseInner.st); } @Override @@ -340,7 +366,8 @@ public int hashCode() { hLowerCase, lLowerCase, vLowerCase, - qLowerCase); + qLowerCase, + st); } @Override @@ -357,6 +384,7 @@ public String toString() { sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -415,6 +443,11 @@ public String toUrlQueryString() { String qLowerCaseValueAsString = qLowerCaseValue.toString(); valMap.put("qLowerCase", qLowerCaseValueAsString); } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -466,6 +499,10 @@ public Map toMap() { if (qLowerCaseValue != null) { valMap.put("qLowerCase", qLowerCaseValue); } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -502,6 +539,7 @@ private String toIndentedString(Object o) { openapiFields.add("l"); openapiFields.add("v"); openapiFields.add("q"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketTickersStreamsRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketTickersStreamsRequest.java index ede78e637..9f98696c4 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketTickersStreamsRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketTickersStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AllMarketTickersStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketTickersStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -53,7 +53,7 @@ public AllMarketTickersStreamsRequest id(@jakarta.annotation.Nullable String id) } /** - * Get id + * Unique WebSocket request ID. * * @return id */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketTickersStreamsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketTickersStreamsResponse.java index a01b7ff78..dee122af3 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketTickersStreamsResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketTickersStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** AllMarketTickersStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketTickersStreamsResponse extends ArrayList { public AllMarketTickersStreamsResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketTickersStreamsResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketTickersStreamsResponseInner.java index 122042394..86bdc5ec4 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketTickersStreamsResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AllMarketTickersStreamsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AllMarketTickersStreamsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketTickersStreamsResponseInner extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -57,12 +57,6 @@ public class AllMarketTickersStreamsResponseInner extends BaseDTO { @jakarta.annotation.Nullable private String sLowerCase; - public static final String SERIALIZED_NAME_PS = "ps"; - - @SerializedName(SERIALIZED_NAME_PS) - @jakarta.annotation.Nullable - private String ps; - public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) @@ -153,6 +147,18 @@ public class AllMarketTickersStreamsResponseInner extends BaseDTO { @jakarta.annotation.Nullable private Long nLowerCase; + public static final String SERIALIZED_NAME_PS = "ps"; + + @SerializedName(SERIALIZED_NAME_PS) + @jakarta.annotation.Nullable + private String ps; + + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public AllMarketTickersStreamsResponseInner() {} public AllMarketTickersStreamsResponseInner eLowerCase( @@ -162,7 +168,7 @@ public AllMarketTickersStreamsResponseInner eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -181,7 +187,7 @@ public AllMarketTickersStreamsResponseInner E(@jakarta.annotation.Nullable Long } /** - * Get E + * Event time * * @return E */ @@ -201,7 +207,7 @@ public AllMarketTickersStreamsResponseInner sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -214,25 +220,6 @@ public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { this.sLowerCase = sLowerCase; } - public AllMarketTickersStreamsResponseInner ps(@jakarta.annotation.Nullable String ps) { - this.ps = ps; - return this; - } - - /** - * Get ps - * - * @return ps - */ - @jakarta.annotation.Nullable - public String getPs() { - return ps; - } - - public void setPs(@jakarta.annotation.Nullable String ps) { - this.ps = ps; - } - public AllMarketTickersStreamsResponseInner pLowerCase( @jakarta.annotation.Nullable String pLowerCase) { this.pLowerCase = pLowerCase; @@ -240,7 +227,7 @@ public AllMarketTickersStreamsResponseInner pLowerCase( } /** - * Get pLowerCase + * Price change * * @return pLowerCase */ @@ -259,7 +246,7 @@ public AllMarketTickersStreamsResponseInner P(@jakarta.annotation.Nullable Strin } /** - * Get P + * Price change percent * * @return P */ @@ -279,7 +266,7 @@ public AllMarketTickersStreamsResponseInner wLowerCase( } /** - * Get wLowerCase + * Weighted average price * * @return wLowerCase */ @@ -299,7 +286,7 @@ public AllMarketTickersStreamsResponseInner cLowerCase( } /** - * Get cLowerCase + * Last price * * @return cLowerCase */ @@ -318,7 +305,7 @@ public AllMarketTickersStreamsResponseInner Q(@jakarta.annotation.Nullable Strin } /** - * Get Q + * Last quantity * * @return Q */ @@ -338,7 +325,7 @@ public AllMarketTickersStreamsResponseInner oLowerCase( } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -358,7 +345,7 @@ public AllMarketTickersStreamsResponseInner hLowerCase( } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -378,7 +365,7 @@ public AllMarketTickersStreamsResponseInner lLowerCase( } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -398,7 +385,7 @@ public AllMarketTickersStreamsResponseInner vLowerCase( } /** - * Get vLowerCase + * Total traded volume * * @return vLowerCase */ @@ -418,7 +405,7 @@ public AllMarketTickersStreamsResponseInner qLowerCase( } /** - * Get qLowerCase + * Total traded base asset volume * * @return qLowerCase */ @@ -437,7 +424,7 @@ public AllMarketTickersStreamsResponseInner O(@jakarta.annotation.Nullable Long } /** - * Get O + * Statistics open time * * @return O */ @@ -456,7 +443,7 @@ public AllMarketTickersStreamsResponseInner C(@jakarta.annotation.Nullable Long } /** - * Get C + * Statistics close time * * @return C */ @@ -475,7 +462,7 @@ public AllMarketTickersStreamsResponseInner F(@jakarta.annotation.Nullable Long } /** - * Get F + * First trade ID * * @return F */ @@ -494,7 +481,7 @@ public AllMarketTickersStreamsResponseInner L(@jakarta.annotation.Nullable Long } /** - * Get L + * Last trade Id * * @return L */ @@ -514,7 +501,7 @@ public AllMarketTickersStreamsResponseInner nLowerCase( } /** - * Get nLowerCase + * Total number of trades * * @return nLowerCase */ @@ -527,6 +514,44 @@ public void setnLowerCase(@jakarta.annotation.Nullable Long nLowerCase) { this.nLowerCase = nLowerCase; } + public AllMarketTickersStreamsResponseInner ps(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + return this; + } + + /** + * Pair + * + * @return ps + */ + @jakarta.annotation.Nullable + public String getPs() { + return ps; + } + + public void setPs(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + } + + public AllMarketTickersStreamsResponseInner st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -540,7 +565,6 @@ public boolean equals(Object o) { return Objects.equals(this.eLowerCase, allMarketTickersStreamsResponseInner.eLowerCase) && Objects.equals(this.E, allMarketTickersStreamsResponseInner.E) && Objects.equals(this.sLowerCase, allMarketTickersStreamsResponseInner.sLowerCase) - && Objects.equals(this.ps, allMarketTickersStreamsResponseInner.ps) && Objects.equals(this.pLowerCase, allMarketTickersStreamsResponseInner.pLowerCase) && Objects.equals(this.P, allMarketTickersStreamsResponseInner.P) && Objects.equals(this.wLowerCase, allMarketTickersStreamsResponseInner.wLowerCase) @@ -555,7 +579,9 @@ public boolean equals(Object o) { && Objects.equals(this.C, allMarketTickersStreamsResponseInner.C) && Objects.equals(this.F, allMarketTickersStreamsResponseInner.F) && Objects.equals(this.L, allMarketTickersStreamsResponseInner.L) - && Objects.equals(this.nLowerCase, allMarketTickersStreamsResponseInner.nLowerCase); + && Objects.equals(this.nLowerCase, allMarketTickersStreamsResponseInner.nLowerCase) + && Objects.equals(this.ps, allMarketTickersStreamsResponseInner.ps) + && Objects.equals(this.st, allMarketTickersStreamsResponseInner.st); } @Override @@ -564,7 +590,6 @@ public int hashCode() { eLowerCase, E, sLowerCase, - ps, pLowerCase, P, wLowerCase, @@ -579,7 +604,9 @@ public int hashCode() { C, F, L, - nLowerCase); + nLowerCase, + ps, + st); } @Override @@ -589,7 +616,6 @@ public String toString() { sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); sb.append(" E: ").append(toIndentedString(E)).append("\n"); sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); - sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); sb.append(" P: ").append(toIndentedString(P)).append("\n"); sb.append(" wLowerCase: ").append(toIndentedString(wLowerCase)).append("\n"); @@ -605,6 +631,8 @@ public String toString() { sb.append(" F: ").append(toIndentedString(F)).append("\n"); sb.append(" L: ").append(toIndentedString(L)).append("\n"); sb.append(" nLowerCase: ").append(toIndentedString(nLowerCase)).append("\n"); + sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -628,11 +656,6 @@ public String toUrlQueryString() { String sLowerCaseValueAsString = sLowerCaseValue.toString(); valMap.put("sLowerCase", sLowerCaseValueAsString); } - String psValue = getPs(); - if (psValue != null) { - String psValueAsString = psValue.toString(); - valMap.put("ps", psValueAsString); - } String pLowerCaseValue = getpLowerCase(); if (pLowerCaseValue != null) { String pLowerCaseValueAsString = pLowerCaseValue.toString(); @@ -708,6 +731,16 @@ public String toUrlQueryString() { String nLowerCaseValueAsString = nLowerCaseValue.toString(); valMap.put("nLowerCase", nLowerCaseValueAsString); } + String psValue = getPs(); + if (psValue != null) { + String psValueAsString = psValue.toString(); + valMap.put("ps", psValueAsString); + } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -731,10 +764,6 @@ public Map toMap() { if (sLowerCaseValue != null) { valMap.put("sLowerCase", sLowerCaseValue); } - Object psValue = getPs(); - if (psValue != null) { - valMap.put("ps", psValue); - } Object pLowerCaseValue = getpLowerCase(); if (pLowerCaseValue != null) { valMap.put("pLowerCase", pLowerCaseValue); @@ -795,6 +824,14 @@ public Map toMap() { if (nLowerCaseValue != null) { valMap.put("nLowerCase", nLowerCaseValue); } + Object psValue = getPs(); + if (psValue != null) { + valMap.put("ps", psValue); + } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -824,7 +861,6 @@ private String toIndentedString(Object o) { openapiFields.add("e"); openapiFields.add("E"); openapiFields.add("s"); - openapiFields.add("ps"); openapiFields.add("p"); openapiFields.add("P"); openapiFields.add("w"); @@ -840,6 +876,8 @@ private String toIndentedString(Object o) { openapiFields.add("F"); openapiFields.add("L"); openapiFields.add("n"); + openapiFields.add("ps"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -894,14 +932,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("s").toString())); } - if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) - && !jsonObj.get("ps").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ps` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("ps").toString())); - } if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) && !jsonObj.get("p").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -982,6 +1012,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("q").toString())); } + if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) + && !jsonObj.get("ps").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ps` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ps").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsRequest.java index a8807f9d8..ef78a78ef 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** ContinuousContractKlineCandlestickStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ContinuousContractKlineCandlestickStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,20 +49,20 @@ public class ContinuousContractKlineCandlestickStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_PAIR = "pair"; @SerializedName(SERIALIZED_NAME_PAIR) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String pair; public static final String SERIALIZED_NAME_CONTRACT_TYPE = "contractType"; @SerializedName(SERIALIZED_NAME_CONTRACT_TYPE) - @jakarta.annotation.Nonnull - private String contractType; + @jakarta.annotation.Nullable + private ContractType contractType; public static final String SERIALIZED_NAME_INTERVAL = "interval"; @SerializedName(SERIALIZED_NAME_INTERVAL) - @jakarta.annotation.Nonnull - private String interval; + @jakarta.annotation.Nullable + private Interval interval; public ContinuousContractKlineCandlestickStreamsRequest() {} @@ -72,7 +73,7 @@ public ContinuousContractKlineCandlestickStreamsRequest id( } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -86,28 +87,27 @@ public void setId(@jakarta.annotation.Nullable String id) { } public ContinuousContractKlineCandlestickStreamsRequest pair( - @jakarta.annotation.Nonnull String pair) { + @jakarta.annotation.Nullable String pair) { this.pair = pair; return this; } /** - * Get pair + * The pair parameter * * @return pair */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getPair() { return pair; } - public void setPair(@jakarta.annotation.Nonnull String pair) { + public void setPair(@jakarta.annotation.Nullable String pair) { this.pair = pair; } public ContinuousContractKlineCandlestickStreamsRequest contractType( - @jakarta.annotation.Nonnull String contractType) { + @jakarta.annotation.Nullable ContractType contractType) { this.contractType = contractType; return this; } @@ -117,18 +117,18 @@ public ContinuousContractKlineCandlestickStreamsRequest contractType( * * @return contractType */ - @jakarta.annotation.Nonnull - @NotNull - public String getContractType() { + @jakarta.annotation.Nullable + @Valid + public ContractType getContractType() { return contractType; } - public void setContractType(@jakarta.annotation.Nonnull String contractType) { + public void setContractType(@jakarta.annotation.Nullable ContractType contractType) { this.contractType = contractType; } public ContinuousContractKlineCandlestickStreamsRequest interval( - @jakarta.annotation.Nonnull String interval) { + @jakarta.annotation.Nullable Interval interval) { this.interval = interval; return this; } @@ -138,13 +138,13 @@ public ContinuousContractKlineCandlestickStreamsRequest interval( * * @return interval */ - @jakarta.annotation.Nonnull - @NotNull - public String getInterval() { + @jakarta.annotation.Nullable + @Valid + public Interval getInterval() { return interval; } - public void setInterval(@jakarta.annotation.Nonnull String interval) { + public void setInterval(@jakarta.annotation.Nullable Interval interval) { this.interval = interval; } @@ -199,12 +199,12 @@ public String toUrlQueryString() { String pairValueAsString = pairValue.toString(); valMap.put("pair", pairValueAsString); } - String contractTypeValue = getContractType(); + ContractType contractTypeValue = getContractType(); if (contractTypeValue != null) { String contractTypeValueAsString = contractTypeValue.toString(); valMap.put("contractType", contractTypeValueAsString); } - String intervalValue = getInterval(); + Interval intervalValue = getInterval(); if (intervalValue != null) { String intervalValueAsString = intervalValue.toString(); valMap.put("interval", intervalValueAsString); @@ -269,9 +269,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pair"); - openapiRequiredFields.add("contractType"); - openapiRequiredFields.add("interval"); } /** @@ -309,17 +306,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : - ContinuousContractKlineCandlestickStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -329,26 +315,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("pair").isJsonPrimitive()) { + if ((jsonObj.get("pair") != null && !jsonObj.get("pair").isJsonNull()) + && !jsonObj.get("pair").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `pair` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("pair").toString())); } - if (!jsonObj.get("contractType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `contractType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("contractType").toString())); + // validate the optional field `contractType` + if (jsonObj.get("contractType") != null && !jsonObj.get("contractType").isJsonNull()) { + ContractType.validateJsonElement(jsonObj.get("contractType")); } - if (!jsonObj.get("interval").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `interval` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("interval").toString())); + // validate the optional field `interval` + if (jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) { + Interval.validateJsonElement(jsonObj.get("interval")); } } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsResponse.java index 6cfa17f99..bd4128e63 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** ContinuousContractKlineCandlestickStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ContinuousContractKlineCandlestickStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -79,7 +79,7 @@ public ContinuousContractKlineCandlestickStreamsResponse eLowerCase( } /** - * Get eLowerCase + * eventType * * @return eLowerCase */ @@ -99,7 +99,7 @@ public ContinuousContractKlineCandlestickStreamsResponse E( } /** - * Get E + * eventTime * * @return E */ @@ -119,7 +119,7 @@ public ContinuousContractKlineCandlestickStreamsResponse ps( } /** - * Get ps + * Pair * * @return ps */ @@ -139,7 +139,7 @@ public ContinuousContractKlineCandlestickStreamsResponse ct( } /** - * Get ct + * Contract type * * @return ct */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsResponseK.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsResponseK.java index d8198d80b..9bd92451a 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsResponseK.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsResponseK.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** ContinuousContractKlineCandlestickStreamsResponseK */ +/** Kline payload */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ContinuousContractKlineCandlestickStreamsResponseK extends BaseDTO { public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; @@ -144,7 +144,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK tLowerCase( } /** - * Get tLowerCase + * Kline start time * * @return tLowerCase */ @@ -164,7 +164,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK T( } /** - * Get T + * transactionTime * * @return T */ @@ -184,7 +184,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK iLowerCase( } /** - * Get iLowerCase + * interval * * @return iLowerCase */ @@ -204,7 +204,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK fLowerCase( } /** - * Get fLowerCase + * First update ID * * @return fLowerCase */ @@ -224,7 +224,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK L( } /** - * Get L + * Last update ID * * @return L */ @@ -244,7 +244,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK oLowerCase( } /** - * Get oLowerCase + * openPrice * * @return oLowerCase */ @@ -264,7 +264,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK cLowerCase( } /** - * Get cLowerCase + * closePrice * * @return cLowerCase */ @@ -284,7 +284,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK hLowerCase( } /** - * Get hLowerCase + * highPrice * * @return hLowerCase */ @@ -304,7 +304,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK lLowerCase( } /** - * Get lLowerCase + * lowPrice * * @return lLowerCase */ @@ -324,7 +324,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK vLowerCase( } /** - * Get vLowerCase + * volume * * @return vLowerCase */ @@ -344,7 +344,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK nLowerCase( } /** - * Get nLowerCase + * tradeNum * * @return nLowerCase */ @@ -364,7 +364,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK xLowerCase( } /** - * Get xLowerCase + * Is this kline closed? * * @return xLowerCase */ @@ -384,7 +384,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK qLowerCase( } /** - * Get qLowerCase + * quoteVolume * * @return qLowerCase */ @@ -404,7 +404,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK V( } /** - * Get V + * Taker buy volume * * @return V */ @@ -424,7 +424,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK Q( } /** - * Get Q + * lastTradeVolume * * @return Q */ @@ -444,7 +444,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK B( } /** - * Get B + * Best bid qty * * @return B */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContractInfoStreamRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContractInfoStreamRequest.java index de6813fa7..36c478c72 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContractInfoStreamRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContractInfoStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** ContractInfoStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ContractInfoStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -53,7 +53,7 @@ public ContractInfoStreamRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Unique WebSocket request ID. * * @return id */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContractInfoStreamResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContractInfoStreamResponse.java index 8379f1c29..52a175326 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContractInfoStreamResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContractInfoStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** ContractInfoStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ContractInfoStreamResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -97,6 +97,12 @@ public class ContractInfoStreamResponse extends BaseDTO { @jakarta.annotation.Nullable private List<@Valid ContractInfoStreamResponseBksInner> bks; + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public ContractInfoStreamResponse() {} public ContractInfoStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { @@ -105,7 +111,7 @@ public ContractInfoStreamResponse eLowerCase(@jakarta.annotation.Nullable String } /** - * Get eLowerCase + * Event Type * * @return eLowerCase */ @@ -124,7 +130,7 @@ public ContractInfoStreamResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -143,7 +149,7 @@ public ContractInfoStreamResponse sLowerCase(@jakarta.annotation.Nullable String } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -162,7 +168,7 @@ public ContractInfoStreamResponse ps(@jakarta.annotation.Nullable String ps) { } /** - * Get ps + * Pair * * @return ps */ @@ -181,7 +187,7 @@ public ContractInfoStreamResponse ct(@jakarta.annotation.Nullable String ct) { } /** - * Get ct + * Contract type * * @return ct */ @@ -200,7 +206,7 @@ public ContractInfoStreamResponse dt(@jakarta.annotation.Nullable Long dt) { } /** - * Get dt + * Delivery date time * * @return dt */ @@ -219,7 +225,7 @@ public ContractInfoStreamResponse ot(@jakarta.annotation.Nullable Long ot) { } /** - * Get ot + * onboard date time * * @return ot */ @@ -238,7 +244,7 @@ public ContractInfoStreamResponse cs(@jakarta.annotation.Nullable String cs) { } /** - * Get cs + * Contract status * * @return cs */ @@ -266,7 +272,7 @@ public ContractInfoStreamResponse addBksItem(ContractInfoStreamResponseBksInner } /** - * Get bks + * Bracket list. * * @return bks */ @@ -281,6 +287,25 @@ public void setBks( this.bks = bks; } + public ContractInfoStreamResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -298,12 +323,13 @@ public boolean equals(Object o) { && Objects.equals(this.dt, contractInfoStreamResponse.dt) && Objects.equals(this.ot, contractInfoStreamResponse.ot) && Objects.equals(this.cs, contractInfoStreamResponse.cs) - && Objects.equals(this.bks, contractInfoStreamResponse.bks); + && Objects.equals(this.bks, contractInfoStreamResponse.bks) + && Objects.equals(this.st, contractInfoStreamResponse.st); } @Override public int hashCode() { - return Objects.hash(eLowerCase, E, sLowerCase, ps, ct, dt, ot, cs, bks); + return Objects.hash(eLowerCase, E, sLowerCase, ps, ct, dt, ot, cs, bks, st); } @Override @@ -319,6 +345,7 @@ public String toString() { sb.append(" ot: ").append(toIndentedString(ot)).append("\n"); sb.append(" cs: ").append(toIndentedString(cs)).append("\n"); sb.append(" bks: ").append(toIndentedString(bks)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -372,6 +399,11 @@ public String toUrlQueryString() { String bksValueAsString = JSON.getGson().toJson(bksValue); valMap.put("bks", bksValueAsString); } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -419,6 +451,10 @@ public Map toMap() { if (bksValue != null) { valMap.put("bks", bksValue); } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -454,6 +490,7 @@ private String toIndentedString(Object o) { openapiFields.add("ot"); openapiFields.add("cs"); openapiFields.add("bks"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContractInfoStreamResponseBksInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContractInfoStreamResponseBksInner.java index 3fb6095b7..26c8bd2f1 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContractInfoStreamResponseBksInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContractInfoStreamResponseBksInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -39,7 +39,7 @@ /** ContractInfoStreamResponseBksInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ContractInfoStreamResponseBksInner extends BaseDTO { public static final String SERIALIZED_NAME_BS = "bs"; @@ -91,7 +91,7 @@ public ContractInfoStreamResponseBksInner bs(@jakarta.annotation.Nullable Long b } /** - * Get bs + * Notional bracket * * @return bs */ @@ -110,7 +110,7 @@ public ContractInfoStreamResponseBksInner bnf(@jakarta.annotation.Nullable Long } /** - * Get bnf + * Floor notional of this bracket * * @return bnf */ @@ -129,7 +129,7 @@ public ContractInfoStreamResponseBksInner bnc(@jakarta.annotation.Nullable Long } /** - * Get bnc + * Cap notional of this bracket * * @return bnc */ @@ -148,7 +148,7 @@ public ContractInfoStreamResponseBksInner mmr(@jakarta.annotation.Nullable Doubl } /** - * Get mmr + * Maintenance ratio for this bracket * * @return mmr */ @@ -168,7 +168,7 @@ public ContractInfoStreamResponseBksInner cf(@jakarta.annotation.Nullable Long c } /** - * Get cf + * Auxiliary number for quick calculation * * @return cf */ @@ -187,7 +187,7 @@ public ContractInfoStreamResponseBksInner mi(@jakarta.annotation.Nullable Long m } /** - * Get mi + * Min leverage for this bracket * * @return mi */ @@ -206,7 +206,7 @@ public ContractInfoStreamResponseBksInner ma(@jakarta.annotation.Nullable Long m } /** - * Get ma + * Max leverage for this bracket * * @return ma */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContractType.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContractType.java new file mode 100644 index 000000000..e15ecf0a6 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ContractType.java @@ -0,0 +1,75 @@ +/* + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets contractType */ +@JsonAdapter(ContractType.Adapter.class) +public enum ContractType { + perpetual("perpetual"), + + current_quarter("current_quarter"), + + next_quarter("next_quarter"); + + private String value; + + ContractType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ContractType fromValue(String value) { + for (ContractType b : ContractType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ContractType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ContractType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ContractType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ContractType.fromValue(value); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/DiffBookDepthStreamsRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/DiffBookDepthStreamsRequest.java index f69143a0d..fba3613da 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/DiffBookDepthStreamsRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/DiffBookDepthStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** DiffBookDepthStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DiffBookDepthStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,14 +49,14 @@ public class DiffBookDepthStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_UPDATE_SPEED = "updateSpeed"; @SerializedName(SERIALIZED_NAME_UPDATE_SPEED) @jakarta.annotation.Nullable - private String updateSpeed; + private UpdateSpeed updateSpeed; public DiffBookDepthStreamsRequest() {} @@ -65,7 +66,7 @@ public DiffBookDepthStreamsRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -78,28 +79,27 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public DiffBookDepthStreamsRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public DiffBookDepthStreamsRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } public DiffBookDepthStreamsRequest updateSpeed( - @jakarta.annotation.Nullable String updateSpeed) { + @jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; return this; } @@ -110,11 +110,12 @@ public DiffBookDepthStreamsRequest updateSpeed( * @return updateSpeed */ @jakarta.annotation.Nullable - public String getUpdateSpeed() { + @Valid + public UpdateSpeed getUpdateSpeed() { return updateSpeed; } - public void setUpdateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public void setUpdateSpeed(@jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; } @@ -162,7 +163,7 @@ public String toUrlQueryString() { String symbolValueAsString = symbolValue.toString(); valMap.put("symbol", symbolValueAsString); } - String updateSpeedValue = getUpdateSpeed(); + UpdateSpeed updateSpeedValue = getUpdateSpeed(); if (updateSpeedValue != null) { String updateSpeedValueAsString = updateSpeedValue.toString(); valMap.put("updateSpeed", updateSpeedValueAsString); @@ -222,7 +223,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -255,16 +255,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DiffBookDepthStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -274,20 +264,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - if ((jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) - && !jsonObj.get("updateSpeed").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `updateSpeed` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("updateSpeed").toString())); + // validate the optional field `updateSpeed` + if (jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) { + UpdateSpeed.validateJsonElement(jsonObj.get("updateSpeed")); } } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/DiffBookDepthStreamsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/DiffBookDepthStreamsResponse.java index 069ad1d72..041b7c41e 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/DiffBookDepthStreamsResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/DiffBookDepthStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** DiffBookDepthStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DiffBookDepthStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -94,13 +94,19 @@ public class DiffBookDepthStreamsResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) @jakarta.annotation.Nullable - private List bLowerCase; + private List> bLowerCase; public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) @jakarta.annotation.Nullable - private List aLowerCase; + private List> aLowerCase; + + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; public DiffBookDepthStreamsResponse() {} @@ -110,7 +116,7 @@ public DiffBookDepthStreamsResponse eLowerCase(@jakarta.annotation.Nullable Stri } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -129,7 +135,7 @@ public DiffBookDepthStreamsResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -148,7 +154,7 @@ public DiffBookDepthStreamsResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transction time * * @return T */ @@ -167,7 +173,7 @@ public DiffBookDepthStreamsResponse sLowerCase(@jakarta.annotation.Nullable Stri } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -186,7 +192,7 @@ public DiffBookDepthStreamsResponse ps(@jakarta.annotation.Nullable String ps) { } /** - * Get ps + * Pair * * @return ps */ @@ -205,7 +211,7 @@ public DiffBookDepthStreamsResponse U(@jakarta.annotation.Nullable Long U) { } /** - * Get U + * First update ID in event * * @return U */ @@ -224,7 +230,7 @@ public DiffBookDepthStreamsResponse uLowerCase(@jakarta.annotation.Nullable Long } /** - * Get uLowerCase + * Final update ID in event * * @return uLowerCase */ @@ -243,7 +249,7 @@ public DiffBookDepthStreamsResponse pu(@jakarta.annotation.Nullable Long pu) { } /** - * Get pu + * Final update Id in last stream(ie `u` in last stream) * * @return pu */ @@ -257,13 +263,12 @@ public void setPu(@jakarta.annotation.Nullable Long pu) { } public DiffBookDepthStreamsResponse bLowerCase( - @jakarta.annotation.Nullable List bLowerCase) { + @jakarta.annotation.Nullable List> bLowerCase) { this.bLowerCase = bLowerCase; return this; } - public DiffBookDepthStreamsResponse addBLowerCaseItem( - DiffBookDepthStreamsResponseBItem bLowerCaseItem) { + public DiffBookDepthStreamsResponse addBLowerCaseItem(List bLowerCaseItem) { if (this.bLowerCase == null) { this.bLowerCase = new ArrayList<>(); } @@ -272,29 +277,27 @@ public DiffBookDepthStreamsResponse addBLowerCaseItem( } /** - * Get bLowerCase + * Bids to be updated * * @return bLowerCase */ @jakarta.annotation.Nullable @Valid - public List getbLowerCase() { + public List> getbLowerCase() { return bLowerCase; } - public void setbLowerCase( - @jakarta.annotation.Nullable List bLowerCase) { + public void setbLowerCase(@jakarta.annotation.Nullable List> bLowerCase) { this.bLowerCase = bLowerCase; } public DiffBookDepthStreamsResponse aLowerCase( - @jakarta.annotation.Nullable List aLowerCase) { + @jakarta.annotation.Nullable List> aLowerCase) { this.aLowerCase = aLowerCase; return this; } - public DiffBookDepthStreamsResponse addALowerCaseItem( - DiffBookDepthStreamsResponseAItem aLowerCaseItem) { + public DiffBookDepthStreamsResponse addALowerCaseItem(List aLowerCaseItem) { if (this.aLowerCase == null) { this.aLowerCase = new ArrayList<>(); } @@ -303,21 +306,39 @@ public DiffBookDepthStreamsResponse addALowerCaseItem( } /** - * Get aLowerCase + * Asks to be updated * * @return aLowerCase */ @jakarta.annotation.Nullable @Valid - public List getaLowerCase() { + public List> getaLowerCase() { return aLowerCase; } - public void setaLowerCase( - @jakarta.annotation.Nullable List aLowerCase) { + public void setaLowerCase(@jakarta.annotation.Nullable List> aLowerCase) { this.aLowerCase = aLowerCase; } + public DiffBookDepthStreamsResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -337,13 +358,14 @@ public boolean equals(Object o) { && Objects.equals(this.uLowerCase, diffBookDepthStreamsResponse.uLowerCase) && Objects.equals(this.pu, diffBookDepthStreamsResponse.pu) && Objects.equals(this.bLowerCase, diffBookDepthStreamsResponse.bLowerCase) - && Objects.equals(this.aLowerCase, diffBookDepthStreamsResponse.aLowerCase); + && Objects.equals(this.aLowerCase, diffBookDepthStreamsResponse.aLowerCase) + && Objects.equals(this.st, diffBookDepthStreamsResponse.st); } @Override public int hashCode() { return Objects.hash( - eLowerCase, E, T, sLowerCase, ps, U, uLowerCase, pu, bLowerCase, aLowerCase); + eLowerCase, E, T, sLowerCase, ps, U, uLowerCase, pu, bLowerCase, aLowerCase, st); } @Override @@ -360,6 +382,7 @@ public String toString() { sb.append(" pu: ").append(toIndentedString(pu)).append("\n"); sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -408,16 +431,21 @@ public String toUrlQueryString() { String puValueAsString = puValue.toString(); valMap.put("pu", puValueAsString); } - List bLowerCaseValue = getbLowerCase(); + List> bLowerCaseValue = getbLowerCase(); if (bLowerCaseValue != null) { String bLowerCaseValueAsString = JSON.getGson().toJson(bLowerCaseValue); valMap.put("bLowerCase", bLowerCaseValueAsString); } - List aLowerCaseValue = getaLowerCase(); + List> aLowerCaseValue = getaLowerCase(); if (aLowerCaseValue != null) { String aLowerCaseValueAsString = JSON.getGson().toJson(aLowerCaseValue); valMap.put("aLowerCase", aLowerCaseValueAsString); } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -469,6 +497,10 @@ public Map toMap() { if (aLowerCaseValue != null) { valMap.put("aLowerCase", aLowerCaseValue); } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -505,6 +537,7 @@ private String toIndentedString(Object o) { openapiFields.add("pu"); openapiFields.add("b"); openapiFields.add("a"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/DiffBookDepthStreamsResponseAItem.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/DiffBookDepthStreamsResponseAItem.java deleted file mode 100644 index f575a5841..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/DiffBookDepthStreamsResponseAItem.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model; - -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** DiffBookDepthStreamsResponseAItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DiffBookDepthStreamsResponseAItem extends ArrayList { - public DiffBookDepthStreamsResponseAItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DiffBookDepthStreamsResponseAItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * DiffBookDepthStreamsResponseAItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DiffBookDepthStreamsResponseAItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DiffBookDepthStreamsResponseAItem is" - + " not found in the empty JSON string", - DiffBookDepthStreamsResponseAItem.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DiffBookDepthStreamsResponseAItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DiffBookDepthStreamsResponseAItem` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DiffBookDepthStreamsResponseAItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DiffBookDepthStreamsResponseAItem' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DiffBookDepthStreamsResponseAItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DiffBookDepthStreamsResponseAItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public DiffBookDepthStreamsResponseAItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DiffBookDepthStreamsResponseAItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of DiffBookDepthStreamsResponseAItem - * @throws IOException if the JSON string is invalid with respect to - * DiffBookDepthStreamsResponseAItem - */ - public static DiffBookDepthStreamsResponseAItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DiffBookDepthStreamsResponseAItem.class); - } - - /** - * Convert an instance of DiffBookDepthStreamsResponseAItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/DiffBookDepthStreamsResponseBItem.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/DiffBookDepthStreamsResponseBItem.java deleted file mode 100644 index 4c7adcc57..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/DiffBookDepthStreamsResponseBItem.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model; - -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** DiffBookDepthStreamsResponseBItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DiffBookDepthStreamsResponseBItem extends ArrayList { - public DiffBookDepthStreamsResponseBItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DiffBookDepthStreamsResponseBItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * DiffBookDepthStreamsResponseBItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DiffBookDepthStreamsResponseBItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DiffBookDepthStreamsResponseBItem is" - + " not found in the empty JSON string", - DiffBookDepthStreamsResponseBItem.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DiffBookDepthStreamsResponseBItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DiffBookDepthStreamsResponseBItem` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DiffBookDepthStreamsResponseBItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DiffBookDepthStreamsResponseBItem' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DiffBookDepthStreamsResponseBItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DiffBookDepthStreamsResponseBItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public DiffBookDepthStreamsResponseBItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DiffBookDepthStreamsResponseBItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of DiffBookDepthStreamsResponseBItem - * @throws IOException if the JSON string is invalid with respect to - * DiffBookDepthStreamsResponseBItem - */ - public static DiffBookDepthStreamsResponseBItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DiffBookDepthStreamsResponseBItem.class); - } - - /** - * Convert an instance of DiffBookDepthStreamsResponseBItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/GridUpdate.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/GridUpdate.java index dce9f6abc..07c2cba60 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/GridUpdate.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/GridUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** GridUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GridUpdate extends BaseDTO { public static final String SERIALIZED_NAME_T = "T"; @@ -66,7 +66,7 @@ public GridUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ @@ -85,7 +85,7 @@ public GridUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/GridUpdateGu.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/GridUpdateGu.java index 0b1f390ce..9dfcfc88f 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/GridUpdateGu.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/GridUpdateGu.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** GridUpdateGu */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GridUpdateGu extends BaseDTO { public static final String SERIALIZED_NAME_SI = "si"; @@ -107,7 +107,7 @@ public GridUpdateGu si(@jakarta.annotation.Nullable Long si) { } /** - * Get si + * Strategy ID * * @return si */ @@ -126,7 +126,7 @@ public GridUpdateGu st(@jakarta.annotation.Nullable String st) { } /** - * Get st + * Strategy Type * * @return st */ @@ -145,7 +145,7 @@ public GridUpdateGu ss(@jakarta.annotation.Nullable String ss) { } /** - * Get ss + * Strategy Status * * @return ss */ @@ -164,7 +164,7 @@ public GridUpdateGu sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -183,7 +183,7 @@ public GridUpdateGu rLowerCase(@jakarta.annotation.Nullable String rLowerCase) { } /** - * Get rLowerCase + * Realized PNL * * @return rLowerCase */ @@ -202,7 +202,7 @@ public GridUpdateGu up(@jakarta.annotation.Nullable String up) { } /** - * Get up + * Unmatched Average Price * * @return up */ @@ -221,7 +221,7 @@ public GridUpdateGu uq(@jakarta.annotation.Nullable String uq) { } /** - * Get uq + * Unmatched Qty * * @return uq */ @@ -240,7 +240,7 @@ public GridUpdateGu uf(@jakarta.annotation.Nullable String uf) { } /** - * Get uf + * Unmatched Fee * * @return uf */ @@ -259,7 +259,7 @@ public GridUpdateGu mp(@jakarta.annotation.Nullable String mp) { } /** - * Get mp + * Matched PNL * * @return mp */ @@ -278,7 +278,7 @@ public GridUpdateGu ut(@jakarta.annotation.Nullable Long ut) { } /** - * Get ut + * Update Time * * @return ut */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexKlineCandlestickStreamsRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexKlineCandlestickStreamsRequest.java index 8cf014af2..870e91eae 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexKlineCandlestickStreamsRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexKlineCandlestickStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** IndexKlineCandlestickStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndexKlineCandlestickStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,14 +49,14 @@ public class IndexKlineCandlestickStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_PAIR = "pair"; @SerializedName(SERIALIZED_NAME_PAIR) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String pair; public static final String SERIALIZED_NAME_INTERVAL = "interval"; @SerializedName(SERIALIZED_NAME_INTERVAL) - @jakarta.annotation.Nonnull - private String interval; + @jakarta.annotation.Nullable + private Interval interval; public IndexKlineCandlestickStreamsRequest() {} @@ -65,7 +66,7 @@ public IndexKlineCandlestickStreamsRequest id(@jakarta.annotation.Nullable Strin } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -78,28 +79,27 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public IndexKlineCandlestickStreamsRequest pair(@jakarta.annotation.Nonnull String pair) { + public IndexKlineCandlestickStreamsRequest pair(@jakarta.annotation.Nullable String pair) { this.pair = pair; return this; } /** - * Get pair + * The pair parameter * * @return pair */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getPair() { return pair; } - public void setPair(@jakarta.annotation.Nonnull String pair) { + public void setPair(@jakarta.annotation.Nullable String pair) { this.pair = pair; } public IndexKlineCandlestickStreamsRequest interval( - @jakarta.annotation.Nonnull String interval) { + @jakarta.annotation.Nullable Interval interval) { this.interval = interval; return this; } @@ -109,13 +109,13 @@ public IndexKlineCandlestickStreamsRequest interval( * * @return interval */ - @jakarta.annotation.Nonnull - @NotNull - public String getInterval() { + @jakarta.annotation.Nullable + @Valid + public Interval getInterval() { return interval; } - public void setInterval(@jakarta.annotation.Nonnull String interval) { + public void setInterval(@jakarta.annotation.Nullable Interval interval) { this.interval = interval; } @@ -164,7 +164,7 @@ public String toUrlQueryString() { String pairValueAsString = pairValue.toString(); valMap.put("pair", pairValueAsString); } - String intervalValue = getInterval(); + Interval intervalValue = getInterval(); if (intervalValue != null) { String intervalValueAsString = intervalValue.toString(); valMap.put("interval", intervalValueAsString); @@ -224,8 +224,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pair"); - openapiRequiredFields.add("interval"); } /** @@ -259,16 +257,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IndexKlineCandlestickStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -278,19 +266,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("pair").isJsonPrimitive()) { + if ((jsonObj.get("pair") != null && !jsonObj.get("pair").isJsonNull()) + && !jsonObj.get("pair").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `pair` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("pair").toString())); } - if (!jsonObj.get("interval").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `interval` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("interval").toString())); + // validate the optional field `interval` + if (jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) { + Interval.validateJsonElement(jsonObj.get("interval")); } } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexKlineCandlestickStreamsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexKlineCandlestickStreamsResponse.java index 826e4e244..f10b09906 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexKlineCandlestickStreamsResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexKlineCandlestickStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** IndexKlineCandlestickStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndexKlineCandlestickStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -73,7 +73,7 @@ public IndexKlineCandlestickStreamsResponse eLowerCase( } /** - * Get eLowerCase + * eventType * * @return eLowerCase */ @@ -92,7 +92,7 @@ public IndexKlineCandlestickStreamsResponse E(@jakarta.annotation.Nullable Long } /** - * Get E + * eventTime * * @return E */ @@ -111,7 +111,7 @@ public IndexKlineCandlestickStreamsResponse ps(@jakarta.annotation.Nullable Stri } /** - * Get ps + * Pair * * @return ps */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexKlineCandlestickStreamsResponseK.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexKlineCandlestickStreamsResponseK.java index ca6d82e59..bf879dcd9 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexKlineCandlestickStreamsResponseK.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexKlineCandlestickStreamsResponseK.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** IndexKlineCandlestickStreamsResponseK */ +/** Kline payload */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndexKlineCandlestickStreamsResponseK extends BaseDTO { public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; @@ -150,7 +150,7 @@ public IndexKlineCandlestickStreamsResponseK tLowerCase( } /** - * Get tLowerCase + * Kline start time * * @return tLowerCase */ @@ -169,7 +169,7 @@ public IndexKlineCandlestickStreamsResponseK T(@jakarta.annotation.Nullable Long } /** - * Get T + * transactionTime * * @return T */ @@ -189,7 +189,7 @@ public IndexKlineCandlestickStreamsResponseK sLowerCase( } /** - * Get sLowerCase + * symbol * * @return sLowerCase */ @@ -209,7 +209,7 @@ public IndexKlineCandlestickStreamsResponseK iLowerCase( } /** - * Get iLowerCase + * interval * * @return iLowerCase */ @@ -229,7 +229,7 @@ public IndexKlineCandlestickStreamsResponseK fLowerCase( } /** - * Get fLowerCase + * Ignore * * @return fLowerCase */ @@ -248,7 +248,7 @@ public IndexKlineCandlestickStreamsResponseK L(@jakarta.annotation.Nullable Long } /** - * Get L + * Ignore * * @return L */ @@ -268,7 +268,7 @@ public IndexKlineCandlestickStreamsResponseK oLowerCase( } /** - * Get oLowerCase + * openPrice * * @return oLowerCase */ @@ -288,7 +288,7 @@ public IndexKlineCandlestickStreamsResponseK cLowerCase( } /** - * Get cLowerCase + * closePrice * * @return cLowerCase */ @@ -308,7 +308,7 @@ public IndexKlineCandlestickStreamsResponseK hLowerCase( } /** - * Get hLowerCase + * highPrice * * @return hLowerCase */ @@ -328,7 +328,7 @@ public IndexKlineCandlestickStreamsResponseK lLowerCase( } /** - * Get lLowerCase + * lowPrice * * @return lLowerCase */ @@ -348,7 +348,7 @@ public IndexKlineCandlestickStreamsResponseK vLowerCase( } /** - * Get vLowerCase + * volume * * @return vLowerCase */ @@ -368,7 +368,7 @@ public IndexKlineCandlestickStreamsResponseK nLowerCase( } /** - * Get nLowerCase + * tradeNum * * @return nLowerCase */ @@ -388,7 +388,7 @@ public IndexKlineCandlestickStreamsResponseK xLowerCase( } /** - * Get xLowerCase + * Is this kline closed? * * @return xLowerCase */ @@ -408,7 +408,7 @@ public IndexKlineCandlestickStreamsResponseK qLowerCase( } /** - * Get qLowerCase + * quoteVolume * * @return qLowerCase */ @@ -427,7 +427,7 @@ public IndexKlineCandlestickStreamsResponseK V(@jakarta.annotation.Nullable Stri } /** - * Get V + * Taker buy volume * * @return V */ @@ -446,7 +446,7 @@ public IndexKlineCandlestickStreamsResponseK Q(@jakarta.annotation.Nullable Stri } /** - * Get Q + * lastTradeVolume * * @return Q */ @@ -465,7 +465,7 @@ public IndexKlineCandlestickStreamsResponseK B(@jakarta.annotation.Nullable Stri } /** - * Get B + * Best bid qty * * @return B */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexPriceStreamRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexPriceStreamRequest.java index 982e53b6a..2b0f0d526 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexPriceStreamRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexPriceStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** IndexPriceStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndexPriceStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,14 +49,14 @@ public class IndexPriceStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_PAIR = "pair"; @SerializedName(SERIALIZED_NAME_PAIR) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String pair; public static final String SERIALIZED_NAME_UPDATE_SPEED = "updateSpeed"; @SerializedName(SERIALIZED_NAME_UPDATE_SPEED) @jakarta.annotation.Nullable - private String updateSpeed; + private UpdateSpeed updateSpeed; public IndexPriceStreamRequest() {} @@ -65,7 +66,7 @@ public IndexPriceStreamRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -78,27 +79,27 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public IndexPriceStreamRequest pair(@jakarta.annotation.Nonnull String pair) { + public IndexPriceStreamRequest pair(@jakarta.annotation.Nullable String pair) { this.pair = pair; return this; } /** - * Get pair + * The pair parameter * * @return pair */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getPair() { return pair; } - public void setPair(@jakarta.annotation.Nonnull String pair) { + public void setPair(@jakarta.annotation.Nullable String pair) { this.pair = pair; } - public IndexPriceStreamRequest updateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public IndexPriceStreamRequest updateSpeed( + @jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; return this; } @@ -109,11 +110,12 @@ public IndexPriceStreamRequest updateSpeed(@jakarta.annotation.Nullable String u * @return updateSpeed */ @jakarta.annotation.Nullable - public String getUpdateSpeed() { + @Valid + public UpdateSpeed getUpdateSpeed() { return updateSpeed; } - public void setUpdateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public void setUpdateSpeed(@jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; } @@ -161,7 +163,7 @@ public String toUrlQueryString() { String pairValueAsString = pairValue.toString(); valMap.put("pair", pairValueAsString); } - String updateSpeedValue = getUpdateSpeed(); + UpdateSpeed updateSpeedValue = getUpdateSpeed(); if (updateSpeedValue != null) { String updateSpeedValueAsString = updateSpeedValue.toString(); valMap.put("updateSpeed", updateSpeedValueAsString); @@ -221,7 +223,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pair"); } /** @@ -253,16 +254,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IndexPriceStreamRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -272,20 +263,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("pair").isJsonPrimitive()) { + if ((jsonObj.get("pair") != null && !jsonObj.get("pair").isJsonNull()) + && !jsonObj.get("pair").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `pair` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("pair").toString())); } - if ((jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) - && !jsonObj.get("updateSpeed").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `updateSpeed` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("updateSpeed").toString())); + // validate the optional field `updateSpeed` + if (jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) { + UpdateSpeed.validateJsonElement(jsonObj.get("updateSpeed")); } } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexPriceStreamResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexPriceStreamResponse.java index cbb792e69..cd1d7a001 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexPriceStreamResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndexPriceStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IndexPriceStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndexPriceStreamResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -71,7 +71,7 @@ public IndexPriceStreamResponse eLowerCase(@jakarta.annotation.Nullable String e } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -90,7 +90,7 @@ public IndexPriceStreamResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -109,7 +109,7 @@ public IndexPriceStreamResponse iLowerCase(@jakarta.annotation.Nullable String i } /** - * Get iLowerCase + * Pair * * @return iLowerCase */ @@ -128,7 +128,7 @@ public IndexPriceStreamResponse pLowerCase(@jakarta.annotation.Nullable String p } /** - * Get pLowerCase + * Index Price * * @return pLowerCase */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolBookTickerStreamsRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolBookTickerStreamsRequest.java index 83aa9574c..ca6883b0f 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolBookTickerStreamsRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolBookTickerStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IndividualSymbolBookTickerStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndividualSymbolBookTickerStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,7 +48,7 @@ public class IndividualSymbolBookTickerStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public IndividualSymbolBookTickerStreamsRequest() {} @@ -59,7 +59,7 @@ public IndividualSymbolBookTickerStreamsRequest id(@jakarta.annotation.Nullable } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -73,23 +73,22 @@ public void setId(@jakarta.annotation.Nullable String id) { } public IndividualSymbolBookTickerStreamsRequest symbol( - @jakarta.annotation.Nonnull String symbol) { + @jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -186,7 +185,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -222,17 +220,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : - IndividualSymbolBookTickerStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -242,7 +229,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolBookTickerStreamsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolBookTickerStreamsResponse.java index 0351a588b..820ad38dc 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolBookTickerStreamsResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolBookTickerStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IndividualSymbolBookTickerStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndividualSymbolBookTickerStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -57,12 +57,6 @@ public class IndividualSymbolBookTickerStreamsResponse extends BaseDTO { @jakarta.annotation.Nullable private String sLowerCase; - public static final String SERIALIZED_NAME_PS = "ps"; - - @SerializedName(SERIALIZED_NAME_PS) - @jakarta.annotation.Nullable - private String ps; - public static final String SERIALIZED_NAME_B_LOWER_CASE = "b"; @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) @@ -99,6 +93,18 @@ public class IndividualSymbolBookTickerStreamsResponse extends BaseDTO { @jakarta.annotation.Nullable private Long E; + public static final String SERIALIZED_NAME_PS = "ps"; + + @SerializedName(SERIALIZED_NAME_PS) + @jakarta.annotation.Nullable + private String ps; + + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public IndividualSymbolBookTickerStreamsResponse() {} public IndividualSymbolBookTickerStreamsResponse eLowerCase( @@ -108,7 +114,7 @@ public IndividualSymbolBookTickerStreamsResponse eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -128,7 +134,7 @@ public IndividualSymbolBookTickerStreamsResponse uLowerCase( } /** - * Get uLowerCase + * Order book update Id * * @return uLowerCase */ @@ -148,7 +154,7 @@ public IndividualSymbolBookTickerStreamsResponse sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -161,25 +167,6 @@ public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { this.sLowerCase = sLowerCase; } - public IndividualSymbolBookTickerStreamsResponse ps(@jakarta.annotation.Nullable String ps) { - this.ps = ps; - return this; - } - - /** - * Get ps - * - * @return ps - */ - @jakarta.annotation.Nullable - public String getPs() { - return ps; - } - - public void setPs(@jakarta.annotation.Nullable String ps) { - this.ps = ps; - } - public IndividualSymbolBookTickerStreamsResponse bLowerCase( @jakarta.annotation.Nullable String bLowerCase) { this.bLowerCase = bLowerCase; @@ -187,7 +174,7 @@ public IndividualSymbolBookTickerStreamsResponse bLowerCase( } /** - * Get bLowerCase + * Best bid price * * @return bLowerCase */ @@ -206,7 +193,7 @@ public IndividualSymbolBookTickerStreamsResponse B(@jakarta.annotation.Nullable } /** - * Get B + * Best bid qty * * @return B */ @@ -226,7 +213,7 @@ public IndividualSymbolBookTickerStreamsResponse aLowerCase( } /** - * Get aLowerCase + * Best ask price * * @return aLowerCase */ @@ -245,7 +232,7 @@ public IndividualSymbolBookTickerStreamsResponse A(@jakarta.annotation.Nullable } /** - * Get A + * Best ask qty * * @return A */ @@ -264,7 +251,7 @@ public IndividualSymbolBookTickerStreamsResponse T(@jakarta.annotation.Nullable } /** - * Get T + * Transaction time * * @return T */ @@ -283,7 +270,7 @@ public IndividualSymbolBookTickerStreamsResponse E(@jakarta.annotation.Nullable } /** - * Get E + * Event time * * @return E */ @@ -296,6 +283,44 @@ public void setE(@jakarta.annotation.Nullable Long E) { this.E = E; } + public IndividualSymbolBookTickerStreamsResponse ps(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + return this; + } + + /** + * Pair + * + * @return ps + */ + @jakarta.annotation.Nullable + public String getPs() { + return ps; + } + + public void setPs(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + } + + public IndividualSymbolBookTickerStreamsResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -311,7 +336,6 @@ public boolean equals(Object o) { this.uLowerCase, individualSymbolBookTickerStreamsResponse.uLowerCase) && Objects.equals( this.sLowerCase, individualSymbolBookTickerStreamsResponse.sLowerCase) - && Objects.equals(this.ps, individualSymbolBookTickerStreamsResponse.ps) && Objects.equals( this.bLowerCase, individualSymbolBookTickerStreamsResponse.bLowerCase) && Objects.equals(this.B, individualSymbolBookTickerStreamsResponse.B) @@ -319,13 +343,15 @@ public boolean equals(Object o) { this.aLowerCase, individualSymbolBookTickerStreamsResponse.aLowerCase) && Objects.equals(this.A, individualSymbolBookTickerStreamsResponse.A) && Objects.equals(this.T, individualSymbolBookTickerStreamsResponse.T) - && Objects.equals(this.E, individualSymbolBookTickerStreamsResponse.E); + && Objects.equals(this.E, individualSymbolBookTickerStreamsResponse.E) + && Objects.equals(this.ps, individualSymbolBookTickerStreamsResponse.ps) + && Objects.equals(this.st, individualSymbolBookTickerStreamsResponse.st); } @Override public int hashCode() { return Objects.hash( - eLowerCase, uLowerCase, sLowerCase, ps, bLowerCase, B, aLowerCase, A, T, E); + eLowerCase, uLowerCase, sLowerCase, bLowerCase, B, aLowerCase, A, T, E, ps, st); } @Override @@ -335,13 +361,14 @@ public String toString() { sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); - sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); sb.append(" B: ").append(toIndentedString(B)).append("\n"); sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); sb.append(" A: ").append(toIndentedString(A)).append("\n"); sb.append(" T: ").append(toIndentedString(T)).append("\n"); sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -365,11 +392,6 @@ public String toUrlQueryString() { String sLowerCaseValueAsString = sLowerCaseValue.toString(); valMap.put("sLowerCase", sLowerCaseValueAsString); } - String psValue = getPs(); - if (psValue != null) { - String psValueAsString = psValue.toString(); - valMap.put("ps", psValueAsString); - } String bLowerCaseValue = getbLowerCase(); if (bLowerCaseValue != null) { String bLowerCaseValueAsString = bLowerCaseValue.toString(); @@ -400,6 +422,16 @@ public String toUrlQueryString() { String EValueAsString = EValue.toString(); valMap.put("E", EValueAsString); } + String psValue = getPs(); + if (psValue != null) { + String psValueAsString = psValue.toString(); + valMap.put("ps", psValueAsString); + } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -423,10 +455,6 @@ public Map toMap() { if (sLowerCaseValue != null) { valMap.put("sLowerCase", sLowerCaseValue); } - Object psValue = getPs(); - if (psValue != null) { - valMap.put("ps", psValue); - } Object bLowerCaseValue = getbLowerCase(); if (bLowerCaseValue != null) { valMap.put("bLowerCase", bLowerCaseValue); @@ -451,6 +479,14 @@ public Map toMap() { if (EValue != null) { valMap.put("E", EValue); } + Object psValue = getPs(); + if (psValue != null) { + valMap.put("ps", psValue); + } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -480,13 +516,14 @@ private String toIndentedString(Object o) { openapiFields.add("e"); openapiFields.add("u"); openapiFields.add("s"); - openapiFields.add("ps"); openapiFields.add("b"); openapiFields.add("B"); openapiFields.add("a"); openapiFields.add("A"); openapiFields.add("T"); openapiFields.add("E"); + openapiFields.add("ps"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -542,14 +579,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("s").toString())); } - if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) - && !jsonObj.get("ps").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ps` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("ps").toString())); - } if ((jsonObj.get("b") != null && !jsonObj.get("b").isJsonNull()) && !jsonObj.get("b").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -582,6 +611,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("A").toString())); } + if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) + && !jsonObj.get("ps").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ps` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ps").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolMiniTickerStreamRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolMiniTickerStreamRequest.java index 639ae78bd..4cf34c84e 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolMiniTickerStreamRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolMiniTickerStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IndividualSymbolMiniTickerStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndividualSymbolMiniTickerStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,7 +48,7 @@ public class IndividualSymbolMiniTickerStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public IndividualSymbolMiniTickerStreamRequest() {} @@ -59,7 +59,7 @@ public IndividualSymbolMiniTickerStreamRequest id(@jakarta.annotation.Nullable S } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -73,23 +73,22 @@ public void setId(@jakarta.annotation.Nullable String id) { } public IndividualSymbolMiniTickerStreamRequest symbol( - @jakarta.annotation.Nonnull String symbol) { + @jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -186,7 +185,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -222,16 +220,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IndividualSymbolMiniTickerStreamRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -241,7 +229,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolMiniTickerStreamResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolMiniTickerStreamResponse.java index bb2255046..6667c9a36 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolMiniTickerStreamResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolMiniTickerStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IndividualSymbolMiniTickerStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndividualSymbolMiniTickerStreamResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -99,6 +99,12 @@ public class IndividualSymbolMiniTickerStreamResponse extends BaseDTO { @jakarta.annotation.Nullable private String qLowerCase; + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public IndividualSymbolMiniTickerStreamResponse() {} public IndividualSymbolMiniTickerStreamResponse eLowerCase( @@ -108,7 +114,7 @@ public IndividualSymbolMiniTickerStreamResponse eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -127,7 +133,7 @@ public IndividualSymbolMiniTickerStreamResponse E(@jakarta.annotation.Nullable L } /** - * Get E + * Event time * * @return E */ @@ -147,7 +153,7 @@ public IndividualSymbolMiniTickerStreamResponse sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -166,7 +172,7 @@ public IndividualSymbolMiniTickerStreamResponse ps(@jakarta.annotation.Nullable } /** - * Get ps + * Pair * * @return ps */ @@ -186,7 +192,7 @@ public IndividualSymbolMiniTickerStreamResponse cLowerCase( } /** - * Get cLowerCase + * Close price * * @return cLowerCase */ @@ -206,7 +212,7 @@ public IndividualSymbolMiniTickerStreamResponse oLowerCase( } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -226,7 +232,7 @@ public IndividualSymbolMiniTickerStreamResponse hLowerCase( } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -246,7 +252,7 @@ public IndividualSymbolMiniTickerStreamResponse lLowerCase( } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -266,7 +272,7 @@ public IndividualSymbolMiniTickerStreamResponse vLowerCase( } /** - * Get vLowerCase + * Total traded volume * * @return vLowerCase */ @@ -286,7 +292,7 @@ public IndividualSymbolMiniTickerStreamResponse qLowerCase( } /** - * Get qLowerCase + * Total traded base asset volume * * @return qLowerCase */ @@ -299,6 +305,25 @@ public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { this.qLowerCase = qLowerCase; } + public IndividualSymbolMiniTickerStreamResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -325,7 +350,8 @@ public boolean equals(Object o) { && Objects.equals( this.vLowerCase, individualSymbolMiniTickerStreamResponse.vLowerCase) && Objects.equals( - this.qLowerCase, individualSymbolMiniTickerStreamResponse.qLowerCase); + this.qLowerCase, individualSymbolMiniTickerStreamResponse.qLowerCase) + && Objects.equals(this.st, individualSymbolMiniTickerStreamResponse.st); } @Override @@ -340,7 +366,8 @@ public int hashCode() { hLowerCase, lLowerCase, vLowerCase, - qLowerCase); + qLowerCase, + st); } @Override @@ -357,6 +384,7 @@ public String toString() { sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -415,6 +443,11 @@ public String toUrlQueryString() { String qLowerCaseValueAsString = qLowerCaseValue.toString(); valMap.put("qLowerCase", qLowerCaseValueAsString); } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -466,6 +499,10 @@ public Map toMap() { if (qLowerCaseValue != null) { valMap.put("qLowerCase", qLowerCaseValue); } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -502,6 +539,7 @@ private String toIndentedString(Object o) { openapiFields.add("l"); openapiFields.add("v"); openapiFields.add("q"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolTickerStreamsRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolTickerStreamsRequest.java index f7c33ede4..a859c0e52 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolTickerStreamsRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolTickerStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IndividualSymbolTickerStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndividualSymbolTickerStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,7 +48,7 @@ public class IndividualSymbolTickerStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public IndividualSymbolTickerStreamsRequest() {} @@ -59,7 +59,7 @@ public IndividualSymbolTickerStreamsRequest id(@jakarta.annotation.Nullable Stri } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -72,23 +72,22 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public IndividualSymbolTickerStreamsRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public IndividualSymbolTickerStreamsRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -185,7 +184,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -220,16 +218,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IndividualSymbolTickerStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -239,7 +227,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolTickerStreamsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolTickerStreamsResponse.java index ee1441972..6b7ea3759 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolTickerStreamsResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/IndividualSymbolTickerStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IndividualSymbolTickerStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndividualSymbolTickerStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -57,12 +57,6 @@ public class IndividualSymbolTickerStreamsResponse extends BaseDTO { @jakarta.annotation.Nullable private String sLowerCase; - public static final String SERIALIZED_NAME_PS = "ps"; - - @SerializedName(SERIALIZED_NAME_PS) - @jakarta.annotation.Nullable - private String ps; - public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) @@ -153,6 +147,18 @@ public class IndividualSymbolTickerStreamsResponse extends BaseDTO { @jakarta.annotation.Nullable private Long nLowerCase; + public static final String SERIALIZED_NAME_PS = "ps"; + + @SerializedName(SERIALIZED_NAME_PS) + @jakarta.annotation.Nullable + private String ps; + + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public IndividualSymbolTickerStreamsResponse() {} public IndividualSymbolTickerStreamsResponse eLowerCase( @@ -162,7 +168,7 @@ public IndividualSymbolTickerStreamsResponse eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -181,7 +187,7 @@ public IndividualSymbolTickerStreamsResponse E(@jakarta.annotation.Nullable Long } /** - * Get E + * Event time * * @return E */ @@ -201,7 +207,7 @@ public IndividualSymbolTickerStreamsResponse sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -214,25 +220,6 @@ public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { this.sLowerCase = sLowerCase; } - public IndividualSymbolTickerStreamsResponse ps(@jakarta.annotation.Nullable String ps) { - this.ps = ps; - return this; - } - - /** - * Get ps - * - * @return ps - */ - @jakarta.annotation.Nullable - public String getPs() { - return ps; - } - - public void setPs(@jakarta.annotation.Nullable String ps) { - this.ps = ps; - } - public IndividualSymbolTickerStreamsResponse pLowerCase( @jakarta.annotation.Nullable String pLowerCase) { this.pLowerCase = pLowerCase; @@ -240,7 +227,7 @@ public IndividualSymbolTickerStreamsResponse pLowerCase( } /** - * Get pLowerCase + * Price change * * @return pLowerCase */ @@ -259,7 +246,7 @@ public IndividualSymbolTickerStreamsResponse P(@jakarta.annotation.Nullable Stri } /** - * Get P + * Price change percent * * @return P */ @@ -279,7 +266,7 @@ public IndividualSymbolTickerStreamsResponse wLowerCase( } /** - * Get wLowerCase + * Weighted average price * * @return wLowerCase */ @@ -299,7 +286,7 @@ public IndividualSymbolTickerStreamsResponse cLowerCase( } /** - * Get cLowerCase + * Last price * * @return cLowerCase */ @@ -318,7 +305,7 @@ public IndividualSymbolTickerStreamsResponse Q(@jakarta.annotation.Nullable Stri } /** - * Get Q + * Last quantity * * @return Q */ @@ -338,7 +325,7 @@ public IndividualSymbolTickerStreamsResponse oLowerCase( } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -358,7 +345,7 @@ public IndividualSymbolTickerStreamsResponse hLowerCase( } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -378,7 +365,7 @@ public IndividualSymbolTickerStreamsResponse lLowerCase( } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -398,7 +385,7 @@ public IndividualSymbolTickerStreamsResponse vLowerCase( } /** - * Get vLowerCase + * Total traded volume * * @return vLowerCase */ @@ -418,7 +405,7 @@ public IndividualSymbolTickerStreamsResponse qLowerCase( } /** - * Get qLowerCase + * Total traded base asset volume * * @return qLowerCase */ @@ -437,7 +424,7 @@ public IndividualSymbolTickerStreamsResponse O(@jakarta.annotation.Nullable Long } /** - * Get O + * Statistics open time * * @return O */ @@ -456,7 +443,7 @@ public IndividualSymbolTickerStreamsResponse C(@jakarta.annotation.Nullable Long } /** - * Get C + * Statistics close time * * @return C */ @@ -475,7 +462,7 @@ public IndividualSymbolTickerStreamsResponse F(@jakarta.annotation.Nullable Long } /** - * Get F + * First trade ID * * @return F */ @@ -494,7 +481,7 @@ public IndividualSymbolTickerStreamsResponse L(@jakarta.annotation.Nullable Long } /** - * Get L + * Last trade Id * * @return L */ @@ -514,7 +501,7 @@ public IndividualSymbolTickerStreamsResponse nLowerCase( } /** - * Get nLowerCase + * Total number of trades * * @return nLowerCase */ @@ -527,6 +514,44 @@ public void setnLowerCase(@jakarta.annotation.Nullable Long nLowerCase) { this.nLowerCase = nLowerCase; } + public IndividualSymbolTickerStreamsResponse ps(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + return this; + } + + /** + * Pair + * + * @return ps + */ + @jakarta.annotation.Nullable + public String getPs() { + return ps; + } + + public void setPs(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + } + + public IndividualSymbolTickerStreamsResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -540,7 +565,6 @@ public boolean equals(Object o) { return Objects.equals(this.eLowerCase, individualSymbolTickerStreamsResponse.eLowerCase) && Objects.equals(this.E, individualSymbolTickerStreamsResponse.E) && Objects.equals(this.sLowerCase, individualSymbolTickerStreamsResponse.sLowerCase) - && Objects.equals(this.ps, individualSymbolTickerStreamsResponse.ps) && Objects.equals(this.pLowerCase, individualSymbolTickerStreamsResponse.pLowerCase) && Objects.equals(this.P, individualSymbolTickerStreamsResponse.P) && Objects.equals(this.wLowerCase, individualSymbolTickerStreamsResponse.wLowerCase) @@ -555,8 +579,9 @@ public boolean equals(Object o) { && Objects.equals(this.C, individualSymbolTickerStreamsResponse.C) && Objects.equals(this.F, individualSymbolTickerStreamsResponse.F) && Objects.equals(this.L, individualSymbolTickerStreamsResponse.L) - && Objects.equals( - this.nLowerCase, individualSymbolTickerStreamsResponse.nLowerCase); + && Objects.equals(this.nLowerCase, individualSymbolTickerStreamsResponse.nLowerCase) + && Objects.equals(this.ps, individualSymbolTickerStreamsResponse.ps) + && Objects.equals(this.st, individualSymbolTickerStreamsResponse.st); } @Override @@ -565,7 +590,6 @@ public int hashCode() { eLowerCase, E, sLowerCase, - ps, pLowerCase, P, wLowerCase, @@ -580,7 +604,9 @@ public int hashCode() { C, F, L, - nLowerCase); + nLowerCase, + ps, + st); } @Override @@ -590,7 +616,6 @@ public String toString() { sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); sb.append(" E: ").append(toIndentedString(E)).append("\n"); sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); - sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); sb.append(" P: ").append(toIndentedString(P)).append("\n"); sb.append(" wLowerCase: ").append(toIndentedString(wLowerCase)).append("\n"); @@ -606,6 +631,8 @@ public String toString() { sb.append(" F: ").append(toIndentedString(F)).append("\n"); sb.append(" L: ").append(toIndentedString(L)).append("\n"); sb.append(" nLowerCase: ").append(toIndentedString(nLowerCase)).append("\n"); + sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -629,11 +656,6 @@ public String toUrlQueryString() { String sLowerCaseValueAsString = sLowerCaseValue.toString(); valMap.put("sLowerCase", sLowerCaseValueAsString); } - String psValue = getPs(); - if (psValue != null) { - String psValueAsString = psValue.toString(); - valMap.put("ps", psValueAsString); - } String pLowerCaseValue = getpLowerCase(); if (pLowerCaseValue != null) { String pLowerCaseValueAsString = pLowerCaseValue.toString(); @@ -709,6 +731,16 @@ public String toUrlQueryString() { String nLowerCaseValueAsString = nLowerCaseValue.toString(); valMap.put("nLowerCase", nLowerCaseValueAsString); } + String psValue = getPs(); + if (psValue != null) { + String psValueAsString = psValue.toString(); + valMap.put("ps", psValueAsString); + } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -732,10 +764,6 @@ public Map toMap() { if (sLowerCaseValue != null) { valMap.put("sLowerCase", sLowerCaseValue); } - Object psValue = getPs(); - if (psValue != null) { - valMap.put("ps", psValue); - } Object pLowerCaseValue = getpLowerCase(); if (pLowerCaseValue != null) { valMap.put("pLowerCase", pLowerCaseValue); @@ -796,6 +824,14 @@ public Map toMap() { if (nLowerCaseValue != null) { valMap.put("nLowerCase", nLowerCaseValue); } + Object psValue = getPs(); + if (psValue != null) { + valMap.put("ps", psValue); + } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -825,7 +861,6 @@ private String toIndentedString(Object o) { openapiFields.add("e"); openapiFields.add("E"); openapiFields.add("s"); - openapiFields.add("ps"); openapiFields.add("p"); openapiFields.add("P"); openapiFields.add("w"); @@ -841,6 +876,8 @@ private String toIndentedString(Object o) { openapiFields.add("F"); openapiFields.add("L"); openapiFields.add("n"); + openapiFields.add("ps"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -895,14 +932,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("s").toString())); } - if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) - && !jsonObj.get("ps").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ps` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("ps").toString())); - } if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) && !jsonObj.get("p").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -983,6 +1012,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("q").toString())); } + if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) + && !jsonObj.get("ps").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ps` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ps").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/Interval.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/Interval.java new file mode 100644 index 000000000..978ca5b30 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/Interval.java @@ -0,0 +1,99 @@ +/* + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets interval */ +@JsonAdapter(Interval.Adapter.class) +public enum Interval { + INTERVAL_1m("1m"), + + INTERVAL_3m("3m"), + + INTERVAL_5m("5m"), + + INTERVAL_15m("15m"), + + INTERVAL_30m("30m"), + + INTERVAL_1h("1h"), + + INTERVAL_2h("2h"), + + INTERVAL_4h("4h"), + + INTERVAL_6h("6h"), + + INTERVAL_8h("8h"), + + INTERVAL_12h("12h"), + + INTERVAL_1d("1d"), + + INTERVAL_3d("3d"), + + INTERVAL_1w("1w"), + + INTERVAL_1M("1M"); + + private String value; + + Interval(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Interval fromValue(String value) { + for (Interval b : Interval.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Interval enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Interval read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Interval.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Interval.fromValue(value); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/KlineCandlestickStreamsRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/KlineCandlestickStreamsRequest.java index 923150202..f4c00901d 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/KlineCandlestickStreamsRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/KlineCandlestickStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** KlineCandlestickStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlineCandlestickStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,14 +49,14 @@ public class KlineCandlestickStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_INTERVAL = "interval"; @SerializedName(SERIALIZED_NAME_INTERVAL) - @jakarta.annotation.Nonnull - private String interval; + @jakarta.annotation.Nullable + private Interval interval; public KlineCandlestickStreamsRequest() {} @@ -65,7 +66,7 @@ public KlineCandlestickStreamsRequest id(@jakarta.annotation.Nullable String id) } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -78,27 +79,26 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public KlineCandlestickStreamsRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public KlineCandlestickStreamsRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } - public KlineCandlestickStreamsRequest interval(@jakarta.annotation.Nonnull String interval) { + public KlineCandlestickStreamsRequest interval(@jakarta.annotation.Nullable Interval interval) { this.interval = interval; return this; } @@ -108,13 +108,13 @@ public KlineCandlestickStreamsRequest interval(@jakarta.annotation.Nonnull Strin * * @return interval */ - @jakarta.annotation.Nonnull - @NotNull - public String getInterval() { + @jakarta.annotation.Nullable + @Valid + public Interval getInterval() { return interval; } - public void setInterval(@jakarta.annotation.Nonnull String interval) { + public void setInterval(@jakarta.annotation.Nullable Interval interval) { this.interval = interval; } @@ -163,7 +163,7 @@ public String toUrlQueryString() { String symbolValueAsString = symbolValue.toString(); valMap.put("symbol", symbolValueAsString); } - String intervalValue = getInterval(); + Interval intervalValue = getInterval(); if (intervalValue != null) { String intervalValueAsString = intervalValue.toString(); valMap.put("interval", intervalValueAsString); @@ -223,8 +223,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); - openapiRequiredFields.add("interval"); } /** @@ -257,16 +255,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : KlineCandlestickStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -276,19 +264,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - if (!jsonObj.get("interval").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `interval` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("interval").toString())); + // validate the optional field `interval` + if (jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) { + Interval.validateJsonElement(jsonObj.get("interval")); } } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/KlineCandlestickStreamsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/KlineCandlestickStreamsResponse.java index ba59114bf..e811aaac8 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/KlineCandlestickStreamsResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/KlineCandlestickStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** KlineCandlestickStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlineCandlestickStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -73,7 +73,7 @@ public KlineCandlestickStreamsResponse eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -92,7 +92,7 @@ public KlineCandlestickStreamsResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -112,7 +112,7 @@ public KlineCandlestickStreamsResponse sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/KlineCandlestickStreamsResponseK.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/KlineCandlestickStreamsResponseK.java index 356ad05b3..c873600de 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/KlineCandlestickStreamsResponseK.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/KlineCandlestickStreamsResponseK.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** KlineCandlestickStreamsResponseK */ +/** Kline payload */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlineCandlestickStreamsResponseK extends BaseDTO { public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; @@ -150,7 +150,7 @@ public KlineCandlestickStreamsResponseK tLowerCase( } /** - * Get tLowerCase + * Kline start time * * @return tLowerCase */ @@ -169,7 +169,7 @@ public KlineCandlestickStreamsResponseK T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Kline close time * * @return T */ @@ -189,7 +189,7 @@ public KlineCandlestickStreamsResponseK sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -209,7 +209,7 @@ public KlineCandlestickStreamsResponseK iLowerCase( } /** - * Get iLowerCase + * Interval * * @return iLowerCase */ @@ -229,7 +229,7 @@ public KlineCandlestickStreamsResponseK fLowerCase( } /** - * Get fLowerCase + * First trade ID * * @return fLowerCase */ @@ -248,7 +248,7 @@ public KlineCandlestickStreamsResponseK L(@jakarta.annotation.Nullable Long L) { } /** - * Get L + * Last trade ID * * @return L */ @@ -268,7 +268,7 @@ public KlineCandlestickStreamsResponseK oLowerCase( } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -288,7 +288,7 @@ public KlineCandlestickStreamsResponseK cLowerCase( } /** - * Get cLowerCase + * Close price * * @return cLowerCase */ @@ -308,7 +308,7 @@ public KlineCandlestickStreamsResponseK hLowerCase( } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -328,7 +328,7 @@ public KlineCandlestickStreamsResponseK lLowerCase( } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -348,7 +348,7 @@ public KlineCandlestickStreamsResponseK vLowerCase( } /** - * Get vLowerCase + * volume * * @return vLowerCase */ @@ -368,7 +368,7 @@ public KlineCandlestickStreamsResponseK nLowerCase( } /** - * Get nLowerCase + * Number of trades * * @return nLowerCase */ @@ -388,7 +388,7 @@ public KlineCandlestickStreamsResponseK xLowerCase( } /** - * Get xLowerCase + * Is this kline closed? * * @return xLowerCase */ @@ -408,7 +408,7 @@ public KlineCandlestickStreamsResponseK qLowerCase( } /** - * Get qLowerCase + * Base asset volume * * @return qLowerCase */ @@ -427,7 +427,7 @@ public KlineCandlestickStreamsResponseK V(@jakarta.annotation.Nullable String V) } /** - * Get V + * Taker buy volume * * @return V */ @@ -446,7 +446,7 @@ public KlineCandlestickStreamsResponseK Q(@jakarta.annotation.Nullable String Q) } /** - * Get Q + * Taker buy base asset volume * * @return Q */ @@ -465,7 +465,7 @@ public KlineCandlestickStreamsResponseK B(@jakarta.annotation.Nullable String B) } /** - * Get B + * Ignore * * @return B */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/Levels.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/Levels.java new file mode 100644 index 000000000..54120bb59 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/Levels.java @@ -0,0 +1,75 @@ +/* + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets levels */ +@JsonAdapter(Levels.Adapter.class) +public enum Levels { + LEVELS_5("5"), + + LEVELS_10("10"), + + LEVELS_20("20"); + + private String value; + + Levels(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Levels fromValue(String value) { + for (Levels b : Levels.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Levels enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Levels read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Levels.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Levels.fromValue(value); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/LiquidationOrderStreamsRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/LiquidationOrderStreamsRequest.java deleted file mode 100644 index fe674c66b..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/LiquidationOrderStreamsRequest.java +++ /dev/null @@ -1,302 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** LiquidationOrderStreamsRequest */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class LiquidationOrderStreamsRequest extends BaseDTO { - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @jakarta.annotation.Nullable - private String id; - - public static final String SERIALIZED_NAME_SYMBOL = "symbol"; - - @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull - private String symbol; - - public LiquidationOrderStreamsRequest() {} - - public LiquidationOrderStreamsRequest id(@jakarta.annotation.Nullable String id) { - this.id = id; - return this; - } - - /** - * Get id - * - * @return id - */ - @jakarta.annotation.Nullable - public String getId() { - return id; - } - - public void setId(@jakarta.annotation.Nullable String id) { - this.id = id; - } - - public LiquidationOrderStreamsRequest symbol(@jakarta.annotation.Nonnull String symbol) { - this.symbol = symbol; - return this; - } - - /** - * Get symbol - * - * @return symbol - */ - @jakarta.annotation.Nonnull - @NotNull - public String getSymbol() { - return symbol; - } - - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { - this.symbol = symbol; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LiquidationOrderStreamsRequest liquidationOrderStreamsRequest = - (LiquidationOrderStreamsRequest) o; - return Objects.equals(this.id, liquidationOrderStreamsRequest.id) - && Objects.equals(this.symbol, liquidationOrderStreamsRequest.symbol); - } - - @Override - public int hashCode() { - return Objects.hash(id, symbol); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LiquidationOrderStreamsRequest {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String idValue = getId(); - if (idValue != null) { - String idValueAsString = idValue.toString(); - valMap.put("id", idValueAsString); - } - String symbolValue = getSymbol(); - if (symbolValue != null) { - String symbolValueAsString = symbolValue.toString(); - valMap.put("symbol", symbolValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object idValue = getId(); - if (idValue != null) { - valMap.put("id", idValue); - } - Object symbolValue = getSymbol(); - if (symbolValue != null) { - valMap.put("symbol", symbolValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("symbol"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * LiquidationOrderStreamsRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LiquidationOrderStreamsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LiquidationOrderStreamsRequest is not" - + " found in the empty JSON string", - LiquidationOrderStreamsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!LiquidationOrderStreamsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LiquidationOrderStreamsRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LiquidationOrderStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) - && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("symbol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `symbol` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("symbol").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LiquidationOrderStreamsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LiquidationOrderStreamsRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(LiquidationOrderStreamsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LiquidationOrderStreamsRequest value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LiquidationOrderStreamsRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LiquidationOrderStreamsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of LiquidationOrderStreamsRequest - * @throws IOException if the JSON string is invalid with respect to - * LiquidationOrderStreamsRequest - */ - public static LiquidationOrderStreamsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LiquidationOrderStreamsRequest.class); - } - - /** - * Convert an instance of LiquidationOrderStreamsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/LiquidationOrderStreamsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/LiquidationOrderStreamsResponse.java deleted file mode 100644 index 158e54e4e..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/LiquidationOrderStreamsResponse.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** LiquidationOrderStreamsResponse */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class LiquidationOrderStreamsResponse extends BaseDTO { - public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; - - @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) - @jakarta.annotation.Nullable - private String eLowerCase; - - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private Long E; - - public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; - - @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) - @jakarta.annotation.Nullable - private AllMarketLiquidationOrderStreamsResponseO oLowerCase; - - public LiquidationOrderStreamsResponse() {} - - public LiquidationOrderStreamsResponse eLowerCase( - @jakarta.annotation.Nullable String eLowerCase) { - this.eLowerCase = eLowerCase; - return this; - } - - /** - * Get eLowerCase - * - * @return eLowerCase - */ - @jakarta.annotation.Nullable - public String geteLowerCase() { - return eLowerCase; - } - - public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { - this.eLowerCase = eLowerCase; - } - - public LiquidationOrderStreamsResponse E(@jakarta.annotation.Nullable Long E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public Long getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable Long E) { - this.E = E; - } - - public LiquidationOrderStreamsResponse oLowerCase( - @jakarta.annotation.Nullable AllMarketLiquidationOrderStreamsResponseO oLowerCase) { - this.oLowerCase = oLowerCase; - return this; - } - - /** - * Get oLowerCase - * - * @return oLowerCase - */ - @jakarta.annotation.Nullable - @Valid - public AllMarketLiquidationOrderStreamsResponseO getoLowerCase() { - return oLowerCase; - } - - public void setoLowerCase( - @jakarta.annotation.Nullable AllMarketLiquidationOrderStreamsResponseO oLowerCase) { - this.oLowerCase = oLowerCase; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LiquidationOrderStreamsResponse liquidationOrderStreamsResponse = - (LiquidationOrderStreamsResponse) o; - return Objects.equals(this.eLowerCase, liquidationOrderStreamsResponse.eLowerCase) - && Objects.equals(this.E, liquidationOrderStreamsResponse.E) - && Objects.equals(this.oLowerCase, liquidationOrderStreamsResponse.oLowerCase); - } - - @Override - public int hashCode() { - return Objects.hash(eLowerCase, E, oLowerCase); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LiquidationOrderStreamsResponse {\n"); - sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String eLowerCaseValue = geteLowerCase(); - if (eLowerCaseValue != null) { - String eLowerCaseValueAsString = eLowerCaseValue.toString(); - valMap.put("eLowerCase", eLowerCaseValueAsString); - } - Long EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - AllMarketLiquidationOrderStreamsResponseO oLowerCaseValue = getoLowerCase(); - if (oLowerCaseValue != null) { - String oLowerCaseValueAsString = JSON.getGson().toJson(oLowerCaseValue); - valMap.put("oLowerCase", oLowerCaseValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object eLowerCaseValue = geteLowerCase(); - if (eLowerCaseValue != null) { - valMap.put("eLowerCase", eLowerCaseValue); - } - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object oLowerCaseValue = getoLowerCase(); - if (oLowerCaseValue != null) { - valMap.put("oLowerCase", oLowerCaseValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("e"); - openapiFields.add("E"); - openapiFields.add("o"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * LiquidationOrderStreamsResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LiquidationOrderStreamsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LiquidationOrderStreamsResponse is not" - + " found in the empty JSON string", - LiquidationOrderStreamsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!LiquidationOrderStreamsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LiquidationOrderStreamsResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) - && !jsonObj.get("e").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `e` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("e").toString())); - } - // validate the optional field `o` - if (jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) { - AllMarketLiquidationOrderStreamsResponseO.validateJsonElement(jsonObj.get("o")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LiquidationOrderStreamsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LiquidationOrderStreamsResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(LiquidationOrderStreamsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LiquidationOrderStreamsResponse value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LiquidationOrderStreamsResponse read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LiquidationOrderStreamsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of LiquidationOrderStreamsResponse - * @throws IOException if the JSON string is invalid with respect to - * LiquidationOrderStreamsResponse - */ - public static LiquidationOrderStreamsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LiquidationOrderStreamsResponse.class); - } - - /** - * Convert an instance of LiquidationOrderStreamsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ListenKeyExpired.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ListenKeyExpired.java new file mode 100644 index 000000000..dc671ffe0 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/ListenKeyExpired.java @@ -0,0 +1,277 @@ +/* + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ListenKeyExpired */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ListenKeyExpired extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; + + @SerializedName(SERIALIZED_NAME_LISTEN_KEY) + @jakarta.annotation.Nullable + private String listenKey; + + public ListenKeyExpired() {} + + public ListenKeyExpired E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public ListenKeyExpired listenKey(@jakarta.annotation.Nullable String listenKey) { + this.listenKey = listenKey; + return this; + } + + /** + * Get listenKey + * + * @return listenKey + */ + @jakarta.annotation.Nullable + public String getListenKey() { + return listenKey; + } + + public void setListenKey(@jakarta.annotation.Nullable String listenKey) { + this.listenKey = listenKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListenKeyExpired listenKeyExpired = (ListenKeyExpired) o; + return Objects.equals(this.E, listenKeyExpired.E) + && Objects.equals(this.listenKey, listenKeyExpired.listenKey); + } + + @Override + public int hashCode() { + return Objects.hash(E, listenKey); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListenKeyExpired {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" listenKey: ").append(toIndentedString(listenKey)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String listenKeyValue = getListenKey(); + if (listenKeyValue != null) { + String listenKeyValueAsString = listenKeyValue.toString(); + valMap.put("listenKey", listenKeyValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object listenKeyValue = getListenKey(); + if (listenKeyValue != null) { + valMap.put("listenKey", listenKeyValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("listenKey"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ListenKeyExpired + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ListenKeyExpired.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ListenKeyExpired is not found in the" + + " empty JSON string", + ListenKeyExpired.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ListenKeyExpired.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ListenKeyExpired` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("listenKey") != null && !jsonObj.get("listenKey").isJsonNull()) + && !jsonObj.get("listenKey").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `listenKey` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("listenKey").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ListenKeyExpired.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ListenKeyExpired' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ListenKeyExpired.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ListenKeyExpired value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ListenKeyExpired read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ListenKeyExpired given an JSON string + * + * @param jsonString JSON string + * @return An instance of ListenKeyExpired + * @throws IOException if the JSON string is invalid with respect to ListenKeyExpired + */ + public static ListenKeyExpired fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ListenKeyExpired.class); + } + + /** + * Convert an instance of ListenKeyExpired to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/Listenkeyexpired.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/Listenkeyexpired.java deleted file mode 100644 index 83ee292f1..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/Listenkeyexpired.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** Listenkeyexpired */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Listenkeyexpired extends BaseDTO { - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private Long E; - - public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; - - @SerializedName(SERIALIZED_NAME_LISTEN_KEY) - @jakarta.annotation.Nullable - private String listenKey; - - public Listenkeyexpired() {} - - public Listenkeyexpired E(@jakarta.annotation.Nullable Long E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public Long getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable Long E) { - this.E = E; - } - - public Listenkeyexpired listenKey(@jakarta.annotation.Nullable String listenKey) { - this.listenKey = listenKey; - return this; - } - - /** - * Get listenKey - * - * @return listenKey - */ - @jakarta.annotation.Nullable - public String getListenKey() { - return listenKey; - } - - public void setListenKey(@jakarta.annotation.Nullable String listenKey) { - this.listenKey = listenKey; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Listenkeyexpired listenkeyexpired = (Listenkeyexpired) o; - return Objects.equals(this.E, listenkeyexpired.E) - && Objects.equals(this.listenKey, listenkeyexpired.listenKey); - } - - @Override - public int hashCode() { - return Objects.hash(E, listenKey); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Listenkeyexpired {\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" listenKey: ").append(toIndentedString(listenKey)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Long EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - String listenKeyValue = getListenKey(); - if (listenKeyValue != null) { - String listenKeyValueAsString = listenKeyValue.toString(); - valMap.put("listenKey", listenKeyValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object listenKeyValue = getListenKey(); - if (listenKeyValue != null) { - valMap.put("listenKey", listenKeyValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("E"); - openapiFields.add("listenKey"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Listenkeyexpired - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Listenkeyexpired.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Listenkeyexpired is not found in the" - + " empty JSON string", - Listenkeyexpired.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Listenkeyexpired.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Listenkeyexpired` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("listenKey") != null && !jsonObj.get("listenKey").isJsonNull()) - && !jsonObj.get("listenKey").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `listenKey` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("listenKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Listenkeyexpired.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Listenkeyexpired' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Listenkeyexpired.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Listenkeyexpired value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Listenkeyexpired read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Listenkeyexpired given an JSON string - * - * @param jsonString JSON string - * @return An instance of Listenkeyexpired - * @throws IOException if the JSON string is invalid with respect to Listenkeyexpired - */ - public static Listenkeyexpired fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Listenkeyexpired.class); - } - - /** - * Convert an instance of Listenkeyexpired to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarginCall.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarginCall.java index 067734962..0eac18620 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarginCall.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarginCall.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** MarginCall */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginCall extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -75,7 +75,7 @@ public MarginCall E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -94,7 +94,7 @@ public MarginCall iLowerCase(@jakarta.annotation.Nullable String iLowerCase) { } /** - * Get iLowerCase + * Account Alias * * @return iLowerCase */ @@ -113,7 +113,7 @@ public MarginCall cw(@jakarta.annotation.Nullable String cw) { } /** - * Get cw + * Cross Wallet Balance. Only pushed with crossed position margin call * * @return cw */ @@ -141,7 +141,7 @@ public MarginCall addPLowerCaseItem(MarginCallPInner pLowerCaseItem) { } /** - * Get pLowerCase + * Position(s) of Margin Call * * @return pLowerCase */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarginCallPInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarginCallPInner.java index 5411dc34d..fe987d575 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarginCallPInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarginCallPInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MarginCallPInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginCallPInner extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -95,7 +95,7 @@ public MarginCallPInner sLowerCase(@jakarta.annotation.Nullable String sLowerCas } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -114,7 +114,7 @@ public MarginCallPInner ps(@jakarta.annotation.Nullable String ps) { } /** - * Get ps + * Position Side * * @return ps */ @@ -133,7 +133,7 @@ public MarginCallPInner pa(@jakarta.annotation.Nullable String pa) { } /** - * Get pa + * Position Amount * * @return pa */ @@ -152,7 +152,7 @@ public MarginCallPInner mt(@jakarta.annotation.Nullable String mt) { } /** - * Get mt + * Margin Type * * @return mt */ @@ -171,7 +171,7 @@ public MarginCallPInner iw(@jakarta.annotation.Nullable String iw) { } /** - * Get iw + * Isolated Wallet (if isolated position) * * @return iw */ @@ -190,7 +190,7 @@ public MarginCallPInner mp(@jakarta.annotation.Nullable String mp) { } /** - * Get mp + * Mark Price * * @return mp */ @@ -209,7 +209,7 @@ public MarginCallPInner up(@jakarta.annotation.Nullable String up) { } /** - * Get up + * Unrealized PnL * * @return up */ @@ -228,7 +228,7 @@ public MarginCallPInner mm(@jakarta.annotation.Nullable String mm) { } /** - * Get mm + * Maintenance Margin Required * * @return mm */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceKlineCandlestickStreamsRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceKlineCandlestickStreamsRequest.java index ab16e635f..41d5bcf50 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceKlineCandlestickStreamsRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceKlineCandlestickStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** MarkPriceKlineCandlestickStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceKlineCandlestickStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,14 +49,14 @@ public class MarkPriceKlineCandlestickStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_INTERVAL = "interval"; @SerializedName(SERIALIZED_NAME_INTERVAL) - @jakarta.annotation.Nonnull - private String interval; + @jakarta.annotation.Nullable + private Interval interval; public MarkPriceKlineCandlestickStreamsRequest() {} @@ -65,7 +66,7 @@ public MarkPriceKlineCandlestickStreamsRequest id(@jakarta.annotation.Nullable S } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -79,28 +80,27 @@ public void setId(@jakarta.annotation.Nullable String id) { } public MarkPriceKlineCandlestickStreamsRequest symbol( - @jakarta.annotation.Nonnull String symbol) { + @jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } public MarkPriceKlineCandlestickStreamsRequest interval( - @jakarta.annotation.Nonnull String interval) { + @jakarta.annotation.Nullable Interval interval) { this.interval = interval; return this; } @@ -110,13 +110,13 @@ public MarkPriceKlineCandlestickStreamsRequest interval( * * @return interval */ - @jakarta.annotation.Nonnull - @NotNull - public String getInterval() { + @jakarta.annotation.Nullable + @Valid + public Interval getInterval() { return interval; } - public void setInterval(@jakarta.annotation.Nonnull String interval) { + public void setInterval(@jakarta.annotation.Nullable Interval interval) { this.interval = interval; } @@ -165,7 +165,7 @@ public String toUrlQueryString() { String symbolValueAsString = symbolValue.toString(); valMap.put("symbol", symbolValueAsString); } - String intervalValue = getInterval(); + Interval intervalValue = getInterval(); if (intervalValue != null) { String intervalValueAsString = intervalValue.toString(); valMap.put("interval", intervalValueAsString); @@ -225,8 +225,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); - openapiRequiredFields.add("interval"); } /** @@ -262,16 +260,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MarkPriceKlineCandlestickStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -281,19 +269,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - if (!jsonObj.get("interval").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `interval` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("interval").toString())); + // validate the optional field `interval` + if (jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) { + Interval.validateJsonElement(jsonObj.get("interval")); } } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceKlineCandlestickStreamsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceKlineCandlestickStreamsResponse.java index 310a1ec9e..023372e96 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceKlineCandlestickStreamsResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceKlineCandlestickStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** MarkPriceKlineCandlestickStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceKlineCandlestickStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -73,7 +73,7 @@ public MarkPriceKlineCandlestickStreamsResponse eLowerCase( } /** - * Get eLowerCase + * Event Name * * @return eLowerCase */ @@ -92,7 +92,7 @@ public MarkPriceKlineCandlestickStreamsResponse E(@jakarta.annotation.Nullable L } /** - * Get E + * Event Time * * @return E */ @@ -111,7 +111,7 @@ public MarkPriceKlineCandlestickStreamsResponse ps(@jakarta.annotation.Nullable } /** - * Get ps + * Pair * * @return ps */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceKlineCandlestickStreamsResponseK.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceKlineCandlestickStreamsResponseK.java index 503a074f8..dbe4e7fb6 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceKlineCandlestickStreamsResponseK.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceKlineCandlestickStreamsResponseK.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** MarkPriceKlineCandlestickStreamsResponseK */ +/** Kline payload */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceKlineCandlestickStreamsResponseK extends BaseDTO { public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; @@ -150,7 +150,7 @@ public MarkPriceKlineCandlestickStreamsResponseK tLowerCase( } /** - * Get tLowerCase + * Kline start time * * @return tLowerCase */ @@ -169,7 +169,7 @@ public MarkPriceKlineCandlestickStreamsResponseK T(@jakarta.annotation.Nullable } /** - * Get T + * Kline close time * * @return T */ @@ -189,7 +189,7 @@ public MarkPriceKlineCandlestickStreamsResponseK sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -209,7 +209,7 @@ public MarkPriceKlineCandlestickStreamsResponseK iLowerCase( } /** - * Get iLowerCase + * Interval * * @return iLowerCase */ @@ -229,7 +229,7 @@ public MarkPriceKlineCandlestickStreamsResponseK fLowerCase( } /** - * Get fLowerCase + * ignore * * @return fLowerCase */ @@ -248,7 +248,7 @@ public MarkPriceKlineCandlestickStreamsResponseK L(@jakarta.annotation.Nullable } /** - * Get L + * ignore * * @return L */ @@ -268,7 +268,7 @@ public MarkPriceKlineCandlestickStreamsResponseK oLowerCase( } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -288,7 +288,7 @@ public MarkPriceKlineCandlestickStreamsResponseK cLowerCase( } /** - * Get cLowerCase + * Close price * * @return cLowerCase */ @@ -308,7 +308,7 @@ public MarkPriceKlineCandlestickStreamsResponseK hLowerCase( } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -328,7 +328,7 @@ public MarkPriceKlineCandlestickStreamsResponseK lLowerCase( } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -348,7 +348,7 @@ public MarkPriceKlineCandlestickStreamsResponseK vLowerCase( } /** - * Get vLowerCase + * ignore * * @return vLowerCase */ @@ -368,7 +368,7 @@ public MarkPriceKlineCandlestickStreamsResponseK nLowerCase( } /** - * Get nLowerCase + * Number of basic data * * @return nLowerCase */ @@ -388,7 +388,7 @@ public MarkPriceKlineCandlestickStreamsResponseK xLowerCase( } /** - * Get xLowerCase + * Is this kline closed? * * @return xLowerCase */ @@ -408,7 +408,7 @@ public MarkPriceKlineCandlestickStreamsResponseK qLowerCase( } /** - * Get qLowerCase + * ignore * * @return qLowerCase */ @@ -427,7 +427,7 @@ public MarkPriceKlineCandlestickStreamsResponseK V(@jakarta.annotation.Nullable } /** - * Get V + * ignore * * @return V */ @@ -446,7 +446,7 @@ public MarkPriceKlineCandlestickStreamsResponseK Q(@jakarta.annotation.Nullable } /** - * Get Q + * ignore * * @return Q */ @@ -465,7 +465,7 @@ public MarkPriceKlineCandlestickStreamsResponseK B(@jakarta.annotation.Nullable } /** - * Get B + * ignore * * @return B */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceOfAllSymbolsOfAPairRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceOfAllSymbolsOfAPairRequest.java index e9824dfda..06554e041 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceOfAllSymbolsOfAPairRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceOfAllSymbolsOfAPairRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** MarkPriceOfAllSymbolsOfAPairRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceOfAllSymbolsOfAPairRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,14 +49,14 @@ public class MarkPriceOfAllSymbolsOfAPairRequest extends BaseDTO { public static final String SERIALIZED_NAME_PAIR = "pair"; @SerializedName(SERIALIZED_NAME_PAIR) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String pair; public static final String SERIALIZED_NAME_UPDATE_SPEED = "updateSpeed"; @SerializedName(SERIALIZED_NAME_UPDATE_SPEED) @jakarta.annotation.Nullable - private String updateSpeed; + private UpdateSpeed updateSpeed; public MarkPriceOfAllSymbolsOfAPairRequest() {} @@ -65,7 +66,7 @@ public MarkPriceOfAllSymbolsOfAPairRequest id(@jakarta.annotation.Nullable Strin } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -78,28 +79,27 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public MarkPriceOfAllSymbolsOfAPairRequest pair(@jakarta.annotation.Nonnull String pair) { + public MarkPriceOfAllSymbolsOfAPairRequest pair(@jakarta.annotation.Nullable String pair) { this.pair = pair; return this; } /** - * Get pair + * The pair parameter * * @return pair */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getPair() { return pair; } - public void setPair(@jakarta.annotation.Nonnull String pair) { + public void setPair(@jakarta.annotation.Nullable String pair) { this.pair = pair; } public MarkPriceOfAllSymbolsOfAPairRequest updateSpeed( - @jakarta.annotation.Nullable String updateSpeed) { + @jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; return this; } @@ -110,11 +110,12 @@ public MarkPriceOfAllSymbolsOfAPairRequest updateSpeed( * @return updateSpeed */ @jakarta.annotation.Nullable - public String getUpdateSpeed() { + @Valid + public UpdateSpeed getUpdateSpeed() { return updateSpeed; } - public void setUpdateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public void setUpdateSpeed(@jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; } @@ -164,7 +165,7 @@ public String toUrlQueryString() { String pairValueAsString = pairValue.toString(); valMap.put("pair", pairValueAsString); } - String updateSpeedValue = getUpdateSpeed(); + UpdateSpeed updateSpeedValue = getUpdateSpeed(); if (updateSpeedValue != null) { String updateSpeedValueAsString = updateSpeedValue.toString(); valMap.put("updateSpeed", updateSpeedValueAsString); @@ -224,7 +225,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pair"); } /** @@ -258,16 +258,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MarkPriceOfAllSymbolsOfAPairRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -277,20 +267,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("pair").isJsonPrimitive()) { + if ((jsonObj.get("pair") != null && !jsonObj.get("pair").isJsonNull()) + && !jsonObj.get("pair").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `pair` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("pair").toString())); } - if ((jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) - && !jsonObj.get("updateSpeed").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `updateSpeed` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("updateSpeed").toString())); + // validate the optional field `updateSpeed` + if (jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) { + UpdateSpeed.validateJsonElement(jsonObj.get("updateSpeed")); } } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceOfAllSymbolsOfAPairResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceOfAllSymbolsOfAPairResponse.java index 4e552bc97..175298998 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceOfAllSymbolsOfAPairResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceOfAllSymbolsOfAPairResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** MarkPriceOfAllSymbolsOfAPairResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceOfAllSymbolsOfAPairResponse extends ArrayList { public MarkPriceOfAllSymbolsOfAPairResponse() {} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceOfAllSymbolsOfAPairResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceOfAllSymbolsOfAPairResponseInner.java index 9425a6405..c2200e9b5 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceOfAllSymbolsOfAPairResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceOfAllSymbolsOfAPairResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MarkPriceOfAllSymbolsOfAPairResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceOfAllSymbolsOfAPairResponseInner extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -87,6 +87,12 @@ public class MarkPriceOfAllSymbolsOfAPairResponseInner extends BaseDTO { @jakarta.annotation.Nullable private Long T; + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public MarkPriceOfAllSymbolsOfAPairResponseInner() {} public MarkPriceOfAllSymbolsOfAPairResponseInner eLowerCase( @@ -96,7 +102,7 @@ public MarkPriceOfAllSymbolsOfAPairResponseInner eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -115,7 +121,7 @@ public MarkPriceOfAllSymbolsOfAPairResponseInner E(@jakarta.annotation.Nullable } /** - * Get E + * Event time * * @return E */ @@ -135,7 +141,7 @@ public MarkPriceOfAllSymbolsOfAPairResponseInner sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -155,7 +161,7 @@ public MarkPriceOfAllSymbolsOfAPairResponseInner pLowerCase( } /** - * Get pLowerCase + * Mark Price * * @return pLowerCase */ @@ -174,7 +180,7 @@ public MarkPriceOfAllSymbolsOfAPairResponseInner P(@jakarta.annotation.Nullable } /** - * Get P + * Estimated Settle Price, only useful in the last hour before the settlement starts. * * @return P */ @@ -194,7 +200,7 @@ public MarkPriceOfAllSymbolsOfAPairResponseInner iLowerCase( } /** - * Get iLowerCase + * Index Price * * @return iLowerCase */ @@ -214,7 +220,7 @@ public MarkPriceOfAllSymbolsOfAPairResponseInner rLowerCase( } /** - * Get rLowerCase + * funding rate for perpetual symbol, \"\" will be shown for delivery symbol * * @return rLowerCase */ @@ -233,7 +239,7 @@ public MarkPriceOfAllSymbolsOfAPairResponseInner T(@jakarta.annotation.Nullable } /** - * Get T + * next funding time for perpetual symbol, 0 will be shown for delivery symbol * * @return T */ @@ -246,6 +252,25 @@ public void setT(@jakarta.annotation.Nullable Long T) { this.T = T; } + public MarkPriceOfAllSymbolsOfAPairResponseInner st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -267,12 +292,14 @@ public boolean equals(Object o) { this.iLowerCase, markPriceOfAllSymbolsOfAPairResponseInner.iLowerCase) && Objects.equals( this.rLowerCase, markPriceOfAllSymbolsOfAPairResponseInner.rLowerCase) - && Objects.equals(this.T, markPriceOfAllSymbolsOfAPairResponseInner.T); + && Objects.equals(this.T, markPriceOfAllSymbolsOfAPairResponseInner.T) + && Objects.equals(this.st, markPriceOfAllSymbolsOfAPairResponseInner.st); } @Override public int hashCode() { - return Objects.hash(eLowerCase, E, sLowerCase, pLowerCase, P, iLowerCase, rLowerCase, T); + return Objects.hash( + eLowerCase, E, sLowerCase, pLowerCase, P, iLowerCase, rLowerCase, T, st); } @Override @@ -287,6 +314,7 @@ public String toString() { sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); sb.append(" rLowerCase: ").append(toIndentedString(rLowerCase)).append("\n"); sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -335,6 +363,11 @@ public String toUrlQueryString() { String TValueAsString = TValue.toString(); valMap.put("T", TValueAsString); } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -378,6 +411,10 @@ public Map toMap() { if (TValue != null) { valMap.put("T", TValue); } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -412,6 +449,7 @@ private String toIndentedString(Object o) { openapiFields.add("i"); openapiFields.add("r"); openapiFields.add("T"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceStreamRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceStreamRequest.java index b2fa06ac4..1fb927a73 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceStreamRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** MarkPriceStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,14 +49,14 @@ public class MarkPriceStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_UPDATE_SPEED = "updateSpeed"; @SerializedName(SERIALIZED_NAME_UPDATE_SPEED) @jakarta.annotation.Nullable - private String updateSpeed; + private UpdateSpeed updateSpeed; public MarkPriceStreamRequest() {} @@ -65,7 +66,7 @@ public MarkPriceStreamRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -78,27 +79,27 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public MarkPriceStreamRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public MarkPriceStreamRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } - public MarkPriceStreamRequest updateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public MarkPriceStreamRequest updateSpeed( + @jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; return this; } @@ -109,11 +110,12 @@ public MarkPriceStreamRequest updateSpeed(@jakarta.annotation.Nullable String up * @return updateSpeed */ @jakarta.annotation.Nullable - public String getUpdateSpeed() { + @Valid + public UpdateSpeed getUpdateSpeed() { return updateSpeed; } - public void setUpdateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public void setUpdateSpeed(@jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; } @@ -161,7 +163,7 @@ public String toUrlQueryString() { String symbolValueAsString = symbolValue.toString(); valMap.put("symbol", symbolValueAsString); } - String updateSpeedValue = getUpdateSpeed(); + UpdateSpeed updateSpeedValue = getUpdateSpeed(); if (updateSpeedValue != null) { String updateSpeedValueAsString = updateSpeedValue.toString(); valMap.put("updateSpeed", updateSpeedValueAsString); @@ -221,7 +223,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -253,16 +254,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MarkPriceStreamRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -272,20 +263,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - if ((jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) - && !jsonObj.get("updateSpeed").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `updateSpeed` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("updateSpeed").toString())); + // validate the optional field `updateSpeed` + if (jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) { + UpdateSpeed.validateJsonElement(jsonObj.get("updateSpeed")); } } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceStreamResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceStreamResponse.java index f04811a6a..bb3d9f072 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceStreamResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarkPriceStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MarkPriceStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceStreamResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -87,6 +87,12 @@ public class MarkPriceStreamResponse extends BaseDTO { @jakarta.annotation.Nullable private Long T; + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public MarkPriceStreamResponse() {} public MarkPriceStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { @@ -95,7 +101,7 @@ public MarkPriceStreamResponse eLowerCase(@jakarta.annotation.Nullable String eL } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -114,7 +120,7 @@ public MarkPriceStreamResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -133,7 +139,7 @@ public MarkPriceStreamResponse sLowerCase(@jakarta.annotation.Nullable String sL } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -152,7 +158,7 @@ public MarkPriceStreamResponse pLowerCase(@jakarta.annotation.Nullable String pL } /** - * Get pLowerCase + * Mark Price * * @return pLowerCase */ @@ -171,7 +177,7 @@ public MarkPriceStreamResponse P(@jakarta.annotation.Nullable String P) { } /** - * Get P + * Estimated Settle Price, only useful in the last hour before the settlement starts. * * @return P */ @@ -190,7 +196,7 @@ public MarkPriceStreamResponse iLowerCase(@jakarta.annotation.Nullable String iL } /** - * Get iLowerCase + * Index Price * * @return iLowerCase */ @@ -209,7 +215,7 @@ public MarkPriceStreamResponse rLowerCase(@jakarta.annotation.Nullable String rL } /** - * Get rLowerCase + * funding rate for perpetual symbol, \"\" will be shown for delivery symbol * * @return rLowerCase */ @@ -228,7 +234,7 @@ public MarkPriceStreamResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * next funding time for perpetual symbol, 0 will be shown for delivery symbol * * @return T */ @@ -241,6 +247,25 @@ public void setT(@jakarta.annotation.Nullable Long T) { this.T = T; } + public MarkPriceStreamResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -257,12 +282,14 @@ public boolean equals(Object o) { && Objects.equals(this.P, markPriceStreamResponse.P) && Objects.equals(this.iLowerCase, markPriceStreamResponse.iLowerCase) && Objects.equals(this.rLowerCase, markPriceStreamResponse.rLowerCase) - && Objects.equals(this.T, markPriceStreamResponse.T); + && Objects.equals(this.T, markPriceStreamResponse.T) + && Objects.equals(this.st, markPriceStreamResponse.st); } @Override public int hashCode() { - return Objects.hash(eLowerCase, E, sLowerCase, pLowerCase, P, iLowerCase, rLowerCase, T); + return Objects.hash( + eLowerCase, E, sLowerCase, pLowerCase, P, iLowerCase, rLowerCase, T, st); } @Override @@ -277,6 +304,7 @@ public String toString() { sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); sb.append(" rLowerCase: ").append(toIndentedString(rLowerCase)).append("\n"); sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -325,6 +353,11 @@ public String toUrlQueryString() { String TValueAsString = TValue.toString(); valMap.put("T", TValueAsString); } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -368,6 +401,10 @@ public Map toMap() { if (TValue != null) { valMap.put("T", TValue); } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -402,6 +439,7 @@ private String toIndentedString(Object o) { openapiFields.add("i"); openapiFields.add("r"); openapiFields.add("T"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarketLiquidationOrderStreamsRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarketLiquidationOrderStreamsRequest.java new file mode 100644 index 000000000..50abf7fca --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarketLiquidationOrderStreamsRequest.java @@ -0,0 +1,295 @@ +/* + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** MarketLiquidationOrderStreamsRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class MarketLiquidationOrderStreamsRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public MarketLiquidationOrderStreamsRequest() {} + + public MarketLiquidationOrderStreamsRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public MarketLiquidationOrderStreamsRequest symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * The symbol parameter + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MarketLiquidationOrderStreamsRequest marketLiquidationOrderStreamsRequest = + (MarketLiquidationOrderStreamsRequest) o; + return Objects.equals(this.id, marketLiquidationOrderStreamsRequest.id) + && Objects.equals(this.symbol, marketLiquidationOrderStreamsRequest.symbol); + } + + @Override + public int hashCode() { + return Objects.hash(id, symbol); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MarketLiquidationOrderStreamsRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("symbol"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * MarketLiquidationOrderStreamsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MarketLiquidationOrderStreamsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in MarketLiquidationOrderStreamsRequest" + + " is not found in the empty JSON string", + MarketLiquidationOrderStreamsRequest.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MarketLiquidationOrderStreamsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `MarketLiquidationOrderStreamsRequest` properties. JSON:" + + " %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MarketLiquidationOrderStreamsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MarketLiquidationOrderStreamsRequest' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(MarketLiquidationOrderStreamsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, MarketLiquidationOrderStreamsRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MarketLiquidationOrderStreamsRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of MarketLiquidationOrderStreamsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of MarketLiquidationOrderStreamsRequest + * @throws IOException if the JSON string is invalid with respect to + * MarketLiquidationOrderStreamsRequest + */ + public static MarketLiquidationOrderStreamsRequest fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, MarketLiquidationOrderStreamsRequest.class); + } + + /** + * Convert an instance of MarketLiquidationOrderStreamsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarketLiquidationOrderStreamsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarketLiquidationOrderStreamsResponse.java new file mode 100644 index 000000000..766db5df9 --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarketLiquidationOrderStreamsResponse.java @@ -0,0 +1,334 @@ +/* + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** MarketLiquidationOrderStreamsResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class MarketLiquidationOrderStreamsResponse extends BaseDTO { + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; + + @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) + @jakarta.annotation.Nullable + private AllMarketLiquidationOrderStreamsResponseO oLowerCase; + + public MarketLiquidationOrderStreamsResponse() {} + + public MarketLiquidationOrderStreamsResponse eLowerCase( + @jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * Event Type + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public MarketLiquidationOrderStreamsResponse E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public MarketLiquidationOrderStreamsResponse oLowerCase( + @jakarta.annotation.Nullable AllMarketLiquidationOrderStreamsResponseO oLowerCase) { + this.oLowerCase = oLowerCase; + return this; + } + + /** + * Get oLowerCase + * + * @return oLowerCase + */ + @jakarta.annotation.Nullable + @Valid + public AllMarketLiquidationOrderStreamsResponseO getoLowerCase() { + return oLowerCase; + } + + public void setoLowerCase( + @jakarta.annotation.Nullable AllMarketLiquidationOrderStreamsResponseO oLowerCase) { + this.oLowerCase = oLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MarketLiquidationOrderStreamsResponse marketLiquidationOrderStreamsResponse = + (MarketLiquidationOrderStreamsResponse) o; + return Objects.equals(this.eLowerCase, marketLiquidationOrderStreamsResponse.eLowerCase) + && Objects.equals(this.E, marketLiquidationOrderStreamsResponse.E) + && Objects.equals( + this.oLowerCase, marketLiquidationOrderStreamsResponse.oLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash(eLowerCase, E, oLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MarketLiquidationOrderStreamsResponse {\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + AllMarketLiquidationOrderStreamsResponseO oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + String oLowerCaseValueAsString = JSON.getGson().toJson(oLowerCaseValue); + valMap.put("oLowerCase", oLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + valMap.put("oLowerCase", oLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("e"); + openapiFields.add("E"); + openapiFields.add("o"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * MarketLiquidationOrderStreamsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MarketLiquidationOrderStreamsResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in MarketLiquidationOrderStreamsResponse" + + " is not found in the empty JSON string", + MarketLiquidationOrderStreamsResponse.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MarketLiquidationOrderStreamsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `MarketLiquidationOrderStreamsResponse` properties. JSON:" + + " %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + // validate the optional field `o` + if (jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) { + AllMarketLiquidationOrderStreamsResponseO.validateJsonElement(jsonObj.get("o")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MarketLiquidationOrderStreamsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MarketLiquidationOrderStreamsResponse' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(MarketLiquidationOrderStreamsResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, MarketLiquidationOrderStreamsResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MarketLiquidationOrderStreamsResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of MarketLiquidationOrderStreamsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of MarketLiquidationOrderStreamsResponse + * @throws IOException if the JSON string is invalid with respect to + * MarketLiquidationOrderStreamsResponse + */ + public static MarketLiquidationOrderStreamsResponse fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, MarketLiquidationOrderStreamsResponse.class); + } + + /** + * Convert an instance of MarketLiquidationOrderStreamsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/OrderTradeUpdate.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/OrderTradeUpdate.java index 675563de4..7b68e9960 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/OrderTradeUpdate.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/OrderTradeUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** OrderTradeUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTradeUpdate extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -72,7 +72,7 @@ public OrderTradeUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -91,7 +91,7 @@ public OrderTradeUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ @@ -110,7 +110,7 @@ public OrderTradeUpdate iLowerCase(@jakarta.annotation.Nullable String iLowerCas } /** - * Get iLowerCase + * Account Alias * * @return iLowerCase */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/OrderTradeUpdateO.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/OrderTradeUpdateO.java index d5031160a..afaf84576 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/OrderTradeUpdateO.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/OrderTradeUpdateO.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderTradeUpdateO */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTradeUpdateO extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -111,6 +111,12 @@ public class OrderTradeUpdateO extends BaseDTO { @jakarta.annotation.Nullable private Long iLowerCase; + public static final String SERIALIZED_NAME_M = "M"; + + @SerializedName(SERIALIZED_NAME_M) + @jakarta.annotation.Nullable + private String M; + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) @@ -257,7 +263,7 @@ public OrderTradeUpdateO sLowerCase(@jakarta.annotation.Nullable String sLowerCa } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -276,7 +282,7 @@ public OrderTradeUpdateO cLowerCase(@jakarta.annotation.Nullable String cLowerCa } /** - * Get cLowerCase + * Client Order Id * * @return cLowerCase */ @@ -295,7 +301,7 @@ public OrderTradeUpdateO S(@jakarta.annotation.Nullable String S) { } /** - * Get S + * Side * * @return S */ @@ -314,7 +320,7 @@ public OrderTradeUpdateO oLowerCase(@jakarta.annotation.Nullable String oLowerCa } /** - * Get oLowerCase + * Order Type * * @return oLowerCase */ @@ -333,7 +339,7 @@ public OrderTradeUpdateO fLowerCase(@jakarta.annotation.Nullable String fLowerCa } /** - * Get fLowerCase + * Time in Force * * @return fLowerCase */ @@ -352,7 +358,7 @@ public OrderTradeUpdateO qLowerCase(@jakarta.annotation.Nullable String qLowerCa } /** - * Get qLowerCase + * Original Quantity * * @return qLowerCase */ @@ -371,7 +377,7 @@ public OrderTradeUpdateO pLowerCase(@jakarta.annotation.Nullable String pLowerCa } /** - * Get pLowerCase + * Original Price * * @return pLowerCase */ @@ -390,7 +396,7 @@ public OrderTradeUpdateO ap(@jakarta.annotation.Nullable String ap) { } /** - * Get ap + * Average Price * * @return ap */ @@ -409,7 +415,7 @@ public OrderTradeUpdateO sp(@jakarta.annotation.Nullable String sp) { } /** - * Get sp + * Stop Price. Please ignore with TRAILING_STOP_MARKET order * * @return sp */ @@ -428,7 +434,7 @@ public OrderTradeUpdateO xLowerCase(@jakarta.annotation.Nullable String xLowerCa } /** - * Get xLowerCase + * Execution Type * * @return xLowerCase */ @@ -447,7 +453,7 @@ public OrderTradeUpdateO X(@jakarta.annotation.Nullable String X) { } /** - * Get X + * Order Status * * @return X */ @@ -466,7 +472,7 @@ public OrderTradeUpdateO iLowerCase(@jakarta.annotation.Nullable Long iLowerCase } /** - * Get iLowerCase + * Order Id * * @return iLowerCase */ @@ -479,13 +485,33 @@ public void setiLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { this.iLowerCase = iLowerCase; } + public OrderTradeUpdateO M(@jakarta.annotation.Nullable String M) { + this.M = M; + return this; + } + + /** + * modifyId, only pushed for AMENDMENT (order modification) events when a modifyId was provided + * in the request + * + * @return M + */ + @jakarta.annotation.Nullable + public String getM() { + return M; + } + + public void setM(@jakarta.annotation.Nullable String M) { + this.M = M; + } + public OrderTradeUpdateO lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { this.lLowerCase = lLowerCase; return this; } /** - * Get lLowerCase + * Order Last Filled Quantity * * @return lLowerCase */ @@ -504,7 +530,7 @@ public OrderTradeUpdateO zLowerCase(@jakarta.annotation.Nullable String zLowerCa } /** - * Get zLowerCase + * Order Filled Accumulated Quantity * * @return zLowerCase */ @@ -523,7 +549,7 @@ public OrderTradeUpdateO L(@jakarta.annotation.Nullable String L) { } /** - * Get L + * Last Filled Price * * @return L */ @@ -542,7 +568,7 @@ public OrderTradeUpdateO ma(@jakarta.annotation.Nullable String ma) { } /** - * Get ma + * Margin Asset * * @return ma */ @@ -561,7 +587,7 @@ public OrderTradeUpdateO N(@jakarta.annotation.Nullable String N) { } /** - * Get N + * Commission Asset * * @return N */ @@ -580,7 +606,7 @@ public OrderTradeUpdateO nLowerCase(@jakarta.annotation.Nullable String nLowerCa } /** - * Get nLowerCase + * Commission * * @return nLowerCase */ @@ -599,7 +625,7 @@ public OrderTradeUpdateO T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Order Trade Time * * @return T */ @@ -618,7 +644,7 @@ public OrderTradeUpdateO tLowerCase(@jakarta.annotation.Nullable Long tLowerCase } /** - * Get tLowerCase + * Trade Id * * @return tLowerCase */ @@ -637,7 +663,7 @@ public OrderTradeUpdateO rp(@jakarta.annotation.Nullable String rp) { } /** - * Get rp + * Realized Profit of the trade * * @return rp */ @@ -656,7 +682,7 @@ public OrderTradeUpdateO bLowerCase(@jakarta.annotation.Nullable String bLowerCa } /** - * Get bLowerCase + * Bid quantity of base asset * * @return bLowerCase */ @@ -675,7 +701,7 @@ public OrderTradeUpdateO aLowerCase(@jakarta.annotation.Nullable String aLowerCa } /** - * Get aLowerCase + * Ask quantity of base asset * * @return aLowerCase */ @@ -694,7 +720,7 @@ public OrderTradeUpdateO mLowerCase(@jakarta.annotation.Nullable Boolean mLowerC } /** - * Get mLowerCase + * Is this trade the maker side? * * @return mLowerCase */ @@ -713,7 +739,7 @@ public OrderTradeUpdateO R(@jakarta.annotation.Nullable Boolean R) { } /** - * Get R + * Is this reduce only * * @return R */ @@ -732,7 +758,7 @@ public OrderTradeUpdateO wt(@jakarta.annotation.Nullable String wt) { } /** - * Get wt + * Stop Price Working Type * * @return wt */ @@ -751,7 +777,7 @@ public OrderTradeUpdateO ot(@jakarta.annotation.Nullable String ot) { } /** - * Get ot + * Original Order Type * * @return ot */ @@ -770,7 +796,7 @@ public OrderTradeUpdateO ps(@jakarta.annotation.Nullable String ps) { } /** - * Get ps + * Position Side * * @return ps */ @@ -789,7 +815,7 @@ public OrderTradeUpdateO cp(@jakarta.annotation.Nullable Boolean cp) { } /** - * Get cp + * If Close-All, pushed with conditional order * * @return cp */ @@ -808,7 +834,7 @@ public OrderTradeUpdateO AP(@jakarta.annotation.Nullable String AP) { } /** - * Get AP + * Activation Price, only pushed with TRAILING_STOP_MARKET order * * @return AP */ @@ -827,7 +853,7 @@ public OrderTradeUpdateO cr(@jakarta.annotation.Nullable String cr) { } /** - * Get cr + * Callback Rate, only pushed with TRAILING_STOP_MARKET order * * @return cr */ @@ -846,7 +872,7 @@ public OrderTradeUpdateO pP(@jakarta.annotation.Nullable Boolean pP) { } /** - * Get pP + * If conditional order trigger is protected * * @return pP */ @@ -865,7 +891,7 @@ public OrderTradeUpdateO V(@jakarta.annotation.Nullable String V) { } /** - * Get V + * STP mode * * @return V */ @@ -884,7 +910,7 @@ public OrderTradeUpdateO pm(@jakarta.annotation.Nullable String pm) { } /** - * Get pm + * Price match mode * * @return pm */ @@ -903,7 +929,7 @@ public OrderTradeUpdateO er(@jakarta.annotation.Nullable String er) { } /** - * Get er + * Expiry Reason * * @return er */ @@ -937,6 +963,7 @@ public boolean equals(Object o) { && Objects.equals(this.xLowerCase, orderTradeUpdateO.xLowerCase) && Objects.equals(this.X, orderTradeUpdateO.X) && Objects.equals(this.iLowerCase, orderTradeUpdateO.iLowerCase) + && Objects.equals(this.M, orderTradeUpdateO.M) && Objects.equals(this.lLowerCase, orderTradeUpdateO.lLowerCase) && Objects.equals(this.zLowerCase, orderTradeUpdateO.zLowerCase) && Objects.equals(this.L, orderTradeUpdateO.L) @@ -977,6 +1004,7 @@ public int hashCode() { xLowerCase, X, iLowerCase, + M, lLowerCase, zLowerCase, L, @@ -1018,6 +1046,7 @@ public String toString() { sb.append(" xLowerCase: ").append(toIndentedString(xLowerCase)).append("\n"); sb.append(" X: ").append(toIndentedString(X)).append("\n"); sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); + sb.append(" M: ").append(toIndentedString(M)).append("\n"); sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); sb.append(" zLowerCase: ").append(toIndentedString(zLowerCase)).append("\n"); sb.append(" L: ").append(toIndentedString(L)).append("\n"); @@ -1109,6 +1138,11 @@ public String toUrlQueryString() { String iLowerCaseValueAsString = iLowerCaseValue.toString(); valMap.put("iLowerCase", iLowerCaseValueAsString); } + String MValue = getM(); + if (MValue != null) { + String MValueAsString = MValue.toString(); + valMap.put("M", MValueAsString); + } String lLowerCaseValue = getlLowerCase(); if (lLowerCaseValue != null) { String lLowerCaseValueAsString = lLowerCaseValue.toString(); @@ -1283,6 +1317,10 @@ public Map toMap() { if (iLowerCaseValue != null) { valMap.put("iLowerCase", iLowerCaseValue); } + Object MValue = getM(); + if (MValue != null) { + valMap.put("M", MValue); + } Object lLowerCaseValue = getlLowerCase(); if (lLowerCaseValue != null) { valMap.put("lLowerCase", lLowerCaseValue); @@ -1413,6 +1451,7 @@ private String toIndentedString(Object o) { openapiFields.add("x"); openapiFields.add("X"); openapiFields.add("i"); + openapiFields.add("M"); openapiFields.add("l"); openapiFields.add("z"); openapiFields.add("L"); @@ -1559,6 +1598,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("X").toString())); } + if ((jsonObj.get("M") != null && !jsonObj.get("M").isJsonNull()) + && !jsonObj.get("M").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `M` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("M").toString())); + } if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) && !jsonObj.get("l").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/PartialBookDepthStreamsRequest.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/PartialBookDepthStreamsRequest.java index 295ef5b53..0ec85abb0 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/PartialBookDepthStreamsRequest.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/PartialBookDepthStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** PartialBookDepthStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PartialBookDepthStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,20 +49,20 @@ public class PartialBookDepthStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_LEVELS = "levels"; @SerializedName(SERIALIZED_NAME_LEVELS) - @jakarta.annotation.Nonnull - private Long levels; + @jakarta.annotation.Nullable + private Levels levels; public static final String SERIALIZED_NAME_UPDATE_SPEED = "updateSpeed"; @SerializedName(SERIALIZED_NAME_UPDATE_SPEED) @jakarta.annotation.Nullable - private String updateSpeed; + private UpdateSpeed updateSpeed; public PartialBookDepthStreamsRequest() {} @@ -71,7 +72,7 @@ public PartialBookDepthStreamsRequest id(@jakarta.annotation.Nullable String id) } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -84,27 +85,26 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public PartialBookDepthStreamsRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public PartialBookDepthStreamsRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } - public PartialBookDepthStreamsRequest levels(@jakarta.annotation.Nonnull Long levels) { + public PartialBookDepthStreamsRequest levels(@jakarta.annotation.Nullable Levels levels) { this.levels = levels; return this; } @@ -114,18 +114,18 @@ public PartialBookDepthStreamsRequest levels(@jakarta.annotation.Nonnull Long le * * @return levels */ - @jakarta.annotation.Nonnull - @NotNull - public Long getLevels() { + @jakarta.annotation.Nullable + @Valid + public Levels getLevels() { return levels; } - public void setLevels(@jakarta.annotation.Nonnull Long levels) { + public void setLevels(@jakarta.annotation.Nullable Levels levels) { this.levels = levels; } public PartialBookDepthStreamsRequest updateSpeed( - @jakarta.annotation.Nullable String updateSpeed) { + @jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; return this; } @@ -136,11 +136,12 @@ public PartialBookDepthStreamsRequest updateSpeed( * @return updateSpeed */ @jakarta.annotation.Nullable - public String getUpdateSpeed() { + @Valid + public UpdateSpeed getUpdateSpeed() { return updateSpeed; } - public void setUpdateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public void setUpdateSpeed(@jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; } @@ -191,12 +192,12 @@ public String toUrlQueryString() { String symbolValueAsString = symbolValue.toString(); valMap.put("symbol", symbolValueAsString); } - Long levelsValue = getLevels(); + Levels levelsValue = getLevels(); if (levelsValue != null) { String levelsValueAsString = levelsValue.toString(); valMap.put("levels", levelsValueAsString); } - String updateSpeedValue = getUpdateSpeed(); + UpdateSpeed updateSpeedValue = getUpdateSpeed(); if (updateSpeedValue != null) { String updateSpeedValueAsString = updateSpeedValue.toString(); valMap.put("updateSpeed", updateSpeedValueAsString); @@ -261,8 +262,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); - openapiRequiredFields.add("levels"); } /** @@ -295,16 +294,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PartialBookDepthStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -314,20 +303,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - if ((jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) - && !jsonObj.get("updateSpeed").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `updateSpeed` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("updateSpeed").toString())); + // validate the optional field `levels` + if (jsonObj.get("levels") != null && !jsonObj.get("levels").isJsonNull()) { + Levels.validateJsonElement(jsonObj.get("levels")); + } + // validate the optional field `updateSpeed` + if (jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) { + UpdateSpeed.validateJsonElement(jsonObj.get("updateSpeed")); } } diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/PartialBookDepthStreamsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/PartialBookDepthStreamsResponse.java index b36ab0811..cc4d3c913 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/PartialBookDepthStreamsResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/PartialBookDepthStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** PartialBookDepthStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PartialBookDepthStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -94,13 +94,19 @@ public class PartialBookDepthStreamsResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) @jakarta.annotation.Nullable - private List bLowerCase; + private List> bLowerCase; public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) @jakarta.annotation.Nullable - private List aLowerCase; + private List> aLowerCase; + + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; public PartialBookDepthStreamsResponse() {} @@ -111,7 +117,7 @@ public PartialBookDepthStreamsResponse eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -130,7 +136,7 @@ public PartialBookDepthStreamsResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -149,7 +155,7 @@ public PartialBookDepthStreamsResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction time * * @return T */ @@ -169,7 +175,7 @@ public PartialBookDepthStreamsResponse sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -188,7 +194,7 @@ public PartialBookDepthStreamsResponse ps(@jakarta.annotation.Nullable String ps } /** - * Get ps + * Pair * * @return ps */ @@ -207,7 +213,7 @@ public PartialBookDepthStreamsResponse U(@jakarta.annotation.Nullable Long U) { } /** - * Get U + * First update ID in event * * @return U */ @@ -227,7 +233,7 @@ public PartialBookDepthStreamsResponse uLowerCase( } /** - * Get uLowerCase + * updateId * * @return uLowerCase */ @@ -246,7 +252,7 @@ public PartialBookDepthStreamsResponse pu(@jakarta.annotation.Nullable Long pu) } /** - * Get pu + * Final update Id in last stream(ie `u` in last stream) * * @return pu */ @@ -260,13 +266,12 @@ public void setPu(@jakarta.annotation.Nullable Long pu) { } public PartialBookDepthStreamsResponse bLowerCase( - @jakarta.annotation.Nullable List bLowerCase) { + @jakarta.annotation.Nullable List> bLowerCase) { this.bLowerCase = bLowerCase; return this; } - public PartialBookDepthStreamsResponse addBLowerCaseItem( - PartialBookDepthStreamsResponseBItem bLowerCaseItem) { + public PartialBookDepthStreamsResponse addBLowerCaseItem(List bLowerCaseItem) { if (this.bLowerCase == null) { this.bLowerCase = new ArrayList<>(); } @@ -275,29 +280,27 @@ public PartialBookDepthStreamsResponse addBLowerCaseItem( } /** - * Get bLowerCase + * Bids to be updated * * @return bLowerCase */ @jakarta.annotation.Nullable @Valid - public List getbLowerCase() { + public List> getbLowerCase() { return bLowerCase; } - public void setbLowerCase( - @jakarta.annotation.Nullable List bLowerCase) { + public void setbLowerCase(@jakarta.annotation.Nullable List> bLowerCase) { this.bLowerCase = bLowerCase; } public PartialBookDepthStreamsResponse aLowerCase( - @jakarta.annotation.Nullable List aLowerCase) { + @jakarta.annotation.Nullable List> aLowerCase) { this.aLowerCase = aLowerCase; return this; } - public PartialBookDepthStreamsResponse addALowerCaseItem( - PartialBookDepthStreamsResponseAItem aLowerCaseItem) { + public PartialBookDepthStreamsResponse addALowerCaseItem(List aLowerCaseItem) { if (this.aLowerCase == null) { this.aLowerCase = new ArrayList<>(); } @@ -306,21 +309,39 @@ public PartialBookDepthStreamsResponse addALowerCaseItem( } /** - * Get aLowerCase + * Asks to be updated * * @return aLowerCase */ @jakarta.annotation.Nullable @Valid - public List getaLowerCase() { + public List> getaLowerCase() { return aLowerCase; } - public void setaLowerCase( - @jakarta.annotation.Nullable List aLowerCase) { + public void setaLowerCase(@jakarta.annotation.Nullable List> aLowerCase) { this.aLowerCase = aLowerCase; } + public PartialBookDepthStreamsResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -340,13 +361,14 @@ public boolean equals(Object o) { && Objects.equals(this.uLowerCase, partialBookDepthStreamsResponse.uLowerCase) && Objects.equals(this.pu, partialBookDepthStreamsResponse.pu) && Objects.equals(this.bLowerCase, partialBookDepthStreamsResponse.bLowerCase) - && Objects.equals(this.aLowerCase, partialBookDepthStreamsResponse.aLowerCase); + && Objects.equals(this.aLowerCase, partialBookDepthStreamsResponse.aLowerCase) + && Objects.equals(this.st, partialBookDepthStreamsResponse.st); } @Override public int hashCode() { return Objects.hash( - eLowerCase, E, T, sLowerCase, ps, U, uLowerCase, pu, bLowerCase, aLowerCase); + eLowerCase, E, T, sLowerCase, ps, U, uLowerCase, pu, bLowerCase, aLowerCase, st); } @Override @@ -363,6 +385,7 @@ public String toString() { sb.append(" pu: ").append(toIndentedString(pu)).append("\n"); sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -411,16 +434,21 @@ public String toUrlQueryString() { String puValueAsString = puValue.toString(); valMap.put("pu", puValueAsString); } - List bLowerCaseValue = getbLowerCase(); + List> bLowerCaseValue = getbLowerCase(); if (bLowerCaseValue != null) { String bLowerCaseValueAsString = JSON.getGson().toJson(bLowerCaseValue); valMap.put("bLowerCase", bLowerCaseValueAsString); } - List aLowerCaseValue = getaLowerCase(); + List> aLowerCaseValue = getaLowerCase(); if (aLowerCaseValue != null) { String aLowerCaseValueAsString = JSON.getGson().toJson(aLowerCaseValue); valMap.put("aLowerCase", aLowerCaseValueAsString); } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -472,6 +500,10 @@ public Map toMap() { if (aLowerCaseValue != null) { valMap.put("aLowerCase", aLowerCaseValue); } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -508,6 +540,7 @@ private String toIndentedString(Object o) { openapiFields.add("pu"); openapiFields.add("b"); openapiFields.add("a"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/PartialBookDepthStreamsResponseAItem.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/PartialBookDepthStreamsResponseAItem.java deleted file mode 100644 index 31b1c921b..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/PartialBookDepthStreamsResponseAItem.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model; - -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** PartialBookDepthStreamsResponseAItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PartialBookDepthStreamsResponseAItem extends ArrayList { - public PartialBookDepthStreamsResponseAItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PartialBookDepthStreamsResponseAItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * PartialBookDepthStreamsResponseAItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PartialBookDepthStreamsResponseAItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PartialBookDepthStreamsResponseAItem" - + " is not found in the empty JSON string", - PartialBookDepthStreamsResponseAItem.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PartialBookDepthStreamsResponseAItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PartialBookDepthStreamsResponseAItem` properties. JSON:" - + " %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PartialBookDepthStreamsResponseAItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PartialBookDepthStreamsResponseAItem' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(PartialBookDepthStreamsResponseAItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, PartialBookDepthStreamsResponseAItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public PartialBookDepthStreamsResponseAItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PartialBookDepthStreamsResponseAItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of PartialBookDepthStreamsResponseAItem - * @throws IOException if the JSON string is invalid with respect to - * PartialBookDepthStreamsResponseAItem - */ - public static PartialBookDepthStreamsResponseAItem fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, PartialBookDepthStreamsResponseAItem.class); - } - - /** - * Convert an instance of PartialBookDepthStreamsResponseAItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/PartialBookDepthStreamsResponseBItem.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/PartialBookDepthStreamsResponseBItem.java deleted file mode 100644 index cde908adc..000000000 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/PartialBookDepthStreamsResponseBItem.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model; - -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** PartialBookDepthStreamsResponseBItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PartialBookDepthStreamsResponseBItem extends ArrayList { - public PartialBookDepthStreamsResponseBItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PartialBookDepthStreamsResponseBItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * PartialBookDepthStreamsResponseBItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PartialBookDepthStreamsResponseBItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PartialBookDepthStreamsResponseBItem" - + " is not found in the empty JSON string", - PartialBookDepthStreamsResponseBItem.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PartialBookDepthStreamsResponseBItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PartialBookDepthStreamsResponseBItem` properties. JSON:" - + " %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PartialBookDepthStreamsResponseBItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PartialBookDepthStreamsResponseBItem' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(PartialBookDepthStreamsResponseBItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, PartialBookDepthStreamsResponseBItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public PartialBookDepthStreamsResponseBItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PartialBookDepthStreamsResponseBItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of PartialBookDepthStreamsResponseBItem - * @throws IOException if the JSON string is invalid with respect to - * PartialBookDepthStreamsResponseBItem - */ - public static PartialBookDepthStreamsResponseBItem fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, PartialBookDepthStreamsResponseBItem.class); - } - - /** - * Convert an instance of PartialBookDepthStreamsResponseBItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/StrategyUpdate.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/StrategyUpdate.java index 98e653c79..08034ba3a 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/StrategyUpdate.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/StrategyUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** StrategyUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class StrategyUpdate extends BaseDTO { public static final String SERIALIZED_NAME_T = "T"; @@ -66,7 +66,7 @@ public StrategyUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ @@ -85,7 +85,7 @@ public StrategyUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/StrategyUpdateSu.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/StrategyUpdateSu.java index 3daf7f4a7..5f390f301 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/StrategyUpdateSu.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/StrategyUpdateSu.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** StrategyUpdateSu */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class StrategyUpdateSu extends BaseDTO { public static final String SERIALIZED_NAME_SI = "si"; @@ -83,7 +83,7 @@ public StrategyUpdateSu si(@jakarta.annotation.Nullable Long si) { } /** - * Get si + * Strategy ID * * @return si */ @@ -102,7 +102,7 @@ public StrategyUpdateSu st(@jakarta.annotation.Nullable String st) { } /** - * Get st + * Strategy Type * * @return st */ @@ -121,7 +121,7 @@ public StrategyUpdateSu ss(@jakarta.annotation.Nullable String ss) { } /** - * Get ss + * Strategy Status * * @return ss */ @@ -140,7 +140,7 @@ public StrategyUpdateSu sLowerCase(@jakarta.annotation.Nullable String sLowerCas } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -159,7 +159,7 @@ public StrategyUpdateSu ut(@jakarta.annotation.Nullable Long ut) { } /** - * Get ut + * Update Time * * @return ut */ @@ -178,7 +178,7 @@ public StrategyUpdateSu cLowerCase(@jakarta.annotation.Nullable Long cLowerCase) } /** - * Get cLowerCase + * opCode * * @return cLowerCase */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/UpdateSpeed.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/UpdateSpeed.java new file mode 100644 index 000000000..0bc3624ec --- /dev/null +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/UpdateSpeed.java @@ -0,0 +1,73 @@ +/* + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets updateSpeed */ +@JsonAdapter(UpdateSpeed.Adapter.class) +public enum UpdateSpeed { + UPDATE_SPEED_100ms("100ms"), + + UPDATE_SPEED_500ms("500ms"); + + private String value; + + UpdateSpeed(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static UpdateSpeed fromValue(String value) { + for (UpdateSpeed b : UpdateSpeed.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UpdateSpeed enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UpdateSpeed read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UpdateSpeed.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UpdateSpeed.fromValue(value); + } +} diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/UserDataStreamEventsResponse.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/UserDataStreamEventsResponse.java index 585705f6d..135f820d8 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/UserDataStreamEventsResponse.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/UserDataStreamEventsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams + * Futures (COIN-M) WebSocket Market Streams + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -33,7 +33,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserDataStreamEventsResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(UserDataStreamEventsResponse.class.getName()); @@ -53,14 +53,14 @@ public TypeAdapter create(Gson gson, TypeToken type) { gson.getDelegateAdapter(this, TypeToken.get(AccountUpdate.class)); final TypeAdapter adapterGridUpdate = gson.getDelegateAdapter(this, TypeToken.get(GridUpdate.class)); + final TypeAdapter adapterListenKeyExpired = + gson.getDelegateAdapter(this, TypeToken.get(ListenKeyExpired.class)); final TypeAdapter adapterMarginCall = gson.getDelegateAdapter(this, TypeToken.get(MarginCall.class)); final TypeAdapter adapterOrderTradeUpdate = gson.getDelegateAdapter(this, TypeToken.get(OrderTradeUpdate.class)); final TypeAdapter adapterStrategyUpdate = gson.getDelegateAdapter(this, TypeToken.get(StrategyUpdate.class)); - final TypeAdapter adapterListenkeyexpired = - gson.getDelegateAdapter(this, TypeToken.get(Listenkeyexpired.class)); return (TypeAdapter) new TypeAdapter() { @@ -96,6 +96,14 @@ public void write(JsonWriter out, UserDataStreamEventsResponse value) elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `ListenKeyExpired` + if (value.getActualInstance() instanceof ListenKeyExpired) { + JsonElement element = + adapterListenKeyExpired.toJsonTree( + (ListenKeyExpired) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `MarginCall` if (value.getActualInstance() instanceof MarginCall) { JsonElement element = @@ -120,18 +128,10 @@ public void write(JsonWriter out, UserDataStreamEventsResponse value) elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Listenkeyexpired` - if (value.getActualInstance() instanceof Listenkeyexpired) { - JsonElement element = - adapterListenkeyexpired.toJsonTree( - (Listenkeyexpired) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } throw new IOException( "Failed to serialize as the type doesn't match oneOf schemas:" + " AccountConfigUpdate, AccountUpdate, GridUpdate," - + " Listenkeyexpired, MarginCall, OrderTradeUpdate," + + " ListenKeyExpired, MarginCall, OrderTradeUpdate," + " StrategyUpdate"); } @@ -190,47 +190,7 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { return newUserDataStreamEventsResponse; case "listenKeyExpired": deserialized = - adapterListenkeyexpired.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "accountConfigUpdate": - deserialized = - adapterAccountConfigUpdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "accountUpdate": - deserialized = - adapterAccountUpdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "gridUpdate": - deserialized = adapterGridUpdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "listenkeyexpired": - deserialized = - adapterListenkeyexpired.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "marginCall": - deserialized = adapterMarginCall.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "orderTradeUpdate": - deserialized = - adapterOrderTradeUpdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "strategyUpdate": - deserialized = - adapterStrategyUpdate.fromJsonTree(jsonObject); + adapterListenKeyExpired.fromJsonTree(jsonObject); newUserDataStreamEventsResponse.setActualInstance( deserialized); return newUserDataStreamEventsResponse; @@ -246,12 +206,8 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { + " ACCOUNT_CONFIG_UPDATE" + " ACCOUNT_UPDATE GRID_UPDATE" + " MARGIN_CALL ORDER_TRADE_UPDATE" - + " STRATEGY_UPDATE listenKeyExpired" - + " accountConfigUpdate accountUpdate" - + " gridUpdate listenkeyexpired" - + " marginCall orderTradeUpdate" - + " strategyUpdate. Falling back to" - + " String.", + + " STRATEGY_UPDATE listenKeyExpired." + + " Falling back to String.", jsonObject.get("e").getAsString())); } } @@ -318,6 +274,27 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { "Input data does not match schema 'GridUpdate'", e); } + // deserialize ListenKeyExpired + try { + // validate the JSON object to see if any exception is thrown + ListenKeyExpired.validateJsonElement(jsonElement); + actualAdapter = adapterListenKeyExpired; + match++; + log.log( + Level.FINER, + "Input data matches schema 'ListenKeyExpired'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for ListenKeyExpired failed with" + + " `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'ListenKeyExpired'", + e); + } // deserialize MarginCall try { // validate the JSON object to see if any exception is thrown @@ -376,27 +353,6 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { "Input data does not match schema 'StrategyUpdate'", e); } - // deserialize Listenkeyexpired - try { - // validate the JSON object to see if any exception is thrown - Listenkeyexpired.validateJsonElement(jsonElement); - actualAdapter = adapterListenkeyexpired; - match++; - log.log( - Level.FINER, - "Input data matches schema 'Listenkeyexpired'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for Listenkeyexpired failed with" - + " `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'Listenkeyexpired'", - e); - } if (match == 1) { UserDataStreamEventsResponse ret = @@ -433,10 +389,10 @@ public UserDataStreamEventsResponse(Object o) { schemas.put("AccountConfigUpdate", AccountConfigUpdate.class); schemas.put("AccountUpdate", AccountUpdate.class); schemas.put("GridUpdate", GridUpdate.class); + schemas.put("ListenKeyExpired", ListenKeyExpired.class); schemas.put("MarginCall", MarginCall.class); schemas.put("OrderTradeUpdate", OrderTradeUpdate.class); schemas.put("StrategyUpdate", StrategyUpdate.class); - schemas.put("Listenkeyexpired", Listenkeyexpired.class); } @Override @@ -447,7 +403,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid * against the oneOf child schemas: AccountConfigUpdate, AccountUpdate, GridUpdate, - * Listenkeyexpired, MarginCall, OrderTradeUpdate, StrategyUpdate + * ListenKeyExpired, MarginCall, OrderTradeUpdate, StrategyUpdate * *

It could be an instance of the 'oneOf' schemas. */ @@ -468,37 +424,37 @@ public void setActualInstance(Object instance) { return; } - if (instance instanceof MarginCall) { + if (instance instanceof ListenKeyExpired) { super.setActualInstance(instance); return; } - if (instance instanceof OrderTradeUpdate) { + if (instance instanceof MarginCall) { super.setActualInstance(instance); return; } - if (instance instanceof StrategyUpdate) { + if (instance instanceof OrderTradeUpdate) { super.setActualInstance(instance); return; } - if (instance instanceof Listenkeyexpired) { + if (instance instanceof StrategyUpdate) { super.setActualInstance(instance); return; } throw new RuntimeException( "Invalid instance type. Must be AccountConfigUpdate, AccountUpdate, GridUpdate," - + " Listenkeyexpired, MarginCall, OrderTradeUpdate, StrategyUpdate"); + + " ListenKeyExpired, MarginCall, OrderTradeUpdate, StrategyUpdate"); } /** * Get the actual instance, which can be the following: AccountConfigUpdate, AccountUpdate, - * GridUpdate, Listenkeyexpired, MarginCall, OrderTradeUpdate, StrategyUpdate + * GridUpdate, ListenKeyExpired, MarginCall, OrderTradeUpdate, StrategyUpdate * * @return The actual instance (AccountConfigUpdate, AccountUpdate, GridUpdate, - * Listenkeyexpired, MarginCall, OrderTradeUpdate, StrategyUpdate) + * ListenKeyExpired, MarginCall, OrderTradeUpdate, StrategyUpdate) */ @SuppressWarnings("unchecked") @Override @@ -539,6 +495,17 @@ public GridUpdate getGridUpdate() throws ClassCastException { return (GridUpdate) super.getActualInstance(); } + /** + * Get the actual instance of `ListenKeyExpired`. If the actual instance is not + * `ListenKeyExpired`, the ClassCastException will be thrown. + * + * @return The actual instance of `ListenKeyExpired` + * @throws ClassCastException if the instance is not `ListenKeyExpired` + */ + public ListenKeyExpired getListenKeyExpired() throws ClassCastException { + return (ListenKeyExpired) super.getActualInstance(); + } + /** * Get the actual instance of `MarginCall`. If the actual instance is not `MarginCall`, the * ClassCastException will be thrown. @@ -572,17 +539,6 @@ public StrategyUpdate getStrategyUpdate() throws ClassCastException { return (StrategyUpdate) super.getActualInstance(); } - /** - * Get the actual instance of `Listenkeyexpired`. If the actual instance is not - * `Listenkeyexpired`, the ClassCastException will be thrown. - * - * @return The actual instance of `Listenkeyexpired` - * @throws ClassCastException if the instance is not `Listenkeyexpired` - */ - public Listenkeyexpired getListenkeyexpired() throws ClassCastException { - return (Listenkeyexpired) super.getActualInstance(); - } - /** * Validates the JSON Element and throws an exception if issues found * @@ -625,6 +581,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Deserialization for GridUpdate failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with ListenKeyExpired + try { + ListenKeyExpired.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for ListenKeyExpired failed with `%s`.", + e.getMessage())); + // continue to the next one + } // validate the json string with MarginCall try { MarginCall.validateJsonElement(jsonElement); @@ -657,23 +624,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti e.getMessage())); // continue to the next one } - // validate the json string with Listenkeyexpired - try { - Listenkeyexpired.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for Listenkeyexpired failed with `%s`.", - e.getMessage())); - // continue to the next one - } if (validCount != 1) { throw new IOException( String.format( "The JSON string is invalid for UserDataStreamEventsResponse with oneOf" + " schemas: AccountConfigUpdate, AccountUpdate, GridUpdate," - + " Listenkeyexpired, MarginCall, OrderTradeUpdate, StrategyUpdate." + + " ListenKeyExpired, MarginCall, OrderTradeUpdate, StrategyUpdate." + " %d class(es) match the result, expected 1. Detailed failure" + " message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); diff --git a/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/AccountApiTest.java b/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/AccountApiTest.java index 829a3dfdc..bd4264f22 100644 --- a/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/AccountApiTest.java +++ b/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/AccountApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -33,10 +33,12 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetFuturesTradeDownloadLinkByIdResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetFuturesTransactionHistoryDownloadLinkByIdResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetIncomeHistoryResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.IncomeType; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.NotionalBracketForPairResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.NotionalBracketForSymbolResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.UserCommissionRateResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -90,15 +92,15 @@ public void initApiClient() throws ApiException { /** * Account Information (USER_DATA) * - *

Get current account information. * for One-way Mode user, the \"positions\" will - * only show the \"BOTH\" positions * for Hedge Mode user, the \"positions\" - * will show \"BOTH\", \"LONG\", and \"SHORT\" positions. Weight: - * 5 + *

Get current account information. Weight(IP): 5 Security Type: USER_DATA Notes: - for + * One-way Mode user, the \"positions\" will only show the \"BOTH\" + * positions - for Hedge Mode user, the \"positions\" will show \"BOTH\", + * \"LONG\", and \"SHORT\" positions. * * @throws ApiException if the Api call fails */ @Test - public void accountInformationTest() throws ApiException, CryptoException { + public void accountInformationTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.accountInformation(recvWindow); @@ -114,20 +116,19 @@ public void accountInformationTest() throws ApiException, CryptoException { assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/account", actualRequest.url().encodedPath()); } /** * Futures Account Balance (USER_DATA) * - *

Check futures account balance Weight: 1 + *

Check futures account balance Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void futuresAccountBalanceTest() throws ApiException, CryptoException { + public void futuresAccountBalanceTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.futuresAccountBalance(recvWindow); @@ -149,15 +150,15 @@ public void futuresAccountBalanceTest() throws ApiException, CryptoException { } /** - * Get Current Position Mode(USER_DATA) + * Get Current Position Mode (USER_DATA) * - *

Get user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol*** Weight: - * 30 + *

Get user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol*** + * Weight(IP): 30 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getCurrentPositionModeTest() throws ApiException, CryptoException { + public void getCurrentPositionModeTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getCurrentPositionMode(recvWindow); @@ -182,14 +183,17 @@ public void getCurrentPositionModeTest() throws ApiException, CryptoException { /** * Get Download Id For Futures Order History (USER_DATA) * - *

Get Download Id For Futures Order History * Request Limitation is 10 times per month, - * shared by front end download page and rest api * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 5 + *

Get Download Id For Futures Order History Weight(IP): 1000 Security Type: USER_DATA Notes: + * - Request Limitation is 8 times per month, shared by front end download page and rest api - + * This endpoint uses the IP rate limit bucket and costs 1000 weight per call. The maximum is 2 + * calls per minute; the 3rd call within the same minute will trigger a ban. - The time between + * `startTime` and `endTime` can not be longer than 1 year * * @throws ApiException if the Api call fails */ @Test - public void getDownloadIdForFuturesOrderHistoryTest() throws ApiException, CryptoException { + public void getDownloadIdForFuturesOrderHistoryTest() + throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; @@ -207,25 +211,28 @@ public void getDownloadIdForFuturesOrderHistoryTest() throws ApiException, Crypt Request actualRequest = captorValue.request(); assertEquals( - "startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "812caedbe8f349196a4532c2050ff706ed2569fed185039c7b60a78cd84bc718", actualRequest.url().queryParameter("signature")); - assertEquals("/dapi/v1/order/asyn", actualRequest.url().encodedPath()); + assertEquals( + "/dapi/v1/order/asyn", actualRequest.url().encodedPath()); } /** * Get Download Id For Futures Trade History (USER_DATA) * - *

Get download id for futures trade history * Request Limitation is 5 times per month, - * shared by front end download page and rest api * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 5 + *

Get download id for futures trade history Weight(IP): 1000 Security Type: USER_DATA Notes: + * - Request Limitation is 8 times per month, shared by front end download page and rest api - + * This endpoint uses the IP rate limit bucket and costs 1000 weight per call. The maximum is 2 + * calls per minute; the 3rd call within the same minute will trigger a ban. - The time between + * `startTime` and `endTime` can not be longer than 1 year * * @throws ApiException if the Api call fails */ @Test - public void getDownloadIdForFuturesTradeHistoryTest() throws ApiException, CryptoException { + public void getDownloadIdForFuturesTradeHistoryTest() + throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; @@ -243,26 +250,28 @@ public void getDownloadIdForFuturesTradeHistoryTest() throws ApiException, Crypt Request actualRequest = captorValue.request(); assertEquals( - "startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "812caedbe8f349196a4532c2050ff706ed2569fed185039c7b60a78cd84bc718", actualRequest.url().queryParameter("signature")); - assertEquals("/dapi/v1/trade/asyn", actualRequest.url().encodedPath()); + assertEquals( + "/dapi/v1/trade/asyn", actualRequest.url().encodedPath()); } /** - * Get Download Id For Futures Transaction History(USER_DATA) + * Get Download Id For Futures Transaction History (USER_DATA) * - *

Get download id for futures transaction history * Request Limitation is 5 times per month, - * shared by front end download page and rest api * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 5 + *

Get download id for futures transaction history Weight(IP): 1000 Security Type: USER_DATA + * Notes: - Request Limitation is 8 times per month, shared by front end download page and rest + * api - This endpoint uses the IP rate limit bucket and costs 1000 weight per call. The maximum + * is 2 calls per minute; the 3rd call within the same minute will trigger a ban. - The time + * between `startTime` and `endTime` can not be longer than 1 year * * @throws ApiException if the Api call fails */ @Test public void getDownloadIdForFuturesTransactionHistoryTest() - throws ApiException, CryptoException { + throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; @@ -285,19 +294,23 @@ public void getDownloadIdForFuturesTransactionHistoryTest() assertEquals( "812caedbe8f349196a4532c2050ff706ed2569fed185039c7b60a78cd84bc718", actualRequest.url().queryParameter("signature")); - assertEquals("/dapi/v1/income/asyn", actualRequest.url().encodedPath()); + assertEquals( + "/dapi/v1/income/asyn", + actualRequest.url().encodedPath()); } /** * Get Futures Order History Download Link by Id (USER_DATA) * - *

Get futures order history download link by Id * Download link expiration: 24h Weight: 5 + *

Get futures order history download link by Id Weight(IP): 5 Security Type: USER_DATA + * Notes: - Download link expiration: 7 days * * @throws ApiException if the Api call fails */ @Test - public void getFuturesOrderHistoryDownloadLinkByIdTest() throws ApiException, CryptoException { - String downloadId = "1"; + public void getFuturesOrderHistoryDownloadLinkByIdTest() + throws ApiException, CryptoException, IOException { + String downloadId = "545923594199212032"; Long recvWindow = 5000L; ApiResponse response = api.getFuturesOrderHistoryDownloadLinkById(downloadId, recvWindow); @@ -313,23 +326,27 @@ public void getFuturesOrderHistoryDownloadLinkByIdTest() throws ApiException, Cr Request actualRequest = captorValue.request(); assertEquals( - "downloadId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + "downloadId=545923594199212032&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); assertEquals( - "4947fe463a17e3ec0b50fc22b21afc2aafddf3da892fa0c8dfd1b9c50af87349", + "638547334c9bc29c0b148d1084ee5f9ba70e01bb0f80f5ab8b59e1b056942563", actualRequest.url().queryParameter("signature")); - assertEquals("/dapi/v1/order/asyn/id", actualRequest.url().encodedPath()); + assertEquals( + "/dapi/v1/order/asyn/id", actualRequest.url().encodedPath()); } /** - * Get Futures Trade Download Link by Id(USER_DATA) + * Get Futures Trade Download Link by Id (USER_DATA) * - *

Get futures trade download link by Id * Download link expiration: 24h Weight: 5 + *

Get futures trade download link by Id Weight(IP): 5 Security Type: USER_DATA Notes: - + * Download link expiration: 7 days * * @throws ApiException if the Api call fails */ @Test - public void getFuturesTradeDownloadLinkByIdTest() throws ApiException, CryptoException { - String downloadId = "1"; + public void getFuturesTradeDownloadLinkByIdTest() + throws ApiException, CryptoException, IOException { + String downloadId = "545923594199212032"; Long recvWindow = 5000L; ApiResponse response = api.getFuturesTradeDownloadLinkById(downloadId, recvWindow); @@ -344,10 +361,9 @@ public void getFuturesTradeDownloadLinkByIdTest() throws ApiException, CryptoExc Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("downloadId=545923594199212032&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "downloadId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "4947fe463a17e3ec0b50fc22b21afc2aafddf3da892fa0c8dfd1b9c50af87349", + "638547334c9bc29c0b148d1084ee5f9ba70e01bb0f80f5ab8b59e1b056942563", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/trade/asyn/id", actualRequest.url().encodedPath()); } @@ -355,15 +371,15 @@ public void getFuturesTradeDownloadLinkByIdTest() throws ApiException, CryptoExc /** * Get Futures Transaction History Download Link by Id (USER_DATA) * - *

Get futures transaction history download link by Id * Download link expiration: 24h - * Weight: 5 + *

Get futures transaction history download link by Id Weight(IP): 5 Security Type: USER_DATA + * Notes: - Download link expiration: 7 days * * @throws ApiException if the Api call fails */ @Test public void getFuturesTransactionHistoryDownloadLinkByIdTest() - throws ApiException, CryptoException { - String downloadId = "1"; + throws ApiException, CryptoException, IOException { + String downloadId = "545923594199212032"; Long recvWindow = 5000L; ApiResponse response = api.getFuturesTransactionHistoryDownloadLinkById(downloadId, recvWindow); @@ -379,31 +395,34 @@ public void getFuturesTransactionHistoryDownloadLinkByIdTest() Request actualRequest = captorValue.request(); assertEquals( - "downloadId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + "downloadId=545923594199212032&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); assertEquals( - "4947fe463a17e3ec0b50fc22b21afc2aafddf3da892fa0c8dfd1b9c50af87349", + "638547334c9bc29c0b148d1084ee5f9ba70e01bb0f80f5ab8b59e1b056942563", actualRequest.url().queryParameter("signature")); - assertEquals("/dapi/v1/income/asyn/id", actualRequest.url().encodedPath()); + assertEquals( + "/dapi/v1/income/asyn/id", + actualRequest.url().encodedPath()); } /** - * Get Income History(USER_DATA) + * Get Income History (USER_DATA) * - *

Get income history * If `incomeType ` is not sent, all kinds of flow will be - * returned * \"trandId\" is unique in the same \"incomeType\" for a user * - * The time between `startTime` and `endTime` can not be longer than 1 year - * Weight: 20 + *

Get income history Weight(IP): 20 Security Type: USER_DATA Notes: - If `incomeType + * ` is not sent, all kinds of flow will be returned - \"trandId\" is unique in + * the same \"incomeType\" for a user - The time between `startTime` and + * `endTime` can not be longer than 1 year * * @throws ApiException if the Api call fails */ @Test - public void getIncomeHistoryTest() throws ApiException, CryptoException { - String symbol = ""; - String incomeType = ""; + public void getIncomeHistoryTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + IncomeType incomeType = IncomeType.TRANSFER; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long page = 0L; - Long limit = 100L; + Long page = 1L; + Long limit = 30L; Long recvWindow = 5000L; ApiResponse response = api.getIncomeHistory( @@ -419,29 +438,26 @@ public void getIncomeHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&incomeType=TRANSFER&startTime=1623319461670&endTime=1641782889000&page=1&limit=30&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&incomeType=&startTime=1623319461670&endTime=1641782889000&page=0&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "05f9946fedf735df42817e55ffdc78ca315f60a95c723d2f957b7ce76546ef2e", - actualRequest.url().queryParameter("signature")); + "128f16c42dd66df38dc3a5d0a15371edcdb1bf4c2d103347020dcb40ccb5fb0c", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/income", actualRequest.url().encodedPath()); } /** - * Notional Bracket for Pair(USER_DATA) + * Notional Bracket for Pair (USER_DATA) * *

**Not recommended to continue using this v1 endpoint** Get the pair's default notional * bracket list, may return ambiguous values when there have been multiple different * `symbol` brackets under the `pair`, suggest using the following `GET * /dapi/v2/leverageBracket` query instead to get the specific `symbol` notional - * bracket list. Weight: 1 + * bracket list. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void notionalBracketForPairTest() throws ApiException, CryptoException { - String pair = ""; + public void notionalBracketForPairTest() throws ApiException, CryptoException, IOException { + String pair = "BTCUSD"; Long recvWindow = 5000L; ApiResponse response = api.notionalBracketForPair(pair, recvWindow); @@ -456,23 +472,24 @@ public void notionalBracketForPairTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("pair=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("pair=BTCUSD&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "ca1d3c60bdcdd0a059d6e271455558cbdeb37973a99d026324dc2572ec1e9003", + "4acfa4ebccb6a7466cf14478aeee4f5b3aaa2ff52a0a4378034f2627b149a50b", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/leverageBracket", actualRequest.url().encodedPath()); } /** - * Notional Bracket for Symbol(USER_DATA) + * Notional Bracket for Symbol (USER_DATA) * - *

Get the symbol's notional bracket list. Weight: 1 + *

Get the symbol's notional bracket list. Weight: 1 (after CM migration: 1 with + * `symbol` / 2 without `symbol`) Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void notionalBracketForSymbolTest() throws ApiException, CryptoException { - String symbol = ""; + public void notionalBracketForSymbolTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_PERP"; Long recvWindow = 5000L; ApiResponse response = api.notionalBracketForSymbol(symbol, recvWindow); @@ -487,9 +504,9 @@ public void notionalBracketForSymbolTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSD_PERP&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "679c9ba4d1c806201ba4eeced5c351c5c25ae83e4f1601cb9f5e59942a1b8e7a", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v2/leverageBracket", actualRequest.url().encodedPath()); } @@ -497,13 +514,13 @@ public void notionalBracketForSymbolTest() throws ApiException, CryptoException /** * User Commission Rate (USER_DATA) * - *

Query user commission rate Weight: 20 + *

Query user commission rate Weight(IP): 20 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void userCommissionRateTest() throws ApiException, CryptoException { - String symbol = ""; + public void userCommissionRateTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_PERP"; Long recvWindow = 5000L; ApiResponse response = api.userCommissionRate(symbol, recvWindow); @@ -518,10 +535,9 @@ public void userCommissionRateTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSD_PERP&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", - actualRequest.url().queryParameter("signature")); + "679c9ba4d1c806201ba4eeced5c351c5c25ae83e4f1601cb9f5e59942a1b8e7a", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/commissionRate", actualRequest.url().encodedPath()); } } diff --git a/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/MarketDataApiTest.java b/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/MarketDataApiTest.java index fc5234376..fd171dab7 100644 --- a/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/MarketDataApiTest.java +++ b/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/MarketDataApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -52,6 +52,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.TopTraderLongShortRatioAccountsResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.TopTraderLongShortRatioPositionsResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -105,17 +106,17 @@ public void initApiClient() throws ApiException { /** * Basis * - *

Query basis * If startTime and endTime are not sent, the most recent data is returned. * - * Only the data of the latest 30 days is available. Weight: 1 + *

Query basis Weight(IP): 1 Notes: - If startTime and endTime are not sent, the most recent + * data is returned. - Only the data of the latest 30 days is available. * * @throws ApiException if the Api call fails */ @Test - public void basisTest() throws ApiException, CryptoException { + public void basisTest() throws ApiException, CryptoException, IOException { String pair = ""; - ContractType contractType = ContractType.PERPETUAL; + ContractType contractType = ContractType.ALL; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 30L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = @@ -135,12 +136,12 @@ public void basisTest() throws ApiException, CryptoException { /** * Check Server time * - *

Test connectivity to the Rest API and get the current server time. Weight: 1 + *

Test connectivity to the Rest API and get the current server time. Weight(IP): 1 * * @throws ApiException if the Api call fails */ @Test - public void checkServerTimeTest() throws ApiException, CryptoException { + public void checkServerTimeTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.checkServerTime(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -150,7 +151,8 @@ public void checkServerTimeTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/time", actualRequest.url().encodedPath()); } @@ -158,25 +160,26 @@ public void checkServerTimeTest() throws ApiException, CryptoException { * Compressed/Aggregate Trades List * *

Get compressed, aggregate trades. Market trades that fill in 100ms with the same price and - * the same taking side will have the quantity aggregated. * support querying futures trade - * histories that are not older than one year * If both `startTime` and - * `endTime` are sent, time between `startTime` and `endTime` must - * be less than 1 hour. * If `fromId`, `startTime`, and `endTime` - * are not sent, the most recent aggregate trades will be returned. * Only market trades will be - * aggregated and returned, which means the insurance fund trades and ADL trades won't be - * aggregated. * Sending both `startTime`/`endTime` and `fromId` - * might cause response timeout, please send either `fromId` or - * `startTime`/`endTime` Weight: 20 + * the same taking side will have the quantity aggregated. Weight(IP): 20 Notes: - support + * querying futures trade histories that are not older than 24 hours - If both + * `startTime` and `endTime` are sent, time between `startTime` + * and `endTime` must be less than 1 hour. - If `fromId`, + * `startTime`, and `endTime` are not sent, the most recent aggregate trades + * will be returned. - Only market trades will be aggregated and returned, which means the + * insurance fund trades and ADL trades won't be aggregated. - Sending both + * `startTime`/`endTime` and `fromId` might cause response + * timeout, please send either `fromId` or `startTime`/`endTime` * * @throws ApiException if the Api call fails */ @Test - public void compressedAggregateTradesListTest() throws ApiException, CryptoException { + public void compressedAggregateTradesListTest() + throws ApiException, CryptoException, IOException { String symbol = ""; Long fromId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; ApiResponse response = api.compressedAggregateTradesList(symbol, fromId, startTime, endTime, limit); @@ -187,7 +190,9 @@ public void compressedAggregateTradesListTest() throws ApiException, CryptoExcep Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/aggTrades", actualRequest.url().encodedPath()); } @@ -195,27 +200,28 @@ public void compressedAggregateTradesListTest() throws ApiException, CryptoExcep * Continuous Contract Kline/Candlestick Data * *

Kline/candlestick bars for a specific contract type. Klines are uniquely identified by - * their open time. * Contract type: * PERPETUAL * CURRENT_QUARTER * NEXT_QUARTER 1000 | 10 * - * The difference between `startTime` and `endTime` can only be up to 200 - * days * Between `startTime` and `endTime`, the most recent - * `limit` data from `endTime` will be returned: * If `startTime` - * and `endTime` are not sent, current timestamp will be set as `endTime`, - * and the most recent data will be returned. * If `startTime` is sent only, the - * timestamp of 200 days after `startTime` will be set as `endTime`(up to - * the current time) * If `endTime` is sent only, the timestamp of 200 days before - * `endTime` will be set as `startTime` Weight: based on parameter LIMIT - * LIMIT | weight ---|--- [1,100) | 1 [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 + * their open time. Weight: based on parameter `LIMIT` | LIMIT | weight | | --- | --- + * | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - The + * difference between `startTime` and `endTime` can only be up to 200 days - + * Between `startTime` and `endTime`, the most recent `limit` data + * from `endTime` will be returned: - If `startTime` and `endTime` + * are not sent, current timestamp will be set as `endTime`, and the most recent data + * will be returned. - If `startTime` is sent only, the timestamp of 200 days after + * `startTime` will be set as `endTime`(up to the current time) - If + * `endTime` is sent only, the timestamp of 200 days before `endTime` will + * be set as `startTime` * * @throws ApiException if the Api call fails */ @Test - public void continuousContractKlineCandlestickDataTest() throws ApiException, CryptoException { - String pair = ""; - ContractType contractType = ContractType.PERPETUAL; + public void continuousContractKlineCandlestickDataTest() + throws ApiException, CryptoException, IOException { + String pair = "BTCUSD"; + ContractType contractType = ContractType.ALL; Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; ApiResponse response = api.continuousContractKlineCandlestickData( pair, contractType, interval, startTime, endTime, limit); @@ -227,19 +233,22 @@ public void continuousContractKlineCandlestickDataTest() throws ApiException, Cr Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); - assertEquals("/dapi/v1/continuousKlines", actualRequest.url().encodedPath()); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); + assertEquals( + "/dapi/v1/continuousKlines", actualRequest.url().encodedPath()); } /** * Exchange Information * - *

Current exchange trading rules and symbol information Weight: 1 + *

Current exchange trading rules and symbol information Weight(IP): 1 * * @throws ApiException if the Api call fails */ @Test - public void exchangeInformationTest() throws ApiException, CryptoException { + public void exchangeInformationTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.exchangeInformation(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -249,24 +258,26 @@ public void exchangeInformationTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/exchangeInfo", actualRequest.url().encodedPath()); } /** * Get Funding Rate History of Perpetual Futures * - *

Get Funding Rate History of Perpetual Futures * empty array will be returned for delivery - * symbols. Weight: 1 + *

Get Funding Rate History of Perpetual Futures Weight(IP): 1 Notes: - empty array will be + * returned for delivery symbols. * * @throws ApiException if the Api call fails */ @Test - public void getFundingRateHistoryOfPerpetualFuturesTest() throws ApiException, CryptoException { + public void getFundingRateHistoryOfPerpetualFuturesTest() + throws ApiException, CryptoException, IOException { String symbol = ""; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; ApiResponse response = api.getFundingRateHistoryOfPerpetualFutures(symbol, startTime, endTime, limit); @@ -277,20 +288,24 @@ public void getFundingRateHistoryOfPerpetualFuturesTest() throws ApiException, C Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); - assertEquals("/dapi/v1/fundingRate", actualRequest.url().encodedPath()); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); + assertEquals( + "/dapi/v1/fundingRate", + actualRequest.url().encodedPath()); } /** * Get Funding Rate Info * - *

Query funding rate info for symbols that had FundingRateCap/ FundingRateFloor / - * fundingIntervalHours adjustment Weight: 0 + *

Query funding rate info for symbols that had + * FundingRateCap/FundingRateFloor/fundingIntervalHours adjustment * * @throws ApiException if the Api call fails */ @Test - public void getFundingRateInfoTest() throws ApiException, CryptoException { + public void getFundingRateInfoTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.getFundingRateInfo(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -300,21 +315,22 @@ public void getFundingRateInfoTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/fundingInfo", actualRequest.url().encodedPath()); } /** * Index Price and Mark Price * - *

Query index price and mark price Weight: 10 + *

Query index price and mark price Weight(IP): 10 * * @throws ApiException if the Api call fails */ @Test - public void indexPriceAndMarkPriceTest() throws ApiException, CryptoException { - String symbol = ""; - String pair = ""; + public void indexPriceAndMarkPriceTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_PERP"; + String pair = "BTCUSD"; ApiResponse response = api.indexPriceAndMarkPrice(symbol, pair); @@ -325,7 +341,9 @@ public void indexPriceAndMarkPriceTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/premiumIndex", actualRequest.url().encodedPath()); } @@ -333,26 +351,27 @@ public void indexPriceAndMarkPriceTest() throws ApiException, CryptoException { * Index Price Kline/Candlestick Data * *

Kline/candlestick bars for the index price of a pair. Klines are uniquely identified by - * their open time. 1000 | 10 * The difference between `startTime` and - * `endTime` can only be up to 200 days * Between `startTime` and - * `endTime`, the most recent `limit` data from `endTime` will be - * returned: * If `startTime` and `endTime` are not sent, current timestamp - * will be set as `endTime`, and the most recent data will be returned. * If - * `startTime` is sent only, the timestamp of 200 days after `startTime` - * will be set as `endTime`(up to the current time) * If `endTime` is sent - * only, the timestamp of 200 days before `endTime` will be set as - * `startTime` Weight: based on parameter LIMIT LIMIT | weight ---|--- [1,100) | 1 - * [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 + * their open time. Weight: Based on parameter `LIMIT` | LIMIT | weight | | --- | --- + * | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - The + * difference between `startTime` and `endTime` can only be up to 200 days - + * Between `startTime` and `endTime`, the most recent `limit` data + * from `endTime` will be returned: - If `startTime` and `endTime` + * are not sent, current timestamp will be set as `endTime`, and the most recent data + * will be returned. - If `startTime` is sent only, the timestamp of 200 days after + * `startTime` will be set as `endTime`(up to the current time) - If + * `endTime` is sent only, the timestamp of 200 days before `endTime` will + * be set as `startTime` * * @throws ApiException if the Api call fails */ @Test - public void indexPriceKlineCandlestickDataTest() throws ApiException, CryptoException { - String pair = ""; + public void indexPriceKlineCandlestickDataTest() + throws ApiException, CryptoException, IOException { + String pair = "BTCUSD"; Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; ApiResponse response = api.indexPriceKlineCandlestickData(pair, interval, startTime, endTime, limit); @@ -363,7 +382,9 @@ public void indexPriceKlineCandlestickDataTest() throws ApiException, CryptoExce Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/indexPriceKlines", actualRequest.url().encodedPath()); } @@ -371,25 +392,26 @@ public void indexPriceKlineCandlestickDataTest() throws ApiException, CryptoExce * Kline/Candlestick Data * *

Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. - * 1000 | 10 * The difference between `startTime` and `endTime` can only be - * up to 200 days * Between `startTime` and `endTime`, the most recent - * `limit` data from `endTime` will be returned: * If `startTime` - * and `endTime` are not sent, current timestamp will be set as `endTime`, - * and the most recent data will be returned. * If `startTime` is sent only, the - * timestamp of 200 days after `startTime` will be set as `endTime`(up to - * the current time) * If `endTime` is sent only, the timestamp of 200 days before - * `endTime` will be set as `startTime` Weight: based on parameter LIMIT - * LIMIT | weight ---|--- [1,100) | 1 [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 + * Weight: Based on parameter `LIMIT` | LIMIT | weight | | --- | --- | | [1,100) | 1 | + * | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - The difference between + * `startTime` and `endTime` can only be up to 200 days - Between + * `startTime` and `endTime`, the most recent `limit` data from + * `endTime` will be returned: - If `startTime` and `endTime` are + * not sent, current timestamp will be set as `endTime`, and the most recent data will + * be returned. - If `startTime` is sent only, the timestamp of 200 days after + * `startTime` will be set as `endTime`(up to the current time) - If + * `endTime` is sent only, the timestamp of 200 days before `endTime` will + * be set as `startTime` * * @throws ApiException if the Api call fails */ @Test - public void klineCandlestickDataTest() throws ApiException, CryptoException { - String symbol = ""; + public void klineCandlestickDataTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD"; Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; ApiResponse response = api.klineCandlestickData(symbol, interval, startTime, endTime, limit); @@ -400,23 +422,25 @@ public void klineCandlestickDataTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/klines", actualRequest.url().encodedPath()); } /** * Long/Short Ratio * - *

Query symbol Long/Short Ratio * If startTime and endTime are not sent, the most recent - * data is returned. * Only the data of the latest 30 days is available. Weight: 1 + *

Query symbol Long/Short Ratio Weight(IP): 1 Notes: - If startTime and endTime are not + * sent, the most recent data is returned. - Only the data of the latest 30 days is available. * * @throws ApiException if the Api call fails */ @Test - public void longShortRatioTest() throws ApiException, CryptoException { + public void longShortRatioTest() throws ApiException, CryptoException, IOException { String pair = ""; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 30L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = @@ -430,34 +454,34 @@ public void longShortRatioTest() throws ApiException, CryptoException { Request actualRequest = captorValue.request(); assertEquals(null, actualRequest.url().queryParameter("signature")); - assertEquals( - "/futures/data/globalLongShortAccountRatio", actualRequest.url().encodedPath()); + assertEquals("/futures/data/globalLongShortAccountRatio", actualRequest.url().encodedPath()); } /** * Mark Price Kline/Candlestick Data * *

Kline/candlestick bars for the mark price of a symbol. Klines are uniquely identified by - * their open time. 1000 | 10 * The difference between `startTime` and - * `endTime` can only be up to 200 days * Between `startTime` and - * `endTime`, the most recent `limit` data from `endTime` will be - * returned: * If `startTime` and `endTime` are not sent, current timestamp - * will be set as `endTime`, and the most recent data will be returned. * If - * `startTime` is sent only, the timestamp of 200 days after `startTime` - * will be set as `endTime`(up to the current time) * If `endTime` is sent - * only, the timestamp of 200 days before `endTime` will be set as - * `startTime` Weight: based on parameter LIMIT LIMIT | weight ---|--- [1,100) | 1 - * [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 + * their open time. Weight: Based on parameter `LIMIT` | LIMIT | weight | | --- | --- + * | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - The + * difference between `startTime` and `endTime` can only be up to 200 days - + * Between `startTime` and `endTime`, the most recent `limit` data + * from `endTime` will be returned: - If `startTime` and `endTime` + * are not sent, current timestamp will be set as `endTime`, and the most recent data + * will be returned. - If `startTime` is sent only, the timestamp of 200 days after + * `startTime` will be set as `endTime`(up to the current time) - If + * `endTime` is sent only, the timestamp of 200 days before `endTime` will + * be set as `startTime` * * @throws ApiException if the Api call fails */ @Test - public void markPriceKlineCandlestickDataTest() throws ApiException, CryptoException { - String symbol = ""; + public void markPriceKlineCandlestickDataTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD"; Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; ApiResponse response = api.markPriceKlineCandlestickData(symbol, interval, startTime, endTime, limit); @@ -468,24 +492,27 @@ public void markPriceKlineCandlestickDataTest() throws ApiException, CryptoExcep Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/markPriceKlines", actualRequest.url().encodedPath()); } /** - * Old Trades Lookup(MARKET_DATA) + * Old Trades Lookup (MARKET_DATA) * - *

Get older market historical trades. * Market trades means trades filled in the order book. - * Only market trades will be returned, which means the insurance fund trades and ADL trades - * won't be returned. Weight: 20 + *

Get older market historical trades. Weight(IP): 20 Security Type: MARKET_DATA Notes: - + * Market trades means trades filled in the order book. Only market trades will be returned, + * which means the insurance fund trades and ADL trades won't be returned. - Only supports + * data from within the last one month * * @throws ApiException if the Api call fails */ @Test - public void oldTradesLookupTest() throws ApiException, CryptoException { + public void oldTradesLookupTest() throws ApiException, CryptoException, IOException { String symbol = ""; - Long limit = 100L; - Long fromId = 1L; + Long limit = 30L; + Long fromId = 595103L; ApiResponse response = api.oldTradesLookup(symbol, limit, fromId); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -495,20 +522,21 @@ public void oldTradesLookupTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/historicalTrades", actualRequest.url().encodedPath()); } /** * Open Interest * - *

Get present open interest of a specific symbol. Weight: 1 + *

Get present open interest of a specific symbol. Weight(IP): 1 * * @throws ApiException if the Api call fails */ @Test - public void openInterestTest() throws ApiException, CryptoException { - String symbol = ""; + public void openInterestTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200626"; ApiResponse response = api.openInterest(symbol); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -525,17 +553,17 @@ public void openInterestTest() throws ApiException, CryptoException { /** * Open Interest Statistics * - *

Query open interest stats * If startTime and endTime are not sent, the most recent data is - * returned. * Only the data of the latest 30 days is available. Weight: 1 + *

Query open interest stats Weight(IP): 1 Notes: - If startTime and endTime are not sent, + * the most recent data is returned. - Only the data of the latest 30 days is available. * * @throws ApiException if the Api call fails */ @Test - public void openInterestStatisticsTest() throws ApiException, CryptoException { - String pair = ""; - ContractType contractType = ContractType.PERPETUAL; + public void openInterestStatisticsTest() throws ApiException, CryptoException, IOException { + String pair = "BTCUSD"; + ContractType contractType = ContractType.ALL; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 30L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = @@ -548,22 +576,24 @@ public void openInterestStatisticsTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/futures/data/openInterestHist", actualRequest.url().encodedPath()); } /** * Order Book * - *

Query orderbook on specific symbol Weight: Adjusted based on the limit: Limit | Weight - * ------------ | ------------ 5, 10, 20, 50 | 2 100 | 5 500 | 10 1000 | 20 + *

Query orderbook on specific symbol Weight: Adjusted based on the limit: | Limit | Weight | + * | ------------ | ------------ | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | 20 | * * @throws ApiException if the Api call fails */ @Test - public void orderBookTest() throws ApiException, CryptoException { - String symbol = ""; - Long limit = 100L; + public void orderBookTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_PERP"; + Long limit = 500L; ApiResponse response = api.orderBook(symbol, limit); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -580,20 +610,20 @@ public void orderBookTest() throws ApiException, CryptoException { /** * Premium index Kline Data * - *

Premium index kline bars of a symbol. Klines are uniquely identified by their open time. * - * If startTime and endTime are not sent, the most recent klines are returned. Weight: based on - * parameter LIMIT | LIMIT | weight | | ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 - * | | [500, 1000] | 5 | | > 1000 | 10 | + *

Premium index kline bars of a symbol. Klines are uniquely identified by their open time. + * Weight: Based on parameter `LIMIT` | LIMIT | weight | | ----------- | ------ | | + * [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - If startTime + * and endTime are not sent, the most recent klines are returned. * * @throws ApiException if the Api call fails */ @Test - public void premiumIndexKlineDataTest() throws ApiException, CryptoException { - String symbol = ""; + public void premiumIndexKlineDataTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD"; Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; ApiResponse response = api.premiumIndexKlineData(symbol, interval, startTime, endTime, limit); @@ -604,20 +634,23 @@ public void premiumIndexKlineDataTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/premiumIndexKlines", actualRequest.url().encodedPath()); } /** * Query Index Price Constituents * - *

Query index price constituents Weight: 2 + *

Query index price constituents Weight(IP): 1 * * @throws ApiException if the Api call fails */ @Test - public void queryIndexPriceConstituentsTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryIndexPriceConstituentsTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD"; ApiResponse response = api.queryIndexPriceConstituents(symbol); @@ -628,23 +661,25 @@ public void queryIndexPriceConstituentsTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/constituents", actualRequest.url().encodedPath()); } /** * Recent Trades List * - *

Get recent market trades * Market trades means trades filled in the order book. Only - * market trades will be returned, which means the insurance fund trades and ADL trades - * won't be returned. Weight: 5 + *

Get recent market trades Weight(IP): 5 Notes: - Market trades means trades filled in the + * order book. Only market trades will be returned, which means the insurance fund trades and + * ADL trades won't be returned. * * @throws ApiException if the Api call fails */ @Test - public void recentTradesListTest() throws ApiException, CryptoException { - String symbol = ""; - Long limit = 100L; + public void recentTradesListTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD"; + Long limit = 30L; ApiResponse response = api.recentTradesList(symbol, limit); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -654,24 +689,25 @@ public void recentTradesListTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/trades", actualRequest.url().encodedPath()); } /** * Symbol Order Book Ticker * - *

Best price/qty on the order book for a symbol or symbols. * Symbol and pair cannot be sent - * together * If a pair is sent,tickers for all symbols of the pair will be returned * If either - * a pair or symbol is sent, tickers for all symbols of all pairs will be returned Weight: 2 for - * a single symbol, 5 when the symbol parameter is omitted + *

Best price/qty on the order book for a symbol or symbols. Weight: **2** for a single + * symbol, **5** when the symbol parameter is omitted Notes: - Symbol and pair cannot be sent + * together - If a pair is sent,tickers for all symbols of the pair will be returned - If either + * a pair or symbol is sent, tickers for all symbols of all pairs will be returned * * @throws ApiException if the Api call fails */ @Test - public void symbolOrderBookTickerTest() throws ApiException, CryptoException { - String symbol = ""; - String pair = ""; + public void symbolOrderBookTickerTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200626"; + String pair = "BTCUSD"; ApiResponse response = api.symbolOrderBookTicker(symbol, pair); @@ -682,24 +718,26 @@ public void symbolOrderBookTickerTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/ticker/bookTicker", actualRequest.url().encodedPath()); } /** * Symbol Price Ticker * - *

Latest price for a symbol or symbols. * Symbol and pair cannot be sent together * If a - * pair is sent,tickers for all symbols of the pair will be returned * If either a pair or - * symbol is sent, tickers for all symbols of all pairs will be returned Weight: 1 for a single - * symbol, 2 when the symbol parameter is omitted + *

Latest price for a symbol or symbols. Weight: **1** for a single symbol, **2** when the + * symbol parameter is omitted Notes: - Symbol and pair cannot be sent together - If a pair is + * sent,tickers for all symbols of the pair will be returned - If either a pair or symbol is + * sent, tickers for all symbols of all pairs will be returned * * @throws ApiException if the Api call fails */ @Test - public void symbolPriceTickerTest() throws ApiException, CryptoException { - String symbol = ""; - String pair = ""; + public void symbolPriceTickerTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200626"; + String pair = "BTCUSD"; ApiResponse response = api.symbolPriceTicker(symbol, pair); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -709,7 +747,8 @@ public void symbolPriceTickerTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/ticker/price", actualRequest.url().encodedPath()); } @@ -717,18 +756,18 @@ public void symbolPriceTickerTest() throws ApiException, CryptoException { * Taker Buy/Sell Volume * *

Taker Buy Volume: the total volume of buy orders filled by takers within the period. Taker - * Sell Volume: the total volume of sell orders filled by takers within the period. * If - * startTime and endTime are not sent, the most recent data is returned. * Only the data of the - * latest 30 days is available. Weight: 1 + * Sell Volume: the total volume of sell orders filled by takers within the period. Weight(IP): + * 1 Notes: - If startTime and endTime are not sent, the most recent data is returned. - Only + * the data of the latest 30 days is available. * * @throws ApiException if the Api call fails */ @Test - public void takerBuySellVolumeTest() throws ApiException, CryptoException { - String pair = ""; - ContractType contractType = ContractType.PERPETUAL; + public void takerBuySellVolumeTest() throws ApiException, CryptoException, IOException { + String pair = "BTCUSD"; + ContractType contractType = ContractType.ALL; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 30L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = @@ -741,19 +780,20 @@ public void takerBuySellVolumeTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/futures/data/takerBuySellVol", actualRequest.url().encodedPath()); } /** * Test Connectivity * - *

Test connectivity to the Rest API. Weight: 1 + *

Test connectivity to the Rest API. Weight(IP): 1 * * @throws ApiException if the Api call fails */ @Test - public void testConnectivityTest() throws ApiException, CryptoException { + public void testConnectivityTest() throws ApiException, CryptoException, IOException { api.testConnectivity(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -762,25 +802,27 @@ public void testConnectivityTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/ping", actualRequest.url().encodedPath()); } /** * 24hr Ticker Price Change Statistics * - *

24 hour rolling window price change statistics. * Symbol and pair cannot be sent together - * * If a pair is sent,tickers for all symbols of the pair will be returned * If either a pair - * or symbol is sent, tickers for all symbols of all pairs will be returned Weight: 1 for a - * single symbol, 40 when the symbol parameter is omitted Careful when accessing this with no - * symbol. + *

24 hour rolling window price change statistics. Weight: **1** for a single symbol, **40** + * when the symbol parameter is omitted **Careful** when accessing this with no symbol. Notes: - + * Symbol and pair cannot be sent together - If a pair is sent,tickers for all symbols of the + * pair will be returned - If either a pair or symbol is sent, tickers for all symbols of all + * pairs will be returned * * @throws ApiException if the Api call fails */ @Test - public void ticker24hrPriceChangeStatisticsTest() throws ApiException, CryptoException { - String symbol = ""; - String pair = ""; + public void ticker24hrPriceChangeStatisticsTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200925"; + String pair = "BTCUSD"; ApiResponse response = api.ticker24hrPriceChangeStatistics(symbol, pair); @@ -791,28 +833,32 @@ public void ticker24hrPriceChangeStatisticsTest() throws ApiException, CryptoExc Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/ticker/24hr", actualRequest.url().encodedPath()); } /** - * Top Trader Long/Short Ratio (Accounts) + * Top Trader Long/Short Account Ratio * *

The proportion of net long and net short accounts to total accounts of the top 20% users * with the highest margin balance. Each account is counted once only. Long Account % = * Accounts of top traders with net long positions / Total accounts of top traders with open * positions Short Account % = Accounts of top traders with net short positions / Total * accounts of top traders with open positions Long/Short Ratio (Accounts) = Long Account % - * / Short Account % * If startTime and endTime are not sent, the most recent data is returned. - * * Only the data of the latest 30 days is available. Weight: 1 + * / Short Account % Weight(IP): 1 Security Type: Accounts Notes: - If startTime and endTime are + * not sent, the most recent data is returned. - Only the data of the latest 30 days is + * available. * * @throws ApiException if the Api call fails */ @Test - public void topTraderLongShortRatioAccountsTest() throws ApiException, CryptoException { + public void topTraderLongShortRatioAccountsTest() + throws ApiException, CryptoException, IOException { String symbol = ""; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 30L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = @@ -825,27 +871,31 @@ public void topTraderLongShortRatioAccountsTest() throws ApiException, CryptoExc Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/futures/data/topLongShortAccountRatio", actualRequest.url().encodedPath()); } /** - * Top Trader Long/Short Ratio (Positions) + * Top Trader Long/Short Position Ratio * *

The proportion of net long and net short positions to total open positions of the top 20% * users with the highest margin balance. Long Position % = Long positions of top traders / * Total open positions of top traders Short Position % = Short positions of top traders / * Total open positions of top traders Long/Short Ratio (Positions) = Long Position % / - * Short Position % * If startTime and endTime are not sent, the most recent data is returned. * - * Only the data of the latest 30 days is available. Weight: 1 + * Short Position % Weight(IP): 1 Security Type: Positions Notes: - If startTime and endTime are + * not sent, the most recent data is returned. - Only the data of the latest 30 days is + * available. * * @throws ApiException if the Api call fails */ @Test - public void topTraderLongShortRatioPositionsTest() throws ApiException, CryptoException { - String pair = ""; + public void topTraderLongShortRatioPositionsTest() + throws ApiException, CryptoException, IOException { + String pair = "BTCUSD"; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 30L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = @@ -858,7 +908,9 @@ public void topTraderLongShortRatioPositionsTest() throws ApiException, CryptoEx Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/futures/data/topLongShortPositionRatio", actualRequest.url().encodedPath()); } } diff --git a/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/PortfolioMarginEndpointsApiTest.java b/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/PortfolioMarginEndpointsApiTest.java deleted file mode 100644 index 75928b0f2..000000000 --- a/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/PortfolioMarginEndpointsApiTest.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_coin_futures.rest.api; - -import static org.junit.Assert.assertEquals; - -import com.binance.connector.client.common.ApiClient; -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.auth.BinanceAuthenticationFactory; -import com.binance.connector.client.common.auth.SignatureAuthentication; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; -import com.binance.connector.client.common.sign.HmacSignatureGenerator; -import com.binance.connector.client.common.sign.SignatureGenerator; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ClassicPortfolioMarginAccountInformationResponse; -import jakarta.validation.constraints.*; -import okhttp3.Call; -import okhttp3.Request; -import org.bouncycastle.crypto.CryptoException; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; - -/** API tests for PortfolioMarginEndpointsApi */ -public class PortfolioMarginEndpointsApiTest { - - private PortfolioMarginEndpointsApi api; - private ApiClient apiClientSpy; - private SignatureGenerator signatureGeneratorSpy; - - @BeforeEach - public void initApiClient() throws ApiException { - ClientConfiguration clientConfiguration = new ClientConfiguration(); - clientConfiguration.setUrl("http://localhost:8080"); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setSecretKey("secretKey"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - - HmacSignatureGenerator signatureGenerator = - new HmacSignatureGenerator(signatureConfiguration.getSecretKey()); - signatureGeneratorSpy = Mockito.spy(signatureGenerator); - SignatureAuthentication signatureAuthentication = - new SignatureAuthentication( - signatureConfiguration.getApiKey(), signatureGeneratorSpy); - SignatureAuthentication authenticationSpy = Mockito.spy(signatureAuthentication); - Mockito.doReturn("1736393892000").when(authenticationSpy).buildTimestamp(); - - BinanceAuthenticationFactory factoryMock = Mockito.mock(BinanceAuthenticationFactory.class); - Mockito.doReturn(authenticationSpy) - .when(factoryMock) - .getAuthentication(signatureConfiguration); - - ApiClient apiClient = new ApiClient(clientConfiguration, factoryMock); - - apiClientSpy = Mockito.spy(apiClient); - Mockito.doReturn(new ApiResponse<>(200, null)) - .when(apiClientSpy) - .execute(Mockito.any(), Mockito.any(java.lang.reflect.Type.class)); - Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); - Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); - - api = new PortfolioMarginEndpointsApi(apiClientSpy); - } - - /** - * Classic Portfolio Margin Account Information (USER_DATA) - * - *

Get Classic Portfolio Margin current account information. * maxWithdrawAmount is for asset - * transfer out to the spot wallet. Weight: 5 - * - * @throws ApiException if the Api call fails - */ - @Test - public void classicPortfolioMarginAccountInformationTest() - throws ApiException, CryptoException { - String asset = ""; - Long recvWindow = 5000L; - ApiResponse response = - api.classicPortfolioMarginAccountInformation(asset, recvWindow); - - ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); - Mockito.verify(apiClientSpy) - .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); - - ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); - Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - - Call captorValue = callArgumentCaptor.getValue(); - Request actualRequest = captorValue.request(); - - assertEquals("asset=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "a8610b861691761550acea81c71e6fe676ac39bd2020c66ff1115710eaf265a4", - actualRequest.url().queryParameter("signature")); - assertEquals("/dapi/v1/pmAccountInfo", actualRequest.url().encodedPath()); - } -} diff --git a/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/TradeApiTest.java b/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/TradeApiTest.java index 9a82f0914..28ff0a8a6 100644 --- a/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/TradeApiTest.java +++ b/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/TradeApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -26,6 +26,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.AccountTradeListResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.AllOrdersResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.AutoCancelAllOpenOrdersRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.AutoCancelAllOpenOrdersResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.AutoCloseType; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.BatchOrders; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.CancelAllOpenOrdersResponse; @@ -50,15 +51,18 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.NewOrderRequest; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.NewOrderResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.OrderIdList; +import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.OrderType; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.OrigClientOrderIdList; +import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.PlaceMultipleOrdersRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.PlaceMultipleOrdersResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.PositionAdlQuantileEstimationResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.PositionInformationResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.QueryCurrentOpenOrderResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.QueryOrderResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Side; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Type; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.UsersForceOrdersResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -112,25 +116,26 @@ public void initApiClient() throws ApiException { /** * Account Trade List (USER_DATA) * - *

Get trades for a specific account and symbol. * Either symbol or pair must be sent * - * Symbol and pair cannot be sent together * Pair and fromId cannot be sent together * OrderId - * can only be sent together with symbol * If a pair is sent,tickers for all symbols of the pair - * will be returned * The parameter `fromId` cannot be sent with `startTime` - * or `endTime` * If startTime and endTime are both not sent, then the last 7 - * days' data will be returned. * The time between startTime and endTime cannot be longer - * than 7 days. Weight: 20 with symbol,40 with pair + *

Get trades for a specific account and symbol. Weight: **20** with symbol,**40** with pair + * (after CM migration: **5** flat) Security Type: USER_DATA Notes: - Either symbol or pair must + * be sent - Symbol and pair cannot be sent together - Pair and fromId cannot be sent together - + * OrderId can only be sent together with symbol - If a pair is sent,tickers for all symbols of + * the pair will be returned - The parameter `fromId` cannot be sent with + * `startTime` or `endTime` - If startTime and endTime are both not sent, + * then the last 7 days' data will be returned. - The time between startTime and endTime + * cannot be longer than 7 days. * * @throws ApiException if the Api call fails */ @Test - public void accountTradeListTest() throws ApiException, CryptoException { - String symbol = ""; - String pair = ""; - Long orderId = 1L; + public void accountTradeListTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200626"; + String pair = "BTCUSD"; + String orderId = "1"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long fromId = 1L; - Long limit = 100L; + Long fromId = 6L; + Long limit = 30L; Long recvWindow = 5000L; ApiResponse response = api.accountTradeList( @@ -146,12 +151,9 @@ public void accountTradeListTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSD_200626&pair=BTCUSD&orderId=1&startTime=1623319461670&endTime=1641782889000&fromId=6&limit=30&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&pair=&orderId=1&startTime=1623319461670&endTime=1641782889000&fromId=1&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "d16037edade5d29ad6c4479dc0bd6a637556f7d86498043183450ee0058b70de", - actualRequest.url().queryParameter("signature")); + "c3057a977371daf8b8136fdca30f4b0827bf2932dd67ed6dd1f3130a55fd7ec7", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/userTrades", actualRequest.url().encodedPath()); } @@ -160,24 +162,24 @@ public void accountTradeListTest() throws ApiException, CryptoException { * *

Get all account orders; active, canceled, or filled. * These orders will not be found: * * order status is CANCELED or EXPIRED AND order has NO filled trade AND created time + 3 days - * < current time * order create time + 90 days < current time * Either `symbol` - * or `pair` must be sent. * `pair` can't be sent with - * `orderId` * If `orderId` is set, it will get orders >= that - * `orderId`. Otherwise most recent orders are returned. * If orderId is set, it will - * get orders >= that orderId. Otherwise most recent orders are returned. * The query - * time period must be less then 7 days( default as the recent 7 days). Weight: 20 with symbol, - * 40 with pair + * < current time * order create time + 90 days < current time Weight: **20** with symbol, + * **40** with pair (after CM migration: **5** flat) Security Type: USER_DATA Notes: - Either + * `symbol` or `pair` must be sent. - `pair` can't be sent + * with `orderId` - If `orderId` is set, it will get orders >= that + * `orderId`. Otherwise most recent orders are returned. - If orderId is set, it will + * get orders >= that orderId. Otherwise most recent orders are returned. - The query + * time period must be less then 7 days( default as the recent 7 days). * * @throws ApiException if the Api call fails */ @Test - public void allOrdersTest() throws ApiException, CryptoException { - String symbol = ""; - String pair = ""; - Long orderId = 1L; + public void allOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200925"; + String pair = "BTCUSD"; + Long orderId = 1917641L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; Long recvWindow = 5000L; ApiResponse response = api.allOrders(symbol, pair, orderId, startTime, endTime, limit, recvWindow); @@ -192,12 +194,8 @@ public void allOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "symbol=&pair=&orderId=1&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "9445a77882a6628612b980279cee60afc4cf7c4a1263b48ec49bf8021cdf5300", - actualRequest.url().queryParameter("signature")); + assertEquals("symbol=BTCUSD_200925&pair=BTCUSD&orderId=1917641&startTime=1623319461670&endTime=1641782889000&limit=30&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("6ead777fee8eec6aba3f446310f174d70049cfcd0e40364c60d75b40d0182405", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/allOrders", actualRequest.url().encodedPath()); } @@ -213,22 +211,23 @@ public void allOrdersTest() throws ApiException, CryptoException { * small. * Example usage: Call this endpoint at 30s intervals with an countdownTime of 120000 * (120s). If this endpoint is not called within 120 seconds, all your orders of the specified * symbol will be automatically canceled. If this endpoint is called with an countdownTime of 0, - * the countdown timer will be stopped. Weight: 10 + * the countdown timer will be stopped. Weight(IP): 10 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void autoCancelAllOpenOrdersTest() throws ApiException, CryptoException { + public void autoCancelAllOpenOrdersTest() throws ApiException, CryptoException, IOException { AutoCancelAllOpenOrdersRequest autoCancelAllOpenOrdersRequest = new AutoCancelAllOpenOrdersRequest(); + autoCancelAllOpenOrdersRequest.symbol("BTCUSD_200925"); + autoCancelAllOpenOrdersRequest.countdownTime(1000L); - autoCancelAllOpenOrdersRequest.symbol(""); - autoCancelAllOpenOrdersRequest.countdownTime(0L); - - api.autoCancelAllOpenOrders(autoCancelAllOpenOrdersRequest); + ApiResponse response = + api.autoCancelAllOpenOrders(autoCancelAllOpenOrdersRequest); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); - Mockito.verify(apiClientSpy).execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); @@ -236,23 +235,23 @@ public void autoCancelAllOpenOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000symbol=&countdownTime=0", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000symbol=BTCUSD_200925&countdownTime=1000", signInputCaptor.getValue()); assertEquals( - "42826e2320d45fba6a83c5a5da223ab9f7e622a05303b8d5507c99448d3a0a88", + "0ae436f37120c70e0cf527460a45c833915e160e53cb1701c7caca6055f2159e", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/countdownCancelAll", actualRequest.url().encodedPath()); } /** - * Cancel All Open Orders(TRADE) + * Cancel All Open Orders (TRADE) * - *

Cancel All Open Orders Weight: 1 + *

Cancel All Open Orders Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void cancelAllOpenOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void cancelAllOpenOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200925"; Long recvWindow = 5000L; ApiResponse response = api.cancelAllOpenOrders(symbol, recvWindow); @@ -267,26 +266,26 @@ public void cancelAllOpenOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSD_200925&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", - actualRequest.url().queryParameter("signature")); + "9ba11cf13f34a53d4deda49f9633035cdc4683908672ed79503365ed6e4f0d13", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/allOpenOrders", actualRequest.url().encodedPath()); } /** - * Cancel Multiple Orders(TRADE) + * Cancel Multiple Orders (TRADE) * - *

Cancel Multiple Orders * Either `orderIdList` or `origClientOrderIdList - * ` must be sent. Weight: 1 + *

Cancel Multiple Orders Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderIdList` or `origClientOrderIdList ` must be sent. * * @throws ApiException if the Api call fails */ @Test - public void cancelMultipleOrdersTest() throws ApiException, CryptoException { - String symbol = ""; - OrderIdList orderIdList = null; - OrigClientOrderIdList origClientOrderIdList = null; + public void cancelMultipleOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200925"; + OrderIdList orderIdList = OrderIdList.fromJson("[1234567,2345678]"); + OrigClientOrderIdList origClientOrderIdList = + OrigClientOrderIdList.fromJson("[\"my_id_1\",\"my_id_2\"]"); Long recvWindow = 5000L; ApiResponse response = api.cancelMultipleOrders(symbol, orderIdList, origClientOrderIdList, recvWindow); @@ -301,9 +300,9 @@ public void cancelMultipleOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSD_200925&orderIdList=%5B1234567%2C2345678%5D&origClientOrderIdList=%5B%22my_id_1%22%2C%22my_id_2%22%5D&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "66178c220d4a2fab72a32b0ac69e9f04c8b43bf4a936bc9a862eb28a76202166", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/batchOrders", actualRequest.url().encodedPath()); } @@ -311,16 +310,16 @@ public void cancelMultipleOrdersTest() throws ApiException, CryptoException { /** * Cancel Order (TRADE) * - *

Cancel an active order. * Either `orderId` or `origClientOrderId` must - * be sent. Weight: 1 + *

Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent. * * @throws ApiException if the Api call fails */ @Test - public void cancelOrderTest() throws ApiException, CryptoException { - String symbol = ""; - Long orderId = 1L; - String origClientOrderId = "1"; + public void cancelOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200925"; + Long orderId = 283194212L; + String origClientOrderId = "myOrder1"; Long recvWindow = 5000L; ApiResponse response = api.cancelOrder(symbol, orderId, origClientOrderId, recvWindow); @@ -335,12 +334,8 @@ public void cancelOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "symbol=&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "cbec82483be2ad044b893ffb2e6bc0d55370e378eaea0b4b61d95893bd9cc458", - actualRequest.url().queryParameter("signature")); + assertEquals("symbol=BTCUSD_200925&orderId=283194212&origClientOrderId=myOrder1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("04fab53072d99a8b440827620bd69f8f48f87cdbedbaa474fbd6afb203cce063", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/order", actualRequest.url().encodedPath()); } @@ -349,17 +344,16 @@ public void cancelOrderTest() throws ApiException, CryptoException { * *

Change user's initial leverage in the specific symbol market. For Hedge Mode, LONG and * SHORT positions of one symbol use the same initial leverage and share a total notional value. - * Weight: 1 + * Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void changeInitialLeverageTest() throws ApiException, CryptoException { + public void changeInitialLeverageTest() throws ApiException, CryptoException, IOException { ChangeInitialLeverageRequest changeInitialLeverageRequest = new ChangeInitialLeverageRequest(); - - changeInitialLeverageRequest.symbol(""); - changeInitialLeverageRequest.leverage(0L); + changeInitialLeverageRequest.symbol("BTCUSD_200925"); + changeInitialLeverageRequest.leverage(1L); ApiResponse response = api.changeInitialLeverage(changeInitialLeverageRequest); @@ -374,9 +368,9 @@ public void changeInitialLeverageTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000symbol=&leverage=0", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000symbol=BTCUSD_200925&leverage=1", signInputCaptor.getValue()); assertEquals( - "31c40eeb1a5a52384cff8a195c1c312e32b26a672ad8fb71dc96256a61c4101c", + "58d0fd36b0044709bb4c17740051d0b78156f9cddde296b7290685e6c5304a63", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/leverage", actualRequest.url().encodedPath()); } @@ -386,15 +380,14 @@ public void changeInitialLeverageTest() throws ApiException, CryptoException { * *

Change user's margin type in the specific symbol market.For Hedge Mode, LONG and SHORT * positions of one symbol use the same margin type. With ISOLATED margin type, margins of the - * LONG and SHORT positions are isolated from each other. Weight: 1 + * LONG and SHORT positions are isolated from each other. Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void changeMarginTypeTest() throws ApiException, CryptoException { + public void changeMarginTypeTest() throws ApiException, CryptoException, IOException { ChangeMarginTypeRequest changeMarginTypeRequest = new ChangeMarginTypeRequest(); - - changeMarginTypeRequest.symbol(""); + changeMarginTypeRequest.symbol("BTCUSD_200925"); changeMarginTypeRequest.marginType(MarginType.ISOLATED); ApiResponse response = @@ -410,27 +403,27 @@ public void changeMarginTypeTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000symbol=BTCUSD_200925&marginType=ISOLATED", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000symbol=&marginType=ISOLATED", signInputCaptor.getValue()); - assertEquals( - "7cedb25e13ff6f8ca5b22d48cb06eaaa3b2a8c7d1f13a1aeb891f6a8125f5399", - actualRequest.url().queryParameter("signature")); + "8ac57c69154477f12ec8758aae8d820704d7f7b7f33af7d5255c23a544af2816", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/marginType", actualRequest.url().encodedPath()); } /** - * Change Position Mode(TRADE) + * Change Position Mode (TRADE) * - *

Change user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol*** - * Weight: 1 + *

Change user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol***. + * **After CM migration**, UM and CM share the **same** `dualSidePosition` setting. + * Calling this endpoint flips both UM and CM at once. If either side has any open order or open + * position, the change is rejected: - `-4067` (open orders exist) - `-4068` + * (open position exists) Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void changePositionModeTest() throws ApiException, CryptoException { + public void changePositionModeTest() throws ApiException, CryptoException, IOException { ChangePositionModeRequest changePositionModeRequest = new ChangePositionModeRequest(); - - changePositionModeRequest.dualSidePosition(""); + changePositionModeRequest.dualSidePosition("true"); ApiResponse response = api.changePositionMode(changePositionModeRequest); @@ -445,25 +438,25 @@ public void changePositionModeTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000dualSidePosition=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000dualSidePosition=true", signInputCaptor.getValue()); assertEquals( - "234d62c8a0356474ae6889f6aee70005b8ded595c0d02364bc91a55e250c6017", - actualRequest.url().queryParameter("signature")); + "e5d54f89dd6a1e74ab1ef1fa8057f86c8736d76176c60cbbfdc4a54572efc7fa", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/positionSide/dual", actualRequest.url().encodedPath()); } /** * Current All Open Orders (USER_DATA) * - *

Get all open orders on a symbol. **Careful** when accessing this with no symbol. Weight: 1 - * for a single symbol, 40 for mutltiple symbols + *

Get all open orders on a symbol. **Careful** when accessing this with no symbol. + * Weight(IP): null Weight: **1** for a single symbol, **40** for mutltiple symbols Security + * Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void currentAllOpenOrdersTest() throws ApiException, CryptoException { - String symbol = ""; - String pair = ""; + public void currentAllOpenOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200925"; + String pair = "BTCUSD"; Long recvWindow = 5000L; ApiResponse response = api.currentAllOpenOrders(symbol, pair, recvWindow); @@ -478,11 +471,9 @@ public void currentAllOpenOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSD_200925&pair=BTCUSD&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&pair=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "11b129369c0f8682cf70f667a8b90c4c55856d335dceef536e582ac7a1be7481", + "6fb7069cfc515e5183c551d7a0461b7c5a732eba1ede75197f4867d26e51f03f", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/openOrders", actualRequest.url().encodedPath()); } @@ -490,20 +481,21 @@ public void currentAllOpenOrdersTest() throws ApiException, CryptoException { /** * Get Order Modify History (USER_DATA) * - *

Get order modification history * Either `orderId` or - * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. * Order modify history longer than 3 month is not avaliable Weight: 1 + *

Get order modification history Weight(IP): 1 Security Type: USER_DATA Notes: - Either + * `orderId` or `origClientOrderId` must be sent, and the + * `orderId` will prevail if both are sent. - Order modify history longer than 3 month + * is not avaliable * * @throws ApiException if the Api call fails */ @Test - public void getOrderModifyHistoryTest() throws ApiException, CryptoException { - String symbol = ""; - Long orderId = 1L; - String origClientOrderId = "1"; + public void getOrderModifyHistoryTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_PERP"; + Long orderId = 20072994037L; + String origClientOrderId = "LJ9R4QZDihCaS8UAOOLpgW"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; Long recvWindow = 5000L; ApiResponse response = api.getOrderModifyHistory( @@ -519,29 +511,28 @@ public void getOrderModifyHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSD_PERP&orderId=20072994037&origClientOrderId=LJ9R4QZDihCaS8UAOOLpgW&startTime=1623319461670&endTime=1641782889000&limit=30&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&orderId=1&origClientOrderId=1&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "8dfcc843fc05f631a3b12c4a0080f9d1f2283472ee0032b3e7e7fd46d855bcde", + "3d175bfac6d6da79501d6920cad6f3f39ec8201e1450df950185783d0f582e8a", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/orderAmendment", actualRequest.url().encodedPath()); } /** - * Get Position Margin Change History(TRADE) + * Get Position Margin Change History (TRADE) * - *

Get position margin change history Weight: 1 + *

Get position margin change history Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void getPositionMarginChangeHistoryTest() throws ApiException, CryptoException { - String symbol = ""; - Type type = Type.LIMIT; + public void getPositionMarginChangeHistoryTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD"; + Long type = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; Long recvWindow = 5000L; ApiResponse response = api.getPositionMarginChangeHistory( @@ -557,30 +548,29 @@ public void getPositionMarginChangeHistoryTest() throws ApiException, CryptoExce Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSD&type=1&startTime=1623319461670&endTime=1641782889000&limit=30&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&type=LIMIT&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "28df29b15a98006243407bf3bf886a72f9747c27314862a75b89f0916e58f097", + "3801b1916766d4f99b6326402a6924f9bf82c9642f23d5e8f1dcc62ff1b0f920", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/positionMargin/history", actualRequest.url().encodedPath()); } /** - * Modify Isolated Position Margin(TRADE) + * Modify Isolated Position Margin (TRADE) * - *

Modify Isolated Position Margin * Only for isolated symbol Weight: 1 + *

Modify Isolated Position Margin Weight(IP): 1 Security Type: TRADE Notes: - Only for + * isolated symbol * * @throws ApiException if the Api call fails */ @Test - public void modifyIsolatedPositionMarginTest() throws ApiException, CryptoException { + public void modifyIsolatedPositionMarginTest() + throws ApiException, CryptoException, IOException { ModifyIsolatedPositionMarginRequest modifyIsolatedPositionMarginRequest = new ModifyIsolatedPositionMarginRequest(); - - modifyIsolatedPositionMarginRequest.symbol(""); - modifyIsolatedPositionMarginRequest.amount(1d); - modifyIsolatedPositionMarginRequest.type(Type.LIMIT); + modifyIsolatedPositionMarginRequest.symbol("BTCUSDT"); + modifyIsolatedPositionMarginRequest.amount(1.0d); + modifyIsolatedPositionMarginRequest.type(1L); ApiResponse response = api.modifyIsolatedPositionMargin(modifyIsolatedPositionMarginRequest); @@ -595,28 +585,27 @@ public void modifyIsolatedPositionMarginTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&amount=1&type=1", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000symbol=&amount=1&type=LIMIT", signInputCaptor.getValue()); - assertEquals( - "d9e1ad5e7010758571908dd9048a5786754522e1130e711222767b96a0c811a3", + "0aa7d644eaa767ee27bf6f8014cea06c916e5d7b471b3bdf6748899112753937", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/positionMargin", actualRequest.url().encodedPath()); } /** - * Modify Multiple Orders(TRADE) + * Modify Multiple Orders (TRADE) * - *

Modify Multiple Orders * Parameter rules are same with `Modify Order` * Batch - * modify orders are processed concurrently, and the order of matching is not guaranteed. * The - * order of returned contents for batch modify orders is the same as the order of the order - * list. * One order can only be modfied for less than 10000 times Weight: 5 + *

Modify Multiple Orders Weight(IP): 5 Security Type: TRADE Notes: - Parameter rules are + * same with `Modify Order` - Batch modify orders are processed concurrently, and the + * order of matching is not guaranteed. - The order of returned contents for batch modify orders + * is the same as the order of the order list. - One order can only be modfied for less than + * 10000 times * * @throws ApiException if the Api call fails */ @Test - public void modifyMultipleOrdersTest() throws ApiException, CryptoException { + public void modifyMultipleOrdersTest() throws ApiException, CryptoException, IOException { ModifyMultipleOrdersRequest modifyMultipleOrdersRequest = new ModifyMultipleOrdersRequest(); - modifyMultipleOrdersRequest.batchOrders(new BatchOrders()); ApiResponse response = @@ -643,24 +632,23 @@ public void modifyMultipleOrdersTest() throws ApiException, CryptoException { * Modify Order (TRADE) * *

Order modify function, currently only LIMIT order modification is supported, modified - * orders will be reordered in the match queue * Either `orderId` or - * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. * Either `quantity` or `price` must be sent. * When the new - * `quantity` or `price` doesn'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 `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 * Modify order will set - * `selfTradePreventionMode` to `NONE` Weight: 1 + * orders will be reordered in the match queue Weight(IP): 1 Security Type: TRADE Notes: - + * Either `orderId` or `origClientOrderId` must be sent, and the + * `orderId` will prevail if both are sent. - Either `quantity` or + * `price` must be sent. *(After CM migration, both `quantity` and + * `price` are required.)* - When the new `quantity` or `price` + * doesn'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 + * `quantity` - 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 * * @throws ApiException if the Api call fails */ @Test - public void modifyOrderTest() throws ApiException, CryptoException { + public void modifyOrderTest() throws ApiException, CryptoException, IOException { ModifyOrderRequest modifyOrderRequest = new ModifyOrderRequest(); - - modifyOrderRequest.symbol(""); + modifyOrderRequest.symbol("BTCUSD_PERP"); modifyOrderRequest.side(Side.BUY); ApiResponse response = api.modifyOrder(modifyOrderRequest); @@ -675,62 +663,59 @@ public void modifyOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000symbol=&side=BUY", signInputCaptor.getValue()); - assertEquals( - "d0429bdd1b59c94a6a32c97f44503c5f0f681774a2353dd458de67bb1c64bea5", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000symbol=BTCUSD_PERP&side=BUY", signInputCaptor.getValue()); + assertEquals("4972f8b1e73ac096be4178f48ed4979fc4e9e56dd66f6e7944e209c0fe93a34c", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/order", actualRequest.url().encodedPath()); } /** * New Order (TRADE) * - *

Send in a new order. * Order with type `STOP`, parameter `timeInForce` - * can be sent ( default `GTC`). * Order with type `TAKE_PROFIT`, parameter - * `timeInForce` can be sent ( default `GTC`). * Condition orders will be - * triggered when: * If parameter`priceProtect`is sent as true: * when price reaches - * the `stopPrice` ,the difference rate between \"MARK_PRICE\" and + *

Send in a new order. Weight: 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: - Additional mandatory parameters + * based on `type`: - Order with type `STOP`, parameter + * `timeInForce` can be sent ( default `GTC`). - Order with type + * `TAKE_PROFIT`, parameter `timeInForce` can be sent ( default + * `GTC`). - Condition orders will be triggered when: - If + * parameter`priceProtect`is sent as true: - when price reaches the + * `stopPrice` ,the difference rate between \"MARK_PRICE\" and * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /dapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed `<= - * `activationPrice`, and the latest price >`= the lowest price * (1 + - * `callbackRate`) * SELL: the highest price after order placed >= - * `activationPrice`, and the latest price <= the highest price * (1 - - * `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. - * ``{\"code\": -2021, \"msg\": \"Order would immediately - * trigger.\"}`` means that the parameters you send do not meet the following - * requirements: * BUY: `activationPrice` should be smaller than latest price. * SELL: - * `activationPrice` should be larger than latest price. * If `newOrderRespType - * ` is sent as `RESULT` : * `MARKET` order: the final FILLED result of - * the order will be return directly. * `LIMIT` order with special + * symbol - \"triggerProtect\" of a symbol can be got from `GET + * /dapi/v1/exchangeInfo` - `STOP`, `STOP_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - + * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") + * -`TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - + * `TRAILING_STOP_MARKET`: - BUY: the lowest price after order placed + * ``= the lowest price * (1 + `callbackRate`) - SELL: the highest + * price after order placed >= `activationPrice`, and the latest price - For + * `TRAILING_STOP_MARKET`, if you got such error code. > `{\"code\": + * -2021, \"msg\": \"Order would immediately trigger.\"}` > means + * that the parameters you send do not meet the following requirements: - BUY: + * `activationPrice` should be smaller than latest price. - SELL: + * `activationPrice` should be larger than latest price. - If `newOrderRespType + * ` is sent as `RESULT` : - `MARKET` order: the final FILLED result of + * the order will be return directly. - `LIMIT` order with special * `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be - * returned directly. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` parameter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with + * returned directly. - `STOP_MARKET`, `TAKE_PROFIT_MARKET` with + * `closePosition`=`true`: - Follow the same rules for condition + * orders. - If triggered,**close all** current long position( if `SELL`) or current + * short position( if `BUY`). - Cannot be used with `quantity` parameter - + * Cannot be used with `reduceOnly` parameter - In Hedge Mode,cannot be used with * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * + * `SELL` orders in `SHORT` position side - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC`. Weight: 1 on 1min order rate - * limit(X-MBX-ORDER-COUNT-1M)\\ 0 on IP rate limit(x-mbx-used-weight-1m) + * `IOC` or `GTC`. * * @throws ApiException if the Api call fails */ @Test - public void newOrderTest() throws ApiException, CryptoException { + public void newOrderTest() throws ApiException, CryptoException, IOException { NewOrderRequest newOrderRequest = new NewOrderRequest(); - - newOrderRequest.symbol(""); + newOrderRequest.symbol("BTCUSD_200925"); newOrderRequest.side(Side.BUY); - newOrderRequest.type(Type.LIMIT); + newOrderRequest.type(OrderType.LIMIT); ApiResponse response = api.newOrder(newOrderRequest); @@ -744,16 +729,49 @@ public void newOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "timestamp=1736393892000symbol=&side=BUY&type=LIMIT", signInputCaptor.getValue()); - assertEquals( - "b88c38300689d53932ba198ab2b30c30c872482dcaedbb4bede2f40535ba160a", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000symbol=BTCUSD_200925&side=BUY&reduceOnly=false&newOrderRespType=ACK&selfTradePreventionMode=EXPIRE_MAKER&type=LIMIT&priceProtect=false&workingType=CONTRACT_PRICE", signInputCaptor.getValue()); + assertEquals("30fb9ff8f08572df035170697a7ca0bb8886fa17e6729d659b5cebe8bd825723", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/order", actualRequest.url().encodedPath()); } /** - * Position ADL Quantile Estimation(USER_DATA) + * Place Multiple Orders (TRADE) + * + *

Place multiple orders * Parameter rules are same with `New Order` * Batch orders + * are processed concurrently, and the order of matching is not guaranteed. * The order of + * returned contents for batch orders is the same as the order of the order list. Weight(IP): 5 + * Security Type: TRADE Notes: - `batchOrders` must be a JSON array of order parameter + * objects. - Example: + * `/dapi/v1/batchOrders?batchOrders=[{\"type\":\"LIMIT\",\"timeInForce\":\"GTC\",\"symbol\":\"BTCUSD_PERP\",\"side\":\"BUY\",\"price\":\"10001\",\"quantity\":\"1\"}]` + * + * @throws ApiException if the Api call fails + */ + @Test + public void placeMultipleOrdersTest() throws ApiException, CryptoException, IOException { + PlaceMultipleOrdersRequest placeMultipleOrdersRequest = new PlaceMultipleOrdersRequest(); + placeMultipleOrdersRequest.batchOrders(new BatchOrders()); + + ApiResponse response = + api.placeMultipleOrders(placeMultipleOrdersRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000batchOrders=%5B%5D", signInputCaptor.getValue()); + assertEquals( + "84453de090bb6a9299c2928d3b767e0cd7298a2b7e7a004b22943b9d5990663b", actualRequest.url().queryParameter("signature")); + assertEquals("/dapi/v1/batchOrders", actualRequest.url().encodedPath()); + } + + /** + * Position ADL Quantile Estimation (USER_DATA) * *

Query position ADL quantile estimation * Values update every 30s. * Values 0, 1, 2, 3, 4 * shows the queue position and possibility of ADL from low to high. * For positions of the @@ -763,13 +781,14 @@ public void newOrderTest() throws ApiException, CryptoException { * in Hedge Mode: * \"HEDGE\" as a sign will be returned instead of * \"BOTH\"; * A same value caculated on unrealized pnls on long and short sides' * positions will be shown for \"LONG\" and \"SHORT\" when there are - * positions in both of long and short sides. Weight: 5 + * positions in both of long and short sides. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void positionAdlQuantileEstimationTest() throws ApiException, CryptoException { - String symbol = ""; + public void positionAdlQuantileEstimationTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200925"; Long recvWindow = 5000L; ApiResponse response = api.positionAdlQuantileEstimation(symbol, recvWindow); @@ -784,29 +803,31 @@ public void positionAdlQuantileEstimationTest() throws ApiException, CryptoExcep Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSD_200925&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "9ba11cf13f34a53d4deda49f9633035cdc4683908672ed79503365ed6e4f0d13", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/adlQuantile", actualRequest.url().encodedPath()); } /** - * Position Information(USER_DATA) + * Position Information (USER_DATA) * - *

Get current account information. * If neither `marginAsset` nor `pair` - * is sent, positions of all symbols with `TRADING` status will be returned. * for - * One-way Mode user, the response will only show the \"BOTH\" positions * for Hedge - * Mode user, the response will show \"BOTH\", \"LONG\", and - * \"SHORT\" positions. Please use with user data stream `ACCOUNT_UPDATE` to - * meet your timeliness and accuracy needs. Weight: 1 + *

Get current account information. Weight(IP): 1 Security Type: USER_DATA Notes: - If + * neither `marginAsset` nor `pair` is sent, positions of all symbols with + * `TRADING` status will be returned. - for One-way Mode user, the response will only + * show the \"BOTH\" positions - for Hedge Mode user, the response will show + * \"BOTH\", \"LONG\", and \"SHORT\" positions. **Note** > + * Please use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and + * accuracy needs. - Please use with user data stream ACCOUNT_UPDATE to meet your timeliness and + * accuracy needs. * * @throws ApiException if the Api call fails */ @Test - public void positionInformationTest() throws ApiException, CryptoException { - String marginAsset = ""; - String pair = ""; + public void positionInformationTest() throws ApiException, CryptoException, IOException { + String marginAsset = "USDT"; + String pair = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.positionInformation(marginAsset, pair, recvWindow); @@ -821,27 +842,25 @@ public void positionInformationTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("marginAsset=USDT&pair=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "marginAsset=&pair=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "7c340d46d6a73bb7697e05d5340862028b59650df2e5526d761180495c98e012", - actualRequest.url().queryParameter("signature")); + "cdbf17d8c80c2745c3e16ba026f807dac7a190647d1f6e2577081e5847e0ea6b", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/positionRisk", actualRequest.url().encodedPath()); } /** - * Query Current Open Order(USER_DATA) + * Query Current Open Order (USER_DATA) * - *

Query Current Open Order * Either`orderId` or `origClientOrderId` must - * be sent * If the queried order has been filled or cancelled, the error message \"Order - * does not exist\" will be returned. Weight: 1 + *

Query Current Open Order Weight(IP): 1 Security Type: USER_DATA Notes: - + * Either`orderId` or `origClientOrderId` must be sent - If the queried + * order has been filled or cancelled, the error message \"Order does not exist\" will + * be returned. * * @throws ApiException if the Api call fails */ @Test - public void queryCurrentOpenOrderTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryCurrentOpenOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200925"; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; @@ -858,11 +877,9 @@ public void queryCurrentOpenOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSD_200925&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "cbec82483be2ad044b893ffb2e6bc0d55370e378eaea0b4b61d95893bd9cc458", + "47de3ec7159e0434e57901face422fd64ed83f8c2800c1b6bc885c74846a398b", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/openOrder", actualRequest.url().encodedPath()); } @@ -872,14 +889,14 @@ public void queryCurrentOpenOrderTest() throws ApiException, CryptoException { * *

Check an order's status. * These orders will not be found: * order status is CANCELED * or EXPIRED AND order has NO filled trade AND created time + 3 days < current time * order - * create time + 90 days < current time * Either `orderId` or - * `origClientOrderId` must be sent. Weight: 1 + * create time + 90 days < current time Weight(IP): 1 Security Type: USER_DATA Notes: - + * Either `orderId` or `origClientOrderId` must be sent. * * @throws ApiException if the Api call fails */ @Test - public void queryOrderTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200925"; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; @@ -896,31 +913,28 @@ public void queryOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "symbol=&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "cbec82483be2ad044b893ffb2e6bc0d55370e378eaea0b4b61d95893bd9cc458", - actualRequest.url().queryParameter("signature")); + assertEquals("symbol=BTCUSD_200925&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("47de3ec7159e0434e57901face422fd64ed83f8c2800c1b6bc885c74846a398b", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/order", actualRequest.url().encodedPath()); } /** - * User's Force Orders(USER_DATA) + * User's Force Orders (USER_DATA) * - *

User's Force Orders * If \"autoCloseType\" is not sent, orders with both of - * the types will be returned * If \"startTime\" is not sent, data within 200 days - * before \"endTime\" can be queried Weight: 20 with symbol, 50 without symbol + *

User's Force Orders Weight: **20** (after CM migration: **20** with symbol / **50** + * without symbol) Security Type: USER_DATA Notes: - If \"autoCloseType\" is not sent, + * orders with both of the types will be returned - Only support querying data in the past 90 + * days * * @throws ApiException if the Api call fails */ @Test - public void usersForceOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void usersForceOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200925"; AutoCloseType autoCloseType = AutoCloseType.LIQUIDATION; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; Long recvWindow = 5000L; ApiResponse response = api.usersForceOrders(symbol, autoCloseType, startTime, endTime, limit, recvWindow); @@ -935,12 +949,9 @@ public void usersForceOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSD_200925&autoCloseType=LIQUIDATION&startTime=1623319461670&endTime=1641782889000&limit=30&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&autoCloseType=LIQUIDATION&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "a8fbc61c925506a4d0328c80dbe4bd786245accbfc50aef2a14a769d18bde9d9", - actualRequest.url().queryParameter("signature")); + "0439779de40df2e93621767c8d44b73d29796603ef4af265e4c3809c6adc399c", actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/forceOrders", actualRequest.url().encodedPath()); } } diff --git a/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/UserDataStreamsApiTest.java b/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/UserDataStreamsApiTest.java index b0121d89b..771ed5b29 100644 --- a/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/UserDataStreamsApiTest.java +++ b/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/UserDataStreamsApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading COIN Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API + * Futures (COIN-M) REST API + * Access market data, manage accounts, and trade COIN-M perpetual and delivery futures. * * The version of the OpenAPI document: 1.0.0 * @@ -26,6 +26,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.KeepaliveUserDataStreamResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.StartUserDataStreamResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -77,14 +78,14 @@ public void initApiClient() throws ApiException { } /** - * Close User Data Stream(USER_STREAM) + * Close User Data Stream (USER_STREAM) * - *

Close out a user data stream. Weight: 1 + *

Close out a user data stream. Weight(IP): 1 Security Type: USER_STREAM * * @throws ApiException if the Api call fails */ @Test - public void closeUserDataStreamTest() throws ApiException, CryptoException { + public void closeUserDataStreamTest() throws ApiException, CryptoException, IOException { api.closeUserDataStream(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -93,7 +94,8 @@ public void closeUserDataStreamTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/listenKey", actualRequest.url().encodedPath()); } @@ -101,21 +103,24 @@ public void closeUserDataStreamTest() throws ApiException, CryptoException { * Keepalive User Data Stream (USER_STREAM) * *

Keepalive a user data stream to prevent a time out. User data streams will close after 60 - * minutes. Weight: 1 + * minutes. Weight(IP): 1 Security Type: USER_STREAM * * @throws ApiException if the Api call fails */ @Test - public void keepaliveUserDataStreamTest() throws ApiException, CryptoException { - ApiResponse keepaliveUserDataStreamResponseApiResponse = api.keepaliveUserDataStream(); + public void keepaliveUserDataStreamTest() throws ApiException, CryptoException, IOException { + ApiResponse response = api.keepaliveUserDataStream(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); - Mockito.verify(apiClientSpy).execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/listenKey", actualRequest.url().encodedPath()); } @@ -124,12 +129,13 @@ public void keepaliveUserDataStreamTest() throws ApiException, CryptoException { * *

Start a new user data stream. The stream will close after 60 minutes unless a keepalive is * sent. If the account has an active `listenKey`, that `listenKey` will be - * returned and its validity will be extended for 60 minutes. Weight: 1 + * returned and its validity will be extended for 60 minutes. Weight(IP): 1 Security Type: + * USER_STREAM * * @throws ApiException if the Api call fails */ @Test - public void startUserDataStreamTest() throws ApiException, CryptoException { + public void startUserDataStreamTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.startUserDataStream(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -139,7 +145,8 @@ public void startUserDataStreamTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/dapi/v1/listenKey", actualRequest.url().encodedPath()); } } diff --git a/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/TradeApiTest.java b/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/TradeApiTest.java index 001327725..3e4f1c653 100644 --- a/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/TradeApiTest.java +++ b/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/TradeApiTest.java @@ -18,18 +18,8 @@ import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; import com.binance.connector.client.common.websocket.dtos.RequestWrapperDTO; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.CancelOrderRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.CancelOrderResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.ModifyOrderRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.ModifyOrderResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.NewOrderRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.NewOrderResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.PositionInformationRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.PositionInformationResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.QueryOrderRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.QueryOrderResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.Side; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.Type; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.*; + import java.io.File; import java.io.IOException; import java.net.URISyntaxException; @@ -211,7 +201,7 @@ public void newOrderTest() throws ApiException, URISyntaxException, IOException newOrderRequest.symbol(""); newOrderRequest.side(Side.BUY); - newOrderRequest.type(Type.LIMIT); + newOrderRequest.type(OrderType.LIMIT); CompletableFuture response = api.newOrder(newOrderRequest); ArgumentCaptor> callArgumentCaptor = diff --git a/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/WebsocketMarketStreamsApiTest.java b/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/WebsocketMarketStreamsApiTest.java index 3f001c0ed..4e392da17 100644 --- a/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/WebsocketMarketStreamsApiTest.java +++ b/clients/derivatives-trading-coin-futures/src/test/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/WebsocketMarketStreamsApiTest.java @@ -19,44 +19,8 @@ import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; import com.binance.connector.client.common.websocket.dtos.RequestWrapperDTO; import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AggregateTradeStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AggregateTradeStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllBookTickersStreamRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllBookTickersStreamResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketLiquidationOrderStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketLiquidationOrderStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketMiniTickersStreamRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketMiniTickersStreamResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketTickersStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketTickersStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.ContinuousContractKlineCandlestickStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.ContinuousContractKlineCandlestickStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.ContractInfoStreamRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.ContractInfoStreamResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.DiffBookDepthStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.DiffBookDepthStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndexKlineCandlestickStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndexKlineCandlestickStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndexPriceStreamRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndexPriceStreamResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolBookTickerStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolBookTickerStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolMiniTickerStreamRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolMiniTickerStreamResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolTickerStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolTickerStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.KlineCandlestickStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.KlineCandlestickStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.LiquidationOrderStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.LiquidationOrderStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceKlineCandlestickStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceKlineCandlestickStreamsResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceOfAllSymbolsOfAPairRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceOfAllSymbolsOfAPairResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceStreamRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceStreamResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.PartialBookDepthStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.PartialBookDepthStreamsResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.*; + import java.io.File; import java.io.IOException; import java.net.URISyntaxException; @@ -78,13 +42,13 @@ /** API tests for WebsocketMarketStreamsApi */ public class WebsocketMarketStreamsApiTest { - private WebsocketMarketStreamsApi api; + private DefaultApi api; private StreamConnectionWrapper connectionSpy; private Session sessionMock; @BeforeEach public void initApiClient() throws Exception { - URL resource = WebsocketMarketStreamsApi.class.getResource("/test-ed25519-prv-key.pem"); + URL resource = DerivativesTradingCoinFuturesWebSocketStreams.class.getResource("/test-ed25519-prv-key.pem"); SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); signatureConfiguration.setApiKey("apiKey"); File file = new File(resource.toURI()); @@ -112,7 +76,7 @@ public void initApiClient() throws Exception { Mockito.doNothing().when(connectionSpy).setUserAgent(Mockito.anyString()); Mockito.doReturn(1736393892000L).when(connectionSpy).getTimestamp(); connectionSpy.connect(); - WebsocketMarketStreamsApi accountApi = new WebsocketMarketStreamsApi(connectionSpy); + DefaultApi accountApi = new DefaultApi(connectionSpy); api = Mockito.spy(accountApi); Mockito.doReturn("eaf3292c-64b6-4c04-ad4f-4ca2608b42b4").when(api).getRequestID(); } @@ -309,8 +273,8 @@ public void continuousContractKlineCandlestickStreamsTest() new ContinuousContractKlineCandlestickStreamsRequest(); continuousContractKlineCandlestickStreamsRequest.pair("btcusdt"); - continuousContractKlineCandlestickStreamsRequest.contractType("next_quarter"); - continuousContractKlineCandlestickStreamsRequest.interval("1m"); + continuousContractKlineCandlestickStreamsRequest.contractType(ContractType.next_quarter); + continuousContractKlineCandlestickStreamsRequest.interval(Interval.INTERVAL_1m); StreamBlockingQueueWrapper response = api.continuousContractKlineCandlestickStreams( @@ -419,7 +383,7 @@ public void indexKlineCandlestickStreamsTest() new IndexKlineCandlestickStreamsRequest(); indexKlineCandlestickStreamsRequest.pair("btcusdt"); - indexKlineCandlestickStreamsRequest.interval("1m"); + indexKlineCandlestickStreamsRequest.interval(Interval.INTERVAL_1m); StreamBlockingQueueWrapper response = api.indexKlineCandlestickStreams(indexKlineCandlestickStreamsRequest); @@ -454,7 +418,7 @@ public void indexPriceStreamTest() throws ApiException, URISyntaxException, IOEx IndexPriceStreamRequest indexPriceStreamRequest = new IndexPriceStreamRequest(); indexPriceStreamRequest.pair("btcusdt"); - indexPriceStreamRequest.updateSpeed("100ms"); + indexPriceStreamRequest.updateSpeed(UpdateSpeed.UPDATE_SPEED_100ms); StreamBlockingQueueWrapper response = api.indexPriceStream(indexPriceStreamRequest); @@ -603,7 +567,7 @@ public void klineCandlestickStreamsTest() throws ApiException, URISyntaxExceptio new KlineCandlestickStreamsRequest(); klineCandlestickStreamsRequest.symbol("btcusdt"); - klineCandlestickStreamsRequest.interval("1m"); + klineCandlestickStreamsRequest.interval(Interval.INTERVAL_1m); StreamBlockingQueueWrapper response = api.klineCandlestickStreams(klineCandlestickStreamsRequest); @@ -626,44 +590,6 @@ public void klineCandlestickStreamsTest() throws ApiException, URISyntaxExceptio JSONAssert.assertEquals(expectedJson, sentPayload, true); } - /** - * Liquidation Order Streams - * - *

The Liquidation Order Snapshot Streams push force liquidation order information for - * specific symbol. For each symbol,only the latest one liquidation order within 1000ms will be - * pushed as the snapshot. If no liquidation happens in the interval of 1000ms, no stream will - * be pushed. Update Speed: 1000ms - * - * @throws ApiException if the Api call fails - */ - @Test - public void liquidationOrderStreamsTest() throws ApiException, URISyntaxException, IOException { - LiquidationOrderStreamsRequest liquidationOrderStreamsRequest = - new LiquidationOrderStreamsRequest(); - - liquidationOrderStreamsRequest.symbol("btcusdt"); - - StreamBlockingQueueWrapper response = - api.liquidationOrderStreams(liquidationOrderStreamsRequest); - ArgumentCaptor, LiquidationOrderStreamsResponse>> - callArgumentCaptor = ArgumentCaptor.forClass(RequestWrapperDTO.class); - Mockito.verify(connectionSpy).innerSend(callArgumentCaptor.capture()); - ArgumentCaptor sendArgumentCaptor = ArgumentCaptor.forClass(String.class); - RemoteEndpoint remote = sessionMock.getRemote(); - Mockito.verify(remote).sendString(sendArgumentCaptor.capture(), Mockito.any()); - RequestWrapperDTO, LiquidationOrderStreamsResponse> requestWrapperDTO = - callArgumentCaptor.getValue(); - Set params = requestWrapperDTO.getParams(); - // TODO: test validations - String sentPayload = sendArgumentCaptor.getValue(); - - URL resource = - WebsocketMarketStreamsApiTest.class.getResource( - "/expected/stream/WebsocketMarketStreamsApi/symbol@forceOrder-test.json"); - String expectedJson = Files.readString(Paths.get(resource.toURI())); - JSONAssert.assertEquals(expectedJson, sentPayload, true); - } - /** * Mark Price Kline/Candlestick Streams * @@ -678,7 +604,7 @@ public void markPriceKlineCandlestickStreamsTest() new MarkPriceKlineCandlestickStreamsRequest(); markPriceKlineCandlestickStreamsRequest.symbol("btcusdt"); - markPriceKlineCandlestickStreamsRequest.interval("1m"); + markPriceKlineCandlestickStreamsRequest.interval(Interval.INTERVAL_1m); StreamBlockingQueueWrapper response = api.markPriceKlineCandlestickStreams(markPriceKlineCandlestickStreamsRequest); @@ -715,7 +641,7 @@ public void markPriceOfAllSymbolsOfAPairTest() new MarkPriceOfAllSymbolsOfAPairRequest(); markPriceOfAllSymbolsOfAPairRequest.pair("btcusdt"); - markPriceOfAllSymbolsOfAPairRequest.updateSpeed("100ms"); + markPriceOfAllSymbolsOfAPairRequest.updateSpeed(UpdateSpeed.UPDATE_SPEED_100ms); StreamBlockingQueueWrapper response = api.markPriceOfAllSymbolsOfAPair(markPriceOfAllSymbolsOfAPairRequest); @@ -750,7 +676,7 @@ public void markPriceStreamTest() throws ApiException, URISyntaxException, IOExc MarkPriceStreamRequest markPriceStreamRequest = new MarkPriceStreamRequest(); markPriceStreamRequest.symbol("btcusdt"); - markPriceStreamRequest.setUpdateSpeed("100ms"); + markPriceStreamRequest.setUpdateSpeed(UpdateSpeed.UPDATE_SPEED_100ms); StreamBlockingQueueWrapper response = api.markPriceStream(markPriceStreamRequest); @@ -787,8 +713,8 @@ public void partialBookDepthStreamsTest() throws ApiException, URISyntaxExceptio new PartialBookDepthStreamsRequest(); partialBookDepthStreamsRequest.symbol("btcusdt"); - partialBookDepthStreamsRequest.levels(10L); - partialBookDepthStreamsRequest.setUpdateSpeed("100ms"); + partialBookDepthStreamsRequest.levels(Levels.LEVELS_10); + partialBookDepthStreamsRequest.setUpdateSpeed(UpdateSpeed.UPDATE_SPEED_100ms); StreamBlockingQueueWrapper response = api.partialBookDepthStreams(partialBookDepthStreamsRequest); diff --git a/clients/derivatives-trading-options/CHANGELOG.md b/clients/derivatives-trading-options/CHANGELOG.md index 1fed22f65..bed0df5a4 100644 --- a/clients/derivatives-trading-options/CHANGELOG.md +++ b/clients/derivatives-trading-options/CHANGELOG.md @@ -1,5 +1,147 @@ # Changelog +## 9.0.0 - 2026-07-29 + +### Added (3) + +#### REST API + +- `tradfiOptionsContract()` (`POST /eapi/v1/stock/contract`) + +#### WebSocket Streams + +- `hour24Ticker()` (`@optionTicker` stream) +- `openInterest()` (`@openInterest@` stream) + +### Changed (21) + +#### REST API + +- Modified parameter `currency`: + - enum added: `USDT` + - affected methods: + - `accountFundingFlow()` (`GET /eapi/v1/bill`) +- Modified parameter `deltaLimit`: + - required: `false` → `true` + - affected methods: + - `setMarketMakerProtectionConfig()` (`POST /eapi/v1/mmpSet`) +- Modified parameter `frozenTimeInMilliseconds`: + - required: `false` → `true` + - affected methods: + - `setMarketMakerProtectionConfig()` (`POST /eapi/v1/mmpSet`) +- Modified parameter `interval`: + - enum added: `1m`, `3m`, `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `6h`, `8h`, `12h`, `1d`, `3d`, `1w`, `1M` + - affected methods: + - `klineCandlestickData()` (`GET /eapi/v1/klines`) +- Modified parameter `legs`: + - items: required added: `quantity`, `symbol`, `side`, `type` + - items: property `quantity` added + - items: property `side` added + - items: property `symbol` added + - items: property `type` added + - items: property `price` added + - items: item property `quantity` added + - items: item property `side` added + - items: item property `symbol` added + - items: item property `type` added + - items: item property `price` added + - affected methods: + - `newBlockTradeOrder()` (`POST /eapi/v1/block/order/create`) +- Modified parameter `liquidity`: + - enum added: `MAKER`, `TAKER` + - affected methods: + - `newBlockTradeOrder()` (`POST /eapi/v1/block/order/create`) +- Modified parameter `orders`: + - items: required added: `symbol`, `side`, `type`, `quantity` + - items.`isMmp`: type `string` → `boolean` + - items.`postOnly`: type `string` → `boolean` + - items.`price`: type `string` → `number` + - items.`quantity`: type `string` → `number` + - items.`reduceOnly`: type `string` → `boolean` + - items.`isMmp`: type `string` → `boolean` + - items.`postOnly`: type `string` → `boolean` + - items.`price`: type `string` → `number` + - items.`quantity`: type `string` → `number` + - items.`reduceOnly`: type `string` → `boolean` + - affected methods: + - `placeMultipleOrders()` (`POST /eapi/v1/batchOrders`) +- Modified parameter `qtyLimit`: + - required: `false` → `true` + - affected methods: + - `setMarketMakerProtectionConfig()` (`POST /eapi/v1/mmpSet`) +- Modified parameter `selfTradePreventionMode`: + - enum added: `NONE` + - affected methods: + - `newOrder()` (`POST /eapi/v1/order`) +- Modified parameter `symbol`: + - required: `false` → `true` + - affected methods: + - `accountTradeList()` (`GET /eapi/v1/userTrades`) +- Modified parameter `underlying`: + - required: `false` → `true` + - affected methods: + - `getMarketMakerProtectionConfig()` (`GET /eapi/v1/mmp`) + - `resetMarketMakerProtectionConfig()` (`POST /eapi/v1/mmpReset`) + - `setMarketMakerProtectionConfig()` (`POST /eapi/v1/mmpSet`) +- Modified parameter `windowTimeInMilliseconds`: + - required: `false` → `true` + - affected methods: + - `setMarketMakerProtectionConfig()` (`POST /eapi/v1/mmpSet`) +- Modified response for `cancelMultipleOptionOrders()` (`DELETE /eapi/v1/batchOrders`): + - items: property `fee` added + - items: item property `fee` added + +- Modified response for `placeMultipleOrders()` (`POST /eapi/v1/batchOrders`): + - items: property `postOnly` added + - items: property `fee` added + - items: item property `postOnly` added + - items: item property `fee` added + +- Modified response for `orderBook()` (`GET /eapi/v1/depth`): + - `asks`.items: minItems `0` → `2` + - `asks`.items: maxItems `null` → `2` + - `bids`.items: minItems `0` → `2` + - `bids`.items: maxItems `null` → `2` + +- Modified response for `exchangeInformation()` (`GET /eapi/v1/exchangeInfo`): + - `optionSymbols`.items: property `contractType` added + - `optionSymbols`.items: property `nakedSell` added + - `optionSymbols`.items: property `underlyingType` added + - `optionSymbols`.items: item property `contractType` added + - `optionSymbols`.items: item property `nakedSell` added + - `optionSymbols`.items: item property `underlyingType` added + +- Modified response for `querySingleOrder()` (`GET /eapi/v1/order`): + - property `postOnly` added + +- Modified response for `newOrder()` (`POST /eapi/v1/order`): + - property `postOnly` added + - property `fee` added + +#### WebSocket Streams + +- Modified parameter `interval`: + - enum added: `1m`, `3m`, `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `6h`, `12h`, `1d`, `3d`, `1w` + - affected methods: + - `klineCandlestickStreams()` (`@kline_` stream) +- Modified parameter `level`: + - enum added: `5`, `10`, `20` + - affected methods: + - `partialBookDepthStreams()` (`@depth@` stream) +- Modified parameter `updateSpeed`: + - required: `false` → `true` + - enum added: `100ms`, `500ms` + - affected methods: + - `partialBookDepthStreams()` (`@depth@` stream) + - `diffBookDepthStreams()` (`@depth@` stream) + +### Removed (2) + +#### WebSocket Streams + +- `/@optionTicker()` (`@optionTicker` stream) +- `/underlying@optionOpenInterest@()` (`underlying@optionOpenInterest@` stream) + ## 8.0.0 - 2026-05-04 - Added stop method for WebSocket diff --git a/clients/derivatives-trading-options/docs/AcceptBlockTradeOrderResponse.md b/clients/derivatives-trading-options/docs/AcceptBlockTradeOrderResponse.md index 0c9312f4c..03b7c1a9a 100644 --- a/clients/derivatives-trading-options/docs/AcceptBlockTradeOrderResponse.md +++ b/clients/derivatives-trading-options/docs/AcceptBlockTradeOrderResponse.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**blockTradeSettlementKey** | **String** | | [optional] | -|**expireTime** | **Long** | | [optional] | -|**liquidity** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**createTime** | **Long** | | [optional] | -|**legs** | [**List<AcceptBlockTradeOrderResponseLegsInner>**](AcceptBlockTradeOrderResponseLegsInner.md) | | [optional] | +|**blockTradeSettlementKey** | **String** | block Trade Settlement Key | [optional] | +|**expireTime** | **Long** | expire Time | [optional] | +|**liquidity** | **String** | liquidity | [optional] | +|**status** | **String** | status | [optional] | +|**createTime** | **Long** | create Time | [optional] | +|**legs** | [**List<AcceptBlockTradeOrderResponseLegsInner>**](AcceptBlockTradeOrderResponseLegsInner.md) | legs | [optional] | diff --git a/clients/derivatives-trading-options/docs/AcceptBlockTradeOrderResponseLegsInner.md b/clients/derivatives-trading-options/docs/AcceptBlockTradeOrderResponseLegsInner.md index a09bf7cf3..4b8307918 100644 --- a/clients/derivatives-trading-options/docs/AcceptBlockTradeOrderResponseLegsInner.md +++ b/clients/derivatives-trading-options/docs/AcceptBlockTradeOrderResponseLegsInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**quantity** | **String** | | [optional] | -|**price** | **String** | | [optional] | +|**symbol** | **String** | symbol | [optional] | +|**side** | **String** | side | [optional] | +|**quantity** | **String** | quantity | [optional] | +|**price** | **String** | price | [optional] | diff --git a/clients/derivatives-trading-options/docs/AccountApi.md b/clients/derivatives-trading-options/docs/AccountApi.md index d469deb46..49946803c 100644 --- a/clients/derivatives-trading-options/docs/AccountApi.md +++ b/clients/derivatives-trading-options/docs/AccountApi.md @@ -14,7 +14,7 @@ All URIs are relative to *https://eapi.binance.com* Account Funding Flow (USER_DATA) -Query account funding flows. * Only support querying data in the past 3 months Weight: 1 +Query account funding flows. Weight(IP): 1 Security Type: USER_DATA Notes: - Only support querying data in the past 3 months ### Example ```java @@ -31,12 +31,12 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String currency = "currency_example"; // String | Asset type, only support USDT as of now - Long recordId = 56L; // Long | Return the recordId and subsequent data, the latest data is returned by default, e.g 100000 - Long startTime = 56L; // Long | Start Time, e.g 1593511200000 - Long endTime = 56L; // Long | End Time, e.g 1593512200000 - Long limit = 56L; // Long | Number of result sets returned Default:100 Max:1000 - Long recvWindow = 56L; // Long | + Currency currency = Currency.fromValue("USDT"); // Currency | Asset type, only support USDT as of now + Long recordId = 100000L; // Long | Return the recordId and subsequent data, the latest data is returned by default + Long startTime = 1623319461670L; // Long | Start Time, e.g 1593511200000 + Long endTime = 1641782889000L; // Long | End Time, e.g 1593512200000 + Long limit = 20L; // Long | Number of result sets returned + Long recvWindow = 5000L; // Long | Recv Window. try { AccountFundingFlowResponse result = apiInstance.accountFundingFlow(currency, recordId, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -55,12 +55,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **currency** | **String**| Asset type, only support USDT as of now | | -| **recordId** | **Long**| Return the recordId and subsequent data, the latest data is returned by default, e.g 100000 | [optional] | +| **currency** | [**Currency**](.md)| Asset type, only support USDT as of now | [enum: USDT] | +| **recordId** | **Long**| Return the recordId and subsequent data, the latest data is returned by default | [optional] | | **startTime** | **Long**| Start Time, e.g 1593511200000 | [optional] | | **endTime** | **Long**| End Time, e.g 1593512200000 | [optional] | -| **limit** | **Long**| Number of result sets returned Default:100 Max:1000 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **limit** | **Long**| Number of result sets returned | [optional] | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type @@ -86,7 +86,7 @@ No authorization required Option Margin Account Information (USER_DATA) -Get current account information. Weight: 3 +Get current account information. Weight(IP): 3 Security Type: USER_DATA ### Example ```java @@ -103,7 +103,7 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | Recv Window. try { OptionMarginAccountInformationResponse result = apiInstance.optionMarginAccountInformation(recvWindow); System.out.println(result); @@ -122,7 +122,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type diff --git a/clients/derivatives-trading-options/docs/AccountBlockTradeListResponseInner.md b/clients/derivatives-trading-options/docs/AccountBlockTradeListResponseInner.md index ec8d8ac25..1f08fd74f 100644 --- a/clients/derivatives-trading-options/docs/AccountBlockTradeListResponseInner.md +++ b/clients/derivatives-trading-options/docs/AccountBlockTradeListResponseInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**parentOrderId** | **String** | | [optional] | -|**crossType** | **String** | | [optional] | -|**legs** | [**List<AccountBlockTradeListResponseInnerLegsInner>**](AccountBlockTradeListResponseInnerLegsInner.md) | | [optional] | -|**blockTradeSettlementKey** | **String** | | [optional] | +|**parentOrderId** | **String** | parent Order Id | [optional] | +|**crossType** | **String** | cross Type | [optional] | +|**legs** | [**List<AccountBlockTradeListResponseInnerLegsInner>**](AccountBlockTradeListResponseInnerLegsInner.md) | legs | [optional] | +|**blockTradeSettlementKey** | **String** | block Trade Settlement Key | [optional] | diff --git a/clients/derivatives-trading-options/docs/AccountBlockTradeListResponseInnerLegsInner.md b/clients/derivatives-trading-options/docs/AccountBlockTradeListResponseInnerLegsInner.md index 3381f817e..a84ee1ea6 100644 --- a/clients/derivatives-trading-options/docs/AccountBlockTradeListResponseInnerLegsInner.md +++ b/clients/derivatives-trading-options/docs/AccountBlockTradeListResponseInnerLegsInner.md @@ -7,25 +7,25 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**createTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**orderId** | **String** | | [optional] | -|**orderPrice** | **Double** | | [optional] | -|**orderQuantity** | **Double** | | [optional] | -|**orderStatus** | **String** | | [optional] | -|**executedQty** | **Double** | | [optional] | -|**executedAmount** | **Double** | | [optional] | -|**fee** | **Double** | | [optional] | -|**orderType** | **String** | | [optional] | -|**orderSide** | **String** | | [optional] | -|**id** | **String** | | [optional] | -|**tradeId** | **Long** | | [optional] | -|**tradePrice** | **Double** | | [optional] | -|**tradeQty** | **Double** | | [optional] | -|**tradeTime** | **Long** | | [optional] | -|**liquidity** | **String** | | [optional] | -|**commission** | **Double** | | [optional] | +|**createTime** | **Long** | create Time | [optional] | +|**updateTime** | **Long** | update Time | [optional] | +|**symbol** | **String** | symbol | [optional] | +|**orderId** | **String** | order Id | [optional] | +|**orderPrice** | **Double** | order Price | [optional] | +|**orderQuantity** | **Double** | order Quantity | [optional] | +|**orderStatus** | **String** | order Status | [optional] | +|**executedQty** | **Double** | executed Qty | [optional] | +|**executedAmount** | **Double** | executed Amount | [optional] | +|**fee** | **Double** | fee | [optional] | +|**orderType** | **String** | order Type | [optional] | +|**orderSide** | **String** | order Side | [optional] | +|**id** | **String** | id | [optional] | +|**tradeId** | **Long** | trade Id | [optional] | +|**tradePrice** | **Double** | trade Price | [optional] | +|**tradeQty** | **Double** | trade Qty | [optional] | +|**tradeTime** | **Long** | trade Time | [optional] | +|**liquidity** | **String** | liquidity | [optional] | +|**commission** | **Double** | commission | [optional] | diff --git a/clients/derivatives-trading-options/docs/AccountFundingFlowResponseInner.md b/clients/derivatives-trading-options/docs/AccountFundingFlowResponseInner.md index f9eacbf62..c3600fbdb 100644 --- a/clients/derivatives-trading-options/docs/AccountFundingFlowResponseInner.md +++ b/clients/derivatives-trading-options/docs/AccountFundingFlowResponseInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**asset** | **String** | | [optional] | -|**amount** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**createDate** | **Long** | | [optional] | +|**id** | **Long** | id | [optional] | +|**asset** | **String** | Asset type | [optional] | +|**amount** | **String** | Amount (positive numbers represent inflow, negative numbers represent outflow) | [optional] | +|**type** | **String** | type (fees) | [optional] | +|**createDate** | **Long** | Time | [optional] | diff --git a/clients/derivatives-trading-options/docs/AccountTradeListResponseInner.md b/clients/derivatives-trading-options/docs/AccountTradeListResponseInner.md index 16b7c6b58..8966755c3 100644 --- a/clients/derivatives-trading-options/docs/AccountTradeListResponseInner.md +++ b/clients/derivatives-trading-options/docs/AccountTradeListResponseInner.md @@ -7,22 +7,22 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**tradeId** | **Long** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**quantity** | **String** | | [optional] | -|**fee** | **String** | | [optional] | -|**realizedProfit** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**liquidity** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**priceScale** | **Long** | | [optional] | -|**quantityScale** | **Long** | | [optional] | -|**optionSide** | **String** | | [optional] | -|**quoteAsset** | **String** | | [optional] | +|**id** | **Long** | unique id | [optional] | +|**tradeId** | **Long** | trade id | [optional] | +|**orderId** | **Long** | order id | [optional] | +|**symbol** | **String** | option symbol | [optional] | +|**price** | **String** | trade price | [optional] | +|**quantity** | **String** | trade quantity | [optional] | +|**fee** | **String** | fee(negative is fee deduction) | [optional] | +|**realizedProfit** | **String** | realized profit/loss | [optional] | +|**side** | **String** | order side | [optional] | +|**type** | **String** | order type | [optional] | +|**liquidity** | **String** | TAKER or MAKER | [optional] | +|**time** | **Long** | trade time | [optional] | +|**priceScale** | **Long** | price Scale | [optional] | +|**quantityScale** | **Long** | quantity Scale | [optional] | +|**optionSide** | **String** | option Side | [optional] | +|**quoteAsset** | **String** | quote Asset | [optional] | diff --git a/clients/derivatives-trading-options/docs/AccountUpdate.md b/clients/derivatives-trading-options/docs/AccountUpdate.md new file mode 100644 index 000000000..45d73bee7 --- /dev/null +++ b/clients/derivatives-trading-options/docs/AccountUpdate.md @@ -0,0 +1,21 @@ + + +# AccountUpdate + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction Time | [optional] | +|**eq** | **String** | Account equity in USDT | [optional] | +|**aeq** | **String** | Account adjusted equity in USDT | [optional] | +|**bLowerCase** | **String** | Account wallet balance in USDT | [optional] | +|**mLowerCase** | **String** | Position value | [optional] | +|**uLowerCase** | **String** | Unrealized PnL | [optional] | +|**iLowerCase** | **String** | Initial margin in USDT | [optional] | +|**M** | **String** | Maintenance margin in USDT | [optional] | + + + diff --git a/clients/derivatives-trading-options/docs/AutoCancelAllOpenOrdersResponse.md b/clients/derivatives-trading-options/docs/AutoCancelAllOpenOrdersResponse.md index 3fb4f3acd..ed1e243b5 100644 --- a/clients/derivatives-trading-options/docs/AutoCancelAllOpenOrdersResponse.md +++ b/clients/derivatives-trading-options/docs/AutoCancelAllOpenOrdersResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**underlyings** | **List<String>** | | [optional] | +|**underlyings** | **List<String>** | underlyings | [optional] | diff --git a/clients/derivatives-trading-options/docs/BalancePositionUpdate.md b/clients/derivatives-trading-options/docs/BalancePositionUpdate.md index c3dad7ced..d0c043d0e 100644 --- a/clients/derivatives-trading-options/docs/BalancePositionUpdate.md +++ b/clients/derivatives-trading-options/docs/BalancePositionUpdate.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**mLowerCase** | **String** | | [optional] | -|**B** | [**List<BalancePositionUpdateBInner>**](BalancePositionUpdateBInner.md) | | [optional] | -|**P** | [**List<BalancePositionUpdatePInner>**](BalancePositionUpdatePInner.md) | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction Time | [optional] | +|**mLowerCase** | **String** | Event reason type | [optional] | +|**B** | [**List<BalancePositionUpdateBInner>**](BalancePositionUpdateBInner.md) | Balances | [optional] | +|**P** | [**List<BalancePositionUpdatePInner>**](BalancePositionUpdatePInner.md) | Positions | [optional] | diff --git a/clients/derivatives-trading-options/docs/BalancePositionUpdateBInner.md b/clients/derivatives-trading-options/docs/BalancePositionUpdateBInner.md index 9b232819f..e94545fab 100644 --- a/clients/derivatives-trading-options/docs/BalancePositionUpdateBInner.md +++ b/clients/derivatives-trading-options/docs/BalancePositionUpdateBInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**aLowerCase** | **String** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**bc** | **String** | | [optional] | +|**aLowerCase** | **String** | Margin asset | [optional] | +|**bLowerCase** | **String** | Account balance | [optional] | +|**bc** | **String** | Balance Change except PnL and Commission | [optional] | diff --git a/clients/derivatives-trading-options/docs/BalancePositionUpdatePInner.md b/clients/derivatives-trading-options/docs/BalancePositionUpdatePInner.md index bb2be4d4d..a90966970 100644 --- a/clients/derivatives-trading-options/docs/BalancePositionUpdatePInner.md +++ b/clients/derivatives-trading-options/docs/BalancePositionUpdatePInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**aLowerCase** | **String** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**cLowerCase** | **String** | Position quantity | [optional] | +|**pLowerCase** | **String** | Position value | [optional] | +|**aLowerCase** | **String** | Average entry price | [optional] | diff --git a/clients/derivatives-trading-options/docs/CancelAllOptionOrdersByUnderlyingResponse.md b/clients/derivatives-trading-options/docs/CancelAllOptionOrdersByUnderlyingResponse.md index ea1fedbae..6cf0aa86e 100644 --- a/clients/derivatives-trading-options/docs/CancelAllOptionOrdersByUnderlyingResponse.md +++ b/clients/derivatives-trading-options/docs/CancelAllOptionOrdersByUnderlyingResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **Long** | | [optional] | -|**msg** | **String** | | [optional] | +|**code** | **Long** | code | [optional] | +|**msg** | **String** | msg | [optional] | diff --git a/clients/derivatives-trading-options/docs/CancelAllOptionOrdersOnSpecificSymbolResponse.md b/clients/derivatives-trading-options/docs/CancelAllOptionOrdersOnSpecificSymbolResponse.md index 2ba6d315c..d6489df4a 100644 --- a/clients/derivatives-trading-options/docs/CancelAllOptionOrdersOnSpecificSymbolResponse.md +++ b/clients/derivatives-trading-options/docs/CancelAllOptionOrdersOnSpecificSymbolResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **String** | | [optional] | -|**msg** | **String** | | [optional] | +|**code** | **String** | code | [optional] | +|**msg** | **String** | msg | [optional] | diff --git a/clients/derivatives-trading-options/docs/CancelMultipleOptionOrdersResponseInner.md b/clients/derivatives-trading-options/docs/CancelMultipleOptionOrdersResponseInner.md index 6d52edd15..8d75b3261 100644 --- a/clients/derivatives-trading-options/docs/CancelMultipleOptionOrdersResponseInner.md +++ b/clients/derivatives-trading-options/docs/CancelMultipleOptionOrdersResponseInner.md @@ -7,26 +7,27 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**quantity** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**createTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**status** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | +|**orderId** | **Long** | System order number | [optional] | +|**symbol** | **String** | Option trading pair | [optional] | +|**price** | **String** | Order Price | [optional] | +|**quantity** | **String** | Order Quantity | [optional] | +|**executedQty** | **String** | Number of completed quantity | [optional] | +|**fee** | **String** | fee | [optional] | +|**side** | **String** | Buy/sell direction | [optional] | +|**type** | **String** | Order type | [optional] | +|**timeInForce** | **String** | Time in force method | [optional] | +|**reduceOnly** | **Boolean** | Order is reduce only Y/N | [optional] | +|**createTime** | **Long** | Order Time | [optional] | +|**updateTime** | **Long** | Update time | [optional] | +|**status** | **String** | Order status | [optional] | +|**avgPrice** | **String** | Average price of completed trade | [optional] | +|**clientOrderId** | **String** | Client order ID | [optional] | +|**priceScale** | **Long** | price Scale | [optional] | +|**quantityScale** | **Long** | quantity Scale | [optional] | +|**optionSide** | **String** | option Side | [optional] | +|**quoteAsset** | **String** | quote Asset | [optional] | +|**mmp** | **Boolean** | mmp | [optional] | |**source** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**priceScale** | **Long** | | [optional] | -|**quantityScale** | **Long** | | [optional] | -|**optionSide** | **String** | | [optional] | -|**quoteAsset** | **String** | | [optional] | -|**mmp** | **Boolean** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | diff --git a/clients/derivatives-trading-options/docs/CancelOptionOrderResponse.md b/clients/derivatives-trading-options/docs/CancelOptionOrderResponse.md index bc71699be..3d4ff36ef 100644 --- a/clients/derivatives-trading-options/docs/CancelOptionOrderResponse.md +++ b/clients/derivatives-trading-options/docs/CancelOptionOrderResponse.md @@ -7,26 +7,26 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**quantity** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**createDate** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**status** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**source** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**priceScale** | **Long** | | [optional] | -|**quantityScale** | **Long** | | [optional] | -|**optionSide** | **String** | | [optional] | -|**quoteAsset** | **String** | | [optional] | -|**mmp** | **Boolean** | | [optional] | +|**orderId** | **Long** | System order number | [optional] | +|**symbol** | **String** | Option trading pair | [optional] | +|**price** | **String** | Order Price | [optional] | +|**quantity** | **String** | Order Quantity | [optional] | +|**executedQty** | **String** | Number of executed quantity | [optional] | +|**side** | **String** | Buy/sell direction | [optional] | +|**type** | **String** | Order type | [optional] | +|**timeInForce** | **String** | Time in force method | [optional] | +|**reduceOnly** | **Boolean** | Order is reduce only Y/N | [optional] | +|**createDate** | **Long** | Order Time | [optional] | +|**updateTime** | **Long** | Update time | [optional] | +|**status** | **String** | Order status | [optional] | +|**avgPrice** | **String** | Average price of completed trade | [optional] | +|**source** | **String** | source | [optional] | +|**clientOrderId** | **String** | Client order ID | [optional] | +|**priceScale** | **Long** | price Scale | [optional] | +|**quantityScale** | **Long** | quantity Scale | [optional] | +|**optionSide** | **String** | option Side | [optional] | +|**quoteAsset** | **String** | quote Asset | [optional] | +|**mmp** | **Boolean** | mmp | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | diff --git a/clients/derivatives-trading-options/docs/CheckServerTimeResponse.md b/clients/derivatives-trading-options/docs/CheckServerTimeResponse.md index 19c4361d1..0b78c6e58 100644 --- a/clients/derivatives-trading-options/docs/CheckServerTimeResponse.md +++ b/clients/derivatives-trading-options/docs/CheckServerTimeResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**serverTime** | **Long** | | [optional] | +|**serverTime** | **Long** | server Time | [optional] | diff --git a/clients/derivatives-trading-options/docs/Currency.md b/clients/derivatives-trading-options/docs/Currency.md new file mode 100644 index 000000000..c1a6a39bf --- /dev/null +++ b/clients/derivatives-trading-options/docs/Currency.md @@ -0,0 +1,11 @@ + + +# Currency + +## Enum + + +* `USDT` (value: `"USDT"`) + + + diff --git a/clients/derivatives-trading-options/docs/DiffBookDepthStreamsRequest.md b/clients/derivatives-trading-options/docs/DiffBookDepthStreamsRequest.md index e50a13600..db0119fee 100644 --- a/clients/derivatives-trading-options/docs/DiffBookDepthStreamsRequest.md +++ b/clients/derivatives-trading-options/docs/DiffBookDepthStreamsRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Integer** | | [optional] | -|**symbol** | **String** | | | -|**updateSpeed** | **String** | | [optional] | +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | +|**updateSpeed** | **UpdateSpeed** | | [optional] | diff --git a/clients/derivatives-trading-options/docs/DiffBookDepthStreamsResponse.md b/clients/derivatives-trading-options/docs/DiffBookDepthStreamsResponse.md index 47c64c8c0..dc6e6c366 100644 --- a/clients/derivatives-trading-options/docs/DiffBookDepthStreamsResponse.md +++ b/clients/derivatives-trading-options/docs/DiffBookDepthStreamsResponse.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**U** | **Long** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**pu** | **Long** | | [optional] | -|**bLowerCase** | **List<DiffBookDepthStreamsResponseBItem>** | | [optional] | -|**aLowerCase** | **List<DiffBookDepthStreamsResponseAItem>** | | [optional] | +|**eLowerCase** | **String** | event type | [optional] | +|**E** | **Long** | event time | [optional] | +|**T** | **Long** | transaction time | [optional] | +|**sLowerCase** | **String** | Option symbol | [optional] | +|**U** | **Long** | First update ID in event | [optional] | +|**uLowerCase** | **Long** | Final update ID in event | [optional] | +|**pu** | **Long** | Final update Id in last stream(ie `u` in last stream) | [optional] | +|**bLowerCase** | **List<List<String>>** | Buy order | [optional] | +|**aLowerCase** | **List<List<String>>** | Sell order | [optional] | diff --git a/clients/derivatives-trading-options/docs/DiffBookDepthStreamsResponseAItem.md b/clients/derivatives-trading-options/docs/DiffBookDepthStreamsResponseAItem.md deleted file mode 100644 index e95d11d71..000000000 --- a/clients/derivatives-trading-options/docs/DiffBookDepthStreamsResponseAItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# DiffBookDepthStreamsResponseAItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-options/docs/DiffBookDepthStreamsResponseBItem.md b/clients/derivatives-trading-options/docs/DiffBookDepthStreamsResponseBItem.md deleted file mode 100644 index dce623f51..000000000 --- a/clients/derivatives-trading-options/docs/DiffBookDepthStreamsResponseBItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# DiffBookDepthStreamsResponseBItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-options/docs/ExchangeInformationResponse.md b/clients/derivatives-trading-options/docs/ExchangeInformationResponse.md index 4159e121e..dc70531a9 100644 --- a/clients/derivatives-trading-options/docs/ExchangeInformationResponse.md +++ b/clients/derivatives-trading-options/docs/ExchangeInformationResponse.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**timezone** | **String** | | [optional] | -|**serverTime** | **Long** | | [optional] | -|**optionContracts** | [**List<ExchangeInformationResponseOptionContractsInner>**](ExchangeInformationResponseOptionContractsInner.md) | | [optional] | -|**optionAssets** | [**List<ExchangeInformationResponseOptionAssetsInner>**](ExchangeInformationResponseOptionAssetsInner.md) | | [optional] | -|**optionSymbols** | [**List<ExchangeInformationResponseOptionSymbolsInner>**](ExchangeInformationResponseOptionSymbolsInner.md) | | [optional] | -|**rateLimits** | [**List<ExchangeInformationResponseRateLimitsInner>**](ExchangeInformationResponseRateLimitsInner.md) | | [optional] | +|**timezone** | **String** | Time zone used by the server | [optional] | +|**serverTime** | **Long** | Current system time | [optional] | +|**optionContracts** | [**List<ExchangeInformationResponseOptionContractsInner>**](ExchangeInformationResponseOptionContractsInner.md) | Option contract underlying asset info | [optional] | +|**optionAssets** | [**List<ExchangeInformationResponseOptionAssetsInner>**](ExchangeInformationResponseOptionAssetsInner.md) | Option asset info | [optional] | +|**optionSymbols** | [**List<ExchangeInformationResponseOptionSymbolsInner>**](ExchangeInformationResponseOptionSymbolsInner.md) | Option trading pair info | [optional] | +|**rateLimits** | [**List<ExchangeInformationResponseRateLimitsInner>**](ExchangeInformationResponseRateLimitsInner.md) | rate Limits | [optional] | diff --git a/clients/derivatives-trading-options/docs/ExchangeInformationResponseOptionAssetsInner.md b/clients/derivatives-trading-options/docs/ExchangeInformationResponseOptionAssetsInner.md index f829e462f..4b3d18fd3 100644 --- a/clients/derivatives-trading-options/docs/ExchangeInformationResponseOptionAssetsInner.md +++ b/clients/derivatives-trading-options/docs/ExchangeInformationResponseOptionAssetsInner.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | +|**name** | **String** | Asset name | [optional] | diff --git a/clients/derivatives-trading-options/docs/ExchangeInformationResponseOptionContractsInner.md b/clients/derivatives-trading-options/docs/ExchangeInformationResponseOptionContractsInner.md index 348a50464..c326fe8b5 100644 --- a/clients/derivatives-trading-options/docs/ExchangeInformationResponseOptionContractsInner.md +++ b/clients/derivatives-trading-options/docs/ExchangeInformationResponseOptionContractsInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**baseAsset** | **String** | | [optional] | -|**quoteAsset** | **String** | | [optional] | -|**underlying** | **String** | | [optional] | -|**settleAsset** | **String** | | [optional] | +|**baseAsset** | **String** | Base currency | [optional] | +|**quoteAsset** | **String** | Quotation asset | [optional] | +|**underlying** | **String** | Name of the underlying asset of the option contract | [optional] | +|**settleAsset** | **String** | Settlement currency | [optional] | diff --git a/clients/derivatives-trading-options/docs/ExchangeInformationResponseOptionSymbolsInner.md b/clients/derivatives-trading-options/docs/ExchangeInformationResponseOptionSymbolsInner.md index 12ec03159..115596d16 100644 --- a/clients/derivatives-trading-options/docs/ExchangeInformationResponseOptionSymbolsInner.md +++ b/clients/derivatives-trading-options/docs/ExchangeInformationResponseOptionSymbolsInner.md @@ -7,24 +7,27 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**expiryDate** | **Long** | | [optional] | -|**filters** | [**List<ExchangeInformationResponseOptionSymbolsInnerFiltersInner>**](ExchangeInformationResponseOptionSymbolsInnerFiltersInner.md) | | [optional] | -|**symbol** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**strikePrice** | **String** | | [optional] | -|**underlying** | **String** | | [optional] | -|**unit** | **Long** | | [optional] | -|**liquidationFeeRate** | **String** | | [optional] | -|**minQty** | **String** | | [optional] | -|**maxQty** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**maintenanceMargin** | **String** | | [optional] | -|**minInitialMargin** | **String** | | [optional] | -|**minMaintenanceMargin** | **String** | | [optional] | -|**priceScale** | **Long** | | [optional] | -|**quantityScale** | **Long** | | [optional] | -|**quoteAsset** | **String** | | [optional] | -|**status** | **String** | | [optional] | +|**expiryDate** | **Long** | expiry time | [optional] | +|**filters** | [**List<ExchangeInformationResponseOptionSymbolsInnerFiltersInner>**](ExchangeInformationResponseOptionSymbolsInnerFiltersInner.md) | filters | [optional] | +|**symbol** | **String** | Trading pair name | [optional] | +|**side** | **String** | Direction: CALL long, PUT short | [optional] | +|**strikePrice** | **String** | Strike price | [optional] | +|**underlying** | **String** | Name of the underlying asset of the option contract | [optional] | +|**unit** | **Long** | Contract unit, the quantity of the underlying asset represented by a single contract. | [optional] | +|**liquidationFeeRate** | **String** | liquidation fee rate | [optional] | +|**minQty** | **String** | Minimum order quantity | [optional] | +|**maxQty** | **String** | Maximum order quantity | [optional] | +|**initialMargin** | **String** | Initial Magin Ratio | [optional] | +|**maintenanceMargin** | **String** | Maintenance Margin Ratio | [optional] | +|**minInitialMargin** | **String** | Min Initial Margin Ratio | [optional] | +|**minMaintenanceMargin** | **String** | Min Maintenance Margin Ratio | [optional] | +|**priceScale** | **Long** | price precision | [optional] | +|**quantityScale** | **Long** | quantity precision | [optional] | +|**quoteAsset** | **String** | Quotation asset | [optional] | +|**contractType** | **String** | Contract type | [optional] | +|**underlyingType** | **String** | Underlying type | [optional] | +|**nakedSell** | **Boolean** | Whether naked selling is allowed for this symbol | [optional] | +|**status** | **String** | Trading Status | [optional] | diff --git a/clients/derivatives-trading-options/docs/ExchangeInformationResponseOptionSymbolsInnerFiltersInner.md b/clients/derivatives-trading-options/docs/ExchangeInformationResponseOptionSymbolsInnerFiltersInner.md index 77d9d23b8..081565393 100644 --- a/clients/derivatives-trading-options/docs/ExchangeInformationResponseOptionSymbolsInnerFiltersInner.md +++ b/clients/derivatives-trading-options/docs/ExchangeInformationResponseOptionSymbolsInnerFiltersInner.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**filterType** | **String** | | [optional] | -|**minPrice** | **String** | | [optional] | -|**maxPrice** | **String** | | [optional] | -|**tickSize** | **String** | | [optional] | -|**minQty** | **String** | | [optional] | -|**maxQty** | **String** | | [optional] | -|**stepSize** | **String** | | [optional] | +|**filterType** | **String** | filter Type | [optional] | +|**minPrice** | **String** | min Price | [optional] | +|**maxPrice** | **String** | max Price | [optional] | +|**tickSize** | **String** | tick Size | [optional] | +|**minQty** | **String** | Minimum order quantity | [optional] | +|**maxQty** | **String** | Maximum order quantity | [optional] | +|**stepSize** | **String** | step Size | [optional] | diff --git a/clients/derivatives-trading-options/docs/ExchangeInformationResponseRateLimitsInner.md b/clients/derivatives-trading-options/docs/ExchangeInformationResponseRateLimitsInner.md index 9a73b213e..e28f3b5f5 100644 --- a/clients/derivatives-trading-options/docs/ExchangeInformationResponseRateLimitsInner.md +++ b/clients/derivatives-trading-options/docs/ExchangeInformationResponseRateLimitsInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**rateLimitType** | **String** | | [optional] | -|**interval** | **String** | | [optional] | -|**intervalNum** | **Long** | | [optional] | -|**limit** | **Long** | | [optional] | +|**rateLimitType** | **String** | rate Limit Type | [optional] | +|**interval** | **String** | interval | [optional] | +|**intervalNum** | **Long** | interval Num | [optional] | +|**limit** | **Long** | limit | [optional] | diff --git a/clients/derivatives-trading-options/docs/ExtendBlockTradeOrderResponse.md b/clients/derivatives-trading-options/docs/ExtendBlockTradeOrderResponse.md index bfc602903..18bae2a8a 100644 --- a/clients/derivatives-trading-options/docs/ExtendBlockTradeOrderResponse.md +++ b/clients/derivatives-trading-options/docs/ExtendBlockTradeOrderResponse.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**blockTradeSettlementKey** | **String** | | [optional] | -|**expireTime** | **Long** | | [optional] | -|**liquidity** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**createTime** | **Long** | | [optional] | -|**legs** | [**List<ExtendBlockTradeOrderResponseLegsInner>**](ExtendBlockTradeOrderResponseLegsInner.md) | | [optional] | +|**blockTradeSettlementKey** | **String** | block Trade Settlement Key | [optional] | +|**expireTime** | **Long** | expire Time | [optional] | +|**liquidity** | **String** | liquidity | [optional] | +|**status** | **String** | status | [optional] | +|**createTime** | **Long** | create Time | [optional] | +|**legs** | [**List<ExtendBlockTradeOrderResponseLegsInner>**](ExtendBlockTradeOrderResponseLegsInner.md) | legs | [optional] | diff --git a/clients/derivatives-trading-options/docs/ExtendBlockTradeOrderResponseLegsInner.md b/clients/derivatives-trading-options/docs/ExtendBlockTradeOrderResponseLegsInner.md index 3ed999b95..1f7184dd2 100644 --- a/clients/derivatives-trading-options/docs/ExtendBlockTradeOrderResponseLegsInner.md +++ b/clients/derivatives-trading-options/docs/ExtendBlockTradeOrderResponseLegsInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**quantity** | **String** | | [optional] | -|**price** | **String** | | [optional] | +|**symbol** | **String** | symbol | [optional] | +|**side** | **String** | side | [optional] | +|**quantity** | **String** | quantity | [optional] | +|**price** | **String** | price | [optional] | diff --git a/clients/derivatives-trading-options/docs/GetAutoCancelAllOpenOrdersResponse.md b/clients/derivatives-trading-options/docs/GetAutoCancelAllOpenOrdersResponse.md index e5c902c44..78ce64e70 100644 --- a/clients/derivatives-trading-options/docs/GetAutoCancelAllOpenOrdersResponse.md +++ b/clients/derivatives-trading-options/docs/GetAutoCancelAllOpenOrdersResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**underlying** | **String** | | [optional] | -|**countdownTime** | **Long** | | [optional] | +|**underlying** | **String** | underlying | [optional] | +|**countdownTime** | **Long** | countdown Time | [optional] | diff --git a/clients/derivatives-trading-options/docs/GetMarketMakerProtectionConfigResponse.md b/clients/derivatives-trading-options/docs/GetMarketMakerProtectionConfigResponse.md index df133be25..fe9a28a53 100644 --- a/clients/derivatives-trading-options/docs/GetMarketMakerProtectionConfigResponse.md +++ b/clients/derivatives-trading-options/docs/GetMarketMakerProtectionConfigResponse.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**underlyingId** | **Long** | | [optional] | -|**underlying** | **String** | | [optional] | -|**windowTimeInMilliseconds** | **Long** | | [optional] | -|**frozenTimeInMilliseconds** | **Long** | | [optional] | -|**qtyLimit** | **String** | | [optional] | -|**deltaLimit** | **String** | | [optional] | -|**lastTriggerTime** | **Long** | | [optional] | +|**underlyingId** | **Long** | underlying Id | [optional] | +|**underlying** | **String** | underlying | [optional] | +|**windowTimeInMilliseconds** | **Long** | window Time In Milliseconds | [optional] | +|**frozenTimeInMilliseconds** | **Long** | frozen Time In Milliseconds | [optional] | +|**qtyLimit** | **String** | qty Limit | [optional] | +|**deltaLimit** | **String** | delta Limit | [optional] | +|**lastTriggerTime** | **Long** | last Trigger Time | [optional] | diff --git a/clients/derivatives-trading-options/docs/GreekUpdate.md b/clients/derivatives-trading-options/docs/GreekUpdate.md index c001caa39..e16e9ec72 100644 --- a/clients/derivatives-trading-options/docs/GreekUpdate.md +++ b/clients/derivatives-trading-options/docs/GreekUpdate.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction Time | [optional] | |**G** | [**List<GreekUpdateGInner>**](GreekUpdateGInner.md) | | [optional] | diff --git a/clients/derivatives-trading-options/docs/GreekUpdateGInner.md b/clients/derivatives-trading-options/docs/GreekUpdateGInner.md index 91472b675..e728280dc 100644 --- a/clients/derivatives-trading-options/docs/GreekUpdateGInner.md +++ b/clients/derivatives-trading-options/docs/GreekUpdateGInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**uLowerCase** | **String** | | [optional] | -|**dLowerCase** | **String** | | [optional] | -|**gLowerCase** | **String** | | [optional] | -|**tLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | +|**uLowerCase** | **String** | Underlying | [optional] | +|**dLowerCase** | **String** | Delta | [optional] | +|**gLowerCase** | **String** | Gamma | [optional] | +|**tLowerCase** | **String** | Theta | [optional] | +|**vLowerCase** | **String** | Vega | [optional] | diff --git a/clients/derivatives-trading-options/docs/HistoricalExerciseRecordsResponseInner.md b/clients/derivatives-trading-options/docs/HistoricalExerciseRecordsResponseInner.md index 7e5ff5b7d..8809b479e 100644 --- a/clients/derivatives-trading-options/docs/HistoricalExerciseRecordsResponseInner.md +++ b/clients/derivatives-trading-options/docs/HistoricalExerciseRecordsResponseInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**strikePrice** | **String** | | [optional] | -|**realStrikePrice** | **String** | | [optional] | -|**expiryDate** | **Long** | | [optional] | -|**strikeResult** | **String** | | [optional] | +|**symbol** | **String** | symbol | [optional] | +|**strikePrice** | **String** | strike price | [optional] | +|**realStrikePrice** | **String** | real strike price | [optional] | +|**expiryDate** | **Long** | Exercise time | [optional] | +|**strikeResult** | **String** | strike result | [optional] | diff --git a/clients/derivatives-trading-options/docs/Hour24TickerRequest.md b/clients/derivatives-trading-options/docs/Hour24TickerRequest.md new file mode 100644 index 000000000..9eea30c4a --- /dev/null +++ b/clients/derivatives-trading-options/docs/Hour24TickerRequest.md @@ -0,0 +1,15 @@ + + +# Hour24TickerRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | +|**expirationDate** | **String** | The expiration date parameter | [optional] | + + + diff --git a/clients/derivatives-trading-options/docs/Hour24TickerResponse.md b/clients/derivatives-trading-options/docs/Hour24TickerResponse.md new file mode 100644 index 000000000..7a04aa24e --- /dev/null +++ b/clients/derivatives-trading-options/docs/Hour24TickerResponse.md @@ -0,0 +1,30 @@ + + +# Hour24TickerResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**pLowerCase** | **String** | Price change | [optional] | +|**P** | **String** | Price change percent | [optional] | +|**wLowerCase** | **String** | Weighted average price | [optional] | +|**cLowerCase** | **String** | Last price | [optional] | +|**Q** | **String** | Last quantity | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | Trading volume(in contracts) | [optional] | +|**qLowerCase** | **String** | trade amount(in quote asset) | [optional] | +|**O** | **Long** | Statistics open time | [optional] | +|**C** | **Long** | Statistics close time | [optional] | +|**F** | **Long** | First trade ID | [optional] | +|**L** | **Long** | Last trade Id | [optional] | +|**nLowerCase** | **Long** | Total number of trade | [optional] | + + + diff --git a/clients/derivatives-trading-options/docs/IndexPriceResponse.md b/clients/derivatives-trading-options/docs/IndexPriceResponse.md index 731b0c58a..05c49efb9 100644 --- a/clients/derivatives-trading-options/docs/IndexPriceResponse.md +++ b/clients/derivatives-trading-options/docs/IndexPriceResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**time** | **Long** | | [optional] | -|**indexPrice** | **String** | | [optional] | +|**time** | **Long** | time | [optional] | +|**indexPrice** | **String** | index Price | [optional] | diff --git a/clients/derivatives-trading-options/docs/IndexPriceStreamsRequest.md b/clients/derivatives-trading-options/docs/IndexPriceStreamsRequest.md index 77956f701..396439f7a 100644 --- a/clients/derivatives-trading-options/docs/IndexPriceStreamsRequest.md +++ b/clients/derivatives-trading-options/docs/IndexPriceStreamsRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Integer** | | [optional] | +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | diff --git a/clients/derivatives-trading-options/docs/IndexPriceStreamsResponseInner.md b/clients/derivatives-trading-options/docs/IndexPriceStreamsResponseInner.md index a4809cab6..2d402e4b8 100644 --- a/clients/derivatives-trading-options/docs/IndexPriceStreamsResponseInner.md +++ b/clients/derivatives-trading-options/docs/IndexPriceStreamsResponseInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | +|**eLowerCase** | **String** | event type | [optional] | +|**E** | **Long** | time | [optional] | +|**sLowerCase** | **String** | underlying symbol | [optional] | +|**pLowerCase** | **String** | index price | [optional] | diff --git a/clients/derivatives-trading-options/docs/IndividualSymbolBookTickerStreamsRequest.md b/clients/derivatives-trading-options/docs/IndividualSymbolBookTickerStreamsRequest.md index 2f1df7360..f3c71addf 100644 --- a/clients/derivatives-trading-options/docs/IndividualSymbolBookTickerStreamsRequest.md +++ b/clients/derivatives-trading-options/docs/IndividualSymbolBookTickerStreamsRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Integer** | | [optional] | -|**symbol** | **String** | | | +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | diff --git a/clients/derivatives-trading-options/docs/IndividualSymbolBookTickerStreamsResponse.md b/clients/derivatives-trading-options/docs/IndividualSymbolBookTickerStreamsResponse.md index 735c9595e..3687668a5 100644 --- a/clients/derivatives-trading-options/docs/IndividualSymbolBookTickerStreamsResponse.md +++ b/clients/derivatives-trading-options/docs/IndividualSymbolBookTickerStreamsResponse.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**B** | **String** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**A** | **String** | | [optional] | -|**T** | **Long** | | [optional] | -|**E** | **Long** | | [optional] | +|**eLowerCase** | **String** | event type | [optional] | +|**uLowerCase** | **Long** | order book updateId | [optional] | +|**sLowerCase** | **String** | symbol | [optional] | +|**bLowerCase** | **String** | best bid price | [optional] | +|**B** | **String** | bid bid quantity | [optional] | +|**aLowerCase** | **String** | best ask price | [optional] | +|**A** | **String** | best ask quantity | [optional] | +|**T** | **Long** | transaction time | [optional] | +|**E** | **Long** | event time | [optional] | diff --git a/clients/derivatives-trading-options/docs/Interval.md b/clients/derivatives-trading-options/docs/Interval.md new file mode 100644 index 000000000..d173f8260 --- /dev/null +++ b/clients/derivatives-trading-options/docs/Interval.md @@ -0,0 +1,35 @@ + + +# Interval + +## Enum + + +* `INTERVAL_1m` (value: `"1m"`) + +* `INTERVAL_3m` (value: `"3m"`) + +* `INTERVAL_5m` (value: `"5m"`) + +* `INTERVAL_15m` (value: `"15m"`) + +* `INTERVAL_30m` (value: `"30m"`) + +* `INTERVAL_1h` (value: `"1h"`) + +* `INTERVAL_2h` (value: `"2h"`) + +* `INTERVAL_4h` (value: `"4h"`) + +* `INTERVAL_6h` (value: `"6h"`) + +* `INTERVAL_12h` (value: `"12h"`) + +* `INTERVAL_1d` (value: `"1d"`) + +* `INTERVAL_3d` (value: `"3d"`) + +* `INTERVAL_1w` (value: `"1w"`) + + + diff --git a/clients/derivatives-trading-options/docs/KlineCandlestickDataItem.md b/clients/derivatives-trading-options/docs/KlineCandlestickDataItem.md new file mode 100644 index 000000000..70a2b6dc0 --- /dev/null +++ b/clients/derivatives-trading-options/docs/KlineCandlestickDataItem.md @@ -0,0 +1,12 @@ + + +# KlineCandlestickDataItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-options/docs/KlineCandlestickDataItemInner.md b/clients/derivatives-trading-options/docs/KlineCandlestickDataItemInner.md new file mode 100644 index 000000000..ef68850c4 --- /dev/null +++ b/clients/derivatives-trading-options/docs/KlineCandlestickDataItemInner.md @@ -0,0 +1,12 @@ + + +# KlineCandlestickDataItemInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-options/docs/KlineCandlestickDataResponseItem.md b/clients/derivatives-trading-options/docs/KlineCandlestickDataResponseItem.md deleted file mode 100644 index 77012692f..000000000 --- a/clients/derivatives-trading-options/docs/KlineCandlestickDataResponseItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# KlineCandlestickDataResponseItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-options/docs/KlineCandlestickDataResponseItemInner.md b/clients/derivatives-trading-options/docs/KlineCandlestickDataResponseItemInner.md deleted file mode 100644 index 704c5f122..000000000 --- a/clients/derivatives-trading-options/docs/KlineCandlestickDataResponseItemInner.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# KlineCandlestickDataResponseItemInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-options/docs/KlineCandlestickStreamsRequest.md b/clients/derivatives-trading-options/docs/KlineCandlestickStreamsRequest.md index 53ed74309..6d881d388 100644 --- a/clients/derivatives-trading-options/docs/KlineCandlestickStreamsRequest.md +++ b/clients/derivatives-trading-options/docs/KlineCandlestickStreamsRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Integer** | | [optional] | -|**symbol** | **String** | | | -|**interval** | **String** | | | +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | +|**interval** | **Interval** | | [optional] | diff --git a/clients/derivatives-trading-options/docs/KlineCandlestickStreamsResponse.md b/clients/derivatives-trading-options/docs/KlineCandlestickStreamsResponse.md index 8f66d35fe..46ec067ba 100644 --- a/clients/derivatives-trading-options/docs/KlineCandlestickStreamsResponse.md +++ b/clients/derivatives-trading-options/docs/KlineCandlestickStreamsResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | +|**eLowerCase** | **String** | event type | [optional] | +|**E** | **Long** | event time | [optional] | +|**sLowerCase** | **String** | Option trading symbol | [optional] | |**kLowerCase** | [**KlineCandlestickStreamsResponseK**](KlineCandlestickStreamsResponseK.md) | | [optional] | diff --git a/clients/derivatives-trading-options/docs/KlineCandlestickStreamsResponseK.md b/clients/derivatives-trading-options/docs/KlineCandlestickStreamsResponseK.md index 04c7b81ef..5b2cafd68 100644 --- a/clients/derivatives-trading-options/docs/KlineCandlestickStreamsResponseK.md +++ b/clients/derivatives-trading-options/docs/KlineCandlestickStreamsResponseK.md @@ -2,27 +2,28 @@ # KlineCandlestickStreamsResponseK +k ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tLowerCase** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**fLowerCase** | **Long** | | [optional] | -|**L** | **Long** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**nLowerCase** | **Long** | | [optional] | -|**xLowerCase** | **Boolean** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**V** | **String** | | [optional] | -|**Q** | **String** | | [optional] | +|**tLowerCase** | **Long** | kline start time | [optional] | +|**T** | **Long** | kline end time | [optional] | +|**sLowerCase** | **String** | Option trading symbol | [optional] | +|**iLowerCase** | **String** | candle period | [optional] | +|**fLowerCase** | **Long** | first trade ID | [optional] | +|**L** | **Long** | last trade ID | [optional] | +|**oLowerCase** | **String** | open | [optional] | +|**cLowerCase** | **String** | close | [optional] | +|**hLowerCase** | **String** | high | [optional] | +|**lLowerCase** | **String** | low | [optional] | +|**vLowerCase** | **String** | volume(in contracts) | [optional] | +|**nLowerCase** | **Long** | number of trades | [optional] | +|**xLowerCase** | **Boolean** | current candle has been completed Y/N | [optional] | +|**qLowerCase** | **String** | completed trade amount   (in quote asset) | [optional] | +|**V** | **String** | taker completed trade volume (in contracts) | [optional] | +|**Q** | **String** | taker trade amount(in quote asset) | [optional] | diff --git a/clients/derivatives-trading-options/docs/Legs.md b/clients/derivatives-trading-options/docs/Legs.md index b1afbcb50..2b1e1615e 100644 --- a/clients/derivatives-trading-options/docs/Legs.md +++ b/clients/derivatives-trading-options/docs/Legs.md @@ -2,6 +2,7 @@ # Legs +Max 1 (only single leg supported), list of legs parameters in JSON; example: eapi/v1/block/order/create?orders=[{\"symbol\":\"BTC-210115-35000-C\", \"price\":\"100\",\"quantity\":\"0.0002\",\"side\":\"BUY\",\"type\":\"LIMIT\"}] ## Properties diff --git a/clients/derivatives-trading-options/docs/LegsInner.md b/clients/derivatives-trading-options/docs/LegsInner.md new file mode 100644 index 000000000..b468259b6 --- /dev/null +++ b/clients/derivatives-trading-options/docs/LegsInner.md @@ -0,0 +1,34 @@ + + +# LegsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**symbol** | **String** | Option trading pair | | +|**side** | [**SideEnum**](#SideEnum) | Buy/sell direction | | +|**type** | [**TypeEnum**](#TypeEnum) | Order type | | +|**quantity** | **String** | Order quantity | | +|**price** | **String** | Order price | [optional] | + + + +## Enum: SideEnum + +| Name | Value | +|---- | -----| +| BUY | "BUY" | +| SELL | "SELL" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIMIT | "LIMIT" | + + + diff --git a/clients/derivatives-trading-options/docs/Level.md b/clients/derivatives-trading-options/docs/Level.md new file mode 100644 index 000000000..a73a358e0 --- /dev/null +++ b/clients/derivatives-trading-options/docs/Level.md @@ -0,0 +1,15 @@ + + +# Level + +## Enum + + +* `LEVEL_5` (value: `"5"`) + +* `LEVEL_10` (value: `"10"`) + +* `LEVEL_20` (value: `"20"`) + + + diff --git a/clients/derivatives-trading-options/docs/Liquidity.md b/clients/derivatives-trading-options/docs/Liquidity.md new file mode 100644 index 000000000..b098bf3c1 --- /dev/null +++ b/clients/derivatives-trading-options/docs/Liquidity.md @@ -0,0 +1,13 @@ + + +# Liquidity + +## Enum + + +* `MAKER` (value: `"MAKER"`) + +* `TAKER` (value: `"TAKER"`) + + + diff --git a/clients/derivatives-trading-options/docs/Listenkeyexpired.md b/clients/derivatives-trading-options/docs/Listenkeyexpired.md index a4f18a418..f3d8dbffb 100644 --- a/clients/derivatives-trading-options/docs/Listenkeyexpired.md +++ b/clients/derivatives-trading-options/docs/Listenkeyexpired.md @@ -1,13 +1,13 @@ -# Listenkeyexpired +# ListenKeyExpired ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **String** | | [optional] | +|**E** | **String** | Event Time | [optional] | |**listenKey** | **String** | | [optional] | diff --git a/clients/derivatives-trading-options/docs/MarkPriceRequest.md b/clients/derivatives-trading-options/docs/MarkPriceRequest.md deleted file mode 100644 index 07071f1e2..000000000 --- a/clients/derivatives-trading-options/docs/MarkPriceRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# MarkPriceRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **Integer** | | [optional] | -|**underlying** | **String** | | | - - - diff --git a/clients/derivatives-trading-options/docs/MarkPriceResponse.md b/clients/derivatives-trading-options/docs/MarkPriceResponse.md deleted file mode 100644 index 9dadafd56..000000000 --- a/clients/derivatives-trading-options/docs/MarkPriceResponse.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# MarkPriceResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-options/docs/MarkPriceResponseInner.md b/clients/derivatives-trading-options/docs/MarkPriceResponseInner.md deleted file mode 100644 index 449de8d13..000000000 --- a/clients/derivatives-trading-options/docs/MarkPriceResponseInner.md +++ /dev/null @@ -1,32 +0,0 @@ - - -# MarkPriceResponseInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**mp** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**eLowerCase** | **String** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**bo** | **String** | | [optional] | -|**ao** | **String** | | [optional] | -|**bq** | **String** | | [optional] | -|**aq** | **String** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**hl** | **String** | | [optional] | -|**ll** | **String** | | [optional] | -|**vo** | **String** | | [optional] | -|**rf** | **String** | | [optional] | -|**dLowerCase** | **String** | | [optional] | -|**tLowerCase** | **String** | | [optional] | -|**gLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | - - - diff --git a/clients/derivatives-trading-options/docs/MarketApi.md b/clients/derivatives-trading-options/docs/MarketApi.md index ea8b25453..d3a703bd4 100644 --- a/clients/derivatives-trading-options/docs/MarketApi.md +++ b/clients/derivatives-trading-options/docs/MarketApi.md @@ -6,9 +6,9 @@ All URIs are relative to *http://localhost* |------------- | ------------- | -------------| | [**indexPriceStreams**](MarketApi.md#indexPriceStreams) | **POST** /!index@arr | Index Price Streams | | [**klineCandlestickStreams**](MarketApi.md#klineCandlestickStreams) | **POST** /<symbol>@kline_<interval> | Kline/Candlestick Streams | -| [**markPrice**](MarketApi.md#markPrice) | **POST** /<underlying>@optionMarkPrice | Mark Price | | [**newSymbolInfo**](MarketApi.md#newSymbolInfo) | **POST** /!optionSymbol | New Symbol Info | -| [**openInterest**](MarketApi.md#openInterest) | **POST** /underlying@optionOpenInterest@<expirationDate> | Open Interest | +| [**openInterest**](MarketApi.md#openInterest) | **POST** /<underlying>@openInterest@<expirationDate> | Open Interest | +| [**optionMarkPrice**](MarketApi.md#optionMarkPrice) | **POST** /<underlying>@optionMarkPrice | Option Mark Price | @@ -135,13 +135,13 @@ No authorization required |-------------|-------------|------------------| | **200** | Kline/Candlestick Streams | - | - -# **markPrice** -> MarkPriceResponse markPrice(markPriceRequest) + +# **newSymbolInfo** +> NewSymbolInfoResponse newSymbolInfo(newSymbolInfoRequest) -Mark Price +New Symbol Info -The mark price for all option symbols on specific underlying asset. E.g.[btcusdt@optionMarkPrice](wss://fstream.binance.com/market/stream?streams=btcusdt@optionMarkPrice) Update Speed: 1000ms +New symbol listing stream. Update Speed: 50ms ### Example ```java @@ -158,12 +158,12 @@ public class Example { defaultClient.setBasePath("http://localhost"); MarketApi apiInstance = new MarketApi(defaultClient); - MarkPriceRequest markPriceRequest = new MarkPriceRequest(); // MarkPriceRequest | + NewSymbolInfoRequest newSymbolInfoRequest = new NewSymbolInfoRequest(); // NewSymbolInfoRequest | try { - MarkPriceResponse result = apiInstance.markPrice(markPriceRequest); + NewSymbolInfoResponse result = apiInstance.newSymbolInfo(newSymbolInfoRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling MarketApi#markPrice"); + System.err.println("Exception when calling MarketApi#newSymbolInfo"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -177,11 +177,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **markPriceRequest** | [**MarkPriceRequest**](MarkPriceRequest.md)| | | +| **newSymbolInfoRequest** | [**NewSymbolInfoRequest**](NewSymbolInfoRequest.md)| | | ### Return type -[**MarkPriceResponse**](MarkPriceResponse.md) +[**NewSymbolInfoResponse**](NewSymbolInfoResponse.md) ### Authorization @@ -195,15 +195,15 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Mark Price | - | +| **200** | New Symbol Info | - | - -# **newSymbolInfo** -> NewSymbolInfoResponse newSymbolInfo(newSymbolInfoRequest) + +# **openInterest** +> OpenInterestResponse openInterest(openInterestRequest) -New Symbol Info +Open Interest -New symbol listing stream. Update Speed: 50ms +Option open interest for specific underlying asset on specific expiration date. E.g.[ethusdt@openInterest@221125](wss://fstream.binance.com/market/stream?streams=ethusdt@openInterest@221125) Update Speed: 60s ### Example ```java @@ -220,12 +220,12 @@ public class Example { defaultClient.setBasePath("http://localhost"); MarketApi apiInstance = new MarketApi(defaultClient); - NewSymbolInfoRequest newSymbolInfoRequest = new NewSymbolInfoRequest(); // NewSymbolInfoRequest | + OpenInterestRequest openInterestRequest = new OpenInterestRequest(); // OpenInterestRequest | try { - NewSymbolInfoResponse result = apiInstance.newSymbolInfo(newSymbolInfoRequest); + OpenInterestResponse result = apiInstance.openInterest(openInterestRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling MarketApi#newSymbolInfo"); + System.err.println("Exception when calling MarketApi#openInterest"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -239,11 +239,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **newSymbolInfoRequest** | [**NewSymbolInfoRequest**](NewSymbolInfoRequest.md)| | | +| **openInterestRequest** | [**OpenInterestRequest**](OpenInterestRequest.md)| | | ### Return type -[**NewSymbolInfoResponse**](NewSymbolInfoResponse.md) +[**OpenInterestResponse**](OpenInterestResponse.md) ### Authorization @@ -257,15 +257,15 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | New Symbol Info | - | +| **200** | Open Interest | - | - -# **openInterest** -> OpenInterestResponse openInterest(openInterestRequest) + +# **optionMarkPrice** +> OptionMarkPriceResponse optionMarkPrice(optionMarkPriceRequest) -Open Interest +Option Mark Price -Option open interest for specific underlying asset on specific expiration date. E.g.[ethusdt@openInterest@221125](wss://fstream.binance.com/market/stream?streams=ethusdt@openInterest@221125) Update Speed: 60s +The mark price for all option symbols on specific underlying asset. E.g.[btcusdt@optionMarkPrice](wss://fstream.binance.com/market/stream?streams=btcusdt@optionMarkPrice) Update Speed: 1000ms ### Example ```java @@ -282,12 +282,12 @@ public class Example { defaultClient.setBasePath("http://localhost"); MarketApi apiInstance = new MarketApi(defaultClient); - OpenInterestRequest openInterestRequest = new OpenInterestRequest(); // OpenInterestRequest | + OptionMarkPriceRequest optionMarkPriceRequest = new OptionMarkPriceRequest(); // OptionMarkPriceRequest | try { - OpenInterestResponse result = apiInstance.openInterest(openInterestRequest); + OptionMarkPriceResponse result = apiInstance.optionMarkPrice(optionMarkPriceRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling MarketApi#openInterest"); + System.err.println("Exception when calling MarketApi#optionMarkPrice"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -301,11 +301,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **openInterestRequest** | [**OpenInterestRequest**](OpenInterestRequest.md)| | | +| **optionMarkPriceRequest** | [**OptionMarkPriceRequest**](OptionMarkPriceRequest.md)| | | ### Return type -[**OpenInterestResponse**](OpenInterestResponse.md) +[**OptionMarkPriceResponse**](OptionMarkPriceResponse.md) ### Authorization @@ -319,5 +319,5 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Open Interest | - | +| **200** | Mark Price | - | diff --git a/clients/derivatives-trading-options/docs/MarketDataApi.md b/clients/derivatives-trading-options/docs/MarketDataApi.md index 8890d8971..f687d0a3c 100644 --- a/clients/derivatives-trading-options/docs/MarketDataApi.md +++ b/clients/derivatives-trading-options/docs/MarketDataApi.md @@ -24,7 +24,7 @@ All URIs are relative to *https://eapi.binance.com* Check Server Time -Test connectivity to the Rest API and get the current server time. Weight: 1 +Test connectivity to the Rest API and get the current server time. Weight(IP): 1 ### Example ```java @@ -82,7 +82,7 @@ No authorization required Exchange Information -Current exchange trading rules and symbol information Weight: 1 +Current exchange trading rules and symbol information Weight(IP): 1 ### Example ```java @@ -140,7 +140,7 @@ No authorization required Historical Exercise Records -Get historical exercise records. * REALISTIC_VALUE_STRICKEN -> Exercised * EXTRINSIC_VALUE_EXPIRED -> Expired OTM Weight: 3 +Get historical exercise records. * REALISTIC_VALUE_STRICKEN -> Exercised * EXTRINSIC_VALUE_EXPIRED -> Expired OTM Weight(IP): 3 ### Example ```java @@ -157,10 +157,10 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String underlying = "underlying_example"; // String | underlying, e.g BTCUSDT - Long startTime = 56L; // Long | Start Time, e.g 1593511200000 - Long endTime = 56L; // Long | End Time, e.g 1593512200000 - Long limit = 56L; // Long | Number of result sets returned Default:100 Max:1000 + String underlying = "BTCUSDT"; // String | Underlying asset. + Long startTime = 1623319461670L; // Long | Start Time, e.g 1593511200000 + Long endTime = 1641782889000L; // Long | End Time, e.g 1593512200000 + Long limit = 20L; // Long | Number of result sets returned try { HistoricalExerciseRecordsResponse result = apiInstance.historicalExerciseRecords(underlying, startTime, endTime, limit); System.out.println(result); @@ -179,10 +179,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **underlying** | **String**| underlying, e.g BTCUSDT | [optional] | +| **underlying** | **String**| Underlying asset. | [optional] | | **startTime** | **Long**| Start Time, e.g 1593511200000 | [optional] | | **endTime** | **Long**| End Time, e.g 1593512200000 | [optional] | -| **limit** | **Long**| Number of result sets returned Default:100 Max:1000 | [optional] | +| **limit** | **Long**| Number of result sets returned | [optional] | ### Return type @@ -208,7 +208,7 @@ No authorization required Index Price -Get spot index price for option underlying. Weight: 1 +Get spot index price for option underlying. Weight(IP): 1 ### Example ```java @@ -225,7 +225,7 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String underlying = "underlying_example"; // String | Option underlying, e.g BTCUSDT + String underlying = "BTCUSDT"; // String | Underlying asset. try { IndexPriceResponse result = apiInstance.indexPrice(underlying); System.out.println(result); @@ -244,7 +244,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **underlying** | **String**| Option underlying, e.g BTCUSDT | | +| **underlying** | **String**| Underlying asset. | | ### Return type @@ -270,7 +270,7 @@ No authorization required Kline/Candlestick Data -Kline/candlestick bars for an option symbol. Klines are uniquely identified by their open time. * If startTime and endTime are not sent, the most recent klines are returned. Weight: 1 +Kline/candlestick bars for an option symbol. Klines are uniquely identified by their open time. Weight(IP): 1 Notes: - If startTime and endTime are not sent, the most recent klines are returned. ### Example ```java @@ -287,11 +287,11 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | Option trading pair, e.g BTC-200730-9000-C - String interval = "interval_example"; // String | Time interval - Long startTime = 56L; // Long | Start Time, e.g 1593511200000 - Long endTime = 56L; // Long | End Time, e.g 1593512200000 - Long limit = 56L; // Long | Number of result sets returned Default:100 Max:1000 + String symbol = "BTC-200730-9000-C"; // String | Option trading pair + Interval interval = Interval.fromValue("1m"); // Interval | Time interval + Long startTime = 1623319461670L; // Long | Start Time, e.g 1593511200000 + Long endTime = 1641782889000L; // Long | End Time, e.g 1593512200000 + Long limit = 20L; // Long | Number of result sets returned try { KlineCandlestickDataResponse result = apiInstance.klineCandlestickData(symbol, interval, startTime, endTime, limit); System.out.println(result); @@ -310,11 +310,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| Option trading pair, e.g BTC-200730-9000-C | | -| **interval** | **String**| Time interval | | +| **symbol** | **String**| Option trading pair | | +| **interval** | [**Interval**](.md)| Time interval | [enum: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] | | **startTime** | **Long**| Start Time, e.g 1593511200000 | [optional] | | **endTime** | **Long**| End Time, e.g 1593512200000 | [optional] | -| **limit** | **Long**| Number of result sets returned Default:100 Max:1000 | [optional] | +| **limit** | **Long**| Number of result sets returned | [optional] | ### Return type @@ -340,7 +340,7 @@ No authorization required Open Interest -Get open interest for specific underlying asset on specific expiration date. Weight: 0 +Get open interest for specific underlying asset on specific expiration date. Weight(IP): 0 ### Example ```java @@ -357,8 +357,8 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String underlyingAsset = "underlyingAsset_example"; // String | underlying asset, e.g ETH/BTC - String expiration = "expiration_example"; // String | expiration date, e.g 221225 + String underlyingAsset = "ETH/BTC"; // String | Underlying asset. + String expiration = "221225"; // String | expiration date try { OpenInterestResponse result = apiInstance.openInterest(underlyingAsset, expiration); System.out.println(result); @@ -377,8 +377,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **underlyingAsset** | **String**| underlying asset, e.g ETH/BTC | | -| **expiration** | **String**| expiration date, e.g 221225 | | +| **underlyingAsset** | **String**| Underlying asset. | | +| **expiration** | **String**| expiration date | | ### Return type @@ -404,7 +404,7 @@ No authorization required Option Mark Price -Option mark price and greek info. Weight: 5 +Option mark price and greek info. Weight(IP): 5 ### Example ```java @@ -421,7 +421,7 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | Option trading pair, e.g BTC-200730-9000-C + String symbol = "BTC-200730-9000-C"; // String | Option trading pair try { OptionMarkPriceResponse result = apiInstance.optionMarkPrice(symbol); System.out.println(result); @@ -440,7 +440,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| Option trading pair, e.g BTC-200730-9000-C | [optional] | +| **symbol** | **String**| Option trading pair | [optional] | ### Return type @@ -483,8 +483,8 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | Option trading pair, e.g BTC-200730-9000-C - Long limit = 56L; // Long | Number of result sets returned Default:100 Max:1000 + String symbol = "BTC-200730-9000-C"; // String | Option trading pair + Long limit = 20L; // Long | Default:100 Max:1000.Optional value:[10, 20, 50, 100, 500, 1000] try { OrderBookResponse result = apiInstance.orderBook(symbol, limit); System.out.println(result); @@ -503,8 +503,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| Option trading pair, e.g BTC-200730-9000-C | | -| **limit** | **Long**| Number of result sets returned Default:100 Max:1000 | [optional] | +| **symbol** | **String**| Option trading pair | | +| **limit** | **Long**| Default:100 Max:1000.Optional value:[10, 20, 50, 100, 500, 1000] | [optional] | ### Return type @@ -530,7 +530,7 @@ No authorization required Recent Block Trades List -Get recent block trades Weight: 5 +Get recent block trades Weight(IP): 5 ### Example ```java @@ -547,8 +547,8 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | Option trading pair, e.g BTC-200730-9000-C - Long limit = 56L; // Long | Number of result sets returned Default:100 Max:1000 + String symbol = "BTC-200730-9000-C"; // String | Option trading pair + Long limit = 20L; // Long | Number of records try { RecentBlockTradesListResponse result = apiInstance.recentBlockTradesList(symbol, limit); System.out.println(result); @@ -567,8 +567,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| Option trading pair, e.g BTC-200730-9000-C | [optional] | -| **limit** | **Long**| Number of result sets returned Default:100 Max:1000 | [optional] | +| **symbol** | **String**| Option trading pair | [optional] | +| **limit** | **Long**| Number of records | [optional] | ### Return type @@ -594,7 +594,7 @@ No authorization required Recent Trades List -Get recent market trades Weight: 5 +Get recent market trades Weight(IP): 5 ### Example ```java @@ -611,8 +611,8 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | Option trading pair, e.g BTC-200730-9000-C - Long limit = 56L; // Long | Number of result sets returned Default:100 Max:1000 + String symbol = "BTC-200730-9000-C"; // String | Option trading pair + Long limit = 20L; // Long | Number of result sets returned try { RecentTradesListResponse result = apiInstance.recentTradesList(symbol, limit); System.out.println(result); @@ -631,8 +631,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| Option trading pair, e.g BTC-200730-9000-C | | -| **limit** | **Long**| Number of result sets returned Default:100 Max:1000 | [optional] | +| **symbol** | **String**| Option trading pair | | +| **limit** | **Long**| Number of result sets returned | [optional] | ### Return type @@ -658,7 +658,7 @@ No authorization required Test Connectivity -Test connectivity to the Rest API. Weight: 1 +Test connectivity to the Rest API. Weight(IP): 1 ### Example ```java @@ -715,7 +715,7 @@ No authorization required 24hr Ticker Price Change Statistics -24 hour rolling window price change statistics. Weight: 5 +24 hour rolling window price change statistics. Weight: 1 for a single symbol; 40 when the symbol parameter is omitted ### Example ```java @@ -732,7 +732,7 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | Option trading pair, e.g BTC-200730-9000-C + String symbol = "BTC-200730-9000-C"; // String | Option trading pair try { Ticker24hrPriceChangeStatisticsResponse result = apiInstance.ticker24hrPriceChangeStatistics(symbol); System.out.println(result); @@ -751,7 +751,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| Option trading pair, e.g BTC-200730-9000-C | [optional] | +| **symbol** | **String**| Option trading pair | [optional] | ### Return type diff --git a/clients/derivatives-trading-options/docs/MarketMakerBlockTradeApi.md b/clients/derivatives-trading-options/docs/MarketMakerBlockTradeApi.md index d041311ff..c36a37dbc 100644 --- a/clients/derivatives-trading-options/docs/MarketMakerBlockTradeApi.md +++ b/clients/derivatives-trading-options/docs/MarketMakerBlockTradeApi.md @@ -19,7 +19,7 @@ All URIs are relative to *https://eapi.binance.com* Accept Block Trade Order (TRADE) -Accept a block trade order Weight: 5 +Accept a block trade order Weight(IP): 5 Security Type: TRADE ### Example ```java @@ -81,7 +81,7 @@ No authorization required Account Block Trade List (USER_DATA) -Gets block trades for a specific account. Weight: 5 +Gets block trades for a specific account. Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -98,10 +98,10 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); MarketMakerBlockTradeApi apiInstance = new MarketMakerBlockTradeApi(defaultClient); - Long endTime = 56L; // Long | End Time, e.g 1593512200000 - Long startTime = 56L; // Long | Start Time, e.g 1593511200000 - String underlying = "underlying_example"; // String | underlying, e.g BTCUSDT - Long recvWindow = 56L; // Long | + Long endTime = 1641782889000L; // Long | End Time, e.g 1593512200000 + Long startTime = 1623319461670L; // Long | Start Time, e.g 1593511200000 + String underlying = "BTCUSDT"; // String | Underlying asset. + Long recvWindow = 5000L; // Long | Recv Window. try { AccountBlockTradeListResponse result = apiInstance.accountBlockTradeList(endTime, startTime, underlying, recvWindow); System.out.println(result); @@ -122,8 +122,8 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **endTime** | **Long**| End Time, e.g 1593512200000 | [optional] | | **startTime** | **Long**| Start Time, e.g 1593511200000 | [optional] | -| **underlying** | **String**| underlying, e.g BTCUSDT | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **underlying** | **String**| Underlying asset. | [optional] | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type @@ -149,7 +149,7 @@ No authorization required Cancel Block Trade Order (TRADE) -Cancel a block trade order. Weight: 5 +Cancel a block trade order. Weight(IP): 5 Security Type: TRADE ### Example ```java @@ -166,8 +166,8 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); MarketMakerBlockTradeApi apiInstance = new MarketMakerBlockTradeApi(defaultClient); - String blockOrderMatchingKey = "blockOrderMatchingKey_example"; // String | - Long recvWindow = 56L; // Long | + String blockOrderMatchingKey = "7d046e6e-a429-4335-ab9d-6a681febcde5"; // String | Block trade matching key. + Long recvWindow = 5000L; // Long | Recv Window. try { apiInstance.cancelBlockTradeOrder(blockOrderMatchingKey, recvWindow); } catch (ApiException e) { @@ -185,8 +185,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **blockOrderMatchingKey** | **String**| | | -| **recvWindow** | **Long**| | [optional] | +| **blockOrderMatchingKey** | **String**| Block trade matching key. | | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type @@ -212,7 +212,7 @@ No authorization required Extend Block Trade Order (TRADE) -Extends a block trade expire time by 30 mins from the current time. Weight: 5 +Extends a block trade expire time by 30 mins from the current time. Weight(IP): 5 Security Type: TRADE ### Example ```java @@ -274,7 +274,7 @@ No authorization required New Block Trade Order (TRADE) -Send in a new block trade order. Weight: 5 +Send in a new block trade order. Weight(IP): 5 Security Type: TRADE ### Example ```java @@ -336,7 +336,7 @@ No authorization required Query Block Trade Details (USER_DATA) -Query block trade details; returns block trade details from counterparty's perspective. Weight: 5 +Query block trade details; returns block trade details from counterparty's perspective. Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -353,8 +353,8 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); MarketMakerBlockTradeApi apiInstance = new MarketMakerBlockTradeApi(defaultClient); - String blockOrderMatchingKey = "blockOrderMatchingKey_example"; // String | - Long recvWindow = 56L; // Long | + String blockOrderMatchingKey = "12b96c28-ba05-8906-c89t-703215cfb2e6"; // String | Block trade matching key. + Long recvWindow = 5000L; // Long | Recv Window. try { QueryBlockTradeDetailsResponse result = apiInstance.queryBlockTradeDetails(blockOrderMatchingKey, recvWindow); System.out.println(result); @@ -373,8 +373,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **blockOrderMatchingKey** | **String**| | | -| **recvWindow** | **Long**| | [optional] | +| **blockOrderMatchingKey** | **String**| Block trade matching key. | | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type @@ -400,7 +400,7 @@ No authorization required Query Block Trade Order (TRADE) -Check block trade order status. Weight: 5 +Check block trade order status. Weight(IP): 5 Security Type: TRADE ### Example ```java @@ -417,11 +417,11 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); MarketMakerBlockTradeApi apiInstance = new MarketMakerBlockTradeApi(defaultClient); - String blockOrderMatchingKey = "blockOrderMatchingKey_example"; // String | If specified, returns the specific block trade associated with the blockOrderMatchingKey - Long endTime = 56L; // Long | End Time, e.g 1593512200000 - Long startTime = 56L; // Long | Start Time, e.g 1593511200000 - String underlying = "underlying_example"; // String | underlying, e.g BTCUSDT - Long recvWindow = 56L; // Long | + String blockOrderMatchingKey = "7d046e6e-a429-4335-ab9d-6a681febcde5"; // String | If specified, returns the specific block trade associated with the blockOrderMatchingKey + Long endTime = 1641782889000L; // Long | End Time, e.g 1593512200000 + Long startTime = 1623319461670L; // Long | Start Time, e.g 1593511200000 + String underlying = "BTCUSDT"; // String | Underlying asset. + Long recvWindow = 5000L; // Long | Recv Window. try { QueryBlockTradeOrderResponse result = apiInstance.queryBlockTradeOrder(blockOrderMatchingKey, endTime, startTime, underlying, recvWindow); System.out.println(result); @@ -443,8 +443,8 @@ public class Example { | **blockOrderMatchingKey** | **String**| If specified, returns the specific block trade associated with the blockOrderMatchingKey | [optional] | | **endTime** | **Long**| End Time, e.g 1593512200000 | [optional] | | **startTime** | **Long**| Start Time, e.g 1593511200000 | [optional] | -| **underlying** | **String**| underlying, e.g BTCUSDT | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **underlying** | **String**| Underlying asset. | [optional] | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type diff --git a/clients/derivatives-trading-options/docs/MarketMakerEndpointsApi.md b/clients/derivatives-trading-options/docs/MarketMakerEndpointsApi.md index 1604e153a..477ceea78 100644 --- a/clients/derivatives-trading-options/docs/MarketMakerEndpointsApi.md +++ b/clients/derivatives-trading-options/docs/MarketMakerEndpointsApi.md @@ -18,7 +18,7 @@ All URIs are relative to *https://eapi.binance.com* Auto-Cancel All Open Orders (Kill-Switch) Heartbeat (TRADE) -This endpoint resets the time from which the countdown will begin to the time this messaged is received. It should be called repeatedly as heartbeats. Multiple heartbeats can be updated at once by specifying the underlying symbols as a list (ex. BTCUSDT,ETHUSDT) in the underlyings parameter. * The response will only include underlying symbols where the heartbeat has been successfully updated. Weight: 10 +This endpoint resets the time from which the countdown will begin to the time this messaged is received. It should be called repeatedly as heartbeats. Multiple heartbeats can be updated at once by specifying the underlying symbols as a list (ex. BTCUSDT,ETHUSDT) in the underlyings parameter. Weight(IP): 10 Security Type: TRADE Notes: - The response will only include underlying symbols where the heartbeat has been successfully updated. ### Example ```java @@ -80,7 +80,7 @@ No authorization required Get Auto-Cancel All Open Orders (Kill-Switch) Config (TRADE) -This endpoint returns the auto-cancel parameters for each underlying symbol. Note only active auto-cancel parameters will be returned, if countdownTime is set to 0 (ie. countdownTime has been turned off), the underlying symbol and corresponding countdownTime parameter will not be returned in the response. * countdownTime = 0 means the function is disabled. Weight: 1 +This endpoint returns the auto-cancel parameters for each underlying symbol. Note only active auto-cancel parameters will be returned, if countdownTime is set to 0 (ie. countdownTime has been turned off), the underlying symbol and corresponding countdownTime parameter will not be returned in the response. Weight(IP): 1 Security Type: TRADE Notes: - countdownTime = 0 means the function is disabled. ### Example ```java @@ -97,8 +97,8 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); MarketMakerEndpointsApi apiInstance = new MarketMakerEndpointsApi(defaultClient); - String underlying = "underlying_example"; // String | underlying, e.g BTCUSDT - Long recvWindow = 56L; // Long | + String underlying = "BTCUSDT"; // String | Underlying asset. + Long recvWindow = 5000L; // Long | Recv Window. try { GetAutoCancelAllOpenOrdersResponse result = apiInstance.getAutoCancelAllOpenOrders(underlying, recvWindow); System.out.println(result); @@ -117,8 +117,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **underlying** | **String**| underlying, e.g BTCUSDT | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **underlying** | **String**| Underlying asset. | [optional] | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type @@ -144,7 +144,7 @@ No authorization required Get Market Maker Protection Config (TRADE) -Get config for MMP. Weight: 1 +Get config for MMP. Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -161,8 +161,8 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); MarketMakerEndpointsApi apiInstance = new MarketMakerEndpointsApi(defaultClient); - String underlying = "underlying_example"; // String | underlying, e.g BTCUSDT - Long recvWindow = 56L; // Long | + String underlying = "BTCUSDT"; // String | Underlying asset. + Long recvWindow = 5000L; // Long | Recv Window. try { GetMarketMakerProtectionConfigResponse result = apiInstance.getMarketMakerProtectionConfig(underlying, recvWindow); System.out.println(result); @@ -181,8 +181,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **underlying** | **String**| underlying, e.g BTCUSDT | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **underlying** | **String**| Underlying asset. | | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type @@ -208,7 +208,7 @@ No authorization required Reset Market Maker Protection Config (TRADE) -Reset MMP, start MMP order again. Weight: 1 +Reset MMP, start MMP order again. Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -270,7 +270,7 @@ No authorization required Set Auto-Cancel All Open Orders (Kill-Switch) Config (TRADE) -This endpoint sets the parameters of the auto-cancel feature which cancels all open orders (both market maker protection and non market maker protection order types) of the underlying symbol at the end of the specified countdown time period if no heartbeat message is sent. After the countdown time period, all open orders will be cancelled and new orders will be rejected with error code -2010 until either a heartbeat message is sent or the auto-cancel feature is turned off by setting countdownTime to 0. * This rest endpoint sets up the parameters to cancel your open orders in case of an outage or disconnection. * Example usage: Call this endpoint with a countdownTime value of 10000 (10 seconds) to turn on the auto-cancel feature. If the corresponding countdownCancelAllHeartBeat endpoint is not called within 10 seconds with the specified underlying symbol, all open orders of the specified symbol will be automatically canceled. If this endpoint is called with an countdownTime of 0, the countdown timer will be stopped. * The system will check all countdowns approximately every 100 milliseconds, **please note that sufficient redundancy should be considered when using this function**. We do not recommend setting the countdown time to be too precise or too small. Weight: 1 +This endpoint sets the parameters of the auto-cancel feature which cancels all open orders (both market maker protection and non market maker protection order types) of the underlying symbol at the end of the specified countdown time period if no heartbeat message is sent. After the countdown time period, all open orders will be cancelled and new orders will be rejected with error code -2010 until either a heartbeat message is sent or the auto-cancel feature is turned off by setting countdownTime to 0. Weight(IP): 1 Security Type: TRADE Notes: - This rest endpoint sets up the parameters to cancel your open orders in case of an outage or disconnection. - Example usage: > Call this endpoint with a countdownTime value of 10000 (10 seconds) to turn on the auto-cancel feature. If the corresponding countdownCancelAllHeartBeat endpoint is not called within 10 seconds with the specified underlying symbol, all open orders of the specified symbol will be automatically canceled. If this endpoint is called with an countdownTime of 0, the countdown timer will be stopped. - The system will check all countdowns approximately every 100 milliseconds, **please note that sufficient redundancy should be considered when using this function**. We do not recommend setting the countdown time to be too precise or too small. ### Example ```java @@ -332,7 +332,7 @@ No authorization required Set Market Maker Protection Config (TRADE) -Set config for MMP. Market Maker Protection(MMP) is a set of protection mechanism for option market maker, this mechanism is able to prevent mass trading in short period time. Once market maker's account branches the threshold, the Market Maker Protection will be triggered. When Market Maker Protection triggers, all the current MMP orders will be canceled, new MMP orders will be rejected. Market maker can use this time to reevaluate market and modify order price. Weight: 1 +Set config for MMP. Market Maker Protection(MMP) is a set of protection mechanism for option market maker, this mechanism is able to prevent mass trading in short period time. Once market maker's account branches the threshold, the Market Maker Protection will be triggered. When Market Maker Protection triggers, all the current MMP orders will be canceled, new MMP orders will be rejected. Market maker can use this time to reevaluate market and modify order price. Weight(IP): 1 Security Type: TRADE ### Example ```java diff --git a/clients/derivatives-trading-options/docs/NewBlockTradeOrderRequest.md b/clients/derivatives-trading-options/docs/NewBlockTradeOrderRequest.md index 3823a29d8..d6898d227 100644 --- a/clients/derivatives-trading-options/docs/NewBlockTradeOrderRequest.md +++ b/clients/derivatives-trading-options/docs/NewBlockTradeOrderRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**liquidity** | **String** | | | +|**liquidity** | **Liquidity** | | | |**legs** | **Legs** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-options/docs/NewBlockTradeOrderResponse.md b/clients/derivatives-trading-options/docs/NewBlockTradeOrderResponse.md index df22c92b8..a3f25335b 100644 --- a/clients/derivatives-trading-options/docs/NewBlockTradeOrderResponse.md +++ b/clients/derivatives-trading-options/docs/NewBlockTradeOrderResponse.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**blockTradeSettlementKey** | **String** | | [optional] | -|**expireTime** | **Long** | | [optional] | -|**liquidity** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**legs** | [**List<ExtendBlockTradeOrderResponseLegsInner>**](ExtendBlockTradeOrderResponseLegsInner.md) | | [optional] | +|**blockTradeSettlementKey** | **String** | block Trade Settlement Key | [optional] | +|**expireTime** | **Long** | expire Time | [optional] | +|**liquidity** | **String** | liquidity | [optional] | +|**status** | **String** | status | [optional] | +|**legs** | [**List<ExtendBlockTradeOrderResponseLegsInner>**](ExtendBlockTradeOrderResponseLegsInner.md) | legs | [optional] | diff --git a/clients/derivatives-trading-options/docs/NewOrderRequest.md b/clients/derivatives-trading-options/docs/NewOrderRequest.md index 98448f056..53963a162 100644 --- a/clients/derivatives-trading-options/docs/NewOrderRequest.md +++ b/clients/derivatives-trading-options/docs/NewOrderRequest.md @@ -9,15 +9,15 @@ |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | |**side** | **Side** | | | -|**type** | **Type** | | | -|**quantity** | **Double** | | | -|**price** | **Double** | | [optional] | +|**type** | **OrderType** | | | +|**quantity** | **Double** | Order Quantity | | +|**price** | **Double** | Order Price | [optional] | |**timeInForce** | **TimeInForce** | | [optional] | |**reduceOnly** | **Boolean** | | [optional] | |**postOnly** | **Boolean** | | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**isMmp** | **Boolean** | | [optional] | +|**clientOrderId** | **String** | User-defined order ID cannot be repeated in pending orders | [optional] | +|**isMmp** | **Boolean** | is market maker protection order | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-options/docs/NewOrderResponse.md b/clients/derivatives-trading-options/docs/NewOrderResponse.md index cf1358189..b736e24df 100644 --- a/clients/derivatives-trading-options/docs/NewOrderResponse.md +++ b/clients/derivatives-trading-options/docs/NewOrderResponse.md @@ -7,27 +7,29 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**quantity** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**createTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**status** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**source** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**priceScale** | **Long** | | [optional] | -|**quantityScale** | **Long** | | [optional] | -|**optionSide** | **String** | | [optional] | -|**quoteAsset** | **String** | | [optional] | -|**mmp** | **Boolean** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | +|**orderId** | **Long** | System order number | [optional] | +|**symbol** | **String** | Option trading pair | [optional] | +|**price** | **String** | Order Price | [optional] | +|**quantity** | **String** | Order Quantity | [optional] | +|**executedQty** | **String** | Number of executed quantity | [optional] | +|**fee** | **Long** | fee | [optional] | +|**side** | **String** | Buy/sell direction | [optional] | +|**type** | **String** | Order type | [optional] | +|**timeInForce** | **String** | Time in force method | [optional] | +|**reduceOnly** | **Boolean** | Order is reduce only Y/N | [optional] | +|**postOnly** | **Boolean** | post Only | [optional] | +|**createTime** | **Long** | Order Time | [optional] | +|**updateTime** | **Long** | Update time | [optional] | +|**status** | **String** | Order status | [optional] | +|**avgPrice** | **String** | Average price of completed trade | [optional] | +|**source** | **String** | source | [optional] | +|**clientOrderId** | **String** | Client order ID | [optional] | +|**priceScale** | **Long** | price Scale | [optional] | +|**quantityScale** | **Long** | quantity Scale | [optional] | +|**optionSide** | **String** | option Side | [optional] | +|**quoteAsset** | **String** | quote Asset | [optional] | +|**mmp** | **Boolean** | mmp | [optional] | +|**selfTradePreventionMode** | **String** | Self-trade prevention mode | [optional] | diff --git a/clients/derivatives-trading-options/docs/NewSymbolInfoRequest.md b/clients/derivatives-trading-options/docs/NewSymbolInfoRequest.md index d264e9fda..5a3018090 100644 --- a/clients/derivatives-trading-options/docs/NewSymbolInfoRequest.md +++ b/clients/derivatives-trading-options/docs/NewSymbolInfoRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Integer** | | [optional] | +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | diff --git a/clients/derivatives-trading-options/docs/NewSymbolInfoResponse.md b/clients/derivatives-trading-options/docs/NewSymbolInfoResponse.md index 03a7d134a..64f07aae3 100644 --- a/clients/derivatives-trading-options/docs/NewSymbolInfoResponse.md +++ b/clients/derivatives-trading-options/docs/NewSymbolInfoResponse.md @@ -7,17 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**qa** | **String** | | [optional] | -|**dLowerCase** | **String** | | [optional] | -|**sp** | **String** | | [optional] | -|**dt** | **Long** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**ot** | **Long** | | [optional] | -|**cs** | **String** | | [optional] | +|**eLowerCase** | **String** | Event Type | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**ps** | **String** | Underlying index of the contract | [optional] | +|**qa** | **String** | Quotation asset | [optional] | +|**dLowerCase** | **String** | Option type | [optional] | +|**sp** | **String** | Strike price | [optional] | +|**dt** | **Long** | Delivery date time | [optional] | +|**uLowerCase** | **Long** | unit, the quantity of the underlying asset represented by a single contract. | [optional] | +|**ot** | **Long** | onboard date time | [optional] | +|**cs** | **String** | Contract status | [optional] | diff --git a/clients/derivatives-trading-options/docs/OpenInterestRequest.md b/clients/derivatives-trading-options/docs/OpenInterestRequest.md index 6bdbdb78b..31ee04e37 100644 --- a/clients/derivatives-trading-options/docs/OpenInterestRequest.md +++ b/clients/derivatives-trading-options/docs/OpenInterestRequest.md @@ -7,8 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Integer** | | [optional] | -|**expirationDate** | **String** | | | +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | +|**underlying** | **String** | The underlying parameter | [optional] | +|**expirationDate** | **String** | The expirationDate parameter | [optional] | diff --git a/clients/derivatives-trading-options/docs/OpenInterestResponseInner.md b/clients/derivatives-trading-options/docs/OpenInterestResponseInner.md index 54cc67bb4..04921d3ce 100644 --- a/clients/derivatives-trading-options/docs/OpenInterestResponseInner.md +++ b/clients/derivatives-trading-options/docs/OpenInterestResponseInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Option symbol | [optional] | +|**oLowerCase** | **String** | Open interest in contracts | [optional] | +|**hLowerCase** | **String** | Open interest in USDT | [optional] | diff --git a/clients/derivatives-trading-options/docs/OptionMarginAccountInformationResponse.md b/clients/derivatives-trading-options/docs/OptionMarginAccountInformationResponse.md index 81ae6922f..67add61bd 100644 --- a/clients/derivatives-trading-options/docs/OptionMarginAccountInformationResponse.md +++ b/clients/derivatives-trading-options/docs/OptionMarginAccountInformationResponse.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | [**List<OptionMarginAccountInformationResponseAssetInner>**](OptionMarginAccountInformationResponseAssetInner.md) | | [optional] | -|**greek** | [**List<OptionMarginAccountInformationResponseGreekInner>**](OptionMarginAccountInformationResponseGreekInner.md) | | [optional] | -|**time** | **Long** | | [optional] | -|**canTrade** | **Boolean** | | [optional] | -|**canDeposit** | **Boolean** | | [optional] | -|**canWithdraw** | **Boolean** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**tradeGroupId** | **Long** | | [optional] | +|**asset** | [**List<OptionMarginAccountInformationResponseAssetInner>**](OptionMarginAccountInformationResponseAssetInner.md) | asset | [optional] | +|**greek** | [**List<OptionMarginAccountInformationResponseGreekInner>**](OptionMarginAccountInformationResponseGreekInner.md) | greek | [optional] | +|**time** | **Long** | time | [optional] | +|**canTrade** | **Boolean** | can Trade | [optional] | +|**canDeposit** | **Boolean** | can Deposit | [optional] | +|**canWithdraw** | **Boolean** | can Withdraw | [optional] | +|**reduceOnly** | **Boolean** | reduce Only | [optional] | +|**tradeGroupId** | **Long** | Trade group ID | [optional] | diff --git a/clients/derivatives-trading-options/docs/OptionMarginAccountInformationResponseAssetInner.md b/clients/derivatives-trading-options/docs/OptionMarginAccountInformationResponseAssetInner.md index 8f862ee2c..82432aa25 100644 --- a/clients/derivatives-trading-options/docs/OptionMarginAccountInformationResponseAssetInner.md +++ b/clients/derivatives-trading-options/docs/OptionMarginAccountInformationResponseAssetInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**marginBalance** | **String** | | [optional] | -|**equity** | **String** | | [optional] | -|**available** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**unrealizedPNL** | **String** | | [optional] | -|**adjustedEquity** | **String** | | [optional] | +|**asset** | **String** | asset | [optional] | +|**marginBalance** | **String** | margin Balance | [optional] | +|**equity** | **String** | equity | [optional] | +|**available** | **String** | available | [optional] | +|**initialMargin** | **String** | initial Margin | [optional] | +|**maintMargin** | **String** | maint Margin | [optional] | +|**unrealizedPNL** | **String** | unrealized PNL | [optional] | +|**adjustedEquity** | **String** | adjusted Equity | [optional] | diff --git a/clients/derivatives-trading-options/docs/OptionMarginAccountInformationResponseGreekInner.md b/clients/derivatives-trading-options/docs/OptionMarginAccountInformationResponseGreekInner.md index d1c932084..f388886bb 100644 --- a/clients/derivatives-trading-options/docs/OptionMarginAccountInformationResponseGreekInner.md +++ b/clients/derivatives-trading-options/docs/OptionMarginAccountInformationResponseGreekInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**underlying** | **String** | | [optional] | -|**delta** | **String** | | [optional] | -|**theta** | **String** | | [optional] | -|**gamma** | **String** | | [optional] | -|**vega** | **String** | | [optional] | +|**underlying** | **String** | underlying | [optional] | +|**delta** | **String** | delta | [optional] | +|**gamma** | **String** | gamma | [optional] | +|**theta** | **String** | theta | [optional] | +|**vega** | **String** | vega | [optional] | diff --git a/clients/derivatives-trading-options/docs/OptionMarkPriceRequest.md b/clients/derivatives-trading-options/docs/OptionMarkPriceRequest.md new file mode 100644 index 000000000..8fdf2470e --- /dev/null +++ b/clients/derivatives-trading-options/docs/OptionMarkPriceRequest.md @@ -0,0 +1,14 @@ + + +# OptionMarkPriceRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | +|**underlying** | **String** | The underlying parameter | [optional] | + + + diff --git a/clients/derivatives-trading-options/docs/OptionMarkPriceResponseInner.md b/clients/derivatives-trading-options/docs/OptionMarkPriceResponseInner.md index 9a0808e4b..84e6ad67f 100644 --- a/clients/derivatives-trading-options/docs/OptionMarkPriceResponseInner.md +++ b/clients/derivatives-trading-options/docs/OptionMarkPriceResponseInner.md @@ -7,18 +7,26 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**markPrice** | **String** | | [optional] | -|**bidIV** | **String** | | [optional] | -|**askIV** | **String** | | [optional] | -|**markIV** | **String** | | [optional] | -|**delta** | **String** | | [optional] | -|**theta** | **String** | | [optional] | -|**gamma** | **String** | | [optional] | -|**vega** | **String** | | [optional] | -|**highPriceLimit** | **String** | | [optional] | -|**lowPriceLimit** | **String** | | [optional] | -|**riskFreeInterest** | **String** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**mp** | **String** | Mark price | [optional] | +|**E** | **Long** | Event time | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**iLowerCase** | **String** | Index price | [optional] | +|**P** | **String** | Estimated Settle Price, only useful in the 0.5 hour before the settlement starts | [optional] | +|**bo** | **String** | The best buy price | [optional] | +|**ao** | **String** | The best sell price | [optional] | +|**bq** | **String** | The best buy quantity | [optional] | +|**aq** | **String** | The best sell quantity | [optional] | +|**bLowerCase** | **String** | BuyImplied volatility | [optional] | +|**aLowerCase** | **String** | SellImplied volatility | [optional] | +|**hl** | **String** | Buy Maximum price | [optional] | +|**ll** | **String** | Sell Minimum price | [optional] | +|**vo** | **String** | volatility | [optional] | +|**rf** | **String** | risk free rate | [optional] | +|**dLowerCase** | **String** | delta | [optional] | +|**tLowerCase** | **String** | theta | [optional] | +|**gLowerCase** | **String** | gamma | [optional] | +|**vLowerCase** | **String** | vega | [optional] | diff --git a/clients/derivatives-trading-options/docs/OptionPositionInformationResponseInner.md b/clients/derivatives-trading-options/docs/OptionPositionInformationResponseInner.md index 5b14c72a7..081067295 100644 --- a/clients/derivatives-trading-options/docs/OptionPositionInformationResponseInner.md +++ b/clients/derivatives-trading-options/docs/OptionPositionInformationResponseInner.md @@ -7,22 +7,22 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**entryPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**quantity** | **String** | | [optional] | -|**markValue** | **String** | | [optional] | -|**unrealizedPNL** | **String** | | [optional] | -|**markPrice** | **String** | | [optional] | -|**strikePrice** | **String** | | [optional] | -|**expiryDate** | **Long** | | [optional] | -|**priceScale** | **Long** | | [optional] | -|**quantityScale** | **Long** | | [optional] | -|**optionSide** | **String** | | [optional] | -|**quoteAsset** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**bidQuantity** | **String** | | [optional] | -|**askQuantity** | **String** | | [optional] | +|**entryPrice** | **String** | Average entry price | [optional] | +|**symbol** | **String** | Option trading pair | [optional] | +|**side** | **String** | Position direction | [optional] | +|**quantity** | **String** | Number of positions (positive numbers represent long positions, negative number represent short positions) | [optional] | +|**markValue** | **String** | Current market value | [optional] | +|**unrealizedPNL** | **String** | Unrealized profit/loss | [optional] | +|**markPrice** | **String** | Mark price | [optional] | +|**strikePrice** | **String** | Strike price | [optional] | +|**expiryDate** | **Long** | Exercise time | [optional] | +|**priceScale** | **Long** | price Scale | [optional] | +|**quantityScale** | **Long** | quantity Scale | [optional] | +|**optionSide** | **String** | option type | [optional] | +|**quoteAsset** | **String** | quote asset | [optional] | +|**time** | **Long** | last update time | [optional] | +|**bidQuantity** | **String** | buy order qty | [optional] | +|**askQuantity** | **String** | sell order qty | [optional] | diff --git a/clients/derivatives-trading-options/docs/OrderBookResponse.md b/clients/derivatives-trading-options/docs/OrderBookResponse.md index 9de81f67b..24074ca02 100644 --- a/clients/derivatives-trading-options/docs/OrderBookResponse.md +++ b/clients/derivatives-trading-options/docs/OrderBookResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**bids** | **List<OrderBookResponseBidsItem>** | | [optional] | -|**asks** | **List<OrderBookResponseAsksItem>** | | [optional] | -|**T** | **Long** | | [optional] | -|**lastUpdateId** | **Long** | | [optional] | +|**bids** | **List<List<String>>** | Bid orders. Each entry is [price, quantity]. | [optional] | +|**asks** | **List<List<String>>** | Ask orders. Each entry is [price, quantity]. | [optional] | +|**T** | **Long** | transaction time | [optional] | +|**lastUpdateId** | **Long** | update id | [optional] | diff --git a/clients/derivatives-trading-options/docs/OrderBookResponseAsksItem.md b/clients/derivatives-trading-options/docs/OrderBookResponseAsksItem.md deleted file mode 100644 index 44fa39180..000000000 --- a/clients/derivatives-trading-options/docs/OrderBookResponseAsksItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# OrderBookResponseAsksItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-options/docs/OrderBookResponseBidsItem.md b/clients/derivatives-trading-options/docs/OrderBookResponseBidsItem.md deleted file mode 100644 index 5f8f02644..000000000 --- a/clients/derivatives-trading-options/docs/OrderBookResponseBidsItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# OrderBookResponseBidsItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-options/docs/OrderTradeUpdate.md b/clients/derivatives-trading-options/docs/OrderTradeUpdate.md index 064017905..e1da05e23 100644 --- a/clients/derivatives-trading-options/docs/OrderTradeUpdate.md +++ b/clients/derivatives-trading-options/docs/OrderTradeUpdate.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction Time | [optional] | |**oLowerCase** | [**OrderTradeUpdateO**](OrderTradeUpdateO.md) | | [optional] | diff --git a/clients/derivatives-trading-options/docs/OrderTradeUpdateO.md b/clients/derivatives-trading-options/docs/OrderTradeUpdateO.md index a742fc02f..ea5636b60 100644 --- a/clients/derivatives-trading-options/docs/OrderTradeUpdateO.md +++ b/clients/derivatives-trading-options/docs/OrderTradeUpdateO.md @@ -7,31 +7,31 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**S** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**ap** | **String** | | [optional] | -|**xLowerCase** | **String** | | [optional] | -|**X** | **String** | | [optional] | -|**iLowerCase** | **Long** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**zLowerCase** | **String** | | [optional] | -|**L** | **String** | | [optional] | -|**N** | **String** | | [optional] | -|**nLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | -|**tLowerCase** | **Long** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | -|**R** | **Boolean** | | [optional] | -|**ot** | **String** | | [optional] | -|**rp** | **String** | | [optional] | -|**V** | **String** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**cLowerCase** | **String** | Client Order Id | [optional] | +|**S** | **String** | Side | [optional] | +|**oLowerCase** | **String** | Order Type | [optional] | +|**fLowerCase** | **String** | Time in Force | [optional] | +|**qLowerCase** | **String** | Original Quantity | [optional] | +|**pLowerCase** | **String** | Original Price | [optional] | +|**ap** | **String** | Average Price | [optional] | +|**xLowerCase** | **String** | Execution Type | [optional] | +|**X** | **String** | Order Status | [optional] | +|**iLowerCase** | **Long** | Order Id | [optional] | +|**lLowerCase** | **String** | Order Last Filled Quantity | [optional] | +|**zLowerCase** | **String** | Order Filled Accumulated Quantity | [optional] | +|**L** | **String** | Last Filled Price | [optional] | +|**N** | **String** | Commission Asset | [optional] | +|**nLowerCase** | **String** | Commission, negative means fee charge | [optional] | +|**T** | **Long** | Order Trade Time | [optional] | +|**tLowerCase** | **Long** | Trade Id | [optional] | +|**bLowerCase** | **String** | Bids qty | [optional] | +|**aLowerCase** | **String** | Ask qty | [optional] | +|**mLowerCase** | **Boolean** | Is this trade the maker side? | [optional] | +|**R** | **Boolean** | Is this reduce only | [optional] | +|**ot** | **String** | Original Order Type | [optional] | +|**rp** | **String** | Realized Profit of the trade | [optional] | +|**V** | **String** | STP mode | [optional] | diff --git a/clients/derivatives-trading-options/docs/OrderType.md b/clients/derivatives-trading-options/docs/OrderType.md new file mode 100644 index 000000000..6d26242ac --- /dev/null +++ b/clients/derivatives-trading-options/docs/OrderType.md @@ -0,0 +1,11 @@ + + +# OrderType + +## Enum + + +* `LIMIT` (value: `"LIMIT"`) + + + diff --git a/clients/derivatives-trading-options/docs/Orders.md b/clients/derivatives-trading-options/docs/Orders.md index 692b8f079..9c9d07f3b 100644 --- a/clients/derivatives-trading-options/docs/Orders.md +++ b/clients/derivatives-trading-options/docs/Orders.md @@ -2,6 +2,7 @@ # Orders +order list. Max 10 orders ## Properties diff --git a/clients/derivatives-trading-options/docs/OrdersInner.md b/clients/derivatives-trading-options/docs/OrdersInner.md index a73d964ed..726648fd5 100644 --- a/clients/derivatives-trading-options/docs/OrdersInner.md +++ b/clients/derivatives-trading-options/docs/OrdersInner.md @@ -7,18 +7,18 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**side** | [**SideEnum**](#SideEnum) | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | -|**quantity** | **String** | | [optional] | -|**price** | **String** | | [optional] | +|**symbol** | **String** | | | +|**side** | [**SideEnum**](#SideEnum) | | | +|**type** | [**TypeEnum**](#TypeEnum) | | | +|**quantity** | **Double** | Order Quantity | | +|**price** | **Double** | Order Price | [optional] | |**timeInForce** | [**TimeInForceEnum**](#TimeInForceEnum) | | [optional] | -|**reduceOnly** | **String** | | [optional] | -|**postOnly** | **String** | | [optional] | +|**reduceOnly** | **Boolean** | | [optional] | +|**postOnly** | **Boolean** | | [optional] | |**newOrderRespType** | [**NewOrderRespTypeEnum**](#NewOrderRespTypeEnum) | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**isMmp** | **String** | | [optional] | -|**selfTradePreventionMode** | [**SelfTradePreventionModeEnum**](#SelfTradePreventionModeEnum) | | [optional] | +|**clientOrderId** | **String** | User-defined order ID cannot be repeated in pending orders | [optional] | +|**isMmp** | **Boolean** | is market maker protection order | [optional] | +|**selfTradePreventionMode** | [**SelfTradePreventionModeEnum**](#SelfTradePreventionModeEnum) | EXPIRE_TAKER:expire taker order when STP triggers/ EXPIRE_MAKER:expire maker order when STP triggers/ EXPIRE_BOTH:expire both orders when STP triggers; Default EXPIRE_MAKER | [optional] | @@ -64,8 +64,8 @@ | Name | Value | |---- | -----| | EXPIRE_TAKER | "EXPIRE_TAKER" | -| EXPIRE_BOTH | "EXPIRE_BOTH" | | EXPIRE_MAKER | "EXPIRE_MAKER" | +| EXPIRE_BOTH | "EXPIRE_BOTH" | diff --git a/clients/derivatives-trading-options/docs/PartialBookDepthStreamsRequest.md b/clients/derivatives-trading-options/docs/PartialBookDepthStreamsRequest.md index 3108675b9..79bac2f5d 100644 --- a/clients/derivatives-trading-options/docs/PartialBookDepthStreamsRequest.md +++ b/clients/derivatives-trading-options/docs/PartialBookDepthStreamsRequest.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Integer** | | [optional] | -|**symbol** | **String** | | | -|**level** | **String** | | | -|**updateSpeed** | **String** | | [optional] | +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | +|**level** | **Level** | | [optional] | +|**updateSpeed** | **UpdateSpeed** | | [optional] | diff --git a/clients/derivatives-trading-options/docs/PartialBookDepthStreamsResponse.md b/clients/derivatives-trading-options/docs/PartialBookDepthStreamsResponse.md index 75bc4521a..3fa3fdecd 100644 --- a/clients/derivatives-trading-options/docs/PartialBookDepthStreamsResponse.md +++ b/clients/derivatives-trading-options/docs/PartialBookDepthStreamsResponse.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**U** | **Long** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**pu** | **Long** | | [optional] | -|**bLowerCase** | **List<PartialBookDepthStreamsResponseBItem>** | | [optional] | -|**aLowerCase** | **List<PartialBookDepthStreamsResponseAItem>** | | [optional] | +|**eLowerCase** | **String** | event type | [optional] | +|**E** | **Long** | event time | [optional] | +|**T** | **Long** | transaction time | [optional] | +|**sLowerCase** | **String** | Option symbol | [optional] | +|**U** | **Long** | First update ID in event | [optional] | +|**uLowerCase** | **Long** | Final update ID in event | [optional] | +|**pu** | **Long** | Final update Id in last stream(ie `u` in last stream) | [optional] | +|**bLowerCase** | **List<List<String>>** | Buy order | [optional] | +|**aLowerCase** | **List<List<String>>** | Sell order | [optional] | diff --git a/clients/derivatives-trading-options/docs/PartialBookDepthStreamsResponseAItem.md b/clients/derivatives-trading-options/docs/PartialBookDepthStreamsResponseAItem.md deleted file mode 100644 index bc99fa2fb..000000000 --- a/clients/derivatives-trading-options/docs/PartialBookDepthStreamsResponseAItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# PartialBookDepthStreamsResponseAItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-options/docs/PartialBookDepthStreamsResponseBItem.md b/clients/derivatives-trading-options/docs/PartialBookDepthStreamsResponseBItem.md deleted file mode 100644 index e10d46136..000000000 --- a/clients/derivatives-trading-options/docs/PartialBookDepthStreamsResponseBItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# PartialBookDepthStreamsResponseBItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-options/docs/PlaceMultipleOrdersResponseInner.md b/clients/derivatives-trading-options/docs/PlaceMultipleOrdersResponseInner.md index 9a5670bd6..8350d1204 100644 --- a/clients/derivatives-trading-options/docs/PlaceMultipleOrdersResponseInner.md +++ b/clients/derivatives-trading-options/docs/PlaceMultipleOrdersResponseInner.md @@ -7,27 +7,29 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**quantity** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**createTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**status** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**source** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**priceScale** | **Long** | | [optional] | -|**quantityScale** | **Long** | | [optional] | -|**optionSide** | **String** | | [optional] | -|**quoteAsset** | **String** | | [optional] | -|**mmp** | **Boolean** | | [optional] | +|**orderId** | **Long** | System order number | [optional] | +|**symbol** | **String** | Option trading pair | [optional] | +|**price** | **String** | Order Price | [optional] | +|**quantity** | **String** | Order Quantity | [optional] | +|**executedQty** | **String** | Number of executed quantity | [optional] | +|**fee** | **Long** | fee | [optional] | +|**side** | **String** | Buy/sell direction | [optional] | +|**type** | **String** | Order type | [optional] | +|**timeInForce** | **String** | Time in force method | [optional] | +|**reduceOnly** | **Boolean** | Order is reduce only Y/N | [optional] | +|**postOnly** | **Boolean** | post Only | [optional] | +|**createTime** | **Long** | Order Time | [optional] | +|**updateTime** | **Long** | Update time | [optional] | +|**status** | **String** | Order status | [optional] | +|**avgPrice** | **String** | Average price of completed trade | [optional] | +|**clientOrderId** | **String** | Client order ID | [optional] | +|**priceScale** | **Long** | price Scale | [optional] | +|**quantityScale** | **Long** | quantity Scale | [optional] | +|**optionSide** | **String** | option Side | [optional] | +|**quoteAsset** | **String** | quote Asset | [optional] | +|**mmp** | **Boolean** | mmp | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | +|**source** | **String** | | [optional] | diff --git a/clients/derivatives-trading-options/docs/PublicApi.md b/clients/derivatives-trading-options/docs/PublicApi.md index 210d67095..451edd816 100644 --- a/clients/derivatives-trading-options/docs/PublicApi.md +++ b/clients/derivatives-trading-options/docs/PublicApi.md @@ -5,9 +5,9 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**diffBookDepthStreams**](PublicApi.md#diffBookDepthStreams) | **POST** /<symbol>@depth@<updateSpeed> | Diff Book Depth Streams | +| [**hour24Ticker**](PublicApi.md#hour24Ticker) | **POST** /<symbol>@optionTicker<expirationDate> | 24-hour TICKER | | [**individualSymbolBookTickerStreams**](PublicApi.md#individualSymbolBookTickerStreams) | **POST** /<symbol>@bookTicker | Individual Symbol Book Ticker Streams | | [**partialBookDepthStreams**](PublicApi.md#partialBookDepthStreams) | **POST** /<symbol>@depth<level>@<updateSpeed> | Partial Book Depth Streams | -| [**ticker24Hour**](PublicApi.md#ticker24Hour) | **POST** /<symbol>@optionTicker | 24-hour TICKER | | [**tradeStreams**](PublicApi.md#tradeStreams) | **POST** /<symbol>@optionTrade | Trade Streams | @@ -73,13 +73,13 @@ No authorization required |-------------|-------------|------------------| | **200** | Diff Book Depth Streams | - | - -# **individualSymbolBookTickerStreams** -> IndividualSymbolBookTickerStreamsResponse individualSymbolBookTickerStreams(individualSymbolBookTickerStreamsRequest) + +# **hour24Ticker** +> Hour24TickerResponse hour24Ticker(hour24TickerRequest) -Individual Symbol Book Ticker Streams +24-hour TICKER -Pushes any update to the best bid or ask's price or quantity in real-time for a specified symbol. Update Speed: Real-Time +24hr ticker info for all symbols. Only symbols whose ticker info changed will be sent. Update Speed: 1000ms ### Example ```java @@ -96,12 +96,12 @@ public class Example { defaultClient.setBasePath("http://localhost"); PublicApi apiInstance = new PublicApi(defaultClient); - IndividualSymbolBookTickerStreamsRequest individualSymbolBookTickerStreamsRequest = new IndividualSymbolBookTickerStreamsRequest(); // IndividualSymbolBookTickerStreamsRequest | + Hour24TickerRequest hour24TickerRequest = new Hour24TickerRequest(); // Hour24TickerRequest | try { - IndividualSymbolBookTickerStreamsResponse result = apiInstance.individualSymbolBookTickerStreams(individualSymbolBookTickerStreamsRequest); + Hour24TickerResponse result = apiInstance.hour24Ticker(hour24TickerRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PublicApi#individualSymbolBookTickerStreams"); + System.err.println("Exception when calling PublicApi#hour24Ticker"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -115,11 +115,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **individualSymbolBookTickerStreamsRequest** | [**IndividualSymbolBookTickerStreamsRequest**](IndividualSymbolBookTickerStreamsRequest.md)| | | +| **hour24TickerRequest** | [**Hour24TickerRequest**](Hour24TickerRequest.md)| | | ### Return type -[**IndividualSymbolBookTickerStreamsResponse**](IndividualSymbolBookTickerStreamsResponse.md) +[**Hour24TickerResponse**](Hour24TickerResponse.md) ### Authorization @@ -133,15 +133,15 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Individual Symbol Book Ticker Streams | - | +| **200** | 24-hour TICKER | - | - -# **partialBookDepthStreams** -> PartialBookDepthStreamsResponse partialBookDepthStreams(partialBookDepthStreamsRequest) + +# **individualSymbolBookTickerStreams** +> IndividualSymbolBookTickerStreamsResponse individualSymbolBookTickerStreams(individualSymbolBookTickerStreamsRequest) -Partial Book Depth Streams +Individual Symbol Book Ticker Streams -Top **<levels\\>** bids and asks, Valid levels are **<levels\\>** are 5, 10, 20. Update Speed: 100ms or 500ms +Pushes any update to the best bid or ask's price or quantity in real-time for a specified symbol. Update Speed: Real-Time ### Example ```java @@ -158,12 +158,12 @@ public class Example { defaultClient.setBasePath("http://localhost"); PublicApi apiInstance = new PublicApi(defaultClient); - PartialBookDepthStreamsRequest partialBookDepthStreamsRequest = new PartialBookDepthStreamsRequest(); // PartialBookDepthStreamsRequest | + IndividualSymbolBookTickerStreamsRequest individualSymbolBookTickerStreamsRequest = new IndividualSymbolBookTickerStreamsRequest(); // IndividualSymbolBookTickerStreamsRequest | try { - PartialBookDepthStreamsResponse result = apiInstance.partialBookDepthStreams(partialBookDepthStreamsRequest); + IndividualSymbolBookTickerStreamsResponse result = apiInstance.individualSymbolBookTickerStreams(individualSymbolBookTickerStreamsRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PublicApi#partialBookDepthStreams"); + System.err.println("Exception when calling PublicApi#individualSymbolBookTickerStreams"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -177,11 +177,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **partialBookDepthStreamsRequest** | [**PartialBookDepthStreamsRequest**](PartialBookDepthStreamsRequest.md)| | | +| **individualSymbolBookTickerStreamsRequest** | [**IndividualSymbolBookTickerStreamsRequest**](IndividualSymbolBookTickerStreamsRequest.md)| | | ### Return type -[**PartialBookDepthStreamsResponse**](PartialBookDepthStreamsResponse.md) +[**IndividualSymbolBookTickerStreamsResponse**](IndividualSymbolBookTickerStreamsResponse.md) ### Authorization @@ -195,15 +195,15 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Partial Book Depth Streams | - | +| **200** | Individual Symbol Book Ticker Streams | - | - -# **ticker24Hour** -> Ticker24HourResponse ticker24Hour(ticker24HourRequest) + +# **partialBookDepthStreams** +> PartialBookDepthStreamsResponse partialBookDepthStreams(partialBookDepthStreamsRequest) -24-hour TICKER +Partial Book Depth Streams -24hr ticker info for all symbols. Only symbols whose ticker info changed will be sent. Update Speed: 1000ms +Top <levels> bids and asks. Valid <levels> are 5, 10, 20. Update Speed: 100ms or 500ms ### Example ```java @@ -220,12 +220,12 @@ public class Example { defaultClient.setBasePath("http://localhost"); PublicApi apiInstance = new PublicApi(defaultClient); - Ticker24HourRequest ticker24HourRequest = new Ticker24HourRequest(); // Ticker24HourRequest | + PartialBookDepthStreamsRequest partialBookDepthStreamsRequest = new PartialBookDepthStreamsRequest(); // PartialBookDepthStreamsRequest | try { - Ticker24HourResponse result = apiInstance.ticker24Hour(ticker24HourRequest); + PartialBookDepthStreamsResponse result = apiInstance.partialBookDepthStreams(partialBookDepthStreamsRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PublicApi#ticker24Hour"); + System.err.println("Exception when calling PublicApi#partialBookDepthStreams"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -239,11 +239,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **ticker24HourRequest** | [**Ticker24HourRequest**](Ticker24HourRequest.md)| | | +| **partialBookDepthStreamsRequest** | [**PartialBookDepthStreamsRequest**](PartialBookDepthStreamsRequest.md)| | | ### Return type -[**Ticker24HourResponse**](Ticker24HourResponse.md) +[**PartialBookDepthStreamsResponse**](PartialBookDepthStreamsResponse.md) ### Authorization @@ -257,7 +257,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 24-hour TICKER | - | +| **200** | Partial Book Depth Streams | - | # **tradeStreams** diff --git a/clients/derivatives-trading-options/docs/QueryBlockTradeDetailsResponse.md b/clients/derivatives-trading-options/docs/QueryBlockTradeDetailsResponse.md index 6d198e1d2..e9007c0e9 100644 --- a/clients/derivatives-trading-options/docs/QueryBlockTradeDetailsResponse.md +++ b/clients/derivatives-trading-options/docs/QueryBlockTradeDetailsResponse.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**blockTradeSettlementKey** | **String** | | [optional] | -|**expireTime** | **Long** | | [optional] | -|**liquidity** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**createTime** | **Long** | | [optional] | -|**legs** | [**List<QueryBlockTradeDetailsResponseLegsInner>**](QueryBlockTradeDetailsResponseLegsInner.md) | | [optional] | +|**blockTradeSettlementKey** | **String** | block Trade Settlement Key | [optional] | +|**expireTime** | **Long** | expire Time | [optional] | +|**liquidity** | **String** | liquidity | [optional] | +|**status** | **String** | status | [optional] | +|**createTime** | **Long** | create Time | [optional] | +|**legs** | [**List<QueryBlockTradeDetailsResponseLegsInner>**](QueryBlockTradeDetailsResponseLegsInner.md) | legs | [optional] | diff --git a/clients/derivatives-trading-options/docs/QueryBlockTradeDetailsResponseLegsInner.md b/clients/derivatives-trading-options/docs/QueryBlockTradeDetailsResponseLegsInner.md index c12965e26..31c618649 100644 --- a/clients/derivatives-trading-options/docs/QueryBlockTradeDetailsResponseLegsInner.md +++ b/clients/derivatives-trading-options/docs/QueryBlockTradeDetailsResponseLegsInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**quantity** | **String** | | [optional] | -|**price** | **String** | | [optional] | +|**symbol** | **String** | symbol | [optional] | +|**side** | **String** | side | [optional] | +|**quantity** | **String** | quantity | [optional] | +|**price** | **String** | price | [optional] | diff --git a/clients/derivatives-trading-options/docs/QueryBlockTradeOrderResponseInner.md b/clients/derivatives-trading-options/docs/QueryBlockTradeOrderResponseInner.md index 84648fa4d..5bf9ed37f 100644 --- a/clients/derivatives-trading-options/docs/QueryBlockTradeOrderResponseInner.md +++ b/clients/derivatives-trading-options/docs/QueryBlockTradeOrderResponseInner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**blockTradeSettlementKey** | **String** | | [optional] | -|**expireTime** | **Long** | | [optional] | -|**liquidity** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**createTime** | **Long** | | [optional] | -|**legs** | [**List<ExtendBlockTradeOrderResponseLegsInner>**](ExtendBlockTradeOrderResponseLegsInner.md) | | [optional] | +|**blockTradeSettlementKey** | **String** | block Trade Settlement Key | [optional] | +|**expireTime** | **Long** | expire Time | [optional] | +|**liquidity** | **String** | liquidity | [optional] | +|**status** | **String** | status | [optional] | +|**createTime** | **Long** | create Time | [optional] | +|**legs** | [**List<ExtendBlockTradeOrderResponseLegsInner>**](ExtendBlockTradeOrderResponseLegsInner.md) | legs | [optional] | diff --git a/clients/derivatives-trading-options/docs/QueryCurrentOpenOptionOrdersResponseInner.md b/clients/derivatives-trading-options/docs/QueryCurrentOpenOptionOrdersResponseInner.md index 6eff7fe9b..63e6614ff 100644 --- a/clients/derivatives-trading-options/docs/QueryCurrentOpenOptionOrdersResponseInner.md +++ b/clients/derivatives-trading-options/docs/QueryCurrentOpenOptionOrdersResponseInner.md @@ -7,25 +7,25 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**quantity** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**createTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**status** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**priceScale** | **Long** | | [optional] | -|**quantityScale** | **Long** | | [optional] | -|**optionSide** | **String** | | [optional] | -|**quoteAsset** | **String** | | [optional] | -|**mmp** | **Boolean** | | [optional] | +|**orderId** | **Long** | System order number | [optional] | +|**symbol** | **String** | Option trading pair | [optional] | +|**price** | **String** | Order Price | [optional] | +|**quantity** | **String** | Order Quantity | [optional] | +|**executedQty** | **String** | Number of completed trades | [optional] | +|**side** | **String** | Buy/sell direction | [optional] | +|**type** | **String** | Order type | [optional] | +|**timeInForce** | **String** | Time in force method | [optional] | +|**reduceOnly** | **Boolean** | Order is reduce only Y/N | [optional] | +|**createTime** | **Long** | Order Time | [optional] | +|**updateTime** | **Long** | Update Time | [optional] | +|**status** | **String** | Order status | [optional] | +|**avgPrice** | **String** | Average price of completed trade | [optional] | +|**clientOrderId** | **String** | Client order ID | [optional] | +|**priceScale** | **Long** | price Scale | [optional] | +|**quantityScale** | **Long** | quantity Scale | [optional] | +|**optionSide** | **String** | option Side | [optional] | +|**quoteAsset** | **String** | quote Asset | [optional] | +|**mmp** | **Boolean** | mmp | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | diff --git a/clients/derivatives-trading-options/docs/QueryOptionOrderHistoryResponseInner.md b/clients/derivatives-trading-options/docs/QueryOptionOrderHistoryResponseInner.md index e58165417..055c5d6c5 100644 --- a/clients/derivatives-trading-options/docs/QueryOptionOrderHistoryResponseInner.md +++ b/clients/derivatives-trading-options/docs/QueryOptionOrderHistoryResponseInner.md @@ -7,25 +7,25 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**quantity** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**createTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**status** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**priceScale** | **Long** | | [optional] | -|**quantityScale** | **Long** | | [optional] | -|**optionSide** | **String** | | [optional] | -|**quoteAsset** | **String** | | [optional] | -|**mmp** | **Boolean** | | [optional] | +|**orderId** | **Long** | order Id | [optional] | +|**symbol** | **String** | symbol | [optional] | +|**price** | **String** | price | [optional] | +|**quantity** | **String** | quantity | [optional] | +|**executedQty** | **String** | executed Qty | [optional] | +|**side** | **String** | side | [optional] | +|**type** | **String** | type | [optional] | +|**timeInForce** | **String** | time In Force | [optional] | +|**reduceOnly** | **Boolean** | reduce Only | [optional] | +|**createTime** | **Long** | create Time | [optional] | +|**updateTime** | **Long** | update Time | [optional] | +|**status** | **String** | status | [optional] | +|**avgPrice** | **String** | avg Price | [optional] | +|**clientOrderId** | **String** | client Order Id | [optional] | +|**priceScale** | **Long** | price Scale | [optional] | +|**quantityScale** | **Long** | quantity Scale | [optional] | +|**optionSide** | **String** | option Side | [optional] | +|**quoteAsset** | **String** | quote Asset | [optional] | +|**mmp** | **Boolean** | mmp | [optional] | diff --git a/clients/derivatives-trading-options/docs/QuerySingleOrderResponse.md b/clients/derivatives-trading-options/docs/QuerySingleOrderResponse.md index 642ac14da..f3058ec48 100644 --- a/clients/derivatives-trading-options/docs/QuerySingleOrderResponse.md +++ b/clients/derivatives-trading-options/docs/QuerySingleOrderResponse.md @@ -7,26 +7,27 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**quantity** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**createTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**status** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**priceScale** | **Long** | | [optional] | -|**quantityScale** | **Long** | | [optional] | -|**optionSide** | **String** | | [optional] | -|**quoteAsset** | **String** | | [optional] | -|**mmp** | **Boolean** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | +|**orderId** | **Long** | System order id | [optional] | +|**symbol** | **String** | Option trading pair | [optional] | +|**price** | **String** | Order Price | [optional] | +|**quantity** | **String** | Order Quantity | [optional] | +|**executedQty** | **String** | Number of executed quantity | [optional] | +|**side** | **String** | Buy/sell direction | [optional] | +|**type** | **String** | Order type | [optional] | +|**timeInForce** | **String** | Time in force method | [optional] | +|**reduceOnly** | **Boolean** | Order is reduce only Y/N | [optional] | +|**postOnly** | **Boolean** | post Only | [optional] | +|**createTime** | **Long** | Order Time | [optional] | +|**updateTime** | **Long** | Update time | [optional] | +|**status** | **String** | Order status | [optional] | +|**avgPrice** | **String** | Average price of completed trade | [optional] | +|**clientOrderId** | **String** | Client order ID | [optional] | +|**priceScale** | **Long** | price Scale | [optional] | +|**quantityScale** | **Long** | quantity Scale | [optional] | +|**optionSide** | **String** | option Side | [optional] | +|**quoteAsset** | **String** | quote Asset | [optional] | +|**mmp** | **Boolean** | mmp | [optional] | +|**selfTradePreventionMode** | **String** | Self trade prevention mode. | [optional] | diff --git a/clients/derivatives-trading-options/docs/RecentBlockTradesListResponseInner.md b/clients/derivatives-trading-options/docs/RecentBlockTradesListResponseInner.md index 9ea12f72b..96416d6a5 100644 --- a/clients/derivatives-trading-options/docs/RecentBlockTradesListResponseInner.md +++ b/clients/derivatives-trading-options/docs/RecentBlockTradesListResponseInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**tradeId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**qty** | **String** | | [optional] | -|**quoteQty** | **String** | | [optional] | -|**side** | **Long** | | [optional] | -|**time** | **Long** | | [optional] | +|**id** | **Long** | id | [optional] | +|**tradeId** | **Long** | trade Id | [optional] | +|**symbol** | **String** | symbol | [optional] | +|**price** | **String** | price | [optional] | +|**qty** | **String** | qty | [optional] | +|**quoteQty** | **String** | quote Qty | [optional] | +|**side** | **Long** | side | [optional] | +|**time** | **Long** | time | [optional] | diff --git a/clients/derivatives-trading-options/docs/RecentTradesListResponseInner.md b/clients/derivatives-trading-options/docs/RecentTradesListResponseInner.md index fb0eabb47..9127e2548 100644 --- a/clients/derivatives-trading-options/docs/RecentTradesListResponseInner.md +++ b/clients/derivatives-trading-options/docs/RecentTradesListResponseInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**tradeId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**qty** | **String** | | [optional] | -|**quoteQty** | **String** | | [optional] | -|**side** | **Long** | | [optional] | -|**time** | **Long** | | [optional] | +|**id** | **Long** | id | [optional] | +|**tradeId** | **Long** | TradeId | [optional] | +|**symbol** | **String** | Option trading pair | [optional] | +|**price** | **String** | Completed trade price | [optional] | +|**qty** | **String** | Completed trade quantity | [optional] | +|**quoteQty** | **String** | Completed trade amount | [optional] | +|**side** | **Long** | Completed trade direction(-1 Sell,1 Buy) | [optional] | +|**time** | **Long** | Time | [optional] | diff --git a/clients/derivatives-trading-options/docs/ResetMarketMakerProtectionConfigRequest.md b/clients/derivatives-trading-options/docs/ResetMarketMakerProtectionConfigRequest.md index 48e99c6fc..090b3d8e4 100644 --- a/clients/derivatives-trading-options/docs/ResetMarketMakerProtectionConfigRequest.md +++ b/clients/derivatives-trading-options/docs/ResetMarketMakerProtectionConfigRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**underlying** | **String** | | [optional] | +|**underlying** | **String** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-options/docs/ResetMarketMakerProtectionConfigResponse.md b/clients/derivatives-trading-options/docs/ResetMarketMakerProtectionConfigResponse.md index 30f8294a7..edf033e51 100644 --- a/clients/derivatives-trading-options/docs/ResetMarketMakerProtectionConfigResponse.md +++ b/clients/derivatives-trading-options/docs/ResetMarketMakerProtectionConfigResponse.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**underlyingId** | **Long** | | [optional] | -|**underlying** | **String** | | [optional] | -|**windowTimeInMilliseconds** | **Long** | | [optional] | -|**frozenTimeInMilliseconds** | **Long** | | [optional] | -|**qtyLimit** | **String** | | [optional] | -|**deltaLimit** | **String** | | [optional] | -|**lastTriggerTime** | **Long** | | [optional] | +|**underlyingId** | **Long** | underlying Id | [optional] | +|**underlying** | **String** | underlying | [optional] | +|**windowTimeInMilliseconds** | **Long** | window Time In Milliseconds | [optional] | +|**frozenTimeInMilliseconds** | **Long** | frozen Time In Milliseconds | [optional] | +|**qtyLimit** | **String** | qty Limit | [optional] | +|**deltaLimit** | **String** | delta Limit | [optional] | +|**lastTriggerTime** | **Long** | last Trigger Time | [optional] | diff --git a/clients/derivatives-trading-options/docs/RiskLevelChange.md b/clients/derivatives-trading-options/docs/RiskLevelChange.md index 3e54655e3..1ef510c09 100644 --- a/clients/derivatives-trading-options/docs/RiskLevelChange.md +++ b/clients/derivatives-trading-options/docs/RiskLevelChange.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**mb** | **String** | | [optional] | -|**mm** | **String** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**sLowerCase** | **String** | Risk level. This feature only applies to VIP and Market Maker accounts. Risk level is re-evaluated on: funds transfer, trade fill, option expiry. | [optional] | +|**mb** | **String** | Margin balance | [optional] | +|**mm** | **String** | Maintenance margin | [optional] | diff --git a/clients/derivatives-trading-options/docs/SelfTradePreventionMode.md b/clients/derivatives-trading-options/docs/SelfTradePreventionMode.md index c01165439..0bba0d1ab 100644 --- a/clients/derivatives-trading-options/docs/SelfTradePreventionMode.md +++ b/clients/derivatives-trading-options/docs/SelfTradePreventionMode.md @@ -5,11 +5,13 @@ ## Enum -* `EXPIRE_TAKER` (value: `"EXPIRE_TAKER"`) +* `NONE` (value: `"NONE"`) -* `EXPIRE_BOTH` (value: `"EXPIRE_BOTH"`) +* `EXPIRE_TAKER` (value: `"EXPIRE_TAKER"`) * `EXPIRE_MAKER` (value: `"EXPIRE_MAKER"`) +* `EXPIRE_BOTH` (value: `"EXPIRE_BOTH"`) + diff --git a/clients/derivatives-trading-options/docs/SetAutoCancelAllOpenOrdersRequest.md b/clients/derivatives-trading-options/docs/SetAutoCancelAllOpenOrdersRequest.md index 4e2e148f8..a90830198 100644 --- a/clients/derivatives-trading-options/docs/SetAutoCancelAllOpenOrdersRequest.md +++ b/clients/derivatives-trading-options/docs/SetAutoCancelAllOpenOrdersRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**underlying** | **String** | | | -|**countdownTime** | **Long** | | | +|**countdownTime** | **Long** | Countdown time in milliseconds (ex. 1,000 for 1 second). 0 to disable the timer. Negative values (ex. -10000) are not accepted. Minimum acceptable value is 5,000 | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-options/docs/SetAutoCancelAllOpenOrdersResponse.md b/clients/derivatives-trading-options/docs/SetAutoCancelAllOpenOrdersResponse.md index a36daf79b..3c2655d31 100644 --- a/clients/derivatives-trading-options/docs/SetAutoCancelAllOpenOrdersResponse.md +++ b/clients/derivatives-trading-options/docs/SetAutoCancelAllOpenOrdersResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**underlying** | **String** | | [optional] | -|**countdownTime** | **Long** | | [optional] | +|**underlying** | **String** | underlying | [optional] | +|**countdownTime** | **Long** | countdown Time | [optional] | diff --git a/clients/derivatives-trading-options/docs/SetMarketMakerProtectionConfigRequest.md b/clients/derivatives-trading-options/docs/SetMarketMakerProtectionConfigRequest.md index a67f37f9a..2898fcfc8 100644 --- a/clients/derivatives-trading-options/docs/SetMarketMakerProtectionConfigRequest.md +++ b/clients/derivatives-trading-options/docs/SetMarketMakerProtectionConfigRequest.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**underlying** | **String** | | [optional] | -|**windowTimeInMilliseconds** | **Long** | | [optional] | -|**frozenTimeInMilliseconds** | **Long** | | [optional] | -|**qtyLimit** | **Double** | | [optional] | -|**deltaLimit** | **Double** | | [optional] | +|**underlying** | **String** | | | +|**windowTimeInMilliseconds** | **Long** | MMP Interval in milliseconds | | +|**frozenTimeInMilliseconds** | **Long** | MMP frozen time in milliseconds, if set to 0 manual reset is required | | +|**qtyLimit** | **Double** | quantity limit | | +|**deltaLimit** | **Double** | net delta limit | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-options/docs/SetMarketMakerProtectionConfigResponse.md b/clients/derivatives-trading-options/docs/SetMarketMakerProtectionConfigResponse.md index ce41351dc..1d45d7c48 100644 --- a/clients/derivatives-trading-options/docs/SetMarketMakerProtectionConfigResponse.md +++ b/clients/derivatives-trading-options/docs/SetMarketMakerProtectionConfigResponse.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**underlyingId** | **Long** | | [optional] | -|**underlying** | **String** | | [optional] | -|**windowTimeInMilliseconds** | **Long** | | [optional] | -|**frozenTimeInMilliseconds** | **Long** | | [optional] | -|**qtyLimit** | **String** | | [optional] | -|**deltaLimit** | **String** | | [optional] | -|**lastTriggerTime** | **Long** | | [optional] | +|**underlyingId** | **Long** | underlying Id | [optional] | +|**underlying** | **String** | underlying | [optional] | +|**windowTimeInMilliseconds** | **Long** | window Time In Milliseconds | [optional] | +|**frozenTimeInMilliseconds** | **Long** | frozen Time In Milliseconds | [optional] | +|**qtyLimit** | **String** | qty Limit | [optional] | +|**deltaLimit** | **String** | delta Limit | [optional] | +|**lastTriggerTime** | **Long** | last Trigger Time | [optional] | diff --git a/clients/derivatives-trading-options/docs/StartUserDataStreamResponse.md b/clients/derivatives-trading-options/docs/StartUserDataStreamResponse.md index 523469bae..6c11940f6 100644 --- a/clients/derivatives-trading-options/docs/StartUserDataStreamResponse.md +++ b/clients/derivatives-trading-options/docs/StartUserDataStreamResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**listenKey** | **String** | | [optional] | -|**expiration** | **Long** | | [optional] | +|**listenKey** | **String** | listen Key | [optional] | +|**expiration** | **Long** | Listen key expiration timestamp in milliseconds | [optional] | diff --git a/clients/derivatives-trading-options/docs/Ticker24HourRequest.md b/clients/derivatives-trading-options/docs/Ticker24HourRequest.md deleted file mode 100644 index 7a4333987..000000000 --- a/clients/derivatives-trading-options/docs/Ticker24HourRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# Ticker24HourRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **Integer** | | [optional] | -|**symbol** | **String** | | | - - - diff --git a/clients/derivatives-trading-options/docs/Ticker24HourResponse.md b/clients/derivatives-trading-options/docs/Ticker24HourResponse.md deleted file mode 100644 index 8f893706d..000000000 --- a/clients/derivatives-trading-options/docs/Ticker24HourResponse.md +++ /dev/null @@ -1,30 +0,0 @@ - - -# Ticker24HourResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**wLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**O** | **Long** | | [optional] | -|**C** | **Long** | | [optional] | -|**F** | **Long** | | [optional] | -|**L** | **Long** | | [optional] | -|**nLowerCase** | **Long** | | [optional] | - - - diff --git a/clients/derivatives-trading-options/docs/Ticker24hrPriceChangeStatisticsResponseInner.md b/clients/derivatives-trading-options/docs/Ticker24hrPriceChangeStatisticsResponseInner.md index 2da73c502..f9482988c 100644 --- a/clients/derivatives-trading-options/docs/Ticker24hrPriceChangeStatisticsResponseInner.md +++ b/clients/derivatives-trading-options/docs/Ticker24hrPriceChangeStatisticsResponseInner.md @@ -7,24 +7,24 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**priceChange** | **String** | | [optional] | -|**priceChangePercent** | **String** | | [optional] | -|**lastPrice** | **String** | | [optional] | -|**lastQty** | **String** | | [optional] | -|**open** | **String** | | [optional] | -|**high** | **String** | | [optional] | -|**low** | **String** | | [optional] | -|**volume** | **String** | | [optional] | -|**amount** | **String** | | [optional] | -|**bidPrice** | **String** | | [optional] | -|**askPrice** | **String** | | [optional] | -|**openTime** | **Long** | | [optional] | -|**closeTime** | **Long** | | [optional] | -|**firstTradeId** | **Long** | | [optional] | -|**tradeCount** | **Long** | | [optional] | -|**strikePrice** | **String** | | [optional] | -|**exercisePrice** | **String** | | [optional] | +|**symbol** | **String** | symbol | [optional] | +|**priceChange** | **String** | 24-hour price change | [optional] | +|**priceChangePercent** | **String** | 24-hour percent price change | [optional] | +|**lastPrice** | **String** | Last trade price | [optional] | +|**lastQty** | **String** | Last trade amount | [optional] | +|**open** | **String** | 24-hour open price | [optional] | +|**high** | **String** | 24-hour high | [optional] | +|**low** | **String** | 24-hour low | [optional] | +|**volume** | **String** | Trading volume(contracts) | [optional] | +|**amount** | **String** | Trade amount(in quote asset) | [optional] | +|**bidPrice** | **String** | The best buy price | [optional] | +|**askPrice** | **String** | The best sell price | [optional] | +|**openTime** | **Long** | Time the first trade occurred within the last 24 hours | [optional] | +|**closeTime** | **Long** | Time the last trade occurred within the last 24 hours | [optional] | +|**firstTradeId** | **Long** | First trade ID | [optional] | +|**tradeCount** | **Long** | Number of trades | [optional] | +|**strikePrice** | **String** | Strike price | [optional] | +|**exercisePrice** | **String** | return estimated settlement price one hour before exercise, return index price at other times | [optional] | diff --git a/clients/derivatives-trading-options/docs/TradeApi.md b/clients/derivatives-trading-options/docs/TradeApi.md index 125870874..3e33d1f4a 100644 --- a/clients/derivatives-trading-options/docs/TradeApi.md +++ b/clients/derivatives-trading-options/docs/TradeApi.md @@ -11,10 +11,11 @@ All URIs are relative to *https://eapi.binance.com* | [**cancelOptionOrder**](TradeApi.md#cancelOptionOrder) | **DELETE** /eapi/v1/order | Cancel Option Order (TRADE) | | [**newOrder**](TradeApi.md#newOrder) | **POST** /eapi/v1/order | New Order (TRADE) | | [**optionPositionInformation**](TradeApi.md#optionPositionInformation) | **GET** /eapi/v1/position | Option Position Information (USER_DATA) | -| [**placeMultipleOrders**](TradeApi.md#placeMultipleOrders) | **POST** /eapi/v1/batchOrders | Place Multiple Orders(TRADE) | +| [**placeMultipleOrders**](TradeApi.md#placeMultipleOrders) | **POST** /eapi/v1/batchOrders | Place Multiple Orders (TRADE) | | [**queryCurrentOpenOptionOrders**](TradeApi.md#queryCurrentOpenOptionOrders) | **GET** /eapi/v1/openOrders | Query Current Open Option Orders (USER_DATA) | | [**queryOptionOrderHistory**](TradeApi.md#queryOptionOrderHistory) | **GET** /eapi/v1/historyOrders | Query Option Order History (TRADE) | | [**querySingleOrder**](TradeApi.md#querySingleOrder) | **GET** /eapi/v1/order | Query Single Order (TRADE) | +| [**tradfiOptionsContract**](TradeApi.md#tradfiOptionsContract) | **POST** /eapi/v1/stock/contract | TradFi Options Contract (USER_DATA) | | [**userCommission**](TradeApi.md#userCommission) | **GET** /eapi/v1/commission | User Commission (USER_DATA) | | [**userExerciseRecord**](TradeApi.md#userExerciseRecord) | **GET** /eapi/v1/exerciseRecord | User Exercise Record (USER_DATA) | @@ -25,7 +26,7 @@ All URIs are relative to *https://eapi.binance.com* Account Trade List (USER_DATA) -Get trades for a specific account and symbol. * Only support querying trades in the past 3 months Weight: 5 +Get trades for a specific account and symbol. Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -42,12 +43,12 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | Option trading pair, e.g BTC-200730-9000-C - Long fromId = 56L; // Long | Trade id to fetch from. Default gets most recent trades, e.g 4611875134427365376 - Long startTime = 56L; // Long | Start Time, e.g 1593511200000 - Long endTime = 56L; // Long | End Time, e.g 1593512200000 - Long limit = 56L; // Long | Number of result sets returned Default:100 Max:1000 - Long recvWindow = 56L; // Long | + String symbol = "BTC-200730-9000-C"; // String | Option trading pair. + Long fromId = 1L; // Long | Trade id to fetch from. Default gets most recent trades, e.g 4611875134427365376 + Long startTime = 1623319461670L; // Long | Start Time, e.g 1593511200000 + Long endTime = 1641782889000L; // Long | End Time, e.g 1593512200000 + Long limit = 20L; // Long | Number of result sets returned. + Long recvWindow = 5000L; // Long | Recv Window. try { AccountTradeListResponse result = apiInstance.accountTradeList(symbol, fromId, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -66,12 +67,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| Option trading pair, e.g BTC-200730-9000-C | [optional] | +| **symbol** | **String**| Option trading pair. | | | **fromId** | **Long**| Trade id to fetch from. Default gets most recent trades, e.g 4611875134427365376 | [optional] | | **startTime** | **Long**| Start Time, e.g 1593511200000 | [optional] | | **endTime** | **Long**| End Time, e.g 1593512200000 | [optional] | -| **limit** | **Long**| Number of result sets returned Default:100 Max:1000 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **limit** | **Long**| Number of result sets returned. | [optional] | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type @@ -97,7 +98,7 @@ No authorization required Cancel All Option Orders By Underlying (TRADE) -Cancel all active orders on specified underlying. Weight: 1 +Cancel all active orders on specified underlying. Weight(IP): 5 Security Type: TRADE ### Example ```java @@ -114,8 +115,8 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String underlying = "underlying_example"; // String | Option underlying, e.g BTCUSDT - Long recvWindow = 56L; // Long | + String underlying = "BTCUSDT"; // String | Underlying asset. + Long recvWindow = 5000L; // Long | Recv Window. try { CancelAllOptionOrdersByUnderlyingResponse result = apiInstance.cancelAllOptionOrdersByUnderlying(underlying, recvWindow); System.out.println(result); @@ -134,8 +135,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **underlying** | **String**| Option underlying, e.g BTCUSDT | | -| **recvWindow** | **Long**| | [optional] | +| **underlying** | **String**| Underlying asset. | | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type @@ -161,7 +162,7 @@ No authorization required Cancel all Option orders on specific symbol (TRADE) -Cancel all active order on a symbol. Weight: 5 +Cancel all active order on a symbol. Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -178,8 +179,8 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | Option trading pair, e.g BTC-200730-9000-C - Long recvWindow = 56L; // Long | + String symbol = "BTC-200730-9000-C"; // String | Option trading pair. + Long recvWindow = 5000L; // Long | Recv Window. try { CancelAllOptionOrdersOnSpecificSymbolResponse result = apiInstance.cancelAllOptionOrdersOnSpecificSymbol(symbol, recvWindow); System.out.println(result); @@ -198,8 +199,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| Option trading pair, e.g BTC-200730-9000-C | | -| **recvWindow** | **Long**| | [optional] | +| **symbol** | **String**| Option trading pair. | | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type @@ -225,7 +226,7 @@ No authorization required Cancel Multiple Option Orders (TRADE) -Cancel multiple orders. * At least one instance of `orderId` and `clientOrderId` must be sent. Weight: 1 +Cancel multiple orders. Weight(IP): 5 Security Type: TRADE Notes: - At least one instance of `orderId` and `clientOrderId` must be sent. ### Example ```java @@ -242,10 +243,10 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | Option trading pair, e.g BTC-200730-9000-C - OrderIds orderIds = Arrays.asList(); // OrderIds | Order ID, e.g [4611875134427365377,4611875134427365378] - ClientOrderIds clientOrderIds = Arrays.asList(); // ClientOrderIds | User-defined order ID, e.g [\"my_id_1\",\"my_id_2\"] - Long recvWindow = 56L; // Long | + String symbol = "BTC-200730-9000-C"; // String | Option trading pair. + OrderIds orderIds = Arrays.asList(); // OrderIds | Order ID list. + ClientOrderIds clientOrderIds = Arrays.asList(); // ClientOrderIds | Client order ID list. + Long recvWindow = 5000L; // Long | Recv Window. try { CancelMultipleOptionOrdersResponse result = apiInstance.cancelMultipleOptionOrders(symbol, orderIds, clientOrderIds, recvWindow); System.out.println(result); @@ -264,10 +265,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| Option trading pair, e.g BTC-200730-9000-C | | -| **orderIds** | [**OrderIds**](Long.md)| Order ID, e.g [4611875134427365377,4611875134427365378] | [optional] | -| **clientOrderIds** | [**ClientOrderIds**](String.md)| User-defined order ID, e.g [\"my_id_1\",\"my_id_2\"] | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **symbol** | **String**| Option trading pair. | | +| **orderIds** | [**OrderIds**](Long.md)| Order ID list. | [optional] | +| **clientOrderIds** | [**ClientOrderIds**](String.md)| Client order ID list. | [optional] | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type @@ -293,7 +294,7 @@ No authorization required Cancel Option Order (TRADE) -Cancel an active order. * At least one instance of `orderId` and `clientOrderId` must be sent. Weight: 1 +Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - At least one instance of `orderId` and `clientOrderId` must be sent. ### Example ```java @@ -310,10 +311,10 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | Option trading pair, e.g BTC-200730-9000-C - Long orderId = 56L; // Long | Order ID, e.g 4611875134427365377 - String clientOrderId = "clientOrderId_example"; // String | User-defined order ID, e.g 10000 - Long recvWindow = 56L; // Long | + String symbol = "BTC-200730-9000-C"; // String | Option trading pair. + Long orderId = 4611875134427365000L; // Long | Order ID. + String clientOrderId = "10000"; // String | clientOrderId + Long recvWindow = 5000L; // Long | Recv Window. try { CancelOptionOrderResponse result = apiInstance.cancelOptionOrder(symbol, orderId, clientOrderId, recvWindow); System.out.println(result); @@ -332,10 +333,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| Option trading pair, e.g BTC-200730-9000-C | | -| **orderId** | **Long**| Order ID, e.g 4611875134427365377 | [optional] | -| **clientOrderId** | **String**| User-defined order ID, e.g 10000 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **symbol** | **String**| Option trading pair. | | +| **orderId** | **Long**| Order ID. | [optional] | +| **clientOrderId** | **String**| clientOrderId | [optional] | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type @@ -361,7 +362,7 @@ No authorization required New Order (TRADE) -Send a new order. Weight: 0 +Send a new order. Weight(IP): 0 Security Type: TRADE Notes: Some parameters are mandatory depending on the order type as follows: Type | Mandatory parameters ------------ | ------------ LIMIT | timeInForce, quantity, price ### Example ```java @@ -423,7 +424,7 @@ No authorization required Option Position Information (USER_DATA) -Get current position information. Weight: 5 +Get current position information. Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -440,8 +441,8 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | Option trading pair, e.g BTC-200730-9000-C - Long recvWindow = 56L; // Long | + String symbol = "BTC-200730-9000-C"; // String | Option trading pair. + Long recvWindow = 5000L; // Long | Recv Window. try { OptionPositionInformationResponse result = apiInstance.optionPositionInformation(symbol, recvWindow); System.out.println(result); @@ -460,8 +461,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| Option trading pair, e.g BTC-200730-9000-C | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **symbol** | **String**| Option trading pair. | [optional] | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type @@ -485,9 +486,9 @@ No authorization required # **placeMultipleOrders** > PlaceMultipleOrdersResponse placeMultipleOrders(placeMultipleOrdersRequest) -Place Multiple Orders(TRADE) +Place Multiple Orders (TRADE) -Send multiple option orders. * Parameter rules are same with New Order * Batch orders are processed concurrently, and the order of matching is not guaranteed. Weight: 5 +Send multiple option orders. Weight(IP): 5 Security Type: TRADE Notes: Some parameters are mandatory depending on the order type as follows: Type | Mandatory parameters ------------ | ------------ LIMIT | timeInForce, quantity, price - Parameter rules are same with New Order - Batch orders are processed concurrently, and the order of matching is not guaranteed. ### Example ```java @@ -549,7 +550,7 @@ No authorization required Query Current Open Option Orders (USER_DATA) -Query current all open orders, status: ACCEPTED PARTIALLY_FILLED Weight: 1 for a single symbol; 40 when the symbol parameter is omitted +Query current all open orders, status: ACCEPTED PARTIALLY_FILLED Weight: 1 for a single symbol; 40 when the symbol parameter is omitted Security Type: USER_DATA ### Example ```java @@ -566,11 +567,11 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | Option trading pair, e.g BTC-200730-9000-C - Long orderId = 56L; // Long | Order ID, e.g 4611875134427365377 - Long startTime = 56L; // Long | Start Time, e.g 1593511200000 - Long endTime = 56L; // Long | End Time, e.g 1593512200000 - Long recvWindow = 56L; // Long | + String symbol = "BTC-200730-9000-C"; // String | Option trading pair. + Long orderId = 4611875134427365000L; // Long | Order ID. + Long startTime = 1623319461670L; // Long | Start Time, e.g 1593511200000 + Long endTime = 1641782889000L; // Long | End Time, e.g 1593512200000 + Long recvWindow = 5000L; // Long | Recv Window. try { QueryCurrentOpenOptionOrdersResponse result = apiInstance.queryCurrentOpenOptionOrders(symbol, orderId, startTime, endTime, recvWindow); System.out.println(result); @@ -589,11 +590,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| Option trading pair, e.g BTC-200730-9000-C | [optional] | -| **orderId** | **Long**| Order ID, e.g 4611875134427365377 | [optional] | +| **symbol** | **String**| Option trading pair. | [optional] | +| **orderId** | **Long**| Order ID. | [optional] | | **startTime** | **Long**| Start Time, e.g 1593511200000 | [optional] | | **endTime** | **Long**| End Time, e.g 1593512200000 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type @@ -619,7 +620,7 @@ No authorization required Query Option Order History (TRADE) -Query all finished orders within 5 days, finished status: CANCELLED FILLED REJECTED. Weight: 3 +Query all finished orders within 5 days, finished status: CANCELLED FILLED REJECTED. Weight(IP): 3 Security Type: TRADE ### Example ```java @@ -636,12 +637,12 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | Option trading pair, e.g BTC-200730-9000-C - Long orderId = 56L; // Long | Order ID, e.g 4611875134427365377 - Long startTime = 56L; // Long | Start Time, e.g 1593511200000 - Long endTime = 56L; // Long | End Time, e.g 1593512200000 - Long limit = 56L; // Long | Number of result sets returned Default:100 Max:1000 - Long recvWindow = 56L; // Long | + String symbol = "BTC-200730-9000-C"; // String | Option trading pair. + Long orderId = 4611875134427365000L; // Long | Order ID. + Long startTime = 1623319461670L; // Long | Start Time, e.g 1593511200000 + Long endTime = 1641782889000L; // Long | End Time, e.g 1593512200000 + Long limit = 20L; // Long | Number of result sets returned + Long recvWindow = 5000L; // Long | Recv Window. try { QueryOptionOrderHistoryResponse result = apiInstance.queryOptionOrderHistory(symbol, orderId, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -660,12 +661,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| Option trading pair, e.g BTC-200730-9000-C | | -| **orderId** | **Long**| Order ID, e.g 4611875134427365377 | [optional] | +| **symbol** | **String**| Option trading pair. | | +| **orderId** | **Long**| Order ID. | [optional] | | **startTime** | **Long**| Start Time, e.g 1593511200000 | [optional] | | **endTime** | **Long**| End Time, e.g 1593512200000 | [optional] | -| **limit** | **Long**| Number of result sets returned Default:100 Max:1000 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **limit** | **Long**| Number of result sets returned | [optional] | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type @@ -691,7 +692,7 @@ No authorization required Query Single Order (TRADE) -Check an order status. * These orders will not be found: * order status is `CANCELED` or `REJECTED`, **AND** * order has NO filled trade, **AND** * created time + 3 days < current time * Either `orderId` or `clientOrderId ` must be sent. Weight: 1 +Check an order status. * These orders will not be found: * order status is `CANCELED` or `REJECTED`, **AND** * order has NO filled trade, **AND** * created time + 3 days < current time Weight(IP): 1 Security Type: TRADE Notes: - Either `orderId` or `clientOrderId ` must be sent. ### Example ```java @@ -708,10 +709,10 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | Option trading pair, e.g BTC-200730-9000-C - Long orderId = 56L; // Long | Order ID, e.g 4611875134427365377 - String clientOrderId = "clientOrderId_example"; // String | User-defined order ID, e.g 10000 - Long recvWindow = 56L; // Long | + String symbol = "BTC-200730-9000-C"; // String | Option trading pair. + Long orderId = 4611875134427365000L; // Long | Order ID. + String clientOrderId = "abc123"; // String | User-defined order ID; cannot be duplicated among open orders. + Long recvWindow = 5000L; // Long | Recv Window. try { QuerySingleOrderResponse result = apiInstance.querySingleOrder(symbol, orderId, clientOrderId, recvWindow); System.out.println(result); @@ -730,10 +731,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| Option trading pair, e.g BTC-200730-9000-C | | -| **orderId** | **Long**| Order ID, e.g 4611875134427365377 | [optional] | -| **clientOrderId** | **String**| User-defined order ID, e.g 10000 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **symbol** | **String**| Option trading pair. | | +| **orderId** | **Long**| Order ID. | [optional] | +| **clientOrderId** | **String**| User-defined order ID; cannot be duplicated among open orders. | [optional] | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type @@ -753,13 +754,75 @@ No authorization required |-------------|-------------|------------------| | **200** | Single Order | - | + +# **tradfiOptionsContract** +> TradfiOptionsContractResponse tradfiOptionsContract(tradfiOptionsContractRequest) + +TradFi Options Contract (USER_DATA) + +Sign TradFi Options agreement contract Weight(IP): 50 Security Type: USER_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_options.ApiClient; +import com.binance.connector.client.derivatives_trading_options.ApiException; +import com.binance.connector.client.derivatives_trading_options.Configuration; +import com.binance.connector.client.derivatives_trading_options.models.*; +import com.binance.connector.client.derivatives_trading_options.rest.api.TradeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://eapi.binance.com"); + + TradeApi apiInstance = new TradeApi(defaultClient); + TradfiOptionsContractRequest tradfiOptionsContractRequest = new TradfiOptionsContractRequest(); // TradfiOptionsContractRequest | + try { + TradfiOptionsContractResponse result = apiInstance.tradfiOptionsContract(tradfiOptionsContractRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TradeApi#tradfiOptionsContract"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tradfiOptionsContractRequest** | [**TradfiOptionsContractRequest**](TradfiOptionsContractRequest.md)| | [optional] | + +### Return type + +[**TradfiOptionsContractResponse**](TradfiOptionsContractResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | TradFi Options Contract | - | + # **userCommission** > UserCommissionResponse userCommission(recvWindow) User Commission (USER_DATA) -Get account commission. Weight: 5 +Get account commission. Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -776,7 +839,7 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | Recv Window. try { UserCommissionResponse result = apiInstance.userCommission(recvWindow); System.out.println(result); @@ -795,7 +858,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type @@ -821,7 +884,7 @@ No authorization required User Exercise Record (USER_DATA) -Get account exercise records. Weight: 5 +Get account exercise records. Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -838,11 +901,11 @@ public class Example { defaultClient.setBasePath("https://eapi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | Option trading pair, e.g BTC-200730-9000-C - Long startTime = 56L; // Long | Start Time, e.g 1593511200000 - Long endTime = 56L; // Long | End Time, e.g 1593512200000 - Long limit = 56L; // Long | Number of result sets returned Default:100 Max:1000 - Long recvWindow = 56L; // Long | + String symbol = "BTC-200730-9000-C"; // String | Option trading pair. + Long startTime = 1623319461670L; // Long | Start Time, e.g 1593511200000 + Long endTime = 1641782889000L; // Long | End Time, e.g 1593512200000 + Long limit = 20L; // Long | Number of result sets returned. + Long recvWindow = 5000L; // Long | Recv Window. try { UserExerciseRecordResponse result = apiInstance.userExerciseRecord(symbol, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -861,11 +924,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| Option trading pair, e.g BTC-200730-9000-C | [optional] | +| **symbol** | **String**| Option trading pair. | [optional] | | **startTime** | **Long**| Start Time, e.g 1593511200000 | [optional] | | **endTime** | **Long**| End Time, e.g 1593512200000 | [optional] | -| **limit** | **Long**| Number of result sets returned Default:100 Max:1000 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **limit** | **Long**| Number of result sets returned. | [optional] | +| **recvWindow** | **Long**| Recv Window. | [optional] | ### Return type diff --git a/clients/derivatives-trading-options/docs/TradeStreamsRequest.md b/clients/derivatives-trading-options/docs/TradeStreamsRequest.md index 65d27f30f..8a41550fd 100644 --- a/clients/derivatives-trading-options/docs/TradeStreamsRequest.md +++ b/clients/derivatives-trading-options/docs/TradeStreamsRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Integer** | | [optional] | -|**symbol** | **String** | | | +|**id** | **Integer** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | diff --git a/clients/derivatives-trading-options/docs/TradeStreamsResponse.md b/clients/derivatives-trading-options/docs/TradeStreamsResponse.md index e1944f050..142b8313e 100644 --- a/clients/derivatives-trading-options/docs/TradeStreamsResponse.md +++ b/clients/derivatives-trading-options/docs/TradeStreamsResponse.md @@ -7,16 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**tLowerCase** | **Long** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**X** | **String** | | [optional] | -|**S** | **String** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | +|**eLowerCase** | **String** | event type | [optional] | +|**E** | **Long** | event time | [optional] | +|**T** | **Long** | trade completed time | [optional] | +|**sLowerCase** | **String** | Option trading symbol | [optional] | +|**tLowerCase** | **Long** | trade ID | [optional] | +|**pLowerCase** | **String** | price | [optional] | +|**qLowerCase** | **String** | quantity, always positive | [optional] | +|**X** | **String** | trade type enum, \"MARKET\" for Orderbook trading, \"BLOCK\" for Block trade | [optional] | +|**S** | **String** | direction | [optional] | +|**mLowerCase** | **Boolean** | Is the buyer the market maker? | [optional] | diff --git a/clients/derivatives-trading-options/docs/TradfiOptionsContractRequest.md b/clients/derivatives-trading-options/docs/TradfiOptionsContractRequest.md new file mode 100644 index 000000000..822979430 --- /dev/null +++ b/clients/derivatives-trading-options/docs/TradfiOptionsContractRequest.md @@ -0,0 +1,13 @@ + + +# TradfiOptionsContractRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**recvWindow** | **Long** | | [optional] | + + + diff --git a/clients/derivatives-trading-options/docs/TradfiOptionsContractResponse.md b/clients/derivatives-trading-options/docs/TradfiOptionsContractResponse.md new file mode 100644 index 000000000..bbe178e71 --- /dev/null +++ b/clients/derivatives-trading-options/docs/TradfiOptionsContractResponse.md @@ -0,0 +1,14 @@ + + +# TradfiOptionsContractResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Long** | | [optional] | +|**msg** | **String** | | [optional] | + + + diff --git a/clients/derivatives-trading-options/docs/Type.md b/clients/derivatives-trading-options/docs/Type.md deleted file mode 100644 index 0047196c6..000000000 --- a/clients/derivatives-trading-options/docs/Type.md +++ /dev/null @@ -1,11 +0,0 @@ - - -# Type - -## Enum - - -* `LIMIT` (value: `"LIMIT"`) - - - diff --git a/clients/derivatives-trading-options/docs/UpdateSpeed.md b/clients/derivatives-trading-options/docs/UpdateSpeed.md new file mode 100644 index 000000000..2605774ce --- /dev/null +++ b/clients/derivatives-trading-options/docs/UpdateSpeed.md @@ -0,0 +1,13 @@ + + +# UpdateSpeed + +## Enum + + +* `UPDATE_SPEED_100ms` (value: `"100ms"`) + +* `UPDATE_SPEED_500ms` (value: `"500ms"`) + + + diff --git a/clients/derivatives-trading-options/docs/UserCommissionResponse.md b/clients/derivatives-trading-options/docs/UserCommissionResponse.md index fb307d028..3a6eace3f 100644 --- a/clients/derivatives-trading-options/docs/UserCommissionResponse.md +++ b/clients/derivatives-trading-options/docs/UserCommissionResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**commissions** | [**List<UserCommissionResponseCommissionsInner>**](UserCommissionResponseCommissionsInner.md) | | [optional] | +|**commissions** | [**List<UserCommissionResponseCommissionsInner>**](UserCommissionResponseCommissionsInner.md) | commissions | [optional] | diff --git a/clients/derivatives-trading-options/docs/UserCommissionResponseCommissionsInner.md b/clients/derivatives-trading-options/docs/UserCommissionResponseCommissionsInner.md index 8f5fecf4c..1878ea812 100644 --- a/clients/derivatives-trading-options/docs/UserCommissionResponseCommissionsInner.md +++ b/clients/derivatives-trading-options/docs/UserCommissionResponseCommissionsInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**underlying** | **String** | | [optional] | -|**makerFee** | **String** | | [optional] | -|**takerFee** | **String** | | [optional] | +|**underlying** | **String** | underlying | [optional] | +|**makerFee** | **String** | maker Fee | [optional] | +|**takerFee** | **String** | taker Fee | [optional] | diff --git a/clients/derivatives-trading-options/docs/UserDataStreamEventsResponse.md b/clients/derivatives-trading-options/docs/UserDataStreamEventsResponse.md index c6cb8b974..4e8d2875a 100644 --- a/clients/derivatives-trading-options/docs/UserDataStreamEventsResponse.md +++ b/clients/derivatives-trading-options/docs/UserDataStreamEventsResponse.md @@ -7,17 +7,23 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **String** | | [optional] | -|**T** | **Long** | | [optional] | -|**mLowerCase** | **String** | | [optional] | -|**B** | [**List<BalancePositionUpdateBInner>**](BalancePositionUpdateBInner.md) | | [optional] | -|**P** | [**List<BalancePositionUpdatePInner>**](BalancePositionUpdatePInner.md) | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction Time | [optional] | +|**eq** | **String** | Account equity in USDT | [optional] | +|**aeq** | **String** | Account adjusted equity in USDT | [optional] | +|**bLowerCase** | **String** | Account wallet balance in USDT | [optional] | +|**mLowerCase** | **String** | Event reason type | [optional] | +|**uLowerCase** | **String** | Unrealized PnL | [optional] | +|**iLowerCase** | **String** | Initial margin in USDT | [optional] | +|**M** | **String** | Maintenance margin in USDT | [optional] | +|**B** | [**List<BalancePositionUpdateBInner>**](BalancePositionUpdateBInner.md) | Balances | [optional] | +|**P** | [**List<BalancePositionUpdatePInner>**](BalancePositionUpdatePInner.md) | Positions | [optional] | |**G** | [**List<GreekUpdateGInner>**](GreekUpdateGInner.md) | | [optional] | -|**oLowerCase** | [**OrderTradeUpdateO**](OrderTradeUpdateO.md) | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**mb** | **String** | | [optional] | -|**mm** | **String** | | [optional] | |**listenKey** | **String** | | [optional] | +|**oLowerCase** | [**OrderTradeUpdateO**](OrderTradeUpdateO.md) | | [optional] | +|**sLowerCase** | **String** | Risk level. This feature only applies to VIP and Market Maker accounts. Risk level is re-evaluated on: funds transfer, trade fill, option expiry. | [optional] | +|**mb** | **String** | Margin balance | [optional] | +|**mm** | **String** | Maintenance margin | [optional] | diff --git a/clients/derivatives-trading-options/docs/UserDataStreamsApi.md b/clients/derivatives-trading-options/docs/UserDataStreamsApi.md index c1d1c31eb..22635d611 100644 --- a/clients/derivatives-trading-options/docs/UserDataStreamsApi.md +++ b/clients/derivatives-trading-options/docs/UserDataStreamsApi.md @@ -15,7 +15,7 @@ All URIs are relative to *https://eapi.binance.com* Close User Data Stream (USER_STREAM) -Close out a user data stream. Weight: 1 +Close out a user data stream. Weight(IP): 1 Security Type: USER_STREAM ### Example ```java @@ -72,7 +72,7 @@ No authorization required Keepalive User Data Stream (USER_STREAM) -Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 60 minutes. Weight: 1 +Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 60 minutes. Weight(IP): 1 Security Type: USER_STREAM ### Example ```java @@ -129,7 +129,7 @@ No authorization required Start User Data Stream (USER_STREAM) -Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 1 +Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight(IP): 1 Security Type: USER_STREAM ### Example ```java diff --git a/clients/derivatives-trading-options/docs/UserExerciseRecordResponseInner.md b/clients/derivatives-trading-options/docs/UserExerciseRecordResponseInner.md index 4b28fe8a0..e2f1243c0 100644 --- a/clients/derivatives-trading-options/docs/UserExerciseRecordResponseInner.md +++ b/clients/derivatives-trading-options/docs/UserExerciseRecordResponseInner.md @@ -7,19 +7,19 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**currency** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**exercisePrice** | **String** | | [optional] | -|**quantity** | **String** | | [optional] | -|**amount** | **String** | | [optional] | -|**fee** | **String** | | [optional] | -|**createDate** | **Long** | | [optional] | -|**priceScale** | **Long** | | [optional] | -|**quantityScale** | **Long** | | [optional] | -|**optionSide** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**quoteAsset** | **String** | | [optional] | +|**id** | **String** | id | [optional] | +|**currency** | **String** | currency | [optional] | +|**symbol** | **String** | symbol | [optional] | +|**exercisePrice** | **String** | exercise Price | [optional] | +|**quantity** | **String** | quantity | [optional] | +|**amount** | **String** | amount | [optional] | +|**fee** | **String** | fee | [optional] | +|**createDate** | **Long** | create Date | [optional] | +|**priceScale** | **Long** | price Scale | [optional] | +|**quantityScale** | **Long** | quantity Scale | [optional] | +|**optionSide** | **String** | option Side | [optional] | +|**positionSide** | **String** | position Side | [optional] | +|**quoteAsset** | **String** | quote Asset | [optional] | diff --git a/clients/derivatives-trading-options/docs/rest-api/migration-guide.md b/clients/derivatives-trading-options/docs/rest-api/migration-guide.md index 127f82b4e..81354e8e5 100644 --- a/clients/derivatives-trading-options/docs/rest-api/migration-guide.md +++ b/clients/derivatives-trading-options/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-derivatives-trading-options - 8.0.0 + 9.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-derivatives-trading-options - 8.0.0 + 9.0.0 ``` diff --git a/clients/derivatives-trading-options/example_rest.md b/clients/derivatives-trading-options/example_rest.md index 1c55c5eb3..ff910fe77 100644 --- a/clients/derivatives-trading-options/example_rest.md +++ b/clients/derivatives-trading-options/example_rest.md @@ -1,98 +1,100 @@ ## Account -[GET /eapi/v1/bill](https://developers.binance.com/docs/derivatives/options-trading/account/Account-Funding-Flow) - accountFundingFlow - [AccountFundingFlowExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/account/AccountFundingFlowExample.java#L47) +[GET /eapi/v1/bill](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/account#account-funding-flow) - accountFundingFlow - [AccountFundingFlowExample.java:38](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/account/AccountFundingFlowExample.java#L38) -[GET /eapi/v1/marginAccount](https://developers.binance.com/docs/derivatives/options-trading/account/Option-Margin-Account-Information) - optionMarginAccountInformation - [OptionMarginAccountInformationExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/account/OptionMarginAccountInformationExample.java#L47) +[GET /eapi/v1/marginAccount](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/account#option-margin-account-information) - optionMarginAccountInformation - [OptionMarginAccountInformationExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/account/OptionMarginAccountInformationExample.java#L36) ## MarketData -[GET /eapi/v1/time](https://developers.binance.com/docs/derivatives/options-trading/market-data/Check-Server-Time) - checkServerTime - [CheckServerTimeExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/CheckServerTimeExample.java#L47) +[GET /eapi/v1/time](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#check-server-time) - checkServerTime - [CheckServerTimeExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/CheckServerTimeExample.java#L36) -[GET /eapi/v1/exchangeInfo](https://developers.binance.com/docs/derivatives/options-trading/market-data/Exchange-Information) - exchangeInformation - [ExchangeInformationExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/ExchangeInformationExample.java#L47) +[GET /eapi/v1/exchangeInfo](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#exchange-information) - exchangeInformation - [ExchangeInformationExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/ExchangeInformationExample.java#L36) -[GET /eapi/v1/exerciseHistory](https://developers.binance.com/docs/derivatives/options-trading/market-data/Historical-Exercise-Records) - historicalExerciseRecords - [HistoricalExerciseRecordsExample.java:48](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/HistoricalExerciseRecordsExample.java#L48) +[GET /eapi/v1/exerciseHistory](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#historical-exercise-records) - historicalExerciseRecords - [HistoricalExerciseRecordsExample.java:37](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/HistoricalExerciseRecordsExample.java#L37) -[GET /eapi/v1/index](https://developers.binance.com/docs/derivatives/options-trading/market-data/Symbol-Price-Ticker) - indexPrice - [IndexPriceExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/IndexPriceExample.java#L47) +[GET /eapi/v1/index](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#index-price) - indexPrice - [IndexPriceExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/IndexPriceExample.java#L36) -[GET /eapi/v1/klines](https://developers.binance.com/docs/derivatives/options-trading/market-data/Kline-Candlestick-Data) - klineCandlestickData - [KlineCandlestickDataExample.java:48](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/KlineCandlestickDataExample.java#L48) +[GET /eapi/v1/klines](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#kline-candlestick-data) - klineCandlestickData - [KlineCandlestickDataExample.java:39](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/KlineCandlestickDataExample.java#L39) -[GET /eapi/v1/openInterest](https://developers.binance.com/docs/derivatives/options-trading/market-data/Open-Interest) - openInterest - [OpenInterestExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OpenInterestExample.java#L47) +[GET /eapi/v1/openInterest](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#open-interest) - openInterest - [OpenInterestExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OpenInterestExample.java#L36) -[GET /eapi/v1/mark](https://developers.binance.com/docs/derivatives/options-trading/market-data/Option-Mark-Price) - optionMarkPrice - [OptionMarkPriceExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OptionMarkPriceExample.java#L47) +[GET /eapi/v1/mark](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#option-mark-price) - optionMarkPrice - [OptionMarkPriceExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OptionMarkPriceExample.java#L36) -[GET /eapi/v1/depth](https://developers.binance.com/docs/derivatives/options-trading/market-data/Order-Book) - orderBook - [OrderBookExample.java:48](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OrderBookExample.java#L48) +[GET /eapi/v1/depth](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#order-book) - orderBook - [OrderBookExample.java:37](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OrderBookExample.java#L37) -[GET /eapi/v1/blockTrades](https://developers.binance.com/docs/derivatives/options-trading/market-data/Recent-Block-Trade-List) - recentBlockTradesList - [RecentBlockTradesListExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/RecentBlockTradesListExample.java#L47) +[GET /eapi/v1/blockTrades](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#recent-block-trades-list) - recentBlockTradesList - [RecentBlockTradesListExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/RecentBlockTradesListExample.java#L36) -[GET /eapi/v1/trades](https://developers.binance.com/docs/derivatives/options-trading/market-data/Recent-Trades-List) - recentTradesList - [RecentTradesListExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/RecentTradesListExample.java#L47) +[GET /eapi/v1/trades](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#recent-trades-list) - recentTradesList - [RecentTradesListExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/RecentTradesListExample.java#L36) -[GET /eapi/v1/ping](https://developers.binance.com/docs/derivatives/options-trading/market-data/Test-Connectivity) - testConnectivity - [TestConnectivityExample.java:45](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/TestConnectivityExample.java#L45) +[GET /eapi/v1/ping](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#test-connectivity) - testConnectivity - [TestConnectivityExample.java:34](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/TestConnectivityExample.java#L34) -[GET /eapi/v1/ticker](https://developers.binance.com/docs/derivatives/options-trading/market-data/24hr-Ticker-Price-Change-Statistics) - ticker24hrPriceChangeStatistics - [Ticker24hrPriceChangeStatisticsExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java#L47) +[GET /eapi/v1/ticker](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#ticker24hr-price-change-statistics) - ticker24hrPriceChangeStatistics - [Ticker24hrPriceChangeStatisticsExample.java:37](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java#L37) ## MarketMakerBlockTrade -[POST /eapi/v1/block/order/execute](https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Accept-Block-Trade-Order) - acceptBlockTradeOrder - [AcceptBlockTradeOrderExample.java:48](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/AcceptBlockTradeOrderExample.java#L48) +[POST /eapi/v1/block/order/execute](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#accept-block-trade-order) - acceptBlockTradeOrder - [AcceptBlockTradeOrderExample.java:37](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/AcceptBlockTradeOrderExample.java#L37) -[GET /eapi/v1/block/user-trades](https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Account-Block-Trade-List) - accountBlockTradeList - [AccountBlockTradeListExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/AccountBlockTradeListExample.java#L47) +[GET /eapi/v1/block/user-trades](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#account-block-trade-list) - accountBlockTradeList - [AccountBlockTradeListExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/AccountBlockTradeListExample.java#L36) -[DELETE /eapi/v1/block/order/create](https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Cancel-Block-Trade-Order) - cancelBlockTradeOrder - [CancelBlockTradeOrderExample.java:45](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/CancelBlockTradeOrderExample.java#L45) +[DELETE /eapi/v1/block/order/create](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#cancel-block-trade-order) - cancelBlockTradeOrder - [CancelBlockTradeOrderExample.java:34](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/CancelBlockTradeOrderExample.java#L34) -[PUT /eapi/v1/block/order/create](https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Extend-Block-Trade-Order) - extendBlockTradeOrder - [ExtendBlockTradeOrderExample.java:48](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/ExtendBlockTradeOrderExample.java#L48) +[PUT /eapi/v1/block/order/create](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#extend-block-trade-order) - extendBlockTradeOrder - [ExtendBlockTradeOrderExample.java:38](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/ExtendBlockTradeOrderExample.java#L38) -[POST /eapi/v1/block/order/create](https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/New-Block-Trade-Order) - newBlockTradeOrder - [NewBlockTradeOrderExample.java:49](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/NewBlockTradeOrderExample.java#L49) +[POST /eapi/v1/block/order/create](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#new-block-trade-order) - newBlockTradeOrder - [NewBlockTradeOrderExample.java:39](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/NewBlockTradeOrderExample.java#L39) -[GET /eapi/v1/block/order/execute](https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Query-Block-Trade-Detail) - queryBlockTradeDetails - [QueryBlockTradeDetailsExample.java:48](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/QueryBlockTradeDetailsExample.java#L48) +[GET /eapi/v1/block/order/execute](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#query-block-trade-details) - queryBlockTradeDetails - [QueryBlockTradeDetailsExample.java:37](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/QueryBlockTradeDetailsExample.java#L37) -[GET /eapi/v1/block/order/orders](https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Query-Block-Trade-Order) - queryBlockTradeOrder - [QueryBlockTradeOrderExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/QueryBlockTradeOrderExample.java#L47) +[GET /eapi/v1/block/order/orders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#query-block-trade-order) - queryBlockTradeOrder - [QueryBlockTradeOrderExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/QueryBlockTradeOrderExample.java#L36) ## MarketMakerEndpoints -[POST /eapi/v1/countdownCancelAllHeartBeat](https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Auto-Cancel-All-Open-Orders-Heartbeat) - autoCancelAllOpenOrders - [AutoCancelAllOpenOrdersExample.java:52](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/AutoCancelAllOpenOrdersExample.java#L52) +[POST /eapi/v1/countdownCancelAllHeartBeat](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#auto-cancel-all-open-orders) - autoCancelAllOpenOrders - [AutoCancelAllOpenOrdersExample.java:41](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/AutoCancelAllOpenOrdersExample.java#L41) -[GET /eapi/v1/countdownCancelAll](https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Get-Auto-Cancel-All-Open-Orders-Config) - getAutoCancelAllOpenOrders - [GetAutoCancelAllOpenOrdersExample.java:51](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/GetAutoCancelAllOpenOrdersExample.java#L51) +[GET /eapi/v1/countdownCancelAll](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#get-auto-cancel-all-open-orders) - getAutoCancelAllOpenOrders - [GetAutoCancelAllOpenOrdersExample.java:40](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/GetAutoCancelAllOpenOrdersExample.java#L40) -[GET /eapi/v1/mmp](https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Get-Market-Maker-Protection-Config) - getMarketMakerProtectionConfig - [GetMarketMakerProtectionConfigExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/GetMarketMakerProtectionConfigExample.java#L47) +[GET /eapi/v1/mmp](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#get-market-maker-protection-config) - getMarketMakerProtectionConfig - [GetMarketMakerProtectionConfigExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/GetMarketMakerProtectionConfigExample.java#L36) -[POST /eapi/v1/mmpReset](https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Reset-Market-Maker-Protection-Config) - resetMarketMakerProtectionConfig - [ResetMarketMakerProtectionConfigExample.java:48](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/ResetMarketMakerProtectionConfigExample.java#L48) +[POST /eapi/v1/mmpReset](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#reset-market-maker-protection-config) - resetMarketMakerProtectionConfig - [ResetMarketMakerProtectionConfigExample.java:37](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/ResetMarketMakerProtectionConfigExample.java#L37) -[POST /eapi/v1/countdownCancelAll](https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Set-Auto-Cancel-All-Open-Orders-Config) - setAutoCancelAllOpenOrders - [SetAutoCancelAllOpenOrdersExample.java:62](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/SetAutoCancelAllOpenOrdersExample.java#L62) +[POST /eapi/v1/countdownCancelAll](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#set-auto-cancel-all-open-orders) - setAutoCancelAllOpenOrders - [SetAutoCancelAllOpenOrdersExample.java:51](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/SetAutoCancelAllOpenOrdersExample.java#L51) -[POST /eapi/v1/mmpSet](https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Set-Market-Maker-Protection-Config) - setMarketMakerProtectionConfig - [ResetMarketMakerProtectionConfigExample.java:48](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/ResetMarketMakerProtectionConfigExample.java#L48) +[POST /eapi/v1/mmpSet](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#set-market-maker-protection-config) - setMarketMakerProtectionConfig - [ResetMarketMakerProtectionConfigExample.java:37](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/ResetMarketMakerProtectionConfigExample.java#L37) ## Trade -[GET /eapi/v1/userTrades](https://developers.binance.com/docs/derivatives/options-trading/trade/Account-Trade-List) - accountTradeList - [AccountTradeListExample.java:48](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/AccountTradeListExample.java#L48) +[GET /eapi/v1/userTrades](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#account-trade-list) - accountTradeList - [AccountTradeListExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/AccountTradeListExample.java#L36) -[DELETE /eapi/v1/allOpenOrdersByUnderlying](https://developers.binance.com/docs/derivatives/options-trading/trade/Cancel-All-Option-Orders-By-Underlying) - cancelAllOptionOrdersByUnderlying - [CancelAllOptionOrdersByUnderlyingExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelAllOptionOrdersByUnderlyingExample.java#L47) +[DELETE /eapi/v1/allOpenOrdersByUnderlying](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#cancel-all-option-orders-by-underlying) - cancelAllOptionOrdersByUnderlying - [CancelAllOptionOrdersByUnderlyingExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelAllOptionOrdersByUnderlyingExample.java#L36) -[DELETE /eapi/v1/allOpenOrders](https://developers.binance.com/docs/derivatives/options-trading/trade/Cancel-all-Option-orders-on-specific-symbol) - cancelAllOptionOrdersOnSpecificSymbol - [CancelAllOptionOrdersOnSpecificSymbolExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelAllOptionOrdersOnSpecificSymbolExample.java#L47) +[DELETE /eapi/v1/allOpenOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#cancel-all-option-orders-on-specific-symbol) - cancelAllOptionOrdersOnSpecificSymbol - [CancelAllOptionOrdersOnSpecificSymbolExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelAllOptionOrdersOnSpecificSymbolExample.java#L36) -[DELETE /eapi/v1/batchOrders](https://developers.binance.com/docs/derivatives/options-trading/trade/Cancel-Multiple-Option-Orders) - cancelMultipleOptionOrders - [CancelMultipleOptionOrdersExample.java:50](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelMultipleOptionOrdersExample.java#L50) +[DELETE /eapi/v1/batchOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#cancel-multiple-option-orders) - cancelMultipleOptionOrders - [CancelMultipleOptionOrdersExample.java:39](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelMultipleOptionOrdersExample.java#L39) -[DELETE /eapi/v1/order](https://developers.binance.com/docs/derivatives/options-trading/trade/Cancel-Option-Order) - cancelOptionOrder - [CancelOptionOrderExample.java:48](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelOptionOrderExample.java#L48) +[DELETE /eapi/v1/order](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#cancel-option-order) - cancelOptionOrder - [CancelOptionOrderExample.java:37](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelOptionOrderExample.java#L37) -[POST /eapi/v1/order](https://developers.binance.com/docs/derivatives/options-trading/trade/New-Order) - newOrder - [NewOrderExample.java:50](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/NewOrderExample.java#L50) +[POST /eapi/v1/order](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#new-order) - newOrder - [NewOrderExample.java:41](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/NewOrderExample.java#L41) -[GET /eapi/v1/position](https://developers.binance.com/docs/derivatives/options-trading/trade/Option-Position-Information) - optionPositionInformation - [OptionPositionInformationExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/OptionPositionInformationExample.java#L47) +[GET /eapi/v1/position](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#option-position-information) - optionPositionInformation - [OptionPositionInformationExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/OptionPositionInformationExample.java#L36) -[POST /eapi/v1/batchOrders](https://developers.binance.com/docs/derivatives/options-trading/trade/Place-Multiple-Orders) - placeMultipleOrders - [PlaceMultipleOrdersExample.java:50](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/PlaceMultipleOrdersExample.java#L50) +[POST /eapi/v1/batchOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#place-multiple-orders) - placeMultipleOrders - [PlaceMultipleOrdersExample.java:41](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/PlaceMultipleOrdersExample.java#L41) -[GET /eapi/v1/openOrders](https://developers.binance.com/docs/derivatives/options-trading/trade/Query-Current-Open-Option-Orders) - queryCurrentOpenOptionOrders - [QueryCurrentOpenOptionOrdersExample.java:48](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QueryCurrentOpenOptionOrdersExample.java#L48) +[GET /eapi/v1/openOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#query-current-open-option-orders) - queryCurrentOpenOptionOrders - [QueryCurrentOpenOptionOrdersExample.java:37](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QueryCurrentOpenOptionOrdersExample.java#L37) -[GET /eapi/v1/historyOrders](https://developers.binance.com/docs/derivatives/options-trading/trade/Query-Option-Order-History) - queryOptionOrderHistory - [QueryOptionOrderHistoryExample.java:48](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QueryOptionOrderHistoryExample.java#L48) +[GET /eapi/v1/historyOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#query-option-order-history) - queryOptionOrderHistory - [QueryOptionOrderHistoryExample.java:37](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QueryOptionOrderHistoryExample.java#L37) -[GET /eapi/v1/order](https://developers.binance.com/docs/derivatives/options-trading/trade/Query-Single-Order) - querySingleOrder - [QuerySingleOrderExample.java:50](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QuerySingleOrderExample.java#L50) +[GET /eapi/v1/order](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#query-single-order) - querySingleOrder - [QuerySingleOrderExample.java:39](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QuerySingleOrderExample.java#L39) -[GET /eapi/v1/commission](https://developers.binance.com/docs/derivatives/options-trading/trade/User-Commission) - userCommission - [UserCommissionExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/UserCommissionExample.java#L47) +[POST /eapi/v1/stock/contract](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#tradfi-options-contract) - tradfiOptionsContract - [TradfiOptionsContractExample.java:37](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/TradfiOptionsContractExample.java#L37) -[GET /eapi/v1/exerciseRecord](https://developers.binance.com/docs/derivatives/options-trading/trade/User-Exercise-Record) - userExerciseRecord - [UserExerciseRecordExample.java:47](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/UserExerciseRecordExample.java#L47) +[GET /eapi/v1/commission](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#user-commission) - userCommission - [UserCommissionExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/UserCommissionExample.java#L36) + +[GET /eapi/v1/exerciseRecord](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#user-exercise-record) - userExerciseRecord - [UserExerciseRecordExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/UserExerciseRecordExample.java#L36) ## UserDataStreams -[DELETE /eapi/v1/listenKey](https://developers.binance.com/docs/derivatives/options-trading/user-data-streams/Close-User-Data-Stream) - closeUserDataStream - [CloseUserDataStreamExample.java:45](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/CloseUserDataStreamExample.java#L45) +[DELETE /eapi/v1/listenKey](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/user-data-streams#close-user-data-stream) - closeUserDataStream - [CloseUserDataStreamExample.java:34](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/CloseUserDataStreamExample.java#L34) -[PUT /eapi/v1/listenKey](https://developers.binance.com/docs/derivatives/options-trading/user-data-streams/Keepalive-User-Data-Stream) - keepaliveUserDataStream - [KeepaliveUserDataStreamExample.java:46](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/KeepaliveUserDataStreamExample.java#L46) +[PUT /eapi/v1/listenKey](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/user-data-streams#keepalive-user-data-stream) - keepaliveUserDataStream - [KeepaliveUserDataStreamExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/KeepaliveUserDataStreamExample.java#L36) -[POST /eapi/v1/listenKey](https://developers.binance.com/docs/derivatives/options-trading/user-data-streams/Start-User-Data-Stream) - startUserDataStream - [StartUserDataStreamExample.java:49](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/StartUserDataStreamExample.java#L49) +[POST /eapi/v1/listenKey](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/user-data-streams#start-user-data-stream) - startUserDataStream - [StartUserDataStreamExample.java:39](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/StartUserDataStreamExample.java#L39) diff --git a/clients/derivatives-trading-options/example_websocket_stream.md b/clients/derivatives-trading-options/example_websocket_stream.md index 2e1f8a461..e8b94d304 100644 --- a/clients/derivatives-trading-options/example_websocket_stream.md +++ b/clients/derivatives-trading-options/example_websocket_stream.md @@ -1,24 +1,24 @@ ## Market -[!index@arr](https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Index-Price-Streams) - indexPriceStreams - [IndexPriceStreamsExample.java:43](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/IndexPriceStreamsExample.java#L43) +[!index@arr](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/market#index-price-streams) - indexPriceStreams - [IndexPriceStreamsExample.java:31](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/IndexPriceStreamsExample.java#L31) -[@kline_](https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Kline-Candlestick-Streams) - klineCandlestickStreams - [KlineCandlestickStreamsExample.java:44](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/KlineCandlestickStreamsExample.java#L44) +[@kline_](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/market#kline-candlestick-streams) - klineCandlestickStreams - [KlineCandlestickStreamsExample.java:32](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/KlineCandlestickStreamsExample.java#L32) -[@optionMarkPrice](https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Mark-Price) - markPrice - [MarkPriceExample.java:45](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/MarkPriceExample.java#L45) +[!optionSymbol](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/market#new-symbol-info) - newSymbolInfo - [NewSymbolInfoExample.java:31](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/NewSymbolInfoExample.java#L31) -[!optionSymbol](https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/New-Symbol-Info) - newSymbolInfo - [NewSymbolInfoExample.java:43](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/NewSymbolInfoExample.java#L43) +[@openInterest@](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/market#open-interest) - openInterest - [OpenInterestExample.java:33](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OpenInterestExample.java#L33) -[underlying@optionOpenInterest@](https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Open-Interest) - openInterest - [OpenInterestExample.java:45](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OpenInterestExample.java#L45) +[@optionMarkPrice](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/market#option-mark-price) - optionMarkPrice - [OptionMarkPriceExample.java:33](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OptionMarkPriceExample.java#L33) ## Public -[@depth@](https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Diff-Book-Depth-Streams) - diffBookDepthStreams - [DiffBookDepthStreamsExample.java:44](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/DiffBookDepthStreamsExample.java#L44) +[@depth@](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/public#diff-book-depth-streams) - diffBookDepthStreams - [DiffBookDepthStreamsExample.java:32](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/DiffBookDepthStreamsExample.java#L32) -[@bookTicker](https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Individual-Symbol-Book-Ticker-Streams) - individualSymbolBookTickerStreams - [IndividualSymbolBookTickerStreamsExample.java:44](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/IndividualSymbolBookTickerStreamsExample.java#L44) +[@optionTicker](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/public#hour24-ticker) - hour24Ticker - [Hour24TickerExample.java:32](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/Hour24TickerExample.java#L32) -[@depth@](https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Partial-Book-Depth-Streams) - partialBookDepthStreams - [PartialBookDepthStreamsExample.java:44](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/PartialBookDepthStreamsExample.java#L44) +[@bookTicker](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/public#individual-symbol-book-ticker-streams) - individualSymbolBookTickerStreams - [IndividualSymbolBookTickerStreamsExample.java:32](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/IndividualSymbolBookTickerStreamsExample.java#L32) -[@optionTicker](https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/24-hour-TICKER) - ticker24Hour - [Ticker24HourExample.java:44](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/Ticker24HourExample.java#L44) +[@depth@](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/public#partial-book-depth-streams) - partialBookDepthStreams - [PartialBookDepthStreamsExample.java:32](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/PartialBookDepthStreamsExample.java#L32) -[@optionTrade](https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Trade-Streams) - tradeStreams - [TradeStreamsExample.java:45](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/TradeStreamsExample.java#L45) +[@optionTrade](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/public#trade-streams) - tradeStreams - [TradeStreamsExample.java:33](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/TradeStreamsExample.java#L33) diff --git a/clients/derivatives-trading-options/pom.xml b/clients/derivatives-trading-options/pom.xml index c7a619521..9fbcaec6b 100644 --- a/clients/derivatives-trading-options/pom.xml +++ b/clients/derivatives-trading-options/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-derivatives-trading-options derivatives-trading-options - 8.0.0 + 9.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/JSON.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/JSON.java index 5a1adff5b..7623d40db 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/JSON.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -211,16 +211,19 @@ private static Class getClassByDiscriminator( .IndexPriceResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.rest.model - .KlineCandlestickDataResponse.CustomTypeAdapterFactory()); + .KlineCandlestickDataItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.rest.model - .KlineCandlestickDataResponseItem.CustomTypeAdapterFactory()); + .KlineCandlestickDataItemInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.rest.model - .KlineCandlestickDataResponseItemInner.CustomTypeAdapterFactory()); + .KlineCandlestickDataResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.rest.model.Legs .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_options.rest.model.LegsInner + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.rest.model .NewBlockTradeOrderRequest.CustomTypeAdapterFactory()); @@ -265,12 +268,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.rest.model .OrderBookResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_options.rest.model - .OrderBookResponseAsksItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_options.rest.model - .OrderBookResponseBidsItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.rest.model.OrderIds .CustomTypeAdapterFactory()); @@ -355,6 +352,12 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.rest.model .Ticker24hrPriceChangeStatisticsResponseInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_options.rest.model + .TradfiOptionsContractRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_options.rest.model + .TradfiOptionsContractResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.rest.model .UserCommissionResponse.CustomTypeAdapterFactory()); diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/AccountApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/AccountApi.java index 09c1a8c47..b2eb0b2d8 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/AccountApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/AccountApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -20,6 +20,7 @@ import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.exception.ConstraintViolationException; import com.binance.connector.client.derivatives_trading_options.rest.model.AccountFundingFlowResponse; +import com.binance.connector.client.derivatives_trading_options.rest.model.Currency; import com.binance.connector.client.derivatives_trading_options.rest.model.OptionMarginAccountInformationResponse; import com.google.gson.reflect.TypeToken; import jakarta.validation.ConstraintViolation; @@ -43,7 +44,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/8.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -85,11 +86,11 @@ public void setCustomBaseUrl(String customBaseUrl) { * * @param currency Asset type, only support USDT as of now (required) * @param recordId Return the recordId and subsequent data, the latest data is returned by - * default, e.g 100000 (optional) + * default (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) - * @param recvWindow (optional) + * @param limit Number of result sets returned (optional) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -100,11 +101,11 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/account#account-funding-flow">Account * Funding Flow (USER_DATA) Documentation */ private okhttp3.Call accountFundingFlowCall( - String currency, + Currency currency, Long recordId, Long startTime, Long endTime, @@ -191,7 +192,7 @@ private okhttp3.Call accountFundingFlowCall( @SuppressWarnings("rawtypes") private okhttp3.Call accountFundingFlowValidateBeforeCall( - String currency, + Currency currency, Long recordId, Long startTime, Long endTime, @@ -212,7 +213,7 @@ private okhttp3.Call accountFundingFlowValidateBeforeCall( this.getClass() .getMethod( "accountFundingFlow", - String.class, + Currency.class, Long.class, Long.class, Long.class, @@ -237,16 +238,16 @@ private okhttp3.Call accountFundingFlowValidateBeforeCall( } /** - * Account Funding Flow (USER_DATA) Query account funding flows. * Only support querying data in - * the past 3 months Weight: 1 + * Account Funding Flow (USER_DATA) Query account funding flows. Weight(IP): 1 Security Type: + * USER_DATA Notes: - Only support querying data in the past 3 months * * @param currency Asset type, only support USDT as of now (required) * @param recordId Return the recordId and subsequent data, the latest data is returned by - * default, e.g 100000 (optional) + * default (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) - * @param recvWindow (optional) + * @param limit Number of result sets returned (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<AccountFundingFlowResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -258,15 +259,15 @@ private okhttp3.Call accountFundingFlowValidateBeforeCall( * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/account#account-funding-flow">Account * Funding Flow (USER_DATA) Documentation */ public ApiResponse accountFundingFlow( - @NotNull String currency, + @NotNull Currency currency, Long recordId, Long startTime, Long endTime, - Long limit, + @Max(1000L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -280,7 +281,7 @@ public ApiResponse accountFundingFlow( /** * Build call for optionMarginAccountInformation * - * @param recvWindow (optional) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -291,7 +292,7 @@ public ApiResponse accountFundingFlow( * * * @see Option + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/account#option-margin-account-information">Option * Margin Account Information (USER_DATA) Documentation */ private okhttp3.Call optionMarginAccountInformationCall(Long recvWindow) throws ApiException { @@ -385,9 +386,10 @@ private okhttp3.Call optionMarginAccountInformationValidateBeforeCall(Long recvW } /** - * Option Margin Account Information (USER_DATA) Get current account information. Weight: 3 + * Option Margin Account Information (USER_DATA) Get current account information. Weight(IP): 3 + * Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<OptionMarginAccountInformationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -399,7 +401,7 @@ private okhttp3.Call optionMarginAccountInformationValidateBeforeCall(Long recvW * * * @see Option + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/account#option-margin-account-information">Option * Margin Account Information (USER_DATA) Documentation */ public ApiResponse optionMarginAccountInformation( diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/DerivativesTradingOptionsRestApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/DerivativesTradingOptionsRestApi.java index d1fa8477f..87471e42f 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/DerivativesTradingOptionsRestApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/DerivativesTradingOptionsRestApi.java @@ -18,6 +18,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.model.CancelOptionOrderResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.CheckServerTimeResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.ClientOrderIds; +import com.binance.connector.client.derivatives_trading_options.rest.model.Currency; import com.binance.connector.client.derivatives_trading_options.rest.model.ExchangeInformationResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.ExtendBlockTradeOrderRequest; import com.binance.connector.client.derivatives_trading_options.rest.model.ExtendBlockTradeOrderResponse; @@ -25,6 +26,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.model.GetMarketMakerProtectionConfigResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.HistoricalExerciseRecordsResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.IndexPriceResponse; +import com.binance.connector.client.derivatives_trading_options.rest.model.Interval; import com.binance.connector.client.derivatives_trading_options.rest.model.KlineCandlestickDataResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.NewBlockTradeOrderRequest; import com.binance.connector.client.derivatives_trading_options.rest.model.NewBlockTradeOrderResponse; @@ -53,6 +55,8 @@ import com.binance.connector.client.derivatives_trading_options.rest.model.SetMarketMakerProtectionConfigResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.StartUserDataStreamResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.Ticker24hrPriceChangeStatisticsResponse; +import com.binance.connector.client.derivatives_trading_options.rest.model.TradfiOptionsContractRequest; +import com.binance.connector.client.derivatives_trading_options.rest.model.TradfiOptionsContractResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.UserCommissionResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.UserExerciseRecordResponse; @@ -79,16 +83,16 @@ public DerivativesTradingOptionsRestApi(ApiClient apiClient) { } /** - * Account Funding Flow (USER_DATA) Query account funding flows. * Only support querying data in - * the past 3 months Weight: 1 + * Account Funding Flow (USER_DATA) Query account funding flows. Weight(IP): 1 Security Type: + * USER_DATA Notes: - Only support querying data in the past 3 months * * @param currency Asset type, only support USDT as of now (required) * @param recordId Return the recordId and subsequent data, the latest data is returned by - * default, e.g 100000 (optional) + * default (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) - * @param recvWindow (optional) + * @param limit Number of result sets returned (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<AccountFundingFlowResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -100,11 +104,11 @@ public DerivativesTradingOptionsRestApi(ApiClient apiClient) { * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/account#account-funding-flow">Account * Funding Flow (USER_DATA) Documentation */ public ApiResponse accountFundingFlow( - String currency, + Currency currency, Long recordId, Long startTime, Long endTime, @@ -116,9 +120,10 @@ public ApiResponse accountFundingFlow( } /** - * Option Margin Account Information (USER_DATA) Get current account information. Weight: 3 + * Option Margin Account Information (USER_DATA) Get current account information. Weight(IP): 3 + * Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<OptionMarginAccountInformationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -130,7 +135,7 @@ public ApiResponse accountFundingFlow( * * * @see Option + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/account#option-margin-account-information">Option * Margin Account Information (USER_DATA) Documentation */ public ApiResponse optionMarginAccountInformation( @@ -139,8 +144,8 @@ public ApiResponse optionMarginAccountIn } /** - * Check Server Time Test connectivity to the Rest API and get the current server time. Weight: - * 1 + * Check Server Time Test connectivity to the Rest API and get the current server time. + * Weight(IP): 1 * * @return ApiResponse<CheckServerTimeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -153,7 +158,7 @@ public ApiResponse optionMarginAccountIn * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#check-server-time">Check * Server Time Documentation */ public ApiResponse checkServerTime() throws ApiException { @@ -161,7 +166,7 @@ public ApiResponse checkServerTime() throws ApiExceptio } /** - * Exchange Information Current exchange trading rules and symbol information Weight: 1 + * Exchange Information Current exchange trading rules and symbol information Weight(IP): 1 * * @return ApiResponse<ExchangeInformationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -174,7 +179,7 @@ public ApiResponse checkServerTime() throws ApiExceptio * * * @see Exchange + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#exchange-information">Exchange * Information Documentation */ public ApiResponse exchangeInformation() throws ApiException { @@ -183,12 +188,12 @@ public ApiResponse exchangeInformation() throws Api /** * Historical Exercise Records Get historical exercise records. * REALISTIC_VALUE_STRICKEN -> - * Exercised * EXTRINSIC_VALUE_EXPIRED -> Expired OTM Weight: 3 + * Exercised * EXTRINSIC_VALUE_EXPIRED -> Expired OTM Weight(IP): 3 * - * @param underlying underlying, e.g BTCUSDT (optional) + * @param underlying Underlying asset. (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) + * @param limit Number of result sets returned (optional) * @return ApiResponse<HistoricalExerciseRecordsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -200,7 +205,7 @@ public ApiResponse exchangeInformation() throws Api * * * @see Historical + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#historical-exercise-records">Historical * Exercise Records Documentation */ public ApiResponse historicalExerciseRecords( @@ -209,9 +214,9 @@ public ApiResponse historicalExerciseRecords( } /** - * Index Price Get spot index price for option underlying. Weight: 1 + * Index Price Get spot index price for option underlying. Weight(IP): 1 * - * @param underlying Option underlying, e.g BTCUSDT (required) + * @param underlying Underlying asset. (required) * @return ApiResponse<IndexPriceResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -223,7 +228,7 @@ public ApiResponse historicalExerciseRecords( * * * @see Index + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#index-price">Index * Price Documentation */ public ApiResponse indexPrice(String underlying) throws ApiException { @@ -232,14 +237,14 @@ public ApiResponse indexPrice(String underlying) throws ApiE /** * Kline/Candlestick Data Kline/candlestick bars for an option symbol. Klines are uniquely - * identified by their open time. * If startTime and endTime are not sent, the most recent - * klines are returned. Weight: 1 + * identified by their open time. Weight(IP): 1 Notes: - If startTime and endTime are not sent, + * the most recent klines are returned. * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) + * @param symbol Option trading pair (required) * @param interval Time interval (required) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) + * @param limit Number of result sets returned (optional) * @return ApiResponse<KlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -251,21 +256,21 @@ public ApiResponse indexPrice(String underlying) throws ApiE * * * @see Kline/Candlestick + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#kline-candlestick-data">Kline/Candlestick * Data Documentation */ public ApiResponse klineCandlestickData( - String symbol, String interval, Long startTime, Long endTime, Long limit) + String symbol, Interval interval, Long startTime, Long endTime, Long limit) throws ApiException { return marketDataApi.klineCandlestickData(symbol, interval, startTime, endTime, limit); } /** * Open Interest Get open interest for specific underlying asset on specific expiration date. - * Weight: 0 + * Weight(IP): 0 * - * @param underlyingAsset underlying asset, e.g ETH/BTC (required) - * @param expiration expiration date, e.g 221225 (required) + * @param underlyingAsset Underlying asset. (required) + * @param expiration expiration date (required) * @return ApiResponse<OpenInterestResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -277,7 +282,7 @@ public ApiResponse klineCandlestickData( * * * @see Open + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#open-interest">Open * Interest Documentation */ public ApiResponse openInterest(String underlyingAsset, String expiration) @@ -286,9 +291,9 @@ public ApiResponse openInterest(String underlyingAsset, St } /** - * Option Mark Price Option mark price and greek info. Weight: 5 + * Option Mark Price Option mark price and greek info. Weight(IP): 5 * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) + * @param symbol Option trading pair (optional) * @return ApiResponse<OptionMarkPriceResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -300,7 +305,7 @@ public ApiResponse openInterest(String underlyingAsset, St * * * @see Option + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#option-mark-price">Option * Mark Price Documentation */ public ApiResponse optionMarkPrice(String symbol) throws ApiException { @@ -311,8 +316,8 @@ public ApiResponse optionMarkPrice(String symbol) throw * Order Book Check orderbook depth on specific symbol Weight: limit | weight ------------ | * ------------ 5, 10, 20, 50 | 1 100 | 5 500 | 10 1000 | 20 * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) + * @param symbol Option trading pair (required) + * @param limit Default:100 Max:1000.Optional value:[10, 20, 50, 100, 500, 1000] (optional) * @return ApiResponse<OrderBookResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -324,7 +329,7 @@ public ApiResponse optionMarkPrice(String symbol) throw * * * @see Order + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#order-book">Order * Book Documentation */ public ApiResponse orderBook(String symbol, Long limit) throws ApiException { @@ -332,10 +337,10 @@ public ApiResponse orderBook(String symbol, Long limit) throw } /** - * Recent Block Trades List Get recent block trades Weight: 5 + * Recent Block Trades List Get recent block trades Weight(IP): 5 * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) + * @param symbol Option trading pair (optional) + * @param limit Number of records (optional) * @return ApiResponse<RecentBlockTradesListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -347,7 +352,7 @@ public ApiResponse orderBook(String symbol, Long limit) throw * * * @see Recent + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#recent-block-trades-list">Recent * Block Trades List Documentation */ public ApiResponse recentBlockTradesList( @@ -356,10 +361,10 @@ public ApiResponse recentBlockTradesList( } /** - * Recent Trades List Get recent market trades Weight: 5 + * Recent Trades List Get recent market trades Weight(IP): 5 * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) + * @param symbol Option trading pair (required) + * @param limit Number of result sets returned (optional) * @return ApiResponse<RecentTradesListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -371,7 +376,7 @@ public ApiResponse recentBlockTradesList( * * * @see Recent + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#recent-trades-list">Recent * Trades List Documentation */ public ApiResponse recentTradesList(String symbol, Long limit) @@ -380,7 +385,7 @@ public ApiResponse recentTradesList(String symbol, Lon } /** - * Test Connectivity Test connectivity to the Rest API. Weight: 1 + * Test Connectivity Test connectivity to the Rest API. Weight(IP): 1 * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -393,7 +398,7 @@ public ApiResponse recentTradesList(String symbol, Lon * * * @see Test + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#test-connectivity">Test * Connectivity Documentation */ public void testConnectivity() throws ApiException { @@ -401,9 +406,10 @@ public void testConnectivity() throws ApiException { } /** - * 24hr Ticker Price Change Statistics 24 hour rolling window price change statistics. Weight: 5 + * 24hr Ticker Price Change Statistics 24 hour rolling window price change statistics. Weight: 1 + * for a single symbol; 40 when the symbol parameter is omitted * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) + * @param symbol Option trading pair (optional) * @return ApiResponse<Ticker24hrPriceChangeStatisticsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -415,7 +421,7 @@ public void testConnectivity() throws ApiException { * * * @see 24hr + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#ticker24hr-price-change-statistics">24hr * Ticker Price Change Statistics Documentation */ public ApiResponse ticker24hrPriceChangeStatistics( @@ -424,7 +430,8 @@ public ApiResponse ticker24hrPriceChang } /** - * Accept Block Trade Order (TRADE) Accept a block trade order Weight: 5 + * Accept Block Trade Order (TRADE) Accept a block trade order Weight(IP): 5 Security Type: + * TRADE * * @param acceptBlockTradeOrderRequest (required) * @return ApiResponse<AcceptBlockTradeOrderResponse> @@ -438,7 +445,7 @@ public ApiResponse ticker24hrPriceChang * * * @see Accept + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#accept-block-trade-order">Accept * Block Trade Order (TRADE) Documentation */ public ApiResponse acceptBlockTradeOrder( @@ -447,12 +454,13 @@ public ApiResponse acceptBlockTradeOrder( } /** - * Account Block Trade List (USER_DATA) Gets block trades for a specific account. Weight: 5 + * Account Block Trade List (USER_DATA) Gets block trades for a specific account. Weight(IP): 5 + * Security Type: USER_DATA * * @param endTime End Time, e.g 1593512200000 (optional) * @param startTime Start Time, e.g 1593511200000 (optional) - * @param underlying underlying, e.g BTCUSDT (optional) - * @param recvWindow (optional) + * @param underlying Underlying asset. (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<AccountBlockTradeListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -464,7 +472,7 @@ public ApiResponse acceptBlockTradeOrder( * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#account-block-trade-list">Account * Block Trade List (USER_DATA) Documentation */ public ApiResponse accountBlockTradeList( @@ -474,10 +482,11 @@ public ApiResponse accountBlockTradeList( } /** - * Cancel Block Trade Order (TRADE) Cancel a block trade order. Weight: 5 + * Cancel Block Trade Order (TRADE) Cancel a block trade order. Weight(IP): 5 Security Type: + * TRADE * - * @param blockOrderMatchingKey (required) - * @param recvWindow (optional) + * @param blockOrderMatchingKey Block trade matching key. (required) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -489,7 +498,7 @@ public ApiResponse accountBlockTradeList( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#cancel-block-trade-order">Cancel * Block Trade Order (TRADE) Documentation */ public void cancelBlockTradeOrder(String blockOrderMatchingKey, Long recvWindow) @@ -499,7 +508,7 @@ public void cancelBlockTradeOrder(String blockOrderMatchingKey, Long recvWindow) /** * Extend Block Trade Order (TRADE) Extends a block trade expire time by 30 mins from the - * current time. Weight: 5 + * current time. Weight(IP): 5 Security Type: TRADE * * @param extendBlockTradeOrderRequest (required) * @return ApiResponse<ExtendBlockTradeOrderResponse> @@ -513,7 +522,7 @@ public void cancelBlockTradeOrder(String blockOrderMatchingKey, Long recvWindow) * * * @see Extend + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#extend-block-trade-order">Extend * Block Trade Order (TRADE) Documentation */ public ApiResponse extendBlockTradeOrder( @@ -522,7 +531,8 @@ public ApiResponse extendBlockTradeOrder( } /** - * New Block Trade Order (TRADE) Send in a new block trade order. Weight: 5 + * New Block Trade Order (TRADE) Send in a new block trade order. Weight(IP): 5 Security Type: + * TRADE * * @param newBlockTradeOrderRequest (required) * @return ApiResponse<NewBlockTradeOrderResponse> @@ -536,7 +546,7 @@ public ApiResponse extendBlockTradeOrder( * * * @see New + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#new-block-trade-order">New * Block Trade Order (TRADE) Documentation */ public ApiResponse newBlockTradeOrder( @@ -546,10 +556,10 @@ public ApiResponse newBlockTradeOrder( /** * Query Block Trade Details (USER_DATA) Query block trade details; returns block trade details - * from counterparty's perspective. Weight: 5 + * from counterparty's perspective. Weight(IP): 5 Security Type: USER_DATA * - * @param blockOrderMatchingKey (required) - * @param recvWindow (optional) + * @param blockOrderMatchingKey Block trade matching key. (required) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<QueryBlockTradeDetailsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -561,7 +571,7 @@ public ApiResponse newBlockTradeOrder( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#query-block-trade-details">Query * Block Trade Details (USER_DATA) Documentation */ public ApiResponse queryBlockTradeDetails( @@ -570,14 +580,15 @@ public ApiResponse queryBlockTradeDetails( } /** - * Query Block Trade Order (TRADE) Check block trade order status. Weight: 5 + * Query Block Trade Order (TRADE) Check block trade order status. Weight(IP): 5 Security Type: + * TRADE * * @param blockOrderMatchingKey If specified, returns the specific block trade associated with * the blockOrderMatchingKey (optional) * @param endTime End Time, e.g 1593512200000 (optional) * @param startTime Start Time, e.g 1593511200000 (optional) - * @param underlying underlying, e.g BTCUSDT (optional) - * @param recvWindow (optional) + * @param underlying Underlying asset. (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<QueryBlockTradeOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -589,7 +600,7 @@ public ApiResponse queryBlockTradeDetails( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#query-block-trade-order">Query * Block Trade Order (TRADE) Documentation */ public ApiResponse queryBlockTradeOrder( @@ -607,9 +618,9 @@ public ApiResponse queryBlockTradeOrder( * Auto-Cancel All Open Orders (Kill-Switch) Heartbeat (TRADE) This endpoint resets the time * from which the countdown will begin to the time this messaged is received. It should be * called repeatedly as heartbeats. Multiple heartbeats can be updated at once by specifying the - * underlying symbols as a list (ex. BTCUSDT,ETHUSDT) in the underlyings parameter. * The - * response will only include underlying symbols where the heartbeat has been successfully - * updated. Weight: 10 + * underlying symbols as a list (ex. BTCUSDT,ETHUSDT) in the underlyings parameter. Weight(IP): + * 10 Security Type: TRADE Notes: - The response will only include underlying symbols where the + * heartbeat has been successfully updated. * * @param autoCancelAllOpenOrdersRequest (required) * @return ApiResponse<AutoCancelAllOpenOrdersResponse> @@ -623,7 +634,7 @@ public ApiResponse queryBlockTradeOrder( * * * @see Auto-Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#auto-cancel-all-open-orders">Auto-Cancel * All Open Orders (Kill-Switch) Heartbeat (TRADE) Documentation */ public ApiResponse autoCancelAllOpenOrders( @@ -636,10 +647,11 @@ public ApiResponse autoCancelAllOpenOrders( * auto-cancel parameters for each underlying symbol. Note only active auto-cancel parameters * will be returned, if countdownTime is set to 0 (ie. countdownTime has been turned off), the * underlying symbol and corresponding countdownTime parameter will not be returned in the - * response. * countdownTime = 0 means the function is disabled. Weight: 1 + * response. Weight(IP): 1 Security Type: TRADE Notes: - countdownTime = 0 means the + * function is disabled. * - * @param underlying underlying, e.g BTCUSDT (optional) - * @param recvWindow (optional) + * @param underlying Underlying asset. (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<GetAutoCancelAllOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -651,7 +663,7 @@ public ApiResponse autoCancelAllOpenOrders( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#get-auto-cancel-all-open-orders">Get * Auto-Cancel All Open Orders (Kill-Switch) Config (TRADE) Documentation */ public ApiResponse getAutoCancelAllOpenOrders( @@ -660,10 +672,11 @@ public ApiResponse getAutoCancelAllOpenOrder } /** - * Get Market Maker Protection Config (TRADE) Get config for MMP. Weight: 1 + * Get Market Maker Protection Config (TRADE) Get config for MMP. Weight(IP): 1 Security Type: + * TRADE * - * @param underlying underlying, e.g BTCUSDT (optional) - * @param recvWindow (optional) + * @param underlying Underlying asset. (required) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<GetMarketMakerProtectionConfigResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -675,7 +688,7 @@ public ApiResponse getAutoCancelAllOpenOrder * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#get-market-maker-protection-config">Get * Market Maker Protection Config (TRADE) Documentation */ public ApiResponse getMarketMakerProtectionConfig( @@ -684,7 +697,8 @@ public ApiResponse getMarketMakerProtect } /** - * Reset Market Maker Protection Config (TRADE) Reset MMP, start MMP order again. Weight: 1 + * Reset Market Maker Protection Config (TRADE) Reset MMP, start MMP order again. Weight(IP): 1 + * Security Type: TRADE * * @param resetMarketMakerProtectionConfigRequest (required) * @return ApiResponse<ResetMarketMakerProtectionConfigResponse> @@ -698,7 +712,7 @@ public ApiResponse getMarketMakerProtect * * * @see Reset + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#reset-market-maker-protection-config">Reset * Market Maker Protection Config (TRADE) Documentation */ public ApiResponse resetMarketMakerProtectionConfig( @@ -715,15 +729,16 @@ public ApiResponse resetMarketMakerPro * of the specified countdown time period if no heartbeat message is sent. After the countdown * time period, all open orders will be cancelled and new orders will be rejected with error * code -2010 until either a heartbeat message is sent or the auto-cancel feature is turned off - * by setting countdownTime to 0. * This rest endpoint sets up the parameters to cancel your - * open orders in case of an outage or disconnection. * Example usage: Call this endpoint with a - * countdownTime value of 10000 (10 seconds) to turn on the auto-cancel feature. If the - * corresponding countdownCancelAllHeartBeat endpoint is not called within 10 seconds with the - * specified underlying symbol, all open orders of the specified symbol will be automatically - * canceled. If this endpoint is called with an countdownTime of 0, the countdown timer will be - * stopped. * The system will check all countdowns approximately every 100 milliseconds, - * **please note that sufficient redundancy should be considered when using this function**. We - * do not recommend setting the countdown time to be too precise or too small. Weight: 1 + * by setting countdownTime to 0. Weight(IP): 1 Security Type: TRADE Notes: - This rest endpoint + * sets up the parameters to cancel your open orders in case of an outage or disconnection. - + * Example usage: > Call this endpoint with a countdownTime value of 10000 (10 seconds) to + * turn on the auto-cancel feature. If the corresponding countdownCancelAllHeartBeat endpoint is + * not called within 10 seconds with the specified underlying symbol, all open orders of the + * specified symbol will be automatically canceled. If this endpoint is called with an + * countdownTime of 0, the countdown timer will be stopped. - The system will check all + * countdowns approximately every 100 milliseconds, **please note that sufficient redundancy + * should be considered when using this function**. We do not recommend setting the countdown + * time to be too precise or too small. * * @param setAutoCancelAllOpenOrdersRequest (required) * @return ApiResponse<SetAutoCancelAllOpenOrdersResponse> @@ -737,7 +752,7 @@ public ApiResponse resetMarketMakerPro * * * @see Set + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#set-auto-cancel-all-open-orders">Set * Auto-Cancel All Open Orders (Kill-Switch) Config (TRADE) Documentation */ public ApiResponse setAutoCancelAllOpenOrders( @@ -753,7 +768,7 @@ public ApiResponse setAutoCancelAllOpenOrder * mass trading in short period time. Once market maker's account branches the threshold, * the Market Maker Protection will be triggered. When Market Maker Protection triggers, all the * current MMP orders will be canceled, new MMP orders will be rejected. Market maker can use - * this time to reevaluate market and modify order price. Weight: 1 + * this time to reevaluate market and modify order price. Weight(IP): 1 Security Type: TRADE * * @param setMarketMakerProtectionConfigRequest (required) * @return ApiResponse<SetMarketMakerProtectionConfigResponse> @@ -767,7 +782,7 @@ public ApiResponse setAutoCancelAllOpenOrder * * * @see Set + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#set-market-maker-protection-config">Set * Market Maker Protection Config (TRADE) Documentation */ public ApiResponse setMarketMakerProtectionConfig( @@ -778,16 +793,16 @@ public ApiResponse setMarketMakerProtect } /** - * Account Trade List (USER_DATA) Get trades for a specific account and symbol. * Only support - * querying trades in the past 3 months Weight: 5 + * Account Trade List (USER_DATA) Get trades for a specific account and symbol. Weight(IP): 5 + * Security Type: USER_DATA * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) + * @param symbol Option trading pair. (required) * @param fromId Trade id to fetch from. Default gets most recent trades, e.g * 4611875134427365376 (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) - * @param recvWindow (optional) + * @param limit Number of result sets returned. (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<AccountTradeListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -799,7 +814,7 @@ public ApiResponse setMarketMakerProtect * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#account-trade-list">Account * Trade List (USER_DATA) Documentation */ public ApiResponse accountTradeList( @@ -810,10 +825,10 @@ public ApiResponse accountTradeList( /** * Cancel All Option Orders By Underlying (TRADE) Cancel all active orders on specified - * underlying. Weight: 1 + * underlying. Weight(IP): 5 Security Type: TRADE * - * @param underlying Option underlying, e.g BTCUSDT (required) - * @param recvWindow (optional) + * @param underlying Underlying asset. (required) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<CancelAllOptionOrdersByUnderlyingResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -825,7 +840,7 @@ public ApiResponse accountTradeList( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#cancel-all-option-orders-by-underlying">Cancel * All Option Orders By Underlying (TRADE) Documentation */ public ApiResponse cancelAllOptionOrdersByUnderlying( @@ -835,10 +850,10 @@ public ApiResponse cancelAllOptionOrd /** * Cancel all Option orders on specific symbol (TRADE) Cancel all active order on a symbol. - * Weight: 5 + * Weight(IP): 1 Security Type: TRADE * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param recvWindow (optional) + * @param symbol Option trading pair. (required) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<CancelAllOptionOrdersOnSpecificSymbolResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -850,7 +865,7 @@ public ApiResponse cancelAllOptionOrd * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#cancel-all-option-orders-on-specific-symbol">Cancel * all Option orders on specific symbol (TRADE) Documentation */ public ApiResponse @@ -860,14 +875,14 @@ public ApiResponse cancelAllOptionOrd } /** - * Cancel Multiple Option Orders (TRADE) Cancel multiple orders. * At least one instance of - * `orderId` and `clientOrderId` must be sent. Weight: 1 - * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param orderIds Order ID, e.g [4611875134427365377,4611875134427365378] (optional) - * @param clientOrderIds User-defined order ID, e.g - * [\"my_id_1\",\"my_id_2\"] (optional) - * @param recvWindow (optional) + * Cancel Multiple Option Orders (TRADE) Cancel multiple orders. Weight(IP): 5 Security Type: + * TRADE Notes: - At least one instance of `orderId` and `clientOrderId` + * must be sent. + * + * @param symbol Option trading pair. (required) + * @param orderIds Order ID list. (optional) + * @param clientOrderIds Client order ID list. (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<CancelMultipleOptionOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -879,7 +894,7 @@ public ApiResponse cancelAllOptionOrd * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#cancel-multiple-option-orders">Cancel * Multiple Option Orders (TRADE) Documentation */ public ApiResponse cancelMultipleOptionOrders( @@ -889,13 +904,13 @@ public ApiResponse cancelMultipleOptionOrder } /** - * Cancel Option Order (TRADE) Cancel an active order. * At least one instance of - * `orderId` and `clientOrderId` must be sent. Weight: 1 + * Cancel Option Order (TRADE) Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: + * - At least one instance of `orderId` and `clientOrderId` must be sent. * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param orderId Order ID, e.g 4611875134427365377 (optional) - * @param clientOrderId User-defined order ID, e.g 10000 (optional) - * @param recvWindow (optional) + * @param symbol Option trading pair. (required) + * @param orderId Order ID. (optional) + * @param clientOrderId clientOrderId (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<CancelOptionOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -907,7 +922,7 @@ public ApiResponse cancelMultipleOptionOrder * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#cancel-option-order">Cancel * Option Order (TRADE) Documentation */ public ApiResponse cancelOptionOrder( @@ -917,7 +932,9 @@ public ApiResponse cancelOptionOrder( } /** - * New Order (TRADE) Send a new order. Weight: 0 + * New Order (TRADE) Send a new order. Weight(IP): 0 Security Type: TRADE Notes: Some parameters + * are mandatory depending on the order type as follows: Type | Mandatory parameters + * ------------ | ------------ LIMIT | timeInForce, quantity, price * * @param newOrderRequest (required) * @return ApiResponse<NewOrderResponse> @@ -931,7 +948,7 @@ public ApiResponse cancelOptionOrder( * * * @see New + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#new-order">New * Order (TRADE) Documentation */ public ApiResponse newOrder(NewOrderRequest newOrderRequest) @@ -940,10 +957,11 @@ public ApiResponse newOrder(NewOrderRequest newOrderRequest) } /** - * Option Position Information (USER_DATA) Get current position information. Weight: 5 + * Option Position Information (USER_DATA) Get current position information. Weight(IP): 5 + * Security Type: USER_DATA * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) - * @param recvWindow (optional) + * @param symbol Option trading pair. (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<OptionPositionInformationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -955,7 +973,7 @@ public ApiResponse newOrder(NewOrderRequest newOrderRequest) * * * @see Option + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#option-position-information">Option * Position Information (USER_DATA) Documentation */ public ApiResponse optionPositionInformation( @@ -964,9 +982,11 @@ public ApiResponse optionPositionInformation( } /** - * Place Multiple Orders(TRADE) Send multiple option orders. * Parameter rules are same with New - * Order * Batch orders are processed concurrently, and the order of matching is not guaranteed. - * Weight: 5 + * Place Multiple Orders (TRADE) Send multiple option orders. Weight(IP): 5 Security Type: TRADE + * Notes: Some parameters are mandatory depending on the order type as follows: Type | Mandatory + * parameters ------------ | ------------ LIMIT | timeInForce, quantity, price - Parameter rules + * are same with New Order - Batch orders are processed concurrently, and the order of matching + * is not guaranteed. * * @param placeMultipleOrdersRequest (required) * @return ApiResponse<PlaceMultipleOrdersResponse> @@ -980,8 +1000,8 @@ public ApiResponse optionPositionInformation( * * * @see Place - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#place-multiple-orders">Place + * Multiple Orders (TRADE) Documentation */ public ApiResponse placeMultipleOrders( PlaceMultipleOrdersRequest placeMultipleOrdersRequest) throws ApiException { @@ -991,12 +1011,13 @@ public ApiResponse placeMultipleOrders( /** * Query Current Open Option Orders (USER_DATA) Query current all open orders, status: ACCEPTED * PARTIALLY_FILLED Weight: 1 for a single symbol; 40 when the symbol parameter is omitted + * Security Type: USER_DATA * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) - * @param orderId Order ID, e.g 4611875134427365377 (optional) + * @param symbol Option trading pair. (optional) + * @param orderId Order ID. (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param recvWindow (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<QueryCurrentOpenOptionOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1008,7 +1029,7 @@ public ApiResponse placeMultipleOrders( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#query-current-open-option-orders">Query * Current Open Option Orders (USER_DATA) Documentation */ public ApiResponse queryCurrentOpenOptionOrders( @@ -1020,14 +1041,14 @@ public ApiResponse queryCurrentOpenOptionO /** * Query Option Order History (TRADE) Query all finished orders within 5 days, finished status: - * CANCELLED FILLED REJECTED. Weight: 3 + * CANCELLED FILLED REJECTED. Weight(IP): 3 Security Type: TRADE * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param orderId Order ID, e.g 4611875134427365377 (optional) + * @param symbol Option trading pair. (required) + * @param orderId Order ID. (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) - * @param recvWindow (optional) + * @param limit Number of result sets returned (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<QueryOptionOrderHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1039,7 +1060,7 @@ public ApiResponse queryCurrentOpenOptionO * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#query-option-order-history">Query * Option Order History (TRADE) Documentation */ public ApiResponse queryOptionOrderHistory( @@ -1052,13 +1073,14 @@ public ApiResponse queryOptionOrderHistory( /** * Query Single Order (TRADE) Check an order status. * These orders will not be found: * order * status is `CANCELED` or `REJECTED`, **AND** * order has NO filled trade, - * **AND** * created time + 3 days < current time * Either `orderId` or - * `clientOrderId ` must be sent. Weight: 1 - * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param orderId Order ID, e.g 4611875134427365377 (optional) - * @param clientOrderId User-defined order ID, e.g 10000 (optional) - * @param recvWindow (optional) + * **AND** * created time + 3 days < current time Weight(IP): 1 Security Type: TRADE Notes: - + * Either `orderId` or `clientOrderId ` must be sent. + * + * @param symbol Option trading pair. (required) + * @param orderId Order ID. (optional) + * @param clientOrderId User-defined order ID; cannot be duplicated among open orders. + * (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<QuerySingleOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1070,7 +1092,7 @@ public ApiResponse queryOptionOrderHistory( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#query-single-order">Query * Single Order (TRADE) Documentation */ public ApiResponse querySingleOrder( @@ -1080,9 +1102,33 @@ public ApiResponse querySingleOrder( } /** - * User Commission (USER_DATA) Get account commission. Weight: 5 + * TradFi Options Contract (USER_DATA) Sign TradFi Options agreement contract Weight(IP): 50 + * Security Type: USER_DATA + * + * @param tradfiOptionsContractRequest (optional) + * @return ApiResponse<TradfiOptionsContractResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 TradFi Options Contract -
+ * + * @see TradFi + * Options Contract (USER_DATA) Documentation + */ + public ApiResponse tradfiOptionsContract( + TradfiOptionsContractRequest tradfiOptionsContractRequest) throws ApiException { + return tradeApi.tradfiOptionsContract(tradfiOptionsContractRequest); + } + + /** + * User Commission (USER_DATA) Get account commission. Weight(IP): 5 Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<UserCommissionResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1094,7 +1140,7 @@ public ApiResponse querySingleOrder( * * * @see User + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#user-commission">User * Commission (USER_DATA) Documentation */ public ApiResponse userCommission(Long recvWindow) throws ApiException { @@ -1102,13 +1148,14 @@ public ApiResponse userCommission(Long recvWindow) throw } /** - * User Exercise Record (USER_DATA) Get account exercise records. Weight: 5 + * User Exercise Record (USER_DATA) Get account exercise records. Weight(IP): 5 Security Type: + * USER_DATA * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) + * @param symbol Option trading pair. (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) - * @param recvWindow (optional) + * @param limit Number of result sets returned. (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<UserExerciseRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1120,7 +1167,7 @@ public ApiResponse userCommission(Long recvWindow) throw * * * @see User + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#user-exercise-record">User * Exercise Record (USER_DATA) Documentation */ public ApiResponse userExerciseRecord( @@ -1130,7 +1177,8 @@ public ApiResponse userExerciseRecord( } /** - * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight: 1 + * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight(IP): 1 Security + * Type: USER_STREAM * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1143,7 +1191,7 @@ public ApiResponse userExerciseRecord( * * * @see Close + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/user-data-streams#close-user-data-stream">Close * User Data Stream (USER_STREAM) Documentation */ public void closeUserDataStream() throws ApiException { @@ -1153,7 +1201,7 @@ public void closeUserDataStream() throws ApiException { /** * Keepalive User Data Stream (USER_STREAM) Keepalive a user data stream to prevent a time out. * User data streams will close after 60 minutes. It's recommended to send a ping about - * every 60 minutes. Weight: 1 + * every 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1166,7 +1214,7 @@ public void closeUserDataStream() throws ApiException { * * * @see Keepalive + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/user-data-streams#keepalive-user-data-stream">Keepalive * User Data Stream (USER_STREAM) Documentation */ public void keepaliveUserDataStream() throws ApiException { @@ -1177,7 +1225,7 @@ public void keepaliveUserDataStream() throws ApiException { * Start User Data Stream (USER_STREAM) Start a new user data stream. The stream will close * after 60 minutes unless a keepalive is sent. If the account has an active * `listenKey`, that `listenKey` will be returned and its validity will be - * extended for 60 minutes. Weight: 1 + * extended for 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * * @return ApiResponse<StartUserDataStreamResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1190,7 +1238,7 @@ public void keepaliveUserDataStream() throws ApiException { * * * @see Start + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/user-data-streams#start-user-data-stream">Start * User Data Stream (USER_STREAM) Documentation */ public ApiResponse startUserDataStream() throws ApiException { diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketDataApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketDataApi.java index 58d61eec5..bd977c3f7 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketDataApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketDataApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.model.ExchangeInformationResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.HistoricalExerciseRecordsResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.IndexPriceResponse; +import com.binance.connector.client.derivatives_trading_options.rest.model.Interval; import com.binance.connector.client.derivatives_trading_options.rest.model.KlineCandlestickDataResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.OpenInterestResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.OptionMarkPriceResponse; @@ -52,7 +53,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/8.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -102,7 +103,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#check-server-time">Check * Server Time Documentation */ private okhttp3.Call checkServerTimeCall() throws ApiException { @@ -190,8 +191,8 @@ private okhttp3.Call checkServerTimeValidateBeforeCall() throws ApiException { } /** - * Check Server Time Test connectivity to the Rest API and get the current server time. Weight: - * 1 + * Check Server Time Test connectivity to the Rest API and get the current server time. + * Weight(IP): 1 * * @return ApiResponse<CheckServerTimeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -204,7 +205,7 @@ private okhttp3.Call checkServerTimeValidateBeforeCall() throws ApiException { * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#check-server-time">Check * Server Time Documentation */ public ApiResponse checkServerTime() throws ApiException { @@ -227,7 +228,7 @@ public ApiResponse checkServerTime() throws ApiExceptio * * * @see Exchange + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#exchange-information">Exchange * Information Documentation */ private okhttp3.Call exchangeInformationCall() throws ApiException { @@ -315,7 +316,7 @@ private okhttp3.Call exchangeInformationValidateBeforeCall() throws ApiException } /** - * Exchange Information Current exchange trading rules and symbol information Weight: 1 + * Exchange Information Current exchange trading rules and symbol information Weight(IP): 1 * * @return ApiResponse<ExchangeInformationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -328,7 +329,7 @@ private okhttp3.Call exchangeInformationValidateBeforeCall() throws ApiException * * * @see Exchange + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#exchange-information">Exchange * Information Documentation */ public ApiResponse exchangeInformation() throws ApiException { @@ -341,10 +342,10 @@ public ApiResponse exchangeInformation() throws Api /** * Build call for historicalExerciseRecords * - * @param underlying underlying, e.g BTCUSDT (optional) + * @param underlying Underlying asset. (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) + * @param limit Number of result sets returned (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -355,7 +356,7 @@ public ApiResponse exchangeInformation() throws Api * * * @see Historical + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#historical-exercise-records">Historical * Exercise Records Documentation */ private okhttp3.Call historicalExerciseRecordsCall( @@ -469,12 +470,12 @@ private okhttp3.Call historicalExerciseRecordsValidateBeforeCall( /** * Historical Exercise Records Get historical exercise records. * REALISTIC_VALUE_STRICKEN -> - * Exercised * EXTRINSIC_VALUE_EXPIRED -> Expired OTM Weight: 3 + * Exercised * EXTRINSIC_VALUE_EXPIRED -> Expired OTM Weight(IP): 3 * - * @param underlying underlying, e.g BTCUSDT (optional) + * @param underlying Underlying asset. (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) + * @param limit Number of result sets returned (optional) * @return ApiResponse<HistoricalExerciseRecordsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -486,11 +487,12 @@ private okhttp3.Call historicalExerciseRecordsValidateBeforeCall( * * * @see Historical + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#historical-exercise-records">Historical * Exercise Records Documentation */ public ApiResponse historicalExerciseRecords( - String underlying, Long startTime, Long endTime, Long limit) throws ApiException { + String underlying, Long startTime, Long endTime, @Max(100L) Long limit) + throws ApiException { okhttp3.Call localVarCall = historicalExerciseRecordsValidateBeforeCall(underlying, startTime, endTime, limit); java.lang.reflect.Type localVarReturnType = @@ -501,7 +503,7 @@ public ApiResponse historicalExerciseRecords( /** * Build call for indexPrice * - * @param underlying Option underlying, e.g BTCUSDT (required) + * @param underlying Underlying asset. (required) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -512,7 +514,7 @@ public ApiResponse historicalExerciseRecords( * * * @see Index + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#index-price">Index * Price Documentation */ private okhttp3.Call indexPriceCall(String underlying) throws ApiException { @@ -604,9 +606,9 @@ private okhttp3.Call indexPriceValidateBeforeCall(String underlying) throws ApiE } /** - * Index Price Get spot index price for option underlying. Weight: 1 + * Index Price Get spot index price for option underlying. Weight(IP): 1 * - * @param underlying Option underlying, e.g BTCUSDT (required) + * @param underlying Underlying asset. (required) * @return ApiResponse<IndexPriceResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -618,7 +620,7 @@ private okhttp3.Call indexPriceValidateBeforeCall(String underlying) throws ApiE * * * @see Index + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#index-price">Index * Price Documentation */ public ApiResponse indexPrice(@NotNull String underlying) @@ -632,11 +634,11 @@ public ApiResponse indexPrice(@NotNull String underlying) /** * Build call for klineCandlestickData * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) + * @param symbol Option trading pair (required) * @param interval Time interval (required) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) + * @param limit Number of result sets returned (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -647,11 +649,11 @@ public ApiResponse indexPrice(@NotNull String underlying) * * * @see Kline/Candlestick + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#kline-candlestick-data">Kline/Candlestick * Data Documentation */ private okhttp3.Call klineCandlestickDataCall( - String symbol, String interval, Long startTime, Long endTime, Long limit) + String symbol, Interval interval, Long startTime, Long endTime, Long limit) throws ApiException { String basePath = null; // Operation Servers @@ -728,7 +730,7 @@ private okhttp3.Call klineCandlestickDataCall( @SuppressWarnings("rawtypes") private okhttp3.Call klineCandlestickDataValidateBeforeCall( - String symbol, String interval, Long startTime, Long endTime, Long limit) + String symbol, Interval interval, Long startTime, Long endTime, Long limit) throws ApiException { try { Validator validator = @@ -745,7 +747,7 @@ private okhttp3.Call klineCandlestickDataValidateBeforeCall( .getMethod( "klineCandlestickData", String.class, - String.class, + Interval.class, Long.class, Long.class, Long.class); @@ -768,14 +770,14 @@ private okhttp3.Call klineCandlestickDataValidateBeforeCall( /** * Kline/Candlestick Data Kline/candlestick bars for an option symbol. Klines are uniquely - * identified by their open time. * If startTime and endTime are not sent, the most recent - * klines are returned. Weight: 1 + * identified by their open time. Weight(IP): 1 Notes: - If startTime and endTime are not sent, + * the most recent klines are returned. * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) + * @param symbol Option trading pair (required) * @param interval Time interval (required) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) + * @param limit Number of result sets returned (optional) * @return ApiResponse<KlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -787,15 +789,15 @@ private okhttp3.Call klineCandlestickDataValidateBeforeCall( * * * @see Kline/Candlestick + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#kline-candlestick-data">Kline/Candlestick * Data Documentation */ public ApiResponse klineCandlestickData( @NotNull String symbol, - @NotNull String interval, + @NotNull Interval interval, Long startTime, Long endTime, - Long limit) + @Max(1500L) Long limit) throws ApiException { okhttp3.Call localVarCall = klineCandlestickDataValidateBeforeCall(symbol, interval, startTime, endTime, limit); @@ -807,8 +809,8 @@ public ApiResponse klineCandlestickData( /** * Build call for openInterest * - * @param underlyingAsset underlying asset, e.g ETH/BTC (required) - * @param expiration expiration date, e.g 221225 (required) + * @param underlyingAsset Underlying asset. (required) + * @param expiration expiration date (required) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -819,7 +821,7 @@ public ApiResponse klineCandlestickData( * * * @see Open + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#open-interest">Open * Interest Documentation */ private okhttp3.Call openInterestCall(String underlyingAsset, String expiration) @@ -919,10 +921,10 @@ private okhttp3.Call openInterestValidateBeforeCall(String underlyingAsset, Stri /** * Open Interest Get open interest for specific underlying asset on specific expiration date. - * Weight: 0 + * Weight(IP): 0 * - * @param underlyingAsset underlying asset, e.g ETH/BTC (required) - * @param expiration expiration date, e.g 221225 (required) + * @param underlyingAsset Underlying asset. (required) + * @param expiration expiration date (required) * @return ApiResponse<OpenInterestResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -934,7 +936,7 @@ private okhttp3.Call openInterestValidateBeforeCall(String underlyingAsset, Stri * * * @see Open + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#open-interest">Open * Interest Documentation */ public ApiResponse openInterest( @@ -948,7 +950,7 @@ public ApiResponse openInterest( /** * Build call for optionMarkPrice * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) + * @param symbol Option trading pair (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -959,7 +961,7 @@ public ApiResponse openInterest( * * * @see Option + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#option-mark-price">Option * Mark Price Documentation */ private okhttp3.Call optionMarkPriceCall(String symbol) throws ApiException { @@ -1051,9 +1053,9 @@ private okhttp3.Call optionMarkPriceValidateBeforeCall(String symbol) throws Api } /** - * Option Mark Price Option mark price and greek info. Weight: 5 + * Option Mark Price Option mark price and greek info. Weight(IP): 5 * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) + * @param symbol Option trading pair (optional) * @return ApiResponse<OptionMarkPriceResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1065,7 +1067,7 @@ private okhttp3.Call optionMarkPriceValidateBeforeCall(String symbol) throws Api * * * @see Option + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#option-mark-price">Option * Mark Price Documentation */ public ApiResponse optionMarkPrice(String symbol) throws ApiException { @@ -1078,8 +1080,8 @@ public ApiResponse optionMarkPrice(String symbol) throw /** * Build call for orderBook * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) + * @param symbol Option trading pair (required) + * @param limit Default:100 Max:1000.Optional value:[10, 20, 50, 100, 500, 1000] (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1090,7 +1092,7 @@ public ApiResponse optionMarkPrice(String symbol) throw * * * @see Order + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#order-book">Order * Book Documentation */ private okhttp3.Call orderBookCall(String symbol, Long limit) throws ApiException { @@ -1190,8 +1192,8 @@ private okhttp3.Call orderBookValidateBeforeCall(String symbol, Long limit) * Order Book Check orderbook depth on specific symbol Weight: limit | weight ------------ | * ------------ 5, 10, 20, 50 | 1 100 | 5 500 | 10 1000 | 20 * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) + * @param symbol Option trading pair (required) + * @param limit Default:100 Max:1000.Optional value:[10, 20, 50, 100, 500, 1000] (optional) * @return ApiResponse<OrderBookResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1203,10 +1205,10 @@ private okhttp3.Call orderBookValidateBeforeCall(String symbol, Long limit) * * * @see Order + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#order-book">Order * Book Documentation */ - public ApiResponse orderBook(@NotNull String symbol, Long limit) + public ApiResponse orderBook(@NotNull String symbol, @Max(1000L) Long limit) throws ApiException { okhttp3.Call localVarCall = orderBookValidateBeforeCall(symbol, limit); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -1216,8 +1218,8 @@ public ApiResponse orderBook(@NotNull String symbol, Long lim /** * Build call for recentBlockTradesList * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) + * @param symbol Option trading pair (optional) + * @param limit Number of records (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1228,7 +1230,7 @@ public ApiResponse orderBook(@NotNull String symbol, Long lim * * * @see Recent + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#recent-block-trades-list">Recent * Block Trades List Documentation */ private okhttp3.Call recentBlockTradesListCall(String symbol, Long limit) throws ApiException { @@ -1326,10 +1328,10 @@ private okhttp3.Call recentBlockTradesListValidateBeforeCall(String symbol, Long } /** - * Recent Block Trades List Get recent block trades Weight: 5 + * Recent Block Trades List Get recent block trades Weight(IP): 5 * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) + * @param symbol Option trading pair (optional) + * @param limit Number of records (optional) * @return ApiResponse<RecentBlockTradesListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1341,11 +1343,11 @@ private okhttp3.Call recentBlockTradesListValidateBeforeCall(String symbol, Long * * * @see Recent + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#recent-block-trades-list">Recent * Block Trades List Documentation */ public ApiResponse recentBlockTradesList( - String symbol, Long limit) throws ApiException { + String symbol, @Max(500L) Long limit) throws ApiException { okhttp3.Call localVarCall = recentBlockTradesListValidateBeforeCall(symbol, limit); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -1355,8 +1357,8 @@ public ApiResponse recentBlockTradesList( /** * Build call for recentTradesList * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) + * @param symbol Option trading pair (required) + * @param limit Number of result sets returned (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1367,7 +1369,7 @@ public ApiResponse recentBlockTradesList( * * * @see Recent + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#recent-trades-list">Recent * Trades List Documentation */ private okhttp3.Call recentTradesListCall(String symbol, Long limit) throws ApiException { @@ -1464,10 +1466,10 @@ private okhttp3.Call recentTradesListValidateBeforeCall(String symbol, Long limi } /** - * Recent Trades List Get recent market trades Weight: 5 + * Recent Trades List Get recent market trades Weight(IP): 5 * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) + * @param symbol Option trading pair (required) + * @param limit Number of result sets returned (optional) * @return ApiResponse<RecentTradesListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1479,11 +1481,11 @@ private okhttp3.Call recentTradesListValidateBeforeCall(String symbol, Long limi * * * @see Recent + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#recent-trades-list">Recent * Trades List Documentation */ public ApiResponse recentTradesList( - @NotNull String symbol, Long limit) throws ApiException { + @NotNull String symbol, @Max(500L) Long limit) throws ApiException { okhttp3.Call localVarCall = recentTradesListValidateBeforeCall(symbol, limit); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -1503,7 +1505,7 @@ public ApiResponse recentTradesList( * * * @see Test + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#test-connectivity">Test * Connectivity Documentation */ private okhttp3.Call testConnectivityCall() throws ApiException { @@ -1591,7 +1593,7 @@ private okhttp3.Call testConnectivityValidateBeforeCall() throws ApiException { } /** - * Test Connectivity Test connectivity to the Rest API. Weight: 1 + * Test Connectivity Test connectivity to the Rest API. Weight(IP): 1 * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1604,7 +1606,7 @@ private okhttp3.Call testConnectivityValidateBeforeCall() throws ApiException { * * * @see Test + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#test-connectivity">Test * Connectivity Documentation */ public ApiResponse testConnectivity() throws ApiException { @@ -1615,7 +1617,7 @@ public ApiResponse testConnectivity() throws ApiException { /** * Build call for ticker24hrPriceChangeStatistics * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) + * @param symbol Option trading pair (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1626,7 +1628,7 @@ public ApiResponse testConnectivity() throws ApiException { * * * @see 24hr + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#ticker24hr-price-change-statistics">24hr * Ticker Price Change Statistics Documentation */ private okhttp3.Call ticker24hrPriceChangeStatisticsCall(String symbol) throws ApiException { @@ -1720,9 +1722,10 @@ private okhttp3.Call ticker24hrPriceChangeStatisticsValidateBeforeCall(String sy } /** - * 24hr Ticker Price Change Statistics 24 hour rolling window price change statistics. Weight: 5 + * 24hr Ticker Price Change Statistics 24 hour rolling window price change statistics. Weight: 1 + * for a single symbol; 40 when the symbol parameter is omitted * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) + * @param symbol Option trading pair (optional) * @return ApiResponse<Ticker24hrPriceChangeStatisticsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1734,7 +1737,7 @@ private okhttp3.Call ticker24hrPriceChangeStatisticsValidateBeforeCall(String sy * * * @see 24hr + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-data#ticker24hr-price-change-statistics">24hr * Ticker Price Change Statistics Documentation */ public ApiResponse ticker24hrPriceChangeStatistics( diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerBlockTradeApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerBlockTradeApi.java index 9f2025775..ea45dd8cb 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerBlockTradeApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerBlockTradeApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -52,7 +52,7 @@ public class MarketMakerBlockTradeApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/8.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -103,7 +103,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Accept + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#accept-block-trade-order">Accept * Block Trade Order (TRADE) Documentation */ private okhttp3.Call acceptBlockTradeOrderCall( @@ -206,7 +206,8 @@ private okhttp3.Call acceptBlockTradeOrderValidateBeforeCall( } /** - * Accept Block Trade Order (TRADE) Accept a block trade order Weight: 5 + * Accept Block Trade Order (TRADE) Accept a block trade order Weight(IP): 5 Security Type: + * TRADE * * @param acceptBlockTradeOrderRequest (required) * @return ApiResponse<AcceptBlockTradeOrderResponse> @@ -220,7 +221,7 @@ private okhttp3.Call acceptBlockTradeOrderValidateBeforeCall( * * * @see Accept + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#accept-block-trade-order">Accept * Block Trade Order (TRADE) Documentation */ public ApiResponse acceptBlockTradeOrder( @@ -238,8 +239,8 @@ public ApiResponse acceptBlockTradeOrder( * * @param endTime End Time, e.g 1593512200000 (optional) * @param startTime Start Time, e.g 1593511200000 (optional) - * @param underlying underlying, e.g BTCUSDT (optional) - * @param recvWindow (optional) + * @param underlying Underlying asset. (optional) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -250,7 +251,7 @@ public ApiResponse acceptBlockTradeOrder( * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#account-block-trade-list">Account * Block Trade List (USER_DATA) Documentation */ private okhttp3.Call accountBlockTradeListCall( @@ -364,12 +365,13 @@ private okhttp3.Call accountBlockTradeListValidateBeforeCall( } /** - * Account Block Trade List (USER_DATA) Gets block trades for a specific account. Weight: 5 + * Account Block Trade List (USER_DATA) Gets block trades for a specific account. Weight(IP): 5 + * Security Type: USER_DATA * * @param endTime End Time, e.g 1593512200000 (optional) * @param startTime Start Time, e.g 1593511200000 (optional) - * @param underlying underlying, e.g BTCUSDT (optional) - * @param recvWindow (optional) + * @param underlying Underlying asset. (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<AccountBlockTradeListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -381,11 +383,12 @@ private okhttp3.Call accountBlockTradeListValidateBeforeCall( * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#account-block-trade-list">Account * Block Trade List (USER_DATA) Documentation */ public ApiResponse accountBlockTradeList( - Long endTime, Long startTime, String underlying, Long recvWindow) throws ApiException { + Long endTime, Long startTime, String underlying, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = accountBlockTradeListValidateBeforeCall(endTime, startTime, underlying, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -396,8 +399,8 @@ public ApiResponse accountBlockTradeList( /** * Build call for cancelBlockTradeOrder * - * @param blockOrderMatchingKey (required) - * @param recvWindow (optional) + * @param blockOrderMatchingKey Block trade matching key. (required) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -408,7 +411,7 @@ public ApiResponse accountBlockTradeList( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#cancel-block-trade-order">Cancel * Block Trade Order (TRADE) Documentation */ private okhttp3.Call cancelBlockTradeOrderCall(String blockOrderMatchingKey, Long recvWindow) @@ -510,10 +513,11 @@ private okhttp3.Call cancelBlockTradeOrderValidateBeforeCall( } /** - * Cancel Block Trade Order (TRADE) Cancel a block trade order. Weight: 5 + * Cancel Block Trade Order (TRADE) Cancel a block trade order. Weight(IP): 5 Security Type: + * TRADE * - * @param blockOrderMatchingKey (required) - * @param recvWindow (optional) + * @param blockOrderMatchingKey Block trade matching key. (required) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -525,11 +529,12 @@ private okhttp3.Call cancelBlockTradeOrderValidateBeforeCall( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#cancel-block-trade-order">Cancel * Block Trade Order (TRADE) Documentation */ public ApiResponse cancelBlockTradeOrder( - @NotNull String blockOrderMatchingKey, Long recvWindow) throws ApiException { + @NotNull String blockOrderMatchingKey, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = cancelBlockTradeOrderValidateBeforeCall(blockOrderMatchingKey, recvWindow); return localVarApiClient.execute(localVarCall); @@ -549,7 +554,7 @@ public ApiResponse cancelBlockTradeOrder( * * * @see Extend + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#extend-block-trade-order">Extend * Block Trade Order (TRADE) Documentation */ private okhttp3.Call extendBlockTradeOrderCall( @@ -653,7 +658,7 @@ private okhttp3.Call extendBlockTradeOrderValidateBeforeCall( /** * Extend Block Trade Order (TRADE) Extends a block trade expire time by 30 mins from the - * current time. Weight: 5 + * current time. Weight(IP): 5 Security Type: TRADE * * @param extendBlockTradeOrderRequest (required) * @return ApiResponse<ExtendBlockTradeOrderResponse> @@ -667,7 +672,7 @@ private okhttp3.Call extendBlockTradeOrderValidateBeforeCall( * * * @see Extend + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#extend-block-trade-order">Extend * Block Trade Order (TRADE) Documentation */ public ApiResponse extendBlockTradeOrder( @@ -694,7 +699,7 @@ public ApiResponse extendBlockTradeOrder( * * * @see New + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#new-block-trade-order">New * Block Trade Order (TRADE) Documentation */ private okhttp3.Call newBlockTradeOrderCall(NewBlockTradeOrderRequest newBlockTradeOrderRequest) @@ -800,7 +805,8 @@ private okhttp3.Call newBlockTradeOrderValidateBeforeCall( } /** - * New Block Trade Order (TRADE) Send in a new block trade order. Weight: 5 + * New Block Trade Order (TRADE) Send in a new block trade order. Weight(IP): 5 Security Type: + * TRADE * * @param newBlockTradeOrderRequest (required) * @return ApiResponse<NewBlockTradeOrderResponse> @@ -814,7 +820,7 @@ private okhttp3.Call newBlockTradeOrderValidateBeforeCall( * * * @see New + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#new-block-trade-order">New * Block Trade Order (TRADE) Documentation */ public ApiResponse newBlockTradeOrder( @@ -829,8 +835,8 @@ public ApiResponse newBlockTradeOrder( /** * Build call for queryBlockTradeDetails * - * @param blockOrderMatchingKey (required) - * @param recvWindow (optional) + * @param blockOrderMatchingKey Block trade matching key. (required) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -841,7 +847,7 @@ public ApiResponse newBlockTradeOrder( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#query-block-trade-details">Query * Block Trade Details (USER_DATA) Documentation */ private okhttp3.Call queryBlockTradeDetailsCall(String blockOrderMatchingKey, Long recvWindow) @@ -944,10 +950,10 @@ private okhttp3.Call queryBlockTradeDetailsValidateBeforeCall( /** * Query Block Trade Details (USER_DATA) Query block trade details; returns block trade details - * from counterparty's perspective. Weight: 5 + * from counterparty's perspective. Weight(IP): 5 Security Type: USER_DATA * - * @param blockOrderMatchingKey (required) - * @param recvWindow (optional) + * @param blockOrderMatchingKey Block trade matching key. (required) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<QueryBlockTradeDetailsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -959,11 +965,12 @@ private okhttp3.Call queryBlockTradeDetailsValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#query-block-trade-details">Query * Block Trade Details (USER_DATA) Documentation */ public ApiResponse queryBlockTradeDetails( - @NotNull String blockOrderMatchingKey, Long recvWindow) throws ApiException { + @NotNull String blockOrderMatchingKey, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = queryBlockTradeDetailsValidateBeforeCall(blockOrderMatchingKey, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -978,8 +985,8 @@ public ApiResponse queryBlockTradeDetails( * the blockOrderMatchingKey (optional) * @param endTime End Time, e.g 1593512200000 (optional) * @param startTime Start Time, e.g 1593511200000 (optional) - * @param underlying underlying, e.g BTCUSDT (optional) - * @param recvWindow (optional) + * @param underlying Underlying asset. (optional) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -990,7 +997,7 @@ public ApiResponse queryBlockTradeDetails( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#query-block-trade-order">Query * Block Trade Order (TRADE) Documentation */ private okhttp3.Call queryBlockTradeOrderCall( @@ -1124,14 +1131,15 @@ private okhttp3.Call queryBlockTradeOrderValidateBeforeCall( } /** - * Query Block Trade Order (TRADE) Check block trade order status. Weight: 5 + * Query Block Trade Order (TRADE) Check block trade order status. Weight(IP): 5 Security Type: + * TRADE * * @param blockOrderMatchingKey If specified, returns the specific block trade associated with * the blockOrderMatchingKey (optional) * @param endTime End Time, e.g 1593512200000 (optional) * @param startTime Start Time, e.g 1593511200000 (optional) - * @param underlying underlying, e.g BTCUSDT (optional) - * @param recvWindow (optional) + * @param underlying Underlying asset. (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<QueryBlockTradeOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1143,7 +1151,7 @@ private okhttp3.Call queryBlockTradeOrderValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-block-trade#query-block-trade-order">Query * Block Trade Order (TRADE) Documentation */ public ApiResponse queryBlockTradeOrder( @@ -1151,7 +1159,7 @@ public ApiResponse queryBlockTradeOrder( Long endTime, Long startTime, String underlying, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryBlockTradeOrderValidateBeforeCall( diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerEndpointsApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerEndpointsApi.java index eb53a4e9f..42a90151f 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerEndpointsApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerEndpointsApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -53,7 +53,7 @@ public class MarketMakerEndpointsApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/8.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -104,7 +104,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Auto-Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#auto-cancel-all-open-orders">Auto-Cancel * All Open Orders (Kill-Switch) Heartbeat (TRADE) Documentation */ private okhttp3.Call autoCancelAllOpenOrdersCall( @@ -210,9 +210,9 @@ private okhttp3.Call autoCancelAllOpenOrdersValidateBeforeCall( * Auto-Cancel All Open Orders (Kill-Switch) Heartbeat (TRADE) This endpoint resets the time * from which the countdown will begin to the time this messaged is received. It should be * called repeatedly as heartbeats. Multiple heartbeats can be updated at once by specifying the - * underlying symbols as a list (ex. BTCUSDT,ETHUSDT) in the underlyings parameter. * The - * response will only include underlying symbols where the heartbeat has been successfully - * updated. Weight: 10 + * underlying symbols as a list (ex. BTCUSDT,ETHUSDT) in the underlyings parameter. Weight(IP): + * 10 Security Type: TRADE Notes: - The response will only include underlying symbols where the + * heartbeat has been successfully updated. * * @param autoCancelAllOpenOrdersRequest (required) * @return ApiResponse<AutoCancelAllOpenOrdersResponse> @@ -226,7 +226,7 @@ private okhttp3.Call autoCancelAllOpenOrdersValidateBeforeCall( * * * @see Auto-Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#auto-cancel-all-open-orders">Auto-Cancel * All Open Orders (Kill-Switch) Heartbeat (TRADE) Documentation */ public ApiResponse autoCancelAllOpenOrders( @@ -242,8 +242,8 @@ public ApiResponse autoCancelAllOpenOrders( /** * Build call for getAutoCancelAllOpenOrders * - * @param underlying underlying, e.g BTCUSDT (optional) - * @param recvWindow (optional) + * @param underlying Underlying asset. (optional) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -254,7 +254,7 @@ public ApiResponse autoCancelAllOpenOrders( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#get-auto-cancel-all-open-orders">Get * Auto-Cancel All Open Orders (Kill-Switch) Config (TRADE) Documentation */ private okhttp3.Call getAutoCancelAllOpenOrdersCall(String underlying, Long recvWindow) @@ -359,10 +359,11 @@ private okhttp3.Call getAutoCancelAllOpenOrdersValidateBeforeCall( * auto-cancel parameters for each underlying symbol. Note only active auto-cancel parameters * will be returned, if countdownTime is set to 0 (ie. countdownTime has been turned off), the * underlying symbol and corresponding countdownTime parameter will not be returned in the - * response. * countdownTime = 0 means the function is disabled. Weight: 1 + * response. Weight(IP): 1 Security Type: TRADE Notes: - countdownTime = 0 means the + * function is disabled. * - * @param underlying underlying, e.g BTCUSDT (optional) - * @param recvWindow (optional) + * @param underlying Underlying asset. (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<GetAutoCancelAllOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -374,7 +375,7 @@ private okhttp3.Call getAutoCancelAllOpenOrdersValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#get-auto-cancel-all-open-orders">Get * Auto-Cancel All Open Orders (Kill-Switch) Config (TRADE) Documentation */ public ApiResponse getAutoCancelAllOpenOrders( @@ -389,8 +390,8 @@ public ApiResponse getAutoCancelAllOpenOrder /** * Build call for getMarketMakerProtectionConfig * - * @param underlying underlying, e.g BTCUSDT (optional) - * @param recvWindow (optional) + * @param underlying Underlying asset. (required) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -401,7 +402,7 @@ public ApiResponse getAutoCancelAllOpenOrder * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#get-market-maker-protection-config">Get * Market Maker Protection Config (TRADE) Documentation */ private okhttp3.Call getMarketMakerProtectionConfigCall(String underlying, Long recvWindow) @@ -502,10 +503,11 @@ private okhttp3.Call getMarketMakerProtectionConfigValidateBeforeCall( } /** - * Get Market Maker Protection Config (TRADE) Get config for MMP. Weight: 1 + * Get Market Maker Protection Config (TRADE) Get config for MMP. Weight(IP): 1 Security Type: + * TRADE * - * @param underlying underlying, e.g BTCUSDT (optional) - * @param recvWindow (optional) + * @param underlying Underlying asset. (required) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<GetMarketMakerProtectionConfigResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -517,11 +519,11 @@ private okhttp3.Call getMarketMakerProtectionConfigValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#get-market-maker-protection-config">Get * Market Maker Protection Config (TRADE) Documentation */ public ApiResponse getMarketMakerProtectionConfig( - String underlying, Long recvWindow) throws ApiException { + @NotNull String underlying, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getMarketMakerProtectionConfigValidateBeforeCall(underlying, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -543,7 +545,7 @@ public ApiResponse getMarketMakerProtect * * * @see Reset + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#reset-market-maker-protection-config">Reset * Market Maker Protection Config (TRADE) Documentation */ private okhttp3.Call resetMarketMakerProtectionConfigCall( @@ -651,7 +653,8 @@ private okhttp3.Call resetMarketMakerProtectionConfigValidateBeforeCall( } /** - * Reset Market Maker Protection Config (TRADE) Reset MMP, start MMP order again. Weight: 1 + * Reset Market Maker Protection Config (TRADE) Reset MMP, start MMP order again. Weight(IP): 1 + * Security Type: TRADE * * @param resetMarketMakerProtectionConfigRequest (required) * @return ApiResponse<ResetMarketMakerProtectionConfigResponse> @@ -665,7 +668,7 @@ private okhttp3.Call resetMarketMakerProtectionConfigValidateBeforeCall( * * * @see Reset + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#reset-market-maker-protection-config">Reset * Market Maker Protection Config (TRADE) Documentation */ public ApiResponse resetMarketMakerProtectionConfig( @@ -694,7 +697,7 @@ public ApiResponse resetMarketMakerPro * * * @see Set + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#set-auto-cancel-all-open-orders">Set * Auto-Cancel All Open Orders (Kill-Switch) Config (TRADE) Documentation */ private okhttp3.Call setAutoCancelAllOpenOrdersCall( @@ -810,15 +813,16 @@ private okhttp3.Call setAutoCancelAllOpenOrdersValidateBeforeCall( * of the specified countdown time period if no heartbeat message is sent. After the countdown * time period, all open orders will be cancelled and new orders will be rejected with error * code -2010 until either a heartbeat message is sent or the auto-cancel feature is turned off - * by setting countdownTime to 0. * This rest endpoint sets up the parameters to cancel your - * open orders in case of an outage or disconnection. * Example usage: Call this endpoint with a - * countdownTime value of 10000 (10 seconds) to turn on the auto-cancel feature. If the - * corresponding countdownCancelAllHeartBeat endpoint is not called within 10 seconds with the - * specified underlying symbol, all open orders of the specified symbol will be automatically - * canceled. If this endpoint is called with an countdownTime of 0, the countdown timer will be - * stopped. * The system will check all countdowns approximately every 100 milliseconds, - * **please note that sufficient redundancy should be considered when using this function**. We - * do not recommend setting the countdown time to be too precise or too small. Weight: 1 + * by setting countdownTime to 0. Weight(IP): 1 Security Type: TRADE Notes: - This rest endpoint + * sets up the parameters to cancel your open orders in case of an outage or disconnection. - + * Example usage: > Call this endpoint with a countdownTime value of 10000 (10 seconds) to + * turn on the auto-cancel feature. If the corresponding countdownCancelAllHeartBeat endpoint is + * not called within 10 seconds with the specified underlying symbol, all open orders of the + * specified symbol will be automatically canceled. If this endpoint is called with an + * countdownTime of 0, the countdown timer will be stopped. - The system will check all + * countdowns approximately every 100 milliseconds, **please note that sufficient redundancy + * should be considered when using this function**. We do not recommend setting the countdown + * time to be too precise or too small. * * @param setAutoCancelAllOpenOrdersRequest (required) * @return ApiResponse<SetAutoCancelAllOpenOrdersResponse> @@ -832,7 +836,7 @@ private okhttp3.Call setAutoCancelAllOpenOrdersValidateBeforeCall( * * * @see Set + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#set-auto-cancel-all-open-orders">Set * Auto-Cancel All Open Orders (Kill-Switch) Config (TRADE) Documentation */ public ApiResponse setAutoCancelAllOpenOrders( @@ -859,7 +863,7 @@ public ApiResponse setAutoCancelAllOpenOrder * * * @see Set + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#set-market-maker-protection-config">Set * Market Maker Protection Config (TRADE) Documentation */ private okhttp3.Call setMarketMakerProtectionConfigCall( @@ -997,7 +1001,7 @@ private okhttp3.Call setMarketMakerProtectionConfigValidateBeforeCall( * mass trading in short period time. Once market maker's account branches the threshold, * the Market Maker Protection will be triggered. When Market Maker Protection triggers, all the * current MMP orders will be canceled, new MMP orders will be rejected. Market maker can use - * this time to reevaluate market and modify order price. Weight: 1 + * this time to reevaluate market and modify order price. Weight(IP): 1 Security Type: TRADE * * @param setMarketMakerProtectionConfigRequest (required) * @return ApiResponse<SetMarketMakerProtectionConfigResponse> @@ -1011,7 +1015,7 @@ private okhttp3.Call setMarketMakerProtectionConfigValidateBeforeCall( * * * @see Set + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/market-maker-endpoints#set-market-maker-protection-config">Set * Market Maker Protection Config (TRADE) Documentation */ public ApiResponse setMarketMakerProtectionConfig( diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/TradeApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/TradeApi.java index baa466b24..790f02444 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/TradeApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/TradeApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -36,6 +36,8 @@ import com.binance.connector.client.derivatives_trading_options.rest.model.QueryCurrentOpenOptionOrdersResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.QueryOptionOrderHistoryResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.QuerySingleOrderResponse; +import com.binance.connector.client.derivatives_trading_options.rest.model.TradfiOptionsContractRequest; +import com.binance.connector.client.derivatives_trading_options.rest.model.TradfiOptionsContractResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.UserCommissionResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.UserExerciseRecordResponse; import com.google.gson.reflect.TypeToken; @@ -61,7 +63,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/8.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -101,13 +103,13 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for accountTradeList * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) + * @param symbol Option trading pair. (required) * @param fromId Trade id to fetch from. Default gets most recent trades, e.g * 4611875134427365376 (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) - * @param recvWindow (optional) + * @param limit Number of result sets returned. (optional) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -118,7 +120,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#account-trade-list">Account * Trade List (USER_DATA) Documentation */ private okhttp3.Call accountTradeListCall( @@ -244,16 +246,16 @@ private okhttp3.Call accountTradeListValidateBeforeCall( } /** - * Account Trade List (USER_DATA) Get trades for a specific account and symbol. * Only support - * querying trades in the past 3 months Weight: 5 + * Account Trade List (USER_DATA) Get trades for a specific account and symbol. Weight(IP): 5 + * Security Type: USER_DATA * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) + * @param symbol Option trading pair. (required) * @param fromId Trade id to fetch from. Default gets most recent trades, e.g * 4611875134427365376 (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) - * @param recvWindow (optional) + * @param limit Number of result sets returned. (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<AccountTradeListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -265,11 +267,16 @@ private okhttp3.Call accountTradeListValidateBeforeCall( * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#account-trade-list">Account * Trade List (USER_DATA) Documentation */ public ApiResponse accountTradeList( - String symbol, Long fromId, Long startTime, Long endTime, Long limit, Long recvWindow) + @NotNull String symbol, + Long fromId, + Long startTime, + Long endTime, + @Max(1000L) Long limit, + Long recvWindow) throws ApiException { okhttp3.Call localVarCall = accountTradeListValidateBeforeCall( @@ -282,8 +289,8 @@ public ApiResponse accountTradeList( /** * Build call for cancelAllOptionOrdersByUnderlying * - * @param underlying Option underlying, e.g BTCUSDT (required) - * @param recvWindow (optional) + * @param underlying Underlying asset. (required) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -294,7 +301,7 @@ public ApiResponse accountTradeList( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#cancel-all-option-orders-by-underlying">Cancel * All Option Orders By Underlying (TRADE) Documentation */ private okhttp3.Call cancelAllOptionOrdersByUnderlyingCall(String underlying, Long recvWindow) @@ -397,10 +404,10 @@ private okhttp3.Call cancelAllOptionOrdersByUnderlyingValidateBeforeCall( /** * Cancel All Option Orders By Underlying (TRADE) Cancel all active orders on specified - * underlying. Weight: 1 + * underlying. Weight(IP): 5 Security Type: TRADE * - * @param underlying Option underlying, e.g BTCUSDT (required) - * @param recvWindow (optional) + * @param underlying Underlying asset. (required) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<CancelAllOptionOrdersByUnderlyingResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -412,7 +419,7 @@ private okhttp3.Call cancelAllOptionOrdersByUnderlyingValidateBeforeCall( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#cancel-all-option-orders-by-underlying">Cancel * All Option Orders By Underlying (TRADE) Documentation */ public ApiResponse cancelAllOptionOrdersByUnderlying( @@ -427,8 +434,8 @@ public ApiResponse cancelAllOptionOrd /** * Build call for cancelAllOptionOrdersOnSpecificSymbol * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param recvWindow (optional) + * @param symbol Option trading pair. (required) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -439,7 +446,7 @@ public ApiResponse cancelAllOptionOrd * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#cancel-all-option-orders-on-specific-symbol">Cancel * all Option orders on specific symbol (TRADE) Documentation */ private okhttp3.Call cancelAllOptionOrdersOnSpecificSymbolCall(String symbol, Long recvWindow) @@ -544,10 +551,10 @@ private okhttp3.Call cancelAllOptionOrdersOnSpecificSymbolValidateBeforeCall( /** * Cancel all Option orders on specific symbol (TRADE) Cancel all active order on a symbol. - * Weight: 5 + * Weight(IP): 1 Security Type: TRADE * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param recvWindow (optional) + * @param symbol Option trading pair. (required) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<CancelAllOptionOrdersOnSpecificSymbolResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -559,7 +566,7 @@ private okhttp3.Call cancelAllOptionOrdersOnSpecificSymbolValidateBeforeCall( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#cancel-all-option-orders-on-specific-symbol">Cancel * all Option orders on specific symbol (TRADE) Documentation */ public ApiResponse @@ -575,11 +582,10 @@ private okhttp3.Call cancelAllOptionOrdersOnSpecificSymbolValidateBeforeCall( /** * Build call for cancelMultipleOptionOrders * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param orderIds Order ID, e.g [4611875134427365377,4611875134427365378] (optional) - * @param clientOrderIds User-defined order ID, e.g - * [\"my_id_1\",\"my_id_2\"] (optional) - * @param recvWindow (optional) + * @param symbol Option trading pair. (required) + * @param orderIds Order ID list. (optional) + * @param clientOrderIds Client order ID list. (optional) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -590,7 +596,7 @@ private okhttp3.Call cancelAllOptionOrdersOnSpecificSymbolValidateBeforeCall( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#cancel-multiple-option-orders">Cancel * Multiple Option Orders (TRADE) Documentation */ private okhttp3.Call cancelMultipleOptionOrdersCall( @@ -708,14 +714,14 @@ private okhttp3.Call cancelMultipleOptionOrdersValidateBeforeCall( } /** - * Cancel Multiple Option Orders (TRADE) Cancel multiple orders. * At least one instance of - * `orderId` and `clientOrderId` must be sent. Weight: 1 + * Cancel Multiple Option Orders (TRADE) Cancel multiple orders. Weight(IP): 5 Security Type: + * TRADE Notes: - At least one instance of `orderId` and `clientOrderId` + * must be sent. * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param orderIds Order ID, e.g [4611875134427365377,4611875134427365378] (optional) - * @param clientOrderIds User-defined order ID, e.g - * [\"my_id_1\",\"my_id_2\"] (optional) - * @param recvWindow (optional) + * @param symbol Option trading pair. (required) + * @param orderIds Order ID list. (optional) + * @param clientOrderIds Client order ID list. (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<CancelMultipleOptionOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -727,7 +733,7 @@ private okhttp3.Call cancelMultipleOptionOrdersValidateBeforeCall( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#cancel-multiple-option-orders">Cancel * Multiple Option Orders (TRADE) Documentation */ public ApiResponse cancelMultipleOptionOrders( @@ -747,10 +753,10 @@ public ApiResponse cancelMultipleOptionOrder /** * Build call for cancelOptionOrder * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param orderId Order ID, e.g 4611875134427365377 (optional) - * @param clientOrderId User-defined order ID, e.g 10000 (optional) - * @param recvWindow (optional) + * @param symbol Option trading pair. (required) + * @param orderId Order ID. (optional) + * @param clientOrderId clientOrderId (optional) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -761,7 +767,7 @@ public ApiResponse cancelMultipleOptionOrder * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#cancel-option-order">Cancel * Option Order (TRADE) Documentation */ private okhttp3.Call cancelOptionOrderCall( @@ -878,13 +884,13 @@ private okhttp3.Call cancelOptionOrderValidateBeforeCall( } /** - * Cancel Option Order (TRADE) Cancel an active order. * At least one instance of - * `orderId` and `clientOrderId` must be sent. Weight: 1 + * Cancel Option Order (TRADE) Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: + * - At least one instance of `orderId` and `clientOrderId` must be sent. * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param orderId Order ID, e.g 4611875134427365377 (optional) - * @param clientOrderId User-defined order ID, e.g 10000 (optional) - * @param recvWindow (optional) + * @param symbol Option trading pair. (required) + * @param orderId Order ID. (optional) + * @param clientOrderId clientOrderId (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<CancelOptionOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -896,7 +902,7 @@ private okhttp3.Call cancelOptionOrderValidateBeforeCall( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#cancel-option-order">Cancel * Option Order (TRADE) Documentation */ public ApiResponse cancelOptionOrder( @@ -923,7 +929,7 @@ public ApiResponse cancelOptionOrder( * * * @see New + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#new-order">New * Order (TRADE) Documentation */ private okhttp3.Call newOrderCall(NewOrderRequest newOrderRequest) throws ApiException { @@ -1069,7 +1075,9 @@ private okhttp3.Call newOrderValidateBeforeCall(NewOrderRequest newOrderRequest) } /** - * New Order (TRADE) Send a new order. Weight: 0 + * New Order (TRADE) Send a new order. Weight(IP): 0 Security Type: TRADE Notes: Some parameters + * are mandatory depending on the order type as follows: Type | Mandatory parameters + * ------------ | ------------ LIMIT | timeInForce, quantity, price * * @param newOrderRequest (required) * @return ApiResponse<NewOrderResponse> @@ -1083,7 +1091,7 @@ private okhttp3.Call newOrderValidateBeforeCall(NewOrderRequest newOrderRequest) * * * @see New + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#new-order">New * Order (TRADE) Documentation */ public ApiResponse newOrder(@Valid @NotNull NewOrderRequest newOrderRequest) @@ -1096,8 +1104,8 @@ public ApiResponse newOrder(@Valid @NotNull NewOrderRequest ne /** * Build call for optionPositionInformation * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) - * @param recvWindow (optional) + * @param symbol Option trading pair. (optional) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1108,7 +1116,7 @@ public ApiResponse newOrder(@Valid @NotNull NewOrderRequest ne * * * @see Option + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#option-position-information">Option * Position Information (USER_DATA) Documentation */ private okhttp3.Call optionPositionInformationCall(String symbol, Long recvWindow) @@ -1209,10 +1217,11 @@ private okhttp3.Call optionPositionInformationValidateBeforeCall(String symbol, } /** - * Option Position Information (USER_DATA) Get current position information. Weight: 5 + * Option Position Information (USER_DATA) Get current position information. Weight(IP): 5 + * Security Type: USER_DATA * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) - * @param recvWindow (optional) + * @param symbol Option trading pair. (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<OptionPositionInformationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1224,7 +1233,7 @@ private okhttp3.Call optionPositionInformationValidateBeforeCall(String symbol, * * * @see Option + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#option-position-information">Option * Position Information (USER_DATA) Documentation */ public ApiResponse optionPositionInformation( @@ -1249,8 +1258,8 @@ public ApiResponse optionPositionInformation( * * * @see Place - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#place-multiple-orders">Place + * Multiple Orders (TRADE) Documentation */ private okhttp3.Call placeMultipleOrdersCall( PlaceMultipleOrdersRequest placeMultipleOrdersRequest) throws ApiException { @@ -1351,9 +1360,11 @@ private okhttp3.Call placeMultipleOrdersValidateBeforeCall( } /** - * Place Multiple Orders(TRADE) Send multiple option orders. * Parameter rules are same with New - * Order * Batch orders are processed concurrently, and the order of matching is not guaranteed. - * Weight: 5 + * Place Multiple Orders (TRADE) Send multiple option orders. Weight(IP): 5 Security Type: TRADE + * Notes: Some parameters are mandatory depending on the order type as follows: Type | Mandatory + * parameters ------------ | ------------ LIMIT | timeInForce, quantity, price - Parameter rules + * are same with New Order - Batch orders are processed concurrently, and the order of matching + * is not guaranteed. * * @param placeMultipleOrdersRequest (required) * @return ApiResponse<PlaceMultipleOrdersResponse> @@ -1367,8 +1378,8 @@ private okhttp3.Call placeMultipleOrdersValidateBeforeCall( * * * @see Place - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#place-multiple-orders">Place + * Multiple Orders (TRADE) Documentation */ public ApiResponse placeMultipleOrders( @Valid @NotNull PlaceMultipleOrdersRequest placeMultipleOrdersRequest) @@ -1383,11 +1394,11 @@ public ApiResponse placeMultipleOrders( /** * Build call for queryCurrentOpenOptionOrders * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) - * @param orderId Order ID, e.g 4611875134427365377 (optional) + * @param symbol Option trading pair. (optional) + * @param orderId Order ID. (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param recvWindow (optional) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1398,7 +1409,7 @@ public ApiResponse placeMultipleOrders( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#query-current-open-option-orders">Query * Current Open Option Orders (USER_DATA) Documentation */ private okhttp3.Call queryCurrentOpenOptionOrdersCall( @@ -1522,12 +1533,13 @@ private okhttp3.Call queryCurrentOpenOptionOrdersValidateBeforeCall( /** * Query Current Open Option Orders (USER_DATA) Query current all open orders, status: ACCEPTED * PARTIALLY_FILLED Weight: 1 for a single symbol; 40 when the symbol parameter is omitted + * Security Type: USER_DATA * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) - * @param orderId Order ID, e.g 4611875134427365377 (optional) + * @param symbol Option trading pair. (optional) + * @param orderId Order ID. (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param recvWindow (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<QueryCurrentOpenOptionOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1539,7 +1551,7 @@ private okhttp3.Call queryCurrentOpenOptionOrdersValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#query-current-open-option-orders">Query * Current Open Option Orders (USER_DATA) Documentation */ public ApiResponse queryCurrentOpenOptionOrders( @@ -1556,12 +1568,12 @@ public ApiResponse queryCurrentOpenOptionO /** * Build call for queryOptionOrderHistory * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param orderId Order ID, e.g 4611875134427365377 (optional) + * @param symbol Option trading pair. (required) + * @param orderId Order ID. (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) - * @param recvWindow (optional) + * @param limit Number of result sets returned (optional) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1572,7 +1584,7 @@ public ApiResponse queryCurrentOpenOptionO * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#query-option-order-history">Query * Option Order History (TRADE) Documentation */ private okhttp3.Call queryOptionOrderHistoryCall( @@ -1700,14 +1712,14 @@ private okhttp3.Call queryOptionOrderHistoryValidateBeforeCall( /** * Query Option Order History (TRADE) Query all finished orders within 5 days, finished status: - * CANCELLED FILLED REJECTED. Weight: 3 + * CANCELLED FILLED REJECTED. Weight(IP): 3 Security Type: TRADE * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param orderId Order ID, e.g 4611875134427365377 (optional) + * @param symbol Option trading pair. (required) + * @param orderId Order ID. (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) - * @param recvWindow (optional) + * @param limit Number of result sets returned (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<QueryOptionOrderHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1719,7 +1731,7 @@ private okhttp3.Call queryOptionOrderHistoryValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#query-option-order-history">Query * Option Order History (TRADE) Documentation */ public ApiResponse queryOptionOrderHistory( @@ -1727,7 +1739,7 @@ public ApiResponse queryOptionOrderHistory( Long orderId, Long startTime, Long endTime, - Long limit, + @Max(1000L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -1741,10 +1753,11 @@ public ApiResponse queryOptionOrderHistory( /** * Build call for querySingleOrder * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param orderId Order ID, e.g 4611875134427365377 (optional) - * @param clientOrderId User-defined order ID, e.g 10000 (optional) - * @param recvWindow (optional) + * @param symbol Option trading pair. (required) + * @param orderId Order ID. (optional) + * @param clientOrderId User-defined order ID; cannot be duplicated among open orders. + * (optional) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1755,7 +1768,7 @@ public ApiResponse queryOptionOrderHistory( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#query-single-order">Query * Single Order (TRADE) Documentation */ private okhttp3.Call querySingleOrderCall( @@ -1874,13 +1887,14 @@ private okhttp3.Call querySingleOrderValidateBeforeCall( /** * Query Single Order (TRADE) Check an order status. * These orders will not be found: * order * status is `CANCELED` or `REJECTED`, **AND** * order has NO filled trade, - * **AND** * created time + 3 days < current time * Either `orderId` or - * `clientOrderId ` must be sent. Weight: 1 + * **AND** * created time + 3 days < current time Weight(IP): 1 Security Type: TRADE Notes: - + * Either `orderId` or `clientOrderId ` must be sent. * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (required) - * @param orderId Order ID, e.g 4611875134427365377 (optional) - * @param clientOrderId User-defined order ID, e.g 10000 (optional) - * @param recvWindow (optional) + * @param symbol Option trading pair. (required) + * @param orderId Order ID. (optional) + * @param clientOrderId User-defined order ID; cannot be duplicated among open orders. + * (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<QuerySingleOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1892,7 +1906,7 @@ private okhttp3.Call querySingleOrderValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#query-single-order">Query * Single Order (TRADE) Documentation */ public ApiResponse querySingleOrder( @@ -1905,10 +1919,148 @@ public ApiResponse querySingleOrder( return localVarApiClient.execute(localVarCall, localVarReturnType); } + /** + * Build call for tradfiOptionsContract + * + * @param tradfiOptionsContractRequest (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 TradFi Options Contract -
+ * + * @see TradFi + * Options Contract (USER_DATA) Documentation + */ + private okhttp3.Call tradfiOptionsContractCall( + TradfiOptionsContractRequest tradfiOptionsContractRequest) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/eapi/v1/stock/contract"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tradfiOptionsContractRequest.getRecvWindow() != null) { + localVarFormParams.put("recvWindow", tradfiOptionsContractRequest.getRecvWindow()); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call tradfiOptionsContractValidateBeforeCall( + TradfiOptionsContractRequest tradfiOptionsContractRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {tradfiOptionsContractRequest}; + Method method = + this.getClass() + .getMethod("tradfiOptionsContract", TradfiOptionsContractRequest.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return tradfiOptionsContractCall(tradfiOptionsContractRequest); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * TradFi Options Contract (USER_DATA) Sign TradFi Options agreement contract Weight(IP): 50 + * Security Type: USER_DATA + * + * @param tradfiOptionsContractRequest (optional) + * @return ApiResponse<TradfiOptionsContractResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 TradFi Options Contract -
+ * + * @see TradFi + * Options Contract (USER_DATA) Documentation + */ + public ApiResponse tradfiOptionsContract( + @Valid TradfiOptionsContractRequest tradfiOptionsContractRequest) throws ApiException { + okhttp3.Call localVarCall = + tradfiOptionsContractValidateBeforeCall(tradfiOptionsContractRequest); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + /** * Build call for userCommission * - * @param recvWindow (optional) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1919,7 +2071,7 @@ public ApiResponse querySingleOrder( * * * @see User + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#user-commission">User * Commission (USER_DATA) Documentation */ private okhttp3.Call userCommissionCall(Long recvWindow) throws ApiException { @@ -2012,9 +2164,9 @@ private okhttp3.Call userCommissionValidateBeforeCall(Long recvWindow) throws Ap } /** - * User Commission (USER_DATA) Get account commission. Weight: 5 + * User Commission (USER_DATA) Get account commission. Weight(IP): 5 Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<UserCommissionResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2026,7 +2178,7 @@ private okhttp3.Call userCommissionValidateBeforeCall(Long recvWindow) throws Ap * * * @see User + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#user-commission">User * Commission (USER_DATA) Documentation */ public ApiResponse userCommission(Long recvWindow) throws ApiException { @@ -2039,11 +2191,11 @@ public ApiResponse userCommission(Long recvWindow) throw /** * Build call for userExerciseRecord * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) + * @param symbol Option trading pair. (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) - * @param recvWindow (optional) + * @param limit Number of result sets returned. (optional) + * @param recvWindow Recv Window. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2054,7 +2206,7 @@ public ApiResponse userCommission(Long recvWindow) throw * * * @see User + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#user-exercise-record">User * Exercise Record (USER_DATA) Documentation */ private okhttp3.Call userExerciseRecordCall( @@ -2175,13 +2327,14 @@ private okhttp3.Call userExerciseRecordValidateBeforeCall( } /** - * User Exercise Record (USER_DATA) Get account exercise records. Weight: 5 + * User Exercise Record (USER_DATA) Get account exercise records. Weight(IP): 5 Security Type: + * USER_DATA * - * @param symbol Option trading pair, e.g BTC-200730-9000-C (optional) + * @param symbol Option trading pair. (optional) * @param startTime Start Time, e.g 1593511200000 (optional) * @param endTime End Time, e.g 1593512200000 (optional) - * @param limit Number of result sets returned Default:100 Max:1000 (optional) - * @param recvWindow (optional) + * @param limit Number of result sets returned. (optional) + * @param recvWindow Recv Window. (optional) * @return ApiResponse<UserExerciseRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2193,11 +2346,11 @@ private okhttp3.Call userExerciseRecordValidateBeforeCall( * * * @see User + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#user-exercise-record">User * Exercise Record (USER_DATA) Documentation */ public ApiResponse userExerciseRecord( - String symbol, Long startTime, Long endTime, Long limit, Long recvWindow) + String symbol, Long startTime, Long endTime, @Max(1000L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = userExerciseRecordValidateBeforeCall(symbol, startTime, endTime, limit, recvWindow); diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/UserDataStreamsApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/UserDataStreamsApi.java index 299d48144..895eec9de 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/UserDataStreamsApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/UserDataStreamsApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -42,7 +42,7 @@ public class UserDataStreamsApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/8.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -92,7 +92,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Close + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/user-data-streams#close-user-data-stream">Close * User Data Stream (USER_STREAM) Documentation */ private okhttp3.Call closeUserDataStreamCall() throws ApiException { @@ -180,7 +180,8 @@ private okhttp3.Call closeUserDataStreamValidateBeforeCall() throws ApiException } /** - * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight: 1 + * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight(IP): 1 Security + * Type: USER_STREAM * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -193,7 +194,7 @@ private okhttp3.Call closeUserDataStreamValidateBeforeCall() throws ApiException * * * @see Close + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/user-data-streams#close-user-data-stream">Close * User Data Stream (USER_STREAM) Documentation */ public ApiResponse closeUserDataStream() throws ApiException { @@ -214,7 +215,7 @@ public ApiResponse closeUserDataStream() throws ApiException { * * * @see Keepalive + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/user-data-streams#keepalive-user-data-stream">Keepalive * User Data Stream (USER_STREAM) Documentation */ private okhttp3.Call keepaliveUserDataStreamCall() throws ApiException { @@ -304,7 +305,7 @@ private okhttp3.Call keepaliveUserDataStreamValidateBeforeCall() throws ApiExcep /** * Keepalive User Data Stream (USER_STREAM) Keepalive a user data stream to prevent a time out. * User data streams will close after 60 minutes. It's recommended to send a ping about - * every 60 minutes. Weight: 1 + * every 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -317,7 +318,7 @@ private okhttp3.Call keepaliveUserDataStreamValidateBeforeCall() throws ApiExcep * * * @see Keepalive + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/user-data-streams#keepalive-user-data-stream">Keepalive * User Data Stream (USER_STREAM) Documentation */ public ApiResponse keepaliveUserDataStream() throws ApiException { @@ -338,7 +339,7 @@ public ApiResponse keepaliveUserDataStream() throws ApiException { * * * @see Start + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/user-data-streams#start-user-data-stream">Start * User Data Stream (USER_STREAM) Documentation */ private okhttp3.Call startUserDataStreamCall() throws ApiException { @@ -429,7 +430,7 @@ private okhttp3.Call startUserDataStreamValidateBeforeCall() throws ApiException * Start User Data Stream (USER_STREAM) Start a new user data stream. The stream will close * after 60 minutes unless a keepalive is sent. If the account has an active * `listenKey`, that `listenKey` will be returned and its validity will be - * extended for 60 minutes. Weight: 1 + * extended for 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * * @return ApiResponse<StartUserDataStreamResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -442,7 +443,7 @@ private okhttp3.Call startUserDataStreamValidateBeforeCall() throws ApiException * * * @see Start + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/user-data-streams#start-user-data-stream">Start * User Data Stream (USER_STREAM) Documentation */ public ApiResponse startUserDataStream() throws ApiException { diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AcceptBlockTradeOrderRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AcceptBlockTradeOrderRequest.java index f8906fd50..4361a3dd5 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AcceptBlockTradeOrderRequest.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AcceptBlockTradeOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AcceptBlockTradeOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AcceptBlockTradeOrderRequest { public static final String SERIALIZED_NAME_BLOCK_ORDER_MATCHING_KEY = "blockOrderMatchingKey"; @@ -77,11 +77,12 @@ public AcceptBlockTradeOrderRequest recvWindow(@jakarta.annotation.Nullable Long } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AcceptBlockTradeOrderResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AcceptBlockTradeOrderResponse.java index 591489d92..70225ece5 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AcceptBlockTradeOrderResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AcceptBlockTradeOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** AcceptBlockTradeOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AcceptBlockTradeOrderResponse { public static final String SERIALIZED_NAME_BLOCK_TRADE_SETTLEMENT_KEY = "blockTradeSettlementKey"; @@ -88,7 +88,7 @@ public AcceptBlockTradeOrderResponse blockTradeSettlementKey( } /** - * Get blockTradeSettlementKey + * block Trade Settlement Key * * @return blockTradeSettlementKey */ @@ -108,7 +108,7 @@ public AcceptBlockTradeOrderResponse expireTime(@jakarta.annotation.Nullable Lon } /** - * Get expireTime + * expire Time * * @return expireTime */ @@ -127,7 +127,7 @@ public AcceptBlockTradeOrderResponse liquidity(@jakarta.annotation.Nullable Stri } /** - * Get liquidity + * liquidity * * @return liquidity */ @@ -146,7 +146,7 @@ public AcceptBlockTradeOrderResponse status(@jakarta.annotation.Nullable String } /** - * Get status + * status * * @return status */ @@ -165,7 +165,7 @@ public AcceptBlockTradeOrderResponse createTime(@jakarta.annotation.Nullable Lon } /** - * Get createTime + * create Time * * @return createTime */ @@ -194,7 +194,7 @@ public AcceptBlockTradeOrderResponse addLegsItem( } /** - * Get legs + * legs * * @return legs */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AcceptBlockTradeOrderResponseLegsInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AcceptBlockTradeOrderResponseLegsInner.java index 8a60c7136..a4150ced3 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AcceptBlockTradeOrderResponseLegsInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AcceptBlockTradeOrderResponseLegsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AcceptBlockTradeOrderResponseLegsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AcceptBlockTradeOrderResponseLegsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -69,7 +69,7 @@ public AcceptBlockTradeOrderResponseLegsInner symbol( } /** - * Get symbol + * symbol * * @return symbol */ @@ -88,7 +88,7 @@ public AcceptBlockTradeOrderResponseLegsInner side(@jakarta.annotation.Nullable } /** - * Get side + * side * * @return side */ @@ -108,7 +108,7 @@ public AcceptBlockTradeOrderResponseLegsInner quantity( } /** - * Get quantity + * quantity * * @return quantity */ @@ -127,7 +127,7 @@ public AcceptBlockTradeOrderResponseLegsInner price(@jakarta.annotation.Nullable } /** - * Get price + * price * * @return price */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountBlockTradeListResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountBlockTradeListResponse.java index 2e1d11cfb..843610758 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountBlockTradeListResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountBlockTradeListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountBlockTradeListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountBlockTradeListResponse extends ArrayList { public AccountBlockTradeListResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountBlockTradeListResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountBlockTradeListResponseInner.java index 88ccbfc33..4eef1e0c7 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountBlockTradeListResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountBlockTradeListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** AccountBlockTradeListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountBlockTradeListResponseInner { public static final String SERIALIZED_NAME_PARENT_ORDER_ID = "parentOrderId"; @@ -76,7 +76,7 @@ public AccountBlockTradeListResponseInner parentOrderId( } /** - * Get parentOrderId + * parent Order Id * * @return parentOrderId */ @@ -96,7 +96,7 @@ public AccountBlockTradeListResponseInner crossType( } /** - * Get crossType + * cross Type * * @return crossType */ @@ -126,7 +126,7 @@ public AccountBlockTradeListResponseInner addLegsItem( } /** - * Get legs + * legs * * @return legs */ @@ -149,7 +149,7 @@ public AccountBlockTradeListResponseInner blockTradeSettlementKey( } /** - * Get blockTradeSettlementKey + * block Trade Settlement Key * * @return blockTradeSettlementKey */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountBlockTradeListResponseInnerLegsInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountBlockTradeListResponseInnerLegsInner.java index b3135bb53..aee1053d1 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountBlockTradeListResponseInnerLegsInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountBlockTradeListResponseInnerLegsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** AccountBlockTradeListResponseInnerLegsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountBlockTradeListResponseInnerLegsInner { public static final String SERIALIZED_NAME_CREATE_TIME = "createTime"; @@ -160,7 +160,7 @@ public AccountBlockTradeListResponseInnerLegsInner createTime( } /** - * Get createTime + * create Time * * @return createTime */ @@ -180,7 +180,7 @@ public AccountBlockTradeListResponseInnerLegsInner updateTime( } /** - * Get updateTime + * update Time * * @return updateTime */ @@ -200,7 +200,7 @@ public AccountBlockTradeListResponseInnerLegsInner symbol( } /** - * Get symbol + * symbol * * @return symbol */ @@ -220,7 +220,7 @@ public AccountBlockTradeListResponseInnerLegsInner orderId( } /** - * Get orderId + * order Id * * @return orderId */ @@ -240,7 +240,7 @@ public AccountBlockTradeListResponseInnerLegsInner orderPrice( } /** - * Get orderPrice + * order Price * * @return orderPrice */ @@ -261,7 +261,7 @@ public AccountBlockTradeListResponseInnerLegsInner orderQuantity( } /** - * Get orderQuantity + * order Quantity * * @return orderQuantity */ @@ -282,7 +282,7 @@ public AccountBlockTradeListResponseInnerLegsInner orderStatus( } /** - * Get orderStatus + * order Status * * @return orderStatus */ @@ -302,7 +302,7 @@ public AccountBlockTradeListResponseInnerLegsInner executedQty( } /** - * Get executedQty + * executed Qty * * @return executedQty */ @@ -323,7 +323,7 @@ public AccountBlockTradeListResponseInnerLegsInner executedAmount( } /** - * Get executedAmount + * executed Amount * * @return executedAmount */ @@ -344,7 +344,7 @@ public AccountBlockTradeListResponseInnerLegsInner fee( } /** - * Get fee + * fee * * @return fee */ @@ -365,7 +365,7 @@ public AccountBlockTradeListResponseInnerLegsInner orderType( } /** - * Get orderType + * order Type * * @return orderType */ @@ -385,7 +385,7 @@ public AccountBlockTradeListResponseInnerLegsInner orderSide( } /** - * Get orderSide + * order Side * * @return orderSide */ @@ -404,7 +404,7 @@ public AccountBlockTradeListResponseInnerLegsInner id(@jakarta.annotation.Nullab } /** - * Get id + * id * * @return id */ @@ -424,7 +424,7 @@ public AccountBlockTradeListResponseInnerLegsInner tradeId( } /** - * Get tradeId + * trade Id * * @return tradeId */ @@ -444,7 +444,7 @@ public AccountBlockTradeListResponseInnerLegsInner tradePrice( } /** - * Get tradePrice + * trade Price * * @return tradePrice */ @@ -465,7 +465,7 @@ public AccountBlockTradeListResponseInnerLegsInner tradeQty( } /** - * Get tradeQty + * trade Qty * * @return tradeQty */ @@ -486,7 +486,7 @@ public AccountBlockTradeListResponseInnerLegsInner tradeTime( } /** - * Get tradeTime + * trade Time * * @return tradeTime */ @@ -506,7 +506,7 @@ public AccountBlockTradeListResponseInnerLegsInner liquidity( } /** - * Get liquidity + * liquidity * * @return liquidity */ @@ -526,7 +526,7 @@ public AccountBlockTradeListResponseInnerLegsInner commission( } /** - * Get commission + * commission * * @return commission */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountFundingFlowResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountFundingFlowResponse.java index 9894d5cc7..64fa4df15 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountFundingFlowResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountFundingFlowResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountFundingFlowResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountFundingFlowResponse extends ArrayList { public AccountFundingFlowResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountFundingFlowResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountFundingFlowResponseInner.java index 942a073ea..395fd7d78 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountFundingFlowResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountFundingFlowResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountFundingFlowResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountFundingFlowResponseInner { public static final String SERIALIZED_NAME_ID = "id"; @@ -74,7 +74,7 @@ public AccountFundingFlowResponseInner id(@jakarta.annotation.Nullable Long id) } /** - * Get id + * id * * @return id */ @@ -93,7 +93,7 @@ public AccountFundingFlowResponseInner asset(@jakarta.annotation.Nullable String } /** - * Get asset + * Asset type * * @return asset */ @@ -112,7 +112,7 @@ public AccountFundingFlowResponseInner amount(@jakarta.annotation.Nullable Strin } /** - * Get amount + * Amount (positive numbers represent inflow, negative numbers represent outflow) * * @return amount */ @@ -131,7 +131,7 @@ public AccountFundingFlowResponseInner type(@jakarta.annotation.Nullable String } /** - * Get type + * type (fees) * * @return type */ @@ -151,7 +151,7 @@ public AccountFundingFlowResponseInner createDate( } /** - * Get createDate + * Time * * @return createDate */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountTradeListResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountTradeListResponse.java index 3c870a2f3..d5ff5aba1 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountTradeListResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountTradeListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountTradeListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountTradeListResponse extends ArrayList { public AccountTradeListResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountTradeListResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountTradeListResponseInner.java index c6885fcda..4ebc5bf66 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountTradeListResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AccountTradeListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountTradeListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountTradeListResponseInner { public static final String SERIALIZED_NAME_ID = "id"; @@ -140,7 +140,7 @@ public AccountTradeListResponseInner id(@jakarta.annotation.Nullable Long id) { } /** - * Get id + * unique id * * @return id */ @@ -159,7 +159,7 @@ public AccountTradeListResponseInner tradeId(@jakarta.annotation.Nullable Long t } /** - * Get tradeId + * trade id * * @return tradeId */ @@ -178,7 +178,7 @@ public AccountTradeListResponseInner orderId(@jakarta.annotation.Nullable Long o } /** - * Get orderId + * order id * * @return orderId */ @@ -197,7 +197,7 @@ public AccountTradeListResponseInner symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * option symbol * * @return symbol */ @@ -216,7 +216,7 @@ public AccountTradeListResponseInner price(@jakarta.annotation.Nullable String p } /** - * Get price + * trade price * * @return price */ @@ -235,7 +235,7 @@ public AccountTradeListResponseInner quantity(@jakarta.annotation.Nullable Strin } /** - * Get quantity + * trade quantity * * @return quantity */ @@ -254,7 +254,7 @@ public AccountTradeListResponseInner fee(@jakarta.annotation.Nullable String fee } /** - * Get fee + * fee(negative is fee deduction) * * @return fee */ @@ -274,7 +274,7 @@ public AccountTradeListResponseInner realizedProfit( } /** - * Get realizedProfit + * realized profit/loss * * @return realizedProfit */ @@ -293,7 +293,7 @@ public AccountTradeListResponseInner side(@jakarta.annotation.Nullable String si } /** - * Get side + * order side * * @return side */ @@ -312,7 +312,7 @@ public AccountTradeListResponseInner type(@jakarta.annotation.Nullable String ty } /** - * Get type + * order type * * @return type */ @@ -331,7 +331,7 @@ public AccountTradeListResponseInner liquidity(@jakarta.annotation.Nullable Stri } /** - * Get liquidity + * TAKER or MAKER * * @return liquidity */ @@ -350,7 +350,7 @@ public AccountTradeListResponseInner time(@jakarta.annotation.Nullable Long time } /** - * Get time + * trade time * * @return time */ @@ -369,7 +369,7 @@ public AccountTradeListResponseInner priceScale(@jakarta.annotation.Nullable Lon } /** - * Get priceScale + * price Scale * * @return priceScale */ @@ -389,7 +389,7 @@ public AccountTradeListResponseInner quantityScale( } /** - * Get quantityScale + * quantity Scale * * @return quantityScale */ @@ -409,7 +409,7 @@ public AccountTradeListResponseInner optionSide( } /** - * Get optionSide + * option Side * * @return optionSide */ @@ -429,7 +429,7 @@ public AccountTradeListResponseInner quoteAsset( } /** - * Get quoteAsset + * quote Asset * * @return quoteAsset */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AutoCancelAllOpenOrdersRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AutoCancelAllOpenOrdersRequest.java index 6093e358e..c11dc2de1 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AutoCancelAllOpenOrdersRequest.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AutoCancelAllOpenOrdersRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AutoCancelAllOpenOrdersRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AutoCancelAllOpenOrdersRequest { public static final String SERIALIZED_NAME_UNDERLYINGS = "underlyings"; diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AutoCancelAllOpenOrdersResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AutoCancelAllOpenOrdersResponse.java index d49e65eb3..ff7d7d878 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AutoCancelAllOpenOrdersResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/AutoCancelAllOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** AutoCancelAllOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AutoCancelAllOpenOrdersResponse { public static final String SERIALIZED_NAME_UNDERLYINGS = "underlyings"; @@ -63,7 +63,7 @@ public AutoCancelAllOpenOrdersResponse addUnderlyingsItem(String underlyingsItem } /** - * Get underlyings + * underlyings * * @return underlyings */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelAllOptionOrdersByUnderlyingResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelAllOptionOrdersByUnderlyingResponse.java index 8669bc4df..694f89d44 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelAllOptionOrdersByUnderlyingResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelAllOptionOrdersByUnderlyingResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelAllOptionOrdersByUnderlyingResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelAllOptionOrdersByUnderlyingResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -56,7 +56,7 @@ public CancelAllOptionOrdersByUnderlyingResponse code(@jakarta.annotation.Nullab } /** - * Get code + * code * * @return code */ @@ -75,7 +75,7 @@ public CancelAllOptionOrdersByUnderlyingResponse msg(@jakarta.annotation.Nullabl } /** - * Get msg + * msg * * @return msg */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelAllOptionOrdersOnSpecificSymbolResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelAllOptionOrdersOnSpecificSymbolResponse.java index 78da329eb..f3cd80b2d 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelAllOptionOrdersOnSpecificSymbolResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelAllOptionOrdersOnSpecificSymbolResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelAllOptionOrdersOnSpecificSymbolResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelAllOptionOrdersOnSpecificSymbolResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -57,7 +57,7 @@ public CancelAllOptionOrdersOnSpecificSymbolResponse code( } /** - * Get code + * code * * @return code */ @@ -77,7 +77,7 @@ public CancelAllOptionOrdersOnSpecificSymbolResponse msg( } /** - * Get msg + * msg * * @return msg */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelMultipleOptionOrdersResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelMultipleOptionOrdersResponse.java index dda0d8f5d..4cbdad2df 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelMultipleOptionOrdersResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelMultipleOptionOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelMultipleOptionOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelMultipleOptionOrdersResponse extends ArrayList { public CancelMultipleOptionOrdersResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelMultipleOptionOrdersResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelMultipleOptionOrdersResponseInner.java index c8896a061..0fa724dab 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelMultipleOptionOrdersResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelMultipleOptionOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelMultipleOptionOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelMultipleOptionOrdersResponseInner { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -66,6 +66,12 @@ public class CancelMultipleOptionOrdersResponseInner { @jakarta.annotation.Nullable private String executedQty; + public static final String SERIALIZED_NAME_FEE = "fee"; + + @SerializedName(SERIALIZED_NAME_FEE) + @jakarta.annotation.Nullable + private String fee; + public static final String SERIALIZED_NAME_SIDE = "side"; @SerializedName(SERIALIZED_NAME_SIDE) @@ -114,12 +120,6 @@ public class CancelMultipleOptionOrdersResponseInner { @jakarta.annotation.Nullable private String avgPrice; - public static final String SERIALIZED_NAME_SOURCE = "source"; - - @SerializedName(SERIALIZED_NAME_SOURCE) - @jakarta.annotation.Nullable - private String source; - public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @SerializedName(SERIALIZED_NAME_CLIENT_ORDER_ID) @@ -156,6 +156,12 @@ public class CancelMultipleOptionOrdersResponseInner { @jakarta.annotation.Nullable private Boolean mmp; + public static final String SERIALIZED_NAME_SOURCE = "source"; + + @SerializedName(SERIALIZED_NAME_SOURCE) + @jakarta.annotation.Nullable + private String source; + public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = "selfTradePreventionMode"; @@ -172,7 +178,7 @@ public CancelMultipleOptionOrdersResponseInner orderId( } /** - * Get orderId + * System order number * * @return orderId */ @@ -192,7 +198,7 @@ public CancelMultipleOptionOrdersResponseInner symbol( } /** - * Get symbol + * Option trading pair * * @return symbol */ @@ -212,7 +218,7 @@ public CancelMultipleOptionOrdersResponseInner price( } /** - * Get price + * Order Price * * @return price */ @@ -232,7 +238,7 @@ public CancelMultipleOptionOrdersResponseInner quantity( } /** - * Get quantity + * Order Quantity * * @return quantity */ @@ -252,7 +258,7 @@ public CancelMultipleOptionOrdersResponseInner executedQty( } /** - * Get executedQty + * Number of completed quantity * * @return executedQty */ @@ -265,13 +271,32 @@ public void setExecutedQty(@jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; } + public CancelMultipleOptionOrdersResponseInner fee(@jakarta.annotation.Nullable String fee) { + this.fee = fee; + return this; + } + + /** + * fee + * + * @return fee + */ + @jakarta.annotation.Nullable + public String getFee() { + return fee; + } + + public void setFee(@jakarta.annotation.Nullable String fee) { + this.fee = fee; + } + public CancelMultipleOptionOrdersResponseInner side(@jakarta.annotation.Nullable String side) { this.side = side; return this; } /** - * Get side + * Buy/sell direction * * @return side */ @@ -290,7 +315,7 @@ public CancelMultipleOptionOrdersResponseInner type(@jakarta.annotation.Nullable } /** - * Get type + * Order type * * @return type */ @@ -310,7 +335,7 @@ public CancelMultipleOptionOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time in force method * * @return timeInForce */ @@ -330,7 +355,7 @@ public CancelMultipleOptionOrdersResponseInner reduceOnly( } /** - * Get reduceOnly + * Order is reduce only Y/N * * @return reduceOnly */ @@ -350,7 +375,7 @@ public CancelMultipleOptionOrdersResponseInner createTime( } /** - * Get createTime + * Order Time * * @return createTime */ @@ -370,7 +395,7 @@ public CancelMultipleOptionOrdersResponseInner updateTime( } /** - * Get updateTime + * Update time * * @return updateTime */ @@ -390,7 +415,7 @@ public CancelMultipleOptionOrdersResponseInner status( } /** - * Get status + * Order status * * @return status */ @@ -410,7 +435,7 @@ public CancelMultipleOptionOrdersResponseInner avgPrice( } /** - * Get avgPrice + * Average price of completed trade * * @return avgPrice */ @@ -423,26 +448,6 @@ public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { this.avgPrice = avgPrice; } - public CancelMultipleOptionOrdersResponseInner source( - @jakarta.annotation.Nullable String source) { - this.source = source; - return this; - } - - /** - * Get source - * - * @return source - */ - @jakarta.annotation.Nullable - public String getSource() { - return source; - } - - public void setSource(@jakarta.annotation.Nullable String source) { - this.source = source; - } - public CancelMultipleOptionOrdersResponseInner clientOrderId( @jakarta.annotation.Nullable String clientOrderId) { this.clientOrderId = clientOrderId; @@ -450,7 +455,7 @@ public CancelMultipleOptionOrdersResponseInner clientOrderId( } /** - * Get clientOrderId + * Client order ID * * @return clientOrderId */ @@ -470,7 +475,7 @@ public CancelMultipleOptionOrdersResponseInner priceScale( } /** - * Get priceScale + * price Scale * * @return priceScale */ @@ -490,7 +495,7 @@ public CancelMultipleOptionOrdersResponseInner quantityScale( } /** - * Get quantityScale + * quantity Scale * * @return quantityScale */ @@ -510,7 +515,7 @@ public CancelMultipleOptionOrdersResponseInner optionSide( } /** - * Get optionSide + * option Side * * @return optionSide */ @@ -530,7 +535,7 @@ public CancelMultipleOptionOrdersResponseInner quoteAsset( } /** - * Get quoteAsset + * quote Asset * * @return quoteAsset */ @@ -549,7 +554,7 @@ public CancelMultipleOptionOrdersResponseInner mmp(@jakarta.annotation.Nullable } /** - * Get mmp + * mmp * * @return mmp */ @@ -562,6 +567,26 @@ public void setMmp(@jakarta.annotation.Nullable Boolean mmp) { this.mmp = mmp; } + public CancelMultipleOptionOrdersResponseInner source( + @jakarta.annotation.Nullable String source) { + this.source = source; + return this; + } + + /** + * Get source + * + * @return source + */ + @jakarta.annotation.Nullable + public String getSource() { + return source; + } + + public void setSource(@jakarta.annotation.Nullable String source) { + this.source = source; + } + public CancelMultipleOptionOrdersResponseInner selfTradePreventionMode( @jakarta.annotation.Nullable String selfTradePreventionMode) { this.selfTradePreventionMode = selfTradePreventionMode; @@ -599,6 +624,7 @@ public boolean equals(Object o) { && Objects.equals(this.quantity, cancelMultipleOptionOrdersResponseInner.quantity) && Objects.equals( this.executedQty, cancelMultipleOptionOrdersResponseInner.executedQty) + && Objects.equals(this.fee, cancelMultipleOptionOrdersResponseInner.fee) && Objects.equals(this.side, cancelMultipleOptionOrdersResponseInner.side) && Objects.equals(this.type, cancelMultipleOptionOrdersResponseInner.type) && Objects.equals( @@ -611,7 +637,6 @@ public boolean equals(Object o) { this.updateTime, cancelMultipleOptionOrdersResponseInner.updateTime) && Objects.equals(this.status, cancelMultipleOptionOrdersResponseInner.status) && Objects.equals(this.avgPrice, cancelMultipleOptionOrdersResponseInner.avgPrice) - && Objects.equals(this.source, cancelMultipleOptionOrdersResponseInner.source) && Objects.equals( this.clientOrderId, cancelMultipleOptionOrdersResponseInner.clientOrderId) && Objects.equals( @@ -623,6 +648,7 @@ public boolean equals(Object o) { && Objects.equals( this.quoteAsset, cancelMultipleOptionOrdersResponseInner.quoteAsset) && Objects.equals(this.mmp, cancelMultipleOptionOrdersResponseInner.mmp) + && Objects.equals(this.source, cancelMultipleOptionOrdersResponseInner.source) && Objects.equals( this.selfTradePreventionMode, cancelMultipleOptionOrdersResponseInner.selfTradePreventionMode); @@ -636,6 +662,7 @@ public int hashCode() { price, quantity, executedQty, + fee, side, type, timeInForce, @@ -644,13 +671,13 @@ public int hashCode() { updateTime, status, avgPrice, - source, clientOrderId, priceScale, quantityScale, optionSide, quoteAsset, mmp, + source, selfTradePreventionMode); } @@ -663,6 +690,7 @@ public String toString() { sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); @@ -671,13 +699,13 @@ public String toString() { sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); - sb.append(" source: ").append(toIndentedString(source)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" priceScale: ").append(toIndentedString(priceScale)).append("\n"); sb.append(" quantityScale: ").append(toIndentedString(quantityScale)).append("\n"); sb.append(" optionSide: ").append(toIndentedString(optionSide)).append("\n"); sb.append(" quoteAsset: ").append(toIndentedString(quoteAsset)).append("\n"); sb.append(" mmp: ").append(toIndentedString(mmp)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); @@ -708,6 +736,10 @@ public String toUrlQueryString() { String executedQtyValueAsString = ""; executedQtyValueAsString = executedQtyValue.toString(); sb.append("executedQty=").append(urlEncode(executedQtyValueAsString)).append(""); + Object feeValue = getFee(); + String feeValueAsString = ""; + feeValueAsString = feeValue.toString(); + sb.append("fee=").append(urlEncode(feeValueAsString)).append(""); Object sideValue = getSide(); String sideValueAsString = ""; sideValueAsString = sideValue.toString(); @@ -740,10 +772,6 @@ public String toUrlQueryString() { String avgPriceValueAsString = ""; avgPriceValueAsString = avgPriceValue.toString(); sb.append("avgPrice=").append(urlEncode(avgPriceValueAsString)).append(""); - Object sourceValue = getSource(); - String sourceValueAsString = ""; - sourceValueAsString = sourceValue.toString(); - sb.append("source=").append(urlEncode(sourceValueAsString)).append(""); Object clientOrderIdValue = getClientOrderId(); String clientOrderIdValueAsString = ""; clientOrderIdValueAsString = clientOrderIdValue.toString(); @@ -768,6 +796,10 @@ public String toUrlQueryString() { String mmpValueAsString = ""; mmpValueAsString = mmpValue.toString(); sb.append("mmp=").append(urlEncode(mmpValueAsString)).append(""); + Object sourceValue = getSource(); + String sourceValueAsString = ""; + sourceValueAsString = sourceValue.toString(); + sb.append("source=").append(urlEncode(sourceValueAsString)).append(""); Object selfTradePreventionModeValue = getSelfTradePreventionMode(); String selfTradePreventionModeValueAsString = ""; selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); @@ -807,6 +839,7 @@ private String toIndentedString(Object o) { openapiFields.add("price"); openapiFields.add("quantity"); openapiFields.add("executedQty"); + openapiFields.add("fee"); openapiFields.add("side"); openapiFields.add("type"); openapiFields.add("timeInForce"); @@ -815,13 +848,13 @@ private String toIndentedString(Object o) { openapiFields.add("updateTime"); openapiFields.add("status"); openapiFields.add("avgPrice"); - openapiFields.add("source"); openapiFields.add("clientOrderId"); openapiFields.add("priceScale"); openapiFields.add("quantityScale"); openapiFields.add("optionSide"); openapiFields.add("quoteAsset"); openapiFields.add("mmp"); + openapiFields.add("source"); openapiFields.add("selfTradePreventionMode"); // a set of required properties/fields (JSON key names) @@ -881,6 +914,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("executedQty").toString())); } + if ((jsonObj.get("fee") != null && !jsonObj.get("fee").isJsonNull()) + && !jsonObj.get("fee").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `fee` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("fee").toString())); + } if ((jsonObj.get("side") != null && !jsonObj.get("side").isJsonNull()) && !jsonObj.get("side").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -921,14 +962,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("avgPrice").toString())); } - if ((jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) - && !jsonObj.get("source").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `source` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("source").toString())); - } if ((jsonObj.get("clientOrderId") != null && !jsonObj.get("clientOrderId").isJsonNull()) && !jsonObj.get("clientOrderId").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -953,6 +986,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("quoteAsset").toString())); } + if ((jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) + && !jsonObj.get("source").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `source` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("source").toString())); + } if ((jsonObj.get("selfTradePreventionMode") != null && !jsonObj.get("selfTradePreventionMode").isJsonNull()) && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelOptionOrderResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelOptionOrderResponse.java index 6734c7765..cd1936b10 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelOptionOrderResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CancelOptionOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelOptionOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelOptionOrderResponse { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -171,7 +171,7 @@ public CancelOptionOrderResponse orderId(@jakarta.annotation.Nullable Long order } /** - * Get orderId + * System order number * * @return orderId */ @@ -190,7 +190,7 @@ public CancelOptionOrderResponse symbol(@jakarta.annotation.Nullable String symb } /** - * Get symbol + * Option trading pair * * @return symbol */ @@ -209,7 +209,7 @@ public CancelOptionOrderResponse price(@jakarta.annotation.Nullable String price } /** - * Get price + * Order Price * * @return price */ @@ -228,7 +228,7 @@ public CancelOptionOrderResponse quantity(@jakarta.annotation.Nullable String qu } /** - * Get quantity + * Order Quantity * * @return quantity */ @@ -247,7 +247,7 @@ public CancelOptionOrderResponse executedQty(@jakarta.annotation.Nullable String } /** - * Get executedQty + * Number of executed quantity * * @return executedQty */ @@ -266,7 +266,7 @@ public CancelOptionOrderResponse side(@jakarta.annotation.Nullable String side) } /** - * Get side + * Buy/sell direction * * @return side */ @@ -285,7 +285,7 @@ public CancelOptionOrderResponse type(@jakarta.annotation.Nullable String type) } /** - * Get type + * Order type * * @return type */ @@ -304,7 +304,7 @@ public CancelOptionOrderResponse timeInForce(@jakarta.annotation.Nullable String } /** - * Get timeInForce + * Time in force method * * @return timeInForce */ @@ -323,7 +323,7 @@ public CancelOptionOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean } /** - * Get reduceOnly + * Order is reduce only Y/N * * @return reduceOnly */ @@ -342,7 +342,7 @@ public CancelOptionOrderResponse createDate(@jakarta.annotation.Nullable Long cr } /** - * Get createDate + * Order Time * * @return createDate */ @@ -361,7 +361,7 @@ public CancelOptionOrderResponse updateTime(@jakarta.annotation.Nullable Long up } /** - * Get updateTime + * Update time * * @return updateTime */ @@ -380,7 +380,7 @@ public CancelOptionOrderResponse status(@jakarta.annotation.Nullable String stat } /** - * Get status + * Order status * * @return status */ @@ -399,7 +399,7 @@ public CancelOptionOrderResponse avgPrice(@jakarta.annotation.Nullable String av } /** - * Get avgPrice + * Average price of completed trade * * @return avgPrice */ @@ -418,7 +418,7 @@ public CancelOptionOrderResponse source(@jakarta.annotation.Nullable String sour } /** - * Get source + * source * * @return source */ @@ -438,7 +438,7 @@ public CancelOptionOrderResponse clientOrderId( } /** - * Get clientOrderId + * Client order ID * * @return clientOrderId */ @@ -457,7 +457,7 @@ public CancelOptionOrderResponse priceScale(@jakarta.annotation.Nullable Long pr } /** - * Get priceScale + * price Scale * * @return priceScale */ @@ -477,7 +477,7 @@ public CancelOptionOrderResponse quantityScale( } /** - * Get quantityScale + * quantity Scale * * @return quantityScale */ @@ -496,7 +496,7 @@ public CancelOptionOrderResponse optionSide(@jakarta.annotation.Nullable String } /** - * Get optionSide + * option Side * * @return optionSide */ @@ -515,7 +515,7 @@ public CancelOptionOrderResponse quoteAsset(@jakarta.annotation.Nullable String } /** - * Get quoteAsset + * quote Asset * * @return quoteAsset */ @@ -534,7 +534,7 @@ public CancelOptionOrderResponse mmp(@jakarta.annotation.Nullable Boolean mmp) { } /** - * Get mmp + * mmp * * @return mmp */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CheckServerTimeResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CheckServerTimeResponse.java index 4bdc15a6a..b9b887402 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CheckServerTimeResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/CheckServerTimeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CheckServerTimeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CheckServerTimeResponse { public static final String SERIALIZED_NAME_SERVER_TIME = "serverTime"; @@ -50,7 +50,7 @@ public CheckServerTimeResponse serverTime(@jakarta.annotation.Nullable Long serv } /** - * Get serverTime + * server Time * * @return serverTime */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ClientOrderIds.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ClientOrderIds.java index fc241724a..9b2cc8d48 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ClientOrderIds.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ClientOrderIds.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ClientOrderIds */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ClientOrderIds extends ArrayList { public ClientOrderIds() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Currency.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Currency.java new file mode 100644 index 000000000..448abfc24 --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Currency.java @@ -0,0 +1,71 @@ +/* + * Options REST API + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets currency */ +@JsonAdapter(Currency.Adapter.class) +public enum Currency { + USDT("USDT"); + + private String value; + + Currency(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Currency fromValue(String value) { + for (Currency b : Currency.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Currency enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Currency read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Currency.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Currency.fromValue(value); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponse.java index 7dbfa2b32..ca1de2809 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** ExchangeInformationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInformationResponse { public static final String SERIALIZED_NAME_TIMEZONE = "timezone"; @@ -86,7 +86,7 @@ public ExchangeInformationResponse timezone(@jakarta.annotation.Nullable String } /** - * Get timezone + * Time zone used by the server * * @return timezone */ @@ -105,7 +105,7 @@ public ExchangeInformationResponse serverTime(@jakarta.annotation.Nullable Long } /** - * Get serverTime + * Current system time * * @return serverTime */ @@ -135,7 +135,7 @@ public ExchangeInformationResponse addOptionContractsItem( } /** - * Get optionContracts + * Option contract underlying asset info * * @return optionContracts */ @@ -168,7 +168,7 @@ public ExchangeInformationResponse addOptionAssetsItem( } /** - * Get optionAssets + * Option asset info * * @return optionAssets */ @@ -201,7 +201,7 @@ public ExchangeInformationResponse addOptionSymbolsItem( } /** - * Get optionSymbols + * Option trading pair info * * @return optionSymbols */ @@ -234,7 +234,7 @@ public ExchangeInformationResponse addRateLimitsItem( } /** - * Get rateLimits + * rate Limits * * @return rateLimits */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseOptionAssetsInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseOptionAssetsInner.java index 92ecb3e02..816aa6896 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseOptionAssetsInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseOptionAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ExchangeInformationResponseOptionAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInformationResponseOptionAssetsInner { public static final String SERIALIZED_NAME_NAME = "name"; @@ -51,7 +51,7 @@ public ExchangeInformationResponseOptionAssetsInner name( } /** - * Get name + * Asset name * * @return name */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseOptionContractsInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseOptionContractsInner.java index d4201dfbd..b4af34b1e 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseOptionContractsInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseOptionContractsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ExchangeInformationResponseOptionContractsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInformationResponseOptionContractsInner { public static final String SERIALIZED_NAME_BASE_ASSET = "baseAsset"; @@ -69,7 +69,7 @@ public ExchangeInformationResponseOptionContractsInner baseAsset( } /** - * Get baseAsset + * Base currency * * @return baseAsset */ @@ -89,7 +89,7 @@ public ExchangeInformationResponseOptionContractsInner quoteAsset( } /** - * Get quoteAsset + * Quotation asset * * @return quoteAsset */ @@ -109,7 +109,7 @@ public ExchangeInformationResponseOptionContractsInner underlying( } /** - * Get underlying + * Name of the underlying asset of the option contract * * @return underlying */ @@ -129,7 +129,7 @@ public ExchangeInformationResponseOptionContractsInner settleAsset( } /** - * Get settleAsset + * Settlement currency * * @return settleAsset */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseOptionSymbolsInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseOptionSymbolsInner.java index ef66a39fb..ad3a88240 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseOptionSymbolsInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseOptionSymbolsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** ExchangeInformationResponseOptionSymbolsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInformationResponseOptionSymbolsInner { public static final String SERIALIZED_NAME_EXPIRY_DATE = "expiryDate"; @@ -144,6 +144,24 @@ public class ExchangeInformationResponseOptionSymbolsInner { @jakarta.annotation.Nullable private String quoteAsset; + public static final String SERIALIZED_NAME_CONTRACT_TYPE = "contractType"; + + @SerializedName(SERIALIZED_NAME_CONTRACT_TYPE) + @jakarta.annotation.Nullable + private String contractType; + + public static final String SERIALIZED_NAME_UNDERLYING_TYPE = "underlyingType"; + + @SerializedName(SERIALIZED_NAME_UNDERLYING_TYPE) + @jakarta.annotation.Nullable + private String underlyingType; + + public static final String SERIALIZED_NAME_NAKED_SELL = "nakedSell"; + + @SerializedName(SERIALIZED_NAME_NAKED_SELL) + @jakarta.annotation.Nullable + private Boolean nakedSell; + public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @@ -159,7 +177,7 @@ public ExchangeInformationResponseOptionSymbolsInner expiryDate( } /** - * Get expiryDate + * expiry time * * @return expiryDate */ @@ -190,7 +208,7 @@ public ExchangeInformationResponseOptionSymbolsInner addFiltersItem( } /** - * Get filters + * filters * * @return filters */ @@ -214,7 +232,7 @@ public ExchangeInformationResponseOptionSymbolsInner symbol( } /** - * Get symbol + * Trading pair name * * @return symbol */ @@ -234,7 +252,7 @@ public ExchangeInformationResponseOptionSymbolsInner side( } /** - * Get side + * Direction: CALL long, PUT short * * @return side */ @@ -254,7 +272,7 @@ public ExchangeInformationResponseOptionSymbolsInner strikePrice( } /** - * Get strikePrice + * Strike price * * @return strikePrice */ @@ -274,7 +292,7 @@ public ExchangeInformationResponseOptionSymbolsInner underlying( } /** - * Get underlying + * Name of the underlying asset of the option contract * * @return underlying */ @@ -294,7 +312,7 @@ public ExchangeInformationResponseOptionSymbolsInner unit( } /** - * Get unit + * Contract unit, the quantity of the underlying asset represented by a single contract. * * @return unit */ @@ -314,7 +332,7 @@ public ExchangeInformationResponseOptionSymbolsInner liquidationFeeRate( } /** - * Get liquidationFeeRate + * liquidation fee rate * * @return liquidationFeeRate */ @@ -334,7 +352,7 @@ public ExchangeInformationResponseOptionSymbolsInner minQty( } /** - * Get minQty + * Minimum order quantity * * @return minQty */ @@ -354,7 +372,7 @@ public ExchangeInformationResponseOptionSymbolsInner maxQty( } /** - * Get maxQty + * Maximum order quantity * * @return maxQty */ @@ -374,7 +392,7 @@ public ExchangeInformationResponseOptionSymbolsInner initialMargin( } /** - * Get initialMargin + * Initial Magin Ratio * * @return initialMargin */ @@ -394,7 +412,7 @@ public ExchangeInformationResponseOptionSymbolsInner maintenanceMargin( } /** - * Get maintenanceMargin + * Maintenance Margin Ratio * * @return maintenanceMargin */ @@ -414,7 +432,7 @@ public ExchangeInformationResponseOptionSymbolsInner minInitialMargin( } /** - * Get minInitialMargin + * Min Initial Margin Ratio * * @return minInitialMargin */ @@ -434,7 +452,7 @@ public ExchangeInformationResponseOptionSymbolsInner minMaintenanceMargin( } /** - * Get minMaintenanceMargin + * Min Maintenance Margin Ratio * * @return minMaintenanceMargin */ @@ -454,7 +472,7 @@ public ExchangeInformationResponseOptionSymbolsInner priceScale( } /** - * Get priceScale + * price precision * * @return priceScale */ @@ -474,7 +492,7 @@ public ExchangeInformationResponseOptionSymbolsInner quantityScale( } /** - * Get quantityScale + * quantity precision * * @return quantityScale */ @@ -494,7 +512,7 @@ public ExchangeInformationResponseOptionSymbolsInner quoteAsset( } /** - * Get quoteAsset + * Quotation asset * * @return quoteAsset */ @@ -507,6 +525,66 @@ public void setQuoteAsset(@jakarta.annotation.Nullable String quoteAsset) { this.quoteAsset = quoteAsset; } + public ExchangeInformationResponseOptionSymbolsInner contractType( + @jakarta.annotation.Nullable String contractType) { + this.contractType = contractType; + return this; + } + + /** + * Contract type + * + * @return contractType + */ + @jakarta.annotation.Nullable + public String getContractType() { + return contractType; + } + + public void setContractType(@jakarta.annotation.Nullable String contractType) { + this.contractType = contractType; + } + + public ExchangeInformationResponseOptionSymbolsInner underlyingType( + @jakarta.annotation.Nullable String underlyingType) { + this.underlyingType = underlyingType; + return this; + } + + /** + * Underlying type + * + * @return underlyingType + */ + @jakarta.annotation.Nullable + public String getUnderlyingType() { + return underlyingType; + } + + public void setUnderlyingType(@jakarta.annotation.Nullable String underlyingType) { + this.underlyingType = underlyingType; + } + + public ExchangeInformationResponseOptionSymbolsInner nakedSell( + @jakarta.annotation.Nullable Boolean nakedSell) { + this.nakedSell = nakedSell; + return this; + } + + /** + * Whether naked selling is allowed for this symbol + * + * @return nakedSell + */ + @jakarta.annotation.Nullable + public Boolean getNakedSell() { + return nakedSell; + } + + public void setNakedSell(@jakarta.annotation.Nullable Boolean nakedSell) { + this.nakedSell = nakedSell; + } + public ExchangeInformationResponseOptionSymbolsInner status( @jakarta.annotation.Nullable String status) { this.status = status; @@ -514,7 +592,7 @@ public ExchangeInformationResponseOptionSymbolsInner status( } /** - * Get status + * Trading Status * * @return status */ @@ -573,6 +651,14 @@ public boolean equals(Object o) { exchangeInformationResponseOptionSymbolsInner.quantityScale) && Objects.equals( this.quoteAsset, exchangeInformationResponseOptionSymbolsInner.quoteAsset) + && Objects.equals( + this.contractType, + exchangeInformationResponseOptionSymbolsInner.contractType) + && Objects.equals( + this.underlyingType, + exchangeInformationResponseOptionSymbolsInner.underlyingType) + && Objects.equals( + this.nakedSell, exchangeInformationResponseOptionSymbolsInner.nakedSell) && Objects.equals( this.status, exchangeInformationResponseOptionSymbolsInner.status); } @@ -597,6 +683,9 @@ public int hashCode() { priceScale, quantityScale, quoteAsset, + contractType, + underlyingType, + nakedSell, status); } @@ -625,6 +714,9 @@ public String toString() { sb.append(" priceScale: ").append(toIndentedString(priceScale)).append("\n"); sb.append(" quantityScale: ").append(toIndentedString(quantityScale)).append("\n"); sb.append(" quoteAsset: ").append(toIndentedString(quoteAsset)).append("\n"); + sb.append(" contractType: ").append(toIndentedString(contractType)).append("\n"); + sb.append(" underlyingType: ").append(toIndentedString(underlyingType)).append("\n"); + sb.append(" nakedSell: ").append(toIndentedString(nakedSell)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); @@ -710,6 +802,18 @@ public String toUrlQueryString() { String quoteAssetValueAsString = ""; quoteAssetValueAsString = quoteAssetValue.toString(); sb.append("quoteAsset=").append(urlEncode(quoteAssetValueAsString)).append(""); + Object contractTypeValue = getContractType(); + String contractTypeValueAsString = ""; + contractTypeValueAsString = contractTypeValue.toString(); + sb.append("contractType=").append(urlEncode(contractTypeValueAsString)).append(""); + Object underlyingTypeValue = getUnderlyingType(); + String underlyingTypeValueAsString = ""; + underlyingTypeValueAsString = underlyingTypeValue.toString(); + sb.append("underlyingType=").append(urlEncode(underlyingTypeValueAsString)).append(""); + Object nakedSellValue = getNakedSell(); + String nakedSellValueAsString = ""; + nakedSellValueAsString = nakedSellValue.toString(); + sb.append("nakedSell=").append(urlEncode(nakedSellValueAsString)).append(""); Object statusValue = getStatus(); String statusValueAsString = ""; statusValueAsString = statusValue.toString(); @@ -759,6 +863,9 @@ private String toIndentedString(Object o) { openapiFields.add("priceScale"); openapiFields.add("quantityScale"); openapiFields.add("quoteAsset"); + openapiFields.add("contractType"); + openapiFields.add("underlyingType"); + openapiFields.add("nakedSell"); openapiFields.add("status"); // a set of required properties/fields (JSON key names) @@ -906,6 +1013,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("quoteAsset").toString())); } + if ((jsonObj.get("contractType") != null && !jsonObj.get("contractType").isJsonNull()) + && !jsonObj.get("contractType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `contractType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("contractType").toString())); + } + if ((jsonObj.get("underlyingType") != null && !jsonObj.get("underlyingType").isJsonNull()) + && !jsonObj.get("underlyingType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `underlyingType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("underlyingType").toString())); + } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseOptionSymbolsInnerFiltersInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseOptionSymbolsInnerFiltersInner.java index 4ad5cc732..3734306dd 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseOptionSymbolsInnerFiltersInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseOptionSymbolsInnerFiltersInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ExchangeInformationResponseOptionSymbolsInnerFiltersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInformationResponseOptionSymbolsInnerFiltersInner { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; @@ -87,7 +87,7 @@ public ExchangeInformationResponseOptionSymbolsInnerFiltersInner filterType( } /** - * Get filterType + * filter Type * * @return filterType */ @@ -107,7 +107,7 @@ public ExchangeInformationResponseOptionSymbolsInnerFiltersInner minPrice( } /** - * Get minPrice + * min Price * * @return minPrice */ @@ -127,7 +127,7 @@ public ExchangeInformationResponseOptionSymbolsInnerFiltersInner maxPrice( } /** - * Get maxPrice + * max Price * * @return maxPrice */ @@ -147,7 +147,7 @@ public ExchangeInformationResponseOptionSymbolsInnerFiltersInner tickSize( } /** - * Get tickSize + * tick Size * * @return tickSize */ @@ -167,7 +167,7 @@ public ExchangeInformationResponseOptionSymbolsInnerFiltersInner minQty( } /** - * Get minQty + * Minimum order quantity * * @return minQty */ @@ -187,7 +187,7 @@ public ExchangeInformationResponseOptionSymbolsInnerFiltersInner maxQty( } /** - * Get maxQty + * Maximum order quantity * * @return maxQty */ @@ -207,7 +207,7 @@ public ExchangeInformationResponseOptionSymbolsInnerFiltersInner stepSize( } /** - * Get stepSize + * step Size * * @return stepSize */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseRateLimitsInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseRateLimitsInner.java index 31535869e..08a59347c 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseRateLimitsInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExchangeInformationResponseRateLimitsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ExchangeInformationResponseRateLimitsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInformationResponseRateLimitsInner { public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; @@ -69,7 +69,7 @@ public ExchangeInformationResponseRateLimitsInner rateLimitType( } /** - * Get rateLimitType + * rate Limit Type * * @return rateLimitType */ @@ -89,7 +89,7 @@ public ExchangeInformationResponseRateLimitsInner interval( } /** - * Get interval + * interval * * @return interval */ @@ -109,7 +109,7 @@ public ExchangeInformationResponseRateLimitsInner intervalNum( } /** - * Get intervalNum + * interval Num * * @return intervalNum */ @@ -129,7 +129,7 @@ public ExchangeInformationResponseRateLimitsInner limit( } /** - * Get limit + * limit * * @return limit */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExtendBlockTradeOrderRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExtendBlockTradeOrderRequest.java index 92e900b85..59ac9f03b 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExtendBlockTradeOrderRequest.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExtendBlockTradeOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ExtendBlockTradeOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExtendBlockTradeOrderRequest { public static final String SERIALIZED_NAME_BLOCK_ORDER_MATCHING_KEY = "blockOrderMatchingKey"; @@ -77,11 +77,12 @@ public ExtendBlockTradeOrderRequest recvWindow(@jakarta.annotation.Nullable Long } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExtendBlockTradeOrderResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExtendBlockTradeOrderResponse.java index d3935dd0d..7a52e1f78 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExtendBlockTradeOrderResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExtendBlockTradeOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** ExtendBlockTradeOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExtendBlockTradeOrderResponse { public static final String SERIALIZED_NAME_BLOCK_TRADE_SETTLEMENT_KEY = "blockTradeSettlementKey"; @@ -88,7 +88,7 @@ public ExtendBlockTradeOrderResponse blockTradeSettlementKey( } /** - * Get blockTradeSettlementKey + * block Trade Settlement Key * * @return blockTradeSettlementKey */ @@ -108,7 +108,7 @@ public ExtendBlockTradeOrderResponse expireTime(@jakarta.annotation.Nullable Lon } /** - * Get expireTime + * expire Time * * @return expireTime */ @@ -127,7 +127,7 @@ public ExtendBlockTradeOrderResponse liquidity(@jakarta.annotation.Nullable Stri } /** - * Get liquidity + * liquidity * * @return liquidity */ @@ -146,7 +146,7 @@ public ExtendBlockTradeOrderResponse status(@jakarta.annotation.Nullable String } /** - * Get status + * status * * @return status */ @@ -165,7 +165,7 @@ public ExtendBlockTradeOrderResponse createTime(@jakarta.annotation.Nullable Lon } /** - * Get createTime + * create Time * * @return createTime */ @@ -194,7 +194,7 @@ public ExtendBlockTradeOrderResponse addLegsItem( } /** - * Get legs + * legs * * @return legs */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExtendBlockTradeOrderResponseLegsInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExtendBlockTradeOrderResponseLegsInner.java index 477543fc9..41d19333c 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExtendBlockTradeOrderResponseLegsInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ExtendBlockTradeOrderResponseLegsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ExtendBlockTradeOrderResponseLegsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExtendBlockTradeOrderResponseLegsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -69,7 +69,7 @@ public ExtendBlockTradeOrderResponseLegsInner symbol( } /** - * Get symbol + * symbol * * @return symbol */ @@ -88,7 +88,7 @@ public ExtendBlockTradeOrderResponseLegsInner side(@jakarta.annotation.Nullable } /** - * Get side + * side * * @return side */ @@ -108,7 +108,7 @@ public ExtendBlockTradeOrderResponseLegsInner quantity( } /** - * Get quantity + * quantity * * @return quantity */ @@ -127,7 +127,7 @@ public ExtendBlockTradeOrderResponseLegsInner price(@jakarta.annotation.Nullable } /** - * Get price + * price * * @return price */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/GetAutoCancelAllOpenOrdersResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/GetAutoCancelAllOpenOrdersResponse.java index 61b148009..b0176eef3 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/GetAutoCancelAllOpenOrdersResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/GetAutoCancelAllOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetAutoCancelAllOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetAutoCancelAllOpenOrdersResponse { public static final String SERIALIZED_NAME_UNDERLYING = "underlying"; @@ -57,7 +57,7 @@ public GetAutoCancelAllOpenOrdersResponse underlying( } /** - * Get underlying + * underlying * * @return underlying */ @@ -77,7 +77,7 @@ public GetAutoCancelAllOpenOrdersResponse countdownTime( } /** - * Get countdownTime + * countdown Time * * @return countdownTime */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/GetMarketMakerProtectionConfigResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/GetMarketMakerProtectionConfigResponse.java index dbf568e87..c87455018 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/GetMarketMakerProtectionConfigResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/GetMarketMakerProtectionConfigResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetMarketMakerProtectionConfigResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetMarketMakerProtectionConfigResponse { public static final String SERIALIZED_NAME_UNDERLYING_ID = "underlyingId"; @@ -89,7 +89,7 @@ public GetMarketMakerProtectionConfigResponse underlyingId( } /** - * Get underlyingId + * underlying Id * * @return underlyingId */ @@ -109,7 +109,7 @@ public GetMarketMakerProtectionConfigResponse underlying( } /** - * Get underlying + * underlying * * @return underlying */ @@ -129,7 +129,7 @@ public GetMarketMakerProtectionConfigResponse windowTimeInMilliseconds( } /** - * Get windowTimeInMilliseconds + * window Time In Milliseconds * * @return windowTimeInMilliseconds */ @@ -150,7 +150,7 @@ public GetMarketMakerProtectionConfigResponse frozenTimeInMilliseconds( } /** - * Get frozenTimeInMilliseconds + * frozen Time In Milliseconds * * @return frozenTimeInMilliseconds */ @@ -171,7 +171,7 @@ public GetMarketMakerProtectionConfigResponse qtyLimit( } /** - * Get qtyLimit + * qty Limit * * @return qtyLimit */ @@ -191,7 +191,7 @@ public GetMarketMakerProtectionConfigResponse deltaLimit( } /** - * Get deltaLimit + * delta Limit * * @return deltaLimit */ @@ -211,7 +211,7 @@ public GetMarketMakerProtectionConfigResponse lastTriggerTime( } /** - * Get lastTriggerTime + * last Trigger Time * * @return lastTriggerTime */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/HistoricalExerciseRecordsResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/HistoricalExerciseRecordsResponse.java index 6fa4b52e9..5101e9129 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/HistoricalExerciseRecordsResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/HistoricalExerciseRecordsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** HistoricalExerciseRecordsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class HistoricalExerciseRecordsResponse extends ArrayList { public HistoricalExerciseRecordsResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/HistoricalExerciseRecordsResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/HistoricalExerciseRecordsResponseInner.java index 99d21e2f0..7b0c39b7a 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/HistoricalExerciseRecordsResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/HistoricalExerciseRecordsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** HistoricalExerciseRecordsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class HistoricalExerciseRecordsResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -75,7 +75,7 @@ public HistoricalExerciseRecordsResponseInner symbol( } /** - * Get symbol + * symbol * * @return symbol */ @@ -95,7 +95,7 @@ public HistoricalExerciseRecordsResponseInner strikePrice( } /** - * Get strikePrice + * strike price * * @return strikePrice */ @@ -115,7 +115,7 @@ public HistoricalExerciseRecordsResponseInner realStrikePrice( } /** - * Get realStrikePrice + * real strike price * * @return realStrikePrice */ @@ -135,7 +135,7 @@ public HistoricalExerciseRecordsResponseInner expiryDate( } /** - * Get expiryDate + * Exercise time * * @return expiryDate */ @@ -155,7 +155,7 @@ public HistoricalExerciseRecordsResponseInner strikeResult( } /** - * Get strikeResult + * strike result * * @return strikeResult */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/IndexPriceResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/IndexPriceResponse.java index 5ef11a33f..0fbb96d7e 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/IndexPriceResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/IndexPriceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** IndexPriceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndexPriceResponse { public static final String SERIALIZED_NAME_TIME = "time"; @@ -56,7 +56,7 @@ public IndexPriceResponse time(@jakarta.annotation.Nullable Long time) { } /** - * Get time + * time * * @return time */ @@ -75,7 +75,7 @@ public IndexPriceResponse indexPrice(@jakarta.annotation.Nullable String indexPr } /** - * Get indexPrice + * index Price * * @return indexPrice */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Interval.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Interval.java new file mode 100644 index 000000000..94bc1f91c --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Interval.java @@ -0,0 +1,99 @@ +/* + * Options REST API + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets interval */ +@JsonAdapter(Interval.Adapter.class) +public enum Interval { + INTERVAL_1m("1m"), + + INTERVAL_3m("3m"), + + INTERVAL_5m("5m"), + + INTERVAL_15m("15m"), + + INTERVAL_30m("30m"), + + INTERVAL_1h("1h"), + + INTERVAL_2h("2h"), + + INTERVAL_4h("4h"), + + INTERVAL_6h("6h"), + + INTERVAL_8h("8h"), + + INTERVAL_12h("12h"), + + INTERVAL_1d("1d"), + + INTERVAL_3d("3d"), + + INTERVAL_1w("1w"), + + INTERVAL_1M("1M"); + + private String value; + + Interval(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Interval fromValue(String value) { + for (Interval b : Interval.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Interval enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Interval read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Interval.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Interval.fromValue(value); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/KlineCandlestickDataItem.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/KlineCandlestickDataItem.java new file mode 100644 index 000000000..472731b68 --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/KlineCandlestickDataItem.java @@ -0,0 +1,183 @@ +/* + * Options REST API + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.rest.model; + +import com.binance.connector.client.derivatives_trading_options.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** KlineCandlestickDataItem */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class KlineCandlestickDataItem extends ArrayList { + public KlineCandlestickDataItem() {} + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KlineCandlestickDataItem {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to KlineCandlestickDataItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be a array type in the JSON string but got" + + " `%s`", + jsonElement.toString())); + } + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for (JsonElement element : array) { + KlineCandlestickDataItemInner.validateJsonElement(element); + } + if (jsonElement == null) { + if (!KlineCandlestickDataItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in KlineCandlestickDataItem is not found" + + " in the empty JSON string", + KlineCandlestickDataItem.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!KlineCandlestickDataItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'KlineCandlestickDataItem' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(KlineCandlestickDataItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, KlineCandlestickDataItem value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); + elementAdapter.write(out, obj); + } + + @Override + public KlineCandlestickDataItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of KlineCandlestickDataItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of KlineCandlestickDataItem + * @throws IOException if the JSON string is invalid with respect to KlineCandlestickDataItem + */ + public static KlineCandlestickDataItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, KlineCandlestickDataItem.class); + } + + /** + * Convert an instance of KlineCandlestickDataItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/KlineCandlestickDataItemInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/KlineCandlestickDataItemInner.java new file mode 100644 index 000000000..e69567c5c --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/KlineCandlestickDataItemInner.java @@ -0,0 +1,311 @@ +/* + * Options REST API + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.rest.model; + +import com.binance.connector.client.common.AbstractOpenApiSchema; +import com.binance.connector.client.derivatives_trading_options.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonPrimitive; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.hibernate.validator.constraints.*; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class KlineCandlestickDataItemInner extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(KlineCandlestickDataItemInner.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!KlineCandlestickDataItemInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'KlineCandlestickDataItemInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterLong = + gson.getDelegateAdapter(this, TypeToken.get(Long.class)); + final TypeAdapter adapterString = + gson.getDelegateAdapter(this, TypeToken.get(String.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, KlineCandlestickDataItemInner value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `Long` + if (value.getActualInstance() instanceof Long) { + JsonPrimitive primitive = + adapterLong + .toJsonTree((Long) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + // check if the actual instance is of the type `String` + if (value.getActualInstance() instanceof String) { + JsonPrimitive primitive = + adapterString + .toJsonTree((String) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " Long, String"); + } + + @Override + public KlineCandlestickDataItemInner read(JsonReader in) + throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize Long + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterLong; + match++; + log.log(Level.FINER, "Input data matches schema 'Long'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for Long failed with `%s`.", + e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Long'", e); + } + // deserialize String + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterString; + match++; + log.log(Level.FINER, "Input data matches schema 'String'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for String failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'String'", + e); + } + + if (match == 1) { + KlineCandlestickDataItemInner ret = + new KlineCandlestickDataItemInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for" + + " KlineCandlestickDataItemInner: %d classes match" + + " result, expected 1. Detailed failure message" + + " for oneOf schemas: %s. JSON: %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public KlineCandlestickDataItemInner() { + super("oneOf", Boolean.FALSE); + } + + public KlineCandlestickDataItemInner(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Long", Long.class); + schemas.put("String", String.class); + } + + @Override + public Map> getSchemas() { + return KlineCandlestickDataItemInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: Long, String + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof Long) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof String) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Long, String"); + } + + /** + * Get the actual instance, which can be the following: Long, String + * + * @return The actual instance (Long, String) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Long`. If the actual instance is not `Long`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `Long` + * @throws ClassCastException if the instance is not `Long` + */ + public Long getLong() throws ClassCastException { + return (Long) super.getActualInstance(); + } + + /** + * Get the actual instance of `String`. If the actual instance is not `String`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String) super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * KlineCandlestickDataItemInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with Long + try { + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for Long failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with String + try { + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for String failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for KlineCandlestickDataItemInner with" + + " oneOf schemas: Long, String. %d class(es) match the result," + + " expected 1. Detailed failure message for oneOf schemas: %s." + + " JSON: %s", + validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of KlineCandlestickDataItemInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of KlineCandlestickDataItemInner + * @throws IOException if the JSON string is invalid with respect to + * KlineCandlestickDataItemInner + */ + public static KlineCandlestickDataItemInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, KlineCandlestickDataItemInner.class); + } + + /** + * Convert an instance of KlineCandlestickDataItemInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/KlineCandlestickDataResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/KlineCandlestickDataResponse.java index 07ade08c4..0fd685b4f 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/KlineCandlestickDataResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/KlineCandlestickDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,8 +34,8 @@ /** KlineCandlestickDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class KlineCandlestickDataResponse extends ArrayList { + comments = "Generator version: 7.22.0") +public class KlineCandlestickDataResponse extends ArrayList { public KlineCandlestickDataResponse() {} @Override @@ -117,7 +117,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - KlineCandlestickDataResponseItem.validateJsonElement(element); + KlineCandlestickDataItem.validateJsonElement(element); } if (jsonElement == null) { if (!KlineCandlestickDataResponse.openapiRequiredFields diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/KlineCandlestickDataResponseItem.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/KlineCandlestickDataResponseItem.java deleted file mode 100644 index 0e6c237c9..000000000 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/KlineCandlestickDataResponseItem.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_options.rest.model; - -import com.binance.connector.client.derivatives_trading_options.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** KlineCandlestickDataResponseItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class KlineCandlestickDataResponseItem extends ArrayList { - public KlineCandlestickDataResponseItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class KlineCandlestickDataResponseItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * KlineCandlestickDataResponseItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - KlineCandlestickDataResponseItemInner.validateJsonElement(element); - } - if (jsonElement == null) { - if (!KlineCandlestickDataResponseItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in KlineCandlestickDataResponseItem is" - + " not found in the empty JSON string", - KlineCandlestickDataResponseItem.openapiRequiredFields.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!KlineCandlestickDataResponseItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'KlineCandlestickDataResponseItem' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(KlineCandlestickDataResponseItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, KlineCandlestickDataResponseItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public KlineCandlestickDataResponseItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of KlineCandlestickDataResponseItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of KlineCandlestickDataResponseItem - * @throws IOException if the JSON string is invalid with respect to - * KlineCandlestickDataResponseItem - */ - public static KlineCandlestickDataResponseItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, KlineCandlestickDataResponseItem.class); - } - - /** - * Convert an instance of KlineCandlestickDataResponseItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/KlineCandlestickDataResponseItemInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/KlineCandlestickDataResponseItemInner.java deleted file mode 100644 index a44ce9b34..000000000 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/KlineCandlestickDataResponseItemInner.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_options.rest.model; - -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.binance.connector.client.derivatives_trading_options.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonPrimitive; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class KlineCandlestickDataResponseItemInner extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(KlineCandlestickDataResponseItemInner.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!KlineCandlestickDataResponseItemInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'KlineCandlestickDataResponseItemInner' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterLong = - gson.getDelegateAdapter(this, TypeToken.get(Long.class)); - final TypeAdapter adapterString = - gson.getDelegateAdapter(this, TypeToken.get(String.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, KlineCandlestickDataResponseItemInner value) - throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `Long` - if (value.getActualInstance() instanceof Long) { - JsonPrimitive primitive = - adapterLong - .toJsonTree((Long) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - // check if the actual instance is of the type `String` - if (value.getActualInstance() instanceof String) { - JsonPrimitive primitive = - adapterString - .toJsonTree((String) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " Long, String"); - } - - @Override - public KlineCandlestickDataResponseItemInner read(JsonReader in) - throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize Long - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterLong; - match++; - log.log(Level.FINER, "Input data matches schema 'Long'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for Long failed with `%s`.", - e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Long'", e); - } - // deserialize String - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterString; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for String failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'String'", - e); - } - - if (match == 1) { - KlineCandlestickDataResponseItemInner ret = - new KlineCandlestickDataResponseItemInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for" - + " KlineCandlestickDataResponseItemInner: %d" - + " classes match result, expected 1. Detailed" - + " failure message for oneOf schemas: %s. JSON:" - + " %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public KlineCandlestickDataResponseItemInner() { - super("oneOf", Boolean.FALSE); - } - - public KlineCandlestickDataResponseItemInner(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Long", Long.class); - schemas.put("String", String.class); - } - - @Override - public Map> getSchemas() { - return KlineCandlestickDataResponseItemInner.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Long, String - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof Long) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof String) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Long, String"); - } - - /** - * Get the actual instance, which can be the following: Long, String - * - * @return The actual instance (Long, String) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Long`. If the actual instance is not `Long`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Long` - * @throws ClassCastException if the instance is not `Long` - */ - public Long getLong() throws ClassCastException { - return (Long) super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * KlineCandlestickDataResponseItemInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Long - try { - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for Long failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with String - try { - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for String failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for KlineCandlestickDataResponseItemInner" - + " with oneOf schemas: Long, String. %d class(es) match the" - + " result, expected 1. Detailed failure message for oneOf schemas:" - + " %s. JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of KlineCandlestickDataResponseItemInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of KlineCandlestickDataResponseItemInner - * @throws IOException if the JSON string is invalid with respect to - * KlineCandlestickDataResponseItemInner - */ - public static KlineCandlestickDataResponseItemInner fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, KlineCandlestickDataResponseItemInner.class); - } - - /** - * Convert an instance of KlineCandlestickDataResponseItemInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Legs.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Legs.java index 6bc02e7db..5694f54b9 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Legs.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Legs.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -31,11 +31,15 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** Legs */ +/** + * Max 1 (only single leg supported), list of legs parameters in JSON; example: + * eapi/v1/block/order/create?orders=[{\"symbol\":\"BTC-210115-35000-C\", + * \"price\":\"100\",\"quantity\":\"0.0002\",\"side\":\"BUY\",\"type\":\"LIMIT\"}] + */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Legs extends ArrayList { + comments = "Generator version: 7.22.0") +public class Legs extends ArrayList { public Legs() {} @Override @@ -116,13 +120,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - if (!element.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected array items to be of type Number in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } + LegsInner.validateJsonElement(element); } if (jsonElement == null) { if (!Legs.openapiRequiredFields diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/LegsInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/LegsInner.java new file mode 100644 index 000000000..4a815b05f --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/LegsInner.java @@ -0,0 +1,488 @@ +/* + * Options REST API + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.rest.model; + +import com.binance.connector.client.derivatives_trading_options.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** LegsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class LegsInner { + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nonnull + private String symbol; + + /** Buy/sell direction */ + @JsonAdapter(SideEnum.Adapter.class) + public enum SideEnum { + BUY("BUY"), + + SELL("SELL"); + + private String value; + + SideEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SideEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SideEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SideEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SideEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SIDE = "side"; + + @SerializedName(SERIALIZED_NAME_SIDE) + @jakarta.annotation.Nonnull + private SideEnum side; + + /** Order type */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIMIT("LIMIT"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @jakarta.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + + @SerializedName(SERIALIZED_NAME_QUANTITY) + @jakarta.annotation.Nonnull + private String quantity; + + public static final String SERIALIZED_NAME_PRICE = "price"; + + @SerializedName(SERIALIZED_NAME_PRICE) + @jakarta.annotation.Nullable + private String price; + + public LegsInner() {} + + public LegsInner symbol(@jakarta.annotation.Nonnull String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Option trading pair + * + * @return symbol + */ + @jakarta.annotation.Nonnull + @NotNull + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + this.symbol = symbol; + } + + public LegsInner side(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + return this; + } + + /** + * Buy/sell direction + * + * @return side + */ + @jakarta.annotation.Nonnull + @NotNull + public SideEnum getSide() { + return side; + } + + public void setSide(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + } + + public LegsInner type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Order type + * + * @return type + */ + @jakarta.annotation.Nonnull + @NotNull + public TypeEnum getType() { + return type; + } + + public void setType(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public LegsInner quantity(@jakarta.annotation.Nonnull String quantity) { + this.quantity = quantity; + return this; + } + + /** + * Order quantity + * + * @return quantity + */ + @jakarta.annotation.Nonnull + @NotNull + public String getQuantity() { + return quantity; + } + + public void setQuantity(@jakarta.annotation.Nonnull String quantity) { + this.quantity = quantity; + } + + public LegsInner price(@jakarta.annotation.Nullable String price) { + this.price = price; + return this; + } + + /** + * Order price + * + * @return price + */ + @jakarta.annotation.Nullable + public String getPrice() { + return price; + } + + public void setPrice(@jakarta.annotation.Nullable String price) { + this.price = price; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegsInner legsInner = (LegsInner) o; + return Objects.equals(this.symbol, legsInner.symbol) + && Objects.equals(this.side, legsInner.side) + && Objects.equals(this.type, legsInner.type) + && Objects.equals(this.quantity, legsInner.quantity) + && Objects.equals(this.price, legsInner.price); + } + + @Override + public int hashCode() { + return Objects.hash(symbol, side, type, quantity, price); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegsInner {\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" side: ").append(toIndentedString(side)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" price: ").append(toIndentedString(price)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object symbolValue = getSymbol(); + String symbolValueAsString = ""; + symbolValueAsString = symbolValue.toString(); + sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); + Object sideValue = getSide(); + String sideValueAsString = ""; + sideValueAsString = sideValue.toString(); + sb.append("side=").append(urlEncode(sideValueAsString)).append(""); + Object typeValue = getType(); + String typeValueAsString = ""; + typeValueAsString = typeValue.toString(); + sb.append("type=").append(urlEncode(typeValueAsString)).append(""); + Object quantityValue = getQuantity(); + String quantityValueAsString = ""; + quantityValueAsString = quantityValue.toString(); + sb.append("quantity=").append(urlEncode(quantityValueAsString)).append(""); + Object priceValue = getPrice(); + String priceValueAsString = ""; + priceValueAsString = priceValue.toString(); + sb.append("price=").append(urlEncode(priceValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("symbol"); + openapiFields.add("side"); + openapiFields.add("type"); + openapiFields.add("quantity"); + openapiFields.add("price"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("symbol"); + openapiRequiredFields.add("side"); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("quantity"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LegsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LegsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in LegsInner is not found in the empty" + + " JSON string", + LegsInner.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LegsInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + if (!jsonObj.get("side").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `side` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("side").toString())); + } + // validate the required field `side` + SideEnum.validateJsonElement(jsonObj.get("side")); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("quantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `quantity` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("quantity").toString())); + } + if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) + && !jsonObj.get("price").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `price` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("price").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LegsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LegsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(LegsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, LegsInner value) throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LegsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of LegsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of LegsInner + * @throws IOException if the JSON string is invalid with respect to LegsInner + */ + public static LegsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LegsInner.class); + } + + /** + * Convert an instance of LegsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Liquidity.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Liquidity.java new file mode 100644 index 000000000..f4b4d2afd --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Liquidity.java @@ -0,0 +1,73 @@ +/* + * Options REST API + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets liquidity */ +@JsonAdapter(Liquidity.Adapter.class) +public enum Liquidity { + MAKER("MAKER"), + + TAKER("TAKER"); + + private String value; + + Liquidity(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Liquidity fromValue(String value) { + for (Liquidity b : Liquidity.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Liquidity enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Liquidity read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Liquidity.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Liquidity.fromValue(value); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewBlockTradeOrderRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewBlockTradeOrderRequest.java index 416099c50..40cd96446 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewBlockTradeOrderRequest.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewBlockTradeOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -35,13 +35,13 @@ /** NewBlockTradeOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewBlockTradeOrderRequest { public static final String SERIALIZED_NAME_LIQUIDITY = "liquidity"; @SerializedName(SERIALIZED_NAME_LIQUIDITY) @jakarta.annotation.Nonnull - private String liquidity; + private Liquidity liquidity; public static final String SERIALIZED_NAME_LEGS = "legs"; @@ -57,7 +57,7 @@ public class NewBlockTradeOrderRequest { public NewBlockTradeOrderRequest() {} - public NewBlockTradeOrderRequest liquidity(@jakarta.annotation.Nonnull String liquidity) { + public NewBlockTradeOrderRequest liquidity(@jakarta.annotation.Nonnull Liquidity liquidity) { this.liquidity = liquidity; return this; } @@ -69,11 +69,12 @@ public NewBlockTradeOrderRequest liquidity(@jakarta.annotation.Nonnull String li */ @jakarta.annotation.Nonnull @NotNull - public String getLiquidity() { + @Valid + public Liquidity getLiquidity() { return liquidity; } - public void setLiquidity(@jakarta.annotation.Nonnull String liquidity) { + public void setLiquidity(@jakarta.annotation.Nonnull Liquidity liquidity) { this.liquidity = liquidity; } @@ -104,11 +105,12 @@ public NewBlockTradeOrderRequest recvWindow(@jakarta.annotation.Nullable Long re } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -228,13 +230,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("liquidity").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `liquidity` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("liquidity").toString())); - } + // validate the required field `liquidity` + Liquidity.validateJsonElement(jsonObj.get("liquidity")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewBlockTradeOrderResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewBlockTradeOrderResponse.java index f4efd3e3a..7642cb103 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewBlockTradeOrderResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewBlockTradeOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** NewBlockTradeOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewBlockTradeOrderResponse { public static final String SERIALIZED_NAME_BLOCK_TRADE_SETTLEMENT_KEY = "blockTradeSettlementKey"; @@ -82,7 +82,7 @@ public NewBlockTradeOrderResponse blockTradeSettlementKey( } /** - * Get blockTradeSettlementKey + * block Trade Settlement Key * * @return blockTradeSettlementKey */ @@ -102,7 +102,7 @@ public NewBlockTradeOrderResponse expireTime(@jakarta.annotation.Nullable Long e } /** - * Get expireTime + * expire Time * * @return expireTime */ @@ -121,7 +121,7 @@ public NewBlockTradeOrderResponse liquidity(@jakarta.annotation.Nullable String } /** - * Get liquidity + * liquidity * * @return liquidity */ @@ -140,7 +140,7 @@ public NewBlockTradeOrderResponse status(@jakarta.annotation.Nullable String sta } /** - * Get status + * status * * @return status */ @@ -168,7 +168,7 @@ public NewBlockTradeOrderResponse addLegsItem(ExtendBlockTradeOrderResponseLegsI } /** - * Get legs + * legs * * @return legs */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewOrderRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewOrderRequest.java index 5660106b8..a7efbb5f9 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewOrderRequest.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** NewOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewOrderRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -53,7 +53,7 @@ public class NewOrderRequest { @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private Type type; + private OrderType type; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @@ -71,25 +71,25 @@ public class NewOrderRequest { @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) @jakarta.annotation.Nullable - private TimeInForce timeInForce; + private TimeInForce timeInForce = TimeInForce.GTC; public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) @jakarta.annotation.Nullable - private Boolean reduceOnly; + private Boolean reduceOnly = false; public static final String SERIALIZED_NAME_POST_ONLY = "postOnly"; @SerializedName(SERIALIZED_NAME_POST_ONLY) @jakarta.annotation.Nullable - private Boolean postOnly; + private Boolean postOnly = false; public static final String SERIALIZED_NAME_NEW_ORDER_RESP_TYPE = "newOrderRespType"; @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESP_TYPE) @jakarta.annotation.Nullable - private NewOrderRespType newOrderRespType; + private NewOrderRespType newOrderRespType = NewOrderRespType.ACK; public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -159,7 +159,7 @@ public void setSide(@jakarta.annotation.Nonnull Side side) { this.side = side; } - public NewOrderRequest type(@jakarta.annotation.Nonnull Type type) { + public NewOrderRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -172,11 +172,11 @@ public NewOrderRequest type(@jakarta.annotation.Nonnull Type type) { @jakarta.annotation.Nonnull @NotNull @Valid - public Type getType() { + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull Type type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } @@ -186,7 +186,7 @@ public NewOrderRequest quantity(@jakarta.annotation.Nonnull Double quantity) { } /** - * Get quantity + * Order Quantity * * @return quantity */ @@ -207,7 +207,7 @@ public NewOrderRequest price(@jakarta.annotation.Nullable Double price) { } /** - * Get price + * Order Price * * @return price */ @@ -307,7 +307,7 @@ public NewOrderRequest clientOrderId(@jakarta.annotation.Nullable String clientO } /** - * Get clientOrderId + * User-defined order ID cannot be repeated in pending orders * * @return clientOrderId */ @@ -326,7 +326,7 @@ public NewOrderRequest isMmp(@jakarta.annotation.Nullable Boolean isMmp) { } /** - * Get isMmp + * is market maker protection order * * @return isMmp */ @@ -591,7 +591,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the required field `side` Side.validateJsonElement(jsonObj.get("side")); // validate the required field `type` - Type.validateJsonElement(jsonObj.get("type")); + OrderType.validateJsonElement(jsonObj.get("type")); // validate the optional field `timeInForce` if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { TimeInForce.validateJsonElement(jsonObj.get("timeInForce")); diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewOrderRespType.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewOrderRespType.java index 2fdf9897d..676d3c4f4 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewOrderRespType.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewOrderRespType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewOrderResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewOrderResponse.java index f07a7b166..ab4e9931a 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewOrderResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/NewOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** NewOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewOrderResponse { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -66,6 +66,12 @@ public class NewOrderResponse { @jakarta.annotation.Nullable private String executedQty; + public static final String SERIALIZED_NAME_FEE = "fee"; + + @SerializedName(SERIALIZED_NAME_FEE) + @jakarta.annotation.Nullable + private Long fee; + public static final String SERIALIZED_NAME_SIDE = "side"; @SerializedName(SERIALIZED_NAME_SIDE) @@ -90,6 +96,12 @@ public class NewOrderResponse { @jakarta.annotation.Nullable private Boolean reduceOnly; + public static final String SERIALIZED_NAME_POST_ONLY = "postOnly"; + + @SerializedName(SERIALIZED_NAME_POST_ONLY) + @jakarta.annotation.Nullable + private Boolean postOnly; + public static final String SERIALIZED_NAME_CREATE_TIME = "createTime"; @SerializedName(SERIALIZED_NAME_CREATE_TIME) @@ -171,7 +183,7 @@ public NewOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * System order number * * @return orderId */ @@ -190,7 +202,7 @@ public NewOrderResponse symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Option trading pair * * @return symbol */ @@ -209,7 +221,7 @@ public NewOrderResponse price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Order Price * * @return price */ @@ -228,7 +240,7 @@ public NewOrderResponse quantity(@jakarta.annotation.Nullable String quantity) { } /** - * Get quantity + * Order Quantity * * @return quantity */ @@ -247,7 +259,7 @@ public NewOrderResponse executedQty(@jakarta.annotation.Nullable String executed } /** - * Get executedQty + * Number of executed quantity * * @return executedQty */ @@ -260,13 +272,32 @@ public void setExecutedQty(@jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; } + public NewOrderResponse fee(@jakarta.annotation.Nullable Long fee) { + this.fee = fee; + return this; + } + + /** + * fee + * + * @return fee + */ + @jakarta.annotation.Nullable + public Long getFee() { + return fee; + } + + public void setFee(@jakarta.annotation.Nullable Long fee) { + this.fee = fee; + } + public NewOrderResponse side(@jakarta.annotation.Nullable String side) { this.side = side; return this; } /** - * Get side + * Buy/sell direction * * @return side */ @@ -285,7 +316,7 @@ public NewOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Order type * * @return type */ @@ -304,7 +335,7 @@ public NewOrderResponse timeInForce(@jakarta.annotation.Nullable String timeInFo } /** - * Get timeInForce + * Time in force method * * @return timeInForce */ @@ -323,7 +354,7 @@ public NewOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean reduceOn } /** - * Get reduceOnly + * Order is reduce only Y/N * * @return reduceOnly */ @@ -336,13 +367,32 @@ public void setReduceOnly(@jakarta.annotation.Nullable Boolean reduceOnly) { this.reduceOnly = reduceOnly; } + public NewOrderResponse postOnly(@jakarta.annotation.Nullable Boolean postOnly) { + this.postOnly = postOnly; + return this; + } + + /** + * post Only + * + * @return postOnly + */ + @jakarta.annotation.Nullable + public Boolean getPostOnly() { + return postOnly; + } + + public void setPostOnly(@jakarta.annotation.Nullable Boolean postOnly) { + this.postOnly = postOnly; + } + public NewOrderResponse createTime(@jakarta.annotation.Nullable Long createTime) { this.createTime = createTime; return this; } /** - * Get createTime + * Order Time * * @return createTime */ @@ -361,7 +411,7 @@ public NewOrderResponse updateTime(@jakarta.annotation.Nullable Long updateTime) } /** - * Get updateTime + * Update time * * @return updateTime */ @@ -380,7 +430,7 @@ public NewOrderResponse status(@jakarta.annotation.Nullable String status) { } /** - * Get status + * Order status * * @return status */ @@ -399,7 +449,7 @@ public NewOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPrice) { } /** - * Get avgPrice + * Average price of completed trade * * @return avgPrice */ @@ -418,7 +468,7 @@ public NewOrderResponse source(@jakarta.annotation.Nullable String source) { } /** - * Get source + * source * * @return source */ @@ -437,7 +487,7 @@ public NewOrderResponse clientOrderId(@jakarta.annotation.Nullable String client } /** - * Get clientOrderId + * Client order ID * * @return clientOrderId */ @@ -456,7 +506,7 @@ public NewOrderResponse priceScale(@jakarta.annotation.Nullable Long priceScale) } /** - * Get priceScale + * price Scale * * @return priceScale */ @@ -475,7 +525,7 @@ public NewOrderResponse quantityScale(@jakarta.annotation.Nullable Long quantity } /** - * Get quantityScale + * quantity Scale * * @return quantityScale */ @@ -494,7 +544,7 @@ public NewOrderResponse optionSide(@jakarta.annotation.Nullable String optionSid } /** - * Get optionSide + * option Side * * @return optionSide */ @@ -513,7 +563,7 @@ public NewOrderResponse quoteAsset(@jakarta.annotation.Nullable String quoteAsse } /** - * Get quoteAsset + * quote Asset * * @return quoteAsset */ @@ -532,7 +582,7 @@ public NewOrderResponse mmp(@jakarta.annotation.Nullable Boolean mmp) { } /** - * Get mmp + * mmp * * @return mmp */ @@ -552,7 +602,7 @@ public NewOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * Self-trade prevention mode * * @return selfTradePreventionMode */ @@ -580,10 +630,12 @@ public boolean equals(Object o) { && Objects.equals(this.price, newOrderResponse.price) && Objects.equals(this.quantity, newOrderResponse.quantity) && Objects.equals(this.executedQty, newOrderResponse.executedQty) + && Objects.equals(this.fee, newOrderResponse.fee) && Objects.equals(this.side, newOrderResponse.side) && Objects.equals(this.type, newOrderResponse.type) && Objects.equals(this.timeInForce, newOrderResponse.timeInForce) && Objects.equals(this.reduceOnly, newOrderResponse.reduceOnly) + && Objects.equals(this.postOnly, newOrderResponse.postOnly) && Objects.equals(this.createTime, newOrderResponse.createTime) && Objects.equals(this.updateTime, newOrderResponse.updateTime) && Objects.equals(this.status, newOrderResponse.status) @@ -607,10 +659,12 @@ public int hashCode() { price, quantity, executedQty, + fee, side, type, timeInForce, reduceOnly, + postOnly, createTime, updateTime, status, @@ -634,10 +688,12 @@ public String toString() { sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); + sb.append(" postOnly: ").append(toIndentedString(postOnly)).append("\n"); sb.append(" createTime: ").append(toIndentedString(createTime)).append("\n"); sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); @@ -679,6 +735,10 @@ public String toUrlQueryString() { String executedQtyValueAsString = ""; executedQtyValueAsString = executedQtyValue.toString(); sb.append("executedQty=").append(urlEncode(executedQtyValueAsString)).append(""); + Object feeValue = getFee(); + String feeValueAsString = ""; + feeValueAsString = feeValue.toString(); + sb.append("fee=").append(urlEncode(feeValueAsString)).append(""); Object sideValue = getSide(); String sideValueAsString = ""; sideValueAsString = sideValue.toString(); @@ -695,6 +755,10 @@ public String toUrlQueryString() { String reduceOnlyValueAsString = ""; reduceOnlyValueAsString = reduceOnlyValue.toString(); sb.append("reduceOnly=").append(urlEncode(reduceOnlyValueAsString)).append(""); + Object postOnlyValue = getPostOnly(); + String postOnlyValueAsString = ""; + postOnlyValueAsString = postOnlyValue.toString(); + sb.append("postOnly=").append(urlEncode(postOnlyValueAsString)).append(""); Object createTimeValue = getCreateTime(); String createTimeValueAsString = ""; createTimeValueAsString = createTimeValue.toString(); @@ -778,10 +842,12 @@ private String toIndentedString(Object o) { openapiFields.add("price"); openapiFields.add("quantity"); openapiFields.add("executedQty"); + openapiFields.add("fee"); openapiFields.add("side"); openapiFields.add("type"); openapiFields.add("timeInForce"); openapiFields.add("reduceOnly"); + openapiFields.add("postOnly"); openapiFields.add("createTime"); openapiFields.add("updateTime"); openapiFields.add("status"); diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OpenInterestResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OpenInterestResponse.java index 80001e6fe..54f249999 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OpenInterestResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OpenInterestResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OpenInterestResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenInterestResponse extends ArrayList { public OpenInterestResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OpenInterestResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OpenInterestResponseInner.java index 78885d58f..1e6886c71 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OpenInterestResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OpenInterestResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OpenInterestResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenInterestResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -68,7 +68,7 @@ public OpenInterestResponseInner symbol(@jakarta.annotation.Nullable String symb } /** - * Get symbol + * symbol * * @return symbol */ @@ -88,7 +88,7 @@ public OpenInterestResponseInner sumOpenInterest( } /** - * Get sumOpenInterest + * sum Open Interest * * @return sumOpenInterest */ @@ -108,7 +108,7 @@ public OpenInterestResponseInner sumOpenInterestUsd( } /** - * Get sumOpenInterestUsd + * sum Open Interest Usd * * @return sumOpenInterestUsd */ @@ -127,7 +127,7 @@ public OpenInterestResponseInner timestamp(@jakarta.annotation.Nullable String t } /** - * Get timestamp + * timestamp * * @return timestamp */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarginAccountInformationResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarginAccountInformationResponse.java index 844e56abc..4c0f42a91 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarginAccountInformationResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarginAccountInformationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** OptionMarginAccountInformationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OptionMarginAccountInformationResponse { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -109,7 +109,7 @@ public OptionMarginAccountInformationResponse addAssetItem( } /** - * Get asset + * asset * * @return asset */ @@ -142,7 +142,7 @@ public OptionMarginAccountInformationResponse addGreekItem( } /** - * Get greek + * greek * * @return greek */ @@ -164,7 +164,7 @@ public OptionMarginAccountInformationResponse time(@jakarta.annotation.Nullable } /** - * Get time + * time * * @return time */ @@ -184,7 +184,7 @@ public OptionMarginAccountInformationResponse canTrade( } /** - * Get canTrade + * can Trade * * @return canTrade */ @@ -204,7 +204,7 @@ public OptionMarginAccountInformationResponse canDeposit( } /** - * Get canDeposit + * can Deposit * * @return canDeposit */ @@ -224,7 +224,7 @@ public OptionMarginAccountInformationResponse canWithdraw( } /** - * Get canWithdraw + * can Withdraw * * @return canWithdraw */ @@ -244,7 +244,7 @@ public OptionMarginAccountInformationResponse reduceOnly( } /** - * Get reduceOnly + * reduce Only * * @return reduceOnly */ @@ -264,7 +264,7 @@ public OptionMarginAccountInformationResponse tradeGroupId( } /** - * Get tradeGroupId + * Trade group ID * * @return tradeGroupId */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarginAccountInformationResponseAssetInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarginAccountInformationResponseAssetInner.java index ee1b95588..09e7c4b49 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarginAccountInformationResponseAssetInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarginAccountInformationResponseAssetInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OptionMarginAccountInformationResponseAssetInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OptionMarginAccountInformationResponseAssetInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -93,7 +93,7 @@ public OptionMarginAccountInformationResponseAssetInner asset( } /** - * Get asset + * asset * * @return asset */ @@ -113,7 +113,7 @@ public OptionMarginAccountInformationResponseAssetInner marginBalance( } /** - * Get marginBalance + * margin Balance * * @return marginBalance */ @@ -133,7 +133,7 @@ public OptionMarginAccountInformationResponseAssetInner equity( } /** - * Get equity + * equity * * @return equity */ @@ -153,7 +153,7 @@ public OptionMarginAccountInformationResponseAssetInner available( } /** - * Get available + * available * * @return available */ @@ -173,7 +173,7 @@ public OptionMarginAccountInformationResponseAssetInner initialMargin( } /** - * Get initialMargin + * initial Margin * * @return initialMargin */ @@ -193,7 +193,7 @@ public OptionMarginAccountInformationResponseAssetInner maintMargin( } /** - * Get maintMargin + * maint Margin * * @return maintMargin */ @@ -213,7 +213,7 @@ public OptionMarginAccountInformationResponseAssetInner unrealizedPNL( } /** - * Get unrealizedPNL + * unrealized PNL * * @return unrealizedPNL */ @@ -233,7 +233,7 @@ public OptionMarginAccountInformationResponseAssetInner adjustedEquity( } /** - * Get adjustedEquity + * adjusted Equity * * @return adjustedEquity */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarginAccountInformationResponseGreekInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarginAccountInformationResponseGreekInner.java index 00eb6b4a6..588923938 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarginAccountInformationResponseGreekInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarginAccountInformationResponseGreekInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OptionMarginAccountInformationResponseGreekInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OptionMarginAccountInformationResponseGreekInner { public static final String SERIALIZED_NAME_UNDERLYING = "underlying"; @@ -48,18 +48,18 @@ public class OptionMarginAccountInformationResponseGreekInner { @jakarta.annotation.Nullable private String delta; - public static final String SERIALIZED_NAME_THETA = "theta"; - - @SerializedName(SERIALIZED_NAME_THETA) - @jakarta.annotation.Nullable - private String theta; - public static final String SERIALIZED_NAME_GAMMA = "gamma"; @SerializedName(SERIALIZED_NAME_GAMMA) @jakarta.annotation.Nullable private String gamma; + public static final String SERIALIZED_NAME_THETA = "theta"; + + @SerializedName(SERIALIZED_NAME_THETA) + @jakarta.annotation.Nullable + private String theta; + public static final String SERIALIZED_NAME_VEGA = "vega"; @SerializedName(SERIALIZED_NAME_VEGA) @@ -75,7 +75,7 @@ public OptionMarginAccountInformationResponseGreekInner underlying( } /** - * Get underlying + * underlying * * @return underlying */ @@ -95,7 +95,7 @@ public OptionMarginAccountInformationResponseGreekInner delta( } /** - * Get delta + * delta * * @return delta */ @@ -108,44 +108,44 @@ public void setDelta(@jakarta.annotation.Nullable String delta) { this.delta = delta; } - public OptionMarginAccountInformationResponseGreekInner theta( - @jakarta.annotation.Nullable String theta) { - this.theta = theta; + public OptionMarginAccountInformationResponseGreekInner gamma( + @jakarta.annotation.Nullable String gamma) { + this.gamma = gamma; return this; } /** - * Get theta + * gamma * - * @return theta + * @return gamma */ @jakarta.annotation.Nullable - public String getTheta() { - return theta; + public String getGamma() { + return gamma; } - public void setTheta(@jakarta.annotation.Nullable String theta) { - this.theta = theta; + public void setGamma(@jakarta.annotation.Nullable String gamma) { + this.gamma = gamma; } - public OptionMarginAccountInformationResponseGreekInner gamma( - @jakarta.annotation.Nullable String gamma) { - this.gamma = gamma; + public OptionMarginAccountInformationResponseGreekInner theta( + @jakarta.annotation.Nullable String theta) { + this.theta = theta; return this; } /** - * Get gamma + * theta * - * @return gamma + * @return theta */ @jakarta.annotation.Nullable - public String getGamma() { - return gamma; + public String getTheta() { + return theta; } - public void setGamma(@jakarta.annotation.Nullable String gamma) { - this.gamma = gamma; + public void setTheta(@jakarta.annotation.Nullable String theta) { + this.theta = theta; } public OptionMarginAccountInformationResponseGreekInner vega( @@ -155,7 +155,7 @@ public OptionMarginAccountInformationResponseGreekInner vega( } /** - * Get vega + * vega * * @return vega */ @@ -184,16 +184,16 @@ public boolean equals(Object o) { optionMarginAccountInformationResponseGreekInner.underlying) && Objects.equals( this.delta, optionMarginAccountInformationResponseGreekInner.delta) - && Objects.equals( - this.theta, optionMarginAccountInformationResponseGreekInner.theta) && Objects.equals( this.gamma, optionMarginAccountInformationResponseGreekInner.gamma) + && Objects.equals( + this.theta, optionMarginAccountInformationResponseGreekInner.theta) && Objects.equals(this.vega, optionMarginAccountInformationResponseGreekInner.vega); } @Override public int hashCode() { - return Objects.hash(underlying, delta, theta, gamma, vega); + return Objects.hash(underlying, delta, gamma, theta, vega); } @Override @@ -202,8 +202,8 @@ public String toString() { sb.append("class OptionMarginAccountInformationResponseGreekInner {\n"); sb.append(" underlying: ").append(toIndentedString(underlying)).append("\n"); sb.append(" delta: ").append(toIndentedString(delta)).append("\n"); - sb.append(" theta: ").append(toIndentedString(theta)).append("\n"); sb.append(" gamma: ").append(toIndentedString(gamma)).append("\n"); + sb.append(" theta: ").append(toIndentedString(theta)).append("\n"); sb.append(" vega: ").append(toIndentedString(vega)).append("\n"); sb.append("}"); return sb.toString(); @@ -220,14 +220,14 @@ public String toUrlQueryString() { String deltaValueAsString = ""; deltaValueAsString = deltaValue.toString(); sb.append("delta=").append(urlEncode(deltaValueAsString)).append(""); - Object thetaValue = getTheta(); - String thetaValueAsString = ""; - thetaValueAsString = thetaValue.toString(); - sb.append("theta=").append(urlEncode(thetaValueAsString)).append(""); Object gammaValue = getGamma(); String gammaValueAsString = ""; gammaValueAsString = gammaValue.toString(); sb.append("gamma=").append(urlEncode(gammaValueAsString)).append(""); + Object thetaValue = getTheta(); + String thetaValueAsString = ""; + thetaValueAsString = thetaValue.toString(); + sb.append("theta=").append(urlEncode(thetaValueAsString)).append(""); Object vegaValue = getVega(); String vegaValueAsString = ""; vegaValueAsString = vegaValue.toString(); @@ -262,8 +262,8 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("underlying"); openapiFields.add("delta"); - openapiFields.add("theta"); openapiFields.add("gamma"); + openapiFields.add("theta"); openapiFields.add("vega"); // a set of required properties/fields (JSON key names) @@ -308,14 +308,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("delta").toString())); } - if ((jsonObj.get("theta") != null && !jsonObj.get("theta").isJsonNull()) - && !jsonObj.get("theta").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `theta` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("theta").toString())); - } if ((jsonObj.get("gamma") != null && !jsonObj.get("gamma").isJsonNull()) && !jsonObj.get("gamma").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -324,6 +316,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("gamma").toString())); } + if ((jsonObj.get("theta") != null && !jsonObj.get("theta").isJsonNull()) + && !jsonObj.get("theta").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `theta` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("theta").toString())); + } if ((jsonObj.get("vega") != null && !jsonObj.get("vega").isJsonNull()) && !jsonObj.get("vega").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarkPriceResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarkPriceResponse.java index f0d31f517..e51099fbb 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarkPriceResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarkPriceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OptionMarkPriceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OptionMarkPriceResponse extends ArrayList { public OptionMarkPriceResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarkPriceResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarkPriceResponseInner.java index c5280768b..8862e99de 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarkPriceResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionMarkPriceResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OptionMarkPriceResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OptionMarkPriceResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -116,7 +116,7 @@ public OptionMarkPriceResponseInner symbol(@jakarta.annotation.Nullable String s } /** - * Get symbol + * symbol * * @return symbol */ @@ -135,7 +135,7 @@ public OptionMarkPriceResponseInner markPrice(@jakarta.annotation.Nullable Strin } /** - * Get markPrice + * Mark price * * @return markPrice */ @@ -154,7 +154,7 @@ public OptionMarkPriceResponseInner bidIV(@jakarta.annotation.Nullable String bi } /** - * Get bidIV + * Implied volatility Buy * * @return bidIV */ @@ -173,7 +173,7 @@ public OptionMarkPriceResponseInner askIV(@jakarta.annotation.Nullable String as } /** - * Get askIV + * Implied volatility Sell * * @return askIV */ @@ -192,7 +192,7 @@ public OptionMarkPriceResponseInner markIV(@jakarta.annotation.Nullable String m } /** - * Get markIV + * Implied volatility mark * * @return markIV */ @@ -211,7 +211,7 @@ public OptionMarkPriceResponseInner delta(@jakarta.annotation.Nullable String de } /** - * Get delta + * delta * * @return delta */ @@ -230,7 +230,7 @@ public OptionMarkPriceResponseInner theta(@jakarta.annotation.Nullable String th } /** - * Get theta + * theta * * @return theta */ @@ -249,7 +249,7 @@ public OptionMarkPriceResponseInner gamma(@jakarta.annotation.Nullable String ga } /** - * Get gamma + * gamma * * @return gamma */ @@ -268,7 +268,7 @@ public OptionMarkPriceResponseInner vega(@jakarta.annotation.Nullable String veg } /** - * Get vega + * vega * * @return vega */ @@ -288,7 +288,7 @@ public OptionMarkPriceResponseInner highPriceLimit( } /** - * Get highPriceLimit + * Current highest buy price * * @return highPriceLimit */ @@ -308,7 +308,7 @@ public OptionMarkPriceResponseInner lowPriceLimit( } /** - * Get lowPriceLimit + * Current lowest sell price * * @return lowPriceLimit */ @@ -328,7 +328,7 @@ public OptionMarkPriceResponseInner riskFreeInterest( } /** - * Get riskFreeInterest + * risk free rate * * @return riskFreeInterest */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionPositionInformationResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionPositionInformationResponse.java index 9fab05608..38292ff78 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionPositionInformationResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionPositionInformationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OptionPositionInformationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OptionPositionInformationResponse extends ArrayList { public OptionPositionInformationResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionPositionInformationResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionPositionInformationResponseInner.java index c37f8db96..73e2a711a 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionPositionInformationResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OptionPositionInformationResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OptionPositionInformationResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OptionPositionInformationResponseInner { public static final String SERIALIZED_NAME_ENTRY_PRICE = "entryPrice"; @@ -141,7 +141,7 @@ public OptionPositionInformationResponseInner entryPrice( } /** - * Get entryPrice + * Average entry price * * @return entryPrice */ @@ -161,7 +161,7 @@ public OptionPositionInformationResponseInner symbol( } /** - * Get symbol + * Option trading pair * * @return symbol */ @@ -180,7 +180,7 @@ public OptionPositionInformationResponseInner side(@jakarta.annotation.Nullable } /** - * Get side + * Position direction * * @return side */ @@ -200,7 +200,8 @@ public OptionPositionInformationResponseInner quantity( } /** - * Get quantity + * Number of positions (positive numbers represent long positions, negative number represent + * short positions) * * @return quantity */ @@ -220,7 +221,7 @@ public OptionPositionInformationResponseInner markValue( } /** - * Get markValue + * Current market value * * @return markValue */ @@ -240,7 +241,7 @@ public OptionPositionInformationResponseInner unrealizedPNL( } /** - * Get unrealizedPNL + * Unrealized profit/loss * * @return unrealizedPNL */ @@ -260,7 +261,7 @@ public OptionPositionInformationResponseInner markPrice( } /** - * Get markPrice + * Mark price * * @return markPrice */ @@ -280,7 +281,7 @@ public OptionPositionInformationResponseInner strikePrice( } /** - * Get strikePrice + * Strike price * * @return strikePrice */ @@ -300,7 +301,7 @@ public OptionPositionInformationResponseInner expiryDate( } /** - * Get expiryDate + * Exercise time * * @return expiryDate */ @@ -320,7 +321,7 @@ public OptionPositionInformationResponseInner priceScale( } /** - * Get priceScale + * price Scale * * @return priceScale */ @@ -340,7 +341,7 @@ public OptionPositionInformationResponseInner quantityScale( } /** - * Get quantityScale + * quantity Scale * * @return quantityScale */ @@ -360,7 +361,7 @@ public OptionPositionInformationResponseInner optionSide( } /** - * Get optionSide + * option type * * @return optionSide */ @@ -380,7 +381,7 @@ public OptionPositionInformationResponseInner quoteAsset( } /** - * Get quoteAsset + * quote asset * * @return quoteAsset */ @@ -399,7 +400,7 @@ public OptionPositionInformationResponseInner time(@jakarta.annotation.Nullable } /** - * Get time + * last update time * * @return time */ @@ -419,7 +420,7 @@ public OptionPositionInformationResponseInner bidQuantity( } /** - * Get bidQuantity + * buy order qty * * @return bidQuantity */ @@ -439,7 +440,7 @@ public OptionPositionInformationResponseInner askQuantity( } /** - * Get askQuantity + * sell order qty * * @return askQuantity */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrderBookResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrderBookResponse.java index 1fd6aca76..951b78305 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrderBookResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrderBookResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -39,19 +39,19 @@ /** OrderBookResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderBookResponse { public static final String SERIALIZED_NAME_BIDS = "bids"; @SerializedName(SERIALIZED_NAME_BIDS) @jakarta.annotation.Nullable - private List bids; + private List> bids; public static final String SERIALIZED_NAME_ASKS = "asks"; @SerializedName(SERIALIZED_NAME_ASKS) @jakarta.annotation.Nullable - private List asks; + private List> asks; public static final String SERIALIZED_NAME_T = "T"; @@ -67,13 +67,12 @@ public class OrderBookResponse { public OrderBookResponse() {} - public OrderBookResponse bids( - @jakarta.annotation.Nullable List bids) { + public OrderBookResponse bids(@jakarta.annotation.Nullable List> bids) { this.bids = bids; return this; } - public OrderBookResponse addBidsItem(OrderBookResponseBidsItem bidsItem) { + public OrderBookResponse addBidsItem(List bidsItem) { if (this.bids == null) { this.bids = new ArrayList<>(); } @@ -82,27 +81,26 @@ public OrderBookResponse addBidsItem(OrderBookResponseBidsItem bidsItem) { } /** - * Get bids + * Bid orders. Each entry is [price, quantity]. * * @return bids */ @jakarta.annotation.Nullable @Valid - public List getBids() { + public List> getBids() { return bids; } - public void setBids(@jakarta.annotation.Nullable List bids) { + public void setBids(@jakarta.annotation.Nullable List> bids) { this.bids = bids; } - public OrderBookResponse asks( - @jakarta.annotation.Nullable List asks) { + public OrderBookResponse asks(@jakarta.annotation.Nullable List> asks) { this.asks = asks; return this; } - public OrderBookResponse addAsksItem(OrderBookResponseAsksItem asksItem) { + public OrderBookResponse addAsksItem(List asksItem) { if (this.asks == null) { this.asks = new ArrayList<>(); } @@ -111,17 +109,17 @@ public OrderBookResponse addAsksItem(OrderBookResponseAsksItem asksItem) { } /** - * Get asks + * Ask orders. Each entry is [price, quantity]. * * @return asks */ @jakarta.annotation.Nullable @Valid - public List getAsks() { + public List> getAsks() { return asks; } - public void setAsks(@jakarta.annotation.Nullable List asks) { + public void setAsks(@jakarta.annotation.Nullable List> asks) { this.asks = asks; } @@ -131,7 +129,7 @@ public OrderBookResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * transaction time * * @return T */ @@ -150,7 +148,7 @@ public OrderBookResponse lastUpdateId(@jakarta.annotation.Nullable Long lastUpda } /** - * Get lastUpdateId + * update id * * @return lastUpdateId */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrderBookResponseAsksItem.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrderBookResponseAsksItem.java deleted file mode 100644 index 2fba7b808..000000000 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrderBookResponseAsksItem.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_options.rest.model; - -import com.binance.connector.client.derivatives_trading_options.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** OrderBookResponseAsksItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OrderBookResponseAsksItem extends ArrayList { - public OrderBookResponseAsksItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrderBookResponseAsksItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OrderBookResponseAsksItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - if (!element.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected array items to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - } - if (jsonElement == null) { - if (!OrderBookResponseAsksItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OrderBookResponseAsksItem is not found" - + " in the empty JSON string", - OrderBookResponseAsksItem.openapiRequiredFields.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrderBookResponseAsksItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OrderBookResponseAsksItem' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(OrderBookResponseAsksItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OrderBookResponseAsksItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public OrderBookResponseAsksItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OrderBookResponseAsksItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrderBookResponseAsksItem - * @throws IOException if the JSON string is invalid with respect to OrderBookResponseAsksItem - */ - public static OrderBookResponseAsksItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OrderBookResponseAsksItem.class); - } - - /** - * Convert an instance of OrderBookResponseAsksItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrderBookResponseBidsItem.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrderBookResponseBidsItem.java deleted file mode 100644 index 0b1ab12ce..000000000 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrderBookResponseBidsItem.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_options.rest.model; - -import com.binance.connector.client.derivatives_trading_options.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** OrderBookResponseBidsItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OrderBookResponseBidsItem extends ArrayList { - public OrderBookResponseBidsItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrderBookResponseBidsItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OrderBookResponseBidsItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - if (!element.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected array items to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - } - if (jsonElement == null) { - if (!OrderBookResponseBidsItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OrderBookResponseBidsItem is not found" - + " in the empty JSON string", - OrderBookResponseBidsItem.openapiRequiredFields.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrderBookResponseBidsItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OrderBookResponseBidsItem' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(OrderBookResponseBidsItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OrderBookResponseBidsItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public OrderBookResponseBidsItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OrderBookResponseBidsItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrderBookResponseBidsItem - * @throws IOException if the JSON string is invalid with respect to OrderBookResponseBidsItem - */ - public static OrderBookResponseBidsItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OrderBookResponseBidsItem.class); - } - - /** - * Convert an instance of OrderBookResponseBidsItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrderIds.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrderIds.java index cc8a59d4c..200e59db7 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrderIds.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrderIds.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderIds */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderIds extends ArrayList { public OrderIds() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrderType.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrderType.java new file mode 100644 index 000000000..37083529f --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrderType.java @@ -0,0 +1,71 @@ +/* + * Options REST API + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets orderType */ +@JsonAdapter(OrderType.Adapter.class) +public enum OrderType { + LIMIT("LIMIT"); + + private String value; + + OrderType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderType fromValue(String value) { + for (OrderType b : OrderType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderType.fromValue(value); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Orders.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Orders.java index 35ef1f4d5..af64ca4e8 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Orders.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Orders.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** Orders */ +/** order list. Max 10 orders */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Orders extends ArrayList { public Orders() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrdersInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrdersInner.java index 4c88c11f3..e6688ba69 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrdersInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -35,12 +36,12 @@ /** OrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull private String symbol; /** Gets or Sets side */ @@ -97,7 +98,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_SIDE = "side"; @SerializedName(SERIALIZED_NAME_SIDE) - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull private SideEnum side; /** Gets or Sets type */ @@ -152,20 +153,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull private TypeEnum type; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @SerializedName(SERIALIZED_NAME_QUANTITY) - @jakarta.annotation.Nullable - private String quantity; + @jakarta.annotation.Nonnull + private Double quantity; public static final String SERIALIZED_NAME_PRICE = "price"; @SerializedName(SERIALIZED_NAME_PRICE) @jakarta.annotation.Nullable - private String price; + private Double price; /** Gets or Sets timeInForce */ @JsonAdapter(TimeInForceEnum.Adapter.class) @@ -226,19 +227,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) @jakarta.annotation.Nullable - private TimeInForceEnum timeInForce; + private TimeInForceEnum timeInForce = TimeInForceEnum.GTC; public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) @jakarta.annotation.Nullable - private String reduceOnly; + private Boolean reduceOnly = false; public static final String SERIALIZED_NAME_POST_ONLY = "postOnly"; @SerializedName(SERIALIZED_NAME_POST_ONLY) @jakarta.annotation.Nullable - private String postOnly; + private Boolean postOnly = false; /** Gets or Sets newOrderRespType */ @JsonAdapter(NewOrderRespTypeEnum.Adapter.class) @@ -295,7 +296,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESP_TYPE) @jakarta.annotation.Nullable - private NewOrderRespTypeEnum newOrderRespType; + private NewOrderRespTypeEnum newOrderRespType = NewOrderRespTypeEnum.ACK; public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -307,16 +308,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_IS_MMP) @jakarta.annotation.Nullable - private String isMmp; + private Boolean isMmp; - /** Gets or Sets selfTradePreventionMode */ + /** + * EXPIRE_TAKER:expire taker order when STP triggers/ EXPIRE_MAKER:expire maker order when STP + * triggers/ EXPIRE_BOTH:expire both orders when STP triggers; Default EXPIRE_MAKER + */ @JsonAdapter(SelfTradePreventionModeEnum.Adapter.class) public enum SelfTradePreventionModeEnum { EXPIRE_TAKER("EXPIRE_TAKER"), - EXPIRE_BOTH("EXPIRE_BOTH"), + EXPIRE_MAKER("EXPIRE_MAKER"), - EXPIRE_MAKER("EXPIRE_MAKER"); + EXPIRE_BOTH("EXPIRE_BOTH"); private String value; @@ -369,11 +373,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) @jakarta.annotation.Nullable - private SelfTradePreventionModeEnum selfTradePreventionMode; + private SelfTradePreventionModeEnum selfTradePreventionMode = + SelfTradePreventionModeEnum.EXPIRE_MAKER; public OrdersInner() {} - public OrdersInner symbol(@jakarta.annotation.Nullable String symbol) { + public OrdersInner symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; } @@ -383,16 +388,17 @@ public OrdersInner symbol(@jakarta.annotation.Nullable String symbol) { * * @return symbol */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull + @NotNull public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nullable String symbol) { + public void setSymbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; } - public OrdersInner side(@jakarta.annotation.Nullable SideEnum side) { + public OrdersInner side(@jakarta.annotation.Nonnull SideEnum side) { this.side = side; return this; } @@ -402,16 +408,17 @@ public OrdersInner side(@jakarta.annotation.Nullable SideEnum side) { * * @return side */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull + @NotNull public SideEnum getSide() { return side; } - public void setSide(@jakarta.annotation.Nullable SideEnum side) { + public void setSide(@jakarta.annotation.Nonnull SideEnum side) { this.side = side; } - public OrdersInner type(@jakarta.annotation.Nullable TypeEnum type) { + public OrdersInner type(@jakarta.annotation.Nonnull TypeEnum type) { this.type = type; return this; } @@ -421,50 +428,54 @@ public OrdersInner type(@jakarta.annotation.Nullable TypeEnum type) { * * @return type */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull + @NotNull public TypeEnum getType() { return type; } - public void setType(@jakarta.annotation.Nullable TypeEnum type) { + public void setType(@jakarta.annotation.Nonnull TypeEnum type) { this.type = type; } - public OrdersInner quantity(@jakarta.annotation.Nullable String quantity) { + public OrdersInner quantity(@jakarta.annotation.Nonnull Double quantity) { this.quantity = quantity; return this; } /** - * Get quantity + * Order Quantity * * @return quantity */ - @jakarta.annotation.Nullable - public String getQuantity() { + @jakarta.annotation.Nonnull + @NotNull + @Valid + public Double getQuantity() { return quantity; } - public void setQuantity(@jakarta.annotation.Nullable String quantity) { + public void setQuantity(@jakarta.annotation.Nonnull Double quantity) { this.quantity = quantity; } - public OrdersInner price(@jakarta.annotation.Nullable String price) { + public OrdersInner price(@jakarta.annotation.Nullable Double price) { this.price = price; return this; } /** - * Get price + * Order Price * * @return price */ @jakarta.annotation.Nullable - public String getPrice() { + @Valid + public Double getPrice() { return price; } - public void setPrice(@jakarta.annotation.Nullable String price) { + public void setPrice(@jakarta.annotation.Nullable Double price) { this.price = price; } @@ -487,7 +498,7 @@ public void setTimeInForce(@jakarta.annotation.Nullable TimeInForceEnum timeInFo this.timeInForce = timeInForce; } - public OrdersInner reduceOnly(@jakarta.annotation.Nullable String reduceOnly) { + public OrdersInner reduceOnly(@jakarta.annotation.Nullable Boolean reduceOnly) { this.reduceOnly = reduceOnly; return this; } @@ -498,15 +509,15 @@ public OrdersInner reduceOnly(@jakarta.annotation.Nullable String reduceOnly) { * @return reduceOnly */ @jakarta.annotation.Nullable - public String getReduceOnly() { + public Boolean getReduceOnly() { return reduceOnly; } - public void setReduceOnly(@jakarta.annotation.Nullable String reduceOnly) { + public void setReduceOnly(@jakarta.annotation.Nullable Boolean reduceOnly) { this.reduceOnly = reduceOnly; } - public OrdersInner postOnly(@jakarta.annotation.Nullable String postOnly) { + public OrdersInner postOnly(@jakarta.annotation.Nullable Boolean postOnly) { this.postOnly = postOnly; return this; } @@ -517,11 +528,11 @@ public OrdersInner postOnly(@jakarta.annotation.Nullable String postOnly) { * @return postOnly */ @jakarta.annotation.Nullable - public String getPostOnly() { + public Boolean getPostOnly() { return postOnly; } - public void setPostOnly(@jakarta.annotation.Nullable String postOnly) { + public void setPostOnly(@jakarta.annotation.Nullable Boolean postOnly) { this.postOnly = postOnly; } @@ -552,7 +563,7 @@ public OrdersInner clientOrderId(@jakarta.annotation.Nullable String clientOrder } /** - * Get clientOrderId + * User-defined order ID cannot be repeated in pending orders * * @return clientOrderId */ @@ -565,22 +576,22 @@ public void setClientOrderId(@jakarta.annotation.Nullable String clientOrderId) this.clientOrderId = clientOrderId; } - public OrdersInner isMmp(@jakarta.annotation.Nullable String isMmp) { + public OrdersInner isMmp(@jakarta.annotation.Nullable Boolean isMmp) { this.isMmp = isMmp; return this; } /** - * Get isMmp + * is market maker protection order * * @return isMmp */ @jakarta.annotation.Nullable - public String getIsMmp() { + public Boolean getIsMmp() { return isMmp; } - public void setIsMmp(@jakarta.annotation.Nullable String isMmp) { + public void setIsMmp(@jakarta.annotation.Nullable Boolean isMmp) { this.isMmp = isMmp; } @@ -591,7 +602,8 @@ public OrdersInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * EXPIRE_TAKER:expire taker order when STP triggers/ EXPIRE_MAKER:expire maker order when STP + * triggers/ EXPIRE_BOTH:expire both orders when STP triggers; Default EXPIRE_MAKER * * @return selfTradePreventionMode */ @@ -764,6 +776,10 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("symbol"); + openapiRequiredFields.add("side"); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("quantity"); } /** @@ -783,55 +799,42 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti OrdersInner.openapiRequiredFields.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrdersInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) - && !jsonObj.get("symbol").isJsonPrimitive()) { + if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - if ((jsonObj.get("side") != null && !jsonObj.get("side").isJsonNull()) - && !jsonObj.get("side").isJsonPrimitive()) { + if (!jsonObj.get("side").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `side` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("side").toString())); } - // validate the optional field `side` - if (jsonObj.get("side") != null && !jsonObj.get("side").isJsonNull()) { - SideEnum.validateJsonElement(jsonObj.get("side")); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { + // validate the required field `side` + SideEnum.validateJsonElement(jsonObj.get("side")); + if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `type` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("type").toString())); } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("quantity") != null && !jsonObj.get("quantity").isJsonNull()) - && !jsonObj.get("quantity").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `quantity` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("quantity").toString())); - } - if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) - && !jsonObj.get("price").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `price` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("price").toString())); - } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); if ((jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) && !jsonObj.get("timeInForce").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -844,22 +847,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { TimeInForceEnum.validateJsonElement(jsonObj.get("timeInForce")); } - if ((jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) - && !jsonObj.get("reduceOnly").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reduceOnly` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reduceOnly").toString())); - } - if ((jsonObj.get("postOnly") != null && !jsonObj.get("postOnly").isJsonNull()) - && !jsonObj.get("postOnly").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `postOnly` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("postOnly").toString())); - } if ((jsonObj.get("newOrderRespType") != null && !jsonObj.get("newOrderRespType").isJsonNull()) && !jsonObj.get("newOrderRespType").isJsonPrimitive()) { @@ -882,14 +869,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("clientOrderId").toString())); } - if ((jsonObj.get("isMmp") != null && !jsonObj.get("isMmp").isJsonNull()) - && !jsonObj.get("isMmp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `isMmp` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("isMmp").toString())); - } if ((jsonObj.get("selfTradePreventionMode") != null && !jsonObj.get("selfTradePreventionMode").isJsonNull()) && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/PlaceMultipleOrdersRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/PlaceMultipleOrdersRequest.java index 14346ca65..6f12d6389 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/PlaceMultipleOrdersRequest.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/PlaceMultipleOrdersRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** PlaceMultipleOrdersRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PlaceMultipleOrdersRequest { public static final String SERIALIZED_NAME_ORDERS = "orders"; diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/PlaceMultipleOrdersResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/PlaceMultipleOrdersResponse.java index 37a26fc95..72edb2c7d 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/PlaceMultipleOrdersResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/PlaceMultipleOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PlaceMultipleOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PlaceMultipleOrdersResponse extends ArrayList { public PlaceMultipleOrdersResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/PlaceMultipleOrdersResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/PlaceMultipleOrdersResponseInner.java index dd784208a..6b7cdb505 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/PlaceMultipleOrdersResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/PlaceMultipleOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PlaceMultipleOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PlaceMultipleOrdersResponseInner { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -66,6 +66,12 @@ public class PlaceMultipleOrdersResponseInner { @jakarta.annotation.Nullable private String executedQty; + public static final String SERIALIZED_NAME_FEE = "fee"; + + @SerializedName(SERIALIZED_NAME_FEE) + @jakarta.annotation.Nullable + private Long fee; + public static final String SERIALIZED_NAME_SIDE = "side"; @SerializedName(SERIALIZED_NAME_SIDE) @@ -90,6 +96,12 @@ public class PlaceMultipleOrdersResponseInner { @jakarta.annotation.Nullable private Boolean reduceOnly; + public static final String SERIALIZED_NAME_POST_ONLY = "postOnly"; + + @SerializedName(SERIALIZED_NAME_POST_ONLY) + @jakarta.annotation.Nullable + private Boolean postOnly; + public static final String SERIALIZED_NAME_CREATE_TIME = "createTime"; @SerializedName(SERIALIZED_NAME_CREATE_TIME) @@ -114,12 +126,6 @@ public class PlaceMultipleOrdersResponseInner { @jakarta.annotation.Nullable private String avgPrice; - public static final String SERIALIZED_NAME_SOURCE = "source"; - - @SerializedName(SERIALIZED_NAME_SOURCE) - @jakarta.annotation.Nullable - private String source; - public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @SerializedName(SERIALIZED_NAME_CLIENT_ORDER_ID) @@ -163,6 +169,12 @@ public class PlaceMultipleOrdersResponseInner { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_SOURCE = "source"; + + @SerializedName(SERIALIZED_NAME_SOURCE) + @jakarta.annotation.Nullable + private String source; + public PlaceMultipleOrdersResponseInner() {} public PlaceMultipleOrdersResponseInner orderId(@jakarta.annotation.Nullable Long orderId) { @@ -171,7 +183,7 @@ public PlaceMultipleOrdersResponseInner orderId(@jakarta.annotation.Nullable Lon } /** - * Get orderId + * System order number * * @return orderId */ @@ -190,7 +202,7 @@ public PlaceMultipleOrdersResponseInner symbol(@jakarta.annotation.Nullable Stri } /** - * Get symbol + * Option trading pair * * @return symbol */ @@ -209,7 +221,7 @@ public PlaceMultipleOrdersResponseInner price(@jakarta.annotation.Nullable Strin } /** - * Get price + * Order Price * * @return price */ @@ -228,7 +240,7 @@ public PlaceMultipleOrdersResponseInner quantity(@jakarta.annotation.Nullable St } /** - * Get quantity + * Order Quantity * * @return quantity */ @@ -248,7 +260,7 @@ public PlaceMultipleOrdersResponseInner executedQty( } /** - * Get executedQty + * Number of executed quantity * * @return executedQty */ @@ -261,13 +273,32 @@ public void setExecutedQty(@jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; } + public PlaceMultipleOrdersResponseInner fee(@jakarta.annotation.Nullable Long fee) { + this.fee = fee; + return this; + } + + /** + * fee + * + * @return fee + */ + @jakarta.annotation.Nullable + public Long getFee() { + return fee; + } + + public void setFee(@jakarta.annotation.Nullable Long fee) { + this.fee = fee; + } + public PlaceMultipleOrdersResponseInner side(@jakarta.annotation.Nullable String side) { this.side = side; return this; } /** - * Get side + * Buy/sell direction * * @return side */ @@ -286,7 +317,7 @@ public PlaceMultipleOrdersResponseInner type(@jakarta.annotation.Nullable String } /** - * Get type + * Order type * * @return type */ @@ -306,7 +337,7 @@ public PlaceMultipleOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time in force method * * @return timeInForce */ @@ -326,7 +357,7 @@ public PlaceMultipleOrdersResponseInner reduceOnly( } /** - * Get reduceOnly + * Order is reduce only Y/N * * @return reduceOnly */ @@ -339,6 +370,26 @@ public void setReduceOnly(@jakarta.annotation.Nullable Boolean reduceOnly) { this.reduceOnly = reduceOnly; } + public PlaceMultipleOrdersResponseInner postOnly( + @jakarta.annotation.Nullable Boolean postOnly) { + this.postOnly = postOnly; + return this; + } + + /** + * post Only + * + * @return postOnly + */ + @jakarta.annotation.Nullable + public Boolean getPostOnly() { + return postOnly; + } + + public void setPostOnly(@jakarta.annotation.Nullable Boolean postOnly) { + this.postOnly = postOnly; + } + public PlaceMultipleOrdersResponseInner createTime( @jakarta.annotation.Nullable Long createTime) { this.createTime = createTime; @@ -346,7 +397,7 @@ public PlaceMultipleOrdersResponseInner createTime( } /** - * Get createTime + * Order Time * * @return createTime */ @@ -366,7 +417,7 @@ public PlaceMultipleOrdersResponseInner updateTime( } /** - * Get updateTime + * Update time * * @return updateTime */ @@ -385,7 +436,7 @@ public PlaceMultipleOrdersResponseInner status(@jakarta.annotation.Nullable Stri } /** - * Get status + * Order status * * @return status */ @@ -404,7 +455,7 @@ public PlaceMultipleOrdersResponseInner avgPrice(@jakarta.annotation.Nullable St } /** - * Get avgPrice + * Average price of completed trade * * @return avgPrice */ @@ -417,25 +468,6 @@ public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { this.avgPrice = avgPrice; } - public PlaceMultipleOrdersResponseInner source(@jakarta.annotation.Nullable String source) { - this.source = source; - return this; - } - - /** - * Get source - * - * @return source - */ - @jakarta.annotation.Nullable - public String getSource() { - return source; - } - - public void setSource(@jakarta.annotation.Nullable String source) { - this.source = source; - } - public PlaceMultipleOrdersResponseInner clientOrderId( @jakarta.annotation.Nullable String clientOrderId) { this.clientOrderId = clientOrderId; @@ -443,7 +475,7 @@ public PlaceMultipleOrdersResponseInner clientOrderId( } /** - * Get clientOrderId + * Client order ID * * @return clientOrderId */ @@ -463,7 +495,7 @@ public PlaceMultipleOrdersResponseInner priceScale( } /** - * Get priceScale + * price Scale * * @return priceScale */ @@ -483,7 +515,7 @@ public PlaceMultipleOrdersResponseInner quantityScale( } /** - * Get quantityScale + * quantity Scale * * @return quantityScale */ @@ -503,7 +535,7 @@ public PlaceMultipleOrdersResponseInner optionSide( } /** - * Get optionSide + * option Side * * @return optionSide */ @@ -523,7 +555,7 @@ public PlaceMultipleOrdersResponseInner quoteAsset( } /** - * Get quoteAsset + * quote Asset * * @return quoteAsset */ @@ -542,7 +574,7 @@ public PlaceMultipleOrdersResponseInner mmp(@jakarta.annotation.Nullable Boolean } /** - * Get mmp + * mmp * * @return mmp */ @@ -576,6 +608,25 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public PlaceMultipleOrdersResponseInner source(@jakarta.annotation.Nullable String source) { + this.source = source; + return this; + } + + /** + * Get source + * + * @return source + */ + @jakarta.annotation.Nullable + public String getSource() { + return source; + } + + public void setSource(@jakarta.annotation.Nullable String source) { + this.source = source; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -591,15 +642,16 @@ public boolean equals(Object o) { && Objects.equals(this.price, placeMultipleOrdersResponseInner.price) && Objects.equals(this.quantity, placeMultipleOrdersResponseInner.quantity) && Objects.equals(this.executedQty, placeMultipleOrdersResponseInner.executedQty) + && Objects.equals(this.fee, placeMultipleOrdersResponseInner.fee) && Objects.equals(this.side, placeMultipleOrdersResponseInner.side) && Objects.equals(this.type, placeMultipleOrdersResponseInner.type) && Objects.equals(this.timeInForce, placeMultipleOrdersResponseInner.timeInForce) && Objects.equals(this.reduceOnly, placeMultipleOrdersResponseInner.reduceOnly) + && Objects.equals(this.postOnly, placeMultipleOrdersResponseInner.postOnly) && Objects.equals(this.createTime, placeMultipleOrdersResponseInner.createTime) && Objects.equals(this.updateTime, placeMultipleOrdersResponseInner.updateTime) && Objects.equals(this.status, placeMultipleOrdersResponseInner.status) && Objects.equals(this.avgPrice, placeMultipleOrdersResponseInner.avgPrice) - && Objects.equals(this.source, placeMultipleOrdersResponseInner.source) && Objects.equals( this.clientOrderId, placeMultipleOrdersResponseInner.clientOrderId) && Objects.equals(this.priceScale, placeMultipleOrdersResponseInner.priceScale) @@ -610,7 +662,8 @@ public boolean equals(Object o) { && Objects.equals(this.mmp, placeMultipleOrdersResponseInner.mmp) && Objects.equals( this.selfTradePreventionMode, - placeMultipleOrdersResponseInner.selfTradePreventionMode); + placeMultipleOrdersResponseInner.selfTradePreventionMode) + && Objects.equals(this.source, placeMultipleOrdersResponseInner.source); } @Override @@ -621,22 +674,24 @@ public int hashCode() { price, quantity, executedQty, + fee, side, type, timeInForce, reduceOnly, + postOnly, createTime, updateTime, status, avgPrice, - source, clientOrderId, priceScale, quantityScale, optionSide, quoteAsset, mmp, - selfTradePreventionMode); + selfTradePreventionMode, + source); } @Override @@ -648,15 +703,16 @@ public String toString() { sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); + sb.append(" postOnly: ").append(toIndentedString(postOnly)).append("\n"); sb.append(" createTime: ").append(toIndentedString(createTime)).append("\n"); sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); - sb.append(" source: ").append(toIndentedString(source)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" priceScale: ").append(toIndentedString(priceScale)).append("\n"); sb.append(" quantityScale: ").append(toIndentedString(quantityScale)).append("\n"); @@ -666,6 +722,7 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); sb.append("}"); return sb.toString(); } @@ -693,6 +750,10 @@ public String toUrlQueryString() { String executedQtyValueAsString = ""; executedQtyValueAsString = executedQtyValue.toString(); sb.append("executedQty=").append(urlEncode(executedQtyValueAsString)).append(""); + Object feeValue = getFee(); + String feeValueAsString = ""; + feeValueAsString = feeValue.toString(); + sb.append("fee=").append(urlEncode(feeValueAsString)).append(""); Object sideValue = getSide(); String sideValueAsString = ""; sideValueAsString = sideValue.toString(); @@ -709,6 +770,10 @@ public String toUrlQueryString() { String reduceOnlyValueAsString = ""; reduceOnlyValueAsString = reduceOnlyValue.toString(); sb.append("reduceOnly=").append(urlEncode(reduceOnlyValueAsString)).append(""); + Object postOnlyValue = getPostOnly(); + String postOnlyValueAsString = ""; + postOnlyValueAsString = postOnlyValue.toString(); + sb.append("postOnly=").append(urlEncode(postOnlyValueAsString)).append(""); Object createTimeValue = getCreateTime(); String createTimeValueAsString = ""; createTimeValueAsString = createTimeValue.toString(); @@ -725,10 +790,6 @@ public String toUrlQueryString() { String avgPriceValueAsString = ""; avgPriceValueAsString = avgPriceValue.toString(); sb.append("avgPrice=").append(urlEncode(avgPriceValueAsString)).append(""); - Object sourceValue = getSource(); - String sourceValueAsString = ""; - sourceValueAsString = sourceValue.toString(); - sb.append("source=").append(urlEncode(sourceValueAsString)).append(""); Object clientOrderIdValue = getClientOrderId(); String clientOrderIdValueAsString = ""; clientOrderIdValueAsString = clientOrderIdValue.toString(); @@ -759,6 +820,10 @@ public String toUrlQueryString() { sb.append("selfTradePreventionMode=") .append(urlEncode(selfTradePreventionModeValueAsString)) .append(""); + Object sourceValue = getSource(); + String sourceValueAsString = ""; + sourceValueAsString = sourceValue.toString(); + sb.append("source=").append(urlEncode(sourceValueAsString)).append(""); return sb.toString(); } @@ -792,15 +857,16 @@ private String toIndentedString(Object o) { openapiFields.add("price"); openapiFields.add("quantity"); openapiFields.add("executedQty"); + openapiFields.add("fee"); openapiFields.add("side"); openapiFields.add("type"); openapiFields.add("timeInForce"); openapiFields.add("reduceOnly"); + openapiFields.add("postOnly"); openapiFields.add("createTime"); openapiFields.add("updateTime"); openapiFields.add("status"); openapiFields.add("avgPrice"); - openapiFields.add("source"); openapiFields.add("clientOrderId"); openapiFields.add("priceScale"); openapiFields.add("quantityScale"); @@ -808,6 +874,7 @@ private String toIndentedString(Object o) { openapiFields.add("quoteAsset"); openapiFields.add("mmp"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("source"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -904,14 +971,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("avgPrice").toString())); } - if ((jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) - && !jsonObj.get("source").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `source` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("source").toString())); - } if ((jsonObj.get("clientOrderId") != null && !jsonObj.get("clientOrderId").isJsonNull()) && !jsonObj.get("clientOrderId").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -945,6 +1004,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) + && !jsonObj.get("source").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `source` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("source").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryBlockTradeDetailsResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryBlockTradeDetailsResponse.java index 65060ee6c..c360991bb 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryBlockTradeDetailsResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryBlockTradeDetailsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryBlockTradeDetailsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryBlockTradeDetailsResponse { public static final String SERIALIZED_NAME_BLOCK_TRADE_SETTLEMENT_KEY = "blockTradeSettlementKey"; @@ -88,7 +88,7 @@ public QueryBlockTradeDetailsResponse blockTradeSettlementKey( } /** - * Get blockTradeSettlementKey + * block Trade Settlement Key * * @return blockTradeSettlementKey */ @@ -108,7 +108,7 @@ public QueryBlockTradeDetailsResponse expireTime(@jakarta.annotation.Nullable Lo } /** - * Get expireTime + * expire Time * * @return expireTime */ @@ -127,7 +127,7 @@ public QueryBlockTradeDetailsResponse liquidity(@jakarta.annotation.Nullable Str } /** - * Get liquidity + * liquidity * * @return liquidity */ @@ -146,7 +146,7 @@ public QueryBlockTradeDetailsResponse status(@jakarta.annotation.Nullable String } /** - * Get status + * status * * @return status */ @@ -165,7 +165,7 @@ public QueryBlockTradeDetailsResponse createTime(@jakarta.annotation.Nullable Lo } /** - * Get createTime + * create Time * * @return createTime */ @@ -195,7 +195,7 @@ public QueryBlockTradeDetailsResponse addLegsItem( } /** - * Get legs + * legs * * @return legs */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryBlockTradeDetailsResponseLegsInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryBlockTradeDetailsResponseLegsInner.java index 852171171..063fed18f 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryBlockTradeDetailsResponseLegsInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryBlockTradeDetailsResponseLegsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryBlockTradeDetailsResponseLegsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryBlockTradeDetailsResponseLegsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -69,7 +69,7 @@ public QueryBlockTradeDetailsResponseLegsInner symbol( } /** - * Get symbol + * symbol * * @return symbol */ @@ -88,7 +88,7 @@ public QueryBlockTradeDetailsResponseLegsInner side(@jakarta.annotation.Nullable } /** - * Get side + * side * * @return side */ @@ -108,7 +108,7 @@ public QueryBlockTradeDetailsResponseLegsInner quantity( } /** - * Get quantity + * quantity * * @return quantity */ @@ -128,7 +128,7 @@ public QueryBlockTradeDetailsResponseLegsInner price( } /** - * Get price + * price * * @return price */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryBlockTradeOrderResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryBlockTradeOrderResponse.java index 048eccfa0..f97197ae3 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryBlockTradeOrderResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryBlockTradeOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryBlockTradeOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryBlockTradeOrderResponse extends ArrayList { public QueryBlockTradeOrderResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryBlockTradeOrderResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryBlockTradeOrderResponseInner.java index c3f4dd7ed..d642cfa76 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryBlockTradeOrderResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryBlockTradeOrderResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryBlockTradeOrderResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryBlockTradeOrderResponseInner { public static final String SERIALIZED_NAME_BLOCK_TRADE_SETTLEMENT_KEY = "blockTradeSettlementKey"; @@ -88,7 +88,7 @@ public QueryBlockTradeOrderResponseInner blockTradeSettlementKey( } /** - * Get blockTradeSettlementKey + * block Trade Settlement Key * * @return blockTradeSettlementKey */ @@ -109,7 +109,7 @@ public QueryBlockTradeOrderResponseInner expireTime( } /** - * Get expireTime + * expire Time * * @return expireTime */ @@ -129,7 +129,7 @@ public QueryBlockTradeOrderResponseInner liquidity( } /** - * Get liquidity + * liquidity * * @return liquidity */ @@ -148,7 +148,7 @@ public QueryBlockTradeOrderResponseInner status(@jakarta.annotation.Nullable Str } /** - * Get status + * status * * @return status */ @@ -168,7 +168,7 @@ public QueryBlockTradeOrderResponseInner createTime( } /** - * Get createTime + * create Time * * @return createTime */ @@ -197,7 +197,7 @@ public QueryBlockTradeOrderResponseInner addLegsItem( } /** - * Get legs + * legs * * @return legs */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryCurrentOpenOptionOrdersResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryCurrentOpenOptionOrdersResponse.java index fb7e5085f..a78dfc236 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryCurrentOpenOptionOrdersResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryCurrentOpenOptionOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCurrentOpenOptionOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCurrentOpenOptionOrdersResponse extends ArrayList { public QueryCurrentOpenOptionOrdersResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryCurrentOpenOptionOrdersResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryCurrentOpenOptionOrdersResponseInner.java index ad45b7a93..ff904b6de 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryCurrentOpenOptionOrdersResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryCurrentOpenOptionOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCurrentOpenOptionOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCurrentOpenOptionOrdersResponseInner { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -166,7 +166,7 @@ public QueryCurrentOpenOptionOrdersResponseInner orderId( } /** - * Get orderId + * System order number * * @return orderId */ @@ -186,7 +186,7 @@ public QueryCurrentOpenOptionOrdersResponseInner symbol( } /** - * Get symbol + * Option trading pair * * @return symbol */ @@ -206,7 +206,7 @@ public QueryCurrentOpenOptionOrdersResponseInner price( } /** - * Get price + * Order Price * * @return price */ @@ -226,7 +226,7 @@ public QueryCurrentOpenOptionOrdersResponseInner quantity( } /** - * Get quantity + * Order Quantity * * @return quantity */ @@ -246,7 +246,7 @@ public QueryCurrentOpenOptionOrdersResponseInner executedQty( } /** - * Get executedQty + * Number of completed trades * * @return executedQty */ @@ -266,7 +266,7 @@ public QueryCurrentOpenOptionOrdersResponseInner side( } /** - * Get side + * Buy/sell direction * * @return side */ @@ -286,7 +286,7 @@ public QueryCurrentOpenOptionOrdersResponseInner type( } /** - * Get type + * Order type * * @return type */ @@ -306,7 +306,7 @@ public QueryCurrentOpenOptionOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time in force method * * @return timeInForce */ @@ -326,7 +326,7 @@ public QueryCurrentOpenOptionOrdersResponseInner reduceOnly( } /** - * Get reduceOnly + * Order is reduce only Y/N * * @return reduceOnly */ @@ -346,7 +346,7 @@ public QueryCurrentOpenOptionOrdersResponseInner createTime( } /** - * Get createTime + * Order Time * * @return createTime */ @@ -366,7 +366,7 @@ public QueryCurrentOpenOptionOrdersResponseInner updateTime( } /** - * Get updateTime + * Update Time * * @return updateTime */ @@ -386,7 +386,7 @@ public QueryCurrentOpenOptionOrdersResponseInner status( } /** - * Get status + * Order status * * @return status */ @@ -406,7 +406,7 @@ public QueryCurrentOpenOptionOrdersResponseInner avgPrice( } /** - * Get avgPrice + * Average price of completed trade * * @return avgPrice */ @@ -426,7 +426,7 @@ public QueryCurrentOpenOptionOrdersResponseInner clientOrderId( } /** - * Get clientOrderId + * Client order ID * * @return clientOrderId */ @@ -446,7 +446,7 @@ public QueryCurrentOpenOptionOrdersResponseInner priceScale( } /** - * Get priceScale + * price Scale * * @return priceScale */ @@ -466,7 +466,7 @@ public QueryCurrentOpenOptionOrdersResponseInner quantityScale( } /** - * Get quantityScale + * quantity Scale * * @return quantityScale */ @@ -486,7 +486,7 @@ public QueryCurrentOpenOptionOrdersResponseInner optionSide( } /** - * Get optionSide + * option Side * * @return optionSide */ @@ -506,7 +506,7 @@ public QueryCurrentOpenOptionOrdersResponseInner quoteAsset( } /** - * Get quoteAsset + * quote Asset * * @return quoteAsset */ @@ -525,7 +525,7 @@ public QueryCurrentOpenOptionOrdersResponseInner mmp(@jakarta.annotation.Nullabl } /** - * Get mmp + * mmp * * @return mmp */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryOptionOrderHistoryResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryOptionOrderHistoryResponse.java index 512492f60..5931a3302 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryOptionOrderHistoryResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryOptionOrderHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryOptionOrderHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryOptionOrderHistoryResponse extends ArrayList { public QueryOptionOrderHistoryResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryOptionOrderHistoryResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryOptionOrderHistoryResponseInner.java index 557dc3b94..c157d9f73 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryOptionOrderHistoryResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QueryOptionOrderHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryOptionOrderHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryOptionOrderHistoryResponseInner { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -158,7 +158,7 @@ public QueryOptionOrderHistoryResponseInner orderId(@jakarta.annotation.Nullable } /** - * Get orderId + * order Id * * @return orderId */ @@ -177,7 +177,7 @@ public QueryOptionOrderHistoryResponseInner symbol(@jakarta.annotation.Nullable } /** - * Get symbol + * symbol * * @return symbol */ @@ -196,7 +196,7 @@ public QueryOptionOrderHistoryResponseInner price(@jakarta.annotation.Nullable S } /** - * Get price + * price * * @return price */ @@ -216,7 +216,7 @@ public QueryOptionOrderHistoryResponseInner quantity( } /** - * Get quantity + * quantity * * @return quantity */ @@ -236,7 +236,7 @@ public QueryOptionOrderHistoryResponseInner executedQty( } /** - * Get executedQty + * executed Qty * * @return executedQty */ @@ -255,7 +255,7 @@ public QueryOptionOrderHistoryResponseInner side(@jakarta.annotation.Nullable St } /** - * Get side + * side * * @return side */ @@ -274,7 +274,7 @@ public QueryOptionOrderHistoryResponseInner type(@jakarta.annotation.Nullable St } /** - * Get type + * type * * @return type */ @@ -294,7 +294,7 @@ public QueryOptionOrderHistoryResponseInner timeInForce( } /** - * Get timeInForce + * time In Force * * @return timeInForce */ @@ -314,7 +314,7 @@ public QueryOptionOrderHistoryResponseInner reduceOnly( } /** - * Get reduceOnly + * reduce Only * * @return reduceOnly */ @@ -334,7 +334,7 @@ public QueryOptionOrderHistoryResponseInner createTime( } /** - * Get createTime + * create Time * * @return createTime */ @@ -354,7 +354,7 @@ public QueryOptionOrderHistoryResponseInner updateTime( } /** - * Get updateTime + * update Time * * @return updateTime */ @@ -373,7 +373,7 @@ public QueryOptionOrderHistoryResponseInner status(@jakarta.annotation.Nullable } /** - * Get status + * status * * @return status */ @@ -393,7 +393,7 @@ public QueryOptionOrderHistoryResponseInner avgPrice( } /** - * Get avgPrice + * avg Price * * @return avgPrice */ @@ -413,7 +413,7 @@ public QueryOptionOrderHistoryResponseInner clientOrderId( } /** - * Get clientOrderId + * client Order Id * * @return clientOrderId */ @@ -433,7 +433,7 @@ public QueryOptionOrderHistoryResponseInner priceScale( } /** - * Get priceScale + * price Scale * * @return priceScale */ @@ -453,7 +453,7 @@ public QueryOptionOrderHistoryResponseInner quantityScale( } /** - * Get quantityScale + * quantity Scale * * @return quantityScale */ @@ -473,7 +473,7 @@ public QueryOptionOrderHistoryResponseInner optionSide( } /** - * Get optionSide + * option Side * * @return optionSide */ @@ -493,7 +493,7 @@ public QueryOptionOrderHistoryResponseInner quoteAsset( } /** - * Get quoteAsset + * quote Asset * * @return quoteAsset */ @@ -512,7 +512,7 @@ public QueryOptionOrderHistoryResponseInner mmp(@jakarta.annotation.Nullable Boo } /** - * Get mmp + * mmp * * @return mmp */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QuerySingleOrderResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QuerySingleOrderResponse.java index ad38aad1e..593ec3caf 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QuerySingleOrderResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/QuerySingleOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QuerySingleOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySingleOrderResponse { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -90,6 +90,12 @@ public class QuerySingleOrderResponse { @jakarta.annotation.Nullable private Boolean reduceOnly; + public static final String SERIALIZED_NAME_POST_ONLY = "postOnly"; + + @SerializedName(SERIALIZED_NAME_POST_ONLY) + @jakarta.annotation.Nullable + private Boolean postOnly; + public static final String SERIALIZED_NAME_CREATE_TIME = "createTime"; @SerializedName(SERIALIZED_NAME_CREATE_TIME) @@ -165,7 +171,7 @@ public QuerySingleOrderResponse orderId(@jakarta.annotation.Nullable Long orderI } /** - * Get orderId + * System order id * * @return orderId */ @@ -184,7 +190,7 @@ public QuerySingleOrderResponse symbol(@jakarta.annotation.Nullable String symbo } /** - * Get symbol + * Option trading pair * * @return symbol */ @@ -203,7 +209,7 @@ public QuerySingleOrderResponse price(@jakarta.annotation.Nullable String price) } /** - * Get price + * Order Price * * @return price */ @@ -222,7 +228,7 @@ public QuerySingleOrderResponse quantity(@jakarta.annotation.Nullable String qua } /** - * Get quantity + * Order Quantity * * @return quantity */ @@ -241,7 +247,7 @@ public QuerySingleOrderResponse executedQty(@jakarta.annotation.Nullable String } /** - * Get executedQty + * Number of executed quantity * * @return executedQty */ @@ -260,7 +266,7 @@ public QuerySingleOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Buy/sell direction * * @return side */ @@ -279,7 +285,7 @@ public QuerySingleOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Order type * * @return type */ @@ -298,7 +304,7 @@ public QuerySingleOrderResponse timeInForce(@jakarta.annotation.Nullable String } /** - * Get timeInForce + * Time in force method * * @return timeInForce */ @@ -317,7 +323,7 @@ public QuerySingleOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean } /** - * Get reduceOnly + * Order is reduce only Y/N * * @return reduceOnly */ @@ -330,13 +336,32 @@ public void setReduceOnly(@jakarta.annotation.Nullable Boolean reduceOnly) { this.reduceOnly = reduceOnly; } + public QuerySingleOrderResponse postOnly(@jakarta.annotation.Nullable Boolean postOnly) { + this.postOnly = postOnly; + return this; + } + + /** + * post Only + * + * @return postOnly + */ + @jakarta.annotation.Nullable + public Boolean getPostOnly() { + return postOnly; + } + + public void setPostOnly(@jakarta.annotation.Nullable Boolean postOnly) { + this.postOnly = postOnly; + } + public QuerySingleOrderResponse createTime(@jakarta.annotation.Nullable Long createTime) { this.createTime = createTime; return this; } /** - * Get createTime + * Order Time * * @return createTime */ @@ -355,7 +380,7 @@ public QuerySingleOrderResponse updateTime(@jakarta.annotation.Nullable Long upd } /** - * Get updateTime + * Update time * * @return updateTime */ @@ -374,7 +399,7 @@ public QuerySingleOrderResponse status(@jakarta.annotation.Nullable String statu } /** - * Get status + * Order status * * @return status */ @@ -393,7 +418,7 @@ public QuerySingleOrderResponse avgPrice(@jakarta.annotation.Nullable String avg } /** - * Get avgPrice + * Average price of completed trade * * @return avgPrice */ @@ -413,7 +438,7 @@ public QuerySingleOrderResponse clientOrderId( } /** - * Get clientOrderId + * Client order ID * * @return clientOrderId */ @@ -432,7 +457,7 @@ public QuerySingleOrderResponse priceScale(@jakarta.annotation.Nullable Long pri } /** - * Get priceScale + * price Scale * * @return priceScale */ @@ -451,7 +476,7 @@ public QuerySingleOrderResponse quantityScale(@jakarta.annotation.Nullable Long } /** - * Get quantityScale + * quantity Scale * * @return quantityScale */ @@ -470,7 +495,7 @@ public QuerySingleOrderResponse optionSide(@jakarta.annotation.Nullable String o } /** - * Get optionSide + * option Side * * @return optionSide */ @@ -489,7 +514,7 @@ public QuerySingleOrderResponse quoteAsset(@jakarta.annotation.Nullable String q } /** - * Get quoteAsset + * quote Asset * * @return quoteAsset */ @@ -508,7 +533,7 @@ public QuerySingleOrderResponse mmp(@jakarta.annotation.Nullable Boolean mmp) { } /** - * Get mmp + * mmp * * @return mmp */ @@ -528,7 +553,7 @@ public QuerySingleOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * Self trade prevention mode. * * @return selfTradePreventionMode */ @@ -560,6 +585,7 @@ public boolean equals(Object o) { && Objects.equals(this.type, querySingleOrderResponse.type) && Objects.equals(this.timeInForce, querySingleOrderResponse.timeInForce) && Objects.equals(this.reduceOnly, querySingleOrderResponse.reduceOnly) + && Objects.equals(this.postOnly, querySingleOrderResponse.postOnly) && Objects.equals(this.createTime, querySingleOrderResponse.createTime) && Objects.equals(this.updateTime, querySingleOrderResponse.updateTime) && Objects.equals(this.status, querySingleOrderResponse.status) @@ -587,6 +613,7 @@ public int hashCode() { type, timeInForce, reduceOnly, + postOnly, createTime, updateTime, status, @@ -613,6 +640,7 @@ public String toString() { sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); + sb.append(" postOnly: ").append(toIndentedString(postOnly)).append("\n"); sb.append(" createTime: ").append(toIndentedString(createTime)).append("\n"); sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); @@ -669,6 +697,10 @@ public String toUrlQueryString() { String reduceOnlyValueAsString = ""; reduceOnlyValueAsString = reduceOnlyValue.toString(); sb.append("reduceOnly=").append(urlEncode(reduceOnlyValueAsString)).append(""); + Object postOnlyValue = getPostOnly(); + String postOnlyValueAsString = ""; + postOnlyValueAsString = postOnlyValue.toString(); + sb.append("postOnly=").append(urlEncode(postOnlyValueAsString)).append(""); Object createTimeValue = getCreateTime(); String createTimeValueAsString = ""; createTimeValueAsString = createTimeValue.toString(); @@ -752,6 +784,7 @@ private String toIndentedString(Object o) { openapiFields.add("type"); openapiFields.add("timeInForce"); openapiFields.add("reduceOnly"); + openapiFields.add("postOnly"); openapiFields.add("createTime"); openapiFields.add("updateTime"); openapiFields.add("status"); diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/RecentBlockTradesListResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/RecentBlockTradesListResponse.java index f52c50d51..21530b40a 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/RecentBlockTradesListResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/RecentBlockTradesListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RecentBlockTradesListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RecentBlockTradesListResponse extends ArrayList { public RecentBlockTradesListResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/RecentBlockTradesListResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/RecentBlockTradesListResponseInner.java index 0ec6a0cf1..bad1588e4 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/RecentBlockTradesListResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/RecentBlockTradesListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RecentBlockTradesListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RecentBlockTradesListResponseInner { public static final String SERIALIZED_NAME_ID = "id"; @@ -92,7 +92,7 @@ public RecentBlockTradesListResponseInner id(@jakarta.annotation.Nullable Long i } /** - * Get id + * id * * @return id */ @@ -111,7 +111,7 @@ public RecentBlockTradesListResponseInner tradeId(@jakarta.annotation.Nullable L } /** - * Get tradeId + * trade Id * * @return tradeId */ @@ -130,7 +130,7 @@ public RecentBlockTradesListResponseInner symbol(@jakarta.annotation.Nullable St } /** - * Get symbol + * symbol * * @return symbol */ @@ -149,7 +149,7 @@ public RecentBlockTradesListResponseInner price(@jakarta.annotation.Nullable Str } /** - * Get price + * price * * @return price */ @@ -168,7 +168,7 @@ public RecentBlockTradesListResponseInner qty(@jakarta.annotation.Nullable Strin } /** - * Get qty + * qty * * @return qty */ @@ -188,7 +188,7 @@ public RecentBlockTradesListResponseInner quoteQty( } /** - * Get quoteQty + * quote Qty * * @return quoteQty */ @@ -207,7 +207,7 @@ public RecentBlockTradesListResponseInner side(@jakarta.annotation.Nullable Long } /** - * Get side + * side * * @return side */ @@ -226,7 +226,7 @@ public RecentBlockTradesListResponseInner time(@jakarta.annotation.Nullable Long } /** - * Get time + * time * * @return time */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/RecentTradesListResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/RecentTradesListResponse.java index f2aea7add..0e23f7201 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/RecentTradesListResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/RecentTradesListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RecentTradesListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RecentTradesListResponse extends ArrayList { public RecentTradesListResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/RecentTradesListResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/RecentTradesListResponseInner.java index aaaecdef0..440508e9b 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/RecentTradesListResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/RecentTradesListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RecentTradesListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RecentTradesListResponseInner { public static final String SERIALIZED_NAME_ID = "id"; @@ -92,7 +92,7 @@ public RecentTradesListResponseInner id(@jakarta.annotation.Nullable Long id) { } /** - * Get id + * id * * @return id */ @@ -111,7 +111,7 @@ public RecentTradesListResponseInner tradeId(@jakarta.annotation.Nullable Long t } /** - * Get tradeId + * TradeId * * @return tradeId */ @@ -130,7 +130,7 @@ public RecentTradesListResponseInner symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * Option trading pair * * @return symbol */ @@ -149,7 +149,7 @@ public RecentTradesListResponseInner price(@jakarta.annotation.Nullable String p } /** - * Get price + * Completed trade price * * @return price */ @@ -168,7 +168,7 @@ public RecentTradesListResponseInner qty(@jakarta.annotation.Nullable String qty } /** - * Get qty + * Completed trade quantity * * @return qty */ @@ -187,7 +187,7 @@ public RecentTradesListResponseInner quoteQty(@jakarta.annotation.Nullable Strin } /** - * Get quoteQty + * Completed trade amount * * @return quoteQty */ @@ -206,7 +206,7 @@ public RecentTradesListResponseInner side(@jakarta.annotation.Nullable Long side } /** - * Get side + * Completed trade direction(-1 Sell,1 Buy) * * @return side */ @@ -225,7 +225,7 @@ public RecentTradesListResponseInner time(@jakarta.annotation.Nullable Long time } /** - * Get time + * Time * * @return time */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ResetMarketMakerProtectionConfigRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ResetMarketMakerProtectionConfigRequest.java index 5cae2f05d..64b41401a 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ResetMarketMakerProtectionConfigRequest.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ResetMarketMakerProtectionConfigRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,12 +34,12 @@ /** ResetMarketMakerProtectionConfigRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ResetMarketMakerProtectionConfigRequest { public static final String SERIALIZED_NAME_UNDERLYING = "underlying"; @SerializedName(SERIALIZED_NAME_UNDERLYING) - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull private String underlying; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -51,7 +51,7 @@ public class ResetMarketMakerProtectionConfigRequest { public ResetMarketMakerProtectionConfigRequest() {} public ResetMarketMakerProtectionConfigRequest underlying( - @jakarta.annotation.Nullable String underlying) { + @jakarta.annotation.Nonnull String underlying) { this.underlying = underlying; return this; } @@ -61,12 +61,13 @@ public ResetMarketMakerProtectionConfigRequest underlying( * * @return underlying */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull + @NotNull public String getUnderlying() { return underlying; } - public void setUnderlying(@jakarta.annotation.Nullable String underlying) { + public void setUnderlying(@jakarta.annotation.Nonnull String underlying) { this.underlying = underlying; } @@ -164,6 +165,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("underlying"); } /** @@ -186,9 +188,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti .toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResetMarketMakerProtectionConfigRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("underlying") != null && !jsonObj.get("underlying").isJsonNull()) - && !jsonObj.get("underlying").isJsonPrimitive()) { + if (!jsonObj.get("underlying").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `underlying` to be a primitive type in the JSON" diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ResetMarketMakerProtectionConfigResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ResetMarketMakerProtectionConfigResponse.java index 2ca011fa7..3e555a58b 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ResetMarketMakerProtectionConfigResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/ResetMarketMakerProtectionConfigResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ResetMarketMakerProtectionConfigResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ResetMarketMakerProtectionConfigResponse { public static final String SERIALIZED_NAME_UNDERLYING_ID = "underlyingId"; @@ -89,7 +89,7 @@ public ResetMarketMakerProtectionConfigResponse underlyingId( } /** - * Get underlyingId + * underlying Id * * @return underlyingId */ @@ -109,7 +109,7 @@ public ResetMarketMakerProtectionConfigResponse underlying( } /** - * Get underlying + * underlying * * @return underlying */ @@ -129,7 +129,7 @@ public ResetMarketMakerProtectionConfigResponse windowTimeInMilliseconds( } /** - * Get windowTimeInMilliseconds + * window Time In Milliseconds * * @return windowTimeInMilliseconds */ @@ -150,7 +150,7 @@ public ResetMarketMakerProtectionConfigResponse frozenTimeInMilliseconds( } /** - * Get frozenTimeInMilliseconds + * frozen Time In Milliseconds * * @return frozenTimeInMilliseconds */ @@ -171,7 +171,7 @@ public ResetMarketMakerProtectionConfigResponse qtyLimit( } /** - * Get qtyLimit + * qty Limit * * @return qtyLimit */ @@ -191,7 +191,7 @@ public ResetMarketMakerProtectionConfigResponse deltaLimit( } /** - * Get deltaLimit + * delta Limit * * @return deltaLimit */ @@ -211,7 +211,7 @@ public ResetMarketMakerProtectionConfigResponse lastTriggerTime( } /** - * Get lastTriggerTime + * last Trigger Time * * @return lastTriggerTime */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SelfTradePreventionMode.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SelfTradePreventionMode.java index 4308b0ce7..905e5a4b9 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SelfTradePreventionMode.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SelfTradePreventionMode.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -21,14 +21,16 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets selfTradePreventionMode */ +/** Self-trade prevention mode */ @JsonAdapter(SelfTradePreventionMode.Adapter.class) public enum SelfTradePreventionMode { + NONE("NONE"), + EXPIRE_TAKER("EXPIRE_TAKER"), - EXPIRE_BOTH("EXPIRE_BOTH"), + EXPIRE_MAKER("EXPIRE_MAKER"), - EXPIRE_MAKER("EXPIRE_MAKER"); + EXPIRE_BOTH("EXPIRE_BOTH"); private String value; diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SetAutoCancelAllOpenOrdersRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SetAutoCancelAllOpenOrdersRequest.java index 8737a44a4..b6b0cf155 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SetAutoCancelAllOpenOrdersRequest.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SetAutoCancelAllOpenOrdersRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SetAutoCancelAllOpenOrdersRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SetAutoCancelAllOpenOrdersRequest { public static final String SERIALIZED_NAME_UNDERLYING = "underlying"; @@ -84,7 +84,8 @@ public SetAutoCancelAllOpenOrdersRequest countdownTime( } /** - * Get countdownTime + * Countdown time in milliseconds (ex. 1,000 for 1 second). 0 to disable the timer. Negative + * values (ex. -10000) are not accepted. Minimum acceptable value is 5,000 * * @return countdownTime */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SetAutoCancelAllOpenOrdersResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SetAutoCancelAllOpenOrdersResponse.java index 075edaaea..426dbd25e 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SetAutoCancelAllOpenOrdersResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SetAutoCancelAllOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SetAutoCancelAllOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SetAutoCancelAllOpenOrdersResponse { public static final String SERIALIZED_NAME_UNDERLYING = "underlying"; @@ -57,7 +57,7 @@ public SetAutoCancelAllOpenOrdersResponse underlying( } /** - * Get underlying + * underlying * * @return underlying */ @@ -77,7 +77,7 @@ public SetAutoCancelAllOpenOrdersResponse countdownTime( } /** - * Get countdownTime + * countdown Time * * @return countdownTime */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SetMarketMakerProtectionConfigRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SetMarketMakerProtectionConfigRequest.java index a43b16dc7..abf33a93e 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SetMarketMakerProtectionConfigRequest.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SetMarketMakerProtectionConfigRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -35,38 +35,38 @@ /** SetMarketMakerProtectionConfigRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SetMarketMakerProtectionConfigRequest { public static final String SERIALIZED_NAME_UNDERLYING = "underlying"; @SerializedName(SERIALIZED_NAME_UNDERLYING) - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull private String underlying; public static final String SERIALIZED_NAME_WINDOW_TIME_IN_MILLISECONDS = "windowTimeInMilliseconds"; @SerializedName(SERIALIZED_NAME_WINDOW_TIME_IN_MILLISECONDS) - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull private Long windowTimeInMilliseconds; public static final String SERIALIZED_NAME_FROZEN_TIME_IN_MILLISECONDS = "frozenTimeInMilliseconds"; @SerializedName(SERIALIZED_NAME_FROZEN_TIME_IN_MILLISECONDS) - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull private Long frozenTimeInMilliseconds; public static final String SERIALIZED_NAME_QTY_LIMIT = "qtyLimit"; @SerializedName(SERIALIZED_NAME_QTY_LIMIT) - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull private Double qtyLimit; public static final String SERIALIZED_NAME_DELTA_LIMIT = "deltaLimit"; @SerializedName(SERIALIZED_NAME_DELTA_LIMIT) - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull private Double deltaLimit; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -78,7 +78,7 @@ public class SetMarketMakerProtectionConfigRequest { public SetMarketMakerProtectionConfigRequest() {} public SetMarketMakerProtectionConfigRequest underlying( - @jakarta.annotation.Nullable String underlying) { + @jakarta.annotation.Nonnull String underlying) { this.underlying = underlying; return this; } @@ -88,96 +88,103 @@ public SetMarketMakerProtectionConfigRequest underlying( * * @return underlying */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull + @NotNull public String getUnderlying() { return underlying; } - public void setUnderlying(@jakarta.annotation.Nullable String underlying) { + public void setUnderlying(@jakarta.annotation.Nonnull String underlying) { this.underlying = underlying; } public SetMarketMakerProtectionConfigRequest windowTimeInMilliseconds( - @jakarta.annotation.Nullable Long windowTimeInMilliseconds) { + @jakarta.annotation.Nonnull Long windowTimeInMilliseconds) { this.windowTimeInMilliseconds = windowTimeInMilliseconds; return this; } /** - * Get windowTimeInMilliseconds + * MMP Interval in milliseconds minimum: 0 maximum: 5000 * * @return windowTimeInMilliseconds */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull + @NotNull + @Min(0L) + @Max(5000L) public Long getWindowTimeInMilliseconds() { return windowTimeInMilliseconds; } public void setWindowTimeInMilliseconds( - @jakarta.annotation.Nullable Long windowTimeInMilliseconds) { + @jakarta.annotation.Nonnull Long windowTimeInMilliseconds) { this.windowTimeInMilliseconds = windowTimeInMilliseconds; } public SetMarketMakerProtectionConfigRequest frozenTimeInMilliseconds( - @jakarta.annotation.Nullable Long frozenTimeInMilliseconds) { + @jakarta.annotation.Nonnull Long frozenTimeInMilliseconds) { this.frozenTimeInMilliseconds = frozenTimeInMilliseconds; return this; } /** - * Get frozenTimeInMilliseconds + * MMP frozen time in milliseconds, if set to 0 manual reset is required * * @return frozenTimeInMilliseconds */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull + @NotNull public Long getFrozenTimeInMilliseconds() { return frozenTimeInMilliseconds; } public void setFrozenTimeInMilliseconds( - @jakarta.annotation.Nullable Long frozenTimeInMilliseconds) { + @jakarta.annotation.Nonnull Long frozenTimeInMilliseconds) { this.frozenTimeInMilliseconds = frozenTimeInMilliseconds; } public SetMarketMakerProtectionConfigRequest qtyLimit( - @jakarta.annotation.Nullable Double qtyLimit) { + @jakarta.annotation.Nonnull Double qtyLimit) { this.qtyLimit = qtyLimit; return this; } /** - * Get qtyLimit + * quantity limit * * @return qtyLimit */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull + @NotNull @Valid public Double getQtyLimit() { return qtyLimit; } - public void setQtyLimit(@jakarta.annotation.Nullable Double qtyLimit) { + public void setQtyLimit(@jakarta.annotation.Nonnull Double qtyLimit) { this.qtyLimit = qtyLimit; } public SetMarketMakerProtectionConfigRequest deltaLimit( - @jakarta.annotation.Nullable Double deltaLimit) { + @jakarta.annotation.Nonnull Double deltaLimit) { this.deltaLimit = deltaLimit; return this; } /** - * Get deltaLimit + * net delta limit * * @return deltaLimit */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull + @NotNull @Valid public Double getDeltaLimit() { return deltaLimit; } - public void setDeltaLimit(@jakarta.annotation.Nullable Double deltaLimit) { + public void setDeltaLimit(@jakarta.annotation.Nonnull Double deltaLimit) { this.deltaLimit = deltaLimit; } @@ -321,6 +328,11 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("underlying"); + openapiRequiredFields.add("windowTimeInMilliseconds"); + openapiRequiredFields.add("frozenTimeInMilliseconds"); + openapiRequiredFields.add("qtyLimit"); + openapiRequiredFields.add("deltaLimit"); } /** @@ -342,9 +354,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti .toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SetMarketMakerProtectionConfigRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("underlying") != null && !jsonObj.get("underlying").isJsonNull()) - && !jsonObj.get("underlying").isJsonPrimitive()) { + if (!jsonObj.get("underlying").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `underlying` to be a primitive type in the JSON" diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SetMarketMakerProtectionConfigResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SetMarketMakerProtectionConfigResponse.java index 26bc40a2d..7342f981f 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SetMarketMakerProtectionConfigResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/SetMarketMakerProtectionConfigResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SetMarketMakerProtectionConfigResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SetMarketMakerProtectionConfigResponse { public static final String SERIALIZED_NAME_UNDERLYING_ID = "underlyingId"; @@ -89,7 +89,7 @@ public SetMarketMakerProtectionConfigResponse underlyingId( } /** - * Get underlyingId + * underlying Id * * @return underlyingId */ @@ -109,7 +109,7 @@ public SetMarketMakerProtectionConfigResponse underlying( } /** - * Get underlying + * underlying * * @return underlying */ @@ -129,7 +129,7 @@ public SetMarketMakerProtectionConfigResponse windowTimeInMilliseconds( } /** - * Get windowTimeInMilliseconds + * window Time In Milliseconds * * @return windowTimeInMilliseconds */ @@ -150,7 +150,7 @@ public SetMarketMakerProtectionConfigResponse frozenTimeInMilliseconds( } /** - * Get frozenTimeInMilliseconds + * frozen Time In Milliseconds * * @return frozenTimeInMilliseconds */ @@ -171,7 +171,7 @@ public SetMarketMakerProtectionConfigResponse qtyLimit( } /** - * Get qtyLimit + * qty Limit * * @return qtyLimit */ @@ -191,7 +191,7 @@ public SetMarketMakerProtectionConfigResponse deltaLimit( } /** - * Get deltaLimit + * delta Limit * * @return deltaLimit */ @@ -211,7 +211,7 @@ public SetMarketMakerProtectionConfigResponse lastTriggerTime( } /** - * Get lastTriggerTime + * last Trigger Time * * @return lastTriggerTime */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Side.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Side.java index 7e5185228..c46f0dff5 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Side.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Side.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/StartUserDataStreamResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/StartUserDataStreamResponse.java index d2d015e2d..42d54c152 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/StartUserDataStreamResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/StartUserDataStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** StartUserDataStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class StartUserDataStreamResponse { public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; @@ -56,7 +56,7 @@ public StartUserDataStreamResponse listenKey(@jakarta.annotation.Nullable String } /** - * Get listenKey + * listen Key * * @return listenKey */ @@ -75,7 +75,7 @@ public StartUserDataStreamResponse expiration(@jakarta.annotation.Nullable Long } /** - * Get expiration + * Listen key expiration timestamp in milliseconds * * @return expiration */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Ticker24hrPriceChangeStatisticsResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Ticker24hrPriceChangeStatisticsResponse.java index 416170263..40f34eefc 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Ticker24hrPriceChangeStatisticsResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Ticker24hrPriceChangeStatisticsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** Ticker24hrPriceChangeStatisticsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrPriceChangeStatisticsResponse extends ArrayList { public Ticker24hrPriceChangeStatisticsResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Ticker24hrPriceChangeStatisticsResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Ticker24hrPriceChangeStatisticsResponseInner.java index 81656c33e..3050362f3 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Ticker24hrPriceChangeStatisticsResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Ticker24hrPriceChangeStatisticsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** Ticker24hrPriceChangeStatisticsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrPriceChangeStatisticsResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -153,7 +153,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner symbol( } /** - * Get symbol + * symbol * * @return symbol */ @@ -173,7 +173,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner priceChange( } /** - * Get priceChange + * 24-hour price change * * @return priceChange */ @@ -193,7 +193,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner priceChangePercent( } /** - * Get priceChangePercent + * 24-hour percent price change * * @return priceChangePercent */ @@ -213,7 +213,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner lastPrice( } /** - * Get lastPrice + * Last trade price * * @return lastPrice */ @@ -233,7 +233,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner lastQty( } /** - * Get lastQty + * Last trade amount * * @return lastQty */ @@ -253,7 +253,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner open( } /** - * Get open + * 24-hour open price * * @return open */ @@ -273,7 +273,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner high( } /** - * Get high + * 24-hour high * * @return high */ @@ -293,7 +293,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner low( } /** - * Get low + * 24-hour low * * @return low */ @@ -313,7 +313,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner volume( } /** - * Get volume + * Trading volume(contracts) * * @return volume */ @@ -333,7 +333,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner amount( } /** - * Get amount + * Trade amount(in quote asset) * * @return amount */ @@ -353,7 +353,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner bidPrice( } /** - * Get bidPrice + * The best buy price * * @return bidPrice */ @@ -373,7 +373,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner askPrice( } /** - * Get askPrice + * The best sell price * * @return askPrice */ @@ -393,7 +393,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner openTime( } /** - * Get openTime + * Time the first trade occurred within the last 24 hours * * @return openTime */ @@ -413,7 +413,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner closeTime( } /** - * Get closeTime + * Time the last trade occurred within the last 24 hours * * @return closeTime */ @@ -433,7 +433,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner firstTradeId( } /** - * Get firstTradeId + * First trade ID * * @return firstTradeId */ @@ -453,7 +453,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner tradeCount( } /** - * Get tradeCount + * Number of trades * * @return tradeCount */ @@ -473,7 +473,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner strikePrice( } /** - * Get strikePrice + * Strike price * * @return strikePrice */ @@ -493,7 +493,7 @@ public Ticker24hrPriceChangeStatisticsResponseInner exercisePrice( } /** - * Get exercisePrice + * return estimated settlement price one hour before exercise, return index price at other times * * @return exercisePrice */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/TimeInForce.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/TimeInForce.java index 5d8be4275..cf3b39596 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/TimeInForce.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/TimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/TradfiOptionsContractRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/TradfiOptionsContractRequest.java new file mode 100644 index 000000000..bd3be2198 --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/TradfiOptionsContractRequest.java @@ -0,0 +1,208 @@ +/* + * Options REST API + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.rest.model; + +import com.binance.connector.client.derivatives_trading_options.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** TradfiOptionsContractRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class TradfiOptionsContractRequest { + public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; + + @SerializedName(SERIALIZED_NAME_RECV_WINDOW) + @jakarta.annotation.Nullable + private Long recvWindow; + + public TradfiOptionsContractRequest() {} + + public TradfiOptionsContractRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) { + this.recvWindow = recvWindow; + return this; + } + + /** + * Get recvWindow maximum: 60000 + * + * @return recvWindow + */ + @jakarta.annotation.Nullable + @Max(60000L) + public Long getRecvWindow() { + return recvWindow; + } + + public void setRecvWindow(@jakarta.annotation.Nullable Long recvWindow) { + this.recvWindow = recvWindow; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TradfiOptionsContractRequest tradfiOptionsContractRequest = + (TradfiOptionsContractRequest) o; + return Objects.equals(this.recvWindow, tradfiOptionsContractRequest.recvWindow); + } + + @Override + public int hashCode() { + return Objects.hash(recvWindow); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TradfiOptionsContractRequest {\n"); + sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object recvWindowValue = getRecvWindow(); + String recvWindowValueAsString = ""; + recvWindowValueAsString = recvWindowValue.toString(); + sb.append("recvWindow=").append(urlEncode(recvWindowValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("recvWindow"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * TradfiOptionsContractRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TradfiOptionsContractRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in TradfiOptionsContractRequest is not" + + " found in the empty JSON string", + TradfiOptionsContractRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TradfiOptionsContractRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TradfiOptionsContractRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(TradfiOptionsContractRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, TradfiOptionsContractRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TradfiOptionsContractRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of TradfiOptionsContractRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of TradfiOptionsContractRequest + * @throws IOException if the JSON string is invalid with respect to + * TradfiOptionsContractRequest + */ + public static TradfiOptionsContractRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TradfiOptionsContractRequest.class); + } + + /** + * Convert an instance of TradfiOptionsContractRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/TradfiOptionsContractResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/TradfiOptionsContractResponse.java new file mode 100644 index 000000000..1432465a6 --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/TradfiOptionsContractResponse.java @@ -0,0 +1,248 @@ +/* + * Options REST API + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.rest.model; + +import com.binance.connector.client.derivatives_trading_options.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** TradfiOptionsContractResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class TradfiOptionsContractResponse { + public static final String SERIALIZED_NAME_CODE = "code"; + + @SerializedName(SERIALIZED_NAME_CODE) + @jakarta.annotation.Nullable + private Long code; + + public static final String SERIALIZED_NAME_MSG = "msg"; + + @SerializedName(SERIALIZED_NAME_MSG) + @jakarta.annotation.Nullable + private String msg; + + public TradfiOptionsContractResponse() {} + + public TradfiOptionsContractResponse code(@jakarta.annotation.Nullable Long code) { + this.code = code; + return this; + } + + /** + * Get code + * + * @return code + */ + @jakarta.annotation.Nullable + public Long getCode() { + return code; + } + + public void setCode(@jakarta.annotation.Nullable Long code) { + this.code = code; + } + + public TradfiOptionsContractResponse msg(@jakarta.annotation.Nullable String msg) { + this.msg = msg; + return this; + } + + /** + * Get msg + * + * @return msg + */ + @jakarta.annotation.Nullable + public String getMsg() { + return msg; + } + + public void setMsg(@jakarta.annotation.Nullable String msg) { + this.msg = msg; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TradfiOptionsContractResponse tradfiOptionsContractResponse = + (TradfiOptionsContractResponse) o; + return Objects.equals(this.code, tradfiOptionsContractResponse.code) + && Objects.equals(this.msg, tradfiOptionsContractResponse.msg); + } + + @Override + public int hashCode() { + return Objects.hash(code, msg); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TradfiOptionsContractResponse {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" msg: ").append(toIndentedString(msg)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object codeValue = getCode(); + String codeValueAsString = ""; + codeValueAsString = codeValue.toString(); + sb.append("code=").append(urlEncode(codeValueAsString)).append(""); + Object msgValue = getMsg(); + String msgValueAsString = ""; + msgValueAsString = msgValue.toString(); + sb.append("msg=").append(urlEncode(msgValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("msg"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * TradfiOptionsContractResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TradfiOptionsContractResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in TradfiOptionsContractResponse is not" + + " found in the empty JSON string", + TradfiOptionsContractResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("msg") != null && !jsonObj.get("msg").isJsonNull()) + && !jsonObj.get("msg").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `msg` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("msg").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TradfiOptionsContractResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TradfiOptionsContractResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(TradfiOptionsContractResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, TradfiOptionsContractResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TradfiOptionsContractResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of TradfiOptionsContractResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of TradfiOptionsContractResponse + * @throws IOException if the JSON string is invalid with respect to + * TradfiOptionsContractResponse + */ + public static TradfiOptionsContractResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TradfiOptionsContractResponse.class); + } + + /** + * Convert an instance of TradfiOptionsContractResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Type.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Type.java deleted file mode 100644 index c21346b24..000000000 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/Type.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_options.rest.model; - -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import org.hibernate.validator.constraints.*; - -/** Gets or Sets type */ -@JsonAdapter(Type.Adapter.class) -public enum Type { - LIMIT("LIMIT"); - - private String value; - - Type(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static Type fromValue(String value) { - for (Type b : Type.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final Type enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public Type read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return Type.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - Type.fromValue(value); - } -} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/UserCommissionResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/UserCommissionResponse.java index 733fce6d5..c633ffc13 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/UserCommissionResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/UserCommissionResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** UserCommissionResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserCommissionResponse { public static final String SERIALIZED_NAME_COMMISSIONS = "commissions"; @@ -67,7 +67,7 @@ public UserCommissionResponse addCommissionsItem( } /** - * Get commissions + * commissions * * @return commissions */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/UserCommissionResponseCommissionsInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/UserCommissionResponseCommissionsInner.java index 46f8f529a..e54e7947e 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/UserCommissionResponseCommissionsInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/UserCommissionResponseCommissionsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UserCommissionResponseCommissionsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserCommissionResponseCommissionsInner { public static final String SERIALIZED_NAME_UNDERLYING = "underlying"; @@ -63,7 +63,7 @@ public UserCommissionResponseCommissionsInner underlying( } /** - * Get underlying + * underlying * * @return underlying */ @@ -83,7 +83,7 @@ public UserCommissionResponseCommissionsInner makerFee( } /** - * Get makerFee + * maker Fee * * @return makerFee */ @@ -103,7 +103,7 @@ public UserCommissionResponseCommissionsInner takerFee( } /** - * Get takerFee + * taker Fee * * @return takerFee */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/UserExerciseRecordResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/UserExerciseRecordResponse.java index 91dce11b5..5eab3181d 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/UserExerciseRecordResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/UserExerciseRecordResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UserExerciseRecordResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserExerciseRecordResponse extends ArrayList { public UserExerciseRecordResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/UserExerciseRecordResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/UserExerciseRecordResponseInner.java index de2953c2c..f068b1651 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/UserExerciseRecordResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/UserExerciseRecordResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UserExerciseRecordResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserExerciseRecordResponseInner { public static final String SERIALIZED_NAME_ID = "id"; @@ -122,7 +122,7 @@ public UserExerciseRecordResponseInner id(@jakarta.annotation.Nullable String id } /** - * Get id + * id * * @return id */ @@ -141,7 +141,7 @@ public UserExerciseRecordResponseInner currency(@jakarta.annotation.Nullable Str } /** - * Get currency + * currency * * @return currency */ @@ -160,7 +160,7 @@ public UserExerciseRecordResponseInner symbol(@jakarta.annotation.Nullable Strin } /** - * Get symbol + * symbol * * @return symbol */ @@ -180,7 +180,7 @@ public UserExerciseRecordResponseInner exercisePrice( } /** - * Get exercisePrice + * exercise Price * * @return exercisePrice */ @@ -199,7 +199,7 @@ public UserExerciseRecordResponseInner quantity(@jakarta.annotation.Nullable Str } /** - * Get quantity + * quantity * * @return quantity */ @@ -218,7 +218,7 @@ public UserExerciseRecordResponseInner amount(@jakarta.annotation.Nullable Strin } /** - * Get amount + * amount * * @return amount */ @@ -237,7 +237,7 @@ public UserExerciseRecordResponseInner fee(@jakarta.annotation.Nullable String f } /** - * Get fee + * fee * * @return fee */ @@ -257,7 +257,7 @@ public UserExerciseRecordResponseInner createDate( } /** - * Get createDate + * create Date * * @return createDate */ @@ -277,7 +277,7 @@ public UserExerciseRecordResponseInner priceScale( } /** - * Get priceScale + * price Scale * * @return priceScale */ @@ -297,7 +297,7 @@ public UserExerciseRecordResponseInner quantityScale( } /** - * Get quantityScale + * quantity Scale * * @return quantityScale */ @@ -317,7 +317,7 @@ public UserExerciseRecordResponseInner optionSide( } /** - * Get optionSide + * option Side * * @return optionSide */ @@ -337,7 +337,7 @@ public UserExerciseRecordResponseInner positionSide( } /** - * Get positionSide + * position Side * * @return positionSide */ @@ -357,7 +357,7 @@ public UserExerciseRecordResponseInner quoteAsset( } /** - * Get quoteAsset + * quote Asset * * @return quoteAsset */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/JSON.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/JSON.java index ddd312f04..122884658 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/JSON.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -80,6 +80,11 @@ public static GsonBuilder createGson() { getClassForElement(JsonElement readElement) { Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put( + "ACCOUNT_UPDATE", + com.binance.connector.client + .derivatives_trading_options.websocket + .stream.model.AccountUpdate.class); classByDiscriminatorValue.put( "BALANCE_POSITION_UPDATE", com.binance.connector.client @@ -104,32 +109,7 @@ public static GsonBuilder createGson() { "listenKeyExpired", com.binance.connector.client .derivatives_trading_options.websocket - .stream.model.Listenkeyexpired.class); - classByDiscriminatorValue.put( - "balancePositionUpdate", - com.binance.connector.client - .derivatives_trading_options.websocket - .stream.model.BalancePositionUpdate.class); - classByDiscriminatorValue.put( - "greekUpdate", - com.binance.connector.client - .derivatives_trading_options.websocket - .stream.model.GreekUpdate.class); - classByDiscriminatorValue.put( - "listenkeyexpired", - com.binance.connector.client - .derivatives_trading_options.websocket - .stream.model.Listenkeyexpired.class); - classByDiscriminatorValue.put( - "orderTradeUpdate", - com.binance.connector.client - .derivatives_trading_options.websocket - .stream.model.OrderTradeUpdate.class); - classByDiscriminatorValue.put( - "riskLevelChange", - com.binance.connector.client - .derivatives_trading_options.websocket - .stream.model.RiskLevelChange.class); + .stream.model.ListenKeyExpired.class); classByDiscriminatorValue.put( "UserDataStreamEventsResponse", com.binance.connector.client @@ -190,6 +170,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_options.websocket.stream.model + .AccountUpdate.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.websocket.stream.model .BalancePositionUpdate.CustomTypeAdapterFactory()); @@ -207,16 +190,16 @@ private static Class getClassByDiscriminator( .DiffBookDepthStreamsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.websocket.stream.model - .DiffBookDepthStreamsResponseAItem.CustomTypeAdapterFactory()); + .GreekUpdate.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.websocket.stream.model - .DiffBookDepthStreamsResponseBItem.CustomTypeAdapterFactory()); + .GreekUpdateGInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.websocket.stream.model - .GreekUpdate.CustomTypeAdapterFactory()); + .Hour24TickerRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.websocket.stream.model - .GreekUpdateGInner.CustomTypeAdapterFactory()); + .Hour24TickerResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.websocket.stream.model .IndexPriceStreamsRequest.CustomTypeAdapterFactory()); @@ -243,16 +226,7 @@ private static Class getClassByDiscriminator( .KlineCandlestickStreamsResponseK.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.websocket.stream.model - .Listenkeyexpired.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_options.websocket.stream.model - .MarkPriceRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_options.websocket.stream.model - .MarkPriceResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_options.websocket.stream.model - .MarkPriceResponseInner.CustomTypeAdapterFactory()); + .ListenKeyExpired.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.websocket.stream.model .NewSymbolInfoRequest.CustomTypeAdapterFactory()); @@ -270,31 +244,28 @@ private static Class getClassByDiscriminator( .OpenInterestResponseInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.websocket.stream.model - .OrderTradeUpdate.CustomTypeAdapterFactory()); + .OptionMarkPriceRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.websocket.stream.model - .OrderTradeUpdateO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_options.websocket.stream.model - .PartialBookDepthStreamsRequest.CustomTypeAdapterFactory()); + .OptionMarkPriceResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.websocket.stream.model - .PartialBookDepthStreamsResponse.CustomTypeAdapterFactory()); + .OptionMarkPriceResponseInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.websocket.stream.model - .PartialBookDepthStreamsResponseAItem.CustomTypeAdapterFactory()); + .OrderTradeUpdate.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.websocket.stream.model - .PartialBookDepthStreamsResponseBItem.CustomTypeAdapterFactory()); + .OrderTradeUpdateO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.websocket.stream.model - .RiskLevelChange.CustomTypeAdapterFactory()); + .PartialBookDepthStreamsRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.websocket.stream.model - .Ticker24HourRequest.CustomTypeAdapterFactory()); + .PartialBookDepthStreamsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.websocket.stream.model - .Ticker24HourResponse.CustomTypeAdapterFactory()); + .RiskLevelChange.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_options.websocket.stream.model .TradeStreamsRequest.CustomTypeAdapterFactory()); diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/DerivativesTradingOptionsWebSocketStreams.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/DerivativesTradingOptionsWebSocketStreams.java index 32aac0b83..ef94407e6 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/DerivativesTradingOptionsWebSocketStreams.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/DerivativesTradingOptionsWebSocketStreams.java @@ -12,22 +12,22 @@ import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.DiffBookDepthStreamsRequest; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.DiffBookDepthStreamsResponse; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.Hour24TickerRequest; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.Hour24TickerResponse; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.IndexPriceStreamsRequest; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.IndexPriceStreamsResponse; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.IndividualSymbolBookTickerStreamsRequest; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.IndividualSymbolBookTickerStreamsResponse; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.KlineCandlestickStreamsRequest; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.KlineCandlestickStreamsResponse; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.MarkPriceRequest; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.MarkPriceResponse; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.NewSymbolInfoRequest; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.NewSymbolInfoResponse; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.OpenInterestRequest; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.OpenInterestResponse; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.OptionMarkPriceRequest; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.OptionMarkPriceResponse; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.PartialBookDepthStreamsRequest; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.PartialBookDepthStreamsResponse; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.Ticker24HourRequest; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.Ticker24HourResponse; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.TradeStreamsRequest; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.TradeStreamsResponse; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.UserDataStreamEventsResponse; @@ -40,7 +40,7 @@ public class DerivativesTradingOptionsWebSocketStreams { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/8.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private WebSocketClientConfiguration clientConfiguration; @@ -119,11 +119,6 @@ public StreamBlockingQueueWrapper klineCandlest return getMarketApi().klineCandlestickStreams(klineCandlestickStreamsRequest); } - public StreamBlockingQueueWrapper markPrice( - MarkPriceRequest markPriceRequest) throws ApiException { - return getMarketApi().markPrice(markPriceRequest); - } - public StreamBlockingQueueWrapper newSymbolInfo( NewSymbolInfoRequest newSymbolInfoRequest) throws ApiException { return getMarketApi().newSymbolInfo(newSymbolInfoRequest); @@ -134,11 +129,21 @@ public StreamBlockingQueueWrapper openInterest( return getMarketApi().openInterest(openInterestRequest); } + public StreamBlockingQueueWrapper optionMarkPrice( + OptionMarkPriceRequest optionMarkPriceRequest) throws ApiException { + return getMarketApi().optionMarkPrice(optionMarkPriceRequest); + } + public StreamBlockingQueueWrapper diffBookDepthStreams( DiffBookDepthStreamsRequest diffBookDepthStreamsRequest) throws ApiException { return getPublicApi().diffBookDepthStreams(diffBookDepthStreamsRequest); } + public StreamBlockingQueueWrapper hour24Ticker( + Hour24TickerRequest hour24TickerRequest) throws ApiException { + return getPublicApi().hour24Ticker(hour24TickerRequest); + } + public StreamBlockingQueueWrapper individualSymbolBookTickerStreams( IndividualSymbolBookTickerStreamsRequest @@ -153,11 +158,6 @@ public StreamBlockingQueueWrapper partialBookDe return getPublicApi().partialBookDepthStreams(partialBookDepthStreamsRequest); } - public StreamBlockingQueueWrapper ticker24Hour( - Ticker24HourRequest ticker24HourRequest) throws ApiException { - return getPublicApi().ticker24Hour(ticker24HourRequest); - } - public StreamBlockingQueueWrapper tradeStreams( TradeStreamsRequest tradeStreamsRequest) throws ApiException { return getPublicApi().tradeStreams(tradeStreamsRequest); diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/MarketApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/MarketApi.java index d9c8efc56..df8993b17 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/MarketApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/MarketApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -27,12 +27,12 @@ import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.IndexPriceStreamsResponse; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.KlineCandlestickStreamsRequest; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.KlineCandlestickStreamsResponse; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.MarkPriceRequest; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.MarkPriceResponse; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.NewSymbolInfoRequest; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.NewSymbolInfoResponse; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.OpenInterestRequest; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.OpenInterestResponse; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.OptionMarkPriceRequest; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.OptionMarkPriceResponse; import com.google.gson.reflect.TypeToken; import jakarta.validation.ConstraintViolation; import jakarta.validation.Validation; @@ -47,7 +47,7 @@ public class MarketApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/8.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private StreamConnectionInterface connection; @@ -88,7 +88,7 @@ public StreamConnectionInterface getConnection() { * * * @see Index + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/market#index-price-streams">Index * Price Streams Documentation */ public StreamBlockingQueueWrapper indexPriceStreams( @@ -167,7 +167,7 @@ private void indexPriceStreamsValidateBeforeCall( * * * @see Kline/Candlestick + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/market#kline-candlestick-streams">Kline/Candlestick * Streams Documentation */ public StreamBlockingQueueWrapper klineCandlestickStreams( @@ -242,50 +242,43 @@ private void klineCandlestickStreamsValidateBeforeCall( } /** - * Mark Price The mark price for all option symbols on specific underlying asset. - * E.g.[btcusdt@optionMarkPrice](wss://fstream.binance.com/market/stream?streams=btcusdt@optionMarkPrice) - * Update Speed: 1000ms + * New Symbol Info New symbol listing stream. Update Speed: 50ms * - * @param markPriceRequest (required) - * @return MarkPriceResponse + * @param newSymbolInfoRequest (required) + * @return NewSymbolInfoResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * *
Response Details
Status Code Description Response Headers
200 Mark Price -
200 New Symbol Info -
* * @see Mark - * Price Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/market#new-symbol-info">New + * Symbol Info Documentation */ - public StreamBlockingQueueWrapper markPrice( - MarkPriceRequest markPriceRequest) throws ApiException { - StreamBlockingQueue queue = markPriceRaw(markPriceRequest); + public StreamBlockingQueueWrapper newSymbolInfo( + NewSymbolInfoRequest newSymbolInfoRequest) throws ApiException { + StreamBlockingQueue queue = newSymbolInfoRaw(newSymbolInfoRequest); - TypeToken typeToken = new TypeToken() {}; + TypeToken typeToken = new TypeToken() {}; return new StreamBlockingQueueWrapper<>(queue, typeToken); } - public StreamBlockingQueue markPriceRaw(MarkPriceRequest markPriceRequest) + public StreamBlockingQueue newSymbolInfoRaw(NewSymbolInfoRequest newSymbolInfoRequest) throws ApiException { - markPriceValidateBeforeCall(markPriceRequest); + newSymbolInfoValidateBeforeCall(newSymbolInfoRequest); String methodName = - "/@optionMarkPrice" + "/!optionSymbol" .substring(1) .replace( "", - markPriceRequest.getId() != null - ? markPriceRequest.getId().toString() - : "") - .replace( - "", - markPriceRequest.getUnderlying() != null - ? markPriceRequest.getUnderlying().toString() + newSymbolInfoRequest.getId() != null + ? newSymbolInfoRequest.getId().toString() : ""); if ("@".equals(methodName.substring(methodName.length() - 1))) { methodName = methodName.substring(0, methodName.length() - 1); @@ -303,7 +296,7 @@ public StreamBlockingQueue markPriceRaw(MarkPriceRequest markPriceReques } @SuppressWarnings("rawtypes") - private void markPriceValidateBeforeCall(MarkPriceRequest markPriceRequest) + private void newSymbolInfoValidateBeforeCall(NewSymbolInfoRequest newSymbolInfoRequest) throws ApiException { try { Validator validator = @@ -313,8 +306,8 @@ private void markPriceValidateBeforeCall(MarkPriceRequest markPriceRequest) .buildValidatorFactory() .getValidator(); - Set> violations = - validator.validate(markPriceRequest); + Set> violations = + validator.validate(newSymbolInfoRequest); if (!violations.isEmpty()) { throw new ConstraintViolationException(violations); @@ -326,43 +319,55 @@ private void markPriceValidateBeforeCall(MarkPriceRequest markPriceRequest) } /** - * New Symbol Info New symbol listing stream. Update Speed: 50ms + * Open Interest Option open interest for specific underlying asset on specific expiration date. + * E.g.[ethusdt@openInterest@221125](wss://fstream.binance.com/market/stream?streams=ethusdt@openInterest@221125) + * Update Speed: 60s * - * @param newSymbolInfoRequest (required) - * @return NewSymbolInfoResponse + * @param openInterestRequest (required) + * @return OpenInterestResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * *
Response Details
Status Code Description Response Headers
200 New Symbol Info -
200 Open Interest -
* * @see New - * Symbol Info Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/market#open-interest">Open + * Interest Documentation */ - public StreamBlockingQueueWrapper newSymbolInfo( - NewSymbolInfoRequest newSymbolInfoRequest) throws ApiException { - StreamBlockingQueue queue = newSymbolInfoRaw(newSymbolInfoRequest); + public StreamBlockingQueueWrapper openInterest( + OpenInterestRequest openInterestRequest) throws ApiException { + StreamBlockingQueue queue = openInterestRaw(openInterestRequest); - TypeToken typeToken = new TypeToken() {}; + TypeToken typeToken = new TypeToken() {}; return new StreamBlockingQueueWrapper<>(queue, typeToken); } - public StreamBlockingQueue newSymbolInfoRaw(NewSymbolInfoRequest newSymbolInfoRequest) + public StreamBlockingQueue openInterestRaw(OpenInterestRequest openInterestRequest) throws ApiException { - newSymbolInfoValidateBeforeCall(newSymbolInfoRequest); + openInterestValidateBeforeCall(openInterestRequest); String methodName = - "/!optionSymbol" + "/@openInterest@" .substring(1) .replace( "", - newSymbolInfoRequest.getId() != null - ? newSymbolInfoRequest.getId().toString() + openInterestRequest.getId() != null + ? openInterestRequest.getId().toString() + : "") + .replace( + "", + openInterestRequest.getUnderlying() != null + ? openInterestRequest.getUnderlying().toString() + : "") + .replace( + "", + openInterestRequest.getExpirationDate() != null + ? openInterestRequest.getExpirationDate().toString() : ""); if ("@".equals(methodName.substring(methodName.length() - 1))) { methodName = methodName.substring(0, methodName.length() - 1); @@ -380,7 +385,7 @@ public StreamBlockingQueue newSymbolInfoRaw(NewSymbolInfoRequest newSymb } @SuppressWarnings("rawtypes") - private void newSymbolInfoValidateBeforeCall(NewSymbolInfoRequest newSymbolInfoRequest) + private void openInterestValidateBeforeCall(OpenInterestRequest openInterestRequest) throws ApiException { try { Validator validator = @@ -390,8 +395,8 @@ private void newSymbolInfoValidateBeforeCall(NewSymbolInfoRequest newSymbolInfoR .buildValidatorFactory() .getValidator(); - Set> violations = - validator.validate(newSymbolInfoRequest); + Set> violations = + validator.validate(openInterestRequest); if (!violations.isEmpty()) { throw new ConstraintViolationException(violations); @@ -403,50 +408,50 @@ private void newSymbolInfoValidateBeforeCall(NewSymbolInfoRequest newSymbolInfoR } /** - * Open Interest Option open interest for specific underlying asset on specific expiration date. - * E.g.[ethusdt@openInterest@221125](wss://fstream.binance.com/market/stream?streams=ethusdt@openInterest@221125) - * Update Speed: 60s + * Option Mark Price The mark price for all option symbols on specific underlying asset. + * E.g.[btcusdt@optionMarkPrice](wss://fstream.binance.com/market/stream?streams=btcusdt@optionMarkPrice) + * Update Speed: 1000ms * - * @param openInterestRequest (required) - * @return OpenInterestResponse + * @param optionMarkPriceRequest (required) + * @return OptionMarkPriceResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * *
Response Details
Status Code Description Response Headers
200 Open Interest -
200 Mark Price -
* * @see Open - * Interest Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/market#option-mark-price">Option + * Mark Price Documentation */ - public StreamBlockingQueueWrapper openInterest( - OpenInterestRequest openInterestRequest) throws ApiException { - StreamBlockingQueue queue = openInterestRaw(openInterestRequest); + public StreamBlockingQueueWrapper optionMarkPrice( + OptionMarkPriceRequest optionMarkPriceRequest) throws ApiException { + StreamBlockingQueue queue = optionMarkPriceRaw(optionMarkPriceRequest); - TypeToken typeToken = new TypeToken() {}; + TypeToken typeToken = new TypeToken() {}; return new StreamBlockingQueueWrapper<>(queue, typeToken); } - public StreamBlockingQueue openInterestRaw(OpenInterestRequest openInterestRequest) - throws ApiException { - openInterestValidateBeforeCall(openInterestRequest); + public StreamBlockingQueue optionMarkPriceRaw( + OptionMarkPriceRequest optionMarkPriceRequest) throws ApiException { + optionMarkPriceValidateBeforeCall(optionMarkPriceRequest); String methodName = - "/underlying@optionOpenInterest@" + "/@optionMarkPrice" .substring(1) .replace( "", - openInterestRequest.getId() != null - ? openInterestRequest.getId().toString() + optionMarkPriceRequest.getId() != null + ? optionMarkPriceRequest.getId().toString() : "") .replace( - "", - openInterestRequest.getExpirationDate() != null - ? openInterestRequest.getExpirationDate().toString() + "", + optionMarkPriceRequest.getUnderlying() != null + ? optionMarkPriceRequest.getUnderlying().toString() : ""); if ("@".equals(methodName.substring(methodName.length() - 1))) { methodName = methodName.substring(0, methodName.length() - 1); @@ -464,7 +469,7 @@ public StreamBlockingQueue openInterestRaw(OpenInterestRequest openInter } @SuppressWarnings("rawtypes") - private void openInterestValidateBeforeCall(OpenInterestRequest openInterestRequest) + private void optionMarkPriceValidateBeforeCall(OptionMarkPriceRequest optionMarkPriceRequest) throws ApiException { try { Validator validator = @@ -474,8 +479,8 @@ private void openInterestValidateBeforeCall(OpenInterestRequest openInterestRequ .buildValidatorFactory() .getValidator(); - Set> violations = - validator.validate(openInterestRequest); + Set> violations = + validator.validate(optionMarkPriceRequest); if (!violations.isEmpty()) { throw new ConstraintViolationException(violations); diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/PublicApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/PublicApi.java index 8ffd35bc7..1f6bc4032 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/PublicApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/PublicApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -25,12 +25,12 @@ import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.DiffBookDepthStreamsRequest; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.DiffBookDepthStreamsResponse; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.Hour24TickerRequest; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.Hour24TickerResponse; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.IndividualSymbolBookTickerStreamsRequest; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.IndividualSymbolBookTickerStreamsResponse; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.PartialBookDepthStreamsRequest; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.PartialBookDepthStreamsResponse; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.Ticker24HourRequest; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.Ticker24HourResponse; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.TradeStreamsRequest; import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.TradeStreamsResponse; import com.google.gson.reflect.TypeToken; @@ -47,7 +47,7 @@ public class PublicApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/8.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private StreamConnectionInterface connection; @@ -89,7 +89,7 @@ public StreamConnectionInterface getConnection() { * * * @see Diff + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/public#diff-book-depth-streams">Diff * Book Depth Streams Documentation */ public StreamBlockingQueueWrapper diffBookDepthStreams( @@ -162,6 +162,94 @@ private void diffBookDepthStreamsValidateBeforeCall( } } + /** + * 24-hour TICKER 24hr ticker info for all symbols. Only symbols whose ticker info changed will + * be sent. Update Speed: 1000ms + * + * @param hour24TickerRequest (required) + * @return Hour24TickerResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 24-hour TICKER -
+ * + * @see 24-hour + * TICKER Documentation + */ + public StreamBlockingQueueWrapper hour24Ticker( + Hour24TickerRequest hour24TickerRequest) throws ApiException { + StreamBlockingQueue queue = hour24TickerRaw(hour24TickerRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue hour24TickerRaw(Hour24TickerRequest hour24TickerRequest) + throws ApiException { + hour24TickerValidateBeforeCall(hour24TickerRequest); + + String methodName = + "/@optionTicker" + .substring(1) + .replace( + "", + hour24TickerRequest.getId() != null + ? hour24TickerRequest.getId().toString() + : "") + .replace( + "", + hour24TickerRequest.getSymbol() != null + ? hour24TickerRequest.getSymbol().toString() + : "") + .replace( + "", + hour24TickerRequest.getExpirationDate() != null + ? hour24TickerRequest.getExpirationDate().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void hour24TickerValidateBeforeCall(Hour24TickerRequest hour24TickerRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(hour24TickerRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + /** * Individual Symbol Book Ticker Streams Pushes any update to the best bid or ask's price or * quantity in real-time for a specified symbol. Update Speed: Real-Time @@ -178,7 +266,7 @@ private void diffBookDepthStreamsValidateBeforeCall( * * * @see Individual + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/public#individual-symbol-book-ticker-streams">Individual * Symbol Book Ticker Streams Documentation */ public StreamBlockingQueueWrapper @@ -258,8 +346,8 @@ private void individualSymbolBookTickerStreamsValidateBeforeCall( } /** - * Partial Book Depth Streams Top **<levels\\>** bids and asks, Valid levels are - * **<levels\\>** are 5, 10, 20. Update Speed: 100ms or 500ms + * Partial Book Depth Streams Top <levels> bids and asks. Valid <levels> are 5, 10, + * 20. Update Speed: 100ms or 500ms * * @param partialBookDepthStreamsRequest (required) * @return PartialBookDepthStreamsResponse @@ -273,7 +361,7 @@ private void individualSymbolBookTickerStreamsValidateBeforeCall( * * * @see Partial + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/public#partial-book-depth-streams">Partial * Book Depth Streams Documentation */ public StreamBlockingQueueWrapper partialBookDepthStreams( @@ -352,89 +440,6 @@ private void partialBookDepthStreamsValidateBeforeCall( } } - /** - * 24-hour TICKER 24hr ticker info for all symbols. Only symbols whose ticker info changed will - * be sent. Update Speed: 1000ms - * - * @param ticker24HourRequest (required) - * @return Ticker24HourResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 24-hour TICKER -
- * - * @see 24-hour - * TICKER Documentation - */ - public StreamBlockingQueueWrapper ticker24Hour( - Ticker24HourRequest ticker24HourRequest) throws ApiException { - StreamBlockingQueue queue = ticker24HourRaw(ticker24HourRequest); - - TypeToken typeToken = new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue ticker24HourRaw(Ticker24HourRequest ticker24HourRequest) - throws ApiException { - ticker24HourValidateBeforeCall(ticker24HourRequest); - - String methodName = - "/@optionTicker" - .substring(1) - .replace( - "", - ticker24HourRequest.getId() != null - ? ticker24HourRequest.getId().toString() - : "") - .replace( - "", - ticker24HourRequest.getSymbol() != null - ? ticker24HourRequest.getSymbol().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void ticker24HourValidateBeforeCall(Ticker24HourRequest ticker24HourRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(ticker24HourRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - /** * Trade Streams The Trade Streams push raw trade information for specific symbol or underlying * asset. @@ -453,7 +458,7 @@ private void ticker24HourValidateBeforeCall(Ticker24HourRequest ticker24HourRequ * * * @see Trade + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/public#trade-streams">Trade * Streams Documentation */ public StreamBlockingQueueWrapper tradeStreams( diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/AbstractOpenApiSchema.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/AbstractOpenApiSchema.java index e81c98581..e9f4f9d96 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/AbstractOpenApiSchema.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/AbstractOpenApiSchema.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -18,7 +18,7 @@ /** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/AccountUpdate.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/AccountUpdate.java new file mode 100644 index 000000000..745e39204 --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/AccountUpdate.java @@ -0,0 +1,583 @@ +/* + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AccountUpdate */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AccountUpdate extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public static final String SERIALIZED_NAME_EQ = "eq"; + + @SerializedName(SERIALIZED_NAME_EQ) + @jakarta.annotation.Nullable + private String eq; + + public static final String SERIALIZED_NAME_AEQ = "aeq"; + + @SerializedName(SERIALIZED_NAME_AEQ) + @jakarta.annotation.Nullable + private String aeq; + + public static final String SERIALIZED_NAME_B_LOWER_CASE = "b"; + + @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) + @jakarta.annotation.Nullable + private String bLowerCase; + + public static final String SERIALIZED_NAME_M_LOWER_CASE = "m"; + + @SerializedName(SERIALIZED_NAME_M_LOWER_CASE) + @jakarta.annotation.Nullable + private String mLowerCase; + + public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; + + @SerializedName(SERIALIZED_NAME_U_LOWER_CASE) + @jakarta.annotation.Nullable + private String uLowerCase; + + public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; + + @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) + @jakarta.annotation.Nullable + private String iLowerCase; + + public static final String SERIALIZED_NAME_M = "M"; + + @SerializedName(SERIALIZED_NAME_M) + @jakarta.annotation.Nullable + private String M; + + public AccountUpdate() {} + + public AccountUpdate E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public AccountUpdate T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * Transaction Time + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + public AccountUpdate eq(@jakarta.annotation.Nullable String eq) { + this.eq = eq; + return this; + } + + /** + * Account equity in USDT + * + * @return eq + */ + @jakarta.annotation.Nullable + public String getEq() { + return eq; + } + + public void setEq(@jakarta.annotation.Nullable String eq) { + this.eq = eq; + } + + public AccountUpdate aeq(@jakarta.annotation.Nullable String aeq) { + this.aeq = aeq; + return this; + } + + /** + * Account adjusted equity in USDT + * + * @return aeq + */ + @jakarta.annotation.Nullable + public String getAeq() { + return aeq; + } + + public void setAeq(@jakarta.annotation.Nullable String aeq) { + this.aeq = aeq; + } + + public AccountUpdate bLowerCase(@jakarta.annotation.Nullable String bLowerCase) { + this.bLowerCase = bLowerCase; + return this; + } + + /** + * Account wallet balance in USDT + * + * @return bLowerCase + */ + @jakarta.annotation.Nullable + public String getbLowerCase() { + return bLowerCase; + } + + public void setbLowerCase(@jakarta.annotation.Nullable String bLowerCase) { + this.bLowerCase = bLowerCase; + } + + public AccountUpdate mLowerCase(@jakarta.annotation.Nullable String mLowerCase) { + this.mLowerCase = mLowerCase; + return this; + } + + /** + * Position value + * + * @return mLowerCase + */ + @jakarta.annotation.Nullable + public String getmLowerCase() { + return mLowerCase; + } + + public void setmLowerCase(@jakarta.annotation.Nullable String mLowerCase) { + this.mLowerCase = mLowerCase; + } + + public AccountUpdate uLowerCase(@jakarta.annotation.Nullable String uLowerCase) { + this.uLowerCase = uLowerCase; + return this; + } + + /** + * Unrealized PnL + * + * @return uLowerCase + */ + @jakarta.annotation.Nullable + public String getuLowerCase() { + return uLowerCase; + } + + public void setuLowerCase(@jakarta.annotation.Nullable String uLowerCase) { + this.uLowerCase = uLowerCase; + } + + public AccountUpdate iLowerCase(@jakarta.annotation.Nullable String iLowerCase) { + this.iLowerCase = iLowerCase; + return this; + } + + /** + * Initial margin in USDT + * + * @return iLowerCase + */ + @jakarta.annotation.Nullable + public String getiLowerCase() { + return iLowerCase; + } + + public void setiLowerCase(@jakarta.annotation.Nullable String iLowerCase) { + this.iLowerCase = iLowerCase; + } + + public AccountUpdate M(@jakarta.annotation.Nullable String M) { + this.M = M; + return this; + } + + /** + * Maintenance margin in USDT + * + * @return M + */ + @jakarta.annotation.Nullable + public String getM() { + return M; + } + + public void setM(@jakarta.annotation.Nullable String M) { + this.M = M; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountUpdate accountUpdate = (AccountUpdate) o; + return Objects.equals(this.E, accountUpdate.E) + && Objects.equals(this.T, accountUpdate.T) + && Objects.equals(this.eq, accountUpdate.eq) + && Objects.equals(this.aeq, accountUpdate.aeq) + && Objects.equals(this.bLowerCase, accountUpdate.bLowerCase) + && Objects.equals(this.mLowerCase, accountUpdate.mLowerCase) + && Objects.equals(this.uLowerCase, accountUpdate.uLowerCase) + && Objects.equals(this.iLowerCase, accountUpdate.iLowerCase) + && Objects.equals(this.M, accountUpdate.M); + } + + @Override + public int hashCode() { + return Objects.hash(E, T, eq, aeq, bLowerCase, mLowerCase, uLowerCase, iLowerCase, M); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountUpdate {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" eq: ").append(toIndentedString(eq)).append("\n"); + sb.append(" aeq: ").append(toIndentedString(aeq)).append("\n"); + sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); + sb.append(" mLowerCase: ").append(toIndentedString(mLowerCase)).append("\n"); + sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); + sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); + sb.append(" M: ").append(toIndentedString(M)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + String eqValue = getEq(); + if (eqValue != null) { + String eqValueAsString = eqValue.toString(); + valMap.put("eq", eqValueAsString); + } + String aeqValue = getAeq(); + if (aeqValue != null) { + String aeqValueAsString = aeqValue.toString(); + valMap.put("aeq", aeqValueAsString); + } + String bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + String bLowerCaseValueAsString = bLowerCaseValue.toString(); + valMap.put("bLowerCase", bLowerCaseValueAsString); + } + String mLowerCaseValue = getmLowerCase(); + if (mLowerCaseValue != null) { + String mLowerCaseValueAsString = mLowerCaseValue.toString(); + valMap.put("mLowerCase", mLowerCaseValueAsString); + } + String uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + String uLowerCaseValueAsString = uLowerCaseValue.toString(); + valMap.put("uLowerCase", uLowerCaseValueAsString); + } + String iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + String iLowerCaseValueAsString = iLowerCaseValue.toString(); + valMap.put("iLowerCase", iLowerCaseValueAsString); + } + String MValue = getM(); + if (MValue != null) { + String MValueAsString = MValue.toString(); + valMap.put("M", MValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + Object eqValue = getEq(); + if (eqValue != null) { + valMap.put("eq", eqValue); + } + Object aeqValue = getAeq(); + if (aeqValue != null) { + valMap.put("aeq", aeqValue); + } + Object bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + valMap.put("bLowerCase", bLowerCaseValue); + } + Object mLowerCaseValue = getmLowerCase(); + if (mLowerCaseValue != null) { + valMap.put("mLowerCase", mLowerCaseValue); + } + Object uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + valMap.put("uLowerCase", uLowerCaseValue); + } + Object iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + valMap.put("iLowerCase", iLowerCaseValue); + } + Object MValue = getM(); + if (MValue != null) { + valMap.put("M", MValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("T"); + openapiFields.add("eq"); + openapiFields.add("aeq"); + openapiFields.add("b"); + openapiFields.add("m"); + openapiFields.add("u"); + openapiFields.add("i"); + openapiFields.add("M"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AccountUpdate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AccountUpdate.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AccountUpdate is not found in the" + + " empty JSON string", + AccountUpdate.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AccountUpdate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AccountUpdate` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("eq") != null && !jsonObj.get("eq").isJsonNull()) + && !jsonObj.get("eq").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `eq` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("eq").toString())); + } + if ((jsonObj.get("aeq") != null && !jsonObj.get("aeq").isJsonNull()) + && !jsonObj.get("aeq").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `aeq` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("aeq").toString())); + } + if ((jsonObj.get("b") != null && !jsonObj.get("b").isJsonNull()) + && !jsonObj.get("b").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `b` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("b").toString())); + } + if ((jsonObj.get("m") != null && !jsonObj.get("m").isJsonNull()) + && !jsonObj.get("m").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `m` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("m").toString())); + } + if ((jsonObj.get("u") != null && !jsonObj.get("u").isJsonNull()) + && !jsonObj.get("u").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `u` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("u").toString())); + } + if ((jsonObj.get("i") != null && !jsonObj.get("i").isJsonNull()) + && !jsonObj.get("i").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `i` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("i").toString())); + } + if ((jsonObj.get("M") != null && !jsonObj.get("M").isJsonNull()) + && !jsonObj.get("M").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `M` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("M").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AccountUpdate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AccountUpdate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AccountUpdate.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AccountUpdate value) throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AccountUpdate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AccountUpdate given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountUpdate + * @throws IOException if the JSON string is invalid with respect to AccountUpdate + */ + public static AccountUpdate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AccountUpdate.class); + } + + /** + * Convert an instance of AccountUpdate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/BalancePositionUpdate.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/BalancePositionUpdate.java index 843cb3e52..0ed5d850d 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/BalancePositionUpdate.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/BalancePositionUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** BalancePositionUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BalancePositionUpdate extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -81,7 +81,7 @@ public BalancePositionUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -100,7 +100,7 @@ public BalancePositionUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ @@ -119,7 +119,7 @@ public BalancePositionUpdate mLowerCase(@jakarta.annotation.Nullable String mLow } /** - * Get mLowerCase + * Event reason type * * @return mLowerCase */ @@ -147,7 +147,7 @@ public BalancePositionUpdate addBItem(BalancePositionUpdateBInner BItem) { } /** - * Get B + * Balances * * @return B */ @@ -176,7 +176,7 @@ public BalancePositionUpdate addPItem(BalancePositionUpdatePInner PItem) { } /** - * Get P + * Positions * * @return P */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/BalancePositionUpdateBInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/BalancePositionUpdateBInner.java index 2bec2e297..f75367d86 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/BalancePositionUpdateBInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/BalancePositionUpdateBInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** BalancePositionUpdateBInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BalancePositionUpdateBInner extends BaseDTO { public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; @@ -65,7 +65,7 @@ public BalancePositionUpdateBInner aLowerCase(@jakarta.annotation.Nullable Strin } /** - * Get aLowerCase + * Margin asset * * @return aLowerCase */ @@ -84,7 +84,7 @@ public BalancePositionUpdateBInner bLowerCase(@jakarta.annotation.Nullable Strin } /** - * Get bLowerCase + * Account balance * * @return bLowerCase */ @@ -103,7 +103,7 @@ public BalancePositionUpdateBInner bc(@jakarta.annotation.Nullable String bc) { } /** - * Get bc + * Balance Change except PnL and Commission * * @return bc */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/BalancePositionUpdatePInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/BalancePositionUpdatePInner.java index 42367eb33..f6f70da33 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/BalancePositionUpdatePInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/BalancePositionUpdatePInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** BalancePositionUpdatePInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BalancePositionUpdatePInner extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -71,7 +71,7 @@ public BalancePositionUpdatePInner sLowerCase(@jakarta.annotation.Nullable Strin } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -90,7 +90,7 @@ public BalancePositionUpdatePInner cLowerCase(@jakarta.annotation.Nullable Strin } /** - * Get cLowerCase + * Position quantity * * @return cLowerCase */ @@ -109,7 +109,7 @@ public BalancePositionUpdatePInner pLowerCase(@jakarta.annotation.Nullable Strin } /** - * Get pLowerCase + * Position value * * @return pLowerCase */ @@ -128,7 +128,7 @@ public BalancePositionUpdatePInner aLowerCase(@jakarta.annotation.Nullable Strin } /** - * Get aLowerCase + * Average entry price * * @return aLowerCase */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/DiffBookDepthStreamsRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/DiffBookDepthStreamsRequest.java index e0c11d2f5..69c918bbf 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/DiffBookDepthStreamsRequest.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/DiffBookDepthStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** DiffBookDepthStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DiffBookDepthStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,14 +49,14 @@ public class DiffBookDepthStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_UPDATE_SPEED = "updateSpeed"; @SerializedName(SERIALIZED_NAME_UPDATE_SPEED) @jakarta.annotation.Nullable - private String updateSpeed; + private UpdateSpeed updateSpeed; public DiffBookDepthStreamsRequest() {} @@ -65,7 +66,7 @@ public DiffBookDepthStreamsRequest id(@jakarta.annotation.Nullable Integer id) { } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -78,28 +79,27 @@ public void setId(@jakarta.annotation.Nullable Integer id) { this.id = id; } - public DiffBookDepthStreamsRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public DiffBookDepthStreamsRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } public DiffBookDepthStreamsRequest updateSpeed( - @jakarta.annotation.Nullable String updateSpeed) { + @jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; return this; } @@ -110,11 +110,12 @@ public DiffBookDepthStreamsRequest updateSpeed( * @return updateSpeed */ @jakarta.annotation.Nullable - public String getUpdateSpeed() { + @Valid + public UpdateSpeed getUpdateSpeed() { return updateSpeed; } - public void setUpdateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public void setUpdateSpeed(@jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; } @@ -162,7 +163,7 @@ public String toUrlQueryString() { String symbolValueAsString = symbolValue.toString(); valMap.put("symbol", symbolValueAsString); } - String updateSpeedValue = getUpdateSpeed(); + UpdateSpeed updateSpeedValue = getUpdateSpeed(); if (updateSpeedValue != null) { String updateSpeedValueAsString = updateSpeedValue.toString(); valMap.put("updateSpeed", updateSpeedValueAsString); @@ -222,7 +223,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -255,31 +255,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DiffBookDepthStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - if ((jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) - && !jsonObj.get("updateSpeed").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `updateSpeed` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("updateSpeed").toString())); + // validate the optional field `updateSpeed` + if (jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) { + UpdateSpeed.validateJsonElement(jsonObj.get("updateSpeed")); } } diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/DiffBookDepthStreamsResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/DiffBookDepthStreamsResponse.java index a3fe9f38e..d29ea527b 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/DiffBookDepthStreamsResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/DiffBookDepthStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** DiffBookDepthStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DiffBookDepthStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -88,13 +88,13 @@ public class DiffBookDepthStreamsResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) @jakarta.annotation.Nullable - private List bLowerCase; + private List> bLowerCase; public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) @jakarta.annotation.Nullable - private List aLowerCase; + private List> aLowerCase; public DiffBookDepthStreamsResponse() {} @@ -104,7 +104,7 @@ public DiffBookDepthStreamsResponse eLowerCase(@jakarta.annotation.Nullable Stri } /** - * Get eLowerCase + * event type * * @return eLowerCase */ @@ -123,7 +123,7 @@ public DiffBookDepthStreamsResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * event time * * @return E */ @@ -142,7 +142,7 @@ public DiffBookDepthStreamsResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * transaction time * * @return T */ @@ -161,7 +161,7 @@ public DiffBookDepthStreamsResponse sLowerCase(@jakarta.annotation.Nullable Stri } /** - * Get sLowerCase + * Option symbol * * @return sLowerCase */ @@ -180,7 +180,7 @@ public DiffBookDepthStreamsResponse U(@jakarta.annotation.Nullable Long U) { } /** - * Get U + * First update ID in event * * @return U */ @@ -199,7 +199,7 @@ public DiffBookDepthStreamsResponse uLowerCase(@jakarta.annotation.Nullable Long } /** - * Get uLowerCase + * Final update ID in event * * @return uLowerCase */ @@ -218,7 +218,7 @@ public DiffBookDepthStreamsResponse pu(@jakarta.annotation.Nullable Long pu) { } /** - * Get pu + * Final update Id in last stream(ie `u` in last stream) * * @return pu */ @@ -232,13 +232,12 @@ public void setPu(@jakarta.annotation.Nullable Long pu) { } public DiffBookDepthStreamsResponse bLowerCase( - @jakarta.annotation.Nullable List bLowerCase) { + @jakarta.annotation.Nullable List> bLowerCase) { this.bLowerCase = bLowerCase; return this; } - public DiffBookDepthStreamsResponse addBLowerCaseItem( - DiffBookDepthStreamsResponseBItem bLowerCaseItem) { + public DiffBookDepthStreamsResponse addBLowerCaseItem(List bLowerCaseItem) { if (this.bLowerCase == null) { this.bLowerCase = new ArrayList<>(); } @@ -247,29 +246,27 @@ public DiffBookDepthStreamsResponse addBLowerCaseItem( } /** - * Get bLowerCase + * Buy order * * @return bLowerCase */ @jakarta.annotation.Nullable @Valid - public List getbLowerCase() { + public List> getbLowerCase() { return bLowerCase; } - public void setbLowerCase( - @jakarta.annotation.Nullable List bLowerCase) { + public void setbLowerCase(@jakarta.annotation.Nullable List> bLowerCase) { this.bLowerCase = bLowerCase; } public DiffBookDepthStreamsResponse aLowerCase( - @jakarta.annotation.Nullable List aLowerCase) { + @jakarta.annotation.Nullable List> aLowerCase) { this.aLowerCase = aLowerCase; return this; } - public DiffBookDepthStreamsResponse addALowerCaseItem( - DiffBookDepthStreamsResponseAItem aLowerCaseItem) { + public DiffBookDepthStreamsResponse addALowerCaseItem(List aLowerCaseItem) { if (this.aLowerCase == null) { this.aLowerCase = new ArrayList<>(); } @@ -278,18 +275,17 @@ public DiffBookDepthStreamsResponse addALowerCaseItem( } /** - * Get aLowerCase + * Sell order * * @return aLowerCase */ @jakarta.annotation.Nullable @Valid - public List getaLowerCase() { + public List> getaLowerCase() { return aLowerCase; } - public void setaLowerCase( - @jakarta.annotation.Nullable List aLowerCase) { + public void setaLowerCase(@jakarta.annotation.Nullable List> aLowerCase) { this.aLowerCase = aLowerCase; } @@ -376,12 +372,12 @@ public String toUrlQueryString() { String puValueAsString = puValue.toString(); valMap.put("pu", puValueAsString); } - List bLowerCaseValue = getbLowerCase(); + List> bLowerCaseValue = getbLowerCase(); if (bLowerCaseValue != null) { String bLowerCaseValueAsString = JSON.getGson().toJson(bLowerCaseValue); valMap.put("bLowerCase", bLowerCaseValueAsString); } - List aLowerCaseValue = getaLowerCase(); + List> aLowerCaseValue = getaLowerCase(); if (aLowerCaseValue != null) { String aLowerCaseValueAsString = JSON.getGson().toJson(aLowerCaseValue); valMap.put("aLowerCase", aLowerCaseValueAsString); diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/DiffBookDepthStreamsResponseAItem.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/DiffBookDepthStreamsResponseAItem.java deleted file mode 100644 index 43eabe775..000000000 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/DiffBookDepthStreamsResponseAItem.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; - -import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** DiffBookDepthStreamsResponseAItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DiffBookDepthStreamsResponseAItem extends ArrayList { - public DiffBookDepthStreamsResponseAItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DiffBookDepthStreamsResponseAItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * DiffBookDepthStreamsResponseAItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DiffBookDepthStreamsResponseAItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DiffBookDepthStreamsResponseAItem is" - + " not found in the empty JSON string", - DiffBookDepthStreamsResponseAItem.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DiffBookDepthStreamsResponseAItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DiffBookDepthStreamsResponseAItem` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DiffBookDepthStreamsResponseAItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DiffBookDepthStreamsResponseAItem' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DiffBookDepthStreamsResponseAItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DiffBookDepthStreamsResponseAItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public DiffBookDepthStreamsResponseAItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DiffBookDepthStreamsResponseAItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of DiffBookDepthStreamsResponseAItem - * @throws IOException if the JSON string is invalid with respect to - * DiffBookDepthStreamsResponseAItem - */ - public static DiffBookDepthStreamsResponseAItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DiffBookDepthStreamsResponseAItem.class); - } - - /** - * Convert an instance of DiffBookDepthStreamsResponseAItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/DiffBookDepthStreamsResponseBItem.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/DiffBookDepthStreamsResponseBItem.java deleted file mode 100644 index 495418f35..000000000 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/DiffBookDepthStreamsResponseBItem.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; - -import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** DiffBookDepthStreamsResponseBItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DiffBookDepthStreamsResponseBItem extends ArrayList { - public DiffBookDepthStreamsResponseBItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DiffBookDepthStreamsResponseBItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * DiffBookDepthStreamsResponseBItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DiffBookDepthStreamsResponseBItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DiffBookDepthStreamsResponseBItem is" - + " not found in the empty JSON string", - DiffBookDepthStreamsResponseBItem.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DiffBookDepthStreamsResponseBItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DiffBookDepthStreamsResponseBItem` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DiffBookDepthStreamsResponseBItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DiffBookDepthStreamsResponseBItem' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DiffBookDepthStreamsResponseBItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DiffBookDepthStreamsResponseBItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public DiffBookDepthStreamsResponseBItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DiffBookDepthStreamsResponseBItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of DiffBookDepthStreamsResponseBItem - * @throws IOException if the JSON string is invalid with respect to - * DiffBookDepthStreamsResponseBItem - */ - public static DiffBookDepthStreamsResponseBItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DiffBookDepthStreamsResponseBItem.class); - } - - /** - * Convert an instance of DiffBookDepthStreamsResponseBItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/GreekUpdate.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/GreekUpdate.java index 532349d23..67bc54a82 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/GreekUpdate.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/GreekUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** GreekUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GreekUpdate extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -69,7 +69,7 @@ public GreekUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -88,7 +88,7 @@ public GreekUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/GreekUpdateGInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/GreekUpdateGInner.java index 912feca56..d499ab7e6 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/GreekUpdateGInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/GreekUpdateGInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** GreekUpdateGInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GreekUpdateGInner extends BaseDTO { public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; @@ -77,7 +77,7 @@ public GreekUpdateGInner uLowerCase(@jakarta.annotation.Nullable String uLowerCa } /** - * Get uLowerCase + * Underlying * * @return uLowerCase */ @@ -96,7 +96,7 @@ public GreekUpdateGInner dLowerCase(@jakarta.annotation.Nullable String dLowerCa } /** - * Get dLowerCase + * Delta * * @return dLowerCase */ @@ -115,7 +115,7 @@ public GreekUpdateGInner gLowerCase(@jakarta.annotation.Nullable String gLowerCa } /** - * Get gLowerCase + * Gamma * * @return gLowerCase */ @@ -134,7 +134,7 @@ public GreekUpdateGInner tLowerCase(@jakarta.annotation.Nullable String tLowerCa } /** - * Get tLowerCase + * Theta * * @return tLowerCase */ @@ -153,7 +153,7 @@ public GreekUpdateGInner vLowerCase(@jakarta.annotation.Nullable String vLowerCa } /** - * Get vLowerCase + * Vega * * @return vLowerCase */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Hour24TickerRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Hour24TickerRequest.java new file mode 100644 index 000000000..49a2a140f --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Hour24TickerRequest.java @@ -0,0 +1,322 @@ +/* + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** Hour24TickerRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class Hour24TickerRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Integer id; + + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_EXPIRATION_DATE = "expirationDate"; + + @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) + @jakarta.annotation.Nullable + private String expirationDate; + + public Hour24TickerRequest() {} + + public Hour24TickerRequest id(@jakarta.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Integer id) { + this.id = id; + } + + public Hour24TickerRequest symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * The symbol parameter + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public Hour24TickerRequest expirationDate(@jakarta.annotation.Nullable String expirationDate) { + this.expirationDate = expirationDate; + return this; + } + + /** + * The expiration date parameter + * + * @return expirationDate + */ + @jakarta.annotation.Nullable + public String getExpirationDate() { + return expirationDate; + } + + public void setExpirationDate(@jakarta.annotation.Nullable String expirationDate) { + this.expirationDate = expirationDate; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Hour24TickerRequest hour24TickerRequest = (Hour24TickerRequest) o; + return Objects.equals(this.id, hour24TickerRequest.id) + && Objects.equals(this.symbol, hour24TickerRequest.symbol) + && Objects.equals(this.expirationDate, hour24TickerRequest.expirationDate); + } + + @Override + public int hashCode() { + return Objects.hash(id, symbol, expirationDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Hour24TickerRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Integer idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + String expirationDateValue = getExpirationDate(); + if (expirationDateValue != null) { + String expirationDateValueAsString = expirationDateValue.toString(); + valMap.put("expirationDate", expirationDateValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + Object expirationDateValue = getExpirationDate(); + if (expirationDateValue != null) { + valMap.put("expirationDate", expirationDateValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("symbol"); + openapiFields.add("expirationDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Hour24TickerRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Hour24TickerRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Hour24TickerRequest is not found in" + + " the empty JSON string", + Hour24TickerRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Hour24TickerRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `Hour24TickerRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + if ((jsonObj.get("expirationDate") != null && !jsonObj.get("expirationDate").isJsonNull()) + && !jsonObj.get("expirationDate").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expirationDate` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expirationDate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Hour24TickerRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Hour24TickerRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(Hour24TickerRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, Hour24TickerRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Hour24TickerRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of Hour24TickerRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of Hour24TickerRequest + * @throws IOException if the JSON string is invalid with respect to Hour24TickerRequest + */ + public static Hour24TickerRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Hour24TickerRequest.class); + } + + /** + * Convert an instance of Hour24TickerRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Hour24TickerResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Hour24TickerResponse.java new file mode 100644 index 000000000..171f15634 --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Hour24TickerResponse.java @@ -0,0 +1,975 @@ +/* + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** Hour24TickerResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class Hour24TickerResponse extends BaseDTO { + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; + + @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) + @jakarta.annotation.Nullable + private String pLowerCase; + + public static final String SERIALIZED_NAME_P = "P"; + + @SerializedName(SERIALIZED_NAME_P) + @jakarta.annotation.Nullable + private String P; + + public static final String SERIALIZED_NAME_W_LOWER_CASE = "w"; + + @SerializedName(SERIALIZED_NAME_W_LOWER_CASE) + @jakarta.annotation.Nullable + private String wLowerCase; + + public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; + + @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) + @jakarta.annotation.Nullable + private String cLowerCase; + + public static final String SERIALIZED_NAME_Q = "Q"; + + @SerializedName(SERIALIZED_NAME_Q) + @jakarta.annotation.Nullable + private String Q; + + public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; + + @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) + @jakarta.annotation.Nullable + private String oLowerCase; + + public static final String SERIALIZED_NAME_H_LOWER_CASE = "h"; + + @SerializedName(SERIALIZED_NAME_H_LOWER_CASE) + @jakarta.annotation.Nullable + private String hLowerCase; + + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; + + @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) + @jakarta.annotation.Nullable + private String lLowerCase; + + public static final String SERIALIZED_NAME_V_LOWER_CASE = "v"; + + @SerializedName(SERIALIZED_NAME_V_LOWER_CASE) + @jakarta.annotation.Nullable + private String vLowerCase; + + public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; + + @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) + @jakarta.annotation.Nullable + private String qLowerCase; + + public static final String SERIALIZED_NAME_O = "O"; + + @SerializedName(SERIALIZED_NAME_O) + @jakarta.annotation.Nullable + private Long O; + + public static final String SERIALIZED_NAME_C = "C"; + + @SerializedName(SERIALIZED_NAME_C) + @jakarta.annotation.Nullable + private Long C; + + public static final String SERIALIZED_NAME_F = "F"; + + @SerializedName(SERIALIZED_NAME_F) + @jakarta.annotation.Nullable + private Long F; + + public static final String SERIALIZED_NAME_L = "L"; + + @SerializedName(SERIALIZED_NAME_L) + @jakarta.annotation.Nullable + private Long L; + + public static final String SERIALIZED_NAME_N_LOWER_CASE = "n"; + + @SerializedName(SERIALIZED_NAME_N_LOWER_CASE) + @jakarta.annotation.Nullable + private Long nLowerCase; + + public Hour24TickerResponse() {} + + public Hour24TickerResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * Event type + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public Hour24TickerResponse E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public Hour24TickerResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * Symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public Hour24TickerResponse pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + return this; + } + + /** + * Price change + * + * @return pLowerCase + */ + @jakarta.annotation.Nullable + public String getpLowerCase() { + return pLowerCase; + } + + public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + } + + public Hour24TickerResponse P(@jakarta.annotation.Nullable String P) { + this.P = P; + return this; + } + + /** + * Price change percent + * + * @return P + */ + @jakarta.annotation.Nullable + public String getP() { + return P; + } + + public void setP(@jakarta.annotation.Nullable String P) { + this.P = P; + } + + public Hour24TickerResponse wLowerCase(@jakarta.annotation.Nullable String wLowerCase) { + this.wLowerCase = wLowerCase; + return this; + } + + /** + * Weighted average price + * + * @return wLowerCase + */ + @jakarta.annotation.Nullable + public String getwLowerCase() { + return wLowerCase; + } + + public void setwLowerCase(@jakarta.annotation.Nullable String wLowerCase) { + this.wLowerCase = wLowerCase; + } + + public Hour24TickerResponse cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + return this; + } + + /** + * Last price + * + * @return cLowerCase + */ + @jakarta.annotation.Nullable + public String getcLowerCase() { + return cLowerCase; + } + + public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + } + + public Hour24TickerResponse Q(@jakarta.annotation.Nullable String Q) { + this.Q = Q; + return this; + } + + /** + * Last quantity + * + * @return Q + */ + @jakarta.annotation.Nullable + public String getQ() { + return Q; + } + + public void setQ(@jakarta.annotation.Nullable String Q) { + this.Q = Q; + } + + public Hour24TickerResponse oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + return this; + } + + /** + * Open price + * + * @return oLowerCase + */ + @jakarta.annotation.Nullable + public String getoLowerCase() { + return oLowerCase; + } + + public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + } + + public Hour24TickerResponse hLowerCase(@jakarta.annotation.Nullable String hLowerCase) { + this.hLowerCase = hLowerCase; + return this; + } + + /** + * High price + * + * @return hLowerCase + */ + @jakarta.annotation.Nullable + public String gethLowerCase() { + return hLowerCase; + } + + public void sethLowerCase(@jakarta.annotation.Nullable String hLowerCase) { + this.hLowerCase = hLowerCase; + } + + public Hour24TickerResponse lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + return this; + } + + /** + * Low price + * + * @return lLowerCase + */ + @jakarta.annotation.Nullable + public String getlLowerCase() { + return lLowerCase; + } + + public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + } + + public Hour24TickerResponse vLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + return this; + } + + /** + * Trading volume(in contracts) + * + * @return vLowerCase + */ + @jakarta.annotation.Nullable + public String getvLowerCase() { + return vLowerCase; + } + + public void setvLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + } + + public Hour24TickerResponse qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + return this; + } + + /** + * trade amount(in quote asset) + * + * @return qLowerCase + */ + @jakarta.annotation.Nullable + public String getqLowerCase() { + return qLowerCase; + } + + public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + } + + public Hour24TickerResponse O(@jakarta.annotation.Nullable Long O) { + this.O = O; + return this; + } + + /** + * Statistics open time + * + * @return O + */ + @jakarta.annotation.Nullable + public Long getO() { + return O; + } + + public void setO(@jakarta.annotation.Nullable Long O) { + this.O = O; + } + + public Hour24TickerResponse C(@jakarta.annotation.Nullable Long C) { + this.C = C; + return this; + } + + /** + * Statistics close time + * + * @return C + */ + @jakarta.annotation.Nullable + public Long getC() { + return C; + } + + public void setC(@jakarta.annotation.Nullable Long C) { + this.C = C; + } + + public Hour24TickerResponse F(@jakarta.annotation.Nullable Long F) { + this.F = F; + return this; + } + + /** + * First trade ID + * + * @return F + */ + @jakarta.annotation.Nullable + public Long getF() { + return F; + } + + public void setF(@jakarta.annotation.Nullable Long F) { + this.F = F; + } + + public Hour24TickerResponse L(@jakarta.annotation.Nullable Long L) { + this.L = L; + return this; + } + + /** + * Last trade Id + * + * @return L + */ + @jakarta.annotation.Nullable + public Long getL() { + return L; + } + + public void setL(@jakarta.annotation.Nullable Long L) { + this.L = L; + } + + public Hour24TickerResponse nLowerCase(@jakarta.annotation.Nullable Long nLowerCase) { + this.nLowerCase = nLowerCase; + return this; + } + + /** + * Total number of trade + * + * @return nLowerCase + */ + @jakarta.annotation.Nullable + public Long getnLowerCase() { + return nLowerCase; + } + + public void setnLowerCase(@jakarta.annotation.Nullable Long nLowerCase) { + this.nLowerCase = nLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Hour24TickerResponse hour24TickerResponse = (Hour24TickerResponse) o; + return Objects.equals(this.eLowerCase, hour24TickerResponse.eLowerCase) + && Objects.equals(this.E, hour24TickerResponse.E) + && Objects.equals(this.sLowerCase, hour24TickerResponse.sLowerCase) + && Objects.equals(this.pLowerCase, hour24TickerResponse.pLowerCase) + && Objects.equals(this.P, hour24TickerResponse.P) + && Objects.equals(this.wLowerCase, hour24TickerResponse.wLowerCase) + && Objects.equals(this.cLowerCase, hour24TickerResponse.cLowerCase) + && Objects.equals(this.Q, hour24TickerResponse.Q) + && Objects.equals(this.oLowerCase, hour24TickerResponse.oLowerCase) + && Objects.equals(this.hLowerCase, hour24TickerResponse.hLowerCase) + && Objects.equals(this.lLowerCase, hour24TickerResponse.lLowerCase) + && Objects.equals(this.vLowerCase, hour24TickerResponse.vLowerCase) + && Objects.equals(this.qLowerCase, hour24TickerResponse.qLowerCase) + && Objects.equals(this.O, hour24TickerResponse.O) + && Objects.equals(this.C, hour24TickerResponse.C) + && Objects.equals(this.F, hour24TickerResponse.F) + && Objects.equals(this.L, hour24TickerResponse.L) + && Objects.equals(this.nLowerCase, hour24TickerResponse.nLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash( + eLowerCase, + E, + sLowerCase, + pLowerCase, + P, + wLowerCase, + cLowerCase, + Q, + oLowerCase, + hLowerCase, + lLowerCase, + vLowerCase, + qLowerCase, + O, + C, + F, + L, + nLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Hour24TickerResponse {\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); + sb.append(" P: ").append(toIndentedString(P)).append("\n"); + sb.append(" wLowerCase: ").append(toIndentedString(wLowerCase)).append("\n"); + sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); + sb.append(" Q: ").append(toIndentedString(Q)).append("\n"); + sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); + sb.append(" hLowerCase: ").append(toIndentedString(hLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); + sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append(" O: ").append(toIndentedString(O)).append("\n"); + sb.append(" C: ").append(toIndentedString(C)).append("\n"); + sb.append(" F: ").append(toIndentedString(F)).append("\n"); + sb.append(" L: ").append(toIndentedString(L)).append("\n"); + sb.append(" nLowerCase: ").append(toIndentedString(nLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + String pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + String pLowerCaseValueAsString = pLowerCaseValue.toString(); + valMap.put("pLowerCase", pLowerCaseValueAsString); + } + String PValue = getP(); + if (PValue != null) { + String PValueAsString = PValue.toString(); + valMap.put("P", PValueAsString); + } + String wLowerCaseValue = getwLowerCase(); + if (wLowerCaseValue != null) { + String wLowerCaseValueAsString = wLowerCaseValue.toString(); + valMap.put("wLowerCase", wLowerCaseValueAsString); + } + String cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + String cLowerCaseValueAsString = cLowerCaseValue.toString(); + valMap.put("cLowerCase", cLowerCaseValueAsString); + } + String QValue = getQ(); + if (QValue != null) { + String QValueAsString = QValue.toString(); + valMap.put("Q", QValueAsString); + } + String oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + String oLowerCaseValueAsString = oLowerCaseValue.toString(); + valMap.put("oLowerCase", oLowerCaseValueAsString); + } + String hLowerCaseValue = gethLowerCase(); + if (hLowerCaseValue != null) { + String hLowerCaseValueAsString = hLowerCaseValue.toString(); + valMap.put("hLowerCase", hLowerCaseValueAsString); + } + String lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + String vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + String vLowerCaseValueAsString = vLowerCaseValue.toString(); + valMap.put("vLowerCase", vLowerCaseValueAsString); + } + String qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + String qLowerCaseValueAsString = qLowerCaseValue.toString(); + valMap.put("qLowerCase", qLowerCaseValueAsString); + } + Long OValue = getO(); + if (OValue != null) { + String OValueAsString = OValue.toString(); + valMap.put("O", OValueAsString); + } + Long CValue = getC(); + if (CValue != null) { + String CValueAsString = CValue.toString(); + valMap.put("C", CValueAsString); + } + Long FValue = getF(); + if (FValue != null) { + String FValueAsString = FValue.toString(); + valMap.put("F", FValueAsString); + } + Long LValue = getL(); + if (LValue != null) { + String LValueAsString = LValue.toString(); + valMap.put("L", LValueAsString); + } + Long nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + String nLowerCaseValueAsString = nLowerCaseValue.toString(); + valMap.put("nLowerCase", nLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + valMap.put("pLowerCase", pLowerCaseValue); + } + Object PValue = getP(); + if (PValue != null) { + valMap.put("P", PValue); + } + Object wLowerCaseValue = getwLowerCase(); + if (wLowerCaseValue != null) { + valMap.put("wLowerCase", wLowerCaseValue); + } + Object cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + valMap.put("cLowerCase", cLowerCaseValue); + } + Object QValue = getQ(); + if (QValue != null) { + valMap.put("Q", QValue); + } + Object oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + valMap.put("oLowerCase", oLowerCaseValue); + } + Object hLowerCaseValue = gethLowerCase(); + if (hLowerCaseValue != null) { + valMap.put("hLowerCase", hLowerCaseValue); + } + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); + } + Object vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + valMap.put("vLowerCase", vLowerCaseValue); + } + Object qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + valMap.put("qLowerCase", qLowerCaseValue); + } + Object OValue = getO(); + if (OValue != null) { + valMap.put("O", OValue); + } + Object CValue = getC(); + if (CValue != null) { + valMap.put("C", CValue); + } + Object FValue = getF(); + if (FValue != null) { + valMap.put("F", FValue); + } + Object LValue = getL(); + if (LValue != null) { + valMap.put("L", LValue); + } + Object nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + valMap.put("nLowerCase", nLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("e"); + openapiFields.add("E"); + openapiFields.add("s"); + openapiFields.add("p"); + openapiFields.add("P"); + openapiFields.add("w"); + openapiFields.add("c"); + openapiFields.add("Q"); + openapiFields.add("o"); + openapiFields.add("h"); + openapiFields.add("l"); + openapiFields.add("v"); + openapiFields.add("q"); + openapiFields.add("O"); + openapiFields.add("C"); + openapiFields.add("F"); + openapiFields.add("L"); + openapiFields.add("n"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Hour24TickerResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Hour24TickerResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Hour24TickerResponse is not found in" + + " the empty JSON string", + Hour24TickerResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Hour24TickerResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `Hour24TickerResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) + && !jsonObj.get("p").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `p` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("p").toString())); + } + if ((jsonObj.get("P") != null && !jsonObj.get("P").isJsonNull()) + && !jsonObj.get("P").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `P` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("P").toString())); + } + if ((jsonObj.get("w") != null && !jsonObj.get("w").isJsonNull()) + && !jsonObj.get("w").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `w` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("w").toString())); + } + if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) + && !jsonObj.get("c").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `c` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("c").toString())); + } + if ((jsonObj.get("Q") != null && !jsonObj.get("Q").isJsonNull()) + && !jsonObj.get("Q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("Q").toString())); + } + if ((jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) + && !jsonObj.get("o").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `o` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("o").toString())); + } + if ((jsonObj.get("h") != null && !jsonObj.get("h").isJsonNull()) + && !jsonObj.get("h").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `h` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("h").toString())); + } + if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) + && !jsonObj.get("l").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `l` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("l").toString())); + } + if ((jsonObj.get("v") != null && !jsonObj.get("v").isJsonNull()) + && !jsonObj.get("v").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `v` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("v").toString())); + } + if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) + && !jsonObj.get("q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("q").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Hour24TickerResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Hour24TickerResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(Hour24TickerResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, Hour24TickerResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Hour24TickerResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of Hour24TickerResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of Hour24TickerResponse + * @throws IOException if the JSON string is invalid with respect to Hour24TickerResponse + */ + public static Hour24TickerResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Hour24TickerResponse.class); + } + + /** + * Convert an instance of Hour24TickerResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndexPriceStreamsRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndexPriceStreamsRequest.java index f8badc4d7..0f9cb162c 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndexPriceStreamsRequest.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndexPriceStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IndexPriceStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndexPriceStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -53,7 +53,7 @@ public IndexPriceStreamsRequest id(@jakarta.annotation.Nullable Integer id) { } /** - * Get id + * Unique WebSocket request ID. * * @return id */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndexPriceStreamsResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndexPriceStreamsResponse.java index 706b66e81..4d7c8cac8 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndexPriceStreamsResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndexPriceStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** IndexPriceStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndexPriceStreamsResponse extends ArrayList { public IndexPriceStreamsResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndexPriceStreamsResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndexPriceStreamsResponseInner.java index bc8ddf7aa..25a97e870 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndexPriceStreamsResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndexPriceStreamsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IndexPriceStreamsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndexPriceStreamsResponseInner extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -72,7 +72,7 @@ public IndexPriceStreamsResponseInner eLowerCase( } /** - * Get eLowerCase + * event type * * @return eLowerCase */ @@ -91,7 +91,7 @@ public IndexPriceStreamsResponseInner E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * time * * @return E */ @@ -111,7 +111,7 @@ public IndexPriceStreamsResponseInner sLowerCase( } /** - * Get sLowerCase + * underlying symbol * * @return sLowerCase */ @@ -131,7 +131,7 @@ public IndexPriceStreamsResponseInner pLowerCase( } /** - * Get pLowerCase + * index price * * @return pLowerCase */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndividualSymbolBookTickerStreamsRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndividualSymbolBookTickerStreamsRequest.java index 6266164cf..673d61192 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndividualSymbolBookTickerStreamsRequest.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndividualSymbolBookTickerStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IndividualSymbolBookTickerStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndividualSymbolBookTickerStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,7 +48,7 @@ public class IndividualSymbolBookTickerStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public IndividualSymbolBookTickerStreamsRequest() {} @@ -59,7 +59,7 @@ public IndividualSymbolBookTickerStreamsRequest id(@jakarta.annotation.Nullable } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -73,23 +73,22 @@ public void setId(@jakarta.annotation.Nullable Integer id) { } public IndividualSymbolBookTickerStreamsRequest symbol( - @jakarta.annotation.Nonnull String symbol) { + @jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -186,7 +185,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -222,19 +220,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : - IndividualSymbolBookTickerStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndividualSymbolBookTickerStreamsResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndividualSymbolBookTickerStreamsResponse.java index a67958bfc..47ded3f3f 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndividualSymbolBookTickerStreamsResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/IndividualSymbolBookTickerStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IndividualSymbolBookTickerStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndividualSymbolBookTickerStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -102,7 +102,7 @@ public IndividualSymbolBookTickerStreamsResponse eLowerCase( } /** - * Get eLowerCase + * event type * * @return eLowerCase */ @@ -122,7 +122,7 @@ public IndividualSymbolBookTickerStreamsResponse uLowerCase( } /** - * Get uLowerCase + * order book updateId * * @return uLowerCase */ @@ -142,7 +142,7 @@ public IndividualSymbolBookTickerStreamsResponse sLowerCase( } /** - * Get sLowerCase + * symbol * * @return sLowerCase */ @@ -162,7 +162,7 @@ public IndividualSymbolBookTickerStreamsResponse bLowerCase( } /** - * Get bLowerCase + * best bid price * * @return bLowerCase */ @@ -181,7 +181,7 @@ public IndividualSymbolBookTickerStreamsResponse B(@jakarta.annotation.Nullable } /** - * Get B + * bid bid quantity * * @return B */ @@ -201,7 +201,7 @@ public IndividualSymbolBookTickerStreamsResponse aLowerCase( } /** - * Get aLowerCase + * best ask price * * @return aLowerCase */ @@ -220,7 +220,7 @@ public IndividualSymbolBookTickerStreamsResponse A(@jakarta.annotation.Nullable } /** - * Get A + * best ask quantity * * @return A */ @@ -239,7 +239,7 @@ public IndividualSymbolBookTickerStreamsResponse T(@jakarta.annotation.Nullable } /** - * Get T + * transaction time * * @return T */ @@ -258,7 +258,7 @@ public IndividualSymbolBookTickerStreamsResponse E(@jakarta.annotation.Nullable } /** - * Get E + * event time * * @return E */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Interval.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Interval.java new file mode 100644 index 000000000..881aee989 --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Interval.java @@ -0,0 +1,95 @@ +/* + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets interval */ +@JsonAdapter(Interval.Adapter.class) +public enum Interval { + INTERVAL_1m("1m"), + + INTERVAL_3m("3m"), + + INTERVAL_5m("5m"), + + INTERVAL_15m("15m"), + + INTERVAL_30m("30m"), + + INTERVAL_1h("1h"), + + INTERVAL_2h("2h"), + + INTERVAL_4h("4h"), + + INTERVAL_6h("6h"), + + INTERVAL_12h("12h"), + + INTERVAL_1d("1d"), + + INTERVAL_3d("3d"), + + INTERVAL_1w("1w"); + + private String value; + + Interval(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Interval fromValue(String value) { + for (Interval b : Interval.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Interval enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Interval read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Interval.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Interval.fromValue(value); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/KlineCandlestickStreamsRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/KlineCandlestickStreamsRequest.java index 857c14d16..0b73c724d 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/KlineCandlestickStreamsRequest.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/KlineCandlestickStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** KlineCandlestickStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlineCandlestickStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,14 +49,14 @@ public class KlineCandlestickStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_INTERVAL = "interval"; @SerializedName(SERIALIZED_NAME_INTERVAL) - @jakarta.annotation.Nonnull - private String interval; + @jakarta.annotation.Nullable + private Interval interval; public KlineCandlestickStreamsRequest() {} @@ -65,7 +66,7 @@ public KlineCandlestickStreamsRequest id(@jakarta.annotation.Nullable Integer id } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -78,27 +79,26 @@ public void setId(@jakarta.annotation.Nullable Integer id) { this.id = id; } - public KlineCandlestickStreamsRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public KlineCandlestickStreamsRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } - public KlineCandlestickStreamsRequest interval(@jakarta.annotation.Nonnull String interval) { + public KlineCandlestickStreamsRequest interval(@jakarta.annotation.Nullable Interval interval) { this.interval = interval; return this; } @@ -108,13 +108,13 @@ public KlineCandlestickStreamsRequest interval(@jakarta.annotation.Nonnull Strin * * @return interval */ - @jakarta.annotation.Nonnull - @NotNull - public String getInterval() { + @jakarta.annotation.Nullable + @Valid + public Interval getInterval() { return interval; } - public void setInterval(@jakarta.annotation.Nonnull String interval) { + public void setInterval(@jakarta.annotation.Nullable Interval interval) { this.interval = interval; } @@ -163,7 +163,7 @@ public String toUrlQueryString() { String symbolValueAsString = symbolValue.toString(); valMap.put("symbol", symbolValueAsString); } - String intervalValue = getInterval(); + Interval intervalValue = getInterval(); if (intervalValue != null) { String intervalValueAsString = intervalValue.toString(); valMap.put("interval", intervalValueAsString); @@ -223,8 +223,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); - openapiRequiredFields.add("interval"); } /** @@ -257,30 +255,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : KlineCandlestickStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - if (!jsonObj.get("interval").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `interval` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("interval").toString())); + // validate the optional field `interval` + if (jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) { + Interval.validateJsonElement(jsonObj.get("interval")); } } diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/KlineCandlestickStreamsResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/KlineCandlestickStreamsResponse.java index c88ae3a25..bc3554a76 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/KlineCandlestickStreamsResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/KlineCandlestickStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** KlineCandlestickStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlineCandlestickStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -73,7 +73,7 @@ public KlineCandlestickStreamsResponse eLowerCase( } /** - * Get eLowerCase + * event type * * @return eLowerCase */ @@ -92,7 +92,7 @@ public KlineCandlestickStreamsResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * event time * * @return E */ @@ -112,7 +112,7 @@ public KlineCandlestickStreamsResponse sLowerCase( } /** - * Get sLowerCase + * Option trading symbol * * @return sLowerCase */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/KlineCandlestickStreamsResponseK.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/KlineCandlestickStreamsResponseK.java index 7aabca498..e301772af 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/KlineCandlestickStreamsResponseK.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/KlineCandlestickStreamsResponseK.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** KlineCandlestickStreamsResponseK */ +/** k */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlineCandlestickStreamsResponseK extends BaseDTO { public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; @@ -144,7 +144,7 @@ public KlineCandlestickStreamsResponseK tLowerCase( } /** - * Get tLowerCase + * kline start time * * @return tLowerCase */ @@ -163,7 +163,7 @@ public KlineCandlestickStreamsResponseK T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * kline end time * * @return T */ @@ -183,7 +183,7 @@ public KlineCandlestickStreamsResponseK sLowerCase( } /** - * Get sLowerCase + * Option trading symbol * * @return sLowerCase */ @@ -203,7 +203,7 @@ public KlineCandlestickStreamsResponseK iLowerCase( } /** - * Get iLowerCase + * candle period * * @return iLowerCase */ @@ -223,7 +223,7 @@ public KlineCandlestickStreamsResponseK fLowerCase( } /** - * Get fLowerCase + * first trade ID * * @return fLowerCase */ @@ -242,7 +242,7 @@ public KlineCandlestickStreamsResponseK L(@jakarta.annotation.Nullable Long L) { } /** - * Get L + * last trade ID * * @return L */ @@ -262,7 +262,7 @@ public KlineCandlestickStreamsResponseK oLowerCase( } /** - * Get oLowerCase + * open * * @return oLowerCase */ @@ -282,7 +282,7 @@ public KlineCandlestickStreamsResponseK cLowerCase( } /** - * Get cLowerCase + * close * * @return cLowerCase */ @@ -302,7 +302,7 @@ public KlineCandlestickStreamsResponseK hLowerCase( } /** - * Get hLowerCase + * high * * @return hLowerCase */ @@ -322,7 +322,7 @@ public KlineCandlestickStreamsResponseK lLowerCase( } /** - * Get lLowerCase + * low * * @return lLowerCase */ @@ -342,7 +342,7 @@ public KlineCandlestickStreamsResponseK vLowerCase( } /** - * Get vLowerCase + * volume(in contracts) * * @return vLowerCase */ @@ -362,7 +362,7 @@ public KlineCandlestickStreamsResponseK nLowerCase( } /** - * Get nLowerCase + * number of trades * * @return nLowerCase */ @@ -382,7 +382,7 @@ public KlineCandlestickStreamsResponseK xLowerCase( } /** - * Get xLowerCase + * current candle has been completed Y/N * * @return xLowerCase */ @@ -402,7 +402,7 @@ public KlineCandlestickStreamsResponseK qLowerCase( } /** - * Get qLowerCase + * completed trade amount   (in quote asset) * * @return qLowerCase */ @@ -421,7 +421,7 @@ public KlineCandlestickStreamsResponseK V(@jakarta.annotation.Nullable String V) } /** - * Get V + * taker completed trade volume (in contracts) * * @return V */ @@ -440,7 +440,7 @@ public KlineCandlestickStreamsResponseK Q(@jakarta.annotation.Nullable String Q) } /** - * Get Q + * taker trade amount(in quote asset) * * @return Q */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Level.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Level.java new file mode 100644 index 000000000..e067d5fb1 --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Level.java @@ -0,0 +1,74 @@ +/* + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets level */ +@JsonAdapter(Level.Adapter.class) +public enum Level { + LEVEL_5("5"), + + LEVEL_10("10"), + + LEVEL_20("20"); + + private String value; + + Level(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Level fromValue(String value) { + for (Level b : Level.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Level enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Level read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Level.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Level.fromValue(value); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/ListenKeyExpired.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/ListenKeyExpired.java new file mode 100644 index 000000000..8d0056c27 --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/ListenKeyExpired.java @@ -0,0 +1,285 @@ +/* + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ListenKeyExpired */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ListenKeyExpired extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private String E; + + public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; + + @SerializedName(SERIALIZED_NAME_LISTEN_KEY) + @jakarta.annotation.Nullable + private String listenKey; + + public ListenKeyExpired() {} + + public ListenKeyExpired E(@jakarta.annotation.Nullable String E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public String getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable String E) { + this.E = E; + } + + public ListenKeyExpired listenKey(@jakarta.annotation.Nullable String listenKey) { + this.listenKey = listenKey; + return this; + } + + /** + * Get listenKey + * + * @return listenKey + */ + @jakarta.annotation.Nullable + public String getListenKey() { + return listenKey; + } + + public void setListenKey(@jakarta.annotation.Nullable String listenKey) { + this.listenKey = listenKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListenKeyExpired listenKeyExpired = (ListenKeyExpired) o; + return Objects.equals(this.E, listenKeyExpired.E) + && Objects.equals(this.listenKey, listenKeyExpired.listenKey); + } + + @Override + public int hashCode() { + return Objects.hash(E, listenKey); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListenKeyExpired {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" listenKey: ").append(toIndentedString(listenKey)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String listenKeyValue = getListenKey(); + if (listenKeyValue != null) { + String listenKeyValueAsString = listenKeyValue.toString(); + valMap.put("listenKey", listenKeyValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object listenKeyValue = getListenKey(); + if (listenKeyValue != null) { + valMap.put("listenKey", listenKeyValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("listenKey"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ListenKeyExpired + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ListenKeyExpired.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ListenKeyExpired is not found in the" + + " empty JSON string", + ListenKeyExpired.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ListenKeyExpired.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ListenKeyExpired` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("E") != null && !jsonObj.get("E").isJsonNull()) + && !jsonObj.get("E").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `E` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("E").toString())); + } + if ((jsonObj.get("listenKey") != null && !jsonObj.get("listenKey").isJsonNull()) + && !jsonObj.get("listenKey").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `listenKey` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("listenKey").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ListenKeyExpired.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ListenKeyExpired' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ListenKeyExpired.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ListenKeyExpired value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ListenKeyExpired read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ListenKeyExpired given an JSON string + * + * @param jsonString JSON string + * @return An instance of ListenKeyExpired + * @throws IOException if the JSON string is invalid with respect to ListenKeyExpired + */ + public static ListenKeyExpired fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ListenKeyExpired.class); + } + + /** + * Convert an instance of ListenKeyExpired to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Listenkeyexpired.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Listenkeyexpired.java deleted file mode 100644 index 4fdbd4866..000000000 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Listenkeyexpired.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** Listenkeyexpired */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Listenkeyexpired extends BaseDTO { - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private String E; - - public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; - - @SerializedName(SERIALIZED_NAME_LISTEN_KEY) - @jakarta.annotation.Nullable - private String listenKey; - - public Listenkeyexpired() {} - - public Listenkeyexpired E(@jakarta.annotation.Nullable String E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public String getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable String E) { - this.E = E; - } - - public Listenkeyexpired listenKey(@jakarta.annotation.Nullable String listenKey) { - this.listenKey = listenKey; - return this; - } - - /** - * Get listenKey - * - * @return listenKey - */ - @jakarta.annotation.Nullable - public String getListenKey() { - return listenKey; - } - - public void setListenKey(@jakarta.annotation.Nullable String listenKey) { - this.listenKey = listenKey; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Listenkeyexpired listenkeyexpired = (Listenkeyexpired) o; - return Objects.equals(this.E, listenkeyexpired.E) - && Objects.equals(this.listenKey, listenkeyexpired.listenKey); - } - - @Override - public int hashCode() { - return Objects.hash(E, listenKey); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Listenkeyexpired {\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" listenKey: ").append(toIndentedString(listenKey)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - String listenKeyValue = getListenKey(); - if (listenKeyValue != null) { - String listenKeyValueAsString = listenKeyValue.toString(); - valMap.put("listenKey", listenKeyValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object listenKeyValue = getListenKey(); - if (listenKeyValue != null) { - valMap.put("listenKey", listenKeyValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("E"); - openapiFields.add("listenKey"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Listenkeyexpired - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Listenkeyexpired.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Listenkeyexpired is not found in the" - + " empty JSON string", - Listenkeyexpired.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Listenkeyexpired.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Listenkeyexpired` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("E") != null && !jsonObj.get("E").isJsonNull()) - && !jsonObj.get("E").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `E` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("E").toString())); - } - if ((jsonObj.get("listenKey") != null && !jsonObj.get("listenKey").isJsonNull()) - && !jsonObj.get("listenKey").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `listenKey` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("listenKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Listenkeyexpired.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Listenkeyexpired' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Listenkeyexpired.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Listenkeyexpired value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Listenkeyexpired read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Listenkeyexpired given an JSON string - * - * @param jsonString JSON string - * @return An instance of Listenkeyexpired - * @throws IOException if the JSON string is invalid with respect to Listenkeyexpired - */ - public static Listenkeyexpired fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Listenkeyexpired.class); - } - - /** - * Convert an instance of Listenkeyexpired to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/MarkPriceRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/MarkPriceRequest.java deleted file mode 100644 index 207fc30bb..000000000 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/MarkPriceRequest.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** MarkPriceRequest */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MarkPriceRequest extends BaseDTO { - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @jakarta.annotation.Nullable - private Integer id; - - public static final String SERIALIZED_NAME_UNDERLYING = "underlying"; - - @SerializedName(SERIALIZED_NAME_UNDERLYING) - @jakarta.annotation.Nonnull - private String underlying; - - public MarkPriceRequest() {} - - public MarkPriceRequest id(@jakarta.annotation.Nullable Integer id) { - this.id = id; - return this; - } - - /** - * Get id - * - * @return id - */ - @jakarta.annotation.Nullable - public Integer getId() { - return id; - } - - public void setId(@jakarta.annotation.Nullable Integer id) { - this.id = id; - } - - public MarkPriceRequest underlying(@jakarta.annotation.Nonnull String underlying) { - this.underlying = underlying; - return this; - } - - /** - * Get underlying - * - * @return underlying - */ - @jakarta.annotation.Nonnull - @NotNull - public String getUnderlying() { - return underlying; - } - - public void setUnderlying(@jakarta.annotation.Nonnull String underlying) { - this.underlying = underlying; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarkPriceRequest markPriceRequest = (MarkPriceRequest) o; - return Objects.equals(this.id, markPriceRequest.id) - && Objects.equals(this.underlying, markPriceRequest.underlying); - } - - @Override - public int hashCode() { - return Objects.hash(id, underlying); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MarkPriceRequest {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" underlying: ").append(toIndentedString(underlying)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Integer idValue = getId(); - if (idValue != null) { - String idValueAsString = idValue.toString(); - valMap.put("id", idValueAsString); - } - String underlyingValue = getUnderlying(); - if (underlyingValue != null) { - String underlyingValueAsString = underlyingValue.toString(); - valMap.put("underlying", underlyingValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object idValue = getId(); - if (idValue != null) { - valMap.put("id", idValue); - } - Object underlyingValue = getUnderlying(); - if (underlyingValue != null) { - valMap.put("underlying", underlyingValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("underlying"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("underlying"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MarkPriceRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MarkPriceRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MarkPriceRequest is not found in the" - + " empty JSON string", - MarkPriceRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MarkPriceRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MarkPriceRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MarkPriceRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("underlying").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `underlying` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("underlying").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MarkPriceRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MarkPriceRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MarkPriceRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MarkPriceRequest value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MarkPriceRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MarkPriceRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of MarkPriceRequest - * @throws IOException if the JSON string is invalid with respect to MarkPriceRequest - */ - public static MarkPriceRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MarkPriceRequest.class); - } - - /** - * Convert an instance of MarkPriceRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/MarkPriceResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/MarkPriceResponse.java deleted file mode 100644 index e01414a79..000000000 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/MarkPriceResponse.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; - -import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** MarkPriceResponse */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MarkPriceResponse extends ArrayList { - public MarkPriceResponse() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MarkPriceResponse {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MarkPriceResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MarkPriceResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MarkPriceResponse is not found in the" - + " empty JSON string", - MarkPriceResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MarkPriceResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MarkPriceResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MarkPriceResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MarkPriceResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MarkPriceResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MarkPriceResponse value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public MarkPriceResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MarkPriceResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of MarkPriceResponse - * @throws IOException if the JSON string is invalid with respect to MarkPriceResponse - */ - public static MarkPriceResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MarkPriceResponse.class); - } - - /** - * Convert an instance of MarkPriceResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/MarkPriceResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/MarkPriceResponseInner.java deleted file mode 100644 index 54ef6a76d..000000000 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/MarkPriceResponseInner.java +++ /dev/null @@ -1,1107 +0,0 @@ -/* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** MarkPriceResponseInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MarkPriceResponseInner extends BaseDTO { - public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; - - @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) - @jakarta.annotation.Nullable - private String sLowerCase; - - public static final String SERIALIZED_NAME_MP = "mp"; - - @SerializedName(SERIALIZED_NAME_MP) - @jakarta.annotation.Nullable - private String mp; - - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private Long E; - - public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; - - @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) - @jakarta.annotation.Nullable - private String eLowerCase; - - public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; - - @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) - @jakarta.annotation.Nullable - private String iLowerCase; - - public static final String SERIALIZED_NAME_P = "P"; - - @SerializedName(SERIALIZED_NAME_P) - @jakarta.annotation.Nullable - private String P; - - public static final String SERIALIZED_NAME_BO = "bo"; - - @SerializedName(SERIALIZED_NAME_BO) - @jakarta.annotation.Nullable - private String bo; - - public static final String SERIALIZED_NAME_AO = "ao"; - - @SerializedName(SERIALIZED_NAME_AO) - @jakarta.annotation.Nullable - private String ao; - - public static final String SERIALIZED_NAME_BQ = "bq"; - - @SerializedName(SERIALIZED_NAME_BQ) - @jakarta.annotation.Nullable - private String bq; - - public static final String SERIALIZED_NAME_AQ = "aq"; - - @SerializedName(SERIALIZED_NAME_AQ) - @jakarta.annotation.Nullable - private String aq; - - public static final String SERIALIZED_NAME_B_LOWER_CASE = "b"; - - @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) - @jakarta.annotation.Nullable - private String bLowerCase; - - public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; - - @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) - @jakarta.annotation.Nullable - private String aLowerCase; - - public static final String SERIALIZED_NAME_HL = "hl"; - - @SerializedName(SERIALIZED_NAME_HL) - @jakarta.annotation.Nullable - private String hl; - - public static final String SERIALIZED_NAME_LL = "ll"; - - @SerializedName(SERIALIZED_NAME_LL) - @jakarta.annotation.Nullable - private String ll; - - public static final String SERIALIZED_NAME_VO = "vo"; - - @SerializedName(SERIALIZED_NAME_VO) - @jakarta.annotation.Nullable - private String vo; - - public static final String SERIALIZED_NAME_RF = "rf"; - - @SerializedName(SERIALIZED_NAME_RF) - @jakarta.annotation.Nullable - private String rf; - - public static final String SERIALIZED_NAME_D_LOWER_CASE = "d"; - - @SerializedName(SERIALIZED_NAME_D_LOWER_CASE) - @jakarta.annotation.Nullable - private String dLowerCase; - - public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; - - @SerializedName(SERIALIZED_NAME_T_LOWER_CASE) - @jakarta.annotation.Nullable - private String tLowerCase; - - public static final String SERIALIZED_NAME_G_LOWER_CASE = "g"; - - @SerializedName(SERIALIZED_NAME_G_LOWER_CASE) - @jakarta.annotation.Nullable - private String gLowerCase; - - public static final String SERIALIZED_NAME_V_LOWER_CASE = "v"; - - @SerializedName(SERIALIZED_NAME_V_LOWER_CASE) - @jakarta.annotation.Nullable - private String vLowerCase; - - public MarkPriceResponseInner() {} - - public MarkPriceResponseInner sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - return this; - } - - /** - * Get sLowerCase - * - * @return sLowerCase - */ - @jakarta.annotation.Nullable - public String getsLowerCase() { - return sLowerCase; - } - - public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - } - - public MarkPriceResponseInner mp(@jakarta.annotation.Nullable String mp) { - this.mp = mp; - return this; - } - - /** - * Get mp - * - * @return mp - */ - @jakarta.annotation.Nullable - public String getMp() { - return mp; - } - - public void setMp(@jakarta.annotation.Nullable String mp) { - this.mp = mp; - } - - public MarkPriceResponseInner E(@jakarta.annotation.Nullable Long E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public Long getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable Long E) { - this.E = E; - } - - public MarkPriceResponseInner eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { - this.eLowerCase = eLowerCase; - return this; - } - - /** - * Get eLowerCase - * - * @return eLowerCase - */ - @jakarta.annotation.Nullable - public String geteLowerCase() { - return eLowerCase; - } - - public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { - this.eLowerCase = eLowerCase; - } - - public MarkPriceResponseInner iLowerCase(@jakarta.annotation.Nullable String iLowerCase) { - this.iLowerCase = iLowerCase; - return this; - } - - /** - * Get iLowerCase - * - * @return iLowerCase - */ - @jakarta.annotation.Nullable - public String getiLowerCase() { - return iLowerCase; - } - - public void setiLowerCase(@jakarta.annotation.Nullable String iLowerCase) { - this.iLowerCase = iLowerCase; - } - - public MarkPriceResponseInner P(@jakarta.annotation.Nullable String P) { - this.P = P; - return this; - } - - /** - * Get P - * - * @return P - */ - @jakarta.annotation.Nullable - public String getP() { - return P; - } - - public void setP(@jakarta.annotation.Nullable String P) { - this.P = P; - } - - public MarkPriceResponseInner bo(@jakarta.annotation.Nullable String bo) { - this.bo = bo; - return this; - } - - /** - * Get bo - * - * @return bo - */ - @jakarta.annotation.Nullable - public String getBo() { - return bo; - } - - public void setBo(@jakarta.annotation.Nullable String bo) { - this.bo = bo; - } - - public MarkPriceResponseInner ao(@jakarta.annotation.Nullable String ao) { - this.ao = ao; - return this; - } - - /** - * Get ao - * - * @return ao - */ - @jakarta.annotation.Nullable - public String getAo() { - return ao; - } - - public void setAo(@jakarta.annotation.Nullable String ao) { - this.ao = ao; - } - - public MarkPriceResponseInner bq(@jakarta.annotation.Nullable String bq) { - this.bq = bq; - return this; - } - - /** - * Get bq - * - * @return bq - */ - @jakarta.annotation.Nullable - public String getBq() { - return bq; - } - - public void setBq(@jakarta.annotation.Nullable String bq) { - this.bq = bq; - } - - public MarkPriceResponseInner aq(@jakarta.annotation.Nullable String aq) { - this.aq = aq; - return this; - } - - /** - * Get aq - * - * @return aq - */ - @jakarta.annotation.Nullable - public String getAq() { - return aq; - } - - public void setAq(@jakarta.annotation.Nullable String aq) { - this.aq = aq; - } - - public MarkPriceResponseInner bLowerCase(@jakarta.annotation.Nullable String bLowerCase) { - this.bLowerCase = bLowerCase; - return this; - } - - /** - * Get bLowerCase - * - * @return bLowerCase - */ - @jakarta.annotation.Nullable - public String getbLowerCase() { - return bLowerCase; - } - - public void setbLowerCase(@jakarta.annotation.Nullable String bLowerCase) { - this.bLowerCase = bLowerCase; - } - - public MarkPriceResponseInner aLowerCase(@jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - return this; - } - - /** - * Get aLowerCase - * - * @return aLowerCase - */ - @jakarta.annotation.Nullable - public String getaLowerCase() { - return aLowerCase; - } - - public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - } - - public MarkPriceResponseInner hl(@jakarta.annotation.Nullable String hl) { - this.hl = hl; - return this; - } - - /** - * Get hl - * - * @return hl - */ - @jakarta.annotation.Nullable - public String getHl() { - return hl; - } - - public void setHl(@jakarta.annotation.Nullable String hl) { - this.hl = hl; - } - - public MarkPriceResponseInner ll(@jakarta.annotation.Nullable String ll) { - this.ll = ll; - return this; - } - - /** - * Get ll - * - * @return ll - */ - @jakarta.annotation.Nullable - public String getLl() { - return ll; - } - - public void setLl(@jakarta.annotation.Nullable String ll) { - this.ll = ll; - } - - public MarkPriceResponseInner vo(@jakarta.annotation.Nullable String vo) { - this.vo = vo; - return this; - } - - /** - * Get vo - * - * @return vo - */ - @jakarta.annotation.Nullable - public String getVo() { - return vo; - } - - public void setVo(@jakarta.annotation.Nullable String vo) { - this.vo = vo; - } - - public MarkPriceResponseInner rf(@jakarta.annotation.Nullable String rf) { - this.rf = rf; - return this; - } - - /** - * Get rf - * - * @return rf - */ - @jakarta.annotation.Nullable - public String getRf() { - return rf; - } - - public void setRf(@jakarta.annotation.Nullable String rf) { - this.rf = rf; - } - - public MarkPriceResponseInner dLowerCase(@jakarta.annotation.Nullable String dLowerCase) { - this.dLowerCase = dLowerCase; - return this; - } - - /** - * Get dLowerCase - * - * @return dLowerCase - */ - @jakarta.annotation.Nullable - public String getdLowerCase() { - return dLowerCase; - } - - public void setdLowerCase(@jakarta.annotation.Nullable String dLowerCase) { - this.dLowerCase = dLowerCase; - } - - public MarkPriceResponseInner tLowerCase(@jakarta.annotation.Nullable String tLowerCase) { - this.tLowerCase = tLowerCase; - return this; - } - - /** - * Get tLowerCase - * - * @return tLowerCase - */ - @jakarta.annotation.Nullable - public String gettLowerCase() { - return tLowerCase; - } - - public void settLowerCase(@jakarta.annotation.Nullable String tLowerCase) { - this.tLowerCase = tLowerCase; - } - - public MarkPriceResponseInner gLowerCase(@jakarta.annotation.Nullable String gLowerCase) { - this.gLowerCase = gLowerCase; - return this; - } - - /** - * Get gLowerCase - * - * @return gLowerCase - */ - @jakarta.annotation.Nullable - public String getgLowerCase() { - return gLowerCase; - } - - public void setgLowerCase(@jakarta.annotation.Nullable String gLowerCase) { - this.gLowerCase = gLowerCase; - } - - public MarkPriceResponseInner vLowerCase(@jakarta.annotation.Nullable String vLowerCase) { - this.vLowerCase = vLowerCase; - return this; - } - - /** - * Get vLowerCase - * - * @return vLowerCase - */ - @jakarta.annotation.Nullable - public String getvLowerCase() { - return vLowerCase; - } - - public void setvLowerCase(@jakarta.annotation.Nullable String vLowerCase) { - this.vLowerCase = vLowerCase; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarkPriceResponseInner markPriceResponseInner = (MarkPriceResponseInner) o; - return Objects.equals(this.sLowerCase, markPriceResponseInner.sLowerCase) - && Objects.equals(this.mp, markPriceResponseInner.mp) - && Objects.equals(this.E, markPriceResponseInner.E) - && Objects.equals(this.eLowerCase, markPriceResponseInner.eLowerCase) - && Objects.equals(this.iLowerCase, markPriceResponseInner.iLowerCase) - && Objects.equals(this.P, markPriceResponseInner.P) - && Objects.equals(this.bo, markPriceResponseInner.bo) - && Objects.equals(this.ao, markPriceResponseInner.ao) - && Objects.equals(this.bq, markPriceResponseInner.bq) - && Objects.equals(this.aq, markPriceResponseInner.aq) - && Objects.equals(this.bLowerCase, markPriceResponseInner.bLowerCase) - && Objects.equals(this.aLowerCase, markPriceResponseInner.aLowerCase) - && Objects.equals(this.hl, markPriceResponseInner.hl) - && Objects.equals(this.ll, markPriceResponseInner.ll) - && Objects.equals(this.vo, markPriceResponseInner.vo) - && Objects.equals(this.rf, markPriceResponseInner.rf) - && Objects.equals(this.dLowerCase, markPriceResponseInner.dLowerCase) - && Objects.equals(this.tLowerCase, markPriceResponseInner.tLowerCase) - && Objects.equals(this.gLowerCase, markPriceResponseInner.gLowerCase) - && Objects.equals(this.vLowerCase, markPriceResponseInner.vLowerCase); - } - - @Override - public int hashCode() { - return Objects.hash( - sLowerCase, - mp, - E, - eLowerCase, - iLowerCase, - P, - bo, - ao, - bq, - aq, - bLowerCase, - aLowerCase, - hl, - ll, - vo, - rf, - dLowerCase, - tLowerCase, - gLowerCase, - vLowerCase); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MarkPriceResponseInner {\n"); - sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); - sb.append(" mp: ").append(toIndentedString(mp)).append("\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); - sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); - sb.append(" P: ").append(toIndentedString(P)).append("\n"); - sb.append(" bo: ").append(toIndentedString(bo)).append("\n"); - sb.append(" ao: ").append(toIndentedString(ao)).append("\n"); - sb.append(" bq: ").append(toIndentedString(bq)).append("\n"); - sb.append(" aq: ").append(toIndentedString(aq)).append("\n"); - sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); - sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); - sb.append(" hl: ").append(toIndentedString(hl)).append("\n"); - sb.append(" ll: ").append(toIndentedString(ll)).append("\n"); - sb.append(" vo: ").append(toIndentedString(vo)).append("\n"); - sb.append(" rf: ").append(toIndentedString(rf)).append("\n"); - sb.append(" dLowerCase: ").append(toIndentedString(dLowerCase)).append("\n"); - sb.append(" tLowerCase: ").append(toIndentedString(tLowerCase)).append("\n"); - sb.append(" gLowerCase: ").append(toIndentedString(gLowerCase)).append("\n"); - sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - String sLowerCaseValueAsString = sLowerCaseValue.toString(); - valMap.put("sLowerCase", sLowerCaseValueAsString); - } - String mpValue = getMp(); - if (mpValue != null) { - String mpValueAsString = mpValue.toString(); - valMap.put("mp", mpValueAsString); - } - Long EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - String eLowerCaseValue = geteLowerCase(); - if (eLowerCaseValue != null) { - String eLowerCaseValueAsString = eLowerCaseValue.toString(); - valMap.put("eLowerCase", eLowerCaseValueAsString); - } - String iLowerCaseValue = getiLowerCase(); - if (iLowerCaseValue != null) { - String iLowerCaseValueAsString = iLowerCaseValue.toString(); - valMap.put("iLowerCase", iLowerCaseValueAsString); - } - String PValue = getP(); - if (PValue != null) { - String PValueAsString = PValue.toString(); - valMap.put("P", PValueAsString); - } - String boValue = getBo(); - if (boValue != null) { - String boValueAsString = boValue.toString(); - valMap.put("bo", boValueAsString); - } - String aoValue = getAo(); - if (aoValue != null) { - String aoValueAsString = aoValue.toString(); - valMap.put("ao", aoValueAsString); - } - String bqValue = getBq(); - if (bqValue != null) { - String bqValueAsString = bqValue.toString(); - valMap.put("bq", bqValueAsString); - } - String aqValue = getAq(); - if (aqValue != null) { - String aqValueAsString = aqValue.toString(); - valMap.put("aq", aqValueAsString); - } - String bLowerCaseValue = getbLowerCase(); - if (bLowerCaseValue != null) { - String bLowerCaseValueAsString = bLowerCaseValue.toString(); - valMap.put("bLowerCase", bLowerCaseValueAsString); - } - String aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - String aLowerCaseValueAsString = aLowerCaseValue.toString(); - valMap.put("aLowerCase", aLowerCaseValueAsString); - } - String hlValue = getHl(); - if (hlValue != null) { - String hlValueAsString = hlValue.toString(); - valMap.put("hl", hlValueAsString); - } - String llValue = getLl(); - if (llValue != null) { - String llValueAsString = llValue.toString(); - valMap.put("ll", llValueAsString); - } - String voValue = getVo(); - if (voValue != null) { - String voValueAsString = voValue.toString(); - valMap.put("vo", voValueAsString); - } - String rfValue = getRf(); - if (rfValue != null) { - String rfValueAsString = rfValue.toString(); - valMap.put("rf", rfValueAsString); - } - String dLowerCaseValue = getdLowerCase(); - if (dLowerCaseValue != null) { - String dLowerCaseValueAsString = dLowerCaseValue.toString(); - valMap.put("dLowerCase", dLowerCaseValueAsString); - } - String tLowerCaseValue = gettLowerCase(); - if (tLowerCaseValue != null) { - String tLowerCaseValueAsString = tLowerCaseValue.toString(); - valMap.put("tLowerCase", tLowerCaseValueAsString); - } - String gLowerCaseValue = getgLowerCase(); - if (gLowerCaseValue != null) { - String gLowerCaseValueAsString = gLowerCaseValue.toString(); - valMap.put("gLowerCase", gLowerCaseValueAsString); - } - String vLowerCaseValue = getvLowerCase(); - if (vLowerCaseValue != null) { - String vLowerCaseValueAsString = vLowerCaseValue.toString(); - valMap.put("vLowerCase", vLowerCaseValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - valMap.put("sLowerCase", sLowerCaseValue); - } - Object mpValue = getMp(); - if (mpValue != null) { - valMap.put("mp", mpValue); - } - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object eLowerCaseValue = geteLowerCase(); - if (eLowerCaseValue != null) { - valMap.put("eLowerCase", eLowerCaseValue); - } - Object iLowerCaseValue = getiLowerCase(); - if (iLowerCaseValue != null) { - valMap.put("iLowerCase", iLowerCaseValue); - } - Object PValue = getP(); - if (PValue != null) { - valMap.put("P", PValue); - } - Object boValue = getBo(); - if (boValue != null) { - valMap.put("bo", boValue); - } - Object aoValue = getAo(); - if (aoValue != null) { - valMap.put("ao", aoValue); - } - Object bqValue = getBq(); - if (bqValue != null) { - valMap.put("bq", bqValue); - } - Object aqValue = getAq(); - if (aqValue != null) { - valMap.put("aq", aqValue); - } - Object bLowerCaseValue = getbLowerCase(); - if (bLowerCaseValue != null) { - valMap.put("bLowerCase", bLowerCaseValue); - } - Object aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - valMap.put("aLowerCase", aLowerCaseValue); - } - Object hlValue = getHl(); - if (hlValue != null) { - valMap.put("hl", hlValue); - } - Object llValue = getLl(); - if (llValue != null) { - valMap.put("ll", llValue); - } - Object voValue = getVo(); - if (voValue != null) { - valMap.put("vo", voValue); - } - Object rfValue = getRf(); - if (rfValue != null) { - valMap.put("rf", rfValue); - } - Object dLowerCaseValue = getdLowerCase(); - if (dLowerCaseValue != null) { - valMap.put("dLowerCase", dLowerCaseValue); - } - Object tLowerCaseValue = gettLowerCase(); - if (tLowerCaseValue != null) { - valMap.put("tLowerCase", tLowerCaseValue); - } - Object gLowerCaseValue = getgLowerCase(); - if (gLowerCaseValue != null) { - valMap.put("gLowerCase", gLowerCaseValue); - } - Object vLowerCaseValue = getvLowerCase(); - if (vLowerCaseValue != null) { - valMap.put("vLowerCase", vLowerCaseValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("s"); - openapiFields.add("mp"); - openapiFields.add("E"); - openapiFields.add("e"); - openapiFields.add("i"); - openapiFields.add("P"); - openapiFields.add("bo"); - openapiFields.add("ao"); - openapiFields.add("bq"); - openapiFields.add("aq"); - openapiFields.add("b"); - openapiFields.add("a"); - openapiFields.add("hl"); - openapiFields.add("ll"); - openapiFields.add("vo"); - openapiFields.add("rf"); - openapiFields.add("d"); - openapiFields.add("t"); - openapiFields.add("g"); - openapiFields.add("v"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MarkPriceResponseInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MarkPriceResponseInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MarkPriceResponseInner is not found in" - + " the empty JSON string", - MarkPriceResponseInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MarkPriceResponseInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MarkPriceResponseInner` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) - && !jsonObj.get("s").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `s` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("s").toString())); - } - if ((jsonObj.get("mp") != null && !jsonObj.get("mp").isJsonNull()) - && !jsonObj.get("mp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `mp` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("mp").toString())); - } - if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) - && !jsonObj.get("e").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `e` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("e").toString())); - } - if ((jsonObj.get("i") != null && !jsonObj.get("i").isJsonNull()) - && !jsonObj.get("i").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `i` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("i").toString())); - } - if ((jsonObj.get("P") != null && !jsonObj.get("P").isJsonNull()) - && !jsonObj.get("P").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `P` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("P").toString())); - } - if ((jsonObj.get("bo") != null && !jsonObj.get("bo").isJsonNull()) - && !jsonObj.get("bo").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `bo` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("bo").toString())); - } - if ((jsonObj.get("ao") != null && !jsonObj.get("ao").isJsonNull()) - && !jsonObj.get("ao").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ao` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("ao").toString())); - } - if ((jsonObj.get("bq") != null && !jsonObj.get("bq").isJsonNull()) - && !jsonObj.get("bq").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `bq` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("bq").toString())); - } - if ((jsonObj.get("aq") != null && !jsonObj.get("aq").isJsonNull()) - && !jsonObj.get("aq").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `aq` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("aq").toString())); - } - if ((jsonObj.get("b") != null && !jsonObj.get("b").isJsonNull()) - && !jsonObj.get("b").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `b` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("b").toString())); - } - if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) - && !jsonObj.get("a").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `a` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("a").toString())); - } - if ((jsonObj.get("hl") != null && !jsonObj.get("hl").isJsonNull()) - && !jsonObj.get("hl").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `hl` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("hl").toString())); - } - if ((jsonObj.get("ll") != null && !jsonObj.get("ll").isJsonNull()) - && !jsonObj.get("ll").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ll` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("ll").toString())); - } - if ((jsonObj.get("vo") != null && !jsonObj.get("vo").isJsonNull()) - && !jsonObj.get("vo").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `vo` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("vo").toString())); - } - if ((jsonObj.get("rf") != null && !jsonObj.get("rf").isJsonNull()) - && !jsonObj.get("rf").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `rf` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("rf").toString())); - } - if ((jsonObj.get("d") != null && !jsonObj.get("d").isJsonNull()) - && !jsonObj.get("d").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `d` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("d").toString())); - } - if ((jsonObj.get("t") != null && !jsonObj.get("t").isJsonNull()) - && !jsonObj.get("t").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `t` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("t").toString())); - } - if ((jsonObj.get("g") != null && !jsonObj.get("g").isJsonNull()) - && !jsonObj.get("g").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `g` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("g").toString())); - } - if ((jsonObj.get("v") != null && !jsonObj.get("v").isJsonNull()) - && !jsonObj.get("v").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `v` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("v").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MarkPriceResponseInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MarkPriceResponseInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MarkPriceResponseInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MarkPriceResponseInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MarkPriceResponseInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MarkPriceResponseInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of MarkPriceResponseInner - * @throws IOException if the JSON string is invalid with respect to MarkPriceResponseInner - */ - public static MarkPriceResponseInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MarkPriceResponseInner.class); - } - - /** - * Convert an instance of MarkPriceResponseInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/NewSymbolInfoRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/NewSymbolInfoRequest.java index a5f623318..e4570f57b 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/NewSymbolInfoRequest.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/NewSymbolInfoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** NewSymbolInfoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewSymbolInfoRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -53,7 +53,7 @@ public NewSymbolInfoRequest id(@jakarta.annotation.Nullable Integer id) { } /** - * Get id + * Unique WebSocket request ID. * * @return id */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/NewSymbolInfoResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/NewSymbolInfoResponse.java index 536710e7d..99c3d8c2f 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/NewSymbolInfoResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/NewSymbolInfoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** NewSymbolInfoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewSymbolInfoResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -113,7 +113,7 @@ public NewSymbolInfoResponse eLowerCase(@jakarta.annotation.Nullable String eLow } /** - * Get eLowerCase + * Event Type * * @return eLowerCase */ @@ -132,7 +132,7 @@ public NewSymbolInfoResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -151,7 +151,7 @@ public NewSymbolInfoResponse sLowerCase(@jakarta.annotation.Nullable String sLow } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -170,7 +170,7 @@ public NewSymbolInfoResponse ps(@jakarta.annotation.Nullable String ps) { } /** - * Get ps + * Underlying index of the contract * * @return ps */ @@ -189,7 +189,7 @@ public NewSymbolInfoResponse qa(@jakarta.annotation.Nullable String qa) { } /** - * Get qa + * Quotation asset * * @return qa */ @@ -208,7 +208,7 @@ public NewSymbolInfoResponse dLowerCase(@jakarta.annotation.Nullable String dLow } /** - * Get dLowerCase + * Option type * * @return dLowerCase */ @@ -227,7 +227,7 @@ public NewSymbolInfoResponse sp(@jakarta.annotation.Nullable String sp) { } /** - * Get sp + * Strike price * * @return sp */ @@ -246,7 +246,7 @@ public NewSymbolInfoResponse dt(@jakarta.annotation.Nullable Long dt) { } /** - * Get dt + * Delivery date time * * @return dt */ @@ -265,7 +265,7 @@ public NewSymbolInfoResponse uLowerCase(@jakarta.annotation.Nullable Long uLower } /** - * Get uLowerCase + * unit, the quantity of the underlying asset represented by a single contract. * * @return uLowerCase */ @@ -284,7 +284,7 @@ public NewSymbolInfoResponse ot(@jakarta.annotation.Nullable Long ot) { } /** - * Get ot + * onboard date time * * @return ot */ @@ -303,7 +303,7 @@ public NewSymbolInfoResponse cs(@jakarta.annotation.Nullable String cs) { } /** - * Get cs + * Contract status * * @return cs */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OpenInterestRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OpenInterestRequest.java index 31d3ad187..c2e9b3b37 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OpenInterestRequest.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OpenInterestRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OpenInterestRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenInterestRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -45,10 +45,16 @@ public class OpenInterestRequest extends BaseDTO { @jakarta.annotation.Nullable private Integer id; + public static final String SERIALIZED_NAME_UNDERLYING = "underlying"; + + @SerializedName(SERIALIZED_NAME_UNDERLYING) + @jakarta.annotation.Nullable + private String underlying; + public static final String SERIALIZED_NAME_EXPIRATION_DATE = "expirationDate"; @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String expirationDate; public OpenInterestRequest() {} @@ -59,7 +65,7 @@ public OpenInterestRequest id(@jakarta.annotation.Nullable Integer id) { } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -72,23 +78,41 @@ public void setId(@jakarta.annotation.Nullable Integer id) { this.id = id; } - public OpenInterestRequest expirationDate(@jakarta.annotation.Nonnull String expirationDate) { + public OpenInterestRequest underlying(@jakarta.annotation.Nullable String underlying) { + this.underlying = underlying; + return this; + } + + /** + * The underlying parameter + * + * @return underlying + */ + @jakarta.annotation.Nullable + public String getUnderlying() { + return underlying; + } + + public void setUnderlying(@jakarta.annotation.Nullable String underlying) { + this.underlying = underlying; + } + + public OpenInterestRequest expirationDate(@jakarta.annotation.Nullable String expirationDate) { this.expirationDate = expirationDate; return this; } /** - * Get expirationDate + * The expirationDate parameter * * @return expirationDate */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getExpirationDate() { return expirationDate; } - public void setExpirationDate(@jakarta.annotation.Nonnull String expirationDate) { + public void setExpirationDate(@jakarta.annotation.Nullable String expirationDate) { this.expirationDate = expirationDate; } @@ -102,12 +126,13 @@ public boolean equals(Object o) { } OpenInterestRequest openInterestRequest = (OpenInterestRequest) o; return Objects.equals(this.id, openInterestRequest.id) + && Objects.equals(this.underlying, openInterestRequest.underlying) && Objects.equals(this.expirationDate, openInterestRequest.expirationDate); } @Override public int hashCode() { - return Objects.hash(id, expirationDate); + return Objects.hash(id, underlying, expirationDate); } @Override @@ -115,6 +140,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OpenInterestRequest {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" underlying: ").append(toIndentedString(underlying)).append("\n"); sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); sb.append("}"); return sb.toString(); @@ -129,6 +155,11 @@ public String toUrlQueryString() { String idValueAsString = idValue.toString(); valMap.put("id", idValueAsString); } + String underlyingValue = getUnderlying(); + if (underlyingValue != null) { + String underlyingValueAsString = underlyingValue.toString(); + valMap.put("underlying", underlyingValueAsString); + } String expirationDateValue = getExpirationDate(); if (expirationDateValue != null) { String expirationDateValueAsString = expirationDateValue.toString(); @@ -149,6 +180,10 @@ public Map toMap() { if (idValue != null) { valMap.put("id", idValue); } + Object underlyingValue = getUnderlying(); + if (underlyingValue != null) { + valMap.put("underlying", underlyingValue); + } Object expirationDateValue = getExpirationDate(); if (expirationDateValue != null) { valMap.put("expirationDate", expirationDateValue); @@ -180,11 +215,11 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("id"); + openapiFields.add("underlying"); openapiFields.add("expirationDate"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("expirationDate"); } /** @@ -216,18 +251,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OpenInterestRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("expirationDate").isJsonPrimitive()) { + if ((jsonObj.get("underlying") != null && !jsonObj.get("underlying").isJsonNull()) + && !jsonObj.get("underlying").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `underlying` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("underlying").toString())); + } + if ((jsonObj.get("expirationDate") != null && !jsonObj.get("expirationDate").isJsonNull()) + && !jsonObj.get("expirationDate").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `expirationDate` to be a primitive type in the JSON" diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OpenInterestResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OpenInterestResponse.java index 8018216c5..1b554abad 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OpenInterestResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OpenInterestResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** OpenInterestResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenInterestResponse extends ArrayList { public OpenInterestResponse() {} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OpenInterestResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OpenInterestResponseInner.java index ee5f2ed9f..b42d7f916 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OpenInterestResponseInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OpenInterestResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OpenInterestResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenInterestResponseInner extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -77,7 +77,7 @@ public OpenInterestResponseInner eLowerCase(@jakarta.annotation.Nullable String } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -96,7 +96,7 @@ public OpenInterestResponseInner E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -115,7 +115,7 @@ public OpenInterestResponseInner sLowerCase(@jakarta.annotation.Nullable String } /** - * Get sLowerCase + * Option symbol * * @return sLowerCase */ @@ -134,7 +134,7 @@ public OpenInterestResponseInner oLowerCase(@jakarta.annotation.Nullable String } /** - * Get oLowerCase + * Open interest in contracts * * @return oLowerCase */ @@ -153,7 +153,7 @@ public OpenInterestResponseInner hLowerCase(@jakarta.annotation.Nullable String } /** - * Get hLowerCase + * Open interest in USDT * * @return hLowerCase */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OptionMarkPriceRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OptionMarkPriceRequest.java new file mode 100644 index 000000000..c679a1ffc --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OptionMarkPriceRequest.java @@ -0,0 +1,277 @@ +/* + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** OptionMarkPriceRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OptionMarkPriceRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Integer id; + + public static final String SERIALIZED_NAME_UNDERLYING = "underlying"; + + @SerializedName(SERIALIZED_NAME_UNDERLYING) + @jakarta.annotation.Nullable + private String underlying; + + public OptionMarkPriceRequest() {} + + public OptionMarkPriceRequest id(@jakarta.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Integer id) { + this.id = id; + } + + public OptionMarkPriceRequest underlying(@jakarta.annotation.Nullable String underlying) { + this.underlying = underlying; + return this; + } + + /** + * The underlying parameter + * + * @return underlying + */ + @jakarta.annotation.Nullable + public String getUnderlying() { + return underlying; + } + + public void setUnderlying(@jakarta.annotation.Nullable String underlying) { + this.underlying = underlying; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OptionMarkPriceRequest optionMarkPriceRequest = (OptionMarkPriceRequest) o; + return Objects.equals(this.id, optionMarkPriceRequest.id) + && Objects.equals(this.underlying, optionMarkPriceRequest.underlying); + } + + @Override + public int hashCode() { + return Objects.hash(id, underlying); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OptionMarkPriceRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" underlying: ").append(toIndentedString(underlying)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Integer idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + String underlyingValue = getUnderlying(); + if (underlyingValue != null) { + String underlyingValueAsString = underlyingValue.toString(); + valMap.put("underlying", underlyingValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object underlyingValue = getUnderlying(); + if (underlyingValue != null) { + valMap.put("underlying", underlyingValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("underlying"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OptionMarkPriceRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OptionMarkPriceRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OptionMarkPriceRequest is not found in" + + " the empty JSON string", + OptionMarkPriceRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OptionMarkPriceRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OptionMarkPriceRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("underlying") != null && !jsonObj.get("underlying").isJsonNull()) + && !jsonObj.get("underlying").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `underlying` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("underlying").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OptionMarkPriceRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OptionMarkPriceRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(OptionMarkPriceRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OptionMarkPriceRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OptionMarkPriceRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OptionMarkPriceRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OptionMarkPriceRequest + * @throws IOException if the JSON string is invalid with respect to OptionMarkPriceRequest + */ + public static OptionMarkPriceRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OptionMarkPriceRequest.class); + } + + /** + * Convert an instance of OptionMarkPriceRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OptionMarkPriceResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OptionMarkPriceResponse.java new file mode 100644 index 000000000..d986ab2fd --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OptionMarkPriceResponse.java @@ -0,0 +1,190 @@ +/* + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; + +import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** OptionMarkPriceResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OptionMarkPriceResponse extends ArrayList { + public OptionMarkPriceResponse() {} + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OptionMarkPriceResponse {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OptionMarkPriceResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OptionMarkPriceResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OptionMarkPriceResponse is not found" + + " in the empty JSON string", + OptionMarkPriceResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OptionMarkPriceResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OptionMarkPriceResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OptionMarkPriceResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OptionMarkPriceResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(OptionMarkPriceResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OptionMarkPriceResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); + elementAdapter.write(out, obj); + } + + @Override + public OptionMarkPriceResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OptionMarkPriceResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OptionMarkPriceResponse + * @throws IOException if the JSON string is invalid with respect to OptionMarkPriceResponse + */ + public static OptionMarkPriceResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OptionMarkPriceResponse.class); + } + + /** + * Convert an instance of OptionMarkPriceResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OptionMarkPriceResponseInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OptionMarkPriceResponseInner.java new file mode 100644 index 000000000..ed1104b03 --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OptionMarkPriceResponseInner.java @@ -0,0 +1,1112 @@ +/* + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** OptionMarkPriceResponseInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OptionMarkPriceResponseInner extends BaseDTO { + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_MP = "mp"; + + @SerializedName(SERIALIZED_NAME_MP) + @jakarta.annotation.Nullable + private String mp; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; + + @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) + @jakarta.annotation.Nullable + private String iLowerCase; + + public static final String SERIALIZED_NAME_P = "P"; + + @SerializedName(SERIALIZED_NAME_P) + @jakarta.annotation.Nullable + private String P; + + public static final String SERIALIZED_NAME_BO = "bo"; + + @SerializedName(SERIALIZED_NAME_BO) + @jakarta.annotation.Nullable + private String bo; + + public static final String SERIALIZED_NAME_AO = "ao"; + + @SerializedName(SERIALIZED_NAME_AO) + @jakarta.annotation.Nullable + private String ao; + + public static final String SERIALIZED_NAME_BQ = "bq"; + + @SerializedName(SERIALIZED_NAME_BQ) + @jakarta.annotation.Nullable + private String bq; + + public static final String SERIALIZED_NAME_AQ = "aq"; + + @SerializedName(SERIALIZED_NAME_AQ) + @jakarta.annotation.Nullable + private String aq; + + public static final String SERIALIZED_NAME_B_LOWER_CASE = "b"; + + @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) + @jakarta.annotation.Nullable + private String bLowerCase; + + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private String aLowerCase; + + public static final String SERIALIZED_NAME_HL = "hl"; + + @SerializedName(SERIALIZED_NAME_HL) + @jakarta.annotation.Nullable + private String hl; + + public static final String SERIALIZED_NAME_LL = "ll"; + + @SerializedName(SERIALIZED_NAME_LL) + @jakarta.annotation.Nullable + private String ll; + + public static final String SERIALIZED_NAME_VO = "vo"; + + @SerializedName(SERIALIZED_NAME_VO) + @jakarta.annotation.Nullable + private String vo; + + public static final String SERIALIZED_NAME_RF = "rf"; + + @SerializedName(SERIALIZED_NAME_RF) + @jakarta.annotation.Nullable + private String rf; + + public static final String SERIALIZED_NAME_D_LOWER_CASE = "d"; + + @SerializedName(SERIALIZED_NAME_D_LOWER_CASE) + @jakarta.annotation.Nullable + private String dLowerCase; + + public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; + + @SerializedName(SERIALIZED_NAME_T_LOWER_CASE) + @jakarta.annotation.Nullable + private String tLowerCase; + + public static final String SERIALIZED_NAME_G_LOWER_CASE = "g"; + + @SerializedName(SERIALIZED_NAME_G_LOWER_CASE) + @jakarta.annotation.Nullable + private String gLowerCase; + + public static final String SERIALIZED_NAME_V_LOWER_CASE = "v"; + + @SerializedName(SERIALIZED_NAME_V_LOWER_CASE) + @jakarta.annotation.Nullable + private String vLowerCase; + + public OptionMarkPriceResponseInner() {} + + public OptionMarkPriceResponseInner sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * Symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public OptionMarkPriceResponseInner mp(@jakarta.annotation.Nullable String mp) { + this.mp = mp; + return this; + } + + /** + * Mark price + * + * @return mp + */ + @jakarta.annotation.Nullable + public String getMp() { + return mp; + } + + public void setMp(@jakarta.annotation.Nullable String mp) { + this.mp = mp; + } + + public OptionMarkPriceResponseInner E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public OptionMarkPriceResponseInner eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * Event type + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public OptionMarkPriceResponseInner iLowerCase(@jakarta.annotation.Nullable String iLowerCase) { + this.iLowerCase = iLowerCase; + return this; + } + + /** + * Index price + * + * @return iLowerCase + */ + @jakarta.annotation.Nullable + public String getiLowerCase() { + return iLowerCase; + } + + public void setiLowerCase(@jakarta.annotation.Nullable String iLowerCase) { + this.iLowerCase = iLowerCase; + } + + public OptionMarkPriceResponseInner P(@jakarta.annotation.Nullable String P) { + this.P = P; + return this; + } + + /** + * Estimated Settle Price, only useful in the 0.5 hour before the settlement starts + * + * @return P + */ + @jakarta.annotation.Nullable + public String getP() { + return P; + } + + public void setP(@jakarta.annotation.Nullable String P) { + this.P = P; + } + + public OptionMarkPriceResponseInner bo(@jakarta.annotation.Nullable String bo) { + this.bo = bo; + return this; + } + + /** + * The best buy price + * + * @return bo + */ + @jakarta.annotation.Nullable + public String getBo() { + return bo; + } + + public void setBo(@jakarta.annotation.Nullable String bo) { + this.bo = bo; + } + + public OptionMarkPriceResponseInner ao(@jakarta.annotation.Nullable String ao) { + this.ao = ao; + return this; + } + + /** + * The best sell price + * + * @return ao + */ + @jakarta.annotation.Nullable + public String getAo() { + return ao; + } + + public void setAo(@jakarta.annotation.Nullable String ao) { + this.ao = ao; + } + + public OptionMarkPriceResponseInner bq(@jakarta.annotation.Nullable String bq) { + this.bq = bq; + return this; + } + + /** + * The best buy quantity + * + * @return bq + */ + @jakarta.annotation.Nullable + public String getBq() { + return bq; + } + + public void setBq(@jakarta.annotation.Nullable String bq) { + this.bq = bq; + } + + public OptionMarkPriceResponseInner aq(@jakarta.annotation.Nullable String aq) { + this.aq = aq; + return this; + } + + /** + * The best sell quantity + * + * @return aq + */ + @jakarta.annotation.Nullable + public String getAq() { + return aq; + } + + public void setAq(@jakarta.annotation.Nullable String aq) { + this.aq = aq; + } + + public OptionMarkPriceResponseInner bLowerCase(@jakarta.annotation.Nullable String bLowerCase) { + this.bLowerCase = bLowerCase; + return this; + } + + /** + * BuyImplied volatility + * + * @return bLowerCase + */ + @jakarta.annotation.Nullable + public String getbLowerCase() { + return bLowerCase; + } + + public void setbLowerCase(@jakarta.annotation.Nullable String bLowerCase) { + this.bLowerCase = bLowerCase; + } + + public OptionMarkPriceResponseInner aLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + /** + * SellImplied volatility + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + public String getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + } + + public OptionMarkPriceResponseInner hl(@jakarta.annotation.Nullable String hl) { + this.hl = hl; + return this; + } + + /** + * Buy Maximum price + * + * @return hl + */ + @jakarta.annotation.Nullable + public String getHl() { + return hl; + } + + public void setHl(@jakarta.annotation.Nullable String hl) { + this.hl = hl; + } + + public OptionMarkPriceResponseInner ll(@jakarta.annotation.Nullable String ll) { + this.ll = ll; + return this; + } + + /** + * Sell Minimum price + * + * @return ll + */ + @jakarta.annotation.Nullable + public String getLl() { + return ll; + } + + public void setLl(@jakarta.annotation.Nullable String ll) { + this.ll = ll; + } + + public OptionMarkPriceResponseInner vo(@jakarta.annotation.Nullable String vo) { + this.vo = vo; + return this; + } + + /** + * volatility + * + * @return vo + */ + @jakarta.annotation.Nullable + public String getVo() { + return vo; + } + + public void setVo(@jakarta.annotation.Nullable String vo) { + this.vo = vo; + } + + public OptionMarkPriceResponseInner rf(@jakarta.annotation.Nullable String rf) { + this.rf = rf; + return this; + } + + /** + * risk free rate + * + * @return rf + */ + @jakarta.annotation.Nullable + public String getRf() { + return rf; + } + + public void setRf(@jakarta.annotation.Nullable String rf) { + this.rf = rf; + } + + public OptionMarkPriceResponseInner dLowerCase(@jakarta.annotation.Nullable String dLowerCase) { + this.dLowerCase = dLowerCase; + return this; + } + + /** + * delta + * + * @return dLowerCase + */ + @jakarta.annotation.Nullable + public String getdLowerCase() { + return dLowerCase; + } + + public void setdLowerCase(@jakarta.annotation.Nullable String dLowerCase) { + this.dLowerCase = dLowerCase; + } + + public OptionMarkPriceResponseInner tLowerCase(@jakarta.annotation.Nullable String tLowerCase) { + this.tLowerCase = tLowerCase; + return this; + } + + /** + * theta + * + * @return tLowerCase + */ + @jakarta.annotation.Nullable + public String gettLowerCase() { + return tLowerCase; + } + + public void settLowerCase(@jakarta.annotation.Nullable String tLowerCase) { + this.tLowerCase = tLowerCase; + } + + public OptionMarkPriceResponseInner gLowerCase(@jakarta.annotation.Nullable String gLowerCase) { + this.gLowerCase = gLowerCase; + return this; + } + + /** + * gamma + * + * @return gLowerCase + */ + @jakarta.annotation.Nullable + public String getgLowerCase() { + return gLowerCase; + } + + public void setgLowerCase(@jakarta.annotation.Nullable String gLowerCase) { + this.gLowerCase = gLowerCase; + } + + public OptionMarkPriceResponseInner vLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + return this; + } + + /** + * vega + * + * @return vLowerCase + */ + @jakarta.annotation.Nullable + public String getvLowerCase() { + return vLowerCase; + } + + public void setvLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OptionMarkPriceResponseInner optionMarkPriceResponseInner = + (OptionMarkPriceResponseInner) o; + return Objects.equals(this.sLowerCase, optionMarkPriceResponseInner.sLowerCase) + && Objects.equals(this.mp, optionMarkPriceResponseInner.mp) + && Objects.equals(this.E, optionMarkPriceResponseInner.E) + && Objects.equals(this.eLowerCase, optionMarkPriceResponseInner.eLowerCase) + && Objects.equals(this.iLowerCase, optionMarkPriceResponseInner.iLowerCase) + && Objects.equals(this.P, optionMarkPriceResponseInner.P) + && Objects.equals(this.bo, optionMarkPriceResponseInner.bo) + && Objects.equals(this.ao, optionMarkPriceResponseInner.ao) + && Objects.equals(this.bq, optionMarkPriceResponseInner.bq) + && Objects.equals(this.aq, optionMarkPriceResponseInner.aq) + && Objects.equals(this.bLowerCase, optionMarkPriceResponseInner.bLowerCase) + && Objects.equals(this.aLowerCase, optionMarkPriceResponseInner.aLowerCase) + && Objects.equals(this.hl, optionMarkPriceResponseInner.hl) + && Objects.equals(this.ll, optionMarkPriceResponseInner.ll) + && Objects.equals(this.vo, optionMarkPriceResponseInner.vo) + && Objects.equals(this.rf, optionMarkPriceResponseInner.rf) + && Objects.equals(this.dLowerCase, optionMarkPriceResponseInner.dLowerCase) + && Objects.equals(this.tLowerCase, optionMarkPriceResponseInner.tLowerCase) + && Objects.equals(this.gLowerCase, optionMarkPriceResponseInner.gLowerCase) + && Objects.equals(this.vLowerCase, optionMarkPriceResponseInner.vLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash( + sLowerCase, + mp, + E, + eLowerCase, + iLowerCase, + P, + bo, + ao, + bq, + aq, + bLowerCase, + aLowerCase, + hl, + ll, + vo, + rf, + dLowerCase, + tLowerCase, + gLowerCase, + vLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OptionMarkPriceResponseInner {\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" mp: ").append(toIndentedString(mp)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); + sb.append(" P: ").append(toIndentedString(P)).append("\n"); + sb.append(" bo: ").append(toIndentedString(bo)).append("\n"); + sb.append(" ao: ").append(toIndentedString(ao)).append("\n"); + sb.append(" bq: ").append(toIndentedString(bq)).append("\n"); + sb.append(" aq: ").append(toIndentedString(aq)).append("\n"); + sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" hl: ").append(toIndentedString(hl)).append("\n"); + sb.append(" ll: ").append(toIndentedString(ll)).append("\n"); + sb.append(" vo: ").append(toIndentedString(vo)).append("\n"); + sb.append(" rf: ").append(toIndentedString(rf)).append("\n"); + sb.append(" dLowerCase: ").append(toIndentedString(dLowerCase)).append("\n"); + sb.append(" tLowerCase: ").append(toIndentedString(tLowerCase)).append("\n"); + sb.append(" gLowerCase: ").append(toIndentedString(gLowerCase)).append("\n"); + sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + String mpValue = getMp(); + if (mpValue != null) { + String mpValueAsString = mpValue.toString(); + valMap.put("mp", mpValueAsString); + } + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + String iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + String iLowerCaseValueAsString = iLowerCaseValue.toString(); + valMap.put("iLowerCase", iLowerCaseValueAsString); + } + String PValue = getP(); + if (PValue != null) { + String PValueAsString = PValue.toString(); + valMap.put("P", PValueAsString); + } + String boValue = getBo(); + if (boValue != null) { + String boValueAsString = boValue.toString(); + valMap.put("bo", boValueAsString); + } + String aoValue = getAo(); + if (aoValue != null) { + String aoValueAsString = aoValue.toString(); + valMap.put("ao", aoValueAsString); + } + String bqValue = getBq(); + if (bqValue != null) { + String bqValueAsString = bqValue.toString(); + valMap.put("bq", bqValueAsString); + } + String aqValue = getAq(); + if (aqValue != null) { + String aqValueAsString = aqValue.toString(); + valMap.put("aq", aqValueAsString); + } + String bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + String bLowerCaseValueAsString = bLowerCaseValue.toString(); + valMap.put("bLowerCase", bLowerCaseValueAsString); + } + String aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = aLowerCaseValue.toString(); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + String hlValue = getHl(); + if (hlValue != null) { + String hlValueAsString = hlValue.toString(); + valMap.put("hl", hlValueAsString); + } + String llValue = getLl(); + if (llValue != null) { + String llValueAsString = llValue.toString(); + valMap.put("ll", llValueAsString); + } + String voValue = getVo(); + if (voValue != null) { + String voValueAsString = voValue.toString(); + valMap.put("vo", voValueAsString); + } + String rfValue = getRf(); + if (rfValue != null) { + String rfValueAsString = rfValue.toString(); + valMap.put("rf", rfValueAsString); + } + String dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + String dLowerCaseValueAsString = dLowerCaseValue.toString(); + valMap.put("dLowerCase", dLowerCaseValueAsString); + } + String tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + String tLowerCaseValueAsString = tLowerCaseValue.toString(); + valMap.put("tLowerCase", tLowerCaseValueAsString); + } + String gLowerCaseValue = getgLowerCase(); + if (gLowerCaseValue != null) { + String gLowerCaseValueAsString = gLowerCaseValue.toString(); + valMap.put("gLowerCase", gLowerCaseValueAsString); + } + String vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + String vLowerCaseValueAsString = vLowerCaseValue.toString(); + valMap.put("vLowerCase", vLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object mpValue = getMp(); + if (mpValue != null) { + valMap.put("mp", mpValue); + } + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + valMap.put("iLowerCase", iLowerCaseValue); + } + Object PValue = getP(); + if (PValue != null) { + valMap.put("P", PValue); + } + Object boValue = getBo(); + if (boValue != null) { + valMap.put("bo", boValue); + } + Object aoValue = getAo(); + if (aoValue != null) { + valMap.put("ao", aoValue); + } + Object bqValue = getBq(); + if (bqValue != null) { + valMap.put("bq", bqValue); + } + Object aqValue = getAq(); + if (aqValue != null) { + valMap.put("aq", aqValue); + } + Object bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + valMap.put("bLowerCase", bLowerCaseValue); + } + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + Object hlValue = getHl(); + if (hlValue != null) { + valMap.put("hl", hlValue); + } + Object llValue = getLl(); + if (llValue != null) { + valMap.put("ll", llValue); + } + Object voValue = getVo(); + if (voValue != null) { + valMap.put("vo", voValue); + } + Object rfValue = getRf(); + if (rfValue != null) { + valMap.put("rf", rfValue); + } + Object dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + valMap.put("dLowerCase", dLowerCaseValue); + } + Object tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + valMap.put("tLowerCase", tLowerCaseValue); + } + Object gLowerCaseValue = getgLowerCase(); + if (gLowerCaseValue != null) { + valMap.put("gLowerCase", gLowerCaseValue); + } + Object vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + valMap.put("vLowerCase", vLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("s"); + openapiFields.add("mp"); + openapiFields.add("E"); + openapiFields.add("e"); + openapiFields.add("i"); + openapiFields.add("P"); + openapiFields.add("bo"); + openapiFields.add("ao"); + openapiFields.add("bq"); + openapiFields.add("aq"); + openapiFields.add("b"); + openapiFields.add("a"); + openapiFields.add("hl"); + openapiFields.add("ll"); + openapiFields.add("vo"); + openapiFields.add("rf"); + openapiFields.add("d"); + openapiFields.add("t"); + openapiFields.add("g"); + openapiFields.add("v"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * OptionMarkPriceResponseInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OptionMarkPriceResponseInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OptionMarkPriceResponseInner is not" + + " found in the empty JSON string", + OptionMarkPriceResponseInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OptionMarkPriceResponseInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OptionMarkPriceResponseInner` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("mp") != null && !jsonObj.get("mp").isJsonNull()) + && !jsonObj.get("mp").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `mp` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("mp").toString())); + } + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + if ((jsonObj.get("i") != null && !jsonObj.get("i").isJsonNull()) + && !jsonObj.get("i").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `i` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("i").toString())); + } + if ((jsonObj.get("P") != null && !jsonObj.get("P").isJsonNull()) + && !jsonObj.get("P").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `P` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("P").toString())); + } + if ((jsonObj.get("bo") != null && !jsonObj.get("bo").isJsonNull()) + && !jsonObj.get("bo").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `bo` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("bo").toString())); + } + if ((jsonObj.get("ao") != null && !jsonObj.get("ao").isJsonNull()) + && !jsonObj.get("ao").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ao` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ao").toString())); + } + if ((jsonObj.get("bq") != null && !jsonObj.get("bq").isJsonNull()) + && !jsonObj.get("bq").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `bq` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("bq").toString())); + } + if ((jsonObj.get("aq") != null && !jsonObj.get("aq").isJsonNull()) + && !jsonObj.get("aq").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `aq` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("aq").toString())); + } + if ((jsonObj.get("b") != null && !jsonObj.get("b").isJsonNull()) + && !jsonObj.get("b").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `b` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("b").toString())); + } + if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) + && !jsonObj.get("a").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `a` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("a").toString())); + } + if ((jsonObj.get("hl") != null && !jsonObj.get("hl").isJsonNull()) + && !jsonObj.get("hl").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `hl` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("hl").toString())); + } + if ((jsonObj.get("ll") != null && !jsonObj.get("ll").isJsonNull()) + && !jsonObj.get("ll").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ll` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ll").toString())); + } + if ((jsonObj.get("vo") != null && !jsonObj.get("vo").isJsonNull()) + && !jsonObj.get("vo").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `vo` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("vo").toString())); + } + if ((jsonObj.get("rf") != null && !jsonObj.get("rf").isJsonNull()) + && !jsonObj.get("rf").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rf` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("rf").toString())); + } + if ((jsonObj.get("d") != null && !jsonObj.get("d").isJsonNull()) + && !jsonObj.get("d").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `d` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("d").toString())); + } + if ((jsonObj.get("t") != null && !jsonObj.get("t").isJsonNull()) + && !jsonObj.get("t").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `t` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("t").toString())); + } + if ((jsonObj.get("g") != null && !jsonObj.get("g").isJsonNull()) + && !jsonObj.get("g").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `g` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("g").toString())); + } + if ((jsonObj.get("v") != null && !jsonObj.get("v").isJsonNull()) + && !jsonObj.get("v").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `v` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("v").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OptionMarkPriceResponseInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OptionMarkPriceResponseInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(OptionMarkPriceResponseInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OptionMarkPriceResponseInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OptionMarkPriceResponseInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OptionMarkPriceResponseInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OptionMarkPriceResponseInner + * @throws IOException if the JSON string is invalid with respect to + * OptionMarkPriceResponseInner + */ + public static OptionMarkPriceResponseInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OptionMarkPriceResponseInner.class); + } + + /** + * Convert an instance of OptionMarkPriceResponseInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OrderTradeUpdate.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OrderTradeUpdate.java index a8f875faa..3a997df30 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OrderTradeUpdate.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OrderTradeUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** OrderTradeUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTradeUpdate extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -66,7 +66,7 @@ public OrderTradeUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -85,7 +85,7 @@ public OrderTradeUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OrderTradeUpdateO.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OrderTradeUpdateO.java index e9bb42a17..24b760549 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OrderTradeUpdateO.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OrderTradeUpdateO.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderTradeUpdateO */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTradeUpdateO extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -197,7 +197,7 @@ public OrderTradeUpdateO sLowerCase(@jakarta.annotation.Nullable String sLowerCa } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -216,7 +216,7 @@ public OrderTradeUpdateO cLowerCase(@jakarta.annotation.Nullable String cLowerCa } /** - * Get cLowerCase + * Client Order Id * * @return cLowerCase */ @@ -235,7 +235,7 @@ public OrderTradeUpdateO S(@jakarta.annotation.Nullable String S) { } /** - * Get S + * Side * * @return S */ @@ -254,7 +254,7 @@ public OrderTradeUpdateO oLowerCase(@jakarta.annotation.Nullable String oLowerCa } /** - * Get oLowerCase + * Order Type * * @return oLowerCase */ @@ -273,7 +273,7 @@ public OrderTradeUpdateO fLowerCase(@jakarta.annotation.Nullable String fLowerCa } /** - * Get fLowerCase + * Time in Force * * @return fLowerCase */ @@ -292,7 +292,7 @@ public OrderTradeUpdateO qLowerCase(@jakarta.annotation.Nullable String qLowerCa } /** - * Get qLowerCase + * Original Quantity * * @return qLowerCase */ @@ -311,7 +311,7 @@ public OrderTradeUpdateO pLowerCase(@jakarta.annotation.Nullable String pLowerCa } /** - * Get pLowerCase + * Original Price * * @return pLowerCase */ @@ -330,7 +330,7 @@ public OrderTradeUpdateO ap(@jakarta.annotation.Nullable String ap) { } /** - * Get ap + * Average Price * * @return ap */ @@ -349,7 +349,7 @@ public OrderTradeUpdateO xLowerCase(@jakarta.annotation.Nullable String xLowerCa } /** - * Get xLowerCase + * Execution Type * * @return xLowerCase */ @@ -368,7 +368,7 @@ public OrderTradeUpdateO X(@jakarta.annotation.Nullable String X) { } /** - * Get X + * Order Status * * @return X */ @@ -387,7 +387,7 @@ public OrderTradeUpdateO iLowerCase(@jakarta.annotation.Nullable Long iLowerCase } /** - * Get iLowerCase + * Order Id * * @return iLowerCase */ @@ -406,7 +406,7 @@ public OrderTradeUpdateO lLowerCase(@jakarta.annotation.Nullable String lLowerCa } /** - * Get lLowerCase + * Order Last Filled Quantity * * @return lLowerCase */ @@ -425,7 +425,7 @@ public OrderTradeUpdateO zLowerCase(@jakarta.annotation.Nullable String zLowerCa } /** - * Get zLowerCase + * Order Filled Accumulated Quantity * * @return zLowerCase */ @@ -444,7 +444,7 @@ public OrderTradeUpdateO L(@jakarta.annotation.Nullable String L) { } /** - * Get L + * Last Filled Price * * @return L */ @@ -463,7 +463,7 @@ public OrderTradeUpdateO N(@jakarta.annotation.Nullable String N) { } /** - * Get N + * Commission Asset * * @return N */ @@ -482,7 +482,7 @@ public OrderTradeUpdateO nLowerCase(@jakarta.annotation.Nullable String nLowerCa } /** - * Get nLowerCase + * Commission, negative means fee charge * * @return nLowerCase */ @@ -501,7 +501,7 @@ public OrderTradeUpdateO T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Order Trade Time * * @return T */ @@ -520,7 +520,7 @@ public OrderTradeUpdateO tLowerCase(@jakarta.annotation.Nullable Long tLowerCase } /** - * Get tLowerCase + * Trade Id * * @return tLowerCase */ @@ -539,7 +539,7 @@ public OrderTradeUpdateO bLowerCase(@jakarta.annotation.Nullable String bLowerCa } /** - * Get bLowerCase + * Bids qty * * @return bLowerCase */ @@ -558,7 +558,7 @@ public OrderTradeUpdateO aLowerCase(@jakarta.annotation.Nullable String aLowerCa } /** - * Get aLowerCase + * Ask qty * * @return aLowerCase */ @@ -577,7 +577,7 @@ public OrderTradeUpdateO mLowerCase(@jakarta.annotation.Nullable Boolean mLowerC } /** - * Get mLowerCase + * Is this trade the maker side? * * @return mLowerCase */ @@ -596,7 +596,7 @@ public OrderTradeUpdateO R(@jakarta.annotation.Nullable Boolean R) { } /** - * Get R + * Is this reduce only * * @return R */ @@ -615,7 +615,7 @@ public OrderTradeUpdateO ot(@jakarta.annotation.Nullable String ot) { } /** - * Get ot + * Original Order Type * * @return ot */ @@ -634,7 +634,7 @@ public OrderTradeUpdateO rp(@jakarta.annotation.Nullable String rp) { } /** - * Get rp + * Realized Profit of the trade * * @return rp */ @@ -653,7 +653,7 @@ public OrderTradeUpdateO V(@jakarta.annotation.Nullable String V) { } /** - * Get V + * STP mode * * @return V */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/PartialBookDepthStreamsRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/PartialBookDepthStreamsRequest.java index 9c204757c..402223bab 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/PartialBookDepthStreamsRequest.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/PartialBookDepthStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** PartialBookDepthStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PartialBookDepthStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,20 +49,20 @@ public class PartialBookDepthStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_LEVEL = "level"; @SerializedName(SERIALIZED_NAME_LEVEL) - @jakarta.annotation.Nonnull - private String level; + @jakarta.annotation.Nullable + private Level level; public static final String SERIALIZED_NAME_UPDATE_SPEED = "updateSpeed"; @SerializedName(SERIALIZED_NAME_UPDATE_SPEED) @jakarta.annotation.Nullable - private String updateSpeed; + private UpdateSpeed updateSpeed; public PartialBookDepthStreamsRequest() {} @@ -71,7 +72,7 @@ public PartialBookDepthStreamsRequest id(@jakarta.annotation.Nullable Integer id } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -84,27 +85,26 @@ public void setId(@jakarta.annotation.Nullable Integer id) { this.id = id; } - public PartialBookDepthStreamsRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public PartialBookDepthStreamsRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } - public PartialBookDepthStreamsRequest level(@jakarta.annotation.Nonnull String level) { + public PartialBookDepthStreamsRequest level(@jakarta.annotation.Nullable Level level) { this.level = level; return this; } @@ -114,18 +114,18 @@ public PartialBookDepthStreamsRequest level(@jakarta.annotation.Nonnull String l * * @return level */ - @jakarta.annotation.Nonnull - @NotNull - public String getLevel() { + @jakarta.annotation.Nullable + @Valid + public Level getLevel() { return level; } - public void setLevel(@jakarta.annotation.Nonnull String level) { + public void setLevel(@jakarta.annotation.Nullable Level level) { this.level = level; } public PartialBookDepthStreamsRequest updateSpeed( - @jakarta.annotation.Nullable String updateSpeed) { + @jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; return this; } @@ -136,11 +136,12 @@ public PartialBookDepthStreamsRequest updateSpeed( * @return updateSpeed */ @jakarta.annotation.Nullable - public String getUpdateSpeed() { + @Valid + public UpdateSpeed getUpdateSpeed() { return updateSpeed; } - public void setUpdateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public void setUpdateSpeed(@jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; } @@ -191,12 +192,12 @@ public String toUrlQueryString() { String symbolValueAsString = symbolValue.toString(); valMap.put("symbol", symbolValueAsString); } - String levelValue = getLevel(); + Level levelValue = getLevel(); if (levelValue != null) { String levelValueAsString = levelValue.toString(); valMap.put("level", levelValueAsString); } - String updateSpeedValue = getUpdateSpeed(); + UpdateSpeed updateSpeedValue = getUpdateSpeed(); if (updateSpeedValue != null) { String updateSpeedValueAsString = updateSpeedValue.toString(); valMap.put("updateSpeed", updateSpeedValueAsString); @@ -261,8 +262,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); - openapiRequiredFields.add("level"); } /** @@ -295,38 +294,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PartialBookDepthStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - if (!jsonObj.get("level").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `level` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("level").toString())); + // validate the optional field `level` + if (jsonObj.get("level") != null && !jsonObj.get("level").isJsonNull()) { + Level.validateJsonElement(jsonObj.get("level")); } - if ((jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) - && !jsonObj.get("updateSpeed").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `updateSpeed` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("updateSpeed").toString())); + // validate the optional field `updateSpeed` + if (jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) { + UpdateSpeed.validateJsonElement(jsonObj.get("updateSpeed")); } } diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/PartialBookDepthStreamsResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/PartialBookDepthStreamsResponse.java index 65874a06d..fcc08752a 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/PartialBookDepthStreamsResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/PartialBookDepthStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** PartialBookDepthStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PartialBookDepthStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -88,13 +88,13 @@ public class PartialBookDepthStreamsResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) @jakarta.annotation.Nullable - private List bLowerCase; + private List> bLowerCase; public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) @jakarta.annotation.Nullable - private List aLowerCase; + private List> aLowerCase; public PartialBookDepthStreamsResponse() {} @@ -105,7 +105,7 @@ public PartialBookDepthStreamsResponse eLowerCase( } /** - * Get eLowerCase + * event type * * @return eLowerCase */ @@ -124,7 +124,7 @@ public PartialBookDepthStreamsResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * event time * * @return E */ @@ -143,7 +143,7 @@ public PartialBookDepthStreamsResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * transaction time * * @return T */ @@ -163,7 +163,7 @@ public PartialBookDepthStreamsResponse sLowerCase( } /** - * Get sLowerCase + * Option symbol * * @return sLowerCase */ @@ -182,7 +182,7 @@ public PartialBookDepthStreamsResponse U(@jakarta.annotation.Nullable Long U) { } /** - * Get U + * First update ID in event * * @return U */ @@ -202,7 +202,7 @@ public PartialBookDepthStreamsResponse uLowerCase( } /** - * Get uLowerCase + * Final update ID in event * * @return uLowerCase */ @@ -221,7 +221,7 @@ public PartialBookDepthStreamsResponse pu(@jakarta.annotation.Nullable Long pu) } /** - * Get pu + * Final update Id in last stream(ie `u` in last stream) * * @return pu */ @@ -235,13 +235,12 @@ public void setPu(@jakarta.annotation.Nullable Long pu) { } public PartialBookDepthStreamsResponse bLowerCase( - @jakarta.annotation.Nullable List bLowerCase) { + @jakarta.annotation.Nullable List> bLowerCase) { this.bLowerCase = bLowerCase; return this; } - public PartialBookDepthStreamsResponse addBLowerCaseItem( - PartialBookDepthStreamsResponseBItem bLowerCaseItem) { + public PartialBookDepthStreamsResponse addBLowerCaseItem(List bLowerCaseItem) { if (this.bLowerCase == null) { this.bLowerCase = new ArrayList<>(); } @@ -250,29 +249,27 @@ public PartialBookDepthStreamsResponse addBLowerCaseItem( } /** - * Get bLowerCase + * Buy order * * @return bLowerCase */ @jakarta.annotation.Nullable @Valid - public List getbLowerCase() { + public List> getbLowerCase() { return bLowerCase; } - public void setbLowerCase( - @jakarta.annotation.Nullable List bLowerCase) { + public void setbLowerCase(@jakarta.annotation.Nullable List> bLowerCase) { this.bLowerCase = bLowerCase; } public PartialBookDepthStreamsResponse aLowerCase( - @jakarta.annotation.Nullable List aLowerCase) { + @jakarta.annotation.Nullable List> aLowerCase) { this.aLowerCase = aLowerCase; return this; } - public PartialBookDepthStreamsResponse addALowerCaseItem( - PartialBookDepthStreamsResponseAItem aLowerCaseItem) { + public PartialBookDepthStreamsResponse addALowerCaseItem(List aLowerCaseItem) { if (this.aLowerCase == null) { this.aLowerCase = new ArrayList<>(); } @@ -281,18 +278,17 @@ public PartialBookDepthStreamsResponse addALowerCaseItem( } /** - * Get aLowerCase + * Sell order * * @return aLowerCase */ @jakarta.annotation.Nullable @Valid - public List getaLowerCase() { + public List> getaLowerCase() { return aLowerCase; } - public void setaLowerCase( - @jakarta.annotation.Nullable List aLowerCase) { + public void setaLowerCase(@jakarta.annotation.Nullable List> aLowerCase) { this.aLowerCase = aLowerCase; } @@ -379,12 +375,12 @@ public String toUrlQueryString() { String puValueAsString = puValue.toString(); valMap.put("pu", puValueAsString); } - List bLowerCaseValue = getbLowerCase(); + List> bLowerCaseValue = getbLowerCase(); if (bLowerCaseValue != null) { String bLowerCaseValueAsString = JSON.getGson().toJson(bLowerCaseValue); valMap.put("bLowerCase", bLowerCaseValueAsString); } - List aLowerCaseValue = getaLowerCase(); + List> aLowerCaseValue = getaLowerCase(); if (aLowerCaseValue != null) { String aLowerCaseValueAsString = JSON.getGson().toJson(aLowerCaseValue); valMap.put("aLowerCase", aLowerCaseValueAsString); diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/PartialBookDepthStreamsResponseAItem.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/PartialBookDepthStreamsResponseAItem.java deleted file mode 100644 index df6d6fac5..000000000 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/PartialBookDepthStreamsResponseAItem.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; - -import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** PartialBookDepthStreamsResponseAItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PartialBookDepthStreamsResponseAItem extends ArrayList { - public PartialBookDepthStreamsResponseAItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PartialBookDepthStreamsResponseAItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * PartialBookDepthStreamsResponseAItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PartialBookDepthStreamsResponseAItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PartialBookDepthStreamsResponseAItem" - + " is not found in the empty JSON string", - PartialBookDepthStreamsResponseAItem.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PartialBookDepthStreamsResponseAItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PartialBookDepthStreamsResponseAItem` properties. JSON:" - + " %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PartialBookDepthStreamsResponseAItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PartialBookDepthStreamsResponseAItem' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(PartialBookDepthStreamsResponseAItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, PartialBookDepthStreamsResponseAItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public PartialBookDepthStreamsResponseAItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PartialBookDepthStreamsResponseAItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of PartialBookDepthStreamsResponseAItem - * @throws IOException if the JSON string is invalid with respect to - * PartialBookDepthStreamsResponseAItem - */ - public static PartialBookDepthStreamsResponseAItem fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, PartialBookDepthStreamsResponseAItem.class); - } - - /** - * Convert an instance of PartialBookDepthStreamsResponseAItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/PartialBookDepthStreamsResponseBItem.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/PartialBookDepthStreamsResponseBItem.java deleted file mode 100644 index d98ad2a46..000000000 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/PartialBookDepthStreamsResponseBItem.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; - -import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** PartialBookDepthStreamsResponseBItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PartialBookDepthStreamsResponseBItem extends ArrayList { - public PartialBookDepthStreamsResponseBItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PartialBookDepthStreamsResponseBItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * PartialBookDepthStreamsResponseBItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PartialBookDepthStreamsResponseBItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PartialBookDepthStreamsResponseBItem" - + " is not found in the empty JSON string", - PartialBookDepthStreamsResponseBItem.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PartialBookDepthStreamsResponseBItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PartialBookDepthStreamsResponseBItem` properties. JSON:" - + " %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PartialBookDepthStreamsResponseBItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PartialBookDepthStreamsResponseBItem' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(PartialBookDepthStreamsResponseBItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, PartialBookDepthStreamsResponseBItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public PartialBookDepthStreamsResponseBItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PartialBookDepthStreamsResponseBItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of PartialBookDepthStreamsResponseBItem - * @throws IOException if the JSON string is invalid with respect to - * PartialBookDepthStreamsResponseBItem - */ - public static PartialBookDepthStreamsResponseBItem fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, PartialBookDepthStreamsResponseBItem.class); - } - - /** - * Convert an instance of PartialBookDepthStreamsResponseBItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/RiskLevelChange.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/RiskLevelChange.java index e01476ded..2becaede6 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/RiskLevelChange.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/RiskLevelChange.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** RiskLevelChange */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RiskLevelChange extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -71,7 +71,7 @@ public RiskLevelChange E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -90,7 +90,8 @@ public RiskLevelChange sLowerCase(@jakarta.annotation.Nullable String sLowerCase } /** - * Get sLowerCase + * Risk level. This feature only applies to VIP and Market Maker accounts. Risk level is + * re-evaluated on: funds transfer, trade fill, option expiry. * * @return sLowerCase */ @@ -109,7 +110,7 @@ public RiskLevelChange mb(@jakarta.annotation.Nullable String mb) { } /** - * Get mb + * Margin balance * * @return mb */ @@ -128,7 +129,7 @@ public RiskLevelChange mm(@jakarta.annotation.Nullable String mm) { } /** - * Get mm + * Maintenance margin * * @return mm */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Ticker24HourRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Ticker24HourRequest.java deleted file mode 100644 index 8b7e75cb4..000000000 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Ticker24HourRequest.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** Ticker24HourRequest */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Ticker24HourRequest extends BaseDTO { - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @jakarta.annotation.Nullable - private Integer id; - - public static final String SERIALIZED_NAME_SYMBOL = "symbol"; - - @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull - private String symbol; - - public Ticker24HourRequest() {} - - public Ticker24HourRequest id(@jakarta.annotation.Nullable Integer id) { - this.id = id; - return this; - } - - /** - * Get id - * - * @return id - */ - @jakarta.annotation.Nullable - public Integer getId() { - return id; - } - - public void setId(@jakarta.annotation.Nullable Integer id) { - this.id = id; - } - - public Ticker24HourRequest symbol(@jakarta.annotation.Nonnull String symbol) { - this.symbol = symbol; - return this; - } - - /** - * Get symbol - * - * @return symbol - */ - @jakarta.annotation.Nonnull - @NotNull - public String getSymbol() { - return symbol; - } - - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { - this.symbol = symbol; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Ticker24HourRequest ticker24HourRequest = (Ticker24HourRequest) o; - return Objects.equals(this.id, ticker24HourRequest.id) - && Objects.equals(this.symbol, ticker24HourRequest.symbol); - } - - @Override - public int hashCode() { - return Objects.hash(id, symbol); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Ticker24HourRequest {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Integer idValue = getId(); - if (idValue != null) { - String idValueAsString = idValue.toString(); - valMap.put("id", idValueAsString); - } - String symbolValue = getSymbol(); - if (symbolValue != null) { - String symbolValueAsString = symbolValue.toString(); - valMap.put("symbol", symbolValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object idValue = getId(); - if (idValue != null) { - valMap.put("id", idValue); - } - Object symbolValue = getSymbol(); - if (symbolValue != null) { - valMap.put("symbol", symbolValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("symbol"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Ticker24HourRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Ticker24HourRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Ticker24HourRequest is not found in" - + " the empty JSON string", - Ticker24HourRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Ticker24HourRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Ticker24HourRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Ticker24HourRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `symbol` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("symbol").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Ticker24HourRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Ticker24HourRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Ticker24HourRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Ticker24HourRequest value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Ticker24HourRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Ticker24HourRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of Ticker24HourRequest - * @throws IOException if the JSON string is invalid with respect to Ticker24HourRequest - */ - public static Ticker24HourRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Ticker24HourRequest.class); - } - - /** - * Convert an instance of Ticker24HourRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Ticker24HourResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Ticker24HourResponse.java deleted file mode 100644 index c1a25d76c..000000000 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/Ticker24HourResponse.java +++ /dev/null @@ -1,975 +0,0 @@ -/* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** Ticker24HourResponse */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Ticker24HourResponse extends BaseDTO { - public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; - - @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) - @jakarta.annotation.Nullable - private String eLowerCase; - - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private Long E; - - public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; - - @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) - @jakarta.annotation.Nullable - private String sLowerCase; - - public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; - - @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) - @jakarta.annotation.Nullable - private String pLowerCase; - - public static final String SERIALIZED_NAME_P = "P"; - - @SerializedName(SERIALIZED_NAME_P) - @jakarta.annotation.Nullable - private String P; - - public static final String SERIALIZED_NAME_W_LOWER_CASE = "w"; - - @SerializedName(SERIALIZED_NAME_W_LOWER_CASE) - @jakarta.annotation.Nullable - private String wLowerCase; - - public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; - - @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) - @jakarta.annotation.Nullable - private String cLowerCase; - - public static final String SERIALIZED_NAME_Q = "Q"; - - @SerializedName(SERIALIZED_NAME_Q) - @jakarta.annotation.Nullable - private String Q; - - public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; - - @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) - @jakarta.annotation.Nullable - private String oLowerCase; - - public static final String SERIALIZED_NAME_H_LOWER_CASE = "h"; - - @SerializedName(SERIALIZED_NAME_H_LOWER_CASE) - @jakarta.annotation.Nullable - private String hLowerCase; - - public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; - - @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) - @jakarta.annotation.Nullable - private String lLowerCase; - - public static final String SERIALIZED_NAME_V_LOWER_CASE = "v"; - - @SerializedName(SERIALIZED_NAME_V_LOWER_CASE) - @jakarta.annotation.Nullable - private String vLowerCase; - - public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; - - @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) - @jakarta.annotation.Nullable - private String qLowerCase; - - public static final String SERIALIZED_NAME_O = "O"; - - @SerializedName(SERIALIZED_NAME_O) - @jakarta.annotation.Nullable - private Long O; - - public static final String SERIALIZED_NAME_C = "C"; - - @SerializedName(SERIALIZED_NAME_C) - @jakarta.annotation.Nullable - private Long C; - - public static final String SERIALIZED_NAME_F = "F"; - - @SerializedName(SERIALIZED_NAME_F) - @jakarta.annotation.Nullable - private Long F; - - public static final String SERIALIZED_NAME_L = "L"; - - @SerializedName(SERIALIZED_NAME_L) - @jakarta.annotation.Nullable - private Long L; - - public static final String SERIALIZED_NAME_N_LOWER_CASE = "n"; - - @SerializedName(SERIALIZED_NAME_N_LOWER_CASE) - @jakarta.annotation.Nullable - private Long nLowerCase; - - public Ticker24HourResponse() {} - - public Ticker24HourResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { - this.eLowerCase = eLowerCase; - return this; - } - - /** - * Get eLowerCase - * - * @return eLowerCase - */ - @jakarta.annotation.Nullable - public String geteLowerCase() { - return eLowerCase; - } - - public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { - this.eLowerCase = eLowerCase; - } - - public Ticker24HourResponse E(@jakarta.annotation.Nullable Long E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public Long getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable Long E) { - this.E = E; - } - - public Ticker24HourResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - return this; - } - - /** - * Get sLowerCase - * - * @return sLowerCase - */ - @jakarta.annotation.Nullable - public String getsLowerCase() { - return sLowerCase; - } - - public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - } - - public Ticker24HourResponse pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { - this.pLowerCase = pLowerCase; - return this; - } - - /** - * Get pLowerCase - * - * @return pLowerCase - */ - @jakarta.annotation.Nullable - public String getpLowerCase() { - return pLowerCase; - } - - public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { - this.pLowerCase = pLowerCase; - } - - public Ticker24HourResponse P(@jakarta.annotation.Nullable String P) { - this.P = P; - return this; - } - - /** - * Get P - * - * @return P - */ - @jakarta.annotation.Nullable - public String getP() { - return P; - } - - public void setP(@jakarta.annotation.Nullable String P) { - this.P = P; - } - - public Ticker24HourResponse wLowerCase(@jakarta.annotation.Nullable String wLowerCase) { - this.wLowerCase = wLowerCase; - return this; - } - - /** - * Get wLowerCase - * - * @return wLowerCase - */ - @jakarta.annotation.Nullable - public String getwLowerCase() { - return wLowerCase; - } - - public void setwLowerCase(@jakarta.annotation.Nullable String wLowerCase) { - this.wLowerCase = wLowerCase; - } - - public Ticker24HourResponse cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { - this.cLowerCase = cLowerCase; - return this; - } - - /** - * Get cLowerCase - * - * @return cLowerCase - */ - @jakarta.annotation.Nullable - public String getcLowerCase() { - return cLowerCase; - } - - public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { - this.cLowerCase = cLowerCase; - } - - public Ticker24HourResponse Q(@jakarta.annotation.Nullable String Q) { - this.Q = Q; - return this; - } - - /** - * Get Q - * - * @return Q - */ - @jakarta.annotation.Nullable - public String getQ() { - return Q; - } - - public void setQ(@jakarta.annotation.Nullable String Q) { - this.Q = Q; - } - - public Ticker24HourResponse oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { - this.oLowerCase = oLowerCase; - return this; - } - - /** - * Get oLowerCase - * - * @return oLowerCase - */ - @jakarta.annotation.Nullable - public String getoLowerCase() { - return oLowerCase; - } - - public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { - this.oLowerCase = oLowerCase; - } - - public Ticker24HourResponse hLowerCase(@jakarta.annotation.Nullable String hLowerCase) { - this.hLowerCase = hLowerCase; - return this; - } - - /** - * Get hLowerCase - * - * @return hLowerCase - */ - @jakarta.annotation.Nullable - public String gethLowerCase() { - return hLowerCase; - } - - public void sethLowerCase(@jakarta.annotation.Nullable String hLowerCase) { - this.hLowerCase = hLowerCase; - } - - public Ticker24HourResponse lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { - this.lLowerCase = lLowerCase; - return this; - } - - /** - * Get lLowerCase - * - * @return lLowerCase - */ - @jakarta.annotation.Nullable - public String getlLowerCase() { - return lLowerCase; - } - - public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { - this.lLowerCase = lLowerCase; - } - - public Ticker24HourResponse vLowerCase(@jakarta.annotation.Nullable String vLowerCase) { - this.vLowerCase = vLowerCase; - return this; - } - - /** - * Get vLowerCase - * - * @return vLowerCase - */ - @jakarta.annotation.Nullable - public String getvLowerCase() { - return vLowerCase; - } - - public void setvLowerCase(@jakarta.annotation.Nullable String vLowerCase) { - this.vLowerCase = vLowerCase; - } - - public Ticker24HourResponse qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { - this.qLowerCase = qLowerCase; - return this; - } - - /** - * Get qLowerCase - * - * @return qLowerCase - */ - @jakarta.annotation.Nullable - public String getqLowerCase() { - return qLowerCase; - } - - public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { - this.qLowerCase = qLowerCase; - } - - public Ticker24HourResponse O(@jakarta.annotation.Nullable Long O) { - this.O = O; - return this; - } - - /** - * Get O - * - * @return O - */ - @jakarta.annotation.Nullable - public Long getO() { - return O; - } - - public void setO(@jakarta.annotation.Nullable Long O) { - this.O = O; - } - - public Ticker24HourResponse C(@jakarta.annotation.Nullable Long C) { - this.C = C; - return this; - } - - /** - * Get C - * - * @return C - */ - @jakarta.annotation.Nullable - public Long getC() { - return C; - } - - public void setC(@jakarta.annotation.Nullable Long C) { - this.C = C; - } - - public Ticker24HourResponse F(@jakarta.annotation.Nullable Long F) { - this.F = F; - return this; - } - - /** - * Get F - * - * @return F - */ - @jakarta.annotation.Nullable - public Long getF() { - return F; - } - - public void setF(@jakarta.annotation.Nullable Long F) { - this.F = F; - } - - public Ticker24HourResponse L(@jakarta.annotation.Nullable Long L) { - this.L = L; - return this; - } - - /** - * Get L - * - * @return L - */ - @jakarta.annotation.Nullable - public Long getL() { - return L; - } - - public void setL(@jakarta.annotation.Nullable Long L) { - this.L = L; - } - - public Ticker24HourResponse nLowerCase(@jakarta.annotation.Nullable Long nLowerCase) { - this.nLowerCase = nLowerCase; - return this; - } - - /** - * Get nLowerCase - * - * @return nLowerCase - */ - @jakarta.annotation.Nullable - public Long getnLowerCase() { - return nLowerCase; - } - - public void setnLowerCase(@jakarta.annotation.Nullable Long nLowerCase) { - this.nLowerCase = nLowerCase; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Ticker24HourResponse ticker24HourResponse = (Ticker24HourResponse) o; - return Objects.equals(this.eLowerCase, ticker24HourResponse.eLowerCase) - && Objects.equals(this.E, ticker24HourResponse.E) - && Objects.equals(this.sLowerCase, ticker24HourResponse.sLowerCase) - && Objects.equals(this.pLowerCase, ticker24HourResponse.pLowerCase) - && Objects.equals(this.P, ticker24HourResponse.P) - && Objects.equals(this.wLowerCase, ticker24HourResponse.wLowerCase) - && Objects.equals(this.cLowerCase, ticker24HourResponse.cLowerCase) - && Objects.equals(this.Q, ticker24HourResponse.Q) - && Objects.equals(this.oLowerCase, ticker24HourResponse.oLowerCase) - && Objects.equals(this.hLowerCase, ticker24HourResponse.hLowerCase) - && Objects.equals(this.lLowerCase, ticker24HourResponse.lLowerCase) - && Objects.equals(this.vLowerCase, ticker24HourResponse.vLowerCase) - && Objects.equals(this.qLowerCase, ticker24HourResponse.qLowerCase) - && Objects.equals(this.O, ticker24HourResponse.O) - && Objects.equals(this.C, ticker24HourResponse.C) - && Objects.equals(this.F, ticker24HourResponse.F) - && Objects.equals(this.L, ticker24HourResponse.L) - && Objects.equals(this.nLowerCase, ticker24HourResponse.nLowerCase); - } - - @Override - public int hashCode() { - return Objects.hash( - eLowerCase, - E, - sLowerCase, - pLowerCase, - P, - wLowerCase, - cLowerCase, - Q, - oLowerCase, - hLowerCase, - lLowerCase, - vLowerCase, - qLowerCase, - O, - C, - F, - L, - nLowerCase); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Ticker24HourResponse {\n"); - sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); - sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); - sb.append(" P: ").append(toIndentedString(P)).append("\n"); - sb.append(" wLowerCase: ").append(toIndentedString(wLowerCase)).append("\n"); - sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); - sb.append(" Q: ").append(toIndentedString(Q)).append("\n"); - sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); - sb.append(" hLowerCase: ").append(toIndentedString(hLowerCase)).append("\n"); - sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); - sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); - sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); - sb.append(" O: ").append(toIndentedString(O)).append("\n"); - sb.append(" C: ").append(toIndentedString(C)).append("\n"); - sb.append(" F: ").append(toIndentedString(F)).append("\n"); - sb.append(" L: ").append(toIndentedString(L)).append("\n"); - sb.append(" nLowerCase: ").append(toIndentedString(nLowerCase)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String eLowerCaseValue = geteLowerCase(); - if (eLowerCaseValue != null) { - String eLowerCaseValueAsString = eLowerCaseValue.toString(); - valMap.put("eLowerCase", eLowerCaseValueAsString); - } - Long EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - String sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - String sLowerCaseValueAsString = sLowerCaseValue.toString(); - valMap.put("sLowerCase", sLowerCaseValueAsString); - } - String pLowerCaseValue = getpLowerCase(); - if (pLowerCaseValue != null) { - String pLowerCaseValueAsString = pLowerCaseValue.toString(); - valMap.put("pLowerCase", pLowerCaseValueAsString); - } - String PValue = getP(); - if (PValue != null) { - String PValueAsString = PValue.toString(); - valMap.put("P", PValueAsString); - } - String wLowerCaseValue = getwLowerCase(); - if (wLowerCaseValue != null) { - String wLowerCaseValueAsString = wLowerCaseValue.toString(); - valMap.put("wLowerCase", wLowerCaseValueAsString); - } - String cLowerCaseValue = getcLowerCase(); - if (cLowerCaseValue != null) { - String cLowerCaseValueAsString = cLowerCaseValue.toString(); - valMap.put("cLowerCase", cLowerCaseValueAsString); - } - String QValue = getQ(); - if (QValue != null) { - String QValueAsString = QValue.toString(); - valMap.put("Q", QValueAsString); - } - String oLowerCaseValue = getoLowerCase(); - if (oLowerCaseValue != null) { - String oLowerCaseValueAsString = oLowerCaseValue.toString(); - valMap.put("oLowerCase", oLowerCaseValueAsString); - } - String hLowerCaseValue = gethLowerCase(); - if (hLowerCaseValue != null) { - String hLowerCaseValueAsString = hLowerCaseValue.toString(); - valMap.put("hLowerCase", hLowerCaseValueAsString); - } - String lLowerCaseValue = getlLowerCase(); - if (lLowerCaseValue != null) { - String lLowerCaseValueAsString = lLowerCaseValue.toString(); - valMap.put("lLowerCase", lLowerCaseValueAsString); - } - String vLowerCaseValue = getvLowerCase(); - if (vLowerCaseValue != null) { - String vLowerCaseValueAsString = vLowerCaseValue.toString(); - valMap.put("vLowerCase", vLowerCaseValueAsString); - } - String qLowerCaseValue = getqLowerCase(); - if (qLowerCaseValue != null) { - String qLowerCaseValueAsString = qLowerCaseValue.toString(); - valMap.put("qLowerCase", qLowerCaseValueAsString); - } - Long OValue = getO(); - if (OValue != null) { - String OValueAsString = OValue.toString(); - valMap.put("O", OValueAsString); - } - Long CValue = getC(); - if (CValue != null) { - String CValueAsString = CValue.toString(); - valMap.put("C", CValueAsString); - } - Long FValue = getF(); - if (FValue != null) { - String FValueAsString = FValue.toString(); - valMap.put("F", FValueAsString); - } - Long LValue = getL(); - if (LValue != null) { - String LValueAsString = LValue.toString(); - valMap.put("L", LValueAsString); - } - Long nLowerCaseValue = getnLowerCase(); - if (nLowerCaseValue != null) { - String nLowerCaseValueAsString = nLowerCaseValue.toString(); - valMap.put("nLowerCase", nLowerCaseValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object eLowerCaseValue = geteLowerCase(); - if (eLowerCaseValue != null) { - valMap.put("eLowerCase", eLowerCaseValue); - } - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - valMap.put("sLowerCase", sLowerCaseValue); - } - Object pLowerCaseValue = getpLowerCase(); - if (pLowerCaseValue != null) { - valMap.put("pLowerCase", pLowerCaseValue); - } - Object PValue = getP(); - if (PValue != null) { - valMap.put("P", PValue); - } - Object wLowerCaseValue = getwLowerCase(); - if (wLowerCaseValue != null) { - valMap.put("wLowerCase", wLowerCaseValue); - } - Object cLowerCaseValue = getcLowerCase(); - if (cLowerCaseValue != null) { - valMap.put("cLowerCase", cLowerCaseValue); - } - Object QValue = getQ(); - if (QValue != null) { - valMap.put("Q", QValue); - } - Object oLowerCaseValue = getoLowerCase(); - if (oLowerCaseValue != null) { - valMap.put("oLowerCase", oLowerCaseValue); - } - Object hLowerCaseValue = gethLowerCase(); - if (hLowerCaseValue != null) { - valMap.put("hLowerCase", hLowerCaseValue); - } - Object lLowerCaseValue = getlLowerCase(); - if (lLowerCaseValue != null) { - valMap.put("lLowerCase", lLowerCaseValue); - } - Object vLowerCaseValue = getvLowerCase(); - if (vLowerCaseValue != null) { - valMap.put("vLowerCase", vLowerCaseValue); - } - Object qLowerCaseValue = getqLowerCase(); - if (qLowerCaseValue != null) { - valMap.put("qLowerCase", qLowerCaseValue); - } - Object OValue = getO(); - if (OValue != null) { - valMap.put("O", OValue); - } - Object CValue = getC(); - if (CValue != null) { - valMap.put("C", CValue); - } - Object FValue = getF(); - if (FValue != null) { - valMap.put("F", FValue); - } - Object LValue = getL(); - if (LValue != null) { - valMap.put("L", LValue); - } - Object nLowerCaseValue = getnLowerCase(); - if (nLowerCaseValue != null) { - valMap.put("nLowerCase", nLowerCaseValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("e"); - openapiFields.add("E"); - openapiFields.add("s"); - openapiFields.add("p"); - openapiFields.add("P"); - openapiFields.add("w"); - openapiFields.add("c"); - openapiFields.add("Q"); - openapiFields.add("o"); - openapiFields.add("h"); - openapiFields.add("l"); - openapiFields.add("v"); - openapiFields.add("q"); - openapiFields.add("O"); - openapiFields.add("C"); - openapiFields.add("F"); - openapiFields.add("L"); - openapiFields.add("n"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Ticker24HourResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Ticker24HourResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Ticker24HourResponse is not found in" - + " the empty JSON string", - Ticker24HourResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Ticker24HourResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Ticker24HourResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) - && !jsonObj.get("e").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `e` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("e").toString())); - } - if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) - && !jsonObj.get("s").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `s` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("s").toString())); - } - if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) - && !jsonObj.get("p").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `p` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("p").toString())); - } - if ((jsonObj.get("P") != null && !jsonObj.get("P").isJsonNull()) - && !jsonObj.get("P").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `P` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("P").toString())); - } - if ((jsonObj.get("w") != null && !jsonObj.get("w").isJsonNull()) - && !jsonObj.get("w").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `w` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("w").toString())); - } - if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) - && !jsonObj.get("c").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `c` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("c").toString())); - } - if ((jsonObj.get("Q") != null && !jsonObj.get("Q").isJsonNull()) - && !jsonObj.get("Q").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Q` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("Q").toString())); - } - if ((jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) - && !jsonObj.get("o").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `o` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("o").toString())); - } - if ((jsonObj.get("h") != null && !jsonObj.get("h").isJsonNull()) - && !jsonObj.get("h").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `h` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("h").toString())); - } - if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) - && !jsonObj.get("l").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `l` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("l").toString())); - } - if ((jsonObj.get("v") != null && !jsonObj.get("v").isJsonNull()) - && !jsonObj.get("v").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `v` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("v").toString())); - } - if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) - && !jsonObj.get("q").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `q` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("q").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Ticker24HourResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Ticker24HourResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Ticker24HourResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Ticker24HourResponse value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Ticker24HourResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Ticker24HourResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Ticker24HourResponse - * @throws IOException if the JSON string is invalid with respect to Ticker24HourResponse - */ - public static Ticker24HourResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Ticker24HourResponse.class); - } - - /** - * Convert an instance of Ticker24HourResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/TradeStreamsRequest.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/TradeStreamsRequest.java index 7c699e8d0..b5cb6f707 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/TradeStreamsRequest.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/TradeStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TradeStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradeStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,7 +48,7 @@ public class TradeStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public TradeStreamsRequest() {} @@ -59,7 +59,7 @@ public TradeStreamsRequest id(@jakarta.annotation.Nullable Integer id) { } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -72,23 +72,22 @@ public void setId(@jakarta.annotation.Nullable Integer id) { this.id = id; } - public TradeStreamsRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public TradeStreamsRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -184,7 +183,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -216,18 +214,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : TradeStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/TradeStreamsResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/TradeStreamsResponse.java index 49e74d35f..f4d16cc5d 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/TradeStreamsResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/TradeStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TradeStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradeStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -107,7 +107,7 @@ public TradeStreamsResponse eLowerCase(@jakarta.annotation.Nullable String eLowe } /** - * Get eLowerCase + * event type * * @return eLowerCase */ @@ -126,7 +126,7 @@ public TradeStreamsResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * event time * * @return E */ @@ -145,7 +145,7 @@ public TradeStreamsResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * trade completed time * * @return T */ @@ -164,7 +164,7 @@ public TradeStreamsResponse sLowerCase(@jakarta.annotation.Nullable String sLowe } /** - * Get sLowerCase + * Option trading symbol * * @return sLowerCase */ @@ -183,7 +183,7 @@ public TradeStreamsResponse tLowerCase(@jakarta.annotation.Nullable Long tLowerC } /** - * Get tLowerCase + * trade ID * * @return tLowerCase */ @@ -202,7 +202,7 @@ public TradeStreamsResponse pLowerCase(@jakarta.annotation.Nullable String pLowe } /** - * Get pLowerCase + * price * * @return pLowerCase */ @@ -221,7 +221,7 @@ public TradeStreamsResponse qLowerCase(@jakarta.annotation.Nullable String qLowe } /** - * Get qLowerCase + * quantity, always positive * * @return qLowerCase */ @@ -240,7 +240,8 @@ public TradeStreamsResponse X(@jakarta.annotation.Nullable String X) { } /** - * Get X + * trade type enum, \"MARKET\" for Orderbook trading, \"BLOCK\" for Block + * trade * * @return X */ @@ -259,7 +260,7 @@ public TradeStreamsResponse S(@jakarta.annotation.Nullable String S) { } /** - * Get S + * direction * * @return S */ @@ -278,7 +279,7 @@ public TradeStreamsResponse mLowerCase(@jakarta.annotation.Nullable Boolean mLow } /** - * Get mLowerCase + * Is the buyer the market maker? * * @return mLowerCase */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/UpdateSpeed.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/UpdateSpeed.java new file mode 100644 index 000000000..afff34358 --- /dev/null +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/UpdateSpeed.java @@ -0,0 +1,73 @@ +/* + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_options.websocket.stream.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets updateSpeed */ +@JsonAdapter(UpdateSpeed.Adapter.class) +public enum UpdateSpeed { + UPDATE_SPEED_100ms("100ms"), + + UPDATE_SPEED_500ms("500ms"); + + private String value; + + UpdateSpeed(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static UpdateSpeed fromValue(String value) { + for (UpdateSpeed b : UpdateSpeed.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UpdateSpeed enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UpdateSpeed read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UpdateSpeed.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UpdateSpeed.fromValue(value); + } +} diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/UserDataStreamEventsResponse.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/UserDataStreamEventsResponse.java index 67b5a9847..9bb626681 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/UserDataStreamEventsResponse.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/UserDataStreamEventsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams + * Options WebSocket Market Streams + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -33,7 +33,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserDataStreamEventsResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(UserDataStreamEventsResponse.class.getName()); @@ -47,16 +47,18 @@ public TypeAdapter create(Gson gson, TypeToken type) { // subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterAccountUpdate = + gson.getDelegateAdapter(this, TypeToken.get(AccountUpdate.class)); final TypeAdapter adapterBalancePositionUpdate = gson.getDelegateAdapter(this, TypeToken.get(BalancePositionUpdate.class)); final TypeAdapter adapterGreekUpdate = gson.getDelegateAdapter(this, TypeToken.get(GreekUpdate.class)); + final TypeAdapter adapterListenKeyExpired = + gson.getDelegateAdapter(this, TypeToken.get(ListenKeyExpired.class)); final TypeAdapter adapterOrderTradeUpdate = gson.getDelegateAdapter(this, TypeToken.get(OrderTradeUpdate.class)); final TypeAdapter adapterRiskLevelChange = gson.getDelegateAdapter(this, TypeToken.get(RiskLevelChange.class)); - final TypeAdapter adapterListenkeyexpired = - gson.getDelegateAdapter(this, TypeToken.get(Listenkeyexpired.class)); return (TypeAdapter) new TypeAdapter() { @@ -68,6 +70,14 @@ public void write(JsonWriter out, UserDataStreamEventsResponse value) return; } + // check if the actual instance is of the type `AccountUpdate` + if (value.getActualInstance() instanceof AccountUpdate) { + JsonElement element = + adapterAccountUpdate.toJsonTree( + (AccountUpdate) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `BalancePositionUpdate` if (value.getActualInstance() instanceof BalancePositionUpdate) { JsonElement element = @@ -84,6 +94,14 @@ public void write(JsonWriter out, UserDataStreamEventsResponse value) elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `ListenKeyExpired` + if (value.getActualInstance() instanceof ListenKeyExpired) { + JsonElement element = + adapterListenKeyExpired.toJsonTree( + (ListenKeyExpired) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `OrderTradeUpdate` if (value.getActualInstance() instanceof OrderTradeUpdate) { JsonElement element = @@ -100,18 +118,10 @@ public void write(JsonWriter out, UserDataStreamEventsResponse value) elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Listenkeyexpired` - if (value.getActualInstance() instanceof Listenkeyexpired) { - JsonElement element = - adapterListenkeyexpired.toJsonTree( - (Listenkeyexpired) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } throw new IOException( "Failed to serialize as the type doesn't match oneOf schemas:" - + " BalancePositionUpdate, GreekUpdate, Listenkeyexpired," - + " OrderTradeUpdate, RiskLevelChange"); + + " AccountUpdate, BalancePositionUpdate, GreekUpdate," + + " ListenKeyExpired, OrderTradeUpdate, RiskLevelChange"); } @Override @@ -133,6 +143,12 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { } else { // look up the discriminator value in the field `e` switch (jsonObject.get("e").getAsString()) { + case "ACCOUNT_UPDATE": + deserialized = + adapterAccountUpdate.fromJsonTree(jsonObject); + newUserDataStreamEventsResponse.setActualInstance( + deserialized); + return newUserDataStreamEventsResponse; case "BALANCE_POSITION_UPDATE": deserialized = adapterBalancePositionUpdate.fromJsonTree( @@ -159,37 +175,7 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { return newUserDataStreamEventsResponse; case "listenKeyExpired": deserialized = - adapterListenkeyexpired.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "balancePositionUpdate": - deserialized = - adapterBalancePositionUpdate.fromJsonTree( - jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "greekUpdate": - deserialized = adapterGreekUpdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "listenkeyexpired": - deserialized = - adapterListenkeyexpired.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "orderTradeUpdate": - deserialized = - adapterOrderTradeUpdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "riskLevelChange": - deserialized = - adapterRiskLevelChange.fromJsonTree(jsonObject); + adapterListenKeyExpired.fromJsonTree(jsonObject); newUserDataStreamEventsResponse.setActualInstance( deserialized); return newUserDataStreamEventsResponse; @@ -201,14 +187,11 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { String.format( "Failed to lookup discriminator value `%s`" + " for UserDataStreamEventsResponse." - + " Possible values:" + + " Possible values: ACCOUNT_UPDATE" + " BALANCE_POSITION_UPDATE" + " GREEK_UPDATE ORDER_TRADE_UPDATE" - + " RISK_LEVEL_CHANGE listenKeyExpired" - + " balancePositionUpdate greekUpdate" - + " listenkeyexpired orderTradeUpdate" - + " riskLevelChange. Falling back to" - + " String.", + + " RISK_LEVEL_CHANGE listenKeyExpired." + + " Falling back to String.", jsonObject.get("e").getAsString())); } } @@ -217,6 +200,25 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { ArrayList errorMessages = new ArrayList<>(); TypeAdapter actualAdapter = elementAdapter; + // deserialize AccountUpdate + try { + // validate the JSON object to see if any exception is thrown + AccountUpdate.validateJsonElement(jsonElement); + actualAdapter = adapterAccountUpdate; + match++; + log.log(Level.FINER, "Input data matches schema 'AccountUpdate'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for AccountUpdate failed with" + + " `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'AccountUpdate'", + e); + } // deserialize BalancePositionUpdate try { // validate the JSON object to see if any exception is thrown @@ -256,65 +258,65 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { "Input data does not match schema 'GreekUpdate'", e); } - // deserialize OrderTradeUpdate + // deserialize ListenKeyExpired try { // validate the JSON object to see if any exception is thrown - OrderTradeUpdate.validateJsonElement(jsonElement); - actualAdapter = adapterOrderTradeUpdate; + ListenKeyExpired.validateJsonElement(jsonElement); + actualAdapter = adapterListenKeyExpired; match++; log.log( Level.FINER, - "Input data matches schema 'OrderTradeUpdate'"); + "Input data matches schema 'ListenKeyExpired'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for OrderTradeUpdate failed with" + "Deserialization for ListenKeyExpired failed with" + " `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'OrderTradeUpdate'", + "Input data does not match schema 'ListenKeyExpired'", e); } - // deserialize RiskLevelChange + // deserialize OrderTradeUpdate try { // validate the JSON object to see if any exception is thrown - RiskLevelChange.validateJsonElement(jsonElement); - actualAdapter = adapterRiskLevelChange; + OrderTradeUpdate.validateJsonElement(jsonElement); + actualAdapter = adapterOrderTradeUpdate; match++; - log.log(Level.FINER, "Input data matches schema 'RiskLevelChange'"); + log.log( + Level.FINER, + "Input data matches schema 'OrderTradeUpdate'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for RiskLevelChange failed with" + "Deserialization for OrderTradeUpdate failed with" + " `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'RiskLevelChange'", + "Input data does not match schema 'OrderTradeUpdate'", e); } - // deserialize Listenkeyexpired + // deserialize RiskLevelChange try { // validate the JSON object to see if any exception is thrown - Listenkeyexpired.validateJsonElement(jsonElement); - actualAdapter = adapterListenkeyexpired; + RiskLevelChange.validateJsonElement(jsonElement); + actualAdapter = adapterRiskLevelChange; match++; - log.log( - Level.FINER, - "Input data matches schema 'Listenkeyexpired'"); + log.log(Level.FINER, "Input data matches schema 'RiskLevelChange'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for Listenkeyexpired failed with" + "Deserialization for RiskLevelChange failed with" + " `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'Listenkeyexpired'", + "Input data does not match schema 'RiskLevelChange'", e); } @@ -350,11 +352,12 @@ public UserDataStreamEventsResponse(Object o) { } static { + schemas.put("AccountUpdate", AccountUpdate.class); schemas.put("BalancePositionUpdate", BalancePositionUpdate.class); schemas.put("GreekUpdate", GreekUpdate.class); + schemas.put("ListenKeyExpired", ListenKeyExpired.class); schemas.put("OrderTradeUpdate", OrderTradeUpdate.class); schemas.put("RiskLevelChange", RiskLevelChange.class); - schemas.put("Listenkeyexpired", Listenkeyexpired.class); } @Override @@ -364,13 +367,18 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: BalancePositionUpdate, GreekUpdate, Listenkeyexpired, - * OrderTradeUpdate, RiskLevelChange + * against the oneOf child schemas: AccountUpdate, BalancePositionUpdate, GreekUpdate, + * ListenKeyExpired, OrderTradeUpdate, RiskLevelChange * *

It could be an instance of the 'oneOf' schemas. */ @Override public void setActualInstance(Object instance) { + if (instance instanceof AccountUpdate) { + super.setActualInstance(instance); + return; + } + if (instance instanceof BalancePositionUpdate) { super.setActualInstance(instance); return; @@ -381,32 +389,32 @@ public void setActualInstance(Object instance) { return; } - if (instance instanceof OrderTradeUpdate) { + if (instance instanceof ListenKeyExpired) { super.setActualInstance(instance); return; } - if (instance instanceof RiskLevelChange) { + if (instance instanceof OrderTradeUpdate) { super.setActualInstance(instance); return; } - if (instance instanceof Listenkeyexpired) { + if (instance instanceof RiskLevelChange) { super.setActualInstance(instance); return; } throw new RuntimeException( - "Invalid instance type. Must be BalancePositionUpdate, GreekUpdate," - + " Listenkeyexpired, OrderTradeUpdate, RiskLevelChange"); + "Invalid instance type. Must be AccountUpdate, BalancePositionUpdate, GreekUpdate," + + " ListenKeyExpired, OrderTradeUpdate, RiskLevelChange"); } /** - * Get the actual instance, which can be the following: BalancePositionUpdate, GreekUpdate, - * Listenkeyexpired, OrderTradeUpdate, RiskLevelChange + * Get the actual instance, which can be the following: AccountUpdate, BalancePositionUpdate, + * GreekUpdate, ListenKeyExpired, OrderTradeUpdate, RiskLevelChange * - * @return The actual instance (BalancePositionUpdate, GreekUpdate, Listenkeyexpired, - * OrderTradeUpdate, RiskLevelChange) + * @return The actual instance (AccountUpdate, BalancePositionUpdate, GreekUpdate, + * ListenKeyExpired, OrderTradeUpdate, RiskLevelChange) */ @SuppressWarnings("unchecked") @Override @@ -414,6 +422,17 @@ public Object getActualInstance() { return super.getActualInstance(); } + /** + * Get the actual instance of `AccountUpdate`. If the actual instance is not `AccountUpdate`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AccountUpdate` + * @throws ClassCastException if the instance is not `AccountUpdate` + */ + public AccountUpdate getAccountUpdate() throws ClassCastException { + return (AccountUpdate) super.getActualInstance(); + } + /** * Get the actual instance of `BalancePositionUpdate`. If the actual instance is not * `BalancePositionUpdate`, the ClassCastException will be thrown. @@ -436,6 +455,17 @@ public GreekUpdate getGreekUpdate() throws ClassCastException { return (GreekUpdate) super.getActualInstance(); } + /** + * Get the actual instance of `ListenKeyExpired`. If the actual instance is not + * `ListenKeyExpired`, the ClassCastException will be thrown. + * + * @return The actual instance of `ListenKeyExpired` + * @throws ClassCastException if the instance is not `ListenKeyExpired` + */ + public ListenKeyExpired getListenKeyExpired() throws ClassCastException { + return (ListenKeyExpired) super.getActualInstance(); + } + /** * Get the actual instance of `OrderTradeUpdate`. If the actual instance is not * `OrderTradeUpdate`, the ClassCastException will be thrown. @@ -458,17 +488,6 @@ public RiskLevelChange getRiskLevelChange() throws ClassCastException { return (RiskLevelChange) super.getActualInstance(); } - /** - * Get the actual instance of `Listenkeyexpired`. If the actual instance is not - * `Listenkeyexpired`, the ClassCastException will be thrown. - * - * @return The actual instance of `Listenkeyexpired` - * @throws ClassCastException if the instance is not `Listenkeyexpired` - */ - public Listenkeyexpired getListenkeyexpired() throws ClassCastException { - return (Listenkeyexpired) super.getActualInstance(); - } - /** * Validates the JSON Element and throws an exception if issues found * @@ -480,6 +499,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate oneOf schemas one by one int validCount = 0; ArrayList errorMessages = new ArrayList<>(); + // validate the json string with AccountUpdate + try { + AccountUpdate.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for AccountUpdate failed with `%s`.", e.getMessage())); + // continue to the next one + } // validate the json string with BalancePositionUpdate try { BalancePositionUpdate.validateJsonElement(jsonElement); @@ -501,36 +530,36 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Deserialization for GreekUpdate failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with OrderTradeUpdate + // validate the json string with ListenKeyExpired try { - OrderTradeUpdate.validateJsonElement(jsonElement); + ListenKeyExpired.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for OrderTradeUpdate failed with `%s`.", + "Deserialization for ListenKeyExpired failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with RiskLevelChange + // validate the json string with OrderTradeUpdate try { - RiskLevelChange.validateJsonElement(jsonElement); + OrderTradeUpdate.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for RiskLevelChange failed with `%s`.", + "Deserialization for OrderTradeUpdate failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Listenkeyexpired + // validate the json string with RiskLevelChange try { - Listenkeyexpired.validateJsonElement(jsonElement); + RiskLevelChange.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for Listenkeyexpired failed with `%s`.", + "Deserialization for RiskLevelChange failed with `%s`.", e.getMessage())); // continue to the next one } @@ -538,10 +567,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IOException( String.format( "The JSON string is invalid for UserDataStreamEventsResponse with oneOf" - + " schemas: BalancePositionUpdate, GreekUpdate, Listenkeyexpired," - + " OrderTradeUpdate, RiskLevelChange. %d class(es) match the" - + " result, expected 1. Detailed failure message for oneOf schemas:" - + " %s. JSON: %s", + + " schemas: AccountUpdate, BalancePositionUpdate, GreekUpdate," + + " ListenKeyExpired, OrderTradeUpdate, RiskLevelChange. %d" + + " class(es) match the result, expected 1. Detailed failure" + + " message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/AccountApiTest.java b/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/AccountApiTest.java index 5f57892ec..2b20a8936 100644 --- a/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/AccountApiTest.java +++ b/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/AccountApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -24,8 +24,10 @@ import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; import com.binance.connector.client.derivatives_trading_options.rest.model.AccountFundingFlowResponse; +import com.binance.connector.client.derivatives_trading_options.rest.model.Currency; import com.binance.connector.client.derivatives_trading_options.rest.model.OptionMarginAccountInformationResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -79,17 +81,18 @@ public void initApiClient() throws ApiException { /** * Account Funding Flow (USER_DATA) * - *

Query account funding flows. Weight: 1 + *

Query account funding flows. Weight(IP): 1 Security Type: USER_DATA Notes: - Only support + * querying data in the past 3 months * * @throws ApiException if the Api call fails */ @Test - public void accountFundingFlowTest() throws ApiException, CryptoException { - String currency = ""; - Long recordId = 1L; + public void accountFundingFlowTest() throws ApiException, CryptoException, IOException { + Currency currency = Currency.USDT; + Long recordId = 100000L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 20L; Long recvWindow = 5000L; ApiResponse response = api.accountFundingFlow(currency, recordId, startTime, endTime, limit, recvWindow); @@ -104,21 +107,22 @@ public void accountFundingFlowTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("currency=&recordId=1&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("currency=USDT&recordId=100000&startTime=1623319461670&endTime=1641782889000&limit=20&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "f0086e9f3895b2783af30133a64c5d01c9b045c0032c9eea19078ecf24771e9d", actualRequest.url().queryParameter("signature")); + "85cc8f051d30b5b14b5a6cc4c0782d4e692c05485d3026835dd7b0de4fd06a8c", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/bill", actualRequest.url().encodedPath()); } /** * Option Margin Account Information (USER_DATA) * - *

Get current account information. Weight: 3 + *

Get current account information. Weight(IP): 3 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void optionMarginAccountInformationTest() throws ApiException, CryptoException { + public void optionMarginAccountInformationTest() + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.optionMarginAccountInformation(recvWindow); diff --git a/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketDataApiTest.java b/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketDataApiTest.java index daf347ef2..12d086df8 100644 --- a/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketDataApiTest.java +++ b/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketDataApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -27,6 +27,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.model.ExchangeInformationResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.HistoricalExerciseRecordsResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.IndexPriceResponse; +import com.binance.connector.client.derivatives_trading_options.rest.model.Interval; import com.binance.connector.client.derivatives_trading_options.rest.model.KlineCandlestickDataResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.OpenInterestResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.OptionMarkPriceResponse; @@ -35,6 +36,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.model.RecentTradesListResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.Ticker24hrPriceChangeStatisticsResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -88,12 +90,12 @@ public void initApiClient() throws ApiException { /** * Check Server Time * - *

Test connectivity to the Rest API and get the current server time. Weight: 1 + *

Test connectivity to the Rest API and get the current server time. Weight(IP): 1 * * @throws ApiException if the Api call fails */ @Test - public void checkServerTimeTest() throws ApiException, CryptoException { + public void checkServerTimeTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.checkServerTime(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -111,12 +113,12 @@ public void checkServerTimeTest() throws ApiException, CryptoException { /** * Exchange Information * - *

Current exchange trading rules and symbol information Weight: 1 + *

Current exchange trading rules and symbol information Weight(IP): 1 * * @throws ApiException if the Api call fails */ @Test - public void exchangeInformationTest() throws ApiException, CryptoException { + public void exchangeInformationTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.exchangeInformation(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -135,16 +137,16 @@ public void exchangeInformationTest() throws ApiException, CryptoException { * Historical Exercise Records * *

Get historical exercise records. * REALISTIC_VALUE_STRICKEN -> Exercised * - * EXTRINSIC_VALUE_EXPIRED -> Expired OTM Weight: 3 + * EXTRINSIC_VALUE_EXPIRED -> Expired OTM Weight(IP): 3 * * @throws ApiException if the Api call fails */ @Test - public void historicalExerciseRecordsTest() throws ApiException, CryptoException { - String underlying = ""; + public void historicalExerciseRecordsTest() throws ApiException, CryptoException, IOException { + String underlying = "BTCUSDT"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 20L; ApiResponse response = api.historicalExerciseRecords(underlying, startTime, endTime, limit); @@ -164,13 +166,13 @@ public void historicalExerciseRecordsTest() throws ApiException, CryptoException /** * Index Price * - *

Get spot index price for option underlying. Weight: 1 + *

Get spot index price for option underlying. Weight(IP): 1 * * @throws ApiException if the Api call fails */ @Test - public void indexPriceTest() throws ApiException, CryptoException { - String underlying = ""; + public void indexPriceTest() throws ApiException, CryptoException, IOException { + String underlying = "BTCUSDT"; ApiResponse response = api.indexPrice(underlying); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -188,17 +190,18 @@ public void indexPriceTest() throws ApiException, CryptoException { * Kline/Candlestick Data * *

Kline/candlestick bars for an option symbol. Klines are uniquely identified by their open - * time. * If startTime and endTime are not sent, the most recent klines are returned. Weight: 1 + * time. Weight(IP): 1 Notes: - If startTime and endTime are not sent, the most recent klines + * are returned. * * @throws ApiException if the Api call fails */ @Test - public void klineCandlestickDataTest() throws ApiException, CryptoException { - String symbol = ""; - String interval = ""; + public void klineCandlestickDataTest() throws ApiException, CryptoException, IOException { + String symbol = "BTC-200730-9000-C"; + Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 20L; ApiResponse response = api.klineCandlestickData(symbol, interval, startTime, endTime, limit); @@ -218,14 +221,14 @@ public void klineCandlestickDataTest() throws ApiException, CryptoException { /** * Open Interest * - *

Get open interest for specific underlying asset on specific expiration date. Weight: 0 + *

Get open interest for specific underlying asset on specific expiration date. Weight(IP): 0 * * @throws ApiException if the Api call fails */ @Test - public void openInterestTest() throws ApiException, CryptoException { - String underlyingAsset = ""; - String expiration = ""; + public void openInterestTest() throws ApiException, CryptoException, IOException { + String underlyingAsset = "ETH/BTC"; + String expiration = "221225"; ApiResponse response = api.openInterest(underlyingAsset, expiration); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -242,13 +245,13 @@ public void openInterestTest() throws ApiException, CryptoException { /** * Option Mark Price * - *

Option mark price and greek info. Weight: 5 + *

Option mark price and greek info. Weight(IP): 5 * * @throws ApiException if the Api call fails */ @Test - public void optionMarkPriceTest() throws ApiException, CryptoException { - String symbol = ""; + public void optionMarkPriceTest() throws ApiException, CryptoException, IOException { + String symbol = "BTC-200730-9000-C"; ApiResponse response = api.optionMarkPrice(symbol); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -272,9 +275,9 @@ public void optionMarkPriceTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void orderBookTest() throws ApiException, CryptoException { - String symbol = ""; - Long limit = 100L; + public void orderBookTest() throws ApiException, CryptoException, IOException { + String symbol = "BTC-200730-9000-C"; + Long limit = 20L; ApiResponse response = api.orderBook(symbol, limit); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -291,14 +294,14 @@ public void orderBookTest() throws ApiException, CryptoException { /** * Recent Block Trades List * - *

Get recent block trades Weight: 5 + *

Get recent block trades Weight(IP): 5 * * @throws ApiException if the Api call fails */ @Test - public void recentBlockTradesListTest() throws ApiException, CryptoException { - String symbol = ""; - Long limit = 100L; + public void recentBlockTradesListTest() throws ApiException, CryptoException, IOException { + String symbol = "BTC-200730-9000-C"; + Long limit = 20L; ApiResponse response = api.recentBlockTradesList(symbol, limit); @@ -318,14 +321,14 @@ public void recentBlockTradesListTest() throws ApiException, CryptoException { /** * Recent Trades List * - *

Get recent market trades Weight: 5 + *

Get recent market trades Weight(IP): 5 * * @throws ApiException if the Api call fails */ @Test - public void recentTradesListTest() throws ApiException, CryptoException { - String symbol = ""; - Long limit = 100L; + public void recentTradesListTest() throws ApiException, CryptoException, IOException { + String symbol = "BTC-200730-9000-C"; + Long limit = 20L; ApiResponse response = api.recentTradesList(symbol, limit); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -343,12 +346,12 @@ public void recentTradesListTest() throws ApiException, CryptoException { /** * Test Connectivity * - *

Test connectivity to the Rest API. Weight: 1 + *

Test connectivity to the Rest API. Weight(IP): 1 * * @throws ApiException if the Api call fails */ @Test - public void testConnectivityTest() throws ApiException, CryptoException { + public void testConnectivityTest() throws ApiException, CryptoException, IOException { api.testConnectivity(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -365,13 +368,14 @@ public void testConnectivityTest() throws ApiException, CryptoException { /** * 24hr Ticker Price Change Statistics * - *

24 hour rolling window price change statistics. Weight: 5 + *

24 hour rolling window price change statistics. Weight(IP): 5 * * @throws ApiException if the Api call fails */ @Test - public void ticker24hrPriceChangeStatisticsTest() throws ApiException, CryptoException { - String symbol = ""; + public void ticker24hrPriceChangeStatisticsTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTC-200730-9000-C"; ApiResponse response = api.ticker24hrPriceChangeStatistics(symbol); diff --git a/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerBlockTradeApiTest.java b/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerBlockTradeApiTest.java index acc72339a..e11e76039 100644 --- a/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerBlockTradeApiTest.java +++ b/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerBlockTradeApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -29,10 +29,13 @@ import com.binance.connector.client.derivatives_trading_options.rest.model.ExtendBlockTradeOrderRequest; import com.binance.connector.client.derivatives_trading_options.rest.model.ExtendBlockTradeOrderResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.Legs; +import com.binance.connector.client.derivatives_trading_options.rest.model.Liquidity; import com.binance.connector.client.derivatives_trading_options.rest.model.NewBlockTradeOrderRequest; import com.binance.connector.client.derivatives_trading_options.rest.model.NewBlockTradeOrderResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.QueryBlockTradeDetailsResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.QueryBlockTradeOrderResponse; +import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -41,7 +44,7 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mockito; -/** API tests for BlockTradeApi */ +/** API tests for MarketMakerBlockTradeApi */ public class MarketMakerBlockTradeApiTest { private MarketMakerBlockTradeApi api; @@ -86,15 +89,15 @@ public void initApiClient() throws ApiException { /** * Accept Block Trade Order (TRADE) * - *

Accept a block trade order Weight: 5 + *

Accept a block trade order Weight(IP): 5 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void acceptBlockTradeOrderTest() throws ApiException, CryptoException { + public void acceptBlockTradeOrderTest() throws ApiException, CryptoException, IOException { AcceptBlockTradeOrderRequest acceptBlockTradeOrderRequest = new AcceptBlockTradeOrderRequest(); - acceptBlockTradeOrderRequest.blockOrderMatchingKey(""); + acceptBlockTradeOrderRequest.blockOrderMatchingKey("7d046e6e-a429-4335-ab9d-6a681febcde5"); ApiResponse response = api.acceptBlockTradeOrder(acceptBlockTradeOrderRequest); @@ -109,9 +112,9 @@ public void acceptBlockTradeOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000blockOrderMatchingKey=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000blockOrderMatchingKey=7d046e6e-a429-4335-ab9d-6a681febcde5", signInputCaptor.getValue()); assertEquals( - "d7779041fe175cc7ddb8035e21c7ed57583e4398e9dc5b99610e2e0ca442944a", + "4e58241bb580c0a3a3bfaa2ec833f58409c4da966d3ad729edc335fa4869afde", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/block/order/execute", actualRequest.url().encodedPath()); } @@ -119,15 +122,15 @@ public void acceptBlockTradeOrderTest() throws ApiException, CryptoException { /** * Account Block Trade List (USER_DATA) * - *

Gets block trades for a specific account. Weight: 5 + *

Gets block trades for a specific account. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void accountBlockTradeListTest() throws ApiException, CryptoException { + public void accountBlockTradeListTest() throws ApiException, CryptoException, IOException { Long endTime = 1641782889000L; Long startTime = 1623319461670L; - String underlying = ""; + String underlying = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.accountBlockTradeList(endTime, startTime, underlying, recvWindow); @@ -138,12 +141,13 @@ public void accountBlockTradeListTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("endTime=1641782889000&startTime=1623319461670&underlying=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("endTime=1641782889000&startTime=1623319461670&underlying=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "933e8ed3a3cfc481c957b452740b714628caeb1ad91262ed96e251eff4b8bd3f", + "0cb9ee3a76f6a30d5010f75457047e2805835e853f26970a9a430e64d846d7a2", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/block/user-trades", actualRequest.url().encodedPath()); } @@ -151,13 +155,13 @@ public void accountBlockTradeListTest() throws ApiException, CryptoException { /** * Cancel Block Trade Order (TRADE) * - *

Cancel a block trade order. Weight: 5 + *

Cancel a block trade order. Weight(IP): 5 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void cancelBlockTradeOrderTest() throws ApiException, CryptoException { - String blockOrderMatchingKey = ""; + public void cancelBlockTradeOrderTest() throws ApiException, CryptoException, IOException { + String blockOrderMatchingKey = "7d046e6e-a429-4335-ab9d-6a681febcde5"; Long recvWindow = 5000L; api.cancelBlockTradeOrder(blockOrderMatchingKey, recvWindow); @@ -170,9 +174,9 @@ public void cancelBlockTradeOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("blockOrderMatchingKey=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("blockOrderMatchingKey=7d046e6e-a429-4335-ab9d-6a681febcde5&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "ae708c39578286d9f327c8abc95624dc3cc9d4999587112e264986264a52088a", + "0a86aed78bf68d702e4e07d5ca3ad3eaea2bfdc9950f58450b14352159b66e9e", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/block/order/create", actualRequest.url().encodedPath()); } @@ -180,15 +184,16 @@ public void cancelBlockTradeOrderTest() throws ApiException, CryptoException { /** * Extend Block Trade Order (TRADE) * - *

Extends a block trade expire time by 30 mins from the current time. Weight: 5 + *

Extends a block trade expire time by 30 mins from the current time. Weight(IP): 5 Security + * Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void extendBlockTradeOrderTest() throws ApiException, CryptoException { + public void extendBlockTradeOrderTest() throws ApiException, CryptoException, IOException { ExtendBlockTradeOrderRequest extendBlockTradeOrderRequest = new ExtendBlockTradeOrderRequest(); - extendBlockTradeOrderRequest.blockOrderMatchingKey(""); + extendBlockTradeOrderRequest.blockOrderMatchingKey("3668822b8-1baa-6a2f-adb8-d3de6289b361"); ApiResponse response = api.extendBlockTradeOrder(extendBlockTradeOrderRequest); @@ -203,9 +208,9 @@ public void extendBlockTradeOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000blockOrderMatchingKey=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000blockOrderMatchingKey=3668822b8-1baa-6a2f-adb8-d3de6289b361", signInputCaptor.getValue()); assertEquals( - "d7779041fe175cc7ddb8035e21c7ed57583e4398e9dc5b99610e2e0ca442944a", + "3ba21e2b997c458e11934c6d75448af13c5b070052ea0391432be5bbeafb0a77", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/block/order/create", actualRequest.url().encodedPath()); } @@ -213,14 +218,14 @@ public void extendBlockTradeOrderTest() throws ApiException, CryptoException { /** * New Block Trade Order (TRADE) * - *

Send in a new block trade order. Weight: 5 + *

Send in a new block trade order. Weight(IP): 5 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void newBlockTradeOrderTest() throws ApiException, CryptoException { + public void newBlockTradeOrderTest() throws ApiException, CryptoException, IOException { NewBlockTradeOrderRequest newBlockTradeOrderRequest = new NewBlockTradeOrderRequest(); - newBlockTradeOrderRequest.liquidity(""); + newBlockTradeOrderRequest.liquidity(Liquidity.MAKER); newBlockTradeOrderRequest.legs(new Legs()); ApiResponse response = @@ -236,9 +241,9 @@ public void newBlockTradeOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000legs=%5B%5D&liquidity=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000legs=%5B%5D&liquidity=MAKER", signInputCaptor.getValue()); assertEquals( - "bfcdb97917945619131835baab3105074db01c428177e5af5122331605bf3cb8", actualRequest.url().queryParameter("signature")); + "23e0130a53d84460ade77405ef0ccad16e478b80ff00a83c48535a547200038b", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/block/order/create", actualRequest.url().encodedPath()); } @@ -246,13 +251,13 @@ public void newBlockTradeOrderTest() throws ApiException, CryptoException { * Query Block Trade Details (USER_DATA) * *

Query block trade details; returns block trade details from counterparty's - * perspective. Weight: 5 + * perspective. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryBlockTradeDetailsTest() throws ApiException, CryptoException { - String blockOrderMatchingKey = ""; + public void queryBlockTradeDetailsTest() throws ApiException, CryptoException, IOException { + String blockOrderMatchingKey = "12b96c28-ba05-8906-c89t-703215cfb2e6"; Long recvWindow = 5000L; ApiResponse response = api.queryBlockTradeDetails(blockOrderMatchingKey, recvWindow); @@ -267,9 +272,9 @@ public void queryBlockTradeDetailsTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("blockOrderMatchingKey=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("blockOrderMatchingKey=12b96c28-ba05-8906-c89t-703215cfb2e6&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "ae708c39578286d9f327c8abc95624dc3cc9d4999587112e264986264a52088a", + "6e6f8ffac81515a2053d62b48befd6ca7f79112ad9cd6400a2cdfe7b58bb89ee", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/block/order/execute", actualRequest.url().encodedPath()); } @@ -277,16 +282,16 @@ public void queryBlockTradeDetailsTest() throws ApiException, CryptoException { /** * Query Block Trade Order (TRADE) * - *

Check block trade order status. Weight: 5 + *

Check block trade order status. Weight(IP): 5 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void queryBlockTradeOrderTest() throws ApiException, CryptoException { - String blockOrderMatchingKey = ""; + public void queryBlockTradeOrderTest() throws ApiException, CryptoException, IOException { + String blockOrderMatchingKey = "7d046e6e-a429-4335-ab9d-6a681febcde5"; Long endTime = 1641782889000L; Long startTime = 1623319461670L; - String underlying = ""; + String underlying = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.queryBlockTradeOrder( @@ -302,9 +307,9 @@ public void queryBlockTradeOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("blockOrderMatchingKey=&endTime=1641782889000&startTime=1623319461670&underlying=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("blockOrderMatchingKey=7d046e6e-a429-4335-ab9d-6a681febcde5&endTime=1641782889000&startTime=1623319461670&underlying=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "12052ae669c254b370aeed981dae5ab6e617de9427448d3232d92d0506899440", + "dc503313092ce33e72a18f1b05444f56e21774d639d5c05c67a6e95fccd604c9", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/block/order/orders", actualRequest.url().encodedPath()); } diff --git a/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerEndpointsApiTest.java b/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerEndpointsApiTest.java index ce3f44622..87e4e8651 100644 --- a/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerEndpointsApiTest.java +++ b/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerEndpointsApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -34,6 +34,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.model.SetMarketMakerProtectionConfigRequest; import com.binance.connector.client.derivatives_trading_options.rest.model.SetMarketMakerProtectionConfigResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -90,16 +91,16 @@ public void initApiClient() throws ApiException { *

This endpoint resets the time from which the countdown will begin to the time this * messaged is received. It should be called repeatedly as heartbeats. Multiple heartbeats can * be updated at once by specifying the underlying symbols as a list (ex. BTCUSDT,ETHUSDT) in - * the underlyings parameter. * The response will only include underlying symbols where the - * heartbeat has been successfully updated. Weight: 10 + * the underlyings parameter. Weight(IP): 10 Security Type: TRADE Notes: - The response will + * only include underlying symbols where the heartbeat has been successfully updated. * * @throws ApiException if the Api call fails */ @Test - public void autoCancelAllOpenOrdersTest() throws ApiException, CryptoException { + public void autoCancelAllOpenOrdersTest() throws ApiException, CryptoException, IOException { AutoCancelAllOpenOrdersRequest autoCancelAllOpenOrdersRequest = new AutoCancelAllOpenOrdersRequest(); - autoCancelAllOpenOrdersRequest.underlyings(""); + autoCancelAllOpenOrdersRequest.underlyings("BTCUSDT,ETHUSDT"); ApiResponse response = api.autoCancelAllOpenOrders(autoCancelAllOpenOrdersRequest); @@ -114,9 +115,9 @@ public void autoCancelAllOpenOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000underlyings=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000underlyings=BTCUSDT%2CETHUSDT", signInputCaptor.getValue()); assertEquals( - "b0a783c7757273453a4b860469d3051ab1ebf8dec4a85306ec4cd7dd169a68bd", + "1ebb9c376492db3c3327e513d101c250e303b04f1c3e411924f61c00e5f45c96", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/countdownCancelAllHeartBeat", actualRequest.url().encodedPath()); } @@ -127,14 +128,14 @@ public void autoCancelAllOpenOrdersTest() throws ApiException, CryptoException { *

This endpoint returns the auto-cancel parameters for each underlying symbol. Note only * active auto-cancel parameters will be returned, if countdownTime is set to 0 (ie. * countdownTime has been turned off), the underlying symbol and corresponding countdownTime - * parameter will not be returned in the response. * countdownTime = 0 means the function - * is disabled. Weight: 1 + * parameter will not be returned in the response. Weight(IP): 1 Security Type: TRADE Notes: - + * countdownTime = 0 means the function is disabled. * * @throws ApiException if the Api call fails */ @Test - public void getAutoCancelAllOpenOrdersTest() throws ApiException, CryptoException { - String underlying = ""; + public void getAutoCancelAllOpenOrdersTest() throws ApiException, CryptoException, IOException { + String underlying = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.getAutoCancelAllOpenOrders(underlying, recvWindow); @@ -149,9 +150,9 @@ public void getAutoCancelAllOpenOrdersTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("underlying=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("underlying=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "b86106356cee58da83b1db58af2ff785ff31edb20e817cebe1782f91df7ddc12", + "d075b5b7e700b7c6bb344e5e944793012900ff9089fc4aeb2c9d02b6495f2f20", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/countdownCancelAll", actualRequest.url().encodedPath()); } @@ -159,13 +160,14 @@ public void getAutoCancelAllOpenOrdersTest() throws ApiException, CryptoExceptio /** * Get Market Maker Protection Config (TRADE) * - *

Get config for MMP. Weight: 1 + *

Get config for MMP. Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void getMarketMakerProtectionConfigTest() throws ApiException, CryptoException { - String underlying = ""; + public void getMarketMakerProtectionConfigTest() + throws ApiException, CryptoException, IOException { + String underlying = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.getMarketMakerProtectionConfig(underlying, recvWindow); @@ -180,9 +182,9 @@ public void getMarketMakerProtectionConfigTest() throws ApiException, CryptoExce Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("underlying=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("underlying=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "b86106356cee58da83b1db58af2ff785ff31edb20e817cebe1782f91df7ddc12", + "d075b5b7e700b7c6bb344e5e944793012900ff9089fc4aeb2c9d02b6495f2f20", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/mmp", actualRequest.url().encodedPath()); } @@ -190,14 +192,16 @@ public void getMarketMakerProtectionConfigTest() throws ApiException, CryptoExce /** * Reset Market Maker Protection Config (TRADE) * - *

Reset MMP, start MMP order again. Weight: 1 + *

Reset MMP, start MMP order again. Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void resetMarketMakerProtectionConfigTest() throws ApiException, CryptoException { + public void resetMarketMakerProtectionConfigTest() + throws ApiException, CryptoException, IOException { ResetMarketMakerProtectionConfigRequest resetMarketMakerProtectionConfigRequest = new ResetMarketMakerProtectionConfigRequest(); + resetMarketMakerProtectionConfigRequest.underlying("BTCUSDT"); ApiResponse response = api.resetMarketMakerProtectionConfig(resetMarketMakerProtectionConfigRequest); @@ -213,9 +217,9 @@ public void resetMarketMakerProtectionConfigTest() throws ApiException, CryptoEx Request actualRequest = captorValue.request(); assertEquals( - "timestamp=1736393892000", signInputCaptor.getValue()); + "timestamp=1736393892000underlying=BTCUSDT", signInputCaptor.getValue()); assertEquals( - "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", + "9a287d4e2dcbc6a1a645f68077afb1ffab2796edec53fe44d13b8066bb9dfa21", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/mmpReset", actualRequest.url().encodedPath()); } @@ -228,25 +232,25 @@ public void resetMarketMakerProtectionConfigTest() throws ApiException, CryptoEx * symbol at the end of the specified countdown time period if no heartbeat message is sent. * After the countdown time period, all open orders will be cancelled and new orders will be * rejected with error code -2010 until either a heartbeat message is sent or the auto-cancel - * feature is turned off by setting countdownTime to 0. * This rest endpoint sets up the - * parameters to cancel your open orders in case of an outage or disconnection. * Example usage: - * Call this endpoint with a countdownTime value of 10000 (10 seconds) to turn on the - * auto-cancel feature. If the corresponding countdownCancelAllHeartBeat endpoint is not called - * within 10 seconds with the specified underlying symbol, all open orders of the specified - * symbol will be automatically canceled. If this endpoint is called with an countdownTime of 0, - * the countdown timer will be stopped. * The system will check all countdowns approximately - * every 1000 milliseconds, **please note that sufficient redundancy should be considered when - * using this function**. We do not recommend setting the countdown time to be too precise or - * too small. Weight: 1 + * feature is turned off by setting countdownTime to 0. Weight(IP): 1 Security Type: TRADE + * Notes: - This rest endpoint sets up the parameters to cancel your open orders in case of an + * outage or disconnection. - Example usage: > Call this endpoint with a countdownTime value + * of 10000 (10 seconds) to turn on the auto-cancel feature. If the corresponding + * countdownCancelAllHeartBeat endpoint is not called within 10 seconds with the specified + * underlying symbol, all open orders of the specified symbol will be automatically canceled. If + * this endpoint is called with an countdownTime of 0, the countdown timer will be stopped. - + * The system will check all countdowns approximately every 100 milliseconds, **please note that + * sufficient redundancy should be considered when using this function**. We do not recommend + * setting the countdown time to be too precise or too small. * * @throws ApiException if the Api call fails */ @Test - public void setAutoCancelAllOpenOrdersTest() throws ApiException, CryptoException { + public void setAutoCancelAllOpenOrdersTest() throws ApiException, CryptoException, IOException { SetAutoCancelAllOpenOrdersRequest setAutoCancelAllOpenOrdersRequest = new SetAutoCancelAllOpenOrdersRequest(); - setAutoCancelAllOpenOrdersRequest.underlying(""); - setAutoCancelAllOpenOrdersRequest.countdownTime(0L); + setAutoCancelAllOpenOrdersRequest.underlying("BTCUSDT"); + setAutoCancelAllOpenOrdersRequest.countdownTime(5000L); ApiResponse response = api.setAutoCancelAllOpenOrders(setAutoCancelAllOpenOrdersRequest); @@ -261,9 +265,9 @@ public void setAutoCancelAllOpenOrdersTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000countdownTime=0&underlying=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000countdownTime=5000&underlying=BTCUSDT", signInputCaptor.getValue()); assertEquals( - "3ea20362d32987f98f76e76f49289f7848b16910aefdb250e574f5dd050aad4a", + "226b8f5b2257bf539c4e6f658ab0cb93aac0a7f8533934b8275557e75fa78640", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/countdownCancelAll", actualRequest.url().encodedPath()); } @@ -276,14 +280,20 @@ public void setAutoCancelAllOpenOrdersTest() throws ApiException, CryptoExceptio * Once market maker's account branches the threshold, the Market Maker Protection will be * triggered. When Market Maker Protection triggers, all the current MMP orders will be * canceled, new MMP orders will be rejected. Market maker can use this time to reevaluate - * market and modify order price. Weight: 1 + * market and modify order price. Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void setMarketMakerProtectionConfigTest() throws ApiException, CryptoException { + public void setMarketMakerProtectionConfigTest() + throws ApiException, CryptoException, IOException { SetMarketMakerProtectionConfigRequest setMarketMakerProtectionConfigRequest = new SetMarketMakerProtectionConfigRequest(); + setMarketMakerProtectionConfigRequest.underlying("BTCUSDT"); + setMarketMakerProtectionConfigRequest.windowTimeInMilliseconds(1000L); + setMarketMakerProtectionConfigRequest.frozenTimeInMilliseconds(1000L); + setMarketMakerProtectionConfigRequest.qtyLimit(1.0d); + setMarketMakerProtectionConfigRequest.deltaLimit(1.0d); ApiResponse response = api.setMarketMakerProtectionConfig(setMarketMakerProtectionConfigRequest); @@ -298,9 +308,9 @@ public void setMarketMakerProtectionConfigTest() throws ApiException, CryptoExce Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000frozenTimeInMilliseconds=1000&windowTimeInMilliseconds=1000&qtyLimit=1&underlying=BTCUSDT&deltaLimit=1", signInputCaptor.getValue()); assertEquals( - "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", + "1cab4ceefc619bad05c9cfc38020e0f3c8fe014a4ed842b61d5664022534f873", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/mmpSet", actualRequest.url().encodedPath()); } diff --git a/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/TradeApiTest.java b/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/TradeApiTest.java index f9eacec8d..40f33feed 100644 --- a/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/TradeApiTest.java +++ b/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/TradeApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -33,6 +33,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.model.NewOrderResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.OptionPositionInformationResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.OrderIds; +import com.binance.connector.client.derivatives_trading_options.rest.model.OrderType; import com.binance.connector.client.derivatives_trading_options.rest.model.Orders; import com.binance.connector.client.derivatives_trading_options.rest.model.PlaceMultipleOrdersRequest; import com.binance.connector.client.derivatives_trading_options.rest.model.PlaceMultipleOrdersResponse; @@ -40,9 +41,12 @@ import com.binance.connector.client.derivatives_trading_options.rest.model.QueryOptionOrderHistoryResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.QuerySingleOrderResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.Side; -import com.binance.connector.client.derivatives_trading_options.rest.model.Type; +import com.binance.connector.client.derivatives_trading_options.rest.model.TradfiOptionsContractRequest; +import com.binance.connector.client.derivatives_trading_options.rest.model.TradfiOptionsContractResponse; +import com.binance.connector.client.derivatives_trading_options.rest.model.UserCommissionResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.UserExerciseRecordResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -96,17 +100,17 @@ public void initApiClient() throws ApiException { /** * Account Trade List (USER_DATA) * - *

Get trades for a specific account and symbol. Weight: 5 + *

Get trades for a specific account and symbol. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void accountTradeListTest() throws ApiException, CryptoException { - String symbol = ""; + public void accountTradeListTest() throws ApiException, CryptoException, IOException { + String symbol = "BTC-200730-9000-C"; Long fromId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 20L; Long recvWindow = 5000L; ApiResponse response = api.accountTradeList(symbol, fromId, startTime, endTime, limit, recvWindow); @@ -121,22 +125,23 @@ public void accountTradeListTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&fromId=1&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTC-200730-9000-C&fromId=1&startTime=1623319461670&endTime=1641782889000&limit=20&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "e6c675628031b06a2cee642f08dd8c2ef4f300380d1b62eeeb68aa3dd76194f1", actualRequest.url().queryParameter("signature")); + "1dbe50a6cea1c286b3f674578e7ef8f90fd92d8d118db86fbe195f63e76a41d9", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/userTrades", actualRequest.url().encodedPath()); } /** * Cancel All Option Orders By Underlying (TRADE) * - *

Cancel all active orders on specified underlying. Weight: 1 + *

Cancel all active orders on specified underlying. Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void cancelAllOptionOrdersByUnderlyingTest() throws ApiException, CryptoException { - String underlying = ""; + public void cancelAllOptionOrdersByUnderlyingTest() + throws ApiException, CryptoException, IOException { + String underlying = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.cancelAllOptionOrdersByUnderlying(underlying, recvWindow); @@ -152,9 +157,9 @@ public void cancelAllOptionOrdersByUnderlyingTest() throws ApiException, CryptoE Request actualRequest = captorValue.request(); assertEquals( - "underlying=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + "underlying=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "b86106356cee58da83b1db58af2ff785ff31edb20e817cebe1782f91df7ddc12", + "d075b5b7e700b7c6bb344e5e944793012900ff9089fc4aeb2c9d02b6495f2f20", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/allOpenOrdersByUnderlying", actualRequest.url().encodedPath()); } @@ -162,13 +167,14 @@ public void cancelAllOptionOrdersByUnderlyingTest() throws ApiException, CryptoE /** * Cancel all Option orders on specific symbol (TRADE) * - *

Cancel all active order on a symbol. Weight: 5 + *

Cancel all active order on a symbol. Weight(IP): 5 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void cancelAllOptionOrdersOnSpecificSymbolTest() throws ApiException, CryptoException { - String symbol = ""; + public void cancelAllOptionOrdersOnSpecificSymbolTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTC-200730-9000-C"; Long recvWindow = 5000L; ApiResponse response = api.cancelAllOptionOrdersOnSpecificSymbol(symbol, recvWindow); @@ -184,10 +190,10 @@ public void cancelAllOptionOrdersOnSpecificSymbolTest() throws ApiException, Cry Request actualRequest = captorValue.request(); assertEquals( - "symbol=&recvWindow=5000×tamp=1736393892000", + "symbol=BTC-200730-9000-C&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "e9fb533126b1380a187a9dcd922a492ccf6f3e6c4d7a3cf69469c112ecee6ee2", actualRequest.url().queryParameter("signature")); assertEquals( "/eapi/v1/allOpenOrders", actualRequest.url().encodedPath()); @@ -196,16 +202,16 @@ public void cancelAllOptionOrdersOnSpecificSymbolTest() throws ApiException, Cry /** * Cancel Multiple Option Orders (TRADE) * - *

Cancel multiple orders. * At least one instance of `orderId` and - * `clientOrderId` must be sent. Weight: 1 + *

Cancel multiple orders. Weight(IP): 5 Security Type: TRADE Notes: - At least one instance + * of `orderId` and `clientOrderId` must be sent. * * @throws ApiException if the Api call fails */ @Test - public void cancelMultipleOptionOrdersTest() throws ApiException, CryptoException { - String symbol = ""; - OrderIds orderIds = null; - ClientOrderIds clientOrderIds = null; + public void cancelMultipleOptionOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTC-200730-9000-C"; + OrderIds orderIds = OrderIds.fromJson(""); + ClientOrderIds clientOrderIds = ClientOrderIds.fromJson(""); Long recvWindow = 5000L; ApiResponse response = api.cancelMultipleOptionOrders(symbol, orderIds, clientOrderIds, recvWindow); @@ -220,9 +226,9 @@ public void cancelMultipleOptionOrdersTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTC-200730-9000-C&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "e9fb533126b1380a187a9dcd922a492ccf6f3e6c4d7a3cf69469c112ecee6ee2", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/batchOrders", actualRequest.url().encodedPath()); } @@ -230,16 +236,16 @@ public void cancelMultipleOptionOrdersTest() throws ApiException, CryptoExceptio /** * Cancel Option Order (TRADE) * - *

Cancel an active order. * At least one instance of `orderId` and - * `clientOrderId` must be sent. Weight: 1 + *

Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - At least one instance + * of `orderId` and `clientOrderId` must be sent. * * @throws ApiException if the Api call fails */ @Test - public void cancelOptionOrderTest() throws ApiException, CryptoException { - String symbol = ""; - Long orderId = 1L; - String clientOrderId = "1"; + public void cancelOptionOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BTC-200730-9000-C"; + Long orderId = 4611875134427365000L; + String clientOrderId = "10000"; Long recvWindow = 5000L; ApiResponse response = api.cancelOptionOrder(symbol, orderId, clientOrderId, recvWindow); @@ -254,25 +260,27 @@ public void cancelOptionOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&orderId=1&clientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTC-200730-9000-C&orderId=4611875134427365000&clientOrderId=10000&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "22bb4aab5007bdfe2006035e30f7f5fe51b409e0fd3e500e4d31970b67154176", actualRequest.url().queryParameter("signature")); + "79c073659d2b5a51a7033c935a142d6f0bbed51008b72b31b8acd2d7d4d186e6", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/order", actualRequest.url().encodedPath()); } /** * New Order (TRADE) * - *

Send a new order. Weight: 0 + *

Send a new order. Security Type: TRADE Notes: Some parameters are mandatory depending on + * the order type as follows: Type | Mandatory parameters ------------ | ------------ LIMIT | + * timeInForce, quantity, price * * @throws ApiException if the Api call fails */ @Test - public void newOrderTest() throws ApiException, CryptoException { + public void newOrderTest() throws ApiException, CryptoException, IOException { NewOrderRequest newOrderRequest = new NewOrderRequest(); - newOrderRequest.symbol(""); + newOrderRequest.symbol("BTC-200730-9000-C"); newOrderRequest.side(Side.BUY); - newOrderRequest.type(Type.LIMIT); + newOrderRequest.type(OrderType.LIMIT); newOrderRequest.quantity(1.0d); ApiResponse response = api.newOrder(newOrderRequest); @@ -287,21 +295,21 @@ public void newOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000symbol=&side=BUY&quantity=1&type=LIMIT", signInputCaptor.getValue()); - assertEquals("bd7c3ca01fc9cf18bcbcb549be33525c3f9d56758986c3b229f2a0784fdf9232", actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000postOnly=false&symbol=BTC-200730-9000-C&side=BUY&quantity=1&reduceOnly=false&newOrderRespType=ACK&type=LIMIT&timeInForce=GTC", signInputCaptor.getValue()); + assertEquals("321a0edb87e260766358c165667bfa76114e38305a7a63ae1cd30b058a926f16", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/order", actualRequest.url().encodedPath()); } /** * Option Position Information (USER_DATA) * - *

Get current position information. Weight: 5 + *

Get current position information. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void optionPositionInformationTest() throws ApiException, CryptoException { - String symbol = ""; + public void optionPositionInformationTest() throws ApiException, CryptoException, IOException { + String symbol = "BTC-200730-9000-C"; Long recvWindow = 5000L; ApiResponse response = api.optionPositionInformation(symbol, recvWindow); @@ -316,23 +324,25 @@ public void optionPositionInformationTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTC-200730-9000-C&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "e9fb533126b1380a187a9dcd922a492ccf6f3e6c4d7a3cf69469c112ecee6ee2", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/position", actualRequest.url().encodedPath()); } /** - * Place Multiple Orders(TRADE) + * Place Multiple Orders (TRADE) * - *

Send multiple option orders. * Parameter rules are same with New Order * Batch orders are - * processed concurrently, and the order of matching is not guaranteed. Weight: 5 + *

Send multiple option orders. Weight(IP): 5 Security Type: TRADE Notes: Some parameters are + * mandatory depending on the order type as follows: Type | Mandatory parameters ------------ | + * ------------ LIMIT | timeInForce, quantity, price - Parameter rules are same with New Order - + * Batch orders are processed concurrently, and the order of matching is not guaranteed. * * @throws ApiException if the Api call fails */ @Test - public void placeMultipleOrdersTest() throws ApiException, CryptoException { + public void placeMultipleOrdersTest() throws ApiException, CryptoException, IOException { PlaceMultipleOrdersRequest placeMultipleOrdersRequest = new PlaceMultipleOrdersRequest(); placeMultipleOrdersRequest.orders(new Orders()); @@ -359,14 +369,15 @@ public void placeMultipleOrdersTest() throws ApiException, CryptoException { * Query Current Open Option Orders (USER_DATA) * *

Query current all open orders, status: ACCEPTED PARTIALLY_FILLED Weight: 1 for a single - * symbol; 40 when the symbol parameter is omitted + * symbol; 40 when the symbol parameter is omitted Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryCurrentOpenOptionOrdersTest() throws ApiException, CryptoException { - String symbol = ""; - Long orderId = 1L; + public void queryCurrentOpenOptionOrdersTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTC-200730-9000-C"; + Long orderId = 4611875134427365000L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; @@ -383,9 +394,9 @@ public void queryCurrentOpenOptionOrdersTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&orderId=1&startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTC-200730-9000-C&orderId=4611875134427365000&startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "51e9f45d125dacba55909402a133899dd5f0956cd707d8d24ff372c34f5a8155", + "d9c03fbc0fd57da19a72bdb27ca4318362e2d36beb81689703aa3530b3ffb43b", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/openOrders", actualRequest.url().encodedPath()); } @@ -394,17 +405,17 @@ public void queryCurrentOpenOptionOrdersTest() throws ApiException, CryptoExcept * Query Option Order History (TRADE) * *

Query all finished orders within 5 days, finished status: CANCELLED FILLED REJECTED. - * Weight: 3 + * Weight(IP): 3 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void queryOptionOrderHistoryTest() throws ApiException, CryptoException { - String symbol = ""; - Long orderId = 1L; + public void queryOptionOrderHistoryTest() throws ApiException, CryptoException, IOException { + String symbol = "BTC-200730-9000-C"; + Long orderId = 4611875134427365000L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 20L; Long recvWindow = 5000L; ApiResponse response = api.queryOptionOrderHistory(symbol, orderId, startTime, endTime, limit, recvWindow); @@ -419,9 +430,9 @@ public void queryOptionOrderHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&orderId=1&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTC-200730-9000-C&orderId=4611875134427365000&startTime=1623319461670&endTime=1641782889000&limit=20&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "dc0808314025fc813dcde0328cd6754c982d28888760fc74b17e072087eb4895", + "7dd51f339fcacbbcc0605782a5bf44e72263a6abada2a0ee836c3fa54582d099", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/historyOrders", actualRequest.url().encodedPath()); } @@ -431,16 +442,16 @@ public void queryOptionOrderHistoryTest() throws ApiException, CryptoException { * *

Check an order status. * These orders will not be found: * order status is * `CANCELED` or `REJECTED`, **AND** * order has NO filled trade, **AND** * - * created time + 3 days < current time * Either `orderId` or `clientOrderId - * ` must be sent. Weight: 1 + * created time + 3 days < current time Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `clientOrderId ` must be sent. * * @throws ApiException if the Api call fails */ @Test - public void querySingleOrderTest() throws ApiException, CryptoException { - String symbol = ""; - Long orderId = 1L; - String clientOrderId = "1"; + public void querySingleOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BTC-200730-9000-C"; + Long orderId = 4611875134427365000L; + String clientOrderId = "abc123"; Long recvWindow = 5000L; ApiResponse response = api.querySingleOrder(symbol, orderId, clientOrderId, recvWindow); @@ -455,25 +466,84 @@ public void querySingleOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&orderId=1&clientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTC-200730-9000-C&orderId=4611875134427365000&clientOrderId=abc123&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "22bb4aab5007bdfe2006035e30f7f5fe51b409e0fd3e500e4d31970b67154176", actualRequest.url().queryParameter("signature")); + "7994ed1c0e43900900d80fcb7848ca79c3a86e32f87267da10e9fc39c98c9a52", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/order", actualRequest.url().encodedPath()); } + /** + * TradFi Options Contract (USER_DATA) + * + *

Sign TradFi Options agreement contract Weight(IP): 50 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void tradfiOptionsContractTest() throws ApiException, CryptoException, IOException { + TradfiOptionsContractRequest tradfiOptionsContractRequest = + new TradfiOptionsContractRequest(); + + ApiResponse response = + api.tradfiOptionsContract(tradfiOptionsContractRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", + actualRequest.url().queryParameter("signature")); + assertEquals("/eapi/v1/stock/contract", actualRequest.url().encodedPath()); + } + + /** + * User Commission (USER_DATA) + * + *

Get account commission. Weight(IP): 5 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void userCommissionTest() throws ApiException, CryptoException, IOException { + Long recvWindow = 5000L; + ApiResponse response = api.userCommission(recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); + assertEquals("/eapi/v1/commission", actualRequest.url().encodedPath()); + } + /** * User Exercise Record (USER_DATA) * - *

Get account exercise records. Weight: 5 + *

Get account exercise records. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void userExerciseRecordTest() throws ApiException, CryptoException { - String symbol = ""; + public void userExerciseRecordTest() throws ApiException, CryptoException, IOException { + String symbol = "BTC-200730-9000-C"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 20L; Long recvWindow = 5000L; ApiResponse response = api.userExerciseRecord(symbol, startTime, endTime, limit, recvWindow); @@ -488,9 +558,9 @@ public void userExerciseRecordTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTC-200730-9000-C&startTime=1623319461670&endTime=1641782889000&limit=20&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "3d9795ecfdb1326d191e1c4777f0f21d3abe1b7efbde9431ba818a057bd1dd7f", actualRequest.url().queryParameter("signature")); + "3c7dee77b6e1738c50cfae5f1f6292eafafe1378c86493bee4f1cc0449502590", actualRequest.url().queryParameter("signature")); assertEquals("/eapi/v1/exerciseRecord", actualRequest.url().encodedPath()); } } diff --git a/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/UserDataStreamsApiTest.java b/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/UserDataStreamsApiTest.java index 65928b4b1..a646a15d1 100644 --- a/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/UserDataStreamsApiTest.java +++ b/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/rest/api/UserDataStreamsApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Options REST API - * OpenAPI Specification for the Binance Derivatives Trading Options REST API + * Options REST API + * Access market data, manage accounts, and trade Binance Options. * * The version of the OpenAPI document: 1.0.0 * @@ -25,6 +25,7 @@ import com.binance.connector.client.common.sign.SignatureGenerator; import com.binance.connector.client.derivatives_trading_options.rest.model.StartUserDataStreamResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -78,12 +79,12 @@ public void initApiClient() throws ApiException { /** * Close User Data Stream (USER_STREAM) * - *

Close out a user data stream. Weight: 1 + *

Close out a user data stream. Weight(IP): 1 Security Type: USER_STREAM * * @throws ApiException if the Api call fails */ @Test - public void closeUserDataStreamTest() throws ApiException, CryptoException { + public void closeUserDataStreamTest() throws ApiException, CryptoException, IOException { api.closeUserDataStream(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -101,12 +102,13 @@ public void closeUserDataStreamTest() throws ApiException, CryptoException { * Keepalive User Data Stream (USER_STREAM) * *

Keepalive a user data stream to prevent a time out. User data streams will close after 60 - * minutes. It's recommended to send a ping about every 60 minutes. Weight: 1 + * minutes. It's recommended to send a ping about every 60 minutes. Weight(IP): 1 Security + * Type: USER_STREAM * * @throws ApiException if the Api call fails */ @Test - public void keepaliveUserDataStreamTest() throws ApiException, CryptoException { + public void keepaliveUserDataStreamTest() throws ApiException, CryptoException, IOException { api.keepaliveUserDataStream(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -126,12 +128,13 @@ public void keepaliveUserDataStreamTest() throws ApiException, CryptoException { * *

Start a new user data stream. The stream will close after 60 minutes unless a keepalive is * sent. If the account has an active `listenKey`, that `listenKey` will be - * returned and its validity will be extended for 60 minutes. Weight: 1 + * returned and its validity will be extended for 60 minutes. Weight(IP): 1 Security Type: + * USER_STREAM * * @throws ApiException if the Api call fails */ @Test - public void startUserDataStreamTest() throws ApiException, CryptoException { + public void startUserDataStreamTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.startUserDataStream(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); diff --git a/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/MarketApiTest.java b/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/MarketApiTest.java index 3446d5ada..582bf16f2 100644 --- a/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/MarketApiTest.java +++ b/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/MarketApiTest.java @@ -18,16 +18,7 @@ import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; import com.binance.connector.client.common.websocket.dtos.RequestWrapperDTO; import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.IndexPriceStreamsRequest; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.IndexPriceStreamsResponse; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.KlineCandlestickStreamsRequest; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.KlineCandlestickStreamsResponse; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.MarkPriceRequest; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.MarkPriceResponse; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.NewSymbolInfoRequest; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.NewSymbolInfoResponse; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.OpenInterestRequest; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.OpenInterestResponse; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.*; import jakarta.validation.constraints.*; import java.io.File; import java.io.IOException; @@ -133,7 +124,7 @@ public void klineCandlestickStreamsTest() throws ApiException, URISyntaxExceptio KlineCandlestickStreamsRequest klineCandlestickStreamsRequest = new KlineCandlestickStreamsRequest(); klineCandlestickStreamsRequest.symbol("btcusdt"); - klineCandlestickStreamsRequest.interval("1m"); + klineCandlestickStreamsRequest.interval(Interval.INTERVAL_1m); StreamBlockingQueueWrapper response = api.klineCandlestickStreams(klineCandlestickStreamsRequest); @@ -157,41 +148,6 @@ public void klineCandlestickStreamsTest() throws ApiException, URISyntaxExceptio JSONAssert.assertEquals(expectedJson, sentPayload, true); } - /** - * Mark Price - * - *

The mark price for all option symbols on specific underlying asset. - * E.g.[btcusdt@optionMarkPrice](wss://fstream.binance.com/market/stream?streams=btcusdt@optionMarkPrice) - * Update Speed: 1000ms - * - * @throws ApiException if the Api call fails - */ - @Test - public void markPriceTest() throws ApiException, URISyntaxException, IOException { - MarkPriceRequest markPriceRequest = new MarkPriceRequest(); - markPriceRequest.underlying("example_value"); - - StreamBlockingQueueWrapper response = api.markPrice(markPriceRequest); - ArgumentCaptor, MarkPriceResponse>> callArgumentCaptor = - ArgumentCaptor.forClass(RequestWrapperDTO.class); - Mockito.verify(connectionSpy).innerSend(callArgumentCaptor.capture()); - ArgumentCaptor sendArgumentCaptor = ArgumentCaptor.forClass(String.class); - RemoteEndpoint remote = sessionMock.getRemote(); - Mockito.verify(remote).sendString(sendArgumentCaptor.capture(), Mockito.any()); - RequestWrapperDTO, MarkPriceResponse> requestWrapperDTO = - callArgumentCaptor.getValue(); - Set params = requestWrapperDTO.getParams(); - // TODO: test validations - String sentPayload = sendArgumentCaptor.getValue(); - - URL resource = - MarketApiTest.class.getResource( - "/expected/stream/MarketApi/underlying@optionMarkPrice-test.json"); - - String expectedJson = Files.readString(Paths.get(resource.toURI())); - JSONAssert.assertEquals(expectedJson, sentPayload, true); - } - /** * New Symbol Info * @@ -237,6 +193,7 @@ public void newSymbolInfoTest() throws ApiException, URISyntaxException, IOExcep @Test public void openInterestTest() throws ApiException, URISyntaxException, IOException { OpenInterestRequest openInterestRequest = new OpenInterestRequest(); + openInterestRequest.setUnderlying("abcdef"); openInterestRequest.expirationDate("220930"); StreamBlockingQueueWrapper response = diff --git a/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/PublicApiTest.java b/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/PublicApiTest.java index b3193c2e5..0553937f8 100644 --- a/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/PublicApiTest.java +++ b/clients/derivatives-trading-options/src/test/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/PublicApiTest.java @@ -18,16 +18,7 @@ import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; import com.binance.connector.client.common.websocket.dtos.RequestWrapperDTO; import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.DiffBookDepthStreamsRequest; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.DiffBookDepthStreamsResponse; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.IndividualSymbolBookTickerStreamsRequest; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.IndividualSymbolBookTickerStreamsResponse; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.PartialBookDepthStreamsRequest; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.PartialBookDepthStreamsResponse; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.Ticker24HourRequest; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.Ticker24HourResponse; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.TradeStreamsRequest; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.TradeStreamsResponse; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.*; import jakarta.validation.constraints.*; import java.io.File; import java.io.IOException; @@ -100,7 +91,7 @@ public void initApiClient() throws Exception { public void diffBookDepthStreamsTest() throws ApiException, URISyntaxException, IOException { DiffBookDepthStreamsRequest diffBookDepthStreamsRequest = new DiffBookDepthStreamsRequest(); diffBookDepthStreamsRequest.symbol("btcusdt"); - diffBookDepthStreamsRequest.updateSpeed("100ms"); + diffBookDepthStreamsRequest.updateSpeed(UpdateSpeed.UPDATE_SPEED_100ms); StreamBlockingQueueWrapper response = api.diffBookDepthStreams(diffBookDepthStreamsRequest); @@ -174,7 +165,7 @@ public void partialBookDepthStreamsTest() throws ApiException, URISyntaxExceptio PartialBookDepthStreamsRequest partialBookDepthStreamsRequest = new PartialBookDepthStreamsRequest(); partialBookDepthStreamsRequest.symbol("btcusdt"); - partialBookDepthStreamsRequest.level("example_value"); + partialBookDepthStreamsRequest.level(Level.LEVEL_5); StreamBlockingQueueWrapper response = api.partialBookDepthStreams(partialBookDepthStreamsRequest); @@ -198,41 +189,6 @@ public void partialBookDepthStreamsTest() throws ApiException, URISyntaxExceptio JSONAssert.assertEquals(expectedJson, sentPayload, true); } - /** - * 24-hour TICKER - * - *

24hr ticker info for all symbols. Only symbols whose ticker info changed will be sent. - * Update Speed: 1000ms - * - * @throws ApiException if the Api call fails - */ - @Test - public void ticker24HourTest() throws ApiException, URISyntaxException, IOException { - Ticker24HourRequest ticker24HourRequest = new Ticker24HourRequest(); - ticker24HourRequest.symbol("btcusdt"); - - StreamBlockingQueueWrapper response = - api.ticker24Hour(ticker24HourRequest); - ArgumentCaptor, Ticker24HourResponse>> callArgumentCaptor = - ArgumentCaptor.forClass(RequestWrapperDTO.class); - Mockito.verify(connectionSpy).innerSend(callArgumentCaptor.capture()); - ArgumentCaptor sendArgumentCaptor = ArgumentCaptor.forClass(String.class); - RemoteEndpoint remote = sessionMock.getRemote(); - Mockito.verify(remote).sendString(sendArgumentCaptor.capture(), Mockito.any()); - RequestWrapperDTO, Ticker24HourResponse> requestWrapperDTO = - callArgumentCaptor.getValue(); - Set params = requestWrapperDTO.getParams(); - // TODO: test validations - String sentPayload = sendArgumentCaptor.getValue(); - - URL resource = - PublicApiTest.class.getResource( - "/expected/stream/PublicApi/symbol@optionTicker-test.json"); - - String expectedJson = Files.readString(Paths.get(resource.toURI())); - JSONAssert.assertEquals(expectedJson, sentPayload, true); - } - /** * Trade Streams * diff --git a/clients/derivatives-trading-options/src/test/resources/expected/stream/MarketApi/underlying@optionOpenInterest@expirationDate-test.json b/clients/derivatives-trading-options/src/test/resources/expected/stream/MarketApi/underlying@optionOpenInterest@expirationDate-test.json index ab8a93017..8487c4ca7 100644 --- a/clients/derivatives-trading-options/src/test/resources/expected/stream/MarketApi/underlying@optionOpenInterest@expirationDate-test.json +++ b/clients/derivatives-trading-options/src/test/resources/expected/stream/MarketApi/underlying@optionOpenInterest@expirationDate-test.json @@ -1,7 +1,7 @@ { "id": "eaf3292c-64b6-4c04-ad4f-4ca2608b42b4", "params": [ - "underlying@optionOpenInterest@220930" + "abcdef@openInterest@220930" ], "method": "SUBSCRIBE" } diff --git a/clients/derivatives-trading-options/src/test/resources/expected/stream/PublicApi/symbol@depthlevel@updateSpeed-test.json b/clients/derivatives-trading-options/src/test/resources/expected/stream/PublicApi/symbol@depthlevel@updateSpeed-test.json index bc5ba4517..dd436d4ff 100644 --- a/clients/derivatives-trading-options/src/test/resources/expected/stream/PublicApi/symbol@depthlevel@updateSpeed-test.json +++ b/clients/derivatives-trading-options/src/test/resources/expected/stream/PublicApi/symbol@depthlevel@updateSpeed-test.json @@ -1,7 +1,7 @@ { "id": "eaf3292c-64b6-4c04-ad4f-4ca2608b42b4", "params": [ - "btcusdt@depthexample_value" + "btcusdt@depth5" ], "method": "SUBSCRIBE" } diff --git a/clients/derivatives-trading-portfolio-margin-pro/CHANGELOG.md b/clients/derivatives-trading-portfolio-margin-pro/CHANGELOG.md index 6b615e57b..cf6dacbe0 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/CHANGELOG.md +++ b/clients/derivatives-trading-portfolio-margin-pro/CHANGELOG.md @@ -1,5 +1,38 @@ # Changelog +## 8.0.0 - 2026-07-29 + +### Changed (6) + +#### REST API + +- Modified parameter `asset`: + - enum added: `LDUSDT`, `RWUSD` + - affected methods: + - `transferLdusdtRwusdForPortfolioMargin()` (`POST /sapi/v1/portfolio/earn-asset-transfer`) +- Modified parameter `autoRepay`: + - enum added: `true`, `false` + - affected methods: + - `changeAutoRepayFuturesStatus()` (`POST /sapi/v1/portfolio/repay-futures-switch`) +- Modified parameter `deltaEnabled`: + - enum added: `true`, `false` + - affected methods: + - `switchDeltaMode()` (`POST /sapi/v1/portfolio/delta-mode`) +- Modified parameter `from`: + - enum added: `SPOT`, `MARGIN` + - affected methods: + - `portfolioMarginProBankruptcyLoanRepay()` (`POST /sapi/v1/portfolio/repay`) + - `repayFuturesNegativeBalance()` (`POST /sapi/v1/portfolio/repay-futures-negative-balance`) +- Modified parameter `transferSide`: + - enum added: `TO_UM`, `FROM_UM` + - affected methods: + - `bnbTransfer()` (`POST /sapi/v1/portfolio/bnb-transfer`) +- Modified parameter `transferType`: + - enum added: `EARN_TO_FUTURE`, `FUTURE_TO_EARN` + - affected methods: + - `getTransferableEarnAssetBalanceForPortfolioMargin()` (`GET /sapi/v1/portfolio/earn-asset-balance`) + - `transferLdusdtRwusdForPortfolioMargin()` (`POST /sapi/v1/portfolio/earn-asset-transfer`) + ## 7.0.0 - 2026-05-04 - Added stop method for WebSocket diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/AccountApi.md b/clients/derivatives-trading-portfolio-margin-pro/docs/AccountApi.md index deef6ea16..9091821cb 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/AccountApi.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/AccountApi.md @@ -4,35 +4,35 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**bnbTransfer**](AccountApi.md#bnbTransfer) | **POST** /sapi/v1/portfolio/bnb-transfer | BNB transfer(USER_DATA) | -| [**changeAutoRepayFuturesStatus**](AccountApi.md#changeAutoRepayFuturesStatus) | **POST** /sapi/v1/portfolio/repay-futures-switch | Change Auto-repay-futures Status(TRADE) | +| [**bnbTransfer**](AccountApi.md#bnbTransfer) | **POST** /sapi/v1/portfolio/bnb-transfer | BNB transfer (USER_DATA) | +| [**changeAutoRepayFuturesStatus**](AccountApi.md#changeAutoRepayFuturesStatus) | **POST** /sapi/v1/portfolio/repay-futures-switch | Change Auto-repay-futures Status (TRADE) | | [**deleteMarginCallLevel**](AccountApi.md#deleteMarginCallLevel) | **DELETE** /sapi/v1/portfolio/margin-call-level | Delete Margin Call Level (USER_DATA) | -| [**fundAutoCollection**](AccountApi.md#fundAutoCollection) | **POST** /sapi/v1/portfolio/auto-collection | Fund Auto-collection(USER_DATA) | -| [**fundCollectionByAsset**](AccountApi.md#fundCollectionByAsset) | **POST** /sapi/v1/portfolio/asset-collection | Fund Collection by Asset(USER_DATA) | -| [**getAutoRepayFuturesStatus**](AccountApi.md#getAutoRepayFuturesStatus) | **GET** /sapi/v1/portfolio/repay-futures-switch | Get Auto-repay-futures Status(USER_DATA) | -| [**getDeltaModeStatus**](AccountApi.md#getDeltaModeStatus) | **GET** /sapi/v1/portfolio/delta-mode | Get Delta Mode Status(USER_DATA) | +| [**fundAutoCollection**](AccountApi.md#fundAutoCollection) | **POST** /sapi/v1/portfolio/auto-collection | Fund Auto-collection (USER_DATA) | +| [**fundCollectionByAsset**](AccountApi.md#fundCollectionByAsset) | **POST** /sapi/v1/portfolio/asset-collection | Fund Collection by Asset (USER_DATA) | +| [**getAutoRepayFuturesStatus**](AccountApi.md#getAutoRepayFuturesStatus) | **GET** /sapi/v1/portfolio/repay-futures-switch | Get Auto-repay-futures Status (USER_DATA) | +| [**getDeltaModeStatus**](AccountApi.md#getDeltaModeStatus) | **GET** /sapi/v1/portfolio/delta-mode | Get Delta Mode Status (USER_DATA) | | [**getMarginCallLevel**](AccountApi.md#getMarginCallLevel) | **GET** /sapi/v1/portfolio/margin-call-level | Get Margin Call Level (USER_DATA) | -| [**getPortfolioMarginProAccountBalance**](AccountApi.md#getPortfolioMarginProAccountBalance) | **GET** /sapi/v1/portfolio/balance | Get Portfolio Margin Pro Account Balance(USER_DATA) | -| [**getPortfolioMarginProAccountInfo**](AccountApi.md#getPortfolioMarginProAccountInfo) | **GET** /sapi/v1/portfolio/account | Get Portfolio Margin Pro Account Info(USER_DATA) | -| [**getPortfolioMarginProSpanAccountInfo**](AccountApi.md#getPortfolioMarginProSpanAccountInfo) | **GET** /sapi/v2/portfolio/account | Get Portfolio Margin Pro SPAN Account Info(USER_DATA) | +| [**getPortfolioMarginProAccountBalance**](AccountApi.md#getPortfolioMarginProAccountBalance) | **GET** /sapi/v1/portfolio/balance | Get Portfolio Margin Pro Account Balance (USER_DATA) | +| [**getPortfolioMarginProAccountInfo**](AccountApi.md#getPortfolioMarginProAccountInfo) | **GET** /sapi/v1/portfolio/account | Get Portfolio Margin Pro Account Info (USER_DATA) | +| [**getPortfolioMarginProSpanAccountInfo**](AccountApi.md#getPortfolioMarginProSpanAccountInfo) | **GET** /sapi/v2/portfolio/account | Get Portfolio Margin Pro SPAN Account Info (USER_DATA) | | [**getTransferableEarnAssetBalanceForPortfolioMargin**](AccountApi.md#getTransferableEarnAssetBalanceForPortfolioMargin) | **GET** /sapi/v1/portfolio/earn-asset-balance | Get Transferable Earn Asset Balance for Portfolio Margin (USER_DATA) | -| [**portfolioMarginProBankruptcyLoanRepay**](AccountApi.md#portfolioMarginProBankruptcyLoanRepay) | **POST** /sapi/v1/portfolio/repay | Portfolio Margin Pro Bankruptcy Loan Repay | -| [**queryPortfolioMarginProBankruptcyLoanAmount**](AccountApi.md#queryPortfolioMarginProBankruptcyLoanAmount) | **GET** /sapi/v1/portfolio/pmLoan | Query Portfolio Margin Pro Bankruptcy Loan Amount(USER_DATA) | -| [**queryPortfolioMarginProBankruptcyLoanRepayHistory**](AccountApi.md#queryPortfolioMarginProBankruptcyLoanRepayHistory) | **GET** /sapi/v1/portfolio/pmloan-history | Query Portfolio Margin Pro Bankruptcy Loan Repay History(USER_DATA) | -| [**queryPortfolioMarginProNegativeBalanceInterestHistory**](AccountApi.md#queryPortfolioMarginProNegativeBalanceInterestHistory) | **GET** /sapi/v1/portfolio/interest-history | Query Portfolio Margin Pro Negative Balance Interest History(USER_DATA) | -| [**repayFuturesNegativeBalance**](AccountApi.md#repayFuturesNegativeBalance) | **POST** /sapi/v1/portfolio/repay-futures-negative-balance | Repay futures Negative Balance(USER_DATA) | +| [**portfolioMarginProBankruptcyLoanRepay**](AccountApi.md#portfolioMarginProBankruptcyLoanRepay) | **POST** /sapi/v1/portfolio/repay | Portfolio Margin Pro Bankruptcy Loan Repay (TRADE) | +| [**queryPortfolioMarginProBankruptcyLoanAmount**](AccountApi.md#queryPortfolioMarginProBankruptcyLoanAmount) | **GET** /sapi/v1/portfolio/pmLoan | Query Portfolio Margin Pro Bankruptcy Loan Amount (USER_DATA) | +| [**queryPortfolioMarginProBankruptcyLoanRepayHistory**](AccountApi.md#queryPortfolioMarginProBankruptcyLoanRepayHistory) | **GET** /sapi/v1/portfolio/pmloan-history | Query Portfolio Margin Pro Bankruptcy Loan Repay History (USER_DATA) | +| [**queryPortfolioMarginProNegativeBalanceInterestHistory**](AccountApi.md#queryPortfolioMarginProNegativeBalanceInterestHistory) | **GET** /sapi/v1/portfolio/interest-history | Query Portfolio Margin Pro Negative Balance Interest History (USER_DATA) | +| [**repayFuturesNegativeBalance**](AccountApi.md#repayFuturesNegativeBalance) | **POST** /sapi/v1/portfolio/repay-futures-negative-balance | Repay futures Negative Balance (USER_DATA) | | [**setMarginCallLevel**](AccountApi.md#setMarginCallLevel) | **POST** /sapi/v1/portfolio/margin-call-level | Set Margin Call Level (USER_DATA) | -| [**switchDeltaMode**](AccountApi.md#switchDeltaMode) | **POST** /sapi/v1/portfolio/delta-mode | Switch Delta Mode(TRADE) | -| [**transferLdusdtRwusdForPortfolioMargin**](AccountApi.md#transferLdusdtRwusdForPortfolioMargin) | **POST** /sapi/v1/portfolio/earn-asset-transfer | Transfer LDUSDT/RWUSD for Portfolio Margin(TRADE) | +| [**switchDeltaMode**](AccountApi.md#switchDeltaMode) | **POST** /sapi/v1/portfolio/delta-mode | Switch Delta Mode (TRADE) | +| [**transferLdusdtRwusdForPortfolioMargin**](AccountApi.md#transferLdusdtRwusdForPortfolioMargin) | **POST** /sapi/v1/portfolio/earn-asset-transfer | Transfer LDUSDT/RWUSD for Portfolio Margin (TRADE) | # **bnbTransfer** > BnbTransferResponse bnbTransfer(bnbTransferRequest) -BNB transfer(USER_DATA) +BNB transfer (USER_DATA) -BNB transfer can be between Margin Account and USDM Account * You can only use this function 2 times per 10 minutes in a rolling manner Weight: 1500 +BNB transfer can be between Margin Account and USDM Account Weight(IP): 1500 Security Type: USER_DATA Notes: - You can only use this function 2 times per 10 minutes in a rolling manner ### Example ```java @@ -92,9 +92,9 @@ No authorization required # **changeAutoRepayFuturesStatus** > ChangeAutoRepayFuturesStatusResponse changeAutoRepayFuturesStatus(changeAutoRepayFuturesStatusRequest) -Change Auto-repay-futures Status(TRADE) +Change Auto-repay-futures Status (TRADE) -Change Auto-repay-futures Status Weight: 1500 +Change Auto-repay-futures Status Weight(IP): 1500 Security Type: TRADE ### Example ```java @@ -156,7 +156,7 @@ No authorization required Delete Margin Call Level (USER_DATA) -Delete the margin call level for a Portfolio Margin account. Weight: 1500 +Delete the margin call level for a Portfolio Margin account. Weight(IP): 1500 Security Type: USER_DATA ### Example ```java @@ -173,7 +173,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { DeleteMarginCallLevelResponse result = apiInstance.deleteMarginCallLevel(recvWindow); System.out.println(result); @@ -192,7 +192,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -216,9 +216,9 @@ No authorization required # **fundAutoCollection** > FundAutoCollectionResponse fundAutoCollection(fundAutoCollectionRequest) -Fund Auto-collection(USER_DATA) +Fund Auto-collection (USER_DATA) -Transfers all assets from Futures Account to Margin account * The BNB would not be collected from UM-PM account to the Portfolio Margin account. * You can only use this function 500 times per hour in a rolling manner. Weight: 1500 +Transfers all assets from Futures Account to Margin account Weight(IP): 1500 Security Type: USER_DATA Notes: - The BNB would not be collected from UM-PM account to the Portfolio Margin account. - You can only use this function 500 times per hour in a rolling manner. ### Example ```java @@ -254,7 +254,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **fundAutoCollectionRequest** | [**FundAutoCollectionRequest**](FundAutoCollectionRequest.md)| | | +| **fundAutoCollectionRequest** | [**FundAutoCollectionRequest**](FundAutoCollectionRequest.md)| | [optional] | ### Return type @@ -278,9 +278,9 @@ No authorization required # **fundCollectionByAsset** > FundCollectionByAssetResponse fundCollectionByAsset(fundCollectionByAssetRequest) -Fund Collection by Asset(USER_DATA) +Fund Collection by Asset (USER_DATA) -Transfers specific asset from Futures Account to Margin account * The BNB transfer is not be supported Weight: 60 +Transfers specific asset from Futures Account to Margin account Weight(IP): 60 Security Type: USER_DATA Notes: - The BNB transfer is not be supported ### Example ```java @@ -340,9 +340,9 @@ No authorization required # **getAutoRepayFuturesStatus** > GetAutoRepayFuturesStatusResponse getAutoRepayFuturesStatus(recvWindow) -Get Auto-repay-futures Status(USER_DATA) +Get Auto-repay-futures Status (USER_DATA) -Query Auto-repay-futures Status Weight: 30 +Query Auto-repay-futures Status Weight(IP): 30 Security Type: USER_DATA ### Example ```java @@ -359,7 +359,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { GetAutoRepayFuturesStatusResponse result = apiInstance.getAutoRepayFuturesStatus(recvWindow); System.out.println(result); @@ -402,9 +402,9 @@ No authorization required # **getDeltaModeStatus** > GetDeltaModeStatusResponse getDeltaModeStatus(recvWindow) -Get Delta Mode Status(USER_DATA) +Get Delta Mode Status (USER_DATA) -Query the Delta mode status of current account. Weight: 1500 +Query the Delta mode status of current account. Weight(IP): 1500 Security Type: USER_DATA ### Example ```java @@ -421,7 +421,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { GetDeltaModeStatusResponse result = apiInstance.getDeltaModeStatus(recvWindow); System.out.println(result); @@ -466,7 +466,7 @@ No authorization required Get Margin Call Level (USER_DATA) -Get the margin call level for a Portfolio Margin account. Weight: 1500 +Get the margin call level for a Portfolio Margin account. Weight(IP): 1500 Security Type: USER_DATA ### Example ```java @@ -483,7 +483,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { GetMarginCallLevelResponse result = apiInstance.getMarginCallLevel(recvWindow); System.out.println(result); @@ -502,7 +502,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -526,9 +526,9 @@ No authorization required # **getPortfolioMarginProAccountBalance** > GetPortfolioMarginProAccountBalanceResponse getPortfolioMarginProAccountBalance(asset, recvWindow) -Get Portfolio Margin Pro Account Balance(USER_DATA) +Get Portfolio Margin Pro Account Balance (USER_DATA) -Query Portfolio Margin Pro account balance Weight: 20 +Query Portfolio Margin Pro account balance Weight(IP): 20 Security Type: USER_DATA ### Example ```java @@ -545,8 +545,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String asset = "asset_example"; // String | - Long recvWindow = 56L; // Long | + String asset = "BTC"; // String | + Long recvWindow = 5000L; // Long | try { GetPortfolioMarginProAccountBalanceResponse result = apiInstance.getPortfolioMarginProAccountBalance(asset, recvWindow); System.out.println(result); @@ -590,9 +590,9 @@ No authorization required # **getPortfolioMarginProAccountInfo** > GetPortfolioMarginProAccountInfoResponse getPortfolioMarginProAccountInfo(recvWindow) -Get Portfolio Margin Pro Account Info(USER_DATA) +Get Portfolio Margin Pro Account Info (USER_DATA) -Get Portfolio Margin Pro Account Info Weight: 5 +Get Portfolio Margin Pro Account Info Weight(UID): 5 Security Type: USER_DATA ### Example ```java @@ -609,7 +609,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { GetPortfolioMarginProAccountInfoResponse result = apiInstance.getPortfolioMarginProAccountInfo(recvWindow); System.out.println(result); @@ -652,9 +652,9 @@ No authorization required # **getPortfolioMarginProSpanAccountInfo** > GetPortfolioMarginProSpanAccountInfoResponse getPortfolioMarginProSpanAccountInfo(recvWindow) -Get Portfolio Margin Pro SPAN Account Info(USER_DATA) +Get Portfolio Margin Pro SPAN Account Info (USER_DATA) -Get Portfolio Margin Pro SPAN Account Info (For Portfolio Margin Pro SPAN users only) Weight: 5 +Get Portfolio Margin Pro SPAN Account Info (For Portfolio Margin Pro SPAN users only) Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -671,7 +671,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { GetPortfolioMarginProSpanAccountInfoResponse result = apiInstance.getPortfolioMarginProSpanAccountInfo(recvWindow); System.out.println(result); @@ -716,7 +716,7 @@ No authorization required Get Transferable Earn Asset Balance for Portfolio Margin (USER_DATA) -Get transferable earn asset balance for all types of Portfolio Margin account Weight: 1500 +Get transferable earn asset balance for all types of Portfolio Margin account Weight(IP): 1500 Security Type: USER_DATA ### Example ```java @@ -733,9 +733,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String asset = "asset_example"; // String | `LDUSDT` only - String transferType = "transferType_example"; // String | `EARN_TO_FUTURE` /`FUTURE_TO_EARN` - Long recvWindow = 56L; // Long | + String asset = "LDUSDT"; // String | `LDUSDT` only + TransferType transferType = TransferType.fromValue("EARN_TO_FUTURE"); // TransferType | + Long recvWindow = 5000L; // Long | try { GetTransferableEarnAssetBalanceForPortfolioMarginResponse result = apiInstance.getTransferableEarnAssetBalanceForPortfolioMargin(asset, transferType, recvWindow); System.out.println(result); @@ -755,7 +755,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **asset** | **String**| `LDUSDT` only | | -| **transferType** | **String**| `EARN_TO_FUTURE` /`FUTURE_TO_EARN` | | +| **transferType** | [**TransferType**](.md)| | [enum: EARN_TO_FUTURE, FUTURE_TO_EARN] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -780,9 +780,9 @@ No authorization required # **portfolioMarginProBankruptcyLoanRepay** > PortfolioMarginProBankruptcyLoanRepayResponse portfolioMarginProBankruptcyLoanRepay(portfolioMarginProBankruptcyLoanRepayRequest) -Portfolio Margin Pro Bankruptcy Loan Repay +Portfolio Margin Pro Bankruptcy Loan Repay (TRADE) -Repay Portfolio Margin Pro Bankruptcy Loan * Please note that the API Key has enabled Spot & Margin Trading permissions to access this endpoint. Weight: 3000 +Repay Portfolio Margin Pro Bankruptcy Loan Weight(UID): 3000 Security Type: TRADE Notes: - Please note that the API Key has enabled Spot & Margin Trading permissions to access this endpoint. ### Example ```java @@ -818,7 +818,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **portfolioMarginProBankruptcyLoanRepayRequest** | [**PortfolioMarginProBankruptcyLoanRepayRequest**](PortfolioMarginProBankruptcyLoanRepayRequest.md)| | | +| **portfolioMarginProBankruptcyLoanRepayRequest** | [**PortfolioMarginProBankruptcyLoanRepayRequest**](PortfolioMarginProBankruptcyLoanRepayRequest.md)| | [optional] | ### Return type @@ -842,9 +842,9 @@ No authorization required # **queryPortfolioMarginProBankruptcyLoanAmount** > QueryPortfolioMarginProBankruptcyLoanAmountResponse queryPortfolioMarginProBankruptcyLoanAmount(recvWindow) -Query Portfolio Margin Pro Bankruptcy Loan Amount(USER_DATA) +Query Portfolio Margin Pro Bankruptcy Loan Amount (USER_DATA) -Query Portfolio Margin Pro Bankruptcy Loan Amount * If there’s no classic portfolio margin bankruptcy loan, the amount would be 0 Weight: 500 +Query Portfolio Margin Pro Bankruptcy Loan Amount Weight(UID): 500 Security Type: USER_DATA Notes: - If there’s no classic portfolio margin bankruptcy loan, the amount would be 0 ### Example ```java @@ -861,7 +861,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { QueryPortfolioMarginProBankruptcyLoanAmountResponse result = apiInstance.queryPortfolioMarginProBankruptcyLoanAmount(recvWindow); System.out.println(result); @@ -902,11 +902,11 @@ No authorization required # **queryPortfolioMarginProBankruptcyLoanRepayHistory** -> QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse queryPortfolioMarginProBankruptcyLoanRepayHistory(startTime, endTime, current, size, recvWindow) +> QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse queryPortfolioMarginProBankruptcyLoanRepayHistory(startTime, endTime, size, current, recvWindow) -Query Portfolio Margin Pro Bankruptcy Loan Repay History(USER_DATA) +Query Portfolio Margin Pro Bankruptcy Loan Repay History (USER_DATA) -Query repay history of pmloan for portfolio margin pro. * `startTime` and `endTime` cannot be longer than 360 days * If `startTime` and `endTime` not sent, return records of the last 30 days by default. * If `startTime`is sent and `endTime` is not sent, return records of [startTime, startTime+30d]. * If `startTime` is not sent and `endTime` is sent, return records of [endTime-30d, endTime]. Weight: 500 +Query repay history of pmloan for portfolio margin pro. Weight(IP): 500 Security Type: USER_DATA Notes: - `startTime` and `endTime` cannot be longer than 360 days - If `startTime` and `endTime` not sent, return records of the last 30 days by default. - If `startTime`is sent and `endTime` is not sent, return records of [startTime, startTime+30d]. - If `startTime` is not sent and `endTime` is sent, return records of [endTime-30d, endTime]. ### Example ```java @@ -923,13 +923,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10 Max:100 - Long recvWindow = 56L; // Long | + Long startTime = 1623319461670L; // Long | Start time + Long endTime = 1641782889000L; // Long | End time + Long size = 10L; // Long | Number of results returned. + Long current = 1L; // Long | Currently querying page. Start from 1. + Long recvWindow = 5000L; // Long | try { - QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse result = apiInstance.queryPortfolioMarginProBankruptcyLoanRepayHistory(startTime, endTime, current, size, recvWindow); + QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse result = apiInstance.queryPortfolioMarginProBankruptcyLoanRepayHistory(startTime, endTime, size, current, recvWindow); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AccountApi#queryPortfolioMarginProBankruptcyLoanRepayHistory"); @@ -946,10 +946,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10 Max:100 | [optional] | +| **startTime** | **Long**| Start time | [optional] | +| **endTime** | **Long**| End time | [optional] | +| **size** | **Long**| Number of results returned. | [optional] | +| **current** | **Long**| Currently querying page. Start from 1. | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -974,9 +974,9 @@ No authorization required # **queryPortfolioMarginProNegativeBalanceInterestHistory** > QueryPortfolioMarginProNegativeBalanceInterestHistoryResponse queryPortfolioMarginProNegativeBalanceInterestHistory(asset, startTime, endTime, size, recvWindow) -Query Portfolio Margin Pro Negative Balance Interest History(USER_DATA) +Query Portfolio Margin Pro Negative Balance Interest History (USER_DATA) -Query interest history of negative balance for portfolio margin. Weight: 50 +Query interest history of negative balance for portfolio margin. Weight(IP): 50 Security Type: USER_DATA ### Example ```java @@ -993,11 +993,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String asset = "asset_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long size = 56L; // Long | Default:10 Max:100 - Long recvWindow = 56L; // Long | + String asset = "USDT"; // String | + Long startTime = 1623319461670L; // Long | Start time + Long endTime = 1641782889000L; // Long | End time + Long size = 10L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | try { QueryPortfolioMarginProNegativeBalanceInterestHistoryResponse result = apiInstance.queryPortfolioMarginProNegativeBalanceInterestHistory(asset, startTime, endTime, size, recvWindow); System.out.println(result); @@ -1017,9 +1017,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **asset** | **String**| | [optional] | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **size** | **Long**| Default:10 Max:100 | [optional] | +| **startTime** | **Long**| Start time | [optional] | +| **endTime** | **Long**| End time | [optional] | +| **size** | **Long**| Number of results returned. | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -1044,9 +1044,9 @@ No authorization required # **repayFuturesNegativeBalance** > RepayFuturesNegativeBalanceResponse repayFuturesNegativeBalance(repayFuturesNegativeBalanceRequest) -Repay futures Negative Balance(USER_DATA) +Repay futures Negative Balance (USER_DATA) -Repay futures Negative Balance Weight: 1500 +Repay futures Negative Balance Weight(IP): 1500 Security Type: USER_DATA ### Example ```java @@ -1082,7 +1082,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **repayFuturesNegativeBalanceRequest** | [**RepayFuturesNegativeBalanceRequest**](RepayFuturesNegativeBalanceRequest.md)| | | +| **repayFuturesNegativeBalanceRequest** | [**RepayFuturesNegativeBalanceRequest**](RepayFuturesNegativeBalanceRequest.md)| | [optional] | ### Return type @@ -1108,7 +1108,7 @@ No authorization required Set Margin Call Level (USER_DATA) -Set the margin call level for a Portfolio Margin account. When the account's uniMMR drops to the specified level, a notification will be sent via email and SMS. Weight: 1500 +Set the margin call level for a Portfolio Margin account. When the account's uniMMR drops to the specified level, a notification will be sent via email and SMS. Weight(IP): 1500 Security Type: USER_DATA ### Example ```java @@ -1168,9 +1168,9 @@ No authorization required # **switchDeltaMode** > SwitchDeltaModeResponse switchDeltaMode(switchDeltaModeRequest) -Switch Delta Mode(TRADE) +Switch Delta Mode (TRADE) -Switch the Delta mode for existing PM PRO / PM RETAIL accounts. Weight: 1500 +Switch the Delta mode for existing PM PRO / PM RETAIL accounts. Weight(IP): 1500 Security Type: TRADE ### Example ```java @@ -1230,9 +1230,9 @@ No authorization required # **transferLdusdtRwusdForPortfolioMargin** > TransferLdusdtRwusdForPortfolioMarginResponse transferLdusdtRwusdForPortfolioMargin(transferLdusdtRwusdForPortfolioMarginRequest) -Transfer LDUSDT/RWUSD for Portfolio Margin(TRADE) +Transfer LDUSDT/RWUSD for Portfolio Margin (TRADE) -Transfer LDUSDT/RWUSD as collateral for all types of Portfolio Margin account Weight: 1500 +Transfer LDUSDT/RWUSD as collateral for all types of Portfolio Margin account Weight(UID): 1500 Security Type: TRADE ### Example ```java diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/Asset.md b/clients/derivatives-trading-portfolio-margin-pro/docs/Asset.md new file mode 100644 index 000000000..4b50e9aa7 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/Asset.md @@ -0,0 +1,13 @@ + + +# Asset + +## Enum + + +* `LDUSDT` (value: `"LDUSDT"`) + +* `RWUSD` (value: `"RWUSD"`) + + + diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/AutoRepay.md b/clients/derivatives-trading-portfolio-margin-pro/docs/AutoRepay.md new file mode 100644 index 000000000..45dbc5f5b --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/AutoRepay.md @@ -0,0 +1,13 @@ + + +# AutoRepay + +## Enum + + +* `TRUE` (value: `"true"`) + +* `FALSE` (value: `"false"`) + + + diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/BnbTransferRequest.md b/clients/derivatives-trading-portfolio-margin-pro/docs/BnbTransferRequest.md index deb42b752..477dbe19b 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/BnbTransferRequest.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/BnbTransferRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**amount** | **Double** | | | -|**transferSide** | **String** | | | +|**transferSide** | **TransferSide** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/BnbTransferResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/BnbTransferResponse.md index 7f711911b..ce98664e4 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/BnbTransferResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/BnbTransferResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tranId** | **Long** | | [optional] | +|**tranId** | **Long** | tran Id. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/ChangeAutoRepayFuturesStatusRequest.md b/clients/derivatives-trading-portfolio-margin-pro/docs/ChangeAutoRepayFuturesStatusRequest.md index 4fb4acd3c..ff46144ba 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/ChangeAutoRepayFuturesStatusRequest.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/ChangeAutoRepayFuturesStatusRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**autoRepay** | **String** | | | +|**autoRepay** | **AutoRepay** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/ChangeAutoRepayFuturesStatusResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/ChangeAutoRepayFuturesStatusResponse.md index 1d4534775..4439512aa 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/ChangeAutoRepayFuturesStatusResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/ChangeAutoRepayFuturesStatusResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**msg** | **String** | | [optional] | +|**msg** | **String** | msg. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/DeltaEnabled.md b/clients/derivatives-trading-portfolio-margin-pro/docs/DeltaEnabled.md new file mode 100644 index 000000000..2c2c97881 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/DeltaEnabled.md @@ -0,0 +1,13 @@ + + +# DeltaEnabled + +## Enum + + +* `TRUE` (value: `"true"`) + +* `FALSE` (value: `"false"`) + + + diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/From.md b/clients/derivatives-trading-portfolio-margin-pro/docs/From.md new file mode 100644 index 000000000..7138f9d11 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/From.md @@ -0,0 +1,13 @@ + + +# From + +## Enum + + +* `SPOT` (value: `"SPOT"`) + +* `MARGIN` (value: `"MARGIN"`) + + + diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/FundAutoCollectionResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/FundAutoCollectionResponse.md index f79bd3fef..b8e88a5e0 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/FundAutoCollectionResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/FundAutoCollectionResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**msg** | **String** | | [optional] | +|**msg** | **String** | msg. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/FundCollectionByAssetResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/FundCollectionByAssetResponse.md index d9e63f368..0fdda23d6 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/FundCollectionByAssetResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/FundCollectionByAssetResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**msg** | **String** | | [optional] | +|**msg** | **String** | msg. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/GetAutoRepayFuturesStatusResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/GetAutoRepayFuturesStatusResponse.md index 045d3c2fa..8bad26bc0 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/GetAutoRepayFuturesStatusResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/GetAutoRepayFuturesStatusResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**autoRepay** | **Boolean** | | [optional] | +|**autoRepay** | **Boolean** | \"true\" for turn on the auto-repay futures; \"false\" for turn off the auto-repay futures | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/GetDeltaModeStatusResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/GetDeltaModeStatusResponse.md index 17fcc4d2f..caf098629 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/GetDeltaModeStatusResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/GetDeltaModeStatusResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**deltaEnabled** | **Boolean** | | [optional] | +|**deltaEnabled** | **Boolean** | delta Enabled. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/GetMarginCallLevelResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/GetMarginCallLevelResponse.md index bf77842ea..b90af883e 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/GetMarginCallLevelResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/GetMarginCallLevelResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**marginCallLevel** | **String** | | [optional] | +|**marginCallLevel** | **String** | The margin call level value. Empty object returned if not set. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginAssetLeverageResponseInner.md b/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginAssetLeverageResponseInner.md index 6812a2967..6a6f0a94a 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginAssetLeverageResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginAssetLeverageResponseInner.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**leverage** | **Long** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**leverage** | **Long** | leverage. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginProAccountBalanceResponseInner.md b/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginProAccountBalanceResponseInner.md index 70b0979f5..54b76eb45 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginProAccountBalanceResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginProAccountBalanceResponseInner.md @@ -7,21 +7,21 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**totalWalletBalance** | **String** | | [optional] | -|**crossMarginAsset** | **String** | | [optional] | -|**crossMarginBorrowed** | **String** | | [optional] | -|**crossMarginFree** | **String** | | [optional] | -|**crossMarginInterest** | **String** | | [optional] | -|**crossMarginLocked** | **String** | | [optional] | -|**umWalletBalance** | **String** | | [optional] | -|**umUnrealizedPNL** | **String** | | [optional] | -|**cmWalletBalance** | **String** | | [optional] | -|**cmUnrealizedPNL** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**negativeBalance** | **String** | | [optional] | -|**optionWalletBalance** | **String** | | [optional] | -|**optionEquity** | **String** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**totalWalletBalance** | **String** | total Wallet Balance. | [optional] | +|**crossMarginAsset** | **String** | cross Margin Asset. | [optional] | +|**crossMarginBorrowed** | **String** | cross Margin Borrowed. | [optional] | +|**crossMarginFree** | **String** | cross Margin Free. | [optional] | +|**crossMarginInterest** | **String** | cross Margin Interest. | [optional] | +|**crossMarginLocked** | **String** | cross Margin Locked. | [optional] | +|**umWalletBalance** | **String** | um Wallet Balance. | [optional] | +|**umUnrealizedPNL** | **String** | um Unrealized PNL. | [optional] | +|**cmWalletBalance** | **String** | cm Wallet Balance. | [optional] | +|**cmUnrealizedPNL** | **String** | cm Unrealized PNL. | [optional] | +|**updateTime** | **Long** | update Time. | [optional] | +|**negativeBalance** | **String** | negative Balance. | [optional] | +|**optionWalletBalance** | **String** | option Wallet Balance. | [optional] | +|**optionEquity** | **String** | option Equity. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginProAccountInfoResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginProAccountInfoResponse.md index 08a6f7d41..0394e3574 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginProAccountInfoResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginProAccountInfoResponse.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**uniMMR** | **String** | | [optional] | -|**accountEquity** | **String** | | [optional] | -|**actualEquity** | **String** | | [optional] | -|**accountMaintMargin** | **String** | | [optional] | -|**accountInitialMargin** | **String** | | [optional] | -|**totalAvailableBalance** | **String** | | [optional] | -|**accountStatus** | **String** | | [optional] | -|**accountType** | **String** | | [optional] | +|**uniMMR** | **String** | Classic Portfolio margin account maintenance margin rate | [optional] | +|**accountEquity** | **String** | Account equity, unit:USD | [optional] | +|**actualEquity** | **String** | Actual equity, unit:USD | [optional] | +|**accountMaintMargin** | **String** | Classic Portfolio margin account maintenance margin, unit:USD | [optional] | +|**accountInitialMargin** | **String** | Ignored for PM PRO and PM PRO SPAN | [optional] | +|**totalAvailableBalance** | **String** | Ignored for PM PRO and PM PRO SPAN | [optional] | +|**accountStatus** | **String** | Classic Portfolio margin account status:\"NORMAL\", \"MARGIN_CALL\", \"SUPPLY_MARGIN\", \"REDUCE_ONLY\", \"ACTIVE_LIQUIDATION\", \"FORCE_LIQUIDATION\", \"BANKRUPTED\" | [optional] | +|**accountType** | **String** | PM_1 for PM PRO, PM_2 for PM, PM_3 for PM PRO SPAN | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginProSpanAccountInfoResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginProSpanAccountInfoResponse.md index c7b333879..6e1d77089 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginProSpanAccountInfoResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginProSpanAccountInfoResponse.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**uniMMR** | **String** | | [optional] | -|**accountEquity** | **String** | | [optional] | -|**actualEquity** | **String** | | [optional] | -|**accountMaintMargin** | **String** | | [optional] | +|**uniMMR** | **String** | uni MMR. | [optional] | +|**accountEquity** | **String** | Account equity, unit:USD | [optional] | +|**actualEquity** | **String** | Actual equity, unit:USD | [optional] | +|**accountMaintMargin** | **String** | Account maintenance margin, unit:USD | [optional] | |**riskUnitMMList** | [**List<GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner>**](GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner.md) | | [optional] | -|**marginMM** | **String** | | [optional] | -|**otherMM** | **String** | | [optional] | -|**accountStatus** | **String** | | [optional] | -|**accountType** | **String** | | [optional] | +|**marginMM** | **String** | margin MM. | [optional] | +|**otherMM** | **String** | other MM. | [optional] | +|**accountStatus** | **String** | Classic Portfolio margin account status:\"NORMAL\", \"MARGIN_CALL\", \"SUPPLY_MARGIN\", \"REDUCE_ONLY\", \"ACTIVE_LIQUIDATION\", \"FORCE_LIQUIDATION\", \"BANKRUPTED\" | [optional] | +|**accountType** | **String** | PM_1 for classic PM, PM_2 for PM, PM_3 for PM Pro(SPAN) | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner.md b/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner.md index 8318266cf..c37eaf21a 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**uniMaintainUsd** | **String** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**uniMaintainUsd** | **String** | uni Maintain Usd. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/GetTransferableEarnAssetBalanceForPortfolioMarginResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/GetTransferableEarnAssetBalanceForPortfolioMarginResponse.md index 7a69de0fa..59f25c324 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/GetTransferableEarnAssetBalanceForPortfolioMarginResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/GetTransferableEarnAssetBalanceForPortfolioMarginResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**amount** | **String** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**amount** | **String** | amount. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/MarketDataApi.md b/clients/derivatives-trading-portfolio-margin-pro/docs/MarketDataApi.md index 189c2e995..07e1145b2 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/MarketDataApi.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/MarketDataApi.md @@ -4,9 +4,9 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getPortfolioMarginAssetLeverage**](MarketDataApi.md#getPortfolioMarginAssetLeverage) | **GET** /sapi/v1/portfolio/margin-asset-leverage | Get Portfolio Margin Asset Leverage(USER_DATA) | -| [**portfolioMarginCollateralRate**](MarketDataApi.md#portfolioMarginCollateralRate) | **GET** /sapi/v1/portfolio/collateralRate | Portfolio Margin Collateral Rate(MARKET_DATA) | -| [**portfolioMarginProTieredCollateralRate**](MarketDataApi.md#portfolioMarginProTieredCollateralRate) | **GET** /sapi/v2/portfolio/collateralRate | Portfolio Margin Pro Tiered Collateral Rate(USER_DATA) | +| [**getPortfolioMarginAssetLeverage**](MarketDataApi.md#getPortfolioMarginAssetLeverage) | **GET** /sapi/v1/portfolio/margin-asset-leverage | Get Portfolio Margin Asset Leverage (USER_DATA) | +| [**portfolioMarginCollateralRate**](MarketDataApi.md#portfolioMarginCollateralRate) | **GET** /sapi/v1/portfolio/collateralRate | Portfolio Margin Collateral Rate (MARKET_DATA) | +| [**portfolioMarginProTieredCollateralRate**](MarketDataApi.md#portfolioMarginProTieredCollateralRate) | **GET** /sapi/v2/portfolio/collateralRate | Portfolio Margin Pro Tiered Collateral Rate (USER_DATA) | | [**queryPortfolioMarginAssetIndexPrice**](MarketDataApi.md#queryPortfolioMarginAssetIndexPrice) | **GET** /sapi/v1/portfolio/asset-index-price | Query Portfolio Margin Asset Index Price (MARKET_DATA) | @@ -14,9 +14,9 @@ All URIs are relative to *https://api.binance.com* # **getPortfolioMarginAssetLeverage** > GetPortfolioMarginAssetLeverageResponse getPortfolioMarginAssetLeverage() -Get Portfolio Margin Asset Leverage(USER_DATA) +Get Portfolio Margin Asset Leverage (USER_DATA) -Get Portfolio Margin Asset Leverage Weight: 50 +Get Portfolio Margin Asset Leverage Weight(IP): 50 Security Type: USER_DATA ### Example ```java @@ -72,9 +72,9 @@ No authorization required # **portfolioMarginCollateralRate** > PortfolioMarginCollateralRateResponse portfolioMarginCollateralRate() -Portfolio Margin Collateral Rate(MARKET_DATA) +Portfolio Margin Collateral Rate (MARKET_DATA) -Portfolio Margin Collateral Rate Weight: 50 +Portfolio Margin Collateral Rate Weight(IP): 50 Security Type: MARKET_DATA ### Example ```java @@ -130,9 +130,9 @@ No authorization required # **portfolioMarginProTieredCollateralRate** > PortfolioMarginProTieredCollateralRateResponse portfolioMarginProTieredCollateralRate(recvWindow) -Portfolio Margin Pro Tiered Collateral Rate(USER_DATA) +Portfolio Margin Pro Tiered Collateral Rate (USER_DATA) -Portfolio Margin PRO Tiered Collateral Rate Weight: 50 +Portfolio Margin PRO Tiered Collateral Rate Weight(IP): 50 Security Type: USER_DATA ### Example ```java @@ -149,7 +149,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { PortfolioMarginProTieredCollateralRateResponse result = apiInstance.portfolioMarginProTieredCollateralRate(recvWindow); System.out.println(result); @@ -194,7 +194,7 @@ No authorization required Query Portfolio Margin Asset Index Price (MARKET_DATA) -Query Portfolio Margin Asset Index Price Weight: 1 if send asset or 50 if not send asset +Query Portfolio Margin Asset Index Price Weight: - 1 if `asset` is sent - 50 if `asset` is not sent Security Type: MARKET_DATA ### Example ```java @@ -211,7 +211,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String asset = "asset_example"; // String | + String asset = "BTC"; // String | try { QueryPortfolioMarginAssetIndexPriceResponse result = apiInstance.queryPortfolioMarginAssetIndexPrice(asset); System.out.println(result); diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/PmProAccountUpdate.md b/clients/derivatives-trading-portfolio-margin-pro/docs/PmProAccountUpdate.md index 4cfec8d90..292039906 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/PmProAccountUpdate.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/PmProAccountUpdate.md @@ -2,19 +2,20 @@ # PmProAccountUpdate +Pushed every 5 seconds with account asset status. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**uLowerCase** | **String** | | [optional] | -|**eq** | **String** | | [optional] | -|**ae** | **String** | | [optional] | -|**im** | **String** | | [optional] | -|**mm** | **String** | | [optional] | -|**avb** | **String** | | [optional] | -|**vmw** | **String** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**uLowerCase** | **String** | uniMMR level | [optional] | +|**eq** | **String** | Account equity in USD | [optional] | +|**ae** | **String** | Actual equity without collateral rate in USD | [optional] | +|**im** | **String** | Total initial margin in USD | [optional] | +|**mm** | **String** | Total maintenance margin in USD | [optional] | +|**avb** | **String** | Total available balance in USD | [optional] | +|**vmw** | **String** | Virtual maxWithdraw amount in USD | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginCollateralRateResponseInner.md b/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginCollateralRateResponseInner.md index 8ea73dd3f..d540c04a9 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginCollateralRateResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginCollateralRateResponseInner.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**collateralRate** | **String** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**collateralRate** | **String** | collateral Rate. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginProBankruptcyLoanRepayRequest.md b/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginProBankruptcyLoanRepayRequest.md index 14f319f97..b28867a33 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginProBankruptcyLoanRepayRequest.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginProBankruptcyLoanRepayRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**from** | **String** | | [optional] | +|**from** | **From** | | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginProBankruptcyLoanRepayResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginProBankruptcyLoanRepayResponse.md index af6892650..799581e16 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginProBankruptcyLoanRepayResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginProBankruptcyLoanRepayResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tranId** | **Long** | | [optional] | +|**tranId** | **Long** | tran Id. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginProTieredCollateralRateResponseInner.md b/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginProTieredCollateralRateResponseInner.md index f47af2288..bc3f3397f 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginProTieredCollateralRateResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginProTieredCollateralRateResponseInner.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | +|**asset** | **String** | asset. | [optional] | |**collateralInfo** | [**List<PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner>**](PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner.md) | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner.md b/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner.md index 14ebf998c..aa07fdf57 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tierFloor** | **String** | | [optional] | -|**tierCap** | **String** | | [optional] | -|**collateralRate** | **String** | | [optional] | -|**cum** | **String** | | [optional] | +|**tierFloor** | **String** | tier Floor. | [optional] | +|**tierCap** | **String** | tier Cap. | [optional] | +|**collateralRate** | **String** | collateral Rate. | [optional] | +|**cum** | **String** | account equity quick addition number | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginAssetIndexPriceResponseInner.md b/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginAssetIndexPriceResponseInner.md index e932303e7..60a25fda8 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginAssetIndexPriceResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginAssetIndexPriceResponseInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**assetIndexPrice** | **String** | | [optional] | -|**time** | **Long** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**assetIndexPrice** | **String** | in USD | [optional] | +|**time** | **Long** | time. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginProBankruptcyLoanAmountResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginProBankruptcyLoanAmountResponse.md index 8e7485894..8a1374a5f 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginProBankruptcyLoanAmountResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginProBankruptcyLoanAmountResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**amount** | **String** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**amount** | **String** | portfolio margin bankruptcy loan amount in BUSD | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse.md index f1a4afc04..6281f4831 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**total** | **Long** | | [optional] | +|**total** | **Long** | total. | [optional] | |**rows** | [**List<QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner>**](QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner.md) | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner.md b/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner.md index bc1a08273..e8fc48dc9 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**amount** | **String** | | [optional] | -|**repayTime** | **Long** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**amount** | **String** | amount. | [optional] | +|**repayTime** | **Long** | repay Time. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner.md b/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner.md index 13c24c538..9853ce4fb 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**interest** | **String** | | [optional] | -|**interestAccruedTime** | **Long** | | [optional] | -|**interestRate** | **String** | | [optional] | -|**principal** | **String** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**interest** | **String** | interest amount | [optional] | +|**interestAccruedTime** | **Long** | interest Accrued Time. | [optional] | +|**interestRate** | **String** | daily interest rate | [optional] | +|**principal** | **String** | principal. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/RepayFuturesNegativeBalanceRequest.md b/clients/derivatives-trading-portfolio-margin-pro/docs/RepayFuturesNegativeBalanceRequest.md index 23cf3cf9e..df1f1fb09 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/RepayFuturesNegativeBalanceRequest.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/RepayFuturesNegativeBalanceRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**from** | **String** | | [optional] | +|**from** | **From** | | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/RepayFuturesNegativeBalanceResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/RepayFuturesNegativeBalanceResponse.md index 4fee43831..9e84f0f5a 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/RepayFuturesNegativeBalanceResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/RepayFuturesNegativeBalanceResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**msg** | **String** | | [optional] | +|**msg** | **String** | msg. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/Risklevelchange.md b/clients/derivatives-trading-portfolio-margin-pro/docs/Risklevelchange.md index 7865b406d..e53520a7a 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/Risklevelchange.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/Risklevelchange.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**uLowerCase** | **String** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**eq** | **String** | | [optional] | -|**ae** | **String** | | [optional] | -|**mLowerCase** | **String** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**uLowerCase** | **String** | uniMMR level | [optional] | +|**sLowerCase** | **String** | Risk level: MARGIN_CALL, REDUCE_ONLY, FORCE_LIQUIDATION | [optional] | +|**eq** | **String** | Account equity in USD value | [optional] | +|**ae** | **String** | Actual equity without collateral rate in USD value | [optional] | +|**mLowerCase** | **String** | Total maintenance margin in USD value | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/SetMarginCallLevelRequest.md b/clients/derivatives-trading-portfolio-margin-pro/docs/SetMarginCallLevelRequest.md index c4b0b9e13..f2e1fc7ce 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/SetMarginCallLevelRequest.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/SetMarginCallLevelRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**marginCallLevel** | **Double** | | | -|**recvWindow** | **Long** | | [optional] | +|**marginCallLevel** | **Double** | The value must be within the range [1.1, 2.0]. | | +|**recvWindow** | **Long** | Request validity window in milliseconds | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/SetMarginCallLevelResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/SetMarginCallLevelResponse.md index 896b6875a..7250edeee 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/SetMarginCallLevelResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/SetMarginCallLevelResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**marginCallLevel** | **String** | | [optional] | +|**marginCallLevel** | **String** | The margin call level that was set | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/SwitchDeltaModeRequest.md b/clients/derivatives-trading-portfolio-margin-pro/docs/SwitchDeltaModeRequest.md index e74fe5e3d..bd48e7d23 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/SwitchDeltaModeRequest.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/SwitchDeltaModeRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**deltaEnabled** | **String** | | | +|**deltaEnabled** | **DeltaEnabled** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/SwitchDeltaModeResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/SwitchDeltaModeResponse.md index 4ef7285f9..960e94fcb 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/SwitchDeltaModeResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/SwitchDeltaModeResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**msg** | **String** | | [optional] | +|**msg** | **String** | msg. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/TransferLdusdtRwusdForPortfolioMarginRequest.md b/clients/derivatives-trading-portfolio-margin-pro/docs/TransferLdusdtRwusdForPortfolioMarginRequest.md index ace75106d..3f8873997 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/TransferLdusdtRwusdForPortfolioMarginRequest.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/TransferLdusdtRwusdForPortfolioMarginRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | | -|**transferType** | **String** | | | +|**asset** | **Asset** | | | +|**transferType** | **TransferType** | | | |**amount** | **Double** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/TransferLdusdtRwusdForPortfolioMarginResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/TransferLdusdtRwusdForPortfolioMarginResponse.md index 86b588647..6c592b857 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/TransferLdusdtRwusdForPortfolioMarginResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/TransferLdusdtRwusdForPortfolioMarginResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**msg** | **String** | | [optional] | +|**msg** | **String** | msg. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/TransferSide.md b/clients/derivatives-trading-portfolio-margin-pro/docs/TransferSide.md new file mode 100644 index 000000000..b1bcc88bc --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/TransferSide.md @@ -0,0 +1,13 @@ + + +# TransferSide + +## Enum + + +* `TO_UM` (value: `"TO_UM"`) + +* `FROM_UM` (value: `"FROM_UM"`) + + + diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/TransferType.md b/clients/derivatives-trading-portfolio-margin-pro/docs/TransferType.md new file mode 100644 index 000000000..1b086620a --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/TransferType.md @@ -0,0 +1,13 @@ + + +# TransferType + +## Enum + + +* `EARN_TO_FUTURE` (value: `"EARN_TO_FUTURE"`) + +* `FUTURE_TO_EARN` (value: `"FUTURE_TO_EARN"`) + + + diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/UserDataStreamEventsResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/UserDataStreamEventsResponse.md index 0cee9edca..fcb14bb2d 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/UserDataStreamEventsResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/UserDataStreamEventsResponse.md @@ -7,16 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**uLowerCase** | **String** | | [optional] | -|**eq** | **String** | | [optional] | -|**ae** | **String** | | [optional] | -|**im** | **String** | | [optional] | -|**mm** | **String** | | [optional] | -|**avb** | **String** | | [optional] | -|**vmw** | **String** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**mLowerCase** | **String** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**uLowerCase** | **String** | uniMMR level | [optional] | +|**eq** | **String** | Account equity in USD value | [optional] | +|**ae** | **String** | Actual equity without collateral rate in USD value | [optional] | +|**im** | **String** | Total initial margin in USD | [optional] | +|**mm** | **String** | Total maintenance margin in USD | [optional] | +|**avb** | **String** | Total available balance in USD | [optional] | +|**vmw** | **String** | Virtual maxWithdraw amount in USD | [optional] | +|**sLowerCase** | **String** | Risk level: MARGIN_CALL, REDUCE_ONLY, FORCE_LIQUIDATION | [optional] | +|**mLowerCase** | **String** | Total maintenance margin in USD value | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/rest-api/migration-guide.md b/clients/derivatives-trading-portfolio-margin-pro/docs/rest-api/migration-guide.md index 63ce35f67..4c5649575 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/rest-api/migration-guide.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-derivatives-trading-portfolio-margin-pro - 7.0.0 + 8.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-derivatives-trading-portfolio-margin-pro - 7.0.0 + 8.0.0 ``` diff --git a/clients/derivatives-trading-portfolio-margin-pro/example_rest.md b/clients/derivatives-trading-portfolio-margin-pro/example_rest.md index f4982b278..1e68c7c10 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/example_rest.md +++ b/clients/derivatives-trading-portfolio-margin-pro/example_rest.md @@ -1,52 +1,52 @@ ## Account -[POST /sapi/v1/portfolio/bnb-transfer](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/BNB-transfer) - bnbTransfer - [BnbTransferExample.java:49](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/BnbTransferExample.java#L49) +[POST /sapi/v1/portfolio/bnb-transfer](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#bnb-transfer) - bnbTransfer - [BnbTransferExample.java:40](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/BnbTransferExample.java#L40) -[POST /sapi/v1/portfolio/repay-futures-switch](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Change-Auto-repay-futures-Status) - changeAutoRepayFuturesStatus - [ChangeAutoRepayFuturesStatusExample.java:48](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/ChangeAutoRepayFuturesStatusExample.java#L48) +[POST /sapi/v1/portfolio/repay-futures-switch](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#change-auto-repay-futures-status) - changeAutoRepayFuturesStatus - [ChangeAutoRepayFuturesStatusExample.java:38](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/ChangeAutoRepayFuturesStatusExample.java#L38) -[DELETE /sapi/v1/portfolio/margin-call-level](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Delete-Margin-Call-Level) - deleteMarginCallLevel - [DeleteMarginCallLevelExample.java:47](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/DeleteMarginCallLevelExample.java#L47) +[DELETE /sapi/v1/portfolio/margin-call-level](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#delete-margin-call-level) - deleteMarginCallLevel - [DeleteMarginCallLevelExample.java:37](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/DeleteMarginCallLevelExample.java#L37) -[POST /sapi/v1/portfolio/auto-collection](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Fund-Auto-collection) - fundAutoCollection - [FundAutoCollectionExample.java:50](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/FundAutoCollectionExample.java#L50) +[POST /sapi/v1/portfolio/auto-collection](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#fund-auto-collection) - fundAutoCollection - [FundAutoCollectionExample.java:39](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/FundAutoCollectionExample.java#L39) -[POST /sapi/v1/portfolio/asset-collection](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Fund-Collection-by-Asset) - fundCollectionByAsset - [FundCollectionByAssetExample.java:49](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/FundCollectionByAssetExample.java#L49) +[POST /sapi/v1/portfolio/asset-collection](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#fund-collection-by-asset) - fundCollectionByAsset - [FundCollectionByAssetExample.java:38](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/FundCollectionByAssetExample.java#L38) -[GET /sapi/v1/portfolio/repay-futures-switch](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Get-Auto-repay-futures-Status) - getAutoRepayFuturesStatus - [GetAutoRepayFuturesStatusExample.java:47](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetAutoRepayFuturesStatusExample.java#L47) +[GET /sapi/v1/portfolio/repay-futures-switch](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-auto-repay-futures-status) - getAutoRepayFuturesStatus - [GetAutoRepayFuturesStatusExample.java:36](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetAutoRepayFuturesStatusExample.java#L36) -[GET /sapi/v1/portfolio/delta-mode](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Get-Delta-Mode-Status) - getDeltaModeStatus - [GetDeltaModeStatusExample.java:47](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetDeltaModeStatusExample.java#L47) +[GET /sapi/v1/portfolio/delta-mode](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-delta-mode-status) - getDeltaModeStatus - [GetDeltaModeStatusExample.java:36](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetDeltaModeStatusExample.java#L36) -[GET /sapi/v1/portfolio/margin-call-level](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Get-Margin-Call-Level) - getMarginCallLevel - [GetMarginCallLevelExample.java:47](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetMarginCallLevelExample.java#L47) +[GET /sapi/v1/portfolio/margin-call-level](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-margin-call-level) - getMarginCallLevel - [GetMarginCallLevelExample.java:37](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetMarginCallLevelExample.java#L37) -[GET /sapi/v1/portfolio/balance](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Get-Classic-Portfolio-Margin-Balance-Info) - getPortfolioMarginProAccountBalance - [GetPortfolioMarginProAccountBalanceExample.java:47](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProAccountBalanceExample.java#L47) +[GET /sapi/v1/portfolio/balance](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-portfolio-margin-pro-account-balance) - getPortfolioMarginProAccountBalance - [GetPortfolioMarginProAccountBalanceExample.java:36](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProAccountBalanceExample.java#L36) -[GET /sapi/v1/portfolio/account](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Get-Classic-Portfolio-Margin-Account-Info) - getPortfolioMarginProAccountInfo - [GetPortfolioMarginProAccountInfoExample.java:47](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProAccountInfoExample.java#L47) +[GET /sapi/v1/portfolio/account](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-portfolio-margin-pro-account-info) - getPortfolioMarginProAccountInfo - [GetPortfolioMarginProAccountInfoExample.java:36](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProAccountInfoExample.java#L36) -[GET /sapi/v2/portfolio/account](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Get-Classic-Portfolio-Margin-Account-Info-V2) - getPortfolioMarginProSpanAccountInfo - [GetPortfolioMarginProSpanAccountInfoExample.java:48](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProSpanAccountInfoExample.java#L48) +[GET /sapi/v2/portfolio/account](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-portfolio-margin-pro-span-account-info) - getPortfolioMarginProSpanAccountInfo - [GetPortfolioMarginProSpanAccountInfoExample.java:37](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProSpanAccountInfoExample.java#L37) -[GET /sapi/v1/portfolio/earn-asset-balance](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Get-Transferable-Earn-Asset-Balance-for-Portfolio-Margin) - getTransferableEarnAssetBalanceForPortfolioMargin - [GetTransferableEarnAssetBalanceForPortfolioMarginExample.java:47](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetTransferableEarnAssetBalanceForPortfolioMarginExample.java#L47) +[GET /sapi/v1/portfolio/earn-asset-balance](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-transferable-earn-asset-balance-for-portfolio-margin) - getTransferableEarnAssetBalanceForPortfolioMargin - [GetTransferableEarnAssetBalanceForPortfolioMarginExample.java:38](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetTransferableEarnAssetBalanceForPortfolioMarginExample.java#L38) -[POST /sapi/v1/portfolio/repay](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Classic-Portfolio-Margin-Bankruptcy-Loan-Repay) - portfolioMarginProBankruptcyLoanRepay - [PortfolioMarginProBankruptcyLoanRepayExample.java:49](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/PortfolioMarginProBankruptcyLoanRepayExample.java#L49) +[POST /sapi/v1/portfolio/repay](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#portfolio-margin-pro-bankruptcy-loan-repay) - portfolioMarginProBankruptcyLoanRepay - [PortfolioMarginProBankruptcyLoanRepayExample.java:39](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/PortfolioMarginProBankruptcyLoanRepayExample.java#L39) -[GET /sapi/v1/portfolio/pmLoan](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Query-Classic-Portfolio-Margin-Bankruptcy-Loan-Amount) - queryPortfolioMarginProBankruptcyLoanAmount - [QueryPortfolioMarginProBankruptcyLoanAmountExample.java:48](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProBankruptcyLoanAmountExample.java#L48) +[GET /sapi/v1/portfolio/pmLoan](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#query-portfolio-margin-pro-bankruptcy-loan-amount) - queryPortfolioMarginProBankruptcyLoanAmount - [QueryPortfolioMarginProBankruptcyLoanAmountExample.java:38](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProBankruptcyLoanAmountExample.java#L38) -[GET /sapi/v1/portfolio/pmloan-history](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Query-Portfolio-Margin-Pro-Bankruptcy-Loan-Repay-History) - queryPortfolioMarginProBankruptcyLoanRepayHistory - [QueryPortfolioMarginProBankruptcyLoanRepayHistoryExample.java:52](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProBankruptcyLoanRepayHistoryExample.java#L52) +[GET /sapi/v1/portfolio/pmloan-history](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#query-portfolio-margin-pro-bankruptcy-loan-repay-history) - queryPortfolioMarginProBankruptcyLoanRepayHistory - [QueryPortfolioMarginProBankruptcyLoanRepayHistoryExample.java:41](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProBankruptcyLoanRepayHistoryExample.java#L41) -[GET /sapi/v1/portfolio/interest-history](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Query-Classic-Portfolio-Margin-Negative-Balance-Interest-History) - queryPortfolioMarginProNegativeBalanceInterestHistory - [QueryPortfolioMarginProNegativeBalanceInterestHistoryExample.java:47](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProNegativeBalanceInterestHistoryExample.java#L47) +[GET /sapi/v1/portfolio/interest-history](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#query-portfolio-margin-pro-negative-balance-interest-history) - queryPortfolioMarginProNegativeBalanceInterestHistory - [QueryPortfolioMarginProNegativeBalanceInterestHistoryExample.java:37](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProNegativeBalanceInterestHistoryExample.java#L37) -[POST /sapi/v1/portfolio/repay-futures-negative-balance](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Repay-futures-Negative-Balance) - repayFuturesNegativeBalance - [RepayFuturesNegativeBalanceExample.java:48](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/RepayFuturesNegativeBalanceExample.java#L48) +[POST /sapi/v1/portfolio/repay-futures-negative-balance](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#repay-futures-negative-balance) - repayFuturesNegativeBalance - [RepayFuturesNegativeBalanceExample.java:37](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/RepayFuturesNegativeBalanceExample.java#L37) -[POST /sapi/v1/portfolio/margin-call-level](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Set-Margin-Call-Level) - setMarginCallLevel - [SetMarginCallLevelExample.java:49](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/SetMarginCallLevelExample.java#L49) +[POST /sapi/v1/portfolio/margin-call-level](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#set-margin-call-level) - setMarginCallLevel - [SetMarginCallLevelExample.java:39](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/SetMarginCallLevelExample.java#L39) -[POST /sapi/v1/portfolio/delta-mode](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Switch-Delta-Mode) - switchDeltaMode - [SwitchDeltaModeExample.java:48](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/SwitchDeltaModeExample.java#L48) +[POST /sapi/v1/portfolio/delta-mode](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#switch-delta-mode) - switchDeltaMode - [SwitchDeltaModeExample.java:39](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/SwitchDeltaModeExample.java#L39) -[POST /sapi/v1/portfolio/earn-asset-transfer](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Transfer-LDUSDT-Portfolio-Margin) - transferLdusdtRwusdForPortfolioMargin - [TransferLdusdtRwusdForPortfolioMarginExample.java:48](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/TransferLdusdtRwusdForPortfolioMarginExample.java#L48) +[POST /sapi/v1/portfolio/earn-asset-transfer](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#transfer-ldusdt-rwusd-for-portfolio-margin) - transferLdusdtRwusdForPortfolioMargin - [TransferLdusdtRwusdForPortfolioMarginExample.java:40](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/TransferLdusdtRwusdForPortfolioMarginExample.java#L40) ## MarketData -[GET /sapi/v1/portfolio/margin-asset-leverage](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/market-data/Get-Portfolio-Margin-Asset-Leverage) - getPortfolioMarginAssetLeverage - [GetPortfolioMarginAssetLeverageExample.java:47](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/GetPortfolioMarginAssetLeverageExample.java#L47) +[GET /sapi/v1/portfolio/margin-asset-leverage](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/market-data#get-portfolio-margin-asset-leverage) - getPortfolioMarginAssetLeverage - [GetPortfolioMarginAssetLeverageExample.java:36](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/GetPortfolioMarginAssetLeverageExample.java#L36) -[GET /sapi/v1/portfolio/collateralRate](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/market-data/Classic-Portfolio-Margin-Collateral-Rate) - portfolioMarginCollateralRate - [PortfolioMarginCollateralRateExample.java:47](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/PortfolioMarginCollateralRateExample.java#L47) +[GET /sapi/v1/portfolio/collateralRate](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/market-data#portfolio-margin-collateral-rate) - portfolioMarginCollateralRate - [PortfolioMarginCollateralRateExample.java:36](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/PortfolioMarginCollateralRateExample.java#L36) -[GET /sapi/v2/portfolio/collateralRate](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/market-data/Portfolio-Margin-Pro-Tiered-Collateral-Rate) - portfolioMarginProTieredCollateralRate - [PortfolioMarginProTieredCollateralRateExample.java:47](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/PortfolioMarginProTieredCollateralRateExample.java#L47) +[GET /sapi/v2/portfolio/collateralRate](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/market-data#portfolio-margin-pro-tiered-collateral-rate) - portfolioMarginProTieredCollateralRate - [PortfolioMarginProTieredCollateralRateExample.java:36](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/PortfolioMarginProTieredCollateralRateExample.java#L36) -[GET /sapi/v1/portfolio/asset-index-price](https://developers.binance.com/docs/derivatives/portfolio-margin-pro/market-data/Query-Portfolio-Margin-Asset-Index-Price) - queryPortfolioMarginAssetIndexPrice - [QueryPortfolioMarginAssetIndexPriceExample.java:47](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/QueryPortfolioMarginAssetIndexPriceExample.java#L47) +[GET /sapi/v1/portfolio/asset-index-price](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/market-data#query-portfolio-margin-asset-index-price) - queryPortfolioMarginAssetIndexPrice - [QueryPortfolioMarginAssetIndexPriceExample.java:37](/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/QueryPortfolioMarginAssetIndexPriceExample.java#L37) diff --git a/clients/derivatives-trading-portfolio-margin-pro/pom.xml b/clients/derivatives-trading-portfolio-margin-pro/pom.xml index b45902c9b..5bee0ab5f 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/pom.xml +++ b/clients/derivatives-trading-portfolio-margin-pro/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-derivatives-trading-portfolio-margin-pro derivatives-trading-portfolio-margin-pro - 7.0.0 + 8.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/JSON.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/JSON.java index ddab52b93..5879d5cd5 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/JSON.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/AccountApi.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/AccountApi.java index 4d04bac09..46d6a68fe 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/AccountApi.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/AccountApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -49,6 +49,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.SwitchDeltaModeResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.TransferLdusdtRwusdForPortfolioMarginRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.TransferLdusdtRwusdForPortfolioMarginResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.TransferType; import com.google.gson.reflect.TypeToken; import jakarta.validation.ConstraintViolation; import jakarta.validation.Valid; @@ -72,7 +73,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-portfolio-margin-pro/7.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-portfolio-margin-pro/8.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -123,8 +124,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see BNB - * transfer(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#bnb-transfer">BNB + * transfer (USER_DATA) Documentation */ private okhttp3.Call bnbTransferCall(BnbTransferRequest bnbTransferRequest) throws ApiException { @@ -228,8 +229,9 @@ private okhttp3.Call bnbTransferValidateBeforeCall(BnbTransferRequest bnbTransfe } /** - * BNB transfer(USER_DATA) BNB transfer can be between Margin Account and USDM Account * You can - * only use this function 2 times per 10 minutes in a rolling manner Weight: 1500 + * BNB transfer (USER_DATA) BNB transfer can be between Margin Account and USDM Account + * Weight(IP): 1500 Security Type: USER_DATA Notes: - You can only use this function 2 times per + * 10 minutes in a rolling manner * * @param bnbTransferRequest (required) * @return ApiResponse<BnbTransferResponse> @@ -243,8 +245,8 @@ private okhttp3.Call bnbTransferValidateBeforeCall(BnbTransferRequest bnbTransfe * * * @see BNB - * transfer(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#bnb-transfer">BNB + * transfer (USER_DATA) Documentation */ public ApiResponse bnbTransfer( @Valid @NotNull BnbTransferRequest bnbTransferRequest) throws ApiException { @@ -268,8 +270,8 @@ public ApiResponse bnbTransfer( * * * @see Change - * Auto-repay-futures Status(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#change-auto-repay-futures-status">Change + * Auto-repay-futures Status (TRADE) Documentation */ private okhttp3.Call changeAutoRepayFuturesStatusCall( ChangeAutoRepayFuturesStatusRequest changeAutoRepayFuturesStatusRequest) @@ -374,7 +376,8 @@ private okhttp3.Call changeAutoRepayFuturesStatusValidateBeforeCall( } /** - * Change Auto-repay-futures Status(TRADE) Change Auto-repay-futures Status Weight: 1500 + * Change Auto-repay-futures Status (TRADE) Change Auto-repay-futures Status Weight(IP): 1500 + * Security Type: TRADE * * @param changeAutoRepayFuturesStatusRequest (required) * @return ApiResponse<ChangeAutoRepayFuturesStatusResponse> @@ -388,8 +391,8 @@ private okhttp3.Call changeAutoRepayFuturesStatusValidateBeforeCall( * * * @see Change - * Auto-repay-futures Status(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#change-auto-repay-futures-status">Change + * Auto-repay-futures Status (TRADE) Documentation */ public ApiResponse changeAutoRepayFuturesStatus( @Valid @NotNull ChangeAutoRepayFuturesStatusRequest changeAutoRepayFuturesStatusRequest) @@ -404,7 +407,7 @@ public ApiResponse changeAutoRepayFuturesS /** * Build call for deleteMarginCallLevel * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -415,7 +418,7 @@ public ApiResponse changeAutoRepayFuturesS * * * @see Delete + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#delete-margin-call-level">Delete * Margin Call Level (USER_DATA) Documentation */ private okhttp3.Call deleteMarginCallLevelCall(Long recvWindow) throws ApiException { @@ -510,9 +513,9 @@ private okhttp3.Call deleteMarginCallLevelValidateBeforeCall(Long recvWindow) /** * Delete Margin Call Level (USER_DATA) Delete the margin call level for a Portfolio Margin - * account. Weight: 1500 + * account. Weight(IP): 1500 Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<DeleteMarginCallLevelResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -524,11 +527,11 @@ private okhttp3.Call deleteMarginCallLevelValidateBeforeCall(Long recvWindow) * * * @see Delete + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#delete-margin-call-level">Delete * Margin Call Level (USER_DATA) Documentation */ - public ApiResponse deleteMarginCallLevel(Long recvWindow) - throws ApiException { + public ApiResponse deleteMarginCallLevel( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = deleteMarginCallLevelValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -538,7 +541,7 @@ public ApiResponse deleteMarginCallLevel(Long rec /** * Build call for fundAutoCollection * - * @param fundAutoCollectionRequest (required) + * @param fundAutoCollectionRequest (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -549,8 +552,8 @@ public ApiResponse deleteMarginCallLevel(Long rec * * * @see Fund - * Auto-collection(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#fund-auto-collection">Fund + * Auto-collection (USER_DATA) Documentation */ private okhttp3.Call fundAutoCollectionCall(FundAutoCollectionRequest fundAutoCollectionRequest) throws ApiException { @@ -646,11 +649,12 @@ private okhttp3.Call fundAutoCollectionValidateBeforeCall( } /** - * Fund Auto-collection(USER_DATA) Transfers all assets from Futures Account to Margin account * - * The BNB would not be collected from UM-PM account to the Portfolio Margin account. * You can - * only use this function 500 times per hour in a rolling manner. Weight: 1500 + * Fund Auto-collection (USER_DATA) Transfers all assets from Futures Account to Margin account + * Weight(IP): 1500 Security Type: USER_DATA Notes: - The BNB would not be collected from UM-PM + * account to the Portfolio Margin account. - You can only use this function 500 times per hour + * in a rolling manner. * - * @param fundAutoCollectionRequest (required) + * @param fundAutoCollectionRequest (optional) * @return ApiResponse<FundAutoCollectionResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -662,12 +666,11 @@ private okhttp3.Call fundAutoCollectionValidateBeforeCall( * * * @see Fund - * Auto-collection(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#fund-auto-collection">Fund + * Auto-collection (USER_DATA) Documentation */ public ApiResponse fundAutoCollection( - @Valid @NotNull FundAutoCollectionRequest fundAutoCollectionRequest) - throws ApiException { + @Valid FundAutoCollectionRequest fundAutoCollectionRequest) throws ApiException { okhttp3.Call localVarCall = fundAutoCollectionValidateBeforeCall(fundAutoCollectionRequest); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -688,8 +691,8 @@ public ApiResponse fundAutoCollection( * * * @see Fund - * Collection by Asset(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#fund-collection-by-asset">Fund + * Collection by Asset (USER_DATA) Documentation */ private okhttp3.Call fundCollectionByAssetCall( FundCollectionByAssetRequest fundCollectionByAssetRequest) throws ApiException { @@ -789,8 +792,8 @@ private okhttp3.Call fundCollectionByAssetValidateBeforeCall( } /** - * Fund Collection by Asset(USER_DATA) Transfers specific asset from Futures Account to Margin - * account * The BNB transfer is not be supported Weight: 60 + * Fund Collection by Asset (USER_DATA) Transfers specific asset from Futures Account to Margin + * account Weight(IP): 60 Security Type: USER_DATA Notes: - The BNB transfer is not be supported * * @param fundCollectionByAssetRequest (required) * @return ApiResponse<FundCollectionByAssetResponse> @@ -804,8 +807,8 @@ private okhttp3.Call fundCollectionByAssetValidateBeforeCall( * * * @see Fund - * Collection by Asset(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#fund-collection-by-asset">Fund + * Collection by Asset (USER_DATA) Documentation */ public ApiResponse fundCollectionByAsset( @Valid @NotNull FundCollectionByAssetRequest fundCollectionByAssetRequest) @@ -831,8 +834,8 @@ public ApiResponse fundCollectionByAsset( * * * @see Get - * Auto-repay-futures Status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-auto-repay-futures-status">Get + * Auto-repay-futures Status (USER_DATA) Documentation */ private okhttp3.Call getAutoRepayFuturesStatusCall(Long recvWindow) throws ApiException { String basePath = null; @@ -925,7 +928,8 @@ private okhttp3.Call getAutoRepayFuturesStatusValidateBeforeCall(Long recvWindow } /** - * Get Auto-repay-futures Status(USER_DATA) Query Auto-repay-futures Status Weight: 30 + * Get Auto-repay-futures Status (USER_DATA) Query Auto-repay-futures Status Weight(IP): 30 + * Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetAutoRepayFuturesStatusResponse> @@ -939,8 +943,8 @@ private okhttp3.Call getAutoRepayFuturesStatusValidateBeforeCall(Long recvWindow * * * @see Get - * Auto-repay-futures Status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-auto-repay-futures-status">Get + * Auto-repay-futures Status (USER_DATA) Documentation */ public ApiResponse getAutoRepayFuturesStatus(Long recvWindow) throws ApiException { @@ -964,8 +968,8 @@ public ApiResponse getAutoRepayFuturesStatus( * * * @see Get - * Delta Mode Status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-delta-mode-status">Get + * Delta Mode Status (USER_DATA) Documentation */ private okhttp3.Call getDeltaModeStatusCall(Long recvWindow) throws ApiException { String basePath = null; @@ -1057,7 +1061,8 @@ private okhttp3.Call getDeltaModeStatusValidateBeforeCall(Long recvWindow) throw } /** - * Get Delta Mode Status(USER_DATA) Query the Delta mode status of current account. Weight: 1500 + * Get Delta Mode Status (USER_DATA) Query the Delta mode status of current account. Weight(IP): + * 1500 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetDeltaModeStatusResponse> @@ -1071,8 +1076,8 @@ private okhttp3.Call getDeltaModeStatusValidateBeforeCall(Long recvWindow) throw * * * @see Get - * Delta Mode Status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-delta-mode-status">Get + * Delta Mode Status (USER_DATA) Documentation */ public ApiResponse getDeltaModeStatus(Long recvWindow) throws ApiException { @@ -1085,7 +1090,7 @@ public ApiResponse getDeltaModeStatus(Long recvWindo /** * Build call for getMarginCallLevel * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1096,7 +1101,7 @@ public ApiResponse getDeltaModeStatus(Long recvWindo * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-margin-call-level">Get * Margin Call Level (USER_DATA) Documentation */ private okhttp3.Call getMarginCallLevelCall(Long recvWindow) throws ApiException { @@ -1190,9 +1195,9 @@ private okhttp3.Call getMarginCallLevelValidateBeforeCall(Long recvWindow) throw /** * Get Margin Call Level (USER_DATA) Get the margin call level for a Portfolio Margin account. - * Weight: 1500 + * Weight(IP): 1500 Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetMarginCallLevelResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1204,10 +1209,10 @@ private okhttp3.Call getMarginCallLevelValidateBeforeCall(Long recvWindow) throw * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-margin-call-level">Get * Margin Call Level (USER_DATA) Documentation */ - public ApiResponse getMarginCallLevel(Long recvWindow) + public ApiResponse getMarginCallLevel(@Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getMarginCallLevelValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1230,8 +1235,8 @@ public ApiResponse getMarginCallLevel(Long recvWindo * * * @see Get - * Portfolio Margin Pro Account Balance(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-portfolio-margin-pro-account-balance">Get + * Portfolio Margin Pro Account Balance (USER_DATA) Documentation */ private okhttp3.Call getPortfolioMarginProAccountBalanceCall(String asset, Long recvWindow) throws ApiException { @@ -1334,8 +1339,8 @@ private okhttp3.Call getPortfolioMarginProAccountBalanceValidateBeforeCall( } /** - * Get Portfolio Margin Pro Account Balance(USER_DATA) Query Portfolio Margin Pro account - * balance Weight: 20 + * Get Portfolio Margin Pro Account Balance (USER_DATA) Query Portfolio Margin Pro account + * balance Weight(IP): 20 Security Type: USER_DATA * * @param asset (optional) * @param recvWindow (optional) @@ -1350,8 +1355,8 @@ private okhttp3.Call getPortfolioMarginProAccountBalanceValidateBeforeCall( * * * @see Get - * Portfolio Margin Pro Account Balance(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-portfolio-margin-pro-account-balance">Get + * Portfolio Margin Pro Account Balance (USER_DATA) Documentation */ public ApiResponse getPortfolioMarginProAccountBalance(String asset, Long recvWindow) throws ApiException { @@ -1376,8 +1381,8 @@ private okhttp3.Call getPortfolioMarginProAccountBalanceValidateBeforeCall( * * * @see Get - * Portfolio Margin Pro Account Info(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-portfolio-margin-pro-account-info">Get + * Portfolio Margin Pro Account Info (USER_DATA) Documentation */ private okhttp3.Call getPortfolioMarginProAccountInfoCall(Long recvWindow) throws ApiException { String basePath = null; @@ -1471,8 +1476,8 @@ private okhttp3.Call getPortfolioMarginProAccountInfoValidateBeforeCall(Long rec } /** - * Get Portfolio Margin Pro Account Info(USER_DATA) Get Portfolio Margin Pro Account Info - * Weight: 5 + * Get Portfolio Margin Pro Account Info (USER_DATA) Get Portfolio Margin Pro Account Info + * Weight(UID): 5 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetPortfolioMarginProAccountInfoResponse> @@ -1486,8 +1491,8 @@ private okhttp3.Call getPortfolioMarginProAccountInfoValidateBeforeCall(Long rec * * * @see Get - * Portfolio Margin Pro Account Info(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-portfolio-margin-pro-account-info">Get + * Portfolio Margin Pro Account Info (USER_DATA) Documentation */ public ApiResponse getPortfolioMarginProAccountInfo( Long recvWindow) throws ApiException { @@ -1511,8 +1516,8 @@ public ApiResponse getPortfolioMarginP * * * @see Get - * Portfolio Margin Pro SPAN Account Info(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-portfolio-margin-pro-span-account-info">Get + * Portfolio Margin Pro SPAN Account Info (USER_DATA) Documentation */ private okhttp3.Call getPortfolioMarginProSpanAccountInfoCall(Long recvWindow) throws ApiException { @@ -1607,8 +1612,8 @@ private okhttp3.Call getPortfolioMarginProSpanAccountInfoValidateBeforeCall(Long } /** - * Get Portfolio Margin Pro SPAN Account Info(USER_DATA) Get Portfolio Margin Pro SPAN Account - * Info (For Portfolio Margin Pro SPAN users only) Weight: 5 + * Get Portfolio Margin Pro SPAN Account Info (USER_DATA) Get Portfolio Margin Pro SPAN Account + * Info (For Portfolio Margin Pro SPAN users only) Weight(IP): 5 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetPortfolioMarginProSpanAccountInfoResponse> @@ -1622,8 +1627,8 @@ private okhttp3.Call getPortfolioMarginProSpanAccountInfoValidateBeforeCall(Long * * * @see Get - * Portfolio Margin Pro SPAN Account Info(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-portfolio-margin-pro-span-account-info">Get + * Portfolio Margin Pro SPAN Account Info (USER_DATA) Documentation */ public ApiResponse getPortfolioMarginProSpanAccountInfo(Long recvWindow) throws ApiException { @@ -1638,7 +1643,7 @@ private okhttp3.Call getPortfolioMarginProSpanAccountInfoValidateBeforeCall(Long * Build call for getTransferableEarnAssetBalanceForPortfolioMargin * * @param asset `LDUSDT` only (required) - * @param transferType `EARN_TO_FUTURE` /`FUTURE_TO_EARN` (required) + * @param transferType (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1650,11 +1655,11 @@ private okhttp3.Call getPortfolioMarginProSpanAccountInfoValidateBeforeCall(Long * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-transferable-earn-asset-balance-for-portfolio-margin">Get * Transferable Earn Asset Balance for Portfolio Margin (USER_DATA) Documentation */ private okhttp3.Call getTransferableEarnAssetBalanceForPortfolioMarginCall( - String asset, String transferType, Long recvWindow) throws ApiException { + String asset, TransferType transferType, Long recvWindow) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] {}; @@ -1724,7 +1729,7 @@ private okhttp3.Call getTransferableEarnAssetBalanceForPortfolioMarginCall( @SuppressWarnings("rawtypes") private okhttp3.Call getTransferableEarnAssetBalanceForPortfolioMarginValidateBeforeCall( - String asset, String transferType, Long recvWindow) throws ApiException { + String asset, TransferType transferType, Long recvWindow) throws ApiException { try { Validator validator = Validation.byDefaultProvider() @@ -1740,7 +1745,7 @@ private okhttp3.Call getTransferableEarnAssetBalanceForPortfolioMarginValidateBe .getMethod( "getTransferableEarnAssetBalanceForPortfolioMargin", String.class, - String.class, + TransferType.class, Long.class); Set> violations = executableValidator.validateParameters(this, method, parameterValues); @@ -1762,10 +1767,11 @@ private okhttp3.Call getTransferableEarnAssetBalanceForPortfolioMarginValidateBe /** * Get Transferable Earn Asset Balance for Portfolio Margin (USER_DATA) Get transferable earn - * asset balance for all types of Portfolio Margin account Weight: 1500 + * asset balance for all types of Portfolio Margin account Weight(IP): 1500 Security Type: + * USER_DATA * * @param asset `LDUSDT` only (required) - * @param transferType `EARN_TO_FUTURE` /`FUTURE_TO_EARN` (required) + * @param transferType (required) * @param recvWindow (optional) * @return ApiResponse<GetTransferableEarnAssetBalanceForPortfolioMarginResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1778,12 +1784,12 @@ private okhttp3.Call getTransferableEarnAssetBalanceForPortfolioMarginValidateBe * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-transferable-earn-asset-balance-for-portfolio-margin">Get * Transferable Earn Asset Balance for Portfolio Margin (USER_DATA) Documentation */ public ApiResponse getTransferableEarnAssetBalanceForPortfolioMargin( - @NotNull String asset, @NotNull String transferType, Long recvWindow) + @NotNull String asset, @NotNull TransferType transferType, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getTransferableEarnAssetBalanceForPortfolioMarginValidateBeforeCall( @@ -1797,7 +1803,7 @@ private okhttp3.Call getTransferableEarnAssetBalanceForPortfolioMarginValidateBe /** * Build call for portfolioMarginProBankruptcyLoanRepay * - * @param portfolioMarginProBankruptcyLoanRepayRequest (required) + * @param portfolioMarginProBankruptcyLoanRepayRequest (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1808,8 +1814,8 @@ private okhttp3.Call getTransferableEarnAssetBalanceForPortfolioMarginValidateBe * * * @see Portfolio - * Margin Pro Bankruptcy Loan Repay Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#portfolio-margin-pro-bankruptcy-loan-repay">Portfolio + * Margin Pro Bankruptcy Loan Repay (TRADE) Documentation */ private okhttp3.Call portfolioMarginProBankruptcyLoanRepayCall( PortfolioMarginProBankruptcyLoanRepayRequest @@ -1917,11 +1923,11 @@ private okhttp3.Call portfolioMarginProBankruptcyLoanRepayValidateBeforeCall( } /** - * Portfolio Margin Pro Bankruptcy Loan Repay Repay Portfolio Margin Pro Bankruptcy Loan * - * Please note that the API Key has enabled Spot & Margin Trading permissions to access this - * endpoint. Weight: 3000 + * Portfolio Margin Pro Bankruptcy Loan Repay (TRADE) Repay Portfolio Margin Pro Bankruptcy Loan + * Weight(UID): 3000 Security Type: TRADE Notes: - Please note that the API Key has enabled Spot + * & Margin Trading permissions to access this endpoint. * - * @param portfolioMarginProBankruptcyLoanRepayRequest (required) + * @param portfolioMarginProBankruptcyLoanRepayRequest (optional) * @return ApiResponse<PortfolioMarginProBankruptcyLoanRepayResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1933,12 +1939,12 @@ private okhttp3.Call portfolioMarginProBankruptcyLoanRepayValidateBeforeCall( * * * @see Portfolio - * Margin Pro Bankruptcy Loan Repay Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#portfolio-margin-pro-bankruptcy-loan-repay">Portfolio + * Margin Pro Bankruptcy Loan Repay (TRADE) Documentation */ public ApiResponse portfolioMarginProBankruptcyLoanRepay( - @Valid @NotNull + @Valid PortfolioMarginProBankruptcyLoanRepayRequest portfolioMarginProBankruptcyLoanRepayRequest) throws ApiException { @@ -1964,8 +1970,8 @@ private okhttp3.Call portfolioMarginProBankruptcyLoanRepayValidateBeforeCall( * * * @see Query - * Portfolio Margin Pro Bankruptcy Loan Amount(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#query-portfolio-margin-pro-bankruptcy-loan-amount">Query + * Portfolio Margin Pro Bankruptcy Loan Amount (USER_DATA) Documentation */ private okhttp3.Call queryPortfolioMarginProBankruptcyLoanAmountCall(Long recvWindow) throws ApiException { @@ -2061,9 +2067,9 @@ private okhttp3.Call queryPortfolioMarginProBankruptcyLoanAmountValidateBeforeCa } /** - * Query Portfolio Margin Pro Bankruptcy Loan Amount(USER_DATA) Query Portfolio Margin Pro - * Bankruptcy Loan Amount * If there’s no classic portfolio margin bankruptcy loan, the amount - * would be 0 Weight: 500 + * Query Portfolio Margin Pro Bankruptcy Loan Amount (USER_DATA) Query Portfolio Margin Pro + * Bankruptcy Loan Amount Weight(UID): 500 Security Type: USER_DATA Notes: - If there’s no + * classic portfolio margin bankruptcy loan, the amount would be 0 * * @param recvWindow (optional) * @return ApiResponse<QueryPortfolioMarginProBankruptcyLoanAmountResponse> @@ -2077,8 +2083,8 @@ private okhttp3.Call queryPortfolioMarginProBankruptcyLoanAmountValidateBeforeCa * * * @see Query - * Portfolio Margin Pro Bankruptcy Loan Amount(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#query-portfolio-margin-pro-bankruptcy-loan-amount">Query + * Portfolio Margin Pro Bankruptcy Loan Amount (USER_DATA) Documentation */ public ApiResponse queryPortfolioMarginProBankruptcyLoanAmount(Long recvWindow) throws ApiException { @@ -2092,10 +2098,10 @@ private okhttp3.Call queryPortfolioMarginProBankruptcyLoanAmountValidateBeforeCa /** * Build call for queryPortfolioMarginProBankruptcyLoanRepayHistory * - * @param startTime (optional) - * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param size Number of results returned. (optional) + * @param current Currently querying page. Start from 1. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2107,11 +2113,11 @@ private okhttp3.Call queryPortfolioMarginProBankruptcyLoanAmountValidateBeforeCa * * * @see Query - * Portfolio Margin Pro Bankruptcy Loan Repay History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#query-portfolio-margin-pro-bankruptcy-loan-repay-history">Query + * Portfolio Margin Pro Bankruptcy Loan Repay History (USER_DATA) Documentation */ private okhttp3.Call queryPortfolioMarginProBankruptcyLoanRepayHistoryCall( - Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long startTime, Long endTime, Long size, Long current, Long recvWindow) throws ApiException { String basePath = null; // Operation Servers @@ -2145,14 +2151,14 @@ private okhttp3.Call queryPortfolioMarginProBankruptcyLoanRepayHistoryCall( localVarQueryParams.addAll(localVarApiClient.parameterToPair("endTime", endTime)); } - if (current != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("current", current)); - } - if (size != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); } + if (current != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("current", current)); + } + if (recvWindow != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); } @@ -2189,7 +2195,7 @@ private okhttp3.Call queryPortfolioMarginProBankruptcyLoanRepayHistoryCall( @SuppressWarnings("rawtypes") private okhttp3.Call queryPortfolioMarginProBankruptcyLoanRepayHistoryValidateBeforeCall( - Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long startTime, Long endTime, Long size, Long current, Long recvWindow) throws ApiException { try { Validator validator = @@ -2200,7 +2206,7 @@ private okhttp3.Call queryPortfolioMarginProBankruptcyLoanRepayHistoryValidateBe .getValidator(); ExecutableValidator executableValidator = validator.forExecutables(); - Object[] parameterValues = {startTime, endTime, current, size, recvWindow}; + Object[] parameterValues = {startTime, endTime, size, current, recvWindow}; Method method = this.getClass() .getMethod( @@ -2215,7 +2221,7 @@ private okhttp3.Call queryPortfolioMarginProBankruptcyLoanRepayHistoryValidateBe if (violations.size() == 0) { return queryPortfolioMarginProBankruptcyLoanRepayHistoryCall( - startTime, endTime, current, size, recvWindow); + startTime, endTime, size, current, recvWindow); } else { throw new ConstraintViolationException((Set) violations); } @@ -2229,18 +2235,18 @@ private okhttp3.Call queryPortfolioMarginProBankruptcyLoanRepayHistoryValidateBe } /** - * Query Portfolio Margin Pro Bankruptcy Loan Repay History(USER_DATA) Query repay history of - * pmloan for portfolio margin pro. * `startTime` and `endTime` cannot be - * longer than 360 days * If `startTime` and `endTime` not sent, return - * records of the last 30 days by default. * If `startTime`is sent and - * `endTime` is not sent, return records of [startTime, startTime+30d]. * If - * `startTime` is not sent and `endTime` is sent, return records of - * [endTime-30d, endTime]. Weight: 500 - * - * @param startTime (optional) - * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) + * Query Portfolio Margin Pro Bankruptcy Loan Repay History (USER_DATA) Query repay history of + * pmloan for portfolio margin pro. Weight(IP): 500 Security Type: USER_DATA Notes: - + * `startTime` and `endTime` cannot be longer than 360 days - If + * `startTime` and `endTime` not sent, return records of the last 30 days by + * default. - If `startTime`is sent and `endTime` is not sent, return + * records of [startTime, startTime+30d]. - If `startTime` is not sent and + * `endTime` is sent, return records of [endTime-30d, endTime]. + * + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param size Number of results returned. (optional) + * @param current Currently querying page. Start from 1. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2253,16 +2259,20 @@ private okhttp3.Call queryPortfolioMarginProBankruptcyLoanRepayHistoryValidateBe * * * @see Query - * Portfolio Margin Pro Bankruptcy Loan Repay History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#query-portfolio-margin-pro-bankruptcy-loan-repay-history">Query + * Portfolio Margin Pro Bankruptcy Loan Repay History (USER_DATA) Documentation */ public ApiResponse queryPortfolioMarginProBankruptcyLoanRepayHistory( - Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long startTime, + Long endTime, + @Max(100L) Long size, + @Min(1L) Long current, + Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryPortfolioMarginProBankruptcyLoanRepayHistoryValidateBeforeCall( - startTime, endTime, current, size, recvWindow); + startTime, endTime, size, current, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken< QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse>() {}.getType(); @@ -2273,9 +2283,9 @@ private okhttp3.Call queryPortfolioMarginProBankruptcyLoanRepayHistoryValidateBe * Build call for queryPortfolioMarginProNegativeBalanceInterestHistory * * @param asset (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param size Default:10 Max:100 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param size Number of results returned. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2287,8 +2297,8 @@ private okhttp3.Call queryPortfolioMarginProBankruptcyLoanRepayHistoryValidateBe * * * @see Query - * Portfolio Margin Pro Negative Balance Interest History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#query-portfolio-margin-pro-negative-balance-interest-history">Query + * Portfolio Margin Pro Negative Balance Interest History (USER_DATA) Documentation */ private okhttp3.Call queryPortfolioMarginProNegativeBalanceInterestHistoryCall( String asset, Long startTime, Long endTime, Long size, Long recvWindow) @@ -2409,13 +2419,13 @@ private okhttp3.Call queryPortfolioMarginProNegativeBalanceInterestHistoryValida } /** - * Query Portfolio Margin Pro Negative Balance Interest History(USER_DATA) Query interest - * history of negative balance for portfolio margin. Weight: 50 + * Query Portfolio Margin Pro Negative Balance Interest History (USER_DATA) Query interest + * history of negative balance for portfolio margin. Weight(IP): 50 Security Type: USER_DATA * * @param asset (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param size Default:10 Max:100 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param size Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryPortfolioMarginProNegativeBalanceInterestHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2428,12 +2438,16 @@ private okhttp3.Call queryPortfolioMarginProNegativeBalanceInterestHistoryValida * * * @see Query - * Portfolio Margin Pro Negative Balance Interest History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#query-portfolio-margin-pro-negative-balance-interest-history">Query + * Portfolio Margin Pro Negative Balance Interest History (USER_DATA) Documentation */ public ApiResponse queryPortfolioMarginProNegativeBalanceInterestHistory( - String asset, Long startTime, Long endTime, Long size, Long recvWindow) + String asset, + Long startTime, + Long endTime, + @Max(100L) Long size, + Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryPortfolioMarginProNegativeBalanceInterestHistoryValidateBeforeCall( @@ -2447,7 +2461,7 @@ private okhttp3.Call queryPortfolioMarginProNegativeBalanceInterestHistoryValida /** * Build call for repayFuturesNegativeBalance * - * @param repayFuturesNegativeBalanceRequest (required) + * @param repayFuturesNegativeBalanceRequest (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2458,8 +2472,8 @@ private okhttp3.Call queryPortfolioMarginProNegativeBalanceInterestHistoryValida * * * @see Repay - * futures Negative Balance(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#repay-futures-negative-balance">Repay + * futures Negative Balance (USER_DATA) Documentation */ private okhttp3.Call repayFuturesNegativeBalanceCall( RepayFuturesNegativeBalanceRequest repayFuturesNegativeBalanceRequest) @@ -2564,9 +2578,10 @@ private okhttp3.Call repayFuturesNegativeBalanceValidateBeforeCall( } /** - * Repay futures Negative Balance(USER_DATA) Repay futures Negative Balance Weight: 1500 + * Repay futures Negative Balance (USER_DATA) Repay futures Negative Balance Weight(IP): 1500 + * Security Type: USER_DATA * - * @param repayFuturesNegativeBalanceRequest (required) + * @param repayFuturesNegativeBalanceRequest (optional) * @return ApiResponse<RepayFuturesNegativeBalanceResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2578,11 +2593,11 @@ private okhttp3.Call repayFuturesNegativeBalanceValidateBeforeCall( * * * @see Repay - * futures Negative Balance(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#repay-futures-negative-balance">Repay + * futures Negative Balance (USER_DATA) Documentation */ public ApiResponse repayFuturesNegativeBalance( - @Valid @NotNull RepayFuturesNegativeBalanceRequest repayFuturesNegativeBalanceRequest) + @Valid RepayFuturesNegativeBalanceRequest repayFuturesNegativeBalanceRequest) throws ApiException { okhttp3.Call localVarCall = repayFuturesNegativeBalanceValidateBeforeCall(repayFuturesNegativeBalanceRequest); @@ -2605,7 +2620,7 @@ public ApiResponse repayFuturesNegativeBala * * * @see Set + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#set-margin-call-level">Set * Margin Call Level (USER_DATA) Documentation */ private okhttp3.Call setMarginCallLevelCall(SetMarginCallLevelRequest setMarginCallLevelRequest) @@ -2711,7 +2726,7 @@ private okhttp3.Call setMarginCallLevelValidateBeforeCall( /** * Set Margin Call Level (USER_DATA) Set the margin call level for a Portfolio Margin account. * When the account's uniMMR drops to the specified level, a notification will be sent via - * email and SMS. Weight: 1500 + * email and SMS. Weight(IP): 1500 Security Type: USER_DATA * * @param setMarginCallLevelRequest (required) * @return ApiResponse<SetMarginCallLevelResponse> @@ -2725,7 +2740,7 @@ private okhttp3.Call setMarginCallLevelValidateBeforeCall( * * * @see Set + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#set-margin-call-level">Set * Margin Call Level (USER_DATA) Documentation */ public ApiResponse setMarginCallLevel( @@ -2751,8 +2766,8 @@ public ApiResponse setMarginCallLevel( * * * @see Switch - * Delta Mode(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#switch-delta-mode">Switch + * Delta Mode (TRADE) Documentation */ private okhttp3.Call switchDeltaModeCall(SwitchDeltaModeRequest switchDeltaModeRequest) throws ApiException { @@ -2851,8 +2866,8 @@ private okhttp3.Call switchDeltaModeValidateBeforeCall( } /** - * Switch Delta Mode(TRADE) Switch the Delta mode for existing PM PRO / PM RETAIL accounts. - * Weight: 1500 + * Switch Delta Mode (TRADE) Switch the Delta mode for existing PM PRO / PM RETAIL accounts. + * Weight(IP): 1500 Security Type: TRADE * * @param switchDeltaModeRequest (required) * @return ApiResponse<SwitchDeltaModeResponse> @@ -2866,8 +2881,8 @@ private okhttp3.Call switchDeltaModeValidateBeforeCall( * * * @see Switch - * Delta Mode(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#switch-delta-mode">Switch + * Delta Mode (TRADE) Documentation */ public ApiResponse switchDeltaMode( @Valid @NotNull SwitchDeltaModeRequest switchDeltaModeRequest) throws ApiException { @@ -2891,8 +2906,8 @@ public ApiResponse switchDeltaMode( * * * @see Transfer - * LDUSDT/RWUSD for Portfolio Margin(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#transfer-ldusdt-rwusd-for-portfolio-margin">Transfer + * LDUSDT/RWUSD for Portfolio Margin (TRADE) Documentation */ private okhttp3.Call transferLdusdtRwusdForPortfolioMarginCall( TransferLdusdtRwusdForPortfolioMarginRequest @@ -3013,8 +3028,8 @@ private okhttp3.Call transferLdusdtRwusdForPortfolioMarginValidateBeforeCall( } /** - * Transfer LDUSDT/RWUSD for Portfolio Margin(TRADE) Transfer LDUSDT/RWUSD as collateral for all - * types of Portfolio Margin account Weight: 1500 + * Transfer LDUSDT/RWUSD for Portfolio Margin (TRADE) Transfer LDUSDT/RWUSD as collateral for + * all types of Portfolio Margin account Weight(UID): 1500 Security Type: TRADE * * @param transferLdusdtRwusdForPortfolioMarginRequest (required) * @return ApiResponse<TransferLdusdtRwusdForPortfolioMarginResponse> @@ -3028,8 +3043,8 @@ private okhttp3.Call transferLdusdtRwusdForPortfolioMarginValidateBeforeCall( * * * @see Transfer - * LDUSDT/RWUSD for Portfolio Margin(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#transfer-ldusdt-rwusd-for-portfolio-margin">Transfer + * LDUSDT/RWUSD for Portfolio Margin (TRADE) Documentation */ public ApiResponse transferLdusdtRwusdForPortfolioMargin( diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/DerivativesTradingPortfolioMarginProRestApi.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/DerivativesTradingPortfolioMarginProRestApi.java index a2eca42e3..6d1321dc6 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/DerivativesTradingPortfolioMarginProRestApi.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/DerivativesTradingPortfolioMarginProRestApi.java @@ -38,6 +38,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.SwitchDeltaModeResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.TransferLdusdtRwusdForPortfolioMarginRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.TransferLdusdtRwusdForPortfolioMarginResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.TransferType; public class DerivativesTradingPortfolioMarginProRestApi { @@ -54,8 +55,9 @@ public DerivativesTradingPortfolioMarginProRestApi(ApiClient apiClient) { } /** - * BNB transfer(USER_DATA) BNB transfer can be between Margin Account and USDM Account * You can - * only use this function 2 times per 10 minutes in a rolling manner Weight: 1500 + * BNB transfer (USER_DATA) BNB transfer can be between Margin Account and USDM Account + * Weight(IP): 1500 Security Type: USER_DATA Notes: - You can only use this function 2 times per + * 10 minutes in a rolling manner * * @param bnbTransferRequest (required) * @return ApiResponse<BnbTransferResponse> @@ -69,8 +71,8 @@ public DerivativesTradingPortfolioMarginProRestApi(ApiClient apiClient) { * * * @see BNB - * transfer(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#bnb-transfer">BNB + * transfer (USER_DATA) Documentation */ public ApiResponse bnbTransfer(BnbTransferRequest bnbTransferRequest) throws ApiException { @@ -78,7 +80,8 @@ public ApiResponse bnbTransfer(BnbTransferRequest bnbTransf } /** - * Change Auto-repay-futures Status(TRADE) Change Auto-repay-futures Status Weight: 1500 + * Change Auto-repay-futures Status (TRADE) Change Auto-repay-futures Status Weight(IP): 1500 + * Security Type: TRADE * * @param changeAutoRepayFuturesStatusRequest (required) * @return ApiResponse<ChangeAutoRepayFuturesStatusResponse> @@ -92,8 +95,8 @@ public ApiResponse bnbTransfer(BnbTransferRequest bnbTransf * * * @see Change - * Auto-repay-futures Status(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#change-auto-repay-futures-status">Change + * Auto-repay-futures Status (TRADE) Documentation */ public ApiResponse changeAutoRepayFuturesStatus( ChangeAutoRepayFuturesStatusRequest changeAutoRepayFuturesStatusRequest) @@ -103,9 +106,9 @@ public ApiResponse changeAutoRepayFuturesS /** * Delete Margin Call Level (USER_DATA) Delete the margin call level for a Portfolio Margin - * account. Weight: 1500 + * account. Weight(IP): 1500 Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<DeleteMarginCallLevelResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -117,7 +120,7 @@ public ApiResponse changeAutoRepayFuturesS * * * @see Delete + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#delete-margin-call-level">Delete * Margin Call Level (USER_DATA) Documentation */ public ApiResponse deleteMarginCallLevel(Long recvWindow) @@ -126,11 +129,12 @@ public ApiResponse deleteMarginCallLevel(Long rec } /** - * Fund Auto-collection(USER_DATA) Transfers all assets from Futures Account to Margin account * - * The BNB would not be collected from UM-PM account to the Portfolio Margin account. * You can - * only use this function 500 times per hour in a rolling manner. Weight: 1500 + * Fund Auto-collection (USER_DATA) Transfers all assets from Futures Account to Margin account + * Weight(IP): 1500 Security Type: USER_DATA Notes: - The BNB would not be collected from UM-PM + * account to the Portfolio Margin account. - You can only use this function 500 times per hour + * in a rolling manner. * - * @param fundAutoCollectionRequest (required) + * @param fundAutoCollectionRequest (optional) * @return ApiResponse<FundAutoCollectionResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -142,8 +146,8 @@ public ApiResponse deleteMarginCallLevel(Long rec * * * @see Fund - * Auto-collection(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#fund-auto-collection">Fund + * Auto-collection (USER_DATA) Documentation */ public ApiResponse fundAutoCollection( FundAutoCollectionRequest fundAutoCollectionRequest) throws ApiException { @@ -151,8 +155,8 @@ public ApiResponse fundAutoCollection( } /** - * Fund Collection by Asset(USER_DATA) Transfers specific asset from Futures Account to Margin - * account * The BNB transfer is not be supported Weight: 60 + * Fund Collection by Asset (USER_DATA) Transfers specific asset from Futures Account to Margin + * account Weight(IP): 60 Security Type: USER_DATA Notes: - The BNB transfer is not be supported * * @param fundCollectionByAssetRequest (required) * @return ApiResponse<FundCollectionByAssetResponse> @@ -166,8 +170,8 @@ public ApiResponse fundAutoCollection( * * * @see Fund - * Collection by Asset(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#fund-collection-by-asset">Fund + * Collection by Asset (USER_DATA) Documentation */ public ApiResponse fundCollectionByAsset( FundCollectionByAssetRequest fundCollectionByAssetRequest) throws ApiException { @@ -175,7 +179,8 @@ public ApiResponse fundCollectionByAsset( } /** - * Get Auto-repay-futures Status(USER_DATA) Query Auto-repay-futures Status Weight: 30 + * Get Auto-repay-futures Status (USER_DATA) Query Auto-repay-futures Status Weight(IP): 30 + * Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetAutoRepayFuturesStatusResponse> @@ -189,8 +194,8 @@ public ApiResponse fundCollectionByAsset( * * * @see Get - * Auto-repay-futures Status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-auto-repay-futures-status">Get + * Auto-repay-futures Status (USER_DATA) Documentation */ public ApiResponse getAutoRepayFuturesStatus(Long recvWindow) throws ApiException { @@ -198,7 +203,8 @@ public ApiResponse getAutoRepayFuturesStatus( } /** - * Get Delta Mode Status(USER_DATA) Query the Delta mode status of current account. Weight: 1500 + * Get Delta Mode Status (USER_DATA) Query the Delta mode status of current account. Weight(IP): + * 1500 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetDeltaModeStatusResponse> @@ -212,8 +218,8 @@ public ApiResponse getAutoRepayFuturesStatus( * * * @see Get - * Delta Mode Status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-delta-mode-status">Get + * Delta Mode Status (USER_DATA) Documentation */ public ApiResponse getDeltaModeStatus(Long recvWindow) throws ApiException { @@ -222,9 +228,9 @@ public ApiResponse getDeltaModeStatus(Long recvWindo /** * Get Margin Call Level (USER_DATA) Get the margin call level for a Portfolio Margin account. - * Weight: 1500 + * Weight(IP): 1500 Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetMarginCallLevelResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -236,7 +242,7 @@ public ApiResponse getDeltaModeStatus(Long recvWindo * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-margin-call-level">Get * Margin Call Level (USER_DATA) Documentation */ public ApiResponse getMarginCallLevel(Long recvWindow) @@ -245,8 +251,8 @@ public ApiResponse getMarginCallLevel(Long recvWindo } /** - * Get Portfolio Margin Pro Account Balance(USER_DATA) Query Portfolio Margin Pro account - * balance Weight: 20 + * Get Portfolio Margin Pro Account Balance (USER_DATA) Query Portfolio Margin Pro account + * balance Weight(IP): 20 Security Type: USER_DATA * * @param asset (optional) * @param recvWindow (optional) @@ -261,8 +267,8 @@ public ApiResponse getMarginCallLevel(Long recvWindo * * * @see Get - * Portfolio Margin Pro Account Balance(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-portfolio-margin-pro-account-balance">Get + * Portfolio Margin Pro Account Balance (USER_DATA) Documentation */ public ApiResponse getPortfolioMarginProAccountBalance(String asset, Long recvWindow) throws ApiException { @@ -270,8 +276,8 @@ public ApiResponse getMarginCallLevel(Long recvWindo } /** - * Get Portfolio Margin Pro Account Info(USER_DATA) Get Portfolio Margin Pro Account Info - * Weight: 5 + * Get Portfolio Margin Pro Account Info (USER_DATA) Get Portfolio Margin Pro Account Info + * Weight(UID): 5 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetPortfolioMarginProAccountInfoResponse> @@ -285,8 +291,8 @@ public ApiResponse getMarginCallLevel(Long recvWindo * * * @see Get - * Portfolio Margin Pro Account Info(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-portfolio-margin-pro-account-info">Get + * Portfolio Margin Pro Account Info (USER_DATA) Documentation */ public ApiResponse getPortfolioMarginProAccountInfo( Long recvWindow) throws ApiException { @@ -294,8 +300,8 @@ public ApiResponse getPortfolioMarginP } /** - * Get Portfolio Margin Pro SPAN Account Info(USER_DATA) Get Portfolio Margin Pro SPAN Account - * Info (For Portfolio Margin Pro SPAN users only) Weight: 5 + * Get Portfolio Margin Pro SPAN Account Info (USER_DATA) Get Portfolio Margin Pro SPAN Account + * Info (For Portfolio Margin Pro SPAN users only) Weight(IP): 5 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetPortfolioMarginProSpanAccountInfoResponse> @@ -309,8 +315,8 @@ public ApiResponse getPortfolioMarginP * * * @see Get - * Portfolio Margin Pro SPAN Account Info(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-portfolio-margin-pro-span-account-info">Get + * Portfolio Margin Pro SPAN Account Info (USER_DATA) Documentation */ public ApiResponse getPortfolioMarginProSpanAccountInfo(Long recvWindow) throws ApiException { @@ -319,10 +325,11 @@ public ApiResponse getPortfolioMarginP /** * Get Transferable Earn Asset Balance for Portfolio Margin (USER_DATA) Get transferable earn - * asset balance for all types of Portfolio Margin account Weight: 1500 + * asset balance for all types of Portfolio Margin account Weight(IP): 1500 Security Type: + * USER_DATA * * @param asset `LDUSDT` only (required) - * @param transferType `EARN_TO_FUTURE` /`FUTURE_TO_EARN` (required) + * @param transferType (required) * @param recvWindow (optional) * @return ApiResponse<GetTransferableEarnAssetBalanceForPortfolioMarginResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -335,22 +342,22 @@ public ApiResponse getPortfolioMarginP * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#get-transferable-earn-asset-balance-for-portfolio-margin">Get * Transferable Earn Asset Balance for Portfolio Margin (USER_DATA) Documentation */ public ApiResponse getTransferableEarnAssetBalanceForPortfolioMargin( - String asset, String transferType, Long recvWindow) throws ApiException { + String asset, TransferType transferType, Long recvWindow) throws ApiException { return accountApi.getTransferableEarnAssetBalanceForPortfolioMargin( asset, transferType, recvWindow); } /** - * Portfolio Margin Pro Bankruptcy Loan Repay Repay Portfolio Margin Pro Bankruptcy Loan * - * Please note that the API Key has enabled Spot & Margin Trading permissions to access this - * endpoint. Weight: 3000 + * Portfolio Margin Pro Bankruptcy Loan Repay (TRADE) Repay Portfolio Margin Pro Bankruptcy Loan + * Weight(UID): 3000 Security Type: TRADE Notes: - Please note that the API Key has enabled Spot + * & Margin Trading permissions to access this endpoint. * - * @param portfolioMarginProBankruptcyLoanRepayRequest (required) + * @param portfolioMarginProBankruptcyLoanRepayRequest (optional) * @return ApiResponse<PortfolioMarginProBankruptcyLoanRepayResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -362,8 +369,8 @@ public ApiResponse getPortfolioMarginP * * * @see Portfolio - * Margin Pro Bankruptcy Loan Repay Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#portfolio-margin-pro-bankruptcy-loan-repay">Portfolio + * Margin Pro Bankruptcy Loan Repay (TRADE) Documentation */ public ApiResponse portfolioMarginProBankruptcyLoanRepay( @@ -375,9 +382,9 @@ public ApiResponse getPortfolioMarginP } /** - * Query Portfolio Margin Pro Bankruptcy Loan Amount(USER_DATA) Query Portfolio Margin Pro - * Bankruptcy Loan Amount * If there’s no classic portfolio margin bankruptcy loan, the amount - * would be 0 Weight: 500 + * Query Portfolio Margin Pro Bankruptcy Loan Amount (USER_DATA) Query Portfolio Margin Pro + * Bankruptcy Loan Amount Weight(UID): 500 Security Type: USER_DATA Notes: - If there’s no + * classic portfolio margin bankruptcy loan, the amount would be 0 * * @param recvWindow (optional) * @return ApiResponse<QueryPortfolioMarginProBankruptcyLoanAmountResponse> @@ -391,8 +398,8 @@ public ApiResponse getPortfolioMarginP * * * @see Query - * Portfolio Margin Pro Bankruptcy Loan Amount(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#query-portfolio-margin-pro-bankruptcy-loan-amount">Query + * Portfolio Margin Pro Bankruptcy Loan Amount (USER_DATA) Documentation */ public ApiResponse queryPortfolioMarginProBankruptcyLoanAmount(Long recvWindow) throws ApiException { @@ -400,18 +407,18 @@ public ApiResponse getPortfolioMarginP } /** - * Query Portfolio Margin Pro Bankruptcy Loan Repay History(USER_DATA) Query repay history of - * pmloan for portfolio margin pro. * `startTime` and `endTime` cannot be - * longer than 360 days * If `startTime` and `endTime` not sent, return - * records of the last 30 days by default. * If `startTime`is sent and - * `endTime` is not sent, return records of [startTime, startTime+30d]. * If - * `startTime` is not sent and `endTime` is sent, return records of - * [endTime-30d, endTime]. Weight: 500 - * - * @param startTime (optional) - * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) + * Query Portfolio Margin Pro Bankruptcy Loan Repay History (USER_DATA) Query repay history of + * pmloan for portfolio margin pro. Weight(IP): 500 Security Type: USER_DATA Notes: - + * `startTime` and `endTime` cannot be longer than 360 days - If + * `startTime` and `endTime` not sent, return records of the last 30 days by + * default. - If `startTime`is sent and `endTime` is not sent, return + * records of [startTime, startTime+30d]. - If `startTime` is not sent and + * `endTime` is sent, return records of [endTime-30d, endTime]. + * + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param size Number of results returned. (optional) + * @param current Currently querying page. Start from 1. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -424,25 +431,25 @@ public ApiResponse getPortfolioMarginP * * * @see Query - * Portfolio Margin Pro Bankruptcy Loan Repay History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#query-portfolio-margin-pro-bankruptcy-loan-repay-history">Query + * Portfolio Margin Pro Bankruptcy Loan Repay History (USER_DATA) Documentation */ public ApiResponse queryPortfolioMarginProBankruptcyLoanRepayHistory( - Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long startTime, Long endTime, Long size, Long current, Long recvWindow) throws ApiException { return accountApi.queryPortfolioMarginProBankruptcyLoanRepayHistory( - startTime, endTime, current, size, recvWindow); + startTime, endTime, size, current, recvWindow); } /** - * Query Portfolio Margin Pro Negative Balance Interest History(USER_DATA) Query interest - * history of negative balance for portfolio margin. Weight: 50 + * Query Portfolio Margin Pro Negative Balance Interest History (USER_DATA) Query interest + * history of negative balance for portfolio margin. Weight(IP): 50 Security Type: USER_DATA * * @param asset (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param size Default:10 Max:100 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param size Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryPortfolioMarginProNegativeBalanceInterestHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -455,8 +462,8 @@ public ApiResponse getPortfolioMarginP * * * @see Query - * Portfolio Margin Pro Negative Balance Interest History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#query-portfolio-margin-pro-negative-balance-interest-history">Query + * Portfolio Margin Pro Negative Balance Interest History (USER_DATA) Documentation */ public ApiResponse queryPortfolioMarginProNegativeBalanceInterestHistory( @@ -467,9 +474,10 @@ public ApiResponse getPortfolioMarginP } /** - * Repay futures Negative Balance(USER_DATA) Repay futures Negative Balance Weight: 1500 + * Repay futures Negative Balance (USER_DATA) Repay futures Negative Balance Weight(IP): 1500 + * Security Type: USER_DATA * - * @param repayFuturesNegativeBalanceRequest (required) + * @param repayFuturesNegativeBalanceRequest (optional) * @return ApiResponse<RepayFuturesNegativeBalanceResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -481,8 +489,8 @@ public ApiResponse getPortfolioMarginP * * * @see Repay - * futures Negative Balance(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#repay-futures-negative-balance">Repay + * futures Negative Balance (USER_DATA) Documentation */ public ApiResponse repayFuturesNegativeBalance( RepayFuturesNegativeBalanceRequest repayFuturesNegativeBalanceRequest) @@ -493,7 +501,7 @@ public ApiResponse repayFuturesNegativeBala /** * Set Margin Call Level (USER_DATA) Set the margin call level for a Portfolio Margin account. * When the account's uniMMR drops to the specified level, a notification will be sent via - * email and SMS. Weight: 1500 + * email and SMS. Weight(IP): 1500 Security Type: USER_DATA * * @param setMarginCallLevelRequest (required) * @return ApiResponse<SetMarginCallLevelResponse> @@ -507,7 +515,7 @@ public ApiResponse repayFuturesNegativeBala * * * @see Set + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#set-margin-call-level">Set * Margin Call Level (USER_DATA) Documentation */ public ApiResponse setMarginCallLevel( @@ -516,8 +524,8 @@ public ApiResponse setMarginCallLevel( } /** - * Switch Delta Mode(TRADE) Switch the Delta mode for existing PM PRO / PM RETAIL accounts. - * Weight: 1500 + * Switch Delta Mode (TRADE) Switch the Delta mode for existing PM PRO / PM RETAIL accounts. + * Weight(IP): 1500 Security Type: TRADE * * @param switchDeltaModeRequest (required) * @return ApiResponse<SwitchDeltaModeResponse> @@ -531,8 +539,8 @@ public ApiResponse setMarginCallLevel( * * * @see Switch - * Delta Mode(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#switch-delta-mode">Switch + * Delta Mode (TRADE) Documentation */ public ApiResponse switchDeltaMode( SwitchDeltaModeRequest switchDeltaModeRequest) throws ApiException { @@ -540,8 +548,8 @@ public ApiResponse switchDeltaMode( } /** - * Transfer LDUSDT/RWUSD for Portfolio Margin(TRADE) Transfer LDUSDT/RWUSD as collateral for all - * types of Portfolio Margin account Weight: 1500 + * Transfer LDUSDT/RWUSD for Portfolio Margin (TRADE) Transfer LDUSDT/RWUSD as collateral for + * all types of Portfolio Margin account Weight(UID): 1500 Security Type: TRADE * * @param transferLdusdtRwusdForPortfolioMarginRequest (required) * @return ApiResponse<TransferLdusdtRwusdForPortfolioMarginResponse> @@ -555,8 +563,8 @@ public ApiResponse switchDeltaMode( * * * @see Transfer - * LDUSDT/RWUSD for Portfolio Margin(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/account#transfer-ldusdt-rwusd-for-portfolio-margin">Transfer + * LDUSDT/RWUSD for Portfolio Margin (TRADE) Documentation */ public ApiResponse transferLdusdtRwusdForPortfolioMargin( @@ -568,7 +576,8 @@ public ApiResponse switchDeltaMode( } /** - * Get Portfolio Margin Asset Leverage(USER_DATA) Get Portfolio Margin Asset Leverage Weight: 50 + * Get Portfolio Margin Asset Leverage (USER_DATA) Get Portfolio Margin Asset Leverage + * Weight(IP): 50 Security Type: USER_DATA * * @return ApiResponse<GetPortfolioMarginAssetLeverageResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -581,8 +590,8 @@ public ApiResponse switchDeltaMode( * * * @see Get - * Portfolio Margin Asset Leverage(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/market-data#get-portfolio-margin-asset-leverage">Get + * Portfolio Margin Asset Leverage (USER_DATA) Documentation */ public ApiResponse getPortfolioMarginAssetLeverage() throws ApiException { @@ -590,7 +599,8 @@ public ApiResponse getPortfolioMarginAs } /** - * Portfolio Margin Collateral Rate(MARKET_DATA) Portfolio Margin Collateral Rate Weight: 50 + * Portfolio Margin Collateral Rate (MARKET_DATA) Portfolio Margin Collateral Rate Weight(IP): + * 50 Security Type: MARKET_DATA * * @return ApiResponse<PortfolioMarginCollateralRateResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -603,8 +613,8 @@ public ApiResponse getPortfolioMarginAs * * * @see Portfolio - * Margin Collateral Rate(MARKET_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/market-data#portfolio-margin-collateral-rate">Portfolio + * Margin Collateral Rate (MARKET_DATA) Documentation */ public ApiResponse portfolioMarginCollateralRate() throws ApiException { @@ -612,8 +622,8 @@ public ApiResponse portfolioMarginCollate } /** - * Portfolio Margin Pro Tiered Collateral Rate(USER_DATA) Portfolio Margin PRO Tiered Collateral - * Rate Weight: 50 + * Portfolio Margin Pro Tiered Collateral Rate (USER_DATA) Portfolio Margin PRO Tiered + * Collateral Rate Weight(IP): 50 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<PortfolioMarginProTieredCollateralRateResponse> @@ -627,8 +637,8 @@ public ApiResponse portfolioMarginCollate * * * @see Portfolio - * Margin Pro Tiered Collateral Rate(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/market-data#portfolio-margin-pro-tiered-collateral-rate">Portfolio + * Margin Pro Tiered Collateral Rate (USER_DATA) Documentation */ public ApiResponse portfolioMarginProTieredCollateralRate(Long recvWindow) throws ApiException { @@ -637,7 +647,8 @@ public ApiResponse portfolioMarginCollate /** * Query Portfolio Margin Asset Index Price (MARKET_DATA) Query Portfolio Margin Asset Index - * Price Weight: 1 if send asset or 50 if not send asset + * Price Weight: - 1 if `asset` is sent - 50 if `asset` is not sent Security + * Type: MARKET_DATA * * @param asset (optional) * @return ApiResponse<QueryPortfolioMarginAssetIndexPriceResponse> @@ -651,7 +662,7 @@ public ApiResponse portfolioMarginCollate * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/market-data#query-portfolio-margin-asset-index-price">Query * Portfolio Margin Asset Index Price (MARKET_DATA) Documentation */ public ApiResponse diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/MarketDataApi.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/MarketDataApi.java index 5b7821d26..d0943d29f 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/MarketDataApi.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/MarketDataApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -45,7 +45,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-portfolio-margin-pro/7.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-portfolio-margin-pro/8.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -95,8 +95,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Get - * Portfolio Margin Asset Leverage(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/market-data#get-portfolio-margin-asset-leverage">Get + * Portfolio Margin Asset Leverage (USER_DATA) Documentation */ private okhttp3.Call getPortfolioMarginAssetLeverageCall() throws ApiException { String basePath = null; @@ -184,7 +184,8 @@ private okhttp3.Call getPortfolioMarginAssetLeverageValidateBeforeCall() throws } /** - * Get Portfolio Margin Asset Leverage(USER_DATA) Get Portfolio Margin Asset Leverage Weight: 50 + * Get Portfolio Margin Asset Leverage (USER_DATA) Get Portfolio Margin Asset Leverage + * Weight(IP): 50 Security Type: USER_DATA * * @return ApiResponse<GetPortfolioMarginAssetLeverageResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -197,8 +198,8 @@ private okhttp3.Call getPortfolioMarginAssetLeverageValidateBeforeCall() throws * * * @see Get - * Portfolio Margin Asset Leverage(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/market-data#get-portfolio-margin-asset-leverage">Get + * Portfolio Margin Asset Leverage (USER_DATA) Documentation */ public ApiResponse getPortfolioMarginAssetLeverage() throws ApiException { @@ -221,8 +222,8 @@ public ApiResponse getPortfolioMarginAs * * * @see Portfolio - * Margin Collateral Rate(MARKET_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/market-data#portfolio-margin-collateral-rate">Portfolio + * Margin Collateral Rate (MARKET_DATA) Documentation */ private okhttp3.Call portfolioMarginCollateralRateCall() throws ApiException { String basePath = null; @@ -309,7 +310,8 @@ private okhttp3.Call portfolioMarginCollateralRateValidateBeforeCall() throws Ap } /** - * Portfolio Margin Collateral Rate(MARKET_DATA) Portfolio Margin Collateral Rate Weight: 50 + * Portfolio Margin Collateral Rate (MARKET_DATA) Portfolio Margin Collateral Rate Weight(IP): + * 50 Security Type: MARKET_DATA * * @return ApiResponse<PortfolioMarginCollateralRateResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -322,8 +324,8 @@ private okhttp3.Call portfolioMarginCollateralRateValidateBeforeCall() throws Ap * * * @see Portfolio - * Margin Collateral Rate(MARKET_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/market-data#portfolio-margin-collateral-rate">Portfolio + * Margin Collateral Rate (MARKET_DATA) Documentation */ public ApiResponse portfolioMarginCollateralRate() throws ApiException { @@ -347,8 +349,8 @@ public ApiResponse portfolioMarginCollate * * * @see Portfolio - * Margin Pro Tiered Collateral Rate(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/market-data#portfolio-margin-pro-tiered-collateral-rate">Portfolio + * Margin Pro Tiered Collateral Rate (USER_DATA) Documentation */ private okhttp3.Call portfolioMarginProTieredCollateralRateCall(Long recvWindow) throws ApiException { @@ -443,8 +445,8 @@ private okhttp3.Call portfolioMarginProTieredCollateralRateValidateBeforeCall(Lo } /** - * Portfolio Margin Pro Tiered Collateral Rate(USER_DATA) Portfolio Margin PRO Tiered Collateral - * Rate Weight: 50 + * Portfolio Margin Pro Tiered Collateral Rate (USER_DATA) Portfolio Margin PRO Tiered + * Collateral Rate Weight(IP): 50 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<PortfolioMarginProTieredCollateralRateResponse> @@ -458,8 +460,8 @@ private okhttp3.Call portfolioMarginProTieredCollateralRateValidateBeforeCall(Lo * * * @see Portfolio - * Margin Pro Tiered Collateral Rate(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/market-data#portfolio-margin-pro-tiered-collateral-rate">Portfolio + * Margin Pro Tiered Collateral Rate (USER_DATA) Documentation */ public ApiResponse portfolioMarginProTieredCollateralRate(Long recvWindow) throws ApiException { @@ -484,7 +486,7 @@ private okhttp3.Call portfolioMarginProTieredCollateralRateValidateBeforeCall(Lo * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/market-data#query-portfolio-margin-asset-index-price">Query * Portfolio Margin Asset Index Price (MARKET_DATA) Documentation */ private okhttp3.Call queryPortfolioMarginAssetIndexPriceCall(String asset) throws ApiException { @@ -579,7 +581,8 @@ private okhttp3.Call queryPortfolioMarginAssetIndexPriceValidateBeforeCall(Strin /** * Query Portfolio Margin Asset Index Price (MARKET_DATA) Query Portfolio Margin Asset Index - * Price Weight: 1 if send asset or 50 if not send asset + * Price Weight: - 1 if `asset` is sent - 50 if `asset` is not sent Security + * Type: MARKET_DATA * * @param asset (optional) * @return ApiResponse<QueryPortfolioMarginAssetIndexPriceResponse> @@ -593,7 +596,7 @@ private okhttp3.Call queryPortfolioMarginAssetIndexPriceValidateBeforeCall(Strin * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin-pro/api/rest-api/market-data#query-portfolio-margin-asset-index-price">Query * Portfolio Margin Asset Index Price (MARKET_DATA) Documentation */ public ApiResponse diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/Asset.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/Asset.java new file mode 100644 index 000000000..4e81317d0 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/Asset.java @@ -0,0 +1,72 @@ +/* + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets asset */ +@JsonAdapter(Asset.Adapter.class) +public enum Asset { + LDUSDT("LDUSDT"), + + RWUSD("RWUSD"); + + private String value; + + Asset(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Asset fromValue(String value) { + for (Asset b : Asset.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Asset enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Asset read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Asset.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Asset.fromValue(value); + } +} diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/AutoRepay.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/AutoRepay.java new file mode 100644 index 000000000..42a0bb4c9 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/AutoRepay.java @@ -0,0 +1,73 @@ +/* + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** `false` for turn off the auto-repay futures negative balance function */ +@JsonAdapter(AutoRepay.Adapter.class) +public enum AutoRepay { + TRUE("true"), + + FALSE("false"); + + private String value; + + AutoRepay(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AutoRepay fromValue(String value) { + for (AutoRepay b : AutoRepay.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AutoRepay enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AutoRepay read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AutoRepay.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AutoRepay.fromValue(value); + } +} diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/BnbTransferRequest.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/BnbTransferRequest.java index 0f30a416b..2726f38bc 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/BnbTransferRequest.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/BnbTransferRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** BnbTransferRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BnbTransferRequest { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -47,7 +47,7 @@ public class BnbTransferRequest { @SerializedName(SERIALIZED_NAME_TRANSFER_SIDE) @jakarta.annotation.Nonnull - private String transferSide; + private TransferSide transferSide; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -78,7 +78,7 @@ public void setAmount(@jakarta.annotation.Nonnull Double amount) { this.amount = amount; } - public BnbTransferRequest transferSide(@jakarta.annotation.Nonnull String transferSide) { + public BnbTransferRequest transferSide(@jakarta.annotation.Nonnull TransferSide transferSide) { this.transferSide = transferSide; return this; } @@ -90,11 +90,12 @@ public BnbTransferRequest transferSide(@jakarta.annotation.Nonnull String transf */ @jakarta.annotation.Nonnull @NotNull - public String getTransferSide() { + @Valid + public TransferSide getTransferSide() { return transferSide; } - public void setTransferSide(@jakarta.annotation.Nonnull String transferSide) { + public void setTransferSide(@jakarta.annotation.Nonnull TransferSide transferSide) { this.transferSide = transferSide; } @@ -228,13 +229,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("transferSide").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `transferSide` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("transferSide").toString())); - } + // validate the required field `transferSide` + TransferSide.validateJsonElement(jsonObj.get("transferSide")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/BnbTransferResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/BnbTransferResponse.java index 40a3267f4..d15953efb 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/BnbTransferResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/BnbTransferResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** BnbTransferResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BnbTransferResponse { public static final String SERIALIZED_NAME_TRAN_ID = "tranId"; @@ -50,7 +50,7 @@ public BnbTransferResponse tranId(@jakarta.annotation.Nullable Long tranId) { } /** - * Get tranId + * tran Id. * * @return tranId */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/ChangeAutoRepayFuturesStatusRequest.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/ChangeAutoRepayFuturesStatusRequest.java index b19d247f2..fd4f76f2b 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/ChangeAutoRepayFuturesStatusRequest.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/ChangeAutoRepayFuturesStatusRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -34,13 +35,13 @@ /** ChangeAutoRepayFuturesStatusRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeAutoRepayFuturesStatusRequest { public static final String SERIALIZED_NAME_AUTO_REPAY = "autoRepay"; @SerializedName(SERIALIZED_NAME_AUTO_REPAY) @jakarta.annotation.Nonnull - private String autoRepay; + private AutoRepay autoRepay = AutoRepay.TRUE; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -51,7 +52,7 @@ public class ChangeAutoRepayFuturesStatusRequest { public ChangeAutoRepayFuturesStatusRequest() {} public ChangeAutoRepayFuturesStatusRequest autoRepay( - @jakarta.annotation.Nonnull String autoRepay) { + @jakarta.annotation.Nonnull AutoRepay autoRepay) { this.autoRepay = autoRepay; return this; } @@ -63,11 +64,12 @@ public ChangeAutoRepayFuturesStatusRequest autoRepay( */ @jakarta.annotation.Nonnull @NotNull - public String getAutoRepay() { + @Valid + public AutoRepay getAutoRepay() { return autoRepay; } - public void setAutoRepay(@jakarta.annotation.Nonnull String autoRepay) { + public void setAutoRepay(@jakarta.annotation.Nonnull AutoRepay autoRepay) { this.autoRepay = autoRepay; } @@ -197,13 +199,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("autoRepay").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `autoRepay` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("autoRepay").toString())); - } + // validate the required field `autoRepay` + AutoRepay.validateJsonElement(jsonObj.get("autoRepay")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/ChangeAutoRepayFuturesStatusResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/ChangeAutoRepayFuturesStatusResponse.java index 1f54fa63e..24853acb1 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/ChangeAutoRepayFuturesStatusResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/ChangeAutoRepayFuturesStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangeAutoRepayFuturesStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeAutoRepayFuturesStatusResponse { public static final String SERIALIZED_NAME_MSG = "msg"; @@ -50,7 +50,7 @@ public ChangeAutoRepayFuturesStatusResponse msg(@jakarta.annotation.Nullable Str } /** - * Get msg + * msg. * * @return msg */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/DeleteMarginCallLevelResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/DeleteMarginCallLevelResponse.java index b8801997e..b6d82dc93 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/DeleteMarginCallLevelResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/DeleteMarginCallLevelResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DeleteMarginCallLevelResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DeleteMarginCallLevelResponse { public static final String SERIALIZED_NAME_MSG = "msg"; diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/DeltaEnabled.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/DeltaEnabled.java new file mode 100644 index 000000000..77bfef65c --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/DeltaEnabled.java @@ -0,0 +1,73 @@ +/* + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** `true` to enable Delta mode; `false` to disable Delta mode */ +@JsonAdapter(DeltaEnabled.Adapter.class) +public enum DeltaEnabled { + TRUE("true"), + + FALSE("false"); + + private String value; + + DeltaEnabled(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DeltaEnabled fromValue(String value) { + for (DeltaEnabled b : DeltaEnabled.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DeltaEnabled enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DeltaEnabled read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DeltaEnabled.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DeltaEnabled.fromValue(value); + } +} diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/From.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/From.java new file mode 100644 index 000000000..28e96b31c --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/From.java @@ -0,0 +1,72 @@ +/* + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets from */ +@JsonAdapter(From.Adapter.class) +public enum From { + SPOT("SPOT"), + + MARGIN("MARGIN"); + + private String value; + + From(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static From fromValue(String value) { + for (From b : From.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final From enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public From read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return From.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + From.fromValue(value); + } +} diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/FundAutoCollectionRequest.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/FundAutoCollectionRequest.java index d501ebe95..a6628b5a5 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/FundAutoCollectionRequest.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/FundAutoCollectionRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FundAutoCollectionRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FundAutoCollectionRequest { public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/FundAutoCollectionResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/FundAutoCollectionResponse.java index fd8567a3e..3435b0dab 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/FundAutoCollectionResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/FundAutoCollectionResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FundAutoCollectionResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FundAutoCollectionResponse { public static final String SERIALIZED_NAME_MSG = "msg"; @@ -50,7 +50,7 @@ public FundAutoCollectionResponse msg(@jakarta.annotation.Nullable String msg) { } /** - * Get msg + * msg. * * @return msg */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/FundCollectionByAssetRequest.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/FundCollectionByAssetRequest.java index 2ad2a8ed1..4097d974d 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/FundCollectionByAssetRequest.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/FundCollectionByAssetRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FundCollectionByAssetRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FundCollectionByAssetRequest { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/FundCollectionByAssetResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/FundCollectionByAssetResponse.java index 9b21a0c78..6bbfc57a2 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/FundCollectionByAssetResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/FundCollectionByAssetResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FundCollectionByAssetResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FundCollectionByAssetResponse { public static final String SERIALIZED_NAME_MSG = "msg"; @@ -50,7 +50,7 @@ public FundCollectionByAssetResponse msg(@jakarta.annotation.Nullable String msg } /** - * Get msg + * msg. * * @return msg */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetAutoRepayFuturesStatusResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetAutoRepayFuturesStatusResponse.java index ccb227c91..14526eeb3 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetAutoRepayFuturesStatusResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetAutoRepayFuturesStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetAutoRepayFuturesStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetAutoRepayFuturesStatusResponse { public static final String SERIALIZED_NAME_AUTO_REPAY = "autoRepay"; @@ -51,7 +51,8 @@ public GetAutoRepayFuturesStatusResponse autoRepay( } /** - * Get autoRepay + * \"true\" for turn on the auto-repay futures; \"false\" for turn off the + * auto-repay futures * * @return autoRepay */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetDeltaModeStatusResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetDeltaModeStatusResponse.java index a6ebd6815..dfb13df27 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetDeltaModeStatusResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetDeltaModeStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetDeltaModeStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDeltaModeStatusResponse { public static final String SERIALIZED_NAME_DELTA_ENABLED = "deltaEnabled"; @@ -51,7 +51,7 @@ public GetDeltaModeStatusResponse deltaEnabled( } /** - * Get deltaEnabled + * delta Enabled. * * @return deltaEnabled */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetMarginCallLevelResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetMarginCallLevelResponse.java index 2aa4d7780..a3952d57f 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetMarginCallLevelResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetMarginCallLevelResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetMarginCallLevelResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetMarginCallLevelResponse { public static final String SERIALIZED_NAME_MARGIN_CALL_LEVEL = "marginCallLevel"; @@ -51,7 +51,7 @@ public GetMarginCallLevelResponse marginCallLevel( } /** - * Get marginCallLevel + * The margin call level value. Empty object returned if not set. * * @return marginCallLevel */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginAssetLeverageResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginAssetLeverageResponse.java index 75c072eda..65bb13090 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginAssetLeverageResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginAssetLeverageResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetPortfolioMarginAssetLeverageResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetPortfolioMarginAssetLeverageResponse extends ArrayList { public GetPortfolioMarginAssetLeverageResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginAssetLeverageResponseInner.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginAssetLeverageResponseInner.java index 08196a394..06a735743 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginAssetLeverageResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginAssetLeverageResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetPortfolioMarginAssetLeverageResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetPortfolioMarginAssetLeverageResponseInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -57,7 +57,7 @@ public GetPortfolioMarginAssetLeverageResponseInner asset( } /** - * Get asset + * asset. * * @return asset */ @@ -77,7 +77,7 @@ public GetPortfolioMarginAssetLeverageResponseInner leverage( } /** - * Get leverage + * leverage. * * @return leverage */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProAccountBalanceResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProAccountBalanceResponse.java index 95ac6b371..0230203b5 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProAccountBalanceResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProAccountBalanceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetPortfolioMarginProAccountBalanceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetPortfolioMarginProAccountBalanceResponse extends ArrayList { public GetPortfolioMarginProAccountBalanceResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProAccountBalanceResponseInner.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProAccountBalanceResponseInner.java index de5caad27..948bc1d4a 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProAccountBalanceResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProAccountBalanceResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetPortfolioMarginProAccountBalanceResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetPortfolioMarginProAccountBalanceResponseInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -135,7 +135,7 @@ public GetPortfolioMarginProAccountBalanceResponseInner asset( } /** - * Get asset + * asset. * * @return asset */ @@ -155,7 +155,7 @@ public GetPortfolioMarginProAccountBalanceResponseInner totalWalletBalance( } /** - * Get totalWalletBalance + * total Wallet Balance. * * @return totalWalletBalance */ @@ -175,7 +175,7 @@ public GetPortfolioMarginProAccountBalanceResponseInner crossMarginAsset( } /** - * Get crossMarginAsset + * cross Margin Asset. * * @return crossMarginAsset */ @@ -195,7 +195,7 @@ public GetPortfolioMarginProAccountBalanceResponseInner crossMarginBorrowed( } /** - * Get crossMarginBorrowed + * cross Margin Borrowed. * * @return crossMarginBorrowed */ @@ -215,7 +215,7 @@ public GetPortfolioMarginProAccountBalanceResponseInner crossMarginFree( } /** - * Get crossMarginFree + * cross Margin Free. * * @return crossMarginFree */ @@ -235,7 +235,7 @@ public GetPortfolioMarginProAccountBalanceResponseInner crossMarginInterest( } /** - * Get crossMarginInterest + * cross Margin Interest. * * @return crossMarginInterest */ @@ -255,7 +255,7 @@ public GetPortfolioMarginProAccountBalanceResponseInner crossMarginLocked( } /** - * Get crossMarginLocked + * cross Margin Locked. * * @return crossMarginLocked */ @@ -275,7 +275,7 @@ public GetPortfolioMarginProAccountBalanceResponseInner umWalletBalance( } /** - * Get umWalletBalance + * um Wallet Balance. * * @return umWalletBalance */ @@ -295,7 +295,7 @@ public GetPortfolioMarginProAccountBalanceResponseInner umUnrealizedPNL( } /** - * Get umUnrealizedPNL + * um Unrealized PNL. * * @return umUnrealizedPNL */ @@ -315,7 +315,7 @@ public GetPortfolioMarginProAccountBalanceResponseInner cmWalletBalance( } /** - * Get cmWalletBalance + * cm Wallet Balance. * * @return cmWalletBalance */ @@ -335,7 +335,7 @@ public GetPortfolioMarginProAccountBalanceResponseInner cmUnrealizedPNL( } /** - * Get cmUnrealizedPNL + * cm Unrealized PNL. * * @return cmUnrealizedPNL */ @@ -355,7 +355,7 @@ public GetPortfolioMarginProAccountBalanceResponseInner updateTime( } /** - * Get updateTime + * update Time. * * @return updateTime */ @@ -375,7 +375,7 @@ public GetPortfolioMarginProAccountBalanceResponseInner negativeBalance( } /** - * Get negativeBalance + * negative Balance. * * @return negativeBalance */ @@ -395,7 +395,7 @@ public GetPortfolioMarginProAccountBalanceResponseInner optionWalletBalance( } /** - * Get optionWalletBalance + * option Wallet Balance. * * @return optionWalletBalance */ @@ -415,7 +415,7 @@ public GetPortfolioMarginProAccountBalanceResponseInner optionEquity( } /** - * Get optionEquity + * option Equity. * * @return optionEquity */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProAccountInfoResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProAccountInfoResponse.java index 2f9f0b276..9af1ffea7 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProAccountInfoResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProAccountInfoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetPortfolioMarginProAccountInfoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetPortfolioMarginProAccountInfoResponse { public static final String SERIALIZED_NAME_UNI_M_M_R = "uniMMR"; @@ -93,7 +93,7 @@ public GetPortfolioMarginProAccountInfoResponse uniMMR( } /** - * Get uniMMR + * Classic Portfolio margin account maintenance margin rate * * @return uniMMR */ @@ -113,7 +113,7 @@ public GetPortfolioMarginProAccountInfoResponse accountEquity( } /** - * Get accountEquity + * Account equity, unit:USD * * @return accountEquity */ @@ -133,7 +133,7 @@ public GetPortfolioMarginProAccountInfoResponse actualEquity( } /** - * Get actualEquity + * Actual equity, unit:USD * * @return actualEquity */ @@ -153,7 +153,7 @@ public GetPortfolioMarginProAccountInfoResponse accountMaintMargin( } /** - * Get accountMaintMargin + * Classic Portfolio margin account maintenance margin, unit:USD * * @return accountMaintMargin */ @@ -173,7 +173,7 @@ public GetPortfolioMarginProAccountInfoResponse accountInitialMargin( } /** - * Get accountInitialMargin + * Ignored for PM PRO and PM PRO SPAN * * @return accountInitialMargin */ @@ -193,7 +193,7 @@ public GetPortfolioMarginProAccountInfoResponse totalAvailableBalance( } /** - * Get totalAvailableBalance + * Ignored for PM PRO and PM PRO SPAN * * @return totalAvailableBalance */ @@ -214,7 +214,9 @@ public GetPortfolioMarginProAccountInfoResponse accountStatus( } /** - * Get accountStatus + * Classic Portfolio margin account status:\"NORMAL\", \"MARGIN_CALL\", + * \"SUPPLY_MARGIN\", \"REDUCE_ONLY\", \"ACTIVE_LIQUIDATION\", + * \"FORCE_LIQUIDATION\", \"BANKRUPTED\" * * @return accountStatus */ @@ -234,7 +236,7 @@ public GetPortfolioMarginProAccountInfoResponse accountType( } /** - * Get accountType + * PM_1 for PM PRO, PM_2 for PM, PM_3 for PM PRO SPAN * * @return accountType */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProSpanAccountInfoResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProSpanAccountInfoResponse.java index 33ac860cf..75f44f491 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProSpanAccountInfoResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProSpanAccountInfoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetPortfolioMarginProSpanAccountInfoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetPortfolioMarginProSpanAccountInfoResponse { public static final String SERIALIZED_NAME_UNI_M_M_R = "uniMMR"; @@ -106,7 +106,7 @@ public GetPortfolioMarginProSpanAccountInfoResponse uniMMR( } /** - * Get uniMMR + * uni MMR. * * @return uniMMR */ @@ -126,7 +126,7 @@ public GetPortfolioMarginProSpanAccountInfoResponse accountEquity( } /** - * Get accountEquity + * Account equity, unit:USD * * @return accountEquity */ @@ -146,7 +146,7 @@ public GetPortfolioMarginProSpanAccountInfoResponse actualEquity( } /** - * Get actualEquity + * Actual equity, unit:USD * * @return actualEquity */ @@ -166,7 +166,7 @@ public GetPortfolioMarginProSpanAccountInfoResponse accountMaintMargin( } /** - * Get accountMaintMargin + * Account maintenance margin, unit:USD * * @return accountMaintMargin */ @@ -222,7 +222,7 @@ public GetPortfolioMarginProSpanAccountInfoResponse marginMM( } /** - * Get marginMM + * margin MM. * * @return marginMM */ @@ -242,7 +242,7 @@ public GetPortfolioMarginProSpanAccountInfoResponse otherMM( } /** - * Get otherMM + * other MM. * * @return otherMM */ @@ -262,7 +262,9 @@ public GetPortfolioMarginProSpanAccountInfoResponse accountStatus( } /** - * Get accountStatus + * Classic Portfolio margin account status:\"NORMAL\", \"MARGIN_CALL\", + * \"SUPPLY_MARGIN\", \"REDUCE_ONLY\", \"ACTIVE_LIQUIDATION\", + * \"FORCE_LIQUIDATION\", \"BANKRUPTED\" * * @return accountStatus */ @@ -282,7 +284,7 @@ public GetPortfolioMarginProSpanAccountInfoResponse accountType( } /** - * Get accountType + * PM_1 for classic PM, PM_2 for PM, PM_3 for PM Pro(SPAN) * * @return accountType */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner.java index c3898011d..e605ac508 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -57,7 +57,7 @@ public GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner asset( } /** - * Get asset + * asset. * * @return asset */ @@ -77,7 +77,7 @@ public GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner uniMainta } /** - * Get uniMaintainUsd + * uni Maintain Usd. * * @return uniMaintainUsd */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetTransferableEarnAssetBalanceForPortfolioMarginResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetTransferableEarnAssetBalanceForPortfolioMarginResponse.java index 348df3186..9bd96e522 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetTransferableEarnAssetBalanceForPortfolioMarginResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/GetTransferableEarnAssetBalanceForPortfolioMarginResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetTransferableEarnAssetBalanceForPortfolioMarginResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetTransferableEarnAssetBalanceForPortfolioMarginResponse { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -57,7 +57,7 @@ public GetTransferableEarnAssetBalanceForPortfolioMarginResponse asset( } /** - * Get asset + * asset. * * @return asset */ @@ -77,7 +77,7 @@ public GetTransferableEarnAssetBalanceForPortfolioMarginResponse amount( } /** - * Get amount + * amount. * * @return amount */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginCollateralRateResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginCollateralRateResponse.java index 97cc76f11..87c558d09 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginCollateralRateResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginCollateralRateResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PortfolioMarginCollateralRateResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PortfolioMarginCollateralRateResponse extends ArrayList { public PortfolioMarginCollateralRateResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginCollateralRateResponseInner.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginCollateralRateResponseInner.java index 4956d3889..729f5f96f 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginCollateralRateResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginCollateralRateResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PortfolioMarginCollateralRateResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PortfolioMarginCollateralRateResponseInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -57,7 +57,7 @@ public PortfolioMarginCollateralRateResponseInner asset( } /** - * Get asset + * asset. * * @return asset */ @@ -77,7 +77,7 @@ public PortfolioMarginCollateralRateResponseInner collateralRate( } /** - * Get collateralRate + * collateral Rate. * * @return collateralRate */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProBankruptcyLoanRepayRequest.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProBankruptcyLoanRepayRequest.java index 006c785be..6c93702cb 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProBankruptcyLoanRepayRequest.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProBankruptcyLoanRepayRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -34,13 +35,13 @@ /** PortfolioMarginProBankruptcyLoanRepayRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PortfolioMarginProBankruptcyLoanRepayRequest { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @jakarta.annotation.Nullable - private String from; + private From from = From.SPOT; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -51,7 +52,7 @@ public class PortfolioMarginProBankruptcyLoanRepayRequest { public PortfolioMarginProBankruptcyLoanRepayRequest() {} public PortfolioMarginProBankruptcyLoanRepayRequest from( - @jakarta.annotation.Nullable String from) { + @jakarta.annotation.Nullable From from) { this.from = from; return this; } @@ -62,11 +63,12 @@ public PortfolioMarginProBankruptcyLoanRepayRequest from( * @return from */ @jakarta.annotation.Nullable - public String getFrom() { + @Valid + public From getFrom() { return from; } - public void setFrom(@jakarta.annotation.Nullable String from) { + public void setFrom(@jakarta.annotation.Nullable From from) { this.from = from; } @@ -187,13 +189,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) - && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `from` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("from").toString())); + // validate the optional field `from` + if (jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) { + From.validateJsonElement(jsonObj.get("from")); } } diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProBankruptcyLoanRepayResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProBankruptcyLoanRepayResponse.java index a0e597c94..6a9cf9f18 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProBankruptcyLoanRepayResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProBankruptcyLoanRepayResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PortfolioMarginProBankruptcyLoanRepayResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PortfolioMarginProBankruptcyLoanRepayResponse { public static final String SERIALIZED_NAME_TRAN_ID = "tranId"; @@ -51,7 +51,7 @@ public PortfolioMarginProBankruptcyLoanRepayResponse tranId( } /** - * Get tranId + * tran Id. * * @return tranId */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProTieredCollateralRateResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProTieredCollateralRateResponse.java index 09fe4befe..cd3577326 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProTieredCollateralRateResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProTieredCollateralRateResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PortfolioMarginProTieredCollateralRateResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PortfolioMarginProTieredCollateralRateResponse extends ArrayList { public PortfolioMarginProTieredCollateralRateResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProTieredCollateralRateResponseInner.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProTieredCollateralRateResponseInner.java index b52240575..3fc9a92f8 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProTieredCollateralRateResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProTieredCollateralRateResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** PortfolioMarginProTieredCollateralRateResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PortfolioMarginProTieredCollateralRateResponseInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -64,7 +64,7 @@ public PortfolioMarginProTieredCollateralRateResponseInner asset( } /** - * Get asset + * asset. * * @return asset */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner.java index 643640c8c..25bac66e7 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner { public static final String SERIALIZED_NAME_TIER_FLOOR = "tierFloor"; @@ -69,7 +69,7 @@ public PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner ti } /** - * Get tierFloor + * tier Floor. * * @return tierFloor */ @@ -89,7 +89,7 @@ public PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner ti } /** - * Get tierCap + * tier Cap. * * @return tierCap */ @@ -109,7 +109,7 @@ public PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner co } /** - * Get collateralRate + * collateral Rate. * * @return collateralRate */ @@ -129,7 +129,7 @@ public PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner cu } /** - * Get cum + * account equity quick addition number * * @return cum */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginAssetIndexPriceResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginAssetIndexPriceResponse.java index 5fa143075..8173ad199 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginAssetIndexPriceResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginAssetIndexPriceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryPortfolioMarginAssetIndexPriceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryPortfolioMarginAssetIndexPriceResponse extends ArrayList { public QueryPortfolioMarginAssetIndexPriceResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginAssetIndexPriceResponseInner.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginAssetIndexPriceResponseInner.java index a4a8282b2..fdf5c13e4 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginAssetIndexPriceResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginAssetIndexPriceResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryPortfolioMarginAssetIndexPriceResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryPortfolioMarginAssetIndexPriceResponseInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -63,7 +63,7 @@ public QueryPortfolioMarginAssetIndexPriceResponseInner asset( } /** - * Get asset + * asset. * * @return asset */ @@ -83,7 +83,7 @@ public QueryPortfolioMarginAssetIndexPriceResponseInner assetIndexPrice( } /** - * Get assetIndexPrice + * in USD * * @return assetIndexPrice */ @@ -103,7 +103,7 @@ public QueryPortfolioMarginAssetIndexPriceResponseInner time( } /** - * Get time + * time. * * @return time */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProBankruptcyLoanAmountResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProBankruptcyLoanAmountResponse.java index 1880bcd46..658b7cefa 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProBankruptcyLoanAmountResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProBankruptcyLoanAmountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryPortfolioMarginProBankruptcyLoanAmountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryPortfolioMarginProBankruptcyLoanAmountResponse { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -57,7 +57,7 @@ public QueryPortfolioMarginProBankruptcyLoanAmountResponse asset( } /** - * Get asset + * asset. * * @return asset */ @@ -77,7 +77,7 @@ public QueryPortfolioMarginProBankruptcyLoanAmountResponse amount( } /** - * Get amount + * portfolio margin bankruptcy loan amount in BUSD * * @return amount */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse.java index e4f4f6948..1523ad412 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse { public static final String SERIALIZED_NAME_TOTAL = "total"; @@ -63,7 +63,7 @@ public QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse total( } /** - * Get total + * total. * * @return total */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner.java index 1643ca6dc..fb90f93c5 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -63,7 +63,7 @@ public QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner asset( } /** - * Get asset + * asset. * * @return asset */ @@ -83,7 +83,7 @@ public QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner amount } /** - * Get amount + * amount. * * @return amount */ @@ -103,7 +103,7 @@ public QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner repayT } /** - * Get repayTime + * repay Time. * * @return repayTime */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProNegativeBalanceInterestHistoryResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProNegativeBalanceInterestHistoryResponse.java index ee96b2058..9dd53f138 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProNegativeBalanceInterestHistoryResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProNegativeBalanceInterestHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryPortfolioMarginProNegativeBalanceInterestHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryPortfolioMarginProNegativeBalanceInterestHistoryResponse extends ArrayList { public QueryPortfolioMarginProNegativeBalanceInterestHistoryResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner.java index 543057f9b..6cb9da8a9 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -75,7 +75,7 @@ public QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner asset( } /** - * Get asset + * asset. * * @return asset */ @@ -95,7 +95,7 @@ public QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner intere } /** - * Get interest + * interest amount * * @return interest */ @@ -115,7 +115,7 @@ public QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner intere } /** - * Get interestAccruedTime + * interest Accrued Time. * * @return interestAccruedTime */ @@ -135,7 +135,7 @@ public QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner intere } /** - * Get interestRate + * daily interest rate * * @return interestRate */ @@ -155,7 +155,7 @@ public QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner princi } /** - * Get principal + * principal. * * @return principal */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/RepayFuturesNegativeBalanceRequest.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/RepayFuturesNegativeBalanceRequest.java index 026de653e..082539c73 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/RepayFuturesNegativeBalanceRequest.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/RepayFuturesNegativeBalanceRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -34,13 +35,13 @@ /** RepayFuturesNegativeBalanceRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RepayFuturesNegativeBalanceRequest { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @jakarta.annotation.Nullable - private String from; + private From from = From.SPOT; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -50,7 +51,7 @@ public class RepayFuturesNegativeBalanceRequest { public RepayFuturesNegativeBalanceRequest() {} - public RepayFuturesNegativeBalanceRequest from(@jakarta.annotation.Nullable String from) { + public RepayFuturesNegativeBalanceRequest from(@jakarta.annotation.Nullable From from) { this.from = from; return this; } @@ -61,11 +62,12 @@ public RepayFuturesNegativeBalanceRequest from(@jakarta.annotation.Nullable Stri * @return from */ @jakarta.annotation.Nullable - public String getFrom() { + @Valid + public From getFrom() { return from; } - public void setFrom(@jakarta.annotation.Nullable String from) { + public void setFrom(@jakarta.annotation.Nullable From from) { this.from = from; } @@ -184,13 +186,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) - && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `from` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("from").toString())); + // validate the optional field `from` + if (jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) { + From.validateJsonElement(jsonObj.get("from")); } } diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/RepayFuturesNegativeBalanceResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/RepayFuturesNegativeBalanceResponse.java index 682942fd3..f8441b1e4 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/RepayFuturesNegativeBalanceResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/RepayFuturesNegativeBalanceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RepayFuturesNegativeBalanceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RepayFuturesNegativeBalanceResponse { public static final String SERIALIZED_NAME_MSG = "msg"; @@ -50,7 +50,7 @@ public RepayFuturesNegativeBalanceResponse msg(@jakarta.annotation.Nullable Stri } /** - * Get msg + * msg. * * @return msg */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/SetMarginCallLevelRequest.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/SetMarginCallLevelRequest.java index 5efedc70c..bb72c25e5 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/SetMarginCallLevelRequest.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/SetMarginCallLevelRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** SetMarginCallLevelRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SetMarginCallLevelRequest { public static final String SERIALIZED_NAME_MARGIN_CALL_LEVEL = "marginCallLevel"; @@ -58,7 +58,7 @@ public SetMarginCallLevelRequest marginCallLevel( } /** - * Get marginCallLevel + * The value must be within the range [1.1, 2.0]. * * @return marginCallLevel */ @@ -79,11 +79,12 @@ public SetMarginCallLevelRequest recvWindow(@jakarta.annotation.Nullable Long re } /** - * Get recvWindow + * Request validity window in milliseconds maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/SetMarginCallLevelResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/SetMarginCallLevelResponse.java index 250c6f405..09d43fe89 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/SetMarginCallLevelResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/SetMarginCallLevelResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SetMarginCallLevelResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SetMarginCallLevelResponse { public static final String SERIALIZED_NAME_MARGIN_CALL_LEVEL = "marginCallLevel"; @@ -51,7 +51,7 @@ public SetMarginCallLevelResponse marginCallLevel( } /** - * Get marginCallLevel + * The margin call level that was set * * @return marginCallLevel */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/SwitchDeltaModeRequest.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/SwitchDeltaModeRequest.java index 6a9013d8a..59314bcb0 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/SwitchDeltaModeRequest.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/SwitchDeltaModeRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -34,13 +35,13 @@ /** SwitchDeltaModeRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SwitchDeltaModeRequest { public static final String SERIALIZED_NAME_DELTA_ENABLED = "deltaEnabled"; @SerializedName(SERIALIZED_NAME_DELTA_ENABLED) @jakarta.annotation.Nonnull - private String deltaEnabled; + private DeltaEnabled deltaEnabled; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -50,7 +51,8 @@ public class SwitchDeltaModeRequest { public SwitchDeltaModeRequest() {} - public SwitchDeltaModeRequest deltaEnabled(@jakarta.annotation.Nonnull String deltaEnabled) { + public SwitchDeltaModeRequest deltaEnabled( + @jakarta.annotation.Nonnull DeltaEnabled deltaEnabled) { this.deltaEnabled = deltaEnabled; return this; } @@ -62,11 +64,12 @@ public SwitchDeltaModeRequest deltaEnabled(@jakarta.annotation.Nonnull String de */ @jakarta.annotation.Nonnull @NotNull - public String getDeltaEnabled() { + @Valid + public DeltaEnabled getDeltaEnabled() { return deltaEnabled; } - public void setDeltaEnabled(@jakarta.annotation.Nonnull String deltaEnabled) { + public void setDeltaEnabled(@jakarta.annotation.Nonnull DeltaEnabled deltaEnabled) { this.deltaEnabled = deltaEnabled; } @@ -192,13 +195,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("deltaEnabled").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `deltaEnabled` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("deltaEnabled").toString())); - } + // validate the required field `deltaEnabled` + DeltaEnabled.validateJsonElement(jsonObj.get("deltaEnabled")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/SwitchDeltaModeResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/SwitchDeltaModeResponse.java index d70d13e99..4634a67bc 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/SwitchDeltaModeResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/SwitchDeltaModeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SwitchDeltaModeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SwitchDeltaModeResponse { public static final String SERIALIZED_NAME_MSG = "msg"; @@ -50,7 +50,7 @@ public SwitchDeltaModeResponse msg(@jakarta.annotation.Nullable String msg) { } /** - * Get msg + * msg. * * @return msg */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/TransferLdusdtRwusdForPortfolioMarginRequest.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/TransferLdusdtRwusdForPortfolioMarginRequest.java index 93842cc46..b6888883c 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/TransferLdusdtRwusdForPortfolioMarginRequest.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/TransferLdusdtRwusdForPortfolioMarginRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -35,19 +35,19 @@ /** TransferLdusdtRwusdForPortfolioMarginRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TransferLdusdtRwusdForPortfolioMarginRequest { public static final String SERIALIZED_NAME_ASSET = "asset"; @SerializedName(SERIALIZED_NAME_ASSET) @jakarta.annotation.Nonnull - private String asset; + private Asset asset; public static final String SERIALIZED_NAME_TRANSFER_TYPE = "transferType"; @SerializedName(SERIALIZED_NAME_TRANSFER_TYPE) @jakarta.annotation.Nonnull - private String transferType; + private TransferType transferType; public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -64,7 +64,7 @@ public class TransferLdusdtRwusdForPortfolioMarginRequest { public TransferLdusdtRwusdForPortfolioMarginRequest() {} public TransferLdusdtRwusdForPortfolioMarginRequest asset( - @jakarta.annotation.Nonnull String asset) { + @jakarta.annotation.Nonnull Asset asset) { this.asset = asset; return this; } @@ -76,16 +76,17 @@ public TransferLdusdtRwusdForPortfolioMarginRequest asset( */ @jakarta.annotation.Nonnull @NotNull - public String getAsset() { + @Valid + public Asset getAsset() { return asset; } - public void setAsset(@jakarta.annotation.Nonnull String asset) { + public void setAsset(@jakarta.annotation.Nonnull Asset asset) { this.asset = asset; } public TransferLdusdtRwusdForPortfolioMarginRequest transferType( - @jakarta.annotation.Nonnull String transferType) { + @jakarta.annotation.Nonnull TransferType transferType) { this.transferType = transferType; return this; } @@ -97,11 +98,12 @@ public TransferLdusdtRwusdForPortfolioMarginRequest transferType( */ @jakarta.annotation.Nonnull @NotNull - public String getTransferType() { + @Valid + public TransferType getTransferType() { return transferType; } - public void setTransferType(@jakarta.annotation.Nonnull String transferType) { + public void setTransferType(@jakarta.annotation.Nonnull TransferType transferType) { this.transferType = transferType; } @@ -274,20 +276,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("asset").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `asset` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("asset").toString())); - } - if (!jsonObj.get("transferType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `transferType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("transferType").toString())); - } + // validate the required field `asset` + Asset.validateJsonElement(jsonObj.get("asset")); + // validate the required field `transferType` + TransferType.validateJsonElement(jsonObj.get("transferType")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/TransferLdusdtRwusdForPortfolioMarginResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/TransferLdusdtRwusdForPortfolioMarginResponse.java index 1b125b564..16a4badbc 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/TransferLdusdtRwusdForPortfolioMarginResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/TransferLdusdtRwusdForPortfolioMarginResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TransferLdusdtRwusdForPortfolioMarginResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TransferLdusdtRwusdForPortfolioMarginResponse { public static final String SERIALIZED_NAME_MSG = "msg"; @@ -51,7 +51,7 @@ public TransferLdusdtRwusdForPortfolioMarginResponse msg( } /** - * Get msg + * msg. * * @return msg */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/TransferSide.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/TransferSide.java new file mode 100644 index 000000000..43cef7517 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/TransferSide.java @@ -0,0 +1,73 @@ +/* + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets transferSide */ +@JsonAdapter(TransferSide.Adapter.class) +public enum TransferSide { + TO_UM("TO_UM"), + + FROM_UM("FROM_UM"); + + private String value; + + TransferSide(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TransferSide fromValue(String value) { + for (TransferSide b : TransferSide.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TransferSide enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TransferSide read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TransferSide.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TransferSide.fromValue(value); + } +} diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/TransferType.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/TransferType.java new file mode 100644 index 000000000..a859952a2 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/model/TransferType.java @@ -0,0 +1,73 @@ +/* + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets transferType */ +@JsonAdapter(TransferType.Adapter.class) +public enum TransferType { + EARN_TO_FUTURE("EARN_TO_FUTURE"), + + FUTURE_TO_EARN("FUTURE_TO_EARN"); + + private String value; + + TransferType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TransferType fromValue(String value) { + for (TransferType b : TransferType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TransferType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TransferType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TransferType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TransferType.fromValue(value); + } +} diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/DerivativesTradingPortfolioMarginProWebSocketStreamsUtil.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/DerivativesTradingPortfolioMarginProWebSocketStreamsUtil.java index a56dfd3e4..e93778ce5 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/DerivativesTradingPortfolioMarginProWebSocketStreamsUtil.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/DerivativesTradingPortfolioMarginProWebSocketStreamsUtil.java @@ -3,7 +3,7 @@ import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; public class DerivativesTradingPortfolioMarginProWebSocketStreamsUtil { - private static final String BASE_URL = "wss://fstream.binance.com/pm-classic"; + private static final String BASE_URL = "wss://fstream.binance.com"; private static final boolean HAS_TIME_UNIT = false; public static WebSocketClientConfiguration getClientConfiguration() { diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/JSON.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/JSON.java index c46ea32d2..2a9af84c9 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/JSON.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams + * Portfolio Margin Pro WebSocket Market Streams + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -92,18 +92,6 @@ public static GsonBuilder createGson() { .derivatives_trading_portfolio_margin_pro .websocket.stream.model.Risklevelchange .class); - classByDiscriminatorValue.put( - "pmProAccountUpdate", - com.binance.connector.client - .derivatives_trading_portfolio_margin_pro - .websocket.stream.model.PmProAccountUpdate - .class); - classByDiscriminatorValue.put( - "risklevelchange", - com.binance.connector.client - .derivatives_trading_portfolio_margin_pro - .websocket.stream.model.Risklevelchange - .class); classByDiscriminatorValue.put( "UserDataStreamEventsResponse", com.binance.connector.client diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/api/DerivativesTradingPortfolioMarginProWebSocketStreams.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/api/DerivativesTradingPortfolioMarginProWebSocketStreams.java index c7cb24912..59362372b 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/api/DerivativesTradingPortfolioMarginProWebSocketStreams.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/api/DerivativesTradingPortfolioMarginProWebSocketStreams.java @@ -19,7 +19,7 @@ public class DerivativesTradingPortfolioMarginProWebSocketStreams { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-portfolio-margin-pro/7.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-portfolio-margin-pro/8.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final StreamConnectionInterface connection; diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/AbstractOpenApiSchema.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/AbstractOpenApiSchema.java index 4bd1f09a2..cbf65dbac 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/AbstractOpenApiSchema.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/AbstractOpenApiSchema.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams + * Portfolio Margin Pro WebSocket Market Streams + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -18,7 +18,7 @@ /** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/PmProAccountUpdate.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/PmProAccountUpdate.java index cdb427478..04b8130e4 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/PmProAccountUpdate.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/PmProAccountUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams + * Portfolio Margin Pro WebSocket Market Streams + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** PmProAccountUpdate */ +/** Pushed every 5 seconds with account asset status. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PmProAccountUpdate extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -95,7 +95,7 @@ public PmProAccountUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -114,7 +114,7 @@ public PmProAccountUpdate uLowerCase(@jakarta.annotation.Nullable String uLowerC } /** - * Get uLowerCase + * uniMMR level * * @return uLowerCase */ @@ -133,7 +133,7 @@ public PmProAccountUpdate eq(@jakarta.annotation.Nullable String eq) { } /** - * Get eq + * Account equity in USD * * @return eq */ @@ -152,7 +152,7 @@ public PmProAccountUpdate ae(@jakarta.annotation.Nullable String ae) { } /** - * Get ae + * Actual equity without collateral rate in USD * * @return ae */ @@ -171,7 +171,7 @@ public PmProAccountUpdate im(@jakarta.annotation.Nullable String im) { } /** - * Get im + * Total initial margin in USD * * @return im */ @@ -190,7 +190,7 @@ public PmProAccountUpdate mm(@jakarta.annotation.Nullable String mm) { } /** - * Get mm + * Total maintenance margin in USD * * @return mm */ @@ -209,7 +209,7 @@ public PmProAccountUpdate avb(@jakarta.annotation.Nullable String avb) { } /** - * Get avb + * Total available balance in USD * * @return avb */ @@ -228,7 +228,7 @@ public PmProAccountUpdate vmw(@jakarta.annotation.Nullable String vmw) { } /** - * Get vmw + * Virtual maxWithdraw amount in USD * * @return vmw */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/Risklevelchange.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/Risklevelchange.java index 1999011be..c83965b5a 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/Risklevelchange.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/Risklevelchange.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams + * Portfolio Margin Pro WebSocket Market Streams + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** Risklevelchange */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Risklevelchange extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -83,7 +83,7 @@ public Risklevelchange E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -102,7 +102,7 @@ public Risklevelchange uLowerCase(@jakarta.annotation.Nullable String uLowerCase } /** - * Get uLowerCase + * uniMMR level * * @return uLowerCase */ @@ -121,7 +121,7 @@ public Risklevelchange sLowerCase(@jakarta.annotation.Nullable String sLowerCase } /** - * Get sLowerCase + * Risk level: MARGIN_CALL, REDUCE_ONLY, FORCE_LIQUIDATION * * @return sLowerCase */ @@ -140,7 +140,7 @@ public Risklevelchange eq(@jakarta.annotation.Nullable String eq) { } /** - * Get eq + * Account equity in USD value * * @return eq */ @@ -159,7 +159,7 @@ public Risklevelchange ae(@jakarta.annotation.Nullable String ae) { } /** - * Get ae + * Actual equity without collateral rate in USD value * * @return ae */ @@ -178,7 +178,7 @@ public Risklevelchange mLowerCase(@jakarta.annotation.Nullable String mLowerCase } /** - * Get mLowerCase + * Total maintenance margin in USD value * * @return mLowerCase */ diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/UserDataStreamEventsResponse.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/UserDataStreamEventsResponse.java index 184224a5d..426f71188 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/UserDataStreamEventsResponse.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/UserDataStreamEventsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams + * Portfolio Margin Pro WebSocket Market Streams + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -33,7 +33,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserDataStreamEventsResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(UserDataStreamEventsResponse.class.getName()); @@ -114,18 +114,6 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { newUserDataStreamEventsResponse.setActualInstance( deserialized); return newUserDataStreamEventsResponse; - case "pmProAccountUpdate": - deserialized = - adapterPmProAccountUpdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "risklevelchange": - deserialized = - adapterRisklevelchange.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; default: newUserDataStreamEventsResponse.setActualInstance( jsonElement.toString()); @@ -136,8 +124,7 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { + " for UserDataStreamEventsResponse." + " Possible values:" + " PM_PRO_ACCOUNT_UPDATE" - + " riskLevelChange pmProAccountUpdate" - + " risklevelchange. Falling back to" + + " riskLevelChange. Falling back to" + " String.", jsonObject.get("e").getAsString())); } diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/AccountApiTest.java b/clients/derivatives-trading-portfolio-margin-pro/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/AccountApiTest.java index 52da0eab9..72fa619b3 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/AccountApiTest.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/AccountApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -12,6 +12,8 @@ package com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api; +import static org.junit.Assert.assertEquals; + import com.binance.connector.client.common.ApiClient; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -21,18 +23,25 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.Asset; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.AutoRepay; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.BnbTransferRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.BnbTransferResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.ChangeAutoRepayFuturesStatusRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.ChangeAutoRepayFuturesStatusResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.DeleteMarginCallLevelResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.DeltaEnabled; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.FundAutoCollectionRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.FundAutoCollectionResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.FundCollectionByAssetRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.FundCollectionByAssetResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.GetAutoRepayFuturesStatusResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.GetDeltaModeStatusResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.GetMarginCallLevelResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.GetPortfolioMarginProAccountBalanceResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.GetPortfolioMarginProAccountInfoResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.GetPortfolioMarginProSpanAccountInfoResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.GetTransferableEarnAssetBalanceForPortfolioMarginResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.PortfolioMarginProBankruptcyLoanRepayRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.PortfolioMarginProBankruptcyLoanRepayResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.QueryPortfolioMarginProBankruptcyLoanAmountResponse; @@ -40,6 +49,16 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.QueryPortfolioMarginProNegativeBalanceInterestHistoryResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.RepayFuturesNegativeBalanceRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.RepayFuturesNegativeBalanceResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.SetMarginCallLevelRequest; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.SetMarginCallLevelResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.SwitchDeltaModeRequest; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.SwitchDeltaModeResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.TransferLdusdtRwusdForPortfolioMarginRequest; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.TransferLdusdtRwusdForPortfolioMarginResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.TransferSide; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.TransferType; +import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -48,8 +67,6 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mockito; -import static org.junit.Assert.assertEquals; - /** API tests for AccountApi */ public class AccountApiTest { @@ -93,19 +110,19 @@ public void initApiClient() throws ApiException { } /** - * BNB transfer(USER_DATA) + * BNB transfer (USER_DATA) * - *

BNB transfer can be between Margin Account and USDM Account * You can only use this - * function 2 times per 10 minutes in a rolling manner Weight: 1500 + *

BNB transfer can be between Margin Account and USDM Account Weight(IP): 1500 Security + * Type: USER_DATA Notes: - You can only use this function 2 times per 10 minutes in a rolling + * manner * * @throws ApiException if the Api call fails */ @Test - public void bnbTransferTest() throws ApiException, CryptoException { + public void bnbTransferTest() throws ApiException, CryptoException, IOException { BnbTransferRequest bnbTransferRequest = new BnbTransferRequest(); - - bnbTransferRequest.amount(1d); - bnbTransferRequest.transferSide(""); + bnbTransferRequest.amount(1.0d); + bnbTransferRequest.transferSide(TransferSide.TO_UM); ApiResponse response = api.bnbTransfer(bnbTransferRequest); @@ -119,26 +136,24 @@ public void bnbTransferTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000amount=1&transferSide=", signInputCaptor.getValue()); - assertEquals( - "e16833932c5efb8dd0192481215116c9f1d39b4d46a89360c91c516dfc2487c5", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000amount=1&transferSide=TO_UM", signInputCaptor.getValue()); + assertEquals("137a90c63370349387dde9a0cf59681de3c6fdf6e526208799198100080815c1", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/portfolio/bnb-transfer", actualRequest.url().encodedPath()); } /** - * Change Auto-repay-futures Status(TRADE) + * Change Auto-repay-futures Status (TRADE) * - *

Change Auto-repay-futures Status Weight: 1500 + *

Change Auto-repay-futures Status Weight(IP): 1500 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void changeAutoRepayFuturesStatusTest() throws ApiException, CryptoException { + public void changeAutoRepayFuturesStatusTest() + throws ApiException, CryptoException, IOException { ChangeAutoRepayFuturesStatusRequest changeAutoRepayFuturesStatusRequest = new ChangeAutoRepayFuturesStatusRequest(); - - changeAutoRepayFuturesStatusRequest.autoRepay(""); + changeAutoRepayFuturesStatusRequest.autoRepay(AutoRepay.TRUE); ApiResponse response = api.changeAutoRepayFuturesStatus(changeAutoRepayFuturesStatusRequest); @@ -153,24 +168,54 @@ public void changeAutoRepayFuturesStatusTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000autoRepay=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000autoRepay=true", signInputCaptor.getValue()); assertEquals( - "89b69711fce80ffb1748b7a96c12374faa2b2afeb21a900f9a8ca0163615964e", + "fd3d4e144a7799fdb415fcd1c9a36a08e5600f7bb8a2019be6f141e3b0169ac9", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/portfolio/repay-futures-switch", actualRequest.url().encodedPath()); } /** - * Fund Auto-collection(USER_DATA) + * Delete Margin Call Level (USER_DATA) + * + *

Delete the margin call level for a Portfolio Margin account. Weight(IP): 1500 Security + * Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteMarginCallLevelTest() throws ApiException, CryptoException, IOException { + Long recvWindow = 5000L; + ApiResponse response = api.deleteMarginCallLevel(recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/portfolio/margin-call-level", actualRequest.url().encodedPath()); + } + + /** + * Fund Auto-collection (USER_DATA) * - *

Transfers all assets from Futures Account to Margin account * The BNB would not be - * collected from UM-PM account to the Portfolio Margin account. * You can only use this - * function 500 times per hour in a rolling manner. Weight: 1500 + *

Transfers all assets from Futures Account to Margin account Weight(IP): 1500 Security + * Type: USER_DATA Notes: - The BNB would not be collected from UM-PM account to the Portfolio + * Margin account. - You can only use this function 500 times per hour in a rolling manner. * * @throws ApiException if the Api call fails */ @Test - public void fundAutoCollectionTest() throws ApiException, CryptoException { + public void fundAutoCollectionTest() throws ApiException, CryptoException, IOException { FundAutoCollectionRequest fundAutoCollectionRequest = new FundAutoCollectionRequest(); ApiResponse response = @@ -188,25 +233,23 @@ public void fundAutoCollectionTest() throws ApiException, CryptoException { assertEquals("timestamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", - actualRequest.url().queryParameter("signature")); + "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/portfolio/auto-collection", actualRequest.url().encodedPath()); } /** - * Fund Collection by Asset(USER_DATA) + * Fund Collection by Asset (USER_DATA) * - *

Transfers specific asset from Futures Account to Margin account * The BNB transfer is not - * be supported Weight: 60 + *

Transfers specific asset from Futures Account to Margin account Weight(IP): 60 Security + * Type: USER_DATA Notes: - The BNB transfer is not be supported * * @throws ApiException if the Api call fails */ @Test - public void fundCollectionByAssetTest() throws ApiException, CryptoException { + public void fundCollectionByAssetTest() throws ApiException, CryptoException, IOException { FundCollectionByAssetRequest fundCollectionByAssetRequest = new FundCollectionByAssetRequest(); - - fundCollectionByAssetRequest.asset(""); + fundCollectionByAssetRequest.asset("USDT"); ApiResponse response = api.fundCollectionByAsset(fundCollectionByAssetRequest); @@ -221,22 +264,22 @@ public void fundCollectionByAssetTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000asset=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000asset=USDT", signInputCaptor.getValue()); assertEquals( - "733c2733b75fbea096af9abd7a6e22ac4cce318248e66e514087362c82db2bf1", + "e1f5de10e9064f8425b012d548b9d16e21b37b194141422bc9ae05b8ed5f1c68", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/portfolio/asset-collection", actualRequest.url().encodedPath()); } /** - * Get Auto-repay-futures Status(USER_DATA) + * Get Auto-repay-futures Status (USER_DATA) * - *

Query Auto-repay-futures Status Weight: 30 + *

Query Auto-repay-futures Status Weight(IP): 30 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getAutoRepayFuturesStatusTest() throws ApiException, CryptoException { + public void getAutoRepayFuturesStatusTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getAutoRepayFuturesStatus(recvWindow); @@ -259,15 +302,73 @@ public void getAutoRepayFuturesStatusTest() throws ApiException, CryptoException } /** - * Get Portfolio Margin Pro Account Balance(USER_DATA) + * Get Delta Mode Status (USER_DATA) * - *

Query Portfolio Margin Pro account balance Weight: 20 + *

Query the Delta mode status of current account. Weight(IP): 1500 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getPortfolioMarginProAccountBalanceTest() throws ApiException, CryptoException { - String asset = ""; + public void getDeltaModeStatusTest() throws ApiException, CryptoException, IOException { + Long recvWindow = 5000L; + ApiResponse response = api.getDeltaModeStatus(recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/portfolio/delta-mode", actualRequest.url().encodedPath()); + } + + /** + * Get Margin Call Level (USER_DATA) + * + *

Get the margin call level for a Portfolio Margin account. Weight(IP): 1500 Security Type: + * USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getMarginCallLevelTest() throws ApiException, CryptoException, IOException { + Long recvWindow = 5000L; + ApiResponse response = api.getMarginCallLevel(recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/portfolio/margin-call-level", actualRequest.url().encodedPath()); + } + + /** + * Get Portfolio Margin Pro Account Balance (USER_DATA) + * + *

Query Portfolio Margin Pro account balance Weight(IP): 20 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getPortfolioMarginProAccountBalanceTest() + throws ApiException, CryptoException, IOException { + String asset = "BTC"; Long recvWindow = 5000L; ApiResponse response = api.getPortfolioMarginProAccountBalance(asset, recvWindow); @@ -282,22 +383,25 @@ public void getPortfolioMarginProAccountBalanceTest() throws ApiException, Crypt Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("asset=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "a8610b861691761550acea81c71e6fe676ac39bd2020c66ff1115710eaf265a4", + "asset=BTC&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "34cb82e49b7593f1656dc5e9f9c353c60ac924411707c46e3d5a527235965fe5", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/portfolio/balance", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/portfolio/balance", actualRequest.url().encodedPath()); } /** - * Get Portfolio Margin Pro Account Info(USER_DATA) + * Get Portfolio Margin Pro Account Info (USER_DATA) * - *

Get Portfolio Margin Pro Account Info Weight: 5 + *

Get Portfolio Margin Pro Account Info Weight(UID): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getPortfolioMarginProAccountInfoTest() throws ApiException, CryptoException { + public void getPortfolioMarginProAccountInfoTest() + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getPortfolioMarginProAccountInfo(recvWindow); @@ -312,7 +416,8 @@ public void getPortfolioMarginProAccountInfoTest() throws ApiException, CryptoEx Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); @@ -320,15 +425,16 @@ public void getPortfolioMarginProAccountInfoTest() throws ApiException, CryptoEx } /** - * Get Portfolio Margin Pro SPAN Account Info(USER_DATA) + * Get Portfolio Margin Pro SPAN Account Info (USER_DATA) * *

Get Portfolio Margin Pro SPAN Account Info (For Portfolio Margin Pro SPAN users only) - * Weight: 5 + * Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getPortfolioMarginProSpanAccountInfoTest() throws ApiException, CryptoException { + public void getPortfolioMarginProSpanAccountInfoTest() + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getPortfolioMarginProSpanAccountInfo(recvWindow); @@ -343,22 +449,66 @@ public void getPortfolioMarginProSpanAccountInfoTest() throws ApiException, Cryp Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v2/portfolio/account", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v2/portfolio/account", actualRequest.url().encodedPath()); } /** - * Portfolio Margin Pro Bankruptcy Loan Repay + * Get Transferable Earn Asset Balance for Portfolio Margin (USER_DATA) * - *

Repay Portfolio Margin Pro Bankruptcy Loan Weight: 3000 + *

Get transferable earn asset balance for all types of Portfolio Margin account Weight(IP): + * 1500 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void portfolioMarginProBankruptcyLoanRepayTest() throws ApiException, CryptoException { + public void getTransferableEarnAssetBalanceForPortfolioMarginTest() + throws ApiException, CryptoException, IOException { + String asset = "LDUSDT"; + TransferType transferType = TransferType.EARN_TO_FUTURE; + Long recvWindow = 5000L; + ApiResponse response = + api.getTransferableEarnAssetBalanceForPortfolioMargin( + asset, transferType, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + "asset=LDUSDT&transferType=EARN_TO_FUTURE&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); + assertEquals( + "716e10d248c4cf7b8683afcb18c923ddca06d37b9ab7bb3d08023b3e072f53a0", + actualRequest.url().queryParameter("signature")); + assertEquals( + "/sapi/v1/portfolio/earn-asset-balance", + actualRequest.url().encodedPath()); + } + + /** + * Portfolio Margin Pro Bankruptcy Loan Repay (TRADE) + * + *

Repay Portfolio Margin Pro Bankruptcy Loan Weight(UID): 3000 Security Type: TRADE Notes: - + * Please note that the API Key has enabled Spot & Margin Trading permissions to access this + * endpoint. + * + * @throws ApiException if the Api call fails + */ + @Test + public void portfolioMarginProBankruptcyLoanRepayTest() + throws ApiException, CryptoException, IOException { PortfolioMarginProBankruptcyLoanRepayRequest portfolioMarginProBankruptcyLoanRepayRequest = new PortfolioMarginProBankruptcyLoanRepayRequest(); @@ -370,24 +520,34 @@ public void portfolioMarginProBankruptcyLoanRepayTest() throws ApiException, Cry Mockito.verify(apiClientSpy) .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/portfolio/repay", actualRequest.url().encodedPath()); + assertEquals( + "timestamp=1736393892000from=SPOT", + signInputCaptor.getValue()); + assertEquals( + "8cec128d7bb384c1a8f565f7f3bb814f96672c17eae32ef1899a799ae06d5098", + actualRequest.url().queryParameter("signature")); + assertEquals( + "/sapi/v1/portfolio/repay", actualRequest.url().encodedPath()); } /** - * Query Portfolio Margin Pro Bankruptcy Loan Amount(USER_DATA) + * Query Portfolio Margin Pro Bankruptcy Loan Amount (USER_DATA) * - *

Query Portfolio Margin Pro Bankruptcy Loan Amount * If there’s no classic portfolio margin - * bankruptcy loan, the amount would be 0 Weight: 500 + *

Query Portfolio Margin Pro Bankruptcy Loan Amount Weight(UID): 500 Security Type: + * USER_DATA Notes: - If there’s no classic portfolio margin bankruptcy loan, the amount would + * be 0 * * @throws ApiException if the Api call fails */ @Test public void queryPortfolioMarginProBankruptcyLoanAmountTest() - throws ApiException, CryptoException { + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.queryPortfolioMarginProBankruptcyLoanAmount(recvWindow); @@ -402,36 +562,40 @@ public void queryPortfolioMarginProBankruptcyLoanAmountTest() Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); assertEquals( "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/portfolio/pmLoan", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/portfolio/pmLoan", + actualRequest.url().encodedPath()); } /** - * Query Portfolio Margin Pro Bankruptcy Loan Repay History(USER_DATA) + * Query Portfolio Margin Pro Bankruptcy Loan Repay History (USER_DATA) * - *

Query repay history of pmloan for portfolio margin pro. * `startTime` and - * `endTime` cannot be longer than 360 days * If `startTime` and - * `endTime` not sent, return records of the last 30 days by default. * If - * `startTime`is sent and `endTime` is not sent, return records of - * [startTime, startTime+30d]. * If `startTime` is not sent and `endTime` is - * sent, return records of [endTime-30d, endTime]. Weight: 500 + *

Query repay history of pmloan for portfolio margin pro. Weight(IP): 500 Security Type: + * USER_DATA Notes: - `startTime` and `endTime` cannot be longer than 360 + * days - If `startTime` and `endTime` not sent, return records of the last + * 30 days by default. - If `startTime`is sent and `endTime` is not sent, + * return records of [startTime, startTime+30d]. - If `startTime` is not sent and + * `endTime` is sent, return records of [endTime-30d, endTime]. * * @throws ApiException if the Api call fails */ @Test public void queryPortfolioMarginProBankruptcyLoanRepayHistoryTest() - throws ApiException, CryptoException { + throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long current = 1L; Long size = 10L; + Long current = 1L; Long recvWindow = 5000L; ApiResponse response = api.queryPortfolioMarginProBankruptcyLoanRepayHistory( - startTime, endTime, current, size, recvWindow); + startTime, endTime, size, current, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -444,25 +608,28 @@ public void queryPortfolioMarginProBankruptcyLoanRepayHistoryTest() Request actualRequest = captorValue.request(); assertEquals( - "startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", + "startTime=1623319461670&endTime=1641782889000&size=10¤t=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "2ecc0415a3bdb2963e8030cdf6cf00de6f49d21b71ff939dda42e5756eb8ba66", + "3b2742c69ccb7dbbbe64afce6c34fb4b144a9bc76964fb3b517d79c9ce6fdcbd", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/portfolio/pmloan-history", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/portfolio/pmloan-history", + actualRequest.url().encodedPath()); } /** - * Query Portfolio Margin Pro Negative Balance Interest History(USER_DATA) + * Query Portfolio Margin Pro Negative Balance Interest History (USER_DATA) * - *

Query interest history of negative balance for portfolio margin. Weight: 50 + *

Query interest history of negative balance for portfolio margin. Weight(IP): 50 Security + * Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test public void queryPortfolioMarginProNegativeBalanceInterestHistoryTest() - throws ApiException, CryptoException { - String asset = ""; + throws ApiException, CryptoException, IOException { + String asset = "USDT"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long size = 10L; @@ -482,23 +649,26 @@ public void queryPortfolioMarginProNegativeBalanceInterestHistoryTest() Request actualRequest = captorValue.request(); assertEquals( - "asset=&startTime=1623319461670&endTime=1641782889000&size=10&recvWindow=5000×tamp=1736393892000", + "asset=USDT&startTime=1623319461670&endTime=1641782889000&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "08f5e5a6f9b5d64dcf3e4057c1196835facab312d474221a75a08bcfee1c2c0e", + "e6cb2b64b17ad1e8c1ed53a17110ca0de784ce85b44e039dba1921a5962b9d26", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/portfolio/interest-history", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/portfolio/interest-history", + actualRequest.url().encodedPath()); } /** - * Repay futures Negative Balance(USER_DATA) + * Repay futures Negative Balance (USER_DATA) * - *

Repay futures Negative Balance Weight: 1500 + *

Repay futures Negative Balance Weight(IP): 1500 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void repayFuturesNegativeBalanceTest() throws ApiException, CryptoException { + public void repayFuturesNegativeBalanceTest() + throws ApiException, CryptoException, IOException { RepayFuturesNegativeBalanceRequest repayFuturesNegativeBalanceRequest = new RepayFuturesNegativeBalanceRequest(); @@ -515,12 +685,115 @@ public void repayFuturesNegativeBalanceTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000from=SPOT", signInputCaptor.getValue()); + assertEquals( + "8cec128d7bb384c1a8f565f7f3bb814f96672c17eae32ef1899a799ae06d5098", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/portfolio/repay-futures-negative-balance", actualRequest.url().encodedPath()); + } + + /** + * Set Margin Call Level (USER_DATA) + * + *

Set the margin call level for a Portfolio Margin account. When the account's uniMMR + * drops to the specified level, a notification will be sent via email and SMS. Weight(IP): 1500 + * Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void setMarginCallLevelTest() throws ApiException, CryptoException, IOException { + SetMarginCallLevelRequest setMarginCallLevelRequest = new SetMarginCallLevelRequest(); + setMarginCallLevelRequest.marginCallLevel(1.5d); + + ApiResponse response = + api.setMarginCallLevel(setMarginCallLevelRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000marginCallLevel=1.5", signInputCaptor.getValue()); assertEquals( - "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", + "bdd4b01122e2cc276dc6d2cb7544a744cbe890f4f0e07655e8d61830c514efc6", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/portfolio/margin-call-level", actualRequest.url().encodedPath()); + } + + /** + * Switch Delta Mode (TRADE) + * + *

Switch the Delta mode for existing PM PRO / PM RETAIL accounts. Weight(IP): 1500 Security + * Type: TRADE + * + * @throws ApiException if the Api call fails + */ + @Test + public void switchDeltaModeTest() throws ApiException, CryptoException, IOException { + SwitchDeltaModeRequest switchDeltaModeRequest = new SwitchDeltaModeRequest(); + switchDeltaModeRequest.deltaEnabled(DeltaEnabled.TRUE); + + ApiResponse response = api.switchDeltaMode(switchDeltaModeRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000deltaEnabled=true", signInputCaptor.getValue()); + assertEquals( + "ea76764f7769712fe92e62a20f94b0f1fe9aee58281902c78bd84b158c3db362", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/portfolio/delta-mode", actualRequest.url().encodedPath()); + } + + /** + * Transfer LDUSDT/RWUSD for Portfolio Margin (TRADE) + * + *

Transfer LDUSDT/RWUSD as collateral for all types of Portfolio Margin account Weight(UID): + * 1500 Security Type: TRADE + * + * @throws ApiException if the Api call fails + */ + @Test + public void transferLdusdtRwusdForPortfolioMarginTest() + throws ApiException, CryptoException, IOException { + TransferLdusdtRwusdForPortfolioMarginRequest transferLdusdtRwusdForPortfolioMarginRequest = + new TransferLdusdtRwusdForPortfolioMarginRequest(); + transferLdusdtRwusdForPortfolioMarginRequest.asset(Asset.LDUSDT); + transferLdusdtRwusdForPortfolioMarginRequest.transferType(TransferType.EARN_TO_FUTURE); + transferLdusdtRwusdForPortfolioMarginRequest.amount(1d); + + ApiResponse response = + api.transferLdusdtRwusdForPortfolioMargin( + transferLdusdtRwusdForPortfolioMarginRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + "timestamp=1736393892000amount=1&transferType=EARN_TO_FUTURE&asset=LDUSDT", + signInputCaptor.getValue()); + assertEquals( + "c9719eafa43f24acf6f88a78cdb65558060b8f663efd03584b400678a59c951d", actualRequest.url().queryParameter("signature")); assertEquals( - "/sapi/v1/portfolio/repay-futures-negative-balance", - actualRequest.url().encodedPath()); + "/sapi/v1/portfolio/earn-asset-transfer", actualRequest.url().encodedPath()); } } diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/MarketDataApiTest.java b/clients/derivatives-trading-portfolio-margin-pro/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/MarketDataApiTest.java index f8e50a6e4..d416ed294 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/MarketDataApiTest.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/MarketDataApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin Pro REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API + * Portfolio Margin Pro REST API + * Access advanced account management and high-frequency trading with Binance Portfolio Margin Pro. * * The version of the OpenAPI document: 1.0.0 * @@ -28,6 +28,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.PortfolioMarginProTieredCollateralRateResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.QueryPortfolioMarginAssetIndexPriceResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -79,14 +80,15 @@ public void initApiClient() throws ApiException { } /** - * Get Portfolio Margin Asset Leverage(USER_DATA) + * Get Portfolio Margin Asset Leverage (USER_DATA) * - *

Get Portfolio Margin Asset Leverage Weight: 50 + *

Get Portfolio Margin Asset Leverage Weight(IP): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getPortfolioMarginAssetLeverageTest() throws ApiException, CryptoException { + public void getPortfolioMarginAssetLeverageTest() + throws ApiException, CryptoException, IOException { ApiResponse response = api.getPortfolioMarginAssetLeverage(); @@ -108,14 +110,15 @@ public void getPortfolioMarginAssetLeverageTest() throws ApiException, CryptoExc } /** - * Portfolio Margin Collateral Rate(MARKET_DATA) + * Portfolio Margin Collateral Rate (MARKET_DATA) * - *

Portfolio Margin Collateral Rate Weight: 50 + *

Portfolio Margin Collateral Rate Weight(IP): 50 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ @Test - public void portfolioMarginCollateralRateTest() throws ApiException, CryptoException { + public void portfolioMarginCollateralRateTest() + throws ApiException, CryptoException, IOException { ApiResponse response = api.portfolioMarginCollateralRate(); @@ -126,19 +129,22 @@ public void portfolioMarginCollateralRateTest() throws ApiException, CryptoExcep Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/portfolio/collateralRate", actualRequest.url().encodedPath()); } /** - * Portfolio Margin Pro Tiered Collateral Rate(USER_DATA) + * Portfolio Margin Pro Tiered Collateral Rate (USER_DATA) * - *

Portfolio Margin PRO Tiered Collateral Rate Weight: 50 + *

Portfolio Margin PRO Tiered Collateral Rate Weight(IP): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void portfolioMarginProTieredCollateralRateTest() throws ApiException, CryptoException { + public void portfolioMarginProTieredCollateralRateTest() + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.portfolioMarginProTieredCollateralRate(recvWindow); @@ -153,23 +159,28 @@ public void portfolioMarginProTieredCollateralRateTest() throws ApiException, Cr Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); assertEquals( "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v2/portfolio/collateralRate", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v2/portfolio/collateralRate", actualRequest.url().encodedPath()); } /** * Query Portfolio Margin Asset Index Price (MARKET_DATA) * - *

Query Portfolio Margin Asset Index Price Weight: 1 if send asset or 50 if not send asset + *

Query Portfolio Margin Asset Index Price Weight: - 1 if `asset` is sent - 50 if + * `asset` is not sent Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryPortfolioMarginAssetIndexPriceTest() throws ApiException, CryptoException { - String asset = ""; + public void queryPortfolioMarginAssetIndexPriceTest() + throws ApiException, CryptoException, IOException { + String asset = "BTC"; ApiResponse response = api.queryPortfolioMarginAssetIndexPrice(asset); @@ -180,7 +191,10 @@ public void queryPortfolioMarginAssetIndexPriceTest() throws ApiException, Crypt Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/portfolio/asset-index-price", actualRequest.url().encodedPath()); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); + assertEquals( + "/sapi/v1/portfolio/asset-index-price", actualRequest.url().encodedPath()); } } diff --git a/clients/derivatives-trading-portfolio-margin/CHANGELOG.md b/clients/derivatives-trading-portfolio-margin/CHANGELOG.md index c225b8dad..77c99ccbf 100644 --- a/clients/derivatives-trading-portfolio-margin/CHANGELOG.md +++ b/clients/derivatives-trading-portfolio-margin/CHANGELOG.md @@ -1,5 +1,173 @@ # Changelog +## 7.0.0 - 2026-07-29 + +### Changed (30) + +#### REST API + +- Modified parameter `algoType`: + - enum added: `CONDITIONAL` + - affected methods: + - `newUmAlgoOrder()` (`POST /papi/v1/um/algo/order`) +- Modified parameter `archived`: + - enum added: `true`, `false` + - affected methods: + - `getMarginBorrowLoanInterestHistory()` (`GET /papi/v1/margin/marginInterestHistory`) + - `queryMarginLoanRecord()` (`GET /papi/v1/margin/marginLoan`) + - `queryMarginRepayRecord()` (`GET /papi/v1/margin/repayLoan`) +- Modified parameter `autoRepay`: + - enum added: `true`, `false` + - affected methods: + - `changeAutoRepayFuturesStatus()` (`POST /papi/v1/repay-futures-switch`) +- Modified parameter `autoRepayAtCancel`: + - enum added: `true`, `false` + - affected methods: + - `newMarginOrder()` (`POST /papi/v1/margin/order`) +- Modified parameter `dualSidePosition`: + - enum added: `true`, `false` + - affected methods: + - `changeCmPositionMode()` (`POST /papi/v1/cm/positionSide/dual`) + - `changeUmPositionMode()` (`POST /papi/v1/um/positionSide/dual`) +- Modified parameter `feeBurn`: + - enum added: `true`, `false` + - affected methods: + - `toggleBnbBurnOnUmFuturesTrade()` (`POST /papi/v1/um/feeBurn`) +- Modified parameter `incomeType`: + - enum added: `TRANSFER`, `WELCOME_BONUS`, `FUNDING_FEE`, `REALIZED_PNL`, `COMMISSION`, `INSURANCE_CLEAR`, `DELIVERED_SETTELMENT` + - affected methods: + - `getCmIncomeHistory()` (`GET /papi/v1/cm/income`) +- Modified parameter `incomeType`: + - enum added: `TRANSFER`, `WELCOME_BONUS`, `REALIZED_PNL`, `FUNDING_FEE`, `COMMISSION`, `INSURANCE_CLEAR`, `REFERRAL_KICKBACK`, `COMMISSION_REBATE`, `API_REBATE`, `CONTEST_REWARD`, `CROSS_COLLATERAL_TRANSFER`, `OPTIONS_PREMIUM_FEE`, `OPTIONS_SETTLE_PROFIT`, `INTERNAL_TRANSFER`, `AUTO_EXCHANGE`, `DELIVERED_SETTELMENT`, `COIN_SWAP_DEPOSIT`, `COIN_SWAP_WITHDRAW`, `POSITION_LIMIT_INCREASE_FEE` + - affected methods: + - `getUmIncomeHistory()` (`GET /papi/v1/um/income`) +- Modified parameter `newOrderRespType`: + - enum added: `FULL` + - affected methods: + - `newMarginOrder()` (`POST /papi/v1/margin/order`) +- Modified parameter `priceMatch`: + - enum removed: `NONE` + - affected methods: + - `newCmOrder()` (`POST /papi/v1/cm/order`) + - `modifyCmOrder()` (`PUT /papi/v1/cm/order`) + - `newUmConditionalOrder()` (`POST /papi/v1/um/conditional/order`) + - `newUmOrder()` (`POST /papi/v1/um/order`) + - `modifyUmOrder()` (`PUT /papi/v1/um/order`) +- Modified parameter `priceMatch`: + - enum removed: `NONE` + - affected methods: + - `newUmAlgoOrder()` (`POST /papi/v1/um/algo/order`) +- Modified parameter `priceProtect`: + - enum added: `true`, `false` + - affected methods: + - `newCmConditionalOrder()` (`POST /papi/v1/cm/conditional/order`) + - `newUmAlgoOrder()` (`POST /papi/v1/um/algo/order`) + - `newUmConditionalOrder()` (`POST /papi/v1/um/conditional/order`) +- Modified parameter `reduceOnly`: + - enum added: `true`, `false` + - affected methods: + - `newCmOrder()` (`POST /papi/v1/cm/order`) + - `newUmAlgoOrder()` (`POST /papi/v1/um/algo/order`) + - `newUmConditionalOrder()` (`POST /papi/v1/um/conditional/order`) + - `newUmOrder()` (`POST /papi/v1/um/order`) +- Modified parameter `sideEffectType`: + - enum added: `AUTO_BORROW_REPAY` + - affected methods: + - `newMarginOrder()` (`POST /papi/v1/margin/order`) +- Modified parameter `strategyType`: + - enum removed: `LIMIT_MAKER` + - affected methods: + - `newCmConditionalOrder()` (`POST /papi/v1/cm/conditional/order`) + - `newUmConditionalOrder()` (`POST /papi/v1/um/conditional/order`) +- Modified parameter `symbol`: + - required: `true` → `false` + - affected methods: + - `queryAllCmOrders()` (`GET /papi/v1/cm/allOrders`) +- Modified parameter `timeInForce`: + - enum removed: `GTX` + - affected methods: + - `newMarginOrder()` (`POST /papi/v1/margin/order`) +- Modified parameter `timeInForce`: + - enum added: `GTD` + - affected methods: + - `newUmAlgoOrder()` (`POST /papi/v1/um/algo/order`) +- Modified parameter `timeInForce`: + - enum added: `GTD` + - affected methods: + - `newUmConditionalOrder()` (`POST /papi/v1/um/conditional/order`) + - `newUmOrder()` (`POST /papi/v1/um/order`) +- Modified parameter `transferSide`: + - enum added: `TO_UM`, `FROM_UM` + - affected methods: + - `bnbTransfer()` (`POST /papi/v1/bnb-transfer`) +- Modified parameter `type`: + - enum added: `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`, `LIMIT_MAKER` + - affected methods: + - `newMarginOrder()` (`POST /papi/v1/margin/order`) +- Modified parameter `type`: + - enum removed: `LIMIT`, `MARKET` + - enum added: `STOP`, `TAKE_PROFIT`, `STOP_MARKET`, `TAKE_PROFIT_MARKET`, `TRAILING_STOP_MARKET` + - affected methods: + - `newUmAlgoOrder()` (`POST /papi/v1/um/algo/order`) +- Modified parameter `workingType`: + - enum added: `CONTRACT_PRICE` + - affected methods: + - `newCmConditionalOrder()` (`POST /papi/v1/cm/conditional/order`) + - `newUmConditionalOrder()` (`POST /papi/v1/um/conditional/order`) +- Modified parameter `workingType`: + - enum added: `CONTRACT_PRICE` + - affected methods: + - `newUmAlgoOrder()` (`POST /papi/v1/um/algo/order`) +- Modified response for `accountBalance()` (`GET /papi/v1/balance`): + - oneOf modified + +- Modified response for `queryCurrentUmOpenAlgoOrder()` (`GET /papi/v1/um/algo/algoOrder`): + - property `tpPrice` deleted + - property `tpTriggerPrice` deleted + - property `slPrice` deleted + - property `tpOrderType` deleted + - property `icebergQuantity` deleted + - property `slTriggerPrice` deleted + +- Modified response for `queryUmAlgoOrderHistory()` (`GET /papi/v1/um/algo/allAlgoOrders`): + - items: property `slTriggerPrice` deleted + - items: property `tpOrderType` deleted + - items: property `slPrice` deleted + - items: property `tpPrice` deleted + - items: property `icebergQuantity` deleted + - items: property `tpTriggerPrice` deleted + - items: item property `slTriggerPrice` deleted + - items: item property `tpOrderType` deleted + - items: item property `slPrice` deleted + - items: item property `tpPrice` deleted + - items: item property `icebergQuantity` deleted + - items: item property `tpTriggerPrice` deleted + +- Modified response for `queryAllCurrentUmOpenAlgoOrders()` (`GET /papi/v1/um/algo/openAlgoOrders`): + - items: property `actualOrderId` deleted + - items: property `slTriggerPrice` deleted + - items: property `actualPrice` deleted + - items: property `icebergQuantity` deleted + - items: property `slPrice` deleted + - items: property `tpPrice` deleted + - items: property `tpTriggerPrice` deleted + - items: property `tpOrderType` deleted + - items: item property `actualOrderId` deleted + - items: item property `slTriggerPrice` deleted + - items: item property `actualPrice` deleted + - items: item property `icebergQuantity` deleted + - items: item property `slPrice` deleted + - items: item property `tpPrice` deleted + - items: item property `tpTriggerPrice` deleted + - items: item property `tpOrderType` deleted + +- Modified response for `newUmAlgoOrder()` (`POST /papi/v1/um/algo/order`): + - property `icebergQuantity` deleted + +- Modified response for `getUmIncomeHistory()` (`GET /papi/v1/um/income`): + - items.`tranId`: type `integer` → `string` + - items.`tranId`: type `integer` → `string` + ## 6.0.0 - 2026-05-04 - Added stop method for WebSocket diff --git a/clients/derivatives-trading-portfolio-margin/docs/AccountApi.md b/clients/derivatives-trading-portfolio-margin/docs/AccountApi.md index 62fc74aec..3445296a7 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/AccountApi.md +++ b/clients/derivatives-trading-portfolio-margin/docs/AccountApi.md @@ -4,47 +4,47 @@ All URIs are relative to *https://papi.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**accountBalance**](AccountApi.md#accountBalance) | **GET** /papi/v1/balance | Account Balance(USER_DATA) | -| [**accountInformation**](AccountApi.md#accountInformation) | **GET** /papi/v1/account | Account Information(USER_DATA) | +| [**accountBalance**](AccountApi.md#accountBalance) | **GET** /papi/v1/balance | Account Balance (USER_DATA) | +| [**accountInformation**](AccountApi.md#accountInformation) | **GET** /papi/v1/account | Account Information (USER_DATA) | | [**bnbTransfer**](AccountApi.md#bnbTransfer) | **POST** /papi/v1/bnb-transfer | BNB transfer (TRADE) | -| [**changeAutoRepayFuturesStatus**](AccountApi.md#changeAutoRepayFuturesStatus) | **POST** /papi/v1/repay-futures-switch | Change Auto-repay-futures Status(TRADE) | +| [**changeAutoRepayFuturesStatus**](AccountApi.md#changeAutoRepayFuturesStatus) | **POST** /papi/v1/repay-futures-switch | Change Auto-repay-futures Status (TRADE) | | [**changeCmInitialLeverage**](AccountApi.md#changeCmInitialLeverage) | **POST** /papi/v1/cm/leverage | Change CM Initial Leverage (TRADE) | -| [**changeCmPositionMode**](AccountApi.md#changeCmPositionMode) | **POST** /papi/v1/cm/positionSide/dual | Change CM Position Mode(TRADE) | -| [**changeUmInitialLeverage**](AccountApi.md#changeUmInitialLeverage) | **POST** /papi/v1/um/leverage | Change UM Initial Leverage(TRADE) | -| [**changeUmPositionMode**](AccountApi.md#changeUmPositionMode) | **POST** /papi/v1/um/positionSide/dual | Change UM Position Mode(TRADE) | -| [**cmNotionalAndLeverageBrackets**](AccountApi.md#cmNotionalAndLeverageBrackets) | **GET** /papi/v1/cm/leverageBracket | CM Notional and Leverage Brackets(USER_DATA) | -| [**fundAutoCollection**](AccountApi.md#fundAutoCollection) | **POST** /papi/v1/auto-collection | Fund Auto-collection(TRADE) | -| [**fundCollectionByAsset**](AccountApi.md#fundCollectionByAsset) | **POST** /papi/v1/asset-collection | Fund Collection by Asset(TRADE) | -| [**getAutoRepayFuturesStatus**](AccountApi.md#getAutoRepayFuturesStatus) | **GET** /papi/v1/repay-futures-switch | Get Auto-repay-futures Status(USER_DATA) | -| [**getCmAccountDetail**](AccountApi.md#getCmAccountDetail) | **GET** /papi/v1/cm/account | Get CM Account Detail(USER_DATA) | -| [**getCmCurrentPositionMode**](AccountApi.md#getCmCurrentPositionMode) | **GET** /papi/v1/cm/positionSide/dual | Get CM Current Position Mode(USER_DATA) | -| [**getCmIncomeHistory**](AccountApi.md#getCmIncomeHistory) | **GET** /papi/v1/cm/income | Get CM Income History(USER_DATA) | +| [**changeCmPositionMode**](AccountApi.md#changeCmPositionMode) | **POST** /papi/v1/cm/positionSide/dual | Change CM Position Mode (TRADE) | +| [**changeUmInitialLeverage**](AccountApi.md#changeUmInitialLeverage) | **POST** /papi/v1/um/leverage | Change UM Initial Leverage (TRADE) | +| [**changeUmPositionMode**](AccountApi.md#changeUmPositionMode) | **POST** /papi/v1/um/positionSide/dual | Change UM Position Mode (TRADE) | +| [**cmNotionalAndLeverageBrackets**](AccountApi.md#cmNotionalAndLeverageBrackets) | **GET** /papi/v1/cm/leverageBracket | CM Notional and Leverage Brackets (USER_DATA) | +| [**fundAutoCollection**](AccountApi.md#fundAutoCollection) | **POST** /papi/v1/auto-collection | Fund Auto-collection (TRADE) | +| [**fundCollectionByAsset**](AccountApi.md#fundCollectionByAsset) | **POST** /papi/v1/asset-collection | Fund Collection by Asset (TRADE) | +| [**getAutoRepayFuturesStatus**](AccountApi.md#getAutoRepayFuturesStatus) | **GET** /papi/v1/repay-futures-switch | Get Auto-repay-futures Status (USER_DATA) | +| [**getCmAccountDetail**](AccountApi.md#getCmAccountDetail) | **GET** /papi/v1/cm/account | Get CM Account Detail (USER_DATA) | +| [**getCmCurrentPositionMode**](AccountApi.md#getCmCurrentPositionMode) | **GET** /papi/v1/cm/positionSide/dual | Get CM Current Position Mode (USER_DATA) | +| [**getCmIncomeHistory**](AccountApi.md#getCmIncomeHistory) | **GET** /papi/v1/cm/income | Get CM Income History (USER_DATA) | | [**getDownloadIdForUmFuturesOrderHistory**](AccountApi.md#getDownloadIdForUmFuturesOrderHistory) | **GET** /papi/v1/um/order/asyn | Get Download Id For UM Futures Order History (USER_DATA) | | [**getDownloadIdForUmFuturesTradeHistory**](AccountApi.md#getDownloadIdForUmFuturesTradeHistory) | **GET** /papi/v1/um/trade/asyn | Get Download Id For UM Futures Trade History (USER_DATA) | | [**getDownloadIdForUmFuturesTransactionHistory**](AccountApi.md#getDownloadIdForUmFuturesTransactionHistory) | **GET** /papi/v1/um/income/asyn | Get Download Id For UM Futures Transaction History (USER_DATA) | -| [**getMarginBorrowLoanInterestHistory**](AccountApi.md#getMarginBorrowLoanInterestHistory) | **GET** /papi/v1/margin/marginInterestHistory | Get Margin Borrow/Loan Interest History(USER_DATA) | -| [**getUmAccountDetail**](AccountApi.md#getUmAccountDetail) | **GET** /papi/v1/um/account | Get UM Account Detail(USER_DATA) | -| [**getUmAccountDetailV2**](AccountApi.md#getUmAccountDetailV2) | **GET** /papi/v2/um/account | Get UM Account Detail V2(USER_DATA) | -| [**getUmCurrentPositionMode**](AccountApi.md#getUmCurrentPositionMode) | **GET** /papi/v1/um/positionSide/dual | Get UM Current Position Mode(USER_DATA) | -| [**getUmFuturesOrderDownloadLinkById**](AccountApi.md#getUmFuturesOrderDownloadLinkById) | **GET** /papi/v1/um/order/asyn/id | Get UM Futures Order Download Link by Id(USER_DATA) | -| [**getUmFuturesTradeDownloadLinkById**](AccountApi.md#getUmFuturesTradeDownloadLinkById) | **GET** /papi/v1/um/trade/asyn/id | Get UM Futures Trade Download Link by Id(USER_DATA) | -| [**getUmFuturesTransactionDownloadLinkById**](AccountApi.md#getUmFuturesTransactionDownloadLinkById) | **GET** /papi/v1/um/income/asyn/id | Get UM Futures Transaction Download Link by Id(USER_DATA) | -| [**getUmIncomeHistory**](AccountApi.md#getUmIncomeHistory) | **GET** /papi/v1/um/income | Get UM Income History(USER_DATA) | -| [**getUserCommissionRateForCm**](AccountApi.md#getUserCommissionRateForCm) | **GET** /papi/v1/cm/commissionRate | Get User Commission Rate for CM(USER_DATA) | -| [**getUserCommissionRateForUm**](AccountApi.md#getUserCommissionRateForUm) | **GET** /papi/v1/um/commissionRate | Get User Commission Rate for UM(USER_DATA) | -| [**marginMaxBorrow**](AccountApi.md#marginMaxBorrow) | **GET** /papi/v1/margin/maxBorrowable | Margin Max Borrow(USER_DATA) | -| [**portfolioMarginUmTradingQuantitativeRulesIndicators**](AccountApi.md#portfolioMarginUmTradingQuantitativeRulesIndicators) | **GET** /papi/v1/um/apiTradingStatus | Portfolio Margin UM Trading Quantitative Rules Indicators(USER_DATA) | -| [**queryCmPositionInformation**](AccountApi.md#queryCmPositionInformation) | **GET** /papi/v1/cm/positionRisk | Query CM Position Information(USER_DATA) | -| [**queryMarginLoanRecord**](AccountApi.md#queryMarginLoanRecord) | **GET** /papi/v1/margin/marginLoan | Query Margin Loan Record(USER_DATA) | -| [**queryMarginMaxWithdraw**](AccountApi.md#queryMarginMaxWithdraw) | **GET** /papi/v1/margin/maxWithdraw | Query Margin Max Withdraw(USER_DATA) | -| [**queryMarginRepayRecord**](AccountApi.md#queryMarginRepayRecord) | **GET** /papi/v1/margin/repayLoan | Query Margin repay Record(USER_DATA) | -| [**queryPortfolioMarginNegativeBalanceInterestHistory**](AccountApi.md#queryPortfolioMarginNegativeBalanceInterestHistory) | **GET** /papi/v1/portfolio/interest-history | Query Portfolio Margin Negative Balance Interest History(USER_DATA) | -| [**queryUmPositionInformation**](AccountApi.md#queryUmPositionInformation) | **GET** /papi/v1/um/positionRisk | Query UM Position Information(USER_DATA) | +| [**getMarginBorrowLoanInterestHistory**](AccountApi.md#getMarginBorrowLoanInterestHistory) | **GET** /papi/v1/margin/marginInterestHistory | Get Margin Borrow/Loan Interest History (USER_DATA) | +| [**getUmAccountDetail**](AccountApi.md#getUmAccountDetail) | **GET** /papi/v1/um/account | Get UM Account Detail (USER_DATA) | +| [**getUmAccountDetailV2**](AccountApi.md#getUmAccountDetailV2) | **GET** /papi/v2/um/account | Get UM Account Detail V2 (USER_DATA) | +| [**getUmCurrentPositionMode**](AccountApi.md#getUmCurrentPositionMode) | **GET** /papi/v1/um/positionSide/dual | Get UM Current Position Mode (USER_DATA) | +| [**getUmFuturesOrderDownloadLinkById**](AccountApi.md#getUmFuturesOrderDownloadLinkById) | **GET** /papi/v1/um/order/asyn/id | Get UM Futures Order Download Link by Id (USER_DATA) | +| [**getUmFuturesTradeDownloadLinkById**](AccountApi.md#getUmFuturesTradeDownloadLinkById) | **GET** /papi/v1/um/trade/asyn/id | Get UM Futures Trade Download Link by Id (USER_DATA) | +| [**getUmFuturesTransactionDownloadLinkById**](AccountApi.md#getUmFuturesTransactionDownloadLinkById) | **GET** /papi/v1/um/income/asyn/id | Get UM Futures Transaction Download Link by Id (USER_DATA) | +| [**getUmIncomeHistory**](AccountApi.md#getUmIncomeHistory) | **GET** /papi/v1/um/income | Get UM Income History (USER_DATA) | +| [**getUserCommissionRateForCm**](AccountApi.md#getUserCommissionRateForCm) | **GET** /papi/v1/cm/commissionRate | Get User Commission Rate for CM (USER_DATA) | +| [**getUserCommissionRateForUm**](AccountApi.md#getUserCommissionRateForUm) | **GET** /papi/v1/um/commissionRate | Get User Commission Rate for UM (USER_DATA) | +| [**marginMaxBorrow**](AccountApi.md#marginMaxBorrow) | **GET** /papi/v1/margin/maxBorrowable | Margin Max Borrow (USER_DATA) | +| [**portfolioMarginUmTradingQuantitativeRulesIndicators**](AccountApi.md#portfolioMarginUmTradingQuantitativeRulesIndicators) | **GET** /papi/v1/um/apiTradingStatus | Portfolio Margin UM Trading Quantitative Rules Indicators (USER_DATA) | +| [**queryCmPositionInformation**](AccountApi.md#queryCmPositionInformation) | **GET** /papi/v1/cm/positionRisk | Query CM Position Information (USER_DATA) | +| [**queryMarginLoanRecord**](AccountApi.md#queryMarginLoanRecord) | **GET** /papi/v1/margin/marginLoan | Query Margin Loan Record (USER_DATA) | +| [**queryMarginMaxWithdraw**](AccountApi.md#queryMarginMaxWithdraw) | **GET** /papi/v1/margin/maxWithdraw | Query Margin Max Withdraw (USER_DATA) | +| [**queryMarginRepayRecord**](AccountApi.md#queryMarginRepayRecord) | **GET** /papi/v1/margin/repayLoan | Query Margin repay Record (USER_DATA) | +| [**queryPortfolioMarginNegativeBalanceInterestHistory**](AccountApi.md#queryPortfolioMarginNegativeBalanceInterestHistory) | **GET** /papi/v1/portfolio/interest-history | Query Portfolio Margin Negative Balance Interest History (USER_DATA) | +| [**queryUmPositionInformation**](AccountApi.md#queryUmPositionInformation) | **GET** /papi/v1/um/positionRisk | Query UM Position Information (USER_DATA) | | [**queryUserNegativeBalanceAutoExchangeRecord**](AccountApi.md#queryUserNegativeBalanceAutoExchangeRecord) | **GET** /papi/v1/portfolio/negative-balance-exchange-record | Query User Negative Balance Auto Exchange Record (USER_DATA) | | [**queryUserRateLimit**](AccountApi.md#queryUserRateLimit) | **GET** /papi/v1/rateLimit/order | Query User Rate Limit (USER_DATA) | -| [**repayFuturesNegativeBalance**](AccountApi.md#repayFuturesNegativeBalance) | **POST** /papi/v1/repay-futures-negative-balance | Repay futures Negative Balance(USER_DATA) | -| [**umFuturesAccountConfiguration**](AccountApi.md#umFuturesAccountConfiguration) | **GET** /papi/v1/um/accountConfig | UM Futures Account Configuration(USER_DATA) | -| [**umFuturesSymbolConfiguration**](AccountApi.md#umFuturesSymbolConfiguration) | **GET** /papi/v1/um/symbolConfig | UM Futures Symbol Configuration(USER_DATA) | +| [**repayFuturesNegativeBalance**](AccountApi.md#repayFuturesNegativeBalance) | **POST** /papi/v1/repay-futures-negative-balance | Repay futures Negative Balance (USER_DATA) | +| [**umFuturesAccountConfiguration**](AccountApi.md#umFuturesAccountConfiguration) | **GET** /papi/v1/um/accountConfig | UM Futures Account Configuration (USER_DATA) | +| [**umFuturesSymbolConfiguration**](AccountApi.md#umFuturesSymbolConfiguration) | **GET** /papi/v1/um/symbolConfig | UM Futures Symbol Configuration (USER_DATA) | | [**umNotionalAndLeverageBrackets**](AccountApi.md#umNotionalAndLeverageBrackets) | **GET** /papi/v1/um/leverageBracket | UM Notional and Leverage Brackets (USER_DATA) | @@ -52,9 +52,9 @@ All URIs are relative to *https://papi.binance.com* # **accountBalance** > AccountBalanceResponse accountBalance(asset, recvWindow) -Account Balance(USER_DATA) +Account Balance (USER_DATA) -Query account balance Weight: 20 +Query account balance Weight(IP): 20 Security Type: USER_DATA ### Example ```java @@ -71,8 +71,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String asset = "asset_example"; // String | - Long recvWindow = 56L; // Long | + String asset = "USDT"; // String | + Long recvWindow = 5000L; // Long | try { AccountBalanceResponse result = apiInstance.accountBalance(asset, recvWindow); System.out.println(result); @@ -116,9 +116,9 @@ No authorization required # **accountInformation** > AccountInformationResponse accountInformation(recvWindow) -Account Information(USER_DATA) +Account Information (USER_DATA) -Query account information Weight: 20 +Query account information Weight(IP): 20 Security Type: USER_DATA ### Example ```java @@ -135,7 +135,7 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { AccountInformationResponse result = apiInstance.accountInformation(recvWindow); System.out.println(result); @@ -180,7 +180,7 @@ No authorization required BNB transfer (TRADE) -Transfer BNB in and out of UM * The endpoint can only be called 10 times per 10 minutes in a rolling manner Weight: 750 +Transfer BNB in and out of UM Weight(IP): 750 Security Type: TRADE Notes: - The endpoint can only be called 10 times per 10 minutes in a rolling manner ### Example ```java @@ -240,9 +240,9 @@ No authorization required # **changeAutoRepayFuturesStatus** > ChangeAutoRepayFuturesStatusResponse changeAutoRepayFuturesStatus(changeAutoRepayFuturesStatusRequest) -Change Auto-repay-futures Status(TRADE) +Change Auto-repay-futures Status (TRADE) -Change Auto-repay-futures Status Weight: 750 +Change Auto-repay-futures Status Weight(IP): 750 Security Type: TRADE ### Example ```java @@ -304,7 +304,7 @@ No authorization required Change CM Initial Leverage (TRADE) -Change user's initial leverage of specific symbol in CM. Weight: 1 +Change user's initial leverage of specific symbol in CM. Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -364,9 +364,9 @@ No authorization required # **changeCmPositionMode** > ChangeCmPositionModeResponse changeCmPositionMode(changeCmPositionModeRequest) -Change CM Position Mode(TRADE) +Change CM Position Mode (TRADE) -Change user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in CM Weight: 1 +Change user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in CM Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -426,9 +426,9 @@ No authorization required # **changeUmInitialLeverage** > ChangeUmInitialLeverageResponse changeUmInitialLeverage(changeUmInitialLeverageRequest) -Change UM Initial Leverage(TRADE) +Change UM Initial Leverage (TRADE) -Change user's initial leverage of specific symbol in UM. Weight: 1 +Change user's initial leverage of specific symbol in UM. Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -488,9 +488,9 @@ No authorization required # **changeUmPositionMode** > ChangeUmPositionModeResponse changeUmPositionMode(changeUmPositionModeRequest) -Change UM Position Mode(TRADE) +Change UM Position Mode (TRADE) -Change user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in UM Weight: 1 +Change user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in UM Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -550,9 +550,9 @@ No authorization required # **cmNotionalAndLeverageBrackets** > CmNotionalAndLeverageBracketsResponse cmNotionalAndLeverageBrackets(symbol, recvWindow) -CM Notional and Leverage Brackets(USER_DATA) +CM Notional and Leverage Brackets (USER_DATA) -Query CM notional and leverage brackets Weight: 1 +Query CM notional and leverage brackets Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -569,8 +569,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSD_PERP"; // String | + Long recvWindow = 5000L; // Long | try { CmNotionalAndLeverageBracketsResponse result = apiInstance.cmNotionalAndLeverageBrackets(symbol, recvWindow); System.out.println(result); @@ -614,9 +614,9 @@ No authorization required # **fundAutoCollection** > FundAutoCollectionResponse fundAutoCollection(fundAutoCollectionRequest) -Fund Auto-collection(TRADE) +Fund Auto-collection (TRADE) -Fund collection for Portfolio Margin * The BNB would not be collected from UM-PM account to the Portfolio Margin account. * You can only use this function 500 times per hour in a rolling manner. Weight: 750 +Fund collection for Portfolio Margin Weight(IP): 750 Security Type: TRADE Notes: - BNB assets will not be auto-collected. - Rolling window endpoint can be called at most 500 times per hour. ### Example ```java @@ -652,7 +652,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **fundAutoCollectionRequest** | [**FundAutoCollectionRequest**](FundAutoCollectionRequest.md)| | | +| **fundAutoCollectionRequest** | [**FundAutoCollectionRequest**](FundAutoCollectionRequest.md)| | [optional] | ### Return type @@ -676,9 +676,9 @@ No authorization required # **fundCollectionByAsset** > FundCollectionByAssetResponse fundCollectionByAsset(fundCollectionByAssetRequest) -Fund Collection by Asset(TRADE) +Fund Collection by Asset (TRADE) -Transfers specific asset from Futures Account to Margin account * The BNB transfer is not be supported Weight: 30 +Transfers specific asset from Futures Account to Margin account Weight(IP): 30 Security Type: TRADE Notes: - The BNB transfer is not be supported ### Example ```java @@ -738,9 +738,9 @@ No authorization required # **getAutoRepayFuturesStatus** > GetAutoRepayFuturesStatusResponse getAutoRepayFuturesStatus(recvWindow) -Get Auto-repay-futures Status(USER_DATA) +Get Auto-repay-futures Status (USER_DATA) -Query Auto-repay-futures Status Weight: 30 +Query Auto-repay-futures Status Weight(IP): 30 Security Type: USER_DATA ### Example ```java @@ -757,7 +757,7 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { GetAutoRepayFuturesStatusResponse result = apiInstance.getAutoRepayFuturesStatus(recvWindow); System.out.println(result); @@ -800,9 +800,9 @@ No authorization required # **getCmAccountDetail** > GetCmAccountDetailResponse getCmAccountDetail(recvWindow) -Get CM Account Detail(USER_DATA) +Get CM Account Detail (USER_DATA) -Get current CM account asset and position information. Weight: 5 +Get current CM account asset and position information. Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -819,7 +819,7 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { GetCmAccountDetailResponse result = apiInstance.getCmAccountDetail(recvWindow); System.out.println(result); @@ -862,9 +862,9 @@ No authorization required # **getCmCurrentPositionMode** > GetCmCurrentPositionModeResponse getCmCurrentPositionMode(recvWindow) -Get CM Current Position Mode(USER_DATA) +Get CM Current Position Mode (USER_DATA) -Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in CM Weight: 30 +Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in CM Weight(IP): 30 Security Type: USER_DATA ### Example ```java @@ -881,7 +881,7 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { GetCmCurrentPositionModeResponse result = apiInstance.getCmCurrentPositionMode(recvWindow); System.out.println(result); @@ -924,9 +924,9 @@ No authorization required # **getCmIncomeHistory** > GetCmIncomeHistoryResponse getCmIncomeHistory(symbol, incomeType, startTime, endTime, page, limit, recvWindow) -Get CM Income History(USER_DATA) +Get CM Income History (USER_DATA) -Get CM Income History * If `incomeType` is not sent, all kinds of flow will be returned * \"trandId\" is unique in the same \"incomeType\" for a user * The interval between `startTime` and `endTime` can not exceed 200 days: * If `startTime` and `endTime` are not sent, the last 200 days will be returned Weight: 30 +Get CM Income History. Weight(IP): 30 Security Type: USER_DATA Notes: - If `incomeType` is not sent, all kinds of flow will be returned - \"trandId\" is unique in the same \"incomeType\" for a user - The interval between `startTime` and `endTime` can not exceed 200 days: - If `startTime` and `endTime` are not sent, the last 200 days will be returned ### Example ```java @@ -943,13 +943,13 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String symbol = "symbol_example"; // String | - String incomeType = "incomeType_example"; // String | TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, POSITION_LIMIT_INCREASE_FEE - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long page = 56L; // Long | - Long limit = 56L; // Long | Default 100; max 1000 - Long recvWindow = 56L; // Long | + String symbol = "BTCUSD_200925"; // String | + IncomeType incomeType = IncomeType.fromValue("TRANSFER"); // IncomeType | + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long page = 1L; // Long | + Long limit = 100L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | try { GetCmIncomeHistoryResponse result = apiInstance.getCmIncomeHistory(symbol, incomeType, startTime, endTime, page, limit, recvWindow); System.out.println(result); @@ -969,11 +969,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **symbol** | **String**| | [optional] | -| **incomeType** | **String**| TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, POSITION_LIMIT_INCREASE_FEE | [optional] | +| **incomeType** | [**IncomeType**](.md)| | [optional] [enum: TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, POSITION_LIMIT_INCREASE_FEE] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | | **page** | **Long**| | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **limit** | **Long**| Number of results returned. | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -1000,7 +1000,7 @@ No authorization required Get Download Id For UM Futures Order History (USER_DATA) -Get download id for UM futures order history * Request Limitation is 10 times per month, shared by front end download page and rest api * The time between `startTime` and `endTime` can not be longer than 1 year Weight: 1500 +Get download id for UM futures order history Weight(IP): 1500 Security Type: USER_DATA Notes: - Request Limitation is 10 times per month, shared by front end download page and rest api - The time between `startTime` and `endTime` can not be longer than 1 year ### Example ```java @@ -1017,9 +1017,9 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long recvWindow = 56L; // Long | + Long startTime = 1623319461670L; // Long | Timestamp in ms + Long endTime = 1641782889000L; // Long | Timestamp in ms + Long recvWindow = 5000L; // Long | try { GetDownloadIdForUmFuturesOrderHistoryResponse result = apiInstance.getDownloadIdForUmFuturesOrderHistory(startTime, endTime, recvWindow); System.out.println(result); @@ -1038,8 +1038,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **startTime** | **Long**| | | -| **endTime** | **Long**| | | +| **startTime** | **Long**| Timestamp in ms | | +| **endTime** | **Long**| Timestamp in ms | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -1066,7 +1066,7 @@ No authorization required Get Download Id For UM Futures Trade History (USER_DATA) -Get download id for UM futures trade history * Request Limitation is 5 times per month, shared by front end download page and rest api * The time between `startTime` and `endTime` can not be longer than 1 year Weight: 1500 +Get download id for UM futures trade history Weight(IP): 1500 Security Type: USER_DATA Notes: - Request Limitation is 5 times per month, shared by front end download page and rest api - The time between `startTime` and `endTime` can not be longer than 1 year ### Example ```java @@ -1083,9 +1083,9 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long recvWindow = 56L; // Long | + Long startTime = 1623319461670L; // Long | Timestamp in ms + Long endTime = 1641782889000L; // Long | Timestamp in ms + Long recvWindow = 5000L; // Long | try { GetDownloadIdForUmFuturesTradeHistoryResponse result = apiInstance.getDownloadIdForUmFuturesTradeHistory(startTime, endTime, recvWindow); System.out.println(result); @@ -1104,8 +1104,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **startTime** | **Long**| | | -| **endTime** | **Long**| | | +| **startTime** | **Long**| Timestamp in ms | | +| **endTime** | **Long**| Timestamp in ms | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -1132,7 +1132,7 @@ No authorization required Get Download Id For UM Futures Transaction History (USER_DATA) -Get download id for UM futures transaction history * Request Limitation is 5 times per month, shared by front end download page and rest api * The time between `startTime` and `endTime` can not be longer than 1 year Weight: 1500 +Get download id for UM futures transaction history Weight(IP): 1500 Security Type: USER_DATA Notes: - Request Limitation is 5 times per month, shared by front end download page and rest api - The time between `startTime` and `endTime` can not be longer than 1 year ### Example ```java @@ -1149,9 +1149,9 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long recvWindow = 56L; // Long | + Long startTime = 1623319461670L; // Long | Timestamp in ms + Long endTime = 1641782889000L; // Long | Timestamp in ms + Long recvWindow = 5000L; // Long | try { GetDownloadIdForUmFuturesTransactionHistoryResponse result = apiInstance.getDownloadIdForUmFuturesTransactionHistory(startTime, endTime, recvWindow); System.out.println(result); @@ -1170,8 +1170,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **startTime** | **Long**| | | -| **endTime** | **Long**| | | +| **startTime** | **Long**| Timestamp in ms | | +| **endTime** | **Long**| Timestamp in ms | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -1196,9 +1196,9 @@ No authorization required # **getMarginBorrowLoanInterestHistory** > GetMarginBorrowLoanInterestHistoryResponse getMarginBorrowLoanInterestHistory(asset, startTime, endTime, current, size, archived, recvWindow) -Get Margin Borrow/Loan Interest History(USER_DATA) +Get Margin Borrow/Loan Interest History (USER_DATA) -Get Margin Borrow/Loan Interest History * Response in descending order * The max interval between startTime and endTime is 30 days. It is a MUST to ensure data correctness. * If `startTime` and `endTime` not sent, return records of the last 7 days by default * If `startTime` is sent and `endTime` is not sent, the records from `startTime` to the present will be returned; if `startTime` is more than 30 days ago, the records of the past 30 days will be returned. * If `startTime` is not sent and `endTime` is sent, the records of the 7 days before `endTime` is returned. * Type in response has 5 enums: * `PERIODIC` interest charged per hour * `ON_BORROW` first interest charged on borrow * `PERIODIC_CONVERTED` interest charged per hour converted into BNB * `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB * `PORTFOLIO` Portfolio Margin negative balance daily interest Weight: 1 +Get Margin Borrow/Loan Interest History Weight(IP): 1 Security Type: USER_DATA Notes: - Response in descending order - The max interval between startTime and endTime is 30 days. It is a MUST to ensure data correctness. - If `startTime` and `endTime` not sent, return records of the last 7 days by default - If `startTime` is sent and `endTime` is not sent, the records from `startTime` to the present will be returned; if `startTime` is more than 30 days ago, the records of the past 30 days will be returned. - If `startTime` is not sent and `endTime` is sent, the records of the 7 days before `endTime` is returned. - Type in response has 5 enums: - `PERIODIC` interest charged per hour - `ON_BORROW` first interest charged on borrow - `PERIODIC_CONVERTED` interest charged per hour converted into BNB - `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB - `PORTFOLIO` Portfolio Margin negative balance daily interest ### Example ```java @@ -1215,13 +1215,13 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String asset = "asset_example"; // String | - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10 Max:100 - String archived = "archived_example"; // String | Default: `false`. Set to `true` for archived data from 6 months ago - Long recvWindow = 56L; // Long | + String asset = "USDT"; // String | + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long current = 1L; // Long | Current page number. + Long size = 10L; // Long | Number of results returned. + Archived archived = Archived.fromValue("true"); // Archived | Set to true to query archived data from 6 months ago. + Long recvWindow = 5000L; // Long | The value cannot be greater than `60000` try { GetMarginBorrowLoanInterestHistoryResponse result = apiInstance.getMarginBorrowLoanInterestHistory(asset, startTime, endTime, current, size, archived, recvWindow); System.out.println(result); @@ -1243,10 +1243,10 @@ public class Example { | **asset** | **String**| | [optional] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10 Max:100 | [optional] | -| **archived** | **String**| Default: `false`. Set to `true` for archived data from 6 months ago | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Current page number. | [optional] | +| **size** | **Long**| Number of results returned. | [optional] | +| **archived** | [**Archived**](.md)| Set to true to query archived data from 6 months ago. | [optional] [default to false] [enum: true, false] | +| **recvWindow** | **Long**| The value cannot be greater than `60000` | [optional] | ### Return type @@ -1270,9 +1270,9 @@ No authorization required # **getUmAccountDetail** > GetUmAccountDetailResponse getUmAccountDetail(recvWindow) -Get UM Account Detail(USER_DATA) +Get UM Account Detail (USER_DATA) -Get current UM account asset and position information. Weight: 5 +Get current UM account asset and position information. Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -1289,7 +1289,7 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { GetUmAccountDetailResponse result = apiInstance.getUmAccountDetail(recvWindow); System.out.println(result); @@ -1332,9 +1332,9 @@ No authorization required # **getUmAccountDetailV2** > GetUmAccountDetailV2Response getUmAccountDetailV2(recvWindow) -Get UM Account Detail V2(USER_DATA) +Get UM Account Detail V2 (USER_DATA) -Get current UM account asset and position information. Weight: 5 +Get current UM account asset and position information. Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -1351,7 +1351,7 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { GetUmAccountDetailV2Response result = apiInstance.getUmAccountDetailV2(recvWindow); System.out.println(result); @@ -1394,9 +1394,9 @@ No authorization required # **getUmCurrentPositionMode** > GetUmCurrentPositionModeResponse getUmCurrentPositionMode(recvWindow) -Get UM Current Position Mode(USER_DATA) +Get UM Current Position Mode (USER_DATA) -Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in UM Weight: 30 +Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in UM Weight(IP): 30 Security Type: USER_DATA ### Example ```java @@ -1413,7 +1413,7 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { GetUmCurrentPositionModeResponse result = apiInstance.getUmCurrentPositionMode(recvWindow); System.out.println(result); @@ -1456,9 +1456,9 @@ No authorization required # **getUmFuturesOrderDownloadLinkById** > GetUmFuturesOrderDownloadLinkByIdResponse getUmFuturesOrderDownloadLinkById(downloadId, recvWindow) -Get UM Futures Order Download Link by Id(USER_DATA) +Get UM Futures Order Download Link by Id (USER_DATA) -Get UM futures order download link by Id * Download link expiration: 7 days Weight: 10 +Get UM futures order download link by Id Weight(IP): 10 Security Type: USER_DATA Notes: - Download link expiration: 7 days ### Example ```java @@ -1475,8 +1475,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String downloadId = "downloadId_example"; // String | get by download id api - Long recvWindow = 56L; // Long | + String downloadId = "545923594199212032"; // String | get by download id api + Long recvWindow = 5000L; // Long | try { GetUmFuturesOrderDownloadLinkByIdResponse result = apiInstance.getUmFuturesOrderDownloadLinkById(downloadId, recvWindow); System.out.println(result); @@ -1520,9 +1520,9 @@ No authorization required # **getUmFuturesTradeDownloadLinkById** > GetUmFuturesTradeDownloadLinkByIdResponse getUmFuturesTradeDownloadLinkById(downloadId, recvWindow) -Get UM Futures Trade Download Link by Id(USER_DATA) +Get UM Futures Trade Download Link by Id (USER_DATA) -Get UM futures trade download link by Id * Download link expiration: 7 days Weight: 10 +Get UM futures trade download link by Id Weight(IP): 10 Security Type: USER_DATA Notes: - Download link expiration: 7 days ### Example ```java @@ -1539,8 +1539,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String downloadId = "downloadId_example"; // String | get by download id api - Long recvWindow = 56L; // Long | + String downloadId = "545923594199212032"; // String | get by download id api + Long recvWindow = 5000L; // Long | try { GetUmFuturesTradeDownloadLinkByIdResponse result = apiInstance.getUmFuturesTradeDownloadLinkById(downloadId, recvWindow); System.out.println(result); @@ -1584,9 +1584,9 @@ No authorization required # **getUmFuturesTransactionDownloadLinkById** > GetUmFuturesTransactionDownloadLinkByIdResponse getUmFuturesTransactionDownloadLinkById(downloadId, recvWindow) -Get UM Futures Transaction Download Link by Id(USER_DATA) +Get UM Futures Transaction Download Link by Id (USER_DATA) -Get UM futures Transaction download link by Id * Download link expiration: 7 days Weight: 10 +Get UM futures Transaction download link by Id Weight(IP): 10 Security Type: USER_DATA Notes: - Download link expiration: 7 days ### Example ```java @@ -1603,8 +1603,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String downloadId = "downloadId_example"; // String | get by download id api - Long recvWindow = 56L; // Long | + String downloadId = "1"; // String | get by download id api + Long recvWindow = 5000L; // Long | try { GetUmFuturesTransactionDownloadLinkByIdResponse result = apiInstance.getUmFuturesTransactionDownloadLinkById(downloadId, recvWindow); System.out.println(result); @@ -1648,9 +1648,9 @@ No authorization required # **getUmIncomeHistory** > GetUmIncomeHistoryResponse getUmIncomeHistory(symbol, incomeType, startTime, endTime, page, limit, recvWindow) -Get UM Income History(USER_DATA) +Get UM Income History (USER_DATA) -Get UM Income History * If neither `startTime` nor `endTime` is sent, the recent 7-day data will be returned. * If `incomeType` is not sent, all kinds of flow will be returned * \"trandId\" is unique in the same incomeType for a user * Income history only contains data for the last three months Weight: 30 +Get UM Income History. Weight(IP): 30 Security Type: USER_DATA Notes: - If neither `startTime` nor `endTime` is sent, the recent 7-day data will be returned. - If `incomeType` is not sent, all kinds of flow will be returned - \"trandId\" is unique in the same incomeType for a user - Income history only contains data for the last three months ### Example ```java @@ -1668,12 +1668,12 @@ public class Example { AccountApi apiInstance = new AccountApi(defaultClient); String symbol = "symbol_example"; // String | - String incomeType = "incomeType_example"; // String | TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, POSITION_LIMIT_INCREASE_FEE - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long page = 56L; // Long | - Long limit = 56L; // Long | Default 100; max 1000 - Long recvWindow = 56L; // Long | + IncomeType incomeType = IncomeType.fromValue("TRANSFER"); // IncomeType | Income type. + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long page = 1L; // Long | Page number. + Long limit = 100L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | try { GetUmIncomeHistoryResponse result = apiInstance.getUmIncomeHistory(symbol, incomeType, startTime, endTime, page, limit, recvWindow); System.out.println(result); @@ -1693,11 +1693,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **symbol** | **String**| | [optional] | -| **incomeType** | **String**| TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, POSITION_LIMIT_INCREASE_FEE | [optional] | +| **incomeType** | [**IncomeType**](.md)| Income type. | [optional] [enum: TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, POSITION_LIMIT_INCREASE_FEE] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **page** | **Long**| | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **page** | **Long**| Page number. | [optional] | +| **limit** | **Long**| Number of results returned. | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -1722,9 +1722,9 @@ No authorization required # **getUserCommissionRateForCm** > GetUserCommissionRateForCmResponse getUserCommissionRateForCm(symbol, recvWindow) -Get User Commission Rate for CM(USER_DATA) +Get User Commission Rate for CM (USER_DATA) -Get User Commission Rate for CM Weight: 20 +Get User Commission Rate for CM Weight(IP): 20 Security Type: USER_DATA ### Example ```java @@ -1741,8 +1741,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSD_PERP"; // String | Symbol + Long recvWindow = 5000L; // Long | try { GetUserCommissionRateForCmResponse result = apiInstance.getUserCommissionRateForCm(symbol, recvWindow); System.out.println(result); @@ -1761,7 +1761,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -1786,9 +1786,9 @@ No authorization required # **getUserCommissionRateForUm** > GetUserCommissionRateForUmResponse getUserCommissionRateForUm(symbol, recvWindow) -Get User Commission Rate for UM(USER_DATA) +Get User Commission Rate for UM (USER_DATA) -Get User Commission Rate for UM Weight: 20 +Get User Commission Rate for UM Weight(IP): 20 Security Type: USER_DATA ### Example ```java @@ -1805,8 +1805,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long recvWindow = 5000L; // Long | try { GetUserCommissionRateForUmResponse result = apiInstance.getUserCommissionRateForUm(symbol, recvWindow); System.out.println(result); @@ -1825,7 +1825,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -1850,9 +1850,9 @@ No authorization required # **marginMaxBorrow** > MarginMaxBorrowResponse marginMaxBorrow(asset, recvWindow) -Margin Max Borrow(USER_DATA) +Margin Max Borrow (USER_DATA) -Query margin max borrow Weight: 5 +Query margin max borrow Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -1869,8 +1869,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String asset = "asset_example"; // String | - Long recvWindow = 56L; // Long | + String asset = "USDT"; // String | + Long recvWindow = 5000L; // Long | The value cannot be greater than `60000` try { MarginMaxBorrowResponse result = apiInstance.marginMaxBorrow(asset, recvWindow); System.out.println(result); @@ -1890,7 +1890,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **asset** | **String**| | | -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| The value cannot be greater than `60000` | [optional] | ### Return type @@ -1914,9 +1914,9 @@ No authorization required # **portfolioMarginUmTradingQuantitativeRulesIndicators** > PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse portfolioMarginUmTradingQuantitativeRulesIndicators(symbol, recvWindow) -Portfolio Margin UM Trading Quantitative Rules Indicators(USER_DATA) +Portfolio Margin UM Trading Quantitative Rules Indicators (USER_DATA) -Portfolio Margin UM Trading Quantitative Rules Indicators Weight: 1 for a single symbol 10 when the symbol parameter is omitted +Portfolio Margin UM Trading Quantitative Rules Indicators Weight: - 1 for a single `symbol` - 10 when `symbol` is omitted Security Type: USER_DATA ### Example ```java @@ -1933,8 +1933,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | + Long recvWindow = 5000L; // Long | try { PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse result = apiInstance.portfolioMarginUmTradingQuantitativeRulesIndicators(symbol, recvWindow); System.out.println(result); @@ -1978,9 +1978,9 @@ No authorization required # **queryCmPositionInformation** > QueryCmPositionInformationResponse queryCmPositionInformation(marginAsset, pair, recvWindow) -Query CM Position Information(USER_DATA) +Query CM Position Information (USER_DATA) -Get current CM position information. * If neither `marginAsset` nor `pair` is sent, positions of all symbols with `TRADING` status will be returned. * for One-way Mode user, the response will only show the \"BOTH\" positions * for Hedge Mode user, the response will show \"LONG\", and \"SHORT\" positions. * Please use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 1 +Get current CM position information. Weight(IP): 1 Security Type: USER_DATA Notes: - If neither `marginAsset` nor `pair` is sent, positions of all symbols with `TRADING` status will be returned. - for One-way Mode user, the response will only show the \"BOTH\" positions - for Hedge Mode user, the response will show \"LONG\", and \"SHORT\" positions. **Note** - Please use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. ### Example ```java @@ -1997,9 +1997,9 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String marginAsset = "marginAsset_example"; // String | - String pair = "pair_example"; // String | - Long recvWindow = 56L; // Long | + String marginAsset = "USDT"; // String | + String pair = "BTCUSD_201225"; // String | + Long recvWindow = 5000L; // Long | try { QueryCmPositionInformationResponse result = apiInstance.queryCmPositionInformation(marginAsset, pair, recvWindow); System.out.println(result); @@ -2044,9 +2044,9 @@ No authorization required # **queryMarginLoanRecord** > QueryMarginLoanRecordResponse queryMarginLoanRecord(asset, txId, startTime, endTime, current, size, archived, recvWindow) -Query Margin Loan Record(USER_DATA) +Query Margin Loan Record (USER_DATA) -Query margin loan record * txId or startTime must be sent. txId takes precedence. * Response in descending order * The max interval between `startTime` and `endTime` is 30 days. * If `startTime` and `endTime` not sent, return records of the last 7 days by default * Set `archived` to `true` to query data from 6 months ago Weight: 10 +Query margin loan record Weight(IP): 10 Security Type: USER_DATA Notes: - txId or startTime must be sent. txId takes precedence. - Response in descending order - The max interval between `startTime` and `endTime` is 30 days. - If `startTime` and `endTime` not sent, return records of the last 7 days by default - Set `archived` to `true` to query data from 6 months ago ### Example ```java @@ -2063,14 +2063,14 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String asset = "asset_example"; // String | - Long txId = 56L; // Long | the `tranId` in `POST/papi/v1/marginLoan` - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10 Max:100 - String archived = "archived_example"; // String | Default: `false`. Set to `true` for archived data from 6 months ago - Long recvWindow = 56L; // Long | + String asset = "USDT"; // String | + Long txId = 1L; // Long | the `tranId` in `POST/papi/v1/marginLoan` + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long current = 1L; // Long | Current page number. + Long size = 10L; // Long | Number of results returned. + Archived archived = Archived.fromValue("true"); // Archived | Set to true to query archived data from 6 months ago. + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 try { QueryMarginLoanRecordResponse result = apiInstance.queryMarginLoanRecord(asset, txId, startTime, endTime, current, size, archived, recvWindow); System.out.println(result); @@ -2093,10 +2093,10 @@ public class Example { | **txId** | **Long**| the `tranId` in `POST/papi/v1/marginLoan` | [optional] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10 Max:100 | [optional] | -| **archived** | **String**| Default: `false`. Set to `true` for archived data from 6 months ago | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Current page number. | [optional] | +| **size** | **Long**| Number of results returned. | [optional] | +| **archived** | [**Archived**](.md)| Set to true to query archived data from 6 months ago. | [optional] [default to false] [enum: true, false] | +| **recvWindow** | **Long**| The value cannot be greater than 60000 | [optional] | ### Return type @@ -2120,9 +2120,9 @@ No authorization required # **queryMarginMaxWithdraw** > QueryMarginMaxWithdrawResponse queryMarginMaxWithdraw(asset, recvWindow) -Query Margin Max Withdraw(USER_DATA) +Query Margin Max Withdraw (USER_DATA) -Query Margin Max Withdraw Weight: 5 +Query Margin Max Withdraw Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -2139,8 +2139,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String asset = "asset_example"; // String | - Long recvWindow = 56L; // Long | + String asset = "USDT"; // String | + Long recvWindow = 5000L; // Long | try { QueryMarginMaxWithdrawResponse result = apiInstance.queryMarginMaxWithdraw(asset, recvWindow); System.out.println(result); @@ -2184,9 +2184,9 @@ No authorization required # **queryMarginRepayRecord** > QueryMarginRepayRecordResponse queryMarginRepayRecord(asset, txId, startTime, endTime, current, size, archived, recvWindow) -Query Margin repay Record(USER_DATA) +Query Margin repay Record (USER_DATA) -Query margin repay record. * txId or startTime must be sent. txId takes precedence. * Response in descending order * The max interval between `startTime` and `endTime` is 30 days. * If `startTime` and `endTime` not sent, return records of the last 7 days by default * Set `archived` to `true` to query data from 6 months ago Weight: 10 +Query margin repay record. Weight(IP): 10 Security Type: USER_DATA Notes: - txId or startTime must be sent. txId takes precedence. - Response in descending order - The max interval between `startTime` and `endTime` is 30 days. - If `startTime` and `endTime` not sent, return records of the last 7 days by default - Set `archived` to `true` to query data from 6 months ago ### Example ```java @@ -2203,14 +2203,14 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String asset = "asset_example"; // String | - Long txId = 56L; // Long | the `tranId` in `POST/papi/v1/marginLoan` - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10 Max:100 - String archived = "archived_example"; // String | Default: `false`. Set to `true` for archived data from 6 months ago - Long recvWindow = 56L; // Long | + String asset = "USDT"; // String | + Long txId = 1L; // Long | the `tranId` in `POST /papi/v1/repayLoan` + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long current = 1L; // Long | Current page number. + Long size = 10L; // Long | Number of results returned. + Archived archived = Archived.fromValue("true"); // Archived | Set to true to query archived data from 6 months ago. + Long recvWindow = 5000L; // Long | try { QueryMarginRepayRecordResponse result = apiInstance.queryMarginRepayRecord(asset, txId, startTime, endTime, current, size, archived, recvWindow); System.out.println(result); @@ -2230,12 +2230,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **asset** | **String**| | | -| **txId** | **Long**| the `tranId` in `POST/papi/v1/marginLoan` | [optional] | +| **txId** | **Long**| the `tranId` in `POST /papi/v1/repayLoan` | [optional] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10 Max:100 | [optional] | -| **archived** | **String**| Default: `false`. Set to `true` for archived data from 6 months ago | [optional] | +| **current** | **Long**| Current page number. | [optional] | +| **size** | **Long**| Number of results returned. | [optional] | +| **archived** | [**Archived**](.md)| Set to true to query archived data from 6 months ago. | [optional] [default to false] [enum: true, false] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -2260,9 +2260,9 @@ No authorization required # **queryPortfolioMarginNegativeBalanceInterestHistory** > QueryPortfolioMarginNegativeBalanceInterestHistoryResponse queryPortfolioMarginNegativeBalanceInterestHistory(asset, startTime, endTime, size, recvWindow) -Query Portfolio Margin Negative Balance Interest History(USER_DATA) +Query Portfolio Margin Negative Balance Interest History (USER_DATA) -Query interest history of negative balance for portfolio margin. * Response in descending order * The max interval between startTime and endTime is 30 days. It is a MUST to ensure data correctness. * If `startTime` and `endTime` not sent, return records of the last 7 days by default * If `startTime` is sent and `endTime` is not sent, the records from `startTime` to the present will be returned; if `startTime` is more than 30 days ago, the records of the past 30 days will be returned. * If `startTime` is not sent and `endTime` is sent, the records of the 7 days before `endTime` is returned. Weight: 50 +Query interest history of negative balance for portfolio margin. Weight(IP): 50 Security Type: USER_DATA Notes: - Results are returned in descending order. - The query range cannot exceed 30 days to ensure data correctness. - If both `startTime` and `endTime` are omitted, the most recent 7 days are returned by default. - If `startTime` is provided but `endTime` is omitted, records from `startTime` to now are returned; if that exceeds 30 days, only the most recent 30 days are returned. - If `endTime` is provided but `startTime` is omitted, records from the 7 days before `endTime` are returned. ### Example ```java @@ -2279,11 +2279,11 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String asset = "asset_example"; // String | - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long size = 56L; // Long | Default:10 Max:100 - Long recvWindow = 56L; // Long | + String asset = "USDT"; // String | + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long size = 10L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | try { QueryPortfolioMarginNegativeBalanceInterestHistoryResponse result = apiInstance.queryPortfolioMarginNegativeBalanceInterestHistory(asset, startTime, endTime, size, recvWindow); System.out.println(result); @@ -2305,7 +2305,7 @@ public class Example { | **asset** | **String**| | [optional] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **size** | **Long**| Default:10 Max:100 | [optional] | +| **size** | **Long**| Number of results returned. | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -2330,9 +2330,9 @@ No authorization required # **queryUmPositionInformation** > QueryUmPositionInformationResponse queryUmPositionInformation(symbol, recvWindow) -Query UM Position Information(USER_DATA) +Query UM Position Information (USER_DATA) -Get current UM position information. * Please use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. * for One-way Mode user, the response will only show the \"BOTH\" positions * for Hedge Mode user, the response will show \"LONG\", and \"SHORT\" positions. Weight: 5 +Get current UM position information. Weight(IP): 5 Security Type: USER_DATA Notes: - Please use with account push event `ACCOUNT_UPDATE` for timeliness and accuracy. - In One-way Mode, only positions with side `BOTH` are shown. - In Hedge Mode, positions with sides `BOTH`, `LONG`, and `SHORT` are shown. ### Example ```java @@ -2349,8 +2349,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | + Long recvWindow = 5000L; // Long | try { QueryUmPositionInformationResponse result = apiInstance.queryUmPositionInformation(symbol, recvWindow); System.out.println(result); @@ -2396,7 +2396,7 @@ No authorization required Query User Negative Balance Auto Exchange Record (USER_DATA) -Query user negative balance auto exchange record * Response in descending order * The max interval between `startTime` and `endTime` is 3 months. Weight: 100 +Query user negative balance auto exchange record Weight(IP): 100 Security Type: USER_DATA Notes: - Response in descending order - The max interval between `startTime` and `endTime` is 3 months. ### Example ```java @@ -2413,9 +2413,9 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long recvWindow = 56L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long recvWindow = 5000L; // Long | try { QueryUserNegativeBalanceAutoExchangeRecordResponse result = apiInstance.queryUserNegativeBalanceAutoExchangeRecord(startTime, endTime, recvWindow); System.out.println(result); @@ -2462,7 +2462,7 @@ No authorization required Query User Rate Limit (USER_DATA) -Query User Rate Limit Weight: 1 +Query User Rate Limit Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -2479,7 +2479,7 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { QueryUserRateLimitResponse result = apiInstance.queryUserRateLimit(recvWindow); System.out.println(result); @@ -2522,9 +2522,9 @@ No authorization required # **repayFuturesNegativeBalance** > RepayFuturesNegativeBalanceResponse repayFuturesNegativeBalance(repayFuturesNegativeBalanceRequest) -Repay futures Negative Balance(USER_DATA) +Repay futures Negative Balance (USER_DATA) -Repay futures Negative Balance Weight: 750 +Repay futures Negative Balance Weight(IP): 750 Security Type: USER_DATA ### Example ```java @@ -2560,7 +2560,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **repayFuturesNegativeBalanceRequest** | [**RepayFuturesNegativeBalanceRequest**](RepayFuturesNegativeBalanceRequest.md)| | | +| **repayFuturesNegativeBalanceRequest** | [**RepayFuturesNegativeBalanceRequest**](RepayFuturesNegativeBalanceRequest.md)| | [optional] | ### Return type @@ -2584,9 +2584,9 @@ No authorization required # **umFuturesAccountConfiguration** > UmFuturesAccountConfigurationResponse umFuturesAccountConfiguration(recvWindow) -UM Futures Account Configuration(USER_DATA) +UM Futures Account Configuration (USER_DATA) -Query UM Futures account configuration Weight: 5 +Query UM Futures account configuration Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -2603,7 +2603,7 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { UmFuturesAccountConfigurationResponse result = apiInstance.umFuturesAccountConfiguration(recvWindow); System.out.println(result); @@ -2646,9 +2646,9 @@ No authorization required # **umFuturesSymbolConfiguration** > UmFuturesSymbolConfigurationResponse umFuturesSymbolConfiguration(symbol, recvWindow) -UM Futures Symbol Configuration(USER_DATA) +UM Futures Symbol Configuration (USER_DATA) -Get current UM account symbol configuration. Weight: 5 +Get current UM account symbol configuration. Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -2665,8 +2665,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long recvWindow = 5000L; // Long | try { UmFuturesSymbolConfigurationResponse result = apiInstance.umFuturesSymbolConfiguration(symbol, recvWindow); System.out.println(result); @@ -2685,7 +2685,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | [optional] | +| **symbol** | **String**| Symbol | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -2712,7 +2712,7 @@ No authorization required UM Notional and Leverage Brackets (USER_DATA) -Query UM notional and leverage brackets Weight: 1 +Query UM notional and leverage brackets Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -2729,8 +2729,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "ETHUSDT"; // String | + Long recvWindow = 5000L; // Long | try { UmNotionalAndLeverageBracketsResponse result = apiInstance.umNotionalAndLeverageBrackets(symbol, recvWindow); System.out.println(result); diff --git a/clients/derivatives-trading-portfolio-margin/docs/AccountBalanceResponse.md b/clients/derivatives-trading-portfolio-margin/docs/AccountBalanceResponse.md index 65bb06eda..a35b79cb8 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/AccountBalanceResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/AccountBalanceResponse.md @@ -7,18 +7,18 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**totalWalletBalance** | **String** | | [optional] | -|**crossMarginBorrowed** | **String** | | [optional] | -|**crossMarginFree** | **String** | | [optional] | -|**crossMarginInterest** | **String** | | [optional] | -|**crossMarginLocked** | **String** | | [optional] | -|**umWalletBalance** | **String** | | [optional] | -|**umUnrealizedPNL** | **String** | | [optional] | -|**cmWalletBalance** | **String** | | [optional] | -|**cmUnrealizedPNL** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**negativeBalance** | **String** | | [optional] | +|**asset** | **String** | asset name | [optional] | +|**totalWalletBalance** | **String** | Total Wallet Balance. | [optional] | +|**crossMarginBorrowed** | **String** | Cross Margin Borrowed. | [optional] | +|**crossMarginFree** | **String** | Cross Margin Free. | [optional] | +|**crossMarginInterest** | **String** | Cross Margin Interest. | [optional] | +|**crossMarginLocked** | **String** | Cross Margin Locked. | [optional] | +|**umWalletBalance** | **String** | Um Wallet Balance. | [optional] | +|**umUnrealizedPNL** | **String** | Um Unrealized PNL. | [optional] | +|**cmWalletBalance** | **String** | Cm Wallet Balance. | [optional] | +|**cmUnrealizedPNL** | **String** | Cm Unrealized PNL. | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**negativeBalance** | **String** | negative balance amount | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/AccountBalanceResponse1Inner.md b/clients/derivatives-trading-portfolio-margin/docs/AccountBalanceResponse1Inner.md index 058a0371c..1a3c9f671 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/AccountBalanceResponse1Inner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/AccountBalanceResponse1Inner.md @@ -7,19 +7,19 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**totalWalletBalance** | **String** | | [optional] | -|**crossMarginAsset** | **String** | | [optional] | -|**crossMarginBorrowed** | **String** | | [optional] | -|**crossMarginFree** | **String** | | [optional] | -|**crossMarginInterest** | **String** | | [optional] | -|**crossMarginLocked** | **String** | | [optional] | -|**umWalletBalance** | **String** | | [optional] | -|**umUnrealizedPNL** | **String** | | [optional] | -|**cmWalletBalance** | **String** | | [optional] | -|**cmUnrealizedPNL** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**negativeBalance** | **String** | | [optional] | +|**asset** | **String** | asset name | [optional] | +|**totalWalletBalance** | **String** | Total Wallet Balance. | [optional] | +|**crossMarginAsset** | **String** | Cross Margin Asset. | [optional] | +|**crossMarginBorrowed** | **String** | Cross Margin Borrowed. | [optional] | +|**crossMarginFree** | **String** | Cross Margin Free. | [optional] | +|**crossMarginInterest** | **String** | Cross Margin Interest. | [optional] | +|**crossMarginLocked** | **String** | Cross Margin Locked. | [optional] | +|**umWalletBalance** | **String** | Um Wallet Balance. | [optional] | +|**umUnrealizedPNL** | **String** | Um Unrealized PNL. | [optional] | +|**cmWalletBalance** | **String** | Cm Wallet Balance. | [optional] | +|**cmUnrealizedPNL** | **String** | Cm Unrealized PNL. | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**negativeBalance** | **String** | negative balance amount | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/AccountBalanceResponse2.md b/clients/derivatives-trading-portfolio-margin/docs/AccountBalanceResponse2.md index 92b640738..7b7e23300 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/AccountBalanceResponse2.md +++ b/clients/derivatives-trading-portfolio-margin/docs/AccountBalanceResponse2.md @@ -7,18 +7,18 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**totalWalletBalance** | **String** | | [optional] | -|**crossMarginBorrowed** | **String** | | [optional] | -|**crossMarginFree** | **String** | | [optional] | -|**crossMarginInterest** | **String** | | [optional] | -|**crossMarginLocked** | **String** | | [optional] | -|**umWalletBalance** | **String** | | [optional] | -|**umUnrealizedPNL** | **String** | | [optional] | -|**cmWalletBalance** | **String** | | [optional] | -|**cmUnrealizedPNL** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**negativeBalance** | **String** | | [optional] | +|**asset** | **String** | asset name | [optional] | +|**totalWalletBalance** | **String** | Total Wallet Balance. | [optional] | +|**crossMarginBorrowed** | **String** | Cross Margin Borrowed. | [optional] | +|**crossMarginFree** | **String** | Cross Margin Free. | [optional] | +|**crossMarginInterest** | **String** | Cross Margin Interest. | [optional] | +|**crossMarginLocked** | **String** | Cross Margin Locked. | [optional] | +|**umWalletBalance** | **String** | Um Wallet Balance. | [optional] | +|**umUnrealizedPNL** | **String** | Um Unrealized PNL. | [optional] | +|**cmWalletBalance** | **String** | Cm Wallet Balance. | [optional] | +|**cmUnrealizedPNL** | **String** | Cm Unrealized PNL. | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**negativeBalance** | **String** | negative balance amount | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/AccountConfigUpdate.md b/clients/derivatives-trading-portfolio-margin/docs/AccountConfigUpdate.md index a5d4fcbf6..9285c0bf5 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/AccountConfigUpdate.md +++ b/clients/derivatives-trading-portfolio-margin/docs/AccountConfigUpdate.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**fs** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | +|**fs** | **String** | Event business unit | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction Time | [optional] | |**ac** | [**AccountConfigUpdateAc**](AccountConfigUpdateAc.md) | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/AccountConfigUpdateAc.md b/clients/derivatives-trading-portfolio-margin/docs/AccountConfigUpdateAc.md index c1ad4a50d..60ff5d13c 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/AccountConfigUpdateAc.md +++ b/clients/derivatives-trading-portfolio-margin/docs/AccountConfigUpdateAc.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**lLowerCase** | **Long** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**lLowerCase** | **Long** | Leverage | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/AccountInformationResponse.md b/clients/derivatives-trading-portfolio-margin/docs/AccountInformationResponse.md index 409bf089f..abd21c3e0 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/AccountInformationResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/AccountInformationResponse.md @@ -7,16 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**uniMMR** | **String** | | [optional] | -|**accountEquity** | **String** | | [optional] | -|**actualEquity** | **String** | | [optional] | -|**accountInitialMargin** | **String** | | [optional] | -|**accountMaintMargin** | **String** | | [optional] | -|**accountStatus** | **String** | | [optional] | -|**virtualMaxWithdrawAmount** | **String** | | [optional] | -|**totalAvailableBalance** | **String** | | [optional] | -|**totalMarginOpenLoss** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**uniMMR** | **String** | Portfolio margin account maintenance margin rate | [optional] | +|**accountEquity** | **String** | Account equity, in USD value | [optional] | +|**actualEquity** | **String** | Account equity without collateral rate, in USD value | [optional] | +|**accountInitialMargin** | **String** | Account Initial Margin. | [optional] | +|**accountMaintMargin** | **String** | Portfolio margin account maintenance margin, unit:USD | [optional] | +|**accountStatus** | **String** | Portfolio margin account status:\"NORMAL\", \"MARGIN_CALL\", \"SUPPLY_MARGIN\", \"REDUCE_ONLY\", \"ACTIVE_LIQUIDATION\", \"FORCE_LIQUIDATION\", \"BANKRUPTED\" | [optional] | +|**virtualMaxWithdrawAmount** | **String** | Portfolio margin maximum amount for transfer out in USD | [optional] | +|**totalAvailableBalance** | **String** | Total Available Balance. | [optional] | +|**totalMarginOpenLoss** | **String** | in USD margin open order | [optional] | +|**updateTime** | **Long** | last update time | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/AccountUpdate.md b/clients/derivatives-trading-portfolio-margin/docs/AccountUpdate.md index a45e10f16..2716d2a37 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/AccountUpdate.md +++ b/clients/derivatives-trading-portfolio-margin/docs/AccountUpdate.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**fs** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**iLowerCase** | **String** | | [optional] | +|**fs** | **String** | Event business unit. 'UM' for USDS-M futures and 'CM' for COIN-M futures | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction | [optional] | +|**iLowerCase** | **String** | Account Alias, ignore for UM | [optional] | |**aLowerCase** | [**AccountUpdateA**](AccountUpdateA.md) | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/AccountUpdateA.md b/clients/derivatives-trading-portfolio-margin/docs/AccountUpdateA.md index b3859d2e6..4c6d870cf 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/AccountUpdateA.md +++ b/clients/derivatives-trading-portfolio-margin/docs/AccountUpdateA.md @@ -2,13 +2,14 @@ # AccountUpdateA +Update Data ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**mLowerCase** | **String** | | [optional] | -|**B** | [**List<AccountUpdateABInner>**](AccountUpdateABInner.md) | | [optional] | +|**mLowerCase** | **String** | Event reason type | [optional] | +|**B** | [**List<AccountUpdateABInner>**](AccountUpdateABInner.md) | Balances | [optional] | |**P** | [**List<AccountUpdateAPInner>**](AccountUpdateAPInner.md) | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/AccountUpdateABInner.md b/clients/derivatives-trading-portfolio-margin/docs/AccountUpdateABInner.md index 3380c37bb..1fc7fee81 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/AccountUpdateABInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/AccountUpdateABInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**aLowerCase** | **String** | | [optional] | -|**wb** | **String** | | [optional] | -|**cw** | **String** | | [optional] | -|**bc** | **String** | | [optional] | +|**aLowerCase** | **String** | Asset | [optional] | +|**wb** | **String** | Wallet Balance | [optional] | +|**cw** | **String** | Cross Wallet Balance | [optional] | +|**bc** | **String** | Balance Change except PnL and Commission | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/AccountUpdateAPInner.md b/clients/derivatives-trading-portfolio-margin/docs/AccountUpdateAPInner.md index 1d935553d..942489195 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/AccountUpdateAPInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/AccountUpdateAPInner.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**pa** | **String** | | [optional] | -|**ep** | **String** | | [optional] | -|**cr** | **String** | | [optional] | -|**up** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**bep** | **String** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**pa** | **String** | Position Amount | [optional] | +|**ep** | **String** | Entry Price | [optional] | +|**cr** | **String** | (Pre-fee) Accumulated Realized | [optional] | +|**up** | **String** | Unrealized PnL | [optional] | +|**ps** | **String** | Position Side | [optional] | +|**bep** | **String** | Breakeven Price | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/AlgoOrderUpdate.md b/clients/derivatives-trading-portfolio-margin/docs/AlgoOrderUpdate.md new file mode 100644 index 000000000..af0c26d73 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/docs/AlgoOrderUpdate.md @@ -0,0 +1,16 @@ + + +# AlgoOrderUpdate + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**T** | **Long** | Transaction Time | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**fs** | **String** | Futures segment, `UM` for USDS-M Futures, `CM` for Coin-M Futures | [optional] | +|**ao** | [**AlgoOrderUpdateAo**](AlgoOrderUpdateAo.md) | | [optional] | + + + diff --git a/clients/derivatives-trading-portfolio-margin/docs/AlgoOrderUpdateAo.md b/clients/derivatives-trading-portfolio-margin/docs/AlgoOrderUpdateAo.md new file mode 100644 index 000000000..5896dd901 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/docs/AlgoOrderUpdateAo.md @@ -0,0 +1,38 @@ + + +# AlgoOrderUpdateAo + +Algo order info + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**caid** | **String** | Client Algo Id | [optional] | +|**aid** | **Long** | Algo Id | [optional] | +|**at** | **String** | Algo Type | [optional] | +|**oLowerCase** | **String** | Order Type | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**S** | **String** | Side | [optional] | +|**ps** | **String** | Position Side | [optional] | +|**fLowerCase** | **String** | Time in Force | [optional] | +|**qLowerCase** | **String** | Quantity | [optional] | +|**X** | **String** | Algo Status: NEW, CANCELED, TRIGGERING, TRIGGERED, FINISHED, REJECTED, EXPIRED | [optional] | +|**ai** | **String** | Actual order ID in matching engine | [optional] | +|**ap** | **String** | Avg fill price in matching engine | [optional] | +|**aq** | **String** | Executed quantity in matching engine | [optional] | +|**act** | **String** | Actual order type in matching engine | [optional] | +|**tp** | **String** | Trigger Price | [optional] | +|**pLowerCase** | **String** | Order Price | [optional] | +|**V** | **String** | Self Trade Prevention Mode | [optional] | +|**wt** | **String** | Working Type | [optional] | +|**pm** | **String** | Price Match | [optional] | +|**cp** | **Boolean** | If Close-All | [optional] | +|**pP** | **Boolean** | If price protection is on | [optional] | +|**R** | **Boolean** | Is reduce only | [optional] | +|**tt** | **Long** | Trigger Time | [optional] | +|**gtd** | **Long** | Good Till Date | [optional] | +|**rm** | **String** | Algo order failed reason | [optional] | + + + diff --git a/clients/derivatives-trading-portfolio-margin/docs/AlgoType.md b/clients/derivatives-trading-portfolio-margin/docs/AlgoType.md new file mode 100644 index 000000000..3652b524b --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/docs/AlgoType.md @@ -0,0 +1,11 @@ + + +# AlgoType + +## Enum + + +* `CONDITIONAL` (value: `"CONDITIONAL"`) + + + diff --git a/clients/derivatives-trading-portfolio-margin/docs/AlgoUpdate.md b/clients/derivatives-trading-portfolio-margin/docs/AlgoUpdate.md deleted file mode 100644 index 13642fb2a..000000000 --- a/clients/derivatives-trading-portfolio-margin/docs/AlgoUpdate.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# AlgoUpdate - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**T** | **Long** | | [optional] | -|**E** | **Long** | | [optional] | -|**fs** | **String** | | [optional] | -|**ao** | [**AlgoUpdateAo**](AlgoUpdateAo.md) | | [optional] | - - - diff --git a/clients/derivatives-trading-portfolio-margin/docs/AlgoUpdateAo.md b/clients/derivatives-trading-portfolio-margin/docs/AlgoUpdateAo.md deleted file mode 100644 index 96b4f98e6..000000000 --- a/clients/derivatives-trading-portfolio-margin/docs/AlgoUpdateAo.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# AlgoUpdateAo - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**caid** | **String** | | [optional] | -|**aid** | **Long** | | [optional] | -|**at** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**S** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**X** | **String** | | [optional] | -|**ai** | **String** | | [optional] | -|**ap** | **String** | | [optional] | -|**aq** | **String** | | [optional] | -|**act** | **String** | | [optional] | -|**tp** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**V** | **String** | | [optional] | -|**wt** | **String** | | [optional] | -|**pm** | **String** | | [optional] | -|**cp** | **Boolean** | | [optional] | -|**pP** | **Boolean** | | [optional] | -|**R** | **Boolean** | | [optional] | -|**tt** | **Long** | | [optional] | -|**gtd** | **Long** | | [optional] | -|**rm** | **String** | | [optional] | - - - diff --git a/clients/derivatives-trading-portfolio-margin/docs/Archived.md b/clients/derivatives-trading-portfolio-margin/docs/Archived.md new file mode 100644 index 000000000..04785a2f2 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/docs/Archived.md @@ -0,0 +1,13 @@ + + +# Archived + +## Enum + + +* `TRUE` (value: `"true"`) + +* `FALSE` (value: `"false"`) + + + diff --git a/clients/derivatives-trading-portfolio-margin/docs/AutoRepay.md b/clients/derivatives-trading-portfolio-margin/docs/AutoRepay.md new file mode 100644 index 000000000..45dbc5f5b --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/docs/AutoRepay.md @@ -0,0 +1,13 @@ + + +# AutoRepay + +## Enum + + +* `TRUE` (value: `"true"`) + +* `FALSE` (value: `"false"`) + + + diff --git a/clients/derivatives-trading-portfolio-margin/docs/Balanceupdate.md b/clients/derivatives-trading-portfolio-margin/docs/Balanceupdate.md index f289de4a5..6d7e94284 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/Balanceupdate.md +++ b/clients/derivatives-trading-portfolio-margin/docs/Balanceupdate.md @@ -1,17 +1,17 @@ -# Balanceupdate +# BalanceUpdate ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**dLowerCase** | **String** | | [optional] | -|**U** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**aLowerCase** | **String** | Asset | [optional] | +|**dLowerCase** | **String** | Balance Delta | [optional] | +|**U** | **Long** | Event updateId | [optional] | +|**T** | **Long** | Clear Time | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/BnbTransferRequest.md b/clients/derivatives-trading-portfolio-margin/docs/BnbTransferRequest.md index deb42b752..477dbe19b 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/BnbTransferRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/BnbTransferRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**amount** | **Double** | | | -|**transferSide** | **String** | | | +|**transferSide** | **TransferSide** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/BnbTransferResponse.md b/clients/derivatives-trading-portfolio-margin/docs/BnbTransferResponse.md index 7f711911b..1a761eebf 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/BnbTransferResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/BnbTransferResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tranId** | **Long** | | [optional] | +|**tranId** | **Long** | Transaction ID. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CancelAllCmOpenConditionalOrdersResponse.md b/clients/derivatives-trading-portfolio-margin/docs/CancelAllCmOpenConditionalOrdersResponse.md index daadfa2ce..125449f0f 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CancelAllCmOpenConditionalOrdersResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CancelAllCmOpenConditionalOrdersResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **String** | | [optional] | -|**msg** | **String** | | [optional] | +|**code** | **String** | Code. | [optional] | +|**msg** | **String** | Msg. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CancelAllCmOpenOrdersResponse.md b/clients/derivatives-trading-portfolio-margin/docs/CancelAllCmOpenOrdersResponse.md index a767f4c69..07ba8cf9f 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CancelAllCmOpenOrdersResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CancelAllCmOpenOrdersResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **Long** | | [optional] | -|**msg** | **String** | | [optional] | +|**code** | **Long** | Code. | [optional] | +|**msg** | **String** | Msg. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CancelAllUmAlgoOpenOrdersResponse.md b/clients/derivatives-trading-portfolio-margin/docs/CancelAllUmAlgoOpenOrdersResponse.md index a8fa790e1..188f76493 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CancelAllUmAlgoOpenOrdersResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CancelAllUmAlgoOpenOrdersResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **Long** | | [optional] | +|**code** | **Integer** | | [optional] | |**msg** | **String** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CancelAllUmOpenConditionalOrdersResponse.md b/clients/derivatives-trading-portfolio-margin/docs/CancelAllUmOpenConditionalOrdersResponse.md index 119226a52..d9ebb0133 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CancelAllUmOpenConditionalOrdersResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CancelAllUmOpenConditionalOrdersResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **String** | | [optional] | -|**msg** | **String** | | [optional] | +|**code** | **String** | Code. | [optional] | +|**msg** | **String** | Msg. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CancelAllUmOpenOrdersResponse.md b/clients/derivatives-trading-portfolio-margin/docs/CancelAllUmOpenOrdersResponse.md index ab77be2fb..c39eac1be 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CancelAllUmOpenOrdersResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CancelAllUmOpenOrdersResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **Long** | | [optional] | -|**msg** | **String** | | [optional] | +|**code** | **Long** | Code. | [optional] | +|**msg** | **String** | Msg. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CancelCmConditionalOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/CancelCmConditionalOrderResponse.md index 2fba53e2e..54f0592c8 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CancelCmConditionalOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CancelCmConditionalOrderResponse.md @@ -7,24 +7,24 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**newClientStrategyId** | **String** | | [optional] | -|**strategyId** | **Long** | | [optional] | -|**strategyStatus** | **String** | | [optional] | -|**strategyType** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**bookTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | +|**newClientStrategyId** | **String** | New Client Strategy ID. | [optional] | +|**strategyId** | **Long** | Strategy ID. | [optional] | +|**strategyStatus** | **String** | Strategy Status. | [optional] | +|**strategyType** | **String** | Strategy Type. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**bookTime** | **Long** | order place time | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**workingType** | **String** | Working Type. | [optional] | +|**priceProtect** | **Boolean** | Price Protect. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CancelCmOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/CancelCmOrderResponse.md index 03f32bef4..9b992e5ef 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CancelCmOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CancelCmOrderResponse.md @@ -7,23 +7,21 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgPrice** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**cumQty** | **String** | | [optional] | -|**cumBase** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**cumQty** | **String** | Cum Qty. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**pair** | **String** | Pair. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**updateTime** | **Long** | last update time | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountAllOpenOrdersOnASymbolResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountAllOpenOrdersOnASymbolResponseInner.md index 016014645..3541e3229 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountAllOpenOrdersOnASymbolResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountAllOpenOrdersOnASymbolResponseInner.md @@ -7,26 +7,26 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**contingencyType** | **String** | | [optional] | -|**listStatusType** | **String** | | [optional] | -|**listOrderStatus** | **String** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | -|**transactionTime** | **Long** | | [optional] | -|**orders** | [**List<CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner>**](CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner.md) | | [optional] | -|**orderReports** | [**List<CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner>**](CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.md) | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**origClientOrderId** | **String** | Orig Client Order ID. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**orderListId** | **Long** | Order List ID. | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**price** | **String** | Price. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**cummulativeQuoteQty** | **String** | Cummulative Quote Qty. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**side** | **String** | Side. | [optional] | +|**contingencyType** | **String** | Contingency Type. | [optional] | +|**listStatusType** | **String** | List Status Type. | [optional] | +|**listOrderStatus** | **String** | List Order Status. | [optional] | +|**listClientOrderId** | **String** | List Client Order ID. | [optional] | +|**transactionTime** | **Long** | Transaction Time. | [optional] | +|**orders** | [**List<CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner>**](CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner.md) | Orders. | [optional] | +|**orderReports** | [**List<CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner>**](CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.md) | Order Reports. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.md b/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.md index f78ab8ee6..47cae18cb 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.md @@ -7,21 +7,21 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**icebergQty** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**origClientOrderId** | **String** | Orig Client Order ID. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**orderListId** | **Long** | Order List ID. | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**price** | **String** | Price. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**cummulativeQuoteQty** | **String** | Cummulative Quote Qty. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**side** | **String** | Side. | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**icebergQty** | **String** | Iceberg Qty. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner.md b/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner.md index b28f050a1..a57e6cec1 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountOcoOrdersResponse.md b/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountOcoOrdersResponse.md index 026d08990..36b6734d2 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountOcoOrdersResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountOcoOrdersResponse.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderListId** | **Long** | | [optional] | -|**contingencyType** | **String** | | [optional] | -|**listStatusType** | **String** | | [optional] | -|**listOrderStatus** | **String** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | -|**transactionTime** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**orders** | [**List<CancelMarginAccountOcoOrdersResponseOrdersInner>**](CancelMarginAccountOcoOrdersResponseOrdersInner.md) | | [optional] | -|**orderReports** | [**List<CancelMarginAccountOcoOrdersResponseOrderReportsInner>**](CancelMarginAccountOcoOrdersResponseOrderReportsInner.md) | | [optional] | +|**orderListId** | **Long** | Order List ID. | [optional] | +|**contingencyType** | **String** | Contingency Type. | [optional] | +|**listStatusType** | **String** | List Status Type. | [optional] | +|**listOrderStatus** | **String** | List Order Status. | [optional] | +|**listClientOrderId** | **String** | List Client Order ID. | [optional] | +|**transactionTime** | **Long** | Transaction Time. | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**orders** | [**List<CancelMarginAccountOcoOrdersResponseOrdersInner>**](CancelMarginAccountOcoOrdersResponseOrdersInner.md) | Orders. | [optional] | +|**orderReports** | [**List<CancelMarginAccountOcoOrdersResponseOrderReportsInner>**](CancelMarginAccountOcoOrdersResponseOrderReportsInner.md) | Order Reports. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountOcoOrdersResponseOrderReportsInner.md b/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountOcoOrdersResponseOrderReportsInner.md index 158cf76fe..985fed2b1 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountOcoOrdersResponseOrderReportsInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountOcoOrdersResponseOrderReportsInner.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**origClientOrderId** | **String** | Orig Client Order ID. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**orderListId** | **Long** | Order List ID. | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**price** | **String** | Price. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**cummulativeQuoteQty** | **String** | Cummulative Quote Qty. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**side** | **String** | Side. | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountOcoOrdersResponseOrdersInner.md b/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountOcoOrdersResponseOrdersInner.md index 5853c6436..5785b9d09 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountOcoOrdersResponseOrdersInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountOcoOrdersResponseOrdersInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountOrderResponse.md index f844e8dd0..7cf0542d9 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CancelMarginAccountOrderResponse.md @@ -7,18 +7,18 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**side** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**origClientOrderId** | **String** | Orig Client Order ID. | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**price** | **String** | Price. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**cummulativeQuoteQty** | **String** | Cummulative Quote Qty. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**side** | **String** | Side. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CancelUmConditionalOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/CancelUmConditionalOrderResponse.md index 669a442fb..6c5c3ba60 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CancelUmConditionalOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CancelUmConditionalOrderResponse.md @@ -7,27 +7,27 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**newClientStrategyId** | **String** | | [optional] | -|**strategyId** | **Long** | | [optional] | -|**strategyStatus** | **String** | | [optional] | -|**strategyType** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**bookTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | -|**priceMatch** | **String** | | [optional] | +|**newClientStrategyId** | **String** | New Client Strategy ID. | [optional] | +|**strategyId** | **Long** | Strategy ID. | [optional] | +|**strategyStatus** | **String** | Strategy Status. | [optional] | +|**strategyType** | **String** | Strategy Type. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**bookTime** | **Long** | order place time | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**workingType** | **String** | Working Type. | [optional] | +|**priceProtect** | **Boolean** | Price Protect. | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auot cancel time for TIF GTD order | [optional] | +|**priceMatch** | **String** | Price Match. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CancelUmOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/CancelUmOrderResponse.md index 4b3dae56b..d3d353c14 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CancelUmOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CancelUmOrderResponse.md @@ -7,25 +7,23 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgPrice** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**cumQty** | **String** | | [optional] | -|**cumQuote** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | -|**priceMatch** | **String** | | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**cumQty** | **String** | Cum Qty. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auot cancel time for TIF GTD order | [optional] | +|**priceMatch** | **String** | Price Match. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/ChangeAutoRepayFuturesStatusRequest.md b/clients/derivatives-trading-portfolio-margin/docs/ChangeAutoRepayFuturesStatusRequest.md index 4fb4acd3c..ff46144ba 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ChangeAutoRepayFuturesStatusRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ChangeAutoRepayFuturesStatusRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**autoRepay** | **String** | | | +|**autoRepay** | **AutoRepay** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/ChangeAutoRepayFuturesStatusResponse.md b/clients/derivatives-trading-portfolio-margin/docs/ChangeAutoRepayFuturesStatusResponse.md index 1d4534775..7406596d5 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ChangeAutoRepayFuturesStatusResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ChangeAutoRepayFuturesStatusResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**msg** | **String** | | [optional] | +|**msg** | **String** | Msg. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/ChangeCmInitialLeverageRequest.md b/clients/derivatives-trading-portfolio-margin/docs/ChangeCmInitialLeverageRequest.md index 680f2edff..3af74288a 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ChangeCmInitialLeverageRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ChangeCmInitialLeverageRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**leverage** | **Long** | | | +|**leverage** | **Long** | target initial leverage | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/ChangeCmInitialLeverageResponse.md b/clients/derivatives-trading-portfolio-margin/docs/ChangeCmInitialLeverageResponse.md index 5479483cc..5b18a9eb4 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ChangeCmInitialLeverageResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ChangeCmInitialLeverageResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**leverage** | **Long** | | [optional] | -|**maxQty** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | +|**leverage** | **Long** | current initial leverage | [optional] | +|**maxQty** | **String** | maximum quantity of base asset | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/ChangeCmPositionModeRequest.md b/clients/derivatives-trading-portfolio-margin/docs/ChangeCmPositionModeRequest.md index 4f981e422..6b4d0c0c7 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ChangeCmPositionModeRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ChangeCmPositionModeRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**dualSidePosition** | **String** | | | +|**dualSidePosition** | **DualSidePosition** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/ChangeCmPositionModeResponse.md b/clients/derivatives-trading-portfolio-margin/docs/ChangeCmPositionModeResponse.md index 834c3f78c..b64a37976 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ChangeCmPositionModeResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ChangeCmPositionModeResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **Long** | | [optional] | -|**msg** | **String** | | [optional] | +|**code** | **Long** | Code. | [optional] | +|**msg** | **String** | Msg. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/ChangeUmInitialLeverageRequest.md b/clients/derivatives-trading-portfolio-margin/docs/ChangeUmInitialLeverageRequest.md index d75dd64fc..e78d0609c 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ChangeUmInitialLeverageRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ChangeUmInitialLeverageRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**leverage** | **Long** | | | +|**leverage** | **Long** | target initial leverage | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/ChangeUmInitialLeverageResponse.md b/clients/derivatives-trading-portfolio-margin/docs/ChangeUmInitialLeverageResponse.md index 323649b9e..5154e5c50 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ChangeUmInitialLeverageResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ChangeUmInitialLeverageResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**leverage** | **Long** | | [optional] | -|**maxNotionalValue** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | +|**leverage** | **Long** | current initial leverage | [optional] | +|**maxNotionalValue** | **String** | Max Notional Value. | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/ChangeUmPositionModeRequest.md b/clients/derivatives-trading-portfolio-margin/docs/ChangeUmPositionModeRequest.md index 70d63ef72..972c552db 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ChangeUmPositionModeRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ChangeUmPositionModeRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**dualSidePosition** | **String** | | | +|**dualSidePosition** | **DualSidePosition** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/ChangeUmPositionModeResponse.md b/clients/derivatives-trading-portfolio-margin/docs/ChangeUmPositionModeResponse.md index e187db96f..f52c0f6dc 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ChangeUmPositionModeResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ChangeUmPositionModeResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **Long** | | [optional] | -|**msg** | **String** | | [optional] | +|**code** | **Long** | Code. | [optional] | +|**msg** | **String** | Msg. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CmAccountTradeListResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/CmAccountTradeListResponseInner.md index eb714813a..173d7f53b 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CmAccountTradeListResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CmAccountTradeListResponseInner.md @@ -7,22 +7,22 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**id** | **Long** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**pair** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**qty** | **String** | | [optional] | -|**realizedPnl** | **String** | | [optional] | -|**marginAsset** | **String** | | [optional] | -|**baseQty** | **String** | | [optional] | -|**commission** | **String** | | [optional] | -|**commissionAsset** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**buyer** | **Boolean** | | [optional] | -|**maker** | **Boolean** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**id** | **Long** | ID. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**pair** | **String** | Pair. | [optional] | +|**side** | **String** | Side. | [optional] | +|**price** | **String** | Price. | [optional] | +|**qty** | **String** | Qty. | [optional] | +|**realizedPnl** | **String** | Realized Pnl. | [optional] | +|**marginAsset** | **String** | Margin Asset. | [optional] | +|**baseQty** | **String** | Base Qty. | [optional] | +|**commission** | **String** | Commission. | [optional] | +|**commissionAsset** | **String** | Commission Asset. | [optional] | +|**time** | **Long** | Event time. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**buyer** | **Boolean** | Buyer. | [optional] | +|**maker** | **Boolean** | Maker. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CmNotionalAndLeverageBracketsResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/CmNotionalAndLeverageBracketsResponseInner.md index 56fc2a76e..7d6b68a4f 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CmNotionalAndLeverageBracketsResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CmNotionalAndLeverageBracketsResponseInner.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**brackets** | [**List<CmNotionalAndLeverageBracketsResponseInnerBracketsInner>**](CmNotionalAndLeverageBracketsResponseInnerBracketsInner.md) | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**brackets** | [**List<CmNotionalAndLeverageBracketsResponseInnerBracketsInner>**](CmNotionalAndLeverageBracketsResponseInnerBracketsInner.md) | Brackets. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CmNotionalAndLeverageBracketsResponseInnerBracketsInner.md b/clients/derivatives-trading-portfolio-margin/docs/CmNotionalAndLeverageBracketsResponseInnerBracketsInner.md index 686910d31..19c610645 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CmNotionalAndLeverageBracketsResponseInnerBracketsInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CmNotionalAndLeverageBracketsResponseInnerBracketsInner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**bracket** | **Long** | | [optional] | -|**initialLeverage** | **Long** | | [optional] | -|**qtyCap** | **Long** | | [optional] | -|**qtyFloor** | **Long** | | [optional] | -|**maintMarginRatio** | **Double** | | [optional] | -|**cum** | **Double** | | [optional] | +|**bracket** | **Long** | bracket level | [optional] | +|**initialLeverage** | **Long** | the maximum leverage | [optional] | +|**qtyCap** | **Long** | upper edge of base asset quantity | [optional] | +|**qtyFloor** | **Long** | lower edge of base asset quantity | [optional] | +|**maintMarginRatio** | **Double** | maintenance margin rate | [optional] | +|**cum** | **Double** | Auxiliary number for quick calculation | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CmPositionAdlQuantileEstimationResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/CmPositionAdlQuantileEstimationResponseInner.md index b36359485..93eb442b6 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CmPositionAdlQuantileEstimationResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CmPositionAdlQuantileEstimationResponseInner.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | |**adlQuantile** | [**CmPositionAdlQuantileEstimationResponseInnerAdlQuantile**](CmPositionAdlQuantileEstimationResponseInnerAdlQuantile.md) | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/CmPositionAdlQuantileEstimationResponseInnerAdlQuantile.md b/clients/derivatives-trading-portfolio-margin/docs/CmPositionAdlQuantileEstimationResponseInnerAdlQuantile.md index 7c243fc94..37133f7e8 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/CmPositionAdlQuantileEstimationResponseInnerAdlQuantile.md +++ b/clients/derivatives-trading-portfolio-margin/docs/CmPositionAdlQuantileEstimationResponseInnerAdlQuantile.md @@ -2,15 +2,16 @@ # CmPositionAdlQuantileEstimationResponseInnerAdlQuantile +Adl Quantile. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**LONG** | **Long** | | [optional] | -|**SHORT** | **Long** | | [optional] | -|**HEDGE** | **Long** | | [optional] | -|**BOTH** | **Long** | | [optional] | +|**LONG** | **Long** | adl quantile for \"LONG\" position in hedge mode | [optional] | +|**SHORT** | **Long** | adl qauntile for \"SHORT\" position in hedge mode | [optional] | +|**HEDGE** | **Long** | only a sign, ignore the value | [optional] | +|**BOTH** | **Long** | adl qunatile for position in one-way mode | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/ConditionalOrderTradeUpdate.md b/clients/derivatives-trading-portfolio-margin/docs/ConditionalOrderTradeUpdate.md index 008e2fbdd..ac783e0fc 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ConditionalOrderTradeUpdate.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ConditionalOrderTradeUpdate.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**T** | **Long** | | [optional] | -|**E** | **Long** | | [optional] | -|**fs** | **String** | | [optional] | +|**T** | **Long** | Transaction Time | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**fs** | **String** | Event business unit | [optional] | |**so** | [**ConditionalOrderTradeUpdateSo**](ConditionalOrderTradeUpdateSo.md) | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/ConditionalOrderTradeUpdateSo.md b/clients/derivatives-trading-portfolio-margin/docs/ConditionalOrderTradeUpdateSo.md index 4d06ef7dd..121e6a5ea 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ConditionalOrderTradeUpdateSo.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ConditionalOrderTradeUpdateSo.md @@ -7,27 +7,27 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**si** | **Long** | | [optional] | -|**S** | **String** | | [optional] | -|**st** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**sp** | **String** | | [optional] | -|**os** | **String** | | [optional] | -|**T** | **Long** | | [optional] | -|**ut** | **Long** | | [optional] | -|**R** | **Boolean** | | [optional] | -|**wt** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**cp** | **Boolean** | | [optional] | -|**AP** | **String** | | [optional] | -|**cr** | **String** | | [optional] | -|**iLowerCase** | **Long** | | [optional] | -|**V** | **String** | | [optional] | -|**gtd** | **Long** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**cLowerCase** | **String** | Strategy Client Order Id | [optional] | +|**si** | **Long** | Strategy ID | [optional] | +|**S** | **String** | Side | [optional] | +|**st** | **String** | Strategy Type | [optional] | +|**fLowerCase** | **String** | Time in Force | [optional] | +|**qLowerCase** | **String** | Quantity | [optional] | +|**pLowerCase** | **String** | Price | [optional] | +|**sp** | **String** | Stop Price. Please ignore with TRAILING_STOP_MARKET order | [optional] | +|**os** | **String** | Strategy Order Status | [optional] | +|**T** | **Long** | Order book Time | [optional] | +|**ut** | **Long** | Order update Time | [optional] | +|**R** | **Boolean** | Is this reduce only | [optional] | +|**wt** | **String** | Stop Price Working Type | [optional] | +|**ps** | **String** | Position Side | [optional] | +|**cp** | **Boolean** | If Close-All, pushed with conditional order | [optional] | +|**AP** | **String** | Activation Price, only pushed with TRAILING_STOP_MARKET order | [optional] | +|**cr** | **String** | Callback Rate, only pushed with TRAILING_STOP_MARKET order | [optional] | +|**iLowerCase** | **Long** | Order Id | [optional] | +|**V** | **String** | STP mode | [optional] | +|**gtd** | **Long** | TIF GTD order auto cancel time | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/DualSidePosition.md b/clients/derivatives-trading-portfolio-margin/docs/DualSidePosition.md new file mode 100644 index 000000000..c052c79d1 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/docs/DualSidePosition.md @@ -0,0 +1,13 @@ + + +# DualSidePosition + +## Enum + + +* `TRUE` (value: `"true"`) + +* `FALSE` (value: `"false"`) + + + diff --git a/clients/derivatives-trading-portfolio-margin/docs/Executionreport.md b/clients/derivatives-trading-portfolio-margin/docs/Executionreport.md index c26e1d3a2..ff3f5aed1 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/Executionreport.md +++ b/clients/derivatives-trading-portfolio-margin/docs/Executionreport.md @@ -1,58 +1,58 @@ -# Executionreport +# ExecutionReport ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**S** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**dLowerCase** | **Long** | | [optional] | -|**F** | **String** | | [optional] | -|**gLowerCase** | **Long** | | [optional] | -|**C** | **String** | | [optional] | -|**xLowerCase** | **String** | | [optional] | -|**X** | **String** | | [optional] | -|**rLowerCase** | **String** | | [optional] | -|**iLowerCase** | **Long** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**zLowerCase** | **String** | | [optional] | -|**L** | **String** | | [optional] | -|**nLowerCase** | **String** | | [optional] | -|**N** | **String** | | [optional] | -|**T** | **Long** | | [optional] | -|**tLowerCase** | **Long** | | [optional] | -|**vLowerCase** | **Long** | | [optional] | -|**I** | **Long** | | [optional] | -|**wLowerCase** | **Boolean** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | -|**O** | **Long** | | [optional] | -|**Z** | **String** | | [optional] | -|**Y** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**D** | **Long** | | [optional] | -|**jLowerCase** | **Long** | | [optional] | -|**J** | **Long** | | [optional] | -|**W** | **Long** | | [optional] | -|**V** | **String** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**U** | **Long** | | [optional] | -|**A** | **String** | | [optional] | -|**B** | **String** | | [optional] | -|**cs** | **String** | | [optional] | -|**pl** | **String** | | [optional] | -|**pL** | **String** | | [optional] | -|**pY** | **String** | | [optional] | -|**eR** | **String** | | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**cLowerCase** | **String** | Client order ID | [optional] | +|**S** | **String** | Side | [optional] | +|**oLowerCase** | **String** | Order type | [optional] | +|**fLowerCase** | **String** | Time in force | [optional] | +|**qLowerCase** | **String** | Order quantity | [optional] | +|**pLowerCase** | **String** | Order price | [optional] | +|**P** | **String** | Stop price | [optional] | +|**dLowerCase** | **Long** | Trailing Delta; This is only visible if the order was a trailing stop order. | [optional] | +|**F** | **String** | Iceberg quantity; Will not be visible if not iceberg order | [optional] | +|**gLowerCase** | **Long** | OrderListId | [optional] | +|**C** | **String** | Original client order ID; Only visible on cancellation of order, the ID of the order being canceled. | [optional] | +|**xLowerCase** | **String** | Current execution type | [optional] | +|**X** | **String** | Current order status | [optional] | +|**rLowerCase** | **String** | Order reject reason; Only visible if there is a rejection, will be an error code. | [optional] | +|**iLowerCase** | **Long** | Order ID | [optional] | +|**lLowerCase** | **String** | Last executed quantity | [optional] | +|**zLowerCase** | **String** | Cumulative filled quantity | [optional] | +|**L** | **String** | Last executed price | [optional] | +|**nLowerCase** | **String** | Commission amount | [optional] | +|**N** | **String** | Commission asset; Only visible when there is a commission amount. | [optional] | +|**T** | **Long** | Transaction time | [optional] | +|**tLowerCase** | **Long** | Trade ID | [optional] | +|**vLowerCase** | **Long** | Prevented Match Id; This is only visible if the order expire due to STP trigger. | [optional] | +|**I** | **Long** | updateId | [optional] | +|**wLowerCase** | **Boolean** | Is the order on the book? | [optional] | +|**mLowerCase** | **Boolean** | Is this trade the maker side? | [optional] | +|**O** | **Long** | Order creation time | [optional] | +|**Z** | **String** | Cumulative quote asset transacted quantity | [optional] | +|**Y** | **String** | Last quote asset transacted quantity (i.e. lastPrice * lastQty) | [optional] | +|**Q** | **String** | Quote Order Quantity; This is only visible if indicated in the order | [optional] | +|**D** | **Long** | Trailing Time; This is only visible if the trailing stop order has been activated. | [optional] | +|**jLowerCase** | **Long** | Strategy ID; This is only visible if the strategyId parameter was provided upon order placement | [optional] | +|**J** | **Long** | Strategy Type; This is only visible if the strategyType parameter was provided upon order placement | [optional] | +|**W** | **Long** | Working Time; This is only visible if the order has been placed on the book. | [optional] | +|**V** | **String** | selfTradePreventionMode | [optional] | +|**uLowerCase** | **Long** | TradeGroupId; This is only visible if the account is part of a trade group and the order expired due to STP trigger. | [optional] | +|**U** | **Long** | CounterOrderId; This is only visible if the order expired due to STP trigger. | [optional] | +|**A** | **String** | Prevented Quantity; This is only visible if the order expired due to STP trigger. | [optional] | +|**B** | **String** | Last Prevented Quantity; This is only visible if the order expired due to STP trigger. | [optional] | +|**cs** | **String** | Counter Symbol; This is only visible if the order expired due to STP trigger. | [optional] | +|**pl** | **String** | Prevented Execution Quantity; This is only visible if the order expired due to STP trigger. | [optional] | +|**pL** | **String** | Prevented Execution Price; This is only visible if the order expired due to STP trigger. | [optional] | +|**pY** | **String** | Prevented Execution Quote Qty; This is only visible if the order expired due to STP trigger. | [optional] | +|**eR** | **String** | Expiry Reason; This is only visible if the order has expired. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/FeeBurn.md b/clients/derivatives-trading-portfolio-margin/docs/FeeBurn.md new file mode 100644 index 000000000..45e525ea5 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/docs/FeeBurn.md @@ -0,0 +1,13 @@ + + +# FeeBurn + +## Enum + + +* `TRUE` (value: `"true"`) + +* `FALSE` (value: `"false"`) + + + diff --git a/clients/derivatives-trading-portfolio-margin/docs/FundAutoCollectionResponse.md b/clients/derivatives-trading-portfolio-margin/docs/FundAutoCollectionResponse.md index f79bd3fef..6eedc6f09 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/FundAutoCollectionResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/FundAutoCollectionResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**msg** | **String** | | [optional] | +|**msg** | **String** | Msg. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/FundCollectionByAssetResponse.md b/clients/derivatives-trading-portfolio-margin/docs/FundCollectionByAssetResponse.md index d9e63f368..ae62dc3e9 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/FundCollectionByAssetResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/FundCollectionByAssetResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**msg** | **String** | | [optional] | +|**msg** | **String** | Msg. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/FuturesTradfiPerpsContractResponse.md b/clients/derivatives-trading-portfolio-margin/docs/FuturesTradfiPerpsContractResponse.md index 111437aaf..9b7960829 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/FuturesTradfiPerpsContractResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/FuturesTradfiPerpsContractResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **Long** | | [optional] | +|**code** | **Integer** | | [optional] | |**msg** | **String** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetAutoRepayFuturesStatusResponse.md b/clients/derivatives-trading-portfolio-margin/docs/GetAutoRepayFuturesStatusResponse.md index 045d3c2fa..8bad26bc0 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetAutoRepayFuturesStatusResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetAutoRepayFuturesStatusResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**autoRepay** | **Boolean** | | [optional] | +|**autoRepay** | **Boolean** | \"true\" for turn on the auto-repay futures; \"false\" for turn off the auto-repay futures | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetCmAccountDetailResponse.md b/clients/derivatives-trading-portfolio-margin/docs/GetCmAccountDetailResponse.md index 3e7d7aade..f9c91a762 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetCmAccountDetailResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetCmAccountDetailResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**assets** | [**List<GetCmAccountDetailResponseAssetsInner>**](GetCmAccountDetailResponseAssetsInner.md) | | [optional] | -|**positions** | [**List<GetCmAccountDetailResponsePositionsInner>**](GetCmAccountDetailResponsePositionsInner.md) | | [optional] | +|**assets** | [**List<GetCmAccountDetailResponseAssetsInner>**](GetCmAccountDetailResponseAssetsInner.md) | Assets. | [optional] | +|**positions** | [**List<GetCmAccountDetailResponsePositionsInner>**](GetCmAccountDetailResponsePositionsInner.md) | positions of all symbols in the market are returned | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetCmAccountDetailResponseAssetsInner.md b/clients/derivatives-trading-portfolio-margin/docs/GetCmAccountDetailResponseAssetsInner.md index 000f04f11..7c87bb20d 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetCmAccountDetailResponseAssetsInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetCmAccountDetailResponseAssetsInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**crossWalletBalance** | **String** | | [optional] | -|**crossUnPnl** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**positionInitialMargin** | **String** | | [optional] | -|**openOrderInitialMargin** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**asset** | **String** | asset name | [optional] | +|**crossWalletBalance** | **String** | total wallet balance | [optional] | +|**crossUnPnl** | **String** | unrealized profit or loss | [optional] | +|**maintMargin** | **String** | maintenance margin | [optional] | +|**initialMargin** | **String** | total intial margin required with the latest mark price | [optional] | +|**positionInitialMargin** | **String** | positions margin required with the latest mark price | [optional] | +|**openOrderInitialMargin** | **String** | open orders intial margin required with the latest mark price | [optional] | +|**updateTime** | **Long** | last update time | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetCmAccountDetailResponsePositionsInner.md b/clients/derivatives-trading-portfolio-margin/docs/GetCmAccountDetailResponsePositionsInner.md index afedb971a..ad2b98436 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetCmAccountDetailResponsePositionsInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetCmAccountDetailResponsePositionsInner.md @@ -7,18 +7,18 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**positionAmt** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**unrealizedProfit** | **String** | | [optional] | -|**positionInitialMargin** | **String** | | [optional] | -|**openOrderInitialMargin** | **String** | | [optional] | -|**leverage** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**entryPrice** | **String** | | [optional] | -|**maxQty** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**positionAmt** | **String** | position amount | [optional] | +|**initialMargin** | **String** | total intial margin required with the latest mark price | [optional] | +|**maintMargin** | **String** | maintenance margin | [optional] | +|**unrealizedProfit** | **String** | unrealized profit | [optional] | +|**positionInitialMargin** | **String** | positions margin required with the latest mark price | [optional] | +|**openOrderInitialMargin** | **String** | open orders intial margin required with the latest mark price | [optional] | +|**leverage** | **String** | current initial leverage | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**entryPrice** | **String** | average entry price | [optional] | +|**maxQty** | **String** | maximum quantity of base asset | [optional] | +|**updateTime** | **Long** | last update time | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetCmCurrentPositionModeResponse.md b/clients/derivatives-trading-portfolio-margin/docs/GetCmCurrentPositionModeResponse.md index d3ce6e1b8..4577df361 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetCmCurrentPositionModeResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetCmCurrentPositionModeResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**dualSidePosition** | **Boolean** | | [optional] | +|**dualSidePosition** | **Boolean** | \"true\": Hedge Mode; \"false\": One-way Mode | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetCmIncomeHistoryResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/GetCmIncomeHistoryResponseInner.md index 0c99ae086..3e52f3125 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetCmIncomeHistoryResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetCmIncomeHistoryResponseInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**incomeType** | **String** | | [optional] | -|**income** | **String** | | [optional] | -|**asset** | **String** | | [optional] | -|**info** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**tranId** | **String** | | [optional] | -|**tradeId** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**incomeType** | **String** | Income type. | [optional] | +|**income** | **String** | Income amount. | [optional] | +|**asset** | **String** | Income asset. | [optional] | +|**info** | **String** | Extra information. | [optional] | +|**time** | **Long** | Event time. | [optional] | +|**tranId** | **String** | Transaction ID. | [optional] | +|**tradeId** | **String** | Trade ID, if existing. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetDownloadIdForUmFuturesOrderHistoryResponse.md b/clients/derivatives-trading-portfolio-margin/docs/GetDownloadIdForUmFuturesOrderHistoryResponse.md index c9d6f6514..0a3943e0d 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetDownloadIdForUmFuturesOrderHistoryResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetDownloadIdForUmFuturesOrderHistoryResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgCostTimestampOfLast30d** | **Long** | | [optional] | -|**downloadId** | **String** | | [optional] | +|**avgCostTimestampOfLast30d** | **Long** | Average time taken for data download in the past 30 days | [optional] | +|**downloadId** | **String** | Download ID. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetDownloadIdForUmFuturesTradeHistoryResponse.md b/clients/derivatives-trading-portfolio-margin/docs/GetDownloadIdForUmFuturesTradeHistoryResponse.md index 208b5fade..93fd9cc92 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetDownloadIdForUmFuturesTradeHistoryResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetDownloadIdForUmFuturesTradeHistoryResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgCostTimestampOfLast30d** | **Long** | | [optional] | -|**downloadId** | **String** | | [optional] | +|**avgCostTimestampOfLast30d** | **Long** | Average time taken for data download in the past 30 days | [optional] | +|**downloadId** | **String** | Download ID. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetDownloadIdForUmFuturesTransactionHistoryResponse.md b/clients/derivatives-trading-portfolio-margin/docs/GetDownloadIdForUmFuturesTransactionHistoryResponse.md index 87c1bdc55..2a858d0ea 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetDownloadIdForUmFuturesTransactionHistoryResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetDownloadIdForUmFuturesTransactionHistoryResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgCostTimestampOfLast30d** | **Long** | | [optional] | -|**downloadId** | **String** | | [optional] | +|**avgCostTimestampOfLast30d** | **Long** | Average time taken for data download in the past 30 days | [optional] | +|**downloadId** | **String** | Download ID. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetMarginBorrowLoanInterestHistoryResponse.md b/clients/derivatives-trading-portfolio-margin/docs/GetMarginBorrowLoanInterestHistoryResponse.md index f2c73df57..7ae7cf086 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetMarginBorrowLoanInterestHistoryResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetMarginBorrowLoanInterestHistoryResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**rows** | [**List<GetMarginBorrowLoanInterestHistoryResponseRowsInner>**](GetMarginBorrowLoanInterestHistoryResponseRowsInner.md) | | [optional] | -|**total** | **Long** | | [optional] | +|**rows** | [**List<GetMarginBorrowLoanInterestHistoryResponseRowsInner>**](GetMarginBorrowLoanInterestHistoryResponseRowsInner.md) | Rows. | [optional] | +|**total** | **Long** | Total. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetMarginBorrowLoanInterestHistoryResponseRowsInner.md b/clients/derivatives-trading-portfolio-margin/docs/GetMarginBorrowLoanInterestHistoryResponseRowsInner.md index eb167e9c6..4cb9e46e3 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetMarginBorrowLoanInterestHistoryResponseRowsInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetMarginBorrowLoanInterestHistoryResponseRowsInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**txId** | **Long** | | [optional] | -|**interestAccuredTime** | **Long** | | [optional] | -|**asset** | **String** | | [optional] | -|**rawAsset** | **String** | | [optional] | -|**principal** | **String** | | [optional] | -|**interest** | **String** | | [optional] | -|**interestRate** | **String** | | [optional] | -|**type** | **String** | | [optional] | +|**txId** | **Long** | Tx ID. | [optional] | +|**interestAccuredTime** | **Long** | Interest Accured Time. | [optional] | +|**asset** | **String** | asset name | [optional] | +|**rawAsset** | **String** | Raw Asset. | [optional] | +|**principal** | **String** | Principal repaid | [optional] | +|**interest** | **String** | Interest repaid | [optional] | +|**interestRate** | **String** | daily interest rate | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailResponse.md b/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailResponse.md index ebab82e4b..bfa9c9731 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**assets** | [**List<GetUmAccountDetailV2ResponseAssetsInner>**](GetUmAccountDetailV2ResponseAssetsInner.md) | | [optional] | -|**positions** | [**List<GetUmAccountDetailResponsePositionsInner>**](GetUmAccountDetailResponsePositionsInner.md) | | [optional] | +|**assets** | [**List<GetUmAccountDetailResponseAssetsInner>**](GetUmAccountDetailResponseAssetsInner.md) | Assets. | [optional] | +|**positions** | [**List<GetUmAccountDetailResponsePositionsInner>**](GetUmAccountDetailResponsePositionsInner.md) | positions of all symbols in the market are returned | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailResponseAssetsInner.md b/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailResponseAssetsInner.md new file mode 100644 index 000000000..ab3e45070 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailResponseAssetsInner.md @@ -0,0 +1,20 @@ + + +# GetUmAccountDetailResponseAssetsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**asset** | **String** | asset name | [optional] | +|**crossWalletBalance** | **String** | wallet balance | [optional] | +|**crossUnPnl** | **String** | unrealized profit | [optional] | +|**maintMargin** | **String** | maintenance margin required | [optional] | +|**initialMargin** | **String** | total initial margin required with current mark price | [optional] | +|**positionInitialMargin** | **String** | initial margin required for positions with current mark price | [optional] | +|**openOrderInitialMargin** | **String** | initial margin required for open orders with current mark price | [optional] | +|**updateTime** | **Long** | last update time | [optional] | + + + diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailResponsePositionsInner.md b/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailResponsePositionsInner.md index ab21113e1..88a970db9 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailResponsePositionsInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailResponsePositionsInner.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**unrealizedProfit** | **String** | | [optional] | -|**positionInitialMargin** | **String** | | [optional] | -|**openOrderInitialMargin** | **String** | | [optional] | -|**leverage** | **String** | | [optional] | -|**entryPrice** | **String** | | [optional] | -|**maxNotional** | **String** | | [optional] | -|**bidNotional** | **String** | | [optional] | -|**askNotional** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**positionAmt** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**symbol** | **String** | symbol name | [optional] | +|**initialMargin** | **String** | total initial margin required with current mark price | [optional] | +|**maintMargin** | **String** | maintenance margin required | [optional] | +|**unrealizedProfit** | **String** | unrealized profit | [optional] | +|**positionInitialMargin** | **String** | initial margin required for positions with current mark price | [optional] | +|**openOrderInitialMargin** | **String** | initial margin required for open orders with current mark price | [optional] | +|**leverage** | **String** | current initial leverage | [optional] | +|**entryPrice** | **String** | average entry price | [optional] | +|**maxNotional** | **String** | maximum available notional with current leverage | [optional] | +|**bidNotional** | **String** | bids notional, ignore | [optional] | +|**askNotional** | **String** | ask notional, ignore | [optional] | +|**positionSide** | **String** | position side | [optional] | +|**positionAmt** | **String** | position amount | [optional] | +|**updateTime** | **Long** | last update time | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailV2Response.md b/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailV2Response.md index 88d9b7f37..5fe233988 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailV2Response.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailV2Response.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**assets** | [**List<GetUmAccountDetailV2ResponseAssetsInner>**](GetUmAccountDetailV2ResponseAssetsInner.md) | | [optional] | -|**positions** | [**List<GetUmAccountDetailV2ResponsePositionsInner>**](GetUmAccountDetailV2ResponsePositionsInner.md) | | [optional] | +|**assets** | [**List<GetUmAccountDetailResponseAssetsInner>**](GetUmAccountDetailResponseAssetsInner.md) | Assets. | [optional] | +|**positions** | [**List<GetUmAccountDetailV2ResponsePositionsInner>**](GetUmAccountDetailV2ResponsePositionsInner.md) | positions of all symbols in the market are returned | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailV2ResponseAssetsInner.md b/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailV2ResponseAssetsInner.md deleted file mode 100644 index 5c8332678..000000000 --- a/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailV2ResponseAssetsInner.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# GetUmAccountDetailV2ResponseAssetsInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**crossWalletBalance** | **String** | | [optional] | -|**crossUnPnl** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**positionInitialMargin** | **String** | | [optional] | -|**openOrderInitialMargin** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | - - - diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailV2ResponsePositionsInner.md b/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailV2ResponsePositionsInner.md index b4517ea29..71234958f 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailV2ResponsePositionsInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetUmAccountDetailV2ResponsePositionsInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**unrealizedProfit** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**positionAmt** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**notional** | **String** | | [optional] | +|**symbol** | **String** | symbol name | [optional] | +|**initialMargin** | **String** | total initial margin required with current mark price | [optional] | +|**maintMargin** | **String** | maintenance margin required | [optional] | +|**unrealizedProfit** | **String** | unrealized profit | [optional] | +|**positionSide** | **String** | position side | [optional] | +|**positionAmt** | **String** | position amount | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**notional** | **String** | Notional. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetUmCurrentPositionModeResponse.md b/clients/derivatives-trading-portfolio-margin/docs/GetUmCurrentPositionModeResponse.md index afc9be8ba..c35b67d43 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetUmCurrentPositionModeResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetUmCurrentPositionModeResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**dualSidePosition** | **Boolean** | | [optional] | +|**dualSidePosition** | **Boolean** | \"true\": Hedge Mode; \"false\": One-way Mode | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetUmFuturesBnbBurnStatusResponse.md b/clients/derivatives-trading-portfolio-margin/docs/GetUmFuturesBnbBurnStatusResponse.md index 5aed421bf..c7205a680 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetUmFuturesBnbBurnStatusResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetUmFuturesBnbBurnStatusResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**feeBurn** | **Boolean** | | [optional] | +|**feeBurn** | **Boolean** | \"true\": Fee Discount On; \"false\": Fee Discount Off | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetUmFuturesOrderDownloadLinkByIdResponse.md b/clients/derivatives-trading-portfolio-margin/docs/GetUmFuturesOrderDownloadLinkByIdResponse.md index 970842d6b..da97410e5 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetUmFuturesOrderDownloadLinkByIdResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetUmFuturesOrderDownloadLinkByIdResponse.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**downloadId** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**url** | **String** | | [optional] | -|**s3Link** | **String** | | [optional] | -|**notified** | **Boolean** | | [optional] | -|**expirationTimestamp** | **Long** | | [optional] | -|**isExpired** | **String** | | [optional] | +|**downloadId** | **String** | Download ID. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**url** | **String** | The link is mapped to download id | [optional] | +|**s3Link** | **String** | S3 Link. | [optional] | +|**notified** | **Boolean** | ignore | [optional] | +|**expirationTimestamp** | **Long** | The link would expire after this timestamp | [optional] | +|**isExpired** | **String** | Is Expired. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetUmFuturesTradeDownloadLinkByIdResponse.md b/clients/derivatives-trading-portfolio-margin/docs/GetUmFuturesTradeDownloadLinkByIdResponse.md index 19ff64514..74e0bf775 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetUmFuturesTradeDownloadLinkByIdResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetUmFuturesTradeDownloadLinkByIdResponse.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**downloadId** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**url** | **String** | | [optional] | -|**s3Link** | **String** | | [optional] | -|**notified** | **Boolean** | | [optional] | -|**expirationTimestamp** | **Long** | | [optional] | -|**isExpired** | **String** | | [optional] | +|**downloadId** | **String** | Download ID. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**url** | **String** | The link is mapped to download id | [optional] | +|**s3Link** | **String** | S3 Link. | [optional] | +|**notified** | **Boolean** | ignore | [optional] | +|**expirationTimestamp** | **Long** | The link would expire after this timestamp | [optional] | +|**isExpired** | **String** | Is Expired. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetUmFuturesTransactionDownloadLinkByIdResponse.md b/clients/derivatives-trading-portfolio-margin/docs/GetUmFuturesTransactionDownloadLinkByIdResponse.md index 67891dc98..2c787e65e 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetUmFuturesTransactionDownloadLinkByIdResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetUmFuturesTransactionDownloadLinkByIdResponse.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**downloadId** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**url** | **String** | | [optional] | -|**s3Link** | **String** | | [optional] | -|**notified** | **Boolean** | | [optional] | -|**expirationTimestamp** | **Long** | | [optional] | -|**isExpired** | **String** | | [optional] | +|**downloadId** | **String** | Download ID. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**url** | **String** | The link is mapped to download id | [optional] | +|**s3Link** | **String** | S3 Link. | [optional] | +|**notified** | **Boolean** | ignore | [optional] | +|**expirationTimestamp** | **Long** | The link would expire after this timestamp | [optional] | +|**isExpired** | **String** | Is Expired. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetUmIncomeHistoryResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/GetUmIncomeHistoryResponseInner.md index a5c7604e1..260dfb7c6 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetUmIncomeHistoryResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetUmIncomeHistoryResponseInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**incomeType** | **String** | | [optional] | -|**income** | **String** | | [optional] | -|**asset** | **String** | | [optional] | -|**info** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**tranId** | **Long** | | [optional] | -|**tradeId** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**incomeType** | **String** | Income type. | [optional] | +|**income** | **String** | Income amount. | [optional] | +|**asset** | **String** | Income asset. | [optional] | +|**info** | **String** | Extra information. | [optional] | +|**time** | **Long** | Event time. | [optional] | +|**tranId** | **String** | Transaction ID. | [optional] | +|**tradeId** | **String** | Trade ID, if existing. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetUserCommissionRateForCmResponse.md b/clients/derivatives-trading-portfolio-margin/docs/GetUserCommissionRateForCmResponse.md index f7c88eeae..7f8e51053 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetUserCommissionRateForCmResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetUserCommissionRateForCmResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**makerCommissionRate** | **String** | | [optional] | -|**takerCommissionRate** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**makerCommissionRate** | **String** | 0.015% | [optional] | +|**takerCommissionRate** | **String** | 0.040% | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/GetUserCommissionRateForUmResponse.md b/clients/derivatives-trading-portfolio-margin/docs/GetUserCommissionRateForUmResponse.md index 91bd5cc3f..53581629e 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/GetUserCommissionRateForUmResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/GetUserCommissionRateForUmResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**makerCommissionRate** | **String** | | [optional] | -|**takerCommissionRate** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**makerCommissionRate** | **String** | 0.02% | [optional] | +|**takerCommissionRate** | **String** | 0.04% | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/IncomeType.md b/clients/derivatives-trading-portfolio-margin/docs/IncomeType.md new file mode 100644 index 000000000..f5a3c915d --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/docs/IncomeType.md @@ -0,0 +1,47 @@ + + +# IncomeType + +## Enum + + +* `TRANSFER` (value: `"TRANSFER"`) + +* `WELCOME_BONUS` (value: `"WELCOME_BONUS"`) + +* `REALIZED_PNL` (value: `"REALIZED_PNL"`) + +* `FUNDING_FEE` (value: `"FUNDING_FEE"`) + +* `COMMISSION` (value: `"COMMISSION"`) + +* `INSURANCE_CLEAR` (value: `"INSURANCE_CLEAR"`) + +* `REFERRAL_KICKBACK` (value: `"REFERRAL_KICKBACK"`) + +* `COMMISSION_REBATE` (value: `"COMMISSION_REBATE"`) + +* `API_REBATE` (value: `"API_REBATE"`) + +* `CONTEST_REWARD` (value: `"CONTEST_REWARD"`) + +* `CROSS_COLLATERAL_TRANSFER` (value: `"CROSS_COLLATERAL_TRANSFER"`) + +* `OPTIONS_PREMIUM_FEE` (value: `"OPTIONS_PREMIUM_FEE"`) + +* `OPTIONS_SETTLE_PROFIT` (value: `"OPTIONS_SETTLE_PROFIT"`) + +* `INTERNAL_TRANSFER` (value: `"INTERNAL_TRANSFER"`) + +* `AUTO_EXCHANGE` (value: `"AUTO_EXCHANGE"`) + +* `DELIVERED_SETTELMENT` (value: `"DELIVERED_SETTELMENT"`) + +* `COIN_SWAP_DEPOSIT` (value: `"COIN_SWAP_DEPOSIT"`) + +* `COIN_SWAP_WITHDRAW` (value: `"COIN_SWAP_WITHDRAW"`) + +* `POSITION_LIMIT_INCREASE_FEE` (value: `"POSITION_LIMIT_INCREASE_FEE"`) + + + diff --git a/clients/derivatives-trading-portfolio-margin/docs/Liabilitychange.md b/clients/derivatives-trading-portfolio-margin/docs/Liabilitychange.md index bc4bae39e..bbce003ce 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/Liabilitychange.md +++ b/clients/derivatives-trading-portfolio-margin/docs/Liabilitychange.md @@ -1,19 +1,19 @@ -# Liabilitychange +# LiabilityChange ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**tLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**aLowerCase** | **String** | Asset | [optional] | +|**tLowerCase** | **String** | Type | [optional] | +|**T** | **Long** | Transaction ID | [optional] | +|**pLowerCase** | **String** | Principal | [optional] | +|**iLowerCase** | **String** | Interest | [optional] | +|**lLowerCase** | **String** | Total Liability | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/Listenkeyexpired.md b/clients/derivatives-trading-portfolio-margin/docs/Listenkeyexpired.md index 062121b89..74be173a3 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/Listenkeyexpired.md +++ b/clients/derivatives-trading-portfolio-margin/docs/Listenkeyexpired.md @@ -1,13 +1,13 @@ -# Listenkeyexpired +# ListenKeyExpired ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountBorrowResponse.md b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountBorrowResponse.md index 838bc0643..184c69738 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountBorrowResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountBorrowResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tranId** | **Long** | | [optional] | +|**tranId** | **Long** | Transaction ID. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountNewOcoRequest.md b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountNewOcoRequest.md index 0336363b7..39078d103 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountNewOcoRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountNewOcoRequest.md @@ -8,15 +8,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**listClientOrderId** | **String** | | [optional] | +|**listClientOrderId** | **String** | A unique Id for the entire orderList | [optional] | |**side** | **Side** | | | |**quantity** | **Double** | | | -|**limitClientOrderId** | **String** | | [optional] | +|**limitClientOrderId** | **String** | A unique Id for the limit order | [optional] | |**price** | **Double** | | | |**limitIcebergQty** | **Double** | | [optional] | -|**stopClientOrderId** | **String** | | [optional] | +|**stopClientOrderId** | **String** | A unique Id for the stop loss/stop loss limit leg | [optional] | |**stopPrice** | **Double** | | | -|**stopLimitPrice** | **Double** | | [optional] | +|**stopLimitPrice** | **Double** | If provided, stopLimitTimeInForce is required. | [optional] | |**stopIcebergQty** | **Double** | | [optional] | |**stopLimitTimeInForce** | **StopLimitTimeInForce** | | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountNewOcoResponse.md b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountNewOcoResponse.md index dfbe8c9b8..9a320c04d 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountNewOcoResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountNewOcoResponse.md @@ -7,17 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderListId** | **Long** | | [optional] | -|**contingencyType** | **String** | | [optional] | -|**listStatusType** | **String** | | [optional] | -|**listOrderStatus** | **String** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | -|**transactionTime** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**marginBuyBorrowAmount** | **String** | | [optional] | -|**marginBuyBorrowAsset** | **String** | | [optional] | -|**orders** | [**List<MarginAccountNewOcoResponseOrdersInner>**](MarginAccountNewOcoResponseOrdersInner.md) | | [optional] | -|**orderReports** | [**List<MarginAccountNewOcoResponseOrderReportsInner>**](MarginAccountNewOcoResponseOrderReportsInner.md) | | [optional] | +|**orderListId** | **Long** | Order List ID. | [optional] | +|**contingencyType** | **String** | Contingency Type. | [optional] | +|**listStatusType** | **String** | List Status Type. | [optional] | +|**listOrderStatus** | **String** | List Order Status. | [optional] | +|**listClientOrderId** | **String** | List Client Order ID. | [optional] | +|**transactionTime** | **Long** | Transaction Time. | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**marginBuyBorrowAmount** | **String** | will not return if no margin trade happens | [optional] | +|**marginBuyBorrowAsset** | **String** | will not return if no margin trade happens | [optional] | +|**orders** | [**List<MarginAccountNewOcoResponseOrdersInner>**](MarginAccountNewOcoResponseOrdersInner.md) | Orders. | [optional] | +|**orderReports** | [**List<MarginAccountNewOcoResponseOrderReportsInner>**](MarginAccountNewOcoResponseOrderReportsInner.md) | Order Reports. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountNewOcoResponseOrderReportsInner.md b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountNewOcoResponseOrderReportsInner.md index 9a5235ade..03d66b462 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountNewOcoResponseOrderReportsInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountNewOcoResponseOrderReportsInner.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**transactTime** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**orderListId** | **Long** | Order List ID. | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**transactTime** | **Long** | Transact Time. | [optional] | +|**price** | **String** | Price. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**cummulativeQuoteQty** | **String** | Cummulative Quote Qty. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**side** | **String** | Side. | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountNewOcoResponseOrdersInner.md b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountNewOcoResponseOrdersInner.md index d8473708d..7dff41ce1 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountNewOcoResponseOrdersInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountNewOcoResponseOrdersInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountRepayDebtRequest.md b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountRepayDebtRequest.md index 1718e3da9..3135e54a3 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountRepayDebtRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountRepayDebtRequest.md @@ -8,9 +8,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**asset** | **String** | | | -|**amount** | **Double** | | [optional] | -|**specifyRepayAssets** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**amount** | **String** | | [optional] | +|**specifyRepayAssets** | **String** | Specific asset list to repay debt; Can be added in batch, separated by commas | [optional] | +|**recvWindow** | **Long** | The value cannot be greater than 60000 | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountRepayDebtResponse.md b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountRepayDebtResponse.md index ed43f9cca..6c511800b 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountRepayDebtResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountRepayDebtResponse.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amount** | **String** | | [optional] | -|**asset** | **String** | | [optional] | -|**specifyRepayAssets** | **List<String>** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**success** | **Boolean** | | [optional] | +|**amount** | **String** | Amount repaid | [optional] | +|**asset** | **String** | asset name | [optional] | +|**specifyRepayAssets** | **List<String>** | Specify Repay Assets. | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**success** | **Boolean** | Success. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountRepayRequest.md b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountRepayRequest.md index 11707615e..215740b60 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountRepayRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountRepayRequest.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**asset** | **String** | | | |**amount** | **Double** | | | -|**recvWindow** | **Long** | | [optional] | +|**recvWindow** | **Long** | The value cannot be greater than 60000 | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountRepayResponse.md b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountRepayResponse.md index 4b7611d92..4786cba28 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountRepayResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountRepayResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tranId** | **Long** | | [optional] | +|**tranId** | **Long** | Transaction ID. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountTradeListResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountTradeListResponseInner.md index d199d85ce..5800109f9 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/MarginAccountTradeListResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/MarginAccountTradeListResponseInner.md @@ -7,17 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**commission** | **String** | | [optional] | -|**commissionAsset** | **String** | | [optional] | -|**id** | **Long** | | [optional] | -|**isBestMatch** | **Boolean** | | [optional] | -|**isBuyer** | **Boolean** | | [optional] | -|**isMaker** | **Boolean** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**qty** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**time** | **Long** | | [optional] | +|**commission** | **String** | Commission. | [optional] | +|**commissionAsset** | **String** | Commission Asset. | [optional] | +|**id** | **Long** | ID. | [optional] | +|**isBestMatch** | **Boolean** | Is Best Match. | [optional] | +|**isBuyer** | **Boolean** | Is Buyer. | [optional] | +|**isMaker** | **Boolean** | Is Maker. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**price** | **String** | Price. | [optional] | +|**qty** | **String** | Qty. | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**time** | **Long** | Event time. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/MarginMaxBorrowResponse.md b/clients/derivatives-trading-portfolio-margin/docs/MarginMaxBorrowResponse.md index 9d092f6a1..87df346b4 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/MarginMaxBorrowResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/MarginMaxBorrowResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amount** | **String** | | [optional] | -|**borrowLimit** | **String** | | [optional] | +|**amount** | **String** | account's currently max borrowable amount with sufficient system availability | [optional] | +|**borrowLimit** | **String** | max borrowable amount limited by the account level | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/MarketDataApi.md b/clients/derivatives-trading-portfolio-margin/docs/MarketDataApi.md index cf5841faf..d7bfe8534 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/MarketDataApi.md +++ b/clients/derivatives-trading-portfolio-margin/docs/MarketDataApi.md @@ -13,7 +13,7 @@ All URIs are relative to *https://papi.binance.com* Test Connectivity -Test connectivity to the Rest API. Weight: 1 +Test connectivity to the Rest API. Weight(IP): 1 ### Example ```java diff --git a/clients/derivatives-trading-portfolio-margin/docs/ModifyCmOrderRequest.md b/clients/derivatives-trading-portfolio-margin/docs/ModifyCmOrderRequest.md index ad6b0704c..405491604 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ModifyCmOrderRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ModifyCmOrderRequest.md @@ -7,13 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | -|**symbol** | **String** | | | +|**orderId** | **Long** | Order ID | [optional] | +|**origClientOrderId** | **String** | Client order ID | [optional] | +|**symbol** | **String** | Symbol | | |**side** | **Side** | | | -|**quantity** | **Double** | | | -|**price** | **Double** | | | +|**quantity** | **Double** | Order quantity | | +|**price** | **Double** | Order price | | |**priceMatch** | **PriceMatch** | | [optional] | +|**modifyId** | **Long** | User-defined modification identifier, returned as-is in the response. Optional; not validated for uniqueness. | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/ModifyCmOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/ModifyCmOrderResponse.md index 42a0ede62..2b57783c2 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ModifyCmOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ModifyCmOrderResponse.md @@ -7,24 +7,25 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cumQty** | **String** | | [optional] | -|**cumBase** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**pair** | **String** | Pair. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**modifyId** | **Long** | user-defined modification identifier, only returned if provided in the request | [optional] | +|**price** | **String** | Price. | [optional] | +|**avgPrice** | **String** | Avg Price. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**cumQty** | **String** | Cum Qty. | [optional] | +|**cumBase** | **String** | Cum Base. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**origType** | **String** | Orig Type. | [optional] | +|**updateTime** | **Long** | last update time | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/ModifyUmOrderRequest.md b/clients/derivatives-trading-portfolio-margin/docs/ModifyUmOrderRequest.md index 65980469b..0dbe3465e 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ModifyUmOrderRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ModifyUmOrderRequest.md @@ -7,13 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | -|**symbol** | **String** | | | +|**orderId** | **Long** | Order ID | [optional] | +|**origClientOrderId** | **String** | Client order ID | [optional] | +|**symbol** | **String** | Symbol | | |**side** | **Side** | | | -|**quantity** | **Double** | | | -|**price** | **Double** | | | +|**quantity** | **Double** | Order quantity | | +|**price** | **Double** | Order price | | |**priceMatch** | **PriceMatch** | | [optional] | +|**modifyId** | **Long** | User-defined modification identifier, returned as-is in the response. Optional; not validated for uniqueness. | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/ModifyUmOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/ModifyUmOrderResponse.md index 3c5bf86cf..3562aec01 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ModifyUmOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ModifyUmOrderResponse.md @@ -7,26 +7,27 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cumQty** | **String** | | [optional] | -|**cumQuote** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**priceMatch** | **String** | | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**modifyId** | **Long** | user-defined modification identifier, only returned if provided in the request | [optional] | +|**price** | **String** | Price. | [optional] | +|**avgPrice** | **String** | Avg Price. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**cumQty** | **String** | Cum Qty. | [optional] | +|**cumQuote** | **String** | Cum Quote. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**origType** | **String** | Orig Type. | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auot cancel time for TIF GTD order | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**priceMatch** | **String** | Price Match. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/NewCmConditionalOrderRequest.md b/clients/derivatives-trading-portfolio-margin/docs/NewCmConditionalOrderRequest.md index 4866ff342..b5103aae3 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/NewCmConditionalOrderRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/NewCmConditionalOrderRequest.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | +|**symbol** | **String** | Symbol | | |**side** | **Side** | | | |**positionSide** | **PositionSide** | | [optional] | |**strategyType** | **StrategyType** | | | |**timeInForce** | **TimeInForce** | | [optional] | |**quantity** | **Double** | | [optional] | -|**reduceOnly** | **String** | | [optional] | +|**reduceOnly** | **String** | \"true\" or \"false\". default \"false\". Cannot be sent in Hedge Mode | [optional] | |**price** | **Double** | | [optional] | |**workingType** | **WorkingType** | | [optional] | -|**priceProtect** | **String** | | [optional] | -|**newClientStrategyId** | **String** | | [optional] | -|**stopPrice** | **Double** | | [optional] | -|**activationPrice** | **Double** | | [optional] | -|**callbackRate** | **Double** | | [optional] | +|**priceProtect** | **PriceProtect** | | [optional] | +|**newClientStrategyId** | **String** | A unique id among open orders. Automatically generated if not sent. Can only be string following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,36}$` | [optional] | +|**stopPrice** | **Double** | Used with `STOP/STOP_MARKET` or `TAKE_PROFIT/TAKE_PROFIT_MARKET` orders. | [optional] | +|**activationPrice** | **Double** | Used with `TRAILING_STOP_MARKET` orders. | [optional] | +|**callbackRate** | **Double** | Used with `TRAILING_STOP_MARKET` orders. | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/NewCmConditionalOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/NewCmConditionalOrderResponse.md index 45527054e..75035b0b6 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/NewCmConditionalOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/NewCmConditionalOrderResponse.md @@ -7,25 +7,25 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**newClientStrategyId** | **String** | | [optional] | -|**strategyId** | **Long** | | [optional] | -|**strategyStatus** | **String** | | [optional] | -|**strategyType** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**bookTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | +|**newClientStrategyId** | **String** | New Client Strategy ID. | [optional] | +|**strategyId** | **Long** | Strategy ID. | [optional] | +|**strategyStatus** | **String** | Strategy Status. | [optional] | +|**strategyType** | **String** | Strategy Type. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**pair** | **String** | Pair. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**bookTime** | **Long** | order place time | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**workingType** | **String** | Working Type. | [optional] | +|**priceProtect** | **Boolean** | Price Protect. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/NewCmOrderRequest.md b/clients/derivatives-trading-portfolio-margin/docs/NewCmOrderRequest.md index c65b46edf..5a91b1e7f 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/NewCmOrderRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/NewCmOrderRequest.md @@ -7,16 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | +|**symbol** | **String** | Symbol | | |**side** | **Side** | | | |**positionSide** | **PositionSide** | | [optional] | -|**type** | **Type** | | | +|**type** | **OrderType** | | | |**timeInForce** | **TimeInForce** | | [optional] | -|**quantity** | **Double** | | [optional] | -|**reduceOnly** | **String** | | [optional] | -|**price** | **Double** | | [optional] | +|**quantity** | **Double** | Place amount | [optional] | +|**reduceOnly** | **ReduceOnly** | | [optional] | +|**price** | **Double** | Order price | [optional] | |**priceMatch** | **PriceMatch** | | [optional] | -|**newClientOrderId** | **String** | | [optional] | +|**newClientOrderId** | **String** | A unique id among open orders. Automatically generated if not sent. Can only be string following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,32}$` | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/NewCmOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/NewCmOrderResponse.md index 0238ae36a..cb15d469d 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/NewCmOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/NewCmOrderResponse.md @@ -7,23 +7,21 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**clientOrderId** | **String** | | [optional] | -|**cumQty** | **String** | | [optional] | -|**cumBase** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**cumQty** | **String** | Cum Qty. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**pair** | **String** | Pair. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**updateTime** | **Long** | last update time | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/NewMarginOrderRequest.md b/clients/derivatives-trading-portfolio-margin/docs/NewMarginOrderRequest.md index d72062ac9..d433e0769 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/NewMarginOrderRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/NewMarginOrderRequest.md @@ -9,19 +9,19 @@ |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | |**side** | **Side** | | | -|**type** | **Type** | | | +|**type** | **OrderType** | | | |**quantity** | **Double** | | [optional] | |**quoteOrderQty** | **Double** | | [optional] | |**price** | **Double** | | [optional] | -|**stopPrice** | **Double** | | [optional] | -|**newClientOrderId** | **String** | | [optional] | +|**stopPrice** | **Double** | Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and `TAKE_PROFIT_LIMIT` orders. | [optional] | +|**newClientOrderId** | **String** | A unique id among open orders. Automatically generated if not sent. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | -|**icebergQty** | **Double** | | [optional] | +|**icebergQty** | **Double** | Used with `LIMIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` to create an iceberg order | [optional] | |**sideEffectType** | **SideEffectType** | | [optional] | |**timeInForce** | **TimeInForce** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | -|**autoRepayAtCancel** | **Boolean** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**autoRepayAtCancel** | **Boolean** | Only when MARGIN_BUY or AUTO_BORROW_REPAY order takes effect, true means that the debt generated by the order needs to be repaid after the order is cancelled. | [optional] | +|**recvWindow** | **Long** | The value cannot be greater than `60000` | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/NewMarginOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/NewMarginOrderResponse.md index 348344535..16ff87ee2 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/NewMarginOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/NewMarginOrderResponse.md @@ -7,21 +7,21 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**transactTime** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**marginBuyBorrowAmount** | **String** | | [optional] | -|**marginBuyBorrowAsset** | **String** | | [optional] | -|**fills** | [**List<NewMarginOrderResponseFillsInner>**](NewMarginOrderResponseFillsInner.md) | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**transactTime** | **Long** | Transact Time. | [optional] | +|**price** | **String** | Price. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**cummulativeQuoteQty** | **String** | Cummulative Quote Qty. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**side** | **String** | Side. | [optional] | +|**marginBuyBorrowAmount** | **String** | will not return if no margin trade happens | [optional] | +|**marginBuyBorrowAsset** | **String** | will not return if no margin trade happens | [optional] | +|**fills** | [**List<NewMarginOrderResponseFillsInner>**](NewMarginOrderResponseFillsInner.md) | Fills. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/NewMarginOrderResponseFillsInner.md b/clients/derivatives-trading-portfolio-margin/docs/NewMarginOrderResponseFillsInner.md index bc657081b..ea315c3b7 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/NewMarginOrderResponseFillsInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/NewMarginOrderResponseFillsInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**price** | **String** | | [optional] | -|**qty** | **String** | | [optional] | -|**commission** | **String** | | [optional] | -|**commissionAsset** | **String** | | [optional] | +|**price** | **String** | Price. | [optional] | +|**qty** | **String** | Qty. | [optional] | +|**commission** | **String** | Commission. | [optional] | +|**commissionAsset** | **String** | Commission Asset. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/NewUmAlgoOrderRequest.md b/clients/derivatives-trading-portfolio-margin/docs/NewUmAlgoOrderRequest.md index 390b9669c..b1b3f13ea 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/NewUmAlgoOrderRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/NewUmAlgoOrderRequest.md @@ -7,26 +7,25 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**algoType** | **String** | | | +|**algoType** | **AlgoType** | | | |**symbol** | **String** | | | |**side** | **Side** | | | |**positionSide** | **PositionSide** | | [optional] | -|**type** | **Type** | | | +|**type** | **OrderType** | | | |**timeInForce** | **TimeInForce** | | [optional] | -|**quantity** | **Double** | | [optional] | -|**price** | **Double** | | [optional] | -|**triggerPrice** | **Double** | | [optional] | +|**quantity** | **Double** | Order quantity | | +|**price** | **Double** | Order price | [optional] | +|**triggerPrice** | **Double** | Trigger price | [optional] | |**workingType** | **WorkingType** | | [optional] | |**priceMatch** | **PriceMatch** | | [optional] | -|**closePosition** | **String** | | [optional] | -|**priceProtect** | **String** | | [optional] | -|**reduceOnly** | **String** | | [optional] | -|**activatePrice** | **Double** | | [optional] | -|**callbackRate** | **Double** | | [optional] | -|**clientAlgoId** | **String** | | [optional] | +|**priceProtect** | **PriceProtect** | | [optional] | +|**reduceOnly** | **ReduceOnly** | | [optional] | +|**activatePrice** | **Double** | Used with `TRAILING_STOP_MARKET`, default as latest price | [optional] | +|**callbackRate** | **Double** | Used with `TRAILING_STOP_MARKET`, min 0.1, max 10 (1 = 1%) | [optional] | +|**clientAlgoId** | **String** | Unique id among open orders. Auto-generated if not sent | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | +|**goodTillDate** | **Long** | Order cancel time for `GTD` timeInForce, mandatory when timeInForce is `GTD` | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/NewUmAlgoOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/NewUmAlgoOrderResponse.md index 6f62a5d8d..6ffa3a18d 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/NewUmAlgoOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/NewUmAlgoOrderResponse.md @@ -19,11 +19,9 @@ |**algoStatus** | **String** | | [optional] | |**triggerPrice** | **String** | | [optional] | |**price** | **String** | | [optional] | -|**icebergQuantity** | **String** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | |**workingType** | **String** | | [optional] | |**priceMatch** | **String** | | [optional] | -|**closePosition** | **Boolean** | | [optional] | |**priceProtect** | **Boolean** | | [optional] | |**reduceOnly** | **Boolean** | | [optional] | |**activatePrice** | **String** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/NewUmConditionalOrderRequest.md b/clients/derivatives-trading-portfolio-margin/docs/NewUmConditionalOrderRequest.md index 8160fb841..bddb5e250 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/NewUmConditionalOrderRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/NewUmConditionalOrderRequest.md @@ -7,23 +7,23 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | +|**symbol** | **String** | Symbol | | |**side** | **Side** | | | |**positionSide** | **PositionSide** | | [optional] | |**strategyType** | **StrategyType** | | | |**timeInForce** | **TimeInForce** | | [optional] | |**quantity** | **Double** | | [optional] | -|**reduceOnly** | **String** | | [optional] | +|**reduceOnly** | **ReduceOnly** | | [optional] | |**price** | **Double** | | [optional] | |**workingType** | **WorkingType** | | [optional] | -|**priceProtect** | **String** | | [optional] | -|**newClientStrategyId** | **String** | | [optional] | -|**stopPrice** | **Double** | | [optional] | -|**activationPrice** | **Double** | | [optional] | -|**callbackRate** | **Double** | | [optional] | +|**priceProtect** | **PriceProtect** | | [optional] | +|**newClientStrategyId** | **String** | A unique id among open orders. Automatically generated if not sent. Can only be string following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,32}$` | [optional] | +|**stopPrice** | **Double** | Used with `STOP/STOP_MARKET` or `TAKE_PROFIT/TAKE_PROFIT_MARKET` orders. | [optional] | +|**activationPrice** | **Double** | Used with `TRAILING_STOP_MARKET` orders. | [optional] | +|**callbackRate** | **Double** | Used with `TRAILING_STOP_MARKET` orders. | [optional] | |**priceMatch** | **PriceMatch** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | +|**goodTillDate** | **Long** | order cancel time for timeInForce `GTD`, mandatory when `timeInforce` set to `GTD`; order the timestamp only retains second-level precision, ms part will be ignored; The goodTillDate timestamp must be greater than the current time plus 600 seconds and smaller than 253402300799000Mode. It must be sent in Hedge Mode. | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/NewUmConditionalOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/NewUmConditionalOrderResponse.md index 08203446c..aa93a2f52 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/NewUmConditionalOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/NewUmConditionalOrderResponse.md @@ -7,27 +7,27 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**newClientStrategyId** | **String** | | [optional] | -|**strategyId** | **Long** | | [optional] | -|**strategyStatus** | **String** | | [optional] | -|**strategyType** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**bookTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | -|**priceMatch** | **String** | | [optional] | +|**newClientStrategyId** | **String** | New Client Strategy ID. | [optional] | +|**strategyId** | **Long** | Strategy ID. | [optional] | +|**strategyStatus** | **String** | Strategy Status. | [optional] | +|**strategyType** | **String** | Strategy Type. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**bookTime** | **Long** | order place time | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**workingType** | **String** | Working Type. | [optional] | +|**priceProtect** | **Boolean** | Price Protect. | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auot cancel time for TIF GTD order | [optional] | +|**priceMatch** | **String** | Price Match. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/NewUmOrderRequest.md b/clients/derivatives-trading-portfolio-margin/docs/NewUmOrderRequest.md index 8cad74eff..a19d32ab1 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/NewUmOrderRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/NewUmOrderRequest.md @@ -7,19 +7,19 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | +|**symbol** | **String** | Symbol | | |**side** | **Side** | | | |**positionSide** | **PositionSide** | | [optional] | -|**type** | **Type** | | | +|**type** | **OrderType** | | | |**timeInForce** | **TimeInForce** | | [optional] | -|**quantity** | **Double** | | [optional] | -|**reduceOnly** | **String** | | [optional] | -|**price** | **Double** | | [optional] | -|**newClientOrderId** | **String** | | [optional] | +|**quantity** | **Double** | Place amount | [optional] | +|**reduceOnly** | **ReduceOnly** | | [optional] | +|**price** | **Double** | Order price | [optional] | +|**newClientOrderId** | **String** | A unique id among open orders. Automatically generated if not sent. Can only be string following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,32}$` | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**priceMatch** | **PriceMatch** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | +|**goodTillDate** | **Long** | order cancel time for timeInForce `GTD`, mandatory when `timeInforce` set to `GTD`; order the timestamp only retains second-level precision, ms part will be ignored; The goodTillDate timestamp must be greater than the current time plus 600 seconds and smaller than 253402300799000Mode. It must be sent in Hedge Mode. | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/NewUmOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/NewUmOrderResponse.md index 7a2a3d1fc..a41b76be6 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/NewUmOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/NewUmOrderResponse.md @@ -7,25 +7,23 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**clientOrderId** | **String** | | [optional] | -|**cumQty** | **String** | | [optional] | -|**cumQuote** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**priceMatch** | **String** | | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**cumQty** | **String** | Cum Qty. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auot cancel time for TIF GTD order | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**priceMatch** | **String** | Price Match. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/Openorderloss.md b/clients/derivatives-trading-portfolio-margin/docs/Openorderloss.md index 91268a07b..a7c27ce6f 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/Openorderloss.md +++ b/clients/derivatives-trading-portfolio-margin/docs/Openorderloss.md @@ -1,14 +1,14 @@ -# Openorderloss +# OpenOrderLoss ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**O** | [**List<OpenorderlossOInner>**](OpenorderlossOInner.md) | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**O** | [**List<OpenOrderLossOInner>**](OpenOrderLossOInner.md) | Update Data | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/OpenorderlossOInner.md b/clients/derivatives-trading-portfolio-margin/docs/OpenorderlossOInner.md index 7830b333f..b228de968 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/OpenorderlossOInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/OpenorderlossOInner.md @@ -1,14 +1,14 @@ -# OpenorderlossOInner +# OpenOrderLossOInner ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**aLowerCase** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | +|**aLowerCase** | **String** | Asset | [optional] | +|**oLowerCase** | **String** | Amount | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/OrderTradeUpdate.md b/clients/derivatives-trading-portfolio-margin/docs/OrderTradeUpdate.md index 3a8e12776..bad9e738a 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/OrderTradeUpdate.md +++ b/clients/derivatives-trading-portfolio-margin/docs/OrderTradeUpdate.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**fs** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**iLowerCase** | **String** | | [optional] | +|**fs** | **String** | Event business unit. 'UM' for USDS-M futures and 'CM' for COIN-M futures | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction Time | [optional] | +|**iLowerCase** | **String** | Account Alias, ignore for UM | [optional] | |**oLowerCase** | [**OrderTradeUpdateO**](OrderTradeUpdateO.md) | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/OrderTradeUpdateO.md b/clients/derivatives-trading-portfolio-margin/docs/OrderTradeUpdateO.md index 2bcbabea3..cacb2111b 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/OrderTradeUpdateO.md +++ b/clients/derivatives-trading-portfolio-margin/docs/OrderTradeUpdateO.md @@ -7,35 +7,36 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**S** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**ap** | **String** | | [optional] | -|**sp** | **String** | | [optional] | -|**xLowerCase** | **String** | | [optional] | -|**X** | **String** | | [optional] | -|**iLowerCase** | **Long** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**zLowerCase** | **String** | | [optional] | -|**L** | **String** | | [optional] | -|**N** | **String** | | [optional] | -|**nLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | -|**tLowerCase** | **Long** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | -|**R** | **Boolean** | | [optional] | -|**ps** | **String** | | [optional] | -|**rp** | **String** | | [optional] | -|**st** | **String** | | [optional] | -|**si** | **Long** | | [optional] | -|**V** | **String** | | [optional] | -|**gtd** | **Long** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**cLowerCase** | **String** | Client Order Id | [optional] | +|**S** | **String** | Side | [optional] | +|**oLowerCase** | **String** | Order Type | [optional] | +|**fLowerCase** | **String** | Time in Force | [optional] | +|**qLowerCase** | **String** | Original Quantity | [optional] | +|**pLowerCase** | **String** | Original Price | [optional] | +|**ap** | **String** | Average Price | [optional] | +|**sp** | **String** | Ignore | [optional] | +|**xLowerCase** | **String** | Execution Type | [optional] | +|**X** | **String** | Order Status | [optional] | +|**iLowerCase** | **Long** | Order Id | [optional] | +|**M** | **String** | modifyId, only pushed for AMENDMENT (order modification) events when a modifyId was provided in the request | [optional] | +|**lLowerCase** | **String** | Order Last Filled Quantity | [optional] | +|**zLowerCase** | **String** | Order Filled Accumulated Quantity | [optional] | +|**L** | **String** | Last Filled Price | [optional] | +|**N** | **String** | Commission Asset, will not push if no commission | [optional] | +|**nLowerCase** | **String** | Commission, will not push if no commission | [optional] | +|**T** | **Long** | Order Trade Time | [optional] | +|**tLowerCase** | **Long** | Trade Id | [optional] | +|**bLowerCase** | **String** | Bids Notional | [optional] | +|**aLowerCase** | **String** | Ask Notional | [optional] | +|**mLowerCase** | **Boolean** | Is this trade the maker side? | [optional] | +|**R** | **Boolean** | Is this reduce only | [optional] | +|**ps** | **String** | Position Side | [optional] | +|**rp** | **String** | Realized Profit of the trade | [optional] | +|**st** | **String** | Strategy type, only pushed with conditional order triggered | [optional] | +|**si** | **Long** | StrategyId, only pushed with conditional order triggered | [optional] | +|**V** | **String** | STP mode | [optional] | +|**gtd** | **Long** | TIF GTD order auto cancel time | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/OrderType.md b/clients/derivatives-trading-portfolio-margin/docs/OrderType.md new file mode 100644 index 000000000..25148e66f --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/docs/OrderType.md @@ -0,0 +1,19 @@ + + +# OrderType + +## Enum + + +* `STOP` (value: `"STOP"`) + +* `TAKE_PROFIT` (value: `"TAKE_PROFIT"`) + +* `STOP_MARKET` (value: `"STOP_MARKET"`) + +* `TAKE_PROFIT_MARKET` (value: `"TAKE_PROFIT_MARKET"`) + +* `TRAILING_STOP_MARKET` (value: `"TRAILING_STOP_MARKET"`) + + + diff --git a/clients/derivatives-trading-portfolio-margin/docs/Outboundaccountposition.md b/clients/derivatives-trading-portfolio-margin/docs/Outboundaccountposition.md index 7faca90fa..8975fd69b 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/Outboundaccountposition.md +++ b/clients/derivatives-trading-portfolio-margin/docs/Outboundaccountposition.md @@ -1,16 +1,16 @@ -# Outboundaccountposition +# OutboundAccountPosition ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**U** | **Long** | | [optional] | -|**B** | [**List<OutboundaccountpositionBInner>**](OutboundaccountpositionBInner.md) | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**uLowerCase** | **Long** | Time of last account update | [optional] | +|**U** | **Long** | Time updateID | [optional] | +|**B** | [**List<OutboundAccountPositionBInner>**](OutboundAccountPositionBInner.md) | Balances Array | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/OutboundaccountpositionBInner.md b/clients/derivatives-trading-portfolio-margin/docs/OutboundaccountpositionBInner.md index 3b50c0156..da7839b0d 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/OutboundaccountpositionBInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/OutboundaccountpositionBInner.md @@ -1,15 +1,15 @@ -# OutboundaccountpositionBInner +# OutboundAccountPositionBInner ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**aLowerCase** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | +|**aLowerCase** | **String** | Asset | [optional] | +|**fLowerCase** | **String** | Free | [optional] | +|**lLowerCase** | **String** | Locked | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse.md b/clients/derivatives-trading-portfolio-margin/docs/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse.md index bd742eabe..189e51aa3 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**indicators** | [**PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators**](PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators.md) | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**updateTime** | **Long** | last update time | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators.md b/clients/derivatives-trading-portfolio-margin/docs/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators.md index 1b3400332..3e9f80325 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators.md +++ b/clients/derivatives-trading-portfolio-margin/docs/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators.md @@ -2,13 +2,14 @@ # PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators +Indicators. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**BTCUSDT** | [**List<PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner>**](PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.md) | | [optional] | -|**ACCOUNT** | [**List<PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner>**](PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.md) | | [optional] | +|**BTCUSDT** | [**List<PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner>**](PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.md) | BTCUSDT. | [optional] | +|**ACCOUNT** | [**List<PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner>**](PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.md) | ACCOUNT. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.md b/clients/derivatives-trading-portfolio-margin/docs/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.md index c9b0ac005..b696da978 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**indicator** | **String** | | [optional] | -|**value** | **Long** | | [optional] | -|**triggerValue** | **Long** | | [optional] | -|**plannedRecoverTime** | **Long** | | [optional] | -|**isLocked** | **Boolean** | | [optional] | +|**indicator** | **String** | Indicator. | [optional] | +|**value** | **Long** | Value. | [optional] | +|**triggerValue** | **Long** | Trigger Value. | [optional] | +|**plannedRecoverTime** | **Long** | Planned Recover Time. | [optional] | +|**isLocked** | **Boolean** | Is Locked. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.md b/clients/derivatives-trading-portfolio-margin/docs/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.md index 4d836e5c8..2b4fa2111 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**isLocked** | **Boolean** | | [optional] | -|**plannedRecoverTime** | **Long** | | [optional] | -|**indicator** | **String** | | [optional] | -|**value** | **Double** | | [optional] | -|**triggerValue** | **Double** | | [optional] | +|**isLocked** | **Boolean** | Is Locked. | [optional] | +|**plannedRecoverTime** | **Long** | Planned Recover Time. | [optional] | +|**indicator** | **String** | Indicator. | [optional] | +|**value** | **Double** | Value. | [optional] | +|**triggerValue** | **Double** | Trigger Value. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/PriceMatch.md b/clients/derivatives-trading-portfolio-margin/docs/PriceMatch.md index 1801e3c02..214d8c098 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/PriceMatch.md +++ b/clients/derivatives-trading-portfolio-margin/docs/PriceMatch.md @@ -5,8 +5,6 @@ ## Enum -* `NONE` (value: `"NONE"`) - * `OPPONENT` (value: `"OPPONENT"`) * `OPPONENT_5` (value: `"OPPONENT_5"`) diff --git a/clients/derivatives-trading-portfolio-margin/docs/PriceProtect.md b/clients/derivatives-trading-portfolio-margin/docs/PriceProtect.md new file mode 100644 index 000000000..a4c3ac525 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/docs/PriceProtect.md @@ -0,0 +1,13 @@ + + +# PriceProtect + +## Enum + + +* `TRUE` (value: `"true"`) + +* `FALSE` (value: `"false"`) + + + diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryAllCmConditionalOrdersResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryAllCmConditionalOrdersResponseInner.md index dfdfb2287..358294b26 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryAllCmConditionalOrdersResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryAllCmConditionalOrdersResponseInner.md @@ -7,26 +7,26 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**newClientStrategyId** | **String** | | [optional] | -|**strategyId** | **Long** | | [optional] | -|**strategyStatus** | **String** | | [optional] | -|**strategyType** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**status** | **String** | | [optional] | -|**bookTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**triggerTime** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | +|**newClientStrategyId** | **String** | New Client Strategy ID. | [optional] | +|**strategyId** | **Long** | Strategy ID. | [optional] | +|**strategyStatus** | **String** | Strategy Status. | [optional] | +|**strategyType** | **String** | Strategy Type. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**status** | **String** | Normal order status after trigger if appliable, only have when the strategy is triggered | [optional] | +|**bookTime** | **Long** | order time | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**triggerTime** | **Long** | Trigger Time. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryAllCmOrdersResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryAllCmOrdersResponseInner.md index 79ebc83a9..7ae629f4c 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryAllCmOrdersResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryAllCmOrdersResponseInner.md @@ -7,24 +7,24 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgPrice** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**cumBase** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**avgPrice** | **String** | Avg Price. | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**cumBase** | **String** | Cum Base. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**origType** | **String** | Orig Type. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**pair** | **String** | Pair. | [optional] | +|**time** | **Long** | order time | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**updateTime** | **Long** | update time | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryAllCurrentCmOpenConditionalOrdersResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryAllCurrentCmOpenConditionalOrdersResponseInner.md index 0b9fd2965..0da151f59 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryAllCurrentCmOpenConditionalOrdersResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryAllCurrentCmOpenConditionalOrdersResponseInner.md @@ -7,22 +7,22 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**newClientStrategyId** | **String** | | [optional] | -|**strategyId** | **Long** | | [optional] | -|**strategyStatus** | **String** | | [optional] | -|**strategyType** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**bookTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | +|**newClientStrategyId** | **String** | New Client Strategy ID. | [optional] | +|**strategyId** | **Long** | Strategy ID. | [optional] | +|**strategyStatus** | **String** | Strategy Status. | [optional] | +|**strategyType** | **String** | Strategy Type. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**bookTime** | **Long** | order time | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryAllCurrentUmOpenAlgoOrdersResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryAllCurrentUmOpenAlgoOrdersResponseInner.md index 4e0ce07fb..868fb4295 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryAllCurrentUmOpenAlgoOrdersResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryAllCurrentUmOpenAlgoOrdersResponseInner.md @@ -17,16 +17,8 @@ |**timeInForce** | **String** | | [optional] | |**quantity** | **String** | | [optional] | |**algoStatus** | **String** | | [optional] | -|**actualOrderId** | **String** | | [optional] | -|**actualPrice** | **String** | | [optional] | |**triggerPrice** | **String** | | [optional] | |**price** | **String** | | [optional] | -|**icebergQuantity** | **String** | | [optional] | -|**tpTriggerPrice** | **String** | | [optional] | -|**tpPrice** | **String** | | [optional] | -|**slTriggerPrice** | **String** | | [optional] | -|**slPrice** | **String** | | [optional] | -|**tpOrderType** | **String** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | |**workingType** | **String** | | [optional] | |**priceMatch** | **String** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryAllCurrentUmOpenConditionalOrdersResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryAllCurrentUmOpenConditionalOrdersResponseInner.md index c1accd50a..a9306d1a5 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryAllCurrentUmOpenConditionalOrdersResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryAllCurrentUmOpenConditionalOrdersResponseInner.md @@ -7,25 +7,25 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**newClientStrategyId** | **String** | | [optional] | -|**strategyId** | **Long** | | [optional] | -|**strategyStatus** | **String** | | [optional] | -|**strategyType** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**bookTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | -|**priceMatch** | **String** | | [optional] | +|**newClientStrategyId** | **String** | New Client Strategy ID. | [optional] | +|**strategyId** | **Long** | Strategy ID. | [optional] | +|**strategyStatus** | **String** | Strategy Status. | [optional] | +|**strategyType** | **String** | Strategy Type. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**bookTime** | **Long** | order time | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auot cancel time for TIF GTD order | [optional] | +|**priceMatch** | **String** | Price Match. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryAllCurrentUmOpenOrdersResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryAllCurrentUmOpenOrdersResponseInner.md index 3b1678cb3..b1b597007 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryAllCurrentUmOpenOrdersResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryAllCurrentUmOpenOrdersResponseInner.md @@ -7,26 +7,26 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgPrice** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**cumQuote** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | -|**priceMatch** | **String** | | [optional] | +|**avgPrice** | **String** | Avg Price. | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**cumQuote** | **String** | Cum Quote. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**origType** | **String** | Orig Type. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**time** | **Long** | order time | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**updateTime** | **Long** | update time | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auot cancel time for TIF GTD order | [optional] | +|**priceMatch** | **String** | Price Match. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryAllMarginAccountOrdersResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryAllMarginAccountOrdersResponseInner.md index 27eb9e4bb..893f7f6d5 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryAllMarginAccountOrdersResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryAllMarginAccountOrdersResponseInner.md @@ -7,26 +7,26 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**clientOrderId** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**icebergQty** | **String** | | [optional] | -|**isWorking** | **Boolean** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**accountId** | **Long** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**preventedMatchId** | **String** | | [optional] | -|**preventedQuantity** | **String** | | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**cummulativeQuoteQty** | **String** | Cummulative Quote Qty. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**icebergQty** | **String** | Iceberg Qty. | [optional] | +|**isWorking** | **Boolean** | Is Working. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**side** | **String** | Side. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**time** | **Long** | Event time. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**accountId** | **Long** | Account ID. | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**preventedMatchId** | **String** | Prevented Match ID. | [optional] | +|**preventedQuantity** | **String** | Prevented Quantity. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryAllUmConditionalOrdersResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryAllUmConditionalOrdersResponseInner.md index a46460c3f..62f897d3f 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryAllUmConditionalOrdersResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryAllUmConditionalOrdersResponseInner.md @@ -7,29 +7,29 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**newClientStrategyId** | **String** | | [optional] | -|**strategyId** | **Long** | | [optional] | -|**strategyStatus** | **String** | | [optional] | -|**strategyType** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**status** | **String** | | [optional] | -|**bookTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**triggerTime** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | -|**priceMatch** | **String** | | [optional] | +|**newClientStrategyId** | **String** | New Client Strategy ID. | [optional] | +|**strategyId** | **Long** | Strategy ID. | [optional] | +|**strategyStatus** | **String** | Strategy Status. | [optional] | +|**strategyType** | **String** | Strategy Type. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**status** | **String** | Normal order status after trigger if appliable, only have when the strategy is triggered | [optional] | +|**bookTime** | **Long** | order time | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**triggerTime** | **Long** | Trigger Time. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auot cancel time for TIF GTD order | [optional] | +|**priceMatch** | **String** | Price Match. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryCmConditionalOrderHistoryResponse.md b/clients/derivatives-trading-portfolio-margin/docs/QueryCmConditionalOrderHistoryResponse.md index 2c06f026d..638a24e87 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryCmConditionalOrderHistoryResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryCmConditionalOrderHistoryResponse.md @@ -7,29 +7,29 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**newClientStrategyId** | **String** | | [optional] | -|**strategyId** | **Long** | | [optional] | -|**strategyStatus** | **String** | | [optional] | -|**strategyType** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**status** | **String** | | [optional] | -|**bookTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**triggerTime** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**priceMatch** | **String** | | [optional] | +|**newClientStrategyId** | **String** | New Client Strategy ID. | [optional] | +|**strategyId** | **Long** | Strategy ID. | [optional] | +|**strategyStatus** | **String** | Strategy Status. | [optional] | +|**strategyType** | **String** | Strategy Type. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable,only have when the strategy is triggered | [optional] | +|**status** | **String** | Normal order status after trigger if appliable, only have when the strategy is triggered | [optional] | +|**bookTime** | **Long** | order time | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**triggerTime** | **Long** | Trigger Time. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**workingType** | **String** | Working Type. | [optional] | +|**priceProtect** | **Boolean** | Price Protect. | [optional] | +|**priceMatch** | **String** | Price Match. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryCmModifyOrderHistoryResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryCmModifyOrderHistoryResponseInner.md index 48ddd461f..4b5f59690 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryCmModifyOrderHistoryResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryCmModifyOrderHistoryResponseInner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amendmentId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**time** | **Long** | | [optional] | +|**amendmentId** | **Long** | Order modification ID | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**pair** | **String** | Pair. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**time** | **Long** | Order modification time | [optional] | |**amendment** | [**QueryCmModifyOrderHistoryResponseInnerAmendment**](QueryCmModifyOrderHistoryResponseInnerAmendment.md) | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryCmModifyOrderHistoryResponseInnerAmendment.md b/clients/derivatives-trading-portfolio-margin/docs/QueryCmModifyOrderHistoryResponseInnerAmendment.md index 235491173..f8b7fe938 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryCmModifyOrderHistoryResponseInnerAmendment.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryCmModifyOrderHistoryResponseInnerAmendment.md @@ -2,6 +2,7 @@ # QueryCmModifyOrderHistoryResponseInnerAmendment +Amendment. ## Properties @@ -9,7 +10,8 @@ |------------ | ------------- | ------------- | -------------| |**price** | [**QueryCmModifyOrderHistoryResponseInnerAmendmentPrice**](QueryCmModifyOrderHistoryResponseInnerAmendmentPrice.md) | | [optional] | |**origQty** | [**QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty**](QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty.md) | | [optional] | -|**count** | **Long** | | [optional] | +|**count** | **Long** | Order modification count, representing the number of times the order has been modified | [optional] | +|**modifyId** | **Long** | user-defined modification identifier, only returned if provided in the request | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty.md b/clients/derivatives-trading-portfolio-margin/docs/QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty.md index 43aee8b05..008336871 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty.md @@ -2,13 +2,14 @@ # QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty +Orig Qty. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**before** | **String** | | [optional] | -|**after** | **String** | | [optional] | +|**before** | **String** | Before. | [optional] | +|**after** | **String** | After. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryCmModifyOrderHistoryResponseInnerAmendmentPrice.md b/clients/derivatives-trading-portfolio-margin/docs/QueryCmModifyOrderHistoryResponseInnerAmendmentPrice.md index be7693f59..46f1a6406 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryCmModifyOrderHistoryResponseInnerAmendmentPrice.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryCmModifyOrderHistoryResponseInnerAmendmentPrice.md @@ -2,13 +2,14 @@ # QueryCmModifyOrderHistoryResponseInnerAmendmentPrice +Price. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**before** | **String** | | [optional] | -|**after** | **String** | | [optional] | +|**before** | **String** | Before. | [optional] | +|**after** | **String** | After. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryCmOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/QueryCmOrderResponse.md index cb8e18949..c64370924 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryCmOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryCmOrderResponse.md @@ -7,24 +7,24 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgPrice** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**cumBase** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**avgPrice** | **String** | Avg Price. | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**cumBase** | **String** | Cum Base. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**origType** | **String** | Orig Type. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**pair** | **String** | Pair. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**time** | **Long** | order time | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**updateTime** | **Long** | update time | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryCmPositionInformationResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryCmPositionInformationResponseInner.md index fbcf3e467..9890a4498 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryCmPositionInformationResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryCmPositionInformationResponseInner.md @@ -7,17 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**positionAmt** | **String** | | [optional] | -|**entryPrice** | **String** | | [optional] | -|**markPrice** | **String** | | [optional] | -|**unRealizedProfit** | **String** | | [optional] | -|**liquidationPrice** | **String** | | [optional] | -|**leverage** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**maxQty** | **String** | | [optional] | -|**notionalValue** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**positionAmt** | **String** | position amount | [optional] | +|**entryPrice** | **String** | average entry price | [optional] | +|**markPrice** | **String** | Mark Price. | [optional] | +|**unRealizedProfit** | **String** | Un Realized Profit. | [optional] | +|**liquidationPrice** | **String** | Liquidation Price. | [optional] | +|**leverage** | **String** | current initial leverage | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**maxQty** | **String** | maximum quantity of base asset | [optional] | +|**notionalValue** | **String** | Notional Value. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentCmOpenConditionalOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentCmOpenConditionalOrderResponse.md index 90212a32b..60fbdcfe3 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentCmOpenConditionalOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentCmOpenConditionalOrderResponse.md @@ -7,22 +7,22 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**newClientStrategyId** | **String** | | [optional] | -|**strategyId** | **Long** | | [optional] | -|**strategyStatus** | **String** | | [optional] | -|**strategyType** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**bookTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | +|**newClientStrategyId** | **String** | New Client Strategy ID. | [optional] | +|**strategyId** | **Long** | Strategy ID. | [optional] | +|**strategyStatus** | **String** | Strategy Status. | [optional] | +|**strategyType** | **String** | Strategy Type. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**bookTime** | **Long** | order time | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentMarginOpenOrderResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentMarginOpenOrderResponseInner.md index 8d2619f71..1ff5c8d05 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentMarginOpenOrderResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentMarginOpenOrderResponseInner.md @@ -7,26 +7,26 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**clientOrderId** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**icebergQty** | **String** | | [optional] | -|**isWorking** | **Boolean** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**accountId** | **Long** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**preventedMatchId** | **String** | | [optional] | -|**preventedQuantity** | **String** | | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**cummulativeQuoteQty** | **String** | Cummulative Quote Qty. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**icebergQty** | **String** | Iceberg Qty. | [optional] | +|**isWorking** | **Boolean** | Is Working. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**side** | **String** | Side. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**time** | **Long** | Event time. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**accountId** | **Long** | Account ID. | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**preventedMatchId** | **String** | Prevented Match ID. | [optional] | +|**preventedQuantity** | **String** | Prevented Quantity. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentUmOpenAlgoOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentUmOpenAlgoOrderResponse.md index bcc5fc434..c1209f169 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentUmOpenAlgoOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentUmOpenAlgoOrderResponse.md @@ -21,12 +21,6 @@ |**actualPrice** | **String** | | [optional] | |**triggerPrice** | **String** | | [optional] | |**price** | **String** | | [optional] | -|**icebergQuantity** | **String** | | [optional] | -|**tpTriggerPrice** | **String** | | [optional] | -|**tpPrice** | **String** | | [optional] | -|**slTriggerPrice** | **String** | | [optional] | -|**slPrice** | **String** | | [optional] | -|**tpOrderType** | **String** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | |**workingType** | **String** | | [optional] | |**priceMatch** | **String** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentUmOpenConditionalOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentUmOpenConditionalOrderResponse.md index 05bdd4875..47644c98e 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentUmOpenConditionalOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentUmOpenConditionalOrderResponse.md @@ -7,25 +7,25 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**newClientStrategyId** | **String** | | [optional] | -|**strategyId** | **Long** | | [optional] | -|**strategyStatus** | **String** | | [optional] | -|**strategyType** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**bookTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | -|**priceMatch** | **String** | | [optional] | +|**newClientStrategyId** | **String** | New Client Strategy ID. | [optional] | +|**strategyId** | **Long** | Strategy ID. | [optional] | +|**strategyStatus** | **String** | Strategy Status. | [optional] | +|**strategyType** | **String** | Strategy Type. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**bookTime** | **Long** | order time | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auot cancel time for TIF GTD order | [optional] | +|**priceMatch** | **String** | Price Match. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentUmOpenOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentUmOpenOrderResponse.md index 6cc361b15..62339d051 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentUmOpenOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryCurrentUmOpenOrderResponse.md @@ -7,26 +7,26 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgPrice** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**cumQuote** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | -|**priceMatch** | **String** | | [optional] | +|**avgPrice** | **String** | Avg Price. | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**cumQuote** | **String** | Cum Quote. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**origType** | **String** | Orig Type. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**time** | **Long** | order time | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auot cancel time for TIF GTD order | [optional] | +|**priceMatch** | **String** | Price Match. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountOrderResponse.md index 778b37795..498d4b7ff 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountOrderResponse.md @@ -7,26 +7,26 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**clientOrderId** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**icebergQty** | **String** | | [optional] | -|**isWorking** | **Boolean** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**accountId** | **Long** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**preventedMatchId** | **String** | | [optional] | -|**preventedQuantity** | **String** | | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**cummulativeQuoteQty** | **String** | Cummulative Quote Qty. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**icebergQty** | **String** | Iceberg Qty. | [optional] | +|**isWorking** | **Boolean** | Is Working. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**side** | **String** | Side. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**time** | **Long** | Event time. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**accountId** | **Long** | Account ID. | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**preventedMatchId** | **String** | Prevented Match ID. | [optional] | +|**preventedQuantity** | **String** | Prevented Quantity. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsAllOcoResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsAllOcoResponseInner.md index 86659321e..7b95d4053 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsAllOcoResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsAllOcoResponseInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderListId** | **Long** | | [optional] | -|**contingencyType** | **String** | | [optional] | -|**listStatusType** | **String** | | [optional] | -|**listOrderStatus** | **String** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | -|**transactionTime** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**orders** | [**List<QueryMarginAccountsAllOcoResponseInnerOrdersInner>**](QueryMarginAccountsAllOcoResponseInnerOrdersInner.md) | | [optional] | +|**orderListId** | **Long** | Order List ID. | [optional] | +|**contingencyType** | **String** | Contingency Type. | [optional] | +|**listStatusType** | **String** | List Status Type. | [optional] | +|**listOrderStatus** | **String** | List Order Status. | [optional] | +|**listClientOrderId** | **String** | List Client Order ID. | [optional] | +|**transactionTime** | **Long** | Transaction Time. | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**orders** | [**List<QueryMarginAccountsAllOcoResponseInnerOrdersInner>**](QueryMarginAccountsAllOcoResponseInnerOrdersInner.md) | Orders. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsAllOcoResponseInnerOrdersInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsAllOcoResponseInnerOrdersInner.md index 42ca034e6..12afddbfa 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsAllOcoResponseInnerOrdersInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsAllOcoResponseInnerOrdersInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsOcoResponse.md b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsOcoResponse.md index d91f7265d..1fba4a887 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsOcoResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsOcoResponse.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderListId** | **Long** | | [optional] | -|**contingencyType** | **String** | | [optional] | -|**listStatusType** | **String** | | [optional] | -|**listOrderStatus** | **String** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | -|**transactionTime** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**orders** | [**List<QueryMarginAccountsOcoResponseOrdersInner>**](QueryMarginAccountsOcoResponseOrdersInner.md) | | [optional] | +|**orderListId** | **Long** | Order List ID. | [optional] | +|**contingencyType** | **String** | Contingency Type. | [optional] | +|**listStatusType** | **String** | List Status Type. | [optional] | +|**listOrderStatus** | **String** | List Order Status. | [optional] | +|**listClientOrderId** | **String** | List Client Order ID. | [optional] | +|**transactionTime** | **Long** | Transaction Time. | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**orders** | [**List<QueryMarginAccountsOcoResponseOrdersInner>**](QueryMarginAccountsOcoResponseOrdersInner.md) | Orders. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsOcoResponseOrdersInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsOcoResponseOrdersInner.md index a46988d3b..5012df259 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsOcoResponseOrdersInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsOcoResponseOrdersInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsOpenOcoResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsOpenOcoResponseInner.md index e8f4e4524..1cb0035ed 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsOpenOcoResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsOpenOcoResponseInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderListId** | **Long** | | [optional] | -|**contingencyType** | **String** | | [optional] | -|**listStatusType** | **String** | | [optional] | -|**listOrderStatus** | **String** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | -|**transactionTime** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**orders** | [**List<QueryMarginAccountsOpenOcoResponseInnerOrdersInner>**](QueryMarginAccountsOpenOcoResponseInnerOrdersInner.md) | | [optional] | +|**orderListId** | **Long** | Order List ID. | [optional] | +|**contingencyType** | **String** | Contingency Type. | [optional] | +|**listStatusType** | **String** | List Status Type. | [optional] | +|**listOrderStatus** | **String** | List Order Status. | [optional] | +|**listClientOrderId** | **String** | List Client Order ID. | [optional] | +|**transactionTime** | **Long** | Transaction Time. | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**orders** | [**List<QueryMarginAccountsOpenOcoResponseInnerOrdersInner>**](QueryMarginAccountsOpenOcoResponseInnerOrdersInner.md) | Orders. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsOpenOcoResponseInnerOrdersInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsOpenOcoResponseInnerOrdersInner.md index 662436d61..c28d3daba 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsOpenOcoResponseInnerOrdersInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginAccountsOpenOcoResponseInnerOrdersInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginLoanRecordResponse.md b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginLoanRecordResponse.md index c60a4c635..58a89fdf0 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginLoanRecordResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginLoanRecordResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**rows** | [**List<QueryMarginLoanRecordResponseRowsInner>**](QueryMarginLoanRecordResponseRowsInner.md) | | [optional] | -|**total** | **Long** | | [optional] | +|**rows** | [**List<QueryMarginLoanRecordResponseRowsInner>**](QueryMarginLoanRecordResponseRowsInner.md) | Rows. | [optional] | +|**total** | **Long** | Total. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginLoanRecordResponseRowsInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginLoanRecordResponseRowsInner.md index 2f60c3f8f..f2d2f27f4 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginLoanRecordResponseRowsInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginLoanRecordResponseRowsInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**txId** | **Long** | | [optional] | -|**asset** | **String** | | [optional] | -|**principal** | **String** | | [optional] | -|**timestamp** | **Long** | | [optional] | -|**status** | **String** | | [optional] | +|**txId** | **Long** | Tx ID. | [optional] | +|**asset** | **String** | asset name | [optional] | +|**principal** | **String** | Principal repaid | [optional] | +|**timestamp** | **Long** | Timestamp. | [optional] | +|**status** | **String** | one of PENDING (pending execution), CONFIRMED (successfully loaned), FAILED (execution failed, nothing happened to your account); | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginMaxWithdrawResponse.md b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginMaxWithdrawResponse.md index 64a325eba..c4d0456e1 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginMaxWithdrawResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginMaxWithdrawResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amount** | **String** | | [optional] | +|**amount** | **String** | account's currently max withdrawable amount with sufficient system availability | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginRepayRecordResponse.md b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginRepayRecordResponse.md index 83f1671c9..537e29fab 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginRepayRecordResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginRepayRecordResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**rows** | [**List<QueryMarginRepayRecordResponseRowsInner>**](QueryMarginRepayRecordResponseRowsInner.md) | | [optional] | -|**total** | **Long** | | [optional] | +|**rows** | [**List<QueryMarginRepayRecordResponseRowsInner>**](QueryMarginRepayRecordResponseRowsInner.md) | Rows. | [optional] | +|**total** | **Long** | Total. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginRepayRecordResponseRowsInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginRepayRecordResponseRowsInner.md index 05fb51904..5f456b18d 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryMarginRepayRecordResponseRowsInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryMarginRepayRecordResponseRowsInner.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amount** | **String** | | [optional] | -|**asset** | **String** | | [optional] | -|**interest** | **String** | | [optional] | -|**principal** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timestamp** | **Long** | | [optional] | -|**txId** | **Long** | | [optional] | +|**amount** | **String** | Total amount repaid | [optional] | +|**asset** | **String** | asset name | [optional] | +|**interest** | **String** | Interest repaid | [optional] | +|**principal** | **String** | Principal repaid | [optional] | +|**status** | **String** | one of PENDING (pending execution), CONFIRMED (successfully execution), FAILED (execution failed, nothing happened to your account) | [optional] | +|**timestamp** | **Long** | Timestamp. | [optional] | +|**txId** | **Long** | Tx ID. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner.md index 2c0113231..cf6a63100 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**interest** | **String** | | [optional] | -|**interestAccuredTime** | **Long** | | [optional] | -|**interestRate** | **String** | | [optional] | -|**principal** | **String** | | [optional] | +|**asset** | **String** | asset name | [optional] | +|**interest** | **String** | interest amount | [optional] | +|**interestAccuredTime** | **Long** | Interest Accured Time. | [optional] | +|**interestRate** | **String** | daily interest rate | [optional] | +|**principal** | **String** | Principal repaid | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryUmAlgoOrderHistoryResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryUmAlgoOrderHistoryResponseInner.md index 897481a41..0b992de0a 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryUmAlgoOrderHistoryResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryUmAlgoOrderHistoryResponseInner.md @@ -21,12 +21,6 @@ |**actualPrice** | **String** | | [optional] | |**triggerPrice** | **String** | | [optional] | |**price** | **String** | | [optional] | -|**icebergQuantity** | **String** | | [optional] | -|**tpTriggerPrice** | **String** | | [optional] | -|**tpPrice** | **String** | | [optional] | -|**slTriggerPrice** | **String** | | [optional] | -|**slPrice** | **String** | | [optional] | -|**tpOrderType** | **String** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | |**workingType** | **String** | | [optional] | |**priceMatch** | **String** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryUmConditionalOrderHistoryResponse.md b/clients/derivatives-trading-portfolio-margin/docs/QueryUmConditionalOrderHistoryResponse.md index 5bbc0403d..98108e702 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryUmConditionalOrderHistoryResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryUmConditionalOrderHistoryResponse.md @@ -7,30 +7,30 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**newClientStrategyId** | **String** | | [optional] | -|**strategyId** | **Long** | | [optional] | -|**strategyStatus** | **String** | | [optional] | -|**strategyType** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**status** | **String** | | [optional] | -|**bookTime** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**triggerTime** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | +|**newClientStrategyId** | **String** | New Client Strategy ID. | [optional] | +|**strategyId** | **Long** | Strategy ID. | [optional] | +|**strategyStatus** | **String** | Strategy Status. | [optional] | +|**strategyType** | **String** | Strategy Type. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable,only have when the strategy is triggered | [optional] | +|**status** | **String** | Normal order status after trigger if appliable, only have when the strategy is triggered | [optional] | +|**bookTime** | **Long** | order time | [optional] | +|**updateTime** | **Long** | last update time | [optional] | +|**triggerTime** | **Long** | Trigger Time. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**workingType** | **String** | Working Type. | [optional] | +|**priceProtect** | **Boolean** | Price Protect. | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auot cancel time for TIF GTD order | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryUmModifyOrderHistoryResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryUmModifyOrderHistoryResponseInner.md index 84e63df52..41418ea8c 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryUmModifyOrderHistoryResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryUmModifyOrderHistoryResponseInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amendmentId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**time** | **Long** | | [optional] | +|**amendmentId** | **Long** | Order modification ID | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**pair** | **String** | Pair. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**time** | **Long** | Order modification time | [optional] | |**amendment** | [**QueryCmModifyOrderHistoryResponseInnerAmendment**](QueryCmModifyOrderHistoryResponseInnerAmendment.md) | | [optional] | -|**priceMatch** | **String** | | [optional] | +|**priceMatch** | **String** | Price Match. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryUmOrderResponse.md b/clients/derivatives-trading-portfolio-margin/docs/QueryUmOrderResponse.md index ce2a3c5d5..befa48cf4 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryUmOrderResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryUmOrderResponse.md @@ -7,26 +7,26 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgPrice** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**cumQuote** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | -|**priceMatch** | **String** | | [optional] | +|**avgPrice** | **String** | Avg Price. | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**cumQuote** | **String** | Cum Quote. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**origType** | **String** | Orig Type. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**time** | **Long** | order time | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**updateTime** | **Long** | update time | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auot cancel time for TIF GTD order | [optional] | +|**priceMatch** | **String** | Price Match. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryUmPositionInformationResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryUmPositionInformationResponseInner.md index c36567c84..aa1bb9305 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryUmPositionInformationResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryUmPositionInformationResponseInner.md @@ -7,17 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**entryPrice** | **String** | | [optional] | -|**leverage** | **String** | | [optional] | -|**markPrice** | **String** | | [optional] | -|**maxNotionalValue** | **String** | | [optional] | -|**positionAmt** | **String** | | [optional] | -|**notional** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**unRealizedProfit** | **String** | | [optional] | -|**liquidationPrice** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**entryPrice** | **String** | average entry price | [optional] | +|**leverage** | **String** | current initial leverage | [optional] | +|**markPrice** | **String** | Mark Price. | [optional] | +|**maxNotionalValue** | **String** | Max Notional Value. | [optional] | +|**positionAmt** | **String** | position amount | [optional] | +|**notional** | **String** | Notional. | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**unRealizedProfit** | **String** | Un Realized Profit. | [optional] | +|**liquidationPrice** | **String** | Liquidation Price. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**updateTime** | **Long** | last update time | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryUserNegativeBalanceAutoExchangeRecordResponse.md b/clients/derivatives-trading-portfolio-margin/docs/QueryUserNegativeBalanceAutoExchangeRecordResponse.md index 2c5bedd59..a4d80b3bf 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryUserNegativeBalanceAutoExchangeRecordResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryUserNegativeBalanceAutoExchangeRecordResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**total** | **Long** | | [optional] | -|**rows** | [**List<QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner>**](QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner.md) | | [optional] | +|**total** | **Long** | Total. | [optional] | +|**rows** | [**List<QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner>**](QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner.md) | Rows. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner.md index 2cbea2cd3..aa7ff3f32 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**startTime** | **Long** | | [optional] | -|**endTime** | **Long** | | [optional] | -|**details** | [**List<QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner>**](QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner.md) | | [optional] | +|**startTime** | **Long** | Start Time. | [optional] | +|**endTime** | **Long** | End Time. | [optional] | +|**details** | [**List<QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner>**](QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner.md) | Details. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner.md index 9f1f55950..2ac2588d2 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**negativeBalance** | **Double** | | [optional] | -|**negativeMaxThreshold** | **Long** | | [optional] | +|**asset** | **String** | asset name | [optional] | +|**negativeBalance** | **Double** | negative balance amount | [optional] | +|**negativeMaxThreshold** | **Long** | the max negative balance threshold | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryUserRateLimitResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryUserRateLimitResponseInner.md index 0b89200e9..6afdaa60b 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryUserRateLimitResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryUserRateLimitResponseInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**rateLimitType** | **String** | | [optional] | -|**interval** | **String** | | [optional] | -|**intervalNum** | **Long** | | [optional] | -|**limit** | **Long** | | [optional] | +|**rateLimitType** | **String** | Rate Limit Type. | [optional] | +|**interval** | **String** | Interval. | [optional] | +|**intervalNum** | **Long** | Interval Num. | [optional] | +|**limit** | **Long** | Limit. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryUsersCmForceOrdersResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryUsersCmForceOrdersResponseInner.md index 443975efb..507bb131b 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryUsersCmForceOrdersResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryUsersCmForceOrdersResponseInner.md @@ -7,24 +7,24 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cumBase** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**pair** | **String** | Pair. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**price** | **String** | Price. | [optional] | +|**avgPrice** | **String** | Avg Price. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**cumBase** | **String** | Cum Base. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**origType** | **String** | Orig Type. | [optional] | +|**time** | **Long** | Event time. | [optional] | +|**updateTime** | **Long** | last update time | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryUsersMarginForceOrdersResponse.md b/clients/derivatives-trading-portfolio-margin/docs/QueryUsersMarginForceOrdersResponse.md index e28b029b4..01bf415cd 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryUsersMarginForceOrdersResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryUsersMarginForceOrdersResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**rows** | [**List<QueryUsersMarginForceOrdersResponseRowsInner>**](QueryUsersMarginForceOrdersResponseRowsInner.md) | | [optional] | -|**total** | **Long** | | [optional] | +|**rows** | [**List<QueryUsersMarginForceOrdersResponseRowsInner>**](QueryUsersMarginForceOrdersResponseRowsInner.md) | Rows. | [optional] | +|**total** | **Long** | Total. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryUsersMarginForceOrdersResponseRowsInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryUsersMarginForceOrdersResponseRowsInner.md index 3a62ddd95..bd05dd51a 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryUsersMarginForceOrdersResponseRowsInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryUsersMarginForceOrdersResponseRowsInner.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgPrice** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**qty** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**updatedTime** | **Long** | | [optional] | +|**avgPrice** | **String** | Avg Price. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**price** | **String** | Price. | [optional] | +|**qty** | **String** | Qty. | [optional] | +|**side** | **String** | Side. | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**updatedTime** | **Long** | Updated Time. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/QueryUsersUmForceOrdersResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/QueryUsersUmForceOrdersResponseInner.md index d8ed7137f..75f77bee9 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/QueryUsersUmForceOrdersResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/QueryUsersUmForceOrdersResponseInner.md @@ -7,23 +7,23 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cumQuote** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**clientOrderId** | **String** | Client Order ID. | [optional] | +|**price** | **String** | Price. | [optional] | +|**avgPrice** | **String** | Avg Price. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**cumQuote** | **String** | Cum Quote. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Normal order type after trigger if appliable | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | +|**origType** | **String** | Orig Type. | [optional] | +|**time** | **Long** | Event time. | [optional] | +|**updateTime** | **Long** | last update time | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/ReduceOnly.md b/clients/derivatives-trading-portfolio-margin/docs/ReduceOnly.md new file mode 100644 index 000000000..7561f86f6 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/docs/ReduceOnly.md @@ -0,0 +1,13 @@ + + +# ReduceOnly + +## Enum + + +* `TRUE` (value: `"true"`) + +* `FALSE` (value: `"false"`) + + + diff --git a/clients/derivatives-trading-portfolio-margin/docs/RepayFuturesNegativeBalanceResponse.md b/clients/derivatives-trading-portfolio-margin/docs/RepayFuturesNegativeBalanceResponse.md index 4fee43831..d62af32a0 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/RepayFuturesNegativeBalanceResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/RepayFuturesNegativeBalanceResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**msg** | **String** | | [optional] | +|**msg** | **String** | Msg. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/Risklevelchange.md b/clients/derivatives-trading-portfolio-margin/docs/Risklevelchange.md index 7865b406d..e1596e34f 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/Risklevelchange.md +++ b/clients/derivatives-trading-portfolio-margin/docs/Risklevelchange.md @@ -1,18 +1,18 @@ -# Risklevelchange +# RiskLevelChange ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**uLowerCase** | **String** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**eq** | **String** | | [optional] | -|**ae** | **String** | | [optional] | -|**mLowerCase** | **String** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**uLowerCase** | **String** | uniMMR level | [optional] | +|**sLowerCase** | **String** | Risk level: MARGIN_CALL, REDUCE_ONLY, FORCE_LIQUIDATION | [optional] | +|**eq** | **String** | Account equity in USD value | [optional] | +|**ae** | **String** | Actual equity without collateral rate in USD value | [optional] | +|**mLowerCase** | **String** | Total maintenance margin in USD value | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/SelfTradePreventionMode.md b/clients/derivatives-trading-portfolio-margin/docs/SelfTradePreventionMode.md index e69eda69f..0bba0d1ab 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/SelfTradePreventionMode.md +++ b/clients/derivatives-trading-portfolio-margin/docs/SelfTradePreventionMode.md @@ -9,9 +9,9 @@ * `EXPIRE_TAKER` (value: `"EXPIRE_TAKER"`) -* `EXPIRE_BOTH` (value: `"EXPIRE_BOTH"`) - * `EXPIRE_MAKER` (value: `"EXPIRE_MAKER"`) +* `EXPIRE_BOTH` (value: `"EXPIRE_BOTH"`) + diff --git a/clients/derivatives-trading-portfolio-margin/docs/StartUserDataStreamResponse.md b/clients/derivatives-trading-portfolio-margin/docs/StartUserDataStreamResponse.md index 5908d1f6e..c44419596 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/StartUserDataStreamResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/StartUserDataStreamResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**listenKey** | **String** | | [optional] | +|**listenKey** | **String** | Listen Key. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/StrategyType.md b/clients/derivatives-trading-portfolio-margin/docs/StrategyType.md index 9e8dd8182..a178eedda 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/StrategyType.md +++ b/clients/derivatives-trading-portfolio-margin/docs/StrategyType.md @@ -9,8 +9,6 @@ * `STOP_MARKET` (value: `"STOP_MARKET"`) -* `LIMIT_MAKER` (value: `"LIMIT_MAKER"`) - * `TAKE_PROFIT` (value: `"TAKE_PROFIT"`) * `TAKE_PROFIT_MARKET` (value: `"TAKE_PROFIT_MARKET"`) diff --git a/clients/derivatives-trading-portfolio-margin/docs/TimeInForce.md b/clients/derivatives-trading-portfolio-margin/docs/TimeInForce.md index 96ed69b03..1d3fb68df 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/TimeInForce.md +++ b/clients/derivatives-trading-portfolio-margin/docs/TimeInForce.md @@ -5,13 +5,15 @@ ## Enum -* `GTC` (value: `"GTC"`) - * `IOC` (value: `"IOC"`) +* `GTC` (value: `"GTC"`) + * `FOK` (value: `"FOK"`) * `GTX` (value: `"GTX"`) +* `GTD` (value: `"GTD"`) + diff --git a/clients/derivatives-trading-portfolio-margin/docs/ToggleBnbBurnOnUmFuturesTradeRequest.md b/clients/derivatives-trading-portfolio-margin/docs/ToggleBnbBurnOnUmFuturesTradeRequest.md index 30e188c28..cd952d9a0 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ToggleBnbBurnOnUmFuturesTradeRequest.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ToggleBnbBurnOnUmFuturesTradeRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**feeBurn** | **String** | | | +|**feeBurn** | **FeeBurn** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/ToggleBnbBurnOnUmFuturesTradeResponse.md b/clients/derivatives-trading-portfolio-margin/docs/ToggleBnbBurnOnUmFuturesTradeResponse.md index d676ac350..08458c819 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/ToggleBnbBurnOnUmFuturesTradeResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/ToggleBnbBurnOnUmFuturesTradeResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **Long** | | [optional] | -|**msg** | **String** | | [optional] | +|**code** | **Long** | Code. | [optional] | +|**msg** | **String** | Msg. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/TradeApi.md b/clients/derivatives-trading-portfolio-margin/docs/TradeApi.md index c599671ef..40f11279a 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/TradeApi.md +++ b/clients/derivatives-trading-portfolio-margin/docs/TradeApi.md @@ -4,78 +4,78 @@ All URIs are relative to *https://papi.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**cancelAllCmOpenConditionalOrders**](TradeApi.md#cancelAllCmOpenConditionalOrders) | **DELETE** /papi/v1/cm/conditional/allOpenOrders | Cancel All CM Open Conditional Orders(TRADE) | -| [**cancelAllCmOpenOrders**](TradeApi.md#cancelAllCmOpenOrders) | **DELETE** /papi/v1/cm/allOpenOrders | Cancel All CM Open Orders(TRADE) | +| [**cancelAllCmOpenConditionalOrders**](TradeApi.md#cancelAllCmOpenConditionalOrders) | **DELETE** /papi/v1/cm/conditional/allOpenOrders | Cancel All CM Open Conditional Orders (TRADE) | +| [**cancelAllCmOpenOrders**](TradeApi.md#cancelAllCmOpenOrders) | **DELETE** /papi/v1/cm/allOpenOrders | Cancel All CM Open Orders (TRADE) | | [**cancelAllUmAlgoOpenOrders**](TradeApi.md#cancelAllUmAlgoOpenOrders) | **DELETE** /papi/v1/um/algo/allOpenOrders | Cancel All UM Algo Open Orders (TRADE) | -| [**cancelAllUmOpenConditionalOrders**](TradeApi.md#cancelAllUmOpenConditionalOrders) | **DELETE** /papi/v1/um/conditional/allOpenOrders | Cancel All UM Open Conditional Orders | -| [**cancelAllUmOpenOrders**](TradeApi.md#cancelAllUmOpenOrders) | **DELETE** /papi/v1/um/allOpenOrders | Cancel All UM Open Orders(TRADE) | -| [**cancelCmConditionalOrder**](TradeApi.md#cancelCmConditionalOrder) | **DELETE** /papi/v1/cm/conditional/order | Cancel CM Conditional Order(TRADE) | -| [**cancelCmOrder**](TradeApi.md#cancelCmOrder) | **DELETE** /papi/v1/cm/order | Cancel CM Order(TRADE) | -| [**cancelMarginAccountAllOpenOrdersOnASymbol**](TradeApi.md#cancelMarginAccountAllOpenOrdersOnASymbol) | **DELETE** /papi/v1/margin/allOpenOrders | Cancel Margin Account All Open Orders on a Symbol(TRADE) | -| [**cancelMarginAccountOcoOrders**](TradeApi.md#cancelMarginAccountOcoOrders) | **DELETE** /papi/v1/margin/orderList | Cancel Margin Account OCO Orders(TRADE) | -| [**cancelMarginAccountOrder**](TradeApi.md#cancelMarginAccountOrder) | **DELETE** /papi/v1/margin/order | Cancel Margin Account Order(TRADE) | +| [**cancelAllUmOpenConditionalOrders**](TradeApi.md#cancelAllUmOpenConditionalOrders) | **DELETE** /papi/v1/um/conditional/allOpenOrders | Cancel All UM Open Conditional Orders (TRADE) | +| [**cancelAllUmOpenOrders**](TradeApi.md#cancelAllUmOpenOrders) | **DELETE** /papi/v1/um/allOpenOrders | Cancel All UM Open Orders (TRADE) | +| [**cancelCmConditionalOrder**](TradeApi.md#cancelCmConditionalOrder) | **DELETE** /papi/v1/cm/conditional/order | Cancel CM Conditional Order (TRADE) | +| [**cancelCmOrder**](TradeApi.md#cancelCmOrder) | **DELETE** /papi/v1/cm/order | Cancel CM Order (TRADE) | +| [**cancelMarginAccountAllOpenOrdersOnASymbol**](TradeApi.md#cancelMarginAccountAllOpenOrdersOnASymbol) | **DELETE** /papi/v1/margin/allOpenOrders | Cancel Margin Account All Open Orders on a Symbol (TRADE) | +| [**cancelMarginAccountOcoOrders**](TradeApi.md#cancelMarginAccountOcoOrders) | **DELETE** /papi/v1/margin/orderList | Cancel Margin Account OCO Orders (TRADE) | +| [**cancelMarginAccountOrder**](TradeApi.md#cancelMarginAccountOrder) | **DELETE** /papi/v1/margin/order | Cancel Margin Account Order (TRADE) | | [**cancelUmAlgoOrder**](TradeApi.md#cancelUmAlgoOrder) | **DELETE** /papi/v1/um/algo/order | Cancel UM Algo Order (TRADE) | -| [**cancelUmConditionalOrder**](TradeApi.md#cancelUmConditionalOrder) | **DELETE** /papi/v1/um/conditional/order | Cancel UM Conditional Order | -| [**cancelUmOrder**](TradeApi.md#cancelUmOrder) | **DELETE** /papi/v1/um/order | Cancel UM Order(TRADE) | -| [**cmAccountTradeList**](TradeApi.md#cmAccountTradeList) | **GET** /papi/v1/cm/userTrades | CM Account Trade List(USER_DATA) | -| [**cmPositionAdlQuantileEstimation**](TradeApi.md#cmPositionAdlQuantileEstimation) | **GET** /papi/v1/cm/adlQuantile | CM Position ADL Quantile Estimation(USER_DATA) | -| [**futuresTradfiPerpsContract**](TradeApi.md#futuresTradfiPerpsContract) | **POST** /papi/v1/um/stock/contract | Futures TradFi Perps Contract(USER_DATA) | +| [**cancelUmConditionalOrder**](TradeApi.md#cancelUmConditionalOrder) | **DELETE** /papi/v1/um/conditional/order | Cancel UM Conditional Order (TRADE) | +| [**cancelUmOrder**](TradeApi.md#cancelUmOrder) | **DELETE** /papi/v1/um/order | Cancel UM Order (TRADE) | +| [**cmAccountTradeList**](TradeApi.md#cmAccountTradeList) | **GET** /papi/v1/cm/userTrades | CM Account Trade List (USER_DATA) | +| [**cmPositionAdlQuantileEstimation**](TradeApi.md#cmPositionAdlQuantileEstimation) | **GET** /papi/v1/cm/adlQuantile | CM Position ADL Quantile Estimation (USER_DATA) | +| [**futuresTradfiPerpsContract**](TradeApi.md#futuresTradfiPerpsContract) | **POST** /papi/v1/um/stock/contract | Futures TradFi Perps Contract (USER_DATA) | | [**getUmFuturesBnbBurnStatus**](TradeApi.md#getUmFuturesBnbBurnStatus) | **GET** /papi/v1/um/feeBurn | Get UM Futures BNB Burn Status (USER_DATA) | -| [**marginAccountBorrow**](TradeApi.md#marginAccountBorrow) | **POST** /papi/v1/marginLoan | Margin Account Borrow(MARGIN) | -| [**marginAccountNewOco**](TradeApi.md#marginAccountNewOco) | **POST** /papi/v1/margin/order/oco | Margin Account New OCO(TRADE) | -| [**marginAccountRepay**](TradeApi.md#marginAccountRepay) | **POST** /papi/v1/repayLoan | Margin Account Repay(MARGIN) | -| [**marginAccountRepayDebt**](TradeApi.md#marginAccountRepayDebt) | **POST** /papi/v1/margin/repay-debt | Margin Account Repay Debt(TRADE) | +| [**marginAccountBorrow**](TradeApi.md#marginAccountBorrow) | **POST** /papi/v1/marginLoan | Margin Account Borrow (MARGIN) | +| [**marginAccountNewOco**](TradeApi.md#marginAccountNewOco) | **POST** /papi/v1/margin/order/oco | Margin Account New OCO (TRADE) | +| [**marginAccountRepay**](TradeApi.md#marginAccountRepay) | **POST** /papi/v1/repayLoan | Margin Account Repay (MARGIN) | +| [**marginAccountRepayDebt**](TradeApi.md#marginAccountRepayDebt) | **POST** /papi/v1/margin/repay-debt | Margin Account Repay Debt (TRADE) | | [**marginAccountTradeList**](TradeApi.md#marginAccountTradeList) | **GET** /papi/v1/margin/myTrades | Margin Account Trade List (USER_DATA) | -| [**modifyCmOrder**](TradeApi.md#modifyCmOrder) | **PUT** /papi/v1/cm/order | Modify CM Order(TRADE) | -| [**modifyUmOrder**](TradeApi.md#modifyUmOrder) | **PUT** /papi/v1/um/order | Modify UM Order(TRADE) | -| [**newCmConditionalOrder**](TradeApi.md#newCmConditionalOrder) | **POST** /papi/v1/cm/conditional/order | New CM Conditional Order(TRADE) | -| [**newCmOrder**](TradeApi.md#newCmOrder) | **POST** /papi/v1/cm/order | New CM Order(TRADE) | -| [**newMarginOrder**](TradeApi.md#newMarginOrder) | **POST** /papi/v1/margin/order | New Margin Order(TRADE) | +| [**modifyCmOrder**](TradeApi.md#modifyCmOrder) | **PUT** /papi/v1/cm/order | Modify CM Order (TRADE) | +| [**modifyUmOrder**](TradeApi.md#modifyUmOrder) | **PUT** /papi/v1/um/order | Modify UM Order (TRADE) | +| [**newCmConditionalOrder**](TradeApi.md#newCmConditionalOrder) | **POST** /papi/v1/cm/conditional/order | New CM Conditional Order (TRADE) | +| [**newCmOrder**](TradeApi.md#newCmOrder) | **POST** /papi/v1/cm/order | New CM Order (TRADE) | +| [**newMarginOrder**](TradeApi.md#newMarginOrder) | **POST** /papi/v1/margin/order | New Margin Order (TRADE) | | [**newUmAlgoOrder**](TradeApi.md#newUmAlgoOrder) | **POST** /papi/v1/um/algo/order | New UM Algo Order (TRADE) | -| [**newUmConditionalOrder**](TradeApi.md#newUmConditionalOrder) | **POST** /papi/v1/um/conditional/order | New UM Conditional Order | +| [**newUmConditionalOrder**](TradeApi.md#newUmConditionalOrder) | **POST** /papi/v1/um/conditional/order | New UM Conditional Order (TRADE) | | [**newUmOrder**](TradeApi.md#newUmOrder) | **POST** /papi/v1/um/order | New UM Order (TRADE) | -| [**queryAllCmConditionalOrders**](TradeApi.md#queryAllCmConditionalOrders) | **GET** /papi/v1/cm/conditional/allOrders | Query All CM Conditional Orders(USER_DATA) | +| [**queryAllCmConditionalOrders**](TradeApi.md#queryAllCmConditionalOrders) | **GET** /papi/v1/cm/conditional/allOrders | Query All CM Conditional Orders (USER_DATA) | | [**queryAllCmOrders**](TradeApi.md#queryAllCmOrders) | **GET** /papi/v1/cm/allOrders | Query All CM Orders (USER_DATA) | | [**queryAllCurrentCmOpenConditionalOrders**](TradeApi.md#queryAllCurrentCmOpenConditionalOrders) | **GET** /papi/v1/cm/conditional/openOrders | Query All Current CM Open Conditional Orders (USER_DATA) | -| [**queryAllCurrentCmOpenOrders**](TradeApi.md#queryAllCurrentCmOpenOrders) | **GET** /papi/v1/cm/openOrders | Query All Current CM Open Orders(USER_DATA) | +| [**queryAllCurrentCmOpenOrders**](TradeApi.md#queryAllCurrentCmOpenOrders) | **GET** /papi/v1/cm/openOrders | Query All Current CM Open Orders (USER_DATA) | | [**queryAllCurrentUmOpenAlgoOrders**](TradeApi.md#queryAllCurrentUmOpenAlgoOrders) | **GET** /papi/v1/um/algo/openAlgoOrders | Query All Current UM Open Algo Orders (USER_DATA) | -| [**queryAllCurrentUmOpenConditionalOrders**](TradeApi.md#queryAllCurrentUmOpenConditionalOrders) | **GET** /papi/v1/um/conditional/openOrders | Query All Current UM Open Conditional Orders | -| [**queryAllCurrentUmOpenOrders**](TradeApi.md#queryAllCurrentUmOpenOrders) | **GET** /papi/v1/um/openOrders | Query All Current UM Open Orders(USER_DATA) | +| [**queryAllCurrentUmOpenConditionalOrders**](TradeApi.md#queryAllCurrentUmOpenConditionalOrders) | **GET** /papi/v1/um/conditional/openOrders | Query All Current UM Open Conditional Orders (USER_DATA) | +| [**queryAllCurrentUmOpenOrders**](TradeApi.md#queryAllCurrentUmOpenOrders) | **GET** /papi/v1/um/openOrders | Query All Current UM Open Orders (USER_DATA) | | [**queryAllMarginAccountOrders**](TradeApi.md#queryAllMarginAccountOrders) | **GET** /papi/v1/margin/allOrders | Query All Margin Account Orders (USER_DATA) | -| [**queryAllUmConditionalOrders**](TradeApi.md#queryAllUmConditionalOrders) | **GET** /papi/v1/um/conditional/allOrders | Query All UM Conditional Orders | -| [**queryAllUmOrders**](TradeApi.md#queryAllUmOrders) | **GET** /papi/v1/um/allOrders | Query All UM Orders(USER_DATA) | -| [**queryCmConditionalOrderHistory**](TradeApi.md#queryCmConditionalOrderHistory) | **GET** /papi/v1/cm/conditional/orderHistory | Query CM Conditional Order History(USER_DATA) | -| [**queryCmModifyOrderHistory**](TradeApi.md#queryCmModifyOrderHistory) | **GET** /papi/v1/cm/orderAmendment | Query CM Modify Order History(TRADE) | -| [**queryCmOrder**](TradeApi.md#queryCmOrder) | **GET** /papi/v1/cm/order | Query CM Order(USER_DATA) | -| [**queryCurrentCmOpenConditionalOrder**](TradeApi.md#queryCurrentCmOpenConditionalOrder) | **GET** /papi/v1/cm/conditional/openOrder | Query Current CM Open Conditional Order(USER_DATA) | +| [**queryAllUmConditionalOrders**](TradeApi.md#queryAllUmConditionalOrders) | **GET** /papi/v1/um/conditional/allOrders | Query All UM Conditional Orders (USER_DATA) | +| [**queryAllUmOrders**](TradeApi.md#queryAllUmOrders) | **GET** /papi/v1/um/allOrders | Query All UM Orders (USER_DATA) | +| [**queryCmConditionalOrderHistory**](TradeApi.md#queryCmConditionalOrderHistory) | **GET** /papi/v1/cm/conditional/orderHistory | Query CM Conditional Order History (USER_DATA) | +| [**queryCmModifyOrderHistory**](TradeApi.md#queryCmModifyOrderHistory) | **GET** /papi/v1/cm/orderAmendment | Query CM Modify Order History (TRADE) | +| [**queryCmOrder**](TradeApi.md#queryCmOrder) | **GET** /papi/v1/cm/order | Query CM Order (USER_DATA) | +| [**queryCurrentCmOpenConditionalOrder**](TradeApi.md#queryCurrentCmOpenConditionalOrder) | **GET** /papi/v1/cm/conditional/openOrder | Query Current CM Open Conditional Order (USER_DATA) | | [**queryCurrentCmOpenOrder**](TradeApi.md#queryCurrentCmOpenOrder) | **GET** /papi/v1/cm/openOrder | Query Current CM Open Order (USER_DATA) | | [**queryCurrentMarginOpenOrder**](TradeApi.md#queryCurrentMarginOpenOrder) | **GET** /papi/v1/margin/openOrders | Query Current Margin Open Order (USER_DATA) | | [**queryCurrentUmOpenAlgoOrder**](TradeApi.md#queryCurrentUmOpenAlgoOrder) | **GET** /papi/v1/um/algo/algoOrder | Query Current UM Open Algo Order (USER_DATA) | -| [**queryCurrentUmOpenConditionalOrder**](TradeApi.md#queryCurrentUmOpenConditionalOrder) | **GET** /papi/v1/um/conditional/openOrder | Query Current UM Open Conditional Order | -| [**queryCurrentUmOpenOrder**](TradeApi.md#queryCurrentUmOpenOrder) | **GET** /papi/v1/um/openOrder | Query Current UM Open Order(USER_DATA) | +| [**queryCurrentUmOpenConditionalOrder**](TradeApi.md#queryCurrentUmOpenConditionalOrder) | **GET** /papi/v1/um/conditional/openOrder | Query Current UM Open Conditional Order (USER_DATA) | +| [**queryCurrentUmOpenOrder**](TradeApi.md#queryCurrentUmOpenOrder) | **GET** /papi/v1/um/openOrder | Query Current UM Open Order (USER_DATA) | | [**queryMarginAccountOrder**](TradeApi.md#queryMarginAccountOrder) | **GET** /papi/v1/margin/order | Query Margin Account Order (USER_DATA) | | [**queryMarginAccountsAllOco**](TradeApi.md#queryMarginAccountsAllOco) | **GET** /papi/v1/margin/allOrderList | Query Margin Account's all OCO (USER_DATA) | | [**queryMarginAccountsOco**](TradeApi.md#queryMarginAccountsOco) | **GET** /papi/v1/margin/orderList | Query Margin Account's OCO (USER_DATA) | | [**queryMarginAccountsOpenOco**](TradeApi.md#queryMarginAccountsOpenOco) | **GET** /papi/v1/margin/openOrderList | Query Margin Account's Open OCO (USER_DATA) | | [**queryUmAlgoOrderHistory**](TradeApi.md#queryUmAlgoOrderHistory) | **GET** /papi/v1/um/algo/allAlgoOrders | Query UM Algo Order History (USER_DATA) | -| [**queryUmConditionalOrderHistory**](TradeApi.md#queryUmConditionalOrderHistory) | **GET** /papi/v1/um/conditional/orderHistory | Query UM Conditional Order History | -| [**queryUmModifyOrderHistory**](TradeApi.md#queryUmModifyOrderHistory) | **GET** /papi/v1/um/orderAmendment | Query UM Modify Order History(TRADE) | +| [**queryUmConditionalOrderHistory**](TradeApi.md#queryUmConditionalOrderHistory) | **GET** /papi/v1/um/conditional/orderHistory | Query UM Conditional Order History (USER_DATA) | +| [**queryUmModifyOrderHistory**](TradeApi.md#queryUmModifyOrderHistory) | **GET** /papi/v1/um/orderAmendment | Query UM Modify Order History (TRADE) | | [**queryUmOrder**](TradeApi.md#queryUmOrder) | **GET** /papi/v1/um/order | Query UM Order (USER_DATA) | -| [**queryUsersCmForceOrders**](TradeApi.md#queryUsersCmForceOrders) | **GET** /papi/v1/cm/forceOrders | Query User's CM Force Orders(USER_DATA) | -| [**queryUsersMarginForceOrders**](TradeApi.md#queryUsersMarginForceOrders) | **GET** /papi/v1/margin/forceOrders | Query User's Margin Force Orders(USER_DATA) | +| [**queryUsersCmForceOrders**](TradeApi.md#queryUsersCmForceOrders) | **GET** /papi/v1/cm/forceOrders | Query User's CM Force Orders (USER_DATA) | +| [**queryUsersMarginForceOrders**](TradeApi.md#queryUsersMarginForceOrders) | **GET** /papi/v1/margin/forceOrders | Query User's Margin Force Orders (USER_DATA) | | [**queryUsersUmForceOrders**](TradeApi.md#queryUsersUmForceOrders) | **GET** /papi/v1/um/forceOrders | Query User's UM Force Orders (USER_DATA) | | [**toggleBnbBurnOnUmFuturesTrade**](TradeApi.md#toggleBnbBurnOnUmFuturesTrade) | **POST** /papi/v1/um/feeBurn | Toggle BNB Burn On UM Futures Trade (TRADE) | -| [**umAccountTradeList**](TradeApi.md#umAccountTradeList) | **GET** /papi/v1/um/userTrades | UM Account Trade List(USER_DATA) | -| [**umPositionAdlQuantileEstimation**](TradeApi.md#umPositionAdlQuantileEstimation) | **GET** /papi/v1/um/adlQuantile | UM Position ADL Quantile Estimation(USER_DATA) | +| [**umAccountTradeList**](TradeApi.md#umAccountTradeList) | **GET** /papi/v1/um/userTrades | UM Account Trade List (USER_DATA) | +| [**umPositionAdlQuantileEstimation**](TradeApi.md#umPositionAdlQuantileEstimation) | **GET** /papi/v1/um/adlQuantile | UM Position ADL Quantile Estimation (USER_DATA) | # **cancelAllCmOpenConditionalOrders** > CancelAllCmOpenConditionalOrdersResponse cancelAllCmOpenConditionalOrders(symbol, recvWindow) -Cancel All CM Open Conditional Orders(TRADE) +Cancel All CM Open Conditional Orders (TRADE) -Cancel All CM Open Conditional Orders Weight: 1 +Cancel All CM Open Conditional Orders Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -92,8 +92,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long recvWindow = 5000L; // Long | try { CancelAllCmOpenConditionalOrdersResponse result = apiInstance.cancelAllCmOpenConditionalOrders(symbol, recvWindow); System.out.println(result); @@ -112,7 +112,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -137,9 +137,9 @@ No authorization required # **cancelAllCmOpenOrders** > CancelAllCmOpenOrdersResponse cancelAllCmOpenOrders(symbol, recvWindow) -Cancel All CM Open Orders(TRADE) +Cancel All CM Open Orders (TRADE) -Cancel all active LIMIT orders on specific symbol Weight: 1 +Cancel all active LIMIT orders on specific symbol Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -156,8 +156,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long recvWindow = 5000L; // Long | try { CancelAllCmOpenOrdersResponse result = apiInstance.cancelAllCmOpenOrders(symbol, recvWindow); System.out.println(result); @@ -176,7 +176,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -203,7 +203,7 @@ No authorization required Cancel All UM Algo Open Orders (TRADE) -Cancel All UM Algo Open Orders Weight: 1 +Cancel All UM Algo Open Orders Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -220,8 +220,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BNBUSDT"; // String | Symbol + Long recvWindow = 5000L; // Long | try { CancelAllUmAlgoOpenOrdersResponse result = apiInstance.cancelAllUmAlgoOpenOrders(symbol, recvWindow); System.out.println(result); @@ -240,7 +240,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -265,9 +265,9 @@ No authorization required # **cancelAllUmOpenConditionalOrders** > CancelAllUmOpenConditionalOrdersResponse cancelAllUmOpenConditionalOrders(symbol, recvWindow) -Cancel All UM Open Conditional Orders +Cancel All UM Open Conditional Orders (TRADE) -Cancel All UM Open Conditional Orders Weight: 1 +Cancel All UM Open Conditional Orders Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -284,8 +284,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long recvWindow = 5000L; // Long | try { CancelAllUmOpenConditionalOrdersResponse result = apiInstance.cancelAllUmOpenConditionalOrders(symbol, recvWindow); System.out.println(result); @@ -304,7 +304,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -329,9 +329,9 @@ No authorization required # **cancelAllUmOpenOrders** > CancelAllUmOpenOrdersResponse cancelAllUmOpenOrders(symbol, recvWindow) -Cancel All UM Open Orders(TRADE) +Cancel All UM Open Orders (TRADE) -Cancel all active LIMIT orders on specific symbol Weight: 1 +Cancel all active LIMIT orders on specific symbol Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -348,8 +348,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long recvWindow = 5000L; // Long | try { CancelAllUmOpenOrdersResponse result = apiInstance.cancelAllUmOpenOrders(symbol, recvWindow); System.out.println(result); @@ -368,7 +368,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -393,9 +393,9 @@ No authorization required # **cancelCmConditionalOrder** > CancelCmConditionalOrderResponse cancelCmConditionalOrder(symbol, strategyId, newClientStrategyId, recvWindow) -Cancel CM Conditional Order(TRADE) +Cancel CM Conditional Order (TRADE) -Cancel CM Conditional Order * Either `strategyId` or `newClientStrategyId` must be sent. Weight: 1 +Cancel CM Conditional Order Weight(IP): 1 Security Type: TRADE Notes: - Either `strategyId` or `newClientStrategyId` must be sent. ### Example ```java @@ -412,10 +412,10 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long strategyId = 56L; // Long | - String newClientStrategyId = "newClientStrategyId_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long strategyId = 1L; // Long | + String newClientStrategyId = "1"; // String | + Long recvWindow = 5000L; // Long | try { CancelCmConditionalOrderResponse result = apiInstance.cancelCmConditionalOrder(symbol, strategyId, newClientStrategyId, recvWindow); System.out.println(result); @@ -434,7 +434,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **strategyId** | **Long**| | [optional] | | **newClientStrategyId** | **String**| | [optional] | | **recvWindow** | **Long**| | [optional] | @@ -461,9 +461,9 @@ No authorization required # **cancelCmOrder** > CancelCmOrderResponse cancelCmOrder(symbol, orderId, origClientOrderId, recvWindow) -Cancel CM Order(TRADE) +Cancel CM Order (TRADE) -Cancel an active LIMIT order * Either `orderId` or `origClientOrderId` must be sent. Weight: 1 +Cancel an active LIMIT order Weight(IP): 1 Security Type: TRADE Notes: - Either `orderId` or `origClientOrderId` must be sent. ### Example ```java @@ -480,10 +480,10 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long orderId = 56L; // Long | - String origClientOrderId = "origClientOrderId_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSD_200925"; // String | Symbol + Long orderId = 1L; // Long | + String origClientOrderId = "1"; // String | + Long recvWindow = 5000L; // Long | try { CancelCmOrderResponse result = apiInstance.cancelCmOrder(symbol, orderId, origClientOrderId, recvWindow); System.out.println(result); @@ -502,7 +502,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **orderId** | **Long**| | [optional] | | **origClientOrderId** | **String**| | [optional] | | **recvWindow** | **Long**| | [optional] | @@ -529,9 +529,9 @@ No authorization required # **cancelMarginAccountAllOpenOrdersOnASymbol** > CancelMarginAccountAllOpenOrdersOnASymbolResponse cancelMarginAccountAllOpenOrdersOnASymbol(symbol, recvWindow) -Cancel Margin Account All Open Orders on a Symbol(TRADE) +Cancel Margin Account All Open Orders on a Symbol (TRADE) -Cancel Margin Account All Open Orders on a Symbol Weight: 5 +Cancel Margin Account All Open Orders on a Symbol Weight(IP): 5 Security Type: TRADE ### Example ```java @@ -548,8 +548,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long recvWindow = 5000L; // Long | try { CancelMarginAccountAllOpenOrdersOnASymbolResponse result = apiInstance.cancelMarginAccountAllOpenOrdersOnASymbol(symbol, recvWindow); System.out.println(result); @@ -568,7 +568,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -593,9 +593,9 @@ No authorization required # **cancelMarginAccountOcoOrders** > CancelMarginAccountOcoOrdersResponse cancelMarginAccountOcoOrders(symbol, orderListId, listClientOrderId, newClientOrderId, recvWindow) -Cancel Margin Account OCO Orders(TRADE) +Cancel Margin Account OCO Orders (TRADE) -Cancel Margin Account OCO Orders * Additional notes: Canceling an individual leg will cancel the entire OCO Weight: 2 +Cancel Margin Account OCO Orders Weight(IP): 2 Security Type: TRADE Notes: - Additional notes: Canceling an individual leg will cancel the entire OCO ### Example ```java @@ -612,11 +612,11 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long orderListId = 56L; // Long | Either `orderListId` or `listClientOrderId` must be provided - String listClientOrderId = "listClientOrderId_example"; // String | Either `orderListId` or `listClientOrderId` must be provided - String newClientOrderId = "newClientOrderId_example"; // String | Used to uniquely identify this cancel. Automatically generated by default - Long recvWindow = 56L; // Long | + String symbol = "LTCBTC"; // String | Symbol + Long orderListId = 1L; // Long | Either `orderListId` or `listClientOrderId` must be provided + String listClientOrderId = "1"; // String | Either `orderListId` or `listClientOrderId` must be provided + String newClientOrderId = "1"; // String | Used to uniquely identify this cancel request. + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 try { CancelMarginAccountOcoOrdersResponse result = apiInstance.cancelMarginAccountOcoOrders(symbol, orderListId, listClientOrderId, newClientOrderId, recvWindow); System.out.println(result); @@ -635,11 +635,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **orderListId** | **Long**| Either `orderListId` or `listClientOrderId` must be provided | [optional] | | **listClientOrderId** | **String**| Either `orderListId` or `listClientOrderId` must be provided | [optional] | -| **newClientOrderId** | **String**| Used to uniquely identify this cancel. Automatically generated by default | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **newClientOrderId** | **String**| Used to uniquely identify this cancel request. | [optional] | +| **recvWindow** | **Long**| The value cannot be greater than 60000 | [optional] | ### Return type @@ -663,9 +663,9 @@ No authorization required # **cancelMarginAccountOrder** > CancelMarginAccountOrderResponse cancelMarginAccountOrder(symbol, orderId, origClientOrderId, newClientOrderId, recvWindow) -Cancel Margin Account Order(TRADE) +Cancel Margin Account Order (TRADE) -Cancel Margin Account Order * Either `orderId` or `origClientOrderId` must be sent. Weight: 2 +Cancel Margin Account Order Weight(IP): 2 Security Type: TRADE Notes: - Either `orderId` or `origClientOrderId` must be sent. ### Example ```java @@ -682,11 +682,11 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long orderId = 56L; // Long | - String origClientOrderId = "origClientOrderId_example"; // String | - String newClientOrderId = "newClientOrderId_example"; // String | Used to uniquely identify this cancel. Automatically generated by default - Long recvWindow = 56L; // Long | + String symbol = "LTCBTC"; // String | Symbol + Long orderId = 1L; // Long | + String origClientOrderId = "1"; // String | + String newClientOrderId = "1"; // String | Used to uniquely identify this cancel request. + Long recvWindow = 5000L; // Long | The value cannot be greater than `60000` try { CancelMarginAccountOrderResponse result = apiInstance.cancelMarginAccountOrder(symbol, orderId, origClientOrderId, newClientOrderId, recvWindow); System.out.println(result); @@ -705,11 +705,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **orderId** | **Long**| | [optional] | | **origClientOrderId** | **String**| | [optional] | -| **newClientOrderId** | **String**| Used to uniquely identify this cancel. Automatically generated by default | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **newClientOrderId** | **String**| Used to uniquely identify this cancel request. | [optional] | +| **recvWindow** | **Long**| The value cannot be greater than `60000` | [optional] | ### Return type @@ -735,7 +735,7 @@ No authorization required Cancel UM Algo Order (TRADE) -Cancel an active UM algo order. * Either `algoId` or `clientAlgoId` must be sent. Weight: 1 +Cancel an active UM algo order Weight(IP): 1 Security Type: TRADE Notes: - Either `algoId` or `clientAlgoId` must be sent. ### Example ```java @@ -752,9 +752,9 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - Long algoId = 56L; // Long | - String clientAlgoId = "clientAlgoId_example"; // String | - Long recvWindow = 56L; // Long | + Long algoId = 2146760L; // Long | Algo order ID + String clientAlgoId = "6B2I9XVcJpCjqPAJ4YoFX7"; // String | Client algo order ID + Long recvWindow = 5000L; // Long | try { CancelUmAlgoOrderResponse result = apiInstance.cancelUmAlgoOrder(algoId, clientAlgoId, recvWindow); System.out.println(result); @@ -773,8 +773,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **algoId** | **Long**| | [optional] | -| **clientAlgoId** | **String**| | [optional] | +| **algoId** | **Long**| Algo order ID | [optional] | +| **clientAlgoId** | **String**| Client algo order ID | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -799,9 +799,9 @@ No authorization required # **cancelUmConditionalOrder** > CancelUmConditionalOrderResponse cancelUmConditionalOrder(symbol, strategyId, newClientStrategyId, recvWindow) -Cancel UM Conditional Order +Cancel UM Conditional Order (TRADE) -Cancel UM Conditional Order * Either `strategyId` or `newClientStrategyId` must be sent. Weight: 1 +Cancel UM Conditional Order Weight(IP): 1 Security Type: TRADE Notes: - Either `strategyId` or `newClientStrategyId` must be sent. ### Example ```java @@ -818,10 +818,10 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long strategyId = 56L; // Long | - String newClientStrategyId = "newClientStrategyId_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long strategyId = 1L; // Long | + String newClientStrategyId = "1"; // String | + Long recvWindow = 5000L; // Long | try { CancelUmConditionalOrderResponse result = apiInstance.cancelUmConditionalOrder(symbol, strategyId, newClientStrategyId, recvWindow); System.out.println(result); @@ -840,7 +840,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **strategyId** | **Long**| | [optional] | | **newClientStrategyId** | **String**| | [optional] | | **recvWindow** | **Long**| | [optional] | @@ -867,9 +867,9 @@ No authorization required # **cancelUmOrder** > CancelUmOrderResponse cancelUmOrder(symbol, orderId, origClientOrderId, recvWindow) -Cancel UM Order(TRADE) +Cancel UM Order (TRADE) -Cancel an active UM LIMIT order * Either `orderId` or `origClientOrderId` must be sent. Weight: 1 +Cancel an active UM LIMIT order Weight(IP): 1 Security Type: TRADE Notes: - Either `orderId` or `origClientOrderId` must be sent. ### Example ```java @@ -886,10 +886,10 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long orderId = 56L; // Long | - String origClientOrderId = "origClientOrderId_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long orderId = 1L; // Long | + String origClientOrderId = "1"; // String | + Long recvWindow = 5000L; // Long | try { CancelUmOrderResponse result = apiInstance.cancelUmOrder(symbol, orderId, origClientOrderId, recvWindow); System.out.println(result); @@ -908,7 +908,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **orderId** | **Long**| | [optional] | | **origClientOrderId** | **String**| | [optional] | | **recvWindow** | **Long**| | [optional] | @@ -935,9 +935,9 @@ No authorization required # **cmAccountTradeList** > CmAccountTradeListResponse cmAccountTradeList(symbol, pair, startTime, endTime, fromId, limit, recvWindow) -CM Account Trade List(USER_DATA) +CM Account Trade List (USER_DATA) -Get trades for a specific account and CM symbol. * Either `symbol` or `pair` must be sent * `symbol` and `pair` cannot be sent together * `pair` and `fromId` cannot be sent together * `OrderId` can only be sent together with symbol * If a `pair` is sent, tickers for all symbols of the `pair` will be returned * The parameter `fromId` cannot be sent with `startTime` or `endTime` * If `startTime` and `endTime` are both not sent, then the last '24 hours' data will be returned. * The time between `startTime` and `endTime` cannot be longer than 24 hours. Weight: 20 with symbol, 40 with pair +Get trades for a specific account and CM symbol. Weight: - 20 with `symbol` - 40 with `pair` Security Type: USER_DATA Notes: - Either `symbol` or `pair` must be sent - `symbol` and `pair` cannot be sent together - `pair` and `fromId` cannot be sent together - `OrderId` can only be sent together with symbol - If a `pair` is sent, tickers for all symbols of the `pair` will be returned - The parameter `fromId` cannot be sent with `startTime` or `endTime` - If `startTime` and `endTime` are both not sent, then the last '24 hours' data will be returned. - The time between `startTime` and `endTime` cannot be longer than 24 hours. ### Example ```java @@ -954,13 +954,13 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - String pair = "pair_example"; // String | - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long fromId = 56L; // Long | Trade id to fetch from. Default gets most recent trades. - Long limit = 56L; // Long | Default 100; max 1000 - Long recvWindow = 56L; // Long | + String symbol = "BTCUSD_200626"; // String | + String pair = "BTCUSD"; // String | + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long fromId = 1L; // Long | Trade ID to fetch from. + Long limit = 50L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | try { CmAccountTradeListResponse result = apiInstance.cmAccountTradeList(symbol, pair, startTime, endTime, fromId, limit, recvWindow); System.out.println(result); @@ -983,8 +983,8 @@ public class Example { | **pair** | **String**| | [optional] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **fromId** | **Long**| Trade id to fetch from. Default gets most recent trades. | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **fromId** | **Long**| Trade ID to fetch from. | [optional] | +| **limit** | **Long**| Number of results returned. | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -1009,9 +1009,9 @@ No authorization required # **cmPositionAdlQuantileEstimation** > CmPositionAdlQuantileEstimationResponse cmPositionAdlQuantileEstimation(symbol, recvWindow) -CM Position ADL Quantile Estimation(USER_DATA) +CM Position ADL Quantile Estimation (USER_DATA) -Query CM Position ADL Quantile Estimation * Values update every 30s. * Values 0, 1, 2, 3, 4 shows the queue position and possibility of ADL from low to high. * For positions of the symbol are in One-way Mode or isolated margined in Hedge Mode, \"LONG\", \"SHORT\", and \"BOTH\" will be returned to show the positions' adl quantiles of different position sides. * If the positions of the symbol are crossed margined in Hedge Mode: * \"HEDGE\" as a sign will be returned instead of \"BOTH\"; * A same value caculated on unrealized pnls on long and short sides' positions will be shown for \"LONG\" and \"SHORT\" when there are positions in both of long and short sides. Weight: 5 +Query CM Position ADL Quantile Estimation * Values update every 30s. * Values 0, 1, 2, 3, 4 shows the queue position and possibility of ADL from low to high. * For positions of the symbol are in One-way Mode or isolated margined in Hedge Mode, \"LONG\", \"SHORT\", and \"BOTH\" will be returned to show the positions' adl quantiles of different position sides. * If the positions of the symbol are crossed margined in Hedge Mode: * \"HEDGE\" as a sign will be returned instead of \"BOTH\"; * A same value caculated on unrealized pnls on long and short sides' positions will be shown for \"LONG\" and \"SHORT\" when there are positions in both of long and short sides. Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -1028,8 +1028,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSD_201225"; // String | + Long recvWindow = 5000L; // Long | try { CmPositionAdlQuantileEstimationResponse result = apiInstance.cmPositionAdlQuantileEstimation(symbol, recvWindow); System.out.println(result); @@ -1073,9 +1073,9 @@ No authorization required # **futuresTradfiPerpsContract** > FuturesTradfiPerpsContractResponse futuresTradfiPerpsContract(futuresTradfiPerpsContractRequest) -Futures TradFi Perps Contract(USER_DATA) +Futures TradFi Perps Contract (USER_DATA) -Sign TradFi-Perps agreement contract Weight: 5 +Sign TradFi-Perps agreement contract Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -1111,7 +1111,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **futuresTradfiPerpsContractRequest** | [**FuturesTradfiPerpsContractRequest**](FuturesTradfiPerpsContractRequest.md)| | | +| **futuresTradfiPerpsContractRequest** | [**FuturesTradfiPerpsContractRequest**](FuturesTradfiPerpsContractRequest.md)| | [optional] | ### Return type @@ -1137,7 +1137,7 @@ No authorization required Get UM Futures BNB Burn Status (USER_DATA) -Get user's BNB Fee Discount for UM Futures (Fee Discount On or Fee Discount Off ) Weight: 30 +Get user's BNB Fee Discount for UM Futures (Fee Discount On or Fee Discount Off ) Weight(IP): 30 Security Type: USER_DATA ### Example ```java @@ -1154,7 +1154,7 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { GetUmFuturesBnbBurnStatusResponse result = apiInstance.getUmFuturesBnbBurnStatus(recvWindow); System.out.println(result); @@ -1197,9 +1197,9 @@ No authorization required # **marginAccountBorrow** > MarginAccountBorrowResponse marginAccountBorrow(marginAccountBorrowRequest) -Margin Account Borrow(MARGIN) +Margin Account Borrow (MARGIN) -Apply for a margin loan. Weight: 100 +Apply for a margin loan. Weight(IP): 100 Security Type: MARGIN ### Example ```java @@ -1259,9 +1259,9 @@ No authorization required # **marginAccountNewOco** > MarginAccountNewOcoResponse marginAccountNewOco(marginAccountNewOcoRequest) -Margin Account New OCO(TRADE) +Margin Account New OCO (TRADE) -Send in a new OCO for a margin account * Price Restrictions: * `SELL`: Limit Price > Last Price > Stop Price * `BUY`: Limit Price < Last Price < Stop Price * Quantity Restrictions: * Both legs must have the same quantity * `ICEBERG` quantities however do not have to be the same. * Order Rate Limit * `OCO` counts as 2 orders against the order rate limit. Weight: 1 +Send in a new OCO for a margin account Weight(IP): 1 Security Type: TRADE Notes: - Other Info: - Price Restrictions: - `SELL`: Limit Price > Last Price > Stop Price - `BUY`: Limit Price * Quantity Restrictions: - Both legs must have the same quantity - `ICEBERG` quantities however do not have to be the same. - Order Rate Limit - `OCO` counts as 2 orders against the order rate limit. ### Example ```java @@ -1321,9 +1321,9 @@ No authorization required # **marginAccountRepay** > MarginAccountRepayResponse marginAccountRepay(marginAccountRepayRequest) -Margin Account Repay(MARGIN) +Margin Account Repay (MARGIN) -Repay for a margin loan. Weight: 100 +Repay for a margin loan. Weight(IP): 100 Security Type: MARGIN ### Example ```java @@ -1383,9 +1383,9 @@ No authorization required # **marginAccountRepayDebt** > MarginAccountRepayDebtResponse marginAccountRepayDebt(marginAccountRepayDebtRequest) -Margin Account Repay Debt(TRADE) +Margin Account Repay Debt (TRADE) -Repay debt for a margin loan. * The repay asset amount cannot exceed 50000 USD equivalent value for a single request. * If `amount` is not sent, all the asset loan will be repaid if having enough specific repay assets. * If `amount` is sent, only the certain amount of the asset loan will be repaid if having enough specific repay assets. * The system will use the same asset to repay the loan first (if have) no matter whether put the asset in `specifyRepayAssets` Weight: 3000 +Repay debt for a margin loan. Weight(IP): 3000 Security Type: TRADE Notes: - The repay asset amount cannot exceed 50000 USD equivalent value for a single request. - If `amount` is not sent, all the asset loan will be repaid if having enough specific repay assets. - If `amount` is sent, only the certain amount of the asset loan will be repaid if having enough specific repay assets. - The system will use the same asset to repay the loan first (if have) no matter whether put the asset in `specifyRepayAssets` ### Example ```java @@ -1447,7 +1447,7 @@ No authorization required Margin Account Trade List (USER_DATA) -Margin Account Trade List Weight: 5 +Margin Account Trade List Weight(IP): 5 Security Type: USER_DATA Notes: - **Note:** * If `fromId` is set, returns orders with id >= `fromId`; otherwise returns recent order history. - The interval between `startTime` and `endTime` must be less than 24 hours. ### Example ```java @@ -1464,13 +1464,13 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long orderId = 56L; // Long | - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long fromId = 56L; // Long | Trade id to fetch from. Default gets most recent trades. - Long limit = 56L; // Long | Default 100; max 1000 - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long orderId = 1L; // Long | + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long fromId = 1L; // Long | Trade ID to fetch from. + Long limit = 500L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | Value cannot be greater than 60000 try { MarginAccountTradeListResponse result = apiInstance.marginAccountTradeList(symbol, orderId, startTime, endTime, fromId, limit, recvWindow); System.out.println(result); @@ -1489,13 +1489,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **orderId** | **Long**| | [optional] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **fromId** | **Long**| Trade id to fetch from. Default gets most recent trades. | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **fromId** | **Long**| Trade ID to fetch from. | [optional] | +| **limit** | **Long**| Number of results returned. | [optional] | +| **recvWindow** | **Long**| Value cannot be greater than 60000 | [optional] | ### Return type @@ -1519,9 +1519,9 @@ No authorization required # **modifyCmOrder** > ModifyCmOrderResponse modifyCmOrder(modifyCmOrderRequest) -Modify CM Order(TRADE) +Modify CM Order (TRADE) -Order modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queue * Either `orderId` or `origClientOrderId` must be sent, and the `orderId` will prevail if both are sent. * Both `quantity` and `price` must be sent * When the new `quantity` or `price` doesn'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 `quantity` <= `executedQty` * When the order is `GTX` and the new price will cause it to be executed immediately Weight: 1 +Order modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queue Weight(IP): 1 Security Type: TRADE Notes: - Either `orderId` or `origClientOrderId` must be sent, and the `orderId` will prevail if both are sent. - Both `quantity` and `price` must be sent - When the new `quantity` or `price` doesn'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 `quantity` * When the order is `GTX` and the new price will cause it to be executed immediately ### Example ```java @@ -1581,9 +1581,9 @@ No authorization required # **modifyUmOrder** > ModifyUmOrderResponse modifyUmOrder(modifyUmOrderRequest) -Modify UM Order(TRADE) +Modify UM Order (TRADE) -Order modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queue * Either orderId or origClientOrderId must be sent, and the orderId will prevail if both are sent. * Both quantity and price must be sent * When the new quantity or price doesn'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 quantity <= executedQty * When the order is GTX and the new price will cause it to be executed immediately Weight: 1 +Order modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queue Weight(IP): 1 Security Type: TRADE Notes: - Either orderId or origClientOrderId must be sent, and the orderId will prevail if both are sent. - Both quantity and price must be sent - When the new quantity or price doesn'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 quantity * When the order is GTX and the new price will cause it to be executed immediately ### Example ```java @@ -1643,9 +1643,9 @@ No authorization required # **newCmConditionalOrder** > NewCmConditionalOrderResponse newCmConditionalOrder(newCmConditionalOrderRequest) -New CM Conditional Order(TRADE) +New CM Conditional Order (TRADE) -New CM Conditional Order * Order with type `STOP/TAKE_PROFIT`, parameter `timeInForce` can be sent ( default `GTC`). * Condition orders will be triggered when: * `STOP`, `STOP_MARKET`: * BUY: \"MARK_PRICE\" >= `stopPrice` * SELL: \"MARK_PRICE\" <= `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: \"MARK_PRICE\" <= `stopPrice` * SELL: \"MARK_PRICE\" >= `stopPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest mark price after order placed `<= `activationPrice`, and the latest mark price >`= the lowest mark price * (1 + `callbackRate`) * SELL: the highest mark price after order placed >= `activationPrice`, and the latest mark price <= the highest mark price * (1 - `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. `{\"code\": -2021, \"msg\": \"Order would immediately trigger.\"}` means that the parameters you send do not meet the following requirements: * BUY: `activationPrice` should be smaller than latest mark price. * SELL: `activationPrice` should be larger than latest mark price. * Condition orders will be triggered when: * If parameter`priceProtect`is sent as true: * when price reaches the `stopPrice` ,the difference rate between \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the symbol * \"triggerProtect\" of a symbol can be got from `GET /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` Weight: 1 +New CM Conditional Order Weight(IP): 1 Security Type: TRADE Notes: - Additional mandatory parameters based on type: - Order with type `STOP/TAKE_PROFIT`, parameter `timeInForce` can be sent ( default `GTC`). - Condition orders will be triggered when: - `STOP`, `STOP_MARKET`: - BUY: \"MARK_PRICE\" >= `stopPrice` - SELL: \"MARK_PRICE\" = `stopPrice` - `TRAILING_STOP_MARKET`: - BUY: the lowest mark price after order placed ``= the lowest mark price - (1 + `callbackRate`) - SELL: the highest mark price after order placed >= `activationPrice`, and the latest mark price = `stopPrice` - SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") = `stopPrice` ### Example ```java @@ -1705,9 +1705,9 @@ No authorization required # **newCmOrder** > NewCmOrderResponse newCmOrder(newCmOrderRequest) -New CM Order(TRADE) +New CM Order (TRADE) -Place new CM order * If `newOrderRespType` is sent as `RESULT` : * `MARKET` order: the final FILLED result of the order will be return directly. * `LIMIT` order with special `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be returned directly. Weight: 1 +Place new CM order Weight(IP): 1 Security Type: TRADE Notes: - Additional mandatory parameters based on `type`: - If `newOrderRespType` is sent as `RESULT` : - `MARKET` order: the final FILLED result of the order will be return directly. - `LIMIT` order with special `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be returned directly. ### Example ```java @@ -1767,9 +1767,9 @@ No authorization required # **newMarginOrder** > NewMarginOrderResponse newMarginOrder(newMarginOrderRequest) -New Margin Order(TRADE) +New Margin Order (TRADE) -New Margin Order Weight: 1 +New Margin Order Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -1831,7 +1831,7 @@ No authorization required New UM Algo Order (TRADE) -Place new UM conditional order * Algo order with type `STOP`, parameter `timeInForce` can be sent ( default `GTC`). * Algo order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent ( default `GTC`). * Condition orders will be triggered when: * If parameter`priceProtect`is sent as true: * when price reaches the `triggerPrice` , the difference rate between \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the symbol * \"triggerProtect\" of a symbol can be got from `GET /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `triggerPrice` * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `triggerPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `triggerPrice` * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `triggerPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed <= `activatePrice`, and the latest price >= the lowest price * (1 + `callbackRate`) * SELL: the highest price after order placed >= `activatePrice`, and the latest price <= the highest price * (1 - `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. ``{\"code\": -2021, \"msg\": \"Order would immediately trigger.\"}`` means that the parameters you send do not meet the following requirements: * BUY: `activatePrice` should be smaller than latest price. * SELL: `activatePrice` should be larger than latest price. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with `closePosition`=`true`: * Follow the same rules for condition orders. * If triggered, **close all** current long position( if `SELL`) or current short position( if `BUY`). * Cannot be used with `quantity` paremeter * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with `BUY` orders in `LONG` position side. and cannot be used with `SELL` orders in `SHORT` position side * `selfTradePreventionMode` is only effective when `timeInForce` set to `IOC` or `GTC` or `GTD`. Weight: 1 +Place new UM conditional order Weight(IP): 1 Security Type: TRADE Notes: - Algo order with type `STOP`, parameter `timeInForce` can be sent (default `GTC`). - Algo order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent (default `GTC`). - Condition orders will be triggered when price reaches the `triggerPrice`. - `STOP`, `STOP_MARKET`: BUY: latest price >= `triggerPrice`; SELL: latest price <= `triggerPrice`. - `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: BUY: latest price <= `triggerPrice`; SELL: latest price >= `triggerPrice`. - `TRAILING_STOP_MARKET`: BUY: lowest price after order placed <= `activatePrice`, and latest price >= lowest price * (1 + `callbackRate`); SELL: highest price after order placed >= `activatePrice`, and latest price <= highest price * (1 - `callbackRate`). - `selfTradePreventionMode` is only effective when `timeInForce` set to `IOC` or `GTC` or `GTD`. ### Example ```java @@ -1891,9 +1891,9 @@ No authorization required # **newUmConditionalOrder** > NewUmConditionalOrderResponse newUmConditionalOrder(newUmConditionalOrderRequest) -New UM Conditional Order +New UM Conditional Order (TRADE) -Place new UM conditional order * Order with type `STOP/TAKE_PROFIT`, parameter `timeInForce` can be sent ( default `GTC`). * Condition orders will be triggered when: * `STOP`, `STOP_MARKET`: * BUY: \"MARK_PRICE\" >= `stopPrice` * SELL: \"MARK_PRICE\" <= `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: \"MARK_PRICE\" <= `stopPrice` * SELL: \"MARK_PRICE\" >= `stopPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest mark price after order placed `<= `activationPrice`, and the latest mark price >`= the lowest mark price * (1 + `callbackRate`) * SELL: the highest mark price after order placed >= `activationPrice`, and the latest mark price <= the highest mark price * (1 - `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. `{\"code\": -2021, \"msg\": \"Order would immediately trigger.\"}` means that the parameters you send do not meet the following requirements: * BUY: `activationPrice` should be smaller than latest mark price. * SELL: `activationPrice` should be larger than latest mark price. * Condition orders will be triggered when: * If parameter`priceProtect`is sent as true: * when price reaches the `stopPrice` ,the difference rate between \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the symbol * \"triggerProtect\" of a symbol can be got from `GET /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * `selfTradePreventionMode` is only effective when `timeInForce` set to `IOC` or `GTC` or `GTD`. * In extreme market conditions, timeInForce `GTD` order auto cancel time might be delayed comparing to `goodTillDate` Weight: 1 +Place new UM conditional order Weight(IP): 1 Security Type: TRADE Notes: - Additional mandatory parameters based on type: - Order with type `STOP/TAKE_PROFIT`, parameter `timeInForce` can be sent ( default `GTC`). - Condition orders will be triggered when: - `STOP`, `STOP_MARKET`: - BUY: \"MARK_PRICE\" >= `stopPrice` - SELL: \"MARK_PRICE\" = `stopPrice` - `TRAILING_STOP_MARKET`: - BUY: the lowest mark price after order placed ``= the lowest mark price - (1 + `callbackRate`) - SELL: the highest mark price after order placed >= `activationPrice`, and the latest mark price = `stopPrice` - SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") = `stopPrice` - `selfTradePreventionMode` is only effective when `timeInForce` set to `IOC` or `GTC` or `GTD`. - In extreme market conditions, timeInForce `GTD` order auto cancel time might be delayed comparing to `goodTillDate` ### Example ```java @@ -1955,7 +1955,7 @@ No authorization required New UM Order (TRADE) -Place new UM order * If `newOrderRespType` is sent as `RESULT` : * `MARKET` order: the final FILLED result of the order will be return directly. * `LIMIT` order with special `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be returned directly. * `selfTradePreventionMode` is only effective when `timeInForce` set to `IOC` or `GTC` or `GTD`. * In extreme market conditions, timeInForce `GTD` order auto cancel time might be delayed comparing to `goodTillDate` Weight: 1 +Place new UM order Weight(IP): 1 Security Type: TRADE Notes: - Additional mandatory parameters based on type: - If `newOrderRespType` is sent as `RESULT` : - `MARKET` order: the final FILLED result of the order will be return directly. - `LIMIT` order with special `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be returned directly. - `selfTradePreventionMode` is only effective when `timeInForce` set to `IOC` or `GTC` or `GTD`. - In extreme market conditions, timeInForce `GTD` order auto cancel time might be delayed comparing to `goodTillDate` ### Example ```java @@ -2015,9 +2015,9 @@ No authorization required # **queryAllCmConditionalOrders** > QueryAllCmConditionalOrdersResponse queryAllCmConditionalOrders(symbol, strategyId, startTime, endTime, limit, recvWindow) -Query All CM Conditional Orders(USER_DATA) +Query All CM Conditional Orders (USER_DATA) -Query All CM Conditional Orders * These orders will not be found: * order strategyStatus is `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** * created time + 7 days < current time * The query time period must be less than 7 days( default as the recent 7 days). Weight: 1 for a single symbol; 40 when the symbol parameter is omitted +Query All CM Conditional Orders Weight: - 1 for a single `symbol` - 40 when `symbol` is omitted Security Type: USER_DATA Notes: - These orders will not be found: - order strategyStatus is `CANCELED` or `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 7 days * The query time period must be less than 7 days( default as the recent 7 days). ### Example ```java @@ -2034,12 +2034,12 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long strategyId = 56L; // Long | - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long limit = 56L; // Long | Default 100; max 1000 - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | + Long strategyId = 1L; // Long | + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long limit = 500L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | try { QueryAllCmConditionalOrdersResponse result = apiInstance.queryAllCmConditionalOrders(symbol, strategyId, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -2062,7 +2062,7 @@ public class Example { | **strategyId** | **Long**| | [optional] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **limit** | **Long**| Number of results returned. | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -2089,7 +2089,7 @@ No authorization required Query All CM Orders (USER_DATA) -Get all account CM orders; active, canceled, or filled. * Either `symbol` or `pair` must be sent. * If `orderId` is set, it will get orders >= that orderId. Otherwise most recent orders are returned. * These orders will not be found: * order status is `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** * created time + 3 days < current time Weight: 20 with symbol, 40 with pair +Get all account CM orders; active, canceled, or filled. Weight: - 20 with `symbol` - 40 with `pair` Security Type: USER_DATA Notes: - Either `symbol` or `pair` must be sent. - If `orderId` is set, it will get orders >= that orderId. Otherwise most recent orders are returned. - These orders will not be found: - order status is `CANCELED` or `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 3 days < current time ### Example ```java @@ -2106,13 +2106,13 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - String pair = "pair_example"; // String | - Long orderId = 56L; // Long | - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long limit = 56L; // Long | Default 100; max 1000 - Long recvWindow = 56L; // Long | + String symbol = "BTCUSD_200925"; // String | Symbol + String pair = "BTCUSD"; // String | + Long orderId = 1L; // Long | + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long limit = 500L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | try { QueryAllCmOrdersResponse result = apiInstance.queryAllCmOrders(symbol, pair, orderId, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -2131,12 +2131,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | [optional] | | **pair** | **String**| | [optional] | | **orderId** | **Long**| | [optional] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **limit** | **Long**| Number of results returned. | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -2163,7 +2163,7 @@ No authorization required Query All Current CM Open Conditional Orders (USER_DATA) -Get all open conditional orders on a symbol. **Careful** when accessing this with no symbol. * If the symbol is not sent, orders for all symbols will be returned in an array. Weight: 1 for a single symbol; 40 when the symbol parameter is omitted +Get all open conditional orders on a symbol. **Careful** when accessing this with no symbol. Weight: - 1 for a single `symbol` - 40 when `symbol` is omitted Security Type: USER_DATA Notes: - If the symbol is not sent, orders for all symbols will be returned in an array. ### Example ```java @@ -2180,8 +2180,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSD"; // String | + Long recvWindow = 5000L; // Long | try { QueryAllCurrentCmOpenConditionalOrdersResponse result = apiInstance.queryAllCurrentCmOpenConditionalOrders(symbol, recvWindow); System.out.println(result); @@ -2225,9 +2225,9 @@ No authorization required # **queryAllCurrentCmOpenOrders** > QueryAllCurrentCmOpenOrdersResponse queryAllCurrentCmOpenOrders(symbol, pair, recvWindow) -Query All Current CM Open Orders(USER_DATA) +Query All Current CM Open Orders (USER_DATA) -Get all open orders on a symbol. * If the symbol is not sent, orders for all symbols will be returned in an array. Weight: 1 for a single symbol; 40 when the symbol parameter is omitted Careful when accessing this with no symbol. +Get all open orders on a symbol. * If the symbol is not sent, orders for all symbols will be returned in an array. Weight: - 1 for a single `symbol` - 40 when `symbol` is omitted Security Type: USER_DATA ### Example ```java @@ -2244,9 +2244,9 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - String pair = "pair_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSD_200925"; // String | + String pair = "BTCUSD"; // String | + Long recvWindow = 5000L; // Long | try { QueryAllCurrentCmOpenOrdersResponse result = apiInstance.queryAllCurrentCmOpenOrders(symbol, pair, recvWindow); System.out.println(result); @@ -2293,7 +2293,7 @@ No authorization required Query All Current UM Open Algo Orders (USER_DATA) -Get all UM open algo orders on a symbol. * If the symbol is not sent, orders for all symbols will be returned in an array. Weight: 1 for a single symbol; 40 when the symbol parameter is omitted Careful when accessing this with no symbol. +Get all UM open algo orders on a symbol. If the symbol is not sent, orders for all symbols will be returned. Weight(IP): 1 Security Type: USER_DATA Notes: - Weight: 1 for a single symbol; 40 when the symbol parameter is omitted. ### Example ```java @@ -2310,10 +2310,10 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String algoType = "algoType_example"; // String | - String symbol = "symbol_example"; // String | - Long algoId = 56L; // Long | - Long recvWindow = 56L; // Long | + String algoType = "CONDITIONAL"; // String | + String symbol = "BNBUSDT"; // String | + Long algoId = 2146760L; // Long | + Long recvWindow = 5000L; // Long | try { QueryAllCurrentUmOpenAlgoOrdersResponse result = apiInstance.queryAllCurrentUmOpenAlgoOrders(algoType, symbol, algoId, recvWindow); System.out.println(result); @@ -2353,15 +2353,15 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | All Current UM Open Algo Orders | - | +| **200** | Query All Current UM Open Algo Orders | - | # **queryAllCurrentUmOpenConditionalOrders** > QueryAllCurrentUmOpenConditionalOrdersResponse queryAllCurrentUmOpenConditionalOrders(symbol, recvWindow) -Query All Current UM Open Conditional Orders +Query All Current UM Open Conditional Orders (USER_DATA) -Get all open conditional orders on a symbol. * If the symbol is not sent, orders for all symbols will be returned in an array. Weight: 1 for a single symbol; 40 when the symbol parameter is omitted Careful when accessing this with no symbol. +Get all open conditional orders on a symbol. Weight: - 1 for a single `symbol` - 40 when `symbol` is omitted Security Type: USER_DATA Notes: - If `symbol` is not provided, conditional open orders for all symbols are returned. ### Example ```java @@ -2378,8 +2378,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | + Long recvWindow = 5000L; // Long | try { QueryAllCurrentUmOpenConditionalOrdersResponse result = apiInstance.queryAllCurrentUmOpenConditionalOrders(symbol, recvWindow); System.out.println(result); @@ -2423,9 +2423,9 @@ No authorization required # **queryAllCurrentUmOpenOrders** > QueryAllCurrentUmOpenOrdersResponse queryAllCurrentUmOpenOrders(symbol, recvWindow) -Query All Current UM Open Orders(USER_DATA) +Query All Current UM Open Orders (USER_DATA) -Get all open orders on a symbol. * If the symbol is not sent, orders for all symbols will be returned in an array. Weight: 1 for a single symbol; 40 when the symbol parameter is omitted +Get all open orders on a symbol. Weight: - 1 for a single `symbol` - 40 when `symbol` is omitted Security Type: USER_DATA Notes: - If the symbol is not sent, orders for all symbols will be returned in an array. ### Example ```java @@ -2442,8 +2442,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | + Long recvWindow = 5000L; // Long | try { QueryAllCurrentUmOpenOrdersResponse result = apiInstance.queryAllCurrentUmOpenOrders(symbol, recvWindow); System.out.println(result); @@ -2489,7 +2489,7 @@ No authorization required Query All Margin Account Orders (USER_DATA) -Query All Margin Account Orders Weight: 100 +Query All Margin Account Orders Weight(IP): 100 Security Type: USER_DATA Notes: - If `orderId` is set, returns orders with id >= `orderId`; otherwise returns recent order history. - For some historical orders, `cummulativeQuoteQty < 0` means the data is unavailable at this time. ### Example ```java @@ -2506,12 +2506,12 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long orderId = 56L; // Long | - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long limit = 56L; // Long | Default 100; max 1000 - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long orderId = 1L; // Long | + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long limit = 500L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | Value cannot be greater than 60000 try { QueryAllMarginAccountOrdersResponse result = apiInstance.queryAllMarginAccountOrders(symbol, orderId, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -2530,12 +2530,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **orderId** | **Long**| | [optional] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **limit** | **Long**| Number of results returned. | [optional] | +| **recvWindow** | **Long**| Value cannot be greater than 60000 | [optional] | ### Return type @@ -2559,9 +2559,9 @@ No authorization required # **queryAllUmConditionalOrders** > QueryAllUmConditionalOrdersResponse queryAllUmConditionalOrders(symbol, strategyId, startTime, endTime, limit, recvWindow) -Query All UM Conditional Orders +Query All UM Conditional Orders (USER_DATA) -Query All UM Conditional Orders * These orders will not be found: * order strategyStatus is `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** * created time + 7 days < current time * The query time period must be less than 7 days( default as the recent 7 days). Weight: 1 for a single symbol; 40 when the symbol parameter is omitted +Query All UM Conditional Orders Weight: - 1 for a single `symbol` - 40 when `symbol` is omitted Security Type: USER_DATA Notes: - These orders will not be found: - order strategyStatus is `CANCELED` or `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 7 days * The query time period must be less than 7 days( default as the recent 7 days). ### Example ```java @@ -2578,12 +2578,12 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long strategyId = 56L; // Long | - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long limit = 56L; // Long | Default 100; max 1000 - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | + Long strategyId = 1L; // Long | + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long limit = 500L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | try { QueryAllUmConditionalOrdersResponse result = apiInstance.queryAllUmConditionalOrders(symbol, strategyId, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -2606,7 +2606,7 @@ public class Example { | **strategyId** | **Long**| | [optional] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **limit** | **Long**| Number of results returned. | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -2631,9 +2631,9 @@ No authorization required # **queryAllUmOrders** > QueryAllUmOrdersResponse queryAllUmOrders(symbol, orderId, startTime, endTime, limit, recvWindow) -Query All UM Orders(USER_DATA) +Query All UM Orders (USER_DATA) -Get all account UM orders; active, canceled, or filled. * These orders will not be found: * order status is `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** * created time + 3 days < current time * If `orderId` is set, it will get orders >= that orderId. Otherwise most recent orders are returned. * The query time period must be less then 7 days( default as the recent 7 days). Weight: 5 +Get all account UM orders; active, canceled, or filled. Weight(IP): 5 Security Type: USER_DATA Notes: - If `orderId` is set, it will get orders >= that orderId. Otherwise most recent orders are returned. - The query time period must be less then 7 days( default as the recent 7 days). ### Example ```java @@ -2650,12 +2650,12 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long orderId = 56L; // Long | - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long limit = 56L; // Long | Default 100; max 1000 - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long orderId = 1L; // Long | + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long limit = 500L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | try { QueryAllUmOrdersResponse result = apiInstance.queryAllUmOrders(symbol, orderId, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -2674,11 +2674,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **orderId** | **Long**| | [optional] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **limit** | **Long**| Number of results returned. | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -2703,9 +2703,9 @@ No authorization required # **queryCmConditionalOrderHistory** > QueryCmConditionalOrderHistoryResponse queryCmConditionalOrderHistory(symbol, strategyId, newClientStrategyId, recvWindow) -Query CM Conditional Order History(USER_DATA) +Query CM Conditional Order History (USER_DATA) -Query CM Conditional Order History * Either `strategyId` or `newClientStrategyId` must be sent. * `NEW` orders will not be found. * These orders will not be found: * order status is `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** * created time + 7 days < current time Weight: 1 +Query CM Conditional Order History Weight(IP): 1 Security Type: USER_DATA Notes: - Either `strategyId` or `newClientStrategyId` must be sent. - `NEW` orders will not be found. - These orders will not be found: - order status is `CANCELED` or `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 7 days < current time ### Example ```java @@ -2722,10 +2722,10 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long strategyId = 56L; // Long | - String newClientStrategyId = "newClientStrategyId_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long strategyId = 1L; // Long | + String newClientStrategyId = "1"; // String | + Long recvWindow = 5000L; // Long | try { QueryCmConditionalOrderHistoryResponse result = apiInstance.queryCmConditionalOrderHistory(symbol, strategyId, newClientStrategyId, recvWindow); System.out.println(result); @@ -2744,7 +2744,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **strategyId** | **Long**| | [optional] | | **newClientStrategyId** | **String**| | [optional] | | **recvWindow** | **Long**| | [optional] | @@ -2771,9 +2771,9 @@ No authorization required # **queryCmModifyOrderHistory** > QueryCmModifyOrderHistoryResponse queryCmModifyOrderHistory(symbol, orderId, origClientOrderId, startTime, endTime, limit, recvWindow) -Query CM Modify Order History(TRADE) +Query CM Modify Order History (TRADE) -Get order modification history * Either `orderId` or `origClientOrderId` must be sent, and the `orderId` will prevail if both are sent. Weight: 1 +Get order modification history Weight(IP): 1 Security Type: TRADE Notes: - Either `orderId` or `origClientOrderId` must be sent, and the `orderId` will prevail if both are sent. ### Example ```java @@ -2790,13 +2790,13 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long orderId = 56L; // Long | - String origClientOrderId = "origClientOrderId_example"; // String | - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long limit = 56L; // Long | Default 100; max 1000 - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long orderId = 1L; // Long | Order ID + String origClientOrderId = "1"; // String | Client order ID + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long limit = 500L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | try { QueryCmModifyOrderHistoryResponse result = apiInstance.queryCmModifyOrderHistory(symbol, orderId, origClientOrderId, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -2815,12 +2815,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | -| **orderId** | **Long**| | [optional] | -| **origClientOrderId** | **String**| | [optional] | +| **symbol** | **String**| Symbol | | +| **orderId** | **Long**| Order ID | [optional] | +| **origClientOrderId** | **String**| Client order ID | [optional] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **limit** | **Long**| Number of results returned. | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -2845,9 +2845,9 @@ No authorization required # **queryCmOrder** > QueryCmOrderResponse queryCmOrder(symbol, orderId, origClientOrderId, recvWindow) -Query CM Order(USER_DATA) +Query CM Order (USER_DATA) -Check an CM order's status. * Either `orderId` or `origClientOrderId` must be sent. * These orders will not be found: * order status is `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** * created time + 3 days < current time Weight: 1 +Check an CM order's status. Weight(IP): 1 Security Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be sent. - These orders will not be found: - order status is `CANCELED` or `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 3 days < current time ### Example ```java @@ -2864,10 +2864,10 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long orderId = 56L; // Long | - String origClientOrderId = "origClientOrderId_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSD_200925"; // String | Symbol + Long orderId = 1L; // Long | + String origClientOrderId = "1"; // String | + Long recvWindow = 5000L; // Long | try { QueryCmOrderResponse result = apiInstance.queryCmOrder(symbol, orderId, origClientOrderId, recvWindow); System.out.println(result); @@ -2886,7 +2886,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **orderId** | **Long**| | [optional] | | **origClientOrderId** | **String**| | [optional] | | **recvWindow** | **Long**| | [optional] | @@ -2913,9 +2913,9 @@ No authorization required # **queryCurrentCmOpenConditionalOrder** > QueryCurrentCmOpenConditionalOrderResponse queryCurrentCmOpenConditionalOrder(symbol, strategyId, newClientStrategyId, recvWindow) -Query Current CM Open Conditional Order(USER_DATA) +Query Current CM Open Conditional Order (USER_DATA) -Query Current CM Open Conditional Order * Either `strategyId` or `newClientStrategyId` must be sent. * If the queried order has been triggered, cancelled or expired, the error message \"Order does not exist\" will be returned. Weight: 1 +Query Current CM Open Conditional Order Weight(IP): 1 Security Type: USER_DATA Notes: - Either `strategyId` or `newClientStrategyId` must be sent. - If the queried order has been triggered, cancelled or expired, the error message \"Order does not exist\" will be returned. ### Example ```java @@ -2932,10 +2932,10 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long strategyId = 56L; // Long | - String newClientStrategyId = "newClientStrategyId_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSD_200925"; // String | Symbol + Long strategyId = 1L; // Long | + String newClientStrategyId = "1"; // String | + Long recvWindow = 5000L; // Long | try { QueryCurrentCmOpenConditionalOrderResponse result = apiInstance.queryCurrentCmOpenConditionalOrder(symbol, strategyId, newClientStrategyId, recvWindow); System.out.println(result); @@ -2954,7 +2954,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **strategyId** | **Long**| | [optional] | | **newClientStrategyId** | **String**| | [optional] | | **recvWindow** | **Long**| | [optional] | @@ -2983,7 +2983,7 @@ No authorization required Query Current CM Open Order (USER_DATA) -Query current CM open order * Either `orderId` or `origClientOrderId` must be sent. * If the queried order has been filled or cancelled, the error message \"Order does not exist\" will be returned. Weight: 1 +Query current CM open order Weight(IP): 1 Security Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be sent. - If the queried order has been filled or cancelled, the error message \"Order does not exist\" will be returned. ### Example ```java @@ -3000,10 +3000,10 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long orderId = 56L; // Long | - String origClientOrderId = "origClientOrderId_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Trading pair. + Long orderId = 1917641L; // Long | Order ID. + String origClientOrderId = "abc"; // String | User-defined order ID. + Long recvWindow = 5000L; // Long | try { QueryCurrentCmOpenOrderResponse result = apiInstance.queryCurrentCmOpenOrder(symbol, orderId, origClientOrderId, recvWindow); System.out.println(result); @@ -3022,9 +3022,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | -| **orderId** | **Long**| | [optional] | -| **origClientOrderId** | **String**| | [optional] | +| **symbol** | **String**| Trading pair. | | +| **orderId** | **Long**| Order ID. | [optional] | +| **origClientOrderId** | **String**| User-defined order ID. | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -3051,7 +3051,7 @@ No authorization required Query Current Margin Open Order (USER_DATA) -Query Current Margin Open Order Weight: 5 +Query Current Margin Open Order Weight(IP): 5 Security Type: USER_DATA Notes: - If `symbol` is not sent, order records for all symbols are returned. - When returning all symbols, the request count charged to the rate limiter equals the number of symbols currently trading on the exchange. ### Example ```java @@ -3068,8 +3068,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long recvWindow = 5000L; // Long | Value cannot be greater than 60000 try { QueryCurrentMarginOpenOrderResponse result = apiInstance.queryCurrentMarginOpenOrder(symbol, recvWindow); System.out.println(result); @@ -3088,8 +3088,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | -| **recvWindow** | **Long**| | [optional] | +| **symbol** | **String**| Symbol | | +| **recvWindow** | **Long**| Value cannot be greater than 60000 | [optional] | ### Return type @@ -3115,7 +3115,7 @@ No authorization required Query Current UM Open Algo Order (USER_DATA) -Check an UM algo order's status. * These orders will not be found: * order status is `CANCELED` or `EXPIRED` **AND** order has NO filled trade **AND** created time + 3 days < current time * order create time + 90 days < current time * Either `algoId` or `clientAlgoId` must be sent. * `algoId` is self-increment for each specific `symbol` Weight: 1 +Check an UM algo order's status. Orders will not be found if: status is CANCELED/EXPIRED with no fills and created 3+ days ago; or created 90+ days ago. Weight(IP): 1 Security Type: USER_DATA Notes: - Either `algoId` or `clientAlgoId` must be sent. `algoId` is self-increment for each specific `symbol`. ### Example ```java @@ -3132,9 +3132,9 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - Long algoId = 56L; // Long | - String clientAlgoId = "clientAlgoId_example"; // String | - Long recvWindow = 56L; // Long | + Long algoId = 2146760L; // Long | Algo order ID + String clientAlgoId = "6B2I9XVcJpCjqPAJ4YoFX7"; // String | Client algo order ID + Long recvWindow = 5000L; // Long | try { QueryCurrentUmOpenAlgoOrderResponse result = apiInstance.queryCurrentUmOpenAlgoOrder(algoId, clientAlgoId, recvWindow); System.out.println(result); @@ -3153,8 +3153,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **algoId** | **Long**| | [optional] | -| **clientAlgoId** | **String**| | [optional] | +| **algoId** | **Long**| Algo order ID | [optional] | +| **clientAlgoId** | **String**| Client algo order ID | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -3173,15 +3173,15 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Current UM Open Algo Order | - | +| **200** | Query UM Algo Order | - | # **queryCurrentUmOpenConditionalOrder** > QueryCurrentUmOpenConditionalOrderResponse queryCurrentUmOpenConditionalOrder(symbol, strategyId, newClientStrategyId, recvWindow) -Query Current UM Open Conditional Order +Query Current UM Open Conditional Order (USER_DATA) -Query Current UM Open Conditional Order * Either `strategyId` or `newClientStrategyId` must be sent. * If the queried order has been `CANCELED`, `TRIGGERED` or `EXPIRED`, the error message \"Order does not exist\" will be returned. Weight: 1 +Query Current UM Open Conditional Order Weight(IP): 1 Security Type: USER_DATA Notes: - Either `strategyId` or `newClientStrategyId` must be sent. - If the queried order has been `CANCELED`, `TRIGGERED` or `EXPIRED`, the error message \"Order does not exist\" will be returned. ### Example ```java @@ -3198,10 +3198,10 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long strategyId = 56L; // Long | - String newClientStrategyId = "newClientStrategyId_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long strategyId = 1L; // Long | + String newClientStrategyId = "1"; // String | + Long recvWindow = 5000L; // Long | try { QueryCurrentUmOpenConditionalOrderResponse result = apiInstance.queryCurrentUmOpenConditionalOrder(symbol, strategyId, newClientStrategyId, recvWindow); System.out.println(result); @@ -3220,7 +3220,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **strategyId** | **Long**| | [optional] | | **newClientStrategyId** | **String**| | [optional] | | **recvWindow** | **Long**| | [optional] | @@ -3247,9 +3247,9 @@ No authorization required # **queryCurrentUmOpenOrder** > QueryCurrentUmOpenOrderResponse queryCurrentUmOpenOrder(symbol, orderId, origClientOrderId, recvWindow) -Query Current UM Open Order(USER_DATA) +Query Current UM Open Order (USER_DATA) -Query current UM open order * Either `orderId` or `origClientOrderId` must be sent. * If the queried order has been filled or cancelled, the error message \"Order does not exist\" will be returned. Weight: 1 +Query current UM open order Weight(IP): 1 Security Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be sent. - If the queried order has been filled or cancelled, the error message \"Order does not exist\" will be returned. ### Example ```java @@ -3266,10 +3266,10 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long orderId = 56L; // Long | - String origClientOrderId = "origClientOrderId_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long orderId = 1L; // Long | + String origClientOrderId = "1"; // String | + Long recvWindow = 5000L; // Long | try { QueryCurrentUmOpenOrderResponse result = apiInstance.queryCurrentUmOpenOrder(symbol, orderId, origClientOrderId, recvWindow); System.out.println(result); @@ -3288,7 +3288,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **orderId** | **Long**| | [optional] | | **origClientOrderId** | **String**| | [optional] | | **recvWindow** | **Long**| | [optional] | @@ -3317,7 +3317,7 @@ No authorization required Query Margin Account Order (USER_DATA) -Query Margin Account Order Weight: 10 +Query Margin Account Order Weight(IP): 10 Security Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be sent. - For some historical orders, `cummulativeQuoteQty < 0` means the data is unavailable at this time. ### Example ```java @@ -3334,10 +3334,10 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long orderId = 56L; // Long | - String origClientOrderId = "origClientOrderId_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long orderId = 1L; // Long | + String origClientOrderId = "1"; // String | + Long recvWindow = 5000L; // Long | Value cannot be greater than 60000 try { QueryMarginAccountOrderResponse result = apiInstance.queryMarginAccountOrder(symbol, orderId, origClientOrderId, recvWindow); System.out.println(result); @@ -3356,10 +3356,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **orderId** | **Long**| | [optional] | | **origClientOrderId** | **String**| | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Value cannot be greater than 60000 | [optional] | ### Return type @@ -3385,7 +3385,7 @@ No authorization required Query Margin Account's all OCO (USER_DATA) -Query all OCO for a specific margin account based on provided optional parameters Weight: 100 +Query all OCO for a specific margin account based on provided optional parameters Weight(IP): 100 Security Type: USER_DATA ### Example ```java @@ -3402,11 +3402,11 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - Long fromId = 56L; // Long | Trade id to fetch from. Default gets most recent trades. - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long limit = 56L; // Long | Default 100; max 1000 - Long recvWindow = 56L; // Long | + Long fromId = 1L; // Long | Trade ID to fetch from. + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long limit = 500L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | Value cannot be greater than 60000 try { QueryMarginAccountsAllOcoResponse result = apiInstance.queryMarginAccountsAllOco(fromId, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -3425,11 +3425,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **fromId** | **Long**| Trade id to fetch from. Default gets most recent trades. | [optional] | +| **fromId** | **Long**| Trade ID to fetch from. | [optional] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **limit** | **Long**| Number of results returned. | [optional] | +| **recvWindow** | **Long**| Value cannot be greater than 60000 | [optional] | ### Return type @@ -3455,7 +3455,7 @@ No authorization required Query Margin Account's OCO (USER_DATA) -Retrieves a specific OCO based on provided optional parameters Weight: 5 +Retrieves a specific OCO based on provided optional parameters Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -3472,9 +3472,9 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - Long orderListId = 56L; // Long | Either `orderListId` or `listClientOrderId` must be provided - String origClientOrderId = "origClientOrderId_example"; // String | - Long recvWindow = 56L; // Long | + Long orderListId = 1L; // Long | Either `orderListId` or `listClientOrderId` must be provided + String origClientOrderId = "1"; // String | `orderListId` or `listClientOrderId` must be provided. + Long recvWindow = 5000L; // Long | Value cannot be greater than 60000 try { QueryMarginAccountsOcoResponse result = apiInstance.queryMarginAccountsOco(orderListId, origClientOrderId, recvWindow); System.out.println(result); @@ -3494,8 +3494,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **orderListId** | **Long**| Either `orderListId` or `listClientOrderId` must be provided | [optional] | -| **origClientOrderId** | **String**| | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **origClientOrderId** | **String**| `orderListId` or `listClientOrderId` must be provided. | [optional] | +| **recvWindow** | **Long**| Value cannot be greater than 60000 | [optional] | ### Return type @@ -3521,7 +3521,7 @@ No authorization required Query Margin Account's Open OCO (USER_DATA) -Query Margin Account's Open OCO Weight: 5 +Query Margin Account's Open OCO Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -3538,7 +3538,7 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | Value cannot be greater than 60000 try { QueryMarginAccountsOpenOcoResponse result = apiInstance.queryMarginAccountsOpenOco(recvWindow); System.out.println(result); @@ -3557,7 +3557,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Value cannot be greater than 60000 | [optional] | ### Return type @@ -3583,7 +3583,7 @@ No authorization required Query UM Algo Order History (USER_DATA) -Get all algo orders; ACTIVE, CANCELED, TRIGGERED or FINISHED . * If `algoId` is set, it will get orders >= that `algoId`. Otherwise most recent orders are returned. * The query time period must be less then 7 days( default as the recent 7 days). Weight: 5 +Get all algo orders: ACTIVE, CANCELED, TRIGGERED or FINISHED. Weight(IP): 5 Security Type: USER_DATA Notes: - If `algoId` is set, it will get orders >= that `algoId`. Otherwise most recent orders are returned. - The query time period must be less than 7 days (default as the recent 7 days). ### Example ```java @@ -3600,12 +3600,12 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long algoId = 56L; // Long | - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long limit = 56L; // Long | Default 100; max 1000 - Long recvWindow = 56L; // Long | + String symbol = "BNBUSDT"; // String | + Long algoId = 2146760L; // Long | Only return orders >= this algoId + Long startTime = 1770130294138L; // Long | + Long endTime = 1770736694138L; // Long | + Long limit = 500L; // Long | Default 500; max 1000 + Long recvWindow = 5000L; // Long | try { QueryUmAlgoOrderHistoryResponse result = apiInstance.queryUmAlgoOrderHistory(symbol, algoId, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -3625,10 +3625,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **symbol** | **String**| | | -| **algoId** | **Long**| | [optional] | -| **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | -| **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **algoId** | **Long**| Only return orders >= this algoId | [optional] | +| **startTime** | **Long**| | [optional] | +| **endTime** | **Long**| | [optional] | +| **limit** | **Long**| Default 500; max 1000 | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -3647,15 +3647,15 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | UM Algo Order History | - | +| **200** | Query UM Algo Order History | - | # **queryUmConditionalOrderHistory** > QueryUmConditionalOrderHistoryResponse queryUmConditionalOrderHistory(symbol, strategyId, newClientStrategyId, recvWindow) -Query UM Conditional Order History +Query UM Conditional Order History (USER_DATA) -Query UM Conditional Order History * Either `strategyId` or `newClientStrategyId` must be sent. * `NEW` orders will not be found. * These orders will not be found: * order status is `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** * created time + 7 days < current time Weight: 1 +Query UM Conditional Order History Weight(IP): 1 Security Type: USER_DATA Notes: - Either `strategyId` or `newClientStrategyId` must be sent. - `NEW` orders will not be found. - These orders will not be found: - order status is `CANCELED` or `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 7 days < current time ### Example ```java @@ -3672,10 +3672,10 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long strategyId = 56L; // Long | - String newClientStrategyId = "newClientStrategyId_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long strategyId = 1L; // Long | + String newClientStrategyId = "1"; // String | + Long recvWindow = 5000L; // Long | try { QueryUmConditionalOrderHistoryResponse result = apiInstance.queryUmConditionalOrderHistory(symbol, strategyId, newClientStrategyId, recvWindow); System.out.println(result); @@ -3694,7 +3694,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **strategyId** | **Long**| | [optional] | | **newClientStrategyId** | **String**| | [optional] | | **recvWindow** | **Long**| | [optional] | @@ -3721,9 +3721,9 @@ No authorization required # **queryUmModifyOrderHistory** > QueryUmModifyOrderHistoryResponse queryUmModifyOrderHistory(symbol, orderId, origClientOrderId, startTime, endTime, limit, recvWindow) -Query UM Modify Order History(TRADE) +Query UM Modify Order History (TRADE) -Get order modification history * Either `orderId` or `origClientOrderId` must be sent, and the `orderId` will prevail if both are sent. Weight: 1 +Get order modification history Weight(IP): 1 Security Type: TRADE Notes: - Either `orderId` or `origClientOrderId` must be sent, and the `orderId` will prevail if both are sent. ### Example ```java @@ -3740,13 +3740,13 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long orderId = 56L; // Long | - String origClientOrderId = "origClientOrderId_example"; // String | - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long limit = 56L; // Long | Default 100; max 1000 - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long orderId = 1L; // Long | Order ID + String origClientOrderId = "1"; // String | Client order ID + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long limit = 500L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | try { QueryUmModifyOrderHistoryResponse result = apiInstance.queryUmModifyOrderHistory(symbol, orderId, origClientOrderId, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -3765,12 +3765,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | -| **orderId** | **Long**| | [optional] | -| **origClientOrderId** | **String**| | [optional] | +| **symbol** | **String**| Symbol | | +| **orderId** | **Long**| Order ID | [optional] | +| **origClientOrderId** | **String**| Client order ID | [optional] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **limit** | **Long**| Number of results returned. | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -3797,7 +3797,7 @@ No authorization required Query UM Order (USER_DATA) -Check an UM order's status. * These orders will not be found: * Either `orderId` or `origClientOrderId` must be sent. * order status is `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** * created time + 3 days < current time Weight: 1 +Check an UM order's status. Weight(IP): 1 Security Type: USER_DATA Notes: - These orders will not be found: - Either `orderId` or `origClientOrderId` must be sent. - order status is `CANCELED` or `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 3 days < current time ### Example ```java @@ -3814,10 +3814,10 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long orderId = 56L; // Long | - String origClientOrderId = "origClientOrderId_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long orderId = 1L; // Long | + String origClientOrderId = "1"; // String | + Long recvWindow = 5000L; // Long | try { QueryUmOrderResponse result = apiInstance.queryUmOrder(symbol, orderId, origClientOrderId, recvWindow); System.out.println(result); @@ -3836,7 +3836,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **orderId** | **Long**| | [optional] | | **origClientOrderId** | **String**| | [optional] | | **recvWindow** | **Long**| | [optional] | @@ -3863,9 +3863,9 @@ No authorization required # **queryUsersCmForceOrders** > QueryUsersCmForceOrdersResponse queryUsersCmForceOrders(symbol, autoCloseType, startTime, endTime, limit, recvWindow) -Query User's CM Force Orders(USER_DATA) +Query User's CM Force Orders (USER_DATA) -Query User's CM Force Orders * If \"autoCloseType\" is not sent, orders with both of the types will be returned * If \"startTime\" is not sent, data within 7 days before \"endTime\" can be queried * Only support querying data in the past 90 days Weight: 20 with symbol, 50 without symbol +Query User's CM Force Orders Weight: - 20 with `symbol` - 50 without `symbol` Security Type: USER_DATA Notes: - If \"autoCloseType\" is not sent, orders with both of the types will be returned - If \"startTime\" is not sent, data within 7 days before \"endTime\" can be queried ### Example ```java @@ -3882,12 +3882,12 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | + String symbol = "BTCUSDT"; // String | AutoCloseType autoCloseType = AutoCloseType.fromValue("LIQUIDATION"); // AutoCloseType | `LIQUIDATION` for liquidation orders, `ADL` for ADL orders. - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long limit = 56L; // Long | Default 100; max 1000 - Long recvWindow = 56L; // Long | + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long limit = 500L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 try { QueryUsersCmForceOrdersResponse result = apiInstance.queryUsersCmForceOrders(symbol, autoCloseType, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -3910,8 +3910,8 @@ public class Example { | **autoCloseType** | [**AutoCloseType**](.md)| `LIQUIDATION` for liquidation orders, `ADL` for ADL orders. | [optional] [enum: LIQUIDATION, ADL] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **limit** | **Long**| Number of results returned. | [optional] | +| **recvWindow** | **Long**| The value cannot be greater than 60000 | [optional] | ### Return type @@ -3935,9 +3935,9 @@ No authorization required # **queryUsersMarginForceOrders** > QueryUsersMarginForceOrdersResponse queryUsersMarginForceOrders(startTime, endTime, current, size, recvWindow) -Query User's Margin Force Orders(USER_DATA) +Query User's Margin Force Orders (USER_DATA) -Query user's margin force orders Weight: 1 +Query user's margin force orders Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -3954,11 +3954,11 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10 Max:100 - Long recvWindow = 56L; // Long | + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long current = 1L; // Long | Current page number. + Long size = 10L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 try { QueryUsersMarginForceOrdersResponse result = apiInstance.queryUsersMarginForceOrders(startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -3979,9 +3979,9 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10 Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Current page number. | [optional] | +| **size** | **Long**| Number of results returned. | [optional] | +| **recvWindow** | **Long**| The value cannot be greater than 60000 | [optional] | ### Return type @@ -4007,7 +4007,7 @@ No authorization required Query User's UM Force Orders (USER_DATA) -Query User's UM Force Orders * If `autoCloseType` is not sent, orders with both of the types will be returned * If `startTime` is not sent, data within 7 days before `endTime` can be queried * Only support querying data in the past 90 days Weight: 20 with symbol, 50 without symbol +Query User's UM Force Orders Weight: - 20 with `symbol` - 50 without `symbol` Security Type: USER_DATA Notes: - If `autoCloseType` is not sent, orders with both of the types will be returned - If `startTime` is not sent, data within 7 days before `endTime` can be queried ### Example ```java @@ -4024,12 +4024,12 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | + String symbol = "BTCUSDT"; // String | AutoCloseType autoCloseType = AutoCloseType.fromValue("LIQUIDATION"); // AutoCloseType | `LIQUIDATION` for liquidation orders, `ADL` for ADL orders. - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long limit = 56L; // Long | Default 100; max 1000 - Long recvWindow = 56L; // Long | + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long limit = 500L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 try { QueryUsersUmForceOrdersResponse result = apiInstance.queryUsersUmForceOrders(symbol, autoCloseType, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -4052,8 +4052,8 @@ public class Example { | **autoCloseType** | [**AutoCloseType**](.md)| `LIQUIDATION` for liquidation orders, `ADL` for ADL orders. | [optional] [enum: LIQUIDATION, ADL] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **limit** | **Long**| Number of results returned. | [optional] | +| **recvWindow** | **Long**| The value cannot be greater than 60000 | [optional] | ### Return type @@ -4079,7 +4079,7 @@ No authorization required Toggle BNB Burn On UM Futures Trade (TRADE) -Change user's BNB Fee Discount for UM Futures (Fee Discount On or Fee Discount Off ) on ***EVERY symbol*** * The BNB would not be collected from UM-PM account to the Portfolio Margin account. Weight: 1 +Change user's BNB Fee Discount for UM Futures (Fee Discount On or Fee Discount Off ) on ***EVERY symbol*** Weight(IP): 1 Security Type: TRADE Notes: - The BNB would not be collected from UM-PM account to the Portfolio Margin account. ### Example ```java @@ -4139,9 +4139,9 @@ No authorization required # **umAccountTradeList** > UmAccountTradeListResponse umAccountTradeList(symbol, startTime, endTime, fromId, limit, recvWindow) -UM Account Trade List(USER_DATA) +UM Account Trade List (USER_DATA) -Get trades for a specific account and UM symbol. * If `startTime` and `endTime` are both not sent, then the last '7 days' data will be returned. * The time between `startTime` and `endTime` cannot be longer than 7 days. * The parameter `fromId` cannot be sent with `startTime` or `endTime`. Weight: 5 +Get trades for a specific account and UM symbol. Weight(IP): 5 Security Type: USER_DATA Notes: - If `startTime` and `endTime` are both not sent, then the last '7 days' data will be returned. - The time between `startTime` and `endTime` cannot be longer than 7 days. - The parameter `fromId` cannot be sent with `startTime` or `endTime`. ### Example ```java @@ -4158,12 +4158,12 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long startTime = 56L; // Long | Timestamp in ms to get funding from INCLUSIVE. - Long endTime = 56L; // Long | Timestamp in ms to get funding until INCLUSIVE. - Long fromId = 56L; // Long | Trade id to fetch from. Default gets most recent trades. - Long limit = 56L; // Long | Default 100; max 1000 - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | Symbol + Long startTime = 1623319461670L; // Long | Timestamp in ms to get funding from INCLUSIVE. + Long endTime = 1641782889000L; // Long | Timestamp in ms to get funding until INCLUSIVE. + Long fromId = 1L; // Long | Trade ID to fetch from. + Long limit = 500L; // Long | Number of results returned. + Long recvWindow = 5000L; // Long | try { UmAccountTradeListResponse result = apiInstance.umAccountTradeList(symbol, startTime, endTime, fromId, limit, recvWindow); System.out.println(result); @@ -4182,11 +4182,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| | | +| **symbol** | **String**| Symbol | | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | -| **fromId** | **Long**| Trade id to fetch from. Default gets most recent trades. | [optional] | -| **limit** | **Long**| Default 100; max 1000 | [optional] | +| **fromId** | **Long**| Trade ID to fetch from. | [optional] | +| **limit** | **Long**| Number of results returned. | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -4211,9 +4211,9 @@ No authorization required # **umPositionAdlQuantileEstimation** > UmPositionAdlQuantileEstimationResponse umPositionAdlQuantileEstimation(symbol, recvWindow) -UM Position ADL Quantile Estimation(USER_DATA) +UM Position ADL Quantile Estimation (USER_DATA) -Query UM Position ADL Quantile Estimation * Values update every 30s. * Values 0, 1, 2, 3, 4 shows the queue position and possibility of ADL from low to high. * For positions of the symbol are in One-way Mode or isolated margined in Hedge Mode, \"LONG\", \"SHORT\", and \"BOTH\" will be returned to show the positions' adl quantiles of different position sides. * If the positions of the symbol are crossed margined in Hedge Mode: * \"HEDGE\" as a sign will be returned instead of \"BOTH\"; * A same value caculated on unrealized pnls on long and short sides' positions will be shown for \"LONG\" and \"SHORT\" when there are positions in both of long and short sides. Weight: 5 +Query UM Position ADL Quantile Estimation * Values update every 30s. * Values 0, 1, 2, 3, 4 shows the queue position and possibility of ADL from low to high. * For positions of the symbol are in One-way Mode or isolated margined in Hedge Mode, \"LONG\", \"SHORT\", and \"BOTH\" will be returned to show the positions' adl quantiles of different position sides. * If the positions of the symbol are crossed margined in Hedge Mode: * \"HEDGE\" as a sign will be returned instead of \"BOTH\"; * A same value caculated on unrealized pnls on long and short sides' positions will be shown for \"LONG\" and \"SHORT\" when there are positions in both of long and short sides. Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -4230,8 +4230,8 @@ public class Example { defaultClient.setBasePath("https://papi.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | + Long recvWindow = 5000L; // Long | try { UmPositionAdlQuantileEstimationResponse result = apiInstance.umPositionAdlQuantileEstimation(symbol, recvWindow); System.out.println(result); diff --git a/clients/derivatives-trading-portfolio-margin/docs/TransferSide.md b/clients/derivatives-trading-portfolio-margin/docs/TransferSide.md new file mode 100644 index 000000000..b1bcc88bc --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/docs/TransferSide.md @@ -0,0 +1,13 @@ + + +# TransferSide + +## Enum + + +* `TO_UM` (value: `"TO_UM"`) + +* `FROM_UM` (value: `"FROM_UM"`) + + + diff --git a/clients/derivatives-trading-portfolio-margin/docs/Type.md b/clients/derivatives-trading-portfolio-margin/docs/Type.md deleted file mode 100644 index 577f158e6..000000000 --- a/clients/derivatives-trading-portfolio-margin/docs/Type.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# Type - -## Enum - - -* `LIMIT` (value: `"LIMIT"`) - -* `MARKET` (value: `"MARKET"`) - - - diff --git a/clients/derivatives-trading-portfolio-margin/docs/UmAccountTradeListResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/UmAccountTradeListResponseInner.md index 293a8bf1c..8477e7571 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/UmAccountTradeListResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/UmAccountTradeListResponseInner.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**id** | **Long** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**side** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**qty** | **String** | | [optional] | -|**realizedPnl** | **String** | | [optional] | -|**quoteQty** | **String** | | [optional] | -|**commission** | **String** | | [optional] | -|**commissionAsset** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**buyer** | **Boolean** | | [optional] | -|**maker** | **Boolean** | | [optional] | -|**positionSide** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**id** | **Long** | ID. | [optional] | +|**orderId** | **Long** | Normal orderID after trigger if appliable, only have when the strategy is triggered | [optional] | +|**side** | **String** | Side. | [optional] | +|**price** | **String** | Price. | [optional] | +|**qty** | **String** | Qty. | [optional] | +|**realizedPnl** | **String** | Realized Pnl. | [optional] | +|**quoteQty** | **String** | Quote Qty. | [optional] | +|**commission** | **String** | Commission. | [optional] | +|**commissionAsset** | **String** | Commission Asset. | [optional] | +|**time** | **Long** | Event time. | [optional] | +|**buyer** | **Boolean** | Buyer. | [optional] | +|**maker** | **Boolean** | Maker. | [optional] | +|**positionSide** | **String** | BOTH means that it is the position of One-way Mode | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/UmFuturesAccountConfigurationResponse.md b/clients/derivatives-trading-portfolio-margin/docs/UmFuturesAccountConfigurationResponse.md index f922fe92f..25567a7a8 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/UmFuturesAccountConfigurationResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/UmFuturesAccountConfigurationResponse.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**feeTier** | **Long** | | [optional] | -|**canTrade** | **Boolean** | | [optional] | -|**canDeposit** | **Boolean** | | [optional] | -|**canWithdraw** | **Boolean** | | [optional] | -|**dualSidePosition** | **Boolean** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**multiAssetsMargin** | **Boolean** | | [optional] | -|**tradeGroupId** | **Long** | | [optional] | +|**feeTier** | **Long** | account commission tier | [optional] | +|**canTrade** | **Boolean** | if can trade | [optional] | +|**canDeposit** | **Boolean** | if can transfer in asset | [optional] | +|**canWithdraw** | **Boolean** | if can transfer out asset | [optional] | +|**dualSidePosition** | **Boolean** | \"true\": Hedge Mode; \"false\": One-way Mode | [optional] | +|**updateTime** | **Long** | reserved property, please ignore | [optional] | +|**multiAssetsMargin** | **Boolean** | Multi Assets Margin. | [optional] | +|**tradeGroupId** | **Long** | Trade Group ID. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/UmFuturesSymbolConfigurationResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/UmFuturesSymbolConfigurationResponseInner.md index 0feebdaa9..5e6a3b469 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/UmFuturesSymbolConfigurationResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/UmFuturesSymbolConfigurationResponseInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**marginType** | **String** | | [optional] | -|**isAutoAddMargin** | **String** | | [optional] | -|**leverage** | **Long** | | [optional] | -|**maxNotionalValue** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**marginType** | **String** | Margin Type. | [optional] | +|**isAutoAddMargin** | **String** | Is Auto Add Margin. | [optional] | +|**leverage** | **Long** | current initial leverage | [optional] | +|**maxNotionalValue** | **String** | Max Notional Value. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/UmNotionalAndLeverageBracketsResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/UmNotionalAndLeverageBracketsResponseInner.md index 5860b55ad..7a8c7f481 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/UmNotionalAndLeverageBracketsResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/UmNotionalAndLeverageBracketsResponseInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**notionalCoef** | **String** | | [optional] | -|**brackets** | [**List<UmNotionalAndLeverageBracketsResponseInnerBracketsInner>**](UmNotionalAndLeverageBracketsResponseInnerBracketsInner.md) | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | +|**notionalCoef** | **String** | Notional Coef. | [optional] | +|**brackets** | [**List<UmNotionalAndLeverageBracketsResponseInnerBracketsInner>**](UmNotionalAndLeverageBracketsResponseInnerBracketsInner.md) | Brackets. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/UmNotionalAndLeverageBracketsResponseInnerBracketsInner.md b/clients/derivatives-trading-portfolio-margin/docs/UmNotionalAndLeverageBracketsResponseInnerBracketsInner.md index 82c58bc3f..5fcef6de6 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/UmNotionalAndLeverageBracketsResponseInnerBracketsInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/UmNotionalAndLeverageBracketsResponseInnerBracketsInner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**bracket** | **Long** | | [optional] | -|**initialLeverage** | **Long** | | [optional] | -|**notionalCap** | **Long** | | [optional] | -|**notionalFloor** | **Long** | | [optional] | -|**maintMarginRatio** | **Double** | | [optional] | -|**cum** | **Long** | | [optional] | +|**bracket** | **Long** | Notional bracket | [optional] | +|**initialLeverage** | **Long** | Max initial leverage for this bracket | [optional] | +|**notionalCap** | **Long** | Cap notional of this bracket | [optional] | +|**notionalFloor** | **Long** | Notional threshold of this bracket | [optional] | +|**maintMarginRatio** | **Double** | Maintenance ratio for this bracket | [optional] | +|**cum** | **Long** | Auxiliary number for quick calculation | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/UmPositionAdlQuantileEstimationResponseInner.md b/clients/derivatives-trading-portfolio-margin/docs/UmPositionAdlQuantileEstimationResponseInner.md index 429f524be..0102dae2d 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/UmPositionAdlQuantileEstimationResponseInner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/UmPositionAdlQuantileEstimationResponseInner.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | +|**symbol** | **String** | Trade symbol, if existing. | [optional] | |**adlQuantile** | [**UmPositionAdlQuantileEstimationResponseInnerAdlQuantile**](UmPositionAdlQuantileEstimationResponseInnerAdlQuantile.md) | | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/UmPositionAdlQuantileEstimationResponseInnerAdlQuantile.md b/clients/derivatives-trading-portfolio-margin/docs/UmPositionAdlQuantileEstimationResponseInnerAdlQuantile.md index 2abf0974c..ee558393b 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/UmPositionAdlQuantileEstimationResponseInnerAdlQuantile.md +++ b/clients/derivatives-trading-portfolio-margin/docs/UmPositionAdlQuantileEstimationResponseInnerAdlQuantile.md @@ -2,14 +2,15 @@ # UmPositionAdlQuantileEstimationResponseInnerAdlQuantile +Adl Quantile. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**LONG** | **Long** | | [optional] | -|**SHORT** | **Long** | | [optional] | -|**BOTH** | **Long** | | [optional] | +|**LONG** | **Long** | adl quantile for \"LONG\" position in hedge mode | [optional] | +|**SHORT** | **Long** | adl quantile for \"SHORT\" position in hedge mode | [optional] | +|**BOTH** | **Long** | adl quantile for position in one-way mode | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/UserDataStreamEventsResponse.md b/clients/derivatives-trading-portfolio-margin/docs/UserDataStreamEventsResponse.md index 0564213b0..1eec704bf 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/UserDataStreamEventsResponse.md +++ b/clients/derivatives-trading-portfolio-margin/docs/UserDataStreamEventsResponse.md @@ -7,59 +7,59 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**T** | **Long** | | [optional] | -|**E** | **Long** | | [optional] | -|**fs** | **String** | | [optional] | -|**ao** | [**AlgoUpdateAo**](AlgoUpdateAo.md) | | [optional] | -|**so** | [**ConditionalOrderTradeUpdateSo**](ConditionalOrderTradeUpdateSo.md) | | [optional] | +|**fs** | **String** | Event business unit. 'UM' for USDS-M futures and 'CM' for COIN-M futures | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction Time | [optional] | |**ac** | [**AccountConfigUpdateAc**](AccountConfigUpdateAc.md) | | [optional] | -|**iLowerCase** | **Long** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**tLowerCase** | **Long** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**uLowerCase** | **String** | | [optional] | -|**U** | **Long** | | [optional] | -|**B** | **String** | | [optional] | -|**dLowerCase** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**S** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**F** | **String** | | [optional] | -|**gLowerCase** | **Long** | | [optional] | -|**C** | **String** | | [optional] | -|**xLowerCase** | **String** | | [optional] | -|**X** | **String** | | [optional] | -|**rLowerCase** | **String** | | [optional] | -|**zLowerCase** | **String** | | [optional] | -|**L** | **String** | | [optional] | -|**nLowerCase** | **String** | | [optional] | -|**N** | **String** | | [optional] | -|**vLowerCase** | **Long** | | [optional] | -|**I** | **Long** | | [optional] | -|**wLowerCase** | **Boolean** | | [optional] | -|**mLowerCase** | **String** | | [optional] | -|**O** | [**List<OpenorderlossOInner>**](OpenorderlossOInner.md) | | [optional] | -|**Z** | **String** | | [optional] | -|**Y** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**D** | **Long** | | [optional] | -|**jLowerCase** | **Long** | | [optional] | -|**J** | **Long** | | [optional] | -|**W** | **Long** | | [optional] | -|**V** | **String** | | [optional] | -|**A** | **String** | | [optional] | -|**cs** | **String** | | [optional] | -|**pl** | **String** | | [optional] | -|**pL** | **String** | | [optional] | -|**pY** | **String** | | [optional] | -|**eR** | **String** | | [optional] | -|**eq** | **String** | | [optional] | -|**ae** | **String** | | [optional] | +|**iLowerCase** | **String** | Account Alias, ignore for UM | [optional] | +|**aLowerCase** | **String** | Asset | [optional] | +|**ao** | [**AlgoOrderUpdateAo**](AlgoOrderUpdateAo.md) | | [optional] | +|**dLowerCase** | **Long** | Trailing Delta; This is only visible if the order was a trailing stop order. | [optional] | +|**U** | **Long** | Time updateID | [optional] | +|**so** | [**ConditionalOrderTradeUpdateSo**](ConditionalOrderTradeUpdateSo.md) | | [optional] | +|**sLowerCase** | **String** | Risk level: MARGIN_CALL, REDUCE_ONLY, FORCE_LIQUIDATION | [optional] | +|**cLowerCase** | **String** | Client order ID | [optional] | +|**S** | **String** | Side | [optional] | +|**oLowerCase** | [**OrderTradeUpdateO**](OrderTradeUpdateO.md) | | [optional] | +|**fLowerCase** | **String** | Time in force | [optional] | +|**qLowerCase** | **String** | Order quantity | [optional] | +|**pLowerCase** | **String** | Principal | [optional] | +|**P** | **String** | Stop price | [optional] | +|**F** | **String** | Iceberg quantity; Will not be visible if not iceberg order | [optional] | +|**gLowerCase** | **Long** | OrderListId | [optional] | +|**C** | **String** | Original client order ID; Only visible on cancellation of order, the ID of the order being canceled. | [optional] | +|**xLowerCase** | **String** | Current execution type | [optional] | +|**X** | **String** | Current order status | [optional] | +|**rLowerCase** | **String** | Order reject reason; Only visible if there is a rejection, will be an error code. | [optional] | +|**lLowerCase** | **String** | Total Liability | [optional] | +|**zLowerCase** | **String** | Cumulative filled quantity | [optional] | +|**L** | **String** | Last executed price | [optional] | +|**nLowerCase** | **String** | Commission amount | [optional] | +|**N** | **String** | Commission asset; Only visible when there is a commission amount. | [optional] | +|**tLowerCase** | **String** | Type | [optional] | +|**vLowerCase** | **Long** | Prevented Match Id; This is only visible if the order expire due to STP trigger. | [optional] | +|**I** | **Long** | updateId | [optional] | +|**wLowerCase** | **Boolean** | Is the order on the book? | [optional] | +|**mLowerCase** | **String** | Total maintenance margin in USD value | [optional] | +|**O** | [**List<OpenOrderLossOInner>**](OpenOrderLossOInner.md) | Update Data | [optional] | +|**Z** | **String** | Cumulative quote asset transacted quantity | [optional] | +|**Y** | **String** | Last quote asset transacted quantity (i.e. lastPrice * lastQty) | [optional] | +|**Q** | **String** | Quote Order Quantity; This is only visible if indicated in the order | [optional] | +|**D** | **Long** | Trailing Time; This is only visible if the trailing stop order has been activated. | [optional] | +|**jLowerCase** | **Long** | Strategy ID; This is only visible if the strategyId parameter was provided upon order placement | [optional] | +|**J** | **Long** | Strategy Type; This is only visible if the strategyType parameter was provided upon order placement | [optional] | +|**W** | **Long** | Working Time; This is only visible if the order has been placed on the book. | [optional] | +|**V** | **String** | selfTradePreventionMode | [optional] | +|**uLowerCase** | **String** | uniMMR level | [optional] | +|**A** | **String** | Prevented Quantity; This is only visible if the order expired due to STP trigger. | [optional] | +|**B** | [**List<OutboundAccountPositionBInner>**](OutboundAccountPositionBInner.md) | Balances Array | [optional] | +|**cs** | **String** | Counter Symbol; This is only visible if the order expired due to STP trigger. | [optional] | +|**pl** | **String** | Prevented Execution Quantity; This is only visible if the order expired due to STP trigger. | [optional] | +|**pL** | **String** | Prevented Execution Price; This is only visible if the order expired due to STP trigger. | [optional] | +|**pY** | **String** | Prevented Execution Quote Qty; This is only visible if the order expired due to STP trigger. | [optional] | +|**eR** | **String** | Expiry Reason; This is only visible if the order has expired. | [optional] | +|**eq** | **String** | Account equity in USD value | [optional] | +|**ae** | **String** | Actual equity without collateral rate in USD value | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/UserDataStreamsApi.md b/clients/derivatives-trading-portfolio-margin/docs/UserDataStreamsApi.md index 4681f5701..62628a73b 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/UserDataStreamsApi.md +++ b/clients/derivatives-trading-portfolio-margin/docs/UserDataStreamsApi.md @@ -4,18 +4,18 @@ All URIs are relative to *https://papi.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**closeUserDataStream**](UserDataStreamsApi.md#closeUserDataStream) | **DELETE** /papi/v1/listenKey | Close User Data Stream(USER_STREAM) | +| [**closeUserDataStream**](UserDataStreamsApi.md#closeUserDataStream) | **DELETE** /papi/v1/listenKey | Close User Data Stream (USER_STREAM) | | [**keepaliveUserDataStream**](UserDataStreamsApi.md#keepaliveUserDataStream) | **PUT** /papi/v1/listenKey | Keepalive User Data Stream (USER_STREAM) | -| [**startUserDataStream**](UserDataStreamsApi.md#startUserDataStream) | **POST** /papi/v1/listenKey | Start User Data Stream(USER_STREAM) | +| [**startUserDataStream**](UserDataStreamsApi.md#startUserDataStream) | **POST** /papi/v1/listenKey | Start User Data Stream (USER_STREAM) | # **closeUserDataStream** > closeUserDataStream() -Close User Data Stream(USER_STREAM) +Close User Data Stream (USER_STREAM) -Close out a user data stream. Weight: 1 +Close out a user data stream. Weight(IP): 1 Security Type: USER_STREAM ### Example ```java @@ -72,7 +72,7 @@ No authorization required Keepalive User Data Stream (USER_STREAM) -Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 60 minutes. Weight: 1 +Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 60 minutes. Weight(IP): 1 Security Type: USER_STREAM ### Example ```java @@ -127,9 +127,9 @@ No authorization required # **startUserDataStream** > StartUserDataStreamResponse startUserDataStream() -Start User Data Stream(USER_STREAM) +Start User Data Stream (USER_STREAM) -Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 1 +Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight(IP): 1 Security Type: USER_STREAM ### Example ```java diff --git a/clients/derivatives-trading-portfolio-margin/docs/WorkingType.md b/clients/derivatives-trading-portfolio-margin/docs/WorkingType.md index db15e0661..d2857886e 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/WorkingType.md +++ b/clients/derivatives-trading-portfolio-margin/docs/WorkingType.md @@ -7,5 +7,7 @@ * `MARK_PRICE` (value: `"MARK_PRICE"`) +* `CONTRACT_PRICE` (value: `"CONTRACT_PRICE"`) + diff --git a/clients/derivatives-trading-portfolio-margin/docs/rest-api/migration-guide.md b/clients/derivatives-trading-portfolio-margin/docs/rest-api/migration-guide.md index 1ffdf921a..60ce654ea 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/rest-api/migration-guide.md +++ b/clients/derivatives-trading-portfolio-margin/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-derivatives-trading-portfolio-margin - 6.0.0 + 7.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-derivatives-trading-portfolio-margin - 6.0.0 + 7.0.0 ``` diff --git a/clients/derivatives-trading-portfolio-margin/example_rest.md b/clients/derivatives-trading-portfolio-margin/example_rest.md index 225062f51..8ff2d4ceb 100644 --- a/clients/derivatives-trading-portfolio-margin/example_rest.md +++ b/clients/derivatives-trading-portfolio-margin/example_rest.md @@ -1,226 +1,226 @@ ## Account -[GET /papi/v1/balance](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Account-Balance) - accountBalance - [AccountBalanceExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/AccountBalanceExample.java#L47) +[GET /papi/v1/balance](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#account-balance) - accountBalance - [AccountBalanceExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/AccountBalanceExample.java#L36) -[GET /papi/v1/account](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Account-Information) - accountInformation - [AccountInformationExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/AccountInformationExample.java#L47) +[GET /papi/v1/account](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#account-information) - accountInformation - [AccountInformationExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/AccountInformationExample.java#L36) -[POST /papi/v1/bnb-transfer](https://developers.binance.com/docs/derivatives/portfolio-margin/account/BNB-transfer) - bnbTransfer - [BnbTransferExample.java:49](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/BnbTransferExample.java#L49) +[POST /papi/v1/bnb-transfer](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#bnb-transfer) - bnbTransfer - [BnbTransferExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/BnbTransferExample.java#L39) -[POST /papi/v1/repay-futures-switch](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Change-Auto-repay-futures-Status) - changeAutoRepayFuturesStatus - [ChangeAutoRepayFuturesStatusExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeAutoRepayFuturesStatusExample.java#L48) +[POST /papi/v1/repay-futures-switch](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-auto-repay-futures-status) - changeAutoRepayFuturesStatus - [ChangeAutoRepayFuturesStatusExample.java:38](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeAutoRepayFuturesStatusExample.java#L38) -[POST /papi/v1/cm/leverage](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Change-CM-Initial-Leverage) - changeCmInitialLeverage - [ChangeCmInitialLeverageExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeCmInitialLeverageExample.java#L48) +[POST /papi/v1/cm/leverage](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-cm-initial-leverage) - changeCmInitialLeverage - [ChangeCmInitialLeverageExample.java:38](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeCmInitialLeverageExample.java#L38) -[POST /papi/v1/cm/positionSide/dual](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Change-CM-Position-Mode) - changeCmPositionMode - [ChangeCmPositionModeExample.java:49](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeCmPositionModeExample.java#L49) +[POST /papi/v1/cm/positionSide/dual](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-cm-position-mode) - changeCmPositionMode - [ChangeCmPositionModeExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeCmPositionModeExample.java#L39) -[POST /papi/v1/um/leverage](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Change-UM-Initial-Leverage) - changeUmInitialLeverage - [ChangeUmInitialLeverageExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeUmInitialLeverageExample.java#L48) +[POST /papi/v1/um/leverage](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-um-initial-leverage) - changeUmInitialLeverage - [ChangeUmInitialLeverageExample.java:38](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeUmInitialLeverageExample.java#L38) -[POST /papi/v1/um/positionSide/dual](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Change-UM-Position-Mode) - changeUmPositionMode - [ChangeUmPositionModeExample.java:49](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeUmPositionModeExample.java#L49) +[POST /papi/v1/um/positionSide/dual](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-um-position-mode) - changeUmPositionMode - [ChangeUmPositionModeExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeUmPositionModeExample.java#L39) -[GET /papi/v1/cm/leverageBracket](https://developers.binance.com/docs/derivatives/portfolio-margin/account/CM-Notional-and-Leverage-Brackets) - cmNotionalAndLeverageBrackets - [CmNotionalAndLeverageBracketsExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/CmNotionalAndLeverageBracketsExample.java#L47) +[GET /papi/v1/cm/leverageBracket](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#cm-notional-and-leverage-brackets) - cmNotionalAndLeverageBrackets - [CmNotionalAndLeverageBracketsExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/CmNotionalAndLeverageBracketsExample.java#L36) -[POST /papi/v1/auto-collection](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Fund-Auto-collection) - fundAutoCollection - [FundAutoCollectionExample.java:50](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/FundAutoCollectionExample.java#L50) +[POST /papi/v1/auto-collection](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#fund-auto-collection) - fundAutoCollection - [FundAutoCollectionExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/FundAutoCollectionExample.java#L39) -[POST /papi/v1/asset-collection](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Fund-Collection-by-Asset) - fundCollectionByAsset - [FundCollectionByAssetExample.java:49](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/FundCollectionByAssetExample.java#L49) +[POST /papi/v1/asset-collection](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#fund-collection-by-asset) - fundCollectionByAsset - [FundCollectionByAssetExample.java:38](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/FundCollectionByAssetExample.java#L38) -[GET /papi/v1/repay-futures-switch](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-Auto-repay-futures-Status) - getAutoRepayFuturesStatus - [GetAutoRepayFuturesStatusExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetAutoRepayFuturesStatusExample.java#L47) +[GET /papi/v1/repay-futures-switch](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-auto-repay-futures-status) - getAutoRepayFuturesStatus - [GetAutoRepayFuturesStatusExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetAutoRepayFuturesStatusExample.java#L36) -[GET /papi/v1/cm/account](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Account-Detail) - getCmAccountDetail - [GetCmAccountDetailExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmAccountDetailExample.java#L47) +[GET /papi/v1/cm/account](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-account-detail) - getCmAccountDetail - [GetCmAccountDetailExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmAccountDetailExample.java#L37) -[GET /papi/v1/cm/positionSide/dual](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Current-Position-Mode) - getCmCurrentPositionMode - [GetCmCurrentPositionModeExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmCurrentPositionModeExample.java#L48) +[GET /papi/v1/cm/positionSide/dual](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-current-position-mode) - getCmCurrentPositionMode - [GetCmCurrentPositionModeExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmCurrentPositionModeExample.java#L37) -[GET /papi/v1/cm/income](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Income-History) - getCmIncomeHistory - [GetCmIncomeHistoryExample.java:51](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmIncomeHistoryExample.java#L51) +[GET /papi/v1/cm/income](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-income-history) - getCmIncomeHistory - [GetCmIncomeHistoryExample.java:42](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmIncomeHistoryExample.java#L42) -[GET /papi/v1/um/order/asyn](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-Download-Id-For-UM-Futures-Order-History) - getDownloadIdForUmFuturesOrderHistory - [GetDownloadIdForUmFuturesOrderHistoryExample.java:49](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesOrderHistoryExample.java#L49) +[GET /papi/v1/um/order/asyn](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-um-futures-order-history) - getDownloadIdForUmFuturesOrderHistory - [GetDownloadIdForUmFuturesOrderHistoryExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesOrderHistoryExample.java#L39) -[GET /papi/v1/um/trade/asyn](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-Download-Id-For-UM-Futures-Trade-History) - getDownloadIdForUmFuturesTradeHistory - [GetDownloadIdForUmFuturesTradeHistoryExample.java:49](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesTradeHistoryExample.java#L49) +[GET /papi/v1/um/trade/asyn](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-um-futures-trade-history) - getDownloadIdForUmFuturesTradeHistory - [GetDownloadIdForUmFuturesTradeHistoryExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesTradeHistoryExample.java#L39) -[GET /papi/v1/um/income/asyn](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-Download-Id-For-UM-Futures-Transaction-History) - getDownloadIdForUmFuturesTransactionHistory - [GetDownloadIdForUmFuturesTransactionHistoryExample.java:49](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesTransactionHistoryExample.java#L49) +[GET /papi/v1/um/income/asyn](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-um-futures-transaction-history) - getDownloadIdForUmFuturesTransactionHistory - [GetDownloadIdForUmFuturesTransactionHistoryExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesTransactionHistoryExample.java#L39) -[GET /papi/v1/margin/marginInterestHistory](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-Margin-BorrowLoan-Interest-History) - getMarginBorrowLoanInterestHistory - [GetMarginBorrowLoanInterestHistoryExample.java:58](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetMarginBorrowLoanInterestHistoryExample.java#L58) +[GET /papi/v1/margin/marginInterestHistory](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-margin-borrow-loan-interest-history) - getMarginBorrowLoanInterestHistory - [GetMarginBorrowLoanInterestHistoryExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetMarginBorrowLoanInterestHistoryExample.java#L48) -[GET /papi/v1/um/account](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Account-Detail) - getUmAccountDetail - [GetUmAccountDetailExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmAccountDetailExample.java#L47) +[GET /papi/v1/um/account](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-account-detail) - getUmAccountDetail - [GetUmAccountDetailExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmAccountDetailExample.java#L37) -[GET /papi/v2/um/account](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Account-Detail-V2) - getUmAccountDetailV2 - [GetUmAccountDetailV2Example.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmAccountDetailV2Example.java#L47) +[GET /papi/v2/um/account](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-account-detail-v2) - getUmAccountDetailV2 - [GetUmAccountDetailV2Example.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmAccountDetailV2Example.java#L37) -[GET /papi/v1/um/positionSide/dual](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Current-Position-Mode) - getUmCurrentPositionMode - [GetUmCurrentPositionModeExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmCurrentPositionModeExample.java#L48) +[GET /papi/v1/um/positionSide/dual](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-current-position-mode) - getUmCurrentPositionMode - [GetUmCurrentPositionModeExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmCurrentPositionModeExample.java#L37) -[GET /papi/v1/um/order/asyn/id](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Futures-Order-Download-Link-by-Id) - getUmFuturesOrderDownloadLinkById - [GetUmFuturesOrderDownloadLinkByIdExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesOrderDownloadLinkByIdExample.java#L47) +[GET /papi/v1/um/order/asyn/id](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-futures-order-download-link-by-id) - getUmFuturesOrderDownloadLinkById - [GetUmFuturesOrderDownloadLinkByIdExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesOrderDownloadLinkByIdExample.java#L37) -[GET /papi/v1/um/trade/asyn/id](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Futures-Trade-Download-Link-by-Id) - getUmFuturesTradeDownloadLinkById - [GetUmFuturesTradeDownloadLinkByIdExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesTradeDownloadLinkByIdExample.java#L47) +[GET /papi/v1/um/trade/asyn/id](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-futures-trade-download-link-by-id) - getUmFuturesTradeDownloadLinkById - [GetUmFuturesTradeDownloadLinkByIdExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesTradeDownloadLinkByIdExample.java#L37) -[GET /papi/v1/um/income/asyn/id](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Futures-Transaction-Download-Link-by-Id) - getUmFuturesTransactionDownloadLinkById - [GetUmFuturesTransactionDownloadLinkByIdExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesTransactionDownloadLinkByIdExample.java#L48) +[GET /papi/v1/um/income/asyn/id](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-futures-transaction-download-link-by-id) - getUmFuturesTransactionDownloadLinkById - [GetUmFuturesTransactionDownloadLinkByIdExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesTransactionDownloadLinkByIdExample.java#L37) -[GET /papi/v1/um/income](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Income-History) - getUmIncomeHistory - [GetUmIncomeHistoryExample.java:50](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmIncomeHistoryExample.java#L50) +[GET /papi/v1/um/income](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-income-history) - getUmIncomeHistory - [GetUmIncomeHistoryExample.java:41](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmIncomeHistoryExample.java#L41) -[GET /papi/v1/cm/commissionRate](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-User-Commission-Rate-for-CM) - getUserCommissionRateForCm - [GetUserCommissionRateForCmExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUserCommissionRateForCmExample.java#L47) +[GET /papi/v1/cm/commissionRate](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-user-commission-rate-for-cm) - getUserCommissionRateForCm - [GetUserCommissionRateForCmExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUserCommissionRateForCmExample.java#L36) -[GET /papi/v1/um/commissionRate](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-User-Commission-Rate-for-UM) - getUserCommissionRateForUm - [GetUserCommissionRateForUmExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUserCommissionRateForUmExample.java#L47) +[GET /papi/v1/um/commissionRate](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-user-commission-rate-for-um) - getUserCommissionRateForUm - [GetUserCommissionRateForUmExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUserCommissionRateForUmExample.java#L36) -[GET /papi/v1/margin/maxBorrowable](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Margin-Max-Borrow) - marginMaxBorrow - [MarginMaxBorrowExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/MarginMaxBorrowExample.java#L47) +[GET /papi/v1/margin/maxBorrowable](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#margin-max-borrow) - marginMaxBorrow - [MarginMaxBorrowExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/MarginMaxBorrowExample.java#L36) -[GET /papi/v1/um/apiTradingStatus](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Portfolio-Margin-UM-Trading-Quantitative-Rules-Indicators) - portfolioMarginUmTradingQuantitativeRulesIndicators - [PortfolioMarginUmTradingQuantitativeRulesIndicatorsExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/PortfolioMarginUmTradingQuantitativeRulesIndicatorsExample.java#L48) +[GET /papi/v1/um/apiTradingStatus](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#portfolio-margin-um-trading-quantitative-rules-indicators) - portfolioMarginUmTradingQuantitativeRulesIndicators - [PortfolioMarginUmTradingQuantitativeRulesIndicatorsExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/PortfolioMarginUmTradingQuantitativeRulesIndicatorsExample.java#L37) -[GET /papi/v1/cm/positionRisk](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-CM-Position-Information) - queryCmPositionInformation - [QueryCmPositionInformationExample.java:52](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryCmPositionInformationExample.java#L52) +[GET /papi/v1/cm/positionRisk](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-cm-position-information) - queryCmPositionInformation - [QueryCmPositionInformationExample.java:41](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryCmPositionInformationExample.java#L41) -[GET /papi/v1/margin/marginLoan](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-Margin-Loan-Record) - queryMarginLoanRecord - [QueryMarginLoanRecordExample.java:51](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginLoanRecordExample.java#L51) +[GET /papi/v1/margin/marginLoan](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-margin-loan-record) - queryMarginLoanRecord - [QueryMarginLoanRecordExample.java:41](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginLoanRecordExample.java#L41) -[GET /papi/v1/margin/maxWithdraw](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-Margin-Max-Withdraw) - queryMarginMaxWithdraw - [QueryMarginMaxWithdrawExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginMaxWithdrawExample.java#L47) +[GET /papi/v1/margin/maxWithdraw](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-margin-max-withdraw) - queryMarginMaxWithdraw - [QueryMarginMaxWithdrawExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginMaxWithdrawExample.java#L36) -[GET /papi/v1/margin/repayLoan](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-Margin-repay-Record) - queryMarginRepayRecord - [QueryMarginRepayRecordExample.java:51](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginRepayRecordExample.java#L51) +[GET /papi/v1/margin/repayLoan](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-margin-repay-record) - queryMarginRepayRecord - [QueryMarginRepayRecordExample.java:41](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginRepayRecordExample.java#L41) -[GET /papi/v1/portfolio/interest-history](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-Portfolio-Margin-Negative-Balance-Interest-History) - queryPortfolioMarginNegativeBalanceInterestHistory - [QueryPortfolioMarginNegativeBalanceInterestHistoryExample.java:54](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryPortfolioMarginNegativeBalanceInterestHistoryExample.java#L54) +[GET /papi/v1/portfolio/interest-history](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-portfolio-margin-negative-balance-interest-history) - queryPortfolioMarginNegativeBalanceInterestHistory - [QueryPortfolioMarginNegativeBalanceInterestHistoryExample.java:43](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryPortfolioMarginNegativeBalanceInterestHistoryExample.java#L43) -[GET /papi/v1/um/positionRisk](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-UM-Position-Information) - queryUmPositionInformation - [QueryUmPositionInformationExample.java:50](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUmPositionInformationExample.java#L50) +[GET /papi/v1/um/positionRisk](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-um-position-information) - queryUmPositionInformation - [QueryUmPositionInformationExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUmPositionInformationExample.java#L39) -[GET /papi/v1/portfolio/negative-balance-exchange-record](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-User-Negative-Balance-Auto-Exchange-Record) - queryUserNegativeBalanceAutoExchangeRecord - [QueryUserNegativeBalanceAutoExchangeRecordExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUserNegativeBalanceAutoExchangeRecordExample.java#L48) +[GET /papi/v1/portfolio/negative-balance-exchange-record](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-user-negative-balance-auto-exchange-record) - queryUserNegativeBalanceAutoExchangeRecord - [QueryUserNegativeBalanceAutoExchangeRecordExample.java:38](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUserNegativeBalanceAutoExchangeRecordExample.java#L38) -[GET /papi/v1/rateLimit/order](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-User-Rate-Limit) - queryUserRateLimit - [QueryUserRateLimitExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUserRateLimitExample.java#L47) +[GET /papi/v1/rateLimit/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-user-rate-limit) - queryUserRateLimit - [QueryUserRateLimitExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUserRateLimitExample.java#L36) -[POST /papi/v1/repay-futures-negative-balance](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Repay-futures-Negative-Balance) - repayFuturesNegativeBalance - [RepayFuturesNegativeBalanceExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/RepayFuturesNegativeBalanceExample.java#L48) +[POST /papi/v1/repay-futures-negative-balance](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#repay-futures-negative-balance) - repayFuturesNegativeBalance - [RepayFuturesNegativeBalanceExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/RepayFuturesNegativeBalanceExample.java#L37) -[GET /papi/v1/um/accountConfig](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Futures-Account-Config) - umFuturesAccountConfiguration - [UmFuturesAccountConfigurationExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmFuturesAccountConfigurationExample.java#L47) +[GET /papi/v1/um/accountConfig](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#um-futures-account-configuration) - umFuturesAccountConfiguration - [UmFuturesAccountConfigurationExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmFuturesAccountConfigurationExample.java#L36) -[GET /papi/v1/um/symbolConfig](https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Futures-Symbol-Config) - umFuturesSymbolConfiguration - [UmFuturesSymbolConfigurationExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmFuturesSymbolConfigurationExample.java#L47) +[GET /papi/v1/um/symbolConfig](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#um-futures-symbol-configuration) - umFuturesSymbolConfiguration - [UmFuturesSymbolConfigurationExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmFuturesSymbolConfigurationExample.java#L36) -[GET /papi/v1/um/leverageBracket](https://developers.binance.com/docs/derivatives/portfolio-margin/account/UM-Notional-and-Leverage-Brackets) - umNotionalAndLeverageBrackets - [UmNotionalAndLeverageBracketsExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmNotionalAndLeverageBracketsExample.java#L47) +[GET /papi/v1/um/leverageBracket](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#um-notional-and-leverage-brackets) - umNotionalAndLeverageBrackets - [UmNotionalAndLeverageBracketsExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmNotionalAndLeverageBracketsExample.java#L36) ## MarketData -[GET /papi/v1/ping](https://developers.binance.com/docs/derivatives/portfolio-margin/market-data/Test-Connectivity) - testConnectivity - [TestConnectivityExample.java:45](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/marketdata/TestConnectivityExample.java#L45) +[GET /papi/v1/ping](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/market-data#test-connectivity) - testConnectivity - [TestConnectivityExample.java:34](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/marketdata/TestConnectivityExample.java#L34) ## Trade -[DELETE /papi/v1/cm/conditional/allOpenOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-CM-Open-Conditional-Orders) - cancelAllCmOpenConditionalOrders - [CancelAllCmOpenConditionalOrdersExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllCmOpenConditionalOrdersExample.java#L47) +[DELETE /papi/v1/cm/conditional/allOpenOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-cm-open-conditional-orders) - cancelAllCmOpenConditionalOrders - [CancelAllCmOpenConditionalOrdersExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllCmOpenConditionalOrdersExample.java#L36) -[DELETE /papi/v1/cm/allOpenOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-CM-Open-Orders) - cancelAllCmOpenOrders - [CancelAllCmOpenOrdersExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllCmOpenOrdersExample.java#L47) +[DELETE /papi/v1/cm/allOpenOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-cm-open-orders) - cancelAllCmOpenOrders - [CancelAllCmOpenOrdersExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllCmOpenOrdersExample.java#L36) -[DELETE /papi/v1/um/algo/allOpenOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-UM-Algo-Open-Orders) - cancelAllUmAlgoOpenOrders - [CancelAllUmAlgoOpenOrdersExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmAlgoOpenOrdersExample.java#L47) +[DELETE /papi/v1/um/algo/allOpenOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-um-algo-open-orders) - cancelAllUmAlgoOpenOrders - [CancelAllUmAlgoOpenOrdersExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmAlgoOpenOrdersExample.java#L36) -[DELETE /papi/v1/um/conditional/allOpenOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-UM-Open-Conditional-Orders) - cancelAllUmOpenConditionalOrders - [CancelAllUmOpenConditionalOrdersExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmOpenConditionalOrdersExample.java#L47) +[DELETE /papi/v1/um/conditional/allOpenOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-um-open-conditional-orders) - cancelAllUmOpenConditionalOrders - [CancelAllUmOpenConditionalOrdersExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmOpenConditionalOrdersExample.java#L36) -[DELETE /papi/v1/um/allOpenOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-UM-Open-Orders) - cancelAllUmOpenOrders - [CancelAllUmOpenOrdersExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmOpenOrdersExample.java#L47) +[DELETE /papi/v1/um/allOpenOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-um-open-orders) - cancelAllUmOpenOrders - [CancelAllUmOpenOrdersExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmOpenOrdersExample.java#L36) -[DELETE /papi/v1/cm/conditional/order](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-CM-Conditional-Order) - cancelCmConditionalOrder - [CancelCmConditionalOrderExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelCmConditionalOrderExample.java#L48) +[DELETE /papi/v1/cm/conditional/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-cm-conditional-order) - cancelCmConditionalOrder - [CancelCmConditionalOrderExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelCmConditionalOrderExample.java#L37) -[DELETE /papi/v1/cm/order](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-CM-Order) - cancelCmOrder - [CancelCmOrderExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelCmOrderExample.java#L48) +[DELETE /papi/v1/cm/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-cm-order) - cancelCmOrder - [CancelCmOrderExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelCmOrderExample.java#L37) -[DELETE /papi/v1/margin/allOpenOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-Margin-Account-All-Open-Orders-on-a-Symbol) - cancelMarginAccountAllOpenOrdersOnASymbol - [CancelMarginAccountAllOpenOrdersOnASymbolExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountAllOpenOrdersOnASymbolExample.java#L47) +[DELETE /papi/v1/margin/allOpenOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-margin-account-all-open-orders-on-asymbol) - cancelMarginAccountAllOpenOrdersOnASymbol - [CancelMarginAccountAllOpenOrdersOnASymbolExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountAllOpenOrdersOnASymbolExample.java#L36) -[DELETE /papi/v1/margin/orderList](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-Margin-Account-OCO-Orders) - cancelMarginAccountOcoOrders - [CancelMarginAccountOcoOrdersExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountOcoOrdersExample.java#L48) +[DELETE /papi/v1/margin/orderList](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-margin-account-oco-orders) - cancelMarginAccountOcoOrders - [CancelMarginAccountOcoOrdersExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountOcoOrdersExample.java#L37) -[DELETE /papi/v1/margin/order](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-Margin-Account-Order) - cancelMarginAccountOrder - [CancelMarginAccountOrderExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountOrderExample.java#L48) +[DELETE /papi/v1/margin/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-margin-account-order) - cancelMarginAccountOrder - [CancelMarginAccountOrderExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountOrderExample.java#L37) -[DELETE /papi/v1/um/algo/order](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-UM-Algo-Order) - cancelUmAlgoOrder - [CancelUmAlgoOrderExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmAlgoOrderExample.java#L48) +[DELETE /papi/v1/um/algo/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-um-algo-order) - cancelUmAlgoOrder - [CancelUmAlgoOrderExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmAlgoOrderExample.java#L37) -[DELETE /papi/v1/um/conditional/order](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-UM-Conditional-Order) - cancelUmConditionalOrder - [CancelUmConditionalOrderExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmConditionalOrderExample.java#L48) +[DELETE /papi/v1/um/conditional/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-um-conditional-order) - cancelUmConditionalOrder - [CancelUmConditionalOrderExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmConditionalOrderExample.java#L37) -[DELETE /papi/v1/um/order](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-UM-Order) - cancelUmOrder - [CancelUmOrderExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmOrderExample.java#L48) +[DELETE /papi/v1/um/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-um-order) - cancelUmOrder - [CancelUmOrderExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmOrderExample.java#L37) -[GET /papi/v1/cm/userTrades](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/CM-Account-Trade-List) - cmAccountTradeList - [CmAccountTradeListExample.java:55](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CmAccountTradeListExample.java#L55) +[GET /papi/v1/cm/userTrades](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cm-account-trade-list) - cmAccountTradeList - [CmAccountTradeListExample.java:45](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CmAccountTradeListExample.java#L45) -[GET /papi/v1/cm/adlQuantile](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/CM-Position-ADL-Quantile-Estimation) - cmPositionAdlQuantileEstimation - [CmPositionAdlQuantileEstimationExample.java:55](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CmPositionAdlQuantileEstimationExample.java#L55) +[GET /papi/v1/cm/adlQuantile](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cm-position-adl-quantile-estimation) - cmPositionAdlQuantileEstimation - [CmPositionAdlQuantileEstimationExample.java:44](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CmPositionAdlQuantileEstimationExample.java#L44) -[POST /papi/v1/um/stock/contract](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Futures-TradFi-Perps-Contract) - futuresTradfiPerpsContract - [FuturesTradfiPerpsContractExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/FuturesTradfiPerpsContractExample.java#L48) +[POST /papi/v1/um/stock/contract](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#futures-tradfi-perps-contract) - futuresTradfiPerpsContract - [FuturesTradfiPerpsContractExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/FuturesTradfiPerpsContractExample.java#L37) -[GET /papi/v1/um/feeBurn](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Get-UM-Futures-BNB-Burn-Status) - getUmFuturesBnbBurnStatus - [GetUmFuturesBnbBurnStatusExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/GetUmFuturesBnbBurnStatusExample.java#L48) +[GET /papi/v1/um/feeBurn](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#get-um-futures-bnb-burn-status) - getUmFuturesBnbBurnStatus - [GetUmFuturesBnbBurnStatusExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/GetUmFuturesBnbBurnStatusExample.java#L37) -[POST /papi/v1/marginLoan](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Borrow) - marginAccountBorrow - [MarginAccountBorrowExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountBorrowExample.java#L48) +[POST /papi/v1/marginLoan](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-borrow) - marginAccountBorrow - [MarginAccountBorrowExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountBorrowExample.java#L37) -[POST /papi/v1/margin/order/oco](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-New-OCO) - marginAccountNewOco - [MarginAccountNewOcoExample.java:53](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountNewOcoExample.java#L53) +[POST /papi/v1/margin/order/oco](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-new-oco) - marginAccountNewOco - [MarginAccountNewOcoExample.java:42](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountNewOcoExample.java#L42) -[POST /papi/v1/repayLoan](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Repay) - marginAccountRepay - [MarginAccountRepayExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountRepayExample.java#L48) +[POST /papi/v1/repayLoan](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-repay) - marginAccountRepay - [MarginAccountRepayExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountRepayExample.java#L37) -[POST /papi/v1/margin/repay-debt](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Repay-Debt) - marginAccountRepayDebt - [MarginAccountRepayDebtExample.java:53](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountRepayDebtExample.java#L53) +[POST /papi/v1/margin/repay-debt](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-repay-debt) - marginAccountRepayDebt - [MarginAccountRepayDebtExample.java:43](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountRepayDebtExample.java#L43) -[GET /papi/v1/margin/myTrades](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Trade-List) - marginAccountTradeList - [MarginAccountTradeListExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountTradeListExample.java#L47) +[GET /papi/v1/margin/myTrades](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-trade-list) - marginAccountTradeList - [MarginAccountTradeListExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountTradeListExample.java#L39) -[PUT /papi/v1/cm/order](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Modify-CM-Order) - modifyCmOrder - [ModifyCmOrderExample.java:58](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ModifyCmOrderExample.java#L58) +[PUT /papi/v1/cm/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#modify-cm-order) - modifyCmOrder - [ModifyCmOrderExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ModifyCmOrderExample.java#L47) -[PUT /papi/v1/um/order](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Modify-UM-Order) - modifyUmOrder - [ModifyUmOrderExample.java:56](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ModifyUmOrderExample.java#L56) +[PUT /papi/v1/um/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#modify-um-order) - modifyUmOrder - [ModifyUmOrderExample.java:45](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ModifyUmOrderExample.java#L45) -[POST /papi/v1/cm/conditional/order](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-CM-Conditional-Order) - newCmConditionalOrder - [NewCmConditionalOrderExample.java:76](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewCmConditionalOrderExample.java#L76) +[POST /papi/v1/cm/conditional/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-cm-conditional-order) - newCmConditionalOrder - [NewCmConditionalOrderExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewCmConditionalOrderExample.java#L48) -[POST /papi/v1/cm/order](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-CM-Order) - newCmOrder - [NewCmOrderExample.java:53](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewCmOrderExample.java#L53) +[POST /papi/v1/cm/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-cm-order) - newCmOrder - [NewCmOrderExample.java:43](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewCmOrderExample.java#L43) -[POST /papi/v1/margin/order](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-Margin-Order) - newMarginOrder - [NewMarginOrderExample.java:50](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewMarginOrderExample.java#L50) +[POST /papi/v1/margin/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-margin-order) - newMarginOrder - [NewMarginOrderExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewMarginOrderExample.java#L39) -[POST /papi/v1/um/algo/order](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-UM-Algo-Order) - newUmAlgoOrder - [NewUmAlgoOrderExample.java:82](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmAlgoOrderExample.java#L82) +[POST /papi/v1/um/algo/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-um-algo-order) - newUmAlgoOrder - [NewUmAlgoOrderExample.java:53](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmAlgoOrderExample.java#L53) -[POST /papi/v1/um/conditional/order](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-UM-Conditional-Order) - newUmConditionalOrder - [NewUmConditionalOrderExample.java:80](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmConditionalOrderExample.java#L80) +[POST /papi/v1/um/conditional/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-um-conditional-order) - newUmConditionalOrder - [NewUmConditionalOrderExample.java:52](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmConditionalOrderExample.java#L52) -[POST /papi/v1/um/order](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-UM-Order) - newUmOrder - [NewUmOrderExample.java:56](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmOrderExample.java#L56) +[POST /papi/v1/um/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-um-order) - newUmOrder - [NewUmOrderExample.java:46](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmOrderExample.java#L46) -[GET /papi/v1/cm/conditional/allOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Conditional-Orders) - queryAllCmConditionalOrders - [QueryAllCmConditionalOrdersExample.java:51](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCmConditionalOrdersExample.java#L51) +[GET /papi/v1/cm/conditional/allOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-cm-conditional-orders) - queryAllCmConditionalOrders - [QueryAllCmConditionalOrdersExample.java:40](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCmConditionalOrdersExample.java#L40) -[GET /papi/v1/cm/allOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Orders) - queryAllCmOrders - [QueryAllCmOrdersExample.java:51](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCmOrdersExample.java#L51) +[GET /papi/v1/cm/allOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-cm-orders) - queryAllCmOrders - [QueryAllCmOrdersExample.java:41](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCmOrdersExample.java#L41) -[GET /papi/v1/cm/conditional/openOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-CM-Open-Conditional-Orders) - queryAllCurrentCmOpenConditionalOrders - [QueryAllCurrentCmOpenConditionalOrdersExample.java:49](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentCmOpenConditionalOrdersExample.java#L49) +[GET /papi/v1/cm/conditional/openOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-cm-open-conditional-orders) - queryAllCurrentCmOpenConditionalOrders - [QueryAllCurrentCmOpenConditionalOrdersExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentCmOpenConditionalOrdersExample.java#L39) -[GET /papi/v1/cm/openOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-CM-Open-Orders) - queryAllCurrentCmOpenOrders - [QueryAllCurrentCmOpenOrdersExample.java:49](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentCmOpenOrdersExample.java#L49) +[GET /papi/v1/cm/openOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-cm-open-orders) - queryAllCurrentCmOpenOrders - [QueryAllCurrentCmOpenOrdersExample.java:38](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentCmOpenOrdersExample.java#L38) -[GET /papi/v1/um/algo/openAlgoOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-UM-Open-Algo-Orders) - queryAllCurrentUmOpenAlgoOrders - [QueryAllCurrentUmOpenAlgoOrdersExample.java:49](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenAlgoOrdersExample.java#L49) +[GET /papi/v1/um/algo/openAlgoOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-um-open-algo-orders) - queryAllCurrentUmOpenAlgoOrders - [QueryAllCurrentUmOpenAlgoOrdersExample.java:38](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenAlgoOrdersExample.java#L38) -[GET /papi/v1/um/conditional/openOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-UM-Open-Conditional-Orders) - queryAllCurrentUmOpenConditionalOrders - [QueryAllCurrentUmOpenConditionalOrdersExample.java:49](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenConditionalOrdersExample.java#L49) +[GET /papi/v1/um/conditional/openOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-um-open-conditional-orders) - queryAllCurrentUmOpenConditionalOrders - [QueryAllCurrentUmOpenConditionalOrdersExample.java:38](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenConditionalOrdersExample.java#L38) -[GET /papi/v1/um/openOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-UM-Open-Orders) - queryAllCurrentUmOpenOrders - [QueryAllCurrentUmOpenOrdersExample.java:49](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenOrdersExample.java#L49) +[GET /papi/v1/um/openOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-um-open-orders) - queryAllCurrentUmOpenOrders - [QueryAllCurrentUmOpenOrdersExample.java:38](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenOrdersExample.java#L38) -[GET /papi/v1/margin/allOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Margin-Account-Orders) - queryAllMarginAccountOrders - [QueryAllMarginAccountOrdersExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllMarginAccountOrdersExample.java#L47) +[GET /papi/v1/margin/allOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-margin-account-orders) - queryAllMarginAccountOrders - [QueryAllMarginAccountOrdersExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllMarginAccountOrdersExample.java#L39) -[GET /papi/v1/um/conditional/allOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Conditional-Orders) - queryAllUmConditionalOrders - [QueryAllUmConditionalOrdersExample.java:51](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllUmConditionalOrdersExample.java#L51) +[GET /papi/v1/um/conditional/allOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-um-conditional-orders) - queryAllUmConditionalOrders - [QueryAllUmConditionalOrdersExample.java:40](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllUmConditionalOrdersExample.java#L40) -[GET /papi/v1/um/allOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Orders) - queryAllUmOrders - [QueryAllUmOrdersExample.java:51](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllUmOrdersExample.java#L51) +[GET /papi/v1/um/allOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-um-orders) - queryAllUmOrders - [QueryAllUmOrdersExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllUmOrdersExample.java#L39) -[GET /papi/v1/cm/conditional/orderHistory](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-CM-Conditional-Order-History) - queryCmConditionalOrderHistory - [QueryCmConditionalOrderHistoryExample.java:51](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmConditionalOrderHistoryExample.java#L51) +[GET /papi/v1/cm/conditional/orderHistory](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-cm-conditional-order-history) - queryCmConditionalOrderHistory - [QueryCmConditionalOrderHistoryExample.java:40](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmConditionalOrderHistoryExample.java#L40) -[GET /papi/v1/cm/orderAmendment](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-CM-Modify-Order-History) - queryCmModifyOrderHistory - [QueryCmModifyOrderHistoryExample.java:49](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmModifyOrderHistoryExample.java#L49) +[GET /papi/v1/cm/orderAmendment](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-cm-modify-order-history) - queryCmModifyOrderHistory - [QueryCmModifyOrderHistoryExample.java:38](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmModifyOrderHistoryExample.java#L38) -[GET /papi/v1/cm/order](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-CM-Order) - queryCmOrder - [QueryCmOrderExample.java:50](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmOrderExample.java#L50) +[GET /papi/v1/cm/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-cm-order) - queryCmOrder - [QueryCmOrderExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmOrderExample.java#L39) -[GET /papi/v1/cm/conditional/openOrder](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-CM-Open-Conditional-Order) - queryCurrentCmOpenConditionalOrder - [QueryCurrentCmOpenConditionalOrderExample.java:50](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentCmOpenConditionalOrderExample.java#L50) +[GET /papi/v1/cm/conditional/openOrder](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-cm-open-conditional-order) - queryCurrentCmOpenConditionalOrder - [QueryCurrentCmOpenConditionalOrderExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentCmOpenConditionalOrderExample.java#L39) -[GET /papi/v1/cm/openOrder](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-CM-Open-Order) - queryCurrentCmOpenOrder - [QueryCurrentCmOpenOrderExample.java:49](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentCmOpenOrderExample.java#L49) +[GET /papi/v1/cm/openOrder](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-cm-open-order) - queryCurrentCmOpenOrder - [QueryCurrentCmOpenOrderExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentCmOpenOrderExample.java#L39) -[GET /papi/v1/margin/openOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-Margin-Open-Order) - queryCurrentMarginOpenOrder - [QueryCurrentMarginOpenOrderExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentMarginOpenOrderExample.java#L47) +[GET /papi/v1/margin/openOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-margin-open-order) - queryCurrentMarginOpenOrder - [QueryCurrentMarginOpenOrderExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentMarginOpenOrderExample.java#L39) -[GET /papi/v1/um/algo/algoOrder](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-UM-Open-Algo-Order) - queryCurrentUmOpenAlgoOrder - [QueryCurrentUmOpenAlgoOrderExample.java:51](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenAlgoOrderExample.java#L51) +[GET /papi/v1/um/algo/algoOrder](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-um-open-algo-order) - queryCurrentUmOpenAlgoOrder - [QueryCurrentUmOpenAlgoOrderExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenAlgoOrderExample.java#L39) -[GET /papi/v1/um/conditional/openOrder](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-UM-Open-Conditional-Order) - queryCurrentUmOpenConditionalOrder - [QueryCurrentUmOpenConditionalOrderExample.java:50](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenConditionalOrderExample.java#L50) +[GET /papi/v1/um/conditional/openOrder](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-um-open-conditional-order) - queryCurrentUmOpenConditionalOrder - [QueryCurrentUmOpenConditionalOrderExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenConditionalOrderExample.java#L39) -[GET /papi/v1/um/openOrder](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-UM-Open-Order) - queryCurrentUmOpenOrder - [QueryCurrentUmOpenOrderExample.java:49](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenOrderExample.java#L49) +[GET /papi/v1/um/openOrder](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-um-open-order) - queryCurrentUmOpenOrder - [QueryCurrentUmOpenOrderExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenOrderExample.java#L39) -[GET /papi/v1/margin/order](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Margin-Account-Order) - queryMarginAccountOrder - [QueryMarginAccountOrderExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountOrderExample.java#L47) +[GET /papi/v1/margin/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-margin-account-order) - queryMarginAccountOrder - [QueryMarginAccountOrderExample.java:38](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountOrderExample.java#L38) -[GET /papi/v1/margin/allOrderList](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Margin-Account-all-OCO) - queryMarginAccountsAllOco - [QueryMarginAccountsAllOcoExample.java:48](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsAllOcoExample.java#L48) +[GET /papi/v1/margin/allOrderList](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-margin-accounts-all-oco) - queryMarginAccountsAllOco - [QueryMarginAccountsAllOcoExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsAllOcoExample.java#L37) -[GET /papi/v1/margin/orderList](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Margin-Account-OCO) - queryMarginAccountsOco - [QueryMarginAccountsOcoExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsOcoExample.java#L47) +[GET /papi/v1/margin/orderList](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-margin-accounts-oco) - queryMarginAccountsOco - [QueryMarginAccountsOcoExample.java:37](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsOcoExample.java#L37) -[GET /papi/v1/margin/openOrderList](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Margin-Account-Open-OCO) - queryMarginAccountsOpenOco - [QueryMarginAccountsOpenOcoExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsOpenOcoExample.java#L47) +[GET /papi/v1/margin/openOrderList](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-margin-accounts-open-oco) - queryMarginAccountsOpenOco - [QueryMarginAccountsOpenOcoExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsOpenOcoExample.java#L36) -[GET /papi/v1/um/algo/allAlgoOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-UM-Algo-Order-History) - queryUmAlgoOrderHistory - [QueryUmAlgoOrderHistoryExample.java:50](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmAlgoOrderHistoryExample.java#L50) +[GET /papi/v1/um/algo/allAlgoOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-um-algo-order-history) - queryUmAlgoOrderHistory - [QueryUmAlgoOrderHistoryExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmAlgoOrderHistoryExample.java#L39) -[GET /papi/v1/um/conditional/orderHistory](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-UM-Conditional-Order-History) - queryUmConditionalOrderHistory - [QueryUmConditionalOrderHistoryExample.java:51](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmConditionalOrderHistoryExample.java#L51) +[GET /papi/v1/um/conditional/orderHistory](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-um-conditional-order-history) - queryUmConditionalOrderHistory - [QueryUmConditionalOrderHistoryExample.java:40](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmConditionalOrderHistoryExample.java#L40) -[GET /papi/v1/um/orderAmendment](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-UM-Modify-Order-History) - queryUmModifyOrderHistory - [QueryUmModifyOrderHistoryExample.java:49](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmModifyOrderHistoryExample.java#L49) +[GET /papi/v1/um/orderAmendment](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-um-modify-order-history) - queryUmModifyOrderHistory - [QueryUmModifyOrderHistoryExample.java:38](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmModifyOrderHistoryExample.java#L38) -[GET /papi/v1/um/order](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-UM-Order) - queryUmOrder - [QueryUmOrderExample.java:50](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmOrderExample.java#L50) +[GET /papi/v1/um/order](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-um-order) - queryUmOrder - [QueryUmOrderExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmOrderExample.java#L39) -[GET /papi/v1/cm/forceOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Users-CM-Force-Orders) - queryUsersCmForceOrders - [QueryUsersCmForceOrdersExample.java:51](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersCmForceOrdersExample.java#L51) +[GET /papi/v1/cm/forceOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-users-cm-force-orders) - queryUsersCmForceOrders - [QueryUsersCmForceOrdersExample.java:40](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersCmForceOrdersExample.java#L40) -[GET /papi/v1/margin/forceOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Users-Margin-Force-Orders) - queryUsersMarginForceOrders - [QueryUsersMarginForceOrdersExample.java:47](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersMarginForceOrdersExample.java#L47) +[GET /papi/v1/margin/forceOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-users-margin-force-orders) - queryUsersMarginForceOrders - [QueryUsersMarginForceOrdersExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersMarginForceOrdersExample.java#L36) -[GET /papi/v1/um/forceOrders](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Users-UM-Force-Orders) - queryUsersUmForceOrders - [QueryUsersUmForceOrdersExample.java:51](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersUmForceOrdersExample.java#L51) +[GET /papi/v1/um/forceOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-users-um-force-orders) - queryUsersUmForceOrders - [QueryUsersUmForceOrdersExample.java:40](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersUmForceOrdersExample.java#L40) -[POST /papi/v1/um/feeBurn](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Toggle-BNB-Burn-On-UM-Futures-Trade) - toggleBnbBurnOnUmFuturesTrade - [ToggleBnbBurnOnUmFuturesTradeExample.java:50](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ToggleBnbBurnOnUmFuturesTradeExample.java#L50) +[POST /papi/v1/um/feeBurn](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#toggle-bnb-burn-on-um-futures-trade) - toggleBnbBurnOnUmFuturesTrade - [ToggleBnbBurnOnUmFuturesTradeExample.java:40](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ToggleBnbBurnOnUmFuturesTradeExample.java#L40) -[GET /papi/v1/um/userTrades](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/UM-Account-Trade-List) - umAccountTradeList - [UmAccountTradeListExample.java:51](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/UmAccountTradeListExample.java#L51) +[GET /papi/v1/um/userTrades](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#um-account-trade-list) - umAccountTradeList - [UmAccountTradeListExample.java:40](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/UmAccountTradeListExample.java#L40) -[GET /papi/v1/um/adlQuantile](https://developers.binance.com/docs/derivatives/portfolio-margin/trade/UM-Position-ADL-Quantile-Estimation) - umPositionAdlQuantileEstimation - [UmPositionAdlQuantileEstimationExample.java:55](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/UmPositionAdlQuantileEstimationExample.java#L55) +[GET /papi/v1/um/adlQuantile](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#um-position-adl-quantile-estimation) - umPositionAdlQuantileEstimation - [UmPositionAdlQuantileEstimationExample.java:44](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/UmPositionAdlQuantileEstimationExample.java#L44) ## UserDataStreams -[DELETE /papi/v1/listenKey](https://developers.binance.com/docs/derivatives/portfolio-margin/user-data-streams/Close-User-Data-Stream) - closeUserDataStream - [CloseUserDataStreamExample.java:45](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/CloseUserDataStreamExample.java#L45) +[DELETE /papi/v1/listenKey](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/user-data-streams#close-user-data-stream) - closeUserDataStream - [CloseUserDataStreamExample.java:34](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/CloseUserDataStreamExample.java#L34) -[PUT /papi/v1/listenKey](https://developers.binance.com/docs/derivatives/portfolio-margin/user-data-streams/Keepalive-User-Data-Stream) - keepaliveUserDataStream - [KeepaliveUserDataStreamExample.java:46](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/KeepaliveUserDataStreamExample.java#L46) +[PUT /papi/v1/listenKey](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/user-data-streams#keepalive-user-data-stream) - keepaliveUserDataStream - [KeepaliveUserDataStreamExample.java:36](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/KeepaliveUserDataStreamExample.java#L36) -[POST /papi/v1/listenKey](https://developers.binance.com/docs/derivatives/portfolio-margin/user-data-streams/Start-User-Data-Stream) - startUserDataStream - [StartUserDataStreamExample.java:49](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/StartUserDataStreamExample.java#L49) +[POST /papi/v1/listenKey](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/user-data-streams#start-user-data-stream) - startUserDataStream - [StartUserDataStreamExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/StartUserDataStreamExample.java#L39) diff --git a/clients/derivatives-trading-portfolio-margin/pom.xml b/clients/derivatives-trading-portfolio-margin/pom.xml index 41d46e62f..75cd9e47b 100644 --- a/clients/derivatives-trading-portfolio-margin/pom.xml +++ b/clients/derivatives-trading-portfolio-margin/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-derivatives-trading-portfolio-margin derivatives-trading-portfolio-margin - 6.0.0 + 7.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/JSON.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/JSON.java index ac1fca2c1..08f25194c 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/JSON.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -306,13 +306,13 @@ private static Class getClassByDiscriminator( .GetUmAccountDetailResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model - .GetUmAccountDetailResponsePositionsInner.CustomTypeAdapterFactory()); + .GetUmAccountDetailResponseAssetsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model - .GetUmAccountDetailV2Response.CustomTypeAdapterFactory()); + .GetUmAccountDetailResponsePositionsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model - .GetUmAccountDetailV2ResponseAssetsInner.CustomTypeAdapterFactory()); + .GetUmAccountDetailV2Response.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model .GetUmAccountDetailV2ResponsePositionsInner.CustomTypeAdapterFactory()); diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/AccountApi.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/AccountApi.java index 6063ef9ad..f0094fb56 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/AccountApi.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/AccountApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.binance.connector.client.common.exception.ConstraintViolationException; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.AccountBalanceResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.AccountInformationResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Archived; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.BnbTransferRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.BnbTransferResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ChangeAutoRepayFuturesStatusRequest; @@ -56,6 +57,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUmIncomeHistoryResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUserCommissionRateForCmResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUserCommissionRateForUmResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.IncomeType; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.MarginMaxBorrowResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCmPositionInformationResponse; @@ -94,7 +96,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-portfolio-margin/6.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-portfolio-margin/7.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -146,8 +148,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Account - * Balance(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#account-balance">Account + * Balance (USER_DATA) Documentation */ private okhttp3.Call accountBalanceCall(String asset, Long recvWindow) throws ApiException { String basePath = null; @@ -244,7 +246,7 @@ private okhttp3.Call accountBalanceValidateBeforeCall(String asset, Long recvWin } /** - * Account Balance(USER_DATA) Query account balance Weight: 20 + * Account Balance (USER_DATA) Query account balance Weight(IP): 20 Security Type: USER_DATA * * @param asset (optional) * @param recvWindow (optional) @@ -259,8 +261,8 @@ private okhttp3.Call accountBalanceValidateBeforeCall(String asset, Long recvWin * * * @see Account - * Balance(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#account-balance">Account + * Balance (USER_DATA) Documentation */ public ApiResponse accountBalance(String asset, Long recvWindow) throws ApiException { @@ -284,8 +286,8 @@ public ApiResponse accountBalance(String asset, Long rec * * * @see Account - * Information(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#account-information">Account + * Information (USER_DATA) Documentation */ private okhttp3.Call accountInformationCall(Long recvWindow) throws ApiException { String basePath = null; @@ -377,7 +379,8 @@ private okhttp3.Call accountInformationValidateBeforeCall(Long recvWindow) throw } /** - * Account Information(USER_DATA) Query account information Weight: 20 + * Account Information (USER_DATA) Query account information Weight(IP): 20 Security Type: + * USER_DATA * * @param recvWindow (optional) * @return ApiResponse<AccountInformationResponse> @@ -391,8 +394,8 @@ private okhttp3.Call accountInformationValidateBeforeCall(Long recvWindow) throw * * * @see Account - * Information(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#account-information">Account + * Information (USER_DATA) Documentation */ public ApiResponse accountInformation(Long recvWindow) throws ApiException { @@ -416,7 +419,7 @@ public ApiResponse accountInformation(Long recvWindo * * * @see BNB + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#bnb-transfer">BNB * transfer (TRADE) Documentation */ private okhttp3.Call bnbTransferCall(BnbTransferRequest bnbTransferRequest) @@ -521,8 +524,8 @@ private okhttp3.Call bnbTransferValidateBeforeCall(BnbTransferRequest bnbTransfe } /** - * BNB transfer (TRADE) Transfer BNB in and out of UM * The endpoint can only be called 10 times - * per 10 minutes in a rolling manner Weight: 750 + * BNB transfer (TRADE) Transfer BNB in and out of UM Weight(IP): 750 Security Type: TRADE + * Notes: - The endpoint can only be called 10 times per 10 minutes in a rolling manner * * @param bnbTransferRequest (required) * @return ApiResponse<BnbTransferResponse> @@ -536,7 +539,7 @@ private okhttp3.Call bnbTransferValidateBeforeCall(BnbTransferRequest bnbTransfe * * * @see BNB + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#bnb-transfer">BNB * transfer (TRADE) Documentation */ public ApiResponse bnbTransfer( @@ -561,8 +564,8 @@ public ApiResponse bnbTransfer( * * * @see Change - * Auto-repay-futures Status(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-auto-repay-futures-status">Change + * Auto-repay-futures Status (TRADE) Documentation */ private okhttp3.Call changeAutoRepayFuturesStatusCall( ChangeAutoRepayFuturesStatusRequest changeAutoRepayFuturesStatusRequest) @@ -667,7 +670,8 @@ private okhttp3.Call changeAutoRepayFuturesStatusValidateBeforeCall( } /** - * Change Auto-repay-futures Status(TRADE) Change Auto-repay-futures Status Weight: 750 + * Change Auto-repay-futures Status (TRADE) Change Auto-repay-futures Status Weight(IP): 750 + * Security Type: TRADE * * @param changeAutoRepayFuturesStatusRequest (required) * @return ApiResponse<ChangeAutoRepayFuturesStatusResponse> @@ -681,8 +685,8 @@ private okhttp3.Call changeAutoRepayFuturesStatusValidateBeforeCall( * * * @see Change - * Auto-repay-futures Status(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-auto-repay-futures-status">Change + * Auto-repay-futures Status (TRADE) Documentation */ public ApiResponse changeAutoRepayFuturesStatus( @Valid @NotNull ChangeAutoRepayFuturesStatusRequest changeAutoRepayFuturesStatusRequest) @@ -708,7 +712,7 @@ public ApiResponse changeAutoRepayFuturesS * * * @see Change + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-cm-initial-leverage">Change * CM Initial Leverage (TRADE) Documentation */ private okhttp3.Call changeCmInitialLeverageCall( @@ -816,7 +820,7 @@ private okhttp3.Call changeCmInitialLeverageValidateBeforeCall( /** * Change CM Initial Leverage (TRADE) Change user's initial leverage of specific symbol in - * CM. Weight: 1 + * CM. Weight(IP): 1 Security Type: TRADE * * @param changeCmInitialLeverageRequest (required) * @return ApiResponse<ChangeCmInitialLeverageResponse> @@ -830,7 +834,7 @@ private okhttp3.Call changeCmInitialLeverageValidateBeforeCall( * * * @see Change + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-cm-initial-leverage">Change * CM Initial Leverage (TRADE) Documentation */ public ApiResponse changeCmInitialLeverage( @@ -857,8 +861,8 @@ public ApiResponse changeCmInitialLeverage( * * * @see Change - * CM Position Mode(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-cm-position-mode">Change + * CM Position Mode (TRADE) Documentation */ private okhttp3.Call changeCmPositionModeCall( ChangeCmPositionModeRequest changeCmPositionModeRequest) throws ApiException { @@ -959,8 +963,8 @@ private okhttp3.Call changeCmPositionModeValidateBeforeCall( } /** - * Change CM Position Mode(TRADE) Change user's position mode (Hedge Mode or One-way Mode ) - * on EVERY symbol in CM Weight: 1 + * Change CM Position Mode (TRADE) Change user's position mode (Hedge Mode or One-way Mode ) + * on EVERY symbol in CM Weight(IP): 1 Security Type: TRADE * * @param changeCmPositionModeRequest (required) * @return ApiResponse<ChangeCmPositionModeResponse> @@ -974,8 +978,8 @@ private okhttp3.Call changeCmPositionModeValidateBeforeCall( * * * @see Change - * CM Position Mode(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-cm-position-mode">Change + * CM Position Mode (TRADE) Documentation */ public ApiResponse changeCmPositionMode( @Valid @NotNull ChangeCmPositionModeRequest changeCmPositionModeRequest) @@ -1001,8 +1005,8 @@ public ApiResponse changeCmPositionMode( * * * @see Change - * UM Initial Leverage(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-um-initial-leverage">Change + * UM Initial Leverage (TRADE) Documentation */ private okhttp3.Call changeUmInitialLeverageCall( ChangeUmInitialLeverageRequest changeUmInitialLeverageRequest) throws ApiException { @@ -1108,8 +1112,8 @@ private okhttp3.Call changeUmInitialLeverageValidateBeforeCall( } /** - * Change UM Initial Leverage(TRADE) Change user's initial leverage of specific symbol in - * UM. Weight: 1 + * Change UM Initial Leverage (TRADE) Change user's initial leverage of specific symbol in + * UM. Weight(IP): 1 Security Type: TRADE * * @param changeUmInitialLeverageRequest (required) * @return ApiResponse<ChangeUmInitialLeverageResponse> @@ -1123,8 +1127,8 @@ private okhttp3.Call changeUmInitialLeverageValidateBeforeCall( * * * @see Change - * UM Initial Leverage(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-um-initial-leverage">Change + * UM Initial Leverage (TRADE) Documentation */ public ApiResponse changeUmInitialLeverage( @Valid @NotNull ChangeUmInitialLeverageRequest changeUmInitialLeverageRequest) @@ -1150,8 +1154,8 @@ public ApiResponse changeUmInitialLeverage( * * * @see Change - * UM Position Mode(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-um-position-mode">Change + * UM Position Mode (TRADE) Documentation */ private okhttp3.Call changeUmPositionModeCall( ChangeUmPositionModeRequest changeUmPositionModeRequest) throws ApiException { @@ -1252,8 +1256,8 @@ private okhttp3.Call changeUmPositionModeValidateBeforeCall( } /** - * Change UM Position Mode(TRADE) Change user's position mode (Hedge Mode or One-way Mode ) - * on EVERY symbol in UM Weight: 1 + * Change UM Position Mode (TRADE) Change user's position mode (Hedge Mode or One-way Mode ) + * on EVERY symbol in UM Weight(IP): 1 Security Type: TRADE * * @param changeUmPositionModeRequest (required) * @return ApiResponse<ChangeUmPositionModeResponse> @@ -1267,8 +1271,8 @@ private okhttp3.Call changeUmPositionModeValidateBeforeCall( * * * @see Change - * UM Position Mode(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-um-position-mode">Change + * UM Position Mode (TRADE) Documentation */ public ApiResponse changeUmPositionMode( @Valid @NotNull ChangeUmPositionModeRequest changeUmPositionModeRequest) @@ -1295,8 +1299,8 @@ public ApiResponse changeUmPositionMode( * * * @see CM - * Notional and Leverage Brackets(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#cm-notional-and-leverage-brackets">CM + * Notional and Leverage Brackets (USER_DATA) Documentation */ private okhttp3.Call cmNotionalAndLeverageBracketsCall(String symbol, Long recvWindow) throws ApiException { @@ -1396,8 +1400,8 @@ private okhttp3.Call cmNotionalAndLeverageBracketsValidateBeforeCall( } /** - * CM Notional and Leverage Brackets(USER_DATA) Query CM notional and leverage brackets Weight: - * 1 + * CM Notional and Leverage Brackets (USER_DATA) Query CM notional and leverage brackets + * Weight(IP): 1 Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -1412,8 +1416,8 @@ private okhttp3.Call cmNotionalAndLeverageBracketsValidateBeforeCall( * * * @see CM - * Notional and Leverage Brackets(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#cm-notional-and-leverage-brackets">CM + * Notional and Leverage Brackets (USER_DATA) Documentation */ public ApiResponse cmNotionalAndLeverageBrackets( String symbol, Long recvWindow) throws ApiException { @@ -1427,7 +1431,7 @@ public ApiResponse cmNotionalAndLeverageB /** * Build call for fundAutoCollection * - * @param fundAutoCollectionRequest (required) + * @param fundAutoCollectionRequest (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1438,8 +1442,8 @@ public ApiResponse cmNotionalAndLeverageB * * * @see Fund - * Auto-collection(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#fund-auto-collection">Fund + * Auto-collection (TRADE) Documentation */ private okhttp3.Call fundAutoCollectionCall(FundAutoCollectionRequest fundAutoCollectionRequest) throws ApiException { @@ -1535,11 +1539,11 @@ private okhttp3.Call fundAutoCollectionValidateBeforeCall( } /** - * Fund Auto-collection(TRADE) Fund collection for Portfolio Margin * The BNB would not be - * collected from UM-PM account to the Portfolio Margin account. * You can only use this - * function 500 times per hour in a rolling manner. Weight: 750 + * Fund Auto-collection (TRADE) Fund collection for Portfolio Margin Weight(IP): 750 Security + * Type: TRADE Notes: - BNB assets will not be auto-collected. - Rolling window endpoint can be + * called at most 500 times per hour. * - * @param fundAutoCollectionRequest (required) + * @param fundAutoCollectionRequest (optional) * @return ApiResponse<FundAutoCollectionResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1551,12 +1555,11 @@ private okhttp3.Call fundAutoCollectionValidateBeforeCall( * * * @see Fund - * Auto-collection(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#fund-auto-collection">Fund + * Auto-collection (TRADE) Documentation */ public ApiResponse fundAutoCollection( - @Valid @NotNull FundAutoCollectionRequest fundAutoCollectionRequest) - throws ApiException { + @Valid FundAutoCollectionRequest fundAutoCollectionRequest) throws ApiException { okhttp3.Call localVarCall = fundAutoCollectionValidateBeforeCall(fundAutoCollectionRequest); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -1577,8 +1580,8 @@ public ApiResponse fundAutoCollection( * * * @see Fund - * Collection by Asset(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#fund-collection-by-asset">Fund + * Collection by Asset (TRADE) Documentation */ private okhttp3.Call fundCollectionByAssetCall( FundCollectionByAssetRequest fundCollectionByAssetRequest) throws ApiException { @@ -1678,8 +1681,8 @@ private okhttp3.Call fundCollectionByAssetValidateBeforeCall( } /** - * Fund Collection by Asset(TRADE) Transfers specific asset from Futures Account to Margin - * account * The BNB transfer is not be supported Weight: 30 + * Fund Collection by Asset (TRADE) Transfers specific asset from Futures Account to Margin + * account Weight(IP): 30 Security Type: TRADE Notes: - The BNB transfer is not be supported * * @param fundCollectionByAssetRequest (required) * @return ApiResponse<FundCollectionByAssetResponse> @@ -1693,8 +1696,8 @@ private okhttp3.Call fundCollectionByAssetValidateBeforeCall( * * * @see Fund - * Collection by Asset(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#fund-collection-by-asset">Fund + * Collection by Asset (TRADE) Documentation */ public ApiResponse fundCollectionByAsset( @Valid @NotNull FundCollectionByAssetRequest fundCollectionByAssetRequest) @@ -1720,8 +1723,8 @@ public ApiResponse fundCollectionByAsset( * * * @see Get - * Auto-repay-futures Status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-auto-repay-futures-status">Get + * Auto-repay-futures Status (USER_DATA) Documentation */ private okhttp3.Call getAutoRepayFuturesStatusCall(Long recvWindow) throws ApiException { String basePath = null; @@ -1814,7 +1817,8 @@ private okhttp3.Call getAutoRepayFuturesStatusValidateBeforeCall(Long recvWindow } /** - * Get Auto-repay-futures Status(USER_DATA) Query Auto-repay-futures Status Weight: 30 + * Get Auto-repay-futures Status (USER_DATA) Query Auto-repay-futures Status Weight(IP): 30 + * Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetAutoRepayFuturesStatusResponse> @@ -1828,8 +1832,8 @@ private okhttp3.Call getAutoRepayFuturesStatusValidateBeforeCall(Long recvWindow * * * @see Get - * Auto-repay-futures Status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-auto-repay-futures-status">Get + * Auto-repay-futures Status (USER_DATA) Documentation */ public ApiResponse getAutoRepayFuturesStatus(Long recvWindow) throws ApiException { @@ -1853,8 +1857,8 @@ public ApiResponse getAutoRepayFuturesStatus( * * * @see Get - * CM Account Detail(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-account-detail">Get + * CM Account Detail (USER_DATA) Documentation */ private okhttp3.Call getCmAccountDetailCall(Long recvWindow) throws ApiException { String basePath = null; @@ -1946,8 +1950,8 @@ private okhttp3.Call getCmAccountDetailValidateBeforeCall(Long recvWindow) throw } /** - * Get CM Account Detail(USER_DATA) Get current CM account asset and position information. - * Weight: 5 + * Get CM Account Detail (USER_DATA) Get current CM account asset and position information. + * Weight(IP): 5 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetCmAccountDetailResponse> @@ -1961,8 +1965,8 @@ private okhttp3.Call getCmAccountDetailValidateBeforeCall(Long recvWindow) throw * * * @see Get - * CM Account Detail(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-account-detail">Get + * CM Account Detail (USER_DATA) Documentation */ public ApiResponse getCmAccountDetail(Long recvWindow) throws ApiException { @@ -1986,8 +1990,8 @@ public ApiResponse getCmAccountDetail(Long recvWindo * * * @see Get - * CM Current Position Mode(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-current-position-mode">Get + * CM Current Position Mode (USER_DATA) Documentation */ private okhttp3.Call getCmCurrentPositionModeCall(Long recvWindow) throws ApiException { String basePath = null; @@ -2080,8 +2084,8 @@ private okhttp3.Call getCmCurrentPositionModeValidateBeforeCall(Long recvWindow) } /** - * Get CM Current Position Mode(USER_DATA) Get user's position mode (Hedge Mode or One-way - * Mode ) on EVERY symbol in CM Weight: 30 + * Get CM Current Position Mode (USER_DATA) Get user's position mode (Hedge Mode or One-way + * Mode ) on EVERY symbol in CM Weight(IP): 30 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetCmCurrentPositionModeResponse> @@ -2095,8 +2099,8 @@ private okhttp3.Call getCmCurrentPositionModeValidateBeforeCall(Long recvWindow) * * * @see Get - * CM Current Position Mode(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-current-position-mode">Get + * CM Current Position Mode (USER_DATA) Documentation */ public ApiResponse getCmCurrentPositionMode(Long recvWindow) throws ApiException { @@ -2110,15 +2114,11 @@ public ApiResponse getCmCurrentPositionMode(Lo * Build call for getCmIncomeHistory * * @param symbol (optional) - * @param incomeType TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, - * INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, - * CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, - * AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, - * POSITION_LIMIT_INCREASE_FEE (optional) + * @param incomeType (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) * @param page (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2130,12 +2130,12 @@ public ApiResponse getCmCurrentPositionMode(Lo * * * @see Get - * CM Income History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-income-history">Get + * CM Income History (USER_DATA) Documentation */ private okhttp3.Call getCmIncomeHistoryCall( String symbol, - String incomeType, + IncomeType incomeType, Long startTime, Long endTime, Long page, @@ -2227,7 +2227,7 @@ private okhttp3.Call getCmIncomeHistoryCall( @SuppressWarnings("rawtypes") private okhttp3.Call getCmIncomeHistoryValidateBeforeCall( String symbol, - String incomeType, + IncomeType incomeType, Long startTime, Long endTime, Long page, @@ -2251,7 +2251,7 @@ private okhttp3.Call getCmIncomeHistoryValidateBeforeCall( .getMethod( "getCmIncomeHistory", String.class, - String.class, + IncomeType.class, Long.class, Long.class, Long.class, @@ -2276,22 +2276,19 @@ private okhttp3.Call getCmIncomeHistoryValidateBeforeCall( } /** - * Get CM Income History(USER_DATA) Get CM Income History * If `incomeType` is not - * sent, all kinds of flow will be returned * \"trandId\" is unique in the same - * \"incomeType\" for a user * The interval between `startTime` and - * `endTime` can not exceed 200 days: * If `startTime` and - * `endTime` are not sent, the last 200 days will be returned Weight: 30 + * Get CM Income History (USER_DATA) Get CM Income History. Weight(IP): 30 Security Type: + * USER_DATA Notes: - If `incomeType` is not sent, all kinds of flow will be returned + * - \"trandId\" is unique in the same \"incomeType\" for a user - The + * interval between `startTime` and `endTime` can not exceed 200 days: - If + * `startTime` and `endTime` are not sent, the last 200 days will be + * returned * * @param symbol (optional) - * @param incomeType TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, - * INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, - * CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, - * AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, - * POSITION_LIMIT_INCREASE_FEE (optional) + * @param incomeType (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) * @param page (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<GetCmIncomeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2304,16 +2301,16 @@ private okhttp3.Call getCmIncomeHistoryValidateBeforeCall( * * * @see Get - * CM Income History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-income-history">Get + * CM Income History (USER_DATA) Documentation */ public ApiResponse getCmIncomeHistory( String symbol, - String incomeType, + IncomeType incomeType, Long startTime, Long endTime, Long page, - Long limit, + @Max(1000L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -2327,8 +2324,8 @@ public ApiResponse getCmIncomeHistory( /** * Build call for getDownloadIdForUmFuturesOrderHistory * - * @param startTime (required) - * @param endTime (required) + * @param startTime Timestamp in ms (required) + * @param endTime Timestamp in ms (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2340,7 +2337,7 @@ public ApiResponse getCmIncomeHistory( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-um-futures-order-history">Get * Download Id For UM Futures Order History (USER_DATA) Documentation */ private okhttp3.Call getDownloadIdForUmFuturesOrderHistoryCall( @@ -2450,12 +2447,12 @@ private okhttp3.Call getDownloadIdForUmFuturesOrderHistoryValidateBeforeCall( /** * Get Download Id For UM Futures Order History (USER_DATA) Get download id for UM futures order - * history * Request Limitation is 10 times per month, shared by front end download page and - * rest api * The time between `startTime` and `endTime` can not be longer - * than 1 year Weight: 1500 + * history Weight(IP): 1500 Security Type: USER_DATA Notes: - Request Limitation is 10 times per + * month, shared by front end download page and rest api - The time between + * `startTime` and `endTime` can not be longer than 1 year * - * @param startTime (required) - * @param endTime (required) + * @param startTime Timestamp in ms (required) + * @param endTime Timestamp in ms (required) * @param recvWindow (optional) * @return ApiResponse<GetDownloadIdForUmFuturesOrderHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2468,7 +2465,7 @@ private okhttp3.Call getDownloadIdForUmFuturesOrderHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-um-futures-order-history">Get * Download Id For UM Futures Order History (USER_DATA) Documentation */ public ApiResponse @@ -2486,8 +2483,8 @@ private okhttp3.Call getDownloadIdForUmFuturesOrderHistoryValidateBeforeCall( /** * Build call for getDownloadIdForUmFuturesTradeHistory * - * @param startTime (required) - * @param endTime (required) + * @param startTime Timestamp in ms (required) + * @param endTime Timestamp in ms (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2499,7 +2496,7 @@ private okhttp3.Call getDownloadIdForUmFuturesOrderHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-um-futures-trade-history">Get * Download Id For UM Futures Trade History (USER_DATA) Documentation */ private okhttp3.Call getDownloadIdForUmFuturesTradeHistoryCall( @@ -2609,12 +2606,12 @@ private okhttp3.Call getDownloadIdForUmFuturesTradeHistoryValidateBeforeCall( /** * Get Download Id For UM Futures Trade History (USER_DATA) Get download id for UM futures trade - * history * Request Limitation is 5 times per month, shared by front end download page and rest - * api * The time between `startTime` and `endTime` can not be longer than 1 - * year Weight: 1500 + * history Weight(IP): 1500 Security Type: USER_DATA Notes: - Request Limitation is 5 times per + * month, shared by front end download page and rest api - The time between + * `startTime` and `endTime` can not be longer than 1 year * - * @param startTime (required) - * @param endTime (required) + * @param startTime Timestamp in ms (required) + * @param endTime Timestamp in ms (required) * @param recvWindow (optional) * @return ApiResponse<GetDownloadIdForUmFuturesTradeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2627,7 +2624,7 @@ private okhttp3.Call getDownloadIdForUmFuturesTradeHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-um-futures-trade-history">Get * Download Id For UM Futures Trade History (USER_DATA) Documentation */ public ApiResponse @@ -2645,8 +2642,8 @@ private okhttp3.Call getDownloadIdForUmFuturesTradeHistoryValidateBeforeCall( /** * Build call for getDownloadIdForUmFuturesTransactionHistory * - * @param startTime (required) - * @param endTime (required) + * @param startTime Timestamp in ms (required) + * @param endTime Timestamp in ms (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2658,7 +2655,7 @@ private okhttp3.Call getDownloadIdForUmFuturesTradeHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-um-futures-transaction-history">Get * Download Id For UM Futures Transaction History (USER_DATA) Documentation */ private okhttp3.Call getDownloadIdForUmFuturesTransactionHistoryCall( @@ -2769,12 +2766,12 @@ private okhttp3.Call getDownloadIdForUmFuturesTransactionHistoryValidateBeforeCa /** * Get Download Id For UM Futures Transaction History (USER_DATA) Get download id for UM futures - * transaction history * Request Limitation is 5 times per month, shared by front end download - * page and rest api * The time between `startTime` and `endTime` can not be - * longer than 1 year Weight: 1500 + * transaction history Weight(IP): 1500 Security Type: USER_DATA Notes: - Request Limitation is + * 5 times per month, shared by front end download page and rest api - The time between + * `startTime` and `endTime` can not be longer than 1 year * - * @param startTime (required) - * @param endTime (required) + * @param startTime Timestamp in ms (required) + * @param endTime Timestamp in ms (required) * @param recvWindow (optional) * @return ApiResponse<GetDownloadIdForUmFuturesTransactionHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2787,7 +2784,7 @@ private okhttp3.Call getDownloadIdForUmFuturesTransactionHistoryValidateBeforeCa * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-um-futures-transaction-history">Get * Download Id For UM Futures Transaction History (USER_DATA) Documentation */ public ApiResponse @@ -2808,11 +2805,11 @@ private okhttp3.Call getDownloadIdForUmFuturesTransactionHistoryValidateBeforeCa * @param asset (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param archived Default: `false`. Set to `true` for archived data from 6 - * months ago (optional) - * @param recvWindow (optional) + * @param current Current page number. (optional) + * @param size Number of results returned. (optional) + * @param archived Set to true to query archived data from 6 months ago. (optional, default to + * false) + * @param recvWindow The value cannot be greater than `60000` (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2823,8 +2820,8 @@ private okhttp3.Call getDownloadIdForUmFuturesTransactionHistoryValidateBeforeCa * * * @see Get - * Margin Borrow/Loan Interest History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-margin-borrow-loan-interest-history">Get + * Margin Borrow/Loan Interest History (USER_DATA) Documentation */ private okhttp3.Call getMarginBorrowLoanInterestHistoryCall( String asset, @@ -2832,7 +2829,7 @@ private okhttp3.Call getMarginBorrowLoanInterestHistoryCall( Long endTime, Long current, Long size, - String archived, + Archived archived, Long recvWindow) throws ApiException { String basePath = null; @@ -2924,7 +2921,7 @@ private okhttp3.Call getMarginBorrowLoanInterestHistoryValidateBeforeCall( Long endTime, Long current, Long size, - String archived, + Archived archived, Long recvWindow) throws ApiException { try { @@ -2948,7 +2945,7 @@ private okhttp3.Call getMarginBorrowLoanInterestHistoryValidateBeforeCall( Long.class, Long.class, Long.class, - String.class, + Archived.class, Long.class); Set> violations = executableValidator.validateParameters(this, method, parameterValues); @@ -2969,28 +2966,28 @@ private okhttp3.Call getMarginBorrowLoanInterestHistoryValidateBeforeCall( } /** - * Get Margin Borrow/Loan Interest History(USER_DATA) Get Margin Borrow/Loan Interest History * - * Response in descending order * The max interval between startTime and endTime is 30 days. It - * is a MUST to ensure data correctness. * If `startTime` and `endTime` not - * sent, return records of the last 7 days by default * If `startTime` is sent and - * `endTime` is not sent, the records from `startTime` to the present will - * be returned; if `startTime` is more than 30 days ago, the records of the past 30 - * days will be returned. * If `startTime` is not sent and `endTime` is - * sent, the records of the 7 days before `endTime` is returned. * Type in response - * has 5 enums: * `PERIODIC` interest charged per hour * `ON_BORROW` first - * interest charged on borrow * `PERIODIC_CONVERTED` interest charged per hour - * converted into BNB * `ON_BORROW_CONVERTED` first interest charged on borrow - * converted into BNB * `PORTFOLIO` Portfolio Margin negative balance daily interest - * Weight: 1 + * Get Margin Borrow/Loan Interest History (USER_DATA) Get Margin Borrow/Loan Interest History + * Weight(IP): 1 Security Type: USER_DATA Notes: - Response in descending order - The max + * interval between startTime and endTime is 30 days. It is a MUST to ensure data correctness. - + * If `startTime` and `endTime` not sent, return records of the last 7 days + * by default - If `startTime` is sent and `endTime` is not sent, the + * records from `startTime` to the present will be returned; if `startTime` + * is more than 30 days ago, the records of the past 30 days will be returned. - If + * `startTime` is not sent and `endTime` is sent, the records of the 7 days + * before `endTime` is returned. - Type in response has 5 enums: - + * `PERIODIC` interest charged per hour - `ON_BORROW` first interest charged + * on borrow - `PERIODIC_CONVERTED` interest charged per hour converted into BNB - + * `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB - + * `PORTFOLIO` Portfolio Margin negative balance daily interest * * @param asset (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param archived Default: `false`. Set to `true` for archived data from 6 - * months ago (optional) - * @param recvWindow (optional) + * @param current Current page number. (optional) + * @param size Number of results returned. (optional) + * @param archived Set to true to query archived data from 6 months ago. (optional, default to + * false) + * @param recvWindow The value cannot be greater than `60000` (optional) * @return ApiResponse<GetMarginBorrowLoanInterestHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3002,17 +2999,17 @@ private okhttp3.Call getMarginBorrowLoanInterestHistoryValidateBeforeCall( * * * @see Get - * Margin Borrow/Loan Interest History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-margin-borrow-loan-interest-history">Get + * Margin Borrow/Loan Interest History (USER_DATA) Documentation */ public ApiResponse getMarginBorrowLoanInterestHistory( String asset, Long startTime, Long endTime, - Long current, - Long size, - String archived, + @Min(1L) Long current, + @Max(100L) Long size, + Archived archived, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -3037,8 +3034,8 @@ private okhttp3.Call getMarginBorrowLoanInterestHistoryValidateBeforeCall( * * * @see Get - * UM Account Detail(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-account-detail">Get + * UM Account Detail (USER_DATA) Documentation */ private okhttp3.Call getUmAccountDetailCall(Long recvWindow) throws ApiException { String basePath = null; @@ -3130,8 +3127,8 @@ private okhttp3.Call getUmAccountDetailValidateBeforeCall(Long recvWindow) throw } /** - * Get UM Account Detail(USER_DATA) Get current UM account asset and position information. - * Weight: 5 + * Get UM Account Detail (USER_DATA) Get current UM account asset and position information. + * Weight(IP): 5 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetUmAccountDetailResponse> @@ -3145,8 +3142,8 @@ private okhttp3.Call getUmAccountDetailValidateBeforeCall(Long recvWindow) throw * * * @see Get - * UM Account Detail(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-account-detail">Get + * UM Account Detail (USER_DATA) Documentation */ public ApiResponse getUmAccountDetail(Long recvWindow) throws ApiException { @@ -3170,8 +3167,8 @@ public ApiResponse getUmAccountDetail(Long recvWindo * * * @see Get - * UM Account Detail V2(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-account-detail-v2">Get + * UM Account Detail V2 (USER_DATA) Documentation */ private okhttp3.Call getUmAccountDetailV2Call(Long recvWindow) throws ApiException { String basePath = null; @@ -3264,8 +3261,8 @@ private okhttp3.Call getUmAccountDetailV2ValidateBeforeCall(Long recvWindow) } /** - * Get UM Account Detail V2(USER_DATA) Get current UM account asset and position information. - * Weight: 5 + * Get UM Account Detail V2 (USER_DATA) Get current UM account asset and position information. + * Weight(IP): 5 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetUmAccountDetailV2Response> @@ -3279,8 +3276,8 @@ private okhttp3.Call getUmAccountDetailV2ValidateBeforeCall(Long recvWindow) * * * @see Get - * UM Account Detail V2(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-account-detail-v2">Get + * UM Account Detail V2 (USER_DATA) Documentation */ public ApiResponse getUmAccountDetailV2(Long recvWindow) throws ApiException { @@ -3304,8 +3301,8 @@ public ApiResponse getUmAccountDetailV2(Long recvW * * * @see Get - * UM Current Position Mode(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-current-position-mode">Get + * UM Current Position Mode (USER_DATA) Documentation */ private okhttp3.Call getUmCurrentPositionModeCall(Long recvWindow) throws ApiException { String basePath = null; @@ -3398,8 +3395,8 @@ private okhttp3.Call getUmCurrentPositionModeValidateBeforeCall(Long recvWindow) } /** - * Get UM Current Position Mode(USER_DATA) Get user's position mode (Hedge Mode or One-way - * Mode ) on EVERY symbol in UM Weight: 30 + * Get UM Current Position Mode (USER_DATA) Get user's position mode (Hedge Mode or One-way + * Mode ) on EVERY symbol in UM Weight(IP): 30 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetUmCurrentPositionModeResponse> @@ -3413,8 +3410,8 @@ private okhttp3.Call getUmCurrentPositionModeValidateBeforeCall(Long recvWindow) * * * @see Get - * UM Current Position Mode(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-current-position-mode">Get + * UM Current Position Mode (USER_DATA) Documentation */ public ApiResponse getUmCurrentPositionMode(Long recvWindow) throws ApiException { @@ -3439,8 +3436,8 @@ public ApiResponse getUmCurrentPositionMode(Lo * * * @see Get - * UM Futures Order Download Link by Id(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-futures-order-download-link-by-id">Get + * UM Futures Order Download Link by Id (USER_DATA) Documentation */ private okhttp3.Call getUmFuturesOrderDownloadLinkByIdCall(String downloadId, Long recvWindow) throws ApiException { @@ -3541,8 +3538,8 @@ private okhttp3.Call getUmFuturesOrderDownloadLinkByIdValidateBeforeCall( } /** - * Get UM Futures Order Download Link by Id(USER_DATA) Get UM futures order download link by Id - * * Download link expiration: 7 days Weight: 10 + * Get UM Futures Order Download Link by Id (USER_DATA) Get UM futures order download link by Id + * Weight(IP): 10 Security Type: USER_DATA Notes: - Download link expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -3557,8 +3554,8 @@ private okhttp3.Call getUmFuturesOrderDownloadLinkByIdValidateBeforeCall( * * * @see Get - * UM Futures Order Download Link by Id(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-futures-order-download-link-by-id">Get + * UM Futures Order Download Link by Id (USER_DATA) Documentation */ public ApiResponse getUmFuturesOrderDownloadLinkById( @NotNull String downloadId, Long recvWindow) throws ApiException { @@ -3584,8 +3581,8 @@ public ApiResponse getUmFuturesOrderD * * * @see Get - * UM Futures Trade Download Link by Id(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-futures-trade-download-link-by-id">Get + * UM Futures Trade Download Link by Id (USER_DATA) Documentation */ private okhttp3.Call getUmFuturesTradeDownloadLinkByIdCall(String downloadId, Long recvWindow) throws ApiException { @@ -3686,8 +3683,8 @@ private okhttp3.Call getUmFuturesTradeDownloadLinkByIdValidateBeforeCall( } /** - * Get UM Futures Trade Download Link by Id(USER_DATA) Get UM futures trade download link by Id - * * Download link expiration: 7 days Weight: 10 + * Get UM Futures Trade Download Link by Id (USER_DATA) Get UM futures trade download link by Id + * Weight(IP): 10 Security Type: USER_DATA Notes: - Download link expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -3702,8 +3699,8 @@ private okhttp3.Call getUmFuturesTradeDownloadLinkByIdValidateBeforeCall( * * * @see Get - * UM Futures Trade Download Link by Id(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-futures-trade-download-link-by-id">Get + * UM Futures Trade Download Link by Id (USER_DATA) Documentation */ public ApiResponse getUmFuturesTradeDownloadLinkById( @NotNull String downloadId, Long recvWindow) throws ApiException { @@ -3729,8 +3726,8 @@ public ApiResponse getUmFuturesTradeD * * * @see Get - * UM Futures Transaction Download Link by Id(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-futures-transaction-download-link-by-id">Get + * UM Futures Transaction Download Link by Id (USER_DATA) Documentation */ private okhttp3.Call getUmFuturesTransactionDownloadLinkByIdCall( String downloadId, Long recvWindow) throws ApiException { @@ -3833,8 +3830,9 @@ private okhttp3.Call getUmFuturesTransactionDownloadLinkByIdValidateBeforeCall( } /** - * Get UM Futures Transaction Download Link by Id(USER_DATA) Get UM futures Transaction download - * link by Id * Download link expiration: 7 days Weight: 10 + * Get UM Futures Transaction Download Link by Id (USER_DATA) Get UM futures Transaction + * download link by Id Weight(IP): 10 Security Type: USER_DATA Notes: - Download link + * expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -3849,8 +3847,8 @@ private okhttp3.Call getUmFuturesTransactionDownloadLinkByIdValidateBeforeCall( * * * @see Get - * UM Futures Transaction Download Link by Id(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-futures-transaction-download-link-by-id">Get + * UM Futures Transaction Download Link by Id (USER_DATA) Documentation */ public ApiResponse getUmFuturesTransactionDownloadLinkById(@NotNull String downloadId, Long recvWindow) @@ -3866,15 +3864,11 @@ private okhttp3.Call getUmFuturesTransactionDownloadLinkByIdValidateBeforeCall( * Build call for getUmIncomeHistory * * @param symbol (optional) - * @param incomeType TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, - * INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, - * CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, - * AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, - * POSITION_LIMIT_INCREASE_FEE (optional) + * @param incomeType Income type. (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param page (optional) - * @param limit Default 100; max 1000 (optional) + * @param page Page number. (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3886,12 +3880,12 @@ private okhttp3.Call getUmFuturesTransactionDownloadLinkByIdValidateBeforeCall( * * * @see Get - * UM Income History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-income-history">Get + * UM Income History (USER_DATA) Documentation */ private okhttp3.Call getUmIncomeHistoryCall( String symbol, - String incomeType, + IncomeType incomeType, Long startTime, Long endTime, Long page, @@ -3983,7 +3977,7 @@ private okhttp3.Call getUmIncomeHistoryCall( @SuppressWarnings("rawtypes") private okhttp3.Call getUmIncomeHistoryValidateBeforeCall( String symbol, - String incomeType, + IncomeType incomeType, Long startTime, Long endTime, Long page, @@ -4007,7 +4001,7 @@ private okhttp3.Call getUmIncomeHistoryValidateBeforeCall( .getMethod( "getUmIncomeHistory", String.class, - String.class, + IncomeType.class, Long.class, Long.class, Long.class, @@ -4032,22 +4026,18 @@ private okhttp3.Call getUmIncomeHistoryValidateBeforeCall( } /** - * Get UM Income History(USER_DATA) Get UM Income History * If neither `startTime` nor - * `endTime` is sent, the recent 7-day data will be returned. * If - * `incomeType` is not sent, all kinds of flow will be returned * - * \"trandId\" is unique in the same incomeType for a user * Income history only - * contains data for the last three months Weight: 30 + * Get UM Income History (USER_DATA) Get UM Income History. Weight(IP): 30 Security Type: + * USER_DATA Notes: - If neither `startTime` nor `endTime` is sent, the + * recent 7-day data will be returned. - If `incomeType` is not sent, all kinds of + * flow will be returned - \"trandId\" is unique in the same incomeType for a user - + * Income history only contains data for the last three months * * @param symbol (optional) - * @param incomeType TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, - * INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, - * CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, - * AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, - * POSITION_LIMIT_INCREASE_FEE (optional) + * @param incomeType Income type. (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param page (optional) - * @param limit Default 100; max 1000 (optional) + * @param page Page number. (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<GetUmIncomeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -4060,16 +4050,16 @@ private okhttp3.Call getUmIncomeHistoryValidateBeforeCall( * * * @see Get - * UM Income History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-income-history">Get + * UM Income History (USER_DATA) Documentation */ public ApiResponse getUmIncomeHistory( String symbol, - String incomeType, + IncomeType incomeType, Long startTime, Long endTime, Long page, - Long limit, + @Max(1000L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -4083,7 +4073,7 @@ public ApiResponse getUmIncomeHistory( /** * Build call for getUserCommissionRateForCm * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -4095,8 +4085,8 @@ public ApiResponse getUmIncomeHistory( * * * @see Get - * User Commission Rate for CM(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-user-commission-rate-for-cm">Get + * User Commission Rate for CM (USER_DATA) Documentation */ private okhttp3.Call getUserCommissionRateForCmCall(String symbol, Long recvWindow) throws ApiException { @@ -4196,9 +4186,10 @@ private okhttp3.Call getUserCommissionRateForCmValidateBeforeCall( } /** - * Get User Commission Rate for CM(USER_DATA) Get User Commission Rate for CM Weight: 20 + * Get User Commission Rate for CM (USER_DATA) Get User Commission Rate for CM Weight(IP): 20 + * Security Type: USER_DATA * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<GetUserCommissionRateForCmResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -4211,8 +4202,8 @@ private okhttp3.Call getUserCommissionRateForCmValidateBeforeCall( * * * @see Get - * User Commission Rate for CM(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-user-commission-rate-for-cm">Get + * User Commission Rate for CM (USER_DATA) Documentation */ public ApiResponse getUserCommissionRateForCm( @NotNull String symbol, Long recvWindow) throws ApiException { @@ -4226,7 +4217,7 @@ public ApiResponse getUserCommissionRateForC /** * Build call for getUserCommissionRateForUm * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -4238,8 +4229,8 @@ public ApiResponse getUserCommissionRateForC * * * @see Get - * User Commission Rate for UM(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-user-commission-rate-for-um">Get + * User Commission Rate for UM (USER_DATA) Documentation */ private okhttp3.Call getUserCommissionRateForUmCall(String symbol, Long recvWindow) throws ApiException { @@ -4339,9 +4330,10 @@ private okhttp3.Call getUserCommissionRateForUmValidateBeforeCall( } /** - * Get User Commission Rate for UM(USER_DATA) Get User Commission Rate for UM Weight: 20 + * Get User Commission Rate for UM (USER_DATA) Get User Commission Rate for UM Weight(IP): 20 + * Security Type: USER_DATA * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<GetUserCommissionRateForUmResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -4354,8 +4346,8 @@ private okhttp3.Call getUserCommissionRateForUmValidateBeforeCall( * * * @see Get - * User Commission Rate for UM(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-user-commission-rate-for-um">Get + * User Commission Rate for UM (USER_DATA) Documentation */ public ApiResponse getUserCommissionRateForUm( @NotNull String symbol, Long recvWindow) throws ApiException { @@ -4370,7 +4362,7 @@ public ApiResponse getUserCommissionRateForU * Build call for marginMaxBorrow * * @param asset (required) - * @param recvWindow (optional) + * @param recvWindow The value cannot be greater than `60000` (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -4381,8 +4373,8 @@ public ApiResponse getUserCommissionRateForU * * * @see Margin - * Max Borrow(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#margin-max-borrow">Margin + * Max Borrow (USER_DATA) Documentation */ private okhttp3.Call marginMaxBorrowCall(String asset, Long recvWindow) throws ApiException { String basePath = null; @@ -4479,10 +4471,10 @@ private okhttp3.Call marginMaxBorrowValidateBeforeCall(String asset, Long recvWi } /** - * Margin Max Borrow(USER_DATA) Query margin max borrow Weight: 5 + * Margin Max Borrow (USER_DATA) Query margin max borrow Weight(IP): 5 Security Type: USER_DATA * * @param asset (required) - * @param recvWindow (optional) + * @param recvWindow The value cannot be greater than `60000` (optional) * @return ApiResponse<MarginMaxBorrowResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -4494,8 +4486,8 @@ private okhttp3.Call marginMaxBorrowValidateBeforeCall(String asset, Long recvWi * * * @see Margin - * Max Borrow(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#margin-max-borrow">Margin + * Max Borrow (USER_DATA) Documentation */ public ApiResponse marginMaxBorrow( @NotNull String asset, Long recvWindow) throws ApiException { @@ -4520,8 +4512,8 @@ public ApiResponse marginMaxBorrow( * * * @see Portfolio - * Margin UM Trading Quantitative Rules Indicators(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#portfolio-margin-um-trading-quantitative-rules-indicators">Portfolio + * Margin UM Trading Quantitative Rules Indicators (USER_DATA) Documentation */ private okhttp3.Call portfolioMarginUmTradingQuantitativeRulesIndicatorsCall( String symbol, Long recvWindow) throws ApiException { @@ -4624,9 +4616,9 @@ private okhttp3.Call portfolioMarginUmTradingQuantitativeRulesIndicatorsValidate } /** - * Portfolio Margin UM Trading Quantitative Rules Indicators(USER_DATA) Portfolio Margin UM - * Trading Quantitative Rules Indicators Weight: 1 for a single symbol 10 when the symbol - * parameter is omitted + * Portfolio Margin UM Trading Quantitative Rules Indicators (USER_DATA) Portfolio Margin UM + * Trading Quantitative Rules Indicators Weight: - 1 for a single `symbol` - 10 when + * `symbol` is omitted Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -4641,8 +4633,8 @@ private okhttp3.Call portfolioMarginUmTradingQuantitativeRulesIndicatorsValidate * * * @see Portfolio - * Margin UM Trading Quantitative Rules Indicators(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#portfolio-margin-um-trading-quantitative-rules-indicators">Portfolio + * Margin UM Trading Quantitative Rules Indicators (USER_DATA) Documentation */ public ApiResponse portfolioMarginUmTradingQuantitativeRulesIndicators(String symbol, Long recvWindow) @@ -4672,8 +4664,8 @@ private okhttp3.Call portfolioMarginUmTradingQuantitativeRulesIndicatorsValidate * * * @see Query - * CM Position Information(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-cm-position-information">Query + * CM Position Information (USER_DATA) Documentation */ private okhttp3.Call queryCmPositionInformationCall( String marginAsset, String pair, Long recvWindow) throws ApiException { @@ -4782,12 +4774,13 @@ private okhttp3.Call queryCmPositionInformationValidateBeforeCall( } /** - * Query CM Position Information(USER_DATA) Get current CM position information. * If neither - * `marginAsset` nor `pair` is sent, positions of all symbols with - * `TRADING` status will be returned. * for One-way Mode user, the response will only - * show the \"BOTH\" positions * for Hedge Mode user, the response will show - * \"LONG\", and \"SHORT\" positions. * Please use with user data stream - * `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 1 + * Query CM Position Information (USER_DATA) Get current CM position information. Weight(IP): 1 + * Security Type: USER_DATA Notes: - If neither `marginAsset` nor `pair` is + * sent, positions of all symbols with `TRADING` status will be returned. - for + * One-way Mode user, the response will only show the \"BOTH\" positions - for Hedge + * Mode user, the response will show \"LONG\", and \"SHORT\" positions. + * **Note** - Please use with user data stream `ACCOUNT_UPDATE` to meet your + * timeliness and accuracy needs. * * @param marginAsset (optional) * @param pair (optional) @@ -4803,8 +4796,8 @@ private okhttp3.Call queryCmPositionInformationValidateBeforeCall( * * * @see Query - * CM Position Information(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-cm-position-information">Query + * CM Position Information (USER_DATA) Documentation */ public ApiResponse queryCmPositionInformation( String marginAsset, String pair, Long recvWindow) throws ApiException { @@ -4822,11 +4815,11 @@ public ApiResponse queryCmPositionInformatio * @param txId the `tranId` in `POST/papi/v1/marginLoan` (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param archived Default: `false`. Set to `true` for archived data from 6 - * months ago (optional) - * @param recvWindow (optional) + * @param current Current page number. (optional) + * @param size Number of results returned. (optional) + * @param archived Set to true to query archived data from 6 months ago. (optional, default to + * false) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -4837,8 +4830,8 @@ public ApiResponse queryCmPositionInformatio * * * @see Query - * Margin Loan Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-margin-loan-record">Query + * Margin Loan Record (USER_DATA) Documentation */ private okhttp3.Call queryMarginLoanRecordCall( String asset, @@ -4847,7 +4840,7 @@ private okhttp3.Call queryMarginLoanRecordCall( Long endTime, Long current, Long size, - String archived, + Archived archived, Long recvWindow) throws ApiException { String basePath = null; @@ -4944,7 +4937,7 @@ private okhttp3.Call queryMarginLoanRecordValidateBeforeCall( Long endTime, Long current, Long size, - String archived, + Archived archived, Long recvWindow) throws ApiException { try { @@ -4969,7 +4962,7 @@ private okhttp3.Call queryMarginLoanRecordValidateBeforeCall( Long.class, Long.class, Long.class, - String.class, + Archived.class, Long.class); Set> violations = executableValidator.validateParameters(this, method, parameterValues); @@ -4990,21 +4983,22 @@ private okhttp3.Call queryMarginLoanRecordValidateBeforeCall( } /** - * Query Margin Loan Record(USER_DATA) Query margin loan record * txId or startTime must be - * sent. txId takes precedence. * Response in descending order * The max interval between - * `startTime` and `endTime` is 30 days. * If `startTime` and - * `endTime` not sent, return records of the last 7 days by default * Set - * `archived` to `true` to query data from 6 months ago Weight: 10 + * Query Margin Loan Record (USER_DATA) Query margin loan record Weight(IP): 10 Security Type: + * USER_DATA Notes: - txId or startTime must be sent. txId takes precedence. - Response in + * descending order - The max interval between `startTime` and `endTime` is + * 30 days. - If `startTime` and `endTime` not sent, return records of the + * last 7 days by default - Set `archived` to `true` to query data from 6 + * months ago * * @param asset (required) * @param txId the `tranId` in `POST/papi/v1/marginLoan` (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param archived Default: `false`. Set to `true` for archived data from 6 - * months ago (optional) - * @param recvWindow (optional) + * @param current Current page number. (optional) + * @param size Number of results returned. (optional) + * @param archived Set to true to query archived data from 6 months ago. (optional, default to + * false) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return ApiResponse<QueryMarginLoanRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -5016,17 +5010,17 @@ private okhttp3.Call queryMarginLoanRecordValidateBeforeCall( * * * @see Query - * Margin Loan Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-margin-loan-record">Query + * Margin Loan Record (USER_DATA) Documentation */ public ApiResponse queryMarginLoanRecord( @NotNull String asset, Long txId, Long startTime, Long endTime, - Long current, - Long size, - String archived, + @Min(1L) Long current, + @Max(100L) Long size, + Archived archived, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -5052,8 +5046,8 @@ public ApiResponse queryMarginLoanRecord( * * * @see Query - * Margin Max Withdraw(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-margin-max-withdraw">Query + * Margin Max Withdraw (USER_DATA) Documentation */ private okhttp3.Call queryMarginMaxWithdrawCall(String asset, Long recvWindow) throws ApiException { @@ -5152,7 +5146,8 @@ private okhttp3.Call queryMarginMaxWithdrawValidateBeforeCall(String asset, Long } /** - * Query Margin Max Withdraw(USER_DATA) Query Margin Max Withdraw Weight: 5 + * Query Margin Max Withdraw (USER_DATA) Query Margin Max Withdraw Weight(IP): 5 Security Type: + * USER_DATA * * @param asset (required) * @param recvWindow (optional) @@ -5167,11 +5162,11 @@ private okhttp3.Call queryMarginMaxWithdrawValidateBeforeCall(String asset, Long * * * @see Query - * Margin Max Withdraw(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-margin-max-withdraw">Query + * Margin Max Withdraw (USER_DATA) Documentation */ public ApiResponse queryMarginMaxWithdraw( - @NotNull String asset, Long recvWindow) throws ApiException { + @NotNull String asset, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryMarginMaxWithdrawValidateBeforeCall(asset, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -5182,13 +5177,13 @@ public ApiResponse queryMarginMaxWithdraw( * Build call for queryMarginRepayRecord * * @param asset (required) - * @param txId the `tranId` in `POST/papi/v1/marginLoan` (optional) + * @param txId the `tranId` in `POST /papi/v1/repayLoan` (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param archived Default: `false`. Set to `true` for archived data from 6 - * months ago (optional) + * @param current Current page number. (optional) + * @param size Number of results returned. (optional) + * @param archived Set to true to query archived data from 6 months ago. (optional, default to + * false) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5200,8 +5195,8 @@ public ApiResponse queryMarginMaxWithdraw( * * * @see Query - * Margin repay Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-margin-repay-record">Query + * Margin repay Record (USER_DATA) Documentation */ private okhttp3.Call queryMarginRepayRecordCall( String asset, @@ -5210,7 +5205,7 @@ private okhttp3.Call queryMarginRepayRecordCall( Long endTime, Long current, Long size, - String archived, + Archived archived, Long recvWindow) throws ApiException { String basePath = null; @@ -5307,7 +5302,7 @@ private okhttp3.Call queryMarginRepayRecordValidateBeforeCall( Long endTime, Long current, Long size, - String archived, + Archived archived, Long recvWindow) throws ApiException { try { @@ -5332,7 +5327,7 @@ private okhttp3.Call queryMarginRepayRecordValidateBeforeCall( Long.class, Long.class, Long.class, - String.class, + Archived.class, Long.class); Set> violations = executableValidator.validateParameters(this, method, parameterValues); @@ -5353,20 +5348,21 @@ private okhttp3.Call queryMarginRepayRecordValidateBeforeCall( } /** - * Query Margin repay Record(USER_DATA) Query margin repay record. * txId or startTime must be - * sent. txId takes precedence. * Response in descending order * The max interval between - * `startTime` and `endTime` is 30 days. * If `startTime` and - * `endTime` not sent, return records of the last 7 days by default * Set - * `archived` to `true` to query data from 6 months ago Weight: 10 + * Query Margin repay Record (USER_DATA) Query margin repay record. Weight(IP): 10 Security + * Type: USER_DATA Notes: - txId or startTime must be sent. txId takes precedence. - Response in + * descending order - The max interval between `startTime` and `endTime` is + * 30 days. - If `startTime` and `endTime` not sent, return records of the + * last 7 days by default - Set `archived` to `true` to query data from 6 + * months ago * * @param asset (required) - * @param txId the `tranId` in `POST/papi/v1/marginLoan` (optional) + * @param txId the `tranId` in `POST /papi/v1/repayLoan` (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param archived Default: `false`. Set to `true` for archived data from 6 - * months ago (optional) + * @param current Current page number. (optional) + * @param size Number of results returned. (optional) + * @param archived Set to true to query archived data from 6 months ago. (optional, default to + * false) * @param recvWindow (optional) * @return ApiResponse<QueryMarginRepayRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -5379,18 +5375,18 @@ private okhttp3.Call queryMarginRepayRecordValidateBeforeCall( * * * @see Query - * Margin repay Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-margin-repay-record">Query + * Margin repay Record (USER_DATA) Documentation */ public ApiResponse queryMarginRepayRecord( @NotNull String asset, Long txId, Long startTime, Long endTime, - Long current, - Long size, - String archived, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + Archived archived, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryMarginRepayRecordValidateBeforeCall( @@ -5406,7 +5402,7 @@ public ApiResponse queryMarginRepayRecord( * @param asset (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param size Default:10 Max:100 (optional) + * @param size Number of results returned. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5418,8 +5414,8 @@ public ApiResponse queryMarginRepayRecord( * * * @see Query - * Portfolio Margin Negative Balance Interest History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-portfolio-margin-negative-balance-interest-history">Query + * Portfolio Margin Negative Balance Interest History (USER_DATA) Documentation */ private okhttp3.Call queryPortfolioMarginNegativeBalanceInterestHistoryCall( String asset, Long startTime, Long endTime, Long size, Long recvWindow) @@ -5540,20 +5536,20 @@ private okhttp3.Call queryPortfolioMarginNegativeBalanceInterestHistoryValidateB } /** - * Query Portfolio Margin Negative Balance Interest History(USER_DATA) Query interest history of - * negative balance for portfolio margin. * Response in descending order * The max interval - * between startTime and endTime is 30 days. It is a MUST to ensure data correctness. * If - * `startTime` and `endTime` not sent, return records of the last 7 days by - * default * If `startTime` is sent and `endTime` is not sent, the records - * from `startTime` to the present will be returned; if `startTime` is more - * than 30 days ago, the records of the past 30 days will be returned. * If - * `startTime` is not sent and `endTime` is sent, the records of the 7 days - * before `endTime` is returned. Weight: 50 + * Query Portfolio Margin Negative Balance Interest History (USER_DATA) Query interest history + * of negative balance for portfolio margin. Weight(IP): 50 Security Type: USER_DATA Notes: - + * Results are returned in descending order. - The query range cannot exceed 30 days to ensure + * data correctness. - If both `startTime` and `endTime` are omitted, the + * most recent 7 days are returned by default. - If `startTime` is provided but + * `endTime` is omitted, records from `startTime` to now are returned; if + * that exceeds 30 days, only the most recent 30 days are returned. - If `endTime` is + * provided but `startTime` is omitted, records from the 7 days before + * `endTime` are returned. * * @param asset (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param size Default:10 Max:100 (optional) + * @param size Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryPortfolioMarginNegativeBalanceInterestHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -5566,12 +5562,16 @@ private okhttp3.Call queryPortfolioMarginNegativeBalanceInterestHistoryValidateB * * * @see Query - * Portfolio Margin Negative Balance Interest History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-portfolio-margin-negative-balance-interest-history">Query + * Portfolio Margin Negative Balance Interest History (USER_DATA) Documentation */ public ApiResponse queryPortfolioMarginNegativeBalanceInterestHistory( - String asset, Long startTime, Long endTime, Long size, Long recvWindow) + String asset, + Long startTime, + Long endTime, + @Max(100L) Long size, + Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryPortfolioMarginNegativeBalanceInterestHistoryValidateBeforeCall( @@ -5597,8 +5597,8 @@ private okhttp3.Call queryPortfolioMarginNegativeBalanceInterestHistoryValidateB * * * @see Query - * UM Position Information(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-um-position-information">Query + * UM Position Information (USER_DATA) Documentation */ private okhttp3.Call queryUmPositionInformationCall(String symbol, Long recvWindow) throws ApiException { @@ -5698,11 +5698,11 @@ private okhttp3.Call queryUmPositionInformationValidateBeforeCall( } /** - * Query UM Position Information(USER_DATA) Get current UM position information. * Please use - * with user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. - * * for One-way Mode user, the response will only show the \"BOTH\" positions * for - * Hedge Mode user, the response will show \"LONG\", and \"SHORT\" - * positions. Weight: 5 + * Query UM Position Information (USER_DATA) Get current UM position information. Weight(IP): 5 + * Security Type: USER_DATA Notes: - Please use with account push event + * `ACCOUNT_UPDATE` for timeliness and accuracy. - In One-way Mode, only positions + * with side `BOTH` are shown. - In Hedge Mode, positions with sides `BOTH`, + * `LONG`, and `SHORT` are shown. * * @param symbol (optional) * @param recvWindow (optional) @@ -5717,8 +5717,8 @@ private okhttp3.Call queryUmPositionInformationValidateBeforeCall( * * * @see Query - * UM Position Information(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-um-position-information">Query + * UM Position Information (USER_DATA) Documentation */ public ApiResponse queryUmPositionInformation( String symbol, Long recvWindow) throws ApiException { @@ -5745,7 +5745,7 @@ public ApiResponse queryUmPositionInformatio * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-user-negative-balance-auto-exchange-record">Query * User Negative Balance Auto Exchange Record (USER_DATA) Documentation */ private okhttp3.Call queryUserNegativeBalanceAutoExchangeRecordCall( @@ -5856,8 +5856,8 @@ private okhttp3.Call queryUserNegativeBalanceAutoExchangeRecordValidateBeforeCal /** * Query User Negative Balance Auto Exchange Record (USER_DATA) Query user negative balance auto - * exchange record * Response in descending order * The max interval between - * `startTime` and `endTime` is 3 months. Weight: 100 + * exchange record Weight(IP): 100 Security Type: USER_DATA Notes: - Response in descending + * order - The max interval between `startTime` and `endTime` is 3 months. * * @param startTime (required) * @param endTime (required) @@ -5873,12 +5873,12 @@ private okhttp3.Call queryUserNegativeBalanceAutoExchangeRecordValidateBeforeCal * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-user-negative-balance-auto-exchange-record">Query * User Negative Balance Auto Exchange Record (USER_DATA) Documentation */ public ApiResponse queryUserNegativeBalanceAutoExchangeRecord( - @NotNull Long startTime, @NotNull Long endTime, Long recvWindow) + @NotNull Long startTime, @NotNull Long endTime, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryUserNegativeBalanceAutoExchangeRecordValidateBeforeCall( @@ -5902,7 +5902,7 @@ private okhttp3.Call queryUserNegativeBalanceAutoExchangeRecordValidateBeforeCal * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-user-rate-limit">Query * User Rate Limit (USER_DATA) Documentation */ private okhttp3.Call queryUserRateLimitCall(Long recvWindow) throws ApiException { @@ -5995,7 +5995,8 @@ private okhttp3.Call queryUserRateLimitValidateBeforeCall(Long recvWindow) throw } /** - * Query User Rate Limit (USER_DATA) Query User Rate Limit Weight: 1 + * Query User Rate Limit (USER_DATA) Query User Rate Limit Weight(IP): 1 Security Type: + * USER_DATA * * @param recvWindow (optional) * @return ApiResponse<QueryUserRateLimitResponse> @@ -6009,7 +6010,7 @@ private okhttp3.Call queryUserRateLimitValidateBeforeCall(Long recvWindow) throw * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-user-rate-limit">Query * User Rate Limit (USER_DATA) Documentation */ public ApiResponse queryUserRateLimit(Long recvWindow) @@ -6023,7 +6024,7 @@ public ApiResponse queryUserRateLimit(Long recvWindo /** * Build call for repayFuturesNegativeBalance * - * @param repayFuturesNegativeBalanceRequest (required) + * @param repayFuturesNegativeBalanceRequest (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -6034,8 +6035,8 @@ public ApiResponse queryUserRateLimit(Long recvWindo * * * @see Repay - * futures Negative Balance(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#repay-futures-negative-balance">Repay + * futures Negative Balance (USER_DATA) Documentation */ private okhttp3.Call repayFuturesNegativeBalanceCall( RepayFuturesNegativeBalanceRequest repayFuturesNegativeBalanceRequest) @@ -6136,9 +6137,10 @@ private okhttp3.Call repayFuturesNegativeBalanceValidateBeforeCall( } /** - * Repay futures Negative Balance(USER_DATA) Repay futures Negative Balance Weight: 750 + * Repay futures Negative Balance (USER_DATA) Repay futures Negative Balance Weight(IP): 750 + * Security Type: USER_DATA * - * @param repayFuturesNegativeBalanceRequest (required) + * @param repayFuturesNegativeBalanceRequest (optional) * @return ApiResponse<RepayFuturesNegativeBalanceResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -6150,11 +6152,11 @@ private okhttp3.Call repayFuturesNegativeBalanceValidateBeforeCall( * * * @see Repay - * futures Negative Balance(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#repay-futures-negative-balance">Repay + * futures Negative Balance (USER_DATA) Documentation */ public ApiResponse repayFuturesNegativeBalance( - @Valid @NotNull RepayFuturesNegativeBalanceRequest repayFuturesNegativeBalanceRequest) + @Valid RepayFuturesNegativeBalanceRequest repayFuturesNegativeBalanceRequest) throws ApiException { okhttp3.Call localVarCall = repayFuturesNegativeBalanceValidateBeforeCall(repayFuturesNegativeBalanceRequest); @@ -6177,8 +6179,8 @@ public ApiResponse repayFuturesNegativeBala * * * @see UM - * Futures Account Configuration(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#um-futures-account-configuration">UM + * Futures Account Configuration (USER_DATA) Documentation */ private okhttp3.Call umFuturesAccountConfigurationCall(Long recvWindow) throws ApiException { String basePath = null; @@ -6271,7 +6273,8 @@ private okhttp3.Call umFuturesAccountConfigurationValidateBeforeCall(Long recvWi } /** - * UM Futures Account Configuration(USER_DATA) Query UM Futures account configuration Weight: 5 + * UM Futures Account Configuration (USER_DATA) Query UM Futures account configuration + * Weight(IP): 5 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<UmFuturesAccountConfigurationResponse> @@ -6285,8 +6288,8 @@ private okhttp3.Call umFuturesAccountConfigurationValidateBeforeCall(Long recvWi * * * @see UM - * Futures Account Configuration(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#um-futures-account-configuration">UM + * Futures Account Configuration (USER_DATA) Documentation */ public ApiResponse umFuturesAccountConfiguration( Long recvWindow) throws ApiException { @@ -6299,7 +6302,7 @@ public ApiResponse umFuturesAccountConfig /** * Build call for umFuturesSymbolConfiguration * - * @param symbol (optional) + * @param symbol Symbol (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6311,8 +6314,8 @@ public ApiResponse umFuturesAccountConfig * * * @see UM - * Futures Symbol Configuration(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#um-futures-symbol-configuration">UM + * Futures Symbol Configuration (USER_DATA) Documentation */ private okhttp3.Call umFuturesSymbolConfigurationCall(String symbol, Long recvWindow) throws ApiException { @@ -6412,10 +6415,10 @@ private okhttp3.Call umFuturesSymbolConfigurationValidateBeforeCall( } /** - * UM Futures Symbol Configuration(USER_DATA) Get current UM account symbol configuration. - * Weight: 5 + * UM Futures Symbol Configuration (USER_DATA) Get current UM account symbol configuration. + * Weight(IP): 5 Security Type: USER_DATA * - * @param symbol (optional) + * @param symbol Symbol (optional) * @param recvWindow (optional) * @return ApiResponse<UmFuturesSymbolConfigurationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -6428,8 +6431,8 @@ private okhttp3.Call umFuturesSymbolConfigurationValidateBeforeCall( * * * @see UM - * Futures Symbol Configuration(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#um-futures-symbol-configuration">UM + * Futures Symbol Configuration (USER_DATA) Documentation */ public ApiResponse umFuturesSymbolConfiguration( String symbol, Long recvWindow) throws ApiException { @@ -6455,7 +6458,7 @@ public ApiResponse umFuturesSymbolConfigur * * * @see UM + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#um-notional-and-leverage-brackets">UM * Notional and Leverage Brackets (USER_DATA) Documentation */ private okhttp3.Call umNotionalAndLeverageBracketsCall(String symbol, Long recvWindow) @@ -6556,8 +6559,8 @@ private okhttp3.Call umNotionalAndLeverageBracketsValidateBeforeCall( } /** - * UM Notional and Leverage Brackets (USER_DATA) Query UM notional and leverage brackets Weight: - * 1 + * UM Notional and Leverage Brackets (USER_DATA) Query UM notional and leverage brackets + * Weight(IP): 1 Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -6572,7 +6575,7 @@ private okhttp3.Call umNotionalAndLeverageBracketsValidateBeforeCall( * * * @see UM + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#um-notional-and-leverage-brackets">UM * Notional and Leverage Brackets (USER_DATA) Documentation */ public ApiResponse umNotionalAndLeverageBrackets( diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/DerivativesTradingPortfolioMarginRestApi.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/DerivativesTradingPortfolioMarginRestApi.java index 31f4ab679..5c0831611 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/DerivativesTradingPortfolioMarginRestApi.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/DerivativesTradingPortfolioMarginRestApi.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.AccountBalanceResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.AccountInformationResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Archived; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.AutoCloseType; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.BnbTransferRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.BnbTransferResponse; @@ -60,6 +61,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUmIncomeHistoryResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUserCommissionRateForCmResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUserCommissionRateForUmResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.IncomeType; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.MarginAccountBorrowRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.MarginAccountBorrowResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.MarginAccountNewOcoRequest; @@ -155,7 +157,7 @@ public DerivativesTradingPortfolioMarginRestApi(ApiClient apiClient) { } /** - * Account Balance(USER_DATA) Query account balance Weight: 20 + * Account Balance (USER_DATA) Query account balance Weight(IP): 20 Security Type: USER_DATA * * @param asset (optional) * @param recvWindow (optional) @@ -170,8 +172,8 @@ public DerivativesTradingPortfolioMarginRestApi(ApiClient apiClient) { * * * @see Account - * Balance(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#account-balance">Account + * Balance (USER_DATA) Documentation */ public ApiResponse accountBalance(String asset, Long recvWindow) throws ApiException { @@ -179,7 +181,8 @@ public ApiResponse accountBalance(String asset, Long rec } /** - * Account Information(USER_DATA) Query account information Weight: 20 + * Account Information (USER_DATA) Query account information Weight(IP): 20 Security Type: + * USER_DATA * * @param recvWindow (optional) * @return ApiResponse<AccountInformationResponse> @@ -193,8 +196,8 @@ public ApiResponse accountBalance(String asset, Long rec * * * @see Account - * Information(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#account-information">Account + * Information (USER_DATA) Documentation */ public ApiResponse accountInformation(Long recvWindow) throws ApiException { @@ -202,8 +205,8 @@ public ApiResponse accountInformation(Long recvWindo } /** - * BNB transfer (TRADE) Transfer BNB in and out of UM * The endpoint can only be called 10 times - * per 10 minutes in a rolling manner Weight: 750 + * BNB transfer (TRADE) Transfer BNB in and out of UM Weight(IP): 750 Security Type: TRADE + * Notes: - The endpoint can only be called 10 times per 10 minutes in a rolling manner * * @param bnbTransferRequest (required) * @return ApiResponse<BnbTransferResponse> @@ -217,7 +220,7 @@ public ApiResponse accountInformation(Long recvWindo * * * @see BNB + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#bnb-transfer">BNB * transfer (TRADE) Documentation */ public ApiResponse bnbTransfer(BnbTransferRequest bnbTransferRequest) @@ -226,7 +229,8 @@ public ApiResponse bnbTransfer(BnbTransferRequest bnbTransf } /** - * Change Auto-repay-futures Status(TRADE) Change Auto-repay-futures Status Weight: 750 + * Change Auto-repay-futures Status (TRADE) Change Auto-repay-futures Status Weight(IP): 750 + * Security Type: TRADE * * @param changeAutoRepayFuturesStatusRequest (required) * @return ApiResponse<ChangeAutoRepayFuturesStatusResponse> @@ -240,8 +244,8 @@ public ApiResponse bnbTransfer(BnbTransferRequest bnbTransf * * * @see Change - * Auto-repay-futures Status(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-auto-repay-futures-status">Change + * Auto-repay-futures Status (TRADE) Documentation */ public ApiResponse changeAutoRepayFuturesStatus( ChangeAutoRepayFuturesStatusRequest changeAutoRepayFuturesStatusRequest) @@ -251,7 +255,7 @@ public ApiResponse changeAutoRepayFuturesS /** * Change CM Initial Leverage (TRADE) Change user's initial leverage of specific symbol in - * CM. Weight: 1 + * CM. Weight(IP): 1 Security Type: TRADE * * @param changeCmInitialLeverageRequest (required) * @return ApiResponse<ChangeCmInitialLeverageResponse> @@ -265,7 +269,7 @@ public ApiResponse changeAutoRepayFuturesS * * * @see Change + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-cm-initial-leverage">Change * CM Initial Leverage (TRADE) Documentation */ public ApiResponse changeCmInitialLeverage( @@ -274,8 +278,8 @@ public ApiResponse changeCmInitialLeverage( } /** - * Change CM Position Mode(TRADE) Change user's position mode (Hedge Mode or One-way Mode ) - * on EVERY symbol in CM Weight: 1 + * Change CM Position Mode (TRADE) Change user's position mode (Hedge Mode or One-way Mode ) + * on EVERY symbol in CM Weight(IP): 1 Security Type: TRADE * * @param changeCmPositionModeRequest (required) * @return ApiResponse<ChangeCmPositionModeResponse> @@ -289,8 +293,8 @@ public ApiResponse changeCmInitialLeverage( * * * @see Change - * CM Position Mode(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-cm-position-mode">Change + * CM Position Mode (TRADE) Documentation */ public ApiResponse changeCmPositionMode( ChangeCmPositionModeRequest changeCmPositionModeRequest) throws ApiException { @@ -298,8 +302,8 @@ public ApiResponse changeCmPositionMode( } /** - * Change UM Initial Leverage(TRADE) Change user's initial leverage of specific symbol in - * UM. Weight: 1 + * Change UM Initial Leverage (TRADE) Change user's initial leverage of specific symbol in + * UM. Weight(IP): 1 Security Type: TRADE * * @param changeUmInitialLeverageRequest (required) * @return ApiResponse<ChangeUmInitialLeverageResponse> @@ -313,8 +317,8 @@ public ApiResponse changeCmPositionMode( * * * @see Change - * UM Initial Leverage(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-um-initial-leverage">Change + * UM Initial Leverage (TRADE) Documentation */ public ApiResponse changeUmInitialLeverage( ChangeUmInitialLeverageRequest changeUmInitialLeverageRequest) throws ApiException { @@ -322,8 +326,8 @@ public ApiResponse changeUmInitialLeverage( } /** - * Change UM Position Mode(TRADE) Change user's position mode (Hedge Mode or One-way Mode ) - * on EVERY symbol in UM Weight: 1 + * Change UM Position Mode (TRADE) Change user's position mode (Hedge Mode or One-way Mode ) + * on EVERY symbol in UM Weight(IP): 1 Security Type: TRADE * * @param changeUmPositionModeRequest (required) * @return ApiResponse<ChangeUmPositionModeResponse> @@ -337,8 +341,8 @@ public ApiResponse changeUmInitialLeverage( * * * @see Change - * UM Position Mode(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#change-um-position-mode">Change + * UM Position Mode (TRADE) Documentation */ public ApiResponse changeUmPositionMode( ChangeUmPositionModeRequest changeUmPositionModeRequest) throws ApiException { @@ -346,8 +350,8 @@ public ApiResponse changeUmPositionMode( } /** - * CM Notional and Leverage Brackets(USER_DATA) Query CM notional and leverage brackets Weight: - * 1 + * CM Notional and Leverage Brackets (USER_DATA) Query CM notional and leverage brackets + * Weight(IP): 1 Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -362,8 +366,8 @@ public ApiResponse changeUmPositionMode( * * * @see CM - * Notional and Leverage Brackets(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#cm-notional-and-leverage-brackets">CM + * Notional and Leverage Brackets (USER_DATA) Documentation */ public ApiResponse cmNotionalAndLeverageBrackets( String symbol, Long recvWindow) throws ApiException { @@ -371,11 +375,11 @@ public ApiResponse cmNotionalAndLeverageB } /** - * Fund Auto-collection(TRADE) Fund collection for Portfolio Margin * The BNB would not be - * collected from UM-PM account to the Portfolio Margin account. * You can only use this - * function 500 times per hour in a rolling manner. Weight: 750 + * Fund Auto-collection (TRADE) Fund collection for Portfolio Margin Weight(IP): 750 Security + * Type: TRADE Notes: - BNB assets will not be auto-collected. - Rolling window endpoint can be + * called at most 500 times per hour. * - * @param fundAutoCollectionRequest (required) + * @param fundAutoCollectionRequest (optional) * @return ApiResponse<FundAutoCollectionResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -387,8 +391,8 @@ public ApiResponse cmNotionalAndLeverageB * * * @see Fund - * Auto-collection(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#fund-auto-collection">Fund + * Auto-collection (TRADE) Documentation */ public ApiResponse fundAutoCollection( FundAutoCollectionRequest fundAutoCollectionRequest) throws ApiException { @@ -396,8 +400,8 @@ public ApiResponse fundAutoCollection( } /** - * Fund Collection by Asset(TRADE) Transfers specific asset from Futures Account to Margin - * account * The BNB transfer is not be supported Weight: 30 + * Fund Collection by Asset (TRADE) Transfers specific asset from Futures Account to Margin + * account Weight(IP): 30 Security Type: TRADE Notes: - The BNB transfer is not be supported * * @param fundCollectionByAssetRequest (required) * @return ApiResponse<FundCollectionByAssetResponse> @@ -411,8 +415,8 @@ public ApiResponse fundAutoCollection( * * * @see Fund - * Collection by Asset(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#fund-collection-by-asset">Fund + * Collection by Asset (TRADE) Documentation */ public ApiResponse fundCollectionByAsset( FundCollectionByAssetRequest fundCollectionByAssetRequest) throws ApiException { @@ -420,7 +424,8 @@ public ApiResponse fundCollectionByAsset( } /** - * Get Auto-repay-futures Status(USER_DATA) Query Auto-repay-futures Status Weight: 30 + * Get Auto-repay-futures Status (USER_DATA) Query Auto-repay-futures Status Weight(IP): 30 + * Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetAutoRepayFuturesStatusResponse> @@ -434,8 +439,8 @@ public ApiResponse fundCollectionByAsset( * * * @see Get - * Auto-repay-futures Status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-auto-repay-futures-status">Get + * Auto-repay-futures Status (USER_DATA) Documentation */ public ApiResponse getAutoRepayFuturesStatus(Long recvWindow) throws ApiException { @@ -443,8 +448,8 @@ public ApiResponse getAutoRepayFuturesStatus( } /** - * Get CM Account Detail(USER_DATA) Get current CM account asset and position information. - * Weight: 5 + * Get CM Account Detail (USER_DATA) Get current CM account asset and position information. + * Weight(IP): 5 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetCmAccountDetailResponse> @@ -458,8 +463,8 @@ public ApiResponse getAutoRepayFuturesStatus( * * * @see Get - * CM Account Detail(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-account-detail">Get + * CM Account Detail (USER_DATA) Documentation */ public ApiResponse getCmAccountDetail(Long recvWindow) throws ApiException { @@ -467,8 +472,8 @@ public ApiResponse getCmAccountDetail(Long recvWindo } /** - * Get CM Current Position Mode(USER_DATA) Get user's position mode (Hedge Mode or One-way - * Mode ) on EVERY symbol in CM Weight: 30 + * Get CM Current Position Mode (USER_DATA) Get user's position mode (Hedge Mode or One-way + * Mode ) on EVERY symbol in CM Weight(IP): 30 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetCmCurrentPositionModeResponse> @@ -482,8 +487,8 @@ public ApiResponse getCmAccountDetail(Long recvWindo * * * @see Get - * CM Current Position Mode(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-current-position-mode">Get + * CM Current Position Mode (USER_DATA) Documentation */ public ApiResponse getCmCurrentPositionMode(Long recvWindow) throws ApiException { @@ -491,22 +496,19 @@ public ApiResponse getCmCurrentPositionMode(Lo } /** - * Get CM Income History(USER_DATA) Get CM Income History * If `incomeType` is not - * sent, all kinds of flow will be returned * \"trandId\" is unique in the same - * \"incomeType\" for a user * The interval between `startTime` and - * `endTime` can not exceed 200 days: * If `startTime` and - * `endTime` are not sent, the last 200 days will be returned Weight: 30 + * Get CM Income History (USER_DATA) Get CM Income History. Weight(IP): 30 Security Type: + * USER_DATA Notes: - If `incomeType` is not sent, all kinds of flow will be returned + * - \"trandId\" is unique in the same \"incomeType\" for a user - The + * interval between `startTime` and `endTime` can not exceed 200 days: - If + * `startTime` and `endTime` are not sent, the last 200 days will be + * returned * * @param symbol (optional) - * @param incomeType TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, - * INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, - * CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, - * AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, - * POSITION_LIMIT_INCREASE_FEE (optional) + * @param incomeType (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) * @param page (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<GetCmIncomeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -519,12 +521,12 @@ public ApiResponse getCmCurrentPositionMode(Lo * * * @see Get - * CM Income History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-income-history">Get + * CM Income History (USER_DATA) Documentation */ public ApiResponse getCmIncomeHistory( String symbol, - String incomeType, + IncomeType incomeType, Long startTime, Long endTime, Long page, @@ -537,12 +539,12 @@ public ApiResponse getCmIncomeHistory( /** * Get Download Id For UM Futures Order History (USER_DATA) Get download id for UM futures order - * history * Request Limitation is 10 times per month, shared by front end download page and - * rest api * The time between `startTime` and `endTime` can not be longer - * than 1 year Weight: 1500 + * history Weight(IP): 1500 Security Type: USER_DATA Notes: - Request Limitation is 10 times per + * month, shared by front end download page and rest api - The time between + * `startTime` and `endTime` can not be longer than 1 year * - * @param startTime (required) - * @param endTime (required) + * @param startTime Timestamp in ms (required) + * @param endTime Timestamp in ms (required) * @param recvWindow (optional) * @return ApiResponse<GetDownloadIdForUmFuturesOrderHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -555,7 +557,7 @@ public ApiResponse getCmIncomeHistory( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-um-futures-order-history">Get * Download Id For UM Futures Order History (USER_DATA) Documentation */ public ApiResponse @@ -566,12 +568,12 @@ public ApiResponse getCmIncomeHistory( /** * Get Download Id For UM Futures Trade History (USER_DATA) Get download id for UM futures trade - * history * Request Limitation is 5 times per month, shared by front end download page and rest - * api * The time between `startTime` and `endTime` can not be longer than 1 - * year Weight: 1500 + * history Weight(IP): 1500 Security Type: USER_DATA Notes: - Request Limitation is 5 times per + * month, shared by front end download page and rest api - The time between + * `startTime` and `endTime` can not be longer than 1 year * - * @param startTime (required) - * @param endTime (required) + * @param startTime Timestamp in ms (required) + * @param endTime Timestamp in ms (required) * @param recvWindow (optional) * @return ApiResponse<GetDownloadIdForUmFuturesTradeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -584,7 +586,7 @@ public ApiResponse getCmIncomeHistory( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-um-futures-trade-history">Get * Download Id For UM Futures Trade History (USER_DATA) Documentation */ public ApiResponse @@ -595,12 +597,12 @@ public ApiResponse getCmIncomeHistory( /** * Get Download Id For UM Futures Transaction History (USER_DATA) Get download id for UM futures - * transaction history * Request Limitation is 5 times per month, shared by front end download - * page and rest api * The time between `startTime` and `endTime` can not be - * longer than 1 year Weight: 1500 + * transaction history Weight(IP): 1500 Security Type: USER_DATA Notes: - Request Limitation is + * 5 times per month, shared by front end download page and rest api - The time between + * `startTime` and `endTime` can not be longer than 1 year * - * @param startTime (required) - * @param endTime (required) + * @param startTime Timestamp in ms (required) + * @param endTime Timestamp in ms (required) * @param recvWindow (optional) * @return ApiResponse<GetDownloadIdForUmFuturesTransactionHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -613,7 +615,7 @@ public ApiResponse getCmIncomeHistory( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-um-futures-transaction-history">Get * Download Id For UM Futures Transaction History (USER_DATA) Documentation */ public ApiResponse @@ -624,28 +626,28 @@ public ApiResponse getCmIncomeHistory( } /** - * Get Margin Borrow/Loan Interest History(USER_DATA) Get Margin Borrow/Loan Interest History * - * Response in descending order * The max interval between startTime and endTime is 30 days. It - * is a MUST to ensure data correctness. * If `startTime` and `endTime` not - * sent, return records of the last 7 days by default * If `startTime` is sent and - * `endTime` is not sent, the records from `startTime` to the present will - * be returned; if `startTime` is more than 30 days ago, the records of the past 30 - * days will be returned. * If `startTime` is not sent and `endTime` is - * sent, the records of the 7 days before `endTime` is returned. * Type in response - * has 5 enums: * `PERIODIC` interest charged per hour * `ON_BORROW` first - * interest charged on borrow * `PERIODIC_CONVERTED` interest charged per hour - * converted into BNB * `ON_BORROW_CONVERTED` first interest charged on borrow - * converted into BNB * `PORTFOLIO` Portfolio Margin negative balance daily interest - * Weight: 1 + * Get Margin Borrow/Loan Interest History (USER_DATA) Get Margin Borrow/Loan Interest History + * Weight(IP): 1 Security Type: USER_DATA Notes: - Response in descending order - The max + * interval between startTime and endTime is 30 days. It is a MUST to ensure data correctness. - + * If `startTime` and `endTime` not sent, return records of the last 7 days + * by default - If `startTime` is sent and `endTime` is not sent, the + * records from `startTime` to the present will be returned; if `startTime` + * is more than 30 days ago, the records of the past 30 days will be returned. - If + * `startTime` is not sent and `endTime` is sent, the records of the 7 days + * before `endTime` is returned. - Type in response has 5 enums: - + * `PERIODIC` interest charged per hour - `ON_BORROW` first interest charged + * on borrow - `PERIODIC_CONVERTED` interest charged per hour converted into BNB - + * `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB - + * `PORTFOLIO` Portfolio Margin negative balance daily interest * * @param asset (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param archived Default: `false`. Set to `true` for archived data from 6 - * months ago (optional) - * @param recvWindow (optional) + * @param current Current page number. (optional) + * @param size Number of results returned. (optional) + * @param archived Set to true to query archived data from 6 months ago. (optional, default to + * false) + * @param recvWindow The value cannot be greater than `60000` (optional) * @return ApiResponse<GetMarginBorrowLoanInterestHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -657,8 +659,8 @@ public ApiResponse getCmIncomeHistory( * * * @see Get - * Margin Borrow/Loan Interest History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-margin-borrow-loan-interest-history">Get + * Margin Borrow/Loan Interest History (USER_DATA) Documentation */ public ApiResponse getMarginBorrowLoanInterestHistory( @@ -667,7 +669,7 @@ public ApiResponse getCmIncomeHistory( Long endTime, Long current, Long size, - String archived, + Archived archived, Long recvWindow) throws ApiException { return accountApi.getMarginBorrowLoanInterestHistory( @@ -675,8 +677,8 @@ public ApiResponse getCmIncomeHistory( } /** - * Get UM Account Detail(USER_DATA) Get current UM account asset and position information. - * Weight: 5 + * Get UM Account Detail (USER_DATA) Get current UM account asset and position information. + * Weight(IP): 5 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetUmAccountDetailResponse> @@ -690,8 +692,8 @@ public ApiResponse getCmIncomeHistory( * * * @see Get - * UM Account Detail(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-account-detail">Get + * UM Account Detail (USER_DATA) Documentation */ public ApiResponse getUmAccountDetail(Long recvWindow) throws ApiException { @@ -699,8 +701,8 @@ public ApiResponse getUmAccountDetail(Long recvWindo } /** - * Get UM Account Detail V2(USER_DATA) Get current UM account asset and position information. - * Weight: 5 + * Get UM Account Detail V2 (USER_DATA) Get current UM account asset and position information. + * Weight(IP): 5 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetUmAccountDetailV2Response> @@ -714,8 +716,8 @@ public ApiResponse getUmAccountDetail(Long recvWindo * * * @see Get - * UM Account Detail V2(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-account-detail-v2">Get + * UM Account Detail V2 (USER_DATA) Documentation */ public ApiResponse getUmAccountDetailV2(Long recvWindow) throws ApiException { @@ -723,8 +725,8 @@ public ApiResponse getUmAccountDetailV2(Long recvW } /** - * Get UM Current Position Mode(USER_DATA) Get user's position mode (Hedge Mode or One-way - * Mode ) on EVERY symbol in UM Weight: 30 + * Get UM Current Position Mode (USER_DATA) Get user's position mode (Hedge Mode or One-way + * Mode ) on EVERY symbol in UM Weight(IP): 30 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetUmCurrentPositionModeResponse> @@ -738,8 +740,8 @@ public ApiResponse getUmAccountDetailV2(Long recvW * * * @see Get - * UM Current Position Mode(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-current-position-mode">Get + * UM Current Position Mode (USER_DATA) Documentation */ public ApiResponse getUmCurrentPositionMode(Long recvWindow) throws ApiException { @@ -747,8 +749,8 @@ public ApiResponse getUmCurrentPositionMode(Lo } /** - * Get UM Futures Order Download Link by Id(USER_DATA) Get UM futures order download link by Id - * * Download link expiration: 7 days Weight: 10 + * Get UM Futures Order Download Link by Id (USER_DATA) Get UM futures order download link by Id + * Weight(IP): 10 Security Type: USER_DATA Notes: - Download link expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -763,8 +765,8 @@ public ApiResponse getUmCurrentPositionMode(Lo * * * @see Get - * UM Futures Order Download Link by Id(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-futures-order-download-link-by-id">Get + * UM Futures Order Download Link by Id (USER_DATA) Documentation */ public ApiResponse getUmFuturesOrderDownloadLinkById( String downloadId, Long recvWindow) throws ApiException { @@ -772,8 +774,8 @@ public ApiResponse getUmFuturesOrderD } /** - * Get UM Futures Trade Download Link by Id(USER_DATA) Get UM futures trade download link by Id - * * Download link expiration: 7 days Weight: 10 + * Get UM Futures Trade Download Link by Id (USER_DATA) Get UM futures trade download link by Id + * Weight(IP): 10 Security Type: USER_DATA Notes: - Download link expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -788,8 +790,8 @@ public ApiResponse getUmFuturesOrderD * * * @see Get - * UM Futures Trade Download Link by Id(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-futures-trade-download-link-by-id">Get + * UM Futures Trade Download Link by Id (USER_DATA) Documentation */ public ApiResponse getUmFuturesTradeDownloadLinkById( String downloadId, Long recvWindow) throws ApiException { @@ -797,8 +799,9 @@ public ApiResponse getUmFuturesTradeD } /** - * Get UM Futures Transaction Download Link by Id(USER_DATA) Get UM futures Transaction download - * link by Id * Download link expiration: 7 days Weight: 10 + * Get UM Futures Transaction Download Link by Id (USER_DATA) Get UM futures Transaction + * download link by Id Weight(IP): 10 Security Type: USER_DATA Notes: - Download link + * expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -813,8 +816,8 @@ public ApiResponse getUmFuturesTradeD * * * @see Get - * UM Futures Transaction Download Link by Id(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-futures-transaction-download-link-by-id">Get + * UM Futures Transaction Download Link by Id (USER_DATA) Documentation */ public ApiResponse getUmFuturesTransactionDownloadLinkById(String downloadId, Long recvWindow) @@ -823,22 +826,18 @@ public ApiResponse getUmFuturesTradeD } /** - * Get UM Income History(USER_DATA) Get UM Income History * If neither `startTime` nor - * `endTime` is sent, the recent 7-day data will be returned. * If - * `incomeType` is not sent, all kinds of flow will be returned * - * \"trandId\" is unique in the same incomeType for a user * Income history only - * contains data for the last three months Weight: 30 + * Get UM Income History (USER_DATA) Get UM Income History. Weight(IP): 30 Security Type: + * USER_DATA Notes: - If neither `startTime` nor `endTime` is sent, the + * recent 7-day data will be returned. - If `incomeType` is not sent, all kinds of + * flow will be returned - \"trandId\" is unique in the same incomeType for a user - + * Income history only contains data for the last three months * * @param symbol (optional) - * @param incomeType TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, - * INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, - * CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, - * AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, - * POSITION_LIMIT_INCREASE_FEE (optional) + * @param incomeType Income type. (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param page (optional) - * @param limit Default 100; max 1000 (optional) + * @param page Page number. (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<GetUmIncomeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -851,12 +850,12 @@ public ApiResponse getUmFuturesTradeD * * * @see Get - * UM Income History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-um-income-history">Get + * UM Income History (USER_DATA) Documentation */ public ApiResponse getUmIncomeHistory( String symbol, - String incomeType, + IncomeType incomeType, Long startTime, Long endTime, Long page, @@ -868,9 +867,10 @@ public ApiResponse getUmIncomeHistory( } /** - * Get User Commission Rate for CM(USER_DATA) Get User Commission Rate for CM Weight: 20 + * Get User Commission Rate for CM (USER_DATA) Get User Commission Rate for CM Weight(IP): 20 + * Security Type: USER_DATA * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<GetUserCommissionRateForCmResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -883,8 +883,8 @@ public ApiResponse getUmIncomeHistory( * * * @see Get - * User Commission Rate for CM(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-user-commission-rate-for-cm">Get + * User Commission Rate for CM (USER_DATA) Documentation */ public ApiResponse getUserCommissionRateForCm( String symbol, Long recvWindow) throws ApiException { @@ -892,9 +892,10 @@ public ApiResponse getUserCommissionRateForC } /** - * Get User Commission Rate for UM(USER_DATA) Get User Commission Rate for UM Weight: 20 + * Get User Commission Rate for UM (USER_DATA) Get User Commission Rate for UM Weight(IP): 20 + * Security Type: USER_DATA * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<GetUserCommissionRateForUmResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -907,8 +908,8 @@ public ApiResponse getUserCommissionRateForC * * * @see Get - * User Commission Rate for UM(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-user-commission-rate-for-um">Get + * User Commission Rate for UM (USER_DATA) Documentation */ public ApiResponse getUserCommissionRateForUm( String symbol, Long recvWindow) throws ApiException { @@ -916,10 +917,10 @@ public ApiResponse getUserCommissionRateForU } /** - * Margin Max Borrow(USER_DATA) Query margin max borrow Weight: 5 + * Margin Max Borrow (USER_DATA) Query margin max borrow Weight(IP): 5 Security Type: USER_DATA * * @param asset (required) - * @param recvWindow (optional) + * @param recvWindow The value cannot be greater than `60000` (optional) * @return ApiResponse<MarginMaxBorrowResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -931,8 +932,8 @@ public ApiResponse getUserCommissionRateForU * * * @see Margin - * Max Borrow(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#margin-max-borrow">Margin + * Max Borrow (USER_DATA) Documentation */ public ApiResponse marginMaxBorrow(String asset, Long recvWindow) throws ApiException { @@ -940,9 +941,9 @@ public ApiResponse marginMaxBorrow(String asset, Long r } /** - * Portfolio Margin UM Trading Quantitative Rules Indicators(USER_DATA) Portfolio Margin UM - * Trading Quantitative Rules Indicators Weight: 1 for a single symbol 10 when the symbol - * parameter is omitted + * Portfolio Margin UM Trading Quantitative Rules Indicators (USER_DATA) Portfolio Margin UM + * Trading Quantitative Rules Indicators Weight: - 1 for a single `symbol` - 10 when + * `symbol` is omitted Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -957,8 +958,8 @@ public ApiResponse marginMaxBorrow(String asset, Long r * * * @see Portfolio - * Margin UM Trading Quantitative Rules Indicators(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#portfolio-margin-um-trading-quantitative-rules-indicators">Portfolio + * Margin UM Trading Quantitative Rules Indicators (USER_DATA) Documentation */ public ApiResponse portfolioMarginUmTradingQuantitativeRulesIndicators(String symbol, Long recvWindow) @@ -967,12 +968,13 @@ public ApiResponse marginMaxBorrow(String asset, Long r } /** - * Query CM Position Information(USER_DATA) Get current CM position information. * If neither - * `marginAsset` nor `pair` is sent, positions of all symbols with - * `TRADING` status will be returned. * for One-way Mode user, the response will only - * show the \"BOTH\" positions * for Hedge Mode user, the response will show - * \"LONG\", and \"SHORT\" positions. * Please use with user data stream - * `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 1 + * Query CM Position Information (USER_DATA) Get current CM position information. Weight(IP): 1 + * Security Type: USER_DATA Notes: - If neither `marginAsset` nor `pair` is + * sent, positions of all symbols with `TRADING` status will be returned. - for + * One-way Mode user, the response will only show the \"BOTH\" positions - for Hedge + * Mode user, the response will show \"LONG\", and \"SHORT\" positions. + * **Note** - Please use with user data stream `ACCOUNT_UPDATE` to meet your + * timeliness and accuracy needs. * * @param marginAsset (optional) * @param pair (optional) @@ -988,8 +990,8 @@ public ApiResponse marginMaxBorrow(String asset, Long r * * * @see Query - * CM Position Information(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-cm-position-information">Query + * CM Position Information (USER_DATA) Documentation */ public ApiResponse queryCmPositionInformation( String marginAsset, String pair, Long recvWindow) throws ApiException { @@ -997,21 +999,22 @@ public ApiResponse queryCmPositionInformatio } /** - * Query Margin Loan Record(USER_DATA) Query margin loan record * txId or startTime must be - * sent. txId takes precedence. * Response in descending order * The max interval between - * `startTime` and `endTime` is 30 days. * If `startTime` and - * `endTime` not sent, return records of the last 7 days by default * Set - * `archived` to `true` to query data from 6 months ago Weight: 10 + * Query Margin Loan Record (USER_DATA) Query margin loan record Weight(IP): 10 Security Type: + * USER_DATA Notes: - txId or startTime must be sent. txId takes precedence. - Response in + * descending order - The max interval between `startTime` and `endTime` is + * 30 days. - If `startTime` and `endTime` not sent, return records of the + * last 7 days by default - Set `archived` to `true` to query data from 6 + * months ago * * @param asset (required) * @param txId the `tranId` in `POST/papi/v1/marginLoan` (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param archived Default: `false`. Set to `true` for archived data from 6 - * months ago (optional) - * @param recvWindow (optional) + * @param current Current page number. (optional) + * @param size Number of results returned. (optional) + * @param archived Set to true to query archived data from 6 months ago. (optional, default to + * false) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return ApiResponse<QueryMarginLoanRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1023,8 +1026,8 @@ public ApiResponse queryCmPositionInformatio * * * @see Query - * Margin Loan Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-margin-loan-record">Query + * Margin Loan Record (USER_DATA) Documentation */ public ApiResponse queryMarginLoanRecord( String asset, @@ -1033,7 +1036,7 @@ public ApiResponse queryMarginLoanRecord( Long endTime, Long current, Long size, - String archived, + Archived archived, Long recvWindow) throws ApiException { return accountApi.queryMarginLoanRecord( @@ -1041,7 +1044,8 @@ public ApiResponse queryMarginLoanRecord( } /** - * Query Margin Max Withdraw(USER_DATA) Query Margin Max Withdraw Weight: 5 + * Query Margin Max Withdraw (USER_DATA) Query Margin Max Withdraw Weight(IP): 5 Security Type: + * USER_DATA * * @param asset (required) * @param recvWindow (optional) @@ -1056,8 +1060,8 @@ public ApiResponse queryMarginLoanRecord( * * * @see Query - * Margin Max Withdraw(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-margin-max-withdraw">Query + * Margin Max Withdraw (USER_DATA) Documentation */ public ApiResponse queryMarginMaxWithdraw( String asset, Long recvWindow) throws ApiException { @@ -1065,20 +1069,21 @@ public ApiResponse queryMarginMaxWithdraw( } /** - * Query Margin repay Record(USER_DATA) Query margin repay record. * txId or startTime must be - * sent. txId takes precedence. * Response in descending order * The max interval between - * `startTime` and `endTime` is 30 days. * If `startTime` and - * `endTime` not sent, return records of the last 7 days by default * Set - * `archived` to `true` to query data from 6 months ago Weight: 10 + * Query Margin repay Record (USER_DATA) Query margin repay record. Weight(IP): 10 Security + * Type: USER_DATA Notes: - txId or startTime must be sent. txId takes precedence. - Response in + * descending order - The max interval between `startTime` and `endTime` is + * 30 days. - If `startTime` and `endTime` not sent, return records of the + * last 7 days by default - Set `archived` to `true` to query data from 6 + * months ago * * @param asset (required) - * @param txId the `tranId` in `POST/papi/v1/marginLoan` (optional) + * @param txId the `tranId` in `POST /papi/v1/repayLoan` (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param archived Default: `false`. Set to `true` for archived data from 6 - * months ago (optional) + * @param current Current page number. (optional) + * @param size Number of results returned. (optional) + * @param archived Set to true to query archived data from 6 months ago. (optional, default to + * false) * @param recvWindow (optional) * @return ApiResponse<QueryMarginRepayRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1091,8 +1096,8 @@ public ApiResponse queryMarginMaxWithdraw( * * * @see Query - * Margin repay Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-margin-repay-record">Query + * Margin repay Record (USER_DATA) Documentation */ public ApiResponse queryMarginRepayRecord( String asset, @@ -1101,7 +1106,7 @@ public ApiResponse queryMarginRepayRecord( Long endTime, Long current, Long size, - String archived, + Archived archived, Long recvWindow) throws ApiException { return accountApi.queryMarginRepayRecord( @@ -1109,20 +1114,20 @@ public ApiResponse queryMarginRepayRecord( } /** - * Query Portfolio Margin Negative Balance Interest History(USER_DATA) Query interest history of - * negative balance for portfolio margin. * Response in descending order * The max interval - * between startTime and endTime is 30 days. It is a MUST to ensure data correctness. * If - * `startTime` and `endTime` not sent, return records of the last 7 days by - * default * If `startTime` is sent and `endTime` is not sent, the records - * from `startTime` to the present will be returned; if `startTime` is more - * than 30 days ago, the records of the past 30 days will be returned. * If - * `startTime` is not sent and `endTime` is sent, the records of the 7 days - * before `endTime` is returned. Weight: 50 + * Query Portfolio Margin Negative Balance Interest History (USER_DATA) Query interest history + * of negative balance for portfolio margin. Weight(IP): 50 Security Type: USER_DATA Notes: - + * Results are returned in descending order. - The query range cannot exceed 30 days to ensure + * data correctness. - If both `startTime` and `endTime` are omitted, the + * most recent 7 days are returned by default. - If `startTime` is provided but + * `endTime` is omitted, records from `startTime` to now are returned; if + * that exceeds 30 days, only the most recent 30 days are returned. - If `endTime` is + * provided but `startTime` is omitted, records from the 7 days before + * `endTime` are returned. * * @param asset (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param size Default:10 Max:100 (optional) + * @param size Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryPortfolioMarginNegativeBalanceInterestHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1135,8 +1140,8 @@ public ApiResponse queryMarginRepayRecord( * * * @see Query - * Portfolio Margin Negative Balance Interest History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-portfolio-margin-negative-balance-interest-history">Query + * Portfolio Margin Negative Balance Interest History (USER_DATA) Documentation */ public ApiResponse queryPortfolioMarginNegativeBalanceInterestHistory( @@ -1147,11 +1152,11 @@ public ApiResponse queryMarginRepayRecord( } /** - * Query UM Position Information(USER_DATA) Get current UM position information. * Please use - * with user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. - * * for One-way Mode user, the response will only show the \"BOTH\" positions * for - * Hedge Mode user, the response will show \"LONG\", and \"SHORT\" - * positions. Weight: 5 + * Query UM Position Information (USER_DATA) Get current UM position information. Weight(IP): 5 + * Security Type: USER_DATA Notes: - Please use with account push event + * `ACCOUNT_UPDATE` for timeliness and accuracy. - In One-way Mode, only positions + * with side `BOTH` are shown. - In Hedge Mode, positions with sides `BOTH`, + * `LONG`, and `SHORT` are shown. * * @param symbol (optional) * @param recvWindow (optional) @@ -1166,8 +1171,8 @@ public ApiResponse queryMarginRepayRecord( * * * @see Query - * UM Position Information(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-um-position-information">Query + * UM Position Information (USER_DATA) Documentation */ public ApiResponse queryUmPositionInformation( String symbol, Long recvWindow) throws ApiException { @@ -1176,8 +1181,8 @@ public ApiResponse queryUmPositionInformatio /** * Query User Negative Balance Auto Exchange Record (USER_DATA) Query user negative balance auto - * exchange record * Response in descending order * The max interval between - * `startTime` and `endTime` is 3 months. Weight: 100 + * exchange record Weight(IP): 100 Security Type: USER_DATA Notes: - Response in descending + * order - The max interval between `startTime` and `endTime` is 3 months. * * @param startTime (required) * @param endTime (required) @@ -1193,7 +1198,7 @@ public ApiResponse queryUmPositionInformatio * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-user-negative-balance-auto-exchange-record">Query * User Negative Balance Auto Exchange Record (USER_DATA) Documentation */ public ApiResponse @@ -1204,7 +1209,8 @@ public ApiResponse queryUmPositionInformatio } /** - * Query User Rate Limit (USER_DATA) Query User Rate Limit Weight: 1 + * Query User Rate Limit (USER_DATA) Query User Rate Limit Weight(IP): 1 Security Type: + * USER_DATA * * @param recvWindow (optional) * @return ApiResponse<QueryUserRateLimitResponse> @@ -1218,7 +1224,7 @@ public ApiResponse queryUmPositionInformatio * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#query-user-rate-limit">Query * User Rate Limit (USER_DATA) Documentation */ public ApiResponse queryUserRateLimit(Long recvWindow) @@ -1227,9 +1233,10 @@ public ApiResponse queryUserRateLimit(Long recvWindo } /** - * Repay futures Negative Balance(USER_DATA) Repay futures Negative Balance Weight: 750 + * Repay futures Negative Balance (USER_DATA) Repay futures Negative Balance Weight(IP): 750 + * Security Type: USER_DATA * - * @param repayFuturesNegativeBalanceRequest (required) + * @param repayFuturesNegativeBalanceRequest (optional) * @return ApiResponse<RepayFuturesNegativeBalanceResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1241,8 +1248,8 @@ public ApiResponse queryUserRateLimit(Long recvWindo * * * @see Repay - * futures Negative Balance(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#repay-futures-negative-balance">Repay + * futures Negative Balance (USER_DATA) Documentation */ public ApiResponse repayFuturesNegativeBalance( RepayFuturesNegativeBalanceRequest repayFuturesNegativeBalanceRequest) @@ -1251,7 +1258,8 @@ public ApiResponse repayFuturesNegativeBala } /** - * UM Futures Account Configuration(USER_DATA) Query UM Futures account configuration Weight: 5 + * UM Futures Account Configuration (USER_DATA) Query UM Futures account configuration + * Weight(IP): 5 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<UmFuturesAccountConfigurationResponse> @@ -1265,8 +1273,8 @@ public ApiResponse repayFuturesNegativeBala * * * @see UM - * Futures Account Configuration(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#um-futures-account-configuration">UM + * Futures Account Configuration (USER_DATA) Documentation */ public ApiResponse umFuturesAccountConfiguration( Long recvWindow) throws ApiException { @@ -1274,10 +1282,10 @@ public ApiResponse umFuturesAccountConfig } /** - * UM Futures Symbol Configuration(USER_DATA) Get current UM account symbol configuration. - * Weight: 5 + * UM Futures Symbol Configuration (USER_DATA) Get current UM account symbol configuration. + * Weight(IP): 5 Security Type: USER_DATA * - * @param symbol (optional) + * @param symbol Symbol (optional) * @param recvWindow (optional) * @return ApiResponse<UmFuturesSymbolConfigurationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1290,8 +1298,8 @@ public ApiResponse umFuturesAccountConfig * * * @see UM - * Futures Symbol Configuration(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#um-futures-symbol-configuration">UM + * Futures Symbol Configuration (USER_DATA) Documentation */ public ApiResponse umFuturesSymbolConfiguration( String symbol, Long recvWindow) throws ApiException { @@ -1299,8 +1307,8 @@ public ApiResponse umFuturesSymbolConfigur } /** - * UM Notional and Leverage Brackets (USER_DATA) Query UM notional and leverage brackets Weight: - * 1 + * UM Notional and Leverage Brackets (USER_DATA) Query UM notional and leverage brackets + * Weight(IP): 1 Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -1315,7 +1323,7 @@ public ApiResponse umFuturesSymbolConfigur * * * @see UM + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#um-notional-and-leverage-brackets">UM * Notional and Leverage Brackets (USER_DATA) Documentation */ public ApiResponse umNotionalAndLeverageBrackets( @@ -1324,7 +1332,7 @@ public ApiResponse umNotionalAndLeverageB } /** - * Test Connectivity Test connectivity to the Rest API. Weight: 1 + * Test Connectivity Test connectivity to the Rest API. Weight(IP): 1 * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1337,7 +1345,7 @@ public ApiResponse umNotionalAndLeverageB * * * @see Test + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/market-data#test-connectivity">Test * Connectivity Documentation */ public void testConnectivity() throws ApiException { @@ -1345,9 +1353,10 @@ public void testConnectivity() throws ApiException { } /** - * Cancel All CM Open Conditional Orders(TRADE) Cancel All CM Open Conditional Orders Weight: 1 + * Cancel All CM Open Conditional Orders (TRADE) Cancel All CM Open Conditional Orders + * Weight(IP): 1 Security Type: TRADE * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<CancelAllCmOpenConditionalOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1360,8 +1369,8 @@ public void testConnectivity() throws ApiException { * * * @see Cancel - * All CM Open Conditional Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-cm-open-conditional-orders">Cancel + * All CM Open Conditional Orders (TRADE) Documentation */ public ApiResponse cancelAllCmOpenConditionalOrders( String symbol, Long recvWindow) throws ApiException { @@ -1369,9 +1378,10 @@ public ApiResponse cancelAllCmOpenCond } /** - * Cancel All CM Open Orders(TRADE) Cancel all active LIMIT orders on specific symbol Weight: 1 + * Cancel All CM Open Orders (TRADE) Cancel all active LIMIT orders on specific symbol + * Weight(IP): 1 Security Type: TRADE * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<CancelAllCmOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1384,8 +1394,8 @@ public ApiResponse cancelAllCmOpenCond * * * @see Cancel - * All CM Open Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-cm-open-orders">Cancel + * All CM Open Orders (TRADE) Documentation */ public ApiResponse cancelAllCmOpenOrders( String symbol, Long recvWindow) throws ApiException { @@ -1393,9 +1403,10 @@ public ApiResponse cancelAllCmOpenOrders( } /** - * Cancel All UM Algo Open Orders (TRADE) Cancel All UM Algo Open Orders Weight: 1 + * Cancel All UM Algo Open Orders (TRADE) Cancel All UM Algo Open Orders Weight(IP): 1 Security + * Type: TRADE * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<CancelAllUmAlgoOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1408,7 +1419,7 @@ public ApiResponse cancelAllCmOpenOrders( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-um-algo-open-orders">Cancel * All UM Algo Open Orders (TRADE) Documentation */ public ApiResponse cancelAllUmAlgoOpenOrders( @@ -1417,9 +1428,10 @@ public ApiResponse cancelAllUmAlgoOpenOrders( } /** - * Cancel All UM Open Conditional Orders Cancel All UM Open Conditional Orders Weight: 1 + * Cancel All UM Open Conditional Orders (TRADE) Cancel All UM Open Conditional Orders + * Weight(IP): 1 Security Type: TRADE * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<CancelAllUmOpenConditionalOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1431,10 +1443,9 @@ public ApiResponse cancelAllUmAlgoOpenOrders( * 200 Cancel All UM Open Conditional Orders - * * - * @deprecated * @see Cancel - * All UM Open Conditional Orders Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-um-open-conditional-orders">Cancel + * All UM Open Conditional Orders (TRADE) Documentation */ public ApiResponse cancelAllUmOpenConditionalOrders( String symbol, Long recvWindow) throws ApiException { @@ -1442,9 +1453,10 @@ public ApiResponse cancelAllUmOpenCond } /** - * Cancel All UM Open Orders(TRADE) Cancel all active LIMIT orders on specific symbol Weight: 1 + * Cancel All UM Open Orders (TRADE) Cancel all active LIMIT orders on specific symbol + * Weight(IP): 1 Security Type: TRADE * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<CancelAllUmOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1457,8 +1469,8 @@ public ApiResponse cancelAllUmOpenCond * * * @see Cancel - * All UM Open Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-um-open-orders">Cancel + * All UM Open Orders (TRADE) Documentation */ public ApiResponse cancelAllUmOpenOrders( String symbol, Long recvWindow) throws ApiException { @@ -1466,10 +1478,10 @@ public ApiResponse cancelAllUmOpenOrders( } /** - * Cancel CM Conditional Order(TRADE) Cancel CM Conditional Order * Either - * `strategyId` or `newClientStrategyId` must be sent. Weight: 1 + * Cancel CM Conditional Order (TRADE) Cancel CM Conditional Order Weight(IP): 1 Security Type: + * TRADE Notes: - Either `strategyId` or `newClientStrategyId` must be sent. * - * @param symbol (required) + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -1484,8 +1496,8 @@ public ApiResponse cancelAllUmOpenOrders( * * * @see Cancel - * CM Conditional Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-cm-conditional-order">Cancel + * CM Conditional Order (TRADE) Documentation */ public ApiResponse cancelCmConditionalOrder( String symbol, Long strategyId, String newClientStrategyId, Long recvWindow) @@ -1495,10 +1507,10 @@ public ApiResponse cancelCmConditionalOrder( } /** - * Cancel CM Order(TRADE) Cancel an active LIMIT order * Either `orderId` or - * `origClientOrderId` must be sent. Weight: 1 + * Cancel CM Order (TRADE) Cancel an active LIMIT order Weight(IP): 1 Security Type: TRADE + * Notes: - Either `orderId` or `origClientOrderId` must be sent. * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) * @param recvWindow (optional) @@ -1513,8 +1525,8 @@ public ApiResponse cancelCmConditionalOrder( * * * @see Cancel - * CM Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-cm-order">Cancel + * CM Order (TRADE) Documentation */ public ApiResponse cancelCmOrder( String symbol, Long orderId, String origClientOrderId, Long recvWindow) @@ -1523,10 +1535,10 @@ public ApiResponse cancelCmOrder( } /** - * Cancel Margin Account All Open Orders on a Symbol(TRADE) Cancel Margin Account All Open - * Orders on a Symbol Weight: 5 + * Cancel Margin Account All Open Orders on a Symbol (TRADE) Cancel Margin Account All Open + * Orders on a Symbol Weight(IP): 5 Security Type: TRADE * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<CancelMarginAccountAllOpenOrdersOnASymbolResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1539,8 +1551,8 @@ public ApiResponse cancelCmOrder( * * * @see Cancel - * Margin Account All Open Orders on a Symbol(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-margin-account-all-open-orders-on-asymbol">Cancel + * Margin Account All Open Orders on a Symbol (TRADE) Documentation */ public ApiResponse cancelMarginAccountAllOpenOrdersOnASymbol(String symbol, Long recvWindow) @@ -1549,17 +1561,17 @@ public ApiResponse cancelCmOrder( } /** - * Cancel Margin Account OCO Orders(TRADE) Cancel Margin Account OCO Orders * Additional notes: - * Canceling an individual leg will cancel the entire OCO Weight: 2 + * Cancel Margin Account OCO Orders (TRADE) Cancel Margin Account OCO Orders Weight(IP): 2 + * Security Type: TRADE Notes: - Additional notes: Canceling an individual leg will cancel the + * entire OCO * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderListId Either `orderListId` or `listClientOrderId` must be * provided (optional) * @param listClientOrderId Either `orderListId` or `listClientOrderId` must * be provided (optional) - * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by - * default (optional) - * @param recvWindow (optional) + * @param newClientOrderId Used to uniquely identify this cancel request. (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return ApiResponse<CancelMarginAccountOcoOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1571,8 +1583,8 @@ public ApiResponse cancelCmOrder( * * * @see Cancel - * Margin Account OCO Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-margin-account-oco-orders">Cancel + * Margin Account OCO Orders (TRADE) Documentation */ public ApiResponse cancelMarginAccountOcoOrders( String symbol, @@ -1586,15 +1598,14 @@ public ApiResponse cancelMarginAccountOcoO } /** - * Cancel Margin Account Order(TRADE) Cancel Margin Account Order * Either `orderId` - * or `origClientOrderId` must be sent. Weight: 2 + * Cancel Margin Account Order (TRADE) Cancel Margin Account Order Weight(IP): 2 Security Type: + * TRADE Notes: - Either `orderId` or `origClientOrderId` must be sent. * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) - * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by - * default (optional) - * @param recvWindow (optional) + * @param newClientOrderId Used to uniquely identify this cancel request. (optional) + * @param recvWindow The value cannot be greater than `60000` (optional) * @return ApiResponse<CancelMarginAccountOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1606,8 +1617,8 @@ public ApiResponse cancelMarginAccountOcoO * * * @see Cancel - * Margin Account Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-margin-account-order">Cancel + * Margin Account Order (TRADE) Documentation */ public ApiResponse cancelMarginAccountOrder( String symbol, @@ -1621,11 +1632,11 @@ public ApiResponse cancelMarginAccountOrder( } /** - * Cancel UM Algo Order (TRADE) Cancel an active UM algo order. * Either `algoId` or - * `clientAlgoId` must be sent. Weight: 1 + * Cancel UM Algo Order (TRADE) Cancel an active UM algo order Weight(IP): 1 Security Type: + * TRADE Notes: - Either `algoId` or `clientAlgoId` must be sent. * - * @param algoId (optional) - * @param clientAlgoId (optional) + * @param algoId Algo order ID (optional) + * @param clientAlgoId Client algo order ID (optional) * @param recvWindow (optional) * @return ApiResponse<CancelUmAlgoOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1638,7 +1649,7 @@ public ApiResponse cancelMarginAccountOrder( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-um-algo-order">Cancel * UM Algo Order (TRADE) Documentation */ public ApiResponse cancelUmAlgoOrder( @@ -1647,10 +1658,10 @@ public ApiResponse cancelUmAlgoOrder( } /** - * Cancel UM Conditional Order Cancel UM Conditional Order * Either `strategyId` or - * `newClientStrategyId` must be sent. Weight: 1 + * Cancel UM Conditional Order (TRADE) Cancel UM Conditional Order Weight(IP): 1 Security Type: + * TRADE Notes: - Either `strategyId` or `newClientStrategyId` must be sent. * - * @param symbol (required) + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -1664,10 +1675,9 @@ public ApiResponse cancelUmAlgoOrder( * 200 Cancel UM Conditional Order - * * - * @deprecated * @see Cancel - * UM Conditional Order Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-um-conditional-order">Cancel + * UM Conditional Order (TRADE) Documentation */ public ApiResponse cancelUmConditionalOrder( String symbol, Long strategyId, String newClientStrategyId, Long recvWindow) @@ -1677,10 +1687,10 @@ public ApiResponse cancelUmConditionalOrder( } /** - * Cancel UM Order(TRADE) Cancel an active UM LIMIT order * Either `orderId` or - * `origClientOrderId` must be sent. Weight: 1 + * Cancel UM Order (TRADE) Cancel an active UM LIMIT order Weight(IP): 1 Security Type: TRADE + * Notes: - Either `orderId` or `origClientOrderId` must be sent. * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) * @param recvWindow (optional) @@ -1695,8 +1705,8 @@ public ApiResponse cancelUmConditionalOrder( * * * @see Cancel - * UM Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-um-order">Cancel + * UM Order (TRADE) Documentation */ public ApiResponse cancelUmOrder( String symbol, Long orderId, String origClientOrderId, Long recvWindow) @@ -1705,22 +1715,23 @@ public ApiResponse cancelUmOrder( } /** - * CM Account Trade List(USER_DATA) Get trades for a specific account and CM symbol. * Either - * `symbol` or `pair` must be sent * `symbol` and `pair` - * cannot be sent together * `pair` and `fromId` cannot be sent together * - * `OrderId` can only be sent together with symbol * If a `pair` is sent, - * tickers for all symbols of the `pair` will be returned * The parameter - * `fromId` cannot be sent with `startTime` or `endTime` * If - * `startTime` and `endTime` are both not sent, then the last '24 - * hours' data will be returned. * The time between `startTime` and - * `endTime` cannot be longer than 24 hours. Weight: 20 with symbol, 40 with pair + * CM Account Trade List (USER_DATA) Get trades for a specific account and CM symbol. Weight: - + * 20 with `symbol` - 40 with `pair` Security Type: USER_DATA Notes: - + * Either `symbol` or `pair` must be sent - `symbol` and + * `pair` cannot be sent together - `pair` and `fromId` cannot be + * sent together - `OrderId` can only be sent together with symbol - If a + * `pair` is sent, tickers for all symbols of the `pair` will be returned - + * The parameter `fromId` cannot be sent with `startTime` or + * `endTime` - If `startTime` and `endTime` are both not sent, + * then the last '24 hours' data will be returned. - The time between + * `startTime` and `endTime` cannot be longer than 24 hours. * * @param symbol (optional) * @param pair (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) - * @param limit Default 100; max 1000 (optional) + * @param fromId Trade ID to fetch from. (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<CmAccountTradeListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1733,8 +1744,8 @@ public ApiResponse cancelUmOrder( * * * @see CM - * Account Trade List(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cm-account-trade-list">CM + * Account Trade List (USER_DATA) Documentation */ public ApiResponse cmAccountTradeList( String symbol, @@ -1750,7 +1761,7 @@ public ApiResponse cmAccountTradeList( } /** - * CM Position ADL Quantile Estimation(USER_DATA) Query CM Position ADL Quantile Estimation * + * CM Position ADL Quantile Estimation (USER_DATA) Query CM Position ADL Quantile Estimation * * Values update every 30s. * Values 0, 1, 2, 3, 4 shows the queue position and possibility of * ADL from low to high. * For positions of the symbol are in One-way Mode or isolated margined * in Hedge Mode, \"LONG\", \"SHORT\", and \"BOTH\" will be @@ -1758,7 +1769,8 @@ public ApiResponse cmAccountTradeList( * positions of the symbol are crossed margined in Hedge Mode: * \"HEDGE\" as a sign * will be returned instead of \"BOTH\"; * A same value caculated on unrealized pnls * on long and short sides' positions will be shown for \"LONG\" and - * \"SHORT\" when there are positions in both of long and short sides. Weight: 5 + * \"SHORT\" when there are positions in both of long and short sides. Weight(IP): 5 + * Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -1773,8 +1785,8 @@ public ApiResponse cmAccountTradeList( * * * @see CM - * Position ADL Quantile Estimation(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cm-position-adl-quantile-estimation">CM + * Position ADL Quantile Estimation (USER_DATA) Documentation */ public ApiResponse cmPositionAdlQuantileEstimation( String symbol, Long recvWindow) throws ApiException { @@ -1782,9 +1794,10 @@ public ApiResponse cmPositionAdlQuantil } /** - * Futures TradFi Perps Contract(USER_DATA) Sign TradFi-Perps agreement contract Weight: 5 + * Futures TradFi Perps Contract (USER_DATA) Sign TradFi-Perps agreement contract Weight(IP): 5 + * Security Type: USER_DATA * - * @param futuresTradfiPerpsContractRequest (required) + * @param futuresTradfiPerpsContractRequest (optional) * @return ApiResponse<FuturesTradfiPerpsContractResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1796,8 +1809,8 @@ public ApiResponse cmPositionAdlQuantil * * * @see Futures - * TradFi Perps Contract(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#futures-tradfi-perps-contract">Futures + * TradFi Perps Contract (USER_DATA) Documentation */ public ApiResponse futuresTradfiPerpsContract( FuturesTradfiPerpsContractRequest futuresTradfiPerpsContractRequest) @@ -1807,7 +1820,7 @@ public ApiResponse futuresTradfiPerpsContrac /** * Get UM Futures BNB Burn Status (USER_DATA) Get user's BNB Fee Discount for UM Futures - * (Fee Discount On or Fee Discount Off ) Weight: 30 + * (Fee Discount On or Fee Discount Off ) Weight(IP): 30 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetUmFuturesBnbBurnStatusResponse> @@ -1821,7 +1834,7 @@ public ApiResponse futuresTradfiPerpsContrac * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#get-um-futures-bnb-burn-status">Get * UM Futures BNB Burn Status (USER_DATA) Documentation */ public ApiResponse getUmFuturesBnbBurnStatus(Long recvWindow) @@ -1830,7 +1843,7 @@ public ApiResponse getUmFuturesBnbBurnStatus( } /** - * Margin Account Borrow(MARGIN) Apply for a margin loan. Weight: 100 + * Margin Account Borrow (MARGIN) Apply for a margin loan. Weight(IP): 100 Security Type: MARGIN * * @param marginAccountBorrowRequest (required) * @return ApiResponse<MarginAccountBorrowResponse> @@ -1844,8 +1857,8 @@ public ApiResponse getUmFuturesBnbBurnStatus( * * * @see Margin - * Account Borrow(MARGIN) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-borrow">Margin + * Account Borrow (MARGIN) Documentation */ public ApiResponse marginAccountBorrow( MarginAccountBorrowRequest marginAccountBorrowRequest) throws ApiException { @@ -1853,11 +1866,12 @@ public ApiResponse marginAccountBorrow( } /** - * Margin Account New OCO(TRADE) Send in a new OCO for a margin account * Price Restrictions: * - * `SELL`: Limit Price > Last Price > Stop Price * `BUY`: Limit Price - * < Last Price < Stop Price * Quantity Restrictions: * Both legs must have the same - * quantity * `ICEBERG` quantities however do not have to be the same. * Order Rate - * Limit * `OCO` counts as 2 orders against the order rate limit. Weight: 1 + * Margin Account New OCO (TRADE) Send in a new OCO for a margin account Weight(IP): 1 Security + * Type: TRADE Notes: - Other Info: - Price Restrictions: - `SELL`: Limit Price > + * Last Price > Stop Price - `BUY`: Limit Price * Quantity Restrictions: - Both + * legs must have the same quantity - `ICEBERG` quantities however do not have to be + * the same. - Order Rate Limit - `OCO` counts as 2 orders against the order rate + * limit. * * @param marginAccountNewOcoRequest (required) * @return ApiResponse<MarginAccountNewOcoResponse> @@ -1871,8 +1885,8 @@ public ApiResponse marginAccountBorrow( * * * @see Margin - * Account New OCO(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-new-oco">Margin + * Account New OCO (TRADE) Documentation */ public ApiResponse marginAccountNewOco( MarginAccountNewOcoRequest marginAccountNewOcoRequest) throws ApiException { @@ -1880,7 +1894,7 @@ public ApiResponse marginAccountNewOco( } /** - * Margin Account Repay(MARGIN) Repay for a margin loan. Weight: 100 + * Margin Account Repay (MARGIN) Repay for a margin loan. Weight(IP): 100 Security Type: MARGIN * * @param marginAccountRepayRequest (required) * @return ApiResponse<MarginAccountRepayResponse> @@ -1894,8 +1908,8 @@ public ApiResponse marginAccountNewOco( * * * @see Margin - * Account Repay(MARGIN) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-repay">Margin + * Account Repay (MARGIN) Documentation */ public ApiResponse marginAccountRepay( MarginAccountRepayRequest marginAccountRepayRequest) throws ApiException { @@ -1903,13 +1917,13 @@ public ApiResponse marginAccountRepay( } /** - * Margin Account Repay Debt(TRADE) Repay debt for a margin loan. * The repay asset amount - * cannot exceed 50000 USD equivalent value for a single request. * If `amount` is not - * sent, all the asset loan will be repaid if having enough specific repay assets. * If - * `amount` is sent, only the certain amount of the asset loan will be repaid if - * having enough specific repay assets. * The system will use the same asset to repay the loan - * first (if have) no matter whether put the asset in `specifyRepayAssets` Weight: - * 3000 + * Margin Account Repay Debt (TRADE) Repay debt for a margin loan. Weight(IP): 3000 Security + * Type: TRADE Notes: - The repay asset amount cannot exceed 50000 USD equivalent value for a + * single request. - If `amount` is not sent, all the asset loan will be repaid if + * having enough specific repay assets. - If `amount` is sent, only the certain amount + * of the asset loan will be repaid if having enough specific repay assets. - The system will + * use the same asset to repay the loan first (if have) no matter whether put the asset in + * `specifyRepayAssets` * * @param marginAccountRepayDebtRequest (required) * @return ApiResponse<MarginAccountRepayDebtResponse> @@ -1923,8 +1937,8 @@ public ApiResponse marginAccountRepay( * * * @see Margin - * Account Repay Debt(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-repay-debt">Margin + * Account Repay Debt (TRADE) Documentation */ public ApiResponse marginAccountRepayDebt( MarginAccountRepayDebtRequest marginAccountRepayDebtRequest) throws ApiException { @@ -1932,15 +1946,18 @@ public ApiResponse marginAccountRepayDebt( } /** - * Margin Account Trade List (USER_DATA) Margin Account Trade List Weight: 5 + * Margin Account Trade List (USER_DATA) Margin Account Trade List Weight(IP): 5 Security Type: + * USER_DATA Notes: - **Note:** * If `fromId` is set, returns orders with id + * >= `fromId`; otherwise returns recent order history. - The interval between + * `startTime` and `endTime` must be less than 24 hours. * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) - * @param limit Default 100; max 1000 (optional) - * @param recvWindow (optional) + * @param fromId Trade ID to fetch from. (optional) + * @param limit Number of results returned. (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return ApiResponse<MarginAccountTradeListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1952,7 +1969,7 @@ public ApiResponse marginAccountRepayDebt( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-trade-list">Margin * Account Trade List (USER_DATA) Documentation */ public ApiResponse marginAccountTradeList( @@ -1969,16 +1986,16 @@ public ApiResponse marginAccountTradeList( } /** - * Modify CM Order(TRADE) Order modify function, currently only LIMIT order modification is - * supported, modified orders will be reordered in the match queue * Either `orderId` - * or `origClientOrderId` must be sent, and the `orderId` will prevail if - * both are sent. * Both `quantity` and `price` must be sent * When the new - * `quantity` or `price` doesn'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 `quantity` <= `executedQty` * - * When the order is `GTX` and the new price will cause it to be executed immediately - * Weight: 1 + * Modify CM Order (TRADE) Order modify function, currently only LIMIT order modification is + * supported, modified orders will be reordered in the match queue Weight(IP): 1 Security Type: + * TRADE Notes: - Either `orderId` or `origClientOrderId` must be sent, and + * the `orderId` will prevail if both are sent. - Both `quantity` and + * `price` must be sent - When the new `quantity` or `price` + * doesn'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 + * `quantity` * When the order is `GTX` and the new price will cause it to + * be executed immediately * * @param modifyCmOrderRequest (required) * @return ApiResponse<ModifyCmOrderResponse> @@ -1992,8 +2009,8 @@ public ApiResponse marginAccountTradeList( * * * @see Modify - * CM Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#modify-cm-order">Modify + * CM Order (TRADE) Documentation */ public ApiResponse modifyCmOrder( ModifyCmOrderRequest modifyCmOrderRequest) throws ApiException { @@ -2001,14 +2018,14 @@ public ApiResponse modifyCmOrder( } /** - * Modify UM Order(TRADE) Order modify function, currently only LIMIT order modification is - * supported, modified orders will be reordered in the match queue * Either orderId or - * origClientOrderId must be sent, and the orderId will prevail if both are sent. * Both - * quantity and price must be sent * When the new quantity or price doesn'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 quantity <= executedQty * - * When the order is GTX and the new price will cause it to be executed immediately Weight: 1 + * Modify UM Order (TRADE) Order modify function, currently only LIMIT order modification is + * supported, modified orders will be reordered in the match queue Weight(IP): 1 Security Type: + * TRADE Notes: - Either orderId or origClientOrderId must be sent, and the orderId will prevail + * if both are sent. - Both quantity and price must be sent - When the new quantity or price + * doesn'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 quantity * + * When the order is GTX and the new price will cause it to be executed immediately * * @param modifyUmOrderRequest (required) * @return ApiResponse<ModifyUmOrderResponse> @@ -2022,8 +2039,8 @@ public ApiResponse modifyCmOrder( * * * @see Modify - * UM Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#modify-um-order">Modify + * UM Order (TRADE) Documentation */ public ApiResponse modifyUmOrder( ModifyUmOrderRequest modifyUmOrderRequest) throws ApiException { @@ -2031,34 +2048,17 @@ public ApiResponse modifyUmOrder( } /** - * New CM Conditional Order(TRADE) New CM Conditional Order * Order with type + * New CM Conditional Order (TRADE) New CM Conditional Order Weight(IP): 1 Security Type: TRADE + * Notes: - Additional mandatory parameters based on type: - Order with type * `STOP/TAKE_PROFIT`, parameter `timeInForce` can be sent ( default - * `GTC`). * Condition orders will be triggered when: * `STOP`, - * `STOP_MARKET`: * BUY: \"MARK_PRICE\" >= `stopPrice` * - * SELL: \"MARK_PRICE\" <= `stopPrice` * `TAKE_PROFIT`, - * `TAKE_PROFIT_MARKET`: * BUY: \"MARK_PRICE\" <= - * `stopPrice` * SELL: \"MARK_PRICE\" >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest mark price after order placed - * `<= `activationPrice`, and the latest mark price >`= the - * lowest mark price * (1 + `callbackRate`) * SELL: the highest mark price after order - * placed >= `activationPrice`, and the latest mark price <= the - * highest mark price * (1 - `callbackRate`) * For `TRAILING_STOP_MARKET`, - * if you got such error code. `{\"code\": -2021, \"msg\": \"Order - * would immediately trigger.\"}` means that the parameters you send do not meet the - * following requirements: * BUY: `activationPrice` should be smaller than latest mark - * price. * SELL: `activationPrice` should be larger than latest mark price. * - * Condition orders will be triggered when: * If parameter`priceProtect`is sent as - * true: * when price reaches the `stopPrice` ,the difference rate between - * \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be larger than the - * \"triggerProtect\" of the symbol * \"triggerProtect\" of a symbol can be - * got from `GET /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * - * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `stopPrice` * `TAKE_PROFIT`, - * `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `stopPrice` * SELL: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - * Weight: 1 + * `GTC`). - Condition orders will be triggered when: - `STOP`, + * `STOP_MARKET`: - BUY: \"MARK_PRICE\" >= `stopPrice` - + * SELL: \"MARK_PRICE\" = `stopPrice` - + * `TRAILING_STOP_MARKET`: - BUY: the lowest mark price after order placed + * ``= the lowest mark price - (1 + `callbackRate`) - SELL: the highest + * mark price after order placed >= `activationPrice`, and the latest mark + * price = `stopPrice` - SELL: latest price (\"MARK_PRICE\" or + * \"CONTRACT_PRICE\") = `stopPrice` * * @param newCmConditionalOrderRequest (required) * @return ApiResponse<NewCmConditionalOrderResponse> @@ -2072,8 +2072,8 @@ public ApiResponse modifyUmOrder( * * * @see New - * CM Conditional Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-cm-conditional-order">New + * CM Conditional Order (TRADE) Documentation */ public ApiResponse newCmConditionalOrder( NewCmConditionalOrderRequest newCmConditionalOrderRequest) throws ApiException { @@ -2081,10 +2081,12 @@ public ApiResponse newCmConditionalOrder( } /** - * New CM Order(TRADE) Place new CM order * If `newOrderRespType` is sent as - * `RESULT` : * `MARKET` order: the final FILLED result of the order will be - * return directly. * `LIMIT` order with special `timeInForce`: the final - * status result of the order(FILLED or EXPIRED) will be returned directly. Weight: 1 + * New CM Order (TRADE) Place new CM order Weight(IP): 1 Security Type: TRADE Notes: - + * Additional mandatory parameters based on `type`: - If `newOrderRespType` + * is sent as `RESULT` : - `MARKET` order: the final FILLED result of the + * order will be return directly. - `LIMIT` order with special + * `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be + * returned directly. * * @param newCmOrderRequest (required) * @return ApiResponse<NewCmOrderResponse> @@ -2098,8 +2100,8 @@ public ApiResponse newCmConditionalOrder( * * * @see New - * CM Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-cm-order">New + * CM Order (TRADE) Documentation */ public ApiResponse newCmOrder(NewCmOrderRequest newCmOrderRequest) throws ApiException { @@ -2107,7 +2109,7 @@ public ApiResponse newCmOrder(NewCmOrderRequest newCmOrderRe } /** - * New Margin Order(TRADE) New Margin Order Weight: 1 + * New Margin Order (TRADE) New Margin Order Weight(IP): 1 Security Type: TRADE * * @param newMarginOrderRequest (required) * @return ApiResponse<NewMarginOrderResponse> @@ -2121,8 +2123,8 @@ public ApiResponse newCmOrder(NewCmOrderRequest newCmOrderRe * * * @see New - * Margin Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-margin-order">New + * Margin Order (TRADE) Documentation */ public ApiResponse newMarginOrder( NewMarginOrderRequest newMarginOrderRequest) throws ApiException { @@ -2130,39 +2132,20 @@ public ApiResponse newMarginOrder( } /** - * New UM Algo Order (TRADE) Place new UM conditional order * Algo order with type - * `STOP`, parameter `timeInForce` can be sent ( default `GTC`). * - * Algo order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent ( - * default `GTC`). * Condition orders will be triggered when: * If - * parameter`priceProtect`is sent as true: * when price reaches the - * `triggerPrice` , the difference rate between \"MARK_PRICE\" and - * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * `TAKE_PROFIT`, - * `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * SELL: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest price after - * order placed <= `activatePrice`, and the latest price >= the lowest - * price * (1 + `callbackRate`) * SELL: the highest price after order placed - * >= `activatePrice`, and the latest price <= the highest price * (1 - * - `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error - * code. ``{\"code\": -2021, \"msg\": \"Order would - * immediately trigger.\"}`` means that the parameters you send do not meet the - * following requirements: * BUY: `activatePrice` should be smaller than latest price. - * * SELL: `activatePrice` should be larger than latest price. * - * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered, **close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` paremeter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with - * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. Weight: 1 + * New UM Algo Order (TRADE) Place new UM conditional order Weight(IP): 1 Security Type: TRADE + * Notes: - Algo order with type `STOP`, parameter `timeInForce` can be sent + * (default `GTC`). - Algo order with type `TAKE_PROFIT`, parameter + * `timeInForce` can be sent (default `GTC`). - Condition orders will be + * triggered when price reaches the `triggerPrice`. - `STOP`, + * `STOP_MARKET`: BUY: latest price >= `triggerPrice`; SELL: latest + * price <= `triggerPrice`. - `TAKE_PROFIT`, + * `TAKE_PROFIT_MARKET`: BUY: latest price <= `triggerPrice`; SELL: + * latest price >= `triggerPrice`. - `TRAILING_STOP_MARKET`: BUY: + * lowest price after order placed <= `activatePrice`, and latest price + * >= lowest price * (1 + `callbackRate`); SELL: highest price after order + * placed >= `activatePrice`, and latest price <= highest price * (1 - + * `callbackRate`). - `selfTradePreventionMode` is only effective when + * `timeInForce` set to `IOC` or `GTC` or `GTD`. * * @param newUmAlgoOrderRequest (required) * @return ApiResponse<NewUmAlgoOrderResponse> @@ -2176,7 +2159,7 @@ public ApiResponse newMarginOrder( * * * @see New + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-um-algo-order">New * UM Algo Order (TRADE) Documentation */ public ApiResponse newUmAlgoOrder( @@ -2185,37 +2168,21 @@ public ApiResponse newUmAlgoOrder( } /** - * New UM Conditional Order Place new UM conditional order * Order with type + * New UM Conditional Order (TRADE) Place new UM conditional order Weight(IP): 1 Security Type: + * TRADE Notes: - Additional mandatory parameters based on type: - Order with type * `STOP/TAKE_PROFIT`, parameter `timeInForce` can be sent ( default - * `GTC`). * Condition orders will be triggered when: * `STOP`, - * `STOP_MARKET`: * BUY: \"MARK_PRICE\" >= `stopPrice` * - * SELL: \"MARK_PRICE\" <= `stopPrice` * `TAKE_PROFIT`, - * `TAKE_PROFIT_MARKET`: * BUY: \"MARK_PRICE\" <= - * `stopPrice` * SELL: \"MARK_PRICE\" >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest mark price after order placed - * `<= `activationPrice`, and the latest mark price >`= the - * lowest mark price * (1 + `callbackRate`) * SELL: the highest mark price after order - * placed >= `activationPrice`, and the latest mark price <= the - * highest mark price * (1 - `callbackRate`) * For `TRAILING_STOP_MARKET`, - * if you got such error code. `{\"code\": -2021, \"msg\": \"Order - * would immediately trigger.\"}` means that the parameters you send do not meet the - * following requirements: * BUY: `activationPrice` should be smaller than latest mark - * price. * SELL: `activationPrice` should be larger than latest mark price. * - * Condition orders will be triggered when: * If parameter`priceProtect`is sent as - * true: * when price reaches the `stopPrice` ,the difference rate between - * \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be larger than the - * \"triggerProtect\" of the symbol * \"triggerProtect\" of a symbol can be - * got from `GET /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * - * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `stopPrice` * `TAKE_PROFIT`, - * `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `stopPrice` * SELL: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * + * `GTC`). - Condition orders will be triggered when: - `STOP`, + * `STOP_MARKET`: - BUY: \"MARK_PRICE\" >= `stopPrice` - + * SELL: \"MARK_PRICE\" = `stopPrice` - + * `TRAILING_STOP_MARKET`: - BUY: the lowest mark price after order placed + * ``= the lowest mark price - (1 + `callbackRate`) - SELL: the highest + * mark price after order placed >= `activationPrice`, and the latest mark + * price = `stopPrice` - SELL: latest price (\"MARK_PRICE\" or + * \"CONTRACT_PRICE\") = `stopPrice` - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. * In extreme market conditions, + * `IOC` or `GTC` or `GTD`. - In extreme market conditions, * timeInForce `GTD` order auto cancel time might be delayed comparing to - * `goodTillDate` Weight: 1 + * `goodTillDate` * * @param newUmConditionalOrderRequest (required) * @return ApiResponse<NewUmConditionalOrderResponse> @@ -2228,10 +2195,9 @@ public ApiResponse newUmAlgoOrder( * 200 New UM Conditional Order - * * - * @deprecated * @see New - * UM Conditional Order Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-um-conditional-order">New + * UM Conditional Order (TRADE) Documentation */ public ApiResponse newUmConditionalOrder( NewUmConditionalOrderRequest newUmConditionalOrderRequest) throws ApiException { @@ -2239,14 +2205,15 @@ public ApiResponse newUmConditionalOrder( } /** - * New UM Order (TRADE) Place new UM order * If `newOrderRespType` is sent as - * `RESULT` : * `MARKET` order: the final FILLED result of the order will be - * return directly. * `LIMIT` order with special `timeInForce`: the final - * status result of the order(FILLED or EXPIRED) will be returned directly. * + * New UM Order (TRADE) Place new UM order Weight(IP): 1 Security Type: TRADE Notes: - + * Additional mandatory parameters based on type: - If `newOrderRespType` is sent as + * `RESULT` : - `MARKET` order: the final FILLED result of the order will be + * return directly. - `LIMIT` order with special `timeInForce`: the final + * status result of the order(FILLED or EXPIRED) will be returned directly. - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. * In extreme market conditions, + * `IOC` or `GTC` or `GTD`. - In extreme market conditions, * timeInForce `GTD` order auto cancel time might be delayed comparing to - * `goodTillDate` Weight: 1 + * `goodTillDate` * * @param newUmOrderRequest (required) * @return ApiResponse<NewUmOrderResponse> @@ -2260,7 +2227,7 @@ public ApiResponse newUmConditionalOrder( * * * @see New + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-um-order">New * UM Order (TRADE) Documentation */ public ApiResponse newUmOrder(NewUmOrderRequest newUmOrderRequest) @@ -2269,17 +2236,17 @@ public ApiResponse newUmOrder(NewUmOrderRequest newUmOrderRe } /** - * Query All CM Conditional Orders(USER_DATA) Query All CM Conditional Orders * These orders - * will not be found: * order strategyStatus is `CANCELED` or `EXPIRED`, - * **AND** * order has NO filled trade, **AND** * created time + 7 days < current time * The - * query time period must be less than 7 days( default as the recent 7 days). Weight: 1 for a - * single symbol; 40 when the symbol parameter is omitted + * Query All CM Conditional Orders (USER_DATA) Query All CM Conditional Orders Weight: - 1 for a + * single `symbol` - 40 when `symbol` is omitted Security Type: USER_DATA + * Notes: - These orders will not be found: - order strategyStatus is `CANCELED` or + * `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 7 days * + * The query time period must be less than 7 days( default as the recent 7 days). * * @param symbol (optional) * @param strategyId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryAllCmConditionalOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2292,8 +2259,8 @@ public ApiResponse newUmOrder(NewUmOrderRequest newUmOrderRe * * * @see Query - * All CM Conditional Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-cm-conditional-orders">Query + * All CM Conditional Orders (USER_DATA) Documentation */ public ApiResponse queryAllCmConditionalOrders( String symbol, @@ -2308,19 +2275,20 @@ public ApiResponse queryAllCmConditionalOrd } /** - * Query All CM Orders (USER_DATA) Get all account CM orders; active, canceled, or filled. * - * Either `symbol` or `pair` must be sent. * If `orderId` is set, - * it will get orders >= that orderId. Otherwise most recent orders are returned. * - * These orders will not be found: * order status is `CANCELED` or - * `EXPIRED`, **AND** * order has NO filled trade, **AND** * created time + 3 days - * < current time Weight: 20 with symbol, 40 with pair + * Query All CM Orders (USER_DATA) Get all account CM orders; active, canceled, or filled. + * Weight: - 20 with `symbol` - 40 with `pair` Security Type: USER_DATA + * Notes: - Either `symbol` or `pair` must be sent. - If `orderId` + * is set, it will get orders >= that orderId. Otherwise most recent orders are + * returned. - These orders will not be found: - order status is `CANCELED` or + * `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 3 days + * < current time * - * @param symbol (required) + * @param symbol Symbol (optional) * @param pair (optional) * @param orderId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryAllCmOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2333,7 +2301,7 @@ public ApiResponse queryAllCmConditionalOrd * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-cm-orders">Query * All CM Orders (USER_DATA) Documentation */ public ApiResponse queryAllCmOrders( @@ -2351,9 +2319,9 @@ public ApiResponse queryAllCmOrders( /** * Query All Current CM Open Conditional Orders (USER_DATA) Get all open conditional orders on a - * symbol. **Careful** when accessing this with no symbol. * If the symbol is not sent, orders - * for all symbols will be returned in an array. Weight: 1 for a single symbol; 40 when the - * symbol parameter is omitted + * symbol. **Careful** when accessing this with no symbol. Weight: - 1 for a single + * `symbol` - 40 when `symbol` is omitted Security Type: USER_DATA Notes: - + * If the symbol is not sent, orders for all symbols will be returned in an array. * * @param symbol (optional) * @param recvWindow (optional) @@ -2368,7 +2336,7 @@ public ApiResponse queryAllCmOrders( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-cm-open-conditional-orders">Query * All Current CM Open Conditional Orders (USER_DATA) Documentation */ public ApiResponse @@ -2378,9 +2346,9 @@ public ApiResponse queryAllCmOrders( } /** - * Query All Current CM Open Orders(USER_DATA) Get all open orders on a symbol. * If the symbol - * is not sent, orders for all symbols will be returned in an array. Weight: 1 for a single - * symbol; 40 when the symbol parameter is omitted Careful when accessing this with no symbol. + * Query All Current CM Open Orders (USER_DATA) Get all open orders on a symbol. * If the symbol + * is not sent, orders for all symbols will be returned in an array. Weight: - 1 for a single + * `symbol` - 40 when `symbol` is omitted Security Type: USER_DATA * * @param symbol (optional) * @param pair (optional) @@ -2396,8 +2364,8 @@ public ApiResponse queryAllCmOrders( * * * @see Query - * All Current CM Open Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-cm-open-orders">Query + * All Current CM Open Orders (USER_DATA) Documentation */ public ApiResponse queryAllCurrentCmOpenOrders( String symbol, String pair, Long recvWindow) throws ApiException { @@ -2405,10 +2373,9 @@ public ApiResponse queryAllCurrentCmOpenOrd } /** - * Query All Current UM Open Algo Orders (USER_DATA) Get all UM open algo orders on a symbol. * - * If the symbol is not sent, orders for all symbols will be returned in an array. Weight: 1 for - * a single symbol; 40 when the symbol parameter is omitted Careful when accessing this with no - * symbol. + * Query All Current UM Open Algo Orders (USER_DATA) Get all UM open algo orders on a symbol. If + * the symbol is not sent, orders for all symbols will be returned. Weight(IP): 1 Security Type: + * USER_DATA Notes: - Weight: 1 for a single symbol; 40 when the symbol parameter is omitted. * * @param algoType (optional) * @param symbol (optional) @@ -2421,11 +2388,11 @@ public ApiResponse queryAllCurrentCmOpenOrd * * * - * + * *
Response Details
Status Code Description Response Headers
200 All Current UM Open Algo Orders -
200 Query All Current UM Open Algo Orders -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-um-open-algo-orders">Query * All Current UM Open Algo Orders (USER_DATA) Documentation */ public ApiResponse queryAllCurrentUmOpenAlgoOrders( @@ -2434,10 +2401,10 @@ public ApiResponse queryAllCurrentUmOpe } /** - * Query All Current UM Open Conditional Orders Get all open conditional orders on a symbol. * - * If the symbol is not sent, orders for all symbols will be returned in an array. Weight: 1 for - * a single symbol; 40 when the symbol parameter is omitted Careful when accessing this with no - * symbol. + * Query All Current UM Open Conditional Orders (USER_DATA) Get all open conditional orders on a + * symbol. Weight: - 1 for a single `symbol` - 40 when `symbol` is omitted + * Security Type: USER_DATA Notes: - If `symbol` is not provided, conditional open + * orders for all symbols are returned. * * @param symbol (optional) * @param recvWindow (optional) @@ -2451,10 +2418,9 @@ public ApiResponse queryAllCurrentUmOpe * 200 All Current UM Open Conditional Orders - * * - * @deprecated * @see Query - * All Current UM Open Conditional Orders Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-um-open-conditional-orders">Query + * All Current UM Open Conditional Orders (USER_DATA) Documentation */ public ApiResponse queryAllCurrentUmOpenConditionalOrders(String symbol, Long recvWindow) @@ -2463,9 +2429,9 @@ public ApiResponse queryAllCurrentUmOpe } /** - * Query All Current UM Open Orders(USER_DATA) Get all open orders on a symbol. * If the symbol - * is not sent, orders for all symbols will be returned in an array. Weight: 1 for a single - * symbol; 40 when the symbol parameter is omitted + * Query All Current UM Open Orders (USER_DATA) Get all open orders on a symbol. Weight: - 1 for + * a single `symbol` - 40 when `symbol` is omitted Security Type: USER_DATA + * Notes: - If the symbol is not sent, orders for all symbols will be returned in an array. * * @param symbol (optional) * @param recvWindow (optional) @@ -2480,8 +2446,8 @@ public ApiResponse queryAllCurrentUmOpe * * * @see Query - * All Current UM Open Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-um-open-orders">Query + * All Current UM Open Orders (USER_DATA) Documentation */ public ApiResponse queryAllCurrentUmOpenOrders( String symbol, Long recvWindow) throws ApiException { @@ -2489,14 +2455,17 @@ public ApiResponse queryAllCurrentUmOpenOrd } /** - * Query All Margin Account Orders (USER_DATA) Query All Margin Account Orders Weight: 100 + * Query All Margin Account Orders (USER_DATA) Query All Margin Account Orders Weight(IP): 100 + * Security Type: USER_DATA Notes: - If `orderId` is set, returns orders with id + * >= `orderId`; otherwise returns recent order history. - For some historical + * orders, `cummulativeQuoteQty < 0` means the data is unavailable at this time. * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) - * @param recvWindow (optional) + * @param limit Number of results returned. (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return ApiResponse<QueryAllMarginAccountOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2508,7 +2477,7 @@ public ApiResponse queryAllCurrentUmOpenOrd * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-margin-account-orders">Query * All Margin Account Orders (USER_DATA) Documentation */ public ApiResponse queryAllMarginAccountOrders( @@ -2519,17 +2488,17 @@ public ApiResponse queryAllMarginAccountOrd } /** - * Query All UM Conditional Orders Query All UM Conditional Orders * These orders will not be - * found: * order strategyStatus is `CANCELED` or `EXPIRED`, **AND** * order - * has NO filled trade, **AND** * created time + 7 days < current time * The query time - * period must be less than 7 days( default as the recent 7 days). Weight: 1 for a single - * symbol; 40 when the symbol parameter is omitted + * Query All UM Conditional Orders (USER_DATA) Query All UM Conditional Orders Weight: - 1 for a + * single `symbol` - 40 when `symbol` is omitted Security Type: USER_DATA + * Notes: - These orders will not be found: - order strategyStatus is `CANCELED` or + * `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 7 days * + * The query time period must be less than 7 days( default as the recent 7 days). * * @param symbol (optional) * @param strategyId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryAllUmConditionalOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2541,10 +2510,9 @@ public ApiResponse queryAllMarginAccountOrd * 200 All UM Conditional Orders - * * - * @deprecated * @see Query - * All UM Conditional Orders Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-um-conditional-orders">Query + * All UM Conditional Orders (USER_DATA) Documentation */ public ApiResponse queryAllUmConditionalOrders( String symbol, @@ -2559,18 +2527,16 @@ public ApiResponse queryAllUmConditionalOrd } /** - * Query All UM Orders(USER_DATA) Get all account UM orders; active, canceled, or filled. * - * These orders will not be found: * order status is `CANCELED` or - * `EXPIRED`, **AND** * order has NO filled trade, **AND** * created time + 3 days - * < current time * If `orderId` is set, it will get orders >= that - * orderId. Otherwise most recent orders are returned. * The query time period must be less then - * 7 days( default as the recent 7 days). Weight: 5 + * Query All UM Orders (USER_DATA) Get all account UM orders; active, canceled, or filled. + * Weight(IP): 5 Security Type: USER_DATA Notes: - If `orderId` is set, it will get + * orders >= that orderId. Otherwise most recent orders are returned. - The query time + * period must be less then 7 days( default as the recent 7 days). * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryAllUmOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2583,8 +2549,8 @@ public ApiResponse queryAllUmConditionalOrd * * * @see Query - * All UM Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-um-orders">Query + * All UM Orders (USER_DATA) Documentation */ public ApiResponse queryAllUmOrders( String symbol, Long orderId, Long startTime, Long endTime, Long limit, Long recvWindow) @@ -2593,13 +2559,14 @@ public ApiResponse queryAllUmOrders( } /** - * Query CM Conditional Order History(USER_DATA) Query CM Conditional Order History * Either - * `strategyId` or `newClientStrategyId` must be sent. * `NEW` - * orders will not be found. * These orders will not be found: * order status is - * `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** * - * created time + 7 days < current time Weight: 1 + * Query CM Conditional Order History (USER_DATA) Query CM Conditional Order History Weight(IP): + * 1 Security Type: USER_DATA Notes: - Either `strategyId` or + * `newClientStrategyId` must be sent. - `NEW` orders will not be found. - + * These orders will not be found: - order status is `CANCELED` or + * `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 7 days + * < current time * - * @param symbol (required) + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -2614,8 +2581,8 @@ public ApiResponse queryAllUmOrders( * * * @see Query - * CM Conditional Order History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-cm-conditional-order-history">Query + * CM Conditional Order History (USER_DATA) Documentation */ public ApiResponse queryCmConditionalOrderHistory( String symbol, Long strategyId, String newClientStrategyId, Long recvWindow) @@ -2625,16 +2592,16 @@ public ApiResponse queryCmConditionalOrd } /** - * Query CM Modify Order History(TRADE) Get order modification history * Either - * `orderId` or `origClientOrderId` must be sent, and the - * `orderId` will prevail if both are sent. Weight: 1 + * Query CM Modify Order History (TRADE) Get order modification history Weight(IP): 1 Security + * Type: TRADE Notes: - Either `orderId` or `origClientOrderId` must be + * sent, and the `orderId` will prevail if both are sent. * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryCmModifyOrderHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2647,8 +2614,8 @@ public ApiResponse queryCmConditionalOrd * * * @see Query - * CM Modify Order History(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-cm-modify-order-history">Query + * CM Modify Order History (TRADE) Documentation */ public ApiResponse queryCmModifyOrderHistory( String symbol, @@ -2664,12 +2631,13 @@ public ApiResponse queryCmModifyOrderHistory( } /** - * Query CM Order(USER_DATA) Check an CM order's status. * Either `orderId` or - * `origClientOrderId` must be sent. * These orders will not be found: * order status - * is `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** - * * created time + 3 days < current time Weight: 1 + * Query CM Order (USER_DATA) Check an CM order's status. Weight(IP): 1 Security Type: + * USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be sent. + * - These orders will not be found: - order status is `CANCELED` or + * `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 3 days + * < current time * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) * @param recvWindow (optional) @@ -2684,8 +2652,8 @@ public ApiResponse queryCmModifyOrderHistory( * * * @see Query - * CM Order(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-cm-order">Query + * CM Order (USER_DATA) Documentation */ public ApiResponse queryCmOrder( String symbol, Long orderId, String origClientOrderId, Long recvWindow) @@ -2694,12 +2662,12 @@ public ApiResponse queryCmOrder( } /** - * Query Current CM Open Conditional Order(USER_DATA) Query Current CM Open Conditional Order * - * Either `strategyId` or `newClientStrategyId` must be sent. * If the - * queried order has been triggered, cancelled or expired, the error message \"Order does - * not exist\" will be returned. Weight: 1 + * Query Current CM Open Conditional Order (USER_DATA) Query Current CM Open Conditional Order + * Weight(IP): 1 Security Type: USER_DATA Notes: - Either `strategyId` or + * `newClientStrategyId` must be sent. - If the queried order has been triggered, + * cancelled or expired, the error message \"Order does not exist\" will be returned. * - * @param symbol (required) + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -2714,8 +2682,8 @@ public ApiResponse queryCmOrder( * * * @see Query - * Current CM Open Conditional Order(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-cm-open-conditional-order">Query + * Current CM Open Conditional Order (USER_DATA) Documentation */ public ApiResponse queryCurrentCmOpenConditionalOrder( @@ -2726,14 +2694,14 @@ public ApiResponse queryCmOrder( } /** - * Query Current CM Open Order (USER_DATA) Query current CM open order * Either - * `orderId` or `origClientOrderId` must be sent. * If the queried order has - * been filled or cancelled, the error message \"Order does not exist\" will be - * returned. Weight: 1 + * Query Current CM Open Order (USER_DATA) Query current CM open order Weight(IP): 1 Security + * Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be + * sent. - If the queried order has been filled or cancelled, the error message \"Order + * does not exist\" will be returned. * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * @param symbol Trading pair. (required) + * @param orderId Order ID. (optional) + * @param origClientOrderId User-defined order ID. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryCurrentCmOpenOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2746,7 +2714,7 @@ public ApiResponse queryCmOrder( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-cm-open-order">Query * Current CM Open Order (USER_DATA) Documentation */ public ApiResponse queryCurrentCmOpenOrder( @@ -2756,10 +2724,13 @@ public ApiResponse queryCurrentCmOpenOrder( } /** - * Query Current Margin Open Order (USER_DATA) Query Current Margin Open Order Weight: 5 + * Query Current Margin Open Order (USER_DATA) Query Current Margin Open Order Weight(IP): 5 + * Security Type: USER_DATA Notes: - If `symbol` is not sent, order records for all + * symbols are returned. - When returning all symbols, the request count charged to the rate + * limiter equals the number of symbols currently trading on the exchange. * - * @param symbol (required) - * @param recvWindow (optional) + * @param symbol Symbol (required) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return ApiResponse<QueryCurrentMarginOpenOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2771,7 +2742,7 @@ public ApiResponse queryCurrentCmOpenOrder( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-margin-open-order">Query * Current Margin Open Order (USER_DATA) Documentation */ public ApiResponse queryCurrentMarginOpenOrder( @@ -2780,15 +2751,14 @@ public ApiResponse queryCurrentMarginOpenOr } /** - * Query Current UM Open Algo Order (USER_DATA) Check an UM algo order's status. * These - * orders will not be found: * order status is `CANCELED` or `EXPIRED` - * **AND** order has NO filled trade **AND** created time + 3 days < current time * order - * create time + 90 days < current time * Either `algoId` or - * `clientAlgoId` must be sent. * `algoId` is self-increment for each - * specific `symbol` Weight: 1 + * Query Current UM Open Algo Order (USER_DATA) Check an UM algo order's status. Orders will + * not be found if: status is CANCELED/EXPIRED with no fills and created 3+ days ago; or created + * 90+ days ago. Weight(IP): 1 Security Type: USER_DATA Notes: - Either `algoId` or + * `clientAlgoId` must be sent. `algoId` is self-increment for each specific + * `symbol`. * - * @param algoId (optional) - * @param clientAlgoId (optional) + * @param algoId Algo order ID (optional) + * @param clientAlgoId Client algo order ID (optional) * @param recvWindow (optional) * @return ApiResponse<QueryCurrentUmOpenAlgoOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2797,11 +2767,11 @@ public ApiResponse queryCurrentMarginOpenOr * * * - * + * *
Response Details
Status Code Description Response Headers
200 Current UM Open Algo Order -
200 Query UM Algo Order -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-um-open-algo-order">Query * Current UM Open Algo Order (USER_DATA) Documentation */ public ApiResponse queryCurrentUmOpenAlgoOrder( @@ -2810,12 +2780,13 @@ public ApiResponse queryCurrentUmOpenAlgoOr } /** - * Query Current UM Open Conditional Order Query Current UM Open Conditional Order * Either - * `strategyId` or `newClientStrategyId` must be sent. * If the queried - * order has been `CANCELED`, `TRIGGERED` or `EXPIRED`, the error - * message \"Order does not exist\" will be returned. Weight: 1 + * Query Current UM Open Conditional Order (USER_DATA) Query Current UM Open Conditional Order + * Weight(IP): 1 Security Type: USER_DATA Notes: - Either `strategyId` or + * `newClientStrategyId` must be sent. - If the queried order has been + * `CANCELED`, `TRIGGERED` or `EXPIRED`, the error message + * \"Order does not exist\" will be returned. * - * @param symbol (required) + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -2829,10 +2800,9 @@ public ApiResponse queryCurrentUmOpenAlgoOr * 200 Current UM Open Conditional Order - * * - * @deprecated * @see Query - * Current UM Open Conditional Order Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-um-open-conditional-order">Query + * Current UM Open Conditional Order (USER_DATA) Documentation */ public ApiResponse queryCurrentUmOpenConditionalOrder( @@ -2843,12 +2813,12 @@ public ApiResponse queryCurrentUmOpenAlgoOr } /** - * Query Current UM Open Order(USER_DATA) Query current UM open order * Either - * `orderId` or `origClientOrderId` must be sent. * If the queried order has - * been filled or cancelled, the error message \"Order does not exist\" will be - * returned. Weight: 1 + * Query Current UM Open Order (USER_DATA) Query current UM open order Weight(IP): 1 Security + * Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be + * sent. - If the queried order has been filled or cancelled, the error message \"Order + * does not exist\" will be returned. * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) * @param recvWindow (optional) @@ -2863,8 +2833,8 @@ public ApiResponse queryCurrentUmOpenAlgoOr * * * @see Query - * Current UM Open Order(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-um-open-order">Query + * Current UM Open Order (USER_DATA) Documentation */ public ApiResponse queryCurrentUmOpenOrder( String symbol, Long orderId, String origClientOrderId, Long recvWindow) @@ -2873,12 +2843,15 @@ public ApiResponse queryCurrentUmOpenOrder( } /** - * Query Margin Account Order (USER_DATA) Query Margin Account Order Weight: 10 + * Query Margin Account Order (USER_DATA) Query Margin Account Order Weight(IP): 10 Security + * Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be + * sent. - For some historical orders, `cummulativeQuoteQty < 0` means the data is + * unavailable at this time. * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) - * @param recvWindow (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return ApiResponse<QueryMarginAccountOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2890,7 +2863,7 @@ public ApiResponse queryCurrentUmOpenOrder( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-margin-account-order">Query * Margin Account Order (USER_DATA) Documentation */ public ApiResponse queryMarginAccountOrder( @@ -2901,13 +2874,13 @@ public ApiResponse queryMarginAccountOrder( /** * Query Margin Account's all OCO (USER_DATA) Query all OCO for a specific margin account - * based on provided optional parameters Weight: 100 + * based on provided optional parameters Weight(IP): 100 Security Type: USER_DATA * - * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) + * @param fromId Trade ID to fetch from. (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) - * @param recvWindow (optional) + * @param limit Number of results returned. (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return ApiResponse<QueryMarginAccountsAllOcoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2919,7 +2892,7 @@ public ApiResponse queryMarginAccountOrder( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-margin-accounts-all-oco">Query * Margin Account's all OCO (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsAllOco( @@ -2930,12 +2903,13 @@ public ApiResponse queryMarginAccountsAllOco( /** * Query Margin Account's OCO (USER_DATA) Retrieves a specific OCO based on provided - * optional parameters Weight: 5 + * optional parameters Weight(IP): 5 Security Type: USER_DATA * * @param orderListId Either `orderListId` or `listClientOrderId` must be * provided (optional) - * @param origClientOrderId (optional) - * @param recvWindow (optional) + * @param origClientOrderId `orderListId` or `listClientOrderId` must be + * provided. (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return ApiResponse<QueryMarginAccountsOcoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2947,7 +2921,7 @@ public ApiResponse queryMarginAccountsAllOco( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-margin-accounts-oco">Query * Margin Account's OCO (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsOco( @@ -2956,9 +2930,10 @@ public ApiResponse queryMarginAccountsOco( } /** - * Query Margin Account's Open OCO (USER_DATA) Query Margin Account's Open OCO Weight: 5 + * Query Margin Account's Open OCO (USER_DATA) Query Margin Account's Open OCO + * Weight(IP): 5 Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return ApiResponse<QueryMarginAccountsOpenOcoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2970,7 +2945,7 @@ public ApiResponse queryMarginAccountsOco( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-margin-accounts-open-oco">Query * Margin Account's Open OCO (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsOpenOco( @@ -2979,16 +2954,16 @@ public ApiResponse queryMarginAccountsOpenOc } /** - * Query UM Algo Order History (USER_DATA) Get all algo orders; ACTIVE, CANCELED, TRIGGERED or - * FINISHED . * If `algoId` is set, it will get orders >= that - * `algoId`. Otherwise most recent orders are returned. * The query time period must - * be less then 7 days( default as the recent 7 days). Weight: 5 + * Query UM Algo Order History (USER_DATA) Get all algo orders: ACTIVE, CANCELED, TRIGGERED or + * FINISHED. Weight(IP): 5 Security Type: USER_DATA Notes: - If `algoId` is set, it + * will get orders >= that `algoId`. Otherwise most recent orders are + * returned. - The query time period must be less than 7 days (default as the recent 7 days). * * @param symbol (required) - * @param algoId (optional) - * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param algoId Only return orders >= this algoId (optional) + * @param startTime (optional) + * @param endTime (optional) + * @param limit Default 500; max 1000 (optional) * @param recvWindow (optional) * @return ApiResponse<QueryUmAlgoOrderHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2997,11 +2972,11 @@ public ApiResponse queryMarginAccountsOpenOc * * * - * + * *
Response Details
Status Code Description Response Headers
200 UM Algo Order History -
200 Query UM Algo Order History -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-um-algo-order-history">Query * UM Algo Order History (USER_DATA) Documentation */ public ApiResponse queryUmAlgoOrderHistory( @@ -3012,13 +2987,14 @@ public ApiResponse queryUmAlgoOrderHistory( } /** - * Query UM Conditional Order History Query UM Conditional Order History * Either - * `strategyId` or `newClientStrategyId` must be sent. * `NEW` - * orders will not be found. * These orders will not be found: * order status is - * `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** * - * created time + 7 days < current time Weight: 1 + * Query UM Conditional Order History (USER_DATA) Query UM Conditional Order History Weight(IP): + * 1 Security Type: USER_DATA Notes: - Either `strategyId` or + * `newClientStrategyId` must be sent. - `NEW` orders will not be found. - + * These orders will not be found: - order status is `CANCELED` or + * `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 7 days + * < current time * - * @param symbol (required) + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -3032,10 +3008,9 @@ public ApiResponse queryUmAlgoOrderHistory( * 200 UM Conditional Order History - * * - * @deprecated * @see Query - * UM Conditional Order History Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-um-conditional-order-history">Query + * UM Conditional Order History (USER_DATA) Documentation */ public ApiResponse queryUmConditionalOrderHistory( String symbol, Long strategyId, String newClientStrategyId, Long recvWindow) @@ -3045,16 +3020,16 @@ public ApiResponse queryUmConditionalOrd } /** - * Query UM Modify Order History(TRADE) Get order modification history * Either - * `orderId` or `origClientOrderId` must be sent, and the - * `orderId` will prevail if both are sent. Weight: 1 + * Query UM Modify Order History (TRADE) Get order modification history Weight(IP): 1 Security + * Type: TRADE Notes: - Either `orderId` or `origClientOrderId` must be + * sent, and the `orderId` will prevail if both are sent. * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryUmModifyOrderHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -3067,8 +3042,8 @@ public ApiResponse queryUmConditionalOrd * * * @see Query - * UM Modify Order History(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-um-modify-order-history">Query + * UM Modify Order History (TRADE) Documentation */ public ApiResponse queryUmModifyOrderHistory( String symbol, @@ -3084,12 +3059,13 @@ public ApiResponse queryUmModifyOrderHistory( } /** - * Query UM Order (USER_DATA) Check an UM order's status. * These orders will not be found: - * * Either `orderId` or `origClientOrderId` must be sent. * order status is - * `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** * - * created time + 3 days < current time Weight: 1 + * Query UM Order (USER_DATA) Check an UM order's status. Weight(IP): 1 Security Type: + * USER_DATA Notes: - These orders will not be found: - Either `orderId` or + * `origClientOrderId` must be sent. - order status is `CANCELED` or + * `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 3 days + * < current time * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) * @param recvWindow (optional) @@ -3104,7 +3080,7 @@ public ApiResponse queryUmModifyOrderHistory( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-um-order">Query * UM Order (USER_DATA) Documentation */ public ApiResponse queryUmOrder( @@ -3114,19 +3090,19 @@ public ApiResponse queryUmOrder( } /** - * Query User's CM Force Orders(USER_DATA) Query User's CM Force Orders * If - * \"autoCloseType\" is not sent, orders with both of the types will be returned * If + * Query User's CM Force Orders (USER_DATA) Query User's CM Force Orders Weight: - 20 + * with `symbol` - 50 without `symbol` Security Type: USER_DATA Notes: - If + * \"autoCloseType\" is not sent, orders with both of the types will be returned - If * \"startTime\" is not sent, data within 7 days before \"endTime\" can be - * queried * Only support querying data in the past 90 days Weight: 20 with symbol, 50 without - * symbol + * queried * * @param symbol (optional) * @param autoCloseType `LIQUIDATION` for liquidation orders, `ADL` for ADL * orders. (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) - * @param recvWindow (optional) + * @param limit Number of results returned. (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return ApiResponse<QueryUsersCmForceOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3138,8 +3114,8 @@ public ApiResponse queryUmOrder( * * * @see Query - * User's CM Force Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-users-cm-force-orders">Query + * User's CM Force Orders (USER_DATA) Documentation */ public ApiResponse queryUsersCmForceOrders( String symbol, @@ -3154,14 +3130,14 @@ public ApiResponse queryUsersCmForceOrders( } /** - * Query User's Margin Force Orders(USER_DATA) Query user's margin force orders Weight: - * 1 + * Query User's Margin Force Orders (USER_DATA) Query user's margin force orders + * Weight(IP): 1 Security Type: USER_DATA * * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param recvWindow (optional) + * @param current Current page number. (optional) + * @param size Number of results returned. (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return ApiResponse<QueryUsersMarginForceOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3173,8 +3149,8 @@ public ApiResponse queryUsersCmForceOrders( * * * @see Query - * User's Margin Force Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-users-margin-force-orders">Query + * User's Margin Force Orders (USER_DATA) Documentation */ public ApiResponse queryUsersMarginForceOrders( Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -3183,19 +3159,19 @@ public ApiResponse queryUsersMarginForceOrd } /** - * Query User's UM Force Orders (USER_DATA) Query User's UM Force Orders * If - * `autoCloseType` is not sent, orders with both of the types will be returned * If + * Query User's UM Force Orders (USER_DATA) Query User's UM Force Orders Weight: - 20 + * with `symbol` - 50 without `symbol` Security Type: USER_DATA Notes: - If + * `autoCloseType` is not sent, orders with both of the types will be returned - If * `startTime` is not sent, data within 7 days before `endTime` can be - * queried * Only support querying data in the past 90 days Weight: 20 with symbol, 50 without - * symbol + * queried * * @param symbol (optional) * @param autoCloseType `LIQUIDATION` for liquidation orders, `ADL` for ADL * orders. (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) - * @param recvWindow (optional) + * @param limit Number of results returned. (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return ApiResponse<QueryUsersUmForceOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3207,7 +3183,7 @@ public ApiResponse queryUsersMarginForceOrd * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-users-um-force-orders">Query * User's UM Force Orders (USER_DATA) Documentation */ public ApiResponse queryUsersUmForceOrders( @@ -3224,8 +3200,9 @@ public ApiResponse queryUsersUmForceOrders( /** * Toggle BNB Burn On UM Futures Trade (TRADE) Change user's BNB Fee Discount for UM Futures - * (Fee Discount On or Fee Discount Off ) on ***EVERY symbol*** * The BNB would not be collected - * from UM-PM account to the Portfolio Margin account. Weight: 1 + * (Fee Discount On or Fee Discount Off ) on ***EVERY symbol*** Weight(IP): 1 Security Type: + * TRADE Notes: - The BNB would not be collected from UM-PM account to the Portfolio Margin + * account. * * @param toggleBnbBurnOnUmFuturesTradeRequest (required) * @return ApiResponse<ToggleBnbBurnOnUmFuturesTradeResponse> @@ -3239,7 +3216,7 @@ public ApiResponse queryUsersUmForceOrders( * * * @see Toggle + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#toggle-bnb-burn-on-um-futures-trade">Toggle * BNB Burn On UM Futures Trade (TRADE) Documentation */ public ApiResponse toggleBnbBurnOnUmFuturesTrade( @@ -3249,17 +3226,18 @@ public ApiResponse toggleBnbBurnOnUmFutur } /** - * UM Account Trade List(USER_DATA) Get trades for a specific account and UM symbol. * If - * `startTime` and `endTime` are both not sent, then the last '7 - * days' data will be returned. * The time between `startTime` and - * `endTime` cannot be longer than 7 days. * The parameter `fromId` cannot - * be sent with `startTime` or `endTime`. Weight: 5 + * UM Account Trade List (USER_DATA) Get trades for a specific account and UM symbol. + * Weight(IP): 5 Security Type: USER_DATA Notes: - If `startTime` and + * `endTime` are both not sent, then the last '7 days' data will be returned. + * - The time between `startTime` and `endTime` cannot be longer than 7 + * days. - The parameter `fromId` cannot be sent with `startTime` or + * `endTime`. * - * @param symbol (required) + * @param symbol Symbol (required) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) - * @param limit Default 100; max 1000 (optional) + * @param fromId Trade ID to fetch from. (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<UmAccountTradeListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -3272,8 +3250,8 @@ public ApiResponse toggleBnbBurnOnUmFutur * * * @see UM - * Account Trade List(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#um-account-trade-list">UM + * Account Trade List (USER_DATA) Documentation */ public ApiResponse umAccountTradeList( String symbol, Long startTime, Long endTime, Long fromId, Long limit, Long recvWindow) @@ -3282,7 +3260,7 @@ public ApiResponse umAccountTradeList( } /** - * UM Position ADL Quantile Estimation(USER_DATA) Query UM Position ADL Quantile Estimation * + * UM Position ADL Quantile Estimation (USER_DATA) Query UM Position ADL Quantile Estimation * * Values update every 30s. * Values 0, 1, 2, 3, 4 shows the queue position and possibility of * ADL from low to high. * For positions of the symbol are in One-way Mode or isolated margined * in Hedge Mode, \"LONG\", \"SHORT\", and \"BOTH\" will be @@ -3290,7 +3268,8 @@ public ApiResponse umAccountTradeList( * positions of the symbol are crossed margined in Hedge Mode: * \"HEDGE\" as a sign * will be returned instead of \"BOTH\"; * A same value caculated on unrealized pnls * on long and short sides' positions will be shown for \"LONG\" and - * \"SHORT\" when there are positions in both of long and short sides. Weight: 5 + * \"SHORT\" when there are positions in both of long and short sides. Weight(IP): 5 + * Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -3305,8 +3284,8 @@ public ApiResponse umAccountTradeList( * * * @see UM - * Position ADL Quantile Estimation(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#um-position-adl-quantile-estimation">UM + * Position ADL Quantile Estimation (USER_DATA) Documentation */ public ApiResponse umPositionAdlQuantileEstimation( String symbol, Long recvWindow) throws ApiException { @@ -3314,7 +3293,8 @@ public ApiResponse umPositionAdlQuantil } /** - * Close User Data Stream(USER_STREAM) Close out a user data stream. Weight: 1 + * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight(IP): 1 Security + * Type: USER_STREAM * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -3327,8 +3307,8 @@ public ApiResponse umPositionAdlQuantil * * * @see Close - * User Data Stream(USER_STREAM) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/user-data-streams#close-user-data-stream">Close + * User Data Stream (USER_STREAM) Documentation */ public void closeUserDataStream() throws ApiException { userDataStreamsApi.closeUserDataStream(); @@ -3337,7 +3317,7 @@ public void closeUserDataStream() throws ApiException { /** * Keepalive User Data Stream (USER_STREAM) Keepalive a user data stream to prevent a time out. * User data streams will close after 60 minutes. It's recommended to send a ping about - * every 60 minutes. Weight: 1 + * every 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -3350,7 +3330,7 @@ public void closeUserDataStream() throws ApiException { * * * @see Keepalive + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/user-data-streams#keepalive-user-data-stream">Keepalive * User Data Stream (USER_STREAM) Documentation */ public void keepaliveUserDataStream() throws ApiException { @@ -3358,10 +3338,10 @@ public void keepaliveUserDataStream() throws ApiException { } /** - * Start User Data Stream(USER_STREAM) Start a new user data stream. The stream will close after - * 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, - * that `listenKey` will be returned and its validity will be extended for 60 minutes. - * Weight: 1 + * Start User Data Stream (USER_STREAM) Start a new user data stream. The stream will close + * after 60 minutes unless a keepalive is sent. If the account has an active + * `listenKey`, that `listenKey` will be returned and its validity will be + * extended for 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * * @return ApiResponse<StartUserDataStreamResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -3374,8 +3354,8 @@ public void keepaliveUserDataStream() throws ApiException { * * * @see Start - * User Data Stream(USER_STREAM) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/user-data-streams#start-user-data-stream">Start + * User Data Stream (USER_STREAM) Documentation */ public ApiResponse startUserDataStream() throws ApiException { return userDataStreamsApi.startUserDataStream(); diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/MarketDataApi.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/MarketDataApi.java index ae2175602..e3ebaea07 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/MarketDataApi.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/MarketDataApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-portfolio-margin/6.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-portfolio-margin/7.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -90,7 +90,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Test + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/market-data#test-connectivity">Test * Connectivity Documentation */ private okhttp3.Call testConnectivityCall() throws ApiException { @@ -178,7 +178,7 @@ private okhttp3.Call testConnectivityValidateBeforeCall() throws ApiException { } /** - * Test Connectivity Test connectivity to the Rest API. Weight: 1 + * Test Connectivity Test connectivity to the Rest API. Weight(IP): 1 * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -191,7 +191,7 @@ private okhttp3.Call testConnectivityValidateBeforeCall() throws ApiException { * * * @see Test + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/market-data#test-connectivity">Test * Connectivity Documentation */ public ApiResponse testConnectivity() throws ApiException { diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/TradeApi.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/TradeApi.java index 3f1ce669b..08830e170 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/TradeApi.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/TradeApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -121,7 +121,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-portfolio-margin/6.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-portfolio-margin/7.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -161,7 +161,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for cancelAllCmOpenConditionalOrders * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -173,8 +173,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Cancel - * All CM Open Conditional Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-cm-open-conditional-orders">Cancel + * All CM Open Conditional Orders (TRADE) Documentation */ private okhttp3.Call cancelAllCmOpenConditionalOrdersCall(String symbol, Long recvWindow) throws ApiException { @@ -275,9 +275,10 @@ private okhttp3.Call cancelAllCmOpenConditionalOrdersValidateBeforeCall( } /** - * Cancel All CM Open Conditional Orders(TRADE) Cancel All CM Open Conditional Orders Weight: 1 + * Cancel All CM Open Conditional Orders (TRADE) Cancel All CM Open Conditional Orders + * Weight(IP): 1 Security Type: TRADE * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<CancelAllCmOpenConditionalOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -290,8 +291,8 @@ private okhttp3.Call cancelAllCmOpenConditionalOrdersValidateBeforeCall( * * * @see Cancel - * All CM Open Conditional Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-cm-open-conditional-orders">Cancel + * All CM Open Conditional Orders (TRADE) Documentation */ public ApiResponse cancelAllCmOpenConditionalOrders( @NotNull String symbol, Long recvWindow) throws ApiException { @@ -305,7 +306,7 @@ public ApiResponse cancelAllCmOpenCond /** * Build call for cancelAllCmOpenOrders * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -317,8 +318,8 @@ public ApiResponse cancelAllCmOpenCond * * * @see Cancel - * All CM Open Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-cm-open-orders">Cancel + * All CM Open Orders (TRADE) Documentation */ private okhttp3.Call cancelAllCmOpenOrdersCall(String symbol, Long recvWindow) throws ApiException { @@ -417,9 +418,10 @@ private okhttp3.Call cancelAllCmOpenOrdersValidateBeforeCall(String symbol, Long } /** - * Cancel All CM Open Orders(TRADE) Cancel all active LIMIT orders on specific symbol Weight: 1 + * Cancel All CM Open Orders (TRADE) Cancel all active LIMIT orders on specific symbol + * Weight(IP): 1 Security Type: TRADE * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<CancelAllCmOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -432,8 +434,8 @@ private okhttp3.Call cancelAllCmOpenOrdersValidateBeforeCall(String symbol, Long * * * @see Cancel - * All CM Open Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-cm-open-orders">Cancel + * All CM Open Orders (TRADE) Documentation */ public ApiResponse cancelAllCmOpenOrders( @NotNull String symbol, Long recvWindow) throws ApiException { @@ -446,7 +448,7 @@ public ApiResponse cancelAllCmOpenOrders( /** * Build call for cancelAllUmAlgoOpenOrders * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -458,7 +460,7 @@ public ApiResponse cancelAllCmOpenOrders( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-um-algo-open-orders">Cancel * All UM Algo Open Orders (TRADE) Documentation */ private okhttp3.Call cancelAllUmAlgoOpenOrdersCall(String symbol, Long recvWindow) @@ -559,9 +561,10 @@ private okhttp3.Call cancelAllUmAlgoOpenOrdersValidateBeforeCall(String symbol, } /** - * Cancel All UM Algo Open Orders (TRADE) Cancel All UM Algo Open Orders Weight: 1 + * Cancel All UM Algo Open Orders (TRADE) Cancel All UM Algo Open Orders Weight(IP): 1 Security + * Type: TRADE * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<CancelAllUmAlgoOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -574,11 +577,11 @@ private okhttp3.Call cancelAllUmAlgoOpenOrdersValidateBeforeCall(String symbol, * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-um-algo-open-orders">Cancel * All UM Algo Open Orders (TRADE) Documentation */ public ApiResponse cancelAllUmAlgoOpenOrders( - @NotNull String symbol, Long recvWindow) throws ApiException { + @NotNull String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = cancelAllUmAlgoOpenOrdersValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -588,7 +591,7 @@ public ApiResponse cancelAllUmAlgoOpenOrders( /** * Build call for cancelAllUmOpenConditionalOrders * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -599,12 +602,10 @@ public ApiResponse cancelAllUmAlgoOpenOrders( * 200 Cancel All UM Open Conditional Orders - * * - * @deprecated * @see Cancel - * All UM Open Conditional Orders Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-um-open-conditional-orders">Cancel + * All UM Open Conditional Orders (TRADE) Documentation */ - @Deprecated private okhttp3.Call cancelAllUmOpenConditionalOrdersCall(String symbol, Long recvWindow) throws ApiException { String basePath = null; @@ -669,7 +670,6 @@ private okhttp3.Call cancelAllUmOpenConditionalOrdersCall(String symbol, Long re localVarAuthNames); } - @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call cancelAllUmOpenConditionalOrdersValidateBeforeCall( String symbol, Long recvWindow) throws ApiException { @@ -705,9 +705,10 @@ private okhttp3.Call cancelAllUmOpenConditionalOrdersValidateBeforeCall( } /** - * Cancel All UM Open Conditional Orders Cancel All UM Open Conditional Orders Weight: 1 + * Cancel All UM Open Conditional Orders (TRADE) Cancel All UM Open Conditional Orders + * Weight(IP): 1 Security Type: TRADE * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<CancelAllUmOpenConditionalOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -719,12 +720,10 @@ private okhttp3.Call cancelAllUmOpenConditionalOrdersValidateBeforeCall( * 200 Cancel All UM Open Conditional Orders - * * - * @deprecated * @see Cancel - * All UM Open Conditional Orders Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-um-open-conditional-orders">Cancel + * All UM Open Conditional Orders (TRADE) Documentation */ - @Deprecated public ApiResponse cancelAllUmOpenConditionalOrders( @NotNull String symbol, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -737,7 +736,7 @@ public ApiResponse cancelAllUmOpenCond /** * Build call for cancelAllUmOpenOrders * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -749,8 +748,8 @@ public ApiResponse cancelAllUmOpenCond * * * @see Cancel - * All UM Open Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-um-open-orders">Cancel + * All UM Open Orders (TRADE) Documentation */ private okhttp3.Call cancelAllUmOpenOrdersCall(String symbol, Long recvWindow) throws ApiException { @@ -849,9 +848,10 @@ private okhttp3.Call cancelAllUmOpenOrdersValidateBeforeCall(String symbol, Long } /** - * Cancel All UM Open Orders(TRADE) Cancel all active LIMIT orders on specific symbol Weight: 1 + * Cancel All UM Open Orders (TRADE) Cancel all active LIMIT orders on specific symbol + * Weight(IP): 1 Security Type: TRADE * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<CancelAllUmOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -864,8 +864,8 @@ private okhttp3.Call cancelAllUmOpenOrdersValidateBeforeCall(String symbol, Long * * * @see Cancel - * All UM Open Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-um-open-orders">Cancel + * All UM Open Orders (TRADE) Documentation */ public ApiResponse cancelAllUmOpenOrders( @NotNull String symbol, Long recvWindow) throws ApiException { @@ -878,7 +878,7 @@ public ApiResponse cancelAllUmOpenOrders( /** * Build call for cancelCmConditionalOrder * - * @param symbol (required) + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -892,8 +892,8 @@ public ApiResponse cancelAllUmOpenOrders( * * * @see Cancel - * CM Conditional Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-cm-conditional-order">Cancel + * CM Conditional Order (TRADE) Documentation */ private okhttp3.Call cancelCmConditionalOrderCall( String symbol, Long strategyId, String newClientStrategyId, Long recvWindow) @@ -1010,10 +1010,10 @@ private okhttp3.Call cancelCmConditionalOrderValidateBeforeCall( } /** - * Cancel CM Conditional Order(TRADE) Cancel CM Conditional Order * Either - * `strategyId` or `newClientStrategyId` must be sent. Weight: 1 + * Cancel CM Conditional Order (TRADE) Cancel CM Conditional Order Weight(IP): 1 Security Type: + * TRADE Notes: - Either `strategyId` or `newClientStrategyId` must be sent. * - * @param symbol (required) + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -1028,8 +1028,8 @@ private okhttp3.Call cancelCmConditionalOrderValidateBeforeCall( * * * @see Cancel - * CM Conditional Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-cm-conditional-order">Cancel + * CM Conditional Order (TRADE) Documentation */ public ApiResponse cancelCmConditionalOrder( @NotNull String symbol, Long strategyId, String newClientStrategyId, Long recvWindow) @@ -1045,7 +1045,7 @@ public ApiResponse cancelCmConditionalOrder( /** * Build call for cancelCmOrder * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) * @param recvWindow (optional) @@ -1059,8 +1059,8 @@ public ApiResponse cancelCmConditionalOrder( * * * @see Cancel - * CM Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-cm-order">Cancel + * CM Order (TRADE) Documentation */ private okhttp3.Call cancelCmOrderCall( String symbol, Long orderId, String origClientOrderId, Long recvWindow) @@ -1176,10 +1176,10 @@ private okhttp3.Call cancelCmOrderValidateBeforeCall( } /** - * Cancel CM Order(TRADE) Cancel an active LIMIT order * Either `orderId` or - * `origClientOrderId` must be sent. Weight: 1 + * Cancel CM Order (TRADE) Cancel an active LIMIT order Weight(IP): 1 Security Type: TRADE + * Notes: - Either `orderId` or `origClientOrderId` must be sent. * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) * @param recvWindow (optional) @@ -1194,8 +1194,8 @@ private okhttp3.Call cancelCmOrderValidateBeforeCall( * * * @see Cancel - * CM Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-cm-order">Cancel + * CM Order (TRADE) Documentation */ public ApiResponse cancelCmOrder( @NotNull String symbol, Long orderId, String origClientOrderId, Long recvWindow) @@ -1210,7 +1210,7 @@ public ApiResponse cancelCmOrder( /** * Build call for cancelMarginAccountAllOpenOrdersOnASymbol * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1222,8 +1222,8 @@ public ApiResponse cancelCmOrder( * * * @see Cancel - * Margin Account All Open Orders on a Symbol(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-margin-account-all-open-orders-on-asymbol">Cancel + * Margin Account All Open Orders on a Symbol (TRADE) Documentation */ private okhttp3.Call cancelMarginAccountAllOpenOrdersOnASymbolCall( String symbol, Long recvWindow) throws ApiException { @@ -1326,10 +1326,10 @@ private okhttp3.Call cancelMarginAccountAllOpenOrdersOnASymbolValidateBeforeCall } /** - * Cancel Margin Account All Open Orders on a Symbol(TRADE) Cancel Margin Account All Open - * Orders on a Symbol Weight: 5 + * Cancel Margin Account All Open Orders on a Symbol (TRADE) Cancel Margin Account All Open + * Orders on a Symbol Weight(IP): 5 Security Type: TRADE * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<CancelMarginAccountAllOpenOrdersOnASymbolResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1342,12 +1342,12 @@ private okhttp3.Call cancelMarginAccountAllOpenOrdersOnASymbolValidateBeforeCall * * * @see Cancel - * Margin Account All Open Orders on a Symbol(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-margin-account-all-open-orders-on-asymbol">Cancel + * Margin Account All Open Orders on a Symbol (TRADE) Documentation */ public ApiResponse - cancelMarginAccountAllOpenOrdersOnASymbol(@NotNull String symbol, Long recvWindow) - throws ApiException { + cancelMarginAccountAllOpenOrdersOnASymbol( + @NotNull String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = cancelMarginAccountAllOpenOrdersOnASymbolValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1358,14 +1358,13 @@ private okhttp3.Call cancelMarginAccountAllOpenOrdersOnASymbolValidateBeforeCall /** * Build call for cancelMarginAccountOcoOrders * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderListId Either `orderListId` or `listClientOrderId` must be * provided (optional) * @param listClientOrderId Either `orderListId` or `listClientOrderId` must * be provided (optional) - * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by - * default (optional) - * @param recvWindow (optional) + * @param newClientOrderId Used to uniquely identify this cancel request. (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1376,8 +1375,8 @@ private okhttp3.Call cancelMarginAccountAllOpenOrdersOnASymbolValidateBeforeCall * * * @see Cancel - * Margin Account OCO Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-margin-account-oco-orders">Cancel + * Margin Account OCO Orders (TRADE) Documentation */ private okhttp3.Call cancelMarginAccountOcoOrdersCall( String symbol, @@ -1511,17 +1510,17 @@ private okhttp3.Call cancelMarginAccountOcoOrdersValidateBeforeCall( } /** - * Cancel Margin Account OCO Orders(TRADE) Cancel Margin Account OCO Orders * Additional notes: - * Canceling an individual leg will cancel the entire OCO Weight: 2 + * Cancel Margin Account OCO Orders (TRADE) Cancel Margin Account OCO Orders Weight(IP): 2 + * Security Type: TRADE Notes: - Additional notes: Canceling an individual leg will cancel the + * entire OCO * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderListId Either `orderListId` or `listClientOrderId` must be * provided (optional) * @param listClientOrderId Either `orderListId` or `listClientOrderId` must * be provided (optional) - * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by - * default (optional) - * @param recvWindow (optional) + * @param newClientOrderId Used to uniquely identify this cancel request. (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return ApiResponse<CancelMarginAccountOcoOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1533,8 +1532,8 @@ private okhttp3.Call cancelMarginAccountOcoOrdersValidateBeforeCall( * * * @see Cancel - * Margin Account OCO Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-margin-account-oco-orders">Cancel + * Margin Account OCO Orders (TRADE) Documentation */ public ApiResponse cancelMarginAccountOcoOrders( @NotNull String symbol, @@ -1554,12 +1553,11 @@ public ApiResponse cancelMarginAccountOcoO /** * Build call for cancelMarginAccountOrder * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) - * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by - * default (optional) - * @param recvWindow (optional) + * @param newClientOrderId Used to uniquely identify this cancel request. (optional) + * @param recvWindow The value cannot be greater than `60000` (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1570,8 +1568,8 @@ public ApiResponse cancelMarginAccountOcoO * * * @see Cancel - * Margin Account Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-margin-account-order">Cancel + * Margin Account Order (TRADE) Documentation */ private okhttp3.Call cancelMarginAccountOrderCall( String symbol, @@ -1704,15 +1702,14 @@ private okhttp3.Call cancelMarginAccountOrderValidateBeforeCall( } /** - * Cancel Margin Account Order(TRADE) Cancel Margin Account Order * Either `orderId` - * or `origClientOrderId` must be sent. Weight: 2 + * Cancel Margin Account Order (TRADE) Cancel Margin Account Order Weight(IP): 2 Security Type: + * TRADE Notes: - Either `orderId` or `origClientOrderId` must be sent. * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) - * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by - * default (optional) - * @param recvWindow (optional) + * @param newClientOrderId Used to uniquely identify this cancel request. (optional) + * @param recvWindow The value cannot be greater than `60000` (optional) * @return ApiResponse<CancelMarginAccountOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1724,8 +1721,8 @@ private okhttp3.Call cancelMarginAccountOrderValidateBeforeCall( * * * @see Cancel - * Margin Account Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-margin-account-order">Cancel + * Margin Account Order (TRADE) Documentation */ public ApiResponse cancelMarginAccountOrder( @NotNull String symbol, @@ -1745,8 +1742,8 @@ public ApiResponse cancelMarginAccountOrder( /** * Build call for cancelUmAlgoOrder * - * @param algoId (optional) - * @param clientAlgoId (optional) + * @param algoId Algo order ID (optional) + * @param clientAlgoId Client algo order ID (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1758,7 +1755,7 @@ public ApiResponse cancelMarginAccountOrder( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-um-algo-order">Cancel * UM Algo Order (TRADE) Documentation */ private okhttp3.Call cancelUmAlgoOrderCall(Long algoId, String clientAlgoId, Long recvWindow) @@ -1864,11 +1861,11 @@ private okhttp3.Call cancelUmAlgoOrderValidateBeforeCall( } /** - * Cancel UM Algo Order (TRADE) Cancel an active UM algo order. * Either `algoId` or - * `clientAlgoId` must be sent. Weight: 1 + * Cancel UM Algo Order (TRADE) Cancel an active UM algo order Weight(IP): 1 Security Type: + * TRADE Notes: - Either `algoId` or `clientAlgoId` must be sent. * - * @param algoId (optional) - * @param clientAlgoId (optional) + * @param algoId Algo order ID (optional) + * @param clientAlgoId Client algo order ID (optional) * @param recvWindow (optional) * @return ApiResponse<CancelUmAlgoOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1881,11 +1878,11 @@ private okhttp3.Call cancelUmAlgoOrderValidateBeforeCall( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-um-algo-order">Cancel * UM Algo Order (TRADE) Documentation */ public ApiResponse cancelUmAlgoOrder( - Long algoId, String clientAlgoId, Long recvWindow) throws ApiException { + Long algoId, String clientAlgoId, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = cancelUmAlgoOrderValidateBeforeCall(algoId, clientAlgoId, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1896,7 +1893,7 @@ public ApiResponse cancelUmAlgoOrder( /** * Build call for cancelUmConditionalOrder * - * @param symbol (required) + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -1909,12 +1906,10 @@ public ApiResponse cancelUmAlgoOrder( * 200 Cancel UM Conditional Order - * * - * @deprecated * @see Cancel - * UM Conditional Order Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-um-conditional-order">Cancel + * UM Conditional Order (TRADE) Documentation */ - @Deprecated private okhttp3.Call cancelUmConditionalOrderCall( String symbol, Long strategyId, String newClientStrategyId, Long recvWindow) throws ApiException { @@ -1989,7 +1984,6 @@ private okhttp3.Call cancelUmConditionalOrderCall( localVarAuthNames); } - @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call cancelUmConditionalOrderValidateBeforeCall( String symbol, Long strategyId, String newClientStrategyId, Long recvWindow) @@ -2031,10 +2025,10 @@ private okhttp3.Call cancelUmConditionalOrderValidateBeforeCall( } /** - * Cancel UM Conditional Order Cancel UM Conditional Order * Either `strategyId` or - * `newClientStrategyId` must be sent. Weight: 1 + * Cancel UM Conditional Order (TRADE) Cancel UM Conditional Order Weight(IP): 1 Security Type: + * TRADE Notes: - Either `strategyId` or `newClientStrategyId` must be sent. * - * @param symbol (required) + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -2048,12 +2042,10 @@ private okhttp3.Call cancelUmConditionalOrderValidateBeforeCall( * 200 Cancel UM Conditional Order - * * - * @deprecated * @see Cancel - * UM Conditional Order Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-um-conditional-order">Cancel + * UM Conditional Order (TRADE) Documentation */ - @Deprecated public ApiResponse cancelUmConditionalOrder( @NotNull String symbol, Long strategyId, String newClientStrategyId, Long recvWindow) throws ApiException { @@ -2068,7 +2060,7 @@ public ApiResponse cancelUmConditionalOrder( /** * Build call for cancelUmOrder * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) * @param recvWindow (optional) @@ -2082,8 +2074,8 @@ public ApiResponse cancelUmConditionalOrder( * * * @see Cancel - * UM Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-um-order">Cancel + * UM Order (TRADE) Documentation */ private okhttp3.Call cancelUmOrderCall( String symbol, Long orderId, String origClientOrderId, Long recvWindow) @@ -2199,10 +2191,10 @@ private okhttp3.Call cancelUmOrderValidateBeforeCall( } /** - * Cancel UM Order(TRADE) Cancel an active UM LIMIT order * Either `orderId` or - * `origClientOrderId` must be sent. Weight: 1 + * Cancel UM Order (TRADE) Cancel an active UM LIMIT order Weight(IP): 1 Security Type: TRADE + * Notes: - Either `orderId` or `origClientOrderId` must be sent. * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) * @param recvWindow (optional) @@ -2217,8 +2209,8 @@ private okhttp3.Call cancelUmOrderValidateBeforeCall( * * * @see Cancel - * UM Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-um-order">Cancel + * UM Order (TRADE) Documentation */ public ApiResponse cancelUmOrder( @NotNull String symbol, Long orderId, String origClientOrderId, Long recvWindow) @@ -2237,8 +2229,8 @@ public ApiResponse cancelUmOrder( * @param pair (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) - * @param limit Default 100; max 1000 (optional) + * @param fromId Trade ID to fetch from. (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2250,8 +2242,8 @@ public ApiResponse cancelUmOrder( * * * @see CM - * Account Trade List(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cm-account-trade-list">CM + * Account Trade List (USER_DATA) Documentation */ private okhttp3.Call cmAccountTradeListCall( String symbol, @@ -2396,22 +2388,23 @@ private okhttp3.Call cmAccountTradeListValidateBeforeCall( } /** - * CM Account Trade List(USER_DATA) Get trades for a specific account and CM symbol. * Either - * `symbol` or `pair` must be sent * `symbol` and `pair` - * cannot be sent together * `pair` and `fromId` cannot be sent together * - * `OrderId` can only be sent together with symbol * If a `pair` is sent, - * tickers for all symbols of the `pair` will be returned * The parameter - * `fromId` cannot be sent with `startTime` or `endTime` * If - * `startTime` and `endTime` are both not sent, then the last '24 - * hours' data will be returned. * The time between `startTime` and - * `endTime` cannot be longer than 24 hours. Weight: 20 with symbol, 40 with pair + * CM Account Trade List (USER_DATA) Get trades for a specific account and CM symbol. Weight: - + * 20 with `symbol` - 40 with `pair` Security Type: USER_DATA Notes: - + * Either `symbol` or `pair` must be sent - `symbol` and + * `pair` cannot be sent together - `pair` and `fromId` cannot be + * sent together - `OrderId` can only be sent together with symbol - If a + * `pair` is sent, tickers for all symbols of the `pair` will be returned - + * The parameter `fromId` cannot be sent with `startTime` or + * `endTime` - If `startTime` and `endTime` are both not sent, + * then the last '24 hours' data will be returned. - The time between + * `startTime` and `endTime` cannot be longer than 24 hours. * * @param symbol (optional) * @param pair (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) - * @param limit Default 100; max 1000 (optional) + * @param fromId Trade ID to fetch from. (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<CmAccountTradeListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2424,8 +2417,8 @@ private okhttp3.Call cmAccountTradeListValidateBeforeCall( * * * @see CM - * Account Trade List(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cm-account-trade-list">CM + * Account Trade List (USER_DATA) Documentation */ public ApiResponse cmAccountTradeList( String symbol, @@ -2433,7 +2426,7 @@ public ApiResponse cmAccountTradeList( Long startTime, Long endTime, Long fromId, - Long limit, + @Max(1000L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -2459,8 +2452,8 @@ public ApiResponse cmAccountTradeList( * * * @see CM - * Position ADL Quantile Estimation(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cm-position-adl-quantile-estimation">CM + * Position ADL Quantile Estimation (USER_DATA) Documentation */ private okhttp3.Call cmPositionAdlQuantileEstimationCall(String symbol, Long recvWindow) throws ApiException { @@ -2560,7 +2553,7 @@ private okhttp3.Call cmPositionAdlQuantileEstimationValidateBeforeCall( } /** - * CM Position ADL Quantile Estimation(USER_DATA) Query CM Position ADL Quantile Estimation * + * CM Position ADL Quantile Estimation (USER_DATA) Query CM Position ADL Quantile Estimation * * Values update every 30s. * Values 0, 1, 2, 3, 4 shows the queue position and possibility of * ADL from low to high. * For positions of the symbol are in One-way Mode or isolated margined * in Hedge Mode, \"LONG\", \"SHORT\", and \"BOTH\" will be @@ -2568,7 +2561,8 @@ private okhttp3.Call cmPositionAdlQuantileEstimationValidateBeforeCall( * positions of the symbol are crossed margined in Hedge Mode: * \"HEDGE\" as a sign * will be returned instead of \"BOTH\"; * A same value caculated on unrealized pnls * on long and short sides' positions will be shown for \"LONG\" and - * \"SHORT\" when there are positions in both of long and short sides. Weight: 5 + * \"SHORT\" when there are positions in both of long and short sides. Weight(IP): 5 + * Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -2583,8 +2577,8 @@ private okhttp3.Call cmPositionAdlQuantileEstimationValidateBeforeCall( * * * @see CM - * Position ADL Quantile Estimation(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cm-position-adl-quantile-estimation">CM + * Position ADL Quantile Estimation (USER_DATA) Documentation */ public ApiResponse cmPositionAdlQuantileEstimation( String symbol, Long recvWindow) throws ApiException { @@ -2598,7 +2592,7 @@ public ApiResponse cmPositionAdlQuantil /** * Build call for futuresTradfiPerpsContract * - * @param futuresTradfiPerpsContractRequest (required) + * @param futuresTradfiPerpsContractRequest (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2609,8 +2603,8 @@ public ApiResponse cmPositionAdlQuantil * * * @see Futures - * TradFi Perps Contract(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#futures-tradfi-perps-contract">Futures + * TradFi Perps Contract (USER_DATA) Documentation */ private okhttp3.Call futuresTradfiPerpsContractCall( FuturesTradfiPerpsContractRequest futuresTradfiPerpsContractRequest) @@ -2710,9 +2704,10 @@ private okhttp3.Call futuresTradfiPerpsContractValidateBeforeCall( } /** - * Futures TradFi Perps Contract(USER_DATA) Sign TradFi-Perps agreement contract Weight: 5 + * Futures TradFi Perps Contract (USER_DATA) Sign TradFi-Perps agreement contract Weight(IP): 5 + * Security Type: USER_DATA * - * @param futuresTradfiPerpsContractRequest (required) + * @param futuresTradfiPerpsContractRequest (optional) * @return ApiResponse<FuturesTradfiPerpsContractResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2724,11 +2719,11 @@ private okhttp3.Call futuresTradfiPerpsContractValidateBeforeCall( * * * @see Futures - * TradFi Perps Contract(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#futures-tradfi-perps-contract">Futures + * TradFi Perps Contract (USER_DATA) Documentation */ public ApiResponse futuresTradfiPerpsContract( - @Valid @NotNull FuturesTradfiPerpsContractRequest futuresTradfiPerpsContractRequest) + @Valid FuturesTradfiPerpsContractRequest futuresTradfiPerpsContractRequest) throws ApiException { okhttp3.Call localVarCall = futuresTradfiPerpsContractValidateBeforeCall(futuresTradfiPerpsContractRequest); @@ -2751,7 +2746,7 @@ public ApiResponse futuresTradfiPerpsContrac * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#get-um-futures-bnb-burn-status">Get * UM Futures BNB Burn Status (USER_DATA) Documentation */ private okhttp3.Call getUmFuturesBnbBurnStatusCall(Long recvWindow) throws ApiException { @@ -2846,7 +2841,7 @@ private okhttp3.Call getUmFuturesBnbBurnStatusValidateBeforeCall(Long recvWindow /** * Get UM Futures BNB Burn Status (USER_DATA) Get user's BNB Fee Discount for UM Futures - * (Fee Discount On or Fee Discount Off ) Weight: 30 + * (Fee Discount On or Fee Discount Off ) Weight(IP): 30 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetUmFuturesBnbBurnStatusResponse> @@ -2860,7 +2855,7 @@ private okhttp3.Call getUmFuturesBnbBurnStatusValidateBeforeCall(Long recvWindow * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#get-um-futures-bnb-burn-status">Get * UM Futures BNB Burn Status (USER_DATA) Documentation */ public ApiResponse getUmFuturesBnbBurnStatus(Long recvWindow) @@ -2885,8 +2880,8 @@ public ApiResponse getUmFuturesBnbBurnStatus( * * * @see Margin - * Account Borrow(MARGIN) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-borrow">Margin + * Account Borrow (MARGIN) Documentation */ private okhttp3.Call marginAccountBorrowCall( MarginAccountBorrowRequest marginAccountBorrowRequest) throws ApiException { @@ -2992,7 +2987,7 @@ private okhttp3.Call marginAccountBorrowValidateBeforeCall( } /** - * Margin Account Borrow(MARGIN) Apply for a margin loan. Weight: 100 + * Margin Account Borrow (MARGIN) Apply for a margin loan. Weight(IP): 100 Security Type: MARGIN * * @param marginAccountBorrowRequest (required) * @return ApiResponse<MarginAccountBorrowResponse> @@ -3006,8 +3001,8 @@ private okhttp3.Call marginAccountBorrowValidateBeforeCall( * * * @see Margin - * Account Borrow(MARGIN) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-borrow">Margin + * Account Borrow (MARGIN) Documentation */ public ApiResponse marginAccountBorrow( @Valid @NotNull MarginAccountBorrowRequest marginAccountBorrowRequest) @@ -3033,8 +3028,8 @@ public ApiResponse marginAccountBorrow( * * * @see Margin - * Account New OCO(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-new-oco">Margin + * Account New OCO (TRADE) Documentation */ private okhttp3.Call marginAccountNewOcoCall( MarginAccountNewOcoRequest marginAccountNewOcoRequest) throws ApiException { @@ -3209,11 +3204,12 @@ private okhttp3.Call marginAccountNewOcoValidateBeforeCall( } /** - * Margin Account New OCO(TRADE) Send in a new OCO for a margin account * Price Restrictions: * - * `SELL`: Limit Price > Last Price > Stop Price * `BUY`: Limit Price - * < Last Price < Stop Price * Quantity Restrictions: * Both legs must have the same - * quantity * `ICEBERG` quantities however do not have to be the same. * Order Rate - * Limit * `OCO` counts as 2 orders against the order rate limit. Weight: 1 + * Margin Account New OCO (TRADE) Send in a new OCO for a margin account Weight(IP): 1 Security + * Type: TRADE Notes: - Other Info: - Price Restrictions: - `SELL`: Limit Price > + * Last Price > Stop Price - `BUY`: Limit Price * Quantity Restrictions: - Both + * legs must have the same quantity - `ICEBERG` quantities however do not have to be + * the same. - Order Rate Limit - `OCO` counts as 2 orders against the order rate + * limit. * * @param marginAccountNewOcoRequest (required) * @return ApiResponse<MarginAccountNewOcoResponse> @@ -3227,8 +3223,8 @@ private okhttp3.Call marginAccountNewOcoValidateBeforeCall( * * * @see Margin - * Account New OCO(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-new-oco">Margin + * Account New OCO (TRADE) Documentation */ public ApiResponse marginAccountNewOco( @Valid @NotNull MarginAccountNewOcoRequest marginAccountNewOcoRequest) @@ -3254,8 +3250,8 @@ public ApiResponse marginAccountNewOco( * * * @see Margin - * Account Repay(MARGIN) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-repay">Margin + * Account Repay (MARGIN) Documentation */ private okhttp3.Call marginAccountRepayCall(MarginAccountRepayRequest marginAccountRepayRequest) throws ApiException { @@ -3361,7 +3357,7 @@ private okhttp3.Call marginAccountRepayValidateBeforeCall( } /** - * Margin Account Repay(MARGIN) Repay for a margin loan. Weight: 100 + * Margin Account Repay (MARGIN) Repay for a margin loan. Weight(IP): 100 Security Type: MARGIN * * @param marginAccountRepayRequest (required) * @return ApiResponse<MarginAccountRepayResponse> @@ -3375,8 +3371,8 @@ private okhttp3.Call marginAccountRepayValidateBeforeCall( * * * @see Margin - * Account Repay(MARGIN) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-repay">Margin + * Account Repay (MARGIN) Documentation */ public ApiResponse marginAccountRepay( @Valid @NotNull MarginAccountRepayRequest marginAccountRepayRequest) @@ -3401,8 +3397,8 @@ public ApiResponse marginAccountRepay( * * * @see Margin - * Account Repay Debt(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-repay-debt">Margin + * Account Repay Debt (TRADE) Documentation */ private okhttp3.Call marginAccountRepayDebtCall( MarginAccountRepayDebtRequest marginAccountRepayDebtRequest) throws ApiException { @@ -3435,10 +3431,7 @@ private okhttp3.Call marginAccountRepayDebtCall( } if (marginAccountRepayDebtRequest.getAmount() != null) { - localVarFormParams.put( - "amount", - DecimalFormatter.getFormatter() - .format(marginAccountRepayDebtRequest.getAmount())); + localVarFormParams.put("amount", marginAccountRepayDebtRequest.getAmount()); } if (marginAccountRepayDebtRequest.getSpecifyRepayAssets() != null) { @@ -3515,13 +3508,13 @@ private okhttp3.Call marginAccountRepayDebtValidateBeforeCall( } /** - * Margin Account Repay Debt(TRADE) Repay debt for a margin loan. * The repay asset amount - * cannot exceed 50000 USD equivalent value for a single request. * If `amount` is not - * sent, all the asset loan will be repaid if having enough specific repay assets. * If - * `amount` is sent, only the certain amount of the asset loan will be repaid if - * having enough specific repay assets. * The system will use the same asset to repay the loan - * first (if have) no matter whether put the asset in `specifyRepayAssets` Weight: - * 3000 + * Margin Account Repay Debt (TRADE) Repay debt for a margin loan. Weight(IP): 3000 Security + * Type: TRADE Notes: - The repay asset amount cannot exceed 50000 USD equivalent value for a + * single request. - If `amount` is not sent, all the asset loan will be repaid if + * having enough specific repay assets. - If `amount` is sent, only the certain amount + * of the asset loan will be repaid if having enough specific repay assets. - The system will + * use the same asset to repay the loan first (if have) no matter whether put the asset in + * `specifyRepayAssets` * * @param marginAccountRepayDebtRequest (required) * @return ApiResponse<MarginAccountRepayDebtResponse> @@ -3535,8 +3528,8 @@ private okhttp3.Call marginAccountRepayDebtValidateBeforeCall( * * * @see Margin - * Account Repay Debt(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-repay-debt">Margin + * Account Repay Debt (TRADE) Documentation */ public ApiResponse marginAccountRepayDebt( @Valid @NotNull MarginAccountRepayDebtRequest marginAccountRepayDebtRequest) @@ -3551,13 +3544,13 @@ public ApiResponse marginAccountRepayDebt( /** * Build call for marginAccountTradeList * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) - * @param limit Default 100; max 1000 (optional) - * @param recvWindow (optional) + * @param fromId Trade ID to fetch from. (optional) + * @param limit Number of results returned. (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -3568,7 +3561,7 @@ public ApiResponse marginAccountRepayDebt( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-trade-list">Margin * Account Trade List (USER_DATA) Documentation */ private okhttp3.Call marginAccountTradeListCall( @@ -3714,15 +3707,18 @@ private okhttp3.Call marginAccountTradeListValidateBeforeCall( } /** - * Margin Account Trade List (USER_DATA) Margin Account Trade List Weight: 5 + * Margin Account Trade List (USER_DATA) Margin Account Trade List Weight(IP): 5 Security Type: + * USER_DATA Notes: - **Note:** * If `fromId` is set, returns orders with id + * >= `fromId`; otherwise returns recent order history. - The interval between + * `startTime` and `endTime` must be less than 24 hours. * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) - * @param limit Default 100; max 1000 (optional) - * @param recvWindow (optional) + * @param fromId Trade ID to fetch from. (optional) + * @param limit Number of results returned. (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return ApiResponse<MarginAccountTradeListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3734,7 +3730,7 @@ private okhttp3.Call marginAccountTradeListValidateBeforeCall( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#margin-account-trade-list">Margin * Account Trade List (USER_DATA) Documentation */ public ApiResponse marginAccountTradeList( @@ -3743,7 +3739,7 @@ public ApiResponse marginAccountTradeList( Long startTime, Long endTime, Long fromId, - Long limit, + @Max(1000L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -3768,8 +3764,8 @@ public ApiResponse marginAccountTradeList( * * * @see Modify - * CM Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#modify-cm-order">Modify + * CM Order (TRADE) Documentation */ private okhttp3.Call modifyCmOrderCall(ModifyCmOrderRequest modifyCmOrderRequest) throws ApiException { @@ -3830,6 +3826,10 @@ private okhttp3.Call modifyCmOrderCall(ModifyCmOrderRequest modifyCmOrderRequest localVarFormParams.put("priceMatch", modifyCmOrderRequest.getPriceMatch()); } + if (modifyCmOrderRequest.getModifyId() != null) { + localVarFormParams.put("modifyId", modifyCmOrderRequest.getModifyId()); + } + if (modifyCmOrderRequest.getRecvWindow() != null) { localVarFormParams.put("recvWindow", modifyCmOrderRequest.getRecvWindow()); } @@ -3896,16 +3896,16 @@ private okhttp3.Call modifyCmOrderValidateBeforeCall(ModifyCmOrderRequest modify } /** - * Modify CM Order(TRADE) Order modify function, currently only LIMIT order modification is - * supported, modified orders will be reordered in the match queue * Either `orderId` - * or `origClientOrderId` must be sent, and the `orderId` will prevail if - * both are sent. * Both `quantity` and `price` must be sent * When the new - * `quantity` or `price` doesn'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 `quantity` <= `executedQty` * - * When the order is `GTX` and the new price will cause it to be executed immediately - * Weight: 1 + * Modify CM Order (TRADE) Order modify function, currently only LIMIT order modification is + * supported, modified orders will be reordered in the match queue Weight(IP): 1 Security Type: + * TRADE Notes: - Either `orderId` or `origClientOrderId` must be sent, and + * the `orderId` will prevail if both are sent. - Both `quantity` and + * `price` must be sent - When the new `quantity` or `price` + * doesn'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 + * `quantity` * When the order is `GTX` and the new price will cause it to + * be executed immediately * * @param modifyCmOrderRequest (required) * @return ApiResponse<ModifyCmOrderResponse> @@ -3919,8 +3919,8 @@ private okhttp3.Call modifyCmOrderValidateBeforeCall(ModifyCmOrderRequest modify * * * @see Modify - * CM Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#modify-cm-order">Modify + * CM Order (TRADE) Documentation */ public ApiResponse modifyCmOrder( @Valid @NotNull ModifyCmOrderRequest modifyCmOrderRequest) throws ApiException { @@ -3944,8 +3944,8 @@ public ApiResponse modifyCmOrder( * * * @see Modify - * UM Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#modify-um-order">Modify + * UM Order (TRADE) Documentation */ private okhttp3.Call modifyUmOrderCall(ModifyUmOrderRequest modifyUmOrderRequest) throws ApiException { @@ -4006,6 +4006,10 @@ private okhttp3.Call modifyUmOrderCall(ModifyUmOrderRequest modifyUmOrderRequest localVarFormParams.put("priceMatch", modifyUmOrderRequest.getPriceMatch()); } + if (modifyUmOrderRequest.getModifyId() != null) { + localVarFormParams.put("modifyId", modifyUmOrderRequest.getModifyId()); + } + if (modifyUmOrderRequest.getRecvWindow() != null) { localVarFormParams.put("recvWindow", modifyUmOrderRequest.getRecvWindow()); } @@ -4072,14 +4076,14 @@ private okhttp3.Call modifyUmOrderValidateBeforeCall(ModifyUmOrderRequest modify } /** - * Modify UM Order(TRADE) Order modify function, currently only LIMIT order modification is - * supported, modified orders will be reordered in the match queue * Either orderId or - * origClientOrderId must be sent, and the orderId will prevail if both are sent. * Both - * quantity and price must be sent * When the new quantity or price doesn'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 quantity <= executedQty * - * When the order is GTX and the new price will cause it to be executed immediately Weight: 1 + * Modify UM Order (TRADE) Order modify function, currently only LIMIT order modification is + * supported, modified orders will be reordered in the match queue Weight(IP): 1 Security Type: + * TRADE Notes: - Either orderId or origClientOrderId must be sent, and the orderId will prevail + * if both are sent. - Both quantity and price must be sent - When the new quantity or price + * doesn'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 quantity * + * When the order is GTX and the new price will cause it to be executed immediately * * @param modifyUmOrderRequest (required) * @return ApiResponse<ModifyUmOrderResponse> @@ -4093,8 +4097,8 @@ private okhttp3.Call modifyUmOrderValidateBeforeCall(ModifyUmOrderRequest modify * * * @see Modify - * UM Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#modify-um-order">Modify + * UM Order (TRADE) Documentation */ public ApiResponse modifyUmOrder( @Valid @NotNull ModifyUmOrderRequest modifyUmOrderRequest) throws ApiException { @@ -4118,8 +4122,8 @@ public ApiResponse modifyUmOrder( * * * @see New - * CM Conditional Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-cm-conditional-order">New + * CM Conditional Order (TRADE) Documentation */ private okhttp3.Call newCmConditionalOrderCall( NewCmConditionalOrderRequest newCmConditionalOrderRequest) throws ApiException { @@ -4287,34 +4291,17 @@ private okhttp3.Call newCmConditionalOrderValidateBeforeCall( } /** - * New CM Conditional Order(TRADE) New CM Conditional Order * Order with type + * New CM Conditional Order (TRADE) New CM Conditional Order Weight(IP): 1 Security Type: TRADE + * Notes: - Additional mandatory parameters based on type: - Order with type * `STOP/TAKE_PROFIT`, parameter `timeInForce` can be sent ( default - * `GTC`). * Condition orders will be triggered when: * `STOP`, - * `STOP_MARKET`: * BUY: \"MARK_PRICE\" >= `stopPrice` * - * SELL: \"MARK_PRICE\" <= `stopPrice` * `TAKE_PROFIT`, - * `TAKE_PROFIT_MARKET`: * BUY: \"MARK_PRICE\" <= - * `stopPrice` * SELL: \"MARK_PRICE\" >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest mark price after order placed - * `<= `activationPrice`, and the latest mark price >`= the - * lowest mark price * (1 + `callbackRate`) * SELL: the highest mark price after order - * placed >= `activationPrice`, and the latest mark price <= the - * highest mark price * (1 - `callbackRate`) * For `TRAILING_STOP_MARKET`, - * if you got such error code. `{\"code\": -2021, \"msg\": \"Order - * would immediately trigger.\"}` means that the parameters you send do not meet the - * following requirements: * BUY: `activationPrice` should be smaller than latest mark - * price. * SELL: `activationPrice` should be larger than latest mark price. * - * Condition orders will be triggered when: * If parameter`priceProtect`is sent as - * true: * when price reaches the `stopPrice` ,the difference rate between - * \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be larger than the - * \"triggerProtect\" of the symbol * \"triggerProtect\" of a symbol can be - * got from `GET /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * - * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `stopPrice` * `TAKE_PROFIT`, - * `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `stopPrice` * SELL: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - * Weight: 1 + * `GTC`). - Condition orders will be triggered when: - `STOP`, + * `STOP_MARKET`: - BUY: \"MARK_PRICE\" >= `stopPrice` - + * SELL: \"MARK_PRICE\" = `stopPrice` - + * `TRAILING_STOP_MARKET`: - BUY: the lowest mark price after order placed + * ``= the lowest mark price - (1 + `callbackRate`) - SELL: the highest + * mark price after order placed >= `activationPrice`, and the latest mark + * price = `stopPrice` - SELL: latest price (\"MARK_PRICE\" or + * \"CONTRACT_PRICE\") = `stopPrice` * * @param newCmConditionalOrderRequest (required) * @return ApiResponse<NewCmConditionalOrderResponse> @@ -4328,8 +4315,8 @@ private okhttp3.Call newCmConditionalOrderValidateBeforeCall( * * * @see New - * CM Conditional Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-cm-conditional-order">New + * CM Conditional Order (TRADE) Documentation */ public ApiResponse newCmConditionalOrder( @Valid @NotNull NewCmConditionalOrderRequest newCmConditionalOrderRequest) @@ -4355,8 +4342,8 @@ public ApiResponse newCmConditionalOrder( * * * @see New - * CM Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-cm-order">New + * CM Order (TRADE) Documentation */ private okhttp3.Call newCmOrderCall(NewCmOrderRequest newCmOrderRequest) throws ApiException { String basePath = null; @@ -4496,10 +4483,12 @@ private okhttp3.Call newCmOrderValidateBeforeCall(NewCmOrderRequest newCmOrderRe } /** - * New CM Order(TRADE) Place new CM order * If `newOrderRespType` is sent as - * `RESULT` : * `MARKET` order: the final FILLED result of the order will be - * return directly. * `LIMIT` order with special `timeInForce`: the final - * status result of the order(FILLED or EXPIRED) will be returned directly. Weight: 1 + * New CM Order (TRADE) Place new CM order Weight(IP): 1 Security Type: TRADE Notes: - + * Additional mandatory parameters based on `type`: - If `newOrderRespType` + * is sent as `RESULT` : - `MARKET` order: the final FILLED result of the + * order will be return directly. - `LIMIT` order with special + * `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be + * returned directly. * * @param newCmOrderRequest (required) * @return ApiResponse<NewCmOrderResponse> @@ -4513,8 +4502,8 @@ private okhttp3.Call newCmOrderValidateBeforeCall(NewCmOrderRequest newCmOrderRe * * * @see New - * CM Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-cm-order">New + * CM Order (TRADE) Documentation */ public ApiResponse newCmOrder( @Valid @NotNull NewCmOrderRequest newCmOrderRequest) throws ApiException { @@ -4538,8 +4527,8 @@ public ApiResponse newCmOrder( * * * @see New - * Margin Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-margin-order">New + * Margin Order (TRADE) Documentation */ private okhttp3.Call newMarginOrderCall(NewMarginOrderRequest newMarginOrderRequest) throws ApiException { @@ -4703,7 +4692,7 @@ private okhttp3.Call newMarginOrderValidateBeforeCall( } /** - * New Margin Order(TRADE) New Margin Order Weight: 1 + * New Margin Order (TRADE) New Margin Order Weight(IP): 1 Security Type: TRADE * * @param newMarginOrderRequest (required) * @return ApiResponse<NewMarginOrderResponse> @@ -4717,8 +4706,8 @@ private okhttp3.Call newMarginOrderValidateBeforeCall( * * * @see New - * Margin Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-margin-order">New + * Margin Order (TRADE) Documentation */ public ApiResponse newMarginOrder( @Valid @NotNull NewMarginOrderRequest newMarginOrderRequest) throws ApiException { @@ -4742,7 +4731,7 @@ public ApiResponse newMarginOrder( * * * @see New + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-um-algo-order">New * UM Algo Order (TRADE) Documentation */ private okhttp3.Call newUmAlgoOrderCall(NewUmAlgoOrderRequest newUmAlgoOrderRequest) @@ -4822,10 +4811,6 @@ private okhttp3.Call newUmAlgoOrderCall(NewUmAlgoOrderRequest newUmAlgoOrderRequ localVarFormParams.put("priceMatch", newUmAlgoOrderRequest.getPriceMatch()); } - if (newUmAlgoOrderRequest.getClosePosition() != null) { - localVarFormParams.put("closePosition", newUmAlgoOrderRequest.getClosePosition()); - } - if (newUmAlgoOrderRequest.getPriceProtect() != null) { localVarFormParams.put("priceProtect", newUmAlgoOrderRequest.getPriceProtect()); } @@ -4932,39 +4917,20 @@ private okhttp3.Call newUmAlgoOrderValidateBeforeCall( } /** - * New UM Algo Order (TRADE) Place new UM conditional order * Algo order with type - * `STOP`, parameter `timeInForce` can be sent ( default `GTC`). * - * Algo order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent ( - * default `GTC`). * Condition orders will be triggered when: * If - * parameter`priceProtect`is sent as true: * when price reaches the - * `triggerPrice` , the difference rate between \"MARK_PRICE\" and - * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * `TAKE_PROFIT`, - * `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * SELL: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest price after - * order placed <= `activatePrice`, and the latest price >= the lowest - * price * (1 + `callbackRate`) * SELL: the highest price after order placed - * >= `activatePrice`, and the latest price <= the highest price * (1 - * - `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error - * code. ``{\"code\": -2021, \"msg\": \"Order would - * immediately trigger.\"}`` means that the parameters you send do not meet the - * following requirements: * BUY: `activatePrice` should be smaller than latest price. - * * SELL: `activatePrice` should be larger than latest price. * - * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered, **close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` paremeter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with - * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. Weight: 1 + * New UM Algo Order (TRADE) Place new UM conditional order Weight(IP): 1 Security Type: TRADE + * Notes: - Algo order with type `STOP`, parameter `timeInForce` can be sent + * (default `GTC`). - Algo order with type `TAKE_PROFIT`, parameter + * `timeInForce` can be sent (default `GTC`). - Condition orders will be + * triggered when price reaches the `triggerPrice`. - `STOP`, + * `STOP_MARKET`: BUY: latest price >= `triggerPrice`; SELL: latest + * price <= `triggerPrice`. - `TAKE_PROFIT`, + * `TAKE_PROFIT_MARKET`: BUY: latest price <= `triggerPrice`; SELL: + * latest price >= `triggerPrice`. - `TRAILING_STOP_MARKET`: BUY: + * lowest price after order placed <= `activatePrice`, and latest price + * >= lowest price * (1 + `callbackRate`); SELL: highest price after order + * placed >= `activatePrice`, and latest price <= highest price * (1 - + * `callbackRate`). - `selfTradePreventionMode` is only effective when + * `timeInForce` set to `IOC` or `GTC` or `GTD`. * * @param newUmAlgoOrderRequest (required) * @return ApiResponse<NewUmAlgoOrderResponse> @@ -4978,7 +4944,7 @@ private okhttp3.Call newUmAlgoOrderValidateBeforeCall( * * * @see New + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-um-algo-order">New * UM Algo Order (TRADE) Documentation */ public ApiResponse newUmAlgoOrder( @@ -5002,12 +4968,10 @@ public ApiResponse newUmAlgoOrder( * 200 New UM Conditional Order - * * - * @deprecated * @see New - * UM Conditional Order Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-um-conditional-order">New + * UM Conditional Order (TRADE) Documentation */ - @Deprecated private okhttp3.Call newUmConditionalOrderCall( NewUmConditionalOrderRequest newUmConditionalOrderRequest) throws ApiException { String basePath = null; @@ -5154,7 +5118,6 @@ private okhttp3.Call newUmConditionalOrderCall( localVarAuthNames); } - @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call newUmConditionalOrderValidateBeforeCall( NewUmConditionalOrderRequest newUmConditionalOrderRequest) throws ApiException { @@ -5189,37 +5152,21 @@ private okhttp3.Call newUmConditionalOrderValidateBeforeCall( } /** - * New UM Conditional Order Place new UM conditional order * Order with type + * New UM Conditional Order (TRADE) Place new UM conditional order Weight(IP): 1 Security Type: + * TRADE Notes: - Additional mandatory parameters based on type: - Order with type * `STOP/TAKE_PROFIT`, parameter `timeInForce` can be sent ( default - * `GTC`). * Condition orders will be triggered when: * `STOP`, - * `STOP_MARKET`: * BUY: \"MARK_PRICE\" >= `stopPrice` * - * SELL: \"MARK_PRICE\" <= `stopPrice` * `TAKE_PROFIT`, - * `TAKE_PROFIT_MARKET`: * BUY: \"MARK_PRICE\" <= - * `stopPrice` * SELL: \"MARK_PRICE\" >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest mark price after order placed - * `<= `activationPrice`, and the latest mark price >`= the - * lowest mark price * (1 + `callbackRate`) * SELL: the highest mark price after order - * placed >= `activationPrice`, and the latest mark price <= the - * highest mark price * (1 - `callbackRate`) * For `TRAILING_STOP_MARKET`, - * if you got such error code. `{\"code\": -2021, \"msg\": \"Order - * would immediately trigger.\"}` means that the parameters you send do not meet the - * following requirements: * BUY: `activationPrice` should be smaller than latest mark - * price. * SELL: `activationPrice` should be larger than latest mark price. * - * Condition orders will be triggered when: * If parameter`priceProtect`is sent as - * true: * when price reaches the `stopPrice` ,the difference rate between - * \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be larger than the - * \"triggerProtect\" of the symbol * \"triggerProtect\" of a symbol can be - * got from `GET /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * - * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `stopPrice` * `TAKE_PROFIT`, - * `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `stopPrice` * SELL: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * + * `GTC`). - Condition orders will be triggered when: - `STOP`, + * `STOP_MARKET`: - BUY: \"MARK_PRICE\" >= `stopPrice` - + * SELL: \"MARK_PRICE\" = `stopPrice` - + * `TRAILING_STOP_MARKET`: - BUY: the lowest mark price after order placed + * ``= the lowest mark price - (1 + `callbackRate`) - SELL: the highest + * mark price after order placed >= `activationPrice`, and the latest mark + * price = `stopPrice` - SELL: latest price (\"MARK_PRICE\" or + * \"CONTRACT_PRICE\") = `stopPrice` - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. * In extreme market conditions, + * `IOC` or `GTC` or `GTD`. - In extreme market conditions, * timeInForce `GTD` order auto cancel time might be delayed comparing to - * `goodTillDate` Weight: 1 + * `goodTillDate` * * @param newUmConditionalOrderRequest (required) * @return ApiResponse<NewUmConditionalOrderResponse> @@ -5232,12 +5179,10 @@ private okhttp3.Call newUmConditionalOrderValidateBeforeCall( * 200 New UM Conditional Order - * * - * @deprecated * @see New - * UM Conditional Order Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-um-conditional-order">New + * UM Conditional Order (TRADE) Documentation */ - @Deprecated public ApiResponse newUmConditionalOrder( @Valid @NotNull NewUmConditionalOrderRequest newUmConditionalOrderRequest) throws ApiException { @@ -5262,7 +5207,7 @@ public ApiResponse newUmConditionalOrder( * * * @see New + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-um-order">New * UM Order (TRADE) Documentation */ private okhttp3.Call newUmOrderCall(NewUmOrderRequest newUmOrderRequest) throws ApiException { @@ -5412,14 +5357,15 @@ private okhttp3.Call newUmOrderValidateBeforeCall(NewUmOrderRequest newUmOrderRe } /** - * New UM Order (TRADE) Place new UM order * If `newOrderRespType` is sent as - * `RESULT` : * `MARKET` order: the final FILLED result of the order will be - * return directly. * `LIMIT` order with special `timeInForce`: the final - * status result of the order(FILLED or EXPIRED) will be returned directly. * + * New UM Order (TRADE) Place new UM order Weight(IP): 1 Security Type: TRADE Notes: - + * Additional mandatory parameters based on type: - If `newOrderRespType` is sent as + * `RESULT` : - `MARKET` order: the final FILLED result of the order will be + * return directly. - `LIMIT` order with special `timeInForce`: the final + * status result of the order(FILLED or EXPIRED) will be returned directly. - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. * In extreme market conditions, + * `IOC` or `GTC` or `GTD`. - In extreme market conditions, * timeInForce `GTD` order auto cancel time might be delayed comparing to - * `goodTillDate` Weight: 1 + * `goodTillDate` * * @param newUmOrderRequest (required) * @return ApiResponse<NewUmOrderResponse> @@ -5433,7 +5379,7 @@ private okhttp3.Call newUmOrderValidateBeforeCall(NewUmOrderRequest newUmOrderRe * * * @see New + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-um-order">New * UM Order (TRADE) Documentation */ public ApiResponse newUmOrder( @@ -5451,7 +5397,7 @@ public ApiResponse newUmOrder( * @param strategyId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5463,8 +5409,8 @@ public ApiResponse newUmOrder( * * * @see Query - * All CM Conditional Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-cm-conditional-orders">Query + * All CM Conditional Orders (USER_DATA) Documentation */ private okhttp3.Call queryAllCmConditionalOrdersCall( String symbol, @@ -5600,17 +5546,17 @@ private okhttp3.Call queryAllCmConditionalOrdersValidateBeforeCall( } /** - * Query All CM Conditional Orders(USER_DATA) Query All CM Conditional Orders * These orders - * will not be found: * order strategyStatus is `CANCELED` or `EXPIRED`, - * **AND** * order has NO filled trade, **AND** * created time + 7 days < current time * The - * query time period must be less than 7 days( default as the recent 7 days). Weight: 1 for a - * single symbol; 40 when the symbol parameter is omitted + * Query All CM Conditional Orders (USER_DATA) Query All CM Conditional Orders Weight: - 1 for a + * single `symbol` - 40 when `symbol` is omitted Security Type: USER_DATA + * Notes: - These orders will not be found: - order strategyStatus is `CANCELED` or + * `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 7 days * + * The query time period must be less than 7 days( default as the recent 7 days). * * @param symbol (optional) * @param strategyId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryAllCmConditionalOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -5623,15 +5569,15 @@ private okhttp3.Call queryAllCmConditionalOrdersValidateBeforeCall( * * * @see Query - * All CM Conditional Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-cm-conditional-orders">Query + * All CM Conditional Orders (USER_DATA) Documentation */ public ApiResponse queryAllCmConditionalOrders( String symbol, Long strategyId, Long startTime, Long endTime, - Long limit, + @Max(1000L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -5645,12 +5591,12 @@ public ApiResponse queryAllCmConditionalOrd /** * Build call for queryAllCmOrders * - * @param symbol (required) + * @param symbol Symbol (optional) * @param pair (optional) * @param orderId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5662,7 +5608,7 @@ public ApiResponse queryAllCmConditionalOrd * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-cm-orders">Query * All CM Orders (USER_DATA) Documentation */ private okhttp3.Call queryAllCmOrdersCall( @@ -5808,19 +5754,20 @@ private okhttp3.Call queryAllCmOrdersValidateBeforeCall( } /** - * Query All CM Orders (USER_DATA) Get all account CM orders; active, canceled, or filled. * - * Either `symbol` or `pair` must be sent. * If `orderId` is set, - * it will get orders >= that orderId. Otherwise most recent orders are returned. * - * These orders will not be found: * order status is `CANCELED` or - * `EXPIRED`, **AND** * order has NO filled trade, **AND** * created time + 3 days - * < current time Weight: 20 with symbol, 40 with pair - * - * @param symbol (required) + * Query All CM Orders (USER_DATA) Get all account CM orders; active, canceled, or filled. + * Weight: - 20 with `symbol` - 40 with `pair` Security Type: USER_DATA + * Notes: - Either `symbol` or `pair` must be sent. - If `orderId` + * is set, it will get orders >= that orderId. Otherwise most recent orders are + * returned. - These orders will not be found: - order status is `CANCELED` or + * `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 3 days + * < current time + * + * @param symbol Symbol (optional) * @param pair (optional) * @param orderId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryAllCmOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -5833,16 +5780,16 @@ private okhttp3.Call queryAllCmOrdersValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-cm-orders">Query * All CM Orders (USER_DATA) Documentation */ public ApiResponse queryAllCmOrders( - @NotNull String symbol, + String symbol, String pair, Long orderId, Long startTime, Long endTime, - Long limit, + @Max(100L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -5868,7 +5815,7 @@ public ApiResponse queryAllCmOrders( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-cm-open-conditional-orders">Query * All Current CM Open Conditional Orders (USER_DATA) Documentation */ private okhttp3.Call queryAllCurrentCmOpenConditionalOrdersCall(String symbol, Long recvWindow) @@ -5973,9 +5920,9 @@ private okhttp3.Call queryAllCurrentCmOpenConditionalOrdersValidateBeforeCall( /** * Query All Current CM Open Conditional Orders (USER_DATA) Get all open conditional orders on a - * symbol. **Careful** when accessing this with no symbol. * If the symbol is not sent, orders - * for all symbols will be returned in an array. Weight: 1 for a single symbol; 40 when the - * symbol parameter is omitted + * symbol. **Careful** when accessing this with no symbol. Weight: - 1 for a single + * `symbol` - 40 when `symbol` is omitted Security Type: USER_DATA Notes: - + * If the symbol is not sent, orders for all symbols will be returned in an array. * * @param symbol (optional) * @param recvWindow (optional) @@ -5990,7 +5937,7 @@ private okhttp3.Call queryAllCurrentCmOpenConditionalOrdersValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-cm-open-conditional-orders">Query * All Current CM Open Conditional Orders (USER_DATA) Documentation */ public ApiResponse @@ -6019,8 +5966,8 @@ private okhttp3.Call queryAllCurrentCmOpenConditionalOrdersValidateBeforeCall( * * * @see Query - * All Current CM Open Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-cm-open-orders">Query + * All Current CM Open Orders (USER_DATA) Documentation */ private okhttp3.Call queryAllCurrentCmOpenOrdersCall( String symbol, String pair, Long recvWindow) throws ApiException { @@ -6128,9 +6075,9 @@ private okhttp3.Call queryAllCurrentCmOpenOrdersValidateBeforeCall( } /** - * Query All Current CM Open Orders(USER_DATA) Get all open orders on a symbol. * If the symbol - * is not sent, orders for all symbols will be returned in an array. Weight: 1 for a single - * symbol; 40 when the symbol parameter is omitted Careful when accessing this with no symbol. + * Query All Current CM Open Orders (USER_DATA) Get all open orders on a symbol. * If the symbol + * is not sent, orders for all symbols will be returned in an array. Weight: - 1 for a single + * `symbol` - 40 when `symbol` is omitted Security Type: USER_DATA * * @param symbol (optional) * @param pair (optional) @@ -6146,8 +6093,8 @@ private okhttp3.Call queryAllCurrentCmOpenOrdersValidateBeforeCall( * * * @see Query - * All Current CM Open Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-cm-open-orders">Query + * All Current CM Open Orders (USER_DATA) Documentation */ public ApiResponse queryAllCurrentCmOpenOrders( String symbol, String pair, Long recvWindow) throws ApiException { @@ -6171,11 +6118,11 @@ public ApiResponse queryAllCurrentCmOpenOrd * * * - * + * *
Response Details
Status Code Description Response Headers
200 All Current UM Open Algo Orders -
200 Query All Current UM Open Algo Orders -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-um-open-algo-orders">Query * All Current UM Open Algo Orders (USER_DATA) Documentation */ private okhttp3.Call queryAllCurrentUmOpenAlgoOrdersCall( @@ -6289,10 +6236,9 @@ private okhttp3.Call queryAllCurrentUmOpenAlgoOrdersValidateBeforeCall( } /** - * Query All Current UM Open Algo Orders (USER_DATA) Get all UM open algo orders on a symbol. * - * If the symbol is not sent, orders for all symbols will be returned in an array. Weight: 1 for - * a single symbol; 40 when the symbol parameter is omitted Careful when accessing this with no - * symbol. + * Query All Current UM Open Algo Orders (USER_DATA) Get all UM open algo orders on a symbol. If + * the symbol is not sent, orders for all symbols will be returned. Weight(IP): 1 Security Type: + * USER_DATA Notes: - Weight: 1 for a single symbol; 40 when the symbol parameter is omitted. * * @param algoType (optional) * @param symbol (optional) @@ -6305,15 +6251,16 @@ private okhttp3.Call queryAllCurrentUmOpenAlgoOrdersValidateBeforeCall( * * * - * + * *
Response Details
Status Code Description Response Headers
200 All Current UM Open Algo Orders -
200 Query All Current UM Open Algo Orders -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-um-open-algo-orders">Query * All Current UM Open Algo Orders (USER_DATA) Documentation */ public ApiResponse queryAllCurrentUmOpenAlgoOrders( - String algoType, String symbol, Long algoId, Long recvWindow) throws ApiException { + String algoType, String symbol, Long algoId, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = queryAllCurrentUmOpenAlgoOrdersValidateBeforeCall( algoType, symbol, algoId, recvWindow); @@ -6336,12 +6283,10 @@ public ApiResponse queryAllCurrentUmOpe * 200 All Current UM Open Conditional Orders - * * - * @deprecated * @see Query - * All Current UM Open Conditional Orders Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-um-open-conditional-orders">Query + * All Current UM Open Conditional Orders (USER_DATA) Documentation */ - @Deprecated private okhttp3.Call queryAllCurrentUmOpenConditionalOrdersCall(String symbol, Long recvWindow) throws ApiException { String basePath = null; @@ -6406,7 +6351,6 @@ private okhttp3.Call queryAllCurrentUmOpenConditionalOrdersCall(String symbol, L localVarAuthNames); } - @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call queryAllCurrentUmOpenConditionalOrdersValidateBeforeCall( String symbol, Long recvWindow) throws ApiException { @@ -6444,10 +6388,10 @@ private okhttp3.Call queryAllCurrentUmOpenConditionalOrdersValidateBeforeCall( } /** - * Query All Current UM Open Conditional Orders Get all open conditional orders on a symbol. * - * If the symbol is not sent, orders for all symbols will be returned in an array. Weight: 1 for - * a single symbol; 40 when the symbol parameter is omitted Careful when accessing this with no - * symbol. + * Query All Current UM Open Conditional Orders (USER_DATA) Get all open conditional orders on a + * symbol. Weight: - 1 for a single `symbol` - 40 when `symbol` is omitted + * Security Type: USER_DATA Notes: - If `symbol` is not provided, conditional open + * orders for all symbols are returned. * * @param symbol (optional) * @param recvWindow (optional) @@ -6461,12 +6405,10 @@ private okhttp3.Call queryAllCurrentUmOpenConditionalOrdersValidateBeforeCall( * 200 All Current UM Open Conditional Orders - * * - * @deprecated * @see Query - * All Current UM Open Conditional Orders Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-um-open-conditional-orders">Query + * All Current UM Open Conditional Orders (USER_DATA) Documentation */ - @Deprecated public ApiResponse queryAllCurrentUmOpenConditionalOrders(String symbol, Long recvWindow) throws ApiException { @@ -6492,8 +6434,8 @@ private okhttp3.Call queryAllCurrentUmOpenConditionalOrdersValidateBeforeCall( * * * @see Query - * All Current UM Open Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-um-open-orders">Query + * All Current UM Open Orders (USER_DATA) Documentation */ private okhttp3.Call queryAllCurrentUmOpenOrdersCall(String symbol, Long recvWindow) throws ApiException { @@ -6593,9 +6535,9 @@ private okhttp3.Call queryAllCurrentUmOpenOrdersValidateBeforeCall( } /** - * Query All Current UM Open Orders(USER_DATA) Get all open orders on a symbol. * If the symbol - * is not sent, orders for all symbols will be returned in an array. Weight: 1 for a single - * symbol; 40 when the symbol parameter is omitted + * Query All Current UM Open Orders (USER_DATA) Get all open orders on a symbol. Weight: - 1 for + * a single `symbol` - 40 when `symbol` is omitted Security Type: USER_DATA + * Notes: - If the symbol is not sent, orders for all symbols will be returned in an array. * * @param symbol (optional) * @param recvWindow (optional) @@ -6610,8 +6552,8 @@ private okhttp3.Call queryAllCurrentUmOpenOrdersValidateBeforeCall( * * * @see Query - * All Current UM Open Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-um-open-orders">Query + * All Current UM Open Orders (USER_DATA) Documentation */ public ApiResponse queryAllCurrentUmOpenOrders( String symbol, Long recvWindow) throws ApiException { @@ -6625,12 +6567,12 @@ public ApiResponse queryAllCurrentUmOpenOrd /** * Build call for queryAllMarginAccountOrders * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) - * @param recvWindow (optional) + * @param limit Number of results returned. (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -6641,7 +6583,7 @@ public ApiResponse queryAllCurrentUmOpenOrd * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-margin-account-orders">Query * All Margin Account Orders (USER_DATA) Documentation */ private okhttp3.Call queryAllMarginAccountOrdersCall( @@ -6768,14 +6710,17 @@ private okhttp3.Call queryAllMarginAccountOrdersValidateBeforeCall( } /** - * Query All Margin Account Orders (USER_DATA) Query All Margin Account Orders Weight: 100 + * Query All Margin Account Orders (USER_DATA) Query All Margin Account Orders Weight(IP): 100 + * Security Type: USER_DATA Notes: - If `orderId` is set, returns orders with id + * >= `orderId`; otherwise returns recent order history. - For some historical + * orders, `cummulativeQuoteQty < 0` means the data is unavailable at this time. * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) - * @param recvWindow (optional) + * @param limit Number of results returned. (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return ApiResponse<QueryAllMarginAccountOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -6787,7 +6732,7 @@ private okhttp3.Call queryAllMarginAccountOrdersValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-margin-account-orders">Query * All Margin Account Orders (USER_DATA) Documentation */ public ApiResponse queryAllMarginAccountOrders( @@ -6795,7 +6740,7 @@ public ApiResponse queryAllMarginAccountOrd Long orderId, Long startTime, Long endTime, - Long limit, + @Max(500L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -6813,7 +6758,7 @@ public ApiResponse queryAllMarginAccountOrd * @param strategyId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6824,12 +6769,10 @@ public ApiResponse queryAllMarginAccountOrd * 200 All UM Conditional Orders - * * - * @deprecated * @see Query - * All UM Conditional Orders Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-um-conditional-orders">Query + * All UM Conditional Orders (USER_DATA) Documentation */ - @Deprecated private okhttp3.Call queryAllUmConditionalOrdersCall( String symbol, Long strategyId, @@ -6916,7 +6859,6 @@ private okhttp3.Call queryAllUmConditionalOrdersCall( localVarAuthNames); } - @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call queryAllUmConditionalOrdersValidateBeforeCall( String symbol, @@ -6965,17 +6907,17 @@ private okhttp3.Call queryAllUmConditionalOrdersValidateBeforeCall( } /** - * Query All UM Conditional Orders Query All UM Conditional Orders * These orders will not be - * found: * order strategyStatus is `CANCELED` or `EXPIRED`, **AND** * order - * has NO filled trade, **AND** * created time + 7 days < current time * The query time - * period must be less than 7 days( default as the recent 7 days). Weight: 1 for a single - * symbol; 40 when the symbol parameter is omitted + * Query All UM Conditional Orders (USER_DATA) Query All UM Conditional Orders Weight: - 1 for a + * single `symbol` - 40 when `symbol` is omitted Security Type: USER_DATA + * Notes: - These orders will not be found: - order strategyStatus is `CANCELED` or + * `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 7 days * + * The query time period must be less than 7 days( default as the recent 7 days). * * @param symbol (optional) * @param strategyId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryAllUmConditionalOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -6987,18 +6929,16 @@ private okhttp3.Call queryAllUmConditionalOrdersValidateBeforeCall( * 200 All UM Conditional Orders - * * - * @deprecated * @see Query - * All UM Conditional Orders Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-um-conditional-orders">Query + * All UM Conditional Orders (USER_DATA) Documentation */ - @Deprecated public ApiResponse queryAllUmConditionalOrders( String symbol, Long strategyId, Long startTime, Long endTime, - Long limit, + @Max(1000L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -7012,11 +6952,11 @@ public ApiResponse queryAllUmConditionalOrd /** * Build call for queryAllUmOrders * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -7028,8 +6968,8 @@ public ApiResponse queryAllUmConditionalOrd * * * @see Query - * All UM Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-um-orders">Query + * All UM Orders (USER_DATA) Documentation */ private okhttp3.Call queryAllUmOrdersCall( String symbol, Long orderId, Long startTime, Long endTime, Long limit, Long recvWindow) @@ -7154,18 +7094,16 @@ private okhttp3.Call queryAllUmOrdersValidateBeforeCall( } /** - * Query All UM Orders(USER_DATA) Get all account UM orders; active, canceled, or filled. * - * These orders will not be found: * order status is `CANCELED` or - * `EXPIRED`, **AND** * order has NO filled trade, **AND** * created time + 3 days - * < current time * If `orderId` is set, it will get orders >= that - * orderId. Otherwise most recent orders are returned. * The query time period must be less then - * 7 days( default as the recent 7 days). Weight: 5 + * Query All UM Orders (USER_DATA) Get all account UM orders; active, canceled, or filled. + * Weight(IP): 5 Security Type: USER_DATA Notes: - If `orderId` is set, it will get + * orders >= that orderId. Otherwise most recent orders are returned. - The query time + * period must be less then 7 days( default as the recent 7 days). * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryAllUmOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -7178,15 +7116,15 @@ private okhttp3.Call queryAllUmOrdersValidateBeforeCall( * * * @see Query - * All UM Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-um-orders">Query + * All UM Orders (USER_DATA) Documentation */ public ApiResponse queryAllUmOrders( @NotNull String symbol, Long orderId, Long startTime, Long endTime, - Long limit, + @Max(1000L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -7200,7 +7138,7 @@ public ApiResponse queryAllUmOrders( /** * Build call for queryCmConditionalOrderHistory * - * @param symbol (required) + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -7214,8 +7152,8 @@ public ApiResponse queryAllUmOrders( * * * @see Query - * CM Conditional Order History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-cm-conditional-order-history">Query + * CM Conditional Order History (USER_DATA) Documentation */ private okhttp3.Call queryCmConditionalOrderHistoryCall( String symbol, Long strategyId, String newClientStrategyId, Long recvWindow) @@ -7332,13 +7270,14 @@ private okhttp3.Call queryCmConditionalOrderHistoryValidateBeforeCall( } /** - * Query CM Conditional Order History(USER_DATA) Query CM Conditional Order History * Either - * `strategyId` or `newClientStrategyId` must be sent. * `NEW` - * orders will not be found. * These orders will not be found: * order status is - * `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** * - * created time + 7 days < current time Weight: 1 - * - * @param symbol (required) + * Query CM Conditional Order History (USER_DATA) Query CM Conditional Order History Weight(IP): + * 1 Security Type: USER_DATA Notes: - Either `strategyId` or + * `newClientStrategyId` must be sent. - `NEW` orders will not be found. - + * These orders will not be found: - order status is `CANCELED` or + * `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 7 days + * < current time + * + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -7353,8 +7292,8 @@ private okhttp3.Call queryCmConditionalOrderHistoryValidateBeforeCall( * * * @see Query - * CM Conditional Order History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-cm-conditional-order-history">Query + * CM Conditional Order History (USER_DATA) Documentation */ public ApiResponse queryCmConditionalOrderHistory( @NotNull String symbol, Long strategyId, String newClientStrategyId, Long recvWindow) @@ -7370,12 +7309,12 @@ public ApiResponse queryCmConditionalOrd /** * Build call for queryCmModifyOrderHistory * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -7387,8 +7326,8 @@ public ApiResponse queryCmConditionalOrd * * * @see Query - * CM Modify Order History(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-cm-modify-order-history">Query + * CM Modify Order History (TRADE) Documentation */ private okhttp3.Call queryCmModifyOrderHistoryCall( String symbol, @@ -7534,16 +7473,16 @@ private okhttp3.Call queryCmModifyOrderHistoryValidateBeforeCall( } /** - * Query CM Modify Order History(TRADE) Get order modification history * Either - * `orderId` or `origClientOrderId` must be sent, and the - * `orderId` will prevail if both are sent. Weight: 1 + * Query CM Modify Order History (TRADE) Get order modification history Weight(IP): 1 Security + * Type: TRADE Notes: - Either `orderId` or `origClientOrderId` must be + * sent, and the `orderId` will prevail if both are sent. * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryCmModifyOrderHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -7556,8 +7495,8 @@ private okhttp3.Call queryCmModifyOrderHistoryValidateBeforeCall( * * * @see Query - * CM Modify Order History(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-cm-modify-order-history">Query + * CM Modify Order History (TRADE) Documentation */ public ApiResponse queryCmModifyOrderHistory( @NotNull String symbol, @@ -7565,7 +7504,7 @@ public ApiResponse queryCmModifyOrderHistory( String origClientOrderId, Long startTime, Long endTime, - Long limit, + @Max(1000L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -7579,7 +7518,7 @@ public ApiResponse queryCmModifyOrderHistory( /** * Build call for queryCmOrder * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) * @param recvWindow (optional) @@ -7593,8 +7532,8 @@ public ApiResponse queryCmModifyOrderHistory( * * * @see Query - * CM Order(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-cm-order">Query + * CM Order (USER_DATA) Documentation */ private okhttp3.Call queryCmOrderCall( String symbol, Long orderId, String origClientOrderId, Long recvWindow) @@ -7710,12 +7649,13 @@ private okhttp3.Call queryCmOrderValidateBeforeCall( } /** - * Query CM Order(USER_DATA) Check an CM order's status. * Either `orderId` or - * `origClientOrderId` must be sent. * These orders will not be found: * order status - * is `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** - * * created time + 3 days < current time Weight: 1 + * Query CM Order (USER_DATA) Check an CM order's status. Weight(IP): 1 Security Type: + * USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be sent. + * - These orders will not be found: - order status is `CANCELED` or + * `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 3 days + * < current time * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) * @param recvWindow (optional) @@ -7730,8 +7670,8 @@ private okhttp3.Call queryCmOrderValidateBeforeCall( * * * @see Query - * CM Order(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-cm-order">Query + * CM Order (USER_DATA) Documentation */ public ApiResponse queryCmOrder( @NotNull String symbol, Long orderId, String origClientOrderId, Long recvWindow) @@ -7746,7 +7686,7 @@ public ApiResponse queryCmOrder( /** * Build call for queryCurrentCmOpenConditionalOrder * - * @param symbol (required) + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -7760,8 +7700,8 @@ public ApiResponse queryCmOrder( * * * @see Query - * Current CM Open Conditional Order(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-cm-open-conditional-order">Query + * Current CM Open Conditional Order (USER_DATA) Documentation */ private okhttp3.Call queryCurrentCmOpenConditionalOrderCall( String symbol, Long strategyId, String newClientStrategyId, Long recvWindow) @@ -7878,12 +7818,12 @@ private okhttp3.Call queryCurrentCmOpenConditionalOrderValidateBeforeCall( } /** - * Query Current CM Open Conditional Order(USER_DATA) Query Current CM Open Conditional Order * - * Either `strategyId` or `newClientStrategyId` must be sent. * If the - * queried order has been triggered, cancelled or expired, the error message \"Order does - * not exist\" will be returned. Weight: 1 + * Query Current CM Open Conditional Order (USER_DATA) Query Current CM Open Conditional Order + * Weight(IP): 1 Security Type: USER_DATA Notes: - Either `strategyId` or + * `newClientStrategyId` must be sent. - If the queried order has been triggered, + * cancelled or expired, the error message \"Order does not exist\" will be returned. * - * @param symbol (required) + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -7898,8 +7838,8 @@ private okhttp3.Call queryCurrentCmOpenConditionalOrderValidateBeforeCall( * * * @see Query - * Current CM Open Conditional Order(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-cm-open-conditional-order">Query + * Current CM Open Conditional Order (USER_DATA) Documentation */ public ApiResponse queryCurrentCmOpenConditionalOrder( @@ -7919,9 +7859,9 @@ private okhttp3.Call queryCurrentCmOpenConditionalOrderValidateBeforeCall( /** * Build call for queryCurrentCmOpenOrder * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * @param symbol Trading pair. (required) + * @param orderId Order ID. (optional) + * @param origClientOrderId User-defined order ID. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -7933,7 +7873,7 @@ private okhttp3.Call queryCurrentCmOpenConditionalOrderValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-cm-open-order">Query * Current CM Open Order (USER_DATA) Documentation */ private okhttp3.Call queryCurrentCmOpenOrderCall( @@ -8050,14 +7990,14 @@ private okhttp3.Call queryCurrentCmOpenOrderValidateBeforeCall( } /** - * Query Current CM Open Order (USER_DATA) Query current CM open order * Either - * `orderId` or `origClientOrderId` must be sent. * If the queried order has - * been filled or cancelled, the error message \"Order does not exist\" will be - * returned. Weight: 1 - * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * Query Current CM Open Order (USER_DATA) Query current CM open order Weight(IP): 1 Security + * Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be + * sent. - If the queried order has been filled or cancelled, the error message \"Order + * does not exist\" will be returned. + * + * @param symbol Trading pair. (required) + * @param orderId Order ID. (optional) + * @param origClientOrderId User-defined order ID. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryCurrentCmOpenOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -8070,7 +8010,7 @@ private okhttp3.Call queryCurrentCmOpenOrderValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-cm-open-order">Query * Current CM Open Order (USER_DATA) Documentation */ public ApiResponse queryCurrentCmOpenOrder( @@ -8087,8 +8027,8 @@ public ApiResponse queryCurrentCmOpenOrder( /** * Build call for queryCurrentMarginOpenOrder * - * @param symbol (required) - * @param recvWindow (optional) + * @param symbol Symbol (required) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -8099,7 +8039,7 @@ public ApiResponse queryCurrentCmOpenOrder( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-margin-open-order">Query * Current Margin Open Order (USER_DATA) Documentation */ private okhttp3.Call queryCurrentMarginOpenOrderCall(String symbol, Long recvWindow) @@ -8200,10 +8140,13 @@ private okhttp3.Call queryCurrentMarginOpenOrderValidateBeforeCall( } /** - * Query Current Margin Open Order (USER_DATA) Query Current Margin Open Order Weight: 5 + * Query Current Margin Open Order (USER_DATA) Query Current Margin Open Order Weight(IP): 5 + * Security Type: USER_DATA Notes: - If `symbol` is not sent, order records for all + * symbols are returned. - When returning all symbols, the request count charged to the rate + * limiter equals the number of symbols currently trading on the exchange. * - * @param symbol (required) - * @param recvWindow (optional) + * @param symbol Symbol (required) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return ApiResponse<QueryCurrentMarginOpenOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -8215,7 +8158,7 @@ private okhttp3.Call queryCurrentMarginOpenOrderValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-margin-open-order">Query * Current Margin Open Order (USER_DATA) Documentation */ public ApiResponse queryCurrentMarginOpenOrder( @@ -8230,8 +8173,8 @@ public ApiResponse queryCurrentMarginOpenOr /** * Build call for queryCurrentUmOpenAlgoOrder * - * @param algoId (optional) - * @param clientAlgoId (optional) + * @param algoId Algo order ID (optional) + * @param clientAlgoId Client algo order ID (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -8239,11 +8182,11 @@ public ApiResponse queryCurrentMarginOpenOr * * * - * + * *
Response Details
Status Code Description Response Headers
200 Current UM Open Algo Order -
200 Query UM Algo Order -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-um-open-algo-order">Query * Current UM Open Algo Order (USER_DATA) Documentation */ private okhttp3.Call queryCurrentUmOpenAlgoOrderCall( @@ -8353,15 +8296,14 @@ private okhttp3.Call queryCurrentUmOpenAlgoOrderValidateBeforeCall( } /** - * Query Current UM Open Algo Order (USER_DATA) Check an UM algo order's status. * These - * orders will not be found: * order status is `CANCELED` or `EXPIRED` - * **AND** order has NO filled trade **AND** created time + 3 days < current time * order - * create time + 90 days < current time * Either `algoId` or - * `clientAlgoId` must be sent. * `algoId` is self-increment for each - * specific `symbol` Weight: 1 - * - * @param algoId (optional) - * @param clientAlgoId (optional) + * Query Current UM Open Algo Order (USER_DATA) Check an UM algo order's status. Orders will + * not be found if: status is CANCELED/EXPIRED with no fills and created 3+ days ago; or created + * 90+ days ago. Weight(IP): 1 Security Type: USER_DATA Notes: - Either `algoId` or + * `clientAlgoId` must be sent. `algoId` is self-increment for each specific + * `symbol`. + * + * @param algoId Algo order ID (optional) + * @param clientAlgoId Client algo order ID (optional) * @param recvWindow (optional) * @return ApiResponse<QueryCurrentUmOpenAlgoOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -8370,15 +8312,15 @@ private okhttp3.Call queryCurrentUmOpenAlgoOrderValidateBeforeCall( * * * - * + * *
Response Details
Status Code Description Response Headers
200 Current UM Open Algo Order -
200 Query UM Algo Order -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-um-open-algo-order">Query * Current UM Open Algo Order (USER_DATA) Documentation */ public ApiResponse queryCurrentUmOpenAlgoOrder( - Long algoId, String clientAlgoId, Long recvWindow) throws ApiException { + Long algoId, String clientAlgoId, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryCurrentUmOpenAlgoOrderValidateBeforeCall(algoId, clientAlgoId, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -8389,7 +8331,7 @@ public ApiResponse queryCurrentUmOpenAlgoOr /** * Build call for queryCurrentUmOpenConditionalOrder * - * @param symbol (required) + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -8402,12 +8344,10 @@ public ApiResponse queryCurrentUmOpenAlgoOr * 200 Current UM Open Conditional Order - * * - * @deprecated * @see Query - * Current UM Open Conditional Order Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-um-open-conditional-order">Query + * Current UM Open Conditional Order (USER_DATA) Documentation */ - @Deprecated private okhttp3.Call queryCurrentUmOpenConditionalOrderCall( String symbol, Long strategyId, String newClientStrategyId, Long recvWindow) throws ApiException { @@ -8482,7 +8422,6 @@ private okhttp3.Call queryCurrentUmOpenConditionalOrderCall( localVarAuthNames); } - @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call queryCurrentUmOpenConditionalOrderValidateBeforeCall( String symbol, Long strategyId, String newClientStrategyId, Long recvWindow) @@ -8524,12 +8463,13 @@ private okhttp3.Call queryCurrentUmOpenConditionalOrderValidateBeforeCall( } /** - * Query Current UM Open Conditional Order Query Current UM Open Conditional Order * Either - * `strategyId` or `newClientStrategyId` must be sent. * If the queried - * order has been `CANCELED`, `TRIGGERED` or `EXPIRED`, the error - * message \"Order does not exist\" will be returned. Weight: 1 + * Query Current UM Open Conditional Order (USER_DATA) Query Current UM Open Conditional Order + * Weight(IP): 1 Security Type: USER_DATA Notes: - Either `strategyId` or + * `newClientStrategyId` must be sent. - If the queried order has been + * `CANCELED`, `TRIGGERED` or `EXPIRED`, the error message + * \"Order does not exist\" will be returned. * - * @param symbol (required) + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -8543,12 +8483,10 @@ private okhttp3.Call queryCurrentUmOpenConditionalOrderValidateBeforeCall( * 200 Current UM Open Conditional Order - * * - * @deprecated * @see Query - * Current UM Open Conditional Order Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-um-open-conditional-order">Query + * Current UM Open Conditional Order (USER_DATA) Documentation */ - @Deprecated public ApiResponse queryCurrentUmOpenConditionalOrder( @NotNull String symbol, @@ -8567,7 +8505,7 @@ private okhttp3.Call queryCurrentUmOpenConditionalOrderValidateBeforeCall( /** * Build call for queryCurrentUmOpenOrder * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) * @param recvWindow (optional) @@ -8581,8 +8519,8 @@ private okhttp3.Call queryCurrentUmOpenConditionalOrderValidateBeforeCall( * * * @see Query - * Current UM Open Order(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-um-open-order">Query + * Current UM Open Order (USER_DATA) Documentation */ private okhttp3.Call queryCurrentUmOpenOrderCall( String symbol, Long orderId, String origClientOrderId, Long recvWindow) @@ -8698,12 +8636,12 @@ private okhttp3.Call queryCurrentUmOpenOrderValidateBeforeCall( } /** - * Query Current UM Open Order(USER_DATA) Query current UM open order * Either - * `orderId` or `origClientOrderId` must be sent. * If the queried order has - * been filled or cancelled, the error message \"Order does not exist\" will be - * returned. Weight: 1 + * Query Current UM Open Order (USER_DATA) Query current UM open order Weight(IP): 1 Security + * Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be + * sent. - If the queried order has been filled or cancelled, the error message \"Order + * does not exist\" will be returned. * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) * @param recvWindow (optional) @@ -8718,8 +8656,8 @@ private okhttp3.Call queryCurrentUmOpenOrderValidateBeforeCall( * * * @see Query - * Current UM Open Order(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-um-open-order">Query + * Current UM Open Order (USER_DATA) Documentation */ public ApiResponse queryCurrentUmOpenOrder( @NotNull String symbol, Long orderId, String origClientOrderId, Long recvWindow) @@ -8735,10 +8673,10 @@ public ApiResponse queryCurrentUmOpenOrder( /** * Build call for queryMarginAccountOrder * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) - * @param recvWindow (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -8749,7 +8687,7 @@ public ApiResponse queryCurrentUmOpenOrder( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-margin-account-order">Query * Margin Account Order (USER_DATA) Documentation */ private okhttp3.Call queryMarginAccountOrderCall( @@ -8866,12 +8804,15 @@ private okhttp3.Call queryMarginAccountOrderValidateBeforeCall( } /** - * Query Margin Account Order (USER_DATA) Query Margin Account Order Weight: 10 + * Query Margin Account Order (USER_DATA) Query Margin Account Order Weight(IP): 10 Security + * Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be + * sent. - For some historical orders, `cummulativeQuoteQty < 0` means the data is + * unavailable at this time. * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) - * @param recvWindow (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return ApiResponse<QueryMarginAccountOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -8883,7 +8824,7 @@ private okhttp3.Call queryMarginAccountOrderValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-margin-account-order">Query * Margin Account Order (USER_DATA) Documentation */ public ApiResponse queryMarginAccountOrder( @@ -8900,11 +8841,11 @@ public ApiResponse queryMarginAccountOrder( /** * Build call for queryMarginAccountsAllOco * - * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) + * @param fromId Trade ID to fetch from. (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) - * @param recvWindow (optional) + * @param limit Number of results returned. (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -8915,7 +8856,7 @@ public ApiResponse queryMarginAccountOrder( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-margin-accounts-all-oco">Query * Margin Account's all OCO (USER_DATA) Documentation */ private okhttp3.Call queryMarginAccountsAllOcoCall( @@ -9037,13 +8978,13 @@ private okhttp3.Call queryMarginAccountsAllOcoValidateBeforeCall( /** * Query Margin Account's all OCO (USER_DATA) Query all OCO for a specific margin account - * based on provided optional parameters Weight: 100 + * based on provided optional parameters Weight(IP): 100 Security Type: USER_DATA * - * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) + * @param fromId Trade ID to fetch from. (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) - * @param recvWindow (optional) + * @param limit Number of results returned. (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return ApiResponse<QueryMarginAccountsAllOcoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -9055,11 +8996,11 @@ private okhttp3.Call queryMarginAccountsAllOcoValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-margin-accounts-all-oco">Query * Margin Account's all OCO (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsAllOco( - Long fromId, Long startTime, Long endTime, Long limit, Long recvWindow) + Long fromId, Long startTime, Long endTime, @Max(1000L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryMarginAccountsAllOcoValidateBeforeCall( @@ -9074,8 +9015,9 @@ public ApiResponse queryMarginAccountsAllOco( * * @param orderListId Either `orderListId` or `listClientOrderId` must be * provided (optional) - * @param origClientOrderId (optional) - * @param recvWindow (optional) + * @param origClientOrderId `orderListId` or `listClientOrderId` must be + * provided. (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -9086,7 +9028,7 @@ public ApiResponse queryMarginAccountsAllOco( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-margin-accounts-oco">Query * Margin Account's OCO (USER_DATA) Documentation */ private okhttp3.Call queryMarginAccountsOcoCall( @@ -9195,12 +9137,13 @@ private okhttp3.Call queryMarginAccountsOcoValidateBeforeCall( /** * Query Margin Account's OCO (USER_DATA) Retrieves a specific OCO based on provided - * optional parameters Weight: 5 + * optional parameters Weight(IP): 5 Security Type: USER_DATA * * @param orderListId Either `orderListId` or `listClientOrderId` must be * provided (optional) - * @param origClientOrderId (optional) - * @param recvWindow (optional) + * @param origClientOrderId `orderListId` or `listClientOrderId` must be + * provided. (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return ApiResponse<QueryMarginAccountsOcoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -9212,7 +9155,7 @@ private okhttp3.Call queryMarginAccountsOcoValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-margin-accounts-oco">Query * Margin Account's OCO (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsOco( @@ -9228,7 +9171,7 @@ public ApiResponse queryMarginAccountsOco( /** * Build call for queryMarginAccountsOpenOco * - * @param recvWindow (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -9239,7 +9182,7 @@ public ApiResponse queryMarginAccountsOco( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-margin-accounts-open-oco">Query * Margin Account's Open OCO (USER_DATA) Documentation */ private okhttp3.Call queryMarginAccountsOpenOcoCall(Long recvWindow) throws ApiException { @@ -9333,9 +9276,10 @@ private okhttp3.Call queryMarginAccountsOpenOcoValidateBeforeCall(Long recvWindo } /** - * Query Margin Account's Open OCO (USER_DATA) Query Margin Account's Open OCO Weight: 5 + * Query Margin Account's Open OCO (USER_DATA) Query Margin Account's Open OCO + * Weight(IP): 5 Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Value cannot be greater than 60000 (optional) * @return ApiResponse<QueryMarginAccountsOpenOcoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -9347,7 +9291,7 @@ private okhttp3.Call queryMarginAccountsOpenOcoValidateBeforeCall(Long recvWindo * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-margin-accounts-open-oco">Query * Margin Account's Open OCO (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsOpenOco( @@ -9362,10 +9306,10 @@ public ApiResponse queryMarginAccountsOpenOc * Build call for queryUmAlgoOrderHistory * * @param symbol (required) - * @param algoId (optional) - * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param algoId Only return orders >= this algoId (optional) + * @param startTime (optional) + * @param endTime (optional) + * @param limit Default 500; max 1000 (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -9373,11 +9317,11 @@ public ApiResponse queryMarginAccountsOpenOc * * * - * + * *
Response Details
Status Code Description Response Headers
200 UM Algo Order History -
200 Query UM Algo Order History -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-um-algo-order-history">Query * UM Algo Order History (USER_DATA) Documentation */ private okhttp3.Call queryUmAlgoOrderHistoryCall( @@ -9504,16 +9448,16 @@ private okhttp3.Call queryUmAlgoOrderHistoryValidateBeforeCall( } /** - * Query UM Algo Order History (USER_DATA) Get all algo orders; ACTIVE, CANCELED, TRIGGERED or - * FINISHED . * If `algoId` is set, it will get orders >= that - * `algoId`. Otherwise most recent orders are returned. * The query time period must - * be less then 7 days( default as the recent 7 days). Weight: 5 + * Query UM Algo Order History (USER_DATA) Get all algo orders: ACTIVE, CANCELED, TRIGGERED or + * FINISHED. Weight(IP): 5 Security Type: USER_DATA Notes: - If `algoId` is set, it + * will get orders >= that `algoId`. Otherwise most recent orders are + * returned. - The query time period must be less than 7 days (default as the recent 7 days). * * @param symbol (required) - * @param algoId (optional) - * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param algoId Only return orders >= this algoId (optional) + * @param startTime (optional) + * @param endTime (optional) + * @param limit Default 500; max 1000 (optional) * @param recvWindow (optional) * @return ApiResponse<QueryUmAlgoOrderHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -9522,11 +9466,11 @@ private okhttp3.Call queryUmAlgoOrderHistoryValidateBeforeCall( * * * - * + * *
Response Details
Status Code Description Response Headers
200 UM Algo Order History -
200 Query UM Algo Order History -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-um-algo-order-history">Query * UM Algo Order History (USER_DATA) Documentation */ public ApiResponse queryUmAlgoOrderHistory( @@ -9534,8 +9478,8 @@ public ApiResponse queryUmAlgoOrderHistory( Long algoId, Long startTime, Long endTime, - Long limit, - Long recvWindow) + @Max(1000L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryUmAlgoOrderHistoryValidateBeforeCall( @@ -9548,7 +9492,7 @@ public ApiResponse queryUmAlgoOrderHistory( /** * Build call for queryUmConditionalOrderHistory * - * @param symbol (required) + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -9561,12 +9505,10 @@ public ApiResponse queryUmAlgoOrderHistory( * 200 UM Conditional Order History - * * - * @deprecated * @see Query - * UM Conditional Order History Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-um-conditional-order-history">Query + * UM Conditional Order History (USER_DATA) Documentation */ - @Deprecated private okhttp3.Call queryUmConditionalOrderHistoryCall( String symbol, Long strategyId, String newClientStrategyId, Long recvWindow) throws ApiException { @@ -9641,7 +9583,6 @@ private okhttp3.Call queryUmConditionalOrderHistoryCall( localVarAuthNames); } - @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call queryUmConditionalOrderHistoryValidateBeforeCall( String symbol, Long strategyId, String newClientStrategyId, Long recvWindow) @@ -9683,13 +9624,14 @@ private okhttp3.Call queryUmConditionalOrderHistoryValidateBeforeCall( } /** - * Query UM Conditional Order History Query UM Conditional Order History * Either - * `strategyId` or `newClientStrategyId` must be sent. * `NEW` - * orders will not be found. * These orders will not be found: * order status is - * `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** * - * created time + 7 days < current time Weight: 1 - * - * @param symbol (required) + * Query UM Conditional Order History (USER_DATA) Query UM Conditional Order History Weight(IP): + * 1 Security Type: USER_DATA Notes: - Either `strategyId` or + * `newClientStrategyId` must be sent. - `NEW` orders will not be found. - + * These orders will not be found: - order status is `CANCELED` or + * `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 7 days + * < current time + * + * @param symbol Symbol (required) * @param strategyId (optional) * @param newClientStrategyId (optional) * @param recvWindow (optional) @@ -9703,12 +9645,10 @@ private okhttp3.Call queryUmConditionalOrderHistoryValidateBeforeCall( * 200 UM Conditional Order History - * * - * @deprecated * @see Query - * UM Conditional Order History Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-um-conditional-order-history">Query + * UM Conditional Order History (USER_DATA) Documentation */ - @Deprecated public ApiResponse queryUmConditionalOrderHistory( @NotNull String symbol, Long strategyId, String newClientStrategyId, Long recvWindow) throws ApiException { @@ -9723,12 +9663,12 @@ public ApiResponse queryUmConditionalOrd /** * Build call for queryUmModifyOrderHistory * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -9740,8 +9680,8 @@ public ApiResponse queryUmConditionalOrd * * * @see Query - * UM Modify Order History(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-um-modify-order-history">Query + * UM Modify Order History (TRADE) Documentation */ private okhttp3.Call queryUmModifyOrderHistoryCall( String symbol, @@ -9887,16 +9827,16 @@ private okhttp3.Call queryUmModifyOrderHistoryValidateBeforeCall( } /** - * Query UM Modify Order History(TRADE) Get order modification history * Either - * `orderId` or `origClientOrderId` must be sent, and the - * `orderId` will prevail if both are sent. Weight: 1 + * Query UM Modify Order History (TRADE) Get order modification history Weight(IP): 1 Security + * Type: TRADE Notes: - Either `orderId` or `origClientOrderId` must be + * sent, and the `orderId` will prevail if both are sent. * - * @param symbol (required) - * @param orderId (optional) - * @param origClientOrderId (optional) + * @param symbol Symbol (required) + * @param orderId Order ID (optional) + * @param origClientOrderId Client order ID (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<QueryUmModifyOrderHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -9909,8 +9849,8 @@ private okhttp3.Call queryUmModifyOrderHistoryValidateBeforeCall( * * * @see Query - * UM Modify Order History(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-um-modify-order-history">Query + * UM Modify Order History (TRADE) Documentation */ public ApiResponse queryUmModifyOrderHistory( @NotNull String symbol, @@ -9918,7 +9858,7 @@ public ApiResponse queryUmModifyOrderHistory( String origClientOrderId, Long startTime, Long endTime, - Long limit, + @Max(1000L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -9932,7 +9872,7 @@ public ApiResponse queryUmModifyOrderHistory( /** * Build call for queryUmOrder * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) * @param recvWindow (optional) @@ -9946,7 +9886,7 @@ public ApiResponse queryUmModifyOrderHistory( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-um-order">Query * UM Order (USER_DATA) Documentation */ private okhttp3.Call queryUmOrderCall( @@ -10063,12 +10003,13 @@ private okhttp3.Call queryUmOrderValidateBeforeCall( } /** - * Query UM Order (USER_DATA) Check an UM order's status. * These orders will not be found: - * * Either `orderId` or `origClientOrderId` must be sent. * order status is - * `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** * - * created time + 3 days < current time Weight: 1 + * Query UM Order (USER_DATA) Check an UM order's status. Weight(IP): 1 Security Type: + * USER_DATA Notes: - These orders will not be found: - Either `orderId` or + * `origClientOrderId` must be sent. - order status is `CANCELED` or + * `EXPIRED`, **AND** - order has NO filled trade, **AND** - created time + 3 days + * < current time * - * @param symbol (required) + * @param symbol Symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) * @param recvWindow (optional) @@ -10083,7 +10024,7 @@ private okhttp3.Call queryUmOrderValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-um-order">Query * UM Order (USER_DATA) Documentation */ public ApiResponse queryUmOrder( @@ -10104,8 +10045,8 @@ public ApiResponse queryUmOrder( * orders. (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) - * @param recvWindow (optional) + * @param limit Number of results returned. (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -10116,8 +10057,8 @@ public ApiResponse queryUmOrder( * * * @see Query - * User's CM Force Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-users-cm-force-orders">Query + * User's CM Force Orders (USER_DATA) Documentation */ private okhttp3.Call queryUsersCmForceOrdersCall( String symbol, @@ -10256,19 +10197,19 @@ private okhttp3.Call queryUsersCmForceOrdersValidateBeforeCall( } /** - * Query User's CM Force Orders(USER_DATA) Query User's CM Force Orders * If - * \"autoCloseType\" is not sent, orders with both of the types will be returned * If + * Query User's CM Force Orders (USER_DATA) Query User's CM Force Orders Weight: - 20 + * with `symbol` - 50 without `symbol` Security Type: USER_DATA Notes: - If + * \"autoCloseType\" is not sent, orders with both of the types will be returned - If * \"startTime\" is not sent, data within 7 days before \"endTime\" can be - * queried * Only support querying data in the past 90 days Weight: 20 with symbol, 50 without - * symbol + * queried * * @param symbol (optional) * @param autoCloseType `LIQUIDATION` for liquidation orders, `ADL` for ADL * orders. (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) - * @param recvWindow (optional) + * @param limit Number of results returned. (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return ApiResponse<QueryUsersCmForceOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -10280,15 +10221,15 @@ private okhttp3.Call queryUsersCmForceOrdersValidateBeforeCall( * * * @see Query - * User's CM Force Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-users-cm-force-orders">Query + * User's CM Force Orders (USER_DATA) Documentation */ public ApiResponse queryUsersCmForceOrders( String symbol, AutoCloseType autoCloseType, Long startTime, Long endTime, - Long limit, + @Max(100L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -10304,9 +10245,9 @@ public ApiResponse queryUsersCmForceOrders( * * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param recvWindow (optional) + * @param current Current page number. (optional) + * @param size Number of results returned. (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -10317,8 +10258,8 @@ public ApiResponse queryUsersCmForceOrders( * * * @see Query - * User's Margin Force Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-users-margin-force-orders">Query + * User's Margin Force Orders (USER_DATA) Documentation */ private okhttp3.Call queryUsersMarginForceOrdersCall( Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -10439,14 +10380,14 @@ private okhttp3.Call queryUsersMarginForceOrdersValidateBeforeCall( } /** - * Query User's Margin Force Orders(USER_DATA) Query user's margin force orders Weight: - * 1 + * Query User's Margin Force Orders (USER_DATA) Query user's margin force orders + * Weight(IP): 1 Security Type: USER_DATA * * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param recvWindow (optional) + * @param current Current page number. (optional) + * @param size Number of results returned. (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return ApiResponse<QueryUsersMarginForceOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -10458,11 +10399,11 @@ private okhttp3.Call queryUsersMarginForceOrdersValidateBeforeCall( * * * @see Query - * User's Margin Force Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-users-margin-force-orders">Query + * User's Margin Force Orders (USER_DATA) Documentation */ public ApiResponse queryUsersMarginForceOrders( - Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long startTime, Long endTime, Long current, @Max(100L) Long size, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryUsersMarginForceOrdersValidateBeforeCall( @@ -10480,8 +10421,8 @@ public ApiResponse queryUsersMarginForceOrd * orders. (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) - * @param recvWindow (optional) + * @param limit Number of results returned. (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -10492,7 +10433,7 @@ public ApiResponse queryUsersMarginForceOrd * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-users-um-force-orders">Query * User's UM Force Orders (USER_DATA) Documentation */ private okhttp3.Call queryUsersUmForceOrdersCall( @@ -10632,19 +10573,19 @@ private okhttp3.Call queryUsersUmForceOrdersValidateBeforeCall( } /** - * Query User's UM Force Orders (USER_DATA) Query User's UM Force Orders * If - * `autoCloseType` is not sent, orders with both of the types will be returned * If + * Query User's UM Force Orders (USER_DATA) Query User's UM Force Orders Weight: - 20 + * with `symbol` - 50 without `symbol` Security Type: USER_DATA Notes: - If + * `autoCloseType` is not sent, orders with both of the types will be returned - If * `startTime` is not sent, data within 7 days before `endTime` can be - * queried * Only support querying data in the past 90 days Weight: 20 with symbol, 50 without - * symbol + * queried * * @param symbol (optional) * @param autoCloseType `LIQUIDATION` for liquidation orders, `ADL` for ADL * orders. (optional) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) - * @param recvWindow (optional) + * @param limit Number of results returned. (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return ApiResponse<QueryUsersUmForceOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -10656,7 +10597,7 @@ private okhttp3.Call queryUsersUmForceOrdersValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-users-um-force-orders">Query * User's UM Force Orders (USER_DATA) Documentation */ public ApiResponse queryUsersUmForceOrders( @@ -10664,7 +10605,7 @@ public ApiResponse queryUsersUmForceOrders( AutoCloseType autoCloseType, Long startTime, Long endTime, - Long limit, + @Max(100L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -10689,7 +10630,7 @@ public ApiResponse queryUsersUmForceOrders( * * * @see Toggle + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#toggle-bnb-burn-on-um-futures-trade">Toggle * BNB Burn On UM Futures Trade (TRADE) Documentation */ private okhttp3.Call toggleBnbBurnOnUmFuturesTradeCall( @@ -10796,8 +10737,9 @@ private okhttp3.Call toggleBnbBurnOnUmFuturesTradeValidateBeforeCall( /** * Toggle BNB Burn On UM Futures Trade (TRADE) Change user's BNB Fee Discount for UM Futures - * (Fee Discount On or Fee Discount Off ) on ***EVERY symbol*** * The BNB would not be collected - * from UM-PM account to the Portfolio Margin account. Weight: 1 + * (Fee Discount On or Fee Discount Off ) on ***EVERY symbol*** Weight(IP): 1 Security Type: + * TRADE Notes: - The BNB would not be collected from UM-PM account to the Portfolio Margin + * account. * * @param toggleBnbBurnOnUmFuturesTradeRequest (required) * @return ApiResponse<ToggleBnbBurnOnUmFuturesTradeResponse> @@ -10811,7 +10753,7 @@ private okhttp3.Call toggleBnbBurnOnUmFuturesTradeValidateBeforeCall( * * * @see Toggle + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#toggle-bnb-burn-on-um-futures-trade">Toggle * BNB Burn On UM Futures Trade (TRADE) Documentation */ public ApiResponse toggleBnbBurnOnUmFuturesTrade( @@ -10829,11 +10771,11 @@ public ApiResponse toggleBnbBurnOnUmFutur /** * Build call for umAccountTradeList * - * @param symbol (required) + * @param symbol Symbol (required) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) - * @param limit Default 100; max 1000 (optional) + * @param fromId Trade ID to fetch from. (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -10845,8 +10787,8 @@ public ApiResponse toggleBnbBurnOnUmFutur * * * @see UM - * Account Trade List(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#um-account-trade-list">UM + * Account Trade List (USER_DATA) Documentation */ private okhttp3.Call umAccountTradeListCall( String symbol, Long startTime, Long endTime, Long fromId, Long limit, Long recvWindow) @@ -10972,17 +10914,18 @@ private okhttp3.Call umAccountTradeListValidateBeforeCall( } /** - * UM Account Trade List(USER_DATA) Get trades for a specific account and UM symbol. * If - * `startTime` and `endTime` are both not sent, then the last '7 - * days' data will be returned. * The time between `startTime` and - * `endTime` cannot be longer than 7 days. * The parameter `fromId` cannot - * be sent with `startTime` or `endTime`. Weight: 5 - * - * @param symbol (required) + * UM Account Trade List (USER_DATA) Get trades for a specific account and UM symbol. + * Weight(IP): 5 Security Type: USER_DATA Notes: - If `startTime` and + * `endTime` are both not sent, then the last '7 days' data will be returned. + * - The time between `startTime` and `endTime` cannot be longer than 7 + * days. - The parameter `fromId` cannot be sent with `startTime` or + * `endTime`. + * + * @param symbol Symbol (required) * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) - * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) - * @param limit Default 100; max 1000 (optional) + * @param fromId Trade ID to fetch from. (optional) + * @param limit Number of results returned. (optional) * @param recvWindow (optional) * @return ApiResponse<UmAccountTradeListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -10995,15 +10938,15 @@ private okhttp3.Call umAccountTradeListValidateBeforeCall( * * * @see UM - * Account Trade List(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#um-account-trade-list">UM + * Account Trade List (USER_DATA) Documentation */ public ApiResponse umAccountTradeList( @NotNull String symbol, Long startTime, Long endTime, Long fromId, - Long limit, + @Max(1000L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -11029,8 +10972,8 @@ public ApiResponse umAccountTradeList( * * * @see UM - * Position ADL Quantile Estimation(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#um-position-adl-quantile-estimation">UM + * Position ADL Quantile Estimation (USER_DATA) Documentation */ private okhttp3.Call umPositionAdlQuantileEstimationCall(String symbol, Long recvWindow) throws ApiException { @@ -11130,7 +11073,7 @@ private okhttp3.Call umPositionAdlQuantileEstimationValidateBeforeCall( } /** - * UM Position ADL Quantile Estimation(USER_DATA) Query UM Position ADL Quantile Estimation * + * UM Position ADL Quantile Estimation (USER_DATA) Query UM Position ADL Quantile Estimation * * Values update every 30s. * Values 0, 1, 2, 3, 4 shows the queue position and possibility of * ADL from low to high. * For positions of the symbol are in One-way Mode or isolated margined * in Hedge Mode, \"LONG\", \"SHORT\", and \"BOTH\" will be @@ -11138,7 +11081,8 @@ private okhttp3.Call umPositionAdlQuantileEstimationValidateBeforeCall( * positions of the symbol are crossed margined in Hedge Mode: * \"HEDGE\" as a sign * will be returned instead of \"BOTH\"; * A same value caculated on unrealized pnls * on long and short sides' positions will be shown for \"LONG\" and - * \"SHORT\" when there are positions in both of long and short sides. Weight: 5 + * \"SHORT\" when there are positions in both of long and short sides. Weight(IP): 5 + * Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -11153,8 +11097,8 @@ private okhttp3.Call umPositionAdlQuantileEstimationValidateBeforeCall( * * * @see UM - * Position ADL Quantile Estimation(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#um-position-adl-quantile-estimation">UM + * Position ADL Quantile Estimation (USER_DATA) Documentation */ public ApiResponse umPositionAdlQuantileEstimation( String symbol, Long recvWindow) throws ApiException { diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/UserDataStreamsApi.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/UserDataStreamsApi.java index b45f9b85b..9ea5d425d 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/UserDataStreamsApi.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/UserDataStreamsApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -42,7 +42,7 @@ public class UserDataStreamsApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-portfolio-margin/6.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-portfolio-margin/7.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -92,8 +92,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Close - * User Data Stream(USER_STREAM) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/user-data-streams#close-user-data-stream">Close + * User Data Stream (USER_STREAM) Documentation */ private okhttp3.Call closeUserDataStreamCall() throws ApiException { String basePath = null; @@ -180,7 +180,8 @@ private okhttp3.Call closeUserDataStreamValidateBeforeCall() throws ApiException } /** - * Close User Data Stream(USER_STREAM) Close out a user data stream. Weight: 1 + * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight(IP): 1 Security + * Type: USER_STREAM * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -193,8 +194,8 @@ private okhttp3.Call closeUserDataStreamValidateBeforeCall() throws ApiException * * * @see Close - * User Data Stream(USER_STREAM) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/user-data-streams#close-user-data-stream">Close + * User Data Stream (USER_STREAM) Documentation */ public ApiResponse closeUserDataStream() throws ApiException { okhttp3.Call localVarCall = closeUserDataStreamValidateBeforeCall(); @@ -214,7 +215,7 @@ public ApiResponse closeUserDataStream() throws ApiException { * * * @see Keepalive + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/user-data-streams#keepalive-user-data-stream">Keepalive * User Data Stream (USER_STREAM) Documentation */ private okhttp3.Call keepaliveUserDataStreamCall() throws ApiException { @@ -304,7 +305,7 @@ private okhttp3.Call keepaliveUserDataStreamValidateBeforeCall() throws ApiExcep /** * Keepalive User Data Stream (USER_STREAM) Keepalive a user data stream to prevent a time out. * User data streams will close after 60 minutes. It's recommended to send a ping about - * every 60 minutes. Weight: 1 + * every 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -317,7 +318,7 @@ private okhttp3.Call keepaliveUserDataStreamValidateBeforeCall() throws ApiExcep * * * @see Keepalive + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/user-data-streams#keepalive-user-data-stream">Keepalive * User Data Stream (USER_STREAM) Documentation */ public ApiResponse keepaliveUserDataStream() throws ApiException { @@ -338,8 +339,8 @@ public ApiResponse keepaliveUserDataStream() throws ApiException { * * * @see Start - * User Data Stream(USER_STREAM) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/user-data-streams#start-user-data-stream">Start + * User Data Stream (USER_STREAM) Documentation */ private okhttp3.Call startUserDataStreamCall() throws ApiException { String basePath = null; @@ -426,10 +427,10 @@ private okhttp3.Call startUserDataStreamValidateBeforeCall() throws ApiException } /** - * Start User Data Stream(USER_STREAM) Start a new user data stream. The stream will close after - * 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, - * that `listenKey` will be returned and its validity will be extended for 60 minutes. - * Weight: 1 + * Start User Data Stream (USER_STREAM) Start a new user data stream. The stream will close + * after 60 minutes unless a keepalive is sent. If the account has an active + * `listenKey`, that `listenKey` will be returned and its validity will be + * extended for 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * * @return ApiResponse<StartUserDataStreamResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -442,8 +443,8 @@ private okhttp3.Call startUserDataStreamValidateBeforeCall() throws ApiException * * * @see Start - * User Data Stream(USER_STREAM) Documentation + * href="https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/user-data-streams#start-user-data-stream">Start + * User Data Stream (USER_STREAM) Documentation */ public ApiResponse startUserDataStream() throws ApiException { okhttp3.Call localVarCall = startUserDataStreamValidateBeforeCall(); diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse.java index 7a6c8b259..b29176dfa 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountBalanceResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(AccountBalanceResponse.class.getName()); diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse1.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse1.java index 4aed0a36a..825ffb5c1 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse1.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountBalanceResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountBalanceResponse1 extends ArrayList { public AccountBalanceResponse1() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse1Inner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse1Inner.java index 7b995f7ff..45b9c1a4a 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse1Inner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse1Inner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountBalanceResponse1Inner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountBalanceResponse1Inner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -122,7 +122,7 @@ public AccountBalanceResponse1Inner asset(@jakarta.annotation.Nullable String as } /** - * Get asset + * asset name * * @return asset */ @@ -142,7 +142,7 @@ public AccountBalanceResponse1Inner totalWalletBalance( } /** - * Get totalWalletBalance + * Total Wallet Balance. * * @return totalWalletBalance */ @@ -162,7 +162,7 @@ public AccountBalanceResponse1Inner crossMarginAsset( } /** - * Get crossMarginAsset + * Cross Margin Asset. * * @return crossMarginAsset */ @@ -182,7 +182,7 @@ public AccountBalanceResponse1Inner crossMarginBorrowed( } /** - * Get crossMarginBorrowed + * Cross Margin Borrowed. * * @return crossMarginBorrowed */ @@ -202,7 +202,7 @@ public AccountBalanceResponse1Inner crossMarginFree( } /** - * Get crossMarginFree + * Cross Margin Free. * * @return crossMarginFree */ @@ -222,7 +222,7 @@ public AccountBalanceResponse1Inner crossMarginInterest( } /** - * Get crossMarginInterest + * Cross Margin Interest. * * @return crossMarginInterest */ @@ -242,7 +242,7 @@ public AccountBalanceResponse1Inner crossMarginLocked( } /** - * Get crossMarginLocked + * Cross Margin Locked. * * @return crossMarginLocked */ @@ -262,7 +262,7 @@ public AccountBalanceResponse1Inner umWalletBalance( } /** - * Get umWalletBalance + * Um Wallet Balance. * * @return umWalletBalance */ @@ -282,7 +282,7 @@ public AccountBalanceResponse1Inner umUnrealizedPNL( } /** - * Get umUnrealizedPNL + * Um Unrealized PNL. * * @return umUnrealizedPNL */ @@ -302,7 +302,7 @@ public AccountBalanceResponse1Inner cmWalletBalance( } /** - * Get cmWalletBalance + * Cm Wallet Balance. * * @return cmWalletBalance */ @@ -322,7 +322,7 @@ public AccountBalanceResponse1Inner cmUnrealizedPNL( } /** - * Get cmUnrealizedPNL + * Cm Unrealized PNL. * * @return cmUnrealizedPNL */ @@ -341,7 +341,7 @@ public AccountBalanceResponse1Inner updateTime(@jakarta.annotation.Nullable Long } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -361,7 +361,7 @@ public AccountBalanceResponse1Inner negativeBalance( } /** - * Get negativeBalance + * negative balance amount * * @return negativeBalance */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse2.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse2.java index 148e95ba7..bb8fa47ed 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse2.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountBalanceResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountBalanceResponse2 { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -116,7 +116,7 @@ public AccountBalanceResponse2 asset(@jakarta.annotation.Nullable String asset) } /** - * Get asset + * asset name * * @return asset */ @@ -136,7 +136,7 @@ public AccountBalanceResponse2 totalWalletBalance( } /** - * Get totalWalletBalance + * Total Wallet Balance. * * @return totalWalletBalance */ @@ -156,7 +156,7 @@ public AccountBalanceResponse2 crossMarginBorrowed( } /** - * Get crossMarginBorrowed + * Cross Margin Borrowed. * * @return crossMarginBorrowed */ @@ -176,7 +176,7 @@ public AccountBalanceResponse2 crossMarginFree( } /** - * Get crossMarginFree + * Cross Margin Free. * * @return crossMarginFree */ @@ -196,7 +196,7 @@ public AccountBalanceResponse2 crossMarginInterest( } /** - * Get crossMarginInterest + * Cross Margin Interest. * * @return crossMarginInterest */ @@ -216,7 +216,7 @@ public AccountBalanceResponse2 crossMarginLocked( } /** - * Get crossMarginLocked + * Cross Margin Locked. * * @return crossMarginLocked */ @@ -236,7 +236,7 @@ public AccountBalanceResponse2 umWalletBalance( } /** - * Get umWalletBalance + * Um Wallet Balance. * * @return umWalletBalance */ @@ -256,7 +256,7 @@ public AccountBalanceResponse2 umUnrealizedPNL( } /** - * Get umUnrealizedPNL + * Um Unrealized PNL. * * @return umUnrealizedPNL */ @@ -276,7 +276,7 @@ public AccountBalanceResponse2 cmWalletBalance( } /** - * Get cmWalletBalance + * Cm Wallet Balance. * * @return cmWalletBalance */ @@ -296,7 +296,7 @@ public AccountBalanceResponse2 cmUnrealizedPNL( } /** - * Get cmUnrealizedPNL + * Cm Unrealized PNL. * * @return cmUnrealizedPNL */ @@ -315,7 +315,7 @@ public AccountBalanceResponse2 updateTime(@jakarta.annotation.Nullable Long upda } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -335,7 +335,7 @@ public AccountBalanceResponse2 negativeBalance( } /** - * Get negativeBalance + * negative balance amount * * @return negativeBalance */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountInformationResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountInformationResponse.java index 35057fb7c..75cd5378b 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountInformationResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountInformationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountInformationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationResponse { public static final String SERIALIZED_NAME_UNI_M_M_R = "uniMMR"; @@ -105,7 +105,7 @@ public AccountInformationResponse uniMMR(@jakarta.annotation.Nullable String uni } /** - * Get uniMMR + * Portfolio margin account maintenance margin rate * * @return uniMMR */ @@ -125,7 +125,7 @@ public AccountInformationResponse accountEquity( } /** - * Get accountEquity + * Account equity, in USD value * * @return accountEquity */ @@ -145,7 +145,7 @@ public AccountInformationResponse actualEquity( } /** - * Get actualEquity + * Account equity without collateral rate, in USD value * * @return actualEquity */ @@ -165,7 +165,7 @@ public AccountInformationResponse accountInitialMargin( } /** - * Get accountInitialMargin + * Account Initial Margin. * * @return accountInitialMargin */ @@ -185,7 +185,7 @@ public AccountInformationResponse accountMaintMargin( } /** - * Get accountMaintMargin + * Portfolio margin account maintenance margin, unit:USD * * @return accountMaintMargin */ @@ -205,7 +205,9 @@ public AccountInformationResponse accountStatus( } /** - * Get accountStatus + * Portfolio margin account status:\"NORMAL\", \"MARGIN_CALL\", + * \"SUPPLY_MARGIN\", \"REDUCE_ONLY\", \"ACTIVE_LIQUIDATION\", + * \"FORCE_LIQUIDATION\", \"BANKRUPTED\" * * @return accountStatus */ @@ -225,7 +227,7 @@ public AccountInformationResponse virtualMaxWithdrawAmount( } /** - * Get virtualMaxWithdrawAmount + * Portfolio margin maximum amount for transfer out in USD * * @return virtualMaxWithdrawAmount */ @@ -246,7 +248,7 @@ public AccountInformationResponse totalAvailableBalance( } /** - * Get totalAvailableBalance + * Total Available Balance. * * @return totalAvailableBalance */ @@ -267,7 +269,7 @@ public AccountInformationResponse totalMarginOpenLoss( } /** - * Get totalMarginOpenLoss + * in USD margin open order * * @return totalMarginOpenLoss */ @@ -286,7 +288,7 @@ public AccountInformationResponse updateTime(@jakarta.annotation.Nullable Long u } /** - * Get updateTime + * last update time * * @return updateTime */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AlgoType.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AlgoType.java new file mode 100644 index 000000000..a16741d78 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AlgoType.java @@ -0,0 +1,71 @@ +/* + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Only support `CONDITIONAL` */ +@JsonAdapter(AlgoType.Adapter.class) +public enum AlgoType { + CONDITIONAL("CONDITIONAL"); + + private String value; + + AlgoType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AlgoType fromValue(String value) { + for (AlgoType b : AlgoType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AlgoType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AlgoType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AlgoType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AlgoType.fromValue(value); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/Archived.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/Archived.java new file mode 100644 index 000000000..903e274d1 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/Archived.java @@ -0,0 +1,73 @@ +/* + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets archived */ +@JsonAdapter(Archived.Adapter.class) +public enum Archived { + TRUE("true"), + + FALSE("false"); + + private String value; + + Archived(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Archived fromValue(String value) { + for (Archived b : Archived.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Archived enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Archived read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Archived.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Archived.fromValue(value); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AutoCloseType.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AutoCloseType.java index 79ddac29a..266915e84 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AutoCloseType.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AutoCloseType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AutoRepay.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AutoRepay.java new file mode 100644 index 000000000..7c844f1b7 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AutoRepay.java @@ -0,0 +1,73 @@ +/* + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** `false` for turn off the auto-repay futures negative balance function */ +@JsonAdapter(AutoRepay.Adapter.class) +public enum AutoRepay { + TRUE("true"), + + FALSE("false"); + + private String value; + + AutoRepay(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AutoRepay fromValue(String value) { + for (AutoRepay b : AutoRepay.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AutoRepay enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AutoRepay read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AutoRepay.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AutoRepay.fromValue(value); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/BnbTransferRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/BnbTransferRequest.java index 60c4bc49b..f97ade59d 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/BnbTransferRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/BnbTransferRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** BnbTransferRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BnbTransferRequest { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -47,7 +47,7 @@ public class BnbTransferRequest { @SerializedName(SERIALIZED_NAME_TRANSFER_SIDE) @jakarta.annotation.Nonnull - private String transferSide; + private TransferSide transferSide; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -78,7 +78,7 @@ public void setAmount(@jakarta.annotation.Nonnull Double amount) { this.amount = amount; } - public BnbTransferRequest transferSide(@jakarta.annotation.Nonnull String transferSide) { + public BnbTransferRequest transferSide(@jakarta.annotation.Nonnull TransferSide transferSide) { this.transferSide = transferSide; return this; } @@ -90,11 +90,12 @@ public BnbTransferRequest transferSide(@jakarta.annotation.Nonnull String transf */ @jakarta.annotation.Nonnull @NotNull - public String getTransferSide() { + @Valid + public TransferSide getTransferSide() { return transferSide; } - public void setTransferSide(@jakarta.annotation.Nonnull String transferSide) { + public void setTransferSide(@jakarta.annotation.Nonnull TransferSide transferSide) { this.transferSide = transferSide; } @@ -104,11 +105,12 @@ public BnbTransferRequest recvWindow(@jakarta.annotation.Nullable Long recvWindo } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -228,13 +230,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("transferSide").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `transferSide` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("transferSide").toString())); - } + // validate the required field `transferSide` + TransferSide.validateJsonElement(jsonObj.get("transferSide")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/BnbTransferResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/BnbTransferResponse.java index 44e64f4de..ff836f9fb 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/BnbTransferResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/BnbTransferResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** BnbTransferResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BnbTransferResponse { public static final String SERIALIZED_NAME_TRAN_ID = "tranId"; @@ -50,7 +50,7 @@ public BnbTransferResponse tranId(@jakarta.annotation.Nullable Long tranId) { } /** - * Get tranId + * Transaction ID. * * @return tranId */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllCmOpenConditionalOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllCmOpenConditionalOrdersResponse.java index ea98bcb25..59fa2b75a 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllCmOpenConditionalOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllCmOpenConditionalOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelAllCmOpenConditionalOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelAllCmOpenConditionalOrdersResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -56,7 +56,7 @@ public CancelAllCmOpenConditionalOrdersResponse code(@jakarta.annotation.Nullabl } /** - * Get code + * Code. * * @return code */ @@ -75,7 +75,7 @@ public CancelAllCmOpenConditionalOrdersResponse msg(@jakarta.annotation.Nullable } /** - * Get msg + * Msg. * * @return msg */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllCmOpenOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllCmOpenOrdersResponse.java index 88e5b5e2d..cd22417e3 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllCmOpenOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllCmOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelAllCmOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelAllCmOpenOrdersResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -56,7 +56,7 @@ public CancelAllCmOpenOrdersResponse code(@jakarta.annotation.Nullable Long code } /** - * Get code + * Code. * * @return code */ @@ -75,7 +75,7 @@ public CancelAllCmOpenOrdersResponse msg(@jakarta.annotation.Nullable String msg } /** - * Get msg + * Msg. * * @return msg */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllUmAlgoOpenOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllUmAlgoOpenOrdersResponse.java index fad8af60e..ff42ccb00 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllUmAlgoOpenOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllUmAlgoOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,13 +34,13 @@ /** CancelAllUmAlgoOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelAllUmAlgoOpenOrdersResponse { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) @jakarta.annotation.Nullable - private Long code; + private Integer code; public static final String SERIALIZED_NAME_MSG = "msg"; @@ -50,7 +50,7 @@ public class CancelAllUmAlgoOpenOrdersResponse { public CancelAllUmAlgoOpenOrdersResponse() {} - public CancelAllUmAlgoOpenOrdersResponse code(@jakarta.annotation.Nullable Long code) { + public CancelAllUmAlgoOpenOrdersResponse code(@jakarta.annotation.Nullable Integer code) { this.code = code; return this; } @@ -61,11 +61,11 @@ public CancelAllUmAlgoOpenOrdersResponse code(@jakarta.annotation.Nullable Long * @return code */ @jakarta.annotation.Nullable - public Long getCode() { + public Integer getCode() { return code; } - public void setCode(@jakarta.annotation.Nullable Long code) { + public void setCode(@jakarta.annotation.Nullable Integer code) { this.code = code; } diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllUmOpenConditionalOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllUmOpenConditionalOrdersResponse.java index d9a14893d..cef59be21 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllUmOpenConditionalOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllUmOpenConditionalOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelAllUmOpenConditionalOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelAllUmOpenConditionalOrdersResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -56,7 +56,7 @@ public CancelAllUmOpenConditionalOrdersResponse code(@jakarta.annotation.Nullabl } /** - * Get code + * Code. * * @return code */ @@ -75,7 +75,7 @@ public CancelAllUmOpenConditionalOrdersResponse msg(@jakarta.annotation.Nullable } /** - * Get msg + * Msg. * * @return msg */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllUmOpenOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllUmOpenOrdersResponse.java index 6f1d02bb1..f1dddc50e 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllUmOpenOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelAllUmOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelAllUmOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelAllUmOpenOrdersResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -56,7 +56,7 @@ public CancelAllUmOpenOrdersResponse code(@jakarta.annotation.Nullable Long code } /** - * Get code + * Code. * * @return code */ @@ -75,7 +75,7 @@ public CancelAllUmOpenOrdersResponse msg(@jakarta.annotation.Nullable String msg } /** - * Get msg + * Msg. * * @return msg */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelCmConditionalOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelCmConditionalOrderResponse.java index ade273afd..45641c5f2 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelCmConditionalOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelCmConditionalOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelCmConditionalOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelCmConditionalOrderResponse { public static final String SERIALIZED_NAME_NEW_CLIENT_STRATEGY_ID = "newClientStrategyId"; @@ -153,7 +153,7 @@ public CancelCmConditionalOrderResponse newClientStrategyId( } /** - * Get newClientStrategyId + * New Client Strategy ID. * * @return newClientStrategyId */ @@ -173,7 +173,7 @@ public CancelCmConditionalOrderResponse strategyId( } /** - * Get strategyId + * Strategy ID. * * @return strategyId */ @@ -193,7 +193,7 @@ public CancelCmConditionalOrderResponse strategyStatus( } /** - * Get strategyStatus + * Strategy Status. * * @return strategyStatus */ @@ -213,7 +213,7 @@ public CancelCmConditionalOrderResponse strategyType( } /** - * Get strategyType + * Strategy Type. * * @return strategyType */ @@ -232,7 +232,7 @@ public CancelCmConditionalOrderResponse origQty(@jakarta.annotation.Nullable Str } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -251,7 +251,7 @@ public CancelCmConditionalOrderResponse price(@jakarta.annotation.Nullable Strin } /** - * Get price + * Price. * * @return price */ @@ -271,7 +271,7 @@ public CancelCmConditionalOrderResponse reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -290,7 +290,7 @@ public CancelCmConditionalOrderResponse side(@jakarta.annotation.Nullable String } /** - * Get side + * Side. * * @return side */ @@ -310,7 +310,7 @@ public CancelCmConditionalOrderResponse positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -330,7 +330,7 @@ public CancelCmConditionalOrderResponse stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -349,7 +349,7 @@ public CancelCmConditionalOrderResponse symbol(@jakarta.annotation.Nullable Stri } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -369,7 +369,7 @@ public CancelCmConditionalOrderResponse timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -389,7 +389,7 @@ public CancelCmConditionalOrderResponse activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -409,7 +409,7 @@ public CancelCmConditionalOrderResponse priceRate( } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -428,7 +428,7 @@ public CancelCmConditionalOrderResponse bookTime(@jakarta.annotation.Nullable Lo } /** - * Get bookTime + * order place time * * @return bookTime */ @@ -448,7 +448,7 @@ public CancelCmConditionalOrderResponse updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -468,7 +468,7 @@ public CancelCmConditionalOrderResponse workingType( } /** - * Get workingType + * Working Type. * * @return workingType */ @@ -488,7 +488,7 @@ public CancelCmConditionalOrderResponse priceProtect( } /** - * Get priceProtect + * Price Protect. * * @return priceProtect */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelCmOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelCmOrderResponse.java index 60593f036..f116b7f6e 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelCmOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelCmOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,14 +34,8 @@ /** CancelCmOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelCmOrderResponse { - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE) - @jakarta.annotation.Nullable - private String avgPrice; - public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @SerializedName(SERIALIZED_NAME_CLIENT_ORDER_ID) @@ -54,12 +48,6 @@ public class CancelCmOrderResponse { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_BASE = "cumBase"; - - @SerializedName(SERIALIZED_NAME_CUM_BASE) - @jakarta.annotation.Nullable - private String cumBase; - public static final String SERIALIZED_NAME_EXECUTED_QTY = "executedQty"; @SerializedName(SERIALIZED_NAME_EXECUTED_QTY) @@ -140,32 +128,13 @@ public class CancelCmOrderResponse { public CancelCmOrderResponse() {} - public CancelCmOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - return this; - } - - /** - * Get avgPrice - * - * @return avgPrice - */ - @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; - } - - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - } - public CancelCmOrderResponse clientOrderId(@jakarta.annotation.Nullable String clientOrderId) { this.clientOrderId = clientOrderId; return this; } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -184,7 +153,7 @@ public CancelCmOrderResponse cumQty(@jakarta.annotation.Nullable String cumQty) } /** - * Get cumQty + * Cum Qty. * * @return cumQty */ @@ -197,32 +166,13 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public CancelCmOrderResponse cumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - return this; - } - - /** - * Get cumBase - * - * @return cumBase - */ - @jakarta.annotation.Nullable - public String getCumBase() { - return cumBase; - } - - public void setCumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - } - public CancelCmOrderResponse executedQty(@jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; return this; } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -241,7 +191,7 @@ public CancelCmOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -260,7 +210,7 @@ public CancelCmOrderResponse origQty(@jakarta.annotation.Nullable String origQty } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -279,7 +229,7 @@ public CancelCmOrderResponse price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Price. * * @return price */ @@ -298,7 +248,7 @@ public CancelCmOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean red } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -317,7 +267,7 @@ public CancelCmOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Side. * * @return side */ @@ -336,7 +286,7 @@ public CancelCmOrderResponse positionSide(@jakarta.annotation.Nullable String po } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -355,7 +305,7 @@ public CancelCmOrderResponse status(@jakarta.annotation.Nullable String status) } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -374,7 +324,7 @@ public CancelCmOrderResponse symbol(@jakarta.annotation.Nullable String symbol) } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -393,7 +343,7 @@ public CancelCmOrderResponse pair(@jakarta.annotation.Nullable String pair) { } /** - * Get pair + * Pair. * * @return pair */ @@ -412,7 +362,7 @@ public CancelCmOrderResponse timeInForce(@jakarta.annotation.Nullable String tim } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -431,7 +381,7 @@ public CancelCmOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -450,7 +400,7 @@ public CancelCmOrderResponse updateTime(@jakarta.annotation.Nullable Long update } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -472,10 +422,8 @@ public boolean equals(Object o) { return false; } CancelCmOrderResponse cancelCmOrderResponse = (CancelCmOrderResponse) o; - return Objects.equals(this.avgPrice, cancelCmOrderResponse.avgPrice) - && Objects.equals(this.clientOrderId, cancelCmOrderResponse.clientOrderId) + return Objects.equals(this.clientOrderId, cancelCmOrderResponse.clientOrderId) && Objects.equals(this.cumQty, cancelCmOrderResponse.cumQty) - && Objects.equals(this.cumBase, cancelCmOrderResponse.cumBase) && Objects.equals(this.executedQty, cancelCmOrderResponse.executedQty) && Objects.equals(this.orderId, cancelCmOrderResponse.orderId) && Objects.equals(this.origQty, cancelCmOrderResponse.origQty) @@ -494,10 +442,8 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - avgPrice, clientOrderId, cumQty, - cumBase, executedQty, orderId, origQty, @@ -517,10 +463,8 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CancelCmOrderResponse {\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumBase: ").append(toIndentedString(cumBase)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); @@ -541,10 +485,6 @@ public String toString() { public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); - Object avgPriceValue = getAvgPrice(); - String avgPriceValueAsString = ""; - avgPriceValueAsString = avgPriceValue.toString(); - sb.append("avgPrice=").append(urlEncode(avgPriceValueAsString)).append(""); Object clientOrderIdValue = getClientOrderId(); String clientOrderIdValueAsString = ""; clientOrderIdValueAsString = clientOrderIdValue.toString(); @@ -553,10 +493,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = ""; cumQtyValueAsString = cumQtyValue.toString(); sb.append("cumQty=").append(urlEncode(cumQtyValueAsString)).append(""); - Object cumBaseValue = getCumBase(); - String cumBaseValueAsString = ""; - cumBaseValueAsString = cumBaseValue.toString(); - sb.append("cumBase=").append(urlEncode(cumBaseValueAsString)).append(""); Object executedQtyValue = getExecutedQty(); String executedQtyValueAsString = ""; executedQtyValueAsString = executedQtyValue.toString(); @@ -637,10 +573,8 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("avgPrice"); openapiFields.add("clientOrderId"); openapiFields.add("cumQty"); - openapiFields.add("cumBase"); openapiFields.add("executedQty"); openapiFields.add("orderId"); openapiFields.add("origQty"); @@ -677,14 +611,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("clientOrderId") != null && !jsonObj.get("clientOrderId").isJsonNull()) && !jsonObj.get("clientOrderId").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -701,14 +627,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumBase") != null && !jsonObj.get("cumBase").isJsonNull()) - && !jsonObj.get("cumBase").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumBase` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("cumBase").toString())); - } if ((jsonObj.get("executedQty") != null && !jsonObj.get("executedQty").isJsonNull()) && !jsonObj.get("executedQty").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountAllOpenOrdersOnASymbolResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountAllOpenOrdersOnASymbolResponse.java index 7ca8fafbf..0238190eb 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountAllOpenOrdersOnASymbolResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountAllOpenOrdersOnASymbolResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelMarginAccountAllOpenOrdersOnASymbolResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelMarginAccountAllOpenOrdersOnASymbolResponse extends ArrayList { public CancelMarginAccountAllOpenOrdersOnASymbolResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountAllOpenOrdersOnASymbolResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountAllOpenOrdersOnASymbolResponseInner.java index a2f39ccb8..f6875de7b 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountAllOpenOrdersOnASymbolResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountAllOpenOrdersOnASymbolResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** CancelMarginAccountAllOpenOrdersOnASymbolResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelMarginAccountAllOpenOrdersOnASymbolResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -172,7 +172,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -192,7 +192,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner origClientOrderId( } /** - * Get origClientOrderId + * Orig Client Order ID. * * @return origClientOrderId */ @@ -212,7 +212,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -232,7 +232,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner orderListId( } /** - * Get orderListId + * Order List ID. * * @return orderListId */ @@ -252,7 +252,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -272,7 +272,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner price( } /** - * Get price + * Price. * * @return price */ @@ -292,7 +292,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner origQty( } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -312,7 +312,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner executedQty( } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -332,7 +332,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner cummulativeQuoteQt } /** - * Get cummulativeQuoteQty + * Cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -352,7 +352,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner status( } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -372,7 +372,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -392,7 +392,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner type( } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -412,7 +412,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner side( } /** - * Get side + * Side. * * @return side */ @@ -432,7 +432,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner contingencyType( } /** - * Get contingencyType + * Contingency Type. * * @return contingencyType */ @@ -452,7 +452,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner listStatusType( } /** - * Get listStatusType + * List Status Type. * * @return listStatusType */ @@ -472,7 +472,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner listOrderStatus( } /** - * Get listOrderStatus + * List Order Status. * * @return listOrderStatus */ @@ -492,7 +492,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner listClientOrderId( } /** - * Get listClientOrderId + * List Client Order ID. * * @return listClientOrderId */ @@ -512,7 +512,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner transactionTime( } /** - * Get transactionTime + * Transaction Time. * * @return transactionTime */ @@ -543,7 +543,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner addOrdersItem( } /** - * Get orders + * Orders. * * @return orders */ @@ -582,7 +582,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInner addOrderReportsIte } /** - * Get orderReports + * Order Reports. * * @return orderReports */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.java index 866add199..6a405395f 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -135,7 +135,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner s } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -155,7 +155,7 @@ public void setSymbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get origClientOrderId + * Orig Client Order ID. * * @return origClientOrderId */ @@ -175,7 +175,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner o } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -195,7 +195,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner o } /** - * Get orderListId + * Order List ID. * * @return orderListId */ @@ -215,7 +215,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner c } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -235,7 +235,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner p } /** - * Get price + * Price. * * @return price */ @@ -255,7 +255,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner o } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -275,7 +275,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner e } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -295,7 +295,7 @@ public void setExecutedQty(@jakarta.annotation.Nullable String executedQty) { } /** - * Get cummulativeQuoteQty + * Cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -315,7 +315,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner s } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -335,7 +335,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner t } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -355,7 +355,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner t } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -375,7 +375,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner s } /** - * Get side + * Side. * * @return side */ @@ -395,7 +395,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner s } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -415,7 +415,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner i } /** - * Get icebergQty + * Iceberg Qty. * * @return icebergQty */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner.java index 98ca6c138..35da8d066 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -83,7 +83,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner orderId } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -103,7 +103,7 @@ public CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner clientO } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountOcoOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountOcoOrdersResponse.java index b21f76e7c..884561e75 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountOcoOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountOcoOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** CancelMarginAccountOcoOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelMarginAccountOcoOrdersResponse { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; @@ -105,7 +105,7 @@ public CancelMarginAccountOcoOrdersResponse orderListId( } /** - * Get orderListId + * Order List ID. * * @return orderListId */ @@ -125,7 +125,7 @@ public CancelMarginAccountOcoOrdersResponse contingencyType( } /** - * Get contingencyType + * Contingency Type. * * @return contingencyType */ @@ -145,7 +145,7 @@ public CancelMarginAccountOcoOrdersResponse listStatusType( } /** - * Get listStatusType + * List Status Type. * * @return listStatusType */ @@ -165,7 +165,7 @@ public CancelMarginAccountOcoOrdersResponse listOrderStatus( } /** - * Get listOrderStatus + * List Order Status. * * @return listOrderStatus */ @@ -185,7 +185,7 @@ public CancelMarginAccountOcoOrdersResponse listClientOrderId( } /** - * Get listClientOrderId + * List Client Order ID. * * @return listClientOrderId */ @@ -205,7 +205,7 @@ public CancelMarginAccountOcoOrdersResponse transactionTime( } /** - * Get transactionTime + * Transaction Time. * * @return transactionTime */ @@ -224,7 +224,7 @@ public CancelMarginAccountOcoOrdersResponse symbol(@jakarta.annotation.Nullable } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -254,7 +254,7 @@ public CancelMarginAccountOcoOrdersResponse addOrdersItem( } /** - * Get orders + * Orders. * * @return orders */ @@ -288,7 +288,7 @@ public CancelMarginAccountOcoOrdersResponse addOrderReportsItem( } /** - * Get orderReports + * Order Reports. * * @return orderReports */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountOcoOrdersResponseOrderReportsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountOcoOrdersResponseOrderReportsInner.java index 0270db4fc..da74ae648 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountOcoOrdersResponseOrderReportsInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountOcoOrdersResponseOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelMarginAccountOcoOrdersResponseOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelMarginAccountOcoOrdersResponseOrderReportsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -129,7 +129,7 @@ public CancelMarginAccountOcoOrdersResponseOrderReportsInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -149,7 +149,7 @@ public CancelMarginAccountOcoOrdersResponseOrderReportsInner origClientOrderId( } /** - * Get origClientOrderId + * Orig Client Order ID. * * @return origClientOrderId */ @@ -169,7 +169,7 @@ public CancelMarginAccountOcoOrdersResponseOrderReportsInner orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -189,7 +189,7 @@ public CancelMarginAccountOcoOrdersResponseOrderReportsInner orderListId( } /** - * Get orderListId + * Order List ID. * * @return orderListId */ @@ -209,7 +209,7 @@ public CancelMarginAccountOcoOrdersResponseOrderReportsInner clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -229,7 +229,7 @@ public CancelMarginAccountOcoOrdersResponseOrderReportsInner price( } /** - * Get price + * Price. * * @return price */ @@ -249,7 +249,7 @@ public CancelMarginAccountOcoOrdersResponseOrderReportsInner origQty( } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -269,7 +269,7 @@ public CancelMarginAccountOcoOrdersResponseOrderReportsInner executedQty( } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -289,7 +289,7 @@ public CancelMarginAccountOcoOrdersResponseOrderReportsInner cummulativeQuoteQty } /** - * Get cummulativeQuoteQty + * Cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -309,7 +309,7 @@ public CancelMarginAccountOcoOrdersResponseOrderReportsInner status( } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -329,7 +329,7 @@ public CancelMarginAccountOcoOrdersResponseOrderReportsInner timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -349,7 +349,7 @@ public CancelMarginAccountOcoOrdersResponseOrderReportsInner type( } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -369,7 +369,7 @@ public CancelMarginAccountOcoOrdersResponseOrderReportsInner side( } /** - * Get side + * Side. * * @return side */ @@ -389,7 +389,7 @@ public CancelMarginAccountOcoOrdersResponseOrderReportsInner stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountOcoOrdersResponseOrdersInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountOcoOrdersResponseOrdersInner.java index 0d08482bc..f903cd57f 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountOcoOrdersResponseOrdersInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountOcoOrdersResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelMarginAccountOcoOrdersResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelMarginAccountOcoOrdersResponseOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public CancelMarginAccountOcoOrdersResponseOrdersInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -83,7 +83,7 @@ public CancelMarginAccountOcoOrdersResponseOrdersInner orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -103,7 +103,7 @@ public CancelMarginAccountOcoOrdersResponseOrdersInner clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountOrderResponse.java index d0b358eb1..36228395b 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelMarginAccountOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelMarginAccountOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelMarginAccountOrderResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -116,7 +116,7 @@ public CancelMarginAccountOrderResponse symbol(@jakarta.annotation.Nullable Stri } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -135,7 +135,7 @@ public CancelMarginAccountOrderResponse orderId(@jakarta.annotation.Nullable Lon } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -155,7 +155,7 @@ public CancelMarginAccountOrderResponse origClientOrderId( } /** - * Get origClientOrderId + * Orig Client Order ID. * * @return origClientOrderId */ @@ -175,7 +175,7 @@ public CancelMarginAccountOrderResponse clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -194,7 +194,7 @@ public CancelMarginAccountOrderResponse price(@jakarta.annotation.Nullable Strin } /** - * Get price + * Price. * * @return price */ @@ -213,7 +213,7 @@ public CancelMarginAccountOrderResponse origQty(@jakarta.annotation.Nullable Str } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -233,7 +233,7 @@ public CancelMarginAccountOrderResponse executedQty( } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -253,7 +253,7 @@ public CancelMarginAccountOrderResponse cummulativeQuoteQty( } /** - * Get cummulativeQuoteQty + * Cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -272,7 +272,7 @@ public CancelMarginAccountOrderResponse status(@jakarta.annotation.Nullable Stri } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -292,7 +292,7 @@ public CancelMarginAccountOrderResponse timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -311,7 +311,7 @@ public CancelMarginAccountOrderResponse type(@jakarta.annotation.Nullable String } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -330,7 +330,7 @@ public CancelMarginAccountOrderResponse side(@jakarta.annotation.Nullable String } /** - * Get side + * Side. * * @return side */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelUmAlgoOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelUmAlgoOrderResponse.java index 17fcce10d..34f351db2 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelUmAlgoOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelUmAlgoOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelUmAlgoOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelUmAlgoOrderResponse { public static final String SERIALIZED_NAME_COMPLETE = "complete"; diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelUmConditionalOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelUmConditionalOrderResponse.java index 6af99a7ef..d8051baf7 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelUmConditionalOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelUmConditionalOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelUmConditionalOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelUmConditionalOrderResponse { public static final String SERIALIZED_NAME_NEW_CLIENT_STRATEGY_ID = "newClientStrategyId"; @@ -172,7 +172,7 @@ public CancelUmConditionalOrderResponse newClientStrategyId( } /** - * Get newClientStrategyId + * New Client Strategy ID. * * @return newClientStrategyId */ @@ -192,7 +192,7 @@ public CancelUmConditionalOrderResponse strategyId( } /** - * Get strategyId + * Strategy ID. * * @return strategyId */ @@ -212,7 +212,7 @@ public CancelUmConditionalOrderResponse strategyStatus( } /** - * Get strategyStatus + * Strategy Status. * * @return strategyStatus */ @@ -232,7 +232,7 @@ public CancelUmConditionalOrderResponse strategyType( } /** - * Get strategyType + * Strategy Type. * * @return strategyType */ @@ -251,7 +251,7 @@ public CancelUmConditionalOrderResponse origQty(@jakarta.annotation.Nullable Str } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -270,7 +270,7 @@ public CancelUmConditionalOrderResponse price(@jakarta.annotation.Nullable Strin } /** - * Get price + * Price. * * @return price */ @@ -290,7 +290,7 @@ public CancelUmConditionalOrderResponse reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -309,7 +309,7 @@ public CancelUmConditionalOrderResponse side(@jakarta.annotation.Nullable String } /** - * Get side + * Side. * * @return side */ @@ -329,7 +329,7 @@ public CancelUmConditionalOrderResponse positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -349,7 +349,7 @@ public CancelUmConditionalOrderResponse stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -368,7 +368,7 @@ public CancelUmConditionalOrderResponse symbol(@jakarta.annotation.Nullable Stri } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -388,7 +388,7 @@ public CancelUmConditionalOrderResponse timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -408,7 +408,7 @@ public CancelUmConditionalOrderResponse activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -428,7 +428,7 @@ public CancelUmConditionalOrderResponse priceRate( } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -447,7 +447,7 @@ public CancelUmConditionalOrderResponse bookTime(@jakarta.annotation.Nullable Lo } /** - * Get bookTime + * order place time * * @return bookTime */ @@ -467,7 +467,7 @@ public CancelUmConditionalOrderResponse updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -487,7 +487,7 @@ public CancelUmConditionalOrderResponse workingType( } /** - * Get workingType + * Working Type. * * @return workingType */ @@ -507,7 +507,7 @@ public CancelUmConditionalOrderResponse priceProtect( } /** - * Get priceProtect + * Price Protect. * * @return priceProtect */ @@ -527,7 +527,7 @@ public CancelUmConditionalOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -548,7 +548,7 @@ public CancelUmConditionalOrderResponse goodTillDate( } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ @@ -568,7 +568,7 @@ public CancelUmConditionalOrderResponse priceMatch( } /** - * Get priceMatch + * Price Match. * * @return priceMatch */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelUmOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelUmOrderResponse.java index 7ee3ce353..9a23d31bc 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelUmOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CancelUmOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,14 +34,8 @@ /** CancelUmOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelUmOrderResponse { - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE) - @jakarta.annotation.Nullable - private String avgPrice; - public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @SerializedName(SERIALIZED_NAME_CLIENT_ORDER_ID) @@ -54,12 +48,6 @@ public class CancelUmOrderResponse { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_QUOTE = "cumQuote"; - - @SerializedName(SERIALIZED_NAME_CUM_QUOTE) - @jakarta.annotation.Nullable - private String cumQuote; - public static final String SERIALIZED_NAME_EXECUTED_QTY = "executedQty"; @SerializedName(SERIALIZED_NAME_EXECUTED_QTY) @@ -153,32 +141,13 @@ public class CancelUmOrderResponse { public CancelUmOrderResponse() {} - public CancelUmOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - return this; - } - - /** - * Get avgPrice - * - * @return avgPrice - */ - @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; - } - - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - } - public CancelUmOrderResponse clientOrderId(@jakarta.annotation.Nullable String clientOrderId) { this.clientOrderId = clientOrderId; return this; } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -197,7 +166,7 @@ public CancelUmOrderResponse cumQty(@jakarta.annotation.Nullable String cumQty) } /** - * Get cumQty + * Cum Qty. * * @return cumQty */ @@ -210,32 +179,13 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public CancelUmOrderResponse cumQuote(@jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - return this; - } - - /** - * Get cumQuote - * - * @return cumQuote - */ - @jakarta.annotation.Nullable - public String getCumQuote() { - return cumQuote; - } - - public void setCumQuote(@jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - } - public CancelUmOrderResponse executedQty(@jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; return this; } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -254,7 +204,7 @@ public CancelUmOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -273,7 +223,7 @@ public CancelUmOrderResponse origQty(@jakarta.annotation.Nullable String origQty } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -292,7 +242,7 @@ public CancelUmOrderResponse price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Price. * * @return price */ @@ -311,7 +261,7 @@ public CancelUmOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean red } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -330,7 +280,7 @@ public CancelUmOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Side. * * @return side */ @@ -349,7 +299,7 @@ public CancelUmOrderResponse positionSide(@jakarta.annotation.Nullable String po } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -368,7 +318,7 @@ public CancelUmOrderResponse status(@jakarta.annotation.Nullable String status) } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -387,7 +337,7 @@ public CancelUmOrderResponse symbol(@jakarta.annotation.Nullable String symbol) } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -406,7 +356,7 @@ public CancelUmOrderResponse timeInForce(@jakarta.annotation.Nullable String tim } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -425,7 +375,7 @@ public CancelUmOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -444,7 +394,7 @@ public CancelUmOrderResponse updateTime(@jakarta.annotation.Nullable Long update } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -464,7 +414,7 @@ public CancelUmOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -484,7 +434,7 @@ public CancelUmOrderResponse goodTillDate(@jakarta.annotation.Nullable Long good } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ @@ -503,7 +453,7 @@ public CancelUmOrderResponse priceMatch(@jakarta.annotation.Nullable String pric } /** - * Get priceMatch + * Price Match. * * @return priceMatch */ @@ -525,10 +475,8 @@ public boolean equals(Object o) { return false; } CancelUmOrderResponse cancelUmOrderResponse = (CancelUmOrderResponse) o; - return Objects.equals(this.avgPrice, cancelUmOrderResponse.avgPrice) - && Objects.equals(this.clientOrderId, cancelUmOrderResponse.clientOrderId) + return Objects.equals(this.clientOrderId, cancelUmOrderResponse.clientOrderId) && Objects.equals(this.cumQty, cancelUmOrderResponse.cumQty) - && Objects.equals(this.cumQuote, cancelUmOrderResponse.cumQuote) && Objects.equals(this.executedQty, cancelUmOrderResponse.executedQty) && Objects.equals(this.orderId, cancelUmOrderResponse.orderId) && Objects.equals(this.origQty, cancelUmOrderResponse.origQty) @@ -550,10 +498,8 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - avgPrice, clientOrderId, cumQty, - cumQuote, executedQty, orderId, origQty, @@ -575,10 +521,8 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CancelUmOrderResponse {\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumQuote: ").append(toIndentedString(cumQuote)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); @@ -603,10 +547,6 @@ public String toString() { public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); - Object avgPriceValue = getAvgPrice(); - String avgPriceValueAsString = ""; - avgPriceValueAsString = avgPriceValue.toString(); - sb.append("avgPrice=").append(urlEncode(avgPriceValueAsString)).append(""); Object clientOrderIdValue = getClientOrderId(); String clientOrderIdValueAsString = ""; clientOrderIdValueAsString = clientOrderIdValue.toString(); @@ -615,10 +555,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = ""; cumQtyValueAsString = cumQtyValue.toString(); sb.append("cumQty=").append(urlEncode(cumQtyValueAsString)).append(""); - Object cumQuoteValue = getCumQuote(); - String cumQuoteValueAsString = ""; - cumQuoteValueAsString = cumQuoteValue.toString(); - sb.append("cumQuote=").append(urlEncode(cumQuoteValueAsString)).append(""); Object executedQtyValue = getExecutedQty(); String executedQtyValueAsString = ""; executedQtyValueAsString = executedQtyValue.toString(); @@ -709,10 +645,8 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("avgPrice"); openapiFields.add("clientOrderId"); openapiFields.add("cumQty"); - openapiFields.add("cumQuote"); openapiFields.add("executedQty"); openapiFields.add("orderId"); openapiFields.add("origQty"); @@ -751,14 +685,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("clientOrderId") != null && !jsonObj.get("clientOrderId").isJsonNull()) && !jsonObj.get("clientOrderId").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -775,14 +701,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumQuote") != null && !jsonObj.get("cumQuote").isJsonNull()) - && !jsonObj.get("cumQuote").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumQuote` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("cumQuote").toString())); - } if ((jsonObj.get("executedQty") != null && !jsonObj.get("executedQty").isJsonNull()) && !jsonObj.get("executedQty").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeAutoRepayFuturesStatusRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeAutoRepayFuturesStatusRequest.java index 337bfa886..41315cdee 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeAutoRepayFuturesStatusRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeAutoRepayFuturesStatusRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -34,13 +35,13 @@ /** ChangeAutoRepayFuturesStatusRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeAutoRepayFuturesStatusRequest { public static final String SERIALIZED_NAME_AUTO_REPAY = "autoRepay"; @SerializedName(SERIALIZED_NAME_AUTO_REPAY) @jakarta.annotation.Nonnull - private String autoRepay; + private AutoRepay autoRepay = AutoRepay.TRUE; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -51,7 +52,7 @@ public class ChangeAutoRepayFuturesStatusRequest { public ChangeAutoRepayFuturesStatusRequest() {} public ChangeAutoRepayFuturesStatusRequest autoRepay( - @jakarta.annotation.Nonnull String autoRepay) { + @jakarta.annotation.Nonnull AutoRepay autoRepay) { this.autoRepay = autoRepay; return this; } @@ -63,11 +64,12 @@ public ChangeAutoRepayFuturesStatusRequest autoRepay( */ @jakarta.annotation.Nonnull @NotNull - public String getAutoRepay() { + @Valid + public AutoRepay getAutoRepay() { return autoRepay; } - public void setAutoRepay(@jakarta.annotation.Nonnull String autoRepay) { + public void setAutoRepay(@jakarta.annotation.Nonnull AutoRepay autoRepay) { this.autoRepay = autoRepay; } @@ -197,13 +199,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("autoRepay").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `autoRepay` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("autoRepay").toString())); - } + // validate the required field `autoRepay` + AutoRepay.validateJsonElement(jsonObj.get("autoRepay")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeAutoRepayFuturesStatusResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeAutoRepayFuturesStatusResponse.java index bef5321d0..ae4ecd4d0 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeAutoRepayFuturesStatusResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeAutoRepayFuturesStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangeAutoRepayFuturesStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeAutoRepayFuturesStatusResponse { public static final String SERIALIZED_NAME_MSG = "msg"; @@ -50,7 +50,7 @@ public ChangeAutoRepayFuturesStatusResponse msg(@jakarta.annotation.Nullable Str } /** - * Get msg + * Msg. * * @return msg */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeCmInitialLeverageRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeCmInitialLeverageRequest.java index b909106f1..4201c0add 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeCmInitialLeverageRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeCmInitialLeverageRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangeCmInitialLeverageRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeCmInitialLeverageRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -82,12 +82,14 @@ public ChangeCmInitialLeverageRequest leverage(@jakarta.annotation.Nonnull Long } /** - * Get leverage + * target initial leverage minimum: 1 maximum: 125 * * @return leverage */ @jakarta.annotation.Nonnull @NotNull + @Min(1L) + @Max(125L) public Long getLeverage() { return leverage; } diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeCmInitialLeverageResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeCmInitialLeverageResponse.java index fd4858eb5..7fd92a1bb 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeCmInitialLeverageResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeCmInitialLeverageResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangeCmInitialLeverageResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeCmInitialLeverageResponse { public static final String SERIALIZED_NAME_LEVERAGE = "leverage"; @@ -62,7 +62,7 @@ public ChangeCmInitialLeverageResponse leverage(@jakarta.annotation.Nullable Lon } /** - * Get leverage + * current initial leverage * * @return leverage */ @@ -81,7 +81,7 @@ public ChangeCmInitialLeverageResponse maxQty(@jakarta.annotation.Nullable Strin } /** - * Get maxQty + * maximum quantity of base asset * * @return maxQty */ @@ -100,7 +100,7 @@ public ChangeCmInitialLeverageResponse symbol(@jakarta.annotation.Nullable Strin } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeCmPositionModeRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeCmPositionModeRequest.java index e80b4a383..eeca2fc37 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeCmPositionModeRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeCmPositionModeRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -34,13 +35,13 @@ /** ChangeCmPositionModeRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeCmPositionModeRequest { public static final String SERIALIZED_NAME_DUAL_SIDE_POSITION = "dualSidePosition"; @SerializedName(SERIALIZED_NAME_DUAL_SIDE_POSITION) @jakarta.annotation.Nonnull - private String dualSidePosition; + private DualSidePosition dualSidePosition; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -51,7 +52,7 @@ public class ChangeCmPositionModeRequest { public ChangeCmPositionModeRequest() {} public ChangeCmPositionModeRequest dualSidePosition( - @jakarta.annotation.Nonnull String dualSidePosition) { + @jakarta.annotation.Nonnull DualSidePosition dualSidePosition) { this.dualSidePosition = dualSidePosition; return this; } @@ -63,11 +64,12 @@ public ChangeCmPositionModeRequest dualSidePosition( */ @jakarta.annotation.Nonnull @NotNull - public String getDualSidePosition() { + @Valid + public DualSidePosition getDualSidePosition() { return dualSidePosition; } - public void setDualSidePosition(@jakarta.annotation.Nonnull String dualSidePosition) { + public void setDualSidePosition(@jakarta.annotation.Nonnull DualSidePosition dualSidePosition) { this.dualSidePosition = dualSidePosition; } @@ -194,13 +196,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("dualSidePosition").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `dualSidePosition` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("dualSidePosition").toString())); - } + // validate the required field `dualSidePosition` + DualSidePosition.validateJsonElement(jsonObj.get("dualSidePosition")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeCmPositionModeResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeCmPositionModeResponse.java index fb55a9976..afa69c054 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeCmPositionModeResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeCmPositionModeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangeCmPositionModeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeCmPositionModeResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -56,7 +56,7 @@ public ChangeCmPositionModeResponse code(@jakarta.annotation.Nullable Long code) } /** - * Get code + * Code. * * @return code */ @@ -75,7 +75,7 @@ public ChangeCmPositionModeResponse msg(@jakarta.annotation.Nullable String msg) } /** - * Get msg + * Msg. * * @return msg */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeUmInitialLeverageRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeUmInitialLeverageRequest.java index 9d494b1ed..55f7df30d 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeUmInitialLeverageRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeUmInitialLeverageRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangeUmInitialLeverageRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeUmInitialLeverageRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -82,12 +82,14 @@ public ChangeUmInitialLeverageRequest leverage(@jakarta.annotation.Nonnull Long } /** - * Get leverage + * target initial leverage minimum: 1 maximum: 125 * * @return leverage */ @jakarta.annotation.Nonnull @NotNull + @Min(1L) + @Max(125L) public Long getLeverage() { return leverage; } diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeUmInitialLeverageResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeUmInitialLeverageResponse.java index 5687cfd8a..76e75723e 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeUmInitialLeverageResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeUmInitialLeverageResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangeUmInitialLeverageResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeUmInitialLeverageResponse { public static final String SERIALIZED_NAME_LEVERAGE = "leverage"; @@ -62,7 +62,7 @@ public ChangeUmInitialLeverageResponse leverage(@jakarta.annotation.Nullable Lon } /** - * Get leverage + * current initial leverage * * @return leverage */ @@ -82,7 +82,7 @@ public ChangeUmInitialLeverageResponse maxNotionalValue( } /** - * Get maxNotionalValue + * Max Notional Value. * * @return maxNotionalValue */ @@ -101,7 +101,7 @@ public ChangeUmInitialLeverageResponse symbol(@jakarta.annotation.Nullable Strin } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeUmPositionModeRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeUmPositionModeRequest.java index 04517e9d7..03a53bdcb 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeUmPositionModeRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeUmPositionModeRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -34,13 +35,13 @@ /** ChangeUmPositionModeRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeUmPositionModeRequest { public static final String SERIALIZED_NAME_DUAL_SIDE_POSITION = "dualSidePosition"; @SerializedName(SERIALIZED_NAME_DUAL_SIDE_POSITION) @jakarta.annotation.Nonnull - private String dualSidePosition; + private DualSidePosition dualSidePosition; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -51,7 +52,7 @@ public class ChangeUmPositionModeRequest { public ChangeUmPositionModeRequest() {} public ChangeUmPositionModeRequest dualSidePosition( - @jakarta.annotation.Nonnull String dualSidePosition) { + @jakarta.annotation.Nonnull DualSidePosition dualSidePosition) { this.dualSidePosition = dualSidePosition; return this; } @@ -63,11 +64,12 @@ public ChangeUmPositionModeRequest dualSidePosition( */ @jakarta.annotation.Nonnull @NotNull - public String getDualSidePosition() { + @Valid + public DualSidePosition getDualSidePosition() { return dualSidePosition; } - public void setDualSidePosition(@jakarta.annotation.Nonnull String dualSidePosition) { + public void setDualSidePosition(@jakarta.annotation.Nonnull DualSidePosition dualSidePosition) { this.dualSidePosition = dualSidePosition; } @@ -194,13 +196,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("dualSidePosition").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `dualSidePosition` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("dualSidePosition").toString())); - } + // validate the required field `dualSidePosition` + DualSidePosition.validateJsonElement(jsonObj.get("dualSidePosition")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeUmPositionModeResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeUmPositionModeResponse.java index 6b0bf0f34..16f413c2a 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeUmPositionModeResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ChangeUmPositionModeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangeUmPositionModeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeUmPositionModeResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -56,7 +56,7 @@ public ChangeUmPositionModeResponse code(@jakarta.annotation.Nullable Long code) } /** - * Get code + * Code. * * @return code */ @@ -75,7 +75,7 @@ public ChangeUmPositionModeResponse msg(@jakarta.annotation.Nullable String msg) } /** - * Get msg + * Msg. * * @return msg */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmAccountTradeListResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmAccountTradeListResponse.java index de3e14689..7f86f99c8 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmAccountTradeListResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmAccountTradeListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CmAccountTradeListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CmAccountTradeListResponse extends ArrayList { public CmAccountTradeListResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmAccountTradeListResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmAccountTradeListResponseInner.java index 10c675cc3..fe7f1dd32 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmAccountTradeListResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmAccountTradeListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CmAccountTradeListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CmAccountTradeListResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -140,7 +140,7 @@ public CmAccountTradeListResponseInner symbol(@jakarta.annotation.Nullable Strin } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -159,7 +159,7 @@ public CmAccountTradeListResponseInner id(@jakarta.annotation.Nullable Long id) } /** - * Get id + * ID. * * @return id */ @@ -178,7 +178,7 @@ public CmAccountTradeListResponseInner orderId(@jakarta.annotation.Nullable Long } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -197,7 +197,7 @@ public CmAccountTradeListResponseInner pair(@jakarta.annotation.Nullable String } /** - * Get pair + * Pair. * * @return pair */ @@ -216,7 +216,7 @@ public CmAccountTradeListResponseInner side(@jakarta.annotation.Nullable String } /** - * Get side + * Side. * * @return side */ @@ -235,7 +235,7 @@ public CmAccountTradeListResponseInner price(@jakarta.annotation.Nullable String } /** - * Get price + * Price. * * @return price */ @@ -254,7 +254,7 @@ public CmAccountTradeListResponseInner qty(@jakarta.annotation.Nullable String q } /** - * Get qty + * Qty. * * @return qty */ @@ -274,7 +274,7 @@ public CmAccountTradeListResponseInner realizedPnl( } /** - * Get realizedPnl + * Realized Pnl. * * @return realizedPnl */ @@ -294,7 +294,7 @@ public CmAccountTradeListResponseInner marginAsset( } /** - * Get marginAsset + * Margin Asset. * * @return marginAsset */ @@ -313,7 +313,7 @@ public CmAccountTradeListResponseInner baseQty(@jakarta.annotation.Nullable Stri } /** - * Get baseQty + * Base Qty. * * @return baseQty */ @@ -333,7 +333,7 @@ public CmAccountTradeListResponseInner commission( } /** - * Get commission + * Commission. * * @return commission */ @@ -353,7 +353,7 @@ public CmAccountTradeListResponseInner commissionAsset( } /** - * Get commissionAsset + * Commission Asset. * * @return commissionAsset */ @@ -372,7 +372,7 @@ public CmAccountTradeListResponseInner time(@jakarta.annotation.Nullable Long ti } /** - * Get time + * Event time. * * @return time */ @@ -392,7 +392,7 @@ public CmAccountTradeListResponseInner positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -411,7 +411,7 @@ public CmAccountTradeListResponseInner buyer(@jakarta.annotation.Nullable Boolea } /** - * Get buyer + * Buyer. * * @return buyer */ @@ -430,7 +430,7 @@ public CmAccountTradeListResponseInner maker(@jakarta.annotation.Nullable Boolea } /** - * Get maker + * Maker. * * @return maker */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmNotionalAndLeverageBracketsResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmNotionalAndLeverageBracketsResponse.java index df59749ff..0c6e03322 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmNotionalAndLeverageBracketsResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmNotionalAndLeverageBracketsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CmNotionalAndLeverageBracketsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CmNotionalAndLeverageBracketsResponse extends ArrayList { public CmNotionalAndLeverageBracketsResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmNotionalAndLeverageBracketsResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmNotionalAndLeverageBracketsResponseInner.java index f52bfa532..ac2fb6c9f 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmNotionalAndLeverageBracketsResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmNotionalAndLeverageBracketsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** CmNotionalAndLeverageBracketsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CmNotionalAndLeverageBracketsResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public CmNotionalAndLeverageBracketsResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -93,7 +93,7 @@ public CmNotionalAndLeverageBracketsResponseInner addBracketsItem( } /** - * Get brackets + * Brackets. * * @return brackets */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmNotionalAndLeverageBracketsResponseInnerBracketsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmNotionalAndLeverageBracketsResponseInnerBracketsInner.java index 734bffa0a..9476be321 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmNotionalAndLeverageBracketsResponseInnerBracketsInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmNotionalAndLeverageBracketsResponseInnerBracketsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** CmNotionalAndLeverageBracketsResponseInnerBracketsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CmNotionalAndLeverageBracketsResponseInnerBracketsInner { public static final String SERIALIZED_NAME_BRACKET = "bracket"; @@ -82,7 +82,7 @@ public CmNotionalAndLeverageBracketsResponseInnerBracketsInner bracket( } /** - * Get bracket + * bracket level * * @return bracket */ @@ -102,7 +102,7 @@ public CmNotionalAndLeverageBracketsResponseInnerBracketsInner initialLeverage( } /** - * Get initialLeverage + * the maximum leverage * * @return initialLeverage */ @@ -122,7 +122,7 @@ public CmNotionalAndLeverageBracketsResponseInnerBracketsInner qtyCap( } /** - * Get qtyCap + * upper edge of base asset quantity * * @return qtyCap */ @@ -142,7 +142,7 @@ public CmNotionalAndLeverageBracketsResponseInnerBracketsInner qtyFloor( } /** - * Get qtyFloor + * lower edge of base asset quantity * * @return qtyFloor */ @@ -162,7 +162,7 @@ public CmNotionalAndLeverageBracketsResponseInnerBracketsInner maintMarginRatio( } /** - * Get maintMarginRatio + * maintenance margin rate * * @return maintMarginRatio */ @@ -183,7 +183,7 @@ public CmNotionalAndLeverageBracketsResponseInnerBracketsInner cum( } /** - * Get cum + * Auxiliary number for quick calculation * * @return cum */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmPositionAdlQuantileEstimationResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmPositionAdlQuantileEstimationResponse.java index 0537d88a5..36d904c28 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmPositionAdlQuantileEstimationResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmPositionAdlQuantileEstimationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CmPositionAdlQuantileEstimationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CmPositionAdlQuantileEstimationResponse extends ArrayList { public CmPositionAdlQuantileEstimationResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmPositionAdlQuantileEstimationResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmPositionAdlQuantileEstimationResponseInner.java index 1d7f93a61..648ab6183 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmPositionAdlQuantileEstimationResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmPositionAdlQuantileEstimationResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** CmPositionAdlQuantileEstimationResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CmPositionAdlQuantileEstimationResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -58,7 +58,7 @@ public CmPositionAdlQuantileEstimationResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmPositionAdlQuantileEstimationResponseInnerAdlQuantile.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmPositionAdlQuantileEstimationResponseInnerAdlQuantile.java index 28341c36f..9964f8a84 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmPositionAdlQuantileEstimationResponseInnerAdlQuantile.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/CmPositionAdlQuantileEstimationResponseInnerAdlQuantile.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** CmPositionAdlQuantileEstimationResponseInnerAdlQuantile */ +/** Adl Quantile. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CmPositionAdlQuantileEstimationResponseInnerAdlQuantile { public static final String SERIALIZED_NAME_L_O_N_G = "LONG"; @@ -69,7 +69,7 @@ public CmPositionAdlQuantileEstimationResponseInnerAdlQuantile LONG( } /** - * Get LONG + * adl quantile for \"LONG\" position in hedge mode * * @return LONG */ @@ -89,7 +89,7 @@ public CmPositionAdlQuantileEstimationResponseInnerAdlQuantile SHORT( } /** - * Get SHORT + * adl qauntile for \"SHORT\" position in hedge mode * * @return SHORT */ @@ -109,7 +109,7 @@ public CmPositionAdlQuantileEstimationResponseInnerAdlQuantile HEDGE( } /** - * Get HEDGE + * only a sign, ignore the value * * @return HEDGE */ @@ -129,7 +129,7 @@ public CmPositionAdlQuantileEstimationResponseInnerAdlQuantile BOTH( } /** - * Get BOTH + * adl qunatile for position in one-way mode * * @return BOTH */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/DualSidePosition.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/DualSidePosition.java new file mode 100644 index 000000000..c34e496d3 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/DualSidePosition.java @@ -0,0 +1,73 @@ +/* + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** \"true\": Hedge Mode; \"false\": One-way Mode */ +@JsonAdapter(DualSidePosition.Adapter.class) +public enum DualSidePosition { + TRUE("true"), + + FALSE("false"); + + private String value; + + DualSidePosition(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DualSidePosition fromValue(String value) { + for (DualSidePosition b : DualSidePosition.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DualSidePosition enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DualSidePosition read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DualSidePosition.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DualSidePosition.fromValue(value); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FeeBurn.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FeeBurn.java new file mode 100644 index 000000000..022ceeb2f --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FeeBurn.java @@ -0,0 +1,73 @@ +/* + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** \"true\": Fee Discount On; \"false\": Fee Discount Off */ +@JsonAdapter(FeeBurn.Adapter.class) +public enum FeeBurn { + TRUE("true"), + + FALSE("false"); + + private String value; + + FeeBurn(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FeeBurn fromValue(String value) { + for (FeeBurn b : FeeBurn.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FeeBurn enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FeeBurn read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FeeBurn.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FeeBurn.fromValue(value); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FundAutoCollectionRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FundAutoCollectionRequest.java index 4cf13ac02..1891bfd1f 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FundAutoCollectionRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FundAutoCollectionRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FundAutoCollectionRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FundAutoCollectionRequest { public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -50,11 +50,12 @@ public FundAutoCollectionRequest recvWindow(@jakarta.annotation.Nullable Long re } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FundAutoCollectionResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FundAutoCollectionResponse.java index 9f09a1cfb..fc018e013 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FundAutoCollectionResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FundAutoCollectionResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FundAutoCollectionResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FundAutoCollectionResponse { public static final String SERIALIZED_NAME_MSG = "msg"; @@ -50,7 +50,7 @@ public FundAutoCollectionResponse msg(@jakarta.annotation.Nullable String msg) { } /** - * Get msg + * Msg. * * @return msg */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FundCollectionByAssetRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FundCollectionByAssetRequest.java index f821bf6ea..39c11dc2b 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FundCollectionByAssetRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FundCollectionByAssetRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FundCollectionByAssetRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FundCollectionByAssetRequest { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FundCollectionByAssetResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FundCollectionByAssetResponse.java index 982cda346..9b399149b 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FundCollectionByAssetResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FundCollectionByAssetResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FundCollectionByAssetResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FundCollectionByAssetResponse { public static final String SERIALIZED_NAME_MSG = "msg"; @@ -50,7 +50,7 @@ public FundCollectionByAssetResponse msg(@jakarta.annotation.Nullable String msg } /** - * Get msg + * Msg. * * @return msg */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FuturesTradfiPerpsContractRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FuturesTradfiPerpsContractRequest.java index 233a233b3..f99b48166 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FuturesTradfiPerpsContractRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FuturesTradfiPerpsContractRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FuturesTradfiPerpsContractRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesTradfiPerpsContractRequest { public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -51,11 +51,12 @@ public FuturesTradfiPerpsContractRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FuturesTradfiPerpsContractResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FuturesTradfiPerpsContractResponse.java index 28729b212..4bef49f24 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FuturesTradfiPerpsContractResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/FuturesTradfiPerpsContractResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,13 +34,13 @@ /** FuturesTradfiPerpsContractResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesTradfiPerpsContractResponse { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) @jakarta.annotation.Nullable - private Long code; + private Integer code; public static final String SERIALIZED_NAME_MSG = "msg"; @@ -50,7 +50,7 @@ public class FuturesTradfiPerpsContractResponse { public FuturesTradfiPerpsContractResponse() {} - public FuturesTradfiPerpsContractResponse code(@jakarta.annotation.Nullable Long code) { + public FuturesTradfiPerpsContractResponse code(@jakarta.annotation.Nullable Integer code) { this.code = code; return this; } @@ -61,11 +61,11 @@ public FuturesTradfiPerpsContractResponse code(@jakarta.annotation.Nullable Long * @return code */ @jakarta.annotation.Nullable - public Long getCode() { + public Integer getCode() { return code; } - public void setCode(@jakarta.annotation.Nullable Long code) { + public void setCode(@jakarta.annotation.Nullable Integer code) { this.code = code; } diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetAutoRepayFuturesStatusResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetAutoRepayFuturesStatusResponse.java index 7d080c669..420481809 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetAutoRepayFuturesStatusResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetAutoRepayFuturesStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetAutoRepayFuturesStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetAutoRepayFuturesStatusResponse { public static final String SERIALIZED_NAME_AUTO_REPAY = "autoRepay"; @@ -51,7 +51,8 @@ public GetAutoRepayFuturesStatusResponse autoRepay( } /** - * Get autoRepay + * \"true\" for turn on the auto-repay futures; \"false\" for turn off the + * auto-repay futures * * @return autoRepay */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmAccountDetailResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmAccountDetailResponse.java index fc67275fc..5098d6014 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmAccountDetailResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmAccountDetailResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetCmAccountDetailResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCmAccountDetailResponse { public static final String SERIALIZED_NAME_ASSETS = "assets"; @@ -73,7 +73,7 @@ public GetCmAccountDetailResponse addAssetsItem( } /** - * Get assets + * Assets. * * @return assets */ @@ -106,7 +106,7 @@ public GetCmAccountDetailResponse addPositionsItem( } /** - * Get positions + * positions of all symbols in the market are returned * * @return positions */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmAccountDetailResponseAssetsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmAccountDetailResponseAssetsInner.java index 65f28bcbe..b91e6a49e 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmAccountDetailResponseAssetsInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmAccountDetailResponseAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetCmAccountDetailResponseAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCmAccountDetailResponseAssetsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -92,7 +92,7 @@ public GetCmAccountDetailResponseAssetsInner asset(@jakarta.annotation.Nullable } /** - * Get asset + * asset name * * @return asset */ @@ -112,7 +112,7 @@ public GetCmAccountDetailResponseAssetsInner crossWalletBalance( } /** - * Get crossWalletBalance + * total wallet balance * * @return crossWalletBalance */ @@ -132,7 +132,7 @@ public GetCmAccountDetailResponseAssetsInner crossUnPnl( } /** - * Get crossUnPnl + * unrealized profit or loss * * @return crossUnPnl */ @@ -152,7 +152,7 @@ public GetCmAccountDetailResponseAssetsInner maintMargin( } /** - * Get maintMargin + * maintenance margin * * @return maintMargin */ @@ -172,7 +172,7 @@ public GetCmAccountDetailResponseAssetsInner initialMargin( } /** - * Get initialMargin + * total intial margin required with the latest mark price * * @return initialMargin */ @@ -192,7 +192,7 @@ public GetCmAccountDetailResponseAssetsInner positionInitialMargin( } /** - * Get positionInitialMargin + * positions margin required with the latest mark price * * @return positionInitialMargin */ @@ -213,7 +213,7 @@ public GetCmAccountDetailResponseAssetsInner openOrderInitialMargin( } /** - * Get openOrderInitialMargin + * open orders intial margin required with the latest mark price * * @return openOrderInitialMargin */ @@ -234,7 +234,7 @@ public GetCmAccountDetailResponseAssetsInner updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmAccountDetailResponsePositionsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmAccountDetailResponsePositionsInner.java index d07e666c5..a85b664d9 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmAccountDetailResponsePositionsInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmAccountDetailResponsePositionsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetCmAccountDetailResponsePositionsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCmAccountDetailResponsePositionsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -117,7 +117,7 @@ public GetCmAccountDetailResponsePositionsInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -137,7 +137,7 @@ public GetCmAccountDetailResponsePositionsInner positionAmt( } /** - * Get positionAmt + * position amount * * @return positionAmt */ @@ -157,7 +157,7 @@ public GetCmAccountDetailResponsePositionsInner initialMargin( } /** - * Get initialMargin + * total intial margin required with the latest mark price * * @return initialMargin */ @@ -177,7 +177,7 @@ public GetCmAccountDetailResponsePositionsInner maintMargin( } /** - * Get maintMargin + * maintenance margin * * @return maintMargin */ @@ -197,7 +197,7 @@ public GetCmAccountDetailResponsePositionsInner unrealizedProfit( } /** - * Get unrealizedProfit + * unrealized profit * * @return unrealizedProfit */ @@ -217,7 +217,7 @@ public GetCmAccountDetailResponsePositionsInner positionInitialMargin( } /** - * Get positionInitialMargin + * positions margin required with the latest mark price * * @return positionInitialMargin */ @@ -238,7 +238,7 @@ public GetCmAccountDetailResponsePositionsInner openOrderInitialMargin( } /** - * Get openOrderInitialMargin + * open orders intial margin required with the latest mark price * * @return openOrderInitialMargin */ @@ -259,7 +259,7 @@ public GetCmAccountDetailResponsePositionsInner leverage( } /** - * Get leverage + * current initial leverage * * @return leverage */ @@ -279,7 +279,7 @@ public GetCmAccountDetailResponsePositionsInner positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -299,7 +299,7 @@ public GetCmAccountDetailResponsePositionsInner entryPrice( } /** - * Get entryPrice + * average entry price * * @return entryPrice */ @@ -319,7 +319,7 @@ public GetCmAccountDetailResponsePositionsInner maxQty( } /** - * Get maxQty + * maximum quantity of base asset * * @return maxQty */ @@ -339,7 +339,7 @@ public GetCmAccountDetailResponsePositionsInner updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmCurrentPositionModeResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmCurrentPositionModeResponse.java index 797c69f7e..0477136dc 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmCurrentPositionModeResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmCurrentPositionModeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetCmCurrentPositionModeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCmCurrentPositionModeResponse { public static final String SERIALIZED_NAME_DUAL_SIDE_POSITION = "dualSidePosition"; @@ -51,7 +51,7 @@ public GetCmCurrentPositionModeResponse dualSidePosition( } /** - * Get dualSidePosition + * \"true\": Hedge Mode; \"false\": One-way Mode * * @return dualSidePosition */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmIncomeHistoryResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmIncomeHistoryResponse.java index d94af171b..f93e356b1 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmIncomeHistoryResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmIncomeHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetCmIncomeHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCmIncomeHistoryResponse extends ArrayList { public GetCmIncomeHistoryResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmIncomeHistoryResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmIncomeHistoryResponseInner.java index 94abe3b2a..4a60d1648 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmIncomeHistoryResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetCmIncomeHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetCmIncomeHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCmIncomeHistoryResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -92,7 +92,7 @@ public GetCmIncomeHistoryResponseInner symbol(@jakarta.annotation.Nullable Strin } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -112,7 +112,7 @@ public GetCmIncomeHistoryResponseInner incomeType( } /** - * Get incomeType + * Income type. * * @return incomeType */ @@ -131,7 +131,7 @@ public GetCmIncomeHistoryResponseInner income(@jakarta.annotation.Nullable Strin } /** - * Get income + * Income amount. * * @return income */ @@ -150,7 +150,7 @@ public GetCmIncomeHistoryResponseInner asset(@jakarta.annotation.Nullable String } /** - * Get asset + * Income asset. * * @return asset */ @@ -169,7 +169,7 @@ public GetCmIncomeHistoryResponseInner info(@jakarta.annotation.Nullable String } /** - * Get info + * Extra information. * * @return info */ @@ -188,7 +188,7 @@ public GetCmIncomeHistoryResponseInner time(@jakarta.annotation.Nullable Long ti } /** - * Get time + * Event time. * * @return time */ @@ -207,7 +207,7 @@ public GetCmIncomeHistoryResponseInner tranId(@jakarta.annotation.Nullable Strin } /** - * Get tranId + * Transaction ID. * * @return tranId */ @@ -226,7 +226,7 @@ public GetCmIncomeHistoryResponseInner tradeId(@jakarta.annotation.Nullable Stri } /** - * Get tradeId + * Trade ID, if existing. * * @return tradeId */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetDownloadIdForUmFuturesOrderHistoryResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetDownloadIdForUmFuturesOrderHistoryResponse.java index 974441be9..7c515a9e1 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetDownloadIdForUmFuturesOrderHistoryResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetDownloadIdForUmFuturesOrderHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetDownloadIdForUmFuturesOrderHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDownloadIdForUmFuturesOrderHistoryResponse { public static final String SERIALIZED_NAME_AVG_COST_TIMESTAMP_OF_LAST30D = "avgCostTimestampOfLast30d"; @@ -58,7 +58,7 @@ public GetDownloadIdForUmFuturesOrderHistoryResponse avgCostTimestampOfLast30d( } /** - * Get avgCostTimestampOfLast30d + * Average time taken for data download in the past 30 days * * @return avgCostTimestampOfLast30d */ @@ -79,7 +79,7 @@ public GetDownloadIdForUmFuturesOrderHistoryResponse downloadId( } /** - * Get downloadId + * Download ID. * * @return downloadId */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetDownloadIdForUmFuturesTradeHistoryResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetDownloadIdForUmFuturesTradeHistoryResponse.java index 7ba40884a..23da950a4 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetDownloadIdForUmFuturesTradeHistoryResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetDownloadIdForUmFuturesTradeHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetDownloadIdForUmFuturesTradeHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDownloadIdForUmFuturesTradeHistoryResponse { public static final String SERIALIZED_NAME_AVG_COST_TIMESTAMP_OF_LAST30D = "avgCostTimestampOfLast30d"; @@ -58,7 +58,7 @@ public GetDownloadIdForUmFuturesTradeHistoryResponse avgCostTimestampOfLast30d( } /** - * Get avgCostTimestampOfLast30d + * Average time taken for data download in the past 30 days * * @return avgCostTimestampOfLast30d */ @@ -79,7 +79,7 @@ public GetDownloadIdForUmFuturesTradeHistoryResponse downloadId( } /** - * Get downloadId + * Download ID. * * @return downloadId */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetDownloadIdForUmFuturesTransactionHistoryResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetDownloadIdForUmFuturesTransactionHistoryResponse.java index 2daa98471..2938f0102 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetDownloadIdForUmFuturesTransactionHistoryResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetDownloadIdForUmFuturesTransactionHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetDownloadIdForUmFuturesTransactionHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDownloadIdForUmFuturesTransactionHistoryResponse { public static final String SERIALIZED_NAME_AVG_COST_TIMESTAMP_OF_LAST30D = "avgCostTimestampOfLast30d"; @@ -58,7 +58,7 @@ public GetDownloadIdForUmFuturesTransactionHistoryResponse avgCostTimestampOfLas } /** - * Get avgCostTimestampOfLast30d + * Average time taken for data download in the past 30 days * * @return avgCostTimestampOfLast30d */ @@ -79,7 +79,7 @@ public GetDownloadIdForUmFuturesTransactionHistoryResponse downloadId( } /** - * Get downloadId + * Download ID. * * @return downloadId */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetMarginBorrowLoanInterestHistoryResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetMarginBorrowLoanInterestHistoryResponse.java index 8745909e0..1e616fbd4 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetMarginBorrowLoanInterestHistoryResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetMarginBorrowLoanInterestHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetMarginBorrowLoanInterestHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetMarginBorrowLoanInterestHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; @@ -73,7 +73,7 @@ public GetMarginBorrowLoanInterestHistoryResponse addRowsItem( } /** - * Get rows + * Rows. * * @return rows */ @@ -96,7 +96,7 @@ public GetMarginBorrowLoanInterestHistoryResponse total( } /** - * Get total + * Total. * * @return total */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetMarginBorrowLoanInterestHistoryResponseRowsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetMarginBorrowLoanInterestHistoryResponseRowsInner.java index 317236c06..ef49373b7 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetMarginBorrowLoanInterestHistoryResponseRowsInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetMarginBorrowLoanInterestHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetMarginBorrowLoanInterestHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetMarginBorrowLoanInterestHistoryResponseRowsInner { public static final String SERIALIZED_NAME_TX_ID = "txId"; @@ -93,7 +93,7 @@ public GetMarginBorrowLoanInterestHistoryResponseRowsInner txId( } /** - * Get txId + * Tx ID. * * @return txId */ @@ -113,7 +113,7 @@ public GetMarginBorrowLoanInterestHistoryResponseRowsInner interestAccuredTime( } /** - * Get interestAccuredTime + * Interest Accured Time. * * @return interestAccuredTime */ @@ -133,7 +133,7 @@ public GetMarginBorrowLoanInterestHistoryResponseRowsInner asset( } /** - * Get asset + * asset name * * @return asset */ @@ -153,7 +153,7 @@ public GetMarginBorrowLoanInterestHistoryResponseRowsInner rawAsset( } /** - * Get rawAsset + * Raw Asset. * * @return rawAsset */ @@ -173,7 +173,7 @@ public GetMarginBorrowLoanInterestHistoryResponseRowsInner principal( } /** - * Get principal + * Principal repaid * * @return principal */ @@ -193,7 +193,7 @@ public GetMarginBorrowLoanInterestHistoryResponseRowsInner interest( } /** - * Get interest + * Interest repaid * * @return interest */ @@ -213,7 +213,7 @@ public GetMarginBorrowLoanInterestHistoryResponseRowsInner interestRate( } /** - * Get interestRate + * daily interest rate * * @return interestRate */ @@ -233,7 +233,7 @@ public GetMarginBorrowLoanInterestHistoryResponseRowsInner type( } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailResponse.java index b8d785ecb..315bff638 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,13 +40,13 @@ /** GetUmAccountDetailResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetUmAccountDetailResponse { public static final String SERIALIZED_NAME_ASSETS = "assets"; @SerializedName(SERIALIZED_NAME_ASSETS) @jakarta.annotation.Nullable - private List<@Valid GetUmAccountDetailV2ResponseAssetsInner> assets; + private List<@Valid GetUmAccountDetailResponseAssetsInner> assets; public static final String SERIALIZED_NAME_POSITIONS = "positions"; @@ -58,13 +58,13 @@ public GetUmAccountDetailResponse() {} public GetUmAccountDetailResponse assets( @jakarta.annotation.Nullable - List<@Valid GetUmAccountDetailV2ResponseAssetsInner> assets) { + List<@Valid GetUmAccountDetailResponseAssetsInner> assets) { this.assets = assets; return this; } public GetUmAccountDetailResponse addAssetsItem( - GetUmAccountDetailV2ResponseAssetsInner assetsItem) { + GetUmAccountDetailResponseAssetsInner assetsItem) { if (this.assets == null) { this.assets = new ArrayList<>(); } @@ -73,19 +73,19 @@ public GetUmAccountDetailResponse addAssetsItem( } /** - * Get assets + * Assets. * * @return assets */ @jakarta.annotation.Nullable @Valid - public List<@Valid GetUmAccountDetailV2ResponseAssetsInner> getAssets() { + public List<@Valid GetUmAccountDetailResponseAssetsInner> getAssets() { return assets; } public void setAssets( @jakarta.annotation.Nullable - List<@Valid GetUmAccountDetailV2ResponseAssetsInner> assets) { + List<@Valid GetUmAccountDetailResponseAssetsInner> assets) { this.assets = assets; } @@ -106,7 +106,7 @@ public GetUmAccountDetailResponse addPositionsItem( } /** - * Get positions + * positions of all symbols in the market are returned * * @return positions */ @@ -234,7 +234,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `assets` (array) for (int i = 0; i < jsonArrayassets.size(); i++) { - GetUmAccountDetailV2ResponseAssetsInner.validateJsonElement( + GetUmAccountDetailResponseAssetsInner.validateJsonElement( jsonArrayassets.get(i)); } ; diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailResponseAssetsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailResponseAssetsInner.java new file mode 100644 index 000000000..517beba19 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailResponseAssetsInner.java @@ -0,0 +1,532 @@ +/* + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model; + +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** GetUmAccountDetailResponseAssetsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class GetUmAccountDetailResponseAssetsInner { + public static final String SERIALIZED_NAME_ASSET = "asset"; + + @SerializedName(SERIALIZED_NAME_ASSET) + @jakarta.annotation.Nullable + private String asset; + + public static final String SERIALIZED_NAME_CROSS_WALLET_BALANCE = "crossWalletBalance"; + + @SerializedName(SERIALIZED_NAME_CROSS_WALLET_BALANCE) + @jakarta.annotation.Nullable + private String crossWalletBalance; + + public static final String SERIALIZED_NAME_CROSS_UN_PNL = "crossUnPnl"; + + @SerializedName(SERIALIZED_NAME_CROSS_UN_PNL) + @jakarta.annotation.Nullable + private String crossUnPnl; + + public static final String SERIALIZED_NAME_MAINT_MARGIN = "maintMargin"; + + @SerializedName(SERIALIZED_NAME_MAINT_MARGIN) + @jakarta.annotation.Nullable + private String maintMargin; + + public static final String SERIALIZED_NAME_INITIAL_MARGIN = "initialMargin"; + + @SerializedName(SERIALIZED_NAME_INITIAL_MARGIN) + @jakarta.annotation.Nullable + private String initialMargin; + + public static final String SERIALIZED_NAME_POSITION_INITIAL_MARGIN = "positionInitialMargin"; + + @SerializedName(SERIALIZED_NAME_POSITION_INITIAL_MARGIN) + @jakarta.annotation.Nullable + private String positionInitialMargin; + + public static final String SERIALIZED_NAME_OPEN_ORDER_INITIAL_MARGIN = "openOrderInitialMargin"; + + @SerializedName(SERIALIZED_NAME_OPEN_ORDER_INITIAL_MARGIN) + @jakarta.annotation.Nullable + private String openOrderInitialMargin; + + public static final String SERIALIZED_NAME_UPDATE_TIME = "updateTime"; + + @SerializedName(SERIALIZED_NAME_UPDATE_TIME) + @jakarta.annotation.Nullable + private Long updateTime; + + public GetUmAccountDetailResponseAssetsInner() {} + + public GetUmAccountDetailResponseAssetsInner asset(@jakarta.annotation.Nullable String asset) { + this.asset = asset; + return this; + } + + /** + * asset name + * + * @return asset + */ + @jakarta.annotation.Nullable + public String getAsset() { + return asset; + } + + public void setAsset(@jakarta.annotation.Nullable String asset) { + this.asset = asset; + } + + public GetUmAccountDetailResponseAssetsInner crossWalletBalance( + @jakarta.annotation.Nullable String crossWalletBalance) { + this.crossWalletBalance = crossWalletBalance; + return this; + } + + /** + * wallet balance + * + * @return crossWalletBalance + */ + @jakarta.annotation.Nullable + public String getCrossWalletBalance() { + return crossWalletBalance; + } + + public void setCrossWalletBalance(@jakarta.annotation.Nullable String crossWalletBalance) { + this.crossWalletBalance = crossWalletBalance; + } + + public GetUmAccountDetailResponseAssetsInner crossUnPnl( + @jakarta.annotation.Nullable String crossUnPnl) { + this.crossUnPnl = crossUnPnl; + return this; + } + + /** + * unrealized profit + * + * @return crossUnPnl + */ + @jakarta.annotation.Nullable + public String getCrossUnPnl() { + return crossUnPnl; + } + + public void setCrossUnPnl(@jakarta.annotation.Nullable String crossUnPnl) { + this.crossUnPnl = crossUnPnl; + } + + public GetUmAccountDetailResponseAssetsInner maintMargin( + @jakarta.annotation.Nullable String maintMargin) { + this.maintMargin = maintMargin; + return this; + } + + /** + * maintenance margin required + * + * @return maintMargin + */ + @jakarta.annotation.Nullable + public String getMaintMargin() { + return maintMargin; + } + + public void setMaintMargin(@jakarta.annotation.Nullable String maintMargin) { + this.maintMargin = maintMargin; + } + + public GetUmAccountDetailResponseAssetsInner initialMargin( + @jakarta.annotation.Nullable String initialMargin) { + this.initialMargin = initialMargin; + return this; + } + + /** + * total initial margin required with current mark price + * + * @return initialMargin + */ + @jakarta.annotation.Nullable + public String getInitialMargin() { + return initialMargin; + } + + public void setInitialMargin(@jakarta.annotation.Nullable String initialMargin) { + this.initialMargin = initialMargin; + } + + public GetUmAccountDetailResponseAssetsInner positionInitialMargin( + @jakarta.annotation.Nullable String positionInitialMargin) { + this.positionInitialMargin = positionInitialMargin; + return this; + } + + /** + * initial margin required for positions with current mark price + * + * @return positionInitialMargin + */ + @jakarta.annotation.Nullable + public String getPositionInitialMargin() { + return positionInitialMargin; + } + + public void setPositionInitialMargin( + @jakarta.annotation.Nullable String positionInitialMargin) { + this.positionInitialMargin = positionInitialMargin; + } + + public GetUmAccountDetailResponseAssetsInner openOrderInitialMargin( + @jakarta.annotation.Nullable String openOrderInitialMargin) { + this.openOrderInitialMargin = openOrderInitialMargin; + return this; + } + + /** + * initial margin required for open orders with current mark price + * + * @return openOrderInitialMargin + */ + @jakarta.annotation.Nullable + public String getOpenOrderInitialMargin() { + return openOrderInitialMargin; + } + + public void setOpenOrderInitialMargin( + @jakarta.annotation.Nullable String openOrderInitialMargin) { + this.openOrderInitialMargin = openOrderInitialMargin; + } + + public GetUmAccountDetailResponseAssetsInner updateTime( + @jakarta.annotation.Nullable Long updateTime) { + this.updateTime = updateTime; + return this; + } + + /** + * last update time + * + * @return updateTime + */ + @jakarta.annotation.Nullable + public Long getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(@jakarta.annotation.Nullable Long updateTime) { + this.updateTime = updateTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetUmAccountDetailResponseAssetsInner getUmAccountDetailResponseAssetsInner = + (GetUmAccountDetailResponseAssetsInner) o; + return Objects.equals(this.asset, getUmAccountDetailResponseAssetsInner.asset) + && Objects.equals( + this.crossWalletBalance, + getUmAccountDetailResponseAssetsInner.crossWalletBalance) + && Objects.equals(this.crossUnPnl, getUmAccountDetailResponseAssetsInner.crossUnPnl) + && Objects.equals( + this.maintMargin, getUmAccountDetailResponseAssetsInner.maintMargin) + && Objects.equals( + this.initialMargin, getUmAccountDetailResponseAssetsInner.initialMargin) + && Objects.equals( + this.positionInitialMargin, + getUmAccountDetailResponseAssetsInner.positionInitialMargin) + && Objects.equals( + this.openOrderInitialMargin, + getUmAccountDetailResponseAssetsInner.openOrderInitialMargin) + && Objects.equals( + this.updateTime, getUmAccountDetailResponseAssetsInner.updateTime); + } + + @Override + public int hashCode() { + return Objects.hash( + asset, + crossWalletBalance, + crossUnPnl, + maintMargin, + initialMargin, + positionInitialMargin, + openOrderInitialMargin, + updateTime); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetUmAccountDetailResponseAssetsInner {\n"); + sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append(" crossWalletBalance: ") + .append(toIndentedString(crossWalletBalance)) + .append("\n"); + sb.append(" crossUnPnl: ").append(toIndentedString(crossUnPnl)).append("\n"); + sb.append(" maintMargin: ").append(toIndentedString(maintMargin)).append("\n"); + sb.append(" initialMargin: ").append(toIndentedString(initialMargin)).append("\n"); + sb.append(" positionInitialMargin: ") + .append(toIndentedString(positionInitialMargin)) + .append("\n"); + sb.append(" openOrderInitialMargin: ") + .append(toIndentedString(openOrderInitialMargin)) + .append("\n"); + sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object assetValue = getAsset(); + String assetValueAsString = ""; + assetValueAsString = assetValue.toString(); + sb.append("asset=").append(urlEncode(assetValueAsString)).append(""); + Object crossWalletBalanceValue = getCrossWalletBalance(); + String crossWalletBalanceValueAsString = ""; + crossWalletBalanceValueAsString = crossWalletBalanceValue.toString(); + sb.append("crossWalletBalance=") + .append(urlEncode(crossWalletBalanceValueAsString)) + .append(""); + Object crossUnPnlValue = getCrossUnPnl(); + String crossUnPnlValueAsString = ""; + crossUnPnlValueAsString = crossUnPnlValue.toString(); + sb.append("crossUnPnl=").append(urlEncode(crossUnPnlValueAsString)).append(""); + Object maintMarginValue = getMaintMargin(); + String maintMarginValueAsString = ""; + maintMarginValueAsString = maintMarginValue.toString(); + sb.append("maintMargin=").append(urlEncode(maintMarginValueAsString)).append(""); + Object initialMarginValue = getInitialMargin(); + String initialMarginValueAsString = ""; + initialMarginValueAsString = initialMarginValue.toString(); + sb.append("initialMargin=").append(urlEncode(initialMarginValueAsString)).append(""); + Object positionInitialMarginValue = getPositionInitialMargin(); + String positionInitialMarginValueAsString = ""; + positionInitialMarginValueAsString = positionInitialMarginValue.toString(); + sb.append("positionInitialMargin=") + .append(urlEncode(positionInitialMarginValueAsString)) + .append(""); + Object openOrderInitialMarginValue = getOpenOrderInitialMargin(); + String openOrderInitialMarginValueAsString = ""; + openOrderInitialMarginValueAsString = openOrderInitialMarginValue.toString(); + sb.append("openOrderInitialMargin=") + .append(urlEncode(openOrderInitialMarginValueAsString)) + .append(""); + Object updateTimeValue = getUpdateTime(); + String updateTimeValueAsString = ""; + updateTimeValueAsString = updateTimeValue.toString(); + sb.append("updateTime=").append(urlEncode(updateTimeValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("asset"); + openapiFields.add("crossWalletBalance"); + openapiFields.add("crossUnPnl"); + openapiFields.add("maintMargin"); + openapiFields.add("initialMargin"); + openapiFields.add("positionInitialMargin"); + openapiFields.add("openOrderInitialMargin"); + openapiFields.add("updateTime"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * GetUmAccountDetailResponseAssetsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetUmAccountDetailResponseAssetsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetUmAccountDetailResponseAssetsInner" + + " is not found in the empty JSON string", + GetUmAccountDetailResponseAssetsInner.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) + && !jsonObj.get("asset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `asset` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("asset").toString())); + } + if ((jsonObj.get("crossWalletBalance") != null + && !jsonObj.get("crossWalletBalance").isJsonNull()) + && !jsonObj.get("crossWalletBalance").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `crossWalletBalance` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("crossWalletBalance").toString())); + } + if ((jsonObj.get("crossUnPnl") != null && !jsonObj.get("crossUnPnl").isJsonNull()) + && !jsonObj.get("crossUnPnl").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `crossUnPnl` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("crossUnPnl").toString())); + } + if ((jsonObj.get("maintMargin") != null && !jsonObj.get("maintMargin").isJsonNull()) + && !jsonObj.get("maintMargin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `maintMargin` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("maintMargin").toString())); + } + if ((jsonObj.get("initialMargin") != null && !jsonObj.get("initialMargin").isJsonNull()) + && !jsonObj.get("initialMargin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `initialMargin` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("initialMargin").toString())); + } + if ((jsonObj.get("positionInitialMargin") != null + && !jsonObj.get("positionInitialMargin").isJsonNull()) + && !jsonObj.get("positionInitialMargin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `positionInitialMargin` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("positionInitialMargin").toString())); + } + if ((jsonObj.get("openOrderInitialMargin") != null + && !jsonObj.get("openOrderInitialMargin").isJsonNull()) + && !jsonObj.get("openOrderInitialMargin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `openOrderInitialMargin` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("openOrderInitialMargin").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetUmAccountDetailResponseAssetsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetUmAccountDetailResponseAssetsInner' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(GetUmAccountDetailResponseAssetsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, GetUmAccountDetailResponseAssetsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetUmAccountDetailResponseAssetsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetUmAccountDetailResponseAssetsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetUmAccountDetailResponseAssetsInner + * @throws IOException if the JSON string is invalid with respect to + * GetUmAccountDetailResponseAssetsInner + */ + public static GetUmAccountDetailResponseAssetsInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, GetUmAccountDetailResponseAssetsInner.class); + } + + /** + * Convert an instance of GetUmAccountDetailResponseAssetsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailResponsePositionsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailResponsePositionsInner.java index 1ea028ef5..74cbdc741 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailResponsePositionsInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailResponsePositionsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetUmAccountDetailResponsePositionsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetUmAccountDetailResponsePositionsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -129,7 +129,7 @@ public GetUmAccountDetailResponsePositionsInner symbol( } /** - * Get symbol + * symbol name * * @return symbol */ @@ -149,7 +149,7 @@ public GetUmAccountDetailResponsePositionsInner initialMargin( } /** - * Get initialMargin + * total initial margin required with current mark price * * @return initialMargin */ @@ -169,7 +169,7 @@ public GetUmAccountDetailResponsePositionsInner maintMargin( } /** - * Get maintMargin + * maintenance margin required * * @return maintMargin */ @@ -189,7 +189,7 @@ public GetUmAccountDetailResponsePositionsInner unrealizedProfit( } /** - * Get unrealizedProfit + * unrealized profit * * @return unrealizedProfit */ @@ -209,7 +209,7 @@ public GetUmAccountDetailResponsePositionsInner positionInitialMargin( } /** - * Get positionInitialMargin + * initial margin required for positions with current mark price * * @return positionInitialMargin */ @@ -230,7 +230,7 @@ public GetUmAccountDetailResponsePositionsInner openOrderInitialMargin( } /** - * Get openOrderInitialMargin + * initial margin required for open orders with current mark price * * @return openOrderInitialMargin */ @@ -251,7 +251,7 @@ public GetUmAccountDetailResponsePositionsInner leverage( } /** - * Get leverage + * current initial leverage * * @return leverage */ @@ -271,7 +271,7 @@ public GetUmAccountDetailResponsePositionsInner entryPrice( } /** - * Get entryPrice + * average entry price * * @return entryPrice */ @@ -291,7 +291,7 @@ public GetUmAccountDetailResponsePositionsInner maxNotional( } /** - * Get maxNotional + * maximum available notional with current leverage * * @return maxNotional */ @@ -311,7 +311,7 @@ public GetUmAccountDetailResponsePositionsInner bidNotional( } /** - * Get bidNotional + * bids notional, ignore * * @return bidNotional */ @@ -331,7 +331,7 @@ public GetUmAccountDetailResponsePositionsInner askNotional( } /** - * Get askNotional + * ask notional, ignore * * @return askNotional */ @@ -351,7 +351,7 @@ public GetUmAccountDetailResponsePositionsInner positionSide( } /** - * Get positionSide + * position side * * @return positionSide */ @@ -371,7 +371,7 @@ public GetUmAccountDetailResponsePositionsInner positionAmt( } /** - * Get positionAmt + * position amount * * @return positionAmt */ @@ -391,7 +391,7 @@ public GetUmAccountDetailResponsePositionsInner updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailV2Response.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailV2Response.java index 9cb333b64..bcf86376c 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailV2Response.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailV2Response.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,13 +40,13 @@ /** GetUmAccountDetailV2Response */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetUmAccountDetailV2Response { public static final String SERIALIZED_NAME_ASSETS = "assets"; @SerializedName(SERIALIZED_NAME_ASSETS) @jakarta.annotation.Nullable - private List<@Valid GetUmAccountDetailV2ResponseAssetsInner> assets; + private List<@Valid GetUmAccountDetailResponseAssetsInner> assets; public static final String SERIALIZED_NAME_POSITIONS = "positions"; @@ -58,13 +58,13 @@ public GetUmAccountDetailV2Response() {} public GetUmAccountDetailV2Response assets( @jakarta.annotation.Nullable - List<@Valid GetUmAccountDetailV2ResponseAssetsInner> assets) { + List<@Valid GetUmAccountDetailResponseAssetsInner> assets) { this.assets = assets; return this; } public GetUmAccountDetailV2Response addAssetsItem( - GetUmAccountDetailV2ResponseAssetsInner assetsItem) { + GetUmAccountDetailResponseAssetsInner assetsItem) { if (this.assets == null) { this.assets = new ArrayList<>(); } @@ -73,19 +73,19 @@ public GetUmAccountDetailV2Response addAssetsItem( } /** - * Get assets + * Assets. * * @return assets */ @jakarta.annotation.Nullable @Valid - public List<@Valid GetUmAccountDetailV2ResponseAssetsInner> getAssets() { + public List<@Valid GetUmAccountDetailResponseAssetsInner> getAssets() { return assets; } public void setAssets( @jakarta.annotation.Nullable - List<@Valid GetUmAccountDetailV2ResponseAssetsInner> assets) { + List<@Valid GetUmAccountDetailResponseAssetsInner> assets) { this.assets = assets; } @@ -106,7 +106,7 @@ public GetUmAccountDetailV2Response addPositionsItem( } /** - * Get positions + * positions of all symbols in the market are returned * * @return positions */ @@ -236,7 +236,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `assets` (array) for (int i = 0; i < jsonArrayassets.size(); i++) { - GetUmAccountDetailV2ResponseAssetsInner.validateJsonElement( + GetUmAccountDetailResponseAssetsInner.validateJsonElement( jsonArrayassets.get(i)); } ; diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailV2ResponseAssetsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailV2ResponseAssetsInner.java deleted file mode 100644 index 54b2f5b5b..000000000 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailV2ResponseAssetsInner.java +++ /dev/null @@ -1,536 +0,0 @@ -/* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model; - -import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** GetUmAccountDetailV2ResponseAssetsInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetUmAccountDetailV2ResponseAssetsInner { - public static final String SERIALIZED_NAME_ASSET = "asset"; - - @SerializedName(SERIALIZED_NAME_ASSET) - @jakarta.annotation.Nullable - private String asset; - - public static final String SERIALIZED_NAME_CROSS_WALLET_BALANCE = "crossWalletBalance"; - - @SerializedName(SERIALIZED_NAME_CROSS_WALLET_BALANCE) - @jakarta.annotation.Nullable - private String crossWalletBalance; - - public static final String SERIALIZED_NAME_CROSS_UN_PNL = "crossUnPnl"; - - @SerializedName(SERIALIZED_NAME_CROSS_UN_PNL) - @jakarta.annotation.Nullable - private String crossUnPnl; - - public static final String SERIALIZED_NAME_MAINT_MARGIN = "maintMargin"; - - @SerializedName(SERIALIZED_NAME_MAINT_MARGIN) - @jakarta.annotation.Nullable - private String maintMargin; - - public static final String SERIALIZED_NAME_INITIAL_MARGIN = "initialMargin"; - - @SerializedName(SERIALIZED_NAME_INITIAL_MARGIN) - @jakarta.annotation.Nullable - private String initialMargin; - - public static final String SERIALIZED_NAME_POSITION_INITIAL_MARGIN = "positionInitialMargin"; - - @SerializedName(SERIALIZED_NAME_POSITION_INITIAL_MARGIN) - @jakarta.annotation.Nullable - private String positionInitialMargin; - - public static final String SERIALIZED_NAME_OPEN_ORDER_INITIAL_MARGIN = "openOrderInitialMargin"; - - @SerializedName(SERIALIZED_NAME_OPEN_ORDER_INITIAL_MARGIN) - @jakarta.annotation.Nullable - private String openOrderInitialMargin; - - public static final String SERIALIZED_NAME_UPDATE_TIME = "updateTime"; - - @SerializedName(SERIALIZED_NAME_UPDATE_TIME) - @jakarta.annotation.Nullable - private Long updateTime; - - public GetUmAccountDetailV2ResponseAssetsInner() {} - - public GetUmAccountDetailV2ResponseAssetsInner asset( - @jakarta.annotation.Nullable String asset) { - this.asset = asset; - return this; - } - - /** - * Get asset - * - * @return asset - */ - @jakarta.annotation.Nullable - public String getAsset() { - return asset; - } - - public void setAsset(@jakarta.annotation.Nullable String asset) { - this.asset = asset; - } - - public GetUmAccountDetailV2ResponseAssetsInner crossWalletBalance( - @jakarta.annotation.Nullable String crossWalletBalance) { - this.crossWalletBalance = crossWalletBalance; - return this; - } - - /** - * Get crossWalletBalance - * - * @return crossWalletBalance - */ - @jakarta.annotation.Nullable - public String getCrossWalletBalance() { - return crossWalletBalance; - } - - public void setCrossWalletBalance(@jakarta.annotation.Nullable String crossWalletBalance) { - this.crossWalletBalance = crossWalletBalance; - } - - public GetUmAccountDetailV2ResponseAssetsInner crossUnPnl( - @jakarta.annotation.Nullable String crossUnPnl) { - this.crossUnPnl = crossUnPnl; - return this; - } - - /** - * Get crossUnPnl - * - * @return crossUnPnl - */ - @jakarta.annotation.Nullable - public String getCrossUnPnl() { - return crossUnPnl; - } - - public void setCrossUnPnl(@jakarta.annotation.Nullable String crossUnPnl) { - this.crossUnPnl = crossUnPnl; - } - - public GetUmAccountDetailV2ResponseAssetsInner maintMargin( - @jakarta.annotation.Nullable String maintMargin) { - this.maintMargin = maintMargin; - return this; - } - - /** - * Get maintMargin - * - * @return maintMargin - */ - @jakarta.annotation.Nullable - public String getMaintMargin() { - return maintMargin; - } - - public void setMaintMargin(@jakarta.annotation.Nullable String maintMargin) { - this.maintMargin = maintMargin; - } - - public GetUmAccountDetailV2ResponseAssetsInner initialMargin( - @jakarta.annotation.Nullable String initialMargin) { - this.initialMargin = initialMargin; - return this; - } - - /** - * Get initialMargin - * - * @return initialMargin - */ - @jakarta.annotation.Nullable - public String getInitialMargin() { - return initialMargin; - } - - public void setInitialMargin(@jakarta.annotation.Nullable String initialMargin) { - this.initialMargin = initialMargin; - } - - public GetUmAccountDetailV2ResponseAssetsInner positionInitialMargin( - @jakarta.annotation.Nullable String positionInitialMargin) { - this.positionInitialMargin = positionInitialMargin; - return this; - } - - /** - * Get positionInitialMargin - * - * @return positionInitialMargin - */ - @jakarta.annotation.Nullable - public String getPositionInitialMargin() { - return positionInitialMargin; - } - - public void setPositionInitialMargin( - @jakarta.annotation.Nullable String positionInitialMargin) { - this.positionInitialMargin = positionInitialMargin; - } - - public GetUmAccountDetailV2ResponseAssetsInner openOrderInitialMargin( - @jakarta.annotation.Nullable String openOrderInitialMargin) { - this.openOrderInitialMargin = openOrderInitialMargin; - return this; - } - - /** - * Get openOrderInitialMargin - * - * @return openOrderInitialMargin - */ - @jakarta.annotation.Nullable - public String getOpenOrderInitialMargin() { - return openOrderInitialMargin; - } - - public void setOpenOrderInitialMargin( - @jakarta.annotation.Nullable String openOrderInitialMargin) { - this.openOrderInitialMargin = openOrderInitialMargin; - } - - public GetUmAccountDetailV2ResponseAssetsInner updateTime( - @jakarta.annotation.Nullable Long updateTime) { - this.updateTime = updateTime; - return this; - } - - /** - * Get updateTime - * - * @return updateTime - */ - @jakarta.annotation.Nullable - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(@jakarta.annotation.Nullable Long updateTime) { - this.updateTime = updateTime; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUmAccountDetailV2ResponseAssetsInner getUmAccountDetailV2ResponseAssetsInner = - (GetUmAccountDetailV2ResponseAssetsInner) o; - return Objects.equals(this.asset, getUmAccountDetailV2ResponseAssetsInner.asset) - && Objects.equals( - this.crossWalletBalance, - getUmAccountDetailV2ResponseAssetsInner.crossWalletBalance) - && Objects.equals( - this.crossUnPnl, getUmAccountDetailV2ResponseAssetsInner.crossUnPnl) - && Objects.equals( - this.maintMargin, getUmAccountDetailV2ResponseAssetsInner.maintMargin) - && Objects.equals( - this.initialMargin, getUmAccountDetailV2ResponseAssetsInner.initialMargin) - && Objects.equals( - this.positionInitialMargin, - getUmAccountDetailV2ResponseAssetsInner.positionInitialMargin) - && Objects.equals( - this.openOrderInitialMargin, - getUmAccountDetailV2ResponseAssetsInner.openOrderInitialMargin) - && Objects.equals( - this.updateTime, getUmAccountDetailV2ResponseAssetsInner.updateTime); - } - - @Override - public int hashCode() { - return Objects.hash( - asset, - crossWalletBalance, - crossUnPnl, - maintMargin, - initialMargin, - positionInitialMargin, - openOrderInitialMargin, - updateTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetUmAccountDetailV2ResponseAssetsInner {\n"); - sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); - sb.append(" crossWalletBalance: ") - .append(toIndentedString(crossWalletBalance)) - .append("\n"); - sb.append(" crossUnPnl: ").append(toIndentedString(crossUnPnl)).append("\n"); - sb.append(" maintMargin: ").append(toIndentedString(maintMargin)).append("\n"); - sb.append(" initialMargin: ").append(toIndentedString(initialMargin)).append("\n"); - sb.append(" positionInitialMargin: ") - .append(toIndentedString(positionInitialMargin)) - .append("\n"); - sb.append(" openOrderInitialMargin: ") - .append(toIndentedString(openOrderInitialMargin)) - .append("\n"); - sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object assetValue = getAsset(); - String assetValueAsString = ""; - assetValueAsString = assetValue.toString(); - sb.append("asset=").append(urlEncode(assetValueAsString)).append(""); - Object crossWalletBalanceValue = getCrossWalletBalance(); - String crossWalletBalanceValueAsString = ""; - crossWalletBalanceValueAsString = crossWalletBalanceValue.toString(); - sb.append("crossWalletBalance=") - .append(urlEncode(crossWalletBalanceValueAsString)) - .append(""); - Object crossUnPnlValue = getCrossUnPnl(); - String crossUnPnlValueAsString = ""; - crossUnPnlValueAsString = crossUnPnlValue.toString(); - sb.append("crossUnPnl=").append(urlEncode(crossUnPnlValueAsString)).append(""); - Object maintMarginValue = getMaintMargin(); - String maintMarginValueAsString = ""; - maintMarginValueAsString = maintMarginValue.toString(); - sb.append("maintMargin=").append(urlEncode(maintMarginValueAsString)).append(""); - Object initialMarginValue = getInitialMargin(); - String initialMarginValueAsString = ""; - initialMarginValueAsString = initialMarginValue.toString(); - sb.append("initialMargin=").append(urlEncode(initialMarginValueAsString)).append(""); - Object positionInitialMarginValue = getPositionInitialMargin(); - String positionInitialMarginValueAsString = ""; - positionInitialMarginValueAsString = positionInitialMarginValue.toString(); - sb.append("positionInitialMargin=") - .append(urlEncode(positionInitialMarginValueAsString)) - .append(""); - Object openOrderInitialMarginValue = getOpenOrderInitialMargin(); - String openOrderInitialMarginValueAsString = ""; - openOrderInitialMarginValueAsString = openOrderInitialMarginValue.toString(); - sb.append("openOrderInitialMargin=") - .append(urlEncode(openOrderInitialMarginValueAsString)) - .append(""); - Object updateTimeValue = getUpdateTime(); - String updateTimeValueAsString = ""; - updateTimeValueAsString = updateTimeValue.toString(); - sb.append("updateTime=").append(urlEncode(updateTimeValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("asset"); - openapiFields.add("crossWalletBalance"); - openapiFields.add("crossUnPnl"); - openapiFields.add("maintMargin"); - openapiFields.add("initialMargin"); - openapiFields.add("positionInitialMargin"); - openapiFields.add("openOrderInitialMargin"); - openapiFields.add("updateTime"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetUmAccountDetailV2ResponseAssetsInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetUmAccountDetailV2ResponseAssetsInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " GetUmAccountDetailV2ResponseAssetsInner is not found in the" - + " empty JSON string", - GetUmAccountDetailV2ResponseAssetsInner.openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) - && !jsonObj.get("asset").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `asset` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("asset").toString())); - } - if ((jsonObj.get("crossWalletBalance") != null - && !jsonObj.get("crossWalletBalance").isJsonNull()) - && !jsonObj.get("crossWalletBalance").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `crossWalletBalance` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("crossWalletBalance").toString())); - } - if ((jsonObj.get("crossUnPnl") != null && !jsonObj.get("crossUnPnl").isJsonNull()) - && !jsonObj.get("crossUnPnl").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `crossUnPnl` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("crossUnPnl").toString())); - } - if ((jsonObj.get("maintMargin") != null && !jsonObj.get("maintMargin").isJsonNull()) - && !jsonObj.get("maintMargin").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `maintMargin` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("maintMargin").toString())); - } - if ((jsonObj.get("initialMargin") != null && !jsonObj.get("initialMargin").isJsonNull()) - && !jsonObj.get("initialMargin").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `initialMargin` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("initialMargin").toString())); - } - if ((jsonObj.get("positionInitialMargin") != null - && !jsonObj.get("positionInitialMargin").isJsonNull()) - && !jsonObj.get("positionInitialMargin").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `positionInitialMargin` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("positionInitialMargin").toString())); - } - if ((jsonObj.get("openOrderInitialMargin") != null - && !jsonObj.get("openOrderInitialMargin").isJsonNull()) - && !jsonObj.get("openOrderInitialMargin").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `openOrderInitialMargin` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("openOrderInitialMargin").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetUmAccountDetailV2ResponseAssetsInner.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes 'GetUmAccountDetailV2ResponseAssetsInner' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(GetUmAccountDetailV2ResponseAssetsInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, GetUmAccountDetailV2ResponseAssetsInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetUmAccountDetailV2ResponseAssetsInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetUmAccountDetailV2ResponseAssetsInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetUmAccountDetailV2ResponseAssetsInner - * @throws IOException if the JSON string is invalid with respect to - * GetUmAccountDetailV2ResponseAssetsInner - */ - public static GetUmAccountDetailV2ResponseAssetsInner fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, GetUmAccountDetailV2ResponseAssetsInner.class); - } - - /** - * Convert an instance of GetUmAccountDetailV2ResponseAssetsInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailV2ResponsePositionsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailV2ResponsePositionsInner.java index bcb503c8f..af7d22504 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailV2ResponsePositionsInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmAccountDetailV2ResponsePositionsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetUmAccountDetailV2ResponsePositionsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetUmAccountDetailV2ResponsePositionsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -93,7 +93,7 @@ public GetUmAccountDetailV2ResponsePositionsInner symbol( } /** - * Get symbol + * symbol name * * @return symbol */ @@ -113,7 +113,7 @@ public GetUmAccountDetailV2ResponsePositionsInner initialMargin( } /** - * Get initialMargin + * total initial margin required with current mark price * * @return initialMargin */ @@ -133,7 +133,7 @@ public GetUmAccountDetailV2ResponsePositionsInner maintMargin( } /** - * Get maintMargin + * maintenance margin required * * @return maintMargin */ @@ -153,7 +153,7 @@ public GetUmAccountDetailV2ResponsePositionsInner unrealizedProfit( } /** - * Get unrealizedProfit + * unrealized profit * * @return unrealizedProfit */ @@ -173,7 +173,7 @@ public GetUmAccountDetailV2ResponsePositionsInner positionSide( } /** - * Get positionSide + * position side * * @return positionSide */ @@ -193,7 +193,7 @@ public GetUmAccountDetailV2ResponsePositionsInner positionAmt( } /** - * Get positionAmt + * position amount * * @return positionAmt */ @@ -213,7 +213,7 @@ public GetUmAccountDetailV2ResponsePositionsInner updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -233,7 +233,7 @@ public GetUmAccountDetailV2ResponsePositionsInner notional( } /** - * Get notional + * Notional. * * @return notional */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmCurrentPositionModeResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmCurrentPositionModeResponse.java index 1e96c8894..9fa32427d 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmCurrentPositionModeResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmCurrentPositionModeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetUmCurrentPositionModeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetUmCurrentPositionModeResponse { public static final String SERIALIZED_NAME_DUAL_SIDE_POSITION = "dualSidePosition"; @@ -51,7 +51,7 @@ public GetUmCurrentPositionModeResponse dualSidePosition( } /** - * Get dualSidePosition + * \"true\": Hedge Mode; \"false\": One-way Mode * * @return dualSidePosition */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmFuturesBnbBurnStatusResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmFuturesBnbBurnStatusResponse.java index 0cc5aded3..fb3785460 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmFuturesBnbBurnStatusResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmFuturesBnbBurnStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetUmFuturesBnbBurnStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetUmFuturesBnbBurnStatusResponse { public static final String SERIALIZED_NAME_FEE_BURN = "feeBurn"; @@ -50,7 +50,7 @@ public GetUmFuturesBnbBurnStatusResponse feeBurn(@jakarta.annotation.Nullable Bo } /** - * Get feeBurn + * \"true\": Fee Discount On; \"false\": Fee Discount Off * * @return feeBurn */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmFuturesOrderDownloadLinkByIdResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmFuturesOrderDownloadLinkByIdResponse.java index bd901cf73..cf2fcf6db 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmFuturesOrderDownloadLinkByIdResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmFuturesOrderDownloadLinkByIdResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetUmFuturesOrderDownloadLinkByIdResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetUmFuturesOrderDownloadLinkByIdResponse { public static final String SERIALIZED_NAME_DOWNLOAD_ID = "downloadId"; @@ -87,7 +87,7 @@ public GetUmFuturesOrderDownloadLinkByIdResponse downloadId( } /** - * Get downloadId + * Download ID. * * @return downloadId */ @@ -107,7 +107,7 @@ public GetUmFuturesOrderDownloadLinkByIdResponse status( } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -126,7 +126,7 @@ public GetUmFuturesOrderDownloadLinkByIdResponse url(@jakarta.annotation.Nullabl } /** - * Get url + * The link is mapped to download id * * @return url */ @@ -146,7 +146,7 @@ public GetUmFuturesOrderDownloadLinkByIdResponse s3Link( } /** - * Get s3Link + * S3 Link. * * @return s3Link */ @@ -166,7 +166,7 @@ public GetUmFuturesOrderDownloadLinkByIdResponse notified( } /** - * Get notified + * ignore * * @return notified */ @@ -186,7 +186,7 @@ public GetUmFuturesOrderDownloadLinkByIdResponse expirationTimestamp( } /** - * Get expirationTimestamp + * The link would expire after this timestamp * * @return expirationTimestamp */ @@ -206,7 +206,7 @@ public GetUmFuturesOrderDownloadLinkByIdResponse isExpired( } /** - * Get isExpired + * Is Expired. * * @return isExpired */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmFuturesTradeDownloadLinkByIdResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmFuturesTradeDownloadLinkByIdResponse.java index c189bc200..8ce668d58 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmFuturesTradeDownloadLinkByIdResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmFuturesTradeDownloadLinkByIdResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetUmFuturesTradeDownloadLinkByIdResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetUmFuturesTradeDownloadLinkByIdResponse { public static final String SERIALIZED_NAME_DOWNLOAD_ID = "downloadId"; @@ -87,7 +87,7 @@ public GetUmFuturesTradeDownloadLinkByIdResponse downloadId( } /** - * Get downloadId + * Download ID. * * @return downloadId */ @@ -107,7 +107,7 @@ public GetUmFuturesTradeDownloadLinkByIdResponse status( } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -126,7 +126,7 @@ public GetUmFuturesTradeDownloadLinkByIdResponse url(@jakarta.annotation.Nullabl } /** - * Get url + * The link is mapped to download id * * @return url */ @@ -146,7 +146,7 @@ public GetUmFuturesTradeDownloadLinkByIdResponse s3Link( } /** - * Get s3Link + * S3 Link. * * @return s3Link */ @@ -166,7 +166,7 @@ public GetUmFuturesTradeDownloadLinkByIdResponse notified( } /** - * Get notified + * ignore * * @return notified */ @@ -186,7 +186,7 @@ public GetUmFuturesTradeDownloadLinkByIdResponse expirationTimestamp( } /** - * Get expirationTimestamp + * The link would expire after this timestamp * * @return expirationTimestamp */ @@ -206,7 +206,7 @@ public GetUmFuturesTradeDownloadLinkByIdResponse isExpired( } /** - * Get isExpired + * Is Expired. * * @return isExpired */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmFuturesTransactionDownloadLinkByIdResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmFuturesTransactionDownloadLinkByIdResponse.java index f9a910b61..c21aa7557 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmFuturesTransactionDownloadLinkByIdResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmFuturesTransactionDownloadLinkByIdResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetUmFuturesTransactionDownloadLinkByIdResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetUmFuturesTransactionDownloadLinkByIdResponse { public static final String SERIALIZED_NAME_DOWNLOAD_ID = "downloadId"; @@ -87,7 +87,7 @@ public GetUmFuturesTransactionDownloadLinkByIdResponse downloadId( } /** - * Get downloadId + * Download ID. * * @return downloadId */ @@ -107,7 +107,7 @@ public GetUmFuturesTransactionDownloadLinkByIdResponse status( } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -127,7 +127,7 @@ public GetUmFuturesTransactionDownloadLinkByIdResponse url( } /** - * Get url + * The link is mapped to download id * * @return url */ @@ -147,7 +147,7 @@ public GetUmFuturesTransactionDownloadLinkByIdResponse s3Link( } /** - * Get s3Link + * S3 Link. * * @return s3Link */ @@ -167,7 +167,7 @@ public GetUmFuturesTransactionDownloadLinkByIdResponse notified( } /** - * Get notified + * ignore * * @return notified */ @@ -187,7 +187,7 @@ public GetUmFuturesTransactionDownloadLinkByIdResponse expirationTimestamp( } /** - * Get expirationTimestamp + * The link would expire after this timestamp * * @return expirationTimestamp */ @@ -207,7 +207,7 @@ public GetUmFuturesTransactionDownloadLinkByIdResponse isExpired( } /** - * Get isExpired + * Is Expired. * * @return isExpired */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmIncomeHistoryResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmIncomeHistoryResponse.java index 675da94b6..4014792d9 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmIncomeHistoryResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmIncomeHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetUmIncomeHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetUmIncomeHistoryResponse extends ArrayList { public GetUmIncomeHistoryResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmIncomeHistoryResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmIncomeHistoryResponseInner.java index 69c1e5794..a2ccea129 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmIncomeHistoryResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUmIncomeHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetUmIncomeHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetUmIncomeHistoryResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -76,7 +76,7 @@ public class GetUmIncomeHistoryResponseInner { @SerializedName(SERIALIZED_NAME_TRAN_ID) @jakarta.annotation.Nullable - private Long tranId; + private String tranId; public static final String SERIALIZED_NAME_TRADE_ID = "tradeId"; @@ -92,7 +92,7 @@ public GetUmIncomeHistoryResponseInner symbol(@jakarta.annotation.Nullable Strin } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -112,7 +112,7 @@ public GetUmIncomeHistoryResponseInner incomeType( } /** - * Get incomeType + * Income type. * * @return incomeType */ @@ -131,7 +131,7 @@ public GetUmIncomeHistoryResponseInner income(@jakarta.annotation.Nullable Strin } /** - * Get income + * Income amount. * * @return income */ @@ -150,7 +150,7 @@ public GetUmIncomeHistoryResponseInner asset(@jakarta.annotation.Nullable String } /** - * Get asset + * Income asset. * * @return asset */ @@ -169,7 +169,7 @@ public GetUmIncomeHistoryResponseInner info(@jakarta.annotation.Nullable String } /** - * Get info + * Extra information. * * @return info */ @@ -188,7 +188,7 @@ public GetUmIncomeHistoryResponseInner time(@jakarta.annotation.Nullable Long ti } /** - * Get time + * Event time. * * @return time */ @@ -201,22 +201,22 @@ public void setTime(@jakarta.annotation.Nullable Long time) { this.time = time; } - public GetUmIncomeHistoryResponseInner tranId(@jakarta.annotation.Nullable Long tranId) { + public GetUmIncomeHistoryResponseInner tranId(@jakarta.annotation.Nullable String tranId) { this.tranId = tranId; return this; } /** - * Get tranId + * Transaction ID. * * @return tranId */ @jakarta.annotation.Nullable - public Long getTranId() { + public String getTranId() { return tranId; } - public void setTranId(@jakarta.annotation.Nullable Long tranId) { + public void setTranId(@jakarta.annotation.Nullable String tranId) { this.tranId = tranId; } @@ -226,7 +226,7 @@ public GetUmIncomeHistoryResponseInner tradeId(@jakarta.annotation.Nullable Stri } /** - * Get tradeId + * Trade ID, if existing. * * @return tradeId */ @@ -415,6 +415,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("info").toString())); } + if ((jsonObj.get("tranId") != null && !jsonObj.get("tranId").isJsonNull()) + && !jsonObj.get("tranId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tranId` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("tranId").toString())); + } if ((jsonObj.get("tradeId") != null && !jsonObj.get("tradeId").isJsonNull()) && !jsonObj.get("tradeId").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUserCommissionRateForCmResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUserCommissionRateForCmResponse.java index 157494db3..0350d2ccd 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUserCommissionRateForCmResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUserCommissionRateForCmResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetUserCommissionRateForCmResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetUserCommissionRateForCmResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -62,7 +62,7 @@ public GetUserCommissionRateForCmResponse symbol(@jakarta.annotation.Nullable St } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -82,7 +82,7 @@ public GetUserCommissionRateForCmResponse makerCommissionRate( } /** - * Get makerCommissionRate + * 0.015% * * @return makerCommissionRate */ @@ -102,7 +102,7 @@ public GetUserCommissionRateForCmResponse takerCommissionRate( } /** - * Get takerCommissionRate + * 0.040% * * @return takerCommissionRate */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUserCommissionRateForUmResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUserCommissionRateForUmResponse.java index 75123e948..1d5aceeaa 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUserCommissionRateForUmResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/GetUserCommissionRateForUmResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetUserCommissionRateForUmResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetUserCommissionRateForUmResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -62,7 +62,7 @@ public GetUserCommissionRateForUmResponse symbol(@jakarta.annotation.Nullable St } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -82,7 +82,7 @@ public GetUserCommissionRateForUmResponse makerCommissionRate( } /** - * Get makerCommissionRate + * 0.02% * * @return makerCommissionRate */ @@ -102,7 +102,7 @@ public GetUserCommissionRateForUmResponse takerCommissionRate( } /** - * Get takerCommissionRate + * 0.04% * * @return takerCommissionRate */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/IncomeType.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/IncomeType.java new file mode 100644 index 000000000..e5947d7e3 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/IncomeType.java @@ -0,0 +1,107 @@ +/* + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets incomeType */ +@JsonAdapter(IncomeType.Adapter.class) +public enum IncomeType { + TRANSFER("TRANSFER"), + + WELCOME_BONUS("WELCOME_BONUS"), + + REALIZED_PNL("REALIZED_PNL"), + + FUNDING_FEE("FUNDING_FEE"), + + COMMISSION("COMMISSION"), + + INSURANCE_CLEAR("INSURANCE_CLEAR"), + + REFERRAL_KICKBACK("REFERRAL_KICKBACK"), + + COMMISSION_REBATE("COMMISSION_REBATE"), + + API_REBATE("API_REBATE"), + + CONTEST_REWARD("CONTEST_REWARD"), + + CROSS_COLLATERAL_TRANSFER("CROSS_COLLATERAL_TRANSFER"), + + OPTIONS_PREMIUM_FEE("OPTIONS_PREMIUM_FEE"), + + OPTIONS_SETTLE_PROFIT("OPTIONS_SETTLE_PROFIT"), + + INTERNAL_TRANSFER("INTERNAL_TRANSFER"), + + AUTO_EXCHANGE("AUTO_EXCHANGE"), + + DELIVERED_SETTELMENT("DELIVERED_SETTELMENT"), + + COIN_SWAP_DEPOSIT("COIN_SWAP_DEPOSIT"), + + COIN_SWAP_WITHDRAW("COIN_SWAP_WITHDRAW"), + + POSITION_LIMIT_INCREASE_FEE("POSITION_LIMIT_INCREASE_FEE"); + + private String value; + + IncomeType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static IncomeType fromValue(String value) { + for (IncomeType b : IncomeType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final IncomeType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public IncomeType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return IncomeType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + IncomeType.fromValue(value); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountBorrowRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountBorrowRequest.java index 876a93bcb..2d9b2ad26 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountBorrowRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountBorrowRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** MarginAccountBorrowRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountBorrowRequest { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -104,11 +104,12 @@ public MarginAccountBorrowRequest recvWindow(@jakarta.annotation.Nullable Long r } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountBorrowResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountBorrowResponse.java index 44cefb635..28392f4c1 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountBorrowResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountBorrowResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountBorrowResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountBorrowResponse { public static final String SERIALIZED_NAME_TRAN_ID = "tranId"; @@ -50,7 +50,7 @@ public MarginAccountBorrowResponse tranId(@jakarta.annotation.Nullable Long tran } /** - * Get tranId + * Transaction ID. * * @return tranId */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountNewOcoRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountNewOcoRequest.java index 2866b7e9f..d24c56198 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountNewOcoRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountNewOcoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** MarginAccountNewOcoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOcoRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -113,13 +113,13 @@ public class MarginAccountNewOcoRequest { @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESP_TYPE) @jakarta.annotation.Nullable - private NewOrderRespType newOrderRespType; + private NewOrderRespType newOrderRespType = NewOrderRespType.ACK; public static final String SERIALIZED_NAME_SIDE_EFFECT_TYPE = "sideEffectType"; @SerializedName(SERIALIZED_NAME_SIDE_EFFECT_TYPE) @jakarta.annotation.Nullable - private SideEffectType sideEffectType; + private SideEffectType sideEffectType = SideEffectType.NO_SIDE_EFFECT; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -156,7 +156,7 @@ public MarginAccountNewOcoRequest listClientOrderId( } /** - * Get listClientOrderId + * A unique Id for the entire orderList * * @return listClientOrderId */ @@ -218,7 +218,7 @@ public MarginAccountNewOcoRequest limitClientOrderId( } /** - * Get limitClientOrderId + * A unique Id for the limit order * * @return limitClientOrderId */ @@ -280,7 +280,7 @@ public MarginAccountNewOcoRequest stopClientOrderId( } /** - * Get stopClientOrderId + * A unique Id for the stop loss/stop loss limit leg * * @return stopClientOrderId */ @@ -321,7 +321,7 @@ public MarginAccountNewOcoRequest stopLimitPrice( } /** - * Get stopLimitPrice + * If provided, stopLimitTimeInForce is required. * * @return stopLimitPrice */ @@ -427,11 +427,12 @@ public MarginAccountNewOcoRequest recvWindow(@jakarta.annotation.Nullable Long r } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountNewOcoResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountNewOcoResponse.java index 8992150ab..a9e8982bb 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountNewOcoResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountNewOcoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** MarginAccountNewOcoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOcoResponse { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; @@ -116,7 +116,7 @@ public MarginAccountNewOcoResponse orderListId(@jakarta.annotation.Nullable Long } /** - * Get orderListId + * Order List ID. * * @return orderListId */ @@ -136,7 +136,7 @@ public MarginAccountNewOcoResponse contingencyType( } /** - * Get contingencyType + * Contingency Type. * * @return contingencyType */ @@ -156,7 +156,7 @@ public MarginAccountNewOcoResponse listStatusType( } /** - * Get listStatusType + * List Status Type. * * @return listStatusType */ @@ -176,7 +176,7 @@ public MarginAccountNewOcoResponse listOrderStatus( } /** - * Get listOrderStatus + * List Order Status. * * @return listOrderStatus */ @@ -196,7 +196,7 @@ public MarginAccountNewOcoResponse listClientOrderId( } /** - * Get listClientOrderId + * List Client Order ID. * * @return listClientOrderId */ @@ -216,7 +216,7 @@ public MarginAccountNewOcoResponse transactionTime( } /** - * Get transactionTime + * Transaction Time. * * @return transactionTime */ @@ -235,7 +235,7 @@ public MarginAccountNewOcoResponse symbol(@jakarta.annotation.Nullable String sy } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -255,7 +255,7 @@ public MarginAccountNewOcoResponse marginBuyBorrowAmount( } /** - * Get marginBuyBorrowAmount + * will not return if no margin trade happens * * @return marginBuyBorrowAmount */ @@ -276,7 +276,7 @@ public MarginAccountNewOcoResponse marginBuyBorrowAsset( } /** - * Get marginBuyBorrowAsset + * will not return if no margin trade happens * * @return marginBuyBorrowAsset */ @@ -306,7 +306,7 @@ public MarginAccountNewOcoResponse addOrdersItem( } /** - * Get orders + * Orders. * * @return orders */ @@ -339,7 +339,7 @@ public MarginAccountNewOcoResponse addOrderReportsItem( } /** - * Get orderReports + * Order Reports. * * @return orderReports */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountNewOcoResponseOrderReportsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountNewOcoResponseOrderReportsInner.java index 968319a43..a1e001450 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountNewOcoResponseOrderReportsInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountNewOcoResponseOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountNewOcoResponseOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOcoResponseOrderReportsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -129,7 +129,7 @@ public MarginAccountNewOcoResponseOrderReportsInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -149,7 +149,7 @@ public MarginAccountNewOcoResponseOrderReportsInner orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -169,7 +169,7 @@ public MarginAccountNewOcoResponseOrderReportsInner orderListId( } /** - * Get orderListId + * Order List ID. * * @return orderListId */ @@ -189,7 +189,7 @@ public MarginAccountNewOcoResponseOrderReportsInner clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -209,7 +209,7 @@ public MarginAccountNewOcoResponseOrderReportsInner transactTime( } /** - * Get transactTime + * Transact Time. * * @return transactTime */ @@ -229,7 +229,7 @@ public MarginAccountNewOcoResponseOrderReportsInner price( } /** - * Get price + * Price. * * @return price */ @@ -249,7 +249,7 @@ public MarginAccountNewOcoResponseOrderReportsInner origQty( } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -269,7 +269,7 @@ public MarginAccountNewOcoResponseOrderReportsInner executedQty( } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -289,7 +289,7 @@ public MarginAccountNewOcoResponseOrderReportsInner cummulativeQuoteQty( } /** - * Get cummulativeQuoteQty + * Cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -309,7 +309,7 @@ public MarginAccountNewOcoResponseOrderReportsInner status( } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -329,7 +329,7 @@ public MarginAccountNewOcoResponseOrderReportsInner timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -349,7 +349,7 @@ public MarginAccountNewOcoResponseOrderReportsInner type( } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -369,7 +369,7 @@ public MarginAccountNewOcoResponseOrderReportsInner side( } /** - * Get side + * Side. * * @return side */ @@ -389,7 +389,7 @@ public MarginAccountNewOcoResponseOrderReportsInner stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountNewOcoResponseOrdersInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountNewOcoResponseOrdersInner.java index 65d0b1102..b64793207 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountNewOcoResponseOrdersInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountNewOcoResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountNewOcoResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOcoResponseOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public MarginAccountNewOcoResponseOrdersInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -83,7 +83,7 @@ public MarginAccountNewOcoResponseOrdersInner orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -103,7 +103,7 @@ public MarginAccountNewOcoResponseOrdersInner clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountRepayDebtRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountRepayDebtRequest.java index e57075366..fe75119f4 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountRepayDebtRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountRepayDebtRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -22,7 +22,6 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -35,7 +34,7 @@ /** MarginAccountRepayDebtRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountRepayDebtRequest { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -47,7 +46,7 @@ public class MarginAccountRepayDebtRequest { @SerializedName(SERIALIZED_NAME_AMOUNT) @jakarta.annotation.Nullable - private Double amount; + private String amount; public static final String SERIALIZED_NAME_SPECIFY_REPAY_ASSETS = "specifyRepayAssets"; @@ -83,7 +82,7 @@ public void setAsset(@jakarta.annotation.Nonnull String asset) { this.asset = asset; } - public MarginAccountRepayDebtRequest amount(@jakarta.annotation.Nullable Double amount) { + public MarginAccountRepayDebtRequest amount(@jakarta.annotation.Nullable String amount) { this.amount = amount; return this; } @@ -94,12 +93,11 @@ public MarginAccountRepayDebtRequest amount(@jakarta.annotation.Nullable Double * @return amount */ @jakarta.annotation.Nullable - @Valid - public Double getAmount() { + public String getAmount() { return amount; } - public void setAmount(@jakarta.annotation.Nullable Double amount) { + public void setAmount(@jakarta.annotation.Nullable String amount) { this.amount = amount; } @@ -110,7 +108,7 @@ public MarginAccountRepayDebtRequest specifyRepayAssets( } /** - * Get specifyRepayAssets + * Specific asset list to repay debt; Can be added in batch, separated by commas * * @return specifyRepayAssets */ @@ -129,7 +127,7 @@ public MarginAccountRepayDebtRequest recvWindow(@jakarta.annotation.Nullable Lon } /** - * Get recvWindow + * The value cannot be greater than 60000 * * @return recvWindow */ @@ -273,6 +271,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("asset").toString())); } + if ((jsonObj.get("amount") != null && !jsonObj.get("amount").isJsonNull()) + && !jsonObj.get("amount").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `amount` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("amount").toString())); + } if ((jsonObj.get("specifyRepayAssets") != null && !jsonObj.get("specifyRepayAssets").isJsonNull()) && !jsonObj.get("specifyRepayAssets").isJsonPrimitive()) { diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountRepayDebtResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountRepayDebtResponse.java index 95f0b8901..8e355fcdd 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountRepayDebtResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountRepayDebtResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** MarginAccountRepayDebtResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountRepayDebtResponse { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -78,7 +78,7 @@ public MarginAccountRepayDebtResponse amount(@jakarta.annotation.Nullable String } /** - * Get amount + * Amount repaid * * @return amount */ @@ -97,7 +97,7 @@ public MarginAccountRepayDebtResponse asset(@jakarta.annotation.Nullable String } /** - * Get asset + * asset name * * @return asset */ @@ -125,7 +125,7 @@ public MarginAccountRepayDebtResponse addSpecifyRepayAssetsItem(String specifyRe } /** - * Get specifyRepayAssets + * Specify Repay Assets. * * @return specifyRepayAssets */ @@ -145,7 +145,7 @@ public MarginAccountRepayDebtResponse updateTime(@jakarta.annotation.Nullable Lo } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -164,7 +164,7 @@ public MarginAccountRepayDebtResponse success(@jakarta.annotation.Nullable Boole } /** - * Get success + * Success. * * @return success */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountRepayRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountRepayRequest.java index 8b5ba8be7..732cb50b6 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountRepayRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountRepayRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** MarginAccountRepayRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountRepayRequest { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -104,7 +104,7 @@ public MarginAccountRepayRequest recvWindow(@jakarta.annotation.Nullable Long re } /** - * Get recvWindow + * The value cannot be greater than 60000 * * @return recvWindow */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountRepayResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountRepayResponse.java index eec1ad283..867c679df 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountRepayResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountRepayResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountRepayResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountRepayResponse { public static final String SERIALIZED_NAME_TRAN_ID = "tranId"; @@ -50,7 +50,7 @@ public MarginAccountRepayResponse tranId(@jakarta.annotation.Nullable Long tranI } /** - * Get tranId + * Transaction ID. * * @return tranId */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountTradeListResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountTradeListResponse.java index 144b1e6de..58ef43eb4 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountTradeListResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountTradeListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountTradeListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountTradeListResponse extends ArrayList { public MarginAccountTradeListResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountTradeListResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountTradeListResponseInner.java index ab38f7135..f4f026b7d 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountTradeListResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginAccountTradeListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountTradeListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountTradeListResponseInner { public static final String SERIALIZED_NAME_COMMISSION = "commission"; @@ -111,7 +111,7 @@ public MarginAccountTradeListResponseInner commission( } /** - * Get commission + * Commission. * * @return commission */ @@ -131,7 +131,7 @@ public MarginAccountTradeListResponseInner commissionAsset( } /** - * Get commissionAsset + * Commission Asset. * * @return commissionAsset */ @@ -150,7 +150,7 @@ public MarginAccountTradeListResponseInner id(@jakarta.annotation.Nullable Long } /** - * Get id + * ID. * * @return id */ @@ -170,7 +170,7 @@ public MarginAccountTradeListResponseInner isBestMatch( } /** - * Get isBestMatch + * Is Best Match. * * @return isBestMatch */ @@ -190,7 +190,7 @@ public MarginAccountTradeListResponseInner isBuyer( } /** - * Get isBuyer + * Is Buyer. * * @return isBuyer */ @@ -210,7 +210,7 @@ public MarginAccountTradeListResponseInner isMaker( } /** - * Get isMaker + * Is Maker. * * @return isMaker */ @@ -229,7 +229,7 @@ public MarginAccountTradeListResponseInner orderId(@jakarta.annotation.Nullable } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -248,7 +248,7 @@ public MarginAccountTradeListResponseInner price(@jakarta.annotation.Nullable St } /** - * Get price + * Price. * * @return price */ @@ -267,7 +267,7 @@ public MarginAccountTradeListResponseInner qty(@jakarta.annotation.Nullable Stri } /** - * Get qty + * Qty. * * @return qty */ @@ -286,7 +286,7 @@ public MarginAccountTradeListResponseInner symbol(@jakarta.annotation.Nullable S } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -305,7 +305,7 @@ public MarginAccountTradeListResponseInner time(@jakarta.annotation.Nullable Lon } /** - * Get time + * Event time. * * @return time */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginMaxBorrowResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginMaxBorrowResponse.java index e40c23a43..fb1670a8b 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginMaxBorrowResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/MarginMaxBorrowResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginMaxBorrowResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginMaxBorrowResponse { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -56,7 +56,7 @@ public MarginMaxBorrowResponse amount(@jakarta.annotation.Nullable String amount } /** - * Get amount + * account's currently max borrowable amount with sufficient system availability * * @return amount */ @@ -75,7 +75,7 @@ public MarginMaxBorrowResponse borrowLimit(@jakarta.annotation.Nullable String b } /** - * Get borrowLimit + * max borrowable amount limited by the account level * * @return borrowLimit */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ModifyCmOrderRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ModifyCmOrderRequest.java index 2170fde62..091dd319e 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ModifyCmOrderRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ModifyCmOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** ModifyCmOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyCmOrderRequest { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -79,6 +79,12 @@ public class ModifyCmOrderRequest { @jakarta.annotation.Nullable private PriceMatch priceMatch; + public static final String SERIALIZED_NAME_MODIFY_ID = "modifyId"; + + @SerializedName(SERIALIZED_NAME_MODIFY_ID) + @jakarta.annotation.Nullable + private Long modifyId; + public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @SerializedName(SERIALIZED_NAME_RECV_WINDOW) @@ -93,7 +99,7 @@ public ModifyCmOrderRequest orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Order ID * * @return orderId */ @@ -113,7 +119,7 @@ public ModifyCmOrderRequest origClientOrderId( } /** - * Get origClientOrderId + * Client order ID * * @return origClientOrderId */ @@ -132,7 +138,7 @@ public ModifyCmOrderRequest symbol(@jakarta.annotation.Nonnull String symbol) { } /** - * Get symbol + * Symbol * * @return symbol */ @@ -173,7 +179,7 @@ public ModifyCmOrderRequest quantity(@jakarta.annotation.Nonnull Double quantity } /** - * Get quantity + * Order quantity * * @return quantity */ @@ -194,7 +200,7 @@ public ModifyCmOrderRequest price(@jakarta.annotation.Nonnull Double price) { } /** - * Get price + * Order price * * @return price */ @@ -229,6 +235,26 @@ public void setPriceMatch(@jakarta.annotation.Nullable PriceMatch priceMatch) { this.priceMatch = priceMatch; } + public ModifyCmOrderRequest modifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + return this; + } + + /** + * User-defined modification identifier, returned as-is in the response. Optional; not validated + * for uniqueness. + * + * @return modifyId + */ + @jakarta.annotation.Nullable + public Long getModifyId() { + return modifyId; + } + + public void setModifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + } + public ModifyCmOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) { this.recvWindow = recvWindow; return this; @@ -264,13 +290,22 @@ public boolean equals(Object o) { && Objects.equals(this.quantity, modifyCmOrderRequest.quantity) && Objects.equals(this.price, modifyCmOrderRequest.price) && Objects.equals(this.priceMatch, modifyCmOrderRequest.priceMatch) + && Objects.equals(this.modifyId, modifyCmOrderRequest.modifyId) && Objects.equals(this.recvWindow, modifyCmOrderRequest.recvWindow); } @Override public int hashCode() { return Objects.hash( - orderId, origClientOrderId, symbol, side, quantity, price, priceMatch, recvWindow); + orderId, + origClientOrderId, + symbol, + side, + quantity, + price, + priceMatch, + modifyId, + recvWindow); } @Override @@ -284,6 +319,7 @@ public String toString() { sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" priceMatch: ").append(toIndentedString(priceMatch)).append("\n"); + sb.append(" modifyId: ").append(toIndentedString(modifyId)).append("\n"); sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); sb.append("}"); return sb.toString(); @@ -322,6 +358,10 @@ public String toUrlQueryString() { String priceMatchValueAsString = ""; priceMatchValueAsString = priceMatchValue.toString(); sb.append("priceMatch=").append(urlEncode(priceMatchValueAsString)).append(""); + Object modifyIdValue = getModifyId(); + String modifyIdValueAsString = ""; + modifyIdValueAsString = modifyIdValue.toString(); + sb.append("modifyId=").append(urlEncode(modifyIdValueAsString)).append(""); Object recvWindowValue = getRecvWindow(); String recvWindowValueAsString = ""; recvWindowValueAsString = recvWindowValue.toString(); @@ -361,6 +401,7 @@ private String toIndentedString(Object o) { openapiFields.add("quantity"); openapiFields.add("price"); openapiFields.add("priceMatch"); + openapiFields.add("modifyId"); openapiFields.add("recvWindow"); // a set of required properties/fields (JSON key names) diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ModifyCmOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ModifyCmOrderResponse.java index 9f0fc4a49..c7f139dba 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ModifyCmOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ModifyCmOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ModifyCmOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyCmOrderResponse { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -66,6 +66,12 @@ public class ModifyCmOrderResponse { @jakarta.annotation.Nullable private String clientOrderId; + public static final String SERIALIZED_NAME_MODIFY_ID = "modifyId"; + + @SerializedName(SERIALIZED_NAME_MODIFY_ID) + @jakarta.annotation.Nullable + private Long modifyId; + public static final String SERIALIZED_NAME_PRICE = "price"; @SerializedName(SERIALIZED_NAME_PRICE) @@ -152,7 +158,7 @@ public ModifyCmOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -171,7 +177,7 @@ public ModifyCmOrderResponse symbol(@jakarta.annotation.Nullable String symbol) } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -190,7 +196,7 @@ public ModifyCmOrderResponse pair(@jakarta.annotation.Nullable String pair) { } /** - * Get pair + * Pair. * * @return pair */ @@ -209,7 +215,7 @@ public ModifyCmOrderResponse status(@jakarta.annotation.Nullable String status) } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -228,7 +234,7 @@ public ModifyCmOrderResponse clientOrderId(@jakarta.annotation.Nullable String c } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -241,13 +247,32 @@ public void setClientOrderId(@jakarta.annotation.Nullable String clientOrderId) this.clientOrderId = clientOrderId; } + public ModifyCmOrderResponse modifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + return this; + } + + /** + * user-defined modification identifier, only returned if provided in the request + * + * @return modifyId + */ + @jakarta.annotation.Nullable + public Long getModifyId() { + return modifyId; + } + + public void setModifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + } + public ModifyCmOrderResponse price(@jakarta.annotation.Nullable String price) { this.price = price; return this; } /** - * Get price + * Price. * * @return price */ @@ -266,7 +291,7 @@ public ModifyCmOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPri } /** - * Get avgPrice + * Avg Price. * * @return avgPrice */ @@ -285,7 +310,7 @@ public ModifyCmOrderResponse origQty(@jakarta.annotation.Nullable String origQty } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -304,7 +329,7 @@ public ModifyCmOrderResponse executedQty(@jakarta.annotation.Nullable String exe } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -323,7 +348,7 @@ public ModifyCmOrderResponse cumQty(@jakarta.annotation.Nullable String cumQty) } /** - * Get cumQty + * Cum Qty. * * @return cumQty */ @@ -342,7 +367,7 @@ public ModifyCmOrderResponse cumBase(@jakarta.annotation.Nullable String cumBase } /** - * Get cumBase + * Cum Base. * * @return cumBase */ @@ -361,7 +386,7 @@ public ModifyCmOrderResponse timeInForce(@jakarta.annotation.Nullable String tim } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -380,7 +405,7 @@ public ModifyCmOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -399,7 +424,7 @@ public ModifyCmOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean red } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -418,7 +443,7 @@ public ModifyCmOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Side. * * @return side */ @@ -437,7 +462,7 @@ public ModifyCmOrderResponse positionSide(@jakarta.annotation.Nullable String po } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -456,7 +481,7 @@ public ModifyCmOrderResponse origType(@jakarta.annotation.Nullable String origTy } /** - * Get origType + * Orig Type. * * @return origType */ @@ -475,7 +500,7 @@ public ModifyCmOrderResponse updateTime(@jakarta.annotation.Nullable Long update } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -502,6 +527,7 @@ public boolean equals(Object o) { && Objects.equals(this.pair, modifyCmOrderResponse.pair) && Objects.equals(this.status, modifyCmOrderResponse.status) && Objects.equals(this.clientOrderId, modifyCmOrderResponse.clientOrderId) + && Objects.equals(this.modifyId, modifyCmOrderResponse.modifyId) && Objects.equals(this.price, modifyCmOrderResponse.price) && Objects.equals(this.avgPrice, modifyCmOrderResponse.avgPrice) && Objects.equals(this.origQty, modifyCmOrderResponse.origQty) @@ -525,6 +551,7 @@ public int hashCode() { pair, status, clientOrderId, + modifyId, price, avgPrice, origQty, @@ -549,6 +576,7 @@ public String toString() { sb.append(" pair: ").append(toIndentedString(pair)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); + sb.append(" modifyId: ").append(toIndentedString(modifyId)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); @@ -589,6 +617,10 @@ public String toUrlQueryString() { String clientOrderIdValueAsString = ""; clientOrderIdValueAsString = clientOrderIdValue.toString(); sb.append("clientOrderId=").append(urlEncode(clientOrderIdValueAsString)).append(""); + Object modifyIdValue = getModifyId(); + String modifyIdValueAsString = ""; + modifyIdValueAsString = modifyIdValue.toString(); + sb.append("modifyId=").append(urlEncode(modifyIdValueAsString)).append(""); Object priceValue = getPrice(); String priceValueAsString = ""; priceValueAsString = priceValue.toString(); @@ -674,6 +706,7 @@ private String toIndentedString(Object o) { openapiFields.add("pair"); openapiFields.add("status"); openapiFields.add("clientOrderId"); + openapiFields.add("modifyId"); openapiFields.add("price"); openapiFields.add("avgPrice"); openapiFields.add("origQty"); diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ModifyUmOrderRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ModifyUmOrderRequest.java index 3d384b0a2..9e80129eb 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ModifyUmOrderRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ModifyUmOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** ModifyUmOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyUmOrderRequest { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -79,6 +79,12 @@ public class ModifyUmOrderRequest { @jakarta.annotation.Nullable private PriceMatch priceMatch; + public static final String SERIALIZED_NAME_MODIFY_ID = "modifyId"; + + @SerializedName(SERIALIZED_NAME_MODIFY_ID) + @jakarta.annotation.Nullable + private Long modifyId; + public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @SerializedName(SERIALIZED_NAME_RECV_WINDOW) @@ -93,7 +99,7 @@ public ModifyUmOrderRequest orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Order ID * * @return orderId */ @@ -113,7 +119,7 @@ public ModifyUmOrderRequest origClientOrderId( } /** - * Get origClientOrderId + * Client order ID * * @return origClientOrderId */ @@ -132,7 +138,7 @@ public ModifyUmOrderRequest symbol(@jakarta.annotation.Nonnull String symbol) { } /** - * Get symbol + * Symbol * * @return symbol */ @@ -173,7 +179,7 @@ public ModifyUmOrderRequest quantity(@jakarta.annotation.Nonnull Double quantity } /** - * Get quantity + * Order quantity * * @return quantity */ @@ -194,7 +200,7 @@ public ModifyUmOrderRequest price(@jakarta.annotation.Nonnull Double price) { } /** - * Get price + * Order price * * @return price */ @@ -229,6 +235,26 @@ public void setPriceMatch(@jakarta.annotation.Nullable PriceMatch priceMatch) { this.priceMatch = priceMatch; } + public ModifyUmOrderRequest modifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + return this; + } + + /** + * User-defined modification identifier, returned as-is in the response. Optional; not validated + * for uniqueness. + * + * @return modifyId + */ + @jakarta.annotation.Nullable + public Long getModifyId() { + return modifyId; + } + + public void setModifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + } + public ModifyUmOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) { this.recvWindow = recvWindow; return this; @@ -264,13 +290,22 @@ public boolean equals(Object o) { && Objects.equals(this.quantity, modifyUmOrderRequest.quantity) && Objects.equals(this.price, modifyUmOrderRequest.price) && Objects.equals(this.priceMatch, modifyUmOrderRequest.priceMatch) + && Objects.equals(this.modifyId, modifyUmOrderRequest.modifyId) && Objects.equals(this.recvWindow, modifyUmOrderRequest.recvWindow); } @Override public int hashCode() { return Objects.hash( - orderId, origClientOrderId, symbol, side, quantity, price, priceMatch, recvWindow); + orderId, + origClientOrderId, + symbol, + side, + quantity, + price, + priceMatch, + modifyId, + recvWindow); } @Override @@ -284,6 +319,7 @@ public String toString() { sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" priceMatch: ").append(toIndentedString(priceMatch)).append("\n"); + sb.append(" modifyId: ").append(toIndentedString(modifyId)).append("\n"); sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); sb.append("}"); return sb.toString(); @@ -322,6 +358,10 @@ public String toUrlQueryString() { String priceMatchValueAsString = ""; priceMatchValueAsString = priceMatchValue.toString(); sb.append("priceMatch=").append(urlEncode(priceMatchValueAsString)).append(""); + Object modifyIdValue = getModifyId(); + String modifyIdValueAsString = ""; + modifyIdValueAsString = modifyIdValue.toString(); + sb.append("modifyId=").append(urlEncode(modifyIdValueAsString)).append(""); Object recvWindowValue = getRecvWindow(); String recvWindowValueAsString = ""; recvWindowValueAsString = recvWindowValue.toString(); @@ -361,6 +401,7 @@ private String toIndentedString(Object o) { openapiFields.add("quantity"); openapiFields.add("price"); openapiFields.add("priceMatch"); + openapiFields.add("modifyId"); openapiFields.add("recvWindow"); // a set of required properties/fields (JSON key names) diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ModifyUmOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ModifyUmOrderResponse.java index 2abe23a56..6f8655087 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ModifyUmOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ModifyUmOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ModifyUmOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyUmOrderResponse { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -60,6 +60,12 @@ public class ModifyUmOrderResponse { @jakarta.annotation.Nullable private String clientOrderId; + public static final String SERIALIZED_NAME_MODIFY_ID = "modifyId"; + + @SerializedName(SERIALIZED_NAME_MODIFY_ID) + @jakarta.annotation.Nullable + private Long modifyId; + public static final String SERIALIZED_NAME_PRICE = "price"; @SerializedName(SERIALIZED_NAME_PRICE) @@ -165,7 +171,7 @@ public ModifyUmOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -184,7 +190,7 @@ public ModifyUmOrderResponse symbol(@jakarta.annotation.Nullable String symbol) } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -203,7 +209,7 @@ public ModifyUmOrderResponse status(@jakarta.annotation.Nullable String status) } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -222,7 +228,7 @@ public ModifyUmOrderResponse clientOrderId(@jakarta.annotation.Nullable String c } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -235,13 +241,32 @@ public void setClientOrderId(@jakarta.annotation.Nullable String clientOrderId) this.clientOrderId = clientOrderId; } + public ModifyUmOrderResponse modifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + return this; + } + + /** + * user-defined modification identifier, only returned if provided in the request + * + * @return modifyId + */ + @jakarta.annotation.Nullable + public Long getModifyId() { + return modifyId; + } + + public void setModifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + } + public ModifyUmOrderResponse price(@jakarta.annotation.Nullable String price) { this.price = price; return this; } /** - * Get price + * Price. * * @return price */ @@ -260,7 +285,7 @@ public ModifyUmOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPri } /** - * Get avgPrice + * Avg Price. * * @return avgPrice */ @@ -279,7 +304,7 @@ public ModifyUmOrderResponse origQty(@jakarta.annotation.Nullable String origQty } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -298,7 +323,7 @@ public ModifyUmOrderResponse executedQty(@jakarta.annotation.Nullable String exe } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -317,7 +342,7 @@ public ModifyUmOrderResponse cumQty(@jakarta.annotation.Nullable String cumQty) } /** - * Get cumQty + * Cum Qty. * * @return cumQty */ @@ -336,7 +361,7 @@ public ModifyUmOrderResponse cumQuote(@jakarta.annotation.Nullable String cumQuo } /** - * Get cumQuote + * Cum Quote. * * @return cumQuote */ @@ -355,7 +380,7 @@ public ModifyUmOrderResponse timeInForce(@jakarta.annotation.Nullable String tim } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -374,7 +399,7 @@ public ModifyUmOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -393,7 +418,7 @@ public ModifyUmOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean red } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -412,7 +437,7 @@ public ModifyUmOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Side. * * @return side */ @@ -431,7 +456,7 @@ public ModifyUmOrderResponse positionSide(@jakarta.annotation.Nullable String po } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -450,7 +475,7 @@ public ModifyUmOrderResponse origType(@jakarta.annotation.Nullable String origTy } /** - * Get origType + * Orig Type. * * @return origType */ @@ -470,7 +495,7 @@ public ModifyUmOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -490,7 +515,7 @@ public ModifyUmOrderResponse goodTillDate(@jakarta.annotation.Nullable Long good } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ @@ -509,7 +534,7 @@ public ModifyUmOrderResponse updateTime(@jakarta.annotation.Nullable Long update } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -528,7 +553,7 @@ public ModifyUmOrderResponse priceMatch(@jakarta.annotation.Nullable String pric } /** - * Get priceMatch + * Price Match. * * @return priceMatch */ @@ -554,6 +579,7 @@ public boolean equals(Object o) { && Objects.equals(this.symbol, modifyUmOrderResponse.symbol) && Objects.equals(this.status, modifyUmOrderResponse.status) && Objects.equals(this.clientOrderId, modifyUmOrderResponse.clientOrderId) + && Objects.equals(this.modifyId, modifyUmOrderResponse.modifyId) && Objects.equals(this.price, modifyUmOrderResponse.price) && Objects.equals(this.avgPrice, modifyUmOrderResponse.avgPrice) && Objects.equals(this.origQty, modifyUmOrderResponse.origQty) @@ -580,6 +606,7 @@ public int hashCode() { symbol, status, clientOrderId, + modifyId, price, avgPrice, origQty, @@ -606,6 +633,7 @@ public String toString() { sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); + sb.append(" modifyId: ").append(toIndentedString(modifyId)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); @@ -647,6 +675,10 @@ public String toUrlQueryString() { String clientOrderIdValueAsString = ""; clientOrderIdValueAsString = clientOrderIdValue.toString(); sb.append("clientOrderId=").append(urlEncode(clientOrderIdValueAsString)).append(""); + Object modifyIdValue = getModifyId(); + String modifyIdValueAsString = ""; + modifyIdValueAsString = modifyIdValue.toString(); + sb.append("modifyId=").append(urlEncode(modifyIdValueAsString)).append(""); Object priceValue = getPrice(); String priceValueAsString = ""; priceValueAsString = priceValue.toString(); @@ -745,6 +777,7 @@ private String toIndentedString(Object o) { openapiFields.add("symbol"); openapiFields.add("status"); openapiFields.add("clientOrderId"); + openapiFields.add("modifyId"); openapiFields.add("price"); openapiFields.add("avgPrice"); openapiFields.add("origQty"); diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewCmConditionalOrderRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewCmConditionalOrderRequest.java index 8a4f88f50..a9d2a1488 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewCmConditionalOrderRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewCmConditionalOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** NewCmConditionalOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewCmConditionalOrderRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -65,7 +65,7 @@ public class NewCmConditionalOrderRequest { @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) @jakarta.annotation.Nullable - private TimeInForce timeInForce; + private TimeInForce timeInForce = TimeInForce.GTC; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @@ -77,7 +77,7 @@ public class NewCmConditionalOrderRequest { @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) @jakarta.annotation.Nullable - private String reduceOnly; + private String reduceOnly = "false"; public static final String SERIALIZED_NAME_PRICE = "price"; @@ -89,13 +89,13 @@ public class NewCmConditionalOrderRequest { @SerializedName(SERIALIZED_NAME_WORKING_TYPE) @jakarta.annotation.Nullable - private WorkingType workingType; + private WorkingType workingType = WorkingType.CONTRACT_PRICE; public static final String SERIALIZED_NAME_PRICE_PROTECT = "priceProtect"; @SerializedName(SERIALIZED_NAME_PRICE_PROTECT) @jakarta.annotation.Nullable - private String priceProtect; + private PriceProtect priceProtect = PriceProtect.FALSE; public static final String SERIALIZED_NAME_NEW_CLIENT_STRATEGY_ID = "newClientStrategyId"; @@ -135,7 +135,7 @@ public NewCmConditionalOrderRequest symbol(@jakarta.annotation.Nonnull String sy } /** - * Get symbol + * Symbol * * @return symbol */ @@ -260,7 +260,8 @@ public NewCmConditionalOrderRequest reduceOnly(@jakarta.annotation.Nullable Stri } /** - * Get reduceOnly + * \"true\" or \"false\". default \"false\". Cannot be sent in + * Hedge Mode * * @return reduceOnly */ @@ -315,7 +316,7 @@ public void setWorkingType(@jakarta.annotation.Nullable WorkingType workingType) } public NewCmConditionalOrderRequest priceProtect( - @jakarta.annotation.Nullable String priceProtect) { + @jakarta.annotation.Nullable PriceProtect priceProtect) { this.priceProtect = priceProtect; return this; } @@ -326,11 +327,12 @@ public NewCmConditionalOrderRequest priceProtect( * @return priceProtect */ @jakarta.annotation.Nullable - public String getPriceProtect() { + @Valid + public PriceProtect getPriceProtect() { return priceProtect; } - public void setPriceProtect(@jakarta.annotation.Nullable String priceProtect) { + public void setPriceProtect(@jakarta.annotation.Nullable PriceProtect priceProtect) { this.priceProtect = priceProtect; } @@ -341,7 +343,8 @@ public NewCmConditionalOrderRequest newClientStrategyId( } /** - * Get newClientStrategyId + * A unique id among open orders. Automatically generated if not sent. Can only be string + * following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,36}$` * * @return newClientStrategyId */ @@ -360,7 +363,7 @@ public NewCmConditionalOrderRequest stopPrice(@jakarta.annotation.Nullable Doubl } /** - * Get stopPrice + * Used with `STOP/STOP_MARKET` or `TAKE_PROFIT/TAKE_PROFIT_MARKET` orders. * * @return stopPrice */ @@ -381,7 +384,7 @@ public NewCmConditionalOrderRequest activationPrice( } /** - * Get activationPrice + * Used with `TRAILING_STOP_MARKET` orders. * * @return activationPrice */ @@ -402,12 +405,14 @@ public NewCmConditionalOrderRequest callbackRate( } /** - * Get callbackRate + * Used with `TRAILING_STOP_MARKET` orders. minimum: 0.1 maximum: 5 * * @return callbackRate */ @jakarta.annotation.Nullable @Valid + @DecimalMin("0.1") + @DecimalMax("5") public Double getCallbackRate() { return callbackRate; } @@ -685,13 +690,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("workingType") != null && !jsonObj.get("workingType").isJsonNull()) { WorkingType.validateJsonElement(jsonObj.get("workingType")); } - if ((jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) - && !jsonObj.get("priceProtect").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `priceProtect` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("priceProtect").toString())); + // validate the optional field `priceProtect` + if (jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) { + PriceProtect.validateJsonElement(jsonObj.get("priceProtect")); } if ((jsonObj.get("newClientStrategyId") != null && !jsonObj.get("newClientStrategyId").isJsonNull()) diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewCmConditionalOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewCmConditionalOrderResponse.java index bd56c792f..3b822c3a9 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewCmConditionalOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewCmConditionalOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** NewCmConditionalOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewCmConditionalOrderResponse { public static final String SERIALIZED_NAME_NEW_CLIENT_STRATEGY_ID = "newClientStrategyId"; @@ -159,7 +159,7 @@ public NewCmConditionalOrderResponse newClientStrategyId( } /** - * Get newClientStrategyId + * New Client Strategy ID. * * @return newClientStrategyId */ @@ -178,7 +178,7 @@ public NewCmConditionalOrderResponse strategyId(@jakarta.annotation.Nullable Lon } /** - * Get strategyId + * Strategy ID. * * @return strategyId */ @@ -198,7 +198,7 @@ public NewCmConditionalOrderResponse strategyStatus( } /** - * Get strategyStatus + * Strategy Status. * * @return strategyStatus */ @@ -218,7 +218,7 @@ public NewCmConditionalOrderResponse strategyType( } /** - * Get strategyType + * Strategy Type. * * @return strategyType */ @@ -237,7 +237,7 @@ public NewCmConditionalOrderResponse origQty(@jakarta.annotation.Nullable String } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -256,7 +256,7 @@ public NewCmConditionalOrderResponse price(@jakarta.annotation.Nullable String p } /** - * Get price + * Price. * * @return price */ @@ -276,7 +276,7 @@ public NewCmConditionalOrderResponse reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -295,7 +295,7 @@ public NewCmConditionalOrderResponse side(@jakarta.annotation.Nullable String si } /** - * Get side + * Side. * * @return side */ @@ -315,7 +315,7 @@ public NewCmConditionalOrderResponse positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -334,7 +334,7 @@ public NewCmConditionalOrderResponse stopPrice(@jakarta.annotation.Nullable Stri } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -353,7 +353,7 @@ public NewCmConditionalOrderResponse symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -372,7 +372,7 @@ public NewCmConditionalOrderResponse pair(@jakarta.annotation.Nullable String pa } /** - * Get pair + * Pair. * * @return pair */ @@ -392,7 +392,7 @@ public NewCmConditionalOrderResponse timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -412,7 +412,7 @@ public NewCmConditionalOrderResponse activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -431,7 +431,7 @@ public NewCmConditionalOrderResponse priceRate(@jakarta.annotation.Nullable Stri } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -450,7 +450,7 @@ public NewCmConditionalOrderResponse bookTime(@jakarta.annotation.Nullable Long } /** - * Get bookTime + * order place time * * @return bookTime */ @@ -469,7 +469,7 @@ public NewCmConditionalOrderResponse updateTime(@jakarta.annotation.Nullable Lon } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -489,7 +489,7 @@ public NewCmConditionalOrderResponse workingType( } /** - * Get workingType + * Working Type. * * @return workingType */ @@ -509,7 +509,7 @@ public NewCmConditionalOrderResponse priceProtect( } /** - * Get priceProtect + * Price Protect. * * @return priceProtect */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewCmOrderRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewCmOrderRequest.java index ea78d51b0..7da669036 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewCmOrderRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewCmOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** NewCmOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewCmOrderRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -59,13 +59,13 @@ public class NewCmOrderRequest { @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private Type type; + private OrderType type; public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) @jakarta.annotation.Nullable - private TimeInForce timeInForce; + private TimeInForce timeInForce = TimeInForce.GTC; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @@ -77,7 +77,7 @@ public class NewCmOrderRequest { @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) @jakarta.annotation.Nullable - private String reduceOnly; + private ReduceOnly reduceOnly = ReduceOnly.FALSE; public static final String SERIALIZED_NAME_PRICE = "price"; @@ -101,7 +101,7 @@ public class NewCmOrderRequest { @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESP_TYPE) @jakarta.annotation.Nullable - private NewOrderRespType newOrderRespType; + private NewOrderRespType newOrderRespType = NewOrderRespType.ACK; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -117,7 +117,7 @@ public NewCmOrderRequest symbol(@jakarta.annotation.Nonnull String symbol) { } /** - * Get symbol + * Symbol * * @return symbol */ @@ -172,7 +172,7 @@ public void setPositionSide(@jakarta.annotation.Nullable PositionSide positionSi this.positionSide = positionSide; } - public NewCmOrderRequest type(@jakarta.annotation.Nonnull Type type) { + public NewCmOrderRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -185,11 +185,11 @@ public NewCmOrderRequest type(@jakarta.annotation.Nonnull Type type) { @jakarta.annotation.Nonnull @NotNull @Valid - public Type getType() { + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull Type type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } @@ -219,7 +219,7 @@ public NewCmOrderRequest quantity(@jakarta.annotation.Nullable Double quantity) } /** - * Get quantity + * Place amount * * @return quantity */ @@ -233,7 +233,7 @@ public void setQuantity(@jakarta.annotation.Nullable Double quantity) { this.quantity = quantity; } - public NewCmOrderRequest reduceOnly(@jakarta.annotation.Nullable String reduceOnly) { + public NewCmOrderRequest reduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { this.reduceOnly = reduceOnly; return this; } @@ -244,11 +244,12 @@ public NewCmOrderRequest reduceOnly(@jakarta.annotation.Nullable String reduceOn * @return reduceOnly */ @jakarta.annotation.Nullable - public String getReduceOnly() { + @Valid + public ReduceOnly getReduceOnly() { return reduceOnly; } - public void setReduceOnly(@jakarta.annotation.Nullable String reduceOnly) { + public void setReduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { this.reduceOnly = reduceOnly; } @@ -258,7 +259,7 @@ public NewCmOrderRequest price(@jakarta.annotation.Nullable Double price) { } /** - * Get price + * Order price * * @return price */ @@ -299,7 +300,8 @@ public NewCmOrderRequest newClientOrderId( } /** - * Get newClientOrderId + * A unique id among open orders. Automatically generated if not sent. Can only be string + * following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,32}$` * * @return newClientOrderId */ @@ -554,18 +556,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti PositionSide.validateJsonElement(jsonObj.get("positionSide")); } // validate the required field `type` - Type.validateJsonElement(jsonObj.get("type")); + OrderType.validateJsonElement(jsonObj.get("type")); // validate the optional field `timeInForce` if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { TimeInForce.validateJsonElement(jsonObj.get("timeInForce")); } - if ((jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) - && !jsonObj.get("reduceOnly").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reduceOnly` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reduceOnly").toString())); + // validate the optional field `reduceOnly` + if (jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) { + ReduceOnly.validateJsonElement(jsonObj.get("reduceOnly")); } // validate the optional field `priceMatch` if (jsonObj.get("priceMatch") != null && !jsonObj.get("priceMatch").isJsonNull()) { diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewCmOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewCmOrderResponse.java index 8ef460ecb..a6fca730c 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewCmOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewCmOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** NewCmOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewCmOrderResponse { public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -48,12 +48,6 @@ public class NewCmOrderResponse { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_BASE = "cumBase"; - - @SerializedName(SERIALIZED_NAME_CUM_BASE) - @jakarta.annotation.Nullable - private String cumBase; - public static final String SERIALIZED_NAME_EXECUTED_QTY = "executedQty"; @SerializedName(SERIALIZED_NAME_EXECUTED_QTY) @@ -66,12 +60,6 @@ public class NewCmOrderResponse { @jakarta.annotation.Nullable private Long orderId; - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE) - @jakarta.annotation.Nullable - private String avgPrice; - public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; @SerializedName(SERIALIZED_NAME_ORIG_QTY) @@ -146,7 +134,7 @@ public NewCmOrderResponse clientOrderId(@jakarta.annotation.Nullable String clie } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -165,7 +153,7 @@ public NewCmOrderResponse cumQty(@jakarta.annotation.Nullable String cumQty) { } /** - * Get cumQty + * Cum Qty. * * @return cumQty */ @@ -178,32 +166,13 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public NewCmOrderResponse cumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - return this; - } - - /** - * Get cumBase - * - * @return cumBase - */ - @jakarta.annotation.Nullable - public String getCumBase() { - return cumBase; - } - - public void setCumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - } - public NewCmOrderResponse executedQty(@jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; return this; } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -222,7 +191,7 @@ public NewCmOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -235,32 +204,13 @@ public void setOrderId(@jakarta.annotation.Nullable Long orderId) { this.orderId = orderId; } - public NewCmOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - return this; - } - - /** - * Get avgPrice - * - * @return avgPrice - */ - @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; - } - - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - } - public NewCmOrderResponse origQty(@jakarta.annotation.Nullable String origQty) { this.origQty = origQty; return this; } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -279,7 +229,7 @@ public NewCmOrderResponse price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Price. * * @return price */ @@ -298,7 +248,7 @@ public NewCmOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean reduce } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -317,7 +267,7 @@ public NewCmOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Side. * * @return side */ @@ -336,7 +286,7 @@ public NewCmOrderResponse positionSide(@jakarta.annotation.Nullable String posit } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -355,7 +305,7 @@ public NewCmOrderResponse status(@jakarta.annotation.Nullable String status) { } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -374,7 +324,7 @@ public NewCmOrderResponse symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -393,7 +343,7 @@ public NewCmOrderResponse pair(@jakarta.annotation.Nullable String pair) { } /** - * Get pair + * Pair. * * @return pair */ @@ -412,7 +362,7 @@ public NewCmOrderResponse timeInForce(@jakarta.annotation.Nullable String timeIn } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -431,7 +381,7 @@ public NewCmOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -450,7 +400,7 @@ public NewCmOrderResponse updateTime(@jakarta.annotation.Nullable Long updateTim } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -474,10 +424,8 @@ public boolean equals(Object o) { NewCmOrderResponse newCmOrderResponse = (NewCmOrderResponse) o; return Objects.equals(this.clientOrderId, newCmOrderResponse.clientOrderId) && Objects.equals(this.cumQty, newCmOrderResponse.cumQty) - && Objects.equals(this.cumBase, newCmOrderResponse.cumBase) && Objects.equals(this.executedQty, newCmOrderResponse.executedQty) && Objects.equals(this.orderId, newCmOrderResponse.orderId) - && Objects.equals(this.avgPrice, newCmOrderResponse.avgPrice) && Objects.equals(this.origQty, newCmOrderResponse.origQty) && Objects.equals(this.price, newCmOrderResponse.price) && Objects.equals(this.reduceOnly, newCmOrderResponse.reduceOnly) @@ -496,10 +444,8 @@ public int hashCode() { return Objects.hash( clientOrderId, cumQty, - cumBase, executedQty, orderId, - avgPrice, origQty, price, reduceOnly, @@ -519,10 +465,8 @@ public String toString() { sb.append("class NewCmOrderResponse {\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumBase: ").append(toIndentedString(cumBase)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); @@ -549,10 +493,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = ""; cumQtyValueAsString = cumQtyValue.toString(); sb.append("cumQty=").append(urlEncode(cumQtyValueAsString)).append(""); - Object cumBaseValue = getCumBase(); - String cumBaseValueAsString = ""; - cumBaseValueAsString = cumBaseValue.toString(); - sb.append("cumBase=").append(urlEncode(cumBaseValueAsString)).append(""); Object executedQtyValue = getExecutedQty(); String executedQtyValueAsString = ""; executedQtyValueAsString = executedQtyValue.toString(); @@ -561,10 +501,6 @@ public String toUrlQueryString() { String orderIdValueAsString = ""; orderIdValueAsString = orderIdValue.toString(); sb.append("orderId=").append(urlEncode(orderIdValueAsString)).append(""); - Object avgPriceValue = getAvgPrice(); - String avgPriceValueAsString = ""; - avgPriceValueAsString = avgPriceValue.toString(); - sb.append("avgPrice=").append(urlEncode(avgPriceValueAsString)).append(""); Object origQtyValue = getOrigQty(); String origQtyValueAsString = ""; origQtyValueAsString = origQtyValue.toString(); @@ -639,10 +575,8 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("clientOrderId"); openapiFields.add("cumQty"); - openapiFields.add("cumBase"); openapiFields.add("executedQty"); openapiFields.add("orderId"); - openapiFields.add("avgPrice"); openapiFields.add("origQty"); openapiFields.add("price"); openapiFields.add("reduceOnly"); @@ -693,14 +627,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumBase") != null && !jsonObj.get("cumBase").isJsonNull()) - && !jsonObj.get("cumBase").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumBase` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("cumBase").toString())); - } if ((jsonObj.get("executedQty") != null && !jsonObj.get("executedQty").isJsonNull()) && !jsonObj.get("executedQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -709,14 +635,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("executedQty").toString())); } - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) && !jsonObj.get("origQty").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewMarginOrderRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewMarginOrderRequest.java index dbf7142b0..1d4da9303 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewMarginOrderRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewMarginOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** NewMarginOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewMarginOrderRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -53,7 +53,7 @@ public class NewMarginOrderRequest { @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private Type type; + private OrderType type; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @@ -89,7 +89,7 @@ public class NewMarginOrderRequest { @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESP_TYPE) @jakarta.annotation.Nullable - private NewOrderRespType newOrderRespType; + private NewOrderRespType newOrderRespType = NewOrderRespType.ACK; public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; @@ -101,26 +101,26 @@ public class NewMarginOrderRequest { @SerializedName(SERIALIZED_NAME_SIDE_EFFECT_TYPE) @jakarta.annotation.Nullable - private SideEffectType sideEffectType; + private SideEffectType sideEffectType = SideEffectType.NO_SIDE_EFFECT; public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) @jakarta.annotation.Nullable - private TimeInForce timeInForce; + private TimeInForce timeInForce = TimeInForce.GTC; public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = "selfTradePreventionMode"; @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) @jakarta.annotation.Nullable - private SelfTradePreventionMode selfTradePreventionMode; + private SelfTradePreventionMode selfTradePreventionMode = SelfTradePreventionMode.NONE; public static final String SERIALIZED_NAME_AUTO_REPAY_AT_CANCEL = "autoRepayAtCancel"; @SerializedName(SERIALIZED_NAME_AUTO_REPAY_AT_CANCEL) @jakarta.annotation.Nullable - private Boolean autoRepayAtCancel; + private Boolean autoRepayAtCancel = true; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -171,7 +171,7 @@ public void setSide(@jakarta.annotation.Nonnull Side side) { this.side = side; } - public NewMarginOrderRequest type(@jakarta.annotation.Nonnull Type type) { + public NewMarginOrderRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -184,11 +184,11 @@ public NewMarginOrderRequest type(@jakarta.annotation.Nonnull Type type) { @jakarta.annotation.Nonnull @NotNull @Valid - public Type getType() { + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull Type type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } @@ -258,7 +258,8 @@ public NewMarginOrderRequest stopPrice(@jakarta.annotation.Nullable Double stopP } /** - * Get stopPrice + * Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and + * `TAKE_PROFIT_LIMIT` orders. * * @return stopPrice */ @@ -279,7 +280,7 @@ public NewMarginOrderRequest newClientOrderId( } /** - * Get newClientOrderId + * A unique id among open orders. Automatically generated if not sent. * * @return newClientOrderId */ @@ -320,7 +321,8 @@ public NewMarginOrderRequest icebergQty(@jakarta.annotation.Nullable Double iceb } /** - * Get icebergQty + * Used with `LIMIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` + * to create an iceberg order * * @return icebergQty */ @@ -404,7 +406,8 @@ public NewMarginOrderRequest autoRepayAtCancel( } /** - * Get autoRepayAtCancel + * Only when MARGIN_BUY or AUTO_BORROW_REPAY order takes effect, true means that the debt + * generated by the order needs to be repaid after the order is cancelled. * * @return autoRepayAtCancel */ @@ -423,7 +426,7 @@ public NewMarginOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvWi } /** - * Get recvWindow + * The value cannot be greater than `60000` * * @return recvWindow */ @@ -664,7 +667,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the required field `side` Side.validateJsonElement(jsonObj.get("side")); // validate the required field `type` - Type.validateJsonElement(jsonObj.get("type")); + OrderType.validateJsonElement(jsonObj.get("type")); if ((jsonObj.get("newClientOrderId") != null && !jsonObj.get("newClientOrderId").isJsonNull()) && !jsonObj.get("newClientOrderId").isJsonPrimitive()) { diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewMarginOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewMarginOrderResponse.java index 836ca37a0..d569191ea 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewMarginOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewMarginOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** NewMarginOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewMarginOrderResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -140,7 +140,7 @@ public NewMarginOrderResponse symbol(@jakarta.annotation.Nullable String symbol) } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -159,7 +159,7 @@ public NewMarginOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -178,7 +178,7 @@ public NewMarginOrderResponse clientOrderId(@jakarta.annotation.Nullable String } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -197,7 +197,7 @@ public NewMarginOrderResponse transactTime(@jakarta.annotation.Nullable Long tra } /** - * Get transactTime + * Transact Time. * * @return transactTime */ @@ -216,7 +216,7 @@ public NewMarginOrderResponse price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Price. * * @return price */ @@ -235,7 +235,7 @@ public NewMarginOrderResponse origQty(@jakarta.annotation.Nullable String origQt } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -254,7 +254,7 @@ public NewMarginOrderResponse executedQty(@jakarta.annotation.Nullable String ex } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -274,7 +274,7 @@ public NewMarginOrderResponse cummulativeQuoteQty( } /** - * Get cummulativeQuoteQty + * Cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -293,7 +293,7 @@ public NewMarginOrderResponse status(@jakarta.annotation.Nullable String status) } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -312,7 +312,7 @@ public NewMarginOrderResponse timeInForce(@jakarta.annotation.Nullable String ti } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -331,7 +331,7 @@ public NewMarginOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -350,7 +350,7 @@ public NewMarginOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Side. * * @return side */ @@ -370,7 +370,7 @@ public NewMarginOrderResponse marginBuyBorrowAmount( } /** - * Get marginBuyBorrowAmount + * will not return if no margin trade happens * * @return marginBuyBorrowAmount */ @@ -391,7 +391,7 @@ public NewMarginOrderResponse marginBuyBorrowAsset( } /** - * Get marginBuyBorrowAsset + * will not return if no margin trade happens * * @return marginBuyBorrowAsset */ @@ -419,7 +419,7 @@ public NewMarginOrderResponse addFillsItem(NewMarginOrderResponseFillsInner fill } /** - * Get fills + * Fills. * * @return fills */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewMarginOrderResponseFillsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewMarginOrderResponseFillsInner.java index ccca8e34f..b1d243d23 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewMarginOrderResponseFillsInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewMarginOrderResponseFillsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** NewMarginOrderResponseFillsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewMarginOrderResponseFillsInner { public static final String SERIALIZED_NAME_PRICE = "price"; @@ -68,7 +68,7 @@ public NewMarginOrderResponseFillsInner price(@jakarta.annotation.Nullable Strin } /** - * Get price + * Price. * * @return price */ @@ -87,7 +87,7 @@ public NewMarginOrderResponseFillsInner qty(@jakarta.annotation.Nullable String } /** - * Get qty + * Qty. * * @return qty */ @@ -107,7 +107,7 @@ public NewMarginOrderResponseFillsInner commission( } /** - * Get commission + * Commission. * * @return commission */ @@ -127,7 +127,7 @@ public NewMarginOrderResponseFillsInner commissionAsset( } /** - * Get commissionAsset + * Commission Asset. * * @return commissionAsset */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewOrderRespType.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewOrderRespType.java index 242ce49b4..263531e44 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewOrderRespType.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewOrderRespType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmAlgoOrderRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmAlgoOrderRequest.java index 787704a4f..bc0d276ca 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmAlgoOrderRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmAlgoOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,13 +35,13 @@ /** NewUmAlgoOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewUmAlgoOrderRequest { public static final String SERIALIZED_NAME_ALGO_TYPE = "algoType"; @SerializedName(SERIALIZED_NAME_ALGO_TYPE) @jakarta.annotation.Nonnull - private String algoType; + private AlgoType algoType; public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -65,18 +65,18 @@ public class NewUmAlgoOrderRequest { @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private Type type; + private OrderType type; public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) @jakarta.annotation.Nullable - private TimeInForce timeInForce; + private TimeInForce timeInForce = TimeInForce.GTC; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @SerializedName(SERIALIZED_NAME_QUANTITY) - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull private Double quantity; public static final String SERIALIZED_NAME_PRICE = "price"; @@ -95,7 +95,7 @@ public class NewUmAlgoOrderRequest { @SerializedName(SERIALIZED_NAME_WORKING_TYPE) @jakarta.annotation.Nullable - private WorkingType workingType; + private WorkingType workingType = WorkingType.CONTRACT_PRICE; public static final String SERIALIZED_NAME_PRICE_MATCH = "priceMatch"; @@ -103,23 +103,17 @@ public class NewUmAlgoOrderRequest { @jakarta.annotation.Nullable private PriceMatch priceMatch; - public static final String SERIALIZED_NAME_CLOSE_POSITION = "closePosition"; - - @SerializedName(SERIALIZED_NAME_CLOSE_POSITION) - @jakarta.annotation.Nullable - private String closePosition; - public static final String SERIALIZED_NAME_PRICE_PROTECT = "priceProtect"; @SerializedName(SERIALIZED_NAME_PRICE_PROTECT) @jakarta.annotation.Nullable - private String priceProtect; + private PriceProtect priceProtect = PriceProtect.FALSE; public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) @jakarta.annotation.Nullable - private String reduceOnly; + private ReduceOnly reduceOnly = ReduceOnly.FALSE; public static final String SERIALIZED_NAME_ACTIVATE_PRICE = "activatePrice"; @@ -143,14 +137,14 @@ public class NewUmAlgoOrderRequest { @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESP_TYPE) @jakarta.annotation.Nullable - private NewOrderRespType newOrderRespType; + private NewOrderRespType newOrderRespType = NewOrderRespType.ACK; public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = "selfTradePreventionMode"; @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) @jakarta.annotation.Nullable - private SelfTradePreventionMode selfTradePreventionMode; + private SelfTradePreventionMode selfTradePreventionMode = SelfTradePreventionMode.NONE; public static final String SERIALIZED_NAME_GOOD_TILL_DATE = "goodTillDate"; @@ -166,7 +160,7 @@ public class NewUmAlgoOrderRequest { public NewUmAlgoOrderRequest() {} - public NewUmAlgoOrderRequest algoType(@jakarta.annotation.Nonnull String algoType) { + public NewUmAlgoOrderRequest algoType(@jakarta.annotation.Nonnull AlgoType algoType) { this.algoType = algoType; return this; } @@ -178,11 +172,12 @@ public NewUmAlgoOrderRequest algoType(@jakarta.annotation.Nonnull String algoTyp */ @jakarta.annotation.Nonnull @NotNull - public String getAlgoType() { + @Valid + public AlgoType getAlgoType() { return algoType; } - public void setAlgoType(@jakarta.annotation.Nonnull String algoType) { + public void setAlgoType(@jakarta.annotation.Nonnull AlgoType algoType) { this.algoType = algoType; } @@ -248,7 +243,7 @@ public void setPositionSide(@jakarta.annotation.Nullable PositionSide positionSi this.positionSide = positionSide; } - public NewUmAlgoOrderRequest type(@jakarta.annotation.Nonnull Type type) { + public NewUmAlgoOrderRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -261,11 +256,11 @@ public NewUmAlgoOrderRequest type(@jakarta.annotation.Nonnull Type type) { @jakarta.annotation.Nonnull @NotNull @Valid - public Type getType() { + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull Type type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } @@ -289,23 +284,24 @@ public void setTimeInForce(@jakarta.annotation.Nullable TimeInForce timeInForce) this.timeInForce = timeInForce; } - public NewUmAlgoOrderRequest quantity(@jakarta.annotation.Nullable Double quantity) { + public NewUmAlgoOrderRequest quantity(@jakarta.annotation.Nonnull Double quantity) { this.quantity = quantity; return this; } /** - * Get quantity + * Order quantity * * @return quantity */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull + @NotNull @Valid public Double getQuantity() { return quantity; } - public void setQuantity(@jakarta.annotation.Nullable Double quantity) { + public void setQuantity(@jakarta.annotation.Nonnull Double quantity) { this.quantity = quantity; } @@ -315,7 +311,7 @@ public NewUmAlgoOrderRequest price(@jakarta.annotation.Nullable Double price) { } /** - * Get price + * Order price * * @return price */ @@ -335,7 +331,7 @@ public NewUmAlgoOrderRequest triggerPrice(@jakarta.annotation.Nullable Double tr } /** - * Get triggerPrice + * Trigger price * * @return triggerPrice */ @@ -389,26 +385,8 @@ public void setPriceMatch(@jakarta.annotation.Nullable PriceMatch priceMatch) { this.priceMatch = priceMatch; } - public NewUmAlgoOrderRequest closePosition(@jakarta.annotation.Nullable String closePosition) { - this.closePosition = closePosition; - return this; - } - - /** - * Get closePosition - * - * @return closePosition - */ - @jakarta.annotation.Nullable - public String getClosePosition() { - return closePosition; - } - - public void setClosePosition(@jakarta.annotation.Nullable String closePosition) { - this.closePosition = closePosition; - } - - public NewUmAlgoOrderRequest priceProtect(@jakarta.annotation.Nullable String priceProtect) { + public NewUmAlgoOrderRequest priceProtect( + @jakarta.annotation.Nullable PriceProtect priceProtect) { this.priceProtect = priceProtect; return this; } @@ -419,15 +397,16 @@ public NewUmAlgoOrderRequest priceProtect(@jakarta.annotation.Nullable String pr * @return priceProtect */ @jakarta.annotation.Nullable - public String getPriceProtect() { + @Valid + public PriceProtect getPriceProtect() { return priceProtect; } - public void setPriceProtect(@jakarta.annotation.Nullable String priceProtect) { + public void setPriceProtect(@jakarta.annotation.Nullable PriceProtect priceProtect) { this.priceProtect = priceProtect; } - public NewUmAlgoOrderRequest reduceOnly(@jakarta.annotation.Nullable String reduceOnly) { + public NewUmAlgoOrderRequest reduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { this.reduceOnly = reduceOnly; return this; } @@ -438,11 +417,12 @@ public NewUmAlgoOrderRequest reduceOnly(@jakarta.annotation.Nullable String redu * @return reduceOnly */ @jakarta.annotation.Nullable - public String getReduceOnly() { + @Valid + public ReduceOnly getReduceOnly() { return reduceOnly; } - public void setReduceOnly(@jakarta.annotation.Nullable String reduceOnly) { + public void setReduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { this.reduceOnly = reduceOnly; } @@ -452,7 +432,7 @@ public NewUmAlgoOrderRequest activatePrice(@jakarta.annotation.Nullable Double a } /** - * Get activatePrice + * Used with `TRAILING_STOP_MARKET`, default as latest price * * @return activatePrice */ @@ -472,7 +452,7 @@ public NewUmAlgoOrderRequest callbackRate(@jakarta.annotation.Nullable Double ca } /** - * Get callbackRate + * Used with `TRAILING_STOP_MARKET`, min 0.1, max 10 (1 = 1%) * * @return callbackRate */ @@ -492,7 +472,7 @@ public NewUmAlgoOrderRequest clientAlgoId(@jakarta.annotation.Nullable String cl } /** - * Get clientAlgoId + * Unique id among open orders. Auto-generated if not sent * * @return clientAlgoId */ @@ -555,7 +535,8 @@ public NewUmAlgoOrderRequest goodTillDate(@jakarta.annotation.Nullable Long good } /** - * Get goodTillDate + * Order cancel time for `GTD` timeInForce, mandatory when timeInForce is + * `GTD` * * @return goodTillDate */ @@ -574,11 +555,12 @@ public NewUmAlgoOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvWi } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -607,7 +589,6 @@ public boolean equals(Object o) { && Objects.equals(this.triggerPrice, newUmAlgoOrderRequest.triggerPrice) && Objects.equals(this.workingType, newUmAlgoOrderRequest.workingType) && Objects.equals(this.priceMatch, newUmAlgoOrderRequest.priceMatch) - && Objects.equals(this.closePosition, newUmAlgoOrderRequest.closePosition) && Objects.equals(this.priceProtect, newUmAlgoOrderRequest.priceProtect) && Objects.equals(this.reduceOnly, newUmAlgoOrderRequest.reduceOnly) && Objects.equals(this.activatePrice, newUmAlgoOrderRequest.activatePrice) @@ -634,7 +615,6 @@ public int hashCode() { triggerPrice, workingType, priceMatch, - closePosition, priceProtect, reduceOnly, activatePrice, @@ -661,7 +641,6 @@ public String toString() { sb.append(" triggerPrice: ").append(toIndentedString(triggerPrice)).append("\n"); sb.append(" workingType: ").append(toIndentedString(workingType)).append("\n"); sb.append(" priceMatch: ").append(toIndentedString(priceMatch)).append("\n"); - sb.append(" closePosition: ").append(toIndentedString(closePosition)).append("\n"); sb.append(" priceProtect: ").append(toIndentedString(priceProtect)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); sb.append(" activatePrice: ").append(toIndentedString(activatePrice)).append("\n"); @@ -724,10 +703,6 @@ public String toUrlQueryString() { String priceMatchValueAsString = ""; priceMatchValueAsString = priceMatchValue.toString(); sb.append("priceMatch=").append(urlEncode(priceMatchValueAsString)).append(""); - Object closePositionValue = getClosePosition(); - String closePositionValueAsString = ""; - closePositionValueAsString = closePositionValue.toString(); - sb.append("closePosition=").append(urlEncode(closePositionValueAsString)).append(""); Object priceProtectValue = getPriceProtect(); String priceProtectValueAsString = ""; priceProtectValueAsString = priceProtectValue.toString(); @@ -805,7 +780,6 @@ private String toIndentedString(Object o) { openapiFields.add("triggerPrice"); openapiFields.add("workingType"); openapiFields.add("priceMatch"); - openapiFields.add("closePosition"); openapiFields.add("priceProtect"); openapiFields.add("reduceOnly"); openapiFields.add("activatePrice"); @@ -822,6 +796,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("symbol"); openapiRequiredFields.add("side"); openapiRequiredFields.add("type"); + openapiRequiredFields.add("quantity"); } /** @@ -852,13 +827,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("algoType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `algoType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("algoType").toString())); - } + // validate the required field `algoType` + AlgoType.validateJsonElement(jsonObj.get("algoType")); if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( @@ -873,7 +843,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti PositionSide.validateJsonElement(jsonObj.get("positionSide")); } // validate the required field `type` - Type.validateJsonElement(jsonObj.get("type")); + OrderType.validateJsonElement(jsonObj.get("type")); // validate the optional field `timeInForce` if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { TimeInForce.validateJsonElement(jsonObj.get("timeInForce")); @@ -886,29 +856,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("priceMatch") != null && !jsonObj.get("priceMatch").isJsonNull()) { PriceMatch.validateJsonElement(jsonObj.get("priceMatch")); } - if ((jsonObj.get("closePosition") != null && !jsonObj.get("closePosition").isJsonNull()) - && !jsonObj.get("closePosition").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `closePosition` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("closePosition").toString())); - } - if ((jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) - && !jsonObj.get("priceProtect").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `priceProtect` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("priceProtect").toString())); + // validate the optional field `priceProtect` + if (jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) { + PriceProtect.validateJsonElement(jsonObj.get("priceProtect")); } - if ((jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) - && !jsonObj.get("reduceOnly").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reduceOnly` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reduceOnly").toString())); + // validate the optional field `reduceOnly` + if (jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) { + ReduceOnly.validateJsonElement(jsonObj.get("reduceOnly")); } if ((jsonObj.get("clientAlgoId") != null && !jsonObj.get("clientAlgoId").isJsonNull()) && !jsonObj.get("clientAlgoId").isJsonPrimitive()) { diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmAlgoOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmAlgoOrderResponse.java index 66a06aa97..29b83fad1 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmAlgoOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmAlgoOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** NewUmAlgoOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewUmAlgoOrderResponse { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; @@ -108,12 +108,6 @@ public class NewUmAlgoOrderResponse { @jakarta.annotation.Nullable private String price; - public static final String SERIALIZED_NAME_ICEBERG_QUANTITY = "icebergQuantity"; - - @SerializedName(SERIALIZED_NAME_ICEBERG_QUANTITY) - @jakarta.annotation.Nullable - private String icebergQuantity; - public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = "selfTradePreventionMode"; @@ -133,12 +127,6 @@ public class NewUmAlgoOrderResponse { @jakarta.annotation.Nullable private String priceMatch; - public static final String SERIALIZED_NAME_CLOSE_POSITION = "closePosition"; - - @SerializedName(SERIALIZED_NAME_CLOSE_POSITION) - @jakarta.annotation.Nullable - private Boolean closePosition; - public static final String SERIALIZED_NAME_PRICE_PROTECT = "priceProtect"; @SerializedName(SERIALIZED_NAME_PRICE_PROTECT) @@ -417,26 +405,6 @@ public void setPrice(@jakarta.annotation.Nullable String price) { this.price = price; } - public NewUmAlgoOrderResponse icebergQuantity( - @jakarta.annotation.Nullable String icebergQuantity) { - this.icebergQuantity = icebergQuantity; - return this; - } - - /** - * Get icebergQuantity - * - * @return icebergQuantity - */ - @jakarta.annotation.Nullable - public String getIcebergQuantity() { - return icebergQuantity; - } - - public void setIcebergQuantity(@jakarta.annotation.Nullable String icebergQuantity) { - this.icebergQuantity = icebergQuantity; - } - public NewUmAlgoOrderResponse selfTradePreventionMode( @jakarta.annotation.Nullable String selfTradePreventionMode) { this.selfTradePreventionMode = selfTradePreventionMode; @@ -496,26 +464,6 @@ public void setPriceMatch(@jakarta.annotation.Nullable String priceMatch) { this.priceMatch = priceMatch; } - public NewUmAlgoOrderResponse closePosition( - @jakarta.annotation.Nullable Boolean closePosition) { - this.closePosition = closePosition; - return this; - } - - /** - * Get closePosition - * - * @return closePosition - */ - @jakarta.annotation.Nullable - public Boolean getClosePosition() { - return closePosition; - } - - public void setClosePosition(@jakarta.annotation.Nullable Boolean closePosition) { - this.closePosition = closePosition; - } - public NewUmAlgoOrderResponse priceProtect(@jakarta.annotation.Nullable Boolean priceProtect) { this.priceProtect = priceProtect; return this; @@ -689,13 +637,11 @@ public boolean equals(Object o) { && Objects.equals(this.algoStatus, newUmAlgoOrderResponse.algoStatus) && Objects.equals(this.triggerPrice, newUmAlgoOrderResponse.triggerPrice) && Objects.equals(this.price, newUmAlgoOrderResponse.price) - && Objects.equals(this.icebergQuantity, newUmAlgoOrderResponse.icebergQuantity) && Objects.equals( this.selfTradePreventionMode, newUmAlgoOrderResponse.selfTradePreventionMode) && Objects.equals(this.workingType, newUmAlgoOrderResponse.workingType) && Objects.equals(this.priceMatch, newUmAlgoOrderResponse.priceMatch) - && Objects.equals(this.closePosition, newUmAlgoOrderResponse.closePosition) && Objects.equals(this.priceProtect, newUmAlgoOrderResponse.priceProtect) && Objects.equals(this.reduceOnly, newUmAlgoOrderResponse.reduceOnly) && Objects.equals(this.activatePrice, newUmAlgoOrderResponse.activatePrice) @@ -721,11 +667,9 @@ public int hashCode() { algoStatus, triggerPrice, price, - icebergQuantity, selfTradePreventionMode, workingType, priceMatch, - closePosition, priceProtect, reduceOnly, activatePrice, @@ -752,13 +696,11 @@ public String toString() { sb.append(" algoStatus: ").append(toIndentedString(algoStatus)).append("\n"); sb.append(" triggerPrice: ").append(toIndentedString(triggerPrice)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" icebergQuantity: ").append(toIndentedString(icebergQuantity)).append("\n"); sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); sb.append(" workingType: ").append(toIndentedString(workingType)).append("\n"); sb.append(" priceMatch: ").append(toIndentedString(priceMatch)).append("\n"); - sb.append(" closePosition: ").append(toIndentedString(closePosition)).append("\n"); sb.append(" priceProtect: ").append(toIndentedString(priceProtect)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); sb.append(" activatePrice: ").append(toIndentedString(activatePrice)).append("\n"); @@ -822,10 +764,6 @@ public String toUrlQueryString() { String priceValueAsString = ""; priceValueAsString = priceValue.toString(); sb.append("price=").append(urlEncode(priceValueAsString)).append(""); - Object icebergQuantityValue = getIcebergQuantity(); - String icebergQuantityValueAsString = ""; - icebergQuantityValueAsString = icebergQuantityValue.toString(); - sb.append("icebergQuantity=").append(urlEncode(icebergQuantityValueAsString)).append(""); Object selfTradePreventionModeValue = getSelfTradePreventionMode(); String selfTradePreventionModeValueAsString = ""; selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); @@ -840,10 +778,6 @@ public String toUrlQueryString() { String priceMatchValueAsString = ""; priceMatchValueAsString = priceMatchValue.toString(); sb.append("priceMatch=").append(urlEncode(priceMatchValueAsString)).append(""); - Object closePositionValue = getClosePosition(); - String closePositionValueAsString = ""; - closePositionValueAsString = closePositionValue.toString(); - sb.append("closePosition=").append(urlEncode(closePositionValueAsString)).append(""); Object priceProtectValue = getPriceProtect(); String priceProtectValueAsString = ""; priceProtectValueAsString = priceProtectValue.toString(); @@ -916,11 +850,9 @@ private String toIndentedString(Object o) { openapiFields.add("algoStatus"); openapiFields.add("triggerPrice"); openapiFields.add("price"); - openapiFields.add("icebergQuantity"); openapiFields.add("selfTradePreventionMode"); openapiFields.add("workingType"); openapiFields.add("priceMatch"); - openapiFields.add("closePosition"); openapiFields.add("priceProtect"); openapiFields.add("reduceOnly"); openapiFields.add("activatePrice"); @@ -1040,14 +972,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("price").toString())); } - if ((jsonObj.get("icebergQuantity") != null && !jsonObj.get("icebergQuantity").isJsonNull()) - && !jsonObj.get("icebergQuantity").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `icebergQuantity` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("icebergQuantity").toString())); - } if ((jsonObj.get("selfTradePreventionMode") != null && !jsonObj.get("selfTradePreventionMode").isJsonNull()) && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmConditionalOrderRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmConditionalOrderRequest.java index 66e350004..c3ff8b94d 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmConditionalOrderRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmConditionalOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** NewUmConditionalOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewUmConditionalOrderRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -65,7 +65,7 @@ public class NewUmConditionalOrderRequest { @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) @jakarta.annotation.Nullable - private TimeInForce timeInForce; + private TimeInForce timeInForce = TimeInForce.GTC; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @@ -77,7 +77,7 @@ public class NewUmConditionalOrderRequest { @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) @jakarta.annotation.Nullable - private String reduceOnly; + private ReduceOnly reduceOnly = ReduceOnly.FALSE; public static final String SERIALIZED_NAME_PRICE = "price"; @@ -89,13 +89,13 @@ public class NewUmConditionalOrderRequest { @SerializedName(SERIALIZED_NAME_WORKING_TYPE) @jakarta.annotation.Nullable - private WorkingType workingType; + private WorkingType workingType = WorkingType.CONTRACT_PRICE; public static final String SERIALIZED_NAME_PRICE_PROTECT = "priceProtect"; @SerializedName(SERIALIZED_NAME_PRICE_PROTECT) @jakarta.annotation.Nullable - private String priceProtect; + private PriceProtect priceProtect = PriceProtect.FALSE; public static final String SERIALIZED_NAME_NEW_CLIENT_STRATEGY_ID = "newClientStrategyId"; @@ -132,7 +132,7 @@ public class NewUmConditionalOrderRequest { @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) @jakarta.annotation.Nullable - private SelfTradePreventionMode selfTradePreventionMode; + private SelfTradePreventionMode selfTradePreventionMode = SelfTradePreventionMode.NONE; public static final String SERIALIZED_NAME_GOOD_TILL_DATE = "goodTillDate"; @@ -154,7 +154,7 @@ public NewUmConditionalOrderRequest symbol(@jakarta.annotation.Nonnull String sy } /** - * Get symbol + * Symbol * * @return symbol */ @@ -273,7 +273,8 @@ public void setQuantity(@jakarta.annotation.Nullable Double quantity) { this.quantity = quantity; } - public NewUmConditionalOrderRequest reduceOnly(@jakarta.annotation.Nullable String reduceOnly) { + public NewUmConditionalOrderRequest reduceOnly( + @jakarta.annotation.Nullable ReduceOnly reduceOnly) { this.reduceOnly = reduceOnly; return this; } @@ -284,11 +285,12 @@ public NewUmConditionalOrderRequest reduceOnly(@jakarta.annotation.Nullable Stri * @return reduceOnly */ @jakarta.annotation.Nullable - public String getReduceOnly() { + @Valid + public ReduceOnly getReduceOnly() { return reduceOnly; } - public void setReduceOnly(@jakarta.annotation.Nullable String reduceOnly) { + public void setReduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { this.reduceOnly = reduceOnly; } @@ -334,7 +336,7 @@ public void setWorkingType(@jakarta.annotation.Nullable WorkingType workingType) } public NewUmConditionalOrderRequest priceProtect( - @jakarta.annotation.Nullable String priceProtect) { + @jakarta.annotation.Nullable PriceProtect priceProtect) { this.priceProtect = priceProtect; return this; } @@ -345,11 +347,12 @@ public NewUmConditionalOrderRequest priceProtect( * @return priceProtect */ @jakarta.annotation.Nullable - public String getPriceProtect() { + @Valid + public PriceProtect getPriceProtect() { return priceProtect; } - public void setPriceProtect(@jakarta.annotation.Nullable String priceProtect) { + public void setPriceProtect(@jakarta.annotation.Nullable PriceProtect priceProtect) { this.priceProtect = priceProtect; } @@ -360,7 +363,8 @@ public NewUmConditionalOrderRequest newClientStrategyId( } /** - * Get newClientStrategyId + * A unique id among open orders. Automatically generated if not sent. Can only be string + * following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,32}$` * * @return newClientStrategyId */ @@ -379,7 +383,7 @@ public NewUmConditionalOrderRequest stopPrice(@jakarta.annotation.Nullable Doubl } /** - * Get stopPrice + * Used with `STOP/STOP_MARKET` or `TAKE_PROFIT/TAKE_PROFIT_MARKET` orders. * * @return stopPrice */ @@ -400,7 +404,7 @@ public NewUmConditionalOrderRequest activationPrice( } /** - * Get activationPrice + * Used with `TRAILING_STOP_MARKET` orders. * * @return activationPrice */ @@ -421,12 +425,14 @@ public NewUmConditionalOrderRequest callbackRate( } /** - * Get callbackRate + * Used with `TRAILING_STOP_MARKET` orders. minimum: 0.1 maximum: 5 * * @return callbackRate */ @jakarta.annotation.Nullable @Valid + @DecimalMin("0.1") + @DecimalMax("5") public Double getCallbackRate() { return callbackRate; } @@ -485,7 +491,10 @@ public NewUmConditionalOrderRequest goodTillDate( } /** - * Get goodTillDate + * order cancel time for timeInForce `GTD`, mandatory when `timeInforce` set + * to `GTD`; order the timestamp only retains second-level precision, ms part will be + * ignored; The goodTillDate timestamp must be greater than the current time plus 600 seconds + * and smaller than 253402300799000Mode. It must be sent in Hedge Mode. * * @return goodTillDate */ @@ -785,25 +794,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { TimeInForce.validateJsonElement(jsonObj.get("timeInForce")); } - if ((jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) - && !jsonObj.get("reduceOnly").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reduceOnly` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reduceOnly").toString())); + // validate the optional field `reduceOnly` + if (jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) { + ReduceOnly.validateJsonElement(jsonObj.get("reduceOnly")); } // validate the optional field `workingType` if (jsonObj.get("workingType") != null && !jsonObj.get("workingType").isJsonNull()) { WorkingType.validateJsonElement(jsonObj.get("workingType")); } - if ((jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) - && !jsonObj.get("priceProtect").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `priceProtect` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("priceProtect").toString())); + // validate the optional field `priceProtect` + if (jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) { + PriceProtect.validateJsonElement(jsonObj.get("priceProtect")); } if ((jsonObj.get("newClientStrategyId") != null && !jsonObj.get("newClientStrategyId").isJsonNull()) diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmConditionalOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmConditionalOrderResponse.java index d13d566d6..36133e68b 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmConditionalOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmConditionalOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** NewUmConditionalOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewUmConditionalOrderResponse { public static final String SERIALIZED_NAME_NEW_CLIENT_STRATEGY_ID = "newClientStrategyId"; @@ -172,7 +172,7 @@ public NewUmConditionalOrderResponse newClientStrategyId( } /** - * Get newClientStrategyId + * New Client Strategy ID. * * @return newClientStrategyId */ @@ -191,7 +191,7 @@ public NewUmConditionalOrderResponse strategyId(@jakarta.annotation.Nullable Lon } /** - * Get strategyId + * Strategy ID. * * @return strategyId */ @@ -211,7 +211,7 @@ public NewUmConditionalOrderResponse strategyStatus( } /** - * Get strategyStatus + * Strategy Status. * * @return strategyStatus */ @@ -231,7 +231,7 @@ public NewUmConditionalOrderResponse strategyType( } /** - * Get strategyType + * Strategy Type. * * @return strategyType */ @@ -250,7 +250,7 @@ public NewUmConditionalOrderResponse origQty(@jakarta.annotation.Nullable String } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -269,7 +269,7 @@ public NewUmConditionalOrderResponse price(@jakarta.annotation.Nullable String p } /** - * Get price + * Price. * * @return price */ @@ -289,7 +289,7 @@ public NewUmConditionalOrderResponse reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -308,7 +308,7 @@ public NewUmConditionalOrderResponse side(@jakarta.annotation.Nullable String si } /** - * Get side + * Side. * * @return side */ @@ -328,7 +328,7 @@ public NewUmConditionalOrderResponse positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -347,7 +347,7 @@ public NewUmConditionalOrderResponse stopPrice(@jakarta.annotation.Nullable Stri } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -366,7 +366,7 @@ public NewUmConditionalOrderResponse symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -386,7 +386,7 @@ public NewUmConditionalOrderResponse timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -406,7 +406,7 @@ public NewUmConditionalOrderResponse activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -425,7 +425,7 @@ public NewUmConditionalOrderResponse priceRate(@jakarta.annotation.Nullable Stri } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -444,7 +444,7 @@ public NewUmConditionalOrderResponse bookTime(@jakarta.annotation.Nullable Long } /** - * Get bookTime + * order place time * * @return bookTime */ @@ -463,7 +463,7 @@ public NewUmConditionalOrderResponse updateTime(@jakarta.annotation.Nullable Lon } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -483,7 +483,7 @@ public NewUmConditionalOrderResponse workingType( } /** - * Get workingType + * Working Type. * * @return workingType */ @@ -503,7 +503,7 @@ public NewUmConditionalOrderResponse priceProtect( } /** - * Get priceProtect + * Price Protect. * * @return priceProtect */ @@ -523,7 +523,7 @@ public NewUmConditionalOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -544,7 +544,7 @@ public NewUmConditionalOrderResponse goodTillDate( } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ @@ -564,7 +564,7 @@ public NewUmConditionalOrderResponse priceMatch( } /** - * Get priceMatch + * Price Match. * * @return priceMatch */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmOrderRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmOrderRequest.java index 09dacab8a..8edef940d 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmOrderRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** NewUmOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewUmOrderRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -59,13 +59,13 @@ public class NewUmOrderRequest { @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private Type type; + private OrderType type; public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) @jakarta.annotation.Nullable - private TimeInForce timeInForce; + private TimeInForce timeInForce = TimeInForce.GTC; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @@ -77,7 +77,7 @@ public class NewUmOrderRequest { @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) @jakarta.annotation.Nullable - private String reduceOnly; + private ReduceOnly reduceOnly = ReduceOnly.FALSE; public static final String SERIALIZED_NAME_PRICE = "price"; @@ -95,7 +95,7 @@ public class NewUmOrderRequest { @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESP_TYPE) @jakarta.annotation.Nullable - private NewOrderRespType newOrderRespType; + private NewOrderRespType newOrderRespType = NewOrderRespType.ACK; public static final String SERIALIZED_NAME_PRICE_MATCH = "priceMatch"; @@ -108,7 +108,7 @@ public class NewUmOrderRequest { @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) @jakarta.annotation.Nullable - private SelfTradePreventionMode selfTradePreventionMode; + private SelfTradePreventionMode selfTradePreventionMode = SelfTradePreventionMode.NONE; public static final String SERIALIZED_NAME_GOOD_TILL_DATE = "goodTillDate"; @@ -130,7 +130,7 @@ public NewUmOrderRequest symbol(@jakarta.annotation.Nonnull String symbol) { } /** - * Get symbol + * Symbol * * @return symbol */ @@ -185,7 +185,7 @@ public void setPositionSide(@jakarta.annotation.Nullable PositionSide positionSi this.positionSide = positionSide; } - public NewUmOrderRequest type(@jakarta.annotation.Nonnull Type type) { + public NewUmOrderRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -198,11 +198,11 @@ public NewUmOrderRequest type(@jakarta.annotation.Nonnull Type type) { @jakarta.annotation.Nonnull @NotNull @Valid - public Type getType() { + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull Type type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } @@ -232,7 +232,7 @@ public NewUmOrderRequest quantity(@jakarta.annotation.Nullable Double quantity) } /** - * Get quantity + * Place amount * * @return quantity */ @@ -246,7 +246,7 @@ public void setQuantity(@jakarta.annotation.Nullable Double quantity) { this.quantity = quantity; } - public NewUmOrderRequest reduceOnly(@jakarta.annotation.Nullable String reduceOnly) { + public NewUmOrderRequest reduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { this.reduceOnly = reduceOnly; return this; } @@ -257,11 +257,12 @@ public NewUmOrderRequest reduceOnly(@jakarta.annotation.Nullable String reduceOn * @return reduceOnly */ @jakarta.annotation.Nullable - public String getReduceOnly() { + @Valid + public ReduceOnly getReduceOnly() { return reduceOnly; } - public void setReduceOnly(@jakarta.annotation.Nullable String reduceOnly) { + public void setReduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { this.reduceOnly = reduceOnly; } @@ -271,7 +272,7 @@ public NewUmOrderRequest price(@jakarta.annotation.Nullable Double price) { } /** - * Get price + * Order price * * @return price */ @@ -292,7 +293,8 @@ public NewUmOrderRequest newClientOrderId( } /** - * Get newClientOrderId + * A unique id among open orders. Automatically generated if not sent. Can only be string + * following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,32}$` * * @return newClientOrderId */ @@ -375,7 +377,10 @@ public NewUmOrderRequest goodTillDate(@jakarta.annotation.Nullable Long goodTill } /** - * Get goodTillDate + * order cancel time for timeInForce `GTD`, mandatory when `timeInforce` set + * to `GTD`; order the timestamp only retains second-level precision, ms part will be + * ignored; The goodTillDate timestamp must be greater than the current time plus 600 seconds + * and smaller than 253402300799000Mode. It must be sent in Hedge Mode. * * @return goodTillDate */ @@ -629,18 +634,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti PositionSide.validateJsonElement(jsonObj.get("positionSide")); } // validate the required field `type` - Type.validateJsonElement(jsonObj.get("type")); + OrderType.validateJsonElement(jsonObj.get("type")); // validate the optional field `timeInForce` if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { TimeInForce.validateJsonElement(jsonObj.get("timeInForce")); } - if ((jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) - && !jsonObj.get("reduceOnly").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reduceOnly` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reduceOnly").toString())); + // validate the optional field `reduceOnly` + if (jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) { + ReduceOnly.validateJsonElement(jsonObj.get("reduceOnly")); } if ((jsonObj.get("newClientOrderId") != null && !jsonObj.get("newClientOrderId").isJsonNull()) diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmOrderResponse.java index cc09100f0..b709423c5 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/NewUmOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** NewUmOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewUmOrderResponse { public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -48,12 +48,6 @@ public class NewUmOrderResponse { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_QUOTE = "cumQuote"; - - @SerializedName(SERIALIZED_NAME_CUM_QUOTE) - @jakarta.annotation.Nullable - private String cumQuote; - public static final String SERIALIZED_NAME_EXECUTED_QTY = "executedQty"; @SerializedName(SERIALIZED_NAME_EXECUTED_QTY) @@ -66,12 +60,6 @@ public class NewUmOrderResponse { @jakarta.annotation.Nullable private Long orderId; - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE) - @jakarta.annotation.Nullable - private String avgPrice; - public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; @SerializedName(SERIALIZED_NAME_ORIG_QTY) @@ -159,7 +147,7 @@ public NewUmOrderResponse clientOrderId(@jakarta.annotation.Nullable String clie } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -178,7 +166,7 @@ public NewUmOrderResponse cumQty(@jakarta.annotation.Nullable String cumQty) { } /** - * Get cumQty + * Cum Qty. * * @return cumQty */ @@ -191,32 +179,13 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public NewUmOrderResponse cumQuote(@jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - return this; - } - - /** - * Get cumQuote - * - * @return cumQuote - */ - @jakarta.annotation.Nullable - public String getCumQuote() { - return cumQuote; - } - - public void setCumQuote(@jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - } - public NewUmOrderResponse executedQty(@jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; return this; } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -235,7 +204,7 @@ public NewUmOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -248,32 +217,13 @@ public void setOrderId(@jakarta.annotation.Nullable Long orderId) { this.orderId = orderId; } - public NewUmOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - return this; - } - - /** - * Get avgPrice - * - * @return avgPrice - */ - @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; - } - - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - } - public NewUmOrderResponse origQty(@jakarta.annotation.Nullable String origQty) { this.origQty = origQty; return this; } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -292,7 +242,7 @@ public NewUmOrderResponse price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Price. * * @return price */ @@ -311,7 +261,7 @@ public NewUmOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean reduce } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -330,7 +280,7 @@ public NewUmOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Side. * * @return side */ @@ -349,7 +299,7 @@ public NewUmOrderResponse positionSide(@jakarta.annotation.Nullable String posit } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -368,7 +318,7 @@ public NewUmOrderResponse status(@jakarta.annotation.Nullable String status) { } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -387,7 +337,7 @@ public NewUmOrderResponse symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -406,7 +356,7 @@ public NewUmOrderResponse timeInForce(@jakarta.annotation.Nullable String timeIn } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -425,7 +375,7 @@ public NewUmOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -445,7 +395,7 @@ public NewUmOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -465,7 +415,7 @@ public NewUmOrderResponse goodTillDate(@jakarta.annotation.Nullable Long goodTil } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ @@ -484,7 +434,7 @@ public NewUmOrderResponse updateTime(@jakarta.annotation.Nullable Long updateTim } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -503,7 +453,7 @@ public NewUmOrderResponse priceMatch(@jakarta.annotation.Nullable String priceMa } /** - * Get priceMatch + * Price Match. * * @return priceMatch */ @@ -527,10 +477,8 @@ public boolean equals(Object o) { NewUmOrderResponse newUmOrderResponse = (NewUmOrderResponse) o; return Objects.equals(this.clientOrderId, newUmOrderResponse.clientOrderId) && Objects.equals(this.cumQty, newUmOrderResponse.cumQty) - && Objects.equals(this.cumQuote, newUmOrderResponse.cumQuote) && Objects.equals(this.executedQty, newUmOrderResponse.executedQty) && Objects.equals(this.orderId, newUmOrderResponse.orderId) - && Objects.equals(this.avgPrice, newUmOrderResponse.avgPrice) && Objects.equals(this.origQty, newUmOrderResponse.origQty) && Objects.equals(this.price, newUmOrderResponse.price) && Objects.equals(this.reduceOnly, newUmOrderResponse.reduceOnly) @@ -552,10 +500,8 @@ public int hashCode() { return Objects.hash( clientOrderId, cumQty, - cumQuote, executedQty, orderId, - avgPrice, origQty, price, reduceOnly, @@ -577,10 +523,8 @@ public String toString() { sb.append("class NewUmOrderResponse {\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumQuote: ").append(toIndentedString(cumQuote)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); @@ -611,10 +555,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = ""; cumQtyValueAsString = cumQtyValue.toString(); sb.append("cumQty=").append(urlEncode(cumQtyValueAsString)).append(""); - Object cumQuoteValue = getCumQuote(); - String cumQuoteValueAsString = ""; - cumQuoteValueAsString = cumQuoteValue.toString(); - sb.append("cumQuote=").append(urlEncode(cumQuoteValueAsString)).append(""); Object executedQtyValue = getExecutedQty(); String executedQtyValueAsString = ""; executedQtyValueAsString = executedQtyValue.toString(); @@ -623,10 +563,6 @@ public String toUrlQueryString() { String orderIdValueAsString = ""; orderIdValueAsString = orderIdValue.toString(); sb.append("orderId=").append(urlEncode(orderIdValueAsString)).append(""); - Object avgPriceValue = getAvgPrice(); - String avgPriceValueAsString = ""; - avgPriceValueAsString = avgPriceValue.toString(); - sb.append("avgPrice=").append(urlEncode(avgPriceValueAsString)).append(""); Object origQtyValue = getOrigQty(); String origQtyValueAsString = ""; origQtyValueAsString = origQtyValue.toString(); @@ -711,10 +647,8 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("clientOrderId"); openapiFields.add("cumQty"); - openapiFields.add("cumQuote"); openapiFields.add("executedQty"); openapiFields.add("orderId"); - openapiFields.add("avgPrice"); openapiFields.add("origQty"); openapiFields.add("price"); openapiFields.add("reduceOnly"); @@ -767,14 +701,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumQuote") != null && !jsonObj.get("cumQuote").isJsonNull()) - && !jsonObj.get("cumQuote").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumQuote` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("cumQuote").toString())); - } if ((jsonObj.get("executedQty") != null && !jsonObj.get("executedQty").isJsonNull()) && !jsonObj.get("executedQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -783,14 +709,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("executedQty").toString())); } - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) && !jsonObj.get("origQty").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/OrderType.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/OrderType.java new file mode 100644 index 000000000..6da9bb28d --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/OrderType.java @@ -0,0 +1,79 @@ +/* + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Conditional order type */ +@JsonAdapter(OrderType.Adapter.class) +public enum OrderType { + STOP("STOP"), + + TAKE_PROFIT("TAKE_PROFIT"), + + STOP_MARKET("STOP_MARKET"), + + TAKE_PROFIT_MARKET("TAKE_PROFIT_MARKET"), + + TRAILING_STOP_MARKET("TRAILING_STOP_MARKET"); + + private String value; + + OrderType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderType fromValue(String value) { + for (OrderType b : OrderType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderType.fromValue(value); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse.java index a4af43623..a3e7b1ac8 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse { public static final String SERIALIZED_NAME_INDICATORS = "indicators"; @@ -84,7 +84,7 @@ public PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators.java index 07de94b98..e7a95bd9c 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -37,10 +37,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators */ +/** Indicators. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators { public static final String SERIALIZED_NAME_B_T_C_U_S_D_T = "BTCUSDT"; @@ -83,7 +83,7 @@ public PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators add } /** - * Get BTCUSDT + * BTCUSDT. * * @return BTCUSDT */ @@ -126,7 +126,7 @@ public PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators add } /** - * Get ACCOUNT + * ACCOUNT. * * @return ACCOUNT */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.java index 353d206dc..cc3a85a86 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner { public static final String SERIALIZED_NAME_INDICATOR = "indicator"; @@ -75,7 +75,7 @@ public PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsACCO } /** - * Get indicator + * Indicator. * * @return indicator */ @@ -95,7 +95,7 @@ public PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsACCO } /** - * Get value + * Value. * * @return value */ @@ -115,7 +115,7 @@ public void setValue(@jakarta.annotation.Nullable Long value) { } /** - * Get triggerValue + * Trigger Value. * * @return triggerValue */ @@ -135,7 +135,7 @@ public void setTriggerValue(@jakarta.annotation.Nullable Long triggerValue) { } /** - * Get plannedRecoverTime + * Planned Recover Time. * * @return plannedRecoverTime */ @@ -155,7 +155,7 @@ public void setPlannedRecoverTime(@jakarta.annotation.Nullable Long plannedRecov } /** - * Get isLocked + * Is Locked. * * @return isLocked */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.java index 0e7357240..e84f3244a 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner { public static final String SERIALIZED_NAME_IS_LOCKED = "isLocked"; @@ -76,7 +76,7 @@ public PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCU } /** - * Get isLocked + * Is Locked. * * @return isLocked */ @@ -96,7 +96,7 @@ public void setIsLocked(@jakarta.annotation.Nullable Boolean isLocked) { } /** - * Get plannedRecoverTime + * Planned Recover Time. * * @return plannedRecoverTime */ @@ -116,7 +116,7 @@ public void setPlannedRecoverTime(@jakarta.annotation.Nullable Long plannedRecov } /** - * Get indicator + * Indicator. * * @return indicator */ @@ -136,7 +136,7 @@ public PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCU } /** - * Get value + * Value. * * @return value */ @@ -157,7 +157,7 @@ public void setValue(@jakarta.annotation.Nullable Double value) { } /** - * Get triggerValue + * Trigger Value. * * @return triggerValue */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PositionSide.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PositionSide.java index 58c9d39c0..4026bc718 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PositionSide.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PositionSide.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,9 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets positionSide */ +/** + * Default `BOTH` for One-way Mode; `LONG` or `SHORT` for Hedge Mode + */ @JsonAdapter(PositionSide.Adapter.class) public enum PositionSide { BOTH("BOTH"), diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PriceMatch.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PriceMatch.java index 1dbfc4dbe..76c1aefa1 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PriceMatch.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PriceMatch.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -21,11 +21,9 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets priceMatch */ +/** Can't be passed together with `price` */ @JsonAdapter(PriceMatch.Adapter.class) public enum PriceMatch { - NONE("NONE"), - OPPONENT("OPPONENT"), OPPONENT_5("OPPONENT_5"), diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PriceProtect.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PriceProtect.java new file mode 100644 index 000000000..845cfe5d2 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/PriceProtect.java @@ -0,0 +1,73 @@ +/* + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Price protection. Default `false` */ +@JsonAdapter(PriceProtect.Adapter.class) +public enum PriceProtect { + TRUE("true"), + + FALSE("false"); + + private String value; + + PriceProtect(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PriceProtect fromValue(String value) { + for (PriceProtect b : PriceProtect.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PriceProtect enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PriceProtect read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PriceProtect.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PriceProtect.fromValue(value); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCmConditionalOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCmConditionalOrdersResponse.java index c34696547..461a7928f 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCmConditionalOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCmConditionalOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllCmConditionalOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllCmConditionalOrdersResponse extends ArrayList { public QueryAllCmConditionalOrdersResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCmConditionalOrdersResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCmConditionalOrdersResponseInner.java index e06bb1d7d..d10ffc7fe 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCmConditionalOrdersResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCmConditionalOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllCmConditionalOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllCmConditionalOrdersResponseInner { public static final String SERIALIZED_NAME_NEW_CLIENT_STRATEGY_ID = "newClientStrategyId"; @@ -165,7 +165,7 @@ public QueryAllCmConditionalOrdersResponseInner newClientStrategyId( } /** - * Get newClientStrategyId + * New Client Strategy ID. * * @return newClientStrategyId */ @@ -185,7 +185,7 @@ public QueryAllCmConditionalOrdersResponseInner strategyId( } /** - * Get strategyId + * Strategy ID. * * @return strategyId */ @@ -205,7 +205,7 @@ public QueryAllCmConditionalOrdersResponseInner strategyStatus( } /** - * Get strategyStatus + * Strategy Status. * * @return strategyStatus */ @@ -225,7 +225,7 @@ public QueryAllCmConditionalOrdersResponseInner strategyType( } /** - * Get strategyType + * Strategy Type. * * @return strategyType */ @@ -245,7 +245,7 @@ public QueryAllCmConditionalOrdersResponseInner origQty( } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -265,7 +265,7 @@ public QueryAllCmConditionalOrdersResponseInner price( } /** - * Get price + * Price. * * @return price */ @@ -285,7 +285,7 @@ public QueryAllCmConditionalOrdersResponseInner reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -304,7 +304,7 @@ public QueryAllCmConditionalOrdersResponseInner side(@jakarta.annotation.Nullabl } /** - * Get side + * Side. * * @return side */ @@ -324,7 +324,7 @@ public QueryAllCmConditionalOrdersResponseInner positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -344,7 +344,7 @@ public QueryAllCmConditionalOrdersResponseInner stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -364,7 +364,7 @@ public QueryAllCmConditionalOrdersResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -384,7 +384,7 @@ public QueryAllCmConditionalOrdersResponseInner orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -404,7 +404,7 @@ public QueryAllCmConditionalOrdersResponseInner status( } /** - * Get status + * Normal order status after trigger if appliable, only have when the strategy is triggered * * @return status */ @@ -424,7 +424,7 @@ public QueryAllCmConditionalOrdersResponseInner bookTime( } /** - * Get bookTime + * order time * * @return bookTime */ @@ -444,7 +444,7 @@ public QueryAllCmConditionalOrdersResponseInner updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -464,7 +464,7 @@ public QueryAllCmConditionalOrdersResponseInner triggerTime( } /** - * Get triggerTime + * Trigger Time. * * @return triggerTime */ @@ -484,7 +484,7 @@ public QueryAllCmConditionalOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -503,7 +503,7 @@ public QueryAllCmConditionalOrdersResponseInner type(@jakarta.annotation.Nullabl } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -523,7 +523,7 @@ public QueryAllCmConditionalOrdersResponseInner activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -543,7 +543,7 @@ public QueryAllCmConditionalOrdersResponseInner priceRate( } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCmOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCmOrdersResponse.java index 03d3389b7..9e52c4676 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCmOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCmOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllCmOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllCmOrdersResponse extends ArrayList { public QueryAllCmOrdersResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCmOrdersResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCmOrdersResponseInner.java index 01bc9b163..96ab3af8b 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCmOrdersResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCmOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllCmOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllCmOrdersResponseInner { public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; @@ -152,7 +152,7 @@ public QueryAllCmOrdersResponseInner avgPrice(@jakarta.annotation.Nullable Strin } /** - * Get avgPrice + * Avg Price. * * @return avgPrice */ @@ -172,7 +172,7 @@ public QueryAllCmOrdersResponseInner clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -191,7 +191,7 @@ public QueryAllCmOrdersResponseInner cumBase(@jakarta.annotation.Nullable String } /** - * Get cumBase + * Cum Base. * * @return cumBase */ @@ -211,7 +211,7 @@ public QueryAllCmOrdersResponseInner executedQty( } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -230,7 +230,7 @@ public QueryAllCmOrdersResponseInner orderId(@jakarta.annotation.Nullable Long o } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -249,7 +249,7 @@ public QueryAllCmOrdersResponseInner origQty(@jakarta.annotation.Nullable String } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -268,7 +268,7 @@ public QueryAllCmOrdersResponseInner origType(@jakarta.annotation.Nullable Strin } /** - * Get origType + * Orig Type. * * @return origType */ @@ -287,7 +287,7 @@ public QueryAllCmOrdersResponseInner price(@jakarta.annotation.Nullable String p } /** - * Get price + * Price. * * @return price */ @@ -307,7 +307,7 @@ public QueryAllCmOrdersResponseInner reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -326,7 +326,7 @@ public QueryAllCmOrdersResponseInner side(@jakarta.annotation.Nullable String si } /** - * Get side + * Side. * * @return side */ @@ -346,7 +346,7 @@ public QueryAllCmOrdersResponseInner positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -365,7 +365,7 @@ public QueryAllCmOrdersResponseInner status(@jakarta.annotation.Nullable String } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -384,7 +384,7 @@ public QueryAllCmOrdersResponseInner symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -403,7 +403,7 @@ public QueryAllCmOrdersResponseInner pair(@jakarta.annotation.Nullable String pa } /** - * Get pair + * Pair. * * @return pair */ @@ -422,7 +422,7 @@ public QueryAllCmOrdersResponseInner time(@jakarta.annotation.Nullable Long time } /** - * Get time + * order time * * @return time */ @@ -442,7 +442,7 @@ public QueryAllCmOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -461,7 +461,7 @@ public QueryAllCmOrdersResponseInner type(@jakarta.annotation.Nullable String ty } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -480,7 +480,7 @@ public QueryAllCmOrdersResponseInner updateTime(@jakarta.annotation.Nullable Lon } /** - * Get updateTime + * update time * * @return updateTime */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentCmOpenConditionalOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentCmOpenConditionalOrdersResponse.java index fa4ccf6d4..48954d9e7 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentCmOpenConditionalOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentCmOpenConditionalOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllCurrentCmOpenConditionalOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllCurrentCmOpenConditionalOrdersResponse extends ArrayList { public QueryAllCurrentCmOpenConditionalOrdersResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentCmOpenConditionalOrdersResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentCmOpenConditionalOrdersResponseInner.java index 152a689fb..6d1e572b2 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentCmOpenConditionalOrdersResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentCmOpenConditionalOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllCurrentCmOpenConditionalOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllCurrentCmOpenConditionalOrdersResponseInner { public static final String SERIALIZED_NAME_NEW_CLIENT_STRATEGY_ID = "newClientStrategyId"; @@ -141,7 +141,7 @@ public QueryAllCurrentCmOpenConditionalOrdersResponseInner newClientStrategyId( } /** - * Get newClientStrategyId + * New Client Strategy ID. * * @return newClientStrategyId */ @@ -161,7 +161,7 @@ public QueryAllCurrentCmOpenConditionalOrdersResponseInner strategyId( } /** - * Get strategyId + * Strategy ID. * * @return strategyId */ @@ -181,7 +181,7 @@ public QueryAllCurrentCmOpenConditionalOrdersResponseInner strategyStatus( } /** - * Get strategyStatus + * Strategy Status. * * @return strategyStatus */ @@ -201,7 +201,7 @@ public QueryAllCurrentCmOpenConditionalOrdersResponseInner strategyType( } /** - * Get strategyType + * Strategy Type. * * @return strategyType */ @@ -221,7 +221,7 @@ public QueryAllCurrentCmOpenConditionalOrdersResponseInner origQty( } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -241,7 +241,7 @@ public QueryAllCurrentCmOpenConditionalOrdersResponseInner price( } /** - * Get price + * Price. * * @return price */ @@ -261,7 +261,7 @@ public QueryAllCurrentCmOpenConditionalOrdersResponseInner reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -281,7 +281,7 @@ public QueryAllCurrentCmOpenConditionalOrdersResponseInner side( } /** - * Get side + * Side. * * @return side */ @@ -301,7 +301,7 @@ public QueryAllCurrentCmOpenConditionalOrdersResponseInner positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -321,7 +321,7 @@ public QueryAllCurrentCmOpenConditionalOrdersResponseInner stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -341,7 +341,7 @@ public QueryAllCurrentCmOpenConditionalOrdersResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -361,7 +361,7 @@ public QueryAllCurrentCmOpenConditionalOrdersResponseInner bookTime( } /** - * Get bookTime + * order time * * @return bookTime */ @@ -381,7 +381,7 @@ public QueryAllCurrentCmOpenConditionalOrdersResponseInner updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -401,7 +401,7 @@ public QueryAllCurrentCmOpenConditionalOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -421,7 +421,7 @@ public QueryAllCurrentCmOpenConditionalOrdersResponseInner activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -441,7 +441,7 @@ public QueryAllCurrentCmOpenConditionalOrdersResponseInner priceRate( } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentCmOpenOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentCmOpenOrdersResponse.java index e678fc4b3..0c0838167 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentCmOpenOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentCmOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllCurrentCmOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllCurrentCmOpenOrdersResponse extends ArrayList { public QueryAllCurrentCmOpenOrdersResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenAlgoOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenAlgoOrdersResponse.java index a30eb4896..1646c02c7 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenAlgoOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenAlgoOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllCurrentUmOpenAlgoOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllCurrentUmOpenAlgoOrdersResponse extends ArrayList { public QueryAllCurrentUmOpenAlgoOrdersResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenAlgoOrdersResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenAlgoOrdersResponseInner.java index 06838759d..4f35b20ae 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenAlgoOrdersResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenAlgoOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllCurrentUmOpenAlgoOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllCurrentUmOpenAlgoOrdersResponseInner { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; @@ -96,18 +96,6 @@ public class QueryAllCurrentUmOpenAlgoOrdersResponseInner { @jakarta.annotation.Nullable private String algoStatus; - public static final String SERIALIZED_NAME_ACTUAL_ORDER_ID = "actualOrderId"; - - @SerializedName(SERIALIZED_NAME_ACTUAL_ORDER_ID) - @jakarta.annotation.Nullable - private String actualOrderId; - - public static final String SERIALIZED_NAME_ACTUAL_PRICE = "actualPrice"; - - @SerializedName(SERIALIZED_NAME_ACTUAL_PRICE) - @jakarta.annotation.Nullable - private String actualPrice; - public static final String SERIALIZED_NAME_TRIGGER_PRICE = "triggerPrice"; @SerializedName(SERIALIZED_NAME_TRIGGER_PRICE) @@ -120,42 +108,6 @@ public class QueryAllCurrentUmOpenAlgoOrdersResponseInner { @jakarta.annotation.Nullable private String price; - public static final String SERIALIZED_NAME_ICEBERG_QUANTITY = "icebergQuantity"; - - @SerializedName(SERIALIZED_NAME_ICEBERG_QUANTITY) - @jakarta.annotation.Nullable - private String icebergQuantity; - - public static final String SERIALIZED_NAME_TP_TRIGGER_PRICE = "tpTriggerPrice"; - - @SerializedName(SERIALIZED_NAME_TP_TRIGGER_PRICE) - @jakarta.annotation.Nullable - private String tpTriggerPrice; - - public static final String SERIALIZED_NAME_TP_PRICE = "tpPrice"; - - @SerializedName(SERIALIZED_NAME_TP_PRICE) - @jakarta.annotation.Nullable - private String tpPrice; - - public static final String SERIALIZED_NAME_SL_TRIGGER_PRICE = "slTriggerPrice"; - - @SerializedName(SERIALIZED_NAME_SL_TRIGGER_PRICE) - @jakarta.annotation.Nullable - private String slTriggerPrice; - - public static final String SERIALIZED_NAME_SL_PRICE = "slPrice"; - - @SerializedName(SERIALIZED_NAME_SL_PRICE) - @jakarta.annotation.Nullable - private String slPrice; - - public static final String SERIALIZED_NAME_TP_ORDER_TYPE = "tpOrderType"; - - @SerializedName(SERIALIZED_NAME_TP_ORDER_TYPE) - @jakarta.annotation.Nullable - private String tpOrderType; - public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = "selfTradePreventionMode"; @@ -419,46 +371,6 @@ public void setAlgoStatus(@jakarta.annotation.Nullable String algoStatus) { this.algoStatus = algoStatus; } - public QueryAllCurrentUmOpenAlgoOrdersResponseInner actualOrderId( - @jakarta.annotation.Nullable String actualOrderId) { - this.actualOrderId = actualOrderId; - return this; - } - - /** - * Get actualOrderId - * - * @return actualOrderId - */ - @jakarta.annotation.Nullable - public String getActualOrderId() { - return actualOrderId; - } - - public void setActualOrderId(@jakarta.annotation.Nullable String actualOrderId) { - this.actualOrderId = actualOrderId; - } - - public QueryAllCurrentUmOpenAlgoOrdersResponseInner actualPrice( - @jakarta.annotation.Nullable String actualPrice) { - this.actualPrice = actualPrice; - return this; - } - - /** - * Get actualPrice - * - * @return actualPrice - */ - @jakarta.annotation.Nullable - public String getActualPrice() { - return actualPrice; - } - - public void setActualPrice(@jakarta.annotation.Nullable String actualPrice) { - this.actualPrice = actualPrice; - } - public QueryAllCurrentUmOpenAlgoOrdersResponseInner triggerPrice( @jakarta.annotation.Nullable String triggerPrice) { this.triggerPrice = triggerPrice; @@ -499,126 +411,6 @@ public void setPrice(@jakarta.annotation.Nullable String price) { this.price = price; } - public QueryAllCurrentUmOpenAlgoOrdersResponseInner icebergQuantity( - @jakarta.annotation.Nullable String icebergQuantity) { - this.icebergQuantity = icebergQuantity; - return this; - } - - /** - * Get icebergQuantity - * - * @return icebergQuantity - */ - @jakarta.annotation.Nullable - public String getIcebergQuantity() { - return icebergQuantity; - } - - public void setIcebergQuantity(@jakarta.annotation.Nullable String icebergQuantity) { - this.icebergQuantity = icebergQuantity; - } - - public QueryAllCurrentUmOpenAlgoOrdersResponseInner tpTriggerPrice( - @jakarta.annotation.Nullable String tpTriggerPrice) { - this.tpTriggerPrice = tpTriggerPrice; - return this; - } - - /** - * Get tpTriggerPrice - * - * @return tpTriggerPrice - */ - @jakarta.annotation.Nullable - public String getTpTriggerPrice() { - return tpTriggerPrice; - } - - public void setTpTriggerPrice(@jakarta.annotation.Nullable String tpTriggerPrice) { - this.tpTriggerPrice = tpTriggerPrice; - } - - public QueryAllCurrentUmOpenAlgoOrdersResponseInner tpPrice( - @jakarta.annotation.Nullable String tpPrice) { - this.tpPrice = tpPrice; - return this; - } - - /** - * Get tpPrice - * - * @return tpPrice - */ - @jakarta.annotation.Nullable - public String getTpPrice() { - return tpPrice; - } - - public void setTpPrice(@jakarta.annotation.Nullable String tpPrice) { - this.tpPrice = tpPrice; - } - - public QueryAllCurrentUmOpenAlgoOrdersResponseInner slTriggerPrice( - @jakarta.annotation.Nullable String slTriggerPrice) { - this.slTriggerPrice = slTriggerPrice; - return this; - } - - /** - * Get slTriggerPrice - * - * @return slTriggerPrice - */ - @jakarta.annotation.Nullable - public String getSlTriggerPrice() { - return slTriggerPrice; - } - - public void setSlTriggerPrice(@jakarta.annotation.Nullable String slTriggerPrice) { - this.slTriggerPrice = slTriggerPrice; - } - - public QueryAllCurrentUmOpenAlgoOrdersResponseInner slPrice( - @jakarta.annotation.Nullable String slPrice) { - this.slPrice = slPrice; - return this; - } - - /** - * Get slPrice - * - * @return slPrice - */ - @jakarta.annotation.Nullable - public String getSlPrice() { - return slPrice; - } - - public void setSlPrice(@jakarta.annotation.Nullable String slPrice) { - this.slPrice = slPrice; - } - - public QueryAllCurrentUmOpenAlgoOrdersResponseInner tpOrderType( - @jakarta.annotation.Nullable String tpOrderType) { - this.tpOrderType = tpOrderType; - return this; - } - - /** - * Get tpOrderType - * - * @return tpOrderType - */ - @jakarta.annotation.Nullable - public String getTpOrderType() { - return tpOrderType; - } - - public void setTpOrderType(@jakarta.annotation.Nullable String tpOrderType) { - this.tpOrderType = tpOrderType; - } - public QueryAllCurrentUmOpenAlgoOrdersResponseInner selfTradePreventionMode( @jakarta.annotation.Nullable String selfTradePreventionMode) { this.selfTradePreventionMode = selfTradePreventionMode; @@ -849,30 +641,10 @@ public boolean equals(Object o) { this.quantity, queryAllCurrentUmOpenAlgoOrdersResponseInner.quantity) && Objects.equals( this.algoStatus, queryAllCurrentUmOpenAlgoOrdersResponseInner.algoStatus) - && Objects.equals( - this.actualOrderId, - queryAllCurrentUmOpenAlgoOrdersResponseInner.actualOrderId) - && Objects.equals( - this.actualPrice, queryAllCurrentUmOpenAlgoOrdersResponseInner.actualPrice) && Objects.equals( this.triggerPrice, queryAllCurrentUmOpenAlgoOrdersResponseInner.triggerPrice) && Objects.equals(this.price, queryAllCurrentUmOpenAlgoOrdersResponseInner.price) - && Objects.equals( - this.icebergQuantity, - queryAllCurrentUmOpenAlgoOrdersResponseInner.icebergQuantity) - && Objects.equals( - this.tpTriggerPrice, - queryAllCurrentUmOpenAlgoOrdersResponseInner.tpTriggerPrice) - && Objects.equals( - this.tpPrice, queryAllCurrentUmOpenAlgoOrdersResponseInner.tpPrice) - && Objects.equals( - this.slTriggerPrice, - queryAllCurrentUmOpenAlgoOrdersResponseInner.slTriggerPrice) - && Objects.equals( - this.slPrice, queryAllCurrentUmOpenAlgoOrdersResponseInner.slPrice) - && Objects.equals( - this.tpOrderType, queryAllCurrentUmOpenAlgoOrdersResponseInner.tpOrderType) && Objects.equals( this.selfTradePreventionMode, queryAllCurrentUmOpenAlgoOrdersResponseInner.selfTradePreventionMode) @@ -912,16 +684,8 @@ public int hashCode() { timeInForce, quantity, algoStatus, - actualOrderId, - actualPrice, triggerPrice, price, - icebergQuantity, - tpTriggerPrice, - tpPrice, - slTriggerPrice, - slPrice, - tpOrderType, selfTradePreventionMode, workingType, priceMatch, @@ -948,16 +712,8 @@ public String toString() { sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" algoStatus: ").append(toIndentedString(algoStatus)).append("\n"); - sb.append(" actualOrderId: ").append(toIndentedString(actualOrderId)).append("\n"); - sb.append(" actualPrice: ").append(toIndentedString(actualPrice)).append("\n"); sb.append(" triggerPrice: ").append(toIndentedString(triggerPrice)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" icebergQuantity: ").append(toIndentedString(icebergQuantity)).append("\n"); - sb.append(" tpTriggerPrice: ").append(toIndentedString(tpTriggerPrice)).append("\n"); - sb.append(" tpPrice: ").append(toIndentedString(tpPrice)).append("\n"); - sb.append(" slTriggerPrice: ").append(toIndentedString(slTriggerPrice)).append("\n"); - sb.append(" slPrice: ").append(toIndentedString(slPrice)).append("\n"); - sb.append(" tpOrderType: ").append(toIndentedString(tpOrderType)).append("\n"); sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); @@ -1017,14 +773,6 @@ public String toUrlQueryString() { String algoStatusValueAsString = ""; algoStatusValueAsString = algoStatusValue.toString(); sb.append("algoStatus=").append(urlEncode(algoStatusValueAsString)).append(""); - Object actualOrderIdValue = getActualOrderId(); - String actualOrderIdValueAsString = ""; - actualOrderIdValueAsString = actualOrderIdValue.toString(); - sb.append("actualOrderId=").append(urlEncode(actualOrderIdValueAsString)).append(""); - Object actualPriceValue = getActualPrice(); - String actualPriceValueAsString = ""; - actualPriceValueAsString = actualPriceValue.toString(); - sb.append("actualPrice=").append(urlEncode(actualPriceValueAsString)).append(""); Object triggerPriceValue = getTriggerPrice(); String triggerPriceValueAsString = ""; triggerPriceValueAsString = triggerPriceValue.toString(); @@ -1033,30 +781,6 @@ public String toUrlQueryString() { String priceValueAsString = ""; priceValueAsString = priceValue.toString(); sb.append("price=").append(urlEncode(priceValueAsString)).append(""); - Object icebergQuantityValue = getIcebergQuantity(); - String icebergQuantityValueAsString = ""; - icebergQuantityValueAsString = icebergQuantityValue.toString(); - sb.append("icebergQuantity=").append(urlEncode(icebergQuantityValueAsString)).append(""); - Object tpTriggerPriceValue = getTpTriggerPrice(); - String tpTriggerPriceValueAsString = ""; - tpTriggerPriceValueAsString = tpTriggerPriceValue.toString(); - sb.append("tpTriggerPrice=").append(urlEncode(tpTriggerPriceValueAsString)).append(""); - Object tpPriceValue = getTpPrice(); - String tpPriceValueAsString = ""; - tpPriceValueAsString = tpPriceValue.toString(); - sb.append("tpPrice=").append(urlEncode(tpPriceValueAsString)).append(""); - Object slTriggerPriceValue = getSlTriggerPrice(); - String slTriggerPriceValueAsString = ""; - slTriggerPriceValueAsString = slTriggerPriceValue.toString(); - sb.append("slTriggerPrice=").append(urlEncode(slTriggerPriceValueAsString)).append(""); - Object slPriceValue = getSlPrice(); - String slPriceValueAsString = ""; - slPriceValueAsString = slPriceValue.toString(); - sb.append("slPrice=").append(urlEncode(slPriceValueAsString)).append(""); - Object tpOrderTypeValue = getTpOrderType(); - String tpOrderTypeValueAsString = ""; - tpOrderTypeValueAsString = tpOrderTypeValue.toString(); - sb.append("tpOrderType=").append(urlEncode(tpOrderTypeValueAsString)).append(""); Object selfTradePreventionModeValue = getSelfTradePreventionMode(); String selfTradePreventionModeValueAsString = ""; selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); @@ -1137,16 +861,8 @@ private String toIndentedString(Object o) { openapiFields.add("timeInForce"); openapiFields.add("quantity"); openapiFields.add("algoStatus"); - openapiFields.add("actualOrderId"); - openapiFields.add("actualPrice"); openapiFields.add("triggerPrice"); openapiFields.add("price"); - openapiFields.add("icebergQuantity"); - openapiFields.add("tpTriggerPrice"); - openapiFields.add("tpPrice"); - openapiFields.add("slTriggerPrice"); - openapiFields.add("slPrice"); - openapiFields.add("tpOrderType"); openapiFields.add("selfTradePreventionMode"); openapiFields.add("workingType"); openapiFields.add("priceMatch"); @@ -1255,22 +971,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("algoStatus").toString())); } - if ((jsonObj.get("actualOrderId") != null && !jsonObj.get("actualOrderId").isJsonNull()) - && !jsonObj.get("actualOrderId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `actualOrderId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("actualOrderId").toString())); - } - if ((jsonObj.get("actualPrice") != null && !jsonObj.get("actualPrice").isJsonNull()) - && !jsonObj.get("actualPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `actualPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("actualPrice").toString())); - } if ((jsonObj.get("triggerPrice") != null && !jsonObj.get("triggerPrice").isJsonNull()) && !jsonObj.get("triggerPrice").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1287,54 +987,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("price").toString())); } - if ((jsonObj.get("icebergQuantity") != null && !jsonObj.get("icebergQuantity").isJsonNull()) - && !jsonObj.get("icebergQuantity").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `icebergQuantity` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("icebergQuantity").toString())); - } - if ((jsonObj.get("tpTriggerPrice") != null && !jsonObj.get("tpTriggerPrice").isJsonNull()) - && !jsonObj.get("tpTriggerPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tpTriggerPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("tpTriggerPrice").toString())); - } - if ((jsonObj.get("tpPrice") != null && !jsonObj.get("tpPrice").isJsonNull()) - && !jsonObj.get("tpPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tpPrice` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("tpPrice").toString())); - } - if ((jsonObj.get("slTriggerPrice") != null && !jsonObj.get("slTriggerPrice").isJsonNull()) - && !jsonObj.get("slTriggerPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `slTriggerPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("slTriggerPrice").toString())); - } - if ((jsonObj.get("slPrice") != null && !jsonObj.get("slPrice").isJsonNull()) - && !jsonObj.get("slPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `slPrice` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("slPrice").toString())); - } - if ((jsonObj.get("tpOrderType") != null && !jsonObj.get("tpOrderType").isJsonNull()) - && !jsonObj.get("tpOrderType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tpOrderType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("tpOrderType").toString())); - } if ((jsonObj.get("selfTradePreventionMode") != null && !jsonObj.get("selfTradePreventionMode").isJsonNull()) && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenConditionalOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenConditionalOrdersResponse.java index 5714eb207..1157dbce6 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenConditionalOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenConditionalOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllCurrentUmOpenConditionalOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllCurrentUmOpenConditionalOrdersResponse extends ArrayList { public QueryAllCurrentUmOpenConditionalOrdersResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenConditionalOrdersResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenConditionalOrdersResponseInner.java index f59f83db5..f35d7065d 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenConditionalOrdersResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenConditionalOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllCurrentUmOpenConditionalOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllCurrentUmOpenConditionalOrdersResponseInner { public static final String SERIALIZED_NAME_NEW_CLIENT_STRATEGY_ID = "newClientStrategyId"; @@ -160,7 +160,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner newClientStrategyId( } /** - * Get newClientStrategyId + * New Client Strategy ID. * * @return newClientStrategyId */ @@ -180,7 +180,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner strategyId( } /** - * Get strategyId + * Strategy ID. * * @return strategyId */ @@ -200,7 +200,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner strategyStatus( } /** - * Get strategyStatus + * Strategy Status. * * @return strategyStatus */ @@ -220,7 +220,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner strategyType( } /** - * Get strategyType + * Strategy Type. * * @return strategyType */ @@ -240,7 +240,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner origQty( } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -260,7 +260,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner price( } /** - * Get price + * Price. * * @return price */ @@ -280,7 +280,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -300,7 +300,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner side( } /** - * Get side + * Side. * * @return side */ @@ -320,7 +320,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -340,7 +340,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -360,7 +360,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -380,7 +380,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner bookTime( } /** - * Get bookTime + * order time * * @return bookTime */ @@ -400,7 +400,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -420,7 +420,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -440,7 +440,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -460,7 +460,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner priceRate( } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -480,7 +480,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner selfTradePreventionMo } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -501,7 +501,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner goodTillDate( } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ @@ -521,7 +521,7 @@ public QueryAllCurrentUmOpenConditionalOrdersResponseInner priceMatch( } /** - * Get priceMatch + * Price Match. * * @return priceMatch */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenOrdersResponse.java index 2958a2324..1a2366faa 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllCurrentUmOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllCurrentUmOpenOrdersResponse extends ArrayList { public QueryAllCurrentUmOpenOrdersResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenOrdersResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenOrdersResponseInner.java index 5162f6a43..c54cc8c78 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenOrdersResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllCurrentUmOpenOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllCurrentUmOpenOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllCurrentUmOpenOrdersResponseInner { public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; @@ -166,7 +166,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner avgPrice( } /** - * Get avgPrice + * Avg Price. * * @return avgPrice */ @@ -186,7 +186,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -206,7 +206,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner cumQuote( } /** - * Get cumQuote + * Cum Quote. * * @return cumQuote */ @@ -226,7 +226,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner executedQty( } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -246,7 +246,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -266,7 +266,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner origQty( } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -286,7 +286,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner origType( } /** - * Get origType + * Orig Type. * * @return origType */ @@ -306,7 +306,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner price( } /** - * Get price + * Price. * * @return price */ @@ -326,7 +326,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -345,7 +345,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner side(@jakarta.annotation.Nullabl } /** - * Get side + * Side. * * @return side */ @@ -365,7 +365,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -385,7 +385,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner status( } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -405,7 +405,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -424,7 +424,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner time(@jakarta.annotation.Nullabl } /** - * Get time + * order time * * @return time */ @@ -444,7 +444,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -463,7 +463,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner type(@jakarta.annotation.Nullabl } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -483,7 +483,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner updateTime( } /** - * Get updateTime + * update time * * @return updateTime */ @@ -503,7 +503,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -524,7 +524,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner goodTillDate( } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ @@ -544,7 +544,7 @@ public QueryAllCurrentUmOpenOrdersResponseInner priceMatch( } /** - * Get priceMatch + * Price Match. * * @return priceMatch */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllMarginAccountOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllMarginAccountOrdersResponse.java index 04edbd4b2..8863fa187 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllMarginAccountOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllMarginAccountOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllMarginAccountOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllMarginAccountOrdersResponse extends ArrayList { public QueryAllMarginAccountOrdersResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllMarginAccountOrdersResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllMarginAccountOrdersResponseInner.java index 8bfb8d32e..d03cb1f5b 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllMarginAccountOrdersResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllMarginAccountOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllMarginAccountOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllMarginAccountOrdersResponseInner { public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -166,7 +166,7 @@ public QueryAllMarginAccountOrdersResponseInner clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -186,7 +186,7 @@ public QueryAllMarginAccountOrdersResponseInner cummulativeQuoteQty( } /** - * Get cummulativeQuoteQty + * Cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -206,7 +206,7 @@ public QueryAllMarginAccountOrdersResponseInner executedQty( } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -226,7 +226,7 @@ public QueryAllMarginAccountOrdersResponseInner icebergQty( } /** - * Get icebergQty + * Iceberg Qty. * * @return icebergQty */ @@ -246,7 +246,7 @@ public QueryAllMarginAccountOrdersResponseInner isWorking( } /** - * Get isWorking + * Is Working. * * @return isWorking */ @@ -266,7 +266,7 @@ public QueryAllMarginAccountOrdersResponseInner orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -286,7 +286,7 @@ public QueryAllMarginAccountOrdersResponseInner origQty( } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -306,7 +306,7 @@ public QueryAllMarginAccountOrdersResponseInner price( } /** - * Get price + * Price. * * @return price */ @@ -325,7 +325,7 @@ public QueryAllMarginAccountOrdersResponseInner side(@jakarta.annotation.Nullabl } /** - * Get side + * Side. * * @return side */ @@ -345,7 +345,7 @@ public QueryAllMarginAccountOrdersResponseInner status( } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -365,7 +365,7 @@ public QueryAllMarginAccountOrdersResponseInner stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -385,7 +385,7 @@ public QueryAllMarginAccountOrdersResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -404,7 +404,7 @@ public QueryAllMarginAccountOrdersResponseInner time(@jakarta.annotation.Nullabl } /** - * Get time + * Event time. * * @return time */ @@ -424,7 +424,7 @@ public QueryAllMarginAccountOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -443,7 +443,7 @@ public QueryAllMarginAccountOrdersResponseInner type(@jakarta.annotation.Nullabl } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -463,7 +463,7 @@ public QueryAllMarginAccountOrdersResponseInner updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -483,7 +483,7 @@ public QueryAllMarginAccountOrdersResponseInner accountId( } /** - * Get accountId + * Account ID. * * @return accountId */ @@ -503,7 +503,7 @@ public QueryAllMarginAccountOrdersResponseInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -524,7 +524,7 @@ public QueryAllMarginAccountOrdersResponseInner preventedMatchId( } /** - * Get preventedMatchId + * Prevented Match ID. * * @return preventedMatchId */ @@ -544,7 +544,7 @@ public QueryAllMarginAccountOrdersResponseInner preventedQuantity( } /** - * Get preventedQuantity + * Prevented Quantity. * * @return preventedQuantity */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllUmConditionalOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllUmConditionalOrdersResponse.java index f42100b4d..957e5edd3 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllUmConditionalOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllUmConditionalOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllUmConditionalOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllUmConditionalOrdersResponse extends ArrayList { public QueryAllUmConditionalOrdersResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllUmConditionalOrdersResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllUmConditionalOrdersResponseInner.java index fde0a3c6a..f5267db13 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllUmConditionalOrdersResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllUmConditionalOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllUmConditionalOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllUmConditionalOrdersResponseInner { public static final String SERIALIZED_NAME_NEW_CLIENT_STRATEGY_ID = "newClientStrategyId"; @@ -184,7 +184,7 @@ public QueryAllUmConditionalOrdersResponseInner newClientStrategyId( } /** - * Get newClientStrategyId + * New Client Strategy ID. * * @return newClientStrategyId */ @@ -204,7 +204,7 @@ public QueryAllUmConditionalOrdersResponseInner strategyId( } /** - * Get strategyId + * Strategy ID. * * @return strategyId */ @@ -224,7 +224,7 @@ public QueryAllUmConditionalOrdersResponseInner strategyStatus( } /** - * Get strategyStatus + * Strategy Status. * * @return strategyStatus */ @@ -244,7 +244,7 @@ public QueryAllUmConditionalOrdersResponseInner strategyType( } /** - * Get strategyType + * Strategy Type. * * @return strategyType */ @@ -264,7 +264,7 @@ public QueryAllUmConditionalOrdersResponseInner origQty( } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -284,7 +284,7 @@ public QueryAllUmConditionalOrdersResponseInner price( } /** - * Get price + * Price. * * @return price */ @@ -304,7 +304,7 @@ public QueryAllUmConditionalOrdersResponseInner reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -323,7 +323,7 @@ public QueryAllUmConditionalOrdersResponseInner side(@jakarta.annotation.Nullabl } /** - * Get side + * Side. * * @return side */ @@ -343,7 +343,7 @@ public QueryAllUmConditionalOrdersResponseInner positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -363,7 +363,7 @@ public QueryAllUmConditionalOrdersResponseInner stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -383,7 +383,7 @@ public QueryAllUmConditionalOrdersResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -403,7 +403,7 @@ public QueryAllUmConditionalOrdersResponseInner orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -423,7 +423,7 @@ public QueryAllUmConditionalOrdersResponseInner status( } /** - * Get status + * Normal order status after trigger if appliable, only have when the strategy is triggered * * @return status */ @@ -443,7 +443,7 @@ public QueryAllUmConditionalOrdersResponseInner bookTime( } /** - * Get bookTime + * order time * * @return bookTime */ @@ -463,7 +463,7 @@ public QueryAllUmConditionalOrdersResponseInner updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -483,7 +483,7 @@ public QueryAllUmConditionalOrdersResponseInner triggerTime( } /** - * Get triggerTime + * Trigger Time. * * @return triggerTime */ @@ -503,7 +503,7 @@ public QueryAllUmConditionalOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -522,7 +522,7 @@ public QueryAllUmConditionalOrdersResponseInner type(@jakarta.annotation.Nullabl } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -542,7 +542,7 @@ public QueryAllUmConditionalOrdersResponseInner activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -562,7 +562,7 @@ public QueryAllUmConditionalOrdersResponseInner priceRate( } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -582,7 +582,7 @@ public QueryAllUmConditionalOrdersResponseInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -603,7 +603,7 @@ public QueryAllUmConditionalOrdersResponseInner goodTillDate( } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ @@ -623,7 +623,7 @@ public QueryAllUmConditionalOrdersResponseInner priceMatch( } /** - * Get priceMatch + * Price Match. * * @return priceMatch */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllUmOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllUmOrdersResponse.java index 9c82b5ba3..569f1f3ad 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllUmOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryAllUmOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllUmOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllUmOrdersResponse extends ArrayList { public QueryAllUmOrdersResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmConditionalOrderHistoryResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmConditionalOrderHistoryResponse.java index 73e91d38e..a659b80fb 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmConditionalOrderHistoryResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmConditionalOrderHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCmConditionalOrderHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCmConditionalOrderHistoryResponse { public static final String SERIALIZED_NAME_NEW_CLIENT_STRATEGY_ID = "newClientStrategyId"; @@ -183,7 +183,7 @@ public QueryCmConditionalOrderHistoryResponse newClientStrategyId( } /** - * Get newClientStrategyId + * New Client Strategy ID. * * @return newClientStrategyId */ @@ -203,7 +203,7 @@ public QueryCmConditionalOrderHistoryResponse strategyId( } /** - * Get strategyId + * Strategy ID. * * @return strategyId */ @@ -223,7 +223,7 @@ public QueryCmConditionalOrderHistoryResponse strategyStatus( } /** - * Get strategyStatus + * Strategy Status. * * @return strategyStatus */ @@ -243,7 +243,7 @@ public QueryCmConditionalOrderHistoryResponse strategyType( } /** - * Get strategyType + * Strategy Type. * * @return strategyType */ @@ -263,7 +263,7 @@ public QueryCmConditionalOrderHistoryResponse origQty( } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -282,7 +282,7 @@ public QueryCmConditionalOrderHistoryResponse price(@jakarta.annotation.Nullable } /** - * Get price + * Price. * * @return price */ @@ -302,7 +302,7 @@ public QueryCmConditionalOrderHistoryResponse reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -321,7 +321,7 @@ public QueryCmConditionalOrderHistoryResponse side(@jakarta.annotation.Nullable } /** - * Get side + * Side. * * @return side */ @@ -341,7 +341,7 @@ public QueryCmConditionalOrderHistoryResponse positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -361,7 +361,7 @@ public QueryCmConditionalOrderHistoryResponse stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -381,7 +381,7 @@ public QueryCmConditionalOrderHistoryResponse symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -401,7 +401,7 @@ public QueryCmConditionalOrderHistoryResponse orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable,only have when the strategy is triggered * * @return orderId */ @@ -421,7 +421,7 @@ public QueryCmConditionalOrderHistoryResponse status( } /** - * Get status + * Normal order status after trigger if appliable, only have when the strategy is triggered * * @return status */ @@ -441,7 +441,7 @@ public QueryCmConditionalOrderHistoryResponse bookTime( } /** - * Get bookTime + * order time * * @return bookTime */ @@ -461,7 +461,7 @@ public QueryCmConditionalOrderHistoryResponse updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -481,7 +481,7 @@ public QueryCmConditionalOrderHistoryResponse triggerTime( } /** - * Get triggerTime + * Trigger Time. * * @return triggerTime */ @@ -501,7 +501,7 @@ public QueryCmConditionalOrderHistoryResponse timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -520,7 +520,7 @@ public QueryCmConditionalOrderHistoryResponse type(@jakarta.annotation.Nullable } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -540,7 +540,7 @@ public QueryCmConditionalOrderHistoryResponse activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -560,7 +560,7 @@ public QueryCmConditionalOrderHistoryResponse priceRate( } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -580,7 +580,7 @@ public QueryCmConditionalOrderHistoryResponse workingType( } /** - * Get workingType + * Working Type. * * @return workingType */ @@ -600,7 +600,7 @@ public QueryCmConditionalOrderHistoryResponse priceProtect( } /** - * Get priceProtect + * Price Protect. * * @return priceProtect */ @@ -620,7 +620,7 @@ public QueryCmConditionalOrderHistoryResponse priceMatch( } /** - * Get priceMatch + * Price Match. * * @return priceMatch */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponse.java index 493350c40..1ed201fd8 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCmModifyOrderHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCmModifyOrderHistoryResponse extends ArrayList { public QueryCmModifyOrderHistoryResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponseInner.java index 92f681da2..da238575a 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** QueryCmModifyOrderHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCmModifyOrderHistoryResponseInner { public static final String SERIALIZED_NAME_AMENDMENT_ID = "amendmentId"; @@ -88,7 +88,7 @@ public QueryCmModifyOrderHistoryResponseInner amendmentId( } /** - * Get amendmentId + * Order modification ID * * @return amendmentId */ @@ -108,7 +108,7 @@ public QueryCmModifyOrderHistoryResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -127,7 +127,7 @@ public QueryCmModifyOrderHistoryResponseInner pair(@jakarta.annotation.Nullable } /** - * Get pair + * Pair. * * @return pair */ @@ -147,7 +147,7 @@ public QueryCmModifyOrderHistoryResponseInner orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -167,7 +167,7 @@ public QueryCmModifyOrderHistoryResponseInner clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -186,7 +186,7 @@ public QueryCmModifyOrderHistoryResponseInner time(@jakarta.annotation.Nullable } /** - * Get time + * Order modification time * * @return time */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponseInnerAmendment.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponseInnerAmendment.java index 0bcf16b9c..60b410441 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponseInnerAmendment.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponseInnerAmendment.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -32,10 +32,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** QueryCmModifyOrderHistoryResponseInnerAmendment */ +/** Amendment. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCmModifyOrderHistoryResponseInnerAmendment { public static final String SERIALIZED_NAME_PRICE = "price"; @@ -55,6 +55,12 @@ public class QueryCmModifyOrderHistoryResponseInnerAmendment { @jakarta.annotation.Nullable private Long count; + public static final String SERIALIZED_NAME_MODIFY_ID = "modifyId"; + + @SerializedName(SERIALIZED_NAME_MODIFY_ID) + @jakarta.annotation.Nullable + private Long modifyId; + public QueryCmModifyOrderHistoryResponseInnerAmendment() {} public QueryCmModifyOrderHistoryResponseInnerAmendment price( @@ -112,7 +118,7 @@ public QueryCmModifyOrderHistoryResponseInnerAmendment count( } /** - * Get count + * Order modification count, representing the number of times the order has been modified * * @return count */ @@ -125,6 +131,26 @@ public void setCount(@jakarta.annotation.Nullable Long count) { this.count = count; } + public QueryCmModifyOrderHistoryResponseInnerAmendment modifyId( + @jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + return this; + } + + /** + * user-defined modification identifier, only returned if provided in the request + * + * @return modifyId + */ + @jakarta.annotation.Nullable + public Long getModifyId() { + return modifyId; + } + + public void setModifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -139,13 +165,14 @@ public boolean equals(Object o) { return Objects.equals(this.price, queryCmModifyOrderHistoryResponseInnerAmendment.price) && Objects.equals( this.origQty, queryCmModifyOrderHistoryResponseInnerAmendment.origQty) + && Objects.equals(this.count, queryCmModifyOrderHistoryResponseInnerAmendment.count) && Objects.equals( - this.count, queryCmModifyOrderHistoryResponseInnerAmendment.count); + this.modifyId, queryCmModifyOrderHistoryResponseInnerAmendment.modifyId); } @Override public int hashCode() { - return Objects.hash(price, origQty, count); + return Objects.hash(price, origQty, count, modifyId); } @Override @@ -155,6 +182,7 @@ public String toString() { sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" modifyId: ").append(toIndentedString(modifyId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -174,6 +202,10 @@ public String toUrlQueryString() { String countValueAsString = ""; countValueAsString = countValue.toString(); sb.append("count=").append(urlEncode(countValueAsString)).append(""); + Object modifyIdValue = getModifyId(); + String modifyIdValueAsString = ""; + modifyIdValueAsString = modifyIdValue.toString(); + sb.append("modifyId=").append(urlEncode(modifyIdValueAsString)).append(""); return sb.toString(); } @@ -205,6 +237,7 @@ private String toIndentedString(Object o) { openapiFields.add("price"); openapiFields.add("origQty"); openapiFields.add("count"); + openapiFields.add("modifyId"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty.java index 4cce264a3..cb40e1930 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty */ +/** Orig Qty. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty { public static final String SERIALIZED_NAME_BEFORE = "before"; @@ -57,7 +57,7 @@ public QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty before( } /** - * Get before + * Before. * * @return before */ @@ -77,7 +77,7 @@ public QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty after( } /** - * Get after + * After. * * @return after */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponseInnerAmendmentPrice.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponseInnerAmendmentPrice.java index 3d2c2d6cf..455c25cbb 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponseInnerAmendmentPrice.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmModifyOrderHistoryResponseInnerAmendmentPrice.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** QueryCmModifyOrderHistoryResponseInnerAmendmentPrice */ +/** Price. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCmModifyOrderHistoryResponseInnerAmendmentPrice { public static final String SERIALIZED_NAME_BEFORE = "before"; @@ -57,7 +57,7 @@ public QueryCmModifyOrderHistoryResponseInnerAmendmentPrice before( } /** - * Get before + * Before. * * @return before */ @@ -77,7 +77,7 @@ public QueryCmModifyOrderHistoryResponseInnerAmendmentPrice after( } /** - * Get after + * After. * * @return after */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmOrderResponse.java index e7b6b7ac6..49081d433 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCmOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCmOrderResponse { public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; @@ -152,7 +152,7 @@ public QueryCmOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPric } /** - * Get avgPrice + * Avg Price. * * @return avgPrice */ @@ -171,7 +171,7 @@ public QueryCmOrderResponse clientOrderId(@jakarta.annotation.Nullable String cl } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -190,7 +190,7 @@ public QueryCmOrderResponse cumBase(@jakarta.annotation.Nullable String cumBase) } /** - * Get cumBase + * Cum Base. * * @return cumBase */ @@ -209,7 +209,7 @@ public QueryCmOrderResponse executedQty(@jakarta.annotation.Nullable String exec } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -228,7 +228,7 @@ public QueryCmOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -247,7 +247,7 @@ public QueryCmOrderResponse origQty(@jakarta.annotation.Nullable String origQty) } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -266,7 +266,7 @@ public QueryCmOrderResponse origType(@jakarta.annotation.Nullable String origTyp } /** - * Get origType + * Orig Type. * * @return origType */ @@ -285,7 +285,7 @@ public QueryCmOrderResponse price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Price. * * @return price */ @@ -304,7 +304,7 @@ public QueryCmOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean redu } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -323,7 +323,7 @@ public QueryCmOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Side. * * @return side */ @@ -342,7 +342,7 @@ public QueryCmOrderResponse status(@jakarta.annotation.Nullable String status) { } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -361,7 +361,7 @@ public QueryCmOrderResponse symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -380,7 +380,7 @@ public QueryCmOrderResponse pair(@jakarta.annotation.Nullable String pair) { } /** - * Get pair + * Pair. * * @return pair */ @@ -399,7 +399,7 @@ public QueryCmOrderResponse positionSide(@jakarta.annotation.Nullable String pos } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -418,7 +418,7 @@ public QueryCmOrderResponse time(@jakarta.annotation.Nullable Long time) { } /** - * Get time + * order time * * @return time */ @@ -437,7 +437,7 @@ public QueryCmOrderResponse timeInForce(@jakarta.annotation.Nullable String time } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -456,7 +456,7 @@ public QueryCmOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -475,7 +475,7 @@ public QueryCmOrderResponse updateTime(@jakarta.annotation.Nullable Long updateT } /** - * Get updateTime + * update time * * @return updateTime */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmPositionInformationResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmPositionInformationResponse.java index 1f7ef5dc4..d37bcdebb 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmPositionInformationResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmPositionInformationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCmPositionInformationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCmPositionInformationResponse extends ArrayList { public QueryCmPositionInformationResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmPositionInformationResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmPositionInformationResponseInner.java index 5baf9d209..54223f2a3 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmPositionInformationResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCmPositionInformationResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCmPositionInformationResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCmPositionInformationResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -111,7 +111,7 @@ public QueryCmPositionInformationResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -131,7 +131,7 @@ public QueryCmPositionInformationResponseInner positionAmt( } /** - * Get positionAmt + * position amount * * @return positionAmt */ @@ -151,7 +151,7 @@ public QueryCmPositionInformationResponseInner entryPrice( } /** - * Get entryPrice + * average entry price * * @return entryPrice */ @@ -171,7 +171,7 @@ public QueryCmPositionInformationResponseInner markPrice( } /** - * Get markPrice + * Mark Price. * * @return markPrice */ @@ -191,7 +191,7 @@ public QueryCmPositionInformationResponseInner unRealizedProfit( } /** - * Get unRealizedProfit + * Un Realized Profit. * * @return unRealizedProfit */ @@ -211,7 +211,7 @@ public QueryCmPositionInformationResponseInner liquidationPrice( } /** - * Get liquidationPrice + * Liquidation Price. * * @return liquidationPrice */ @@ -231,7 +231,7 @@ public QueryCmPositionInformationResponseInner leverage( } /** - * Get leverage + * current initial leverage * * @return leverage */ @@ -251,7 +251,7 @@ public QueryCmPositionInformationResponseInner positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -271,7 +271,7 @@ public QueryCmPositionInformationResponseInner updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -291,7 +291,7 @@ public QueryCmPositionInformationResponseInner maxQty( } /** - * Get maxQty + * maximum quantity of base asset * * @return maxQty */ @@ -311,7 +311,7 @@ public QueryCmPositionInformationResponseInner notionalValue( } /** - * Get notionalValue + * Notional Value. * * @return notionalValue */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentCmOpenConditionalOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentCmOpenConditionalOrderResponse.java index bf63fb5d1..c064eabcd 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentCmOpenConditionalOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentCmOpenConditionalOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCurrentCmOpenConditionalOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCurrentCmOpenConditionalOrderResponse { public static final String SERIALIZED_NAME_NEW_CLIENT_STRATEGY_ID = "newClientStrategyId"; @@ -141,7 +141,7 @@ public QueryCurrentCmOpenConditionalOrderResponse newClientStrategyId( } /** - * Get newClientStrategyId + * New Client Strategy ID. * * @return newClientStrategyId */ @@ -161,7 +161,7 @@ public QueryCurrentCmOpenConditionalOrderResponse strategyId( } /** - * Get strategyId + * Strategy ID. * * @return strategyId */ @@ -181,7 +181,7 @@ public QueryCurrentCmOpenConditionalOrderResponse strategyStatus( } /** - * Get strategyStatus + * Strategy Status. * * @return strategyStatus */ @@ -201,7 +201,7 @@ public QueryCurrentCmOpenConditionalOrderResponse strategyType( } /** - * Get strategyType + * Strategy Type. * * @return strategyType */ @@ -221,7 +221,7 @@ public QueryCurrentCmOpenConditionalOrderResponse origQty( } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -241,7 +241,7 @@ public QueryCurrentCmOpenConditionalOrderResponse price( } /** - * Get price + * Price. * * @return price */ @@ -261,7 +261,7 @@ public QueryCurrentCmOpenConditionalOrderResponse reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -281,7 +281,7 @@ public QueryCurrentCmOpenConditionalOrderResponse side( } /** - * Get side + * Side. * * @return side */ @@ -301,7 +301,7 @@ public QueryCurrentCmOpenConditionalOrderResponse positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -321,7 +321,7 @@ public QueryCurrentCmOpenConditionalOrderResponse stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -341,7 +341,7 @@ public QueryCurrentCmOpenConditionalOrderResponse symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -361,7 +361,7 @@ public QueryCurrentCmOpenConditionalOrderResponse bookTime( } /** - * Get bookTime + * order time * * @return bookTime */ @@ -381,7 +381,7 @@ public QueryCurrentCmOpenConditionalOrderResponse updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -401,7 +401,7 @@ public QueryCurrentCmOpenConditionalOrderResponse timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -421,7 +421,7 @@ public QueryCurrentCmOpenConditionalOrderResponse activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -441,7 +441,7 @@ public QueryCurrentCmOpenConditionalOrderResponse priceRate( } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentCmOpenOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentCmOpenOrderResponse.java index e258a8020..ba016a938 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentCmOpenOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentCmOpenOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCurrentCmOpenOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCurrentCmOpenOrderResponse extends ArrayList { public QueryCurrentCmOpenOrderResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentMarginOpenOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentMarginOpenOrderResponse.java index 0bfbc0f8c..b0fe22aff 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentMarginOpenOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentMarginOpenOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCurrentMarginOpenOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCurrentMarginOpenOrderResponse extends ArrayList { public QueryCurrentMarginOpenOrderResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentMarginOpenOrderResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentMarginOpenOrderResponseInner.java index 6545aa439..efb44186b 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentMarginOpenOrderResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentMarginOpenOrderResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCurrentMarginOpenOrderResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCurrentMarginOpenOrderResponseInner { public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -166,7 +166,7 @@ public QueryCurrentMarginOpenOrderResponseInner clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -186,7 +186,7 @@ public QueryCurrentMarginOpenOrderResponseInner cummulativeQuoteQty( } /** - * Get cummulativeQuoteQty + * Cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -206,7 +206,7 @@ public QueryCurrentMarginOpenOrderResponseInner executedQty( } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -226,7 +226,7 @@ public QueryCurrentMarginOpenOrderResponseInner icebergQty( } /** - * Get icebergQty + * Iceberg Qty. * * @return icebergQty */ @@ -246,7 +246,7 @@ public QueryCurrentMarginOpenOrderResponseInner isWorking( } /** - * Get isWorking + * Is Working. * * @return isWorking */ @@ -266,7 +266,7 @@ public QueryCurrentMarginOpenOrderResponseInner orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -286,7 +286,7 @@ public QueryCurrentMarginOpenOrderResponseInner origQty( } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -306,7 +306,7 @@ public QueryCurrentMarginOpenOrderResponseInner price( } /** - * Get price + * Price. * * @return price */ @@ -325,7 +325,7 @@ public QueryCurrentMarginOpenOrderResponseInner side(@jakarta.annotation.Nullabl } /** - * Get side + * Side. * * @return side */ @@ -345,7 +345,7 @@ public QueryCurrentMarginOpenOrderResponseInner status( } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -365,7 +365,7 @@ public QueryCurrentMarginOpenOrderResponseInner stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -385,7 +385,7 @@ public QueryCurrentMarginOpenOrderResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -404,7 +404,7 @@ public QueryCurrentMarginOpenOrderResponseInner time(@jakarta.annotation.Nullabl } /** - * Get time + * Event time. * * @return time */ @@ -424,7 +424,7 @@ public QueryCurrentMarginOpenOrderResponseInner timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -443,7 +443,7 @@ public QueryCurrentMarginOpenOrderResponseInner type(@jakarta.annotation.Nullabl } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -463,7 +463,7 @@ public QueryCurrentMarginOpenOrderResponseInner updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -483,7 +483,7 @@ public QueryCurrentMarginOpenOrderResponseInner accountId( } /** - * Get accountId + * Account ID. * * @return accountId */ @@ -503,7 +503,7 @@ public QueryCurrentMarginOpenOrderResponseInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -524,7 +524,7 @@ public QueryCurrentMarginOpenOrderResponseInner preventedMatchId( } /** - * Get preventedMatchId + * Prevented Match ID. * * @return preventedMatchId */ @@ -544,7 +544,7 @@ public QueryCurrentMarginOpenOrderResponseInner preventedQuantity( } /** - * Get preventedQuantity + * Prevented Quantity. * * @return preventedQuantity */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentUmOpenAlgoOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentUmOpenAlgoOrderResponse.java index f3099b82e..a079d5649 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentUmOpenAlgoOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentUmOpenAlgoOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCurrentUmOpenAlgoOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCurrentUmOpenAlgoOrderResponse { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; @@ -120,42 +120,6 @@ public class QueryCurrentUmOpenAlgoOrderResponse { @jakarta.annotation.Nullable private String price; - public static final String SERIALIZED_NAME_ICEBERG_QUANTITY = "icebergQuantity"; - - @SerializedName(SERIALIZED_NAME_ICEBERG_QUANTITY) - @jakarta.annotation.Nullable - private String icebergQuantity; - - public static final String SERIALIZED_NAME_TP_TRIGGER_PRICE = "tpTriggerPrice"; - - @SerializedName(SERIALIZED_NAME_TP_TRIGGER_PRICE) - @jakarta.annotation.Nullable - private String tpTriggerPrice; - - public static final String SERIALIZED_NAME_TP_PRICE = "tpPrice"; - - @SerializedName(SERIALIZED_NAME_TP_PRICE) - @jakarta.annotation.Nullable - private String tpPrice; - - public static final String SERIALIZED_NAME_SL_TRIGGER_PRICE = "slTriggerPrice"; - - @SerializedName(SERIALIZED_NAME_SL_TRIGGER_PRICE) - @jakarta.annotation.Nullable - private String slTriggerPrice; - - public static final String SERIALIZED_NAME_SL_PRICE = "slPrice"; - - @SerializedName(SERIALIZED_NAME_SL_PRICE) - @jakarta.annotation.Nullable - private String slPrice; - - public static final String SERIALIZED_NAME_TP_ORDER_TYPE = "tpOrderType"; - - @SerializedName(SERIALIZED_NAME_TP_ORDER_TYPE) - @jakarta.annotation.Nullable - private String tpOrderType; - public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = "selfTradePreventionMode"; @@ -495,126 +459,6 @@ public void setPrice(@jakarta.annotation.Nullable String price) { this.price = price; } - public QueryCurrentUmOpenAlgoOrderResponse icebergQuantity( - @jakarta.annotation.Nullable String icebergQuantity) { - this.icebergQuantity = icebergQuantity; - return this; - } - - /** - * Get icebergQuantity - * - * @return icebergQuantity - */ - @jakarta.annotation.Nullable - public String getIcebergQuantity() { - return icebergQuantity; - } - - public void setIcebergQuantity(@jakarta.annotation.Nullable String icebergQuantity) { - this.icebergQuantity = icebergQuantity; - } - - public QueryCurrentUmOpenAlgoOrderResponse tpTriggerPrice( - @jakarta.annotation.Nullable String tpTriggerPrice) { - this.tpTriggerPrice = tpTriggerPrice; - return this; - } - - /** - * Get tpTriggerPrice - * - * @return tpTriggerPrice - */ - @jakarta.annotation.Nullable - public String getTpTriggerPrice() { - return tpTriggerPrice; - } - - public void setTpTriggerPrice(@jakarta.annotation.Nullable String tpTriggerPrice) { - this.tpTriggerPrice = tpTriggerPrice; - } - - public QueryCurrentUmOpenAlgoOrderResponse tpPrice( - @jakarta.annotation.Nullable String tpPrice) { - this.tpPrice = tpPrice; - return this; - } - - /** - * Get tpPrice - * - * @return tpPrice - */ - @jakarta.annotation.Nullable - public String getTpPrice() { - return tpPrice; - } - - public void setTpPrice(@jakarta.annotation.Nullable String tpPrice) { - this.tpPrice = tpPrice; - } - - public QueryCurrentUmOpenAlgoOrderResponse slTriggerPrice( - @jakarta.annotation.Nullable String slTriggerPrice) { - this.slTriggerPrice = slTriggerPrice; - return this; - } - - /** - * Get slTriggerPrice - * - * @return slTriggerPrice - */ - @jakarta.annotation.Nullable - public String getSlTriggerPrice() { - return slTriggerPrice; - } - - public void setSlTriggerPrice(@jakarta.annotation.Nullable String slTriggerPrice) { - this.slTriggerPrice = slTriggerPrice; - } - - public QueryCurrentUmOpenAlgoOrderResponse slPrice( - @jakarta.annotation.Nullable String slPrice) { - this.slPrice = slPrice; - return this; - } - - /** - * Get slPrice - * - * @return slPrice - */ - @jakarta.annotation.Nullable - public String getSlPrice() { - return slPrice; - } - - public void setSlPrice(@jakarta.annotation.Nullable String slPrice) { - this.slPrice = slPrice; - } - - public QueryCurrentUmOpenAlgoOrderResponse tpOrderType( - @jakarta.annotation.Nullable String tpOrderType) { - this.tpOrderType = tpOrderType; - return this; - } - - /** - * Get tpOrderType - * - * @return tpOrderType - */ - @jakarta.annotation.Nullable - public String getTpOrderType() { - return tpOrderType; - } - - public void setTpOrderType(@jakarta.annotation.Nullable String tpOrderType) { - this.tpOrderType = tpOrderType; - } - public QueryCurrentUmOpenAlgoOrderResponse selfTradePreventionMode( @jakarta.annotation.Nullable String selfTradePreventionMode) { this.selfTradePreventionMode = selfTradePreventionMode; @@ -844,15 +688,6 @@ public boolean equals(Object o) { && Objects.equals( this.triggerPrice, queryCurrentUmOpenAlgoOrderResponse.triggerPrice) && Objects.equals(this.price, queryCurrentUmOpenAlgoOrderResponse.price) - && Objects.equals( - this.icebergQuantity, queryCurrentUmOpenAlgoOrderResponse.icebergQuantity) - && Objects.equals( - this.tpTriggerPrice, queryCurrentUmOpenAlgoOrderResponse.tpTriggerPrice) - && Objects.equals(this.tpPrice, queryCurrentUmOpenAlgoOrderResponse.tpPrice) - && Objects.equals( - this.slTriggerPrice, queryCurrentUmOpenAlgoOrderResponse.slTriggerPrice) - && Objects.equals(this.slPrice, queryCurrentUmOpenAlgoOrderResponse.slPrice) - && Objects.equals(this.tpOrderType, queryCurrentUmOpenAlgoOrderResponse.tpOrderType) && Objects.equals( this.selfTradePreventionMode, queryCurrentUmOpenAlgoOrderResponse.selfTradePreventionMode) @@ -887,12 +722,6 @@ public int hashCode() { actualPrice, triggerPrice, price, - icebergQuantity, - tpTriggerPrice, - tpPrice, - slTriggerPrice, - slPrice, - tpOrderType, selfTradePreventionMode, workingType, priceMatch, @@ -923,12 +752,6 @@ public String toString() { sb.append(" actualPrice: ").append(toIndentedString(actualPrice)).append("\n"); sb.append(" triggerPrice: ").append(toIndentedString(triggerPrice)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" icebergQuantity: ").append(toIndentedString(icebergQuantity)).append("\n"); - sb.append(" tpTriggerPrice: ").append(toIndentedString(tpTriggerPrice)).append("\n"); - sb.append(" tpPrice: ").append(toIndentedString(tpPrice)).append("\n"); - sb.append(" slTriggerPrice: ").append(toIndentedString(slTriggerPrice)).append("\n"); - sb.append(" slPrice: ").append(toIndentedString(slPrice)).append("\n"); - sb.append(" tpOrderType: ").append(toIndentedString(tpOrderType)).append("\n"); sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); @@ -1004,30 +827,6 @@ public String toUrlQueryString() { String priceValueAsString = ""; priceValueAsString = priceValue.toString(); sb.append("price=").append(urlEncode(priceValueAsString)).append(""); - Object icebergQuantityValue = getIcebergQuantity(); - String icebergQuantityValueAsString = ""; - icebergQuantityValueAsString = icebergQuantityValue.toString(); - sb.append("icebergQuantity=").append(urlEncode(icebergQuantityValueAsString)).append(""); - Object tpTriggerPriceValue = getTpTriggerPrice(); - String tpTriggerPriceValueAsString = ""; - tpTriggerPriceValueAsString = tpTriggerPriceValue.toString(); - sb.append("tpTriggerPrice=").append(urlEncode(tpTriggerPriceValueAsString)).append(""); - Object tpPriceValue = getTpPrice(); - String tpPriceValueAsString = ""; - tpPriceValueAsString = tpPriceValue.toString(); - sb.append("tpPrice=").append(urlEncode(tpPriceValueAsString)).append(""); - Object slTriggerPriceValue = getSlTriggerPrice(); - String slTriggerPriceValueAsString = ""; - slTriggerPriceValueAsString = slTriggerPriceValue.toString(); - sb.append("slTriggerPrice=").append(urlEncode(slTriggerPriceValueAsString)).append(""); - Object slPriceValue = getSlPrice(); - String slPriceValueAsString = ""; - slPriceValueAsString = slPriceValue.toString(); - sb.append("slPrice=").append(urlEncode(slPriceValueAsString)).append(""); - Object tpOrderTypeValue = getTpOrderType(); - String tpOrderTypeValueAsString = ""; - tpOrderTypeValueAsString = tpOrderTypeValue.toString(); - sb.append("tpOrderType=").append(urlEncode(tpOrderTypeValueAsString)).append(""); Object selfTradePreventionModeValue = getSelfTradePreventionMode(); String selfTradePreventionModeValueAsString = ""; selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); @@ -1112,12 +911,6 @@ private String toIndentedString(Object o) { openapiFields.add("actualPrice"); openapiFields.add("triggerPrice"); openapiFields.add("price"); - openapiFields.add("icebergQuantity"); - openapiFields.add("tpTriggerPrice"); - openapiFields.add("tpPrice"); - openapiFields.add("slTriggerPrice"); - openapiFields.add("slPrice"); - openapiFields.add("tpOrderType"); openapiFields.add("selfTradePreventionMode"); openapiFields.add("workingType"); openapiFields.add("priceMatch"); @@ -1257,54 +1050,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("price").toString())); } - if ((jsonObj.get("icebergQuantity") != null && !jsonObj.get("icebergQuantity").isJsonNull()) - && !jsonObj.get("icebergQuantity").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `icebergQuantity` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("icebergQuantity").toString())); - } - if ((jsonObj.get("tpTriggerPrice") != null && !jsonObj.get("tpTriggerPrice").isJsonNull()) - && !jsonObj.get("tpTriggerPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tpTriggerPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("tpTriggerPrice").toString())); - } - if ((jsonObj.get("tpPrice") != null && !jsonObj.get("tpPrice").isJsonNull()) - && !jsonObj.get("tpPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tpPrice` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("tpPrice").toString())); - } - if ((jsonObj.get("slTriggerPrice") != null && !jsonObj.get("slTriggerPrice").isJsonNull()) - && !jsonObj.get("slTriggerPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `slTriggerPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("slTriggerPrice").toString())); - } - if ((jsonObj.get("slPrice") != null && !jsonObj.get("slPrice").isJsonNull()) - && !jsonObj.get("slPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `slPrice` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("slPrice").toString())); - } - if ((jsonObj.get("tpOrderType") != null && !jsonObj.get("tpOrderType").isJsonNull()) - && !jsonObj.get("tpOrderType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tpOrderType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("tpOrderType").toString())); - } if ((jsonObj.get("selfTradePreventionMode") != null && !jsonObj.get("selfTradePreventionMode").isJsonNull()) && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentUmOpenConditionalOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentUmOpenConditionalOrderResponse.java index 76901dadc..5e15f9315 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentUmOpenConditionalOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentUmOpenConditionalOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCurrentUmOpenConditionalOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCurrentUmOpenConditionalOrderResponse { public static final String SERIALIZED_NAME_NEW_CLIENT_STRATEGY_ID = "newClientStrategyId"; @@ -160,7 +160,7 @@ public QueryCurrentUmOpenConditionalOrderResponse newClientStrategyId( } /** - * Get newClientStrategyId + * New Client Strategy ID. * * @return newClientStrategyId */ @@ -180,7 +180,7 @@ public QueryCurrentUmOpenConditionalOrderResponse strategyId( } /** - * Get strategyId + * Strategy ID. * * @return strategyId */ @@ -200,7 +200,7 @@ public QueryCurrentUmOpenConditionalOrderResponse strategyStatus( } /** - * Get strategyStatus + * Strategy Status. * * @return strategyStatus */ @@ -220,7 +220,7 @@ public QueryCurrentUmOpenConditionalOrderResponse strategyType( } /** - * Get strategyType + * Strategy Type. * * @return strategyType */ @@ -240,7 +240,7 @@ public QueryCurrentUmOpenConditionalOrderResponse origQty( } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -260,7 +260,7 @@ public QueryCurrentUmOpenConditionalOrderResponse price( } /** - * Get price + * Price. * * @return price */ @@ -280,7 +280,7 @@ public QueryCurrentUmOpenConditionalOrderResponse reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -300,7 +300,7 @@ public QueryCurrentUmOpenConditionalOrderResponse side( } /** - * Get side + * Side. * * @return side */ @@ -320,7 +320,7 @@ public QueryCurrentUmOpenConditionalOrderResponse positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -340,7 +340,7 @@ public QueryCurrentUmOpenConditionalOrderResponse stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -360,7 +360,7 @@ public QueryCurrentUmOpenConditionalOrderResponse symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -380,7 +380,7 @@ public QueryCurrentUmOpenConditionalOrderResponse bookTime( } /** - * Get bookTime + * order time * * @return bookTime */ @@ -400,7 +400,7 @@ public QueryCurrentUmOpenConditionalOrderResponse updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -420,7 +420,7 @@ public QueryCurrentUmOpenConditionalOrderResponse timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -440,7 +440,7 @@ public QueryCurrentUmOpenConditionalOrderResponse activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -460,7 +460,7 @@ public QueryCurrentUmOpenConditionalOrderResponse priceRate( } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -480,7 +480,7 @@ public QueryCurrentUmOpenConditionalOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -501,7 +501,7 @@ public QueryCurrentUmOpenConditionalOrderResponse goodTillDate( } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ @@ -521,7 +521,7 @@ public QueryCurrentUmOpenConditionalOrderResponse priceMatch( } /** - * Get priceMatch + * Price Match. * * @return priceMatch */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentUmOpenOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentUmOpenOrderResponse.java index 012ff52ab..890e6e816 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentUmOpenOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryCurrentUmOpenOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCurrentUmOpenOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCurrentUmOpenOrderResponse { public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; @@ -165,7 +165,7 @@ public QueryCurrentUmOpenOrderResponse avgPrice(@jakarta.annotation.Nullable Str } /** - * Get avgPrice + * Avg Price. * * @return avgPrice */ @@ -185,7 +185,7 @@ public QueryCurrentUmOpenOrderResponse clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -204,7 +204,7 @@ public QueryCurrentUmOpenOrderResponse cumQuote(@jakarta.annotation.Nullable Str } /** - * Get cumQuote + * Cum Quote. * * @return cumQuote */ @@ -224,7 +224,7 @@ public QueryCurrentUmOpenOrderResponse executedQty( } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -243,7 +243,7 @@ public QueryCurrentUmOpenOrderResponse orderId(@jakarta.annotation.Nullable Long } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -262,7 +262,7 @@ public QueryCurrentUmOpenOrderResponse origQty(@jakarta.annotation.Nullable Stri } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -281,7 +281,7 @@ public QueryCurrentUmOpenOrderResponse origType(@jakarta.annotation.Nullable Str } /** - * Get origType + * Orig Type. * * @return origType */ @@ -300,7 +300,7 @@ public QueryCurrentUmOpenOrderResponse price(@jakarta.annotation.Nullable String } /** - * Get price + * Price. * * @return price */ @@ -320,7 +320,7 @@ public QueryCurrentUmOpenOrderResponse reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -339,7 +339,7 @@ public QueryCurrentUmOpenOrderResponse side(@jakarta.annotation.Nullable String } /** - * Get side + * Side. * * @return side */ @@ -359,7 +359,7 @@ public QueryCurrentUmOpenOrderResponse positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -378,7 +378,7 @@ public QueryCurrentUmOpenOrderResponse status(@jakarta.annotation.Nullable Strin } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -397,7 +397,7 @@ public QueryCurrentUmOpenOrderResponse symbol(@jakarta.annotation.Nullable Strin } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -416,7 +416,7 @@ public QueryCurrentUmOpenOrderResponse time(@jakarta.annotation.Nullable Long ti } /** - * Get time + * order time * * @return time */ @@ -436,7 +436,7 @@ public QueryCurrentUmOpenOrderResponse timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -455,7 +455,7 @@ public QueryCurrentUmOpenOrderResponse type(@jakarta.annotation.Nullable String } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -475,7 +475,7 @@ public QueryCurrentUmOpenOrderResponse updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -495,7 +495,7 @@ public QueryCurrentUmOpenOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -516,7 +516,7 @@ public QueryCurrentUmOpenOrderResponse goodTillDate( } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ @@ -536,7 +536,7 @@ public QueryCurrentUmOpenOrderResponse priceMatch( } /** - * Get priceMatch + * Price Match. * * @return priceMatch */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountOrderResponse.java index 2e0d3bf42..66e911287 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountOrderResponse { public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -166,7 +166,7 @@ public QueryMarginAccountOrderResponse clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -186,7 +186,7 @@ public QueryMarginAccountOrderResponse cummulativeQuoteQty( } /** - * Get cummulativeQuoteQty + * Cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -206,7 +206,7 @@ public QueryMarginAccountOrderResponse executedQty( } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -226,7 +226,7 @@ public QueryMarginAccountOrderResponse icebergQty( } /** - * Get icebergQty + * Iceberg Qty. * * @return icebergQty */ @@ -246,7 +246,7 @@ public QueryMarginAccountOrderResponse isWorking( } /** - * Get isWorking + * Is Working. * * @return isWorking */ @@ -265,7 +265,7 @@ public QueryMarginAccountOrderResponse orderId(@jakarta.annotation.Nullable Long } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -284,7 +284,7 @@ public QueryMarginAccountOrderResponse origQty(@jakarta.annotation.Nullable Stri } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -303,7 +303,7 @@ public QueryMarginAccountOrderResponse price(@jakarta.annotation.Nullable String } /** - * Get price + * Price. * * @return price */ @@ -322,7 +322,7 @@ public QueryMarginAccountOrderResponse side(@jakarta.annotation.Nullable String } /** - * Get side + * Side. * * @return side */ @@ -341,7 +341,7 @@ public QueryMarginAccountOrderResponse status(@jakarta.annotation.Nullable Strin } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -361,7 +361,7 @@ public QueryMarginAccountOrderResponse stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -380,7 +380,7 @@ public QueryMarginAccountOrderResponse symbol(@jakarta.annotation.Nullable Strin } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -399,7 +399,7 @@ public QueryMarginAccountOrderResponse time(@jakarta.annotation.Nullable Long ti } /** - * Get time + * Event time. * * @return time */ @@ -419,7 +419,7 @@ public QueryMarginAccountOrderResponse timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -438,7 +438,7 @@ public QueryMarginAccountOrderResponse type(@jakarta.annotation.Nullable String } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -458,7 +458,7 @@ public QueryMarginAccountOrderResponse updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -477,7 +477,7 @@ public QueryMarginAccountOrderResponse accountId(@jakarta.annotation.Nullable Lo } /** - * Get accountId + * Account ID. * * @return accountId */ @@ -497,7 +497,7 @@ public QueryMarginAccountOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -518,7 +518,7 @@ public QueryMarginAccountOrderResponse preventedMatchId( } /** - * Get preventedMatchId + * Prevented Match ID. * * @return preventedMatchId */ @@ -538,7 +538,7 @@ public QueryMarginAccountOrderResponse preventedQuantity( } /** - * Get preventedQuantity + * Prevented Quantity. * * @return preventedQuantity */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsAllOcoResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsAllOcoResponse.java index 304fd5c77..1445fbff0 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsAllOcoResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsAllOcoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountsAllOcoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsAllOcoResponse extends ArrayList { public QueryMarginAccountsAllOcoResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsAllOcoResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsAllOcoResponseInner.java index f43186968..9a078fbfa 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsAllOcoResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsAllOcoResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryMarginAccountsAllOcoResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsAllOcoResponseInner { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; @@ -99,7 +99,7 @@ public QueryMarginAccountsAllOcoResponseInner orderListId( } /** - * Get orderListId + * Order List ID. * * @return orderListId */ @@ -119,7 +119,7 @@ public QueryMarginAccountsAllOcoResponseInner contingencyType( } /** - * Get contingencyType + * Contingency Type. * * @return contingencyType */ @@ -139,7 +139,7 @@ public QueryMarginAccountsAllOcoResponseInner listStatusType( } /** - * Get listStatusType + * List Status Type. * * @return listStatusType */ @@ -159,7 +159,7 @@ public QueryMarginAccountsAllOcoResponseInner listOrderStatus( } /** - * Get listOrderStatus + * List Order Status. * * @return listOrderStatus */ @@ -179,7 +179,7 @@ public QueryMarginAccountsAllOcoResponseInner listClientOrderId( } /** - * Get listClientOrderId + * List Client Order ID. * * @return listClientOrderId */ @@ -199,7 +199,7 @@ public QueryMarginAccountsAllOcoResponseInner transactionTime( } /** - * Get transactionTime + * Transaction Time. * * @return transactionTime */ @@ -219,7 +219,7 @@ public QueryMarginAccountsAllOcoResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -249,7 +249,7 @@ public QueryMarginAccountsAllOcoResponseInner addOrdersItem( } /** - * Get orders + * Orders. * * @return orders */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsAllOcoResponseInnerOrdersInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsAllOcoResponseInnerOrdersInner.java index 1f477c4e5..070a924c9 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsAllOcoResponseInnerOrdersInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsAllOcoResponseInnerOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountsAllOcoResponseInnerOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsAllOcoResponseInnerOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public QueryMarginAccountsAllOcoResponseInnerOrdersInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -83,7 +83,7 @@ public QueryMarginAccountsAllOcoResponseInnerOrdersInner orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -103,7 +103,7 @@ public QueryMarginAccountsAllOcoResponseInnerOrdersInner clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOcoResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOcoResponse.java index 476dd9a94..61d04e05a 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOcoResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOcoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryMarginAccountsOcoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsOcoResponse { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; @@ -99,7 +99,7 @@ public QueryMarginAccountsOcoResponse orderListId( } /** - * Get orderListId + * Order List ID. * * @return orderListId */ @@ -119,7 +119,7 @@ public QueryMarginAccountsOcoResponse contingencyType( } /** - * Get contingencyType + * Contingency Type. * * @return contingencyType */ @@ -139,7 +139,7 @@ public QueryMarginAccountsOcoResponse listStatusType( } /** - * Get listStatusType + * List Status Type. * * @return listStatusType */ @@ -159,7 +159,7 @@ public QueryMarginAccountsOcoResponse listOrderStatus( } /** - * Get listOrderStatus + * List Order Status. * * @return listOrderStatus */ @@ -179,7 +179,7 @@ public QueryMarginAccountsOcoResponse listClientOrderId( } /** - * Get listClientOrderId + * List Client Order ID. * * @return listClientOrderId */ @@ -199,7 +199,7 @@ public QueryMarginAccountsOcoResponse transactionTime( } /** - * Get transactionTime + * Transaction Time. * * @return transactionTime */ @@ -218,7 +218,7 @@ public QueryMarginAccountsOcoResponse symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -248,7 +248,7 @@ public QueryMarginAccountsOcoResponse addOrdersItem( } /** - * Get orders + * Orders. * * @return orders */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOcoResponseOrdersInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOcoResponseOrdersInner.java index a121dbcb7..3e2c52354 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOcoResponseOrdersInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOcoResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountsOcoResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsOcoResponseOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public QueryMarginAccountsOcoResponseOrdersInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -83,7 +83,7 @@ public QueryMarginAccountsOcoResponseOrdersInner orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -103,7 +103,7 @@ public QueryMarginAccountsOcoResponseOrdersInner clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOpenOcoResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOpenOcoResponse.java index e044274f8..bf580566d 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOpenOcoResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOpenOcoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountsOpenOcoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsOpenOcoResponse extends ArrayList { public QueryMarginAccountsOpenOcoResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOpenOcoResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOpenOcoResponseInner.java index 5eee80938..0cf4b7e75 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOpenOcoResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOpenOcoResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryMarginAccountsOpenOcoResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsOpenOcoResponseInner { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; @@ -99,7 +99,7 @@ public QueryMarginAccountsOpenOcoResponseInner orderListId( } /** - * Get orderListId + * Order List ID. * * @return orderListId */ @@ -119,7 +119,7 @@ public QueryMarginAccountsOpenOcoResponseInner contingencyType( } /** - * Get contingencyType + * Contingency Type. * * @return contingencyType */ @@ -139,7 +139,7 @@ public QueryMarginAccountsOpenOcoResponseInner listStatusType( } /** - * Get listStatusType + * List Status Type. * * @return listStatusType */ @@ -159,7 +159,7 @@ public QueryMarginAccountsOpenOcoResponseInner listOrderStatus( } /** - * Get listOrderStatus + * List Order Status. * * @return listOrderStatus */ @@ -179,7 +179,7 @@ public QueryMarginAccountsOpenOcoResponseInner listClientOrderId( } /** - * Get listClientOrderId + * List Client Order ID. * * @return listClientOrderId */ @@ -199,7 +199,7 @@ public QueryMarginAccountsOpenOcoResponseInner transactionTime( } /** - * Get transactionTime + * Transaction Time. * * @return transactionTime */ @@ -219,7 +219,7 @@ public QueryMarginAccountsOpenOcoResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -249,7 +249,7 @@ public QueryMarginAccountsOpenOcoResponseInner addOrdersItem( } /** - * Get orders + * Orders. * * @return orders */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOpenOcoResponseInnerOrdersInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOpenOcoResponseInnerOrdersInner.java index 99198a2b6..a1d294381 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOpenOcoResponseInnerOrdersInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginAccountsOpenOcoResponseInnerOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountsOpenOcoResponseInnerOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsOpenOcoResponseInnerOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public QueryMarginAccountsOpenOcoResponseInnerOrdersInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -83,7 +83,7 @@ public QueryMarginAccountsOpenOcoResponseInnerOrdersInner orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -103,7 +103,7 @@ public QueryMarginAccountsOpenOcoResponseInnerOrdersInner clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginLoanRecordResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginLoanRecordResponse.java index cf0699011..3a2dbc13b 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginLoanRecordResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginLoanRecordResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryMarginLoanRecordResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginLoanRecordResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; @@ -72,7 +72,7 @@ public QueryMarginLoanRecordResponse addRowsItem( } /** - * Get rows + * Rows. * * @return rows */ @@ -93,7 +93,7 @@ public QueryMarginLoanRecordResponse total(@jakarta.annotation.Nullable Long tot } /** - * Get total + * Total. * * @return total */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginLoanRecordResponseRowsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginLoanRecordResponseRowsInner.java index d6e867eef..2c588e8c5 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginLoanRecordResponseRowsInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginLoanRecordResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginLoanRecordResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginLoanRecordResponseRowsInner { public static final String SERIALIZED_NAME_TX_ID = "txId"; @@ -74,7 +74,7 @@ public QueryMarginLoanRecordResponseRowsInner txId(@jakarta.annotation.Nullable } /** - * Get txId + * Tx ID. * * @return txId */ @@ -93,7 +93,7 @@ public QueryMarginLoanRecordResponseRowsInner asset(@jakarta.annotation.Nullable } /** - * Get asset + * asset name * * @return asset */ @@ -113,7 +113,7 @@ public QueryMarginLoanRecordResponseRowsInner principal( } /** - * Get principal + * Principal repaid * * @return principal */ @@ -133,7 +133,7 @@ public QueryMarginLoanRecordResponseRowsInner timestamp( } /** - * Get timestamp + * Timestamp. * * @return timestamp */ @@ -153,7 +153,8 @@ public QueryMarginLoanRecordResponseRowsInner status( } /** - * Get status + * one of PENDING (pending execution), CONFIRMED (successfully loaned), FAILED (execution + * failed, nothing happened to your account); * * @return status */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginMaxWithdrawResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginMaxWithdrawResponse.java index 619b2c0c2..27de9458b 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginMaxWithdrawResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginMaxWithdrawResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginMaxWithdrawResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginMaxWithdrawResponse { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -50,7 +50,7 @@ public QueryMarginMaxWithdrawResponse amount(@jakarta.annotation.Nullable String } /** - * Get amount + * account's currently max withdrawable amount with sufficient system availability * * @return amount */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginRepayRecordResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginRepayRecordResponse.java index 6de9059de..e5835cdb8 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginRepayRecordResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginRepayRecordResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryMarginRepayRecordResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginRepayRecordResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; @@ -73,7 +73,7 @@ public QueryMarginRepayRecordResponse addRowsItem( } /** - * Get rows + * Rows. * * @return rows */ @@ -95,7 +95,7 @@ public QueryMarginRepayRecordResponse total(@jakarta.annotation.Nullable Long to } /** - * Get total + * Total. * * @return total */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginRepayRecordResponseRowsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginRepayRecordResponseRowsInner.java index abaa1b6b2..c89c6c56d 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginRepayRecordResponseRowsInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryMarginRepayRecordResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginRepayRecordResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginRepayRecordResponseRowsInner { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -87,7 +87,7 @@ public QueryMarginRepayRecordResponseRowsInner amount( } /** - * Get amount + * Total amount repaid * * @return amount */ @@ -107,7 +107,7 @@ public QueryMarginRepayRecordResponseRowsInner asset( } /** - * Get asset + * asset name * * @return asset */ @@ -127,7 +127,7 @@ public QueryMarginRepayRecordResponseRowsInner interest( } /** - * Get interest + * Interest repaid * * @return interest */ @@ -147,7 +147,7 @@ public QueryMarginRepayRecordResponseRowsInner principal( } /** - * Get principal + * Principal repaid * * @return principal */ @@ -167,7 +167,8 @@ public QueryMarginRepayRecordResponseRowsInner status( } /** - * Get status + * one of PENDING (pending execution), CONFIRMED (successfully execution), FAILED (execution + * failed, nothing happened to your account) * * @return status */ @@ -187,7 +188,7 @@ public QueryMarginRepayRecordResponseRowsInner timestamp( } /** - * Get timestamp + * Timestamp. * * @return timestamp */ @@ -206,7 +207,7 @@ public QueryMarginRepayRecordResponseRowsInner txId(@jakarta.annotation.Nullable } /** - * Get txId + * Tx ID. * * @return txId */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryPortfolioMarginNegativeBalanceInterestHistoryResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryPortfolioMarginNegativeBalanceInterestHistoryResponse.java index 2ce26125e..221f48237 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryPortfolioMarginNegativeBalanceInterestHistoryResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryPortfolioMarginNegativeBalanceInterestHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryPortfolioMarginNegativeBalanceInterestHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryPortfolioMarginNegativeBalanceInterestHistoryResponse extends ArrayList { public QueryPortfolioMarginNegativeBalanceInterestHistoryResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner.java index 065626ea9..0ed2ce7dd 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -75,7 +75,7 @@ public QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner asset( } /** - * Get asset + * asset name * * @return asset */ @@ -95,7 +95,7 @@ public QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner interest( } /** - * Get interest + * interest amount * * @return interest */ @@ -115,7 +115,7 @@ public QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner interestA } /** - * Get interestAccuredTime + * Interest Accured Time. * * @return interestAccuredTime */ @@ -135,7 +135,7 @@ public QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner interestR } /** - * Get interestRate + * daily interest rate * * @return interestRate */ @@ -155,7 +155,7 @@ public QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner principal } /** - * Get principal + * Principal repaid * * @return principal */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmAlgoOrderHistoryResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmAlgoOrderHistoryResponse.java index ddbbf6a5a..e9bcb0753 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmAlgoOrderHistoryResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmAlgoOrderHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUmAlgoOrderHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUmAlgoOrderHistoryResponse extends ArrayList { public QueryUmAlgoOrderHistoryResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmAlgoOrderHistoryResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmAlgoOrderHistoryResponseInner.java index 8b55acee6..9c35d333b 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmAlgoOrderHistoryResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmAlgoOrderHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUmAlgoOrderHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUmAlgoOrderHistoryResponseInner { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; @@ -120,42 +120,6 @@ public class QueryUmAlgoOrderHistoryResponseInner { @jakarta.annotation.Nullable private String price; - public static final String SERIALIZED_NAME_ICEBERG_QUANTITY = "icebergQuantity"; - - @SerializedName(SERIALIZED_NAME_ICEBERG_QUANTITY) - @jakarta.annotation.Nullable - private String icebergQuantity; - - public static final String SERIALIZED_NAME_TP_TRIGGER_PRICE = "tpTriggerPrice"; - - @SerializedName(SERIALIZED_NAME_TP_TRIGGER_PRICE) - @jakarta.annotation.Nullable - private String tpTriggerPrice; - - public static final String SERIALIZED_NAME_TP_PRICE = "tpPrice"; - - @SerializedName(SERIALIZED_NAME_TP_PRICE) - @jakarta.annotation.Nullable - private String tpPrice; - - public static final String SERIALIZED_NAME_SL_TRIGGER_PRICE = "slTriggerPrice"; - - @SerializedName(SERIALIZED_NAME_SL_TRIGGER_PRICE) - @jakarta.annotation.Nullable - private String slTriggerPrice; - - public static final String SERIALIZED_NAME_SL_PRICE = "slPrice"; - - @SerializedName(SERIALIZED_NAME_SL_PRICE) - @jakarta.annotation.Nullable - private String slPrice; - - public static final String SERIALIZED_NAME_TP_ORDER_TYPE = "tpOrderType"; - - @SerializedName(SERIALIZED_NAME_TP_ORDER_TYPE) - @jakarta.annotation.Nullable - private String tpOrderType; - public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = "selfTradePreventionMode"; @@ -495,126 +459,6 @@ public void setPrice(@jakarta.annotation.Nullable String price) { this.price = price; } - public QueryUmAlgoOrderHistoryResponseInner icebergQuantity( - @jakarta.annotation.Nullable String icebergQuantity) { - this.icebergQuantity = icebergQuantity; - return this; - } - - /** - * Get icebergQuantity - * - * @return icebergQuantity - */ - @jakarta.annotation.Nullable - public String getIcebergQuantity() { - return icebergQuantity; - } - - public void setIcebergQuantity(@jakarta.annotation.Nullable String icebergQuantity) { - this.icebergQuantity = icebergQuantity; - } - - public QueryUmAlgoOrderHistoryResponseInner tpTriggerPrice( - @jakarta.annotation.Nullable String tpTriggerPrice) { - this.tpTriggerPrice = tpTriggerPrice; - return this; - } - - /** - * Get tpTriggerPrice - * - * @return tpTriggerPrice - */ - @jakarta.annotation.Nullable - public String getTpTriggerPrice() { - return tpTriggerPrice; - } - - public void setTpTriggerPrice(@jakarta.annotation.Nullable String tpTriggerPrice) { - this.tpTriggerPrice = tpTriggerPrice; - } - - public QueryUmAlgoOrderHistoryResponseInner tpPrice( - @jakarta.annotation.Nullable String tpPrice) { - this.tpPrice = tpPrice; - return this; - } - - /** - * Get tpPrice - * - * @return tpPrice - */ - @jakarta.annotation.Nullable - public String getTpPrice() { - return tpPrice; - } - - public void setTpPrice(@jakarta.annotation.Nullable String tpPrice) { - this.tpPrice = tpPrice; - } - - public QueryUmAlgoOrderHistoryResponseInner slTriggerPrice( - @jakarta.annotation.Nullable String slTriggerPrice) { - this.slTriggerPrice = slTriggerPrice; - return this; - } - - /** - * Get slTriggerPrice - * - * @return slTriggerPrice - */ - @jakarta.annotation.Nullable - public String getSlTriggerPrice() { - return slTriggerPrice; - } - - public void setSlTriggerPrice(@jakarta.annotation.Nullable String slTriggerPrice) { - this.slTriggerPrice = slTriggerPrice; - } - - public QueryUmAlgoOrderHistoryResponseInner slPrice( - @jakarta.annotation.Nullable String slPrice) { - this.slPrice = slPrice; - return this; - } - - /** - * Get slPrice - * - * @return slPrice - */ - @jakarta.annotation.Nullable - public String getSlPrice() { - return slPrice; - } - - public void setSlPrice(@jakarta.annotation.Nullable String slPrice) { - this.slPrice = slPrice; - } - - public QueryUmAlgoOrderHistoryResponseInner tpOrderType( - @jakarta.annotation.Nullable String tpOrderType) { - this.tpOrderType = tpOrderType; - return this; - } - - /** - * Get tpOrderType - * - * @return tpOrderType - */ - @jakarta.annotation.Nullable - public String getTpOrderType() { - return tpOrderType; - } - - public void setTpOrderType(@jakarta.annotation.Nullable String tpOrderType) { - this.tpOrderType = tpOrderType; - } - public QueryUmAlgoOrderHistoryResponseInner selfTradePreventionMode( @jakarta.annotation.Nullable String selfTradePreventionMode) { this.selfTradePreventionMode = selfTradePreventionMode; @@ -846,16 +690,6 @@ public boolean equals(Object o) { && Objects.equals( this.triggerPrice, queryUmAlgoOrderHistoryResponseInner.triggerPrice) && Objects.equals(this.price, queryUmAlgoOrderHistoryResponseInner.price) - && Objects.equals( - this.icebergQuantity, queryUmAlgoOrderHistoryResponseInner.icebergQuantity) - && Objects.equals( - this.tpTriggerPrice, queryUmAlgoOrderHistoryResponseInner.tpTriggerPrice) - && Objects.equals(this.tpPrice, queryUmAlgoOrderHistoryResponseInner.tpPrice) - && Objects.equals( - this.slTriggerPrice, queryUmAlgoOrderHistoryResponseInner.slTriggerPrice) - && Objects.equals(this.slPrice, queryUmAlgoOrderHistoryResponseInner.slPrice) - && Objects.equals( - this.tpOrderType, queryUmAlgoOrderHistoryResponseInner.tpOrderType) && Objects.equals( this.selfTradePreventionMode, queryUmAlgoOrderHistoryResponseInner.selfTradePreventionMode) @@ -892,12 +726,6 @@ public int hashCode() { actualPrice, triggerPrice, price, - icebergQuantity, - tpTriggerPrice, - tpPrice, - slTriggerPrice, - slPrice, - tpOrderType, selfTradePreventionMode, workingType, priceMatch, @@ -928,12 +756,6 @@ public String toString() { sb.append(" actualPrice: ").append(toIndentedString(actualPrice)).append("\n"); sb.append(" triggerPrice: ").append(toIndentedString(triggerPrice)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" icebergQuantity: ").append(toIndentedString(icebergQuantity)).append("\n"); - sb.append(" tpTriggerPrice: ").append(toIndentedString(tpTriggerPrice)).append("\n"); - sb.append(" tpPrice: ").append(toIndentedString(tpPrice)).append("\n"); - sb.append(" slTriggerPrice: ").append(toIndentedString(slTriggerPrice)).append("\n"); - sb.append(" slPrice: ").append(toIndentedString(slPrice)).append("\n"); - sb.append(" tpOrderType: ").append(toIndentedString(tpOrderType)).append("\n"); sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); @@ -1009,30 +831,6 @@ public String toUrlQueryString() { String priceValueAsString = ""; priceValueAsString = priceValue.toString(); sb.append("price=").append(urlEncode(priceValueAsString)).append(""); - Object icebergQuantityValue = getIcebergQuantity(); - String icebergQuantityValueAsString = ""; - icebergQuantityValueAsString = icebergQuantityValue.toString(); - sb.append("icebergQuantity=").append(urlEncode(icebergQuantityValueAsString)).append(""); - Object tpTriggerPriceValue = getTpTriggerPrice(); - String tpTriggerPriceValueAsString = ""; - tpTriggerPriceValueAsString = tpTriggerPriceValue.toString(); - sb.append("tpTriggerPrice=").append(urlEncode(tpTriggerPriceValueAsString)).append(""); - Object tpPriceValue = getTpPrice(); - String tpPriceValueAsString = ""; - tpPriceValueAsString = tpPriceValue.toString(); - sb.append("tpPrice=").append(urlEncode(tpPriceValueAsString)).append(""); - Object slTriggerPriceValue = getSlTriggerPrice(); - String slTriggerPriceValueAsString = ""; - slTriggerPriceValueAsString = slTriggerPriceValue.toString(); - sb.append("slTriggerPrice=").append(urlEncode(slTriggerPriceValueAsString)).append(""); - Object slPriceValue = getSlPrice(); - String slPriceValueAsString = ""; - slPriceValueAsString = slPriceValue.toString(); - sb.append("slPrice=").append(urlEncode(slPriceValueAsString)).append(""); - Object tpOrderTypeValue = getTpOrderType(); - String tpOrderTypeValueAsString = ""; - tpOrderTypeValueAsString = tpOrderTypeValue.toString(); - sb.append("tpOrderType=").append(urlEncode(tpOrderTypeValueAsString)).append(""); Object selfTradePreventionModeValue = getSelfTradePreventionMode(); String selfTradePreventionModeValueAsString = ""; selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); @@ -1117,12 +915,6 @@ private String toIndentedString(Object o) { openapiFields.add("actualPrice"); openapiFields.add("triggerPrice"); openapiFields.add("price"); - openapiFields.add("icebergQuantity"); - openapiFields.add("tpTriggerPrice"); - openapiFields.add("tpPrice"); - openapiFields.add("slTriggerPrice"); - openapiFields.add("slPrice"); - openapiFields.add("tpOrderType"); openapiFields.add("selfTradePreventionMode"); openapiFields.add("workingType"); openapiFields.add("priceMatch"); @@ -1262,54 +1054,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("price").toString())); } - if ((jsonObj.get("icebergQuantity") != null && !jsonObj.get("icebergQuantity").isJsonNull()) - && !jsonObj.get("icebergQuantity").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `icebergQuantity` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("icebergQuantity").toString())); - } - if ((jsonObj.get("tpTriggerPrice") != null && !jsonObj.get("tpTriggerPrice").isJsonNull()) - && !jsonObj.get("tpTriggerPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tpTriggerPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("tpTriggerPrice").toString())); - } - if ((jsonObj.get("tpPrice") != null && !jsonObj.get("tpPrice").isJsonNull()) - && !jsonObj.get("tpPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tpPrice` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("tpPrice").toString())); - } - if ((jsonObj.get("slTriggerPrice") != null && !jsonObj.get("slTriggerPrice").isJsonNull()) - && !jsonObj.get("slTriggerPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `slTriggerPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("slTriggerPrice").toString())); - } - if ((jsonObj.get("slPrice") != null && !jsonObj.get("slPrice").isJsonNull()) - && !jsonObj.get("slPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `slPrice` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("slPrice").toString())); - } - if ((jsonObj.get("tpOrderType") != null && !jsonObj.get("tpOrderType").isJsonNull()) - && !jsonObj.get("tpOrderType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tpOrderType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("tpOrderType").toString())); - } if ((jsonObj.get("selfTradePreventionMode") != null && !jsonObj.get("selfTradePreventionMode").isJsonNull()) && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmConditionalOrderHistoryResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmConditionalOrderHistoryResponse.java index d366f26da..7cc067602 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmConditionalOrderHistoryResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmConditionalOrderHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUmConditionalOrderHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUmConditionalOrderHistoryResponse { public static final String SERIALIZED_NAME_NEW_CLIENT_STRATEGY_ID = "newClientStrategyId"; @@ -190,7 +190,7 @@ public QueryUmConditionalOrderHistoryResponse newClientStrategyId( } /** - * Get newClientStrategyId + * New Client Strategy ID. * * @return newClientStrategyId */ @@ -210,7 +210,7 @@ public QueryUmConditionalOrderHistoryResponse strategyId( } /** - * Get strategyId + * Strategy ID. * * @return strategyId */ @@ -230,7 +230,7 @@ public QueryUmConditionalOrderHistoryResponse strategyStatus( } /** - * Get strategyStatus + * Strategy Status. * * @return strategyStatus */ @@ -250,7 +250,7 @@ public QueryUmConditionalOrderHistoryResponse strategyType( } /** - * Get strategyType + * Strategy Type. * * @return strategyType */ @@ -270,7 +270,7 @@ public QueryUmConditionalOrderHistoryResponse origQty( } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -289,7 +289,7 @@ public QueryUmConditionalOrderHistoryResponse price(@jakarta.annotation.Nullable } /** - * Get price + * Price. * * @return price */ @@ -309,7 +309,7 @@ public QueryUmConditionalOrderHistoryResponse reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -328,7 +328,7 @@ public QueryUmConditionalOrderHistoryResponse side(@jakarta.annotation.Nullable } /** - * Get side + * Side. * * @return side */ @@ -348,7 +348,7 @@ public QueryUmConditionalOrderHistoryResponse positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -368,7 +368,7 @@ public QueryUmConditionalOrderHistoryResponse stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -388,7 +388,7 @@ public QueryUmConditionalOrderHistoryResponse symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -408,7 +408,7 @@ public QueryUmConditionalOrderHistoryResponse orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable,only have when the strategy is triggered * * @return orderId */ @@ -428,7 +428,7 @@ public QueryUmConditionalOrderHistoryResponse status( } /** - * Get status + * Normal order status after trigger if appliable, only have when the strategy is triggered * * @return status */ @@ -448,7 +448,7 @@ public QueryUmConditionalOrderHistoryResponse bookTime( } /** - * Get bookTime + * order time * * @return bookTime */ @@ -468,7 +468,7 @@ public QueryUmConditionalOrderHistoryResponse updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ @@ -488,7 +488,7 @@ public QueryUmConditionalOrderHistoryResponse triggerTime( } /** - * Get triggerTime + * Trigger Time. * * @return triggerTime */ @@ -508,7 +508,7 @@ public QueryUmConditionalOrderHistoryResponse timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -527,7 +527,7 @@ public QueryUmConditionalOrderHistoryResponse type(@jakarta.annotation.Nullable } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -547,7 +547,7 @@ public QueryUmConditionalOrderHistoryResponse activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -567,7 +567,7 @@ public QueryUmConditionalOrderHistoryResponse priceRate( } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -587,7 +587,7 @@ public QueryUmConditionalOrderHistoryResponse workingType( } /** - * Get workingType + * Working Type. * * @return workingType */ @@ -607,7 +607,7 @@ public QueryUmConditionalOrderHistoryResponse priceProtect( } /** - * Get priceProtect + * Price Protect. * * @return priceProtect */ @@ -627,7 +627,7 @@ public QueryUmConditionalOrderHistoryResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -648,7 +648,7 @@ public QueryUmConditionalOrderHistoryResponse goodTillDate( } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmModifyOrderHistoryResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmModifyOrderHistoryResponse.java index 3de93fa1a..75763c3b4 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmModifyOrderHistoryResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmModifyOrderHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUmModifyOrderHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUmModifyOrderHistoryResponse extends ArrayList { public QueryUmModifyOrderHistoryResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmModifyOrderHistoryResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmModifyOrderHistoryResponseInner.java index bed9c25e7..4d6d40368 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmModifyOrderHistoryResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmModifyOrderHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** QueryUmModifyOrderHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUmModifyOrderHistoryResponseInner { public static final String SERIALIZED_NAME_AMENDMENT_ID = "amendmentId"; @@ -94,7 +94,7 @@ public QueryUmModifyOrderHistoryResponseInner amendmentId( } /** - * Get amendmentId + * Order modification ID * * @return amendmentId */ @@ -114,7 +114,7 @@ public QueryUmModifyOrderHistoryResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -133,7 +133,7 @@ public QueryUmModifyOrderHistoryResponseInner pair(@jakarta.annotation.Nullable } /** - * Get pair + * Pair. * * @return pair */ @@ -153,7 +153,7 @@ public QueryUmModifyOrderHistoryResponseInner orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -173,7 +173,7 @@ public QueryUmModifyOrderHistoryResponseInner clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -192,7 +192,7 @@ public QueryUmModifyOrderHistoryResponseInner time(@jakarta.annotation.Nullable } /** - * Get time + * Order modification time * * @return time */ @@ -236,7 +236,7 @@ public QueryUmModifyOrderHistoryResponseInner priceMatch( } /** - * Get priceMatch + * Price Match. * * @return priceMatch */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmOrderResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmOrderResponse.java index b5fcd2816..46441ec3f 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmOrderResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUmOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUmOrderResponse { public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; @@ -165,7 +165,7 @@ public QueryUmOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPric } /** - * Get avgPrice + * Avg Price. * * @return avgPrice */ @@ -184,7 +184,7 @@ public QueryUmOrderResponse clientOrderId(@jakarta.annotation.Nullable String cl } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -203,7 +203,7 @@ public QueryUmOrderResponse cumQuote(@jakarta.annotation.Nullable String cumQuot } /** - * Get cumQuote + * Cum Quote. * * @return cumQuote */ @@ -222,7 +222,7 @@ public QueryUmOrderResponse executedQty(@jakarta.annotation.Nullable String exec } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -241,7 +241,7 @@ public QueryUmOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -260,7 +260,7 @@ public QueryUmOrderResponse origQty(@jakarta.annotation.Nullable String origQty) } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -279,7 +279,7 @@ public QueryUmOrderResponse origType(@jakarta.annotation.Nullable String origTyp } /** - * Get origType + * Orig Type. * * @return origType */ @@ -298,7 +298,7 @@ public QueryUmOrderResponse price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Price. * * @return price */ @@ -317,7 +317,7 @@ public QueryUmOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean redu } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -336,7 +336,7 @@ public QueryUmOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Side. * * @return side */ @@ -355,7 +355,7 @@ public QueryUmOrderResponse positionSide(@jakarta.annotation.Nullable String pos } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -374,7 +374,7 @@ public QueryUmOrderResponse status(@jakarta.annotation.Nullable String status) { } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -393,7 +393,7 @@ public QueryUmOrderResponse symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -412,7 +412,7 @@ public QueryUmOrderResponse time(@jakarta.annotation.Nullable Long time) { } /** - * Get time + * order time * * @return time */ @@ -431,7 +431,7 @@ public QueryUmOrderResponse timeInForce(@jakarta.annotation.Nullable String time } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -450,7 +450,7 @@ public QueryUmOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -469,7 +469,7 @@ public QueryUmOrderResponse updateTime(@jakarta.annotation.Nullable Long updateT } /** - * Get updateTime + * update time * * @return updateTime */ @@ -489,7 +489,7 @@ public QueryUmOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -509,7 +509,7 @@ public QueryUmOrderResponse goodTillDate(@jakarta.annotation.Nullable Long goodT } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ @@ -528,7 +528,7 @@ public QueryUmOrderResponse priceMatch(@jakarta.annotation.Nullable String price } /** - * Get priceMatch + * Price Match. * * @return priceMatch */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmPositionInformationResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmPositionInformationResponse.java index eeea4b9a2..4a6b72ed8 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmPositionInformationResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmPositionInformationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUmPositionInformationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUmPositionInformationResponse extends ArrayList { public QueryUmPositionInformationResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmPositionInformationResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmPositionInformationResponseInner.java index d89a31c62..54638b3f8 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmPositionInformationResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUmPositionInformationResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUmPositionInformationResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUmPositionInformationResponseInner { public static final String SERIALIZED_NAME_ENTRY_PRICE = "entryPrice"; @@ -111,7 +111,7 @@ public QueryUmPositionInformationResponseInner entryPrice( } /** - * Get entryPrice + * average entry price * * @return entryPrice */ @@ -131,7 +131,7 @@ public QueryUmPositionInformationResponseInner leverage( } /** - * Get leverage + * current initial leverage * * @return leverage */ @@ -151,7 +151,7 @@ public QueryUmPositionInformationResponseInner markPrice( } /** - * Get markPrice + * Mark Price. * * @return markPrice */ @@ -171,7 +171,7 @@ public QueryUmPositionInformationResponseInner maxNotionalValue( } /** - * Get maxNotionalValue + * Max Notional Value. * * @return maxNotionalValue */ @@ -191,7 +191,7 @@ public QueryUmPositionInformationResponseInner positionAmt( } /** - * Get positionAmt + * position amount * * @return positionAmt */ @@ -211,7 +211,7 @@ public QueryUmPositionInformationResponseInner notional( } /** - * Get notional + * Notional. * * @return notional */ @@ -231,7 +231,7 @@ public QueryUmPositionInformationResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -251,7 +251,7 @@ public QueryUmPositionInformationResponseInner unRealizedProfit( } /** - * Get unRealizedProfit + * Un Realized Profit. * * @return unRealizedProfit */ @@ -271,7 +271,7 @@ public QueryUmPositionInformationResponseInner liquidationPrice( } /** - * Get liquidationPrice + * Liquidation Price. * * @return liquidationPrice */ @@ -291,7 +291,7 @@ public QueryUmPositionInformationResponseInner positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -311,7 +311,7 @@ public QueryUmPositionInformationResponseInner updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserNegativeBalanceAutoExchangeRecordResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserNegativeBalanceAutoExchangeRecordResponse.java index 691f6f218..b311ce4dd 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserNegativeBalanceAutoExchangeRecordResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserNegativeBalanceAutoExchangeRecordResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryUserNegativeBalanceAutoExchangeRecordResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUserNegativeBalanceAutoExchangeRecordResponse { public static final String SERIALIZED_NAME_TOTAL = "total"; @@ -63,7 +63,7 @@ public QueryUserNegativeBalanceAutoExchangeRecordResponse total( } /** - * Get total + * Total. * * @return total */ @@ -93,7 +93,7 @@ public QueryUserNegativeBalanceAutoExchangeRecordResponse addRowsItem( } /** - * Get rows + * Rows. * * @return rows */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner.java index b91bbe40a..82528282b 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner { public static final String SERIALIZED_NAME_START_TIME = "startTime"; @@ -70,7 +70,7 @@ public QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner startTime( } /** - * Get startTime + * Start Time. * * @return startTime */ @@ -90,7 +90,7 @@ public QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner endTime( } /** - * Get endTime + * End Time. * * @return endTime */ @@ -123,7 +123,7 @@ public QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner addDetailsIte } /** - * Get details + * Details. * * @return details */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner.java index 5a85b6d93..fa03aec56 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -64,7 +64,7 @@ public QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner a } /** - * Get asset + * asset name * * @return asset */ @@ -84,7 +84,7 @@ public QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner n } /** - * Get negativeBalance + * negative balance amount * * @return negativeBalance */ @@ -105,7 +105,7 @@ public void setNegativeBalance(@jakarta.annotation.Nullable Double negativeBalan } /** - * Get negativeMaxThreshold + * the max negative balance threshold * * @return negativeMaxThreshold */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserRateLimitResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserRateLimitResponse.java index 2843d9217..51102acb2 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserRateLimitResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserRateLimitResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUserRateLimitResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUserRateLimitResponse extends ArrayList { public QueryUserRateLimitResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserRateLimitResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserRateLimitResponseInner.java index 6b3acd19f..6dc538db8 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserRateLimitResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUserRateLimitResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUserRateLimitResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUserRateLimitResponseInner { public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; @@ -69,7 +69,7 @@ public QueryUserRateLimitResponseInner rateLimitType( } /** - * Get rateLimitType + * Rate Limit Type. * * @return rateLimitType */ @@ -88,7 +88,7 @@ public QueryUserRateLimitResponseInner interval(@jakarta.annotation.Nullable Str } /** - * Get interval + * Interval. * * @return interval */ @@ -108,7 +108,7 @@ public QueryUserRateLimitResponseInner intervalNum( } /** - * Get intervalNum + * Interval Num. * * @return intervalNum */ @@ -127,7 +127,7 @@ public QueryUserRateLimitResponseInner limit(@jakarta.annotation.Nullable Long l } /** - * Get limit + * Limit. * * @return limit */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersCmForceOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersCmForceOrdersResponse.java index 4c440606b..fc33895ab 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersCmForceOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersCmForceOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUsersCmForceOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUsersCmForceOrdersResponse extends ArrayList { public QueryUsersCmForceOrdersResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersCmForceOrdersResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersCmForceOrdersResponseInner.java index 3d97aba3c..9d569d735 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersCmForceOrdersResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersCmForceOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUsersCmForceOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUsersCmForceOrdersResponseInner { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -152,7 +152,7 @@ public QueryUsersCmForceOrdersResponseInner orderId(@jakarta.annotation.Nullable } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -171,7 +171,7 @@ public QueryUsersCmForceOrdersResponseInner symbol(@jakarta.annotation.Nullable } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -190,7 +190,7 @@ public QueryUsersCmForceOrdersResponseInner pair(@jakarta.annotation.Nullable St } /** - * Get pair + * Pair. * * @return pair */ @@ -209,7 +209,7 @@ public QueryUsersCmForceOrdersResponseInner status(@jakarta.annotation.Nullable } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -229,7 +229,7 @@ public QueryUsersCmForceOrdersResponseInner clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -248,7 +248,7 @@ public QueryUsersCmForceOrdersResponseInner price(@jakarta.annotation.Nullable S } /** - * Get price + * Price. * * @return price */ @@ -268,7 +268,7 @@ public QueryUsersCmForceOrdersResponseInner avgPrice( } /** - * Get avgPrice + * Avg Price. * * @return avgPrice */ @@ -288,7 +288,7 @@ public QueryUsersCmForceOrdersResponseInner origQty( } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -308,7 +308,7 @@ public QueryUsersCmForceOrdersResponseInner executedQty( } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -328,7 +328,7 @@ public QueryUsersCmForceOrdersResponseInner cumBase( } /** - * Get cumBase + * Cum Base. * * @return cumBase */ @@ -348,7 +348,7 @@ public QueryUsersCmForceOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -367,7 +367,7 @@ public QueryUsersCmForceOrdersResponseInner type(@jakarta.annotation.Nullable St } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -387,7 +387,7 @@ public QueryUsersCmForceOrdersResponseInner reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -406,7 +406,7 @@ public QueryUsersCmForceOrdersResponseInner side(@jakarta.annotation.Nullable St } /** - * Get side + * Side. * * @return side */ @@ -426,7 +426,7 @@ public QueryUsersCmForceOrdersResponseInner positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -446,7 +446,7 @@ public QueryUsersCmForceOrdersResponseInner origType( } /** - * Get origType + * Orig Type. * * @return origType */ @@ -465,7 +465,7 @@ public QueryUsersCmForceOrdersResponseInner time(@jakarta.annotation.Nullable Lo } /** - * Get time + * Event time. * * @return time */ @@ -485,7 +485,7 @@ public QueryUsersCmForceOrdersResponseInner updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersMarginForceOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersMarginForceOrdersResponse.java index b9eabe262..2bb190cd3 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersMarginForceOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersMarginForceOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryUsersMarginForceOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUsersMarginForceOrdersResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; @@ -73,7 +73,7 @@ public QueryUsersMarginForceOrdersResponse addRowsItem( } /** - * Get rows + * Rows. * * @return rows */ @@ -95,7 +95,7 @@ public QueryUsersMarginForceOrdersResponse total(@jakarta.annotation.Nullable Lo } /** - * Get total + * Total. * * @return total */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersMarginForceOrdersResponseRowsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersMarginForceOrdersResponseRowsInner.java index a198b442e..46474624c 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersMarginForceOrdersResponseRowsInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersMarginForceOrdersResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUsersMarginForceOrdersResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUsersMarginForceOrdersResponseRowsInner { public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; @@ -99,7 +99,7 @@ public QueryUsersMarginForceOrdersResponseRowsInner avgPrice( } /** - * Get avgPrice + * Avg Price. * * @return avgPrice */ @@ -119,7 +119,7 @@ public QueryUsersMarginForceOrdersResponseRowsInner executedQty( } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -139,7 +139,7 @@ public QueryUsersMarginForceOrdersResponseRowsInner orderId( } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -159,7 +159,7 @@ public QueryUsersMarginForceOrdersResponseRowsInner price( } /** - * Get price + * Price. * * @return price */ @@ -179,7 +179,7 @@ public QueryUsersMarginForceOrdersResponseRowsInner qty( } /** - * Get qty + * Qty. * * @return qty */ @@ -199,7 +199,7 @@ public QueryUsersMarginForceOrdersResponseRowsInner side( } /** - * Get side + * Side. * * @return side */ @@ -219,7 +219,7 @@ public QueryUsersMarginForceOrdersResponseRowsInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -239,7 +239,7 @@ public QueryUsersMarginForceOrdersResponseRowsInner timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -259,7 +259,7 @@ public QueryUsersMarginForceOrdersResponseRowsInner updatedTime( } /** - * Get updatedTime + * Updated Time. * * @return updatedTime */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersUmForceOrdersResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersUmForceOrdersResponse.java index 40112b0a8..f6f63f09f 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersUmForceOrdersResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersUmForceOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUsersUmForceOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUsersUmForceOrdersResponse extends ArrayList { public QueryUsersUmForceOrdersResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersUmForceOrdersResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersUmForceOrdersResponseInner.java index b66273e86..d6de08e25 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersUmForceOrdersResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/QueryUsersUmForceOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUsersUmForceOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUsersUmForceOrdersResponseInner { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -146,7 +146,7 @@ public QueryUsersUmForceOrdersResponseInner orderId(@jakarta.annotation.Nullable } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -165,7 +165,7 @@ public QueryUsersUmForceOrdersResponseInner symbol(@jakarta.annotation.Nullable } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -184,7 +184,7 @@ public QueryUsersUmForceOrdersResponseInner status(@jakarta.annotation.Nullable } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -204,7 +204,7 @@ public QueryUsersUmForceOrdersResponseInner clientOrderId( } /** - * Get clientOrderId + * Client Order ID. * * @return clientOrderId */ @@ -223,7 +223,7 @@ public QueryUsersUmForceOrdersResponseInner price(@jakarta.annotation.Nullable S } /** - * Get price + * Price. * * @return price */ @@ -243,7 +243,7 @@ public QueryUsersUmForceOrdersResponseInner avgPrice( } /** - * Get avgPrice + * Avg Price. * * @return avgPrice */ @@ -263,7 +263,7 @@ public QueryUsersUmForceOrdersResponseInner origQty( } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -283,7 +283,7 @@ public QueryUsersUmForceOrdersResponseInner executedQty( } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -303,7 +303,7 @@ public QueryUsersUmForceOrdersResponseInner cumQuote( } /** - * Get cumQuote + * Cum Quote. * * @return cumQuote */ @@ -323,7 +323,7 @@ public QueryUsersUmForceOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -342,7 +342,7 @@ public QueryUsersUmForceOrdersResponseInner type(@jakarta.annotation.Nullable St } /** - * Get type + * Normal order type after trigger if appliable * * @return type */ @@ -362,7 +362,7 @@ public QueryUsersUmForceOrdersResponseInner reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -381,7 +381,7 @@ public QueryUsersUmForceOrdersResponseInner side(@jakarta.annotation.Nullable St } /** - * Get side + * Side. * * @return side */ @@ -401,7 +401,7 @@ public QueryUsersUmForceOrdersResponseInner positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ @@ -421,7 +421,7 @@ public QueryUsersUmForceOrdersResponseInner origType( } /** - * Get origType + * Orig Type. * * @return origType */ @@ -440,7 +440,7 @@ public QueryUsersUmForceOrdersResponseInner time(@jakarta.annotation.Nullable Lo } /** - * Get time + * Event time. * * @return time */ @@ -460,7 +460,7 @@ public QueryUsersUmForceOrdersResponseInner updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ReduceOnly.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ReduceOnly.java new file mode 100644 index 000000000..81a7c723e --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ReduceOnly.java @@ -0,0 +1,73 @@ +/* + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Cannot be sent in Hedge Mode */ +@JsonAdapter(ReduceOnly.Adapter.class) +public enum ReduceOnly { + TRUE("true"), + + FALSE("false"); + + private String value; + + ReduceOnly(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ReduceOnly fromValue(String value) { + for (ReduceOnly b : ReduceOnly.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ReduceOnly enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ReduceOnly read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ReduceOnly.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ReduceOnly.fromValue(value); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/RepayFuturesNegativeBalanceRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/RepayFuturesNegativeBalanceRequest.java index 569822148..a3fc2e546 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/RepayFuturesNegativeBalanceRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/RepayFuturesNegativeBalanceRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RepayFuturesNegativeBalanceRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RepayFuturesNegativeBalanceRequest { public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/RepayFuturesNegativeBalanceResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/RepayFuturesNegativeBalanceResponse.java index a2ab1dbd2..cc40eed16 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/RepayFuturesNegativeBalanceResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/RepayFuturesNegativeBalanceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RepayFuturesNegativeBalanceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RepayFuturesNegativeBalanceResponse { public static final String SERIALIZED_NAME_MSG = "msg"; @@ -50,7 +50,7 @@ public RepayFuturesNegativeBalanceResponse msg(@jakarta.annotation.Nullable Stri } /** - * Get msg + * Msg. * * @return msg */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/SelfTradePreventionMode.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/SelfTradePreventionMode.java index c40370dc8..b5648a9cc 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/SelfTradePreventionMode.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/SelfTradePreventionMode.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -28,9 +28,9 @@ public enum SelfTradePreventionMode { EXPIRE_TAKER("EXPIRE_TAKER"), - EXPIRE_BOTH("EXPIRE_BOTH"), + EXPIRE_MAKER("EXPIRE_MAKER"), - EXPIRE_MAKER("EXPIRE_MAKER"); + EXPIRE_BOTH("EXPIRE_BOTH"); private String value; diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/Side.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/Side.java index b43916788..c4bb5c7c6 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/Side.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/Side.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/SideEffectType.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/SideEffectType.java index 812d07a36..0014ba585 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/SideEffectType.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/SideEffectType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets sideEffectType */ +/** NO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY; default NO_SIDE_EFFECT. */ @JsonAdapter(SideEffectType.Adapter.class) public enum SideEffectType { NO_SIDE_EFFECT("NO_SIDE_EFFECT"), diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/StartUserDataStreamResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/StartUserDataStreamResponse.java index bf6b17b10..cbf017d2c 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/StartUserDataStreamResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/StartUserDataStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** StartUserDataStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class StartUserDataStreamResponse { public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; @@ -50,7 +50,7 @@ public StartUserDataStreamResponse listenKey(@jakarta.annotation.Nullable String } /** - * Get listenKey + * Listen Key. * * @return listenKey */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/StopLimitTimeInForce.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/StopLimitTimeInForce.java index 707bc1daf..515450be3 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/StopLimitTimeInForce.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/StopLimitTimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets stopLimitTimeInForce */ +/** Valid values are `GTC/FOK/IOC` */ @JsonAdapter(StopLimitTimeInForce.Adapter.class) public enum StopLimitTimeInForce { GTC("GTC"), diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/StrategyType.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/StrategyType.java index d5865b054..cd5d45504 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/StrategyType.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/StrategyType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -28,8 +28,6 @@ public enum StrategyType { STOP_MARKET("STOP_MARKET"), - LIMIT_MAKER("LIMIT_MAKER"), - TAKE_PROFIT("TAKE_PROFIT"), TAKE_PROFIT_MARKET("TAKE_PROFIT_MARKET"), diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/TimeInForce.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/TimeInForce.java index 7fdf06e96..06bde7d12 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/TimeInForce.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/TimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -24,13 +24,15 @@ /** Gets or Sets timeInForce */ @JsonAdapter(TimeInForce.Adapter.class) public enum TimeInForce { - GTC("GTC"), - IOC("IOC"), + GTC("GTC"), + FOK("FOK"), - GTX("GTX"); + GTX("GTX"), + + GTD("GTD"); private String value; diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ToggleBnbBurnOnUmFuturesTradeRequest.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ToggleBnbBurnOnUmFuturesTradeRequest.java index 02f444fb7..bdf2e1676 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ToggleBnbBurnOnUmFuturesTradeRequest.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ToggleBnbBurnOnUmFuturesTradeRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -34,13 +35,13 @@ /** ToggleBnbBurnOnUmFuturesTradeRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ToggleBnbBurnOnUmFuturesTradeRequest { public static final String SERIALIZED_NAME_FEE_BURN = "feeBurn"; @SerializedName(SERIALIZED_NAME_FEE_BURN) @jakarta.annotation.Nonnull - private String feeBurn; + private FeeBurn feeBurn; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -51,7 +52,7 @@ public class ToggleBnbBurnOnUmFuturesTradeRequest { public ToggleBnbBurnOnUmFuturesTradeRequest() {} public ToggleBnbBurnOnUmFuturesTradeRequest feeBurn( - @jakarta.annotation.Nonnull String feeBurn) { + @jakarta.annotation.Nonnull FeeBurn feeBurn) { this.feeBurn = feeBurn; return this; } @@ -63,11 +64,12 @@ public ToggleBnbBurnOnUmFuturesTradeRequest feeBurn( */ @jakarta.annotation.Nonnull @NotNull - public String getFeeBurn() { + @Valid + public FeeBurn getFeeBurn() { return feeBurn; } - public void setFeeBurn(@jakarta.annotation.Nonnull String feeBurn) { + public void setFeeBurn(@jakarta.annotation.Nonnull FeeBurn feeBurn) { this.feeBurn = feeBurn; } @@ -197,13 +199,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("feeBurn").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `feeBurn` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("feeBurn").toString())); - } + // validate the required field `feeBurn` + FeeBurn.validateJsonElement(jsonObj.get("feeBurn")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ToggleBnbBurnOnUmFuturesTradeResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ToggleBnbBurnOnUmFuturesTradeResponse.java index b00cf43b1..22effdfaf 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ToggleBnbBurnOnUmFuturesTradeResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/ToggleBnbBurnOnUmFuturesTradeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ToggleBnbBurnOnUmFuturesTradeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ToggleBnbBurnOnUmFuturesTradeResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -56,7 +56,7 @@ public ToggleBnbBurnOnUmFuturesTradeResponse code(@jakarta.annotation.Nullable L } /** - * Get code + * Code. * * @return code */ @@ -75,7 +75,7 @@ public ToggleBnbBurnOnUmFuturesTradeResponse msg(@jakarta.annotation.Nullable St } /** - * Get msg + * Msg. * * @return msg */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/TransferSide.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/TransferSide.java new file mode 100644 index 000000000..b2a94ef91 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/TransferSide.java @@ -0,0 +1,73 @@ +/* + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets transferSide */ +@JsonAdapter(TransferSide.Adapter.class) +public enum TransferSide { + TO_UM("TO_UM"), + + FROM_UM("FROM_UM"); + + private String value; + + TransferSide(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TransferSide fromValue(String value) { + for (TransferSide b : TransferSide.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TransferSide enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TransferSide read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TransferSide.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TransferSide.fromValue(value); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/Type.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/Type.java deleted file mode 100644 index 9971eed4f..000000000 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/Type.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model; - -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import org.hibernate.validator.constraints.*; - -/** Gets or Sets type */ -@JsonAdapter(Type.Adapter.class) -public enum Type { - LIMIT("LIMIT"), - - MARKET("MARKET"); - - private String value; - - Type(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static Type fromValue(String value) { - for (Type b : Type.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final Type enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public Type read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return Type.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - Type.fromValue(value); - } -} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmAccountTradeListResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmAccountTradeListResponse.java index f53c4495c..d2cb3a289 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmAccountTradeListResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmAccountTradeListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UmAccountTradeListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UmAccountTradeListResponse extends ArrayList { public UmAccountTradeListResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmAccountTradeListResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmAccountTradeListResponseInner.java index 81e7f8a9b..343c6023e 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmAccountTradeListResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmAccountTradeListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UmAccountTradeListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UmAccountTradeListResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -128,7 +128,7 @@ public UmAccountTradeListResponseInner symbol(@jakarta.annotation.Nullable Strin } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -147,7 +147,7 @@ public UmAccountTradeListResponseInner id(@jakarta.annotation.Nullable Long id) } /** - * Get id + * ID. * * @return id */ @@ -166,7 +166,7 @@ public UmAccountTradeListResponseInner orderId(@jakarta.annotation.Nullable Long } /** - * Get orderId + * Normal orderID after trigger if appliable, only have when the strategy is triggered * * @return orderId */ @@ -185,7 +185,7 @@ public UmAccountTradeListResponseInner side(@jakarta.annotation.Nullable String } /** - * Get side + * Side. * * @return side */ @@ -204,7 +204,7 @@ public UmAccountTradeListResponseInner price(@jakarta.annotation.Nullable String } /** - * Get price + * Price. * * @return price */ @@ -223,7 +223,7 @@ public UmAccountTradeListResponseInner qty(@jakarta.annotation.Nullable String q } /** - * Get qty + * Qty. * * @return qty */ @@ -243,7 +243,7 @@ public UmAccountTradeListResponseInner realizedPnl( } /** - * Get realizedPnl + * Realized Pnl. * * @return realizedPnl */ @@ -262,7 +262,7 @@ public UmAccountTradeListResponseInner quoteQty(@jakarta.annotation.Nullable Str } /** - * Get quoteQty + * Quote Qty. * * @return quoteQty */ @@ -282,7 +282,7 @@ public UmAccountTradeListResponseInner commission( } /** - * Get commission + * Commission. * * @return commission */ @@ -302,7 +302,7 @@ public UmAccountTradeListResponseInner commissionAsset( } /** - * Get commissionAsset + * Commission Asset. * * @return commissionAsset */ @@ -321,7 +321,7 @@ public UmAccountTradeListResponseInner time(@jakarta.annotation.Nullable Long ti } /** - * Get time + * Event time. * * @return time */ @@ -340,7 +340,7 @@ public UmAccountTradeListResponseInner buyer(@jakarta.annotation.Nullable Boolea } /** - * Get buyer + * Buyer. * * @return buyer */ @@ -359,7 +359,7 @@ public UmAccountTradeListResponseInner maker(@jakarta.annotation.Nullable Boolea } /** - * Get maker + * Maker. * * @return maker */ @@ -379,7 +379,7 @@ public UmAccountTradeListResponseInner positionSide( } /** - * Get positionSide + * BOTH means that it is the position of One-way Mode * * @return positionSide */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmFuturesAccountConfigurationResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmFuturesAccountConfigurationResponse.java index d2ee5f45e..83a53d2dd 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmFuturesAccountConfigurationResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmFuturesAccountConfigurationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UmFuturesAccountConfigurationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UmFuturesAccountConfigurationResponse { public static final String SERIALIZED_NAME_FEE_TIER = "feeTier"; @@ -93,7 +93,7 @@ public UmFuturesAccountConfigurationResponse feeTier( } /** - * Get feeTier + * account commission tier * * @return feeTier */ @@ -113,7 +113,7 @@ public UmFuturesAccountConfigurationResponse canTrade( } /** - * Get canTrade + * if can trade * * @return canTrade */ @@ -133,7 +133,7 @@ public UmFuturesAccountConfigurationResponse canDeposit( } /** - * Get canDeposit + * if can transfer in asset * * @return canDeposit */ @@ -153,7 +153,7 @@ public UmFuturesAccountConfigurationResponse canWithdraw( } /** - * Get canWithdraw + * if can transfer out asset * * @return canWithdraw */ @@ -173,7 +173,7 @@ public UmFuturesAccountConfigurationResponse dualSidePosition( } /** - * Get dualSidePosition + * \"true\": Hedge Mode; \"false\": One-way Mode * * @return dualSidePosition */ @@ -193,7 +193,7 @@ public UmFuturesAccountConfigurationResponse updateTime( } /** - * Get updateTime + * reserved property, please ignore * * @return updateTime */ @@ -213,7 +213,7 @@ public UmFuturesAccountConfigurationResponse multiAssetsMargin( } /** - * Get multiAssetsMargin + * Multi Assets Margin. * * @return multiAssetsMargin */ @@ -233,7 +233,7 @@ public UmFuturesAccountConfigurationResponse tradeGroupId( } /** - * Get tradeGroupId + * Trade Group ID. * * @return tradeGroupId */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmFuturesSymbolConfigurationResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmFuturesSymbolConfigurationResponse.java index 3087826c3..f78654835 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmFuturesSymbolConfigurationResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmFuturesSymbolConfigurationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UmFuturesSymbolConfigurationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UmFuturesSymbolConfigurationResponse extends ArrayList { public UmFuturesSymbolConfigurationResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmFuturesSymbolConfigurationResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmFuturesSymbolConfigurationResponseInner.java index 29266782f..d437f1b00 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmFuturesSymbolConfigurationResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmFuturesSymbolConfigurationResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UmFuturesSymbolConfigurationResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UmFuturesSymbolConfigurationResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -75,7 +75,7 @@ public UmFuturesSymbolConfigurationResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -95,7 +95,7 @@ public UmFuturesSymbolConfigurationResponseInner marginType( } /** - * Get marginType + * Margin Type. * * @return marginType */ @@ -115,7 +115,7 @@ public UmFuturesSymbolConfigurationResponseInner isAutoAddMargin( } /** - * Get isAutoAddMargin + * Is Auto Add Margin. * * @return isAutoAddMargin */ @@ -135,7 +135,7 @@ public UmFuturesSymbolConfigurationResponseInner leverage( } /** - * Get leverage + * current initial leverage * * @return leverage */ @@ -155,7 +155,7 @@ public UmFuturesSymbolConfigurationResponseInner maxNotionalValue( } /** - * Get maxNotionalValue + * Max Notional Value. * * @return maxNotionalValue */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmNotionalAndLeverageBracketsResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmNotionalAndLeverageBracketsResponse.java index 02fc2df46..7ed4c2c26 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmNotionalAndLeverageBracketsResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmNotionalAndLeverageBracketsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UmNotionalAndLeverageBracketsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UmNotionalAndLeverageBracketsResponse extends ArrayList { public UmNotionalAndLeverageBracketsResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmNotionalAndLeverageBracketsResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmNotionalAndLeverageBracketsResponseInner.java index 05a96bfa1..f048c6438 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmNotionalAndLeverageBracketsResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmNotionalAndLeverageBracketsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** UmNotionalAndLeverageBracketsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UmNotionalAndLeverageBracketsResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -69,7 +69,7 @@ public UmNotionalAndLeverageBracketsResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ @@ -89,7 +89,7 @@ public UmNotionalAndLeverageBracketsResponseInner notionalCoef( } /** - * Get notionalCoef + * Notional Coef. * * @return notionalCoef */ @@ -119,7 +119,7 @@ public UmNotionalAndLeverageBracketsResponseInner addBracketsItem( } /** - * Get brackets + * Brackets. * * @return brackets */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmNotionalAndLeverageBracketsResponseInnerBracketsInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmNotionalAndLeverageBracketsResponseInnerBracketsInner.java index 5a4c6fd81..781419d4c 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmNotionalAndLeverageBracketsResponseInnerBracketsInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmNotionalAndLeverageBracketsResponseInnerBracketsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** UmNotionalAndLeverageBracketsResponseInnerBracketsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UmNotionalAndLeverageBracketsResponseInnerBracketsInner { public static final String SERIALIZED_NAME_BRACKET = "bracket"; @@ -82,7 +82,7 @@ public UmNotionalAndLeverageBracketsResponseInnerBracketsInner bracket( } /** - * Get bracket + * Notional bracket * * @return bracket */ @@ -102,7 +102,7 @@ public UmNotionalAndLeverageBracketsResponseInnerBracketsInner initialLeverage( } /** - * Get initialLeverage + * Max initial leverage for this bracket * * @return initialLeverage */ @@ -122,7 +122,7 @@ public UmNotionalAndLeverageBracketsResponseInnerBracketsInner notionalCap( } /** - * Get notionalCap + * Cap notional of this bracket * * @return notionalCap */ @@ -142,7 +142,7 @@ public UmNotionalAndLeverageBracketsResponseInnerBracketsInner notionalFloor( } /** - * Get notionalFloor + * Notional threshold of this bracket * * @return notionalFloor */ @@ -162,7 +162,7 @@ public UmNotionalAndLeverageBracketsResponseInnerBracketsInner maintMarginRatio( } /** - * Get maintMarginRatio + * Maintenance ratio for this bracket * * @return maintMarginRatio */ @@ -183,7 +183,7 @@ public UmNotionalAndLeverageBracketsResponseInnerBracketsInner cum( } /** - * Get cum + * Auxiliary number for quick calculation * * @return cum */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmPositionAdlQuantileEstimationResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmPositionAdlQuantileEstimationResponse.java index e44a7fc6f..d8bfbd2a2 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmPositionAdlQuantileEstimationResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmPositionAdlQuantileEstimationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UmPositionAdlQuantileEstimationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UmPositionAdlQuantileEstimationResponse extends ArrayList { public UmPositionAdlQuantileEstimationResponse() {} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmPositionAdlQuantileEstimationResponseInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmPositionAdlQuantileEstimationResponseInner.java index 988e0a5f9..ebdc99685 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmPositionAdlQuantileEstimationResponseInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmPositionAdlQuantileEstimationResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** UmPositionAdlQuantileEstimationResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UmPositionAdlQuantileEstimationResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -58,7 +58,7 @@ public UmPositionAdlQuantileEstimationResponseInner symbol( } /** - * Get symbol + * Trade symbol, if existing. * * @return symbol */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmPositionAdlQuantileEstimationResponseInnerAdlQuantile.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmPositionAdlQuantileEstimationResponseInnerAdlQuantile.java index 7d1783bc2..54a128c01 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmPositionAdlQuantileEstimationResponseInnerAdlQuantile.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/UmPositionAdlQuantileEstimationResponseInnerAdlQuantile.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** UmPositionAdlQuantileEstimationResponseInnerAdlQuantile */ +/** Adl Quantile. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UmPositionAdlQuantileEstimationResponseInnerAdlQuantile { public static final String SERIALIZED_NAME_L_O_N_G = "LONG"; @@ -63,7 +63,7 @@ public UmPositionAdlQuantileEstimationResponseInnerAdlQuantile LONG( } /** - * Get LONG + * adl quantile for \"LONG\" position in hedge mode * * @return LONG */ @@ -83,7 +83,7 @@ public UmPositionAdlQuantileEstimationResponseInnerAdlQuantile SHORT( } /** - * Get SHORT + * adl quantile for \"SHORT\" position in hedge mode * * @return SHORT */ @@ -103,7 +103,7 @@ public UmPositionAdlQuantileEstimationResponseInnerAdlQuantile BOTH( } /** - * Get BOTH + * adl quantile for position in one-way mode * * @return BOTH */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/WorkingType.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/WorkingType.java index daf8df9fd..b9447ba04 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/WorkingType.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/WorkingType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -21,10 +21,12 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets workingType */ +/** Trigger price type. Default `CONTRACT_PRICE` */ @JsonAdapter(WorkingType.Adapter.class) public enum WorkingType { - MARK_PRICE("MARK_PRICE"); + MARK_PRICE("MARK_PRICE"), + + CONTRACT_PRICE("CONTRACT_PRICE"); private String value; diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/DerivativesTradingPortfolioMarginWebSocketStreamsUtil.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/DerivativesTradingPortfolioMarginWebSocketStreamsUtil.java index ce3b8e398..28ce13d7b 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/DerivativesTradingPortfolioMarginWebSocketStreamsUtil.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/DerivativesTradingPortfolioMarginWebSocketStreamsUtil.java @@ -3,7 +3,7 @@ import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; public class DerivativesTradingPortfolioMarginWebSocketStreamsUtil { - private static final String BASE_URL = "wss://fstream.binance.com/pm"; + private static final String BASE_URL = "wss://dstream.binance.com"; private static final boolean HAS_TIME_UNIT = false; public static WebSocketClientConfiguration getClientConfiguration() { diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/JSON.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/JSON.java index 5f2adc3de..77803915e 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/JSON.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -95,7 +95,8 @@ public static GsonBuilder createGson() { "ALGO_UPDATE", com.binance.connector.client .derivatives_trading_portfolio_margin - .websocket.stream.model.AlgoUpdate.class); + .websocket.stream.model.AlgoOrderUpdate + .class); classByDiscriminatorValue.put( "CONDITIONAL_ORDER_TRADE_UPDATE", com.binance.connector.client @@ -112,114 +113,43 @@ public static GsonBuilder createGson() { "balanceUpdate", com.binance.connector.client .derivatives_trading_portfolio_margin - .websocket.stream.model.Balanceupdate + .websocket.stream.model.BalanceUpdate .class); classByDiscriminatorValue.put( "executionReport", com.binance.connector.client .derivatives_trading_portfolio_margin - .websocket.stream.model.Executionreport + .websocket.stream.model.ExecutionReport .class); classByDiscriminatorValue.put( "liabilityChange", com.binance.connector.client .derivatives_trading_portfolio_margin - .websocket.stream.model.Liabilitychange + .websocket.stream.model.LiabilityChange .class); classByDiscriminatorValue.put( "listenKeyExpired", com.binance.connector.client .derivatives_trading_portfolio_margin - .websocket.stream.model.Listenkeyexpired + .websocket.stream.model.ListenKeyExpired .class); classByDiscriminatorValue.put( "openOrderLoss", com.binance.connector.client .derivatives_trading_portfolio_margin - .websocket.stream.model.Openorderloss + .websocket.stream.model.OpenOrderLoss .class); classByDiscriminatorValue.put( "outboundAccountPosition", com.binance.connector.client .derivatives_trading_portfolio_margin .websocket.stream.model - .Outboundaccountposition.class); + .OutboundAccountPosition.class); classByDiscriminatorValue.put( "riskLevelChange", com.binance.connector.client .derivatives_trading_portfolio_margin - .websocket.stream.model.Risklevelchange - .class); - classByDiscriminatorValue.put( - "accountConfigUpdate", - com.binance.connector.client - .derivatives_trading_portfolio_margin - .websocket.stream.model.AccountConfigUpdate - .class); - classByDiscriminatorValue.put( - "accountUpdate", - com.binance.connector.client - .derivatives_trading_portfolio_margin - .websocket.stream.model.AccountUpdate - .class); - classByDiscriminatorValue.put( - "algoUpdate", - com.binance.connector.client - .derivatives_trading_portfolio_margin - .websocket.stream.model.AlgoUpdate.class); - classByDiscriminatorValue.put( - "balanceupdate", - com.binance.connector.client - .derivatives_trading_portfolio_margin - .websocket.stream.model.Balanceupdate - .class); - classByDiscriminatorValue.put( - "conditionalOrderTradeUpdate", - com.binance.connector.client - .derivatives_trading_portfolio_margin - .websocket.stream.model - .ConditionalOrderTradeUpdate.class); - classByDiscriminatorValue.put( - "executionreport", - com.binance.connector.client - .derivatives_trading_portfolio_margin - .websocket.stream.model.Executionreport - .class); - classByDiscriminatorValue.put( - "liabilitychange", - com.binance.connector.client - .derivatives_trading_portfolio_margin - .websocket.stream.model.Liabilitychange - .class); - classByDiscriminatorValue.put( - "listenkeyexpired", - com.binance.connector.client - .derivatives_trading_portfolio_margin - .websocket.stream.model.Listenkeyexpired - .class); - classByDiscriminatorValue.put( - "openorderloss", - com.binance.connector.client - .derivatives_trading_portfolio_margin - .websocket.stream.model.Openorderloss - .class); - classByDiscriminatorValue.put( - "orderTradeUpdate", - com.binance.connector.client - .derivatives_trading_portfolio_margin - .websocket.stream.model.OrderTradeUpdate - .class); - classByDiscriminatorValue.put( - "outboundaccountposition", - com.binance.connector.client - .derivatives_trading_portfolio_margin - .websocket.stream.model - .Outboundaccountposition.class); - classByDiscriminatorValue.put( - "risklevelchange", - com.binance.connector.client - .derivatives_trading_portfolio_margin - .websocket.stream.model.Risklevelchange + .websocket.stream.model.RiskLevelChange .class); classByDiscriminatorValue.put( "UserDataStreamEventsResponse", @@ -301,13 +231,13 @@ private static Class getClassByDiscriminator( .stream.model.AccountUpdateAPInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.websocket - .stream.model.AlgoUpdate.CustomTypeAdapterFactory()); + .stream.model.AlgoOrderUpdate.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.websocket - .stream.model.AlgoUpdateAo.CustomTypeAdapterFactory()); + .stream.model.AlgoOrderUpdateAo.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.websocket - .stream.model.Balanceupdate.CustomTypeAdapterFactory()); + .stream.model.BalanceUpdate.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.websocket .stream.model.ConditionalOrderTradeUpdate.CustomTypeAdapterFactory()); @@ -316,19 +246,19 @@ private static Class getClassByDiscriminator( .stream.model.ConditionalOrderTradeUpdateSo.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.websocket - .stream.model.Executionreport.CustomTypeAdapterFactory()); + .stream.model.ExecutionReport.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.websocket - .stream.model.Liabilitychange.CustomTypeAdapterFactory()); + .stream.model.LiabilityChange.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.websocket - .stream.model.Listenkeyexpired.CustomTypeAdapterFactory()); + .stream.model.ListenKeyExpired.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.websocket - .stream.model.Openorderloss.CustomTypeAdapterFactory()); + .stream.model.OpenOrderLoss.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.websocket - .stream.model.OpenorderlossOInner.CustomTypeAdapterFactory()); + .stream.model.OpenOrderLossOInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.websocket .stream.model.OrderTradeUpdate.CustomTypeAdapterFactory()); @@ -337,13 +267,13 @@ private static Class getClassByDiscriminator( .stream.model.OrderTradeUpdateO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.websocket - .stream.model.Outboundaccountposition.CustomTypeAdapterFactory()); + .stream.model.OutboundAccountPosition.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.websocket - .stream.model.OutboundaccountpositionBInner.CustomTypeAdapterFactory()); + .stream.model.OutboundAccountPositionBInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.websocket - .stream.model.Risklevelchange.CustomTypeAdapterFactory()); + .stream.model.RiskLevelChange.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_portfolio_margin.websocket .stream.model.UserDataStreamEventsResponse.CustomTypeAdapterFactory()); diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/api/DerivativesTradingPortfolioMarginWebSocketStreams.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/api/DerivativesTradingPortfolioMarginWebSocketStreams.java index 43a6a0cfc..bebfa2151 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/api/DerivativesTradingPortfolioMarginWebSocketStreams.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/api/DerivativesTradingPortfolioMarginWebSocketStreams.java @@ -19,7 +19,7 @@ public class DerivativesTradingPortfolioMarginWebSocketStreams { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-portfolio-margin/6.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-portfolio-margin/7.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final StreamConnectionInterface connection; diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AbstractOpenApiSchema.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AbstractOpenApiSchema.java index 06e215653..cb2fad0b3 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AbstractOpenApiSchema.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AbstractOpenApiSchema.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -18,7 +18,7 @@ /** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountConfigUpdate.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountConfigUpdate.java index 73b8d3ad1..5a4d770ee 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountConfigUpdate.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountConfigUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** AccountConfigUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountConfigUpdate extends BaseDTO { public static final String SERIALIZED_NAME_FS = "fs"; @@ -72,7 +72,7 @@ public AccountConfigUpdate fs(@jakarta.annotation.Nullable String fs) { } /** - * Get fs + * Event business unit * * @return fs */ @@ -91,7 +91,7 @@ public AccountConfigUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -110,7 +110,7 @@ public AccountConfigUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountConfigUpdateAc.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountConfigUpdateAc.java index 9df0dc22d..353eb537e 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountConfigUpdateAc.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountConfigUpdateAc.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountConfigUpdateAc */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountConfigUpdateAc extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -59,7 +59,7 @@ public AccountConfigUpdateAc sLowerCase(@jakarta.annotation.Nullable String sLow } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -78,7 +78,7 @@ public AccountConfigUpdateAc lLowerCase(@jakarta.annotation.Nullable Long lLower } /** - * Get lLowerCase + * Leverage * * @return lLowerCase */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdate.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdate.java index 6d14a2a48..819200abd 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdate.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** AccountUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountUpdate extends BaseDTO { public static final String SERIALIZED_NAME_FS = "fs"; @@ -78,7 +78,7 @@ public AccountUpdate fs(@jakarta.annotation.Nullable String fs) { } /** - * Get fs + * Event business unit. 'UM' for USDS-M futures and 'CM' for COIN-M futures * * @return fs */ @@ -97,7 +97,7 @@ public AccountUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -116,7 +116,7 @@ public AccountUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction * * @return T */ @@ -135,7 +135,7 @@ public AccountUpdate iLowerCase(@jakarta.annotation.Nullable String iLowerCase) } /** - * Get iLowerCase + * Account Alias, ignore for UM * * @return iLowerCase */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdateA.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdateA.java index 203b6a4a6..917fc1bf5 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdateA.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdateA.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -38,10 +38,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** AccountUpdateA */ +/** Update Data */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountUpdateA extends BaseDTO { public static final String SERIALIZED_NAME_M_LOWER_CASE = "m"; @@ -69,7 +69,7 @@ public AccountUpdateA mLowerCase(@jakarta.annotation.Nullable String mLowerCase) } /** - * Get mLowerCase + * Event reason type * * @return mLowerCase */ @@ -96,7 +96,7 @@ public AccountUpdateA addBItem(AccountUpdateABInner BItem) { } /** - * Get B + * Balances * * @return B */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdateABInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdateABInner.java index 5cc33460a..cd9015b4d 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdateABInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdateABInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountUpdateABInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountUpdateABInner extends BaseDTO { public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; @@ -71,7 +71,7 @@ public AccountUpdateABInner aLowerCase(@jakarta.annotation.Nullable String aLowe } /** - * Get aLowerCase + * Asset * * @return aLowerCase */ @@ -90,7 +90,7 @@ public AccountUpdateABInner wb(@jakarta.annotation.Nullable String wb) { } /** - * Get wb + * Wallet Balance * * @return wb */ @@ -109,7 +109,7 @@ public AccountUpdateABInner cw(@jakarta.annotation.Nullable String cw) { } /** - * Get cw + * Cross Wallet Balance * * @return cw */ @@ -128,7 +128,7 @@ public AccountUpdateABInner bc(@jakarta.annotation.Nullable String bc) { } /** - * Get bc + * Balance Change except PnL and Commission * * @return bc */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdateAPInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdateAPInner.java index fe229ca11..3327c96b7 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdateAPInner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdateAPInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountUpdateAPInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountUpdateAPInner extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -89,7 +89,7 @@ public AccountUpdateAPInner sLowerCase(@jakarta.annotation.Nullable String sLowe } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -108,7 +108,7 @@ public AccountUpdateAPInner pa(@jakarta.annotation.Nullable String pa) { } /** - * Get pa + * Position Amount * * @return pa */ @@ -127,7 +127,7 @@ public AccountUpdateAPInner ep(@jakarta.annotation.Nullable String ep) { } /** - * Get ep + * Entry Price * * @return ep */ @@ -146,7 +146,7 @@ public AccountUpdateAPInner cr(@jakarta.annotation.Nullable String cr) { } /** - * Get cr + * (Pre-fee) Accumulated Realized * * @return cr */ @@ -165,7 +165,7 @@ public AccountUpdateAPInner up(@jakarta.annotation.Nullable String up) { } /** - * Get up + * Unrealized PnL * * @return up */ @@ -184,7 +184,7 @@ public AccountUpdateAPInner ps(@jakarta.annotation.Nullable String ps) { } /** - * Get ps + * Position Side * * @return ps */ @@ -203,7 +203,7 @@ public AccountUpdateAPInner bep(@jakarta.annotation.Nullable String bep) { } /** - * Get bep + * Breakeven Price * * @return bep */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AlgoOrderUpdate.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AlgoOrderUpdate.java new file mode 100644 index 000000000..be0022022 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AlgoOrderUpdate.java @@ -0,0 +1,357 @@ +/* + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AlgoOrderUpdate */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AlgoOrderUpdate extends BaseDTO { + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_FS = "fs"; + + @SerializedName(SERIALIZED_NAME_FS) + @jakarta.annotation.Nullable + private String fs; + + public static final String SERIALIZED_NAME_AO = "ao"; + + @SerializedName(SERIALIZED_NAME_AO) + @jakarta.annotation.Nullable + private AlgoOrderUpdateAo ao; + + public AlgoOrderUpdate() {} + + public AlgoOrderUpdate T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * Transaction Time + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + public AlgoOrderUpdate E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public AlgoOrderUpdate fs(@jakarta.annotation.Nullable String fs) { + this.fs = fs; + return this; + } + + /** + * Futures segment, `UM` for USDS-M Futures, `CM` for Coin-M Futures + * + * @return fs + */ + @jakarta.annotation.Nullable + public String getFs() { + return fs; + } + + public void setFs(@jakarta.annotation.Nullable String fs) { + this.fs = fs; + } + + public AlgoOrderUpdate ao(@jakarta.annotation.Nullable AlgoOrderUpdateAo ao) { + this.ao = ao; + return this; + } + + /** + * Get ao + * + * @return ao + */ + @jakarta.annotation.Nullable + @Valid + public AlgoOrderUpdateAo getAo() { + return ao; + } + + public void setAo(@jakarta.annotation.Nullable AlgoOrderUpdateAo ao) { + this.ao = ao; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AlgoOrderUpdate algoOrderUpdate = (AlgoOrderUpdate) o; + return Objects.equals(this.T, algoOrderUpdate.T) + && Objects.equals(this.E, algoOrderUpdate.E) + && Objects.equals(this.fs, algoOrderUpdate.fs) + && Objects.equals(this.ao, algoOrderUpdate.ao); + } + + @Override + public int hashCode() { + return Objects.hash(T, E, fs, ao); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AlgoOrderUpdate {\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" fs: ").append(toIndentedString(fs)).append("\n"); + sb.append(" ao: ").append(toIndentedString(ao)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String fsValue = getFs(); + if (fsValue != null) { + String fsValueAsString = fsValue.toString(); + valMap.put("fs", fsValueAsString); + } + AlgoOrderUpdateAo aoValue = getAo(); + if (aoValue != null) { + String aoValueAsString = JSON.getGson().toJson(aoValue); + valMap.put("ao", aoValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object fsValue = getFs(); + if (fsValue != null) { + valMap.put("fs", fsValue); + } + Object aoValue = getAo(); + if (aoValue != null) { + valMap.put("ao", aoValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("T"); + openapiFields.add("E"); + openapiFields.add("fs"); + openapiFields.add("ao"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AlgoOrderUpdate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AlgoOrderUpdate.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AlgoOrderUpdate is not found in the" + + " empty JSON string", + AlgoOrderUpdate.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AlgoOrderUpdate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AlgoOrderUpdate` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("fs") != null && !jsonObj.get("fs").isJsonNull()) + && !jsonObj.get("fs").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `fs` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("fs").toString())); + } + // validate the optional field `ao` + if (jsonObj.get("ao") != null && !jsonObj.get("ao").isJsonNull()) { + AlgoOrderUpdateAo.validateJsonElement(jsonObj.get("ao")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AlgoOrderUpdate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AlgoOrderUpdate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AlgoOrderUpdate.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AlgoOrderUpdate value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AlgoOrderUpdate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AlgoOrderUpdate given an JSON string + * + * @param jsonString JSON string + * @return An instance of AlgoOrderUpdate + * @throws IOException if the JSON string is invalid with respect to AlgoOrderUpdate + */ + public static AlgoOrderUpdate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AlgoOrderUpdate.class); + } + + /** + * Convert an instance of AlgoOrderUpdate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AlgoOrderUpdateAo.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AlgoOrderUpdateAo.java new file mode 100644 index 000000000..76585419d --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AlgoOrderUpdateAo.java @@ -0,0 +1,1297 @@ +/* + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** Algo order info */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AlgoOrderUpdateAo extends BaseDTO { + public static final String SERIALIZED_NAME_CAID = "caid"; + + @SerializedName(SERIALIZED_NAME_CAID) + @jakarta.annotation.Nullable + private String caid; + + public static final String SERIALIZED_NAME_AID = "aid"; + + @SerializedName(SERIALIZED_NAME_AID) + @jakarta.annotation.Nullable + private Long aid; + + public static final String SERIALIZED_NAME_AT = "at"; + + @SerializedName(SERIALIZED_NAME_AT) + @jakarta.annotation.Nullable + private String at; + + public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; + + @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) + @jakarta.annotation.Nullable + private String oLowerCase; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_S = "S"; + + @SerializedName(SERIALIZED_NAME_S) + @jakarta.annotation.Nullable + private String S; + + public static final String SERIALIZED_NAME_PS = "ps"; + + @SerializedName(SERIALIZED_NAME_PS) + @jakarta.annotation.Nullable + private String ps; + + public static final String SERIALIZED_NAME_F_LOWER_CASE = "f"; + + @SerializedName(SERIALIZED_NAME_F_LOWER_CASE) + @jakarta.annotation.Nullable + private String fLowerCase; + + public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; + + @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) + @jakarta.annotation.Nullable + private String qLowerCase; + + public static final String SERIALIZED_NAME_X = "X"; + + @SerializedName(SERIALIZED_NAME_X) + @jakarta.annotation.Nullable + private String X; + + public static final String SERIALIZED_NAME_AI = "ai"; + + @SerializedName(SERIALIZED_NAME_AI) + @jakarta.annotation.Nullable + private String ai; + + public static final String SERIALIZED_NAME_AP = "ap"; + + @SerializedName(SERIALIZED_NAME_AP) + @jakarta.annotation.Nullable + private String ap; + + public static final String SERIALIZED_NAME_AQ = "aq"; + + @SerializedName(SERIALIZED_NAME_AQ) + @jakarta.annotation.Nullable + private String aq; + + public static final String SERIALIZED_NAME_ACT = "act"; + + @SerializedName(SERIALIZED_NAME_ACT) + @jakarta.annotation.Nullable + private String act; + + public static final String SERIALIZED_NAME_TP = "tp"; + + @SerializedName(SERIALIZED_NAME_TP) + @jakarta.annotation.Nullable + private String tp; + + public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; + + @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) + @jakarta.annotation.Nullable + private String pLowerCase; + + public static final String SERIALIZED_NAME_V = "V"; + + @SerializedName(SERIALIZED_NAME_V) + @jakarta.annotation.Nullable + private String V; + + public static final String SERIALIZED_NAME_WT = "wt"; + + @SerializedName(SERIALIZED_NAME_WT) + @jakarta.annotation.Nullable + private String wt; + + public static final String SERIALIZED_NAME_PM = "pm"; + + @SerializedName(SERIALIZED_NAME_PM) + @jakarta.annotation.Nullable + private String pm; + + public static final String SERIALIZED_NAME_CP = "cp"; + + @SerializedName(SERIALIZED_NAME_CP) + @jakarta.annotation.Nullable + private Boolean cp; + + public static final String SERIALIZED_NAME_P_P = "pP"; + + @SerializedName(SERIALIZED_NAME_P_P) + @jakarta.annotation.Nullable + private Boolean pP; + + public static final String SERIALIZED_NAME_R = "R"; + + @SerializedName(SERIALIZED_NAME_R) + @jakarta.annotation.Nullable + private Boolean R; + + public static final String SERIALIZED_NAME_TT = "tt"; + + @SerializedName(SERIALIZED_NAME_TT) + @jakarta.annotation.Nullable + private Long tt; + + public static final String SERIALIZED_NAME_GTD = "gtd"; + + @SerializedName(SERIALIZED_NAME_GTD) + @jakarta.annotation.Nullable + private Long gtd; + + public static final String SERIALIZED_NAME_RM = "rm"; + + @SerializedName(SERIALIZED_NAME_RM) + @jakarta.annotation.Nullable + private String rm; + + public AlgoOrderUpdateAo() {} + + public AlgoOrderUpdateAo caid(@jakarta.annotation.Nullable String caid) { + this.caid = caid; + return this; + } + + /** + * Client Algo Id + * + * @return caid + */ + @jakarta.annotation.Nullable + public String getCaid() { + return caid; + } + + public void setCaid(@jakarta.annotation.Nullable String caid) { + this.caid = caid; + } + + public AlgoOrderUpdateAo aid(@jakarta.annotation.Nullable Long aid) { + this.aid = aid; + return this; + } + + /** + * Algo Id + * + * @return aid + */ + @jakarta.annotation.Nullable + public Long getAid() { + return aid; + } + + public void setAid(@jakarta.annotation.Nullable Long aid) { + this.aid = aid; + } + + public AlgoOrderUpdateAo at(@jakarta.annotation.Nullable String at) { + this.at = at; + return this; + } + + /** + * Algo Type + * + * @return at + */ + @jakarta.annotation.Nullable + public String getAt() { + return at; + } + + public void setAt(@jakarta.annotation.Nullable String at) { + this.at = at; + } + + public AlgoOrderUpdateAo oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + return this; + } + + /** + * Order Type + * + * @return oLowerCase + */ + @jakarta.annotation.Nullable + public String getoLowerCase() { + return oLowerCase; + } + + public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + } + + public AlgoOrderUpdateAo sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * Symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public AlgoOrderUpdateAo S(@jakarta.annotation.Nullable String S) { + this.S = S; + return this; + } + + /** + * Side + * + * @return S + */ + @jakarta.annotation.Nullable + public String getS() { + return S; + } + + public void setS(@jakarta.annotation.Nullable String S) { + this.S = S; + } + + public AlgoOrderUpdateAo ps(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + return this; + } + + /** + * Position Side + * + * @return ps + */ + @jakarta.annotation.Nullable + public String getPs() { + return ps; + } + + public void setPs(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + } + + public AlgoOrderUpdateAo fLowerCase(@jakarta.annotation.Nullable String fLowerCase) { + this.fLowerCase = fLowerCase; + return this; + } + + /** + * Time in Force + * + * @return fLowerCase + */ + @jakarta.annotation.Nullable + public String getfLowerCase() { + return fLowerCase; + } + + public void setfLowerCase(@jakarta.annotation.Nullable String fLowerCase) { + this.fLowerCase = fLowerCase; + } + + public AlgoOrderUpdateAo qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + return this; + } + + /** + * Quantity + * + * @return qLowerCase + */ + @jakarta.annotation.Nullable + public String getqLowerCase() { + return qLowerCase; + } + + public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + } + + public AlgoOrderUpdateAo X(@jakarta.annotation.Nullable String X) { + this.X = X; + return this; + } + + /** + * Algo Status: NEW, CANCELED, TRIGGERING, TRIGGERED, FINISHED, REJECTED, EXPIRED + * + * @return X + */ + @jakarta.annotation.Nullable + public String getX() { + return X; + } + + public void setX(@jakarta.annotation.Nullable String X) { + this.X = X; + } + + public AlgoOrderUpdateAo ai(@jakarta.annotation.Nullable String ai) { + this.ai = ai; + return this; + } + + /** + * Actual order ID in matching engine + * + * @return ai + */ + @jakarta.annotation.Nullable + public String getAi() { + return ai; + } + + public void setAi(@jakarta.annotation.Nullable String ai) { + this.ai = ai; + } + + public AlgoOrderUpdateAo ap(@jakarta.annotation.Nullable String ap) { + this.ap = ap; + return this; + } + + /** + * Avg fill price in matching engine + * + * @return ap + */ + @jakarta.annotation.Nullable + public String getAp() { + return ap; + } + + public void setAp(@jakarta.annotation.Nullable String ap) { + this.ap = ap; + } + + public AlgoOrderUpdateAo aq(@jakarta.annotation.Nullable String aq) { + this.aq = aq; + return this; + } + + /** + * Executed quantity in matching engine + * + * @return aq + */ + @jakarta.annotation.Nullable + public String getAq() { + return aq; + } + + public void setAq(@jakarta.annotation.Nullable String aq) { + this.aq = aq; + } + + public AlgoOrderUpdateAo act(@jakarta.annotation.Nullable String act) { + this.act = act; + return this; + } + + /** + * Actual order type in matching engine + * + * @return act + */ + @jakarta.annotation.Nullable + public String getAct() { + return act; + } + + public void setAct(@jakarta.annotation.Nullable String act) { + this.act = act; + } + + public AlgoOrderUpdateAo tp(@jakarta.annotation.Nullable String tp) { + this.tp = tp; + return this; + } + + /** + * Trigger Price + * + * @return tp + */ + @jakarta.annotation.Nullable + public String getTp() { + return tp; + } + + public void setTp(@jakarta.annotation.Nullable String tp) { + this.tp = tp; + } + + public AlgoOrderUpdateAo pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + return this; + } + + /** + * Order Price + * + * @return pLowerCase + */ + @jakarta.annotation.Nullable + public String getpLowerCase() { + return pLowerCase; + } + + public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + } + + public AlgoOrderUpdateAo V(@jakarta.annotation.Nullable String V) { + this.V = V; + return this; + } + + /** + * Self Trade Prevention Mode + * + * @return V + */ + @jakarta.annotation.Nullable + public String getV() { + return V; + } + + public void setV(@jakarta.annotation.Nullable String V) { + this.V = V; + } + + public AlgoOrderUpdateAo wt(@jakarta.annotation.Nullable String wt) { + this.wt = wt; + return this; + } + + /** + * Working Type + * + * @return wt + */ + @jakarta.annotation.Nullable + public String getWt() { + return wt; + } + + public void setWt(@jakarta.annotation.Nullable String wt) { + this.wt = wt; + } + + public AlgoOrderUpdateAo pm(@jakarta.annotation.Nullable String pm) { + this.pm = pm; + return this; + } + + /** + * Price Match + * + * @return pm + */ + @jakarta.annotation.Nullable + public String getPm() { + return pm; + } + + public void setPm(@jakarta.annotation.Nullable String pm) { + this.pm = pm; + } + + public AlgoOrderUpdateAo cp(@jakarta.annotation.Nullable Boolean cp) { + this.cp = cp; + return this; + } + + /** + * If Close-All + * + * @return cp + */ + @jakarta.annotation.Nullable + public Boolean getCp() { + return cp; + } + + public void setCp(@jakarta.annotation.Nullable Boolean cp) { + this.cp = cp; + } + + public AlgoOrderUpdateAo pP(@jakarta.annotation.Nullable Boolean pP) { + this.pP = pP; + return this; + } + + /** + * If price protection is on + * + * @return pP + */ + @jakarta.annotation.Nullable + public Boolean getpP() { + return pP; + } + + public void setpP(@jakarta.annotation.Nullable Boolean pP) { + this.pP = pP; + } + + public AlgoOrderUpdateAo R(@jakarta.annotation.Nullable Boolean R) { + this.R = R; + return this; + } + + /** + * Is reduce only + * + * @return R + */ + @jakarta.annotation.Nullable + public Boolean getR() { + return R; + } + + public void setR(@jakarta.annotation.Nullable Boolean R) { + this.R = R; + } + + public AlgoOrderUpdateAo tt(@jakarta.annotation.Nullable Long tt) { + this.tt = tt; + return this; + } + + /** + * Trigger Time + * + * @return tt + */ + @jakarta.annotation.Nullable + public Long getTt() { + return tt; + } + + public void setTt(@jakarta.annotation.Nullable Long tt) { + this.tt = tt; + } + + public AlgoOrderUpdateAo gtd(@jakarta.annotation.Nullable Long gtd) { + this.gtd = gtd; + return this; + } + + /** + * Good Till Date + * + * @return gtd + */ + @jakarta.annotation.Nullable + public Long getGtd() { + return gtd; + } + + public void setGtd(@jakarta.annotation.Nullable Long gtd) { + this.gtd = gtd; + } + + public AlgoOrderUpdateAo rm(@jakarta.annotation.Nullable String rm) { + this.rm = rm; + return this; + } + + /** + * Algo order failed reason + * + * @return rm + */ + @jakarta.annotation.Nullable + public String getRm() { + return rm; + } + + public void setRm(@jakarta.annotation.Nullable String rm) { + this.rm = rm; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AlgoOrderUpdateAo algoOrderUpdateAo = (AlgoOrderUpdateAo) o; + return Objects.equals(this.caid, algoOrderUpdateAo.caid) + && Objects.equals(this.aid, algoOrderUpdateAo.aid) + && Objects.equals(this.at, algoOrderUpdateAo.at) + && Objects.equals(this.oLowerCase, algoOrderUpdateAo.oLowerCase) + && Objects.equals(this.sLowerCase, algoOrderUpdateAo.sLowerCase) + && Objects.equals(this.S, algoOrderUpdateAo.S) + && Objects.equals(this.ps, algoOrderUpdateAo.ps) + && Objects.equals(this.fLowerCase, algoOrderUpdateAo.fLowerCase) + && Objects.equals(this.qLowerCase, algoOrderUpdateAo.qLowerCase) + && Objects.equals(this.X, algoOrderUpdateAo.X) + && Objects.equals(this.ai, algoOrderUpdateAo.ai) + && Objects.equals(this.ap, algoOrderUpdateAo.ap) + && Objects.equals(this.aq, algoOrderUpdateAo.aq) + && Objects.equals(this.act, algoOrderUpdateAo.act) + && Objects.equals(this.tp, algoOrderUpdateAo.tp) + && Objects.equals(this.pLowerCase, algoOrderUpdateAo.pLowerCase) + && Objects.equals(this.V, algoOrderUpdateAo.V) + && Objects.equals(this.wt, algoOrderUpdateAo.wt) + && Objects.equals(this.pm, algoOrderUpdateAo.pm) + && Objects.equals(this.cp, algoOrderUpdateAo.cp) + && Objects.equals(this.pP, algoOrderUpdateAo.pP) + && Objects.equals(this.R, algoOrderUpdateAo.R) + && Objects.equals(this.tt, algoOrderUpdateAo.tt) + && Objects.equals(this.gtd, algoOrderUpdateAo.gtd) + && Objects.equals(this.rm, algoOrderUpdateAo.rm); + } + + @Override + public int hashCode() { + return Objects.hash( + caid, + aid, + at, + oLowerCase, + sLowerCase, + S, + ps, + fLowerCase, + qLowerCase, + X, + ai, + ap, + aq, + act, + tp, + pLowerCase, + V, + wt, + pm, + cp, + pP, + R, + tt, + gtd, + rm); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AlgoOrderUpdateAo {\n"); + sb.append(" caid: ").append(toIndentedString(caid)).append("\n"); + sb.append(" aid: ").append(toIndentedString(aid)).append("\n"); + sb.append(" at: ").append(toIndentedString(at)).append("\n"); + sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" S: ").append(toIndentedString(S)).append("\n"); + sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); + sb.append(" fLowerCase: ").append(toIndentedString(fLowerCase)).append("\n"); + sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append(" X: ").append(toIndentedString(X)).append("\n"); + sb.append(" ai: ").append(toIndentedString(ai)).append("\n"); + sb.append(" ap: ").append(toIndentedString(ap)).append("\n"); + sb.append(" aq: ").append(toIndentedString(aq)).append("\n"); + sb.append(" act: ").append(toIndentedString(act)).append("\n"); + sb.append(" tp: ").append(toIndentedString(tp)).append("\n"); + sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); + sb.append(" V: ").append(toIndentedString(V)).append("\n"); + sb.append(" wt: ").append(toIndentedString(wt)).append("\n"); + sb.append(" pm: ").append(toIndentedString(pm)).append("\n"); + sb.append(" cp: ").append(toIndentedString(cp)).append("\n"); + sb.append(" pP: ").append(toIndentedString(pP)).append("\n"); + sb.append(" R: ").append(toIndentedString(R)).append("\n"); + sb.append(" tt: ").append(toIndentedString(tt)).append("\n"); + sb.append(" gtd: ").append(toIndentedString(gtd)).append("\n"); + sb.append(" rm: ").append(toIndentedString(rm)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String caidValue = getCaid(); + if (caidValue != null) { + String caidValueAsString = caidValue.toString(); + valMap.put("caid", caidValueAsString); + } + Long aidValue = getAid(); + if (aidValue != null) { + String aidValueAsString = aidValue.toString(); + valMap.put("aid", aidValueAsString); + } + String atValue = getAt(); + if (atValue != null) { + String atValueAsString = atValue.toString(); + valMap.put("at", atValueAsString); + } + String oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + String oLowerCaseValueAsString = oLowerCaseValue.toString(); + valMap.put("oLowerCase", oLowerCaseValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + String SValue = getS(); + if (SValue != null) { + String SValueAsString = SValue.toString(); + valMap.put("S", SValueAsString); + } + String psValue = getPs(); + if (psValue != null) { + String psValueAsString = psValue.toString(); + valMap.put("ps", psValueAsString); + } + String fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + String fLowerCaseValueAsString = fLowerCaseValue.toString(); + valMap.put("fLowerCase", fLowerCaseValueAsString); + } + String qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + String qLowerCaseValueAsString = qLowerCaseValue.toString(); + valMap.put("qLowerCase", qLowerCaseValueAsString); + } + String XValue = getX(); + if (XValue != null) { + String XValueAsString = XValue.toString(); + valMap.put("X", XValueAsString); + } + String aiValue = getAi(); + if (aiValue != null) { + String aiValueAsString = aiValue.toString(); + valMap.put("ai", aiValueAsString); + } + String apValue = getAp(); + if (apValue != null) { + String apValueAsString = apValue.toString(); + valMap.put("ap", apValueAsString); + } + String aqValue = getAq(); + if (aqValue != null) { + String aqValueAsString = aqValue.toString(); + valMap.put("aq", aqValueAsString); + } + String actValue = getAct(); + if (actValue != null) { + String actValueAsString = actValue.toString(); + valMap.put("act", actValueAsString); + } + String tpValue = getTp(); + if (tpValue != null) { + String tpValueAsString = tpValue.toString(); + valMap.put("tp", tpValueAsString); + } + String pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + String pLowerCaseValueAsString = pLowerCaseValue.toString(); + valMap.put("pLowerCase", pLowerCaseValueAsString); + } + String VValue = getV(); + if (VValue != null) { + String VValueAsString = VValue.toString(); + valMap.put("V", VValueAsString); + } + String wtValue = getWt(); + if (wtValue != null) { + String wtValueAsString = wtValue.toString(); + valMap.put("wt", wtValueAsString); + } + String pmValue = getPm(); + if (pmValue != null) { + String pmValueAsString = pmValue.toString(); + valMap.put("pm", pmValueAsString); + } + Boolean cpValue = getCp(); + if (cpValue != null) { + String cpValueAsString = cpValue.toString(); + valMap.put("cp", cpValueAsString); + } + Boolean pPValue = getpP(); + if (pPValue != null) { + String pPValueAsString = pPValue.toString(); + valMap.put("pP", pPValueAsString); + } + Boolean RValue = getR(); + if (RValue != null) { + String RValueAsString = RValue.toString(); + valMap.put("R", RValueAsString); + } + Long ttValue = getTt(); + if (ttValue != null) { + String ttValueAsString = ttValue.toString(); + valMap.put("tt", ttValueAsString); + } + Long gtdValue = getGtd(); + if (gtdValue != null) { + String gtdValueAsString = gtdValue.toString(); + valMap.put("gtd", gtdValueAsString); + } + String rmValue = getRm(); + if (rmValue != null) { + String rmValueAsString = rmValue.toString(); + valMap.put("rm", rmValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object caidValue = getCaid(); + if (caidValue != null) { + valMap.put("caid", caidValue); + } + Object aidValue = getAid(); + if (aidValue != null) { + valMap.put("aid", aidValue); + } + Object atValue = getAt(); + if (atValue != null) { + valMap.put("at", atValue); + } + Object oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + valMap.put("oLowerCase", oLowerCaseValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object SValue = getS(); + if (SValue != null) { + valMap.put("S", SValue); + } + Object psValue = getPs(); + if (psValue != null) { + valMap.put("ps", psValue); + } + Object fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + valMap.put("fLowerCase", fLowerCaseValue); + } + Object qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + valMap.put("qLowerCase", qLowerCaseValue); + } + Object XValue = getX(); + if (XValue != null) { + valMap.put("X", XValue); + } + Object aiValue = getAi(); + if (aiValue != null) { + valMap.put("ai", aiValue); + } + Object apValue = getAp(); + if (apValue != null) { + valMap.put("ap", apValue); + } + Object aqValue = getAq(); + if (aqValue != null) { + valMap.put("aq", aqValue); + } + Object actValue = getAct(); + if (actValue != null) { + valMap.put("act", actValue); + } + Object tpValue = getTp(); + if (tpValue != null) { + valMap.put("tp", tpValue); + } + Object pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + valMap.put("pLowerCase", pLowerCaseValue); + } + Object VValue = getV(); + if (VValue != null) { + valMap.put("V", VValue); + } + Object wtValue = getWt(); + if (wtValue != null) { + valMap.put("wt", wtValue); + } + Object pmValue = getPm(); + if (pmValue != null) { + valMap.put("pm", pmValue); + } + Object cpValue = getCp(); + if (cpValue != null) { + valMap.put("cp", cpValue); + } + Object pPValue = getpP(); + if (pPValue != null) { + valMap.put("pP", pPValue); + } + Object RValue = getR(); + if (RValue != null) { + valMap.put("R", RValue); + } + Object ttValue = getTt(); + if (ttValue != null) { + valMap.put("tt", ttValue); + } + Object gtdValue = getGtd(); + if (gtdValue != null) { + valMap.put("gtd", gtdValue); + } + Object rmValue = getRm(); + if (rmValue != null) { + valMap.put("rm", rmValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("caid"); + openapiFields.add("aid"); + openapiFields.add("at"); + openapiFields.add("o"); + openapiFields.add("s"); + openapiFields.add("S"); + openapiFields.add("ps"); + openapiFields.add("f"); + openapiFields.add("q"); + openapiFields.add("X"); + openapiFields.add("ai"); + openapiFields.add("ap"); + openapiFields.add("aq"); + openapiFields.add("act"); + openapiFields.add("tp"); + openapiFields.add("p"); + openapiFields.add("V"); + openapiFields.add("wt"); + openapiFields.add("pm"); + openapiFields.add("cp"); + openapiFields.add("pP"); + openapiFields.add("R"); + openapiFields.add("tt"); + openapiFields.add("gtd"); + openapiFields.add("rm"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AlgoOrderUpdateAo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AlgoOrderUpdateAo.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AlgoOrderUpdateAo is not found in the" + + " empty JSON string", + AlgoOrderUpdateAo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AlgoOrderUpdateAo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AlgoOrderUpdateAo` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("caid") != null && !jsonObj.get("caid").isJsonNull()) + && !jsonObj.get("caid").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `caid` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("caid").toString())); + } + if ((jsonObj.get("at") != null && !jsonObj.get("at").isJsonNull()) + && !jsonObj.get("at").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `at` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("at").toString())); + } + if ((jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) + && !jsonObj.get("o").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `o` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("o").toString())); + } + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("S") != null && !jsonObj.get("S").isJsonNull()) + && !jsonObj.get("S").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `S` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("S").toString())); + } + if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) + && !jsonObj.get("ps").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ps` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ps").toString())); + } + if ((jsonObj.get("f") != null && !jsonObj.get("f").isJsonNull()) + && !jsonObj.get("f").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `f` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("f").toString())); + } + if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) + && !jsonObj.get("q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("q").toString())); + } + if ((jsonObj.get("X") != null && !jsonObj.get("X").isJsonNull()) + && !jsonObj.get("X").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `X` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("X").toString())); + } + if ((jsonObj.get("ai") != null && !jsonObj.get("ai").isJsonNull()) + && !jsonObj.get("ai").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ai` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ai").toString())); + } + if ((jsonObj.get("ap") != null && !jsonObj.get("ap").isJsonNull()) + && !jsonObj.get("ap").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ap` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ap").toString())); + } + if ((jsonObj.get("aq") != null && !jsonObj.get("aq").isJsonNull()) + && !jsonObj.get("aq").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `aq` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("aq").toString())); + } + if ((jsonObj.get("act") != null && !jsonObj.get("act").isJsonNull()) + && !jsonObj.get("act").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `act` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("act").toString())); + } + if ((jsonObj.get("tp") != null && !jsonObj.get("tp").isJsonNull()) + && !jsonObj.get("tp").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tp` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("tp").toString())); + } + if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) + && !jsonObj.get("p").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `p` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("p").toString())); + } + if ((jsonObj.get("V") != null && !jsonObj.get("V").isJsonNull()) + && !jsonObj.get("V").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `V` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("V").toString())); + } + if ((jsonObj.get("wt") != null && !jsonObj.get("wt").isJsonNull()) + && !jsonObj.get("wt").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `wt` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("wt").toString())); + } + if ((jsonObj.get("pm") != null && !jsonObj.get("pm").isJsonNull()) + && !jsonObj.get("pm").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pm` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("pm").toString())); + } + if ((jsonObj.get("rm") != null && !jsonObj.get("rm").isJsonNull()) + && !jsonObj.get("rm").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rm` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("rm").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AlgoOrderUpdateAo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AlgoOrderUpdateAo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AlgoOrderUpdateAo.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AlgoOrderUpdateAo value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AlgoOrderUpdateAo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AlgoOrderUpdateAo given an JSON string + * + * @param jsonString JSON string + * @return An instance of AlgoOrderUpdateAo + * @throws IOException if the JSON string is invalid with respect to AlgoOrderUpdateAo + */ + public static AlgoOrderUpdateAo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AlgoOrderUpdateAo.class); + } + + /** + * Convert an instance of AlgoOrderUpdateAo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AlgoUpdate.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AlgoUpdate.java deleted file mode 100644 index 956bab733..000000000 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AlgoUpdate.java +++ /dev/null @@ -1,356 +0,0 @@ -/* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** AlgoUpdate */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AlgoUpdate extends BaseDTO { - public static final String SERIALIZED_NAME_T = "T"; - - @SerializedName(SERIALIZED_NAME_T) - @jakarta.annotation.Nullable - private Long T; - - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private Long E; - - public static final String SERIALIZED_NAME_FS = "fs"; - - @SerializedName(SERIALIZED_NAME_FS) - @jakarta.annotation.Nullable - private String fs; - - public static final String SERIALIZED_NAME_AO = "ao"; - - @SerializedName(SERIALIZED_NAME_AO) - @jakarta.annotation.Nullable - private AlgoUpdateAo ao; - - public AlgoUpdate() {} - - public AlgoUpdate T(@jakarta.annotation.Nullable Long T) { - this.T = T; - return this; - } - - /** - * Get T - * - * @return T - */ - @jakarta.annotation.Nullable - public Long getT() { - return T; - } - - public void setT(@jakarta.annotation.Nullable Long T) { - this.T = T; - } - - public AlgoUpdate E(@jakarta.annotation.Nullable Long E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public Long getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable Long E) { - this.E = E; - } - - public AlgoUpdate fs(@jakarta.annotation.Nullable String fs) { - this.fs = fs; - return this; - } - - /** - * Get fs - * - * @return fs - */ - @jakarta.annotation.Nullable - public String getFs() { - return fs; - } - - public void setFs(@jakarta.annotation.Nullable String fs) { - this.fs = fs; - } - - public AlgoUpdate ao(@jakarta.annotation.Nullable AlgoUpdateAo ao) { - this.ao = ao; - return this; - } - - /** - * Get ao - * - * @return ao - */ - @jakarta.annotation.Nullable - @Valid - public AlgoUpdateAo getAo() { - return ao; - } - - public void setAo(@jakarta.annotation.Nullable AlgoUpdateAo ao) { - this.ao = ao; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AlgoUpdate algoUpdate = (AlgoUpdate) o; - return Objects.equals(this.T, algoUpdate.T) - && Objects.equals(this.E, algoUpdate.E) - && Objects.equals(this.fs, algoUpdate.fs) - && Objects.equals(this.ao, algoUpdate.ao); - } - - @Override - public int hashCode() { - return Objects.hash(T, E, fs, ao); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AlgoUpdate {\n"); - sb.append(" T: ").append(toIndentedString(T)).append("\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" fs: ").append(toIndentedString(fs)).append("\n"); - sb.append(" ao: ").append(toIndentedString(ao)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Long TValue = getT(); - if (TValue != null) { - String TValueAsString = TValue.toString(); - valMap.put("T", TValueAsString); - } - Long EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - String fsValue = getFs(); - if (fsValue != null) { - String fsValueAsString = fsValue.toString(); - valMap.put("fs", fsValueAsString); - } - AlgoUpdateAo aoValue = getAo(); - if (aoValue != null) { - String aoValueAsString = JSON.getGson().toJson(aoValue); - valMap.put("ao", aoValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object TValue = getT(); - if (TValue != null) { - valMap.put("T", TValue); - } - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object fsValue = getFs(); - if (fsValue != null) { - valMap.put("fs", fsValue); - } - Object aoValue = getAo(); - if (aoValue != null) { - valMap.put("ao", aoValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("T"); - openapiFields.add("E"); - openapiFields.add("fs"); - openapiFields.add("ao"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AlgoUpdate - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AlgoUpdate.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AlgoUpdate is not found in the empty" - + " JSON string", - AlgoUpdate.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AlgoUpdate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AlgoUpdate` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("fs") != null && !jsonObj.get("fs").isJsonNull()) - && !jsonObj.get("fs").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `fs` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("fs").toString())); - } - // validate the optional field `ao` - if (jsonObj.get("ao") != null && !jsonObj.get("ao").isJsonNull()) { - AlgoUpdateAo.validateJsonElement(jsonObj.get("ao")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AlgoUpdate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AlgoUpdate' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AlgoUpdate.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AlgoUpdate value) throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AlgoUpdate read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AlgoUpdate given an JSON string - * - * @param jsonString JSON string - * @return An instance of AlgoUpdate - * @throws IOException if the JSON string is invalid with respect to AlgoUpdate - */ - public static AlgoUpdate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AlgoUpdate.class); - } - - /** - * Convert an instance of AlgoUpdate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AlgoUpdateAo.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AlgoUpdateAo.java deleted file mode 100644 index f8fb96571..000000000 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AlgoUpdateAo.java +++ /dev/null @@ -1,1296 +0,0 @@ -/* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** AlgoUpdateAo */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AlgoUpdateAo extends BaseDTO { - public static final String SERIALIZED_NAME_CAID = "caid"; - - @SerializedName(SERIALIZED_NAME_CAID) - @jakarta.annotation.Nullable - private String caid; - - public static final String SERIALIZED_NAME_AID = "aid"; - - @SerializedName(SERIALIZED_NAME_AID) - @jakarta.annotation.Nullable - private Long aid; - - public static final String SERIALIZED_NAME_AT = "at"; - - @SerializedName(SERIALIZED_NAME_AT) - @jakarta.annotation.Nullable - private String at; - - public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; - - @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) - @jakarta.annotation.Nullable - private String oLowerCase; - - public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; - - @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) - @jakarta.annotation.Nullable - private String sLowerCase; - - public static final String SERIALIZED_NAME_S = "S"; - - @SerializedName(SERIALIZED_NAME_S) - @jakarta.annotation.Nullable - private String S; - - public static final String SERIALIZED_NAME_PS = "ps"; - - @SerializedName(SERIALIZED_NAME_PS) - @jakarta.annotation.Nullable - private String ps; - - public static final String SERIALIZED_NAME_F_LOWER_CASE = "f"; - - @SerializedName(SERIALIZED_NAME_F_LOWER_CASE) - @jakarta.annotation.Nullable - private String fLowerCase; - - public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; - - @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) - @jakarta.annotation.Nullable - private String qLowerCase; - - public static final String SERIALIZED_NAME_X = "X"; - - @SerializedName(SERIALIZED_NAME_X) - @jakarta.annotation.Nullable - private String X; - - public static final String SERIALIZED_NAME_AI = "ai"; - - @SerializedName(SERIALIZED_NAME_AI) - @jakarta.annotation.Nullable - private String ai; - - public static final String SERIALIZED_NAME_AP = "ap"; - - @SerializedName(SERIALIZED_NAME_AP) - @jakarta.annotation.Nullable - private String ap; - - public static final String SERIALIZED_NAME_AQ = "aq"; - - @SerializedName(SERIALIZED_NAME_AQ) - @jakarta.annotation.Nullable - private String aq; - - public static final String SERIALIZED_NAME_ACT = "act"; - - @SerializedName(SERIALIZED_NAME_ACT) - @jakarta.annotation.Nullable - private String act; - - public static final String SERIALIZED_NAME_TP = "tp"; - - @SerializedName(SERIALIZED_NAME_TP) - @jakarta.annotation.Nullable - private String tp; - - public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; - - @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) - @jakarta.annotation.Nullable - private String pLowerCase; - - public static final String SERIALIZED_NAME_V = "V"; - - @SerializedName(SERIALIZED_NAME_V) - @jakarta.annotation.Nullable - private String V; - - public static final String SERIALIZED_NAME_WT = "wt"; - - @SerializedName(SERIALIZED_NAME_WT) - @jakarta.annotation.Nullable - private String wt; - - public static final String SERIALIZED_NAME_PM = "pm"; - - @SerializedName(SERIALIZED_NAME_PM) - @jakarta.annotation.Nullable - private String pm; - - public static final String SERIALIZED_NAME_CP = "cp"; - - @SerializedName(SERIALIZED_NAME_CP) - @jakarta.annotation.Nullable - private Boolean cp; - - public static final String SERIALIZED_NAME_P_P = "pP"; - - @SerializedName(SERIALIZED_NAME_P_P) - @jakarta.annotation.Nullable - private Boolean pP; - - public static final String SERIALIZED_NAME_R = "R"; - - @SerializedName(SERIALIZED_NAME_R) - @jakarta.annotation.Nullable - private Boolean R; - - public static final String SERIALIZED_NAME_TT = "tt"; - - @SerializedName(SERIALIZED_NAME_TT) - @jakarta.annotation.Nullable - private Long tt; - - public static final String SERIALIZED_NAME_GTD = "gtd"; - - @SerializedName(SERIALIZED_NAME_GTD) - @jakarta.annotation.Nullable - private Long gtd; - - public static final String SERIALIZED_NAME_RM = "rm"; - - @SerializedName(SERIALIZED_NAME_RM) - @jakarta.annotation.Nullable - private String rm; - - public AlgoUpdateAo() {} - - public AlgoUpdateAo caid(@jakarta.annotation.Nullable String caid) { - this.caid = caid; - return this; - } - - /** - * Get caid - * - * @return caid - */ - @jakarta.annotation.Nullable - public String getCaid() { - return caid; - } - - public void setCaid(@jakarta.annotation.Nullable String caid) { - this.caid = caid; - } - - public AlgoUpdateAo aid(@jakarta.annotation.Nullable Long aid) { - this.aid = aid; - return this; - } - - /** - * Get aid - * - * @return aid - */ - @jakarta.annotation.Nullable - public Long getAid() { - return aid; - } - - public void setAid(@jakarta.annotation.Nullable Long aid) { - this.aid = aid; - } - - public AlgoUpdateAo at(@jakarta.annotation.Nullable String at) { - this.at = at; - return this; - } - - /** - * Get at - * - * @return at - */ - @jakarta.annotation.Nullable - public String getAt() { - return at; - } - - public void setAt(@jakarta.annotation.Nullable String at) { - this.at = at; - } - - public AlgoUpdateAo oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { - this.oLowerCase = oLowerCase; - return this; - } - - /** - * Get oLowerCase - * - * @return oLowerCase - */ - @jakarta.annotation.Nullable - public String getoLowerCase() { - return oLowerCase; - } - - public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { - this.oLowerCase = oLowerCase; - } - - public AlgoUpdateAo sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - return this; - } - - /** - * Get sLowerCase - * - * @return sLowerCase - */ - @jakarta.annotation.Nullable - public String getsLowerCase() { - return sLowerCase; - } - - public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - } - - public AlgoUpdateAo S(@jakarta.annotation.Nullable String S) { - this.S = S; - return this; - } - - /** - * Get S - * - * @return S - */ - @jakarta.annotation.Nullable - public String getS() { - return S; - } - - public void setS(@jakarta.annotation.Nullable String S) { - this.S = S; - } - - public AlgoUpdateAo ps(@jakarta.annotation.Nullable String ps) { - this.ps = ps; - return this; - } - - /** - * Get ps - * - * @return ps - */ - @jakarta.annotation.Nullable - public String getPs() { - return ps; - } - - public void setPs(@jakarta.annotation.Nullable String ps) { - this.ps = ps; - } - - public AlgoUpdateAo fLowerCase(@jakarta.annotation.Nullable String fLowerCase) { - this.fLowerCase = fLowerCase; - return this; - } - - /** - * Get fLowerCase - * - * @return fLowerCase - */ - @jakarta.annotation.Nullable - public String getfLowerCase() { - return fLowerCase; - } - - public void setfLowerCase(@jakarta.annotation.Nullable String fLowerCase) { - this.fLowerCase = fLowerCase; - } - - public AlgoUpdateAo qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { - this.qLowerCase = qLowerCase; - return this; - } - - /** - * Get qLowerCase - * - * @return qLowerCase - */ - @jakarta.annotation.Nullable - public String getqLowerCase() { - return qLowerCase; - } - - public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { - this.qLowerCase = qLowerCase; - } - - public AlgoUpdateAo X(@jakarta.annotation.Nullable String X) { - this.X = X; - return this; - } - - /** - * Get X - * - * @return X - */ - @jakarta.annotation.Nullable - public String getX() { - return X; - } - - public void setX(@jakarta.annotation.Nullable String X) { - this.X = X; - } - - public AlgoUpdateAo ai(@jakarta.annotation.Nullable String ai) { - this.ai = ai; - return this; - } - - /** - * Get ai - * - * @return ai - */ - @jakarta.annotation.Nullable - public String getAi() { - return ai; - } - - public void setAi(@jakarta.annotation.Nullable String ai) { - this.ai = ai; - } - - public AlgoUpdateAo ap(@jakarta.annotation.Nullable String ap) { - this.ap = ap; - return this; - } - - /** - * Get ap - * - * @return ap - */ - @jakarta.annotation.Nullable - public String getAp() { - return ap; - } - - public void setAp(@jakarta.annotation.Nullable String ap) { - this.ap = ap; - } - - public AlgoUpdateAo aq(@jakarta.annotation.Nullable String aq) { - this.aq = aq; - return this; - } - - /** - * Get aq - * - * @return aq - */ - @jakarta.annotation.Nullable - public String getAq() { - return aq; - } - - public void setAq(@jakarta.annotation.Nullable String aq) { - this.aq = aq; - } - - public AlgoUpdateAo act(@jakarta.annotation.Nullable String act) { - this.act = act; - return this; - } - - /** - * Get act - * - * @return act - */ - @jakarta.annotation.Nullable - public String getAct() { - return act; - } - - public void setAct(@jakarta.annotation.Nullable String act) { - this.act = act; - } - - public AlgoUpdateAo tp(@jakarta.annotation.Nullable String tp) { - this.tp = tp; - return this; - } - - /** - * Get tp - * - * @return tp - */ - @jakarta.annotation.Nullable - public String getTp() { - return tp; - } - - public void setTp(@jakarta.annotation.Nullable String tp) { - this.tp = tp; - } - - public AlgoUpdateAo pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { - this.pLowerCase = pLowerCase; - return this; - } - - /** - * Get pLowerCase - * - * @return pLowerCase - */ - @jakarta.annotation.Nullable - public String getpLowerCase() { - return pLowerCase; - } - - public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { - this.pLowerCase = pLowerCase; - } - - public AlgoUpdateAo V(@jakarta.annotation.Nullable String V) { - this.V = V; - return this; - } - - /** - * Get V - * - * @return V - */ - @jakarta.annotation.Nullable - public String getV() { - return V; - } - - public void setV(@jakarta.annotation.Nullable String V) { - this.V = V; - } - - public AlgoUpdateAo wt(@jakarta.annotation.Nullable String wt) { - this.wt = wt; - return this; - } - - /** - * Get wt - * - * @return wt - */ - @jakarta.annotation.Nullable - public String getWt() { - return wt; - } - - public void setWt(@jakarta.annotation.Nullable String wt) { - this.wt = wt; - } - - public AlgoUpdateAo pm(@jakarta.annotation.Nullable String pm) { - this.pm = pm; - return this; - } - - /** - * Get pm - * - * @return pm - */ - @jakarta.annotation.Nullable - public String getPm() { - return pm; - } - - public void setPm(@jakarta.annotation.Nullable String pm) { - this.pm = pm; - } - - public AlgoUpdateAo cp(@jakarta.annotation.Nullable Boolean cp) { - this.cp = cp; - return this; - } - - /** - * Get cp - * - * @return cp - */ - @jakarta.annotation.Nullable - public Boolean getCp() { - return cp; - } - - public void setCp(@jakarta.annotation.Nullable Boolean cp) { - this.cp = cp; - } - - public AlgoUpdateAo pP(@jakarta.annotation.Nullable Boolean pP) { - this.pP = pP; - return this; - } - - /** - * Get pP - * - * @return pP - */ - @jakarta.annotation.Nullable - public Boolean getpP() { - return pP; - } - - public void setpP(@jakarta.annotation.Nullable Boolean pP) { - this.pP = pP; - } - - public AlgoUpdateAo R(@jakarta.annotation.Nullable Boolean R) { - this.R = R; - return this; - } - - /** - * Get R - * - * @return R - */ - @jakarta.annotation.Nullable - public Boolean getR() { - return R; - } - - public void setR(@jakarta.annotation.Nullable Boolean R) { - this.R = R; - } - - public AlgoUpdateAo tt(@jakarta.annotation.Nullable Long tt) { - this.tt = tt; - return this; - } - - /** - * Get tt - * - * @return tt - */ - @jakarta.annotation.Nullable - public Long getTt() { - return tt; - } - - public void setTt(@jakarta.annotation.Nullable Long tt) { - this.tt = tt; - } - - public AlgoUpdateAo gtd(@jakarta.annotation.Nullable Long gtd) { - this.gtd = gtd; - return this; - } - - /** - * Get gtd - * - * @return gtd - */ - @jakarta.annotation.Nullable - public Long getGtd() { - return gtd; - } - - public void setGtd(@jakarta.annotation.Nullable Long gtd) { - this.gtd = gtd; - } - - public AlgoUpdateAo rm(@jakarta.annotation.Nullable String rm) { - this.rm = rm; - return this; - } - - /** - * Get rm - * - * @return rm - */ - @jakarta.annotation.Nullable - public String getRm() { - return rm; - } - - public void setRm(@jakarta.annotation.Nullable String rm) { - this.rm = rm; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AlgoUpdateAo algoUpdateAo = (AlgoUpdateAo) o; - return Objects.equals(this.caid, algoUpdateAo.caid) - && Objects.equals(this.aid, algoUpdateAo.aid) - && Objects.equals(this.at, algoUpdateAo.at) - && Objects.equals(this.oLowerCase, algoUpdateAo.oLowerCase) - && Objects.equals(this.sLowerCase, algoUpdateAo.sLowerCase) - && Objects.equals(this.S, algoUpdateAo.S) - && Objects.equals(this.ps, algoUpdateAo.ps) - && Objects.equals(this.fLowerCase, algoUpdateAo.fLowerCase) - && Objects.equals(this.qLowerCase, algoUpdateAo.qLowerCase) - && Objects.equals(this.X, algoUpdateAo.X) - && Objects.equals(this.ai, algoUpdateAo.ai) - && Objects.equals(this.ap, algoUpdateAo.ap) - && Objects.equals(this.aq, algoUpdateAo.aq) - && Objects.equals(this.act, algoUpdateAo.act) - && Objects.equals(this.tp, algoUpdateAo.tp) - && Objects.equals(this.pLowerCase, algoUpdateAo.pLowerCase) - && Objects.equals(this.V, algoUpdateAo.V) - && Objects.equals(this.wt, algoUpdateAo.wt) - && Objects.equals(this.pm, algoUpdateAo.pm) - && Objects.equals(this.cp, algoUpdateAo.cp) - && Objects.equals(this.pP, algoUpdateAo.pP) - && Objects.equals(this.R, algoUpdateAo.R) - && Objects.equals(this.tt, algoUpdateAo.tt) - && Objects.equals(this.gtd, algoUpdateAo.gtd) - && Objects.equals(this.rm, algoUpdateAo.rm); - } - - @Override - public int hashCode() { - return Objects.hash( - caid, - aid, - at, - oLowerCase, - sLowerCase, - S, - ps, - fLowerCase, - qLowerCase, - X, - ai, - ap, - aq, - act, - tp, - pLowerCase, - V, - wt, - pm, - cp, - pP, - R, - tt, - gtd, - rm); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AlgoUpdateAo {\n"); - sb.append(" caid: ").append(toIndentedString(caid)).append("\n"); - sb.append(" aid: ").append(toIndentedString(aid)).append("\n"); - sb.append(" at: ").append(toIndentedString(at)).append("\n"); - sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); - sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); - sb.append(" S: ").append(toIndentedString(S)).append("\n"); - sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); - sb.append(" fLowerCase: ").append(toIndentedString(fLowerCase)).append("\n"); - sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); - sb.append(" X: ").append(toIndentedString(X)).append("\n"); - sb.append(" ai: ").append(toIndentedString(ai)).append("\n"); - sb.append(" ap: ").append(toIndentedString(ap)).append("\n"); - sb.append(" aq: ").append(toIndentedString(aq)).append("\n"); - sb.append(" act: ").append(toIndentedString(act)).append("\n"); - sb.append(" tp: ").append(toIndentedString(tp)).append("\n"); - sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); - sb.append(" V: ").append(toIndentedString(V)).append("\n"); - sb.append(" wt: ").append(toIndentedString(wt)).append("\n"); - sb.append(" pm: ").append(toIndentedString(pm)).append("\n"); - sb.append(" cp: ").append(toIndentedString(cp)).append("\n"); - sb.append(" pP: ").append(toIndentedString(pP)).append("\n"); - sb.append(" R: ").append(toIndentedString(R)).append("\n"); - sb.append(" tt: ").append(toIndentedString(tt)).append("\n"); - sb.append(" gtd: ").append(toIndentedString(gtd)).append("\n"); - sb.append(" rm: ").append(toIndentedString(rm)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String caidValue = getCaid(); - if (caidValue != null) { - String caidValueAsString = caidValue.toString(); - valMap.put("caid", caidValueAsString); - } - Long aidValue = getAid(); - if (aidValue != null) { - String aidValueAsString = aidValue.toString(); - valMap.put("aid", aidValueAsString); - } - String atValue = getAt(); - if (atValue != null) { - String atValueAsString = atValue.toString(); - valMap.put("at", atValueAsString); - } - String oLowerCaseValue = getoLowerCase(); - if (oLowerCaseValue != null) { - String oLowerCaseValueAsString = oLowerCaseValue.toString(); - valMap.put("oLowerCase", oLowerCaseValueAsString); - } - String sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - String sLowerCaseValueAsString = sLowerCaseValue.toString(); - valMap.put("sLowerCase", sLowerCaseValueAsString); - } - String SValue = getS(); - if (SValue != null) { - String SValueAsString = SValue.toString(); - valMap.put("S", SValueAsString); - } - String psValue = getPs(); - if (psValue != null) { - String psValueAsString = psValue.toString(); - valMap.put("ps", psValueAsString); - } - String fLowerCaseValue = getfLowerCase(); - if (fLowerCaseValue != null) { - String fLowerCaseValueAsString = fLowerCaseValue.toString(); - valMap.put("fLowerCase", fLowerCaseValueAsString); - } - String qLowerCaseValue = getqLowerCase(); - if (qLowerCaseValue != null) { - String qLowerCaseValueAsString = qLowerCaseValue.toString(); - valMap.put("qLowerCase", qLowerCaseValueAsString); - } - String XValue = getX(); - if (XValue != null) { - String XValueAsString = XValue.toString(); - valMap.put("X", XValueAsString); - } - String aiValue = getAi(); - if (aiValue != null) { - String aiValueAsString = aiValue.toString(); - valMap.put("ai", aiValueAsString); - } - String apValue = getAp(); - if (apValue != null) { - String apValueAsString = apValue.toString(); - valMap.put("ap", apValueAsString); - } - String aqValue = getAq(); - if (aqValue != null) { - String aqValueAsString = aqValue.toString(); - valMap.put("aq", aqValueAsString); - } - String actValue = getAct(); - if (actValue != null) { - String actValueAsString = actValue.toString(); - valMap.put("act", actValueAsString); - } - String tpValue = getTp(); - if (tpValue != null) { - String tpValueAsString = tpValue.toString(); - valMap.put("tp", tpValueAsString); - } - String pLowerCaseValue = getpLowerCase(); - if (pLowerCaseValue != null) { - String pLowerCaseValueAsString = pLowerCaseValue.toString(); - valMap.put("pLowerCase", pLowerCaseValueAsString); - } - String VValue = getV(); - if (VValue != null) { - String VValueAsString = VValue.toString(); - valMap.put("V", VValueAsString); - } - String wtValue = getWt(); - if (wtValue != null) { - String wtValueAsString = wtValue.toString(); - valMap.put("wt", wtValueAsString); - } - String pmValue = getPm(); - if (pmValue != null) { - String pmValueAsString = pmValue.toString(); - valMap.put("pm", pmValueAsString); - } - Boolean cpValue = getCp(); - if (cpValue != null) { - String cpValueAsString = cpValue.toString(); - valMap.put("cp", cpValueAsString); - } - Boolean pPValue = getpP(); - if (pPValue != null) { - String pPValueAsString = pPValue.toString(); - valMap.put("pP", pPValueAsString); - } - Boolean RValue = getR(); - if (RValue != null) { - String RValueAsString = RValue.toString(); - valMap.put("R", RValueAsString); - } - Long ttValue = getTt(); - if (ttValue != null) { - String ttValueAsString = ttValue.toString(); - valMap.put("tt", ttValueAsString); - } - Long gtdValue = getGtd(); - if (gtdValue != null) { - String gtdValueAsString = gtdValue.toString(); - valMap.put("gtd", gtdValueAsString); - } - String rmValue = getRm(); - if (rmValue != null) { - String rmValueAsString = rmValue.toString(); - valMap.put("rm", rmValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object caidValue = getCaid(); - if (caidValue != null) { - valMap.put("caid", caidValue); - } - Object aidValue = getAid(); - if (aidValue != null) { - valMap.put("aid", aidValue); - } - Object atValue = getAt(); - if (atValue != null) { - valMap.put("at", atValue); - } - Object oLowerCaseValue = getoLowerCase(); - if (oLowerCaseValue != null) { - valMap.put("oLowerCase", oLowerCaseValue); - } - Object sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - valMap.put("sLowerCase", sLowerCaseValue); - } - Object SValue = getS(); - if (SValue != null) { - valMap.put("S", SValue); - } - Object psValue = getPs(); - if (psValue != null) { - valMap.put("ps", psValue); - } - Object fLowerCaseValue = getfLowerCase(); - if (fLowerCaseValue != null) { - valMap.put("fLowerCase", fLowerCaseValue); - } - Object qLowerCaseValue = getqLowerCase(); - if (qLowerCaseValue != null) { - valMap.put("qLowerCase", qLowerCaseValue); - } - Object XValue = getX(); - if (XValue != null) { - valMap.put("X", XValue); - } - Object aiValue = getAi(); - if (aiValue != null) { - valMap.put("ai", aiValue); - } - Object apValue = getAp(); - if (apValue != null) { - valMap.put("ap", apValue); - } - Object aqValue = getAq(); - if (aqValue != null) { - valMap.put("aq", aqValue); - } - Object actValue = getAct(); - if (actValue != null) { - valMap.put("act", actValue); - } - Object tpValue = getTp(); - if (tpValue != null) { - valMap.put("tp", tpValue); - } - Object pLowerCaseValue = getpLowerCase(); - if (pLowerCaseValue != null) { - valMap.put("pLowerCase", pLowerCaseValue); - } - Object VValue = getV(); - if (VValue != null) { - valMap.put("V", VValue); - } - Object wtValue = getWt(); - if (wtValue != null) { - valMap.put("wt", wtValue); - } - Object pmValue = getPm(); - if (pmValue != null) { - valMap.put("pm", pmValue); - } - Object cpValue = getCp(); - if (cpValue != null) { - valMap.put("cp", cpValue); - } - Object pPValue = getpP(); - if (pPValue != null) { - valMap.put("pP", pPValue); - } - Object RValue = getR(); - if (RValue != null) { - valMap.put("R", RValue); - } - Object ttValue = getTt(); - if (ttValue != null) { - valMap.put("tt", ttValue); - } - Object gtdValue = getGtd(); - if (gtdValue != null) { - valMap.put("gtd", gtdValue); - } - Object rmValue = getRm(); - if (rmValue != null) { - valMap.put("rm", rmValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("caid"); - openapiFields.add("aid"); - openapiFields.add("at"); - openapiFields.add("o"); - openapiFields.add("s"); - openapiFields.add("S"); - openapiFields.add("ps"); - openapiFields.add("f"); - openapiFields.add("q"); - openapiFields.add("X"); - openapiFields.add("ai"); - openapiFields.add("ap"); - openapiFields.add("aq"); - openapiFields.add("act"); - openapiFields.add("tp"); - openapiFields.add("p"); - openapiFields.add("V"); - openapiFields.add("wt"); - openapiFields.add("pm"); - openapiFields.add("cp"); - openapiFields.add("pP"); - openapiFields.add("R"); - openapiFields.add("tt"); - openapiFields.add("gtd"); - openapiFields.add("rm"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AlgoUpdateAo - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AlgoUpdateAo.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AlgoUpdateAo is not found in the empty" - + " JSON string", - AlgoUpdateAo.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AlgoUpdateAo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AlgoUpdateAo` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("caid") != null && !jsonObj.get("caid").isJsonNull()) - && !jsonObj.get("caid").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `caid` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("caid").toString())); - } - if ((jsonObj.get("at") != null && !jsonObj.get("at").isJsonNull()) - && !jsonObj.get("at").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `at` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("at").toString())); - } - if ((jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) - && !jsonObj.get("o").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `o` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("o").toString())); - } - if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) - && !jsonObj.get("s").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `s` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("s").toString())); - } - if ((jsonObj.get("S") != null && !jsonObj.get("S").isJsonNull()) - && !jsonObj.get("S").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `S` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("S").toString())); - } - if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) - && !jsonObj.get("ps").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ps` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("ps").toString())); - } - if ((jsonObj.get("f") != null && !jsonObj.get("f").isJsonNull()) - && !jsonObj.get("f").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `f` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("f").toString())); - } - if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) - && !jsonObj.get("q").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `q` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("q").toString())); - } - if ((jsonObj.get("X") != null && !jsonObj.get("X").isJsonNull()) - && !jsonObj.get("X").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `X` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("X").toString())); - } - if ((jsonObj.get("ai") != null && !jsonObj.get("ai").isJsonNull()) - && !jsonObj.get("ai").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ai` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("ai").toString())); - } - if ((jsonObj.get("ap") != null && !jsonObj.get("ap").isJsonNull()) - && !jsonObj.get("ap").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ap` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("ap").toString())); - } - if ((jsonObj.get("aq") != null && !jsonObj.get("aq").isJsonNull()) - && !jsonObj.get("aq").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `aq` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("aq").toString())); - } - if ((jsonObj.get("act") != null && !jsonObj.get("act").isJsonNull()) - && !jsonObj.get("act").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `act` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("act").toString())); - } - if ((jsonObj.get("tp") != null && !jsonObj.get("tp").isJsonNull()) - && !jsonObj.get("tp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tp` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("tp").toString())); - } - if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) - && !jsonObj.get("p").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `p` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("p").toString())); - } - if ((jsonObj.get("V") != null && !jsonObj.get("V").isJsonNull()) - && !jsonObj.get("V").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `V` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("V").toString())); - } - if ((jsonObj.get("wt") != null && !jsonObj.get("wt").isJsonNull()) - && !jsonObj.get("wt").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `wt` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("wt").toString())); - } - if ((jsonObj.get("pm") != null && !jsonObj.get("pm").isJsonNull()) - && !jsonObj.get("pm").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `pm` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("pm").toString())); - } - if ((jsonObj.get("rm") != null && !jsonObj.get("rm").isJsonNull()) - && !jsonObj.get("rm").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `rm` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("rm").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AlgoUpdateAo.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AlgoUpdateAo' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AlgoUpdateAo.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AlgoUpdateAo value) throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AlgoUpdateAo read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AlgoUpdateAo given an JSON string - * - * @param jsonString JSON string - * @return An instance of AlgoUpdateAo - * @throws IOException if the JSON string is invalid with respect to AlgoUpdateAo - */ - public static AlgoUpdateAo fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AlgoUpdateAo.class); - } - - /** - * Convert an instance of AlgoUpdateAo to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/BalanceUpdate.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/BalanceUpdate.java new file mode 100644 index 000000000..df6fa2f08 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/BalanceUpdate.java @@ -0,0 +1,395 @@ +/* + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** BalanceUpdate */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class BalanceUpdate extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private String aLowerCase; + + public static final String SERIALIZED_NAME_D_LOWER_CASE = "d"; + + @SerializedName(SERIALIZED_NAME_D_LOWER_CASE) + @jakarta.annotation.Nullable + private String dLowerCase; + + public static final String SERIALIZED_NAME_U = "U"; + + @SerializedName(SERIALIZED_NAME_U) + @jakarta.annotation.Nullable + private Long U; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public BalanceUpdate() {} + + public BalanceUpdate E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public BalanceUpdate aLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + /** + * Asset + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + public String getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + } + + public BalanceUpdate dLowerCase(@jakarta.annotation.Nullable String dLowerCase) { + this.dLowerCase = dLowerCase; + return this; + } + + /** + * Balance Delta + * + * @return dLowerCase + */ + @jakarta.annotation.Nullable + public String getdLowerCase() { + return dLowerCase; + } + + public void setdLowerCase(@jakarta.annotation.Nullable String dLowerCase) { + this.dLowerCase = dLowerCase; + } + + public BalanceUpdate U(@jakarta.annotation.Nullable Long U) { + this.U = U; + return this; + } + + /** + * Event updateId + * + * @return U + */ + @jakarta.annotation.Nullable + public Long getU() { + return U; + } + + public void setU(@jakarta.annotation.Nullable Long U) { + this.U = U; + } + + public BalanceUpdate T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * Clear Time + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BalanceUpdate balanceUpdate = (BalanceUpdate) o; + return Objects.equals(this.E, balanceUpdate.E) + && Objects.equals(this.aLowerCase, balanceUpdate.aLowerCase) + && Objects.equals(this.dLowerCase, balanceUpdate.dLowerCase) + && Objects.equals(this.U, balanceUpdate.U) + && Objects.equals(this.T, balanceUpdate.T); + } + + @Override + public int hashCode() { + return Objects.hash(E, aLowerCase, dLowerCase, U, T); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BalanceUpdate {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" dLowerCase: ").append(toIndentedString(dLowerCase)).append("\n"); + sb.append(" U: ").append(toIndentedString(U)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = aLowerCaseValue.toString(); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + String dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + String dLowerCaseValueAsString = dLowerCaseValue.toString(); + valMap.put("dLowerCase", dLowerCaseValueAsString); + } + Long UValue = getU(); + if (UValue != null) { + String UValueAsString = UValue.toString(); + valMap.put("U", UValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + Object dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + valMap.put("dLowerCase", dLowerCaseValue); + } + Object UValue = getU(); + if (UValue != null) { + valMap.put("U", UValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("a"); + openapiFields.add("d"); + openapiFields.add("U"); + openapiFields.add("T"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BalanceUpdate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BalanceUpdate.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in BalanceUpdate is not found in the" + + " empty JSON string", + BalanceUpdate.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BalanceUpdate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `BalanceUpdate` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) + && !jsonObj.get("a").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `a` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("a").toString())); + } + if ((jsonObj.get("d") != null && !jsonObj.get("d").isJsonNull()) + && !jsonObj.get("d").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `d` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("d").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BalanceUpdate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BalanceUpdate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(BalanceUpdate.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, BalanceUpdate value) throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BalanceUpdate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of BalanceUpdate given an JSON string + * + * @param jsonString JSON string + * @return An instance of BalanceUpdate + * @throws IOException if the JSON string is invalid with respect to BalanceUpdate + */ + public static BalanceUpdate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BalanceUpdate.class); + } + + /** + * Convert an instance of BalanceUpdate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Balanceupdate.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Balanceupdate.java deleted file mode 100644 index 0bc984db0..000000000 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Balanceupdate.java +++ /dev/null @@ -1,395 +0,0 @@ -/* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** Balanceupdate */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Balanceupdate extends BaseDTO { - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private Long E; - - public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; - - @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) - @jakarta.annotation.Nullable - private String aLowerCase; - - public static final String SERIALIZED_NAME_D_LOWER_CASE = "d"; - - @SerializedName(SERIALIZED_NAME_D_LOWER_CASE) - @jakarta.annotation.Nullable - private String dLowerCase; - - public static final String SERIALIZED_NAME_U = "U"; - - @SerializedName(SERIALIZED_NAME_U) - @jakarta.annotation.Nullable - private Long U; - - public static final String SERIALIZED_NAME_T = "T"; - - @SerializedName(SERIALIZED_NAME_T) - @jakarta.annotation.Nullable - private Long T; - - public Balanceupdate() {} - - public Balanceupdate E(@jakarta.annotation.Nullable Long E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public Long getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable Long E) { - this.E = E; - } - - public Balanceupdate aLowerCase(@jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - return this; - } - - /** - * Get aLowerCase - * - * @return aLowerCase - */ - @jakarta.annotation.Nullable - public String getaLowerCase() { - return aLowerCase; - } - - public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - } - - public Balanceupdate dLowerCase(@jakarta.annotation.Nullable String dLowerCase) { - this.dLowerCase = dLowerCase; - return this; - } - - /** - * Get dLowerCase - * - * @return dLowerCase - */ - @jakarta.annotation.Nullable - public String getdLowerCase() { - return dLowerCase; - } - - public void setdLowerCase(@jakarta.annotation.Nullable String dLowerCase) { - this.dLowerCase = dLowerCase; - } - - public Balanceupdate U(@jakarta.annotation.Nullable Long U) { - this.U = U; - return this; - } - - /** - * Get U - * - * @return U - */ - @jakarta.annotation.Nullable - public Long getU() { - return U; - } - - public void setU(@jakarta.annotation.Nullable Long U) { - this.U = U; - } - - public Balanceupdate T(@jakarta.annotation.Nullable Long T) { - this.T = T; - return this; - } - - /** - * Get T - * - * @return T - */ - @jakarta.annotation.Nullable - public Long getT() { - return T; - } - - public void setT(@jakarta.annotation.Nullable Long T) { - this.T = T; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Balanceupdate balanceupdate = (Balanceupdate) o; - return Objects.equals(this.E, balanceupdate.E) - && Objects.equals(this.aLowerCase, balanceupdate.aLowerCase) - && Objects.equals(this.dLowerCase, balanceupdate.dLowerCase) - && Objects.equals(this.U, balanceupdate.U) - && Objects.equals(this.T, balanceupdate.T); - } - - @Override - public int hashCode() { - return Objects.hash(E, aLowerCase, dLowerCase, U, T); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Balanceupdate {\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); - sb.append(" dLowerCase: ").append(toIndentedString(dLowerCase)).append("\n"); - sb.append(" U: ").append(toIndentedString(U)).append("\n"); - sb.append(" T: ").append(toIndentedString(T)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Long EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - String aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - String aLowerCaseValueAsString = aLowerCaseValue.toString(); - valMap.put("aLowerCase", aLowerCaseValueAsString); - } - String dLowerCaseValue = getdLowerCase(); - if (dLowerCaseValue != null) { - String dLowerCaseValueAsString = dLowerCaseValue.toString(); - valMap.put("dLowerCase", dLowerCaseValueAsString); - } - Long UValue = getU(); - if (UValue != null) { - String UValueAsString = UValue.toString(); - valMap.put("U", UValueAsString); - } - Long TValue = getT(); - if (TValue != null) { - String TValueAsString = TValue.toString(); - valMap.put("T", TValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - valMap.put("aLowerCase", aLowerCaseValue); - } - Object dLowerCaseValue = getdLowerCase(); - if (dLowerCaseValue != null) { - valMap.put("dLowerCase", dLowerCaseValue); - } - Object UValue = getU(); - if (UValue != null) { - valMap.put("U", UValue); - } - Object TValue = getT(); - if (TValue != null) { - valMap.put("T", TValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("E"); - openapiFields.add("a"); - openapiFields.add("d"); - openapiFields.add("U"); - openapiFields.add("T"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Balanceupdate - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Balanceupdate.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Balanceupdate is not found in the" - + " empty JSON string", - Balanceupdate.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Balanceupdate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Balanceupdate` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) - && !jsonObj.get("a").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `a` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("a").toString())); - } - if ((jsonObj.get("d") != null && !jsonObj.get("d").isJsonNull()) - && !jsonObj.get("d").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `d` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("d").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Balanceupdate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Balanceupdate' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Balanceupdate.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Balanceupdate value) throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Balanceupdate read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Balanceupdate given an JSON string - * - * @param jsonString JSON string - * @return An instance of Balanceupdate - * @throws IOException if the JSON string is invalid with respect to Balanceupdate - */ - public static Balanceupdate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Balanceupdate.class); - } - - /** - * Convert an instance of Balanceupdate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/ConditionalOrderTradeUpdate.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/ConditionalOrderTradeUpdate.java index 97b52588d..578c9eab8 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/ConditionalOrderTradeUpdate.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/ConditionalOrderTradeUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** ConditionalOrderTradeUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ConditionalOrderTradeUpdate extends BaseDTO { public static final String SERIALIZED_NAME_T = "T"; @@ -72,7 +72,7 @@ public ConditionalOrderTradeUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ @@ -91,7 +91,7 @@ public ConditionalOrderTradeUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -110,7 +110,7 @@ public ConditionalOrderTradeUpdate fs(@jakarta.annotation.Nullable String fs) { } /** - * Get fs + * Event business unit * * @return fs */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/ConditionalOrderTradeUpdateSo.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/ConditionalOrderTradeUpdateSo.java index 69aae000e..69647def2 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/ConditionalOrderTradeUpdateSo.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/ConditionalOrderTradeUpdateSo.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** ConditionalOrderTradeUpdateSo */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ConditionalOrderTradeUpdateSo extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -174,7 +174,7 @@ public ConditionalOrderTradeUpdateSo sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -194,7 +194,7 @@ public ConditionalOrderTradeUpdateSo cLowerCase( } /** - * Get cLowerCase + * Strategy Client Order Id * * @return cLowerCase */ @@ -213,7 +213,7 @@ public ConditionalOrderTradeUpdateSo si(@jakarta.annotation.Nullable Long si) { } /** - * Get si + * Strategy ID * * @return si */ @@ -232,7 +232,7 @@ public ConditionalOrderTradeUpdateSo S(@jakarta.annotation.Nullable String S) { } /** - * Get S + * Side * * @return S */ @@ -251,7 +251,7 @@ public ConditionalOrderTradeUpdateSo st(@jakarta.annotation.Nullable String st) } /** - * Get st + * Strategy Type * * @return st */ @@ -271,7 +271,7 @@ public ConditionalOrderTradeUpdateSo fLowerCase( } /** - * Get fLowerCase + * Time in Force * * @return fLowerCase */ @@ -291,7 +291,7 @@ public ConditionalOrderTradeUpdateSo qLowerCase( } /** - * Get qLowerCase + * Quantity * * @return qLowerCase */ @@ -311,7 +311,7 @@ public ConditionalOrderTradeUpdateSo pLowerCase( } /** - * Get pLowerCase + * Price * * @return pLowerCase */ @@ -330,7 +330,7 @@ public ConditionalOrderTradeUpdateSo sp(@jakarta.annotation.Nullable String sp) } /** - * Get sp + * Stop Price. Please ignore with TRAILING_STOP_MARKET order * * @return sp */ @@ -349,7 +349,7 @@ public ConditionalOrderTradeUpdateSo os(@jakarta.annotation.Nullable String os) } /** - * Get os + * Strategy Order Status * * @return os */ @@ -368,7 +368,7 @@ public ConditionalOrderTradeUpdateSo T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Order book Time * * @return T */ @@ -387,7 +387,7 @@ public ConditionalOrderTradeUpdateSo ut(@jakarta.annotation.Nullable Long ut) { } /** - * Get ut + * Order update Time * * @return ut */ @@ -406,7 +406,7 @@ public ConditionalOrderTradeUpdateSo R(@jakarta.annotation.Nullable Boolean R) { } /** - * Get R + * Is this reduce only * * @return R */ @@ -425,7 +425,7 @@ public ConditionalOrderTradeUpdateSo wt(@jakarta.annotation.Nullable String wt) } /** - * Get wt + * Stop Price Working Type * * @return wt */ @@ -444,7 +444,7 @@ public ConditionalOrderTradeUpdateSo ps(@jakarta.annotation.Nullable String ps) } /** - * Get ps + * Position Side * * @return ps */ @@ -463,7 +463,7 @@ public ConditionalOrderTradeUpdateSo cp(@jakarta.annotation.Nullable Boolean cp) } /** - * Get cp + * If Close-All, pushed with conditional order * * @return cp */ @@ -482,7 +482,7 @@ public ConditionalOrderTradeUpdateSo AP(@jakarta.annotation.Nullable String AP) } /** - * Get AP + * Activation Price, only pushed with TRAILING_STOP_MARKET order * * @return AP */ @@ -501,7 +501,7 @@ public ConditionalOrderTradeUpdateSo cr(@jakarta.annotation.Nullable String cr) } /** - * Get cr + * Callback Rate, only pushed with TRAILING_STOP_MARKET order * * @return cr */ @@ -520,7 +520,7 @@ public ConditionalOrderTradeUpdateSo iLowerCase(@jakarta.annotation.Nullable Lon } /** - * Get iLowerCase + * Order Id * * @return iLowerCase */ @@ -539,7 +539,7 @@ public ConditionalOrderTradeUpdateSo V(@jakarta.annotation.Nullable String V) { } /** - * Get V + * STP mode * * @return V */ @@ -558,7 +558,7 @@ public ConditionalOrderTradeUpdateSo gtd(@jakarta.annotation.Nullable Long gtd) } /** - * Get gtd + * TIF GTD order auto cancel time * * @return gtd */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/ExecutionReport.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/ExecutionReport.java new file mode 100644 index 000000000..d1e3698dc --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/ExecutionReport.java @@ -0,0 +1,2179 @@ +/* + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ExecutionReport */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ExecutionReport extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; + + @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) + @jakarta.annotation.Nullable + private String cLowerCase; + + public static final String SERIALIZED_NAME_S = "S"; + + @SerializedName(SERIALIZED_NAME_S) + @jakarta.annotation.Nullable + private String S; + + public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; + + @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) + @jakarta.annotation.Nullable + private String oLowerCase; + + public static final String SERIALIZED_NAME_F_LOWER_CASE = "f"; + + @SerializedName(SERIALIZED_NAME_F_LOWER_CASE) + @jakarta.annotation.Nullable + private String fLowerCase; + + public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; + + @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) + @jakarta.annotation.Nullable + private String qLowerCase; + + public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; + + @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) + @jakarta.annotation.Nullable + private String pLowerCase; + + public static final String SERIALIZED_NAME_P = "P"; + + @SerializedName(SERIALIZED_NAME_P) + @jakarta.annotation.Nullable + private String P; + + public static final String SERIALIZED_NAME_D_LOWER_CASE = "d"; + + @SerializedName(SERIALIZED_NAME_D_LOWER_CASE) + @jakarta.annotation.Nullable + private Long dLowerCase; + + public static final String SERIALIZED_NAME_F = "F"; + + @SerializedName(SERIALIZED_NAME_F) + @jakarta.annotation.Nullable + private String F; + + public static final String SERIALIZED_NAME_G_LOWER_CASE = "g"; + + @SerializedName(SERIALIZED_NAME_G_LOWER_CASE) + @jakarta.annotation.Nullable + private Long gLowerCase; + + public static final String SERIALIZED_NAME_C = "C"; + + @SerializedName(SERIALIZED_NAME_C) + @jakarta.annotation.Nullable + private String C; + + public static final String SERIALIZED_NAME_X_LOWER_CASE = "x"; + + @SerializedName(SERIALIZED_NAME_X_LOWER_CASE) + @jakarta.annotation.Nullable + private String xLowerCase; + + public static final String SERIALIZED_NAME_X = "X"; + + @SerializedName(SERIALIZED_NAME_X) + @jakarta.annotation.Nullable + private String X; + + public static final String SERIALIZED_NAME_R_LOWER_CASE = "r"; + + @SerializedName(SERIALIZED_NAME_R_LOWER_CASE) + @jakarta.annotation.Nullable + private String rLowerCase; + + public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; + + @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) + @jakarta.annotation.Nullable + private Long iLowerCase; + + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; + + @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) + @jakarta.annotation.Nullable + private String lLowerCase; + + public static final String SERIALIZED_NAME_Z_LOWER_CASE = "z"; + + @SerializedName(SERIALIZED_NAME_Z_LOWER_CASE) + @jakarta.annotation.Nullable + private String zLowerCase; + + public static final String SERIALIZED_NAME_L = "L"; + + @SerializedName(SERIALIZED_NAME_L) + @jakarta.annotation.Nullable + private String L; + + public static final String SERIALIZED_NAME_N_LOWER_CASE = "n"; + + @SerializedName(SERIALIZED_NAME_N_LOWER_CASE) + @jakarta.annotation.Nullable + private String nLowerCase; + + public static final String SERIALIZED_NAME_N = "N"; + + @SerializedName(SERIALIZED_NAME_N) + @jakarta.annotation.Nullable + private String N; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; + + @SerializedName(SERIALIZED_NAME_T_LOWER_CASE) + @jakarta.annotation.Nullable + private Long tLowerCase; + + public static final String SERIALIZED_NAME_V_LOWER_CASE = "v"; + + @SerializedName(SERIALIZED_NAME_V_LOWER_CASE) + @jakarta.annotation.Nullable + private Long vLowerCase; + + public static final String SERIALIZED_NAME_I = "I"; + + @SerializedName(SERIALIZED_NAME_I) + @jakarta.annotation.Nullable + private Long I; + + public static final String SERIALIZED_NAME_W_LOWER_CASE = "w"; + + @SerializedName(SERIALIZED_NAME_W_LOWER_CASE) + @jakarta.annotation.Nullable + private Boolean wLowerCase; + + public static final String SERIALIZED_NAME_M_LOWER_CASE = "m"; + + @SerializedName(SERIALIZED_NAME_M_LOWER_CASE) + @jakarta.annotation.Nullable + private Boolean mLowerCase; + + public static final String SERIALIZED_NAME_O = "O"; + + @SerializedName(SERIALIZED_NAME_O) + @jakarta.annotation.Nullable + private Long O; + + public static final String SERIALIZED_NAME_Z = "Z"; + + @SerializedName(SERIALIZED_NAME_Z) + @jakarta.annotation.Nullable + private String Z; + + public static final String SERIALIZED_NAME_Y = "Y"; + + @SerializedName(SERIALIZED_NAME_Y) + @jakarta.annotation.Nullable + private String Y; + + public static final String SERIALIZED_NAME_Q = "Q"; + + @SerializedName(SERIALIZED_NAME_Q) + @jakarta.annotation.Nullable + private String Q; + + public static final String SERIALIZED_NAME_D = "D"; + + @SerializedName(SERIALIZED_NAME_D) + @jakarta.annotation.Nullable + private Long D; + + public static final String SERIALIZED_NAME_J_LOWER_CASE = "j"; + + @SerializedName(SERIALIZED_NAME_J_LOWER_CASE) + @jakarta.annotation.Nullable + private Long jLowerCase; + + public static final String SERIALIZED_NAME_J = "J"; + + @SerializedName(SERIALIZED_NAME_J) + @jakarta.annotation.Nullable + private Long J; + + public static final String SERIALIZED_NAME_W = "W"; + + @SerializedName(SERIALIZED_NAME_W) + @jakarta.annotation.Nullable + private Long W; + + public static final String SERIALIZED_NAME_V = "V"; + + @SerializedName(SERIALIZED_NAME_V) + @jakarta.annotation.Nullable + private String V; + + public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; + + @SerializedName(SERIALIZED_NAME_U_LOWER_CASE) + @jakarta.annotation.Nullable + private Long uLowerCase; + + public static final String SERIALIZED_NAME_U = "U"; + + @SerializedName(SERIALIZED_NAME_U) + @jakarta.annotation.Nullable + private Long U; + + public static final String SERIALIZED_NAME_A = "A"; + + @SerializedName(SERIALIZED_NAME_A) + @jakarta.annotation.Nullable + private String A; + + public static final String SERIALIZED_NAME_B = "B"; + + @SerializedName(SERIALIZED_NAME_B) + @jakarta.annotation.Nullable + private String B; + + public static final String SERIALIZED_NAME_CS = "Cs"; + + @SerializedName(SERIALIZED_NAME_CS) + @jakarta.annotation.Nullable + private String cs; + + public static final String SERIALIZED_NAME_PL = "pl"; + + @SerializedName(SERIALIZED_NAME_PL) + @jakarta.annotation.Nullable + private String pl; + + public static final String SERIALIZED_NAME_P_L = "pL"; + + @SerializedName(SERIALIZED_NAME_P_L) + @jakarta.annotation.Nullable + private String pL; + + public static final String SERIALIZED_NAME_P_Y = "pY"; + + @SerializedName(SERIALIZED_NAME_P_Y) + @jakarta.annotation.Nullable + private String pY; + + public static final String SERIALIZED_NAME_E_R = "eR"; + + @SerializedName(SERIALIZED_NAME_E_R) + @jakarta.annotation.Nullable + private String eR; + + public ExecutionReport() {} + + public ExecutionReport E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public ExecutionReport sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * Symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public ExecutionReport cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + return this; + } + + /** + * Client order ID + * + * @return cLowerCase + */ + @jakarta.annotation.Nullable + public String getcLowerCase() { + return cLowerCase; + } + + public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + } + + public ExecutionReport S(@jakarta.annotation.Nullable String S) { + this.S = S; + return this; + } + + /** + * Side + * + * @return S + */ + @jakarta.annotation.Nullable + public String getS() { + return S; + } + + public void setS(@jakarta.annotation.Nullable String S) { + this.S = S; + } + + public ExecutionReport oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + return this; + } + + /** + * Order type + * + * @return oLowerCase + */ + @jakarta.annotation.Nullable + public String getoLowerCase() { + return oLowerCase; + } + + public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + } + + public ExecutionReport fLowerCase(@jakarta.annotation.Nullable String fLowerCase) { + this.fLowerCase = fLowerCase; + return this; + } + + /** + * Time in force + * + * @return fLowerCase + */ + @jakarta.annotation.Nullable + public String getfLowerCase() { + return fLowerCase; + } + + public void setfLowerCase(@jakarta.annotation.Nullable String fLowerCase) { + this.fLowerCase = fLowerCase; + } + + public ExecutionReport qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + return this; + } + + /** + * Order quantity + * + * @return qLowerCase + */ + @jakarta.annotation.Nullable + public String getqLowerCase() { + return qLowerCase; + } + + public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + } + + public ExecutionReport pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + return this; + } + + /** + * Order price + * + * @return pLowerCase + */ + @jakarta.annotation.Nullable + public String getpLowerCase() { + return pLowerCase; + } + + public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + } + + public ExecutionReport P(@jakarta.annotation.Nullable String P) { + this.P = P; + return this; + } + + /** + * Stop price + * + * @return P + */ + @jakarta.annotation.Nullable + public String getP() { + return P; + } + + public void setP(@jakarta.annotation.Nullable String P) { + this.P = P; + } + + public ExecutionReport dLowerCase(@jakarta.annotation.Nullable Long dLowerCase) { + this.dLowerCase = dLowerCase; + return this; + } + + /** + * Trailing Delta; This is only visible if the order was a trailing stop order. + * + * @return dLowerCase + */ + @jakarta.annotation.Nullable + public Long getdLowerCase() { + return dLowerCase; + } + + public void setdLowerCase(@jakarta.annotation.Nullable Long dLowerCase) { + this.dLowerCase = dLowerCase; + } + + public ExecutionReport F(@jakarta.annotation.Nullable String F) { + this.F = F; + return this; + } + + /** + * Iceberg quantity; Will not be visible if not iceberg order + * + * @return F + */ + @jakarta.annotation.Nullable + public String getF() { + return F; + } + + public void setF(@jakarta.annotation.Nullable String F) { + this.F = F; + } + + public ExecutionReport gLowerCase(@jakarta.annotation.Nullable Long gLowerCase) { + this.gLowerCase = gLowerCase; + return this; + } + + /** + * OrderListId + * + * @return gLowerCase + */ + @jakarta.annotation.Nullable + public Long getgLowerCase() { + return gLowerCase; + } + + public void setgLowerCase(@jakarta.annotation.Nullable Long gLowerCase) { + this.gLowerCase = gLowerCase; + } + + public ExecutionReport C(@jakarta.annotation.Nullable String C) { + this.C = C; + return this; + } + + /** + * Original client order ID; Only visible on cancellation of order, the ID of the order being + * canceled. + * + * @return C + */ + @jakarta.annotation.Nullable + public String getC() { + return C; + } + + public void setC(@jakarta.annotation.Nullable String C) { + this.C = C; + } + + public ExecutionReport xLowerCase(@jakarta.annotation.Nullable String xLowerCase) { + this.xLowerCase = xLowerCase; + return this; + } + + /** + * Current execution type + * + * @return xLowerCase + */ + @jakarta.annotation.Nullable + public String getxLowerCase() { + return xLowerCase; + } + + public void setxLowerCase(@jakarta.annotation.Nullable String xLowerCase) { + this.xLowerCase = xLowerCase; + } + + public ExecutionReport X(@jakarta.annotation.Nullable String X) { + this.X = X; + return this; + } + + /** + * Current order status + * + * @return X + */ + @jakarta.annotation.Nullable + public String getX() { + return X; + } + + public void setX(@jakarta.annotation.Nullable String X) { + this.X = X; + } + + public ExecutionReport rLowerCase(@jakarta.annotation.Nullable String rLowerCase) { + this.rLowerCase = rLowerCase; + return this; + } + + /** + * Order reject reason; Only visible if there is a rejection, will be an error code. + * + * @return rLowerCase + */ + @jakarta.annotation.Nullable + public String getrLowerCase() { + return rLowerCase; + } + + public void setrLowerCase(@jakarta.annotation.Nullable String rLowerCase) { + this.rLowerCase = rLowerCase; + } + + public ExecutionReport iLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { + this.iLowerCase = iLowerCase; + return this; + } + + /** + * Order ID + * + * @return iLowerCase + */ + @jakarta.annotation.Nullable + public Long getiLowerCase() { + return iLowerCase; + } + + public void setiLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { + this.iLowerCase = iLowerCase; + } + + public ExecutionReport lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + return this; + } + + /** + * Last executed quantity + * + * @return lLowerCase + */ + @jakarta.annotation.Nullable + public String getlLowerCase() { + return lLowerCase; + } + + public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + } + + public ExecutionReport zLowerCase(@jakarta.annotation.Nullable String zLowerCase) { + this.zLowerCase = zLowerCase; + return this; + } + + /** + * Cumulative filled quantity + * + * @return zLowerCase + */ + @jakarta.annotation.Nullable + public String getzLowerCase() { + return zLowerCase; + } + + public void setzLowerCase(@jakarta.annotation.Nullable String zLowerCase) { + this.zLowerCase = zLowerCase; + } + + public ExecutionReport L(@jakarta.annotation.Nullable String L) { + this.L = L; + return this; + } + + /** + * Last executed price + * + * @return L + */ + @jakarta.annotation.Nullable + public String getL() { + return L; + } + + public void setL(@jakarta.annotation.Nullable String L) { + this.L = L; + } + + public ExecutionReport nLowerCase(@jakarta.annotation.Nullable String nLowerCase) { + this.nLowerCase = nLowerCase; + return this; + } + + /** + * Commission amount + * + * @return nLowerCase + */ + @jakarta.annotation.Nullable + public String getnLowerCase() { + return nLowerCase; + } + + public void setnLowerCase(@jakarta.annotation.Nullable String nLowerCase) { + this.nLowerCase = nLowerCase; + } + + public ExecutionReport N(@jakarta.annotation.Nullable String N) { + this.N = N; + return this; + } + + /** + * Commission asset; Only visible when there is a commission amount. + * + * @return N + */ + @jakarta.annotation.Nullable + public String getN() { + return N; + } + + public void setN(@jakarta.annotation.Nullable String N) { + this.N = N; + } + + public ExecutionReport T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * Transaction time + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + public ExecutionReport tLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; + return this; + } + + /** + * Trade ID + * + * @return tLowerCase + */ + @jakarta.annotation.Nullable + public Long gettLowerCase() { + return tLowerCase; + } + + public void settLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; + } + + public ExecutionReport vLowerCase(@jakarta.annotation.Nullable Long vLowerCase) { + this.vLowerCase = vLowerCase; + return this; + } + + /** + * Prevented Match Id; This is only visible if the order expire due to STP trigger. + * + * @return vLowerCase + */ + @jakarta.annotation.Nullable + public Long getvLowerCase() { + return vLowerCase; + } + + public void setvLowerCase(@jakarta.annotation.Nullable Long vLowerCase) { + this.vLowerCase = vLowerCase; + } + + public ExecutionReport I(@jakarta.annotation.Nullable Long I) { + this.I = I; + return this; + } + + /** + * updateId + * + * @return I + */ + @jakarta.annotation.Nullable + public Long getI() { + return I; + } + + public void setI(@jakarta.annotation.Nullable Long I) { + this.I = I; + } + + public ExecutionReport wLowerCase(@jakarta.annotation.Nullable Boolean wLowerCase) { + this.wLowerCase = wLowerCase; + return this; + } + + /** + * Is the order on the book? + * + * @return wLowerCase + */ + @jakarta.annotation.Nullable + public Boolean getwLowerCase() { + return wLowerCase; + } + + public void setwLowerCase(@jakarta.annotation.Nullable Boolean wLowerCase) { + this.wLowerCase = wLowerCase; + } + + public ExecutionReport mLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { + this.mLowerCase = mLowerCase; + return this; + } + + /** + * Is this trade the maker side? + * + * @return mLowerCase + */ + @jakarta.annotation.Nullable + public Boolean getmLowerCase() { + return mLowerCase; + } + + public void setmLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { + this.mLowerCase = mLowerCase; + } + + public ExecutionReport O(@jakarta.annotation.Nullable Long O) { + this.O = O; + return this; + } + + /** + * Order creation time + * + * @return O + */ + @jakarta.annotation.Nullable + public Long getO() { + return O; + } + + public void setO(@jakarta.annotation.Nullable Long O) { + this.O = O; + } + + public ExecutionReport Z(@jakarta.annotation.Nullable String Z) { + this.Z = Z; + return this; + } + + /** + * Cumulative quote asset transacted quantity + * + * @return Z + */ + @jakarta.annotation.Nullable + public String getZ() { + return Z; + } + + public void setZ(@jakarta.annotation.Nullable String Z) { + this.Z = Z; + } + + public ExecutionReport Y(@jakarta.annotation.Nullable String Y) { + this.Y = Y; + return this; + } + + /** + * Last quote asset transacted quantity (i.e. lastPrice * lastQty) + * + * @return Y + */ + @jakarta.annotation.Nullable + public String getY() { + return Y; + } + + public void setY(@jakarta.annotation.Nullable String Y) { + this.Y = Y; + } + + public ExecutionReport Q(@jakarta.annotation.Nullable String Q) { + this.Q = Q; + return this; + } + + /** + * Quote Order Quantity; This is only visible if indicated in the order + * + * @return Q + */ + @jakarta.annotation.Nullable + public String getQ() { + return Q; + } + + public void setQ(@jakarta.annotation.Nullable String Q) { + this.Q = Q; + } + + public ExecutionReport D(@jakarta.annotation.Nullable Long D) { + this.D = D; + return this; + } + + /** + * Trailing Time; This is only visible if the trailing stop order has been activated. + * + * @return D + */ + @jakarta.annotation.Nullable + public Long getD() { + return D; + } + + public void setD(@jakarta.annotation.Nullable Long D) { + this.D = D; + } + + public ExecutionReport jLowerCase(@jakarta.annotation.Nullable Long jLowerCase) { + this.jLowerCase = jLowerCase; + return this; + } + + /** + * Strategy ID; This is only visible if the strategyId parameter was provided upon order + * placement + * + * @return jLowerCase + */ + @jakarta.annotation.Nullable + public Long getjLowerCase() { + return jLowerCase; + } + + public void setjLowerCase(@jakarta.annotation.Nullable Long jLowerCase) { + this.jLowerCase = jLowerCase; + } + + public ExecutionReport J(@jakarta.annotation.Nullable Long J) { + this.J = J; + return this; + } + + /** + * Strategy Type; This is only visible if the strategyType parameter was provided upon order + * placement + * + * @return J + */ + @jakarta.annotation.Nullable + public Long getJ() { + return J; + } + + public void setJ(@jakarta.annotation.Nullable Long J) { + this.J = J; + } + + public ExecutionReport W(@jakarta.annotation.Nullable Long W) { + this.W = W; + return this; + } + + /** + * Working Time; This is only visible if the order has been placed on the book. + * + * @return W + */ + @jakarta.annotation.Nullable + public Long getW() { + return W; + } + + public void setW(@jakarta.annotation.Nullable Long W) { + this.W = W; + } + + public ExecutionReport V(@jakarta.annotation.Nullable String V) { + this.V = V; + return this; + } + + /** + * selfTradePreventionMode + * + * @return V + */ + @jakarta.annotation.Nullable + public String getV() { + return V; + } + + public void setV(@jakarta.annotation.Nullable String V) { + this.V = V; + } + + public ExecutionReport uLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + return this; + } + + /** + * TradeGroupId; This is only visible if the account is part of a trade group and the order + * expired due to STP trigger. + * + * @return uLowerCase + */ + @jakarta.annotation.Nullable + public Long getuLowerCase() { + return uLowerCase; + } + + public void setuLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + } + + public ExecutionReport U(@jakarta.annotation.Nullable Long U) { + this.U = U; + return this; + } + + /** + * CounterOrderId; This is only visible if the order expired due to STP trigger. + * + * @return U + */ + @jakarta.annotation.Nullable + public Long getU() { + return U; + } + + public void setU(@jakarta.annotation.Nullable Long U) { + this.U = U; + } + + public ExecutionReport A(@jakarta.annotation.Nullable String A) { + this.A = A; + return this; + } + + /** + * Prevented Quantity; This is only visible if the order expired due to STP trigger. + * + * @return A + */ + @jakarta.annotation.Nullable + public String getA() { + return A; + } + + public void setA(@jakarta.annotation.Nullable String A) { + this.A = A; + } + + public ExecutionReport B(@jakarta.annotation.Nullable String B) { + this.B = B; + return this; + } + + /** + * Last Prevented Quantity; This is only visible if the order expired due to STP trigger. + * + * @return B + */ + @jakarta.annotation.Nullable + public String getB() { + return B; + } + + public void setB(@jakarta.annotation.Nullable String B) { + this.B = B; + } + + public ExecutionReport cs(@jakarta.annotation.Nullable String cs) { + this.cs = cs; + return this; + } + + /** + * Counter Symbol; This is only visible if the order expired due to STP trigger. + * + * @return cs + */ + @jakarta.annotation.Nullable + public String getCs() { + return cs; + } + + public void setCs(@jakarta.annotation.Nullable String cs) { + this.cs = cs; + } + + public ExecutionReport pl(@jakarta.annotation.Nullable String pl) { + this.pl = pl; + return this; + } + + /** + * Prevented Execution Quantity; This is only visible if the order expired due to STP trigger. + * + * @return pl + */ + @jakarta.annotation.Nullable + public String getPl() { + return pl; + } + + public void setPl(@jakarta.annotation.Nullable String pl) { + this.pl = pl; + } + + public ExecutionReport pL(@jakarta.annotation.Nullable String pL) { + this.pL = pL; + return this; + } + + /** + * Prevented Execution Price; This is only visible if the order expired due to STP trigger. + * + * @return pL + */ + @jakarta.annotation.Nullable + public String getpL() { + return pL; + } + + public void setpL(@jakarta.annotation.Nullable String pL) { + this.pL = pL; + } + + public ExecutionReport pY(@jakarta.annotation.Nullable String pY) { + this.pY = pY; + return this; + } + + /** + * Prevented Execution Quote Qty; This is only visible if the order expired due to STP trigger. + * + * @return pY + */ + @jakarta.annotation.Nullable + public String getpY() { + return pY; + } + + public void setpY(@jakarta.annotation.Nullable String pY) { + this.pY = pY; + } + + public ExecutionReport eR(@jakarta.annotation.Nullable String eR) { + this.eR = eR; + return this; + } + + /** + * Expiry Reason; This is only visible if the order has expired. + * + * @return eR + */ + @jakarta.annotation.Nullable + public String geteR() { + return eR; + } + + public void seteR(@jakarta.annotation.Nullable String eR) { + this.eR = eR; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecutionReport executionReport = (ExecutionReport) o; + return Objects.equals(this.E, executionReport.E) + && Objects.equals(this.sLowerCase, executionReport.sLowerCase) + && Objects.equals(this.cLowerCase, executionReport.cLowerCase) + && Objects.equals(this.S, executionReport.S) + && Objects.equals(this.oLowerCase, executionReport.oLowerCase) + && Objects.equals(this.fLowerCase, executionReport.fLowerCase) + && Objects.equals(this.qLowerCase, executionReport.qLowerCase) + && Objects.equals(this.pLowerCase, executionReport.pLowerCase) + && Objects.equals(this.P, executionReport.P) + && Objects.equals(this.dLowerCase, executionReport.dLowerCase) + && Objects.equals(this.F, executionReport.F) + && Objects.equals(this.gLowerCase, executionReport.gLowerCase) + && Objects.equals(this.C, executionReport.C) + && Objects.equals(this.xLowerCase, executionReport.xLowerCase) + && Objects.equals(this.X, executionReport.X) + && Objects.equals(this.rLowerCase, executionReport.rLowerCase) + && Objects.equals(this.iLowerCase, executionReport.iLowerCase) + && Objects.equals(this.lLowerCase, executionReport.lLowerCase) + && Objects.equals(this.zLowerCase, executionReport.zLowerCase) + && Objects.equals(this.L, executionReport.L) + && Objects.equals(this.nLowerCase, executionReport.nLowerCase) + && Objects.equals(this.N, executionReport.N) + && Objects.equals(this.T, executionReport.T) + && Objects.equals(this.tLowerCase, executionReport.tLowerCase) + && Objects.equals(this.vLowerCase, executionReport.vLowerCase) + && Objects.equals(this.I, executionReport.I) + && Objects.equals(this.wLowerCase, executionReport.wLowerCase) + && Objects.equals(this.mLowerCase, executionReport.mLowerCase) + && Objects.equals(this.O, executionReport.O) + && Objects.equals(this.Z, executionReport.Z) + && Objects.equals(this.Y, executionReport.Y) + && Objects.equals(this.Q, executionReport.Q) + && Objects.equals(this.D, executionReport.D) + && Objects.equals(this.jLowerCase, executionReport.jLowerCase) + && Objects.equals(this.J, executionReport.J) + && Objects.equals(this.W, executionReport.W) + && Objects.equals(this.V, executionReport.V) + && Objects.equals(this.uLowerCase, executionReport.uLowerCase) + && Objects.equals(this.U, executionReport.U) + && Objects.equals(this.A, executionReport.A) + && Objects.equals(this.B, executionReport.B) + && Objects.equals(this.cs, executionReport.cs) + && Objects.equals(this.pl, executionReport.pl) + && Objects.equals(this.pL, executionReport.pL) + && Objects.equals(this.pY, executionReport.pY) + && Objects.equals(this.eR, executionReport.eR); + } + + @Override + public int hashCode() { + return Objects.hash( + E, + sLowerCase, + cLowerCase, + S, + oLowerCase, + fLowerCase, + qLowerCase, + pLowerCase, + P, + dLowerCase, + F, + gLowerCase, + C, + xLowerCase, + X, + rLowerCase, + iLowerCase, + lLowerCase, + zLowerCase, + L, + nLowerCase, + N, + T, + tLowerCase, + vLowerCase, + I, + wLowerCase, + mLowerCase, + O, + Z, + Y, + Q, + D, + jLowerCase, + J, + W, + V, + uLowerCase, + U, + A, + B, + cs, + pl, + pL, + pY, + eR); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecutionReport {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); + sb.append(" S: ").append(toIndentedString(S)).append("\n"); + sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); + sb.append(" fLowerCase: ").append(toIndentedString(fLowerCase)).append("\n"); + sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); + sb.append(" P: ").append(toIndentedString(P)).append("\n"); + sb.append(" dLowerCase: ").append(toIndentedString(dLowerCase)).append("\n"); + sb.append(" F: ").append(toIndentedString(F)).append("\n"); + sb.append(" gLowerCase: ").append(toIndentedString(gLowerCase)).append("\n"); + sb.append(" C: ").append(toIndentedString(C)).append("\n"); + sb.append(" xLowerCase: ").append(toIndentedString(xLowerCase)).append("\n"); + sb.append(" X: ").append(toIndentedString(X)).append("\n"); + sb.append(" rLowerCase: ").append(toIndentedString(rLowerCase)).append("\n"); + sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append(" zLowerCase: ").append(toIndentedString(zLowerCase)).append("\n"); + sb.append(" L: ").append(toIndentedString(L)).append("\n"); + sb.append(" nLowerCase: ").append(toIndentedString(nLowerCase)).append("\n"); + sb.append(" N: ").append(toIndentedString(N)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" tLowerCase: ").append(toIndentedString(tLowerCase)).append("\n"); + sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); + sb.append(" I: ").append(toIndentedString(I)).append("\n"); + sb.append(" wLowerCase: ").append(toIndentedString(wLowerCase)).append("\n"); + sb.append(" mLowerCase: ").append(toIndentedString(mLowerCase)).append("\n"); + sb.append(" O: ").append(toIndentedString(O)).append("\n"); + sb.append(" Z: ").append(toIndentedString(Z)).append("\n"); + sb.append(" Y: ").append(toIndentedString(Y)).append("\n"); + sb.append(" Q: ").append(toIndentedString(Q)).append("\n"); + sb.append(" D: ").append(toIndentedString(D)).append("\n"); + sb.append(" jLowerCase: ").append(toIndentedString(jLowerCase)).append("\n"); + sb.append(" J: ").append(toIndentedString(J)).append("\n"); + sb.append(" W: ").append(toIndentedString(W)).append("\n"); + sb.append(" V: ").append(toIndentedString(V)).append("\n"); + sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); + sb.append(" U: ").append(toIndentedString(U)).append("\n"); + sb.append(" A: ").append(toIndentedString(A)).append("\n"); + sb.append(" B: ").append(toIndentedString(B)).append("\n"); + sb.append(" cs: ").append(toIndentedString(cs)).append("\n"); + sb.append(" pl: ").append(toIndentedString(pl)).append("\n"); + sb.append(" pL: ").append(toIndentedString(pL)).append("\n"); + sb.append(" pY: ").append(toIndentedString(pY)).append("\n"); + sb.append(" eR: ").append(toIndentedString(eR)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + String cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + String cLowerCaseValueAsString = cLowerCaseValue.toString(); + valMap.put("cLowerCase", cLowerCaseValueAsString); + } + String SValue = getS(); + if (SValue != null) { + String SValueAsString = SValue.toString(); + valMap.put("S", SValueAsString); + } + String oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + String oLowerCaseValueAsString = oLowerCaseValue.toString(); + valMap.put("oLowerCase", oLowerCaseValueAsString); + } + String fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + String fLowerCaseValueAsString = fLowerCaseValue.toString(); + valMap.put("fLowerCase", fLowerCaseValueAsString); + } + String qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + String qLowerCaseValueAsString = qLowerCaseValue.toString(); + valMap.put("qLowerCase", qLowerCaseValueAsString); + } + String pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + String pLowerCaseValueAsString = pLowerCaseValue.toString(); + valMap.put("pLowerCase", pLowerCaseValueAsString); + } + String PValue = getP(); + if (PValue != null) { + String PValueAsString = PValue.toString(); + valMap.put("P", PValueAsString); + } + Long dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + String dLowerCaseValueAsString = dLowerCaseValue.toString(); + valMap.put("dLowerCase", dLowerCaseValueAsString); + } + String FValue = getF(); + if (FValue != null) { + String FValueAsString = FValue.toString(); + valMap.put("F", FValueAsString); + } + Long gLowerCaseValue = getgLowerCase(); + if (gLowerCaseValue != null) { + String gLowerCaseValueAsString = gLowerCaseValue.toString(); + valMap.put("gLowerCase", gLowerCaseValueAsString); + } + String CValue = getC(); + if (CValue != null) { + String CValueAsString = CValue.toString(); + valMap.put("C", CValueAsString); + } + String xLowerCaseValue = getxLowerCase(); + if (xLowerCaseValue != null) { + String xLowerCaseValueAsString = xLowerCaseValue.toString(); + valMap.put("xLowerCase", xLowerCaseValueAsString); + } + String XValue = getX(); + if (XValue != null) { + String XValueAsString = XValue.toString(); + valMap.put("X", XValueAsString); + } + String rLowerCaseValue = getrLowerCase(); + if (rLowerCaseValue != null) { + String rLowerCaseValueAsString = rLowerCaseValue.toString(); + valMap.put("rLowerCase", rLowerCaseValueAsString); + } + Long iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + String iLowerCaseValueAsString = iLowerCaseValue.toString(); + valMap.put("iLowerCase", iLowerCaseValueAsString); + } + String lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + String zLowerCaseValue = getzLowerCase(); + if (zLowerCaseValue != null) { + String zLowerCaseValueAsString = zLowerCaseValue.toString(); + valMap.put("zLowerCase", zLowerCaseValueAsString); + } + String LValue = getL(); + if (LValue != null) { + String LValueAsString = LValue.toString(); + valMap.put("L", LValueAsString); + } + String nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + String nLowerCaseValueAsString = nLowerCaseValue.toString(); + valMap.put("nLowerCase", nLowerCaseValueAsString); + } + String NValue = getN(); + if (NValue != null) { + String NValueAsString = NValue.toString(); + valMap.put("N", NValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + Long tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + String tLowerCaseValueAsString = tLowerCaseValue.toString(); + valMap.put("tLowerCase", tLowerCaseValueAsString); + } + Long vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + String vLowerCaseValueAsString = vLowerCaseValue.toString(); + valMap.put("vLowerCase", vLowerCaseValueAsString); + } + Long IValue = getI(); + if (IValue != null) { + String IValueAsString = IValue.toString(); + valMap.put("I", IValueAsString); + } + Boolean wLowerCaseValue = getwLowerCase(); + if (wLowerCaseValue != null) { + String wLowerCaseValueAsString = wLowerCaseValue.toString(); + valMap.put("wLowerCase", wLowerCaseValueAsString); + } + Boolean mLowerCaseValue = getmLowerCase(); + if (mLowerCaseValue != null) { + String mLowerCaseValueAsString = mLowerCaseValue.toString(); + valMap.put("mLowerCase", mLowerCaseValueAsString); + } + Long OValue = getO(); + if (OValue != null) { + String OValueAsString = OValue.toString(); + valMap.put("O", OValueAsString); + } + String ZValue = getZ(); + if (ZValue != null) { + String ZValueAsString = ZValue.toString(); + valMap.put("Z", ZValueAsString); + } + String YValue = getY(); + if (YValue != null) { + String YValueAsString = YValue.toString(); + valMap.put("Y", YValueAsString); + } + String QValue = getQ(); + if (QValue != null) { + String QValueAsString = QValue.toString(); + valMap.put("Q", QValueAsString); + } + Long DValue = getD(); + if (DValue != null) { + String DValueAsString = DValue.toString(); + valMap.put("D", DValueAsString); + } + Long jLowerCaseValue = getjLowerCase(); + if (jLowerCaseValue != null) { + String jLowerCaseValueAsString = jLowerCaseValue.toString(); + valMap.put("jLowerCase", jLowerCaseValueAsString); + } + Long JValue = getJ(); + if (JValue != null) { + String JValueAsString = JValue.toString(); + valMap.put("J", JValueAsString); + } + Long WValue = getW(); + if (WValue != null) { + String WValueAsString = WValue.toString(); + valMap.put("W", WValueAsString); + } + String VValue = getV(); + if (VValue != null) { + String VValueAsString = VValue.toString(); + valMap.put("V", VValueAsString); + } + Long uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + String uLowerCaseValueAsString = uLowerCaseValue.toString(); + valMap.put("uLowerCase", uLowerCaseValueAsString); + } + Long UValue = getU(); + if (UValue != null) { + String UValueAsString = UValue.toString(); + valMap.put("U", UValueAsString); + } + String AValue = getA(); + if (AValue != null) { + String AValueAsString = AValue.toString(); + valMap.put("A", AValueAsString); + } + String BValue = getB(); + if (BValue != null) { + String BValueAsString = BValue.toString(); + valMap.put("B", BValueAsString); + } + String csValue = getCs(); + if (csValue != null) { + String csValueAsString = csValue.toString(); + valMap.put("cs", csValueAsString); + } + String plValue = getPl(); + if (plValue != null) { + String plValueAsString = plValue.toString(); + valMap.put("pl", plValueAsString); + } + String pLValue = getpL(); + if (pLValue != null) { + String pLValueAsString = pLValue.toString(); + valMap.put("pL", pLValueAsString); + } + String pYValue = getpY(); + if (pYValue != null) { + String pYValueAsString = pYValue.toString(); + valMap.put("pY", pYValueAsString); + } + String eRValue = geteR(); + if (eRValue != null) { + String eRValueAsString = eRValue.toString(); + valMap.put("eR", eRValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + valMap.put("cLowerCase", cLowerCaseValue); + } + Object SValue = getS(); + if (SValue != null) { + valMap.put("S", SValue); + } + Object oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + valMap.put("oLowerCase", oLowerCaseValue); + } + Object fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + valMap.put("fLowerCase", fLowerCaseValue); + } + Object qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + valMap.put("qLowerCase", qLowerCaseValue); + } + Object pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + valMap.put("pLowerCase", pLowerCaseValue); + } + Object PValue = getP(); + if (PValue != null) { + valMap.put("P", PValue); + } + Object dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + valMap.put("dLowerCase", dLowerCaseValue); + } + Object FValue = getF(); + if (FValue != null) { + valMap.put("F", FValue); + } + Object gLowerCaseValue = getgLowerCase(); + if (gLowerCaseValue != null) { + valMap.put("gLowerCase", gLowerCaseValue); + } + Object CValue = getC(); + if (CValue != null) { + valMap.put("C", CValue); + } + Object xLowerCaseValue = getxLowerCase(); + if (xLowerCaseValue != null) { + valMap.put("xLowerCase", xLowerCaseValue); + } + Object XValue = getX(); + if (XValue != null) { + valMap.put("X", XValue); + } + Object rLowerCaseValue = getrLowerCase(); + if (rLowerCaseValue != null) { + valMap.put("rLowerCase", rLowerCaseValue); + } + Object iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + valMap.put("iLowerCase", iLowerCaseValue); + } + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); + } + Object zLowerCaseValue = getzLowerCase(); + if (zLowerCaseValue != null) { + valMap.put("zLowerCase", zLowerCaseValue); + } + Object LValue = getL(); + if (LValue != null) { + valMap.put("L", LValue); + } + Object nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + valMap.put("nLowerCase", nLowerCaseValue); + } + Object NValue = getN(); + if (NValue != null) { + valMap.put("N", NValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + Object tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + valMap.put("tLowerCase", tLowerCaseValue); + } + Object vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + valMap.put("vLowerCase", vLowerCaseValue); + } + Object IValue = getI(); + if (IValue != null) { + valMap.put("I", IValue); + } + Object wLowerCaseValue = getwLowerCase(); + if (wLowerCaseValue != null) { + valMap.put("wLowerCase", wLowerCaseValue); + } + Object mLowerCaseValue = getmLowerCase(); + if (mLowerCaseValue != null) { + valMap.put("mLowerCase", mLowerCaseValue); + } + Object OValue = getO(); + if (OValue != null) { + valMap.put("O", OValue); + } + Object ZValue = getZ(); + if (ZValue != null) { + valMap.put("Z", ZValue); + } + Object YValue = getY(); + if (YValue != null) { + valMap.put("Y", YValue); + } + Object QValue = getQ(); + if (QValue != null) { + valMap.put("Q", QValue); + } + Object DValue = getD(); + if (DValue != null) { + valMap.put("D", DValue); + } + Object jLowerCaseValue = getjLowerCase(); + if (jLowerCaseValue != null) { + valMap.put("jLowerCase", jLowerCaseValue); + } + Object JValue = getJ(); + if (JValue != null) { + valMap.put("J", JValue); + } + Object WValue = getW(); + if (WValue != null) { + valMap.put("W", WValue); + } + Object VValue = getV(); + if (VValue != null) { + valMap.put("V", VValue); + } + Object uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + valMap.put("uLowerCase", uLowerCaseValue); + } + Object UValue = getU(); + if (UValue != null) { + valMap.put("U", UValue); + } + Object AValue = getA(); + if (AValue != null) { + valMap.put("A", AValue); + } + Object BValue = getB(); + if (BValue != null) { + valMap.put("B", BValue); + } + Object csValue = getCs(); + if (csValue != null) { + valMap.put("cs", csValue); + } + Object plValue = getPl(); + if (plValue != null) { + valMap.put("pl", plValue); + } + Object pLValue = getpL(); + if (pLValue != null) { + valMap.put("pL", pLValue); + } + Object pYValue = getpY(); + if (pYValue != null) { + valMap.put("pY", pYValue); + } + Object eRValue = geteR(); + if (eRValue != null) { + valMap.put("eR", eRValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("s"); + openapiFields.add("c"); + openapiFields.add("S"); + openapiFields.add("o"); + openapiFields.add("f"); + openapiFields.add("q"); + openapiFields.add("p"); + openapiFields.add("P"); + openapiFields.add("d"); + openapiFields.add("F"); + openapiFields.add("g"); + openapiFields.add("C"); + openapiFields.add("x"); + openapiFields.add("X"); + openapiFields.add("r"); + openapiFields.add("i"); + openapiFields.add("l"); + openapiFields.add("z"); + openapiFields.add("L"); + openapiFields.add("n"); + openapiFields.add("N"); + openapiFields.add("T"); + openapiFields.add("t"); + openapiFields.add("v"); + openapiFields.add("I"); + openapiFields.add("w"); + openapiFields.add("m"); + openapiFields.add("O"); + openapiFields.add("Z"); + openapiFields.add("Y"); + openapiFields.add("Q"); + openapiFields.add("D"); + openapiFields.add("j"); + openapiFields.add("J"); + openapiFields.add("W"); + openapiFields.add("V"); + openapiFields.add("u"); + openapiFields.add("U"); + openapiFields.add("A"); + openapiFields.add("B"); + openapiFields.add("Cs"); + openapiFields.add("pl"); + openapiFields.add("pL"); + openapiFields.add("pY"); + openapiFields.add("eR"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExecutionReport + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExecutionReport.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ExecutionReport is not found in the" + + " empty JSON string", + ExecutionReport.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExecutionReport.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ExecutionReport` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) + && !jsonObj.get("c").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `c` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("c").toString())); + } + if ((jsonObj.get("S") != null && !jsonObj.get("S").isJsonNull()) + && !jsonObj.get("S").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `S` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("S").toString())); + } + if ((jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) + && !jsonObj.get("o").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `o` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("o").toString())); + } + if ((jsonObj.get("f") != null && !jsonObj.get("f").isJsonNull()) + && !jsonObj.get("f").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `f` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("f").toString())); + } + if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) + && !jsonObj.get("q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("q").toString())); + } + if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) + && !jsonObj.get("p").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `p` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("p").toString())); + } + if ((jsonObj.get("P") != null && !jsonObj.get("P").isJsonNull()) + && !jsonObj.get("P").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `P` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("P").toString())); + } + if ((jsonObj.get("F") != null && !jsonObj.get("F").isJsonNull()) + && !jsonObj.get("F").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `F` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("F").toString())); + } + if ((jsonObj.get("C") != null && !jsonObj.get("C").isJsonNull()) + && !jsonObj.get("C").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `C` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("C").toString())); + } + if ((jsonObj.get("x") != null && !jsonObj.get("x").isJsonNull()) + && !jsonObj.get("x").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `x` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("x").toString())); + } + if ((jsonObj.get("X") != null && !jsonObj.get("X").isJsonNull()) + && !jsonObj.get("X").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `X` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("X").toString())); + } + if ((jsonObj.get("r") != null && !jsonObj.get("r").isJsonNull()) + && !jsonObj.get("r").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `r` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("r").toString())); + } + if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) + && !jsonObj.get("l").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `l` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("l").toString())); + } + if ((jsonObj.get("z") != null && !jsonObj.get("z").isJsonNull()) + && !jsonObj.get("z").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `z` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("z").toString())); + } + if ((jsonObj.get("L") != null && !jsonObj.get("L").isJsonNull()) + && !jsonObj.get("L").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `L` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("L").toString())); + } + if ((jsonObj.get("n") != null && !jsonObj.get("n").isJsonNull()) + && !jsonObj.get("n").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `n` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("n").toString())); + } + if ((jsonObj.get("N") != null && !jsonObj.get("N").isJsonNull()) + && !jsonObj.get("N").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `N` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("N").toString())); + } + if ((jsonObj.get("Z") != null && !jsonObj.get("Z").isJsonNull()) + && !jsonObj.get("Z").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Z` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("Z").toString())); + } + if ((jsonObj.get("Y") != null && !jsonObj.get("Y").isJsonNull()) + && !jsonObj.get("Y").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Y` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("Y").toString())); + } + if ((jsonObj.get("Q") != null && !jsonObj.get("Q").isJsonNull()) + && !jsonObj.get("Q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("Q").toString())); + } + if ((jsonObj.get("V") != null && !jsonObj.get("V").isJsonNull()) + && !jsonObj.get("V").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `V` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("V").toString())); + } + if ((jsonObj.get("A") != null && !jsonObj.get("A").isJsonNull()) + && !jsonObj.get("A").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `A` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("A").toString())); + } + if ((jsonObj.get("B") != null && !jsonObj.get("B").isJsonNull()) + && !jsonObj.get("B").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `B` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("B").toString())); + } + if ((jsonObj.get("Cs") != null && !jsonObj.get("Cs").isJsonNull()) + && !jsonObj.get("Cs").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Cs` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("Cs").toString())); + } + if ((jsonObj.get("pl") != null && !jsonObj.get("pl").isJsonNull()) + && !jsonObj.get("pl").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pl` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("pl").toString())); + } + if ((jsonObj.get("pL") != null && !jsonObj.get("pL").isJsonNull()) + && !jsonObj.get("pL").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pL` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("pL").toString())); + } + if ((jsonObj.get("pY") != null && !jsonObj.get("pY").isJsonNull()) + && !jsonObj.get("pY").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pY` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("pY").toString())); + } + if ((jsonObj.get("eR") != null && !jsonObj.get("eR").isJsonNull()) + && !jsonObj.get("eR").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `eR` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("eR").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExecutionReport.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExecutionReport' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ExecutionReport.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ExecutionReport value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExecutionReport read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ExecutionReport given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExecutionReport + * @throws IOException if the JSON string is invalid with respect to ExecutionReport + */ + public static ExecutionReport fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExecutionReport.class); + } + + /** + * Convert an instance of ExecutionReport to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Executionreport.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Executionreport.java deleted file mode 100644 index 3f668d6b1..000000000 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Executionreport.java +++ /dev/null @@ -1,2175 +0,0 @@ -/* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** Executionreport */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Executionreport extends BaseDTO { - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private Long E; - - public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; - - @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) - @jakarta.annotation.Nullable - private String sLowerCase; - - public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; - - @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) - @jakarta.annotation.Nullable - private String cLowerCase; - - public static final String SERIALIZED_NAME_S = "S"; - - @SerializedName(SERIALIZED_NAME_S) - @jakarta.annotation.Nullable - private String S; - - public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; - - @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) - @jakarta.annotation.Nullable - private String oLowerCase; - - public static final String SERIALIZED_NAME_F_LOWER_CASE = "f"; - - @SerializedName(SERIALIZED_NAME_F_LOWER_CASE) - @jakarta.annotation.Nullable - private String fLowerCase; - - public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; - - @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) - @jakarta.annotation.Nullable - private String qLowerCase; - - public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; - - @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) - @jakarta.annotation.Nullable - private String pLowerCase; - - public static final String SERIALIZED_NAME_P = "P"; - - @SerializedName(SERIALIZED_NAME_P) - @jakarta.annotation.Nullable - private String P; - - public static final String SERIALIZED_NAME_D_LOWER_CASE = "d"; - - @SerializedName(SERIALIZED_NAME_D_LOWER_CASE) - @jakarta.annotation.Nullable - private Long dLowerCase; - - public static final String SERIALIZED_NAME_F = "F"; - - @SerializedName(SERIALIZED_NAME_F) - @jakarta.annotation.Nullable - private String F; - - public static final String SERIALIZED_NAME_G_LOWER_CASE = "g"; - - @SerializedName(SERIALIZED_NAME_G_LOWER_CASE) - @jakarta.annotation.Nullable - private Long gLowerCase; - - public static final String SERIALIZED_NAME_C = "C"; - - @SerializedName(SERIALIZED_NAME_C) - @jakarta.annotation.Nullable - private String C; - - public static final String SERIALIZED_NAME_X_LOWER_CASE = "x"; - - @SerializedName(SERIALIZED_NAME_X_LOWER_CASE) - @jakarta.annotation.Nullable - private String xLowerCase; - - public static final String SERIALIZED_NAME_X = "X"; - - @SerializedName(SERIALIZED_NAME_X) - @jakarta.annotation.Nullable - private String X; - - public static final String SERIALIZED_NAME_R_LOWER_CASE = "r"; - - @SerializedName(SERIALIZED_NAME_R_LOWER_CASE) - @jakarta.annotation.Nullable - private String rLowerCase; - - public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; - - @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) - @jakarta.annotation.Nullable - private Long iLowerCase; - - public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; - - @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) - @jakarta.annotation.Nullable - private String lLowerCase; - - public static final String SERIALIZED_NAME_Z_LOWER_CASE = "z"; - - @SerializedName(SERIALIZED_NAME_Z_LOWER_CASE) - @jakarta.annotation.Nullable - private String zLowerCase; - - public static final String SERIALIZED_NAME_L = "L"; - - @SerializedName(SERIALIZED_NAME_L) - @jakarta.annotation.Nullable - private String L; - - public static final String SERIALIZED_NAME_N_LOWER_CASE = "n"; - - @SerializedName(SERIALIZED_NAME_N_LOWER_CASE) - @jakarta.annotation.Nullable - private String nLowerCase; - - public static final String SERIALIZED_NAME_N = "N"; - - @SerializedName(SERIALIZED_NAME_N) - @jakarta.annotation.Nullable - private String N; - - public static final String SERIALIZED_NAME_T = "T"; - - @SerializedName(SERIALIZED_NAME_T) - @jakarta.annotation.Nullable - private Long T; - - public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; - - @SerializedName(SERIALIZED_NAME_T_LOWER_CASE) - @jakarta.annotation.Nullable - private Long tLowerCase; - - public static final String SERIALIZED_NAME_V_LOWER_CASE = "v"; - - @SerializedName(SERIALIZED_NAME_V_LOWER_CASE) - @jakarta.annotation.Nullable - private Long vLowerCase; - - public static final String SERIALIZED_NAME_I = "I"; - - @SerializedName(SERIALIZED_NAME_I) - @jakarta.annotation.Nullable - private Long I; - - public static final String SERIALIZED_NAME_W_LOWER_CASE = "w"; - - @SerializedName(SERIALIZED_NAME_W_LOWER_CASE) - @jakarta.annotation.Nullable - private Boolean wLowerCase; - - public static final String SERIALIZED_NAME_M_LOWER_CASE = "m"; - - @SerializedName(SERIALIZED_NAME_M_LOWER_CASE) - @jakarta.annotation.Nullable - private Boolean mLowerCase; - - public static final String SERIALIZED_NAME_O = "O"; - - @SerializedName(SERIALIZED_NAME_O) - @jakarta.annotation.Nullable - private Long O; - - public static final String SERIALIZED_NAME_Z = "Z"; - - @SerializedName(SERIALIZED_NAME_Z) - @jakarta.annotation.Nullable - private String Z; - - public static final String SERIALIZED_NAME_Y = "Y"; - - @SerializedName(SERIALIZED_NAME_Y) - @jakarta.annotation.Nullable - private String Y; - - public static final String SERIALIZED_NAME_Q = "Q"; - - @SerializedName(SERIALIZED_NAME_Q) - @jakarta.annotation.Nullable - private String Q; - - public static final String SERIALIZED_NAME_D = "D"; - - @SerializedName(SERIALIZED_NAME_D) - @jakarta.annotation.Nullable - private Long D; - - public static final String SERIALIZED_NAME_J_LOWER_CASE = "j"; - - @SerializedName(SERIALIZED_NAME_J_LOWER_CASE) - @jakarta.annotation.Nullable - private Long jLowerCase; - - public static final String SERIALIZED_NAME_J = "J"; - - @SerializedName(SERIALIZED_NAME_J) - @jakarta.annotation.Nullable - private Long J; - - public static final String SERIALIZED_NAME_W = "W"; - - @SerializedName(SERIALIZED_NAME_W) - @jakarta.annotation.Nullable - private Long W; - - public static final String SERIALIZED_NAME_V = "V"; - - @SerializedName(SERIALIZED_NAME_V) - @jakarta.annotation.Nullable - private String V; - - public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; - - @SerializedName(SERIALIZED_NAME_U_LOWER_CASE) - @jakarta.annotation.Nullable - private Long uLowerCase; - - public static final String SERIALIZED_NAME_U = "U"; - - @SerializedName(SERIALIZED_NAME_U) - @jakarta.annotation.Nullable - private Long U; - - public static final String SERIALIZED_NAME_A = "A"; - - @SerializedName(SERIALIZED_NAME_A) - @jakarta.annotation.Nullable - private String A; - - public static final String SERIALIZED_NAME_B = "B"; - - @SerializedName(SERIALIZED_NAME_B) - @jakarta.annotation.Nullable - private String B; - - public static final String SERIALIZED_NAME_CS = "Cs"; - - @SerializedName(SERIALIZED_NAME_CS) - @jakarta.annotation.Nullable - private String cs; - - public static final String SERIALIZED_NAME_PL = "pl"; - - @SerializedName(SERIALIZED_NAME_PL) - @jakarta.annotation.Nullable - private String pl; - - public static final String SERIALIZED_NAME_P_L = "pL"; - - @SerializedName(SERIALIZED_NAME_P_L) - @jakarta.annotation.Nullable - private String pL; - - public static final String SERIALIZED_NAME_P_Y = "pY"; - - @SerializedName(SERIALIZED_NAME_P_Y) - @jakarta.annotation.Nullable - private String pY; - - public static final String SERIALIZED_NAME_E_R = "eR"; - - @SerializedName(SERIALIZED_NAME_E_R) - @jakarta.annotation.Nullable - private String eR; - - public Executionreport() {} - - public Executionreport E(@jakarta.annotation.Nullable Long E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public Long getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable Long E) { - this.E = E; - } - - public Executionreport sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - return this; - } - - /** - * Get sLowerCase - * - * @return sLowerCase - */ - @jakarta.annotation.Nullable - public String getsLowerCase() { - return sLowerCase; - } - - public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - } - - public Executionreport cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { - this.cLowerCase = cLowerCase; - return this; - } - - /** - * Get cLowerCase - * - * @return cLowerCase - */ - @jakarta.annotation.Nullable - public String getcLowerCase() { - return cLowerCase; - } - - public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { - this.cLowerCase = cLowerCase; - } - - public Executionreport S(@jakarta.annotation.Nullable String S) { - this.S = S; - return this; - } - - /** - * Get S - * - * @return S - */ - @jakarta.annotation.Nullable - public String getS() { - return S; - } - - public void setS(@jakarta.annotation.Nullable String S) { - this.S = S; - } - - public Executionreport oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { - this.oLowerCase = oLowerCase; - return this; - } - - /** - * Get oLowerCase - * - * @return oLowerCase - */ - @jakarta.annotation.Nullable - public String getoLowerCase() { - return oLowerCase; - } - - public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { - this.oLowerCase = oLowerCase; - } - - public Executionreport fLowerCase(@jakarta.annotation.Nullable String fLowerCase) { - this.fLowerCase = fLowerCase; - return this; - } - - /** - * Get fLowerCase - * - * @return fLowerCase - */ - @jakarta.annotation.Nullable - public String getfLowerCase() { - return fLowerCase; - } - - public void setfLowerCase(@jakarta.annotation.Nullable String fLowerCase) { - this.fLowerCase = fLowerCase; - } - - public Executionreport qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { - this.qLowerCase = qLowerCase; - return this; - } - - /** - * Get qLowerCase - * - * @return qLowerCase - */ - @jakarta.annotation.Nullable - public String getqLowerCase() { - return qLowerCase; - } - - public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { - this.qLowerCase = qLowerCase; - } - - public Executionreport pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { - this.pLowerCase = pLowerCase; - return this; - } - - /** - * Get pLowerCase - * - * @return pLowerCase - */ - @jakarta.annotation.Nullable - public String getpLowerCase() { - return pLowerCase; - } - - public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { - this.pLowerCase = pLowerCase; - } - - public Executionreport P(@jakarta.annotation.Nullable String P) { - this.P = P; - return this; - } - - /** - * Get P - * - * @return P - */ - @jakarta.annotation.Nullable - public String getP() { - return P; - } - - public void setP(@jakarta.annotation.Nullable String P) { - this.P = P; - } - - public Executionreport dLowerCase(@jakarta.annotation.Nullable Long dLowerCase) { - this.dLowerCase = dLowerCase; - return this; - } - - /** - * Get dLowerCase - * - * @return dLowerCase - */ - @jakarta.annotation.Nullable - public Long getdLowerCase() { - return dLowerCase; - } - - public void setdLowerCase(@jakarta.annotation.Nullable Long dLowerCase) { - this.dLowerCase = dLowerCase; - } - - public Executionreport F(@jakarta.annotation.Nullable String F) { - this.F = F; - return this; - } - - /** - * Get F - * - * @return F - */ - @jakarta.annotation.Nullable - public String getF() { - return F; - } - - public void setF(@jakarta.annotation.Nullable String F) { - this.F = F; - } - - public Executionreport gLowerCase(@jakarta.annotation.Nullable Long gLowerCase) { - this.gLowerCase = gLowerCase; - return this; - } - - /** - * Get gLowerCase - * - * @return gLowerCase - */ - @jakarta.annotation.Nullable - public Long getgLowerCase() { - return gLowerCase; - } - - public void setgLowerCase(@jakarta.annotation.Nullable Long gLowerCase) { - this.gLowerCase = gLowerCase; - } - - public Executionreport C(@jakarta.annotation.Nullable String C) { - this.C = C; - return this; - } - - /** - * Get C - * - * @return C - */ - @jakarta.annotation.Nullable - public String getC() { - return C; - } - - public void setC(@jakarta.annotation.Nullable String C) { - this.C = C; - } - - public Executionreport xLowerCase(@jakarta.annotation.Nullable String xLowerCase) { - this.xLowerCase = xLowerCase; - return this; - } - - /** - * Get xLowerCase - * - * @return xLowerCase - */ - @jakarta.annotation.Nullable - public String getxLowerCase() { - return xLowerCase; - } - - public void setxLowerCase(@jakarta.annotation.Nullable String xLowerCase) { - this.xLowerCase = xLowerCase; - } - - public Executionreport X(@jakarta.annotation.Nullable String X) { - this.X = X; - return this; - } - - /** - * Get X - * - * @return X - */ - @jakarta.annotation.Nullable - public String getX() { - return X; - } - - public void setX(@jakarta.annotation.Nullable String X) { - this.X = X; - } - - public Executionreport rLowerCase(@jakarta.annotation.Nullable String rLowerCase) { - this.rLowerCase = rLowerCase; - return this; - } - - /** - * Get rLowerCase - * - * @return rLowerCase - */ - @jakarta.annotation.Nullable - public String getrLowerCase() { - return rLowerCase; - } - - public void setrLowerCase(@jakarta.annotation.Nullable String rLowerCase) { - this.rLowerCase = rLowerCase; - } - - public Executionreport iLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { - this.iLowerCase = iLowerCase; - return this; - } - - /** - * Get iLowerCase - * - * @return iLowerCase - */ - @jakarta.annotation.Nullable - public Long getiLowerCase() { - return iLowerCase; - } - - public void setiLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { - this.iLowerCase = iLowerCase; - } - - public Executionreport lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { - this.lLowerCase = lLowerCase; - return this; - } - - /** - * Get lLowerCase - * - * @return lLowerCase - */ - @jakarta.annotation.Nullable - public String getlLowerCase() { - return lLowerCase; - } - - public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { - this.lLowerCase = lLowerCase; - } - - public Executionreport zLowerCase(@jakarta.annotation.Nullable String zLowerCase) { - this.zLowerCase = zLowerCase; - return this; - } - - /** - * Get zLowerCase - * - * @return zLowerCase - */ - @jakarta.annotation.Nullable - public String getzLowerCase() { - return zLowerCase; - } - - public void setzLowerCase(@jakarta.annotation.Nullable String zLowerCase) { - this.zLowerCase = zLowerCase; - } - - public Executionreport L(@jakarta.annotation.Nullable String L) { - this.L = L; - return this; - } - - /** - * Get L - * - * @return L - */ - @jakarta.annotation.Nullable - public String getL() { - return L; - } - - public void setL(@jakarta.annotation.Nullable String L) { - this.L = L; - } - - public Executionreport nLowerCase(@jakarta.annotation.Nullable String nLowerCase) { - this.nLowerCase = nLowerCase; - return this; - } - - /** - * Get nLowerCase - * - * @return nLowerCase - */ - @jakarta.annotation.Nullable - public String getnLowerCase() { - return nLowerCase; - } - - public void setnLowerCase(@jakarta.annotation.Nullable String nLowerCase) { - this.nLowerCase = nLowerCase; - } - - public Executionreport N(@jakarta.annotation.Nullable String N) { - this.N = N; - return this; - } - - /** - * Get N - * - * @return N - */ - @jakarta.annotation.Nullable - public String getN() { - return N; - } - - public void setN(@jakarta.annotation.Nullable String N) { - this.N = N; - } - - public Executionreport T(@jakarta.annotation.Nullable Long T) { - this.T = T; - return this; - } - - /** - * Get T - * - * @return T - */ - @jakarta.annotation.Nullable - public Long getT() { - return T; - } - - public void setT(@jakarta.annotation.Nullable Long T) { - this.T = T; - } - - public Executionreport tLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { - this.tLowerCase = tLowerCase; - return this; - } - - /** - * Get tLowerCase - * - * @return tLowerCase - */ - @jakarta.annotation.Nullable - public Long gettLowerCase() { - return tLowerCase; - } - - public void settLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { - this.tLowerCase = tLowerCase; - } - - public Executionreport vLowerCase(@jakarta.annotation.Nullable Long vLowerCase) { - this.vLowerCase = vLowerCase; - return this; - } - - /** - * Get vLowerCase - * - * @return vLowerCase - */ - @jakarta.annotation.Nullable - public Long getvLowerCase() { - return vLowerCase; - } - - public void setvLowerCase(@jakarta.annotation.Nullable Long vLowerCase) { - this.vLowerCase = vLowerCase; - } - - public Executionreport I(@jakarta.annotation.Nullable Long I) { - this.I = I; - return this; - } - - /** - * Get I - * - * @return I - */ - @jakarta.annotation.Nullable - public Long getI() { - return I; - } - - public void setI(@jakarta.annotation.Nullable Long I) { - this.I = I; - } - - public Executionreport wLowerCase(@jakarta.annotation.Nullable Boolean wLowerCase) { - this.wLowerCase = wLowerCase; - return this; - } - - /** - * Get wLowerCase - * - * @return wLowerCase - */ - @jakarta.annotation.Nullable - public Boolean getwLowerCase() { - return wLowerCase; - } - - public void setwLowerCase(@jakarta.annotation.Nullable Boolean wLowerCase) { - this.wLowerCase = wLowerCase; - } - - public Executionreport mLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { - this.mLowerCase = mLowerCase; - return this; - } - - /** - * Get mLowerCase - * - * @return mLowerCase - */ - @jakarta.annotation.Nullable - public Boolean getmLowerCase() { - return mLowerCase; - } - - public void setmLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { - this.mLowerCase = mLowerCase; - } - - public Executionreport O(@jakarta.annotation.Nullable Long O) { - this.O = O; - return this; - } - - /** - * Get O - * - * @return O - */ - @jakarta.annotation.Nullable - public Long getO() { - return O; - } - - public void setO(@jakarta.annotation.Nullable Long O) { - this.O = O; - } - - public Executionreport Z(@jakarta.annotation.Nullable String Z) { - this.Z = Z; - return this; - } - - /** - * Get Z - * - * @return Z - */ - @jakarta.annotation.Nullable - public String getZ() { - return Z; - } - - public void setZ(@jakarta.annotation.Nullable String Z) { - this.Z = Z; - } - - public Executionreport Y(@jakarta.annotation.Nullable String Y) { - this.Y = Y; - return this; - } - - /** - * Get Y - * - * @return Y - */ - @jakarta.annotation.Nullable - public String getY() { - return Y; - } - - public void setY(@jakarta.annotation.Nullable String Y) { - this.Y = Y; - } - - public Executionreport Q(@jakarta.annotation.Nullable String Q) { - this.Q = Q; - return this; - } - - /** - * Get Q - * - * @return Q - */ - @jakarta.annotation.Nullable - public String getQ() { - return Q; - } - - public void setQ(@jakarta.annotation.Nullable String Q) { - this.Q = Q; - } - - public Executionreport D(@jakarta.annotation.Nullable Long D) { - this.D = D; - return this; - } - - /** - * Get D - * - * @return D - */ - @jakarta.annotation.Nullable - public Long getD() { - return D; - } - - public void setD(@jakarta.annotation.Nullable Long D) { - this.D = D; - } - - public Executionreport jLowerCase(@jakarta.annotation.Nullable Long jLowerCase) { - this.jLowerCase = jLowerCase; - return this; - } - - /** - * Get jLowerCase - * - * @return jLowerCase - */ - @jakarta.annotation.Nullable - public Long getjLowerCase() { - return jLowerCase; - } - - public void setjLowerCase(@jakarta.annotation.Nullable Long jLowerCase) { - this.jLowerCase = jLowerCase; - } - - public Executionreport J(@jakarta.annotation.Nullable Long J) { - this.J = J; - return this; - } - - /** - * Get J - * - * @return J - */ - @jakarta.annotation.Nullable - public Long getJ() { - return J; - } - - public void setJ(@jakarta.annotation.Nullable Long J) { - this.J = J; - } - - public Executionreport W(@jakarta.annotation.Nullable Long W) { - this.W = W; - return this; - } - - /** - * Get W - * - * @return W - */ - @jakarta.annotation.Nullable - public Long getW() { - return W; - } - - public void setW(@jakarta.annotation.Nullable Long W) { - this.W = W; - } - - public Executionreport V(@jakarta.annotation.Nullable String V) { - this.V = V; - return this; - } - - /** - * Get V - * - * @return V - */ - @jakarta.annotation.Nullable - public String getV() { - return V; - } - - public void setV(@jakarta.annotation.Nullable String V) { - this.V = V; - } - - public Executionreport uLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { - this.uLowerCase = uLowerCase; - return this; - } - - /** - * Get uLowerCase - * - * @return uLowerCase - */ - @jakarta.annotation.Nullable - public Long getuLowerCase() { - return uLowerCase; - } - - public void setuLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { - this.uLowerCase = uLowerCase; - } - - public Executionreport U(@jakarta.annotation.Nullable Long U) { - this.U = U; - return this; - } - - /** - * Get U - * - * @return U - */ - @jakarta.annotation.Nullable - public Long getU() { - return U; - } - - public void setU(@jakarta.annotation.Nullable Long U) { - this.U = U; - } - - public Executionreport A(@jakarta.annotation.Nullable String A) { - this.A = A; - return this; - } - - /** - * Get A - * - * @return A - */ - @jakarta.annotation.Nullable - public String getA() { - return A; - } - - public void setA(@jakarta.annotation.Nullable String A) { - this.A = A; - } - - public Executionreport B(@jakarta.annotation.Nullable String B) { - this.B = B; - return this; - } - - /** - * Get B - * - * @return B - */ - @jakarta.annotation.Nullable - public String getB() { - return B; - } - - public void setB(@jakarta.annotation.Nullable String B) { - this.B = B; - } - - public Executionreport cs(@jakarta.annotation.Nullable String cs) { - this.cs = cs; - return this; - } - - /** - * Get cs - * - * @return cs - */ - @jakarta.annotation.Nullable - public String getCs() { - return cs; - } - - public void setCs(@jakarta.annotation.Nullable String cs) { - this.cs = cs; - } - - public Executionreport pl(@jakarta.annotation.Nullable String pl) { - this.pl = pl; - return this; - } - - /** - * Get pl - * - * @return pl - */ - @jakarta.annotation.Nullable - public String getPl() { - return pl; - } - - public void setPl(@jakarta.annotation.Nullable String pl) { - this.pl = pl; - } - - public Executionreport pL(@jakarta.annotation.Nullable String pL) { - this.pL = pL; - return this; - } - - /** - * Get pL - * - * @return pL - */ - @jakarta.annotation.Nullable - public String getpL() { - return pL; - } - - public void setpL(@jakarta.annotation.Nullable String pL) { - this.pL = pL; - } - - public Executionreport pY(@jakarta.annotation.Nullable String pY) { - this.pY = pY; - return this; - } - - /** - * Get pY - * - * @return pY - */ - @jakarta.annotation.Nullable - public String getpY() { - return pY; - } - - public void setpY(@jakarta.annotation.Nullable String pY) { - this.pY = pY; - } - - public Executionreport eR(@jakarta.annotation.Nullable String eR) { - this.eR = eR; - return this; - } - - /** - * Get eR - * - * @return eR - */ - @jakarta.annotation.Nullable - public String geteR() { - return eR; - } - - public void seteR(@jakarta.annotation.Nullable String eR) { - this.eR = eR; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Executionreport executionreport = (Executionreport) o; - return Objects.equals(this.E, executionreport.E) - && Objects.equals(this.sLowerCase, executionreport.sLowerCase) - && Objects.equals(this.cLowerCase, executionreport.cLowerCase) - && Objects.equals(this.S, executionreport.S) - && Objects.equals(this.oLowerCase, executionreport.oLowerCase) - && Objects.equals(this.fLowerCase, executionreport.fLowerCase) - && Objects.equals(this.qLowerCase, executionreport.qLowerCase) - && Objects.equals(this.pLowerCase, executionreport.pLowerCase) - && Objects.equals(this.P, executionreport.P) - && Objects.equals(this.dLowerCase, executionreport.dLowerCase) - && Objects.equals(this.F, executionreport.F) - && Objects.equals(this.gLowerCase, executionreport.gLowerCase) - && Objects.equals(this.C, executionreport.C) - && Objects.equals(this.xLowerCase, executionreport.xLowerCase) - && Objects.equals(this.X, executionreport.X) - && Objects.equals(this.rLowerCase, executionreport.rLowerCase) - && Objects.equals(this.iLowerCase, executionreport.iLowerCase) - && Objects.equals(this.lLowerCase, executionreport.lLowerCase) - && Objects.equals(this.zLowerCase, executionreport.zLowerCase) - && Objects.equals(this.L, executionreport.L) - && Objects.equals(this.nLowerCase, executionreport.nLowerCase) - && Objects.equals(this.N, executionreport.N) - && Objects.equals(this.T, executionreport.T) - && Objects.equals(this.tLowerCase, executionreport.tLowerCase) - && Objects.equals(this.vLowerCase, executionreport.vLowerCase) - && Objects.equals(this.I, executionreport.I) - && Objects.equals(this.wLowerCase, executionreport.wLowerCase) - && Objects.equals(this.mLowerCase, executionreport.mLowerCase) - && Objects.equals(this.O, executionreport.O) - && Objects.equals(this.Z, executionreport.Z) - && Objects.equals(this.Y, executionreport.Y) - && Objects.equals(this.Q, executionreport.Q) - && Objects.equals(this.D, executionreport.D) - && Objects.equals(this.jLowerCase, executionreport.jLowerCase) - && Objects.equals(this.J, executionreport.J) - && Objects.equals(this.W, executionreport.W) - && Objects.equals(this.V, executionreport.V) - && Objects.equals(this.uLowerCase, executionreport.uLowerCase) - && Objects.equals(this.U, executionreport.U) - && Objects.equals(this.A, executionreport.A) - && Objects.equals(this.B, executionreport.B) - && Objects.equals(this.cs, executionreport.cs) - && Objects.equals(this.pl, executionreport.pl) - && Objects.equals(this.pL, executionreport.pL) - && Objects.equals(this.pY, executionreport.pY) - && Objects.equals(this.eR, executionreport.eR); - } - - @Override - public int hashCode() { - return Objects.hash( - E, - sLowerCase, - cLowerCase, - S, - oLowerCase, - fLowerCase, - qLowerCase, - pLowerCase, - P, - dLowerCase, - F, - gLowerCase, - C, - xLowerCase, - X, - rLowerCase, - iLowerCase, - lLowerCase, - zLowerCase, - L, - nLowerCase, - N, - T, - tLowerCase, - vLowerCase, - I, - wLowerCase, - mLowerCase, - O, - Z, - Y, - Q, - D, - jLowerCase, - J, - W, - V, - uLowerCase, - U, - A, - B, - cs, - pl, - pL, - pY, - eR); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Executionreport {\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); - sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); - sb.append(" S: ").append(toIndentedString(S)).append("\n"); - sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); - sb.append(" fLowerCase: ").append(toIndentedString(fLowerCase)).append("\n"); - sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); - sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); - sb.append(" P: ").append(toIndentedString(P)).append("\n"); - sb.append(" dLowerCase: ").append(toIndentedString(dLowerCase)).append("\n"); - sb.append(" F: ").append(toIndentedString(F)).append("\n"); - sb.append(" gLowerCase: ").append(toIndentedString(gLowerCase)).append("\n"); - sb.append(" C: ").append(toIndentedString(C)).append("\n"); - sb.append(" xLowerCase: ").append(toIndentedString(xLowerCase)).append("\n"); - sb.append(" X: ").append(toIndentedString(X)).append("\n"); - sb.append(" rLowerCase: ").append(toIndentedString(rLowerCase)).append("\n"); - sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); - sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); - sb.append(" zLowerCase: ").append(toIndentedString(zLowerCase)).append("\n"); - sb.append(" L: ").append(toIndentedString(L)).append("\n"); - sb.append(" nLowerCase: ").append(toIndentedString(nLowerCase)).append("\n"); - sb.append(" N: ").append(toIndentedString(N)).append("\n"); - sb.append(" T: ").append(toIndentedString(T)).append("\n"); - sb.append(" tLowerCase: ").append(toIndentedString(tLowerCase)).append("\n"); - sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); - sb.append(" I: ").append(toIndentedString(I)).append("\n"); - sb.append(" wLowerCase: ").append(toIndentedString(wLowerCase)).append("\n"); - sb.append(" mLowerCase: ").append(toIndentedString(mLowerCase)).append("\n"); - sb.append(" O: ").append(toIndentedString(O)).append("\n"); - sb.append(" Z: ").append(toIndentedString(Z)).append("\n"); - sb.append(" Y: ").append(toIndentedString(Y)).append("\n"); - sb.append(" Q: ").append(toIndentedString(Q)).append("\n"); - sb.append(" D: ").append(toIndentedString(D)).append("\n"); - sb.append(" jLowerCase: ").append(toIndentedString(jLowerCase)).append("\n"); - sb.append(" J: ").append(toIndentedString(J)).append("\n"); - sb.append(" W: ").append(toIndentedString(W)).append("\n"); - sb.append(" V: ").append(toIndentedString(V)).append("\n"); - sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); - sb.append(" U: ").append(toIndentedString(U)).append("\n"); - sb.append(" A: ").append(toIndentedString(A)).append("\n"); - sb.append(" B: ").append(toIndentedString(B)).append("\n"); - sb.append(" cs: ").append(toIndentedString(cs)).append("\n"); - sb.append(" pl: ").append(toIndentedString(pl)).append("\n"); - sb.append(" pL: ").append(toIndentedString(pL)).append("\n"); - sb.append(" pY: ").append(toIndentedString(pY)).append("\n"); - sb.append(" eR: ").append(toIndentedString(eR)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Long EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - String sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - String sLowerCaseValueAsString = sLowerCaseValue.toString(); - valMap.put("sLowerCase", sLowerCaseValueAsString); - } - String cLowerCaseValue = getcLowerCase(); - if (cLowerCaseValue != null) { - String cLowerCaseValueAsString = cLowerCaseValue.toString(); - valMap.put("cLowerCase", cLowerCaseValueAsString); - } - String SValue = getS(); - if (SValue != null) { - String SValueAsString = SValue.toString(); - valMap.put("S", SValueAsString); - } - String oLowerCaseValue = getoLowerCase(); - if (oLowerCaseValue != null) { - String oLowerCaseValueAsString = oLowerCaseValue.toString(); - valMap.put("oLowerCase", oLowerCaseValueAsString); - } - String fLowerCaseValue = getfLowerCase(); - if (fLowerCaseValue != null) { - String fLowerCaseValueAsString = fLowerCaseValue.toString(); - valMap.put("fLowerCase", fLowerCaseValueAsString); - } - String qLowerCaseValue = getqLowerCase(); - if (qLowerCaseValue != null) { - String qLowerCaseValueAsString = qLowerCaseValue.toString(); - valMap.put("qLowerCase", qLowerCaseValueAsString); - } - String pLowerCaseValue = getpLowerCase(); - if (pLowerCaseValue != null) { - String pLowerCaseValueAsString = pLowerCaseValue.toString(); - valMap.put("pLowerCase", pLowerCaseValueAsString); - } - String PValue = getP(); - if (PValue != null) { - String PValueAsString = PValue.toString(); - valMap.put("P", PValueAsString); - } - Long dLowerCaseValue = getdLowerCase(); - if (dLowerCaseValue != null) { - String dLowerCaseValueAsString = dLowerCaseValue.toString(); - valMap.put("dLowerCase", dLowerCaseValueAsString); - } - String FValue = getF(); - if (FValue != null) { - String FValueAsString = FValue.toString(); - valMap.put("F", FValueAsString); - } - Long gLowerCaseValue = getgLowerCase(); - if (gLowerCaseValue != null) { - String gLowerCaseValueAsString = gLowerCaseValue.toString(); - valMap.put("gLowerCase", gLowerCaseValueAsString); - } - String CValue = getC(); - if (CValue != null) { - String CValueAsString = CValue.toString(); - valMap.put("C", CValueAsString); - } - String xLowerCaseValue = getxLowerCase(); - if (xLowerCaseValue != null) { - String xLowerCaseValueAsString = xLowerCaseValue.toString(); - valMap.put("xLowerCase", xLowerCaseValueAsString); - } - String XValue = getX(); - if (XValue != null) { - String XValueAsString = XValue.toString(); - valMap.put("X", XValueAsString); - } - String rLowerCaseValue = getrLowerCase(); - if (rLowerCaseValue != null) { - String rLowerCaseValueAsString = rLowerCaseValue.toString(); - valMap.put("rLowerCase", rLowerCaseValueAsString); - } - Long iLowerCaseValue = getiLowerCase(); - if (iLowerCaseValue != null) { - String iLowerCaseValueAsString = iLowerCaseValue.toString(); - valMap.put("iLowerCase", iLowerCaseValueAsString); - } - String lLowerCaseValue = getlLowerCase(); - if (lLowerCaseValue != null) { - String lLowerCaseValueAsString = lLowerCaseValue.toString(); - valMap.put("lLowerCase", lLowerCaseValueAsString); - } - String zLowerCaseValue = getzLowerCase(); - if (zLowerCaseValue != null) { - String zLowerCaseValueAsString = zLowerCaseValue.toString(); - valMap.put("zLowerCase", zLowerCaseValueAsString); - } - String LValue = getL(); - if (LValue != null) { - String LValueAsString = LValue.toString(); - valMap.put("L", LValueAsString); - } - String nLowerCaseValue = getnLowerCase(); - if (nLowerCaseValue != null) { - String nLowerCaseValueAsString = nLowerCaseValue.toString(); - valMap.put("nLowerCase", nLowerCaseValueAsString); - } - String NValue = getN(); - if (NValue != null) { - String NValueAsString = NValue.toString(); - valMap.put("N", NValueAsString); - } - Long TValue = getT(); - if (TValue != null) { - String TValueAsString = TValue.toString(); - valMap.put("T", TValueAsString); - } - Long tLowerCaseValue = gettLowerCase(); - if (tLowerCaseValue != null) { - String tLowerCaseValueAsString = tLowerCaseValue.toString(); - valMap.put("tLowerCase", tLowerCaseValueAsString); - } - Long vLowerCaseValue = getvLowerCase(); - if (vLowerCaseValue != null) { - String vLowerCaseValueAsString = vLowerCaseValue.toString(); - valMap.put("vLowerCase", vLowerCaseValueAsString); - } - Long IValue = getI(); - if (IValue != null) { - String IValueAsString = IValue.toString(); - valMap.put("I", IValueAsString); - } - Boolean wLowerCaseValue = getwLowerCase(); - if (wLowerCaseValue != null) { - String wLowerCaseValueAsString = wLowerCaseValue.toString(); - valMap.put("wLowerCase", wLowerCaseValueAsString); - } - Boolean mLowerCaseValue = getmLowerCase(); - if (mLowerCaseValue != null) { - String mLowerCaseValueAsString = mLowerCaseValue.toString(); - valMap.put("mLowerCase", mLowerCaseValueAsString); - } - Long OValue = getO(); - if (OValue != null) { - String OValueAsString = OValue.toString(); - valMap.put("O", OValueAsString); - } - String ZValue = getZ(); - if (ZValue != null) { - String ZValueAsString = ZValue.toString(); - valMap.put("Z", ZValueAsString); - } - String YValue = getY(); - if (YValue != null) { - String YValueAsString = YValue.toString(); - valMap.put("Y", YValueAsString); - } - String QValue = getQ(); - if (QValue != null) { - String QValueAsString = QValue.toString(); - valMap.put("Q", QValueAsString); - } - Long DValue = getD(); - if (DValue != null) { - String DValueAsString = DValue.toString(); - valMap.put("D", DValueAsString); - } - Long jLowerCaseValue = getjLowerCase(); - if (jLowerCaseValue != null) { - String jLowerCaseValueAsString = jLowerCaseValue.toString(); - valMap.put("jLowerCase", jLowerCaseValueAsString); - } - Long JValue = getJ(); - if (JValue != null) { - String JValueAsString = JValue.toString(); - valMap.put("J", JValueAsString); - } - Long WValue = getW(); - if (WValue != null) { - String WValueAsString = WValue.toString(); - valMap.put("W", WValueAsString); - } - String VValue = getV(); - if (VValue != null) { - String VValueAsString = VValue.toString(); - valMap.put("V", VValueAsString); - } - Long uLowerCaseValue = getuLowerCase(); - if (uLowerCaseValue != null) { - String uLowerCaseValueAsString = uLowerCaseValue.toString(); - valMap.put("uLowerCase", uLowerCaseValueAsString); - } - Long UValue = getU(); - if (UValue != null) { - String UValueAsString = UValue.toString(); - valMap.put("U", UValueAsString); - } - String AValue = getA(); - if (AValue != null) { - String AValueAsString = AValue.toString(); - valMap.put("A", AValueAsString); - } - String BValue = getB(); - if (BValue != null) { - String BValueAsString = BValue.toString(); - valMap.put("B", BValueAsString); - } - String csValue = getCs(); - if (csValue != null) { - String csValueAsString = csValue.toString(); - valMap.put("cs", csValueAsString); - } - String plValue = getPl(); - if (plValue != null) { - String plValueAsString = plValue.toString(); - valMap.put("pl", plValueAsString); - } - String pLValue = getpL(); - if (pLValue != null) { - String pLValueAsString = pLValue.toString(); - valMap.put("pL", pLValueAsString); - } - String pYValue = getpY(); - if (pYValue != null) { - String pYValueAsString = pYValue.toString(); - valMap.put("pY", pYValueAsString); - } - String eRValue = geteR(); - if (eRValue != null) { - String eRValueAsString = eRValue.toString(); - valMap.put("eR", eRValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - valMap.put("sLowerCase", sLowerCaseValue); - } - Object cLowerCaseValue = getcLowerCase(); - if (cLowerCaseValue != null) { - valMap.put("cLowerCase", cLowerCaseValue); - } - Object SValue = getS(); - if (SValue != null) { - valMap.put("S", SValue); - } - Object oLowerCaseValue = getoLowerCase(); - if (oLowerCaseValue != null) { - valMap.put("oLowerCase", oLowerCaseValue); - } - Object fLowerCaseValue = getfLowerCase(); - if (fLowerCaseValue != null) { - valMap.put("fLowerCase", fLowerCaseValue); - } - Object qLowerCaseValue = getqLowerCase(); - if (qLowerCaseValue != null) { - valMap.put("qLowerCase", qLowerCaseValue); - } - Object pLowerCaseValue = getpLowerCase(); - if (pLowerCaseValue != null) { - valMap.put("pLowerCase", pLowerCaseValue); - } - Object PValue = getP(); - if (PValue != null) { - valMap.put("P", PValue); - } - Object dLowerCaseValue = getdLowerCase(); - if (dLowerCaseValue != null) { - valMap.put("dLowerCase", dLowerCaseValue); - } - Object FValue = getF(); - if (FValue != null) { - valMap.put("F", FValue); - } - Object gLowerCaseValue = getgLowerCase(); - if (gLowerCaseValue != null) { - valMap.put("gLowerCase", gLowerCaseValue); - } - Object CValue = getC(); - if (CValue != null) { - valMap.put("C", CValue); - } - Object xLowerCaseValue = getxLowerCase(); - if (xLowerCaseValue != null) { - valMap.put("xLowerCase", xLowerCaseValue); - } - Object XValue = getX(); - if (XValue != null) { - valMap.put("X", XValue); - } - Object rLowerCaseValue = getrLowerCase(); - if (rLowerCaseValue != null) { - valMap.put("rLowerCase", rLowerCaseValue); - } - Object iLowerCaseValue = getiLowerCase(); - if (iLowerCaseValue != null) { - valMap.put("iLowerCase", iLowerCaseValue); - } - Object lLowerCaseValue = getlLowerCase(); - if (lLowerCaseValue != null) { - valMap.put("lLowerCase", lLowerCaseValue); - } - Object zLowerCaseValue = getzLowerCase(); - if (zLowerCaseValue != null) { - valMap.put("zLowerCase", zLowerCaseValue); - } - Object LValue = getL(); - if (LValue != null) { - valMap.put("L", LValue); - } - Object nLowerCaseValue = getnLowerCase(); - if (nLowerCaseValue != null) { - valMap.put("nLowerCase", nLowerCaseValue); - } - Object NValue = getN(); - if (NValue != null) { - valMap.put("N", NValue); - } - Object TValue = getT(); - if (TValue != null) { - valMap.put("T", TValue); - } - Object tLowerCaseValue = gettLowerCase(); - if (tLowerCaseValue != null) { - valMap.put("tLowerCase", tLowerCaseValue); - } - Object vLowerCaseValue = getvLowerCase(); - if (vLowerCaseValue != null) { - valMap.put("vLowerCase", vLowerCaseValue); - } - Object IValue = getI(); - if (IValue != null) { - valMap.put("I", IValue); - } - Object wLowerCaseValue = getwLowerCase(); - if (wLowerCaseValue != null) { - valMap.put("wLowerCase", wLowerCaseValue); - } - Object mLowerCaseValue = getmLowerCase(); - if (mLowerCaseValue != null) { - valMap.put("mLowerCase", mLowerCaseValue); - } - Object OValue = getO(); - if (OValue != null) { - valMap.put("O", OValue); - } - Object ZValue = getZ(); - if (ZValue != null) { - valMap.put("Z", ZValue); - } - Object YValue = getY(); - if (YValue != null) { - valMap.put("Y", YValue); - } - Object QValue = getQ(); - if (QValue != null) { - valMap.put("Q", QValue); - } - Object DValue = getD(); - if (DValue != null) { - valMap.put("D", DValue); - } - Object jLowerCaseValue = getjLowerCase(); - if (jLowerCaseValue != null) { - valMap.put("jLowerCase", jLowerCaseValue); - } - Object JValue = getJ(); - if (JValue != null) { - valMap.put("J", JValue); - } - Object WValue = getW(); - if (WValue != null) { - valMap.put("W", WValue); - } - Object VValue = getV(); - if (VValue != null) { - valMap.put("V", VValue); - } - Object uLowerCaseValue = getuLowerCase(); - if (uLowerCaseValue != null) { - valMap.put("uLowerCase", uLowerCaseValue); - } - Object UValue = getU(); - if (UValue != null) { - valMap.put("U", UValue); - } - Object AValue = getA(); - if (AValue != null) { - valMap.put("A", AValue); - } - Object BValue = getB(); - if (BValue != null) { - valMap.put("B", BValue); - } - Object csValue = getCs(); - if (csValue != null) { - valMap.put("cs", csValue); - } - Object plValue = getPl(); - if (plValue != null) { - valMap.put("pl", plValue); - } - Object pLValue = getpL(); - if (pLValue != null) { - valMap.put("pL", pLValue); - } - Object pYValue = getpY(); - if (pYValue != null) { - valMap.put("pY", pYValue); - } - Object eRValue = geteR(); - if (eRValue != null) { - valMap.put("eR", eRValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("E"); - openapiFields.add("s"); - openapiFields.add("c"); - openapiFields.add("S"); - openapiFields.add("o"); - openapiFields.add("f"); - openapiFields.add("q"); - openapiFields.add("p"); - openapiFields.add("P"); - openapiFields.add("d"); - openapiFields.add("F"); - openapiFields.add("g"); - openapiFields.add("C"); - openapiFields.add("x"); - openapiFields.add("X"); - openapiFields.add("r"); - openapiFields.add("i"); - openapiFields.add("l"); - openapiFields.add("z"); - openapiFields.add("L"); - openapiFields.add("n"); - openapiFields.add("N"); - openapiFields.add("T"); - openapiFields.add("t"); - openapiFields.add("v"); - openapiFields.add("I"); - openapiFields.add("w"); - openapiFields.add("m"); - openapiFields.add("O"); - openapiFields.add("Z"); - openapiFields.add("Y"); - openapiFields.add("Q"); - openapiFields.add("D"); - openapiFields.add("j"); - openapiFields.add("J"); - openapiFields.add("W"); - openapiFields.add("V"); - openapiFields.add("u"); - openapiFields.add("U"); - openapiFields.add("A"); - openapiFields.add("B"); - openapiFields.add("Cs"); - openapiFields.add("pl"); - openapiFields.add("pL"); - openapiFields.add("pY"); - openapiFields.add("eR"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Executionreport - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Executionreport.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Executionreport is not found in the" - + " empty JSON string", - Executionreport.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Executionreport.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Executionreport` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) - && !jsonObj.get("s").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `s` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("s").toString())); - } - if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) - && !jsonObj.get("c").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `c` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("c").toString())); - } - if ((jsonObj.get("S") != null && !jsonObj.get("S").isJsonNull()) - && !jsonObj.get("S").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `S` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("S").toString())); - } - if ((jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) - && !jsonObj.get("o").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `o` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("o").toString())); - } - if ((jsonObj.get("f") != null && !jsonObj.get("f").isJsonNull()) - && !jsonObj.get("f").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `f` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("f").toString())); - } - if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) - && !jsonObj.get("q").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `q` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("q").toString())); - } - if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) - && !jsonObj.get("p").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `p` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("p").toString())); - } - if ((jsonObj.get("P") != null && !jsonObj.get("P").isJsonNull()) - && !jsonObj.get("P").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `P` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("P").toString())); - } - if ((jsonObj.get("F") != null && !jsonObj.get("F").isJsonNull()) - && !jsonObj.get("F").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `F` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("F").toString())); - } - if ((jsonObj.get("C") != null && !jsonObj.get("C").isJsonNull()) - && !jsonObj.get("C").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `C` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("C").toString())); - } - if ((jsonObj.get("x") != null && !jsonObj.get("x").isJsonNull()) - && !jsonObj.get("x").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `x` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("x").toString())); - } - if ((jsonObj.get("X") != null && !jsonObj.get("X").isJsonNull()) - && !jsonObj.get("X").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `X` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("X").toString())); - } - if ((jsonObj.get("r") != null && !jsonObj.get("r").isJsonNull()) - && !jsonObj.get("r").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `r` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("r").toString())); - } - if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) - && !jsonObj.get("l").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `l` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("l").toString())); - } - if ((jsonObj.get("z") != null && !jsonObj.get("z").isJsonNull()) - && !jsonObj.get("z").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `z` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("z").toString())); - } - if ((jsonObj.get("L") != null && !jsonObj.get("L").isJsonNull()) - && !jsonObj.get("L").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `L` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("L").toString())); - } - if ((jsonObj.get("n") != null && !jsonObj.get("n").isJsonNull()) - && !jsonObj.get("n").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `n` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("n").toString())); - } - if ((jsonObj.get("N") != null && !jsonObj.get("N").isJsonNull()) - && !jsonObj.get("N").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `N` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("N").toString())); - } - if ((jsonObj.get("Z") != null && !jsonObj.get("Z").isJsonNull()) - && !jsonObj.get("Z").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Z` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("Z").toString())); - } - if ((jsonObj.get("Y") != null && !jsonObj.get("Y").isJsonNull()) - && !jsonObj.get("Y").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Y` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("Y").toString())); - } - if ((jsonObj.get("Q") != null && !jsonObj.get("Q").isJsonNull()) - && !jsonObj.get("Q").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Q` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("Q").toString())); - } - if ((jsonObj.get("V") != null && !jsonObj.get("V").isJsonNull()) - && !jsonObj.get("V").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `V` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("V").toString())); - } - if ((jsonObj.get("A") != null && !jsonObj.get("A").isJsonNull()) - && !jsonObj.get("A").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `A` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("A").toString())); - } - if ((jsonObj.get("B") != null && !jsonObj.get("B").isJsonNull()) - && !jsonObj.get("B").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `B` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("B").toString())); - } - if ((jsonObj.get("Cs") != null && !jsonObj.get("Cs").isJsonNull()) - && !jsonObj.get("Cs").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Cs` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("Cs").toString())); - } - if ((jsonObj.get("pl") != null && !jsonObj.get("pl").isJsonNull()) - && !jsonObj.get("pl").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `pl` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("pl").toString())); - } - if ((jsonObj.get("pL") != null && !jsonObj.get("pL").isJsonNull()) - && !jsonObj.get("pL").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `pL` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("pL").toString())); - } - if ((jsonObj.get("pY") != null && !jsonObj.get("pY").isJsonNull()) - && !jsonObj.get("pY").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `pY` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("pY").toString())); - } - if ((jsonObj.get("eR") != null && !jsonObj.get("eR").isJsonNull()) - && !jsonObj.get("eR").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `eR` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("eR").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Executionreport.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Executionreport' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Executionreport.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Executionreport value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Executionreport read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Executionreport given an JSON string - * - * @param jsonString JSON string - * @return An instance of Executionreport - * @throws IOException if the JSON string is invalid with respect to Executionreport - */ - public static Executionreport fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Executionreport.class); - } - - /** - * Convert an instance of Executionreport to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/LiabilityChange.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/LiabilityChange.java new file mode 100644 index 000000000..194c31eff --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/LiabilityChange.java @@ -0,0 +1,494 @@ +/* + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** LiabilityChange */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class LiabilityChange extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private String aLowerCase; + + public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; + + @SerializedName(SERIALIZED_NAME_T_LOWER_CASE) + @jakarta.annotation.Nullable + private String tLowerCase; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; + + @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) + @jakarta.annotation.Nullable + private String pLowerCase; + + public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; + + @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) + @jakarta.annotation.Nullable + private String iLowerCase; + + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; + + @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) + @jakarta.annotation.Nullable + private String lLowerCase; + + public LiabilityChange() {} + + public LiabilityChange E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public LiabilityChange aLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + /** + * Asset + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + public String getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + } + + public LiabilityChange tLowerCase(@jakarta.annotation.Nullable String tLowerCase) { + this.tLowerCase = tLowerCase; + return this; + } + + /** + * Type + * + * @return tLowerCase + */ + @jakarta.annotation.Nullable + public String gettLowerCase() { + return tLowerCase; + } + + public void settLowerCase(@jakarta.annotation.Nullable String tLowerCase) { + this.tLowerCase = tLowerCase; + } + + public LiabilityChange T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * Transaction ID + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + public LiabilityChange pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + return this; + } + + /** + * Principal + * + * @return pLowerCase + */ + @jakarta.annotation.Nullable + public String getpLowerCase() { + return pLowerCase; + } + + public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + } + + public LiabilityChange iLowerCase(@jakarta.annotation.Nullable String iLowerCase) { + this.iLowerCase = iLowerCase; + return this; + } + + /** + * Interest + * + * @return iLowerCase + */ + @jakarta.annotation.Nullable + public String getiLowerCase() { + return iLowerCase; + } + + public void setiLowerCase(@jakarta.annotation.Nullable String iLowerCase) { + this.iLowerCase = iLowerCase; + } + + public LiabilityChange lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + return this; + } + + /** + * Total Liability + * + * @return lLowerCase + */ + @jakarta.annotation.Nullable + public String getlLowerCase() { + return lLowerCase; + } + + public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LiabilityChange liabilityChange = (LiabilityChange) o; + return Objects.equals(this.E, liabilityChange.E) + && Objects.equals(this.aLowerCase, liabilityChange.aLowerCase) + && Objects.equals(this.tLowerCase, liabilityChange.tLowerCase) + && Objects.equals(this.T, liabilityChange.T) + && Objects.equals(this.pLowerCase, liabilityChange.pLowerCase) + && Objects.equals(this.iLowerCase, liabilityChange.iLowerCase) + && Objects.equals(this.lLowerCase, liabilityChange.lLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash(E, aLowerCase, tLowerCase, T, pLowerCase, iLowerCase, lLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LiabilityChange {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" tLowerCase: ").append(toIndentedString(tLowerCase)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); + sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = aLowerCaseValue.toString(); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + String tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + String tLowerCaseValueAsString = tLowerCaseValue.toString(); + valMap.put("tLowerCase", tLowerCaseValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + String pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + String pLowerCaseValueAsString = pLowerCaseValue.toString(); + valMap.put("pLowerCase", pLowerCaseValueAsString); + } + String iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + String iLowerCaseValueAsString = iLowerCaseValue.toString(); + valMap.put("iLowerCase", iLowerCaseValueAsString); + } + String lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + Object tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + valMap.put("tLowerCase", tLowerCaseValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + Object pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + valMap.put("pLowerCase", pLowerCaseValue); + } + Object iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + valMap.put("iLowerCase", iLowerCaseValue); + } + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("a"); + openapiFields.add("t"); + openapiFields.add("T"); + openapiFields.add("p"); + openapiFields.add("i"); + openapiFields.add("l"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LiabilityChange + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LiabilityChange.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in LiabilityChange is not found in the" + + " empty JSON string", + LiabilityChange.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LiabilityChange.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `LiabilityChange` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) + && !jsonObj.get("a").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `a` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("a").toString())); + } + if ((jsonObj.get("t") != null && !jsonObj.get("t").isJsonNull()) + && !jsonObj.get("t").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `t` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("t").toString())); + } + if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) + && !jsonObj.get("p").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `p` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("p").toString())); + } + if ((jsonObj.get("i") != null && !jsonObj.get("i").isJsonNull()) + && !jsonObj.get("i").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `i` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("i").toString())); + } + if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) + && !jsonObj.get("l").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `l` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("l").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LiabilityChange.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LiabilityChange' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(LiabilityChange.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, LiabilityChange value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LiabilityChange read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of LiabilityChange given an JSON string + * + * @param jsonString JSON string + * @return An instance of LiabilityChange + * @throws IOException if the JSON string is invalid with respect to LiabilityChange + */ + public static LiabilityChange fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LiabilityChange.class); + } + + /** + * Convert an instance of LiabilityChange to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Liabilitychange.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Liabilitychange.java deleted file mode 100644 index 2be716bc1..000000000 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Liabilitychange.java +++ /dev/null @@ -1,494 +0,0 @@ -/* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** Liabilitychange */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Liabilitychange extends BaseDTO { - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private Long E; - - public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; - - @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) - @jakarta.annotation.Nullable - private String aLowerCase; - - public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; - - @SerializedName(SERIALIZED_NAME_T_LOWER_CASE) - @jakarta.annotation.Nullable - private String tLowerCase; - - public static final String SERIALIZED_NAME_T = "T"; - - @SerializedName(SERIALIZED_NAME_T) - @jakarta.annotation.Nullable - private Long T; - - public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; - - @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) - @jakarta.annotation.Nullable - private String pLowerCase; - - public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; - - @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) - @jakarta.annotation.Nullable - private String iLowerCase; - - public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; - - @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) - @jakarta.annotation.Nullable - private String lLowerCase; - - public Liabilitychange() {} - - public Liabilitychange E(@jakarta.annotation.Nullable Long E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public Long getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable Long E) { - this.E = E; - } - - public Liabilitychange aLowerCase(@jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - return this; - } - - /** - * Get aLowerCase - * - * @return aLowerCase - */ - @jakarta.annotation.Nullable - public String getaLowerCase() { - return aLowerCase; - } - - public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - } - - public Liabilitychange tLowerCase(@jakarta.annotation.Nullable String tLowerCase) { - this.tLowerCase = tLowerCase; - return this; - } - - /** - * Get tLowerCase - * - * @return tLowerCase - */ - @jakarta.annotation.Nullable - public String gettLowerCase() { - return tLowerCase; - } - - public void settLowerCase(@jakarta.annotation.Nullable String tLowerCase) { - this.tLowerCase = tLowerCase; - } - - public Liabilitychange T(@jakarta.annotation.Nullable Long T) { - this.T = T; - return this; - } - - /** - * Get T - * - * @return T - */ - @jakarta.annotation.Nullable - public Long getT() { - return T; - } - - public void setT(@jakarta.annotation.Nullable Long T) { - this.T = T; - } - - public Liabilitychange pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { - this.pLowerCase = pLowerCase; - return this; - } - - /** - * Get pLowerCase - * - * @return pLowerCase - */ - @jakarta.annotation.Nullable - public String getpLowerCase() { - return pLowerCase; - } - - public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { - this.pLowerCase = pLowerCase; - } - - public Liabilitychange iLowerCase(@jakarta.annotation.Nullable String iLowerCase) { - this.iLowerCase = iLowerCase; - return this; - } - - /** - * Get iLowerCase - * - * @return iLowerCase - */ - @jakarta.annotation.Nullable - public String getiLowerCase() { - return iLowerCase; - } - - public void setiLowerCase(@jakarta.annotation.Nullable String iLowerCase) { - this.iLowerCase = iLowerCase; - } - - public Liabilitychange lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { - this.lLowerCase = lLowerCase; - return this; - } - - /** - * Get lLowerCase - * - * @return lLowerCase - */ - @jakarta.annotation.Nullable - public String getlLowerCase() { - return lLowerCase; - } - - public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { - this.lLowerCase = lLowerCase; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Liabilitychange liabilitychange = (Liabilitychange) o; - return Objects.equals(this.E, liabilitychange.E) - && Objects.equals(this.aLowerCase, liabilitychange.aLowerCase) - && Objects.equals(this.tLowerCase, liabilitychange.tLowerCase) - && Objects.equals(this.T, liabilitychange.T) - && Objects.equals(this.pLowerCase, liabilitychange.pLowerCase) - && Objects.equals(this.iLowerCase, liabilitychange.iLowerCase) - && Objects.equals(this.lLowerCase, liabilitychange.lLowerCase); - } - - @Override - public int hashCode() { - return Objects.hash(E, aLowerCase, tLowerCase, T, pLowerCase, iLowerCase, lLowerCase); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Liabilitychange {\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); - sb.append(" tLowerCase: ").append(toIndentedString(tLowerCase)).append("\n"); - sb.append(" T: ").append(toIndentedString(T)).append("\n"); - sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); - sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); - sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Long EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - String aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - String aLowerCaseValueAsString = aLowerCaseValue.toString(); - valMap.put("aLowerCase", aLowerCaseValueAsString); - } - String tLowerCaseValue = gettLowerCase(); - if (tLowerCaseValue != null) { - String tLowerCaseValueAsString = tLowerCaseValue.toString(); - valMap.put("tLowerCase", tLowerCaseValueAsString); - } - Long TValue = getT(); - if (TValue != null) { - String TValueAsString = TValue.toString(); - valMap.put("T", TValueAsString); - } - String pLowerCaseValue = getpLowerCase(); - if (pLowerCaseValue != null) { - String pLowerCaseValueAsString = pLowerCaseValue.toString(); - valMap.put("pLowerCase", pLowerCaseValueAsString); - } - String iLowerCaseValue = getiLowerCase(); - if (iLowerCaseValue != null) { - String iLowerCaseValueAsString = iLowerCaseValue.toString(); - valMap.put("iLowerCase", iLowerCaseValueAsString); - } - String lLowerCaseValue = getlLowerCase(); - if (lLowerCaseValue != null) { - String lLowerCaseValueAsString = lLowerCaseValue.toString(); - valMap.put("lLowerCase", lLowerCaseValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - valMap.put("aLowerCase", aLowerCaseValue); - } - Object tLowerCaseValue = gettLowerCase(); - if (tLowerCaseValue != null) { - valMap.put("tLowerCase", tLowerCaseValue); - } - Object TValue = getT(); - if (TValue != null) { - valMap.put("T", TValue); - } - Object pLowerCaseValue = getpLowerCase(); - if (pLowerCaseValue != null) { - valMap.put("pLowerCase", pLowerCaseValue); - } - Object iLowerCaseValue = getiLowerCase(); - if (iLowerCaseValue != null) { - valMap.put("iLowerCase", iLowerCaseValue); - } - Object lLowerCaseValue = getlLowerCase(); - if (lLowerCaseValue != null) { - valMap.put("lLowerCase", lLowerCaseValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("E"); - openapiFields.add("a"); - openapiFields.add("t"); - openapiFields.add("T"); - openapiFields.add("p"); - openapiFields.add("i"); - openapiFields.add("l"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Liabilitychange - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Liabilitychange.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Liabilitychange is not found in the" - + " empty JSON string", - Liabilitychange.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Liabilitychange.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Liabilitychange` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) - && !jsonObj.get("a").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `a` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("a").toString())); - } - if ((jsonObj.get("t") != null && !jsonObj.get("t").isJsonNull()) - && !jsonObj.get("t").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `t` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("t").toString())); - } - if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) - && !jsonObj.get("p").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `p` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("p").toString())); - } - if ((jsonObj.get("i") != null && !jsonObj.get("i").isJsonNull()) - && !jsonObj.get("i").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `i` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("i").toString())); - } - if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) - && !jsonObj.get("l").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `l` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("l").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Liabilitychange.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Liabilitychange' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Liabilitychange.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Liabilitychange value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Liabilitychange read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Liabilitychange given an JSON string - * - * @param jsonString JSON string - * @return An instance of Liabilitychange - * @throws IOException if the JSON string is invalid with respect to Liabilitychange - */ - public static Liabilitychange fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Liabilitychange.class); - } - - /** - * Convert an instance of Liabilitychange to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/ListenKeyExpired.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/ListenKeyExpired.java new file mode 100644 index 000000000..f8eec7a17 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/ListenKeyExpired.java @@ -0,0 +1,232 @@ +/* + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ListenKeyExpired */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ListenKeyExpired extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public ListenKeyExpired() {} + + public ListenKeyExpired E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListenKeyExpired listenKeyExpired = (ListenKeyExpired) o; + return Objects.equals(this.E, listenKeyExpired.E); + } + + @Override + public int hashCode() { + return Objects.hash(E); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListenKeyExpired {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ListenKeyExpired + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ListenKeyExpired.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ListenKeyExpired is not found in the" + + " empty JSON string", + ListenKeyExpired.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ListenKeyExpired.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ListenKeyExpired` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ListenKeyExpired.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ListenKeyExpired' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ListenKeyExpired.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ListenKeyExpired value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ListenKeyExpired read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ListenKeyExpired given an JSON string + * + * @param jsonString JSON string + * @return An instance of ListenKeyExpired + * @throws IOException if the JSON string is invalid with respect to ListenKeyExpired + */ + public static ListenKeyExpired fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ListenKeyExpired.class); + } + + /** + * Convert an instance of ListenKeyExpired to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Listenkeyexpired.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Listenkeyexpired.java deleted file mode 100644 index 43c392a23..000000000 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Listenkeyexpired.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** Listenkeyexpired */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Listenkeyexpired extends BaseDTO { - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private Long E; - - public Listenkeyexpired() {} - - public Listenkeyexpired E(@jakarta.annotation.Nullable Long E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public Long getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable Long E) { - this.E = E; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Listenkeyexpired listenkeyexpired = (Listenkeyexpired) o; - return Objects.equals(this.E, listenkeyexpired.E); - } - - @Override - public int hashCode() { - return Objects.hash(E); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Listenkeyexpired {\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Long EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("E"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Listenkeyexpired - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Listenkeyexpired.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Listenkeyexpired is not found in the" - + " empty JSON string", - Listenkeyexpired.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Listenkeyexpired.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Listenkeyexpired` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Listenkeyexpired.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Listenkeyexpired' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Listenkeyexpired.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Listenkeyexpired value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Listenkeyexpired read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Listenkeyexpired given an JSON string - * - * @param jsonString JSON string - * @return An instance of Listenkeyexpired - * @throws IOException if the JSON string is invalid with respect to Listenkeyexpired - */ - public static Listenkeyexpired fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Listenkeyexpired.class); - } - - /** - * Convert an instance of Listenkeyexpired to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OpenOrderLoss.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OpenOrderLoss.java new file mode 100644 index 000000000..121eeff83 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OpenOrderLoss.java @@ -0,0 +1,299 @@ +/* + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** OpenOrderLoss */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OpenOrderLoss extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_O = "O"; + + @SerializedName(SERIALIZED_NAME_O) + @jakarta.annotation.Nullable + private List<@Valid OpenOrderLossOInner> O; + + public OpenOrderLoss() {} + + public OpenOrderLoss E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public OpenOrderLoss O(@jakarta.annotation.Nullable List<@Valid OpenOrderLossOInner> O) { + this.O = O; + return this; + } + + public OpenOrderLoss addOItem(OpenOrderLossOInner OItem) { + if (this.O == null) { + this.O = new ArrayList<>(); + } + this.O.add(OItem); + return this; + } + + /** + * Update Data + * + * @return O + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid OpenOrderLossOInner> getO() { + return O; + } + + public void setO(@jakarta.annotation.Nullable List<@Valid OpenOrderLossOInner> O) { + this.O = O; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenOrderLoss openOrderLoss = (OpenOrderLoss) o; + return Objects.equals(this.E, openOrderLoss.E) && Objects.equals(this.O, openOrderLoss.O); + } + + @Override + public int hashCode() { + return Objects.hash(E, O); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenOrderLoss {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" O: ").append(toIndentedString(O)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + List<@Valid OpenOrderLossOInner> OValue = getO(); + if (OValue != null) { + String OValueAsString = JSON.getGson().toJson(OValue); + valMap.put("O", OValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object OValue = getO(); + if (OValue != null) { + valMap.put("O", OValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("O"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpenOrderLoss + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpenOrderLoss.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OpenOrderLoss is not found in the" + + " empty JSON string", + OpenOrderLoss.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OpenOrderLoss.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OpenOrderLoss` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("O") != null && !jsonObj.get("O").isJsonNull()) { + JsonArray jsonArrayO = jsonObj.getAsJsonArray("O"); + if (jsonArrayO != null) { + // ensure the json data is an array + if (!jsonObj.get("O").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `O` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("O").toString())); + } + + // validate the optional field `O` (array) + for (int i = 0; i < jsonArrayO.size(); i++) { + OpenOrderLossOInner.validateJsonElement(jsonArrayO.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpenOrderLoss.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenOrderLoss' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(OpenOrderLoss.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OpenOrderLoss value) throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OpenOrderLoss read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OpenOrderLoss given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenOrderLoss + * @throws IOException if the JSON string is invalid with respect to OpenOrderLoss + */ + public static OpenOrderLoss fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenOrderLoss.class); + } + + /** + * Convert an instance of OpenOrderLoss to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OpenOrderLossOInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OpenOrderLossOInner.java new file mode 100644 index 000000000..6d076021b --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OpenOrderLossOInner.java @@ -0,0 +1,285 @@ +/* + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** OpenOrderLossOInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OpenOrderLossOInner extends BaseDTO { + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private String aLowerCase; + + public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; + + @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) + @jakarta.annotation.Nullable + private String oLowerCase; + + public OpenOrderLossOInner() {} + + public OpenOrderLossOInner aLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + /** + * Asset + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + public String getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + } + + public OpenOrderLossOInner oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + return this; + } + + /** + * Amount + * + * @return oLowerCase + */ + @jakarta.annotation.Nullable + public String getoLowerCase() { + return oLowerCase; + } + + public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenOrderLossOInner openOrderLossOInner = (OpenOrderLossOInner) o; + return Objects.equals(this.aLowerCase, openOrderLossOInner.aLowerCase) + && Objects.equals(this.oLowerCase, openOrderLossOInner.oLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash(aLowerCase, oLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenOrderLossOInner {\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = aLowerCaseValue.toString(); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + String oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + String oLowerCaseValueAsString = oLowerCaseValue.toString(); + valMap.put("oLowerCase", oLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + Object oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + valMap.put("oLowerCase", oLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("a"); + openapiFields.add("o"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpenOrderLossOInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpenOrderLossOInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OpenOrderLossOInner is not found in" + + " the empty JSON string", + OpenOrderLossOInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OpenOrderLossOInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OpenOrderLossOInner` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) + && !jsonObj.get("a").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `a` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("a").toString())); + } + if ((jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) + && !jsonObj.get("o").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `o` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("o").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpenOrderLossOInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenOrderLossOInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(OpenOrderLossOInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OpenOrderLossOInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OpenOrderLossOInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OpenOrderLossOInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenOrderLossOInner + * @throws IOException if the JSON string is invalid with respect to OpenOrderLossOInner + */ + public static OpenOrderLossOInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenOrderLossOInner.class); + } + + /** + * Convert an instance of OpenOrderLossOInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Openorderloss.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Openorderloss.java deleted file mode 100644 index e29b69f6a..000000000 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Openorderloss.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** Openorderloss */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Openorderloss extends BaseDTO { - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private Long E; - - public static final String SERIALIZED_NAME_O = "O"; - - @SerializedName(SERIALIZED_NAME_O) - @jakarta.annotation.Nullable - private List<@Valid OpenorderlossOInner> O; - - public Openorderloss() {} - - public Openorderloss E(@jakarta.annotation.Nullable Long E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public Long getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable Long E) { - this.E = E; - } - - public Openorderloss O(@jakarta.annotation.Nullable List<@Valid OpenorderlossOInner> O) { - this.O = O; - return this; - } - - public Openorderloss addOItem(OpenorderlossOInner OItem) { - if (this.O == null) { - this.O = new ArrayList<>(); - } - this.O.add(OItem); - return this; - } - - /** - * Get O - * - * @return O - */ - @jakarta.annotation.Nullable - @Valid - public List<@Valid OpenorderlossOInner> getO() { - return O; - } - - public void setO(@jakarta.annotation.Nullable List<@Valid OpenorderlossOInner> O) { - this.O = O; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Openorderloss openorderloss = (Openorderloss) o; - return Objects.equals(this.E, openorderloss.E) && Objects.equals(this.O, openorderloss.O); - } - - @Override - public int hashCode() { - return Objects.hash(E, O); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Openorderloss {\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" O: ").append(toIndentedString(O)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Long EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - List<@Valid OpenorderlossOInner> OValue = getO(); - if (OValue != null) { - String OValueAsString = JSON.getGson().toJson(OValue); - valMap.put("O", OValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object OValue = getO(); - if (OValue != null) { - valMap.put("O", OValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("E"); - openapiFields.add("O"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Openorderloss - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Openorderloss.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Openorderloss is not found in the" - + " empty JSON string", - Openorderloss.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Openorderloss.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Openorderloss` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("O") != null && !jsonObj.get("O").isJsonNull()) { - JsonArray jsonArrayO = jsonObj.getAsJsonArray("O"); - if (jsonArrayO != null) { - // ensure the json data is an array - if (!jsonObj.get("O").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `O` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("O").toString())); - } - - // validate the optional field `O` (array) - for (int i = 0; i < jsonArrayO.size(); i++) { - OpenorderlossOInner.validateJsonElement(jsonArrayO.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Openorderloss.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Openorderloss' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Openorderloss.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Openorderloss value) throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Openorderloss read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Openorderloss given an JSON string - * - * @param jsonString JSON string - * @return An instance of Openorderloss - * @throws IOException if the JSON string is invalid with respect to Openorderloss - */ - public static Openorderloss fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Openorderloss.class); - } - - /** - * Convert an instance of Openorderloss to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OpenorderlossOInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OpenorderlossOInner.java deleted file mode 100644 index 85f1c7cd0..000000000 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OpenorderlossOInner.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** OpenorderlossOInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OpenorderlossOInner extends BaseDTO { - public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; - - @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) - @jakarta.annotation.Nullable - private String aLowerCase; - - public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; - - @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) - @jakarta.annotation.Nullable - private String oLowerCase; - - public OpenorderlossOInner() {} - - public OpenorderlossOInner aLowerCase(@jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - return this; - } - - /** - * Get aLowerCase - * - * @return aLowerCase - */ - @jakarta.annotation.Nullable - public String getaLowerCase() { - return aLowerCase; - } - - public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - } - - public OpenorderlossOInner oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { - this.oLowerCase = oLowerCase; - return this; - } - - /** - * Get oLowerCase - * - * @return oLowerCase - */ - @jakarta.annotation.Nullable - public String getoLowerCase() { - return oLowerCase; - } - - public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { - this.oLowerCase = oLowerCase; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenorderlossOInner openorderlossOInner = (OpenorderlossOInner) o; - return Objects.equals(this.aLowerCase, openorderlossOInner.aLowerCase) - && Objects.equals(this.oLowerCase, openorderlossOInner.oLowerCase); - } - - @Override - public int hashCode() { - return Objects.hash(aLowerCase, oLowerCase); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenorderlossOInner {\n"); - sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); - sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - String aLowerCaseValueAsString = aLowerCaseValue.toString(); - valMap.put("aLowerCase", aLowerCaseValueAsString); - } - String oLowerCaseValue = getoLowerCase(); - if (oLowerCaseValue != null) { - String oLowerCaseValueAsString = oLowerCaseValue.toString(); - valMap.put("oLowerCase", oLowerCaseValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - valMap.put("aLowerCase", aLowerCaseValue); - } - Object oLowerCaseValue = getoLowerCase(); - if (oLowerCaseValue != null) { - valMap.put("oLowerCase", oLowerCaseValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("a"); - openapiFields.add("o"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenorderlossOInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenorderlossOInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OpenorderlossOInner is not found in" - + " the empty JSON string", - OpenorderlossOInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenorderlossOInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `OpenorderlossOInner` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) - && !jsonObj.get("a").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `a` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("a").toString())); - } - if ((jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) - && !jsonObj.get("o").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `o` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("o").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenorderlossOInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenorderlossOInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(OpenorderlossOInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenorderlossOInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenorderlossOInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OpenorderlossOInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenorderlossOInner - * @throws IOException if the JSON string is invalid with respect to OpenorderlossOInner - */ - public static OpenorderlossOInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenorderlossOInner.class); - } - - /** - * Convert an instance of OpenorderlossOInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OrderTradeUpdate.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OrderTradeUpdate.java index ac1cf6c06..27dbab87c 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OrderTradeUpdate.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OrderTradeUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** OrderTradeUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTradeUpdate extends BaseDTO { public static final String SERIALIZED_NAME_FS = "fs"; @@ -78,7 +78,7 @@ public OrderTradeUpdate fs(@jakarta.annotation.Nullable String fs) { } /** - * Get fs + * Event business unit. 'UM' for USDS-M futures and 'CM' for COIN-M futures * * @return fs */ @@ -97,7 +97,7 @@ public OrderTradeUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -116,7 +116,7 @@ public OrderTradeUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ @@ -135,7 +135,7 @@ public OrderTradeUpdate iLowerCase(@jakarta.annotation.Nullable String iLowerCas } /** - * Get iLowerCase + * Account Alias, ignore for UM * * @return iLowerCase */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OrderTradeUpdateO.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OrderTradeUpdateO.java index 8011dbc5a..691960f6d 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OrderTradeUpdateO.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OrderTradeUpdateO.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderTradeUpdateO */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTradeUpdateO extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -111,6 +111,12 @@ public class OrderTradeUpdateO extends BaseDTO { @jakarta.annotation.Nullable private Long iLowerCase; + public static final String SERIALIZED_NAME_M = "M"; + + @SerializedName(SERIALIZED_NAME_M) + @jakarta.annotation.Nullable + private String M; + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) @@ -221,7 +227,7 @@ public OrderTradeUpdateO sLowerCase(@jakarta.annotation.Nullable String sLowerCa } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -240,7 +246,7 @@ public OrderTradeUpdateO cLowerCase(@jakarta.annotation.Nullable String cLowerCa } /** - * Get cLowerCase + * Client Order Id * * @return cLowerCase */ @@ -259,7 +265,7 @@ public OrderTradeUpdateO S(@jakarta.annotation.Nullable String S) { } /** - * Get S + * Side * * @return S */ @@ -278,7 +284,7 @@ public OrderTradeUpdateO oLowerCase(@jakarta.annotation.Nullable String oLowerCa } /** - * Get oLowerCase + * Order Type * * @return oLowerCase */ @@ -297,7 +303,7 @@ public OrderTradeUpdateO fLowerCase(@jakarta.annotation.Nullable String fLowerCa } /** - * Get fLowerCase + * Time in Force * * @return fLowerCase */ @@ -316,7 +322,7 @@ public OrderTradeUpdateO qLowerCase(@jakarta.annotation.Nullable String qLowerCa } /** - * Get qLowerCase + * Original Quantity * * @return qLowerCase */ @@ -335,7 +341,7 @@ public OrderTradeUpdateO pLowerCase(@jakarta.annotation.Nullable String pLowerCa } /** - * Get pLowerCase + * Original Price * * @return pLowerCase */ @@ -354,7 +360,7 @@ public OrderTradeUpdateO ap(@jakarta.annotation.Nullable String ap) { } /** - * Get ap + * Average Price * * @return ap */ @@ -373,7 +379,7 @@ public OrderTradeUpdateO sp(@jakarta.annotation.Nullable String sp) { } /** - * Get sp + * Ignore * * @return sp */ @@ -392,7 +398,7 @@ public OrderTradeUpdateO xLowerCase(@jakarta.annotation.Nullable String xLowerCa } /** - * Get xLowerCase + * Execution Type * * @return xLowerCase */ @@ -411,7 +417,7 @@ public OrderTradeUpdateO X(@jakarta.annotation.Nullable String X) { } /** - * Get X + * Order Status * * @return X */ @@ -430,7 +436,7 @@ public OrderTradeUpdateO iLowerCase(@jakarta.annotation.Nullable Long iLowerCase } /** - * Get iLowerCase + * Order Id * * @return iLowerCase */ @@ -443,13 +449,33 @@ public void setiLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { this.iLowerCase = iLowerCase; } + public OrderTradeUpdateO M(@jakarta.annotation.Nullable String M) { + this.M = M; + return this; + } + + /** + * modifyId, only pushed for AMENDMENT (order modification) events when a modifyId was provided + * in the request + * + * @return M + */ + @jakarta.annotation.Nullable + public String getM() { + return M; + } + + public void setM(@jakarta.annotation.Nullable String M) { + this.M = M; + } + public OrderTradeUpdateO lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { this.lLowerCase = lLowerCase; return this; } /** - * Get lLowerCase + * Order Last Filled Quantity * * @return lLowerCase */ @@ -468,7 +494,7 @@ public OrderTradeUpdateO zLowerCase(@jakarta.annotation.Nullable String zLowerCa } /** - * Get zLowerCase + * Order Filled Accumulated Quantity * * @return zLowerCase */ @@ -487,7 +513,7 @@ public OrderTradeUpdateO L(@jakarta.annotation.Nullable String L) { } /** - * Get L + * Last Filled Price * * @return L */ @@ -506,7 +532,7 @@ public OrderTradeUpdateO N(@jakarta.annotation.Nullable String N) { } /** - * Get N + * Commission Asset, will not push if no commission * * @return N */ @@ -525,7 +551,7 @@ public OrderTradeUpdateO nLowerCase(@jakarta.annotation.Nullable String nLowerCa } /** - * Get nLowerCase + * Commission, will not push if no commission * * @return nLowerCase */ @@ -544,7 +570,7 @@ public OrderTradeUpdateO T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Order Trade Time * * @return T */ @@ -563,7 +589,7 @@ public OrderTradeUpdateO tLowerCase(@jakarta.annotation.Nullable Long tLowerCase } /** - * Get tLowerCase + * Trade Id * * @return tLowerCase */ @@ -582,7 +608,7 @@ public OrderTradeUpdateO bLowerCase(@jakarta.annotation.Nullable String bLowerCa } /** - * Get bLowerCase + * Bids Notional * * @return bLowerCase */ @@ -601,7 +627,7 @@ public OrderTradeUpdateO aLowerCase(@jakarta.annotation.Nullable String aLowerCa } /** - * Get aLowerCase + * Ask Notional * * @return aLowerCase */ @@ -620,7 +646,7 @@ public OrderTradeUpdateO mLowerCase(@jakarta.annotation.Nullable Boolean mLowerC } /** - * Get mLowerCase + * Is this trade the maker side? * * @return mLowerCase */ @@ -639,7 +665,7 @@ public OrderTradeUpdateO R(@jakarta.annotation.Nullable Boolean R) { } /** - * Get R + * Is this reduce only * * @return R */ @@ -658,7 +684,7 @@ public OrderTradeUpdateO ps(@jakarta.annotation.Nullable String ps) { } /** - * Get ps + * Position Side * * @return ps */ @@ -677,7 +703,7 @@ public OrderTradeUpdateO rp(@jakarta.annotation.Nullable String rp) { } /** - * Get rp + * Realized Profit of the trade * * @return rp */ @@ -696,7 +722,7 @@ public OrderTradeUpdateO st(@jakarta.annotation.Nullable String st) { } /** - * Get st + * Strategy type, only pushed with conditional order triggered * * @return st */ @@ -715,7 +741,7 @@ public OrderTradeUpdateO si(@jakarta.annotation.Nullable Long si) { } /** - * Get si + * StrategyId, only pushed with conditional order triggered * * @return si */ @@ -734,7 +760,7 @@ public OrderTradeUpdateO V(@jakarta.annotation.Nullable String V) { } /** - * Get V + * STP mode * * @return V */ @@ -753,7 +779,7 @@ public OrderTradeUpdateO gtd(@jakarta.annotation.Nullable Long gtd) { } /** - * Get gtd + * TIF GTD order auto cancel time * * @return gtd */ @@ -787,6 +813,7 @@ public boolean equals(Object o) { && Objects.equals(this.xLowerCase, orderTradeUpdateO.xLowerCase) && Objects.equals(this.X, orderTradeUpdateO.X) && Objects.equals(this.iLowerCase, orderTradeUpdateO.iLowerCase) + && Objects.equals(this.M, orderTradeUpdateO.M) && Objects.equals(this.lLowerCase, orderTradeUpdateO.lLowerCase) && Objects.equals(this.zLowerCase, orderTradeUpdateO.zLowerCase) && Objects.equals(this.L, orderTradeUpdateO.L) @@ -821,6 +848,7 @@ public int hashCode() { xLowerCase, X, iLowerCase, + M, lLowerCase, zLowerCase, L, @@ -856,6 +884,7 @@ public String toString() { sb.append(" xLowerCase: ").append(toIndentedString(xLowerCase)).append("\n"); sb.append(" X: ").append(toIndentedString(X)).append("\n"); sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); + sb.append(" M: ").append(toIndentedString(M)).append("\n"); sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); sb.append(" zLowerCase: ").append(toIndentedString(zLowerCase)).append("\n"); sb.append(" L: ").append(toIndentedString(L)).append("\n"); @@ -941,6 +970,11 @@ public String toUrlQueryString() { String iLowerCaseValueAsString = iLowerCaseValue.toString(); valMap.put("iLowerCase", iLowerCaseValueAsString); } + String MValue = getM(); + if (MValue != null) { + String MValueAsString = MValue.toString(); + valMap.put("M", MValueAsString); + } String lLowerCaseValue = getlLowerCase(); if (lLowerCaseValue != null) { String lLowerCaseValueAsString = lLowerCaseValue.toString(); @@ -1085,6 +1119,10 @@ public Map toMap() { if (iLowerCaseValue != null) { valMap.put("iLowerCase", iLowerCaseValue); } + Object MValue = getM(); + if (MValue != null) { + valMap.put("M", MValue); + } Object lLowerCaseValue = getlLowerCase(); if (lLowerCaseValue != null) { valMap.put("lLowerCase", lLowerCaseValue); @@ -1191,6 +1229,7 @@ private String toIndentedString(Object o) { openapiFields.add("x"); openapiFields.add("X"); openapiFields.add("i"); + openapiFields.add("M"); openapiFields.add("l"); openapiFields.add("z"); openapiFields.add("L"); @@ -1331,6 +1370,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("X").toString())); } + if ((jsonObj.get("M") != null && !jsonObj.get("M").isJsonNull()) + && !jsonObj.get("M").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `M` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("M").toString())); + } if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) && !jsonObj.get("l").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OutboundAccountPosition.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OutboundAccountPosition.java new file mode 100644 index 000000000..d1c484b3a --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OutboundAccountPosition.java @@ -0,0 +1,377 @@ +/* + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** OutboundAccountPosition */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OutboundAccountPosition extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; + + @SerializedName(SERIALIZED_NAME_U_LOWER_CASE) + @jakarta.annotation.Nullable + private Long uLowerCase; + + public static final String SERIALIZED_NAME_U = "U"; + + @SerializedName(SERIALIZED_NAME_U) + @jakarta.annotation.Nullable + private Long U; + + public static final String SERIALIZED_NAME_B = "B"; + + @SerializedName(SERIALIZED_NAME_B) + @jakarta.annotation.Nullable + private List<@Valid OutboundAccountPositionBInner> B; + + public OutboundAccountPosition() {} + + public OutboundAccountPosition E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public OutboundAccountPosition uLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + return this; + } + + /** + * Time of last account update + * + * @return uLowerCase + */ + @jakarta.annotation.Nullable + public Long getuLowerCase() { + return uLowerCase; + } + + public void setuLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + } + + public OutboundAccountPosition U(@jakarta.annotation.Nullable Long U) { + this.U = U; + return this; + } + + /** + * Time updateID + * + * @return U + */ + @jakarta.annotation.Nullable + public Long getU() { + return U; + } + + public void setU(@jakarta.annotation.Nullable Long U) { + this.U = U; + } + + public OutboundAccountPosition B( + @jakarta.annotation.Nullable List<@Valid OutboundAccountPositionBInner> B) { + this.B = B; + return this; + } + + public OutboundAccountPosition addBItem(OutboundAccountPositionBInner BItem) { + if (this.B == null) { + this.B = new ArrayList<>(); + } + this.B.add(BItem); + return this; + } + + /** + * Balances Array + * + * @return B + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid OutboundAccountPositionBInner> getB() { + return B; + } + + public void setB(@jakarta.annotation.Nullable List<@Valid OutboundAccountPositionBInner> B) { + this.B = B; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OutboundAccountPosition outboundAccountPosition = (OutboundAccountPosition) o; + return Objects.equals(this.E, outboundAccountPosition.E) + && Objects.equals(this.uLowerCase, outboundAccountPosition.uLowerCase) + && Objects.equals(this.U, outboundAccountPosition.U) + && Objects.equals(this.B, outboundAccountPosition.B); + } + + @Override + public int hashCode() { + return Objects.hash(E, uLowerCase, U, B); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OutboundAccountPosition {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); + sb.append(" U: ").append(toIndentedString(U)).append("\n"); + sb.append(" B: ").append(toIndentedString(B)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + Long uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + String uLowerCaseValueAsString = uLowerCaseValue.toString(); + valMap.put("uLowerCase", uLowerCaseValueAsString); + } + Long UValue = getU(); + if (UValue != null) { + String UValueAsString = UValue.toString(); + valMap.put("U", UValueAsString); + } + List<@Valid OutboundAccountPositionBInner> BValue = getB(); + if (BValue != null) { + String BValueAsString = JSON.getGson().toJson(BValue); + valMap.put("B", BValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + valMap.put("uLowerCase", uLowerCaseValue); + } + Object UValue = getU(); + if (UValue != null) { + valMap.put("U", UValue); + } + Object BValue = getB(); + if (BValue != null) { + valMap.put("B", BValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("u"); + openapiFields.add("U"); + openapiFields.add("B"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OutboundAccountPosition + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OutboundAccountPosition.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OutboundAccountPosition is not found" + + " in the empty JSON string", + OutboundAccountPosition.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OutboundAccountPosition.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OutboundAccountPosition` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("B") != null && !jsonObj.get("B").isJsonNull()) { + JsonArray jsonArrayB = jsonObj.getAsJsonArray("B"); + if (jsonArrayB != null) { + // ensure the json data is an array + if (!jsonObj.get("B").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `B` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("B").toString())); + } + + // validate the optional field `B` (array) + for (int i = 0; i < jsonArrayB.size(); i++) { + OutboundAccountPositionBInner.validateJsonElement(jsonArrayB.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OutboundAccountPosition.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OutboundAccountPosition' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(OutboundAccountPosition.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OutboundAccountPosition value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OutboundAccountPosition read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OutboundAccountPosition given an JSON string + * + * @param jsonString JSON string + * @return An instance of OutboundAccountPosition + * @throws IOException if the JSON string is invalid with respect to OutboundAccountPosition + */ + public static OutboundAccountPosition fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OutboundAccountPosition.class); + } + + /** + * Convert an instance of OutboundAccountPosition to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OutboundAccountPositionBInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OutboundAccountPositionBInner.java new file mode 100644 index 000000000..b99d10ee4 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OutboundAccountPositionBInner.java @@ -0,0 +1,339 @@ +/* + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** OutboundAccountPositionBInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OutboundAccountPositionBInner extends BaseDTO { + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private String aLowerCase; + + public static final String SERIALIZED_NAME_F_LOWER_CASE = "f"; + + @SerializedName(SERIALIZED_NAME_F_LOWER_CASE) + @jakarta.annotation.Nullable + private String fLowerCase; + + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; + + @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) + @jakarta.annotation.Nullable + private String lLowerCase; + + public OutboundAccountPositionBInner() {} + + public OutboundAccountPositionBInner aLowerCase( + @jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + /** + * Asset + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + public String getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + } + + public OutboundAccountPositionBInner fLowerCase( + @jakarta.annotation.Nullable String fLowerCase) { + this.fLowerCase = fLowerCase; + return this; + } + + /** + * Free + * + * @return fLowerCase + */ + @jakarta.annotation.Nullable + public String getfLowerCase() { + return fLowerCase; + } + + public void setfLowerCase(@jakarta.annotation.Nullable String fLowerCase) { + this.fLowerCase = fLowerCase; + } + + public OutboundAccountPositionBInner lLowerCase( + @jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + return this; + } + + /** + * Locked + * + * @return lLowerCase + */ + @jakarta.annotation.Nullable + public String getlLowerCase() { + return lLowerCase; + } + + public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OutboundAccountPositionBInner outboundAccountPositionBInner = + (OutboundAccountPositionBInner) o; + return Objects.equals(this.aLowerCase, outboundAccountPositionBInner.aLowerCase) + && Objects.equals(this.fLowerCase, outboundAccountPositionBInner.fLowerCase) + && Objects.equals(this.lLowerCase, outboundAccountPositionBInner.lLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash(aLowerCase, fLowerCase, lLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OutboundAccountPositionBInner {\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" fLowerCase: ").append(toIndentedString(fLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = aLowerCaseValue.toString(); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + String fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + String fLowerCaseValueAsString = fLowerCaseValue.toString(); + valMap.put("fLowerCase", fLowerCaseValueAsString); + } + String lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + Object fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + valMap.put("fLowerCase", fLowerCaseValue); + } + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("a"); + openapiFields.add("f"); + openapiFields.add("l"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * OutboundAccountPositionBInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OutboundAccountPositionBInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OutboundAccountPositionBInner is not" + + " found in the empty JSON string", + OutboundAccountPositionBInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OutboundAccountPositionBInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OutboundAccountPositionBInner` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) + && !jsonObj.get("a").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `a` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("a").toString())); + } + if ((jsonObj.get("f") != null && !jsonObj.get("f").isJsonNull()) + && !jsonObj.get("f").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `f` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("f").toString())); + } + if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) + && !jsonObj.get("l").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `l` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("l").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OutboundAccountPositionBInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OutboundAccountPositionBInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(OutboundAccountPositionBInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OutboundAccountPositionBInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OutboundAccountPositionBInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OutboundAccountPositionBInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OutboundAccountPositionBInner + * @throws IOException if the JSON string is invalid with respect to + * OutboundAccountPositionBInner + */ + public static OutboundAccountPositionBInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OutboundAccountPositionBInner.class); + } + + /** + * Convert an instance of OutboundAccountPositionBInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Outboundaccountposition.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Outboundaccountposition.java deleted file mode 100644 index 70ab47200..000000000 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Outboundaccountposition.java +++ /dev/null @@ -1,377 +0,0 @@ -/* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** Outboundaccountposition */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Outboundaccountposition extends BaseDTO { - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private Long E; - - public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; - - @SerializedName(SERIALIZED_NAME_U_LOWER_CASE) - @jakarta.annotation.Nullable - private Long uLowerCase; - - public static final String SERIALIZED_NAME_U = "U"; - - @SerializedName(SERIALIZED_NAME_U) - @jakarta.annotation.Nullable - private Long U; - - public static final String SERIALIZED_NAME_B = "B"; - - @SerializedName(SERIALIZED_NAME_B) - @jakarta.annotation.Nullable - private List<@Valid OutboundaccountpositionBInner> B; - - public Outboundaccountposition() {} - - public Outboundaccountposition E(@jakarta.annotation.Nullable Long E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public Long getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable Long E) { - this.E = E; - } - - public Outboundaccountposition uLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { - this.uLowerCase = uLowerCase; - return this; - } - - /** - * Get uLowerCase - * - * @return uLowerCase - */ - @jakarta.annotation.Nullable - public Long getuLowerCase() { - return uLowerCase; - } - - public void setuLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { - this.uLowerCase = uLowerCase; - } - - public Outboundaccountposition U(@jakarta.annotation.Nullable Long U) { - this.U = U; - return this; - } - - /** - * Get U - * - * @return U - */ - @jakarta.annotation.Nullable - public Long getU() { - return U; - } - - public void setU(@jakarta.annotation.Nullable Long U) { - this.U = U; - } - - public Outboundaccountposition B( - @jakarta.annotation.Nullable List<@Valid OutboundaccountpositionBInner> B) { - this.B = B; - return this; - } - - public Outboundaccountposition addBItem(OutboundaccountpositionBInner BItem) { - if (this.B == null) { - this.B = new ArrayList<>(); - } - this.B.add(BItem); - return this; - } - - /** - * Get B - * - * @return B - */ - @jakarta.annotation.Nullable - @Valid - public List<@Valid OutboundaccountpositionBInner> getB() { - return B; - } - - public void setB(@jakarta.annotation.Nullable List<@Valid OutboundaccountpositionBInner> B) { - this.B = B; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Outboundaccountposition outboundaccountposition = (Outboundaccountposition) o; - return Objects.equals(this.E, outboundaccountposition.E) - && Objects.equals(this.uLowerCase, outboundaccountposition.uLowerCase) - && Objects.equals(this.U, outboundaccountposition.U) - && Objects.equals(this.B, outboundaccountposition.B); - } - - @Override - public int hashCode() { - return Objects.hash(E, uLowerCase, U, B); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Outboundaccountposition {\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); - sb.append(" U: ").append(toIndentedString(U)).append("\n"); - sb.append(" B: ").append(toIndentedString(B)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Long EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - Long uLowerCaseValue = getuLowerCase(); - if (uLowerCaseValue != null) { - String uLowerCaseValueAsString = uLowerCaseValue.toString(); - valMap.put("uLowerCase", uLowerCaseValueAsString); - } - Long UValue = getU(); - if (UValue != null) { - String UValueAsString = UValue.toString(); - valMap.put("U", UValueAsString); - } - List<@Valid OutboundaccountpositionBInner> BValue = getB(); - if (BValue != null) { - String BValueAsString = JSON.getGson().toJson(BValue); - valMap.put("B", BValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object uLowerCaseValue = getuLowerCase(); - if (uLowerCaseValue != null) { - valMap.put("uLowerCase", uLowerCaseValue); - } - Object UValue = getU(); - if (UValue != null) { - valMap.put("U", UValue); - } - Object BValue = getB(); - if (BValue != null) { - valMap.put("B", BValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("E"); - openapiFields.add("u"); - openapiFields.add("U"); - openapiFields.add("B"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Outboundaccountposition - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Outboundaccountposition.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Outboundaccountposition is not found" - + " in the empty JSON string", - Outboundaccountposition.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Outboundaccountposition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Outboundaccountposition` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("B") != null && !jsonObj.get("B").isJsonNull()) { - JsonArray jsonArrayB = jsonObj.getAsJsonArray("B"); - if (jsonArrayB != null) { - // ensure the json data is an array - if (!jsonObj.get("B").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `B` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("B").toString())); - } - - // validate the optional field `B` (array) - for (int i = 0; i < jsonArrayB.size(); i++) { - OutboundaccountpositionBInner.validateJsonElement(jsonArrayB.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Outboundaccountposition.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Outboundaccountposition' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Outboundaccountposition.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Outboundaccountposition value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Outboundaccountposition read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Outboundaccountposition given an JSON string - * - * @param jsonString JSON string - * @return An instance of Outboundaccountposition - * @throws IOException if the JSON string is invalid with respect to Outboundaccountposition - */ - public static Outboundaccountposition fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Outboundaccountposition.class); - } - - /** - * Convert an instance of Outboundaccountposition to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OutboundaccountpositionBInner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OutboundaccountpositionBInner.java deleted file mode 100644 index 55c0850a5..000000000 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OutboundaccountpositionBInner.java +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** OutboundaccountpositionBInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OutboundaccountpositionBInner extends BaseDTO { - public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; - - @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) - @jakarta.annotation.Nullable - private String aLowerCase; - - public static final String SERIALIZED_NAME_F_LOWER_CASE = "f"; - - @SerializedName(SERIALIZED_NAME_F_LOWER_CASE) - @jakarta.annotation.Nullable - private String fLowerCase; - - public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; - - @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) - @jakarta.annotation.Nullable - private String lLowerCase; - - public OutboundaccountpositionBInner() {} - - public OutboundaccountpositionBInner aLowerCase( - @jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - return this; - } - - /** - * Get aLowerCase - * - * @return aLowerCase - */ - @jakarta.annotation.Nullable - public String getaLowerCase() { - return aLowerCase; - } - - public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - } - - public OutboundaccountpositionBInner fLowerCase( - @jakarta.annotation.Nullable String fLowerCase) { - this.fLowerCase = fLowerCase; - return this; - } - - /** - * Get fLowerCase - * - * @return fLowerCase - */ - @jakarta.annotation.Nullable - public String getfLowerCase() { - return fLowerCase; - } - - public void setfLowerCase(@jakarta.annotation.Nullable String fLowerCase) { - this.fLowerCase = fLowerCase; - } - - public OutboundaccountpositionBInner lLowerCase( - @jakarta.annotation.Nullable String lLowerCase) { - this.lLowerCase = lLowerCase; - return this; - } - - /** - * Get lLowerCase - * - * @return lLowerCase - */ - @jakarta.annotation.Nullable - public String getlLowerCase() { - return lLowerCase; - } - - public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { - this.lLowerCase = lLowerCase; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OutboundaccountpositionBInner outboundaccountpositionBInner = - (OutboundaccountpositionBInner) o; - return Objects.equals(this.aLowerCase, outboundaccountpositionBInner.aLowerCase) - && Objects.equals(this.fLowerCase, outboundaccountpositionBInner.fLowerCase) - && Objects.equals(this.lLowerCase, outboundaccountpositionBInner.lLowerCase); - } - - @Override - public int hashCode() { - return Objects.hash(aLowerCase, fLowerCase, lLowerCase); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OutboundaccountpositionBInner {\n"); - sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); - sb.append(" fLowerCase: ").append(toIndentedString(fLowerCase)).append("\n"); - sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - String aLowerCaseValueAsString = aLowerCaseValue.toString(); - valMap.put("aLowerCase", aLowerCaseValueAsString); - } - String fLowerCaseValue = getfLowerCase(); - if (fLowerCaseValue != null) { - String fLowerCaseValueAsString = fLowerCaseValue.toString(); - valMap.put("fLowerCase", fLowerCaseValueAsString); - } - String lLowerCaseValue = getlLowerCase(); - if (lLowerCaseValue != null) { - String lLowerCaseValueAsString = lLowerCaseValue.toString(); - valMap.put("lLowerCase", lLowerCaseValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - valMap.put("aLowerCase", aLowerCaseValue); - } - Object fLowerCaseValue = getfLowerCase(); - if (fLowerCaseValue != null) { - valMap.put("fLowerCase", fLowerCaseValue); - } - Object lLowerCaseValue = getlLowerCase(); - if (lLowerCaseValue != null) { - valMap.put("lLowerCase", lLowerCaseValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("a"); - openapiFields.add("f"); - openapiFields.add("l"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * OutboundaccountpositionBInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OutboundaccountpositionBInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OutboundaccountpositionBInner is not" - + " found in the empty JSON string", - OutboundaccountpositionBInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OutboundaccountpositionBInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `OutboundaccountpositionBInner` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) - && !jsonObj.get("a").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `a` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("a").toString())); - } - if ((jsonObj.get("f") != null && !jsonObj.get("f").isJsonNull()) - && !jsonObj.get("f").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `f` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("f").toString())); - } - if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) - && !jsonObj.get("l").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `l` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("l").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OutboundaccountpositionBInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OutboundaccountpositionBInner' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(OutboundaccountpositionBInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OutboundaccountpositionBInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OutboundaccountpositionBInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OutboundaccountpositionBInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of OutboundaccountpositionBInner - * @throws IOException if the JSON string is invalid with respect to - * OutboundaccountpositionBInner - */ - public static OutboundaccountpositionBInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OutboundaccountpositionBInner.class); - } - - /** - * Convert an instance of OutboundaccountpositionBInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/RiskLevelChange.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/RiskLevelChange.java new file mode 100644 index 000000000..1f61d84f4 --- /dev/null +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/RiskLevelChange.java @@ -0,0 +1,457 @@ +/* + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** RiskLevelChange */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class RiskLevelChange extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; + + @SerializedName(SERIALIZED_NAME_U_LOWER_CASE) + @jakarta.annotation.Nullable + private String uLowerCase; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_EQ = "eq"; + + @SerializedName(SERIALIZED_NAME_EQ) + @jakarta.annotation.Nullable + private String eq; + + public static final String SERIALIZED_NAME_AE = "ae"; + + @SerializedName(SERIALIZED_NAME_AE) + @jakarta.annotation.Nullable + private String ae; + + public static final String SERIALIZED_NAME_M_LOWER_CASE = "m"; + + @SerializedName(SERIALIZED_NAME_M_LOWER_CASE) + @jakarta.annotation.Nullable + private String mLowerCase; + + public RiskLevelChange() {} + + public RiskLevelChange E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public RiskLevelChange uLowerCase(@jakarta.annotation.Nullable String uLowerCase) { + this.uLowerCase = uLowerCase; + return this; + } + + /** + * uniMMR level + * + * @return uLowerCase + */ + @jakarta.annotation.Nullable + public String getuLowerCase() { + return uLowerCase; + } + + public void setuLowerCase(@jakarta.annotation.Nullable String uLowerCase) { + this.uLowerCase = uLowerCase; + } + + public RiskLevelChange sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * Risk level: MARGIN_CALL, REDUCE_ONLY, FORCE_LIQUIDATION + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public RiskLevelChange eq(@jakarta.annotation.Nullable String eq) { + this.eq = eq; + return this; + } + + /** + * Account equity in USD value + * + * @return eq + */ + @jakarta.annotation.Nullable + public String getEq() { + return eq; + } + + public void setEq(@jakarta.annotation.Nullable String eq) { + this.eq = eq; + } + + public RiskLevelChange ae(@jakarta.annotation.Nullable String ae) { + this.ae = ae; + return this; + } + + /** + * Actual equity without collateral rate in USD value + * + * @return ae + */ + @jakarta.annotation.Nullable + public String getAe() { + return ae; + } + + public void setAe(@jakarta.annotation.Nullable String ae) { + this.ae = ae; + } + + public RiskLevelChange mLowerCase(@jakarta.annotation.Nullable String mLowerCase) { + this.mLowerCase = mLowerCase; + return this; + } + + /** + * Total maintenance margin in USD value + * + * @return mLowerCase + */ + @jakarta.annotation.Nullable + public String getmLowerCase() { + return mLowerCase; + } + + public void setmLowerCase(@jakarta.annotation.Nullable String mLowerCase) { + this.mLowerCase = mLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RiskLevelChange riskLevelChange = (RiskLevelChange) o; + return Objects.equals(this.E, riskLevelChange.E) + && Objects.equals(this.uLowerCase, riskLevelChange.uLowerCase) + && Objects.equals(this.sLowerCase, riskLevelChange.sLowerCase) + && Objects.equals(this.eq, riskLevelChange.eq) + && Objects.equals(this.ae, riskLevelChange.ae) + && Objects.equals(this.mLowerCase, riskLevelChange.mLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash(E, uLowerCase, sLowerCase, eq, ae, mLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RiskLevelChange {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" eq: ").append(toIndentedString(eq)).append("\n"); + sb.append(" ae: ").append(toIndentedString(ae)).append("\n"); + sb.append(" mLowerCase: ").append(toIndentedString(mLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + String uLowerCaseValueAsString = uLowerCaseValue.toString(); + valMap.put("uLowerCase", uLowerCaseValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + String eqValue = getEq(); + if (eqValue != null) { + String eqValueAsString = eqValue.toString(); + valMap.put("eq", eqValueAsString); + } + String aeValue = getAe(); + if (aeValue != null) { + String aeValueAsString = aeValue.toString(); + valMap.put("ae", aeValueAsString); + } + String mLowerCaseValue = getmLowerCase(); + if (mLowerCaseValue != null) { + String mLowerCaseValueAsString = mLowerCaseValue.toString(); + valMap.put("mLowerCase", mLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + valMap.put("uLowerCase", uLowerCaseValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object eqValue = getEq(); + if (eqValue != null) { + valMap.put("eq", eqValue); + } + Object aeValue = getAe(); + if (aeValue != null) { + valMap.put("ae", aeValue); + } + Object mLowerCaseValue = getmLowerCase(); + if (mLowerCaseValue != null) { + valMap.put("mLowerCase", mLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("u"); + openapiFields.add("s"); + openapiFields.add("eq"); + openapiFields.add("ae"); + openapiFields.add("m"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RiskLevelChange + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RiskLevelChange.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RiskLevelChange is not found in the" + + " empty JSON string", + RiskLevelChange.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RiskLevelChange.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `RiskLevelChange` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("u") != null && !jsonObj.get("u").isJsonNull()) + && !jsonObj.get("u").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `u` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("u").toString())); + } + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("eq") != null && !jsonObj.get("eq").isJsonNull()) + && !jsonObj.get("eq").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `eq` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("eq").toString())); + } + if ((jsonObj.get("ae") != null && !jsonObj.get("ae").isJsonNull()) + && !jsonObj.get("ae").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ae` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ae").toString())); + } + if ((jsonObj.get("m") != null && !jsonObj.get("m").isJsonNull()) + && !jsonObj.get("m").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `m` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("m").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RiskLevelChange.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RiskLevelChange' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RiskLevelChange.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RiskLevelChange value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RiskLevelChange read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of RiskLevelChange given an JSON string + * + * @param jsonString JSON string + * @return An instance of RiskLevelChange + * @throws IOException if the JSON string is invalid with respect to RiskLevelChange + */ + public static RiskLevelChange fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RiskLevelChange.class); + } + + /** + * Convert an instance of RiskLevelChange to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Risklevelchange.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Risklevelchange.java deleted file mode 100644 index 0bf2c83b9..000000000 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Risklevelchange.java +++ /dev/null @@ -1,457 +0,0 @@ -/* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_portfolio_margin.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** Risklevelchange */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Risklevelchange extends BaseDTO { - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private Long E; - - public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; - - @SerializedName(SERIALIZED_NAME_U_LOWER_CASE) - @jakarta.annotation.Nullable - private String uLowerCase; - - public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; - - @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) - @jakarta.annotation.Nullable - private String sLowerCase; - - public static final String SERIALIZED_NAME_EQ = "eq"; - - @SerializedName(SERIALIZED_NAME_EQ) - @jakarta.annotation.Nullable - private String eq; - - public static final String SERIALIZED_NAME_AE = "ae"; - - @SerializedName(SERIALIZED_NAME_AE) - @jakarta.annotation.Nullable - private String ae; - - public static final String SERIALIZED_NAME_M_LOWER_CASE = "m"; - - @SerializedName(SERIALIZED_NAME_M_LOWER_CASE) - @jakarta.annotation.Nullable - private String mLowerCase; - - public Risklevelchange() {} - - public Risklevelchange E(@jakarta.annotation.Nullable Long E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public Long getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable Long E) { - this.E = E; - } - - public Risklevelchange uLowerCase(@jakarta.annotation.Nullable String uLowerCase) { - this.uLowerCase = uLowerCase; - return this; - } - - /** - * Get uLowerCase - * - * @return uLowerCase - */ - @jakarta.annotation.Nullable - public String getuLowerCase() { - return uLowerCase; - } - - public void setuLowerCase(@jakarta.annotation.Nullable String uLowerCase) { - this.uLowerCase = uLowerCase; - } - - public Risklevelchange sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - return this; - } - - /** - * Get sLowerCase - * - * @return sLowerCase - */ - @jakarta.annotation.Nullable - public String getsLowerCase() { - return sLowerCase; - } - - public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - } - - public Risklevelchange eq(@jakarta.annotation.Nullable String eq) { - this.eq = eq; - return this; - } - - /** - * Get eq - * - * @return eq - */ - @jakarta.annotation.Nullable - public String getEq() { - return eq; - } - - public void setEq(@jakarta.annotation.Nullable String eq) { - this.eq = eq; - } - - public Risklevelchange ae(@jakarta.annotation.Nullable String ae) { - this.ae = ae; - return this; - } - - /** - * Get ae - * - * @return ae - */ - @jakarta.annotation.Nullable - public String getAe() { - return ae; - } - - public void setAe(@jakarta.annotation.Nullable String ae) { - this.ae = ae; - } - - public Risklevelchange mLowerCase(@jakarta.annotation.Nullable String mLowerCase) { - this.mLowerCase = mLowerCase; - return this; - } - - /** - * Get mLowerCase - * - * @return mLowerCase - */ - @jakarta.annotation.Nullable - public String getmLowerCase() { - return mLowerCase; - } - - public void setmLowerCase(@jakarta.annotation.Nullable String mLowerCase) { - this.mLowerCase = mLowerCase; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Risklevelchange risklevelchange = (Risklevelchange) o; - return Objects.equals(this.E, risklevelchange.E) - && Objects.equals(this.uLowerCase, risklevelchange.uLowerCase) - && Objects.equals(this.sLowerCase, risklevelchange.sLowerCase) - && Objects.equals(this.eq, risklevelchange.eq) - && Objects.equals(this.ae, risklevelchange.ae) - && Objects.equals(this.mLowerCase, risklevelchange.mLowerCase); - } - - @Override - public int hashCode() { - return Objects.hash(E, uLowerCase, sLowerCase, eq, ae, mLowerCase); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Risklevelchange {\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); - sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); - sb.append(" eq: ").append(toIndentedString(eq)).append("\n"); - sb.append(" ae: ").append(toIndentedString(ae)).append("\n"); - sb.append(" mLowerCase: ").append(toIndentedString(mLowerCase)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Long EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - String uLowerCaseValue = getuLowerCase(); - if (uLowerCaseValue != null) { - String uLowerCaseValueAsString = uLowerCaseValue.toString(); - valMap.put("uLowerCase", uLowerCaseValueAsString); - } - String sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - String sLowerCaseValueAsString = sLowerCaseValue.toString(); - valMap.put("sLowerCase", sLowerCaseValueAsString); - } - String eqValue = getEq(); - if (eqValue != null) { - String eqValueAsString = eqValue.toString(); - valMap.put("eq", eqValueAsString); - } - String aeValue = getAe(); - if (aeValue != null) { - String aeValueAsString = aeValue.toString(); - valMap.put("ae", aeValueAsString); - } - String mLowerCaseValue = getmLowerCase(); - if (mLowerCaseValue != null) { - String mLowerCaseValueAsString = mLowerCaseValue.toString(); - valMap.put("mLowerCase", mLowerCaseValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object uLowerCaseValue = getuLowerCase(); - if (uLowerCaseValue != null) { - valMap.put("uLowerCase", uLowerCaseValue); - } - Object sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - valMap.put("sLowerCase", sLowerCaseValue); - } - Object eqValue = getEq(); - if (eqValue != null) { - valMap.put("eq", eqValue); - } - Object aeValue = getAe(); - if (aeValue != null) { - valMap.put("ae", aeValue); - } - Object mLowerCaseValue = getmLowerCase(); - if (mLowerCaseValue != null) { - valMap.put("mLowerCase", mLowerCaseValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("E"); - openapiFields.add("u"); - openapiFields.add("s"); - openapiFields.add("eq"); - openapiFields.add("ae"); - openapiFields.add("m"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Risklevelchange - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Risklevelchange.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Risklevelchange is not found in the" - + " empty JSON string", - Risklevelchange.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Risklevelchange.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Risklevelchange` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("u") != null && !jsonObj.get("u").isJsonNull()) - && !jsonObj.get("u").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `u` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("u").toString())); - } - if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) - && !jsonObj.get("s").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `s` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("s").toString())); - } - if ((jsonObj.get("eq") != null && !jsonObj.get("eq").isJsonNull()) - && !jsonObj.get("eq").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `eq` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("eq").toString())); - } - if ((jsonObj.get("ae") != null && !jsonObj.get("ae").isJsonNull()) - && !jsonObj.get("ae").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ae` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("ae").toString())); - } - if ((jsonObj.get("m") != null && !jsonObj.get("m").isJsonNull()) - && !jsonObj.get("m").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `m` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("m").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Risklevelchange.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Risklevelchange' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Risklevelchange.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Risklevelchange value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Risklevelchange read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Risklevelchange given an JSON string - * - * @param jsonString JSON string - * @return An instance of Risklevelchange - * @throws IOException if the JSON string is invalid with respect to Risklevelchange - */ - public static Risklevelchange fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Risklevelchange.class); - } - - /** - * Convert an instance of Risklevelchange to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/UserDataStreamEventsResponse.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/UserDataStreamEventsResponse.java index cc39a8c53..cf50f103b 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/UserDataStreamEventsResponse.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/UserDataStreamEventsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams + * Portfolio Margin WebSocket Market Streams + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -33,7 +33,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserDataStreamEventsResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(UserDataStreamEventsResponse.class.getName()); @@ -47,30 +47,30 @@ public TypeAdapter create(Gson gson, TypeToken type) { // subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterAlgoUpdate = - gson.getDelegateAdapter(this, TypeToken.get(AlgoUpdate.class)); - final TypeAdapter adapterConditionalOrderTradeUpdate = - gson.getDelegateAdapter(this, TypeToken.get(ConditionalOrderTradeUpdate.class)); final TypeAdapter adapterAccountConfigUpdate = gson.getDelegateAdapter(this, TypeToken.get(AccountConfigUpdate.class)); final TypeAdapter adapterAccountUpdate = gson.getDelegateAdapter(this, TypeToken.get(AccountUpdate.class)); + final TypeAdapter adapterAlgoOrderUpdate = + gson.getDelegateAdapter(this, TypeToken.get(AlgoOrderUpdate.class)); + final TypeAdapter adapterBalanceUpdate = + gson.getDelegateAdapter(this, TypeToken.get(BalanceUpdate.class)); + final TypeAdapter adapterConditionalOrderTradeUpdate = + gson.getDelegateAdapter(this, TypeToken.get(ConditionalOrderTradeUpdate.class)); + final TypeAdapter adapterExecutionReport = + gson.getDelegateAdapter(this, TypeToken.get(ExecutionReport.class)); + final TypeAdapter adapterLiabilityChange = + gson.getDelegateAdapter(this, TypeToken.get(LiabilityChange.class)); + final TypeAdapter adapterListenKeyExpired = + gson.getDelegateAdapter(this, TypeToken.get(ListenKeyExpired.class)); + final TypeAdapter adapterOpenOrderLoss = + gson.getDelegateAdapter(this, TypeToken.get(OpenOrderLoss.class)); final TypeAdapter adapterOrderTradeUpdate = gson.getDelegateAdapter(this, TypeToken.get(OrderTradeUpdate.class)); - final TypeAdapter adapterLiabilitychange = - gson.getDelegateAdapter(this, TypeToken.get(Liabilitychange.class)); - final TypeAdapter adapterOutboundaccountposition = - gson.getDelegateAdapter(this, TypeToken.get(Outboundaccountposition.class)); - final TypeAdapter adapterBalanceupdate = - gson.getDelegateAdapter(this, TypeToken.get(Balanceupdate.class)); - final TypeAdapter adapterExecutionreport = - gson.getDelegateAdapter(this, TypeToken.get(Executionreport.class)); - final TypeAdapter adapterOpenorderloss = - gson.getDelegateAdapter(this, TypeToken.get(Openorderloss.class)); - final TypeAdapter adapterListenkeyexpired = - gson.getDelegateAdapter(this, TypeToken.get(Listenkeyexpired.class)); - final TypeAdapter adapterRisklevelchange = - gson.getDelegateAdapter(this, TypeToken.get(Risklevelchange.class)); + final TypeAdapter adapterOutboundAccountPosition = + gson.getDelegateAdapter(this, TypeToken.get(OutboundAccountPosition.class)); + final TypeAdapter adapterRiskLevelChange = + gson.getDelegateAdapter(this, TypeToken.get(RiskLevelChange.class)); return (TypeAdapter) new TypeAdapter() { @@ -82,24 +82,6 @@ public void write(JsonWriter out, UserDataStreamEventsResponse value) return; } - // check if the actual instance is of the type `AlgoUpdate` - if (value.getActualInstance() instanceof AlgoUpdate) { - JsonElement element = - adapterAlgoUpdate.toJsonTree( - (AlgoUpdate) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type - // `ConditionalOrderTradeUpdate` - if (value.getActualInstance() instanceof ConditionalOrderTradeUpdate) { - JsonElement element = - adapterConditionalOrderTradeUpdate.toJsonTree( - (ConditionalOrderTradeUpdate) - value.getActualInstance()); - elementAdapter.write(out, element); - return; - } // check if the actual instance is of the type `AccountConfigUpdate` if (value.getActualInstance() instanceof AccountConfigUpdate) { JsonElement element = @@ -116,78 +98,96 @@ public void write(JsonWriter out, UserDataStreamEventsResponse value) elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `OrderTradeUpdate` - if (value.getActualInstance() instanceof OrderTradeUpdate) { + // check if the actual instance is of the type `AlgoOrderUpdate` + if (value.getActualInstance() instanceof AlgoOrderUpdate) { JsonElement element = - adapterOrderTradeUpdate.toJsonTree( - (OrderTradeUpdate) value.getActualInstance()); + adapterAlgoOrderUpdate.toJsonTree( + (AlgoOrderUpdate) value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Liabilitychange` - if (value.getActualInstance() instanceof Liabilitychange) { + // check if the actual instance is of the type `BalanceUpdate` + if (value.getActualInstance() instanceof BalanceUpdate) { JsonElement element = - adapterLiabilitychange.toJsonTree( - (Liabilitychange) value.getActualInstance()); + adapterBalanceUpdate.toJsonTree( + (BalanceUpdate) value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Outboundaccountposition` - if (value.getActualInstance() instanceof Outboundaccountposition) { + // check if the actual instance is of the type + // `ConditionalOrderTradeUpdate` + if (value.getActualInstance() instanceof ConditionalOrderTradeUpdate) { JsonElement element = - adapterOutboundaccountposition.toJsonTree( - (Outboundaccountposition) + adapterConditionalOrderTradeUpdate.toJsonTree( + (ConditionalOrderTradeUpdate) value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Balanceupdate` - if (value.getActualInstance() instanceof Balanceupdate) { + // check if the actual instance is of the type `ExecutionReport` + if (value.getActualInstance() instanceof ExecutionReport) { + JsonElement element = + adapterExecutionReport.toJsonTree( + (ExecutionReport) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `LiabilityChange` + if (value.getActualInstance() instanceof LiabilityChange) { + JsonElement element = + adapterLiabilityChange.toJsonTree( + (LiabilityChange) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `ListenKeyExpired` + if (value.getActualInstance() instanceof ListenKeyExpired) { JsonElement element = - adapterBalanceupdate.toJsonTree( - (Balanceupdate) value.getActualInstance()); + adapterListenKeyExpired.toJsonTree( + (ListenKeyExpired) value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Executionreport` - if (value.getActualInstance() instanceof Executionreport) { + // check if the actual instance is of the type `OpenOrderLoss` + if (value.getActualInstance() instanceof OpenOrderLoss) { JsonElement element = - adapterExecutionreport.toJsonTree( - (Executionreport) value.getActualInstance()); + adapterOpenOrderLoss.toJsonTree( + (OpenOrderLoss) value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Openorderloss` - if (value.getActualInstance() instanceof Openorderloss) { + // check if the actual instance is of the type `OrderTradeUpdate` + if (value.getActualInstance() instanceof OrderTradeUpdate) { JsonElement element = - adapterOpenorderloss.toJsonTree( - (Openorderloss) value.getActualInstance()); + adapterOrderTradeUpdate.toJsonTree( + (OrderTradeUpdate) value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Listenkeyexpired` - if (value.getActualInstance() instanceof Listenkeyexpired) { + // check if the actual instance is of the type `OutboundAccountPosition` + if (value.getActualInstance() instanceof OutboundAccountPosition) { JsonElement element = - adapterListenkeyexpired.toJsonTree( - (Listenkeyexpired) value.getActualInstance()); + adapterOutboundAccountPosition.toJsonTree( + (OutboundAccountPosition) + value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Risklevelchange` - if (value.getActualInstance() instanceof Risklevelchange) { + // check if the actual instance is of the type `RiskLevelChange` + if (value.getActualInstance() instanceof RiskLevelChange) { JsonElement element = - adapterRisklevelchange.toJsonTree( - (Risklevelchange) value.getActualInstance()); + adapterRiskLevelChange.toJsonTree( + (RiskLevelChange) value.getActualInstance()); elementAdapter.write(out, element); return; } throw new IOException( "Failed to serialize as the type doesn't match oneOf schemas:" - + " AccountConfigUpdate, AccountUpdate, AlgoUpdate," - + " Balanceupdate, ConditionalOrderTradeUpdate," - + " Executionreport, Liabilitychange, Listenkeyexpired," - + " Openorderloss, OrderTradeUpdate," - + " Outboundaccountposition, Risklevelchange"); + + " AccountConfigUpdate, AccountUpdate, AlgoOrderUpdate," + + " BalanceUpdate, ConditionalOrderTradeUpdate," + + " ExecutionReport, LiabilityChange, ListenKeyExpired," + + " OpenOrderLoss, OrderTradeUpdate," + + " OutboundAccountPosition, RiskLevelChange"); } @Override @@ -222,7 +222,8 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { deserialized); return newUserDataStreamEventsResponse; case "ALGO_UPDATE": - deserialized = adapterAlgoUpdate.fromJsonTree(jsonObject); + deserialized = + adapterAlgoOrderUpdate.fromJsonTree(jsonObject); newUserDataStreamEventsResponse.setActualInstance( deserialized); return newUserDataStreamEventsResponse; @@ -241,117 +242,44 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { return newUserDataStreamEventsResponse; case "balanceUpdate": deserialized = - adapterBalanceupdate.fromJsonTree(jsonObject); + adapterBalanceUpdate.fromJsonTree(jsonObject); newUserDataStreamEventsResponse.setActualInstance( deserialized); return newUserDataStreamEventsResponse; case "executionReport": deserialized = - adapterExecutionreport.fromJsonTree(jsonObject); + adapterExecutionReport.fromJsonTree(jsonObject); newUserDataStreamEventsResponse.setActualInstance( deserialized); return newUserDataStreamEventsResponse; case "liabilityChange": deserialized = - adapterLiabilitychange.fromJsonTree(jsonObject); + adapterLiabilityChange.fromJsonTree(jsonObject); newUserDataStreamEventsResponse.setActualInstance( deserialized); return newUserDataStreamEventsResponse; case "listenKeyExpired": deserialized = - adapterListenkeyexpired.fromJsonTree(jsonObject); + adapterListenKeyExpired.fromJsonTree(jsonObject); newUserDataStreamEventsResponse.setActualInstance( deserialized); return newUserDataStreamEventsResponse; case "openOrderLoss": deserialized = - adapterOpenorderloss.fromJsonTree(jsonObject); + adapterOpenOrderLoss.fromJsonTree(jsonObject); newUserDataStreamEventsResponse.setActualInstance( deserialized); return newUserDataStreamEventsResponse; case "outboundAccountPosition": deserialized = - adapterOutboundaccountposition.fromJsonTree( + adapterOutboundAccountPosition.fromJsonTree( jsonObject); newUserDataStreamEventsResponse.setActualInstance( deserialized); return newUserDataStreamEventsResponse; case "riskLevelChange": deserialized = - adapterRisklevelchange.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "accountConfigUpdate": - deserialized = - adapterAccountConfigUpdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "accountUpdate": - deserialized = - adapterAccountUpdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "algoUpdate": - deserialized = adapterAlgoUpdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "balanceupdate": - deserialized = - adapterBalanceupdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "conditionalOrderTradeUpdate": - deserialized = - adapterConditionalOrderTradeUpdate.fromJsonTree( - jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "executionreport": - deserialized = - adapterExecutionreport.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "liabilitychange": - deserialized = - adapterLiabilitychange.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "listenkeyexpired": - deserialized = - adapterListenkeyexpired.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "openorderloss": - deserialized = - adapterOpenorderloss.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "orderTradeUpdate": - deserialized = - adapterOrderTradeUpdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "outboundaccountposition": - deserialized = - adapterOutboundaccountposition.fromJsonTree( - jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "risklevelchange": - deserialized = - adapterRisklevelchange.fromJsonTree(jsonObject); + adapterRiskLevelChange.fromJsonTree(jsonObject); newUserDataStreamEventsResponse.setActualInstance( deserialized); return newUserDataStreamEventsResponse; @@ -371,15 +299,7 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { + " executionReport liabilityChange" + " listenKeyExpired openOrderLoss" + " outboundAccountPosition" - + " riskLevelChange accountConfigUpdate" - + " accountUpdate algoUpdate" - + " balanceupdate" - + " conditionalOrderTradeUpdate" - + " executionreport liabilitychange" - + " listenkeyexpired openorderloss" - + " orderTradeUpdate" - + " outboundaccountposition" - + " risklevelchange. Falling back to" + + " riskLevelChange. Falling back to" + " String.", jsonObject.get("e").getAsString())); } @@ -389,243 +309,244 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { ArrayList errorMessages = new ArrayList<>(); TypeAdapter actualAdapter = elementAdapter; - // deserialize AlgoUpdate + // deserialize AccountConfigUpdate try { // validate the JSON object to see if any exception is thrown - AlgoUpdate.validateJsonElement(jsonElement); - actualAdapter = adapterAlgoUpdate; + AccountConfigUpdate.validateJsonElement(jsonElement); + actualAdapter = adapterAccountConfigUpdate; match++; - log.log(Level.FINER, "Input data matches schema 'AlgoUpdate'"); + log.log( + Level.FINER, + "Input data matches schema 'AccountConfigUpdate'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for AlgoUpdate failed with `%s`.", + "Deserialization for AccountConfigUpdate failed" + + " with `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'AlgoUpdate'", + "Input data does not match schema 'AccountConfigUpdate'", e); } - // deserialize ConditionalOrderTradeUpdate + // deserialize AccountUpdate try { // validate the JSON object to see if any exception is thrown - ConditionalOrderTradeUpdate.validateJsonElement(jsonElement); - actualAdapter = adapterConditionalOrderTradeUpdate; + AccountUpdate.validateJsonElement(jsonElement); + actualAdapter = adapterAccountUpdate; match++; - log.log( - Level.FINER, - "Input data matches schema 'ConditionalOrderTradeUpdate'"); + log.log(Level.FINER, "Input data matches schema 'AccountUpdate'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for ConditionalOrderTradeUpdate" - + " failed with `%s`.", + "Deserialization for AccountUpdate failed with" + + " `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema" - + " 'ConditionalOrderTradeUpdate'", + "Input data does not match schema 'AccountUpdate'", e); } - // deserialize AccountConfigUpdate + // deserialize AlgoOrderUpdate try { // validate the JSON object to see if any exception is thrown - AccountConfigUpdate.validateJsonElement(jsonElement); - actualAdapter = adapterAccountConfigUpdate; + AlgoOrderUpdate.validateJsonElement(jsonElement); + actualAdapter = adapterAlgoOrderUpdate; match++; - log.log( - Level.FINER, - "Input data matches schema 'AccountConfigUpdate'"); + log.log(Level.FINER, "Input data matches schema 'AlgoOrderUpdate'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for AccountConfigUpdate failed" - + " with `%s`.", + "Deserialization for AlgoOrderUpdate failed with" + + " `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'AccountConfigUpdate'", + "Input data does not match schema 'AlgoOrderUpdate'", e); } - // deserialize AccountUpdate + // deserialize BalanceUpdate try { // validate the JSON object to see if any exception is thrown - AccountUpdate.validateJsonElement(jsonElement); - actualAdapter = adapterAccountUpdate; + BalanceUpdate.validateJsonElement(jsonElement); + actualAdapter = adapterBalanceUpdate; match++; - log.log(Level.FINER, "Input data matches schema 'AccountUpdate'"); + log.log(Level.FINER, "Input data matches schema 'BalanceUpdate'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for AccountUpdate failed with" + "Deserialization for BalanceUpdate failed with" + " `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'AccountUpdate'", + "Input data does not match schema 'BalanceUpdate'", e); } - // deserialize OrderTradeUpdate + // deserialize ConditionalOrderTradeUpdate try { // validate the JSON object to see if any exception is thrown - OrderTradeUpdate.validateJsonElement(jsonElement); - actualAdapter = adapterOrderTradeUpdate; + ConditionalOrderTradeUpdate.validateJsonElement(jsonElement); + actualAdapter = adapterConditionalOrderTradeUpdate; match++; log.log( Level.FINER, - "Input data matches schema 'OrderTradeUpdate'"); + "Input data matches schema 'ConditionalOrderTradeUpdate'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for OrderTradeUpdate failed with" - + " `%s`.", + "Deserialization for ConditionalOrderTradeUpdate" + + " failed with `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'OrderTradeUpdate'", + "Input data does not match schema" + + " 'ConditionalOrderTradeUpdate'", e); } - // deserialize Liabilitychange + // deserialize ExecutionReport try { // validate the JSON object to see if any exception is thrown - Liabilitychange.validateJsonElement(jsonElement); - actualAdapter = adapterLiabilitychange; + ExecutionReport.validateJsonElement(jsonElement); + actualAdapter = adapterExecutionReport; match++; - log.log(Level.FINER, "Input data matches schema 'Liabilitychange'"); + log.log(Level.FINER, "Input data matches schema 'ExecutionReport'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for Liabilitychange failed with" + "Deserialization for ExecutionReport failed with" + " `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'Liabilitychange'", + "Input data does not match schema 'ExecutionReport'", e); } - // deserialize Outboundaccountposition + // deserialize LiabilityChange try { // validate the JSON object to see if any exception is thrown - Outboundaccountposition.validateJsonElement(jsonElement); - actualAdapter = adapterOutboundaccountposition; + LiabilityChange.validateJsonElement(jsonElement); + actualAdapter = adapterLiabilityChange; match++; - log.log( - Level.FINER, - "Input data matches schema 'Outboundaccountposition'"); + log.log(Level.FINER, "Input data matches schema 'LiabilityChange'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for Outboundaccountposition failed" - + " with `%s`.", + "Deserialization for LiabilityChange failed with" + + " `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema" - + " 'Outboundaccountposition'", + "Input data does not match schema 'LiabilityChange'", e); } - // deserialize Balanceupdate + // deserialize ListenKeyExpired try { // validate the JSON object to see if any exception is thrown - Balanceupdate.validateJsonElement(jsonElement); - actualAdapter = adapterBalanceupdate; + ListenKeyExpired.validateJsonElement(jsonElement); + actualAdapter = adapterListenKeyExpired; match++; - log.log(Level.FINER, "Input data matches schema 'Balanceupdate'"); + log.log( + Level.FINER, + "Input data matches schema 'ListenKeyExpired'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for Balanceupdate failed with" + "Deserialization for ListenKeyExpired failed with" + " `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'Balanceupdate'", + "Input data does not match schema 'ListenKeyExpired'", e); } - // deserialize Executionreport + // deserialize OpenOrderLoss try { // validate the JSON object to see if any exception is thrown - Executionreport.validateJsonElement(jsonElement); - actualAdapter = adapterExecutionreport; + OpenOrderLoss.validateJsonElement(jsonElement); + actualAdapter = adapterOpenOrderLoss; match++; - log.log(Level.FINER, "Input data matches schema 'Executionreport'"); + log.log(Level.FINER, "Input data matches schema 'OpenOrderLoss'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for Executionreport failed with" + "Deserialization for OpenOrderLoss failed with" + " `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'Executionreport'", + "Input data does not match schema 'OpenOrderLoss'", e); } - // deserialize Openorderloss + // deserialize OrderTradeUpdate try { // validate the JSON object to see if any exception is thrown - Openorderloss.validateJsonElement(jsonElement); - actualAdapter = adapterOpenorderloss; + OrderTradeUpdate.validateJsonElement(jsonElement); + actualAdapter = adapterOrderTradeUpdate; match++; - log.log(Level.FINER, "Input data matches schema 'Openorderloss'"); + log.log( + Level.FINER, + "Input data matches schema 'OrderTradeUpdate'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for Openorderloss failed with" + "Deserialization for OrderTradeUpdate failed with" + " `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'Openorderloss'", + "Input data does not match schema 'OrderTradeUpdate'", e); } - // deserialize Listenkeyexpired + // deserialize OutboundAccountPosition try { // validate the JSON object to see if any exception is thrown - Listenkeyexpired.validateJsonElement(jsonElement); - actualAdapter = adapterListenkeyexpired; + OutboundAccountPosition.validateJsonElement(jsonElement); + actualAdapter = adapterOutboundAccountPosition; match++; log.log( Level.FINER, - "Input data matches schema 'Listenkeyexpired'"); + "Input data matches schema 'OutboundAccountPosition'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for Listenkeyexpired failed with" - + " `%s`.", + "Deserialization for OutboundAccountPosition failed" + + " with `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'Listenkeyexpired'", + "Input data does not match schema" + + " 'OutboundAccountPosition'", e); } - // deserialize Risklevelchange + // deserialize RiskLevelChange try { // validate the JSON object to see if any exception is thrown - Risklevelchange.validateJsonElement(jsonElement); - actualAdapter = adapterRisklevelchange; + RiskLevelChange.validateJsonElement(jsonElement); + actualAdapter = adapterRiskLevelChange; match++; - log.log(Level.FINER, "Input data matches schema 'Risklevelchange'"); + log.log(Level.FINER, "Input data matches schema 'RiskLevelChange'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for Risklevelchange failed with" + "Deserialization for RiskLevelChange failed with" + " `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'Risklevelchange'", + "Input data does not match schema 'RiskLevelChange'", e); } @@ -661,18 +582,18 @@ public UserDataStreamEventsResponse(Object o) { } static { - schemas.put("AlgoUpdate", AlgoUpdate.class); - schemas.put("ConditionalOrderTradeUpdate", ConditionalOrderTradeUpdate.class); schemas.put("AccountConfigUpdate", AccountConfigUpdate.class); schemas.put("AccountUpdate", AccountUpdate.class); + schemas.put("AlgoOrderUpdate", AlgoOrderUpdate.class); + schemas.put("BalanceUpdate", BalanceUpdate.class); + schemas.put("ConditionalOrderTradeUpdate", ConditionalOrderTradeUpdate.class); + schemas.put("ExecutionReport", ExecutionReport.class); + schemas.put("LiabilityChange", LiabilityChange.class); + schemas.put("ListenKeyExpired", ListenKeyExpired.class); + schemas.put("OpenOrderLoss", OpenOrderLoss.class); schemas.put("OrderTradeUpdate", OrderTradeUpdate.class); - schemas.put("Liabilitychange", Liabilitychange.class); - schemas.put("Outboundaccountposition", Outboundaccountposition.class); - schemas.put("Balanceupdate", Balanceupdate.class); - schemas.put("Executionreport", Executionreport.class); - schemas.put("Openorderloss", Openorderloss.class); - schemas.put("Listenkeyexpired", Listenkeyexpired.class); - schemas.put("Risklevelchange", Risklevelchange.class); + schemas.put("OutboundAccountPosition", OutboundAccountPosition.class); + schemas.put("RiskLevelChange", RiskLevelChange.class); } @Override @@ -682,89 +603,91 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: AccountConfigUpdate, AccountUpdate, AlgoUpdate, - * Balanceupdate, ConditionalOrderTradeUpdate, Executionreport, Liabilitychange, - * Listenkeyexpired, Openorderloss, OrderTradeUpdate, Outboundaccountposition, Risklevelchange + * against the oneOf child schemas: AccountConfigUpdate, AccountUpdate, AlgoOrderUpdate, + * BalanceUpdate, ConditionalOrderTradeUpdate, ExecutionReport, LiabilityChange, + * ListenKeyExpired, OpenOrderLoss, OrderTradeUpdate, OutboundAccountPosition, RiskLevelChange * *

It could be an instance of the 'oneOf' schemas. */ @Override public void setActualInstance(Object instance) { - if (instance instanceof AlgoUpdate) { + if (instance instanceof AccountConfigUpdate) { super.setActualInstance(instance); return; } - if (instance instanceof ConditionalOrderTradeUpdate) { + if (instance instanceof AccountUpdate) { super.setActualInstance(instance); return; } - if (instance instanceof AccountConfigUpdate) { + if (instance instanceof AlgoOrderUpdate) { super.setActualInstance(instance); return; } - if (instance instanceof AccountUpdate) { + if (instance instanceof BalanceUpdate) { super.setActualInstance(instance); return; } - if (instance instanceof OrderTradeUpdate) { + if (instance instanceof ConditionalOrderTradeUpdate) { super.setActualInstance(instance); return; } - if (instance instanceof Liabilitychange) { + if (instance instanceof ExecutionReport) { super.setActualInstance(instance); return; } - if (instance instanceof Outboundaccountposition) { + if (instance instanceof LiabilityChange) { super.setActualInstance(instance); return; } - if (instance instanceof Balanceupdate) { + if (instance instanceof ListenKeyExpired) { super.setActualInstance(instance); return; } - if (instance instanceof Executionreport) { + if (instance instanceof OpenOrderLoss) { super.setActualInstance(instance); return; } - if (instance instanceof Openorderloss) { + if (instance instanceof OrderTradeUpdate) { super.setActualInstance(instance); return; } - if (instance instanceof Listenkeyexpired) { + if (instance instanceof OutboundAccountPosition) { super.setActualInstance(instance); return; } - if (instance instanceof Risklevelchange) { + if (instance instanceof RiskLevelChange) { super.setActualInstance(instance); return; } throw new RuntimeException( - "Invalid instance type. Must be AccountConfigUpdate, AccountUpdate, AlgoUpdate," - + " Balanceupdate, ConditionalOrderTradeUpdate, Executionreport," - + " Liabilitychange, Listenkeyexpired, Openorderloss, OrderTradeUpdate," - + " Outboundaccountposition, Risklevelchange"); + "Invalid instance type. Must be AccountConfigUpdate, AccountUpdate," + + " AlgoOrderUpdate, BalanceUpdate, ConditionalOrderTradeUpdate," + + " ExecutionReport, LiabilityChange, ListenKeyExpired, OpenOrderLoss," + + " OrderTradeUpdate, OutboundAccountPosition, RiskLevelChange"); } /** * Get the actual instance, which can be the following: AccountConfigUpdate, AccountUpdate, - * AlgoUpdate, Balanceupdate, ConditionalOrderTradeUpdate, Executionreport, Liabilitychange, - * Listenkeyexpired, Openorderloss, OrderTradeUpdate, Outboundaccountposition, Risklevelchange + * AlgoOrderUpdate, BalanceUpdate, ConditionalOrderTradeUpdate, ExecutionReport, + * LiabilityChange, ListenKeyExpired, OpenOrderLoss, OrderTradeUpdate, OutboundAccountPosition, + * RiskLevelChange * - * @return The actual instance (AccountConfigUpdate, AccountUpdate, AlgoUpdate, Balanceupdate, - * ConditionalOrderTradeUpdate, Executionreport, Liabilitychange, Listenkeyexpired, - * Openorderloss, OrderTradeUpdate, Outboundaccountposition, Risklevelchange) + * @return The actual instance (AccountConfigUpdate, AccountUpdate, AlgoOrderUpdate, + * BalanceUpdate, ConditionalOrderTradeUpdate, ExecutionReport, LiabilityChange, + * ListenKeyExpired, OpenOrderLoss, OrderTradeUpdate, OutboundAccountPosition, + * RiskLevelChange) */ @SuppressWarnings("unchecked") @Override @@ -772,28 +695,6 @@ public Object getActualInstance() { return super.getActualInstance(); } - /** - * Get the actual instance of `AlgoUpdate`. If the actual instance is not `AlgoUpdate`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `AlgoUpdate` - * @throws ClassCastException if the instance is not `AlgoUpdate` - */ - public AlgoUpdate getAlgoUpdate() throws ClassCastException { - return (AlgoUpdate) super.getActualInstance(); - } - - /** - * Get the actual instance of `ConditionalOrderTradeUpdate`. If the actual instance is not - * `ConditionalOrderTradeUpdate`, the ClassCastException will be thrown. - * - * @return The actual instance of `ConditionalOrderTradeUpdate` - * @throws ClassCastException if the instance is not `ConditionalOrderTradeUpdate` - */ - public ConditionalOrderTradeUpdate getConditionalOrderTradeUpdate() throws ClassCastException { - return (ConditionalOrderTradeUpdate) super.getActualInstance(); - } - /** * Get the actual instance of `AccountConfigUpdate`. If the actual instance is not * `AccountConfigUpdate`, the ClassCastException will be thrown. @@ -817,91 +718,113 @@ public AccountUpdate getAccountUpdate() throws ClassCastException { } /** - * Get the actual instance of `OrderTradeUpdate`. If the actual instance is not - * `OrderTradeUpdate`, the ClassCastException will be thrown. + * Get the actual instance of `AlgoOrderUpdate`. If the actual instance is not + * `AlgoOrderUpdate`, the ClassCastException will be thrown. * - * @return The actual instance of `OrderTradeUpdate` - * @throws ClassCastException if the instance is not `OrderTradeUpdate` + * @return The actual instance of `AlgoOrderUpdate` + * @throws ClassCastException if the instance is not `AlgoOrderUpdate` */ - public OrderTradeUpdate getOrderTradeUpdate() throws ClassCastException { - return (OrderTradeUpdate) super.getActualInstance(); + public AlgoOrderUpdate getAlgoOrderUpdate() throws ClassCastException { + return (AlgoOrderUpdate) super.getActualInstance(); + } + + /** + * Get the actual instance of `BalanceUpdate`. If the actual instance is not `BalanceUpdate`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `BalanceUpdate` + * @throws ClassCastException if the instance is not `BalanceUpdate` + */ + public BalanceUpdate getBalanceUpdate() throws ClassCastException { + return (BalanceUpdate) super.getActualInstance(); } /** - * Get the actual instance of `Liabilitychange`. If the actual instance is not - * `Liabilitychange`, the ClassCastException will be thrown. + * Get the actual instance of `ConditionalOrderTradeUpdate`. If the actual instance is not + * `ConditionalOrderTradeUpdate`, the ClassCastException will be thrown. * - * @return The actual instance of `Liabilitychange` - * @throws ClassCastException if the instance is not `Liabilitychange` + * @return The actual instance of `ConditionalOrderTradeUpdate` + * @throws ClassCastException if the instance is not `ConditionalOrderTradeUpdate` */ - public Liabilitychange getLiabilitychange() throws ClassCastException { - return (Liabilitychange) super.getActualInstance(); + public ConditionalOrderTradeUpdate getConditionalOrderTradeUpdate() throws ClassCastException { + return (ConditionalOrderTradeUpdate) super.getActualInstance(); } /** - * Get the actual instance of `Outboundaccountposition`. If the actual instance is not - * `Outboundaccountposition`, the ClassCastException will be thrown. + * Get the actual instance of `ExecutionReport`. If the actual instance is not + * `ExecutionReport`, the ClassCastException will be thrown. * - * @return The actual instance of `Outboundaccountposition` - * @throws ClassCastException if the instance is not `Outboundaccountposition` + * @return The actual instance of `ExecutionReport` + * @throws ClassCastException if the instance is not `ExecutionReport` */ - public Outboundaccountposition getOutboundaccountposition() throws ClassCastException { - return (Outboundaccountposition) super.getActualInstance(); + public ExecutionReport getExecutionReport() throws ClassCastException { + return (ExecutionReport) super.getActualInstance(); } /** - * Get the actual instance of `Balanceupdate`. If the actual instance is not `Balanceupdate`, - * the ClassCastException will be thrown. + * Get the actual instance of `LiabilityChange`. If the actual instance is not + * `LiabilityChange`, the ClassCastException will be thrown. * - * @return The actual instance of `Balanceupdate` - * @throws ClassCastException if the instance is not `Balanceupdate` + * @return The actual instance of `LiabilityChange` + * @throws ClassCastException if the instance is not `LiabilityChange` */ - public Balanceupdate getBalanceupdate() throws ClassCastException { - return (Balanceupdate) super.getActualInstance(); + public LiabilityChange getLiabilityChange() throws ClassCastException { + return (LiabilityChange) super.getActualInstance(); } /** - * Get the actual instance of `Executionreport`. If the actual instance is not - * `Executionreport`, the ClassCastException will be thrown. + * Get the actual instance of `ListenKeyExpired`. If the actual instance is not + * `ListenKeyExpired`, the ClassCastException will be thrown. * - * @return The actual instance of `Executionreport` - * @throws ClassCastException if the instance is not `Executionreport` + * @return The actual instance of `ListenKeyExpired` + * @throws ClassCastException if the instance is not `ListenKeyExpired` */ - public Executionreport getExecutionreport() throws ClassCastException { - return (Executionreport) super.getActualInstance(); + public ListenKeyExpired getListenKeyExpired() throws ClassCastException { + return (ListenKeyExpired) super.getActualInstance(); } /** - * Get the actual instance of `Openorderloss`. If the actual instance is not `Openorderloss`, + * Get the actual instance of `OpenOrderLoss`. If the actual instance is not `OpenOrderLoss`, * the ClassCastException will be thrown. * - * @return The actual instance of `Openorderloss` - * @throws ClassCastException if the instance is not `Openorderloss` + * @return The actual instance of `OpenOrderLoss` + * @throws ClassCastException if the instance is not `OpenOrderLoss` */ - public Openorderloss getOpenorderloss() throws ClassCastException { - return (Openorderloss) super.getActualInstance(); + public OpenOrderLoss getOpenOrderLoss() throws ClassCastException { + return (OpenOrderLoss) super.getActualInstance(); } /** - * Get the actual instance of `Listenkeyexpired`. If the actual instance is not - * `Listenkeyexpired`, the ClassCastException will be thrown. + * Get the actual instance of `OrderTradeUpdate`. If the actual instance is not + * `OrderTradeUpdate`, the ClassCastException will be thrown. * - * @return The actual instance of `Listenkeyexpired` - * @throws ClassCastException if the instance is not `Listenkeyexpired` + * @return The actual instance of `OrderTradeUpdate` + * @throws ClassCastException if the instance is not `OrderTradeUpdate` */ - public Listenkeyexpired getListenkeyexpired() throws ClassCastException { - return (Listenkeyexpired) super.getActualInstance(); + public OrderTradeUpdate getOrderTradeUpdate() throws ClassCastException { + return (OrderTradeUpdate) super.getActualInstance(); } /** - * Get the actual instance of `Risklevelchange`. If the actual instance is not - * `Risklevelchange`, the ClassCastException will be thrown. + * Get the actual instance of `OutboundAccountPosition`. If the actual instance is not + * `OutboundAccountPosition`, the ClassCastException will be thrown. * - * @return The actual instance of `Risklevelchange` - * @throws ClassCastException if the instance is not `Risklevelchange` + * @return The actual instance of `OutboundAccountPosition` + * @throws ClassCastException if the instance is not `OutboundAccountPosition` */ - public Risklevelchange getRisklevelchange() throws ClassCastException { - return (Risklevelchange) super.getActualInstance(); + public OutboundAccountPosition getOutboundAccountPosition() throws ClassCastException { + return (OutboundAccountPosition) super.getActualInstance(); + } + + /** + * Get the actual instance of `RiskLevelChange`. If the actual instance is not + * `RiskLevelChange`, the ClassCastException will be thrown. + * + * @return The actual instance of `RiskLevelChange` + * @throws ClassCastException if the instance is not `RiskLevelChange` + */ + public RiskLevelChange getRiskLevelChange() throws ClassCastException { + return (RiskLevelChange) super.getActualInstance(); } /** @@ -915,131 +838,132 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate oneOf schemas one by one int validCount = 0; ArrayList errorMessages = new ArrayList<>(); - // validate the json string with AlgoUpdate + // validate the json string with AccountConfigUpdate try { - AlgoUpdate.validateJsonElement(jsonElement); + AccountConfigUpdate.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for AlgoUpdate failed with `%s`.", e.getMessage())); + "Deserialization for AccountConfigUpdate failed with `%s`.", + e.getMessage())); // continue to the next one } - // validate the json string with ConditionalOrderTradeUpdate + // validate the json string with AccountUpdate try { - ConditionalOrderTradeUpdate.validateJsonElement(jsonElement); + AccountUpdate.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for ConditionalOrderTradeUpdate failed with `%s`.", - e.getMessage())); + "Deserialization for AccountUpdate failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with AccountConfigUpdate + // validate the json string with AlgoOrderUpdate try { - AccountConfigUpdate.validateJsonElement(jsonElement); + AlgoOrderUpdate.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for AccountConfigUpdate failed with `%s`.", + "Deserialization for AlgoOrderUpdate failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with AccountUpdate + // validate the json string with BalanceUpdate try { - AccountUpdate.validateJsonElement(jsonElement); + BalanceUpdate.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for AccountUpdate failed with `%s`.", e.getMessage())); + "Deserialization for BalanceUpdate failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with OrderTradeUpdate + // validate the json string with ConditionalOrderTradeUpdate try { - OrderTradeUpdate.validateJsonElement(jsonElement); + ConditionalOrderTradeUpdate.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for OrderTradeUpdate failed with `%s`.", + "Deserialization for ConditionalOrderTradeUpdate failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Liabilitychange + // validate the json string with ExecutionReport try { - Liabilitychange.validateJsonElement(jsonElement); + ExecutionReport.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for Liabilitychange failed with `%s`.", + "Deserialization for ExecutionReport failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Outboundaccountposition + // validate the json string with LiabilityChange try { - Outboundaccountposition.validateJsonElement(jsonElement); + LiabilityChange.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for Outboundaccountposition failed with `%s`.", + "Deserialization for LiabilityChange failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Balanceupdate + // validate the json string with ListenKeyExpired try { - Balanceupdate.validateJsonElement(jsonElement); + ListenKeyExpired.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for Balanceupdate failed with `%s`.", e.getMessage())); + "Deserialization for ListenKeyExpired failed with `%s`.", + e.getMessage())); // continue to the next one } - // validate the json string with Executionreport + // validate the json string with OpenOrderLoss try { - Executionreport.validateJsonElement(jsonElement); + OpenOrderLoss.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for Executionreport failed with `%s`.", - e.getMessage())); + "Deserialization for OpenOrderLoss failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Openorderloss + // validate the json string with OrderTradeUpdate try { - Openorderloss.validateJsonElement(jsonElement); + OrderTradeUpdate.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for Openorderloss failed with `%s`.", e.getMessage())); + "Deserialization for OrderTradeUpdate failed with `%s`.", + e.getMessage())); // continue to the next one } - // validate the json string with Listenkeyexpired + // validate the json string with OutboundAccountPosition try { - Listenkeyexpired.validateJsonElement(jsonElement); + OutboundAccountPosition.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for Listenkeyexpired failed with `%s`.", + "Deserialization for OutboundAccountPosition failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Risklevelchange + // validate the json string with RiskLevelChange try { - Risklevelchange.validateJsonElement(jsonElement); + RiskLevelChange.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for Risklevelchange failed with `%s`.", + "Deserialization for RiskLevelChange failed with `%s`.", e.getMessage())); // continue to the next one } @@ -1047,10 +971,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IOException( String.format( "The JSON string is invalid for UserDataStreamEventsResponse with oneOf" - + " schemas: AccountConfigUpdate, AccountUpdate, AlgoUpdate," - + " Balanceupdate, ConditionalOrderTradeUpdate, Executionreport," - + " Liabilitychange, Listenkeyexpired, Openorderloss," - + " OrderTradeUpdate, Outboundaccountposition, Risklevelchange. %d" + + " schemas: AccountConfigUpdate, AccountUpdate, AlgoOrderUpdate," + + " BalanceUpdate, ConditionalOrderTradeUpdate, ExecutionReport," + + " LiabilityChange, ListenKeyExpired, OpenOrderLoss," + + " OrderTradeUpdate, OutboundAccountPosition, RiskLevelChange. %d" + " class(es) match the result, expected 1. Detailed failure" + " message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); diff --git a/clients/derivatives-trading-portfolio-margin/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/AccountApiTest.java b/clients/derivatives-trading-portfolio-margin/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/AccountApiTest.java index 2e31f16b3..5a18af3b3 100644 --- a/clients/derivatives-trading-portfolio-margin/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/AccountApiTest.java +++ b/clients/derivatives-trading-portfolio-margin/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/AccountApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -25,6 +25,8 @@ import com.binance.connector.client.common.sign.SignatureGenerator; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.AccountBalanceResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.AccountInformationResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Archived; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.AutoRepay; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.BnbTransferRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.BnbTransferResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ChangeAutoRepayFuturesStatusRequest; @@ -38,6 +40,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ChangeUmPositionModeRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ChangeUmPositionModeResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CmNotionalAndLeverageBracketsResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.DualSidePosition; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.FundAutoCollectionRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.FundAutoCollectionResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.FundCollectionByAssetRequest; @@ -59,6 +62,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUmIncomeHistoryResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUserCommissionRateForCmResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUserCommissionRateForUmResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.IncomeType; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.MarginMaxBorrowResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCmPositionInformationResponse; @@ -71,10 +75,12 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryUserRateLimitResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.RepayFuturesNegativeBalanceRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.RepayFuturesNegativeBalanceResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.TransferSide; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.UmFuturesAccountConfigurationResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.UmFuturesSymbolConfigurationResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.UmNotionalAndLeverageBracketsResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -126,15 +132,15 @@ public void initApiClient() throws ApiException { } /** - * Account Balance(USER_DATA) + * Account Balance (USER_DATA) * - *

Query account balance Weight: 20 + *

Query account balance Weight(IP): 20 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void accountBalanceTest() throws ApiException, CryptoException { - String asset = ""; + public void accountBalanceTest() throws ApiException, CryptoException, IOException { + String asset = "USDT"; Long recvWindow = 5000L; ApiResponse response = api.accountBalance(asset, recvWindow); @@ -148,22 +154,20 @@ public void accountBalanceTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("asset=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "a8610b861691761550acea81c71e6fe676ac39bd2020c66ff1115710eaf265a4", - actualRequest.url().queryParameter("signature")); + assertEquals("asset=USDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("816633ce75dedac28b6d22ea2d711ef729d8de6be27e1374234a7f7feb430448", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/balance", actualRequest.url().encodedPath()); } /** - * Account Information(USER_DATA) + * Account Information (USER_DATA) * - *

Query account information Weight: 20 + *

Query account information Weight(IP): 20 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void accountInformationTest() throws ApiException, CryptoException { + public void accountInformationTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.accountInformation(recvWindow); @@ -179,25 +183,23 @@ public void accountInformationTest() throws ApiException, CryptoException { assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/account", actualRequest.url().encodedPath()); } /** * BNB transfer (TRADE) * - *

Transfer BNB in and out of UM * The endpoint can only be called 10 times per 10 minutes in - * a rolling manner Weight: 750 + *

Transfer BNB in and out of UM Weight(IP): 750 Security Type: TRADE Notes: - The endpoint + * can only be called 10 times per 10 minutes in a rolling manner * * @throws ApiException if the Api call fails */ @Test - public void bnbTransferTest() throws ApiException, CryptoException { + public void bnbTransferTest() throws ApiException, CryptoException, IOException { BnbTransferRequest bnbTransferRequest = new BnbTransferRequest(); - - bnbTransferRequest.amount(1d); - bnbTransferRequest.transferSide(""); + bnbTransferRequest.amount(1.0d); + bnbTransferRequest.transferSide(TransferSide.TO_UM); ApiResponse response = api.bnbTransfer(bnbTransferRequest); @@ -211,26 +213,24 @@ public void bnbTransferTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000amount=1&transferSide=", signInputCaptor.getValue()); - assertEquals( - "e16833932c5efb8dd0192481215116c9f1d39b4d46a89360c91c516dfc2487c5", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000amount=1&transferSide=TO_UM", signInputCaptor.getValue()); + assertEquals("137a90c63370349387dde9a0cf59681de3c6fdf6e526208799198100080815c1", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/bnb-transfer", actualRequest.url().encodedPath()); } /** - * Change Auto-repay-futures Status(TRADE) + * Change Auto-repay-futures Status (TRADE) * - *

Change Auto-repay-futures Status Weight: 750 + *

Change Auto-repay-futures Status Weight(IP): 750 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void changeAutoRepayFuturesStatusTest() throws ApiException, CryptoException { + public void changeAutoRepayFuturesStatusTest() + throws ApiException, CryptoException, IOException { ChangeAutoRepayFuturesStatusRequest changeAutoRepayFuturesStatusRequest = new ChangeAutoRepayFuturesStatusRequest(); - - changeAutoRepayFuturesStatusRequest.autoRepay(""); + changeAutoRepayFuturesStatusRequest.autoRepay(AutoRepay.TRUE); ApiResponse response = api.changeAutoRepayFuturesStatus(changeAutoRepayFuturesStatusRequest); @@ -245,9 +245,9 @@ public void changeAutoRepayFuturesStatusTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000autoRepay=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000autoRepay=true", signInputCaptor.getValue()); assertEquals( - "89b69711fce80ffb1748b7a96c12374faa2b2afeb21a900f9a8ca0163615964e", + "fd3d4e144a7799fdb415fcd1c9a36a08e5600f7bb8a2019be6f141e3b0169ac9", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/repay-futures-switch", actualRequest.url().encodedPath()); } @@ -255,17 +255,17 @@ public void changeAutoRepayFuturesStatusTest() throws ApiException, CryptoExcept /** * Change CM Initial Leverage (TRADE) * - *

Change user's initial leverage of specific symbol in CM. Weight: 1 + *

Change user's initial leverage of specific symbol in CM. Weight(IP): 1 Security Type: + * TRADE * * @throws ApiException if the Api call fails */ @Test - public void changeCmInitialLeverageTest() throws ApiException, CryptoException { + public void changeCmInitialLeverageTest() throws ApiException, CryptoException, IOException { ChangeCmInitialLeverageRequest changeCmInitialLeverageRequest = new ChangeCmInitialLeverageRequest(); - - changeCmInitialLeverageRequest.symbol(""); - changeCmInitialLeverageRequest.leverage(0L); + changeCmInitialLeverageRequest.symbol("BTCUSD_200925"); + changeCmInitialLeverageRequest.leverage(21L); ApiResponse response = api.changeCmInitialLeverage(changeCmInitialLeverageRequest); @@ -280,26 +280,25 @@ public void changeCmInitialLeverageTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000symbol=&leverage=0", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000symbol=BTCUSD_200925&leverage=21", signInputCaptor.getValue()); assertEquals( - "31c40eeb1a5a52384cff8a195c1c312e32b26a672ad8fb71dc96256a61c4101c", + "ba689bc0084ddff641c6bfafe9c21f7d39beeb78b7d67484f72df30d6948a0f3", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/leverage", actualRequest.url().encodedPath()); } /** - * Change CM Position Mode(TRADE) + * Change CM Position Mode (TRADE) * *

Change user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in CM - * Weight: 1 + * Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void changeCmPositionModeTest() throws ApiException, CryptoException { + public void changeCmPositionModeTest() throws ApiException, CryptoException, IOException { ChangeCmPositionModeRequest changeCmPositionModeRequest = new ChangeCmPositionModeRequest(); - - changeCmPositionModeRequest.dualSidePosition(""); + changeCmPositionModeRequest.dualSidePosition(DualSidePosition.TRUE); ApiResponse response = api.changeCmPositionMode(changeCmPositionModeRequest); @@ -314,27 +313,27 @@ public void changeCmPositionModeTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000dualSidePosition=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000dualSidePosition=true", signInputCaptor.getValue()); assertEquals( - "234d62c8a0356474ae6889f6aee70005b8ded595c0d02364bc91a55e250c6017", + "e5d54f89dd6a1e74ab1ef1fa8057f86c8736d76176c60cbbfdc4a54572efc7fa", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/positionSide/dual", actualRequest.url().encodedPath()); } /** - * Change UM Initial Leverage(TRADE) + * Change UM Initial Leverage (TRADE) * - *

Change user's initial leverage of specific symbol in UM. Weight: 1 + *

Change user's initial leverage of specific symbol in UM. Weight(IP): 1 Security Type: + * TRADE * * @throws ApiException if the Api call fails */ @Test - public void changeUmInitialLeverageTest() throws ApiException, CryptoException { + public void changeUmInitialLeverageTest() throws ApiException, CryptoException, IOException { ChangeUmInitialLeverageRequest changeUmInitialLeverageRequest = new ChangeUmInitialLeverageRequest(); - - changeUmInitialLeverageRequest.symbol(""); - changeUmInitialLeverageRequest.leverage(0L); + changeUmInitialLeverageRequest.symbol("BTCUSDT"); + changeUmInitialLeverageRequest.leverage(21L); ApiResponse response = api.changeUmInitialLeverage(changeUmInitialLeverageRequest); @@ -349,26 +348,25 @@ public void changeUmInitialLeverageTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000symbol=&leverage=0", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&leverage=21", signInputCaptor.getValue()); assertEquals( - "31c40eeb1a5a52384cff8a195c1c312e32b26a672ad8fb71dc96256a61c4101c", + "8d6d8deb91650061926aa1805959fd0a4faa0ffd12ee9537fcaf3ae443ca5c00", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/leverage", actualRequest.url().encodedPath()); } /** - * Change UM Position Mode(TRADE) + * Change UM Position Mode (TRADE) * *

Change user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in UM - * Weight: 1 + * Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void changeUmPositionModeTest() throws ApiException, CryptoException { + public void changeUmPositionModeTest() throws ApiException, CryptoException, IOException { ChangeUmPositionModeRequest changeUmPositionModeRequest = new ChangeUmPositionModeRequest(); - - changeUmPositionModeRequest.dualSidePosition(""); + changeUmPositionModeRequest.dualSidePosition(DualSidePosition.TRUE); ApiResponse response = api.changeUmPositionMode(changeUmPositionModeRequest); @@ -383,23 +381,24 @@ public void changeUmPositionModeTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000dualSidePosition=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000dualSidePosition=true", signInputCaptor.getValue()); assertEquals( - "234d62c8a0356474ae6889f6aee70005b8ded595c0d02364bc91a55e250c6017", + "e5d54f89dd6a1e74ab1ef1fa8057f86c8736d76176c60cbbfdc4a54572efc7fa", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/positionSide/dual", actualRequest.url().encodedPath()); } /** - * CM Notional and Leverage Brackets(USER_DATA) + * CM Notional and Leverage Brackets (USER_DATA) * - *

Query CM notional and leverage brackets Weight: 1 + *

Query CM notional and leverage brackets Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void cmNotionalAndLeverageBracketsTest() throws ApiException, CryptoException { - String symbol = ""; + public void cmNotionalAndLeverageBracketsTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_PERP"; Long recvWindow = 5000L; ApiResponse response = api.cmNotionalAndLeverageBrackets(symbol, recvWindow); @@ -414,24 +413,24 @@ public void cmNotionalAndLeverageBracketsTest() throws ApiException, CryptoExcep Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSD_PERP&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "679c9ba4d1c806201ba4eeced5c351c5c25ae83e4f1601cb9f5e59942a1b8e7a", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/leverageBracket", actualRequest.url().encodedPath()); } /** - * Fund Auto-collection(TRADE) + * Fund Auto-collection (TRADE) * - *

Fund collection for Portfolio Margin * The BNB would not be collected from UM-PM account - * to the Portfolio Margin account. * You can only use this function 500 times per hour in a - * rolling manner. Weight: 750 + *

Fund collection for Portfolio Margin Weight(IP): 750 Security Type: TRADE Notes: - BNB + * assets will not be auto-collected. - Rolling window endpoint can be called at most 500 times + * per hour. * * @throws ApiException if the Api call fails */ @Test - public void fundAutoCollectionTest() throws ApiException, CryptoException { + public void fundAutoCollectionTest() throws ApiException, CryptoException, IOException { FundAutoCollectionRequest fundAutoCollectionRequest = new FundAutoCollectionRequest(); ApiResponse response = @@ -449,25 +448,23 @@ public void fundAutoCollectionTest() throws ApiException, CryptoException { assertEquals("timestamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", - actualRequest.url().queryParameter("signature")); + "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/auto-collection", actualRequest.url().encodedPath()); } /** - * Fund Collection by Asset(TRADE) + * Fund Collection by Asset (TRADE) * - *

Transfers specific asset from Futures Account to Margin account * The BNB transfer is not - * be supported Weight: 30 + *

Transfers specific asset from Futures Account to Margin account Weight(IP): 30 Security + * Type: TRADE Notes: - The BNB transfer is not be supported * * @throws ApiException if the Api call fails */ @Test - public void fundCollectionByAssetTest() throws ApiException, CryptoException { + public void fundCollectionByAssetTest() throws ApiException, CryptoException, IOException { FundCollectionByAssetRequest fundCollectionByAssetRequest = new FundCollectionByAssetRequest(); - - fundCollectionByAssetRequest.asset(""); + fundCollectionByAssetRequest.asset("BTC"); ApiResponse response = api.fundCollectionByAsset(fundCollectionByAssetRequest); @@ -482,22 +479,22 @@ public void fundCollectionByAssetTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000asset=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000asset=BTC", signInputCaptor.getValue()); assertEquals( - "733c2733b75fbea096af9abd7a6e22ac4cce318248e66e514087362c82db2bf1", + "b4fd40e7e7afd13ae0d8945c84dfd847e5f7f2fd316cda06c13465e107a3eb78", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/asset-collection", actualRequest.url().encodedPath()); } /** - * Get Auto-repay-futures Status(USER_DATA) + * Get Auto-repay-futures Status (USER_DATA) * - *

Query Auto-repay-futures Status Weight: 30 + *

Query Auto-repay-futures Status Weight(IP): 30 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getAutoRepayFuturesStatusTest() throws ApiException, CryptoException { + public void getAutoRepayFuturesStatusTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getAutoRepayFuturesStatus(recvWindow); @@ -520,14 +517,15 @@ public void getAutoRepayFuturesStatusTest() throws ApiException, CryptoException } /** - * Get CM Account Detail(USER_DATA) + * Get CM Account Detail (USER_DATA) * - *

Get current CM account asset and position information. Weight: 5 + *

Get current CM account asset and position information. Weight(IP): 5 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getCmAccountDetailTest() throws ApiException, CryptoException { + public void getCmAccountDetailTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getCmAccountDetail(recvWindow); @@ -543,21 +541,20 @@ public void getCmAccountDetailTest() throws ApiException, CryptoException { assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/account", actualRequest.url().encodedPath()); } /** - * Get CM Current Position Mode(USER_DATA) + * Get CM Current Position Mode (USER_DATA) * - *

Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in CM Weight: - * 30 + *

Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in CM + * Weight(IP): 30 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getCmCurrentPositionModeTest() throws ApiException, CryptoException { + public void getCmCurrentPositionModeTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getCmCurrentPositionMode(recvWindow); @@ -580,23 +577,24 @@ public void getCmCurrentPositionModeTest() throws ApiException, CryptoException } /** - * Get CM Income History(USER_DATA) + * Get CM Income History (USER_DATA) * - *

Get CM Income History * If `incomeType` is not sent, all kinds of flow will be - * returned * \"trandId\" is unique in the same \"incomeType\" for a user * - * The interval between `startTime` and `endTime` can not exceed 200 days: * - * If `startTime` and `endTime` are not sent, the last 200 days will be - * returned Weight: 30 + *

Get CM Income History. Weight(IP): 30 Security Type: USER_DATA Notes: - If + * `incomeType` is not sent, all kinds of flow will be returned - + * \"trandId\" is unique in the same \"incomeType\" for a user - The + * interval between `startTime` and `endTime` can not exceed 200 days: - If + * `startTime` and `endTime` are not sent, the last 200 days will be + * returned * * @throws ApiException if the Api call fails */ @Test - public void getCmIncomeHistoryTest() throws ApiException, CryptoException { - String symbol = ""; - String incomeType = ""; + public void getCmIncomeHistoryTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200925"; + IncomeType incomeType = IncomeType.TRANSFER; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long page = 0L; + Long page = 1L; Long limit = 100L; Long recvWindow = 5000L; ApiResponse response = @@ -613,26 +611,25 @@ public void getCmIncomeHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSD_200925&incomeType=TRANSFER&startTime=1623319461670&endTime=1641782889000&page=1&limit=100&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&incomeType=&startTime=1623319461670&endTime=1641782889000&page=0&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "05f9946fedf735df42817e55ffdc78ca315f60a95c723d2f957b7ce76546ef2e", - actualRequest.url().queryParameter("signature")); + "0868ff9957dea03c17eac59c32392aeda920e6059c5c5881528c4723bd7245a5", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/income", actualRequest.url().encodedPath()); } /** * Get Download Id For UM Futures Order History (USER_DATA) * - *

Get download id for UM futures order history * Request Limitation is 10 times per month, - * shared by front end download page and rest api * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 1500 + *

Get download id for UM futures order history Weight(IP): 1500 Security Type: USER_DATA + * Notes: - Request Limitation is 10 times per month, shared by front end download page and rest + * api - The time between `startTime` and `endTime` can not be longer than 1 + * year * * @throws ApiException if the Api call fails */ @Test - public void getDownloadIdForUmFuturesOrderHistoryTest() throws ApiException, CryptoException { + public void getDownloadIdForUmFuturesOrderHistoryTest() + throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; @@ -655,20 +652,23 @@ public void getDownloadIdForUmFuturesOrderHistoryTest() throws ApiException, Cry assertEquals( "812caedbe8f349196a4532c2050ff706ed2569fed185039c7b60a78cd84bc718", actualRequest.url().queryParameter("signature")); - assertEquals("/papi/v1/um/order/asyn", actualRequest.url().encodedPath()); + assertEquals( + "/papi/v1/um/order/asyn", actualRequest.url().encodedPath()); } /** * Get Download Id For UM Futures Trade History (USER_DATA) * - *

Get download id for UM futures trade history * Request Limitation is 5 times per month, - * shared by front end download page and rest api * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 1500 + *

Get download id for UM futures trade history Weight(IP): 1500 Security Type: USER_DATA + * Notes: - Request Limitation is 5 times per month, shared by front end download page and rest + * api - The time between `startTime` and `endTime` can not be longer than 1 + * year * * @throws ApiException if the Api call fails */ @Test - public void getDownloadIdForUmFuturesTradeHistoryTest() throws ApiException, CryptoException { + public void getDownloadIdForUmFuturesTradeHistoryTest() + throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; @@ -691,21 +691,23 @@ public void getDownloadIdForUmFuturesTradeHistoryTest() throws ApiException, Cry assertEquals( "812caedbe8f349196a4532c2050ff706ed2569fed185039c7b60a78cd84bc718", actualRequest.url().queryParameter("signature")); - assertEquals("/papi/v1/um/trade/asyn", actualRequest.url().encodedPath()); + assertEquals( + "/papi/v1/um/trade/asyn", actualRequest.url().encodedPath()); } /** * Get Download Id For UM Futures Transaction History (USER_DATA) * - *

Get download id for UM futures transaction history * Request Limitation is 5 times per - * month, shared by front end download page and rest api * The time between - * `startTime` and `endTime` can not be longer than 1 year Weight: 1500 + *

Get download id for UM futures transaction history Weight(IP): 1500 Security Type: + * USER_DATA Notes: - Request Limitation is 5 times per month, shared by front end download page + * and rest api - The time between `startTime` and `endTime` can not be + * longer than 1 year * * @throws ApiException if the Api call fails */ @Test public void getDownloadIdForUmFuturesTransactionHistoryTest() - throws ApiException, CryptoException { + throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; @@ -728,35 +730,38 @@ public void getDownloadIdForUmFuturesTransactionHistoryTest() assertEquals( "812caedbe8f349196a4532c2050ff706ed2569fed185039c7b60a78cd84bc718", actualRequest.url().queryParameter("signature")); - assertEquals("/papi/v1/um/income/asyn", actualRequest.url().encodedPath()); + assertEquals( + "/papi/v1/um/income/asyn", + actualRequest.url().encodedPath()); } /** - * Get Margin Borrow/Loan Interest History(USER_DATA) - * - *

Get Margin Borrow/Loan Interest History * Response in descending order * The max interval - * between startTime and endTime is 30 days. It is a MUST to ensure data correctness. * If - * `startTime` and `endTime` not sent, return records of the last 7 days by - * default * If `startTime` is sent and `endTime` is not sent, the records - * from `startTime` to the present will be returned; if `startTime` is more - * than 30 days ago, the records of the past 30 days will be returned. * If - * `startTime` is not sent and `endTime` is sent, the records of the 7 days - * before `endTime` is returned. * Type in response has 5 enums: * - * `PERIODIC` interest charged per hour * `ON_BORROW` first interest charged - * on borrow * `PERIODIC_CONVERTED` interest charged per hour converted into BNB * - * `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB * - * `PORTFOLIO` Portfolio Margin negative balance daily interest Weight: 1 + * Get Margin Borrow/Loan Interest History (USER_DATA) + * + *

Get Margin Borrow/Loan Interest History Weight(IP): 1 Security Type: USER_DATA Notes: - + * Response in descending order - The max interval between startTime and endTime is 30 days. It + * is a MUST to ensure data correctness. - If `startTime` and `endTime` not + * sent, return records of the last 7 days by default - If `startTime` is sent and + * `endTime` is not sent, the records from `startTime` to the present will + * be returned; if `startTime` is more than 30 days ago, the records of the past 30 + * days will be returned. - If `startTime` is not sent and `endTime` is + * sent, the records of the 7 days before `endTime` is returned. - Type in response + * has 5 enums: - `PERIODIC` interest charged per hour - `ON_BORROW` first + * interest charged on borrow - `PERIODIC_CONVERTED` interest charged per hour + * converted into BNB - `ON_BORROW_CONVERTED` first interest charged on borrow + * converted into BNB - `PORTFOLIO` Portfolio Margin negative balance daily interest * * @throws ApiException if the Api call fails */ @Test - public void getMarginBorrowLoanInterestHistoryTest() throws ApiException, CryptoException { - String asset = ""; + public void getMarginBorrowLoanInterestHistoryTest() + throws ApiException, CryptoException, IOException { + String asset = "USDT"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; Long size = 10L; - String archived = ""; + Archived archived = Archived.TRUE; Long recvWindow = 5000L; ApiResponse response = api.getMarginBorrowLoanInterestHistory( @@ -773,23 +778,24 @@ public void getMarginBorrowLoanInterestHistoryTest() throws ApiException, Crypto Request actualRequest = captorValue.request(); assertEquals( - "asset=&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&archived=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "asset=USDT&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&archived=true&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "cb5c81e7f3db5f0931fdd5cd3b8289f0c9dd4f3094e785c83ee401b0621646f1", + "bcd00b4d23c54620228a2d9d1ab2365a17e0ceb9116c24cd95bf368fd21c0144", actualRequest.url().queryParameter("signature")); - assertEquals("/papi/v1/margin/marginInterestHistory", actualRequest.url().encodedPath()); + assertEquals( + "/papi/v1/margin/marginInterestHistory", actualRequest.url().encodedPath()); } /** - * Get UM Account Detail(USER_DATA) + * Get UM Account Detail (USER_DATA) * - *

Get current UM account asset and position information. Weight: 5 + *

Get current UM account asset and position information. Weight(IP): 5 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getUmAccountDetailTest() throws ApiException, CryptoException { + public void getUmAccountDetailTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getUmAccountDetail(recvWindow); @@ -805,20 +811,20 @@ public void getUmAccountDetailTest() throws ApiException, CryptoException { assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/account", actualRequest.url().encodedPath()); } /** - * Get UM Account Detail V2(USER_DATA) + * Get UM Account Detail V2 (USER_DATA) * - *

Get current UM account asset and position information. Weight: 5 + *

Get current UM account asset and position information. Weight(IP): 5 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getUmAccountDetailV2Test() throws ApiException, CryptoException { + public void getUmAccountDetailV2Test() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getUmAccountDetailV2(recvWindow); @@ -840,15 +846,15 @@ public void getUmAccountDetailV2Test() throws ApiException, CryptoException { } /** - * Get UM Current Position Mode(USER_DATA) + * Get UM Current Position Mode (USER_DATA) * - *

Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in UM Weight: - * 30 + *

Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in UM + * Weight(IP): 30 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getUmCurrentPositionModeTest() throws ApiException, CryptoException { + public void getUmCurrentPositionModeTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getUmCurrentPositionMode(recvWindow); @@ -871,15 +877,17 @@ public void getUmCurrentPositionModeTest() throws ApiException, CryptoException } /** - * Get UM Futures Order Download Link by Id(USER_DATA) + * Get UM Futures Order Download Link by Id (USER_DATA) * - *

Get UM futures order download link by Id * Download link expiration: 24h Weight: 10 + *

Get UM futures order download link by Id Weight(IP): 10 Security Type: USER_DATA Notes: - + * Download link expiration: 7 days * * @throws ApiException if the Api call fails */ @Test - public void getUmFuturesOrderDownloadLinkByIdTest() throws ApiException, CryptoException { - String downloadId = "1"; + public void getUmFuturesOrderDownloadLinkByIdTest() + throws ApiException, CryptoException, IOException { + String downloadId = "545923594199212032"; Long recvWindow = 5000L; ApiResponse response = api.getUmFuturesOrderDownloadLinkById(downloadId, recvWindow); @@ -895,23 +903,25 @@ public void getUmFuturesOrderDownloadLinkByIdTest() throws ApiException, CryptoE Request actualRequest = captorValue.request(); assertEquals( - "downloadId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + "downloadId=545923594199212032&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "4947fe463a17e3ec0b50fc22b21afc2aafddf3da892fa0c8dfd1b9c50af87349", + "638547334c9bc29c0b148d1084ee5f9ba70e01bb0f80f5ab8b59e1b056942563", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/order/asyn/id", actualRequest.url().encodedPath()); } /** - * Get UM Futures Trade Download Link by Id(USER_DATA) + * Get UM Futures Trade Download Link by Id (USER_DATA) * - *

Get UM futures trade download link by Id * Download link expiration: 24h Weight: 10 + *

Get UM futures trade download link by Id Weight(IP): 10 Security Type: USER_DATA Notes: - + * Download link expiration: 7 days * * @throws ApiException if the Api call fails */ @Test - public void getUmFuturesTradeDownloadLinkByIdTest() throws ApiException, CryptoException { - String downloadId = "1"; + public void getUmFuturesTradeDownloadLinkByIdTest() + throws ApiException, CryptoException, IOException { + String downloadId = "545923594199212032"; Long recvWindow = 5000L; ApiResponse response = api.getUmFuturesTradeDownloadLinkById(downloadId, recvWindow); @@ -927,22 +937,24 @@ public void getUmFuturesTradeDownloadLinkByIdTest() throws ApiException, CryptoE Request actualRequest = captorValue.request(); assertEquals( - "downloadId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + "downloadId=545923594199212032&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "4947fe463a17e3ec0b50fc22b21afc2aafddf3da892fa0c8dfd1b9c50af87349", + "638547334c9bc29c0b148d1084ee5f9ba70e01bb0f80f5ab8b59e1b056942563", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/trade/asyn/id", actualRequest.url().encodedPath()); } /** - * Get UM Futures Transaction Download Link by Id(USER_DATA) + * Get UM Futures Transaction Download Link by Id (USER_DATA) * - *

Get UM futures Transaction download link by Id * Download link expiration: 24h Weight: 10 + *

Get UM futures Transaction download link by Id Weight(IP): 10 Security Type: USER_DATA + * Notes: - Download link expiration: 7 days * * @throws ApiException if the Api call fails */ @Test - public void getUmFuturesTransactionDownloadLinkByIdTest() throws ApiException, CryptoException { + public void getUmFuturesTransactionDownloadLinkByIdTest() + throws ApiException, CryptoException, IOException { String downloadId = "1"; Long recvWindow = 5000L; ApiResponse response = @@ -959,30 +971,34 @@ public void getUmFuturesTransactionDownloadLinkByIdTest() throws ApiException, C Request actualRequest = captorValue.request(); assertEquals( - "downloadId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + "downloadId=1&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); assertEquals( "4947fe463a17e3ec0b50fc22b21afc2aafddf3da892fa0c8dfd1b9c50af87349", actualRequest.url().queryParameter("signature")); - assertEquals("/papi/v1/um/income/asyn/id", actualRequest.url().encodedPath()); + assertEquals( + "/papi/v1/um/income/asyn/id", + actualRequest.url().encodedPath()); } /** - * Get UM Income History(USER_DATA) + * Get UM Income History (USER_DATA) * - *

Get UM Income History * If neither `startTime` nor `endTime` is sent, - * the recent 7-day data will be returned. * If `incomeType` is not sent, all kinds of - * flow will be returned * \"trandId\" is unique in the same incomeType for a user * - * Income history only contains data for the last three months Weight: 30 + *

Get UM Income History. Weight(IP): 30 Security Type: USER_DATA Notes: - If neither + * `startTime` nor `endTime` is sent, the recent 7-day data will be + * returned. - If `incomeType` is not sent, all kinds of flow will be returned - + * \"trandId\" is unique in the same incomeType for a user - Income history only + * contains data for the last three months * * @throws ApiException if the Api call fails */ @Test - public void getUmIncomeHistoryTest() throws ApiException, CryptoException { + public void getUmIncomeHistoryTest() throws ApiException, CryptoException, IOException { String symbol = ""; - String incomeType = ""; + IncomeType incomeType = IncomeType.TRANSFER; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long page = 0L; + Long page = 1L; Long limit = 100L; Long recvWindow = 5000L; ApiResponse response = @@ -999,25 +1015,22 @@ public void getUmIncomeHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=&incomeType=TRANSFER&startTime=1623319461670&endTime=1641782889000&page=1&limit=100&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&incomeType=&startTime=1623319461670&endTime=1641782889000&page=0&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "05f9946fedf735df42817e55ffdc78ca315f60a95c723d2f957b7ce76546ef2e", - actualRequest.url().queryParameter("signature")); + "67630002730ab9a954c51336b2ebaa21c1d3f40c1f131eea903bfc0167583825", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/income", actualRequest.url().encodedPath()); } /** - * Get User Commission Rate for CM(USER_DATA) + * Get User Commission Rate for CM (USER_DATA) * - *

Get User Commission Rate for CM Weight: 20 + *

Get User Commission Rate for CM Weight(IP): 20 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getUserCommissionRateForCmTest() throws ApiException, CryptoException { - String symbol = ""; + public void getUserCommissionRateForCmTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_PERP"; Long recvWindow = 5000L; ApiResponse response = api.getUserCommissionRateForCm(symbol, recvWindow); @@ -1032,23 +1045,23 @@ public void getUserCommissionRateForCmTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSD_PERP&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "679c9ba4d1c806201ba4eeced5c351c5c25ae83e4f1601cb9f5e59942a1b8e7a", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/commissionRate", actualRequest.url().encodedPath()); } /** - * Get User Commission Rate for UM(USER_DATA) + * Get User Commission Rate for UM (USER_DATA) * - *

Get User Commission Rate for UM Weight: 20 + *

Get User Commission Rate for UM Weight(IP): 20 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getUserCommissionRateForUmTest() throws ApiException, CryptoException { - String symbol = ""; + public void getUserCommissionRateForUmTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.getUserCommissionRateForUm(symbol, recvWindow); @@ -1063,23 +1076,23 @@ public void getUserCommissionRateForUmTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/commissionRate", actualRequest.url().encodedPath()); } /** - * Margin Max Borrow(USER_DATA) + * Margin Max Borrow (USER_DATA) * - *

Query margin max borrow Weight: 5 + *

Query margin max borrow Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void marginMaxBorrowTest() throws ApiException, CryptoException { - String asset = ""; + public void marginMaxBorrowTest() throws ApiException, CryptoException, IOException { + String asset = "USDT"; Long recvWindow = 5000L; ApiResponse response = api.marginMaxBorrow(asset, recvWindow); @@ -1093,25 +1106,24 @@ public void marginMaxBorrowTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("asset=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("asset=USDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "a8610b861691761550acea81c71e6fe676ac39bd2020c66ff1115710eaf265a4", - actualRequest.url().queryParameter("signature")); + "816633ce75dedac28b6d22ea2d711ef729d8de6be27e1374234a7f7feb430448", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/margin/maxBorrowable", actualRequest.url().encodedPath()); } /** - * Portfolio Margin UM Trading Quantitative Rules Indicators(USER_DATA) + * Portfolio Margin UM Trading Quantitative Rules Indicators (USER_DATA) * - *

Portfolio Margin UM Trading Quantitative Rules Indicators Weight: 1 for a single symbol 10 - * when the symbol parameter is omitted + *

Portfolio Margin UM Trading Quantitative Rules Indicators Weight: - 1 for a single + * `symbol` - 10 when `symbol` is omitted Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test public void portfolioMarginUmTradingQuantitativeRulesIndicatorsTest() - throws ApiException, CryptoException { - String symbol = ""; + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.portfolioMarginUmTradingQuantitativeRulesIndicators(symbol, recvWindow); @@ -1126,29 +1138,33 @@ public void portfolioMarginUmTradingQuantitativeRulesIndicatorsTest() Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); + assertEquals( + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); - assertEquals("/papi/v1/um/apiTradingStatus", actualRequest.url().encodedPath()); + assertEquals( + "/papi/v1/um/apiTradingStatus", + actualRequest.url().encodedPath()); } /** - * Query CM Position Information(USER_DATA) + * Query CM Position Information (USER_DATA) * - *

Get current CM position information. * If neither `marginAsset` nor - * `pair` is sent, positions of all symbols with `TRADING` status will be - * returned. * for One-way Mode user, the response will only show the \"BOTH\" - * positions * for Hedge Mode user, the response will show \"LONG\", and - * \"SHORT\" positions. * Please use with user data stream `ACCOUNT_UPDATE` - * to meet your timeliness and accuracy needs. Weight: 1 + *

Get current CM position information. Weight(IP): 1 Security Type: USER_DATA Notes: - If + * neither `marginAsset` nor `pair` is sent, positions of all symbols with + * `TRADING` status will be returned. - for One-way Mode user, the response will only + * show the \"BOTH\" positions - for Hedge Mode user, the response will show + * \"LONG\", and \"SHORT\" positions. **Note** - Please use with user data + * stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. * * @throws ApiException if the Api call fails */ @Test - public void queryCmPositionInformationTest() throws ApiException, CryptoException { - String marginAsset = ""; - String pair = ""; + public void queryCmPositionInformationTest() throws ApiException, CryptoException, IOException { + String marginAsset = "USDT"; + String pair = "BTCUSD_201225"; Long recvWindow = 5000L; ApiResponse response = api.queryCmPositionInformation(marginAsset, pair, recvWindow); @@ -1163,35 +1179,33 @@ public void queryCmPositionInformationTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("marginAsset=USDT&pair=BTCUSD_201225&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "marginAsset=&pair=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "7c340d46d6a73bb7697e05d5340862028b59650df2e5526d761180495c98e012", + "fb66fbd97a15d7b00837ed3f12508f54998e2b51ef53a42f41fd875ed1d57a18", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/positionRisk", actualRequest.url().encodedPath()); } /** - * Query Margin Loan Record(USER_DATA) + * Query Margin Loan Record (USER_DATA) * - *

Query margin loan record * txId or startTime must be sent. txId takes precedence. * - * Response in descending order * The max interval between `startTime` and - * `endTime` is 30 days. * If `startTime` and `endTime` not sent, - * return records of the last 7 days by default * Set `archived` to `true` - * to query data from 6 months ago Weight: 10 + *

Query margin loan record Weight(IP): 10 Security Type: USER_DATA Notes: - txId or + * startTime must be sent. txId takes precedence. - Response in descending order - The max + * interval between `startTime` and `endTime` is 30 days. - If + * `startTime` and `endTime` not sent, return records of the last 7 days by + * default - Set `archived` to `true` to query data from 6 months ago * * @throws ApiException if the Api call fails */ @Test - public void queryMarginLoanRecordTest() throws ApiException, CryptoException { - String asset = ""; + public void queryMarginLoanRecordTest() throws ApiException, CryptoException, IOException { + String asset = "USDT"; Long txId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; Long size = 10L; - String archived = ""; + Archived archived = Archived.TRUE; Long recvWindow = 5000L; ApiResponse response = api.queryMarginLoanRecord( @@ -1207,25 +1221,23 @@ public void queryMarginLoanRecordTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("asset=USDT&txId=1&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&archived=true&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "asset=&txId=1&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&archived=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "31118d378725e0dd919f1e39010f6e9f5e13f36ee04c30710dea40608234d063", + "722db607e713b194ba165f7c7dbdac3e0f248f03a6e26db88ea4d89326d2000c", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/margin/marginLoan", actualRequest.url().encodedPath()); } /** - * Query Margin Max Withdraw(USER_DATA) + * Query Margin Max Withdraw (USER_DATA) * - *

Query Margin Max Withdraw Weight: 5 + *

Query Margin Max Withdraw Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryMarginMaxWithdrawTest() throws ApiException, CryptoException { - String asset = ""; + public void queryMarginMaxWithdrawTest() throws ApiException, CryptoException, IOException { + String asset = "USDT"; Long recvWindow = 5000L; ApiResponse response = api.queryMarginMaxWithdraw(asset, recvWindow); @@ -1240,33 +1252,33 @@ public void queryMarginMaxWithdrawTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("asset=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("asset=USDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "a8610b861691761550acea81c71e6fe676ac39bd2020c66ff1115710eaf265a4", + "816633ce75dedac28b6d22ea2d711ef729d8de6be27e1374234a7f7feb430448", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/margin/maxWithdraw", actualRequest.url().encodedPath()); } /** - * Query Margin repay Record(USER_DATA) + * Query Margin repay Record (USER_DATA) * - *

Query margin repay record. * txId or startTime must be sent. txId takes precedence. * - * Response in descending order * The max interval between `startTime` and - * `endTime` is 30 days. * If `startTime` and `endTime` not sent, - * return records of the last 7 days by default * Set `archived` to `true` - * to query data from 6 months ago Weight: 10 + *

Query margin repay record. Weight(IP): 10 Security Type: USER_DATA Notes: - txId or + * startTime must be sent. txId takes precedence. - Response in descending order - The max + * interval between `startTime` and `endTime` is 30 days. - If + * `startTime` and `endTime` not sent, return records of the last 7 days by + * default - Set `archived` to `true` to query data from 6 months ago * * @throws ApiException if the Api call fails */ @Test - public void queryMarginRepayRecordTest() throws ApiException, CryptoException { - String asset = ""; + public void queryMarginRepayRecordTest() throws ApiException, CryptoException, IOException { + String asset = "USDT"; Long txId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; Long size = 10L; - String archived = ""; + Archived archived = Archived.TRUE; Long recvWindow = 5000L; ApiResponse response = api.queryMarginRepayRecord( @@ -1282,33 +1294,31 @@ public void queryMarginRepayRecordTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("asset=USDT&txId=1&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&archived=true&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "asset=&txId=1&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&archived=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "31118d378725e0dd919f1e39010f6e9f5e13f36ee04c30710dea40608234d063", + "722db607e713b194ba165f7c7dbdac3e0f248f03a6e26db88ea4d89326d2000c", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/margin/repayLoan", actualRequest.url().encodedPath()); } /** - * Query Portfolio Margin Negative Balance Interest History(USER_DATA) + * Query Portfolio Margin Negative Balance Interest History (USER_DATA) * - *

Query interest history of negative balance for portfolio margin. * Response in descending - * order * The max interval between startTime and endTime is 30 days. It is a MUST to ensure - * data correctness. * If `startTime` and `endTime` not sent, return records - * of the last 7 days by default * If `startTime` is sent and `endTime` is - * not sent, the records from `startTime` to the present will be returned; if - * `startTime` is more than 30 days ago, the records of the past 30 days will be - * returned. * If `startTime` is not sent and `endTime` is sent, the records - * of the 7 days before `endTime` is returned. Weight: 50 + *

Query interest history of negative balance for portfolio margin. Weight(IP): 50 Security + * Type: USER_DATA Notes: - Results are returned in descending order. - The query range cannot + * exceed 30 days to ensure data correctness. - If both `startTime` and + * `endTime` are omitted, the most recent 7 days are returned by default. - If + * `startTime` is provided but `endTime` is omitted, records from + * `startTime` to now are returned; if that exceeds 30 days, only the most recent 30 + * days are returned. - If `endTime` is provided but `startTime` is omitted, + * records from the 7 days before `endTime` are returned. * * @throws ApiException if the Api call fails */ @Test public void queryPortfolioMarginNegativeBalanceInterestHistoryTest() - throws ApiException, CryptoException { - String asset = ""; + throws ApiException, CryptoException, IOException { + String asset = "USDT"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long size = 10L; @@ -1328,27 +1338,29 @@ public void queryPortfolioMarginNegativeBalanceInterestHistoryTest() Request actualRequest = captorValue.request(); assertEquals( - "asset=&startTime=1623319461670&endTime=1641782889000&size=10&recvWindow=5000×tamp=1736393892000", + "asset=USDT&startTime=1623319461670&endTime=1641782889000&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "08f5e5a6f9b5d64dcf3e4057c1196835facab312d474221a75a08bcfee1c2c0e", + "e6cb2b64b17ad1e8c1ed53a17110ca0de784ce85b44e039dba1921a5962b9d26", actualRequest.url().queryParameter("signature")); - assertEquals("/papi/v1/portfolio/interest-history", actualRequest.url().encodedPath()); + assertEquals( + "/papi/v1/portfolio/interest-history", + actualRequest.url().encodedPath()); } /** - * Query UM Position Information(USER_DATA) + * Query UM Position Information (USER_DATA) * - *

Get current UM position information. * Please use with user data stream - * `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. * for One-way Mode - * user, the response will only show the \"BOTH\" positions * for Hedge Mode user, the - * response will show \"LONG\", and \"SHORT\" positions. Weight: 5 + *

Get current UM position information. Weight(IP): 5 Security Type: USER_DATA Notes: - + * Please use with account push event `ACCOUNT_UPDATE` for timeliness and accuracy. - + * In One-way Mode, only positions with side `BOTH` are shown. - In Hedge Mode, + * positions with sides `BOTH`, `LONG`, and `SHORT` are shown. * * @throws ApiException if the Api call fails */ @Test - public void queryUmPositionInformationTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryUmPositionInformationTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.queryUmPositionInformation(symbol, recvWindow); @@ -1363,9 +1375,9 @@ public void queryUmPositionInformationTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/positionRisk", actualRequest.url().encodedPath()); } @@ -1373,14 +1385,15 @@ public void queryUmPositionInformationTest() throws ApiException, CryptoExceptio /** * Query User Negative Balance Auto Exchange Record (USER_DATA) * - *

Query user negative balance auto exchange record * Response in descending order * The max - * interval between `startTime` and `endTime` is 3 months. Weight: 100 + *

Query user negative balance auto exchange record Weight(IP): 100 Security Type: USER_DATA + * Notes: - Response in descending order - The max interval between `startTime` and + * `endTime` is 3 months. * * @throws ApiException if the Api call fails */ @Test public void queryUserNegativeBalanceAutoExchangeRecordTest() - throws ApiException, CryptoException { + throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; @@ -1411,12 +1424,12 @@ public void queryUserNegativeBalanceAutoExchangeRecordTest() /** * Query User Rate Limit (USER_DATA) * - *

Query User Rate Limit Weight: 1 + *

Query User Rate Limit Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryUserRateLimitTest() throws ApiException, CryptoException { + public void queryUserRateLimitTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.queryUserRateLimit(recvWindow); @@ -1432,20 +1445,20 @@ public void queryUserRateLimitTest() throws ApiException, CryptoException { assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/rateLimit/order", actualRequest.url().encodedPath()); } /** - * Repay futures Negative Balance(USER_DATA) + * Repay futures Negative Balance (USER_DATA) * - *

Repay futures Negative Balance Weight: 750 + *

Repay futures Negative Balance Weight(IP): 750 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void repayFuturesNegativeBalanceTest() throws ApiException, CryptoException { + public void repayFuturesNegativeBalanceTest() + throws ApiException, CryptoException, IOException { RepayFuturesNegativeBalanceRequest repayFuturesNegativeBalanceRequest = new RepayFuturesNegativeBalanceRequest(); @@ -1470,14 +1483,15 @@ public void repayFuturesNegativeBalanceTest() throws ApiException, CryptoExcepti } /** - * UM Futures Account Configuration(USER_DATA) + * UM Futures Account Configuration (USER_DATA) * - *

Query UM Futures account configuration Weight: 5 + *

Query UM Futures account configuration Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void umFuturesAccountConfigurationTest() throws ApiException, CryptoException { + public void umFuturesAccountConfigurationTest() + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.umFuturesAccountConfiguration(recvWindow); @@ -1500,15 +1514,16 @@ public void umFuturesAccountConfigurationTest() throws ApiException, CryptoExcep } /** - * UM Futures Symbol Configuration(USER_DATA) + * UM Futures Symbol Configuration (USER_DATA) * - *

Get current UM account symbol configuration. Weight: 5 + *

Get current UM account symbol configuration. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void umFuturesSymbolConfigurationTest() throws ApiException, CryptoException { - String symbol = ""; + public void umFuturesSymbolConfigurationTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.umFuturesSymbolConfiguration(symbol, recvWindow); @@ -1523,9 +1538,9 @@ public void umFuturesSymbolConfigurationTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/symbolConfig", actualRequest.url().encodedPath()); } @@ -1533,13 +1548,14 @@ public void umFuturesSymbolConfigurationTest() throws ApiException, CryptoExcept /** * UM Notional and Leverage Brackets (USER_DATA) * - *

Query UM notional and leverage brackets Weight: 1 + *

Query UM notional and leverage brackets Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void umNotionalAndLeverageBracketsTest() throws ApiException, CryptoException { - String symbol = ""; + public void umNotionalAndLeverageBracketsTest() + throws ApiException, CryptoException, IOException { + String symbol = "ETHUSDT"; Long recvWindow = 5000L; ApiResponse response = api.umNotionalAndLeverageBrackets(symbol, recvWindow); @@ -1554,9 +1570,9 @@ public void umNotionalAndLeverageBracketsTest() throws ApiException, CryptoExcep Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=ETHUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "c975b46b635be947c7f599863263cb25892ecbaf7b1bf89b64011fc936a9e1ba", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/leverageBracket", actualRequest.url().encodedPath()); } diff --git a/clients/derivatives-trading-portfolio-margin/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/MarketDataApiTest.java b/clients/derivatives-trading-portfolio-margin/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/MarketDataApiTest.java index edd763f00..42a5c95fc 100644 --- a/clients/derivatives-trading-portfolio-margin/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/MarketDataApiTest.java +++ b/clients/derivatives-trading-portfolio-margin/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/MarketDataApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -24,6 +24,7 @@ import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -77,12 +78,12 @@ public void initApiClient() throws ApiException { /** * Test Connectivity * - *

Test connectivity to the Rest API. Weight: 1 + *

Test connectivity to the Rest API. Weight(IP): 1 * * @throws ApiException if the Api call fails */ @Test - public void testConnectivityTest() throws ApiException, CryptoException { + public void testConnectivityTest() throws ApiException, CryptoException, IOException { api.testConnectivity(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -91,7 +92,8 @@ public void testConnectivityTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/ping", actualRequest.url().encodedPath()); } } diff --git a/clients/derivatives-trading-portfolio-margin/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/TradeApiTest.java b/clients/derivatives-trading-portfolio-margin/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/TradeApiTest.java index a971f6208..7818199eb 100644 --- a/clients/derivatives-trading-portfolio-margin/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/TradeApiTest.java +++ b/clients/derivatives-trading-portfolio-margin/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/TradeApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -23,9 +23,11 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.AlgoType; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.AutoCloseType; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelAllCmOpenConditionalOrdersResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelAllCmOpenOrdersResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelAllUmAlgoOpenOrdersResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelAllUmOpenConditionalOrdersResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelAllUmOpenOrdersResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelCmConditionalOrderResponse; @@ -33,10 +35,14 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelMarginAccountAllOpenOrdersOnASymbolResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelMarginAccountOcoOrdersResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelMarginAccountOrderResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelUmAlgoOrderResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelUmConditionalOrderResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelUmOrderResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CmAccountTradeListResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CmPositionAdlQuantileEstimationResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.FeeBurn; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.FuturesTradfiPerpsContractRequest; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.FuturesTradfiPerpsContractResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUmFuturesBnbBurnStatusResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.MarginAccountBorrowRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.MarginAccountBorrowResponse; @@ -57,14 +63,18 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewCmOrderResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewMarginOrderRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewMarginOrderResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewUmAlgoOrderRequest; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewUmAlgoOrderResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewUmConditionalOrderRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewUmConditionalOrderResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewUmOrderRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewUmOrderResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.OrderType; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllCmConditionalOrdersResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllCmOrdersResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllCurrentCmOpenConditionalOrdersResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllCurrentCmOpenOrdersResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllCurrentUmOpenAlgoOrdersResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllCurrentUmOpenConditionalOrdersResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllCurrentUmOpenOrdersResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllMarginAccountOrdersResponse; @@ -76,12 +86,14 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCurrentCmOpenConditionalOrderResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCurrentCmOpenOrderResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCurrentMarginOpenOrderResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCurrentUmOpenAlgoOrderResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCurrentUmOpenConditionalOrderResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCurrentUmOpenOrderResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryMarginAccountOrderResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryMarginAccountsAllOcoResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryMarginAccountsOcoResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryMarginAccountsOpenOcoResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryUmAlgoOrderHistoryResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryUmConditionalOrderHistoryResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryUmModifyOrderHistoryResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryUmOrderResponse; @@ -92,10 +104,10 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.StrategyType; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ToggleBnbBurnOnUmFuturesTradeRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ToggleBnbBurnOnUmFuturesTradeResponse; -import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Type; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.UmAccountTradeListResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.UmPositionAdlQuantileEstimationResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -147,15 +159,16 @@ public void initApiClient() throws ApiException { } /** - * Cancel All CM Open Conditional Orders(TRADE) + * Cancel All CM Open Conditional Orders (TRADE) * - *

Cancel All CM Open Conditional Orders Weight: 1 + *

Cancel All CM Open Conditional Orders Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void cancelAllCmOpenConditionalOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void cancelAllCmOpenConditionalOrdersTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.cancelAllCmOpenConditionalOrders(symbol, recvWindow); @@ -170,23 +183,24 @@ public void cancelAllCmOpenConditionalOrdersTest() throws ApiException, CryptoEx Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/conditional/allOpenOrders", actualRequest.url().encodedPath()); } /** - * Cancel All CM Open Orders(TRADE) + * Cancel All CM Open Orders (TRADE) * - *

Cancel all active LIMIT orders on specific symbol Weight: 1 + *

Cancel all active LIMIT orders on specific symbol Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void cancelAllCmOpenOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void cancelAllCmOpenOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.cancelAllCmOpenOrders(symbol, recvWindow); @@ -201,23 +215,55 @@ public void cancelAllCmOpenOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/allOpenOrders", actualRequest.url().encodedPath()); } + /** + * Cancel All UM Algo Open Orders (TRADE) + * + *

Cancel All UM Algo Open Orders Weight(IP): 1 Security Type: TRADE + * + * @throws ApiException if the Api call fails + */ + @Test + public void cancelAllUmAlgoOpenOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BNBUSDT"; + Long recvWindow = 5000L; + ApiResponse response = + api.cancelAllUmAlgoOpenOrders(symbol, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("symbol=BNBUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "1c2ec70499498e5c5d2f4e98a7e24c74f2801642a8c3743d289dbfc1ca00c7a8", + actualRequest.url().queryParameter("signature")); + assertEquals("/papi/v1/um/algo/allOpenOrders", actualRequest.url().encodedPath()); + } + /** * Cancel All UM Open Conditional Orders (TRADE) * - *

Cancel All UM Open Conditional Orders Weight: 1 + *

Cancel All UM Open Conditional Orders Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void cancelAllUmOpenConditionalOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void cancelAllUmOpenConditionalOrdersTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.cancelAllUmOpenConditionalOrders(symbol, recvWindow); @@ -232,23 +278,24 @@ public void cancelAllUmOpenConditionalOrdersTest() throws ApiException, CryptoEx Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/conditional/allOpenOrders", actualRequest.url().encodedPath()); } /** - * Cancel All UM Open Orders(TRADE) + * Cancel All UM Open Orders (TRADE) * - *

Cancel all active LIMIT orders on specific symbol Weight: 1 + *

Cancel all active LIMIT orders on specific symbol Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void cancelAllUmOpenOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void cancelAllUmOpenOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.cancelAllUmOpenOrders(symbol, recvWindow); @@ -263,24 +310,24 @@ public void cancelAllUmOpenOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/allOpenOrders", actualRequest.url().encodedPath()); } /** - * Cancel CM Conditional Order(TRADE) + * Cancel CM Conditional Order (TRADE) * - *

Cancel CM Conditional Order * Either `strategyId` or - * `newClientStrategyId` must be sent. Weight: 1 + *

Cancel CM Conditional Order Weight(IP): 1 Security Type: TRADE Notes: - Either + * `strategyId` or `newClientStrategyId` must be sent. * * @throws ApiException if the Api call fails */ @Test - public void cancelCmConditionalOrderTest() throws ApiException, CryptoException { - String symbol = ""; + public void cancelCmConditionalOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long strategyId = 1L; String newClientStrategyId = "1"; Long recvWindow = 5000L; @@ -297,26 +344,24 @@ public void cancelCmConditionalOrderTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&strategyId=1&newClientStrategyId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&strategyId=1&newClientStrategyId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "a122adefbf5aadf438d7dc29aaf824c9960c880ff367781502c41a638ee6637f", + "76ca77501cf0f97cea375b78a61226c092666a1c24806a1fabaa4fba6d9db3f9", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/conditional/order", actualRequest.url().encodedPath()); } /** - * Cancel CM Order(TRADE) + * Cancel CM Order (TRADE) * - *

Cancel an active LIMIT order * Either `orderId` or `origClientOrderId` - * must be sent. Weight: 1 + *

Cancel an active LIMIT order Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent. * * @throws ApiException if the Api call fails */ @Test - public void cancelCmOrderTest() throws ApiException, CryptoException { - String symbol = ""; + public void cancelCmOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200925"; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; @@ -333,26 +378,22 @@ public void cancelCmOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "symbol=&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "cbec82483be2ad044b893ffb2e6bc0d55370e378eaea0b4b61d95893bd9cc458", - actualRequest.url().queryParameter("signature")); + assertEquals("symbol=BTCUSD_200925&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("47de3ec7159e0434e57901face422fd64ed83f8c2800c1b6bc885c74846a398b", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/order", actualRequest.url().encodedPath()); } /** - * Cancel Margin Account All Open Orders on a Symbol(TRADE) + * Cancel Margin Account All Open Orders on a Symbol (TRADE) * - *

Cancel Margin Account All Open Orders on a Symbol Weight: 5 + *

Cancel Margin Account All Open Orders on a Symbol Weight(IP): 5 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test public void cancelMarginAccountAllOpenOrdersOnASymbolTest() - throws ApiException, CryptoException { - String symbol = ""; + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.cancelMarginAccountAllOpenOrdersOnASymbol(symbol, recvWindow); @@ -367,24 +408,29 @@ public void cancelMarginAccountAllOpenOrdersOnASymbolTest() Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); + assertEquals( + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); - assertEquals("/papi/v1/margin/allOpenOrders", actualRequest.url().encodedPath()); + assertEquals( + "/papi/v1/margin/allOpenOrders", + actualRequest.url().encodedPath()); } /** - * Cancel Margin Account OCO Orders(TRADE) + * Cancel Margin Account OCO Orders (TRADE) * - *

Cancel Margin Account OCO Orders * Additional notes: Canceling an individual leg will - * cancel the entire OCO Weight: 2 + *

Cancel Margin Account OCO Orders Weight(IP): 2 Security Type: TRADE Notes: - Additional + * notes: Canceling an individual leg will cancel the entire OCO * * @throws ApiException if the Api call fails */ @Test - public void cancelMarginAccountOcoOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void cancelMarginAccountOcoOrdersTest() + throws ApiException, CryptoException, IOException { + String symbol = "LTCBTC"; Long orderListId = 1L; String listClientOrderId = "1"; String newClientOrderId = "1"; @@ -403,26 +449,24 @@ public void cancelMarginAccountOcoOrdersTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=LTCBTC&orderListId=1&listClientOrderId=1&newClientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&orderListId=1&listClientOrderId=1&newClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "a45bdd3aa762931d7a258dd29daa4df12bf8980aa9020db3df0e49fb49044d58", + "ea45dbe7dba15cdccdead285127938e79b63bb23403016fd69d66c92fb41f3a1", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/margin/orderList", actualRequest.url().encodedPath()); } /** - * Cancel Margin Account Order(TRADE) + * Cancel Margin Account Order (TRADE) * - *

Cancel Margin Account Order * Either `orderId` or `origClientOrderId` - * must be sent. Weight: 2 + *

Cancel Margin Account Order Weight(IP): 2 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent. * * @throws ApiException if the Api call fails */ @Test - public void cancelMarginAccountOrderTest() throws ApiException, CryptoException { - String symbol = ""; + public void cancelMarginAccountOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "LTCBTC"; Long orderId = 1L; String origClientOrderId = "1"; String newClientOrderId = "1"; @@ -441,26 +485,56 @@ public void cancelMarginAccountOrderTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=LTCBTC&orderId=1&origClientOrderId=1&newClientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&orderId=1&origClientOrderId=1&newClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "bde8880b45003f9fc2944760c55aa5805d96649e145da141ccdbc1f7451fd1fc", + "5f04a7db5adcac1786c075ce11051246157d7bfe611915925be854924d038c32", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/margin/order", actualRequest.url().encodedPath()); } /** - * Cancel UM Conditional Order(TRADE) + * Cancel UM Algo Order (TRADE) * - *

Cancel UM Conditional Order * Either `strategyId` or - * `newClientStrategyId` must be sent. Weight: 1 + *

Cancel an active UM algo order Weight(IP): 1 Security Type: TRADE Notes: - Either + * `algoId` or `clientAlgoId` must be sent. * * @throws ApiException if the Api call fails */ @Test - public void cancelUmConditionalOrderTest() throws ApiException, CryptoException { - String symbol = ""; + public void cancelUmAlgoOrderTest() throws ApiException, CryptoException, IOException { + Long algoId = 2146760L; + String clientAlgoId = "6B2I9XVcJpCjqPAJ4YoFX7"; + Long recvWindow = 5000L; + ApiResponse response = + api.cancelUmAlgoOrder(algoId, clientAlgoId, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("algoId=2146760&clientAlgoId=6B2I9XVcJpCjqPAJ4YoFX7&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "87096ab0f7ef63c753df68f8402162e99b54653f0b45ee1736f9b9f8b1ff7160", actualRequest.url().queryParameter("signature")); + assertEquals("/papi/v1/um/algo/order", actualRequest.url().encodedPath()); + } + + /** + * Cancel UM Conditional Order (TRADE) + * + *

Cancel UM Conditional Order Weight(IP): 1 Security Type: TRADE Notes: - Either + * `strategyId` or `newClientStrategyId` must be sent. + * + * @throws ApiException if the Api call fails + */ + @Test + public void cancelUmConditionalOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long strategyId = 1L; String newClientStrategyId = "1"; Long recvWindow = 5000L; @@ -477,26 +551,24 @@ public void cancelUmConditionalOrderTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&strategyId=1&newClientStrategyId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&strategyId=1&newClientStrategyId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "a122adefbf5aadf438d7dc29aaf824c9960c880ff367781502c41a638ee6637f", + "76ca77501cf0f97cea375b78a61226c092666a1c24806a1fabaa4fba6d9db3f9", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/conditional/order", actualRequest.url().encodedPath()); } /** - * Cancel UM Order(TRADE) + * Cancel UM Order (TRADE) * - *

Cancel an active UM LIMIT order * Either `orderId` or - * `origClientOrderId` must be sent. Weight: 1 + *

Cancel an active UM LIMIT order Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent. * * @throws ApiException if the Api call fails */ @Test - public void cancelUmOrderTest() throws ApiException, CryptoException { - String symbol = ""; + public void cancelUmOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; @@ -513,36 +585,35 @@ public void cancelUmOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "symbol=&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "cbec82483be2ad044b893ffb2e6bc0d55370e378eaea0b4b61d95893bd9cc458", - actualRequest.url().queryParameter("signature")); + assertEquals("symbol=BTCUSDT&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("a2c9b60f9540c076730139d7d5fdfa16602fe0f084a54f48c1385a51bba83bfa", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/order", actualRequest.url().encodedPath()); } /** - * CM Account Trade List(USER_DATA) - * - *

Get trades for a specific account and CM symbol. * Either `symbol` or - * `pair` must be sent * `symbol` and `pair` cannot be sent - * together * `pair` and `fromId` cannot be sent together * - * `OrderId` can only be sent together with symbol * If a `pair` is sent, - * tickers for all symbols of the `pair` will be returned * The parameter - * `fromId` cannot be sent with `startTime` or `endTime` Weight: - * 20 with symbol, 40 with pair + * CM Account Trade List (USER_DATA) + * + *

Get trades for a specific account and CM symbol. Weight: - 20 with `symbol` - 40 + * with `pair` Security Type: USER_DATA Notes: - Either `symbol` or + * `pair` must be sent - `symbol` and `pair` cannot be sent + * together - `pair` and `fromId` cannot be sent together - + * `OrderId` can only be sent together with symbol - If a `pair` is sent, + * tickers for all symbols of the `pair` will be returned - The parameter + * `fromId` cannot be sent with `startTime` or `endTime` - If + * `startTime` and `endTime` are both not sent, then the last '24 + * hours' data will be returned. - The time between `startTime` and + * `endTime` cannot be longer than 24 hours. * * @throws ApiException if the Api call fails */ @Test - public void cmAccountTradeListTest() throws ApiException, CryptoException { - String symbol = ""; - String pair = ""; + public void cmAccountTradeListTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200626"; + String pair = "BTCUSD"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long fromId = 1L; - Long limit = 100L; + Long limit = 50L; Long recvWindow = 5000L; ApiResponse response = api.cmAccountTradeList(symbol, pair, startTime, endTime, fromId, limit, recvWindow); @@ -557,17 +628,14 @@ public void cmAccountTradeListTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSD_200626&pair=BTCUSD&startTime=1623319461670&endTime=1641782889000&fromId=1&limit=50&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&pair=&startTime=1623319461670&endTime=1641782889000&fromId=1&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "bbf5f4652084c7930acb2dd52e609ec86e6b1af1db7971e283c9cff769bf35a1", - actualRequest.url().queryParameter("signature")); + "cd1faf00d7f860e2e56bc827a61d90f3dc15e031a04c9a90900e73efe749af76", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/userTrades", actualRequest.url().encodedPath()); } /** - * CM Position ADL Quantile Estimation(USER_DATA) + * CM Position ADL Quantile Estimation (USER_DATA) * *

Query CM Position ADL Quantile Estimation * Values update every 30s. * Values 0, 1, 2, 3, * 4 shows the queue position and possibility of ADL from low to high. * For positions of the @@ -577,13 +645,14 @@ public void cmAccountTradeListTest() throws ApiException, CryptoException { * in Hedge Mode: * \"HEDGE\" as a sign will be returned instead of * \"BOTH\"; * A same value caculated on unrealized pnls on long and short sides' * positions will be shown for \"LONG\" and \"SHORT\" when there are - * positions in both of long and short sides. Weight: 5 + * positions in both of long and short sides. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void cmPositionAdlQuantileEstimationTest() throws ApiException, CryptoException { - String symbol = ""; + public void cmPositionAdlQuantileEstimationTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_201225"; Long recvWindow = 5000L; ApiResponse response = api.cmPositionAdlQuantileEstimation(symbol, recvWindow); @@ -598,23 +667,55 @@ public void cmPositionAdlQuantileEstimationTest() throws ApiException, CryptoExc Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSD_201225&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "c389517eb0b87e6fe5f91b4546ca4a3d3cd4332de0045a76aefbdc86b728e00a", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/adlQuantile", actualRequest.url().encodedPath()); } + /** + * Futures TradFi Perps Contract (USER_DATA) + * + *

Sign TradFi-Perps agreement contract Weight(IP): 5 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void futuresTradfiPerpsContractTest() throws ApiException, CryptoException, IOException { + FuturesTradfiPerpsContractRequest futuresTradfiPerpsContractRequest = + new FuturesTradfiPerpsContractRequest(); + + ApiResponse response = + api.futuresTradfiPerpsContract(futuresTradfiPerpsContractRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", + actualRequest.url().queryParameter("signature")); + assertEquals("/papi/v1/um/stock/contract", actualRequest.url().encodedPath()); + } + /** * Get UM Futures BNB Burn Status (USER_DATA) * *

Get user's BNB Fee Discount for UM Futures (Fee Discount On or Fee Discount Off ) - * Weight: 30 + * Weight(IP): 30 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getUmFuturesBnbBurnStatusTest() throws ApiException, CryptoException { + public void getUmFuturesBnbBurnStatusTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getUmFuturesBnbBurnStatus(recvWindow); @@ -637,18 +738,17 @@ public void getUmFuturesBnbBurnStatusTest() throws ApiException, CryptoException } /** - * Margin Account Borrow(MARGIN) + * Margin Account Borrow (MARGIN) * - *

Apply for a margin loan. Weight: 100 + *

Apply for a margin loan. Weight(IP): 100 Security Type: MARGIN * * @throws ApiException if the Api call fails */ @Test - public void marginAccountBorrowTest() throws ApiException, CryptoException { + public void marginAccountBorrowTest() throws ApiException, CryptoException, IOException { MarginAccountBorrowRequest marginAccountBorrowRequest = new MarginAccountBorrowRequest(); - - marginAccountBorrowRequest.asset(""); - marginAccountBorrowRequest.amount(1d); + marginAccountBorrowRequest.asset("USDT"); + marginAccountBorrowRequest.amount(1.0d); ApiResponse response = api.marginAccountBorrow(marginAccountBorrowRequest); @@ -663,33 +763,31 @@ public void marginAccountBorrowTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000amount=1&asset=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000amount=1&asset=USDT", signInputCaptor.getValue()); assertEquals( - "bdf4ac8bca8190f70887c6f51a3651b89a8e693487de037a66a7d489ebcde7a4", - actualRequest.url().queryParameter("signature")); + "5a68a35d483ec36a064e5f87613afb24d2c7b4e4b9849e4bd0fd85f6dd3b056a", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/marginLoan", actualRequest.url().encodedPath()); } /** - * Margin Account New OCO(TRADE) + * Margin Account New OCO (TRADE) * - *

Send in a new OCO for a margin account * Price Restrictions: * `SELL`: Limit - * Price > Last Price > Stop Price * `BUY`: Limit Price < Last Price < - * Stop Price * Quantity Restrictions: * Both legs must have the same quantity * - * `ICEBERG` quantities however do not have to be the same. * Order Rate Limit * - * `OCO` counts as 2 orders against the order rate limit. Weight: 1 + *

Send in a new OCO for a margin account Weight(IP): 1 Security Type: TRADE Notes: - Other + * Info: - Price Restrictions: - `SELL`: Limit Price > Last Price > Stop Price - + * `BUY`: Limit Price * Quantity Restrictions: - Both legs must have the same quantity + * - `ICEBERG` quantities however do not have to be the same. - Order Rate Limit - + * `OCO` counts as 2 orders against the order rate limit. * * @throws ApiException if the Api call fails */ @Test - public void marginAccountNewOcoTest() throws ApiException, CryptoException { + public void marginAccountNewOcoTest() throws ApiException, CryptoException, IOException { MarginAccountNewOcoRequest marginAccountNewOcoRequest = new MarginAccountNewOcoRequest(); - - marginAccountNewOcoRequest.symbol(""); + marginAccountNewOcoRequest.symbol("LTCBTC"); marginAccountNewOcoRequest.side(Side.BUY); - marginAccountNewOcoRequest.quantity(1d); - marginAccountNewOcoRequest.price(1d); - marginAccountNewOcoRequest.stopPrice(1d); + marginAccountNewOcoRequest.quantity(1.0d); + marginAccountNewOcoRequest.price(1.0d); + marginAccountNewOcoRequest.stopPrice(1.0d); ApiResponse response = api.marginAccountNewOco(marginAccountNewOcoRequest); @@ -704,28 +802,24 @@ public void marginAccountNewOcoTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000symbol=LTCBTC&side=BUY&stopPrice=1&quantity=1&price=1&newOrderRespType=ACK&sideEffectType=NO_SIDE_EFFECT", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000symbol=&side=BUY&stopPrice=1&quantity=1&price=1", - signInputCaptor.getValue()); - assertEquals( - "a44f38881c72baae22ef0ab8d4275a3dad363487848a7ea9ea3c7ba58a6ccdb9", - actualRequest.url().queryParameter("signature")); + "605aa4be5e50a8565466d69a77ddff4f83ca932c5caa3b580c256e9f13f3a21a", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/margin/order/oco", actualRequest.url().encodedPath()); } /** - * Margin Account Repay(MARGIN) + * Margin Account Repay (MARGIN) * - *

Repay for a margin loan. Weight: 100 + *

Repay for a margin loan. Weight(IP): 100 Security Type: MARGIN * * @throws ApiException if the Api call fails */ @Test - public void marginAccountRepayTest() throws ApiException, CryptoException { + public void marginAccountRepayTest() throws ApiException, CryptoException, IOException { MarginAccountRepayRequest marginAccountRepayRequest = new MarginAccountRepayRequest(); - - marginAccountRepayRequest.asset(""); - marginAccountRepayRequest.amount(1d); + marginAccountRepayRequest.asset("USDT"); + marginAccountRepayRequest.amount(1.0d); ApiResponse response = api.marginAccountRepay(marginAccountRepayRequest); @@ -740,31 +834,30 @@ public void marginAccountRepayTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000amount=1&asset=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000amount=1&asset=USDT", signInputCaptor.getValue()); assertEquals( - "bdf4ac8bca8190f70887c6f51a3651b89a8e693487de037a66a7d489ebcde7a4", - actualRequest.url().queryParameter("signature")); + "5a68a35d483ec36a064e5f87613afb24d2c7b4e4b9849e4bd0fd85f6dd3b056a", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/repayLoan", actualRequest.url().encodedPath()); } /** - * Margin Account Repay Debt(TRADE) + * Margin Account Repay Debt (TRADE) * - *

Repay debt for a margin loan. * The repay asset amount cannot exceed 50000 USD equivalent - * value for a single request. * If `amount` is not sent, all the asset loan will be - * repaid if having enough specific repay assets. * If `amount` is sent, only the - * certain amount of the asset loan will be repaid if having enough specific repay assets. * The - * system will use the same asset to repay the loan first (if have) no matter whether put the - * asset in `specifyRepayAssets` Weight: 3000 + *

Repay debt for a margin loan. Weight(IP): 3000 Security Type: TRADE Notes: - The repay + * asset amount cannot exceed 50000 USD equivalent value for a single request. - If + * `amount` is not sent, all the asset loan will be repaid if having enough specific + * repay assets. - If `amount` is sent, only the certain amount of the asset loan will + * be repaid if having enough specific repay assets. - The system will use the same asset to + * repay the loan first (if have) no matter whether put the asset in + * `specifyRepayAssets` * * @throws ApiException if the Api call fails */ @Test - public void marginAccountRepayDebtTest() throws ApiException, CryptoException { + public void marginAccountRepayDebtTest() throws ApiException, CryptoException, IOException { MarginAccountRepayDebtRequest marginAccountRepayDebtRequest = new MarginAccountRepayDebtRequest(); - - marginAccountRepayDebtRequest.asset(""); + marginAccountRepayDebtRequest.asset("USDT"); ApiResponse response = api.marginAccountRepayDebt(marginAccountRepayDebtRequest); @@ -779,9 +872,9 @@ public void marginAccountRepayDebtTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000asset=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000asset=USDT", signInputCaptor.getValue()); assertEquals( - "733c2733b75fbea096af9abd7a6e22ac4cce318248e66e514087362c82db2bf1", + "e1f5de10e9064f8425b012d548b9d16e21b37b194141422bc9ae05b8ed5f1c68", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/margin/repay-debt", actualRequest.url().encodedPath()); } @@ -789,18 +882,21 @@ public void marginAccountRepayDebtTest() throws ApiException, CryptoException { /** * Margin Account Trade List (USER_DATA) * - *

Margin Account Trade List Weight: 5 + *

Margin Account Trade List Weight(IP): 5 Security Type: USER_DATA Notes: - **Note:** * If + * `fromId` is set, returns orders with id >= `fromId`; otherwise + * returns recent order history. - The interval between `startTime` and + * `endTime` must be less than 24 hours. * * @throws ApiException if the Api call fails */ @Test - public void marginAccountTradeListTest() throws ApiException, CryptoException { - String symbol = ""; + public void marginAccountTradeListTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long fromId = 1L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = api.marginAccountTradeList( @@ -816,39 +912,36 @@ public void marginAccountTradeListTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&orderId=1&startTime=1623319461670&endTime=1641782889000&fromId=1&limit=500&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&orderId=1&startTime=1623319461670&endTime=1641782889000&fromId=1&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "10058794572cc782968aa3d3e6b73a369146898e471235e8712344dea70cb4d5", + "f1f719c1b9f7032ecd5fb8c06caa47e56a02de088e8be3588872a85a0f358426", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/margin/myTrades", actualRequest.url().encodedPath()); } /** - * Modify CM Order(TRADE) + * Modify CM Order (TRADE) * *

Order modify function, currently only LIMIT order modification is supported, modified - * orders will be reordered in the match queue * Either `orderId` or - * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. * Both `quantity` and `price` must be sent * When the new - * `quantity` or `price` doesn'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 `quantity` <= `executedQty` * - * When the order is `GTX` and the new price will cause it to be executed immediately - * Weight: 1 + * orders will be reordered in the match queue Weight(IP): 1 Security Type: TRADE Notes: - + * Either `orderId` or `origClientOrderId` must be sent, and the + * `orderId` will prevail if both are sent. - Both `quantity` and + * `price` must be sent - When the new `quantity` or `price` + * doesn'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 + * `quantity` * When the order is `GTX` and the new price will cause it to + * be executed immediately * * @throws ApiException if the Api call fails */ @Test - public void modifyCmOrderTest() throws ApiException, CryptoException { + public void modifyCmOrderTest() throws ApiException, CryptoException, IOException { ModifyCmOrderRequest modifyCmOrderRequest = new ModifyCmOrderRequest(); - - modifyCmOrderRequest.symbol(""); + modifyCmOrderRequest.symbol("BTCUSD_PERP"); modifyCmOrderRequest.side(Side.BUY); - modifyCmOrderRequest.quantity(1d); - modifyCmOrderRequest.price(1d); + modifyCmOrderRequest.quantity(1.0d); + modifyCmOrderRequest.price(1.0d); ApiResponse response = api.modifyCmOrder(modifyCmOrderRequest); @@ -862,37 +955,32 @@ public void modifyCmOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "timestamp=1736393892000symbol=&side=BUY&quantity=1&price=1", - signInputCaptor.getValue()); - assertEquals( - "5d55a15240b44cfacea70546cc8dc2e0e1394ec0f194ec1bf1e67bfac92cd911", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000symbol=BTCUSD_PERP&side=BUY&quantity=1&price=1", signInputCaptor.getValue()); + assertEquals("2212ffe2468f7c806c34ca727310144c4e02d9e2feae1c73fcf66c494e1aa046", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/order", actualRequest.url().encodedPath()); } /** - * Modify UM Order(TRADE) + * Modify UM Order (TRADE) * *

Order modify function, currently only LIMIT order modification is supported, modified - * orders will be reordered in the match queue * Either orderId or origClientOrderId must be - * sent, and the orderId will prevail if both are sent. * Both quantity and price must be sent * - * When the new quantity or price doesn'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 quantity <= executedQty * When the order is GTX and the new - * price will cause it to be executed immediately Weight: 1 + * orders will be reordered in the match queue Weight(IP): 1 Security Type: TRADE Notes: - + * Either orderId or origClientOrderId must be sent, and the orderId will prevail if both are + * sent. - Both quantity and price must be sent - When the new quantity or price doesn'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 quantity * When the + * order is GTX and the new price will cause it to be executed immediately * * @throws ApiException if the Api call fails */ @Test - public void modifyUmOrderTest() throws ApiException, CryptoException { + public void modifyUmOrderTest() throws ApiException, CryptoException, IOException { ModifyUmOrderRequest modifyUmOrderRequest = new ModifyUmOrderRequest(); - - modifyUmOrderRequest.symbol(""); + modifyUmOrderRequest.symbol("BTCUSDT"); modifyUmOrderRequest.side(Side.BUY); - modifyUmOrderRequest.quantity(1d); - modifyUmOrderRequest.price(1d); + modifyUmOrderRequest.quantity(1.0d); + modifyUmOrderRequest.price(1.0d); ApiResponse response = api.modifyUmOrder(modifyUmOrderRequest); @@ -906,54 +994,32 @@ public void modifyUmOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "timestamp=1736393892000symbol=&side=BUY&quantity=1&price=1", - signInputCaptor.getValue()); - assertEquals( - "5d55a15240b44cfacea70546cc8dc2e0e1394ec0f194ec1bf1e67bfac92cd911", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&side=BUY&quantity=1&price=1", signInputCaptor.getValue()); + assertEquals("84a8a1ccf36212655c5ade252dd6c8749c957b5cde7e5745f1750c70494c7a24", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/order", actualRequest.url().encodedPath()); } /** - * New CM Conditional Order(TRADE) - * - *

New CM Conditional Order * Order with type `STOP/TAKE_PROFIT`, parameter - * `timeInForce` can be sent ( default `GTC`). * Condition orders will be - * triggered when: * `STOP`, `STOP_MARKET`: * BUY: \"MARK_PRICE\" - * >= `stopPrice` * SELL: \"MARK_PRICE\" <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * \"MARK_PRICE\" <= `stopPrice` * SELL: \"MARK_PRICE\" - * >= `stopPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest mark - * price after order placed `<= `activationPrice`, and the latest mark - * price >`= the lowest mark price * (1 + `callbackRate`) * SELL: the - * highest mark price after order placed >= `activationPrice`, and the latest - * mark price <= the highest mark price * (1 - `callbackRate`) * For - * `TRAILING_STOP_MARKET`, if you got such error code. `{\"code\": - * -2021, \"msg\": \"Order would immediately trigger.\"}` means that - * the parameters you send do not meet the following requirements: * BUY: - * `activationPrice` should be smaller than latest mark price. * SELL: - * `activationPrice` should be larger than latest mark price. * Condition orders will - * be triggered when: * If parameter`priceProtect`is sent as true: * when price - * reaches the `stopPrice` ,the difference rate between \"MARK_PRICE\" and - * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` Weight: 1 + * New CM Conditional Order (TRADE) + * + *

New CM Conditional Order Weight(IP): 1 Security Type: TRADE Notes: - Additional mandatory + * parameters based on type: - Order with type `STOP/TAKE_PROFIT`, parameter + * `timeInForce` can be sent ( default `GTC`). - Condition orders will be + * triggered when: - `STOP`, `STOP_MARKET`: - BUY: \"MARK_PRICE\" + * >= `stopPrice` - SELL: \"MARK_PRICE\" = + * `stopPrice` - `TRAILING_STOP_MARKET`: - BUY: the lowest mark price after + * order placed ``= the lowest mark price - (1 + `callbackRate`) - + * SELL: the highest mark price after order placed >= `activationPrice`, and + * the latest mark price = `stopPrice` - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") = `stopPrice` * * @throws ApiException if the Api call fails */ @Test - public void newCmConditionalOrderTest() throws ApiException, CryptoException { + public void newCmConditionalOrderTest() throws ApiException, CryptoException, IOException { NewCmConditionalOrderRequest newCmConditionalOrderRequest = new NewCmConditionalOrderRequest(); - - newCmConditionalOrderRequest.symbol(""); + newCmConditionalOrderRequest.symbol("BTCUSDT"); newCmConditionalOrderRequest.side(Side.BUY); newCmConditionalOrderRequest.strategyType(StrategyType.STOP); @@ -970,32 +1036,30 @@ public void newCmConditionalOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&side=BUY&reduceOnly=false&priceProtect=false&timeInForce=GTC&workingType=CONTRACT_PRICE&strategyType=STOP", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000symbol=&side=BUY&strategyType=STOP", - signInputCaptor.getValue()); - assertEquals( - "90ee840124872cb94e932dcfe904552453a2318cc73c56bc526955dba5cd9f9b", + "180180b68e7202fc0cf6a1256f1ee4a9e8278e373a8d85f0d2dc3403d003aefc", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/conditional/order", actualRequest.url().encodedPath()); } /** - * New CM Order(TRADE) + * New CM Order (TRADE) * - *

Place new CM order * If `newOrderRespType` is sent as `RESULT` : * - * `MARKET` order: the final FILLED result of the order will be return directly. * - * `LIMIT` order with special `timeInForce`: the final status result of the - * order(FILLED or EXPIRED) will be returned directly. Weight: 1 + *

Place new CM order Weight(IP): 1 Security Type: TRADE Notes: - Additional mandatory + * parameters based on `type`: - If `newOrderRespType` is sent as + * `RESULT` : - `MARKET` order: the final FILLED result of the order will be + * return directly. - `LIMIT` order with special `timeInForce`: the final + * status result of the order(FILLED or EXPIRED) will be returned directly. * * @throws ApiException if the Api call fails */ @Test - public void newCmOrderTest() throws ApiException, CryptoException { + public void newCmOrderTest() throws ApiException, CryptoException, IOException { NewCmOrderRequest newCmOrderRequest = new NewCmOrderRequest(); - - newCmOrderRequest.symbol(""); + newCmOrderRequest.symbol("BTCUSDT"); newCmOrderRequest.side(Side.BUY); - newCmOrderRequest.type(Type.LIMIT); + newCmOrderRequest.type(OrderType.STOP); ApiResponse response = api.newCmOrder(newCmOrderRequest); @@ -1009,28 +1073,24 @@ public void newCmOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "timestamp=1736393892000symbol=&side=BUY&type=LIMIT", signInputCaptor.getValue()); - assertEquals( - "b88c38300689d53932ba198ab2b30c30c872482dcaedbb4bede2f40535ba160a", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&side=BUY&reduceOnly=false&newOrderRespType=ACK&type=STOP&timeInForce=GTC", signInputCaptor.getValue()); + assertEquals("349111c200a057c7e8734f240f6b48cc1faa73d2c3fca461e393aa3a6dba888d", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/order", actualRequest.url().encodedPath()); } /** - * New Margin Order(TRADE) + * New Margin Order (TRADE) * - *

New Margin Order Weight: 1 + *

New Margin Order Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void newMarginOrderTest() throws ApiException, CryptoException { + public void newMarginOrderTest() throws ApiException, CryptoException, IOException { NewMarginOrderRequest newMarginOrderRequest = new NewMarginOrderRequest(); - - newMarginOrderRequest.symbol(""); + newMarginOrderRequest.symbol("BTCUSDT"); newMarginOrderRequest.side(Side.BUY); - newMarginOrderRequest.type(Type.LIMIT); + newMarginOrderRequest.type(OrderType.STOP); ApiResponse response = api.newMarginOrder(newMarginOrderRequest); @@ -1044,57 +1104,82 @@ public void newMarginOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "timestamp=1736393892000symbol=&side=BUY&type=LIMIT", signInputCaptor.getValue()); - assertEquals( - "b88c38300689d53932ba198ab2b30c30c872482dcaedbb4bede2f40535ba160a", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&side=BUY&autoRepayAtCancel=true&newOrderRespType=ACK&sideEffectType=NO_SIDE_EFFECT&selfTradePreventionMode=NONE&type=STOP&timeInForce=GTC", signInputCaptor.getValue()); + assertEquals("8ef7bcc01509ad8d0193d732efba673ca22429f4f49bb9070e5c9e24f91f2e86", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/margin/order", actualRequest.url().encodedPath()); } + /** + * New UM Algo Order (TRADE) + * + *

Place new UM conditional order Weight(IP): 1 Security Type: TRADE Notes: - Algo order with + * type `STOP`, parameter `timeInForce` can be sent (default + * `GTC`). - Algo order with type `TAKE_PROFIT`, parameter + * `timeInForce` can be sent (default `GTC`). - Condition orders will be + * triggered when price reaches the `triggerPrice`. - `STOP`, + * `STOP_MARKET`: BUY: latest price >= `triggerPrice`; SELL: latest + * price <= `triggerPrice`. - `TAKE_PROFIT`, + * `TAKE_PROFIT_MARKET`: BUY: latest price <= `triggerPrice`; SELL: + * latest price >= `triggerPrice`. - `TRAILING_STOP_MARKET`: BUY: + * lowest price after order placed <= `activatePrice`, and latest price + * >= lowest price * (1 + `callbackRate`); SELL: highest price after order + * placed >= `activatePrice`, and latest price <= highest price * (1 - + * `callbackRate`). - `selfTradePreventionMode` is only effective when + * `timeInForce` set to `IOC` or `GTC` or `GTD`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void newUmAlgoOrderTest() throws ApiException, CryptoException, IOException { + NewUmAlgoOrderRequest newUmAlgoOrderRequest = new NewUmAlgoOrderRequest(); + newUmAlgoOrderRequest.algoType(AlgoType.CONDITIONAL); + newUmAlgoOrderRequest.symbol("BNBUSDT"); + newUmAlgoOrderRequest.side(Side.BUY); + newUmAlgoOrderRequest.type(OrderType.STOP); + newUmAlgoOrderRequest.quantity(0.01d); + + ApiResponse response = api.newUmAlgoOrder(newUmAlgoOrderRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000symbol=BNBUSDT&side=BUY&quantity=0.01&reduceOnly=false&algoType=CONDITIONAL&newOrderRespType=ACK&selfTradePreventionMode=NONE&type=STOP&priceProtect=false&timeInForce=GTC&workingType=CONTRACT_PRICE", signInputCaptor.getValue()); + assertEquals("0cf370bfde6838e9e90b5d61a2b1ab130ceae2f994f2b819cd73d396253a9079", actualRequest.url().queryParameter("signature")); + assertEquals("/papi/v1/um/algo/order", actualRequest.url().encodedPath()); + } + /** * New UM Conditional Order (TRADE) * - *

Place new UM conditional order * Order with type `STOP/TAKE_PROFIT`, parameter - * `timeInForce` can be sent ( default `GTC`). * Condition orders will be - * triggered when: * `STOP`, `STOP_MARKET`: * BUY: \"MARK_PRICE\" - * >= `stopPrice` * SELL: \"MARK_PRICE\" <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * \"MARK_PRICE\" <= `stopPrice` * SELL: \"MARK_PRICE\" - * >= `stopPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest mark - * price after order placed `<= `activationPrice`, and the latest mark - * price >`= the lowest mark price * (1 + `callbackRate`) * SELL: the - * highest mark price after order placed >= `activationPrice`, and the latest - * mark price <= the highest mark price * (1 - `callbackRate`) * For - * `TRAILING_STOP_MARKET`, if you got such error code. `{\"code\": - * -2021, \"msg\": \"Order would immediately trigger.\"}` means that - * the parameters you send do not meet the following requirements: * BUY: - * `activationPrice` should be smaller than latest mark price. * SELL: - * `activationPrice` should be larger than latest mark price. * Condition orders will - * be triggered when: * If parameter`priceProtect`is sent as true: * when price - * reaches the `stopPrice` ,the difference rate between \"MARK_PRICE\" and - * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` * + *

Place new UM conditional order Weight(IP): 1 Security Type: TRADE Notes: - Additional + * mandatory parameters based on type: - Order with type `STOP/TAKE_PROFIT`, parameter + * `timeInForce` can be sent ( default `GTC`). - Condition orders will be + * triggered when: - `STOP`, `STOP_MARKET`: - BUY: \"MARK_PRICE\" + * >= `stopPrice` - SELL: \"MARK_PRICE\" = + * `stopPrice` - `TRAILING_STOP_MARKET`: - BUY: the lowest mark price after + * order placed ``= the lowest mark price - (1 + `callbackRate`) - + * SELL: the highest mark price after order placed >= `activationPrice`, and + * the latest mark price = `stopPrice` - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") = `stopPrice` - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. * In extreme market conditions, + * `IOC` or `GTC` or `GTD`. - In extreme market conditions, * timeInForce `GTD` order auto cancel time might be delayed comparing to - * `goodTillDate` Weight: 1 + * `goodTillDate` * * @throws ApiException if the Api call fails */ @Test - public void newUmConditionalOrderTest() throws ApiException, CryptoException { + public void newUmConditionalOrderTest() throws ApiException, CryptoException, IOException { NewUmConditionalOrderRequest newUmConditionalOrderRequest = new NewUmConditionalOrderRequest(); - - newUmConditionalOrderRequest.symbol(""); + newUmConditionalOrderRequest.symbol("BTCUSDT"); newUmConditionalOrderRequest.side(Side.BUY); newUmConditionalOrderRequest.strategyType(StrategyType.STOP); @@ -1111,11 +1196,9 @@ public void newUmConditionalOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&side=BUY&reduceOnly=false&selfTradePreventionMode=NONE&priceProtect=false&timeInForce=GTC&workingType=CONTRACT_PRICE&strategyType=STOP", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000symbol=&side=BUY&strategyType=STOP", - signInputCaptor.getValue()); - assertEquals( - "90ee840124872cb94e932dcfe904552453a2318cc73c56bc526955dba5cd9f9b", + "3851ed73fd4682d4d5b221c2ae1cf966dab801942ff9da45e7190408caaa9034", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/conditional/order", actualRequest.url().encodedPath()); } @@ -1123,23 +1206,23 @@ public void newUmConditionalOrderTest() throws ApiException, CryptoException { /** * New UM Order (TRADE) * - *

Place new UM order * If `newOrderRespType` is sent as `RESULT` : * - * `MARKET` order: the final FILLED result of the order will be return directly. * + *

Place new UM order Weight(IP): 1 Security Type: TRADE Notes: - Additional mandatory + * parameters based on type: - If `newOrderRespType` is sent as `RESULT` : - + * `MARKET` order: the final FILLED result of the order will be return directly. - * `LIMIT` order with special `timeInForce`: the final status result of the - * order(FILLED or EXPIRED) will be returned directly. * `selfTradePreventionMode` is + * order(FILLED or EXPIRED) will be returned directly. - `selfTradePreventionMode` is * only effective when `timeInForce` set to `IOC` or `GTC` or - * `GTD`. * In extreme market conditions, timeInForce `GTD` order auto - * cancel time might be delayed comparing to `goodTillDate` Weight: 1 + * `GTD`. - In extreme market conditions, timeInForce `GTD` order auto + * cancel time might be delayed comparing to `goodTillDate` * * @throws ApiException if the Api call fails */ @Test - public void newUmOrderTest() throws ApiException, CryptoException { + public void newUmOrderTest() throws ApiException, CryptoException, IOException { NewUmOrderRequest newUmOrderRequest = new NewUmOrderRequest(); - - newUmOrderRequest.symbol(""); + newUmOrderRequest.symbol("BTCUSDT"); newUmOrderRequest.side(Side.BUY); - newUmOrderRequest.type(Type.LIMIT); + newUmOrderRequest.type(OrderType.STOP); ApiResponse response = api.newUmOrder(newUmOrderRequest); @@ -1153,32 +1236,30 @@ public void newUmOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "timestamp=1736393892000symbol=&side=BUY&type=LIMIT", signInputCaptor.getValue()); - assertEquals( - "b88c38300689d53932ba198ab2b30c30c872482dcaedbb4bede2f40535ba160a", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&side=BUY&reduceOnly=false&newOrderRespType=ACK&selfTradePreventionMode=NONE&type=STOP&timeInForce=GTC", signInputCaptor.getValue()); + assertEquals("744d98670b1e2a6cc2f5e6eb04126e462f091f15967c5ecf818696278f40b738", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/order", actualRequest.url().encodedPath()); } /** - * Query All CM Conditional Orders(USER_DATA) + * Query All CM Conditional Orders (USER_DATA) * - *

Query All CM Conditional Orders * These orders will not be found: * order strategyStatus - * is `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** - * * created time + 7 days < current time * The query time period must be less than 7 days( - * default as the recent 7 days). Weight: 1 for a single symbol; 40 when the symbol parameter is - * omitted + *

Query All CM Conditional Orders Weight: - 1 for a single `symbol` - 40 when + * `symbol` is omitted Security Type: USER_DATA Notes: - These orders will not be + * found: - order strategyStatus is `CANCELED` or `EXPIRED`, **AND** - order + * has NO filled trade, **AND** - created time + 7 days * The query time period must be less + * than 7 days( default as the recent 7 days). * * @throws ApiException if the Api call fails */ @Test - public void queryAllCmConditionalOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryAllCmConditionalOrdersTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long strategyId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = api.queryAllCmConditionalOrders( @@ -1194,11 +1275,9 @@ public void queryAllCmConditionalOrdersTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&strategyId=1&startTime=1623319461670&endTime=1641782889000&limit=500&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&strategyId=1&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "8ff012ad54bf04a6af72d3d876922b09f79bdadf4b5517a042ad7370d9151113", + "973a880e85b98ec033870362ec94607a7a13e461df6b44f39071d92074c6feb5", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/conditional/allOrders", actualRequest.url().encodedPath()); } @@ -1206,22 +1285,23 @@ public void queryAllCmConditionalOrdersTest() throws ApiException, CryptoExcepti /** * Query All CM Orders (USER_DATA) * - *

Get all account CM orders; active, canceled, or filled. * Either `symbol` or - * `pair` must be sent. * If `orderId` is set, it will get orders >= - * that orderId. Otherwise most recent orders are returned. * These orders will not be found: * - * order status is `CANCELED` or `EXPIRED`, **AND** * order has NO filled - * trade, **AND** * created time + 3 days < current time Weight: 20 with symbol, 40 with pair + *

Get all account CM orders; active, canceled, or filled. Weight: - 20 with + * `symbol` - 40 with `pair` Security Type: USER_DATA Notes: - Either + * `symbol` or `pair` must be sent. - If `orderId` is set, it will + * get orders >= that orderId. Otherwise most recent orders are returned. - These orders + * will not be found: - order status is `CANCELED` or `EXPIRED`, **AND** - + * order has NO filled trade, **AND** - created time + 3 days < current time * * @throws ApiException if the Api call fails */ @Test - public void queryAllCmOrdersTest() throws ApiException, CryptoException { - String symbol = ""; - String pair = ""; + public void queryAllCmOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200925"; + String pair = "BTCUSD"; Long orderId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 10L; Long recvWindow = 5000L; ApiResponse response = api.queryAllCmOrders(symbol, pair, orderId, startTime, endTime, limit, recvWindow); @@ -1236,12 +1316,9 @@ public void queryAllCmOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSD_200925&pair=BTCUSD&orderId=1&startTime=1623319461670&endTime=1641782889000&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&pair=&orderId=1&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "9445a77882a6628612b980279cee60afc4cf7c4a1263b48ec49bf8021cdf5300", - actualRequest.url().queryParameter("signature")); + "63fc20908d4de85604d75e06f82dca1184ad8a0efbd7623af58d183891664a7a", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/allOrders", actualRequest.url().encodedPath()); } @@ -1249,14 +1326,16 @@ public void queryAllCmOrdersTest() throws ApiException, CryptoException { * Query All Current CM Open Conditional Orders (USER_DATA) * *

Get all open conditional orders on a symbol. **Careful** when accessing this with no - * symbol. * If the symbol is not sent, orders for all symbols will be returned in an array. - * Weight: 1 for a single symbol; 40 when the symbol parameter is omitted + * symbol. Weight: - 1 for a single `symbol` - 40 when `symbol` is omitted + * Security Type: USER_DATA Notes: - If the symbol is not sent, orders for all symbols will be + * returned in an array. * * @throws ApiException if the Api call fails */ @Test - public void queryAllCurrentCmOpenConditionalOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryAllCurrentCmOpenConditionalOrdersTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD"; Long recvWindow = 5000L; ApiResponse response = api.queryAllCurrentCmOpenConditionalOrders(symbol, recvWindow); @@ -1271,26 +1350,30 @@ public void queryAllCurrentCmOpenConditionalOrdersTest() throws ApiException, Cr Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "symbol=BTCUSD&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); + assertEquals( + "dd1b9bb5f63f8c46c80c9a219ff36a648742af87986848aabf2d0178f164144b", actualRequest.url().queryParameter("signature")); - assertEquals("/papi/v1/cm/conditional/openOrders", actualRequest.url().encodedPath()); + assertEquals( + "/papi/v1/cm/conditional/openOrders", actualRequest.url().encodedPath()); } /** - * Query All Current CM Open Orders(USER_DATA) + * Query All Current CM Open Orders (USER_DATA) * *

Get all open orders on a symbol. * If the symbol is not sent, orders for all symbols will - * be returned in an array. Weight: 1 for a single symbol; 40 when the symbol parameter is - * omitted Careful when accessing this with no symbol. + * be returned in an array. Weight: - 1 for a single `symbol` - 40 when + * `symbol` is omitted Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryAllCurrentCmOpenOrdersTest() throws ApiException, CryptoException { - String symbol = ""; - String pair = ""; + public void queryAllCurrentCmOpenOrdersTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200925"; + String pair = "BTCUSD"; Long recvWindow = 5000L; ApiResponse response = api.queryAllCurrentCmOpenOrders(symbol, pair, recvWindow); @@ -1305,27 +1388,62 @@ public void queryAllCurrentCmOpenOrdersTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSD_200925&pair=BTCUSD&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&pair=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "11b129369c0f8682cf70f667a8b90c4c55856d335dceef536e582ac7a1be7481", + "6fb7069cfc515e5183c551d7a0461b7c5a732eba1ede75197f4867d26e51f03f", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/openOrders", actualRequest.url().encodedPath()); } /** - * Query All Current UM Open Conditional Orders(USER_DATA) + * Query All Current UM Open Algo Orders (USER_DATA) + * + *

Get all UM open algo orders on a symbol. If the symbol is not sent, orders for all symbols + * will be returned. Weight(IP): 1 Security Type: USER_DATA Notes: - Weight: 1 for a single + * symbol; 40 when the symbol parameter is omitted. + * + * @throws ApiException if the Api call fails + */ + @Test + public void queryAllCurrentUmOpenAlgoOrdersTest() + throws ApiException, CryptoException, IOException { + String algoType = "CONDITIONAL"; + String symbol = "BNBUSDT"; + Long algoId = 2146760L; + Long recvWindow = 5000L; + ApiResponse response = + api.queryAllCurrentUmOpenAlgoOrders(algoType, symbol, algoId, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("algoType=CONDITIONAL&symbol=BNBUSDT&algoId=2146760&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "43837891144e1c254b4c448168a0e1cef72ebec7406196ec60e823535ad60464", + actualRequest.url().queryParameter("signature")); + assertEquals("/papi/v1/um/algo/openAlgoOrders", actualRequest.url().encodedPath()); + } + + /** + * Query All Current UM Open Conditional Orders (USER_DATA) * - *

Get all open conditional orders on a symbol. * If the symbol is not sent, orders for all - * symbols will be returned in an array. Weight: 1 for a single symbol; 40 when the symbol - * parameter is omitted Careful when accessing this with no symbol. + *

Get all open conditional orders on a symbol. Weight: - 1 for a single `symbol` - + * 40 when `symbol` is omitted Security Type: USER_DATA Notes: - If `symbol` + * is not provided, conditional open orders for all symbols are returned. * * @throws ApiException if the Api call fails */ @Test - public void queryAllCurrentUmOpenConditionalOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryAllCurrentUmOpenConditionalOrdersTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.queryAllCurrentUmOpenConditionalOrders(symbol, recvWindow); @@ -1340,25 +1458,29 @@ public void queryAllCurrentUmOpenConditionalOrdersTest() throws ApiException, Cr Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); + assertEquals( + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); - assertEquals("/papi/v1/um/conditional/openOrders", actualRequest.url().encodedPath()); + assertEquals( + "/papi/v1/um/conditional/openOrders", actualRequest.url().encodedPath()); } /** - * Query All Current UM Open Orders(USER_DATA) + * Query All Current UM Open Orders (USER_DATA) * - *

Get all open orders on a symbol. * If the symbol is not sent, orders for all symbols will - * be returned in an array. Weight: 1 for a single symbol; 40 when the symbol parameter is - * omitted + *

Get all open orders on a symbol. Weight: - 1 for a single `symbol` - 40 when + * `symbol` is omitted Security Type: USER_DATA Notes: - If the symbol is not sent, + * orders for all symbols will be returned in an array. * * @throws ApiException if the Api call fails */ @Test - public void queryAllCurrentUmOpenOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryAllCurrentUmOpenOrdersTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.queryAllCurrentUmOpenOrders(symbol, recvWindow); @@ -1373,9 +1495,9 @@ public void queryAllCurrentUmOpenOrdersTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/openOrders", actualRequest.url().encodedPath()); } @@ -1383,17 +1505,21 @@ public void queryAllCurrentUmOpenOrdersTest() throws ApiException, CryptoExcepti /** * Query All Margin Account Orders (USER_DATA) * - *

Query All Margin Account Orders Weight: 100 + *

Query All Margin Account Orders Weight(IP): 100 Security Type: USER_DATA Notes: - If + * `orderId` is set, returns orders with id >= `orderId`; otherwise + * returns recent order history. - For some historical orders, `cummulativeQuoteQty < + * 0` means the data is unavailable at this time. * * @throws ApiException if the Api call fails */ @Test - public void queryAllMarginAccountOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryAllMarginAccountOrdersTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = api.queryAllMarginAccountOrders( @@ -1409,33 +1535,32 @@ public void queryAllMarginAccountOrdersTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&orderId=1&startTime=1623319461670&endTime=1641782889000&limit=500&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&orderId=1&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "dc0808314025fc813dcde0328cd6754c982d28888760fc74b17e072087eb4895", + "84ad92e45b09f2d031ab49830acf8f05abccb73a6168944210a78c5aacb0b499", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/margin/allOrders", actualRequest.url().encodedPath()); } /** - * Query All UM Conditional Orders(USER_DATA) + * Query All UM Conditional Orders (USER_DATA) * - *

Query All UM Conditional Orders * These orders will not be found: * order strategyStatus - * is `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** - * * created time + 7 days < current time * The query time period must be less than 7 days( - * default as the recent 7 days). Weight: 1 for a single symbol; 40 when the symbol parameter is - * omitted + *

Query All UM Conditional Orders Weight: - 1 for a single `symbol` - 40 when + * `symbol` is omitted Security Type: USER_DATA Notes: - These orders will not be + * found: - order strategyStatus is `CANCELED` or `EXPIRED`, **AND** - order + * has NO filled trade, **AND** - created time + 7 days * The query time period must be less + * than 7 days( default as the recent 7 days). * * @throws ApiException if the Api call fails */ @Test - public void queryAllUmConditionalOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryAllUmConditionalOrdersTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long strategyId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = api.queryAllUmConditionalOrders( @@ -1451,33 +1576,30 @@ public void queryAllUmConditionalOrdersTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&strategyId=1&startTime=1623319461670&endTime=1641782889000&limit=500&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&strategyId=1&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "8ff012ad54bf04a6af72d3d876922b09f79bdadf4b5517a042ad7370d9151113", + "973a880e85b98ec033870362ec94607a7a13e461df6b44f39071d92074c6feb5", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/conditional/allOrders", actualRequest.url().encodedPath()); } /** - * Query All UM Orders(USER_DATA) + * Query All UM Orders (USER_DATA) * - *

Get all account UM orders; active, canceled, or filled. * These orders will not be found: - * * order status is `CANCELED` or `EXPIRED`, **AND** * order has NO filled - * trade, **AND** * created time + 3 days < current time * If `orderId` is set, it - * will get orders >= that orderId. Otherwise most recent orders are returned. * The - * query time period must be less then 7 days( default as the recent 7 days). Weight: 5 + *

Get all account UM orders; active, canceled, or filled. Weight(IP): 5 Security Type: + * USER_DATA Notes: - If `orderId` is set, it will get orders >= that orderId. + * Otherwise most recent orders are returned. - The query time period must be less then 7 days( + * default as the recent 7 days). * * @throws ApiException if the Api call fails */ @Test - public void queryAllUmOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryAllUmOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = api.queryAllUmOrders(symbol, orderId, startTime, endTime, limit, recvWindow); @@ -1492,29 +1614,27 @@ public void queryAllUmOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&orderId=1&startTime=1623319461670&endTime=1641782889000&limit=500&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&orderId=1&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "dc0808314025fc813dcde0328cd6754c982d28888760fc74b17e072087eb4895", - actualRequest.url().queryParameter("signature")); + "84ad92e45b09f2d031ab49830acf8f05abccb73a6168944210a78c5aacb0b499", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/allOrders", actualRequest.url().encodedPath()); } /** - * Query CM Conditional Order History(USER_DATA) + * Query CM Conditional Order History (USER_DATA) * - *

Query CM Conditional Order History * Either `strategyId` or - * `newClientStrategyId` must be sent. * `NEW` orders will not be found. * - * These orders will not be found: * order status is `CANCELED` or - * `EXPIRED`, **AND** * order has NO filled trade, **AND** * created time + 7 days - * < current time Weight: 1 + *

Query CM Conditional Order History Weight(IP): 1 Security Type: USER_DATA Notes: - Either + * `strategyId` or `newClientStrategyId` must be sent. - `NEW` + * orders will not be found. - These orders will not be found: - order status is + * `CANCELED` or `EXPIRED`, **AND** - order has NO filled trade, **AND** - + * created time + 7 days < current time * * @throws ApiException if the Api call fails */ @Test - public void queryCmConditionalOrderHistoryTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryCmConditionalOrderHistoryTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long strategyId = 1L; String newClientStrategyId = "1"; Long recvWindow = 5000L; @@ -1532,32 +1652,30 @@ public void queryCmConditionalOrderHistoryTest() throws ApiException, CryptoExce Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&strategyId=1&newClientStrategyId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&strategyId=1&newClientStrategyId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "a122adefbf5aadf438d7dc29aaf824c9960c880ff367781502c41a638ee6637f", + "76ca77501cf0f97cea375b78a61226c092666a1c24806a1fabaa4fba6d9db3f9", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/conditional/orderHistory", actualRequest.url().encodedPath()); } /** - * Query CM Modify Order History(TRADE) + * Query CM Modify Order History (TRADE) * - *

Get order modification history * Either `orderId` or - * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. Weight: 1 + *

Get order modification history Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent, and the + * `orderId` will prevail if both are sent. * * @throws ApiException if the Api call fails */ @Test - public void queryCmModifyOrderHistoryTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryCmModifyOrderHistoryTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; String origClientOrderId = "1"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = api.queryCmModifyOrderHistory( @@ -1573,28 +1691,26 @@ public void queryCmModifyOrderHistoryTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&orderId=1&origClientOrderId=1&startTime=1623319461670&endTime=1641782889000&limit=500&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&orderId=1&origClientOrderId=1&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "8dfcc843fc05f631a3b12c4a0080f9d1f2283472ee0032b3e7e7fd46d855bcde", + "d279ef8f4cefc326a95c2c9af48d01a9f2152d3fca9a09e8767b1905ec5763f7", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/orderAmendment", actualRequest.url().encodedPath()); } /** - * Query CM Order(USER_DATA) + * Query CM Order (USER_DATA) * - *

Check an CM order's status. * Either `orderId` or - * `origClientOrderId` must be sent. * These orders will not be found: * order status - * is `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** - * * created time + 3 days < current time Weight: 1 + *

Check an CM order's status. Weight(IP): 1 Security Type: USER_DATA Notes: - Either + * `orderId` or `origClientOrderId` must be sent. - These orders will not be + * found: - order status is `CANCELED` or `EXPIRED`, **AND** - order has NO + * filled trade, **AND** - created time + 3 days < current time * * @throws ApiException if the Api call fails */ @Test - public void queryCmOrderTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryCmOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200925"; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; @@ -1611,28 +1727,25 @@ public void queryCmOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "symbol=&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "cbec82483be2ad044b893ffb2e6bc0d55370e378eaea0b4b61d95893bd9cc458", - actualRequest.url().queryParameter("signature")); + assertEquals("symbol=BTCUSD_200925&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("47de3ec7159e0434e57901face422fd64ed83f8c2800c1b6bc885c74846a398b", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/order", actualRequest.url().encodedPath()); } /** - * Query Current CM Open Conditional Order(USER_DATA) + * Query Current CM Open Conditional Order (USER_DATA) * - *

Query Current CM Open Conditional Order * Either `strategyId` or - * `newClientStrategyId` must be sent. * If the queried order has been triggered, - * cancelled or expired, the error message \"Order does not exist\" will be returned. - * Weight: 1 + *

Query Current CM Open Conditional Order Weight(IP): 1 Security Type: USER_DATA Notes: - + * Either `strategyId` or `newClientStrategyId` must be sent. - If the + * queried order has been triggered, cancelled or expired, the error message \"Order does + * not exist\" will be returned. * * @throws ApiException if the Api call fails */ @Test - public void queryCurrentCmOpenConditionalOrderTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryCurrentCmOpenConditionalOrderTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSD_200925"; Long strategyId = 1L; String newClientStrategyId = "1"; Long recvWindow = 5000L; @@ -1651,28 +1764,29 @@ public void queryCurrentCmOpenConditionalOrderTest() throws ApiException, Crypto Request actualRequest = captorValue.request(); assertEquals( - "symbol=&strategyId=1&newClientStrategyId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "symbol=BTCUSD_200925&strategyId=1&newClientStrategyId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "a122adefbf5aadf438d7dc29aaf824c9960c880ff367781502c41a638ee6637f", + "012157fb56eb45202f99aa04e9ff01d8b3cec6f1b79d357909b3d24c5dc0130d", actualRequest.url().queryParameter("signature")); - assertEquals("/papi/v1/cm/conditional/openOrder", actualRequest.url().encodedPath()); + assertEquals( + "/papi/v1/cm/conditional/openOrder", actualRequest.url().encodedPath()); } /** * Query Current CM Open Order (USER_DATA) * - *

Query current CM open order * Either `orderId` or `origClientOrderId` - * must be sent. * If the queried order has been filled or cancelled, the error message - * \"Order does not exist\" will be returned. Weight: 1 + *

Query current CM open order Weight(IP): 1 Security Type: USER_DATA Notes: - Either + * `orderId` or `origClientOrderId` must be sent. - If the queried order has + * been filled or cancelled, the error message \"Order does not exist\" will be + * returned. * * @throws ApiException if the Api call fails */ @Test - public void queryCurrentCmOpenOrderTest() throws ApiException, CryptoException { - String symbol = ""; - Long orderId = 1L; - String origClientOrderId = "1"; + public void queryCurrentCmOpenOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long orderId = 1917641L; + String origClientOrderId = "abc"; Long recvWindow = 5000L; ApiResponse response = api.queryCurrentCmOpenOrder(symbol, orderId, origClientOrderId, recvWindow); @@ -1687,11 +1801,9 @@ public void queryCurrentCmOpenOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&orderId=1917641&origClientOrderId=abc&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "cbec82483be2ad044b893ffb2e6bc0d55370e378eaea0b4b61d95893bd9cc458", + "e9a9f1217302762b1994fd8f413387e1956dad2b9eed05daa1d0d64fbf8993c8", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/openOrder", actualRequest.url().encodedPath()); } @@ -1699,13 +1811,17 @@ public void queryCurrentCmOpenOrderTest() throws ApiException, CryptoException { /** * Query Current Margin Open Order (USER_DATA) * - *

Query Current Margin Open Order Weight: 5 + *

Query Current Margin Open Order Weight(IP): 5 Security Type: USER_DATA Notes: - If + * `symbol` is not sent, order records for all symbols are returned. - When returning + * all symbols, the request count charged to the rate limiter equals the number of symbols + * currently trading on the exchange. * * @throws ApiException if the Api call fails */ @Test - public void queryCurrentMarginOpenOrderTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryCurrentMarginOpenOrderTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.queryCurrentMarginOpenOrder(symbol, recvWindow); @@ -1720,26 +1836,63 @@ public void queryCurrentMarginOpenOrderTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/margin/openOrders", actualRequest.url().encodedPath()); } /** - * Query Current UM Open Conditional Order(USER_DATA) + * Query Current UM Open Algo Order (USER_DATA) * - *

Query Current UM Open Conditional Order * Either `strategyId` or - * `newClientStrategyId` must be sent. * If the queried order has been - * `CANCELED`, `TRIGGERED`或`EXPIRED`, the error message - * \"Order does not exist\" will be returned. Weight: 1 + *

Check an UM algo order's status. Orders will not be found if: status is + * CANCELED/EXPIRED with no fills and created 3+ days ago; or created 90+ days ago. Weight(IP): + * 1 Security Type: USER_DATA Notes: - Either `algoId` or `clientAlgoId` + * must be sent. `algoId` is self-increment for each specific `symbol`. * * @throws ApiException if the Api call fails */ @Test - public void queryCurrentUmOpenConditionalOrderTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryCurrentUmOpenAlgoOrderTest() + throws ApiException, CryptoException, IOException { + Long algoId = 2146760L; + String clientAlgoId = "6B2I9XVcJpCjqPAJ4YoFX7"; + Long recvWindow = 5000L; + ApiResponse response = + api.queryCurrentUmOpenAlgoOrder(algoId, clientAlgoId, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("algoId=2146760&clientAlgoId=6B2I9XVcJpCjqPAJ4YoFX7&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "87096ab0f7ef63c753df68f8402162e99b54653f0b45ee1736f9b9f8b1ff7160", + actualRequest.url().queryParameter("signature")); + assertEquals("/papi/v1/um/algo/algoOrder", actualRequest.url().encodedPath()); + } + + /** + * Query Current UM Open Conditional Order (USER_DATA) + * + *

Query Current UM Open Conditional Order Weight(IP): 1 Security Type: USER_DATA Notes: - + * Either `strategyId` or `newClientStrategyId` must be sent. - If the + * queried order has been `CANCELED`, `TRIGGERED` or `EXPIRED`, + * the error message \"Order does not exist\" will be returned. + * + * @throws ApiException if the Api call fails + */ + @Test + public void queryCurrentUmOpenConditionalOrderTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long strategyId = 1L; String newClientStrategyId = "1"; Long recvWindow = 5000L; @@ -1758,26 +1911,27 @@ public void queryCurrentUmOpenConditionalOrderTest() throws ApiException, Crypto Request actualRequest = captorValue.request(); assertEquals( - "symbol=&strategyId=1&newClientStrategyId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "symbol=BTCUSDT&strategyId=1&newClientStrategyId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "a122adefbf5aadf438d7dc29aaf824c9960c880ff367781502c41a638ee6637f", + "76ca77501cf0f97cea375b78a61226c092666a1c24806a1fabaa4fba6d9db3f9", actualRequest.url().queryParameter("signature")); - assertEquals("/papi/v1/um/conditional/openOrder", actualRequest.url().encodedPath()); + assertEquals( + "/papi/v1/um/conditional/openOrder", actualRequest.url().encodedPath()); } /** - * Query Current UM Open Order(USER_DATA) + * Query Current UM Open Order (USER_DATA) * - *

Query current UM open order * Either `orderId` or `origClientOrderId` - * must be sent. * If the queried order has been filled or cancelled, the error message - * \"Order does not exist\" will be returned. Weight: 1 + *

Query current UM open order Weight(IP): 1 Security Type: USER_DATA Notes: - Either + * `orderId` or `origClientOrderId` must be sent. - If the queried order has + * been filled or cancelled, the error message \"Order does not exist\" will be + * returned. * * @throws ApiException if the Api call fails */ @Test - public void queryCurrentUmOpenOrderTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryCurrentUmOpenOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; @@ -1794,11 +1948,9 @@ public void queryCurrentUmOpenOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "cbec82483be2ad044b893ffb2e6bc0d55370e378eaea0b4b61d95893bd9cc458", + "a2c9b60f9540c076730139d7d5fdfa16602fe0f084a54f48c1385a51bba83bfa", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/openOrder", actualRequest.url().encodedPath()); } @@ -1806,13 +1958,15 @@ public void queryCurrentUmOpenOrderTest() throws ApiException, CryptoException { /** * Query Margin Account Order (USER_DATA) * - *

Query Margin Account Order Weight: 10 + *

Query Margin Account Order Weight(IP): 10 Security Type: USER_DATA Notes: - Either + * `orderId` or `origClientOrderId` must be sent. - For some historical + * orders, `cummulativeQuoteQty < 0` means the data is unavailable at this time. * * @throws ApiException if the Api call fails */ @Test - public void queryMarginAccountOrderTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryMarginAccountOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; @@ -1829,11 +1983,9 @@ public void queryMarginAccountOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "cbec82483be2ad044b893ffb2e6bc0d55370e378eaea0b4b61d95893bd9cc458", + "a2c9b60f9540c076730139d7d5fdfa16602fe0f084a54f48c1385a51bba83bfa", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/margin/order", actualRequest.url().encodedPath()); } @@ -1841,17 +1993,17 @@ public void queryMarginAccountOrderTest() throws ApiException, CryptoException { /** * Query Margin Account's all OCO (USER_DATA) * - *

Query all OCO for a specific margin account based on provided optional parameters Weight: - * 100 + *

Query all OCO for a specific margin account based on provided optional parameters + * Weight(IP): 100 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryMarginAccountsAllOcoTest() throws ApiException, CryptoException { + public void queryMarginAccountsAllOcoTest() throws ApiException, CryptoException, IOException { Long fromId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = api.queryMarginAccountsAllOco(fromId, startTime, endTime, limit, recvWindow); @@ -1866,11 +2018,9 @@ public void queryMarginAccountsAllOcoTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("fromId=1&startTime=1623319461670&endTime=1641782889000&limit=500&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "fromId=1&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "61b488868ac713a73a80bc2a2702ed4b195aeb136137d09a8678e33a99f2d71d", + "7c842734fe3bcc5b310412732325b57184012ce3266b576961f22517b03243ef", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/margin/allOrderList", actualRequest.url().encodedPath()); } @@ -1878,12 +2028,13 @@ public void queryMarginAccountsAllOcoTest() throws ApiException, CryptoException /** * Query Margin Account's OCO (USER_DATA) * - *

Retrieves a specific OCO based on provided optional parameters Weight: 5 + *

Retrieves a specific OCO based on provided optional parameters Weight(IP): 5 Security + * Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryMarginAccountsOcoTest() throws ApiException, CryptoException { + public void queryMarginAccountsOcoTest() throws ApiException, CryptoException, IOException { Long orderListId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; @@ -1900,9 +2051,7 @@ public void queryMarginAccountsOcoTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "orderListId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + assertEquals("orderListId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "7f372679c9ee620eee8ee577b66daacf79e10664aa713f1cde699495c3cec0a5", actualRequest.url().queryParameter("signature")); @@ -1912,12 +2061,12 @@ public void queryMarginAccountsOcoTest() throws ApiException, CryptoException { /** * Query Margin Account's Open OCO (USER_DATA) * - *

Query Margin Account's Open OCO Weight: 5 + *

Query Margin Account's Open OCO Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryMarginAccountsOpenOcoTest() throws ApiException, CryptoException { + public void queryMarginAccountsOpenOcoTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.queryMarginAccountsOpenOco(recvWindow); @@ -1940,19 +2089,58 @@ public void queryMarginAccountsOpenOcoTest() throws ApiException, CryptoExceptio } /** - * Query UM Conditional Order History(USER_DATA) + * Query UM Algo Order History (USER_DATA) * - *

Query UM Conditional Order History * Either `strategyId` or - * `newClientStrategyId` must be sent. * `NEW` orders will not be found. * - * These orders will not be found: * order status is `CANCELED` or - * `EXPIRED`, **AND** * order has NO filled trade, **AND** * created time + 7 days - * < current time Weight: 1 + *

Get all algo orders: ACTIVE, CANCELED, TRIGGERED or FINISHED. Weight(IP): 5 Security Type: + * USER_DATA Notes: - If `algoId` is set, it will get orders >= that + * `algoId`. Otherwise most recent orders are returned. - The query time period must + * be less than 7 days (default as the recent 7 days). * * @throws ApiException if the Api call fails */ @Test - public void queryUmConditionalOrderHistoryTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryUmAlgoOrderHistoryTest() throws ApiException, CryptoException, IOException { + String symbol = "BNBUSDT"; + Long algoId = 2146760L; + Long startTime = 1770130294138L; + Long endTime = 1770736694138L; + Long limit = 500L; + Long recvWindow = 5000L; + ApiResponse response = + api.queryUmAlgoOrderHistory(symbol, algoId, startTime, endTime, limit, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("symbol=BNBUSDT&algoId=2146760&startTime=1770130294138&endTime=1770736694138&limit=500&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "6118bef155f88558dbe662a3efd9ac33c18172bb18658c71eb31841f5e080217", + actualRequest.url().queryParameter("signature")); + assertEquals("/papi/v1/um/algo/allAlgoOrders", actualRequest.url().encodedPath()); + } + + /** + * Query UM Conditional Order History (USER_DATA) + * + *

Query UM Conditional Order History Weight(IP): 1 Security Type: USER_DATA Notes: - Either + * `strategyId` or `newClientStrategyId` must be sent. - `NEW` + * orders will not be found. - These orders will not be found: - order status is + * `CANCELED` or `EXPIRED`, **AND** - order has NO filled trade, **AND** - + * created time + 7 days < current time + * + * @throws ApiException if the Api call fails + */ + @Test + public void queryUmConditionalOrderHistoryTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long strategyId = 1L; String newClientStrategyId = "1"; Long recvWindow = 5000L; @@ -1970,32 +2158,30 @@ public void queryUmConditionalOrderHistoryTest() throws ApiException, CryptoExce Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&strategyId=1&newClientStrategyId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&strategyId=1&newClientStrategyId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "a122adefbf5aadf438d7dc29aaf824c9960c880ff367781502c41a638ee6637f", + "76ca77501cf0f97cea375b78a61226c092666a1c24806a1fabaa4fba6d9db3f9", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/conditional/orderHistory", actualRequest.url().encodedPath()); } /** - * Query UM Modify Order History(TRADE) + * Query UM Modify Order History (TRADE) * - *

Get order modification history * Either `orderId` or - * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. Weight: 1 + *

Get order modification history Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent, and the + * `orderId` will prevail if both are sent. * * @throws ApiException if the Api call fails */ @Test - public void queryUmModifyOrderHistoryTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryUmModifyOrderHistoryTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; String origClientOrderId = "1"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = api.queryUmModifyOrderHistory( @@ -2011,11 +2197,9 @@ public void queryUmModifyOrderHistoryTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&orderId=1&origClientOrderId=1&startTime=1623319461670&endTime=1641782889000&limit=500&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&orderId=1&origClientOrderId=1&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "8dfcc843fc05f631a3b12c4a0080f9d1f2283472ee0032b3e7e7fd46d855bcde", + "d279ef8f4cefc326a95c2c9af48d01a9f2152d3fca9a09e8767b1905ec5763f7", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/orderAmendment", actualRequest.url().encodedPath()); } @@ -2023,16 +2207,16 @@ public void queryUmModifyOrderHistoryTest() throws ApiException, CryptoException /** * Query UM Order (USER_DATA) * - *

Check an UM order's status. * These orders will not be found: * Either - * `orderId` or `origClientOrderId` must be sent. * order status is - * `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** * - * created time + 3 days < current time Weight: 1 + *

Check an UM order's status. Weight(IP): 1 Security Type: USER_DATA Notes: - These + * orders will not be found: - Either `orderId` or `origClientOrderId` must + * be sent. - order status is `CANCELED` or `EXPIRED`, **AND** - order has + * NO filled trade, **AND** - created time + 3 days < current time * * @throws ApiException if the Api call fails */ @Test - public void queryUmOrderTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryUmOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; @@ -2049,31 +2233,28 @@ public void queryUmOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "symbol=&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "cbec82483be2ad044b893ffb2e6bc0d55370e378eaea0b4b61d95893bd9cc458", - actualRequest.url().queryParameter("signature")); + assertEquals("symbol=BTCUSDT&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("a2c9b60f9540c076730139d7d5fdfa16602fe0f084a54f48c1385a51bba83bfa", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/order", actualRequest.url().encodedPath()); } /** - * Query User's CM Force Orders(USER_DATA) + * Query User's CM Force Orders (USER_DATA) * - *

Query User's CM Force Orders * If \"autoCloseType\" is not sent, orders with - * both of the types will be returned * If \"startTime\" is not sent, data within 7 - * days before \"endTime\" can be queried Weight: 20 with symbol, 50 without symbol + *

Query User's CM Force Orders Weight: - 20 with `symbol` - 50 without + * `symbol` Security Type: USER_DATA Notes: - If \"autoCloseType\" is not + * sent, orders with both of the types will be returned - If \"startTime\" is not + * sent, data within 7 days before \"endTime\" can be queried * * @throws ApiException if the Api call fails */ @Test - public void queryUsersCmForceOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryUsersCmForceOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; AutoCloseType autoCloseType = AutoCloseType.LIQUIDATION; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 10L; Long recvWindow = 5000L; ApiResponse response = api.queryUsersCmForceOrders( @@ -2089,24 +2270,23 @@ public void queryUsersCmForceOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&autoCloseType=LIQUIDATION&startTime=1623319461670&endTime=1641782889000&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&autoCloseType=LIQUIDATION&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "a8fbc61c925506a4d0328c80dbe4bd786245accbfc50aef2a14a769d18bde9d9", + "5f4ef6725ebebf0e08dc41c19104c9065d1f2a008cd481a29d7948a787bc74d6", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/cm/forceOrders", actualRequest.url().encodedPath()); } /** - * Query User's Margin Force Orders(USER_DATA) + * Query User's Margin Force Orders (USER_DATA) * - *

Query user's margin force orders Weight: 1 + *

Query user's margin force orders Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryUsersMarginForceOrdersTest() throws ApiException, CryptoException { + public void queryUsersMarginForceOrdersTest() + throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -2125,9 +2305,7 @@ public void queryUsersMarginForceOrdersTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + assertEquals("startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "2ecc0415a3bdb2963e8030cdf6cf00de6f49d21b71ff939dda42e5756eb8ba66", actualRequest.url().queryParameter("signature")); @@ -2137,19 +2315,20 @@ public void queryUsersMarginForceOrdersTest() throws ApiException, CryptoExcepti /** * Query User's UM Force Orders (USER_DATA) * - *

Query User's UM Force Orders * If `autoCloseType` is not sent, orders with - * both of the types will be returned * If `startTime` is not sent, data within 7 days - * before `endTime` can be queried Weight: 20 with symbol, 50 without symbol + *

Query User's UM Force Orders Weight: - 20 with `symbol` - 50 without + * `symbol` Security Type: USER_DATA Notes: - If `autoCloseType` is not + * sent, orders with both of the types will be returned - If `startTime` is not sent, + * data within 7 days before `endTime` can be queried * * @throws ApiException if the Api call fails */ @Test - public void queryUsersUmForceOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryUsersUmForceOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; AutoCloseType autoCloseType = AutoCloseType.LIQUIDATION; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 10L; Long recvWindow = 5000L; ApiResponse response = api.queryUsersUmForceOrders( @@ -2165,11 +2344,9 @@ public void queryUsersUmForceOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&autoCloseType=LIQUIDATION&startTime=1623319461670&endTime=1641782889000&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&autoCloseType=LIQUIDATION&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "a8fbc61c925506a4d0328c80dbe4bd786245accbfc50aef2a14a769d18bde9d9", + "5f4ef6725ebebf0e08dc41c19104c9065d1f2a008cd481a29d7948a787bc74d6", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/forceOrders", actualRequest.url().encodedPath()); } @@ -2178,17 +2355,17 @@ public void queryUsersUmForceOrdersTest() throws ApiException, CryptoException { * Toggle BNB Burn On UM Futures Trade (TRADE) * *

Change user's BNB Fee Discount for UM Futures (Fee Discount On or Fee Discount Off ) - * on ***EVERY symbol*** * The BNB would not be collected from UM-PM account to the Portfolio - * Margin account. Weight: 1 + * on ***EVERY symbol*** Weight(IP): 1 Security Type: TRADE Notes: - The BNB would not be + * collected from UM-PM account to the Portfolio Margin account. * * @throws ApiException if the Api call fails */ @Test - public void toggleBnbBurnOnUmFuturesTradeTest() throws ApiException, CryptoException { + public void toggleBnbBurnOnUmFuturesTradeTest() + throws ApiException, CryptoException, IOException { ToggleBnbBurnOnUmFuturesTradeRequest toggleBnbBurnOnUmFuturesTradeRequest = new ToggleBnbBurnOnUmFuturesTradeRequest(); - - toggleBnbBurnOnUmFuturesTradeRequest.feeBurn(""); + toggleBnbBurnOnUmFuturesTradeRequest.feeBurn(FeeBurn.TRUE); ApiResponse response = api.toggleBnbBurnOnUmFuturesTrade(toggleBnbBurnOnUmFuturesTradeRequest); @@ -2203,31 +2380,31 @@ public void toggleBnbBurnOnUmFuturesTradeTest() throws ApiException, CryptoExcep Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000feeBurn=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000feeBurn=true", signInputCaptor.getValue()); assertEquals( - "b5185b9009ad5a0346daec6e86f58d6828c88fcc961b7eef5514f9bc0680560d", + "ff5edd18db9807ec9d50a2f885fad95e69ca0853908e5f65793984ea8d85e335", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/feeBurn", actualRequest.url().encodedPath()); } /** - * UM Account Trade List(USER_DATA) + * UM Account Trade List (USER_DATA) * - *

Get trades for a specific account and UM symbol. * If `startTime` and - * `endTime` are both not sent, then the last '24 hours' data will be - * returned. * The time between `startTime` and `endTime` cannot be longer - * than 24 hours. * The parameter `fromId` cannot be sent with `startTime` - * or `endTime`. Weight: 5 + *

Get trades for a specific account and UM symbol. Weight(IP): 5 Security Type: USER_DATA + * Notes: - If `startTime` and `endTime` are both not sent, then the last + * '7 days' data will be returned. - The time between `startTime` and + * `endTime` cannot be longer than 7 days. - The parameter `fromId` cannot + * be sent with `startTime` or `endTime`. * * @throws ApiException if the Api call fails */ @Test - public void umAccountTradeListTest() throws ApiException, CryptoException { - String symbol = ""; + public void umAccountTradeListTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long fromId = 1L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = api.umAccountTradeList(symbol, startTime, endTime, fromId, limit, recvWindow); @@ -2242,17 +2419,14 @@ public void umAccountTradeListTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&startTime=1623319461670&endTime=1641782889000&fromId=1&limit=500&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&startTime=1623319461670&endTime=1641782889000&fromId=1&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "4c4bae763e30633fc02c53d17c6ffbcf320a1e7056aad6d7bfc1545d015bab9b", - actualRequest.url().queryParameter("signature")); + "7a2a0ed531212a01908cfeda1881168b32fc6b3021e5a59987fb30042ab253c6", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/userTrades", actualRequest.url().encodedPath()); } /** - * UM Position ADL Quantile Estimation(USER_DATA) + * UM Position ADL Quantile Estimation (USER_DATA) * *

Query UM Position ADL Quantile Estimation * Values update every 30s. * Values 0, 1, 2, 3, * 4 shows the queue position and possibility of ADL from low to high. * For positions of the @@ -2262,13 +2436,14 @@ public void umAccountTradeListTest() throws ApiException, CryptoException { * in Hedge Mode: * \"HEDGE\" as a sign will be returned instead of * \"BOTH\"; * A same value caculated on unrealized pnls on long and short sides' * positions will be shown for \"LONG\" and \"SHORT\" when there are - * positions in both of long and short sides. Weight: 5 + * positions in both of long and short sides. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void umPositionAdlQuantileEstimationTest() throws ApiException, CryptoException { - String symbol = ""; + public void umPositionAdlQuantileEstimationTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.umPositionAdlQuantileEstimation(symbol, recvWindow); @@ -2283,9 +2458,9 @@ public void umPositionAdlQuantileEstimationTest() throws ApiException, CryptoExc Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/um/adlQuantile", actualRequest.url().encodedPath()); } diff --git a/clients/derivatives-trading-portfolio-margin/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/UserDataStreamsApiTest.java b/clients/derivatives-trading-portfolio-margin/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/UserDataStreamsApiTest.java index 87d6ac728..9d73c64f3 100644 --- a/clients/derivatives-trading-portfolio-margin/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/UserDataStreamsApiTest.java +++ b/clients/derivatives-trading-portfolio-margin/src/test/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/UserDataStreamsApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading Portfolio Margin REST API - * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API + * Portfolio Margin REST API + * Access account information, manage margin positions, and trade with Binance Portfolio Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -25,6 +25,7 @@ import com.binance.connector.client.common.sign.SignatureGenerator; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.StartUserDataStreamResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -76,14 +77,14 @@ public void initApiClient() throws ApiException { } /** - * Close User Data Stream(USER_STREAM) + * Close User Data Stream (USER_STREAM) * - *

Close out a user data stream. Weight: 1 + *

Close out a user data stream. Weight(IP): 1 Security Type: USER_STREAM * * @throws ApiException if the Api call fails */ @Test - public void closeUserDataStreamTest() throws ApiException, CryptoException { + public void closeUserDataStreamTest() throws ApiException, CryptoException, IOException { api.closeUserDataStream(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -92,7 +93,8 @@ public void closeUserDataStreamTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/listenKey", actualRequest.url().encodedPath()); } @@ -100,12 +102,13 @@ public void closeUserDataStreamTest() throws ApiException, CryptoException { * Keepalive User Data Stream (USER_STREAM) * *

Keepalive a user data stream to prevent a time out. User data streams will close after 60 - * minutes. It's recommended to send a ping about every 60 minutes. Weight: 1 + * minutes. It's recommended to send a ping about every 60 minutes. Weight(IP): 1 Security + * Type: USER_STREAM * * @throws ApiException if the Api call fails */ @Test - public void keepaliveUserDataStreamTest() throws ApiException, CryptoException { + public void keepaliveUserDataStreamTest() throws ApiException, CryptoException, IOException { api.keepaliveUserDataStream(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -114,21 +117,24 @@ public void keepaliveUserDataStreamTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/listenKey", actualRequest.url().encodedPath()); } /** - * Start User Data Stream(USER_STREAM) + * Start User Data Stream (USER_STREAM) * *

Start a new user data stream. The stream will close after 60 minutes unless a keepalive is * sent. If the account has an active `listenKey`, that `listenKey` will be - * returned and its validity will be extended for 60 minutes. Weight: 1 + * returned and its validity will be extended for 60 minutes. Weight(IP): 1 Security Type: + * USER_STREAM * * @throws ApiException if the Api call fails */ @Test - public void startUserDataStreamTest() throws ApiException, CryptoException { + public void startUserDataStreamTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.startUserDataStream(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -138,7 +144,8 @@ public void startUserDataStreamTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/papi/v1/listenKey", actualRequest.url().encodedPath()); } } diff --git a/clients/derivatives-trading-usds-futures/CHANGELOG.md b/clients/derivatives-trading-usds-futures/CHANGELOG.md index d55938826..681515f02 100644 --- a/clients/derivatives-trading-usds-futures/CHANGELOG.md +++ b/clients/derivatives-trading-usds-futures/CHANGELOG.md @@ -1,5 +1,284 @@ # Changelog +## 12.0.0 - 2026-07-29 + +### Changed (56) + +#### REST API + +- Modified parameter `algoType`: + - enum added: `CONDITIONAL` + - affected methods: + - `newAlgoOrder()` (`POST /fapi/v1/algoOrder`) +- Modified parameter `batchOrders`: + - items.`goodTillDate`: type `string` → `integer` + - items.`price`: type `string` → `number` + - items.`priceMatch`: enum removed: `NONE` + - items.`quantity`: type `string` → `number` + - items.`reduceOnly`: enum added: `true`, `false` + - items.`selfTradePreventionMode`: enum added: `NONE` + - items.`type`: enum added: `LIMIT`, `MARKET`, `STOP`, `STOP_MARKET`, `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`, `TRAILING_STOP_MARKET` + - items.`goodTillDate`: type `string` → `integer` + - items.`price`: type `string` → `number` + - items.`priceMatch`: enum removed: `NONE` + - items.`quantity`: type `string` → `number` + - items.`reduceOnly`: enum added: `true`, `false` + - items.`selfTradePreventionMode`: enum added: `NONE` + - items.`type`: enum added: `LIMIT`, `MARKET`, `STOP`, `STOP_MARKET`, `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`, `TRAILING_STOP_MARKET` + - affected methods: + - `placeMultipleOrders()` (`POST /fapi/v1/batchOrders`) +- Modified parameter `batchOrders`: + - items: property `timestamp` added + - items.`orderId`: type `string` → `integer` + - items.`price`: type `string` → `number` + - items.`priceMatch`: enum removed: `NONE` + - items.`quantity`: type `string` → `number` + - items.`recvWindow`: type `string` → `integer` + - items.`stopPrice`: type `string` → `number` + - items: item property `timestamp` added + - items.`orderId`: type `string` → `integer` + - items.`price`: type `string` → `number` + - items.`priceMatch`: enum removed: `NONE` + - items.`quantity`: type `string` → `number` + - items.`recvWindow`: type `string` → `integer` + - items.`stopPrice`: type `string` → `number` + - affected methods: + - `modifyMultipleOrders()` (`PUT /fapi/v1/batchOrders`) +- Modified parameter `closePosition`: + - enum added: `true`, `false` + - affected methods: + - `newAlgoOrder()` (`POST /fapi/v1/algoOrder`) + - `testOrder()` (`POST /fapi/v1/order/test`) +- Modified parameter `contractType`: + - enum removed: `CURRENT_MONTH`, `NEXT_MONTH`, `PERPETUAL_DELIVERING` + - enum added: `TRADIFI_PERPETUAL` + - affected methods: + - `continuousContractKlineCandlestickData()` (`GET /fapi/v1/continuousKlines`) +- Modified parameter `contractType`: + - enum removed: `CURRENT_MONTH`, `NEXT_MONTH`, `PERPETUAL_DELIVERING` + - affected methods: + - `basis()` (`GET /futures/data/basis`) +- Modified parameter `incomeType`: + - enum added: `TRANSFER`, `WELCOME_BONUS`, `REALIZED_PNL`, `FUNDING_FEE`, `COMMISSION`, `INSURANCE_CLEAR`, `REFERRAL_KICKBACK`, `COMMISSION_REBATE`, `API_REBATE`, `CONTEST_REWARD`, `CROSS_COLLATERAL_TRANSFER`, `OPTIONS_PREMIUM_FEE`, `OPTIONS_SETTLE_PROFIT`, `INTERNAL_TRANSFER`, `AUTO_EXCHANGE`, `DELIVERED_SETTELMENT`, `COIN_SWAP_DEPOSIT`, `COIN_SWAP_WITHDRAW`, `POSITION_LIMIT_INCREASE_FEE`, `STRATEGY_UMFUTURES_TRANSFER`, `FEE_RETURN`, `BFUSD_REWARD` + - affected methods: + - `getIncomeHistory()` (`GET /fapi/v1/income`) +- Modified parameter `interval`: + - enum removed: `1s` + - affected methods: + - `continuousContractKlineCandlestickData()` (`GET /fapi/v1/continuousKlines`) + - `indexPriceKlineCandlestickData()` (`GET /fapi/v1/indexPriceKlines`) + - `klineCandlestickData()` (`GET /fapi/v1/klines`) + - `markPriceKlineCandlestickData()` (`GET /fapi/v1/markPriceKlines`) + - `premiumIndexKlineData()` (`GET /fapi/v1/premiumIndexKlines`) +- Modified parameter `orderIdList`: + - maxLength `null` → `10` + - affected methods: + - `cancelMultipleOrders()` (`DELETE /fapi/v1/batchOrders`) +- Modified parameter `origClientOrderIdList`: + - maxLength `null` → `10` + - affected methods: + - `cancelMultipleOrders()` (`DELETE /fapi/v1/batchOrders`) +- Modified parameter `positionSide`: + - enum removed: `BOTH`, `LONG`, `SHORT` + - affected methods: + - `newAlgoOrder()` (`POST /fapi/v1/algoOrder`) + - `newOrder()` (`POST /fapi/v1/order`) + - `modifyIsolatedPositionMargin()` (`POST /fapi/v1/positionMargin`) +- Modified parameter `priceMatch`: + - enum removed: `NONE` + - affected methods: + - `newAlgoOrder()` (`POST /fapi/v1/algoOrder`) + - `newOrder()` (`POST /fapi/v1/order`) + - `modifyOrder()` (`PUT /fapi/v1/order`) + - `testOrder()` (`POST /fapi/v1/order/test`) +- Modified parameter `priceProtect`: + - enum added: `true`, `false` + - affected methods: + - `newAlgoOrder()` (`POST /fapi/v1/algoOrder`) + - `testOrder()` (`POST /fapi/v1/order/test`) +- Modified parameter `reduceOnly`: + - enum added: `true`, `false` + - affected methods: + - `newAlgoOrder()` (`POST /fapi/v1/algoOrder`) + - `newOrder()` (`POST /fapi/v1/order`) + - `testOrder()` (`POST /fapi/v1/order/test`) +- Modified parameter `selfTradePreventionMode`: + - enum added: `NONE` + - affected methods: + - `newAlgoOrder()` (`POST /fapi/v1/algoOrder`) + - `testOrder()` (`POST /fapi/v1/order/test`) +- Modified parameter `type`: + - enum added: `LIMIT`, `MARKET`, `STOP`, `STOP_MARKET`, `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`, `TRAILING_STOP_MARKET` + - affected methods: + - `newAlgoOrder()` (`POST /fapi/v1/algoOrder`) +- Modified parameter `type`: + - enum added: `LIMIT`, `MARKET`, `STOP`, `STOP_MARKET`, `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`, `TRAILING_STOP_MARKET` + - affected methods: + - `newOrder()` (`POST /fapi/v1/order`) + - `testOrder()` (`POST /fapi/v1/order/test`) +- Modified parameter `type`: + - type `string` → `integer` + - affected methods: + - `modifyIsolatedPositionMargin()` (`POST /fapi/v1/positionMargin`) +- Modified parameter `type`: + - type `integer` → `string` + - affected methods: + - `getPositionMarginChangeHistory()` (`GET /fapi/v1/positionMargin/history`) +- Modified response for `orderBook()` (`GET /fapi/v1/depth`): + - `asks`.items: minItems `0` → `2` + - `asks`.items: maxItems `null` → `2` + - `bids`.items: minItems `0` → `2` + - `bids`.items: maxItems `null` → `2` + +- Modified response for `queryInsuranceFundBalanceSnapshot()` (`GET /fapi/v1/insuranceBalance`): + - oneOf modified + +- Modified response for `notionalAndLeverageBrackets()` (`GET /fapi/v1/leverageBracket`): + - oneOf modified + +- Modified response for `queryOrder()` (`GET /fapi/v1/order`): + - property `selfTradePreventionMode` added + - property `goodTillDate` added + - property `priceMatch` added + +- Modified response for `markPrice()` (`GET /fapi/v1/premiumIndex`): + - oneOf modified + +- Modified response for `rpiOrderBook()` (`GET /fapi/v1/rpiDepth`): + - `asks`.items: minItems `0` → `2` + - `asks`.items: maxItems `null` → `2` + - `bids`.items: minItems `0` → `2` + - `bids`.items: maxItems `null` → `2` + +- Modified response for `adlRisk()` (`GET /fapi/v1/symbolAdlRisk`): + - oneOf modified + +- Modified response for `ticker24hrPriceChangeStatistics()` (`GET /fapi/v1/ticker/24hr`): + - oneOf modified + +- Modified response for `symbolOrderBookTicker()` (`GET /fapi/v1/ticker/bookTicker`): + - oneOf modified + +- Modified response for `symbolPriceTicker()` (`GET /fapi/v1/ticker/price`): + - oneOf modified + +- Modified response for `symbolPriceTickerV2()` (`GET /fapi/v2/ticker/price`): + - oneOf modified + +- Modified response for `longShortRatio()` (`GET /futures/data/globalLongShortAccountRatio`): + - items.`timestamp`: type `string` → `integer` + - items.`timestamp`: type `string` → `integer` + +- Modified response for `openInterestStatistics()` (`GET /futures/data/openInterestHist`): + - items.`timestamp`: type `string` → `integer` + - items.`timestamp`: type `string` → `integer` + +- Modified response for `takerBuySellVolume()` (`GET /futures/data/takerlongshortRatio`): + - items.`timestamp`: type `string` → `integer` + - items.`timestamp`: type `string` → `integer` + +- Modified response for `topTraderLongShortRatioAccounts()` (`GET /futures/data/topLongShortAccountRatio`): + - items.`timestamp`: type `string` → `integer` + - items.`timestamp`: type `string` → `integer` + +- Modified response for `topTraderLongShortRatioPositions()` (`GET /futures/data/topLongShortPositionRatio`): + - items.`timestamp`: type `string` → `integer` + - items.`timestamp`: type `string` → `integer` + +- Marked `symbolPriceTicker()` (`GET /fapi/v1/ticker/price`) as deprecated. + +#### WebSocket API + +- Modified parameter `algoType`: + - enum added: `CONDITIONAL` + - affected methods: + - `newAlgoOrder()` (`algoOrder.place` method) +- Modified parameter `closePosition`: + - enum added: `true`, `false` + - affected methods: + - `newAlgoOrder()` (`algoOrder.place` method) +- Modified parameter `priceMatch`: + - enum removed: `NONE` + - affected methods: + - `newAlgoOrder()` (`algoOrder.place` method) + - `modifyOrder()` (`order.modify` method) + - `newOrder()` (`order.place` method) +- Modified parameter `priceProtect`: + - enum added: `true`, `false` + - affected methods: + - `newAlgoOrder()` (`algoOrder.place` method) +- Modified parameter `reduceOnly`: + - enum added: `true`, `false` + - affected methods: + - `newAlgoOrder()` (`algoOrder.place` method) + - `newOrder()` (`order.place` method) +- Modified parameter `selfTradePreventionMode`: + - enum added: `NONE` + - affected methods: + - `newAlgoOrder()` (`algoOrder.place` method) +- Modified parameter `selfTradePreventionMode`: + - enum added: `NONE` + - affected methods: + - `newOrder()` (`order.place` method) +- Modified parameter `timeInForce`: + - enum removed: `GTX`, `GTD`, `RPI` + - affected methods: + - `newAlgoOrder()` (`algoOrder.place` method) +- Modified parameter `type`: + - enum added: `STOP_MARKET`, `TAKE_PROFIT_MARKET`, `STOP`, `TAKE_PROFIT`, `TRAILING_STOP_MARKET` + - affected methods: + - `newAlgoOrder()` (`algoOrder.place` method) +- Modified parameter `type`: + - enum added: `LIMIT`, `MARKET` + - affected methods: + - `newOrder()` (`order.place` method) +- Modified response for `orderBook()` (`depth` method): + - property `asks` added + - property `bids` added + - `result`: property `asks` deleted + - `result`: property `bids` deleted + +- Modified response for `queryOrder()` (`order.status` method): + - `result`: property `selfTradePreventionMode` added + - `result`: property `goodTillDate` added + - `result`: property `priceMatch` added + +- Modified response for `symbolOrderBookTicker()` (`ticker.book` method): + - oneOf modified + +- Modified response for `symbolPriceTicker()` (`ticker.price` method): + - oneOf modified + +#### WebSocket Streams + +- Modified parameter `contractType`: + - enum added: `perpetual`, `current_quarter`, `next_quarter`, `tradifi_perpetual` + - affected methods: + - `continuousContractKlineCandlestickStreams()` (`_@continuousKline_` stream) +- Modified parameter `interval`: + - enum added: `1s`, `1m`, `3m`, `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `6h`, `8h`, `12h`, `1d`, `3d`, `1w`, `1M` + - affected methods: + - `continuousContractKlineCandlestickStreams()` (`_@continuousKline_` stream) +- Modified parameter `interval`: + - enum added: `1m`, `3m`, `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `6h`, `8h`, `12h`, `1d`, `3d`, `1w`, `1M` + - affected methods: + - `klineCandlestickStreams()` (`@kline_` stream) +- Modified parameter `levels`: + - type `integer` → `string` + - enum added: `5`, `10`, `20` + - affected methods: + - `partialBookDepthStreams()` (`@depth@` stream) +- Modified parameter `updateSpeed`: + - enum added: `1s` + - affected methods: + - `markPriceStreamForAllMarket()` (`!markPrice@arr@` stream) + - `markPriceStream()` (`@markPrice@` stream) +- Modified parameter `updateSpeed`: + - enum added: `100ms`, `500ms` + - affected methods: + - `partialBookDepthStreams()` (`@depth@` stream) + - `diffBookDepthStreams()` (`@depth@` stream) + ## 11.0.0 - 2026-05-04 - Added stop method for WebSocket diff --git a/clients/derivatives-trading-usds-futures/docs/AccountApi.md b/clients/derivatives-trading-usds-futures/docs/AccountApi.md index fa7754b10..04ce06734 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountApi.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountApi.md @@ -4,19 +4,19 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**accountInformation**](AccountApi.md#accountInformation) | **POST** /account.status | Account Information(USER_DATA) | -| [**accountInformationV2**](AccountApi.md#accountInformationV2) | **POST** /v2/account.status | Account Information V2(USER_DATA) | -| [**futuresAccountBalance**](AccountApi.md#futuresAccountBalance) | **POST** /account.balance | Futures Account Balance(USER_DATA) | -| [**futuresAccountBalanceV2**](AccountApi.md#futuresAccountBalanceV2) | **POST** /v2/account.balance | Futures Account Balance V2(USER_DATA) | +| [**accountInformation**](AccountApi.md#accountInformation) | **POST** /account.status | Account Information (USER_DATA) | +| [**accountInformationV2**](AccountApi.md#accountInformationV2) | **POST** /v2/account.status | Account Information V2 (USER_DATA) | +| [**futuresAccountBalance**](AccountApi.md#futuresAccountBalance) | **POST** /account.balance | Futures Account Balance (USER_DATA) | +| [**futuresAccountBalanceV2**](AccountApi.md#futuresAccountBalanceV2) | **POST** /v2/account.balance | Futures Account Balance V2 (USER_DATA) | # **accountInformation** > AccountInformationResponse accountInformation(accountInformationRequest) -Account Information(USER_DATA) +Account Information (USER_DATA) -Get current account information. User in single-asset/ multi-assets mode will see different value, see comments in response section for detail. Weight: 5 +Get current account information. User in single-asset/ multi-assets mode will see different value, see comments in response section for detail. Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -52,7 +52,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountInformationRequest** | [**AccountInformationRequest**](AccountInformationRequest.md)| | | +| **accountInformationRequest** | [**AccountInformationRequest**](AccountInformationRequest.md)| | [optional] | ### Return type @@ -76,9 +76,9 @@ No authorization required # **accountInformationV2** > AccountInformationV2Response accountInformationV2(accountInformationV2Request) -Account Information V2(USER_DATA) +Account Information V2 (USER_DATA) -Get current account information. User in single-asset/ multi-assets mode will see different value, see comments in response section for detail. Weight: 5 +Get current account information. User in single-asset/ multi-assets mode will see different value, see comments in response section for detail. Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -114,7 +114,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountInformationV2Request** | [**AccountInformationV2Request**](AccountInformationV2Request.md)| | | +| **accountInformationV2Request** | [**AccountInformationV2Request**](AccountInformationV2Request.md)| | [optional] | ### Return type @@ -138,9 +138,9 @@ No authorization required # **futuresAccountBalance** > FuturesAccountBalanceResponse futuresAccountBalance(futuresAccountBalanceRequest) -Futures Account Balance(USER_DATA) +Futures Account Balance (USER_DATA) -Query account balance info Weight: 5 +Futures Account Balance Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -176,7 +176,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **futuresAccountBalanceRequest** | [**FuturesAccountBalanceRequest**](FuturesAccountBalanceRequest.md)| | | +| **futuresAccountBalanceRequest** | [**FuturesAccountBalanceRequest**](FuturesAccountBalanceRequest.md)| | [optional] | ### Return type @@ -200,9 +200,9 @@ No authorization required # **futuresAccountBalanceV2** > FuturesAccountBalanceV2Response futuresAccountBalanceV2(futuresAccountBalanceV2Request) -Futures Account Balance V2(USER_DATA) +Futures Account Balance V2 (USER_DATA) -Query account balance info Weight: 5 +Futures Account Balance V2 Weight(IP): 5 Security Type: USER_DATA ### Example ```java @@ -238,7 +238,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **futuresAccountBalanceV2Request** | [**FuturesAccountBalanceV2Request**](FuturesAccountBalanceV2Request.md)| | | +| **futuresAccountBalanceV2Request** | [**FuturesAccountBalanceV2Request**](FuturesAccountBalanceV2Request.md)| | [optional] | ### Return type diff --git a/clients/derivatives-trading-usds-futures/docs/AccountConfigUpdate.md b/clients/derivatives-trading-usds-futures/docs/AccountConfigUpdate.md index 2684d5d54..726ac2118 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountConfigUpdate.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountConfigUpdate.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction Time | [optional] | |**ac** | [**AccountConfigUpdateAc**](AccountConfigUpdateAc.md) | | [optional] | |**ai** | [**AccountConfigUpdateAi**](AccountConfigUpdateAi.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountConfigUpdateAc.md b/clients/derivatives-trading-usds-futures/docs/AccountConfigUpdateAc.md index c1ad4a50d..60ff5d13c 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountConfigUpdateAc.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountConfigUpdateAc.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**lLowerCase** | **Long** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**lLowerCase** | **Long** | Leverage | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountConfigUpdateAi.md b/clients/derivatives-trading-usds-futures/docs/AccountConfigUpdateAi.md index 7905cd319..73c83901a 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountConfigUpdateAi.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountConfigUpdateAi.md @@ -2,12 +2,13 @@ # AccountConfigUpdateAi +User's Account Configuration ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**jLowerCase** | **Boolean** | | [optional] | +|**jLowerCase** | **Boolean** | Multi-Assets Mode | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountInformationRequest.md b/clients/derivatives-trading-usds-futures/docs/AccountInformationRequest.md index 0336d8826..e44362f0d 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountInformationRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountInformationRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**id** | **String** | Id. | [optional] | +|**recvWindow** | **Long** | Recv Window. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountInformationResponse.md b/clients/derivatives-trading-usds-futures/docs/AccountInformationResponse.md index 4a29a5da8..0610d47b8 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountInformationResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountInformationResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**AccountInformationResponseResult**](AccountInformationResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountInformationV2ResponseRateLimitsInner>**](AccountInformationV2ResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<AccountInformationResponseRateLimitsInner>**](AccountInformationResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountInformationResponseRateLimitsInner.md b/clients/derivatives-trading-usds-futures/docs/AccountInformationResponseRateLimitsInner.md new file mode 100644 index 000000000..ddf51ee30 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/AccountInformationResponseRateLimitsInner.md @@ -0,0 +1,17 @@ + + +# AccountInformationResponseRateLimitsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rateLimitType** | **String** | | [optional] | +|**interval** | **String** | | [optional] | +|**intervalNum** | **Long** | | [optional] | +|**limit** | **Long** | | [optional] | +|**count** | **Long** | | [optional] | + + + diff --git a/clients/derivatives-trading-usds-futures/docs/AccountInformationResponseResult.md b/clients/derivatives-trading-usds-futures/docs/AccountInformationResponseResult.md index 5915740ea..a47586300 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountInformationResponseResult.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountInformationResponseResult.md @@ -7,26 +7,26 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**feeTier** | **Long** | | [optional] | -|**canTrade** | **Boolean** | | [optional] | -|**canDeposit** | **Boolean** | | [optional] | -|**canWithdraw** | **Boolean** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**feeTier** | **Long** | account commission tier | [optional] | +|**canTrade** | **Boolean** | if can trade | [optional] | +|**canDeposit** | **Boolean** | if can transfer in asset | [optional] | +|**canWithdraw** | **Boolean** | if can transfer out asset | [optional] | +|**updateTime** | **Long** | reserved property, please ignore | [optional] | |**multiAssetsMargin** | **Boolean** | | [optional] | |**tradeGroupId** | **Long** | | [optional] | -|**totalInitialMargin** | **String** | | [optional] | -|**totalMaintMargin** | **String** | | [optional] | -|**totalWalletBalance** | **String** | | [optional] | -|**totalUnrealizedProfit** | **String** | | [optional] | -|**totalMarginBalance** | **String** | | [optional] | -|**totalPositionInitialMargin** | **String** | | [optional] | -|**totalOpenOrderInitialMargin** | **String** | | [optional] | -|**totalCrossWalletBalance** | **String** | | [optional] | -|**totalCrossUnPnl** | **String** | | [optional] | -|**availableBalance** | **String** | | [optional] | -|**maxWithdrawAmount** | **String** | | [optional] | +|**totalInitialMargin** | **String** | total initial margin required with current mark price (useless with isolated positions), only for USDT asset | [optional] | +|**totalMaintMargin** | **String** | the sum of USD value of all cross positions maintenance margin | [optional] | +|**totalWalletBalance** | **String** | total wallet balance, only for USDT asset | [optional] | +|**totalUnrealizedProfit** | **String** | total unrealized profit, only for USDT asset | [optional] | +|**totalMarginBalance** | **String** | total margin balance, only for USDT asset | [optional] | +|**totalPositionInitialMargin** | **String** | initial margin required for positions with current mark price, only for USDT asset | [optional] | +|**totalOpenOrderInitialMargin** | **String** | initial margin required for open orders with current mark price, only for USDT asset | [optional] | +|**totalCrossWalletBalance** | **String** | crossed wallet balance, only for USDT asset | [optional] | +|**totalCrossUnPnl** | **String** | unrealized profit of crossed positions, only for USDT asset | [optional] | +|**availableBalance** | **String** | available balance, only for USDT asset | [optional] | +|**maxWithdrawAmount** | **String** | maximum amount for transfer out, only for USDT asset | [optional] | |**assets** | [**List<AccountInformationResponseResultAssetsInner>**](AccountInformationResponseResultAssetsInner.md) | | [optional] | -|**positions** | [**List<AccountInformationResponseResultPositionsInner>**](AccountInformationResponseResultPositionsInner.md) | | [optional] | +|**positions** | [**List<AccountInformationResponseResultPositionsInner>**](AccountInformationResponseResultPositionsInner.md) | positions of all symbols in the market are returned | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountInformationResponseResultAssetsInner.md b/clients/derivatives-trading-usds-futures/docs/AccountInformationResponseResultAssetsInner.md index b36e5db97..20ede8fdb 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountInformationResponseResultAssetsInner.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountInformationResponseResultAssetsInner.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**walletBalance** | **String** | | [optional] | -|**unrealizedProfit** | **String** | | [optional] | -|**marginBalance** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**positionInitialMargin** | **String** | | [optional] | -|**openOrderInitialMargin** | **String** | | [optional] | -|**crossWalletBalance** | **String** | | [optional] | -|**crossUnPnl** | **String** | | [optional] | -|**availableBalance** | **String** | | [optional] | -|**maxWithdrawAmount** | **String** | | [optional] | -|**marginAvailable** | **Boolean** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**asset** | **String** | asset name | [optional] | +|**walletBalance** | **String** | wallet balance | [optional] | +|**unrealizedProfit** | **String** | unrealized profit | [optional] | +|**marginBalance** | **String** | margin balance | [optional] | +|**maintMargin** | **String** | maintenance margin required | [optional] | +|**initialMargin** | **String** | total initial margin required with current mark price | [optional] | +|**positionInitialMargin** | **String** | initial margin required for positions with current mark price | [optional] | +|**openOrderInitialMargin** | **String** | initial margin required for open orders with current mark price | [optional] | +|**crossWalletBalance** | **String** | crossed wallet balance | [optional] | +|**crossUnPnl** | **String** | unrealized profit of crossed positions | [optional] | +|**availableBalance** | **String** | available balance, only for USDT asset | [optional] | +|**maxWithdrawAmount** | **String** | maximum amount for transfer out, only for USDT asset | [optional] | +|**marginAvailable** | **Boolean** | whether the asset can be used as margin in Multi-Assets mode | [optional] | +|**updateTime** | **Long** | reserved property, please ignore | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountInformationResponseResultPositionsInner.md b/clients/derivatives-trading-usds-futures/docs/AccountInformationResponseResultPositionsInner.md index 8f0b06994..d07b04f80 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountInformationResponseResultPositionsInner.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountInformationResponseResultPositionsInner.md @@ -7,22 +7,22 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**unrealizedProfit** | **String** | | [optional] | -|**positionInitialMargin** | **String** | | [optional] | -|**openOrderInitialMargin** | **String** | | [optional] | -|**leverage** | **String** | | [optional] | -|**isolated** | **Boolean** | | [optional] | -|**entryPrice** | **String** | | [optional] | -|**maxNotional** | **String** | | [optional] | -|**bidNotional** | **String** | | [optional] | -|**askNotional** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**positionAmt** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**breakEvenPrice** | **String** | | [optional] | +|**symbol** | **String** | symbol name | [optional] | +|**initialMargin** | **String** | total initial margin required with current mark price | [optional] | +|**maintMargin** | **String** | maintenance margin required | [optional] | +|**unrealizedProfit** | **String** | unrealized profit | [optional] | +|**positionInitialMargin** | **String** | initial margin required for positions with current mark price | [optional] | +|**openOrderInitialMargin** | **String** | initial margin required for open orders with current mark price | [optional] | +|**leverage** | **String** | current initial leverage | [optional] | +|**isolated** | **Boolean** | if the position is isolated | [optional] | +|**entryPrice** | **String** | average entry price | [optional] | +|**maxNotional** | **String** | maximum available notional with current leverage | [optional] | +|**bidNotional** | **String** | bids notional, ignore | [optional] | +|**askNotional** | **String** | ask notional, ignore | [optional] | +|**positionSide** | **String** | position side | [optional] | +|**positionAmt** | **String** | position amount | [optional] | +|**updateTime** | **Long** | reserved property, please ignore | [optional] | +|**breakEvenPrice** | **String** | average entry price | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountInformationV2Request.md b/clients/derivatives-trading-usds-futures/docs/AccountInformationV2Request.md index 80cb9082b..d6e7f28ec 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountInformationV2Request.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountInformationV2Request.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**id** | **String** | Id. | [optional] | +|**recvWindow** | **Long** | Recv Window. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountInformationV2Response.md b/clients/derivatives-trading-usds-futures/docs/AccountInformationV2Response.md index f039a44cb..51d0df150 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountInformationV2Response.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountInformationV2Response.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**AccountInformationV2ResponseResult**](AccountInformationV2ResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountInformationV2ResponseRateLimitsInner>**](AccountInformationV2ResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<AccountInformationResponseRateLimitsInner>**](AccountInformationResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseAssetsInner.md b/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseAssetsInner.md index ddcf8d518..8756fa394 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseAssetsInner.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseAssetsInner.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**walletBalance** | **String** | | [optional] | -|**unrealizedProfit** | **String** | | [optional] | -|**marginBalance** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**positionInitialMargin** | **String** | | [optional] | -|**openOrderInitialMargin** | **String** | | [optional] | -|**crossWalletBalance** | **String** | | [optional] | -|**crossUnPnl** | **String** | | [optional] | -|**availableBalance** | **String** | | [optional] | -|**maxWithdrawAmount** | **String** | | [optional] | -|**marginAvailable** | **Boolean** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**asset** | **String** | Asset name. | [optional] | +|**walletBalance** | **String** | Wallet balance. | [optional] | +|**unrealizedProfit** | **String** | Unrealized profit. | [optional] | +|**marginBalance** | **String** | Margin balance. | [optional] | +|**maintMargin** | **String** | Maintenance margin requirement. | [optional] | +|**initialMargin** | **String** | Total initial margin requirement. | [optional] | +|**positionInitialMargin** | **String** | Initial margin required for positions. | [optional] | +|**openOrderInitialMargin** | **String** | Initial margin required for open orders. | [optional] | +|**crossWalletBalance** | **String** | Cross wallet balance. | [optional] | +|**crossUnPnl** | **String** | Unrealized PnL for cross positions. | [optional] | +|**availableBalance** | **String** | Available balance. | [optional] | +|**maxWithdrawAmount** | **String** | Maximum transferable/withdrawable amount. | [optional] | +|**marginAvailable** | **Boolean** | Whether the asset can be used as margin in multi-assets mode. | [optional] | +|**updateTime** | **Long** | Last update time in milliseconds. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponsePositionsInner.md b/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponsePositionsInner.md index 7715e20b1..f7a60f52a 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponsePositionsInner.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponsePositionsInner.md @@ -2,26 +2,27 @@ # AccountInformationV2ResponsePositionsInner +positions of all symbols in the market are returned ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**unrealizedProfit** | **String** | | [optional] | -|**positionInitialMargin** | **String** | | [optional] | -|**openOrderInitialMargin** | **String** | | [optional] | -|**leverage** | **String** | | [optional] | -|**isolated** | **Boolean** | | [optional] | -|**entryPrice** | **String** | | [optional] | -|**maxNotional** | **String** | | [optional] | -|**bidNotional** | **String** | | [optional] | -|**askNotional** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**positionAmt** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**initialMargin** | **String** | Initial margin requirement. | [optional] | +|**maintMargin** | **String** | Maintenance margin requirement. | [optional] | +|**unrealizedProfit** | **String** | Unrealized profit. | [optional] | +|**positionInitialMargin** | **String** | Initial margin required for positions. | [optional] | +|**openOrderInitialMargin** | **String** | Initial margin required for open orders. | [optional] | +|**leverage** | **String** | Current initial leverage. | [optional] | +|**isolated** | **Boolean** | Whether the position uses isolated margin mode. | [optional] | +|**entryPrice** | **String** | Average entry price. | [optional] | +|**maxNotional** | **String** | Maximum available notional under current leverage. | [optional] | +|**bidNotional** | **String** | Bid notional (ignore). | [optional] | +|**askNotional** | **String** | Ask notional (ignore). | [optional] | +|**positionSide** | **String** | Position side. | [optional] | +|**positionAmt** | **String** | Position quantity. | [optional] | +|**updateTime** | **Long** | Last update time in milliseconds. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseRateLimitsInner.md b/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseRateLimitsInner.md deleted file mode 100644 index b51c3c144..000000000 --- a/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseRateLimitsInner.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# AccountInformationV2ResponseRateLimitsInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**rateLimitType** | **String** | | [optional] | -|**interval** | **String** | | [optional] | -|**intervalNum** | **Long** | | [optional] | -|**limit** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | - - - diff --git a/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseResult.md b/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseResult.md index 014a62ea3..e6dc1befb 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseResult.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseResult.md @@ -7,19 +7,19 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**totalInitialMargin** | **String** | | [optional] | -|**totalMaintMargin** | **String** | | [optional] | -|**totalWalletBalance** | **String** | | [optional] | -|**totalUnrealizedProfit** | **String** | | [optional] | -|**totalMarginBalance** | **String** | | [optional] | -|**totalPositionInitialMargin** | **String** | | [optional] | -|**totalOpenOrderInitialMargin** | **String** | | [optional] | -|**totalCrossWalletBalance** | **String** | | [optional] | -|**totalCrossUnPnl** | **String** | | [optional] | -|**availableBalance** | **String** | | [optional] | -|**maxWithdrawAmount** | **String** | | [optional] | -|**assets** | [**List<AccountInformationV2ResponseResultAssetsInner>**](AccountInformationV2ResponseResultAssetsInner.md) | | [optional] | -|**positions** | [**List<AccountInformationV2ResponseResultPositionsInner>**](AccountInformationV2ResponseResultPositionsInner.md) | | [optional] | +|**totalInitialMargin** | **String** | total initial margin required with current mark price (useless with isolated positions), only for USDT asset | [optional] | +|**totalMaintMargin** | **String** | the sum of USD value of all cross positions maintenance margin | [optional] | +|**totalWalletBalance** | **String** | total wallet balance, only for USDT asset | [optional] | +|**totalUnrealizedProfit** | **String** | total unrealized profit, only for USDT asset | [optional] | +|**totalMarginBalance** | **String** | total margin balance, only for USDT asset | [optional] | +|**totalPositionInitialMargin** | **String** | initial margin required for positions with current mark price, only for USDT asset | [optional] | +|**totalOpenOrderInitialMargin** | **String** | initial margin required for open orders with current mark price, only for USDT asset | [optional] | +|**totalCrossWalletBalance** | **String** | crossed wallet balance, only for USDT asset | [optional] | +|**totalCrossUnPnl** | **String** | unrealized profit of crossed positions, only for USDT asset | [optional] | +|**availableBalance** | **String** | available balance, only for USDT asset | [optional] | +|**maxWithdrawAmount** | **String** | maximum amount for transfer out, only for USDT asset | [optional] | +|**assets** | [**List<AccountInformationV2ResponseResultAssetsInner>**](AccountInformationV2ResponseResultAssetsInner.md) | For assets that are quote assets, USDT/USDC/BTC | [optional] | +|**positions** | [**List<AccountInformationV2ResponseResultPositionsInner>**](AccountInformationV2ResponseResultPositionsInner.md) | positions of all symbols user had position/ open orders are returned | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseResultAssetsInner.md b/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseResultAssetsInner.md index f17c94907..7641346ac 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseResultAssetsInner.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseResultAssetsInner.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**walletBalance** | **String** | | [optional] | -|**unrealizedProfit** | **String** | | [optional] | -|**marginBalance** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**positionInitialMargin** | **String** | | [optional] | -|**openOrderInitialMargin** | **String** | | [optional] | -|**crossWalletBalance** | **String** | | [optional] | -|**crossUnPnl** | **String** | | [optional] | -|**availableBalance** | **String** | | [optional] | -|**maxWithdrawAmount** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**marginAvailable** | **Boolean** | | [optional] | +|**asset** | **String** | asset name | [optional] | +|**walletBalance** | **String** | wallet balance | [optional] | +|**unrealizedProfit** | **String** | unrealized profit | [optional] | +|**marginBalance** | **String** | margin balance | [optional] | +|**maintMargin** | **String** | maintenance margin required | [optional] | +|**initialMargin** | **String** | total initial margin required with current mark price | [optional] | +|**positionInitialMargin** | **String** | initial margin required for positions with current mark price | [optional] | +|**openOrderInitialMargin** | **String** | initial margin required for open orders with current mark price | [optional] | +|**crossWalletBalance** | **String** | crossed wallet balance | [optional] | +|**crossUnPnl** | **String** | unrealized profit of crossed positions | [optional] | +|**availableBalance** | **String** | available balance, only for USDT asset | [optional] | +|**maxWithdrawAmount** | **String** | maximum amount for transfer out, only for USDT asset | [optional] | +|**marginAvailable** | **Boolean** | whether the asset can be used as margin in Multi-Assets mode | [optional] | +|**updateTime** | **Long** | last update time | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseResultPositionsInner.md b/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseResultPositionsInner.md index 5276ec95e..1b358c87c 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseResultPositionsInner.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountInformationV2ResponseResultPositionsInner.md @@ -8,15 +8,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | +|**positionSide** | **String** | position side | [optional] | |**positionAmt** | **String** | | [optional] | -|**unrealizedProfit** | **String** | | [optional] | +|**unrealizedProfit** | **String** | unrealized profit | [optional] | |**isolatedMargin** | **String** | | [optional] | |**notional** | **String** | | [optional] | |**isolatedWallet** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**initialMargin** | **String** | total initial margin required with current mark price | [optional] | +|**maintMargin** | **String** | maintenance margin required | [optional] | +|**updateTime** | **Long** | last update time | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountInformationV3Response.md b/clients/derivatives-trading-usds-futures/docs/AccountInformationV3Response.md index f2a8ae19d..c5a330771 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountInformationV3Response.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountInformationV3Response.md @@ -7,19 +7,19 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**totalInitialMargin** | **String** | | [optional] | -|**totalMaintMargin** | **String** | | [optional] | -|**totalWalletBalance** | **String** | | [optional] | -|**totalUnrealizedProfit** | **String** | | [optional] | -|**totalMarginBalance** | **String** | | [optional] | -|**totalPositionInitialMargin** | **String** | | [optional] | -|**totalOpenOrderInitialMargin** | **String** | | [optional] | -|**totalCrossWalletBalance** | **String** | | [optional] | -|**totalCrossUnPnl** | **String** | | [optional] | -|**availableBalance** | **String** | | [optional] | -|**maxWithdrawAmount** | **String** | | [optional] | -|**assets** | [**List<AccountInformationV3ResponseAssetsInner>**](AccountInformationV3ResponseAssetsInner.md) | | [optional] | -|**positions** | [**List<AccountInformationV3ResponsePositionsInner>**](AccountInformationV3ResponsePositionsInner.md) | | [optional] | +|**totalInitialMargin** | **String** | Total initial margin requirement. | [optional] | +|**totalMaintMargin** | **String** | Total maintenance margin requirement. | [optional] | +|**totalWalletBalance** | **String** | Total wallet balance. | [optional] | +|**totalUnrealizedProfit** | **String** | Total unrealized profit. | [optional] | +|**totalMarginBalance** | **String** | Total margin balance. | [optional] | +|**totalPositionInitialMargin** | **String** | Initial margin required for positions. | [optional] | +|**totalOpenOrderInitialMargin** | **String** | Initial margin required for open orders. | [optional] | +|**totalCrossWalletBalance** | **String** | Cross wallet balance. | [optional] | +|**totalCrossUnPnl** | **String** | Unrealized PnL for cross positions. | [optional] | +|**availableBalance** | **String** | Available balance. | [optional] | +|**maxWithdrawAmount** | **String** | Maximum transferable/withdrawable amount. | [optional] | +|**assets** | [**List<AccountInformationV3ResponseAssetsInner>**](AccountInformationV3ResponseAssetsInner.md) | Asset-level account details. | [optional] | +|**positions** | [**List<AccountInformationV3ResponsePositionsInner>**](AccountInformationV3ResponsePositionsInner.md) | Position details for symbols. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountInformationV3ResponseAssetsInner.md b/clients/derivatives-trading-usds-futures/docs/AccountInformationV3ResponseAssetsInner.md index dd8238d16..0b57e50dd 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountInformationV3ResponseAssetsInner.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountInformationV3ResponseAssetsInner.md @@ -2,24 +2,25 @@ # AccountInformationV3ResponseAssetsInner +For assets that are quote assets, USDT/USDC/BTC ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**walletBalance** | **String** | | [optional] | -|**unrealizedProfit** | **String** | | [optional] | -|**marginBalance** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**positionInitialMargin** | **String** | | [optional] | -|**openOrderInitialMargin** | **String** | | [optional] | -|**crossWalletBalance** | **String** | | [optional] | -|**crossUnPnl** | **String** | | [optional] | -|**availableBalance** | **String** | | [optional] | -|**maxWithdrawAmount** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**asset** | **String** | Asset name. | [optional] | +|**walletBalance** | **String** | Wallet balance. | [optional] | +|**unrealizedProfit** | **String** | Unrealized profit. | [optional] | +|**marginBalance** | **String** | Margin balance. | [optional] | +|**maintMargin** | **String** | Maintenance margin requirement. | [optional] | +|**initialMargin** | **String** | Total initial margin requirement. | [optional] | +|**positionInitialMargin** | **String** | Initial margin required for positions. | [optional] | +|**openOrderInitialMargin** | **String** | Initial margin required for open orders. | [optional] | +|**crossWalletBalance** | **String** | Cross wallet balance. | [optional] | +|**crossUnPnl** | **String** | Unrealized PnL for cross positions. | [optional] | +|**availableBalance** | **String** | Available balance. | [optional] | +|**maxWithdrawAmount** | **String** | Maximum transferable/withdrawable amount. | [optional] | +|**updateTime** | **Long** | Last update time in milliseconds. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountInformationV3ResponsePositionsInner.md b/clients/derivatives-trading-usds-futures/docs/AccountInformationV3ResponsePositionsInner.md index ad6f3811e..21fd58798 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountInformationV3ResponsePositionsInner.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountInformationV3ResponsePositionsInner.md @@ -2,21 +2,22 @@ # AccountInformationV3ResponsePositionsInner +positions of all symbols user had position/ open orders are returned ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**positionAmt** | **String** | | [optional] | -|**unrealizedProfit** | **String** | | [optional] | -|**isolatedMargin** | **String** | | [optional] | -|**notional** | **String** | | [optional] | -|**isolatedWallet** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**positionSide** | **String** | Position side. | [optional] | +|**positionAmt** | **String** | Position quantity. | [optional] | +|**unrealizedProfit** | **String** | Unrealized profit. | [optional] | +|**isolatedMargin** | **String** | Isolated margin. | [optional] | +|**notional** | **String** | Position notional value. | [optional] | +|**isolatedWallet** | **String** | Isolated wallet balance. | [optional] | +|**initialMargin** | **String** | Initial margin requirement. | [optional] | +|**maintMargin** | **String** | Maintenance margin requirement. | [optional] | +|**updateTime** | **Long** | Last update time in milliseconds. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountTradeListResponseInner.md b/clients/derivatives-trading-usds-futures/docs/AccountTradeListResponseInner.md index c428ebb88..67595a080 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountTradeListResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountTradeListResponseInner.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**buyer** | **Boolean** | | [optional] | -|**commission** | **String** | | [optional] | -|**commissionAsset** | **String** | | [optional] | -|**id** | **Long** | | [optional] | -|**maker** | **Boolean** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**qty** | **String** | | [optional] | -|**quoteQty** | **String** | | [optional] | -|**realizedPnl** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**time** | **Long** | | [optional] | +|**buyer** | **Boolean** | Buyer. | [optional] | +|**commission** | **String** | Commission. | [optional] | +|**commissionAsset** | **String** | Commission Asset. | [optional] | +|**id** | **Long** | Id. | [optional] | +|**maker** | **Boolean** | Maker. | [optional] | +|**orderId** | **Long** | Order Id. | [optional] | +|**price** | **String** | Price. | [optional] | +|**qty** | **String** | Qty. | [optional] | +|**quoteQty** | **String** | Quote Qty. | [optional] | +|**realizedPnl** | **String** | Realized Pnl. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | Position Side. | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**time** | **Long** | Time. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountUpdate.md b/clients/derivatives-trading-usds-futures/docs/AccountUpdate.md index 87e31ecde..bf4d59269 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountUpdate.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountUpdate.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction | [optional] | |**aLowerCase** | [**AccountUpdateA**](AccountUpdateA.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountUpdateA.md b/clients/derivatives-trading-usds-futures/docs/AccountUpdateA.md index b3859d2e6..4c6d870cf 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountUpdateA.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountUpdateA.md @@ -2,13 +2,14 @@ # AccountUpdateA +Update Data ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**mLowerCase** | **String** | | [optional] | -|**B** | [**List<AccountUpdateABInner>**](AccountUpdateABInner.md) | | [optional] | +|**mLowerCase** | **String** | Event reason type | [optional] | +|**B** | [**List<AccountUpdateABInner>**](AccountUpdateABInner.md) | Balances | [optional] | |**P** | [**List<AccountUpdateAPInner>**](AccountUpdateAPInner.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountUpdateABInner.md b/clients/derivatives-trading-usds-futures/docs/AccountUpdateABInner.md index 3380c37bb..1fc7fee81 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountUpdateABInner.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountUpdateABInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**aLowerCase** | **String** | | [optional] | -|**wb** | **String** | | [optional] | -|**cw** | **String** | | [optional] | -|**bc** | **String** | | [optional] | +|**aLowerCase** | **String** | Asset | [optional] | +|**wb** | **String** | Wallet Balance | [optional] | +|**cw** | **String** | Cross Wallet Balance | [optional] | +|**bc** | **String** | Balance Change except PnL and Commission | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AccountUpdateAPInner.md b/clients/derivatives-trading-usds-futures/docs/AccountUpdateAPInner.md index 2621e1c33..bf5f81df4 100644 --- a/clients/derivatives-trading-usds-futures/docs/AccountUpdateAPInner.md +++ b/clients/derivatives-trading-usds-futures/docs/AccountUpdateAPInner.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**pa** | **String** | | [optional] | -|**ep** | **String** | | [optional] | -|**bep** | **String** | | [optional] | -|**cr** | **String** | | [optional] | -|**up** | **String** | | [optional] | -|**mt** | **String** | | [optional] | -|**iw** | **String** | | [optional] | -|**ps** | **String** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**pa** | **String** | Position Amount | [optional] | +|**ep** | **String** | Entry Price | [optional] | +|**bep** | **String** | Breakeven Price | [optional] | +|**cr** | **String** | (Pre-fee) Accumulated Realized | [optional] | +|**up** | **String** | Unrealized PnL | [optional] | +|**mt** | **String** | Margin Type | [optional] | +|**iw** | **String** | Isolated Wallet (if isolated position) | [optional] | +|**ps** | **String** | Position Side | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AdlRiskResponse.md b/clients/derivatives-trading-usds-futures/docs/AdlRiskResponse.md index 66ff841c6..4133e4804 100644 --- a/clients/derivatives-trading-usds-futures/docs/AdlRiskResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/AdlRiskResponse.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**adlRisk** | **String** | | [optional] | +|**adlRisk** | **String** | ADL Risk rating | [optional] | |**updateTime** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AdlRiskResponse1.md b/clients/derivatives-trading-usds-futures/docs/AdlRiskResponse1.md index 5d6f303f3..aa37abee5 100644 --- a/clients/derivatives-trading-usds-futures/docs/AdlRiskResponse1.md +++ b/clients/derivatives-trading-usds-futures/docs/AdlRiskResponse1.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**adlRisk** | **String** | | [optional] | +|**adlRisk** | **String** | ADL Risk rating | [optional] | |**updateTime** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AdlRiskResponse2Inner.md b/clients/derivatives-trading-usds-futures/docs/AdlRiskResponse2Inner.md index a1c091452..00c068ba6 100644 --- a/clients/derivatives-trading-usds-futures/docs/AdlRiskResponse2Inner.md +++ b/clients/derivatives-trading-usds-futures/docs/AdlRiskResponse2Inner.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**adlRisk** | **String** | | [optional] | +|**adlRisk** | **String** | ADL Risk rating | [optional] | |**updateTime** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AggregateTradeStreamsRequest.md b/clients/derivatives-trading-usds-futures/docs/AggregateTradeStreamsRequest.md index 4b4e29d6d..26d1c0f14 100644 --- a/clients/derivatives-trading-usds-futures/docs/AggregateTradeStreamsRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/AggregateTradeStreamsRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AggregateTradeStreamsResponse.md b/clients/derivatives-trading-usds-futures/docs/AggregateTradeStreamsResponse.md index 7dc3e4f50..9292640d8 100644 --- a/clients/derivatives-trading-usds-futures/docs/AggregateTradeStreamsResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/AggregateTradeStreamsResponse.md @@ -7,17 +7,18 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**aLowerCase** | **Long** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**nq** | **String** | | [optional] | -|**fLowerCase** | **Long** | | [optional] | -|**lLowerCase** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**aLowerCase** | **Long** | Aggregate trade ID | [optional] | +|**pLowerCase** | **String** | Price | [optional] | +|**qLowerCase** | **String** | Quantity with all the market trades | [optional] | +|**nq** | **String** | Normal quantity without the trades involving RPI orders | [optional] | +|**fLowerCase** | **Long** | First trade ID | [optional] | +|**lLowerCase** | **Long** | Last trade ID | [optional] | +|**T** | **Long** | Trade time | [optional] | +|**mLowerCase** | **Boolean** | Is the buyer the market maker? | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AlgoType.md b/clients/derivatives-trading-usds-futures/docs/AlgoType.md new file mode 100644 index 000000000..3652b524b --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/AlgoType.md @@ -0,0 +1,11 @@ + + +# AlgoType + +## Enum + + +* `CONDITIONAL` (value: `"CONDITIONAL"`) + + + diff --git a/clients/derivatives-trading-usds-futures/docs/AlgoUpdate.md b/clients/derivatives-trading-usds-futures/docs/AlgoUpdate.md index b90b25db4..765a8afe1 100644 --- a/clients/derivatives-trading-usds-futures/docs/AlgoUpdate.md +++ b/clients/derivatives-trading-usds-futures/docs/AlgoUpdate.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**T** | **Long** | | [optional] | -|**E** | **Long** | | [optional] | +|**T** | **Long** | Transaction Time | [optional] | +|**E** | **Long** | Event Time | [optional] | |**oLowerCase** | [**AlgoUpdateO**](AlgoUpdateO.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AlgoUpdateO.md b/clients/derivatives-trading-usds-futures/docs/AlgoUpdateO.md index 63ada92b4..68dc2636c 100644 --- a/clients/derivatives-trading-usds-futures/docs/AlgoUpdateO.md +++ b/clients/derivatives-trading-usds-futures/docs/AlgoUpdateO.md @@ -7,31 +7,31 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**caid** | **String** | | [optional] | -|**aid** | **Long** | | [optional] | -|**at** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**S** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**X** | **String** | | [optional] | -|**ai** | **String** | | [optional] | -|**ap** | **String** | | [optional] | -|**aq** | **String** | | [optional] | -|**act** | **String** | | [optional] | -|**tp** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**V** | **String** | | [optional] | -|**wt** | **String** | | [optional] | -|**pm** | **String** | | [optional] | -|**cp** | **Boolean** | | [optional] | -|**pP** | **Boolean** | | [optional] | -|**R** | **Boolean** | | [optional] | -|**tt** | **Long** | | [optional] | -|**gtd** | **Long** | | [optional] | -|**rm** | **String** | | [optional] | +|**caid** | **String** | Client Algo Id | [optional] | +|**aid** | **Long** | Algo Id | [optional] | +|**at** | **String** | Algo Type | [optional] | +|**oLowerCase** | **String** | Order Type | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**S** | **String** | Side | [optional] | +|**ps** | **String** | Position Side | [optional] | +|**fLowerCase** | **String** | Time in force | [optional] | +|**qLowerCase** | **String** | Quantity | [optional] | +|**X** | **String** | Algo Status | [optional] | +|**ai** | **String** | Order Id | [optional] | +|**ap** | **String** | Avg fill price in matching engine, only display when order is triggered and placed in matching engine | [optional] | +|**aq** | **String** | Executed quantity in matching engine, only display when order is triggered and placed in matching engine | [optional] | +|**act** | **String** | Actual order type in matching engine, only display when order is triggered and placed in matching engine | [optional] | +|**tp** | **String** | Trigger Price | [optional] | +|**pLowerCase** | **String** | Order Price | [optional] | +|**V** | **String** | STP mode | [optional] | +|**wt** | **String** | Working type | [optional] | +|**pm** | **String** | Price match mode | [optional] | +|**cp** | **Boolean** | If Close-All | [optional] | +|**pP** | **Boolean** | If price protection is turned on | [optional] | +|**R** | **Boolean** | Is this reduce only | [optional] | +|**tt** | **Long** | Trigger time | [optional] | +|**gtd** | **Long** | Good till time for GTD time in force | [optional] | +|**rm** | **String** | Algo order failed reason | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AllBookTickersStreamRequest.md b/clients/derivatives-trading-usds-futures/docs/AllBookTickersStreamRequest.md index 9e7456d15..42103273f 100644 --- a/clients/derivatives-trading-usds-futures/docs/AllBookTickersStreamRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/AllBookTickersStreamRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AllBookTickersStreamResponse.md b/clients/derivatives-trading-usds-futures/docs/AllBookTickersStreamResponse.md index cbe497f03..a0bf46aec 100644 --- a/clients/derivatives-trading-usds-futures/docs/AllBookTickersStreamResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/AllBookTickersStreamResponse.md @@ -7,15 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**B** | **String** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**A** | **String** | | [optional] | +|**eLowerCase** | **String** | event type | [optional] | +|**uLowerCase** | **Long** | order book updateId | [optional] | +|**E** | **Long** | event time | [optional] | +|**T** | **Long** | transaction time | [optional] | +|**sLowerCase** | **String** | symbol | [optional] | +|**bLowerCase** | **String** | best bid price | [optional] | +|**B** | **String** | best bid qty | [optional] | +|**aLowerCase** | **String** | best ask price | [optional] | +|**A** | **String** | best ask qty | [optional] | +|**ps** | **String** | (After CM migration) Pair symbol | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AllMarketLiquidationOrderStreamsRequest.md b/clients/derivatives-trading-usds-futures/docs/AllMarketLiquidationOrderStreamsRequest.md index 20469db31..287ecd28c 100644 --- a/clients/derivatives-trading-usds-futures/docs/AllMarketLiquidationOrderStreamsRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/AllMarketLiquidationOrderStreamsRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AllMarketLiquidationOrderStreamsResponse.md b/clients/derivatives-trading-usds-futures/docs/AllMarketLiquidationOrderStreamsResponse.md index 50e6ac6f1..6fe414818 100644 --- a/clients/derivatives-trading-usds-futures/docs/AllMarketLiquidationOrderStreamsResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/AllMarketLiquidationOrderStreamsResponse.md @@ -7,9 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event Type | [optional] | +|**E** | **Long** | Event Time | [optional] | |**oLowerCase** | [**AllMarketLiquidationOrderStreamsResponseO**](AllMarketLiquidationOrderStreamsResponseO.md) | | [optional] | +|**ps** | **String** | (After CM migration) Pair symbol | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AllMarketLiquidationOrderStreamsResponseO.md b/clients/derivatives-trading-usds-futures/docs/AllMarketLiquidationOrderStreamsResponseO.md index 1e8669c3b..c8919b319 100644 --- a/clients/derivatives-trading-usds-futures/docs/AllMarketLiquidationOrderStreamsResponseO.md +++ b/clients/derivatives-trading-usds-futures/docs/AllMarketLiquidationOrderStreamsResponseO.md @@ -2,22 +2,23 @@ # AllMarketLiquidationOrderStreamsResponseO +Order Type ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**S** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**ap** | **String** | | [optional] | -|**X** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**zLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**S** | **String** | Side | [optional] | +|**oLowerCase** | **String** | Order Type | [optional] | +|**fLowerCase** | **String** | Time in Force | [optional] | +|**qLowerCase** | **String** | Original Quantity | [optional] | +|**pLowerCase** | **String** | Price | [optional] | +|**ap** | **String** | Average Price | [optional] | +|**X** | **String** | Order Status | [optional] | +|**lLowerCase** | **String** | Order Last Filled Quantity | [optional] | +|**zLowerCase** | **String** | Order Filled Accumulated Quantity | [optional] | +|**T** | **Long** | Order Trade Time | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AllMarketMiniTickersStreamRequest.md b/clients/derivatives-trading-usds-futures/docs/AllMarketMiniTickersStreamRequest.md index 48ae4d418..566240090 100644 --- a/clients/derivatives-trading-usds-futures/docs/AllMarketMiniTickersStreamRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/AllMarketMiniTickersStreamRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AllMarketMiniTickersStreamResponseInner.md b/clients/derivatives-trading-usds-futures/docs/AllMarketMiniTickersStreamResponseInner.md index 00426ece1..7ddeb6e2f 100644 --- a/clients/derivatives-trading-usds-futures/docs/AllMarketMiniTickersStreamResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/AllMarketMiniTickersStreamResponseInner.md @@ -7,15 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**cLowerCase** | **String** | Close price | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | Total traded base asset volume | [optional] | +|**qLowerCase** | **String** | Total traded quote asset volume | [optional] | +|**ps** | **String** | (After CM migration) Pair symbol | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AllMarketTickersStreamsRequest.md b/clients/derivatives-trading-usds-futures/docs/AllMarketTickersStreamsRequest.md index b6879bca3..e69f511b2 100644 --- a/clients/derivatives-trading-usds-futures/docs/AllMarketTickersStreamsRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/AllMarketTickersStreamsRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AllMarketTickersStreamsResponseInner.md b/clients/derivatives-trading-usds-futures/docs/AllMarketTickersStreamsResponseInner.md index d40c719ed..6c488a8f2 100644 --- a/clients/derivatives-trading-usds-futures/docs/AllMarketTickersStreamsResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/AllMarketTickersStreamsResponseInner.md @@ -7,24 +7,26 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**wLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**O** | **Long** | | [optional] | -|**C** | **Long** | | [optional] | -|**F** | **Long** | | [optional] | -|**L** | **Long** | | [optional] | -|**nLowerCase** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**pLowerCase** | **String** | Price change | [optional] | +|**P** | **String** | Price change percent | [optional] | +|**wLowerCase** | **String** | Weighted average price | [optional] | +|**cLowerCase** | **String** | Last price | [optional] | +|**Q** | **String** | Last quantity | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | Total traded base asset volume | [optional] | +|**qLowerCase** | **String** | Total traded quote asset volume | [optional] | +|**O** | **Long** | Statistics open time | [optional] | +|**C** | **Long** | Statistics close time | [optional] | +|**F** | **Long** | First trade ID | [optional] | +|**L** | **Long** | Last trade Id | [optional] | +|**nLowerCase** | **Long** | Total number of trades | [optional] | +|**ps** | **String** | (After CM migration) Pair symbol | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AllOrdersResponseInner.md b/clients/derivatives-trading-usds-futures/docs/AllOrdersResponseInner.md index 5b8c05c8c..1d9fe9bcd 100644 --- a/clients/derivatives-trading-usds-futures/docs/AllOrdersResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/AllOrdersResponseInner.md @@ -7,32 +7,32 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgPrice** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**cumQuote** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**closePosition** | **Boolean** | | [optional] | -|**symbol** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**priceMatch** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | +|**avgPrice** | **String** | Avg Price. | [optional] | +|**clientOrderId** | **String** | Client Order Id. | [optional] | +|**cumQuote** | **String** | Cum Quote. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**orderId** | **Long** | Order Id. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**origType** | **String** | Orig Type. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | Position Side. | [optional] | +|**status** | **String** | Status. | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**closePosition** | **Boolean** | if Close-All | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**time** | **Long** | order time | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Type. | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**updateTime** | **Long** | update time | [optional] | +|**workingType** | **String** | Working Type. | [optional] | +|**priceProtect** | **Boolean** | if conditional order trigger is protected | [optional] | +|**priceMatch** | **String** | price match mode | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auot cancel time for TIF GTD order | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/AssetIndexRequest.md b/clients/derivatives-trading-usds-futures/docs/AssetIndexRequest.md new file mode 100644 index 000000000..375120fb4 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/AssetIndexRequest.md @@ -0,0 +1,13 @@ + + +# AssetIndexRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique WebSocket request ID. | [optional] | + + + diff --git a/clients/derivatives-trading-usds-futures/docs/AssetIndexResponse.md b/clients/derivatives-trading-usds-futures/docs/AssetIndexResponse.md new file mode 100644 index 000000000..4a24782b3 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/AssetIndexResponse.md @@ -0,0 +1,12 @@ + + +# AssetIndexResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-usds-futures/docs/AssetIndexResponse1.md b/clients/derivatives-trading-usds-futures/docs/AssetIndexResponse1.md new file mode 100644 index 000000000..8cee04f25 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/AssetIndexResponse1.md @@ -0,0 +1,23 @@ + + +# AssetIndexResponse1 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**symbol** | **String** | | [optional] | +|**time** | **Long** | | [optional] | +|**index** | **String** | | [optional] | +|**bidBuffer** | **String** | | [optional] | +|**askBuffer** | **String** | | [optional] | +|**bidRate** | **String** | | [optional] | +|**askRate** | **String** | | [optional] | +|**autoExchangeBidBuffer** | **String** | | [optional] | +|**autoExchangeAskBuffer** | **String** | | [optional] | +|**autoExchangeBidRate** | **String** | | [optional] | +|**autoExchangeAskRate** | **String** | | [optional] | + + + diff --git a/clients/derivatives-trading-usds-futures/docs/AssetIndexResponse2.md b/clients/derivatives-trading-usds-futures/docs/AssetIndexResponse2.md new file mode 100644 index 000000000..9df36eb51 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/AssetIndexResponse2.md @@ -0,0 +1,12 @@ + + +# AssetIndexResponse2 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-usds-futures/docs/AssetIndexResponse2Inner.md b/clients/derivatives-trading-usds-futures/docs/AssetIndexResponse2Inner.md new file mode 100644 index 000000000..d7b1f4b50 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/AssetIndexResponse2Inner.md @@ -0,0 +1,23 @@ + + +# AssetIndexResponse2Inner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**symbol** | **String** | | [optional] | +|**time** | **Long** | | [optional] | +|**index** | **String** | | [optional] | +|**bidBuffer** | **String** | | [optional] | +|**askBuffer** | **String** | | [optional] | +|**bidRate** | **String** | | [optional] | +|**askRate** | **String** | | [optional] | +|**autoExchangeBidBuffer** | **String** | | [optional] | +|**autoExchangeAskBuffer** | **String** | | [optional] | +|**autoExchangeBidRate** | **String** | | [optional] | +|**autoExchangeAskRate** | **String** | | [optional] | + + + diff --git a/clients/derivatives-trading-usds-futures/docs/AssetIndexResponseInner.md b/clients/derivatives-trading-usds-futures/docs/AssetIndexResponseInner.md new file mode 100644 index 000000000..9304ed571 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/AssetIndexResponseInner.md @@ -0,0 +1,24 @@ + + +# AssetIndexResponseInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eLowerCase** | **String** | Event type. | [optional] | +|**E** | **Long** | Event time. | [optional] | +|**sLowerCase** | **String** | Asset index symbol. | [optional] | +|**iLowerCase** | **String** | Index price. | [optional] | +|**bLowerCase** | **String** | Bid buffer. | [optional] | +|**aLowerCase** | **String** | Ask buffer. | [optional] | +|**B** | **String** | Bid rate. | [optional] | +|**A** | **String** | Ask rate. | [optional] | +|**qLowerCase** | **String** | Auto exchange bid buffer. | [optional] | +|**gLowerCase** | **String** | Auto exchange ask buffer. | [optional] | +|**Q** | **String** | Auto exchange bid rate. | [optional] | +|**G** | **String** | Auto exchange ask rate. | [optional] | + + + diff --git a/clients/derivatives-trading-usds-futures/docs/AutoCancelAllOpenOrdersRequest.md b/clients/derivatives-trading-usds-futures/docs/AutoCancelAllOpenOrdersRequest.md index 0f5049ab4..6bdbf553a 100644 --- a/clients/derivatives-trading-usds-futures/docs/AutoCancelAllOpenOrdersRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/AutoCancelAllOpenOrdersRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**countdownTime** | **Long** | | | +|**countdownTime** | **Long** | Countdown in milliseconds. `1000` means 1 second; `0` disables countdown cancel-all. | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/BatchOrders.md b/clients/derivatives-trading-usds-futures/docs/BatchOrders.md index 480679d28..a3c432630 100644 --- a/clients/derivatives-trading-usds-futures/docs/BatchOrders.md +++ b/clients/derivatives-trading-usds-futures/docs/BatchOrders.md @@ -2,6 +2,7 @@ # BatchOrders +order list. Max 5 orders ## Properties diff --git a/clients/derivatives-trading-usds-futures/docs/BatchOrdersInner.md b/clients/derivatives-trading-usds-futures/docs/BatchOrdersInner.md index 224db3852..2ceb37d18 100644 --- a/clients/derivatives-trading-usds-futures/docs/BatchOrdersInner.md +++ b/clients/derivatives-trading-usds-futures/docs/BatchOrdersInner.md @@ -7,15 +7,19 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderId** | **String** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | |**symbol** | **String** | | [optional] | |**side** | [**SideEnum**](#SideEnum) | | [optional] | -|**quantity** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**priceMatch** | [**PriceMatchEnum**](#PriceMatchEnum) | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**recvWindow** | **String** | | [optional] | +|**positionSide** | [**PositionSideEnum**](#PositionSideEnum) | Default `BOTH` for One-way Mode; `LONG` or `SHORT` for Hedge Mode. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**timeInForce** | [**TimeInForceEnum**](#TimeInForceEnum) | | [optional] | +|**quantity** | **Double** | | [optional] | +|**reduceOnly** | [**ReduceOnlyEnum**](#ReduceOnlyEnum) | | [optional] | +|**price** | **Double** | | [optional] | +|**newClientOrderId** | **String** | | [optional] | +|**newOrderRespType** | [**NewOrderRespTypeEnum**](#NewOrderRespTypeEnum) | | [optional] | +|**priceMatch** | [**PriceMatchEnum**](#PriceMatchEnum) | only avaliable for LIMIT/STOP/TAKE_PROFIT order; Can'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] | +|**goodTillDate** | **Long** | Auto-cancel time for `GTD` orders. | [optional] | @@ -28,11 +32,65 @@ +## Enum: PositionSideEnum + +| Name | Value | +|---- | -----| +| BOTH | "BOTH" | +| LONG | "LONG" | +| SHORT | "SHORT" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIMIT | "LIMIT" | +| MARKET | "MARKET" | +| STOP | "STOP" | +| STOP_MARKET | "STOP_MARKET" | +| TAKE_PROFIT | "TAKE_PROFIT" | +| TAKE_PROFIT_MARKET | "TAKE_PROFIT_MARKET" | +| TRAILING_STOP_MARKET | "TRAILING_STOP_MARKET" | + + + +## Enum: TimeInForceEnum + +| Name | Value | +|---- | -----| +| GTC | "GTC" | +| IOC | "IOC" | +| FOK | "FOK" | +| GTX | "GTX" | +| GTD | "GTD" | +| RPI | "RPI" | + + + +## Enum: ReduceOnlyEnum + +| Name | Value | +|---- | -----| +| TRUE | "true" | +| FALSE | "false" | + + + +## Enum: NewOrderRespTypeEnum + +| Name | Value | +|---- | -----| +| ACK | "ACK" | +| RESULT | "RESULT" | + + + ## Enum: PriceMatchEnum | Name | Value | |---- | -----| -| NONE | "NONE" | | OPPONENT | "OPPONENT" | | OPPONENT_5 | "OPPONENT_5" | | OPPONENT_10 | "OPPONENT_10" | @@ -44,3 +102,14 @@ +## Enum: SelfTradePreventionModeEnum + +| Name | Value | +|---- | -----| +| NONE | "NONE" | +| EXPIRE_TAKER | "EXPIRE_TAKER" | +| EXPIRE_BOTH | "EXPIRE_BOTH" | +| EXPIRE_MAKER | "EXPIRE_MAKER" | + + + diff --git a/clients/derivatives-trading-usds-futures/docs/BatchOrdersPlaceMultipleOrders.md b/clients/derivatives-trading-usds-futures/docs/BatchOrdersPlaceMultipleOrders.md deleted file mode 100644 index d41e556fc..000000000 --- a/clients/derivatives-trading-usds-futures/docs/BatchOrdersPlaceMultipleOrders.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# BatchOrdersPlaceMultipleOrders - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/BatchOrdersPlaceMultipleOrdersInner.md b/clients/derivatives-trading-usds-futures/docs/BatchOrdersPlaceMultipleOrdersInner.md deleted file mode 100644 index 72b2f208c..000000000 --- a/clients/derivatives-trading-usds-futures/docs/BatchOrdersPlaceMultipleOrdersInner.md +++ /dev/null @@ -1,92 +0,0 @@ - - -# BatchOrdersPlaceMultipleOrdersInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**side** | [**SideEnum**](#SideEnum) | | [optional] | -|**positionSide** | [**PositionSideEnum**](#PositionSideEnum) | | [optional] | -|**type** | **String** | | [optional] | -|**timeInForce** | [**TimeInForceEnum**](#TimeInForceEnum) | | [optional] | -|**quantity** | **String** | | [optional] | -|**reduceOnly** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**newClientOrderId** | **String** | | [optional] | -|**newOrderRespType** | [**NewOrderRespTypeEnum**](#NewOrderRespTypeEnum) | | [optional] | -|**priceMatch** | [**PriceMatchEnum**](#PriceMatchEnum) | | [optional] | -|**selfTradePreventionMode** | [**SelfTradePreventionModeEnum**](#SelfTradePreventionModeEnum) | | [optional] | -|**goodTillDate** | **String** | | [optional] | - - - -## Enum: SideEnum - -| Name | Value | -|---- | -----| -| BUY | "BUY" | -| SELL | "SELL" | - - - -## Enum: PositionSideEnum - -| Name | Value | -|---- | -----| -| BOTH | "BOTH" | -| LONG | "LONG" | -| SHORT | "SHORT" | - - - -## Enum: TimeInForceEnum - -| Name | Value | -|---- | -----| -| GTC | "GTC" | -| IOC | "IOC" | -| FOK | "FOK" | -| GTX | "GTX" | -| GTD | "GTD" | -| RPI | "RPI" | - - - -## Enum: NewOrderRespTypeEnum - -| Name | Value | -|---- | -----| -| ACK | "ACK" | -| RESULT | "RESULT" | - - - -## Enum: PriceMatchEnum - -| Name | Value | -|---- | -----| -| NONE | "NONE" | -| OPPONENT | "OPPONENT" | -| OPPONENT_5 | "OPPONENT_5" | -| OPPONENT_10 | "OPPONENT_10" | -| OPPONENT_20 | "OPPONENT_20" | -| QUEUE | "QUEUE" | -| QUEUE_5 | "QUEUE_5" | -| QUEUE_10 | "QUEUE_10" | -| QUEUE_20 | "QUEUE_20" | - - - -## Enum: SelfTradePreventionModeEnum - -| Name | Value | -|---- | -----| -| EXPIRE_TAKER | "EXPIRE_TAKER" | -| EXPIRE_BOTH | "EXPIRE_BOTH" | -| EXPIRE_MAKER | "EXPIRE_MAKER" | - - - diff --git a/clients/derivatives-trading-usds-futures/docs/CancelAlgoOrderRequest.md b/clients/derivatives-trading-usds-futures/docs/CancelAlgoOrderRequest.md index 2a806749d..2be9dc7c2 100644 --- a/clients/derivatives-trading-usds-futures/docs/CancelAlgoOrderRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/CancelAlgoOrderRequest.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**algoId** | **Long** | | [optional] | -|**clientAlgoId** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**id** | **String** | Id. | [optional] | +|**algoId** | **Long** | Algo Id. | [optional] | +|**clientAlgoId** | **String** | Client Algo Id. | [optional] | +|**recvWindow** | **Long** | Recv Window. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/CancelMultipleOrdersResponseInner.md b/clients/derivatives-trading-usds-futures/docs/CancelMultipleOrdersResponseInner.md index dfdcbca35..9ec938733 100644 --- a/clients/derivatives-trading-usds-futures/docs/CancelMultipleOrdersResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/CancelMultipleOrdersResponseInner.md @@ -7,31 +7,30 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**clientOrderId** | **String** | | [optional] | +|**clientOrderId** | **String** | Client Order Id. | [optional] | |**cumQty** | **String** | | [optional] | -|**cumQuote** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**closePosition** | **Boolean** | | [optional] | -|**symbol** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**priceMatch** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**orderId** | **Long** | Order Id. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | Position Side. | [optional] | +|**status** | **String** | Status. | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**closePosition** | **Boolean** | if Close-All | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**origType** | **String** | Orig Type. | [optional] | +|**type** | **String** | Type. | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**updateTime** | **Long** | Update Time. | [optional] | +|**workingType** | **String** | Working Type. | [optional] | +|**priceProtect** | **Boolean** | if conditional order trigger is protected | [optional] | +|**priceMatch** | **String** | price match mode | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auot cancel time for TIF GTD order | [optional] | |**code** | **Long** | | [optional] | |**msg** | **String** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/CancelOrderRequest.md b/clients/derivatives-trading-usds-futures/docs/CancelOrderRequest.md index b51f3fc61..65eb07e4c 100644 --- a/clients/derivatives-trading-usds-futures/docs/CancelOrderRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/CancelOrderRequest.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | -|**orderId** | **Long** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**id** | **String** | Id. | [optional] | +|**symbol** | **String** | Symbol. | | +|**orderId** | **Long** | Order Id. | [optional] | +|**origClientOrderId** | **String** | Orig Client Order Id. | [optional] | +|**recvWindow** | **Long** | Recv Window. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/CancelOrderResponseResult.md b/clients/derivatives-trading-usds-futures/docs/CancelOrderResponseResult.md index 7644dc5a2..222f97231 100644 --- a/clients/derivatives-trading-usds-futures/docs/CancelOrderResponseResult.md +++ b/clients/derivatives-trading-usds-futures/docs/CancelOrderResponseResult.md @@ -9,7 +9,6 @@ |------------ | ------------- | ------------- | -------------| |**clientOrderId** | **String** | | [optional] | |**cumQty** | **String** | | [optional] | -|**cumQuote** | **String** | | [optional] | |**executedQty** | **String** | | [optional] | |**orderId** | **Long** | | [optional] | |**origQty** | **String** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ChangeInitialLeverageRequest.md b/clients/derivatives-trading-usds-futures/docs/ChangeInitialLeverageRequest.md index 259567e9f..540455209 100644 --- a/clients/derivatives-trading-usds-futures/docs/ChangeInitialLeverageRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/ChangeInitialLeverageRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**leverage** | **Long** | | | +|**leverage** | **Long** | target initial leverage | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ChangeInitialLeverageResponse.md b/clients/derivatives-trading-usds-futures/docs/ChangeInitialLeverageResponse.md index 89febe2e7..9b106980d 100644 --- a/clients/derivatives-trading-usds-futures/docs/ChangeInitialLeverageResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/ChangeInitialLeverageResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**leverage** | **Long** | | [optional] | -|**maxNotionalValue** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | +|**leverage** | **Long** | Leverage. | [optional] | +|**maxNotionalValue** | **String** | Max Notional Value. | [optional] | +|**symbol** | **String** | Symbol. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ChangeMultiAssetsModeRequest.md b/clients/derivatives-trading-usds-futures/docs/ChangeMultiAssetsModeRequest.md index 1a90c0901..acafb44e5 100644 --- a/clients/derivatives-trading-usds-futures/docs/ChangeMultiAssetsModeRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/ChangeMultiAssetsModeRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**multiAssetsMargin** | **String** | | | +|**multiAssetsMargin** | **String** | \"true\": Multi-Assets Mode; \"false\": Single-Asset Mode | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ChangePositionModeRequest.md b/clients/derivatives-trading-usds-futures/docs/ChangePositionModeRequest.md index 8697d7ca6..b54d8d6a3 100644 --- a/clients/derivatives-trading-usds-futures/docs/ChangePositionModeRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/ChangePositionModeRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**dualSidePosition** | **String** | | | +|**dualSidePosition** | **String** | \"true\": Hedge Mode; \"false\": One-way Mode | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/CheckServerTimeResponse.md b/clients/derivatives-trading-usds-futures/docs/CheckServerTimeResponse.md index 19c4361d1..8a2d76e2d 100644 --- a/clients/derivatives-trading-usds-futures/docs/CheckServerTimeResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/CheckServerTimeResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**serverTime** | **Long** | | [optional] | +|**serverTime** | **Long** | Server Time. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ClassicPortfolioMarginAccountInformationResponse.md b/clients/derivatives-trading-usds-futures/docs/ClassicPortfolioMarginAccountInformationResponse.md index 5834e221c..16dffe119 100644 --- a/clients/derivatives-trading-usds-futures/docs/ClassicPortfolioMarginAccountInformationResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/ClassicPortfolioMarginAccountInformationResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**maxWithdrawAmountUSD** | **String** | | [optional] | +|**maxWithdrawAmountUSD** | **String** | Classic Portfolio margin maximum virtual amount for transfer out in USD | [optional] | |**asset** | **String** | | [optional] | -|**maxWithdrawAmount** | **String** | | [optional] | +|**maxWithdrawAmount** | **String** | maximum amount for transfer out | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ClosePosition.md b/clients/derivatives-trading-usds-futures/docs/ClosePosition.md new file mode 100644 index 000000000..733d33a1b --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/ClosePosition.md @@ -0,0 +1,13 @@ + + +# ClosePosition + +## Enum + + +* `TRUE` (value: `"true"`) + +* `FALSE` (value: `"false"`) + + + diff --git a/clients/derivatives-trading-usds-futures/docs/CloseUserDataStreamRequest.md b/clients/derivatives-trading-usds-futures/docs/CloseUserDataStreamRequest.md index 48b69c187..25e9afe94 100644 --- a/clients/derivatives-trading-usds-futures/docs/CloseUserDataStreamRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/CloseUserDataStreamRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | +|**id** | **String** | Id. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationResponseInner.md b/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationResponseInner.md index 511e331e4..1ffe0cd07 100644 --- a/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationResponseInner.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**component** | **String** | | [optional] | +|**time** | **Long** | Current time | [optional] | +|**component** | **String** | Component asset | [optional] | |**baseAssetList** | [**List<CompositeIndexSymbolInformationResponseInnerBaseAssetListInner>**](CompositeIndexSymbolInformationResponseInnerBaseAssetListInner.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationResponseInnerBaseAssetListInner.md b/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationResponseInnerBaseAssetListInner.md index d4a95c341..1ac811bf0 100644 --- a/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationResponseInnerBaseAssetListInner.md +++ b/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationResponseInnerBaseAssetListInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**baseAsset** | **String** | | [optional] | -|**quoteAsset** | **String** | | [optional] | -|**weightInQuantity** | **String** | | [optional] | -|**weightInPercentage** | **String** | | [optional] | +|**baseAsset** | **String** | Base Asset. | [optional] | +|**quoteAsset** | **String** | Quote Asset. | [optional] | +|**weightInQuantity** | **String** | Weight In Quantity. | [optional] | +|**weightInPercentage** | **String** | Weight In Percentage. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationStreamsRequest.md b/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationStreamsRequest.md index cd566353b..499898212 100644 --- a/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationStreamsRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationStreamsRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationStreamsResponse.md b/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationStreamsResponse.md index 8a92c1427..39976bd38 100644 --- a/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationStreamsResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationStreamsResponse.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**C** | **String** | | [optional] | -|**cLowerCase** | [**List<CompositeIndexSymbolInformationStreamsResponseCInner>**](CompositeIndexSymbolInformationStreamsResponseCInner.md) | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**pLowerCase** | **String** | Price | [optional] | +|**C** | **String** | Base asset category. | [optional] | +|**cLowerCase** | [**List<CompositeIndexSymbolInformationStreamsResponseCInner>**](CompositeIndexSymbolInformationStreamsResponseCInner.md) | Composition | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationStreamsResponseCInner.md b/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationStreamsResponseCInner.md index a5597fd85..780c9f4d8 100644 --- a/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationStreamsResponseCInner.md +++ b/clients/derivatives-trading-usds-futures/docs/CompositeIndexSymbolInformationStreamsResponseCInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**bLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**wLowerCase** | **String** | | [optional] | -|**W** | **String** | | [optional] | -|**iLowerCase** | **String** | | [optional] | +|**bLowerCase** | **String** | Base asset | [optional] | +|**qLowerCase** | **String** | Quote asset | [optional] | +|**wLowerCase** | **String** | Weight in quantity | [optional] | +|**W** | **String** | Weight in percentage | [optional] | +|**iLowerCase** | **String** | Index price | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/CompressedAggregateTradesListResponseInner.md b/clients/derivatives-trading-usds-futures/docs/CompressedAggregateTradesListResponseInner.md index f47e75fcd..ffb8f76e6 100644 --- a/clients/derivatives-trading-usds-futures/docs/CompressedAggregateTradesListResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/CompressedAggregateTradesListResponseInner.md @@ -7,13 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**aLowerCase** | **Long** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**fLowerCase** | **Long** | | [optional] | -|**lLowerCase** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | +|**aLowerCase** | **Long** | Aggregate tradeId | [optional] | +|**pLowerCase** | **String** | Price | [optional] | +|**qLowerCase** | **String** | Quantity | [optional] | +|**nq** | **String** | Normal quantity without the trades involving RPI orders | [optional] | +|**fLowerCase** | **Long** | First tradeId | [optional] | +|**lLowerCase** | **Long** | Last tradeId | [optional] | +|**T** | **Long** | Timestamp | [optional] | +|**mLowerCase** | **Boolean** | Was the buyer the maker? | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ConditionalOrderTriggerReject.md b/clients/derivatives-trading-usds-futures/docs/ConditionalOrderTriggerReject.md index fa0130269..de8dc4ad3 100644 --- a/clients/derivatives-trading-usds-futures/docs/ConditionalOrderTriggerReject.md +++ b/clients/derivatives-trading-usds-futures/docs/ConditionalOrderTriggerReject.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Message send time | [optional] | |**or** | [**ConditionalOrderTriggerRejectOr**](ConditionalOrderTriggerRejectOr.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ConditionalOrderTriggerRejectOr.md b/clients/derivatives-trading-usds-futures/docs/ConditionalOrderTriggerRejectOr.md index 07534caa8..61d3fe3a0 100644 --- a/clients/derivatives-trading-usds-futures/docs/ConditionalOrderTriggerRejectOr.md +++ b/clients/derivatives-trading-usds-futures/docs/ConditionalOrderTriggerRejectOr.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**iLowerCase** | **Long** | | [optional] | -|**rLowerCase** | **String** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**iLowerCase** | **Long** | Order Id | [optional] | +|**rLowerCase** | **String** | Reject Reason | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickDataItem.md b/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickDataItem.md new file mode 100644 index 000000000..3e480a78d --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickDataItem.md @@ -0,0 +1,12 @@ + + +# ContinuousContractKlineCandlestickDataItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickDataItemInner.md b/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickDataItemInner.md new file mode 100644 index 000000000..7dc34b4c6 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickDataItemInner.md @@ -0,0 +1,12 @@ + + +# ContinuousContractKlineCandlestickDataItemInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickDataResponseItem.md b/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickDataResponseItem.md deleted file mode 100644 index 5030fbf08..000000000 --- a/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickDataResponseItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# ContinuousContractKlineCandlestickDataResponseItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickDataResponseItemInner.md b/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickDataResponseItemInner.md deleted file mode 100644 index db6bd383b..000000000 --- a/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickDataResponseItemInner.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# ContinuousContractKlineCandlestickDataResponseItemInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickStreamsRequest.md b/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickStreamsRequest.md index 25d1e9ee5..dd0577a77 100644 --- a/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickStreamsRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickStreamsRequest.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**pair** | **String** | | | -|**contractType** | **String** | | | -|**interval** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**pair** | **String** | | [optional] | +|**contractType** | **ContractType** | | [optional] | +|**interval** | **Interval** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickStreamsResponse.md b/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickStreamsResponse.md index 4c963a2ef..b4da042ac 100644 --- a/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickStreamsResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickStreamsResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**ps** | **String** | | [optional] | -|**ct** | **String** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**ps** | **String** | Pair | [optional] | +|**ct** | **String** | Contract type | [optional] | |**kLowerCase** | [**ContinuousContractKlineCandlestickStreamsResponseK**](ContinuousContractKlineCandlestickStreamsResponseK.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickStreamsResponseK.md b/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickStreamsResponseK.md index 2dbe619bd..17d01a7da 100644 --- a/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickStreamsResponseK.md +++ b/clients/derivatives-trading-usds-futures/docs/ContinuousContractKlineCandlestickStreamsResponseK.md @@ -2,27 +2,28 @@ # ContinuousContractKlineCandlestickStreamsResponseK +Kline payload. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tLowerCase** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**fLowerCase** | **Long** | | [optional] | -|**L** | **Long** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**nLowerCase** | **Long** | | [optional] | -|**xLowerCase** | **Boolean** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**V** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**B** | **String** | | [optional] | +|**tLowerCase** | **Long** | Kline start time | [optional] | +|**T** | **Long** | Kline close time | [optional] | +|**iLowerCase** | **String** | Interval | [optional] | +|**fLowerCase** | **Long** | First updateId | [optional] | +|**L** | **Long** | Last updateId | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**cLowerCase** | **String** | Close price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | volume | [optional] | +|**nLowerCase** | **Long** | Number of trades | [optional] | +|**xLowerCase** | **Boolean** | Is this kline closed? | [optional] | +|**qLowerCase** | **String** | Quote asset volume | [optional] | +|**V** | **String** | Taker buy volume | [optional] | +|**Q** | **String** | Taker buy quote asset volume | [optional] | +|**B** | **String** | Ignore | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ContractInfoStreamRequest.md b/clients/derivatives-trading-usds-futures/docs/ContractInfoStreamRequest.md index 035a6cc65..b7309a2a9 100644 --- a/clients/derivatives-trading-usds-futures/docs/ContractInfoStreamRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/ContractInfoStreamRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ContractInfoStreamResponse.md b/clients/derivatives-trading-usds-futures/docs/ContractInfoStreamResponse.md index fa886e353..550f99687 100644 --- a/clients/derivatives-trading-usds-futures/docs/ContractInfoStreamResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/ContractInfoStreamResponse.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**ct** | **String** | | [optional] | -|**dt** | **Long** | | [optional] | -|**ot** | **Long** | | [optional] | -|**cs** | **String** | | [optional] | -|**bks** | [**List<ContractInfoStreamResponseBksInner>**](ContractInfoStreamResponseBksInner.md) | | [optional] | +|**eLowerCase** | **String** | Event type. | [optional] | +|**E** | **Long** | Event time. | [optional] | +|**sLowerCase** | **String** | Symbol. | [optional] | +|**ct** | **String** | Contract type. | [optional] | +|**dt** | **Long** | Delivery date time. | [optional] | +|**ot** | **Long** | Onboard date time. | [optional] | +|**cs** | **String** | Contract status. | [optional] | +|**bks** | [**List<ContractInfoStreamResponseBksInner>**](ContractInfoStreamResponseBksInner.md) | Notional bracket updates. | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ContractInfoStreamResponseBksInner.md b/clients/derivatives-trading-usds-futures/docs/ContractInfoStreamResponseBksInner.md index b08b0e2ad..05b17cda6 100644 --- a/clients/derivatives-trading-usds-futures/docs/ContractInfoStreamResponseBksInner.md +++ b/clients/derivatives-trading-usds-futures/docs/ContractInfoStreamResponseBksInner.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**bs** | **Long** | | [optional] | -|**bnf** | **Long** | | [optional] | -|**bnc** | **Long** | | [optional] | -|**mmr** | **Double** | | [optional] | -|**cf** | **Long** | | [optional] | -|**mi** | **Long** | | [optional] | -|**ma** | **Long** | | [optional] | +|**bs** | **Long** | Notional bracket | [optional] | +|**bnf** | **Long** | Floor notional of this bracket | [optional] | +|**bnc** | **Long** | Cap notional of this bracket | [optional] | +|**mmr** | **Double** | Maintenance ratio for this bracket | [optional] | +|**cf** | **Long** | Auxiliary number for quick calculation | [optional] | +|**mi** | **Long** | Min leverage for this bracket | [optional] | +|**ma** | **Long** | Max leverage for this bracket | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ContractType.md b/clients/derivatives-trading-usds-futures/docs/ContractType.md index 24ae6f9b2..5e294cbd6 100644 --- a/clients/derivatives-trading-usds-futures/docs/ContractType.md +++ b/clients/derivatives-trading-usds-futures/docs/ContractType.md @@ -5,17 +5,13 @@ ## Enum -* `PERPETUAL` (value: `"PERPETUAL"`) +* `perpetual` (value: `"perpetual"`) -* `CURRENT_MONTH` (value: `"CURRENT_MONTH"`) +* `current_quarter` (value: `"current_quarter"`) -* `NEXT_MONTH` (value: `"NEXT_MONTH"`) +* `next_quarter` (value: `"next_quarter"`) -* `CURRENT_QUARTER` (value: `"CURRENT_QUARTER"`) - -* `NEXT_QUARTER` (value: `"NEXT_QUARTER"`) - -* `PERPETUAL_DELIVERING` (value: `"PERPETUAL_DELIVERING"`) +* `tradifi_perpetual` (value: `"tradifi_perpetual"`) diff --git a/clients/derivatives-trading-usds-futures/docs/ConvertApi.md b/clients/derivatives-trading-usds-futures/docs/ConvertApi.md index a2b256b8e..c41d0dc3c 100644 --- a/clients/derivatives-trading-usds-futures/docs/ConvertApi.md +++ b/clients/derivatives-trading-usds-futures/docs/ConvertApi.md @@ -6,8 +6,8 @@ All URIs are relative to *https://fapi.binance.com* |------------- | ------------- | -------------| | [**acceptTheOfferedQuote**](ConvertApi.md#acceptTheOfferedQuote) | **POST** /fapi/v1/convert/acceptQuote | Accept the offered quote (USER_DATA) | | [**listAllConvertPairs**](ConvertApi.md#listAllConvertPairs) | **GET** /fapi/v1/convert/exchangeInfo | List All Convert Pairs | -| [**orderStatus**](ConvertApi.md#orderStatus) | **GET** /fapi/v1/convert/orderStatus | Order status(USER_DATA) | -| [**sendQuoteRequest**](ConvertApi.md#sendQuoteRequest) | **POST** /fapi/v1/convert/getQuote | Send Quote Request(USER_DATA) | +| [**orderStatus**](ConvertApi.md#orderStatus) | **GET** /fapi/v1/convert/orderStatus | Order status (USER_DATA) | +| [**sendQuoteRequest**](ConvertApi.md#sendQuoteRequest) | **POST** /fapi/v1/convert/getQuote | Send Quote Request (USER_DATA) | @@ -16,7 +16,7 @@ All URIs are relative to *https://fapi.binance.com* Accept the offered quote (USER_DATA) -Accept the offered quote by quote ID. Weight: 200(IP) +Accept the offered quote by quote ID. Weight(IP): 200 Security Type: USER_DATA ### Example ```java @@ -78,7 +78,7 @@ No authorization required List All Convert Pairs -Query for all convertible token pairs and the tokens’ respective upper/lower limits * User needs to supply either or both of the input parameter * If not defined for both fromAsset and toAsset, only partial token pairs will be returned * Asset BNFCR is only available to convert for MICA region users. Weight: 20(IP) +Query for all convertible token pairs and the tokens’ respective upper/lower limits Weight(IP): 20 Notes: - User needs to supply either or both of the input parameter - If not defined for both fromAsset and toAsset, only partial token pairs will be returned - Asset BNFCR is only available to convert for MICA region users. ### Example ```java @@ -95,8 +95,8 @@ public class Example { defaultClient.setBasePath("https://fapi.binance.com"); ConvertApi apiInstance = new ConvertApi(defaultClient); - String fromAsset = "fromAsset_example"; // String | User spends coin - String toAsset = "toAsset_example"; // String | User receives coin + String fromAsset = "BTC"; // String | User spends coin + String toAsset = "USDT"; // String | User receives coin try { ListAllConvertPairsResponse result = apiInstance.listAllConvertPairs(fromAsset, toAsset); System.out.println(result); @@ -140,9 +140,9 @@ No authorization required # **orderStatus** > OrderStatusResponse orderStatus(orderId, quoteId) -Order status(USER_DATA) +Order status (USER_DATA) -Query order status by order ID. Weight: 50(IP) +Query order status by order ID. Weight(IP): 50 Security Type: USER_DATA ### Example ```java @@ -159,8 +159,8 @@ public class Example { defaultClient.setBasePath("https://fapi.binance.com"); ConvertApi apiInstance = new ConvertApi(defaultClient); - Long orderId = 56L; // Long | Either orderId or quoteId is required - String quoteId = "quoteId_example"; // String | Either orderId or quoteId is required + String orderId = "933256278426274400"; // String | Either orderId or quoteId is required + String quoteId = "1"; // String | Either orderId or quoteId is required try { OrderStatusResponse result = apiInstance.orderStatus(orderId, quoteId); System.out.println(result); @@ -179,7 +179,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **orderId** | **Long**| Either orderId or quoteId is required | [optional] | +| **orderId** | **String**| Either orderId or quoteId is required | [optional] | | **quoteId** | **String**| Either orderId or quoteId is required | [optional] | ### Return type @@ -204,9 +204,9 @@ No authorization required # **sendQuoteRequest** > SendQuoteRequestResponse sendQuoteRequest(sendQuoteRequestRequest) -Send Quote Request(USER_DATA) +Send Quote Request (USER_DATA) -Request a quote for the requested token pairs * Either fromAmount or toAmount should be sent * `quoteId` will be returned only if you have enough funds to convert Weight: 50(IP) +Request a quote for the requested token pairs Weight: 50(IP) 360/hour, 500/day Security Type: USER_DATA Notes: - Either fromAmount or toAmount should be sent - `quoteId` will be returned only if you have enough funds to convert ### Example ```java diff --git a/clients/derivatives-trading-usds-futures/docs/DiffBookDepthStreamsRequest.md b/clients/derivatives-trading-usds-futures/docs/DiffBookDepthStreamsRequest.md index 9b25eb2d8..675f2b356 100644 --- a/clients/derivatives-trading-usds-futures/docs/DiffBookDepthStreamsRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/DiffBookDepthStreamsRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | -|**updateSpeed** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Trading pair symbol. | [optional] | +|**updateSpeed** | **UpdateSpeed** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/DiffBookDepthStreamsResponse.md b/clients/derivatives-trading-usds-futures/docs/DiffBookDepthStreamsResponse.md index 47c64c8c0..2d40577cc 100644 --- a/clients/derivatives-trading-usds-futures/docs/DiffBookDepthStreamsResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/DiffBookDepthStreamsResponse.md @@ -7,15 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**U** | **Long** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**pu** | **Long** | | [optional] | -|**bLowerCase** | **List<DiffBookDepthStreamsResponseBItem>** | | [optional] | -|**aLowerCase** | **List<DiffBookDepthStreamsResponseAItem>** | | [optional] | +|**eLowerCase** | **String** | Event type. | [optional] | +|**E** | **Long** | Event time. | [optional] | +|**T** | **Long** | Transaction time. | [optional] | +|**sLowerCase** | **String** | Symbol. | [optional] | +|**U** | **Long** | First update ID in the event. | [optional] | +|**uLowerCase** | **Long** | Final update ID in the event. | [optional] | +|**pu** | **Long** | Final update ID in the previous stream event. | [optional] | +|**bLowerCase** | **List<List<String>>** | Bid updates. | [optional] | +|**aLowerCase** | **List<List<String>>** | Ask updates. | [optional] | +|**ps** | **String** | (After CM migration) Pair symbol | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/DiffBookDepthStreamsResponseAItem.md b/clients/derivatives-trading-usds-futures/docs/DiffBookDepthStreamsResponseAItem.md deleted file mode 100644 index e95d11d71..000000000 --- a/clients/derivatives-trading-usds-futures/docs/DiffBookDepthStreamsResponseAItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# DiffBookDepthStreamsResponseAItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/DiffBookDepthStreamsResponseBItem.md b/clients/derivatives-trading-usds-futures/docs/DiffBookDepthStreamsResponseBItem.md deleted file mode 100644 index dce623f51..000000000 --- a/clients/derivatives-trading-usds-futures/docs/DiffBookDepthStreamsResponseBItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# DiffBookDepthStreamsResponseBItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponse.md b/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponse.md index 0a798cdd5..4e2471552 100644 --- a/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponse.md @@ -8,11 +8,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**exchangeFilters** | **List<String>** | | [optional] | -|**rateLimits** | [**List<ExchangeInformationResponseRateLimitsInner>**](ExchangeInformationResponseRateLimitsInner.md) | | [optional] | -|**serverTime** | **Long** | | [optional] | -|**assets** | [**List<ExchangeInformationResponseAssetsInner>**](ExchangeInformationResponseAssetsInner.md) | | [optional] | -|**symbols** | [**List<ExchangeInformationResponseSymbolsInner>**](ExchangeInformationResponseSymbolsInner.md) | | [optional] | -|**timezone** | **String** | | [optional] | +|**rateLimits** | [**List<ExchangeInformationResponseRateLimitsInner>**](ExchangeInformationResponseRateLimitsInner.md) | Rate Limits. | [optional] | +|**serverTime** | **Long** | Ignore please. If you want to check current server time, please check via \"GET /fapi/v1/time\" | [optional] | +|**assets** | [**List<ExchangeInformationResponseAssetsInner>**](ExchangeInformationResponseAssetsInner.md) | assets information | [optional] | +|**symbols** | [**List<ExchangeInformationResponseSymbolsInner>**](ExchangeInformationResponseSymbolsInner.md) | Symbols. | [optional] | +|**timezone** | **String** | Timezone. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponseAssetsInner.md b/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponseAssetsInner.md index a0c1878f1..e4a609122 100644 --- a/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponseAssetsInner.md +++ b/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponseAssetsInner.md @@ -2,14 +2,15 @@ # ExchangeInformationResponseAssetsInner +assets information ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**asset** | **String** | | [optional] | -|**marginAvailable** | **Boolean** | | [optional] | -|**autoAssetExchange** | **String** | | [optional] | +|**marginAvailable** | **Boolean** | whether the asset can be used as margin in Multi-Assets mode | [optional] | +|**autoAssetExchange** | **String** | auto-exchange threshold in Multi-Assets margin mode | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponseRateLimitsInner.md b/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponseRateLimitsInner.md index ef75b5b38..75d45bc7a 100644 --- a/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponseRateLimitsInner.md +++ b/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponseRateLimitsInner.md @@ -2,15 +2,16 @@ # ExchangeInformationResponseRateLimitsInner +API ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**interval** | **String** | | [optional] | -|**intervalNum** | **Long** | | [optional] | -|**limit** | **Long** | | [optional] | -|**rateLimitType** | **String** | | [optional] | +|**interval** | **String** | Interval. | [optional] | +|**intervalNum** | **Long** | Interval Num. | [optional] | +|**limit** | **Long** | Limit. | [optional] | +|**rateLimitType** | **String** | Rate Limit Type. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponseSymbolsInner.md b/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponseSymbolsInner.md index 88a6811c2..aad704899 100644 --- a/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponseSymbolsInner.md +++ b/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponseSymbolsInner.md @@ -2,35 +2,36 @@ # ExchangeInformationResponseSymbolsInner +symbols. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**pair** | **String** | | [optional] | -|**contractType** | **String** | | [optional] | -|**deliveryDate** | **Long** | | [optional] | -|**onboardDate** | **Long** | | [optional] | -|**status** | **String** | | [optional] | -|**maintMarginPercent** | **String** | | [optional] | -|**requiredMarginPercent** | **String** | | [optional] | -|**baseAsset** | **String** | | [optional] | -|**quoteAsset** | **String** | | [optional] | -|**marginAsset** | **String** | | [optional] | -|**pricePrecision** | **Long** | | [optional] | -|**quantityPrecision** | **Long** | | [optional] | -|**baseAssetPrecision** | **Long** | | [optional] | -|**quotePrecision** | **Long** | | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**pair** | **String** | Pair. | [optional] | +|**contractType** | **String** | Contract Type. | [optional] | +|**deliveryDate** | **Long** | Delivery Date. | [optional] | +|**onboardDate** | **Long** | Onboard Date. | [optional] | +|**status** | **String** | Status. | [optional] | +|**maintMarginPercent** | **String** | ignore | [optional] | +|**requiredMarginPercent** | **String** | ignore | [optional] | +|**baseAsset** | **String** | Base Asset. | [optional] | +|**quoteAsset** | **String** | Quote Asset. | [optional] | +|**marginAsset** | **String** | Margin Asset. | [optional] | +|**pricePrecision** | **Long** | please do not use it as tickSize | [optional] | +|**quantityPrecision** | **Long** | please do not use it as stepSize | [optional] | +|**baseAssetPrecision** | **Long** | Base Asset Precision. | [optional] | +|**quotePrecision** | **Long** | Quote Precision. | [optional] | |**underlyingType** | **String** | | [optional] | |**underlyingSubType** | **List<String>** | | [optional] | |**settlePlan** | **Long** | | [optional] | -|**triggerProtect** | **String** | | [optional] | +|**triggerProtect** | **String** | threshold for algo order with \"priceProtect\" | [optional] | |**filters** | [**List<ExchangeInformationResponseSymbolsInnerFiltersInner>**](ExchangeInformationResponseSymbolsInnerFiltersInner.md) | | [optional] | |**orderTypes** | **List<String>** | | [optional] | -|**timeInForce** | **List<String>** | | [optional] | -|**liquidationFee** | **String** | | [optional] | -|**marketTakeBound** | **String** | | [optional] | +|**timeInForce** | **List<String>** | Time In Force. | [optional] | +|**liquidationFee** | **String** | liquidation fee rate | [optional] | +|**marketTakeBound** | **String** | the max price difference rate( from mark price) a market order can make | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponseSymbolsInnerFiltersInner.md b/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponseSymbolsInnerFiltersInner.md index 7c82b4d68..789f43e51 100644 --- a/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponseSymbolsInnerFiltersInner.md +++ b/clients/derivatives-trading-usds-futures/docs/ExchangeInformationResponseSymbolsInnerFiltersInner.md @@ -7,17 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**filterType** | **String** | | [optional] | -|**maxPrice** | **String** | | [optional] | -|**minPrice** | **String** | | [optional] | -|**tickSize** | **String** | | [optional] | -|**maxQty** | **String** | | [optional] | -|**minQty** | **String** | | [optional] | -|**stepSize** | **String** | | [optional] | -|**limit** | **Long** | | [optional] | +|**filterType** | **String** | Filter Type. | [optional] | +|**maxPrice** | **String** | Max Price. | [optional] | +|**minPrice** | **String** | Min Price. | [optional] | +|**tickSize** | **String** | Tick Size. | [optional] | +|**maxQty** | **String** | Max Qty. | [optional] | +|**minQty** | **String** | Min Qty. | [optional] | +|**stepSize** | **String** | Step Size. | [optional] | +|**limit** | **Long** | Limit. | [optional] | |**notional** | **String** | | [optional] | -|**multiplierUp** | **String** | | [optional] | -|**multiplierDown** | **String** | | [optional] | +|**multiplierUp** | **String** | Multiplier Up. | [optional] | +|**multiplierDown** | **String** | Multiplier Down. | [optional] | |**multiplierDecimal** | **String** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceRequest.md b/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceRequest.md index a2024c808..ce9d398cc 100644 --- a/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**id** | **String** | Id. | [optional] | +|**recvWindow** | **Long** | Recv Window. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceResponse.md b/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceResponse.md index 19942898f..b94e892ca 100644 --- a/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceResponse.md @@ -9,8 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | -|**result** | [**List<FuturesAccountBalanceV2ResponseResultInner>**](FuturesAccountBalanceV2ResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountInformationV2ResponseRateLimitsInner>**](AccountInformationV2ResponseRateLimitsInner.md) | | [optional] | +|**result** | [**List<FuturesAccountBalanceResponseResultInner>**](FuturesAccountBalanceResponseResultInner.md) | | [optional] | +|**rateLimits** | [**List<AccountInformationResponseRateLimitsInner>**](AccountInformationResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceResponseResultInner.md b/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceResponseResultInner.md new file mode 100644 index 000000000..feb25d01e --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceResponseResultInner.md @@ -0,0 +1,21 @@ + + +# FuturesAccountBalanceResponseResultInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accountAlias** | **String** | unique account code | [optional] | +|**asset** | **String** | asset name | [optional] | +|**balance** | **String** | wallet balance | [optional] | +|**crossWalletBalance** | **String** | crossed wallet balance | [optional] | +|**crossUnPnl** | **String** | unrealized profit of crossed positions | [optional] | +|**availableBalance** | **String** | available balance | [optional] | +|**maxWithdrawAmount** | **String** | maximum amount for transfer out | [optional] | +|**marginAvailable** | **Boolean** | whether the asset can be used as margin in Multi-Assets mode | [optional] | +|**updateTime** | **Long** | | [optional] | + + + diff --git a/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceV2Request.md b/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceV2Request.md index 86d228f57..594582239 100644 --- a/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceV2Request.md +++ b/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceV2Request.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**id** | **String** | Id. | [optional] | +|**recvWindow** | **Long** | Recv Window. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceV2Response.md b/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceV2Response.md index d47f379ec..51a4c461b 100644 --- a/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceV2Response.md +++ b/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceV2Response.md @@ -9,8 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | -|**result** | [**List<FuturesAccountBalanceV2ResponseResultInner>**](FuturesAccountBalanceV2ResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountInformationV2ResponseRateLimitsInner>**](AccountInformationV2ResponseRateLimitsInner.md) | | [optional] | +|**result** | [**List<FuturesAccountBalanceResponseResultInner>**](FuturesAccountBalanceResponseResultInner.md) | | [optional] | +|**rateLimits** | [**List<AccountInformationResponseRateLimitsInner>**](AccountInformationResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceV2ResponseInner.md b/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceV2ResponseInner.md index c65968d38..fe6ade0e6 100644 --- a/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceV2ResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceV2ResponseInner.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**accountAlias** | **String** | | [optional] | -|**asset** | **String** | | [optional] | -|**balance** | **String** | | [optional] | -|**crossWalletBalance** | **String** | | [optional] | -|**crossUnPnl** | **String** | | [optional] | -|**availableBalance** | **String** | | [optional] | -|**maxWithdrawAmount** | **String** | | [optional] | -|**marginAvailable** | **Boolean** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**accountAlias** | **String** | Unique account alias. | [optional] | +|**asset** | **String** | Asset name. | [optional] | +|**balance** | **String** | Wallet balance. | [optional] | +|**crossWalletBalance** | **String** | Cross wallet balance. | [optional] | +|**crossUnPnl** | **String** | Unrealized PnL of cross positions. | [optional] | +|**availableBalance** | **String** | Available balance. | [optional] | +|**maxWithdrawAmount** | **String** | Maximum transferable/withdrawable amount. | [optional] | +|**marginAvailable** | **Boolean** | Whether the asset can be used as margin in multi-assets mode. | [optional] | +|**updateTime** | **Long** | Last update time in milliseconds. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceV2ResponseResultInner.md b/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceV2ResponseResultInner.md deleted file mode 100644 index 567adf983..000000000 --- a/clients/derivatives-trading-usds-futures/docs/FuturesAccountBalanceV2ResponseResultInner.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# FuturesAccountBalanceV2ResponseResultInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountAlias** | **String** | | [optional] | -|**asset** | **String** | | [optional] | -|**balance** | **String** | | [optional] | -|**crossWalletBalance** | **String** | | [optional] | -|**crossUnPnl** | **String** | | [optional] | -|**availableBalance** | **String** | | [optional] | -|**maxWithdrawAmount** | **String** | | [optional] | -|**marginAvailable** | **Boolean** | | [optional] | -|**updateTime** | **Long** | | [optional] | - - - diff --git a/clients/derivatives-trading-usds-futures/docs/FuturesAccountConfigurationResponse.md b/clients/derivatives-trading-usds-futures/docs/FuturesAccountConfigurationResponse.md index b0e606895..186177fa4 100644 --- a/clients/derivatives-trading-usds-futures/docs/FuturesAccountConfigurationResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/FuturesAccountConfigurationResponse.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**feeTier** | **Long** | | [optional] | -|**canTrade** | **Boolean** | | [optional] | -|**canDeposit** | **Boolean** | | [optional] | -|**canWithdraw** | **Boolean** | | [optional] | +|**feeTier** | **Long** | account commission tier | [optional] | +|**canTrade** | **Boolean** | if can trade | [optional] | +|**canDeposit** | **Boolean** | if can transfer in asset | [optional] | +|**canWithdraw** | **Boolean** | if can transfer out asset | [optional] | |**dualSidePosition** | **Boolean** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**updateTime** | **Long** | reserved property, please ignore | [optional] | |**multiAssetsMargin** | **Boolean** | | [optional] | |**tradeGroupId** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/FuturesTradfiPerpsContractResponse.md b/clients/derivatives-trading-usds-futures/docs/FuturesTradfiPerpsContractResponse.md new file mode 100644 index 000000000..111437aaf --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/FuturesTradfiPerpsContractResponse.md @@ -0,0 +1,14 @@ + + +# FuturesTradfiPerpsContractResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Long** | | [optional] | +|**msg** | **String** | | [optional] | + + + diff --git a/clients/derivatives-trading-usds-futures/docs/FuturesTradingQuantitativeRulesIndicatorsResponse.md b/clients/derivatives-trading-usds-futures/docs/FuturesTradingQuantitativeRulesIndicatorsResponse.md index 4cdb2bb89..a4e60ef18 100644 --- a/clients/derivatives-trading-usds-futures/docs/FuturesTradingQuantitativeRulesIndicatorsResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/FuturesTradingQuantitativeRulesIndicatorsResponse.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**indicators** | [**FuturesTradingQuantitativeRulesIndicatorsResponseIndicators**](FuturesTradingQuantitativeRulesIndicatorsResponseIndicators.md) | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**updateTime** | **Long** | Update Time. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/FuturesTradingQuantitativeRulesIndicatorsResponseIndicators.md b/clients/derivatives-trading-usds-futures/docs/FuturesTradingQuantitativeRulesIndicatorsResponseIndicators.md index 3b799860a..63445f677 100644 --- a/clients/derivatives-trading-usds-futures/docs/FuturesTradingQuantitativeRulesIndicatorsResponseIndicators.md +++ b/clients/derivatives-trading-usds-futures/docs/FuturesTradingQuantitativeRulesIndicatorsResponseIndicators.md @@ -2,6 +2,7 @@ # FuturesTradingQuantitativeRulesIndicatorsResponseIndicators +indicator: quantitative rules indicators, value: user's indicators value, triggerValue: trigger indicator value threshold of quantitative rules. ## Properties diff --git a/clients/derivatives-trading-usds-futures/docs/FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.md b/clients/derivatives-trading-usds-futures/docs/FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.md index fbd935636..3c8065cf2 100644 --- a/clients/derivatives-trading-usds-futures/docs/FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.md +++ b/clients/derivatives-trading-usds-futures/docs/FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**indicator** | **String** | | [optional] | -|**value** | **Long** | | [optional] | -|**triggerValue** | **Long** | | [optional] | -|**plannedRecoverTime** | **Long** | | [optional] | -|**isLocked** | **Boolean** | | [optional] | +|**indicator** | **String** | Too many violations under multiple symbols trigger account violation | [optional] | +|**value** | **Long** | Current value | [optional] | +|**triggerValue** | **Long** | Trigger value | [optional] | +|**plannedRecoverTime** | **Long** | Planned Recover Time. | [optional] | +|**isLocked** | **Boolean** | Is Locked. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.md b/clients/derivatives-trading-usds-futures/docs/FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.md index 266e37439..5a5d96aea 100644 --- a/clients/derivatives-trading-usds-futures/docs/FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.md +++ b/clients/derivatives-trading-usds-futures/docs/FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**isLocked** | **Boolean** | | [optional] | -|**plannedRecoverTime** | **Long** | | [optional] | -|**indicator** | **String** | | [optional] | -|**value** | **Double** | | [optional] | -|**triggerValue** | **Double** | | [optional] | +|**isLocked** | **Boolean** | Is Locked. | [optional] | +|**plannedRecoverTime** | **Long** | Planned Recover Time. | [optional] | +|**indicator** | **String** | Too many violations under multiple symbols trigger account violation | [optional] | +|**value** | **Double** | Current value | [optional] | +|**triggerValue** | **Double** | Trigger value | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/GetBnbBurnStatusResponse.md b/clients/derivatives-trading-usds-futures/docs/GetBnbBurnStatusResponse.md index 4da576fad..85d6e19b7 100644 --- a/clients/derivatives-trading-usds-futures/docs/GetBnbBurnStatusResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/GetBnbBurnStatusResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**feeBurn** | **Boolean** | | [optional] | +|**feeBurn** | **Boolean** | \"true\": Fee Discount On; \"false\": Fee Discount Off | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/GetCurrentMultiAssetsModeResponse.md b/clients/derivatives-trading-usds-futures/docs/GetCurrentMultiAssetsModeResponse.md index c42f5efee..81963070f 100644 --- a/clients/derivatives-trading-usds-futures/docs/GetCurrentMultiAssetsModeResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/GetCurrentMultiAssetsModeResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**multiAssetsMargin** | **Boolean** | | [optional] | +|**multiAssetsMargin** | **Boolean** | \"true\": Multi-Assets Mode; \"false\": Single-Asset Mode | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/GetCurrentPositionModeResponse.md b/clients/derivatives-trading-usds-futures/docs/GetCurrentPositionModeResponse.md index 78962bfb0..f954a3aeb 100644 --- a/clients/derivatives-trading-usds-futures/docs/GetCurrentPositionModeResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/GetCurrentPositionModeResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**dualSidePosition** | **Boolean** | | [optional] | +|**dualSidePosition** | **Boolean** | \"true\": Hedge Mode; \"false\": One-way Mode | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/GetDownloadIdForFuturesOrderHistoryResponse.md b/clients/derivatives-trading-usds-futures/docs/GetDownloadIdForFuturesOrderHistoryResponse.md index b79ff8a17..a1eba9493 100644 --- a/clients/derivatives-trading-usds-futures/docs/GetDownloadIdForFuturesOrderHistoryResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/GetDownloadIdForFuturesOrderHistoryResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgCostTimestampOfLast30d** | **Long** | | [optional] | -|**downloadId** | **String** | | [optional] | +|**avgCostTimestampOfLast30d** | **Long** | Average time taken for data download in the past 30 days | [optional] | +|**downloadId** | **String** | Download Id. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/GetDownloadIdForFuturesTradeHistoryResponse.md b/clients/derivatives-trading-usds-futures/docs/GetDownloadIdForFuturesTradeHistoryResponse.md index fe36e8228..556aa7fe6 100644 --- a/clients/derivatives-trading-usds-futures/docs/GetDownloadIdForFuturesTradeHistoryResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/GetDownloadIdForFuturesTradeHistoryResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgCostTimestampOfLast30d** | **Long** | | [optional] | -|**downloadId** | **String** | | [optional] | +|**avgCostTimestampOfLast30d** | **Long** | Average time taken for data download in the past 30 days | [optional] | +|**downloadId** | **String** | Download Id. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/GetDownloadIdForFuturesTransactionHistoryResponse.md b/clients/derivatives-trading-usds-futures/docs/GetDownloadIdForFuturesTransactionHistoryResponse.md index 8b247a5e7..05e94edd4 100644 --- a/clients/derivatives-trading-usds-futures/docs/GetDownloadIdForFuturesTransactionHistoryResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/GetDownloadIdForFuturesTransactionHistoryResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgCostTimestampOfLast30d** | **Long** | | [optional] | -|**downloadId** | **String** | | [optional] | +|**avgCostTimestampOfLast30d** | **Long** | Average time taken for data download in the past 30 days | [optional] | +|**downloadId** | **String** | Download Id. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/GetFundingRateHistoryResponseInner.md b/clients/derivatives-trading-usds-futures/docs/GetFundingRateHistoryResponseInner.md index 7930cbf57..02956f377 100644 --- a/clients/derivatives-trading-usds-futures/docs/GetFundingRateHistoryResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/GetFundingRateHistoryResponseInner.md @@ -7,10 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**fundingRate** | **String** | | [optional] | -|**fundingTime** | **Long** | | [optional] | -|**markPrice** | **String** | | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**fundingRate** | **String** | Funding Rate. | [optional] | +|**fundingTime** | **Long** | Funding Time. | [optional] | +|**markPrice** | **String** | mark price associated with a particular funding fee charge | [optional] | +|**rateType** | **String** | Funding rate type. `Regular` for the normal funding rate; `Special` for the additional funding rate generated by stock dividends. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/GetFundingRateInfoResponseInner.md b/clients/derivatives-trading-usds-futures/docs/GetFundingRateInfoResponseInner.md index c35bc0545..0c29a5aee 100644 --- a/clients/derivatives-trading-usds-futures/docs/GetFundingRateInfoResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/GetFundingRateInfoResponseInner.md @@ -11,7 +11,7 @@ |**adjustedFundingRateCap** | **String** | | [optional] | |**adjustedFundingRateFloor** | **String** | | [optional] | |**fundingIntervalHours** | **Long** | | [optional] | -|**disclaimer** | **Boolean** | | [optional] | +|**disclaimer** | **Boolean** | ingore | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/GetFuturesOrderHistoryDownloadLinkByIdResponse.md b/clients/derivatives-trading-usds-futures/docs/GetFuturesOrderHistoryDownloadLinkByIdResponse.md index 41d4b3d80..2b50d20a8 100644 --- a/clients/derivatives-trading-usds-futures/docs/GetFuturesOrderHistoryDownloadLinkByIdResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/GetFuturesOrderHistoryDownloadLinkByIdResponse.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**downloadId** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**url** | **String** | | [optional] | -|**notified** | **Boolean** | | [optional] | -|**expirationTimestamp** | **Long** | | [optional] | +|**downloadId** | **String** | Download Id. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**url** | **String** | The link is mapped to download id | [optional] | +|**notified** | **Boolean** | ignore | [optional] | +|**expirationTimestamp** | **Long** | The link would expire after this timestamp | [optional] | |**isExpired** | **String** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/GetFuturesTradeDownloadLinkByIdResponse.md b/clients/derivatives-trading-usds-futures/docs/GetFuturesTradeDownloadLinkByIdResponse.md index 519dd8a4e..36b9dea68 100644 --- a/clients/derivatives-trading-usds-futures/docs/GetFuturesTradeDownloadLinkByIdResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/GetFuturesTradeDownloadLinkByIdResponse.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**downloadId** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**url** | **String** | | [optional] | -|**notified** | **Boolean** | | [optional] | -|**expirationTimestamp** | **Long** | | [optional] | +|**downloadId** | **String** | Download Id. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**url** | **String** | The link is mapped to download id | [optional] | +|**notified** | **Boolean** | ignore | [optional] | +|**expirationTimestamp** | **Long** | The link would expire after this timestamp | [optional] | |**isExpired** | **String** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/GetFuturesTransactionHistoryDownloadLinkByIdResponse.md b/clients/derivatives-trading-usds-futures/docs/GetFuturesTransactionHistoryDownloadLinkByIdResponse.md index 56a95eded..d2a8aebb9 100644 --- a/clients/derivatives-trading-usds-futures/docs/GetFuturesTransactionHistoryDownloadLinkByIdResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/GetFuturesTransactionHistoryDownloadLinkByIdResponse.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**downloadId** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**url** | **String** | | [optional] | -|**notified** | **Boolean** | | [optional] | -|**expirationTimestamp** | **Long** | | [optional] | +|**downloadId** | **String** | Download Id. | [optional] | +|**status** | **String** | Enum:completed,processing | [optional] | +|**url** | **String** | The link is mapped to download id | [optional] | +|**notified** | **Boolean** | ignore | [optional] | +|**expirationTimestamp** | **Long** | The link would expire after this timestamp | [optional] | |**isExpired** | **String** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/GetIncomeHistoryResponseInner.md b/clients/derivatives-trading-usds-futures/docs/GetIncomeHistoryResponseInner.md index af8613ec4..9d5278ec3 100644 --- a/clients/derivatives-trading-usds-futures/docs/GetIncomeHistoryResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/GetIncomeHistoryResponseInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**incomeType** | **String** | | [optional] | -|**income** | **String** | | [optional] | -|**asset** | **String** | | [optional] | -|**info** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**tranId** | **Long** | | [optional] | -|**tradeId** | **String** | | [optional] | +|**symbol** | **String** | trade symbol, if existing | [optional] | +|**incomeType** | **String** | income type | [optional] | +|**income** | **String** | income amount | [optional] | +|**asset** | **String** | income asset | [optional] | +|**info** | **String** | extra information | [optional] | +|**time** | **Long** | Time. | [optional] | +|**tranId** | **Long** | transaction id | [optional] | +|**tradeId** | **String** | trade id, if existing | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/GetOrderModifyHistoryResponseInner.md b/clients/derivatives-trading-usds-futures/docs/GetOrderModifyHistoryResponseInner.md index 5f66a6f66..ff7c6d4bc 100644 --- a/clients/derivatives-trading-usds-futures/docs/GetOrderModifyHistoryResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/GetOrderModifyHistoryResponseInner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amendmentId** | **Long** | | [optional] | +|**amendmentId** | **Long** | Order modification ID | [optional] | |**symbol** | **String** | | [optional] | |**pair** | **String** | | [optional] | |**orderId** | **Long** | | [optional] | |**clientOrderId** | **String** | | [optional] | -|**time** | **Long** | | [optional] | +|**time** | **Long** | Order modification time | [optional] | |**amendment** | [**GetOrderModifyHistoryResponseInnerAmendment**](GetOrderModifyHistoryResponseInnerAmendment.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/GetOrderModifyHistoryResponseInnerAmendment.md b/clients/derivatives-trading-usds-futures/docs/GetOrderModifyHistoryResponseInnerAmendment.md index 93e358b46..6fa86002f 100644 --- a/clients/derivatives-trading-usds-futures/docs/GetOrderModifyHistoryResponseInnerAmendment.md +++ b/clients/derivatives-trading-usds-futures/docs/GetOrderModifyHistoryResponseInnerAmendment.md @@ -9,7 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**price** | [**GetOrderModifyHistoryResponseInnerAmendmentPrice**](GetOrderModifyHistoryResponseInnerAmendmentPrice.md) | | [optional] | |**origQty** | [**GetOrderModifyHistoryResponseInnerAmendmentOrigQty**](GetOrderModifyHistoryResponseInnerAmendmentOrigQty.md) | | [optional] | -|**count** | **Long** | | [optional] | +|**count** | **Long** | Order modification count, representing the number of times the order has been modified | [optional] | +|**modifyId** | **Long** | user-defined modification identifier, only returned if provided in the request | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/GetPositionMarginChangeHistoryResponseInner.md b/clients/derivatives-trading-usds-futures/docs/GetPositionMarginChangeHistoryResponseInner.md index 33c4b984b..c6bf916f3 100644 --- a/clients/derivatives-trading-usds-futures/docs/GetPositionMarginChangeHistoryResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/GetPositionMarginChangeHistoryResponseInner.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**type** | **Long** | | [optional] | -|**deltaType** | **String** | | [optional] | -|**amount** | **String** | | [optional] | -|**asset** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**positionSide** | **String** | | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**type** | **Long** | Type. | [optional] | +|**deltaType** | **String** | Delta Type. | [optional] | +|**amount** | **String** | Amount. | [optional] | +|**asset** | **String** | Asset. | [optional] | +|**time** | **Long** | Time. | [optional] | +|**positionSide** | **String** | Position Side. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/GridUpdate.md b/clients/derivatives-trading-usds-futures/docs/GridUpdate.md index 6ef473aed..df04862f5 100644 --- a/clients/derivatives-trading-usds-futures/docs/GridUpdate.md +++ b/clients/derivatives-trading-usds-futures/docs/GridUpdate.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**T** | **Long** | | [optional] | -|**E** | **Long** | | [optional] | +|**T** | **Long** | Transaction Time | [optional] | +|**E** | **Long** | Event Time | [optional] | |**gu** | [**GridUpdateGu**](GridUpdateGu.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/GridUpdateGu.md b/clients/derivatives-trading-usds-futures/docs/GridUpdateGu.md index 350ff7bbd..d1fd4a725 100644 --- a/clients/derivatives-trading-usds-futures/docs/GridUpdateGu.md +++ b/clients/derivatives-trading-usds-futures/docs/GridUpdateGu.md @@ -7,16 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**si** | **Long** | | [optional] | -|**st** | **String** | | [optional] | -|**ss** | **String** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**rLowerCase** | **String** | | [optional] | -|**up** | **String** | | [optional] | -|**uq** | **String** | | [optional] | -|**uf** | **String** | | [optional] | -|**mp** | **String** | | [optional] | -|**ut** | **Long** | | [optional] | +|**si** | **Long** | Strategy ID | [optional] | +|**st** | **String** | Strategy Type | [optional] | +|**ss** | **String** | Strategy Status | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**rLowerCase** | **String** | Realized PNL | [optional] | +|**up** | **String** | Unmatched Average Price | [optional] | +|**uq** | **String** | Unmatched Qty | [optional] | +|**uf** | **String** | Unmatched Fee | [optional] | +|**mp** | **String** | Matched PNL | [optional] | +|**ut** | **Long** | Update Time | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/IncomeType.md b/clients/derivatives-trading-usds-futures/docs/IncomeType.md new file mode 100644 index 000000000..ec2fd7258 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/IncomeType.md @@ -0,0 +1,53 @@ + + +# IncomeType + +## Enum + + +* `TRANSFER` (value: `"TRANSFER"`) + +* `WELCOME_BONUS` (value: `"WELCOME_BONUS"`) + +* `REALIZED_PNL` (value: `"REALIZED_PNL"`) + +* `FUNDING_FEE` (value: `"FUNDING_FEE"`) + +* `COMMISSION` (value: `"COMMISSION"`) + +* `INSURANCE_CLEAR` (value: `"INSURANCE_CLEAR"`) + +* `REFERRAL_KICKBACK` (value: `"REFERRAL_KICKBACK"`) + +* `COMMISSION_REBATE` (value: `"COMMISSION_REBATE"`) + +* `API_REBATE` (value: `"API_REBATE"`) + +* `CONTEST_REWARD` (value: `"CONTEST_REWARD"`) + +* `CROSS_COLLATERAL_TRANSFER` (value: `"CROSS_COLLATERAL_TRANSFER"`) + +* `OPTIONS_PREMIUM_FEE` (value: `"OPTIONS_PREMIUM_FEE"`) + +* `OPTIONS_SETTLE_PROFIT` (value: `"OPTIONS_SETTLE_PROFIT"`) + +* `INTERNAL_TRANSFER` (value: `"INTERNAL_TRANSFER"`) + +* `AUTO_EXCHANGE` (value: `"AUTO_EXCHANGE"`) + +* `DELIVERED_SETTELMENT` (value: `"DELIVERED_SETTELMENT"`) + +* `COIN_SWAP_DEPOSIT` (value: `"COIN_SWAP_DEPOSIT"`) + +* `COIN_SWAP_WITHDRAW` (value: `"COIN_SWAP_WITHDRAW"`) + +* `POSITION_LIMIT_INCREASE_FEE` (value: `"POSITION_LIMIT_INCREASE_FEE"`) + +* `STRATEGY_UMFUTURES_TRANSFER` (value: `"STRATEGY_UMFUTURES_TRANSFER"`) + +* `FEE_RETURN` (value: `"FEE_RETURN"`) + +* `BFUSD_REWARD` (value: `"BFUSD_REWARD"`) + + + diff --git a/clients/derivatives-trading-usds-futures/docs/IndexPriceKlineCandlestickDataItem.md b/clients/derivatives-trading-usds-futures/docs/IndexPriceKlineCandlestickDataItem.md new file mode 100644 index 000000000..99aaf6cf4 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/IndexPriceKlineCandlestickDataItem.md @@ -0,0 +1,12 @@ + + +# IndexPriceKlineCandlestickDataItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-usds-futures/docs/IndexPriceKlineCandlestickDataItemInner.md b/clients/derivatives-trading-usds-futures/docs/IndexPriceKlineCandlestickDataItemInner.md new file mode 100644 index 000000000..8b4e9e127 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/IndexPriceKlineCandlestickDataItemInner.md @@ -0,0 +1,12 @@ + + +# IndexPriceKlineCandlestickDataItemInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-usds-futures/docs/IndexPriceKlineCandlestickDataResponseItem.md b/clients/derivatives-trading-usds-futures/docs/IndexPriceKlineCandlestickDataResponseItem.md deleted file mode 100644 index e9be08351..000000000 --- a/clients/derivatives-trading-usds-futures/docs/IndexPriceKlineCandlestickDataResponseItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# IndexPriceKlineCandlestickDataResponseItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/IndexPriceKlineCandlestickDataResponseItemInner.md b/clients/derivatives-trading-usds-futures/docs/IndexPriceKlineCandlestickDataResponseItemInner.md deleted file mode 100644 index b8b5f7f02..000000000 --- a/clients/derivatives-trading-usds-futures/docs/IndexPriceKlineCandlestickDataResponseItemInner.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# IndexPriceKlineCandlestickDataResponseItemInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/IndividualSymbolBookTickerStreamsRequest.md b/clients/derivatives-trading-usds-futures/docs/IndividualSymbolBookTickerStreamsRequest.md index f63eeed12..303bb8024 100644 --- a/clients/derivatives-trading-usds-futures/docs/IndividualSymbolBookTickerStreamsRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/IndividualSymbolBookTickerStreamsRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/IndividualSymbolBookTickerStreamsResponse.md b/clients/derivatives-trading-usds-futures/docs/IndividualSymbolBookTickerStreamsResponse.md index c7c5e37ff..652d867dc 100644 --- a/clients/derivatives-trading-usds-futures/docs/IndividualSymbolBookTickerStreamsResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/IndividualSymbolBookTickerStreamsResponse.md @@ -7,15 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**B** | **String** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**A** | **String** | | [optional] | +|**eLowerCase** | **String** | event type | [optional] | +|**uLowerCase** | **Long** | order book updateId | [optional] | +|**E** | **Long** | event time | [optional] | +|**T** | **Long** | transaction time | [optional] | +|**sLowerCase** | **String** | symbol | [optional] | +|**ps** | **String** | pair (After CM migration) | [optional] | +|**bLowerCase** | **String** | best bid price | [optional] | +|**B** | **String** | best bid qty | [optional] | +|**aLowerCase** | **String** | best ask price | [optional] | +|**A** | **String** | best ask qty | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/IndividualSymbolMiniTickerStreamRequest.md b/clients/derivatives-trading-usds-futures/docs/IndividualSymbolMiniTickerStreamRequest.md index 454a94e71..52cca8ef8 100644 --- a/clients/derivatives-trading-usds-futures/docs/IndividualSymbolMiniTickerStreamRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/IndividualSymbolMiniTickerStreamRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/IndividualSymbolMiniTickerStreamResponse.md b/clients/derivatives-trading-usds-futures/docs/IndividualSymbolMiniTickerStreamResponse.md index cf6c368b8..6299fe7b4 100644 --- a/clients/derivatives-trading-usds-futures/docs/IndividualSymbolMiniTickerStreamResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/IndividualSymbolMiniTickerStreamResponse.md @@ -7,15 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**cLowerCase** | **String** | Close price | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | Total traded base asset volume | [optional] | +|**qLowerCase** | **String** | Total traded quote asset volume | [optional] | +|**ps** | **String** | (After CM migration) Pair symbol | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/IndividualSymbolTickerStreamsRequest.md b/clients/derivatives-trading-usds-futures/docs/IndividualSymbolTickerStreamsRequest.md index 031c3dc4d..b249def8d 100644 --- a/clients/derivatives-trading-usds-futures/docs/IndividualSymbolTickerStreamsRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/IndividualSymbolTickerStreamsRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/IndividualSymbolTickerStreamsResponse.md b/clients/derivatives-trading-usds-futures/docs/IndividualSymbolTickerStreamsResponse.md index c23e8af81..1778c756e 100644 --- a/clients/derivatives-trading-usds-futures/docs/IndividualSymbolTickerStreamsResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/IndividualSymbolTickerStreamsResponse.md @@ -7,24 +7,26 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**wLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**O** | **Long** | | [optional] | -|**C** | **Long** | | [optional] | -|**F** | **Long** | | [optional] | -|**L** | **Long** | | [optional] | -|**nLowerCase** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**pLowerCase** | **String** | Price change | [optional] | +|**P** | **String** | Price change percent | [optional] | +|**wLowerCase** | **String** | Weighted average price | [optional] | +|**cLowerCase** | **String** | Last price | [optional] | +|**Q** | **String** | Last quantity | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | Total traded base asset volume | [optional] | +|**qLowerCase** | **String** | Total traded quote asset volume | [optional] | +|**O** | **Long** | Statistics open time | [optional] | +|**C** | **Long** | Statistics close time | [optional] | +|**F** | **Long** | First trade ID | [optional] | +|**L** | **Long** | Last trade Id | [optional] | +|**nLowerCase** | **Long** | Total number of trades | [optional] | +|**ps** | **String** | (After CM migration) Pair symbol | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/Interval.md b/clients/derivatives-trading-usds-futures/docs/Interval.md index a24ddebb9..2d3269745 100644 --- a/clients/derivatives-trading-usds-futures/docs/Interval.md +++ b/clients/derivatives-trading-usds-futures/docs/Interval.md @@ -5,8 +5,6 @@ ## Enum -* `INTERVAL_1s` (value: `"1s"`) - * `INTERVAL_1m` (value: `"1m"`) * `INTERVAL_3m` (value: `"3m"`) diff --git a/clients/derivatives-trading-usds-futures/docs/KeepaliveUserDataStreamRequest.md b/clients/derivatives-trading-usds-futures/docs/KeepaliveUserDataStreamRequest.md index 7135ad09c..fe1cce6b6 100644 --- a/clients/derivatives-trading-usds-futures/docs/KeepaliveUserDataStreamRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/KeepaliveUserDataStreamRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | +|**id** | **String** | Id. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/KlineCandlestickDataItem.md b/clients/derivatives-trading-usds-futures/docs/KlineCandlestickDataItem.md new file mode 100644 index 000000000..70a2b6dc0 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/KlineCandlestickDataItem.md @@ -0,0 +1,12 @@ + + +# KlineCandlestickDataItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-usds-futures/docs/KlineCandlestickDataItemInner.md b/clients/derivatives-trading-usds-futures/docs/KlineCandlestickDataItemInner.md new file mode 100644 index 000000000..ef68850c4 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/KlineCandlestickDataItemInner.md @@ -0,0 +1,12 @@ + + +# KlineCandlestickDataItemInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-usds-futures/docs/KlineCandlestickDataResponseItem.md b/clients/derivatives-trading-usds-futures/docs/KlineCandlestickDataResponseItem.md deleted file mode 100644 index 77012692f..000000000 --- a/clients/derivatives-trading-usds-futures/docs/KlineCandlestickDataResponseItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# KlineCandlestickDataResponseItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/KlineCandlestickDataResponseItemInner.md b/clients/derivatives-trading-usds-futures/docs/KlineCandlestickDataResponseItemInner.md deleted file mode 100644 index 704c5f122..000000000 --- a/clients/derivatives-trading-usds-futures/docs/KlineCandlestickDataResponseItemInner.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# KlineCandlestickDataResponseItemInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/KlineCandlestickStreamsRequest.md b/clients/derivatives-trading-usds-futures/docs/KlineCandlestickStreamsRequest.md index b33491322..7371ed58a 100644 --- a/clients/derivatives-trading-usds-futures/docs/KlineCandlestickStreamsRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/KlineCandlestickStreamsRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | -|**interval** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | +|**interval** | **Interval** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/KlineCandlestickStreamsResponse.md b/clients/derivatives-trading-usds-futures/docs/KlineCandlestickStreamsResponse.md index 8f66d35fe..d9e18771b 100644 --- a/clients/derivatives-trading-usds-futures/docs/KlineCandlestickStreamsResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/KlineCandlestickStreamsResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | |**kLowerCase** | [**KlineCandlestickStreamsResponseK**](KlineCandlestickStreamsResponseK.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/KlineCandlestickStreamsResponseK.md b/clients/derivatives-trading-usds-futures/docs/KlineCandlestickStreamsResponseK.md index 7cc125bf3..290b00c15 100644 --- a/clients/derivatives-trading-usds-futures/docs/KlineCandlestickStreamsResponseK.md +++ b/clients/derivatives-trading-usds-futures/docs/KlineCandlestickStreamsResponseK.md @@ -2,28 +2,29 @@ # KlineCandlestickStreamsResponseK +Kline payload. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tLowerCase** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**fLowerCase** | **Long** | | [optional] | -|**L** | **Long** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**nLowerCase** | **Long** | | [optional] | -|**xLowerCase** | **Boolean** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**V** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**B** | **String** | | [optional] | +|**tLowerCase** | **Long** | Kline start time | [optional] | +|**T** | **Long** | Kline close time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**iLowerCase** | **String** | Interval | [optional] | +|**fLowerCase** | **Long** | First trade ID | [optional] | +|**L** | **Long** | Last trade ID | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**cLowerCase** | **String** | Close price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | Base asset volume | [optional] | +|**nLowerCase** | **Long** | Number of trades | [optional] | +|**xLowerCase** | **Boolean** | Is this kline closed? | [optional] | +|**qLowerCase** | **String** | Quote asset volume | [optional] | +|**V** | **String** | Taker buy base asset volume | [optional] | +|**Q** | **String** | Taker buy quote asset volume | [optional] | +|**B** | **String** | Ignore | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/Levels.md b/clients/derivatives-trading-usds-futures/docs/Levels.md new file mode 100644 index 000000000..cf3348fbc --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/Levels.md @@ -0,0 +1,15 @@ + + +# Levels + +## Enum + + +* `LEVELS_5` (value: `"5"`) + +* `LEVELS_10` (value: `"10"`) + +* `LEVELS_20` (value: `"20"`) + + + diff --git a/clients/derivatives-trading-usds-futures/docs/LiquidationOrderStreamsRequest.md b/clients/derivatives-trading-usds-futures/docs/LiquidationOrderStreamsRequest.md index 93d8692fe..7b42f0404 100644 --- a/clients/derivatives-trading-usds-futures/docs/LiquidationOrderStreamsRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/LiquidationOrderStreamsRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/LiquidationOrderStreamsResponse.md b/clients/derivatives-trading-usds-futures/docs/LiquidationOrderStreamsResponse.md index 51a0fff33..d35764038 100644 --- a/clients/derivatives-trading-usds-futures/docs/LiquidationOrderStreamsResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/LiquidationOrderStreamsResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event Type | [optional] | +|**E** | **Long** | Event Time | [optional] | |**oLowerCase** | [**AllMarketLiquidationOrderStreamsResponseO**](AllMarketLiquidationOrderStreamsResponseO.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/Listenkeyexpired.md b/clients/derivatives-trading-usds-futures/docs/Listenkeyexpired.md index a4f18a418..38ea4af81 100644 --- a/clients/derivatives-trading-usds-futures/docs/Listenkeyexpired.md +++ b/clients/derivatives-trading-usds-futures/docs/Listenkeyexpired.md @@ -1,13 +1,13 @@ -# Listenkeyexpired +# ListenKeyExpired ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **String** | | [optional] | +|**E** | **Long** | Event Time | [optional] | |**listenKey** | **String** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/LongShortRatioResponseInner.md b/clients/derivatives-trading-usds-futures/docs/LongShortRatioResponseInner.md index b0c8557b0..75e96f656 100644 --- a/clients/derivatives-trading-usds-futures/docs/LongShortRatioResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/LongShortRatioResponseInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**longShortRatio** | **String** | | [optional] | -|**longAccount** | **String** | | [optional] | -|**shortAccount** | **String** | | [optional] | -|**timestamp** | **String** | | [optional] | +|**symbol** | **String** | long/short account num ratio of all traders | [optional] | +|**longShortRatio** | **String** | long account num ratio of all traders | [optional] | +|**longAccount** | **String** | short account num ratio of all traders | [optional] | +|**shortAccount** | **String** | Short Account. | [optional] | +|**timestamp** | **Long** | Timestamp in milliseconds. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/MarginCall.md b/clients/derivatives-trading-usds-futures/docs/MarginCall.md index babc95e00..03a5b2bba 100644 --- a/clients/derivatives-trading-usds-futures/docs/MarginCall.md +++ b/clients/derivatives-trading-usds-futures/docs/MarginCall.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**cw** | **String** | | [optional] | -|**pLowerCase** | [**List<MarginCallPInner>**](MarginCallPInner.md) | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**cw** | **String** | Cross Wallet Balance. Only pushed with crossed position margin call | [optional] | +|**pLowerCase** | [**List<MarginCallPInner>**](MarginCallPInner.md) | Position(s) of Margin Call | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/MarginCallPInner.md b/clients/derivatives-trading-usds-futures/docs/MarginCallPInner.md index 0cdf73fb5..2c0aebaf0 100644 --- a/clients/derivatives-trading-usds-futures/docs/MarginCallPInner.md +++ b/clients/derivatives-trading-usds-futures/docs/MarginCallPInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**pa** | **String** | | [optional] | -|**mt** | **String** | | [optional] | -|**iw** | **String** | | [optional] | -|**mp** | **String** | | [optional] | -|**up** | **String** | | [optional] | -|**mm** | **String** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**ps** | **String** | Position Side | [optional] | +|**pa** | **String** | Position Amount | [optional] | +|**mt** | **String** | Margin Type | [optional] | +|**iw** | **String** | Isolated Wallet (if isolated position) | [optional] | +|**mp** | **String** | Mark Price | [optional] | +|**up** | **String** | Unrealized PnL | [optional] | +|**mm** | **String** | Maintenance Margin Required | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/MarkPriceKlineCandlestickDataItem.md b/clients/derivatives-trading-usds-futures/docs/MarkPriceKlineCandlestickDataItem.md new file mode 100644 index 000000000..83d32d591 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/MarkPriceKlineCandlestickDataItem.md @@ -0,0 +1,12 @@ + + +# MarkPriceKlineCandlestickDataItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-usds-futures/docs/MarkPriceKlineCandlestickDataItemInner.md b/clients/derivatives-trading-usds-futures/docs/MarkPriceKlineCandlestickDataItemInner.md new file mode 100644 index 000000000..f0b57de1b --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/MarkPriceKlineCandlestickDataItemInner.md @@ -0,0 +1,12 @@ + + +# MarkPriceKlineCandlestickDataItemInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-usds-futures/docs/MarkPriceKlineCandlestickDataResponseItem.md b/clients/derivatives-trading-usds-futures/docs/MarkPriceKlineCandlestickDataResponseItem.md deleted file mode 100644 index 0b3da4bea..000000000 --- a/clients/derivatives-trading-usds-futures/docs/MarkPriceKlineCandlestickDataResponseItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# MarkPriceKlineCandlestickDataResponseItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/MarkPriceKlineCandlestickDataResponseItemInner.md b/clients/derivatives-trading-usds-futures/docs/MarkPriceKlineCandlestickDataResponseItemInner.md deleted file mode 100644 index c2586aaa7..000000000 --- a/clients/derivatives-trading-usds-futures/docs/MarkPriceKlineCandlestickDataResponseItemInner.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# MarkPriceKlineCandlestickDataResponseItemInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/MarkPriceResponse.md b/clients/derivatives-trading-usds-futures/docs/MarkPriceResponse.md index eb4107c32..953910bef 100644 --- a/clients/derivatives-trading-usds-futures/docs/MarkPriceResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/MarkPriceResponse.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**markPrice** | **String** | | [optional] | -|**indexPrice** | **String** | | [optional] | -|**estimatedSettlePrice** | **String** | | [optional] | -|**lastFundingRate** | **String** | | [optional] | -|**interestRate** | **String** | | [optional] | -|**nextFundingTime** | **Long** | | [optional] | -|**time** | **Long** | | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**markPrice** | **String** | mark price | [optional] | +|**indexPrice** | **String** | index price | [optional] | +|**estimatedSettlePrice** | **String** | Estimated Settle Price, only useful in the last hour before the settlement starts. | [optional] | +|**lastFundingRate** | **String** | This is the Latest funding rate | [optional] | +|**interestRate** | **String** | Interest Rate. | [optional] | +|**nextFundingTime** | **Long** | Next Funding Time. | [optional] | +|**time** | **Long** | Time. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/MarkPriceResponse1.md b/clients/derivatives-trading-usds-futures/docs/MarkPriceResponse1.md index 4b251b049..b5125bab9 100644 --- a/clients/derivatives-trading-usds-futures/docs/MarkPriceResponse1.md +++ b/clients/derivatives-trading-usds-futures/docs/MarkPriceResponse1.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**markPrice** | **String** | | [optional] | -|**indexPrice** | **String** | | [optional] | -|**estimatedSettlePrice** | **String** | | [optional] | -|**lastFundingRate** | **String** | | [optional] | -|**interestRate** | **String** | | [optional] | -|**nextFundingTime** | **Long** | | [optional] | -|**time** | **Long** | | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**markPrice** | **String** | mark price | [optional] | +|**indexPrice** | **String** | index price | [optional] | +|**estimatedSettlePrice** | **String** | Estimated Settle Price, only useful in the last hour before the settlement starts. | [optional] | +|**lastFundingRate** | **String** | This is the Latest funding rate | [optional] | +|**interestRate** | **String** | Interest Rate. | [optional] | +|**nextFundingTime** | **Long** | Next Funding Time. | [optional] | +|**time** | **Long** | Time. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/MarkPriceResponse2Inner.md b/clients/derivatives-trading-usds-futures/docs/MarkPriceResponse2Inner.md index ff3eba322..0d855ee00 100644 --- a/clients/derivatives-trading-usds-futures/docs/MarkPriceResponse2Inner.md +++ b/clients/derivatives-trading-usds-futures/docs/MarkPriceResponse2Inner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**markPrice** | **String** | | [optional] | -|**indexPrice** | **String** | | [optional] | -|**estimatedSettlePrice** | **String** | | [optional] | -|**lastFundingRate** | **String** | | [optional] | -|**interestRate** | **String** | | [optional] | -|**nextFundingTime** | **Long** | | [optional] | -|**time** | **Long** | | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**markPrice** | **String** | mark price | [optional] | +|**indexPrice** | **String** | index price | [optional] | +|**estimatedSettlePrice** | **String** | Estimated Settle Price, only useful in the last hour before the settlement starts. | [optional] | +|**lastFundingRate** | **String** | This is the Latest funding rate | [optional] | +|**interestRate** | **String** | Interest Rate. | [optional] | +|**nextFundingTime** | **Long** | Next Funding Time. | [optional] | +|**time** | **Long** | Time. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/MarkPriceStreamForAllMarketRequest.md b/clients/derivatives-trading-usds-futures/docs/MarkPriceStreamForAllMarketRequest.md index 933bd9d61..01b538f86 100644 --- a/clients/derivatives-trading-usds-futures/docs/MarkPriceStreamForAllMarketRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/MarkPriceStreamForAllMarketRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**updateSpeed** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**updateSpeed** | **UpdateSpeed** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/MarkPriceStreamForAllMarketResponseInner.md b/clients/derivatives-trading-usds-futures/docs/MarkPriceStreamForAllMarketResponseInner.md index 05fddd03f..d263503b4 100644 --- a/clients/derivatives-trading-usds-futures/docs/MarkPriceStreamForAllMarketResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/MarkPriceStreamForAllMarketResponseInner.md @@ -7,15 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**ap** | **String** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**rLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**pLowerCase** | **String** | Mark price | [optional] | +|**iLowerCase** | **String** | Index price | [optional] | +|**P** | **String** | Estimated Settle Price, only useful in the last hour before the settlement starts | [optional] | +|**rLowerCase** | **String** | Funding rate | [optional] | +|**ap** | **String** | Mark price moving average | [optional] | +|**T** | **Long** | Next funding time | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/MarkPriceStreamRequest.md b/clients/derivatives-trading-usds-futures/docs/MarkPriceStreamRequest.md index 57128622e..ad321dc7c 100644 --- a/clients/derivatives-trading-usds-futures/docs/MarkPriceStreamRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/MarkPriceStreamRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | -|**updateSpeed** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | +|**updateSpeed** | **UpdateSpeed** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/MarkPriceStreamResponse.md b/clients/derivatives-trading-usds-futures/docs/MarkPriceStreamResponse.md index 0170c1652..e5a0d010f 100644 --- a/clients/derivatives-trading-usds-futures/docs/MarkPriceStreamResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/MarkPriceStreamResponse.md @@ -7,15 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**ap** | **String** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**rLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**pLowerCase** | **String** | Mark price | [optional] | +|**iLowerCase** | **String** | Index price | [optional] | +|**P** | **String** | Estimated Settle Price, only useful in the last hour before the settlement starts | [optional] | +|**rLowerCase** | **String** | Funding rate | [optional] | +|**ap** | **String** | Mark price moving average | [optional] | +|**T** | **Long** | Next funding time | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/MarketApi.md b/clients/derivatives-trading-usds-futures/docs/MarketApi.md index 5ec3d72ae..b596ebc85 100644 --- a/clients/derivatives-trading-usds-futures/docs/MarketApi.md +++ b/clients/derivatives-trading-usds-futures/docs/MarketApi.md @@ -8,6 +8,7 @@ All URIs are relative to *http://localhost* | [**allMarketLiquidationOrderStreams**](MarketApi.md#allMarketLiquidationOrderStreams) | **POST** /!forceOrder@arr | All Market Liquidation Order Streams | | [**allMarketMiniTickersStream**](MarketApi.md#allMarketMiniTickersStream) | **POST** /!miniTicker@arr | All Market Mini Tickers Stream | | [**allMarketTickersStreams**](MarketApi.md#allMarketTickersStreams) | **POST** /!ticker@arr | All Market Tickers Streams | +| [**assetIndex**](MarketApi.md#assetIndex) | **POST** /!assetIndex@arr | Multi-Assets Mode Asset Index | | [**compositeIndexSymbolInformationStreams**](MarketApi.md#compositeIndexSymbolInformationStreams) | **POST** /<symbol>@compositeIndex | Composite Index Symbol Information Streams | | [**continuousContractKlineCandlestickStreams**](MarketApi.md#continuousContractKlineCandlestickStreams) | **POST** /<pair>_<contractType>@continuousKline_<interval> | Continuous Contract Kline/Candlestick Streams | | [**contractInfoStream**](MarketApi.md#contractInfoStream) | **POST** /!contractInfo | Contract Info Stream | @@ -17,7 +18,6 @@ All URIs are relative to *http://localhost* | [**liquidationOrderStreams**](MarketApi.md#liquidationOrderStreams) | **POST** /<symbol>@forceOrder | Liquidation Order Streams | | [**markPriceStream**](MarketApi.md#markPriceStream) | **POST** /<symbol>@markPrice@<updateSpeed> | Mark Price Stream | | [**markPriceStreamForAllMarket**](MarketApi.md#markPriceStreamForAllMarket) | **POST** /!markPrice@arr@<updateSpeed> | Mark Price Stream for All market | -| [**multiAssetsModeAssetIndex**](MarketApi.md#multiAssetsModeAssetIndex) | **POST** /!assetIndex@arr | Multi-Assets Mode Asset Index | | [**tradingSessionStream**](MarketApi.md#tradingSessionStream) | **POST** /tradingSession | Trading Session Stream | @@ -27,7 +27,7 @@ All URIs are relative to *http://localhost* Aggregate Trade Streams -The Aggregate Trade Streams push market trade information that is aggregated for fills with same price and taking side every 100 milliseconds. Only market trades will be aggregated, which means the insurance fund trades and ADL trades won't be aggregated. Retail Price Improvement(RPI) orders are aggregated into field `q` and without special tags to be distinguished. Update Speed: 100ms +The Aggregate Trade Streams push market trade information that is aggregated for fills with same price and taking side every 100 milliseconds. Only market trades will be aggregated, which means the insurance fund trades and ADL trades won't be aggregated. > **After CM migration**, the payload is appended with a new `st` field (`1` = UM, `2` = CM). Update Speed: 100ms Response Notes: - Retail Price Improvement(RPI) orders are aggregated into field q and without special tags to be distinguished. ### Example ```java @@ -89,7 +89,7 @@ No authorization required All Market Liquidation Order Streams -The All Liquidation Order Snapshot Streams push force liquidation order information for all symbols in the market. For each symbol,only the largest one liquidation order within 1000ms will be pushed as the snapshot. If no liquidation happens in the interval of 1000ms, no stream will be pushed. Update Speed: 1000ms +The All Liquidation Order Snapshot Streams push force liquidation order information for all symbols in the market. For each symbol,only the latest one liquidation order within 1000ms will be pushed as the snapshot. If no liquidation happens in the interval of 1000ms, no stream will be pushed. > **After CM migration**, this stream pushes the merged UM + CM universe (subscribable on both `fstream` and `dstream`); each payload is appended with a new `st` field (`1` = UM, `2` = CM) and a new `ps` field (pair symbol). Update Speed: 1000ms ### Example ```java @@ -151,7 +151,7 @@ No authorization required All Market Mini Tickers Stream -24hr rolling window mini-ticker statistics for all symbols. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Note that only tickers that have changed will be present in the array. Update Speed: 1000ms +24hr rolling window mini-ticker statistics for all symbols. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Note that only tickers that have changed will be present in the array. > **After CM migration**, this stream pushes the merged UM + CM universe (subscribable on both `fstream` and `dstream`); each payload is appended with a new `st` field (`1` = UM, `2` = CM) and a new `ps` field (pair symbol). Update Speed: 1000ms ### Example ```java @@ -213,7 +213,7 @@ No authorization required All Market Tickers Streams -24hr rolling window ticker statistics for all symbols. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Note that only tickers that have changed will be present in the array. Update Speed: 1000ms +24hr rolling window ticker statistics for all symbols. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Note that only tickers that have changed will be present in the array. > **After CM migration**, this stream pushes the merged UM + CM universe (subscribable on both `fstream` and `dstream`); each payload is appended with a new `st` field (`1` = UM, `2` = CM) and a new `ps` field (pair symbol). Update Speed: 1000ms ### Example ```java @@ -269,6 +269,68 @@ No authorization required |-------------|-------------|------------------| | **200** | All Market Tickers Streams | - | + +# **assetIndex** +> AssetIndexResponse assetIndex(assetIndexRequest) + +Multi-Assets Mode Asset Index + +Asset index price. Subscribe with `!assetIndex@arr` for all assets, or `<assetSymbol>@assetIndex` for a specific asset. > **CM-UM Integration (Effective 2026-06-30):** Renamed from *Multi-Assets Mode Asset Index*. The stream `!assetIndex@arr` now additionally pushes COIN-M settlement-asset price index entries (e.g., `BTCUSD`, `ETHUSD`, `BNBUSD`). The on-the-wire stream key is unchanged; existing subscriptions continue to work. Update Speed: 1s + +### Example +```java +// Import classes: +import com.binance.connector.client.derivatives_trading_usds_futures.ApiClient; +import com.binance.connector.client.derivatives_trading_usds_futures.ApiException; +import com.binance.connector.client.derivatives_trading_usds_futures.Configuration; +import com.binance.connector.client.derivatives_trading_usds_futures.models.*; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.api.MarketApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + MarketApi apiInstance = new MarketApi(defaultClient); + AssetIndexRequest assetIndexRequest = new AssetIndexRequest(); // AssetIndexRequest | + try { + AssetIndexResponse result = apiInstance.assetIndex(assetIndexRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MarketApi#assetIndex"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **assetIndexRequest** | [**AssetIndexRequest**](AssetIndexRequest.md)| | | + +### Return type + +[**AssetIndexResponse**](AssetIndexResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Multi-Assets Mode Asset Index | - | + # **compositeIndexSymbolInformationStreams** > CompositeIndexSymbolInformationStreamsResponse compositeIndexSymbolInformationStreams(compositeIndexSymbolInformationStreamsRequest) @@ -337,7 +399,7 @@ No authorization required Continuous Contract Kline/Candlestick Streams - Update Speed: 250ms +Continuous Contract Kline/Candlestick Streams > **After CM migration**, both `fstream` and `dstream` may subscribe to either UM or CM symbols on this stream. Update Speed: 250ms ### Example ```java @@ -399,7 +461,7 @@ No authorization required Contract Info Stream -ContractInfo stream pushes when contract info updates(listing/settlement/contract bracket update). `bks` field only shows up when bracket gets updated. Update Speed: Real-time +ContractInfo stream pushes when contract info updates(listing/settlement/contract bracket update). bks field only shows up when bracket gets updated. > **After CM migration**, this stream pushes the merged UM + CM universe (subscribable on both `fstream` and `dstream`); each payload is appended with a new `st` field (`1` = UM, `2` = CM). Update Speed: Real-time ### Example ```java @@ -461,7 +523,7 @@ No authorization required Individual Symbol Mini Ticker Stream -24hr rolling window mini-ticker statistics for a single symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Update Speed: 2s +24hr rolling window mini-ticker statistics for a single symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. > **After CM migration**, the payload is appended with a new `st` field (`1` = UM, `2` = CM) and a new `ps` field (pair symbol). Update Speed: 2s ### Example ```java @@ -523,7 +585,7 @@ No authorization required Individual Symbol Ticker Streams -24hr rolling window ticker statistics for a single symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Update Speed: 2000ms +24hr rolling window ticker statistics for a single symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. > **After CM migration**, the payload is appended with a new `st` field (`1` = UM, `2` = CM) and a new `ps` field (pair symbol). Update Speed: 2000ms ### Example ```java @@ -585,7 +647,7 @@ No authorization required Kline/Candlestick Streams -The Kline/Candlestick Stream push updates to the current klines/candlestick every 250 milliseconds (if existing). Update Speed: 250ms +The Kline/Candlestick Stream push updates to the current klines/candlestick every 250 milliseconds (if existing). > **After CM migration**, both `fstream` and `dstream` may subscribe to either UM or CM symbols on this stream. Update Speed: 250ms ### Example ```java @@ -647,7 +709,7 @@ No authorization required Liquidation Order Streams -The Liquidation Order Snapshot Streams push force liquidation order information for specific symbol. For each symbol,only the largest one liquidation order within 1000ms will be pushed as the snapshot. If no liquidation happens in the interval of 1000ms, no stream will be pushed. Update Speed: 1000ms +The Liquidation Order Snapshot Streams push force liquidation order information for specific symbol. For each symbol,only the latest one liquidation order within 1000ms will be pushed as the snapshot. If no liquidation happens in the interval of 1000ms, no stream will be pushed. Update Speed: 1000ms ### Example ```java @@ -709,7 +771,7 @@ No authorization required Mark Price Stream -Mark price and funding rate for a single symbol pushed every 3 seconds or every second. Update Speed: 3000ms or 1000ms +Mark price and funding rate for a single symbol pushed every 3 seconds or every second. > **After CM migration**, the payload is appended with a new `st` field (`1` = UM, `2` = CM); both `fstream` and `dstream` may subscribe to either UM or CM symbols on this stream. ### Example ```java @@ -771,7 +833,7 @@ No authorization required Mark Price Stream for All market -Mark price and funding rate for all symbols pushed every 3 seconds or every second. **Note**: TradFi symbols will be pushed through a seperate message. Update Speed: 3000ms or 1000ms +Mark price and funding rate for all symbols pushed every 3 seconds or every second. **Note:** - TradFi symbols will be pushed through a seperate message. > **After CM migration**, the payload is appended with a new `st` field (`1` = UM, `2` = CM); both `fstream` and `dstream` may subscribe to either UM or CM symbols on this stream. Update Speed: 3s or 1s ### Example ```java @@ -827,75 +889,13 @@ No authorization required |-------------|-------------|------------------| | **200** | Mark Price Stream for All market | - | - -# **multiAssetsModeAssetIndex** -> MultiAssetsModeAssetIndexResponse multiAssetsModeAssetIndex(multiAssetsModeAssetIndexRequest) - -Multi-Assets Mode Asset Index - -Asset index for multi-assets mode user Update Speed: 1s - -### Example -```java -// Import classes: -import com.binance.connector.client.derivatives_trading_usds_futures.ApiClient; -import com.binance.connector.client.derivatives_trading_usds_futures.ApiException; -import com.binance.connector.client.derivatives_trading_usds_futures.Configuration; -import com.binance.connector.client.derivatives_trading_usds_futures.models.*; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.api.MarketApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - MarketApi apiInstance = new MarketApi(defaultClient); - MultiAssetsModeAssetIndexRequest multiAssetsModeAssetIndexRequest = new MultiAssetsModeAssetIndexRequest(); // MultiAssetsModeAssetIndexRequest | - try { - MultiAssetsModeAssetIndexResponse result = apiInstance.multiAssetsModeAssetIndex(multiAssetsModeAssetIndexRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MarketApi#multiAssetsModeAssetIndex"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **multiAssetsModeAssetIndexRequest** | [**MultiAssetsModeAssetIndexRequest**](MultiAssetsModeAssetIndexRequest.md)| | | - -### Return type - -[**MultiAssetsModeAssetIndexResponse**](MultiAssetsModeAssetIndexResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Multi-Assets Mode Asset Index | - | - # **tradingSessionStream** > TradingSessionStreamResponse tradingSessionStream(tradingSessionStreamRequest) Trading Session Stream -Trading session information for the underlying assets of TradFi Perpetual contracts—covering the U.S. equity market and the commodity market—is updated every second. Trading session information for different underlying markets is pushed in separate messages. Session types for the equity market include \"PRE_MARKET\", \"REGULAR\", \"AFTER_MARKET\", \"OVERNIGHT\", and \"NO_TRADING\". Session types for the commodity market include \"REGULAR\" and \"NO_TRADING\". 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, 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\", \"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\". Update Speed: 1s ### Example ```java diff --git a/clients/derivatives-trading-usds-futures/docs/MarketDataApi.md b/clients/derivatives-trading-usds-futures/docs/MarketDataApi.md index c7c863931..6c24f34a6 100644 --- a/clients/derivatives-trading-usds-futures/docs/MarketDataApi.md +++ b/clients/derivatives-trading-usds-futures/docs/MarketDataApi.md @@ -15,7 +15,7 @@ All URIs are relative to *http://localhost* Order Book -Get current order book. Note that this request returns limited market depth. If you need to continuously monitor order book updates, please consider using Websocket Market Streams: * `<symbol>@depth<levels>` * `<symbol>@depth` You can use `depth` request together with `<symbol>@depth` streams to maintain a local order book. Retail Price Improvement(RPI) orders are not visible and excluded in the response message. Weight: Adjusted based on the limit: | Limit | Weight | | ------------- | ------ | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | 20 | +Get current order book. Note that this request returns limited market depth. If you need to continuously monitor order book updates, please consider using Websocket Market Streams: * `<symbol>@depth<levels>` * `<symbol>@depth` You can use `depth` request together with `<symbol>@depth` streams to maintain a local order book. **Note:** - Retail Price Improvement(RPI) orders are not visible and excluded in the response message. Weight: Adjusted based on the limit: | Limit | Weight | | ------------- | ------ | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | 20 | ### Example ```java @@ -77,7 +77,7 @@ No authorization required Symbol Order Book Ticker -Best price/qty on the order book for a symbol or symbols. Retail Price Improvement(RPI) orders are not visible and excluded in the response message. * If the symbol is not sent, bookTickers for all symbols will be returned in an array. * The field `X-MBX-USED-WEIGHT-1M` in response header is not accurate from this endpoint, please ignore. Weight: 2 for a single symbol; 5 when the symbol parameter is omitted +Best price/qty on the order book for a symbol or symbols. **Note:** - Retail Price Improvement(RPI) orders are not visible and excluded in the response message. Weight: **2** for a single symbol; **5** when the symbol parameter is omitted Notes: - If the symbol is not sent, bookTickers for all symbols will be returned in an array. - The field `X-MBX-USED-WEIGHT-1M` in response header is not accurate from this endpoint, please ignore. ### Example ```java @@ -113,7 +113,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbolOrderBookTickerRequest** | [**SymbolOrderBookTickerRequest**](SymbolOrderBookTickerRequest.md)| | | +| **symbolOrderBookTickerRequest** | [**SymbolOrderBookTickerRequest**](SymbolOrderBookTickerRequest.md)| | [optional] | ### Return type @@ -139,7 +139,7 @@ No authorization required Symbol Price Ticker -Latest price for a symbol or symbols. * If the symbol is not sent, prices for all symbols will be returned in an array. Weight: 1 for a single symbol; 2 when the symbol parameter is omitted +Latest price for a symbol or symbols. Weight: **1** for a single symbol; **2** when the symbol parameter is omitted Notes: - If the symbol is not sent, prices for all symbols will be returned in an array. ### Example ```java @@ -175,7 +175,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbolPriceTickerRequest** | [**SymbolPriceTickerRequest**](SymbolPriceTickerRequest.md)| | | +| **symbolPriceTickerRequest** | [**SymbolPriceTickerRequest**](SymbolPriceTickerRequest.md)| | [optional] | ### Return type diff --git a/clients/derivatives-trading-usds-futures/docs/ModifyIsolatedPositionMarginRequest.md b/clients/derivatives-trading-usds-futures/docs/ModifyIsolatedPositionMarginRequest.md index 106c111ee..112a4312e 100644 --- a/clients/derivatives-trading-usds-futures/docs/ModifyIsolatedPositionMarginRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/ModifyIsolatedPositionMarginRequest.md @@ -8,9 +8,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**positionSide** | **PositionSide** | | [optional] | -|**amount** | **Double** | | | -|**type** | **String** | | | +|**positionSide** | **String** | Default `BOTH` for One-way Mode ; `LONG` or `SHORT` for Hedge Mode. It must be sent with Hedge Mode. | [optional] | +|**amount** | **Double** | Margin asset | | +|**type** | **Integer** | 1: Add position margin,2: Reduce position margin | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ModifyMultipleOrdersResponseInner.md b/clients/derivatives-trading-usds-futures/docs/ModifyMultipleOrdersResponseInner.md index 1d08bc97b..cd60eab4a 100644 --- a/clients/derivatives-trading-usds-futures/docs/ModifyMultipleOrdersResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/ModifyMultipleOrdersResponseInner.md @@ -12,12 +12,11 @@ |**pair** | **String** | | [optional] | |**status** | **String** | | [optional] | |**clientOrderId** | **String** | | [optional] | +|**modifyId** | **Long** | user-defined modification identifier, only returned if provided in the request | [optional] | |**price** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | |**origQty** | **String** | | [optional] | |**executedQty** | **String** | | [optional] | |**cumQty** | **String** | | [optional] | -|**cumBase** | **String** | | [optional] | |**timeInForce** | **String** | | [optional] | |**type** | **String** | | [optional] | |**reduceOnly** | **Boolean** | | [optional] | @@ -28,9 +27,9 @@ |**workingType** | **String** | | [optional] | |**priceProtect** | **Boolean** | | [optional] | |**origType** | **String** | | [optional] | -|**priceMatch** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | +|**priceMatch** | **String** | price match mode | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auot cancel time for TIF GTD order | [optional] | |**updateTime** | **Long** | | [optional] | |**code** | **Long** | | [optional] | |**msg** | **String** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ModifyOrderRequest.md b/clients/derivatives-trading-usds-futures/docs/ModifyOrderRequest.md index 55d72cbff..245444ffc 100644 --- a/clients/derivatives-trading-usds-futures/docs/ModifyOrderRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/ModifyOrderRequest.md @@ -7,15 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | -|**symbol** | **String** | | | +|**id** | **String** | Id. | [optional] | +|**orderId** | **Long** | Order Id. | [optional] | +|**origClientOrderId** | **String** | Orig Client Order Id. | [optional] | +|**symbol** | **String** | Symbol. | | |**side** | **Side** | | | -|**quantity** | **Double** | | | -|**price** | **Double** | | | +|**quantity** | **Double** | Order quantity, cannot be sent with `closePosition=true` | | +|**price** | **Double** | Price. | | |**priceMatch** | **PriceMatch** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**modifyId** | **Long** | User-defined modification identifier, returned as-is in the response. Optional; not validated for uniqueness. | [optional] | +|**recvWindow** | **Long** | Recv Window. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ModifyOrderResponseResult.md b/clients/derivatives-trading-usds-futures/docs/ModifyOrderResponseResult.md index e4bfc9389..c039075a0 100644 --- a/clients/derivatives-trading-usds-futures/docs/ModifyOrderResponseResult.md +++ b/clients/derivatives-trading-usds-futures/docs/ModifyOrderResponseResult.md @@ -11,12 +11,11 @@ |**symbol** | **String** | | [optional] | |**status** | **String** | | [optional] | |**clientOrderId** | **String** | | [optional] | +|**modifyId** | **Long** | user-defined modification identifier, only returned if provided in the request | [optional] | |**price** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | |**origQty** | **String** | | [optional] | |**executedQty** | **String** | | [optional] | |**cumQty** | **String** | | [optional] | -|**cumQuote** | **String** | | [optional] | |**timeInForce** | **String** | | [optional] | |**type** | **String** | | [optional] | |**reduceOnly** | **Boolean** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexRequest.md b/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexRequest.md deleted file mode 100644 index 88fb0a4d5..000000000 --- a/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# MultiAssetsModeAssetIndexRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | - - - diff --git a/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexResponse.md b/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexResponse.md deleted file mode 100644 index eec9bdeb9..000000000 --- a/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexResponse.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# MultiAssetsModeAssetIndexResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexResponse1.md b/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexResponse1.md deleted file mode 100644 index b3c24d577..000000000 --- a/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexResponse1.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# MultiAssetsModeAssetIndexResponse1 - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**index** | **String** | | [optional] | -|**bidBuffer** | **String** | | [optional] | -|**askBuffer** | **String** | | [optional] | -|**bidRate** | **String** | | [optional] | -|**askRate** | **String** | | [optional] | -|**autoExchangeBidBuffer** | **String** | | [optional] | -|**autoExchangeAskBuffer** | **String** | | [optional] | -|**autoExchangeBidRate** | **String** | | [optional] | -|**autoExchangeAskRate** | **String** | | [optional] | - - - diff --git a/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexResponse2.md b/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexResponse2.md deleted file mode 100644 index 05fe8dfba..000000000 --- a/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexResponse2.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# MultiAssetsModeAssetIndexResponse2 - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexResponse2Inner.md b/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexResponse2Inner.md deleted file mode 100644 index e11ed3f8f..000000000 --- a/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexResponse2Inner.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# MultiAssetsModeAssetIndexResponse2Inner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**index** | **String** | | [optional] | -|**bidBuffer** | **String** | | [optional] | -|**askBuffer** | **String** | | [optional] | -|**bidRate** | **String** | | [optional] | -|**askRate** | **String** | | [optional] | -|**autoExchangeBidBuffer** | **String** | | [optional] | -|**autoExchangeAskBuffer** | **String** | | [optional] | -|**autoExchangeBidRate** | **String** | | [optional] | -|**autoExchangeAskRate** | **String** | | [optional] | - - - diff --git a/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexResponseInner.md b/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexResponseInner.md deleted file mode 100644 index 29621d4a0..000000000 --- a/clients/derivatives-trading-usds-futures/docs/MultiAssetsModeAssetIndexResponseInner.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# MultiAssetsModeAssetIndexResponseInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**B** | **String** | | [optional] | -|**A** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**gLowerCase** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**G** | **String** | | [optional] | - - - diff --git a/clients/derivatives-trading-usds-futures/docs/NewAlgoOrderRequest.md b/clients/derivatives-trading-usds-futures/docs/NewAlgoOrderRequest.md index 1107ac006..3608040bb 100644 --- a/clients/derivatives-trading-usds-futures/docs/NewAlgoOrderRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/NewAlgoOrderRequest.md @@ -7,28 +7,28 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**algoType** | **String** | | | -|**symbol** | **String** | | | +|**id** | **String** | Id. | [optional] | +|**algoType** | **AlgoType** | | | +|**symbol** | **String** | Symbol. | | |**side** | **Side** | | | |**positionSide** | **PositionSide** | | [optional] | -|**type** | **String** | | | +|**type** | **OrderType** | | | |**timeInForce** | **TimeInForce** | | [optional] | -|**quantity** | **Double** | | [optional] | -|**price** | **Double** | | [optional] | -|**triggerPrice** | **Double** | | [optional] | +|**quantity** | **Double** | Cannot be sent with `closePosition`=`true`(Close-All) | [optional] | +|**price** | **Double** | Price. | [optional] | +|**triggerPrice** | **Double** | Trigger Price. | [optional] | |**workingType** | **WorkingType** | | [optional] | |**priceMatch** | **PriceMatch** | | [optional] | -|**closePosition** | **String** | | [optional] | -|**priceProtect** | **String** | | [optional] | -|**reduceOnly** | **String** | | [optional] | -|**activatePrice** | **Double** | | [optional] | -|**callbackRate** | **Double** | | [optional] | -|**clientAlgoId** | **String** | | [optional] | +|**closePosition** | **ClosePosition** | | [optional] | +|**priceProtect** | **PriceProtect** | | [optional] | +|**reduceOnly** | **ReduceOnly** | | [optional] | +|**activatePrice** | **Double** | Used with TRAILING_STOP_MARKET orders, default as the latest price(supporting different workingType) | [optional] | +|**callbackRate** | **Double** | Used with TRAILING_STOP_MARKET orders | [optional] | +|**clientAlgoId** | **String** | A unique id among open orders. Automatically generated if not sent. Can only be string following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,36}$` | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**goodTillDate** | **Long** | order cancel time for timeInForce `GTD`, mandatory when `timeInforce` set to `GTD`; order the timestamp only retains second-level precision, ms part will be ignored; The goodTillDate timestamp must be greater than the current time plus 600 seconds and smaller than 253402300799000 | [optional] | +|**recvWindow** | **Long** | Recv Window. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/NewOrderRequest.md b/clients/derivatives-trading-usds-futures/docs/NewOrderRequest.md index 888e8a9af..9bac8f522 100644 --- a/clients/derivatives-trading-usds-futures/docs/NewOrderRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/NewOrderRequest.md @@ -7,27 +7,21 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | +|**id** | **String** | Id. | [optional] | +|**symbol** | **String** | Symbol. | | |**side** | **Side** | | | |**positionSide** | **PositionSide** | | [optional] | -|**type** | **String** | | | +|**type** | **OrderType** | | | |**timeInForce** | **TimeInForce** | | [optional] | +|**reduceOnly** | **ReduceOnly** | | [optional] | |**quantity** | **Double** | | [optional] | -|**reduceOnly** | **String** | | [optional] | -|**price** | **Double** | | [optional] | -|**newClientOrderId** | **String** | | [optional] | -|**stopPrice** | **Double** | | [optional] | -|**closePosition** | **String** | | [optional] | -|**activationPrice** | **Double** | | [optional] | -|**callbackRate** | **Double** | | [optional] | -|**workingType** | **WorkingType** | | [optional] | -|**priceProtect** | **String** | | [optional] | +|**price** | **Double** | Price. | [optional] | +|**newClientOrderId** | **String** | A unique id among open orders. Automatically generated if not sent. Can only be string following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,36}$` | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**priceMatch** | **PriceMatch** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**goodTillDate** | **Long** | order cancel time for timeInForce `GTD`, mandatory when `timeInforce` set to `GTD`; order the timestamp only retains second-level precision, ms part will be ignored; The goodTillDate timestamp must be greater than the current time plus 600 seconds and smaller than 253402300799000 | [optional] | +|**recvWindow** | **Long** | Recv Window. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/NewOrderResponseResult.md b/clients/derivatives-trading-usds-futures/docs/NewOrderResponseResult.md index d5704ee79..e7539c1bf 100644 --- a/clients/derivatives-trading-usds-futures/docs/NewOrderResponseResult.md +++ b/clients/derivatives-trading-usds-futures/docs/NewOrderResponseResult.md @@ -12,11 +12,9 @@ |**status** | **String** | | [optional] | |**clientOrderId** | **String** | | [optional] | |**price** | **String** | | [optional] | -|**avgPrice** | **String** | | [optional] | |**origQty** | **String** | | [optional] | |**executedQty** | **String** | | [optional] | |**cumQty** | **String** | | [optional] | -|**cumQuote** | **String** | | [optional] | |**timeInForce** | **String** | | [optional] | |**type** | **String** | | [optional] | |**reduceOnly** | **Boolean** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse.md b/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse.md index 91d401101..f9536219e 100644 --- a/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**notionalCoef** | **Double** | | [optional] | +|**notionalCoef** | **Double** | user symbol bracket multiplier, only appears when user's symbol bracket is adjusted | [optional] | |**brackets** | [**List<NotionalAndLeverageBracketsResponse2BracketsInner>**](NotionalAndLeverageBracketsResponse2BracketsInner.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse1Inner.md b/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse1Inner.md index 3c5f2bcec..ef612ff41 100644 --- a/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse1Inner.md +++ b/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse1Inner.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**notionalCoef** | **Double** | | [optional] | +|**notionalCoef** | **Double** | user symbol bracket multiplier, only appears when user's symbol bracket is adjusted | [optional] | |**brackets** | [**List<NotionalAndLeverageBracketsResponse1InnerBracketsInner>**](NotionalAndLeverageBracketsResponse1InnerBracketsInner.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse1InnerBracketsInner.md b/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse1InnerBracketsInner.md index 5bb51622f..3de163cfb 100644 --- a/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse1InnerBracketsInner.md +++ b/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse1InnerBracketsInner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**bracket** | **Long** | | [optional] | -|**initialLeverage** | **Long** | | [optional] | -|**notionalCap** | **Long** | | [optional] | -|**notionalFloor** | **Long** | | [optional] | -|**maintMarginRatio** | **Double** | | [optional] | -|**cum** | **Double** | | [optional] | +|**bracket** | **Long** | Notional bracket | [optional] | +|**initialLeverage** | **Long** | Max initial leverage for this bracket | [optional] | +|**notionalCap** | **Long** | Cap notional of this bracket | [optional] | +|**notionalFloor** | **Long** | Notional threshold of this bracket | [optional] | +|**maintMarginRatio** | **Double** | Maintenance ratio for this bracket | [optional] | +|**cum** | **Double** | Auxiliary number for quick calculation | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse2.md b/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse2.md index 859456eff..190d58510 100644 --- a/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse2.md +++ b/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse2.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**notionalCoef** | **Double** | | [optional] | +|**notionalCoef** | **Double** | user symbol bracket multiplier, only appears when user's symbol bracket is adjusted | [optional] | |**brackets** | [**List<NotionalAndLeverageBracketsResponse2BracketsInner>**](NotionalAndLeverageBracketsResponse2BracketsInner.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse2BracketsInner.md b/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse2BracketsInner.md index 27745fc70..9f6378d2f 100644 --- a/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse2BracketsInner.md +++ b/clients/derivatives-trading-usds-futures/docs/NotionalAndLeverageBracketsResponse2BracketsInner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**bracket** | **Long** | | [optional] | -|**initialLeverage** | **Long** | | [optional] | -|**notionalCap** | **Long** | | [optional] | -|**notionalFloor** | **Long** | | [optional] | -|**maintMarginRatio** | **Double** | | [optional] | -|**cum** | **Long** | | [optional] | +|**bracket** | **Long** | Notional bracket | [optional] | +|**initialLeverage** | **Long** | Max initial leverage for this bracket | [optional] | +|**notionalCap** | **Long** | Cap notional of this bracket | [optional] | +|**notionalFloor** | **Long** | Notional threshold of this bracket | [optional] | +|**maintMarginRatio** | **Double** | Maintenance ratio for this bracket | [optional] | +|**cum** | **Long** | Auxiliary number for quick calculation | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/OldTradesLookupResponseInner.md b/clients/derivatives-trading-usds-futures/docs/OldTradesLookupResponseInner.md index ddbabd220..776b506eb 100644 --- a/clients/derivatives-trading-usds-futures/docs/OldTradesLookupResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/OldTradesLookupResponseInner.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**qty** | **String** | | [optional] | -|**quoteQty** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**isBuyerMaker** | **Boolean** | | [optional] | -|**isRPITrade** | **Boolean** | | [optional] | +|**id** | **Long** | Id. | [optional] | +|**price** | **String** | Price. | [optional] | +|**qty** | **String** | Qty. | [optional] | +|**quoteQty** | **String** | Quote Qty. | [optional] | +|**time** | **Long** | Time. | [optional] | +|**isBuyerMaker** | **Boolean** | Is Buyer Maker. | [optional] | +|**isRPITrade** | **Boolean** | Is RPITrade. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/OpenInterestResponse.md b/clients/derivatives-trading-usds-futures/docs/OpenInterestResponse.md index ce531dcd4..f7468763d 100644 --- a/clients/derivatives-trading-usds-futures/docs/OpenInterestResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/OpenInterestResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**openInterest** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**time** | **Long** | | [optional] | +|**openInterest** | **String** | Open Interest. | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**time** | **Long** | Transaction time | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/OpenInterestStatisticsResponseInner.md b/clients/derivatives-trading-usds-futures/docs/OpenInterestStatisticsResponseInner.md index 4921c71a7..966811a32 100644 --- a/clients/derivatives-trading-usds-futures/docs/OpenInterestStatisticsResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/OpenInterestStatisticsResponseInner.md @@ -8,10 +8,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**sumOpenInterest** | **String** | | [optional] | -|**sumOpenInterestValue** | **String** | | [optional] | -|**cmCCirculatingSupply** | **String** | | [optional] | -|**timestamp** | **String** | | [optional] | +|**sumOpenInterest** | **String** | total open interest | [optional] | +|**sumOpenInterestValue** | **String** | total open interest value | [optional] | +|**cmCCirculatingSupply** | **String** | circulating supply provided by CMC | [optional] | +|**timestamp** | **Long** | Timestamp in milliseconds. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/OrderBookRequest.md b/clients/derivatives-trading-usds-futures/docs/OrderBookRequest.md index 68e072bb5..89891df86 100644 --- a/clients/derivatives-trading-usds-futures/docs/OrderBookRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/OrderBookRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | -|**limit** | **Long** | | [optional] | +|**id** | **String** | Id. | [optional] | +|**symbol** | **String** | Symbol. | | +|**limit** | **Long** | Valid limits:[5, 10, 20, 50, 100, 500, 1000] | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/OrderBookResponse.md b/clients/derivatives-trading-usds-futures/docs/OrderBookResponse.md index 890826e6b..b86cc3fbb 100644 --- a/clients/derivatives-trading-usds-futures/docs/OrderBookResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/OrderBookResponse.md @@ -10,6 +10,8 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderBookResponseResult**](OrderBookResponseResult.md) | | [optional] | +|**bids** | **List<List<String>>** | Bid orders. Each entry is [price, quantity]. | [optional] | +|**asks** | **List<List<String>>** | Ask orders. Each entry is [price, quantity]. | [optional] | |**rateLimits** | [**List<OrderBookResponseRateLimitsInner>**](OrderBookResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/OrderBookResponseAsksItem.md b/clients/derivatives-trading-usds-futures/docs/OrderBookResponseAsksItem.md deleted file mode 100644 index 44fa39180..000000000 --- a/clients/derivatives-trading-usds-futures/docs/OrderBookResponseAsksItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# OrderBookResponseAsksItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/OrderBookResponseBidsItem.md b/clients/derivatives-trading-usds-futures/docs/OrderBookResponseBidsItem.md deleted file mode 100644 index 5f8f02644..000000000 --- a/clients/derivatives-trading-usds-futures/docs/OrderBookResponseBidsItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# OrderBookResponseBidsItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/OrderBookResponseResult.md b/clients/derivatives-trading-usds-futures/docs/OrderBookResponseResult.md index 0c1ab06fa..1b2294b5c 100644 --- a/clients/derivatives-trading-usds-futures/docs/OrderBookResponseResult.md +++ b/clients/derivatives-trading-usds-futures/docs/OrderBookResponseResult.md @@ -8,10 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**lastUpdateId** | **Long** | | [optional] | -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**bids** | **List<OrderBookResponseResultBidsItem>** | | [optional] | -|**asks** | **List<OrderBookResponseResultAsksItem>** | | [optional] | +|**E** | **Long** | Message output time | [optional] | +|**T** | **Long** | Transaction time | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/OrderBookResponseResultAsksItem.md b/clients/derivatives-trading-usds-futures/docs/OrderBookResponseResultAsksItem.md deleted file mode 100644 index 35573312c..000000000 --- a/clients/derivatives-trading-usds-futures/docs/OrderBookResponseResultAsksItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# OrderBookResponseResultAsksItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/OrderBookResponseResultBidsItem.md b/clients/derivatives-trading-usds-futures/docs/OrderBookResponseResultBidsItem.md deleted file mode 100644 index a8579b7ff..000000000 --- a/clients/derivatives-trading-usds-futures/docs/OrderBookResponseResultBidsItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# OrderBookResponseResultBidsItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/OrderTradeUpdate.md b/clients/derivatives-trading-usds-futures/docs/OrderTradeUpdate.md index 064017905..e1da05e23 100644 --- a/clients/derivatives-trading-usds-futures/docs/OrderTradeUpdate.md +++ b/clients/derivatives-trading-usds-futures/docs/OrderTradeUpdate.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction Time | [optional] | |**oLowerCase** | [**OrderTradeUpdateO**](OrderTradeUpdateO.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/OrderTradeUpdateO.md b/clients/derivatives-trading-usds-futures/docs/OrderTradeUpdateO.md index 08e7146d5..e51d20e33 100644 --- a/clients/derivatives-trading-usds-futures/docs/OrderTradeUpdateO.md +++ b/clients/derivatives-trading-usds-futures/docs/OrderTradeUpdateO.md @@ -7,43 +7,44 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**S** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**ap** | **String** | | [optional] | -|**sp** | **String** | | [optional] | -|**xLowerCase** | **String** | | [optional] | -|**X** | **String** | | [optional] | -|**iLowerCase** | **Long** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**zLowerCase** | **String** | | [optional] | -|**L** | **String** | | [optional] | -|**N** | **String** | | [optional] | -|**nLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | -|**tLowerCase** | **Long** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | -|**R** | **Boolean** | | [optional] | -|**wt** | **String** | | [optional] | -|**ot** | **String** | | [optional] | -|**ps** | **String** | | [optional] | -|**cp** | **Boolean** | | [optional] | -|**AP** | **String** | | [optional] | -|**cr** | **String** | | [optional] | -|**pP** | **Boolean** | | [optional] | -|**si** | **Long** | | [optional] | -|**ss** | **Long** | | [optional] | -|**rp** | **String** | | [optional] | -|**V** | **String** | | [optional] | -|**pm** | **String** | | [optional] | -|**gtd** | **Long** | | [optional] | -|**er** | **String** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**cLowerCase** | **String** | Client Order Id | [optional] | +|**S** | **String** | Side | [optional] | +|**oLowerCase** | **String** | Order Type | [optional] | +|**fLowerCase** | **String** | Time in Force | [optional] | +|**qLowerCase** | **String** | Original Quantity | [optional] | +|**pLowerCase** | **String** | Original Price | [optional] | +|**ap** | **String** | Average Price | [optional] | +|**sp** | **String** | Stop Price. Please ignore with TRAILING_STOP_MARKET order | [optional] | +|**xLowerCase** | **String** | Execution Type | [optional] | +|**X** | **String** | Order Status | [optional] | +|**iLowerCase** | **Long** | Order Id | [optional] | +|**M** | **String** | modifyId, only pushed for AMENDMENT (order modification) events when a modifyId was provided in the request | [optional] | +|**lLowerCase** | **String** | Order Last Filled Quantity | [optional] | +|**zLowerCase** | **String** | Order Filled Accumulated Quantity | [optional] | +|**L** | **String** | Last Filled Price | [optional] | +|**N** | **String** | Commission Asset | [optional] | +|**nLowerCase** | **String** | Commission | [optional] | +|**T** | **Long** | Order Trade Time | [optional] | +|**tLowerCase** | **Long** | Trade Id | [optional] | +|**bLowerCase** | **String** | Bids Notional | [optional] | +|**aLowerCase** | **String** | Ask Notional | [optional] | +|**mLowerCase** | **Boolean** | Is this trade the maker side? | [optional] | +|**R** | **Boolean** | Is this reduce only | [optional] | +|**wt** | **String** | Stop Price Working Type | [optional] | +|**ot** | **String** | Original Order Type | [optional] | +|**ps** | **String** | Position Side | [optional] | +|**cp** | **Boolean** | If Close-All, pushed with conditional order | [optional] | +|**AP** | **String** | Activation Price, only pushed with TRAILING_STOP_MARKET order | [optional] | +|**cr** | **String** | Callback Rate, only pushed with TRAILING_STOP_MARKET order | [optional] | +|**pP** | **Boolean** | If price protection is turned on | [optional] | +|**si** | **Long** | ignore | [optional] | +|**ss** | **Long** | ignore | [optional] | +|**rp** | **String** | Realized Profit of the trade | [optional] | +|**V** | **String** | STP mode | [optional] | +|**pm** | **String** | Price match mode | [optional] | +|**gtd** | **Long** | TIF GTD order auto cancel time | [optional] | +|**er** | **String** | Expiry Reason | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/OrderType.md b/clients/derivatives-trading-usds-futures/docs/OrderType.md new file mode 100644 index 000000000..e24ccda97 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/OrderType.md @@ -0,0 +1,13 @@ + + +# OrderType + +## Enum + + +* `LIMIT` (value: `"LIMIT"`) + +* `MARKET` (value: `"MARKET"`) + + + diff --git a/clients/derivatives-trading-usds-futures/docs/PartialBookDepthStreamsRequest.md b/clients/derivatives-trading-usds-futures/docs/PartialBookDepthStreamsRequest.md index 1ccf85f6e..b9e26969e 100644 --- a/clients/derivatives-trading-usds-futures/docs/PartialBookDepthStreamsRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/PartialBookDepthStreamsRequest.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | -|**levels** | **Long** | | | -|**updateSpeed** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | +|**levels** | **Levels** | | [optional] | +|**updateSpeed** | **UpdateSpeed** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/PartialBookDepthStreamsResponse.md b/clients/derivatives-trading-usds-futures/docs/PartialBookDepthStreamsResponse.md index 75bc4521a..cdf94cb69 100644 --- a/clients/derivatives-trading-usds-futures/docs/PartialBookDepthStreamsResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/PartialBookDepthStreamsResponse.md @@ -7,15 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**U** | **Long** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**pu** | **Long** | | [optional] | -|**bLowerCase** | **List<PartialBookDepthStreamsResponseBItem>** | | [optional] | -|**aLowerCase** | **List<PartialBookDepthStreamsResponseAItem>** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**T** | **Long** | Transaction time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**U** | **Long** | First update ID in event | [optional] | +|**uLowerCase** | **Long** | Final update ID in event | [optional] | +|**pu** | **Long** | Final update Id in last stream(ie `u` in last stream) | [optional] | +|**bLowerCase** | **List<List<String>>** | Bids to be updated | [optional] | +|**aLowerCase** | **List<List<String>>** | Asks to be updated | [optional] | +|**ps** | **String** | (After CM migration) Pair symbol | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/PartialBookDepthStreamsResponseAItem.md b/clients/derivatives-trading-usds-futures/docs/PartialBookDepthStreamsResponseAItem.md deleted file mode 100644 index bc99fa2fb..000000000 --- a/clients/derivatives-trading-usds-futures/docs/PartialBookDepthStreamsResponseAItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# PartialBookDepthStreamsResponseAItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/PartialBookDepthStreamsResponseBItem.md b/clients/derivatives-trading-usds-futures/docs/PartialBookDepthStreamsResponseBItem.md deleted file mode 100644 index e10d46136..000000000 --- a/clients/derivatives-trading-usds-futures/docs/PartialBookDepthStreamsResponseBItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# PartialBookDepthStreamsResponseBItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/PlaceMultipleOrdersRequest.md b/clients/derivatives-trading-usds-futures/docs/PlaceMultipleOrdersRequest.md index 22e63396a..7c31f8d3b 100644 --- a/clients/derivatives-trading-usds-futures/docs/PlaceMultipleOrdersRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/PlaceMultipleOrdersRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**batchOrders** | **BatchOrdersPlaceMultipleOrders** | | | +|**batchOrders** | **BatchOrders** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/PlaceMultipleOrdersResponseInner.md b/clients/derivatives-trading-usds-futures/docs/PlaceMultipleOrdersResponseInner.md index be07fb6ca..d25b6842a 100644 --- a/clients/derivatives-trading-usds-futures/docs/PlaceMultipleOrdersResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/PlaceMultipleOrdersResponseInner.md @@ -7,30 +7,28 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**clientOrderId** | **String** | | [optional] | +|**clientOrderId** | **String** | Client Order Id. | [optional] | |**cumQty** | **String** | | [optional] | -|**cumQuote** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**status** | **String** | | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**orderId** | **Long** | Order Id. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | Position Side. | [optional] | +|**status** | **String** | Status. | [optional] | |**stopPrice** | **String** | | [optional] | -|**closePosition** | **Boolean** | | [optional] | -|**symbol** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**priceMatch** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | +|**closePosition** | **Boolean** | Close Position. | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Type. | [optional] | +|**origType** | **String** | Orig Type. | [optional] | +|**updateTime** | **Long** | Update Time. | [optional] | +|**workingType** | **String** | Working Type. | [optional] | +|**priceProtect** | **Boolean** | if conditional order trigger is protected | [optional] | +|**priceMatch** | **String** | price match mode | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auto cancel time for TIF GTD order | [optional] | |**code** | **Long** | | [optional] | |**msg** | **String** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/PortfolioMarginEndpointsApi.md b/clients/derivatives-trading-usds-futures/docs/PortfolioMarginEndpointsApi.md index 80a6e40bc..235ca9d9b 100644 --- a/clients/derivatives-trading-usds-futures/docs/PortfolioMarginEndpointsApi.md +++ b/clients/derivatives-trading-usds-futures/docs/PortfolioMarginEndpointsApi.md @@ -13,7 +13,7 @@ All URIs are relative to *https://fapi.binance.com* Classic Portfolio Margin Account Information (USER_DATA) -Get Classic Portfolio Margin current account information. * maxWithdrawAmount is for asset transfer out to the spot wallet. Weight: 5 +Get Classic Portfolio Margin current account information. Weight(IP): 5 Security Type: USER_DATA Notes: - maxWithdrawAmount is for asset transfer out to the spot wallet. ### Example ```java @@ -30,8 +30,8 @@ public class Example { defaultClient.setBasePath("https://fapi.binance.com"); PortfolioMarginEndpointsApi apiInstance = new PortfolioMarginEndpointsApi(defaultClient); - String asset = "asset_example"; // String | - Long recvWindow = 56L; // Long | + String asset = "BTC"; // String | + Long recvWindow = 5000L; // Long | try { ClassicPortfolioMarginAccountInformationResponse result = apiInstance.classicPortfolioMarginAccountInformation(asset, recvWindow); System.out.println(result); diff --git a/clients/derivatives-trading-usds-futures/docs/PositionAdlQuantileEstimationResponseInnerAdlQuantile.md b/clients/derivatives-trading-usds-futures/docs/PositionAdlQuantileEstimationResponseInnerAdlQuantile.md index bdd41883c..e96a979ea 100644 --- a/clients/derivatives-trading-usds-futures/docs/PositionAdlQuantileEstimationResponseInnerAdlQuantile.md +++ b/clients/derivatives-trading-usds-futures/docs/PositionAdlQuantileEstimationResponseInnerAdlQuantile.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**LONG** | **Long** | | [optional] | -|**SHORT** | **Long** | | [optional] | -|**HEDGE** | **Long** | | [optional] | -|**BOTH** | **Long** | | [optional] | +|**LONG** | **Long** | adl quantile for \"LONG\" position in hedge mode | [optional] | +|**SHORT** | **Long** | adl qauntile for \"SHORT\" position in hedge mode | [optional] | +|**HEDGE** | **Long** | only a sign, ignore the value | [optional] | +|**BOTH** | **Long** | adl qunatile for position in one-way mode | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/PositionInformationRequest.md b/clients/derivatives-trading-usds-futures/docs/PositionInformationRequest.md index 691f0c2b1..4cec9f88d 100644 --- a/clients/derivatives-trading-usds-futures/docs/PositionInformationRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/PositionInformationRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**id** | **String** | Id. | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**recvWindow** | **Long** | Recv Window. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/PositionInformationResponse.md b/clients/derivatives-trading-usds-futures/docs/PositionInformationResponse.md index 5a40e1564..944889af6 100644 --- a/clients/derivatives-trading-usds-futures/docs/PositionInformationResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/PositionInformationResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<PositionInformationResponseResultInner>**](PositionInformationResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountInformationV2ResponseRateLimitsInner>**](AccountInformationV2ResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<AccountInformationResponseRateLimitsInner>**](AccountInformationResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/PositionInformationV2Request.md b/clients/derivatives-trading-usds-futures/docs/PositionInformationV2Request.md index 028b8b6d3..a78485192 100644 --- a/clients/derivatives-trading-usds-futures/docs/PositionInformationV2Request.md +++ b/clients/derivatives-trading-usds-futures/docs/PositionInformationV2Request.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**id** | **String** | Id. | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**recvWindow** | **Long** | Recv Window. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/PositionInformationV2Response.md b/clients/derivatives-trading-usds-futures/docs/PositionInformationV2Response.md index 7e86a4899..0c7227da5 100644 --- a/clients/derivatives-trading-usds-futures/docs/PositionInformationV2Response.md +++ b/clients/derivatives-trading-usds-futures/docs/PositionInformationV2Response.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<PositionInformationV2ResponseResultInner>**](PositionInformationV2ResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountInformationV2ResponseRateLimitsInner>**](AccountInformationV2ResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<AccountInformationResponseRateLimitsInner>**](AccountInformationResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/PositionInformationV2ResponseInner.md b/clients/derivatives-trading-usds-futures/docs/PositionInformationV2ResponseInner.md index 98dab8ee4..8cc2e0b06 100644 --- a/clients/derivatives-trading-usds-futures/docs/PositionInformationV2ResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/PositionInformationV2ResponseInner.md @@ -7,22 +7,22 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**entryPrice** | **String** | | [optional] | -|**breakEvenPrice** | **String** | | [optional] | -|**marginType** | **String** | | [optional] | +|**entryPrice** | **String** | Entry Price. | [optional] | +|**breakEvenPrice** | **String** | Break Even Price. | [optional] | +|**marginType** | **String** | Margin Type. | [optional] | |**isAutoAddMargin** | **String** | | [optional] | -|**isolatedMargin** | **String** | | [optional] | -|**leverage** | **String** | | [optional] | -|**liquidationPrice** | **String** | | [optional] | -|**markPrice** | **String** | | [optional] | -|**maxNotionalValue** | **String** | | [optional] | -|**positionAmt** | **String** | | [optional] | +|**isolatedMargin** | **String** | Isolated Margin. | [optional] | +|**leverage** | **String** | Leverage. | [optional] | +|**liquidationPrice** | **String** | Liquidation Price. | [optional] | +|**markPrice** | **String** | Mark Price. | [optional] | +|**maxNotionalValue** | **String** | Max Notional Value. | [optional] | +|**positionAmt** | **String** | Position Amt. | [optional] | |**notional** | **String** | | [optional] | |**isolatedWallet** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**unRealizedProfit** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**unRealizedProfit** | **String** | Un Realized Profit. | [optional] | +|**positionSide** | **String** | Position Side. | [optional] | +|**updateTime** | **Long** | Update Time. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/PositionInformationV2ResponseResultInner.md b/clients/derivatives-trading-usds-futures/docs/PositionInformationV2ResponseResultInner.md index b0e97127a..d68dfc88a 100644 --- a/clients/derivatives-trading-usds-futures/docs/PositionInformationV2ResponseResultInner.md +++ b/clients/derivatives-trading-usds-futures/docs/PositionInformationV2ResponseResultInner.md @@ -8,25 +8,25 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | +|**positionSide** | **String** | Position Side | [optional] | |**positionAmt** | **String** | | [optional] | |**entryPrice** | **String** | | [optional] | |**breakEvenPrice** | **String** | | [optional] | |**markPrice** | **String** | | [optional] | -|**unRealizedProfit** | **String** | | [optional] | +|**unRealizedProfit** | **String** | Unrealized Profit | [optional] | |**liquidationPrice** | **String** | | [optional] | |**isolatedMargin** | **String** | | [optional] | |**notional** | **String** | | [optional] | |**marginAsset** | **String** | | [optional] | |**isolatedWallet** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**positionInitialMargin** | **String** | | [optional] | -|**openOrderInitialMargin** | **String** | | [optional] | +|**initialMargin** | **String** | Initial Margin | [optional] | +|**maintMargin** | **String** | Maintainance Margin | [optional] | +|**positionInitialMargin** | **String** | Position Initial Margin | [optional] | +|**openOrderInitialMargin** | **String** | Open Order Initial Margin | [optional] | |**adl** | **Long** | | [optional] | |**bidNotional** | **String** | | [optional] | |**askNotional** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**updateTime** | **Long** | Update Time | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/PositionInformationV3ResponseInner.md b/clients/derivatives-trading-usds-futures/docs/PositionInformationV3ResponseInner.md index df505f9b6..8666e9cb8 100644 --- a/clients/derivatives-trading-usds-futures/docs/PositionInformationV3ResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/PositionInformationV3ResponseInner.md @@ -7,26 +7,26 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**positionAmt** | **String** | | [optional] | -|**entryPrice** | **String** | | [optional] | -|**breakEvenPrice** | **String** | | [optional] | -|**markPrice** | **String** | | [optional] | -|**unRealizedProfit** | **String** | | [optional] | -|**liquidationPrice** | **String** | | [optional] | -|**isolatedMargin** | **String** | | [optional] | -|**notional** | **String** | | [optional] | -|**marginAsset** | **String** | | [optional] | -|**isolatedWallet** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**maintMargin** | **String** | | [optional] | -|**positionInitialMargin** | **String** | | [optional] | -|**openOrderInitialMargin** | **String** | | [optional] | -|**adl** | **Long** | | [optional] | -|**bidNotional** | **String** | | [optional] | -|**askNotional** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**symbol** | **String** | symbol | [optional] | +|**positionSide** | **String** | position side | [optional] | +|**positionAmt** | **String** | position amount, positive for long, negative for short | [optional] | +|**entryPrice** | **String** | entry price | [optional] | +|**breakEvenPrice** | **String** | break-even price | [optional] | +|**markPrice** | **String** | current mark price | [optional] | +|**unRealizedProfit** | **String** | unrealized profit | [optional] | +|**liquidationPrice** | **String** | liquidation price | [optional] | +|**isolatedMargin** | **String** | isolated margin | [optional] | +|**notional** | **String** | notional value of position | [optional] | +|**marginAsset** | **String** | margin asset | [optional] | +|**isolatedWallet** | **String** | isolated wallet (if isolated position) | [optional] | +|**initialMargin** | **String** | initial margin required with current mark price | [optional] | +|**maintMargin** | **String** | maintenance margin required | [optional] | +|**positionInitialMargin** | **String** | initial margin required for positions with current mark price | [optional] | +|**openOrderInitialMargin** | **String** | initial margin required for open orders with current mark price | [optional] | +|**adl** | **Long** | auto-deleverage ranking | [optional] | +|**bidNotional** | **String** | ignore | [optional] | +|**askNotional** | **String** | ignore | [optional] | +|**updateTime** | **Long** | update time | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/PremiumIndexKlineDataItem.md b/clients/derivatives-trading-usds-futures/docs/PremiumIndexKlineDataItem.md new file mode 100644 index 000000000..a7d990bf4 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/PremiumIndexKlineDataItem.md @@ -0,0 +1,12 @@ + + +# PremiumIndexKlineDataItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-usds-futures/docs/PremiumIndexKlineDataItemInner.md b/clients/derivatives-trading-usds-futures/docs/PremiumIndexKlineDataItemInner.md new file mode 100644 index 000000000..5ed6247c9 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/PremiumIndexKlineDataItemInner.md @@ -0,0 +1,12 @@ + + +# PremiumIndexKlineDataItemInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/derivatives-trading-usds-futures/docs/PremiumIndexKlineDataResponseItem.md b/clients/derivatives-trading-usds-futures/docs/PremiumIndexKlineDataResponseItem.md deleted file mode 100644 index 506f22c8e..000000000 --- a/clients/derivatives-trading-usds-futures/docs/PremiumIndexKlineDataResponseItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# PremiumIndexKlineDataResponseItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/PremiumIndexKlineDataResponseItemInner.md b/clients/derivatives-trading-usds-futures/docs/PremiumIndexKlineDataResponseItemInner.md deleted file mode 100644 index 7de523a09..000000000 --- a/clients/derivatives-trading-usds-futures/docs/PremiumIndexKlineDataResponseItemInner.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# PremiumIndexKlineDataResponseItemInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/PriceMatch.md b/clients/derivatives-trading-usds-futures/docs/PriceMatch.md index 1801e3c02..214d8c098 100644 --- a/clients/derivatives-trading-usds-futures/docs/PriceMatch.md +++ b/clients/derivatives-trading-usds-futures/docs/PriceMatch.md @@ -5,8 +5,6 @@ ## Enum -* `NONE` (value: `"NONE"`) - * `OPPONENT` (value: `"OPPONENT"`) * `OPPONENT_5` (value: `"OPPONENT_5"`) diff --git a/clients/derivatives-trading-usds-futures/docs/PriceProtect.md b/clients/derivatives-trading-usds-futures/docs/PriceProtect.md new file mode 100644 index 000000000..a4c3ac525 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/PriceProtect.md @@ -0,0 +1,13 @@ + + +# PriceProtect + +## Enum + + +* `TRUE` (value: `"true"`) + +* `FALSE` (value: `"false"`) + + + diff --git a/clients/derivatives-trading-usds-futures/docs/PublicApi.md b/clients/derivatives-trading-usds-futures/docs/PublicApi.md index cb1b5c6a6..2d9da7f75 100644 --- a/clients/derivatives-trading-usds-futures/docs/PublicApi.md +++ b/clients/derivatives-trading-usds-futures/docs/PublicApi.md @@ -17,7 +17,7 @@ All URIs are relative to *http://localhost* All Book Tickers Stream -Pushes any update to the best bid or ask's price or quantity in real-time for all symbols. Retail Price Improvement(RPI) orders are not visible and excluded in the response message. Update Speed: 5s +Pushes any update to the best bid or ask's price or quantity in real-time for all symbols. > **After CM migration**, this stream pushes the merged UM + CM universe (subscribable on both `fstream` and `dstream`); each payload is appended with a new `st` field (`1` = UM, `2` = CM) and a new `ps` field (pair symbol). Update Speed: 5s Response Notes: - Retail Price Improvement(RPI) orders are not visible and excluded in the response message. ### Example ```java @@ -79,7 +79,7 @@ No authorization required Diff. Book Depth Streams -Bids and asks, pushed every 250 milliseconds, 500 milliseconds, 100 milliseconds (if existing) Retail Price Improvement(RPI) orders are not visible and excluded in the response message. Update Speed: 250ms, 500ms, 100ms +Bids and asks, pushed every 250 milliseconds, 500 milliseconds, 100 milliseconds (if existing). > **After CM migration**, the payload is appended with a new `st` field (`1` = UM, `2` = CM) and a new `ps` field (pair symbol). Update Speed: 250ms, 500ms, 100ms Response Notes: - Retail Price Improvement(RPI) orders are not visible and excluded in the response message. ### Example ```java @@ -141,7 +141,7 @@ No authorization required Individual Symbol Book Ticker Streams -Pushes any update to the best bid or ask's price or quantity in real-time for a specified symbol. Retail Price Improvement(RPI) orders are not visible and excluded in the response message. Update Speed: Real-time +Pushes any update to the best bid or ask's price or quantity in real-time for a specified symbol. > **After CM migration**, the payload is appended with a new `st` field (`1` = UM, `2` = CM). Update Speed: Real-time Response Notes: Retail Price Improvement (RPI) orders are not visible and excluded in the response message. ### Example ```java @@ -203,7 +203,7 @@ No authorization required Partial Book Depth Streams -Top **<levels\\>** bids and asks, Valid **<levels\\>** are 5, 10, or 20. Retail Price Improvement(RPI) orders are not visible and excluded in the response message. Update Speed: 250ms, 500ms or 100ms +Top <levels> bids and asks > **After CM migration**, the payload is appended with a new `st` field (`1` = UM, `2` = CM) and a new `ps` field (pair symbol). Update Speed: 250ms or 500ms or 100ms Response Notes: Retail Price Improvement (RPI) orders are not visible and excluded in the response message. ### Example ```java @@ -265,7 +265,7 @@ No authorization required RPI Diff. Book Depth Streams -Bids and asks including RPI orders, pushed every 500 milliseconds RPI(Retail Price Improvement) orders are included and aggreated in the response message. When the quantity of a price level to be updated is equal to 0, it means either all quotations for this price have been filled/canceled, or the quantity of crossed RPI orders for this price are hidden Update Speed: 500ms +Bids and asks including RPI orders, pushed every 500 milliseconds > **After CM migration**, the payload is appended with a new `st` field (`1` = UM, `2` = CM) and a new `ps` field (pair symbol). Update Speed: 500ms Response Notes: - RPI(Retail Price Improvement) orders are included and aggreated in the response message. When the quantity of a price level to be updated is equal to 0, it means either all quotations for this price have been filled/canceled, or the quantity of crossed RPI orders for this price are hidden ### Example ```java diff --git a/clients/derivatives-trading-usds-futures/docs/QueryAlgoOrderResponse.md b/clients/derivatives-trading-usds-futures/docs/QueryAlgoOrderResponse.md index 32fa5b150..02a4b1cd7 100644 --- a/clients/derivatives-trading-usds-futures/docs/QueryAlgoOrderResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/QueryAlgoOrderResponse.md @@ -17,15 +17,13 @@ |**timeInForce** | **String** | | [optional] | |**quantity** | **String** | | [optional] | |**algoStatus** | **String** | | [optional] | -|**actualOrderId** | **String** | | [optional] | -|**actualPrice** | **String** | | [optional] | +|**actualOrderId** | **String** | Empty string if not triggered; orderId if triggered. | [optional] | +|**actualPrice** | **String** | 0 if not triggered; average price if filled/partially filled. | [optional] | +|**actualType** | **String** | Optional field, only present when triggered. | [optional] | +|**actualQty** | **String** | Optional field, only present when filled/partially filled. | [optional] | |**triggerPrice** | **String** | | [optional] | |**price** | **String** | | [optional] | |**icebergQuantity** | **String** | | [optional] | -|**tpTriggerPrice** | **String** | | [optional] | -|**tpPrice** | **String** | | [optional] | -|**slTriggerPrice** | **String** | | [optional] | -|**slPrice** | **String** | | [optional] | |**tpOrderType** | **String** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | |**workingType** | **String** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/QueryCurrentOpenOrderResponse.md b/clients/derivatives-trading-usds-futures/docs/QueryCurrentOpenOrderResponse.md index 7d09e1222..856f5e91f 100644 --- a/clients/derivatives-trading-usds-futures/docs/QueryCurrentOpenOrderResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/QueryCurrentOpenOrderResponse.md @@ -7,32 +7,32 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgPrice** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**cumQuote** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**closePosition** | **Boolean** | | [optional] | -|**symbol** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**priceMatch** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | +|**avgPrice** | **String** | Avg Price. | [optional] | +|**clientOrderId** | **String** | Client Order Id. | [optional] | +|**cumQuote** | **String** | Cum Quote. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**orderId** | **Long** | Order Id. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**origType** | **String** | Orig Type. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**status** | **String** | Status. | [optional] | +|**positionSide** | **String** | Position Side. | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**closePosition** | **Boolean** | if Close-All | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**time** | **Long** | order time | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Type. | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**updateTime** | **Long** | Update Time. | [optional] | +|**workingType** | **String** | Working Type. | [optional] | +|**priceProtect** | **Boolean** | if conditional order trigger is protected | [optional] | +|**priceMatch** | **String** | price match mode | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auot cancel time for TIF GTD order | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/QueryOrderRequest.md b/clients/derivatives-trading-usds-futures/docs/QueryOrderRequest.md index c77b4b84a..04e311ddd 100644 --- a/clients/derivatives-trading-usds-futures/docs/QueryOrderRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/QueryOrderRequest.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | -|**orderId** | **Long** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**id** | **String** | Id. | [optional] | +|**symbol** | **String** | Symbol. | | +|**orderId** | **Long** | Order Id. | [optional] | +|**origClientOrderId** | **String** | Orig Client Order Id. | [optional] | +|**recvWindow** | **Long** | Recv Window. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/QueryOrderResponseResult.md b/clients/derivatives-trading-usds-futures/docs/QueryOrderResponseResult.md index 5e4d08816..f11cd6344 100644 --- a/clients/derivatives-trading-usds-futures/docs/QueryOrderResponseResult.md +++ b/clients/derivatives-trading-usds-futures/docs/QueryOrderResponseResult.md @@ -19,17 +19,20 @@ |**side** | **String** | | [optional] | |**positionSide** | **String** | | [optional] | |**status** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**closePosition** | **Boolean** | | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**closePosition** | **Boolean** | if Close-All | [optional] | |**symbol** | **String** | | [optional] | -|**time** | **Long** | | [optional] | +|**time** | **Long** | order time | [optional] | |**timeInForce** | **String** | | [optional] | |**type** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**updateTime** | **Long** | update time | [optional] | |**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | +|**priceProtect** | **Boolean** | if conditional order trigger is protected | [optional] | +|**priceMatch** | **String** | | [optional] | +|**selfTradePreventionMode** | **String** | Self-trade prevention mode | [optional] | +|**goodTillDate** | **Long** | Order good till date timestamp | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/RecentTradesListResponseInner.md b/clients/derivatives-trading-usds-futures/docs/RecentTradesListResponseInner.md index f68aa4728..a75ef7f5b 100644 --- a/clients/derivatives-trading-usds-futures/docs/RecentTradesListResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/RecentTradesListResponseInner.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**qty** | **String** | | [optional] | -|**quoteQty** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**isBuyerMaker** | **Boolean** | | [optional] | -|**isRPITrade** | **Boolean** | | [optional] | +|**id** | **Long** | Id. | [optional] | +|**price** | **String** | Price. | [optional] | +|**qty** | **String** | Qty. | [optional] | +|**quoteQty** | **String** | Quote Qty. | [optional] | +|**time** | **Long** | Time. | [optional] | +|**isBuyerMaker** | **Boolean** | Is Buyer Maker. | [optional] | +|**isRPITrade** | **Boolean** | Is RPITrade. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ReduceOnly.md b/clients/derivatives-trading-usds-futures/docs/ReduceOnly.md new file mode 100644 index 000000000..7561f86f6 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/ReduceOnly.md @@ -0,0 +1,13 @@ + + +# ReduceOnly + +## Enum + + +* `TRUE` (value: `"true"`) + +* `FALSE` (value: `"false"`) + + + diff --git a/clients/derivatives-trading-usds-futures/docs/RpiDiffBookDepthStreamsRequest.md b/clients/derivatives-trading-usds-futures/docs/RpiDiffBookDepthStreamsRequest.md index 90429336d..209c786be 100644 --- a/clients/derivatives-trading-usds-futures/docs/RpiDiffBookDepthStreamsRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/RpiDiffBookDepthStreamsRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | The symbol parameter | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/RpiDiffBookDepthStreamsResponse.md b/clients/derivatives-trading-usds-futures/docs/RpiDiffBookDepthStreamsResponse.md index 8b8daf83e..c0ca76058 100644 --- a/clients/derivatives-trading-usds-futures/docs/RpiDiffBookDepthStreamsResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/RpiDiffBookDepthStreamsResponse.md @@ -7,15 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**U** | **Long** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**pu** | **Long** | | [optional] | -|**bLowerCase** | **List<RpiDiffBookDepthStreamsResponseBItem>** | | [optional] | -|**aLowerCase** | **List<RpiDiffBookDepthStreamsResponseAItem>** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**T** | **Long** | Transaction time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**U** | **Long** | First update ID in event | [optional] | +|**uLowerCase** | **Long** | Final update ID in event | [optional] | +|**pu** | **Long** | Final update Id in last stream(ie `u` in last stream) | [optional] | +|**bLowerCase** | **List<List<String>>** | Bids to be updated | [optional] | +|**aLowerCase** | **List<List<String>>** | Asks to be updated | [optional] | +|**ps** | **String** | (After CM migration) Pair symbol | [optional] | +|**st** | **Integer** | (After CM migration) Symbol type: 1 = UM, 2 = CM | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/RpiDiffBookDepthStreamsResponseAItem.md b/clients/derivatives-trading-usds-futures/docs/RpiDiffBookDepthStreamsResponseAItem.md deleted file mode 100644 index 75ad8c302..000000000 --- a/clients/derivatives-trading-usds-futures/docs/RpiDiffBookDepthStreamsResponseAItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# RpiDiffBookDepthStreamsResponseAItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/RpiDiffBookDepthStreamsResponseBItem.md b/clients/derivatives-trading-usds-futures/docs/RpiDiffBookDepthStreamsResponseBItem.md deleted file mode 100644 index 0aaebe20c..000000000 --- a/clients/derivatives-trading-usds-futures/docs/RpiDiffBookDepthStreamsResponseBItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# RpiDiffBookDepthStreamsResponseBItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/RpiOrderBookResponse.md b/clients/derivatives-trading-usds-futures/docs/RpiOrderBookResponse.md index e1231c828..6903547a7 100644 --- a/clients/derivatives-trading-usds-futures/docs/RpiOrderBookResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/RpiOrderBookResponse.md @@ -8,10 +8,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**lastUpdateId** | **Long** | | [optional] | -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**bids** | **List<RpiOrderBookResponseBidsItem>** | | [optional] | -|**asks** | **List<RpiOrderBookResponseAsksItem>** | | [optional] | +|**E** | **Long** | Message output time | [optional] | +|**T** | **Long** | Transaction time | [optional] | +|**bids** | **List<List<String>>** | Bid orders. Each entry is [price, quantity]. | [optional] | +|**asks** | **List<List<String>>** | Ask orders. Each entry is [price, quantity]. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/RpiOrderBookResponseAsksItem.md b/clients/derivatives-trading-usds-futures/docs/RpiOrderBookResponseAsksItem.md deleted file mode 100644 index 7d07a6d95..000000000 --- a/clients/derivatives-trading-usds-futures/docs/RpiOrderBookResponseAsksItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# RpiOrderBookResponseAsksItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/RpiOrderBookResponseBidsItem.md b/clients/derivatives-trading-usds-futures/docs/RpiOrderBookResponseBidsItem.md deleted file mode 100644 index 51659ff77..000000000 --- a/clients/derivatives-trading-usds-futures/docs/RpiOrderBookResponseBidsItem.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# RpiOrderBookResponseBidsItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/derivatives-trading-usds-futures/docs/SelfTradePreventionMode.md b/clients/derivatives-trading-usds-futures/docs/SelfTradePreventionMode.md index c01165439..e69eda69f 100644 --- a/clients/derivatives-trading-usds-futures/docs/SelfTradePreventionMode.md +++ b/clients/derivatives-trading-usds-futures/docs/SelfTradePreventionMode.md @@ -5,6 +5,8 @@ ## Enum +* `NONE` (value: `"NONE"`) + * `EXPIRE_TAKER` (value: `"EXPIRE_TAKER"`) * `EXPIRE_BOTH` (value: `"EXPIRE_BOTH"`) diff --git a/clients/derivatives-trading-usds-futures/docs/SendQuoteRequestRequest.md b/clients/derivatives-trading-usds-futures/docs/SendQuoteRequestRequest.md index 233bcf4ee..260a15e8e 100644 --- a/clients/derivatives-trading-usds-futures/docs/SendQuoteRequestRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/SendQuoteRequestRequest.md @@ -9,9 +9,9 @@ |------------ | ------------- | ------------- | -------------| |**fromAsset** | **String** | | | |**toAsset** | **String** | | | -|**fromAmount** | **Double** | | [optional] | -|**toAmount** | **Double** | | [optional] | -|**validTime** | **String** | | [optional] | +|**fromAmount** | **Double** | When specified, it is the amount you will be debited after the conversion | [optional] | +|**toAmount** | **Double** | When specified, it is the amount you will be credited after the conversion | [optional] | +|**validTime** | **String** | 10s, default 10s | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/StartUserDataStreamRequest.md b/clients/derivatives-trading-usds-futures/docs/StartUserDataStreamRequest.md index e31deee3b..adc63cc57 100644 --- a/clients/derivatives-trading-usds-futures/docs/StartUserDataStreamRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/StartUserDataStreamRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | +|**id** | **String** | Id. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/StrategyUpdate.md b/clients/derivatives-trading-usds-futures/docs/StrategyUpdate.md index cf642fdff..dae334a49 100644 --- a/clients/derivatives-trading-usds-futures/docs/StrategyUpdate.md +++ b/clients/derivatives-trading-usds-futures/docs/StrategyUpdate.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**T** | **Long** | | [optional] | -|**E** | **Long** | | [optional] | +|**T** | **Long** | Transaction Time | [optional] | +|**E** | **Long** | Event Time | [optional] | |**su** | [**StrategyUpdateSu**](StrategyUpdateSu.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/StrategyUpdateSu.md b/clients/derivatives-trading-usds-futures/docs/StrategyUpdateSu.md index e9329247c..21fd32e8d 100644 --- a/clients/derivatives-trading-usds-futures/docs/StrategyUpdateSu.md +++ b/clients/derivatives-trading-usds-futures/docs/StrategyUpdateSu.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**si** | **Long** | | [optional] | -|**st** | **String** | | [optional] | -|**ss** | **String** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**ut** | **Long** | | [optional] | -|**cLowerCase** | **Long** | | [optional] | +|**si** | **Long** | Strategy ID | [optional] | +|**st** | **String** | Strategy Type | [optional] | +|**ss** | **String** | Strategy Status | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**ut** | **Long** | Update Time | [optional] | +|**cLowerCase** | **Long** | opCode | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerRequest.md b/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerRequest.md index baa8f4ce6..005a67c35 100644 --- a/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | +|**id** | **String** | Id. | [optional] | +|**symbol** | **String** | Symbol. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse.md b/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse.md index 601c3a021..d09c621b6 100644 --- a/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | -|**result** | [**List<SymbolOrderBookTickerResponse1Result>**](SymbolOrderBookTickerResponse1Result.md) | | [optional] | +|**result** | [**List<SymbolOrderBookTickerResponse2ResultInner>**](SymbolOrderBookTickerResponse2ResultInner.md) | | [optional] | |**rateLimits** | [**List<SymbolOrderBookTickerResponse1RateLimitsInner>**](SymbolOrderBookTickerResponse1RateLimitsInner.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse1Result.md b/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse1Result.md index 7ec3b02d2..4e93d09e6 100644 --- a/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse1Result.md +++ b/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse1Result.md @@ -13,7 +13,7 @@ |**bidQty** | **String** | | [optional] | |**askPrice** | **String** | | [optional] | |**askQty** | **String** | | [optional] | -|**time** | **Long** | | [optional] | +|**time** | **Long** | Transaction time | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse2.md b/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse2.md index 243cf348c..4e9a21a4a 100644 --- a/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse2.md +++ b/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse2.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | -|**result** | [**List<SymbolOrderBookTickerResponse1Result>**](SymbolOrderBookTickerResponse1Result.md) | | [optional] | +|**result** | [**List<SymbolOrderBookTickerResponse2ResultInner>**](SymbolOrderBookTickerResponse2ResultInner.md) | | [optional] | |**rateLimits** | [**List<SymbolOrderBookTickerResponse1RateLimitsInner>**](SymbolOrderBookTickerResponse1RateLimitsInner.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse2Inner.md b/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse2Inner.md index 7e2773b21..4ce4fb108 100644 --- a/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse2Inner.md +++ b/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse2Inner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**bidPrice** | **String** | | [optional] | -|**bidQty** | **String** | | [optional] | -|**askPrice** | **String** | | [optional] | -|**askQty** | **String** | | [optional] | -|**time** | **Long** | | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**bidPrice** | **String** | Bid Price. | [optional] | +|**bidQty** | **String** | Bid Qty. | [optional] | +|**askPrice** | **String** | Ask Price. | [optional] | +|**askQty** | **String** | Ask Qty. | [optional] | +|**time** | **Long** | Transaction time | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse2ResultInner.md b/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse2ResultInner.md new file mode 100644 index 000000000..b8fd35ba7 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/SymbolOrderBookTickerResponse2ResultInner.md @@ -0,0 +1,19 @@ + + +# SymbolOrderBookTickerResponse2ResultInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**lastUpdateId** | **Long** | | [optional] | +|**symbol** | **String** | | [optional] | +|**bidPrice** | **String** | | [optional] | +|**bidQty** | **String** | | [optional] | +|**askPrice** | **String** | | [optional] | +|**askQty** | **String** | | [optional] | +|**time** | **Long** | Transaction time | [optional] | + + + diff --git a/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerRequest.md b/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerRequest.md index f8150220d..ea5b466d6 100644 --- a/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | +|**id** | **String** | Id. | [optional] | +|**symbol** | **String** | Symbol. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse.md b/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse.md index 89477e2ab..4d33a2dbc 100644 --- a/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | -|**result** | [**List<SymbolPriceTickerResponse1Result>**](SymbolPriceTickerResponse1Result.md) | | [optional] | +|**result** | [**List<SymbolPriceTickerResponse2ResultInner>**](SymbolPriceTickerResponse2ResultInner.md) | | [optional] | |**rateLimits** | [**List<SymbolOrderBookTickerResponse1RateLimitsInner>**](SymbolOrderBookTickerResponse1RateLimitsInner.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse1Result.md b/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse1Result.md index 66555fbd9..d163c2aef 100644 --- a/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse1Result.md +++ b/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse1Result.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | |**price** | **String** | | [optional] | -|**time** | **Long** | | [optional] | +|**time** | **Long** | Transaction time | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse2.md b/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse2.md index aece809a9..805d06912 100644 --- a/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse2.md +++ b/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse2.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | -|**result** | [**List<SymbolPriceTickerResponse1Result>**](SymbolPriceTickerResponse1Result.md) | | [optional] | +|**result** | [**List<SymbolPriceTickerResponse2ResultInner>**](SymbolPriceTickerResponse2ResultInner.md) | | [optional] | |**rateLimits** | [**List<SymbolOrderBookTickerResponse1RateLimitsInner>**](SymbolOrderBookTickerResponse1RateLimitsInner.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse2Inner.md b/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse2Inner.md new file mode 100644 index 000000000..6003d6e44 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse2Inner.md @@ -0,0 +1,15 @@ + + +# SymbolPriceTickerResponse2Inner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**symbol** | **String** | Symbol. | [optional] | +|**price** | **String** | Price. | [optional] | +|**time** | **Long** | Transaction time | [optional] | + + + diff --git a/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse2ResultInner.md b/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse2ResultInner.md new file mode 100644 index 000000000..f911b2a98 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerResponse2ResultInner.md @@ -0,0 +1,15 @@ + + +# SymbolPriceTickerResponse2ResultInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**symbol** | **String** | | [optional] | +|**price** | **String** | | [optional] | +|**time** | **Long** | Transaction time | [optional] | + + + diff --git a/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerV2Response.md b/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerV2Response.md index c08094357..c20b68197 100644 --- a/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerV2Response.md +++ b/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerV2Response.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**time** | **Long** | | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**price** | **String** | Price. | [optional] | +|**time** | **Long** | Transaction time | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerV2Response1.md b/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerV2Response1.md index 7166dac36..118e4b0d5 100644 --- a/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerV2Response1.md +++ b/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerV2Response1.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**time** | **Long** | | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**price** | **String** | Price. | [optional] | +|**time** | **Long** | Transaction time | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerV2Response2Inner.md b/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerV2Response2Inner.md deleted file mode 100644 index 7a932127c..000000000 --- a/clients/derivatives-trading-usds-futures/docs/SymbolPriceTickerV2Response2Inner.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SymbolPriceTickerV2Response2Inner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**time** | **Long** | | [optional] | - - - diff --git a/clients/derivatives-trading-usds-futures/docs/TakerBuySellVolumeResponseInner.md b/clients/derivatives-trading-usds-futures/docs/TakerBuySellVolumeResponseInner.md index a8beccf76..1db2fe2ca 100644 --- a/clients/derivatives-trading-usds-futures/docs/TakerBuySellVolumeResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/TakerBuySellVolumeResponseInner.md @@ -10,7 +10,7 @@ |**buySellRatio** | **String** | | [optional] | |**buyVol** | **String** | | [optional] | |**sellVol** | **String** | | [optional] | -|**timestamp** | **String** | | [optional] | +|**timestamp** | **Long** | Timestamp in milliseconds. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/TestOrderRequest.md b/clients/derivatives-trading-usds-futures/docs/TestOrderRequest.md index 89d36d6c8..924a25a7f 100644 --- a/clients/derivatives-trading-usds-futures/docs/TestOrderRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/TestOrderRequest.md @@ -10,22 +10,22 @@ |**symbol** | **String** | | | |**side** | **Side** | | | |**positionSide** | **PositionSide** | | [optional] | -|**type** | **String** | | | -|**timeInForce** | **TimeInForce** | | [optional] | -|**quantity** | **Double** | | [optional] | -|**reduceOnly** | **String** | | [optional] | +|**type** | **OrderType** | | | +|**reduceOnly** | **ReduceOnly** | | [optional] | +|**quantity** | **Double** | Cannot be sent with `closePosition`=`true`(Close-All) | [optional] | |**price** | **Double** | | [optional] | -|**newClientOrderId** | **String** | | [optional] | -|**stopPrice** | **Double** | | [optional] | -|**closePosition** | **String** | | [optional] | -|**activationPrice** | **Double** | | [optional] | -|**callbackRate** | **Double** | | [optional] | +|**newClientOrderId** | **String** | A unique id among open orders. Automatically generated if not sent. Can only be string following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,36}$` | [optional] | +|**stopPrice** | **Double** | Used with `STOP/STOP_MARKET` or `TAKE_PROFIT/TAKE_PROFIT_MARKET` orders. | [optional] | +|**closePosition** | **ClosePosition** | | [optional] | +|**activationPrice** | **Double** | Used with `TRAILING_STOP_MARKET` orders, default as the latest price(supporting different `workingType`) | [optional] | +|**callbackRate** | **Double** | Used with `TRAILING_STOP_MARKET` orders | [optional] | +|**timeInForce** | **TimeInForce** | | [optional] | |**workingType** | **WorkingType** | | [optional] | -|**priceProtect** | **String** | | [optional] | +|**priceProtect** | **PriceProtect** | | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**priceMatch** | **PriceMatch** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | +|**goodTillDate** | **Long** | order cancel time for timeInForce `GTD`, mandatory when `timeInforce` set to `GTD`; order the timestamp only retains second-level precision, ms part will be ignored; The goodTillDate timestamp must be greater than the current time plus 600 seconds and smaller than 253402300799000 | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/TestOrderResponse.md b/clients/derivatives-trading-usds-futures/docs/TestOrderResponse.md index b6f8c3354..3d0de23da 100644 --- a/clients/derivatives-trading-usds-futures/docs/TestOrderResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/TestOrderResponse.md @@ -7,32 +7,32 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**clientOrderId** | **String** | | [optional] | +|**clientOrderId** | **String** | Client Order Id. | [optional] | |**cumQty** | **String** | | [optional] | -|**cumQuote** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**avgPrice** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**reduceOnly** | **Boolean** | | [optional] | -|**side** | **String** | | [optional] | -|**positionSide** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**closePosition** | **Boolean** | | [optional] | -|**symbol** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**origType** | **String** | | [optional] | -|**activatePrice** | **String** | | [optional] | -|**priceRate** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**workingType** | **String** | | [optional] | -|**priceProtect** | **Boolean** | | [optional] | -|**priceMatch** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**goodTillDate** | **Long** | | [optional] | +|**cumQuote** | **String** | Cum Quote. | [optional] | +|**executedQty** | **String** | Executed Qty. | [optional] | +|**orderId** | **Long** | Order Id. | [optional] | +|**avgPrice** | **String** | Avg Price. | [optional] | +|**origQty** | **String** | Orig Qty. | [optional] | +|**price** | **String** | Price. | [optional] | +|**reduceOnly** | **Boolean** | Reduce Only. | [optional] | +|**side** | **String** | Side. | [optional] | +|**positionSide** | **String** | Position Side. | [optional] | +|**status** | **String** | Status. | [optional] | +|**stopPrice** | **String** | please ignore when order type is TRAILING_STOP_MARKET | [optional] | +|**closePosition** | **Boolean** | if Close-All | [optional] | +|**symbol** | **String** | Symbol. | [optional] | +|**timeInForce** | **String** | Time In Force. | [optional] | +|**type** | **String** | Type. | [optional] | +|**origType** | **String** | Orig Type. | [optional] | +|**activatePrice** | **String** | activation price, only return with TRAILING_STOP_MARKET order | [optional] | +|**priceRate** | **String** | callback rate, only return with TRAILING_STOP_MARKET order | [optional] | +|**updateTime** | **Long** | Update Time. | [optional] | +|**workingType** | **String** | Working Type. | [optional] | +|**priceProtect** | **Boolean** | if conditional order trigger is protected | [optional] | +|**priceMatch** | **String** | price match mode | [optional] | +|**selfTradePreventionMode** | **String** | self trading preventation mode | [optional] | +|**goodTillDate** | **Long** | order pre-set auot cancel time for TIF GTD order | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/Ticker24hrPriceChangeStatisticsResponse.md b/clients/derivatives-trading-usds-futures/docs/Ticker24hrPriceChangeStatisticsResponse.md index 9ddbdbf8d..50e8fe680 100644 --- a/clients/derivatives-trading-usds-futures/docs/Ticker24hrPriceChangeStatisticsResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/Ticker24hrPriceChangeStatisticsResponse.md @@ -8,21 +8,21 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**priceChange** | **String** | | [optional] | -|**priceChangePercent** | **String** | | [optional] | -|**weightedAvgPrice** | **String** | | [optional] | -|**lastPrice** | **String** | | [optional] | -|**lastQty** | **String** | | [optional] | -|**openPrice** | **String** | | [optional] | -|**highPrice** | **String** | | [optional] | -|**lowPrice** | **String** | | [optional] | -|**volume** | **String** | | [optional] | -|**quoteVolume** | **String** | | [optional] | -|**openTime** | **Long** | | [optional] | -|**closeTime** | **Long** | | [optional] | -|**firstId** | **Long** | | [optional] | -|**lastId** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**priceChange** | **String** | Price Change. | [optional] | +|**priceChangePercent** | **String** | Price Change Percent. | [optional] | +|**weightedAvgPrice** | **String** | Weighted Avg Price. | [optional] | +|**lastPrice** | **String** | Last Price. | [optional] | +|**lastQty** | **String** | Last Qty. | [optional] | +|**openPrice** | **String** | Open Price. | [optional] | +|**highPrice** | **String** | High Price. | [optional] | +|**lowPrice** | **String** | Low Price. | [optional] | +|**volume** | **String** | Volume. | [optional] | +|**quoteVolume** | **String** | Quote Volume. | [optional] | +|**openTime** | **Long** | Open Time. | [optional] | +|**closeTime** | **Long** | Close Time. | [optional] | +|**firstId** | **Long** | First tradeId | [optional] | +|**lastId** | **Long** | Last tradeId | [optional] | +|**count** | **Long** | Trade count | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/Ticker24hrPriceChangeStatisticsResponse1.md b/clients/derivatives-trading-usds-futures/docs/Ticker24hrPriceChangeStatisticsResponse1.md index 763065925..7ef5ed0c2 100644 --- a/clients/derivatives-trading-usds-futures/docs/Ticker24hrPriceChangeStatisticsResponse1.md +++ b/clients/derivatives-trading-usds-futures/docs/Ticker24hrPriceChangeStatisticsResponse1.md @@ -8,21 +8,21 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**priceChange** | **String** | | [optional] | -|**priceChangePercent** | **String** | | [optional] | -|**weightedAvgPrice** | **String** | | [optional] | -|**lastPrice** | **String** | | [optional] | -|**lastQty** | **String** | | [optional] | -|**openPrice** | **String** | | [optional] | -|**highPrice** | **String** | | [optional] | -|**lowPrice** | **String** | | [optional] | -|**volume** | **String** | | [optional] | -|**quoteVolume** | **String** | | [optional] | -|**openTime** | **Long** | | [optional] | -|**closeTime** | **Long** | | [optional] | -|**firstId** | **Long** | | [optional] | -|**lastId** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**priceChange** | **String** | Price Change. | [optional] | +|**priceChangePercent** | **String** | Price Change Percent. | [optional] | +|**weightedAvgPrice** | **String** | Weighted Avg Price. | [optional] | +|**lastPrice** | **String** | Last Price. | [optional] | +|**lastQty** | **String** | Last Qty. | [optional] | +|**openPrice** | **String** | Open Price. | [optional] | +|**highPrice** | **String** | High Price. | [optional] | +|**lowPrice** | **String** | Low Price. | [optional] | +|**volume** | **String** | Volume. | [optional] | +|**quoteVolume** | **String** | Quote Volume. | [optional] | +|**openTime** | **Long** | Open Time. | [optional] | +|**closeTime** | **Long** | Close Time. | [optional] | +|**firstId** | **Long** | First tradeId | [optional] | +|**lastId** | **Long** | Last tradeId | [optional] | +|**count** | **Long** | Trade count | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/Ticker24hrPriceChangeStatisticsResponse2Inner.md b/clients/derivatives-trading-usds-futures/docs/Ticker24hrPriceChangeStatisticsResponse2Inner.md index 04f14c867..32bf765a1 100644 --- a/clients/derivatives-trading-usds-futures/docs/Ticker24hrPriceChangeStatisticsResponse2Inner.md +++ b/clients/derivatives-trading-usds-futures/docs/Ticker24hrPriceChangeStatisticsResponse2Inner.md @@ -8,21 +8,21 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**priceChange** | **String** | | [optional] | -|**priceChangePercent** | **String** | | [optional] | -|**weightedAvgPrice** | **String** | | [optional] | -|**lastPrice** | **String** | | [optional] | -|**lastQty** | **String** | | [optional] | -|**openPrice** | **String** | | [optional] | -|**highPrice** | **String** | | [optional] | -|**lowPrice** | **String** | | [optional] | -|**volume** | **String** | | [optional] | -|**quoteVolume** | **String** | | [optional] | -|**openTime** | **Long** | | [optional] | -|**closeTime** | **Long** | | [optional] | -|**firstId** | **Long** | | [optional] | -|**lastId** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**priceChange** | **String** | Price Change. | [optional] | +|**priceChangePercent** | **String** | Price Change Percent. | [optional] | +|**weightedAvgPrice** | **String** | Weighted Avg Price. | [optional] | +|**lastPrice** | **String** | Last Price. | [optional] | +|**lastQty** | **String** | Last Qty. | [optional] | +|**openPrice** | **String** | Open Price. | [optional] | +|**highPrice** | **String** | High Price. | [optional] | +|**lowPrice** | **String** | Low Price. | [optional] | +|**volume** | **String** | Volume. | [optional] | +|**quoteVolume** | **String** | Quote Volume. | [optional] | +|**openTime** | **Long** | Open Time. | [optional] | +|**closeTime** | **Long** | Close Time. | [optional] | +|**firstId** | **Long** | First tradeId | [optional] | +|**lastId** | **Long** | Last tradeId | [optional] | +|**count** | **Long** | Trade count | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/ToggleBnbBurnOnFuturesTradeRequest.md b/clients/derivatives-trading-usds-futures/docs/ToggleBnbBurnOnFuturesTradeRequest.md index 0602f0f66..10f08339c 100644 --- a/clients/derivatives-trading-usds-futures/docs/ToggleBnbBurnOnFuturesTradeRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/ToggleBnbBurnOnFuturesTradeRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**feeBurn** | **String** | | | +|**feeBurn** | **String** | \"true\": Fee Discount On; \"false\": Fee Discount Off | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/TopTraderLongShortRatioAccountsResponseInner.md b/clients/derivatives-trading-usds-futures/docs/TopTraderLongShortRatioAccountsResponseInner.md index bc4b6d33d..4c5a298aa 100644 --- a/clients/derivatives-trading-usds-futures/docs/TopTraderLongShortRatioAccountsResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/TopTraderLongShortRatioAccountsResponseInner.md @@ -8,10 +8,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**longShortRatio** | **String** | | [optional] | -|**longAccount** | **String** | | [optional] | -|**shortAccount** | **String** | | [optional] | -|**timestamp** | **String** | | [optional] | +|**longShortRatio** | **String** | long/short account num ratio of top traders | [optional] | +|**longAccount** | **String** | long account num ratio of top traders | [optional] | +|**shortAccount** | **String** | long account num ratio of top traders | [optional] | +|**timestamp** | **Long** | Timestamp in milliseconds. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/TopTraderLongShortRatioPositionsResponseInner.md b/clients/derivatives-trading-usds-futures/docs/TopTraderLongShortRatioPositionsResponseInner.md index 2909c2583..fac56f161 100644 --- a/clients/derivatives-trading-usds-futures/docs/TopTraderLongShortRatioPositionsResponseInner.md +++ b/clients/derivatives-trading-usds-futures/docs/TopTraderLongShortRatioPositionsResponseInner.md @@ -8,10 +8,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**longShortRatio** | **String** | | [optional] | -|**longAccount** | **String** | | [optional] | -|**shortAccount** | **String** | | [optional] | -|**timestamp** | **String** | | [optional] | +|**longShortRatio** | **String** | long/short position ratio of top traders | [optional] | +|**longAccount** | **String** | long positions ratio of top traders | [optional] | +|**shortAccount** | **String** | short positions ratio of top traders | [optional] | +|**timestamp** | **Long** | Timestamp in milliseconds. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/TradeApi.md b/clients/derivatives-trading-usds-futures/docs/TradeApi.md index 60b04215e..875cffea9 100644 --- a/clients/derivatives-trading-usds-futures/docs/TradeApi.md +++ b/clients/derivatives-trading-usds-futures/docs/TradeApi.md @@ -7,8 +7,8 @@ All URIs are relative to *http://localhost* | [**cancelAlgoOrder**](TradeApi.md#cancelAlgoOrder) | **POST** /algoOrder.cancel | Cancel Algo Order (TRADE) | | [**cancelOrder**](TradeApi.md#cancelOrder) | **POST** /order.cancel | Cancel Order (TRADE) | | [**modifyOrder**](TradeApi.md#modifyOrder) | **POST** /order.modify | Modify Order (TRADE) | -| [**newAlgoOrder**](TradeApi.md#newAlgoOrder) | **POST** /algoOrder.place | New Algo Order(TRADE) | -| [**newOrder**](TradeApi.md#newOrder) | **POST** /order.place | New Order(TRADE) | +| [**newAlgoOrder**](TradeApi.md#newAlgoOrder) | **POST** /algoOrder.place | New Algo Order (TRADE) | +| [**newOrder**](TradeApi.md#newOrder) | **POST** /order.place | New Order (TRADE) | | [**positionInformation**](TradeApi.md#positionInformation) | **POST** /account.position | Position Information (USER_DATA) | | [**positionInformationV2**](TradeApi.md#positionInformationV2) | **POST** /v2/account.position | Position Information V2 (USER_DATA) | | [**queryOrder**](TradeApi.md#queryOrder) | **POST** /order.status | Query Order (USER_DATA) | @@ -20,7 +20,7 @@ All URIs are relative to *http://localhost* Cancel Algo Order (TRADE) -Cancel an active algo order. * Either `algoId` or `clientAlgoId` must be sent. Weight: 1 +Cancel an active algo order. Weight(IP): 1 Security Type: TRADE Notes: - Either `algoId` or `clientAlgoId` must be sent. ### Example ```java @@ -56,7 +56,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **cancelAlgoOrderRequest** | [**CancelAlgoOrderRequest**](CancelAlgoOrderRequest.md)| | | +| **cancelAlgoOrderRequest** | [**CancelAlgoOrderRequest**](CancelAlgoOrderRequest.md)| | [optional] | ### Return type @@ -82,7 +82,7 @@ No authorization required Cancel Order (TRADE) -Cancel an active order. * Either `orderId` or `origClientOrderId` must be sent. Weight: 1 +Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - Either `orderId` or `origClientOrderId` must be sent. ### Example ```java @@ -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 * Either `orderId` or `origClientOrderId` must be sent, and the `orderId` will prevail if both are sent. * Both `quantity` and `price` must be sent, which is different from dapi modify order endpoint. * When the new `quantity` or `price` doesn'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 `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 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) +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 `orderId` or `origClientOrderId` must be sent, and the `orderId` will prevail if both are sent. - Both `quantity` and `price` must be sent. *(After CM migration, the dapi modify order endpoint follows the same rule.)* - When the new `quantity` or `price` doesn'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 `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 ### Example ```java @@ -204,9 +204,9 @@ No authorization required # **newAlgoOrder** > NewAlgoOrderResponse newAlgoOrder(newAlgoOrderRequest) -New Algo Order(TRADE) +New Algo Order (TRADE) -Send in a new algo order. * Condition orders will be triggered when: * If parameter`priceProtect`is sent as true: * when price reaches the `triggerPrice` ,the difference rate between \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the symbol * \"triggerProtect\" of a symbol can be got from `GET /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `triggerPrice` * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `triggerPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `triggerPrice` * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `triggerPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed <= `activatePrice`, and the latest price >= the lowest price * (1 + `callbackRate`) * SELL: the highest price after order placed >= `activatePrice`, and the latest price <= the highest price * (1 - `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. ``{\"code\": -2021, \"msg\": \"Order would immediately trigger.\"}`` means that the parameters you send do not meet the following requirements: * BUY: `activatePrice` should be smaller than latest price. * SELL: `activatePrice` should be larger than latest price. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with `closePosition`=`true`: * Follow the same rules for condition orders. * If triggered,**close all** current long position( if `SELL`) or current short position( if `BUY`). * Cannot be used with `quantity` paremeter * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with `BUY` orders in `LONG` position side. and cannot be used with `SELL` orders in `SHORT` position side * `selfTradePreventionMode` is only effective when `timeInForce` set to `IOC` or `GTC` or `GTD`. Weight: 0 +Send in a new algo order. Weight(IP): 0 Security Type: TRADE Notes: - Condition orders will be triggered when: > - If parameter`priceProtect`is sent as true: - when price reaches the `triggerPrice` ,the difference rate between \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the symbol - \"triggerProtect\" of a symbol can be got from `GET /fapi/v1/exchangeInfo` > - `STOP`, `STOP_MARKET`: - BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `triggerPrice` - SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `triggerPrice` - `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `triggerPrice` - SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `triggerPrice` - `TRAILING_STOP_MARKET`: - BUY: the lowest price after order placed <= `activatePrice`, and the latest price >= the lowest price * (1 + `callbackRate`) - SELL: the highest price after order placed >= `activatePrice`, and the latest price <= the highest price * (1 - `callbackRate`) > - For `TRAILING_STOP_MARKET`, if you got such error code. > ``{\"code\": -2021, \"msg\": \"Order would immediately trigger.\"}`` > means that the parameters you send do not meet the following requirements: - BUY: `activatePrice` should be smaller than latest price. - SELL: `activatePrice` should be larger than latest price. > - `STOP_MARKET`, `TAKE_PROFIT_MARKET` with `closePosition`=`true`: - Follow the same rules for condition orders. - If triggered,**close all** current long position( if `SELL`) or current short position( if `BUY`). - Cannot be used with `quantity` paremeter - Cannot be used with `reduceOnly` parameter - In Hedge Mode,cannot be used with `BUY` orders in `LONG` position side. and cannot be used with `SELL` orders in `SHORT` position side - `selfTradePreventionMode` is only effective when `timeInForce` set to `IOC` or `GTC` or `GTD`. ### Example ```java @@ -266,9 +266,9 @@ No authorization required # **newOrder** > NewOrderResponse newOrder(newOrderRequest) -New Order(TRADE) +New Order (TRADE) -Send in a new order. * Order with type `STOP`, parameter `timeInForce` can be sent ( default `GTC`). * Order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent ( default `GTC`). * Condition orders will be triggered when: * If parameter`priceProtect`is sent as true: * when price reaches the `stopPrice` ,the difference rate between \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the symbol * \"triggerProtect\" of a symbol can be got from `GET /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed `<= `activationPrice`, and the latest price >`= the lowest price * (1 + `callbackRate`) * SELL: the highest price after order placed >= `activationPrice`, and the latest price <= the highest price * (1 - `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. ``{\"code\": -2021, \"msg\": \"Order would immediately trigger.\"}`` means that the parameters you send do not meet the following requirements: * BUY: `activationPrice` should be smaller than latest price. * SELL: `activationPrice` should be larger than latest price. * If `newOrderRespType ` is sent as `RESULT` : * `MARKET` order: the final FILLED result of the order will be return directly. * `LIMIT` order with special `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be returned directly. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with `closePosition`=`true`: * Follow the same rules for condition orders. * If triggered,**close all** current long position( if `SELL`) or current short position( if `BUY`). * Cannot be used with `quantity` paremeter * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with `BUY` orders in `LONG` position side. and cannot be used with `SELL` orders in `SHORT` position side Weight: 0 +Send in a new order. Weight(IP): 0 Security Type: TRADE Notes: Additional mandatory parameters based on `type`: - `LIMIT`: `timeInForce`, `quantity`, `price` - `MARKET`: `quantity` > * If `newOrderRespType` is sent as `RESULT`: > * `MARKET` order: the final FILLED result of the order will be return directly. > * `LIMIT` order with special `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be returned directly. > > * `selfTradePreventionMode` is only effective when `timeInForce` set to `IOC` or `GTC` or `GTD`. > * In extreme market conditions, timeInForce `GTD` order auto cancel time might be delayed comparing to `goodTillDate` ### Example ```java @@ -330,7 +330,7 @@ No authorization required Position Information (USER_DATA) -Get current position information. * Please use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 5 +Get current position information. Weight(IP): 5 Security Type: USER_DATA Notes: - Please use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. ### Example ```java @@ -366,7 +366,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **positionInformationRequest** | [**PositionInformationRequest**](PositionInformationRequest.md)| | | +| **positionInformationRequest** | [**PositionInformationRequest**](PositionInformationRequest.md)| | [optional] | ### Return type @@ -392,7 +392,7 @@ No authorization required Position Information V2 (USER_DATA) -Get current position information(only symbol that has position or open orders will be returned). * Please use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 5 +Get current position information(only symbol that has position or open orders will be returned). Weight(IP): 5 Security Type: USER_DATA Notes: - Please use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. ### Example ```java @@ -428,7 +428,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **positionInformationV2Request** | [**PositionInformationV2Request**](PositionInformationV2Request.md)| | | +| **positionInformationV2Request** | [**PositionInformationV2Request**](PositionInformationV2Request.md)| | [optional] | ### Return type @@ -454,7 +454,7 @@ No authorization required Query Order (USER_DATA) -Check an order's status. * These orders will not be found: * order status is `CANCELED` or `EXPIRED` **AND** order has NO filled trade **AND** created time + 3 days < current time * order create time + 90 days < current time * Either `orderId` or `origClientOrderId` must be sent. * `orderId` is self-increment for each specific `symbol` Weight: 1 +Check an order's status. * These orders will not be found: * order status is `CANCELED` or `EXPIRED` **AND** order has NO filled trade **AND** created time + 3 days < current time * order create time + 90 days < current time Weight(IP): 1 Security Type: USER_DATA Notes: Notes: - Either `orderId` or `origClientOrderId` must be sent. - `orderId` is self-increment for each specific `symbol` ### Example ```java @@ -508,5 +508,5 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Order | - | +| **200** | Order Status | - | diff --git a/clients/derivatives-trading-usds-futures/docs/TradeLite.md b/clients/derivatives-trading-usds-futures/docs/TradeLite.md index 8a2df1438..61692aae4 100644 --- a/clients/derivatives-trading-usds-futures/docs/TradeLite.md +++ b/clients/derivatives-trading-usds-futures/docs/TradeLite.md @@ -7,18 +7,18 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**S** | **String** | | [optional] | -|**L** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**tLowerCase** | **Long** | | [optional] | -|**iLowerCase** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction Time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**qLowerCase** | **String** | Original Quantity | [optional] | +|**pLowerCase** | **String** | Original Price | [optional] | +|**mLowerCase** | **Boolean** | Is this trade the maker side? | [optional] | +|**cLowerCase** | **String** | Client Order Id | [optional] | +|**S** | **String** | Side | [optional] | +|**L** | **String** | Last Filled Price | [optional] | +|**lLowerCase** | **String** | Order Last Filled Quantity | [optional] | +|**tLowerCase** | **Long** | Trade Id | [optional] | +|**iLowerCase** | **Long** | Order Id | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/TradingScheduleResponseMarketSchedules.md b/clients/derivatives-trading-usds-futures/docs/TradingScheduleResponseMarketSchedules.md index 850be4a14..bd2df3c30 100644 --- a/clients/derivatives-trading-usds-futures/docs/TradingScheduleResponseMarketSchedules.md +++ b/clients/derivatives-trading-usds-futures/docs/TradingScheduleResponseMarketSchedules.md @@ -9,6 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**EQUITY** | [**TradingScheduleResponseMarketSchedulesEQUITY**](TradingScheduleResponseMarketSchedulesEQUITY.md) | | [optional] | |**COMMODITY** | [**TradingScheduleResponseMarketSchedulesCOMMODITY**](TradingScheduleResponseMarketSchedulesCOMMODITY.md) | | [optional] | +|**KR_EQUITY** | [**TradingScheduleResponseMarketSchedulesKREQUITY**](TradingScheduleResponseMarketSchedulesKREQUITY.md) | | [optional] | +|**HK_EQUITY** | [**TradingScheduleResponseMarketSchedulesHKEQUITY**](TradingScheduleResponseMarketSchedulesHKEQUITY.md) | | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/TradingScheduleResponseMarketSchedulesHKEQUITY.md b/clients/derivatives-trading-usds-futures/docs/TradingScheduleResponseMarketSchedulesHKEQUITY.md new file mode 100644 index 000000000..51a6d15cb --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/TradingScheduleResponseMarketSchedulesHKEQUITY.md @@ -0,0 +1,13 @@ + + +# TradingScheduleResponseMarketSchedulesHKEQUITY + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sessions** | [**List<TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner>**](TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner.md) | | [optional] | + + + diff --git a/clients/derivatives-trading-usds-futures/docs/TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner.md b/clients/derivatives-trading-usds-futures/docs/TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner.md new file mode 100644 index 000000000..ca2f35c17 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner.md @@ -0,0 +1,15 @@ + + +# TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**startTime** | **Long** | | [optional] | +|**endTime** | **Long** | | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/clients/derivatives-trading-usds-futures/docs/TradingScheduleResponseMarketSchedulesKREQUITY.md b/clients/derivatives-trading-usds-futures/docs/TradingScheduleResponseMarketSchedulesKREQUITY.md new file mode 100644 index 000000000..b6b651e10 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/TradingScheduleResponseMarketSchedulesKREQUITY.md @@ -0,0 +1,13 @@ + + +# TradingScheduleResponseMarketSchedulesKREQUITY + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sessions** | [**List<TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner>**](TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner.md) | | [optional] | + + + diff --git a/clients/derivatives-trading-usds-futures/docs/TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner.md b/clients/derivatives-trading-usds-futures/docs/TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner.md new file mode 100644 index 000000000..678d51a82 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner.md @@ -0,0 +1,15 @@ + + +# TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**startTime** | **Long** | | [optional] | +|**endTime** | **Long** | | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/clients/derivatives-trading-usds-futures/docs/TradingSessionStreamRequest.md b/clients/derivatives-trading-usds-futures/docs/TradingSessionStreamRequest.md index 1ce03f671..1811841c5 100644 --- a/clients/derivatives-trading-usds-futures/docs/TradingSessionStreamRequest.md +++ b/clients/derivatives-trading-usds-futures/docs/TradingSessionStreamRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/TradingSessionStreamResponse.md b/clients/derivatives-trading-usds-futures/docs/TradingSessionStreamResponse.md index 9c2371092..5ab07918f 100644 --- a/clients/derivatives-trading-usds-futures/docs/TradingSessionStreamResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/TradingSessionStreamResponse.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**tLowerCase** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**S** | **String** | | [optional] | +|**eLowerCase** | **String** | Event type, can also be CommodityUpdate, KR_EquityUpdate or HK_EquityUpdate | [optional] | +|**E** | **Long** | Event time | [optional] | +|**tLowerCase** | **Long** | Session start time | [optional] | +|**T** | **Long** | Session end time | [optional] | +|**S** | **String** | Session type | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/UpdateSpeed.md b/clients/derivatives-trading-usds-futures/docs/UpdateSpeed.md new file mode 100644 index 000000000..2605774ce --- /dev/null +++ b/clients/derivatives-trading-usds-futures/docs/UpdateSpeed.md @@ -0,0 +1,13 @@ + + +# UpdateSpeed + +## Enum + + +* `UPDATE_SPEED_100ms` (value: `"100ms"`) + +* `UPDATE_SPEED_500ms` (value: `"500ms"`) + + + diff --git a/clients/derivatives-trading-usds-futures/docs/UserCommissionRateResponse.md b/clients/derivatives-trading-usds-futures/docs/UserCommissionRateResponse.md index 2c8669b9a..5963a68d9 100644 --- a/clients/derivatives-trading-usds-futures/docs/UserCommissionRateResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/UserCommissionRateResponse.md @@ -8,9 +8,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**makerCommissionRate** | **String** | | [optional] | -|**takerCommissionRate** | **String** | | [optional] | -|**rpiCommissionRate** | **String** | | [optional] | +|**makerCommissionRate** | **String** | 0.02% | [optional] | +|**takerCommissionRate** | **String** | 0.04% | [optional] | +|**rpiCommissionRate** | **String** | 0.005% | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/UserDataStreamEventsResponse.md b/clients/derivatives-trading-usds-futures/docs/UserDataStreamEventsResponse.md index fcf6c8bd3..56b0eaf67 100644 --- a/clients/derivatives-trading-usds-futures/docs/UserDataStreamEventsResponse.md +++ b/clients/derivatives-trading-usds-futures/docs/UserDataStreamEventsResponse.md @@ -7,27 +7,27 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **String** | | [optional] | -|**T** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**T** | **Long** | Transaction Time | [optional] | |**ac** | [**AccountConfigUpdateAc**](AccountConfigUpdateAc.md) | | [optional] | |**ai** | [**AccountConfigUpdateAi**](AccountConfigUpdateAi.md) | | [optional] | -|**oLowerCase** | [**OrderTradeUpdateO**](OrderTradeUpdateO.md) | | [optional] | |**aLowerCase** | [**AccountUpdateA**](AccountUpdateA.md) | | [optional] | +|**oLowerCase** | [**OrderTradeUpdateO**](OrderTradeUpdateO.md) | | [optional] | |**or** | [**ConditionalOrderTriggerRejectOr**](ConditionalOrderTriggerRejectOr.md) | | [optional] | |**gu** | [**GridUpdateGu**](GridUpdateGu.md) | | [optional] | -|**cw** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**su** | [**StrategyUpdateSu**](StrategyUpdateSu.md) | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**S** | **String** | | [optional] | -|**L** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**tLowerCase** | **Long** | | [optional] | -|**iLowerCase** | **Long** | | [optional] | |**listenKey** | **String** | | [optional] | +|**cw** | **String** | Cross Wallet Balance. Only pushed with crossed position margin call | [optional] | +|**pLowerCase** | **String** | Original Price | [optional] | +|**su** | [**StrategyUpdateSu**](StrategyUpdateSu.md) | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**qLowerCase** | **String** | Original Quantity | [optional] | +|**mLowerCase** | **Boolean** | Is this trade the maker side? | [optional] | +|**cLowerCase** | **String** | Client Order Id | [optional] | +|**S** | **String** | Side | [optional] | +|**L** | **String** | Last Filled Price | [optional] | +|**lLowerCase** | **String** | Order Last Filled Quantity | [optional] | +|**tLowerCase** | **Long** | Trade Id | [optional] | +|**iLowerCase** | **Long** | Order Id | [optional] | diff --git a/clients/derivatives-trading-usds-futures/docs/UserDataStreamsApi.md b/clients/derivatives-trading-usds-futures/docs/UserDataStreamsApi.md index e6085cdc3..4fd3285b9 100644 --- a/clients/derivatives-trading-usds-futures/docs/UserDataStreamsApi.md +++ b/clients/derivatives-trading-usds-futures/docs/UserDataStreamsApi.md @@ -15,7 +15,7 @@ All URIs are relative to *http://localhost* Close User Data Stream (USER_STREAM) -Close out a user data stream. Weight: 1 +Close out a user data stream. Weight(IP): 1 Security Type: USER_STREAM ### Example ```java @@ -51,7 +51,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **closeUserDataStreamRequest** | [**CloseUserDataStreamRequest**](CloseUserDataStreamRequest.md)| | | +| **closeUserDataStreamRequest** | [**CloseUserDataStreamRequest**](CloseUserDataStreamRequest.md)| | [optional] | ### Return type @@ -77,7 +77,7 @@ No authorization required Keepalive User Data Stream (USER_STREAM) -Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 60 minutes. Weight: 1 +Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 60 minutes. Weight(IP): 1 Security Type: USER_STREAM ### Example ```java @@ -113,7 +113,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **keepaliveUserDataStreamRequest** | [**KeepaliveUserDataStreamRequest**](KeepaliveUserDataStreamRequest.md)| | | +| **keepaliveUserDataStreamRequest** | [**KeepaliveUserDataStreamRequest**](KeepaliveUserDataStreamRequest.md)| | [optional] | ### Return type @@ -139,7 +139,7 @@ No authorization required Start User Data Stream (USER_STREAM) -Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 1 +Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight(IP): 1 Security Type: USER_STREAM ### Example ```java @@ -175,7 +175,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **startUserDataStreamRequest** | [**StartUserDataStreamRequest**](StartUserDataStreamRequest.md)| | | +| **startUserDataStreamRequest** | [**StartUserDataStreamRequest**](StartUserDataStreamRequest.md)| | [optional] | ### Return type diff --git a/clients/derivatives-trading-usds-futures/docs/rest-api/migration-guide.md b/clients/derivatives-trading-usds-futures/docs/rest-api/migration-guide.md index a02e114bb..e9b77433e 100644 --- a/clients/derivatives-trading-usds-futures/docs/rest-api/migration-guide.md +++ b/clients/derivatives-trading-usds-futures/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-derivatives-trading-usds-futures - 11.0.0 + 12.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-derivatives-trading-usds-futures - 11.0.0 + 12.0.0 ``` diff --git a/clients/derivatives-trading-usds-futures/example_rest.md b/clients/derivatives-trading-usds-futures/example_rest.md index bd054e84f..8a917b1d0 100644 --- a/clients/derivatives-trading-usds-futures/example_rest.md +++ b/clients/derivatives-trading-usds-futures/example_rest.md @@ -1,202 +1,202 @@ ## Account -[GET /fapi/v2/account](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2) - accountInformationV2 - [AccountInformationV2Example.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/AccountInformationV2Example.java#L48) +[GET /fapi/v2/account](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#account-information-v2) - accountInformationV2 - [AccountInformationV2Example.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/AccountInformationV2Example.java#L38) -[GET /fapi/v3/account](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V3) - accountInformationV3 - [AccountInformationV3Example.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/AccountInformationV3Example.java#L48) +[GET /fapi/v3/account](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#account-information-v3) - accountInformationV3 - [AccountInformationV3Example.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/AccountInformationV3Example.java#L38) -[GET /fapi/v2/balance](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V2) - futuresAccountBalanceV2 - [FuturesAccountBalanceV2Example.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountBalanceV2Example.java#L47) +[GET /fapi/v2/balance](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-account-balance-v2) - futuresAccountBalanceV2 - [FuturesAccountBalanceV2Example.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountBalanceV2Example.java#L36) -[GET /fapi/v3/balance](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V3) - futuresAccountBalanceV3 - [FuturesAccountBalanceV3Example.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountBalanceV3Example.java#L47) +[GET /fapi/v3/balance](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-account-balance-v3) - futuresAccountBalanceV3 - [FuturesAccountBalanceV3Example.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountBalanceV3Example.java#L36) -[GET /fapi/v1/accountConfig](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Config) - futuresAccountConfiguration - [FuturesAccountConfigurationExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountConfigurationExample.java#L47) +[GET /fapi/v1/accountConfig](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-account-configuration) - futuresAccountConfiguration - [FuturesAccountConfigurationExample.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountConfigurationExample.java#L36) -[GET /fapi/v1/apiTradingStatus](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Futures-Trading-Quantitative-Rules-Indicators) - futuresTradingQuantitativeRulesIndicators - [FuturesTradingQuantitativeRulesIndicatorsExample.java:50](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesTradingQuantitativeRulesIndicatorsExample.java#L50) +[GET /fapi/v1/apiTradingStatus](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-trading-quantitative-rules-indicators) - futuresTradingQuantitativeRulesIndicators - [FuturesTradingQuantitativeRulesIndicatorsExample.java:40](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesTradingQuantitativeRulesIndicatorsExample.java#L40) -[GET /fapi/v1/feeBurn](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-BNB-Burn-Status) - getBnbBurnStatus - [GetBnbBurnStatusExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetBnbBurnStatusExample.java#L47) +[GET /fapi/v1/feeBurn](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-bnb-burn-status) - getBnbBurnStatus - [GetBnbBurnStatusExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetBnbBurnStatusExample.java#L37) -[GET /fapi/v1/multiAssetsMargin](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Current-Multi-Assets-Mode) - getCurrentMultiAssetsMode - [GetCurrentMultiAssetsModeExample.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetCurrentMultiAssetsModeExample.java#L48) +[GET /fapi/v1/multiAssetsMargin](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-current-multi-assets-mode) - getCurrentMultiAssetsMode - [GetCurrentMultiAssetsModeExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetCurrentMultiAssetsModeExample.java#L37) -[GET /fapi/v1/positionSide/dual](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Current-Position-Mode) - getCurrentPositionMode - [GetCurrentPositionModeExample.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetCurrentPositionModeExample.java#L48) +[GET /fapi/v1/positionSide/dual](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-current-position-mode) - getCurrentPositionMode - [GetCurrentPositionModeExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetCurrentPositionModeExample.java#L37) -[GET /fapi/v1/order/asyn](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Order-History) - getDownloadIdForFuturesOrderHistory - [GetDownloadIdForFuturesOrderHistoryExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesOrderHistoryExample.java#L49) +[GET /fapi/v1/order/asyn](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-download-id-for-futures-order-history) - getDownloadIdForFuturesOrderHistory - [GetDownloadIdForFuturesOrderHistoryExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesOrderHistoryExample.java#L38) -[GET /fapi/v1/trade/asyn](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Trade-History) - getDownloadIdForFuturesTradeHistory - [GetDownloadIdForFuturesTradeHistoryExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesTradeHistoryExample.java#L49) +[GET /fapi/v1/trade/asyn](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-download-id-for-futures-trade-history) - getDownloadIdForFuturesTradeHistory - [GetDownloadIdForFuturesTradeHistoryExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesTradeHistoryExample.java#L38) -[GET /fapi/v1/income/asyn](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Transaction-History) - getDownloadIdForFuturesTransactionHistory - [GetDownloadIdForFuturesTransactionHistoryExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesTransactionHistoryExample.java#L49) +[GET /fapi/v1/income/asyn](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-download-id-for-futures-transaction-history) - getDownloadIdForFuturesTransactionHistory - [GetDownloadIdForFuturesTransactionHistoryExample.java:39](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesTransactionHistoryExample.java#L39) -[GET /fapi/v1/order/asyn/id](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Order-History-Download-Link-by-Id) - getFuturesOrderHistoryDownloadLinkById - [GetFuturesOrderHistoryDownloadLinkByIdExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesOrderHistoryDownloadLinkByIdExample.java#L47) +[GET /fapi/v1/order/asyn/id](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-futures-order-history-download-link-by-id) - getFuturesOrderHistoryDownloadLinkById - [GetFuturesOrderHistoryDownloadLinkByIdExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesOrderHistoryDownloadLinkByIdExample.java#L37) -[GET /fapi/v1/trade/asyn/id](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Trade-Download-Link-by-Id) - getFuturesTradeDownloadLinkById - [GetFuturesTradeDownloadLinkByIdExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesTradeDownloadLinkByIdExample.java#L47) +[GET /fapi/v1/trade/asyn/id](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-futures-trade-download-link-by-id) - getFuturesTradeDownloadLinkById - [GetFuturesTradeDownloadLinkByIdExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesTradeDownloadLinkByIdExample.java#L37) -[GET /fapi/v1/income/asyn/id](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Transaction-History-Download-Link-by-Id) - getFuturesTransactionHistoryDownloadLinkById - [GetFuturesTransactionHistoryDownloadLinkByIdExample.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesTransactionHistoryDownloadLinkByIdExample.java#L48) +[GET /fapi/v1/income/asyn/id](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-futures-transaction-history-download-link-by-id) - getFuturesTransactionHistoryDownloadLinkById - [GetFuturesTransactionHistoryDownloadLinkByIdExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesTransactionHistoryDownloadLinkByIdExample.java#L37) -[GET /fapi/v1/income](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Income-History) - getIncomeHistory - [GetIncomeHistoryExample.java:50](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetIncomeHistoryExample.java#L50) +[GET /fapi/v1/income](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-income-history) - getIncomeHistory - [GetIncomeHistoryExample.java:41](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetIncomeHistoryExample.java#L41) -[GET /fapi/v1/leverageBracket](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Notional-and-Leverage-Brackets) - notionalAndLeverageBrackets - [NotionalAndLeverageBracketsExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/NotionalAndLeverageBracketsExample.java#L47) +[GET /fapi/v1/leverageBracket](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#notional-and-leverage-brackets) - notionalAndLeverageBrackets - [NotionalAndLeverageBracketsExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/NotionalAndLeverageBracketsExample.java#L37) -[GET /fapi/v1/rateLimit/order](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Query-Rate-Limit) - queryUserRateLimit - [QueryUserRateLimitExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/QueryUserRateLimitExample.java#L47) +[GET /fapi/v1/rateLimit/order](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#query-user-rate-limit) - queryUserRateLimit - [QueryUserRateLimitExample.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/QueryUserRateLimitExample.java#L36) -[GET /fapi/v1/symbolConfig](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Symbol-Config) - symbolConfiguration - [SymbolConfigurationExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/SymbolConfigurationExample.java#L47) +[GET /fapi/v1/symbolConfig](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#symbol-configuration) - symbolConfiguration - [SymbolConfigurationExample.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/SymbolConfigurationExample.java#L36) -[POST /fapi/v1/feeBurn](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Toggle-BNB-Burn-On-Futures-Trade) - toggleBnbBurnOnFuturesTrade - [ToggleBnbBurnOnFuturesTradeExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/ToggleBnbBurnOnFuturesTradeExample.java#L49) +[POST /fapi/v1/feeBurn](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#toggle-bnb-burn-on-futures-trade) - toggleBnbBurnOnFuturesTrade - [ToggleBnbBurnOnFuturesTradeExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/ToggleBnbBurnOnFuturesTradeExample.java#L38) -[GET /fapi/v1/commissionRate](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate) - userCommissionRate - [UserCommissionRateExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/UserCommissionRateExample.java#L47) +[GET /fapi/v1/commissionRate](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#user-commission-rate) - userCommissionRate - [UserCommissionRateExample.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/UserCommissionRateExample.java#L36) ## Convert -[POST /fapi/v1/convert/acceptQuote](https://developers.binance.com/docs/derivatives/usds-margined-futures/convert/Accept-Quote) - acceptTheOfferedQuote - [AcceptTheOfferedQuoteExample.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/AcceptTheOfferedQuoteExample.java#L48) +[POST /fapi/v1/convert/acceptQuote](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/convert#accept-the-offered-quote) - acceptTheOfferedQuote - [AcceptTheOfferedQuoteExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/AcceptTheOfferedQuoteExample.java#L37) -[GET /fapi/v1/convert/exchangeInfo](https://developers.binance.com/docs/derivatives/usds-margined-futures/convert/) - listAllConvertPairs - [ListAllConvertPairsExample.java:50](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/ListAllConvertPairsExample.java#L50) +[GET /fapi/v1/convert/exchangeInfo](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/convert#list-all-convert-pairs) - listAllConvertPairs - [ListAllConvertPairsExample.java:39](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/ListAllConvertPairsExample.java#L39) -[GET /fapi/v1/convert/orderStatus](https://developers.binance.com/docs/derivatives/usds-margined-futures/convert/Order-Status) - orderStatus - [OrderStatusExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/OrderStatusExample.java#L47) +[GET /fapi/v1/convert/orderStatus](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/convert#order-status) - orderStatus - [OrderStatusExample.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/OrderStatusExample.java#L36) -[POST /fapi/v1/convert/getQuote](https://developers.binance.com/docs/derivatives/usds-margined-futures/convert/Send-quote-request) - sendQuoteRequest - [SendQuoteRequestExample.java:50](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/SendQuoteRequestExample.java#L50) +[POST /fapi/v1/convert/getQuote](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/convert#send-quote-request) - sendQuoteRequest - [SendQuoteRequestExample.java:39](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/SendQuoteRequestExample.java#L39) ## MarketData -[GET /fapi/v1/symbolAdlRisk](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/ADL-Risk) - adlRisk - [AdlRiskExample.java:51](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/AdlRiskExample.java#L51) +[GET /fapi/v1/symbolAdlRisk](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#adl-risk) - adlRisk - [AdlRiskExample.java:40](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/AdlRiskExample.java#L40) -[GET /futures/data/basis](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Basis) - basis - [BasisExample.java:50](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/BasisExample.java#L50) +[GET /fapi/v1/assetIndex](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#asset-index) - assetIndex - [AssetIndexExample.java:40](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/AssetIndexExample.java#L40) -[GET /fapi/v1/time](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time) - checkServerTime - [CheckServerTimeExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CheckServerTimeExample.java#L47) +[GET /futures/data/basis](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#basis) - basis - [BasisExample.java:39](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/BasisExample.java#L39) -[GET /fapi/v1/indexInfo](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Composite-Index-Symbol-Information) - compositeIndexSymbolInformation - [CompositeIndexSymbolInformationExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CompositeIndexSymbolInformationExample.java#L47) +[GET /fapi/v1/time](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#check-server-time) - checkServerTime - [CheckServerTimeExample.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CheckServerTimeExample.java#L36) -[GET /fapi/v1/aggTrades](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List) - compressedAggregateTradesList - [CompressedAggregateTradesListExample.java:58](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CompressedAggregateTradesListExample.java#L58) +[GET /fapi/v1/indexInfo](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#composite-index-symbol-information) - compositeIndexSymbolInformation - [CompositeIndexSymbolInformationExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CompositeIndexSymbolInformationExample.java#L37) -[GET /fapi/v1/continuousKlines](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data) - continuousContractKlineCandlestickData - [ContinuousContractKlineCandlestickDataExample.java:53](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/ContinuousContractKlineCandlestickDataExample.java#L53) +[GET /fapi/v1/aggTrades](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#compressed-aggregate-trades-list) - compressedAggregateTradesList - [CompressedAggregateTradesListExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CompressedAggregateTradesListExample.java#L47) -[GET /fapi/v1/exchangeInfo](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information) - exchangeInformation - [ExchangeInformationExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/ExchangeInformationExample.java#L47) +[GET /fapi/v1/continuousKlines](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#continuous-contract-kline-candlestick-data) - continuousContractKlineCandlestickData - [ContinuousContractKlineCandlestickDataExample.java:41](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/ContinuousContractKlineCandlestickDataExample.java#L41) -[GET /fapi/v1/fundingRate](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History) - getFundingRateHistory - [GetFundingRateHistoryExample.java:51](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/GetFundingRateHistoryExample.java#L51) +[GET /fapi/v1/exchangeInfo](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#exchange-information) - exchangeInformation - [ExchangeInformationExample.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/ExchangeInformationExample.java#L36) -[GET /fapi/v1/fundingInfo](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-Info) - getFundingRateInfo - [GetFundingRateInfoExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/GetFundingRateInfoExample.java#L49) +[GET /fapi/v1/fundingRate](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#get-funding-rate-history) - getFundingRateHistory - [GetFundingRateHistoryExample.java:40](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/GetFundingRateHistoryExample.java#L40) -[GET /fapi/v1/indexPriceKlines](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data) - indexPriceKlineCandlestickData - [IndexPriceKlineCandlestickDataExample.java:51](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/IndexPriceKlineCandlestickDataExample.java#L51) +[GET /fapi/v1/fundingInfo](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#get-funding-rate-info) - getFundingRateInfo - [GetFundingRateInfoExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/GetFundingRateInfoExample.java#L38) -[GET /fapi/v1/klines](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data) - klineCandlestickData - [KlineCandlestickDataExample.java:51](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/KlineCandlestickDataExample.java#L51) +[GET /fapi/v1/indexPriceKlines](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#index-price-kline-candlestick-data) - indexPriceKlineCandlestickData - [IndexPriceKlineCandlestickDataExample.java:40](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/IndexPriceKlineCandlestickDataExample.java#L40) -[GET /futures/data/globalLongShortAccountRatio](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Long-Short-Ratio) - longShortRatio - [LongShortRatioExample.java:50](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/LongShortRatioExample.java#L50) +[GET /fapi/v1/klines](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#kline-candlestick-data) - klineCandlestickData - [KlineCandlestickDataExample.java:40](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/KlineCandlestickDataExample.java#L40) -[GET /fapi/v1/premiumIndex](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price) - markPrice - [MarkPriceExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/MarkPriceExample.java#L47) +[GET /futures/data/globalLongShortAccountRatio](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#long-short-ratio) - longShortRatio - [LongShortRatioExample.java:39](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/LongShortRatioExample.java#L39) -[GET /fapi/v1/markPriceKlines](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data) - markPriceKlineCandlestickData - [MarkPriceKlineCandlestickDataExample.java:51](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/MarkPriceKlineCandlestickDataExample.java#L51) +[GET /fapi/v1/premiumIndex](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#mark-price) - markPrice - [MarkPriceExample.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/MarkPriceExample.java#L36) -[GET /fapi/v1/assetIndex](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Multi-Assets-Mode-Asset-Index) - multiAssetsModeAssetIndex - [MultiAssetsModeAssetIndexExample.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/MultiAssetsModeAssetIndexExample.java#L48) +[GET /fapi/v1/markPriceKlines](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#mark-price-kline-candlestick-data) - markPriceKlineCandlestickData - [MarkPriceKlineCandlestickDataExample.java:40](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/MarkPriceKlineCandlestickDataExample.java#L40) -[GET /fapi/v1/historicalTrades](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup) - oldTradesLookup - [OldTradesLookupExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OldTradesLookupExample.java#L49) +[GET /fapi/v1/historicalTrades](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#old-trades-lookup) - oldTradesLookup - [OldTradesLookupExample.java:39](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OldTradesLookupExample.java#L39) -[GET /fapi/v1/openInterest](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest) - openInterest - [OpenInterestExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OpenInterestExample.java#L47) +[GET /fapi/v1/openInterest](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#open-interest) - openInterest - [OpenInterestExample.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OpenInterestExample.java#L36) -[GET /futures/data/openInterestHist](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest-Statistics) - openInterestStatistics - [OpenInterestStatisticsExample.java:50](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OpenInterestStatisticsExample.java#L50) +[GET /futures/data/openInterestHist](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#open-interest-statistics) - openInterestStatistics - [OpenInterestStatisticsExample.java:39](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OpenInterestStatisticsExample.java#L39) -[GET /fapi/v1/depth](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Order-Book) - orderBook - [OrderBookExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OrderBookExample.java#L49) +[GET /fapi/v1/depth](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#order-book) - orderBook - [OrderBookExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OrderBookExample.java#L38) -[GET /fapi/v1/premiumIndexKlines](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Premium-index-Kline-Data) - premiumIndexKlineData - [PremiumIndexKlineDataExample.java:51](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/PremiumIndexKlineDataExample.java#L51) +[GET /fapi/v1/premiumIndexKlines](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#premium-index-kline-data) - premiumIndexKlineData - [PremiumIndexKlineDataExample.java:40](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/PremiumIndexKlineDataExample.java#L40) -[GET /futures/data/delivery-price](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Delivery-Price) - quarterlyContractSettlementPrice - [QuarterlyContractSettlementPriceExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QuarterlyContractSettlementPriceExample.java#L47) +[GET /futures/data/delivery-price](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#quarterly-contract-settlement-price) - quarterlyContractSettlementPrice - [QuarterlyContractSettlementPriceExample.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QuarterlyContractSettlementPriceExample.java#L36) -[GET /fapi/v1/constituents](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Index-Constituents) - queryIndexPriceConstituents - [QueryIndexPriceConstituentsExample.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QueryIndexPriceConstituentsExample.java#L48) +[GET /fapi/v1/constituents](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#query-index-price-constituents) - queryIndexPriceConstituents - [QueryIndexPriceConstituentsExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QueryIndexPriceConstituentsExample.java#L37) -[GET /fapi/v1/insuranceBalance](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Query-Insurance-Fund-Balance-Snapshot) - queryInsuranceFundBalanceSnapshot - [QueryInsuranceFundBalanceSnapshotExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QueryInsuranceFundBalanceSnapshotExample.java#L47) +[GET /fapi/v1/insuranceBalance](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#query-insurance-fund-balance-snapshot) - queryInsuranceFundBalanceSnapshot - [QueryInsuranceFundBalanceSnapshotExample.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QueryInsuranceFundBalanceSnapshotExample.java#L36) -[GET /fapi/v1/trades](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List) - recentTradesList - [RecentTradesListExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/RecentTradesListExample.java#L49) +[GET /fapi/v1/trades](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#recent-trades-list) - recentTradesList - [RecentTradesListExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/RecentTradesListExample.java#L38) -[GET /fapi/v1/rpiDepth](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Order-Book-RPI) - rpiOrderBook - [RpiOrderBookExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/RpiOrderBookExample.java#L49) +[GET /fapi/v1/rpiDepth](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#rpi-order-book) - rpiOrderBook - [RpiOrderBookExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/RpiOrderBookExample.java#L38) -[GET /fapi/v1/ticker/bookTicker](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker) - symbolOrderBookTicker - [SymbolOrderBookTickerExample.java:51](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolOrderBookTickerExample.java#L51) +[GET /fapi/v1/ticker/bookTicker](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#symbol-order-book-ticker) - symbolOrderBookTicker - [SymbolOrderBookTickerExample.java:41](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolOrderBookTickerExample.java#L41) -[GET /fapi/v1/ticker/price](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker) - symbolPriceTicker - [SymbolPriceTickerExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolPriceTickerExample.java#L49) +[GET /fapi/v1/ticker/price](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#symbol-price-ticker) - symbolPriceTicker - [SymbolPriceTickerExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolPriceTickerExample.java#L38) -[GET /fapi/v2/ticker/price](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker-V2) - symbolPriceTickerV2 - [SymbolPriceTickerV2Example.java:50](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolPriceTickerV2Example.java#L50) +[GET /fapi/v2/ticker/price](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#symbol-price-ticker-v2) - symbolPriceTickerV2 - [SymbolPriceTickerV2Example.java:39](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolPriceTickerV2Example.java#L39) -[GET /futures/data/takerlongshortRatio](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Taker-BuySell-Volume) - takerBuySellVolume - [TakerBuySellVolumeExample.java:50](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TakerBuySellVolumeExample.java#L50) +[GET /futures/data/takerlongshortRatio](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#taker-buy-sell-volume) - takerBuySellVolume - [TakerBuySellVolumeExample.java:39](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TakerBuySellVolumeExample.java#L39) -[GET /fapi/v1/ping](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Test-Connectivity) - testConnectivity - [TestConnectivityExample.java:45](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TestConnectivityExample.java#L45) +[GET /fapi/v1/ping](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#test-connectivity) - testConnectivity - [TestConnectivityExample.java:34](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TestConnectivityExample.java#L34) -[GET /fapi/v1/ticker/24hr](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics) - ticker24hrPriceChangeStatistics - [Ticker24hrPriceChangeStatisticsExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java#L49) +[GET /fapi/v1/ticker/24hr](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#ticker24hr-price-change-statistics) - ticker24hrPriceChangeStatistics - [Ticker24hrPriceChangeStatisticsExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java#L38) -[GET /futures/data/topLongShortAccountRatio](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio) - topTraderLongShortRatioAccounts - [TopTraderLongShortRatioAccountsExample.java:55](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TopTraderLongShortRatioAccountsExample.java#L55) +[GET /futures/data/topLongShortAccountRatio](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-accounts) - topTraderLongShortRatioAccounts - [TopTraderLongShortRatioAccountsExample.java:44](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TopTraderLongShortRatioAccountsExample.java#L44) -[GET /futures/data/topLongShortPositionRatio](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Top-Trader-Long-Short-Ratio) - topTraderLongShortRatioPositions - [TopTraderLongShortRatioPositionsExample.java:54](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TopTraderLongShortRatioPositionsExample.java#L54) +[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/docs/derivatives/usds-margined-futures/market-data/rest-api/Trading-Schedule) - tradingSchedule - [TradingScheduleExample.java:52](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TradingScheduleExample.java#L52) +[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:44](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TradingScheduleExample.java#L44) ## PortfolioMarginEndpoints -[GET /fapi/v1/pmAccountInfo](https://developers.binance.com/docs/derivatives/usds-margined-futures/portfolio-margin-endpoints/Classic-Portfolio-Margin-Account-Information) - classicPortfolioMarginAccountInformation - [ClassicPortfolioMarginAccountInformationExample.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/portfoliomarginendpoints/ClassicPortfolioMarginAccountInformationExample.java#L48) +[GET /fapi/v1/pmAccountInfo](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/portfolio-margin-endpoints#classic-portfolio-margin-account-information) - classicPortfolioMarginAccountInformation - [ClassicPortfolioMarginAccountInformationExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/portfoliomarginendpoints/ClassicPortfolioMarginAccountInformationExample.java#L37) ## Trade -[GET /fapi/v1/userTrades](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List) - accountTradeList - [AccountTradeListExample.java:51](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AccountTradeListExample.java#L51) +[GET /fapi/v1/userTrades](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#account-trade-list) - accountTradeList - [AccountTradeListExample.java:41](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AccountTradeListExample.java#L41) -[GET /fapi/v1/allOrders](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders) - allOrders - [AllOrdersExample.java:52](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AllOrdersExample.java#L52) +[GET /fapi/v1/allOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#all-orders) - allOrders - [AllOrdersExample.java:41](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AllOrdersExample.java#L41) -[POST /fapi/v1/countdownCancelAll](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Auto-Cancel-All-Open-Orders) - autoCancelAllOpenOrders - [AutoCancelAllOpenOrdersExample.java:56](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AutoCancelAllOpenOrdersExample.java#L56) +[POST /fapi/v1/countdownCancelAll](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#auto-cancel-all-open-orders) - autoCancelAllOpenOrders - [AutoCancelAllOpenOrdersExample.java:45](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AutoCancelAllOpenOrdersExample.java#L45) -[DELETE /fapi/v1/algoOrder](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Algo-Order) - cancelAlgoOrder - [CancelAlgoOrderExample.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAlgoOrderExample.java#L48) +[DELETE /fapi/v1/algoOrder](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-algo-order) - cancelAlgoOrder - [CancelAlgoOrderExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAlgoOrderExample.java#L38) -[DELETE /fapi/v1/algoOpenOrders](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Algo-Open-Orders) - cancelAllAlgoOpenOrders - [CancelAllAlgoOpenOrdersExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAllAlgoOpenOrdersExample.java#L47) +[DELETE /fapi/v1/algoOpenOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-all-algo-open-orders) - cancelAllAlgoOpenOrders - [CancelAllAlgoOpenOrdersExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAllAlgoOpenOrdersExample.java#L37) -[DELETE /fapi/v1/allOpenOrders](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders) - cancelAllOpenOrders - [CancelAllOpenOrdersExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAllOpenOrdersExample.java#L47) +[DELETE /fapi/v1/allOpenOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-all-open-orders) - cancelAllOpenOrders - [CancelAllOpenOrdersExample.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAllOpenOrdersExample.java#L36) -[DELETE /fapi/v1/batchOrders](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders) - cancelMultipleOrders - [CancelMultipleOrdersExample.java:50](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelMultipleOrdersExample.java#L50) +[DELETE /fapi/v1/batchOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-multiple-orders) - cancelMultipleOrders - [CancelMultipleOrdersExample.java:39](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelMultipleOrdersExample.java#L39) -[DELETE /fapi/v1/order](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order) - cancelOrder - [CancelOrderExample.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelOrderExample.java#L48) +[DELETE /fapi/v1/order](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-order) - cancelOrder - [CancelOrderExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelOrderExample.java#L37) -[POST /fapi/v1/leverage](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Initial-Leverage) - changeInitialLeverage - [ChangeInitialLeverageExample.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeInitialLeverageExample.java#L48) +[POST /fapi/v1/leverage](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#change-initial-leverage) - changeInitialLeverage - [ChangeInitialLeverageExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeInitialLeverageExample.java#L38) -[POST /fapi/v1/marginType](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Margin-Type) - changeMarginType - [ChangeMarginTypeExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeMarginTypeExample.java#L49) +[POST /fapi/v1/marginType](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#change-margin-type) - changeMarginType - [ChangeMarginTypeExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeMarginTypeExample.java#L38) -[POST /fapi/v1/multiAssetsMargin](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Multi-Assets-Mode) - changeMultiAssetsMode - [ChangeMultiAssetsModeExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeMultiAssetsModeExample.java#L49) +[POST /fapi/v1/multiAssetsMargin](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#change-multi-assets-mode) - changeMultiAssetsMode - [ChangeMultiAssetsModeExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeMultiAssetsModeExample.java#L38) -[POST /fapi/v1/positionSide/dual](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Position-Mode) - changePositionMode - [ChangePositionModeExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangePositionModeExample.java#L49) +[POST /fapi/v1/positionSide/dual](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#change-position-mode) - changePositionMode - [ChangePositionModeExample.java:41](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangePositionModeExample.java#L41) -[GET /fapi/v1/openAlgoOrders](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Current-All-Algo-Open-Orders) - currentAllAlgoOpenOrders - [CurrentAllAlgoOpenOrdersExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CurrentAllAlgoOpenOrdersExample.java#L49) +[GET /fapi/v1/openAlgoOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#current-all-algo-open-orders) - currentAllAlgoOpenOrders - [CurrentAllAlgoOpenOrdersExample.java:40](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CurrentAllAlgoOpenOrdersExample.java#L40) -[GET /fapi/v1/openOrders](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders) - currentAllOpenOrders - [CurrentAllOpenOrdersExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CurrentAllOpenOrdersExample.java#L49) +[GET /fapi/v1/openOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#current-all-open-orders) - currentAllOpenOrders - [CurrentAllOpenOrdersExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CurrentAllOpenOrdersExample.java#L38) -[POST /fapi/v1/stock/contract](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Futures-TradFi-Perps-Contract) - futuresTradfiPerpsContract - [FuturesTradfiPerpsContractExample.java:46](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/FuturesTradfiPerpsContractExample.java#L46) +[POST /fapi/v1/stock/contract](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#futures-tradfi-perps-contract) - futuresTradfiPerpsContract - [FuturesTradfiPerpsContractExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/FuturesTradfiPerpsContractExample.java#L37) -[GET /fapi/v1/orderAmendment](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Get-Order-Modify-History) - getOrderModifyHistory - [GetOrderModifyHistoryExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/GetOrderModifyHistoryExample.java#L49) +[GET /fapi/v1/orderAmendment](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#get-order-modify-history) - getOrderModifyHistory - [GetOrderModifyHistoryExample.java:39](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/GetOrderModifyHistoryExample.java#L39) -[GET /fapi/v1/positionMargin/history](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Get-Position-Margin-Change-History) - getPositionMarginChangeHistory - [GetPositionMarginChangeHistoryExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/GetPositionMarginChangeHistoryExample.java#L49) +[GET /fapi/v1/positionMargin/history](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#get-position-margin-change-history) - getPositionMarginChangeHistory - [GetPositionMarginChangeHistoryExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/GetPositionMarginChangeHistoryExample.java#L38) -[POST /fapi/v1/positionMargin](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin) - modifyIsolatedPositionMargin - [ModifyIsolatedPositionMarginExample.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyIsolatedPositionMarginExample.java#L48) +[POST /fapi/v1/positionMargin](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#modify-isolated-position-margin) - modifyIsolatedPositionMargin - [ModifyIsolatedPositionMarginExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyIsolatedPositionMarginExample.java#L38) -[PUT /fapi/v1/batchOrders](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Multiple-Orders) - modifyMultipleOrders - [ModifyMultipleOrdersExample.java:54](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyMultipleOrdersExample.java#L54) +[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/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Order) - modifyOrder - [ModifyOrderExample.java:60](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyOrderExample.java#L60) +[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) -[POST /fapi/v1/algoOrder](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/New-Algo-Order) - newAlgoOrder - [NewAlgoOrderExample.java:82](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/NewAlgoOrderExample.java#L82) +[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) -[POST /fapi/v1/order](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/New-Order) - newOrder - [NewOrderExample.java:57](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/NewOrderExample.java#L57) +[POST /fapi/v1/order](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#new-order) - newOrder - [NewOrderExample.java:51](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/NewOrderExample.java#L51) -[POST /fapi/v1/batchOrders](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders) - placeMultipleOrders - [PlaceMultipleOrdersExample.java:53](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PlaceMultipleOrdersExample.java#L53) +[POST /fapi/v1/batchOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#place-multiple-orders) - placeMultipleOrders - [PlaceMultipleOrdersExample.java:42](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PlaceMultipleOrdersExample.java#L42) -[GET /fapi/v1/adlQuantile](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Position-ADL-Quantile-Estimation) - positionAdlQuantileEstimation - [PositionAdlQuantileEstimationExample.java:55](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionAdlQuantileEstimationExample.java#L55) +[GET /fapi/v1/adlQuantile](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#position-adl-quantile-estimation) - positionAdlQuantileEstimation - [PositionAdlQuantileEstimationExample.java:44](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionAdlQuantileEstimationExample.java#L44) -[GET /fapi/v2/positionRisk](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2) - positionInformationV2 - [PositionInformationV2Example.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionInformationV2Example.java#L48) +[GET /fapi/v2/positionRisk](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#position-information-v2) - positionInformationV2 - [PositionInformationV2Example.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionInformationV2Example.java#L38) -[GET /fapi/v3/positionRisk](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V3) - positionInformationV3 - [PositionInformationV3Example.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionInformationV3Example.java#L49) +[GET /fapi/v3/positionRisk](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#position-information-v3) - positionInformationV3 - [PositionInformationV3Example.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionInformationV3Example.java#L38) -[GET /fapi/v1/algoOrder](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Query-Algo-Order) - queryAlgoOrder - [QueryAlgoOrderExample.java:51](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryAlgoOrderExample.java#L51) +[GET /fapi/v1/algoOrder](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#query-algo-order) - queryAlgoOrder - [QueryAlgoOrderExample.java:41](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryAlgoOrderExample.java#L41) -[GET /fapi/v1/allAlgoOrders](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Query-All-Algo-Orders) - queryAllAlgoOrders - [QueryAllAlgoOrdersExample.java:52](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryAllAlgoOrdersExample.java#L52) +[GET /fapi/v1/allAlgoOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#query-all-algo-orders) - queryAllAlgoOrders - [QueryAllAlgoOrdersExample.java:43](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryAllAlgoOrdersExample.java#L43) -[GET /fapi/v1/openOrder](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Query-Current-Open-Order) - queryCurrentOpenOrder - [QueryCurrentOpenOrderExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryCurrentOpenOrderExample.java#L49) +[GET /fapi/v1/openOrder](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#query-current-open-order) - queryCurrentOpenOrder - [QueryCurrentOpenOrderExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryCurrentOpenOrderExample.java#L38) -[GET /fapi/v1/order](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Query-Order) - queryOrder - [QueryOrderExample.java:51](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryOrderExample.java#L51) +[GET /fapi/v1/order](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#query-order) - queryOrder - [QueryOrderExample.java:40](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryOrderExample.java#L40) -[POST /fapi/v1/order/test](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/New-Order-Test) - testOrder - [TestOrderExample.java:86](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/TestOrderExample.java#L86) +[POST /fapi/v1/order/test](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#test-order) - testOrder - [TestOrderExample.java:81](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/TestOrderExample.java#L81) -[GET /fapi/v1/forceOrders](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Users-Force-Orders) - usersForceOrders - [UsersForceOrdersExample.java:51](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/UsersForceOrdersExample.java#L51) +[GET /fapi/v1/forceOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#users-force-orders) - usersForceOrders - [UsersForceOrdersExample.java:40](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/UsersForceOrdersExample.java#L40) ## UserDataStreams -[DELETE /fapi/v1/listenKey](https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream) - closeUserDataStream - [CloseUserDataStreamExample.java:45](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/CloseUserDataStreamExample.java#L45) +[DELETE /fapi/v1/listenKey](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/user-data-streams#close-user-data-stream) - closeUserDataStream - [CloseUserDataStreamExample.java:34](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/CloseUserDataStreamExample.java#L34) -[PUT /fapi/v1/listenKey](https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream) - keepaliveUserDataStream - [KeepaliveUserDataStreamExample.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/KeepaliveUserDataStreamExample.java#L48) +[PUT /fapi/v1/listenKey](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/user-data-streams#keepalive-user-data-stream) - keepaliveUserDataStream - [KeepaliveUserDataStreamExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/KeepaliveUserDataStreamExample.java#L38) -[POST /fapi/v1/listenKey](https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream) - startUserDataStream - [StartUserDataStreamExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/StartUserDataStreamExample.java#L49) +[POST /fapi/v1/listenKey](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/user-data-streams#start-user-data-stream) - startUserDataStream - [StartUserDataStreamExample.java:39](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/StartUserDataStreamExample.java#L39) diff --git a/clients/derivatives-trading-usds-futures/example_websocket_api.md b/clients/derivatives-trading-usds-futures/example_websocket_api.md index 4b5c520b1..14d0e0926 100644 --- a/clients/derivatives-trading-usds-futures/example_websocket_api.md +++ b/clients/derivatives-trading-usds-futures/example_websocket_api.md @@ -1,44 +1,44 @@ ## Account -[account.status](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/websocket-api/Account-Information) - accountInformation - [AccountInformationExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/AccountInformationExample.java#L49) +[account.status](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/account#account-information) - accountInformation - [AccountInformationExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/AccountInformationExample.java#L38) -[v2/account.status](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/websocket-api/Account-Information-V2) - accountInformationV2 - [AccountInformationV2Example.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/AccountInformationV2Example.java#L49) +[v2/account.status](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/account#account-information-v2) - accountInformationV2 - [AccountInformationV2Example.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/AccountInformationV2Example.java#L38) -[account.balance](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance) - futuresAccountBalance - [FuturesAccountBalanceExample.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/FuturesAccountBalanceExample.java#L48) +[account.balance](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/account#futures-account-balance) - futuresAccountBalance - [FuturesAccountBalanceExample.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/FuturesAccountBalanceExample.java#L36) -[v2/account.balance](https://developers.binance.com/docs/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance-V2) - futuresAccountBalanceV2 - [FuturesAccountBalanceV2Example.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/FuturesAccountBalanceV2Example.java#L48) +[v2/account.balance](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/account#futures-account-balance-v2) - futuresAccountBalanceV2 - [FuturesAccountBalanceV2Example.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/FuturesAccountBalanceV2Example.java#L36) ## MarketData -[depth](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book) - orderBook - [OrderBookExample.java:54](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/OrderBookExample.java#L54) +[depth](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/market-data#order-book) - orderBook - [OrderBookExample.java:42](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/OrderBookExample.java#L42) -[ticker.book](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Order-Book-Ticker) - symbolOrderBookTicker - [SymbolOrderBookTickerExample.java:52](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/SymbolOrderBookTickerExample.java#L52) +[ticker.book](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/market-data#symbol-order-book-ticker) - symbolOrderBookTicker - [SymbolOrderBookTickerExample.java:41](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/SymbolOrderBookTickerExample.java#L41) -[ticker.price](https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Price-Ticker) - symbolPriceTicker - [SymbolPriceTickerExample.java:50](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/SymbolPriceTickerExample.java#L50) +[ticker.price](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/market-data#symbol-price-ticker) - symbolPriceTicker - [SymbolPriceTickerExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/SymbolPriceTickerExample.java#L38) ## Trade -[algoOrder.cancel](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Algo-Order) - cancelAlgoOrder - [CancelAlgoOrderExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/CancelAlgoOrderExample.java#L49) +[algoOrder.cancel](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/trade#cancel-algo-order) - cancelAlgoOrder - [CancelAlgoOrderExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/CancelAlgoOrderExample.java#L37) -[order.cancel](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order) - cancelOrder - [CancelOrderExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/CancelOrderExample.java#L49) +[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/docs/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order) - modifyOrder - [ModifyOrderExample.java:60](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/ModifyOrderExample.java#L60) +[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) -[algoOrder.place](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/New-Algo-Order) - newAlgoOrder - [NewAlgoOrderExample.java:78](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/NewAlgoOrderExample.java#L78) +[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) -[order.place](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/New-Order) - newOrder - [NewOrderExample.java:81](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/NewOrderExample.java#L81) +[order.place](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/trade#new-order) - newOrder - [NewOrderExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/NewOrderExample.java#L47) -[account.position](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Position-Information) - positionInformation - [PositionInformationExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/PositionInformationExample.java#L49) +[account.position](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/trade#position-information) - positionInformation - [PositionInformationExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/PositionInformationExample.java#L38) -[v2/account.position](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Position-Info-V2) - positionInformationV2 - [PositionInformationV2Example.java:50](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/PositionInformationV2Example.java#L50) +[v2/account.position](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/trade#position-information-v2) - positionInformationV2 - [PositionInformationV2Example.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/PositionInformationV2Example.java#L38) -[order.status](https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Query-Order) - queryOrder - [QueryOrderExample.java:52](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/QueryOrderExample.java#L52) +[order.status](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/trade#query-order) - queryOrder - [QueryOrderExample.java:41](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/QueryOrderExample.java#L41) ## UserDataStreams -[userDataStream.stop](https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream-Wsp) - closeUserDataStream - [CloseUserDataStreamExample.java:48](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/CloseUserDataStreamExample.java#L48) +[userDataStream.stop](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/user-data-streams#close-user-data-stream) - closeUserDataStream - [CloseUserDataStreamExample.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/CloseUserDataStreamExample.java#L36) -[userDataStream.ping](https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream-Wsp) - keepaliveUserDataStream - [KeepaliveUserDataStreamExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/KeepaliveUserDataStreamExample.java#L49) +[userDataStream.ping](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/user-data-streams#keepalive-user-data-stream) - keepaliveUserDataStream - [KeepaliveUserDataStreamExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/KeepaliveUserDataStreamExample.java#L38) -[userDataStream.start](https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream-Wsp) - startUserDataStream - [StartUserDataStreamExample.java:50](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/StartUserDataStreamExample.java#L50) +[userDataStream.start](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/user-data-streams#start-user-data-stream) - startUserDataStream - [StartUserDataStreamExample.java:39](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/StartUserDataStreamExample.java#L39) diff --git a/clients/derivatives-trading-usds-futures/example_websocket_stream.md b/clients/derivatives-trading-usds-futures/example_websocket_stream.md index ce759a4a9..ce32db036 100644 --- a/clients/derivatives-trading-usds-futures/example_websocket_stream.md +++ b/clients/derivatives-trading-usds-futures/example_websocket_stream.md @@ -1,44 +1,44 @@ ## Market -[@aggTrade](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams) - aggregateTradeStreams - [AggregateTradeStreamsExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AggregateTradeStreamsExample.java#L47) +[@aggTrade](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#aggregate-trade-streams) - aggregateTradeStreams - [AggregateTradeStreamsExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AggregateTradeStreamsExample.java#L37) -[!forceOrder@arr](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams) - allMarketLiquidationOrderStreams - [AllMarketLiquidationOrderStreamsExample.java:46](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AllMarketLiquidationOrderStreamsExample.java#L46) +[!forceOrder@arr](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#all-market-liquidation-order-streams) - allMarketLiquidationOrderStreams - [AllMarketLiquidationOrderStreamsExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AllMarketLiquidationOrderStreamsExample.java#L37) -[!miniTicker@arr](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Mini-Tickers-Stream) - allMarketMiniTickersStream - [AllMarketMiniTickersStreamExample.java:45](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AllMarketMiniTickersStreamExample.java#L45) +[!miniTicker@arr](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#all-market-mini-tickers-stream) - allMarketMiniTickersStream - [AllMarketMiniTickersStreamExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AllMarketMiniTickersStreamExample.java#L37) -[!ticker@arr](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Tickers-Streams) - allMarketTickersStreams - [AllMarketTickersStreamsExample.java:45](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AllMarketTickersStreamsExample.java#L45) +[!ticker@arr](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#all-market-tickers-streams) - allMarketTickersStreams - [AllMarketTickersStreamsExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AllMarketTickersStreamsExample.java#L37) -[@compositeIndex](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Composite-Index-Symbol-Information-Streams) - compositeIndexSymbolInformationStreams - [CompositeIndexSymbolInformationStreamsExample.java:43](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/CompositeIndexSymbolInformationStreamsExample.java#L43) +[!assetIndex@arr](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#asset-index) - assetIndex - [AssetIndexExample.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AssetIndexExample.java#L36) -[_@continuousKline_](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Continuous-Contract-Kline-Candlestick-Streams) - continuousContractKlineCandlestickStreams - [ContinuousContractKlineCandlestickStreamsExample.java:43](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/ContinuousContractKlineCandlestickStreamsExample.java#L43) +[@compositeIndex](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#composite-index-symbol-information-streams) - compositeIndexSymbolInformationStreams - [CompositeIndexSymbolInformationStreamsExample.java:31](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/CompositeIndexSymbolInformationStreamsExample.java#L31) -[!contractInfo](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Contract-Info-Stream) - contractInfoStream - [ContractInfoStreamExample.java:45](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/ContractInfoStreamExample.java#L45) +[_@continuousKline_](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#continuous-contract-kline-candlestick-streams) - continuousContractKlineCandlestickStreams - [ContinuousContractKlineCandlestickStreamsExample.java:33](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/ContinuousContractKlineCandlestickStreamsExample.java#L33) -[@miniTicker](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Mini-Ticker-Stream) - individualSymbolMiniTickerStream - [IndividualSymbolMiniTickerStreamExample.java:45](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/IndividualSymbolMiniTickerStreamExample.java#L45) +[!contractInfo](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#contract-info-stream) - contractInfoStream - [ContractInfoStreamExample.java:35](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/ContractInfoStreamExample.java#L35) -[@ticker](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Ticker-Streams) - individualSymbolTickerStreams - [IndividualSymbolTickerStreamsExample.java:44](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/IndividualSymbolTickerStreamsExample.java#L44) +[@miniTicker](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#individual-symbol-mini-ticker-stream) - individualSymbolMiniTickerStream - [IndividualSymbolMiniTickerStreamExample.java:35](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/IndividualSymbolMiniTickerStreamExample.java#L35) -[@kline_](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams) - klineCandlestickStreams - [KlineCandlestickStreamsExample.java:44](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/KlineCandlestickStreamsExample.java#L44) +[@ticker](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#individual-symbol-ticker-streams) - individualSymbolTickerStreams - [IndividualSymbolTickerStreamsExample.java:35](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/IndividualSymbolTickerStreamsExample.java#L35) -[@forceOrder](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Liquidation-Order-Streams) - liquidationOrderStreams - [LiquidationOrderStreamsExample.java:46](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/LiquidationOrderStreamsExample.java#L46) +[@kline_](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#kline-candlestick-streams) - klineCandlestickStreams - [KlineCandlestickStreamsExample.java:34](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/KlineCandlestickStreamsExample.java#L34) -[@markPrice@](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream) - markPriceStream - [MarkPriceStreamExample.java:44](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/MarkPriceStreamExample.java#L44) +[@forceOrder](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#liquidation-order-streams) - liquidationOrderStreams - [LiquidationOrderStreamsExample.java:34](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/LiquidationOrderStreamsExample.java#L34) -[!markPrice@arr@](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream-for-All-market) - markPriceStreamForAllMarket - [MarkPriceStreamForAllMarketExample.java:45](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/MarkPriceStreamForAllMarketExample.java#L45) +[@markPrice@](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#mark-price-stream) - markPriceStream - [MarkPriceStreamExample.java:34](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/MarkPriceStreamExample.java#L34) -[!assetIndex@arr](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Multi-Assets-Mode-Asset-Index) - multiAssetsModeAssetIndex - [MultiAssetsModeAssetIndexExample.java:43](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/MultiAssetsModeAssetIndexExample.java#L43) +[!markPrice@arr@](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/docs/derivatives/usds-margined-futures/websocket-market-streams/Trading-Session-Stream) - tradingSessionStream - [TradingSessionStreamExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/TradingSessionStreamExample.java#L49) +[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:42](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/TradingSessionStreamExample.java#L42) ## Public -[!bookTicker](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream) - allBookTickersStream - [AllBookTickersStreamExample.java:45](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/AllBookTickersStreamExample.java#L45) +[!bookTicker](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/public#all-book-tickers-stream) - allBookTickersStream - [AllBookTickersStreamExample.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/AllBookTickersStreamExample.java#L36) -[@depth@](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams) - diffBookDepthStreams - [DiffBookDepthStreamsExample.java:45](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/DiffBookDepthStreamsExample.java#L45) +[@depth@](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/public#diff-book-depth-streams) - diffBookDepthStreams - [DiffBookDepthStreamsExample.java:35](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/DiffBookDepthStreamsExample.java#L35) -[@bookTicker](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Book-Ticker-Streams) - individualSymbolBookTickerStreams - [IndividualSymbolBookTickerStreamsExample.java:45](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/IndividualSymbolBookTickerStreamsExample.java#L45) +[@bookTicker](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/public#individual-symbol-book-ticker-streams) - individualSymbolBookTickerStreams - [IndividualSymbolBookTickerStreamsExample.java:35](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/IndividualSymbolBookTickerStreamsExample.java#L35) -[@depth@](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Partial-Book-Depth-Streams) - partialBookDepthStreams - [PartialBookDepthStreamsExample.java:45](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/PartialBookDepthStreamsExample.java#L45) +[@depth@](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/public#partial-book-depth-streams) - partialBookDepthStreams - [PartialBookDepthStreamsExample.java:34](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/PartialBookDepthStreamsExample.java#L34) -[@rpiDepth@500ms](https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams-RPI) - rpiDiffBookDepthStreams - [RpiDiffBookDepthStreamsExample.java:47](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/RpiDiffBookDepthStreamsExample.java#L47) +[@rpiDepth@500ms](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/public#rpi-diff-book-depth-streams) - rpiDiffBookDepthStreams - [RpiDiffBookDepthStreamsExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/RpiDiffBookDepthStreamsExample.java#L37) diff --git a/clients/derivatives-trading-usds-futures/pom.xml b/clients/derivatives-trading-usds-futures/pom.xml index 1d166599d..3d94cda24 100644 --- a/clients/derivatives-trading-usds-futures/pom.xml +++ b/clients/derivatives-trading-usds-futures/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-derivatives-trading-usds-futures derivatives-trading-usds-futures - 11.0.0 + 12.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/JSON.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/JSON.java index 1325d2a2c..86ce2956f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/JSON.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -156,6 +156,18 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .AllOrdersResponseInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_usds_futures.rest.model + .AssetIndexResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_usds_futures.rest.model + .AssetIndexResponse1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_usds_futures.rest.model + .AssetIndexResponse2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_usds_futures.rest.model + .AssetIndexResponse2Inner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .AutoCancelAllOpenOrdersRequest.CustomTypeAdapterFactory()); @@ -174,12 +186,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .BatchOrdersInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .BatchOrdersPlaceMultipleOrders.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .BatchOrdersPlaceMultipleOrdersInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .CancelAlgoOrderResponse.CustomTypeAdapterFactory()); @@ -247,15 +253,14 @@ private static Class getClassByDiscriminator( .CompressedAggregateTradesListResponseInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .ContinuousContractKlineCandlestickDataResponse.CustomTypeAdapterFactory()); + .ContinuousContractKlineCandlestickDataItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .ContinuousContractKlineCandlestickDataResponseItem + .ContinuousContractKlineCandlestickDataItemInner .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .ContinuousContractKlineCandlestickDataResponseItemInner - .CustomTypeAdapterFactory()); + .ContinuousContractKlineCandlestickDataResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .CurrentAllAlgoOpenOrdersResponse.CustomTypeAdapterFactory()); @@ -296,6 +301,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .FuturesTradfiPerpsContractRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_usds_futures.rest.model + .FuturesTradfiPerpsContractResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .FuturesTradingQuantitativeRulesIndicatorsResponse @@ -384,26 +392,25 @@ private static Class getClassByDiscriminator( .GetPositionMarginChangeHistoryResponseInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .IndexPriceKlineCandlestickDataResponse.CustomTypeAdapterFactory()); + .IndexPriceKlineCandlestickDataItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .IndexPriceKlineCandlestickDataResponseItem.CustomTypeAdapterFactory()); + .IndexPriceKlineCandlestickDataItemInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .IndexPriceKlineCandlestickDataResponseItemInner - .CustomTypeAdapterFactory()); + .IndexPriceKlineCandlestickDataResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .KeepaliveUserDataStreamResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .KlineCandlestickDataResponse.CustomTypeAdapterFactory()); + .KlineCandlestickDataItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .KlineCandlestickDataResponseItem.CustomTypeAdapterFactory()); + .KlineCandlestickDataItemInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .KlineCandlestickDataResponseItemInner.CustomTypeAdapterFactory()); + .KlineCandlestickDataResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .ListAllConvertPairsResponse.CustomTypeAdapterFactory()); @@ -418,13 +425,13 @@ private static Class getClassByDiscriminator( .LongShortRatioResponseInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .MarkPriceKlineCandlestickDataResponse.CustomTypeAdapterFactory()); + .MarkPriceKlineCandlestickDataItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .MarkPriceKlineCandlestickDataResponseItem.CustomTypeAdapterFactory()); + .MarkPriceKlineCandlestickDataItemInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .MarkPriceKlineCandlestickDataResponseItemInner.CustomTypeAdapterFactory()); + .MarkPriceKlineCandlestickDataResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .MarkPriceResponse.CustomTypeAdapterFactory()); @@ -458,18 +465,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .ModifyOrderResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .MultiAssetsModeAssetIndexResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .MultiAssetsModeAssetIndexResponse1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .MultiAssetsModeAssetIndexResponse2.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .MultiAssetsModeAssetIndexResponse2Inner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .NewAlgoOrderRequest.CustomTypeAdapterFactory()); @@ -520,12 +515,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .OrderBookResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .OrderBookResponseAsksItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .OrderBookResponseBidsItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .OrderIdList.CustomTypeAdapterFactory()); @@ -568,13 +557,13 @@ private static Class getClassByDiscriminator( .PositionInformationV3ResponseInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .PremiumIndexKlineDataResponse.CustomTypeAdapterFactory()); + .PremiumIndexKlineDataItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .PremiumIndexKlineDataResponseItem.CustomTypeAdapterFactory()); + .PremiumIndexKlineDataItemInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .PremiumIndexKlineDataResponseItemInner.CustomTypeAdapterFactory()); + .PremiumIndexKlineDataResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .QuarterlyContractSettlementPriceResponse.CustomTypeAdapterFactory()); @@ -639,12 +628,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .RpiOrderBookResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .RpiOrderBookResponseAsksItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .RpiOrderBookResponseBidsItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .SendQuoteRequestRequest.CustomTypeAdapterFactory()); @@ -681,6 +664,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .SymbolPriceTickerResponse2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_usds_futures.rest.model + .SymbolPriceTickerResponse2Inner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .SymbolPriceTickerV2Response.CustomTypeAdapterFactory()); @@ -690,9 +676,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .SymbolPriceTickerV2Response2.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.rest.model - .SymbolPriceTickerV2Response2Inner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .TakerBuySellVolumeResponse.CustomTypeAdapterFactory()); @@ -756,6 +739,20 @@ 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 + .TradingScheduleResponseMarketSchedulesHKEQUITY.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_usds_futures.rest.model + .TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_usds_futures.rest.model + .TradingScheduleResponseMarketSchedulesKREQUITY.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_usds_futures.rest.model + .TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.rest.model .UserCommissionRateResponse.CustomTypeAdapterFactory()); diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/AccountApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/AccountApi.java index 930779143..62068d4aa 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/AccountApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/AccountApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,6 +35,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetFuturesTradeDownloadLinkByIdResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetFuturesTransactionHistoryDownloadLinkByIdResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetIncomeHistoryResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.IncomeType; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.NotionalAndLeverageBracketsResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.QueryUserRateLimitResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.SymbolConfigurationResponse; @@ -64,7 +65,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/11.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -115,8 +116,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Account - * Information V2(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#account-information-v2">Account + * Information V2 (USER_DATA) Documentation */ private okhttp3.Call accountInformationV2Call(Long recvWindow) throws ApiException { String basePath = null; @@ -209,9 +210,9 @@ private okhttp3.Call accountInformationV2ValidateBeforeCall(Long recvWindow) } /** - * Account Information V2(USER_DATA) Get current account information. User in single-asset/ + * Account Information V2 (USER_DATA) Get current account information. User in single-asset/ * multi-assets mode will see different value, see comments in response section for detail. - * Weight: 5 + * Weight(IP): 5 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<AccountInformationV2Response> @@ -225,11 +226,11 @@ private okhttp3.Call accountInformationV2ValidateBeforeCall(Long recvWindow) * * * @see Account - * Information V2(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#account-information-v2">Account + * Information V2 (USER_DATA) Documentation */ - public ApiResponse accountInformationV2(Long recvWindow) - throws ApiException { + public ApiResponse accountInformationV2( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = accountInformationV2ValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -250,8 +251,8 @@ public ApiResponse accountInformationV2(Long recvW * * * @see Account - * Information V3(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#account-information-v3">Account + * Information V3 (USER_DATA) Documentation */ private okhttp3.Call accountInformationV3Call(Long recvWindow) throws ApiException { String basePath = null; @@ -344,9 +345,9 @@ private okhttp3.Call accountInformationV3ValidateBeforeCall(Long recvWindow) } /** - * Account Information V3(USER_DATA) Get current account information. User in single-asset/ + * Account Information V3 (USER_DATA) Get current account information. User in single-asset/ * multi-assets mode will see different value, see comments in response section for detail. - * Weight: 5 + * Weight(IP): 5 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<AccountInformationV3Response> @@ -360,11 +361,11 @@ private okhttp3.Call accountInformationV3ValidateBeforeCall(Long recvWindow) * * * @see Account - * Information V3(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#account-information-v3">Account + * Information V3 (USER_DATA) Documentation */ - public ApiResponse accountInformationV3(Long recvWindow) - throws ApiException { + public ApiResponse accountInformationV3( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = accountInformationV3ValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -385,7 +386,7 @@ public ApiResponse accountInformationV3(Long recvW * * * @see Futures + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-account-balance-v2">Futures * Account Balance V2 (USER_DATA) Documentation */ private okhttp3.Call futuresAccountBalanceV2Call(Long recvWindow) throws ApiException { @@ -479,7 +480,8 @@ private okhttp3.Call futuresAccountBalanceV2ValidateBeforeCall(Long recvWindow) } /** - * Futures Account Balance V2 (USER_DATA) Query account balance info Weight: 5 + * Futures Account Balance V2 (USER_DATA) Query account balance information. Weight(IP): 5 + * Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<FuturesAccountBalanceV2Response> @@ -493,11 +495,11 @@ private okhttp3.Call futuresAccountBalanceV2ValidateBeforeCall(Long recvWindow) * * * @see Futures + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-account-balance-v2">Futures * Account Balance V2 (USER_DATA) Documentation */ - public ApiResponse futuresAccountBalanceV2(Long recvWindow) - throws ApiException { + public ApiResponse futuresAccountBalanceV2( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = futuresAccountBalanceV2ValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -518,7 +520,7 @@ public ApiResponse futuresAccountBalanceV2(Long * * * @see Futures + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-account-balance-v3">Futures * Account Balance V3 (USER_DATA) Documentation */ private okhttp3.Call futuresAccountBalanceV3Call(Long recvWindow) throws ApiException { @@ -612,7 +614,8 @@ private okhttp3.Call futuresAccountBalanceV3ValidateBeforeCall(Long recvWindow) } /** - * Futures Account Balance V3 (USER_DATA) Query account balance info Weight: 5 + * Futures Account Balance V3 (USER_DATA) Query account balance information. Weight(IP): 5 + * Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<FuturesAccountBalanceV3Response> @@ -626,11 +629,11 @@ private okhttp3.Call futuresAccountBalanceV3ValidateBeforeCall(Long recvWindow) * * * @see Futures + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-account-balance-v3">Futures * Account Balance V3 (USER_DATA) Documentation */ - public ApiResponse futuresAccountBalanceV3(Long recvWindow) - throws ApiException { + public ApiResponse futuresAccountBalanceV3( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = futuresAccountBalanceV3ValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -651,8 +654,8 @@ public ApiResponse futuresAccountBalanceV3(Long * * * @see Futures - * Account Configuration(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-account-configuration">Futures + * Account Configuration (USER_DATA) Documentation */ private okhttp3.Call futuresAccountConfigurationCall(Long recvWindow) throws ApiException { String basePath = null; @@ -745,7 +748,8 @@ private okhttp3.Call futuresAccountConfigurationValidateBeforeCall(Long recvWind } /** - * Futures Account Configuration(USER_DATA) Query account configuration Weight: 5 + * Futures Account Configuration (USER_DATA) Query account configuration Weight(IP): 5 Security + * Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<FuturesAccountConfigurationResponse> @@ -759,11 +763,11 @@ private okhttp3.Call futuresAccountConfigurationValidateBeforeCall(Long recvWind * * * @see Futures - * Account Configuration(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-account-configuration">Futures + * Account Configuration (USER_DATA) Documentation */ public ApiResponse futuresAccountConfiguration( - Long recvWindow) throws ApiException { + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = futuresAccountConfigurationValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -785,7 +789,7 @@ public ApiResponse futuresAccountConfigurat * * * @see Futures + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-trading-quantitative-rules-indicators">Futures * Trading Quantitative Rules Indicators (USER_DATA) Documentation */ private okhttp3.Call futuresTradingQuantitativeRulesIndicatorsCall( @@ -891,8 +895,9 @@ private okhttp3.Call futuresTradingQuantitativeRulesIndicatorsValidateBeforeCall /** * Futures Trading Quantitative Rules Indicators (USER_DATA) Futures trading quantitative rules * indicators, for more information on this, please refer to the [Futures Trading Quantitative - * Rules](https://www.binance.com/en/support/faq/4f462ebe6ff445d4a170be7d9e897272) Weight: - 1 - * for a single symbol - 10 when the symbol parameter is omitted + * Rules](https://www.binance.com/en/support/faq/4f462ebe6ff445d4a170be7d9e897272) Weight: - + * **1** for a single symbol - **10** when the symbol parameter is omitted Security Type: + * USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -907,11 +912,11 @@ private okhttp3.Call futuresTradingQuantitativeRulesIndicatorsValidateBeforeCall * * * @see Futures + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-trading-quantitative-rules-indicators">Futures * Trading Quantitative Rules Indicators (USER_DATA) Documentation */ public ApiResponse - futuresTradingQuantitativeRulesIndicators(String symbol, Long recvWindow) + futuresTradingQuantitativeRulesIndicators(String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = futuresTradingQuantitativeRulesIndicatorsValidateBeforeCall(symbol, recvWindow); @@ -934,7 +939,7 @@ private okhttp3.Call futuresTradingQuantitativeRulesIndicatorsValidateBeforeCall * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-bnb-burn-status">Get * BNB Burn Status (USER_DATA) Documentation */ private okhttp3.Call getBnbBurnStatusCall(Long recvWindow) throws ApiException { @@ -1028,7 +1033,7 @@ private okhttp3.Call getBnbBurnStatusValidateBeforeCall(Long recvWindow) throws /** * Get BNB Burn Status (USER_DATA) Get user's BNB Fee Discount (Fee Discount On or Fee - * Discount Off ) Weight: 30 + * Discount Off ) Weight(IP): 30 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetBnbBurnStatusResponse> @@ -1042,10 +1047,10 @@ private okhttp3.Call getBnbBurnStatusValidateBeforeCall(Long recvWindow) throws * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-bnb-burn-status">Get * BNB Burn Status (USER_DATA) Documentation */ - public ApiResponse getBnbBurnStatus(Long recvWindow) + public ApiResponse getBnbBurnStatus(@Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getBnbBurnStatusValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1067,7 +1072,7 @@ public ApiResponse getBnbBurnStatus(Long recvWindow) * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-current-multi-assets-mode">Get * Current Multi-Assets Mode (USER_DATA) Documentation */ private okhttp3.Call getCurrentMultiAssetsModeCall(Long recvWindow) throws ApiException { @@ -1162,7 +1167,7 @@ private okhttp3.Call getCurrentMultiAssetsModeValidateBeforeCall(Long recvWindow /** * Get Current Multi-Assets Mode (USER_DATA) Get user's Multi-Assets mode (Multi-Assets Mode - * or Single-Asset Mode) on ***Every symbol*** Weight: 30 + * or Single-Asset Mode) on ***Every symbol*** Weight(IP): 30 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetCurrentMultiAssetsModeResponse> @@ -1176,11 +1181,11 @@ private okhttp3.Call getCurrentMultiAssetsModeValidateBeforeCall(Long recvWindow * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-current-multi-assets-mode">Get * Current Multi-Assets Mode (USER_DATA) Documentation */ - public ApiResponse getCurrentMultiAssetsMode(Long recvWindow) - throws ApiException { + public ApiResponse getCurrentMultiAssetsMode( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getCurrentMultiAssetsModeValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -1201,8 +1206,8 @@ public ApiResponse getCurrentMultiAssetsMode( * * * @see Get - * Current Position Mode(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-current-position-mode">Get + * Current Position Mode (USER_DATA) Documentation */ private okhttp3.Call getCurrentPositionModeCall(Long recvWindow) throws ApiException { String basePath = null; @@ -1295,8 +1300,8 @@ private okhttp3.Call getCurrentPositionModeValidateBeforeCall(Long recvWindow) } /** - * Get Current Position Mode(USER_DATA) Get user's position mode (Hedge Mode or One-way Mode - * ) on ***EVERY symbol*** Weight: 30 + * Get Current Position Mode (USER_DATA) Get user's position mode (Hedge Mode or One-way + * Mode ) on ***EVERY symbol*** Weight(IP): 30 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetCurrentPositionModeResponse> @@ -1310,11 +1315,11 @@ private okhttp3.Call getCurrentPositionModeValidateBeforeCall(Long recvWindow) * * * @see Get - * Current Position Mode(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-current-position-mode">Get + * Current Position Mode (USER_DATA) Documentation */ - public ApiResponse getCurrentPositionMode(Long recvWindow) - throws ApiException { + public ApiResponse getCurrentPositionMode( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getCurrentPositionModeValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -1337,7 +1342,7 @@ public ApiResponse getCurrentPositionMode(Long r * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-download-id-for-futures-order-history">Get * Download Id For Futures Order History (USER_DATA) Documentation */ private okhttp3.Call getDownloadIdForFuturesOrderHistoryCall( @@ -1447,9 +1452,9 @@ private okhttp3.Call getDownloadIdForFuturesOrderHistoryValidateBeforeCall( /** * Get Download Id For Futures Order History (USER_DATA) Get Download Id For Futures Order - * History * Request Limitation is 10 times per month, shared by front end download page and - * rest api * The time between `startTime` and `endTime` can not be longer - * than 1 year Weight: 1000 + * History Weight(IP): 1000 Security Type: USER_DATA Notes: - Request Limitation is 10 times per + * month, shared by front end download page and rest api - The time between + * `startTime` and `endTime` can not be longer than 1 year * * @param startTime Timestamp in ms (required) * @param endTime Timestamp in ms (required) @@ -1465,12 +1470,12 @@ private okhttp3.Call getDownloadIdForFuturesOrderHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-download-id-for-futures-order-history">Get * Download Id For Futures Order History (USER_DATA) Documentation */ public ApiResponse getDownloadIdForFuturesOrderHistory( - @NotNull Long startTime, @NotNull Long endTime, Long recvWindow) + @NotNull Long startTime, @NotNull Long endTime, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getDownloadIdForFuturesOrderHistoryValidateBeforeCall( @@ -1496,7 +1501,7 @@ private okhttp3.Call getDownloadIdForFuturesOrderHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-download-id-for-futures-trade-history">Get * Download Id For Futures Trade History (USER_DATA) Documentation */ private okhttp3.Call getDownloadIdForFuturesTradeHistoryCall( @@ -1606,9 +1611,9 @@ private okhttp3.Call getDownloadIdForFuturesTradeHistoryValidateBeforeCall( /** * Get Download Id For Futures Trade History (USER_DATA) Get download id for futures trade - * history * Request Limitation is 5 times per month, shared by front end download page and rest - * api * The time between `startTime` and `endTime` can not be longer than 1 - * year Weight: 1000 + * history Weight(IP): 1000 Security Type: USER_DATA Notes: - Request Limitation is 5 times per + * month, shared by front end download page and rest api - The time between + * `startTime` and `endTime` can not be longer than 1 year * * @param startTime Timestamp in ms (required) * @param endTime Timestamp in ms (required) @@ -1624,12 +1629,12 @@ private okhttp3.Call getDownloadIdForFuturesTradeHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-download-id-for-futures-trade-history">Get * Download Id For Futures Trade History (USER_DATA) Documentation */ public ApiResponse getDownloadIdForFuturesTradeHistory( - @NotNull Long startTime, @NotNull Long endTime, Long recvWindow) + @NotNull Long startTime, @NotNull Long endTime, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getDownloadIdForFuturesTradeHistoryValidateBeforeCall( @@ -1655,8 +1660,8 @@ private okhttp3.Call getDownloadIdForFuturesTradeHistoryValidateBeforeCall( * * * @see Get - * Download Id For Futures Transaction History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-download-id-for-futures-transaction-history">Get + * Download Id For Futures Transaction History (USER_DATA) Documentation */ private okhttp3.Call getDownloadIdForFuturesTransactionHistoryCall( Long startTime, Long endTime, Long recvWindow) throws ApiException { @@ -1765,10 +1770,10 @@ private okhttp3.Call getDownloadIdForFuturesTransactionHistoryValidateBeforeCall } /** - * Get Download Id For Futures Transaction History(USER_DATA) Get download id for futures - * transaction history * Request Limitation is 5 times per month, shared by front end download - * page and rest api * The time between `startTime` and `endTime` can not be - * longer than 1 year Weight: 1000 + * Get Download Id For Futures Transaction History (USER_DATA) Get download id for futures + * transaction history Weight(IP): 1000 Security Type: USER_DATA Notes: - Request Limitation is + * 5 times per month, shared by front end download page and rest api - The time between + * `startTime` and `endTime` can not be longer than 1 year * * @param startTime Timestamp in ms (required) * @param endTime Timestamp in ms (required) @@ -1784,12 +1789,12 @@ private okhttp3.Call getDownloadIdForFuturesTransactionHistoryValidateBeforeCall * * * @see Get - * Download Id For Futures Transaction History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-download-id-for-futures-transaction-history">Get + * Download Id For Futures Transaction History (USER_DATA) Documentation */ public ApiResponse getDownloadIdForFuturesTransactionHistory( - @NotNull Long startTime, @NotNull Long endTime, Long recvWindow) + @NotNull Long startTime, @NotNull Long endTime, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getDownloadIdForFuturesTransactionHistoryValidateBeforeCall( @@ -1814,7 +1819,7 @@ private okhttp3.Call getDownloadIdForFuturesTransactionHistoryValidateBeforeCall * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-futures-order-history-download-link-by-id">Get * Futures Order History Download Link by Id (USER_DATA) Documentation */ private okhttp3.Call getFuturesOrderHistoryDownloadLinkByIdCall( @@ -1919,7 +1924,7 @@ private okhttp3.Call getFuturesOrderHistoryDownloadLinkByIdValidateBeforeCall( /** * Get Futures Order History Download Link by Id (USER_DATA) Get futures order history download - * link by Id * Download link expiration: 24h Weight: 10 + * link by Id Weight(IP): 10 Security Type: USER_DATA Notes: - Download link expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -1934,12 +1939,12 @@ private okhttp3.Call getFuturesOrderHistoryDownloadLinkByIdValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-futures-order-history-download-link-by-id">Get * Futures Order History Download Link by Id (USER_DATA) Documentation */ public ApiResponse - getFuturesOrderHistoryDownloadLinkById(@NotNull String downloadId, Long recvWindow) - throws ApiException { + getFuturesOrderHistoryDownloadLinkById( + @NotNull String downloadId, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFuturesOrderHistoryDownloadLinkByIdValidateBeforeCall(downloadId, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1962,8 +1967,8 @@ private okhttp3.Call getFuturesOrderHistoryDownloadLinkByIdValidateBeforeCall( * * * @see Get - * Futures Trade Download Link by Id(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-futures-trade-download-link-by-id">Get + * Futures Trade Download Link by Id (USER_DATA) Documentation */ private okhttp3.Call getFuturesTradeDownloadLinkByIdCall(String downloadId, Long recvWindow) throws ApiException { @@ -2063,8 +2068,8 @@ private okhttp3.Call getFuturesTradeDownloadLinkByIdValidateBeforeCall( } /** - * Get Futures Trade Download Link by Id(USER_DATA) Get futures trade download link by Id * - * Download link expiration: 24h Weight: 10 + * Get Futures Trade Download Link by Id (USER_DATA) Get futures trade download link by Id + * Weight(IP): 10 Security Type: USER_DATA Notes: - Download link expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -2079,11 +2084,11 @@ private okhttp3.Call getFuturesTradeDownloadLinkByIdValidateBeforeCall( * * * @see Get - * Futures Trade Download Link by Id(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-futures-trade-download-link-by-id">Get + * Futures Trade Download Link by Id (USER_DATA) Documentation */ public ApiResponse getFuturesTradeDownloadLinkById( - @NotNull String downloadId, Long recvWindow) throws ApiException { + @NotNull String downloadId, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFuturesTradeDownloadLinkByIdValidateBeforeCall(downloadId, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -2106,7 +2111,7 @@ public ApiResponse getFuturesTradeDownl * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-futures-transaction-history-download-link-by-id">Get * Futures Transaction History Download Link by Id (USER_DATA) Documentation */ private okhttp3.Call getFuturesTransactionHistoryDownloadLinkByIdCall( @@ -2211,7 +2216,8 @@ private okhttp3.Call getFuturesTransactionHistoryDownloadLinkByIdValidateBeforeC /** * Get Futures Transaction History Download Link by Id (USER_DATA) Get futures transaction - * history download link by Id * Download link expiration: 24h Weight: 10 + * history download link by Id Weight(IP): 10 Security Type: USER_DATA Notes: - Download link + * expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -2226,12 +2232,12 @@ private okhttp3.Call getFuturesTransactionHistoryDownloadLinkByIdValidateBeforeC * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-futures-transaction-history-download-link-by-id">Get * Futures Transaction History Download Link by Id (USER_DATA) Documentation */ public ApiResponse getFuturesTransactionHistoryDownloadLinkById( - @NotNull String downloadId, Long recvWindow) throws ApiException { + @NotNull String downloadId, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFuturesTransactionHistoryDownloadLinkByIdValidateBeforeCall( downloadId, recvWindow); @@ -2243,17 +2249,12 @@ private okhttp3.Call getFuturesTransactionHistoryDownloadLinkByIdValidateBeforeC /** * Build call for getIncomeHistory * - * @param symbol (optional) - * @param incomeType TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, - * INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, - * CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, - * AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, - * POSITION_LIMIT_INCREASE_FEE, STRATEGY_UMFUTURES_TRANSFER,FEE_RETURN,BFUSD_REWARD - * (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param page (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol Trading symbol. (optional) + * @param incomeType Income type. (optional) + * @param startTime Timestamp in milliseconds (inclusive start). (optional) + * @param endTime Timestamp in milliseconds (inclusive end). (optional) + * @param page Pagination page number. (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2265,12 +2266,12 @@ private okhttp3.Call getFuturesTransactionHistoryDownloadLinkByIdValidateBeforeC * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-income-history">Get * Income History (USER_DATA) Documentation */ private okhttp3.Call getIncomeHistoryCall( String symbol, - String incomeType, + IncomeType incomeType, Long startTime, Long endTime, Long page, @@ -2362,7 +2363,7 @@ private okhttp3.Call getIncomeHistoryCall( @SuppressWarnings("rawtypes") private okhttp3.Call getIncomeHistoryValidateBeforeCall( String symbol, - String incomeType, + IncomeType incomeType, Long startTime, Long endTime, Long page, @@ -2386,7 +2387,7 @@ private okhttp3.Call getIncomeHistoryValidateBeforeCall( .getMethod( "getIncomeHistory", String.class, - String.class, + IncomeType.class, Long.class, Long.class, Long.class, @@ -2411,23 +2412,18 @@ private okhttp3.Call getIncomeHistoryValidateBeforeCall( } /** - * Get Income History (USER_DATA) Query income history * If neither `startTime` nor - * `endTime` is sent, the recent 7-day data will be returned. * If `incomeType - * ` is not sent, all kinds of flow will be returned * \"trandId\" is unique in - * the same incomeType for a user * Income history only contains data for the last three months - * Weight: 30 - * - * @param symbol (optional) - * @param incomeType TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, - * INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, - * CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, - * AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, - * POSITION_LIMIT_INCREASE_FEE, STRATEGY_UMFUTURES_TRANSFER,FEE_RETURN,BFUSD_REWARD - * (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param page (optional) - * @param limit Default 100; max 1000 (optional) + * Get Income History (USER_DATA) Query income history Weight(IP): 30 Security Type: USER_DATA + * Notes: - If `incomeType ` is not sent, all kinds of flow will be returned - If + * `startTime` and `endTime` are not sent, the recent 7-day data will be + * returned. - `trandId` is unique in the same `incomeType` for a user. - + * Income history only contains data for the last three months. + * + * @param symbol Trading symbol. (optional) + * @param incomeType Income type. (optional) + * @param startTime Timestamp in milliseconds (inclusive start). (optional) + * @param endTime Timestamp in milliseconds (inclusive end). (optional) + * @param page Pagination page number. (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return ApiResponse<GetIncomeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2440,17 +2436,17 @@ private okhttp3.Call getIncomeHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-income-history">Get * Income History (USER_DATA) Documentation */ public ApiResponse getIncomeHistory( String symbol, - String incomeType, + IncomeType incomeType, Long startTime, Long endTime, Long page, - Long limit, - Long recvWindow) + @Max(1000L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getIncomeHistoryValidateBeforeCall( @@ -2475,7 +2471,7 @@ public ApiResponse getIncomeHistory( * * * @see Notional + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#notional-and-leverage-brackets">Notional * and Leverage Brackets (USER_DATA) Documentation */ private okhttp3.Call notionalAndLeverageBracketsCall(String symbol, Long recvWindow) @@ -2577,7 +2573,7 @@ private okhttp3.Call notionalAndLeverageBracketsValidateBeforeCall( /** * Notional and Leverage Brackets (USER_DATA) Query user notional and leverage bracket on - * speicfic symbol Weight: 1 + * speicfic symbol Weight(IP): 1 Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -2592,11 +2588,11 @@ private okhttp3.Call notionalAndLeverageBracketsValidateBeforeCall( * * * @see Notional + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#notional-and-leverage-brackets">Notional * and Leverage Brackets (USER_DATA) Documentation */ public ApiResponse notionalAndLeverageBrackets( - String symbol, Long recvWindow) throws ApiException { + String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = notionalAndLeverageBracketsValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -2618,7 +2614,7 @@ public ApiResponse notionalAndLeverageBrack * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#query-user-rate-limit">Query * User Rate Limit (USER_DATA) Documentation */ private okhttp3.Call queryUserRateLimitCall(Long recvWindow) throws ApiException { @@ -2711,7 +2707,8 @@ private okhttp3.Call queryUserRateLimitValidateBeforeCall(Long recvWindow) throw } /** - * Query User Rate Limit (USER_DATA) Query User Rate Limit Weight: 1 + * Query User Rate Limit (USER_DATA) Query User Rate Limit Weight(IP): 1 Security Type: + * USER_DATA * * @param recvWindow (optional) * @return ApiResponse<QueryUserRateLimitResponse> @@ -2725,10 +2722,10 @@ private okhttp3.Call queryUserRateLimitValidateBeforeCall(Long recvWindow) throw * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#query-user-rate-limit">Query * User Rate Limit (USER_DATA) Documentation */ - public ApiResponse queryUserRateLimit(Long recvWindow) + public ApiResponse queryUserRateLimit(@Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryUserRateLimitValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = @@ -2739,7 +2736,7 @@ public ApiResponse queryUserRateLimit(Long recvWindo /** * Build call for symbolConfiguration * - * @param symbol (optional) + * @param symbol Symbol (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2751,8 +2748,8 @@ public ApiResponse queryUserRateLimit(Long recvWindo * * * @see Symbol - * Configuration(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#symbol-configuration">Symbol + * Configuration (USER_DATA) Documentation */ private okhttp3.Call symbolConfigurationCall(String symbol, Long recvWindow) throws ApiException { @@ -2851,9 +2848,10 @@ private okhttp3.Call symbolConfigurationValidateBeforeCall(String symbol, Long r } /** - * Symbol Configuration(USER_DATA) Get current account symbol configuration. Weight: 5 + * Symbol Configuration (USER_DATA) Get current account symbol configuration. Weight(IP): 5 + * Security Type: USER_DATA * - * @param symbol (optional) + * @param symbol Symbol (optional) * @param recvWindow (optional) * @return ApiResponse<SymbolConfigurationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2866,11 +2864,11 @@ private okhttp3.Call symbolConfigurationValidateBeforeCall(String symbol, Long r * * * @see Symbol - * Configuration(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#symbol-configuration">Symbol + * Configuration (USER_DATA) Documentation */ public ApiResponse symbolConfiguration( - String symbol, Long recvWindow) throws ApiException { + String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = symbolConfigurationValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -2891,7 +2889,7 @@ public ApiResponse symbolConfiguration( * * * @see Toggle + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#toggle-bnb-burn-on-futures-trade">Toggle * BNB Burn On Futures Trade (TRADE) Documentation */ private okhttp3.Call toggleBnbBurnOnFuturesTradeCall( @@ -2998,7 +2996,7 @@ private okhttp3.Call toggleBnbBurnOnFuturesTradeValidateBeforeCall( /** * Toggle BNB Burn On Futures Trade (TRADE) Change user's BNB Fee Discount (Fee Discount On - * or Fee Discount Off ) on ***EVERY symbol*** Weight: 1 + * or Fee Discount Off ) on ***EVERY symbol*** Weight(IP): 1 Security Type: TRADE * * @param toggleBnbBurnOnFuturesTradeRequest (required) * @return ApiResponse<ToggleBnbBurnOnFuturesTradeResponse> @@ -3012,7 +3010,7 @@ private okhttp3.Call toggleBnbBurnOnFuturesTradeValidateBeforeCall( * * * @see Toggle + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#toggle-bnb-burn-on-futures-trade">Toggle * BNB Burn On Futures Trade (TRADE) Documentation */ public ApiResponse toggleBnbBurnOnFuturesTrade( @@ -3028,7 +3026,7 @@ public ApiResponse toggleBnbBurnOnFuturesTr /** * Build call for userCommissionRate * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3040,7 +3038,7 @@ public ApiResponse toggleBnbBurnOnFuturesTr * * * @see User + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#user-commission-rate">User * Commission Rate (USER_DATA) Documentation */ private okhttp3.Call userCommissionRateCall(String symbol, Long recvWindow) @@ -3140,9 +3138,10 @@ private okhttp3.Call userCommissionRateValidateBeforeCall(String symbol, Long re } /** - * User Commission Rate (USER_DATA) Get User Commission Rate Weight: 20 + * User Commission Rate (USER_DATA) Get User Commission Rate Weight(IP): 20 Security Type: + * USER_DATA * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<UserCommissionRateResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -3155,11 +3154,11 @@ private okhttp3.Call userCommissionRateValidateBeforeCall(String symbol, Long re * * * @see User + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#user-commission-rate">User * Commission Rate (USER_DATA) Documentation */ public ApiResponse userCommissionRate( - @NotNull String symbol, Long recvWindow) throws ApiException { + @NotNull String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = userCommissionRateValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/ConvertApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/ConvertApi.java index f246b221b..b42fa621b 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/ConvertApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/ConvertApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -49,7 +49,7 @@ public class ConvertApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/11.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -100,7 +100,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Accept + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/convert#accept-the-offered-quote">Accept * the offered quote (USER_DATA) Documentation */ private okhttp3.Call acceptTheOfferedQuoteCall( @@ -201,7 +201,8 @@ private okhttp3.Call acceptTheOfferedQuoteValidateBeforeCall( } /** - * Accept the offered quote (USER_DATA) Accept the offered quote by quote ID. Weight: 200(IP) + * Accept the offered quote (USER_DATA) Accept the offered quote by quote ID. Weight(IP): 200 + * Security Type: USER_DATA * * @param acceptTheOfferedQuoteRequest (required) * @return ApiResponse<AcceptTheOfferedQuoteResponse> @@ -215,7 +216,7 @@ private okhttp3.Call acceptTheOfferedQuoteValidateBeforeCall( * * * @see Accept + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/convert#accept-the-offered-quote">Accept * the offered quote (USER_DATA) Documentation */ public ApiResponse acceptTheOfferedQuote( @@ -243,7 +244,7 @@ public ApiResponse acceptTheOfferedQuote( * * * @see List + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/convert#list-all-convert-pairs">List * All Convert Pairs Documentation */ private okhttp3.Call listAllConvertPairsCall(String fromAsset, String toAsset) @@ -343,9 +344,9 @@ private okhttp3.Call listAllConvertPairsValidateBeforeCall(String fromAsset, Str /** * List All Convert Pairs Query for all convertible token pairs and the tokens’ respective - * upper/lower limits * User needs to supply either or both of the input parameter * If not - * defined for both fromAsset and toAsset, only partial token pairs will be returned * Asset - * BNFCR is only available to convert for MICA region users. Weight: 20(IP) + * upper/lower limits Weight(IP): 20 Notes: - User needs to supply either or both of the input + * parameter - If not defined for both fromAsset and toAsset, only partial token pairs will be + * returned - Asset BNFCR is only available to convert for MICA region users. * * @param fromAsset User spends coin (optional) * @param toAsset User receives coin (optional) @@ -360,7 +361,7 @@ private okhttp3.Call listAllConvertPairsValidateBeforeCall(String fromAsset, Str * * * @see List + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/convert#list-all-convert-pairs">List * All Convert Pairs Documentation */ public ApiResponse listAllConvertPairs( @@ -386,10 +387,10 @@ public ApiResponse listAllConvertPairs( * * * @see Order - * status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/convert#order-status">Order + * status (USER_DATA) Documentation */ - private okhttp3.Call orderStatusCall(Long orderId, String quoteId) throws ApiException { + private okhttp3.Call orderStatusCall(String orderId, String quoteId) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] {}; @@ -453,7 +454,7 @@ private okhttp3.Call orderStatusCall(Long orderId, String quoteId) throws ApiExc } @SuppressWarnings("rawtypes") - private okhttp3.Call orderStatusValidateBeforeCall(Long orderId, String quoteId) + private okhttp3.Call orderStatusValidateBeforeCall(String orderId, String quoteId) throws ApiException { try { Validator validator = @@ -465,7 +466,7 @@ private okhttp3.Call orderStatusValidateBeforeCall(Long orderId, String quoteId) ExecutableValidator executableValidator = validator.forExecutables(); Object[] parameterValues = {orderId, quoteId}; - Method method = this.getClass().getMethod("orderStatus", Long.class, String.class); + Method method = this.getClass().getMethod("orderStatus", String.class, String.class); Set> violations = executableValidator.validateParameters(this, method, parameterValues); @@ -484,7 +485,8 @@ private okhttp3.Call orderStatusValidateBeforeCall(Long orderId, String quoteId) } /** - * Order status(USER_DATA) Query order status by order ID. Weight: 50(IP) + * Order status (USER_DATA) Query order status by order ID. Weight(IP): 50 Security Type: + * USER_DATA * * @param orderId Either orderId or quoteId is required (optional) * @param quoteId Either orderId or quoteId is required (optional) @@ -499,10 +501,10 @@ private okhttp3.Call orderStatusValidateBeforeCall(Long orderId, String quoteId) * * * @see Order - * status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/convert#order-status">Order + * status (USER_DATA) Documentation */ - public ApiResponse orderStatus(Long orderId, String quoteId) + public ApiResponse orderStatus(String orderId, String quoteId) throws ApiException { okhttp3.Call localVarCall = orderStatusValidateBeforeCall(orderId, quoteId); java.lang.reflect.Type localVarReturnType = @@ -524,8 +526,8 @@ public ApiResponse orderStatus(Long orderId, String quoteId * * * @see Send - * Quote Request(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/convert#send-quote-request">Send + * Quote Request (USER_DATA) Documentation */ private okhttp3.Call sendQuoteRequestCall(SendQuoteRequestRequest sendQuoteRequestRequest) throws ApiException { @@ -645,9 +647,9 @@ private okhttp3.Call sendQuoteRequestValidateBeforeCall( } /** - * Send Quote Request(USER_DATA) Request a quote for the requested token pairs * Either - * fromAmount or toAmount should be sent * `quoteId` will be returned only if you have - * enough funds to convert Weight: 50(IP) + * Send Quote Request (USER_DATA) Request a quote for the requested token pairs Weight: 50(IP) + * 360/hour, 500/day Security Type: USER_DATA Notes: - Either fromAmount or toAmount should be + * sent - `quoteId` will be returned only if you have enough funds to convert * * @param sendQuoteRequestRequest (required) * @return ApiResponse<SendQuoteRequestResponse> @@ -661,8 +663,8 @@ private okhttp3.Call sendQuoteRequestValidateBeforeCall( * * * @see Send - * Quote Request(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/convert#send-quote-request">Send + * Quote Request (USER_DATA) Documentation */ public ApiResponse sendQuoteRequest( @Valid @NotNull SendQuoteRequestRequest sendQuoteRequestRequest) throws ApiException { diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/DerivativesTradingUsdsFuturesRestApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/DerivativesTradingUsdsFuturesRestApi.java index 84cd7ae51..add31ac68 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/DerivativesTradingUsdsFuturesRestApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/DerivativesTradingUsdsFuturesRestApi.java @@ -12,6 +12,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AccountTradeListResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AdlRiskResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AllOrdersResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AssetIndexResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AutoCancelAllOpenOrdersRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AutoCancelAllOpenOrdersResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AutoCloseType; @@ -42,6 +43,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.FuturesAccountBalanceV3Response; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.FuturesAccountConfigurationResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.FuturesTradfiPerpsContractRequest; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.FuturesTradfiPerpsContractResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.FuturesTradingQuantitativeRulesIndicatorsResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetBnbBurnStatusResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetCurrentMultiAssetsModeResponse; @@ -57,6 +59,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetIncomeHistoryResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetOrderModifyHistoryResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetPositionMarginChangeHistoryResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.IncomeType; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.IndexPriceKlineCandlestickDataResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Interval; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.KeepaliveUserDataStreamResponse; @@ -71,7 +74,6 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ModifyMultipleOrdersResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ModifyOrderRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ModifyOrderResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.MultiAssetsModeAssetIndexResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.NewAlgoOrderRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.NewAlgoOrderResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.NewOrderRequest; @@ -143,9 +145,9 @@ public DerivativesTradingUsdsFuturesRestApi(ApiClient apiClient) { } /** - * Account Information V2(USER_DATA) Get current account information. User in single-asset/ + * Account Information V2 (USER_DATA) Get current account information. User in single-asset/ * multi-assets mode will see different value, see comments in response section for detail. - * Weight: 5 + * Weight(IP): 5 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<AccountInformationV2Response> @@ -159,8 +161,8 @@ public DerivativesTradingUsdsFuturesRestApi(ApiClient apiClient) { * * * @see Account - * Information V2(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#account-information-v2">Account + * Information V2 (USER_DATA) Documentation */ public ApiResponse accountInformationV2(Long recvWindow) throws ApiException { @@ -168,9 +170,9 @@ public ApiResponse accountInformationV2(Long recvW } /** - * Account Information V3(USER_DATA) Get current account information. User in single-asset/ + * Account Information V3 (USER_DATA) Get current account information. User in single-asset/ * multi-assets mode will see different value, see comments in response section for detail. - * Weight: 5 + * Weight(IP): 5 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<AccountInformationV3Response> @@ -184,8 +186,8 @@ public ApiResponse accountInformationV2(Long recvW * * * @see Account - * Information V3(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#account-information-v3">Account + * Information V3 (USER_DATA) Documentation */ public ApiResponse accountInformationV3(Long recvWindow) throws ApiException { @@ -193,7 +195,8 @@ public ApiResponse accountInformationV3(Long recvW } /** - * Futures Account Balance V2 (USER_DATA) Query account balance info Weight: 5 + * Futures Account Balance V2 (USER_DATA) Query account balance information. Weight(IP): 5 + * Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<FuturesAccountBalanceV2Response> @@ -207,7 +210,7 @@ public ApiResponse accountInformationV3(Long recvW * * * @see Futures + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-account-balance-v2">Futures * Account Balance V2 (USER_DATA) Documentation */ public ApiResponse futuresAccountBalanceV2(Long recvWindow) @@ -216,7 +219,8 @@ public ApiResponse futuresAccountBalanceV2(Long } /** - * Futures Account Balance V3 (USER_DATA) Query account balance info Weight: 5 + * Futures Account Balance V3 (USER_DATA) Query account balance information. Weight(IP): 5 + * Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<FuturesAccountBalanceV3Response> @@ -230,7 +234,7 @@ public ApiResponse futuresAccountBalanceV2(Long * * * @see Futures + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-account-balance-v3">Futures * Account Balance V3 (USER_DATA) Documentation */ public ApiResponse futuresAccountBalanceV3(Long recvWindow) @@ -239,7 +243,8 @@ public ApiResponse futuresAccountBalanceV3(Long } /** - * Futures Account Configuration(USER_DATA) Query account configuration Weight: 5 + * Futures Account Configuration (USER_DATA) Query account configuration Weight(IP): 5 Security + * Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<FuturesAccountConfigurationResponse> @@ -253,8 +258,8 @@ public ApiResponse futuresAccountBalanceV3(Long * * * @see Futures - * Account Configuration(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-account-configuration">Futures + * Account Configuration (USER_DATA) Documentation */ public ApiResponse futuresAccountConfiguration( Long recvWindow) throws ApiException { @@ -264,8 +269,9 @@ public ApiResponse futuresAccountConfigurat /** * Futures Trading Quantitative Rules Indicators (USER_DATA) Futures trading quantitative rules * indicators, for more information on this, please refer to the [Futures Trading Quantitative - * Rules](https://www.binance.com/en/support/faq/4f462ebe6ff445d4a170be7d9e897272) Weight: - 1 - * for a single symbol - 10 when the symbol parameter is omitted + * Rules](https://www.binance.com/en/support/faq/4f462ebe6ff445d4a170be7d9e897272) Weight: - + * **1** for a single symbol - **10** when the symbol parameter is omitted Security Type: + * USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -280,7 +286,7 @@ public ApiResponse futuresAccountConfigurat * * * @see Futures + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-trading-quantitative-rules-indicators">Futures * Trading Quantitative Rules Indicators (USER_DATA) Documentation */ public ApiResponse @@ -291,7 +297,7 @@ public ApiResponse futuresAccountConfigurat /** * Get BNB Burn Status (USER_DATA) Get user's BNB Fee Discount (Fee Discount On or Fee - * Discount Off ) Weight: 30 + * Discount Off ) Weight(IP): 30 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetBnbBurnStatusResponse> @@ -305,7 +311,7 @@ public ApiResponse futuresAccountConfigurat * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-bnb-burn-status">Get * BNB Burn Status (USER_DATA) Documentation */ public ApiResponse getBnbBurnStatus(Long recvWindow) @@ -315,7 +321,7 @@ public ApiResponse getBnbBurnStatus(Long recvWindow) /** * Get Current Multi-Assets Mode (USER_DATA) Get user's Multi-Assets mode (Multi-Assets Mode - * or Single-Asset Mode) on ***Every symbol*** Weight: 30 + * or Single-Asset Mode) on ***Every symbol*** Weight(IP): 30 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetCurrentMultiAssetsModeResponse> @@ -329,7 +335,7 @@ public ApiResponse getBnbBurnStatus(Long recvWindow) * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-current-multi-assets-mode">Get * Current Multi-Assets Mode (USER_DATA) Documentation */ public ApiResponse getCurrentMultiAssetsMode(Long recvWindow) @@ -338,8 +344,8 @@ public ApiResponse getCurrentMultiAssetsMode( } /** - * Get Current Position Mode(USER_DATA) Get user's position mode (Hedge Mode or One-way Mode - * ) on ***EVERY symbol*** Weight: 30 + * Get Current Position Mode (USER_DATA) Get user's position mode (Hedge Mode or One-way + * Mode ) on ***EVERY symbol*** Weight(IP): 30 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetCurrentPositionModeResponse> @@ -353,8 +359,8 @@ public ApiResponse getCurrentMultiAssetsMode( * * * @see Get - * Current Position Mode(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-current-position-mode">Get + * Current Position Mode (USER_DATA) Documentation */ public ApiResponse getCurrentPositionMode(Long recvWindow) throws ApiException { @@ -363,9 +369,9 @@ public ApiResponse getCurrentPositionMode(Long r /** * Get Download Id For Futures Order History (USER_DATA) Get Download Id For Futures Order - * History * Request Limitation is 10 times per month, shared by front end download page and - * rest api * The time between `startTime` and `endTime` can not be longer - * than 1 year Weight: 1000 + * History Weight(IP): 1000 Security Type: USER_DATA Notes: - Request Limitation is 10 times per + * month, shared by front end download page and rest api - The time between + * `startTime` and `endTime` can not be longer than 1 year * * @param startTime Timestamp in ms (required) * @param endTime Timestamp in ms (required) @@ -381,7 +387,7 @@ public ApiResponse getCurrentPositionMode(Long r * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-download-id-for-futures-order-history">Get * Download Id For Futures Order History (USER_DATA) Documentation */ public ApiResponse @@ -392,9 +398,9 @@ public ApiResponse getCurrentPositionMode(Long r /** * Get Download Id For Futures Trade History (USER_DATA) Get download id for futures trade - * history * Request Limitation is 5 times per month, shared by front end download page and rest - * api * The time between `startTime` and `endTime` can not be longer than 1 - * year Weight: 1000 + * history Weight(IP): 1000 Security Type: USER_DATA Notes: - Request Limitation is 5 times per + * month, shared by front end download page and rest api - The time between + * `startTime` and `endTime` can not be longer than 1 year * * @param startTime Timestamp in ms (required) * @param endTime Timestamp in ms (required) @@ -410,7 +416,7 @@ public ApiResponse getCurrentPositionMode(Long r * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-download-id-for-futures-trade-history">Get * Download Id For Futures Trade History (USER_DATA) Documentation */ public ApiResponse @@ -420,10 +426,10 @@ public ApiResponse getCurrentPositionMode(Long r } /** - * Get Download Id For Futures Transaction History(USER_DATA) Get download id for futures - * transaction history * Request Limitation is 5 times per month, shared by front end download - * page and rest api * The time between `startTime` and `endTime` can not be - * longer than 1 year Weight: 1000 + * Get Download Id For Futures Transaction History (USER_DATA) Get download id for futures + * transaction history Weight(IP): 1000 Security Type: USER_DATA Notes: - Request Limitation is + * 5 times per month, shared by front end download page and rest api - The time between + * `startTime` and `endTime` can not be longer than 1 year * * @param startTime Timestamp in ms (required) * @param endTime Timestamp in ms (required) @@ -439,8 +445,8 @@ public ApiResponse getCurrentPositionMode(Long r * * * @see Get - * Download Id For Futures Transaction History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-download-id-for-futures-transaction-history">Get + * Download Id For Futures Transaction History (USER_DATA) Documentation */ public ApiResponse getDownloadIdForFuturesTransactionHistory(Long startTime, Long endTime, Long recvWindow) @@ -450,7 +456,7 @@ public ApiResponse getCurrentPositionMode(Long r /** * Get Futures Order History Download Link by Id (USER_DATA) Get futures order history download - * link by Id * Download link expiration: 24h Weight: 10 + * link by Id Weight(IP): 10 Security Type: USER_DATA Notes: - Download link expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -465,7 +471,7 @@ public ApiResponse getCurrentPositionMode(Long r * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-futures-order-history-download-link-by-id">Get * Futures Order History Download Link by Id (USER_DATA) Documentation */ public ApiResponse @@ -475,8 +481,8 @@ public ApiResponse getCurrentPositionMode(Long r } /** - * Get Futures Trade Download Link by Id(USER_DATA) Get futures trade download link by Id * - * Download link expiration: 24h Weight: 10 + * Get Futures Trade Download Link by Id (USER_DATA) Get futures trade download link by Id + * Weight(IP): 10 Security Type: USER_DATA Notes: - Download link expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -491,8 +497,8 @@ public ApiResponse getCurrentPositionMode(Long r * * * @see Get - * Futures Trade Download Link by Id(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-futures-trade-download-link-by-id">Get + * Futures Trade Download Link by Id (USER_DATA) Documentation */ public ApiResponse getFuturesTradeDownloadLinkById( String downloadId, Long recvWindow) throws ApiException { @@ -501,7 +507,8 @@ public ApiResponse getFuturesTradeDownl /** * Get Futures Transaction History Download Link by Id (USER_DATA) Get futures transaction - * history download link by Id * Download link expiration: 24h Weight: 10 + * history download link by Id Weight(IP): 10 Security Type: USER_DATA Notes: - Download link + * expiration: 7 days * * @param downloadId get by download id api (required) * @param recvWindow (optional) @@ -516,7 +523,7 @@ public ApiResponse getFuturesTradeDownl * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-futures-transaction-history-download-link-by-id">Get * Futures Transaction History Download Link by Id (USER_DATA) Documentation */ public ApiResponse @@ -526,23 +533,18 @@ public ApiResponse getFuturesTradeDownl } /** - * Get Income History (USER_DATA) Query income history * If neither `startTime` nor - * `endTime` is sent, the recent 7-day data will be returned. * If `incomeType - * ` is not sent, all kinds of flow will be returned * \"trandId\" is unique in - * the same incomeType for a user * Income history only contains data for the last three months - * Weight: 30 + * Get Income History (USER_DATA) Query income history Weight(IP): 30 Security Type: USER_DATA + * Notes: - If `incomeType ` is not sent, all kinds of flow will be returned - If + * `startTime` and `endTime` are not sent, the recent 7-day data will be + * returned. - `trandId` is unique in the same `incomeType` for a user. - + * Income history only contains data for the last three months. * - * @param symbol (optional) - * @param incomeType TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, - * INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, - * CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, - * AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, - * POSITION_LIMIT_INCREASE_FEE, STRATEGY_UMFUTURES_TRANSFER,FEE_RETURN,BFUSD_REWARD - * (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param page (optional) - * @param limit Default 100; max 1000 (optional) + * @param symbol Trading symbol. (optional) + * @param incomeType Income type. (optional) + * @param startTime Timestamp in milliseconds (inclusive start). (optional) + * @param endTime Timestamp in milliseconds (inclusive end). (optional) + * @param page Pagination page number. (optional) + * @param limit Maximum number of records to return. (optional) * @param recvWindow (optional) * @return ApiResponse<GetIncomeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -555,12 +557,12 @@ public ApiResponse getFuturesTradeDownl * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-income-history">Get * Income History (USER_DATA) Documentation */ public ApiResponse getIncomeHistory( String symbol, - String incomeType, + IncomeType incomeType, Long startTime, Long endTime, Long page, @@ -573,7 +575,7 @@ public ApiResponse getIncomeHistory( /** * Notional and Leverage Brackets (USER_DATA) Query user notional and leverage bracket on - * speicfic symbol Weight: 1 + * speicfic symbol Weight(IP): 1 Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -588,7 +590,7 @@ public ApiResponse getIncomeHistory( * * * @see Notional + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#notional-and-leverage-brackets">Notional * and Leverage Brackets (USER_DATA) Documentation */ public ApiResponse notionalAndLeverageBrackets( @@ -597,7 +599,8 @@ public ApiResponse notionalAndLeverageBrack } /** - * Query User Rate Limit (USER_DATA) Query User Rate Limit Weight: 1 + * Query User Rate Limit (USER_DATA) Query User Rate Limit Weight(IP): 1 Security Type: + * USER_DATA * * @param recvWindow (optional) * @return ApiResponse<QueryUserRateLimitResponse> @@ -611,7 +614,7 @@ public ApiResponse notionalAndLeverageBrack * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#query-user-rate-limit">Query * User Rate Limit (USER_DATA) Documentation */ public ApiResponse queryUserRateLimit(Long recvWindow) @@ -620,9 +623,10 @@ public ApiResponse queryUserRateLimit(Long recvWindo } /** - * Symbol Configuration(USER_DATA) Get current account symbol configuration. Weight: 5 + * Symbol Configuration (USER_DATA) Get current account symbol configuration. Weight(IP): 5 + * Security Type: USER_DATA * - * @param symbol (optional) + * @param symbol Symbol (optional) * @param recvWindow (optional) * @return ApiResponse<SymbolConfigurationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -635,8 +639,8 @@ public ApiResponse queryUserRateLimit(Long recvWindo * * * @see Symbol - * Configuration(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#symbol-configuration">Symbol + * Configuration (USER_DATA) Documentation */ public ApiResponse symbolConfiguration( String symbol, Long recvWindow) throws ApiException { @@ -645,7 +649,7 @@ public ApiResponse symbolConfiguration( /** * Toggle BNB Burn On Futures Trade (TRADE) Change user's BNB Fee Discount (Fee Discount On - * or Fee Discount Off ) on ***EVERY symbol*** Weight: 1 + * or Fee Discount Off ) on ***EVERY symbol*** Weight(IP): 1 Security Type: TRADE * * @param toggleBnbBurnOnFuturesTradeRequest (required) * @return ApiResponse<ToggleBnbBurnOnFuturesTradeResponse> @@ -659,7 +663,7 @@ public ApiResponse symbolConfiguration( * * * @see Toggle + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#toggle-bnb-burn-on-futures-trade">Toggle * BNB Burn On Futures Trade (TRADE) Documentation */ public ApiResponse toggleBnbBurnOnFuturesTrade( @@ -669,9 +673,10 @@ public ApiResponse toggleBnbBurnOnFuturesTr } /** - * User Commission Rate (USER_DATA) Get User Commission Rate Weight: 20 + * User Commission Rate (USER_DATA) Get User Commission Rate Weight(IP): 20 Security Type: + * USER_DATA * - * @param symbol (required) + * @param symbol Symbol (required) * @param recvWindow (optional) * @return ApiResponse<UserCommissionRateResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -684,7 +689,7 @@ public ApiResponse toggleBnbBurnOnFuturesTr * * * @see User + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#user-commission-rate">User * Commission Rate (USER_DATA) Documentation */ public ApiResponse userCommissionRate( @@ -693,7 +698,8 @@ public ApiResponse userCommissionRate( } /** - * Accept the offered quote (USER_DATA) Accept the offered quote by quote ID. Weight: 200(IP) + * Accept the offered quote (USER_DATA) Accept the offered quote by quote ID. Weight(IP): 200 + * Security Type: USER_DATA * * @param acceptTheOfferedQuoteRequest (required) * @return ApiResponse<AcceptTheOfferedQuoteResponse> @@ -707,7 +713,7 @@ public ApiResponse userCommissionRate( * * * @see Accept + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/convert#accept-the-offered-quote">Accept * the offered quote (USER_DATA) Documentation */ public ApiResponse acceptTheOfferedQuote( @@ -717,9 +723,9 @@ public ApiResponse acceptTheOfferedQuote( /** * List All Convert Pairs Query for all convertible token pairs and the tokens’ respective - * upper/lower limits * User needs to supply either or both of the input parameter * If not - * defined for both fromAsset and toAsset, only partial token pairs will be returned * Asset - * BNFCR is only available to convert for MICA region users. Weight: 20(IP) + * upper/lower limits Weight(IP): 20 Notes: - User needs to supply either or both of the input + * parameter - If not defined for both fromAsset and toAsset, only partial token pairs will be + * returned - Asset BNFCR is only available to convert for MICA region users. * * @param fromAsset User spends coin (optional) * @param toAsset User receives coin (optional) @@ -734,7 +740,7 @@ public ApiResponse acceptTheOfferedQuote( * * * @see List + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/convert#list-all-convert-pairs">List * All Convert Pairs Documentation */ public ApiResponse listAllConvertPairs( @@ -743,7 +749,8 @@ public ApiResponse listAllConvertPairs( } /** - * Order status(USER_DATA) Query order status by order ID. Weight: 50(IP) + * Order status (USER_DATA) Query order status by order ID. Weight(IP): 50 Security Type: + * USER_DATA * * @param orderId Either orderId or quoteId is required (optional) * @param quoteId Either orderId or quoteId is required (optional) @@ -758,18 +765,18 @@ public ApiResponse listAllConvertPairs( * * * @see Order - * status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/convert#order-status">Order + * status (USER_DATA) Documentation */ - public ApiResponse orderStatus(Long orderId, String quoteId) + public ApiResponse orderStatus(String orderId, String quoteId) throws ApiException { return convertApi.orderStatus(orderId, quoteId); } /** - * Send Quote Request(USER_DATA) Request a quote for the requested token pairs * Either - * fromAmount or toAmount should be sent * `quoteId` will be returned only if you have - * enough funds to convert Weight: 50(IP) + * Send Quote Request (USER_DATA) Request a quote for the requested token pairs Weight: 50(IP) + * 360/hour, 500/day Security Type: USER_DATA Notes: - Either fromAmount or toAmount should be + * sent - `quoteId` will be returned only if you have enough funds to convert * * @param sendQuoteRequestRequest (required) * @return ApiResponse<SendQuoteRequestResponse> @@ -783,8 +790,8 @@ public ApiResponse orderStatus(Long orderId, String quoteId * * * @see Send - * Quote Request(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/convert#send-quote-request">Send + * Quote Request (USER_DATA) Documentation */ public ApiResponse sendQuoteRequest( SendQuoteRequestRequest sendQuoteRequestRequest) throws ApiException { @@ -796,9 +803,9 @@ public ApiResponse sendQuoteRequest( * of ADL during liquidation, and the rating takes into account the insurance fund balance, * position concentration on the symbol, order book depth, price volatility, average leverage, * unrealized PnL, and margin utilization at the symbol level. The rating can be high, medium - * and low, and is updated every 30 minutes. Weight: 1 + * and low, and is updated every 30 minutes. Weight(IP): 1 * - * @param symbol (optional) + * @param symbol Symbol (optional) * @return ApiResponse<AdlRiskResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -810,7 +817,7 @@ public ApiResponse sendQuoteRequest( * * * @see ADL + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#adl-risk">ADL * Risk Documentation */ public ApiResponse adlRisk(String symbol) throws ApiException { @@ -818,15 +825,39 @@ public ApiResponse adlRisk(String symbol) throws ApiException { } /** - * Basis Query future basis * If startTime and endTime are not sent, the most recent data is - * returned. * Only the data of the latest 30 days is available. Weight: 0 + * Multi-Assets Mode Asset Index Asset index price. > **CM-UM Integration (Effective + * 2026-06-30):** Renamed from *Multi-Assets Mode Asset Index*. The response now additionally + * pushes COIN-M settlement-asset price index entries (e.g., `BTCUSD`, + * `ETHUSD`, `BNBUSD`). The endpoint path `/fapi/v1/assetIndex` is + * unchanged. Weight: **1** for a single symbol; **10** when the symbol parameter is omitted + * + * @param symbol Asset pair (optional) + * @return ApiResponse<AssetIndexResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Multi-Assets Mode Asset Index -
+ * + * @see Multi-Assets + * Mode Asset Index Documentation + */ + public ApiResponse assetIndex(String symbol) throws ApiException { + return marketDataApi.assetIndex(symbol); + } + + /** + * Basis Query future basis Weight(IP): 0 Notes: - If startTime and endTime are not sent, the + * most recent data is returned. - Only the data of the latest 30 days is available. * * @param pair (required) * @param contractType (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<BasisResponse> @@ -840,7 +871,7 @@ public ApiResponse adlRisk(String symbol) throws ApiException { * * * @see Basis + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#basis">Basis * Documentation */ public ApiResponse basis( @@ -855,8 +886,8 @@ public ApiResponse basis( } /** - * Check Server Time Test connectivity to the Rest API and get the current server time. Weight: - * 1 + * Check Server Time Test connectivity to the Rest API and get the current server time. + * Weight(IP): 1 * * @return ApiResponse<CheckServerTimeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -869,7 +900,7 @@ public ApiResponse basis( * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#check-server-time">Check * Server Time Documentation */ public ApiResponse checkServerTime() throws ApiException { @@ -877,8 +908,8 @@ public ApiResponse checkServerTime() throws ApiExceptio } /** - * Composite Index Symbol Information Query composite index symbol information * Only for - * composite index symbols Weight: 1 + * Composite Index Symbol Information Query composite index symbol information Weight(IP): 1 + * Notes: - Only for composite index symbols * * @param symbol (optional) * @return ApiResponse<CompositeIndexSymbolInformationResponse> @@ -892,7 +923,7 @@ public ApiResponse checkServerTime() throws ApiExceptio * * * @see Composite + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#composite-index-symbol-information">Composite * Index Symbol Information Documentation */ public ApiResponse compositeIndexSymbolInformation( @@ -904,21 +935,21 @@ public ApiResponse compositeIndexSymbol * Compressed/Aggregate Trades List Get compressed, aggregate market trades. Market trades that * fill in 100ms with the same price and the same taking side will have the quantity aggregated. * Retail Price Improvement(RPI) orders are aggregated and without special tags to be - * distinguished. * support querying futures trade histories that are not older than one year * - * If both `startTime` and `endTime` are sent, time between - * `startTime` and `endTime` must be less than 1 hour. * If + * distinguished. Weight(IP): 20 Notes: - support querying futures trade histories that are not + * older than 24 hours - If both `startTime` and `endTime` are sent, time + * between `startTime` and `endTime` must be less than 1 hour. - If * `fromId`, `startTime`, and `endTime` are not sent, the most - * recent aggregate trades will be returned. * Only market trades will be aggregated and - * returned, which means the insurance fund trades and ADL trades won't be aggregated. * + * recent aggregate trades will be returned. - Only market trades will be aggregated and + * returned, which means the insurance fund trades and ADL trades won't be aggregated. - * Sending both `startTime`/`endTime` and `fromId` might cause * response timeout, please send either `fromId` or - * `startTime`/`endTime` Weight: 20 + * `startTime`/`endTime` * - * @param symbol (required) + * @param symbol Symbol (required) * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) + * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) + * @param limit (optional) * @return ApiResponse<CompressedAggregateTradesListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -930,7 +961,7 @@ public ApiResponse compositeIndexSymbol * * * @see Compressed/Aggregate + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#compressed-aggregate-trades-list">Compressed/Aggregate * Trades List Documentation */ public ApiResponse compressedAggregateTradesList( @@ -942,18 +973,17 @@ public ApiResponse compressedAggregateTra /** * Continuous Contract Kline/Candlestick Data Kline/candlestick bars for a specific contract - * type. Klines are uniquely identified by their open time. * If startTime and endTime are not - * sent, the most recent klines are returned. * Contract type: * PERPETUAL * CURRENT_QUARTER * - * NEXT_QUARTER * TRADIFI_PERPETUAL Weight: based on parameter LIMIT | LIMIT | weight | | - * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | - * 10 | + * type. Klines are uniquely identified by their open time. Weight: based on parameter + * `LIMIT` | LIMIT | weight | | ----------- | ------ | | [1,100) | 1 | | [100, 500) | + * 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - If startTime and endTime are not sent, + * the most recent klines are returned. * - * @param pair (required) - * @param contractType (required) + * @param pair After CM migration, accepts both UM and CM pair values. (required) + * @param contractType Futurestype (required) * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @return ApiResponse<ContinuousContractKlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -965,7 +995,7 @@ public ApiResponse compressedAggregateTra * * * @see Continuous + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#continuous-contract-kline-candlestick-data">Continuous * Contract Kline/Candlestick Data Documentation */ public ApiResponse @@ -982,7 +1012,7 @@ public ApiResponse compressedAggregateTra } /** - * Exchange Information Current exchange trading rules and symbol information Weight: 1 + * Exchange Information Current exchange trading rules and symbol information Weight(IP): 1 * * @return ApiResponse<ExchangeInformationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -995,7 +1025,7 @@ public ApiResponse compressedAggregateTra * * * @see Exchange + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#exchange-information">Exchange * Information Documentation */ public ApiResponse exchangeInformation() throws ApiException { @@ -1003,16 +1033,16 @@ public ApiResponse exchangeInformation() throws Api } /** - * Get Funding Rate History Get Funding Rate History * If `startTime` and - * `endTime` are not sent, the most recent 200 records are returned. * If the number - * of data between `startTime` and `endTime` is larger than - * `limit`, return as `startTime` + `limit`. * In ascending order. - * Weight: share 500/5min/IP rate limit with GET /fapi/v1/fundingInfo + * Get Funding Rate History Get Funding Rate History Weight: share 500/5min/IP rate limit with + * GET /fapi/v1/fundingInfo Notes: - If `startTime` and `endTime` are not + * sent, the most recent 200 records are returned. - If the number of data between + * `startTime` and `endTime` is larger than `limit`, return as + * `startTime` + `limit`. - In ascending order. * * @param symbol (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Timestamp in ms to get funding rate from INCLUSIVE. (optional) + * @param endTime Timestamp in ms to get funding rate until INCLUSIVE. (optional) + * @param limit (optional) * @return ApiResponse<GetFundingRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1024,7 +1054,7 @@ public ApiResponse exchangeInformation() throws Api * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#get-funding-rate-history">Get * Funding Rate History Documentation */ public ApiResponse getFundingRateHistory( @@ -1033,9 +1063,9 @@ public ApiResponse getFundingRateHistory( } /** - * Get Funding Rate Info Query funding rate info for symbols that had FundingRateCap/ - * FundingRateFloor / fundingIntervalHours adjustment Weight: 0 share 500/5min/IP rate limit - * with GET /fapi/v1/fundingRate + * Get Funding Rate Info Query funding rate info for symbols that had + * FundingRateCap/FundingRateFloor / fundingIntervalHours adjustment Weight: **0** share + * 500/5min/IP rate limit with `GET /fapi/v1/fundingRate` * * @return ApiResponse<GetFundingRateInfoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1048,7 +1078,7 @@ public ApiResponse getFundingRateHistory( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#get-funding-rate-info">Get * Funding Rate Info Documentation */ public ApiResponse getFundingRateInfo() throws ApiException { @@ -1057,16 +1087,16 @@ public ApiResponse getFundingRateInfo() throws ApiEx /** * Index Price Kline/Candlestick Data Kline/candlestick bars for the index price of a pair. - * Klines are uniquely identified by their open time. * If startTime and endTime are not sent, - * the most recent klines are returned. Weight: based on parameter LIMIT | LIMIT | weight | | - * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | - * 10 | + * Klines are uniquely identified by their open time. Weight: based on parameter + * `LIMIT` | LIMIT | weight | | ----------- | ------ | | [1,100) | 1 | | [100, 500) | + * 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - If startTime and endTime are not sent, + * the most recent klines are returned. * - * @param pair (required) + * @param pair After CM migration, accepts both UM and CM pair values. (required) * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @return ApiResponse<IndexPriceKlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1078,7 +1108,7 @@ public ApiResponse getFundingRateInfo() throws ApiEx * * * @see Index + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#index-price-kline-candlestick-data">Index * Price Kline/Candlestick Data Documentation */ public ApiResponse indexPriceKlineCandlestickData( @@ -1090,15 +1120,15 @@ public ApiResponse indexPriceKlineCandle /** * Kline/Candlestick Data Kline/candlestick bars for a symbol. Klines are uniquely identified by - * their open time. * If startTime and endTime are not sent, the most recent klines are - * returned. Weight: based on parameter LIMIT | LIMIT | weight | | ----------- | ------ | | - * [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | + * their open time. Weight: based on parameter `LIMIT` | LIMIT | weight | | + * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | + * 10 | Notes: - If startTime and endTime are not sent, the most recent klines are returned. * - * @param symbol (required) + * @param symbol After CM migration, accepts both UM and CM symbols. (required) * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @return ApiResponse<KlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1110,7 +1140,7 @@ public ApiResponse indexPriceKlineCandle * * * @see Kline/Candlestick + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#kline-candlestick-data">Kline/Candlestick * Data Documentation */ public ApiResponse klineCandlestickData( @@ -1120,15 +1150,13 @@ public ApiResponse klineCandlestickData( } /** - * Long/Short Ratio Query symbol Long/Short Ratio * If startTime and endTime are not sent, the - * most recent data is returned. * Only the data of the latest 30 days is available. * IP rate - * limit 1000 requests/5min Weight: 0 + * Long/Short Ratio Query symbol Long/Short Ratio Weight(IP): 0 Notes: - If startTime and + * endTime are not sent, the most recent data is returned. - Only the data of the latest 30 days + * is available. - IP rate limit 1000 requests/5min * * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<LongShortRatioResponse> @@ -1142,7 +1170,7 @@ public ApiResponse klineCandlestickData( * * * @see Long/Short + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#long-short-ratio">Long/Short * Ratio Documentation */ public ApiResponse longShortRatio( @@ -1152,7 +1180,7 @@ public ApiResponse longShortRatio( } /** - * Mark Price Mark Price and Funding Rate Weight: 1 with symbol, 10 without symbol + * Mark Price Mark Price and Funding Rate Weight: **1** with symbol, **10** without symbol * * @param symbol (optional) * @return ApiResponse<MarkPriceResponse> @@ -1166,7 +1194,7 @@ public ApiResponse longShortRatio( * * * @see Mark + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#mark-price">Mark * Price Documentation */ public ApiResponse markPrice(String symbol) throws ApiException { @@ -1175,16 +1203,16 @@ public ApiResponse markPrice(String symbol) throws ApiExcepti /** * Mark Price Kline/Candlestick Data Kline/candlestick bars for the mark price of a symbol. - * Klines are uniquely identified by their open time. * If startTime and endTime are not sent, - * the most recent klines are returned. Weight: based on parameter LIMIT | LIMIT | weight | | - * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | - * 10 | + * Klines are uniquely identified by their open time. Weight: based on parameter + * `LIMIT` | LIMIT | weight | | ----------- | ------ | | [1,100) | 1 | | [100, 500) | + * 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - If startTime and endTime are not sent, + * the most recent klines are returned. * - * @param symbol (required) + * @param symbol After CM migration, accepts both UM and CM symbols. (required) * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @return ApiResponse<MarkPriceKlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1196,7 +1224,7 @@ public ApiResponse markPrice(String symbol) throws ApiExcepti * * * @see Mark + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#mark-price-kline-candlestick-data">Mark * Price Kline/Candlestick Data Documentation */ public ApiResponse markPriceKlineCandlestickData( @@ -1207,38 +1235,14 @@ public ApiResponse markPriceKlineCandlest } /** - * Multi-Assets Mode Asset Index asset index for Multi-Assets mode Weight: 1 for a single - * symbol; 10 when the symbol parameter is omitted - * - * @param symbol (optional) - * @return ApiResponse<MultiAssetsModeAssetIndexResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Multi-Assets Mode Asset Index -
- * - * @see Multi-Assets - * Mode Asset Index Documentation - */ - public ApiResponse multiAssetsModeAssetIndex(String symbol) - throws ApiException { - return marketDataApi.multiAssetsModeAssetIndex(symbol); - } - - /** - * Old Trades Lookup (MARKET_DATA) Get older market historical trades. * Market trades means - * trades filled in the order book. Only market trades will be returned, which means the - * insurance fund trades and ADL trades won't be returned. * Only supports data from within - * the last one month Weight: 20 + * Old Trades Lookup (MARKET_DATA) Get older market historical trades. Weight(IP): 20 Security + * Type: MARKET_DATA Notes: - Market trades means trades filled in the order book. Only market + * trades will be returned, which means the insurance fund trades and ADL trades won't be + * returned. - Only supports data from within the last one month * * @param symbol (required) - * @param limit Default 100; max 1000 (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) + * @param limit (optional) + * @param fromId TradeId to fetch from. Default gets most recent trades. (optional) * @return ApiResponse<OldTradesLookupResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1250,7 +1254,7 @@ public ApiResponse multiAssetsModeAssetIndex( * * * @see Old + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#old-trades-lookup">Old * Trades Lookup (MARKET_DATA) Documentation */ public ApiResponse oldTradesLookup( @@ -1259,7 +1263,7 @@ public ApiResponse oldTradesLookup( } /** - * Open Interest Get present open interest of a specific symbol. Weight: 1 + * Open Interest Get present open interest of a specific symbol. Weight(IP): 1 * * @param symbol (required) * @return ApiResponse<OpenInterestResponse> @@ -1273,7 +1277,7 @@ public ApiResponse oldTradesLookup( * * * @see Open + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#open-interest">Open * Interest Documentation */ public ApiResponse openInterest(String symbol) throws ApiException { @@ -1281,15 +1285,13 @@ public ApiResponse openInterest(String symbol) throws ApiE } /** - * Open Interest Statistics Open Interest Statistics * If startTime and endTime are not sent, - * the most recent data is returned. * Only the data of the latest 1 month is available. * IP - * rate limit 1000 requests/5min Weight: 0 + * Open Interest Statistics Open Interest Statistics Weight(IP): 0 Notes: - If startTime and + * endTime are not sent, the most recent data is returned. - Only the data of the latest 1 month + * is available. - IP rate limit 1000 requests/5min * * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<OpenInterestStatisticsResponse> @@ -1303,7 +1305,7 @@ public ApiResponse openInterest(String symbol) throws ApiE * * * @see Open + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#open-interest-statistics">Open * Interest Statistics Documentation */ public ApiResponse openInterestStatistics( @@ -1318,7 +1320,7 @@ public ApiResponse openInterestStatistics( * ------------- | ------ | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | 20 | * * @param symbol (required) - * @param limit Default 100; max 1000 (optional) + * @param limit Valid limits:[5, 10, 20, 50, 100, 500, 1000] (optional) * @return ApiResponse<OrderBookResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1330,7 +1332,7 @@ public ApiResponse openInterestStatistics( * * * @see Order + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#order-book">Order * Book Documentation */ public ApiResponse orderBook(String symbol, Long limit) throws ApiException { @@ -1339,15 +1341,15 @@ public ApiResponse orderBook(String symbol, Long limit) throw /** * Premium index Kline Data Premium index kline bars of a symbol. Klines are uniquely identified - * by their open time. * If startTime and endTime are not sent, the most recent klines are - * returned. Weight: based on parameter LIMIT | LIMIT | weight | | ----------- | ------ | | - * [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | + * by their open time. Weight: based on parameter `LIMIT` | LIMIT | weight | | + * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | + * 10 | Notes: - If startTime and endTime are not sent, the most recent klines are returned. * - * @param symbol (required) + * @param symbol After CM migration, accepts both UM and CM symbols. (required) * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @return ApiResponse<PremiumIndexKlineDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1359,7 +1361,7 @@ public ApiResponse orderBook(String symbol, Long limit) throw * * * @see Premium + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#premium-index-kline-data">Premium * index Kline Data Documentation */ public ApiResponse premiumIndexKlineData( @@ -1369,7 +1371,7 @@ public ApiResponse premiumIndexKlineData( } /** - * Quarterly Contract Settlement Price Latest price for a symbol or symbols. Weight: 0 + * Quarterly Contract Settlement Price Latest price for a symbol or symbols. Weight(IP): 0 * * @param pair (required) * @return ApiResponse<QuarterlyContractSettlementPriceResponse> @@ -1383,7 +1385,7 @@ public ApiResponse premiumIndexKlineData( * * * @see Quarterly + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#quarterly-contract-settlement-price">Quarterly * Contract Settlement Price Documentation */ public ApiResponse quarterlyContractSettlementPrice( @@ -1393,7 +1395,7 @@ public ApiResponse quarterlyContractSe /** * Query Index Price Constituents Query index price constituents **Note**: Prices from - * constituents of TradFi perps will be hiden and displayed as -1. Weight: 2 + * constituents of TradFi perps will be hiden and displayed as -1. Weight(IP): 2 * * @param symbol (required) * @return ApiResponse<QueryIndexPriceConstituentsResponse> @@ -1407,7 +1409,7 @@ public ApiResponse quarterlyContractSe * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#query-index-price-constituents">Query * Index Price Constituents Documentation */ public ApiResponse queryIndexPriceConstituents( @@ -1416,9 +1418,9 @@ public ApiResponse queryIndexPriceConstitue } /** - * Query Insurance Fund Balance Snapshot Query Insurance Fund Balance Snapshot Weight: 1 + * Query Insurance Fund Balance Snapshot Query Insurance Fund Balance Snapshot Weight(IP): 1 * - * @param symbol (optional) + * @param symbol Symbol (optional) * @return ApiResponse<QueryInsuranceFundBalanceSnapshotResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1430,7 +1432,7 @@ public ApiResponse queryIndexPriceConstitue * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#query-insurance-fund-balance-snapshot">Query * Insurance Fund Balance Snapshot Documentation */ public ApiResponse queryInsuranceFundBalanceSnapshot( @@ -1439,12 +1441,12 @@ public ApiResponse queryInsuranceFund } /** - * Recent Trades List Get recent market trades * Market trades means trades filled in the order - * book. Only market trades will be returned, which means the insurance fund trades and ADL - * trades won't be returned. Weight: 5 + * Recent Trades List Get recent market trades Weight(IP): 5 Notes: - Market trades means trades + * filled in the order book. Only market trades will be returned, which means the insurance fund + * trades and ADL trades won't be returned. * * @param symbol (required) - * @param limit Default 100; max 1000 (optional) + * @param limit (optional) * @return ApiResponse<RecentTradesListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1456,7 +1458,7 @@ public ApiResponse queryInsuranceFund * * * @see Recent + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#recent-trades-list">Recent * Trades List Documentation */ public ApiResponse recentTradesList(String symbol, Long limit) @@ -1471,7 +1473,7 @@ public ApiResponse recentTradesList(String symbol, Lon * | 1000 | 20 | * * @param symbol (required) - * @param limit Default 100; max 1000 (optional) + * @param limit Valid limits:[1000] (optional) * @return ApiResponse<RpiOrderBookResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1483,7 +1485,7 @@ public ApiResponse recentTradesList(String symbol, Lon * * * @see RPI + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#rpi-order-book">RPI * Order Book Documentation */ public ApiResponse rpiOrderBook(String symbol, Long limit) @@ -1493,10 +1495,11 @@ public ApiResponse rpiOrderBook(String symbol, Long limit) /** * Symbol Order Book Ticker Best price/qty on the order book for a symbol or symbols. Retail - * Price Improvement(RPI) orders are not visible and excluded in the response message. * If the - * symbol is not sent, bookTickers for all symbols will be returned in an array. * The field + * Price Improvement(RPI) orders are not visible and excluded in the response message. Weight: + * **2** for a single symbol; **5** when the symbol parameter is omitted Notes: - If the symbol + * is not sent, bookTickers for all symbols will be returned in an array. - The field * `X-MBX-USED-WEIGHT-1M` in response header is not accurate from this endpoint, - * please ignore. Weight: 2 for a single symbol; 5 when the symbol parameter is omitted + * please ignore. * * @param symbol (optional) * @return ApiResponse<SymbolOrderBookTickerResponse> @@ -1510,7 +1513,7 @@ public ApiResponse rpiOrderBook(String symbol, Long limit) * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#symbol-order-book-ticker">Symbol * Order Book Ticker Documentation */ public ApiResponse symbolOrderBookTicker(String symbol) @@ -1519,9 +1522,9 @@ public ApiResponse symbolOrderBookTicker(String s } /** - * Symbol Price Ticker Latest price for a symbol or symbols. * If the symbol is not sent, prices - * for all symbols will be returned in an array. Weight: 1 for a single symbol; 2 when the - * symbol parameter is omitted + * Symbol Price Ticker Latest price for a symbol or symbols. Weight: 1 for a single symbol; 2 + * when the symbol parameter is omitted Notes: - If the symbol is not sent, prices for all + * symbols will be returned in an array. * * @param symbol (optional) * @return ApiResponse<SymbolPriceTickerResponse> @@ -1536,7 +1539,7 @@ public ApiResponse symbolOrderBookTicker(String s * * @deprecated * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#symbol-price-ticker">Symbol * Price Ticker Documentation */ public ApiResponse symbolPriceTicker(String symbol) @@ -1545,10 +1548,10 @@ public ApiResponse symbolPriceTicker(String symbol) } /** - * Symbol Price Ticker V2 Latest price for a symbol or symbols. * If the symbol is not sent, - * prices for all symbols will be returned in an array. * The field - * `X-MBX-USED-WEIGHT-1M` in response header is not accurate from this endpoint, - * please ignore. Weight: 1 for a single symbol; 2 when the symbol parameter is omitted + * Symbol Price Ticker V2 Latest price for a symbol or symbols. Weight: 1 for a single symbol; 2 + * when the symbol parameter is omitted Notes: - If the symbol is not sent, prices for all + * symbols will be returned in an array. - The field `X-MBX-USED-WEIGHT-1M` in + * response header is not accurate from this endpoint, please ignore. * * @param symbol (optional) * @return ApiResponse<SymbolPriceTickerV2Response> @@ -1562,7 +1565,7 @@ public ApiResponse symbolPriceTicker(String symbol) * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#symbol-price-ticker-v2">Symbol * Price Ticker V2 Documentation */ public ApiResponse symbolPriceTickerV2(String symbol) @@ -1571,15 +1574,13 @@ public ApiResponse symbolPriceTickerV2(String symbo } /** - * Taker Buy/Sell Volume Taker Buy/Sell Volume * If startTime and endTime are not sent, the most - * recent data is returned. * Only the data of the latest 30 days is available. * IP rate limit - * 1000 requests/5min Weight: 0 + * Taker Buy/Sell Volume Taker Buy/Sell Volume Weight(IP): 0 Notes: - If startTime and endTime + * are not sent, the most recent data is returned. - Only the data of the latest 30 days is + * available. - IP rate limit 1000 requests/5min * * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<TakerBuySellVolumeResponse> @@ -1593,7 +1594,7 @@ public ApiResponse symbolPriceTickerV2(String symbo * * * @see Taker + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#taker-buy-sell-volume">Taker * Buy/Sell Volume Documentation */ public ApiResponse takerBuySellVolume( @@ -1603,7 +1604,7 @@ public ApiResponse takerBuySellVolume( } /** - * Test Connectivity Test connectivity to the Rest API. Weight: 1 + * Test Connectivity Test connectivity to the Rest API. Weight(IP): 1 * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1616,7 +1617,7 @@ public ApiResponse takerBuySellVolume( * * * @see Test + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#test-connectivity">Test * Connectivity Documentation */ public void testConnectivity() throws ApiException { @@ -1625,9 +1626,9 @@ public void testConnectivity() throws ApiException { /** * 24hr Ticker Price Change Statistics 24 hour rolling window price change statistics. - * **Careful** when accessing this with no symbol. * If the symbol is not sent, tickers for all - * symbols will be returned in an array. Weight: 1 for a single symbol; 40 when the symbol - * parameter is omitted + * **Careful** when accessing this with no symbol. Weight: **1** for a single symbol; **40** + * when the symbol parameter is omitted Notes: - If the symbol is not sent, tickers for all + * symbols will be returned in an array. * * @param symbol (optional) * @return ApiResponse<Ticker24hrPriceChangeStatisticsResponse> @@ -1641,7 +1642,7 @@ public void testConnectivity() throws ApiException { * * * @see 24hr + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#ticker24hr-price-change-statistics">24hr * Ticker Price Change Statistics Documentation */ public ApiResponse ticker24hrPriceChangeStatistics( @@ -1650,20 +1651,18 @@ public ApiResponse ticker24hrPriceChang } /** - * Top Trader Long/Short Ratio (Accounts) The proportion of net long and net short accounts to - * total accounts of the top 20% users with the highest margin balance. Each account is counted - * once only. Long Account % = Accounts of top traders with net long positions / Total - * accounts of top traders with open positions Short Account % = Accounts of top traders - * with net short positions / Total accounts of top traders with open positions Long/Short Ratio - * (Accounts) = Long Account % / Short Account % * If startTime and endTime are not sent, - * the most recent data is returned. * Only the data of the latest 30 days is available. * IP - * rate limit 1000 requests/5min Weight: 0 + * Top Trader Long/Short Account Ratio (MARKET_DATA) The proportion of net long and net short + * accounts to total accounts of the top 20% users with the highest margin balance. Each account + * is counted once only. Long Account % = Accounts of top traders with net long positions / + * Total accounts of top traders with open positions Short Account % = Accounts of top + * traders with net short positions / Total accounts of top traders with open positions + * Long/Short Ratio (Accounts) = Long Account % / Short Account % Security Type: + * MARKET_DATA Notes: - If startTime and endTime are not sent, the most recent data is returned. + * - Only the data of the latest 30 days is available. - IP rate limit 1000 requests/5min * * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<TopTraderLongShortRatioAccountsResponse> @@ -1677,8 +1676,8 @@ public ApiResponse ticker24hrPriceChang * * * @see Top - * Trader Long/Short Ratio (Accounts) Documentation + * href="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-accounts">Top + * Trader Long/Short Account Ratio (MARKET_DATA) Documentation */ public ApiResponse topTraderLongShortRatioAccounts( String symbol, Period period, Long limit, Long startTime, Long endTime) @@ -1688,19 +1687,18 @@ public ApiResponse topTraderLongShortRa } /** - * Top Trader Long/Short Ratio (Positions) The proportion of net long and net short positions to - * total open positions of the top 20% users with the highest margin balance. Long Position % - * = Long positions of top traders / Total open positions of top traders Short Position % - * = Short positions of top traders / Total open positions of top traders Long/Short Ratio - * (Positions) = Long Position % / Short Position % * If startTime and endTime are not - * sent, the most recent data is returned. * Only the data of the latest 30 days is available. * - * IP rate limit 1000 requests/5min Weight: 0 + * Top Trader Long/Short Position Ratio (MARKET_DATA) The proportion of net long and net short + * positions to total open positions of the top 20% users with the highest margin balance. Long + * Position % = Long positions of top traders / Total open positions of top traders Short + * Position % = Short positions of top traders / Total open positions of top traders + * Long/Short Ratio (Positions) = Long Position % / Short Position % Weight(IP): 0 Security + * Type: MARKET_DATA Notes: - If startTime and endTime are not sent, the most recent data is + * returned. - Only the data of the latest 30 days is available. - IP rate limit 1000 + * requests/5min * * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<TopTraderLongShortRatioPositionsResponse> @@ -1714,8 +1712,8 @@ public ApiResponse topTraderLongShortRa * * * @see Top - * Trader Long/Short Ratio (Positions) Documentation + * href="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">Top + * Trader Long/Short Position Ratio (MARKET_DATA) Documentation */ public ApiResponse topTraderLongShortRatioPositions( String symbol, Period period, Long limit, Long startTime, Long endTime) @@ -1726,11 +1724,14 @@ public ApiResponse topTraderLongShortR /** * Trading Schedule Trading session schedules for the underlying assets of TradFi Perps are - * provided for a one-week period starting from the day prior to the query time, covering both - * the U.S. equity and commodity markets. Equity market session types include + * 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, and the commodity market. Session types per market: - U.S. equity market: * \"PRE_MARKET\", \"REGULAR\", \"AFTER_MARKET\", - * \"OVERNIGHT\", and \"NO_TRADING\", while commodity market session types - * include \"REGULAR\" and \"NO_TRADING\". Weight: 5 + * \"OVERNIGHT\", \"NO_TRADING\". - Commodity market: \"REGULAR\", + * \"NO_TRADING\". - Korean equity market: \"REGULAR\", + * \"NO_TRADING\". - Hong Kong equity market: \"REGULAR\", + * \"NO_TRADING\". Weight(IP): 5 * * @return ApiResponse<TradingScheduleResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1743,7 +1744,7 @@ public ApiResponse topTraderLongShortR * * * @see Trading + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#trading-schedule">Trading * Schedule Documentation */ public ApiResponse tradingSchedule() throws ApiException { @@ -1752,8 +1753,8 @@ public ApiResponse tradingSchedule() throws ApiExceptio /** * Classic Portfolio Margin Account Information (USER_DATA) Get Classic Portfolio Margin current - * account information. * maxWithdrawAmount is for asset transfer out to the spot wallet. - * Weight: 5 + * account information. Weight(IP): 5 Security Type: USER_DATA Notes: - maxWithdrawAmount is for + * asset transfer out to the spot wallet. * * @param asset (required) * @param recvWindow (optional) @@ -1768,7 +1769,7 @@ public ApiResponse tradingSchedule() throws ApiExceptio * * * @see Classic + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/portfolio-margin-endpoints#classic-portfolio-margin-account-information">Classic * Portfolio Margin Account Information (USER_DATA) Documentation */ public ApiResponse @@ -1779,19 +1780,19 @@ public ApiResponse tradingSchedule() throws ApiExceptio } /** - * Account Trade List (USER_DATA) Get trades for a specific account and symbol. * If - * `startTime` and `endTime` are both not sent, then the last 7 days' - * data will be returned. * The time between `startTime` and `endTime` - * cannot be longer than 7 days. * The parameter `fromId` cannot be sent with - * `startTime` or `endTime`. * Only support querying trade in the past 6 - * months Weight: 5 + * Account Trade List (USER_DATA) Get trades for a specific account and symbol. Weight(IP): 5 + * Security Type: USER_DATA Notes: - If `startTime` and `endTime` are both + * not sent, then the last 7 days' data will be returned. - The time between + * `startTime` and `endTime` cannot be longer than 7 days. - The parameter + * `fromId` cannot be sent with `startTime` or `endTime`. - Only + * support querying trade in the past 6 months * * @param symbol (required) - * @param orderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param orderId Must be used together with parameter `symbol`. (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<AccountTradeListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1804,7 +1805,7 @@ public ApiResponse tradingSchedule() throws ApiExceptio * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#account-trade-list">Account * Trade List (USER_DATA) Documentation */ public ApiResponse accountTradeList( @@ -1821,18 +1822,19 @@ public ApiResponse accountTradeList( } /** - * All Orders (USER_DATA) Get all account orders; active, canceled, or filled. * These orders - * will not be found: * order status is `CANCELED` or `EXPIRED` **AND** - * order has NO filled trade **AND** created time + 3 days < current time * order create time - * + 90 days < current time * If `orderId` is set, it will get orders >= - * that `orderId`. Otherwise most recent orders are returned. * The query time period - * must be less then 7 days( default as the recent 7 days). Weight: 5 + * All Orders (USER_DATA) Get all account orders; active, canceled, or filled. - These orders + * will not be found: - order status is `CANCELED` or `EXPIRED` **AND** + * order has NO filled trade **AND** created time + 3 days < current time - order create time + * + 90 days < current time Weight(IP): 5 Security Type: USER_DATA Notes: - If + * `orderId` is set, it will get orders >= that `orderId`. Otherwise + * most recent orders are returned. - The query time period must be less then 7 days( default as + * the recent 7 days). * * @param symbol (required) * @param orderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<AllOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1845,7 +1847,7 @@ public ApiResponse accountTradeList( * * * @see All + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#all-orders">All * Orders (USER_DATA) Documentation */ public ApiResponse allOrders( @@ -1857,13 +1859,14 @@ public ApiResponse allOrders( /** * Auto-Cancel All Open Orders (TRADE) Cancel all open orders of the specified symbol at the end * of the specified countdown. The endpoint should be called repeatedly as heartbeats so that - * the existing countdown time can be canceled and replaced by a new one. * Example usage: Call + * the existing countdown time can be canceled and replaced by a new one. Example usage: Call * this endpoint at 30s intervals with an countdownTime of 120000 (120s). If this endpoint is * not called within 120 seconds, all your orders of the specified symbol will be automatically * canceled. If this endpoint is called with an countdownTime of 0, the countdown timer will be * stopped. The system will check all countdowns **approximately every 10 milliseconds**, so * please note that sufficient redundancy should be considered when using this function. We do - * not recommend setting the countdown time to be too precise or too small. Weight: 10 + * not recommend setting the countdown time to be too precise or too small. Weight(IP): 10 + * Security Type: TRADE * * @param autoCancelAllOpenOrdersRequest (required) * @return ApiResponse<AutoCancelAllOpenOrdersResponse> @@ -1877,7 +1880,7 @@ public ApiResponse allOrders( * * * @see Auto-Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#auto-cancel-all-open-orders">Auto-Cancel * All Open Orders (TRADE) Documentation */ public ApiResponse autoCancelAllOpenOrders( @@ -1886,8 +1889,9 @@ public ApiResponse autoCancelAllOpenOrders( } /** - * Cancel Algo Order (TRADE) Cancel an active algo order. * Either `algoId` or - * `clientAlgoId` must be sent. Weight: 1 + * Cancel Algo Order (TRADE) Cancel an active algo (conditional) order, including TP/SL (Take + * Profit / Stop Loss) and trailing stop orders on USD-M Futures. Weight(IP): 1 Security Type: + * TRADE Notes: - Either `algoId` or `clientAlgoId` must be sent. * * @param algoId (optional) * @param clientAlgoId (optional) @@ -1903,7 +1907,7 @@ public ApiResponse autoCancelAllOpenOrders( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-algo-order">Cancel * Algo Order (TRADE) Documentation */ public ApiResponse cancelAlgoOrder( @@ -1912,7 +1916,9 @@ public ApiResponse cancelAlgoOrder( } /** - * Cancel All Algo Open Orders (TRADE) Cancel All Algo Open Orders Weight: 1 + * Cancel All Algo Open Orders (TRADE) Cancel all open algo (conditional) orders on a symbol, + * including TP/SL (Take Profit / Stop Loss) and trailing stop orders on USD-M Futures. + * Weight(IP): 1 Security Type: TRADE * * @param symbol (required) * @param recvWindow (optional) @@ -1927,7 +1933,7 @@ public ApiResponse cancelAlgoOrder( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-all-algo-open-orders">Cancel * All Algo Open Orders (TRADE) Documentation */ public ApiResponse cancelAllAlgoOpenOrders( @@ -1936,7 +1942,7 @@ public ApiResponse cancelAllAlgoOpenOrders( } /** - * Cancel All Open Orders (TRADE) Cancel All Open Orders Weight: 1 + * Cancel All Open Orders (TRADE) Cancel All Open Orders Weight(IP): 1 Security Type: TRADE * * @param symbol (required) * @param recvWindow (optional) @@ -1951,7 +1957,7 @@ public ApiResponse cancelAllAlgoOpenOrders( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-all-open-orders">Cancel * All Open Orders (TRADE) Documentation */ public ApiResponse cancelAllOpenOrders( @@ -1960,14 +1966,12 @@ public ApiResponse cancelAllOpenOrders( } /** - * Cancel Multiple Orders (TRADE) Cancel Multiple Orders * Either `orderIdList` or - * `origClientOrderIdList ` must be sent. Weight: 1 + * Cancel Multiple Orders (TRADE) Cancel Multiple Orders Weight(IP): 1 Security Type: TRADE + * Notes: - Either `orderIdList` or `origClientOrderIdList ` must be sent. * * @param symbol (required) - * @param orderIdList max length 10 <br /> e.g. [1234567,2345678] (optional) - * @param origClientOrderIdList max length 10<br /> e.g. - * [\"my_id_1\",\"my_id_2\"], encode the double quotes. No space after - * comma. (optional) + * @param orderIdList (optional) + * @param origClientOrderIdList (optional) * @param recvWindow (optional) * @return ApiResponse<CancelMultipleOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1980,7 +1984,7 @@ public ApiResponse cancelAllOpenOrders( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-multiple-orders">Cancel * Multiple Orders (TRADE) Documentation */ public ApiResponse cancelMultipleOrders( @@ -1994,8 +1998,8 @@ public ApiResponse cancelMultipleOrders( } /** - * Cancel Order (TRADE) Cancel an active order. * Either `orderId` or - * `origClientOrderId` must be sent. Weight: 1 + * Cancel Order (TRADE) Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - + * Either `orderId` or `origClientOrderId` must be sent. * * @param symbol (required) * @param orderId (optional) @@ -2012,7 +2016,7 @@ public ApiResponse cancelMultipleOrders( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-order">Cancel * Order (TRADE) Documentation */ public ApiResponse cancelOrder( @@ -2022,8 +2026,8 @@ public ApiResponse cancelOrder( } /** - * Change Initial Leverage(TRADE) Change user's initial leverage of specific symbol market. - * Weight: 1 + * Change Initial Leverage (TRADE) Change user's initial leverage of specific symbol market. + * Weight(IP): 1 Security Type: TRADE * * @param changeInitialLeverageRequest (required) * @return ApiResponse<ChangeInitialLeverageResponse> @@ -2037,8 +2041,8 @@ public ApiResponse cancelOrder( * * * @see Change - * Initial Leverage(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#change-initial-leverage">Change + * Initial Leverage (TRADE) Documentation */ public ApiResponse changeInitialLeverage( ChangeInitialLeverageRequest changeInitialLeverageRequest) throws ApiException { @@ -2046,7 +2050,7 @@ public ApiResponse changeInitialLeverage( } /** - * Change Margin Type(TRADE) Change symbol level margin type Weight: 1 + * Change Margin Type (TRADE) Change symbol level margin type Weight(IP): 1 Security Type: TRADE * * @param changeMarginTypeRequest (required) * @return ApiResponse<ChangeMarginTypeResponse> @@ -2060,8 +2064,8 @@ public ApiResponse changeInitialLeverage( * * * @see Change - * Margin Type(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#change-margin-type">Change + * Margin Type (TRADE) Documentation */ public ApiResponse changeMarginType( ChangeMarginTypeRequest changeMarginTypeRequest) throws ApiException { @@ -2070,7 +2074,7 @@ public ApiResponse changeMarginType( /** * Change Multi-Assets Mode (TRADE) Change user's Multi-Assets mode (Multi-Assets Mode or - * Single-Asset Mode) on ***Every symbol*** Weight: 1 + * Single-Asset Mode) on ***Every symbol*** Weight(IP): 1 Security Type: TRADE * * @param changeMultiAssetsModeRequest (required) * @return ApiResponse<ChangeMultiAssetsModeResponse> @@ -2084,7 +2088,7 @@ public ApiResponse changeMarginType( * * * @see Change + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#change-multi-assets-mode">Change * Multi-Assets Mode (TRADE) Documentation */ public ApiResponse changeMultiAssetsMode( @@ -2093,8 +2097,12 @@ public ApiResponse changeMultiAssetsMode( } /** - * Change Position Mode(TRADE) Change user's position mode (Hedge Mode or One-way Mode ) on - * ***EVERY symbol*** Weight: 1 + * Change Position Mode (TRADE) Change user's position mode (Hedge Mode or One-way Mode ) on + * ***EVERY symbol***. **After CM migration**, UM and CM share the **same** + * `dualSidePosition` setting. Calling this endpoint flips both UM and CM at once. If + * either side has any open order or open position, the change is rejected: - `-4067` + * (open orders exist) - `-4068` (open position exists) Weight(IP): 1 Security Type: + * TRADE * * @param changePositionModeRequest (required) * @return ApiResponse<ChangePositionModeResponse> @@ -2108,8 +2116,8 @@ public ApiResponse changeMultiAssetsMode( * * * @see Change - * Position Mode(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#change-position-mode">Change + * Position Mode (TRADE) Documentation */ public ApiResponse changePositionMode( ChangePositionModeRequest changePositionModeRequest) throws ApiException { @@ -2117,10 +2125,11 @@ public ApiResponse changePositionMode( } /** - * Current All Algo Open Orders (USER_DATA) Get all algo open orders on a symbol. * If the - * symbol is not sent, orders for all symbols will be returned in an array. Weight: 1 for a - * single symbol; 40 when the symbol parameter is omitted Careful when accessing this with no - * symbol. + * Current All Algo Open Orders (USER_DATA) Get all open algo (conditional) orders on a symbol, + * including TP/SL (Take Profit / Stop Loss) and trailing stop orders on USD-M Futures. Weight: + * **1** for a single symbol; **40** when the symbol parameter is omitted **Careful** when + * accessing this with no symbol. Security Type: USER_DATA Notes: - If the symbol is not sent, + * orders for all symbols will be returned in an array. * * @param algoType (optional) * @param symbol (optional) @@ -2137,7 +2146,7 @@ public ApiResponse changePositionMode( * * * @see Current + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#current-all-algo-open-orders">Current * All Algo Open Orders (USER_DATA) Documentation */ public ApiResponse currentAllAlgoOpenOrders( @@ -2146,9 +2155,10 @@ public ApiResponse currentAllAlgoOpenOrders( } /** - * Current All Open Orders (USER_DATA) Get all open orders on a symbol. * If the symbol is not - * sent, orders for all symbols will be returned in an array. Weight: 1 for a single symbol; 40 - * when the symbol parameter is omitted Careful when accessing this with no symbol. + * Current All Open Orders (USER_DATA) Get all open orders on a symbol. Weight: **1** for a + * single symbol; **40** when the symbol parameter is omitted **Careful** when accessing this + * with no symbol. Security Type: USER_DATA Notes: - If the symbol is not sent, orders for all + * symbols will be returned in an array. * * @param symbol (optional) * @param recvWindow (optional) @@ -2163,7 +2173,7 @@ public ApiResponse currentAllAlgoOpenOrders( * * * @see Current + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#current-all-open-orders">Current * All Open Orders (USER_DATA) Documentation */ public ApiResponse currentAllOpenOrders( @@ -2172,41 +2182,42 @@ public ApiResponse currentAllOpenOrders( } /** - * Futures TradFi Perps Contract(USER_DATA) Sign TradFi-Perps agreement contract Weight: 0 + * Futures TradFi Perps Contract (USER_DATA) Sign TradFi-Perps agreement contract Weight(IP): 50 + * Security Type: USER_DATA * - * @param futuresTradfiPerpsContractRequest (required) - * @return ApiResponse<Void> + * @param futuresTradfiPerpsContractRequest (optional) + * @return ApiResponse<FuturesTradfiPerpsContractResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * *
Response Details
Status Code Description Response Headers
200 OK -
200 Futures TradFi Perps Contract -
* * @see Futures - * TradFi Perps Contract(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#futures-tradfi-perps-contract">Futures + * TradFi Perps Contract (USER_DATA) Documentation */ - public void futuresTradfiPerpsContract( + public ApiResponse futuresTradfiPerpsContract( FuturesTradfiPerpsContractRequest futuresTradfiPerpsContractRequest) throws ApiException { - tradeApi.futuresTradfiPerpsContract(futuresTradfiPerpsContractRequest); + return tradeApi.futuresTradfiPerpsContract(futuresTradfiPerpsContractRequest); } /** - * Get Order Modify History (USER_DATA) Get order modification history * Either - * `orderId` or `origClientOrderId` must be sent, and the - * `orderId` will prevail if both are sent. * Order modify history longer than 3 month - * is not avaliable Weight: 1 + * Get Order Modify History (USER_DATA) Get order modification history Weight(IP): 1 Security + * Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be + * sent, and the `orderId` will prevail if both are sent. - Order modify history + * longer than 3 month is not avaliable * * @param symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Timestamp in ms to get modification history from INCLUSIVE (optional) + * @param endTime Timestamp in ms to get modification history until INCLUSIVE (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<GetOrderModifyHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2219,7 +2230,7 @@ public void futuresTradfiPerpsContract( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#get-order-modify-history">Get * Order Modify History (USER_DATA) Documentation */ public ApiResponse getOrderModifyHistory( @@ -2236,15 +2247,16 @@ public ApiResponse getOrderModifyHistory( } /** - * Get Position Margin Change History (TRADE) Get Position Margin Change History * Support - * querying future histories that are not older than 30 days * The time between - * `startTime` and `endTime`can't be more than 30 days Weight: 1 + * Get Position Margin Change History (TRADE) Get Position Margin Change History Weight(IP): 1 + * Security Type: TRADE Notes: - Support querying future histories that are not older than 30 + * days - The time between `startTime` and `endTime`can't be more than + * 30 days * * @param symbol (required) * @param type 1: Add position margin,2: Reduce position margin (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime time if not pass (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<GetPositionMarginChangeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2257,7 +2269,7 @@ public ApiResponse getOrderModifyHistory( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#get-position-margin-change-history">Get * Position Margin Change History (TRADE) Documentation */ public ApiResponse getPositionMarginChangeHistory( @@ -2268,8 +2280,8 @@ public ApiResponse getPositionMarginChan } /** - * Modify Isolated Position Margin(TRADE) Modify Isolated Position Margin * Only for isolated - * symbol Weight: 1 + * Modify Isolated Position Margin (TRADE) Modify Isolated Position Margin Weight(IP): 1 + * Security Type: TRADE Notes: - Only for isolated symbol * * @param modifyIsolatedPositionMarginRequest (required) * @return ApiResponse<ModifyIsolatedPositionMarginResponse> @@ -2283,8 +2295,8 @@ public ApiResponse getPositionMarginChan * * * @see Modify - * Isolated Position Margin(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#modify-isolated-position-margin">Modify + * Isolated Position Margin (TRADE) Documentation */ public ApiResponse modifyIsolatedPositionMargin( ModifyIsolatedPositionMarginRequest modifyIsolatedPositionMarginRequest) @@ -2293,12 +2305,13 @@ public ApiResponse modifyIsolatedPositionM } /** - * Modify Multiple Orders(TRADE) Modify Multiple Orders (TRADE) * Parameter rules are same with - * `Modify Order` * Batch modify orders are processed concurrently, and the order of - * matching is not guaranteed. * The order of returned contents for batch modify orders is the - * same as the order of the order list. * One order can only be modfied for less than 10000 - * times Weight: 5 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate - * limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate limit(x-mbx-used-weight-1m); + * Modify Multiple Orders (TRADE) Modify Multiple Orders (TRADE) Weight: 5 on 10s order rate + * limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate + * limit(x-mbx-used-weight-1m); Security Type: TRADE Notes: - Parameter rules are same with + * `Modify Order` - Batch modify orders are processed concurrently, and the order of + * matching is not guaranteed. - The order of returned contents for batch modify orders is the + * same as the order of the order list. - One order can only be modfied for less than 10000 + * times * * @param modifyMultipleOrdersRequest (required) * @return ApiResponse<ModifyMultipleOrdersResponse> @@ -2312,8 +2325,8 @@ public ApiResponse modifyIsolatedPositionM * * * @see Modify - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#modify-multiple-orders">Modify + * Multiple Orders (TRADE) Documentation */ public ApiResponse modifyMultipleOrders( ModifyMultipleOrdersRequest modifyMultipleOrdersRequest) throws ApiException { @@ -2322,18 +2335,18 @@ public ApiResponse modifyMultipleOrders( /** * Modify Order (TRADE) Order modify function, currently only LIMIT order modification is - * supported, modified orders will be reordered in the match queue * Either `orderId` - * or `origClientOrderId` must be sent, and the `orderId` will prevail if - * both are sent. * Both `quantity` and `price` must be sent, which is - * different from dapi modify order endpoint. * When the new `quantity` or - * `price` doesn'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 `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 Weight: 1 on 10s order rate + * 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) + * limit(x-mbx-used-weight-1m) Security Type: TRADE Notes: - Either `orderId` or + * `origClientOrderId` must be sent, and the `orderId` will prevail if both + * are sent. - Both `quantity` and `price` must be sent, which is different + * from dapi modify order endpoint. - When the new `quantity` or `price` + * doesn'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 + * `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 * * @param modifyOrderRequest (required) * @return ApiResponse<ModifyOrderResponse> @@ -2347,7 +2360,7 @@ public ApiResponse modifyMultipleOrders( * * * @see Modify + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#modify-order">Modify * Order (TRADE) Documentation */ public ApiResponse modifyOrder(ModifyOrderRequest modifyOrderRequest) @@ -2356,40 +2369,42 @@ public ApiResponse modifyOrder(ModifyOrderRequest modifyOrd } /** - * New Algo Order(TRADE) Send in a new Algo order. * Algo order with type `STOP`, - * parameter `timeInForce` can be sent ( default `GTC`). * Algo order with - * type `TAKE_PROFIT`, parameter `timeInForce` can be sent ( default - * `GTC`). * Condition orders will be triggered when: * If - * parameter`priceProtect`is sent as true: * when price reaches the + * New Algo Order (TRADE) Send in a new algo (conditional) order. Use this endpoint to place + * **TP/SL (Take Profit / Stop Loss)** and trailing stop orders on USD-M Futures. Supported + * order types under `algoType=CONDITIONAL` are `STOP_MARKET`, + * `TAKE_PROFIT_MARKET`, `STOP`, `TAKE_PROFIT`, and + * `TRAILING_STOP_MARKET`. 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: - Algo order with type `STOP`, parameter + * `timeInForce` can be sent (default `GTC`). - Algo order with type + * `TAKE_PROFIT`, parameter `timeInForce` can be sent ( default + * `GTC`). - Condition orders will be triggered when: - If + * parameter`priceProtect`is sent as true: - when price reaches the * `triggerPrice` ,the difference rate between \"MARK_PRICE\" and * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price + * symbol - \"triggerProtect\" of a symbol can be got from `GET + * /fapi/v1/exchangeInfo` - `STOP`, `STOP_MARKET`: - BUY: latest price * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * `TAKE_PROFIT`, - * `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * SELL: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest price after - * order placed <= `activatePrice`, and the latest price >= the lowest - * price * (1 + `callbackRate`) * SELL: the highest price after order placed - * >= `activatePrice`, and the latest price <= the highest price * (1 - * - `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error - * code. ``{\"code\": -2021, \"msg\": \"Order would - * immediately trigger.\"}`` means that the parameters you send do not meet the - * following requirements: * BUY: `activatePrice` should be smaller than latest price. - * * SELL: `activatePrice` should be larger than latest price. * - * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` paremeter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with - * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * + * `triggerPrice` - SELL: latest price (\"MARK_PRICE\" or + * \"CONTRACT_PRICE\") - `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - + * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") - SELL: latest + * price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= + * `triggerPrice` - `TRAILING_STOP_MARKET`: - BUY: the lowest price after + * order placed = the lowest price * (1 + `callbackRate`) - SELL: the highest + * price after order placed >= `activatePrice`, and the latest price - For + * `TRAILING_STOP_MARKET`, if you got such error code. > `{\"code\": + * -2021, \"msg\": \"Order would immediately trigger.\"}` > means + * that the parameters you send do not meet the following requirements: - BUY: + * `activatePrice` should be smaller than latest price. - SELL: + * `activatePrice` should be larger than latest price. - `STOP_MARKET`, + * `TAKE_PROFIT_MARKET` with `closePosition`=`true`: - Follow + * the same rules for condition orders. - If triggered,**close all** current long position( if + * `SELL`) or current short position( if `BUY`). - Cannot be used with + * `quantity` paremeter - Cannot be used with `reduceOnly` parameter - In + * Hedge Mode,cannot be used with `BUY` orders in `LONG` position side. and + * cannot be used with `SELL` orders in `SHORT` position side - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. Weight: 0 on IP rate - * limit(x-mbx-used-weight-1m) + * `IOC` or `GTC` or `GTD`. * * @param newAlgoOrderRequest (required) * @return ApiResponse<NewAlgoOrderResponse> @@ -2403,8 +2418,8 @@ public ApiResponse modifyOrder(ModifyOrderRequest modifyOrd * * * @see New - * Algo Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#new-algo-order">New + * Algo Order (TRADE) Documentation */ public ApiResponse newAlgoOrder(NewAlgoOrderRequest newAlgoOrderRequest) throws ApiException { @@ -2412,15 +2427,19 @@ public ApiResponse newAlgoOrder(NewAlgoOrderRequest newAlg } /** - * New Order(TRADE) Send in a new order. * If `newOrderRespType ` is sent as - * `RESULT` : * `MARKET` order: the final FILLED result of the order will be - * return directly. * `LIMIT` order with special `timeInForce`: the final - * status result of the order(FILLED or EXPIRED) will be returned directly. * - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. * In extreme market conditions, - * timeInForce `GTD` order auto cancel time might be delayed comparing to - * `goodTillDate` 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) + * New Order (TRADE) Send in a new order. 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: Additional mandatory parameters based + * on `type`: | Type | Additional mandatory parameters | + * |------|----------------------------------| | `LIMIT` | `timeInForce`, + * `quantity`, `price` | | `MARKET` | `quantity` | - If + * `newOrderRespType` is sent as `RESULT`: - `MARKET` order: the + * final FILLED result of the order will be returned directly. - `LIMIT` order with + * special `timeInForce`: the final status result of the order (FILLED or EXPIRED) + * will be returned directly. - `selfTradePreventionMode` is only effective when + * `timeInForce` is set to `IOC`, `GTC`, or `GTD`. - In + * extreme market conditions, `timeInForce` `GTD` order auto-cancel time + * might be delayed compared to `goodTillDate`. * * @param newOrderRequest (required) * @return ApiResponse<NewOrderResponse> @@ -2434,8 +2453,8 @@ public ApiResponse newAlgoOrder(NewAlgoOrderRequest newAlg * * * @see New - * Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#new-order">New + * Order (TRADE) Documentation */ public ApiResponse newOrder(NewOrderRequest newOrderRequest) throws ApiException { @@ -2443,11 +2462,12 @@ public ApiResponse newOrder(NewOrderRequest newOrderRequest) } /** - * Place Multiple Orders(TRADE) Place Multiple Orders * Paremeter rules are same with `New - * Order` * Batch orders are processed concurrently, and the order of matching is not - * guaranteed. * The order of returned contents for batch orders is the same as the order of the - * order list. Weight: 5 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate - * limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate limit(x-mbx-used-weight-1m); + * Place Multiple Orders (TRADE) Place Multiple Orders Weight: 5 on 10s order rate + * limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate + * limit(x-mbx-used-weight-1m); Security Type: TRADE Notes: - Paremeter rules are same with + * `New Order` - Batch orders are processed concurrently, and the order of matching is + * not guaranteed. - The order of returned contents for batch orders is the same as the order of + * the order list. * * @param placeMultipleOrdersRequest (required) * @return ApiResponse<PlaceMultipleOrdersResponse> @@ -2461,8 +2481,8 @@ public ApiResponse newOrder(NewOrderRequest newOrderRequest) * * * @see Place - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#place-multiple-orders">Place + * Multiple Orders (TRADE) Documentation */ public ApiResponse placeMultipleOrders( PlaceMultipleOrdersRequest placeMultipleOrdersRequest) throws ApiException { @@ -2470,7 +2490,7 @@ public ApiResponse placeMultipleOrders( } /** - * Position ADL Quantile Estimation(USER_DATA) Position ADL Quantile Estimation * Values update + * Position ADL Quantile Estimation (USER_DATA) Position ADL Quantile Estimation * Values update * every 30s. * Values 0, 1, 2, 3, 4 shows the queue position and possibility of ADL from low to * high. * For positions of the symbol are in One-way Mode or isolated margined in Hedge Mode, * \"LONG\", \"SHORT\", and \"BOTH\" will be returned to show the @@ -2478,7 +2498,7 @@ public ApiResponse placeMultipleOrders( * are crossed margined in Hedge Mode: * \"HEDGE\" as a sign will be returned instead * of \"BOTH\"; * A same value caculated on unrealized pnls on long and short * sides' positions will be shown for \"LONG\" and \"SHORT\" when there - * are positions in both of long and short sides. Weight: 5 + * are positions in both of long and short sides. Weight(IP): 5 Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -2493,8 +2513,8 @@ public ApiResponse placeMultipleOrders( * * * @see Position - * ADL Quantile Estimation(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#position-adl-quantile-estimation">Position + * ADL Quantile Estimation (USER_DATA) Documentation */ public ApiResponse positionAdlQuantileEstimation( String symbol, Long recvWindow) throws ApiException { @@ -2502,8 +2522,9 @@ public ApiResponse positionAdlQuantileEst } /** - * Position Information V2 (USER_DATA) Get current position information. Please use with user - * data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 5 + * Position Information V2 (USER_DATA) Get current position information. Weight(IP): 5 Security + * Type: USER_DATA Notes: - Please use with user data stream `ACCOUNT_UPDATE` to meet + * your timeliness and accuracy needs. * * @param symbol (optional) * @param recvWindow (optional) @@ -2518,7 +2539,7 @@ public ApiResponse positionAdlQuantileEst * * * @see Position + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#position-information-v2">Position * Information V2 (USER_DATA) Documentation */ public ApiResponse positionInformationV2( @@ -2528,8 +2549,9 @@ public ApiResponse positionInformationV2( /** * Position Information V3 (USER_DATA) Get current position information(only symbol that has - * position or open orders will be returned). Please use with user data stream - * `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 5 + * position or open orders will be returned). Weight(IP): 5 Security Type: USER_DATA Notes: - + * Please use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and + * accuracy needs. * * @param symbol (optional) * @param recvWindow (optional) @@ -2544,7 +2566,7 @@ public ApiResponse positionInformationV2( * * * @see Position + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#position-information-v3">Position * Information V3 (USER_DATA) Documentation */ public ApiResponse positionInformationV3( @@ -2553,14 +2575,16 @@ public ApiResponse positionInformationV3( } /** - * Query Algo Order (USER_DATA) Check an algo order's status. * These orders will not be - * found: * order status is `CANCELED` or `EXPIRED` **AND** order has NO + * Query Algo Order (USER_DATA) Check the status of an algo (conditional) order, such as TP/SL + * (Take Profit / Stop Loss) or trailing stop orders on USD-M Futures. * These orders will not + * be found: * order status is `CANCELED` or `EXPIRED` **AND** order has NO * filled trade **AND** created time + 3 days < current time * order create time + 90 days - * < current time * Either `algoId` or `clientAlgoId` must be sent. * - * `algoId` is self-increment for each specific `symbol` Weight: 1 + * < current time Weight(IP): 1 Security Type: USER_DATA Notes: - Either `algoId` + * or `clientAlgoId` must be sent. - `algoId` is self-increment for each + * specific `symbol` * - * @param algoId (optional) - * @param clientAlgoId (optional) + * @param algoId Order ID (optional) + * @param clientAlgoId Client order ID (optional) * @param recvWindow (optional) * @return ApiResponse<QueryAlgoOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2573,7 +2597,7 @@ public ApiResponse positionInformationV3( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#query-algo-order">Query * Algo Order (USER_DATA) Documentation */ public ApiResponse queryAlgoOrder( @@ -2582,19 +2606,20 @@ public ApiResponse queryAlgoOrder( } /** - * Query All Algo Orders (USER_DATA) Get all algo orders; active, CANCELED, TRIGGERED or - * FINISHED . * These orders will not be found: * order status is `CANCELED` or + * Query All Algo Orders (USER_DATA) Get all algo (conditional) orders — active, CANCELED, + * TRIGGERED, or FINISHED — including TP/SL (Take Profit / Stop Loss) and trailing stop orders + * on USD-M Futures. * These orders will not be found: * order status is `CANCELED` or * `EXPIRED` **AND** order has NO filled trade **AND** created time + 3 days < - * current time * order create time + 90 days < current time * If `algoId` is set, - * it will get orders >= that `algoId`. Otherwise most recent orders are - * returned. * The query time period must be less then 7 days( default as the recent 7 days). - * Weight: 5 + * current time * order create time + 90 days < current time Weight(IP): 5 Security Type: + * USER_DATA Notes: - If `algoId` is set, it will get orders >= that + * `algoId`. Otherwise most recent orders are returned. - The query time period must + * be less then 7 days( default as the recent 7 days). * - * @param symbol (required) + * @param symbol Symbol (required) * @param algoId (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<QueryAllAlgoOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2607,7 +2632,7 @@ public ApiResponse queryAlgoOrder( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#query-all-algo-orders">Query * All Algo Orders (USER_DATA) Documentation */ public ApiResponse queryAllAlgoOrders( @@ -2617,9 +2642,10 @@ public ApiResponse queryAllAlgoOrders( } /** - * Query Current Open Order (USER_DATA) Query open order * Either`orderId` or - * `origClientOrderId` must be sent * If the queried order has been filled or - * cancelled, the error message \"Order does not exist\" will be returned. Weight: 1 + * Query Current Open Order (USER_DATA) Query open order Weight(IP): 1 Security Type: USER_DATA + * Notes: - Either`orderId` or `origClientOrderId` must be sent - If the + * queried order has been filled or cancelled, the error message \"Order does not + * exist\" will be returned. * * @param symbol (required) * @param orderId (optional) @@ -2636,7 +2662,7 @@ public ApiResponse queryAllAlgoOrders( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#query-current-open-order">Query * Current Open Order (USER_DATA) Documentation */ public ApiResponse queryCurrentOpenOrder( @@ -2649,8 +2675,9 @@ public ApiResponse queryCurrentOpenOrder( * Query Order (USER_DATA) Check an order's status. * These orders will not be found: * * order status is `CANCELED` or `EXPIRED` **AND** order has NO filled trade * **AND** created time + 3 days < current time * order create time + 90 days < current - * time * Either `orderId` or `origClientOrderId` must be sent. * - * `orderId` is self-increment for each specific `symbol` Weight: 1 + * time Weight(IP): 1 Security Type: USER_DATA Notes: - Either `orderId` or + * `origClientOrderId` must be sent. - `orderId` is self-increment for each + * specific `symbol` * * @param symbol (required) * @param orderId (optional) @@ -2667,7 +2694,7 @@ public ApiResponse queryCurrentOpenOrder( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#query-order">Query * Order (USER_DATA) Documentation */ public ApiResponse queryOrder( @@ -2677,44 +2704,49 @@ public ApiResponse queryOrder( } /** - * Test Order(TRADE) Testing order request, this order will not be submitted to matching engine - * * Order with type `STOP`, parameter `timeInForce` can be sent ( default - * `GTC`). * Order with type `TAKE_PROFIT`, parameter - * `timeInForce` can be sent ( default `GTC`). * Condition orders will be - * triggered when: * If parameter`priceProtect`is sent as true: * when price reaches - * the `stopPrice` ,the difference rate between \"MARK_PRICE\" and + * Test Order (TRADE) Testing order request, this order will not be submitted to matching engine + * Security Type: TRADE Notes: Additional mandatory parameters based on `type`: | Type + * | Additional mandatory parameters | | -------------------------------- | + * ---------------------------------- | | `LIMIT` | `timeInForce`, + * `quantity`, `price` | | `MARKET` | `quantity` | | + * `STOP/TAKE_PROFIT` | `quantity`, `price`, `stopPrice` + * | | `STOP_MARKET/TAKE_PROFIT_MARKET` | `stopPrice` | | + * `TRAILING_STOP_MARKET` | `callbackRate` | - Order with type + * `STOP`, parameter `timeInForce` can be sent ( default `GTC`). - + * Order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent + * (default `GTC`). - Condition orders will be triggered when: - If + * parameter`priceProtect`is sent as true: - when price reaches the + * `stopPrice` ,the difference rate between \"MARK_PRICE\" and * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed `<= - * `activationPrice`, and the latest price >`= the lowest price * (1 + - * `callbackRate`) * SELL: the highest price after order placed >= - * `activationPrice`, and the latest price <= the highest price * (1 - - * `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. - * ``{\"code\": -2021, \"msg\": \"Order would immediately - * trigger.\"}`` means that the parameters you send do not meet the following - * requirements: * BUY: `activationPrice` should be smaller than latest price. * SELL: - * `activationPrice` should be larger than latest price. * If `newOrderRespType - * ` is sent as `RESULT` : * `MARKET` order: the final FILLED result of - * the order will be return directly. * `LIMIT` order with special + * symbol - \"triggerProtect\" of a symbol can be got from `GET + * /fapi/v1/exchangeInfo` - `STOP`, `STOP_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - + * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") - + * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - + * `TRAILING_STOP_MARKET`: - BUY: the lowest price after order placed + * ``= the lowest price * (1 + `callbackRate`) - SELL: the highest + * price after order placed >= `activationPrice`, and the latest price - For + * `TRAILING_STOP_MARKET`, if you got such error code. > `{\"code\": + * -2021, \"msg\": \"Order would immediately trigger.\"}` > means + * that the parameters you send do not meet the following requirements: - BUY: + * `activationPrice` should be smaller than latest price. - SELL: + * `activationPrice` should be larger than latest price. - If `newOrderRespType + * ` is sent as `RESULT` : - `MARKET` order: the final FILLED result of + * the order will be return directly. - `LIMIT` order with special * `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be - * returned directly. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` paremeter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with + * returned directly. - `STOP_MARKET`, `TAKE_PROFIT_MARKET` with + * `closePosition`=`true`: - Follow the same rules for condition + * orders. - If triggered,**close all** current long position( if `SELL`) or current + * short position( if `BUY`). - Cannot be used with `quantity` paremeter - + * Cannot be used with `reduceOnly` parameter - In Hedge Mode,cannot be used with * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * + * `SELL` orders in `SHORT` position side - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. * In extreme market conditions, + * `IOC` or `GTC` or `GTD`. - In extreme market conditions, * timeInForce `GTD` order auto cancel time might be delayed comparing to - * `goodTillDate` Weight: 0 + * `goodTillDate` * * @param testOrderRequest (required) * @return ApiResponse<TestOrderResponse> @@ -2728,8 +2760,8 @@ public ApiResponse queryOrder( * * * @see Test - * Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#test-order">Test + * Order (TRADE) Documentation */ public ApiResponse testOrder(TestOrderRequest testOrderRequest) throws ApiException { @@ -2737,18 +2769,17 @@ public ApiResponse testOrder(TestOrderRequest testOrderReques } /** - * User's Force Orders (USER_DATA) Query user's Force Orders * If - * \"autoCloseType\" is not sent, orders with both of the types will be returned * If - * \"startTime\" is not sent, data within 7 days before \"endTime\" can be - * queried * Only support querying data in the past 90 days Weight: 20 with symbol, 50 without - * symbol + * User's Force Orders (USER_DATA) Query user's Force Orders Weight: **20** with symbol, + * **50** without symbol Security Type: USER_DATA Notes: - If \"autoCloseType\" is not + * sent, orders with both of the types will be returned - If \"startTime\" is not + * sent, data within 7 days before \"endTime\" can be queried * * @param symbol (optional) * @param autoCloseType \"LIQUIDATION\" for liquidation orders, \"ADL\" for * ADL orders. (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<UsersForceOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2761,7 +2792,7 @@ public ApiResponse testOrder(TestOrderRequest testOrderReques * * * @see User's + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#users-force-orders">User's * Force Orders (USER_DATA) Documentation */ public ApiResponse usersForceOrders( @@ -2777,7 +2808,8 @@ public ApiResponse usersForceOrders( } /** - * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight: 1 + * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight(IP): 1 Security + * Type: USER_STREAM * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2790,7 +2822,7 @@ public ApiResponse usersForceOrders( * * * @see Close + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/user-data-streams#close-user-data-stream">Close * User Data Stream (USER_STREAM) Documentation */ public void closeUserDataStream() throws ApiException { @@ -2800,7 +2832,7 @@ public void closeUserDataStream() throws ApiException { /** * Keepalive User Data Stream (USER_STREAM) Keepalive a user data stream to prevent a time out. * User data streams will close after 60 minutes. It's recommended to send a ping about - * every 60 minutes. Weight: 1 + * every 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * * @return ApiResponse<KeepaliveUserDataStreamResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2813,7 +2845,7 @@ public void closeUserDataStream() throws ApiException { * * * @see Keepalive + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/user-data-streams#keepalive-user-data-stream">Keepalive * User Data Stream (USER_STREAM) Documentation */ public ApiResponse keepaliveUserDataStream() @@ -2825,7 +2857,7 @@ public ApiResponse keepaliveUserDataStream() * Start User Data Stream (USER_STREAM) Start a new user data stream. The stream will close * after 60 minutes unless a keepalive is sent. If the account has an active * `listenKey`, that `listenKey` will be returned and its validity will be - * extended for 60 minutes. Weight: 1 + * extended for 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * * @return ApiResponse<StartUserDataStreamResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2838,7 +2870,7 @@ public ApiResponse keepaliveUserDataStream() * * * @see Start + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/user-data-streams#start-user-data-stream">Start * User Data Stream (USER_STREAM) Documentation */ public ApiResponse startUserDataStream() throws ApiException { diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/MarketDataApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/MarketDataApi.java index c694227f0..f36c57eab 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/MarketDataApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/MarketDataApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -20,6 +20,7 @@ import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.exception.ConstraintViolationException; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AdlRiskResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AssetIndexResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.BasisResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CheckServerTimeResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CompositeIndexSymbolInformationResponse; @@ -35,7 +36,6 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.LongShortRatioResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.MarkPriceKlineCandlestickDataResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.MarkPriceResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.MultiAssetsModeAssetIndexResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OldTradesLookupResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OpenInterestResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OpenInterestStatisticsResponse; @@ -77,7 +77,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/11.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -117,7 +117,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for adlRisk * - * @param symbol (optional) + * @param symbol Symbol (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -128,7 +128,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see ADL + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#adl-risk">ADL * Risk Documentation */ private okhttp3.Call adlRiskCall(String symbol) throws ApiException { @@ -224,9 +224,9 @@ private okhttp3.Call adlRiskValidateBeforeCall(String symbol) throws ApiExceptio * of ADL during liquidation, and the rating takes into account the insurance fund balance, * position concentration on the symbol, order book depth, price volatility, average leverage, * unrealized PnL, and margin utilization at the symbol level. The rating can be high, medium - * and low, and is updated every 30 minutes. Weight: 1 + * and low, and is updated every 30 minutes. Weight(IP): 1 * - * @param symbol (optional) + * @param symbol Symbol (optional) * @return ApiResponse<AdlRiskResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -238,7 +238,7 @@ private okhttp3.Call adlRiskValidateBeforeCall(String symbol) throws ApiExceptio * * * @see ADL + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#adl-risk">ADL * Risk Documentation */ public ApiResponse adlRisk(String symbol) throws ApiException { @@ -247,15 +247,147 @@ public ApiResponse adlRisk(String symbol) throws ApiException { return localVarApiClient.execute(localVarCall, localVarReturnType); } + /** + * Build call for assetIndex + * + * @param symbol Asset pair (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Multi-Assets Mode Asset Index -
+ * + * @see Multi-Assets + * Mode Asset Index Documentation + */ + private okhttp3.Call assetIndexCall(String symbol) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fapi/v1/assetIndex"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (symbol != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("symbol", symbol)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call assetIndexValidateBeforeCall(String symbol) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {symbol}; + Method method = this.getClass().getMethod("assetIndex", String.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return assetIndexCall(symbol); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Multi-Assets Mode Asset Index Asset index price. > **CM-UM Integration (Effective + * 2026-06-30):** Renamed from *Multi-Assets Mode Asset Index*. The response now additionally + * pushes COIN-M settlement-asset price index entries (e.g., `BTCUSD`, + * `ETHUSD`, `BNBUSD`). The endpoint path `/fapi/v1/assetIndex` is + * unchanged. Weight: **1** for a single symbol; **10** when the symbol parameter is omitted + * + * @param symbol Asset pair (optional) + * @return ApiResponse<AssetIndexResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Multi-Assets Mode Asset Index -
+ * + * @see Multi-Assets + * Mode Asset Index Documentation + */ + public ApiResponse assetIndex(String symbol) throws ApiException { + okhttp3.Call localVarCall = assetIndexValidateBeforeCall(symbol); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + /** * Build call for basis * * @param pair (required) * @param contractType (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return Call to execute @@ -268,7 +400,7 @@ public ApiResponse adlRisk(String symbol) throws ApiException { * * * @see Basis + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#basis">Basis * Documentation */ private okhttp3.Call basisCall( @@ -404,15 +536,13 @@ private okhttp3.Call basisValidateBeforeCall( } /** - * Basis Query future basis * If startTime and endTime are not sent, the most recent data is - * returned. * Only the data of the latest 30 days is available. Weight: 0 + * Basis Query future basis Weight(IP): 0 Notes: - If startTime and endTime are not sent, the + * most recent data is returned. - Only the data of the latest 30 days is available. * * @param pair (required) * @param contractType (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<BasisResponse> @@ -426,14 +556,14 @@ private okhttp3.Call basisValidateBeforeCall( * * * @see Basis + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#basis">Basis * Documentation */ public ApiResponse basis( @NotNull String pair, @NotNull ContractType contractType, @NotNull Period period, - Long limit, + @Max(500L) Long limit, Long startTime, Long endTime) throws ApiException { @@ -456,7 +586,7 @@ public ApiResponse basis( * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#check-server-time">Check * Server Time Documentation */ private okhttp3.Call checkServerTimeCall() throws ApiException { @@ -544,8 +674,8 @@ private okhttp3.Call checkServerTimeValidateBeforeCall() throws ApiException { } /** - * Check Server Time Test connectivity to the Rest API and get the current server time. Weight: - * 1 + * Check Server Time Test connectivity to the Rest API and get the current server time. + * Weight(IP): 1 * * @return ApiResponse<CheckServerTimeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -558,7 +688,7 @@ private okhttp3.Call checkServerTimeValidateBeforeCall() throws ApiException { * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#check-server-time">Check * Server Time Documentation */ public ApiResponse checkServerTime() throws ApiException { @@ -582,7 +712,7 @@ public ApiResponse checkServerTime() throws ApiExceptio * * * @see Composite + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#composite-index-symbol-information">Composite * Index Symbol Information Documentation */ private okhttp3.Call compositeIndexSymbolInformationCall(String symbol) throws ApiException { @@ -676,8 +806,8 @@ private okhttp3.Call compositeIndexSymbolInformationValidateBeforeCall(String sy } /** - * Composite Index Symbol Information Query composite index symbol information * Only for - * composite index symbols Weight: 1 + * Composite Index Symbol Information Query composite index symbol information Weight(IP): 1 + * Notes: - Only for composite index symbols * * @param symbol (optional) * @return ApiResponse<CompositeIndexSymbolInformationResponse> @@ -691,7 +821,7 @@ private okhttp3.Call compositeIndexSymbolInformationValidateBeforeCall(String sy * * * @see Composite + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#composite-index-symbol-information">Composite * Index Symbol Information Documentation */ public ApiResponse compositeIndexSymbolInformation( @@ -705,11 +835,11 @@ public ApiResponse compositeIndexSymbol /** * Build call for compressedAggregateTradesList * - * @param symbol (required) + * @param symbol Symbol (required) * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) + * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) + * @param limit (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -720,7 +850,7 @@ public ApiResponse compositeIndexSymbol * * * @see Compressed/Aggregate + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#compressed-aggregate-trades-list">Compressed/Aggregate * Trades List Documentation */ private okhttp3.Call compressedAggregateTradesListCall( @@ -843,21 +973,21 @@ private okhttp3.Call compressedAggregateTradesListValidateBeforeCall( * Compressed/Aggregate Trades List Get compressed, aggregate market trades. Market trades that * fill in 100ms with the same price and the same taking side will have the quantity aggregated. * Retail Price Improvement(RPI) orders are aggregated and without special tags to be - * distinguished. * support querying futures trade histories that are not older than one year * - * If both `startTime` and `endTime` are sent, time between - * `startTime` and `endTime` must be less than 1 hour. * If + * distinguished. Weight(IP): 20 Notes: - support querying futures trade histories that are not + * older than 24 hours - If both `startTime` and `endTime` are sent, time + * between `startTime` and `endTime` must be less than 1 hour. - If * `fromId`, `startTime`, and `endTime` are not sent, the most - * recent aggregate trades will be returned. * Only market trades will be aggregated and - * returned, which means the insurance fund trades and ADL trades won't be aggregated. * + * recent aggregate trades will be returned. - Only market trades will be aggregated and + * returned, which means the insurance fund trades and ADL trades won't be aggregated. - * Sending both `startTime`/`endTime` and `fromId` might cause * response timeout, please send either `fromId` or - * `startTime`/`endTime` Weight: 20 + * `startTime`/`endTime` * - * @param symbol (required) + * @param symbol Symbol (required) * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) + * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) + * @param limit (optional) * @return ApiResponse<CompressedAggregateTradesListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -869,11 +999,15 @@ private okhttp3.Call compressedAggregateTradesListValidateBeforeCall( * * * @see Compressed/Aggregate + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#compressed-aggregate-trades-list">Compressed/Aggregate * Trades List Documentation */ public ApiResponse compressedAggregateTradesList( - @NotNull String symbol, Long fromId, Long startTime, Long endTime, Long limit) + @NotNull String symbol, + Long fromId, + Long startTime, + Long endTime, + @Max(1000L) Long limit) throws ApiException { okhttp3.Call localVarCall = compressedAggregateTradesListValidateBeforeCall( @@ -886,12 +1020,12 @@ public ApiResponse compressedAggregateTra /** * Build call for continuousContractKlineCandlestickData * - * @param pair (required) - * @param contractType (required) + * @param pair After CM migration, accepts both UM and CM pair values. (required) + * @param contractType Futurestype (required) * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -902,7 +1036,7 @@ public ApiResponse compressedAggregateTra * * * @see Continuous + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#continuous-contract-kline-candlestick-data">Continuous * Contract Kline/Candlestick Data Documentation */ private okhttp3.Call continuousContractKlineCandlestickDataCall( @@ -1040,18 +1174,17 @@ private okhttp3.Call continuousContractKlineCandlestickDataValidateBeforeCall( /** * Continuous Contract Kline/Candlestick Data Kline/candlestick bars for a specific contract - * type. Klines are uniquely identified by their open time. * If startTime and endTime are not - * sent, the most recent klines are returned. * Contract type: * PERPETUAL * CURRENT_QUARTER * - * NEXT_QUARTER * TRADIFI_PERPETUAL Weight: based on parameter LIMIT | LIMIT | weight | | - * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | - * 10 | + * type. Klines are uniquely identified by their open time. Weight: based on parameter + * `LIMIT` | LIMIT | weight | | ----------- | ------ | | [1,100) | 1 | | [100, 500) | + * 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - If startTime and endTime are not sent, + * the most recent klines are returned. * - * @param pair (required) - * @param contractType (required) + * @param pair After CM migration, accepts both UM and CM pair values. (required) + * @param contractType Futurestype (required) * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @return ApiResponse<ContinuousContractKlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1063,7 +1196,7 @@ private okhttp3.Call continuousContractKlineCandlestickDataValidateBeforeCall( * * * @see Continuous + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#continuous-contract-kline-candlestick-data">Continuous * Contract Kline/Candlestick Data Documentation */ public ApiResponse @@ -1073,7 +1206,7 @@ private okhttp3.Call continuousContractKlineCandlestickDataValidateBeforeCall( @NotNull Interval interval, Long startTime, Long endTime, - Long limit) + @Max(1500L) Long limit) throws ApiException { okhttp3.Call localVarCall = continuousContractKlineCandlestickDataValidateBeforeCall( @@ -1096,7 +1229,7 @@ private okhttp3.Call continuousContractKlineCandlestickDataValidateBeforeCall( * * * @see Exchange + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#exchange-information">Exchange * Information Documentation */ private okhttp3.Call exchangeInformationCall() throws ApiException { @@ -1184,7 +1317,7 @@ private okhttp3.Call exchangeInformationValidateBeforeCall() throws ApiException } /** - * Exchange Information Current exchange trading rules and symbol information Weight: 1 + * Exchange Information Current exchange trading rules and symbol information Weight(IP): 1 * * @return ApiResponse<ExchangeInformationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1197,7 +1330,7 @@ private okhttp3.Call exchangeInformationValidateBeforeCall() throws ApiException * * * @see Exchange + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#exchange-information">Exchange * Information Documentation */ public ApiResponse exchangeInformation() throws ApiException { @@ -1211,9 +1344,9 @@ public ApiResponse exchangeInformation() throws Api * Build call for getFundingRateHistory * * @param symbol (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Timestamp in ms to get funding rate from INCLUSIVE. (optional) + * @param endTime Timestamp in ms to get funding rate until INCLUSIVE. (optional) + * @param limit (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1224,7 +1357,7 @@ public ApiResponse exchangeInformation() throws Api * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#get-funding-rate-history">Get * Funding Rate History Documentation */ private okhttp3.Call getFundingRateHistoryCall( @@ -1337,16 +1470,16 @@ private okhttp3.Call getFundingRateHistoryValidateBeforeCall( } /** - * Get Funding Rate History Get Funding Rate History * If `startTime` and - * `endTime` are not sent, the most recent 200 records are returned. * If the number - * of data between `startTime` and `endTime` is larger than - * `limit`, return as `startTime` + `limit`. * In ascending order. - * Weight: share 500/5min/IP rate limit with GET /fapi/v1/fundingInfo + * Get Funding Rate History Get Funding Rate History Weight: share 500/5min/IP rate limit with + * GET /fapi/v1/fundingInfo Notes: - If `startTime` and `endTime` are not + * sent, the most recent 200 records are returned. - If the number of data between + * `startTime` and `endTime` is larger than `limit`, return as + * `startTime` + `limit`. - In ascending order. * * @param symbol (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Timestamp in ms to get funding rate from INCLUSIVE. (optional) + * @param endTime Timestamp in ms to get funding rate until INCLUSIVE. (optional) + * @param limit (optional) * @return ApiResponse<GetFundingRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1358,11 +1491,12 @@ private okhttp3.Call getFundingRateHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#get-funding-rate-history">Get * Funding Rate History Documentation */ public ApiResponse getFundingRateHistory( - String symbol, Long startTime, Long endTime, Long limit) throws ApiException { + String symbol, Long startTime, Long endTime, @Max(1000L) Long limit) + throws ApiException { okhttp3.Call localVarCall = getFundingRateHistoryValidateBeforeCall(symbol, startTime, endTime, limit); java.lang.reflect.Type localVarReturnType = @@ -1383,7 +1517,7 @@ public ApiResponse getFundingRateHistory( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#get-funding-rate-info">Get * Funding Rate Info Documentation */ private okhttp3.Call getFundingRateInfoCall() throws ApiException { @@ -1471,9 +1605,9 @@ private okhttp3.Call getFundingRateInfoValidateBeforeCall() throws ApiException } /** - * Get Funding Rate Info Query funding rate info for symbols that had FundingRateCap/ - * FundingRateFloor / fundingIntervalHours adjustment Weight: 0 share 500/5min/IP rate limit - * with GET /fapi/v1/fundingRate + * Get Funding Rate Info Query funding rate info for symbols that had + * FundingRateCap/FundingRateFloor / fundingIntervalHours adjustment Weight: **0** share + * 500/5min/IP rate limit with `GET /fapi/v1/fundingRate` * * @return ApiResponse<GetFundingRateInfoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1486,7 +1620,7 @@ private okhttp3.Call getFundingRateInfoValidateBeforeCall() throws ApiException * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#get-funding-rate-info">Get * Funding Rate Info Documentation */ public ApiResponse getFundingRateInfo() throws ApiException { @@ -1499,11 +1633,11 @@ public ApiResponse getFundingRateInfo() throws ApiEx /** * Build call for indexPriceKlineCandlestickData * - * @param pair (required) + * @param pair After CM migration, accepts both UM and CM pair values. (required) * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1514,7 +1648,7 @@ public ApiResponse getFundingRateInfo() throws ApiEx * * * @see Index + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#index-price-kline-candlestick-data">Index * Price Kline/Candlestick Data Documentation */ private okhttp3.Call indexPriceKlineCandlestickDataCall( @@ -1636,16 +1770,16 @@ private okhttp3.Call indexPriceKlineCandlestickDataValidateBeforeCall( /** * Index Price Kline/Candlestick Data Kline/candlestick bars for the index price of a pair. - * Klines are uniquely identified by their open time. * If startTime and endTime are not sent, - * the most recent klines are returned. Weight: based on parameter LIMIT | LIMIT | weight | | - * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | - * 10 | + * Klines are uniquely identified by their open time. Weight: based on parameter + * `LIMIT` | LIMIT | weight | | ----------- | ------ | | [1,100) | 1 | | [100, 500) | + * 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - If startTime and endTime are not sent, + * the most recent klines are returned. * - * @param pair (required) + * @param pair After CM migration, accepts both UM and CM pair values. (required) * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @return ApiResponse<IndexPriceKlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1657,7 +1791,7 @@ private okhttp3.Call indexPriceKlineCandlestickDataValidateBeforeCall( * * * @see Index + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#index-price-kline-candlestick-data">Index * Price Kline/Candlestick Data Documentation */ public ApiResponse indexPriceKlineCandlestickData( @@ -1665,7 +1799,7 @@ public ApiResponse indexPriceKlineCandle @NotNull Interval interval, Long startTime, Long endTime, - Long limit) + @Max(1500L) Long limit) throws ApiException { okhttp3.Call localVarCall = indexPriceKlineCandlestickDataValidateBeforeCall( @@ -1678,11 +1812,11 @@ public ApiResponse indexPriceKlineCandle /** * Build call for klineCandlestickData * - * @param symbol (required) + * @param symbol After CM migration, accepts both UM and CM symbols. (required) * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1693,7 +1827,7 @@ public ApiResponse indexPriceKlineCandle * * * @see Kline/Candlestick + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#kline-candlestick-data">Kline/Candlestick * Data Documentation */ private okhttp3.Call klineCandlestickDataCall( @@ -1814,15 +1948,15 @@ private okhttp3.Call klineCandlestickDataValidateBeforeCall( /** * Kline/Candlestick Data Kline/candlestick bars for a symbol. Klines are uniquely identified by - * their open time. * If startTime and endTime are not sent, the most recent klines are - * returned. Weight: based on parameter LIMIT | LIMIT | weight | | ----------- | ------ | | - * [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | + * their open time. Weight: based on parameter `LIMIT` | LIMIT | weight | | + * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | + * 10 | Notes: - If startTime and endTime are not sent, the most recent klines are returned. * - * @param symbol (required) + * @param symbol After CM migration, accepts both UM and CM symbols. (required) * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @return ApiResponse<KlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1834,7 +1968,7 @@ private okhttp3.Call klineCandlestickDataValidateBeforeCall( * * * @see Kline/Candlestick + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#kline-candlestick-data">Kline/Candlestick * Data Documentation */ public ApiResponse klineCandlestickData( @@ -1842,7 +1976,7 @@ public ApiResponse klineCandlestickData( @NotNull Interval interval, Long startTime, Long endTime, - Long limit) + @Max(1500L) Long limit) throws ApiException { okhttp3.Call localVarCall = klineCandlestickDataValidateBeforeCall(symbol, interval, startTime, endTime, limit); @@ -1855,10 +1989,8 @@ public ApiResponse klineCandlestickData( * Build call for longShortRatio * * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return Call to execute @@ -1871,7 +2003,7 @@ public ApiResponse klineCandlestickData( * * * @see Long/Short + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#long-short-ratio">Long/Short * Ratio Documentation */ private okhttp3.Call longShortRatioCall( @@ -1991,15 +2123,13 @@ private okhttp3.Call longShortRatioValidateBeforeCall( } /** - * Long/Short Ratio Query symbol Long/Short Ratio * If startTime and endTime are not sent, the - * most recent data is returned. * Only the data of the latest 30 days is available. * IP rate - * limit 1000 requests/5min Weight: 0 + * Long/Short Ratio Query symbol Long/Short Ratio Weight(IP): 0 Notes: - If startTime and + * endTime are not sent, the most recent data is returned. - Only the data of the latest 30 days + * is available. - IP rate limit 1000 requests/5min * * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<LongShortRatioResponse> @@ -2013,13 +2143,13 @@ private okhttp3.Call longShortRatioValidateBeforeCall( * * * @see Long/Short + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#long-short-ratio">Long/Short * Ratio Documentation */ public ApiResponse longShortRatio( @NotNull String symbol, @NotNull Period period, - Long limit, + @Max(500L) Long limit, Long startTime, Long endTime) throws ApiException { @@ -2044,7 +2174,7 @@ public ApiResponse longShortRatio( * * * @see Mark + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#mark-price">Mark * Price Documentation */ private okhttp3.Call markPriceCall(String symbol) throws ApiException { @@ -2136,7 +2266,7 @@ private okhttp3.Call markPriceValidateBeforeCall(String symbol) throws ApiExcept } /** - * Mark Price Mark Price and Funding Rate Weight: 1 with symbol, 10 without symbol + * Mark Price Mark Price and Funding Rate Weight: **1** with symbol, **10** without symbol * * @param symbol (optional) * @return ApiResponse<MarkPriceResponse> @@ -2150,7 +2280,7 @@ private okhttp3.Call markPriceValidateBeforeCall(String symbol) throws ApiExcept * * * @see Mark + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#mark-price">Mark * Price Documentation */ public ApiResponse markPrice(String symbol) throws ApiException { @@ -2162,11 +2292,11 @@ public ApiResponse markPrice(String symbol) throws ApiExcepti /** * Build call for markPriceKlineCandlestickData * - * @param symbol (required) + * @param symbol After CM migration, accepts both UM and CM symbols. (required) * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2177,7 +2307,7 @@ public ApiResponse markPrice(String symbol) throws ApiExcepti * * * @see Mark + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#mark-price-kline-candlestick-data">Mark * Price Kline/Candlestick Data Documentation */ private okhttp3.Call markPriceKlineCandlestickDataCall( @@ -2299,16 +2429,16 @@ private okhttp3.Call markPriceKlineCandlestickDataValidateBeforeCall( /** * Mark Price Kline/Candlestick Data Kline/candlestick bars for the mark price of a symbol. - * Klines are uniquely identified by their open time. * If startTime and endTime are not sent, - * the most recent klines are returned. Weight: based on parameter LIMIT | LIMIT | weight | | - * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | - * 10 | + * Klines are uniquely identified by their open time. Weight: based on parameter + * `LIMIT` | LIMIT | weight | | ----------- | ------ | | [1,100) | 1 | | [100, 500) | + * 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - If startTime and endTime are not sent, + * the most recent klines are returned. * - * @param symbol (required) + * @param symbol After CM migration, accepts both UM and CM symbols. (required) * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @return ApiResponse<MarkPriceKlineCandlestickDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2320,7 +2450,7 @@ private okhttp3.Call markPriceKlineCandlestickDataValidateBeforeCall( * * * @see Mark + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#mark-price-kline-candlestick-data">Mark * Price Kline/Candlestick Data Documentation */ public ApiResponse markPriceKlineCandlestickData( @@ -2328,7 +2458,7 @@ public ApiResponse markPriceKlineCandlest @NotNull Interval interval, Long startTime, Long endTime, - Long limit) + @Max(1500L) Long limit) throws ApiException { okhttp3.Call localVarCall = markPriceKlineCandlestickDataValidateBeforeCall( @@ -2338,145 +2468,12 @@ public ApiResponse markPriceKlineCandlest return localVarApiClient.execute(localVarCall, localVarReturnType); } - /** - * Build call for multiAssetsModeAssetIndex - * - * @param symbol (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Multi-Assets Mode Asset Index -
- * - * @see Multi-Assets - * Mode Asset Index Documentation - */ - private okhttp3.Call multiAssetsModeAssetIndexCall(String symbol) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/fapi/v1/assetIndex"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (symbol != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("symbol", symbol)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call multiAssetsModeAssetIndexValidateBeforeCall(String symbol) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {symbol}; - Method method = this.getClass().getMethod("multiAssetsModeAssetIndex", String.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return multiAssetsModeAssetIndexCall(symbol); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Multi-Assets Mode Asset Index asset index for Multi-Assets mode Weight: 1 for a single - * symbol; 10 when the symbol parameter is omitted - * - * @param symbol (optional) - * @return ApiResponse<MultiAssetsModeAssetIndexResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Multi-Assets Mode Asset Index -
- * - * @see Multi-Assets - * Mode Asset Index Documentation - */ - public ApiResponse multiAssetsModeAssetIndex(String symbol) - throws ApiException { - okhttp3.Call localVarCall = multiAssetsModeAssetIndexValidateBeforeCall(symbol); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - /** * Build call for oldTradesLookup * * @param symbol (required) - * @param limit Default 100; max 1000 (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) + * @param limit (optional) + * @param fromId TradeId to fetch from. Default gets most recent trades. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2487,7 +2484,7 @@ public ApiResponse multiAssetsModeAssetIndex( * * * @see Old + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#old-trades-lookup">Old * Trades Lookup (MARKET_DATA) Documentation */ private okhttp3.Call oldTradesLookupCall(String symbol, Long limit, Long fromId) @@ -2591,14 +2588,14 @@ private okhttp3.Call oldTradesLookupValidateBeforeCall(String symbol, Long limit } /** - * Old Trades Lookup (MARKET_DATA) Get older market historical trades. * Market trades means - * trades filled in the order book. Only market trades will be returned, which means the - * insurance fund trades and ADL trades won't be returned. * Only supports data from within - * the last one month Weight: 20 + * Old Trades Lookup (MARKET_DATA) Get older market historical trades. Weight(IP): 20 Security + * Type: MARKET_DATA Notes: - Market trades means trades filled in the order book. Only market + * trades will be returned, which means the insurance fund trades and ADL trades won't be + * returned. - Only supports data from within the last one month * * @param symbol (required) - * @param limit Default 100; max 1000 (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) + * @param limit (optional) + * @param fromId TradeId to fetch from. Default gets most recent trades. (optional) * @return ApiResponse<OldTradesLookupResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2610,11 +2607,11 @@ private okhttp3.Call oldTradesLookupValidateBeforeCall(String symbol, Long limit * * * @see Old + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#old-trades-lookup">Old * Trades Lookup (MARKET_DATA) Documentation */ public ApiResponse oldTradesLookup( - @NotNull String symbol, Long limit, Long fromId) throws ApiException { + @NotNull String symbol, @Max(500L) Long limit, Long fromId) throws ApiException { okhttp3.Call localVarCall = oldTradesLookupValidateBeforeCall(symbol, limit, fromId); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -2635,7 +2632,7 @@ public ApiResponse oldTradesLookup( * * * @see Open + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#open-interest">Open * Interest Documentation */ private okhttp3.Call openInterestCall(String symbol) throws ApiException { @@ -2727,7 +2724,7 @@ private okhttp3.Call openInterestValidateBeforeCall(String symbol) throws ApiExc } /** - * Open Interest Get present open interest of a specific symbol. Weight: 1 + * Open Interest Get present open interest of a specific symbol. Weight(IP): 1 * * @param symbol (required) * @return ApiResponse<OpenInterestResponse> @@ -2741,7 +2738,7 @@ private okhttp3.Call openInterestValidateBeforeCall(String symbol) throws ApiExc * * * @see Open + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#open-interest">Open * Interest Documentation */ public ApiResponse openInterest(@NotNull String symbol) @@ -2756,10 +2753,8 @@ public ApiResponse openInterest(@NotNull String symbol) * Build call for openInterestStatistics * * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return Call to execute @@ -2772,7 +2767,7 @@ public ApiResponse openInterest(@NotNull String symbol) * * * @see Open + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#open-interest-statistics">Open * Interest Statistics Documentation */ private okhttp3.Call openInterestStatisticsCall( @@ -2892,15 +2887,13 @@ private okhttp3.Call openInterestStatisticsValidateBeforeCall( } /** - * Open Interest Statistics Open Interest Statistics * If startTime and endTime are not sent, - * the most recent data is returned. * Only the data of the latest 1 month is available. * IP - * rate limit 1000 requests/5min Weight: 0 + * Open Interest Statistics Open Interest Statistics Weight(IP): 0 Notes: - If startTime and + * endTime are not sent, the most recent data is returned. - Only the data of the latest 1 month + * is available. - IP rate limit 1000 requests/5min * * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<OpenInterestStatisticsResponse> @@ -2914,13 +2907,13 @@ private okhttp3.Call openInterestStatisticsValidateBeforeCall( * * * @see Open + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#open-interest-statistics">Open * Interest Statistics Documentation */ public ApiResponse openInterestStatistics( @NotNull String symbol, @NotNull Period period, - Long limit, + @Max(500L) Long limit, Long startTime, Long endTime) throws ApiException { @@ -2935,7 +2928,7 @@ public ApiResponse openInterestStatistics( * Build call for orderBook * * @param symbol (required) - * @param limit Default 100; max 1000 (optional) + * @param limit Valid limits:[5, 10, 20, 50, 100, 500, 1000] (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2946,7 +2939,7 @@ public ApiResponse openInterestStatistics( * * * @see Order + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#order-book">Order * Book Documentation */ private okhttp3.Call orderBookCall(String symbol, Long limit) throws ApiException { @@ -3048,7 +3041,7 @@ private okhttp3.Call orderBookValidateBeforeCall(String symbol, Long limit) * ------------- | ------ | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | 20 | * * @param symbol (required) - * @param limit Default 100; max 1000 (optional) + * @param limit Valid limits:[5, 10, 20, 50, 100, 500, 1000] (optional) * @return ApiResponse<OrderBookResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3060,10 +3053,10 @@ private okhttp3.Call orderBookValidateBeforeCall(String symbol, Long limit) * * * @see Order + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#order-book">Order * Book Documentation */ - public ApiResponse orderBook(@NotNull String symbol, Long limit) + public ApiResponse orderBook(@NotNull String symbol, @Max(1000L) Long limit) throws ApiException { okhttp3.Call localVarCall = orderBookValidateBeforeCall(symbol, limit); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -3073,11 +3066,11 @@ public ApiResponse orderBook(@NotNull String symbol, Long lim /** * Build call for premiumIndexKlineData * - * @param symbol (required) + * @param symbol After CM migration, accepts both UM and CM symbols. (required) * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -3088,7 +3081,7 @@ public ApiResponse orderBook(@NotNull String symbol, Long lim * * * @see Premium + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#premium-index-kline-data">Premium * index Kline Data Documentation */ private okhttp3.Call premiumIndexKlineDataCall( @@ -3209,15 +3202,15 @@ private okhttp3.Call premiumIndexKlineDataValidateBeforeCall( /** * Premium index Kline Data Premium index kline bars of a symbol. Klines are uniquely identified - * by their open time. * If startTime and endTime are not sent, the most recent klines are - * returned. Weight: based on parameter LIMIT | LIMIT | weight | | ----------- | ------ | | - * [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | + * by their open time. Weight: based on parameter `LIMIT` | LIMIT | weight | | + * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | + * 10 | Notes: - If startTime and endTime are not sent, the most recent klines are returned. * - * @param symbol (required) + * @param symbol After CM migration, accepts both UM and CM symbols. (required) * @param interval (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @return ApiResponse<PremiumIndexKlineDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3229,7 +3222,7 @@ private okhttp3.Call premiumIndexKlineDataValidateBeforeCall( * * * @see Premium + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#premium-index-kline-data">Premium * index Kline Data Documentation */ public ApiResponse premiumIndexKlineData( @@ -3237,7 +3230,7 @@ public ApiResponse premiumIndexKlineData( @NotNull Interval interval, Long startTime, Long endTime, - Long limit) + @Max(1500L) Long limit) throws ApiException { okhttp3.Call localVarCall = premiumIndexKlineDataValidateBeforeCall( @@ -3261,7 +3254,7 @@ public ApiResponse premiumIndexKlineData( * * * @see Quarterly + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#quarterly-contract-settlement-price">Quarterly * Contract Settlement Price Documentation */ private okhttp3.Call quarterlyContractSettlementPriceCall(String pair) throws ApiException { @@ -3355,7 +3348,7 @@ private okhttp3.Call quarterlyContractSettlementPriceValidateBeforeCall(String p } /** - * Quarterly Contract Settlement Price Latest price for a symbol or symbols. Weight: 0 + * Quarterly Contract Settlement Price Latest price for a symbol or symbols. Weight(IP): 0 * * @param pair (required) * @return ApiResponse<QuarterlyContractSettlementPriceResponse> @@ -3369,7 +3362,7 @@ private okhttp3.Call quarterlyContractSettlementPriceValidateBeforeCall(String p * * * @see Quarterly + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#quarterly-contract-settlement-price">Quarterly * Contract Settlement Price Documentation */ public ApiResponse quarterlyContractSettlementPrice( @@ -3394,7 +3387,7 @@ public ApiResponse quarterlyContractSe * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#query-index-price-constituents">Query * Index Price Constituents Documentation */ private okhttp3.Call queryIndexPriceConstituentsCall(String symbol) throws ApiException { @@ -3488,7 +3481,7 @@ private okhttp3.Call queryIndexPriceConstituentsValidateBeforeCall(String symbol /** * Query Index Price Constituents Query index price constituents **Note**: Prices from - * constituents of TradFi perps will be hiden and displayed as -1. Weight: 2 + * constituents of TradFi perps will be hiden and displayed as -1. Weight(IP): 2 * * @param symbol (required) * @return ApiResponse<QueryIndexPriceConstituentsResponse> @@ -3502,7 +3495,7 @@ private okhttp3.Call queryIndexPriceConstituentsValidateBeforeCall(String symbol * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#query-index-price-constituents">Query * Index Price Constituents Documentation */ public ApiResponse queryIndexPriceConstituents( @@ -3516,7 +3509,7 @@ public ApiResponse queryIndexPriceConstitue /** * Build call for queryInsuranceFundBalanceSnapshot * - * @param symbol (optional) + * @param symbol Symbol (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -3527,7 +3520,7 @@ public ApiResponse queryIndexPriceConstitue * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#query-insurance-fund-balance-snapshot">Query * Insurance Fund Balance Snapshot Documentation */ private okhttp3.Call queryInsuranceFundBalanceSnapshotCall(String symbol) throws ApiException { @@ -3621,9 +3614,9 @@ private okhttp3.Call queryInsuranceFundBalanceSnapshotValidateBeforeCall(String } /** - * Query Insurance Fund Balance Snapshot Query Insurance Fund Balance Snapshot Weight: 1 + * Query Insurance Fund Balance Snapshot Query Insurance Fund Balance Snapshot Weight(IP): 1 * - * @param symbol (optional) + * @param symbol Symbol (optional) * @return ApiResponse<QueryInsuranceFundBalanceSnapshotResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3635,7 +3628,7 @@ private okhttp3.Call queryInsuranceFundBalanceSnapshotValidateBeforeCall(String * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#query-insurance-fund-balance-snapshot">Query * Insurance Fund Balance Snapshot Documentation */ public ApiResponse queryInsuranceFundBalanceSnapshot( @@ -3650,7 +3643,7 @@ public ApiResponse queryInsuranceFund * Build call for recentTradesList * * @param symbol (required) - * @param limit Default 100; max 1000 (optional) + * @param limit (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -3661,7 +3654,7 @@ public ApiResponse queryInsuranceFund * * * @see Recent + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#recent-trades-list">Recent * Trades List Documentation */ private okhttp3.Call recentTradesListCall(String symbol, Long limit) throws ApiException { @@ -3758,12 +3751,12 @@ private okhttp3.Call recentTradesListValidateBeforeCall(String symbol, Long limi } /** - * Recent Trades List Get recent market trades * Market trades means trades filled in the order - * book. Only market trades will be returned, which means the insurance fund trades and ADL - * trades won't be returned. Weight: 5 + * Recent Trades List Get recent market trades Weight(IP): 5 Notes: - Market trades means trades + * filled in the order book. Only market trades will be returned, which means the insurance fund + * trades and ADL trades won't be returned. * * @param symbol (required) - * @param limit Default 100; max 1000 (optional) + * @param limit (optional) * @return ApiResponse<RecentTradesListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3775,11 +3768,11 @@ private okhttp3.Call recentTradesListValidateBeforeCall(String symbol, Long limi * * * @see Recent + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#recent-trades-list">Recent * Trades List Documentation */ public ApiResponse recentTradesList( - @NotNull String symbol, Long limit) throws ApiException { + @NotNull String symbol, @Max(1000L) Long limit) throws ApiException { okhttp3.Call localVarCall = recentTradesListValidateBeforeCall(symbol, limit); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -3790,7 +3783,7 @@ public ApiResponse recentTradesList( * Build call for rpiOrderBook * * @param symbol (required) - * @param limit Default 100; max 1000 (optional) + * @param limit Valid limits:[1000] (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -3801,7 +3794,7 @@ public ApiResponse recentTradesList( * * * @see RPI + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#rpi-order-book">RPI * Order Book Documentation */ private okhttp3.Call rpiOrderBookCall(String symbol, Long limit) throws ApiException { @@ -3904,7 +3897,7 @@ private okhttp3.Call rpiOrderBookValidateBeforeCall(String symbol, Long limit) * | 1000 | 20 | * * @param symbol (required) - * @param limit Default 100; max 1000 (optional) + * @param limit Valid limits:[1000] (optional) * @return ApiResponse<RpiOrderBookResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3916,7 +3909,7 @@ private okhttp3.Call rpiOrderBookValidateBeforeCall(String symbol, Long limit) * * * @see RPI + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#rpi-order-book">RPI * Order Book Documentation */ public ApiResponse rpiOrderBook(@NotNull String symbol, Long limit) @@ -3941,7 +3934,7 @@ public ApiResponse rpiOrderBook(@NotNull String symbol, Lo * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#symbol-order-book-ticker">Symbol * Order Book Ticker Documentation */ private okhttp3.Call symbolOrderBookTickerCall(String symbol) throws ApiException { @@ -4035,10 +4028,11 @@ private okhttp3.Call symbolOrderBookTickerValidateBeforeCall(String symbol) /** * Symbol Order Book Ticker Best price/qty on the order book for a symbol or symbols. Retail - * Price Improvement(RPI) orders are not visible and excluded in the response message. * If the - * symbol is not sent, bookTickers for all symbols will be returned in an array. * The field + * Price Improvement(RPI) orders are not visible and excluded in the response message. Weight: + * **2** for a single symbol; **5** when the symbol parameter is omitted Notes: - If the symbol + * is not sent, bookTickers for all symbols will be returned in an array. - The field * `X-MBX-USED-WEIGHT-1M` in response header is not accurate from this endpoint, - * please ignore. Weight: 2 for a single symbol; 5 when the symbol parameter is omitted + * please ignore. * * @param symbol (optional) * @return ApiResponse<SymbolOrderBookTickerResponse> @@ -4052,7 +4046,7 @@ private okhttp3.Call symbolOrderBookTickerValidateBeforeCall(String symbol) * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#symbol-order-book-ticker">Symbol * Order Book Ticker Documentation */ public ApiResponse symbolOrderBookTicker(String symbol) @@ -4078,7 +4072,7 @@ public ApiResponse symbolOrderBookTicker(String s * * @deprecated * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#symbol-price-ticker">Symbol * Price Ticker Documentation */ @Deprecated @@ -4172,9 +4166,9 @@ private okhttp3.Call symbolPriceTickerValidateBeforeCall(String symbol) throws A } /** - * Symbol Price Ticker Latest price for a symbol or symbols. * If the symbol is not sent, prices - * for all symbols will be returned in an array. Weight: 1 for a single symbol; 2 when the - * symbol parameter is omitted + * Symbol Price Ticker Latest price for a symbol or symbols. Weight: 1 for a single symbol; 2 + * when the symbol parameter is omitted Notes: - If the symbol is not sent, prices for all + * symbols will be returned in an array. * * @param symbol (optional) * @return ApiResponse<SymbolPriceTickerResponse> @@ -4189,7 +4183,7 @@ private okhttp3.Call symbolPriceTickerValidateBeforeCall(String symbol) throws A * * @deprecated * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#symbol-price-ticker">Symbol * Price Ticker Documentation */ @Deprecated @@ -4215,7 +4209,7 @@ public ApiResponse symbolPriceTicker(String symbol) * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#symbol-price-ticker-v2">Symbol * Price Ticker V2 Documentation */ private okhttp3.Call symbolPriceTickerV2Call(String symbol) throws ApiException { @@ -4307,10 +4301,10 @@ private okhttp3.Call symbolPriceTickerV2ValidateBeforeCall(String symbol) throws } /** - * Symbol Price Ticker V2 Latest price for a symbol or symbols. * If the symbol is not sent, - * prices for all symbols will be returned in an array. * The field - * `X-MBX-USED-WEIGHT-1M` in response header is not accurate from this endpoint, - * please ignore. Weight: 1 for a single symbol; 2 when the symbol parameter is omitted + * Symbol Price Ticker V2 Latest price for a symbol or symbols. Weight: 1 for a single symbol; 2 + * when the symbol parameter is omitted Notes: - If the symbol is not sent, prices for all + * symbols will be returned in an array. - The field `X-MBX-USED-WEIGHT-1M` in + * response header is not accurate from this endpoint, please ignore. * * @param symbol (optional) * @return ApiResponse<SymbolPriceTickerV2Response> @@ -4324,7 +4318,7 @@ private okhttp3.Call symbolPriceTickerV2ValidateBeforeCall(String symbol) throws * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#symbol-price-ticker-v2">Symbol * Price Ticker V2 Documentation */ public ApiResponse symbolPriceTickerV2(String symbol) @@ -4339,10 +4333,8 @@ public ApiResponse symbolPriceTickerV2(String symbo * Build call for takerBuySellVolume * * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return Call to execute @@ -4355,7 +4347,7 @@ public ApiResponse symbolPriceTickerV2(String symbo * * * @see Taker + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#taker-buy-sell-volume">Taker * Buy/Sell Volume Documentation */ private okhttp3.Call takerBuySellVolumeCall( @@ -4475,15 +4467,13 @@ private okhttp3.Call takerBuySellVolumeValidateBeforeCall( } /** - * Taker Buy/Sell Volume Taker Buy/Sell Volume * If startTime and endTime are not sent, the most - * recent data is returned. * Only the data of the latest 30 days is available. * IP rate limit - * 1000 requests/5min Weight: 0 + * Taker Buy/Sell Volume Taker Buy/Sell Volume Weight(IP): 0 Notes: - If startTime and endTime + * are not sent, the most recent data is returned. - Only the data of the latest 30 days is + * available. - IP rate limit 1000 requests/5min * * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<TakerBuySellVolumeResponse> @@ -4497,13 +4487,13 @@ private okhttp3.Call takerBuySellVolumeValidateBeforeCall( * * * @see Taker + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#taker-buy-sell-volume">Taker * Buy/Sell Volume Documentation */ public ApiResponse takerBuySellVolume( @NotNull String symbol, @NotNull Period period, - Long limit, + @Max(500L) Long limit, Long startTime, Long endTime) throws ApiException { @@ -4527,7 +4517,7 @@ public ApiResponse takerBuySellVolume( * * * @see Test + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#test-connectivity">Test * Connectivity Documentation */ private okhttp3.Call testConnectivityCall() throws ApiException { @@ -4615,7 +4605,7 @@ private okhttp3.Call testConnectivityValidateBeforeCall() throws ApiException { } /** - * Test Connectivity Test connectivity to the Rest API. Weight: 1 + * Test Connectivity Test connectivity to the Rest API. Weight(IP): 1 * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -4628,7 +4618,7 @@ private okhttp3.Call testConnectivityValidateBeforeCall() throws ApiException { * * * @see Test + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#test-connectivity">Test * Connectivity Documentation */ public ApiResponse testConnectivity() throws ApiException { @@ -4650,7 +4640,7 @@ public ApiResponse testConnectivity() throws ApiException { * * * @see 24hr + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#ticker24hr-price-change-statistics">24hr * Ticker Price Change Statistics Documentation */ private okhttp3.Call ticker24hrPriceChangeStatisticsCall(String symbol) throws ApiException { @@ -4745,9 +4735,9 @@ private okhttp3.Call ticker24hrPriceChangeStatisticsValidateBeforeCall(String sy /** * 24hr Ticker Price Change Statistics 24 hour rolling window price change statistics. - * **Careful** when accessing this with no symbol. * If the symbol is not sent, tickers for all - * symbols will be returned in an array. Weight: 1 for a single symbol; 40 when the symbol - * parameter is omitted + * **Careful** when accessing this with no symbol. Weight: **1** for a single symbol; **40** + * when the symbol parameter is omitted Notes: - If the symbol is not sent, tickers for all + * symbols will be returned in an array. * * @param symbol (optional) * @return ApiResponse<Ticker24hrPriceChangeStatisticsResponse> @@ -4761,7 +4751,7 @@ private okhttp3.Call ticker24hrPriceChangeStatisticsValidateBeforeCall(String sy * * * @see 24hr + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#ticker24hr-price-change-statistics">24hr * Ticker Price Change Statistics Documentation */ public ApiResponse ticker24hrPriceChangeStatistics( @@ -4776,10 +4766,8 @@ public ApiResponse ticker24hrPriceChang * Build call for topTraderLongShortRatioAccounts * * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return Call to execute @@ -4792,8 +4780,8 @@ public ApiResponse ticker24hrPriceChang * * * @see Top - * Trader Long/Short Ratio (Accounts) Documentation + * href="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-accounts">Top + * Trader Long/Short Account Ratio (MARKET_DATA) Documentation */ private okhttp3.Call topTraderLongShortRatioAccountsCall( String symbol, Period period, Long limit, Long startTime, Long endTime) @@ -4913,20 +4901,18 @@ private okhttp3.Call topTraderLongShortRatioAccountsValidateBeforeCall( } /** - * Top Trader Long/Short Ratio (Accounts) The proportion of net long and net short accounts to - * total accounts of the top 20% users with the highest margin balance. Each account is counted - * once only. Long Account % = Accounts of top traders with net long positions / Total - * accounts of top traders with open positions Short Account % = Accounts of top traders - * with net short positions / Total accounts of top traders with open positions Long/Short Ratio - * (Accounts) = Long Account % / Short Account % * If startTime and endTime are not sent, - * the most recent data is returned. * Only the data of the latest 30 days is available. * IP - * rate limit 1000 requests/5min Weight: 0 + * Top Trader Long/Short Account Ratio (MARKET_DATA) The proportion of net long and net short + * accounts to total accounts of the top 20% users with the highest margin balance. Each account + * is counted once only. Long Account % = Accounts of top traders with net long positions / + * Total accounts of top traders with open positions Short Account % = Accounts of top + * traders with net short positions / Total accounts of top traders with open positions + * Long/Short Ratio (Accounts) = Long Account % / Short Account % Security Type: + * MARKET_DATA Notes: - If startTime and endTime are not sent, the most recent data is returned. + * - Only the data of the latest 30 days is available. - IP rate limit 1000 requests/5min * * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<TopTraderLongShortRatioAccountsResponse> @@ -4940,13 +4926,13 @@ private okhttp3.Call topTraderLongShortRatioAccountsValidateBeforeCall( * * * @see Top - * Trader Long/Short Ratio (Accounts) Documentation + * href="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-accounts">Top + * Trader Long/Short Account Ratio (MARKET_DATA) Documentation */ public ApiResponse topTraderLongShortRatioAccounts( @NotNull String symbol, @NotNull Period period, - Long limit, + @Max(500L) Long limit, Long startTime, Long endTime) throws ApiException { @@ -4962,10 +4948,8 @@ public ApiResponse topTraderLongShortRa * Build call for topTraderLongShortRatioPositions * * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return Call to execute @@ -4978,8 +4962,8 @@ public ApiResponse topTraderLongShortRa * * * @see Top - * Trader Long/Short Ratio (Positions) Documentation + * href="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">Top + * Trader Long/Short Position Ratio (MARKET_DATA) Documentation */ private okhttp3.Call topTraderLongShortRatioPositionsCall( String symbol, Period period, Long limit, Long startTime, Long endTime) @@ -5099,19 +5083,18 @@ private okhttp3.Call topTraderLongShortRatioPositionsValidateBeforeCall( } /** - * Top Trader Long/Short Ratio (Positions) The proportion of net long and net short positions to - * total open positions of the top 20% users with the highest margin balance. Long Position % - * = Long positions of top traders / Total open positions of top traders Short Position % - * = Short positions of top traders / Total open positions of top traders Long/Short Ratio - * (Positions) = Long Position % / Short Position % * If startTime and endTime are not - * sent, the most recent data is returned. * Only the data of the latest 30 days is available. * - * IP rate limit 1000 requests/5min Weight: 0 + * Top Trader Long/Short Position Ratio (MARKET_DATA) The proportion of net long and net short + * positions to total open positions of the top 20% users with the highest margin balance. Long + * Position % = Long positions of top traders / Total open positions of top traders Short + * Position % = Short positions of top traders / Total open positions of top traders + * Long/Short Ratio (Positions) = Long Position % / Short Position % Weight(IP): 0 Security + * Type: MARKET_DATA Notes: - If startTime and endTime are not sent, the most recent data is + * returned. - Only the data of the latest 30 days is available. - IP rate limit 1000 + * requests/5min * * @param symbol (required) - * @param period - * \"5m\",\"15m\",\"30m\",\"1h\",\"2h\",\"4h\",\"6h\",\"12h\",\"1d\" - * (required) - * @param limit Default 100; max 1000 (optional) + * @param period (required) + * @param limit (optional) * @param startTime (optional) * @param endTime (optional) * @return ApiResponse<TopTraderLongShortRatioPositionsResponse> @@ -5125,13 +5108,13 @@ private okhttp3.Call topTraderLongShortRatioPositionsValidateBeforeCall( * * * @see Top - * Trader Long/Short Ratio (Positions) Documentation + * href="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">Top + * Trader Long/Short Position Ratio (MARKET_DATA) Documentation */ public ApiResponse topTraderLongShortRatioPositions( @NotNull String symbol, @NotNull Period period, - Long limit, + @Max(500L) Long limit, Long startTime, Long endTime) throws ApiException { @@ -5156,7 +5139,7 @@ public ApiResponse topTraderLongShortR * * * @see Trading + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#trading-schedule">Trading * Schedule Documentation */ private okhttp3.Call tradingScheduleCall() throws ApiException { @@ -5245,11 +5228,14 @@ private okhttp3.Call tradingScheduleValidateBeforeCall() throws ApiException { /** * Trading Schedule Trading session schedules for the underlying assets of TradFi Perps are - * provided for a one-week period starting from the day prior to the query time, covering both - * the U.S. equity and commodity markets. Equity market session types include + * 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, and the commodity market. Session types per market: - U.S. equity market: * \"PRE_MARKET\", \"REGULAR\", \"AFTER_MARKET\", - * \"OVERNIGHT\", and \"NO_TRADING\", while commodity market session types - * include \"REGULAR\" and \"NO_TRADING\". Weight: 5 + * \"OVERNIGHT\", \"NO_TRADING\". - Commodity market: \"REGULAR\", + * \"NO_TRADING\". - Korean equity market: \"REGULAR\", + * \"NO_TRADING\". - Hong Kong equity market: \"REGULAR\", + * \"NO_TRADING\". Weight(IP): 5 * * @return ApiResponse<TradingScheduleResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -5262,7 +5248,7 @@ private okhttp3.Call tradingScheduleValidateBeforeCall() throws ApiException { * * * @see Trading + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#trading-schedule">Trading * Schedule Documentation */ public ApiResponse tradingSchedule() throws ApiException { diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/PortfolioMarginEndpointsApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/PortfolioMarginEndpointsApi.java index 1598f8bb6..59da911f9 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/PortfolioMarginEndpointsApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/PortfolioMarginEndpointsApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -42,7 +42,7 @@ public class PortfolioMarginEndpointsApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/11.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -94,7 +94,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Classic + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/portfolio-margin-endpoints#classic-portfolio-margin-account-information">Classic * Portfolio Margin Account Information (USER_DATA) Documentation */ private okhttp3.Call classicPortfolioMarginAccountInformationCall(String asset, Long recvWindow) @@ -199,8 +199,8 @@ private okhttp3.Call classicPortfolioMarginAccountInformationValidateBeforeCall( /** * Classic Portfolio Margin Account Information (USER_DATA) Get Classic Portfolio Margin current - * account information. * maxWithdrawAmount is for asset transfer out to the spot wallet. - * Weight: 5 + * account information. Weight(IP): 5 Security Type: USER_DATA Notes: - maxWithdrawAmount is for + * asset transfer out to the spot wallet. * * @param asset (required) * @param recvWindow (optional) @@ -215,12 +215,12 @@ private okhttp3.Call classicPortfolioMarginAccountInformationValidateBeforeCall( * * * @see Classic + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/portfolio-margin-endpoints#classic-portfolio-margin-account-information">Classic * Portfolio Margin Account Information (USER_DATA) Documentation */ public ApiResponse - classicPortfolioMarginAccountInformation(@NotNull String asset, Long recvWindow) - throws ApiException { + classicPortfolioMarginAccountInformation( + @NotNull String asset, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = classicPortfolioMarginAccountInformationValidateBeforeCall(asset, recvWindow); java.lang.reflect.Type localVarReturnType = diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/TradeApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/TradeApi.java index dcc537113..9029cb7f3 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/TradeApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/TradeApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -42,6 +42,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CurrentAllAlgoOpenOrdersResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CurrentAllOpenOrdersResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.FuturesTradfiPerpsContractRequest; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.FuturesTradfiPerpsContractResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetOrderModifyHistoryResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetPositionMarginChangeHistoryResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ModifyIsolatedPositionMarginRequest; @@ -91,7 +92,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/11.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -132,11 +133,11 @@ public void setCustomBaseUrl(String customBaseUrl) { * Build call for accountTradeList * * @param symbol (required) - * @param orderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param orderId Must be used together with parameter `symbol`. (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) + * @param limit (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -148,7 +149,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#account-trade-list">Account * Trade List (USER_DATA) Documentation */ private okhttp3.Call accountTradeListCall( @@ -294,19 +295,19 @@ private okhttp3.Call accountTradeListValidateBeforeCall( } /** - * Account Trade List (USER_DATA) Get trades for a specific account and symbol. * If - * `startTime` and `endTime` are both not sent, then the last 7 days' - * data will be returned. * The time between `startTime` and `endTime` - * cannot be longer than 7 days. * The parameter `fromId` cannot be sent with - * `startTime` or `endTime`. * Only support querying trade in the past 6 - * months Weight: 5 + * Account Trade List (USER_DATA) Get trades for a specific account and symbol. Weight(IP): 5 + * Security Type: USER_DATA Notes: - If `startTime` and `endTime` are both + * not sent, then the last 7 days' data will be returned. - The time between + * `startTime` and `endTime` cannot be longer than 7 days. - The parameter + * `fromId` cannot be sent with `startTime` or `endTime`. - Only + * support querying trade in the past 6 months * * @param symbol (required) - * @param orderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param limit Default 100; max 1000 (optional) + * @param orderId Must be used together with parameter `symbol`. (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param fromId Trade id to fetch from. Default gets most recent trades. (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<AccountTradeListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -319,7 +320,7 @@ private okhttp3.Call accountTradeListValidateBeforeCall( * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#account-trade-list">Account * Trade List (USER_DATA) Documentation */ public ApiResponse accountTradeList( @@ -328,8 +329,8 @@ public ApiResponse accountTradeList( Long startTime, Long endTime, Long fromId, - Long limit, - Long recvWindow) + @Max(1000L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = accountTradeListValidateBeforeCall( @@ -344,9 +345,9 @@ public ApiResponse accountTradeList( * * @param symbol (required) * @param orderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -358,7 +359,7 @@ public ApiResponse accountTradeList( * * * @see All + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#all-orders">All * Orders (USER_DATA) Documentation */ private okhttp3.Call allOrdersCall( @@ -484,18 +485,19 @@ private okhttp3.Call allOrdersValidateBeforeCall( } /** - * All Orders (USER_DATA) Get all account orders; active, canceled, or filled. * These orders - * will not be found: * order status is `CANCELED` or `EXPIRED` **AND** - * order has NO filled trade **AND** created time + 3 days < current time * order create time - * + 90 days < current time * If `orderId` is set, it will get orders >= - * that `orderId`. Otherwise most recent orders are returned. * The query time period - * must be less then 7 days( default as the recent 7 days). Weight: 5 + * All Orders (USER_DATA) Get all account orders; active, canceled, or filled. - These orders + * will not be found: - order status is `CANCELED` or `EXPIRED` **AND** + * order has NO filled trade **AND** created time + 3 days < current time - order create time + * + 90 days < current time Weight(IP): 5 Security Type: USER_DATA Notes: - If + * `orderId` is set, it will get orders >= that `orderId`. Otherwise + * most recent orders are returned. - The query time period must be less then 7 days( default as + * the recent 7 days). * * @param symbol (required) * @param orderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime End time (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<AllOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -508,7 +510,7 @@ private okhttp3.Call allOrdersValidateBeforeCall( * * * @see All + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#all-orders">All * Orders (USER_DATA) Documentation */ public ApiResponse allOrders( @@ -516,8 +518,8 @@ public ApiResponse allOrders( Long orderId, Long startTime, Long endTime, - Long limit, - Long recvWindow) + @Max(1000L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = allOrdersValidateBeforeCall(symbol, orderId, startTime, endTime, limit, recvWindow); @@ -539,7 +541,7 @@ public ApiResponse allOrders( * * * @see Auto-Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#auto-cancel-all-open-orders">Auto-Cancel * All Open Orders (TRADE) Documentation */ private okhttp3.Call autoCancelAllOpenOrdersCall( @@ -649,13 +651,14 @@ private okhttp3.Call autoCancelAllOpenOrdersValidateBeforeCall( /** * Auto-Cancel All Open Orders (TRADE) Cancel all open orders of the specified symbol at the end * of the specified countdown. The endpoint should be called repeatedly as heartbeats so that - * the existing countdown time can be canceled and replaced by a new one. * Example usage: Call + * the existing countdown time can be canceled and replaced by a new one. Example usage: Call * this endpoint at 30s intervals with an countdownTime of 120000 (120s). If this endpoint is * not called within 120 seconds, all your orders of the specified symbol will be automatically * canceled. If this endpoint is called with an countdownTime of 0, the countdown timer will be * stopped. The system will check all countdowns **approximately every 10 milliseconds**, so * please note that sufficient redundancy should be considered when using this function. We do - * not recommend setting the countdown time to be too precise or too small. Weight: 10 + * not recommend setting the countdown time to be too precise or too small. Weight(IP): 10 + * Security Type: TRADE * * @param autoCancelAllOpenOrdersRequest (required) * @return ApiResponse<AutoCancelAllOpenOrdersResponse> @@ -669,7 +672,7 @@ private okhttp3.Call autoCancelAllOpenOrdersValidateBeforeCall( * * * @see Auto-Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#auto-cancel-all-open-orders">Auto-Cancel * All Open Orders (TRADE) Documentation */ public ApiResponse autoCancelAllOpenOrders( @@ -698,7 +701,7 @@ public ApiResponse autoCancelAllOpenOrders( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-algo-order">Cancel * Algo Order (TRADE) Documentation */ private okhttp3.Call cancelAlgoOrderCall(Long algoId, String clientAlgoId, Long recvWindow) @@ -804,8 +807,9 @@ private okhttp3.Call cancelAlgoOrderValidateBeforeCall( } /** - * Cancel Algo Order (TRADE) Cancel an active algo order. * Either `algoId` or - * `clientAlgoId` must be sent. Weight: 1 + * Cancel Algo Order (TRADE) Cancel an active algo (conditional) order, including TP/SL (Take + * Profit / Stop Loss) and trailing stop orders on USD-M Futures. Weight(IP): 1 Security Type: + * TRADE Notes: - Either `algoId` or `clientAlgoId` must be sent. * * @param algoId (optional) * @param clientAlgoId (optional) @@ -821,11 +825,11 @@ private okhttp3.Call cancelAlgoOrderValidateBeforeCall( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-algo-order">Cancel * Algo Order (TRADE) Documentation */ public ApiResponse cancelAlgoOrder( - Long algoId, String clientAlgoId, Long recvWindow) throws ApiException { + Long algoId, String clientAlgoId, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = cancelAlgoOrderValidateBeforeCall(algoId, clientAlgoId, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -848,7 +852,7 @@ public ApiResponse cancelAlgoOrder( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-all-algo-open-orders">Cancel * All Algo Open Orders (TRADE) Documentation */ private okhttp3.Call cancelAllAlgoOpenOrdersCall(String symbol, Long recvWindow) @@ -948,7 +952,9 @@ private okhttp3.Call cancelAllAlgoOpenOrdersValidateBeforeCall(String symbol, Lo } /** - * Cancel All Algo Open Orders (TRADE) Cancel All Algo Open Orders Weight: 1 + * Cancel All Algo Open Orders (TRADE) Cancel all open algo (conditional) orders on a symbol, + * including TP/SL (Take Profit / Stop Loss) and trailing stop orders on USD-M Futures. + * Weight(IP): 1 Security Type: TRADE * * @param symbol (required) * @param recvWindow (optional) @@ -963,11 +969,11 @@ private okhttp3.Call cancelAllAlgoOpenOrdersValidateBeforeCall(String symbol, Lo * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-all-algo-open-orders">Cancel * All Algo Open Orders (TRADE) Documentation */ public ApiResponse cancelAllAlgoOpenOrders( - @NotNull String symbol, Long recvWindow) throws ApiException { + @NotNull String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = cancelAllAlgoOpenOrdersValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -989,7 +995,7 @@ public ApiResponse cancelAllAlgoOpenOrders( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-all-open-orders">Cancel * All Open Orders (TRADE) Documentation */ private okhttp3.Call cancelAllOpenOrdersCall(String symbol, Long recvWindow) @@ -1089,7 +1095,7 @@ private okhttp3.Call cancelAllOpenOrdersValidateBeforeCall(String symbol, Long r } /** - * Cancel All Open Orders (TRADE) Cancel All Open Orders Weight: 1 + * Cancel All Open Orders (TRADE) Cancel All Open Orders Weight(IP): 1 Security Type: TRADE * * @param symbol (required) * @param recvWindow (optional) @@ -1104,11 +1110,11 @@ private okhttp3.Call cancelAllOpenOrdersValidateBeforeCall(String symbol, Long r * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-all-open-orders">Cancel * All Open Orders (TRADE) Documentation */ public ApiResponse cancelAllOpenOrders( - @NotNull String symbol, Long recvWindow) throws ApiException { + @NotNull String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = cancelAllOpenOrdersValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -1119,10 +1125,8 @@ public ApiResponse cancelAllOpenOrders( * Build call for cancelMultipleOrders * * @param symbol (required) - * @param orderIdList max length 10 <br /> e.g. [1234567,2345678] (optional) - * @param origClientOrderIdList max length 10<br /> e.g. - * [\"my_id_1\",\"my_id_2\"], encode the double quotes. No space after - * comma. (optional) + * @param orderIdList (optional) + * @param origClientOrderIdList (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1134,7 +1138,7 @@ public ApiResponse cancelAllOpenOrders( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-multiple-orders">Cancel * Multiple Orders (TRADE) Documentation */ private okhttp3.Call cancelMultipleOrdersCall( @@ -1260,14 +1264,12 @@ private okhttp3.Call cancelMultipleOrdersValidateBeforeCall( } /** - * Cancel Multiple Orders (TRADE) Cancel Multiple Orders * Either `orderIdList` or - * `origClientOrderIdList ` must be sent. Weight: 1 + * Cancel Multiple Orders (TRADE) Cancel Multiple Orders Weight(IP): 1 Security Type: TRADE + * Notes: - Either `orderIdList` or `origClientOrderIdList ` must be sent. * * @param symbol (required) - * @param orderIdList max length 10 <br /> e.g. [1234567,2345678] (optional) - * @param origClientOrderIdList max length 10<br /> e.g. - * [\"my_id_1\",\"my_id_2\"], encode the double quotes. No space after - * comma. (optional) + * @param orderIdList (optional) + * @param origClientOrderIdList (optional) * @param recvWindow (optional) * @return ApiResponse<CancelMultipleOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1280,14 +1282,14 @@ private okhttp3.Call cancelMultipleOrdersValidateBeforeCall( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-multiple-orders">Cancel * Multiple Orders (TRADE) Documentation */ public ApiResponse cancelMultipleOrders( @NotNull String symbol, OrderIdList orderIdList, OrigClientOrderIdList origClientOrderIdList, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = cancelMultipleOrdersValidateBeforeCall( @@ -1314,7 +1316,7 @@ public ApiResponse cancelMultipleOrders( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-order">Cancel * Order (TRADE) Documentation */ private okhttp3.Call cancelOrderCall( @@ -1431,8 +1433,8 @@ private okhttp3.Call cancelOrderValidateBeforeCall( } /** - * Cancel Order (TRADE) Cancel an active order. * Either `orderId` or - * `origClientOrderId` must be sent. Weight: 1 + * Cancel Order (TRADE) Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - + * Either `orderId` or `origClientOrderId` must be sent. * * @param symbol (required) * @param orderId (optional) @@ -1449,11 +1451,14 @@ private okhttp3.Call cancelOrderValidateBeforeCall( * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#cancel-order">Cancel * Order (TRADE) Documentation */ public ApiResponse cancelOrder( - @NotNull String symbol, Long orderId, String origClientOrderId, Long recvWindow) + @NotNull String symbol, + Long orderId, + String origClientOrderId, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = cancelOrderValidateBeforeCall(symbol, orderId, origClientOrderId, recvWindow); @@ -1476,8 +1481,8 @@ public ApiResponse cancelOrder( * * * @see Change - * Initial Leverage(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#change-initial-leverage">Change + * Initial Leverage (TRADE) Documentation */ private okhttp3.Call changeInitialLeverageCall( ChangeInitialLeverageRequest changeInitialLeverageRequest) throws ApiException { @@ -1581,8 +1586,8 @@ private okhttp3.Call changeInitialLeverageValidateBeforeCall( } /** - * Change Initial Leverage(TRADE) Change user's initial leverage of specific symbol market. - * Weight: 1 + * Change Initial Leverage (TRADE) Change user's initial leverage of specific symbol market. + * Weight(IP): 1 Security Type: TRADE * * @param changeInitialLeverageRequest (required) * @return ApiResponse<ChangeInitialLeverageResponse> @@ -1596,8 +1601,8 @@ private okhttp3.Call changeInitialLeverageValidateBeforeCall( * * * @see Change - * Initial Leverage(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#change-initial-leverage">Change + * Initial Leverage (TRADE) Documentation */ public ApiResponse changeInitialLeverage( @Valid @NotNull ChangeInitialLeverageRequest changeInitialLeverageRequest) @@ -1623,8 +1628,8 @@ public ApiResponse changeInitialLeverage( * * * @see Change - * Margin Type(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#change-margin-type">Change + * Margin Type (TRADE) Documentation */ private okhttp3.Call changeMarginTypeCall(ChangeMarginTypeRequest changeMarginTypeRequest) throws ApiException { @@ -1727,7 +1732,7 @@ private okhttp3.Call changeMarginTypeValidateBeforeCall( } /** - * Change Margin Type(TRADE) Change symbol level margin type Weight: 1 + * Change Margin Type (TRADE) Change symbol level margin type Weight(IP): 1 Security Type: TRADE * * @param changeMarginTypeRequest (required) * @return ApiResponse<ChangeMarginTypeResponse> @@ -1741,8 +1746,8 @@ private okhttp3.Call changeMarginTypeValidateBeforeCall( * * * @see Change - * Margin Type(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#change-margin-type">Change + * Margin Type (TRADE) Documentation */ public ApiResponse changeMarginType( @Valid @NotNull ChangeMarginTypeRequest changeMarginTypeRequest) throws ApiException { @@ -1766,7 +1771,7 @@ public ApiResponse changeMarginType( * * * @see Change + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#change-multi-assets-mode">Change * Multi-Assets Mode (TRADE) Documentation */ private okhttp3.Call changeMultiAssetsModeCall( @@ -1869,7 +1874,7 @@ private okhttp3.Call changeMultiAssetsModeValidateBeforeCall( /** * Change Multi-Assets Mode (TRADE) Change user's Multi-Assets mode (Multi-Assets Mode or - * Single-Asset Mode) on ***Every symbol*** Weight: 1 + * Single-Asset Mode) on ***Every symbol*** Weight(IP): 1 Security Type: TRADE * * @param changeMultiAssetsModeRequest (required) * @return ApiResponse<ChangeMultiAssetsModeResponse> @@ -1883,7 +1888,7 @@ private okhttp3.Call changeMultiAssetsModeValidateBeforeCall( * * * @see Change + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#change-multi-assets-mode">Change * Multi-Assets Mode (TRADE) Documentation */ public ApiResponse changeMultiAssetsMode( @@ -1910,8 +1915,8 @@ public ApiResponse changeMultiAssetsMode( * * * @see Change - * Position Mode(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#change-position-mode">Change + * Position Mode (TRADE) Documentation */ private okhttp3.Call changePositionModeCall(ChangePositionModeRequest changePositionModeRequest) throws ApiException { @@ -2012,8 +2017,12 @@ private okhttp3.Call changePositionModeValidateBeforeCall( } /** - * Change Position Mode(TRADE) Change user's position mode (Hedge Mode or One-way Mode ) on - * ***EVERY symbol*** Weight: 1 + * Change Position Mode (TRADE) Change user's position mode (Hedge Mode or One-way Mode ) on + * ***EVERY symbol***. **After CM migration**, UM and CM share the **same** + * `dualSidePosition` setting. Calling this endpoint flips both UM and CM at once. If + * either side has any open order or open position, the change is rejected: - `-4067` + * (open orders exist) - `-4068` (open position exists) Weight(IP): 1 Security Type: + * TRADE * * @param changePositionModeRequest (required) * @return ApiResponse<ChangePositionModeResponse> @@ -2027,8 +2036,8 @@ private okhttp3.Call changePositionModeValidateBeforeCall( * * * @see Change - * Position Mode(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#change-position-mode">Change + * Position Mode (TRADE) Documentation */ public ApiResponse changePositionMode( @Valid @NotNull ChangePositionModeRequest changePositionModeRequest) @@ -2056,7 +2065,7 @@ public ApiResponse changePositionMode( * * * @see Current + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#current-all-algo-open-orders">Current * All Algo Open Orders (USER_DATA) Documentation */ private okhttp3.Call currentAllAlgoOpenOrdersCall( @@ -2170,10 +2179,11 @@ private okhttp3.Call currentAllAlgoOpenOrdersValidateBeforeCall( } /** - * Current All Algo Open Orders (USER_DATA) Get all algo open orders on a symbol. * If the - * symbol is not sent, orders for all symbols will be returned in an array. Weight: 1 for a - * single symbol; 40 when the symbol parameter is omitted Careful when accessing this with no - * symbol. + * Current All Algo Open Orders (USER_DATA) Get all open algo (conditional) orders on a symbol, + * including TP/SL (Take Profit / Stop Loss) and trailing stop orders on USD-M Futures. Weight: + * **1** for a single symbol; **40** when the symbol parameter is omitted **Careful** when + * accessing this with no symbol. Security Type: USER_DATA Notes: - If the symbol is not sent, + * orders for all symbols will be returned in an array. * * @param algoType (optional) * @param symbol (optional) @@ -2190,11 +2200,12 @@ private okhttp3.Call currentAllAlgoOpenOrdersValidateBeforeCall( * * * @see Current + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#current-all-algo-open-orders">Current * All Algo Open Orders (USER_DATA) Documentation */ public ApiResponse currentAllAlgoOpenOrders( - String algoType, String symbol, Long algoId, Long recvWindow) throws ApiException { + String algoType, String symbol, Long algoId, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = currentAllAlgoOpenOrdersValidateBeforeCall(algoType, symbol, algoId, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -2217,7 +2228,7 @@ public ApiResponse currentAllAlgoOpenOrders( * * * @see Current + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#current-all-open-orders">Current * All Open Orders (USER_DATA) Documentation */ private okhttp3.Call currentAllOpenOrdersCall(String symbol, Long recvWindow) @@ -2317,9 +2328,10 @@ private okhttp3.Call currentAllOpenOrdersValidateBeforeCall(String symbol, Long } /** - * Current All Open Orders (USER_DATA) Get all open orders on a symbol. * If the symbol is not - * sent, orders for all symbols will be returned in an array. Weight: 1 for a single symbol; 40 - * when the symbol parameter is omitted Careful when accessing this with no symbol. + * Current All Open Orders (USER_DATA) Get all open orders on a symbol. Weight: **1** for a + * single symbol; **40** when the symbol parameter is omitted **Careful** when accessing this + * with no symbol. Security Type: USER_DATA Notes: - If the symbol is not sent, orders for all + * symbols will be returned in an array. * * @param symbol (optional) * @param recvWindow (optional) @@ -2334,11 +2346,11 @@ private okhttp3.Call currentAllOpenOrdersValidateBeforeCall(String symbol, Long * * * @see Current + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#current-all-open-orders">Current * All Open Orders (USER_DATA) Documentation */ public ApiResponse currentAllOpenOrders( - String symbol, Long recvWindow) throws ApiException { + String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = currentAllOpenOrdersValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -2348,19 +2360,19 @@ public ApiResponse currentAllOpenOrders( /** * Build call for futuresTradfiPerpsContract * - * @param futuresTradfiPerpsContractRequest (required) + * @param futuresTradfiPerpsContractRequest (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details * * * - * + * *
Response Details
Status Code Description Response Headers
200 OK -
200 Futures TradFi Perps Contract -
* * @see Futures - * TradFi Perps Contract(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#futures-tradfi-perps-contract">Futures + * TradFi Perps Contract (USER_DATA) Documentation */ private okhttp3.Call futuresTradfiPerpsContractCall( FuturesTradfiPerpsContractRequest futuresTradfiPerpsContractRequest) @@ -2460,29 +2472,32 @@ private okhttp3.Call futuresTradfiPerpsContractValidateBeforeCall( } /** - * Futures TradFi Perps Contract(USER_DATA) Sign TradFi-Perps agreement contract Weight: 0 + * Futures TradFi Perps Contract (USER_DATA) Sign TradFi-Perps agreement contract Weight(IP): 50 + * Security Type: USER_DATA * - * @param futuresTradfiPerpsContractRequest (required) - * @return ApiResponse<Void> + * @param futuresTradfiPerpsContractRequest (optional) + * @return ApiResponse<FuturesTradfiPerpsContractResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * *
Response Details
Status Code Description Response Headers
200 OK -
200 Futures TradFi Perps Contract -
* * @see Futures - * TradFi Perps Contract(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#futures-tradfi-perps-contract">Futures + * TradFi Perps Contract (USER_DATA) Documentation */ - public ApiResponse futuresTradfiPerpsContract( - @Valid @NotNull FuturesTradfiPerpsContractRequest futuresTradfiPerpsContractRequest) + public ApiResponse futuresTradfiPerpsContract( + @Valid FuturesTradfiPerpsContractRequest futuresTradfiPerpsContractRequest) throws ApiException { okhttp3.Call localVarCall = futuresTradfiPerpsContractValidateBeforeCall(futuresTradfiPerpsContractRequest); - return localVarApiClient.execute(localVarCall); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -2491,9 +2506,9 @@ public ApiResponse futuresTradfiPerpsContract( * @param symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Timestamp in ms to get modification history from INCLUSIVE (optional) + * @param endTime Timestamp in ms to get modification history until INCLUSIVE (optional) + * @param limit (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2505,7 +2520,7 @@ public ApiResponse futuresTradfiPerpsContract( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#get-order-modify-history">Get * Order Modify History (USER_DATA) Documentation */ private okhttp3.Call getOrderModifyHistoryCall( @@ -2652,17 +2667,17 @@ private okhttp3.Call getOrderModifyHistoryValidateBeforeCall( } /** - * Get Order Modify History (USER_DATA) Get order modification history * Either - * `orderId` or `origClientOrderId` must be sent, and the - * `orderId` will prevail if both are sent. * Order modify history longer than 3 month - * is not avaliable Weight: 1 + * Get Order Modify History (USER_DATA) Get order modification history Weight(IP): 1 Security + * Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` must be + * sent, and the `orderId` will prevail if both are sent. - Order modify history + * longer than 3 month is not avaliable * * @param symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Timestamp in ms to get modification history from INCLUSIVE (optional) + * @param endTime Timestamp in ms to get modification history until INCLUSIVE (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<GetOrderModifyHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2675,7 +2690,7 @@ private okhttp3.Call getOrderModifyHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#get-order-modify-history">Get * Order Modify History (USER_DATA) Documentation */ public ApiResponse getOrderModifyHistory( @@ -2684,8 +2699,8 @@ public ApiResponse getOrderModifyHistory( String origClientOrderId, Long startTime, Long endTime, - Long limit, - Long recvWindow) + @Max(100L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getOrderModifyHistoryValidateBeforeCall( @@ -2700,9 +2715,9 @@ public ApiResponse getOrderModifyHistory( * * @param symbol (required) * @param type 1: Add position margin,2: Reduce position margin (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime time if not pass (optional) + * @param limit (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2714,7 +2729,7 @@ public ApiResponse getOrderModifyHistory( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#get-position-margin-change-history">Get * Position Margin Change History (TRADE) Documentation */ private okhttp3.Call getPositionMarginChangeHistoryCall( @@ -2841,15 +2856,16 @@ private okhttp3.Call getPositionMarginChangeHistoryValidateBeforeCall( } /** - * Get Position Margin Change History (TRADE) Get Position Margin Change History * Support - * querying future histories that are not older than 30 days * The time between - * `startTime` and `endTime`can't be more than 30 days Weight: 1 + * Get Position Margin Change History (TRADE) Get Position Margin Change History Weight(IP): 1 + * Security Type: TRADE Notes: - Support querying future histories that are not older than 30 + * days - The time between `startTime` and `endTime`can't be more than + * 30 days * * @param symbol (required) * @param type 1: Add position margin,2: Reduce position margin (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param startTime Start time (optional) + * @param endTime time if not pass (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<GetPositionMarginChangeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2862,7 +2878,7 @@ private okhttp3.Call getPositionMarginChangeHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#get-position-margin-change-history">Get * Position Margin Change History (TRADE) Documentation */ public ApiResponse getPositionMarginChangeHistory( @@ -2871,7 +2887,7 @@ public ApiResponse getPositionMarginChan Long startTime, Long endTime, Long limit, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getPositionMarginChangeHistoryValidateBeforeCall( @@ -2895,8 +2911,8 @@ public ApiResponse getPositionMarginChan * * * @see Modify - * Isolated Position Margin(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#modify-isolated-position-margin">Modify + * Isolated Position Margin (TRADE) Documentation */ private okhttp3.Call modifyIsolatedPositionMarginCall( ModifyIsolatedPositionMarginRequest modifyIsolatedPositionMarginRequest) @@ -3017,8 +3033,8 @@ private okhttp3.Call modifyIsolatedPositionMarginValidateBeforeCall( } /** - * Modify Isolated Position Margin(TRADE) Modify Isolated Position Margin * Only for isolated - * symbol Weight: 1 + * Modify Isolated Position Margin (TRADE) Modify Isolated Position Margin Weight(IP): 1 + * Security Type: TRADE Notes: - Only for isolated symbol * * @param modifyIsolatedPositionMarginRequest (required) * @return ApiResponse<ModifyIsolatedPositionMarginResponse> @@ -3032,8 +3048,8 @@ private okhttp3.Call modifyIsolatedPositionMarginValidateBeforeCall( * * * @see Modify - * Isolated Position Margin(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#modify-isolated-position-margin">Modify + * Isolated Position Margin (TRADE) Documentation */ public ApiResponse modifyIsolatedPositionMargin( @Valid @NotNull ModifyIsolatedPositionMarginRequest modifyIsolatedPositionMarginRequest) @@ -3059,8 +3075,8 @@ public ApiResponse modifyIsolatedPositionM * * * @see Modify - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#modify-multiple-orders">Modify + * Multiple Orders (TRADE) Documentation */ private okhttp3.Call modifyMultipleOrdersCall( ModifyMultipleOrdersRequest modifyMultipleOrdersRequest) throws ApiException { @@ -3161,12 +3177,13 @@ private okhttp3.Call modifyMultipleOrdersValidateBeforeCall( } /** - * Modify Multiple Orders(TRADE) Modify Multiple Orders (TRADE) * Parameter rules are same with - * `Modify Order` * Batch modify orders are processed concurrently, and the order of - * matching is not guaranteed. * The order of returned contents for batch modify orders is the - * same as the order of the order list. * One order can only be modfied for less than 10000 - * times Weight: 5 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate - * limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate limit(x-mbx-used-weight-1m); + * Modify Multiple Orders (TRADE) Modify Multiple Orders (TRADE) Weight: 5 on 10s order rate + * limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate + * limit(x-mbx-used-weight-1m); Security Type: TRADE Notes: - Parameter rules are same with + * `Modify Order` - Batch modify orders are processed concurrently, and the order of + * matching is not guaranteed. - The order of returned contents for batch modify orders is the + * same as the order of the order list. - One order can only be modfied for less than 10000 + * times * * @param modifyMultipleOrdersRequest (required) * @return ApiResponse<ModifyMultipleOrdersResponse> @@ -3180,8 +3197,8 @@ private okhttp3.Call modifyMultipleOrdersValidateBeforeCall( * * * @see Modify - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#modify-multiple-orders">Modify + * Multiple Orders (TRADE) Documentation */ public ApiResponse modifyMultipleOrders( @Valid @NotNull ModifyMultipleOrdersRequest modifyMultipleOrdersRequest) @@ -3207,7 +3224,7 @@ public ApiResponse modifyMultipleOrders( * * * @see Modify + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#modify-order">Modify * Order (TRADE) Documentation */ private okhttp3.Call modifyOrderCall(ModifyOrderRequest modifyOrderRequest) @@ -3267,6 +3284,10 @@ private okhttp3.Call modifyOrderCall(ModifyOrderRequest modifyOrderRequest) localVarFormParams.put("priceMatch", modifyOrderRequest.getPriceMatch()); } + if (modifyOrderRequest.getModifyId() != null) { + localVarFormParams.put("modifyId", modifyOrderRequest.getModifyId()); + } + if (modifyOrderRequest.getRecvWindow() != null) { localVarFormParams.put("recvWindow", modifyOrderRequest.getRecvWindow()); } @@ -3334,18 +3355,18 @@ private okhttp3.Call modifyOrderValidateBeforeCall(ModifyOrderRequest modifyOrde /** * Modify Order (TRADE) Order modify function, currently only LIMIT order modification is - * supported, modified orders will be reordered in the match queue * Either `orderId` - * or `origClientOrderId` must be sent, and the `orderId` will prevail if - * both are sent. * Both `quantity` and `price` must be sent, which is - * different from dapi modify order endpoint. * When the new `quantity` or - * `price` doesn'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 `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 Weight: 1 on 10s order rate + * 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) + * limit(x-mbx-used-weight-1m) Security Type: TRADE Notes: - Either `orderId` or + * `origClientOrderId` must be sent, and the `orderId` will prevail if both + * are sent. - Both `quantity` and `price` must be sent, which is different + * from dapi modify order endpoint. - When the new `quantity` or `price` + * doesn'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 + * `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 * * @param modifyOrderRequest (required) * @return ApiResponse<ModifyOrderResponse> @@ -3359,7 +3380,7 @@ private okhttp3.Call modifyOrderValidateBeforeCall(ModifyOrderRequest modifyOrde * * * @see Modify + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#modify-order">Modify * Order (TRADE) Documentation */ public ApiResponse modifyOrder( @@ -3384,8 +3405,8 @@ public ApiResponse modifyOrder( * * * @see New - * Algo Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#new-algo-order">New + * Algo Order (TRADE) Documentation */ private okhttp3.Call newAlgoOrderCall(NewAlgoOrderRequest newAlgoOrderRequest) throws ApiException { @@ -3570,40 +3591,42 @@ private okhttp3.Call newAlgoOrderValidateBeforeCall(NewAlgoOrderRequest newAlgoO } /** - * New Algo Order(TRADE) Send in a new Algo order. * Algo order with type `STOP`, - * parameter `timeInForce` can be sent ( default `GTC`). * Algo order with - * type `TAKE_PROFIT`, parameter `timeInForce` can be sent ( default - * `GTC`). * Condition orders will be triggered when: * If - * parameter`priceProtect`is sent as true: * when price reaches the + * New Algo Order (TRADE) Send in a new algo (conditional) order. Use this endpoint to place + * **TP/SL (Take Profit / Stop Loss)** and trailing stop orders on USD-M Futures. Supported + * order types under `algoType=CONDITIONAL` are `STOP_MARKET`, + * `TAKE_PROFIT_MARKET`, `STOP`, `TAKE_PROFIT`, and + * `TRAILING_STOP_MARKET`. 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: - Algo order with type `STOP`, parameter + * `timeInForce` can be sent (default `GTC`). - Algo order with type + * `TAKE_PROFIT`, parameter `timeInForce` can be sent ( default + * `GTC`). - Condition orders will be triggered when: - If + * parameter`priceProtect`is sent as true: - when price reaches the * `triggerPrice` ,the difference rate between \"MARK_PRICE\" and * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * `TAKE_PROFIT`, - * `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * SELL: latest price + * symbol - \"triggerProtect\" of a symbol can be got from `GET + * /fapi/v1/exchangeInfo` - `STOP`, `STOP_MARKET`: - BUY: latest price * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest price after - * order placed <= `activatePrice`, and the latest price >= the lowest - * price * (1 + `callbackRate`) * SELL: the highest price after order placed - * >= `activatePrice`, and the latest price <= the highest price * (1 - * - `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error - * code. ``{\"code\": -2021, \"msg\": \"Order would - * immediately trigger.\"}`` means that the parameters you send do not meet the - * following requirements: * BUY: `activatePrice` should be smaller than latest price. - * * SELL: `activatePrice` should be larger than latest price. * - * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` paremeter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with - * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * + * `triggerPrice` - SELL: latest price (\"MARK_PRICE\" or + * \"CONTRACT_PRICE\") - `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - + * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") - SELL: latest + * price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= + * `triggerPrice` - `TRAILING_STOP_MARKET`: - BUY: the lowest price after + * order placed = the lowest price * (1 + `callbackRate`) - SELL: the highest + * price after order placed >= `activatePrice`, and the latest price - For + * `TRAILING_STOP_MARKET`, if you got such error code. > `{\"code\": + * -2021, \"msg\": \"Order would immediately trigger.\"}` > means + * that the parameters you send do not meet the following requirements: - BUY: + * `activatePrice` should be smaller than latest price. - SELL: + * `activatePrice` should be larger than latest price. - `STOP_MARKET`, + * `TAKE_PROFIT_MARKET` with `closePosition`=`true`: - Follow + * the same rules for condition orders. - If triggered,**close all** current long position( if + * `SELL`) or current short position( if `BUY`). - Cannot be used with + * `quantity` paremeter - Cannot be used with `reduceOnly` parameter - In + * Hedge Mode,cannot be used with `BUY` orders in `LONG` position side. and + * cannot be used with `SELL` orders in `SHORT` position side - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. Weight: 0 on IP rate - * limit(x-mbx-used-weight-1m) + * `IOC` or `GTC` or `GTD`. * * @param newAlgoOrderRequest (required) * @return ApiResponse<NewAlgoOrderResponse> @@ -3617,8 +3640,8 @@ private okhttp3.Call newAlgoOrderValidateBeforeCall(NewAlgoOrderRequest newAlgoO * * * @see New - * Algo Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#new-algo-order">New + * Algo Order (TRADE) Documentation */ public ApiResponse newAlgoOrder( @Valid @NotNull NewAlgoOrderRequest newAlgoOrderRequest) throws ApiException { @@ -3642,8 +3665,8 @@ public ApiResponse newAlgoOrder( * * * @see New - * Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#new-order">New + * Order (TRADE) Documentation */ private okhttp3.Call newOrderCall(NewOrderRequest newOrderRequest) throws ApiException { String basePath = null; @@ -3690,16 +3713,16 @@ private okhttp3.Call newOrderCall(NewOrderRequest newOrderRequest) throws ApiExc localVarFormParams.put("timeInForce", newOrderRequest.getTimeInForce()); } + if (newOrderRequest.getReduceOnly() != null) { + localVarFormParams.put("reduceOnly", newOrderRequest.getReduceOnly()); + } + if (newOrderRequest.getQuantity() != null) { localVarFormParams.put( "quantity", DecimalFormatter.getFormatter().format(newOrderRequest.getQuantity())); } - if (newOrderRequest.getReduceOnly() != null) { - localVarFormParams.put("reduceOnly", newOrderRequest.getReduceOnly()); - } - if (newOrderRequest.getPrice() != null) { localVarFormParams.put( "price", DecimalFormatter.getFormatter().format(newOrderRequest.getPrice())); @@ -3792,15 +3815,19 @@ private okhttp3.Call newOrderValidateBeforeCall(NewOrderRequest newOrderRequest) } /** - * New Order(TRADE) Send in a new order. * If `newOrderRespType ` is sent as - * `RESULT` : * `MARKET` order: the final FILLED result of the order will be - * return directly. * `LIMIT` order with special `timeInForce`: the final - * status result of the order(FILLED or EXPIRED) will be returned directly. * - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. * In extreme market conditions, - * timeInForce `GTD` order auto cancel time might be delayed comparing to - * `goodTillDate` 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) + * New Order (TRADE) Send in a new order. 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: Additional mandatory parameters based + * on `type`: | Type | Additional mandatory parameters | + * |------|----------------------------------| | `LIMIT` | `timeInForce`, + * `quantity`, `price` | | `MARKET` | `quantity` | - If + * `newOrderRespType` is sent as `RESULT`: - `MARKET` order: the + * final FILLED result of the order will be returned directly. - `LIMIT` order with + * special `timeInForce`: the final status result of the order (FILLED or EXPIRED) + * will be returned directly. - `selfTradePreventionMode` is only effective when + * `timeInForce` is set to `IOC`, `GTC`, or `GTD`. - In + * extreme market conditions, `timeInForce` `GTD` order auto-cancel time + * might be delayed compared to `goodTillDate`. * * @param newOrderRequest (required) * @return ApiResponse<NewOrderResponse> @@ -3814,8 +3841,8 @@ private okhttp3.Call newOrderValidateBeforeCall(NewOrderRequest newOrderRequest) * * * @see New - * Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#new-order">New + * Order (TRADE) Documentation */ public ApiResponse newOrder(@Valid @NotNull NewOrderRequest newOrderRequest) throws ApiException { @@ -3838,8 +3865,8 @@ public ApiResponse newOrder(@Valid @NotNull NewOrderRequest ne * * * @see Place - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#place-multiple-orders">Place + * Multiple Orders (TRADE) Documentation */ private okhttp3.Call placeMultipleOrdersCall( PlaceMultipleOrdersRequest placeMultipleOrdersRequest) throws ApiException { @@ -3940,11 +3967,12 @@ private okhttp3.Call placeMultipleOrdersValidateBeforeCall( } /** - * Place Multiple Orders(TRADE) Place Multiple Orders * Paremeter rules are same with `New - * Order` * Batch orders are processed concurrently, and the order of matching is not - * guaranteed. * The order of returned contents for batch orders is the same as the order of the - * order list. Weight: 5 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate - * limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate limit(x-mbx-used-weight-1m); + * Place Multiple Orders (TRADE) Place Multiple Orders Weight: 5 on 10s order rate + * limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate + * limit(x-mbx-used-weight-1m); Security Type: TRADE Notes: - Paremeter rules are same with + * `New Order` - Batch orders are processed concurrently, and the order of matching is + * not guaranteed. - The order of returned contents for batch orders is the same as the order of + * the order list. * * @param placeMultipleOrdersRequest (required) * @return ApiResponse<PlaceMultipleOrdersResponse> @@ -3958,8 +3986,8 @@ private okhttp3.Call placeMultipleOrdersValidateBeforeCall( * * * @see Place - * Multiple Orders(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#place-multiple-orders">Place + * Multiple Orders (TRADE) Documentation */ public ApiResponse placeMultipleOrders( @Valid @NotNull PlaceMultipleOrdersRequest placeMultipleOrdersRequest) @@ -3986,8 +4014,8 @@ public ApiResponse placeMultipleOrders( * * * @see Position - * ADL Quantile Estimation(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#position-adl-quantile-estimation">Position + * ADL Quantile Estimation (USER_DATA) Documentation */ private okhttp3.Call positionAdlQuantileEstimationCall(String symbol, Long recvWindow) throws ApiException { @@ -4087,7 +4115,7 @@ private okhttp3.Call positionAdlQuantileEstimationValidateBeforeCall( } /** - * Position ADL Quantile Estimation(USER_DATA) Position ADL Quantile Estimation * Values update + * Position ADL Quantile Estimation (USER_DATA) Position ADL Quantile Estimation * Values update * every 30s. * Values 0, 1, 2, 3, 4 shows the queue position and possibility of ADL from low to * high. * For positions of the symbol are in One-way Mode or isolated margined in Hedge Mode, * \"LONG\", \"SHORT\", and \"BOTH\" will be returned to show the @@ -4095,7 +4123,7 @@ private okhttp3.Call positionAdlQuantileEstimationValidateBeforeCall( * are crossed margined in Hedge Mode: * \"HEDGE\" as a sign will be returned instead * of \"BOTH\"; * A same value caculated on unrealized pnls on long and short * sides' positions will be shown for \"LONG\" and \"SHORT\" when there - * are positions in both of long and short sides. Weight: 5 + * are positions in both of long and short sides. Weight(IP): 5 Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -4110,11 +4138,11 @@ private okhttp3.Call positionAdlQuantileEstimationValidateBeforeCall( * * * @see Position - * ADL Quantile Estimation(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#position-adl-quantile-estimation">Position + * ADL Quantile Estimation (USER_DATA) Documentation */ public ApiResponse positionAdlQuantileEstimation( - String symbol, Long recvWindow) throws ApiException { + String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = positionAdlQuantileEstimationValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -4137,7 +4165,7 @@ public ApiResponse positionAdlQuantileEst * * * @see Position + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#position-information-v2">Position * Information V2 (USER_DATA) Documentation */ private okhttp3.Call positionInformationV2Call(String symbol, Long recvWindow) @@ -4237,8 +4265,9 @@ private okhttp3.Call positionInformationV2ValidateBeforeCall(String symbol, Long } /** - * Position Information V2 (USER_DATA) Get current position information. Please use with user - * data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 5 + * Position Information V2 (USER_DATA) Get current position information. Weight(IP): 5 Security + * Type: USER_DATA Notes: - Please use with user data stream `ACCOUNT_UPDATE` to meet + * your timeliness and accuracy needs. * * @param symbol (optional) * @param recvWindow (optional) @@ -4253,11 +4282,11 @@ private okhttp3.Call positionInformationV2ValidateBeforeCall(String symbol, Long * * * @see Position + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#position-information-v2">Position * Information V2 (USER_DATA) Documentation */ public ApiResponse positionInformationV2( - String symbol, Long recvWindow) throws ApiException { + String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = positionInformationV2ValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -4279,7 +4308,7 @@ public ApiResponse positionInformationV2( * * * @see Position + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#position-information-v3">Position * Information V3 (USER_DATA) Documentation */ private okhttp3.Call positionInformationV3Call(String symbol, Long recvWindow) @@ -4380,8 +4409,9 @@ private okhttp3.Call positionInformationV3ValidateBeforeCall(String symbol, Long /** * Position Information V3 (USER_DATA) Get current position information(only symbol that has - * position or open orders will be returned). Please use with user data stream - * `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 5 + * position or open orders will be returned). Weight(IP): 5 Security Type: USER_DATA Notes: - + * Please use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and + * accuracy needs. * * @param symbol (optional) * @param recvWindow (optional) @@ -4396,11 +4426,11 @@ private okhttp3.Call positionInformationV3ValidateBeforeCall(String symbol, Long * * * @see Position + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#position-information-v3">Position * Information V3 (USER_DATA) Documentation */ public ApiResponse positionInformationV3( - String symbol, Long recvWindow) throws ApiException { + String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = positionInformationV3ValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -4410,8 +4440,8 @@ public ApiResponse positionInformationV3( /** * Build call for queryAlgoOrder * - * @param algoId (optional) - * @param clientAlgoId (optional) + * @param algoId Order ID (optional) + * @param clientAlgoId Client order ID (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -4423,7 +4453,7 @@ public ApiResponse positionInformationV3( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#query-algo-order">Query * Algo Order (USER_DATA) Documentation */ private okhttp3.Call queryAlgoOrderCall(Long algoId, String clientAlgoId, Long recvWindow) @@ -4529,14 +4559,16 @@ private okhttp3.Call queryAlgoOrderValidateBeforeCall( } /** - * Query Algo Order (USER_DATA) Check an algo order's status. * These orders will not be - * found: * order status is `CANCELED` or `EXPIRED` **AND** order has NO + * Query Algo Order (USER_DATA) Check the status of an algo (conditional) order, such as TP/SL + * (Take Profit / Stop Loss) or trailing stop orders on USD-M Futures. * These orders will not + * be found: * order status is `CANCELED` or `EXPIRED` **AND** order has NO * filled trade **AND** created time + 3 days < current time * order create time + 90 days - * < current time * Either `algoId` or `clientAlgoId` must be sent. * - * `algoId` is self-increment for each specific `symbol` Weight: 1 + * < current time Weight(IP): 1 Security Type: USER_DATA Notes: - Either `algoId` + * or `clientAlgoId` must be sent. - `algoId` is self-increment for each + * specific `symbol` * - * @param algoId (optional) - * @param clientAlgoId (optional) + * @param algoId Order ID (optional) + * @param clientAlgoId Client order ID (optional) * @param recvWindow (optional) * @return ApiResponse<QueryAlgoOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -4549,7 +4581,7 @@ private okhttp3.Call queryAlgoOrderValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#query-algo-order">Query * Algo Order (USER_DATA) Documentation */ public ApiResponse queryAlgoOrder( @@ -4564,11 +4596,11 @@ public ApiResponse queryAlgoOrder( /** * Build call for queryAllAlgoOrders * - * @param symbol (required) + * @param symbol Symbol (required) * @param algoId (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -4580,7 +4612,7 @@ public ApiResponse queryAlgoOrder( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#query-all-algo-orders">Query * All Algo Orders (USER_DATA) Documentation */ private okhttp3.Call queryAllAlgoOrdersCall( @@ -4707,19 +4739,20 @@ private okhttp3.Call queryAllAlgoOrdersValidateBeforeCall( } /** - * Query All Algo Orders (USER_DATA) Get all algo orders; active, CANCELED, TRIGGERED or - * FINISHED . * These orders will not be found: * order status is `CANCELED` or + * Query All Algo Orders (USER_DATA) Get all algo (conditional) orders — active, CANCELED, + * TRIGGERED, or FINISHED — including TP/SL (Take Profit / Stop Loss) and trailing stop orders + * on USD-M Futures. * These orders will not be found: * order status is `CANCELED` or * `EXPIRED` **AND** order has NO filled trade **AND** created time + 3 days < - * current time * order create time + 90 days < current time * If `algoId` is set, - * it will get orders >= that `algoId`. Otherwise most recent orders are - * returned. * The query time period must be less then 7 days( default as the recent 7 days). - * Weight: 5 + * current time * order create time + 90 days < current time Weight(IP): 5 Security Type: + * USER_DATA Notes: - If `algoId` is set, it will get orders >= that + * `algoId`. Otherwise most recent orders are returned. - The query time period must + * be less then 7 days( default as the recent 7 days). * - * @param symbol (required) + * @param symbol Symbol (required) * @param algoId (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<QueryAllAlgoOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -4732,7 +4765,7 @@ private okhttp3.Call queryAllAlgoOrdersValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#query-all-algo-orders">Query * All Algo Orders (USER_DATA) Documentation */ public ApiResponse queryAllAlgoOrders( @@ -4740,7 +4773,7 @@ public ApiResponse queryAllAlgoOrders( Long algoId, Long startTime, Long endTime, - Long limit, + @Max(1000L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -4768,7 +4801,7 @@ public ApiResponse queryAllAlgoOrders( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#query-current-open-order">Query * Current Open Order (USER_DATA) Documentation */ private okhttp3.Call queryCurrentOpenOrderCall( @@ -4885,9 +4918,10 @@ private okhttp3.Call queryCurrentOpenOrderValidateBeforeCall( } /** - * Query Current Open Order (USER_DATA) Query open order * Either`orderId` or - * `origClientOrderId` must be sent * If the queried order has been filled or - * cancelled, the error message \"Order does not exist\" will be returned. Weight: 1 + * Query Current Open Order (USER_DATA) Query open order Weight(IP): 1 Security Type: USER_DATA + * Notes: - Either`orderId` or `origClientOrderId` must be sent - If the + * queried order has been filled or cancelled, the error message \"Order does not + * exist\" will be returned. * * @param symbol (required) * @param orderId (optional) @@ -4904,7 +4938,7 @@ private okhttp3.Call queryCurrentOpenOrderValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#query-current-open-order">Query * Current Open Order (USER_DATA) Documentation */ public ApiResponse queryCurrentOpenOrder( @@ -4935,7 +4969,7 @@ public ApiResponse queryCurrentOpenOrder( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#query-order">Query * Order (USER_DATA) Documentation */ private okhttp3.Call queryOrderCall( @@ -5055,8 +5089,9 @@ private okhttp3.Call queryOrderValidateBeforeCall( * Query Order (USER_DATA) Check an order's status. * These orders will not be found: * * order status is `CANCELED` or `EXPIRED` **AND** order has NO filled trade * **AND** created time + 3 days < current time * order create time + 90 days < current - * time * Either `orderId` or `origClientOrderId` must be sent. * - * `orderId` is self-increment for each specific `symbol` Weight: 1 + * time Weight(IP): 1 Security Type: USER_DATA Notes: - Either `orderId` or + * `origClientOrderId` must be sent. - `orderId` is self-increment for each + * specific `symbol` * * @param symbol (required) * @param orderId (optional) @@ -5073,7 +5108,7 @@ private okhttp3.Call queryOrderValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#query-order">Query * Order (USER_DATA) Documentation */ public ApiResponse queryOrder( @@ -5100,8 +5135,8 @@ public ApiResponse queryOrder( * * * @see Test - * Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#test-order">Test + * Order (TRADE) Documentation */ private okhttp3.Call testOrderCall(TestOrderRequest testOrderRequest) throws ApiException { String basePath = null; @@ -5144,8 +5179,8 @@ private okhttp3.Call testOrderCall(TestOrderRequest testOrderRequest) throws Api localVarFormParams.put("type", testOrderRequest.getType()); } - if (testOrderRequest.getTimeInForce() != null) { - localVarFormParams.put("timeInForce", testOrderRequest.getTimeInForce()); + if (testOrderRequest.getReduceOnly() != null) { + localVarFormParams.put("reduceOnly", testOrderRequest.getReduceOnly()); } if (testOrderRequest.getQuantity() != null) { @@ -5154,10 +5189,6 @@ private okhttp3.Call testOrderCall(TestOrderRequest testOrderRequest) throws Api DecimalFormatter.getFormatter().format(testOrderRequest.getQuantity())); } - if (testOrderRequest.getReduceOnly() != null) { - localVarFormParams.put("reduceOnly", testOrderRequest.getReduceOnly()); - } - if (testOrderRequest.getPrice() != null) { localVarFormParams.put( "price", DecimalFormatter.getFormatter().format(testOrderRequest.getPrice())); @@ -5189,6 +5220,10 @@ private okhttp3.Call testOrderCall(TestOrderRequest testOrderRequest) throws Api DecimalFormatter.getFormatter().format(testOrderRequest.getCallbackRate())); } + if (testOrderRequest.getTimeInForce() != null) { + localVarFormParams.put("timeInForce", testOrderRequest.getTimeInForce()); + } + if (testOrderRequest.getWorkingType() != null) { localVarFormParams.put("workingType", testOrderRequest.getWorkingType()); } @@ -5280,44 +5315,49 @@ private okhttp3.Call testOrderValidateBeforeCall(TestOrderRequest testOrderReque } /** - * Test Order(TRADE) Testing order request, this order will not be submitted to matching engine - * * Order with type `STOP`, parameter `timeInForce` can be sent ( default - * `GTC`). * Order with type `TAKE_PROFIT`, parameter - * `timeInForce` can be sent ( default `GTC`). * Condition orders will be - * triggered when: * If parameter`priceProtect`is sent as true: * when price reaches - * the `stopPrice` ,the difference rate between \"MARK_PRICE\" and + * Test Order (TRADE) Testing order request, this order will not be submitted to matching engine + * Security Type: TRADE Notes: Additional mandatory parameters based on `type`: | Type + * | Additional mandatory parameters | | -------------------------------- | + * ---------------------------------- | | `LIMIT` | `timeInForce`, + * `quantity`, `price` | | `MARKET` | `quantity` | | + * `STOP/TAKE_PROFIT` | `quantity`, `price`, `stopPrice` + * | | `STOP_MARKET/TAKE_PROFIT_MARKET` | `stopPrice` | | + * `TRAILING_STOP_MARKET` | `callbackRate` | - Order with type + * `STOP`, parameter `timeInForce` can be sent ( default `GTC`). - + * Order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent + * (default `GTC`). - Condition orders will be triggered when: - If + * parameter`priceProtect`is sent as true: - when price reaches the + * `stopPrice` ,the difference rate between \"MARK_PRICE\" and * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed `<= - * `activationPrice`, and the latest price >`= the lowest price * (1 + - * `callbackRate`) * SELL: the highest price after order placed >= - * `activationPrice`, and the latest price <= the highest price * (1 - - * `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. - * ``{\"code\": -2021, \"msg\": \"Order would immediately - * trigger.\"}`` means that the parameters you send do not meet the following - * requirements: * BUY: `activationPrice` should be smaller than latest price. * SELL: - * `activationPrice` should be larger than latest price. * If `newOrderRespType - * ` is sent as `RESULT` : * `MARKET` order: the final FILLED result of - * the order will be return directly. * `LIMIT` order with special + * symbol - \"triggerProtect\" of a symbol can be got from `GET + * /fapi/v1/exchangeInfo` - `STOP`, `STOP_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - + * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") - + * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - + * `TRAILING_STOP_MARKET`: - BUY: the lowest price after order placed + * ``= the lowest price * (1 + `callbackRate`) - SELL: the highest + * price after order placed >= `activationPrice`, and the latest price - For + * `TRAILING_STOP_MARKET`, if you got such error code. > `{\"code\": + * -2021, \"msg\": \"Order would immediately trigger.\"}` > means + * that the parameters you send do not meet the following requirements: - BUY: + * `activationPrice` should be smaller than latest price. - SELL: + * `activationPrice` should be larger than latest price. - If `newOrderRespType + * ` is sent as `RESULT` : - `MARKET` order: the final FILLED result of + * the order will be return directly. - `LIMIT` order with special * `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be - * returned directly. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` paremeter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with + * returned directly. - `STOP_MARKET`, `TAKE_PROFIT_MARKET` with + * `closePosition`=`true`: - Follow the same rules for condition + * orders. - If triggered,**close all** current long position( if `SELL`) or current + * short position( if `BUY`). - Cannot be used with `quantity` paremeter - + * Cannot be used with `reduceOnly` parameter - In Hedge Mode,cannot be used with * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * + * `SELL` orders in `SHORT` position side - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. * In extreme market conditions, + * `IOC` or `GTC` or `GTD`. - In extreme market conditions, * timeInForce `GTD` order auto cancel time might be delayed comparing to - * `goodTillDate` Weight: 0 + * `goodTillDate` * * @param testOrderRequest (required) * @return ApiResponse<TestOrderResponse> @@ -5331,8 +5371,8 @@ private okhttp3.Call testOrderValidateBeforeCall(TestOrderRequest testOrderReque * * * @see Test - * Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#test-order">Test + * Order (TRADE) Documentation */ public ApiResponse testOrder( @Valid @NotNull TestOrderRequest testOrderRequest) throws ApiException { @@ -5349,7 +5389,7 @@ public ApiResponse testOrder( * ADL orders. (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5361,7 +5401,7 @@ public ApiResponse testOrder( * * * @see User's + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#users-force-orders">User's * Force Orders (USER_DATA) Documentation */ private okhttp3.Call usersForceOrdersCall( @@ -5501,18 +5541,17 @@ private okhttp3.Call usersForceOrdersValidateBeforeCall( } /** - * User's Force Orders (USER_DATA) Query user's Force Orders * If - * \"autoCloseType\" is not sent, orders with both of the types will be returned * If - * \"startTime\" is not sent, data within 7 days before \"endTime\" can be - * queried * Only support querying data in the past 90 days Weight: 20 with symbol, 50 without - * symbol + * User's Force Orders (USER_DATA) Query user's Force Orders Weight: **20** with symbol, + * **50** without symbol Security Type: USER_DATA Notes: - If \"autoCloseType\" is not + * sent, orders with both of the types will be returned - If \"startTime\" is not + * sent, data within 7 days before \"endTime\" can be queried * * @param symbol (optional) * @param autoCloseType \"LIQUIDATION\" for liquidation orders, \"ADL\" for * ADL orders. (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default 100; max 1000 (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<UsersForceOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -5525,7 +5564,7 @@ private okhttp3.Call usersForceOrdersValidateBeforeCall( * * * @see User's + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#users-force-orders">User's * Force Orders (USER_DATA) Documentation */ public ApiResponse usersForceOrders( @@ -5533,7 +5572,7 @@ public ApiResponse usersForceOrders( AutoCloseType autoCloseType, Long startTime, Long endTime, - Long limit, + @Max(100L) Long limit, Long recvWindow) throws ApiException { okhttp3.Call localVarCall = diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/UserDataStreamsApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/UserDataStreamsApi.java index e01a1868f..8930d677f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/UserDataStreamsApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/UserDataStreamsApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -43,7 +43,7 @@ public class UserDataStreamsApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/11.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -93,7 +93,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Close + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/user-data-streams#close-user-data-stream">Close * User Data Stream (USER_STREAM) Documentation */ private okhttp3.Call closeUserDataStreamCall() throws ApiException { @@ -181,7 +181,8 @@ private okhttp3.Call closeUserDataStreamValidateBeforeCall() throws ApiException } /** - * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight: 1 + * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight(IP): 1 Security + * Type: USER_STREAM * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -194,7 +195,7 @@ private okhttp3.Call closeUserDataStreamValidateBeforeCall() throws ApiException * * * @see Close + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/user-data-streams#close-user-data-stream">Close * User Data Stream (USER_STREAM) Documentation */ public ApiResponse closeUserDataStream() throws ApiException { @@ -215,7 +216,7 @@ public ApiResponse closeUserDataStream() throws ApiException { * * * @see Keepalive + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/user-data-streams#keepalive-user-data-stream">Keepalive * User Data Stream (USER_STREAM) Documentation */ private okhttp3.Call keepaliveUserDataStreamCall() throws ApiException { @@ -305,7 +306,7 @@ private okhttp3.Call keepaliveUserDataStreamValidateBeforeCall() throws ApiExcep /** * Keepalive User Data Stream (USER_STREAM) Keepalive a user data stream to prevent a time out. * User data streams will close after 60 minutes. It's recommended to send a ping about - * every 60 minutes. Weight: 1 + * every 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * * @return ApiResponse<KeepaliveUserDataStreamResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -318,7 +319,7 @@ private okhttp3.Call keepaliveUserDataStreamValidateBeforeCall() throws ApiExcep * * * @see Keepalive + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/user-data-streams#keepalive-user-data-stream">Keepalive * User Data Stream (USER_STREAM) Documentation */ public ApiResponse keepaliveUserDataStream() @@ -342,7 +343,7 @@ public ApiResponse keepaliveUserDataStream() * * * @see Start + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/user-data-streams#start-user-data-stream">Start * User Data Stream (USER_STREAM) Documentation */ private okhttp3.Call startUserDataStreamCall() throws ApiException { @@ -433,7 +434,7 @@ private okhttp3.Call startUserDataStreamValidateBeforeCall() throws ApiException * Start User Data Stream (USER_STREAM) Start a new user data stream. The stream will close * after 60 minutes unless a keepalive is sent. If the account has an active * `listenKey`, that `listenKey` will be returned and its validity will be - * extended for 60 minutes. Weight: 1 + * extended for 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * * @return ApiResponse<StartUserDataStreamResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -446,7 +447,7 @@ private okhttp3.Call startUserDataStreamValidateBeforeCall() throws ApiException * * * @see Start + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/user-data-streams#start-user-data-stream">Start * User Data Stream (USER_STREAM) Documentation */ public ApiResponse startUserDataStream() throws ApiException { diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AcceptTheOfferedQuoteRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AcceptTheOfferedQuoteRequest.java index af0b88190..438564472 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AcceptTheOfferedQuoteRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AcceptTheOfferedQuoteRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AcceptTheOfferedQuoteRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AcceptTheOfferedQuoteRequest { public static final String SERIALIZED_NAME_QUOTE_ID = "quoteId"; @@ -76,11 +76,12 @@ public AcceptTheOfferedQuoteRequest recvWindow(@jakarta.annotation.Nullable Long } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AcceptTheOfferedQuoteResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AcceptTheOfferedQuoteResponse.java index 349e9b307..10d4cf4d2 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AcceptTheOfferedQuoteResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AcceptTheOfferedQuoteResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AcceptTheOfferedQuoteResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AcceptTheOfferedQuoteResponse { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV2Response.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV2Response.java index 567b2d674..3e837d47f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV2Response.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV2Response.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** AccountInformationV2Response */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationV2Response { public static final String SERIALIZED_NAME_FEE_TIER = "feeTier"; @@ -54,6 +54,12 @@ public class AccountInformationV2Response { @jakarta.annotation.Nullable private Boolean feeBurn; + public static final String SERIALIZED_NAME_CAN_TRADE = "canTrade"; + + @SerializedName(SERIALIZED_NAME_CAN_TRADE) + @jakarta.annotation.Nullable + private Boolean canTrade; + public static final String SERIALIZED_NAME_CAN_DEPOSIT = "canDeposit"; @SerializedName(SERIALIZED_NAME_CAN_DEPOSIT) @@ -165,12 +171,6 @@ public class AccountInformationV2Response { @jakarta.annotation.Nullable private List<@Valid AccountInformationV2ResponsePositionsInner> positions; - public static final String SERIALIZED_NAME_CAN_TRADE = "canTrade"; - - @SerializedName(SERIALIZED_NAME_CAN_TRADE) - @jakarta.annotation.Nullable - private Boolean canTrade; - public AccountInformationV2Response() {} public AccountInformationV2Response feeTier(@jakarta.annotation.Nullable Long feeTier) { @@ -179,7 +179,7 @@ public AccountInformationV2Response feeTier(@jakarta.annotation.Nullable Long fe } /** - * Get feeTier + * Account commission tier. * * @return feeTier */ @@ -198,7 +198,7 @@ public AccountInformationV2Response feeBurn(@jakarta.annotation.Nullable Boolean } /** - * Get feeBurn + * Whether fee discount is enabled. * * @return feeBurn */ @@ -211,6 +211,25 @@ public void setFeeBurn(@jakarta.annotation.Nullable Boolean feeBurn) { this.feeBurn = feeBurn; } + public AccountInformationV2Response canTrade(@jakarta.annotation.Nullable Boolean canTrade) { + this.canTrade = canTrade; + return this; + } + + /** + * Whether trading is enabled. + * + * @return canTrade + */ + @jakarta.annotation.Nullable + public Boolean getCanTrade() { + return canTrade; + } + + public void setCanTrade(@jakarta.annotation.Nullable Boolean canTrade) { + this.canTrade = canTrade; + } + public AccountInformationV2Response canDeposit( @jakarta.annotation.Nullable Boolean canDeposit) { this.canDeposit = canDeposit; @@ -218,7 +237,7 @@ public AccountInformationV2Response canDeposit( } /** - * Get canDeposit + * Whether transfer-in is enabled. * * @return canDeposit */ @@ -238,7 +257,7 @@ public AccountInformationV2Response canWithdraw( } /** - * Get canWithdraw + * Whether transfer-out is enabled. * * @return canWithdraw */ @@ -257,7 +276,7 @@ public AccountInformationV2Response updateTime(@jakarta.annotation.Nullable Long } /** - * Get updateTime + * Reserved field, ignore. * * @return updateTime */ @@ -277,7 +296,7 @@ public AccountInformationV2Response multiAssetsMargin( } /** - * Get multiAssetsMargin + * Whether multi-assets mode is enabled. * * @return multiAssetsMargin */ @@ -297,7 +316,7 @@ public AccountInformationV2Response tradeGroupId( } /** - * Get tradeGroupId + * Trade group identifier. * * @return tradeGroupId */ @@ -317,7 +336,7 @@ public AccountInformationV2Response totalInitialMargin( } /** - * Get totalInitialMargin + * Total initial margin requirement. * * @return totalInitialMargin */ @@ -337,7 +356,7 @@ public AccountInformationV2Response totalMaintMargin( } /** - * Get totalMaintMargin + * Total maintenance margin requirement. * * @return totalMaintMargin */ @@ -357,7 +376,7 @@ public AccountInformationV2Response totalWalletBalance( } /** - * Get totalWalletBalance + * Total wallet balance. * * @return totalWalletBalance */ @@ -377,7 +396,7 @@ public AccountInformationV2Response totalUnrealizedProfit( } /** - * Get totalUnrealizedProfit + * Total unrealized profit. * * @return totalUnrealizedProfit */ @@ -398,7 +417,7 @@ public AccountInformationV2Response totalMarginBalance( } /** - * Get totalMarginBalance + * Total margin balance. * * @return totalMarginBalance */ @@ -418,7 +437,7 @@ public AccountInformationV2Response totalPositionInitialMargin( } /** - * Get totalPositionInitialMargin + * Initial margin required for positions. * * @return totalPositionInitialMargin */ @@ -439,7 +458,7 @@ public AccountInformationV2Response totalOpenOrderInitialMargin( } /** - * Get totalOpenOrderInitialMargin + * Initial margin required for open orders. * * @return totalOpenOrderInitialMargin */ @@ -460,7 +479,7 @@ public AccountInformationV2Response totalCrossWalletBalance( } /** - * Get totalCrossWalletBalance + * Cross wallet balance. * * @return totalCrossWalletBalance */ @@ -481,7 +500,7 @@ public AccountInformationV2Response totalCrossUnPnl( } /** - * Get totalCrossUnPnl + * Unrealized PnL for cross positions. * * @return totalCrossUnPnl */ @@ -501,7 +520,7 @@ public AccountInformationV2Response availableBalance( } /** - * Get availableBalance + * Available balance. * * @return availableBalance */ @@ -521,7 +540,7 @@ public AccountInformationV2Response maxWithdrawAmount( } /** - * Get maxWithdrawAmount + * Maximum transferable/withdrawable amount. * * @return maxWithdrawAmount */ @@ -551,7 +570,7 @@ public AccountInformationV2Response addAssetsItem( } /** - * Get assets + * Asset-level account details. * * @return assets */ @@ -584,7 +603,7 @@ public AccountInformationV2Response addPositionsItem( } /** - * Get positions + * Position details for symbols. One-way mode returns BOTH; hedge mode returns LONG/SHORT. * * @return positions */ @@ -600,25 +619,6 @@ public void setPositions( this.positions = positions; } - public AccountInformationV2Response canTrade(@jakarta.annotation.Nullable Boolean canTrade) { - this.canTrade = canTrade; - return this; - } - - /** - * Get canTrade - * - * @return canTrade - */ - @jakarta.annotation.Nullable - public Boolean getCanTrade() { - return canTrade; - } - - public void setCanTrade(@jakarta.annotation.Nullable Boolean canTrade) { - this.canTrade = canTrade; - } - @Override public boolean equals(Object o) { if (this == o) { @@ -631,6 +631,7 @@ public boolean equals(Object o) { (AccountInformationV2Response) o; return Objects.equals(this.feeTier, accountInformationV2Response.feeTier) && Objects.equals(this.feeBurn, accountInformationV2Response.feeBurn) + && Objects.equals(this.canTrade, accountInformationV2Response.canTrade) && Objects.equals(this.canDeposit, accountInformationV2Response.canDeposit) && Objects.equals(this.canWithdraw, accountInformationV2Response.canWithdraw) && Objects.equals(this.updateTime, accountInformationV2Response.updateTime) @@ -664,8 +665,7 @@ public boolean equals(Object o) { && Objects.equals( this.maxWithdrawAmount, accountInformationV2Response.maxWithdrawAmount) && Objects.equals(this.assets, accountInformationV2Response.assets) - && Objects.equals(this.positions, accountInformationV2Response.positions) - && Objects.equals(this.canTrade, accountInformationV2Response.canTrade); + && Objects.equals(this.positions, accountInformationV2Response.positions); } @Override @@ -673,6 +673,7 @@ public int hashCode() { return Objects.hash( feeTier, feeBurn, + canTrade, canDeposit, canWithdraw, updateTime, @@ -690,8 +691,7 @@ public int hashCode() { availableBalance, maxWithdrawAmount, assets, - positions, - canTrade); + positions); } @Override @@ -700,6 +700,7 @@ public String toString() { sb.append("class AccountInformationV2Response {\n"); sb.append(" feeTier: ").append(toIndentedString(feeTier)).append("\n"); sb.append(" feeBurn: ").append(toIndentedString(feeBurn)).append("\n"); + sb.append(" canTrade: ").append(toIndentedString(canTrade)).append("\n"); sb.append(" canDeposit: ").append(toIndentedString(canDeposit)).append("\n"); sb.append(" canWithdraw: ").append(toIndentedString(canWithdraw)).append("\n"); sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); @@ -732,7 +733,6 @@ public String toString() { sb.append(" maxWithdrawAmount: ").append(toIndentedString(maxWithdrawAmount)).append("\n"); sb.append(" assets: ").append(toIndentedString(assets)).append("\n"); sb.append(" positions: ").append(toIndentedString(positions)).append("\n"); - sb.append(" canTrade: ").append(toIndentedString(canTrade)).append("\n"); sb.append("}"); return sb.toString(); } @@ -748,6 +748,10 @@ public String toUrlQueryString() { String feeBurnValueAsString = ""; feeBurnValueAsString = feeBurnValue.toString(); sb.append("feeBurn=").append(urlEncode(feeBurnValueAsString)).append(""); + Object canTradeValue = getCanTrade(); + String canTradeValueAsString = ""; + canTradeValueAsString = canTradeValue.toString(); + sb.append("canTrade=").append(urlEncode(canTradeValueAsString)).append(""); Object canDepositValue = getCanDeposit(); String canDepositValueAsString = ""; canDepositValueAsString = canDepositValue.toString(); @@ -844,10 +848,6 @@ public String toUrlQueryString() { ((Collection) positionsValue) .stream().map(Object::toString).collect(Collectors.joining(",")); sb.append("positions=").append(urlEncode(positionsValueAsString)).append(""); - Object canTradeValue = getCanTrade(); - String canTradeValueAsString = ""; - canTradeValueAsString = canTradeValue.toString(); - sb.append("canTrade=").append(urlEncode(canTradeValueAsString)).append(""); return sb.toString(); } @@ -878,6 +878,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("feeTier"); openapiFields.add("feeBurn"); + openapiFields.add("canTrade"); openapiFields.add("canDeposit"); openapiFields.add("canWithdraw"); openapiFields.add("updateTime"); @@ -896,7 +897,6 @@ private String toIndentedString(Object o) { openapiFields.add("maxWithdrawAmount"); openapiFields.add("assets"); openapiFields.add("positions"); - openapiFields.add("canTrade"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV2ResponseAssetsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV2ResponseAssetsInner.java index 46abda0d9..93418adba 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV2ResponseAssetsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV2ResponseAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountInformationV2ResponseAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationV2ResponseAssetsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -129,7 +129,7 @@ public AccountInformationV2ResponseAssetsInner asset( } /** - * Get asset + * Asset name. * * @return asset */ @@ -149,7 +149,7 @@ public AccountInformationV2ResponseAssetsInner walletBalance( } /** - * Get walletBalance + * Wallet balance. * * @return walletBalance */ @@ -169,7 +169,7 @@ public AccountInformationV2ResponseAssetsInner unrealizedProfit( } /** - * Get unrealizedProfit + * Unrealized profit. * * @return unrealizedProfit */ @@ -189,7 +189,7 @@ public AccountInformationV2ResponseAssetsInner marginBalance( } /** - * Get marginBalance + * Margin balance. * * @return marginBalance */ @@ -209,7 +209,7 @@ public AccountInformationV2ResponseAssetsInner maintMargin( } /** - * Get maintMargin + * Maintenance margin requirement. * * @return maintMargin */ @@ -229,7 +229,7 @@ public AccountInformationV2ResponseAssetsInner initialMargin( } /** - * Get initialMargin + * Total initial margin requirement. * * @return initialMargin */ @@ -249,7 +249,7 @@ public AccountInformationV2ResponseAssetsInner positionInitialMargin( } /** - * Get positionInitialMargin + * Initial margin required for positions. * * @return positionInitialMargin */ @@ -270,7 +270,7 @@ public AccountInformationV2ResponseAssetsInner openOrderInitialMargin( } /** - * Get openOrderInitialMargin + * Initial margin required for open orders. * * @return openOrderInitialMargin */ @@ -291,7 +291,7 @@ public AccountInformationV2ResponseAssetsInner crossWalletBalance( } /** - * Get crossWalletBalance + * Cross wallet balance. * * @return crossWalletBalance */ @@ -311,7 +311,7 @@ public AccountInformationV2ResponseAssetsInner crossUnPnl( } /** - * Get crossUnPnl + * Unrealized PnL for cross positions. * * @return crossUnPnl */ @@ -331,7 +331,7 @@ public AccountInformationV2ResponseAssetsInner availableBalance( } /** - * Get availableBalance + * Available balance. * * @return availableBalance */ @@ -351,7 +351,7 @@ public AccountInformationV2ResponseAssetsInner maxWithdrawAmount( } /** - * Get maxWithdrawAmount + * Maximum transferable/withdrawable amount. * * @return maxWithdrawAmount */ @@ -371,7 +371,7 @@ public AccountInformationV2ResponseAssetsInner marginAvailable( } /** - * Get marginAvailable + * Whether the asset can be used as margin in multi-assets mode. * * @return marginAvailable */ @@ -391,7 +391,7 @@ public AccountInformationV2ResponseAssetsInner updateTime( } /** - * Get updateTime + * Last update time in milliseconds. * * @return updateTime */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV2ResponsePositionsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV2ResponsePositionsInner.java index 249947128..0db2047bc 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV2ResponsePositionsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV2ResponsePositionsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** AccountInformationV2ResponsePositionsInner */ +/** positions of all symbols in the market are returned */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationV2ResponsePositionsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -135,7 +135,7 @@ public AccountInformationV2ResponsePositionsInner symbol( } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -155,7 +155,7 @@ public AccountInformationV2ResponsePositionsInner initialMargin( } /** - * Get initialMargin + * Initial margin requirement. * * @return initialMargin */ @@ -175,7 +175,7 @@ public AccountInformationV2ResponsePositionsInner maintMargin( } /** - * Get maintMargin + * Maintenance margin requirement. * * @return maintMargin */ @@ -195,7 +195,7 @@ public AccountInformationV2ResponsePositionsInner unrealizedProfit( } /** - * Get unrealizedProfit + * Unrealized profit. * * @return unrealizedProfit */ @@ -215,7 +215,7 @@ public AccountInformationV2ResponsePositionsInner positionInitialMargin( } /** - * Get positionInitialMargin + * Initial margin required for positions. * * @return positionInitialMargin */ @@ -236,7 +236,7 @@ public AccountInformationV2ResponsePositionsInner openOrderInitialMargin( } /** - * Get openOrderInitialMargin + * Initial margin required for open orders. * * @return openOrderInitialMargin */ @@ -257,7 +257,7 @@ public AccountInformationV2ResponsePositionsInner leverage( } /** - * Get leverage + * Current initial leverage. * * @return leverage */ @@ -277,7 +277,7 @@ public AccountInformationV2ResponsePositionsInner isolated( } /** - * Get isolated + * Whether the position uses isolated margin mode. * * @return isolated */ @@ -297,7 +297,7 @@ public AccountInformationV2ResponsePositionsInner entryPrice( } /** - * Get entryPrice + * Average entry price. * * @return entryPrice */ @@ -317,7 +317,7 @@ public AccountInformationV2ResponsePositionsInner maxNotional( } /** - * Get maxNotional + * Maximum available notional under current leverage. * * @return maxNotional */ @@ -337,7 +337,7 @@ public AccountInformationV2ResponsePositionsInner bidNotional( } /** - * Get bidNotional + * Bid notional (ignore). * * @return bidNotional */ @@ -357,7 +357,7 @@ public AccountInformationV2ResponsePositionsInner askNotional( } /** - * Get askNotional + * Ask notional (ignore). * * @return askNotional */ @@ -377,7 +377,7 @@ public AccountInformationV2ResponsePositionsInner positionSide( } /** - * Get positionSide + * Position side. * * @return positionSide */ @@ -397,7 +397,7 @@ public AccountInformationV2ResponsePositionsInner positionAmt( } /** - * Get positionAmt + * Position quantity. * * @return positionAmt */ @@ -417,7 +417,7 @@ public AccountInformationV2ResponsePositionsInner updateTime( } /** - * Get updateTime + * Last update time in milliseconds. * * @return updateTime */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV3Response.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV3Response.java index bd9a4e811..37d47b6c8 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV3Response.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV3Response.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** AccountInformationV3Response */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationV3Response { public static final String SERIALIZED_NAME_TOTAL_INITIAL_MARGIN = "totalInitialMargin"; @@ -132,7 +132,7 @@ public AccountInformationV3Response totalInitialMargin( } /** - * Get totalInitialMargin + * Total initial margin requirement. * * @return totalInitialMargin */ @@ -152,7 +152,7 @@ public AccountInformationV3Response totalMaintMargin( } /** - * Get totalMaintMargin + * Total maintenance margin requirement. * * @return totalMaintMargin */ @@ -172,7 +172,7 @@ public AccountInformationV3Response totalWalletBalance( } /** - * Get totalWalletBalance + * Total wallet balance. * * @return totalWalletBalance */ @@ -192,7 +192,7 @@ public AccountInformationV3Response totalUnrealizedProfit( } /** - * Get totalUnrealizedProfit + * Total unrealized profit. * * @return totalUnrealizedProfit */ @@ -213,7 +213,7 @@ public AccountInformationV3Response totalMarginBalance( } /** - * Get totalMarginBalance + * Total margin balance. * * @return totalMarginBalance */ @@ -233,7 +233,7 @@ public AccountInformationV3Response totalPositionInitialMargin( } /** - * Get totalPositionInitialMargin + * Initial margin required for positions. * * @return totalPositionInitialMargin */ @@ -254,7 +254,7 @@ public AccountInformationV3Response totalOpenOrderInitialMargin( } /** - * Get totalOpenOrderInitialMargin + * Initial margin required for open orders. * * @return totalOpenOrderInitialMargin */ @@ -275,7 +275,7 @@ public AccountInformationV3Response totalCrossWalletBalance( } /** - * Get totalCrossWalletBalance + * Cross wallet balance. * * @return totalCrossWalletBalance */ @@ -296,7 +296,7 @@ public AccountInformationV3Response totalCrossUnPnl( } /** - * Get totalCrossUnPnl + * Unrealized PnL for cross positions. * * @return totalCrossUnPnl */ @@ -316,7 +316,7 @@ public AccountInformationV3Response availableBalance( } /** - * Get availableBalance + * Available balance. * * @return availableBalance */ @@ -336,7 +336,7 @@ public AccountInformationV3Response maxWithdrawAmount( } /** - * Get maxWithdrawAmount + * Maximum transferable/withdrawable amount. * * @return maxWithdrawAmount */ @@ -366,7 +366,7 @@ public AccountInformationV3Response addAssetsItem( } /** - * Get assets + * Asset-level account details. * * @return assets */ @@ -399,7 +399,7 @@ public AccountInformationV3Response addPositionsItem( } /** - * Get positions + * Position details for symbols. * * @return positions */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV3ResponseAssetsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV3ResponseAssetsInner.java index 08c9ffc9f..61c92edb5 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV3ResponseAssetsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV3ResponseAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** AccountInformationV3ResponseAssetsInner */ +/** For assets that are quote assets, USDT/USDC/BTC */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationV3ResponseAssetsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -123,7 +123,7 @@ public AccountInformationV3ResponseAssetsInner asset( } /** - * Get asset + * Asset name. * * @return asset */ @@ -143,7 +143,7 @@ public AccountInformationV3ResponseAssetsInner walletBalance( } /** - * Get walletBalance + * Wallet balance. * * @return walletBalance */ @@ -163,7 +163,7 @@ public AccountInformationV3ResponseAssetsInner unrealizedProfit( } /** - * Get unrealizedProfit + * Unrealized profit. * * @return unrealizedProfit */ @@ -183,7 +183,7 @@ public AccountInformationV3ResponseAssetsInner marginBalance( } /** - * Get marginBalance + * Margin balance. * * @return marginBalance */ @@ -203,7 +203,7 @@ public AccountInformationV3ResponseAssetsInner maintMargin( } /** - * Get maintMargin + * Maintenance margin requirement. * * @return maintMargin */ @@ -223,7 +223,7 @@ public AccountInformationV3ResponseAssetsInner initialMargin( } /** - * Get initialMargin + * Total initial margin requirement. * * @return initialMargin */ @@ -243,7 +243,7 @@ public AccountInformationV3ResponseAssetsInner positionInitialMargin( } /** - * Get positionInitialMargin + * Initial margin required for positions. * * @return positionInitialMargin */ @@ -264,7 +264,7 @@ public AccountInformationV3ResponseAssetsInner openOrderInitialMargin( } /** - * Get openOrderInitialMargin + * Initial margin required for open orders. * * @return openOrderInitialMargin */ @@ -285,7 +285,7 @@ public AccountInformationV3ResponseAssetsInner crossWalletBalance( } /** - * Get crossWalletBalance + * Cross wallet balance. * * @return crossWalletBalance */ @@ -305,7 +305,7 @@ public AccountInformationV3ResponseAssetsInner crossUnPnl( } /** - * Get crossUnPnl + * Unrealized PnL for cross positions. * * @return crossUnPnl */ @@ -325,7 +325,7 @@ public AccountInformationV3ResponseAssetsInner availableBalance( } /** - * Get availableBalance + * Available balance. * * @return availableBalance */ @@ -345,7 +345,7 @@ public AccountInformationV3ResponseAssetsInner maxWithdrawAmount( } /** - * Get maxWithdrawAmount + * Maximum transferable/withdrawable amount. * * @return maxWithdrawAmount */ @@ -365,7 +365,7 @@ public AccountInformationV3ResponseAssetsInner updateTime( } /** - * Get updateTime + * Last update time in milliseconds. * * @return updateTime */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV3ResponsePositionsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV3ResponsePositionsInner.java index 706c86603..6b5191cea 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV3ResponsePositionsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountInformationV3ResponsePositionsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** AccountInformationV3ResponsePositionsInner */ +/** positions of all symbols user had position/ open orders are returned */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationV3ResponsePositionsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -105,7 +105,7 @@ public AccountInformationV3ResponsePositionsInner symbol( } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -125,7 +125,7 @@ public AccountInformationV3ResponsePositionsInner positionSide( } /** - * Get positionSide + * Position side. * * @return positionSide */ @@ -145,7 +145,7 @@ public AccountInformationV3ResponsePositionsInner positionAmt( } /** - * Get positionAmt + * Position quantity. * * @return positionAmt */ @@ -165,7 +165,7 @@ public AccountInformationV3ResponsePositionsInner unrealizedProfit( } /** - * Get unrealizedProfit + * Unrealized profit. * * @return unrealizedProfit */ @@ -185,7 +185,7 @@ public AccountInformationV3ResponsePositionsInner isolatedMargin( } /** - * Get isolatedMargin + * Isolated margin. * * @return isolatedMargin */ @@ -205,7 +205,7 @@ public AccountInformationV3ResponsePositionsInner notional( } /** - * Get notional + * Position notional value. * * @return notional */ @@ -225,7 +225,7 @@ public AccountInformationV3ResponsePositionsInner isolatedWallet( } /** - * Get isolatedWallet + * Isolated wallet balance. * * @return isolatedWallet */ @@ -245,7 +245,7 @@ public AccountInformationV3ResponsePositionsInner initialMargin( } /** - * Get initialMargin + * Initial margin requirement. * * @return initialMargin */ @@ -265,7 +265,7 @@ public AccountInformationV3ResponsePositionsInner maintMargin( } /** - * Get maintMargin + * Maintenance margin requirement. * * @return maintMargin */ @@ -285,7 +285,7 @@ public AccountInformationV3ResponsePositionsInner updateTime( } /** - * Get updateTime + * Last update time in milliseconds. * * @return updateTime */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountTradeListResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountTradeListResponse.java index c31a95b8a..6fd22da6e 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountTradeListResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountTradeListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountTradeListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountTradeListResponse extends ArrayList { public AccountTradeListResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountTradeListResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountTradeListResponseInner.java index 5a5e198a3..06e3632ad 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountTradeListResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AccountTradeListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountTradeListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountTradeListResponseInner { public static final String SERIALIZED_NAME_BUYER = "buyer"; @@ -128,7 +128,7 @@ public AccountTradeListResponseInner buyer(@jakarta.annotation.Nullable Boolean } /** - * Get buyer + * Buyer. * * @return buyer */ @@ -148,7 +148,7 @@ public AccountTradeListResponseInner commission( } /** - * Get commission + * Commission. * * @return commission */ @@ -168,7 +168,7 @@ public AccountTradeListResponseInner commissionAsset( } /** - * Get commissionAsset + * Commission Asset. * * @return commissionAsset */ @@ -187,7 +187,7 @@ public AccountTradeListResponseInner id(@jakarta.annotation.Nullable Long id) { } /** - * Get id + * Id. * * @return id */ @@ -206,7 +206,7 @@ public AccountTradeListResponseInner maker(@jakarta.annotation.Nullable Boolean } /** - * Get maker + * Maker. * * @return maker */ @@ -225,7 +225,7 @@ public AccountTradeListResponseInner orderId(@jakarta.annotation.Nullable Long o } /** - * Get orderId + * Order Id. * * @return orderId */ @@ -244,7 +244,7 @@ public AccountTradeListResponseInner price(@jakarta.annotation.Nullable String p } /** - * Get price + * Price. * * @return price */ @@ -263,7 +263,7 @@ public AccountTradeListResponseInner qty(@jakarta.annotation.Nullable String qty } /** - * Get qty + * Qty. * * @return qty */ @@ -282,7 +282,7 @@ public AccountTradeListResponseInner quoteQty(@jakarta.annotation.Nullable Strin } /** - * Get quoteQty + * Quote Qty. * * @return quoteQty */ @@ -302,7 +302,7 @@ public AccountTradeListResponseInner realizedPnl( } /** - * Get realizedPnl + * Realized Pnl. * * @return realizedPnl */ @@ -321,7 +321,7 @@ public AccountTradeListResponseInner side(@jakarta.annotation.Nullable String si } /** - * Get side + * Side. * * @return side */ @@ -341,7 +341,7 @@ public AccountTradeListResponseInner positionSide( } /** - * Get positionSide + * Position Side. * * @return positionSide */ @@ -360,7 +360,7 @@ public AccountTradeListResponseInner symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -379,7 +379,7 @@ public AccountTradeListResponseInner time(@jakarta.annotation.Nullable Long time } /** - * Get time + * Time. * * @return time */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AdlRiskResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AdlRiskResponse.java index 8417afa2e..8c1ff1b0b 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AdlRiskResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AdlRiskResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AdlRiskResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(AdlRiskResponse.class.getName()); diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AdlRiskResponse1.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AdlRiskResponse1.java index b0e156f0b..18408a93d 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AdlRiskResponse1.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AdlRiskResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AdlRiskResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AdlRiskResponse1 { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -81,7 +81,7 @@ public AdlRiskResponse1 adlRisk(@jakarta.annotation.Nullable String adlRisk) { } /** - * Get adlRisk + * ADL Risk rating * * @return adlRisk */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AdlRiskResponse2.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AdlRiskResponse2.java index 644689cf5..59bf5ee4b 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AdlRiskResponse2.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AdlRiskResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AdlRiskResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AdlRiskResponse2 extends ArrayList { public AdlRiskResponse2() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AdlRiskResponse2Inner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AdlRiskResponse2Inner.java index 550b0ed34..208aed99c 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AdlRiskResponse2Inner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AdlRiskResponse2Inner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AdlRiskResponse2Inner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AdlRiskResponse2Inner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -81,7 +81,7 @@ public AdlRiskResponse2Inner adlRisk(@jakarta.annotation.Nullable String adlRisk } /** - * Get adlRisk + * ADL Risk rating * * @return adlRisk */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AlgoType.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AlgoType.java new file mode 100644 index 000000000..97c761c79 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AlgoType.java @@ -0,0 +1,71 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets algoType */ +@JsonAdapter(AlgoType.Adapter.class) +public enum AlgoType { + CONDITIONAL("CONDITIONAL"); + + private String value; + + AlgoType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AlgoType fromValue(String value) { + for (AlgoType b : AlgoType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AlgoType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AlgoType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AlgoType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AlgoType.fromValue(value); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AllOrdersResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AllOrdersResponse.java index 83c9debce..91e243197 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AllOrdersResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AllOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AllOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllOrdersResponse extends ArrayList { public AllOrdersResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AllOrdersResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AllOrdersResponseInner.java index 9609b9d77..0c352c42e 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AllOrdersResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AllOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AllOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllOrdersResponseInner { public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; @@ -201,7 +201,7 @@ public AllOrdersResponseInner avgPrice(@jakarta.annotation.Nullable String avgPr } /** - * Get avgPrice + * Avg Price. * * @return avgPrice */ @@ -220,7 +220,7 @@ public AllOrdersResponseInner clientOrderId(@jakarta.annotation.Nullable String } /** - * Get clientOrderId + * Client Order Id. * * @return clientOrderId */ @@ -239,7 +239,7 @@ public AllOrdersResponseInner cumQuote(@jakarta.annotation.Nullable String cumQu } /** - * Get cumQuote + * Cum Quote. * * @return cumQuote */ @@ -258,7 +258,7 @@ public AllOrdersResponseInner executedQty(@jakarta.annotation.Nullable String ex } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -277,7 +277,7 @@ public AllOrdersResponseInner orderId(@jakarta.annotation.Nullable Long orderId) } /** - * Get orderId + * Order Id. * * @return orderId */ @@ -296,7 +296,7 @@ public AllOrdersResponseInner origQty(@jakarta.annotation.Nullable String origQt } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -315,7 +315,7 @@ public AllOrdersResponseInner origType(@jakarta.annotation.Nullable String origT } /** - * Get origType + * Orig Type. * * @return origType */ @@ -334,7 +334,7 @@ public AllOrdersResponseInner price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Price. * * @return price */ @@ -353,7 +353,7 @@ public AllOrdersResponseInner reduceOnly(@jakarta.annotation.Nullable Boolean re } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -372,7 +372,7 @@ public AllOrdersResponseInner side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Side. * * @return side */ @@ -391,7 +391,7 @@ public AllOrdersResponseInner positionSide(@jakarta.annotation.Nullable String p } /** - * Get positionSide + * Position Side. * * @return positionSide */ @@ -410,7 +410,7 @@ public AllOrdersResponseInner status(@jakarta.annotation.Nullable String status) } /** - * Get status + * Status. * * @return status */ @@ -429,7 +429,7 @@ public AllOrdersResponseInner stopPrice(@jakarta.annotation.Nullable String stop } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -449,7 +449,7 @@ public AllOrdersResponseInner closePosition( } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -468,7 +468,7 @@ public AllOrdersResponseInner symbol(@jakarta.annotation.Nullable String symbol) } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -487,7 +487,7 @@ public AllOrdersResponseInner time(@jakarta.annotation.Nullable Long time) { } /** - * Get time + * order time * * @return time */ @@ -506,7 +506,7 @@ public AllOrdersResponseInner timeInForce(@jakarta.annotation.Nullable String ti } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -525,7 +525,7 @@ public AllOrdersResponseInner type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Type. * * @return type */ @@ -544,7 +544,7 @@ public AllOrdersResponseInner activatePrice(@jakarta.annotation.Nullable String } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -563,7 +563,7 @@ public AllOrdersResponseInner priceRate(@jakarta.annotation.Nullable String pric } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -582,7 +582,7 @@ public AllOrdersResponseInner updateTime(@jakarta.annotation.Nullable Long updat } /** - * Get updateTime + * update time * * @return updateTime */ @@ -601,7 +601,7 @@ public AllOrdersResponseInner workingType(@jakarta.annotation.Nullable String wo } /** - * Get workingType + * Working Type. * * @return workingType */ @@ -620,7 +620,7 @@ public AllOrdersResponseInner priceProtect(@jakarta.annotation.Nullable Boolean } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -639,7 +639,7 @@ public AllOrdersResponseInner priceMatch(@jakarta.annotation.Nullable String pri } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -659,7 +659,7 @@ public AllOrdersResponseInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -679,7 +679,7 @@ public AllOrdersResponseInner goodTillDate(@jakarta.annotation.Nullable Long goo } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AssetIndexResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AssetIndexResponse.java new file mode 100644 index 000000000..ca376df0a --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AssetIndexResponse.java @@ -0,0 +1,292 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.common.AbstractOpenApiSchema; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.hibernate.validator.constraints.*; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AssetIndexResponse extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(AssetIndexResponse.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AssetIndexResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AssetIndexResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterAssetIndexResponse1 = + gson.getDelegateAdapter(this, TypeToken.get(AssetIndexResponse1.class)); + final TypeAdapter adapterAssetIndexResponse2 = + gson.getDelegateAdapter(this, TypeToken.get(AssetIndexResponse2.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AssetIndexResponse value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `AssetIndexResponse1` + if (value.getActualInstance() instanceof AssetIndexResponse1) { + JsonElement element = + adapterAssetIndexResponse1.toJsonTree( + (AssetIndexResponse1) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `AssetIndexResponse2` + if (value.getActualInstance() instanceof AssetIndexResponse2) { + JsonElement element = + adapterAssetIndexResponse2.toJsonTree( + (AssetIndexResponse2) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " AssetIndexResponse1, AssetIndexResponse2"); + } + + @Override + public AssetIndexResponse read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize AssetIndexResponse1 + try { + // validate the JSON object to see if any exception is thrown + AssetIndexResponse1.validateJsonElement(jsonElement); + actualAdapter = adapterAssetIndexResponse1; + match++; + log.log( + Level.FINER, + "Input data matches schema 'AssetIndexResponse1'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for AssetIndexResponse1 failed" + + " with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'AssetIndexResponse1'", + e); + } + // deserialize AssetIndexResponse2 + try { + // validate the JSON object to see if any exception is thrown + AssetIndexResponse2.validateJsonElement(jsonElement); + actualAdapter = adapterAssetIndexResponse2; + match++; + log.log( + Level.FINER, + "Input data matches schema 'AssetIndexResponse2'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for AssetIndexResponse2 failed" + + " with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'AssetIndexResponse2'", + e); + } + + if (match == 1) { + AssetIndexResponse ret = new AssetIndexResponse(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for AssetIndexResponse: %d" + + " classes match result, expected 1. Detailed" + + " failure message for oneOf schemas: %s. JSON:" + + " %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public AssetIndexResponse() { + super("oneOf", Boolean.FALSE); + } + + public AssetIndexResponse(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AssetIndexResponse1", AssetIndexResponse1.class); + schemas.put("AssetIndexResponse2", AssetIndexResponse2.class); + } + + @Override + public Map> getSchemas() { + return AssetIndexResponse.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: AssetIndexResponse1, AssetIndexResponse2 + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof AssetIndexResponse1) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof AssetIndexResponse2) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be AssetIndexResponse1, AssetIndexResponse2"); + } + + /** + * Get the actual instance, which can be the following: AssetIndexResponse1, AssetIndexResponse2 + * + * @return The actual instance (AssetIndexResponse1, AssetIndexResponse2) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AssetIndexResponse1`. If the actual instance is not + * `AssetIndexResponse1`, the ClassCastException will be thrown. + * + * @return The actual instance of `AssetIndexResponse1` + * @throws ClassCastException if the instance is not `AssetIndexResponse1` + */ + public AssetIndexResponse1 getAssetIndexResponse1() throws ClassCastException { + return (AssetIndexResponse1) super.getActualInstance(); + } + + /** + * Get the actual instance of `AssetIndexResponse2`. If the actual instance is not + * `AssetIndexResponse2`, the ClassCastException will be thrown. + * + * @return The actual instance of `AssetIndexResponse2` + * @throws ClassCastException if the instance is not `AssetIndexResponse2` + */ + public AssetIndexResponse2 getAssetIndexResponse2() throws ClassCastException { + return (AssetIndexResponse2) super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AssetIndexResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with AssetIndexResponse1 + try { + AssetIndexResponse1.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for AssetIndexResponse1 failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with AssetIndexResponse2 + try { + AssetIndexResponse2.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for AssetIndexResponse2 failed with `%s`.", + e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for AssetIndexResponse with oneOf schemas:" + + " AssetIndexResponse1, AssetIndexResponse2. %d class(es) match" + + " the result, expected 1. Detailed failure message for oneOf" + + " schemas: %s. JSON: %s", + validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of AssetIndexResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssetIndexResponse + * @throws IOException if the JSON string is invalid with respect to AssetIndexResponse + */ + public static AssetIndexResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AssetIndexResponse.class); + } + + /** + * Convert an instance of AssetIndexResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AssetIndexResponse1.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AssetIndexResponse1.java new file mode 100644 index 000000000..84bf8b492 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AssetIndexResponse1.java @@ -0,0 +1,642 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** AssetIndexResponse1 */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AssetIndexResponse1 { + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_TIME = "time"; + + @SerializedName(SERIALIZED_NAME_TIME) + @jakarta.annotation.Nullable + private Long time; + + public static final String SERIALIZED_NAME_INDEX = "index"; + + @SerializedName(SERIALIZED_NAME_INDEX) + @jakarta.annotation.Nullable + private String index; + + public static final String SERIALIZED_NAME_BID_BUFFER = "bidBuffer"; + + @SerializedName(SERIALIZED_NAME_BID_BUFFER) + @jakarta.annotation.Nullable + private String bidBuffer; + + public static final String SERIALIZED_NAME_ASK_BUFFER = "askBuffer"; + + @SerializedName(SERIALIZED_NAME_ASK_BUFFER) + @jakarta.annotation.Nullable + private String askBuffer; + + public static final String SERIALIZED_NAME_BID_RATE = "bidRate"; + + @SerializedName(SERIALIZED_NAME_BID_RATE) + @jakarta.annotation.Nullable + private String bidRate; + + public static final String SERIALIZED_NAME_ASK_RATE = "askRate"; + + @SerializedName(SERIALIZED_NAME_ASK_RATE) + @jakarta.annotation.Nullable + private String askRate; + + public static final String SERIALIZED_NAME_AUTO_EXCHANGE_BID_BUFFER = "autoExchangeBidBuffer"; + + @SerializedName(SERIALIZED_NAME_AUTO_EXCHANGE_BID_BUFFER) + @jakarta.annotation.Nullable + private String autoExchangeBidBuffer; + + public static final String SERIALIZED_NAME_AUTO_EXCHANGE_ASK_BUFFER = "autoExchangeAskBuffer"; + + @SerializedName(SERIALIZED_NAME_AUTO_EXCHANGE_ASK_BUFFER) + @jakarta.annotation.Nullable + private String autoExchangeAskBuffer; + + public static final String SERIALIZED_NAME_AUTO_EXCHANGE_BID_RATE = "autoExchangeBidRate"; + + @SerializedName(SERIALIZED_NAME_AUTO_EXCHANGE_BID_RATE) + @jakarta.annotation.Nullable + private String autoExchangeBidRate; + + public static final String SERIALIZED_NAME_AUTO_EXCHANGE_ASK_RATE = "autoExchangeAskRate"; + + @SerializedName(SERIALIZED_NAME_AUTO_EXCHANGE_ASK_RATE) + @jakarta.annotation.Nullable + private String autoExchangeAskRate; + + public AssetIndexResponse1() {} + + public AssetIndexResponse1 symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Get symbol + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public AssetIndexResponse1 time(@jakarta.annotation.Nullable Long time) { + this.time = time; + return this; + } + + /** + * Get time + * + * @return time + */ + @jakarta.annotation.Nullable + public Long getTime() { + return time; + } + + public void setTime(@jakarta.annotation.Nullable Long time) { + this.time = time; + } + + public AssetIndexResponse1 index(@jakarta.annotation.Nullable String index) { + this.index = index; + return this; + } + + /** + * Get index + * + * @return index + */ + @jakarta.annotation.Nullable + public String getIndex() { + return index; + } + + public void setIndex(@jakarta.annotation.Nullable String index) { + this.index = index; + } + + public AssetIndexResponse1 bidBuffer(@jakarta.annotation.Nullable String bidBuffer) { + this.bidBuffer = bidBuffer; + return this; + } + + /** + * Get bidBuffer + * + * @return bidBuffer + */ + @jakarta.annotation.Nullable + public String getBidBuffer() { + return bidBuffer; + } + + public void setBidBuffer(@jakarta.annotation.Nullable String bidBuffer) { + this.bidBuffer = bidBuffer; + } + + public AssetIndexResponse1 askBuffer(@jakarta.annotation.Nullable String askBuffer) { + this.askBuffer = askBuffer; + return this; + } + + /** + * Get askBuffer + * + * @return askBuffer + */ + @jakarta.annotation.Nullable + public String getAskBuffer() { + return askBuffer; + } + + public void setAskBuffer(@jakarta.annotation.Nullable String askBuffer) { + this.askBuffer = askBuffer; + } + + public AssetIndexResponse1 bidRate(@jakarta.annotation.Nullable String bidRate) { + this.bidRate = bidRate; + return this; + } + + /** + * Get bidRate + * + * @return bidRate + */ + @jakarta.annotation.Nullable + public String getBidRate() { + return bidRate; + } + + public void setBidRate(@jakarta.annotation.Nullable String bidRate) { + this.bidRate = bidRate; + } + + public AssetIndexResponse1 askRate(@jakarta.annotation.Nullable String askRate) { + this.askRate = askRate; + return this; + } + + /** + * Get askRate + * + * @return askRate + */ + @jakarta.annotation.Nullable + public String getAskRate() { + return askRate; + } + + public void setAskRate(@jakarta.annotation.Nullable String askRate) { + this.askRate = askRate; + } + + public AssetIndexResponse1 autoExchangeBidBuffer( + @jakarta.annotation.Nullable String autoExchangeBidBuffer) { + this.autoExchangeBidBuffer = autoExchangeBidBuffer; + return this; + } + + /** + * Get autoExchangeBidBuffer + * + * @return autoExchangeBidBuffer + */ + @jakarta.annotation.Nullable + public String getAutoExchangeBidBuffer() { + return autoExchangeBidBuffer; + } + + public void setAutoExchangeBidBuffer( + @jakarta.annotation.Nullable String autoExchangeBidBuffer) { + this.autoExchangeBidBuffer = autoExchangeBidBuffer; + } + + public AssetIndexResponse1 autoExchangeAskBuffer( + @jakarta.annotation.Nullable String autoExchangeAskBuffer) { + this.autoExchangeAskBuffer = autoExchangeAskBuffer; + return this; + } + + /** + * Get autoExchangeAskBuffer + * + * @return autoExchangeAskBuffer + */ + @jakarta.annotation.Nullable + public String getAutoExchangeAskBuffer() { + return autoExchangeAskBuffer; + } + + public void setAutoExchangeAskBuffer( + @jakarta.annotation.Nullable String autoExchangeAskBuffer) { + this.autoExchangeAskBuffer = autoExchangeAskBuffer; + } + + public AssetIndexResponse1 autoExchangeBidRate( + @jakarta.annotation.Nullable String autoExchangeBidRate) { + this.autoExchangeBidRate = autoExchangeBidRate; + return this; + } + + /** + * Get autoExchangeBidRate + * + * @return autoExchangeBidRate + */ + @jakarta.annotation.Nullable + public String getAutoExchangeBidRate() { + return autoExchangeBidRate; + } + + public void setAutoExchangeBidRate(@jakarta.annotation.Nullable String autoExchangeBidRate) { + this.autoExchangeBidRate = autoExchangeBidRate; + } + + public AssetIndexResponse1 autoExchangeAskRate( + @jakarta.annotation.Nullable String autoExchangeAskRate) { + this.autoExchangeAskRate = autoExchangeAskRate; + return this; + } + + /** + * Get autoExchangeAskRate + * + * @return autoExchangeAskRate + */ + @jakarta.annotation.Nullable + public String getAutoExchangeAskRate() { + return autoExchangeAskRate; + } + + public void setAutoExchangeAskRate(@jakarta.annotation.Nullable String autoExchangeAskRate) { + this.autoExchangeAskRate = autoExchangeAskRate; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetIndexResponse1 assetIndexResponse1 = (AssetIndexResponse1) o; + return Objects.equals(this.symbol, assetIndexResponse1.symbol) + && Objects.equals(this.time, assetIndexResponse1.time) + && Objects.equals(this.index, assetIndexResponse1.index) + && Objects.equals(this.bidBuffer, assetIndexResponse1.bidBuffer) + && Objects.equals(this.askBuffer, assetIndexResponse1.askBuffer) + && Objects.equals(this.bidRate, assetIndexResponse1.bidRate) + && Objects.equals(this.askRate, assetIndexResponse1.askRate) + && Objects.equals( + this.autoExchangeBidBuffer, assetIndexResponse1.autoExchangeBidBuffer) + && Objects.equals( + this.autoExchangeAskBuffer, assetIndexResponse1.autoExchangeAskBuffer) + && Objects.equals(this.autoExchangeBidRate, assetIndexResponse1.autoExchangeBidRate) + && Objects.equals( + this.autoExchangeAskRate, assetIndexResponse1.autoExchangeAskRate); + } + + @Override + public int hashCode() { + return Objects.hash( + symbol, + time, + index, + bidBuffer, + askBuffer, + bidRate, + askRate, + autoExchangeBidBuffer, + autoExchangeAskBuffer, + autoExchangeBidRate, + autoExchangeAskRate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetIndexResponse1 {\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append(" index: ").append(toIndentedString(index)).append("\n"); + sb.append(" bidBuffer: ").append(toIndentedString(bidBuffer)).append("\n"); + sb.append(" askBuffer: ").append(toIndentedString(askBuffer)).append("\n"); + sb.append(" bidRate: ").append(toIndentedString(bidRate)).append("\n"); + sb.append(" askRate: ").append(toIndentedString(askRate)).append("\n"); + sb.append(" autoExchangeBidBuffer: ") + .append(toIndentedString(autoExchangeBidBuffer)) + .append("\n"); + sb.append(" autoExchangeAskBuffer: ") + .append(toIndentedString(autoExchangeAskBuffer)) + .append("\n"); + sb.append(" autoExchangeBidRate: ") + .append(toIndentedString(autoExchangeBidRate)) + .append("\n"); + sb.append(" autoExchangeAskRate: ") + .append(toIndentedString(autoExchangeAskRate)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object symbolValue = getSymbol(); + String symbolValueAsString = ""; + symbolValueAsString = symbolValue.toString(); + sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); + Object timeValue = getTime(); + String timeValueAsString = ""; + timeValueAsString = timeValue.toString(); + sb.append("time=").append(urlEncode(timeValueAsString)).append(""); + Object indexValue = getIndex(); + String indexValueAsString = ""; + indexValueAsString = indexValue.toString(); + sb.append("index=").append(urlEncode(indexValueAsString)).append(""); + Object bidBufferValue = getBidBuffer(); + String bidBufferValueAsString = ""; + bidBufferValueAsString = bidBufferValue.toString(); + sb.append("bidBuffer=").append(urlEncode(bidBufferValueAsString)).append(""); + Object askBufferValue = getAskBuffer(); + String askBufferValueAsString = ""; + askBufferValueAsString = askBufferValue.toString(); + sb.append("askBuffer=").append(urlEncode(askBufferValueAsString)).append(""); + Object bidRateValue = getBidRate(); + String bidRateValueAsString = ""; + bidRateValueAsString = bidRateValue.toString(); + sb.append("bidRate=").append(urlEncode(bidRateValueAsString)).append(""); + Object askRateValue = getAskRate(); + String askRateValueAsString = ""; + askRateValueAsString = askRateValue.toString(); + sb.append("askRate=").append(urlEncode(askRateValueAsString)).append(""); + Object autoExchangeBidBufferValue = getAutoExchangeBidBuffer(); + String autoExchangeBidBufferValueAsString = ""; + autoExchangeBidBufferValueAsString = autoExchangeBidBufferValue.toString(); + sb.append("autoExchangeBidBuffer=") + .append(urlEncode(autoExchangeBidBufferValueAsString)) + .append(""); + Object autoExchangeAskBufferValue = getAutoExchangeAskBuffer(); + String autoExchangeAskBufferValueAsString = ""; + autoExchangeAskBufferValueAsString = autoExchangeAskBufferValue.toString(); + sb.append("autoExchangeAskBuffer=") + .append(urlEncode(autoExchangeAskBufferValueAsString)) + .append(""); + Object autoExchangeBidRateValue = getAutoExchangeBidRate(); + String autoExchangeBidRateValueAsString = ""; + autoExchangeBidRateValueAsString = autoExchangeBidRateValue.toString(); + sb.append("autoExchangeBidRate=") + .append(urlEncode(autoExchangeBidRateValueAsString)) + .append(""); + Object autoExchangeAskRateValue = getAutoExchangeAskRate(); + String autoExchangeAskRateValueAsString = ""; + autoExchangeAskRateValueAsString = autoExchangeAskRateValue.toString(); + sb.append("autoExchangeAskRate=") + .append(urlEncode(autoExchangeAskRateValueAsString)) + .append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("symbol"); + openapiFields.add("time"); + openapiFields.add("index"); + openapiFields.add("bidBuffer"); + openapiFields.add("askBuffer"); + openapiFields.add("bidRate"); + openapiFields.add("askRate"); + openapiFields.add("autoExchangeBidBuffer"); + openapiFields.add("autoExchangeAskBuffer"); + openapiFields.add("autoExchangeBidRate"); + openapiFields.add("autoExchangeAskRate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AssetIndexResponse1 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AssetIndexResponse1.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AssetIndexResponse1 is not found in" + + " the empty JSON string", + AssetIndexResponse1.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + if ((jsonObj.get("index") != null && !jsonObj.get("index").isJsonNull()) + && !jsonObj.get("index").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `index` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("index").toString())); + } + if ((jsonObj.get("bidBuffer") != null && !jsonObj.get("bidBuffer").isJsonNull()) + && !jsonObj.get("bidBuffer").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `bidBuffer` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("bidBuffer").toString())); + } + if ((jsonObj.get("askBuffer") != null && !jsonObj.get("askBuffer").isJsonNull()) + && !jsonObj.get("askBuffer").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `askBuffer` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("askBuffer").toString())); + } + if ((jsonObj.get("bidRate") != null && !jsonObj.get("bidRate").isJsonNull()) + && !jsonObj.get("bidRate").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `bidRate` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("bidRate").toString())); + } + if ((jsonObj.get("askRate") != null && !jsonObj.get("askRate").isJsonNull()) + && !jsonObj.get("askRate").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `askRate` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("askRate").toString())); + } + if ((jsonObj.get("autoExchangeBidBuffer") != null + && !jsonObj.get("autoExchangeBidBuffer").isJsonNull()) + && !jsonObj.get("autoExchangeBidBuffer").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `autoExchangeBidBuffer` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("autoExchangeBidBuffer").toString())); + } + if ((jsonObj.get("autoExchangeAskBuffer") != null + && !jsonObj.get("autoExchangeAskBuffer").isJsonNull()) + && !jsonObj.get("autoExchangeAskBuffer").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `autoExchangeAskBuffer` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("autoExchangeAskBuffer").toString())); + } + if ((jsonObj.get("autoExchangeBidRate") != null + && !jsonObj.get("autoExchangeBidRate").isJsonNull()) + && !jsonObj.get("autoExchangeBidRate").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `autoExchangeBidRate` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("autoExchangeBidRate").toString())); + } + if ((jsonObj.get("autoExchangeAskRate") != null + && !jsonObj.get("autoExchangeAskRate").isJsonNull()) + && !jsonObj.get("autoExchangeAskRate").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `autoExchangeAskRate` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("autoExchangeAskRate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AssetIndexResponse1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AssetIndexResponse1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AssetIndexResponse1.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AssetIndexResponse1 value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AssetIndexResponse1 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AssetIndexResponse1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssetIndexResponse1 + * @throws IOException if the JSON string is invalid with respect to AssetIndexResponse1 + */ + public static AssetIndexResponse1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AssetIndexResponse1.class); + } + + /** + * Convert an instance of AssetIndexResponse1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AssetIndexResponse2.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AssetIndexResponse2.java new file mode 100644 index 000000000..5bfdb59ee --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AssetIndexResponse2.java @@ -0,0 +1,182 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** AssetIndexResponse2 */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AssetIndexResponse2 extends ArrayList { + public AssetIndexResponse2() {} + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetIndexResponse2 {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AssetIndexResponse2 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be a array type in the JSON string but got" + + " `%s`", + jsonElement.toString())); + } + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for (JsonElement element : array) { + AssetIndexResponse2Inner.validateJsonElement(element); + } + if (jsonElement == null) { + if (!AssetIndexResponse2.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AssetIndexResponse2 is not found in" + + " the empty JSON string", + AssetIndexResponse2.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AssetIndexResponse2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AssetIndexResponse2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AssetIndexResponse2.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AssetIndexResponse2 value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); + elementAdapter.write(out, obj); + } + + @Override + public AssetIndexResponse2 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AssetIndexResponse2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssetIndexResponse2 + * @throws IOException if the JSON string is invalid with respect to AssetIndexResponse2 + */ + public static AssetIndexResponse2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AssetIndexResponse2.class); + } + + /** + * Convert an instance of AssetIndexResponse2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AssetIndexResponse2Inner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AssetIndexResponse2Inner.java new file mode 100644 index 000000000..66d73118f --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AssetIndexResponse2Inner.java @@ -0,0 +1,644 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** AssetIndexResponse2Inner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AssetIndexResponse2Inner { + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_TIME = "time"; + + @SerializedName(SERIALIZED_NAME_TIME) + @jakarta.annotation.Nullable + private Long time; + + public static final String SERIALIZED_NAME_INDEX = "index"; + + @SerializedName(SERIALIZED_NAME_INDEX) + @jakarta.annotation.Nullable + private String index; + + public static final String SERIALIZED_NAME_BID_BUFFER = "bidBuffer"; + + @SerializedName(SERIALIZED_NAME_BID_BUFFER) + @jakarta.annotation.Nullable + private String bidBuffer; + + public static final String SERIALIZED_NAME_ASK_BUFFER = "askBuffer"; + + @SerializedName(SERIALIZED_NAME_ASK_BUFFER) + @jakarta.annotation.Nullable + private String askBuffer; + + public static final String SERIALIZED_NAME_BID_RATE = "bidRate"; + + @SerializedName(SERIALIZED_NAME_BID_RATE) + @jakarta.annotation.Nullable + private String bidRate; + + public static final String SERIALIZED_NAME_ASK_RATE = "askRate"; + + @SerializedName(SERIALIZED_NAME_ASK_RATE) + @jakarta.annotation.Nullable + private String askRate; + + public static final String SERIALIZED_NAME_AUTO_EXCHANGE_BID_BUFFER = "autoExchangeBidBuffer"; + + @SerializedName(SERIALIZED_NAME_AUTO_EXCHANGE_BID_BUFFER) + @jakarta.annotation.Nullable + private String autoExchangeBidBuffer; + + public static final String SERIALIZED_NAME_AUTO_EXCHANGE_ASK_BUFFER = "autoExchangeAskBuffer"; + + @SerializedName(SERIALIZED_NAME_AUTO_EXCHANGE_ASK_BUFFER) + @jakarta.annotation.Nullable + private String autoExchangeAskBuffer; + + public static final String SERIALIZED_NAME_AUTO_EXCHANGE_BID_RATE = "autoExchangeBidRate"; + + @SerializedName(SERIALIZED_NAME_AUTO_EXCHANGE_BID_RATE) + @jakarta.annotation.Nullable + private String autoExchangeBidRate; + + public static final String SERIALIZED_NAME_AUTO_EXCHANGE_ASK_RATE = "autoExchangeAskRate"; + + @SerializedName(SERIALIZED_NAME_AUTO_EXCHANGE_ASK_RATE) + @jakarta.annotation.Nullable + private String autoExchangeAskRate; + + public AssetIndexResponse2Inner() {} + + public AssetIndexResponse2Inner symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Get symbol + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public AssetIndexResponse2Inner time(@jakarta.annotation.Nullable Long time) { + this.time = time; + return this; + } + + /** + * Get time + * + * @return time + */ + @jakarta.annotation.Nullable + public Long getTime() { + return time; + } + + public void setTime(@jakarta.annotation.Nullable Long time) { + this.time = time; + } + + public AssetIndexResponse2Inner index(@jakarta.annotation.Nullable String index) { + this.index = index; + return this; + } + + /** + * Get index + * + * @return index + */ + @jakarta.annotation.Nullable + public String getIndex() { + return index; + } + + public void setIndex(@jakarta.annotation.Nullable String index) { + this.index = index; + } + + public AssetIndexResponse2Inner bidBuffer(@jakarta.annotation.Nullable String bidBuffer) { + this.bidBuffer = bidBuffer; + return this; + } + + /** + * Get bidBuffer + * + * @return bidBuffer + */ + @jakarta.annotation.Nullable + public String getBidBuffer() { + return bidBuffer; + } + + public void setBidBuffer(@jakarta.annotation.Nullable String bidBuffer) { + this.bidBuffer = bidBuffer; + } + + public AssetIndexResponse2Inner askBuffer(@jakarta.annotation.Nullable String askBuffer) { + this.askBuffer = askBuffer; + return this; + } + + /** + * Get askBuffer + * + * @return askBuffer + */ + @jakarta.annotation.Nullable + public String getAskBuffer() { + return askBuffer; + } + + public void setAskBuffer(@jakarta.annotation.Nullable String askBuffer) { + this.askBuffer = askBuffer; + } + + public AssetIndexResponse2Inner bidRate(@jakarta.annotation.Nullable String bidRate) { + this.bidRate = bidRate; + return this; + } + + /** + * Get bidRate + * + * @return bidRate + */ + @jakarta.annotation.Nullable + public String getBidRate() { + return bidRate; + } + + public void setBidRate(@jakarta.annotation.Nullable String bidRate) { + this.bidRate = bidRate; + } + + public AssetIndexResponse2Inner askRate(@jakarta.annotation.Nullable String askRate) { + this.askRate = askRate; + return this; + } + + /** + * Get askRate + * + * @return askRate + */ + @jakarta.annotation.Nullable + public String getAskRate() { + return askRate; + } + + public void setAskRate(@jakarta.annotation.Nullable String askRate) { + this.askRate = askRate; + } + + public AssetIndexResponse2Inner autoExchangeBidBuffer( + @jakarta.annotation.Nullable String autoExchangeBidBuffer) { + this.autoExchangeBidBuffer = autoExchangeBidBuffer; + return this; + } + + /** + * Get autoExchangeBidBuffer + * + * @return autoExchangeBidBuffer + */ + @jakarta.annotation.Nullable + public String getAutoExchangeBidBuffer() { + return autoExchangeBidBuffer; + } + + public void setAutoExchangeBidBuffer( + @jakarta.annotation.Nullable String autoExchangeBidBuffer) { + this.autoExchangeBidBuffer = autoExchangeBidBuffer; + } + + public AssetIndexResponse2Inner autoExchangeAskBuffer( + @jakarta.annotation.Nullable String autoExchangeAskBuffer) { + this.autoExchangeAskBuffer = autoExchangeAskBuffer; + return this; + } + + /** + * Get autoExchangeAskBuffer + * + * @return autoExchangeAskBuffer + */ + @jakarta.annotation.Nullable + public String getAutoExchangeAskBuffer() { + return autoExchangeAskBuffer; + } + + public void setAutoExchangeAskBuffer( + @jakarta.annotation.Nullable String autoExchangeAskBuffer) { + this.autoExchangeAskBuffer = autoExchangeAskBuffer; + } + + public AssetIndexResponse2Inner autoExchangeBidRate( + @jakarta.annotation.Nullable String autoExchangeBidRate) { + this.autoExchangeBidRate = autoExchangeBidRate; + return this; + } + + /** + * Get autoExchangeBidRate + * + * @return autoExchangeBidRate + */ + @jakarta.annotation.Nullable + public String getAutoExchangeBidRate() { + return autoExchangeBidRate; + } + + public void setAutoExchangeBidRate(@jakarta.annotation.Nullable String autoExchangeBidRate) { + this.autoExchangeBidRate = autoExchangeBidRate; + } + + public AssetIndexResponse2Inner autoExchangeAskRate( + @jakarta.annotation.Nullable String autoExchangeAskRate) { + this.autoExchangeAskRate = autoExchangeAskRate; + return this; + } + + /** + * Get autoExchangeAskRate + * + * @return autoExchangeAskRate + */ + @jakarta.annotation.Nullable + public String getAutoExchangeAskRate() { + return autoExchangeAskRate; + } + + public void setAutoExchangeAskRate(@jakarta.annotation.Nullable String autoExchangeAskRate) { + this.autoExchangeAskRate = autoExchangeAskRate; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetIndexResponse2Inner assetIndexResponse2Inner = (AssetIndexResponse2Inner) o; + return Objects.equals(this.symbol, assetIndexResponse2Inner.symbol) + && Objects.equals(this.time, assetIndexResponse2Inner.time) + && Objects.equals(this.index, assetIndexResponse2Inner.index) + && Objects.equals(this.bidBuffer, assetIndexResponse2Inner.bidBuffer) + && Objects.equals(this.askBuffer, assetIndexResponse2Inner.askBuffer) + && Objects.equals(this.bidRate, assetIndexResponse2Inner.bidRate) + && Objects.equals(this.askRate, assetIndexResponse2Inner.askRate) + && Objects.equals( + this.autoExchangeBidBuffer, assetIndexResponse2Inner.autoExchangeBidBuffer) + && Objects.equals( + this.autoExchangeAskBuffer, assetIndexResponse2Inner.autoExchangeAskBuffer) + && Objects.equals( + this.autoExchangeBidRate, assetIndexResponse2Inner.autoExchangeBidRate) + && Objects.equals( + this.autoExchangeAskRate, assetIndexResponse2Inner.autoExchangeAskRate); + } + + @Override + public int hashCode() { + return Objects.hash( + symbol, + time, + index, + bidBuffer, + askBuffer, + bidRate, + askRate, + autoExchangeBidBuffer, + autoExchangeAskBuffer, + autoExchangeBidRate, + autoExchangeAskRate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetIndexResponse2Inner {\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append(" index: ").append(toIndentedString(index)).append("\n"); + sb.append(" bidBuffer: ").append(toIndentedString(bidBuffer)).append("\n"); + sb.append(" askBuffer: ").append(toIndentedString(askBuffer)).append("\n"); + sb.append(" bidRate: ").append(toIndentedString(bidRate)).append("\n"); + sb.append(" askRate: ").append(toIndentedString(askRate)).append("\n"); + sb.append(" autoExchangeBidBuffer: ") + .append(toIndentedString(autoExchangeBidBuffer)) + .append("\n"); + sb.append(" autoExchangeAskBuffer: ") + .append(toIndentedString(autoExchangeAskBuffer)) + .append("\n"); + sb.append(" autoExchangeBidRate: ") + .append(toIndentedString(autoExchangeBidRate)) + .append("\n"); + sb.append(" autoExchangeAskRate: ") + .append(toIndentedString(autoExchangeAskRate)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object symbolValue = getSymbol(); + String symbolValueAsString = ""; + symbolValueAsString = symbolValue.toString(); + sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); + Object timeValue = getTime(); + String timeValueAsString = ""; + timeValueAsString = timeValue.toString(); + sb.append("time=").append(urlEncode(timeValueAsString)).append(""); + Object indexValue = getIndex(); + String indexValueAsString = ""; + indexValueAsString = indexValue.toString(); + sb.append("index=").append(urlEncode(indexValueAsString)).append(""); + Object bidBufferValue = getBidBuffer(); + String bidBufferValueAsString = ""; + bidBufferValueAsString = bidBufferValue.toString(); + sb.append("bidBuffer=").append(urlEncode(bidBufferValueAsString)).append(""); + Object askBufferValue = getAskBuffer(); + String askBufferValueAsString = ""; + askBufferValueAsString = askBufferValue.toString(); + sb.append("askBuffer=").append(urlEncode(askBufferValueAsString)).append(""); + Object bidRateValue = getBidRate(); + String bidRateValueAsString = ""; + bidRateValueAsString = bidRateValue.toString(); + sb.append("bidRate=").append(urlEncode(bidRateValueAsString)).append(""); + Object askRateValue = getAskRate(); + String askRateValueAsString = ""; + askRateValueAsString = askRateValue.toString(); + sb.append("askRate=").append(urlEncode(askRateValueAsString)).append(""); + Object autoExchangeBidBufferValue = getAutoExchangeBidBuffer(); + String autoExchangeBidBufferValueAsString = ""; + autoExchangeBidBufferValueAsString = autoExchangeBidBufferValue.toString(); + sb.append("autoExchangeBidBuffer=") + .append(urlEncode(autoExchangeBidBufferValueAsString)) + .append(""); + Object autoExchangeAskBufferValue = getAutoExchangeAskBuffer(); + String autoExchangeAskBufferValueAsString = ""; + autoExchangeAskBufferValueAsString = autoExchangeAskBufferValue.toString(); + sb.append("autoExchangeAskBuffer=") + .append(urlEncode(autoExchangeAskBufferValueAsString)) + .append(""); + Object autoExchangeBidRateValue = getAutoExchangeBidRate(); + String autoExchangeBidRateValueAsString = ""; + autoExchangeBidRateValueAsString = autoExchangeBidRateValue.toString(); + sb.append("autoExchangeBidRate=") + .append(urlEncode(autoExchangeBidRateValueAsString)) + .append(""); + Object autoExchangeAskRateValue = getAutoExchangeAskRate(); + String autoExchangeAskRateValueAsString = ""; + autoExchangeAskRateValueAsString = autoExchangeAskRateValue.toString(); + sb.append("autoExchangeAskRate=") + .append(urlEncode(autoExchangeAskRateValueAsString)) + .append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("symbol"); + openapiFields.add("time"); + openapiFields.add("index"); + openapiFields.add("bidBuffer"); + openapiFields.add("askBuffer"); + openapiFields.add("bidRate"); + openapiFields.add("askRate"); + openapiFields.add("autoExchangeBidBuffer"); + openapiFields.add("autoExchangeAskBuffer"); + openapiFields.add("autoExchangeBidRate"); + openapiFields.add("autoExchangeAskRate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AssetIndexResponse2Inner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AssetIndexResponse2Inner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AssetIndexResponse2Inner is not found" + + " in the empty JSON string", + AssetIndexResponse2Inner.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + if ((jsonObj.get("index") != null && !jsonObj.get("index").isJsonNull()) + && !jsonObj.get("index").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `index` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("index").toString())); + } + if ((jsonObj.get("bidBuffer") != null && !jsonObj.get("bidBuffer").isJsonNull()) + && !jsonObj.get("bidBuffer").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `bidBuffer` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("bidBuffer").toString())); + } + if ((jsonObj.get("askBuffer") != null && !jsonObj.get("askBuffer").isJsonNull()) + && !jsonObj.get("askBuffer").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `askBuffer` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("askBuffer").toString())); + } + if ((jsonObj.get("bidRate") != null && !jsonObj.get("bidRate").isJsonNull()) + && !jsonObj.get("bidRate").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `bidRate` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("bidRate").toString())); + } + if ((jsonObj.get("askRate") != null && !jsonObj.get("askRate").isJsonNull()) + && !jsonObj.get("askRate").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `askRate` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("askRate").toString())); + } + if ((jsonObj.get("autoExchangeBidBuffer") != null + && !jsonObj.get("autoExchangeBidBuffer").isJsonNull()) + && !jsonObj.get("autoExchangeBidBuffer").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `autoExchangeBidBuffer` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("autoExchangeBidBuffer").toString())); + } + if ((jsonObj.get("autoExchangeAskBuffer") != null + && !jsonObj.get("autoExchangeAskBuffer").isJsonNull()) + && !jsonObj.get("autoExchangeAskBuffer").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `autoExchangeAskBuffer` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("autoExchangeAskBuffer").toString())); + } + if ((jsonObj.get("autoExchangeBidRate") != null + && !jsonObj.get("autoExchangeBidRate").isJsonNull()) + && !jsonObj.get("autoExchangeBidRate").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `autoExchangeBidRate` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("autoExchangeBidRate").toString())); + } + if ((jsonObj.get("autoExchangeAskRate") != null + && !jsonObj.get("autoExchangeAskRate").isJsonNull()) + && !jsonObj.get("autoExchangeAskRate").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `autoExchangeAskRate` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("autoExchangeAskRate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AssetIndexResponse2Inner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AssetIndexResponse2Inner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AssetIndexResponse2Inner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AssetIndexResponse2Inner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AssetIndexResponse2Inner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AssetIndexResponse2Inner given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssetIndexResponse2Inner + * @throws IOException if the JSON string is invalid with respect to AssetIndexResponse2Inner + */ + public static AssetIndexResponse2Inner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AssetIndexResponse2Inner.class); + } + + /** + * Convert an instance of AssetIndexResponse2Inner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AutoCancelAllOpenOrdersRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AutoCancelAllOpenOrdersRequest.java index 1e0c6e5b8..e7e0d105c 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AutoCancelAllOpenOrdersRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AutoCancelAllOpenOrdersRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AutoCancelAllOpenOrdersRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AutoCancelAllOpenOrdersRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -83,7 +83,8 @@ public AutoCancelAllOpenOrdersRequest countdownTime( } /** - * Get countdownTime + * Countdown in milliseconds. `1000` means 1 second; `0` disables countdown + * cancel-all. * * @return countdownTime */ @@ -103,11 +104,12 @@ public AutoCancelAllOpenOrdersRequest recvWindow(@jakarta.annotation.Nullable Lo } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AutoCancelAllOpenOrdersResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AutoCancelAllOpenOrdersResponse.java index 7dc65c487..04f51ae31 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AutoCancelAllOpenOrdersResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AutoCancelAllOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AutoCancelAllOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AutoCancelAllOpenOrdersResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AutoCloseType.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AutoCloseType.java index 3eb3d0d21..b15720593 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AutoCloseType.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/AutoCloseType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BasisResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BasisResponse.java index 1d014a2c0..a17e40da3 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BasisResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BasisResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** BasisResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BasisResponse extends ArrayList { public BasisResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BasisResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BasisResponseInner.java index fadd39e59..27e5eff75 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BasisResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BasisResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** BasisResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BasisResponseInner { public static final String SERIALIZED_NAME_INDEX_PRICE = "indexPrice"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BatchOrders.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BatchOrders.java index ade32787d..3fdf9fc4a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BatchOrders.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BatchOrders.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** BatchOrders */ +/** order list. Max 5 orders */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BatchOrders extends ArrayList { public BatchOrders() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BatchOrdersInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BatchOrdersInner.java index 1cc0447bf..ec7c3ebf6 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BatchOrdersInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BatchOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -35,20 +36,8 @@ /** BatchOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BatchOrdersInner { - public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; - - @SerializedName(SERIALIZED_NAME_ORDER_ID) - @jakarta.annotation.Nullable - private String orderId; - - public static final String SERIALIZED_NAME_ORIG_CLIENT_ORDER_ID = "origClientOrderId"; - - @SerializedName(SERIALIZED_NAME_ORIG_CLIENT_ORDER_ID) - @jakarta.annotation.Nullable - private String origClientOrderId; - public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -112,23 +101,335 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @jakarta.annotation.Nullable private SideEnum side; + /** + * Default `BOTH` for One-way Mode; `LONG` or `SHORT` for Hedge + * Mode. + */ + @JsonAdapter(PositionSideEnum.Adapter.class) + public enum PositionSideEnum { + BOTH("BOTH"), + + LONG("LONG"), + + SHORT("SHORT"); + + private String value; + + PositionSideEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PositionSideEnum fromValue(String value) { + for (PositionSideEnum b : PositionSideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PositionSideEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PositionSideEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PositionSideEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PositionSideEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_POSITION_SIDE = "positionSide"; + + @SerializedName(SERIALIZED_NAME_POSITION_SIDE) + @jakarta.annotation.Nullable + private PositionSideEnum positionSide; + + /** Gets or Sets type */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIMIT("LIMIT"), + + MARKET("MARKET"), + + STOP("STOP"), + + STOP_MARKET("STOP_MARKET"), + + TAKE_PROFIT("TAKE_PROFIT"), + + TAKE_PROFIT_MARKET("TAKE_PROFIT_MARKET"), + + TRAILING_STOP_MARKET("TRAILING_STOP_MARKET"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @jakarta.annotation.Nullable + private TypeEnum type; + + /** Gets or Sets timeInForce */ + @JsonAdapter(TimeInForceEnum.Adapter.class) + public enum TimeInForceEnum { + GTC("GTC"), + + IOC("IOC"), + + FOK("FOK"), + + GTX("GTX"), + + GTD("GTD"), + + RPI("RPI"); + + private String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TimeInForceEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TimeInForceEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TimeInForceEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TimeInForceEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; + + @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) + @jakarta.annotation.Nullable + private TimeInForceEnum timeInForce; + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @SerializedName(SERIALIZED_NAME_QUANTITY) @jakarta.annotation.Nullable - private String quantity; + private Double quantity; + + /** Gets or Sets reduceOnly */ + @JsonAdapter(ReduceOnlyEnum.Adapter.class) + public enum ReduceOnlyEnum { + TRUE("true"), + + FALSE("false"); + + private String value; + + ReduceOnlyEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ReduceOnlyEnum fromValue(String value) { + for (ReduceOnlyEnum b : ReduceOnlyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ReduceOnlyEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ReduceOnlyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ReduceOnlyEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ReduceOnlyEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; + + @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) + @jakarta.annotation.Nullable + private ReduceOnlyEnum reduceOnly = ReduceOnlyEnum.FALSE; public static final String SERIALIZED_NAME_PRICE = "price"; @SerializedName(SERIALIZED_NAME_PRICE) @jakarta.annotation.Nullable - private String price; + private Double price; + + public static final String SERIALIZED_NAME_NEW_CLIENT_ORDER_ID = "newClientOrderId"; + + @SerializedName(SERIALIZED_NAME_NEW_CLIENT_ORDER_ID) + @jakarta.annotation.Nullable + private String newClientOrderId; + + /** Gets or Sets newOrderRespType */ + @JsonAdapter(NewOrderRespTypeEnum.Adapter.class) + public enum NewOrderRespTypeEnum { + ACK("ACK"), + + RESULT("RESULT"); + + private String value; + + NewOrderRespTypeEnum(String value) { + this.value = value; + } - /** Gets or Sets priceMatch */ + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static NewOrderRespTypeEnum fromValue(String value) { + for (NewOrderRespTypeEnum b : NewOrderRespTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final NewOrderRespTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public NewOrderRespTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return NewOrderRespTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + NewOrderRespTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_NEW_ORDER_RESP_TYPE = "newOrderRespType"; + + @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESP_TYPE) + @jakarta.annotation.Nullable + private NewOrderRespTypeEnum newOrderRespType = NewOrderRespTypeEnum.ACK; + + /** only avaliable for LIMIT/STOP/TAKE_PROFIT order; Can't be passed together with price */ @JsonAdapter(PriceMatchEnum.Adapter.class) public enum PriceMatchEnum { - NONE("NONE"), - OPPONENT("OPPONENT"), OPPONENT_5("OPPONENT_5"), @@ -195,98 +496,179 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @jakarta.annotation.Nullable private PriceMatchEnum priceMatch; - public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + /** + * 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(SelfTradePreventionModeEnum.Adapter.class) + public enum SelfTradePreventionModeEnum { + NONE("NONE"), + + EXPIRE_TAKER("EXPIRE_TAKER"), + + EXPIRE_BOTH("EXPIRE_BOTH"), + + EXPIRE_MAKER("EXPIRE_MAKER"); + + private String value; + + SelfTradePreventionModeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SelfTradePreventionModeEnum fromValue(String value) { + for (SelfTradePreventionModeEnum b : SelfTradePreventionModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write( + final JsonWriter jsonWriter, final SelfTradePreventionModeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SelfTradePreventionModeEnum read(final JsonReader jsonReader) + throws IOException { + String value = jsonReader.nextString(); + return SelfTradePreventionModeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SelfTradePreventionModeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = + "selfTradePreventionMode"; - @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) @jakarta.annotation.Nullable - private String stopPrice; + private SelfTradePreventionModeEnum selfTradePreventionMode; - public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; + public static final String SERIALIZED_NAME_GOOD_TILL_DATE = "goodTillDate"; - @SerializedName(SERIALIZED_NAME_RECV_WINDOW) + @SerializedName(SERIALIZED_NAME_GOOD_TILL_DATE) @jakarta.annotation.Nullable - private String recvWindow; + private Long goodTillDate; public BatchOrdersInner() {} - public BatchOrdersInner orderId(@jakarta.annotation.Nullable String orderId) { - this.orderId = orderId; + public BatchOrdersInner symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; return this; } /** - * Get orderId + * Get symbol * - * @return orderId + * @return symbol */ @jakarta.annotation.Nullable - public String getOrderId() { - return orderId; + public String getSymbol() { + return symbol; } - public void setOrderId(@jakarta.annotation.Nullable String orderId) { - this.orderId = orderId; + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; } - public BatchOrdersInner origClientOrderId( - @jakarta.annotation.Nullable String origClientOrderId) { - this.origClientOrderId = origClientOrderId; + public BatchOrdersInner side(@jakarta.annotation.Nullable SideEnum side) { + this.side = side; return this; } /** - * Get origClientOrderId + * Get side * - * @return origClientOrderId + * @return side */ @jakarta.annotation.Nullable - public String getOrigClientOrderId() { - return origClientOrderId; + public SideEnum getSide() { + return side; } - public void setOrigClientOrderId(@jakarta.annotation.Nullable String origClientOrderId) { - this.origClientOrderId = origClientOrderId; + public void setSide(@jakarta.annotation.Nullable SideEnum side) { + this.side = side; } - public BatchOrdersInner symbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; + public BatchOrdersInner positionSide( + @jakarta.annotation.Nullable PositionSideEnum positionSide) { + this.positionSide = positionSide; return this; } /** - * Get symbol + * Default `BOTH` for One-way Mode; `LONG` or `SHORT` for Hedge + * Mode. * - * @return symbol + * @return positionSide */ @jakarta.annotation.Nullable - public String getSymbol() { - return symbol; + public PositionSideEnum getPositionSide() { + return positionSide; } - public void setSymbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; + public void setPositionSide(@jakarta.annotation.Nullable PositionSideEnum positionSide) { + this.positionSide = positionSide; } - public BatchOrdersInner side(@jakarta.annotation.Nullable SideEnum side) { - this.side = side; + public BatchOrdersInner type(@jakarta.annotation.Nullable TypeEnum type) { + this.type = type; return this; } /** - * Get side + * Get type * - * @return side + * @return type */ @jakarta.annotation.Nullable - public SideEnum getSide() { - return side; + public TypeEnum getType() { + return type; } - public void setSide(@jakarta.annotation.Nullable SideEnum side) { - this.side = side; + public void setType(@jakarta.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public BatchOrdersInner timeInForce(@jakarta.annotation.Nullable TimeInForceEnum timeInForce) { + this.timeInForce = timeInForce; + return this; + } + + /** + * Get timeInForce + * + * @return timeInForce + */ + @jakarta.annotation.Nullable + public TimeInForceEnum getTimeInForce() { + return timeInForce; + } + + public void setTimeInForce(@jakarta.annotation.Nullable TimeInForceEnum timeInForce) { + this.timeInForce = timeInForce; } - public BatchOrdersInner quantity(@jakarta.annotation.Nullable String quantity) { + public BatchOrdersInner quantity(@jakarta.annotation.Nullable Double quantity) { this.quantity = quantity; return this; } @@ -297,15 +679,35 @@ public BatchOrdersInner quantity(@jakarta.annotation.Nullable String quantity) { * @return quantity */ @jakarta.annotation.Nullable - public String getQuantity() { + @Valid + public Double getQuantity() { return quantity; } - public void setQuantity(@jakarta.annotation.Nullable String quantity) { + public void setQuantity(@jakarta.annotation.Nullable Double quantity) { this.quantity = quantity; } - public BatchOrdersInner price(@jakarta.annotation.Nullable String price) { + public BatchOrdersInner reduceOnly(@jakarta.annotation.Nullable ReduceOnlyEnum reduceOnly) { + this.reduceOnly = reduceOnly; + return this; + } + + /** + * Get reduceOnly + * + * @return reduceOnly + */ + @jakarta.annotation.Nullable + public ReduceOnlyEnum getReduceOnly() { + return reduceOnly; + } + + public void setReduceOnly(@jakarta.annotation.Nullable ReduceOnlyEnum reduceOnly) { + this.reduceOnly = reduceOnly; + } + + public BatchOrdersInner price(@jakarta.annotation.Nullable Double price) { this.price = price; return this; } @@ -316,21 +718,62 @@ public BatchOrdersInner price(@jakarta.annotation.Nullable String price) { * @return price */ @jakarta.annotation.Nullable - public String getPrice() { + @Valid + public Double getPrice() { return price; } - public void setPrice(@jakarta.annotation.Nullable String price) { + public void setPrice(@jakarta.annotation.Nullable Double price) { this.price = price; } + public BatchOrdersInner newClientOrderId(@jakarta.annotation.Nullable String newClientOrderId) { + this.newClientOrderId = newClientOrderId; + return this; + } + + /** + * Get newClientOrderId + * + * @return newClientOrderId + */ + @jakarta.annotation.Nullable + public String getNewClientOrderId() { + return newClientOrderId; + } + + public void setNewClientOrderId(@jakarta.annotation.Nullable String newClientOrderId) { + this.newClientOrderId = newClientOrderId; + } + + public BatchOrdersInner newOrderRespType( + @jakarta.annotation.Nullable NewOrderRespTypeEnum newOrderRespType) { + this.newOrderRespType = newOrderRespType; + return this; + } + + /** + * Get newOrderRespType + * + * @return newOrderRespType + */ + @jakarta.annotation.Nullable + public NewOrderRespTypeEnum getNewOrderRespType() { + return newOrderRespType; + } + + public void setNewOrderRespType( + @jakarta.annotation.Nullable NewOrderRespTypeEnum newOrderRespType) { + this.newOrderRespType = newOrderRespType; + } + public BatchOrdersInner priceMatch(@jakarta.annotation.Nullable PriceMatchEnum priceMatch) { this.priceMatch = priceMatch; return this; } /** - * Get priceMatch + * only avaliable for LIMIT/STOP/TAKE_PROFIT order; Can't be passed together with price * * @return priceMatch */ @@ -343,42 +786,45 @@ public void setPriceMatch(@jakarta.annotation.Nullable PriceMatchEnum priceMatch this.priceMatch = priceMatch; } - public BatchOrdersInner stopPrice(@jakarta.annotation.Nullable String stopPrice) { - this.stopPrice = stopPrice; + public BatchOrdersInner selfTradePreventionMode( + @jakarta.annotation.Nullable SelfTradePreventionModeEnum selfTradePreventionMode) { + this.selfTradePreventionMode = selfTradePreventionMode; return this; } /** - * Get stopPrice + * 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 * - * @return stopPrice + * @return selfTradePreventionMode */ @jakarta.annotation.Nullable - public String getStopPrice() { - return stopPrice; + public SelfTradePreventionModeEnum getSelfTradePreventionMode() { + return selfTradePreventionMode; } - public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { - this.stopPrice = stopPrice; + public void setSelfTradePreventionMode( + @jakarta.annotation.Nullable SelfTradePreventionModeEnum selfTradePreventionMode) { + this.selfTradePreventionMode = selfTradePreventionMode; } - public BatchOrdersInner recvWindow(@jakarta.annotation.Nullable String recvWindow) { - this.recvWindow = recvWindow; + public BatchOrdersInner goodTillDate(@jakarta.annotation.Nullable Long goodTillDate) { + this.goodTillDate = goodTillDate; return this; } /** - * Get recvWindow + * Auto-cancel time for `GTD` orders. * - * @return recvWindow + * @return goodTillDate */ @jakarta.annotation.Nullable - public String getRecvWindow() { - return recvWindow; + public Long getGoodTillDate() { + return goodTillDate; } - public void setRecvWindow(@jakarta.annotation.Nullable String recvWindow) { - this.recvWindow = recvWindow; + public void setGoodTillDate(@jakarta.annotation.Nullable Long goodTillDate) { + this.goodTillDate = goodTillDate; } @Override @@ -390,44 +836,59 @@ public boolean equals(Object o) { return false; } BatchOrdersInner batchOrdersInner = (BatchOrdersInner) o; - return Objects.equals(this.orderId, batchOrdersInner.orderId) - && Objects.equals(this.origClientOrderId, batchOrdersInner.origClientOrderId) - && Objects.equals(this.symbol, batchOrdersInner.symbol) + return Objects.equals(this.symbol, batchOrdersInner.symbol) && Objects.equals(this.side, batchOrdersInner.side) + && Objects.equals(this.positionSide, batchOrdersInner.positionSide) + && Objects.equals(this.type, batchOrdersInner.type) + && Objects.equals(this.timeInForce, batchOrdersInner.timeInForce) && Objects.equals(this.quantity, batchOrdersInner.quantity) + && Objects.equals(this.reduceOnly, batchOrdersInner.reduceOnly) && Objects.equals(this.price, batchOrdersInner.price) + && Objects.equals(this.newClientOrderId, batchOrdersInner.newClientOrderId) + && Objects.equals(this.newOrderRespType, batchOrdersInner.newOrderRespType) && Objects.equals(this.priceMatch, batchOrdersInner.priceMatch) - && Objects.equals(this.stopPrice, batchOrdersInner.stopPrice) - && Objects.equals(this.recvWindow, batchOrdersInner.recvWindow); + && Objects.equals( + this.selfTradePreventionMode, batchOrdersInner.selfTradePreventionMode) + && Objects.equals(this.goodTillDate, batchOrdersInner.goodTillDate); } @Override public int hashCode() { return Objects.hash( - orderId, - origClientOrderId, symbol, side, + positionSide, + type, + timeInForce, quantity, + reduceOnly, price, + newClientOrderId, + newOrderRespType, priceMatch, - stopPrice, - recvWindow); + selfTradePreventionMode, + goodTillDate); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BatchOrdersInner {\n"); - sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); - sb.append(" origClientOrderId: ").append(toIndentedString(origClientOrderId)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); + sb.append(" positionSide: ").append(toIndentedString(positionSide)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); + sb.append(" newClientOrderId: ").append(toIndentedString(newClientOrderId)).append("\n"); + sb.append(" newOrderRespType: ").append(toIndentedString(newOrderRespType)).append("\n"); sb.append(" priceMatch: ").append(toIndentedString(priceMatch)).append("\n"); - sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); - sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); + sb.append(" selfTradePreventionMode: ") + .append(toIndentedString(selfTradePreventionMode)) + .append("\n"); + sb.append(" goodTillDate: ").append(toIndentedString(goodTillDate)).append("\n"); sb.append("}"); return sb.toString(); } @@ -435,16 +896,6 @@ public String toString() { public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); - Object orderIdValue = getOrderId(); - String orderIdValueAsString = ""; - orderIdValueAsString = orderIdValue.toString(); - sb.append("orderId=").append(urlEncode(orderIdValueAsString)).append(""); - Object origClientOrderIdValue = getOrigClientOrderId(); - String origClientOrderIdValueAsString = ""; - origClientOrderIdValueAsString = origClientOrderIdValue.toString(); - sb.append("origClientOrderId=") - .append(urlEncode(origClientOrderIdValueAsString)) - .append(""); Object symbolValue = getSymbol(); String symbolValueAsString = ""; symbolValueAsString = symbolValue.toString(); @@ -453,26 +904,52 @@ public String toUrlQueryString() { String sideValueAsString = ""; sideValueAsString = sideValue.toString(); sb.append("side=").append(urlEncode(sideValueAsString)).append(""); + Object positionSideValue = getPositionSide(); + String positionSideValueAsString = ""; + positionSideValueAsString = positionSideValue.toString(); + sb.append("positionSide=").append(urlEncode(positionSideValueAsString)).append(""); + Object typeValue = getType(); + String typeValueAsString = ""; + typeValueAsString = typeValue.toString(); + sb.append("type=").append(urlEncode(typeValueAsString)).append(""); + Object timeInForceValue = getTimeInForce(); + String timeInForceValueAsString = ""; + timeInForceValueAsString = timeInForceValue.toString(); + sb.append("timeInForce=").append(urlEncode(timeInForceValueAsString)).append(""); Object quantityValue = getQuantity(); String quantityValueAsString = ""; quantityValueAsString = quantityValue.toString(); sb.append("quantity=").append(urlEncode(quantityValueAsString)).append(""); + Object reduceOnlyValue = getReduceOnly(); + String reduceOnlyValueAsString = ""; + reduceOnlyValueAsString = reduceOnlyValue.toString(); + sb.append("reduceOnly=").append(urlEncode(reduceOnlyValueAsString)).append(""); Object priceValue = getPrice(); String priceValueAsString = ""; priceValueAsString = priceValue.toString(); sb.append("price=").append(urlEncode(priceValueAsString)).append(""); + Object newClientOrderIdValue = getNewClientOrderId(); + String newClientOrderIdValueAsString = ""; + newClientOrderIdValueAsString = newClientOrderIdValue.toString(); + sb.append("newClientOrderId=").append(urlEncode(newClientOrderIdValueAsString)).append(""); + Object newOrderRespTypeValue = getNewOrderRespType(); + String newOrderRespTypeValueAsString = ""; + newOrderRespTypeValueAsString = newOrderRespTypeValue.toString(); + sb.append("newOrderRespType=").append(urlEncode(newOrderRespTypeValueAsString)).append(""); Object priceMatchValue = getPriceMatch(); String priceMatchValueAsString = ""; priceMatchValueAsString = priceMatchValue.toString(); sb.append("priceMatch=").append(urlEncode(priceMatchValueAsString)).append(""); - Object stopPriceValue = getStopPrice(); - String stopPriceValueAsString = ""; - stopPriceValueAsString = stopPriceValue.toString(); - sb.append("stopPrice=").append(urlEncode(stopPriceValueAsString)).append(""); - Object recvWindowValue = getRecvWindow(); - String recvWindowValueAsString = ""; - recvWindowValueAsString = recvWindowValue.toString(); - sb.append("recvWindow=").append(urlEncode(recvWindowValueAsString)).append(""); + Object selfTradePreventionModeValue = getSelfTradePreventionMode(); + String selfTradePreventionModeValueAsString = ""; + selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); + sb.append("selfTradePreventionMode=") + .append(urlEncode(selfTradePreventionModeValueAsString)) + .append(""); + Object goodTillDateValue = getGoodTillDate(); + String goodTillDateValueAsString = ""; + goodTillDateValueAsString = goodTillDateValue.toString(); + sb.append("goodTillDate=").append(urlEncode(goodTillDateValueAsString)).append(""); return sb.toString(); } @@ -501,15 +978,19 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("orderId"); - openapiFields.add("origClientOrderId"); openapiFields.add("symbol"); openapiFields.add("side"); + openapiFields.add("positionSide"); + openapiFields.add("type"); + openapiFields.add("timeInForce"); openapiFields.add("quantity"); + openapiFields.add("reduceOnly"); openapiFields.add("price"); + openapiFields.add("newClientOrderId"); + openapiFields.add("newOrderRespType"); openapiFields.add("priceMatch"); - openapiFields.add("stopPrice"); - openapiFields.add("recvWindow"); + openapiFields.add("selfTradePreventionMode"); + openapiFields.add("goodTillDate"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -533,23 +1014,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("orderId") != null && !jsonObj.get("orderId").isJsonNull()) - && !jsonObj.get("orderId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `orderId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("orderId").toString())); - } - if ((jsonObj.get("origClientOrderId") != null - && !jsonObj.get("origClientOrderId").isJsonNull()) - && !jsonObj.get("origClientOrderId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `origClientOrderId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("origClientOrderId").toString())); - } if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -570,21 +1034,76 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("side") != null && !jsonObj.get("side").isJsonNull()) { SideEnum.validateJsonElement(jsonObj.get("side")); } - if ((jsonObj.get("quantity") != null && !jsonObj.get("quantity").isJsonNull()) - && !jsonObj.get("quantity").isJsonPrimitive()) { + if ((jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) + && !jsonObj.get("positionSide").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `quantity` to be a primitive type in the JSON" + "Expected the field `positionSide` to be a primitive type in the JSON" + " string but got `%s`", - jsonObj.get("quantity").toString())); + jsonObj.get("positionSide").toString())); + } + // validate the optional field `positionSide` + if (jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) { + PositionSideEnum.validateJsonElement(jsonObj.get("positionSide")); } - if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) - && !jsonObj.get("price").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `price` to be a primitive type in the JSON string" + "Expected the field `type` to be a primitive type in the JSON string" + " but got `%s`", - jsonObj.get("price").toString())); + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) + && !jsonObj.get("timeInForce").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `timeInForce` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("timeInForce").toString())); + } + // validate the optional field `timeInForce` + if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { + TimeInForceEnum.validateJsonElement(jsonObj.get("timeInForce")); + } + if ((jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) + && !jsonObj.get("reduceOnly").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `reduceOnly` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("reduceOnly").toString())); + } + // validate the optional field `reduceOnly` + if (jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) { + ReduceOnlyEnum.validateJsonElement(jsonObj.get("reduceOnly")); + } + if ((jsonObj.get("newClientOrderId") != null + && !jsonObj.get("newClientOrderId").isJsonNull()) + && !jsonObj.get("newClientOrderId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `newClientOrderId` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("newClientOrderId").toString())); + } + if ((jsonObj.get("newOrderRespType") != null + && !jsonObj.get("newOrderRespType").isJsonNull()) + && !jsonObj.get("newOrderRespType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `newOrderRespType` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("newOrderRespType").toString())); + } + // validate the optional field `newOrderRespType` + if (jsonObj.get("newOrderRespType") != null + && !jsonObj.get("newOrderRespType").isJsonNull()) { + NewOrderRespTypeEnum.validateJsonElement(jsonObj.get("newOrderRespType")); } if ((jsonObj.get("priceMatch") != null && !jsonObj.get("priceMatch").isJsonNull()) && !jsonObj.get("priceMatch").isJsonPrimitive()) { @@ -598,21 +1117,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("priceMatch") != null && !jsonObj.get("priceMatch").isJsonNull()) { PriceMatchEnum.validateJsonElement(jsonObj.get("priceMatch")); } - if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) - && !jsonObj.get("stopPrice").isJsonPrimitive()) { + if ((jsonObj.get("selfTradePreventionMode") != null + && !jsonObj.get("selfTradePreventionMode").isJsonNull()) + && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `stopPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("stopPrice").toString())); + "Expected the field `selfTradePreventionMode` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("selfTradePreventionMode").toString())); } - if ((jsonObj.get("recvWindow") != null && !jsonObj.get("recvWindow").isJsonNull()) - && !jsonObj.get("recvWindow").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `recvWindow` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("recvWindow").toString())); + // validate the optional field `selfTradePreventionMode` + if (jsonObj.get("selfTradePreventionMode") != null + && !jsonObj.get("selfTradePreventionMode").isJsonNull()) { + SelfTradePreventionModeEnum.validateJsonElement(jsonObj.get("selfTradePreventionMode")); } } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BatchOrdersPlaceMultipleOrders.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BatchOrdersPlaceMultipleOrders.java deleted file mode 100644 index b2fd2c46e..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BatchOrdersPlaceMultipleOrders.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** BatchOrdersPlaceMultipleOrders */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class BatchOrdersPlaceMultipleOrders extends ArrayList { - public BatchOrdersPlaceMultipleOrders() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BatchOrdersPlaceMultipleOrders {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * BatchOrdersPlaceMultipleOrders - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - BatchOrdersPlaceMultipleOrdersInner.validateJsonElement(element); - } - if (jsonElement == null) { - if (!BatchOrdersPlaceMultipleOrders.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in BatchOrdersPlaceMultipleOrders is not" - + " found in the empty JSON string", - BatchOrdersPlaceMultipleOrders.openapiRequiredFields.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BatchOrdersPlaceMultipleOrders.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BatchOrdersPlaceMultipleOrders' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(BatchOrdersPlaceMultipleOrders.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, BatchOrdersPlaceMultipleOrders value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public BatchOrdersPlaceMultipleOrders read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of BatchOrdersPlaceMultipleOrders given an JSON string - * - * @param jsonString JSON string - * @return An instance of BatchOrdersPlaceMultipleOrders - * @throws IOException if the JSON string is invalid with respect to - * BatchOrdersPlaceMultipleOrders - */ - public static BatchOrdersPlaceMultipleOrders fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BatchOrdersPlaceMultipleOrders.class); - } - - /** - * Convert an instance of BatchOrdersPlaceMultipleOrders to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BatchOrdersPlaceMultipleOrdersInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BatchOrdersPlaceMultipleOrdersInner.java deleted file mode 100644 index 47090dc12..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BatchOrdersPlaceMultipleOrdersInner.java +++ /dev/null @@ -1,1097 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** BatchOrdersPlaceMultipleOrdersInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class BatchOrdersPlaceMultipleOrdersInner { - public static final String SERIALIZED_NAME_SYMBOL = "symbol"; - - @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nullable - private String symbol; - - /** Gets or Sets side */ - @JsonAdapter(SideEnum.Adapter.class) - public enum SideEnum { - BUY("BUY"), - - SELL("SELL"); - - private String value; - - SideEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static SideEnum fromValue(String value) { - for (SideEnum b : SideEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final SideEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public SideEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return SideEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - SideEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_SIDE = "side"; - - @SerializedName(SERIALIZED_NAME_SIDE) - @jakarta.annotation.Nullable - private SideEnum side; - - /** Gets or Sets positionSide */ - @JsonAdapter(PositionSideEnum.Adapter.class) - public enum PositionSideEnum { - BOTH("BOTH"), - - LONG("LONG"), - - SHORT("SHORT"); - - private String value; - - PositionSideEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PositionSideEnum fromValue(String value) { - for (PositionSideEnum b : PositionSideEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PositionSideEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PositionSideEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PositionSideEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PositionSideEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_POSITION_SIDE = "positionSide"; - - @SerializedName(SERIALIZED_NAME_POSITION_SIDE) - @jakarta.annotation.Nullable - private PositionSideEnum positionSide; - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @jakarta.annotation.Nullable - private String type; - - /** Gets or Sets timeInForce */ - @JsonAdapter(TimeInForceEnum.Adapter.class) - public enum TimeInForceEnum { - GTC("GTC"), - - IOC("IOC"), - - FOK("FOK"), - - GTX("GTX"), - - GTD("GTD"), - - RPI("RPI"); - - private String value; - - TimeInForceEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TimeInForceEnum fromValue(String value) { - for (TimeInForceEnum b : TimeInForceEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TimeInForceEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TimeInForceEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TimeInForceEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TimeInForceEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; - - @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) - @jakarta.annotation.Nullable - private TimeInForceEnum timeInForce; - - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; - - @SerializedName(SERIALIZED_NAME_QUANTITY) - @jakarta.annotation.Nullable - private String quantity; - - public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; - - @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) - @jakarta.annotation.Nullable - private String reduceOnly; - - public static final String SERIALIZED_NAME_PRICE = "price"; - - @SerializedName(SERIALIZED_NAME_PRICE) - @jakarta.annotation.Nullable - private String price; - - public static final String SERIALIZED_NAME_NEW_CLIENT_ORDER_ID = "newClientOrderId"; - - @SerializedName(SERIALIZED_NAME_NEW_CLIENT_ORDER_ID) - @jakarta.annotation.Nullable - private String newClientOrderId; - - /** Gets or Sets newOrderRespType */ - @JsonAdapter(NewOrderRespTypeEnum.Adapter.class) - public enum NewOrderRespTypeEnum { - ACK("ACK"), - - RESULT("RESULT"); - - private String value; - - NewOrderRespTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static NewOrderRespTypeEnum fromValue(String value) { - for (NewOrderRespTypeEnum b : NewOrderRespTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final NewOrderRespTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public NewOrderRespTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return NewOrderRespTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - NewOrderRespTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_NEW_ORDER_RESP_TYPE = "newOrderRespType"; - - @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESP_TYPE) - @jakarta.annotation.Nullable - private NewOrderRespTypeEnum newOrderRespType; - - /** Gets or Sets priceMatch */ - @JsonAdapter(PriceMatchEnum.Adapter.class) - public enum PriceMatchEnum { - NONE("NONE"), - - OPPONENT("OPPONENT"), - - OPPONENT_5("OPPONENT_5"), - - OPPONENT_10("OPPONENT_10"), - - OPPONENT_20("OPPONENT_20"), - - QUEUE("QUEUE"), - - QUEUE_5("QUEUE_5"), - - QUEUE_10("QUEUE_10"), - - QUEUE_20("QUEUE_20"); - - private String value; - - PriceMatchEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PriceMatchEnum fromValue(String value) { - for (PriceMatchEnum b : PriceMatchEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PriceMatchEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PriceMatchEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PriceMatchEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PriceMatchEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PRICE_MATCH = "priceMatch"; - - @SerializedName(SERIALIZED_NAME_PRICE_MATCH) - @jakarta.annotation.Nullable - private PriceMatchEnum priceMatch; - - /** Gets or Sets selfTradePreventionMode */ - @JsonAdapter(SelfTradePreventionModeEnum.Adapter.class) - public enum SelfTradePreventionModeEnum { - EXPIRE_TAKER("EXPIRE_TAKER"), - - EXPIRE_BOTH("EXPIRE_BOTH"), - - EXPIRE_MAKER("EXPIRE_MAKER"); - - private String value; - - SelfTradePreventionModeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static SelfTradePreventionModeEnum fromValue(String value) { - for (SelfTradePreventionModeEnum b : SelfTradePreventionModeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write( - final JsonWriter jsonWriter, final SelfTradePreventionModeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public SelfTradePreventionModeEnum read(final JsonReader jsonReader) - throws IOException { - String value = jsonReader.nextString(); - return SelfTradePreventionModeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - SelfTradePreventionModeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = - "selfTradePreventionMode"; - - @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) - @jakarta.annotation.Nullable - private SelfTradePreventionModeEnum selfTradePreventionMode; - - public static final String SERIALIZED_NAME_GOOD_TILL_DATE = "goodTillDate"; - - @SerializedName(SERIALIZED_NAME_GOOD_TILL_DATE) - @jakarta.annotation.Nullable - private String goodTillDate; - - public BatchOrdersPlaceMultipleOrdersInner() {} - - public BatchOrdersPlaceMultipleOrdersInner symbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - return this; - } - - /** - * Get symbol - * - * @return symbol - */ - @jakarta.annotation.Nullable - public String getSymbol() { - return symbol; - } - - public void setSymbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - } - - public BatchOrdersPlaceMultipleOrdersInner side(@jakarta.annotation.Nullable SideEnum side) { - this.side = side; - return this; - } - - /** - * Get side - * - * @return side - */ - @jakarta.annotation.Nullable - public SideEnum getSide() { - return side; - } - - public void setSide(@jakarta.annotation.Nullable SideEnum side) { - this.side = side; - } - - public BatchOrdersPlaceMultipleOrdersInner positionSide( - @jakarta.annotation.Nullable PositionSideEnum positionSide) { - this.positionSide = positionSide; - return this; - } - - /** - * Get positionSide - * - * @return positionSide - */ - @jakarta.annotation.Nullable - public PositionSideEnum getPositionSide() { - return positionSide; - } - - public void setPositionSide(@jakarta.annotation.Nullable PositionSideEnum positionSide) { - this.positionSide = positionSide; - } - - public BatchOrdersPlaceMultipleOrdersInner type(@jakarta.annotation.Nullable String type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @jakarta.annotation.Nullable - public String getType() { - return type; - } - - public void setType(@jakarta.annotation.Nullable String type) { - this.type = type; - } - - public BatchOrdersPlaceMultipleOrdersInner timeInForce( - @jakarta.annotation.Nullable TimeInForceEnum timeInForce) { - this.timeInForce = timeInForce; - return this; - } - - /** - * Get timeInForce - * - * @return timeInForce - */ - @jakarta.annotation.Nullable - public TimeInForceEnum getTimeInForce() { - return timeInForce; - } - - public void setTimeInForce(@jakarta.annotation.Nullable TimeInForceEnum timeInForce) { - this.timeInForce = timeInForce; - } - - public BatchOrdersPlaceMultipleOrdersInner quantity( - @jakarta.annotation.Nullable String quantity) { - this.quantity = quantity; - return this; - } - - /** - * Get quantity - * - * @return quantity - */ - @jakarta.annotation.Nullable - public String getQuantity() { - return quantity; - } - - public void setQuantity(@jakarta.annotation.Nullable String quantity) { - this.quantity = quantity; - } - - public BatchOrdersPlaceMultipleOrdersInner reduceOnly( - @jakarta.annotation.Nullable String reduceOnly) { - this.reduceOnly = reduceOnly; - return this; - } - - /** - * Get reduceOnly - * - * @return reduceOnly - */ - @jakarta.annotation.Nullable - public String getReduceOnly() { - return reduceOnly; - } - - public void setReduceOnly(@jakarta.annotation.Nullable String reduceOnly) { - this.reduceOnly = reduceOnly; - } - - public BatchOrdersPlaceMultipleOrdersInner price(@jakarta.annotation.Nullable String price) { - this.price = price; - return this; - } - - /** - * Get price - * - * @return price - */ - @jakarta.annotation.Nullable - public String getPrice() { - return price; - } - - public void setPrice(@jakarta.annotation.Nullable String price) { - this.price = price; - } - - public BatchOrdersPlaceMultipleOrdersInner newClientOrderId( - @jakarta.annotation.Nullable String newClientOrderId) { - this.newClientOrderId = newClientOrderId; - return this; - } - - /** - * Get newClientOrderId - * - * @return newClientOrderId - */ - @jakarta.annotation.Nullable - public String getNewClientOrderId() { - return newClientOrderId; - } - - public void setNewClientOrderId(@jakarta.annotation.Nullable String newClientOrderId) { - this.newClientOrderId = newClientOrderId; - } - - public BatchOrdersPlaceMultipleOrdersInner newOrderRespType( - @jakarta.annotation.Nullable NewOrderRespTypeEnum newOrderRespType) { - this.newOrderRespType = newOrderRespType; - return this; - } - - /** - * Get newOrderRespType - * - * @return newOrderRespType - */ - @jakarta.annotation.Nullable - public NewOrderRespTypeEnum getNewOrderRespType() { - return newOrderRespType; - } - - public void setNewOrderRespType( - @jakarta.annotation.Nullable NewOrderRespTypeEnum newOrderRespType) { - this.newOrderRespType = newOrderRespType; - } - - public BatchOrdersPlaceMultipleOrdersInner priceMatch( - @jakarta.annotation.Nullable PriceMatchEnum priceMatch) { - this.priceMatch = priceMatch; - return this; - } - - /** - * Get priceMatch - * - * @return priceMatch - */ - @jakarta.annotation.Nullable - public PriceMatchEnum getPriceMatch() { - return priceMatch; - } - - public void setPriceMatch(@jakarta.annotation.Nullable PriceMatchEnum priceMatch) { - this.priceMatch = priceMatch; - } - - public BatchOrdersPlaceMultipleOrdersInner selfTradePreventionMode( - @jakarta.annotation.Nullable SelfTradePreventionModeEnum selfTradePreventionMode) { - this.selfTradePreventionMode = selfTradePreventionMode; - return this; - } - - /** - * Get selfTradePreventionMode - * - * @return selfTradePreventionMode - */ - @jakarta.annotation.Nullable - public SelfTradePreventionModeEnum getSelfTradePreventionMode() { - return selfTradePreventionMode; - } - - public void setSelfTradePreventionMode( - @jakarta.annotation.Nullable SelfTradePreventionModeEnum selfTradePreventionMode) { - this.selfTradePreventionMode = selfTradePreventionMode; - } - - public BatchOrdersPlaceMultipleOrdersInner goodTillDate( - @jakarta.annotation.Nullable String goodTillDate) { - this.goodTillDate = goodTillDate; - return this; - } - - /** - * Get goodTillDate - * - * @return goodTillDate - */ - @jakarta.annotation.Nullable - public String getGoodTillDate() { - return goodTillDate; - } - - public void setGoodTillDate(@jakarta.annotation.Nullable String goodTillDate) { - this.goodTillDate = goodTillDate; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BatchOrdersPlaceMultipleOrdersInner batchOrdersPlaceMultipleOrdersInner = - (BatchOrdersPlaceMultipleOrdersInner) o; - return Objects.equals(this.symbol, batchOrdersPlaceMultipleOrdersInner.symbol) - && Objects.equals(this.side, batchOrdersPlaceMultipleOrdersInner.side) - && Objects.equals( - this.positionSide, batchOrdersPlaceMultipleOrdersInner.positionSide) - && Objects.equals(this.type, batchOrdersPlaceMultipleOrdersInner.type) - && Objects.equals(this.timeInForce, batchOrdersPlaceMultipleOrdersInner.timeInForce) - && Objects.equals(this.quantity, batchOrdersPlaceMultipleOrdersInner.quantity) - && Objects.equals(this.reduceOnly, batchOrdersPlaceMultipleOrdersInner.reduceOnly) - && Objects.equals(this.price, batchOrdersPlaceMultipleOrdersInner.price) - && Objects.equals( - this.newClientOrderId, batchOrdersPlaceMultipleOrdersInner.newClientOrderId) - && Objects.equals( - this.newOrderRespType, batchOrdersPlaceMultipleOrdersInner.newOrderRespType) - && Objects.equals(this.priceMatch, batchOrdersPlaceMultipleOrdersInner.priceMatch) - && Objects.equals( - this.selfTradePreventionMode, - batchOrdersPlaceMultipleOrdersInner.selfTradePreventionMode) - && Objects.equals( - this.goodTillDate, batchOrdersPlaceMultipleOrdersInner.goodTillDate); - } - - @Override - public int hashCode() { - return Objects.hash( - symbol, - side, - positionSide, - type, - timeInForce, - quantity, - reduceOnly, - price, - newClientOrderId, - newOrderRespType, - priceMatch, - selfTradePreventionMode, - goodTillDate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BatchOrdersPlaceMultipleOrdersInner {\n"); - sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); - sb.append(" side: ").append(toIndentedString(side)).append("\n"); - sb.append(" positionSide: ").append(toIndentedString(positionSide)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); - sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" newClientOrderId: ").append(toIndentedString(newClientOrderId)).append("\n"); - sb.append(" newOrderRespType: ").append(toIndentedString(newOrderRespType)).append("\n"); - sb.append(" priceMatch: ").append(toIndentedString(priceMatch)).append("\n"); - sb.append(" selfTradePreventionMode: ") - .append(toIndentedString(selfTradePreventionMode)) - .append("\n"); - sb.append(" goodTillDate: ").append(toIndentedString(goodTillDate)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object symbolValue = getSymbol(); - String symbolValueAsString = ""; - symbolValueAsString = symbolValue.toString(); - sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); - Object sideValue = getSide(); - String sideValueAsString = ""; - sideValueAsString = sideValue.toString(); - sb.append("side=").append(urlEncode(sideValueAsString)).append(""); - Object positionSideValue = getPositionSide(); - String positionSideValueAsString = ""; - positionSideValueAsString = positionSideValue.toString(); - sb.append("positionSide=").append(urlEncode(positionSideValueAsString)).append(""); - Object typeValue = getType(); - String typeValueAsString = ""; - typeValueAsString = typeValue.toString(); - sb.append("type=").append(urlEncode(typeValueAsString)).append(""); - Object timeInForceValue = getTimeInForce(); - String timeInForceValueAsString = ""; - timeInForceValueAsString = timeInForceValue.toString(); - sb.append("timeInForce=").append(urlEncode(timeInForceValueAsString)).append(""); - Object quantityValue = getQuantity(); - String quantityValueAsString = ""; - quantityValueAsString = quantityValue.toString(); - sb.append("quantity=").append(urlEncode(quantityValueAsString)).append(""); - Object reduceOnlyValue = getReduceOnly(); - String reduceOnlyValueAsString = ""; - reduceOnlyValueAsString = reduceOnlyValue.toString(); - sb.append("reduceOnly=").append(urlEncode(reduceOnlyValueAsString)).append(""); - Object priceValue = getPrice(); - String priceValueAsString = ""; - priceValueAsString = priceValue.toString(); - sb.append("price=").append(urlEncode(priceValueAsString)).append(""); - Object newClientOrderIdValue = getNewClientOrderId(); - String newClientOrderIdValueAsString = ""; - newClientOrderIdValueAsString = newClientOrderIdValue.toString(); - sb.append("newClientOrderId=").append(urlEncode(newClientOrderIdValueAsString)).append(""); - Object newOrderRespTypeValue = getNewOrderRespType(); - String newOrderRespTypeValueAsString = ""; - newOrderRespTypeValueAsString = newOrderRespTypeValue.toString(); - sb.append("newOrderRespType=").append(urlEncode(newOrderRespTypeValueAsString)).append(""); - Object priceMatchValue = getPriceMatch(); - String priceMatchValueAsString = ""; - priceMatchValueAsString = priceMatchValue.toString(); - sb.append("priceMatch=").append(urlEncode(priceMatchValueAsString)).append(""); - Object selfTradePreventionModeValue = getSelfTradePreventionMode(); - String selfTradePreventionModeValueAsString = ""; - selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); - sb.append("selfTradePreventionMode=") - .append(urlEncode(selfTradePreventionModeValueAsString)) - .append(""); - Object goodTillDateValue = getGoodTillDate(); - String goodTillDateValueAsString = ""; - goodTillDateValueAsString = goodTillDateValue.toString(); - sb.append("goodTillDate=").append(urlEncode(goodTillDateValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("symbol"); - openapiFields.add("side"); - openapiFields.add("positionSide"); - openapiFields.add("type"); - openapiFields.add("timeInForce"); - openapiFields.add("quantity"); - openapiFields.add("reduceOnly"); - openapiFields.add("price"); - openapiFields.add("newClientOrderId"); - openapiFields.add("newOrderRespType"); - openapiFields.add("priceMatch"); - openapiFields.add("selfTradePreventionMode"); - openapiFields.add("goodTillDate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * BatchOrdersPlaceMultipleOrdersInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BatchOrdersPlaceMultipleOrdersInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in BatchOrdersPlaceMultipleOrdersInner is" - + " not found in the empty JSON string", - BatchOrdersPlaceMultipleOrdersInner.openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) - && !jsonObj.get("symbol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `symbol` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("symbol").toString())); - } - if ((jsonObj.get("side") != null && !jsonObj.get("side").isJsonNull()) - && !jsonObj.get("side").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `side` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("side").toString())); - } - // validate the optional field `side` - if (jsonObj.get("side") != null && !jsonObj.get("side").isJsonNull()) { - SideEnum.validateJsonElement(jsonObj.get("side")); - } - if ((jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) - && !jsonObj.get("positionSide").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `positionSide` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("positionSide").toString())); - } - // validate the optional field `positionSide` - if (jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) { - PositionSideEnum.validateJsonElement(jsonObj.get("positionSide")); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - if ((jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) - && !jsonObj.get("timeInForce").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `timeInForce` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("timeInForce").toString())); - } - // validate the optional field `timeInForce` - if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { - TimeInForceEnum.validateJsonElement(jsonObj.get("timeInForce")); - } - if ((jsonObj.get("quantity") != null && !jsonObj.get("quantity").isJsonNull()) - && !jsonObj.get("quantity").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `quantity` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("quantity").toString())); - } - if ((jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) - && !jsonObj.get("reduceOnly").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reduceOnly` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reduceOnly").toString())); - } - if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) - && !jsonObj.get("price").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `price` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("price").toString())); - } - if ((jsonObj.get("newClientOrderId") != null - && !jsonObj.get("newClientOrderId").isJsonNull()) - && !jsonObj.get("newClientOrderId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `newClientOrderId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("newClientOrderId").toString())); - } - if ((jsonObj.get("newOrderRespType") != null - && !jsonObj.get("newOrderRespType").isJsonNull()) - && !jsonObj.get("newOrderRespType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `newOrderRespType` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("newOrderRespType").toString())); - } - // validate the optional field `newOrderRespType` - if (jsonObj.get("newOrderRespType") != null - && !jsonObj.get("newOrderRespType").isJsonNull()) { - NewOrderRespTypeEnum.validateJsonElement(jsonObj.get("newOrderRespType")); - } - if ((jsonObj.get("priceMatch") != null && !jsonObj.get("priceMatch").isJsonNull()) - && !jsonObj.get("priceMatch").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `priceMatch` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("priceMatch").toString())); - } - // validate the optional field `priceMatch` - if (jsonObj.get("priceMatch") != null && !jsonObj.get("priceMatch").isJsonNull()) { - PriceMatchEnum.validateJsonElement(jsonObj.get("priceMatch")); - } - if ((jsonObj.get("selfTradePreventionMode") != null - && !jsonObj.get("selfTradePreventionMode").isJsonNull()) - && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `selfTradePreventionMode` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("selfTradePreventionMode").toString())); - } - // validate the optional field `selfTradePreventionMode` - if (jsonObj.get("selfTradePreventionMode") != null - && !jsonObj.get("selfTradePreventionMode").isJsonNull()) { - SelfTradePreventionModeEnum.validateJsonElement(jsonObj.get("selfTradePreventionMode")); - } - if ((jsonObj.get("goodTillDate") != null && !jsonObj.get("goodTillDate").isJsonNull()) - && !jsonObj.get("goodTillDate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `goodTillDate` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("goodTillDate").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BatchOrdersPlaceMultipleOrdersInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BatchOrdersPlaceMultipleOrdersInner' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(BatchOrdersPlaceMultipleOrdersInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, BatchOrdersPlaceMultipleOrdersInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BatchOrdersPlaceMultipleOrdersInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of BatchOrdersPlaceMultipleOrdersInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of BatchOrdersPlaceMultipleOrdersInner - * @throws IOException if the JSON string is invalid with respect to - * BatchOrdersPlaceMultipleOrdersInner - */ - public static BatchOrdersPlaceMultipleOrdersInner fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, BatchOrdersPlaceMultipleOrdersInner.class); - } - - /** - * Convert an instance of BatchOrdersPlaceMultipleOrdersInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelAlgoOrderResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelAlgoOrderResponse.java index 891bd3f1c..dbfdacc27 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelAlgoOrderResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelAlgoOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelAlgoOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelAlgoOrderResponse { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelAllAlgoOpenOrdersResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelAllAlgoOpenOrdersResponse.java index 2d50333c7..af11fd18a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelAllAlgoOpenOrdersResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelAllAlgoOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelAllAlgoOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelAllAlgoOpenOrdersResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelAllOpenOrdersResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelAllOpenOrdersResponse.java index 86caaa1f6..2de8cbfcf 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelAllOpenOrdersResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelAllOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelAllOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelAllOpenOrdersResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelMultipleOrdersResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelMultipleOrdersResponse.java index c8d2d7a45..25fde11a4 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelMultipleOrdersResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelMultipleOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelMultipleOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelMultipleOrdersResponse extends ArrayList { public CancelMultipleOrdersResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelMultipleOrdersResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelMultipleOrdersResponseInner.java index 5704d221d..ed833c8fc 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelMultipleOrdersResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelMultipleOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelMultipleOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelMultipleOrdersResponseInner { public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -48,12 +48,6 @@ public class CancelMultipleOrdersResponseInner { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_QUOTE = "cumQuote"; - - @SerializedName(SERIALIZED_NAME_CUM_QUOTE) - @jakarta.annotation.Nullable - private String cumQuote; - public static final String SERIALIZED_NAME_EXECUTED_QTY = "executedQty"; @SerializedName(SERIALIZED_NAME_EXECUTED_QTY) @@ -72,12 +66,6 @@ public class CancelMultipleOrdersResponseInner { @jakarta.annotation.Nullable private String origQty; - public static final String SERIALIZED_NAME_ORIG_TYPE = "origType"; - - @SerializedName(SERIALIZED_NAME_ORIG_TYPE) - @jakarta.annotation.Nullable - private String origType; - public static final String SERIALIZED_NAME_PRICE = "price"; @SerializedName(SERIALIZED_NAME_PRICE) @@ -132,6 +120,12 @@ public class CancelMultipleOrdersResponseInner { @jakarta.annotation.Nullable private String timeInForce; + public static final String SERIALIZED_NAME_ORIG_TYPE = "origType"; + + @SerializedName(SERIALIZED_NAME_ORIG_TYPE) + @jakarta.annotation.Nullable + private String origType; + public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -208,7 +202,7 @@ public CancelMultipleOrdersResponseInner clientOrderId( } /** - * Get clientOrderId + * Client Order Id. * * @return clientOrderId */ @@ -240,26 +234,6 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public CancelMultipleOrdersResponseInner cumQuote( - @jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - return this; - } - - /** - * Get cumQuote - * - * @return cumQuote - */ - @jakarta.annotation.Nullable - public String getCumQuote() { - return cumQuote; - } - - public void setCumQuote(@jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - } - public CancelMultipleOrdersResponseInner executedQty( @jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; @@ -267,7 +241,7 @@ public CancelMultipleOrdersResponseInner executedQty( } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -286,7 +260,7 @@ public CancelMultipleOrdersResponseInner orderId(@jakarta.annotation.Nullable Lo } /** - * Get orderId + * Order Id. * * @return orderId */ @@ -305,7 +279,7 @@ public CancelMultipleOrdersResponseInner origQty(@jakarta.annotation.Nullable St } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -318,33 +292,13 @@ public void setOrigQty(@jakarta.annotation.Nullable String origQty) { this.origQty = origQty; } - public CancelMultipleOrdersResponseInner origType( - @jakarta.annotation.Nullable String origType) { - this.origType = origType; - return this; - } - - /** - * Get origType - * - * @return origType - */ - @jakarta.annotation.Nullable - public String getOrigType() { - return origType; - } - - public void setOrigType(@jakarta.annotation.Nullable String origType) { - this.origType = origType; - } - public CancelMultipleOrdersResponseInner price(@jakarta.annotation.Nullable String price) { this.price = price; return this; } /** - * Get price + * Price. * * @return price */ @@ -364,7 +318,7 @@ public CancelMultipleOrdersResponseInner reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -383,7 +337,7 @@ public CancelMultipleOrdersResponseInner side(@jakarta.annotation.Nullable Strin } /** - * Get side + * Side. * * @return side */ @@ -403,7 +357,7 @@ public CancelMultipleOrdersResponseInner positionSide( } /** - * Get positionSide + * Position Side. * * @return positionSide */ @@ -422,7 +376,7 @@ public CancelMultipleOrdersResponseInner status(@jakarta.annotation.Nullable Str } /** - * Get status + * Status. * * @return status */ @@ -442,7 +396,7 @@ public CancelMultipleOrdersResponseInner stopPrice( } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -462,7 +416,7 @@ public CancelMultipleOrdersResponseInner closePosition( } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -481,7 +435,7 @@ public CancelMultipleOrdersResponseInner symbol(@jakarta.annotation.Nullable Str } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -501,7 +455,7 @@ public CancelMultipleOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -514,13 +468,33 @@ public void setTimeInForce(@jakarta.annotation.Nullable String timeInForce) { this.timeInForce = timeInForce; } + public CancelMultipleOrdersResponseInner origType( + @jakarta.annotation.Nullable String origType) { + this.origType = origType; + return this; + } + + /** + * Orig Type. + * + * @return origType + */ + @jakarta.annotation.Nullable + public String getOrigType() { + return origType; + } + + public void setOrigType(@jakarta.annotation.Nullable String origType) { + this.origType = origType; + } + public CancelMultipleOrdersResponseInner type(@jakarta.annotation.Nullable String type) { this.type = type; return this; } /** - * Get type + * Type. * * @return type */ @@ -540,7 +514,7 @@ public CancelMultipleOrdersResponseInner activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -560,7 +534,7 @@ public CancelMultipleOrdersResponseInner priceRate( } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -580,7 +554,7 @@ public CancelMultipleOrdersResponseInner updateTime( } /** - * Get updateTime + * Update Time. * * @return updateTime */ @@ -600,7 +574,7 @@ public CancelMultipleOrdersResponseInner workingType( } /** - * Get workingType + * Working Type. * * @return workingType */ @@ -620,7 +594,7 @@ public CancelMultipleOrdersResponseInner priceProtect( } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -640,7 +614,7 @@ public CancelMultipleOrdersResponseInner priceMatch( } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -660,7 +634,7 @@ public CancelMultipleOrdersResponseInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -681,7 +655,7 @@ public CancelMultipleOrdersResponseInner goodTillDate( } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ @@ -744,11 +718,9 @@ public boolean equals(Object o) { (CancelMultipleOrdersResponseInner) o; return Objects.equals(this.clientOrderId, cancelMultipleOrdersResponseInner.clientOrderId) && Objects.equals(this.cumQty, cancelMultipleOrdersResponseInner.cumQty) - && Objects.equals(this.cumQuote, cancelMultipleOrdersResponseInner.cumQuote) && Objects.equals(this.executedQty, cancelMultipleOrdersResponseInner.executedQty) && Objects.equals(this.orderId, cancelMultipleOrdersResponseInner.orderId) && Objects.equals(this.origQty, cancelMultipleOrdersResponseInner.origQty) - && Objects.equals(this.origType, cancelMultipleOrdersResponseInner.origType) && Objects.equals(this.price, cancelMultipleOrdersResponseInner.price) && Objects.equals(this.reduceOnly, cancelMultipleOrdersResponseInner.reduceOnly) && Objects.equals(this.side, cancelMultipleOrdersResponseInner.side) @@ -759,6 +731,7 @@ public boolean equals(Object o) { this.closePosition, cancelMultipleOrdersResponseInner.closePosition) && Objects.equals(this.symbol, cancelMultipleOrdersResponseInner.symbol) && Objects.equals(this.timeInForce, cancelMultipleOrdersResponseInner.timeInForce) + && Objects.equals(this.origType, cancelMultipleOrdersResponseInner.origType) && Objects.equals(this.type, cancelMultipleOrdersResponseInner.type) && Objects.equals( this.activatePrice, cancelMultipleOrdersResponseInner.activatePrice) @@ -780,11 +753,9 @@ public int hashCode() { return Objects.hash( clientOrderId, cumQty, - cumQuote, executedQty, orderId, origQty, - origType, price, reduceOnly, side, @@ -794,6 +765,7 @@ public int hashCode() { closePosition, symbol, timeInForce, + origType, type, activatePrice, priceRate, @@ -813,11 +785,9 @@ public String toString() { sb.append("class CancelMultipleOrdersResponseInner {\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumQuote: ").append(toIndentedString(cumQuote)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); - sb.append(" origType: ").append(toIndentedString(origType)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); @@ -827,6 +797,7 @@ public String toString() { sb.append(" closePosition: ").append(toIndentedString(closePosition)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); + sb.append(" origType: ").append(toIndentedString(origType)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" activatePrice: ").append(toIndentedString(activatePrice)).append("\n"); sb.append(" priceRate: ").append(toIndentedString(priceRate)).append("\n"); @@ -855,10 +826,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = ""; cumQtyValueAsString = cumQtyValue.toString(); sb.append("cumQty=").append(urlEncode(cumQtyValueAsString)).append(""); - Object cumQuoteValue = getCumQuote(); - String cumQuoteValueAsString = ""; - cumQuoteValueAsString = cumQuoteValue.toString(); - sb.append("cumQuote=").append(urlEncode(cumQuoteValueAsString)).append(""); Object executedQtyValue = getExecutedQty(); String executedQtyValueAsString = ""; executedQtyValueAsString = executedQtyValue.toString(); @@ -871,10 +838,6 @@ public String toUrlQueryString() { String origQtyValueAsString = ""; origQtyValueAsString = origQtyValue.toString(); sb.append("origQty=").append(urlEncode(origQtyValueAsString)).append(""); - Object origTypeValue = getOrigType(); - String origTypeValueAsString = ""; - origTypeValueAsString = origTypeValue.toString(); - sb.append("origType=").append(urlEncode(origTypeValueAsString)).append(""); Object priceValue = getPrice(); String priceValueAsString = ""; priceValueAsString = priceValue.toString(); @@ -911,6 +874,10 @@ public String toUrlQueryString() { String timeInForceValueAsString = ""; timeInForceValueAsString = timeInForceValue.toString(); sb.append("timeInForce=").append(urlEncode(timeInForceValueAsString)).append(""); + Object origTypeValue = getOrigType(); + String origTypeValueAsString = ""; + origTypeValueAsString = origTypeValue.toString(); + sb.append("origType=").append(urlEncode(origTypeValueAsString)).append(""); Object typeValue = getType(); String typeValueAsString = ""; typeValueAsString = typeValue.toString(); @@ -987,11 +954,9 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("clientOrderId"); openapiFields.add("cumQty"); - openapiFields.add("cumQuote"); openapiFields.add("executedQty"); openapiFields.add("orderId"); openapiFields.add("origQty"); - openapiFields.add("origType"); openapiFields.add("price"); openapiFields.add("reduceOnly"); openapiFields.add("side"); @@ -1001,6 +966,7 @@ private String toIndentedString(Object o) { openapiFields.add("closePosition"); openapiFields.add("symbol"); openapiFields.add("timeInForce"); + openapiFields.add("origType"); openapiFields.add("type"); openapiFields.add("activatePrice"); openapiFields.add("priceRate"); @@ -1053,14 +1019,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumQuote") != null && !jsonObj.get("cumQuote").isJsonNull()) - && !jsonObj.get("cumQuote").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumQuote` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("cumQuote").toString())); - } if ((jsonObj.get("executedQty") != null && !jsonObj.get("executedQty").isJsonNull()) && !jsonObj.get("executedQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1077,14 +1035,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("origQty").toString())); } - if ((jsonObj.get("origType") != null && !jsonObj.get("origType").isJsonNull()) - && !jsonObj.get("origType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `origType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("origType").toString())); - } if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) && !jsonObj.get("price").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1141,6 +1091,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("timeInForce").toString())); } + if ((jsonObj.get("origType") != null && !jsonObj.get("origType").isJsonNull()) + && !jsonObj.get("origType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `origType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("origType").toString())); + } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelOrderResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelOrderResponse.java index 37837cc6f..1b377d943 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelOrderResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CancelOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelOrderResponse { public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -48,12 +48,6 @@ public class CancelOrderResponse { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_QUOTE = "cumQuote"; - - @SerializedName(SERIALIZED_NAME_CUM_QUOTE) - @jakarta.annotation.Nullable - private String cumQuote; - public static final String SERIALIZED_NAME_EXECUTED_QTY = "executedQty"; @SerializedName(SERIALIZED_NAME_EXECUTED_QTY) @@ -72,24 +66,12 @@ public class CancelOrderResponse { @jakarta.annotation.Nullable private String origQty; - public static final String SERIALIZED_NAME_ORIG_TYPE = "origType"; - - @SerializedName(SERIALIZED_NAME_ORIG_TYPE) - @jakarta.annotation.Nullable - private String origType; - public static final String SERIALIZED_NAME_PRICE = "price"; @SerializedName(SERIALIZED_NAME_PRICE) @jakarta.annotation.Nullable private String price; - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE) - @jakarta.annotation.Nullable - private String avgPrice; - public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) @@ -138,6 +120,12 @@ public class CancelOrderResponse { @jakarta.annotation.Nullable private String timeInForce; + public static final String SERIALIZED_NAME_ORIG_TYPE = "origType"; + + @SerializedName(SERIALIZED_NAME_ORIG_TYPE) + @jakarta.annotation.Nullable + private String origType; + public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -201,7 +189,7 @@ public CancelOrderResponse clientOrderId(@jakarta.annotation.Nullable String cli } /** - * Get clientOrderId + * Client Order Id. * * @return clientOrderId */ @@ -233,32 +221,13 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public CancelOrderResponse cumQuote(@jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - return this; - } - - /** - * Get cumQuote - * - * @return cumQuote - */ - @jakarta.annotation.Nullable - public String getCumQuote() { - return cumQuote; - } - - public void setCumQuote(@jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - } - public CancelOrderResponse executedQty(@jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; return this; } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -277,7 +246,7 @@ public CancelOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Order Id. * * @return orderId */ @@ -296,7 +265,7 @@ public CancelOrderResponse origQty(@jakarta.annotation.Nullable String origQty) } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -309,32 +278,13 @@ public void setOrigQty(@jakarta.annotation.Nullable String origQty) { this.origQty = origQty; } - public CancelOrderResponse origType(@jakarta.annotation.Nullable String origType) { - this.origType = origType; - return this; - } - - /** - * Get origType - * - * @return origType - */ - @jakarta.annotation.Nullable - public String getOrigType() { - return origType; - } - - public void setOrigType(@jakarta.annotation.Nullable String origType) { - this.origType = origType; - } - public CancelOrderResponse price(@jakarta.annotation.Nullable String price) { this.price = price; return this; } /** - * Get price + * Price. * * @return price */ @@ -347,32 +297,13 @@ public void setPrice(@jakarta.annotation.Nullable String price) { this.price = price; } - public CancelOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - return this; - } - - /** - * Get avgPrice - * - * @return avgPrice - */ - @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; - } - - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - } - public CancelOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean reduceOnly) { this.reduceOnly = reduceOnly; return this; } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -391,7 +322,7 @@ public CancelOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Side. * * @return side */ @@ -410,7 +341,7 @@ public CancelOrderResponse positionSide(@jakarta.annotation.Nullable String posi } /** - * Get positionSide + * Position Side. * * @return positionSide */ @@ -429,7 +360,7 @@ public CancelOrderResponse status(@jakarta.annotation.Nullable String status) { } /** - * Get status + * Status. * * @return status */ @@ -448,7 +379,7 @@ public CancelOrderResponse stopPrice(@jakarta.annotation.Nullable String stopPri } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -467,7 +398,7 @@ public CancelOrderResponse closePosition(@jakarta.annotation.Nullable Boolean cl } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -486,7 +417,7 @@ public CancelOrderResponse symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -505,7 +436,7 @@ public CancelOrderResponse timeInForce(@jakarta.annotation.Nullable String timeI } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -518,13 +449,32 @@ public void setTimeInForce(@jakarta.annotation.Nullable String timeInForce) { this.timeInForce = timeInForce; } + public CancelOrderResponse origType(@jakarta.annotation.Nullable String origType) { + this.origType = origType; + return this; + } + + /** + * Orig Type. + * + * @return origType + */ + @jakarta.annotation.Nullable + public String getOrigType() { + return origType; + } + + public void setOrigType(@jakarta.annotation.Nullable String origType) { + this.origType = origType; + } + public CancelOrderResponse type(@jakarta.annotation.Nullable String type) { this.type = type; return this; } /** - * Get type + * Type. * * @return type */ @@ -543,7 +493,7 @@ public CancelOrderResponse activatePrice(@jakarta.annotation.Nullable String act } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -562,7 +512,7 @@ public CancelOrderResponse priceRate(@jakarta.annotation.Nullable String priceRa } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -581,7 +531,7 @@ public CancelOrderResponse updateTime(@jakarta.annotation.Nullable Long updateTi } /** - * Get updateTime + * Update Time. * * @return updateTime */ @@ -600,7 +550,7 @@ public CancelOrderResponse workingType(@jakarta.annotation.Nullable String worki } /** - * Get workingType + * Working Type. * * @return workingType */ @@ -619,7 +569,7 @@ public CancelOrderResponse priceProtect(@jakarta.annotation.Nullable Boolean pri } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -638,7 +588,7 @@ public CancelOrderResponse priceMatch(@jakarta.annotation.Nullable String priceM } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -658,7 +608,7 @@ public CancelOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -678,7 +628,7 @@ public CancelOrderResponse goodTillDate(@jakarta.annotation.Nullable Long goodTi } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ @@ -702,13 +652,10 @@ public boolean equals(Object o) { CancelOrderResponse cancelOrderResponse = (CancelOrderResponse) o; return Objects.equals(this.clientOrderId, cancelOrderResponse.clientOrderId) && Objects.equals(this.cumQty, cancelOrderResponse.cumQty) - && Objects.equals(this.cumQuote, cancelOrderResponse.cumQuote) && Objects.equals(this.executedQty, cancelOrderResponse.executedQty) && Objects.equals(this.orderId, cancelOrderResponse.orderId) && Objects.equals(this.origQty, cancelOrderResponse.origQty) - && Objects.equals(this.origType, cancelOrderResponse.origType) && Objects.equals(this.price, cancelOrderResponse.price) - && Objects.equals(this.avgPrice, cancelOrderResponse.avgPrice) && Objects.equals(this.reduceOnly, cancelOrderResponse.reduceOnly) && Objects.equals(this.side, cancelOrderResponse.side) && Objects.equals(this.positionSide, cancelOrderResponse.positionSide) @@ -717,6 +664,7 @@ public boolean equals(Object o) { && Objects.equals(this.closePosition, cancelOrderResponse.closePosition) && Objects.equals(this.symbol, cancelOrderResponse.symbol) && Objects.equals(this.timeInForce, cancelOrderResponse.timeInForce) + && Objects.equals(this.origType, cancelOrderResponse.origType) && Objects.equals(this.type, cancelOrderResponse.type) && Objects.equals(this.activatePrice, cancelOrderResponse.activatePrice) && Objects.equals(this.priceRate, cancelOrderResponse.priceRate) @@ -734,13 +682,10 @@ public int hashCode() { return Objects.hash( clientOrderId, cumQty, - cumQuote, executedQty, orderId, origQty, - origType, price, - avgPrice, reduceOnly, side, positionSide, @@ -749,6 +694,7 @@ public int hashCode() { closePosition, symbol, timeInForce, + origType, type, activatePrice, priceRate, @@ -766,13 +712,10 @@ public String toString() { sb.append("class CancelOrderResponse {\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumQuote: ").append(toIndentedString(cumQuote)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); - sb.append(" origType: ").append(toIndentedString(origType)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); sb.append(" positionSide: ").append(toIndentedString(positionSide)).append("\n"); @@ -781,6 +724,7 @@ public String toString() { sb.append(" closePosition: ").append(toIndentedString(closePosition)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); + sb.append(" origType: ").append(toIndentedString(origType)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" activatePrice: ").append(toIndentedString(activatePrice)).append("\n"); sb.append(" priceRate: ").append(toIndentedString(priceRate)).append("\n"); @@ -807,10 +751,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = ""; cumQtyValueAsString = cumQtyValue.toString(); sb.append("cumQty=").append(urlEncode(cumQtyValueAsString)).append(""); - Object cumQuoteValue = getCumQuote(); - String cumQuoteValueAsString = ""; - cumQuoteValueAsString = cumQuoteValue.toString(); - sb.append("cumQuote=").append(urlEncode(cumQuoteValueAsString)).append(""); Object executedQtyValue = getExecutedQty(); String executedQtyValueAsString = ""; executedQtyValueAsString = executedQtyValue.toString(); @@ -823,18 +763,10 @@ public String toUrlQueryString() { String origQtyValueAsString = ""; origQtyValueAsString = origQtyValue.toString(); sb.append("origQty=").append(urlEncode(origQtyValueAsString)).append(""); - Object origTypeValue = getOrigType(); - String origTypeValueAsString = ""; - origTypeValueAsString = origTypeValue.toString(); - sb.append("origType=").append(urlEncode(origTypeValueAsString)).append(""); Object priceValue = getPrice(); String priceValueAsString = ""; priceValueAsString = priceValue.toString(); sb.append("price=").append(urlEncode(priceValueAsString)).append(""); - Object avgPriceValue = getAvgPrice(); - String avgPriceValueAsString = ""; - avgPriceValueAsString = avgPriceValue.toString(); - sb.append("avgPrice=").append(urlEncode(avgPriceValueAsString)).append(""); Object reduceOnlyValue = getReduceOnly(); String reduceOnlyValueAsString = ""; reduceOnlyValueAsString = reduceOnlyValue.toString(); @@ -867,6 +799,10 @@ public String toUrlQueryString() { String timeInForceValueAsString = ""; timeInForceValueAsString = timeInForceValue.toString(); sb.append("timeInForce=").append(urlEncode(timeInForceValueAsString)).append(""); + Object origTypeValue = getOrigType(); + String origTypeValueAsString = ""; + origTypeValueAsString = origTypeValue.toString(); + sb.append("origType=").append(urlEncode(origTypeValueAsString)).append(""); Object typeValue = getType(); String typeValueAsString = ""; typeValueAsString = typeValue.toString(); @@ -935,13 +871,10 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("clientOrderId"); openapiFields.add("cumQty"); - openapiFields.add("cumQuote"); openapiFields.add("executedQty"); openapiFields.add("orderId"); openapiFields.add("origQty"); - openapiFields.add("origType"); openapiFields.add("price"); - openapiFields.add("avgPrice"); openapiFields.add("reduceOnly"); openapiFields.add("side"); openapiFields.add("positionSide"); @@ -950,6 +883,7 @@ private String toIndentedString(Object o) { openapiFields.add("closePosition"); openapiFields.add("symbol"); openapiFields.add("timeInForce"); + openapiFields.add("origType"); openapiFields.add("type"); openapiFields.add("activatePrice"); openapiFields.add("priceRate"); @@ -998,14 +932,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumQuote") != null && !jsonObj.get("cumQuote").isJsonNull()) - && !jsonObj.get("cumQuote").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumQuote` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("cumQuote").toString())); - } if ((jsonObj.get("executedQty") != null && !jsonObj.get("executedQty").isJsonNull()) && !jsonObj.get("executedQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1022,14 +948,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("origQty").toString())); } - if ((jsonObj.get("origType") != null && !jsonObj.get("origType").isJsonNull()) - && !jsonObj.get("origType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `origType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("origType").toString())); - } if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) && !jsonObj.get("price").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1038,14 +956,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("price").toString())); } - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("side") != null && !jsonObj.get("side").isJsonNull()) && !jsonObj.get("side").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1094,6 +1004,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("timeInForce").toString())); } + if ((jsonObj.get("origType") != null && !jsonObj.get("origType").isJsonNull()) + && !jsonObj.get("origType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `origType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("origType").toString())); + } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeInitialLeverageRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeInitialLeverageRequest.java index 6523a2465..16db25bb5 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeInitialLeverageRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeInitialLeverageRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangeInitialLeverageRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeInitialLeverageRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -82,12 +82,14 @@ public ChangeInitialLeverageRequest leverage(@jakarta.annotation.Nonnull Long le } /** - * Get leverage + * target initial leverage minimum: 1 maximum: 125 * * @return leverage */ @jakarta.annotation.Nonnull @NotNull + @Min(1L) + @Max(125L) public Long getLeverage() { return leverage; } @@ -102,11 +104,12 @@ public ChangeInitialLeverageRequest recvWindow(@jakarta.annotation.Nullable Long } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeInitialLeverageResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeInitialLeverageResponse.java index b3baecabd..1a0198eaa 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeInitialLeverageResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeInitialLeverageResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangeInitialLeverageResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeInitialLeverageResponse { public static final String SERIALIZED_NAME_LEVERAGE = "leverage"; @@ -62,7 +62,7 @@ public ChangeInitialLeverageResponse leverage(@jakarta.annotation.Nullable Long } /** - * Get leverage + * Leverage. * * @return leverage */ @@ -82,7 +82,7 @@ public ChangeInitialLeverageResponse maxNotionalValue( } /** - * Get maxNotionalValue + * Max Notional Value. * * @return maxNotionalValue */ @@ -101,7 +101,7 @@ public ChangeInitialLeverageResponse symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * Symbol. * * @return symbol */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeMarginTypeRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeMarginTypeRequest.java index ca25dde98..840ed23a0 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeMarginTypeRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeMarginTypeRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** ChangeMarginTypeRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeMarginTypeRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -104,11 +104,12 @@ public ChangeMarginTypeRequest recvWindow(@jakarta.annotation.Nullable Long recv } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeMarginTypeResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeMarginTypeResponse.java index 13861da93..7d2ec6faf 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeMarginTypeResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeMarginTypeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangeMarginTypeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeMarginTypeResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeMultiAssetsModeRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeMultiAssetsModeRequest.java index 1b7850aeb..b351530db 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeMultiAssetsModeRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeMultiAssetsModeRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangeMultiAssetsModeRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeMultiAssetsModeRequest { public static final String SERIALIZED_NAME_MULTI_ASSETS_MARGIN = "multiAssetsMargin"; @@ -57,7 +57,7 @@ public ChangeMultiAssetsModeRequest multiAssetsMargin( } /** - * Get multiAssetsMargin + * \"true\": Multi-Assets Mode; \"false\": Single-Asset Mode * * @return multiAssetsMargin */ @@ -77,11 +77,12 @@ public ChangeMultiAssetsModeRequest recvWindow(@jakarta.annotation.Nullable Long } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeMultiAssetsModeResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeMultiAssetsModeResponse.java index e42a89e9a..5b3fee04f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeMultiAssetsModeResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangeMultiAssetsModeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangeMultiAssetsModeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeMultiAssetsModeResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangePositionModeRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangePositionModeRequest.java index bd3760ab9..7056d9c68 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangePositionModeRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangePositionModeRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangePositionModeRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangePositionModeRequest { public static final String SERIALIZED_NAME_DUAL_SIDE_POSITION = "dualSidePosition"; @@ -57,7 +57,7 @@ public ChangePositionModeRequest dualSidePosition( } /** - * Get dualSidePosition + * \"true\": Hedge Mode; \"false\": One-way Mode * * @return dualSidePosition */ @@ -77,11 +77,12 @@ public ChangePositionModeRequest recvWindow(@jakarta.annotation.Nullable Long re } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangePositionModeResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangePositionModeResponse.java index 8363a80bd..a3cceacff 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangePositionModeResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ChangePositionModeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangePositionModeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangePositionModeResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CheckServerTimeResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CheckServerTimeResponse.java index 9fb086191..7f78b0a85 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CheckServerTimeResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CheckServerTimeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CheckServerTimeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CheckServerTimeResponse { public static final String SERIALIZED_NAME_SERVER_TIME = "serverTime"; @@ -50,7 +50,7 @@ public CheckServerTimeResponse serverTime(@jakarta.annotation.Nullable Long serv } /** - * Get serverTime + * Server Time. * * @return serverTime */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ClassicPortfolioMarginAccountInformationResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ClassicPortfolioMarginAccountInformationResponse.java index c07b1e676..d473ffbf1 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ClassicPortfolioMarginAccountInformationResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ClassicPortfolioMarginAccountInformationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ClassicPortfolioMarginAccountInformationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ClassicPortfolioMarginAccountInformationResponse { public static final String SERIALIZED_NAME_MAX_WITHDRAW_AMOUNT_U_S_D = "maxWithdrawAmountUSD"; @@ -63,7 +63,7 @@ public ClassicPortfolioMarginAccountInformationResponse maxWithdrawAmountUSD( } /** - * Get maxWithdrawAmountUSD + * Classic Portfolio margin maximum virtual amount for transfer out in USD * * @return maxWithdrawAmountUSD */ @@ -103,7 +103,7 @@ public ClassicPortfolioMarginAccountInformationResponse maxWithdrawAmount( } /** - * Get maxWithdrawAmount + * maximum amount for transfer out * * @return maxWithdrawAmount */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ClosePosition.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ClosePosition.java new file mode 100644 index 000000000..96642357b --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ClosePosition.java @@ -0,0 +1,73 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Close-All,used with `STOP_MARKET` or `TAKE_PROFIT_MARKET`.\" */ +@JsonAdapter(ClosePosition.Adapter.class) +public enum ClosePosition { + TRUE("true"), + + FALSE("false"); + + private String value; + + ClosePosition(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ClosePosition fromValue(String value) { + for (ClosePosition b : ClosePosition.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ClosePosition enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ClosePosition read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ClosePosition.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ClosePosition.fromValue(value); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompositeIndexSymbolInformationResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompositeIndexSymbolInformationResponse.java index c01f44253..81cd83f22 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompositeIndexSymbolInformationResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompositeIndexSymbolInformationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CompositeIndexSymbolInformationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CompositeIndexSymbolInformationResponse extends ArrayList { public CompositeIndexSymbolInformationResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompositeIndexSymbolInformationResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompositeIndexSymbolInformationResponseInner.java index ac828a388..97a562266 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompositeIndexSymbolInformationResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompositeIndexSymbolInformationResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** CompositeIndexSymbolInformationResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CompositeIndexSymbolInformationResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -96,7 +96,7 @@ public CompositeIndexSymbolInformationResponseInner time( } /** - * Get time + * Current time * * @return time */ @@ -116,7 +116,7 @@ public CompositeIndexSymbolInformationResponseInner component( } /** - * Get component + * Component asset * * @return component */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompositeIndexSymbolInformationResponseInnerBaseAssetListInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompositeIndexSymbolInformationResponseInnerBaseAssetListInner.java index b1ac967ed..a1639d300 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompositeIndexSymbolInformationResponseInnerBaseAssetListInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompositeIndexSymbolInformationResponseInnerBaseAssetListInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CompositeIndexSymbolInformationResponseInnerBaseAssetListInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CompositeIndexSymbolInformationResponseInnerBaseAssetListInner { public static final String SERIALIZED_NAME_BASE_ASSET = "baseAsset"; @@ -69,7 +69,7 @@ public CompositeIndexSymbolInformationResponseInnerBaseAssetListInner baseAsset( } /** - * Get baseAsset + * Base Asset. * * @return baseAsset */ @@ -89,7 +89,7 @@ public CompositeIndexSymbolInformationResponseInnerBaseAssetListInner quoteAsset } /** - * Get quoteAsset + * Quote Asset. * * @return quoteAsset */ @@ -109,7 +109,7 @@ public CompositeIndexSymbolInformationResponseInnerBaseAssetListInner weightInQu } /** - * Get weightInQuantity + * Weight In Quantity. * * @return weightInQuantity */ @@ -129,7 +129,7 @@ public CompositeIndexSymbolInformationResponseInnerBaseAssetListInner weightInPe } /** - * Get weightInPercentage + * Weight In Percentage. * * @return weightInPercentage */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompressedAggregateTradesListResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompressedAggregateTradesListResponse.java index b078fc66f..5a8d30e45 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompressedAggregateTradesListResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompressedAggregateTradesListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CompressedAggregateTradesListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CompressedAggregateTradesListResponse extends ArrayList { public CompressedAggregateTradesListResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompressedAggregateTradesListResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompressedAggregateTradesListResponseInner.java index 356b1b5c5..11b078562 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompressedAggregateTradesListResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CompressedAggregateTradesListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CompressedAggregateTradesListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CompressedAggregateTradesListResponseInner { public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; @@ -54,6 +54,12 @@ public class CompressedAggregateTradesListResponseInner { @jakarta.annotation.Nullable private String qLowerCase; + public static final String SERIALIZED_NAME_NQ = "nq"; + + @SerializedName(SERIALIZED_NAME_NQ) + @jakarta.annotation.Nullable + private String nq; + public static final String SERIALIZED_NAME_F_LOWER_CASE = "f"; @SerializedName(SERIALIZED_NAME_F_LOWER_CASE) @@ -87,7 +93,7 @@ public CompressedAggregateTradesListResponseInner aLowerCase( } /** - * Get aLowerCase + * Aggregate tradeId * * @return aLowerCase */ @@ -107,7 +113,7 @@ public CompressedAggregateTradesListResponseInner pLowerCase( } /** - * Get pLowerCase + * Price * * @return pLowerCase */ @@ -127,7 +133,7 @@ public CompressedAggregateTradesListResponseInner qLowerCase( } /** - * Get qLowerCase + * Quantity * * @return qLowerCase */ @@ -140,6 +146,25 @@ public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { this.qLowerCase = qLowerCase; } + public CompressedAggregateTradesListResponseInner nq(@jakarta.annotation.Nullable String nq) { + this.nq = nq; + return this; + } + + /** + * Normal quantity without the trades involving RPI orders + * + * @return nq + */ + @jakarta.annotation.Nullable + public String getNq() { + return nq; + } + + public void setNq(@jakarta.annotation.Nullable String nq) { + this.nq = nq; + } + public CompressedAggregateTradesListResponseInner fLowerCase( @jakarta.annotation.Nullable Long fLowerCase) { this.fLowerCase = fLowerCase; @@ -147,7 +172,7 @@ public CompressedAggregateTradesListResponseInner fLowerCase( } /** - * Get fLowerCase + * First tradeId * * @return fLowerCase */ @@ -167,7 +192,7 @@ public CompressedAggregateTradesListResponseInner lLowerCase( } /** - * Get lLowerCase + * Last tradeId * * @return lLowerCase */ @@ -186,7 +211,7 @@ public CompressedAggregateTradesListResponseInner T(@jakarta.annotation.Nullable } /** - * Get T + * Timestamp * * @return T */ @@ -206,7 +231,7 @@ public CompressedAggregateTradesListResponseInner mLowerCase( } /** - * Get mLowerCase + * Was the buyer the maker? * * @return mLowerCase */ @@ -235,6 +260,7 @@ public boolean equals(Object o) { this.pLowerCase, compressedAggregateTradesListResponseInner.pLowerCase) && Objects.equals( this.qLowerCase, compressedAggregateTradesListResponseInner.qLowerCase) + && Objects.equals(this.nq, compressedAggregateTradesListResponseInner.nq) && Objects.equals( this.fLowerCase, compressedAggregateTradesListResponseInner.fLowerCase) && Objects.equals( @@ -247,7 +273,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - aLowerCase, pLowerCase, qLowerCase, fLowerCase, lLowerCase, T, mLowerCase); + aLowerCase, pLowerCase, qLowerCase, nq, fLowerCase, lLowerCase, T, mLowerCase); } @Override @@ -257,6 +283,7 @@ public String toString() { sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append(" nq: ").append(toIndentedString(nq)).append("\n"); sb.append(" fLowerCase: ").append(toIndentedString(fLowerCase)).append("\n"); sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); sb.append(" T: ").append(toIndentedString(T)).append("\n"); @@ -280,6 +307,10 @@ public String toUrlQueryString() { String qLowerCaseValueAsString = ""; qLowerCaseValueAsString = qLowerCaseValue.toString(); sb.append("qLowerCase=").append(urlEncode(qLowerCaseValueAsString)).append(""); + Object nqValue = getNq(); + String nqValueAsString = ""; + nqValueAsString = nqValue.toString(); + sb.append("nq=").append(urlEncode(nqValueAsString)).append(""); Object fLowerCaseValue = getfLowerCase(); String fLowerCaseValueAsString = ""; fLowerCaseValueAsString = fLowerCaseValue.toString(); @@ -327,6 +358,7 @@ private String toIndentedString(Object o) { openapiFields.add("a"); openapiFields.add("p"); openapiFields.add("q"); + openapiFields.add("nq"); openapiFields.add("f"); openapiFields.add("l"); openapiFields.add("T"); @@ -373,6 +405,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("q").toString())); } + if ((jsonObj.get("nq") != null && !jsonObj.get("nq").isJsonNull()) + && !jsonObj.get("nq").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `nq` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("nq").toString())); + } } 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/rest/model/ContinuousContractKlineCandlestickDataItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContinuousContractKlineCandlestickDataItem.java new file mode 100644 index 000000000..4c8d1baf1 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContinuousContractKlineCandlestickDataItem.java @@ -0,0 +1,193 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** ContinuousContractKlineCandlestickDataItem */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ContinuousContractKlineCandlestickDataItem extends ArrayList { + public ContinuousContractKlineCandlestickDataItem() {} + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContinuousContractKlineCandlestickDataItem {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ContinuousContractKlineCandlestickDataItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be a array type in the JSON string but got" + + " `%s`", + jsonElement.toString())); + } + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for (JsonElement element : array) { + ContinuousContractKlineCandlestickDataItemInner.validateJsonElement(element); + } + if (jsonElement == null) { + if (!ContinuousContractKlineCandlestickDataItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " ContinuousContractKlineCandlestickDataItem is not found in" + + " the empty JSON string", + ContinuousContractKlineCandlestickDataItem.openapiRequiredFields + .toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ContinuousContractKlineCandlestickDataItem.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'ContinuousContractKlineCandlestickDataItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ContinuousContractKlineCandlestickDataItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, ContinuousContractKlineCandlestickDataItem value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); + elementAdapter.write(out, obj); + } + + @Override + public ContinuousContractKlineCandlestickDataItem read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ContinuousContractKlineCandlestickDataItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of ContinuousContractKlineCandlestickDataItem + * @throws IOException if the JSON string is invalid with respect to + * ContinuousContractKlineCandlestickDataItem + */ + public static ContinuousContractKlineCandlestickDataItem fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, ContinuousContractKlineCandlestickDataItem.class); + } + + /** + * Convert an instance of ContinuousContractKlineCandlestickDataItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContinuousContractKlineCandlestickDataItemInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContinuousContractKlineCandlestickDataItemInner.java new file mode 100644 index 000000000..87dd227d3 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContinuousContractKlineCandlestickDataItemInner.java @@ -0,0 +1,317 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.common.AbstractOpenApiSchema; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonPrimitive; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.hibernate.validator.constraints.*; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ContinuousContractKlineCandlestickDataItemInner extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(ContinuousContractKlineCandlestickDataItemInner.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ContinuousContractKlineCandlestickDataItemInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'ContinuousContractKlineCandlestickDataItemInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterLong = + gson.getDelegateAdapter(this, TypeToken.get(Long.class)); + final TypeAdapter adapterString = + gson.getDelegateAdapter(this, TypeToken.get(String.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, + ContinuousContractKlineCandlestickDataItemInner value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `Long` + if (value.getActualInstance() instanceof Long) { + JsonPrimitive primitive = + adapterLong + .toJsonTree((Long) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + // check if the actual instance is of the type `String` + if (value.getActualInstance() instanceof String) { + JsonPrimitive primitive = + adapterString + .toJsonTree((String) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " Long, String"); + } + + @Override + public ContinuousContractKlineCandlestickDataItemInner read(JsonReader in) + throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize Long + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterLong; + match++; + log.log(Level.FINER, "Input data matches schema 'Long'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for Long failed with `%s`.", + e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Long'", e); + } + // deserialize String + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterString; + match++; + log.log(Level.FINER, "Input data matches schema 'String'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for String failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'String'", + e); + } + + if (match == 1) { + ContinuousContractKlineCandlestickDataItemInner ret = + new ContinuousContractKlineCandlestickDataItemInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for" + + " ContinuousContractKlineCandlestickDataItemInner:" + + " %d classes match result, expected 1. Detailed" + + " failure message for oneOf schemas: %s. JSON:" + + " %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public ContinuousContractKlineCandlestickDataItemInner() { + super("oneOf", Boolean.FALSE); + } + + public ContinuousContractKlineCandlestickDataItemInner(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Long", Long.class); + schemas.put("String", String.class); + } + + @Override + public Map> getSchemas() { + return ContinuousContractKlineCandlestickDataItemInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: Long, String + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof Long) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof String) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Long, String"); + } + + /** + * Get the actual instance, which can be the following: Long, String + * + * @return The actual instance (Long, String) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Long`. If the actual instance is not `Long`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `Long` + * @throws ClassCastException if the instance is not `Long` + */ + public Long getLong() throws ClassCastException { + return (Long) super.getActualInstance(); + } + + /** + * Get the actual instance of `String`. If the actual instance is not `String`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String) super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ContinuousContractKlineCandlestickDataItemInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with Long + try { + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for Long failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with String + try { + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for String failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for" + + " ContinuousContractKlineCandlestickDataItemInner with oneOf" + + " schemas: Long, String. %d class(es) match the result, expected" + + " 1. Detailed failure message for oneOf schemas: %s. JSON: %s", + validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of ContinuousContractKlineCandlestickDataItemInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ContinuousContractKlineCandlestickDataItemInner + * @throws IOException if the JSON string is invalid with respect to + * ContinuousContractKlineCandlestickDataItemInner + */ + public static ContinuousContractKlineCandlestickDataItemInner fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, ContinuousContractKlineCandlestickDataItemInner.class); + } + + /** + * Convert an instance of ContinuousContractKlineCandlestickDataItemInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContinuousContractKlineCandlestickDataResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContinuousContractKlineCandlestickDataResponse.java index de1926d5a..50b0b87a0 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContinuousContractKlineCandlestickDataResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContinuousContractKlineCandlestickDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,9 +34,9 @@ /** ContinuousContractKlineCandlestickDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ContinuousContractKlineCandlestickDataResponse - extends ArrayList { + extends ArrayList { public ContinuousContractKlineCandlestickDataResponse() {} @Override @@ -118,7 +118,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - ContinuousContractKlineCandlestickDataResponseItem.validateJsonElement(element); + ContinuousContractKlineCandlestickDataItem.validateJsonElement(element); } if (jsonElement == null) { if (!ContinuousContractKlineCandlestickDataResponse.openapiRequiredFields diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContinuousContractKlineCandlestickDataResponseItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContinuousContractKlineCandlestickDataResponseItem.java deleted file mode 100644 index 0239fdb1c..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContinuousContractKlineCandlestickDataResponseItem.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** ContinuousContractKlineCandlestickDataResponseItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ContinuousContractKlineCandlestickDataResponseItem extends ArrayList { - public ContinuousContractKlineCandlestickDataResponseItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ContinuousContractKlineCandlestickDataResponseItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ContinuousContractKlineCandlestickDataResponseItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - ContinuousContractKlineCandlestickDataResponseItemInner.validateJsonElement(element); - } - if (jsonElement == null) { - if (!ContinuousContractKlineCandlestickDataResponseItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " ContinuousContractKlineCandlestickDataResponseItem is not" - + " found in the empty JSON string", - ContinuousContractKlineCandlestickDataResponseItem - .openapiRequiredFields - .toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ContinuousContractKlineCandlestickDataResponseItem.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'ContinuousContractKlineCandlestickDataResponseItem' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, - TypeToken.get( - ContinuousContractKlineCandlestickDataResponseItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, - ContinuousContractKlineCandlestickDataResponseItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public ContinuousContractKlineCandlestickDataResponseItem read( - JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ContinuousContractKlineCandlestickDataResponseItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of ContinuousContractKlineCandlestickDataResponseItem - * @throws IOException if the JSON string is invalid with respect to - * ContinuousContractKlineCandlestickDataResponseItem - */ - public static ContinuousContractKlineCandlestickDataResponseItem fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, ContinuousContractKlineCandlestickDataResponseItem.class); - } - - /** - * Convert an instance of ContinuousContractKlineCandlestickDataResponseItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContinuousContractKlineCandlestickDataResponseItemInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContinuousContractKlineCandlestickDataResponseItemInner.java deleted file mode 100644 index 477b039ef..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContinuousContractKlineCandlestickDataResponseItemInner.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonPrimitive; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ContinuousContractKlineCandlestickDataResponseItemInner extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger( - ContinuousContractKlineCandlestickDataResponseItemInner.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ContinuousContractKlineCandlestickDataResponseItemInner.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'ContinuousContractKlineCandlestickDataResponseItemInner' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterLong = - gson.getDelegateAdapter(this, TypeToken.get(Long.class)); - final TypeAdapter adapterString = - gson.getDelegateAdapter(this, TypeToken.get(String.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, - ContinuousContractKlineCandlestickDataResponseItemInner value) - throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `Long` - if (value.getActualInstance() instanceof Long) { - JsonPrimitive primitive = - adapterLong - .toJsonTree((Long) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - // check if the actual instance is of the type `String` - if (value.getActualInstance() instanceof String) { - JsonPrimitive primitive = - adapterString - .toJsonTree((String) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " Long, String"); - } - - @Override - public ContinuousContractKlineCandlestickDataResponseItemInner read( - JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize Long - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterLong; - match++; - log.log(Level.FINER, "Input data matches schema 'Long'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for Long failed with `%s`.", - e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Long'", e); - } - // deserialize String - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterString; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for String failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'String'", - e); - } - - if (match == 1) { - ContinuousContractKlineCandlestickDataResponseItemInner ret = - new ContinuousContractKlineCandlestickDataResponseItemInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for" - + " ContinuousContractKlineCandlestickDataResponseItemInner:" - + " %d classes match result, expected 1. Detailed" - + " failure message for oneOf schemas: %s. JSON:" - + " %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public ContinuousContractKlineCandlestickDataResponseItemInner() { - super("oneOf", Boolean.FALSE); - } - - public ContinuousContractKlineCandlestickDataResponseItemInner(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Long", Long.class); - schemas.put("String", String.class); - } - - @Override - public Map> getSchemas() { - return ContinuousContractKlineCandlestickDataResponseItemInner.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Long, String - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof Long) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof String) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Long, String"); - } - - /** - * Get the actual instance, which can be the following: Long, String - * - * @return The actual instance (Long, String) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Long`. If the actual instance is not `Long`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Long` - * @throws ClassCastException if the instance is not `Long` - */ - public Long getLong() throws ClassCastException { - return (Long) super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ContinuousContractKlineCandlestickDataResponseItemInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Long - try { - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for Long failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with String - try { - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for String failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for" - + " ContinuousContractKlineCandlestickDataResponseItemInner with" - + " oneOf schemas: Long, String. %d class(es) match the result," - + " expected 1. Detailed failure message for oneOf schemas: %s." - + " JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of ContinuousContractKlineCandlestickDataResponseItemInner given an JSON - * string - * - * @param jsonString JSON string - * @return An instance of ContinuousContractKlineCandlestickDataResponseItemInner - * @throws IOException if the JSON string is invalid with respect to - * ContinuousContractKlineCandlestickDataResponseItemInner - */ - public static ContinuousContractKlineCandlestickDataResponseItemInner fromJson( - String jsonString) throws IOException { - return JSON.getGson() - .fromJson( - jsonString, ContinuousContractKlineCandlestickDataResponseItemInner.class); - } - - /** - * Convert an instance of ContinuousContractKlineCandlestickDataResponseItemInner to an JSON - * string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContractType.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContractType.java index 84af5ad4a..b06d5ded4 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContractType.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ContractType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -26,15 +26,11 @@ public enum ContractType { PERPETUAL("PERPETUAL"), - CURRENT_MONTH("CURRENT_MONTH"), - - NEXT_MONTH("NEXT_MONTH"), - CURRENT_QUARTER("CURRENT_QUARTER"), NEXT_QUARTER("NEXT_QUARTER"), - PERPETUAL_DELIVERING("PERPETUAL_DELIVERING"); + TRADIFI_PERPETUAL("TRADIFI_PERPETUAL"); private String value; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CurrentAllAlgoOpenOrdersResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CurrentAllAlgoOpenOrdersResponse.java index 6568b91c6..6d660ffce 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CurrentAllAlgoOpenOrdersResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CurrentAllAlgoOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CurrentAllAlgoOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CurrentAllAlgoOpenOrdersResponse extends ArrayList { public CurrentAllAlgoOpenOrdersResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CurrentAllAlgoOpenOrdersResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CurrentAllAlgoOpenOrdersResponseInner.java index 96e2370b6..cdaf1080f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CurrentAllAlgoOpenOrdersResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CurrentAllAlgoOpenOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CurrentAllAlgoOpenOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CurrentAllAlgoOpenOrdersResponseInner { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CurrentAllOpenOrdersResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CurrentAllOpenOrdersResponse.java index 6379f1204..00d9c15f6 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CurrentAllOpenOrdersResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/CurrentAllOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CurrentAllOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CurrentAllOpenOrdersResponse extends ArrayList { public CurrentAllOpenOrdersResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponse.java index 0367c4226..85fa07b20 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** ExchangeInformationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInformationResponse { public static final String SERIALIZED_NAME_EXCHANGE_FILTERS = "exchangeFilters"; @@ -125,7 +125,7 @@ public ExchangeInformationResponse addRateLimitsItem( } /** - * Get rateLimits + * Rate Limits. * * @return rateLimits */ @@ -147,7 +147,8 @@ public ExchangeInformationResponse serverTime(@jakarta.annotation.Nullable Long } /** - * Get serverTime + * Ignore please. If you want to check current server time, please check via \"GET + * /fapi/v1/time\" * * @return serverTime */ @@ -177,7 +178,7 @@ public ExchangeInformationResponse addAssetsItem( } /** - * Get assets + * assets information * * @return assets */ @@ -210,7 +211,7 @@ public ExchangeInformationResponse addSymbolsItem( } /** - * Get symbols + * Symbols. * * @return symbols */ @@ -232,7 +233,7 @@ public ExchangeInformationResponse timezone(@jakarta.annotation.Nullable String } /** - * Get timezone + * Timezone. * * @return timezone */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponseAssetsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponseAssetsInner.java index 88bf3102f..20de1aacc 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponseAssetsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponseAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** ExchangeInformationResponseAssetsInner */ +/** assets information */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInformationResponseAssetsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -82,7 +82,7 @@ public ExchangeInformationResponseAssetsInner marginAvailable( } /** - * Get marginAvailable + * whether the asset can be used as margin in Multi-Assets mode * * @return marginAvailable */ @@ -102,7 +102,7 @@ public ExchangeInformationResponseAssetsInner autoAssetExchange( } /** - * Get autoAssetExchange + * auto-exchange threshold in Multi-Assets margin mode * * @return autoAssetExchange */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponseRateLimitsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponseRateLimitsInner.java index a618a581e..12f8b6a44 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponseRateLimitsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponseRateLimitsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** ExchangeInformationResponseRateLimitsInner */ +/** API */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInformationResponseRateLimitsInner { public static final String SERIALIZED_NAME_INTERVAL = "interval"; @@ -69,7 +69,7 @@ public ExchangeInformationResponseRateLimitsInner interval( } /** - * Get interval + * Interval. * * @return interval */ @@ -89,7 +89,7 @@ public ExchangeInformationResponseRateLimitsInner intervalNum( } /** - * Get intervalNum + * Interval Num. * * @return intervalNum */ @@ -109,7 +109,7 @@ public ExchangeInformationResponseRateLimitsInner limit( } /** - * Get limit + * Limit. * * @return limit */ @@ -129,7 +129,7 @@ public ExchangeInformationResponseRateLimitsInner rateLimitType( } /** - * Get rateLimitType + * Rate Limit Type. * * @return rateLimitType */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponseSymbolsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponseSymbolsInner.java index 6826df205..aa47c2d7b 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponseSymbolsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponseSymbolsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,10 +37,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** ExchangeInformationResponseSymbolsInner */ +/** symbols. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInformationResponseSymbolsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -195,7 +195,7 @@ public ExchangeInformationResponseSymbolsInner symbol( } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -214,7 +214,7 @@ public ExchangeInformationResponseSymbolsInner pair(@jakarta.annotation.Nullable } /** - * Get pair + * Pair. * * @return pair */ @@ -234,7 +234,7 @@ public ExchangeInformationResponseSymbolsInner contractType( } /** - * Get contractType + * Contract Type. * * @return contractType */ @@ -254,7 +254,7 @@ public ExchangeInformationResponseSymbolsInner deliveryDate( } /** - * Get deliveryDate + * Delivery Date. * * @return deliveryDate */ @@ -274,7 +274,7 @@ public ExchangeInformationResponseSymbolsInner onboardDate( } /** - * Get onboardDate + * Onboard Date. * * @return onboardDate */ @@ -294,7 +294,7 @@ public ExchangeInformationResponseSymbolsInner status( } /** - * Get status + * Status. * * @return status */ @@ -314,7 +314,7 @@ public ExchangeInformationResponseSymbolsInner maintMarginPercent( } /** - * Get maintMarginPercent + * ignore * * @return maintMarginPercent */ @@ -334,7 +334,7 @@ public ExchangeInformationResponseSymbolsInner requiredMarginPercent( } /** - * Get requiredMarginPercent + * ignore * * @return requiredMarginPercent */ @@ -355,7 +355,7 @@ public ExchangeInformationResponseSymbolsInner baseAsset( } /** - * Get baseAsset + * Base Asset. * * @return baseAsset */ @@ -375,7 +375,7 @@ public ExchangeInformationResponseSymbolsInner quoteAsset( } /** - * Get quoteAsset + * Quote Asset. * * @return quoteAsset */ @@ -395,7 +395,7 @@ public ExchangeInformationResponseSymbolsInner marginAsset( } /** - * Get marginAsset + * Margin Asset. * * @return marginAsset */ @@ -415,7 +415,7 @@ public ExchangeInformationResponseSymbolsInner pricePrecision( } /** - * Get pricePrecision + * please do not use it as tickSize * * @return pricePrecision */ @@ -435,7 +435,7 @@ public ExchangeInformationResponseSymbolsInner quantityPrecision( } /** - * Get quantityPrecision + * please do not use it as stepSize * * @return quantityPrecision */ @@ -455,7 +455,7 @@ public ExchangeInformationResponseSymbolsInner baseAssetPrecision( } /** - * Get baseAssetPrecision + * Base Asset Precision. * * @return baseAssetPrecision */ @@ -475,7 +475,7 @@ public ExchangeInformationResponseSymbolsInner quotePrecision( } /** - * Get quotePrecision + * Quote Precision. * * @return quotePrecision */ @@ -564,7 +564,7 @@ public ExchangeInformationResponseSymbolsInner triggerProtect( } /** - * Get triggerProtect + * threshold for algo order with \"priceProtect\" * * @return triggerProtect */ @@ -653,7 +653,7 @@ public ExchangeInformationResponseSymbolsInner addTimeInForceItem(String timeInF } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -673,7 +673,7 @@ public ExchangeInformationResponseSymbolsInner liquidationFee( } /** - * Get liquidationFee + * liquidation fee rate * * @return liquidationFee */ @@ -693,7 +693,7 @@ public ExchangeInformationResponseSymbolsInner marketTakeBound( } /** - * Get marketTakeBound + * the max price difference rate( from mark price) a market order can make * * @return marketTakeBound */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponseSymbolsInnerFiltersInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponseSymbolsInnerFiltersInner.java index 4112004b9..3aab221c0 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponseSymbolsInnerFiltersInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ExchangeInformationResponseSymbolsInnerFiltersInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ExchangeInformationResponseSymbolsInnerFiltersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInformationResponseSymbolsInnerFiltersInner { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; @@ -117,7 +117,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner filterType( } /** - * Get filterType + * Filter Type. * * @return filterType */ @@ -137,7 +137,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner maxPrice( } /** - * Get maxPrice + * Max Price. * * @return maxPrice */ @@ -157,7 +157,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner minPrice( } /** - * Get minPrice + * Min Price. * * @return minPrice */ @@ -177,7 +177,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner tickSize( } /** - * Get tickSize + * Tick Size. * * @return tickSize */ @@ -197,7 +197,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner maxQty( } /** - * Get maxQty + * Max Qty. * * @return maxQty */ @@ -217,7 +217,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner minQty( } /** - * Get minQty + * Min Qty. * * @return minQty */ @@ -237,7 +237,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner stepSize( } /** - * Get stepSize + * Step Size. * * @return stepSize */ @@ -257,7 +257,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner limit( } /** - * Get limit + * Limit. * * @return limit */ @@ -297,7 +297,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner multiplierUp( } /** - * Get multiplierUp + * Multiplier Up. * * @return multiplierUp */ @@ -317,7 +317,7 @@ public ExchangeInformationResponseSymbolsInnerFiltersInner multiplierDown( } /** - * Get multiplierDown + * Multiplier Down. * * @return multiplierDown */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesAccountBalanceV2Response.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesAccountBalanceV2Response.java index 148e4085e..686fdbe3a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesAccountBalanceV2Response.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesAccountBalanceV2Response.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FuturesAccountBalanceV2Response */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesAccountBalanceV2Response extends ArrayList { public FuturesAccountBalanceV2Response() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesAccountBalanceV2ResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesAccountBalanceV2ResponseInner.java index a9496c556..cb1740318 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesAccountBalanceV2ResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesAccountBalanceV2ResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FuturesAccountBalanceV2ResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesAccountBalanceV2ResponseInner { public static final String SERIALIZED_NAME_ACCOUNT_ALIAS = "accountAlias"; @@ -99,7 +99,7 @@ public FuturesAccountBalanceV2ResponseInner accountAlias( } /** - * Get accountAlias + * Unique account alias. * * @return accountAlias */ @@ -118,7 +118,7 @@ public FuturesAccountBalanceV2ResponseInner asset(@jakarta.annotation.Nullable S } /** - * Get asset + * Asset name. * * @return asset */ @@ -138,7 +138,7 @@ public FuturesAccountBalanceV2ResponseInner balance( } /** - * Get balance + * Wallet balance. * * @return balance */ @@ -158,7 +158,7 @@ public FuturesAccountBalanceV2ResponseInner crossWalletBalance( } /** - * Get crossWalletBalance + * Cross wallet balance. * * @return crossWalletBalance */ @@ -178,7 +178,7 @@ public FuturesAccountBalanceV2ResponseInner crossUnPnl( } /** - * Get crossUnPnl + * Unrealized PnL of cross positions. * * @return crossUnPnl */ @@ -198,7 +198,7 @@ public FuturesAccountBalanceV2ResponseInner availableBalance( } /** - * Get availableBalance + * Available balance. * * @return availableBalance */ @@ -218,7 +218,7 @@ public FuturesAccountBalanceV2ResponseInner maxWithdrawAmount( } /** - * Get maxWithdrawAmount + * Maximum transferable/withdrawable amount. * * @return maxWithdrawAmount */ @@ -238,7 +238,7 @@ public FuturesAccountBalanceV2ResponseInner marginAvailable( } /** - * Get marginAvailable + * Whether the asset can be used as margin in multi-assets mode. * * @return marginAvailable */ @@ -258,7 +258,7 @@ public FuturesAccountBalanceV2ResponseInner updateTime( } /** - * Get updateTime + * Last update time in milliseconds. * * @return updateTime */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesAccountBalanceV3Response.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesAccountBalanceV3Response.java index 33f65d15a..c23d73e29 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesAccountBalanceV3Response.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesAccountBalanceV3Response.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FuturesAccountBalanceV3Response */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesAccountBalanceV3Response extends ArrayList { public FuturesAccountBalanceV3Response() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesAccountConfigurationResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesAccountConfigurationResponse.java index 44174d48b..a931ee915 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesAccountConfigurationResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesAccountConfigurationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FuturesAccountConfigurationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesAccountConfigurationResponse { public static final String SERIALIZED_NAME_FEE_TIER = "feeTier"; @@ -92,7 +92,7 @@ public FuturesAccountConfigurationResponse feeTier(@jakarta.annotation.Nullable } /** - * Get feeTier + * account commission tier * * @return feeTier */ @@ -112,7 +112,7 @@ public FuturesAccountConfigurationResponse canTrade( } /** - * Get canTrade + * if can trade * * @return canTrade */ @@ -132,7 +132,7 @@ public FuturesAccountConfigurationResponse canDeposit( } /** - * Get canDeposit + * if can transfer in asset * * @return canDeposit */ @@ -152,7 +152,7 @@ public FuturesAccountConfigurationResponse canWithdraw( } /** - * Get canWithdraw + * if can transfer out asset * * @return canWithdraw */ @@ -192,7 +192,7 @@ public FuturesAccountConfigurationResponse updateTime( } /** - * Get updateTime + * reserved property, please ignore * * @return updateTime */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradfiPerpsContractRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradfiPerpsContractRequest.java index 38b63c1ca..fc381389f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradfiPerpsContractRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradfiPerpsContractRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FuturesTradfiPerpsContractRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesTradfiPerpsContractRequest { public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -51,11 +51,12 @@ public FuturesTradfiPerpsContractRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradfiPerpsContractResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradfiPerpsContractResponse.java new file mode 100644 index 000000000..d3c0a1f22 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradfiPerpsContractResponse.java @@ -0,0 +1,250 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** FuturesTradfiPerpsContractResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class FuturesTradfiPerpsContractResponse { + public static final String SERIALIZED_NAME_CODE = "code"; + + @SerializedName(SERIALIZED_NAME_CODE) + @jakarta.annotation.Nullable + private Long code; + + public static final String SERIALIZED_NAME_MSG = "msg"; + + @SerializedName(SERIALIZED_NAME_MSG) + @jakarta.annotation.Nullable + private String msg; + + public FuturesTradfiPerpsContractResponse() {} + + public FuturesTradfiPerpsContractResponse code(@jakarta.annotation.Nullable Long code) { + this.code = code; + return this; + } + + /** + * Get code + * + * @return code + */ + @jakarta.annotation.Nullable + public Long getCode() { + return code; + } + + public void setCode(@jakarta.annotation.Nullable Long code) { + this.code = code; + } + + public FuturesTradfiPerpsContractResponse msg(@jakarta.annotation.Nullable String msg) { + this.msg = msg; + return this; + } + + /** + * Get msg + * + * @return msg + */ + @jakarta.annotation.Nullable + public String getMsg() { + return msg; + } + + public void setMsg(@jakarta.annotation.Nullable String msg) { + this.msg = msg; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FuturesTradfiPerpsContractResponse futuresTradfiPerpsContractResponse = + (FuturesTradfiPerpsContractResponse) o; + return Objects.equals(this.code, futuresTradfiPerpsContractResponse.code) + && Objects.equals(this.msg, futuresTradfiPerpsContractResponse.msg); + } + + @Override + public int hashCode() { + return Objects.hash(code, msg); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FuturesTradfiPerpsContractResponse {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" msg: ").append(toIndentedString(msg)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object codeValue = getCode(); + String codeValueAsString = ""; + codeValueAsString = codeValue.toString(); + sb.append("code=").append(urlEncode(codeValueAsString)).append(""); + Object msgValue = getMsg(); + String msgValueAsString = ""; + msgValueAsString = msgValue.toString(); + sb.append("msg=").append(urlEncode(msgValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("msg"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * FuturesTradfiPerpsContractResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FuturesTradfiPerpsContractResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FuturesTradfiPerpsContractResponse is" + + " not found in the empty JSON string", + FuturesTradfiPerpsContractResponse.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("msg") != null && !jsonObj.get("msg").isJsonNull()) + && !jsonObj.get("msg").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `msg` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("msg").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FuturesTradfiPerpsContractResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FuturesTradfiPerpsContractResponse' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(FuturesTradfiPerpsContractResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FuturesTradfiPerpsContractResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FuturesTradfiPerpsContractResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of FuturesTradfiPerpsContractResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of FuturesTradfiPerpsContractResponse + * @throws IOException if the JSON string is invalid with respect to + * FuturesTradfiPerpsContractResponse + */ + public static FuturesTradfiPerpsContractResponse fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, FuturesTradfiPerpsContractResponse.class); + } + + /** + * Convert an instance of FuturesTradfiPerpsContractResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradingQuantitativeRulesIndicatorsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradingQuantitativeRulesIndicatorsResponse.java index 098b6e97d..05efd5947 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradingQuantitativeRulesIndicatorsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradingQuantitativeRulesIndicatorsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** FuturesTradingQuantitativeRulesIndicatorsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesTradingQuantitativeRulesIndicatorsResponse { public static final String SERIALIZED_NAME_INDICATORS = "indicators"; @@ -82,7 +82,7 @@ public FuturesTradingQuantitativeRulesIndicatorsResponse updateTime( } /** - * Get updateTime + * Update Time. * * @return updateTime */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradingQuantitativeRulesIndicatorsResponseIndicators.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradingQuantitativeRulesIndicatorsResponseIndicators.java index 845e2f7b6..3c8b93033 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradingQuantitativeRulesIndicatorsResponseIndicators.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradingQuantitativeRulesIndicatorsResponseIndicators.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,10 +37,13 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** FuturesTradingQuantitativeRulesIndicatorsResponseIndicators */ +/** + * indicator: quantitative rules indicators, value: user's indicators value, triggerValue: + * trigger indicator value threshold of quantitative rules. + */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesTradingQuantitativeRulesIndicatorsResponseIndicators { public static final String SERIALIZED_NAME_B_T_C_U_S_D_T = "BTCUSDT"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.java index fc07e3a5b..380972c54 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner { public static final String SERIALIZED_NAME_INDICATOR = "indicator"; @@ -75,7 +75,7 @@ public FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner i } /** - * Get indicator + * Too many violations under multiple symbols trigger account violation * * @return indicator */ @@ -95,7 +95,7 @@ public FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner v } /** - * Get value + * Current value * * @return value */ @@ -115,7 +115,7 @@ public FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner t } /** - * Get triggerValue + * Trigger value * * @return triggerValue */ @@ -135,7 +135,7 @@ public void setTriggerValue(@jakarta.annotation.Nullable Long triggerValue) { } /** - * Get plannedRecoverTime + * Planned Recover Time. * * @return plannedRecoverTime */ @@ -155,7 +155,7 @@ public FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsACCOUNTInner i } /** - * Get isLocked + * Is Locked. * * @return isLocked */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.java index 297ecc8e4..0e3d25e31 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner { public static final String SERIALIZED_NAME_IS_LOCKED = "isLocked"; @@ -76,7 +76,7 @@ public FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner i } /** - * Get isLocked + * Is Locked. * * @return isLocked */ @@ -96,7 +96,7 @@ public void setIsLocked(@jakarta.annotation.Nullable Boolean isLocked) { } /** - * Get plannedRecoverTime + * Planned Recover Time. * * @return plannedRecoverTime */ @@ -116,7 +116,7 @@ public FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner i } /** - * Get indicator + * Too many violations under multiple symbols trigger account violation * * @return indicator */ @@ -136,7 +136,7 @@ public FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner v } /** - * Get value + * Current value * * @return value */ @@ -157,7 +157,7 @@ public FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBTCUSDTInner t } /** - * Get triggerValue + * Trigger value * * @return triggerValue */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetBnbBurnStatusResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetBnbBurnStatusResponse.java index 02e6648b0..3e9f4c190 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetBnbBurnStatusResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetBnbBurnStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetBnbBurnStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBnbBurnStatusResponse { public static final String SERIALIZED_NAME_FEE_BURN = "feeBurn"; @@ -50,7 +50,7 @@ public GetBnbBurnStatusResponse feeBurn(@jakarta.annotation.Nullable Boolean fee } /** - * Get feeBurn + * \"true\": Fee Discount On; \"false\": Fee Discount Off * * @return feeBurn */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetCurrentMultiAssetsModeResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetCurrentMultiAssetsModeResponse.java index 8189ea980..46faa807f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetCurrentMultiAssetsModeResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetCurrentMultiAssetsModeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetCurrentMultiAssetsModeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCurrentMultiAssetsModeResponse { public static final String SERIALIZED_NAME_MULTI_ASSETS_MARGIN = "multiAssetsMargin"; @@ -51,7 +51,7 @@ public GetCurrentMultiAssetsModeResponse multiAssetsMargin( } /** - * Get multiAssetsMargin + * \"true\": Multi-Assets Mode; \"false\": Single-Asset Mode * * @return multiAssetsMargin */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetCurrentPositionModeResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetCurrentPositionModeResponse.java index a41e33b31..68dfa47de 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetCurrentPositionModeResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetCurrentPositionModeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetCurrentPositionModeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCurrentPositionModeResponse { public static final String SERIALIZED_NAME_DUAL_SIDE_POSITION = "dualSidePosition"; @@ -51,7 +51,7 @@ public GetCurrentPositionModeResponse dualSidePosition( } /** - * Get dualSidePosition + * \"true\": Hedge Mode; \"false\": One-way Mode * * @return dualSidePosition */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetDownloadIdForFuturesOrderHistoryResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetDownloadIdForFuturesOrderHistoryResponse.java index eb0a78705..93d4b420c 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetDownloadIdForFuturesOrderHistoryResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetDownloadIdForFuturesOrderHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetDownloadIdForFuturesOrderHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDownloadIdForFuturesOrderHistoryResponse { public static final String SERIALIZED_NAME_AVG_COST_TIMESTAMP_OF_LAST30D = "avgCostTimestampOfLast30d"; @@ -58,7 +58,7 @@ public GetDownloadIdForFuturesOrderHistoryResponse avgCostTimestampOfLast30d( } /** - * Get avgCostTimestampOfLast30d + * Average time taken for data download in the past 30 days * * @return avgCostTimestampOfLast30d */ @@ -79,7 +79,7 @@ public GetDownloadIdForFuturesOrderHistoryResponse downloadId( } /** - * Get downloadId + * Download Id. * * @return downloadId */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetDownloadIdForFuturesTradeHistoryResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetDownloadIdForFuturesTradeHistoryResponse.java index 6619710ed..f148dbe95 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetDownloadIdForFuturesTradeHistoryResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetDownloadIdForFuturesTradeHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetDownloadIdForFuturesTradeHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDownloadIdForFuturesTradeHistoryResponse { public static final String SERIALIZED_NAME_AVG_COST_TIMESTAMP_OF_LAST30D = "avgCostTimestampOfLast30d"; @@ -58,7 +58,7 @@ public GetDownloadIdForFuturesTradeHistoryResponse avgCostTimestampOfLast30d( } /** - * Get avgCostTimestampOfLast30d + * Average time taken for data download in the past 30 days * * @return avgCostTimestampOfLast30d */ @@ -79,7 +79,7 @@ public GetDownloadIdForFuturesTradeHistoryResponse downloadId( } /** - * Get downloadId + * Download Id. * * @return downloadId */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetDownloadIdForFuturesTransactionHistoryResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetDownloadIdForFuturesTransactionHistoryResponse.java index 10731eb3b..5280bc25f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetDownloadIdForFuturesTransactionHistoryResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetDownloadIdForFuturesTransactionHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetDownloadIdForFuturesTransactionHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDownloadIdForFuturesTransactionHistoryResponse { public static final String SERIALIZED_NAME_AVG_COST_TIMESTAMP_OF_LAST30D = "avgCostTimestampOfLast30d"; @@ -58,7 +58,7 @@ public GetDownloadIdForFuturesTransactionHistoryResponse avgCostTimestampOfLast3 } /** - * Get avgCostTimestampOfLast30d + * Average time taken for data download in the past 30 days * * @return avgCostTimestampOfLast30d */ @@ -79,7 +79,7 @@ public GetDownloadIdForFuturesTransactionHistoryResponse downloadId( } /** - * Get downloadId + * Download Id. * * @return downloadId */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFundingRateHistoryResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFundingRateHistoryResponse.java index b244abcfc..f0b38ef69 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFundingRateHistoryResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFundingRateHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFundingRateHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFundingRateHistoryResponse extends ArrayList { public GetFundingRateHistoryResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFundingRateHistoryResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFundingRateHistoryResponseInner.java index c55302a6f..c2840d80d 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFundingRateHistoryResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFundingRateHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFundingRateHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFundingRateHistoryResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -60,6 +60,12 @@ public class GetFundingRateHistoryResponseInner { @jakarta.annotation.Nullable private String markPrice; + public static final String SERIALIZED_NAME_RATE_TYPE = "rateType"; + + @SerializedName(SERIALIZED_NAME_RATE_TYPE) + @jakarta.annotation.Nullable + private String rateType; + public GetFundingRateHistoryResponseInner() {} public GetFundingRateHistoryResponseInner symbol(@jakarta.annotation.Nullable String symbol) { @@ -68,7 +74,7 @@ public GetFundingRateHistoryResponseInner symbol(@jakarta.annotation.Nullable St } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -88,7 +94,7 @@ public GetFundingRateHistoryResponseInner fundingRate( } /** - * Get fundingRate + * Funding Rate. * * @return fundingRate */ @@ -108,7 +114,7 @@ public GetFundingRateHistoryResponseInner fundingTime( } /** - * Get fundingTime + * Funding Time. * * @return fundingTime */ @@ -128,7 +134,7 @@ public GetFundingRateHistoryResponseInner markPrice( } /** - * Get markPrice + * mark price associated with a particular funding fee charge * * @return markPrice */ @@ -141,6 +147,27 @@ public void setMarkPrice(@jakarta.annotation.Nullable String markPrice) { this.markPrice = markPrice; } + public GetFundingRateHistoryResponseInner rateType( + @jakarta.annotation.Nullable String rateType) { + this.rateType = rateType; + return this; + } + + /** + * Funding rate type. `Regular` for the normal funding rate; `Special` for + * the additional funding rate generated by stock dividends. + * + * @return rateType + */ + @jakarta.annotation.Nullable + public String getRateType() { + return rateType; + } + + public void setRateType(@jakarta.annotation.Nullable String rateType) { + this.rateType = rateType; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -154,12 +181,13 @@ public boolean equals(Object o) { return Objects.equals(this.symbol, getFundingRateHistoryResponseInner.symbol) && Objects.equals(this.fundingRate, getFundingRateHistoryResponseInner.fundingRate) && Objects.equals(this.fundingTime, getFundingRateHistoryResponseInner.fundingTime) - && Objects.equals(this.markPrice, getFundingRateHistoryResponseInner.markPrice); + && Objects.equals(this.markPrice, getFundingRateHistoryResponseInner.markPrice) + && Objects.equals(this.rateType, getFundingRateHistoryResponseInner.rateType); } @Override public int hashCode() { - return Objects.hash(symbol, fundingRate, fundingTime, markPrice); + return Objects.hash(symbol, fundingRate, fundingTime, markPrice, rateType); } @Override @@ -170,6 +198,7 @@ public String toString() { sb.append(" fundingRate: ").append(toIndentedString(fundingRate)).append("\n"); sb.append(" fundingTime: ").append(toIndentedString(fundingTime)).append("\n"); sb.append(" markPrice: ").append(toIndentedString(markPrice)).append("\n"); + sb.append(" rateType: ").append(toIndentedString(rateType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -193,6 +222,10 @@ public String toUrlQueryString() { String markPriceValueAsString = ""; markPriceValueAsString = markPriceValue.toString(); sb.append("markPrice=").append(urlEncode(markPriceValueAsString)).append(""); + Object rateTypeValue = getRateType(); + String rateTypeValueAsString = ""; + rateTypeValueAsString = rateTypeValue.toString(); + sb.append("rateType=").append(urlEncode(rateTypeValueAsString)).append(""); return sb.toString(); } @@ -225,6 +258,7 @@ private String toIndentedString(Object o) { openapiFields.add("fundingRate"); openapiFields.add("fundingTime"); openapiFields.add("markPrice"); + openapiFields.add("rateType"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -274,6 +308,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("markPrice").toString())); } + if ((jsonObj.get("rateType") != null && !jsonObj.get("rateType").isJsonNull()) + && !jsonObj.get("rateType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("rateType").toString())); + } } 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/rest/model/GetFundingRateInfoResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFundingRateInfoResponse.java index 4c578ad9b..7aea9b97e 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFundingRateInfoResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFundingRateInfoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFundingRateInfoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFundingRateInfoResponse extends ArrayList { public GetFundingRateInfoResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFundingRateInfoResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFundingRateInfoResponseInner.java index 935600355..ae39c276e 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFundingRateInfoResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFundingRateInfoResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFundingRateInfoResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFundingRateInfoResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -157,7 +157,7 @@ public GetFundingRateInfoResponseInner disclaimer( } /** - * Get disclaimer + * ingore * * @return disclaimer */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFuturesOrderHistoryDownloadLinkByIdResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFuturesOrderHistoryDownloadLinkByIdResponse.java index 7dbf903b6..d09444666 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFuturesOrderHistoryDownloadLinkByIdResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFuturesOrderHistoryDownloadLinkByIdResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFuturesOrderHistoryDownloadLinkByIdResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFuturesOrderHistoryDownloadLinkByIdResponse { public static final String SERIALIZED_NAME_DOWNLOAD_ID = "downloadId"; @@ -81,7 +81,7 @@ public GetFuturesOrderHistoryDownloadLinkByIdResponse downloadId( } /** - * Get downloadId + * Download Id. * * @return downloadId */ @@ -101,7 +101,7 @@ public GetFuturesOrderHistoryDownloadLinkByIdResponse status( } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -121,7 +121,7 @@ public GetFuturesOrderHistoryDownloadLinkByIdResponse url( } /** - * Get url + * The link is mapped to download id * * @return url */ @@ -141,7 +141,7 @@ public GetFuturesOrderHistoryDownloadLinkByIdResponse notified( } /** - * Get notified + * ignore * * @return notified */ @@ -161,7 +161,7 @@ public GetFuturesOrderHistoryDownloadLinkByIdResponse expirationTimestamp( } /** - * Get expirationTimestamp + * The link would expire after this timestamp * * @return expirationTimestamp */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFuturesTradeDownloadLinkByIdResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFuturesTradeDownloadLinkByIdResponse.java index a316b4fa0..83ee17ff0 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFuturesTradeDownloadLinkByIdResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFuturesTradeDownloadLinkByIdResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFuturesTradeDownloadLinkByIdResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFuturesTradeDownloadLinkByIdResponse { public static final String SERIALIZED_NAME_DOWNLOAD_ID = "downloadId"; @@ -81,7 +81,7 @@ public GetFuturesTradeDownloadLinkByIdResponse downloadId( } /** - * Get downloadId + * Download Id. * * @return downloadId */ @@ -101,7 +101,7 @@ public GetFuturesTradeDownloadLinkByIdResponse status( } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -120,7 +120,7 @@ public GetFuturesTradeDownloadLinkByIdResponse url(@jakarta.annotation.Nullable } /** - * Get url + * The link is mapped to download id * * @return url */ @@ -140,7 +140,7 @@ public GetFuturesTradeDownloadLinkByIdResponse notified( } /** - * Get notified + * ignore * * @return notified */ @@ -160,7 +160,7 @@ public GetFuturesTradeDownloadLinkByIdResponse expirationTimestamp( } /** - * Get expirationTimestamp + * The link would expire after this timestamp * * @return expirationTimestamp */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFuturesTransactionHistoryDownloadLinkByIdResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFuturesTransactionHistoryDownloadLinkByIdResponse.java index 69bd257b2..dd199f224 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFuturesTransactionHistoryDownloadLinkByIdResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetFuturesTransactionHistoryDownloadLinkByIdResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFuturesTransactionHistoryDownloadLinkByIdResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFuturesTransactionHistoryDownloadLinkByIdResponse { public static final String SERIALIZED_NAME_DOWNLOAD_ID = "downloadId"; @@ -81,7 +81,7 @@ public GetFuturesTransactionHistoryDownloadLinkByIdResponse downloadId( } /** - * Get downloadId + * Download Id. * * @return downloadId */ @@ -101,7 +101,7 @@ public GetFuturesTransactionHistoryDownloadLinkByIdResponse status( } /** - * Get status + * Enum:completed,processing * * @return status */ @@ -121,7 +121,7 @@ public GetFuturesTransactionHistoryDownloadLinkByIdResponse url( } /** - * Get url + * The link is mapped to download id * * @return url */ @@ -141,7 +141,7 @@ public GetFuturesTransactionHistoryDownloadLinkByIdResponse notified( } /** - * Get notified + * ignore * * @return notified */ @@ -161,7 +161,7 @@ public GetFuturesTransactionHistoryDownloadLinkByIdResponse expirationTimestamp( } /** - * Get expirationTimestamp + * The link would expire after this timestamp * * @return expirationTimestamp */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetIncomeHistoryResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetIncomeHistoryResponse.java index c6a254bb9..df6c49c3b 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetIncomeHistoryResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetIncomeHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetIncomeHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetIncomeHistoryResponse extends ArrayList { public GetIncomeHistoryResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetIncomeHistoryResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetIncomeHistoryResponseInner.java index 3b285f21b..2ad0f749c 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetIncomeHistoryResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetIncomeHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetIncomeHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetIncomeHistoryResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -92,7 +92,7 @@ public GetIncomeHistoryResponseInner symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * trade symbol, if existing * * @return symbol */ @@ -112,7 +112,7 @@ public GetIncomeHistoryResponseInner incomeType( } /** - * Get incomeType + * income type * * @return incomeType */ @@ -131,7 +131,7 @@ public GetIncomeHistoryResponseInner income(@jakarta.annotation.Nullable String } /** - * Get income + * income amount * * @return income */ @@ -150,7 +150,7 @@ public GetIncomeHistoryResponseInner asset(@jakarta.annotation.Nullable String a } /** - * Get asset + * income asset * * @return asset */ @@ -169,7 +169,7 @@ public GetIncomeHistoryResponseInner info(@jakarta.annotation.Nullable String in } /** - * Get info + * extra information * * @return info */ @@ -188,7 +188,7 @@ public GetIncomeHistoryResponseInner time(@jakarta.annotation.Nullable Long time } /** - * Get time + * Time. * * @return time */ @@ -207,7 +207,7 @@ public GetIncomeHistoryResponseInner tranId(@jakarta.annotation.Nullable Long tr } /** - * Get tranId + * transaction id * * @return tranId */ @@ -226,7 +226,7 @@ public GetIncomeHistoryResponseInner tradeId(@jakarta.annotation.Nullable String } /** - * Get tradeId + * trade id, if existing * * @return tradeId */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponse.java index d6534d821..d515c9016 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetOrderModifyHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOrderModifyHistoryResponse extends ArrayList { public GetOrderModifyHistoryResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponseInner.java index f2c263214..df4d48d01 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetOrderModifyHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOrderModifyHistoryResponseInner { public static final String SERIALIZED_NAME_AMENDMENT_ID = "amendmentId"; @@ -88,7 +88,7 @@ public GetOrderModifyHistoryResponseInner amendmentId( } /** - * Get amendmentId + * Order modification ID * * @return amendmentId */ @@ -184,7 +184,7 @@ public GetOrderModifyHistoryResponseInner time(@jakarta.annotation.Nullable Long } /** - * Get time + * Order modification time * * @return time */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendment.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendment.java index a14a4cc1a..c34e29be1 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendment.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendment.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetOrderModifyHistoryResponseInnerAmendment */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOrderModifyHistoryResponseInnerAmendment { public static final String SERIALIZED_NAME_PRICE = "price"; @@ -55,6 +55,12 @@ public class GetOrderModifyHistoryResponseInnerAmendment { @jakarta.annotation.Nullable private Long count; + public static final String SERIALIZED_NAME_MODIFY_ID = "modifyId"; + + @SerializedName(SERIALIZED_NAME_MODIFY_ID) + @jakarta.annotation.Nullable + private Long modifyId; + public GetOrderModifyHistoryResponseInnerAmendment() {} public GetOrderModifyHistoryResponseInnerAmendment price( @@ -110,7 +116,7 @@ public GetOrderModifyHistoryResponseInnerAmendment count( } /** - * Get count + * Order modification count, representing the number of times the order has been modified * * @return count */ @@ -123,6 +129,26 @@ public void setCount(@jakarta.annotation.Nullable Long count) { this.count = count; } + public GetOrderModifyHistoryResponseInnerAmendment modifyId( + @jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + return this; + } + + /** + * user-defined modification identifier, only returned if provided in the request + * + * @return modifyId + */ + @jakarta.annotation.Nullable + public Long getModifyId() { + return modifyId; + } + + public void setModifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -135,12 +161,14 @@ public boolean equals(Object o) { (GetOrderModifyHistoryResponseInnerAmendment) o; return Objects.equals(this.price, getOrderModifyHistoryResponseInnerAmendment.price) && Objects.equals(this.origQty, getOrderModifyHistoryResponseInnerAmendment.origQty) - && Objects.equals(this.count, getOrderModifyHistoryResponseInnerAmendment.count); + && Objects.equals(this.count, getOrderModifyHistoryResponseInnerAmendment.count) + && Objects.equals( + this.modifyId, getOrderModifyHistoryResponseInnerAmendment.modifyId); } @Override public int hashCode() { - return Objects.hash(price, origQty, count); + return Objects.hash(price, origQty, count, modifyId); } @Override @@ -150,6 +178,7 @@ public String toString() { sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" modifyId: ").append(toIndentedString(modifyId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -169,6 +198,10 @@ public String toUrlQueryString() { String countValueAsString = ""; countValueAsString = countValue.toString(); sb.append("count=").append(urlEncode(countValueAsString)).append(""); + Object modifyIdValue = getModifyId(); + String modifyIdValueAsString = ""; + modifyIdValueAsString = modifyIdValue.toString(); + sb.append("modifyId=").append(urlEncode(modifyIdValueAsString)).append(""); return sb.toString(); } @@ -200,6 +233,7 @@ private String toIndentedString(Object o) { openapiFields.add("price"); openapiFields.add("origQty"); openapiFields.add("count"); + openapiFields.add("modifyId"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendmentOrigQty.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendmentOrigQty.java index c93e45482..adc964f4e 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendmentOrigQty.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendmentOrigQty.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetOrderModifyHistoryResponseInnerAmendmentOrigQty */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOrderModifyHistoryResponseInnerAmendmentOrigQty { public static final String SERIALIZED_NAME_BEFORE = "before"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendmentPrice.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendmentPrice.java index c8bbe57fe..aba07b929 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendmentPrice.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetOrderModifyHistoryResponseInnerAmendmentPrice.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetOrderModifyHistoryResponseInnerAmendmentPrice */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOrderModifyHistoryResponseInnerAmendmentPrice { public static final String SERIALIZED_NAME_BEFORE = "before"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetPositionMarginChangeHistoryResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetPositionMarginChangeHistoryResponse.java index e2458751e..29196c5ec 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetPositionMarginChangeHistoryResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetPositionMarginChangeHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetPositionMarginChangeHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetPositionMarginChangeHistoryResponse extends ArrayList { public GetPositionMarginChangeHistoryResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetPositionMarginChangeHistoryResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetPositionMarginChangeHistoryResponseInner.java index c2c9fa397..2178c9632 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetPositionMarginChangeHistoryResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/GetPositionMarginChangeHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetPositionMarginChangeHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetPositionMarginChangeHistoryResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -87,7 +87,7 @@ public GetPositionMarginChangeHistoryResponseInner symbol( } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -107,7 +107,7 @@ public GetPositionMarginChangeHistoryResponseInner type( } /** - * Get type + * Type. * * @return type */ @@ -127,7 +127,7 @@ public GetPositionMarginChangeHistoryResponseInner deltaType( } /** - * Get deltaType + * Delta Type. * * @return deltaType */ @@ -147,7 +147,7 @@ public GetPositionMarginChangeHistoryResponseInner amount( } /** - * Get amount + * Amount. * * @return amount */ @@ -167,7 +167,7 @@ public GetPositionMarginChangeHistoryResponseInner asset( } /** - * Get asset + * Asset. * * @return asset */ @@ -187,7 +187,7 @@ public GetPositionMarginChangeHistoryResponseInner time( } /** - * Get time + * Time. * * @return time */ @@ -207,7 +207,7 @@ public GetPositionMarginChangeHistoryResponseInner positionSide( } /** - * Get positionSide + * Position Side. * * @return positionSide */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IncomeType.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IncomeType.java new file mode 100644 index 000000000..ee8dc998e --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IncomeType.java @@ -0,0 +1,113 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets incomeType */ +@JsonAdapter(IncomeType.Adapter.class) +public enum IncomeType { + TRANSFER("TRANSFER"), + + WELCOME_BONUS("WELCOME_BONUS"), + + REALIZED_PNL("REALIZED_PNL"), + + FUNDING_FEE("FUNDING_FEE"), + + COMMISSION("COMMISSION"), + + INSURANCE_CLEAR("INSURANCE_CLEAR"), + + REFERRAL_KICKBACK("REFERRAL_KICKBACK"), + + COMMISSION_REBATE("COMMISSION_REBATE"), + + API_REBATE("API_REBATE"), + + CONTEST_REWARD("CONTEST_REWARD"), + + CROSS_COLLATERAL_TRANSFER("CROSS_COLLATERAL_TRANSFER"), + + OPTIONS_PREMIUM_FEE("OPTIONS_PREMIUM_FEE"), + + OPTIONS_SETTLE_PROFIT("OPTIONS_SETTLE_PROFIT"), + + INTERNAL_TRANSFER("INTERNAL_TRANSFER"), + + AUTO_EXCHANGE("AUTO_EXCHANGE"), + + DELIVERED_SETTELMENT("DELIVERED_SETTELMENT"), + + COIN_SWAP_DEPOSIT("COIN_SWAP_DEPOSIT"), + + COIN_SWAP_WITHDRAW("COIN_SWAP_WITHDRAW"), + + POSITION_LIMIT_INCREASE_FEE("POSITION_LIMIT_INCREASE_FEE"), + + STRATEGY_UMFUTURES_TRANSFER("STRATEGY_UMFUTURES_TRANSFER"), + + FEE_RETURN("FEE_RETURN"), + + BFUSD_REWARD("BFUSD_REWARD"); + + private String value; + + IncomeType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static IncomeType fromValue(String value) { + for (IncomeType b : IncomeType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final IncomeType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public IncomeType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return IncomeType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + IncomeType.fromValue(value); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IndexPriceKlineCandlestickDataItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IndexPriceKlineCandlestickDataItem.java new file mode 100644 index 000000000..7defb7e36 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IndexPriceKlineCandlestickDataItem.java @@ -0,0 +1,189 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** IndexPriceKlineCandlestickDataItem */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class IndexPriceKlineCandlestickDataItem extends ArrayList { + public IndexPriceKlineCandlestickDataItem() {} + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IndexPriceKlineCandlestickDataItem {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * IndexPriceKlineCandlestickDataItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be a array type in the JSON string but got" + + " `%s`", + jsonElement.toString())); + } + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for (JsonElement element : array) { + IndexPriceKlineCandlestickDataItemInner.validateJsonElement(element); + } + if (jsonElement == null) { + if (!IndexPriceKlineCandlestickDataItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in IndexPriceKlineCandlestickDataItem is" + + " not found in the empty JSON string", + IndexPriceKlineCandlestickDataItem.openapiRequiredFields + .toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!IndexPriceKlineCandlestickDataItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IndexPriceKlineCandlestickDataItem' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(IndexPriceKlineCandlestickDataItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, IndexPriceKlineCandlestickDataItem value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); + elementAdapter.write(out, obj); + } + + @Override + public IndexPriceKlineCandlestickDataItem read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of IndexPriceKlineCandlestickDataItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of IndexPriceKlineCandlestickDataItem + * @throws IOException if the JSON string is invalid with respect to + * IndexPriceKlineCandlestickDataItem + */ + public static IndexPriceKlineCandlestickDataItem fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, IndexPriceKlineCandlestickDataItem.class); + } + + /** + * Convert an instance of IndexPriceKlineCandlestickDataItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IndexPriceKlineCandlestickDataItemInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IndexPriceKlineCandlestickDataItemInner.java new file mode 100644 index 000000000..0fe97a982 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IndexPriceKlineCandlestickDataItemInner.java @@ -0,0 +1,315 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.common.AbstractOpenApiSchema; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonPrimitive; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.hibernate.validator.constraints.*; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class IndexPriceKlineCandlestickDataItemInner extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(IndexPriceKlineCandlestickDataItemInner.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!IndexPriceKlineCandlestickDataItemInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes 'IndexPriceKlineCandlestickDataItemInner' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterLong = + gson.getDelegateAdapter(this, TypeToken.get(Long.class)); + final TypeAdapter adapterString = + gson.getDelegateAdapter(this, TypeToken.get(String.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, IndexPriceKlineCandlestickDataItemInner value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `Long` + if (value.getActualInstance() instanceof Long) { + JsonPrimitive primitive = + adapterLong + .toJsonTree((Long) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + // check if the actual instance is of the type `String` + if (value.getActualInstance() instanceof String) { + JsonPrimitive primitive = + adapterString + .toJsonTree((String) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " Long, String"); + } + + @Override + public IndexPriceKlineCandlestickDataItemInner read(JsonReader in) + throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize Long + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterLong; + match++; + log.log(Level.FINER, "Input data matches schema 'Long'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for Long failed with `%s`.", + e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Long'", e); + } + // deserialize String + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterString; + match++; + log.log(Level.FINER, "Input data matches schema 'String'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for String failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'String'", + e); + } + + if (match == 1) { + IndexPriceKlineCandlestickDataItemInner ret = + new IndexPriceKlineCandlestickDataItemInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for" + + " IndexPriceKlineCandlestickDataItemInner: %d" + + " classes match result, expected 1. Detailed" + + " failure message for oneOf schemas: %s. JSON:" + + " %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public IndexPriceKlineCandlestickDataItemInner() { + super("oneOf", Boolean.FALSE); + } + + public IndexPriceKlineCandlestickDataItemInner(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Long", Long.class); + schemas.put("String", String.class); + } + + @Override + public Map> getSchemas() { + return IndexPriceKlineCandlestickDataItemInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: Long, String + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof Long) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof String) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Long, String"); + } + + /** + * Get the actual instance, which can be the following: Long, String + * + * @return The actual instance (Long, String) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Long`. If the actual instance is not `Long`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `Long` + * @throws ClassCastException if the instance is not `Long` + */ + public Long getLong() throws ClassCastException { + return (Long) super.getActualInstance(); + } + + /** + * Get the actual instance of `String`. If the actual instance is not `String`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String) super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * IndexPriceKlineCandlestickDataItemInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with Long + try { + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for Long failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with String + try { + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for String failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for IndexPriceKlineCandlestickDataItemInner" + + " with oneOf schemas: Long, String. %d class(es) match the" + + " result, expected 1. Detailed failure message for oneOf schemas:" + + " %s. JSON: %s", + validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of IndexPriceKlineCandlestickDataItemInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of IndexPriceKlineCandlestickDataItemInner + * @throws IOException if the JSON string is invalid with respect to + * IndexPriceKlineCandlestickDataItemInner + */ + public static IndexPriceKlineCandlestickDataItemInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, IndexPriceKlineCandlestickDataItemInner.class); + } + + /** + * Convert an instance of IndexPriceKlineCandlestickDataItemInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IndexPriceKlineCandlestickDataResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IndexPriceKlineCandlestickDataResponse.java index c0b3b5aed..0a4f2c2ee 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IndexPriceKlineCandlestickDataResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IndexPriceKlineCandlestickDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,9 +34,9 @@ /** IndexPriceKlineCandlestickDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndexPriceKlineCandlestickDataResponse - extends ArrayList { + extends ArrayList { public IndexPriceKlineCandlestickDataResponse() {} @Override @@ -118,7 +118,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - IndexPriceKlineCandlestickDataResponseItem.validateJsonElement(element); + IndexPriceKlineCandlestickDataItem.validateJsonElement(element); } if (jsonElement == null) { if (!IndexPriceKlineCandlestickDataResponse.openapiRequiredFields diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IndexPriceKlineCandlestickDataResponseItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IndexPriceKlineCandlestickDataResponseItem.java deleted file mode 100644 index 27eed32a1..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IndexPriceKlineCandlestickDataResponseItem.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** IndexPriceKlineCandlestickDataResponseItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class IndexPriceKlineCandlestickDataResponseItem extends ArrayList { - public IndexPriceKlineCandlestickDataResponseItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IndexPriceKlineCandlestickDataResponseItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * IndexPriceKlineCandlestickDataResponseItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - IndexPriceKlineCandlestickDataResponseItemInner.validateJsonElement(element); - } - if (jsonElement == null) { - if (!IndexPriceKlineCandlestickDataResponseItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " IndexPriceKlineCandlestickDataResponseItem is not found in" - + " the empty JSON string", - IndexPriceKlineCandlestickDataResponseItem.openapiRequiredFields - .toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IndexPriceKlineCandlestickDataResponseItem.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'IndexPriceKlineCandlestickDataResponseItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(IndexPriceKlineCandlestickDataResponseItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, IndexPriceKlineCandlestickDataResponseItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public IndexPriceKlineCandlestickDataResponseItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of IndexPriceKlineCandlestickDataResponseItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of IndexPriceKlineCandlestickDataResponseItem - * @throws IOException if the JSON string is invalid with respect to - * IndexPriceKlineCandlestickDataResponseItem - */ - public static IndexPriceKlineCandlestickDataResponseItem fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, IndexPriceKlineCandlestickDataResponseItem.class); - } - - /** - * Convert an instance of IndexPriceKlineCandlestickDataResponseItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IndexPriceKlineCandlestickDataResponseItemInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IndexPriceKlineCandlestickDataResponseItemInner.java deleted file mode 100644 index d4059ef3d..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/IndexPriceKlineCandlestickDataResponseItemInner.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonPrimitive; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class IndexPriceKlineCandlestickDataResponseItemInner extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(IndexPriceKlineCandlestickDataResponseItemInner.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IndexPriceKlineCandlestickDataResponseItemInner.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'IndexPriceKlineCandlestickDataResponseItemInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterLong = - gson.getDelegateAdapter(this, TypeToken.get(Long.class)); - final TypeAdapter adapterString = - gson.getDelegateAdapter(this, TypeToken.get(String.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, - IndexPriceKlineCandlestickDataResponseItemInner value) - throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `Long` - if (value.getActualInstance() instanceof Long) { - JsonPrimitive primitive = - adapterLong - .toJsonTree((Long) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - // check if the actual instance is of the type `String` - if (value.getActualInstance() instanceof String) { - JsonPrimitive primitive = - adapterString - .toJsonTree((String) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " Long, String"); - } - - @Override - public IndexPriceKlineCandlestickDataResponseItemInner read(JsonReader in) - throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize Long - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterLong; - match++; - log.log(Level.FINER, "Input data matches schema 'Long'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for Long failed with `%s`.", - e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Long'", e); - } - // deserialize String - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterString; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for String failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'String'", - e); - } - - if (match == 1) { - IndexPriceKlineCandlestickDataResponseItemInner ret = - new IndexPriceKlineCandlestickDataResponseItemInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for" - + " IndexPriceKlineCandlestickDataResponseItemInner:" - + " %d classes match result, expected 1. Detailed" - + " failure message for oneOf schemas: %s. JSON:" - + " %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public IndexPriceKlineCandlestickDataResponseItemInner() { - super("oneOf", Boolean.FALSE); - } - - public IndexPriceKlineCandlestickDataResponseItemInner(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Long", Long.class); - schemas.put("String", String.class); - } - - @Override - public Map> getSchemas() { - return IndexPriceKlineCandlestickDataResponseItemInner.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Long, String - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof Long) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof String) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Long, String"); - } - - /** - * Get the actual instance, which can be the following: Long, String - * - * @return The actual instance (Long, String) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Long`. If the actual instance is not `Long`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Long` - * @throws ClassCastException if the instance is not `Long` - */ - public Long getLong() throws ClassCastException { - return (Long) super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * IndexPriceKlineCandlestickDataResponseItemInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Long - try { - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for Long failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with String - try { - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for String failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for" - + " IndexPriceKlineCandlestickDataResponseItemInner with oneOf" - + " schemas: Long, String. %d class(es) match the result, expected" - + " 1. Detailed failure message for oneOf schemas: %s. JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of IndexPriceKlineCandlestickDataResponseItemInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of IndexPriceKlineCandlestickDataResponseItemInner - * @throws IOException if the JSON string is invalid with respect to - * IndexPriceKlineCandlestickDataResponseItemInner - */ - public static IndexPriceKlineCandlestickDataResponseItemInner fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, IndexPriceKlineCandlestickDataResponseItemInner.class); - } - - /** - * Convert an instance of IndexPriceKlineCandlestickDataResponseItemInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Interval.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Interval.java index 52451cdd5..58509bad5 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Interval.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Interval.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -24,8 +24,6 @@ /** Gets or Sets interval */ @JsonAdapter(Interval.Adapter.class) public enum Interval { - INTERVAL_1s("1s"), - INTERVAL_1m("1m"), INTERVAL_3m("3m"), diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KeepaliveUserDataStreamResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KeepaliveUserDataStreamResponse.java index d316d1c6b..8c475075a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KeepaliveUserDataStreamResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KeepaliveUserDataStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** KeepaliveUserDataStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KeepaliveUserDataStreamResponse { public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KlineCandlestickDataItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KlineCandlestickDataItem.java new file mode 100644 index 000000000..d22de579f --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KlineCandlestickDataItem.java @@ -0,0 +1,183 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** KlineCandlestickDataItem */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class KlineCandlestickDataItem extends ArrayList { + public KlineCandlestickDataItem() {} + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KlineCandlestickDataItem {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to KlineCandlestickDataItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be a array type in the JSON string but got" + + " `%s`", + jsonElement.toString())); + } + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for (JsonElement element : array) { + KlineCandlestickDataItemInner.validateJsonElement(element); + } + if (jsonElement == null) { + if (!KlineCandlestickDataItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in KlineCandlestickDataItem is not found" + + " in the empty JSON string", + KlineCandlestickDataItem.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!KlineCandlestickDataItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'KlineCandlestickDataItem' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(KlineCandlestickDataItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, KlineCandlestickDataItem value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); + elementAdapter.write(out, obj); + } + + @Override + public KlineCandlestickDataItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of KlineCandlestickDataItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of KlineCandlestickDataItem + * @throws IOException if the JSON string is invalid with respect to KlineCandlestickDataItem + */ + public static KlineCandlestickDataItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, KlineCandlestickDataItem.class); + } + + /** + * Convert an instance of KlineCandlestickDataItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KlineCandlestickDataItemInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KlineCandlestickDataItemInner.java new file mode 100644 index 000000000..0d356cb99 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KlineCandlestickDataItemInner.java @@ -0,0 +1,311 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.common.AbstractOpenApiSchema; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonPrimitive; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.hibernate.validator.constraints.*; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class KlineCandlestickDataItemInner extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(KlineCandlestickDataItemInner.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!KlineCandlestickDataItemInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'KlineCandlestickDataItemInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterLong = + gson.getDelegateAdapter(this, TypeToken.get(Long.class)); + final TypeAdapter adapterString = + gson.getDelegateAdapter(this, TypeToken.get(String.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, KlineCandlestickDataItemInner value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `Long` + if (value.getActualInstance() instanceof Long) { + JsonPrimitive primitive = + adapterLong + .toJsonTree((Long) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + // check if the actual instance is of the type `String` + if (value.getActualInstance() instanceof String) { + JsonPrimitive primitive = + adapterString + .toJsonTree((String) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " Long, String"); + } + + @Override + public KlineCandlestickDataItemInner read(JsonReader in) + throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize Long + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterLong; + match++; + log.log(Level.FINER, "Input data matches schema 'Long'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for Long failed with `%s`.", + e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Long'", e); + } + // deserialize String + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterString; + match++; + log.log(Level.FINER, "Input data matches schema 'String'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for String failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'String'", + e); + } + + if (match == 1) { + KlineCandlestickDataItemInner ret = + new KlineCandlestickDataItemInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for" + + " KlineCandlestickDataItemInner: %d classes match" + + " result, expected 1. Detailed failure message" + + " for oneOf schemas: %s. JSON: %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public KlineCandlestickDataItemInner() { + super("oneOf", Boolean.FALSE); + } + + public KlineCandlestickDataItemInner(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Long", Long.class); + schemas.put("String", String.class); + } + + @Override + public Map> getSchemas() { + return KlineCandlestickDataItemInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: Long, String + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof Long) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof String) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Long, String"); + } + + /** + * Get the actual instance, which can be the following: Long, String + * + * @return The actual instance (Long, String) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Long`. If the actual instance is not `Long`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `Long` + * @throws ClassCastException if the instance is not `Long` + */ + public Long getLong() throws ClassCastException { + return (Long) super.getActualInstance(); + } + + /** + * Get the actual instance of `String`. If the actual instance is not `String`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String) super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * KlineCandlestickDataItemInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with Long + try { + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for Long failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with String + try { + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for String failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for KlineCandlestickDataItemInner with" + + " oneOf schemas: Long, String. %d class(es) match the result," + + " expected 1. Detailed failure message for oneOf schemas: %s." + + " JSON: %s", + validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of KlineCandlestickDataItemInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of KlineCandlestickDataItemInner + * @throws IOException if the JSON string is invalid with respect to + * KlineCandlestickDataItemInner + */ + public static KlineCandlestickDataItemInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, KlineCandlestickDataItemInner.class); + } + + /** + * Convert an instance of KlineCandlestickDataItemInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KlineCandlestickDataResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KlineCandlestickDataResponse.java index 84f7143f0..df53c44cb 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KlineCandlestickDataResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KlineCandlestickDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,8 +34,8 @@ /** KlineCandlestickDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class KlineCandlestickDataResponse extends ArrayList { + comments = "Generator version: 7.22.0") +public class KlineCandlestickDataResponse extends ArrayList { public KlineCandlestickDataResponse() {} @Override @@ -117,7 +117,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - KlineCandlestickDataResponseItem.validateJsonElement(element); + KlineCandlestickDataItem.validateJsonElement(element); } if (jsonElement == null) { if (!KlineCandlestickDataResponse.openapiRequiredFields diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KlineCandlestickDataResponseItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KlineCandlestickDataResponseItem.java deleted file mode 100644 index 5022d8ff4..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KlineCandlestickDataResponseItem.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** KlineCandlestickDataResponseItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class KlineCandlestickDataResponseItem extends ArrayList { - public KlineCandlestickDataResponseItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class KlineCandlestickDataResponseItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * KlineCandlestickDataResponseItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - KlineCandlestickDataResponseItemInner.validateJsonElement(element); - } - if (jsonElement == null) { - if (!KlineCandlestickDataResponseItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in KlineCandlestickDataResponseItem is" - + " not found in the empty JSON string", - KlineCandlestickDataResponseItem.openapiRequiredFields.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!KlineCandlestickDataResponseItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'KlineCandlestickDataResponseItem' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(KlineCandlestickDataResponseItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, KlineCandlestickDataResponseItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public KlineCandlestickDataResponseItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of KlineCandlestickDataResponseItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of KlineCandlestickDataResponseItem - * @throws IOException if the JSON string is invalid with respect to - * KlineCandlestickDataResponseItem - */ - public static KlineCandlestickDataResponseItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, KlineCandlestickDataResponseItem.class); - } - - /** - * Convert an instance of KlineCandlestickDataResponseItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KlineCandlestickDataResponseItemInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KlineCandlestickDataResponseItemInner.java deleted file mode 100644 index 08148ecee..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/KlineCandlestickDataResponseItemInner.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonPrimitive; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class KlineCandlestickDataResponseItemInner extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(KlineCandlestickDataResponseItemInner.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!KlineCandlestickDataResponseItemInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'KlineCandlestickDataResponseItemInner' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterLong = - gson.getDelegateAdapter(this, TypeToken.get(Long.class)); - final TypeAdapter adapterString = - gson.getDelegateAdapter(this, TypeToken.get(String.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, KlineCandlestickDataResponseItemInner value) - throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `Long` - if (value.getActualInstance() instanceof Long) { - JsonPrimitive primitive = - adapterLong - .toJsonTree((Long) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - // check if the actual instance is of the type `String` - if (value.getActualInstance() instanceof String) { - JsonPrimitive primitive = - adapterString - .toJsonTree((String) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " Long, String"); - } - - @Override - public KlineCandlestickDataResponseItemInner read(JsonReader in) - throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize Long - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterLong; - match++; - log.log(Level.FINER, "Input data matches schema 'Long'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for Long failed with `%s`.", - e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Long'", e); - } - // deserialize String - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterString; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for String failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'String'", - e); - } - - if (match == 1) { - KlineCandlestickDataResponseItemInner ret = - new KlineCandlestickDataResponseItemInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for" - + " KlineCandlestickDataResponseItemInner: %d" - + " classes match result, expected 1. Detailed" - + " failure message for oneOf schemas: %s. JSON:" - + " %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public KlineCandlestickDataResponseItemInner() { - super("oneOf", Boolean.FALSE); - } - - public KlineCandlestickDataResponseItemInner(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Long", Long.class); - schemas.put("String", String.class); - } - - @Override - public Map> getSchemas() { - return KlineCandlestickDataResponseItemInner.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Long, String - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof Long) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof String) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Long, String"); - } - - /** - * Get the actual instance, which can be the following: Long, String - * - * @return The actual instance (Long, String) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Long`. If the actual instance is not `Long`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Long` - * @throws ClassCastException if the instance is not `Long` - */ - public Long getLong() throws ClassCastException { - return (Long) super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * KlineCandlestickDataResponseItemInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Long - try { - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for Long failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with String - try { - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for String failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for KlineCandlestickDataResponseItemInner" - + " with oneOf schemas: Long, String. %d class(es) match the" - + " result, expected 1. Detailed failure message for oneOf schemas:" - + " %s. JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of KlineCandlestickDataResponseItemInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of KlineCandlestickDataResponseItemInner - * @throws IOException if the JSON string is invalid with respect to - * KlineCandlestickDataResponseItemInner - */ - public static KlineCandlestickDataResponseItemInner fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, KlineCandlestickDataResponseItemInner.class); - } - - /** - * Convert an instance of KlineCandlestickDataResponseItemInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ListAllConvertPairsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ListAllConvertPairsResponse.java index efd31751f..d0662cd50 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ListAllConvertPairsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ListAllConvertPairsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ListAllConvertPairsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ListAllConvertPairsResponse extends ArrayList { public ListAllConvertPairsResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ListAllConvertPairsResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ListAllConvertPairsResponseInner.java index 236df9f0b..200698a02 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ListAllConvertPairsResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ListAllConvertPairsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ListAllConvertPairsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ListAllConvertPairsResponseInner { public static final String SERIALIZED_NAME_FROM_ASSET = "fromAsset"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/LongShortRatioResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/LongShortRatioResponse.java index 3dac17026..d78733de0 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/LongShortRatioResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/LongShortRatioResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** LongShortRatioResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class LongShortRatioResponse extends ArrayList { public LongShortRatioResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/LongShortRatioResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/LongShortRatioResponseInner.java index e5c5a7b7a..1e877c434 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/LongShortRatioResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/LongShortRatioResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** LongShortRatioResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class LongShortRatioResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -64,7 +64,7 @@ public class LongShortRatioResponseInner { @SerializedName(SERIALIZED_NAME_TIMESTAMP) @jakarta.annotation.Nullable - private String timestamp; + private Long timestamp; public LongShortRatioResponseInner() {} @@ -74,7 +74,7 @@ public LongShortRatioResponseInner symbol(@jakarta.annotation.Nullable String sy } /** - * Get symbol + * long/short account num ratio of all traders * * @return symbol */ @@ -94,7 +94,7 @@ public LongShortRatioResponseInner longShortRatio( } /** - * Get longShortRatio + * long account num ratio of all traders * * @return longShortRatio */ @@ -114,7 +114,7 @@ public LongShortRatioResponseInner longAccount( } /** - * Get longAccount + * short account num ratio of all traders * * @return longAccount */ @@ -134,7 +134,7 @@ public LongShortRatioResponseInner shortAccount( } /** - * Get shortAccount + * Short Account. * * @return shortAccount */ @@ -147,22 +147,22 @@ public void setShortAccount(@jakarta.annotation.Nullable String shortAccount) { this.shortAccount = shortAccount; } - public LongShortRatioResponseInner timestamp(@jakarta.annotation.Nullable String timestamp) { + public LongShortRatioResponseInner timestamp(@jakarta.annotation.Nullable Long timestamp) { this.timestamp = timestamp; return this; } /** - * Get timestamp + * Timestamp in milliseconds. * * @return timestamp */ @jakarta.annotation.Nullable - public String getTimestamp() { + public Long getTimestamp() { return timestamp; } - public void setTimestamp(@jakarta.annotation.Nullable String timestamp) { + public void setTimestamp(@jakarta.annotation.Nullable Long timestamp) { this.timestamp = timestamp; } @@ -312,14 +312,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("shortAccount").toString())); } - if ((jsonObj.get("timestamp") != null && !jsonObj.get("timestamp").isJsonNull()) - && !jsonObj.get("timestamp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `timestamp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("timestamp").toString())); - } } 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/rest/model/MarginType.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarginType.java index 3ec01423f..ce60d0b57 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarginType.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarginType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceKlineCandlestickDataItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceKlineCandlestickDataItem.java new file mode 100644 index 000000000..676dcc3a9 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceKlineCandlestickDataItem.java @@ -0,0 +1,188 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** MarkPriceKlineCandlestickDataItem */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class MarkPriceKlineCandlestickDataItem extends ArrayList { + public MarkPriceKlineCandlestickDataItem() {} + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MarkPriceKlineCandlestickDataItem {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * MarkPriceKlineCandlestickDataItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be a array type in the JSON string but got" + + " `%s`", + jsonElement.toString())); + } + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for (JsonElement element : array) { + MarkPriceKlineCandlestickDataItemInner.validateJsonElement(element); + } + if (jsonElement == null) { + if (!MarkPriceKlineCandlestickDataItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in MarkPriceKlineCandlestickDataItem is" + + " not found in the empty JSON string", + MarkPriceKlineCandlestickDataItem.openapiRequiredFields + .toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MarkPriceKlineCandlestickDataItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MarkPriceKlineCandlestickDataItem' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(MarkPriceKlineCandlestickDataItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, MarkPriceKlineCandlestickDataItem value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); + elementAdapter.write(out, obj); + } + + @Override + public MarkPriceKlineCandlestickDataItem read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of MarkPriceKlineCandlestickDataItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of MarkPriceKlineCandlestickDataItem + * @throws IOException if the JSON string is invalid with respect to + * MarkPriceKlineCandlestickDataItem + */ + public static MarkPriceKlineCandlestickDataItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MarkPriceKlineCandlestickDataItem.class); + } + + /** + * Convert an instance of MarkPriceKlineCandlestickDataItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceKlineCandlestickDataItemInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceKlineCandlestickDataItemInner.java new file mode 100644 index 000000000..31ab86060 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceKlineCandlestickDataItemInner.java @@ -0,0 +1,314 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.common.AbstractOpenApiSchema; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonPrimitive; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.hibernate.validator.constraints.*; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class MarkPriceKlineCandlestickDataItemInner extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(MarkPriceKlineCandlestickDataItemInner.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MarkPriceKlineCandlestickDataItemInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MarkPriceKlineCandlestickDataItemInner' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterLong = + gson.getDelegateAdapter(this, TypeToken.get(Long.class)); + final TypeAdapter adapterString = + gson.getDelegateAdapter(this, TypeToken.get(String.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, MarkPriceKlineCandlestickDataItemInner value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `Long` + if (value.getActualInstance() instanceof Long) { + JsonPrimitive primitive = + adapterLong + .toJsonTree((Long) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + // check if the actual instance is of the type `String` + if (value.getActualInstance() instanceof String) { + JsonPrimitive primitive = + adapterString + .toJsonTree((String) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " Long, String"); + } + + @Override + public MarkPriceKlineCandlestickDataItemInner read(JsonReader in) + throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize Long + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterLong; + match++; + log.log(Level.FINER, "Input data matches schema 'Long'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for Long failed with `%s`.", + e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Long'", e); + } + // deserialize String + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterString; + match++; + log.log(Level.FINER, "Input data matches schema 'String'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for String failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'String'", + e); + } + + if (match == 1) { + MarkPriceKlineCandlestickDataItemInner ret = + new MarkPriceKlineCandlestickDataItemInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for" + + " MarkPriceKlineCandlestickDataItemInner: %d" + + " classes match result, expected 1. Detailed" + + " failure message for oneOf schemas: %s. JSON:" + + " %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public MarkPriceKlineCandlestickDataItemInner() { + super("oneOf", Boolean.FALSE); + } + + public MarkPriceKlineCandlestickDataItemInner(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Long", Long.class); + schemas.put("String", String.class); + } + + @Override + public Map> getSchemas() { + return MarkPriceKlineCandlestickDataItemInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: Long, String + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof Long) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof String) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Long, String"); + } + + /** + * Get the actual instance, which can be the following: Long, String + * + * @return The actual instance (Long, String) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Long`. If the actual instance is not `Long`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `Long` + * @throws ClassCastException if the instance is not `Long` + */ + public Long getLong() throws ClassCastException { + return (Long) super.getActualInstance(); + } + + /** + * Get the actual instance of `String`. If the actual instance is not `String`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String) super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * MarkPriceKlineCandlestickDataItemInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with Long + try { + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for Long failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with String + try { + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for String failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for MarkPriceKlineCandlestickDataItemInner" + + " with oneOf schemas: Long, String. %d class(es) match the" + + " result, expected 1. Detailed failure message for oneOf schemas:" + + " %s. JSON: %s", + validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of MarkPriceKlineCandlestickDataItemInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of MarkPriceKlineCandlestickDataItemInner + * @throws IOException if the JSON string is invalid with respect to + * MarkPriceKlineCandlestickDataItemInner + */ + public static MarkPriceKlineCandlestickDataItemInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, MarkPriceKlineCandlestickDataItemInner.class); + } + + /** + * Convert an instance of MarkPriceKlineCandlestickDataItemInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceKlineCandlestickDataResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceKlineCandlestickDataResponse.java index 040465e56..57f670673 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceKlineCandlestickDataResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceKlineCandlestickDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,9 +34,9 @@ /** MarkPriceKlineCandlestickDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceKlineCandlestickDataResponse - extends ArrayList { + extends ArrayList { public MarkPriceKlineCandlestickDataResponse() {} @Override @@ -118,7 +118,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - MarkPriceKlineCandlestickDataResponseItem.validateJsonElement(element); + MarkPriceKlineCandlestickDataItem.validateJsonElement(element); } if (jsonElement == null) { if (!MarkPriceKlineCandlestickDataResponse.openapiRequiredFields diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceKlineCandlestickDataResponseItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceKlineCandlestickDataResponseItem.java deleted file mode 100644 index dfd1acb90..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceKlineCandlestickDataResponseItem.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** MarkPriceKlineCandlestickDataResponseItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MarkPriceKlineCandlestickDataResponseItem extends ArrayList { - public MarkPriceKlineCandlestickDataResponseItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MarkPriceKlineCandlestickDataResponseItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * MarkPriceKlineCandlestickDataResponseItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - MarkPriceKlineCandlestickDataResponseItemInner.validateJsonElement(element); - } - if (jsonElement == null) { - if (!MarkPriceKlineCandlestickDataResponseItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " MarkPriceKlineCandlestickDataResponseItem is not found in" - + " the empty JSON string", - MarkPriceKlineCandlestickDataResponseItem.openapiRequiredFields - .toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MarkPriceKlineCandlestickDataResponseItem.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'MarkPriceKlineCandlestickDataResponseItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(MarkPriceKlineCandlestickDataResponseItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, MarkPriceKlineCandlestickDataResponseItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public MarkPriceKlineCandlestickDataResponseItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MarkPriceKlineCandlestickDataResponseItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of MarkPriceKlineCandlestickDataResponseItem - * @throws IOException if the JSON string is invalid with respect to - * MarkPriceKlineCandlestickDataResponseItem - */ - public static MarkPriceKlineCandlestickDataResponseItem fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, MarkPriceKlineCandlestickDataResponseItem.class); - } - - /** - * Convert an instance of MarkPriceKlineCandlestickDataResponseItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceKlineCandlestickDataResponseItemInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceKlineCandlestickDataResponseItemInner.java deleted file mode 100644 index 492aef053..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceKlineCandlestickDataResponseItemInner.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonPrimitive; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MarkPriceKlineCandlestickDataResponseItemInner extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(MarkPriceKlineCandlestickDataResponseItemInner.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MarkPriceKlineCandlestickDataResponseItemInner.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'MarkPriceKlineCandlestickDataResponseItemInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterLong = - gson.getDelegateAdapter(this, TypeToken.get(Long.class)); - final TypeAdapter adapterString = - gson.getDelegateAdapter(this, TypeToken.get(String.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, - MarkPriceKlineCandlestickDataResponseItemInner value) - throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `Long` - if (value.getActualInstance() instanceof Long) { - JsonPrimitive primitive = - adapterLong - .toJsonTree((Long) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - // check if the actual instance is of the type `String` - if (value.getActualInstance() instanceof String) { - JsonPrimitive primitive = - adapterString - .toJsonTree((String) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " Long, String"); - } - - @Override - public MarkPriceKlineCandlestickDataResponseItemInner read(JsonReader in) - throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize Long - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterLong; - match++; - log.log(Level.FINER, "Input data matches schema 'Long'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for Long failed with `%s`.", - e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Long'", e); - } - // deserialize String - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterString; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for String failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'String'", - e); - } - - if (match == 1) { - MarkPriceKlineCandlestickDataResponseItemInner ret = - new MarkPriceKlineCandlestickDataResponseItemInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for" - + " MarkPriceKlineCandlestickDataResponseItemInner:" - + " %d classes match result, expected 1. Detailed" - + " failure message for oneOf schemas: %s. JSON:" - + " %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public MarkPriceKlineCandlestickDataResponseItemInner() { - super("oneOf", Boolean.FALSE); - } - - public MarkPriceKlineCandlestickDataResponseItemInner(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Long", Long.class); - schemas.put("String", String.class); - } - - @Override - public Map> getSchemas() { - return MarkPriceKlineCandlestickDataResponseItemInner.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Long, String - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof Long) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof String) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Long, String"); - } - - /** - * Get the actual instance, which can be the following: Long, String - * - * @return The actual instance (Long, String) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Long`. If the actual instance is not `Long`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Long` - * @throws ClassCastException if the instance is not `Long` - */ - public Long getLong() throws ClassCastException { - return (Long) super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * MarkPriceKlineCandlestickDataResponseItemInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Long - try { - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for Long failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with String - try { - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for String failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for" - + " MarkPriceKlineCandlestickDataResponseItemInner with oneOf" - + " schemas: Long, String. %d class(es) match the result, expected" - + " 1. Detailed failure message for oneOf schemas: %s. JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of MarkPriceKlineCandlestickDataResponseItemInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of MarkPriceKlineCandlestickDataResponseItemInner - * @throws IOException if the JSON string is invalid with respect to - * MarkPriceKlineCandlestickDataResponseItemInner - */ - public static MarkPriceKlineCandlestickDataResponseItemInner fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, MarkPriceKlineCandlestickDataResponseItemInner.class); - } - - /** - * Convert an instance of MarkPriceKlineCandlestickDataResponseItemInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceResponse.java index 06f81c2d0..85106b470 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(MarkPriceResponse.class.getName()); diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceResponse1.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceResponse1.java index e98d58e68..2f2f7c370 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceResponse1.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarkPriceResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceResponse1 { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -92,7 +92,7 @@ public MarkPriceResponse1 symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -111,7 +111,7 @@ public MarkPriceResponse1 markPrice(@jakarta.annotation.Nullable String markPric } /** - * Get markPrice + * mark price * * @return markPrice */ @@ -130,7 +130,7 @@ public MarkPriceResponse1 indexPrice(@jakarta.annotation.Nullable String indexPr } /** - * Get indexPrice + * index price * * @return indexPrice */ @@ -150,7 +150,7 @@ public MarkPriceResponse1 estimatedSettlePrice( } /** - * Get estimatedSettlePrice + * Estimated Settle Price, only useful in the last hour before the settlement starts. * * @return estimatedSettlePrice */ @@ -169,7 +169,7 @@ public MarkPriceResponse1 lastFundingRate(@jakarta.annotation.Nullable String la } /** - * Get lastFundingRate + * This is the Latest funding rate * * @return lastFundingRate */ @@ -188,7 +188,7 @@ public MarkPriceResponse1 interestRate(@jakarta.annotation.Nullable String inter } /** - * Get interestRate + * Interest Rate. * * @return interestRate */ @@ -207,7 +207,7 @@ public MarkPriceResponse1 nextFundingTime(@jakarta.annotation.Nullable Long next } /** - * Get nextFundingTime + * Next Funding Time. * * @return nextFundingTime */ @@ -226,7 +226,7 @@ public MarkPriceResponse1 time(@jakarta.annotation.Nullable Long time) { } /** - * Get time + * Time. * * @return time */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceResponse2.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceResponse2.java index 227c13dd3..2dacfd50a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceResponse2.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarkPriceResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceResponse2 extends ArrayList { public MarkPriceResponse2() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceResponse2Inner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceResponse2Inner.java index d8d6a3a14..23eba4053 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceResponse2Inner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MarkPriceResponse2Inner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarkPriceResponse2Inner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceResponse2Inner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -92,7 +92,7 @@ public MarkPriceResponse2Inner symbol(@jakarta.annotation.Nullable String symbol } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -111,7 +111,7 @@ public MarkPriceResponse2Inner markPrice(@jakarta.annotation.Nullable String mar } /** - * Get markPrice + * mark price * * @return markPrice */ @@ -130,7 +130,7 @@ public MarkPriceResponse2Inner indexPrice(@jakarta.annotation.Nullable String in } /** - * Get indexPrice + * index price * * @return indexPrice */ @@ -150,7 +150,7 @@ public MarkPriceResponse2Inner estimatedSettlePrice( } /** - * Get estimatedSettlePrice + * Estimated Settle Price, only useful in the last hour before the settlement starts. * * @return estimatedSettlePrice */ @@ -170,7 +170,7 @@ public MarkPriceResponse2Inner lastFundingRate( } /** - * Get lastFundingRate + * This is the Latest funding rate * * @return lastFundingRate */ @@ -189,7 +189,7 @@ public MarkPriceResponse2Inner interestRate(@jakarta.annotation.Nullable String } /** - * Get interestRate + * Interest Rate. * * @return interestRate */ @@ -209,7 +209,7 @@ public MarkPriceResponse2Inner nextFundingTime( } /** - * Get nextFundingTime + * Next Funding Time. * * @return nextFundingTime */ @@ -228,7 +228,7 @@ public MarkPriceResponse2Inner time(@jakarta.annotation.Nullable Long time) { } /** - * Get time + * Time. * * @return time */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyIsolatedPositionMarginRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyIsolatedPositionMarginRequest.java index d5ec449e2..cd6d72ed5 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyIsolatedPositionMarginRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyIsolatedPositionMarginRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** ModifyIsolatedPositionMarginRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyIsolatedPositionMarginRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -47,7 +47,7 @@ public class ModifyIsolatedPositionMarginRequest { @SerializedName(SERIALIZED_NAME_POSITION_SIDE) @jakarta.annotation.Nullable - private PositionSide positionSide; + private String positionSide; public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -59,7 +59,7 @@ public class ModifyIsolatedPositionMarginRequest { @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private String type; + private Integer type; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -90,23 +90,23 @@ public void setSymbol(@jakarta.annotation.Nonnull String symbol) { } public ModifyIsolatedPositionMarginRequest positionSide( - @jakarta.annotation.Nullable PositionSide positionSide) { + @jakarta.annotation.Nullable String positionSide) { this.positionSide = positionSide; return this; } /** - * Get positionSide + * Default `BOTH` for One-way Mode ; `LONG` or `SHORT` for Hedge + * Mode. It must be sent with Hedge Mode. * * @return positionSide */ @jakarta.annotation.Nullable - @Valid - public PositionSide getPositionSide() { + public String getPositionSide() { return positionSide; } - public void setPositionSide(@jakarta.annotation.Nullable PositionSide positionSide) { + public void setPositionSide(@jakarta.annotation.Nullable String positionSide) { this.positionSide = positionSide; } @@ -116,7 +116,7 @@ public ModifyIsolatedPositionMarginRequest amount(@jakarta.annotation.Nonnull Do } /** - * Get amount + * Margin asset * * @return amount */ @@ -131,23 +131,23 @@ public void setAmount(@jakarta.annotation.Nonnull Double amount) { this.amount = amount; } - public ModifyIsolatedPositionMarginRequest type(@jakarta.annotation.Nonnull String type) { + public ModifyIsolatedPositionMarginRequest type(@jakarta.annotation.Nonnull Integer type) { this.type = type; return this; } /** - * Get type + * 1: Add position margin,2: Reduce position margin * * @return type */ @jakarta.annotation.Nonnull @NotNull - public String getType() { + public Integer getType() { return type; } - public void setType(@jakarta.annotation.Nonnull String type) { + public void setType(@jakarta.annotation.Nonnull Integer type) { this.type = type; } @@ -158,11 +158,12 @@ public ModifyIsolatedPositionMarginRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -308,16 +309,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("symbol").toString())); } - // validate the optional field `positionSide` - if (jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) { - PositionSide.validateJsonElement(jsonObj.get("positionSide")); - } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) + && !jsonObj.get("positionSide").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); + "Expected the field `positionSide` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("positionSide").toString())); } } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyIsolatedPositionMarginResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyIsolatedPositionMarginResponse.java index 9fa32b623..707c4fc4e 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyIsolatedPositionMarginResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyIsolatedPositionMarginResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** ModifyIsolatedPositionMarginResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyIsolatedPositionMarginResponse { public static final String SERIALIZED_NAME_AMOUNT = "amount"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyMultipleOrdersRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyMultipleOrdersRequest.java index 8bf077429..9a87169d1 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyMultipleOrdersRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyMultipleOrdersRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** ModifyMultipleOrdersRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyMultipleOrdersRequest { public static final String SERIALIZED_NAME_BATCH_ORDERS = "batchOrders"; @@ -79,11 +79,12 @@ public ModifyMultipleOrdersRequest recvWindow(@jakarta.annotation.Nullable Long } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyMultipleOrdersResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyMultipleOrdersResponse.java index f5ed11c3e..8a645c533 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyMultipleOrdersResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyMultipleOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ModifyMultipleOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyMultipleOrdersResponse extends ArrayList { public ModifyMultipleOrdersResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyMultipleOrdersResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyMultipleOrdersResponseInner.java index 256c33922..8d88c284a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyMultipleOrdersResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyMultipleOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ModifyMultipleOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyMultipleOrdersResponseInner { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -66,17 +66,17 @@ public class ModifyMultipleOrdersResponseInner { @jakarta.annotation.Nullable private String clientOrderId; - public static final String SERIALIZED_NAME_PRICE = "price"; + public static final String SERIALIZED_NAME_MODIFY_ID = "modifyId"; - @SerializedName(SERIALIZED_NAME_PRICE) + @SerializedName(SERIALIZED_NAME_MODIFY_ID) @jakarta.annotation.Nullable - private String price; + private Long modifyId; - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; + public static final String SERIALIZED_NAME_PRICE = "price"; - @SerializedName(SERIALIZED_NAME_AVG_PRICE) + @SerializedName(SERIALIZED_NAME_PRICE) @jakarta.annotation.Nullable - private String avgPrice; + private String price; public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; @@ -96,12 +96,6 @@ public class ModifyMultipleOrdersResponseInner { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_BASE = "cumBase"; - - @SerializedName(SERIALIZED_NAME_CUM_BASE) - @jakarta.annotation.Nullable - private String cumBase; - public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) @@ -297,43 +291,42 @@ public void setClientOrderId(@jakarta.annotation.Nullable String clientOrderId) this.clientOrderId = clientOrderId; } - public ModifyMultipleOrdersResponseInner price(@jakarta.annotation.Nullable String price) { - this.price = price; + public ModifyMultipleOrdersResponseInner modifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; return this; } /** - * Get price + * user-defined modification identifier, only returned if provided in the request * - * @return price + * @return modifyId */ @jakarta.annotation.Nullable - public String getPrice() { - return price; + public Long getModifyId() { + return modifyId; } - public void setPrice(@jakarta.annotation.Nullable String price) { - this.price = price; + public void setModifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; } - public ModifyMultipleOrdersResponseInner avgPrice( - @jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; + public ModifyMultipleOrdersResponseInner price(@jakarta.annotation.Nullable String price) { + this.price = price; return this; } /** - * Get avgPrice + * Get price * - * @return avgPrice + * @return price */ @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; + public String getPrice() { + return price; } - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; + public void setPrice(@jakarta.annotation.Nullable String price) { + this.price = price; } public ModifyMultipleOrdersResponseInner origQty(@jakarta.annotation.Nullable String origQty) { @@ -394,25 +387,6 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public ModifyMultipleOrdersResponseInner cumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - return this; - } - - /** - * Get cumBase - * - * @return cumBase - */ - @jakarta.annotation.Nullable - public String getCumBase() { - return cumBase; - } - - public void setCumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - } - public ModifyMultipleOrdersResponseInner timeInForce( @jakarta.annotation.Nullable String timeInForce) { this.timeInForce = timeInForce; @@ -618,7 +592,7 @@ public ModifyMultipleOrdersResponseInner priceMatch( } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -638,7 +612,7 @@ public ModifyMultipleOrdersResponseInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -659,7 +633,7 @@ public ModifyMultipleOrdersResponseInner goodTillDate( } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ @@ -746,12 +720,11 @@ public boolean equals(Object o) { && Objects.equals(this.status, modifyMultipleOrdersResponseInner.status) && Objects.equals( this.clientOrderId, modifyMultipleOrdersResponseInner.clientOrderId) + && Objects.equals(this.modifyId, modifyMultipleOrdersResponseInner.modifyId) && Objects.equals(this.price, modifyMultipleOrdersResponseInner.price) - && Objects.equals(this.avgPrice, modifyMultipleOrdersResponseInner.avgPrice) && Objects.equals(this.origQty, modifyMultipleOrdersResponseInner.origQty) && Objects.equals(this.executedQty, modifyMultipleOrdersResponseInner.executedQty) && Objects.equals(this.cumQty, modifyMultipleOrdersResponseInner.cumQty) - && Objects.equals(this.cumBase, modifyMultipleOrdersResponseInner.cumBase) && Objects.equals(this.timeInForce, modifyMultipleOrdersResponseInner.timeInForce) && Objects.equals(this.type, modifyMultipleOrdersResponseInner.type) && Objects.equals(this.reduceOnly, modifyMultipleOrdersResponseInner.reduceOnly) @@ -781,12 +754,11 @@ public int hashCode() { pair, status, clientOrderId, + modifyId, price, - avgPrice, origQty, executedQty, cumQty, - cumBase, timeInForce, type, reduceOnly, @@ -814,12 +786,11 @@ public String toString() { sb.append(" pair: ").append(toIndentedString(pair)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); + sb.append(" modifyId: ").append(toIndentedString(modifyId)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumBase: ").append(toIndentedString(cumBase)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); @@ -865,14 +836,14 @@ public String toUrlQueryString() { String clientOrderIdValueAsString = ""; clientOrderIdValueAsString = clientOrderIdValue.toString(); sb.append("clientOrderId=").append(urlEncode(clientOrderIdValueAsString)).append(""); + Object modifyIdValue = getModifyId(); + String modifyIdValueAsString = ""; + modifyIdValueAsString = modifyIdValue.toString(); + sb.append("modifyId=").append(urlEncode(modifyIdValueAsString)).append(""); Object priceValue = getPrice(); String priceValueAsString = ""; priceValueAsString = priceValue.toString(); sb.append("price=").append(urlEncode(priceValueAsString)).append(""); - Object avgPriceValue = getAvgPrice(); - String avgPriceValueAsString = ""; - avgPriceValueAsString = avgPriceValue.toString(); - sb.append("avgPrice=").append(urlEncode(avgPriceValueAsString)).append(""); Object origQtyValue = getOrigQty(); String origQtyValueAsString = ""; origQtyValueAsString = origQtyValue.toString(); @@ -885,10 +856,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = ""; cumQtyValueAsString = cumQtyValue.toString(); sb.append("cumQty=").append(urlEncode(cumQtyValueAsString)).append(""); - Object cumBaseValue = getCumBase(); - String cumBaseValueAsString = ""; - cumBaseValueAsString = cumBaseValue.toString(); - sb.append("cumBase=").append(urlEncode(cumBaseValueAsString)).append(""); Object timeInForceValue = getTimeInForce(); String timeInForceValueAsString = ""; timeInForceValueAsString = timeInForceValue.toString(); @@ -988,12 +955,11 @@ private String toIndentedString(Object o) { openapiFields.add("pair"); openapiFields.add("status"); openapiFields.add("clientOrderId"); + openapiFields.add("modifyId"); openapiFields.add("price"); - openapiFields.add("avgPrice"); openapiFields.add("origQty"); openapiFields.add("executedQty"); openapiFields.add("cumQty"); - openapiFields.add("cumBase"); openapiFields.add("timeInForce"); openapiFields.add("type"); openapiFields.add("reduceOnly"); @@ -1075,14 +1041,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("price").toString())); } - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) && !jsonObj.get("origQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1107,14 +1065,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumBase") != null && !jsonObj.get("cumBase").isJsonNull()) - && !jsonObj.get("cumBase").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumBase` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("cumBase").toString())); - } if ((jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) && !jsonObj.get("timeInForce").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyOrderRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyOrderRequest.java index b1e9a48a0..21979ff65 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyOrderRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** ModifyOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyOrderRequest { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -79,6 +79,12 @@ public class ModifyOrderRequest { @jakarta.annotation.Nullable private PriceMatch priceMatch; + public static final String SERIALIZED_NAME_MODIFY_ID = "modifyId"; + + @SerializedName(SERIALIZED_NAME_MODIFY_ID) + @jakarta.annotation.Nullable + private Long modifyId; + public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @SerializedName(SERIALIZED_NAME_RECV_WINDOW) @@ -173,7 +179,7 @@ public ModifyOrderRequest quantity(@jakarta.annotation.Nonnull Double quantity) } /** - * Get quantity + * Order quantity, cannot be sent with `closePosition=true` * * @return quantity */ @@ -229,17 +235,38 @@ public void setPriceMatch(@jakarta.annotation.Nullable PriceMatch priceMatch) { this.priceMatch = priceMatch; } + public ModifyOrderRequest modifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + return this; + } + + /** + * User-defined modification identifier, returned as-is in the response. Optional; not validated + * for uniqueness. + * + * @return modifyId + */ + @jakarta.annotation.Nullable + public Long getModifyId() { + return modifyId; + } + + public void setModifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + } + public ModifyOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) { this.recvWindow = recvWindow; return this; } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -264,13 +291,22 @@ public boolean equals(Object o) { && Objects.equals(this.quantity, modifyOrderRequest.quantity) && Objects.equals(this.price, modifyOrderRequest.price) && Objects.equals(this.priceMatch, modifyOrderRequest.priceMatch) + && Objects.equals(this.modifyId, modifyOrderRequest.modifyId) && Objects.equals(this.recvWindow, modifyOrderRequest.recvWindow); } @Override public int hashCode() { return Objects.hash( - orderId, origClientOrderId, symbol, side, quantity, price, priceMatch, recvWindow); + orderId, + origClientOrderId, + symbol, + side, + quantity, + price, + priceMatch, + modifyId, + recvWindow); } @Override @@ -284,6 +320,7 @@ public String toString() { sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" priceMatch: ").append(toIndentedString(priceMatch)).append("\n"); + sb.append(" modifyId: ").append(toIndentedString(modifyId)).append("\n"); sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); sb.append("}"); return sb.toString(); @@ -322,6 +359,10 @@ public String toUrlQueryString() { String priceMatchValueAsString = ""; priceMatchValueAsString = priceMatchValue.toString(); sb.append("priceMatch=").append(urlEncode(priceMatchValueAsString)).append(""); + Object modifyIdValue = getModifyId(); + String modifyIdValueAsString = ""; + modifyIdValueAsString = modifyIdValue.toString(); + sb.append("modifyId=").append(urlEncode(modifyIdValueAsString)).append(""); Object recvWindowValue = getRecvWindow(); String recvWindowValueAsString = ""; recvWindowValueAsString = recvWindowValue.toString(); @@ -361,6 +402,7 @@ private String toIndentedString(Object o) { openapiFields.add("quantity"); openapiFields.add("price"); openapiFields.add("priceMatch"); + openapiFields.add("modifyId"); openapiFields.add("recvWindow"); // a set of required properties/fields (JSON key names) diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyOrderResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyOrderResponse.java index 5cea665ef..dc0243a0a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyOrderResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ModifyOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ModifyOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyOrderResponse { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -66,17 +66,17 @@ public class ModifyOrderResponse { @jakarta.annotation.Nullable private String clientOrderId; - public static final String SERIALIZED_NAME_PRICE = "price"; + public static final String SERIALIZED_NAME_MODIFY_ID = "modifyId"; - @SerializedName(SERIALIZED_NAME_PRICE) + @SerializedName(SERIALIZED_NAME_MODIFY_ID) @jakarta.annotation.Nullable - private String price; + private Long modifyId; - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; + public static final String SERIALIZED_NAME_PRICE = "price"; - @SerializedName(SERIALIZED_NAME_AVG_PRICE) + @SerializedName(SERIALIZED_NAME_PRICE) @jakarta.annotation.Nullable - private String avgPrice; + private String price; public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; @@ -96,12 +96,6 @@ public class ModifyOrderResponse { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_BASE = "cumBase"; - - @SerializedName(SERIALIZED_NAME_CUM_BASE) - @jakarta.annotation.Nullable - private String cumBase; - public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) @@ -284,42 +278,42 @@ public void setClientOrderId(@jakarta.annotation.Nullable String clientOrderId) this.clientOrderId = clientOrderId; } - public ModifyOrderResponse price(@jakarta.annotation.Nullable String price) { - this.price = price; + public ModifyOrderResponse modifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; return this; } /** - * Get price + * user-defined modification identifier, only returned if provided in the request * - * @return price + * @return modifyId */ @jakarta.annotation.Nullable - public String getPrice() { - return price; + public Long getModifyId() { + return modifyId; } - public void setPrice(@jakarta.annotation.Nullable String price) { - this.price = price; + public void setModifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; } - public ModifyOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; + public ModifyOrderResponse price(@jakarta.annotation.Nullable String price) { + this.price = price; return this; } /** - * Get avgPrice + * Get price * - * @return avgPrice + * @return price */ @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; + public String getPrice() { + return price; } - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; + public void setPrice(@jakarta.annotation.Nullable String price) { + this.price = price; } public ModifyOrderResponse origQty(@jakarta.annotation.Nullable String origQty) { @@ -379,25 +373,6 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public ModifyOrderResponse cumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - return this; - } - - /** - * Get cumBase - * - * @return cumBase - */ - @jakarta.annotation.Nullable - public String getCumBase() { - return cumBase; - } - - public void setCumBase(@jakarta.annotation.Nullable String cumBase) { - this.cumBase = cumBase; - } - public ModifyOrderResponse timeInForce(@jakarta.annotation.Nullable String timeInForce) { this.timeInForce = timeInForce; return this; @@ -594,7 +569,7 @@ public ModifyOrderResponse priceMatch(@jakarta.annotation.Nullable String priceM } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -614,7 +589,7 @@ public ModifyOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -634,7 +609,7 @@ public ModifyOrderResponse goodTillDate(@jakarta.annotation.Nullable Long goodTi } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ @@ -680,12 +655,11 @@ public boolean equals(Object o) { && Objects.equals(this.pair, modifyOrderResponse.pair) && Objects.equals(this.status, modifyOrderResponse.status) && Objects.equals(this.clientOrderId, modifyOrderResponse.clientOrderId) + && Objects.equals(this.modifyId, modifyOrderResponse.modifyId) && Objects.equals(this.price, modifyOrderResponse.price) - && Objects.equals(this.avgPrice, modifyOrderResponse.avgPrice) && Objects.equals(this.origQty, modifyOrderResponse.origQty) && Objects.equals(this.executedQty, modifyOrderResponse.executedQty) && Objects.equals(this.cumQty, modifyOrderResponse.cumQty) - && Objects.equals(this.cumBase, modifyOrderResponse.cumBase) && Objects.equals(this.timeInForce, modifyOrderResponse.timeInForce) && Objects.equals(this.type, modifyOrderResponse.type) && Objects.equals(this.reduceOnly, modifyOrderResponse.reduceOnly) @@ -711,12 +685,11 @@ public int hashCode() { pair, status, clientOrderId, + modifyId, price, - avgPrice, origQty, executedQty, cumQty, - cumBase, timeInForce, type, reduceOnly, @@ -742,12 +715,11 @@ public String toString() { sb.append(" pair: ").append(toIndentedString(pair)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); + sb.append(" modifyId: ").append(toIndentedString(modifyId)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumBase: ").append(toIndentedString(cumBase)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); @@ -791,14 +763,14 @@ public String toUrlQueryString() { String clientOrderIdValueAsString = ""; clientOrderIdValueAsString = clientOrderIdValue.toString(); sb.append("clientOrderId=").append(urlEncode(clientOrderIdValueAsString)).append(""); + Object modifyIdValue = getModifyId(); + String modifyIdValueAsString = ""; + modifyIdValueAsString = modifyIdValue.toString(); + sb.append("modifyId=").append(urlEncode(modifyIdValueAsString)).append(""); Object priceValue = getPrice(); String priceValueAsString = ""; priceValueAsString = priceValue.toString(); sb.append("price=").append(urlEncode(priceValueAsString)).append(""); - Object avgPriceValue = getAvgPrice(); - String avgPriceValueAsString = ""; - avgPriceValueAsString = avgPriceValue.toString(); - sb.append("avgPrice=").append(urlEncode(avgPriceValueAsString)).append(""); Object origQtyValue = getOrigQty(); String origQtyValueAsString = ""; origQtyValueAsString = origQtyValue.toString(); @@ -811,10 +783,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = ""; cumQtyValueAsString = cumQtyValue.toString(); sb.append("cumQty=").append(urlEncode(cumQtyValueAsString)).append(""); - Object cumBaseValue = getCumBase(); - String cumBaseValueAsString = ""; - cumBaseValueAsString = cumBaseValue.toString(); - sb.append("cumBase=").append(urlEncode(cumBaseValueAsString)).append(""); Object timeInForceValue = getTimeInForce(); String timeInForceValueAsString = ""; timeInForceValueAsString = timeInForceValue.toString(); @@ -906,12 +874,11 @@ private String toIndentedString(Object o) { openapiFields.add("pair"); openapiFields.add("status"); openapiFields.add("clientOrderId"); + openapiFields.add("modifyId"); openapiFields.add("price"); - openapiFields.add("avgPrice"); openapiFields.add("origQty"); openapiFields.add("executedQty"); openapiFields.add("cumQty"); - openapiFields.add("cumBase"); openapiFields.add("timeInForce"); openapiFields.add("type"); openapiFields.add("reduceOnly"); @@ -989,14 +956,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("price").toString())); } - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) && !jsonObj.get("origQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1021,14 +980,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumBase") != null && !jsonObj.get("cumBase").isJsonNull()) - && !jsonObj.get("cumBase").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumBase` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("cumBase").toString())); - } if ((jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) && !jsonObj.get("timeInForce").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MultiAssetsModeAssetIndexResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MultiAssetsModeAssetIndexResponse.java deleted file mode 100644 index 5a47b9bdc..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MultiAssetsModeAssetIndexResponse.java +++ /dev/null @@ -1,324 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MultiAssetsModeAssetIndexResponse extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(MultiAssetsModeAssetIndexResponse.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MultiAssetsModeAssetIndexResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MultiAssetsModeAssetIndexResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter - adapterMultiAssetsModeAssetIndexResponse1 = - gson.getDelegateAdapter( - this, TypeToken.get(MultiAssetsModeAssetIndexResponse1.class)); - final TypeAdapter - adapterMultiAssetsModeAssetIndexResponse2 = - gson.getDelegateAdapter( - this, TypeToken.get(MultiAssetsModeAssetIndexResponse2.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MultiAssetsModeAssetIndexResponse value) - throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type - // `MultiAssetsModeAssetIndexResponse1` - if (value.getActualInstance() - instanceof MultiAssetsModeAssetIndexResponse1) { - JsonElement element = - adapterMultiAssetsModeAssetIndexResponse1.toJsonTree( - (MultiAssetsModeAssetIndexResponse1) - value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type - // `MultiAssetsModeAssetIndexResponse2` - if (value.getActualInstance() - instanceof MultiAssetsModeAssetIndexResponse2) { - JsonElement element = - adapterMultiAssetsModeAssetIndexResponse2.toJsonTree( - (MultiAssetsModeAssetIndexResponse2) - value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " MultiAssetsModeAssetIndexResponse1," - + " MultiAssetsModeAssetIndexResponse2"); - } - - @Override - public MultiAssetsModeAssetIndexResponse read(JsonReader in) - throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize MultiAssetsModeAssetIndexResponse1 - try { - // validate the JSON object to see if any exception is thrown - MultiAssetsModeAssetIndexResponse1.validateJsonElement(jsonElement); - actualAdapter = adapterMultiAssetsModeAssetIndexResponse1; - match++; - log.log( - Level.FINER, - "Input data matches schema" - + " 'MultiAssetsModeAssetIndexResponse1'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for" - + " MultiAssetsModeAssetIndexResponse1 failed" - + " with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema" - + " 'MultiAssetsModeAssetIndexResponse1'", - e); - } - // deserialize MultiAssetsModeAssetIndexResponse2 - try { - // validate the JSON object to see if any exception is thrown - MultiAssetsModeAssetIndexResponse2.validateJsonElement(jsonElement); - actualAdapter = adapterMultiAssetsModeAssetIndexResponse2; - match++; - log.log( - Level.FINER, - "Input data matches schema" - + " 'MultiAssetsModeAssetIndexResponse2'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for" - + " MultiAssetsModeAssetIndexResponse2 failed" - + " with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema" - + " 'MultiAssetsModeAssetIndexResponse2'", - e); - } - - if (match == 1) { - MultiAssetsModeAssetIndexResponse ret = - new MultiAssetsModeAssetIndexResponse(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for" - + " MultiAssetsModeAssetIndexResponse: %d classes" - + " match result, expected 1. Detailed failure" - + " message for oneOf schemas: %s. JSON: %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public MultiAssetsModeAssetIndexResponse() { - super("oneOf", Boolean.FALSE); - } - - public MultiAssetsModeAssetIndexResponse(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("MultiAssetsModeAssetIndexResponse1", MultiAssetsModeAssetIndexResponse1.class); - schemas.put("MultiAssetsModeAssetIndexResponse2", MultiAssetsModeAssetIndexResponse2.class); - } - - @Override - public Map> getSchemas() { - return MultiAssetsModeAssetIndexResponse.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: MultiAssetsModeAssetIndexResponse1, - * MultiAssetsModeAssetIndexResponse2 - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof MultiAssetsModeAssetIndexResponse1) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof MultiAssetsModeAssetIndexResponse2) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException( - "Invalid instance type. Must be MultiAssetsModeAssetIndexResponse1," - + " MultiAssetsModeAssetIndexResponse2"); - } - - /** - * Get the actual instance, which can be the following: MultiAssetsModeAssetIndexResponse1, - * MultiAssetsModeAssetIndexResponse2 - * - * @return The actual instance (MultiAssetsModeAssetIndexResponse1, - * MultiAssetsModeAssetIndexResponse2) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `MultiAssetsModeAssetIndexResponse1`. If the actual instance is - * not `MultiAssetsModeAssetIndexResponse1`, the ClassCastException will be thrown. - * - * @return The actual instance of `MultiAssetsModeAssetIndexResponse1` - * @throws ClassCastException if the instance is not `MultiAssetsModeAssetIndexResponse1` - */ - public MultiAssetsModeAssetIndexResponse1 getMultiAssetsModeAssetIndexResponse1() - throws ClassCastException { - return (MultiAssetsModeAssetIndexResponse1) super.getActualInstance(); - } - - /** - * Get the actual instance of `MultiAssetsModeAssetIndexResponse2`. If the actual instance is - * not `MultiAssetsModeAssetIndexResponse2`, the ClassCastException will be thrown. - * - * @return The actual instance of `MultiAssetsModeAssetIndexResponse2` - * @throws ClassCastException if the instance is not `MultiAssetsModeAssetIndexResponse2` - */ - public MultiAssetsModeAssetIndexResponse2 getMultiAssetsModeAssetIndexResponse2() - throws ClassCastException { - return (MultiAssetsModeAssetIndexResponse2) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * MultiAssetsModeAssetIndexResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with MultiAssetsModeAssetIndexResponse1 - try { - MultiAssetsModeAssetIndexResponse1.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for MultiAssetsModeAssetIndexResponse1 failed with" - + " `%s`.", - e.getMessage())); - // continue to the next one - } - // validate the json string with MultiAssetsModeAssetIndexResponse2 - try { - MultiAssetsModeAssetIndexResponse2.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for MultiAssetsModeAssetIndexResponse2 failed with" - + " `%s`.", - e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for MultiAssetsModeAssetIndexResponse with" - + " oneOf schemas: MultiAssetsModeAssetIndexResponse1," - + " MultiAssetsModeAssetIndexResponse2. %d class(es) match the" - + " result, expected 1. Detailed failure message for oneOf schemas:" - + " %s. JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of MultiAssetsModeAssetIndexResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of MultiAssetsModeAssetIndexResponse - * @throws IOException if the JSON string is invalid with respect to - * MultiAssetsModeAssetIndexResponse - */ - public static MultiAssetsModeAssetIndexResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MultiAssetsModeAssetIndexResponse.class); - } - - /** - * Convert an instance of MultiAssetsModeAssetIndexResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MultiAssetsModeAssetIndexResponse1.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MultiAssetsModeAssetIndexResponse1.java deleted file mode 100644 index f5a16d39f..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MultiAssetsModeAssetIndexResponse1.java +++ /dev/null @@ -1,657 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** MultiAssetsModeAssetIndexResponse1 */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MultiAssetsModeAssetIndexResponse1 { - public static final String SERIALIZED_NAME_SYMBOL = "symbol"; - - @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nullable - private String symbol; - - public static final String SERIALIZED_NAME_TIME = "time"; - - @SerializedName(SERIALIZED_NAME_TIME) - @jakarta.annotation.Nullable - private Long time; - - public static final String SERIALIZED_NAME_INDEX = "index"; - - @SerializedName(SERIALIZED_NAME_INDEX) - @jakarta.annotation.Nullable - private String index; - - public static final String SERIALIZED_NAME_BID_BUFFER = "bidBuffer"; - - @SerializedName(SERIALIZED_NAME_BID_BUFFER) - @jakarta.annotation.Nullable - private String bidBuffer; - - public static final String SERIALIZED_NAME_ASK_BUFFER = "askBuffer"; - - @SerializedName(SERIALIZED_NAME_ASK_BUFFER) - @jakarta.annotation.Nullable - private String askBuffer; - - public static final String SERIALIZED_NAME_BID_RATE = "bidRate"; - - @SerializedName(SERIALIZED_NAME_BID_RATE) - @jakarta.annotation.Nullable - private String bidRate; - - public static final String SERIALIZED_NAME_ASK_RATE = "askRate"; - - @SerializedName(SERIALIZED_NAME_ASK_RATE) - @jakarta.annotation.Nullable - private String askRate; - - public static final String SERIALIZED_NAME_AUTO_EXCHANGE_BID_BUFFER = "autoExchangeBidBuffer"; - - @SerializedName(SERIALIZED_NAME_AUTO_EXCHANGE_BID_BUFFER) - @jakarta.annotation.Nullable - private String autoExchangeBidBuffer; - - public static final String SERIALIZED_NAME_AUTO_EXCHANGE_ASK_BUFFER = "autoExchangeAskBuffer"; - - @SerializedName(SERIALIZED_NAME_AUTO_EXCHANGE_ASK_BUFFER) - @jakarta.annotation.Nullable - private String autoExchangeAskBuffer; - - public static final String SERIALIZED_NAME_AUTO_EXCHANGE_BID_RATE = "autoExchangeBidRate"; - - @SerializedName(SERIALIZED_NAME_AUTO_EXCHANGE_BID_RATE) - @jakarta.annotation.Nullable - private String autoExchangeBidRate; - - public static final String SERIALIZED_NAME_AUTO_EXCHANGE_ASK_RATE = "autoExchangeAskRate"; - - @SerializedName(SERIALIZED_NAME_AUTO_EXCHANGE_ASK_RATE) - @jakarta.annotation.Nullable - private String autoExchangeAskRate; - - public MultiAssetsModeAssetIndexResponse1() {} - - public MultiAssetsModeAssetIndexResponse1 symbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - return this; - } - - /** - * Get symbol - * - * @return symbol - */ - @jakarta.annotation.Nullable - public String getSymbol() { - return symbol; - } - - public void setSymbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - } - - public MultiAssetsModeAssetIndexResponse1 time(@jakarta.annotation.Nullable Long time) { - this.time = time; - return this; - } - - /** - * Get time - * - * @return time - */ - @jakarta.annotation.Nullable - public Long getTime() { - return time; - } - - public void setTime(@jakarta.annotation.Nullable Long time) { - this.time = time; - } - - public MultiAssetsModeAssetIndexResponse1 index(@jakarta.annotation.Nullable String index) { - this.index = index; - return this; - } - - /** - * Get index - * - * @return index - */ - @jakarta.annotation.Nullable - public String getIndex() { - return index; - } - - public void setIndex(@jakarta.annotation.Nullable String index) { - this.index = index; - } - - public MultiAssetsModeAssetIndexResponse1 bidBuffer( - @jakarta.annotation.Nullable String bidBuffer) { - this.bidBuffer = bidBuffer; - return this; - } - - /** - * Get bidBuffer - * - * @return bidBuffer - */ - @jakarta.annotation.Nullable - public String getBidBuffer() { - return bidBuffer; - } - - public void setBidBuffer(@jakarta.annotation.Nullable String bidBuffer) { - this.bidBuffer = bidBuffer; - } - - public MultiAssetsModeAssetIndexResponse1 askBuffer( - @jakarta.annotation.Nullable String askBuffer) { - this.askBuffer = askBuffer; - return this; - } - - /** - * Get askBuffer - * - * @return askBuffer - */ - @jakarta.annotation.Nullable - public String getAskBuffer() { - return askBuffer; - } - - public void setAskBuffer(@jakarta.annotation.Nullable String askBuffer) { - this.askBuffer = askBuffer; - } - - public MultiAssetsModeAssetIndexResponse1 bidRate(@jakarta.annotation.Nullable String bidRate) { - this.bidRate = bidRate; - return this; - } - - /** - * Get bidRate - * - * @return bidRate - */ - @jakarta.annotation.Nullable - public String getBidRate() { - return bidRate; - } - - public void setBidRate(@jakarta.annotation.Nullable String bidRate) { - this.bidRate = bidRate; - } - - public MultiAssetsModeAssetIndexResponse1 askRate(@jakarta.annotation.Nullable String askRate) { - this.askRate = askRate; - return this; - } - - /** - * Get askRate - * - * @return askRate - */ - @jakarta.annotation.Nullable - public String getAskRate() { - return askRate; - } - - public void setAskRate(@jakarta.annotation.Nullable String askRate) { - this.askRate = askRate; - } - - public MultiAssetsModeAssetIndexResponse1 autoExchangeBidBuffer( - @jakarta.annotation.Nullable String autoExchangeBidBuffer) { - this.autoExchangeBidBuffer = autoExchangeBidBuffer; - return this; - } - - /** - * Get autoExchangeBidBuffer - * - * @return autoExchangeBidBuffer - */ - @jakarta.annotation.Nullable - public String getAutoExchangeBidBuffer() { - return autoExchangeBidBuffer; - } - - public void setAutoExchangeBidBuffer( - @jakarta.annotation.Nullable String autoExchangeBidBuffer) { - this.autoExchangeBidBuffer = autoExchangeBidBuffer; - } - - public MultiAssetsModeAssetIndexResponse1 autoExchangeAskBuffer( - @jakarta.annotation.Nullable String autoExchangeAskBuffer) { - this.autoExchangeAskBuffer = autoExchangeAskBuffer; - return this; - } - - /** - * Get autoExchangeAskBuffer - * - * @return autoExchangeAskBuffer - */ - @jakarta.annotation.Nullable - public String getAutoExchangeAskBuffer() { - return autoExchangeAskBuffer; - } - - public void setAutoExchangeAskBuffer( - @jakarta.annotation.Nullable String autoExchangeAskBuffer) { - this.autoExchangeAskBuffer = autoExchangeAskBuffer; - } - - public MultiAssetsModeAssetIndexResponse1 autoExchangeBidRate( - @jakarta.annotation.Nullable String autoExchangeBidRate) { - this.autoExchangeBidRate = autoExchangeBidRate; - return this; - } - - /** - * Get autoExchangeBidRate - * - * @return autoExchangeBidRate - */ - @jakarta.annotation.Nullable - public String getAutoExchangeBidRate() { - return autoExchangeBidRate; - } - - public void setAutoExchangeBidRate(@jakarta.annotation.Nullable String autoExchangeBidRate) { - this.autoExchangeBidRate = autoExchangeBidRate; - } - - public MultiAssetsModeAssetIndexResponse1 autoExchangeAskRate( - @jakarta.annotation.Nullable String autoExchangeAskRate) { - this.autoExchangeAskRate = autoExchangeAskRate; - return this; - } - - /** - * Get autoExchangeAskRate - * - * @return autoExchangeAskRate - */ - @jakarta.annotation.Nullable - public String getAutoExchangeAskRate() { - return autoExchangeAskRate; - } - - public void setAutoExchangeAskRate(@jakarta.annotation.Nullable String autoExchangeAskRate) { - this.autoExchangeAskRate = autoExchangeAskRate; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MultiAssetsModeAssetIndexResponse1 multiAssetsModeAssetIndexResponse1 = - (MultiAssetsModeAssetIndexResponse1) o; - return Objects.equals(this.symbol, multiAssetsModeAssetIndexResponse1.symbol) - && Objects.equals(this.time, multiAssetsModeAssetIndexResponse1.time) - && Objects.equals(this.index, multiAssetsModeAssetIndexResponse1.index) - && Objects.equals(this.bidBuffer, multiAssetsModeAssetIndexResponse1.bidBuffer) - && Objects.equals(this.askBuffer, multiAssetsModeAssetIndexResponse1.askBuffer) - && Objects.equals(this.bidRate, multiAssetsModeAssetIndexResponse1.bidRate) - && Objects.equals(this.askRate, multiAssetsModeAssetIndexResponse1.askRate) - && Objects.equals( - this.autoExchangeBidBuffer, - multiAssetsModeAssetIndexResponse1.autoExchangeBidBuffer) - && Objects.equals( - this.autoExchangeAskBuffer, - multiAssetsModeAssetIndexResponse1.autoExchangeAskBuffer) - && Objects.equals( - this.autoExchangeBidRate, - multiAssetsModeAssetIndexResponse1.autoExchangeBidRate) - && Objects.equals( - this.autoExchangeAskRate, - multiAssetsModeAssetIndexResponse1.autoExchangeAskRate); - } - - @Override - public int hashCode() { - return Objects.hash( - symbol, - time, - index, - bidBuffer, - askBuffer, - bidRate, - askRate, - autoExchangeBidBuffer, - autoExchangeAskBuffer, - autoExchangeBidRate, - autoExchangeAskRate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MultiAssetsModeAssetIndexResponse1 {\n"); - sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); - sb.append(" time: ").append(toIndentedString(time)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" bidBuffer: ").append(toIndentedString(bidBuffer)).append("\n"); - sb.append(" askBuffer: ").append(toIndentedString(askBuffer)).append("\n"); - sb.append(" bidRate: ").append(toIndentedString(bidRate)).append("\n"); - sb.append(" askRate: ").append(toIndentedString(askRate)).append("\n"); - sb.append(" autoExchangeBidBuffer: ") - .append(toIndentedString(autoExchangeBidBuffer)) - .append("\n"); - sb.append(" autoExchangeAskBuffer: ") - .append(toIndentedString(autoExchangeAskBuffer)) - .append("\n"); - sb.append(" autoExchangeBidRate: ") - .append(toIndentedString(autoExchangeBidRate)) - .append("\n"); - sb.append(" autoExchangeAskRate: ") - .append(toIndentedString(autoExchangeAskRate)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object symbolValue = getSymbol(); - String symbolValueAsString = ""; - symbolValueAsString = symbolValue.toString(); - sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); - Object timeValue = getTime(); - String timeValueAsString = ""; - timeValueAsString = timeValue.toString(); - sb.append("time=").append(urlEncode(timeValueAsString)).append(""); - Object indexValue = getIndex(); - String indexValueAsString = ""; - indexValueAsString = indexValue.toString(); - sb.append("index=").append(urlEncode(indexValueAsString)).append(""); - Object bidBufferValue = getBidBuffer(); - String bidBufferValueAsString = ""; - bidBufferValueAsString = bidBufferValue.toString(); - sb.append("bidBuffer=").append(urlEncode(bidBufferValueAsString)).append(""); - Object askBufferValue = getAskBuffer(); - String askBufferValueAsString = ""; - askBufferValueAsString = askBufferValue.toString(); - sb.append("askBuffer=").append(urlEncode(askBufferValueAsString)).append(""); - Object bidRateValue = getBidRate(); - String bidRateValueAsString = ""; - bidRateValueAsString = bidRateValue.toString(); - sb.append("bidRate=").append(urlEncode(bidRateValueAsString)).append(""); - Object askRateValue = getAskRate(); - String askRateValueAsString = ""; - askRateValueAsString = askRateValue.toString(); - sb.append("askRate=").append(urlEncode(askRateValueAsString)).append(""); - Object autoExchangeBidBufferValue = getAutoExchangeBidBuffer(); - String autoExchangeBidBufferValueAsString = ""; - autoExchangeBidBufferValueAsString = autoExchangeBidBufferValue.toString(); - sb.append("autoExchangeBidBuffer=") - .append(urlEncode(autoExchangeBidBufferValueAsString)) - .append(""); - Object autoExchangeAskBufferValue = getAutoExchangeAskBuffer(); - String autoExchangeAskBufferValueAsString = ""; - autoExchangeAskBufferValueAsString = autoExchangeAskBufferValue.toString(); - sb.append("autoExchangeAskBuffer=") - .append(urlEncode(autoExchangeAskBufferValueAsString)) - .append(""); - Object autoExchangeBidRateValue = getAutoExchangeBidRate(); - String autoExchangeBidRateValueAsString = ""; - autoExchangeBidRateValueAsString = autoExchangeBidRateValue.toString(); - sb.append("autoExchangeBidRate=") - .append(urlEncode(autoExchangeBidRateValueAsString)) - .append(""); - Object autoExchangeAskRateValue = getAutoExchangeAskRate(); - String autoExchangeAskRateValueAsString = ""; - autoExchangeAskRateValueAsString = autoExchangeAskRateValue.toString(); - sb.append("autoExchangeAskRate=") - .append(urlEncode(autoExchangeAskRateValueAsString)) - .append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("symbol"); - openapiFields.add("time"); - openapiFields.add("index"); - openapiFields.add("bidBuffer"); - openapiFields.add("askBuffer"); - openapiFields.add("bidRate"); - openapiFields.add("askRate"); - openapiFields.add("autoExchangeBidBuffer"); - openapiFields.add("autoExchangeAskBuffer"); - openapiFields.add("autoExchangeBidRate"); - openapiFields.add("autoExchangeAskRate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * MultiAssetsModeAssetIndexResponse1 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MultiAssetsModeAssetIndexResponse1.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MultiAssetsModeAssetIndexResponse1 is" - + " not found in the empty JSON string", - MultiAssetsModeAssetIndexResponse1.openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) - && !jsonObj.get("symbol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `symbol` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("symbol").toString())); - } - if ((jsonObj.get("index") != null && !jsonObj.get("index").isJsonNull()) - && !jsonObj.get("index").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `index` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("index").toString())); - } - if ((jsonObj.get("bidBuffer") != null && !jsonObj.get("bidBuffer").isJsonNull()) - && !jsonObj.get("bidBuffer").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `bidBuffer` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("bidBuffer").toString())); - } - if ((jsonObj.get("askBuffer") != null && !jsonObj.get("askBuffer").isJsonNull()) - && !jsonObj.get("askBuffer").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `askBuffer` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("askBuffer").toString())); - } - if ((jsonObj.get("bidRate") != null && !jsonObj.get("bidRate").isJsonNull()) - && !jsonObj.get("bidRate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `bidRate` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("bidRate").toString())); - } - if ((jsonObj.get("askRate") != null && !jsonObj.get("askRate").isJsonNull()) - && !jsonObj.get("askRate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `askRate` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("askRate").toString())); - } - if ((jsonObj.get("autoExchangeBidBuffer") != null - && !jsonObj.get("autoExchangeBidBuffer").isJsonNull()) - && !jsonObj.get("autoExchangeBidBuffer").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `autoExchangeBidBuffer` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("autoExchangeBidBuffer").toString())); - } - if ((jsonObj.get("autoExchangeAskBuffer") != null - && !jsonObj.get("autoExchangeAskBuffer").isJsonNull()) - && !jsonObj.get("autoExchangeAskBuffer").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `autoExchangeAskBuffer` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("autoExchangeAskBuffer").toString())); - } - if ((jsonObj.get("autoExchangeBidRate") != null - && !jsonObj.get("autoExchangeBidRate").isJsonNull()) - && !jsonObj.get("autoExchangeBidRate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `autoExchangeBidRate` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("autoExchangeBidRate").toString())); - } - if ((jsonObj.get("autoExchangeAskRate") != null - && !jsonObj.get("autoExchangeAskRate").isJsonNull()) - && !jsonObj.get("autoExchangeAskRate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `autoExchangeAskRate` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("autoExchangeAskRate").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MultiAssetsModeAssetIndexResponse1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MultiAssetsModeAssetIndexResponse1' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(MultiAssetsModeAssetIndexResponse1.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MultiAssetsModeAssetIndexResponse1 value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MultiAssetsModeAssetIndexResponse1 read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MultiAssetsModeAssetIndexResponse1 given an JSON string - * - * @param jsonString JSON string - * @return An instance of MultiAssetsModeAssetIndexResponse1 - * @throws IOException if the JSON string is invalid with respect to - * MultiAssetsModeAssetIndexResponse1 - */ - public static MultiAssetsModeAssetIndexResponse1 fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, MultiAssetsModeAssetIndexResponse1.class); - } - - /** - * Convert an instance of MultiAssetsModeAssetIndexResponse1 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MultiAssetsModeAssetIndexResponse2.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MultiAssetsModeAssetIndexResponse2.java deleted file mode 100644 index b334c20da..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MultiAssetsModeAssetIndexResponse2.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** MultiAssetsModeAssetIndexResponse2 */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MultiAssetsModeAssetIndexResponse2 - extends ArrayList { - public MultiAssetsModeAssetIndexResponse2() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MultiAssetsModeAssetIndexResponse2 {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * MultiAssetsModeAssetIndexResponse2 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - MultiAssetsModeAssetIndexResponse2Inner.validateJsonElement(element); - } - if (jsonElement == null) { - if (!MultiAssetsModeAssetIndexResponse2.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MultiAssetsModeAssetIndexResponse2 is" - + " not found in the empty JSON string", - MultiAssetsModeAssetIndexResponse2.openapiRequiredFields - .toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MultiAssetsModeAssetIndexResponse2.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MultiAssetsModeAssetIndexResponse2' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(MultiAssetsModeAssetIndexResponse2.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MultiAssetsModeAssetIndexResponse2 value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public MultiAssetsModeAssetIndexResponse2 read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MultiAssetsModeAssetIndexResponse2 given an JSON string - * - * @param jsonString JSON string - * @return An instance of MultiAssetsModeAssetIndexResponse2 - * @throws IOException if the JSON string is invalid with respect to - * MultiAssetsModeAssetIndexResponse2 - */ - public static MultiAssetsModeAssetIndexResponse2 fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, MultiAssetsModeAssetIndexResponse2.class); - } - - /** - * Convert an instance of MultiAssetsModeAssetIndexResponse2 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MultiAssetsModeAssetIndexResponse2Inner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MultiAssetsModeAssetIndexResponse2Inner.java deleted file mode 100644 index 122e3cf8f..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/MultiAssetsModeAssetIndexResponse2Inner.java +++ /dev/null @@ -1,664 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** MultiAssetsModeAssetIndexResponse2Inner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MultiAssetsModeAssetIndexResponse2Inner { - public static final String SERIALIZED_NAME_SYMBOL = "symbol"; - - @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nullable - private String symbol; - - public static final String SERIALIZED_NAME_TIME = "time"; - - @SerializedName(SERIALIZED_NAME_TIME) - @jakarta.annotation.Nullable - private Long time; - - public static final String SERIALIZED_NAME_INDEX = "index"; - - @SerializedName(SERIALIZED_NAME_INDEX) - @jakarta.annotation.Nullable - private String index; - - public static final String SERIALIZED_NAME_BID_BUFFER = "bidBuffer"; - - @SerializedName(SERIALIZED_NAME_BID_BUFFER) - @jakarta.annotation.Nullable - private String bidBuffer; - - public static final String SERIALIZED_NAME_ASK_BUFFER = "askBuffer"; - - @SerializedName(SERIALIZED_NAME_ASK_BUFFER) - @jakarta.annotation.Nullable - private String askBuffer; - - public static final String SERIALIZED_NAME_BID_RATE = "bidRate"; - - @SerializedName(SERIALIZED_NAME_BID_RATE) - @jakarta.annotation.Nullable - private String bidRate; - - public static final String SERIALIZED_NAME_ASK_RATE = "askRate"; - - @SerializedName(SERIALIZED_NAME_ASK_RATE) - @jakarta.annotation.Nullable - private String askRate; - - public static final String SERIALIZED_NAME_AUTO_EXCHANGE_BID_BUFFER = "autoExchangeBidBuffer"; - - @SerializedName(SERIALIZED_NAME_AUTO_EXCHANGE_BID_BUFFER) - @jakarta.annotation.Nullable - private String autoExchangeBidBuffer; - - public static final String SERIALIZED_NAME_AUTO_EXCHANGE_ASK_BUFFER = "autoExchangeAskBuffer"; - - @SerializedName(SERIALIZED_NAME_AUTO_EXCHANGE_ASK_BUFFER) - @jakarta.annotation.Nullable - private String autoExchangeAskBuffer; - - public static final String SERIALIZED_NAME_AUTO_EXCHANGE_BID_RATE = "autoExchangeBidRate"; - - @SerializedName(SERIALIZED_NAME_AUTO_EXCHANGE_BID_RATE) - @jakarta.annotation.Nullable - private String autoExchangeBidRate; - - public static final String SERIALIZED_NAME_AUTO_EXCHANGE_ASK_RATE = "autoExchangeAskRate"; - - @SerializedName(SERIALIZED_NAME_AUTO_EXCHANGE_ASK_RATE) - @jakarta.annotation.Nullable - private String autoExchangeAskRate; - - public MultiAssetsModeAssetIndexResponse2Inner() {} - - public MultiAssetsModeAssetIndexResponse2Inner symbol( - @jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - return this; - } - - /** - * Get symbol - * - * @return symbol - */ - @jakarta.annotation.Nullable - public String getSymbol() { - return symbol; - } - - public void setSymbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - } - - public MultiAssetsModeAssetIndexResponse2Inner time(@jakarta.annotation.Nullable Long time) { - this.time = time; - return this; - } - - /** - * Get time - * - * @return time - */ - @jakarta.annotation.Nullable - public Long getTime() { - return time; - } - - public void setTime(@jakarta.annotation.Nullable Long time) { - this.time = time; - } - - public MultiAssetsModeAssetIndexResponse2Inner index( - @jakarta.annotation.Nullable String index) { - this.index = index; - return this; - } - - /** - * Get index - * - * @return index - */ - @jakarta.annotation.Nullable - public String getIndex() { - return index; - } - - public void setIndex(@jakarta.annotation.Nullable String index) { - this.index = index; - } - - public MultiAssetsModeAssetIndexResponse2Inner bidBuffer( - @jakarta.annotation.Nullable String bidBuffer) { - this.bidBuffer = bidBuffer; - return this; - } - - /** - * Get bidBuffer - * - * @return bidBuffer - */ - @jakarta.annotation.Nullable - public String getBidBuffer() { - return bidBuffer; - } - - public void setBidBuffer(@jakarta.annotation.Nullable String bidBuffer) { - this.bidBuffer = bidBuffer; - } - - public MultiAssetsModeAssetIndexResponse2Inner askBuffer( - @jakarta.annotation.Nullable String askBuffer) { - this.askBuffer = askBuffer; - return this; - } - - /** - * Get askBuffer - * - * @return askBuffer - */ - @jakarta.annotation.Nullable - public String getAskBuffer() { - return askBuffer; - } - - public void setAskBuffer(@jakarta.annotation.Nullable String askBuffer) { - this.askBuffer = askBuffer; - } - - public MultiAssetsModeAssetIndexResponse2Inner bidRate( - @jakarta.annotation.Nullable String bidRate) { - this.bidRate = bidRate; - return this; - } - - /** - * Get bidRate - * - * @return bidRate - */ - @jakarta.annotation.Nullable - public String getBidRate() { - return bidRate; - } - - public void setBidRate(@jakarta.annotation.Nullable String bidRate) { - this.bidRate = bidRate; - } - - public MultiAssetsModeAssetIndexResponse2Inner askRate( - @jakarta.annotation.Nullable String askRate) { - this.askRate = askRate; - return this; - } - - /** - * Get askRate - * - * @return askRate - */ - @jakarta.annotation.Nullable - public String getAskRate() { - return askRate; - } - - public void setAskRate(@jakarta.annotation.Nullable String askRate) { - this.askRate = askRate; - } - - public MultiAssetsModeAssetIndexResponse2Inner autoExchangeBidBuffer( - @jakarta.annotation.Nullable String autoExchangeBidBuffer) { - this.autoExchangeBidBuffer = autoExchangeBidBuffer; - return this; - } - - /** - * Get autoExchangeBidBuffer - * - * @return autoExchangeBidBuffer - */ - @jakarta.annotation.Nullable - public String getAutoExchangeBidBuffer() { - return autoExchangeBidBuffer; - } - - public void setAutoExchangeBidBuffer( - @jakarta.annotation.Nullable String autoExchangeBidBuffer) { - this.autoExchangeBidBuffer = autoExchangeBidBuffer; - } - - public MultiAssetsModeAssetIndexResponse2Inner autoExchangeAskBuffer( - @jakarta.annotation.Nullable String autoExchangeAskBuffer) { - this.autoExchangeAskBuffer = autoExchangeAskBuffer; - return this; - } - - /** - * Get autoExchangeAskBuffer - * - * @return autoExchangeAskBuffer - */ - @jakarta.annotation.Nullable - public String getAutoExchangeAskBuffer() { - return autoExchangeAskBuffer; - } - - public void setAutoExchangeAskBuffer( - @jakarta.annotation.Nullable String autoExchangeAskBuffer) { - this.autoExchangeAskBuffer = autoExchangeAskBuffer; - } - - public MultiAssetsModeAssetIndexResponse2Inner autoExchangeBidRate( - @jakarta.annotation.Nullable String autoExchangeBidRate) { - this.autoExchangeBidRate = autoExchangeBidRate; - return this; - } - - /** - * Get autoExchangeBidRate - * - * @return autoExchangeBidRate - */ - @jakarta.annotation.Nullable - public String getAutoExchangeBidRate() { - return autoExchangeBidRate; - } - - public void setAutoExchangeBidRate(@jakarta.annotation.Nullable String autoExchangeBidRate) { - this.autoExchangeBidRate = autoExchangeBidRate; - } - - public MultiAssetsModeAssetIndexResponse2Inner autoExchangeAskRate( - @jakarta.annotation.Nullable String autoExchangeAskRate) { - this.autoExchangeAskRate = autoExchangeAskRate; - return this; - } - - /** - * Get autoExchangeAskRate - * - * @return autoExchangeAskRate - */ - @jakarta.annotation.Nullable - public String getAutoExchangeAskRate() { - return autoExchangeAskRate; - } - - public void setAutoExchangeAskRate(@jakarta.annotation.Nullable String autoExchangeAskRate) { - this.autoExchangeAskRate = autoExchangeAskRate; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MultiAssetsModeAssetIndexResponse2Inner multiAssetsModeAssetIndexResponse2Inner = - (MultiAssetsModeAssetIndexResponse2Inner) o; - return Objects.equals(this.symbol, multiAssetsModeAssetIndexResponse2Inner.symbol) - && Objects.equals(this.time, multiAssetsModeAssetIndexResponse2Inner.time) - && Objects.equals(this.index, multiAssetsModeAssetIndexResponse2Inner.index) - && Objects.equals(this.bidBuffer, multiAssetsModeAssetIndexResponse2Inner.bidBuffer) - && Objects.equals(this.askBuffer, multiAssetsModeAssetIndexResponse2Inner.askBuffer) - && Objects.equals(this.bidRate, multiAssetsModeAssetIndexResponse2Inner.bidRate) - && Objects.equals(this.askRate, multiAssetsModeAssetIndexResponse2Inner.askRate) - && Objects.equals( - this.autoExchangeBidBuffer, - multiAssetsModeAssetIndexResponse2Inner.autoExchangeBidBuffer) - && Objects.equals( - this.autoExchangeAskBuffer, - multiAssetsModeAssetIndexResponse2Inner.autoExchangeAskBuffer) - && Objects.equals( - this.autoExchangeBidRate, - multiAssetsModeAssetIndexResponse2Inner.autoExchangeBidRate) - && Objects.equals( - this.autoExchangeAskRate, - multiAssetsModeAssetIndexResponse2Inner.autoExchangeAskRate); - } - - @Override - public int hashCode() { - return Objects.hash( - symbol, - time, - index, - bidBuffer, - askBuffer, - bidRate, - askRate, - autoExchangeBidBuffer, - autoExchangeAskBuffer, - autoExchangeBidRate, - autoExchangeAskRate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MultiAssetsModeAssetIndexResponse2Inner {\n"); - sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); - sb.append(" time: ").append(toIndentedString(time)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" bidBuffer: ").append(toIndentedString(bidBuffer)).append("\n"); - sb.append(" askBuffer: ").append(toIndentedString(askBuffer)).append("\n"); - sb.append(" bidRate: ").append(toIndentedString(bidRate)).append("\n"); - sb.append(" askRate: ").append(toIndentedString(askRate)).append("\n"); - sb.append(" autoExchangeBidBuffer: ") - .append(toIndentedString(autoExchangeBidBuffer)) - .append("\n"); - sb.append(" autoExchangeAskBuffer: ") - .append(toIndentedString(autoExchangeAskBuffer)) - .append("\n"); - sb.append(" autoExchangeBidRate: ") - .append(toIndentedString(autoExchangeBidRate)) - .append("\n"); - sb.append(" autoExchangeAskRate: ") - .append(toIndentedString(autoExchangeAskRate)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object symbolValue = getSymbol(); - String symbolValueAsString = ""; - symbolValueAsString = symbolValue.toString(); - sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); - Object timeValue = getTime(); - String timeValueAsString = ""; - timeValueAsString = timeValue.toString(); - sb.append("time=").append(urlEncode(timeValueAsString)).append(""); - Object indexValue = getIndex(); - String indexValueAsString = ""; - indexValueAsString = indexValue.toString(); - sb.append("index=").append(urlEncode(indexValueAsString)).append(""); - Object bidBufferValue = getBidBuffer(); - String bidBufferValueAsString = ""; - bidBufferValueAsString = bidBufferValue.toString(); - sb.append("bidBuffer=").append(urlEncode(bidBufferValueAsString)).append(""); - Object askBufferValue = getAskBuffer(); - String askBufferValueAsString = ""; - askBufferValueAsString = askBufferValue.toString(); - sb.append("askBuffer=").append(urlEncode(askBufferValueAsString)).append(""); - Object bidRateValue = getBidRate(); - String bidRateValueAsString = ""; - bidRateValueAsString = bidRateValue.toString(); - sb.append("bidRate=").append(urlEncode(bidRateValueAsString)).append(""); - Object askRateValue = getAskRate(); - String askRateValueAsString = ""; - askRateValueAsString = askRateValue.toString(); - sb.append("askRate=").append(urlEncode(askRateValueAsString)).append(""); - Object autoExchangeBidBufferValue = getAutoExchangeBidBuffer(); - String autoExchangeBidBufferValueAsString = ""; - autoExchangeBidBufferValueAsString = autoExchangeBidBufferValue.toString(); - sb.append("autoExchangeBidBuffer=") - .append(urlEncode(autoExchangeBidBufferValueAsString)) - .append(""); - Object autoExchangeAskBufferValue = getAutoExchangeAskBuffer(); - String autoExchangeAskBufferValueAsString = ""; - autoExchangeAskBufferValueAsString = autoExchangeAskBufferValue.toString(); - sb.append("autoExchangeAskBuffer=") - .append(urlEncode(autoExchangeAskBufferValueAsString)) - .append(""); - Object autoExchangeBidRateValue = getAutoExchangeBidRate(); - String autoExchangeBidRateValueAsString = ""; - autoExchangeBidRateValueAsString = autoExchangeBidRateValue.toString(); - sb.append("autoExchangeBidRate=") - .append(urlEncode(autoExchangeBidRateValueAsString)) - .append(""); - Object autoExchangeAskRateValue = getAutoExchangeAskRate(); - String autoExchangeAskRateValueAsString = ""; - autoExchangeAskRateValueAsString = autoExchangeAskRateValue.toString(); - sb.append("autoExchangeAskRate=") - .append(urlEncode(autoExchangeAskRateValueAsString)) - .append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("symbol"); - openapiFields.add("time"); - openapiFields.add("index"); - openapiFields.add("bidBuffer"); - openapiFields.add("askBuffer"); - openapiFields.add("bidRate"); - openapiFields.add("askRate"); - openapiFields.add("autoExchangeBidBuffer"); - openapiFields.add("autoExchangeAskBuffer"); - openapiFields.add("autoExchangeBidRate"); - openapiFields.add("autoExchangeAskRate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * MultiAssetsModeAssetIndexResponse2Inner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MultiAssetsModeAssetIndexResponse2Inner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " MultiAssetsModeAssetIndexResponse2Inner is not found in the" - + " empty JSON string", - MultiAssetsModeAssetIndexResponse2Inner.openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) - && !jsonObj.get("symbol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `symbol` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("symbol").toString())); - } - if ((jsonObj.get("index") != null && !jsonObj.get("index").isJsonNull()) - && !jsonObj.get("index").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `index` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("index").toString())); - } - if ((jsonObj.get("bidBuffer") != null && !jsonObj.get("bidBuffer").isJsonNull()) - && !jsonObj.get("bidBuffer").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `bidBuffer` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("bidBuffer").toString())); - } - if ((jsonObj.get("askBuffer") != null && !jsonObj.get("askBuffer").isJsonNull()) - && !jsonObj.get("askBuffer").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `askBuffer` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("askBuffer").toString())); - } - if ((jsonObj.get("bidRate") != null && !jsonObj.get("bidRate").isJsonNull()) - && !jsonObj.get("bidRate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `bidRate` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("bidRate").toString())); - } - if ((jsonObj.get("askRate") != null && !jsonObj.get("askRate").isJsonNull()) - && !jsonObj.get("askRate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `askRate` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("askRate").toString())); - } - if ((jsonObj.get("autoExchangeBidBuffer") != null - && !jsonObj.get("autoExchangeBidBuffer").isJsonNull()) - && !jsonObj.get("autoExchangeBidBuffer").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `autoExchangeBidBuffer` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("autoExchangeBidBuffer").toString())); - } - if ((jsonObj.get("autoExchangeAskBuffer") != null - && !jsonObj.get("autoExchangeAskBuffer").isJsonNull()) - && !jsonObj.get("autoExchangeAskBuffer").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `autoExchangeAskBuffer` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("autoExchangeAskBuffer").toString())); - } - if ((jsonObj.get("autoExchangeBidRate") != null - && !jsonObj.get("autoExchangeBidRate").isJsonNull()) - && !jsonObj.get("autoExchangeBidRate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `autoExchangeBidRate` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("autoExchangeBidRate").toString())); - } - if ((jsonObj.get("autoExchangeAskRate") != null - && !jsonObj.get("autoExchangeAskRate").isJsonNull()) - && !jsonObj.get("autoExchangeAskRate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `autoExchangeAskRate` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("autoExchangeAskRate").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MultiAssetsModeAssetIndexResponse2Inner.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes 'MultiAssetsModeAssetIndexResponse2Inner' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(MultiAssetsModeAssetIndexResponse2Inner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, MultiAssetsModeAssetIndexResponse2Inner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MultiAssetsModeAssetIndexResponse2Inner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MultiAssetsModeAssetIndexResponse2Inner given an JSON string - * - * @param jsonString JSON string - * @return An instance of MultiAssetsModeAssetIndexResponse2Inner - * @throws IOException if the JSON string is invalid with respect to - * MultiAssetsModeAssetIndexResponse2Inner - */ - public static MultiAssetsModeAssetIndexResponse2Inner fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, MultiAssetsModeAssetIndexResponse2Inner.class); - } - - /** - * Convert an instance of MultiAssetsModeAssetIndexResponse2Inner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewAlgoOrderRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewAlgoOrderRequest.java index 00d1534ca..b17f1424c 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewAlgoOrderRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewAlgoOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,13 +35,13 @@ /** NewAlgoOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewAlgoOrderRequest { public static final String SERIALIZED_NAME_ALGO_TYPE = "algoType"; @SerializedName(SERIALIZED_NAME_ALGO_TYPE) @jakarta.annotation.Nonnull - private String algoType; + private AlgoType algoType; public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -59,13 +59,13 @@ public class NewAlgoOrderRequest { @SerializedName(SERIALIZED_NAME_POSITION_SIDE) @jakarta.annotation.Nullable - private PositionSide positionSide; + private String positionSide; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private String type; + private OrderType type; public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @@ -95,7 +95,7 @@ public class NewAlgoOrderRequest { @SerializedName(SERIALIZED_NAME_WORKING_TYPE) @jakarta.annotation.Nullable - private WorkingType workingType; + private WorkingType workingType = WorkingType.CONTRACT_PRICE; public static final String SERIALIZED_NAME_PRICE_MATCH = "priceMatch"; @@ -107,19 +107,19 @@ public class NewAlgoOrderRequest { @SerializedName(SERIALIZED_NAME_CLOSE_POSITION) @jakarta.annotation.Nullable - private String closePosition; + private ClosePosition closePosition; public static final String SERIALIZED_NAME_PRICE_PROTECT = "priceProtect"; @SerializedName(SERIALIZED_NAME_PRICE_PROTECT) @jakarta.annotation.Nullable - private String priceProtect; + private PriceProtect priceProtect = PriceProtect.FALSE; public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) @jakarta.annotation.Nullable - private String reduceOnly; + private ReduceOnly reduceOnly = ReduceOnly.FALSE; public static final String SERIALIZED_NAME_ACTIVATE_PRICE = "activatePrice"; @@ -143,14 +143,14 @@ public class NewAlgoOrderRequest { @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESP_TYPE) @jakarta.annotation.Nullable - private NewOrderRespType newOrderRespType; + private NewOrderRespType newOrderRespType = NewOrderRespType.ACK; public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = "selfTradePreventionMode"; @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) @jakarta.annotation.Nullable - private SelfTradePreventionMode selfTradePreventionMode; + private SelfTradePreventionMode selfTradePreventionMode = SelfTradePreventionMode.NONE; public static final String SERIALIZED_NAME_GOOD_TILL_DATE = "goodTillDate"; @@ -166,7 +166,7 @@ public class NewAlgoOrderRequest { public NewAlgoOrderRequest() {} - public NewAlgoOrderRequest algoType(@jakarta.annotation.Nonnull String algoType) { + public NewAlgoOrderRequest algoType(@jakarta.annotation.Nonnull AlgoType algoType) { this.algoType = algoType; return this; } @@ -178,11 +178,12 @@ public NewAlgoOrderRequest algoType(@jakarta.annotation.Nonnull String algoType) */ @jakarta.annotation.Nonnull @NotNull - public String getAlgoType() { + @Valid + public AlgoType getAlgoType() { return algoType; } - public void setAlgoType(@jakarta.annotation.Nonnull String algoType) { + public void setAlgoType(@jakarta.annotation.Nonnull AlgoType algoType) { this.algoType = algoType; } @@ -227,28 +228,27 @@ public void setSide(@jakarta.annotation.Nonnull Side side) { this.side = side; } - public NewAlgoOrderRequest positionSide( - @jakarta.annotation.Nullable PositionSide positionSide) { + public NewAlgoOrderRequest positionSide(@jakarta.annotation.Nullable String positionSide) { this.positionSide = positionSide; return this; } /** - * Get positionSide + * Default `BOTH` for One-way Mode ; `LONG` or `SHORT` for Hedge + * Mode. It must be sent in Hedge Mode. * * @return positionSide */ @jakarta.annotation.Nullable - @Valid - public PositionSide getPositionSide() { + public String getPositionSide() { return positionSide; } - public void setPositionSide(@jakarta.annotation.Nullable PositionSide positionSide) { + public void setPositionSide(@jakarta.annotation.Nullable String positionSide) { this.positionSide = positionSide; } - public NewAlgoOrderRequest type(@jakarta.annotation.Nonnull String type) { + public NewAlgoOrderRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -260,11 +260,12 @@ public NewAlgoOrderRequest type(@jakarta.annotation.Nonnull String type) { */ @jakarta.annotation.Nonnull @NotNull - public String getType() { + @Valid + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull String type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } @@ -294,7 +295,7 @@ public NewAlgoOrderRequest quantity(@jakarta.annotation.Nullable Double quantity } /** - * Get quantity + * Cannot be sent with `closePosition`=`true`(Close-All) * * @return quantity */ @@ -334,7 +335,7 @@ public NewAlgoOrderRequest triggerPrice(@jakarta.annotation.Nullable Double trig } /** - * Get triggerPrice + * Trigger price * * @return triggerPrice */ @@ -388,7 +389,8 @@ public void setPriceMatch(@jakarta.annotation.Nullable PriceMatch priceMatch) { this.priceMatch = priceMatch; } - public NewAlgoOrderRequest closePosition(@jakarta.annotation.Nullable String closePosition) { + public NewAlgoOrderRequest closePosition( + @jakarta.annotation.Nullable ClosePosition closePosition) { this.closePosition = closePosition; return this; } @@ -399,15 +401,17 @@ public NewAlgoOrderRequest closePosition(@jakarta.annotation.Nullable String clo * @return closePosition */ @jakarta.annotation.Nullable - public String getClosePosition() { + @Valid + public ClosePosition getClosePosition() { return closePosition; } - public void setClosePosition(@jakarta.annotation.Nullable String closePosition) { + public void setClosePosition(@jakarta.annotation.Nullable ClosePosition closePosition) { this.closePosition = closePosition; } - public NewAlgoOrderRequest priceProtect(@jakarta.annotation.Nullable String priceProtect) { + public NewAlgoOrderRequest priceProtect( + @jakarta.annotation.Nullable PriceProtect priceProtect) { this.priceProtect = priceProtect; return this; } @@ -418,15 +422,16 @@ public NewAlgoOrderRequest priceProtect(@jakarta.annotation.Nullable String pric * @return priceProtect */ @jakarta.annotation.Nullable - public String getPriceProtect() { + @Valid + public PriceProtect getPriceProtect() { return priceProtect; } - public void setPriceProtect(@jakarta.annotation.Nullable String priceProtect) { + public void setPriceProtect(@jakarta.annotation.Nullable PriceProtect priceProtect) { this.priceProtect = priceProtect; } - public NewAlgoOrderRequest reduceOnly(@jakarta.annotation.Nullable String reduceOnly) { + public NewAlgoOrderRequest reduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { this.reduceOnly = reduceOnly; return this; } @@ -437,11 +442,12 @@ public NewAlgoOrderRequest reduceOnly(@jakarta.annotation.Nullable String reduce * @return reduceOnly */ @jakarta.annotation.Nullable - public String getReduceOnly() { + @Valid + public ReduceOnly getReduceOnly() { return reduceOnly; } - public void setReduceOnly(@jakarta.annotation.Nullable String reduceOnly) { + public void setReduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { this.reduceOnly = reduceOnly; } @@ -451,7 +457,8 @@ public NewAlgoOrderRequest activatePrice(@jakarta.annotation.Nullable Double act } /** - * Get activatePrice + * Used with `TRAILING_STOP_MARKET` orders, default as the latest price(supporting + * different `workingType`) * * @return activatePrice */ @@ -471,12 +478,14 @@ public NewAlgoOrderRequest callbackRate(@jakarta.annotation.Nullable Double call } /** - * Get callbackRate + * Used with `TRAILING_STOP_MARKET` orders minimum: 0.1 maximum: 10 * * @return callbackRate */ @jakarta.annotation.Nullable @Valid + @DecimalMin("0.1") + @DecimalMax("10") public Double getCallbackRate() { return callbackRate; } @@ -491,7 +500,8 @@ public NewAlgoOrderRequest clientAlgoId(@jakarta.annotation.Nullable String clie } /** - * Get clientAlgoId + * A unique id among open orders. Automatically generated if not sent. Can only be string + * following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,36}$` * * @return clientAlgoId */ @@ -554,7 +564,10 @@ public NewAlgoOrderRequest goodTillDate(@jakarta.annotation.Nullable Long goodTi } /** - * Get goodTillDate + * order cancel time for timeInForce `GTD`, mandatory when `timeInforce` set + * to `GTD`; order the timestamp only retains second-level precision, ms part will be + * ignored; The goodTillDate timestamp must be greater than the current time plus 600 seconds + * and smaller than 253402300799000 * * @return goodTillDate */ @@ -851,13 +864,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("algoType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `algoType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("algoType").toString())); - } + // validate the required field `algoType` + AlgoType.validateJsonElement(jsonObj.get("algoType")); if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( @@ -867,17 +875,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the required field `side` Side.validateJsonElement(jsonObj.get("side")); - // validate the optional field `positionSide` - if (jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) { - PositionSide.validateJsonElement(jsonObj.get("positionSide")); - } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) + && !jsonObj.get("positionSide").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); + "Expected the field `positionSide` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("positionSide").toString())); } + // validate the required field `type` + OrderType.validateJsonElement(jsonObj.get("type")); // validate the optional field `timeInForce` if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { TimeInForce.validateJsonElement(jsonObj.get("timeInForce")); @@ -890,29 +897,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("priceMatch") != null && !jsonObj.get("priceMatch").isJsonNull()) { PriceMatch.validateJsonElement(jsonObj.get("priceMatch")); } - if ((jsonObj.get("closePosition") != null && !jsonObj.get("closePosition").isJsonNull()) - && !jsonObj.get("closePosition").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `closePosition` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("closePosition").toString())); + // validate the optional field `closePosition` + if (jsonObj.get("closePosition") != null && !jsonObj.get("closePosition").isJsonNull()) { + ClosePosition.validateJsonElement(jsonObj.get("closePosition")); } - if ((jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) - && !jsonObj.get("priceProtect").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `priceProtect` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("priceProtect").toString())); + // validate the optional field `priceProtect` + if (jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) { + PriceProtect.validateJsonElement(jsonObj.get("priceProtect")); } - if ((jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) - && !jsonObj.get("reduceOnly").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reduceOnly` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reduceOnly").toString())); + // validate the optional field `reduceOnly` + if (jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) { + ReduceOnly.validateJsonElement(jsonObj.get("reduceOnly")); } if ((jsonObj.get("clientAlgoId") != null && !jsonObj.get("clientAlgoId").isJsonNull()) && !jsonObj.get("clientAlgoId").isJsonPrimitive()) { diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewAlgoOrderResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewAlgoOrderResponse.java index c2f8f5427..403470c05 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewAlgoOrderResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewAlgoOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** NewAlgoOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewAlgoOrderResponse { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; @@ -559,7 +559,7 @@ public NewAlgoOrderResponse activatePrice(@jakarta.annotation.Nullable String ac } /** - * Get activatePrice + * TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -578,7 +578,7 @@ public NewAlgoOrderResponse callbackRate(@jakarta.annotation.Nullable String cal } /** - * Get callbackRate + * TRAILING_STOP_MARKET order * * @return callbackRate */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewOrderRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewOrderRequest.java index 787aab6e1..c98421143 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewOrderRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** NewOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewOrderRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -53,13 +53,13 @@ public class NewOrderRequest { @SerializedName(SERIALIZED_NAME_POSITION_SIDE) @jakarta.annotation.Nullable - private PositionSide positionSide; + private String positionSide; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private String type; + private OrderType type; public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @@ -67,17 +67,17 @@ public class NewOrderRequest { @jakarta.annotation.Nullable private TimeInForce timeInForce; - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; - @SerializedName(SERIALIZED_NAME_QUANTITY) + @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) @jakarta.annotation.Nullable - private Double quantity; + private ReduceOnly reduceOnly = ReduceOnly.FALSE; - public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; - @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) + @SerializedName(SERIALIZED_NAME_QUANTITY) @jakarta.annotation.Nullable - private String reduceOnly; + private Double quantity; public static final String SERIALIZED_NAME_PRICE = "price"; @@ -95,7 +95,7 @@ public class NewOrderRequest { @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESP_TYPE) @jakarta.annotation.Nullable - private NewOrderRespType newOrderRespType; + private NewOrderRespType newOrderRespType = NewOrderRespType.ACK; public static final String SERIALIZED_NAME_PRICE_MATCH = "priceMatch"; @@ -108,7 +108,7 @@ public class NewOrderRequest { @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) @jakarta.annotation.Nullable - private SelfTradePreventionMode selfTradePreventionMode; + private SelfTradePreventionMode selfTradePreventionMode = SelfTradePreventionMode.NONE; public static final String SERIALIZED_NAME_GOOD_TILL_DATE = "goodTillDate"; @@ -165,27 +165,27 @@ public void setSide(@jakarta.annotation.Nonnull Side side) { this.side = side; } - public NewOrderRequest positionSide(@jakarta.annotation.Nullable PositionSide positionSide) { + public NewOrderRequest positionSide(@jakarta.annotation.Nullable String positionSide) { this.positionSide = positionSide; return this; } /** - * Get positionSide + * Default `BOTH` for One-way Mode ; `LONG` or `SHORT` for Hedge + * Mode. It must be sent in Hedge Mode. * * @return positionSide */ @jakarta.annotation.Nullable - @Valid - public PositionSide getPositionSide() { + public String getPositionSide() { return positionSide; } - public void setPositionSide(@jakarta.annotation.Nullable PositionSide positionSide) { + public void setPositionSide(@jakarta.annotation.Nullable String positionSide) { this.positionSide = positionSide; } - public NewOrderRequest type(@jakarta.annotation.Nonnull String type) { + public NewOrderRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -197,11 +197,12 @@ public NewOrderRequest type(@jakarta.annotation.Nonnull String type) { */ @jakarta.annotation.Nonnull @NotNull - public String getType() { + @Valid + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull String type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } @@ -225,43 +226,44 @@ public void setTimeInForce(@jakarta.annotation.Nullable TimeInForce timeInForce) this.timeInForce = timeInForce; } - public NewOrderRequest quantity(@jakarta.annotation.Nullable Double quantity) { - this.quantity = quantity; + public NewOrderRequest reduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { + this.reduceOnly = reduceOnly; return this; } /** - * Get quantity + * Get reduceOnly * - * @return quantity + * @return reduceOnly */ @jakarta.annotation.Nullable @Valid - public Double getQuantity() { - return quantity; + public ReduceOnly getReduceOnly() { + return reduceOnly; } - public void setQuantity(@jakarta.annotation.Nullable Double quantity) { - this.quantity = quantity; + public void setReduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { + this.reduceOnly = reduceOnly; } - public NewOrderRequest reduceOnly(@jakarta.annotation.Nullable String reduceOnly) { - this.reduceOnly = reduceOnly; + public NewOrderRequest quantity(@jakarta.annotation.Nullable Double quantity) { + this.quantity = quantity; return this; } /** - * Get reduceOnly + * Get quantity * - * @return reduceOnly + * @return quantity */ @jakarta.annotation.Nullable - public String getReduceOnly() { - return reduceOnly; + @Valid + public Double getQuantity() { + return quantity; } - public void setReduceOnly(@jakarta.annotation.Nullable String reduceOnly) { - this.reduceOnly = reduceOnly; + public void setQuantity(@jakarta.annotation.Nullable Double quantity) { + this.quantity = quantity; } public NewOrderRequest price(@jakarta.annotation.Nullable Double price) { @@ -290,7 +292,8 @@ public NewOrderRequest newClientOrderId(@jakarta.annotation.Nullable String newC } /** - * Get newClientOrderId + * A unique id among open orders. Automatically generated if not sent. Can only be string + * following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,36}$` * * @return newClientOrderId */ @@ -373,7 +376,10 @@ public NewOrderRequest goodTillDate(@jakarta.annotation.Nullable Long goodTillDa } /** - * Get goodTillDate + * order cancel time for timeInForce `GTD`, mandatory when `timeInforce` set + * to `GTD`; order the timestamp only retains second-level precision, ms part will be + * ignored; The goodTillDate timestamp must be greater than the current time plus 600 seconds + * and smaller than 253402300799000 * * @return goodTillDate */ @@ -419,8 +425,8 @@ public boolean equals(Object o) { && Objects.equals(this.positionSide, newOrderRequest.positionSide) && Objects.equals(this.type, newOrderRequest.type) && Objects.equals(this.timeInForce, newOrderRequest.timeInForce) - && Objects.equals(this.quantity, newOrderRequest.quantity) && Objects.equals(this.reduceOnly, newOrderRequest.reduceOnly) + && Objects.equals(this.quantity, newOrderRequest.quantity) && Objects.equals(this.price, newOrderRequest.price) && Objects.equals(this.newClientOrderId, newOrderRequest.newClientOrderId) && Objects.equals(this.newOrderRespType, newOrderRequest.newOrderRespType) @@ -439,8 +445,8 @@ public int hashCode() { positionSide, type, timeInForce, - quantity, reduceOnly, + quantity, price, newClientOrderId, newOrderRespType, @@ -459,8 +465,8 @@ public String toString() { sb.append(" positionSide: ").append(toIndentedString(positionSide)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" newClientOrderId: ").append(toIndentedString(newClientOrderId)).append("\n"); sb.append(" newOrderRespType: ").append(toIndentedString(newOrderRespType)).append("\n"); @@ -497,14 +503,14 @@ public String toUrlQueryString() { String timeInForceValueAsString = ""; timeInForceValueAsString = timeInForceValue.toString(); sb.append("timeInForce=").append(urlEncode(timeInForceValueAsString)).append(""); - Object quantityValue = getQuantity(); - String quantityValueAsString = ""; - quantityValueAsString = quantityValue.toString(); - sb.append("quantity=").append(urlEncode(quantityValueAsString)).append(""); Object reduceOnlyValue = getReduceOnly(); String reduceOnlyValueAsString = ""; reduceOnlyValueAsString = reduceOnlyValue.toString(); sb.append("reduceOnly=").append(urlEncode(reduceOnlyValueAsString)).append(""); + Object quantityValue = getQuantity(); + String quantityValueAsString = ""; + quantityValueAsString = quantityValue.toString(); + sb.append("quantity=").append(urlEncode(quantityValueAsString)).append(""); Object priceValue = getPrice(); String priceValueAsString = ""; priceValueAsString = priceValue.toString(); @@ -568,8 +574,8 @@ private String toIndentedString(Object o) { openapiFields.add("positionSide"); openapiFields.add("type"); openapiFields.add("timeInForce"); - openapiFields.add("quantity"); openapiFields.add("reduceOnly"); + openapiFields.add("quantity"); openapiFields.add("price"); openapiFields.add("newClientOrderId"); openapiFields.add("newOrderRespType"); @@ -622,28 +628,23 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the required field `side` Side.validateJsonElement(jsonObj.get("side")); - // validate the optional field `positionSide` - if (jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) { - PositionSide.validateJsonElement(jsonObj.get("positionSide")); - } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) + && !jsonObj.get("positionSide").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); + "Expected the field `positionSide` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("positionSide").toString())); } + // validate the required field `type` + OrderType.validateJsonElement(jsonObj.get("type")); // validate the optional field `timeInForce` if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { TimeInForce.validateJsonElement(jsonObj.get("timeInForce")); } - if ((jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) - && !jsonObj.get("reduceOnly").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reduceOnly` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reduceOnly").toString())); + // validate the optional field `reduceOnly` + if (jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) { + ReduceOnly.validateJsonElement(jsonObj.get("reduceOnly")); } if ((jsonObj.get("newClientOrderId") != null && !jsonObj.get("newClientOrderId").isJsonNull()) diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewOrderRespType.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewOrderRespType.java index 68f27d056..8069532de 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewOrderRespType.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewOrderRespType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewOrderResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewOrderResponse.java index 3e9fa476b..18567300a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewOrderResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NewOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** NewOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewOrderResponse { public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -48,12 +48,6 @@ public class NewOrderResponse { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_QUOTE = "cumQuote"; - - @SerializedName(SERIALIZED_NAME_CUM_QUOTE) - @jakarta.annotation.Nullable - private String cumQuote; - public static final String SERIALIZED_NAME_EXECUTED_QTY = "executedQty"; @SerializedName(SERIALIZED_NAME_EXECUTED_QTY) @@ -66,12 +60,6 @@ public class NewOrderResponse { @jakarta.annotation.Nullable private Long orderId; - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE) - @jakarta.annotation.Nullable - private String avgPrice; - public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; @SerializedName(SERIALIZED_NAME_ORIG_QTY) @@ -189,7 +177,7 @@ public NewOrderResponse clientOrderId(@jakarta.annotation.Nullable String client } /** - * Get clientOrderId + * Client Order Id. * * @return clientOrderId */ @@ -221,32 +209,13 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public NewOrderResponse cumQuote(@jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - return this; - } - - /** - * Get cumQuote - * - * @return cumQuote - */ - @jakarta.annotation.Nullable - public String getCumQuote() { - return cumQuote; - } - - public void setCumQuote(@jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - } - public NewOrderResponse executedQty(@jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; return this; } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -265,7 +234,7 @@ public NewOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Order Id. * * @return orderId */ @@ -278,32 +247,13 @@ public void setOrderId(@jakarta.annotation.Nullable Long orderId) { this.orderId = orderId; } - public NewOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - return this; - } - - /** - * Get avgPrice - * - * @return avgPrice - */ - @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; - } - - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - } - public NewOrderResponse origQty(@jakarta.annotation.Nullable String origQty) { this.origQty = origQty; return this; } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -322,7 +272,7 @@ public NewOrderResponse price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Price. * * @return price */ @@ -341,7 +291,7 @@ public NewOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean reduceOn } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -360,7 +310,7 @@ public NewOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Side. * * @return side */ @@ -379,7 +329,7 @@ public NewOrderResponse positionSide(@jakarta.annotation.Nullable String positio } /** - * Get positionSide + * Position Side. * * @return positionSide */ @@ -398,7 +348,7 @@ public NewOrderResponse status(@jakarta.annotation.Nullable String status) { } /** - * Get status + * Status. * * @return status */ @@ -417,7 +367,7 @@ public NewOrderResponse stopPrice(@jakarta.annotation.Nullable String stopPrice) } /** - * Get stopPrice + * ignored for LIMIT / MARKET orders * * @return stopPrice */ @@ -436,7 +386,7 @@ public NewOrderResponse closePosition(@jakarta.annotation.Nullable Boolean close } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -455,7 +405,7 @@ public NewOrderResponse symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -474,7 +424,7 @@ public NewOrderResponse timeInForce(@jakarta.annotation.Nullable String timeInFo } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -493,7 +443,7 @@ public NewOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Type. * * @return type */ @@ -512,7 +462,7 @@ public NewOrderResponse origType(@jakarta.annotation.Nullable String origType) { } /** - * Get origType + * Orig Type. * * @return origType */ @@ -531,7 +481,7 @@ public NewOrderResponse updateTime(@jakarta.annotation.Nullable Long updateTime) } /** - * Get updateTime + * Update Time. * * @return updateTime */ @@ -550,7 +500,7 @@ public NewOrderResponse workingType(@jakarta.annotation.Nullable String workingT } /** - * Get workingType + * Working Type. * * @return workingType */ @@ -569,7 +519,7 @@ public NewOrderResponse priceProtect(@jakarta.annotation.Nullable Boolean priceP } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -588,7 +538,7 @@ public NewOrderResponse priceMatch(@jakarta.annotation.Nullable String priceMatc } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -608,7 +558,7 @@ public NewOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -628,7 +578,7 @@ public NewOrderResponse goodTillDate(@jakarta.annotation.Nullable Long goodTillD } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ @@ -652,10 +602,8 @@ public boolean equals(Object o) { NewOrderResponse newOrderResponse = (NewOrderResponse) o; return Objects.equals(this.clientOrderId, newOrderResponse.clientOrderId) && Objects.equals(this.cumQty, newOrderResponse.cumQty) - && Objects.equals(this.cumQuote, newOrderResponse.cumQuote) && Objects.equals(this.executedQty, newOrderResponse.executedQty) && Objects.equals(this.orderId, newOrderResponse.orderId) - && Objects.equals(this.avgPrice, newOrderResponse.avgPrice) && Objects.equals(this.origQty, newOrderResponse.origQty) && Objects.equals(this.price, newOrderResponse.price) && Objects.equals(this.reduceOnly, newOrderResponse.reduceOnly) @@ -682,10 +630,8 @@ public int hashCode() { return Objects.hash( clientOrderId, cumQty, - cumQuote, executedQty, orderId, - avgPrice, origQty, price, reduceOnly, @@ -712,10 +658,8 @@ public String toString() { sb.append("class NewOrderResponse {\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumQuote: ").append(toIndentedString(cumQuote)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); @@ -751,10 +695,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = ""; cumQtyValueAsString = cumQtyValue.toString(); sb.append("cumQty=").append(urlEncode(cumQtyValueAsString)).append(""); - Object cumQuoteValue = getCumQuote(); - String cumQuoteValueAsString = ""; - cumQuoteValueAsString = cumQuoteValue.toString(); - sb.append("cumQuote=").append(urlEncode(cumQuoteValueAsString)).append(""); Object executedQtyValue = getExecutedQty(); String executedQtyValueAsString = ""; executedQtyValueAsString = executedQtyValue.toString(); @@ -763,10 +703,6 @@ public String toUrlQueryString() { String orderIdValueAsString = ""; orderIdValueAsString = orderIdValue.toString(); sb.append("orderId=").append(urlEncode(orderIdValueAsString)).append(""); - Object avgPriceValue = getAvgPrice(); - String avgPriceValueAsString = ""; - avgPriceValueAsString = avgPriceValue.toString(); - sb.append("avgPrice=").append(urlEncode(avgPriceValueAsString)).append(""); Object origQtyValue = getOrigQty(); String origQtyValueAsString = ""; origQtyValueAsString = origQtyValue.toString(); @@ -871,10 +807,8 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("clientOrderId"); openapiFields.add("cumQty"); - openapiFields.add("cumQuote"); openapiFields.add("executedQty"); openapiFields.add("orderId"); - openapiFields.add("avgPrice"); openapiFields.add("origQty"); openapiFields.add("price"); openapiFields.add("reduceOnly"); @@ -932,14 +866,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumQuote") != null && !jsonObj.get("cumQuote").isJsonNull()) - && !jsonObj.get("cumQuote").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumQuote` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("cumQuote").toString())); - } if ((jsonObj.get("executedQty") != null && !jsonObj.get("executedQty").isJsonNull()) && !jsonObj.get("executedQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -948,14 +874,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("executedQty").toString())); } - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) && !jsonObj.get("origQty").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse.java index 471abfb39..8d68c841e 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NotionalAndLeverageBracketsResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(NotionalAndLeverageBracketsResponse.class.getName()); diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse1.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse1.java index 14087d224..8a315bf04 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse1.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** NotionalAndLeverageBracketsResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NotionalAndLeverageBracketsResponse1 extends ArrayList { public NotionalAndLeverageBracketsResponse1() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse1Inner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse1Inner.java index a8f1b7e54..081aced40 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse1Inner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse1Inner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** NotionalAndLeverageBracketsResponse1Inner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NotionalAndLeverageBracketsResponse1Inner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -89,7 +89,7 @@ public NotionalAndLeverageBracketsResponse1Inner notionalCoef( } /** - * Get notionalCoef + * user symbol bracket multiplier, only appears when user's symbol bracket is adjusted * * @return notionalCoef */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse1InnerBracketsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse1InnerBracketsInner.java index 59d10b1ef..a7c2b771f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse1InnerBracketsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse1InnerBracketsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** NotionalAndLeverageBracketsResponse1InnerBracketsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NotionalAndLeverageBracketsResponse1InnerBracketsInner { public static final String SERIALIZED_NAME_BRACKET = "bracket"; @@ -82,7 +82,7 @@ public NotionalAndLeverageBracketsResponse1InnerBracketsInner bracket( } /** - * Get bracket + * Notional bracket * * @return bracket */ @@ -102,7 +102,7 @@ public NotionalAndLeverageBracketsResponse1InnerBracketsInner initialLeverage( } /** - * Get initialLeverage + * Max initial leverage for this bracket * * @return initialLeverage */ @@ -122,7 +122,7 @@ public NotionalAndLeverageBracketsResponse1InnerBracketsInner notionalCap( } /** - * Get notionalCap + * Cap notional of this bracket * * @return notionalCap */ @@ -142,7 +142,7 @@ public NotionalAndLeverageBracketsResponse1InnerBracketsInner notionalFloor( } /** - * Get notionalFloor + * Notional threshold of this bracket * * @return notionalFloor */ @@ -162,7 +162,7 @@ public NotionalAndLeverageBracketsResponse1InnerBracketsInner maintMarginRatio( } /** - * Get maintMarginRatio + * Maintenance ratio for this bracket * * @return maintMarginRatio */ @@ -183,7 +183,7 @@ public NotionalAndLeverageBracketsResponse1InnerBracketsInner cum( } /** - * Get cum + * Auxiliary number for quick calculation * * @return cum */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse2.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse2.java index 3162888a7..e48a9ee08 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse2.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** NotionalAndLeverageBracketsResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NotionalAndLeverageBracketsResponse2 { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -88,7 +88,7 @@ public NotionalAndLeverageBracketsResponse2 notionalCoef( } /** - * Get notionalCoef + * user symbol bracket multiplier, only appears when user's symbol bracket is adjusted * * @return notionalCoef */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse2BracketsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse2BracketsInner.java index a3ac44d81..4fb5c4b68 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse2BracketsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/NotionalAndLeverageBracketsResponse2BracketsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** NotionalAndLeverageBracketsResponse2BracketsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NotionalAndLeverageBracketsResponse2BracketsInner { public static final String SERIALIZED_NAME_BRACKET = "bracket"; @@ -82,7 +82,7 @@ public NotionalAndLeverageBracketsResponse2BracketsInner bracket( } /** - * Get bracket + * Notional bracket * * @return bracket */ @@ -102,7 +102,7 @@ public NotionalAndLeverageBracketsResponse2BracketsInner initialLeverage( } /** - * Get initialLeverage + * Max initial leverage for this bracket * * @return initialLeverage */ @@ -122,7 +122,7 @@ public NotionalAndLeverageBracketsResponse2BracketsInner notionalCap( } /** - * Get notionalCap + * Cap notional of this bracket * * @return notionalCap */ @@ -142,7 +142,7 @@ public NotionalAndLeverageBracketsResponse2BracketsInner notionalFloor( } /** - * Get notionalFloor + * Notional threshold of this bracket * * @return notionalFloor */ @@ -162,7 +162,7 @@ public NotionalAndLeverageBracketsResponse2BracketsInner maintMarginRatio( } /** - * Get maintMarginRatio + * Maintenance ratio for this bracket * * @return maintMarginRatio */ @@ -183,7 +183,7 @@ public NotionalAndLeverageBracketsResponse2BracketsInner cum( } /** - * Get cum + * Auxiliary number for quick calculation * * @return cum */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OldTradesLookupResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OldTradesLookupResponse.java index fbc20aada..023d3576a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OldTradesLookupResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OldTradesLookupResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OldTradesLookupResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OldTradesLookupResponse extends ArrayList { public OldTradesLookupResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OldTradesLookupResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OldTradesLookupResponseInner.java index 3e610356e..d27a6c422 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OldTradesLookupResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OldTradesLookupResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OldTradesLookupResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OldTradesLookupResponseInner { public static final String SERIALIZED_NAME_ID = "id"; @@ -86,7 +86,7 @@ public OldTradesLookupResponseInner id(@jakarta.annotation.Nullable Long id) { } /** - * Get id + * Id. * * @return id */ @@ -105,7 +105,7 @@ public OldTradesLookupResponseInner price(@jakarta.annotation.Nullable String pr } /** - * Get price + * Price. * * @return price */ @@ -124,7 +124,7 @@ public OldTradesLookupResponseInner qty(@jakarta.annotation.Nullable String qty) } /** - * Get qty + * Qty. * * @return qty */ @@ -143,7 +143,7 @@ public OldTradesLookupResponseInner quoteQty(@jakarta.annotation.Nullable String } /** - * Get quoteQty + * Quote Qty. * * @return quoteQty */ @@ -162,7 +162,7 @@ public OldTradesLookupResponseInner time(@jakarta.annotation.Nullable Long time) } /** - * Get time + * Time. * * @return time */ @@ -182,7 +182,7 @@ public OldTradesLookupResponseInner isBuyerMaker( } /** - * Get isBuyerMaker + * Is Buyer Maker. * * @return isBuyerMaker */ @@ -202,7 +202,7 @@ public OldTradesLookupResponseInner isRPITrade( } /** - * Get isRPITrade + * Is RPITrade. * * @return isRPITrade */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OpenInterestResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OpenInterestResponse.java index 9a0800900..e1f488ef1 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OpenInterestResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OpenInterestResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OpenInterestResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenInterestResponse { public static final String SERIALIZED_NAME_OPEN_INTEREST = "openInterest"; @@ -62,7 +62,7 @@ public OpenInterestResponse openInterest(@jakarta.annotation.Nullable String ope } /** - * Get openInterest + * Open Interest. * * @return openInterest */ @@ -81,7 +81,7 @@ public OpenInterestResponse symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -100,7 +100,7 @@ public OpenInterestResponse time(@jakarta.annotation.Nullable Long time) { } /** - * Get time + * Transaction time * * @return time */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OpenInterestStatisticsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OpenInterestStatisticsResponse.java index 84c1d138e..34ca7e4c4 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OpenInterestStatisticsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OpenInterestStatisticsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OpenInterestStatisticsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenInterestStatisticsResponse extends ArrayList { public OpenInterestStatisticsResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OpenInterestStatisticsResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OpenInterestStatisticsResponseInner.java index 0a3f9b17c..77c5c7156 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OpenInterestStatisticsResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OpenInterestStatisticsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OpenInterestStatisticsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenInterestStatisticsResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -64,7 +64,7 @@ public class OpenInterestStatisticsResponseInner { @SerializedName(SERIALIZED_NAME_TIMESTAMP) @jakarta.annotation.Nullable - private String timestamp; + private Long timestamp; public OpenInterestStatisticsResponseInner() {} @@ -94,7 +94,7 @@ public OpenInterestStatisticsResponseInner sumOpenInterest( } /** - * Get sumOpenInterest + * total open interest * * @return sumOpenInterest */ @@ -114,7 +114,7 @@ public OpenInterestStatisticsResponseInner sumOpenInterestValue( } /** - * Get sumOpenInterestValue + * total open interest value * * @return sumOpenInterestValue */ @@ -134,7 +134,7 @@ public OpenInterestStatisticsResponseInner cmCCirculatingSupply( } /** - * Get cmCCirculatingSupply + * circulating supply provided by CMC * * @return cmCCirculatingSupply */ @@ -148,22 +148,22 @@ public void setCmCCirculatingSupply(@jakarta.annotation.Nullable String cmCCircu } public OpenInterestStatisticsResponseInner timestamp( - @jakarta.annotation.Nullable String timestamp) { + @jakarta.annotation.Nullable Long timestamp) { this.timestamp = timestamp; return this; } /** - * Get timestamp + * Timestamp in milliseconds. * * @return timestamp */ @jakarta.annotation.Nullable - public String getTimestamp() { + public Long getTimestamp() { return timestamp; } - public void setTimestamp(@jakarta.annotation.Nullable String timestamp) { + public void setTimestamp(@jakarta.annotation.Nullable Long timestamp) { this.timestamp = timestamp; } @@ -331,14 +331,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("CMCCirculatingSupply").toString())); } - if ((jsonObj.get("timestamp") != null && !jsonObj.get("timestamp").isJsonNull()) - && !jsonObj.get("timestamp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `timestamp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("timestamp").toString())); - } } 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/rest/model/OrderBookResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderBookResponse.java index 2e1406a58..b9ccd174c 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderBookResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderBookResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -39,7 +39,7 @@ /** OrderBookResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderBookResponse { public static final String SERIALIZED_NAME_LAST_UPDATE_ID = "lastUpdateId"; @@ -63,13 +63,13 @@ public class OrderBookResponse { @SerializedName(SERIALIZED_NAME_BIDS) @jakarta.annotation.Nullable - private List bids; + private List> bids; public static final String SERIALIZED_NAME_ASKS = "asks"; @SerializedName(SERIALIZED_NAME_ASKS) @jakarta.annotation.Nullable - private List asks; + private List> asks; public OrderBookResponse() {} @@ -98,7 +98,7 @@ public OrderBookResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Message output time * * @return E */ @@ -117,7 +117,7 @@ public OrderBookResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction time * * @return T */ @@ -130,13 +130,12 @@ public void setT(@jakarta.annotation.Nullable Long T) { this.T = T; } - public OrderBookResponse bids( - @jakarta.annotation.Nullable List bids) { + public OrderBookResponse bids(@jakarta.annotation.Nullable List> bids) { this.bids = bids; return this; } - public OrderBookResponse addBidsItem(OrderBookResponseBidsItem bidsItem) { + public OrderBookResponse addBidsItem(List bidsItem) { if (this.bids == null) { this.bids = new ArrayList<>(); } @@ -145,27 +144,26 @@ public OrderBookResponse addBidsItem(OrderBookResponseBidsItem bidsItem) { } /** - * Get bids + * Bid orders. Each entry is [price, quantity]. * * @return bids */ @jakarta.annotation.Nullable @Valid - public List getBids() { + public List> getBids() { return bids; } - public void setBids(@jakarta.annotation.Nullable List bids) { + public void setBids(@jakarta.annotation.Nullable List> bids) { this.bids = bids; } - public OrderBookResponse asks( - @jakarta.annotation.Nullable List asks) { + public OrderBookResponse asks(@jakarta.annotation.Nullable List> asks) { this.asks = asks; return this; } - public OrderBookResponse addAsksItem(OrderBookResponseAsksItem asksItem) { + public OrderBookResponse addAsksItem(List asksItem) { if (this.asks == null) { this.asks = new ArrayList<>(); } @@ -174,17 +172,17 @@ public OrderBookResponse addAsksItem(OrderBookResponseAsksItem asksItem) { } /** - * Get asks + * Ask orders. Each entry is [price, quantity]. * * @return asks */ @jakarta.annotation.Nullable @Valid - public List getAsks() { + public List> getAsks() { return asks; } - public void setAsks(@jakarta.annotation.Nullable List asks) { + public void setAsks(@jakarta.annotation.Nullable List> asks) { this.asks = asks; } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderBookResponseAsksItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderBookResponseAsksItem.java deleted file mode 100644 index b1846efc2..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderBookResponseAsksItem.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** OrderBookResponseAsksItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OrderBookResponseAsksItem extends ArrayList { - public OrderBookResponseAsksItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrderBookResponseAsksItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OrderBookResponseAsksItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - if (!element.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected array items to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - } - if (jsonElement == null) { - if (!OrderBookResponseAsksItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OrderBookResponseAsksItem is not found" - + " in the empty JSON string", - OrderBookResponseAsksItem.openapiRequiredFields.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrderBookResponseAsksItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OrderBookResponseAsksItem' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(OrderBookResponseAsksItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OrderBookResponseAsksItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public OrderBookResponseAsksItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OrderBookResponseAsksItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrderBookResponseAsksItem - * @throws IOException if the JSON string is invalid with respect to OrderBookResponseAsksItem - */ - public static OrderBookResponseAsksItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OrderBookResponseAsksItem.class); - } - - /** - * Convert an instance of OrderBookResponseAsksItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderBookResponseBidsItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderBookResponseBidsItem.java deleted file mode 100644 index 017fbf6c7..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderBookResponseBidsItem.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** OrderBookResponseBidsItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OrderBookResponseBidsItem extends ArrayList { - public OrderBookResponseBidsItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrderBookResponseBidsItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OrderBookResponseBidsItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - if (!element.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected array items to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - } - if (jsonElement == null) { - if (!OrderBookResponseBidsItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OrderBookResponseBidsItem is not found" - + " in the empty JSON string", - OrderBookResponseBidsItem.openapiRequiredFields.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrderBookResponseBidsItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OrderBookResponseBidsItem' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(OrderBookResponseBidsItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OrderBookResponseBidsItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public OrderBookResponseBidsItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OrderBookResponseBidsItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrderBookResponseBidsItem - * @throws IOException if the JSON string is invalid with respect to OrderBookResponseBidsItem - */ - public static OrderBookResponseBidsItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OrderBookResponseBidsItem.class); - } - - /** - * Convert an instance of OrderBookResponseBidsItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderIdList.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderIdList.java index 0b99ca4cf..087ae5b27 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderIdList.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderIdList.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderIdList */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderIdList extends ArrayList { public OrderIdList() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderStatusResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderStatusResponse.java index 71a1f32f5..717d8432e 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderStatusResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderStatusResponse { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderType.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderType.java new file mode 100644 index 000000000..4c0a1a236 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrderType.java @@ -0,0 +1,83 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets orderType */ +@JsonAdapter(OrderType.Adapter.class) +public enum OrderType { + LIMIT("LIMIT"), + + MARKET("MARKET"), + + STOP("STOP"), + + STOP_MARKET("STOP_MARKET"), + + TAKE_PROFIT("TAKE_PROFIT"), + + TAKE_PROFIT_MARKET("TAKE_PROFIT_MARKET"), + + TRAILING_STOP_MARKET("TRAILING_STOP_MARKET"); + + private String value; + + OrderType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderType fromValue(String value) { + for (OrderType b : OrderType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderType.fromValue(value); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrigClientOrderIdList.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrigClientOrderIdList.java index 4d60a67c9..6d254393a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrigClientOrderIdList.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/OrigClientOrderIdList.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrigClientOrderIdList */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrigClientOrderIdList extends ArrayList { public OrigClientOrderIdList() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Period.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Period.java index 8a0a4f62c..17df79619 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Period.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Period.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PlaceMultipleOrdersRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PlaceMultipleOrdersRequest.java index 83ceef899..c6636c09b 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PlaceMultipleOrdersRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PlaceMultipleOrdersRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,13 +35,13 @@ /** PlaceMultipleOrdersRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PlaceMultipleOrdersRequest { public static final String SERIALIZED_NAME_BATCH_ORDERS = "batchOrders"; @SerializedName(SERIALIZED_NAME_BATCH_ORDERS) @jakarta.annotation.Nonnull - private BatchOrdersPlaceMultipleOrders batchOrders; + private BatchOrders batchOrders; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -52,7 +52,7 @@ public class PlaceMultipleOrdersRequest { public PlaceMultipleOrdersRequest() {} public PlaceMultipleOrdersRequest batchOrders( - @jakarta.annotation.Nonnull BatchOrdersPlaceMultipleOrders batchOrders) { + @jakarta.annotation.Nonnull BatchOrders batchOrders) { this.batchOrders = batchOrders; return this; } @@ -65,12 +65,11 @@ public PlaceMultipleOrdersRequest batchOrders( @jakarta.annotation.Nonnull @NotNull @Valid - public BatchOrdersPlaceMultipleOrders getBatchOrders() { + public BatchOrders getBatchOrders() { return batchOrders; } - public void setBatchOrders( - @jakarta.annotation.Nonnull BatchOrdersPlaceMultipleOrders batchOrders) { + public void setBatchOrders(@jakarta.annotation.Nonnull BatchOrders batchOrders) { this.batchOrders = batchOrders; } @@ -80,11 +79,12 @@ public PlaceMultipleOrdersRequest recvWindow(@jakarta.annotation.Nullable Long r } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PlaceMultipleOrdersResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PlaceMultipleOrdersResponse.java index 9d8d21df5..4e039bfef 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PlaceMultipleOrdersResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PlaceMultipleOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PlaceMultipleOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PlaceMultipleOrdersResponse extends ArrayList { public PlaceMultipleOrdersResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PlaceMultipleOrdersResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PlaceMultipleOrdersResponseInner.java index e72c2fe42..77b8ae167 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PlaceMultipleOrdersResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PlaceMultipleOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PlaceMultipleOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PlaceMultipleOrdersResponseInner { public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -48,12 +48,6 @@ public class PlaceMultipleOrdersResponseInner { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_QUOTE = "cumQuote"; - - @SerializedName(SERIALIZED_NAME_CUM_QUOTE) - @jakarta.annotation.Nullable - private String cumQuote; - public static final String SERIALIZED_NAME_EXECUTED_QTY = "executedQty"; @SerializedName(SERIALIZED_NAME_EXECUTED_QTY) @@ -66,12 +60,6 @@ public class PlaceMultipleOrdersResponseInner { @jakarta.annotation.Nullable private Long orderId; - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE) - @jakarta.annotation.Nullable - private String avgPrice; - public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; @SerializedName(SERIALIZED_NAME_ORIG_QTY) @@ -202,7 +190,7 @@ public PlaceMultipleOrdersResponseInner clientOrderId( } /** - * Get clientOrderId + * Client Order Id. * * @return clientOrderId */ @@ -234,25 +222,6 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public PlaceMultipleOrdersResponseInner cumQuote(@jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - return this; - } - - /** - * Get cumQuote - * - * @return cumQuote - */ - @jakarta.annotation.Nullable - public String getCumQuote() { - return cumQuote; - } - - public void setCumQuote(@jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - } - public PlaceMultipleOrdersResponseInner executedQty( @jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; @@ -260,7 +229,7 @@ public PlaceMultipleOrdersResponseInner executedQty( } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -279,7 +248,7 @@ public PlaceMultipleOrdersResponseInner orderId(@jakarta.annotation.Nullable Lon } /** - * Get orderId + * Order Id. * * @return orderId */ @@ -292,32 +261,13 @@ public void setOrderId(@jakarta.annotation.Nullable Long orderId) { this.orderId = orderId; } - public PlaceMultipleOrdersResponseInner avgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - return this; - } - - /** - * Get avgPrice - * - * @return avgPrice - */ - @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; - } - - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - } - public PlaceMultipleOrdersResponseInner origQty(@jakarta.annotation.Nullable String origQty) { this.origQty = origQty; return this; } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -336,7 +286,7 @@ public PlaceMultipleOrdersResponseInner price(@jakarta.annotation.Nullable Strin } /** - * Get price + * Price. * * @return price */ @@ -356,7 +306,7 @@ public PlaceMultipleOrdersResponseInner reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -375,7 +325,7 @@ public PlaceMultipleOrdersResponseInner side(@jakarta.annotation.Nullable String } /** - * Get side + * Side. * * @return side */ @@ -395,7 +345,7 @@ public PlaceMultipleOrdersResponseInner positionSide( } /** - * Get positionSide + * Position Side. * * @return positionSide */ @@ -414,7 +364,7 @@ public PlaceMultipleOrdersResponseInner status(@jakarta.annotation.Nullable Stri } /** - * Get status + * Status. * * @return status */ @@ -454,7 +404,7 @@ public PlaceMultipleOrdersResponseInner closePosition( } /** - * Get closePosition + * Close Position. * * @return closePosition */ @@ -473,7 +423,7 @@ public PlaceMultipleOrdersResponseInner symbol(@jakarta.annotation.Nullable Stri } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -493,7 +443,7 @@ public PlaceMultipleOrdersResponseInner timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -512,7 +462,7 @@ public PlaceMultipleOrdersResponseInner type(@jakarta.annotation.Nullable String } /** - * Get type + * Type. * * @return type */ @@ -531,7 +481,7 @@ public PlaceMultipleOrdersResponseInner origType(@jakarta.annotation.Nullable St } /** - * Get origType + * Orig Type. * * @return origType */ @@ -551,7 +501,7 @@ public PlaceMultipleOrdersResponseInner updateTime( } /** - * Get updateTime + * Update Time. * * @return updateTime */ @@ -571,7 +521,7 @@ public PlaceMultipleOrdersResponseInner workingType( } /** - * Get workingType + * Working Type. * * @return workingType */ @@ -591,7 +541,7 @@ public PlaceMultipleOrdersResponseInner priceProtect( } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -611,7 +561,7 @@ public PlaceMultipleOrdersResponseInner priceMatch( } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -631,7 +581,7 @@ public PlaceMultipleOrdersResponseInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -652,7 +602,7 @@ public PlaceMultipleOrdersResponseInner goodTillDate( } /** - * Get goodTillDate + * order pre-set auto cancel time for TIF GTD order * * @return goodTillDate */ @@ -715,10 +665,8 @@ public boolean equals(Object o) { (PlaceMultipleOrdersResponseInner) o; return Objects.equals(this.clientOrderId, placeMultipleOrdersResponseInner.clientOrderId) && Objects.equals(this.cumQty, placeMultipleOrdersResponseInner.cumQty) - && Objects.equals(this.cumQuote, placeMultipleOrdersResponseInner.cumQuote) && Objects.equals(this.executedQty, placeMultipleOrdersResponseInner.executedQty) && Objects.equals(this.orderId, placeMultipleOrdersResponseInner.orderId) - && Objects.equals(this.avgPrice, placeMultipleOrdersResponseInner.avgPrice) && Objects.equals(this.origQty, placeMultipleOrdersResponseInner.origQty) && Objects.equals(this.price, placeMultipleOrdersResponseInner.price) && Objects.equals(this.reduceOnly, placeMultipleOrdersResponseInner.reduceOnly) @@ -749,10 +697,8 @@ public int hashCode() { return Objects.hash( clientOrderId, cumQty, - cumQuote, executedQty, orderId, - avgPrice, origQty, price, reduceOnly, @@ -781,10 +727,8 @@ public String toString() { sb.append("class PlaceMultipleOrdersResponseInner {\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumQuote: ").append(toIndentedString(cumQuote)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); @@ -822,10 +766,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = ""; cumQtyValueAsString = cumQtyValue.toString(); sb.append("cumQty=").append(urlEncode(cumQtyValueAsString)).append(""); - Object cumQuoteValue = getCumQuote(); - String cumQuoteValueAsString = ""; - cumQuoteValueAsString = cumQuoteValue.toString(); - sb.append("cumQuote=").append(urlEncode(cumQuoteValueAsString)).append(""); Object executedQtyValue = getExecutedQty(); String executedQtyValueAsString = ""; executedQtyValueAsString = executedQtyValue.toString(); @@ -834,10 +774,6 @@ public String toUrlQueryString() { String orderIdValueAsString = ""; orderIdValueAsString = orderIdValue.toString(); sb.append("orderId=").append(urlEncode(orderIdValueAsString)).append(""); - Object avgPriceValue = getAvgPrice(); - String avgPriceValueAsString = ""; - avgPriceValueAsString = avgPriceValue.toString(); - sb.append("avgPrice=").append(urlEncode(avgPriceValueAsString)).append(""); Object origQtyValue = getOrigQty(); String origQtyValueAsString = ""; origQtyValueAsString = origQtyValue.toString(); @@ -950,10 +886,8 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("clientOrderId"); openapiFields.add("cumQty"); - openapiFields.add("cumQuote"); openapiFields.add("executedQty"); openapiFields.add("orderId"); - openapiFields.add("avgPrice"); openapiFields.add("origQty"); openapiFields.add("price"); openapiFields.add("reduceOnly"); @@ -1014,14 +948,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumQuote") != null && !jsonObj.get("cumQuote").isJsonNull()) - && !jsonObj.get("cumQuote").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumQuote` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("cumQuote").toString())); - } if ((jsonObj.get("executedQty") != null && !jsonObj.get("executedQty").isJsonNull()) && !jsonObj.get("executedQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1030,14 +956,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("executedQty").toString())); } - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) && !jsonObj.get("origQty").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionAdlQuantileEstimationResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionAdlQuantileEstimationResponse.java index b7cfcc3d7..246f9df94 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionAdlQuantileEstimationResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionAdlQuantileEstimationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PositionAdlQuantileEstimationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionAdlQuantileEstimationResponse extends ArrayList { public PositionAdlQuantileEstimationResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionAdlQuantileEstimationResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionAdlQuantileEstimationResponseInner.java index 691da2cf2..f31828cb4 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionAdlQuantileEstimationResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionAdlQuantileEstimationResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** PositionAdlQuantileEstimationResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionAdlQuantileEstimationResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionAdlQuantileEstimationResponseInnerAdlQuantile.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionAdlQuantileEstimationResponseInnerAdlQuantile.java index 011a14742..484c55511 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionAdlQuantileEstimationResponseInnerAdlQuantile.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionAdlQuantileEstimationResponseInnerAdlQuantile.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PositionAdlQuantileEstimationResponseInnerAdlQuantile */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionAdlQuantileEstimationResponseInnerAdlQuantile { public static final String SERIALIZED_NAME_L_O_N_G = "LONG"; @@ -69,7 +69,7 @@ public PositionAdlQuantileEstimationResponseInnerAdlQuantile LONG( } /** - * Get LONG + * adl quantile for \"LONG\" position in hedge mode * * @return LONG */ @@ -89,7 +89,7 @@ public PositionAdlQuantileEstimationResponseInnerAdlQuantile SHORT( } /** - * Get SHORT + * adl qauntile for \"SHORT\" position in hedge mode * * @return SHORT */ @@ -109,7 +109,7 @@ public PositionAdlQuantileEstimationResponseInnerAdlQuantile HEDGE( } /** - * Get HEDGE + * only a sign, ignore the value * * @return HEDGE */ @@ -129,7 +129,7 @@ public PositionAdlQuantileEstimationResponseInnerAdlQuantile BOTH( } /** - * Get BOTH + * adl qunatile for position in one-way mode * * @return BOTH */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionInformationV2Response.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionInformationV2Response.java index 49fc512e2..a2e2c435e 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionInformationV2Response.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionInformationV2Response.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PositionInformationV2Response */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionInformationV2Response extends ArrayList { public PositionInformationV2Response() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionInformationV2ResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionInformationV2ResponseInner.java index df5193010..dd67873e9 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionInformationV2ResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionInformationV2ResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PositionInformationV2ResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionInformationV2ResponseInner { public static final String SERIALIZED_NAME_ENTRY_PRICE = "entryPrice"; @@ -141,7 +141,7 @@ public PositionInformationV2ResponseInner entryPrice( } /** - * Get entryPrice + * Entry Price. * * @return entryPrice */ @@ -161,7 +161,7 @@ public PositionInformationV2ResponseInner breakEvenPrice( } /** - * Get breakEvenPrice + * Break Even Price. * * @return breakEvenPrice */ @@ -181,7 +181,7 @@ public PositionInformationV2ResponseInner marginType( } /** - * Get marginType + * Margin Type. * * @return marginType */ @@ -221,7 +221,7 @@ public PositionInformationV2ResponseInner isolatedMargin( } /** - * Get isolatedMargin + * Isolated Margin. * * @return isolatedMargin */ @@ -241,7 +241,7 @@ public PositionInformationV2ResponseInner leverage( } /** - * Get leverage + * Leverage. * * @return leverage */ @@ -261,7 +261,7 @@ public PositionInformationV2ResponseInner liquidationPrice( } /** - * Get liquidationPrice + * Liquidation Price. * * @return liquidationPrice */ @@ -281,7 +281,7 @@ public PositionInformationV2ResponseInner markPrice( } /** - * Get markPrice + * Mark Price. * * @return markPrice */ @@ -301,7 +301,7 @@ public PositionInformationV2ResponseInner maxNotionalValue( } /** - * Get maxNotionalValue + * Max Notional Value. * * @return maxNotionalValue */ @@ -321,7 +321,7 @@ public PositionInformationV2ResponseInner positionAmt( } /** - * Get positionAmt + * Position Amt. * * @return positionAmt */ @@ -380,7 +380,7 @@ public PositionInformationV2ResponseInner symbol(@jakarta.annotation.Nullable St } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -400,7 +400,7 @@ public PositionInformationV2ResponseInner unRealizedProfit( } /** - * Get unRealizedProfit + * Un Realized Profit. * * @return unRealizedProfit */ @@ -420,7 +420,7 @@ public PositionInformationV2ResponseInner positionSide( } /** - * Get positionSide + * Position Side. * * @return positionSide */ @@ -440,7 +440,7 @@ public PositionInformationV2ResponseInner updateTime( } /** - * Get updateTime + * Update Time. * * @return updateTime */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionInformationV3Response.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionInformationV3Response.java index 27b12b140..6e6d23e51 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionInformationV3Response.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionInformationV3Response.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PositionInformationV3Response */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionInformationV3Response extends ArrayList { public PositionInformationV3Response() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionInformationV3ResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionInformationV3ResponseInner.java index 6f3971d8e..d2b3f8264 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionInformationV3ResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionInformationV3ResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PositionInformationV3ResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionInformationV3ResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -164,7 +164,7 @@ public PositionInformationV3ResponseInner symbol(@jakarta.annotation.Nullable St } /** - * Get symbol + * symbol * * @return symbol */ @@ -184,7 +184,7 @@ public PositionInformationV3ResponseInner positionSide( } /** - * Get positionSide + * position side * * @return positionSide */ @@ -204,7 +204,7 @@ public PositionInformationV3ResponseInner positionAmt( } /** - * Get positionAmt + * position amount, positive for long, negative for short * * @return positionAmt */ @@ -224,7 +224,7 @@ public PositionInformationV3ResponseInner entryPrice( } /** - * Get entryPrice + * entry price * * @return entryPrice */ @@ -244,7 +244,7 @@ public PositionInformationV3ResponseInner breakEvenPrice( } /** - * Get breakEvenPrice + * break-even price * * @return breakEvenPrice */ @@ -264,7 +264,7 @@ public PositionInformationV3ResponseInner markPrice( } /** - * Get markPrice + * current mark price * * @return markPrice */ @@ -284,7 +284,7 @@ public PositionInformationV3ResponseInner unRealizedProfit( } /** - * Get unRealizedProfit + * unrealized profit * * @return unRealizedProfit */ @@ -304,7 +304,7 @@ public PositionInformationV3ResponseInner liquidationPrice( } /** - * Get liquidationPrice + * liquidation price * * @return liquidationPrice */ @@ -324,7 +324,7 @@ public PositionInformationV3ResponseInner isolatedMargin( } /** - * Get isolatedMargin + * isolated margin * * @return isolatedMargin */ @@ -344,7 +344,7 @@ public PositionInformationV3ResponseInner notional( } /** - * Get notional + * notional value of position * * @return notional */ @@ -364,7 +364,7 @@ public PositionInformationV3ResponseInner marginAsset( } /** - * Get marginAsset + * margin asset * * @return marginAsset */ @@ -384,7 +384,7 @@ public PositionInformationV3ResponseInner isolatedWallet( } /** - * Get isolatedWallet + * isolated wallet (if isolated position) * * @return isolatedWallet */ @@ -404,7 +404,7 @@ public PositionInformationV3ResponseInner initialMargin( } /** - * Get initialMargin + * initial margin required with current mark price * * @return initialMargin */ @@ -424,7 +424,7 @@ public PositionInformationV3ResponseInner maintMargin( } /** - * Get maintMargin + * maintenance margin required * * @return maintMargin */ @@ -444,7 +444,7 @@ public PositionInformationV3ResponseInner positionInitialMargin( } /** - * Get positionInitialMargin + * initial margin required for positions with current mark price * * @return positionInitialMargin */ @@ -465,7 +465,7 @@ public PositionInformationV3ResponseInner openOrderInitialMargin( } /** - * Get openOrderInitialMargin + * initial margin required for open orders with current mark price * * @return openOrderInitialMargin */ @@ -485,7 +485,7 @@ public PositionInformationV3ResponseInner adl(@jakarta.annotation.Nullable Long } /** - * Get adl + * auto-deleverage ranking * * @return adl */ @@ -505,7 +505,7 @@ public PositionInformationV3ResponseInner bidNotional( } /** - * Get bidNotional + * ignore * * @return bidNotional */ @@ -525,7 +525,7 @@ public PositionInformationV3ResponseInner askNotional( } /** - * Get askNotional + * ignore * * @return askNotional */ @@ -545,7 +545,7 @@ public PositionInformationV3ResponseInner updateTime( } /** - * Get updateTime + * update time * * @return updateTime */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionSide.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionSide.java index 59f6f1f75..13b492e38 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionSide.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PositionSide.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets positionSide */ +/** + * Default `BOTH` for One-way Mode ; `LONG` or `SHORT` for Hedge Mode. + * It must be sent in Hedge Mode. + */ @JsonAdapter(PositionSide.Adapter.class) public enum PositionSide { BOTH("BOTH"), diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PremiumIndexKlineDataItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PremiumIndexKlineDataItem.java new file mode 100644 index 000000000..b9e99cdf6 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PremiumIndexKlineDataItem.java @@ -0,0 +1,183 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** PremiumIndexKlineDataItem */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class PremiumIndexKlineDataItem extends ArrayList { + public PremiumIndexKlineDataItem() {} + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PremiumIndexKlineDataItem {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PremiumIndexKlineDataItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be a array type in the JSON string but got" + + " `%s`", + jsonElement.toString())); + } + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for (JsonElement element : array) { + PremiumIndexKlineDataItemInner.validateJsonElement(element); + } + if (jsonElement == null) { + if (!PremiumIndexKlineDataItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PremiumIndexKlineDataItem is not found" + + " in the empty JSON string", + PremiumIndexKlineDataItem.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PremiumIndexKlineDataItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PremiumIndexKlineDataItem' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PremiumIndexKlineDataItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PremiumIndexKlineDataItem value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); + elementAdapter.write(out, obj); + } + + @Override + public PremiumIndexKlineDataItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of PremiumIndexKlineDataItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of PremiumIndexKlineDataItem + * @throws IOException if the JSON string is invalid with respect to PremiumIndexKlineDataItem + */ + public static PremiumIndexKlineDataItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PremiumIndexKlineDataItem.class); + } + + /** + * Convert an instance of PremiumIndexKlineDataItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PremiumIndexKlineDataItemInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PremiumIndexKlineDataItemInner.java new file mode 100644 index 000000000..07ef5c773 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PremiumIndexKlineDataItemInner.java @@ -0,0 +1,311 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.common.AbstractOpenApiSchema; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonPrimitive; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.hibernate.validator.constraints.*; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class PremiumIndexKlineDataItemInner extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(PremiumIndexKlineDataItemInner.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PremiumIndexKlineDataItemInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PremiumIndexKlineDataItemInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterLong = + gson.getDelegateAdapter(this, TypeToken.get(Long.class)); + final TypeAdapter adapterString = + gson.getDelegateAdapter(this, TypeToken.get(String.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PremiumIndexKlineDataItemInner value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `Long` + if (value.getActualInstance() instanceof Long) { + JsonPrimitive primitive = + adapterLong + .toJsonTree((Long) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + // check if the actual instance is of the type `String` + if (value.getActualInstance() instanceof String) { + JsonPrimitive primitive = + adapterString + .toJsonTree((String) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " Long, String"); + } + + @Override + public PremiumIndexKlineDataItemInner read(JsonReader in) + throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize Long + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterLong; + match++; + log.log(Level.FINER, "Input data matches schema 'Long'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for Long failed with `%s`.", + e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Long'", e); + } + // deserialize String + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterString; + match++; + log.log(Level.FINER, "Input data matches schema 'String'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for String failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'String'", + e); + } + + if (match == 1) { + PremiumIndexKlineDataItemInner ret = + new PremiumIndexKlineDataItemInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for" + + " PremiumIndexKlineDataItemInner: %d classes" + + " match result, expected 1. Detailed failure" + + " message for oneOf schemas: %s. JSON: %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public PremiumIndexKlineDataItemInner() { + super("oneOf", Boolean.FALSE); + } + + public PremiumIndexKlineDataItemInner(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Long", Long.class); + schemas.put("String", String.class); + } + + @Override + public Map> getSchemas() { + return PremiumIndexKlineDataItemInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: Long, String + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof Long) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof String) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Long, String"); + } + + /** + * Get the actual instance, which can be the following: Long, String + * + * @return The actual instance (Long, String) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Long`. If the actual instance is not `Long`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `Long` + * @throws ClassCastException if the instance is not `Long` + */ + public Long getLong() throws ClassCastException { + return (Long) super.getActualInstance(); + } + + /** + * Get the actual instance of `String`. If the actual instance is not `String`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String) super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * PremiumIndexKlineDataItemInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with Long + try { + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for Long failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with String + try { + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for String failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for PremiumIndexKlineDataItemInner with" + + " oneOf schemas: Long, String. %d class(es) match the result," + + " expected 1. Detailed failure message for oneOf schemas: %s." + + " JSON: %s", + validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of PremiumIndexKlineDataItemInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PremiumIndexKlineDataItemInner + * @throws IOException if the JSON string is invalid with respect to + * PremiumIndexKlineDataItemInner + */ + public static PremiumIndexKlineDataItemInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PremiumIndexKlineDataItemInner.class); + } + + /** + * Convert an instance of PremiumIndexKlineDataItemInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PremiumIndexKlineDataResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PremiumIndexKlineDataResponse.java index 2d6bf62e9..f389dd06a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PremiumIndexKlineDataResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PremiumIndexKlineDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,8 +34,8 @@ /** PremiumIndexKlineDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PremiumIndexKlineDataResponse extends ArrayList { + comments = "Generator version: 7.22.0") +public class PremiumIndexKlineDataResponse extends ArrayList { public PremiumIndexKlineDataResponse() {} @Override @@ -117,7 +117,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - PremiumIndexKlineDataResponseItem.validateJsonElement(element); + PremiumIndexKlineDataItem.validateJsonElement(element); } if (jsonElement == null) { if (!PremiumIndexKlineDataResponse.openapiRequiredFields diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PremiumIndexKlineDataResponseItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PremiumIndexKlineDataResponseItem.java deleted file mode 100644 index a59009f3a..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PremiumIndexKlineDataResponseItem.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** PremiumIndexKlineDataResponseItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PremiumIndexKlineDataResponseItem extends ArrayList { - public PremiumIndexKlineDataResponseItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PremiumIndexKlineDataResponseItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * PremiumIndexKlineDataResponseItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - PremiumIndexKlineDataResponseItemInner.validateJsonElement(element); - } - if (jsonElement == null) { - if (!PremiumIndexKlineDataResponseItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PremiumIndexKlineDataResponseItem is" - + " not found in the empty JSON string", - PremiumIndexKlineDataResponseItem.openapiRequiredFields - .toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PremiumIndexKlineDataResponseItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PremiumIndexKlineDataResponseItem' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(PremiumIndexKlineDataResponseItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PremiumIndexKlineDataResponseItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public PremiumIndexKlineDataResponseItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PremiumIndexKlineDataResponseItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of PremiumIndexKlineDataResponseItem - * @throws IOException if the JSON string is invalid with respect to - * PremiumIndexKlineDataResponseItem - */ - public static PremiumIndexKlineDataResponseItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PremiumIndexKlineDataResponseItem.class); - } - - /** - * Convert an instance of PremiumIndexKlineDataResponseItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PremiumIndexKlineDataResponseItemInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PremiumIndexKlineDataResponseItemInner.java deleted file mode 100644 index f39699b6f..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PremiumIndexKlineDataResponseItemInner.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonPrimitive; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PremiumIndexKlineDataResponseItemInner extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(PremiumIndexKlineDataResponseItemInner.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PremiumIndexKlineDataResponseItemInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PremiumIndexKlineDataResponseItemInner' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterLong = - gson.getDelegateAdapter(this, TypeToken.get(Long.class)); - final TypeAdapter adapterString = - gson.getDelegateAdapter(this, TypeToken.get(String.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, PremiumIndexKlineDataResponseItemInner value) - throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `Long` - if (value.getActualInstance() instanceof Long) { - JsonPrimitive primitive = - adapterLong - .toJsonTree((Long) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - // check if the actual instance is of the type `String` - if (value.getActualInstance() instanceof String) { - JsonPrimitive primitive = - adapterString - .toJsonTree((String) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " Long, String"); - } - - @Override - public PremiumIndexKlineDataResponseItemInner read(JsonReader in) - throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize Long - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterLong; - match++; - log.log(Level.FINER, "Input data matches schema 'Long'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for Long failed with `%s`.", - e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Long'", e); - } - // deserialize String - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterString; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for String failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'String'", - e); - } - - if (match == 1) { - PremiumIndexKlineDataResponseItemInner ret = - new PremiumIndexKlineDataResponseItemInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for" - + " PremiumIndexKlineDataResponseItemInner: %d" - + " classes match result, expected 1. Detailed" - + " failure message for oneOf schemas: %s. JSON:" - + " %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public PremiumIndexKlineDataResponseItemInner() { - super("oneOf", Boolean.FALSE); - } - - public PremiumIndexKlineDataResponseItemInner(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Long", Long.class); - schemas.put("String", String.class); - } - - @Override - public Map> getSchemas() { - return PremiumIndexKlineDataResponseItemInner.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Long, String - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof Long) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof String) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Long, String"); - } - - /** - * Get the actual instance, which can be the following: Long, String - * - * @return The actual instance (Long, String) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Long`. If the actual instance is not `Long`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Long` - * @throws ClassCastException if the instance is not `Long` - */ - public Long getLong() throws ClassCastException { - return (Long) super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * PremiumIndexKlineDataResponseItemInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Long - try { - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for Long failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with String - try { - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for String failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for PremiumIndexKlineDataResponseItemInner" - + " with oneOf schemas: Long, String. %d class(es) match the" - + " result, expected 1. Detailed failure message for oneOf schemas:" - + " %s. JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of PremiumIndexKlineDataResponseItemInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of PremiumIndexKlineDataResponseItemInner - * @throws IOException if the JSON string is invalid with respect to - * PremiumIndexKlineDataResponseItemInner - */ - public static PremiumIndexKlineDataResponseItemInner fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, PremiumIndexKlineDataResponseItemInner.class); - } - - /** - * Convert an instance of PremiumIndexKlineDataResponseItemInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PriceMatch.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PriceMatch.java index 632088e9a..bbedaaf11 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PriceMatch.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PriceMatch.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -21,11 +21,12 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets priceMatch */ +/** + * only avaliable for `LIMIT`/`STOP`/`TAKE_PROFIT` order; Can't be + * passed together with `price` + */ @JsonAdapter(PriceMatch.Adapter.class) public enum PriceMatch { - NONE("NONE"), - OPPONENT("OPPONENT"), OPPONENT_5("OPPONENT_5"), diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PriceProtect.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PriceProtect.java new file mode 100644 index 000000000..33d031f64 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/PriceProtect.java @@ -0,0 +1,73 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets priceProtect */ +@JsonAdapter(PriceProtect.Adapter.class) +public enum PriceProtect { + TRUE("true"), + + FALSE("false"); + + private String value; + + PriceProtect(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PriceProtect fromValue(String value) { + for (PriceProtect b : PriceProtect.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PriceProtect enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PriceProtect read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PriceProtect.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PriceProtect.fromValue(value); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QuarterlyContractSettlementPriceResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QuarterlyContractSettlementPriceResponse.java index 785926ae8..025b181fb 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QuarterlyContractSettlementPriceResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QuarterlyContractSettlementPriceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QuarterlyContractSettlementPriceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuarterlyContractSettlementPriceResponse extends ArrayList { public QuarterlyContractSettlementPriceResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QuarterlyContractSettlementPriceResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QuarterlyContractSettlementPriceResponseInner.java index b372226ce..24f735de2 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QuarterlyContractSettlementPriceResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QuarterlyContractSettlementPriceResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** QuarterlyContractSettlementPriceResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuarterlyContractSettlementPriceResponseInner { public static final String SERIALIZED_NAME_DELIVERY_TIME = "deliveryTime"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryAlgoOrderResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryAlgoOrderResponse.java index f8efd8622..fe8b060ea 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryAlgoOrderResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryAlgoOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAlgoOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAlgoOrderResponse { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; @@ -108,6 +108,18 @@ public class QueryAlgoOrderResponse { @jakarta.annotation.Nullable private String actualPrice; + public static final String SERIALIZED_NAME_ACTUAL_TYPE = "actualType"; + + @SerializedName(SERIALIZED_NAME_ACTUAL_TYPE) + @jakarta.annotation.Nullable + private String actualType; + + public static final String SERIALIZED_NAME_ACTUAL_QTY = "actualQty"; + + @SerializedName(SERIALIZED_NAME_ACTUAL_QTY) + @jakarta.annotation.Nullable + private String actualQty; + public static final String SERIALIZED_NAME_TRIGGER_PRICE = "triggerPrice"; @SerializedName(SERIALIZED_NAME_TRIGGER_PRICE) @@ -126,30 +138,6 @@ public class QueryAlgoOrderResponse { @jakarta.annotation.Nullable private String icebergQuantity; - public static final String SERIALIZED_NAME_TP_TRIGGER_PRICE = "tpTriggerPrice"; - - @SerializedName(SERIALIZED_NAME_TP_TRIGGER_PRICE) - @jakarta.annotation.Nullable - private String tpTriggerPrice; - - public static final String SERIALIZED_NAME_TP_PRICE = "tpPrice"; - - @SerializedName(SERIALIZED_NAME_TP_PRICE) - @jakarta.annotation.Nullable - private String tpPrice; - - public static final String SERIALIZED_NAME_SL_TRIGGER_PRICE = "slTriggerPrice"; - - @SerializedName(SERIALIZED_NAME_SL_TRIGGER_PRICE) - @jakarta.annotation.Nullable - private String slTriggerPrice; - - public static final String SERIALIZED_NAME_SL_PRICE = "slPrice"; - - @SerializedName(SERIALIZED_NAME_SL_PRICE) - @jakarta.annotation.Nullable - private String slPrice; - public static final String SERIALIZED_NAME_TP_ORDER_TYPE = "tpOrderType"; @SerializedName(SERIALIZED_NAME_TP_ORDER_TYPE) @@ -415,7 +403,7 @@ public QueryAlgoOrderResponse actualOrderId(@jakarta.annotation.Nullable String } /** - * Get actualOrderId + * Empty string if not triggered; orderId if triggered. * * @return actualOrderId */ @@ -434,7 +422,7 @@ public QueryAlgoOrderResponse actualPrice(@jakarta.annotation.Nullable String ac } /** - * Get actualPrice + * 0 if not triggered; average price if filled/partially filled. * * @return actualPrice */ @@ -447,6 +435,44 @@ public void setActualPrice(@jakarta.annotation.Nullable String actualPrice) { this.actualPrice = actualPrice; } + public QueryAlgoOrderResponse actualType(@jakarta.annotation.Nullable String actualType) { + this.actualType = actualType; + return this; + } + + /** + * Optional field, only present when triggered. + * + * @return actualType + */ + @jakarta.annotation.Nullable + public String getActualType() { + return actualType; + } + + public void setActualType(@jakarta.annotation.Nullable String actualType) { + this.actualType = actualType; + } + + public QueryAlgoOrderResponse actualQty(@jakarta.annotation.Nullable String actualQty) { + this.actualQty = actualQty; + return this; + } + + /** + * Optional field, only present when filled/partially filled. + * + * @return actualQty + */ + @jakarta.annotation.Nullable + public String getActualQty() { + return actualQty; + } + + public void setActualQty(@jakarta.annotation.Nullable String actualQty) { + this.actualQty = actualQty; + } + public QueryAlgoOrderResponse triggerPrice(@jakarta.annotation.Nullable String triggerPrice) { this.triggerPrice = triggerPrice; return this; @@ -505,84 +531,6 @@ public void setIcebergQuantity(@jakarta.annotation.Nullable String icebergQuanti this.icebergQuantity = icebergQuantity; } - public QueryAlgoOrderResponse tpTriggerPrice( - @jakarta.annotation.Nullable String tpTriggerPrice) { - this.tpTriggerPrice = tpTriggerPrice; - return this; - } - - /** - * Get tpTriggerPrice - * - * @return tpTriggerPrice - */ - @jakarta.annotation.Nullable - public String getTpTriggerPrice() { - return tpTriggerPrice; - } - - public void setTpTriggerPrice(@jakarta.annotation.Nullable String tpTriggerPrice) { - this.tpTriggerPrice = tpTriggerPrice; - } - - public QueryAlgoOrderResponse tpPrice(@jakarta.annotation.Nullable String tpPrice) { - this.tpPrice = tpPrice; - return this; - } - - /** - * Get tpPrice - * - * @return tpPrice - */ - @jakarta.annotation.Nullable - public String getTpPrice() { - return tpPrice; - } - - public void setTpPrice(@jakarta.annotation.Nullable String tpPrice) { - this.tpPrice = tpPrice; - } - - public QueryAlgoOrderResponse slTriggerPrice( - @jakarta.annotation.Nullable String slTriggerPrice) { - this.slTriggerPrice = slTriggerPrice; - return this; - } - - /** - * Get slTriggerPrice - * - * @return slTriggerPrice - */ - @jakarta.annotation.Nullable - public String getSlTriggerPrice() { - return slTriggerPrice; - } - - public void setSlTriggerPrice(@jakarta.annotation.Nullable String slTriggerPrice) { - this.slTriggerPrice = slTriggerPrice; - } - - public QueryAlgoOrderResponse slPrice(@jakarta.annotation.Nullable String slPrice) { - this.slPrice = slPrice; - return this; - } - - /** - * Get slPrice - * - * @return slPrice - */ - @jakarta.annotation.Nullable - public String getSlPrice() { - return slPrice; - } - - public void setSlPrice(@jakarta.annotation.Nullable String slPrice) { - this.slPrice = slPrice; - } - public QueryAlgoOrderResponse tpOrderType(@jakarta.annotation.Nullable String tpOrderType) { this.tpOrderType = tpOrderType; return this; @@ -816,13 +764,11 @@ public boolean equals(Object o) { && Objects.equals(this.algoStatus, queryAlgoOrderResponse.algoStatus) && Objects.equals(this.actualOrderId, queryAlgoOrderResponse.actualOrderId) && Objects.equals(this.actualPrice, queryAlgoOrderResponse.actualPrice) + && Objects.equals(this.actualType, queryAlgoOrderResponse.actualType) + && Objects.equals(this.actualQty, queryAlgoOrderResponse.actualQty) && Objects.equals(this.triggerPrice, queryAlgoOrderResponse.triggerPrice) && Objects.equals(this.price, queryAlgoOrderResponse.price) && Objects.equals(this.icebergQuantity, queryAlgoOrderResponse.icebergQuantity) - && Objects.equals(this.tpTriggerPrice, queryAlgoOrderResponse.tpTriggerPrice) - && Objects.equals(this.tpPrice, queryAlgoOrderResponse.tpPrice) - && Objects.equals(this.slTriggerPrice, queryAlgoOrderResponse.slTriggerPrice) - && Objects.equals(this.slPrice, queryAlgoOrderResponse.slPrice) && Objects.equals(this.tpOrderType, queryAlgoOrderResponse.tpOrderType) && Objects.equals( this.selfTradePreventionMode, @@ -853,13 +799,11 @@ public int hashCode() { algoStatus, actualOrderId, actualPrice, + actualType, + actualQty, triggerPrice, price, icebergQuantity, - tpTriggerPrice, - tpPrice, - slTriggerPrice, - slPrice, tpOrderType, selfTradePreventionMode, workingType, @@ -889,13 +833,11 @@ public String toString() { sb.append(" algoStatus: ").append(toIndentedString(algoStatus)).append("\n"); sb.append(" actualOrderId: ").append(toIndentedString(actualOrderId)).append("\n"); sb.append(" actualPrice: ").append(toIndentedString(actualPrice)).append("\n"); + sb.append(" actualType: ").append(toIndentedString(actualType)).append("\n"); + sb.append(" actualQty: ").append(toIndentedString(actualQty)).append("\n"); sb.append(" triggerPrice: ").append(toIndentedString(triggerPrice)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" icebergQuantity: ").append(toIndentedString(icebergQuantity)).append("\n"); - sb.append(" tpTriggerPrice: ").append(toIndentedString(tpTriggerPrice)).append("\n"); - sb.append(" tpPrice: ").append(toIndentedString(tpPrice)).append("\n"); - sb.append(" slTriggerPrice: ").append(toIndentedString(slTriggerPrice)).append("\n"); - sb.append(" slPrice: ").append(toIndentedString(slPrice)).append("\n"); sb.append(" tpOrderType: ").append(toIndentedString(tpOrderType)).append("\n"); sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) @@ -964,6 +906,14 @@ public String toUrlQueryString() { String actualPriceValueAsString = ""; actualPriceValueAsString = actualPriceValue.toString(); sb.append("actualPrice=").append(urlEncode(actualPriceValueAsString)).append(""); + Object actualTypeValue = getActualType(); + String actualTypeValueAsString = ""; + actualTypeValueAsString = actualTypeValue.toString(); + sb.append("actualType=").append(urlEncode(actualTypeValueAsString)).append(""); + Object actualQtyValue = getActualQty(); + String actualQtyValueAsString = ""; + actualQtyValueAsString = actualQtyValue.toString(); + sb.append("actualQty=").append(urlEncode(actualQtyValueAsString)).append(""); Object triggerPriceValue = getTriggerPrice(); String triggerPriceValueAsString = ""; triggerPriceValueAsString = triggerPriceValue.toString(); @@ -976,22 +926,6 @@ public String toUrlQueryString() { String icebergQuantityValueAsString = ""; icebergQuantityValueAsString = icebergQuantityValue.toString(); sb.append("icebergQuantity=").append(urlEncode(icebergQuantityValueAsString)).append(""); - Object tpTriggerPriceValue = getTpTriggerPrice(); - String tpTriggerPriceValueAsString = ""; - tpTriggerPriceValueAsString = tpTriggerPriceValue.toString(); - sb.append("tpTriggerPrice=").append(urlEncode(tpTriggerPriceValueAsString)).append(""); - Object tpPriceValue = getTpPrice(); - String tpPriceValueAsString = ""; - tpPriceValueAsString = tpPriceValue.toString(); - sb.append("tpPrice=").append(urlEncode(tpPriceValueAsString)).append(""); - Object slTriggerPriceValue = getSlTriggerPrice(); - String slTriggerPriceValueAsString = ""; - slTriggerPriceValueAsString = slTriggerPriceValue.toString(); - sb.append("slTriggerPrice=").append(urlEncode(slTriggerPriceValueAsString)).append(""); - Object slPriceValue = getSlPrice(); - String slPriceValueAsString = ""; - slPriceValueAsString = slPriceValue.toString(); - sb.append("slPrice=").append(urlEncode(slPriceValueAsString)).append(""); Object tpOrderTypeValue = getTpOrderType(); String tpOrderTypeValueAsString = ""; tpOrderTypeValueAsString = tpOrderTypeValue.toString(); @@ -1078,13 +1012,11 @@ private String toIndentedString(Object o) { openapiFields.add("algoStatus"); openapiFields.add("actualOrderId"); openapiFields.add("actualPrice"); + openapiFields.add("actualType"); + openapiFields.add("actualQty"); openapiFields.add("triggerPrice"); openapiFields.add("price"); openapiFields.add("icebergQuantity"); - openapiFields.add("tpTriggerPrice"); - openapiFields.add("tpPrice"); - openapiFields.add("slTriggerPrice"); - openapiFields.add("slPrice"); openapiFields.add("tpOrderType"); openapiFields.add("selfTradePreventionMode"); openapiFields.add("workingType"); @@ -1207,6 +1139,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("actualPrice").toString())); } + if ((jsonObj.get("actualType") != null && !jsonObj.get("actualType").isJsonNull()) + && !jsonObj.get("actualType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `actualType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("actualType").toString())); + } + if ((jsonObj.get("actualQty") != null && !jsonObj.get("actualQty").isJsonNull()) + && !jsonObj.get("actualQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `actualQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("actualQty").toString())); + } if ((jsonObj.get("triggerPrice") != null && !jsonObj.get("triggerPrice").isJsonNull()) && !jsonObj.get("triggerPrice").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1231,38 +1179,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " JSON string but got `%s`", jsonObj.get("icebergQuantity").toString())); } - if ((jsonObj.get("tpTriggerPrice") != null && !jsonObj.get("tpTriggerPrice").isJsonNull()) - && !jsonObj.get("tpTriggerPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tpTriggerPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("tpTriggerPrice").toString())); - } - if ((jsonObj.get("tpPrice") != null && !jsonObj.get("tpPrice").isJsonNull()) - && !jsonObj.get("tpPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tpPrice` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("tpPrice").toString())); - } - if ((jsonObj.get("slTriggerPrice") != null && !jsonObj.get("slTriggerPrice").isJsonNull()) - && !jsonObj.get("slTriggerPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `slTriggerPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("slTriggerPrice").toString())); - } - if ((jsonObj.get("slPrice") != null && !jsonObj.get("slPrice").isJsonNull()) - && !jsonObj.get("slPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `slPrice` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("slPrice").toString())); - } if ((jsonObj.get("tpOrderType") != null && !jsonObj.get("tpOrderType").isJsonNull()) && !jsonObj.get("tpOrderType").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryAllAlgoOrdersResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryAllAlgoOrdersResponse.java index 3c2572b17..3f10c981c 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryAllAlgoOrdersResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryAllAlgoOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllAlgoOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllAlgoOrdersResponse extends ArrayList { public QueryAllAlgoOrdersResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryAllAlgoOrdersResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryAllAlgoOrdersResponseInner.java index ef8b5ce18..e44c9325e 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryAllAlgoOrdersResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryAllAlgoOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryAllAlgoOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryAllAlgoOrdersResponseInner { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryCurrentOpenOrderResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryCurrentOpenOrderResponse.java index d65b4b5ef..1eec812de 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryCurrentOpenOrderResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryCurrentOpenOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCurrentOpenOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCurrentOpenOrderResponse { public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; @@ -96,18 +96,18 @@ public class QueryCurrentOpenOrderResponse { @jakarta.annotation.Nullable private String side; - public static final String SERIALIZED_NAME_POSITION_SIDE = "positionSide"; - - @SerializedName(SERIALIZED_NAME_POSITION_SIDE) - @jakarta.annotation.Nullable - private String positionSide; - public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @jakarta.annotation.Nullable private String status; + public static final String SERIALIZED_NAME_POSITION_SIDE = "positionSide"; + + @SerializedName(SERIALIZED_NAME_POSITION_SIDE) + @jakarta.annotation.Nullable + private String positionSide; + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; @SerializedName(SERIALIZED_NAME_STOP_PRICE) @@ -201,7 +201,7 @@ public QueryCurrentOpenOrderResponse avgPrice(@jakarta.annotation.Nullable Strin } /** - * Get avgPrice + * Avg Price. * * @return avgPrice */ @@ -221,7 +221,7 @@ public QueryCurrentOpenOrderResponse clientOrderId( } /** - * Get clientOrderId + * Client Order Id. * * @return clientOrderId */ @@ -240,7 +240,7 @@ public QueryCurrentOpenOrderResponse cumQuote(@jakarta.annotation.Nullable Strin } /** - * Get cumQuote + * Cum Quote. * * @return cumQuote */ @@ -260,7 +260,7 @@ public QueryCurrentOpenOrderResponse executedQty( } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -279,7 +279,7 @@ public QueryCurrentOpenOrderResponse orderId(@jakarta.annotation.Nullable Long o } /** - * Get orderId + * Order Id. * * @return orderId */ @@ -298,7 +298,7 @@ public QueryCurrentOpenOrderResponse origQty(@jakarta.annotation.Nullable String } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -317,7 +317,7 @@ public QueryCurrentOpenOrderResponse origType(@jakarta.annotation.Nullable Strin } /** - * Get origType + * Orig Type. * * @return origType */ @@ -336,7 +336,7 @@ public QueryCurrentOpenOrderResponse price(@jakarta.annotation.Nullable String p } /** - * Get price + * Price. * * @return price */ @@ -356,7 +356,7 @@ public QueryCurrentOpenOrderResponse reduceOnly( } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -375,7 +375,7 @@ public QueryCurrentOpenOrderResponse side(@jakarta.annotation.Nullable String si } /** - * Get side + * Side. * * @return side */ @@ -388,43 +388,43 @@ public void setSide(@jakarta.annotation.Nullable String side) { this.side = side; } - public QueryCurrentOpenOrderResponse positionSide( - @jakarta.annotation.Nullable String positionSide) { - this.positionSide = positionSide; + public QueryCurrentOpenOrderResponse status(@jakarta.annotation.Nullable String status) { + this.status = status; return this; } /** - * Get positionSide + * Status. * - * @return positionSide + * @return status */ @jakarta.annotation.Nullable - public String getPositionSide() { - return positionSide; + public String getStatus() { + return status; } - public void setPositionSide(@jakarta.annotation.Nullable String positionSide) { - this.positionSide = positionSide; + public void setStatus(@jakarta.annotation.Nullable String status) { + this.status = status; } - public QueryCurrentOpenOrderResponse status(@jakarta.annotation.Nullable String status) { - this.status = status; + public QueryCurrentOpenOrderResponse positionSide( + @jakarta.annotation.Nullable String positionSide) { + this.positionSide = positionSide; return this; } /** - * Get status + * Position Side. * - * @return status + * @return positionSide */ @jakarta.annotation.Nullable - public String getStatus() { - return status; + public String getPositionSide() { + return positionSide; } - public void setStatus(@jakarta.annotation.Nullable String status) { - this.status = status; + public void setPositionSide(@jakarta.annotation.Nullable String positionSide) { + this.positionSide = positionSide; } public QueryCurrentOpenOrderResponse stopPrice(@jakarta.annotation.Nullable String stopPrice) { @@ -433,7 +433,7 @@ public QueryCurrentOpenOrderResponse stopPrice(@jakarta.annotation.Nullable Stri } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -453,7 +453,7 @@ public QueryCurrentOpenOrderResponse closePosition( } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -472,7 +472,7 @@ public QueryCurrentOpenOrderResponse symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -491,7 +491,7 @@ public QueryCurrentOpenOrderResponse time(@jakarta.annotation.Nullable Long time } /** - * Get time + * order time * * @return time */ @@ -511,7 +511,7 @@ public QueryCurrentOpenOrderResponse timeInForce( } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -530,7 +530,7 @@ public QueryCurrentOpenOrderResponse type(@jakarta.annotation.Nullable String ty } /** - * Get type + * Type. * * @return type */ @@ -550,7 +550,7 @@ public QueryCurrentOpenOrderResponse activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -569,7 +569,7 @@ public QueryCurrentOpenOrderResponse priceRate(@jakarta.annotation.Nullable Stri } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -588,7 +588,7 @@ public QueryCurrentOpenOrderResponse updateTime(@jakarta.annotation.Nullable Lon } /** - * Get updateTime + * Update Time. * * @return updateTime */ @@ -608,7 +608,7 @@ public QueryCurrentOpenOrderResponse workingType( } /** - * Get workingType + * Working Type. * * @return workingType */ @@ -628,7 +628,7 @@ public QueryCurrentOpenOrderResponse priceProtect( } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -648,7 +648,7 @@ public QueryCurrentOpenOrderResponse priceMatch( } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -668,7 +668,7 @@ public QueryCurrentOpenOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -689,7 +689,7 @@ public QueryCurrentOpenOrderResponse goodTillDate( } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ @@ -722,8 +722,8 @@ public boolean equals(Object o) { && Objects.equals(this.price, queryCurrentOpenOrderResponse.price) && Objects.equals(this.reduceOnly, queryCurrentOpenOrderResponse.reduceOnly) && Objects.equals(this.side, queryCurrentOpenOrderResponse.side) - && Objects.equals(this.positionSide, queryCurrentOpenOrderResponse.positionSide) && Objects.equals(this.status, queryCurrentOpenOrderResponse.status) + && Objects.equals(this.positionSide, queryCurrentOpenOrderResponse.positionSide) && Objects.equals(this.stopPrice, queryCurrentOpenOrderResponse.stopPrice) && Objects.equals(this.closePosition, queryCurrentOpenOrderResponse.closePosition) && Objects.equals(this.symbol, queryCurrentOpenOrderResponse.symbol) @@ -755,8 +755,8 @@ public int hashCode() { price, reduceOnly, side, - positionSide, status, + positionSide, stopPrice, closePosition, symbol, @@ -787,8 +787,8 @@ public String toString() { sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); - sb.append(" positionSide: ").append(toIndentedString(positionSide)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" positionSide: ").append(toIndentedString(positionSide)).append("\n"); sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); sb.append(" closePosition: ").append(toIndentedString(closePosition)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); @@ -852,14 +852,14 @@ public String toUrlQueryString() { String sideValueAsString = ""; sideValueAsString = sideValue.toString(); sb.append("side=").append(urlEncode(sideValueAsString)).append(""); - Object positionSideValue = getPositionSide(); - String positionSideValueAsString = ""; - positionSideValueAsString = positionSideValue.toString(); - sb.append("positionSide=").append(urlEncode(positionSideValueAsString)).append(""); Object statusValue = getStatus(); String statusValueAsString = ""; statusValueAsString = statusValue.toString(); sb.append("status=").append(urlEncode(statusValueAsString)).append(""); + Object positionSideValue = getPositionSide(); + String positionSideValueAsString = ""; + positionSideValueAsString = positionSideValue.toString(); + sb.append("positionSide=").append(urlEncode(positionSideValueAsString)).append(""); Object stopPriceValue = getStopPrice(); String stopPriceValueAsString = ""; stopPriceValueAsString = stopPriceValue.toString(); @@ -956,8 +956,8 @@ private String toIndentedString(Object o) { openapiFields.add("price"); openapiFields.add("reduceOnly"); openapiFields.add("side"); - openapiFields.add("positionSide"); openapiFields.add("status"); + openapiFields.add("positionSide"); openapiFields.add("stopPrice"); openapiFields.add("closePosition"); openapiFields.add("symbol"); @@ -1060,14 +1060,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("side").toString())); } - if ((jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) - && !jsonObj.get("positionSide").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `positionSide` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("positionSide").toString())); - } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1076,6 +1068,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("status").toString())); } + if ((jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) + && !jsonObj.get("positionSide").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `positionSide` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("positionSide").toString())); + } if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) && !jsonObj.get("stopPrice").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryIndexPriceConstituentsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryIndexPriceConstituentsResponse.java index fb8af7c1e..27049b846 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryIndexPriceConstituentsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryIndexPriceConstituentsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryIndexPriceConstituentsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryIndexPriceConstituentsResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryIndexPriceConstituentsResponseConstituentsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryIndexPriceConstituentsResponseConstituentsInner.java index b134bc0d8..b41330fd7 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryIndexPriceConstituentsResponseConstituentsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryIndexPriceConstituentsResponseConstituentsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryIndexPriceConstituentsResponseConstituentsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryIndexPriceConstituentsResponseConstituentsInner { public static final String SERIALIZED_NAME_EXCHANGE = "exchange"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse.java index b41c9411c..9b650065c 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryInsuranceFundBalanceSnapshotResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(QueryInsuranceFundBalanceSnapshotResponse.class.getName()); diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse1.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse1.java index ed5236793..9d3ceecf1 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse1.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryInsuranceFundBalanceSnapshotResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryInsuranceFundBalanceSnapshotResponse1 { public static final String SERIALIZED_NAME_SYMBOLS = "symbols"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse1AssetsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse1AssetsInner.java index 9e3cb453a..e030a387e 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse1AssetsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse1AssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryInsuranceFundBalanceSnapshotResponse1AssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryInsuranceFundBalanceSnapshotResponse1AssetsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse2.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse2.java index 1ff2e624b..2323165b5 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse2.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryInsuranceFundBalanceSnapshotResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryInsuranceFundBalanceSnapshotResponse2 extends ArrayList { public QueryInsuranceFundBalanceSnapshotResponse2() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse2Inner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse2Inner.java index 7e3658a91..bb4873d03 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse2Inner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse2Inner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryInsuranceFundBalanceSnapshotResponse2Inner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryInsuranceFundBalanceSnapshotResponse2Inner { public static final String SERIALIZED_NAME_SYMBOLS = "symbols"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse2InnerAssetsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse2InnerAssetsInner.java index 23d2b16e7..f0833b904 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse2InnerAssetsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryInsuranceFundBalanceSnapshotResponse2InnerAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryInsuranceFundBalanceSnapshotResponse2InnerAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryInsuranceFundBalanceSnapshotResponse2InnerAssetsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryOrderResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryOrderResponse.java index a4596b307..18e12875a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryOrderResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryOrderResponse { public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; @@ -174,6 +174,25 @@ public class QueryOrderResponse { @jakarta.annotation.Nullable private Boolean priceProtect; + public static final String SERIALIZED_NAME_PRICE_MATCH = "priceMatch"; + + @SerializedName(SERIALIZED_NAME_PRICE_MATCH) + @jakarta.annotation.Nullable + private String priceMatch; + + public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = + "selfTradePreventionMode"; + + @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) + @jakarta.annotation.Nullable + private String selfTradePreventionMode; + + public static final String SERIALIZED_NAME_GOOD_TILL_DATE = "goodTillDate"; + + @SerializedName(SERIALIZED_NAME_GOOD_TILL_DATE) + @jakarta.annotation.Nullable + private Long goodTillDate; + public QueryOrderResponse() {} public QueryOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPrice) { @@ -182,7 +201,7 @@ public QueryOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPrice) } /** - * Get avgPrice + * Avg Price. * * @return avgPrice */ @@ -201,7 +220,7 @@ public QueryOrderResponse clientOrderId(@jakarta.annotation.Nullable String clie } /** - * Get clientOrderId + * Client Order Id. * * @return clientOrderId */ @@ -220,7 +239,7 @@ public QueryOrderResponse cumQuote(@jakarta.annotation.Nullable String cumQuote) } /** - * Get cumQuote + * Cum Quote. * * @return cumQuote */ @@ -239,7 +258,7 @@ public QueryOrderResponse executedQty(@jakarta.annotation.Nullable String execut } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -258,7 +277,7 @@ public QueryOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Order Id. * * @return orderId */ @@ -277,7 +296,7 @@ public QueryOrderResponse origQty(@jakarta.annotation.Nullable String origQty) { } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -296,7 +315,7 @@ public QueryOrderResponse origType(@jakarta.annotation.Nullable String origType) } /** - * Get origType + * Orig Type. * * @return origType */ @@ -315,7 +334,7 @@ public QueryOrderResponse price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Price. * * @return price */ @@ -334,7 +353,7 @@ public QueryOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean reduce } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -353,7 +372,7 @@ public QueryOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Side. * * @return side */ @@ -372,7 +391,7 @@ public QueryOrderResponse positionSide(@jakarta.annotation.Nullable String posit } /** - * Get positionSide + * Position Side. * * @return positionSide */ @@ -391,7 +410,7 @@ public QueryOrderResponse status(@jakarta.annotation.Nullable String status) { } /** - * Get status + * Status. * * @return status */ @@ -410,7 +429,7 @@ public QueryOrderResponse stopPrice(@jakarta.annotation.Nullable String stopPric } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -429,7 +448,7 @@ public QueryOrderResponse closePosition(@jakarta.annotation.Nullable Boolean clo } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -448,7 +467,7 @@ public QueryOrderResponse symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -467,7 +486,7 @@ public QueryOrderResponse time(@jakarta.annotation.Nullable Long time) { } /** - * Get time + * order time * * @return time */ @@ -486,7 +505,7 @@ public QueryOrderResponse timeInForce(@jakarta.annotation.Nullable String timeIn } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -505,7 +524,7 @@ public QueryOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Type. * * @return type */ @@ -524,7 +543,7 @@ public QueryOrderResponse activatePrice(@jakarta.annotation.Nullable String acti } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -543,7 +562,7 @@ public QueryOrderResponse priceRate(@jakarta.annotation.Nullable String priceRat } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -562,7 +581,7 @@ public QueryOrderResponse updateTime(@jakarta.annotation.Nullable Long updateTim } /** - * Get updateTime + * update time * * @return updateTime */ @@ -581,7 +600,7 @@ public QueryOrderResponse workingType(@jakarta.annotation.Nullable String workin } /** - * Get workingType + * Working Type. * * @return workingType */ @@ -600,7 +619,7 @@ public QueryOrderResponse priceProtect(@jakarta.annotation.Nullable Boolean pric } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -613,6 +632,65 @@ public void setPriceProtect(@jakarta.annotation.Nullable Boolean priceProtect) { this.priceProtect = priceProtect; } + public QueryOrderResponse priceMatch(@jakarta.annotation.Nullable String priceMatch) { + this.priceMatch = priceMatch; + return this; + } + + /** + * Price Match. + * + * @return priceMatch + */ + @jakarta.annotation.Nullable + public String getPriceMatch() { + return priceMatch; + } + + public void setPriceMatch(@jakarta.annotation.Nullable String priceMatch) { + this.priceMatch = priceMatch; + } + + public QueryOrderResponse selfTradePreventionMode( + @jakarta.annotation.Nullable String selfTradePreventionMode) { + this.selfTradePreventionMode = selfTradePreventionMode; + return this; + } + + /** + * Self Trade Prevention Mode. + * + * @return selfTradePreventionMode + */ + @jakarta.annotation.Nullable + public String getSelfTradePreventionMode() { + return selfTradePreventionMode; + } + + public void setSelfTradePreventionMode( + @jakarta.annotation.Nullable String selfTradePreventionMode) { + this.selfTradePreventionMode = selfTradePreventionMode; + } + + public QueryOrderResponse goodTillDate(@jakarta.annotation.Nullable Long goodTillDate) { + this.goodTillDate = goodTillDate; + return this; + } + + /** + * Good Till Date. + * + * @return goodTillDate + */ + @jakarta.annotation.Nullable + public Long getGoodTillDate() { + return goodTillDate; + } + + public void setGoodTillDate(@jakarta.annotation.Nullable Long goodTillDate) { + this.goodTillDate = goodTillDate; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -644,7 +722,11 @@ public boolean equals(Object o) { && Objects.equals(this.priceRate, queryOrderResponse.priceRate) && Objects.equals(this.updateTime, queryOrderResponse.updateTime) && Objects.equals(this.workingType, queryOrderResponse.workingType) - && Objects.equals(this.priceProtect, queryOrderResponse.priceProtect); + && Objects.equals(this.priceProtect, queryOrderResponse.priceProtect) + && Objects.equals(this.priceMatch, queryOrderResponse.priceMatch) + && Objects.equals( + this.selfTradePreventionMode, queryOrderResponse.selfTradePreventionMode) + && Objects.equals(this.goodTillDate, queryOrderResponse.goodTillDate); } @Override @@ -672,7 +754,10 @@ public int hashCode() { priceRate, updateTime, workingType, - priceProtect); + priceProtect, + priceMatch, + selfTradePreventionMode, + goodTillDate); } @Override @@ -702,6 +787,11 @@ public String toString() { sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); sb.append(" workingType: ").append(toIndentedString(workingType)).append("\n"); sb.append(" priceProtect: ").append(toIndentedString(priceProtect)).append("\n"); + sb.append(" priceMatch: ").append(toIndentedString(priceMatch)).append("\n"); + sb.append(" selfTradePreventionMode: ") + .append(toIndentedString(selfTradePreventionMode)) + .append("\n"); + sb.append(" goodTillDate: ").append(toIndentedString(goodTillDate)).append("\n"); sb.append("}"); return sb.toString(); } @@ -801,6 +891,20 @@ public String toUrlQueryString() { String priceProtectValueAsString = ""; priceProtectValueAsString = priceProtectValue.toString(); sb.append("priceProtect=").append(urlEncode(priceProtectValueAsString)).append(""); + Object priceMatchValue = getPriceMatch(); + String priceMatchValueAsString = ""; + priceMatchValueAsString = priceMatchValue.toString(); + sb.append("priceMatch=").append(urlEncode(priceMatchValueAsString)).append(""); + Object selfTradePreventionModeValue = getSelfTradePreventionMode(); + String selfTradePreventionModeValueAsString = ""; + selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); + sb.append("selfTradePreventionMode=") + .append(urlEncode(selfTradePreventionModeValueAsString)) + .append(""); + Object goodTillDateValue = getGoodTillDate(); + String goodTillDateValueAsString = ""; + goodTillDateValueAsString = goodTillDateValue.toString(); + sb.append("goodTillDate=").append(urlEncode(goodTillDateValueAsString)).append(""); return sb.toString(); } @@ -852,6 +956,9 @@ private String toIndentedString(Object o) { openapiFields.add("updateTime"); openapiFields.add("workingType"); openapiFields.add("priceProtect"); + openapiFields.add("priceMatch"); + openapiFields.add("selfTradePreventionMode"); + openapiFields.add("goodTillDate"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -1011,6 +1118,23 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("workingType").toString())); } + if ((jsonObj.get("priceMatch") != null && !jsonObj.get("priceMatch").isJsonNull()) + && !jsonObj.get("priceMatch").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `priceMatch` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("priceMatch").toString())); + } + if ((jsonObj.get("selfTradePreventionMode") != null + && !jsonObj.get("selfTradePreventionMode").isJsonNull()) + && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `selfTradePreventionMode` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("selfTradePreventionMode").toString())); + } } 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/rest/model/QueryUserRateLimitResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryUserRateLimitResponse.java index c9dea4f4f..8d6f85b4e 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryUserRateLimitResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryUserRateLimitResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUserRateLimitResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUserRateLimitResponse extends ArrayList { public QueryUserRateLimitResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryUserRateLimitResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryUserRateLimitResponseInner.java index 582fd572d..124962f6a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryUserRateLimitResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/QueryUserRateLimitResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUserRateLimitResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUserRateLimitResponseInner { public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RecentTradesListResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RecentTradesListResponse.java index b182e335f..c7f16e836 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RecentTradesListResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RecentTradesListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RecentTradesListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RecentTradesListResponse extends ArrayList { public RecentTradesListResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RecentTradesListResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RecentTradesListResponseInner.java index fdc3b457a..6bfc92305 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RecentTradesListResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RecentTradesListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RecentTradesListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RecentTradesListResponseInner { public static final String SERIALIZED_NAME_ID = "id"; @@ -86,7 +86,7 @@ public RecentTradesListResponseInner id(@jakarta.annotation.Nullable Long id) { } /** - * Get id + * Id. * * @return id */ @@ -105,7 +105,7 @@ public RecentTradesListResponseInner price(@jakarta.annotation.Nullable String p } /** - * Get price + * Price. * * @return price */ @@ -124,7 +124,7 @@ public RecentTradesListResponseInner qty(@jakarta.annotation.Nullable String qty } /** - * Get qty + * Qty. * * @return qty */ @@ -143,7 +143,7 @@ public RecentTradesListResponseInner quoteQty(@jakarta.annotation.Nullable Strin } /** - * Get quoteQty + * Quote Qty. * * @return quoteQty */ @@ -162,7 +162,7 @@ public RecentTradesListResponseInner time(@jakarta.annotation.Nullable Long time } /** - * Get time + * Time. * * @return time */ @@ -182,7 +182,7 @@ public RecentTradesListResponseInner isBuyerMaker( } /** - * Get isBuyerMaker + * Is Buyer Maker. * * @return isBuyerMaker */ @@ -202,7 +202,7 @@ public RecentTradesListResponseInner isRPITrade( } /** - * Get isRPITrade + * Is RPITrade. * * @return isRPITrade */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ReduceOnly.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ReduceOnly.java new file mode 100644 index 000000000..ba69e2776 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ReduceOnly.java @@ -0,0 +1,75 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** + * Cannot be sent in Hedge Mode; cannot be sent with `closePosition`=`true` + */ +@JsonAdapter(ReduceOnly.Adapter.class) +public enum ReduceOnly { + TRUE("true"), + + FALSE("false"); + + private String value; + + ReduceOnly(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ReduceOnly fromValue(String value) { + for (ReduceOnly b : ReduceOnly.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ReduceOnly enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ReduceOnly read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ReduceOnly.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ReduceOnly.fromValue(value); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RpiOrderBookResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RpiOrderBookResponse.java index 3dd7b184c..30490cd92 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RpiOrderBookResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RpiOrderBookResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -39,7 +39,7 @@ /** RpiOrderBookResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RpiOrderBookResponse { public static final String SERIALIZED_NAME_LAST_UPDATE_ID = "lastUpdateId"; @@ -63,13 +63,13 @@ public class RpiOrderBookResponse { @SerializedName(SERIALIZED_NAME_BIDS) @jakarta.annotation.Nullable - private List bids; + private List> bids; public static final String SERIALIZED_NAME_ASKS = "asks"; @SerializedName(SERIALIZED_NAME_ASKS) @jakarta.annotation.Nullable - private List asks; + private List> asks; public RpiOrderBookResponse() {} @@ -98,7 +98,7 @@ public RpiOrderBookResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Message output time * * @return E */ @@ -117,7 +117,7 @@ public RpiOrderBookResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction time * * @return T */ @@ -130,13 +130,12 @@ public void setT(@jakarta.annotation.Nullable Long T) { this.T = T; } - public RpiOrderBookResponse bids( - @jakarta.annotation.Nullable List bids) { + public RpiOrderBookResponse bids(@jakarta.annotation.Nullable List> bids) { this.bids = bids; return this; } - public RpiOrderBookResponse addBidsItem(RpiOrderBookResponseBidsItem bidsItem) { + public RpiOrderBookResponse addBidsItem(List bidsItem) { if (this.bids == null) { this.bids = new ArrayList<>(); } @@ -145,27 +144,26 @@ public RpiOrderBookResponse addBidsItem(RpiOrderBookResponseBidsItem bidsItem) { } /** - * Get bids + * Bid orders. Each entry is [price, quantity]. * * @return bids */ @jakarta.annotation.Nullable @Valid - public List getBids() { + public List> getBids() { return bids; } - public void setBids(@jakarta.annotation.Nullable List bids) { + public void setBids(@jakarta.annotation.Nullable List> bids) { this.bids = bids; } - public RpiOrderBookResponse asks( - @jakarta.annotation.Nullable List asks) { + public RpiOrderBookResponse asks(@jakarta.annotation.Nullable List> asks) { this.asks = asks; return this; } - public RpiOrderBookResponse addAsksItem(RpiOrderBookResponseAsksItem asksItem) { + public RpiOrderBookResponse addAsksItem(List asksItem) { if (this.asks == null) { this.asks = new ArrayList<>(); } @@ -174,17 +172,17 @@ public RpiOrderBookResponse addAsksItem(RpiOrderBookResponseAsksItem asksItem) { } /** - * Get asks + * Ask orders. Each entry is [price, quantity]. * * @return asks */ @jakarta.annotation.Nullable @Valid - public List getAsks() { + public List> getAsks() { return asks; } - public void setAsks(@jakarta.annotation.Nullable List asks) { + public void setAsks(@jakarta.annotation.Nullable List> asks) { this.asks = asks; } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RpiOrderBookResponseAsksItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RpiOrderBookResponseAsksItem.java deleted file mode 100644 index 6f278f842..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RpiOrderBookResponseAsksItem.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** RpiOrderBookResponseAsksItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RpiOrderBookResponseAsksItem extends ArrayList { - public RpiOrderBookResponseAsksItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RpiOrderBookResponseAsksItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * RpiOrderBookResponseAsksItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - if (!element.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected array items to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - } - if (jsonElement == null) { - if (!RpiOrderBookResponseAsksItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RpiOrderBookResponseAsksItem is not" - + " found in the empty JSON string", - RpiOrderBookResponseAsksItem.openapiRequiredFields.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RpiOrderBookResponseAsksItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RpiOrderBookResponseAsksItem' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(RpiOrderBookResponseAsksItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RpiOrderBookResponseAsksItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public RpiOrderBookResponseAsksItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RpiOrderBookResponseAsksItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of RpiOrderBookResponseAsksItem - * @throws IOException if the JSON string is invalid with respect to - * RpiOrderBookResponseAsksItem - */ - public static RpiOrderBookResponseAsksItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RpiOrderBookResponseAsksItem.class); - } - - /** - * Convert an instance of RpiOrderBookResponseAsksItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RpiOrderBookResponseBidsItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RpiOrderBookResponseBidsItem.java deleted file mode 100644 index 12cb9bc49..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/RpiOrderBookResponseBidsItem.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** RpiOrderBookResponseBidsItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RpiOrderBookResponseBidsItem extends ArrayList { - public RpiOrderBookResponseBidsItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RpiOrderBookResponseBidsItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * RpiOrderBookResponseBidsItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - if (!element.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected array items to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - } - if (jsonElement == null) { - if (!RpiOrderBookResponseBidsItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RpiOrderBookResponseBidsItem is not" - + " found in the empty JSON string", - RpiOrderBookResponseBidsItem.openapiRequiredFields.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RpiOrderBookResponseBidsItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RpiOrderBookResponseBidsItem' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(RpiOrderBookResponseBidsItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RpiOrderBookResponseBidsItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public RpiOrderBookResponseBidsItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RpiOrderBookResponseBidsItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of RpiOrderBookResponseBidsItem - * @throws IOException if the JSON string is invalid with respect to - * RpiOrderBookResponseBidsItem - */ - public static RpiOrderBookResponseBidsItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RpiOrderBookResponseBidsItem.class); - } - - /** - * Convert an instance of RpiOrderBookResponseBidsItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SelfTradePreventionMode.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SelfTradePreventionMode.java index cf512e823..c1b36a550 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SelfTradePreventionMode.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SelfTradePreventionMode.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -21,9 +21,15 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets selfTradePreventionMode */ +/** + * `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) public enum SelfTradePreventionMode { + NONE("NONE"), + EXPIRE_TAKER("EXPIRE_TAKER"), EXPIRE_BOTH("EXPIRE_BOTH"), diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SendQuoteRequestRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SendQuoteRequestRequest.java index 4368f7f98..3fc93b250 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SendQuoteRequestRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SendQuoteRequestRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** SendQuoteRequestRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SendQuoteRequestRequest { public static final String SERIALIZED_NAME_FROM_ASSET = "fromAsset"; @@ -121,7 +121,7 @@ public SendQuoteRequestRequest fromAmount(@jakarta.annotation.Nullable Double fr } /** - * Get fromAmount + * When specified, it is the amount you will be debited after the conversion * * @return fromAmount */ @@ -141,7 +141,7 @@ public SendQuoteRequestRequest toAmount(@jakarta.annotation.Nullable Double toAm } /** - * Get toAmount + * When specified, it is the amount you will be credited after the conversion * * @return toAmount */ @@ -161,7 +161,7 @@ public SendQuoteRequestRequest validTime(@jakarta.annotation.Nullable String val } /** - * Get validTime + * 10s, default 10s * * @return validTime */ @@ -180,11 +180,12 @@ public SendQuoteRequestRequest recvWindow(@jakarta.annotation.Nullable Long recv } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SendQuoteRequestResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SendQuoteRequestResponse.java index 6eeabdcfd..3444d4cc9 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SendQuoteRequestResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SendQuoteRequestResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SendQuoteRequestResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SendQuoteRequestResponse { public static final String SERIALIZED_NAME_QUOTE_ID = "quoteId"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Side.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Side.java index 3e1ada901..ddcc9a58a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Side.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Side.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/StartUserDataStreamResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/StartUserDataStreamResponse.java index dd94ab017..ea60c4a22 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/StartUserDataStreamResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/StartUserDataStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** StartUserDataStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class StartUserDataStreamResponse { public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolConfigurationResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolConfigurationResponse.java index 074c3d711..3dd8cda54 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolConfigurationResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolConfigurationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SymbolConfigurationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolConfigurationResponse extends ArrayList { public SymbolConfigurationResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolConfigurationResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolConfigurationResponseInner.java index 6b924686d..0baa9b5cd 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolConfigurationResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolConfigurationResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SymbolConfigurationResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolConfigurationResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolOrderBookTickerResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolOrderBookTickerResponse.java index 8b681d672..af375c70f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolOrderBookTickerResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolOrderBookTickerResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolOrderBookTickerResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(SymbolOrderBookTickerResponse.class.getName()); diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolOrderBookTickerResponse1.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolOrderBookTickerResponse1.java index aed4fe790..1067cf0e6 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolOrderBookTickerResponse1.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolOrderBookTickerResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SymbolOrderBookTickerResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolOrderBookTickerResponse1 { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -80,7 +80,7 @@ public SymbolOrderBookTickerResponse1 symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -99,7 +99,7 @@ public SymbolOrderBookTickerResponse1 bidPrice(@jakarta.annotation.Nullable Stri } /** - * Get bidPrice + * Bid Price. * * @return bidPrice */ @@ -118,7 +118,7 @@ public SymbolOrderBookTickerResponse1 bidQty(@jakarta.annotation.Nullable String } /** - * Get bidQty + * Bid Qty. * * @return bidQty */ @@ -137,7 +137,7 @@ public SymbolOrderBookTickerResponse1 askPrice(@jakarta.annotation.Nullable Stri } /** - * Get askPrice + * Ask Price. * * @return askPrice */ @@ -156,7 +156,7 @@ public SymbolOrderBookTickerResponse1 askQty(@jakarta.annotation.Nullable String } /** - * Get askQty + * Ask Qty. * * @return askQty */ @@ -175,7 +175,7 @@ public SymbolOrderBookTickerResponse1 time(@jakarta.annotation.Nullable Long tim } /** - * Get time + * Transaction time * * @return time */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolOrderBookTickerResponse2.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolOrderBookTickerResponse2.java index bcb7f5c4a..85a0790d4 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolOrderBookTickerResponse2.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolOrderBookTickerResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SymbolOrderBookTickerResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolOrderBookTickerResponse2 extends ArrayList { public SymbolOrderBookTickerResponse2() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolOrderBookTickerResponse2Inner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolOrderBookTickerResponse2Inner.java index bfc914033..24d06f542 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolOrderBookTickerResponse2Inner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolOrderBookTickerResponse2Inner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SymbolOrderBookTickerResponse2Inner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolOrderBookTickerResponse2Inner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -80,7 +80,7 @@ public SymbolOrderBookTickerResponse2Inner symbol(@jakarta.annotation.Nullable S } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -100,7 +100,7 @@ public SymbolOrderBookTickerResponse2Inner bidPrice( } /** - * Get bidPrice + * Bid Price. * * @return bidPrice */ @@ -119,7 +119,7 @@ public SymbolOrderBookTickerResponse2Inner bidQty(@jakarta.annotation.Nullable S } /** - * Get bidQty + * Bid Qty. * * @return bidQty */ @@ -139,7 +139,7 @@ public SymbolOrderBookTickerResponse2Inner askPrice( } /** - * Get askPrice + * Ask Price. * * @return askPrice */ @@ -158,7 +158,7 @@ public SymbolOrderBookTickerResponse2Inner askQty(@jakarta.annotation.Nullable S } /** - * Get askQty + * Ask Qty. * * @return askQty */ @@ -177,7 +177,7 @@ public SymbolOrderBookTickerResponse2Inner time(@jakarta.annotation.Nullable Lon } /** - * Get time + * Transaction time * * @return time */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerResponse.java index d46dd548f..5d3ca30fc 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolPriceTickerResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(SymbolPriceTickerResponse.class.getName()); diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerResponse1.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerResponse1.java index 7dad40663..d54a63be7 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerResponse1.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SymbolPriceTickerResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolPriceTickerResponse1 { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -62,7 +62,7 @@ public SymbolPriceTickerResponse1 symbol(@jakarta.annotation.Nullable String sym } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -81,7 +81,7 @@ public SymbolPriceTickerResponse1 price(@jakarta.annotation.Nullable String pric } /** - * Get price + * Price. * * @return price */ @@ -100,7 +100,7 @@ public SymbolPriceTickerResponse1 time(@jakarta.annotation.Nullable Long time) { } /** - * Get time + * Transaction time * * @return time */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerResponse2.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerResponse2.java index 3abfb1cf4..c8e26ce5f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerResponse2.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,8 +34,8 @@ /** SymbolPriceTickerResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SymbolPriceTickerResponse2 extends ArrayList { + comments = "Generator version: 7.22.0") +public class SymbolPriceTickerResponse2 extends ArrayList { public SymbolPriceTickerResponse2() {} @Override @@ -116,7 +116,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - SymbolPriceTickerV2Response2Inner.validateJsonElement(element); + SymbolPriceTickerResponse2Inner.validateJsonElement(element); } if (jsonElement == null) { if (!SymbolPriceTickerResponse2.openapiRequiredFields diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerResponse2Inner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerResponse2Inner.java new file mode 100644 index 000000000..dba07a218 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerResponse2Inner.java @@ -0,0 +1,288 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** SymbolPriceTickerResponse2Inner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class SymbolPriceTickerResponse2Inner { + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_PRICE = "price"; + + @SerializedName(SERIALIZED_NAME_PRICE) + @jakarta.annotation.Nullable + private String price; + + public static final String SERIALIZED_NAME_TIME = "time"; + + @SerializedName(SERIALIZED_NAME_TIME) + @jakarta.annotation.Nullable + private Long time; + + public SymbolPriceTickerResponse2Inner() {} + + public SymbolPriceTickerResponse2Inner symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Symbol. + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public SymbolPriceTickerResponse2Inner price(@jakarta.annotation.Nullable String price) { + this.price = price; + return this; + } + + /** + * Price. + * + * @return price + */ + @jakarta.annotation.Nullable + public String getPrice() { + return price; + } + + public void setPrice(@jakarta.annotation.Nullable String price) { + this.price = price; + } + + public SymbolPriceTickerResponse2Inner time(@jakarta.annotation.Nullable Long time) { + this.time = time; + return this; + } + + /** + * Transaction time + * + * @return time + */ + @jakarta.annotation.Nullable + public Long getTime() { + return time; + } + + public void setTime(@jakarta.annotation.Nullable Long time) { + this.time = time; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SymbolPriceTickerResponse2Inner symbolPriceTickerResponse2Inner = + (SymbolPriceTickerResponse2Inner) o; + return Objects.equals(this.symbol, symbolPriceTickerResponse2Inner.symbol) + && Objects.equals(this.price, symbolPriceTickerResponse2Inner.price) + && Objects.equals(this.time, symbolPriceTickerResponse2Inner.time); + } + + @Override + public int hashCode() { + return Objects.hash(symbol, price, time); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SymbolPriceTickerResponse2Inner {\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" price: ").append(toIndentedString(price)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object symbolValue = getSymbol(); + String symbolValueAsString = ""; + symbolValueAsString = symbolValue.toString(); + sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); + Object priceValue = getPrice(); + String priceValueAsString = ""; + priceValueAsString = priceValue.toString(); + sb.append("price=").append(urlEncode(priceValueAsString)).append(""); + Object timeValue = getTime(); + String timeValueAsString = ""; + timeValueAsString = timeValue.toString(); + sb.append("time=").append(urlEncode(timeValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("symbol"); + openapiFields.add("price"); + openapiFields.add("time"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SymbolPriceTickerResponse2Inner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SymbolPriceTickerResponse2Inner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SymbolPriceTickerResponse2Inner is not" + + " found in the empty JSON string", + SymbolPriceTickerResponse2Inner.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) + && !jsonObj.get("price").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `price` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("price").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SymbolPriceTickerResponse2Inner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SymbolPriceTickerResponse2Inner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(SymbolPriceTickerResponse2Inner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SymbolPriceTickerResponse2Inner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SymbolPriceTickerResponse2Inner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of SymbolPriceTickerResponse2Inner given an JSON string + * + * @param jsonString JSON string + * @return An instance of SymbolPriceTickerResponse2Inner + * @throws IOException if the JSON string is invalid with respect to + * SymbolPriceTickerResponse2Inner + */ + public static SymbolPriceTickerResponse2Inner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SymbolPriceTickerResponse2Inner.class); + } + + /** + * Convert an instance of SymbolPriceTickerResponse2Inner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerV2Response.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerV2Response.java index 39c4722fd..b3ebfeb5d 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerV2Response.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerV2Response.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolPriceTickerV2Response extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(SymbolPriceTickerV2Response.class.getName()); diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerV2Response1.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerV2Response1.java index 37688af32..e54e564a5 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerV2Response1.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerV2Response1.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SymbolPriceTickerV2Response1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolPriceTickerV2Response1 { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -62,7 +62,7 @@ public SymbolPriceTickerV2Response1 symbol(@jakarta.annotation.Nullable String s } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -81,7 +81,7 @@ public SymbolPriceTickerV2Response1 price(@jakarta.annotation.Nullable String pr } /** - * Get price + * Price. * * @return price */ @@ -100,7 +100,7 @@ public SymbolPriceTickerV2Response1 time(@jakarta.annotation.Nullable Long time) } /** - * Get time + * Transaction time * * @return time */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerV2Response2.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerV2Response2.java index 817044006..0c30e4d45 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerV2Response2.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerV2Response2.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,8 +34,8 @@ /** SymbolPriceTickerV2Response2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SymbolPriceTickerV2Response2 extends ArrayList { + comments = "Generator version: 7.22.0") +public class SymbolPriceTickerV2Response2 extends ArrayList { public SymbolPriceTickerV2Response2() {} @Override @@ -117,7 +117,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - SymbolPriceTickerV2Response2Inner.validateJsonElement(element); + SymbolPriceTickerResponse2Inner.validateJsonElement(element); } if (jsonElement == null) { if (!SymbolPriceTickerV2Response2.openapiRequiredFields diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerV2Response2Inner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerV2Response2Inner.java deleted file mode 100644 index 352e3d781..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/SymbolPriceTickerV2Response2Inner.java +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** SymbolPriceTickerV2Response2Inner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SymbolPriceTickerV2Response2Inner { - public static final String SERIALIZED_NAME_SYMBOL = "symbol"; - - @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nullable - private String symbol; - - public static final String SERIALIZED_NAME_PRICE = "price"; - - @SerializedName(SERIALIZED_NAME_PRICE) - @jakarta.annotation.Nullable - private String price; - - public static final String SERIALIZED_NAME_TIME = "time"; - - @SerializedName(SERIALIZED_NAME_TIME) - @jakarta.annotation.Nullable - private Long time; - - public SymbolPriceTickerV2Response2Inner() {} - - public SymbolPriceTickerV2Response2Inner symbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - return this; - } - - /** - * Get symbol - * - * @return symbol - */ - @jakarta.annotation.Nullable - public String getSymbol() { - return symbol; - } - - public void setSymbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - } - - public SymbolPriceTickerV2Response2Inner price(@jakarta.annotation.Nullable String price) { - this.price = price; - return this; - } - - /** - * Get price - * - * @return price - */ - @jakarta.annotation.Nullable - public String getPrice() { - return price; - } - - public void setPrice(@jakarta.annotation.Nullable String price) { - this.price = price; - } - - public SymbolPriceTickerV2Response2Inner time(@jakarta.annotation.Nullable Long time) { - this.time = time; - return this; - } - - /** - * Get time - * - * @return time - */ - @jakarta.annotation.Nullable - public Long getTime() { - return time; - } - - public void setTime(@jakarta.annotation.Nullable Long time) { - this.time = time; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SymbolPriceTickerV2Response2Inner symbolPriceTickerV2Response2Inner = - (SymbolPriceTickerV2Response2Inner) o; - return Objects.equals(this.symbol, symbolPriceTickerV2Response2Inner.symbol) - && Objects.equals(this.price, symbolPriceTickerV2Response2Inner.price) - && Objects.equals(this.time, symbolPriceTickerV2Response2Inner.time); - } - - @Override - public int hashCode() { - return Objects.hash(symbol, price, time); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SymbolPriceTickerV2Response2Inner {\n"); - sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); - sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" time: ").append(toIndentedString(time)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object symbolValue = getSymbol(); - String symbolValueAsString = ""; - symbolValueAsString = symbolValue.toString(); - sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); - Object priceValue = getPrice(); - String priceValueAsString = ""; - priceValueAsString = priceValue.toString(); - sb.append("price=").append(urlEncode(priceValueAsString)).append(""); - Object timeValue = getTime(); - String timeValueAsString = ""; - timeValueAsString = timeValue.toString(); - sb.append("time=").append(urlEncode(timeValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("symbol"); - openapiFields.add("price"); - openapiFields.add("time"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * SymbolPriceTickerV2Response2Inner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SymbolPriceTickerV2Response2Inner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SymbolPriceTickerV2Response2Inner is" - + " not found in the empty JSON string", - SymbolPriceTickerV2Response2Inner.openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) - && !jsonObj.get("symbol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `symbol` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("symbol").toString())); - } - if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) - && !jsonObj.get("price").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `price` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("price").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SymbolPriceTickerV2Response2Inner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SymbolPriceTickerV2Response2Inner' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(SymbolPriceTickerV2Response2Inner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SymbolPriceTickerV2Response2Inner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SymbolPriceTickerV2Response2Inner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SymbolPriceTickerV2Response2Inner given an JSON string - * - * @param jsonString JSON string - * @return An instance of SymbolPriceTickerV2Response2Inner - * @throws IOException if the JSON string is invalid with respect to - * SymbolPriceTickerV2Response2Inner - */ - public static SymbolPriceTickerV2Response2Inner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SymbolPriceTickerV2Response2Inner.class); - } - - /** - * Convert an instance of SymbolPriceTickerV2Response2Inner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TakerBuySellVolumeResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TakerBuySellVolumeResponse.java index 6919bd2b7..a385d5927 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TakerBuySellVolumeResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TakerBuySellVolumeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TakerBuySellVolumeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TakerBuySellVolumeResponse extends ArrayList { public TakerBuySellVolumeResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TakerBuySellVolumeResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TakerBuySellVolumeResponseInner.java index 83868405c..dc5a8e232 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TakerBuySellVolumeResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TakerBuySellVolumeResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TakerBuySellVolumeResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TakerBuySellVolumeResponseInner { public static final String SERIALIZED_NAME_BUY_SELL_RATIO = "buySellRatio"; @@ -58,7 +58,7 @@ public class TakerBuySellVolumeResponseInner { @SerializedName(SERIALIZED_NAME_TIMESTAMP) @jakarta.annotation.Nullable - private String timestamp; + private Long timestamp; public TakerBuySellVolumeResponseInner() {} @@ -120,23 +120,22 @@ public void setSellVol(@jakarta.annotation.Nullable String sellVol) { this.sellVol = sellVol; } - public TakerBuySellVolumeResponseInner timestamp( - @jakarta.annotation.Nullable String timestamp) { + public TakerBuySellVolumeResponseInner timestamp(@jakarta.annotation.Nullable Long timestamp) { this.timestamp = timestamp; return this; } /** - * Get timestamp + * Timestamp in milliseconds. * * @return timestamp */ @jakarta.annotation.Nullable - public String getTimestamp() { + public Long getTimestamp() { return timestamp; } - public void setTimestamp(@jakarta.annotation.Nullable String timestamp) { + public void setTimestamp(@jakarta.annotation.Nullable Long timestamp) { this.timestamp = timestamp; } @@ -272,14 +271,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("sellVol").toString())); } - if ((jsonObj.get("timestamp") != null && !jsonObj.get("timestamp").isJsonNull()) - && !jsonObj.get("timestamp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `timestamp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("timestamp").toString())); - } } 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/rest/model/TestOrderRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TestOrderRequest.java index ee90e2528..50c3f56a4 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TestOrderRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TestOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** TestOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TestOrderRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -59,13 +59,13 @@ public class TestOrderRequest { @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private String type; + private OrderType type; - public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; + public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; - @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) + @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) @jakarta.annotation.Nullable - private TimeInForce timeInForce; + private ReduceOnly reduceOnly = ReduceOnly.FALSE; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @@ -73,12 +73,6 @@ public class TestOrderRequest { @jakarta.annotation.Nullable private Double quantity; - public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; - - @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) - @jakarta.annotation.Nullable - private String reduceOnly; - public static final String SERIALIZED_NAME_PRICE = "price"; @SerializedName(SERIALIZED_NAME_PRICE) @@ -101,7 +95,7 @@ public class TestOrderRequest { @SerializedName(SERIALIZED_NAME_CLOSE_POSITION) @jakarta.annotation.Nullable - private String closePosition; + private ClosePosition closePosition; public static final String SERIALIZED_NAME_ACTIVATION_PRICE = "activationPrice"; @@ -115,23 +109,29 @@ public class TestOrderRequest { @jakarta.annotation.Nullable private Double callbackRate; + public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; + + @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) + @jakarta.annotation.Nullable + private TimeInForce timeInForce; + public static final String SERIALIZED_NAME_WORKING_TYPE = "workingType"; @SerializedName(SERIALIZED_NAME_WORKING_TYPE) @jakarta.annotation.Nullable - private WorkingType workingType; + private WorkingType workingType = WorkingType.CONTRACT_PRICE; public static final String SERIALIZED_NAME_PRICE_PROTECT = "priceProtect"; @SerializedName(SERIALIZED_NAME_PRICE_PROTECT) @jakarta.annotation.Nullable - private String priceProtect; + private PriceProtect priceProtect = PriceProtect.FALSE; public static final String SERIALIZED_NAME_NEW_ORDER_RESP_TYPE = "newOrderRespType"; @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESP_TYPE) @jakarta.annotation.Nullable - private NewOrderRespType newOrderRespType; + private NewOrderRespType newOrderRespType = NewOrderRespType.ACK; public static final String SERIALIZED_NAME_PRICE_MATCH = "priceMatch"; @@ -144,7 +144,7 @@ public class TestOrderRequest { @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) @jakarta.annotation.Nullable - private SelfTradePreventionMode selfTradePreventionMode; + private SelfTradePreventionMode selfTradePreventionMode = SelfTradePreventionMode.NONE; public static final String SERIALIZED_NAME_GOOD_TILL_DATE = "goodTillDate"; @@ -221,7 +221,7 @@ public void setPositionSide(@jakarta.annotation.Nullable PositionSide positionSi this.positionSide = positionSide; } - public TestOrderRequest type(@jakarta.annotation.Nonnull String type) { + public TestOrderRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -233,32 +233,33 @@ public TestOrderRequest type(@jakarta.annotation.Nonnull String type) { */ @jakarta.annotation.Nonnull @NotNull - public String getType() { + @Valid + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull String type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } - public TestOrderRequest timeInForce(@jakarta.annotation.Nullable TimeInForce timeInForce) { - this.timeInForce = timeInForce; + public TestOrderRequest reduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { + this.reduceOnly = reduceOnly; return this; } /** - * Get timeInForce + * Get reduceOnly * - * @return timeInForce + * @return reduceOnly */ @jakarta.annotation.Nullable @Valid - public TimeInForce getTimeInForce() { - return timeInForce; + public ReduceOnly getReduceOnly() { + return reduceOnly; } - public void setTimeInForce(@jakarta.annotation.Nullable TimeInForce timeInForce) { - this.timeInForce = timeInForce; + public void setReduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { + this.reduceOnly = reduceOnly; } public TestOrderRequest quantity(@jakarta.annotation.Nullable Double quantity) { @@ -267,7 +268,7 @@ public TestOrderRequest quantity(@jakarta.annotation.Nullable Double quantity) { } /** - * Get quantity + * Cannot be sent with `closePosition`=`true`(Close-All) * * @return quantity */ @@ -281,25 +282,6 @@ public void setQuantity(@jakarta.annotation.Nullable Double quantity) { this.quantity = quantity; } - public TestOrderRequest reduceOnly(@jakarta.annotation.Nullable String reduceOnly) { - this.reduceOnly = reduceOnly; - return this; - } - - /** - * Get reduceOnly - * - * @return reduceOnly - */ - @jakarta.annotation.Nullable - public String getReduceOnly() { - return reduceOnly; - } - - public void setReduceOnly(@jakarta.annotation.Nullable String reduceOnly) { - this.reduceOnly = reduceOnly; - } - public TestOrderRequest price(@jakarta.annotation.Nullable Double price) { this.price = price; return this; @@ -326,7 +308,8 @@ public TestOrderRequest newClientOrderId(@jakarta.annotation.Nullable String new } /** - * Get newClientOrderId + * A unique id among open orders. Automatically generated if not sent. Can only be string + * following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,36}$` * * @return newClientOrderId */ @@ -345,7 +328,7 @@ public TestOrderRequest stopPrice(@jakarta.annotation.Nullable Double stopPrice) } /** - * Get stopPrice + * Used with `STOP/STOP_MARKET` or `TAKE_PROFIT/TAKE_PROFIT_MARKET` orders. * * @return stopPrice */ @@ -359,7 +342,8 @@ public void setStopPrice(@jakarta.annotation.Nullable Double stopPrice) { this.stopPrice = stopPrice; } - public TestOrderRequest closePosition(@jakarta.annotation.Nullable String closePosition) { + public TestOrderRequest closePosition( + @jakarta.annotation.Nullable ClosePosition closePosition) { this.closePosition = closePosition; return this; } @@ -370,11 +354,12 @@ public TestOrderRequest closePosition(@jakarta.annotation.Nullable String closeP * @return closePosition */ @jakarta.annotation.Nullable - public String getClosePosition() { + @Valid + public ClosePosition getClosePosition() { return closePosition; } - public void setClosePosition(@jakarta.annotation.Nullable String closePosition) { + public void setClosePosition(@jakarta.annotation.Nullable ClosePosition closePosition) { this.closePosition = closePosition; } @@ -384,7 +369,8 @@ public TestOrderRequest activationPrice(@jakarta.annotation.Nullable Double acti } /** - * Get activationPrice + * Used with `TRAILING_STOP_MARKET` orders, default as the latest price(supporting + * different `workingType`) * * @return activationPrice */ @@ -404,12 +390,14 @@ public TestOrderRequest callbackRate(@jakarta.annotation.Nullable Double callbac } /** - * Get callbackRate + * Used with `TRAILING_STOP_MARKET` orders minimum: 0.1 maximum: 5 * * @return callbackRate */ @jakarta.annotation.Nullable @Valid + @DecimalMin("0.1") + @DecimalMax("5") public Double getCallbackRate() { return callbackRate; } @@ -418,6 +406,26 @@ public void setCallbackRate(@jakarta.annotation.Nullable Double callbackRate) { this.callbackRate = callbackRate; } + public TestOrderRequest timeInForce(@jakarta.annotation.Nullable TimeInForce timeInForce) { + this.timeInForce = timeInForce; + return this; + } + + /** + * Get timeInForce + * + * @return timeInForce + */ + @jakarta.annotation.Nullable + @Valid + public TimeInForce getTimeInForce() { + return timeInForce; + } + + public void setTimeInForce(@jakarta.annotation.Nullable TimeInForce timeInForce) { + this.timeInForce = timeInForce; + } + public TestOrderRequest workingType(@jakarta.annotation.Nullable WorkingType workingType) { this.workingType = workingType; return this; @@ -438,7 +446,7 @@ public void setWorkingType(@jakarta.annotation.Nullable WorkingType workingType) this.workingType = workingType; } - public TestOrderRequest priceProtect(@jakarta.annotation.Nullable String priceProtect) { + public TestOrderRequest priceProtect(@jakarta.annotation.Nullable PriceProtect priceProtect) { this.priceProtect = priceProtect; return this; } @@ -449,11 +457,12 @@ public TestOrderRequest priceProtect(@jakarta.annotation.Nullable String pricePr * @return priceProtect */ @jakarta.annotation.Nullable - public String getPriceProtect() { + @Valid + public PriceProtect getPriceProtect() { return priceProtect; } - public void setPriceProtect(@jakarta.annotation.Nullable String priceProtect) { + public void setPriceProtect(@jakarta.annotation.Nullable PriceProtect priceProtect) { this.priceProtect = priceProtect; } @@ -527,7 +536,10 @@ public TestOrderRequest goodTillDate(@jakarta.annotation.Nullable Long goodTillD } /** - * Get goodTillDate + * order cancel time for timeInForce `GTD`, mandatory when `timeInforce` set + * to `GTD`; order the timestamp only retains second-level precision, ms part will be + * ignored; The goodTillDate timestamp must be greater than the current time plus 600 seconds + * and smaller than 253402300799000 * * @return goodTillDate */ @@ -572,15 +584,15 @@ public boolean equals(Object o) { && Objects.equals(this.side, testOrderRequest.side) && Objects.equals(this.positionSide, testOrderRequest.positionSide) && Objects.equals(this.type, testOrderRequest.type) - && Objects.equals(this.timeInForce, testOrderRequest.timeInForce) - && Objects.equals(this.quantity, testOrderRequest.quantity) && Objects.equals(this.reduceOnly, testOrderRequest.reduceOnly) + && Objects.equals(this.quantity, testOrderRequest.quantity) && Objects.equals(this.price, testOrderRequest.price) && Objects.equals(this.newClientOrderId, testOrderRequest.newClientOrderId) && Objects.equals(this.stopPrice, testOrderRequest.stopPrice) && Objects.equals(this.closePosition, testOrderRequest.closePosition) && Objects.equals(this.activationPrice, testOrderRequest.activationPrice) && Objects.equals(this.callbackRate, testOrderRequest.callbackRate) + && Objects.equals(this.timeInForce, testOrderRequest.timeInForce) && Objects.equals(this.workingType, testOrderRequest.workingType) && Objects.equals(this.priceProtect, testOrderRequest.priceProtect) && Objects.equals(this.newOrderRespType, testOrderRequest.newOrderRespType) @@ -598,15 +610,15 @@ public int hashCode() { side, positionSide, type, - timeInForce, - quantity, reduceOnly, + quantity, price, newClientOrderId, stopPrice, closePosition, activationPrice, callbackRate, + timeInForce, workingType, priceProtect, newOrderRespType, @@ -624,15 +636,15 @@ public String toString() { sb.append(" side: ").append(toIndentedString(side)).append("\n"); sb.append(" positionSide: ").append(toIndentedString(positionSide)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" newClientOrderId: ").append(toIndentedString(newClientOrderId)).append("\n"); sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); sb.append(" closePosition: ").append(toIndentedString(closePosition)).append("\n"); sb.append(" activationPrice: ").append(toIndentedString(activationPrice)).append("\n"); sb.append(" callbackRate: ").append(toIndentedString(callbackRate)).append("\n"); + sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" workingType: ").append(toIndentedString(workingType)).append("\n"); sb.append(" priceProtect: ").append(toIndentedString(priceProtect)).append("\n"); sb.append(" newOrderRespType: ").append(toIndentedString(newOrderRespType)).append("\n"); @@ -665,18 +677,14 @@ public String toUrlQueryString() { String typeValueAsString = ""; typeValueAsString = typeValue.toString(); sb.append("type=").append(urlEncode(typeValueAsString)).append(""); - Object timeInForceValue = getTimeInForce(); - String timeInForceValueAsString = ""; - timeInForceValueAsString = timeInForceValue.toString(); - sb.append("timeInForce=").append(urlEncode(timeInForceValueAsString)).append(""); - Object quantityValue = getQuantity(); - String quantityValueAsString = ""; - quantityValueAsString = quantityValue.toString(); - sb.append("quantity=").append(urlEncode(quantityValueAsString)).append(""); Object reduceOnlyValue = getReduceOnly(); String reduceOnlyValueAsString = ""; reduceOnlyValueAsString = reduceOnlyValue.toString(); sb.append("reduceOnly=").append(urlEncode(reduceOnlyValueAsString)).append(""); + Object quantityValue = getQuantity(); + String quantityValueAsString = ""; + quantityValueAsString = quantityValue.toString(); + sb.append("quantity=").append(urlEncode(quantityValueAsString)).append(""); Object priceValue = getPrice(); String priceValueAsString = ""; priceValueAsString = priceValue.toString(); @@ -701,6 +709,10 @@ public String toUrlQueryString() { String callbackRateValueAsString = ""; callbackRateValueAsString = callbackRateValue.toString(); sb.append("callbackRate=").append(urlEncode(callbackRateValueAsString)).append(""); + Object timeInForceValue = getTimeInForce(); + String timeInForceValueAsString = ""; + timeInForceValueAsString = timeInForceValue.toString(); + sb.append("timeInForce=").append(urlEncode(timeInForceValueAsString)).append(""); Object workingTypeValue = getWorkingType(); String workingTypeValueAsString = ""; workingTypeValueAsString = workingTypeValue.toString(); @@ -763,15 +775,15 @@ private String toIndentedString(Object o) { openapiFields.add("side"); openapiFields.add("positionSide"); openapiFields.add("type"); - openapiFields.add("timeInForce"); - openapiFields.add("quantity"); openapiFields.add("reduceOnly"); + openapiFields.add("quantity"); openapiFields.add("price"); openapiFields.add("newClientOrderId"); openapiFields.add("stopPrice"); openapiFields.add("closePosition"); openapiFields.add("activationPrice"); openapiFields.add("callbackRate"); + openapiFields.add("timeInForce"); openapiFields.add("workingType"); openapiFields.add("priceProtect"); openapiFields.add("newOrderRespType"); @@ -828,24 +840,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) { PositionSide.validateJsonElement(jsonObj.get("positionSide")); } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `timeInForce` - if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { - TimeInForce.validateJsonElement(jsonObj.get("timeInForce")); - } - if ((jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) - && !jsonObj.get("reduceOnly").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reduceOnly` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reduceOnly").toString())); + // validate the required field `type` + OrderType.validateJsonElement(jsonObj.get("type")); + // validate the optional field `reduceOnly` + if (jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) { + ReduceOnly.validateJsonElement(jsonObj.get("reduceOnly")); } if ((jsonObj.get("newClientOrderId") != null && !jsonObj.get("newClientOrderId").isJsonNull()) @@ -856,25 +855,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " JSON string but got `%s`", jsonObj.get("newClientOrderId").toString())); } - if ((jsonObj.get("closePosition") != null && !jsonObj.get("closePosition").isJsonNull()) - && !jsonObj.get("closePosition").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `closePosition` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("closePosition").toString())); + // validate the optional field `closePosition` + if (jsonObj.get("closePosition") != null && !jsonObj.get("closePosition").isJsonNull()) { + ClosePosition.validateJsonElement(jsonObj.get("closePosition")); + } + // validate the optional field `timeInForce` + if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { + TimeInForce.validateJsonElement(jsonObj.get("timeInForce")); } // validate the optional field `workingType` if (jsonObj.get("workingType") != null && !jsonObj.get("workingType").isJsonNull()) { WorkingType.validateJsonElement(jsonObj.get("workingType")); } - if ((jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) - && !jsonObj.get("priceProtect").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `priceProtect` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("priceProtect").toString())); + // validate the optional field `priceProtect` + if (jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) { + PriceProtect.validateJsonElement(jsonObj.get("priceProtect")); } // validate the optional field `newOrderRespType` if (jsonObj.get("newOrderRespType") != null diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TestOrderResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TestOrderResponse.java index bf306e6e0..e01c5ac08 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TestOrderResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TestOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TestOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TestOrderResponse { public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -201,7 +201,7 @@ public TestOrderResponse clientOrderId(@jakarta.annotation.Nullable String clien } /** - * Get clientOrderId + * Client Order Id. * * @return clientOrderId */ @@ -239,7 +239,7 @@ public TestOrderResponse cumQuote(@jakarta.annotation.Nullable String cumQuote) } /** - * Get cumQuote + * Cum Quote. * * @return cumQuote */ @@ -258,7 +258,7 @@ public TestOrderResponse executedQty(@jakarta.annotation.Nullable String execute } /** - * Get executedQty + * Executed Qty. * * @return executedQty */ @@ -277,7 +277,7 @@ public TestOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Order Id. * * @return orderId */ @@ -296,7 +296,7 @@ public TestOrderResponse avgPrice(@jakarta.annotation.Nullable String avgPrice) } /** - * Get avgPrice + * Avg Price. * * @return avgPrice */ @@ -315,7 +315,7 @@ public TestOrderResponse origQty(@jakarta.annotation.Nullable String origQty) { } /** - * Get origQty + * Orig Qty. * * @return origQty */ @@ -334,7 +334,7 @@ public TestOrderResponse price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Price. * * @return price */ @@ -353,7 +353,7 @@ public TestOrderResponse reduceOnly(@jakarta.annotation.Nullable Boolean reduceO } /** - * Get reduceOnly + * Reduce Only. * * @return reduceOnly */ @@ -372,7 +372,7 @@ public TestOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * Side. * * @return side */ @@ -391,7 +391,7 @@ public TestOrderResponse positionSide(@jakarta.annotation.Nullable String positi } /** - * Get positionSide + * Position Side. * * @return positionSide */ @@ -410,7 +410,7 @@ public TestOrderResponse status(@jakarta.annotation.Nullable String status) { } /** - * Get status + * Status. * * @return status */ @@ -429,7 +429,7 @@ public TestOrderResponse stopPrice(@jakarta.annotation.Nullable String stopPrice } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -448,7 +448,7 @@ public TestOrderResponse closePosition(@jakarta.annotation.Nullable Boolean clos } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -467,7 +467,7 @@ public TestOrderResponse symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -486,7 +486,7 @@ public TestOrderResponse timeInForce(@jakarta.annotation.Nullable String timeInF } /** - * Get timeInForce + * Time In Force. * * @return timeInForce */ @@ -505,7 +505,7 @@ public TestOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * Type. * * @return type */ @@ -524,7 +524,7 @@ public TestOrderResponse origType(@jakarta.annotation.Nullable String origType) } /** - * Get origType + * Orig Type. * * @return origType */ @@ -543,7 +543,7 @@ public TestOrderResponse activatePrice(@jakarta.annotation.Nullable String activ } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -562,7 +562,7 @@ public TestOrderResponse priceRate(@jakarta.annotation.Nullable String priceRate } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -581,7 +581,7 @@ public TestOrderResponse updateTime(@jakarta.annotation.Nullable Long updateTime } /** - * Get updateTime + * Update Time. * * @return updateTime */ @@ -600,7 +600,7 @@ public TestOrderResponse workingType(@jakarta.annotation.Nullable String working } /** - * Get workingType + * Working Type. * * @return workingType */ @@ -619,7 +619,7 @@ public TestOrderResponse priceProtect(@jakarta.annotation.Nullable Boolean price } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -638,7 +638,7 @@ public TestOrderResponse priceMatch(@jakarta.annotation.Nullable String priceMat } /** - * Get priceMatch + * price match mode * * @return priceMatch */ @@ -658,7 +658,7 @@ public TestOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self trading preventation mode * * @return selfTradePreventionMode */ @@ -678,7 +678,7 @@ public TestOrderResponse goodTillDate(@jakarta.annotation.Nullable Long goodTill } /** - * Get goodTillDate + * order pre-set auot cancel time for TIF GTD order * * @return goodTillDate */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse.java index 0d5cc49e6..8af954b81 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrPriceChangeStatisticsResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(Ticker24hrPriceChangeStatisticsResponse.class.getName()); diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse1.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse1.java index ef82cb8b5..d5eb83cf8 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse1.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** Ticker24hrPriceChangeStatisticsResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrPriceChangeStatisticsResponse1 { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -161,7 +161,7 @@ public Ticker24hrPriceChangeStatisticsResponse1 priceChange( } /** - * Get priceChange + * Price Change. * * @return priceChange */ @@ -181,7 +181,7 @@ public Ticker24hrPriceChangeStatisticsResponse1 priceChangePercent( } /** - * Get priceChangePercent + * Price Change Percent. * * @return priceChangePercent */ @@ -201,7 +201,7 @@ public Ticker24hrPriceChangeStatisticsResponse1 weightedAvgPrice( } /** - * Get weightedAvgPrice + * Weighted Avg Price. * * @return weightedAvgPrice */ @@ -221,7 +221,7 @@ public Ticker24hrPriceChangeStatisticsResponse1 lastPrice( } /** - * Get lastPrice + * Last Price. * * @return lastPrice */ @@ -241,7 +241,7 @@ public Ticker24hrPriceChangeStatisticsResponse1 lastQty( } /** - * Get lastQty + * Last Qty. * * @return lastQty */ @@ -261,7 +261,7 @@ public Ticker24hrPriceChangeStatisticsResponse1 openPrice( } /** - * Get openPrice + * Open Price. * * @return openPrice */ @@ -281,7 +281,7 @@ public Ticker24hrPriceChangeStatisticsResponse1 highPrice( } /** - * Get highPrice + * High Price. * * @return highPrice */ @@ -301,7 +301,7 @@ public Ticker24hrPriceChangeStatisticsResponse1 lowPrice( } /** - * Get lowPrice + * Low Price. * * @return lowPrice */ @@ -321,7 +321,7 @@ public Ticker24hrPriceChangeStatisticsResponse1 volume( } /** - * Get volume + * Volume. * * @return volume */ @@ -341,7 +341,7 @@ public Ticker24hrPriceChangeStatisticsResponse1 quoteVolume( } /** - * Get quoteVolume + * Quote Volume. * * @return quoteVolume */ @@ -361,7 +361,7 @@ public Ticker24hrPriceChangeStatisticsResponse1 openTime( } /** - * Get openTime + * Open Time. * * @return openTime */ @@ -381,7 +381,7 @@ public Ticker24hrPriceChangeStatisticsResponse1 closeTime( } /** - * Get closeTime + * Close Time. * * @return closeTime */ @@ -401,7 +401,7 @@ public Ticker24hrPriceChangeStatisticsResponse1 firstId( } /** - * Get firstId + * First tradeId * * @return firstId */ @@ -421,7 +421,7 @@ public Ticker24hrPriceChangeStatisticsResponse1 lastId( } /** - * Get lastId + * Last tradeId * * @return lastId */ @@ -440,7 +440,7 @@ public Ticker24hrPriceChangeStatisticsResponse1 count(@jakarta.annotation.Nullab } /** - * Get count + * Trade count * * @return count */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse2.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse2.java index 2166d36b9..f0b9ab579 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse2.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** Ticker24hrPriceChangeStatisticsResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrPriceChangeStatisticsResponse2 extends ArrayList { public Ticker24hrPriceChangeStatisticsResponse2() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse2Inner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse2Inner.java index a32c6f3a6..478fb7aa1 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse2Inner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/Ticker24hrPriceChangeStatisticsResponse2Inner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** Ticker24hrPriceChangeStatisticsResponse2Inner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrPriceChangeStatisticsResponse2Inner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -161,7 +161,7 @@ public Ticker24hrPriceChangeStatisticsResponse2Inner priceChange( } /** - * Get priceChange + * Price Change. * * @return priceChange */ @@ -181,7 +181,7 @@ public Ticker24hrPriceChangeStatisticsResponse2Inner priceChangePercent( } /** - * Get priceChangePercent + * Price Change Percent. * * @return priceChangePercent */ @@ -201,7 +201,7 @@ public Ticker24hrPriceChangeStatisticsResponse2Inner weightedAvgPrice( } /** - * Get weightedAvgPrice + * Weighted Avg Price. * * @return weightedAvgPrice */ @@ -221,7 +221,7 @@ public Ticker24hrPriceChangeStatisticsResponse2Inner lastPrice( } /** - * Get lastPrice + * Last Price. * * @return lastPrice */ @@ -241,7 +241,7 @@ public Ticker24hrPriceChangeStatisticsResponse2Inner lastQty( } /** - * Get lastQty + * Last Qty. * * @return lastQty */ @@ -261,7 +261,7 @@ public Ticker24hrPriceChangeStatisticsResponse2Inner openPrice( } /** - * Get openPrice + * Open Price. * * @return openPrice */ @@ -281,7 +281,7 @@ public Ticker24hrPriceChangeStatisticsResponse2Inner highPrice( } /** - * Get highPrice + * High Price. * * @return highPrice */ @@ -301,7 +301,7 @@ public Ticker24hrPriceChangeStatisticsResponse2Inner lowPrice( } /** - * Get lowPrice + * Low Price. * * @return lowPrice */ @@ -321,7 +321,7 @@ public Ticker24hrPriceChangeStatisticsResponse2Inner volume( } /** - * Get volume + * Volume. * * @return volume */ @@ -341,7 +341,7 @@ public Ticker24hrPriceChangeStatisticsResponse2Inner quoteVolume( } /** - * Get quoteVolume + * Quote Volume. * * @return quoteVolume */ @@ -361,7 +361,7 @@ public Ticker24hrPriceChangeStatisticsResponse2Inner openTime( } /** - * Get openTime + * Open Time. * * @return openTime */ @@ -381,7 +381,7 @@ public Ticker24hrPriceChangeStatisticsResponse2Inner closeTime( } /** - * Get closeTime + * Close Time. * * @return closeTime */ @@ -401,7 +401,7 @@ public Ticker24hrPriceChangeStatisticsResponse2Inner firstId( } /** - * Get firstId + * First tradeId * * @return firstId */ @@ -421,7 +421,7 @@ public Ticker24hrPriceChangeStatisticsResponse2Inner lastId( } /** - * Get lastId + * Last tradeId * * @return lastId */ @@ -441,7 +441,7 @@ public Ticker24hrPriceChangeStatisticsResponse2Inner count( } /** - * Get count + * Trade count * * @return count */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TimeInForce.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TimeInForce.java index d6110d058..f263dddde 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TimeInForce.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ToggleBnbBurnOnFuturesTradeRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ToggleBnbBurnOnFuturesTradeRequest.java index b54f2e051..9ee900b94 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ToggleBnbBurnOnFuturesTradeRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ToggleBnbBurnOnFuturesTradeRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ToggleBnbBurnOnFuturesTradeRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ToggleBnbBurnOnFuturesTradeRequest { public static final String SERIALIZED_NAME_FEE_BURN = "feeBurn"; @@ -56,7 +56,7 @@ public ToggleBnbBurnOnFuturesTradeRequest feeBurn(@jakarta.annotation.Nonnull St } /** - * Get feeBurn + * \"true\": Fee Discount On; \"false\": Fee Discount Off * * @return feeBurn */ @@ -77,11 +77,12 @@ public ToggleBnbBurnOnFuturesTradeRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ToggleBnbBurnOnFuturesTradeResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ToggleBnbBurnOnFuturesTradeResponse.java index fafd07b27..e62a3cb98 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ToggleBnbBurnOnFuturesTradeResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/ToggleBnbBurnOnFuturesTradeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ToggleBnbBurnOnFuturesTradeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ToggleBnbBurnOnFuturesTradeResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TopTraderLongShortRatioAccountsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TopTraderLongShortRatioAccountsResponse.java index 0de927d3a..a92c102ed 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TopTraderLongShortRatioAccountsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TopTraderLongShortRatioAccountsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TopTraderLongShortRatioAccountsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TopTraderLongShortRatioAccountsResponse extends ArrayList { public TopTraderLongShortRatioAccountsResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TopTraderLongShortRatioAccountsResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TopTraderLongShortRatioAccountsResponseInner.java index e9dc0dffc..49daed9e6 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TopTraderLongShortRatioAccountsResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TopTraderLongShortRatioAccountsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TopTraderLongShortRatioAccountsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TopTraderLongShortRatioAccountsResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -64,7 +64,7 @@ public class TopTraderLongShortRatioAccountsResponseInner { @SerializedName(SERIALIZED_NAME_TIMESTAMP) @jakarta.annotation.Nullable - private String timestamp; + private Long timestamp; public TopTraderLongShortRatioAccountsResponseInner() {} @@ -95,7 +95,7 @@ public TopTraderLongShortRatioAccountsResponseInner longShortRatio( } /** - * Get longShortRatio + * long/short account num ratio of top traders * * @return longShortRatio */ @@ -115,7 +115,7 @@ public TopTraderLongShortRatioAccountsResponseInner longAccount( } /** - * Get longAccount + * long account num ratio of top traders * * @return longAccount */ @@ -135,7 +135,7 @@ public TopTraderLongShortRatioAccountsResponseInner shortAccount( } /** - * Get shortAccount + * long account num ratio of top traders * * @return shortAccount */ @@ -149,22 +149,22 @@ public void setShortAccount(@jakarta.annotation.Nullable String shortAccount) { } public TopTraderLongShortRatioAccountsResponseInner timestamp( - @jakarta.annotation.Nullable String timestamp) { + @jakarta.annotation.Nullable Long timestamp) { this.timestamp = timestamp; return this; } /** - * Get timestamp + * Timestamp in milliseconds. * * @return timestamp */ @jakarta.annotation.Nullable - public String getTimestamp() { + public Long getTimestamp() { return timestamp; } - public void setTimestamp(@jakarta.annotation.Nullable String timestamp) { + public void setTimestamp(@jakarta.annotation.Nullable Long timestamp) { this.timestamp = timestamp; } @@ -323,14 +323,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("shortAccount").toString())); } - if ((jsonObj.get("timestamp") != null && !jsonObj.get("timestamp").isJsonNull()) - && !jsonObj.get("timestamp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `timestamp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("timestamp").toString())); - } } 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/rest/model/TopTraderLongShortRatioPositionsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TopTraderLongShortRatioPositionsResponse.java index 97649decd..09ddffdc2 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TopTraderLongShortRatioPositionsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TopTraderLongShortRatioPositionsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TopTraderLongShortRatioPositionsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TopTraderLongShortRatioPositionsResponse extends ArrayList { public TopTraderLongShortRatioPositionsResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TopTraderLongShortRatioPositionsResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TopTraderLongShortRatioPositionsResponseInner.java index 1b99ce501..45229e78b 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TopTraderLongShortRatioPositionsResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TopTraderLongShortRatioPositionsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TopTraderLongShortRatioPositionsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TopTraderLongShortRatioPositionsResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -64,7 +64,7 @@ public class TopTraderLongShortRatioPositionsResponseInner { @SerializedName(SERIALIZED_NAME_TIMESTAMP) @jakarta.annotation.Nullable - private String timestamp; + private Long timestamp; public TopTraderLongShortRatioPositionsResponseInner() {} @@ -95,7 +95,7 @@ public TopTraderLongShortRatioPositionsResponseInner longShortRatio( } /** - * Get longShortRatio + * long/short position ratio of top traders * * @return longShortRatio */ @@ -115,7 +115,7 @@ public TopTraderLongShortRatioPositionsResponseInner longAccount( } /** - * Get longAccount + * long positions ratio of top traders * * @return longAccount */ @@ -135,7 +135,7 @@ public TopTraderLongShortRatioPositionsResponseInner shortAccount( } /** - * Get shortAccount + * short positions ratio of top traders * * @return shortAccount */ @@ -149,22 +149,22 @@ public void setShortAccount(@jakarta.annotation.Nullable String shortAccount) { } public TopTraderLongShortRatioPositionsResponseInner timestamp( - @jakarta.annotation.Nullable String timestamp) { + @jakarta.annotation.Nullable Long timestamp) { this.timestamp = timestamp; return this; } /** - * Get timestamp + * Timestamp in milliseconds. * * @return timestamp */ @jakarta.annotation.Nullable - public String getTimestamp() { + public Long getTimestamp() { return timestamp; } - public void setTimestamp(@jakarta.annotation.Nullable String timestamp) { + public void setTimestamp(@jakarta.annotation.Nullable Long timestamp) { this.timestamp = timestamp; } @@ -324,14 +324,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("shortAccount").toString())); } - if ((jsonObj.get("timestamp") != null && !jsonObj.get("timestamp").isJsonNull()) - && !jsonObj.get("timestamp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `timestamp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("timestamp").toString())); - } } 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/rest/model/TradingScheduleResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponse.java index 419198c76..1c6ac0968 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** TradingScheduleResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradingScheduleResponse { public static final String SERIALIZED_NAME_UPDATE_TIME = "updateTime"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedules.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedules.java index 80821e58b..037d1be8b 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedules.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedules.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** TradingScheduleResponseMarketSchedules */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradingScheduleResponseMarketSchedules { public static final String SERIALIZED_NAME_E_Q_U_I_T_Y = "EQUITY"; @@ -49,6 +49,18 @@ public class TradingScheduleResponseMarketSchedules { @jakarta.annotation.Nullable private TradingScheduleResponseMarketSchedulesCOMMODITY COMMODITY; + public static final String SERIALIZED_NAME_K_R_E_Q_U_I_T_Y = "KR_EQUITY"; + + @SerializedName(SERIALIZED_NAME_K_R_E_Q_U_I_T_Y) + @jakarta.annotation.Nullable + private TradingScheduleResponseMarketSchedulesKREQUITY KR_EQUITY; + + public static final String SERIALIZED_NAME_H_K_E_Q_U_I_T_Y = "HK_EQUITY"; + + @SerializedName(SERIALIZED_NAME_H_K_E_Q_U_I_T_Y) + @jakarta.annotation.Nullable + private TradingScheduleResponseMarketSchedulesHKEQUITY HK_EQUITY; + public TradingScheduleResponseMarketSchedules() {} public TradingScheduleResponseMarketSchedules EQUITY( @@ -97,6 +109,50 @@ public void setCOMMODITY( this.COMMODITY = COMMODITY; } + public TradingScheduleResponseMarketSchedules KR_EQUITY( + @jakarta.annotation.Nullable TradingScheduleResponseMarketSchedulesKREQUITY KR_EQUITY) { + this.KR_EQUITY = KR_EQUITY; + return this; + } + + /** + * Get KR_EQUITY + * + * @return KR_EQUITY + */ + @jakarta.annotation.Nullable + @Valid + public TradingScheduleResponseMarketSchedulesKREQUITY getKREQUITY() { + return KR_EQUITY; + } + + public void setKREQUITY( + @jakarta.annotation.Nullable TradingScheduleResponseMarketSchedulesKREQUITY KR_EQUITY) { + this.KR_EQUITY = KR_EQUITY; + } + + public TradingScheduleResponseMarketSchedules HK_EQUITY( + @jakarta.annotation.Nullable TradingScheduleResponseMarketSchedulesHKEQUITY HK_EQUITY) { + this.HK_EQUITY = HK_EQUITY; + return this; + } + + /** + * Get HK_EQUITY + * + * @return HK_EQUITY + */ + @jakarta.annotation.Nullable + @Valid + public TradingScheduleResponseMarketSchedulesHKEQUITY getHKEQUITY() { + return HK_EQUITY; + } + + public void setHKEQUITY( + @jakarta.annotation.Nullable TradingScheduleResponseMarketSchedulesHKEQUITY HK_EQUITY) { + this.HK_EQUITY = HK_EQUITY; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -108,12 +164,14 @@ public boolean equals(Object o) { TradingScheduleResponseMarketSchedules tradingScheduleResponseMarketSchedules = (TradingScheduleResponseMarketSchedules) o; return Objects.equals(this.EQUITY, tradingScheduleResponseMarketSchedules.EQUITY) - && Objects.equals(this.COMMODITY, tradingScheduleResponseMarketSchedules.COMMODITY); + && Objects.equals(this.COMMODITY, tradingScheduleResponseMarketSchedules.COMMODITY) + && Objects.equals(this.KR_EQUITY, tradingScheduleResponseMarketSchedules.KR_EQUITY) + && Objects.equals(this.HK_EQUITY, tradingScheduleResponseMarketSchedules.HK_EQUITY); } @Override public int hashCode() { - return Objects.hash(EQUITY, COMMODITY); + return Objects.hash(EQUITY, COMMODITY, KR_EQUITY, HK_EQUITY); } @Override @@ -122,6 +180,8 @@ public String toString() { sb.append("class TradingScheduleResponseMarketSchedules {\n"); sb.append(" EQUITY: ").append(toIndentedString(EQUITY)).append("\n"); sb.append(" COMMODITY: ").append(toIndentedString(COMMODITY)).append("\n"); + sb.append(" KR_EQUITY: ").append(toIndentedString(KR_EQUITY)).append("\n"); + sb.append(" HK_EQUITY: ").append(toIndentedString(HK_EQUITY)).append("\n"); sb.append("}"); return sb.toString(); } @@ -137,6 +197,14 @@ public String toUrlQueryString() { String COMMODITYValueAsString = ""; COMMODITYValueAsString = COMMODITYValue.toString(); sb.append("COMMODITY=").append(urlEncode(COMMODITYValueAsString)).append(""); + Object KR_EQUITYValue = getKREQUITY(); + String KR_EQUITYValueAsString = ""; + KR_EQUITYValueAsString = KR_EQUITYValue.toString(); + sb.append("KR_EQUITY=").append(urlEncode(KR_EQUITYValueAsString)).append(""); + Object HK_EQUITYValue = getHKEQUITY(); + String HK_EQUITYValueAsString = ""; + HK_EQUITYValueAsString = HK_EQUITYValue.toString(); + sb.append("HK_EQUITY=").append(urlEncode(HK_EQUITYValueAsString)).append(""); return sb.toString(); } @@ -167,6 +235,8 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("EQUITY"); openapiFields.add("COMMODITY"); + openapiFields.add("KR_EQUITY"); + openapiFields.add("HK_EQUITY"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -201,6 +271,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti TradingScheduleResponseMarketSchedulesCOMMODITY.validateJsonElement( jsonObj.get("COMMODITY")); } + // validate the optional field `KR_EQUITY` + if (jsonObj.get("KR_EQUITY") != null && !jsonObj.get("KR_EQUITY").isJsonNull()) { + TradingScheduleResponseMarketSchedulesKREQUITY.validateJsonElement( + jsonObj.get("KR_EQUITY")); + } + // validate the optional field `HK_EQUITY` + if (jsonObj.get("HK_EQUITY") != null && !jsonObj.get("HK_EQUITY").isJsonNull()) { + TradingScheduleResponseMarketSchedulesHKEQUITY.validateJsonElement( + jsonObj.get("HK_EQUITY")); + } } 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/rest/model/TradingScheduleResponseMarketSchedulesCOMMODITY.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesCOMMODITY.java index 66144340f..82bca6fb9 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesCOMMODITY.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesCOMMODITY.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** TradingScheduleResponseMarketSchedulesCOMMODITY */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradingScheduleResponseMarketSchedulesCOMMODITY { public static final String SERIALIZED_NAME_SESSIONS = "sessions"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesCOMMODITYSessionsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesCOMMODITYSessionsInner.java index 34a532cbb..65f957be2 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesCOMMODITYSessionsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesCOMMODITYSessionsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TradingScheduleResponseMarketSchedulesCOMMODITYSessionsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradingScheduleResponseMarketSchedulesCOMMODITYSessionsInner { public static final String SERIALIZED_NAME_START_TIME = "startTime"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesEQUITY.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesEQUITY.java index 311a6afa2..01ec9e660 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesEQUITY.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesEQUITY.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** TradingScheduleResponseMarketSchedulesEQUITY */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradingScheduleResponseMarketSchedulesEQUITY { public static final String SERIALIZED_NAME_SESSIONS = "sessions"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesEQUITYSessionsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesEQUITYSessionsInner.java index 199e7a7d6..915969e98 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesEQUITYSessionsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesEQUITYSessionsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TradingScheduleResponseMarketSchedulesEQUITYSessionsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradingScheduleResponseMarketSchedulesEQUITYSessionsInner { public static final String SERIALIZED_NAME_START_TIME = "startTime"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesHKEQUITY.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesHKEQUITY.java new file mode 100644 index 000000000..919847ad7 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesHKEQUITY.java @@ -0,0 +1,263 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** TradingScheduleResponseMarketSchedulesHKEQUITY */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class TradingScheduleResponseMarketSchedulesHKEQUITY { + public static final String SERIALIZED_NAME_SESSIONS = "sessions"; + + @SerializedName(SERIALIZED_NAME_SESSIONS) + @jakarta.annotation.Nullable + private List<@Valid TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner> sessions; + + public TradingScheduleResponseMarketSchedulesHKEQUITY() {} + + public TradingScheduleResponseMarketSchedulesHKEQUITY sessions( + @jakarta.annotation.Nullable + List<@Valid TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner> + sessions) { + this.sessions = sessions; + return this; + } + + public TradingScheduleResponseMarketSchedulesHKEQUITY addSessionsItem( + TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner sessionsItem) { + if (this.sessions == null) { + this.sessions = new ArrayList<>(); + } + this.sessions.add(sessionsItem); + return this; + } + + /** + * Get sessions + * + * @return sessions + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner> getSessions() { + return sessions; + } + + public void setSessions( + @jakarta.annotation.Nullable + List<@Valid TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner> + sessions) { + this.sessions = sessions; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TradingScheduleResponseMarketSchedulesHKEQUITY + tradingScheduleResponseMarketSchedulesHKEQUITY = + (TradingScheduleResponseMarketSchedulesHKEQUITY) o; + return Objects.equals( + this.sessions, tradingScheduleResponseMarketSchedulesHKEQUITY.sessions); + } + + @Override + public int hashCode() { + return Objects.hash(sessions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TradingScheduleResponseMarketSchedulesHKEQUITY {\n"); + sb.append(" sessions: ").append(toIndentedString(sessions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object sessionsValue = getSessions(); + String sessionsValueAsString = ""; + sessionsValueAsString = + (String) + ((Collection) sessionsValue) + .stream().map(Object::toString).collect(Collectors.joining(",")); + sb.append("sessions=").append(urlEncode(sessionsValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("sessions"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * TradingScheduleResponseMarketSchedulesHKEQUITY + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TradingScheduleResponseMarketSchedulesHKEQUITY.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " TradingScheduleResponseMarketSchedulesHKEQUITY is not found" + + " in the empty JSON string", + TradingScheduleResponseMarketSchedulesHKEQUITY.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("sessions") != null && !jsonObj.get("sessions").isJsonNull()) { + JsonArray jsonArraysessions = jsonObj.getAsJsonArray("sessions"); + if (jsonArraysessions != null) { + // ensure the json data is an array + if (!jsonObj.get("sessions").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `sessions` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("sessions").toString())); + } + + // validate the optional field `sessions` (array) + for (int i = 0; i < jsonArraysessions.size(); i++) { + TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner.validateJsonElement( + jsonArraysessions.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TradingScheduleResponseMarketSchedulesHKEQUITY.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'TradingScheduleResponseMarketSchedulesHKEQUITY' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get(TradingScheduleResponseMarketSchedulesHKEQUITY.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, + TradingScheduleResponseMarketSchedulesHKEQUITY value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TradingScheduleResponseMarketSchedulesHKEQUITY read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of TradingScheduleResponseMarketSchedulesHKEQUITY given an JSON string + * + * @param jsonString JSON string + * @return An instance of TradingScheduleResponseMarketSchedulesHKEQUITY + * @throws IOException if the JSON string is invalid with respect to + * TradingScheduleResponseMarketSchedulesHKEQUITY + */ + public static TradingScheduleResponseMarketSchedulesHKEQUITY fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, TradingScheduleResponseMarketSchedulesHKEQUITY.class); + } + + /** + * Convert an instance of TradingScheduleResponseMarketSchedulesHKEQUITY to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner.java new file mode 100644 index 000000000..1bf610b50 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner.java @@ -0,0 +1,307 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner { + public static final String SERIALIZED_NAME_START_TIME = "startTime"; + + @SerializedName(SERIALIZED_NAME_START_TIME) + @jakarta.annotation.Nullable + private Long startTime; + + public static final String SERIALIZED_NAME_END_TIME = "endTime"; + + @SerializedName(SERIALIZED_NAME_END_TIME) + @jakarta.annotation.Nullable + private Long endTime; + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @jakarta.annotation.Nullable + private String type; + + public TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner() {} + + public TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner startTime( + @jakarta.annotation.Nullable Long startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get startTime + * + * @return startTime + */ + @jakarta.annotation.Nullable + public Long getStartTime() { + return startTime; + } + + public void setStartTime(@jakarta.annotation.Nullable Long startTime) { + this.startTime = startTime; + } + + public TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner endTime( + @jakarta.annotation.Nullable Long endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get endTime + * + * @return endTime + */ + @jakarta.annotation.Nullable + public Long getEndTime() { + return endTime; + } + + public void setEndTime(@jakarta.annotation.Nullable Long endTime) { + this.endTime = endTime; + } + + public TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner type( + @jakarta.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@jakarta.annotation.Nullable String type) { + this.type = type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner + tradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner = + (TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner) o; + return Objects.equals( + this.startTime, + tradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner.startTime) + && Objects.equals( + this.endTime, + tradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner.endTime) + && Objects.equals( + this.type, + tradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner.type); + } + + @Override + public int hashCode() { + return Objects.hash(startTime, endTime, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner {\n"); + sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); + sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object startTimeValue = getStartTime(); + String startTimeValueAsString = ""; + startTimeValueAsString = startTimeValue.toString(); + sb.append("startTime=").append(urlEncode(startTimeValueAsString)).append(""); + Object endTimeValue = getEndTime(); + String endTimeValueAsString = ""; + endTimeValueAsString = endTimeValue.toString(); + sb.append("endTime=").append(urlEncode(endTimeValueAsString)).append(""); + Object typeValue = getType(); + String typeValueAsString = ""; + typeValueAsString = typeValue.toString(); + sb.append("type=").append(urlEncode(typeValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("startTime"); + openapiFields.add("endTime"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner" + + " is not found in the empty JSON string", + TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner + .openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter + thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get( + TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner + .class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, + TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner read( + JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner given an + * JSON string + * + * @param jsonString JSON string + * @return An instance of TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner + * @throws IOException if the JSON string is invalid with respect to + * TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner + */ + public static TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner fromJson( + String jsonString) throws IOException { + return JSON.getGson() + .fromJson( + jsonString, + TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner.class); + } + + /** + * Convert an instance of TradingScheduleResponseMarketSchedulesHKEQUITYSessionsInner to an JSON + * string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesKREQUITY.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesKREQUITY.java new file mode 100644 index 000000000..c08741b22 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesKREQUITY.java @@ -0,0 +1,263 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** TradingScheduleResponseMarketSchedulesKREQUITY */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class TradingScheduleResponseMarketSchedulesKREQUITY { + public static final String SERIALIZED_NAME_SESSIONS = "sessions"; + + @SerializedName(SERIALIZED_NAME_SESSIONS) + @jakarta.annotation.Nullable + private List<@Valid TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner> sessions; + + public TradingScheduleResponseMarketSchedulesKREQUITY() {} + + public TradingScheduleResponseMarketSchedulesKREQUITY sessions( + @jakarta.annotation.Nullable + List<@Valid TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner> + sessions) { + this.sessions = sessions; + return this; + } + + public TradingScheduleResponseMarketSchedulesKREQUITY addSessionsItem( + TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner sessionsItem) { + if (this.sessions == null) { + this.sessions = new ArrayList<>(); + } + this.sessions.add(sessionsItem); + return this; + } + + /** + * Get sessions + * + * @return sessions + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner> getSessions() { + return sessions; + } + + public void setSessions( + @jakarta.annotation.Nullable + List<@Valid TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner> + sessions) { + this.sessions = sessions; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TradingScheduleResponseMarketSchedulesKREQUITY + tradingScheduleResponseMarketSchedulesKREQUITY = + (TradingScheduleResponseMarketSchedulesKREQUITY) o; + return Objects.equals( + this.sessions, tradingScheduleResponseMarketSchedulesKREQUITY.sessions); + } + + @Override + public int hashCode() { + return Objects.hash(sessions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TradingScheduleResponseMarketSchedulesKREQUITY {\n"); + sb.append(" sessions: ").append(toIndentedString(sessions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object sessionsValue = getSessions(); + String sessionsValueAsString = ""; + sessionsValueAsString = + (String) + ((Collection) sessionsValue) + .stream().map(Object::toString).collect(Collectors.joining(",")); + sb.append("sessions=").append(urlEncode(sessionsValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("sessions"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * TradingScheduleResponseMarketSchedulesKREQUITY + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TradingScheduleResponseMarketSchedulesKREQUITY.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " TradingScheduleResponseMarketSchedulesKREQUITY is not found" + + " in the empty JSON string", + TradingScheduleResponseMarketSchedulesKREQUITY.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("sessions") != null && !jsonObj.get("sessions").isJsonNull()) { + JsonArray jsonArraysessions = jsonObj.getAsJsonArray("sessions"); + if (jsonArraysessions != null) { + // ensure the json data is an array + if (!jsonObj.get("sessions").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `sessions` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("sessions").toString())); + } + + // validate the optional field `sessions` (array) + for (int i = 0; i < jsonArraysessions.size(); i++) { + TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner.validateJsonElement( + jsonArraysessions.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TradingScheduleResponseMarketSchedulesKREQUITY.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'TradingScheduleResponseMarketSchedulesKREQUITY' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get(TradingScheduleResponseMarketSchedulesKREQUITY.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, + TradingScheduleResponseMarketSchedulesKREQUITY value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TradingScheduleResponseMarketSchedulesKREQUITY read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of TradingScheduleResponseMarketSchedulesKREQUITY given an JSON string + * + * @param jsonString JSON string + * @return An instance of TradingScheduleResponseMarketSchedulesKREQUITY + * @throws IOException if the JSON string is invalid with respect to + * TradingScheduleResponseMarketSchedulesKREQUITY + */ + public static TradingScheduleResponseMarketSchedulesKREQUITY fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, TradingScheduleResponseMarketSchedulesKREQUITY.class); + } + + /** + * Convert an instance of TradingScheduleResponseMarketSchedulesKREQUITY to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner.java new file mode 100644 index 000000000..9b45a001d --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner.java @@ -0,0 +1,307 @@ +/* + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.rest.model; + +import com.binance.connector.client.derivatives_trading_usds_futures.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner { + public static final String SERIALIZED_NAME_START_TIME = "startTime"; + + @SerializedName(SERIALIZED_NAME_START_TIME) + @jakarta.annotation.Nullable + private Long startTime; + + public static final String SERIALIZED_NAME_END_TIME = "endTime"; + + @SerializedName(SERIALIZED_NAME_END_TIME) + @jakarta.annotation.Nullable + private Long endTime; + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @jakarta.annotation.Nullable + private String type; + + public TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner() {} + + public TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner startTime( + @jakarta.annotation.Nullable Long startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get startTime + * + * @return startTime + */ + @jakarta.annotation.Nullable + public Long getStartTime() { + return startTime; + } + + public void setStartTime(@jakarta.annotation.Nullable Long startTime) { + this.startTime = startTime; + } + + public TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner endTime( + @jakarta.annotation.Nullable Long endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get endTime + * + * @return endTime + */ + @jakarta.annotation.Nullable + public Long getEndTime() { + return endTime; + } + + public void setEndTime(@jakarta.annotation.Nullable Long endTime) { + this.endTime = endTime; + } + + public TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner type( + @jakarta.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@jakarta.annotation.Nullable String type) { + this.type = type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner + tradingScheduleResponseMarketSchedulesKREQUITYSessionsInner = + (TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner) o; + return Objects.equals( + this.startTime, + tradingScheduleResponseMarketSchedulesKREQUITYSessionsInner.startTime) + && Objects.equals( + this.endTime, + tradingScheduleResponseMarketSchedulesKREQUITYSessionsInner.endTime) + && Objects.equals( + this.type, + tradingScheduleResponseMarketSchedulesKREQUITYSessionsInner.type); + } + + @Override + public int hashCode() { + return Objects.hash(startTime, endTime, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner {\n"); + sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); + sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object startTimeValue = getStartTime(); + String startTimeValueAsString = ""; + startTimeValueAsString = startTimeValue.toString(); + sb.append("startTime=").append(urlEncode(startTimeValueAsString)).append(""); + Object endTimeValue = getEndTime(); + String endTimeValueAsString = ""; + endTimeValueAsString = endTimeValue.toString(); + sb.append("endTime=").append(urlEncode(endTimeValueAsString)).append(""); + Object typeValue = getType(); + String typeValueAsString = ""; + typeValueAsString = typeValue.toString(); + sb.append("type=").append(urlEncode(typeValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("startTime"); + openapiFields.add("endTime"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner" + + " is not found in the empty JSON string", + TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner + .openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter + thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get( + TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner + .class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, + TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner read( + JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner given an + * JSON string + * + * @param jsonString JSON string + * @return An instance of TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner + * @throws IOException if the JSON string is invalid with respect to + * TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner + */ + public static TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner fromJson( + String jsonString) throws IOException { + return JSON.getGson() + .fromJson( + jsonString, + TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner.class); + } + + /** + * Convert an instance of TradingScheduleResponseMarketSchedulesKREQUITYSessionsInner to an JSON + * string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/UserCommissionRateResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/UserCommissionRateResponse.java index b5855d77a..24280f786 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/UserCommissionRateResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/UserCommissionRateResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UserCommissionRateResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserCommissionRateResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -88,7 +88,7 @@ public UserCommissionRateResponse makerCommissionRate( } /** - * Get makerCommissionRate + * 0.02% * * @return makerCommissionRate */ @@ -108,7 +108,7 @@ public UserCommissionRateResponse takerCommissionRate( } /** - * Get takerCommissionRate + * 0.04% * * @return takerCommissionRate */ @@ -128,7 +128,7 @@ public UserCommissionRateResponse rpiCommissionRate( } /** - * Get rpiCommissionRate + * 0.005% * * @return rpiCommissionRate */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/UsersForceOrdersResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/UsersForceOrdersResponse.java index f49ade065..619f9c395 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/UsersForceOrdersResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/UsersForceOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UsersForceOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UsersForceOrdersResponse extends ArrayList { public UsersForceOrdersResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/UsersForceOrdersResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/UsersForceOrdersResponseInner.java index 3b1458831..343adb9f3 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/UsersForceOrdersResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/UsersForceOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UsersForceOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UsersForceOrdersResponseInner { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/WorkingType.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/WorkingType.java index b516e5320..83060b903 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/WorkingType.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/WorkingType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/JSON.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/JSON.java index 3f557b7b4..969ddc01f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/JSON.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -114,6 +114,10 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api .model.AccountInformationResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api + .model.AccountInformationResponseRateLimitsInner + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api .model.AccountInformationResponseResult.CustomTypeAdapterFactory()); @@ -131,10 +135,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api .model.AccountInformationV2Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api - .model.AccountInformationV2ResponseRateLimitsInner - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api .model.AccountInformationV2ResponseResult.CustomTypeAdapterFactory()); @@ -184,14 +184,13 @@ private static Class getClassByDiscriminator( .model.FuturesAccountBalanceResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api - .model.FuturesAccountBalanceV2Request.CustomTypeAdapterFactory()); + .model.FuturesAccountBalanceResponseResultInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api - .model.FuturesAccountBalanceV2Response.CustomTypeAdapterFactory()); + .model.FuturesAccountBalanceV2Request.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api - .model.FuturesAccountBalanceV2ResponseResultInner - .CustomTypeAdapterFactory()); + .model.FuturesAccountBalanceV2Response.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api .model.KeepaliveUserDataStreamRequest.CustomTypeAdapterFactory()); @@ -243,12 +242,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api .model.OrderBookResponseResult.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api - .model.OrderBookResponseResultAsksItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api - .model.OrderBookResponseResultBidsItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api .model.PositionInformationRequest.CustomTypeAdapterFactory()); @@ -304,6 +297,10 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api .model.SymbolOrderBookTickerResponse2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api + .model.SymbolOrderBookTickerResponse2ResultInner + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api .model.SymbolPriceTickerRequest.CustomTypeAdapterFactory()); @@ -319,6 +316,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api .model.SymbolPriceTickerResponse2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_usds_futures.websocket.api + .model.SymbolPriceTickerResponse2ResultInner.CustomTypeAdapterFactory()); gson = gsonBuilder.create(); } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/AccountApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/AccountApi.java index ef3ac7ed8..33b725813 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/AccountApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/AccountApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -47,11 +47,11 @@ public ConnectionInterface getConnection() { } /** - * Account Information(USER_DATA) Get current account information. User in single-asset/ + * Account Information (USER_DATA) Get current account information. User in single-asset/ * multi-assets mode will see different value, see comments in response section for detail. - * Weight: 5 + * Weight(IP): 5 Security Type: USER_DATA * - * @param accountInformationRequest (required) + * @param accountInformationRequest (optional) * @return AccountInformationResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -63,8 +63,8 @@ public ConnectionInterface getConnection() { * * * @see Account - * Information(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/account#account-information">Account + * Information (USER_DATA) Documentation */ public CompletableFuture accountInformation( AccountInformationRequest accountInformationRequest) throws ApiException { @@ -111,11 +111,11 @@ private void accountInformationValidateBeforeCall( } /** - * Account Information V2(USER_DATA) Get current account information. User in single-asset/ + * Account Information V2 (USER_DATA) Get current account information. User in single-asset/ * multi-assets mode will see different value, see comments in response section for detail. - * Weight: 5 + * Weight(IP): 5 Security Type: USER_DATA * - * @param accountInformationV2Request (required) + * @param accountInformationV2Request (optional) * @return AccountInformationV2Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -127,8 +127,8 @@ private void accountInformationValidateBeforeCall( * * * @see Account - * Information V2(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/account#account-information-v2">Account + * Information V2 (USER_DATA) Documentation */ public CompletableFuture accountInformationV2( AccountInformationV2Request accountInformationV2Request) throws ApiException { @@ -175,9 +175,10 @@ private void accountInformationV2ValidateBeforeCall( } /** - * Futures Account Balance(USER_DATA) Query account balance info Weight: 5 + * Futures Account Balance (USER_DATA) Futures Account Balance Weight(IP): 5 Security Type: + * USER_DATA * - * @param futuresAccountBalanceRequest (required) + * @param futuresAccountBalanceRequest (optional) * @return FuturesAccountBalanceResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -189,8 +190,8 @@ private void accountInformationV2ValidateBeforeCall( * * * @see Futures - * Account Balance(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/account#futures-account-balance">Futures + * Account Balance (USER_DATA) Documentation */ public CompletableFuture futuresAccountBalance( FuturesAccountBalanceRequest futuresAccountBalanceRequest) throws ApiException { @@ -237,9 +238,10 @@ private void futuresAccountBalanceValidateBeforeCall( } /** - * Futures Account Balance V2(USER_DATA) Query account balance info Weight: 5 + * Futures Account Balance V2 (USER_DATA) Futures Account Balance V2 Weight(IP): 5 Security + * Type: USER_DATA * - * @param futuresAccountBalanceV2Request (required) + * @param futuresAccountBalanceV2Request (optional) * @return FuturesAccountBalanceV2Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -251,8 +253,8 @@ private void futuresAccountBalanceValidateBeforeCall( * * * @see Futures - * Account Balance V2(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/account#futures-account-balance-v2">Futures + * Account Balance V2 (USER_DATA) Documentation */ public CompletableFuture futuresAccountBalanceV2( FuturesAccountBalanceV2Request futuresAccountBalanceV2Request) throws ApiException { diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/DerivativesTradingUsdsFuturesWebSocketApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/DerivativesTradingUsdsFuturesWebSocketApi.java index f715993b9..699db3174 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/DerivativesTradingUsdsFuturesWebSocketApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/DerivativesTradingUsdsFuturesWebSocketApi.java @@ -50,7 +50,7 @@ public class DerivativesTradingUsdsFuturesWebSocketApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/11.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final ConnectionInterface connection; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/MarketDataApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/MarketDataApi.java index 3497c10c9..e721571db 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/MarketDataApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/MarketDataApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -49,9 +49,10 @@ public ConnectionInterface getConnection() { * you need to continuously monitor order book updates, please consider using Websocket Market * Streams: * `<symbol>@depth<levels>` * `<symbol>@depth` * You can use `depth` request together with `<symbol>@depth` streams - * to maintain a local order book. Retail Price Improvement(RPI) orders are not visible and - * excluded in the response message. Weight: Adjusted based on the limit: | Limit | Weight | | - * ------------- | ------ | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | 20 | + * to maintain a local order book. **Note:** - Retail Price Improvement(RPI) orders are not + * visible and excluded in the response message. Weight: Adjusted based on the limit: | Limit | + * Weight | | ------------- | ------ | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | + * 20 | * * @param orderBookRequest (required) * @return OrderBookResponse @@ -65,7 +66,7 @@ public ConnectionInterface getConnection() { * * * @see Order + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/market-data#order-book">Order * Book Documentation */ public CompletableFuture orderBook(OrderBookRequest orderBookRequest) @@ -113,13 +114,14 @@ private void orderBookValidateBeforeCall(OrderBookRequest orderBookRequest) } /** - * Symbol Order Book Ticker Best price/qty on the order book for a symbol or symbols. Retail - * Price Improvement(RPI) orders are not visible and excluded in the response message. * If the - * symbol is not sent, bookTickers for all symbols will be returned in an array. * The field + * Symbol Order Book Ticker Best price/qty on the order book for a symbol or symbols. **Note:** + * - Retail Price Improvement(RPI) orders are not visible and excluded in the response message. + * Weight: **2** for a single symbol; **5** when the symbol parameter is omitted Notes: - If the + * symbol is not sent, bookTickers for all symbols will be returned in an array. - The field * `X-MBX-USED-WEIGHT-1M` in response header is not accurate from this endpoint, - * please ignore. Weight: 2 for a single symbol; 5 when the symbol parameter is omitted + * please ignore. * - * @param symbolOrderBookTickerRequest (required) + * @param symbolOrderBookTickerRequest (optional) * @return SymbolOrderBookTickerResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -131,7 +133,7 @@ private void orderBookValidateBeforeCall(OrderBookRequest orderBookRequest) * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/market-data#symbol-order-book-ticker">Symbol * Order Book Ticker Documentation */ public CompletableFuture symbolOrderBookTicker( @@ -180,11 +182,11 @@ private void symbolOrderBookTickerValidateBeforeCall( } /** - * Symbol Price Ticker Latest price for a symbol or symbols. * If the symbol is not sent, prices - * for all symbols will be returned in an array. Weight: 1 for a single symbol; 2 when the - * symbol parameter is omitted + * Symbol Price Ticker Latest price for a symbol or symbols. Weight: **1** for a single symbol; + * **2** when the symbol parameter is omitted Notes: - If the symbol is not sent, prices for all + * symbols will be returned in an array. * - * @param symbolPriceTickerRequest (required) + * @param symbolPriceTickerRequest (optional) * @return SymbolPriceTickerResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -196,7 +198,7 @@ private void symbolOrderBookTickerValidateBeforeCall( * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/market-data#symbol-price-ticker">Symbol * Price Ticker Documentation */ public CompletableFuture symbolPriceTicker( diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/TradeApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/TradeApi.java index caf445ce0..33431bc4c 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/TradeApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/TradeApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -55,10 +55,10 @@ public ConnectionInterface getConnection() { } /** - * Cancel Algo Order (TRADE) Cancel an active algo order. * Either `algoId` or - * `clientAlgoId` must be sent. Weight: 1 + * Cancel Algo Order (TRADE) Cancel an active algo order. Weight(IP): 1 Security Type: TRADE + * Notes: - Either `algoId` or `clientAlgoId` must be sent. * - * @param cancelAlgoOrderRequest (required) + * @param cancelAlgoOrderRequest (optional) * @return CancelAlgoOrderResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -70,7 +70,7 @@ public ConnectionInterface getConnection() { * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/trade#cancel-algo-order">Cancel * Algo Order (TRADE) Documentation */ public CompletableFuture cancelAlgoOrder( @@ -117,8 +117,8 @@ private void cancelAlgoOrderValidateBeforeCall(CancelAlgoOrderRequest cancelAlgo } /** - * Cancel Order (TRADE) Cancel an active order. * Either `orderId` or - * `origClientOrderId` must be sent. Weight: 1 + * Cancel Order (TRADE) Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - + * Either `orderId` or `origClientOrderId` must be sent. * * @param cancelOrderRequest (required) * @return CancelOrderResponse @@ -132,7 +132,7 @@ private void cancelAlgoOrderValidateBeforeCall(CancelAlgoOrderRequest cancelAlgo * * * @see Cancel + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/trade#cancel-order">Cancel * Order (TRADE) Documentation */ public CompletableFuture cancelOrder(CancelOrderRequest cancelOrderRequest) @@ -180,18 +180,18 @@ private void cancelOrderValidateBeforeCall(CancelOrderRequest cancelOrderRequest /** * Modify Order (TRADE) Order modify function, currently only LIMIT order modification is - * supported, modified orders will be reordered in the match queue * Either `orderId` - * or `origClientOrderId` must be sent, and the `orderId` will prevail if - * both are sent. * Both `quantity` and `price` must be sent, which is - * different from dapi modify order endpoint. * When the new `quantity` or - * `price` doesn'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 `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 Weight: 1 on 10s order rate + * 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) + * limit(x-mbx-used-weight-1m) Security Type: TRADE Notes: - Either `orderId` or + * `origClientOrderId` must be sent, and the `orderId` will prevail if both + * are sent. - Both `quantity` and `price` must be sent. *(After CM + * migration, the dapi modify order endpoint follows the same rule.)* - When the new + * `quantity` or `price` doesn'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 `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 * * @param modifyOrderRequest (required) * @return ModifyOrderResponse @@ -205,7 +205,7 @@ private void cancelOrderValidateBeforeCall(CancelOrderRequest cancelOrderRequest * * * @see Modify + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/trade#modify-order">Modify * Order (TRADE) Documentation */ public CompletableFuture modifyOrder(ModifyOrderRequest modifyOrderRequest) @@ -252,36 +252,37 @@ private void modifyOrderValidateBeforeCall(ModifyOrderRequest modifyOrderRequest } /** - * New Algo Order(TRADE) Send in a new algo order. * Condition orders will be triggered when: * - * If parameter`priceProtect`is sent as true: * when price reaches the - * `triggerPrice` ,the difference rate between \"MARK_PRICE\" and - * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * `TAKE_PROFIT`, - * `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * SELL: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest price after - * order placed <= `activatePrice`, and the latest price >= the lowest - * price * (1 + `callbackRate`) * SELL: the highest price after order placed - * >= `activatePrice`, and the latest price <= the highest price * (1 - * - `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error - * code. ``{\"code\": -2021, \"msg\": \"Order would - * immediately trigger.\"}`` means that the parameters you send do not meet the - * following requirements: * BUY: `activatePrice` should be smaller than latest price. - * * SELL: `activatePrice` should be larger than latest price. * + * New Algo Order (TRADE) Send in a new algo order. Weight(IP): 0 Security Type: TRADE Notes: - + * Condition orders will be triggered when: > - If parameter`priceProtect`is sent + * as true: - when price reaches the `triggerPrice` ,the difference rate between + * \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be larger than the + * \"triggerProtect\" of the symbol - \"triggerProtect\" of a symbol can be + * got from `GET /fapi/v1/exchangeInfo` > - `STOP`, + * `STOP_MARKET`: - BUY: latest price (\"MARK_PRICE\" or + * \"CONTRACT_PRICE\") >= `triggerPrice` - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= + * `triggerPrice` - `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - BUY: + * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= + * `triggerPrice` - SELL: latest price (\"MARK_PRICE\" or + * \"CONTRACT_PRICE\") >= `triggerPrice` - + * `TRAILING_STOP_MARKET`: - BUY: the lowest price after order placed <= + * `activatePrice`, and the latest price >= the lowest price * (1 + + * `callbackRate`) - SELL: the highest price after order placed >= + * `activatePrice`, and the latest price <= the highest price * (1 - + * `callbackRate`) > - For `TRAILING_STOP_MARKET`, if you got such error + * code. > ``{\"code\": -2021, \"msg\": \"Order would + * immediately trigger.\"}`` > means that the parameters you send do not meet + * the following requirements: - BUY: `activatePrice` should be smaller than latest + * price. - SELL: `activatePrice` should be larger than latest price. > - * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` paremeter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with + * `closePosition`=`true`: - Follow the same rules for condition + * orders. - If triggered,**close all** current long position( if `SELL`) or current + * short position( if `BUY`). - Cannot be used with `quantity` paremeter - + * Cannot be used with `reduceOnly` parameter - In Hedge Mode,cannot be used with * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * + * `SELL` orders in `SHORT` position side - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. Weight: 0 + * `IOC` or `GTC` or `GTD`. * * @param newAlgoOrderRequest (required) * @return NewAlgoOrderResponse @@ -295,8 +296,8 @@ private void modifyOrderValidateBeforeCall(ModifyOrderRequest modifyOrderRequest * * * @see New - * Algo Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/trade#new-algo-order">New + * Algo Order (TRADE) Documentation */ public CompletableFuture newAlgoOrder( NewAlgoOrderRequest newAlgoOrderRequest) throws ApiException { @@ -342,40 +343,16 @@ private void newAlgoOrderValidateBeforeCall(NewAlgoOrderRequest newAlgoOrderRequ } /** - * New Order(TRADE) Send in a new order. * Order with type `STOP`, parameter - * `timeInForce` can be sent ( default `GTC`). * Order with type - * `TAKE_PROFIT`, parameter `timeInForce` can be sent ( default - * `GTC`). * Condition orders will be triggered when: * If - * parameter`priceProtect`is sent as true: * when price reaches the - * `stopPrice` ,the difference rate between \"MARK_PRICE\" and - * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed `<= - * `activationPrice`, and the latest price >`= the lowest price * (1 + - * `callbackRate`) * SELL: the highest price after order placed >= - * `activationPrice`, and the latest price <= the highest price * (1 - - * `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. - * ``{\"code\": -2021, \"msg\": \"Order would immediately - * trigger.\"}`` means that the parameters you send do not meet the following - * requirements: * BUY: `activationPrice` should be smaller than latest price. * SELL: - * `activationPrice` should be larger than latest price. * If `newOrderRespType - * ` is sent as `RESULT` : * `MARKET` order: the final FILLED result of - * the order will be return directly. * `LIMIT` order with special - * `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be - * returned directly. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` paremeter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with - * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side Weight: 0 + * New Order (TRADE) Send in a new order. Weight(IP): 0 Security Type: TRADE Notes: Additional + * mandatory parameters based on `type`: - `LIMIT`: `timeInForce`, + * `quantity`, `price` - `MARKET`: `quantity` > * If + * `newOrderRespType` is sent as `RESULT`: > * `MARKET` order: + * the final FILLED result of the order will be return directly. > * `LIMIT` order + * with special `timeInForce`: the final status result of the order(FILLED or EXPIRED) + * will be returned directly. > > * `selfTradePreventionMode` is only effective + * when `timeInForce` set to `IOC` or `GTC` or `GTD`. + * > * In extreme market conditions, timeInForce `GTD` order auto cancel time might + * be delayed comparing to `goodTillDate` * * @param newOrderRequest (required) * @return NewOrderResponse @@ -389,8 +366,8 @@ private void newAlgoOrderValidateBeforeCall(NewAlgoOrderRequest newAlgoOrderRequ * * * @see New - * Order(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/trade#new-order">New + * Order (TRADE) Documentation */ public CompletableFuture newOrder(NewOrderRequest newOrderRequest) throws ApiException { @@ -435,10 +412,11 @@ private void newOrderValidateBeforeCall(NewOrderRequest newOrderRequest) throws } /** - * Position Information (USER_DATA) Get current position information. * Please use with user - * data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 5 + * Position Information (USER_DATA) Get current position information. Weight(IP): 5 Security + * Type: USER_DATA Notes: - Please use with user data stream `ACCOUNT_UPDATE` to meet + * your timeliness and accuracy needs. * - * @param positionInformationRequest (required) + * @param positionInformationRequest (optional) * @return PositionInformationResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -450,7 +428,7 @@ private void newOrderValidateBeforeCall(NewOrderRequest newOrderRequest) throws * * * @see Position + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/trade#position-information">Position * Information (USER_DATA) Documentation */ public CompletableFuture positionInformation( @@ -499,10 +477,11 @@ private void positionInformationValidateBeforeCall( /** * Position Information V2 (USER_DATA) Get current position information(only symbol that has - * position or open orders will be returned). * Please use with user data stream - * `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 5 + * position or open orders will be returned). Weight(IP): 5 Security Type: USER_DATA Notes: - + * Please use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and + * accuracy needs. * - * @param positionInformationV2Request (required) + * @param positionInformationV2Request (optional) * @return PositionInformationV2Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -514,7 +493,7 @@ private void positionInformationValidateBeforeCall( * * * @see Position + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/trade#position-information-v2">Position * Information V2 (USER_DATA) Documentation */ public CompletableFuture positionInformationV2( @@ -565,8 +544,9 @@ private void positionInformationV2ValidateBeforeCall( * Query Order (USER_DATA) Check an order's status. * These orders will not be found: * * order status is `CANCELED` or `EXPIRED` **AND** order has NO filled trade * **AND** created time + 3 days < current time * order create time + 90 days < current - * time * Either `orderId` or `origClientOrderId` must be sent. * - * `orderId` is self-increment for each specific `symbol` Weight: 1 + * time Weight(IP): 1 Security Type: USER_DATA Notes: Notes: - Either `orderId` or + * `origClientOrderId` must be sent. - `orderId` is self-increment for each + * specific `symbol` * * @param queryOrderRequest (required) * @return QueryOrderResponse @@ -576,11 +556,11 @@ private void positionInformationV2ValidateBeforeCall( * * * - * + * *
Response Details
Status Code Description Response Headers
200 Order -
200 Order Status -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/trade#query-order">Query * Order (USER_DATA) Documentation */ public CompletableFuture queryOrder(QueryOrderRequest queryOrderRequest) diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/UserDataStreamsApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/UserDataStreamsApi.java index 76d015c32..b7674a772 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/UserDataStreamsApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/UserDataStreamsApi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -45,9 +45,10 @@ public ConnectionInterface getConnection() { } /** - * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight: 1 + * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight(IP): 1 Security + * Type: USER_STREAM * - * @param closeUserDataStreamRequest (required) + * @param closeUserDataStreamRequest (optional) * @return CloseUserDataStreamResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -59,7 +60,7 @@ public ConnectionInterface getConnection() { * * * @see Close + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/user-data-streams#close-user-data-stream">Close * User Data Stream (USER_STREAM) Documentation */ public CompletableFuture closeUserDataStream( @@ -111,9 +112,9 @@ private void closeUserDataStreamValidateBeforeCall( /** * Keepalive User Data Stream (USER_STREAM) Keepalive a user data stream to prevent a time out. * User data streams will close after 60 minutes. It's recommended to send a ping about - * every 60 minutes. Weight: 1 + * every 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * - * @param keepaliveUserDataStreamRequest (required) + * @param keepaliveUserDataStreamRequest (optional) * @return KeepaliveUserDataStreamResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -125,7 +126,7 @@ private void closeUserDataStreamValidateBeforeCall( * * * @see Keepalive + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/user-data-streams#keepalive-user-data-stream">Keepalive * User Data Stream (USER_STREAM) Documentation */ public CompletableFuture keepaliveUserDataStream( @@ -180,9 +181,9 @@ private void keepaliveUserDataStreamValidateBeforeCall( * Start User Data Stream (USER_STREAM) Start a new user data stream. The stream will close * after 60 minutes unless a keepalive is sent. If the account has an active * `listenKey`, that `listenKey` will be returned and its validity will be - * extended for 60 minutes. Weight: 1 + * extended for 60 minutes. Weight(IP): 1 Security Type: USER_STREAM * - * @param startUserDataStreamRequest (required) + * @param startUserDataStreamRequest (optional) * @return StartUserDataStreamResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -194,7 +195,7 @@ private void keepaliveUserDataStreamValidateBeforeCall( * * * @see Start + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/user-data-streams#start-user-data-stream">Start * User Data Stream (USER_STREAM) Documentation */ public CompletableFuture startUserDataStream( diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AbstractOpenApiSchema.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AbstractOpenApiSchema.java index b9a7dfb2a..bccee681a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AbstractOpenApiSchema.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AbstractOpenApiSchema.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -18,7 +18,7 @@ /** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationRequest.java index 46cde778f..41a0c233b 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountInformationRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -59,7 +59,7 @@ public AccountInformationRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Id. * * @return id */ @@ -78,7 +78,7 @@ public AccountInformationRequest recvWindow(@jakarta.annotation.Nullable Long re } /** - * Get recvWindow + * Recv Window. * * @return recvWindow */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponse.java index 4e5b98393..6f9020b88 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** AccountInformationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class AccountInformationResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits; + private List<@Valid AccountInformationResponseRateLimitsInner> rateLimits; public AccountInformationResponse() {} @@ -130,13 +130,13 @@ public void setResult(@jakarta.annotation.Nullable AccountInformationResponseRes public AccountInformationResponse rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits) { + List<@Valid AccountInformationResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public AccountInformationResponse addRateLimitsItem( - AccountInformationV2ResponseRateLimitsInner rateLimitsItem) { + AccountInformationResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -151,13 +151,13 @@ public AccountInformationResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountInformationV2ResponseRateLimitsInner> getRateLimits() { + public List<@Valid AccountInformationResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits) { + List<@Valid AccountInformationResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -212,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid AccountInformationResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -335,7 +335,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountInformationV2ResponseRateLimitsInner.validateJsonElement( + AccountInformationResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponseRateLimitsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponseRateLimitsInner.java new file mode 100644 index 000000000..639e3c334 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponseRateLimitsInner.java @@ -0,0 +1,415 @@ +/* + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AccountInformationResponseRateLimitsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AccountInformationResponseRateLimitsInner extends BaseDTO { + public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMIT_TYPE) + @jakarta.annotation.Nullable + private String rateLimitType; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private String interval; + + public static final String SERIALIZED_NAME_INTERVAL_NUM = "intervalNum"; + + @SerializedName(SERIALIZED_NAME_INTERVAL_NUM) + @jakarta.annotation.Nullable + private Long intervalNum; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + + @SerializedName(SERIALIZED_NAME_LIMIT) + @jakarta.annotation.Nullable + private Long limit; + + public static final String SERIALIZED_NAME_COUNT = "count"; + + @SerializedName(SERIALIZED_NAME_COUNT) + @jakarta.annotation.Nullable + private Long count; + + public AccountInformationResponseRateLimitsInner() {} + + public AccountInformationResponseRateLimitsInner rateLimitType( + @jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + return this; + } + + /** + * Get rateLimitType + * + * @return rateLimitType + */ + @jakarta.annotation.Nullable + public String getRateLimitType() { + return rateLimitType; + } + + public void setRateLimitType(@jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + } + + public AccountInformationResponseRateLimitsInner interval( + @jakarta.annotation.Nullable String interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + public String getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + } + + public AccountInformationResponseRateLimitsInner intervalNum( + @jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + return this; + } + + /** + * Get intervalNum + * + * @return intervalNum + */ + @jakarta.annotation.Nullable + public Long getIntervalNum() { + return intervalNum; + } + + public void setIntervalNum(@jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + } + + public AccountInformationResponseRateLimitsInner limit( + @jakarta.annotation.Nullable Long limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * + * @return limit + */ + @jakarta.annotation.Nullable + public Long getLimit() { + return limit; + } + + public void setLimit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + } + + public AccountInformationResponseRateLimitsInner count( + @jakarta.annotation.Nullable Long count) { + this.count = count; + return this; + } + + /** + * Get count + * + * @return count + */ + @jakarta.annotation.Nullable + public Long getCount() { + return count; + } + + public void setCount(@jakarta.annotation.Nullable Long count) { + this.count = count; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountInformationResponseRateLimitsInner accountInformationResponseRateLimitsInner = + (AccountInformationResponseRateLimitsInner) o; + return Objects.equals( + this.rateLimitType, accountInformationResponseRateLimitsInner.rateLimitType) + && Objects.equals(this.interval, accountInformationResponseRateLimitsInner.interval) + && Objects.equals( + this.intervalNum, accountInformationResponseRateLimitsInner.intervalNum) + && Objects.equals(this.limit, accountInformationResponseRateLimitsInner.limit) + && Objects.equals(this.count, accountInformationResponseRateLimitsInner.count); + } + + @Override + public int hashCode() { + return Objects.hash(rateLimitType, interval, intervalNum, limit, count); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountInformationResponseRateLimitsInner {\n"); + sb.append(" rateLimitType: ").append(toIndentedString(rateLimitType)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" intervalNum: ").append(toIndentedString(intervalNum)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + String rateLimitTypeValueAsString = rateLimitTypeValue.toString(); + valMap.put("rateLimitType", rateLimitTypeValueAsString); + } + String intervalValue = getInterval(); + if (intervalValue != null) { + String intervalValueAsString = intervalValue.toString(); + valMap.put("interval", intervalValueAsString); + } + Long intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + String intervalNumValueAsString = intervalNumValue.toString(); + valMap.put("intervalNum", intervalNumValueAsString); + } + Long limitValue = getLimit(); + if (limitValue != null) { + String limitValueAsString = limitValue.toString(); + valMap.put("limit", limitValueAsString); + } + Long countValue = getCount(); + if (countValue != null) { + String countValueAsString = countValue.toString(); + valMap.put("count", countValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + valMap.put("rateLimitType", rateLimitTypeValue); + } + Object intervalValue = getInterval(); + if (intervalValue != null) { + valMap.put("interval", intervalValue); + } + Object intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + valMap.put("intervalNum", intervalNumValue); + } + Object limitValue = getLimit(); + if (limitValue != null) { + valMap.put("limit", limitValue); + } + Object countValue = getCount(); + if (countValue != null) { + valMap.put("count", countValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("rateLimitType"); + openapiFields.add("interval"); + openapiFields.add("intervalNum"); + openapiFields.add("limit"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * AccountInformationResponseRateLimitsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AccountInformationResponseRateLimitsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " AccountInformationResponseRateLimitsInner is not found in" + + " the empty JSON string", + AccountInformationResponseRateLimitsInner.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AccountInformationResponseRateLimitsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AccountInformationResponseRateLimitsInner` properties." + + " JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("rateLimitType") != null && !jsonObj.get("rateLimitType").isJsonNull()) + && !jsonObj.get("rateLimitType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimitType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimitType").toString())); + } + if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) + && !jsonObj.get("interval").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `interval` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("interval").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AccountInformationResponseRateLimitsInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'AccountInformationResponseRateLimitsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(AccountInformationResponseRateLimitsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, AccountInformationResponseRateLimitsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AccountInformationResponseRateLimitsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AccountInformationResponseRateLimitsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountInformationResponseRateLimitsInner + * @throws IOException if the JSON string is invalid with respect to + * AccountInformationResponseRateLimitsInner + */ + public static AccountInformationResponseRateLimitsInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, AccountInformationResponseRateLimitsInner.class); + } + + /** + * Convert an instance of AccountInformationResponseRateLimitsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponseResult.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponseResult.java index 6ccb00123..d07467178 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponseResult.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** AccountInformationResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_FEE_TIER = "feeTier"; @@ -174,7 +174,7 @@ public AccountInformationResponseResult feeTier(@jakarta.annotation.Nullable Lon } /** - * Get feeTier + * account commission tier * * @return feeTier */ @@ -194,7 +194,7 @@ public AccountInformationResponseResult canTrade( } /** - * Get canTrade + * if can trade * * @return canTrade */ @@ -214,7 +214,7 @@ public AccountInformationResponseResult canDeposit( } /** - * Get canDeposit + * if can transfer in asset * * @return canDeposit */ @@ -234,7 +234,7 @@ public AccountInformationResponseResult canWithdraw( } /** - * Get canWithdraw + * if can transfer out asset * * @return canWithdraw */ @@ -254,7 +254,7 @@ public AccountInformationResponseResult updateTime( } /** - * Get updateTime + * reserved property, please ignore * * @return updateTime */ @@ -314,7 +314,8 @@ public AccountInformationResponseResult totalInitialMargin( } /** - * Get totalInitialMargin + * total initial margin required with current mark price (useless with isolated positions), only + * for USDT asset * * @return totalInitialMargin */ @@ -334,7 +335,7 @@ public AccountInformationResponseResult totalMaintMargin( } /** - * Get totalMaintMargin + * the sum of USD value of all cross positions maintenance margin * * @return totalMaintMargin */ @@ -354,7 +355,7 @@ public AccountInformationResponseResult totalWalletBalance( } /** - * Get totalWalletBalance + * total wallet balance, only for USDT asset * * @return totalWalletBalance */ @@ -374,7 +375,7 @@ public AccountInformationResponseResult totalUnrealizedProfit( } /** - * Get totalUnrealizedProfit + * total unrealized profit, only for USDT asset * * @return totalUnrealizedProfit */ @@ -395,7 +396,7 @@ public AccountInformationResponseResult totalMarginBalance( } /** - * Get totalMarginBalance + * total margin balance, only for USDT asset * * @return totalMarginBalance */ @@ -415,7 +416,7 @@ public AccountInformationResponseResult totalPositionInitialMargin( } /** - * Get totalPositionInitialMargin + * initial margin required for positions with current mark price, only for USDT asset * * @return totalPositionInitialMargin */ @@ -436,7 +437,7 @@ public AccountInformationResponseResult totalOpenOrderInitialMargin( } /** - * Get totalOpenOrderInitialMargin + * initial margin required for open orders with current mark price, only for USDT asset * * @return totalOpenOrderInitialMargin */ @@ -457,7 +458,7 @@ public AccountInformationResponseResult totalCrossWalletBalance( } /** - * Get totalCrossWalletBalance + * crossed wallet balance, only for USDT asset * * @return totalCrossWalletBalance */ @@ -478,7 +479,7 @@ public AccountInformationResponseResult totalCrossUnPnl( } /** - * Get totalCrossUnPnl + * unrealized profit of crossed positions, only for USDT asset * * @return totalCrossUnPnl */ @@ -498,7 +499,7 @@ public AccountInformationResponseResult availableBalance( } /** - * Get availableBalance + * available balance, only for USDT asset * * @return availableBalance */ @@ -518,7 +519,7 @@ public AccountInformationResponseResult maxWithdrawAmount( } /** - * Get maxWithdrawAmount + * maximum amount for transfer out, only for USDT asset * * @return maxWithdrawAmount */ @@ -581,7 +582,7 @@ public AccountInformationResponseResult addPositionsItem( } /** - * Get positions + * positions of all symbols in the market are returned * * @return positions */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponseResultAssetsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponseResultAssetsInner.java index 781f996ab..9b849492f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponseResultAssetsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponseResultAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountInformationResponseResultAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationResponseResultAssetsInner extends BaseDTO { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -132,7 +132,7 @@ public AccountInformationResponseResultAssetsInner asset( } /** - * Get asset + * asset name * * @return asset */ @@ -152,7 +152,7 @@ public AccountInformationResponseResultAssetsInner walletBalance( } /** - * Get walletBalance + * wallet balance * * @return walletBalance */ @@ -172,7 +172,7 @@ public AccountInformationResponseResultAssetsInner unrealizedProfit( } /** - * Get unrealizedProfit + * unrealized profit * * @return unrealizedProfit */ @@ -192,7 +192,7 @@ public AccountInformationResponseResultAssetsInner marginBalance( } /** - * Get marginBalance + * margin balance * * @return marginBalance */ @@ -212,7 +212,7 @@ public AccountInformationResponseResultAssetsInner maintMargin( } /** - * Get maintMargin + * maintenance margin required * * @return maintMargin */ @@ -232,7 +232,7 @@ public AccountInformationResponseResultAssetsInner initialMargin( } /** - * Get initialMargin + * total initial margin required with current mark price * * @return initialMargin */ @@ -252,7 +252,7 @@ public AccountInformationResponseResultAssetsInner positionInitialMargin( } /** - * Get positionInitialMargin + * initial margin required for positions with current mark price * * @return positionInitialMargin */ @@ -273,7 +273,7 @@ public AccountInformationResponseResultAssetsInner openOrderInitialMargin( } /** - * Get openOrderInitialMargin + * initial margin required for open orders with current mark price * * @return openOrderInitialMargin */ @@ -294,7 +294,7 @@ public AccountInformationResponseResultAssetsInner crossWalletBalance( } /** - * Get crossWalletBalance + * crossed wallet balance * * @return crossWalletBalance */ @@ -314,7 +314,7 @@ public AccountInformationResponseResultAssetsInner crossUnPnl( } /** - * Get crossUnPnl + * unrealized profit of crossed positions * * @return crossUnPnl */ @@ -334,7 +334,7 @@ public AccountInformationResponseResultAssetsInner availableBalance( } /** - * Get availableBalance + * available balance, only for USDT asset * * @return availableBalance */ @@ -354,7 +354,7 @@ public AccountInformationResponseResultAssetsInner maxWithdrawAmount( } /** - * Get maxWithdrawAmount + * maximum amount for transfer out, only for USDT asset * * @return maxWithdrawAmount */ @@ -374,7 +374,7 @@ public AccountInformationResponseResultAssetsInner marginAvailable( } /** - * Get marginAvailable + * whether the asset can be used as margin in Multi-Assets mode * * @return marginAvailable */ @@ -394,7 +394,7 @@ public AccountInformationResponseResultAssetsInner updateTime( } /** - * Get updateTime + * reserved property, please ignore * * @return updateTime */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponseResultPositionsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponseResultPositionsInner.java index 7731ccc89..c1fbb1f2e 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponseResultPositionsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationResponseResultPositionsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountInformationResponseResultPositionsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationResponseResultPositionsInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -144,7 +144,7 @@ public AccountInformationResponseResultPositionsInner symbol( } /** - * Get symbol + * symbol name * * @return symbol */ @@ -164,7 +164,7 @@ public AccountInformationResponseResultPositionsInner initialMargin( } /** - * Get initialMargin + * total initial margin required with current mark price * * @return initialMargin */ @@ -184,7 +184,7 @@ public AccountInformationResponseResultPositionsInner maintMargin( } /** - * Get maintMargin + * maintenance margin required * * @return maintMargin */ @@ -204,7 +204,7 @@ public AccountInformationResponseResultPositionsInner unrealizedProfit( } /** - * Get unrealizedProfit + * unrealized profit * * @return unrealizedProfit */ @@ -224,7 +224,7 @@ public AccountInformationResponseResultPositionsInner positionInitialMargin( } /** - * Get positionInitialMargin + * initial margin required for positions with current mark price * * @return positionInitialMargin */ @@ -245,7 +245,7 @@ public AccountInformationResponseResultPositionsInner openOrderInitialMargin( } /** - * Get openOrderInitialMargin + * initial margin required for open orders with current mark price * * @return openOrderInitialMargin */ @@ -266,7 +266,7 @@ public AccountInformationResponseResultPositionsInner leverage( } /** - * Get leverage + * current initial leverage * * @return leverage */ @@ -286,7 +286,7 @@ public AccountInformationResponseResultPositionsInner isolated( } /** - * Get isolated + * if the position is isolated * * @return isolated */ @@ -306,7 +306,7 @@ public AccountInformationResponseResultPositionsInner entryPrice( } /** - * Get entryPrice + * average entry price * * @return entryPrice */ @@ -326,7 +326,7 @@ public AccountInformationResponseResultPositionsInner maxNotional( } /** - * Get maxNotional + * maximum available notional with current leverage * * @return maxNotional */ @@ -346,7 +346,7 @@ public AccountInformationResponseResultPositionsInner bidNotional( } /** - * Get bidNotional + * bids notional, ignore * * @return bidNotional */ @@ -366,7 +366,7 @@ public AccountInformationResponseResultPositionsInner askNotional( } /** - * Get askNotional + * ask notional, ignore * * @return askNotional */ @@ -386,7 +386,7 @@ public AccountInformationResponseResultPositionsInner positionSide( } /** - * Get positionSide + * position side * * @return positionSide */ @@ -406,7 +406,7 @@ public AccountInformationResponseResultPositionsInner positionAmt( } /** - * Get positionAmt + * position amount * * @return positionAmt */ @@ -426,7 +426,7 @@ public AccountInformationResponseResultPositionsInner updateTime( } /** - * Get updateTime + * reserved property, please ignore * * @return updateTime */ @@ -446,7 +446,7 @@ public AccountInformationResponseResultPositionsInner breakEvenPrice( } /** - * Get breakEvenPrice + * average entry price * * @return breakEvenPrice */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2Request.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2Request.java index 6496f7cd0..0aec9b59a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2Request.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2Request.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountInformationV2Request */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationV2Request extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -59,7 +59,7 @@ public AccountInformationV2Request id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Id. * * @return id */ @@ -78,7 +78,7 @@ public AccountInformationV2Request recvWindow(@jakarta.annotation.Nullable Long } /** - * Get recvWindow + * Recv Window. * * @return recvWindow */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2Response.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2Response.java index b03647768..f41ec133f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2Response.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2Response.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** AccountInformationV2Response */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationV2Response extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class AccountInformationV2Response extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits; + private List<@Valid AccountInformationResponseRateLimitsInner> rateLimits; public AccountInformationV2Response() {} @@ -130,13 +130,13 @@ public void setResult(@jakarta.annotation.Nullable AccountInformationV2ResponseR public AccountInformationV2Response rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits) { + List<@Valid AccountInformationResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public AccountInformationV2Response addRateLimitsItem( - AccountInformationV2ResponseRateLimitsInner rateLimitsItem) { + AccountInformationResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -151,13 +151,13 @@ public AccountInformationV2Response addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountInformationV2ResponseRateLimitsInner> getRateLimits() { + public List<@Valid AccountInformationResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits) { + List<@Valid AccountInformationResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -213,7 +213,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid AccountInformationResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -337,7 +337,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountInformationV2ResponseRateLimitsInner.validateJsonElement( + AccountInformationResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2ResponseRateLimitsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2ResponseRateLimitsInner.java deleted file mode 100644 index b8b2dac8e..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2ResponseRateLimitsInner.java +++ /dev/null @@ -1,419 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** AccountInformationV2ResponseRateLimitsInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AccountInformationV2ResponseRateLimitsInner extends BaseDTO { - public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; - - @SerializedName(SERIALIZED_NAME_RATE_LIMIT_TYPE) - @jakarta.annotation.Nullable - private String rateLimitType; - - public static final String SERIALIZED_NAME_INTERVAL = "interval"; - - @SerializedName(SERIALIZED_NAME_INTERVAL) - @jakarta.annotation.Nullable - private String interval; - - public static final String SERIALIZED_NAME_INTERVAL_NUM = "intervalNum"; - - @SerializedName(SERIALIZED_NAME_INTERVAL_NUM) - @jakarta.annotation.Nullable - private Long intervalNum; - - public static final String SERIALIZED_NAME_LIMIT = "limit"; - - @SerializedName(SERIALIZED_NAME_LIMIT) - @jakarta.annotation.Nullable - private Long limit; - - public static final String SERIALIZED_NAME_COUNT = "count"; - - @SerializedName(SERIALIZED_NAME_COUNT) - @jakarta.annotation.Nullable - private Long count; - - public AccountInformationV2ResponseRateLimitsInner() {} - - public AccountInformationV2ResponseRateLimitsInner rateLimitType( - @jakarta.annotation.Nullable String rateLimitType) { - this.rateLimitType = rateLimitType; - return this; - } - - /** - * Get rateLimitType - * - * @return rateLimitType - */ - @jakarta.annotation.Nullable - public String getRateLimitType() { - return rateLimitType; - } - - public void setRateLimitType(@jakarta.annotation.Nullable String rateLimitType) { - this.rateLimitType = rateLimitType; - } - - public AccountInformationV2ResponseRateLimitsInner interval( - @jakarta.annotation.Nullable String interval) { - this.interval = interval; - return this; - } - - /** - * Get interval - * - * @return interval - */ - @jakarta.annotation.Nullable - public String getInterval() { - return interval; - } - - public void setInterval(@jakarta.annotation.Nullable String interval) { - this.interval = interval; - } - - public AccountInformationV2ResponseRateLimitsInner intervalNum( - @jakarta.annotation.Nullable Long intervalNum) { - this.intervalNum = intervalNum; - return this; - } - - /** - * Get intervalNum - * - * @return intervalNum - */ - @jakarta.annotation.Nullable - public Long getIntervalNum() { - return intervalNum; - } - - public void setIntervalNum(@jakarta.annotation.Nullable Long intervalNum) { - this.intervalNum = intervalNum; - } - - public AccountInformationV2ResponseRateLimitsInner limit( - @jakarta.annotation.Nullable Long limit) { - this.limit = limit; - return this; - } - - /** - * Get limit - * - * @return limit - */ - @jakarta.annotation.Nullable - public Long getLimit() { - return limit; - } - - public void setLimit(@jakarta.annotation.Nullable Long limit) { - this.limit = limit; - } - - public AccountInformationV2ResponseRateLimitsInner count( - @jakarta.annotation.Nullable Long count) { - this.count = count; - return this; - } - - /** - * Get count - * - * @return count - */ - @jakarta.annotation.Nullable - public Long getCount() { - return count; - } - - public void setCount(@jakarta.annotation.Nullable Long count) { - this.count = count; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountInformationV2ResponseRateLimitsInner accountInformationV2ResponseRateLimitsInner = - (AccountInformationV2ResponseRateLimitsInner) o; - return Objects.equals( - this.rateLimitType, - accountInformationV2ResponseRateLimitsInner.rateLimitType) - && Objects.equals( - this.interval, accountInformationV2ResponseRateLimitsInner.interval) - && Objects.equals( - this.intervalNum, accountInformationV2ResponseRateLimitsInner.intervalNum) - && Objects.equals(this.limit, accountInformationV2ResponseRateLimitsInner.limit) - && Objects.equals(this.count, accountInformationV2ResponseRateLimitsInner.count); - } - - @Override - public int hashCode() { - return Objects.hash(rateLimitType, interval, intervalNum, limit, count); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountInformationV2ResponseRateLimitsInner {\n"); - sb.append(" rateLimitType: ").append(toIndentedString(rateLimitType)).append("\n"); - sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); - sb.append(" intervalNum: ").append(toIndentedString(intervalNum)).append("\n"); - sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String rateLimitTypeValue = getRateLimitType(); - if (rateLimitTypeValue != null) { - String rateLimitTypeValueAsString = rateLimitTypeValue.toString(); - valMap.put("rateLimitType", rateLimitTypeValueAsString); - } - String intervalValue = getInterval(); - if (intervalValue != null) { - String intervalValueAsString = intervalValue.toString(); - valMap.put("interval", intervalValueAsString); - } - Long intervalNumValue = getIntervalNum(); - if (intervalNumValue != null) { - String intervalNumValueAsString = intervalNumValue.toString(); - valMap.put("intervalNum", intervalNumValueAsString); - } - Long limitValue = getLimit(); - if (limitValue != null) { - String limitValueAsString = limitValue.toString(); - valMap.put("limit", limitValueAsString); - } - Long countValue = getCount(); - if (countValue != null) { - String countValueAsString = countValue.toString(); - valMap.put("count", countValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object rateLimitTypeValue = getRateLimitType(); - if (rateLimitTypeValue != null) { - valMap.put("rateLimitType", rateLimitTypeValue); - } - Object intervalValue = getInterval(); - if (intervalValue != null) { - valMap.put("interval", intervalValue); - } - Object intervalNumValue = getIntervalNum(); - if (intervalNumValue != null) { - valMap.put("intervalNum", intervalNumValue); - } - Object limitValue = getLimit(); - if (limitValue != null) { - valMap.put("limit", limitValue); - } - Object countValue = getCount(); - if (countValue != null) { - valMap.put("count", countValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("rateLimitType"); - openapiFields.add("interval"); - openapiFields.add("intervalNum"); - openapiFields.add("limit"); - openapiFields.add("count"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * AccountInformationV2ResponseRateLimitsInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AccountInformationV2ResponseRateLimitsInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " AccountInformationV2ResponseRateLimitsInner is not found in" - + " the empty JSON string", - AccountInformationV2ResponseRateLimitsInner.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AccountInformationV2ResponseRateLimitsInner.openapiFields.contains( - entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AccountInformationV2ResponseRateLimitsInner` properties." - + " JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("rateLimitType") != null && !jsonObj.get("rateLimitType").isJsonNull()) - && !jsonObj.get("rateLimitType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `rateLimitType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("rateLimitType").toString())); - } - if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) - && !jsonObj.get("interval").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `interval` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("interval").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AccountInformationV2ResponseRateLimitsInner.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'AccountInformationV2ResponseRateLimitsInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(AccountInformationV2ResponseRateLimitsInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, AccountInformationV2ResponseRateLimitsInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AccountInformationV2ResponseRateLimitsInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AccountInformationV2ResponseRateLimitsInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccountInformationV2ResponseRateLimitsInner - * @throws IOException if the JSON string is invalid with respect to - * AccountInformationV2ResponseRateLimitsInner - */ - public static AccountInformationV2ResponseRateLimitsInner fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, AccountInformationV2ResponseRateLimitsInner.class); - } - - /** - * Convert an instance of AccountInformationV2ResponseRateLimitsInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2ResponseResult.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2ResponseResult.java index 3201e8720..4dab22e61 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2ResponseResult.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2ResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** AccountInformationV2ResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationV2ResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_TOTAL_INITIAL_MARGIN = "totalInitialMargin"; @@ -133,7 +133,8 @@ public AccountInformationV2ResponseResult totalInitialMargin( } /** - * Get totalInitialMargin + * total initial margin required with current mark price (useless with isolated positions), only + * for USDT asset * * @return totalInitialMargin */ @@ -153,7 +154,7 @@ public AccountInformationV2ResponseResult totalMaintMargin( } /** - * Get totalMaintMargin + * the sum of USD value of all cross positions maintenance margin * * @return totalMaintMargin */ @@ -173,7 +174,7 @@ public AccountInformationV2ResponseResult totalWalletBalance( } /** - * Get totalWalletBalance + * total wallet balance, only for USDT asset * * @return totalWalletBalance */ @@ -193,7 +194,7 @@ public AccountInformationV2ResponseResult totalUnrealizedProfit( } /** - * Get totalUnrealizedProfit + * total unrealized profit, only for USDT asset * * @return totalUnrealizedProfit */ @@ -214,7 +215,7 @@ public AccountInformationV2ResponseResult totalMarginBalance( } /** - * Get totalMarginBalance + * total margin balance, only for USDT asset * * @return totalMarginBalance */ @@ -234,7 +235,7 @@ public AccountInformationV2ResponseResult totalPositionInitialMargin( } /** - * Get totalPositionInitialMargin + * initial margin required for positions with current mark price, only for USDT asset * * @return totalPositionInitialMargin */ @@ -255,7 +256,7 @@ public AccountInformationV2ResponseResult totalOpenOrderInitialMargin( } /** - * Get totalOpenOrderInitialMargin + * initial margin required for open orders with current mark price, only for USDT asset * * @return totalOpenOrderInitialMargin */ @@ -276,7 +277,7 @@ public AccountInformationV2ResponseResult totalCrossWalletBalance( } /** - * Get totalCrossWalletBalance + * crossed wallet balance, only for USDT asset * * @return totalCrossWalletBalance */ @@ -297,7 +298,7 @@ public AccountInformationV2ResponseResult totalCrossUnPnl( } /** - * Get totalCrossUnPnl + * unrealized profit of crossed positions, only for USDT asset * * @return totalCrossUnPnl */ @@ -317,7 +318,7 @@ public AccountInformationV2ResponseResult availableBalance( } /** - * Get availableBalance + * available balance, only for USDT asset * * @return availableBalance */ @@ -337,7 +338,7 @@ public AccountInformationV2ResponseResult maxWithdrawAmount( } /** - * Get maxWithdrawAmount + * maximum amount for transfer out, only for USDT asset * * @return maxWithdrawAmount */ @@ -367,7 +368,7 @@ public AccountInformationV2ResponseResult addAssetsItem( } /** - * Get assets + * For assets that are quote assets, USDT/USDC/BTC * * @return assets */ @@ -400,7 +401,7 @@ public AccountInformationV2ResponseResult addPositionsItem( } /** - * Get positions + * positions of all symbols user had position/ open orders are returned * * @return positions */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2ResponseResultAssetsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2ResponseResultAssetsInner.java index 4ecfa13df..93eb20906 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2ResponseResultAssetsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2ResponseResultAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountInformationV2ResponseResultAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationV2ResponseResultAssetsInner extends BaseDTO { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -111,18 +111,18 @@ public class AccountInformationV2ResponseResultAssetsInner extends BaseDTO { @jakarta.annotation.Nullable private String maxWithdrawAmount; - public static final String SERIALIZED_NAME_UPDATE_TIME = "updateTime"; - - @SerializedName(SERIALIZED_NAME_UPDATE_TIME) - @jakarta.annotation.Nullable - private Long updateTime; - public static final String SERIALIZED_NAME_MARGIN_AVAILABLE = "marginAvailable"; @SerializedName(SERIALIZED_NAME_MARGIN_AVAILABLE) @jakarta.annotation.Nullable private Boolean marginAvailable; + public static final String SERIALIZED_NAME_UPDATE_TIME = "updateTime"; + + @SerializedName(SERIALIZED_NAME_UPDATE_TIME) + @jakarta.annotation.Nullable + private Long updateTime; + public AccountInformationV2ResponseResultAssetsInner() {} public AccountInformationV2ResponseResultAssetsInner asset( @@ -132,7 +132,7 @@ public AccountInformationV2ResponseResultAssetsInner asset( } /** - * Get asset + * asset name * * @return asset */ @@ -152,7 +152,7 @@ public AccountInformationV2ResponseResultAssetsInner walletBalance( } /** - * Get walletBalance + * wallet balance * * @return walletBalance */ @@ -172,7 +172,7 @@ public AccountInformationV2ResponseResultAssetsInner unrealizedProfit( } /** - * Get unrealizedProfit + * unrealized profit * * @return unrealizedProfit */ @@ -192,7 +192,7 @@ public AccountInformationV2ResponseResultAssetsInner marginBalance( } /** - * Get marginBalance + * margin balance * * @return marginBalance */ @@ -212,7 +212,7 @@ public AccountInformationV2ResponseResultAssetsInner maintMargin( } /** - * Get maintMargin + * maintenance margin required * * @return maintMargin */ @@ -232,7 +232,7 @@ public AccountInformationV2ResponseResultAssetsInner initialMargin( } /** - * Get initialMargin + * total initial margin required with current mark price * * @return initialMargin */ @@ -252,7 +252,7 @@ public AccountInformationV2ResponseResultAssetsInner positionInitialMargin( } /** - * Get positionInitialMargin + * initial margin required for positions with current mark price * * @return positionInitialMargin */ @@ -273,7 +273,7 @@ public AccountInformationV2ResponseResultAssetsInner openOrderInitialMargin( } /** - * Get openOrderInitialMargin + * initial margin required for open orders with current mark price * * @return openOrderInitialMargin */ @@ -294,7 +294,7 @@ public AccountInformationV2ResponseResultAssetsInner crossWalletBalance( } /** - * Get crossWalletBalance + * crossed wallet balance * * @return crossWalletBalance */ @@ -314,7 +314,7 @@ public AccountInformationV2ResponseResultAssetsInner crossUnPnl( } /** - * Get crossUnPnl + * unrealized profit of crossed positions * * @return crossUnPnl */ @@ -334,7 +334,7 @@ public AccountInformationV2ResponseResultAssetsInner availableBalance( } /** - * Get availableBalance + * available balance, only for USDT asset * * @return availableBalance */ @@ -354,7 +354,7 @@ public AccountInformationV2ResponseResultAssetsInner maxWithdrawAmount( } /** - * Get maxWithdrawAmount + * maximum amount for transfer out, only for USDT asset * * @return maxWithdrawAmount */ @@ -367,44 +367,44 @@ public void setMaxWithdrawAmount(@jakarta.annotation.Nullable String maxWithdraw this.maxWithdrawAmount = maxWithdrawAmount; } - public AccountInformationV2ResponseResultAssetsInner updateTime( - @jakarta.annotation.Nullable Long updateTime) { - this.updateTime = updateTime; + public AccountInformationV2ResponseResultAssetsInner marginAvailable( + @jakarta.annotation.Nullable Boolean marginAvailable) { + this.marginAvailable = marginAvailable; return this; } /** - * Get updateTime + * whether the asset can be used as margin in Multi-Assets mode * - * @return updateTime + * @return marginAvailable */ @jakarta.annotation.Nullable - public Long getUpdateTime() { - return updateTime; + public Boolean getMarginAvailable() { + return marginAvailable; } - public void setUpdateTime(@jakarta.annotation.Nullable Long updateTime) { - this.updateTime = updateTime; + public void setMarginAvailable(@jakarta.annotation.Nullable Boolean marginAvailable) { + this.marginAvailable = marginAvailable; } - public AccountInformationV2ResponseResultAssetsInner marginAvailable( - @jakarta.annotation.Nullable Boolean marginAvailable) { - this.marginAvailable = marginAvailable; + public AccountInformationV2ResponseResultAssetsInner updateTime( + @jakarta.annotation.Nullable Long updateTime) { + this.updateTime = updateTime; return this; } /** - * Get marginAvailable + * last update time * - * @return marginAvailable + * @return updateTime */ @jakarta.annotation.Nullable - public Boolean getMarginAvailable() { - return marginAvailable; + public Long getUpdateTime() { + return updateTime; } - public void setMarginAvailable(@jakarta.annotation.Nullable Boolean marginAvailable) { - this.marginAvailable = marginAvailable; + public void setUpdateTime(@jakarta.annotation.Nullable Long updateTime) { + this.updateTime = updateTime; } @Override @@ -450,11 +450,11 @@ public boolean equals(Object o) { && Objects.equals( this.maxWithdrawAmount, accountInformationV2ResponseResultAssetsInner.maxWithdrawAmount) - && Objects.equals( - this.updateTime, accountInformationV2ResponseResultAssetsInner.updateTime) && Objects.equals( this.marginAvailable, - accountInformationV2ResponseResultAssetsInner.marginAvailable); + accountInformationV2ResponseResultAssetsInner.marginAvailable) + && Objects.equals( + this.updateTime, accountInformationV2ResponseResultAssetsInner.updateTime); } @Override @@ -472,8 +472,8 @@ public int hashCode() { crossUnPnl, availableBalance, maxWithdrawAmount, - updateTime, - marginAvailable); + marginAvailable, + updateTime); } @Override @@ -498,8 +498,8 @@ public String toString() { sb.append(" crossUnPnl: ").append(toIndentedString(crossUnPnl)).append("\n"); sb.append(" availableBalance: ").append(toIndentedString(availableBalance)).append("\n"); sb.append(" maxWithdrawAmount: ").append(toIndentedString(maxWithdrawAmount)).append("\n"); - sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); sb.append(" marginAvailable: ").append(toIndentedString(marginAvailable)).append("\n"); + sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); sb.append("}"); return sb.toString(); } @@ -568,16 +568,16 @@ public String toUrlQueryString() { String maxWithdrawAmountValueAsString = maxWithdrawAmountValue.toString(); valMap.put("maxWithdrawAmount", maxWithdrawAmountValueAsString); } - Long updateTimeValue = getUpdateTime(); - if (updateTimeValue != null) { - String updateTimeValueAsString = updateTimeValue.toString(); - valMap.put("updateTime", updateTimeValueAsString); - } Boolean marginAvailableValue = getMarginAvailable(); if (marginAvailableValue != null) { String marginAvailableValueAsString = marginAvailableValue.toString(); valMap.put("marginAvailable", marginAvailableValueAsString); } + Long updateTimeValue = getUpdateTime(); + if (updateTimeValue != null) { + String updateTimeValueAsString = updateTimeValue.toString(); + valMap.put("updateTime", updateTimeValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -637,14 +637,14 @@ public Map toMap() { if (maxWithdrawAmountValue != null) { valMap.put("maxWithdrawAmount", maxWithdrawAmountValue); } - Object updateTimeValue = getUpdateTime(); - if (updateTimeValue != null) { - valMap.put("updateTime", updateTimeValue); - } Object marginAvailableValue = getMarginAvailable(); if (marginAvailableValue != null) { valMap.put("marginAvailable", marginAvailableValue); } + Object updateTimeValue = getUpdateTime(); + if (updateTimeValue != null) { + valMap.put("updateTime", updateTimeValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -683,8 +683,8 @@ private String toIndentedString(Object o) { openapiFields.add("crossUnPnl"); openapiFields.add("availableBalance"); openapiFields.add("maxWithdrawAmount"); - openapiFields.add("updateTime"); openapiFields.add("marginAvailable"); + openapiFields.add("updateTime"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2ResponseResultPositionsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2ResponseResultPositionsInner.java index dc2ba41c5..a6b0fa159 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2ResponseResultPositionsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AccountInformationV2ResponseResultPositionsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountInformationV2ResponseResultPositionsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInformationV2ResponseResultPositionsInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -128,7 +128,7 @@ public AccountInformationV2ResponseResultPositionsInner positionSide( } /** - * Get positionSide + * position side * * @return positionSide */ @@ -168,7 +168,7 @@ public AccountInformationV2ResponseResultPositionsInner unrealizedProfit( } /** - * Get unrealizedProfit + * unrealized profit * * @return unrealizedProfit */ @@ -248,7 +248,7 @@ public AccountInformationV2ResponseResultPositionsInner initialMargin( } /** - * Get initialMargin + * total initial margin required with current mark price * * @return initialMargin */ @@ -268,7 +268,7 @@ public AccountInformationV2ResponseResultPositionsInner maintMargin( } /** - * Get maintMargin + * maintenance margin required * * @return maintMargin */ @@ -288,7 +288,7 @@ public AccountInformationV2ResponseResultPositionsInner updateTime( } /** - * Get updateTime + * last update time * * @return updateTime */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AlgoType.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AlgoType.java new file mode 100644 index 000000000..9516794a9 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/AlgoType.java @@ -0,0 +1,71 @@ +/* + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Only support `CONDITIONAL` */ +@JsonAdapter(AlgoType.Adapter.class) +public enum AlgoType { + CONDITIONAL("CONDITIONAL"); + + private String value; + + AlgoType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AlgoType fromValue(String value) { + for (AlgoType b : AlgoType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AlgoType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AlgoType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AlgoType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AlgoType.fromValue(value); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelAlgoOrderRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelAlgoOrderRequest.java index cdbdb658b..d7b57a966 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelAlgoOrderRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelAlgoOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** CancelAlgoOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelAlgoOrderRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -71,7 +71,7 @@ public CancelAlgoOrderRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Id. * * @return id */ @@ -90,7 +90,7 @@ public CancelAlgoOrderRequest algoId(@jakarta.annotation.Nullable Long algoId) { } /** - * Get algoId + * Algo Id. * * @return algoId */ @@ -109,7 +109,7 @@ public CancelAlgoOrderRequest clientAlgoId(@jakarta.annotation.Nullable String c } /** - * Get clientAlgoId + * Client Algo Id. * * @return clientAlgoId */ @@ -128,7 +128,7 @@ public CancelAlgoOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvW } /** - * Get recvWindow + * Recv Window. * * @return recvWindow */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelAlgoOrderResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelAlgoOrderResponse.java index 86b1f6479..ddccddf31 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelAlgoOrderResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelAlgoOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** CancelAlgoOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelAlgoOrderResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelAlgoOrderResponseRateLimitsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelAlgoOrderResponseRateLimitsInner.java index 25ec84015..342e6525f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelAlgoOrderResponseRateLimitsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelAlgoOrderResponseRateLimitsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** CancelAlgoOrderResponseRateLimitsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelAlgoOrderResponseRateLimitsInner extends BaseDTO { public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelAlgoOrderResponseResult.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelAlgoOrderResponseResult.java index 3e38e7a88..012a25ecf 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelAlgoOrderResponseResult.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelAlgoOrderResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** CancelAlgoOrderResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelAlgoOrderResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelOrderRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelOrderRequest.java index c3cc8e1b0..a35f69654 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelOrderRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** CancelOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelOrderRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -77,7 +77,7 @@ public CancelOrderRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Id. * * @return id */ @@ -96,7 +96,7 @@ public CancelOrderRequest symbol(@jakarta.annotation.Nonnull String symbol) { } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -116,7 +116,7 @@ public CancelOrderRequest orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Order Id. * * @return orderId */ @@ -136,7 +136,7 @@ public CancelOrderRequest origClientOrderId( } /** - * Get origClientOrderId + * Orig Client Order Id. * * @return origClientOrderId */ @@ -155,7 +155,7 @@ public CancelOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvWindo } /** - * Get recvWindow + * Recv Window. * * @return recvWindow */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelOrderResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelOrderResponse.java index c4fa5d74e..87ed29016 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelOrderResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** CancelOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelOrderResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelOrderResponseRateLimitsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelOrderResponseRateLimitsInner.java index c68e661af..16286d9e4 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelOrderResponseRateLimitsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelOrderResponseRateLimitsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** CancelOrderResponseRateLimitsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelOrderResponseRateLimitsInner extends BaseDTO { public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelOrderResponseResult.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelOrderResponseResult.java index 425bed97b..026aa9305 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelOrderResponseResult.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CancelOrderResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** CancelOrderResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelOrderResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -51,12 +51,6 @@ public class CancelOrderResponseResult extends BaseDTO { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_QUOTE = "cumQuote"; - - @SerializedName(SERIALIZED_NAME_CUM_QUOTE) - @jakarta.annotation.Nullable - private String cumQuote; - public static final String SERIALIZED_NAME_EXECUTED_QTY = "executedQty"; @SerializedName(SERIALIZED_NAME_EXECUTED_QTY) @@ -231,25 +225,6 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public CancelOrderResponseResult cumQuote(@jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - return this; - } - - /** - * Get cumQuote - * - * @return cumQuote - */ - @jakarta.annotation.Nullable - public String getCumQuote() { - return cumQuote; - } - - public void setCumQuote(@jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - } - public CancelOrderResponseResult executedQty(@jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; return this; @@ -685,7 +660,6 @@ public boolean equals(Object o) { CancelOrderResponseResult cancelOrderResponseResult = (CancelOrderResponseResult) o; return Objects.equals(this.clientOrderId, cancelOrderResponseResult.clientOrderId) && Objects.equals(this.cumQty, cancelOrderResponseResult.cumQty) - && Objects.equals(this.cumQuote, cancelOrderResponseResult.cumQuote) && Objects.equals(this.executedQty, cancelOrderResponseResult.executedQty) && Objects.equals(this.orderId, cancelOrderResponseResult.orderId) && Objects.equals(this.origQty, cancelOrderResponseResult.origQty) @@ -717,7 +691,6 @@ public int hashCode() { return Objects.hash( clientOrderId, cumQty, - cumQuote, executedQty, orderId, origQty, @@ -748,7 +721,6 @@ public String toString() { sb.append("class CancelOrderResponseResult {\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumQuote: ").append(toIndentedString(cumQuote)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); @@ -791,11 +763,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = cumQtyValue.toString(); valMap.put("cumQty", cumQtyValueAsString); } - String cumQuoteValue = getCumQuote(); - if (cumQuoteValue != null) { - String cumQuoteValueAsString = cumQuoteValue.toString(); - valMap.put("cumQuote", cumQuoteValueAsString); - } String executedQtyValue = getExecutedQty(); if (executedQtyValue != null) { String executedQtyValueAsString = executedQtyValue.toString(); @@ -925,10 +892,6 @@ public Map toMap() { if (cumQtyValue != null) { valMap.put("cumQty", cumQtyValue); } - Object cumQuoteValue = getCumQuote(); - if (cumQuoteValue != null) { - valMap.put("cumQuote", cumQuoteValue); - } Object executedQtyValue = getExecutedQty(); if (executedQtyValue != null) { valMap.put("executedQty", executedQtyValue); @@ -1045,7 +1008,6 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("clientOrderId"); openapiFields.add("cumQty"); - openapiFields.add("cumQuote"); openapiFields.add("executedQty"); openapiFields.add("orderId"); openapiFields.add("origQty"); @@ -1119,14 +1081,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumQuote") != null && !jsonObj.get("cumQuote").isJsonNull()) - && !jsonObj.get("cumQuote").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumQuote` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("cumQuote").toString())); - } if ((jsonObj.get("executedQty") != null && !jsonObj.get("executedQty").isJsonNull()) && !jsonObj.get("executedQty").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ClosePosition.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ClosePosition.java new file mode 100644 index 000000000..a6cebcf50 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ClosePosition.java @@ -0,0 +1,73 @@ +/* + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Close-All,used with STOP_MARKET or TAKE_PROFIT_MARKET. */ +@JsonAdapter(ClosePosition.Adapter.class) +public enum ClosePosition { + TRUE("true"), + + FALSE("false"); + + private String value; + + ClosePosition(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ClosePosition fromValue(String value) { + for (ClosePosition b : ClosePosition.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ClosePosition enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ClosePosition read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ClosePosition.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ClosePosition.fromValue(value); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CloseUserDataStreamRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CloseUserDataStreamRequest.java index 02a47e959..74371f5e9 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CloseUserDataStreamRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CloseUserDataStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** CloseUserDataStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CloseUserDataStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -53,7 +53,7 @@ public CloseUserDataStreamRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Id. * * @return id */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CloseUserDataStreamResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CloseUserDataStreamResponse.java index aecf663bd..bb8c074a4 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CloseUserDataStreamResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/CloseUserDataStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** CloseUserDataStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CloseUserDataStreamResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceRequest.java index 8bceec410..98a93c612 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** FuturesAccountBalanceRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesAccountBalanceRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -59,7 +59,7 @@ public FuturesAccountBalanceRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Id. * * @return id */ @@ -78,7 +78,7 @@ public FuturesAccountBalanceRequest recvWindow(@jakarta.annotation.Nullable Long } /** - * Get recvWindow + * Recv Window. * * @return recvWindow */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceResponse.java index ccb02dfe6..1e50c59b3 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** FuturesAccountBalanceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesAccountBalanceResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -59,13 +59,13 @@ public class FuturesAccountBalanceResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RESULT) @jakarta.annotation.Nullable - private List<@Valid FuturesAccountBalanceV2ResponseResultInner> result; + private List<@Valid FuturesAccountBalanceResponseResultInner> result; public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits; + private List<@Valid AccountInformationResponseRateLimitsInner> rateLimits; public FuturesAccountBalanceResponse() {} @@ -109,13 +109,13 @@ public void setStatus(@jakarta.annotation.Nullable Long status) { public FuturesAccountBalanceResponse result( @jakarta.annotation.Nullable - List<@Valid FuturesAccountBalanceV2ResponseResultInner> result) { + List<@Valid FuturesAccountBalanceResponseResultInner> result) { this.result = result; return this; } public FuturesAccountBalanceResponse addResultItem( - FuturesAccountBalanceV2ResponseResultInner resultItem) { + FuturesAccountBalanceResponseResultInner resultItem) { if (this.result == null) { this.result = new ArrayList<>(); } @@ -130,25 +130,25 @@ public FuturesAccountBalanceResponse addResultItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid FuturesAccountBalanceV2ResponseResultInner> getResult() { + public List<@Valid FuturesAccountBalanceResponseResultInner> getResult() { return result; } public void setResult( @jakarta.annotation.Nullable - List<@Valid FuturesAccountBalanceV2ResponseResultInner> result) { + List<@Valid FuturesAccountBalanceResponseResultInner> result) { this.result = result; } public FuturesAccountBalanceResponse rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits) { + List<@Valid AccountInformationResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public FuturesAccountBalanceResponse addRateLimitsItem( - AccountInformationV2ResponseRateLimitsInner rateLimitsItem) { + AccountInformationResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -163,13 +163,13 @@ public FuturesAccountBalanceResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountInformationV2ResponseRateLimitsInner> getRateLimits() { + public List<@Valid AccountInformationResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits) { + List<@Valid AccountInformationResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -220,12 +220,12 @@ public String toUrlQueryString() { String statusValueAsString = statusValue.toString(); valMap.put("status", statusValueAsString); } - List<@Valid FuturesAccountBalanceV2ResponseResultInner> resultValue = getResult(); + List<@Valid FuturesAccountBalanceResponseResultInner> resultValue = getResult(); if (resultValue != null) { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid AccountInformationResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -345,7 +345,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `result` (array) for (int i = 0; i < jsonArrayresult.size(); i++) { - FuturesAccountBalanceV2ResponseResultInner.validateJsonElement( + FuturesAccountBalanceResponseResultInner.validateJsonElement( jsonArrayresult.get(i)); } ; @@ -365,7 +365,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountInformationV2ResponseRateLimitsInner.validateJsonElement( + AccountInformationResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceResponseResultInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceResponseResultInner.java new file mode 100644 index 000000000..882e2e6a2 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceResponseResultInner.java @@ -0,0 +1,630 @@ +/* + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** FuturesAccountBalanceResponseResultInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class FuturesAccountBalanceResponseResultInner extends BaseDTO { + public static final String SERIALIZED_NAME_ACCOUNT_ALIAS = "accountAlias"; + + @SerializedName(SERIALIZED_NAME_ACCOUNT_ALIAS) + @jakarta.annotation.Nullable + private String accountAlias; + + public static final String SERIALIZED_NAME_ASSET = "asset"; + + @SerializedName(SERIALIZED_NAME_ASSET) + @jakarta.annotation.Nullable + private String asset; + + public static final String SERIALIZED_NAME_BALANCE = "balance"; + + @SerializedName(SERIALIZED_NAME_BALANCE) + @jakarta.annotation.Nullable + private String balance; + + public static final String SERIALIZED_NAME_CROSS_WALLET_BALANCE = "crossWalletBalance"; + + @SerializedName(SERIALIZED_NAME_CROSS_WALLET_BALANCE) + @jakarta.annotation.Nullable + private String crossWalletBalance; + + public static final String SERIALIZED_NAME_CROSS_UN_PNL = "crossUnPnl"; + + @SerializedName(SERIALIZED_NAME_CROSS_UN_PNL) + @jakarta.annotation.Nullable + private String crossUnPnl; + + public static final String SERIALIZED_NAME_AVAILABLE_BALANCE = "availableBalance"; + + @SerializedName(SERIALIZED_NAME_AVAILABLE_BALANCE) + @jakarta.annotation.Nullable + private String availableBalance; + + public static final String SERIALIZED_NAME_MAX_WITHDRAW_AMOUNT = "maxWithdrawAmount"; + + @SerializedName(SERIALIZED_NAME_MAX_WITHDRAW_AMOUNT) + @jakarta.annotation.Nullable + private String maxWithdrawAmount; + + public static final String SERIALIZED_NAME_MARGIN_AVAILABLE = "marginAvailable"; + + @SerializedName(SERIALIZED_NAME_MARGIN_AVAILABLE) + @jakarta.annotation.Nullable + private Boolean marginAvailable; + + public static final String SERIALIZED_NAME_UPDATE_TIME = "updateTime"; + + @SerializedName(SERIALIZED_NAME_UPDATE_TIME) + @jakarta.annotation.Nullable + private Long updateTime; + + public FuturesAccountBalanceResponseResultInner() {} + + public FuturesAccountBalanceResponseResultInner accountAlias( + @jakarta.annotation.Nullable String accountAlias) { + this.accountAlias = accountAlias; + return this; + } + + /** + * unique account code + * + * @return accountAlias + */ + @jakarta.annotation.Nullable + public String getAccountAlias() { + return accountAlias; + } + + public void setAccountAlias(@jakarta.annotation.Nullable String accountAlias) { + this.accountAlias = accountAlias; + } + + public FuturesAccountBalanceResponseResultInner asset( + @jakarta.annotation.Nullable String asset) { + this.asset = asset; + return this; + } + + /** + * asset name + * + * @return asset + */ + @jakarta.annotation.Nullable + public String getAsset() { + return asset; + } + + public void setAsset(@jakarta.annotation.Nullable String asset) { + this.asset = asset; + } + + public FuturesAccountBalanceResponseResultInner balance( + @jakarta.annotation.Nullable String balance) { + this.balance = balance; + return this; + } + + /** + * wallet balance + * + * @return balance + */ + @jakarta.annotation.Nullable + public String getBalance() { + return balance; + } + + public void setBalance(@jakarta.annotation.Nullable String balance) { + this.balance = balance; + } + + public FuturesAccountBalanceResponseResultInner crossWalletBalance( + @jakarta.annotation.Nullable String crossWalletBalance) { + this.crossWalletBalance = crossWalletBalance; + return this; + } + + /** + * crossed wallet balance + * + * @return crossWalletBalance + */ + @jakarta.annotation.Nullable + public String getCrossWalletBalance() { + return crossWalletBalance; + } + + public void setCrossWalletBalance(@jakarta.annotation.Nullable String crossWalletBalance) { + this.crossWalletBalance = crossWalletBalance; + } + + public FuturesAccountBalanceResponseResultInner crossUnPnl( + @jakarta.annotation.Nullable String crossUnPnl) { + this.crossUnPnl = crossUnPnl; + return this; + } + + /** + * unrealized profit of crossed positions + * + * @return crossUnPnl + */ + @jakarta.annotation.Nullable + public String getCrossUnPnl() { + return crossUnPnl; + } + + public void setCrossUnPnl(@jakarta.annotation.Nullable String crossUnPnl) { + this.crossUnPnl = crossUnPnl; + } + + public FuturesAccountBalanceResponseResultInner availableBalance( + @jakarta.annotation.Nullable String availableBalance) { + this.availableBalance = availableBalance; + return this; + } + + /** + * available balance + * + * @return availableBalance + */ + @jakarta.annotation.Nullable + public String getAvailableBalance() { + return availableBalance; + } + + public void setAvailableBalance(@jakarta.annotation.Nullable String availableBalance) { + this.availableBalance = availableBalance; + } + + public FuturesAccountBalanceResponseResultInner maxWithdrawAmount( + @jakarta.annotation.Nullable String maxWithdrawAmount) { + this.maxWithdrawAmount = maxWithdrawAmount; + return this; + } + + /** + * maximum amount for transfer out + * + * @return maxWithdrawAmount + */ + @jakarta.annotation.Nullable + public String getMaxWithdrawAmount() { + return maxWithdrawAmount; + } + + public void setMaxWithdrawAmount(@jakarta.annotation.Nullable String maxWithdrawAmount) { + this.maxWithdrawAmount = maxWithdrawAmount; + } + + public FuturesAccountBalanceResponseResultInner marginAvailable( + @jakarta.annotation.Nullable Boolean marginAvailable) { + this.marginAvailable = marginAvailable; + return this; + } + + /** + * whether the asset can be used as margin in Multi-Assets mode + * + * @return marginAvailable + */ + @jakarta.annotation.Nullable + public Boolean getMarginAvailable() { + return marginAvailable; + } + + public void setMarginAvailable(@jakarta.annotation.Nullable Boolean marginAvailable) { + this.marginAvailable = marginAvailable; + } + + public FuturesAccountBalanceResponseResultInner updateTime( + @jakarta.annotation.Nullable Long updateTime) { + this.updateTime = updateTime; + return this; + } + + /** + * Get updateTime + * + * @return updateTime + */ + @jakarta.annotation.Nullable + public Long getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(@jakarta.annotation.Nullable Long updateTime) { + this.updateTime = updateTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FuturesAccountBalanceResponseResultInner futuresAccountBalanceResponseResultInner = + (FuturesAccountBalanceResponseResultInner) o; + return Objects.equals( + this.accountAlias, futuresAccountBalanceResponseResultInner.accountAlias) + && Objects.equals(this.asset, futuresAccountBalanceResponseResultInner.asset) + && Objects.equals(this.balance, futuresAccountBalanceResponseResultInner.balance) + && Objects.equals( + this.crossWalletBalance, + futuresAccountBalanceResponseResultInner.crossWalletBalance) + && Objects.equals( + this.crossUnPnl, futuresAccountBalanceResponseResultInner.crossUnPnl) + && Objects.equals( + this.availableBalance, + futuresAccountBalanceResponseResultInner.availableBalance) + && Objects.equals( + this.maxWithdrawAmount, + futuresAccountBalanceResponseResultInner.maxWithdrawAmount) + && Objects.equals( + this.marginAvailable, + futuresAccountBalanceResponseResultInner.marginAvailable) + && Objects.equals( + this.updateTime, futuresAccountBalanceResponseResultInner.updateTime); + } + + @Override + public int hashCode() { + return Objects.hash( + accountAlias, + asset, + balance, + crossWalletBalance, + crossUnPnl, + availableBalance, + maxWithdrawAmount, + marginAvailable, + updateTime); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FuturesAccountBalanceResponseResultInner {\n"); + sb.append(" accountAlias: ").append(toIndentedString(accountAlias)).append("\n"); + sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" crossWalletBalance: ") + .append(toIndentedString(crossWalletBalance)) + .append("\n"); + sb.append(" crossUnPnl: ").append(toIndentedString(crossUnPnl)).append("\n"); + sb.append(" availableBalance: ").append(toIndentedString(availableBalance)).append("\n"); + sb.append(" maxWithdrawAmount: ").append(toIndentedString(maxWithdrawAmount)).append("\n"); + sb.append(" marginAvailable: ").append(toIndentedString(marginAvailable)).append("\n"); + sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String accountAliasValue = getAccountAlias(); + if (accountAliasValue != null) { + String accountAliasValueAsString = accountAliasValue.toString(); + valMap.put("accountAlias", accountAliasValueAsString); + } + String assetValue = getAsset(); + if (assetValue != null) { + String assetValueAsString = assetValue.toString(); + valMap.put("asset", assetValueAsString); + } + String balanceValue = getBalance(); + if (balanceValue != null) { + String balanceValueAsString = balanceValue.toString(); + valMap.put("balance", balanceValueAsString); + } + String crossWalletBalanceValue = getCrossWalletBalance(); + if (crossWalletBalanceValue != null) { + String crossWalletBalanceValueAsString = crossWalletBalanceValue.toString(); + valMap.put("crossWalletBalance", crossWalletBalanceValueAsString); + } + String crossUnPnlValue = getCrossUnPnl(); + if (crossUnPnlValue != null) { + String crossUnPnlValueAsString = crossUnPnlValue.toString(); + valMap.put("crossUnPnl", crossUnPnlValueAsString); + } + String availableBalanceValue = getAvailableBalance(); + if (availableBalanceValue != null) { + String availableBalanceValueAsString = availableBalanceValue.toString(); + valMap.put("availableBalance", availableBalanceValueAsString); + } + String maxWithdrawAmountValue = getMaxWithdrawAmount(); + if (maxWithdrawAmountValue != null) { + String maxWithdrawAmountValueAsString = maxWithdrawAmountValue.toString(); + valMap.put("maxWithdrawAmount", maxWithdrawAmountValueAsString); + } + Boolean marginAvailableValue = getMarginAvailable(); + if (marginAvailableValue != null) { + String marginAvailableValueAsString = marginAvailableValue.toString(); + valMap.put("marginAvailable", marginAvailableValueAsString); + } + Long updateTimeValue = getUpdateTime(); + if (updateTimeValue != null) { + String updateTimeValueAsString = updateTimeValue.toString(); + valMap.put("updateTime", updateTimeValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object accountAliasValue = getAccountAlias(); + if (accountAliasValue != null) { + valMap.put("accountAlias", accountAliasValue); + } + Object assetValue = getAsset(); + if (assetValue != null) { + valMap.put("asset", assetValue); + } + Object balanceValue = getBalance(); + if (balanceValue != null) { + valMap.put("balance", balanceValue); + } + Object crossWalletBalanceValue = getCrossWalletBalance(); + if (crossWalletBalanceValue != null) { + valMap.put("crossWalletBalance", crossWalletBalanceValue); + } + Object crossUnPnlValue = getCrossUnPnl(); + if (crossUnPnlValue != null) { + valMap.put("crossUnPnl", crossUnPnlValue); + } + Object availableBalanceValue = getAvailableBalance(); + if (availableBalanceValue != null) { + valMap.put("availableBalance", availableBalanceValue); + } + Object maxWithdrawAmountValue = getMaxWithdrawAmount(); + if (maxWithdrawAmountValue != null) { + valMap.put("maxWithdrawAmount", maxWithdrawAmountValue); + } + Object marginAvailableValue = getMarginAvailable(); + if (marginAvailableValue != null) { + valMap.put("marginAvailable", marginAvailableValue); + } + Object updateTimeValue = getUpdateTime(); + if (updateTimeValue != null) { + valMap.put("updateTime", updateTimeValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("accountAlias"); + openapiFields.add("asset"); + openapiFields.add("balance"); + openapiFields.add("crossWalletBalance"); + openapiFields.add("crossUnPnl"); + openapiFields.add("availableBalance"); + openapiFields.add("maxWithdrawAmount"); + openapiFields.add("marginAvailable"); + openapiFields.add("updateTime"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * FuturesAccountBalanceResponseResultInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FuturesAccountBalanceResponseResultInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " FuturesAccountBalanceResponseResultInner is not found in" + + " the empty JSON string", + FuturesAccountBalanceResponseResultInner.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FuturesAccountBalanceResponseResultInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `FuturesAccountBalanceResponseResultInner` properties." + + " JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("accountAlias") != null && !jsonObj.get("accountAlias").isJsonNull()) + && !jsonObj.get("accountAlias").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `accountAlias` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("accountAlias").toString())); + } + if ((jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) + && !jsonObj.get("asset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `asset` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("asset").toString())); + } + if ((jsonObj.get("balance") != null && !jsonObj.get("balance").isJsonNull()) + && !jsonObj.get("balance").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `balance` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("balance").toString())); + } + if ((jsonObj.get("crossWalletBalance") != null + && !jsonObj.get("crossWalletBalance").isJsonNull()) + && !jsonObj.get("crossWalletBalance").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `crossWalletBalance` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("crossWalletBalance").toString())); + } + if ((jsonObj.get("crossUnPnl") != null && !jsonObj.get("crossUnPnl").isJsonNull()) + && !jsonObj.get("crossUnPnl").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `crossUnPnl` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("crossUnPnl").toString())); + } + if ((jsonObj.get("availableBalance") != null + && !jsonObj.get("availableBalance").isJsonNull()) + && !jsonObj.get("availableBalance").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `availableBalance` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("availableBalance").toString())); + } + if ((jsonObj.get("maxWithdrawAmount") != null + && !jsonObj.get("maxWithdrawAmount").isJsonNull()) + && !jsonObj.get("maxWithdrawAmount").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `maxWithdrawAmount` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("maxWithdrawAmount").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FuturesAccountBalanceResponseResultInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'FuturesAccountBalanceResponseResultInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(FuturesAccountBalanceResponseResultInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, FuturesAccountBalanceResponseResultInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FuturesAccountBalanceResponseResultInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of FuturesAccountBalanceResponseResultInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of FuturesAccountBalanceResponseResultInner + * @throws IOException if the JSON string is invalid with respect to + * FuturesAccountBalanceResponseResultInner + */ + public static FuturesAccountBalanceResponseResultInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, FuturesAccountBalanceResponseResultInner.class); + } + + /** + * Convert an instance of FuturesAccountBalanceResponseResultInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceV2Request.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceV2Request.java index b50b8d7ff..b6990bc2f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceV2Request.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceV2Request.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** FuturesAccountBalanceV2Request */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesAccountBalanceV2Request extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -59,7 +59,7 @@ public FuturesAccountBalanceV2Request id(@jakarta.annotation.Nullable String id) } /** - * Get id + * Id. * * @return id */ @@ -78,7 +78,7 @@ public FuturesAccountBalanceV2Request recvWindow(@jakarta.annotation.Nullable Lo } /** - * Get recvWindow + * Recv Window. * * @return recvWindow */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceV2Response.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceV2Response.java index 5e7d7c885..0421e39b8 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceV2Response.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceV2Response.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** FuturesAccountBalanceV2Response */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesAccountBalanceV2Response extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -59,13 +59,13 @@ public class FuturesAccountBalanceV2Response extends BaseDTO { @SerializedName(SERIALIZED_NAME_RESULT) @jakarta.annotation.Nullable - private List<@Valid FuturesAccountBalanceV2ResponseResultInner> result; + private List<@Valid FuturesAccountBalanceResponseResultInner> result; public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits; + private List<@Valid AccountInformationResponseRateLimitsInner> rateLimits; public FuturesAccountBalanceV2Response() {} @@ -109,13 +109,13 @@ public void setStatus(@jakarta.annotation.Nullable Long status) { public FuturesAccountBalanceV2Response result( @jakarta.annotation.Nullable - List<@Valid FuturesAccountBalanceV2ResponseResultInner> result) { + List<@Valid FuturesAccountBalanceResponseResultInner> result) { this.result = result; return this; } public FuturesAccountBalanceV2Response addResultItem( - FuturesAccountBalanceV2ResponseResultInner resultItem) { + FuturesAccountBalanceResponseResultInner resultItem) { if (this.result == null) { this.result = new ArrayList<>(); } @@ -130,25 +130,25 @@ public FuturesAccountBalanceV2Response addResultItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid FuturesAccountBalanceV2ResponseResultInner> getResult() { + public List<@Valid FuturesAccountBalanceResponseResultInner> getResult() { return result; } public void setResult( @jakarta.annotation.Nullable - List<@Valid FuturesAccountBalanceV2ResponseResultInner> result) { + List<@Valid FuturesAccountBalanceResponseResultInner> result) { this.result = result; } public FuturesAccountBalanceV2Response rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits) { + List<@Valid AccountInformationResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public FuturesAccountBalanceV2Response addRateLimitsItem( - AccountInformationV2ResponseRateLimitsInner rateLimitsItem) { + AccountInformationResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -163,13 +163,13 @@ public FuturesAccountBalanceV2Response addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountInformationV2ResponseRateLimitsInner> getRateLimits() { + public List<@Valid AccountInformationResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits) { + List<@Valid AccountInformationResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -220,12 +220,12 @@ public String toUrlQueryString() { String statusValueAsString = statusValue.toString(); valMap.put("status", statusValueAsString); } - List<@Valid FuturesAccountBalanceV2ResponseResultInner> resultValue = getResult(); + List<@Valid FuturesAccountBalanceResponseResultInner> resultValue = getResult(); if (resultValue != null) { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid AccountInformationResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -345,7 +345,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `result` (array) for (int i = 0; i < jsonArrayresult.size(); i++) { - FuturesAccountBalanceV2ResponseResultInner.validateJsonElement( + FuturesAccountBalanceResponseResultInner.validateJsonElement( jsonArrayresult.get(i)); } ; @@ -365,7 +365,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountInformationV2ResponseRateLimitsInner.validateJsonElement( + AccountInformationResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceV2ResponseResultInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceV2ResponseResultInner.java deleted file mode 100644 index b6493b44a..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/FuturesAccountBalanceV2ResponseResultInner.java +++ /dev/null @@ -1,632 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** FuturesAccountBalanceV2ResponseResultInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class FuturesAccountBalanceV2ResponseResultInner extends BaseDTO { - public static final String SERIALIZED_NAME_ACCOUNT_ALIAS = "accountAlias"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ALIAS) - @jakarta.annotation.Nullable - private String accountAlias; - - public static final String SERIALIZED_NAME_ASSET = "asset"; - - @SerializedName(SERIALIZED_NAME_ASSET) - @jakarta.annotation.Nullable - private String asset; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - - @SerializedName(SERIALIZED_NAME_BALANCE) - @jakarta.annotation.Nullable - private String balance; - - public static final String SERIALIZED_NAME_CROSS_WALLET_BALANCE = "crossWalletBalance"; - - @SerializedName(SERIALIZED_NAME_CROSS_WALLET_BALANCE) - @jakarta.annotation.Nullable - private String crossWalletBalance; - - public static final String SERIALIZED_NAME_CROSS_UN_PNL = "crossUnPnl"; - - @SerializedName(SERIALIZED_NAME_CROSS_UN_PNL) - @jakarta.annotation.Nullable - private String crossUnPnl; - - public static final String SERIALIZED_NAME_AVAILABLE_BALANCE = "availableBalance"; - - @SerializedName(SERIALIZED_NAME_AVAILABLE_BALANCE) - @jakarta.annotation.Nullable - private String availableBalance; - - public static final String SERIALIZED_NAME_MAX_WITHDRAW_AMOUNT = "maxWithdrawAmount"; - - @SerializedName(SERIALIZED_NAME_MAX_WITHDRAW_AMOUNT) - @jakarta.annotation.Nullable - private String maxWithdrawAmount; - - public static final String SERIALIZED_NAME_MARGIN_AVAILABLE = "marginAvailable"; - - @SerializedName(SERIALIZED_NAME_MARGIN_AVAILABLE) - @jakarta.annotation.Nullable - private Boolean marginAvailable; - - public static final String SERIALIZED_NAME_UPDATE_TIME = "updateTime"; - - @SerializedName(SERIALIZED_NAME_UPDATE_TIME) - @jakarta.annotation.Nullable - private Long updateTime; - - public FuturesAccountBalanceV2ResponseResultInner() {} - - public FuturesAccountBalanceV2ResponseResultInner accountAlias( - @jakarta.annotation.Nullable String accountAlias) { - this.accountAlias = accountAlias; - return this; - } - - /** - * Get accountAlias - * - * @return accountAlias - */ - @jakarta.annotation.Nullable - public String getAccountAlias() { - return accountAlias; - } - - public void setAccountAlias(@jakarta.annotation.Nullable String accountAlias) { - this.accountAlias = accountAlias; - } - - public FuturesAccountBalanceV2ResponseResultInner asset( - @jakarta.annotation.Nullable String asset) { - this.asset = asset; - return this; - } - - /** - * Get asset - * - * @return asset - */ - @jakarta.annotation.Nullable - public String getAsset() { - return asset; - } - - public void setAsset(@jakarta.annotation.Nullable String asset) { - this.asset = asset; - } - - public FuturesAccountBalanceV2ResponseResultInner balance( - @jakarta.annotation.Nullable String balance) { - this.balance = balance; - return this; - } - - /** - * Get balance - * - * @return balance - */ - @jakarta.annotation.Nullable - public String getBalance() { - return balance; - } - - public void setBalance(@jakarta.annotation.Nullable String balance) { - this.balance = balance; - } - - public FuturesAccountBalanceV2ResponseResultInner crossWalletBalance( - @jakarta.annotation.Nullable String crossWalletBalance) { - this.crossWalletBalance = crossWalletBalance; - return this; - } - - /** - * Get crossWalletBalance - * - * @return crossWalletBalance - */ - @jakarta.annotation.Nullable - public String getCrossWalletBalance() { - return crossWalletBalance; - } - - public void setCrossWalletBalance(@jakarta.annotation.Nullable String crossWalletBalance) { - this.crossWalletBalance = crossWalletBalance; - } - - public FuturesAccountBalanceV2ResponseResultInner crossUnPnl( - @jakarta.annotation.Nullable String crossUnPnl) { - this.crossUnPnl = crossUnPnl; - return this; - } - - /** - * Get crossUnPnl - * - * @return crossUnPnl - */ - @jakarta.annotation.Nullable - public String getCrossUnPnl() { - return crossUnPnl; - } - - public void setCrossUnPnl(@jakarta.annotation.Nullable String crossUnPnl) { - this.crossUnPnl = crossUnPnl; - } - - public FuturesAccountBalanceV2ResponseResultInner availableBalance( - @jakarta.annotation.Nullable String availableBalance) { - this.availableBalance = availableBalance; - return this; - } - - /** - * Get availableBalance - * - * @return availableBalance - */ - @jakarta.annotation.Nullable - public String getAvailableBalance() { - return availableBalance; - } - - public void setAvailableBalance(@jakarta.annotation.Nullable String availableBalance) { - this.availableBalance = availableBalance; - } - - public FuturesAccountBalanceV2ResponseResultInner maxWithdrawAmount( - @jakarta.annotation.Nullable String maxWithdrawAmount) { - this.maxWithdrawAmount = maxWithdrawAmount; - return this; - } - - /** - * Get maxWithdrawAmount - * - * @return maxWithdrawAmount - */ - @jakarta.annotation.Nullable - public String getMaxWithdrawAmount() { - return maxWithdrawAmount; - } - - public void setMaxWithdrawAmount(@jakarta.annotation.Nullable String maxWithdrawAmount) { - this.maxWithdrawAmount = maxWithdrawAmount; - } - - public FuturesAccountBalanceV2ResponseResultInner marginAvailable( - @jakarta.annotation.Nullable Boolean marginAvailable) { - this.marginAvailable = marginAvailable; - return this; - } - - /** - * Get marginAvailable - * - * @return marginAvailable - */ - @jakarta.annotation.Nullable - public Boolean getMarginAvailable() { - return marginAvailable; - } - - public void setMarginAvailable(@jakarta.annotation.Nullable Boolean marginAvailable) { - this.marginAvailable = marginAvailable; - } - - public FuturesAccountBalanceV2ResponseResultInner updateTime( - @jakarta.annotation.Nullable Long updateTime) { - this.updateTime = updateTime; - return this; - } - - /** - * Get updateTime - * - * @return updateTime - */ - @jakarta.annotation.Nullable - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(@jakarta.annotation.Nullable Long updateTime) { - this.updateTime = updateTime; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FuturesAccountBalanceV2ResponseResultInner futuresAccountBalanceV2ResponseResultInner = - (FuturesAccountBalanceV2ResponseResultInner) o; - return Objects.equals( - this.accountAlias, futuresAccountBalanceV2ResponseResultInner.accountAlias) - && Objects.equals(this.asset, futuresAccountBalanceV2ResponseResultInner.asset) - && Objects.equals(this.balance, futuresAccountBalanceV2ResponseResultInner.balance) - && Objects.equals( - this.crossWalletBalance, - futuresAccountBalanceV2ResponseResultInner.crossWalletBalance) - && Objects.equals( - this.crossUnPnl, futuresAccountBalanceV2ResponseResultInner.crossUnPnl) - && Objects.equals( - this.availableBalance, - futuresAccountBalanceV2ResponseResultInner.availableBalance) - && Objects.equals( - this.maxWithdrawAmount, - futuresAccountBalanceV2ResponseResultInner.maxWithdrawAmount) - && Objects.equals( - this.marginAvailable, - futuresAccountBalanceV2ResponseResultInner.marginAvailable) - && Objects.equals( - this.updateTime, futuresAccountBalanceV2ResponseResultInner.updateTime); - } - - @Override - public int hashCode() { - return Objects.hash( - accountAlias, - asset, - balance, - crossWalletBalance, - crossUnPnl, - availableBalance, - maxWithdrawAmount, - marginAvailable, - updateTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FuturesAccountBalanceV2ResponseResultInner {\n"); - sb.append(" accountAlias: ").append(toIndentedString(accountAlias)).append("\n"); - sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" crossWalletBalance: ") - .append(toIndentedString(crossWalletBalance)) - .append("\n"); - sb.append(" crossUnPnl: ").append(toIndentedString(crossUnPnl)).append("\n"); - sb.append(" availableBalance: ").append(toIndentedString(availableBalance)).append("\n"); - sb.append(" maxWithdrawAmount: ").append(toIndentedString(maxWithdrawAmount)).append("\n"); - sb.append(" marginAvailable: ").append(toIndentedString(marginAvailable)).append("\n"); - sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String accountAliasValue = getAccountAlias(); - if (accountAliasValue != null) { - String accountAliasValueAsString = accountAliasValue.toString(); - valMap.put("accountAlias", accountAliasValueAsString); - } - String assetValue = getAsset(); - if (assetValue != null) { - String assetValueAsString = assetValue.toString(); - valMap.put("asset", assetValueAsString); - } - String balanceValue = getBalance(); - if (balanceValue != null) { - String balanceValueAsString = balanceValue.toString(); - valMap.put("balance", balanceValueAsString); - } - String crossWalletBalanceValue = getCrossWalletBalance(); - if (crossWalletBalanceValue != null) { - String crossWalletBalanceValueAsString = crossWalletBalanceValue.toString(); - valMap.put("crossWalletBalance", crossWalletBalanceValueAsString); - } - String crossUnPnlValue = getCrossUnPnl(); - if (crossUnPnlValue != null) { - String crossUnPnlValueAsString = crossUnPnlValue.toString(); - valMap.put("crossUnPnl", crossUnPnlValueAsString); - } - String availableBalanceValue = getAvailableBalance(); - if (availableBalanceValue != null) { - String availableBalanceValueAsString = availableBalanceValue.toString(); - valMap.put("availableBalance", availableBalanceValueAsString); - } - String maxWithdrawAmountValue = getMaxWithdrawAmount(); - if (maxWithdrawAmountValue != null) { - String maxWithdrawAmountValueAsString = maxWithdrawAmountValue.toString(); - valMap.put("maxWithdrawAmount", maxWithdrawAmountValueAsString); - } - Boolean marginAvailableValue = getMarginAvailable(); - if (marginAvailableValue != null) { - String marginAvailableValueAsString = marginAvailableValue.toString(); - valMap.put("marginAvailable", marginAvailableValueAsString); - } - Long updateTimeValue = getUpdateTime(); - if (updateTimeValue != null) { - String updateTimeValueAsString = updateTimeValue.toString(); - valMap.put("updateTime", updateTimeValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object accountAliasValue = getAccountAlias(); - if (accountAliasValue != null) { - valMap.put("accountAlias", accountAliasValue); - } - Object assetValue = getAsset(); - if (assetValue != null) { - valMap.put("asset", assetValue); - } - Object balanceValue = getBalance(); - if (balanceValue != null) { - valMap.put("balance", balanceValue); - } - Object crossWalletBalanceValue = getCrossWalletBalance(); - if (crossWalletBalanceValue != null) { - valMap.put("crossWalletBalance", crossWalletBalanceValue); - } - Object crossUnPnlValue = getCrossUnPnl(); - if (crossUnPnlValue != null) { - valMap.put("crossUnPnl", crossUnPnlValue); - } - Object availableBalanceValue = getAvailableBalance(); - if (availableBalanceValue != null) { - valMap.put("availableBalance", availableBalanceValue); - } - Object maxWithdrawAmountValue = getMaxWithdrawAmount(); - if (maxWithdrawAmountValue != null) { - valMap.put("maxWithdrawAmount", maxWithdrawAmountValue); - } - Object marginAvailableValue = getMarginAvailable(); - if (marginAvailableValue != null) { - valMap.put("marginAvailable", marginAvailableValue); - } - Object updateTimeValue = getUpdateTime(); - if (updateTimeValue != null) { - valMap.put("updateTime", updateTimeValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountAlias"); - openapiFields.add("asset"); - openapiFields.add("balance"); - openapiFields.add("crossWalletBalance"); - openapiFields.add("crossUnPnl"); - openapiFields.add("availableBalance"); - openapiFields.add("maxWithdrawAmount"); - openapiFields.add("marginAvailable"); - openapiFields.add("updateTime"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * FuturesAccountBalanceV2ResponseResultInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FuturesAccountBalanceV2ResponseResultInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " FuturesAccountBalanceV2ResponseResultInner is not found in" - + " the empty JSON string", - FuturesAccountBalanceV2ResponseResultInner.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FuturesAccountBalanceV2ResponseResultInner.openapiFields.contains( - entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FuturesAccountBalanceV2ResponseResultInner` properties." - + " JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("accountAlias") != null && !jsonObj.get("accountAlias").isJsonNull()) - && !jsonObj.get("accountAlias").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `accountAlias` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("accountAlias").toString())); - } - if ((jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) - && !jsonObj.get("asset").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `asset` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("asset").toString())); - } - if ((jsonObj.get("balance") != null && !jsonObj.get("balance").isJsonNull()) - && !jsonObj.get("balance").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `balance` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("balance").toString())); - } - if ((jsonObj.get("crossWalletBalance") != null - && !jsonObj.get("crossWalletBalance").isJsonNull()) - && !jsonObj.get("crossWalletBalance").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `crossWalletBalance` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("crossWalletBalance").toString())); - } - if ((jsonObj.get("crossUnPnl") != null && !jsonObj.get("crossUnPnl").isJsonNull()) - && !jsonObj.get("crossUnPnl").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `crossUnPnl` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("crossUnPnl").toString())); - } - if ((jsonObj.get("availableBalance") != null - && !jsonObj.get("availableBalance").isJsonNull()) - && !jsonObj.get("availableBalance").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `availableBalance` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("availableBalance").toString())); - } - if ((jsonObj.get("maxWithdrawAmount") != null - && !jsonObj.get("maxWithdrawAmount").isJsonNull()) - && !jsonObj.get("maxWithdrawAmount").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `maxWithdrawAmount` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("maxWithdrawAmount").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FuturesAccountBalanceV2ResponseResultInner.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'FuturesAccountBalanceV2ResponseResultInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(FuturesAccountBalanceV2ResponseResultInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, FuturesAccountBalanceV2ResponseResultInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FuturesAccountBalanceV2ResponseResultInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FuturesAccountBalanceV2ResponseResultInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of FuturesAccountBalanceV2ResponseResultInner - * @throws IOException if the JSON string is invalid with respect to - * FuturesAccountBalanceV2ResponseResultInner - */ - public static FuturesAccountBalanceV2ResponseResultInner fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, FuturesAccountBalanceV2ResponseResultInner.class); - } - - /** - * Convert an instance of FuturesAccountBalanceV2ResponseResultInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/KeepaliveUserDataStreamRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/KeepaliveUserDataStreamRequest.java index 2ba56fd37..58c0d487d 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/KeepaliveUserDataStreamRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/KeepaliveUserDataStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** KeepaliveUserDataStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KeepaliveUserDataStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -53,7 +53,7 @@ public KeepaliveUserDataStreamRequest id(@jakarta.annotation.Nullable String id) } /** - * Get id + * Id. * * @return id */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/KeepaliveUserDataStreamResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/KeepaliveUserDataStreamResponse.java index 1e272625b..3fe246e44 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/KeepaliveUserDataStreamResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/KeepaliveUserDataStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** KeepaliveUserDataStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KeepaliveUserDataStreamResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/KeepaliveUserDataStreamResponseResult.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/KeepaliveUserDataStreamResponseResult.java index e1fb0be29..800acfab4 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/KeepaliveUserDataStreamResponseResult.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/KeepaliveUserDataStreamResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** KeepaliveUserDataStreamResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KeepaliveUserDataStreamResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ModifyOrderRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ModifyOrderRequest.java index bcdb3d262..70d3c0d45 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ModifyOrderRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ModifyOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -39,7 +39,7 @@ /** ModifyOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyOrderRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -89,6 +89,12 @@ public class ModifyOrderRequest extends BaseDTO { @jakarta.annotation.Nullable private PriceMatch priceMatch; + public static final String SERIALIZED_NAME_MODIFY_ID = "modifyId"; + + @SerializedName(SERIALIZED_NAME_MODIFY_ID) + @jakarta.annotation.Nullable + private Long modifyId; + public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @SerializedName(SERIALIZED_NAME_RECV_WINDOW) @@ -103,7 +109,7 @@ public ModifyOrderRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Id. * * @return id */ @@ -122,7 +128,7 @@ public ModifyOrderRequest orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Order Id. * * @return orderId */ @@ -142,7 +148,7 @@ public ModifyOrderRequest origClientOrderId( } /** - * Get origClientOrderId + * Orig Client Order Id. * * @return origClientOrderId */ @@ -161,7 +167,7 @@ public ModifyOrderRequest symbol(@jakarta.annotation.Nonnull String symbol) { } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -202,7 +208,7 @@ public ModifyOrderRequest quantity(@jakarta.annotation.Nonnull Double quantity) } /** - * Get quantity + * Order quantity, cannot be sent with `closePosition=true` * * @return quantity */ @@ -223,7 +229,7 @@ public ModifyOrderRequest price(@jakarta.annotation.Nonnull Double price) { } /** - * Get price + * Price. * * @return price */ @@ -258,13 +264,33 @@ public void setPriceMatch(@jakarta.annotation.Nullable PriceMatch priceMatch) { this.priceMatch = priceMatch; } + public ModifyOrderRequest modifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + return this; + } + + /** + * User-defined modification identifier, returned as-is in the response. Optional; not validated + * for uniqueness. + * + * @return modifyId + */ + @jakarta.annotation.Nullable + public Long getModifyId() { + return modifyId; + } + + public void setModifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; + } + public ModifyOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) { this.recvWindow = recvWindow; return this; } /** - * Get recvWindow + * Recv Window. * * @return recvWindow */ @@ -294,6 +320,7 @@ public boolean equals(Object o) { && Objects.equals(this.quantity, modifyOrderRequest.quantity) && Objects.equals(this.price, modifyOrderRequest.price) && Objects.equals(this.priceMatch, modifyOrderRequest.priceMatch) + && Objects.equals(this.modifyId, modifyOrderRequest.modifyId) && Objects.equals(this.recvWindow, modifyOrderRequest.recvWindow); } @@ -308,6 +335,7 @@ public int hashCode() { quantity, price, priceMatch, + modifyId, recvWindow); } @@ -323,6 +351,7 @@ public String toString() { sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" priceMatch: ").append(toIndentedString(priceMatch)).append("\n"); + sb.append(" modifyId: ").append(toIndentedString(modifyId)).append("\n"); sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); sb.append("}"); return sb.toString(); @@ -372,6 +401,11 @@ public String toUrlQueryString() { String priceMatchValueAsString = priceMatchValue.toString(); valMap.put("priceMatch", priceMatchValueAsString); } + Long modifyIdValue = getModifyId(); + if (modifyIdValue != null) { + String modifyIdValueAsString = modifyIdValue.toString(); + valMap.put("modifyId", modifyIdValueAsString); + } Long recvWindowValue = getRecvWindow(); if (recvWindowValue != null) { String recvWindowValueAsString = recvWindowValue.toString(); @@ -420,6 +454,10 @@ public Map toMap() { if (priceMatchValue != null) { valMap.put("priceMatch", priceMatchValue); } + Object modifyIdValue = getModifyId(); + if (modifyIdValue != null) { + valMap.put("modifyId", modifyIdValue); + } Object recvWindowValue = getRecvWindow(); if (recvWindowValue != null) { valMap.put("recvWindow", recvWindowValue); @@ -458,6 +496,7 @@ private String toIndentedString(Object o) { openapiFields.add("quantity"); openapiFields.add("price"); openapiFields.add("priceMatch"); + openapiFields.add("modifyId"); openapiFields.add("recvWindow"); // a set of required properties/fields (JSON key names) diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ModifyOrderResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ModifyOrderResponse.java index efe757b7e..3128d3e10 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ModifyOrderResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ModifyOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** ModifyOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyOrderResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ModifyOrderResponseRateLimitsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ModifyOrderResponseRateLimitsInner.java index 58c5a7c84..8593555de 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ModifyOrderResponseRateLimitsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ModifyOrderResponseRateLimitsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** ModifyOrderResponseRateLimitsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyOrderResponseRateLimitsInner extends BaseDTO { public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ModifyOrderResponseResult.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ModifyOrderResponseResult.java index cbd06edf3..a275a337a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ModifyOrderResponseResult.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ModifyOrderResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** ModifyOrderResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ModifyOrderResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -63,17 +63,17 @@ public class ModifyOrderResponseResult extends BaseDTO { @jakarta.annotation.Nullable private String clientOrderId; - public static final String SERIALIZED_NAME_PRICE = "price"; + public static final String SERIALIZED_NAME_MODIFY_ID = "modifyId"; - @SerializedName(SERIALIZED_NAME_PRICE) + @SerializedName(SERIALIZED_NAME_MODIFY_ID) @jakarta.annotation.Nullable - private String price; + private Long modifyId; - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; + public static final String SERIALIZED_NAME_PRICE = "price"; - @SerializedName(SERIALIZED_NAME_AVG_PRICE) + @SerializedName(SERIALIZED_NAME_PRICE) @jakarta.annotation.Nullable - private String avgPrice; + private String price; public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; @@ -93,12 +93,6 @@ public class ModifyOrderResponseResult extends BaseDTO { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_QUOTE = "cumQuote"; - - @SerializedName(SERIALIZED_NAME_CUM_QUOTE) - @jakarta.annotation.Nullable - private String cumQuote; - public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) @@ -263,42 +257,42 @@ public void setClientOrderId(@jakarta.annotation.Nullable String clientOrderId) this.clientOrderId = clientOrderId; } - public ModifyOrderResponseResult price(@jakarta.annotation.Nullable String price) { - this.price = price; + public ModifyOrderResponseResult modifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; return this; } /** - * Get price + * user-defined modification identifier, only returned if provided in the request * - * @return price + * @return modifyId */ @jakarta.annotation.Nullable - public String getPrice() { - return price; + public Long getModifyId() { + return modifyId; } - public void setPrice(@jakarta.annotation.Nullable String price) { - this.price = price; + public void setModifyId(@jakarta.annotation.Nullable Long modifyId) { + this.modifyId = modifyId; } - public ModifyOrderResponseResult avgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; + public ModifyOrderResponseResult price(@jakarta.annotation.Nullable String price) { + this.price = price; return this; } /** - * Get avgPrice + * Get price * - * @return avgPrice + * @return price */ @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; + public String getPrice() { + return price; } - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; + public void setPrice(@jakarta.annotation.Nullable String price) { + this.price = price; } public ModifyOrderResponseResult origQty(@jakarta.annotation.Nullable String origQty) { @@ -358,25 +352,6 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public ModifyOrderResponseResult cumQuote(@jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - return this; - } - - /** - * Get cumQuote - * - * @return cumQuote - */ - @jakarta.annotation.Nullable - public String getCumQuote() { - return cumQuote; - } - - public void setCumQuote(@jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - } - public ModifyOrderResponseResult timeInForce(@jakarta.annotation.Nullable String timeInForce) { this.timeInForce = timeInForce; return this; @@ -661,12 +636,11 @@ public boolean equals(Object o) { && Objects.equals(this.symbol, modifyOrderResponseResult.symbol) && Objects.equals(this.status, modifyOrderResponseResult.status) && Objects.equals(this.clientOrderId, modifyOrderResponseResult.clientOrderId) + && Objects.equals(this.modifyId, modifyOrderResponseResult.modifyId) && Objects.equals(this.price, modifyOrderResponseResult.price) - && Objects.equals(this.avgPrice, modifyOrderResponseResult.avgPrice) && Objects.equals(this.origQty, modifyOrderResponseResult.origQty) && Objects.equals(this.executedQty, modifyOrderResponseResult.executedQty) && Objects.equals(this.cumQty, modifyOrderResponseResult.cumQty) - && Objects.equals(this.cumQuote, modifyOrderResponseResult.cumQuote) && Objects.equals(this.timeInForce, modifyOrderResponseResult.timeInForce) && Objects.equals(this.type, modifyOrderResponseResult.type) && Objects.equals(this.reduceOnly, modifyOrderResponseResult.reduceOnly) @@ -692,12 +666,11 @@ public int hashCode() { symbol, status, clientOrderId, + modifyId, price, - avgPrice, origQty, executedQty, cumQty, - cumQuote, timeInForce, type, reduceOnly, @@ -722,12 +695,11 @@ public String toString() { sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); + sb.append(" modifyId: ").append(toIndentedString(modifyId)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumQuote: ").append(toIndentedString(cumQuote)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); @@ -772,16 +744,16 @@ public String toUrlQueryString() { String clientOrderIdValueAsString = clientOrderIdValue.toString(); valMap.put("clientOrderId", clientOrderIdValueAsString); } + Long modifyIdValue = getModifyId(); + if (modifyIdValue != null) { + String modifyIdValueAsString = modifyIdValue.toString(); + valMap.put("modifyId", modifyIdValueAsString); + } String priceValue = getPrice(); if (priceValue != null) { String priceValueAsString = priceValue.toString(); valMap.put("price", priceValueAsString); } - String avgPriceValue = getAvgPrice(); - if (avgPriceValue != null) { - String avgPriceValueAsString = avgPriceValue.toString(); - valMap.put("avgPrice", avgPriceValueAsString); - } String origQtyValue = getOrigQty(); if (origQtyValue != null) { String origQtyValueAsString = origQtyValue.toString(); @@ -797,11 +769,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = cumQtyValue.toString(); valMap.put("cumQty", cumQtyValueAsString); } - String cumQuoteValue = getCumQuote(); - if (cumQuoteValue != null) { - String cumQuoteValueAsString = cumQuoteValue.toString(); - valMap.put("cumQuote", cumQuoteValueAsString); - } String timeInForceValue = getTimeInForce(); if (timeInForceValue != null) { String timeInForceValueAsString = timeInForceValue.toString(); @@ -899,14 +866,14 @@ public Map toMap() { if (clientOrderIdValue != null) { valMap.put("clientOrderId", clientOrderIdValue); } + Object modifyIdValue = getModifyId(); + if (modifyIdValue != null) { + valMap.put("modifyId", modifyIdValue); + } Object priceValue = getPrice(); if (priceValue != null) { valMap.put("price", priceValue); } - Object avgPriceValue = getAvgPrice(); - if (avgPriceValue != null) { - valMap.put("avgPrice", avgPriceValue); - } Object origQtyValue = getOrigQty(); if (origQtyValue != null) { valMap.put("origQty", origQtyValue); @@ -919,10 +886,6 @@ public Map toMap() { if (cumQtyValue != null) { valMap.put("cumQty", cumQtyValue); } - Object cumQuoteValue = getCumQuote(); - if (cumQuoteValue != null) { - valMap.put("cumQuote", cumQuoteValue); - } Object timeInForceValue = getTimeInForce(); if (timeInForceValue != null) { valMap.put("timeInForce", timeInForceValue); @@ -1009,12 +972,11 @@ private String toIndentedString(Object o) { openapiFields.add("symbol"); openapiFields.add("status"); openapiFields.add("clientOrderId"); + openapiFields.add("modifyId"); openapiFields.add("price"); - openapiFields.add("avgPrice"); openapiFields.add("origQty"); openapiFields.add("executedQty"); openapiFields.add("cumQty"); - openapiFields.add("cumQuote"); openapiFields.add("timeInForce"); openapiFields.add("type"); openapiFields.add("reduceOnly"); @@ -1096,14 +1058,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("price").toString())); } - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) && !jsonObj.get("origQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1128,14 +1082,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumQuote") != null && !jsonObj.get("cumQuote").isJsonNull()) - && !jsonObj.get("cumQuote").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumQuote` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("cumQuote").toString())); - } if ((jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) && !jsonObj.get("timeInForce").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewAlgoOrderRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewAlgoOrderRequest.java index f4cdf1ef2..9abca59db 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewAlgoOrderRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewAlgoOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -39,7 +39,7 @@ /** NewAlgoOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewAlgoOrderRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -51,7 +51,7 @@ public class NewAlgoOrderRequest extends BaseDTO { @SerializedName(SERIALIZED_NAME_ALGO_TYPE) @jakarta.annotation.Nonnull - private String algoType; + private AlgoType algoType; public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -75,7 +75,7 @@ public class NewAlgoOrderRequest extends BaseDTO { @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private String type; + private OrderType type; public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @@ -117,19 +117,19 @@ public class NewAlgoOrderRequest extends BaseDTO { @SerializedName(SERIALIZED_NAME_CLOSE_POSITION) @jakarta.annotation.Nullable - private String closePosition; + private ClosePosition closePosition; public static final String SERIALIZED_NAME_PRICE_PROTECT = "priceProtect"; @SerializedName(SERIALIZED_NAME_PRICE_PROTECT) @jakarta.annotation.Nullable - private String priceProtect; + private PriceProtect priceProtect; public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) @jakarta.annotation.Nullable - private String reduceOnly; + private ReduceOnly reduceOnly; public static final String SERIALIZED_NAME_ACTIVATE_PRICE = "activatePrice"; @@ -182,7 +182,7 @@ public NewAlgoOrderRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Id. * * @return id */ @@ -195,7 +195,7 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public NewAlgoOrderRequest algoType(@jakarta.annotation.Nonnull String algoType) { + public NewAlgoOrderRequest algoType(@jakarta.annotation.Nonnull AlgoType algoType) { this.algoType = algoType; return this; } @@ -207,11 +207,12 @@ public NewAlgoOrderRequest algoType(@jakarta.annotation.Nonnull String algoType) */ @jakarta.annotation.Nonnull @NotNull - public String getAlgoType() { + @Valid + public AlgoType getAlgoType() { return algoType; } - public void setAlgoType(@jakarta.annotation.Nonnull String algoType) { + public void setAlgoType(@jakarta.annotation.Nonnull AlgoType algoType) { this.algoType = algoType; } @@ -221,7 +222,7 @@ public NewAlgoOrderRequest symbol(@jakarta.annotation.Nonnull String symbol) { } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -277,7 +278,7 @@ public void setPositionSide(@jakarta.annotation.Nullable PositionSide positionSi this.positionSide = positionSide; } - public NewAlgoOrderRequest type(@jakarta.annotation.Nonnull String type) { + public NewAlgoOrderRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -289,11 +290,12 @@ public NewAlgoOrderRequest type(@jakarta.annotation.Nonnull String type) { */ @jakarta.annotation.Nonnull @NotNull - public String getType() { + @Valid + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull String type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } @@ -323,7 +325,7 @@ public NewAlgoOrderRequest quantity(@jakarta.annotation.Nullable Double quantity } /** - * Get quantity + * Cannot be sent with `closePosition`=`true`(Close-All) * * @return quantity */ @@ -343,7 +345,7 @@ public NewAlgoOrderRequest price(@jakarta.annotation.Nullable Double price) { } /** - * Get price + * Price. * * @return price */ @@ -363,7 +365,7 @@ public NewAlgoOrderRequest triggerPrice(@jakarta.annotation.Nullable Double trig } /** - * Get triggerPrice + * Trigger Price. * * @return triggerPrice */ @@ -417,7 +419,8 @@ public void setPriceMatch(@jakarta.annotation.Nullable PriceMatch priceMatch) { this.priceMatch = priceMatch; } - public NewAlgoOrderRequest closePosition(@jakarta.annotation.Nullable String closePosition) { + public NewAlgoOrderRequest closePosition( + @jakarta.annotation.Nullable ClosePosition closePosition) { this.closePosition = closePosition; return this; } @@ -428,15 +431,17 @@ public NewAlgoOrderRequest closePosition(@jakarta.annotation.Nullable String clo * @return closePosition */ @jakarta.annotation.Nullable - public String getClosePosition() { + @Valid + public ClosePosition getClosePosition() { return closePosition; } - public void setClosePosition(@jakarta.annotation.Nullable String closePosition) { + public void setClosePosition(@jakarta.annotation.Nullable ClosePosition closePosition) { this.closePosition = closePosition; } - public NewAlgoOrderRequest priceProtect(@jakarta.annotation.Nullable String priceProtect) { + public NewAlgoOrderRequest priceProtect( + @jakarta.annotation.Nullable PriceProtect priceProtect) { this.priceProtect = priceProtect; return this; } @@ -447,15 +452,16 @@ public NewAlgoOrderRequest priceProtect(@jakarta.annotation.Nullable String pric * @return priceProtect */ @jakarta.annotation.Nullable - public String getPriceProtect() { + @Valid + public PriceProtect getPriceProtect() { return priceProtect; } - public void setPriceProtect(@jakarta.annotation.Nullable String priceProtect) { + public void setPriceProtect(@jakarta.annotation.Nullable PriceProtect priceProtect) { this.priceProtect = priceProtect; } - public NewAlgoOrderRequest reduceOnly(@jakarta.annotation.Nullable String reduceOnly) { + public NewAlgoOrderRequest reduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { this.reduceOnly = reduceOnly; return this; } @@ -466,11 +472,12 @@ public NewAlgoOrderRequest reduceOnly(@jakarta.annotation.Nullable String reduce * @return reduceOnly */ @jakarta.annotation.Nullable - public String getReduceOnly() { + @Valid + public ReduceOnly getReduceOnly() { return reduceOnly; } - public void setReduceOnly(@jakarta.annotation.Nullable String reduceOnly) { + public void setReduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { this.reduceOnly = reduceOnly; } @@ -480,7 +487,8 @@ public NewAlgoOrderRequest activatePrice(@jakarta.annotation.Nullable Double act } /** - * Get activatePrice + * Used with TRAILING_STOP_MARKET orders, default as the latest price(supporting different + * workingType) * * @return activatePrice */ @@ -500,12 +508,14 @@ public NewAlgoOrderRequest callbackRate(@jakarta.annotation.Nullable Double call } /** - * Get callbackRate + * Used with TRAILING_STOP_MARKET orders minimum: 0.1 maximum: 10 * * @return callbackRate */ @jakarta.annotation.Nullable @Valid + @DecimalMin("0.1") + @DecimalMax("10") public Double getCallbackRate() { return callbackRate; } @@ -520,7 +530,8 @@ public NewAlgoOrderRequest clientAlgoId(@jakarta.annotation.Nullable String clie } /** - * Get clientAlgoId + * A unique id among open orders. Automatically generated if not sent. Can only be string + * following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,36}$` * * @return clientAlgoId */ @@ -583,7 +594,10 @@ public NewAlgoOrderRequest goodTillDate(@jakarta.annotation.Nullable Long goodTi } /** - * Get goodTillDate + * order cancel time for timeInForce `GTD`, mandatory when `timeInforce` set + * to `GTD`; order the timestamp only retains second-level precision, ms part will be + * ignored; The goodTillDate timestamp must be greater than the current time plus 600 seconds + * and smaller than 253402300799000 * * @return goodTillDate */ @@ -602,7 +616,7 @@ public NewAlgoOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvWind } /** - * Get recvWindow + * Recv Window. * * @return recvWindow */ @@ -717,7 +731,7 @@ public String toUrlQueryString() { String idValueAsString = idValue.toString(); valMap.put("id", idValueAsString); } - String algoTypeValue = getAlgoType(); + AlgoType algoTypeValue = getAlgoType(); if (algoTypeValue != null) { String algoTypeValueAsString = algoTypeValue.toString(); valMap.put("algoType", algoTypeValueAsString); @@ -737,7 +751,7 @@ public String toUrlQueryString() { String positionSideValueAsString = positionSideValue.toString(); valMap.put("positionSide", positionSideValueAsString); } - String typeValue = getType(); + OrderType typeValue = getType(); if (typeValue != null) { String typeValueAsString = typeValue.toString(); valMap.put("type", typeValueAsString); @@ -773,17 +787,17 @@ public String toUrlQueryString() { String priceMatchValueAsString = priceMatchValue.toString(); valMap.put("priceMatch", priceMatchValueAsString); } - String closePositionValue = getClosePosition(); + ClosePosition closePositionValue = getClosePosition(); if (closePositionValue != null) { String closePositionValueAsString = closePositionValue.toString(); valMap.put("closePosition", closePositionValueAsString); } - String priceProtectValue = getPriceProtect(); + PriceProtect priceProtectValue = getPriceProtect(); if (priceProtectValue != null) { String priceProtectValueAsString = priceProtectValue.toString(); valMap.put("priceProtect", priceProtectValueAsString); } - String reduceOnlyValue = getReduceOnly(); + ReduceOnly reduceOnlyValue = getReduceOnly(); if (reduceOnlyValue != null) { String reduceOnlyValueAsString = reduceOnlyValue.toString(); valMap.put("reduceOnly", reduceOnlyValueAsString); @@ -1029,13 +1043,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("algoType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `algoType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("algoType").toString())); - } + // validate the required field `algoType` + AlgoType.validateJsonElement(jsonObj.get("algoType")); if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( @@ -1049,13 +1058,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) { PositionSide.validateJsonElement(jsonObj.get("positionSide")); } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } + // validate the required field `type` + OrderType.validateJsonElement(jsonObj.get("type")); // validate the optional field `timeInForce` if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { TimeInForce.validateJsonElement(jsonObj.get("timeInForce")); @@ -1068,29 +1072,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("priceMatch") != null && !jsonObj.get("priceMatch").isJsonNull()) { PriceMatch.validateJsonElement(jsonObj.get("priceMatch")); } - if ((jsonObj.get("closePosition") != null && !jsonObj.get("closePosition").isJsonNull()) - && !jsonObj.get("closePosition").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `closePosition` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("closePosition").toString())); + // validate the optional field `closePosition` + if (jsonObj.get("closePosition") != null && !jsonObj.get("closePosition").isJsonNull()) { + ClosePosition.validateJsonElement(jsonObj.get("closePosition")); } - if ((jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) - && !jsonObj.get("priceProtect").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `priceProtect` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("priceProtect").toString())); + // validate the optional field `priceProtect` + if (jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) { + PriceProtect.validateJsonElement(jsonObj.get("priceProtect")); } - if ((jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) - && !jsonObj.get("reduceOnly").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reduceOnly` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reduceOnly").toString())); + // validate the optional field `reduceOnly` + if (jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) { + ReduceOnly.validateJsonElement(jsonObj.get("reduceOnly")); } if ((jsonObj.get("clientAlgoId") != null && !jsonObj.get("clientAlgoId").isJsonNull()) && !jsonObj.get("clientAlgoId").isJsonPrimitive()) { diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewAlgoOrderResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewAlgoOrderResponse.java index e49854efc..f361b9213 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewAlgoOrderResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewAlgoOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** NewAlgoOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewAlgoOrderResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewAlgoOrderResponseResult.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewAlgoOrderResponseResult.java index 1dbbd557f..a1056f66d 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewAlgoOrderResponseResult.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewAlgoOrderResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** NewAlgoOrderResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewAlgoOrderResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_ALGO_ID = "algoId"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewOrderRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewOrderRequest.java index 8b13f0e65..40256c49c 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewOrderRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -39,7 +39,7 @@ /** NewOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewOrderRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -69,7 +69,7 @@ public class NewOrderRequest extends BaseDTO { @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private String type; + private OrderType type; public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @@ -77,17 +77,17 @@ public class NewOrderRequest extends BaseDTO { @jakarta.annotation.Nullable private TimeInForce timeInForce; - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; - @SerializedName(SERIALIZED_NAME_QUANTITY) + @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) @jakarta.annotation.Nullable - private Double quantity; + private ReduceOnly reduceOnly; - public static final String SERIALIZED_NAME_REDUCE_ONLY = "reduceOnly"; + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; - @SerializedName(SERIALIZED_NAME_REDUCE_ONLY) + @SerializedName(SERIALIZED_NAME_QUANTITY) @jakarta.annotation.Nullable - private String reduceOnly; + private Double quantity; public static final String SERIALIZED_NAME_PRICE = "price"; @@ -101,42 +101,6 @@ public class NewOrderRequest extends BaseDTO { @jakarta.annotation.Nullable private String newClientOrderId; - public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; - - @SerializedName(SERIALIZED_NAME_STOP_PRICE) - @jakarta.annotation.Nullable - private Double stopPrice; - - public static final String SERIALIZED_NAME_CLOSE_POSITION = "closePosition"; - - @SerializedName(SERIALIZED_NAME_CLOSE_POSITION) - @jakarta.annotation.Nullable - private String closePosition; - - public static final String SERIALIZED_NAME_ACTIVATION_PRICE = "activationPrice"; - - @SerializedName(SERIALIZED_NAME_ACTIVATION_PRICE) - @jakarta.annotation.Nullable - private Double activationPrice; - - public static final String SERIALIZED_NAME_CALLBACK_RATE = "callbackRate"; - - @SerializedName(SERIALIZED_NAME_CALLBACK_RATE) - @jakarta.annotation.Nullable - private Double callbackRate; - - public static final String SERIALIZED_NAME_WORKING_TYPE = "workingType"; - - @SerializedName(SERIALIZED_NAME_WORKING_TYPE) - @jakarta.annotation.Nullable - private WorkingType workingType; - - public static final String SERIALIZED_NAME_PRICE_PROTECT = "priceProtect"; - - @SerializedName(SERIALIZED_NAME_PRICE_PROTECT) - @jakarta.annotation.Nullable - private String priceProtect; - public static final String SERIALIZED_NAME_NEW_ORDER_RESP_TYPE = "newOrderRespType"; @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESP_TYPE) @@ -176,7 +140,7 @@ public NewOrderRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Id. * * @return id */ @@ -195,7 +159,7 @@ public NewOrderRequest symbol(@jakarta.annotation.Nonnull String symbol) { } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -250,7 +214,7 @@ public void setPositionSide(@jakarta.annotation.Nullable PositionSide positionSi this.positionSide = positionSide; } - public NewOrderRequest type(@jakarta.annotation.Nonnull String type) { + public NewOrderRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -262,11 +226,12 @@ public NewOrderRequest type(@jakarta.annotation.Nonnull String type) { */ @jakarta.annotation.Nonnull @NotNull - public String getType() { + @Valid + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull String type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } @@ -290,43 +255,44 @@ public void setTimeInForce(@jakarta.annotation.Nullable TimeInForce timeInForce) this.timeInForce = timeInForce; } - public NewOrderRequest quantity(@jakarta.annotation.Nullable Double quantity) { - this.quantity = quantity; + public NewOrderRequest reduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { + this.reduceOnly = reduceOnly; return this; } /** - * Get quantity + * Get reduceOnly * - * @return quantity + * @return reduceOnly */ @jakarta.annotation.Nullable @Valid - public Double getQuantity() { - return quantity; + public ReduceOnly getReduceOnly() { + return reduceOnly; } - public void setQuantity(@jakarta.annotation.Nullable Double quantity) { - this.quantity = quantity; + public void setReduceOnly(@jakarta.annotation.Nullable ReduceOnly reduceOnly) { + this.reduceOnly = reduceOnly; } - public NewOrderRequest reduceOnly(@jakarta.annotation.Nullable String reduceOnly) { - this.reduceOnly = reduceOnly; + public NewOrderRequest quantity(@jakarta.annotation.Nullable Double quantity) { + this.quantity = quantity; return this; } /** - * Get reduceOnly + * Get quantity * - * @return reduceOnly + * @return quantity */ @jakarta.annotation.Nullable - public String getReduceOnly() { - return reduceOnly; + @Valid + public Double getQuantity() { + return quantity; } - public void setReduceOnly(@jakarta.annotation.Nullable String reduceOnly) { - this.reduceOnly = reduceOnly; + public void setQuantity(@jakarta.annotation.Nullable Double quantity) { + this.quantity = quantity; } public NewOrderRequest price(@jakarta.annotation.Nullable Double price) { @@ -335,7 +301,7 @@ public NewOrderRequest price(@jakarta.annotation.Nullable Double price) { } /** - * Get price + * Price. * * @return price */ @@ -355,7 +321,8 @@ public NewOrderRequest newClientOrderId(@jakarta.annotation.Nullable String newC } /** - * Get newClientOrderId + * A unique id among open orders. Automatically generated if not sent. Can only be string + * following the rule: `^[\\.A-Z\\:/a-z0-9_-]{1,36}$` * * @return newClientOrderId */ @@ -368,124 +335,6 @@ public void setNewClientOrderId(@jakarta.annotation.Nullable String newClientOrd this.newClientOrderId = newClientOrderId; } - public NewOrderRequest stopPrice(@jakarta.annotation.Nullable Double stopPrice) { - this.stopPrice = stopPrice; - return this; - } - - /** - * Get stopPrice - * - * @return stopPrice - */ - @jakarta.annotation.Nullable - @Valid - public Double getStopPrice() { - return stopPrice; - } - - public void setStopPrice(@jakarta.annotation.Nullable Double stopPrice) { - this.stopPrice = stopPrice; - } - - public NewOrderRequest closePosition(@jakarta.annotation.Nullable String closePosition) { - this.closePosition = closePosition; - return this; - } - - /** - * Get closePosition - * - * @return closePosition - */ - @jakarta.annotation.Nullable - public String getClosePosition() { - return closePosition; - } - - public void setClosePosition(@jakarta.annotation.Nullable String closePosition) { - this.closePosition = closePosition; - } - - public NewOrderRequest activationPrice(@jakarta.annotation.Nullable Double activationPrice) { - this.activationPrice = activationPrice; - return this; - } - - /** - * Get activationPrice - * - * @return activationPrice - */ - @jakarta.annotation.Nullable - @Valid - public Double getActivationPrice() { - return activationPrice; - } - - public void setActivationPrice(@jakarta.annotation.Nullable Double activationPrice) { - this.activationPrice = activationPrice; - } - - public NewOrderRequest callbackRate(@jakarta.annotation.Nullable Double callbackRate) { - this.callbackRate = callbackRate; - return this; - } - - /** - * Get callbackRate - * - * @return callbackRate - */ - @jakarta.annotation.Nullable - @Valid - public Double getCallbackRate() { - return callbackRate; - } - - public void setCallbackRate(@jakarta.annotation.Nullable Double callbackRate) { - this.callbackRate = callbackRate; - } - - public NewOrderRequest workingType(@jakarta.annotation.Nullable WorkingType workingType) { - this.workingType = workingType; - return this; - } - - /** - * Get workingType - * - * @return workingType - */ - @jakarta.annotation.Nullable - @Valid - public WorkingType getWorkingType() { - return workingType; - } - - public void setWorkingType(@jakarta.annotation.Nullable WorkingType workingType) { - this.workingType = workingType; - } - - public NewOrderRequest priceProtect(@jakarta.annotation.Nullable String priceProtect) { - this.priceProtect = priceProtect; - return this; - } - - /** - * Get priceProtect - * - * @return priceProtect - */ - @jakarta.annotation.Nullable - public String getPriceProtect() { - return priceProtect; - } - - public void setPriceProtect(@jakarta.annotation.Nullable String priceProtect) { - this.priceProtect = priceProtect; - } - public NewOrderRequest newOrderRespType( @jakarta.annotation.Nullable NewOrderRespType newOrderRespType) { this.newOrderRespType = newOrderRespType; @@ -556,7 +405,10 @@ public NewOrderRequest goodTillDate(@jakarta.annotation.Nullable Long goodTillDa } /** - * Get goodTillDate + * order cancel time for timeInForce `GTD`, mandatory when `timeInforce` set + * to `GTD`; order the timestamp only retains second-level precision, ms part will be + * ignored; The goodTillDate timestamp must be greater than the current time plus 600 seconds + * and smaller than 253402300799000 * * @return goodTillDate */ @@ -575,7 +427,7 @@ public NewOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) } /** - * Get recvWindow + * Recv Window. * * @return recvWindow */ @@ -603,16 +455,10 @@ public boolean equals(Object o) { && Objects.equals(this.positionSide, newOrderRequest.positionSide) && Objects.equals(this.type, newOrderRequest.type) && Objects.equals(this.timeInForce, newOrderRequest.timeInForce) - && Objects.equals(this.quantity, newOrderRequest.quantity) && Objects.equals(this.reduceOnly, newOrderRequest.reduceOnly) + && Objects.equals(this.quantity, newOrderRequest.quantity) && Objects.equals(this.price, newOrderRequest.price) && Objects.equals(this.newClientOrderId, newOrderRequest.newClientOrderId) - && Objects.equals(this.stopPrice, newOrderRequest.stopPrice) - && Objects.equals(this.closePosition, newOrderRequest.closePosition) - && Objects.equals(this.activationPrice, newOrderRequest.activationPrice) - && Objects.equals(this.callbackRate, newOrderRequest.callbackRate) - && Objects.equals(this.workingType, newOrderRequest.workingType) - && Objects.equals(this.priceProtect, newOrderRequest.priceProtect) && Objects.equals(this.newOrderRespType, newOrderRequest.newOrderRespType) && Objects.equals(this.priceMatch, newOrderRequest.priceMatch) && Objects.equals( @@ -630,16 +476,10 @@ public int hashCode() { positionSide, type, timeInForce, - quantity, reduceOnly, + quantity, price, newClientOrderId, - stopPrice, - closePosition, - activationPrice, - callbackRate, - workingType, - priceProtect, newOrderRespType, priceMatch, selfTradePreventionMode, @@ -657,16 +497,10 @@ public String toString() { sb.append(" positionSide: ").append(toIndentedString(positionSide)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" newClientOrderId: ").append(toIndentedString(newClientOrderId)).append("\n"); - sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); - sb.append(" closePosition: ").append(toIndentedString(closePosition)).append("\n"); - sb.append(" activationPrice: ").append(toIndentedString(activationPrice)).append("\n"); - sb.append(" callbackRate: ").append(toIndentedString(callbackRate)).append("\n"); - sb.append(" workingType: ").append(toIndentedString(workingType)).append("\n"); - sb.append(" priceProtect: ").append(toIndentedString(priceProtect)).append("\n"); sb.append(" newOrderRespType: ").append(toIndentedString(newOrderRespType)).append("\n"); sb.append(" priceMatch: ").append(toIndentedString(priceMatch)).append("\n"); sb.append(" selfTradePreventionMode: ") @@ -702,7 +536,7 @@ public String toUrlQueryString() { String positionSideValueAsString = positionSideValue.toString(); valMap.put("positionSide", positionSideValueAsString); } - String typeValue = getType(); + OrderType typeValue = getType(); if (typeValue != null) { String typeValueAsString = typeValue.toString(); valMap.put("type", typeValueAsString); @@ -712,16 +546,16 @@ public String toUrlQueryString() { String timeInForceValueAsString = timeInForceValue.toString(); valMap.put("timeInForce", timeInForceValueAsString); } + ReduceOnly reduceOnlyValue = getReduceOnly(); + if (reduceOnlyValue != null) { + String reduceOnlyValueAsString = reduceOnlyValue.toString(); + valMap.put("reduceOnly", reduceOnlyValueAsString); + } Double quantityValue = getQuantity(); if (quantityValue != null) { String quantityValueAsString = DecimalFormatter.getFormatter().format(quantityValue); valMap.put("quantity", quantityValueAsString); } - String reduceOnlyValue = getReduceOnly(); - if (reduceOnlyValue != null) { - String reduceOnlyValueAsString = reduceOnlyValue.toString(); - valMap.put("reduceOnly", reduceOnlyValueAsString); - } Double priceValue = getPrice(); if (priceValue != null) { String priceValueAsString = DecimalFormatter.getFormatter().format(priceValue); @@ -732,38 +566,6 @@ public String toUrlQueryString() { String newClientOrderIdValueAsString = newClientOrderIdValue.toString(); valMap.put("newClientOrderId", newClientOrderIdValueAsString); } - Double stopPriceValue = getStopPrice(); - if (stopPriceValue != null) { - String stopPriceValueAsString = DecimalFormatter.getFormatter().format(stopPriceValue); - valMap.put("stopPrice", stopPriceValueAsString); - } - String closePositionValue = getClosePosition(); - if (closePositionValue != null) { - String closePositionValueAsString = closePositionValue.toString(); - valMap.put("closePosition", closePositionValueAsString); - } - Double activationPriceValue = getActivationPrice(); - if (activationPriceValue != null) { - String activationPriceValueAsString = - DecimalFormatter.getFormatter().format(activationPriceValue); - valMap.put("activationPrice", activationPriceValueAsString); - } - Double callbackRateValue = getCallbackRate(); - if (callbackRateValue != null) { - String callbackRateValueAsString = - DecimalFormatter.getFormatter().format(callbackRateValue); - valMap.put("callbackRate", callbackRateValueAsString); - } - WorkingType workingTypeValue = getWorkingType(); - if (workingTypeValue != null) { - String workingTypeValueAsString = workingTypeValue.toString(); - valMap.put("workingType", workingTypeValueAsString); - } - String priceProtectValue = getPriceProtect(); - if (priceProtectValue != null) { - String priceProtectValueAsString = priceProtectValue.toString(); - valMap.put("priceProtect", priceProtectValueAsString); - } NewOrderRespType newOrderRespTypeValue = getNewOrderRespType(); if (newOrderRespTypeValue != null) { String newOrderRespTypeValueAsString = newOrderRespTypeValue.toString(); @@ -824,14 +626,14 @@ public Map toMap() { if (timeInForceValue != null) { valMap.put("timeInForce", timeInForceValue); } - Object quantityValue = getQuantity(); - if (quantityValue != null) { - valMap.put("quantity", quantityValue); - } Object reduceOnlyValue = getReduceOnly(); if (reduceOnlyValue != null) { valMap.put("reduceOnly", reduceOnlyValue); } + Object quantityValue = getQuantity(); + if (quantityValue != null) { + valMap.put("quantity", quantityValue); + } Object priceValue = getPrice(); if (priceValue != null) { valMap.put("price", priceValue); @@ -840,30 +642,6 @@ public Map toMap() { if (newClientOrderIdValue != null) { valMap.put("newClientOrderId", newClientOrderIdValue); } - Object stopPriceValue = getStopPrice(); - if (stopPriceValue != null) { - valMap.put("stopPrice", stopPriceValue); - } - Object closePositionValue = getClosePosition(); - if (closePositionValue != null) { - valMap.put("closePosition", closePositionValue); - } - Object activationPriceValue = getActivationPrice(); - if (activationPriceValue != null) { - valMap.put("activationPrice", activationPriceValue); - } - Object callbackRateValue = getCallbackRate(); - if (callbackRateValue != null) { - valMap.put("callbackRate", callbackRateValue); - } - Object workingTypeValue = getWorkingType(); - if (workingTypeValue != null) { - valMap.put("workingType", workingTypeValue); - } - Object priceProtectValue = getPriceProtect(); - if (priceProtectValue != null) { - valMap.put("priceProtect", priceProtectValue); - } Object newOrderRespTypeValue = getNewOrderRespType(); if (newOrderRespTypeValue != null) { valMap.put("newOrderRespType", newOrderRespTypeValue); @@ -916,16 +694,10 @@ private String toIndentedString(Object o) { openapiFields.add("positionSide"); openapiFields.add("type"); openapiFields.add("timeInForce"); - openapiFields.add("quantity"); openapiFields.add("reduceOnly"); + openapiFields.add("quantity"); openapiFields.add("price"); openapiFields.add("newClientOrderId"); - openapiFields.add("stopPrice"); - openapiFields.add("closePosition"); - openapiFields.add("activationPrice"); - openapiFields.add("callbackRate"); - openapiFields.add("workingType"); - openapiFields.add("priceProtect"); openapiFields.add("newOrderRespType"); openapiFields.add("priceMatch"); openapiFields.add("selfTradePreventionMode"); @@ -1000,24 +772,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("positionSide") != null && !jsonObj.get("positionSide").isJsonNull()) { PositionSide.validateJsonElement(jsonObj.get("positionSide")); } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } + // validate the required field `type` + OrderType.validateJsonElement(jsonObj.get("type")); // validate the optional field `timeInForce` if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { TimeInForce.validateJsonElement(jsonObj.get("timeInForce")); } - if ((jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) - && !jsonObj.get("reduceOnly").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reduceOnly` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reduceOnly").toString())); + // validate the optional field `reduceOnly` + if (jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) { + ReduceOnly.validateJsonElement(jsonObj.get("reduceOnly")); } if ((jsonObj.get("newClientOrderId") != null && !jsonObj.get("newClientOrderId").isJsonNull()) @@ -1028,26 +791,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " JSON string but got `%s`", jsonObj.get("newClientOrderId").toString())); } - if ((jsonObj.get("closePosition") != null && !jsonObj.get("closePosition").isJsonNull()) - && !jsonObj.get("closePosition").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `closePosition` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("closePosition").toString())); - } - // validate the optional field `workingType` - if (jsonObj.get("workingType") != null && !jsonObj.get("workingType").isJsonNull()) { - WorkingType.validateJsonElement(jsonObj.get("workingType")); - } - if ((jsonObj.get("priceProtect") != null && !jsonObj.get("priceProtect").isJsonNull()) - && !jsonObj.get("priceProtect").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `priceProtect` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("priceProtect").toString())); - } // validate the optional field `newOrderRespType` if (jsonObj.get("newOrderRespType") != null && !jsonObj.get("newOrderRespType").isJsonNull()) { diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewOrderRespType.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewOrderRespType.java index a3ecc2606..739cb1586 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewOrderRespType.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewOrderRespType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewOrderResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewOrderResponse.java index 35487332f..403d42a10 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewOrderResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** NewOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewOrderResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewOrderResponseResult.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewOrderResponseResult.java index 653b8da5b..d142f0863 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewOrderResponseResult.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/NewOrderResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** NewOrderResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewOrderResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -69,12 +69,6 @@ public class NewOrderResponseResult extends BaseDTO { @jakarta.annotation.Nullable private String price; - public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE) - @jakarta.annotation.Nullable - private String avgPrice; - public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; @SerializedName(SERIALIZED_NAME_ORIG_QTY) @@ -93,12 +87,6 @@ public class NewOrderResponseResult extends BaseDTO { @jakarta.annotation.Nullable private String cumQty; - public static final String SERIALIZED_NAME_CUM_QUOTE = "cumQuote"; - - @SerializedName(SERIALIZED_NAME_CUM_QUOTE) - @jakarta.annotation.Nullable - private String cumQuote; - public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) @@ -281,25 +269,6 @@ public void setPrice(@jakarta.annotation.Nullable String price) { this.price = price; } - public NewOrderResponseResult avgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - return this; - } - - /** - * Get avgPrice - * - * @return avgPrice - */ - @jakarta.annotation.Nullable - public String getAvgPrice() { - return avgPrice; - } - - public void setAvgPrice(@jakarta.annotation.Nullable String avgPrice) { - this.avgPrice = avgPrice; - } - public NewOrderResponseResult origQty(@jakarta.annotation.Nullable String origQty) { this.origQty = origQty; return this; @@ -357,25 +326,6 @@ public void setCumQty(@jakarta.annotation.Nullable String cumQty) { this.cumQty = cumQty; } - public NewOrderResponseResult cumQuote(@jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - return this; - } - - /** - * Get cumQuote - * - * @return cumQuote - */ - @jakarta.annotation.Nullable - public String getCumQuote() { - return cumQuote; - } - - public void setCumQuote(@jakarta.annotation.Nullable String cumQuote) { - this.cumQuote = cumQuote; - } - public NewOrderResponseResult timeInForce(@jakarta.annotation.Nullable String timeInForce) { this.timeInForce = timeInForce; return this; @@ -659,11 +609,9 @@ public boolean equals(Object o) { && Objects.equals(this.status, newOrderResponseResult.status) && Objects.equals(this.clientOrderId, newOrderResponseResult.clientOrderId) && Objects.equals(this.price, newOrderResponseResult.price) - && Objects.equals(this.avgPrice, newOrderResponseResult.avgPrice) && Objects.equals(this.origQty, newOrderResponseResult.origQty) && Objects.equals(this.executedQty, newOrderResponseResult.executedQty) && Objects.equals(this.cumQty, newOrderResponseResult.cumQty) - && Objects.equals(this.cumQuote, newOrderResponseResult.cumQuote) && Objects.equals(this.timeInForce, newOrderResponseResult.timeInForce) && Objects.equals(this.type, newOrderResponseResult.type) && Objects.equals(this.reduceOnly, newOrderResponseResult.reduceOnly) @@ -690,11 +638,9 @@ public int hashCode() { status, clientOrderId, price, - avgPrice, origQty, executedQty, cumQty, - cumQuote, timeInForce, type, reduceOnly, @@ -720,11 +666,9 @@ public String toString() { sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" avgPrice: ").append(toIndentedString(avgPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); sb.append(" cumQty: ").append(toIndentedString(cumQty)).append("\n"); - sb.append(" cumQuote: ").append(toIndentedString(cumQuote)).append("\n"); sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" reduceOnly: ").append(toIndentedString(reduceOnly)).append("\n"); @@ -774,11 +718,6 @@ public String toUrlQueryString() { String priceValueAsString = priceValue.toString(); valMap.put("price", priceValueAsString); } - String avgPriceValue = getAvgPrice(); - if (avgPriceValue != null) { - String avgPriceValueAsString = avgPriceValue.toString(); - valMap.put("avgPrice", avgPriceValueAsString); - } String origQtyValue = getOrigQty(); if (origQtyValue != null) { String origQtyValueAsString = origQtyValue.toString(); @@ -794,11 +733,6 @@ public String toUrlQueryString() { String cumQtyValueAsString = cumQtyValue.toString(); valMap.put("cumQty", cumQtyValueAsString); } - String cumQuoteValue = getCumQuote(); - if (cumQuoteValue != null) { - String cumQuoteValueAsString = cumQuoteValue.toString(); - valMap.put("cumQuote", cumQuoteValueAsString); - } String timeInForceValue = getTimeInForce(); if (timeInForceValue != null) { String timeInForceValueAsString = timeInForceValue.toString(); @@ -900,10 +834,6 @@ public Map toMap() { if (priceValue != null) { valMap.put("price", priceValue); } - Object avgPriceValue = getAvgPrice(); - if (avgPriceValue != null) { - valMap.put("avgPrice", avgPriceValue); - } Object origQtyValue = getOrigQty(); if (origQtyValue != null) { valMap.put("origQty", origQtyValue); @@ -916,10 +846,6 @@ public Map toMap() { if (cumQtyValue != null) { valMap.put("cumQty", cumQtyValue); } - Object cumQuoteValue = getCumQuote(); - if (cumQuoteValue != null) { - valMap.put("cumQuote", cumQuoteValue); - } Object timeInForceValue = getTimeInForce(); if (timeInForceValue != null) { valMap.put("timeInForce", timeInForceValue); @@ -1007,11 +933,9 @@ private String toIndentedString(Object o) { openapiFields.add("status"); openapiFields.add("clientOrderId"); openapiFields.add("price"); - openapiFields.add("avgPrice"); openapiFields.add("origQty"); openapiFields.add("executedQty"); openapiFields.add("cumQty"); - openapiFields.add("cumQuote"); openapiFields.add("timeInForce"); openapiFields.add("type"); openapiFields.add("reduceOnly"); @@ -1093,14 +1017,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("price").toString())); } - if ((jsonObj.get("avgPrice") != null && !jsonObj.get("avgPrice").isJsonNull()) - && !jsonObj.get("avgPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `avgPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("avgPrice").toString())); - } if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) && !jsonObj.get("origQty").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1125,14 +1041,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("cumQty").toString())); } - if ((jsonObj.get("cumQuote") != null && !jsonObj.get("cumQuote").isJsonNull()) - && !jsonObj.get("cumQuote").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cumQuote` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("cumQuote").toString())); - } if ((jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) && !jsonObj.get("timeInForce").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookRequest.java index 5acb9213f..cb10245c2 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderBookRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderBookRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public OrderBookRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Id. * * @return id */ @@ -84,7 +84,7 @@ public OrderBookRequest symbol(@jakarta.annotation.Nonnull String symbol) { } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -104,11 +104,12 @@ public OrderBookRequest limit(@jakarta.annotation.Nullable Long limit) { } /** - * Get limit + * Valid limits:[5, 10, 20, 50, 100, 500, 1000] maximum: 1000 * * @return limit */ @jakarta.annotation.Nullable + @Max(1000L) public Long getLimit() { return limit; } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookResponse.java index 1a15d0050..5528dcdb3 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderBookResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderBookResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -61,6 +61,18 @@ public class OrderBookResponse extends BaseDTO { @jakarta.annotation.Nullable private OrderBookResponseResult result; + public static final String SERIALIZED_NAME_BIDS = "bids"; + + @SerializedName(SERIALIZED_NAME_BIDS) + @jakarta.annotation.Nullable + private List> bids; + + public static final String SERIALIZED_NAME_ASKS = "asks"; + + @SerializedName(SERIALIZED_NAME_ASKS) + @jakarta.annotation.Nullable + private List> asks; + public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @@ -127,6 +139,62 @@ public void setResult(@jakarta.annotation.Nullable OrderBookResponseResult resul this.result = result; } + public OrderBookResponse bids(@jakarta.annotation.Nullable List> bids) { + this.bids = bids; + return this; + } + + public OrderBookResponse addBidsItem(List bidsItem) { + if (this.bids == null) { + this.bids = new ArrayList<>(); + } + this.bids.add(bidsItem); + return this; + } + + /** + * Bid orders. Each entry is [price, quantity]. + * + * @return bids + */ + @jakarta.annotation.Nullable + @Valid + public List> getBids() { + return bids; + } + + public void setBids(@jakarta.annotation.Nullable List> bids) { + this.bids = bids; + } + + public OrderBookResponse asks(@jakarta.annotation.Nullable List> asks) { + this.asks = asks; + return this; + } + + public OrderBookResponse addAsksItem(List asksItem) { + if (this.asks == null) { + this.asks = new ArrayList<>(); + } + this.asks.add(asksItem); + return this; + } + + /** + * Ask orders. Each entry is [price, quantity]. + * + * @return asks + */ + @jakarta.annotation.Nullable + @Valid + public List> getAsks() { + return asks; + } + + public void setAsks(@jakarta.annotation.Nullable List> asks) { + this.asks = asks; + } + public OrderBookResponse rateLimits( @jakarta.annotation.Nullable List<@Valid OrderBookResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; @@ -169,12 +237,14 @@ public boolean equals(Object o) { return Objects.equals(this.id, orderBookResponse.id) && Objects.equals(this.status, orderBookResponse.status) && Objects.equals(this.result, orderBookResponse.result) + && Objects.equals(this.bids, orderBookResponse.bids) + && Objects.equals(this.asks, orderBookResponse.asks) && Objects.equals(this.rateLimits, orderBookResponse.rateLimits); } @Override public int hashCode() { - return Objects.hash(id, status, result, rateLimits); + return Objects.hash(id, status, result, bids, asks, rateLimits); } @Override @@ -184,6 +254,8 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" bids: ").append(toIndentedString(bids)).append("\n"); + sb.append(" asks: ").append(toIndentedString(asks)).append("\n"); sb.append(" rateLimits: ").append(toIndentedString(rateLimits)).append("\n"); sb.append("}"); return sb.toString(); @@ -208,6 +280,16 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } + List> bidsValue = getBids(); + if (bidsValue != null) { + String bidsValueAsString = JSON.getGson().toJson(bidsValue); + valMap.put("bids", bidsValueAsString); + } + List> asksValue = getAsks(); + if (asksValue != null) { + String asksValueAsString = JSON.getGson().toJson(asksValue); + valMap.put("asks", asksValueAsString); + } List<@Valid OrderBookResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); @@ -236,6 +318,14 @@ public Map toMap() { if (resultValue != null) { valMap.put("result", resultValue); } + Object bidsValue = getBids(); + if (bidsValue != null) { + valMap.put("bids", bidsValue); + } + Object asksValue = getAsks(); + if (asksValue != null) { + valMap.put("asks", asksValue); + } Object rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { valMap.put("rateLimits", rateLimitsValue); @@ -269,6 +359,8 @@ private String toIndentedString(Object o) { openapiFields.add("id"); openapiFields.add("status"); openapiFields.add("result"); + openapiFields.add("bids"); + openapiFields.add("asks"); openapiFields.add("rateLimits"); // a set of required properties/fields (JSON key names) @@ -317,6 +409,26 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { OrderBookResponseResult.validateJsonElement(jsonObj.get("result")); } + // ensure the optional json data is an array if present + if (jsonObj.get("bids") != null + && !jsonObj.get("bids").isJsonNull() + && !jsonObj.get("bids").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `bids` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("bids").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("asks") != null + && !jsonObj.get("asks").isJsonNull() + && !jsonObj.get("asks").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `asks` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("asks").toString())); + } if (jsonObj.get("rateLimits") != null && !jsonObj.get("rateLimits").isJsonNull()) { JsonArray jsonArrayrateLimits = jsonObj.getAsJsonArray("rateLimits"); if (jsonArrayrateLimits != null) { diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookResponseRateLimitsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookResponseRateLimitsInner.java index 56a71a94c..6b9e39747 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookResponseRateLimitsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookResponseRateLimitsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderBookResponseRateLimitsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderBookResponseRateLimitsInner extends BaseDTO { public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookResponseResult.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookResponseResult.java index 6e6bea813..3cb54afa6 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookResponseResult.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,13 +23,10 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; -import java.util.ArrayList; import java.util.HashSet; -import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; @@ -40,7 +37,7 @@ /** OrderBookResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderBookResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_LAST_UPDATE_ID = "lastUpdateId"; @@ -60,18 +57,6 @@ public class OrderBookResponseResult extends BaseDTO { @jakarta.annotation.Nullable private Long T; - public static final String SERIALIZED_NAME_BIDS = "bids"; - - @SerializedName(SERIALIZED_NAME_BIDS) - @jakarta.annotation.Nullable - private List bids; - - public static final String SERIALIZED_NAME_ASKS = "asks"; - - @SerializedName(SERIALIZED_NAME_ASKS) - @jakarta.annotation.Nullable - private List asks; - public OrderBookResponseResult() {} public OrderBookResponseResult lastUpdateId(@jakarta.annotation.Nullable Long lastUpdateId) { @@ -99,7 +84,7 @@ public OrderBookResponseResult E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Message output time * * @return E */ @@ -118,7 +103,7 @@ public OrderBookResponseResult T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction time * * @return T */ @@ -131,64 +116,6 @@ public void setT(@jakarta.annotation.Nullable Long T) { this.T = T; } - public OrderBookResponseResult bids( - @jakarta.annotation.Nullable List bids) { - this.bids = bids; - return this; - } - - public OrderBookResponseResult addBidsItem(OrderBookResponseResultBidsItem bidsItem) { - if (this.bids == null) { - this.bids = new ArrayList<>(); - } - this.bids.add(bidsItem); - return this; - } - - /** - * Get bids - * - * @return bids - */ - @jakarta.annotation.Nullable - @Valid - public List getBids() { - return bids; - } - - public void setBids(@jakarta.annotation.Nullable List bids) { - this.bids = bids; - } - - public OrderBookResponseResult asks( - @jakarta.annotation.Nullable List asks) { - this.asks = asks; - return this; - } - - public OrderBookResponseResult addAsksItem(OrderBookResponseResultAsksItem asksItem) { - if (this.asks == null) { - this.asks = new ArrayList<>(); - } - this.asks.add(asksItem); - return this; - } - - /** - * Get asks - * - * @return asks - */ - @jakarta.annotation.Nullable - @Valid - public List getAsks() { - return asks; - } - - public void setAsks(@jakarta.annotation.Nullable List asks) { - this.asks = asks; - } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,14 +127,12 @@ public boolean equals(Object o) { OrderBookResponseResult orderBookResponseResult = (OrderBookResponseResult) o; return Objects.equals(this.lastUpdateId, orderBookResponseResult.lastUpdateId) && Objects.equals(this.E, orderBookResponseResult.E) - && Objects.equals(this.T, orderBookResponseResult.T) - && Objects.equals(this.bids, orderBookResponseResult.bids) - && Objects.equals(this.asks, orderBookResponseResult.asks); + && Objects.equals(this.T, orderBookResponseResult.T); } @Override public int hashCode() { - return Objects.hash(lastUpdateId, E, T, bids, asks); + return Objects.hash(lastUpdateId, E, T); } @Override @@ -217,8 +142,6 @@ public String toString() { sb.append(" lastUpdateId: ").append(toIndentedString(lastUpdateId)).append("\n"); sb.append(" E: ").append(toIndentedString(E)).append("\n"); sb.append(" T: ").append(toIndentedString(T)).append("\n"); - sb.append(" bids: ").append(toIndentedString(bids)).append("\n"); - sb.append(" asks: ").append(toIndentedString(asks)).append("\n"); sb.append("}"); return sb.toString(); } @@ -242,16 +165,6 @@ public String toUrlQueryString() { String TValueAsString = TValue.toString(); valMap.put("T", TValueAsString); } - List bidsValue = getBids(); - if (bidsValue != null) { - String bidsValueAsString = JSON.getGson().toJson(bidsValue); - valMap.put("bids", bidsValueAsString); - } - List asksValue = getAsks(); - if (asksValue != null) { - String asksValueAsString = JSON.getGson().toJson(asksValue); - valMap.put("asks", asksValueAsString); - } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -275,14 +188,6 @@ public Map toMap() { if (TValue != null) { valMap.put("T", TValue); } - Object bidsValue = getBids(); - if (bidsValue != null) { - valMap.put("bids", bidsValue); - } - Object asksValue = getAsks(); - if (asksValue != null) { - valMap.put("asks", asksValue); - } valMap.put("timestamp", getTimestamp()); return valMap; @@ -312,8 +217,6 @@ private String toIndentedString(Object o) { openapiFields.add("lastUpdateId"); openapiFields.add("E"); openapiFields.add("T"); - openapiFields.add("bids"); - openapiFields.add("asks"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -349,26 +252,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("bids") != null - && !jsonObj.get("bids").isJsonNull() - && !jsonObj.get("bids").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `bids` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("bids").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("asks") != null - && !jsonObj.get("asks").isJsonNull() - && !jsonObj.get("asks").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `asks` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("asks").toString())); - } } 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/OrderBookResponseResultAsksItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookResponseResultAsksItem.java deleted file mode 100644 index a34da586b..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookResponseResultAsksItem.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** OrderBookResponseResultAsksItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OrderBookResponseResultAsksItem extends ArrayList { - public OrderBookResponseResultAsksItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrderBookResponseResultAsksItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * OrderBookResponseResultAsksItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OrderBookResponseResultAsksItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OrderBookResponseResultAsksItem is not" - + " found in the empty JSON string", - OrderBookResponseResultAsksItem.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OrderBookResponseResultAsksItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `OrderBookResponseResultAsksItem` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrderBookResponseResultAsksItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OrderBookResponseResultAsksItem' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(OrderBookResponseResultAsksItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OrderBookResponseResultAsksItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public OrderBookResponseResultAsksItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OrderBookResponseResultAsksItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrderBookResponseResultAsksItem - * @throws IOException if the JSON string is invalid with respect to - * OrderBookResponseResultAsksItem - */ - public static OrderBookResponseResultAsksItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OrderBookResponseResultAsksItem.class); - } - - /** - * Convert an instance of OrderBookResponseResultAsksItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookResponseResultBidsItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookResponseResultBidsItem.java deleted file mode 100644 index 1740bfa08..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderBookResponseResultBidsItem.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** OrderBookResponseResultBidsItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OrderBookResponseResultBidsItem extends ArrayList { - public OrderBookResponseResultBidsItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrderBookResponseResultBidsItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * OrderBookResponseResultBidsItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OrderBookResponseResultBidsItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OrderBookResponseResultBidsItem is not" - + " found in the empty JSON string", - OrderBookResponseResultBidsItem.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OrderBookResponseResultBidsItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `OrderBookResponseResultBidsItem` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrderBookResponseResultBidsItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OrderBookResponseResultBidsItem' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(OrderBookResponseResultBidsItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OrderBookResponseResultBidsItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public OrderBookResponseResultBidsItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OrderBookResponseResultBidsItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrderBookResponseResultBidsItem - * @throws IOException if the JSON string is invalid with respect to - * OrderBookResponseResultBidsItem - */ - public static OrderBookResponseResultBidsItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OrderBookResponseResultBidsItem.class); - } - - /** - * Convert an instance of OrderBookResponseResultBidsItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderType.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderType.java new file mode 100644 index 000000000..d486c0058 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/OrderType.java @@ -0,0 +1,73 @@ +/* + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets orderType */ +@JsonAdapter(OrderType.Adapter.class) +public enum OrderType { + LIMIT("LIMIT"), + + MARKET("MARKET"); + + private String value; + + OrderType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderType fromValue(String value) { + for (OrderType b : OrderType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderType.fromValue(value); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationRequest.java index fd8bcba8a..9ebaf55ec 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** PositionInformationRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionInformationRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public PositionInformationRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Id. * * @return id */ @@ -84,7 +84,7 @@ public PositionInformationRequest symbol(@jakarta.annotation.Nullable String sym } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -103,7 +103,7 @@ public PositionInformationRequest recvWindow(@jakarta.annotation.Nullable Long r } /** - * Get recvWindow + * Recv Window. * * @return recvWindow */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationResponse.java index 4086a6bae..6d82b1ccf 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** PositionInformationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionInformationResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class PositionInformationResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits; + private List<@Valid AccountInformationResponseRateLimitsInner> rateLimits; public PositionInformationResponse() {} @@ -142,13 +142,13 @@ public void setResult( public PositionInformationResponse rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits) { + List<@Valid AccountInformationResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public PositionInformationResponse addRateLimitsItem( - AccountInformationV2ResponseRateLimitsInner rateLimitsItem) { + AccountInformationResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -163,13 +163,13 @@ public PositionInformationResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountInformationV2ResponseRateLimitsInner> getRateLimits() { + public List<@Valid AccountInformationResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits) { + List<@Valid AccountInformationResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -224,7 +224,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid AccountInformationResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -364,7 +364,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountInformationV2ResponseRateLimitsInner.validateJsonElement( + AccountInformationResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationResponseResultInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationResponseResultInner.java index 7ff30e070..9dcfac569 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationResponseResultInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** PositionInformationResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionInformationResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_ENTRY_PRICE = "entryPrice"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationV2Request.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationV2Request.java index 035fc7f96..a8a1d9073 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationV2Request.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationV2Request.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** PositionInformationV2Request */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionInformationV2Request extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public PositionInformationV2Request id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Id. * * @return id */ @@ -84,7 +84,7 @@ public PositionInformationV2Request symbol(@jakarta.annotation.Nullable String s } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -103,7 +103,7 @@ public PositionInformationV2Request recvWindow(@jakarta.annotation.Nullable Long } /** - * Get recvWindow + * Recv Window. * * @return recvWindow */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationV2Response.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationV2Response.java index 1a90eabb6..2da60a23a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationV2Response.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationV2Response.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** PositionInformationV2Response */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionInformationV2Response extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class PositionInformationV2Response extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits; + private List<@Valid AccountInformationResponseRateLimitsInner> rateLimits; public PositionInformationV2Response() {} @@ -142,13 +142,13 @@ public void setResult( public PositionInformationV2Response rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits) { + List<@Valid AccountInformationResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public PositionInformationV2Response addRateLimitsItem( - AccountInformationV2ResponseRateLimitsInner rateLimitsItem) { + AccountInformationResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -163,13 +163,13 @@ public PositionInformationV2Response addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountInformationV2ResponseRateLimitsInner> getRateLimits() { + public List<@Valid AccountInformationResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimits) { + List<@Valid AccountInformationResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -225,7 +225,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountInformationV2ResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid AccountInformationResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -365,7 +365,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountInformationV2ResponseRateLimitsInner.validateJsonElement( + AccountInformationResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationV2ResponseResultInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationV2ResponseResultInner.java index 9e69f3008..0c081dee0 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationV2ResponseResultInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionInformationV2ResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** PositionInformationV2ResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PositionInformationV2ResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -188,7 +188,7 @@ public PositionInformationV2ResponseResultInner positionSide( } /** - * Get positionSide + * Position Side * * @return positionSide */ @@ -288,7 +288,7 @@ public PositionInformationV2ResponseResultInner unRealizedProfit( } /** - * Get unRealizedProfit + * Unrealized Profit * * @return unRealizedProfit */ @@ -408,7 +408,7 @@ public PositionInformationV2ResponseResultInner initialMargin( } /** - * Get initialMargin + * Initial Margin * * @return initialMargin */ @@ -428,7 +428,7 @@ public PositionInformationV2ResponseResultInner maintMargin( } /** - * Get maintMargin + * Maintainance Margin * * @return maintMargin */ @@ -448,7 +448,7 @@ public PositionInformationV2ResponseResultInner positionInitialMargin( } /** - * Get positionInitialMargin + * Position Initial Margin * * @return positionInitialMargin */ @@ -469,7 +469,7 @@ public PositionInformationV2ResponseResultInner openOrderInitialMargin( } /** - * Get openOrderInitialMargin + * Open Order Initial Margin * * @return openOrderInitialMargin */ @@ -549,7 +549,7 @@ public PositionInformationV2ResponseResultInner updateTime( } /** - * Get updateTime + * Update Time * * @return updateTime */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionSide.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionSide.java index febee3436..95fe9edb2 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionSide.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PositionSide.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets positionSide */ +/** + * Default `BOTH` for One-way Mode ; `LONG` or `SHORT` for Hedge Mode. + * It must be sent in Hedge Mode. + */ @JsonAdapter(PositionSide.Adapter.class) public enum PositionSide { BOTH("BOTH"), diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PriceMatch.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PriceMatch.java index 287f955f2..aff6a8ef3 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PriceMatch.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PriceMatch.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -21,11 +21,11 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets priceMatch */ +/** + * only available for `LIMIT` order; Can't be passed together with `price` + */ @JsonAdapter(PriceMatch.Adapter.class) public enum PriceMatch { - NONE("NONE"), - OPPONENT("OPPONENT"), OPPONENT_5("OPPONENT_5"), diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PriceProtect.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PriceProtect.java new file mode 100644 index 000000000..f993d0233 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/PriceProtect.java @@ -0,0 +1,77 @@ +/* + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** + * Used with STOP_MARKET or TAKE_PROFIT_MARKET order. when price reaches the triggerPrice ,the + * difference rate between \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be + * larger than the Price Protection Threshold of the symbol. + */ +@JsonAdapter(PriceProtect.Adapter.class) +public enum PriceProtect { + TRUE("true"), + + FALSE("false"); + + private String value; + + PriceProtect(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PriceProtect fromValue(String value) { + for (PriceProtect b : PriceProtect.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PriceProtect enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PriceProtect read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PriceProtect.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PriceProtect.fromValue(value); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/QueryOrderRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/QueryOrderRequest.java index ba914ccdc..cecdc5501 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/QueryOrderRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/QueryOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** QueryOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryOrderRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -77,7 +77,7 @@ public QueryOrderRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Id. * * @return id */ @@ -96,7 +96,7 @@ public QueryOrderRequest symbol(@jakarta.annotation.Nonnull String symbol) { } /** - * Get symbol + * Symbol. * * @return symbol */ @@ -116,7 +116,7 @@ public QueryOrderRequest orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Order Id. * * @return orderId */ @@ -136,7 +136,7 @@ public QueryOrderRequest origClientOrderId( } /** - * Get origClientOrderId + * Orig Client Order Id. * * @return origClientOrderId */ @@ -155,7 +155,7 @@ public QueryOrderRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow } /** - * Get recvWindow + * Recv Window. * * @return recvWindow */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/QueryOrderResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/QueryOrderResponse.java index 10cc45afa..22721aabc 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/QueryOrderResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/QueryOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** QueryOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryOrderResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/QueryOrderResponseResult.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/QueryOrderResponseResult.java index 1b6e7222f..f8027dc4a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/QueryOrderResponseResult.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/QueryOrderResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** QueryOrderResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryOrderResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; @@ -177,6 +177,25 @@ public class QueryOrderResponseResult extends BaseDTO { @jakarta.annotation.Nullable private Boolean priceProtect; + public static final String SERIALIZED_NAME_PRICE_MATCH = "priceMatch"; + + @SerializedName(SERIALIZED_NAME_PRICE_MATCH) + @jakarta.annotation.Nullable + private String priceMatch; + + public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = + "selfTradePreventionMode"; + + @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) + @jakarta.annotation.Nullable + private String selfTradePreventionMode; + + public static final String SERIALIZED_NAME_GOOD_TILL_DATE = "goodTillDate"; + + @SerializedName(SERIALIZED_NAME_GOOD_TILL_DATE) + @jakarta.annotation.Nullable + private Long goodTillDate; + public QueryOrderResponseResult() {} public QueryOrderResponseResult avgPrice(@jakarta.annotation.Nullable String avgPrice) { @@ -414,7 +433,7 @@ public QueryOrderResponseResult stopPrice(@jakarta.annotation.Nullable String st } /** - * Get stopPrice + * please ignore when order type is TRAILING_STOP_MARKET * * @return stopPrice */ @@ -434,7 +453,7 @@ public QueryOrderResponseResult closePosition( } /** - * Get closePosition + * if Close-All * * @return closePosition */ @@ -472,7 +491,7 @@ public QueryOrderResponseResult time(@jakarta.annotation.Nullable Long time) { } /** - * Get time + * order time * * @return time */ @@ -530,7 +549,7 @@ public QueryOrderResponseResult activatePrice( } /** - * Get activatePrice + * activation price, only return with TRAILING_STOP_MARKET order * * @return activatePrice */ @@ -549,7 +568,7 @@ public QueryOrderResponseResult priceRate(@jakarta.annotation.Nullable String pr } /** - * Get priceRate + * callback rate, only return with TRAILING_STOP_MARKET order * * @return priceRate */ @@ -568,7 +587,7 @@ public QueryOrderResponseResult updateTime(@jakarta.annotation.Nullable Long upd } /** - * Get updateTime + * update time * * @return updateTime */ @@ -607,7 +626,7 @@ public QueryOrderResponseResult priceProtect( } /** - * Get priceProtect + * if conditional order trigger is protected * * @return priceProtect */ @@ -620,6 +639,65 @@ public void setPriceProtect(@jakarta.annotation.Nullable Boolean priceProtect) { this.priceProtect = priceProtect; } + public QueryOrderResponseResult priceMatch(@jakarta.annotation.Nullable String priceMatch) { + this.priceMatch = priceMatch; + return this; + } + + /** + * Get priceMatch + * + * @return priceMatch + */ + @jakarta.annotation.Nullable + public String getPriceMatch() { + return priceMatch; + } + + public void setPriceMatch(@jakarta.annotation.Nullable String priceMatch) { + this.priceMatch = priceMatch; + } + + public QueryOrderResponseResult selfTradePreventionMode( + @jakarta.annotation.Nullable String selfTradePreventionMode) { + this.selfTradePreventionMode = selfTradePreventionMode; + return this; + } + + /** + * Self-trade prevention mode + * + * @return selfTradePreventionMode + */ + @jakarta.annotation.Nullable + public String getSelfTradePreventionMode() { + return selfTradePreventionMode; + } + + public void setSelfTradePreventionMode( + @jakarta.annotation.Nullable String selfTradePreventionMode) { + this.selfTradePreventionMode = selfTradePreventionMode; + } + + public QueryOrderResponseResult goodTillDate(@jakarta.annotation.Nullable Long goodTillDate) { + this.goodTillDate = goodTillDate; + return this; + } + + /** + * Order good till date timestamp + * + * @return goodTillDate + */ + @jakarta.annotation.Nullable + public Long getGoodTillDate() { + return goodTillDate; + } + + public void setGoodTillDate(@jakarta.annotation.Nullable Long goodTillDate) { + this.goodTillDate = goodTillDate; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -651,7 +729,12 @@ public boolean equals(Object o) { && Objects.equals(this.priceRate, queryOrderResponseResult.priceRate) && Objects.equals(this.updateTime, queryOrderResponseResult.updateTime) && Objects.equals(this.workingType, queryOrderResponseResult.workingType) - && Objects.equals(this.priceProtect, queryOrderResponseResult.priceProtect); + && Objects.equals(this.priceProtect, queryOrderResponseResult.priceProtect) + && Objects.equals(this.priceMatch, queryOrderResponseResult.priceMatch) + && Objects.equals( + this.selfTradePreventionMode, + queryOrderResponseResult.selfTradePreventionMode) + && Objects.equals(this.goodTillDate, queryOrderResponseResult.goodTillDate); } @Override @@ -679,7 +762,10 @@ public int hashCode() { priceRate, updateTime, workingType, - priceProtect); + priceProtect, + priceMatch, + selfTradePreventionMode, + goodTillDate); } @Override @@ -709,6 +795,11 @@ public String toString() { sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); sb.append(" workingType: ").append(toIndentedString(workingType)).append("\n"); sb.append(" priceProtect: ").append(toIndentedString(priceProtect)).append("\n"); + sb.append(" priceMatch: ").append(toIndentedString(priceMatch)).append("\n"); + sb.append(" selfTradePreventionMode: ") + .append(toIndentedString(selfTradePreventionMode)) + .append("\n"); + sb.append(" goodTillDate: ").append(toIndentedString(goodTillDate)).append("\n"); sb.append("}"); return sb.toString(); } @@ -832,6 +923,21 @@ public String toUrlQueryString() { String priceProtectValueAsString = priceProtectValue.toString(); valMap.put("priceProtect", priceProtectValueAsString); } + String priceMatchValue = getPriceMatch(); + if (priceMatchValue != null) { + String priceMatchValueAsString = priceMatchValue.toString(); + valMap.put("priceMatch", priceMatchValueAsString); + } + String selfTradePreventionModeValue = getSelfTradePreventionMode(); + if (selfTradePreventionModeValue != null) { + String selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); + valMap.put("selfTradePreventionMode", selfTradePreventionModeValueAsString); + } + Long goodTillDateValue = getGoodTillDate(); + if (goodTillDateValue != null) { + String goodTillDateValueAsString = goodTillDateValue.toString(); + valMap.put("goodTillDate", goodTillDateValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -935,6 +1041,18 @@ public Map toMap() { if (priceProtectValue != null) { valMap.put("priceProtect", priceProtectValue); } + Object priceMatchValue = getPriceMatch(); + if (priceMatchValue != null) { + valMap.put("priceMatch", priceMatchValue); + } + Object selfTradePreventionModeValue = getSelfTradePreventionMode(); + if (selfTradePreventionModeValue != null) { + valMap.put("selfTradePreventionMode", selfTradePreventionModeValue); + } + Object goodTillDateValue = getGoodTillDate(); + if (goodTillDateValue != null) { + valMap.put("goodTillDate", goodTillDateValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -984,6 +1102,9 @@ private String toIndentedString(Object o) { openapiFields.add("updateTime"); openapiFields.add("workingType"); openapiFields.add("priceProtect"); + openapiFields.add("priceMatch"); + openapiFields.add("selfTradePreventionMode"); + openapiFields.add("goodTillDate"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -1155,6 +1276,23 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("workingType").toString())); } + if ((jsonObj.get("priceMatch") != null && !jsonObj.get("priceMatch").isJsonNull()) + && !jsonObj.get("priceMatch").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `priceMatch` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("priceMatch").toString())); + } + if ((jsonObj.get("selfTradePreventionMode") != null + && !jsonObj.get("selfTradePreventionMode").isJsonNull()) + && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `selfTradePreventionMode` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("selfTradePreventionMode").toString())); + } } 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/ReduceOnly.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ReduceOnly.java new file mode 100644 index 000000000..5c7058a91 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/ReduceOnly.java @@ -0,0 +1,73 @@ +/* + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Cannot be sent in Hedge Mode */ +@JsonAdapter(ReduceOnly.Adapter.class) +public enum ReduceOnly { + TRUE("true"), + + FALSE("false"); + + private String value; + + ReduceOnly(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ReduceOnly fromValue(String value) { + for (ReduceOnly b : ReduceOnly.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ReduceOnly enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ReduceOnly read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ReduceOnly.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ReduceOnly.fromValue(value); + } +} 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 cf6631dbc..304d07602 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 @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -21,9 +21,15 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets selfTradePreventionMode */ +/** + * `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) public enum SelfTradePreventionMode { + NONE("NONE"), + EXPIRE_TAKER("EXPIRE_TAKER"), EXPIRE_BOTH("EXPIRE_BOTH"), diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/Side.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/Side.java index 92eaea75c..ee5feabc1 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/Side.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/Side.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets side */ +/** Side. */ @JsonAdapter(Side.Adapter.class) public enum Side { BUY("BUY"), diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/StartUserDataStreamRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/StartUserDataStreamRequest.java index fbdd8a3cb..5cb291db7 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/StartUserDataStreamRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/StartUserDataStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** StartUserDataStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class StartUserDataStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -53,7 +53,7 @@ public StartUserDataStreamRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Id. * * @return id */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/StartUserDataStreamResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/StartUserDataStreamResponse.java index d9cbf2527..f2f3ae009 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/StartUserDataStreamResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/StartUserDataStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** StartUserDataStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class StartUserDataStreamResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/StartUserDataStreamResponseResult.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/StartUserDataStreamResponseResult.java index 964217516..12a408b98 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/StartUserDataStreamResponseResult.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/StartUserDataStreamResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** StartUserDataStreamResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class StartUserDataStreamResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerRequest.java index 12f186be5..e62f2af46 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** SymbolOrderBookTickerRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolOrderBookTickerRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -59,7 +59,7 @@ public SymbolOrderBookTickerRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Id. * * @return id */ @@ -78,7 +78,7 @@ public SymbolOrderBookTickerRequest symbol(@jakarta.annotation.Nullable String s } /** - * Get symbol + * Symbol. * * @return symbol */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse.java index 91f814a4e..2719c941b 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolOrderBookTickerResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(SymbolOrderBookTickerResponse.class.getName()); diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse1.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse1.java index 7d202f4e6..4573c386d 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse1.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** SymbolOrderBookTickerResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolOrderBookTickerResponse1 extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse1RateLimitsInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse1RateLimitsInner.java index e262b6218..172746f2c 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse1RateLimitsInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse1RateLimitsInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** SymbolOrderBookTickerResponse1RateLimitsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolOrderBookTickerResponse1RateLimitsInner extends BaseDTO { public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse1Result.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse1Result.java index 4c0b88d76..8cd4cf4c6 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse1Result.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse1Result.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** SymbolOrderBookTickerResponse1Result */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolOrderBookTickerResponse1Result extends BaseDTO { public static final String SERIALIZED_NAME_LAST_UPDATE_ID = "lastUpdateId"; @@ -206,7 +206,7 @@ public SymbolOrderBookTickerResponse1Result time(@jakarta.annotation.Nullable Lo } /** - * Get time + * Transaction time * * @return time */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse2.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse2.java index 8544da39a..5aff0b269 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse2.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** SymbolOrderBookTickerResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolOrderBookTickerResponse2 extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -59,7 +59,7 @@ public class SymbolOrderBookTickerResponse2 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RESULT) @jakarta.annotation.Nullable - private List<@Valid SymbolOrderBookTickerResponse1Result> result; + private List<@Valid SymbolOrderBookTickerResponse2ResultInner> result; public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; @@ -108,13 +108,14 @@ public void setStatus(@jakarta.annotation.Nullable Long status) { } public SymbolOrderBookTickerResponse2 result( - @jakarta.annotation.Nullable List<@Valid SymbolOrderBookTickerResponse1Result> result) { + @jakarta.annotation.Nullable + List<@Valid SymbolOrderBookTickerResponse2ResultInner> result) { this.result = result; return this; } public SymbolOrderBookTickerResponse2 addResultItem( - SymbolOrderBookTickerResponse1Result resultItem) { + SymbolOrderBookTickerResponse2ResultInner resultItem) { if (this.result == null) { this.result = new ArrayList<>(); } @@ -129,12 +130,13 @@ public SymbolOrderBookTickerResponse2 addResultItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid SymbolOrderBookTickerResponse1Result> getResult() { + public List<@Valid SymbolOrderBookTickerResponse2ResultInner> getResult() { return result; } public void setResult( - @jakarta.annotation.Nullable List<@Valid SymbolOrderBookTickerResponse1Result> result) { + @jakarta.annotation.Nullable + List<@Valid SymbolOrderBookTickerResponse2ResultInner> result) { this.result = result; } @@ -218,7 +220,7 @@ public String toUrlQueryString() { String statusValueAsString = statusValue.toString(); valMap.put("status", statusValueAsString); } - List<@Valid SymbolOrderBookTickerResponse1Result> resultValue = getResult(); + List<@Valid SymbolOrderBookTickerResponse2ResultInner> resultValue = getResult(); if (resultValue != null) { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); @@ -344,7 +346,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `result` (array) for (int i = 0; i < jsonArrayresult.size(); i++) { - SymbolOrderBookTickerResponse1Result.validateJsonElement( + SymbolOrderBookTickerResponse2ResultInner.validateJsonElement( jsonArrayresult.get(i)); } ; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse2ResultInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse2ResultInner.java new file mode 100644 index 000000000..a985e522c --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolOrderBookTickerResponse2ResultInner.java @@ -0,0 +1,513 @@ +/* + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** SymbolOrderBookTickerResponse2ResultInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class SymbolOrderBookTickerResponse2ResultInner extends BaseDTO { + public static final String SERIALIZED_NAME_LAST_UPDATE_ID = "lastUpdateId"; + + @SerializedName(SERIALIZED_NAME_LAST_UPDATE_ID) + @jakarta.annotation.Nullable + private Long lastUpdateId; + + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_BID_PRICE = "bidPrice"; + + @SerializedName(SERIALIZED_NAME_BID_PRICE) + @jakarta.annotation.Nullable + private String bidPrice; + + public static final String SERIALIZED_NAME_BID_QTY = "bidQty"; + + @SerializedName(SERIALIZED_NAME_BID_QTY) + @jakarta.annotation.Nullable + private String bidQty; + + public static final String SERIALIZED_NAME_ASK_PRICE = "askPrice"; + + @SerializedName(SERIALIZED_NAME_ASK_PRICE) + @jakarta.annotation.Nullable + private String askPrice; + + public static final String SERIALIZED_NAME_ASK_QTY = "askQty"; + + @SerializedName(SERIALIZED_NAME_ASK_QTY) + @jakarta.annotation.Nullable + private String askQty; + + public static final String SERIALIZED_NAME_TIME = "time"; + + @SerializedName(SERIALIZED_NAME_TIME) + @jakarta.annotation.Nullable + private Long time; + + public SymbolOrderBookTickerResponse2ResultInner() {} + + public SymbolOrderBookTickerResponse2ResultInner lastUpdateId( + @jakarta.annotation.Nullable Long lastUpdateId) { + this.lastUpdateId = lastUpdateId; + return this; + } + + /** + * Get lastUpdateId + * + * @return lastUpdateId + */ + @jakarta.annotation.Nullable + public Long getLastUpdateId() { + return lastUpdateId; + } + + public void setLastUpdateId(@jakarta.annotation.Nullable Long lastUpdateId) { + this.lastUpdateId = lastUpdateId; + } + + public SymbolOrderBookTickerResponse2ResultInner symbol( + @jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Get symbol + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public SymbolOrderBookTickerResponse2ResultInner bidPrice( + @jakarta.annotation.Nullable String bidPrice) { + this.bidPrice = bidPrice; + return this; + } + + /** + * Get bidPrice + * + * @return bidPrice + */ + @jakarta.annotation.Nullable + public String getBidPrice() { + return bidPrice; + } + + public void setBidPrice(@jakarta.annotation.Nullable String bidPrice) { + this.bidPrice = bidPrice; + } + + public SymbolOrderBookTickerResponse2ResultInner bidQty( + @jakarta.annotation.Nullable String bidQty) { + this.bidQty = bidQty; + return this; + } + + /** + * Get bidQty + * + * @return bidQty + */ + @jakarta.annotation.Nullable + public String getBidQty() { + return bidQty; + } + + public void setBidQty(@jakarta.annotation.Nullable String bidQty) { + this.bidQty = bidQty; + } + + public SymbolOrderBookTickerResponse2ResultInner askPrice( + @jakarta.annotation.Nullable String askPrice) { + this.askPrice = askPrice; + return this; + } + + /** + * Get askPrice + * + * @return askPrice + */ + @jakarta.annotation.Nullable + public String getAskPrice() { + return askPrice; + } + + public void setAskPrice(@jakarta.annotation.Nullable String askPrice) { + this.askPrice = askPrice; + } + + public SymbolOrderBookTickerResponse2ResultInner askQty( + @jakarta.annotation.Nullable String askQty) { + this.askQty = askQty; + return this; + } + + /** + * Get askQty + * + * @return askQty + */ + @jakarta.annotation.Nullable + public String getAskQty() { + return askQty; + } + + public void setAskQty(@jakarta.annotation.Nullable String askQty) { + this.askQty = askQty; + } + + public SymbolOrderBookTickerResponse2ResultInner time(@jakarta.annotation.Nullable Long time) { + this.time = time; + return this; + } + + /** + * Transaction time + * + * @return time + */ + @jakarta.annotation.Nullable + public Long getTime() { + return time; + } + + public void setTime(@jakarta.annotation.Nullable Long time) { + this.time = time; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SymbolOrderBookTickerResponse2ResultInner symbolOrderBookTickerResponse2ResultInner = + (SymbolOrderBookTickerResponse2ResultInner) o; + return Objects.equals( + this.lastUpdateId, symbolOrderBookTickerResponse2ResultInner.lastUpdateId) + && Objects.equals(this.symbol, symbolOrderBookTickerResponse2ResultInner.symbol) + && Objects.equals(this.bidPrice, symbolOrderBookTickerResponse2ResultInner.bidPrice) + && Objects.equals(this.bidQty, symbolOrderBookTickerResponse2ResultInner.bidQty) + && Objects.equals(this.askPrice, symbolOrderBookTickerResponse2ResultInner.askPrice) + && Objects.equals(this.askQty, symbolOrderBookTickerResponse2ResultInner.askQty) + && Objects.equals(this.time, symbolOrderBookTickerResponse2ResultInner.time); + } + + @Override + public int hashCode() { + return Objects.hash(lastUpdateId, symbol, bidPrice, bidQty, askPrice, askQty, time); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SymbolOrderBookTickerResponse2ResultInner {\n"); + sb.append(" lastUpdateId: ").append(toIndentedString(lastUpdateId)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" bidPrice: ").append(toIndentedString(bidPrice)).append("\n"); + sb.append(" bidQty: ").append(toIndentedString(bidQty)).append("\n"); + sb.append(" askPrice: ").append(toIndentedString(askPrice)).append("\n"); + sb.append(" askQty: ").append(toIndentedString(askQty)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long lastUpdateIdValue = getLastUpdateId(); + if (lastUpdateIdValue != null) { + String lastUpdateIdValueAsString = lastUpdateIdValue.toString(); + valMap.put("lastUpdateId", lastUpdateIdValueAsString); + } + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + String bidPriceValue = getBidPrice(); + if (bidPriceValue != null) { + String bidPriceValueAsString = bidPriceValue.toString(); + valMap.put("bidPrice", bidPriceValueAsString); + } + String bidQtyValue = getBidQty(); + if (bidQtyValue != null) { + String bidQtyValueAsString = bidQtyValue.toString(); + valMap.put("bidQty", bidQtyValueAsString); + } + String askPriceValue = getAskPrice(); + if (askPriceValue != null) { + String askPriceValueAsString = askPriceValue.toString(); + valMap.put("askPrice", askPriceValueAsString); + } + String askQtyValue = getAskQty(); + if (askQtyValue != null) { + String askQtyValueAsString = askQtyValue.toString(); + valMap.put("askQty", askQtyValueAsString); + } + Long timeValue = getTime(); + if (timeValue != null) { + String timeValueAsString = timeValue.toString(); + valMap.put("time", timeValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object lastUpdateIdValue = getLastUpdateId(); + if (lastUpdateIdValue != null) { + valMap.put("lastUpdateId", lastUpdateIdValue); + } + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + Object bidPriceValue = getBidPrice(); + if (bidPriceValue != null) { + valMap.put("bidPrice", bidPriceValue); + } + Object bidQtyValue = getBidQty(); + if (bidQtyValue != null) { + valMap.put("bidQty", bidQtyValue); + } + Object askPriceValue = getAskPrice(); + if (askPriceValue != null) { + valMap.put("askPrice", askPriceValue); + } + Object askQtyValue = getAskQty(); + if (askQtyValue != null) { + valMap.put("askQty", askQtyValue); + } + Object timeValue = getTime(); + if (timeValue != null) { + valMap.put("time", timeValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("lastUpdateId"); + openapiFields.add("symbol"); + openapiFields.add("bidPrice"); + openapiFields.add("bidQty"); + openapiFields.add("askPrice"); + openapiFields.add("askQty"); + openapiFields.add("time"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SymbolOrderBookTickerResponse2ResultInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SymbolOrderBookTickerResponse2ResultInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " SymbolOrderBookTickerResponse2ResultInner is not found in" + + " the empty JSON string", + SymbolOrderBookTickerResponse2ResultInner.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SymbolOrderBookTickerResponse2ResultInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `SymbolOrderBookTickerResponse2ResultInner` properties." + + " JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + if ((jsonObj.get("bidPrice") != null && !jsonObj.get("bidPrice").isJsonNull()) + && !jsonObj.get("bidPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `bidPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("bidPrice").toString())); + } + if ((jsonObj.get("bidQty") != null && !jsonObj.get("bidQty").isJsonNull()) + && !jsonObj.get("bidQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `bidQty` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("bidQty").toString())); + } + if ((jsonObj.get("askPrice") != null && !jsonObj.get("askPrice").isJsonNull()) + && !jsonObj.get("askPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `askPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("askPrice").toString())); + } + if ((jsonObj.get("askQty") != null && !jsonObj.get("askQty").isJsonNull()) + && !jsonObj.get("askQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `askQty` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("askQty").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SymbolOrderBookTickerResponse2ResultInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'SymbolOrderBookTickerResponse2ResultInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(SymbolOrderBookTickerResponse2ResultInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, SymbolOrderBookTickerResponse2ResultInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SymbolOrderBookTickerResponse2ResultInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of SymbolOrderBookTickerResponse2ResultInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of SymbolOrderBookTickerResponse2ResultInner + * @throws IOException if the JSON string is invalid with respect to + * SymbolOrderBookTickerResponse2ResultInner + */ + public static SymbolOrderBookTickerResponse2ResultInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, SymbolOrderBookTickerResponse2ResultInner.class); + } + + /** + * Convert an instance of SymbolOrderBookTickerResponse2ResultInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerRequest.java index 7c44afe58..1b02ce2ba 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** SymbolPriceTickerRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolPriceTickerRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -59,7 +59,7 @@ public SymbolPriceTickerRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Id. * * @return id */ @@ -78,7 +78,7 @@ public SymbolPriceTickerRequest symbol(@jakarta.annotation.Nullable String symbo } /** - * Get symbol + * Symbol. * * @return symbol */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse.java index 4c5d00eac..6146262e1 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolPriceTickerResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(SymbolPriceTickerResponse.class.getName()); diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse1.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse1.java index 037c27071..a0c6b149e 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse1.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** SymbolPriceTickerResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolPriceTickerResponse1 extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse1Result.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse1Result.java index 96d8d07ee..22791b510 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse1Result.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse1Result.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** SymbolPriceTickerResponse1Result */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolPriceTickerResponse1Result extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -103,7 +103,7 @@ public SymbolPriceTickerResponse1Result time(@jakarta.annotation.Nullable Long t } /** - * Get time + * Transaction time * * @return time */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse2.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse2.java index c01453147..36eb3d3dd 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse2.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** SymbolPriceTickerResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolPriceTickerResponse2 extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -59,7 +59,7 @@ public class SymbolPriceTickerResponse2 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RESULT) @jakarta.annotation.Nullable - private List<@Valid SymbolPriceTickerResponse1Result> result; + private List<@Valid SymbolPriceTickerResponse2ResultInner> result; public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; @@ -108,12 +108,14 @@ public void setStatus(@jakarta.annotation.Nullable Long status) { } public SymbolPriceTickerResponse2 result( - @jakarta.annotation.Nullable List<@Valid SymbolPriceTickerResponse1Result> result) { + @jakarta.annotation.Nullable + List<@Valid SymbolPriceTickerResponse2ResultInner> result) { this.result = result; return this; } - public SymbolPriceTickerResponse2 addResultItem(SymbolPriceTickerResponse1Result resultItem) { + public SymbolPriceTickerResponse2 addResultItem( + SymbolPriceTickerResponse2ResultInner resultItem) { if (this.result == null) { this.result = new ArrayList<>(); } @@ -128,12 +130,13 @@ public SymbolPriceTickerResponse2 addResultItem(SymbolPriceTickerResponse1Result */ @jakarta.annotation.Nullable @Valid - public List<@Valid SymbolPriceTickerResponse1Result> getResult() { + public List<@Valid SymbolPriceTickerResponse2ResultInner> getResult() { return result; } public void setResult( - @jakarta.annotation.Nullable List<@Valid SymbolPriceTickerResponse1Result> result) { + @jakarta.annotation.Nullable + List<@Valid SymbolPriceTickerResponse2ResultInner> result) { this.result = result; } @@ -216,7 +219,7 @@ public String toUrlQueryString() { String statusValueAsString = statusValue.toString(); valMap.put("status", statusValueAsString); } - List<@Valid SymbolPriceTickerResponse1Result> resultValue = getResult(); + List<@Valid SymbolPriceTickerResponse2ResultInner> resultValue = getResult(); if (resultValue != null) { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); @@ -341,7 +344,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `result` (array) for (int i = 0; i < jsonArrayresult.size(); i++) { - SymbolPriceTickerResponse1Result.validateJsonElement(jsonArrayresult.get(i)); + SymbolPriceTickerResponse2ResultInner.validateJsonElement( + jsonArrayresult.get(i)); } ; } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse2ResultInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse2ResultInner.java new file mode 100644 index 000000000..8c88678c4 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SymbolPriceTickerResponse2ResultInner.java @@ -0,0 +1,333 @@ +/* + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** SymbolPriceTickerResponse2ResultInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class SymbolPriceTickerResponse2ResultInner extends BaseDTO { + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_PRICE = "price"; + + @SerializedName(SERIALIZED_NAME_PRICE) + @jakarta.annotation.Nullable + private String price; + + public static final String SERIALIZED_NAME_TIME = "time"; + + @SerializedName(SERIALIZED_NAME_TIME) + @jakarta.annotation.Nullable + private Long time; + + public SymbolPriceTickerResponse2ResultInner() {} + + public SymbolPriceTickerResponse2ResultInner symbol( + @jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Get symbol + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public SymbolPriceTickerResponse2ResultInner price(@jakarta.annotation.Nullable String price) { + this.price = price; + return this; + } + + /** + * Get price + * + * @return price + */ + @jakarta.annotation.Nullable + public String getPrice() { + return price; + } + + public void setPrice(@jakarta.annotation.Nullable String price) { + this.price = price; + } + + public SymbolPriceTickerResponse2ResultInner time(@jakarta.annotation.Nullable Long time) { + this.time = time; + return this; + } + + /** + * Transaction time + * + * @return time + */ + @jakarta.annotation.Nullable + public Long getTime() { + return time; + } + + public void setTime(@jakarta.annotation.Nullable Long time) { + this.time = time; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SymbolPriceTickerResponse2ResultInner symbolPriceTickerResponse2ResultInner = + (SymbolPriceTickerResponse2ResultInner) o; + return Objects.equals(this.symbol, symbolPriceTickerResponse2ResultInner.symbol) + && Objects.equals(this.price, symbolPriceTickerResponse2ResultInner.price) + && Objects.equals(this.time, symbolPriceTickerResponse2ResultInner.time); + } + + @Override + public int hashCode() { + return Objects.hash(symbol, price, time); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SymbolPriceTickerResponse2ResultInner {\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" price: ").append(toIndentedString(price)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + String priceValue = getPrice(); + if (priceValue != null) { + String priceValueAsString = priceValue.toString(); + valMap.put("price", priceValueAsString); + } + Long timeValue = getTime(); + if (timeValue != null) { + String timeValueAsString = timeValue.toString(); + valMap.put("time", timeValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + Object priceValue = getPrice(); + if (priceValue != null) { + valMap.put("price", priceValue); + } + Object timeValue = getTime(); + if (timeValue != null) { + valMap.put("time", timeValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("symbol"); + openapiFields.add("price"); + openapiFields.add("time"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SymbolPriceTickerResponse2ResultInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SymbolPriceTickerResponse2ResultInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SymbolPriceTickerResponse2ResultInner" + + " is not found in the empty JSON string", + SymbolPriceTickerResponse2ResultInner.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SymbolPriceTickerResponse2ResultInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `SymbolPriceTickerResponse2ResultInner` properties. JSON:" + + " %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) + && !jsonObj.get("price").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `price` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("price").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SymbolPriceTickerResponse2ResultInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SymbolPriceTickerResponse2ResultInner' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(SymbolPriceTickerResponse2ResultInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, SymbolPriceTickerResponse2ResultInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SymbolPriceTickerResponse2ResultInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of SymbolPriceTickerResponse2ResultInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of SymbolPriceTickerResponse2ResultInner + * @throws IOException if the JSON string is invalid with respect to + * SymbolPriceTickerResponse2ResultInner + */ + public static SymbolPriceTickerResponse2ResultInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, SymbolPriceTickerResponse2ResultInner.class); + } + + /** + * Convert an instance of SymbolPriceTickerResponse2ResultInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/TimeInForce.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/TimeInForce.java index 2d66c00a0..64f31be2b 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/TimeInForce.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/TimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets timeInForce */ +/** Time In Force. */ @JsonAdapter(TimeInForce.Adapter.class) public enum TimeInForce { GTC("GTC"), diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/WorkingType.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/WorkingType.java index 755b85497..26ce7d33f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/WorkingType.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/WorkingType.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API + * Futures (USDⓈ-M) WebSocket API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets workingType */ +/** + * triggerPrice triggered by: `MARK_PRICE`, `CONTRACT_PRICE`. Default + * `CONTRACT_PRICE` + */ @JsonAdapter(WorkingType.Adapter.class) public enum WorkingType { MARK_PRICE("MARK_PRICE"), diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/JSON.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/JSON.java index 1b8de9ef8..2971ce15c 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/JSON.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -129,58 +129,7 @@ public static GsonBuilder createGson() { "listenKeyExpired", com.binance.connector.client .derivatives_trading_usds_futures.websocket - .stream.model.Listenkeyexpired.class); - classByDiscriminatorValue.put( - "accountConfigUpdate", - com.binance.connector.client - .derivatives_trading_usds_futures.websocket - .stream.model.AccountConfigUpdate.class); - classByDiscriminatorValue.put( - "accountUpdate", - com.binance.connector.client - .derivatives_trading_usds_futures.websocket - .stream.model.AccountUpdate.class); - classByDiscriminatorValue.put( - "algoUpdate", - com.binance.connector.client - .derivatives_trading_usds_futures.websocket - .stream.model.AlgoUpdate.class); - classByDiscriminatorValue.put( - "conditionalOrderTriggerReject", - com.binance.connector.client - .derivatives_trading_usds_futures.websocket - .stream.model.ConditionalOrderTriggerReject - .class); - classByDiscriminatorValue.put( - "gridUpdate", - com.binance.connector.client - .derivatives_trading_usds_futures.websocket - .stream.model.GridUpdate.class); - classByDiscriminatorValue.put( - "listenkeyexpired", - com.binance.connector.client - .derivatives_trading_usds_futures.websocket - .stream.model.Listenkeyexpired.class); - classByDiscriminatorValue.put( - "marginCall", - com.binance.connector.client - .derivatives_trading_usds_futures.websocket - .stream.model.MarginCall.class); - classByDiscriminatorValue.put( - "orderTradeUpdate", - com.binance.connector.client - .derivatives_trading_usds_futures.websocket - .stream.model.OrderTradeUpdate.class); - classByDiscriminatorValue.put( - "strategyUpdate", - com.binance.connector.client - .derivatives_trading_usds_futures.websocket - .stream.model.StrategyUpdate.class); - classByDiscriminatorValue.put( - "tradeLite", - com.binance.connector.client - .derivatives_trading_usds_futures.websocket - .stream.model.TradeLite.class); + .stream.model.ListenKeyExpired.class); classByDiscriminatorValue.put( "UserDataStreamEventsResponse", com.binance.connector.client @@ -308,6 +257,15 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream .model.AllMarketTickersStreamsResponseInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream + .model.AssetIndexRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream + .model.AssetIndexResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream + .model.AssetIndexResponseInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream .model.CompositeIndexSymbolInformationStreamsRequest @@ -353,12 +311,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream .model.DiffBookDepthStreamsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream - .model.DiffBookDepthStreamsResponseAItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream - .model.DiffBookDepthStreamsResponseBItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream .model.GridUpdate.CustomTypeAdapterFactory()); @@ -401,7 +353,7 @@ private static Class getClassByDiscriminator( .model.LiquidationOrderStreamsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream - .model.Listenkeyexpired.CustomTypeAdapterFactory()); + .model.ListenKeyExpired.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream .model.MarginCall.CustomTypeAdapterFactory()); @@ -423,15 +375,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream .model.MarkPriceStreamResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream - .model.MultiAssetsModeAssetIndexRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream - .model.MultiAssetsModeAssetIndexResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream - .model.MultiAssetsModeAssetIndexResponseInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream .model.OrderTradeUpdate.CustomTypeAdapterFactory()); @@ -444,24 +387,12 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream .model.PartialBookDepthStreamsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream - .model.PartialBookDepthStreamsResponseAItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream - .model.PartialBookDepthStreamsResponseBItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream .model.RpiDiffBookDepthStreamsRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream .model.RpiDiffBookDepthStreamsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream - .model.RpiDiffBookDepthStreamsResponseAItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream - .model.RpiDiffBookDepthStreamsResponseBItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream .model.StrategyUpdate.CustomTypeAdapterFactory()); 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 d00a9e00d..245c47ee7 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 @@ -20,6 +20,8 @@ import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketMiniTickersStreamResponse; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketTickersStreamsRequest; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketTickersStreamsResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AssetIndexRequest; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AssetIndexResponse; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.CompositeIndexSymbolInformationStreamsRequest; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.CompositeIndexSymbolInformationStreamsResponse; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.ContinuousContractKlineCandlestickStreamsRequest; @@ -42,8 +44,6 @@ import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MarkPriceStreamForAllMarketResponse; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MarkPriceStreamRequest; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MarkPriceStreamResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MultiAssetsModeAssetIndexRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MultiAssetsModeAssetIndexResponse; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.PartialBookDepthStreamsRequest; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.PartialBookDepthStreamsResponse; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.RpiDiffBookDepthStreamsRequest; @@ -60,7 +60,7 @@ public class DerivativesTradingUsdsFuturesWebSocketStreams { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/11.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private WebSocketClientConfiguration clientConfiguration; @@ -155,6 +155,11 @@ public StreamBlockingQueueWrapper allMarketTick return getMarketApi().allMarketTickersStreams(allMarketTickersStreamsRequest); } + public StreamBlockingQueueWrapper assetIndex( + AssetIndexRequest assetIndexRequest) throws ApiException { + return getMarketApi().assetIndex(assetIndexRequest); + } + public StreamBlockingQueueWrapper compositeIndexSymbolInformationStreams( CompositeIndexSymbolInformationStreamsRequest @@ -217,11 +222,6 @@ public StreamBlockingQueueWrapper markPriceStream( return getMarketApi().markPriceStreamForAllMarket(markPriceStreamForAllMarketRequest); } - public StreamBlockingQueueWrapper multiAssetsModeAssetIndex( - MultiAssetsModeAssetIndexRequest multiAssetsModeAssetIndexRequest) throws ApiException { - return getMarketApi().multiAssetsModeAssetIndex(multiAssetsModeAssetIndexRequest); - } - public StreamBlockingQueueWrapper tradingSessionStream( TradingSessionStreamRequest tradingSessionStreamRequest) throws ApiException { return getMarketApi().tradingSessionStream(tradingSessionStreamRequest); 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 3ab607da0..304ca556e 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 @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -31,6 +31,8 @@ import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketMiniTickersStreamResponse; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketTickersStreamsRequest; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketTickersStreamsResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AssetIndexRequest; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AssetIndexResponse; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.CompositeIndexSymbolInformationStreamsRequest; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.CompositeIndexSymbolInformationStreamsResponse; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.ContinuousContractKlineCandlestickStreamsRequest; @@ -49,8 +51,6 @@ import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MarkPriceStreamForAllMarketResponse; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MarkPriceStreamRequest; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MarkPriceStreamResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MultiAssetsModeAssetIndexRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MultiAssetsModeAssetIndexResponse; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.TradingSessionStreamRequest; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.TradingSessionStreamResponse; import com.google.gson.reflect.TypeToken; @@ -67,7 +67,7 @@ public class MarketApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/11.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private StreamConnectionInterface connection; @@ -97,8 +97,10 @@ public StreamConnectionInterface getConnection() { * Aggregate Trade Streams The Aggregate Trade Streams push market trade information that is * aggregated for fills with same price and taking side every 100 milliseconds. Only market * trades will be aggregated, which means the insurance fund trades and ADL trades won't be - * aggregated. Retail Price Improvement(RPI) orders are aggregated into field `q` and - * without special tags to be distinguished. Update Speed: 100ms + * aggregated. > **After CM migration**, the payload is appended with a new `st` + * field (`1` = UM, `2` = CM). Update Speed: 100ms Response Notes: + * - Retail Price Improvement(RPI) orders are aggregated into field q and without special tags + * to be distinguished. * * @param aggregateTradeStreamsRequest (required) * @return AggregateTradeStreamsResponse @@ -112,7 +114,7 @@ public StreamConnectionInterface getConnection() { * * * @see Aggregate + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#aggregate-trade-streams">Aggregate * Trade Streams Documentation */ public StreamBlockingQueueWrapper aggregateTradeStreams( @@ -182,9 +184,13 @@ private void aggregateTradeStreamsValidateBeforeCall( /** * All Market Liquidation Order Streams The All Liquidation Order Snapshot Streams push force - * liquidation order information for all symbols in the market. For each symbol,only the largest + * liquidation order information for all symbols in the market. For each symbol,only the latest * one liquidation order within 1000ms will be pushed as the snapshot. If no liquidation happens - * in the interval of 1000ms, no stream will be pushed. Update Speed: 1000ms + * in the interval of 1000ms, no stream will be pushed. > **After CM migration**, this stream + * pushes the merged UM + CM universe (subscribable on both `fstream` and + * `dstream`); each payload is appended with a new `st` field (`1` + * = UM, `2` = CM) and a new `ps` field (pair symbol). Update + * Speed: 1000ms * * @param allMarketLiquidationOrderStreamsRequest (required) * @return AllMarketLiquidationOrderStreamsResponse @@ -198,7 +204,7 @@ private void aggregateTradeStreamsValidateBeforeCall( * * * @see All + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#all-market-liquidation-order-streams">All * Market Liquidation Order Streams Documentation */ public StreamBlockingQueueWrapper @@ -269,8 +275,11 @@ private void allMarketLiquidationOrderStreamsValidateBeforeCall( /** * All Market Mini Tickers Stream 24hr rolling window mini-ticker statistics for all symbols. * These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to - * 24hrs before. Note that only tickers that have changed will be present in the array. Update - * Speed: 1000ms + * 24hrs before. Note that only tickers that have changed will be present in the array. > + * **After CM migration**, this stream pushes the merged UM + CM universe (subscribable on both + * `fstream` and `dstream`); each payload is appended with a new + * `st` field (`1` = UM, `2` = CM) and a new + * `ps` field (pair symbol). Update Speed: 1000ms * * @param allMarketMiniTickersStreamRequest (required) * @return AllMarketMiniTickersStreamResponse @@ -284,7 +293,7 @@ private void allMarketLiquidationOrderStreamsValidateBeforeCall( * * * @see All + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#all-market-mini-tickers-stream">All * Market Mini Tickers Stream Documentation */ public StreamBlockingQueueWrapper @@ -355,8 +364,11 @@ private void allMarketMiniTickersStreamValidateBeforeCall( /** * All Market Tickers Streams 24hr rolling window ticker statistics for all symbols. These are * NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs - * before. Note that only tickers that have changed will be present in the array. Update Speed: - * 1000ms + * before. Note that only tickers that have changed will be present in the array. > **After + * CM migration**, this stream pushes the merged UM + CM universe (subscribable on both + * `fstream` and `dstream`); each payload is appended with a new + * `st` field (`1` = UM, `2` = CM) and a new + * `ps` field (pair symbol). Update Speed: 1000ms * * @param allMarketTickersStreamsRequest (required) * @return AllMarketTickersStreamsResponse @@ -370,7 +382,7 @@ private void allMarketMiniTickersStreamValidateBeforeCall( * * * @see All + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#all-market-tickers-streams">All * Market Tickers Streams Documentation */ public StreamBlockingQueueWrapper allMarketTickersStreams( @@ -434,6 +446,89 @@ private void allMarketTickersStreamsValidateBeforeCall( } } + /** + * Multi-Assets Mode Asset Index Asset index price. Subscribe with `!assetIndex@arr` + * for all assets, or `<assetSymbol>@assetIndex` for a specific asset. > + * **CM-UM Integration (Effective 2026-06-30):** Renamed from *Multi-Assets Mode Asset Index*. + * The stream `!assetIndex@arr` now additionally pushes COIN-M settlement-asset price + * index entries (e.g., `BTCUSD`, `ETHUSD`, `BNBUSD`). The + * on-the-wire stream key is unchanged; existing subscriptions continue to work. Update Speed: + * 1s + * + * @param assetIndexRequest (required) + * @return AssetIndexResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Multi-Assets Mode Asset Index -
+ * + * @see Multi-Assets + * Mode Asset Index Documentation + */ + public StreamBlockingQueueWrapper assetIndex( + AssetIndexRequest assetIndexRequest) throws ApiException { + StreamBlockingQueue queue = assetIndexRaw(assetIndexRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue assetIndexRaw(AssetIndexRequest assetIndexRequest) + throws ApiException { + assetIndexValidateBeforeCall(assetIndexRequest); + + String methodName = + "/!assetIndex@arr" + .substring(1) + .replace( + "", + assetIndexRequest.getId() != null + ? assetIndexRequest.getId().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void assetIndexValidateBeforeCall(AssetIndexRequest assetIndexRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(assetIndexRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + /** * Composite Index Symbol Information Streams Composite index information for index symbols * pushed every second. Update Speed: 1000ms @@ -450,7 +545,7 @@ private void allMarketTickersStreamsValidateBeforeCall( * * * @see Composite + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#composite-index-symbol-information-streams">Composite * Index Symbol Information Streams Documentation */ public StreamBlockingQueueWrapper @@ -533,7 +628,9 @@ private void compositeIndexSymbolInformationStreamsValidateBeforeCall( } /** - * Continuous Contract Kline/Candlestick Streams Update Speed: 250ms + * Continuous Contract Kline/Candlestick Streams Continuous Contract Kline/Candlestick Streams + * > **After CM migration**, both `fstream` and `dstream` may subscribe + * to either UM or CM symbols on this stream. Update Speed: 250ms * * @param continuousContractKlineCandlestickStreamsRequest (required) * @return ContinuousContractKlineCandlestickStreamsResponse @@ -547,7 +644,7 @@ private void compositeIndexSymbolInformationStreamsValidateBeforeCall( * * * @see Continuous + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#continuous-contract-kline-candlestick-streams">Continuous * Contract Kline/Candlestick Streams Documentation */ public StreamBlockingQueueWrapper @@ -647,8 +744,11 @@ private void continuousContractKlineCandlestickStreamsValidateBeforeCall( /** * Contract Info Stream ContractInfo stream pushes when contract info - * updates(listing/settlement/contract bracket update). `bks` field only shows up when - * bracket gets updated. Update Speed: Real-time + * updates(listing/settlement/contract bracket update). bks field only shows up when bracket + * gets updated. > **After CM migration**, this stream pushes the merged UM + CM universe + * (subscribable on both `fstream` and `dstream`); each payload is appended + * with a new `st` field (`1` = UM, `2` = CM). Update + * Speed: Real-time * * @param contractInfoStreamRequest (required) * @return ContractInfoStreamResponse @@ -662,7 +762,7 @@ private void continuousContractKlineCandlestickStreamsValidateBeforeCall( * * * @see Contract + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#contract-info-stream">Contract * Info Stream Documentation */ public StreamBlockingQueueWrapper contractInfoStream( @@ -728,7 +828,9 @@ private void contractInfoStreamValidateBeforeCall( /** * Individual Symbol Mini Ticker Stream 24hr rolling window mini-ticker statistics for a single * symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window from - * requestTime to 24hrs before. Update Speed: 2s + * requestTime to 24hrs before. > **After CM migration**, the payload is appended with a new + * `st` field (`1` = UM, `2` = CM) and a new + * `ps` field (pair symbol). Update Speed: 2s * * @param individualSymbolMiniTickerStreamRequest (required) * @return IndividualSymbolMiniTickerStreamResponse @@ -742,7 +844,7 @@ private void contractInfoStreamValidateBeforeCall( * * * @see Individual + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#individual-symbol-mini-ticker-stream">Individual * Symbol Mini Ticker Stream Documentation */ public StreamBlockingQueueWrapper @@ -820,7 +922,9 @@ private void individualSymbolMiniTickerStreamValidateBeforeCall( /** * Individual Symbol Ticker Streams 24hr rolling window ticker statistics for a single symbol. * These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to - * 24hrs before. Update Speed: 2000ms + * 24hrs before. > **After CM migration**, the payload is appended with a new `st` + * field (`1` = UM, `2` = CM) and a new `ps` field (pair + * symbol). Update Speed: 2000ms * * @param individualSymbolTickerStreamsRequest (required) * @return IndividualSymbolTickerStreamsResponse @@ -834,7 +938,7 @@ private void individualSymbolMiniTickerStreamValidateBeforeCall( * * * @see Individual + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#individual-symbol-ticker-streams">Individual * Symbol Ticker Streams Documentation */ public StreamBlockingQueueWrapper @@ -911,7 +1015,9 @@ private void individualSymbolTickerStreamsValidateBeforeCall( /** * Kline/Candlestick Streams The Kline/Candlestick Stream push updates to the current - * klines/candlestick every 250 milliseconds (if existing). Update Speed: 250ms + * klines/candlestick every 250 milliseconds (if existing). > **After CM migration**, both + * `fstream` and `dstream` may subscribe to either UM or CM symbols on this + * stream. Update Speed: 250ms * * @param klineCandlestickStreamsRequest (required) * @return KlineCandlestickStreamsResponse @@ -925,7 +1031,7 @@ private void individualSymbolTickerStreamsValidateBeforeCall( * * * @see Kline/Candlestick + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#kline-candlestick-streams">Kline/Candlestick * Streams Documentation */ public StreamBlockingQueueWrapper klineCandlestickStreams( @@ -1001,9 +1107,9 @@ private void klineCandlestickStreamsValidateBeforeCall( /** * Liquidation Order Streams The Liquidation Order Snapshot Streams push force liquidation order - * information for specific symbol. For each symbol,only the largest one liquidation order - * within 1000ms will be pushed as the snapshot. If no liquidation happens in the interval of - * 1000ms, no stream will be pushed. Update Speed: 1000ms + * information for specific symbol. For each symbol,only the latest one liquidation order within + * 1000ms will be pushed as the snapshot. If no liquidation happens in the interval of 1000ms, + * no stream will be pushed. Update Speed: 1000ms * * @param liquidationOrderStreamsRequest (required) * @return LiquidationOrderStreamsResponse @@ -1017,7 +1123,7 @@ private void klineCandlestickStreamsValidateBeforeCall( * * * @see Liquidation + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#liquidation-order-streams">Liquidation * Order Streams Documentation */ public StreamBlockingQueueWrapper liquidationOrderStreams( @@ -1088,7 +1194,9 @@ private void liquidationOrderStreamsValidateBeforeCall( /** * Mark Price Stream Mark price and funding rate for a single symbol pushed every 3 seconds or - * every second. Update Speed: 3000ms or 1000ms + * every second. > **After CM migration**, the payload is appended with a new `st` + * field (`1` = UM, `2` = CM); both `fstream` and + * `dstream` may subscribe to either UM or CM symbols on this stream. * * @param markPriceStreamRequest (required) * @return MarkPriceStreamResponse @@ -1102,7 +1210,7 @@ private void liquidationOrderStreamsValidateBeforeCall( * * * @see Mark + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#mark-price-stream">Mark * Price Stream Documentation */ public StreamBlockingQueueWrapper markPriceStream( @@ -1176,8 +1284,11 @@ private void markPriceStreamValidateBeforeCall(MarkPriceStreamRequest markPriceS /** * Mark Price Stream for All market Mark price and funding rate for all symbols pushed every 3 - * seconds or every second. **Note**: TradFi symbols will be pushed through a seperate message. - * Update Speed: 3000ms or 1000ms + * seconds or every second. **Note:** - TradFi symbols will be pushed through a seperate + * message. > **After CM migration**, the payload is appended with a new `st` field + * (`1` = UM, `2` = CM); both `fstream` and + * `dstream` may subscribe to either UM or CM symbols on this stream. Update Speed: 3s + * or 1s * * @param markPriceStreamForAllMarketRequest (required) * @return MarkPriceStreamForAllMarketResponse @@ -1191,7 +1302,7 @@ private void markPriceStreamValidateBeforeCall(MarkPriceStreamRequest markPriceS * * * @see Mark + * href="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">Mark * Price Stream for All market Documentation */ public StreamBlockingQueueWrapper @@ -1266,93 +1377,19 @@ private void markPriceStreamForAllMarketValidateBeforeCall( } } - /** - * Multi-Assets Mode Asset Index Asset index for multi-assets mode user Update Speed: 1s - * - * @param multiAssetsModeAssetIndexRequest (required) - * @return MultiAssetsModeAssetIndexResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Multi-Assets Mode Asset Index -
- * - * @see Multi-Assets - * Mode Asset Index Documentation - */ - public StreamBlockingQueueWrapper multiAssetsModeAssetIndex( - MultiAssetsModeAssetIndexRequest multiAssetsModeAssetIndexRequest) throws ApiException { - StreamBlockingQueue queue = - multiAssetsModeAssetIndexRaw(multiAssetsModeAssetIndexRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue multiAssetsModeAssetIndexRaw( - MultiAssetsModeAssetIndexRequest multiAssetsModeAssetIndexRequest) throws ApiException { - multiAssetsModeAssetIndexValidateBeforeCall(multiAssetsModeAssetIndexRequest); - - String methodName = - "/!assetIndex@arr" - .substring(1) - .replace( - "", - multiAssetsModeAssetIndexRequest.getId() != null - ? multiAssetsModeAssetIndexRequest.getId().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void multiAssetsModeAssetIndexValidateBeforeCall( - MultiAssetsModeAssetIndexRequest multiAssetsModeAssetIndexRequest) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(multiAssetsModeAssetIndexRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - /** * Trading Session Stream Trading session information for the underlying assets of TradFi - * Perpetual contracts—covering the U.S. equity market and the commodity market—is updated every - * second. Trading session information for different underlying markets is pushed in separate - * messages. Session types for the equity market include \"PRE_MARKET\", - * \"REGULAR\", \"AFTER_MARKET\", \"OVERNIGHT\", and - * \"NO_TRADING\". Session types for the commodity market include - * \"REGULAR\" and \"NO_TRADING\". Update Speed: 1s + * Perpetual contracts, covering the U.S. equity market, Korean equity market, Hong Kong 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\", + * \"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\". Update Speed: 1s * * @param tradingSessionStreamRequest (required) * @return TradingSessionStreamResponse @@ -1366,7 +1403,7 @@ private void multiAssetsModeAssetIndexValidateBeforeCall( * * * @see Trading + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#trading-session-stream">Trading * Session Stream Documentation */ public StreamBlockingQueueWrapper tradingSessionStream( 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 de933458c..c93fe98e9 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 @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -47,7 +47,7 @@ public class PublicApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/11.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private StreamConnectionInterface connection; @@ -75,8 +75,11 @@ public StreamConnectionInterface getConnection() { /** * All Book Tickers Stream Pushes any update to the best bid or ask's price or quantity in - * real-time for all symbols. Retail Price Improvement(RPI) orders are not visible and excluded - * in the response message. Update Speed: 5s + * real-time for all symbols. > **After CM migration**, this stream pushes the merged UM + CM + * universe (subscribable on both `fstream` and `dstream`); each payload is + * appended with a new `st` field (`1` = UM, `2` = CM) + * and a new `ps` field (pair symbol). Update Speed: 5s Response Notes: - Retail Price + * Improvement(RPI) orders are not visible and excluded in the response message. * * @param allBookTickersStreamRequest (required) * @return AllBookTickersStreamResponse @@ -90,7 +93,7 @@ public StreamConnectionInterface getConnection() { * * * @see All + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/public#all-book-tickers-stream">All * Book Tickers Stream Documentation */ public StreamBlockingQueueWrapper allBookTickersStream( @@ -155,8 +158,10 @@ private void allBookTickersStreamValidateBeforeCall( /** * Diff. Book Depth Streams Bids and asks, pushed every 250 milliseconds, 500 milliseconds, 100 - * milliseconds (if existing) Retail Price Improvement(RPI) orders are not visible and excluded - * in the response message. Update Speed: 250ms, 500ms, 100ms + * milliseconds (if existing). > **After CM migration**, the payload is appended with a new + * `st` field (`1` = UM, `2` = CM) and a new + * `ps` field (pair symbol). Update Speed: 250ms, 500ms, 100ms Response Notes: - + * Retail Price Improvement(RPI) orders are not visible and excluded in the response message. * * @param diffBookDepthStreamsRequest (required) * @return DiffBookDepthStreamsResponse @@ -170,7 +175,7 @@ private void allBookTickersStreamValidateBeforeCall( * * * @see Diff. + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/public#diff-book-depth-streams">Diff. * Book Depth Streams Documentation */ public StreamBlockingQueueWrapper diffBookDepthStreams( @@ -245,8 +250,10 @@ private void diffBookDepthStreamsValidateBeforeCall( /** * Individual Symbol Book Ticker Streams Pushes any update to the best bid or ask's price or - * quantity in real-time for a specified symbol. Retail Price Improvement(RPI) orders are not - * visible and excluded in the response message. Update Speed: Real-time + * quantity in real-time for a specified symbol. > **After CM migration**, the payload is + * appended with a new `st` field (`1` = UM, `2` = CM). + * Update Speed: Real-time Response Notes: Retail Price Improvement (RPI) orders are not visible + * and excluded in the response message. * * @param individualSymbolBookTickerStreamsRequest (required) * @return IndividualSymbolBookTickerStreamsResponse @@ -260,7 +267,7 @@ private void diffBookDepthStreamsValidateBeforeCall( * * * @see Individual + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/public#individual-symbol-book-ticker-streams">Individual * Symbol Book Ticker Streams Documentation */ public StreamBlockingQueueWrapper @@ -340,9 +347,11 @@ private void individualSymbolBookTickerStreamsValidateBeforeCall( } /** - * Partial Book Depth Streams Top **<levels\\>** bids and asks, Valid **<levels\\>** - * are 5, 10, or 20. Retail Price Improvement(RPI) orders are not visible and excluded in the - * response message. Update Speed: 250ms, 500ms or 100ms + * Partial Book Depth Streams Top <levels> bids and asks > **After CM migration**, the + * payload is appended with a new `st` field (`1` = UM, `2` + * = CM) and a new `ps` field (pair symbol). Update Speed: 250ms or 500ms or + * 100ms Response Notes: Retail Price Improvement (RPI) orders are not visible and excluded in + * the response message. * * @param partialBookDepthStreamsRequest (required) * @return PartialBookDepthStreamsResponse @@ -356,7 +365,7 @@ private void individualSymbolBookTickerStreamsValidateBeforeCall( * * * @see Partial + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/public#partial-book-depth-streams">Partial * Book Depth Streams Documentation */ public StreamBlockingQueueWrapper partialBookDepthStreams( @@ -437,10 +446,12 @@ private void partialBookDepthStreamsValidateBeforeCall( /** * RPI Diff. Book Depth Streams Bids and asks including RPI orders, pushed every 500 - * milliseconds RPI(Retail Price Improvement) orders are included and aggreated in the response - * message. When the quantity of a price level to be updated is equal to 0, it means either all - * quotations for this price have been filled/canceled, or the quantity of crossed RPI orders - * for this price are hidden Update Speed: 500ms + * milliseconds > **After CM migration**, the payload is appended with a new `st` + * field (`1` = UM, `2` = CM) and a new `ps` field (pair + * symbol). Update Speed: 500ms Response Notes: - RPI(Retail Price Improvement) orders are + * included and aggreated in the response message. When the quantity of a price level to be + * updated is equal to 0, it means either all quotations for this price have been + * filled/canceled, or the quantity of crossed RPI orders for this price are hidden * * @param rpiDiffBookDepthStreamsRequest (required) * @return RpiDiffBookDepthStreamsResponse @@ -454,7 +465,7 @@ private void partialBookDepthStreamsValidateBeforeCall( * * * @see RPI + * href="https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/public#rpi-diff-book-depth-streams">RPI * Diff. Book Depth Streams Documentation */ public StreamBlockingQueueWrapper rpiDiffBookDepthStreams( diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AbstractOpenApiSchema.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AbstractOpenApiSchema.java index f097acbc4..fb63c3385 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AbstractOpenApiSchema.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AbstractOpenApiSchema.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -18,7 +18,7 @@ /** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountConfigUpdate.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountConfigUpdate.java index 63fcc5410..ca22687a2 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountConfigUpdate.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountConfigUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** AccountConfigUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountConfigUpdate extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -72,7 +72,7 @@ public AccountConfigUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -91,7 +91,7 @@ public AccountConfigUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountConfigUpdateAc.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountConfigUpdateAc.java index 1f75abe97..787d02092 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountConfigUpdateAc.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountConfigUpdateAc.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountConfigUpdateAc */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountConfigUpdateAc extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -59,7 +59,7 @@ public AccountConfigUpdateAc sLowerCase(@jakarta.annotation.Nullable String sLow } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -78,7 +78,7 @@ public AccountConfigUpdateAc lLowerCase(@jakarta.annotation.Nullable Long lLower } /** - * Get lLowerCase + * Leverage * * @return lLowerCase */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountConfigUpdateAi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountConfigUpdateAi.java index 92931a7f4..3094b958f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountConfigUpdateAi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountConfigUpdateAi.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** AccountConfigUpdateAi */ +/** User's Account Configuration */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountConfigUpdateAi extends BaseDTO { public static final String SERIALIZED_NAME_J_LOWER_CASE = "j"; @@ -53,7 +53,7 @@ public AccountConfigUpdateAi jLowerCase(@jakarta.annotation.Nullable Boolean jLo } /** - * Get jLowerCase + * Multi-Assets Mode * * @return jLowerCase */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdate.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdate.java index 32dc75c00..23dbe83e5 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdate.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** AccountUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountUpdate extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -66,7 +66,7 @@ public AccountUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -85,7 +85,7 @@ public AccountUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction * * @return T */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdateA.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdateA.java index 7b88db76a..4a7f9328f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdateA.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdateA.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,10 +38,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** AccountUpdateA */ +/** Update Data */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountUpdateA extends BaseDTO { public static final String SERIALIZED_NAME_M_LOWER_CASE = "m"; @@ -69,7 +69,7 @@ public AccountUpdateA mLowerCase(@jakarta.annotation.Nullable String mLowerCase) } /** - * Get mLowerCase + * Event reason type * * @return mLowerCase */ @@ -96,7 +96,7 @@ public AccountUpdateA addBItem(AccountUpdateABInner BItem) { } /** - * Get B + * Balances * * @return B */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdateABInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdateABInner.java index 21d1b4f1d..837602eb7 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdateABInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdateABInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountUpdateABInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountUpdateABInner extends BaseDTO { public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; @@ -71,7 +71,7 @@ public AccountUpdateABInner aLowerCase(@jakarta.annotation.Nullable String aLowe } /** - * Get aLowerCase + * Asset * * @return aLowerCase */ @@ -90,7 +90,7 @@ public AccountUpdateABInner wb(@jakarta.annotation.Nullable String wb) { } /** - * Get wb + * Wallet Balance * * @return wb */ @@ -109,7 +109,7 @@ public AccountUpdateABInner cw(@jakarta.annotation.Nullable String cw) { } /** - * Get cw + * Cross Wallet Balance * * @return cw */ @@ -128,7 +128,7 @@ public AccountUpdateABInner bc(@jakarta.annotation.Nullable String bc) { } /** - * Get bc + * Balance Change except PnL and Commission * * @return bc */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdateAPInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdateAPInner.java index fb60a21ce..391f57058 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdateAPInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdateAPInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountUpdateAPInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountUpdateAPInner extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -101,7 +101,7 @@ public AccountUpdateAPInner sLowerCase(@jakarta.annotation.Nullable String sLowe } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -120,7 +120,7 @@ public AccountUpdateAPInner pa(@jakarta.annotation.Nullable String pa) { } /** - * Get pa + * Position Amount * * @return pa */ @@ -139,7 +139,7 @@ public AccountUpdateAPInner ep(@jakarta.annotation.Nullable String ep) { } /** - * Get ep + * Entry Price * * @return ep */ @@ -158,7 +158,7 @@ public AccountUpdateAPInner bep(@jakarta.annotation.Nullable String bep) { } /** - * Get bep + * Breakeven Price * * @return bep */ @@ -177,7 +177,7 @@ public AccountUpdateAPInner cr(@jakarta.annotation.Nullable String cr) { } /** - * Get cr + * (Pre-fee) Accumulated Realized * * @return cr */ @@ -196,7 +196,7 @@ public AccountUpdateAPInner up(@jakarta.annotation.Nullable String up) { } /** - * Get up + * Unrealized PnL * * @return up */ @@ -215,7 +215,7 @@ public AccountUpdateAPInner mt(@jakarta.annotation.Nullable String mt) { } /** - * Get mt + * Margin Type * * @return mt */ @@ -234,7 +234,7 @@ public AccountUpdateAPInner iw(@jakarta.annotation.Nullable String iw) { } /** - * Get iw + * Isolated Wallet (if isolated position) * * @return iw */ @@ -253,7 +253,7 @@ public AccountUpdateAPInner ps(@jakarta.annotation.Nullable String ps) { } /** - * Get ps + * Position Side * * @return ps */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AggregateTradeStreamsRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AggregateTradeStreamsRequest.java index 3ad58b7af..deb86db0f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AggregateTradeStreamsRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AggregateTradeStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AggregateTradeStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AggregateTradeStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,7 +48,7 @@ public class AggregateTradeStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public AggregateTradeStreamsRequest() {} @@ -59,7 +59,7 @@ public AggregateTradeStreamsRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -72,23 +72,22 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public AggregateTradeStreamsRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public AggregateTradeStreamsRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -185,7 +184,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -218,16 +216,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AggregateTradeStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -237,7 +225,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AggregateTradeStreamsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AggregateTradeStreamsResponse.java index b1421d0d3..51eebea3b 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AggregateTradeStreamsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AggregateTradeStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AggregateTradeStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AggregateTradeStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -105,6 +105,12 @@ public class AggregateTradeStreamsResponse extends BaseDTO { @jakarta.annotation.Nullable private Boolean mLowerCase; + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public AggregateTradeStreamsResponse() {} public AggregateTradeStreamsResponse eLowerCase( @@ -114,7 +120,7 @@ public AggregateTradeStreamsResponse eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -133,7 +139,7 @@ public AggregateTradeStreamsResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -153,7 +159,7 @@ public AggregateTradeStreamsResponse sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -172,7 +178,7 @@ public AggregateTradeStreamsResponse aLowerCase(@jakarta.annotation.Nullable Lon } /** - * Get aLowerCase + * Aggregate trade ID * * @return aLowerCase */ @@ -192,7 +198,7 @@ public AggregateTradeStreamsResponse pLowerCase( } /** - * Get pLowerCase + * Price * * @return pLowerCase */ @@ -212,7 +218,7 @@ public AggregateTradeStreamsResponse qLowerCase( } /** - * Get qLowerCase + * Quantity with all the market trades * * @return qLowerCase */ @@ -231,7 +237,7 @@ public AggregateTradeStreamsResponse nq(@jakarta.annotation.Nullable String nq) } /** - * Get nq + * Normal quantity without the trades involving RPI orders * * @return nq */ @@ -250,7 +256,7 @@ public AggregateTradeStreamsResponse fLowerCase(@jakarta.annotation.Nullable Lon } /** - * Get fLowerCase + * First trade ID * * @return fLowerCase */ @@ -269,7 +275,7 @@ public AggregateTradeStreamsResponse lLowerCase(@jakarta.annotation.Nullable Lon } /** - * Get lLowerCase + * Last trade ID * * @return lLowerCase */ @@ -288,7 +294,7 @@ public AggregateTradeStreamsResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Trade time * * @return T */ @@ -308,7 +314,7 @@ public AggregateTradeStreamsResponse mLowerCase( } /** - * Get mLowerCase + * Is the buyer the market maker? * * @return mLowerCase */ @@ -321,6 +327,25 @@ public void setmLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { this.mLowerCase = mLowerCase; } + public AggregateTradeStreamsResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -341,7 +366,8 @@ public boolean equals(Object o) { && Objects.equals(this.fLowerCase, aggregateTradeStreamsResponse.fLowerCase) && Objects.equals(this.lLowerCase, aggregateTradeStreamsResponse.lLowerCase) && Objects.equals(this.T, aggregateTradeStreamsResponse.T) - && Objects.equals(this.mLowerCase, aggregateTradeStreamsResponse.mLowerCase); + && Objects.equals(this.mLowerCase, aggregateTradeStreamsResponse.mLowerCase) + && Objects.equals(this.st, aggregateTradeStreamsResponse.st); } @Override @@ -357,7 +383,8 @@ public int hashCode() { fLowerCase, lLowerCase, T, - mLowerCase); + mLowerCase, + st); } @Override @@ -375,6 +402,7 @@ public String toString() { sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); sb.append(" T: ").append(toIndentedString(T)).append("\n"); sb.append(" mLowerCase: ").append(toIndentedString(mLowerCase)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -438,6 +466,11 @@ public String toUrlQueryString() { String mLowerCaseValueAsString = mLowerCaseValue.toString(); valMap.put("mLowerCase", mLowerCaseValueAsString); } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -493,6 +526,10 @@ public Map toMap() { if (mLowerCaseValue != null) { valMap.put("mLowerCase", mLowerCaseValue); } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -530,6 +567,7 @@ private String toIndentedString(Object o) { openapiFields.add("l"); openapiFields.add("T"); openapiFields.add("m"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AlgoUpdate.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AlgoUpdate.java index ec49f592a..b0da89135 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AlgoUpdate.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AlgoUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** AlgoUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AlgoUpdate extends BaseDTO { public static final String SERIALIZED_NAME_T = "T"; @@ -66,7 +66,7 @@ public AlgoUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ @@ -85,7 +85,7 @@ public AlgoUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AlgoUpdateO.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AlgoUpdateO.java index 4ef103775..2bd77d825 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AlgoUpdateO.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AlgoUpdateO.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AlgoUpdateO */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AlgoUpdateO extends BaseDTO { public static final String SERIALIZED_NAME_CAID = "caid"; @@ -197,7 +197,7 @@ public AlgoUpdateO caid(@jakarta.annotation.Nullable String caid) { } /** - * Get caid + * Client Algo Id * * @return caid */ @@ -216,7 +216,7 @@ public AlgoUpdateO aid(@jakarta.annotation.Nullable Long aid) { } /** - * Get aid + * Algo Id * * @return aid */ @@ -235,7 +235,7 @@ public AlgoUpdateO at(@jakarta.annotation.Nullable String at) { } /** - * Get at + * Algo Type * * @return at */ @@ -254,7 +254,7 @@ public AlgoUpdateO oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { } /** - * Get oLowerCase + * Order Type * * @return oLowerCase */ @@ -273,7 +273,7 @@ public AlgoUpdateO sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -292,7 +292,7 @@ public AlgoUpdateO S(@jakarta.annotation.Nullable String S) { } /** - * Get S + * Side * * @return S */ @@ -311,7 +311,7 @@ public AlgoUpdateO ps(@jakarta.annotation.Nullable String ps) { } /** - * Get ps + * Position Side * * @return ps */ @@ -330,7 +330,7 @@ public AlgoUpdateO fLowerCase(@jakarta.annotation.Nullable String fLowerCase) { } /** - * Get fLowerCase + * Time in force * * @return fLowerCase */ @@ -349,7 +349,7 @@ public AlgoUpdateO qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { } /** - * Get qLowerCase + * Quantity * * @return qLowerCase */ @@ -368,7 +368,7 @@ public AlgoUpdateO X(@jakarta.annotation.Nullable String X) { } /** - * Get X + * Algo Status * * @return X */ @@ -387,7 +387,7 @@ public AlgoUpdateO ai(@jakarta.annotation.Nullable String ai) { } /** - * Get ai + * Order Id * * @return ai */ @@ -406,7 +406,8 @@ public AlgoUpdateO ap(@jakarta.annotation.Nullable String ap) { } /** - * Get ap + * Avg fill price in matching engine, only display when order is triggered and placed in + * matching engine * * @return ap */ @@ -425,7 +426,8 @@ public AlgoUpdateO aq(@jakarta.annotation.Nullable String aq) { } /** - * Get aq + * Executed quantity in matching engine, only display when order is triggered and placed in + * matching engine * * @return aq */ @@ -444,7 +446,8 @@ public AlgoUpdateO act(@jakarta.annotation.Nullable String act) { } /** - * Get act + * Actual order type in matching engine, only display when order is triggered and placed in + * matching engine * * @return act */ @@ -463,7 +466,7 @@ public AlgoUpdateO tp(@jakarta.annotation.Nullable String tp) { } /** - * Get tp + * Trigger Price * * @return tp */ @@ -482,7 +485,7 @@ public AlgoUpdateO pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { } /** - * Get pLowerCase + * Order Price * * @return pLowerCase */ @@ -501,7 +504,7 @@ public AlgoUpdateO V(@jakarta.annotation.Nullable String V) { } /** - * Get V + * STP mode * * @return V */ @@ -520,7 +523,7 @@ public AlgoUpdateO wt(@jakarta.annotation.Nullable String wt) { } /** - * Get wt + * Working type * * @return wt */ @@ -539,7 +542,7 @@ public AlgoUpdateO pm(@jakarta.annotation.Nullable String pm) { } /** - * Get pm + * Price match mode * * @return pm */ @@ -558,7 +561,7 @@ public AlgoUpdateO cp(@jakarta.annotation.Nullable Boolean cp) { } /** - * Get cp + * If Close-All * * @return cp */ @@ -577,7 +580,7 @@ public AlgoUpdateO pP(@jakarta.annotation.Nullable Boolean pP) { } /** - * Get pP + * If price protection is turned on * * @return pP */ @@ -596,7 +599,7 @@ public AlgoUpdateO R(@jakarta.annotation.Nullable Boolean R) { } /** - * Get R + * Is this reduce only * * @return R */ @@ -615,7 +618,7 @@ public AlgoUpdateO tt(@jakarta.annotation.Nullable Long tt) { } /** - * Get tt + * Trigger time * * @return tt */ @@ -634,7 +637,7 @@ public AlgoUpdateO gtd(@jakarta.annotation.Nullable Long gtd) { } /** - * Get gtd + * Good till time for GTD time in force * * @return gtd */ @@ -653,7 +656,7 @@ public AlgoUpdateO rm(@jakarta.annotation.Nullable String rm) { } /** - * Get rm + * Algo order failed reason * * @return rm */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllBookTickersStreamRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllBookTickersStreamRequest.java index 36ad50c47..2e3a95509 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllBookTickersStreamRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllBookTickersStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AllBookTickersStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllBookTickersStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -53,7 +53,7 @@ public AllBookTickersStreamRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Unique WebSocket request ID. * * @return id */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllBookTickersStreamResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllBookTickersStreamResponse.java index db3eb7946..38646ab49 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllBookTickersStreamResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllBookTickersStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AllBookTickersStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllBookTickersStreamResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -93,6 +93,18 @@ public class AllBookTickersStreamResponse extends BaseDTO { @jakarta.annotation.Nullable private String A; + public static final String SERIALIZED_NAME_PS = "ps"; + + @SerializedName(SERIALIZED_NAME_PS) + @jakarta.annotation.Nullable + private String ps; + + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public AllBookTickersStreamResponse() {} public AllBookTickersStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { @@ -101,7 +113,7 @@ public AllBookTickersStreamResponse eLowerCase(@jakarta.annotation.Nullable Stri } /** - * Get eLowerCase + * event type * * @return eLowerCase */ @@ -120,7 +132,7 @@ public AllBookTickersStreamResponse uLowerCase(@jakarta.annotation.Nullable Long } /** - * Get uLowerCase + * order book updateId * * @return uLowerCase */ @@ -139,7 +151,7 @@ public AllBookTickersStreamResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * event time * * @return E */ @@ -158,7 +170,7 @@ public AllBookTickersStreamResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * transaction time * * @return T */ @@ -177,7 +189,7 @@ public AllBookTickersStreamResponse sLowerCase(@jakarta.annotation.Nullable Stri } /** - * Get sLowerCase + * symbol * * @return sLowerCase */ @@ -196,7 +208,7 @@ public AllBookTickersStreamResponse bLowerCase(@jakarta.annotation.Nullable Stri } /** - * Get bLowerCase + * best bid price * * @return bLowerCase */ @@ -215,7 +227,7 @@ public AllBookTickersStreamResponse B(@jakarta.annotation.Nullable String B) { } /** - * Get B + * best bid qty * * @return B */ @@ -234,7 +246,7 @@ public AllBookTickersStreamResponse aLowerCase(@jakarta.annotation.Nullable Stri } /** - * Get aLowerCase + * best ask price * * @return aLowerCase */ @@ -253,7 +265,7 @@ public AllBookTickersStreamResponse A(@jakarta.annotation.Nullable String A) { } /** - * Get A + * best ask qty * * @return A */ @@ -266,6 +278,44 @@ public void setA(@jakarta.annotation.Nullable String A) { this.A = A; } + public AllBookTickersStreamResponse ps(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + return this; + } + + /** + * (After CM migration) Pair symbol + * + * @return ps + */ + @jakarta.annotation.Nullable + public String getPs() { + return ps; + } + + public void setPs(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + } + + public AllBookTickersStreamResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -284,12 +334,15 @@ public boolean equals(Object o) { && Objects.equals(this.bLowerCase, allBookTickersStreamResponse.bLowerCase) && Objects.equals(this.B, allBookTickersStreamResponse.B) && Objects.equals(this.aLowerCase, allBookTickersStreamResponse.aLowerCase) - && Objects.equals(this.A, allBookTickersStreamResponse.A); + && Objects.equals(this.A, allBookTickersStreamResponse.A) + && Objects.equals(this.ps, allBookTickersStreamResponse.ps) + && Objects.equals(this.st, allBookTickersStreamResponse.st); } @Override public int hashCode() { - return Objects.hash(eLowerCase, uLowerCase, E, T, sLowerCase, bLowerCase, B, aLowerCase, A); + return Objects.hash( + eLowerCase, uLowerCase, E, T, sLowerCase, bLowerCase, B, aLowerCase, A, ps, st); } @Override @@ -305,6 +358,8 @@ public String toString() { sb.append(" B: ").append(toIndentedString(B)).append("\n"); sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); sb.append(" A: ").append(toIndentedString(A)).append("\n"); + sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -358,6 +413,16 @@ public String toUrlQueryString() { String AValueAsString = AValue.toString(); valMap.put("A", AValueAsString); } + String psValue = getPs(); + if (psValue != null) { + String psValueAsString = psValue.toString(); + valMap.put("ps", psValueAsString); + } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -405,6 +470,14 @@ public Map toMap() { if (AValue != null) { valMap.put("A", AValue); } + Object psValue = getPs(); + if (psValue != null) { + valMap.put("ps", psValue); + } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -440,6 +513,8 @@ private String toIndentedString(Object o) { openapiFields.add("B"); openapiFields.add("a"); openapiFields.add("A"); + openapiFields.add("ps"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -524,6 +599,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("A").toString())); } + if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) + && !jsonObj.get("ps").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ps` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ps").toString())); + } } 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/stream/model/AllMarketLiquidationOrderStreamsRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsRequest.java index 1b8fcd4c9..0aa6e6c6c 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AllMarketLiquidationOrderStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketLiquidationOrderStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -53,7 +53,7 @@ public AllMarketLiquidationOrderStreamsRequest id(@jakarta.annotation.Nullable S } /** - * Get id + * Unique WebSocket request ID. * * @return id */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsResponse.java index 2bc8fb02e..7877615b4 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** AllMarketLiquidationOrderStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketLiquidationOrderStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -58,6 +58,18 @@ public class AllMarketLiquidationOrderStreamsResponse extends BaseDTO { @jakarta.annotation.Nullable private AllMarketLiquidationOrderStreamsResponseO oLowerCase; + public static final String SERIALIZED_NAME_PS = "ps"; + + @SerializedName(SERIALIZED_NAME_PS) + @jakarta.annotation.Nullable + private String ps; + + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public AllMarketLiquidationOrderStreamsResponse() {} public AllMarketLiquidationOrderStreamsResponse eLowerCase( @@ -67,7 +79,7 @@ public AllMarketLiquidationOrderStreamsResponse eLowerCase( } /** - * Get eLowerCase + * Event Type * * @return eLowerCase */ @@ -86,7 +98,7 @@ public AllMarketLiquidationOrderStreamsResponse E(@jakarta.annotation.Nullable L } /** - * Get E + * Event Time * * @return E */ @@ -121,6 +133,44 @@ public void setoLowerCase( this.oLowerCase = oLowerCase; } + public AllMarketLiquidationOrderStreamsResponse ps(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + return this; + } + + /** + * (After CM migration) Pair symbol + * + * @return ps + */ + @jakarta.annotation.Nullable + public String getPs() { + return ps; + } + + public void setPs(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + } + + public AllMarketLiquidationOrderStreamsResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -134,12 +184,14 @@ public boolean equals(Object o) { return Objects.equals(this.eLowerCase, allMarketLiquidationOrderStreamsResponse.eLowerCase) && Objects.equals(this.E, allMarketLiquidationOrderStreamsResponse.E) && Objects.equals( - this.oLowerCase, allMarketLiquidationOrderStreamsResponse.oLowerCase); + this.oLowerCase, allMarketLiquidationOrderStreamsResponse.oLowerCase) + && Objects.equals(this.ps, allMarketLiquidationOrderStreamsResponse.ps) + && Objects.equals(this.st, allMarketLiquidationOrderStreamsResponse.st); } @Override public int hashCode() { - return Objects.hash(eLowerCase, E, oLowerCase); + return Objects.hash(eLowerCase, E, oLowerCase, ps, st); } @Override @@ -149,6 +201,8 @@ public String toString() { sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); sb.append(" E: ").append(toIndentedString(E)).append("\n"); sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); + sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -172,6 +226,16 @@ public String toUrlQueryString() { String oLowerCaseValueAsString = JSON.getGson().toJson(oLowerCaseValue); valMap.put("oLowerCase", oLowerCaseValueAsString); } + String psValue = getPs(); + if (psValue != null) { + String psValueAsString = psValue.toString(); + valMap.put("ps", psValueAsString); + } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -195,6 +259,14 @@ public Map toMap() { if (oLowerCaseValue != null) { valMap.put("oLowerCase", oLowerCaseValue); } + Object psValue = getPs(); + if (psValue != null) { + valMap.put("ps", psValue); + } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -224,6 +296,8 @@ private String toIndentedString(Object o) { openapiFields.add("e"); openapiFields.add("E"); openapiFields.add("o"); + openapiFields.add("ps"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -275,6 +349,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) { AllMarketLiquidationOrderStreamsResponseO.validateJsonElement(jsonObj.get("o")); } + if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) + && !jsonObj.get("ps").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ps` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ps").toString())); + } } 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/stream/model/AllMarketLiquidationOrderStreamsResponseO.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsResponseO.java index ccabb61a8..b8d859571 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsResponseO.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketLiquidationOrderStreamsResponseO.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** AllMarketLiquidationOrderStreamsResponseO */ +/** Order Type */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketLiquidationOrderStreamsResponseO extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -114,7 +114,7 @@ public AllMarketLiquidationOrderStreamsResponseO sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -133,7 +133,7 @@ public AllMarketLiquidationOrderStreamsResponseO S(@jakarta.annotation.Nullable } /** - * Get S + * Side * * @return S */ @@ -153,7 +153,7 @@ public AllMarketLiquidationOrderStreamsResponseO oLowerCase( } /** - * Get oLowerCase + * Order Type * * @return oLowerCase */ @@ -173,7 +173,7 @@ public AllMarketLiquidationOrderStreamsResponseO fLowerCase( } /** - * Get fLowerCase + * Time in Force * * @return fLowerCase */ @@ -193,7 +193,7 @@ public AllMarketLiquidationOrderStreamsResponseO qLowerCase( } /** - * Get qLowerCase + * Original Quantity * * @return qLowerCase */ @@ -213,7 +213,7 @@ public AllMarketLiquidationOrderStreamsResponseO pLowerCase( } /** - * Get pLowerCase + * Price * * @return pLowerCase */ @@ -232,7 +232,7 @@ public AllMarketLiquidationOrderStreamsResponseO ap(@jakarta.annotation.Nullable } /** - * Get ap + * Average Price * * @return ap */ @@ -251,7 +251,7 @@ public AllMarketLiquidationOrderStreamsResponseO X(@jakarta.annotation.Nullable } /** - * Get X + * Order Status * * @return X */ @@ -271,7 +271,7 @@ public AllMarketLiquidationOrderStreamsResponseO lLowerCase( } /** - * Get lLowerCase + * Order Last Filled Quantity * * @return lLowerCase */ @@ -291,7 +291,7 @@ public AllMarketLiquidationOrderStreamsResponseO zLowerCase( } /** - * Get zLowerCase + * Order Filled Accumulated Quantity * * @return zLowerCase */ @@ -310,7 +310,7 @@ public AllMarketLiquidationOrderStreamsResponseO T(@jakarta.annotation.Nullable } /** - * Get T + * Order Trade Time * * @return T */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketMiniTickersStreamRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketMiniTickersStreamRequest.java index 67d997801..b6c98a743 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketMiniTickersStreamRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketMiniTickersStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AllMarketMiniTickersStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketMiniTickersStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -53,7 +53,7 @@ public AllMarketMiniTickersStreamRequest id(@jakarta.annotation.Nullable String } /** - * Get id + * Unique WebSocket request ID. * * @return id */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketMiniTickersStreamResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketMiniTickersStreamResponse.java index 8ab8d0d9e..95841b853 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketMiniTickersStreamResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketMiniTickersStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** AllMarketMiniTickersStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketMiniTickersStreamResponse extends ArrayList { public AllMarketMiniTickersStreamResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketMiniTickersStreamResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketMiniTickersStreamResponseInner.java index 2f4f9c507..7d345e8c7 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketMiniTickersStreamResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketMiniTickersStreamResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AllMarketMiniTickersStreamResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketMiniTickersStreamResponseInner extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -93,6 +93,18 @@ public class AllMarketMiniTickersStreamResponseInner extends BaseDTO { @jakarta.annotation.Nullable private String qLowerCase; + public static final String SERIALIZED_NAME_PS = "ps"; + + @SerializedName(SERIALIZED_NAME_PS) + @jakarta.annotation.Nullable + private String ps; + + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public AllMarketMiniTickersStreamResponseInner() {} public AllMarketMiniTickersStreamResponseInner eLowerCase( @@ -102,7 +114,7 @@ public AllMarketMiniTickersStreamResponseInner eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -121,7 +133,7 @@ public AllMarketMiniTickersStreamResponseInner E(@jakarta.annotation.Nullable Lo } /** - * Get E + * Event time * * @return E */ @@ -141,7 +153,7 @@ public AllMarketMiniTickersStreamResponseInner sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -161,7 +173,7 @@ public AllMarketMiniTickersStreamResponseInner cLowerCase( } /** - * Get cLowerCase + * Close price * * @return cLowerCase */ @@ -181,7 +193,7 @@ public AllMarketMiniTickersStreamResponseInner oLowerCase( } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -201,7 +213,7 @@ public AllMarketMiniTickersStreamResponseInner hLowerCase( } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -221,7 +233,7 @@ public AllMarketMiniTickersStreamResponseInner lLowerCase( } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -241,7 +253,7 @@ public AllMarketMiniTickersStreamResponseInner vLowerCase( } /** - * Get vLowerCase + * Total traded base asset volume * * @return vLowerCase */ @@ -261,7 +273,7 @@ public AllMarketMiniTickersStreamResponseInner qLowerCase( } /** - * Get qLowerCase + * Total traded quote asset volume * * @return qLowerCase */ @@ -274,6 +286,44 @@ public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { this.qLowerCase = qLowerCase; } + public AllMarketMiniTickersStreamResponseInner ps(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + return this; + } + + /** + * (After CM migration) Pair symbol + * + * @return ps + */ + @jakarta.annotation.Nullable + public String getPs() { + return ps; + } + + public void setPs(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + } + + public AllMarketMiniTickersStreamResponseInner st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -299,7 +349,9 @@ public boolean equals(Object o) { && Objects.equals( this.vLowerCase, allMarketMiniTickersStreamResponseInner.vLowerCase) && Objects.equals( - this.qLowerCase, allMarketMiniTickersStreamResponseInner.qLowerCase); + this.qLowerCase, allMarketMiniTickersStreamResponseInner.qLowerCase) + && Objects.equals(this.ps, allMarketMiniTickersStreamResponseInner.ps) + && Objects.equals(this.st, allMarketMiniTickersStreamResponseInner.st); } @Override @@ -313,7 +365,9 @@ public int hashCode() { hLowerCase, lLowerCase, vLowerCase, - qLowerCase); + qLowerCase, + ps, + st); } @Override @@ -329,6 +383,8 @@ public String toString() { sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -382,6 +438,16 @@ public String toUrlQueryString() { String qLowerCaseValueAsString = qLowerCaseValue.toString(); valMap.put("qLowerCase", qLowerCaseValueAsString); } + String psValue = getPs(); + if (psValue != null) { + String psValueAsString = psValue.toString(); + valMap.put("ps", psValueAsString); + } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -429,6 +495,14 @@ public Map toMap() { if (qLowerCaseValue != null) { valMap.put("qLowerCase", qLowerCaseValue); } + Object psValue = getPs(); + if (psValue != null) { + valMap.put("ps", psValue); + } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -464,6 +538,8 @@ private String toIndentedString(Object o) { openapiFields.add("l"); openapiFields.add("v"); openapiFields.add("q"); + openapiFields.add("ps"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -567,6 +643,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("q").toString())); } + if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) + && !jsonObj.get("ps").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ps` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ps").toString())); + } } 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/stream/model/AllMarketTickersStreamsRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketTickersStreamsRequest.java index 7b3e39729..641805d67 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketTickersStreamsRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketTickersStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AllMarketTickersStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketTickersStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -53,7 +53,7 @@ public AllMarketTickersStreamsRequest id(@jakarta.annotation.Nullable String id) } /** - * Get id + * Unique WebSocket request ID. * * @return id */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketTickersStreamsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketTickersStreamsResponse.java index 369d605ee..c7b261d6f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketTickersStreamsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketTickersStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** AllMarketTickersStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketTickersStreamsResponse extends ArrayList { public AllMarketTickersStreamsResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketTickersStreamsResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketTickersStreamsResponseInner.java index ff876f6cf..cab393845 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketTickersStreamsResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AllMarketTickersStreamsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AllMarketTickersStreamsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketTickersStreamsResponseInner extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -147,6 +147,18 @@ public class AllMarketTickersStreamsResponseInner extends BaseDTO { @jakarta.annotation.Nullable private Long nLowerCase; + public static final String SERIALIZED_NAME_PS = "ps"; + + @SerializedName(SERIALIZED_NAME_PS) + @jakarta.annotation.Nullable + private String ps; + + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public AllMarketTickersStreamsResponseInner() {} public AllMarketTickersStreamsResponseInner eLowerCase( @@ -156,7 +168,7 @@ public AllMarketTickersStreamsResponseInner eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -175,7 +187,7 @@ public AllMarketTickersStreamsResponseInner E(@jakarta.annotation.Nullable Long } /** - * Get E + * Event time * * @return E */ @@ -195,7 +207,7 @@ public AllMarketTickersStreamsResponseInner sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -215,7 +227,7 @@ public AllMarketTickersStreamsResponseInner pLowerCase( } /** - * Get pLowerCase + * Price change * * @return pLowerCase */ @@ -234,7 +246,7 @@ public AllMarketTickersStreamsResponseInner P(@jakarta.annotation.Nullable Strin } /** - * Get P + * Price change percent * * @return P */ @@ -254,7 +266,7 @@ public AllMarketTickersStreamsResponseInner wLowerCase( } /** - * Get wLowerCase + * Weighted average price * * @return wLowerCase */ @@ -274,7 +286,7 @@ public AllMarketTickersStreamsResponseInner cLowerCase( } /** - * Get cLowerCase + * Last price * * @return cLowerCase */ @@ -293,7 +305,7 @@ public AllMarketTickersStreamsResponseInner Q(@jakarta.annotation.Nullable Strin } /** - * Get Q + * Last quantity * * @return Q */ @@ -313,7 +325,7 @@ public AllMarketTickersStreamsResponseInner oLowerCase( } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -333,7 +345,7 @@ public AllMarketTickersStreamsResponseInner hLowerCase( } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -353,7 +365,7 @@ public AllMarketTickersStreamsResponseInner lLowerCase( } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -373,7 +385,7 @@ public AllMarketTickersStreamsResponseInner vLowerCase( } /** - * Get vLowerCase + * Total traded base asset volume * * @return vLowerCase */ @@ -393,7 +405,7 @@ public AllMarketTickersStreamsResponseInner qLowerCase( } /** - * Get qLowerCase + * Total traded quote asset volume * * @return qLowerCase */ @@ -412,7 +424,7 @@ public AllMarketTickersStreamsResponseInner O(@jakarta.annotation.Nullable Long } /** - * Get O + * Statistics open time * * @return O */ @@ -431,7 +443,7 @@ public AllMarketTickersStreamsResponseInner C(@jakarta.annotation.Nullable Long } /** - * Get C + * Statistics close time * * @return C */ @@ -450,7 +462,7 @@ public AllMarketTickersStreamsResponseInner F(@jakarta.annotation.Nullable Long } /** - * Get F + * First trade ID * * @return F */ @@ -469,7 +481,7 @@ public AllMarketTickersStreamsResponseInner L(@jakarta.annotation.Nullable Long } /** - * Get L + * Last trade Id * * @return L */ @@ -489,7 +501,7 @@ public AllMarketTickersStreamsResponseInner nLowerCase( } /** - * Get nLowerCase + * Total number of trades * * @return nLowerCase */ @@ -502,6 +514,44 @@ public void setnLowerCase(@jakarta.annotation.Nullable Long nLowerCase) { this.nLowerCase = nLowerCase; } + public AllMarketTickersStreamsResponseInner ps(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + return this; + } + + /** + * (After CM migration) Pair symbol + * + * @return ps + */ + @jakarta.annotation.Nullable + public String getPs() { + return ps; + } + + public void setPs(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + } + + public AllMarketTickersStreamsResponseInner st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -529,7 +579,9 @@ public boolean equals(Object o) { && Objects.equals(this.C, allMarketTickersStreamsResponseInner.C) && Objects.equals(this.F, allMarketTickersStreamsResponseInner.F) && Objects.equals(this.L, allMarketTickersStreamsResponseInner.L) - && Objects.equals(this.nLowerCase, allMarketTickersStreamsResponseInner.nLowerCase); + && Objects.equals(this.nLowerCase, allMarketTickersStreamsResponseInner.nLowerCase) + && Objects.equals(this.ps, allMarketTickersStreamsResponseInner.ps) + && Objects.equals(this.st, allMarketTickersStreamsResponseInner.st); } @Override @@ -552,7 +604,9 @@ public int hashCode() { C, F, L, - nLowerCase); + nLowerCase, + ps, + st); } @Override @@ -577,6 +631,8 @@ public String toString() { sb.append(" F: ").append(toIndentedString(F)).append("\n"); sb.append(" L: ").append(toIndentedString(L)).append("\n"); sb.append(" nLowerCase: ").append(toIndentedString(nLowerCase)).append("\n"); + sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -675,6 +731,16 @@ public String toUrlQueryString() { String nLowerCaseValueAsString = nLowerCaseValue.toString(); valMap.put("nLowerCase", nLowerCaseValueAsString); } + String psValue = getPs(); + if (psValue != null) { + String psValueAsString = psValue.toString(); + valMap.put("ps", psValueAsString); + } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -758,6 +824,14 @@ public Map toMap() { if (nLowerCaseValue != null) { valMap.put("nLowerCase", nLowerCaseValue); } + Object psValue = getPs(); + if (psValue != null) { + valMap.put("ps", psValue); + } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -802,6 +876,8 @@ private String toIndentedString(Object o) { openapiFields.add("F"); openapiFields.add("L"); openapiFields.add("n"); + openapiFields.add("ps"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -936,6 +1012,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("q").toString())); } + if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) + && !jsonObj.get("ps").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ps` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ps").toString())); + } } 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/stream/model/AssetIndexRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AssetIndexRequest.java new file mode 100644 index 000000000..890e4191e --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AssetIndexRequest.java @@ -0,0 +1,240 @@ +/* + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AssetIndexRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AssetIndexRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + + public AssetIndexRequest() {} + + public AssetIndexRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetIndexRequest assetIndexRequest = (AssetIndexRequest) o; + return Objects.equals(this.id, assetIndexRequest.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetIndexRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AssetIndexRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AssetIndexRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AssetIndexRequest is not found in the" + + " empty JSON string", + AssetIndexRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AssetIndexRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AssetIndexRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AssetIndexRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AssetIndexRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AssetIndexRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AssetIndexRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AssetIndexRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AssetIndexRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssetIndexRequest + * @throws IOException if the JSON string is invalid with respect to AssetIndexRequest + */ + public static AssetIndexRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AssetIndexRequest.class); + } + + /** + * Convert an instance of AssetIndexRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AssetIndexResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AssetIndexResponse.java new file mode 100644 index 000000000..a2899fee8 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AssetIndexResponse.java @@ -0,0 +1,189 @@ +/* + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; + +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AssetIndexResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AssetIndexResponse extends ArrayList { + public AssetIndexResponse() {} + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetIndexResponse {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AssetIndexResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AssetIndexResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AssetIndexResponse is not found in the" + + " empty JSON string", + AssetIndexResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AssetIndexResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AssetIndexResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AssetIndexResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AssetIndexResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AssetIndexResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AssetIndexResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); + elementAdapter.write(out, obj); + } + + @Override + public AssetIndexResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AssetIndexResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssetIndexResponse + * @throws IOException if the JSON string is invalid with respect to AssetIndexResponse + */ + public static AssetIndexResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AssetIndexResponse.class); + } + + /** + * Convert an instance of AssetIndexResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AssetIndexResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AssetIndexResponseInner.java new file mode 100644 index 000000000..bfd95db02 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AssetIndexResponseInner.java @@ -0,0 +1,740 @@ +/* + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AssetIndexResponseInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AssetIndexResponseInner extends BaseDTO { + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; + + @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) + @jakarta.annotation.Nullable + private String iLowerCase; + + public static final String SERIALIZED_NAME_B_LOWER_CASE = "b"; + + @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) + @jakarta.annotation.Nullable + private String bLowerCase; + + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private String aLowerCase; + + public static final String SERIALIZED_NAME_B = "B"; + + @SerializedName(SERIALIZED_NAME_B) + @jakarta.annotation.Nullable + private String B; + + public static final String SERIALIZED_NAME_A = "A"; + + @SerializedName(SERIALIZED_NAME_A) + @jakarta.annotation.Nullable + private String A; + + public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; + + @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) + @jakarta.annotation.Nullable + private String qLowerCase; + + public static final String SERIALIZED_NAME_G_LOWER_CASE = "g"; + + @SerializedName(SERIALIZED_NAME_G_LOWER_CASE) + @jakarta.annotation.Nullable + private String gLowerCase; + + public static final String SERIALIZED_NAME_Q = "Q"; + + @SerializedName(SERIALIZED_NAME_Q) + @jakarta.annotation.Nullable + private String Q; + + public static final String SERIALIZED_NAME_G = "G"; + + @SerializedName(SERIALIZED_NAME_G) + @jakarta.annotation.Nullable + private String G; + + public AssetIndexResponseInner() {} + + public AssetIndexResponseInner eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * Event type. + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public AssetIndexResponseInner E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event time. + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public AssetIndexResponseInner sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * Asset index symbol. + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public AssetIndexResponseInner iLowerCase(@jakarta.annotation.Nullable String iLowerCase) { + this.iLowerCase = iLowerCase; + return this; + } + + /** + * Index price. + * + * @return iLowerCase + */ + @jakarta.annotation.Nullable + public String getiLowerCase() { + return iLowerCase; + } + + public void setiLowerCase(@jakarta.annotation.Nullable String iLowerCase) { + this.iLowerCase = iLowerCase; + } + + public AssetIndexResponseInner bLowerCase(@jakarta.annotation.Nullable String bLowerCase) { + this.bLowerCase = bLowerCase; + return this; + } + + /** + * Bid buffer. + * + * @return bLowerCase + */ + @jakarta.annotation.Nullable + public String getbLowerCase() { + return bLowerCase; + } + + public void setbLowerCase(@jakarta.annotation.Nullable String bLowerCase) { + this.bLowerCase = bLowerCase; + } + + public AssetIndexResponseInner aLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + /** + * Ask buffer. + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + public String getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + } + + public AssetIndexResponseInner B(@jakarta.annotation.Nullable String B) { + this.B = B; + return this; + } + + /** + * Bid rate. + * + * @return B + */ + @jakarta.annotation.Nullable + public String getB() { + return B; + } + + public void setB(@jakarta.annotation.Nullable String B) { + this.B = B; + } + + public AssetIndexResponseInner A(@jakarta.annotation.Nullable String A) { + this.A = A; + return this; + } + + /** + * Ask rate. + * + * @return A + */ + @jakarta.annotation.Nullable + public String getA() { + return A; + } + + public void setA(@jakarta.annotation.Nullable String A) { + this.A = A; + } + + public AssetIndexResponseInner qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + return this; + } + + /** + * Auto exchange bid buffer. + * + * @return qLowerCase + */ + @jakarta.annotation.Nullable + public String getqLowerCase() { + return qLowerCase; + } + + public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + } + + public AssetIndexResponseInner gLowerCase(@jakarta.annotation.Nullable String gLowerCase) { + this.gLowerCase = gLowerCase; + return this; + } + + /** + * Auto exchange ask buffer. + * + * @return gLowerCase + */ + @jakarta.annotation.Nullable + public String getgLowerCase() { + return gLowerCase; + } + + public void setgLowerCase(@jakarta.annotation.Nullable String gLowerCase) { + this.gLowerCase = gLowerCase; + } + + public AssetIndexResponseInner Q(@jakarta.annotation.Nullable String Q) { + this.Q = Q; + return this; + } + + /** + * Auto exchange bid rate. + * + * @return Q + */ + @jakarta.annotation.Nullable + public String getQ() { + return Q; + } + + public void setQ(@jakarta.annotation.Nullable String Q) { + this.Q = Q; + } + + public AssetIndexResponseInner G(@jakarta.annotation.Nullable String G) { + this.G = G; + return this; + } + + /** + * Auto exchange ask rate. + * + * @return G + */ + @jakarta.annotation.Nullable + public String getG() { + return G; + } + + public void setG(@jakarta.annotation.Nullable String G) { + this.G = G; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetIndexResponseInner assetIndexResponseInner = (AssetIndexResponseInner) o; + return Objects.equals(this.eLowerCase, assetIndexResponseInner.eLowerCase) + && Objects.equals(this.E, assetIndexResponseInner.E) + && Objects.equals(this.sLowerCase, assetIndexResponseInner.sLowerCase) + && Objects.equals(this.iLowerCase, assetIndexResponseInner.iLowerCase) + && Objects.equals(this.bLowerCase, assetIndexResponseInner.bLowerCase) + && Objects.equals(this.aLowerCase, assetIndexResponseInner.aLowerCase) + && Objects.equals(this.B, assetIndexResponseInner.B) + && Objects.equals(this.A, assetIndexResponseInner.A) + && Objects.equals(this.qLowerCase, assetIndexResponseInner.qLowerCase) + && Objects.equals(this.gLowerCase, assetIndexResponseInner.gLowerCase) + && Objects.equals(this.Q, assetIndexResponseInner.Q) + && Objects.equals(this.G, assetIndexResponseInner.G); + } + + @Override + public int hashCode() { + return Objects.hash( + eLowerCase, + E, + sLowerCase, + iLowerCase, + bLowerCase, + aLowerCase, + B, + A, + qLowerCase, + gLowerCase, + Q, + G); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetIndexResponseInner {\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); + sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" B: ").append(toIndentedString(B)).append("\n"); + sb.append(" A: ").append(toIndentedString(A)).append("\n"); + sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append(" gLowerCase: ").append(toIndentedString(gLowerCase)).append("\n"); + sb.append(" Q: ").append(toIndentedString(Q)).append("\n"); + sb.append(" G: ").append(toIndentedString(G)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + String iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + String iLowerCaseValueAsString = iLowerCaseValue.toString(); + valMap.put("iLowerCase", iLowerCaseValueAsString); + } + String bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + String bLowerCaseValueAsString = bLowerCaseValue.toString(); + valMap.put("bLowerCase", bLowerCaseValueAsString); + } + String aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = aLowerCaseValue.toString(); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + String BValue = getB(); + if (BValue != null) { + String BValueAsString = BValue.toString(); + valMap.put("B", BValueAsString); + } + String AValue = getA(); + if (AValue != null) { + String AValueAsString = AValue.toString(); + valMap.put("A", AValueAsString); + } + String qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + String qLowerCaseValueAsString = qLowerCaseValue.toString(); + valMap.put("qLowerCase", qLowerCaseValueAsString); + } + String gLowerCaseValue = getgLowerCase(); + if (gLowerCaseValue != null) { + String gLowerCaseValueAsString = gLowerCaseValue.toString(); + valMap.put("gLowerCase", gLowerCaseValueAsString); + } + String QValue = getQ(); + if (QValue != null) { + String QValueAsString = QValue.toString(); + valMap.put("Q", QValueAsString); + } + String GValue = getG(); + if (GValue != null) { + String GValueAsString = GValue.toString(); + valMap.put("G", GValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + valMap.put("iLowerCase", iLowerCaseValue); + } + Object bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + valMap.put("bLowerCase", bLowerCaseValue); + } + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + Object BValue = getB(); + if (BValue != null) { + valMap.put("B", BValue); + } + Object AValue = getA(); + if (AValue != null) { + valMap.put("A", AValue); + } + Object qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + valMap.put("qLowerCase", qLowerCaseValue); + } + Object gLowerCaseValue = getgLowerCase(); + if (gLowerCaseValue != null) { + valMap.put("gLowerCase", gLowerCaseValue); + } + Object QValue = getQ(); + if (QValue != null) { + valMap.put("Q", QValue); + } + Object GValue = getG(); + if (GValue != null) { + valMap.put("G", GValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("e"); + openapiFields.add("E"); + openapiFields.add("s"); + openapiFields.add("i"); + openapiFields.add("b"); + openapiFields.add("a"); + openapiFields.add("B"); + openapiFields.add("A"); + openapiFields.add("q"); + openapiFields.add("g"); + openapiFields.add("Q"); + openapiFields.add("G"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AssetIndexResponseInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AssetIndexResponseInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AssetIndexResponseInner is not found" + + " in the empty JSON string", + AssetIndexResponseInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AssetIndexResponseInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AssetIndexResponseInner` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("i") != null && !jsonObj.get("i").isJsonNull()) + && !jsonObj.get("i").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `i` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("i").toString())); + } + if ((jsonObj.get("b") != null && !jsonObj.get("b").isJsonNull()) + && !jsonObj.get("b").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `b` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("b").toString())); + } + if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) + && !jsonObj.get("a").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `a` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("a").toString())); + } + if ((jsonObj.get("B") != null && !jsonObj.get("B").isJsonNull()) + && !jsonObj.get("B").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `B` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("B").toString())); + } + if ((jsonObj.get("A") != null && !jsonObj.get("A").isJsonNull()) + && !jsonObj.get("A").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `A` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("A").toString())); + } + if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) + && !jsonObj.get("q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("q").toString())); + } + if ((jsonObj.get("g") != null && !jsonObj.get("g").isJsonNull()) + && !jsonObj.get("g").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `g` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("g").toString())); + } + if ((jsonObj.get("Q") != null && !jsonObj.get("Q").isJsonNull()) + && !jsonObj.get("Q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("Q").toString())); + } + if ((jsonObj.get("G") != null && !jsonObj.get("G").isJsonNull()) + && !jsonObj.get("G").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `G` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("G").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AssetIndexResponseInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AssetIndexResponseInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AssetIndexResponseInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AssetIndexResponseInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AssetIndexResponseInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AssetIndexResponseInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssetIndexResponseInner + * @throws IOException if the JSON string is invalid with respect to AssetIndexResponseInner + */ + public static AssetIndexResponseInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AssetIndexResponseInner.class); + } + + /** + * Convert an instance of AssetIndexResponseInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/CompositeIndexSymbolInformationStreamsRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/CompositeIndexSymbolInformationStreamsRequest.java index 3ec3400fb..b51df768f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/CompositeIndexSymbolInformationStreamsRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/CompositeIndexSymbolInformationStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** CompositeIndexSymbolInformationStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CompositeIndexSymbolInformationStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,7 +48,7 @@ public class CompositeIndexSymbolInformationStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public CompositeIndexSymbolInformationStreamsRequest() {} @@ -60,7 +60,7 @@ public CompositeIndexSymbolInformationStreamsRequest id( } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -74,23 +74,22 @@ public void setId(@jakarta.annotation.Nullable String id) { } public CompositeIndexSymbolInformationStreamsRequest symbol( - @jakarta.annotation.Nonnull String symbol) { + @jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -189,7 +188,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -226,17 +224,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : - CompositeIndexSymbolInformationStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -246,7 +233,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/CompositeIndexSymbolInformationStreamsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/CompositeIndexSymbolInformationStreamsResponse.java index 067a696c8..e5fc1572f 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/CompositeIndexSymbolInformationStreamsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/CompositeIndexSymbolInformationStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** CompositeIndexSymbolInformationStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CompositeIndexSymbolInformationStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -88,7 +88,7 @@ public CompositeIndexSymbolInformationStreamsResponse eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -107,7 +107,7 @@ public CompositeIndexSymbolInformationStreamsResponse E(@jakarta.annotation.Null } /** - * Get E + * Event time * * @return E */ @@ -127,7 +127,7 @@ public CompositeIndexSymbolInformationStreamsResponse sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -147,7 +147,7 @@ public CompositeIndexSymbolInformationStreamsResponse pLowerCase( } /** - * Get pLowerCase + * Price * * @return pLowerCase */ @@ -166,7 +166,7 @@ public CompositeIndexSymbolInformationStreamsResponse C(@jakarta.annotation.Null } /** - * Get C + * Base asset category. * * @return C */ @@ -196,7 +196,7 @@ public CompositeIndexSymbolInformationStreamsResponse addCLowerCaseItem( } /** - * Get cLowerCase + * Composition * * @return cLowerCase */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/CompositeIndexSymbolInformationStreamsResponseCInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/CompositeIndexSymbolInformationStreamsResponseCInner.java index f5e0c98a3..456bff141 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/CompositeIndexSymbolInformationStreamsResponseCInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/CompositeIndexSymbolInformationStreamsResponseCInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** CompositeIndexSymbolInformationStreamsResponseCInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CompositeIndexSymbolInformationStreamsResponseCInner extends BaseDTO { public static final String SERIALIZED_NAME_B_LOWER_CASE = "b"; @@ -78,7 +78,7 @@ public CompositeIndexSymbolInformationStreamsResponseCInner bLowerCase( } /** - * Get bLowerCase + * Base asset * * @return bLowerCase */ @@ -98,7 +98,7 @@ public CompositeIndexSymbolInformationStreamsResponseCInner qLowerCase( } /** - * Get qLowerCase + * Quote asset * * @return qLowerCase */ @@ -118,7 +118,7 @@ public CompositeIndexSymbolInformationStreamsResponseCInner wLowerCase( } /** - * Get wLowerCase + * Weight in quantity * * @return wLowerCase */ @@ -138,7 +138,7 @@ public CompositeIndexSymbolInformationStreamsResponseCInner W( } /** - * Get W + * Weight in percentage * * @return W */ @@ -158,7 +158,7 @@ public CompositeIndexSymbolInformationStreamsResponseCInner iLowerCase( } /** - * Get iLowerCase + * Index price * * @return iLowerCase */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ConditionalOrderTriggerReject.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ConditionalOrderTriggerReject.java index 4c373dbb0..f73ec52a3 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ConditionalOrderTriggerReject.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ConditionalOrderTriggerReject.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** ConditionalOrderTriggerReject */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ConditionalOrderTriggerReject extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -66,7 +66,7 @@ public ConditionalOrderTriggerReject E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -85,7 +85,7 @@ public ConditionalOrderTriggerReject T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Message send time * * @return T */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ConditionalOrderTriggerRejectOr.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ConditionalOrderTriggerRejectOr.java index c3abaffc0..0e6fa0cf1 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ConditionalOrderTriggerRejectOr.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ConditionalOrderTriggerRejectOr.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** ConditionalOrderTriggerRejectOr */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ConditionalOrderTriggerRejectOr extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -66,7 +66,7 @@ public ConditionalOrderTriggerRejectOr sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -86,7 +86,7 @@ public ConditionalOrderTriggerRejectOr iLowerCase( } /** - * Get iLowerCase + * Order Id * * @return iLowerCase */ @@ -106,7 +106,7 @@ public ConditionalOrderTriggerRejectOr rLowerCase( } /** - * Get rLowerCase + * Reject Reason * * @return rLowerCase */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsRequest.java index cdaaa3401..6491f6da3 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** ContinuousContractKlineCandlestickStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ContinuousContractKlineCandlestickStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,20 +49,20 @@ public class ContinuousContractKlineCandlestickStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_PAIR = "pair"; @SerializedName(SERIALIZED_NAME_PAIR) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String pair; public static final String SERIALIZED_NAME_CONTRACT_TYPE = "contractType"; @SerializedName(SERIALIZED_NAME_CONTRACT_TYPE) - @jakarta.annotation.Nonnull - private String contractType; + @jakarta.annotation.Nullable + private ContractType contractType; public static final String SERIALIZED_NAME_INTERVAL = "interval"; @SerializedName(SERIALIZED_NAME_INTERVAL) - @jakarta.annotation.Nonnull - private String interval; + @jakarta.annotation.Nullable + private Interval interval; public ContinuousContractKlineCandlestickStreamsRequest() {} @@ -72,7 +73,7 @@ public ContinuousContractKlineCandlestickStreamsRequest id( } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -86,7 +87,7 @@ public void setId(@jakarta.annotation.Nullable String id) { } public ContinuousContractKlineCandlestickStreamsRequest pair( - @jakarta.annotation.Nonnull String pair) { + @jakarta.annotation.Nullable String pair) { this.pair = pair; return this; } @@ -96,18 +97,17 @@ public ContinuousContractKlineCandlestickStreamsRequest pair( * * @return pair */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getPair() { return pair; } - public void setPair(@jakarta.annotation.Nonnull String pair) { + public void setPair(@jakarta.annotation.Nullable String pair) { this.pair = pair; } public ContinuousContractKlineCandlestickStreamsRequest contractType( - @jakarta.annotation.Nonnull String contractType) { + @jakarta.annotation.Nullable ContractType contractType) { this.contractType = contractType; return this; } @@ -117,18 +117,18 @@ public ContinuousContractKlineCandlestickStreamsRequest contractType( * * @return contractType */ - @jakarta.annotation.Nonnull - @NotNull - public String getContractType() { + @jakarta.annotation.Nullable + @Valid + public ContractType getContractType() { return contractType; } - public void setContractType(@jakarta.annotation.Nonnull String contractType) { + public void setContractType(@jakarta.annotation.Nullable ContractType contractType) { this.contractType = contractType; } public ContinuousContractKlineCandlestickStreamsRequest interval( - @jakarta.annotation.Nonnull String interval) { + @jakarta.annotation.Nullable Interval interval) { this.interval = interval; return this; } @@ -138,13 +138,13 @@ public ContinuousContractKlineCandlestickStreamsRequest interval( * * @return interval */ - @jakarta.annotation.Nonnull - @NotNull - public String getInterval() { + @jakarta.annotation.Nullable + @Valid + public Interval getInterval() { return interval; } - public void setInterval(@jakarta.annotation.Nonnull String interval) { + public void setInterval(@jakarta.annotation.Nullable Interval interval) { this.interval = interval; } @@ -199,12 +199,12 @@ public String toUrlQueryString() { String pairValueAsString = pairValue.toString(); valMap.put("pair", pairValueAsString); } - String contractTypeValue = getContractType(); + ContractType contractTypeValue = getContractType(); if (contractTypeValue != null) { String contractTypeValueAsString = contractTypeValue.toString(); valMap.put("contractType", contractTypeValueAsString); } - String intervalValue = getInterval(); + Interval intervalValue = getInterval(); if (intervalValue != null) { String intervalValueAsString = intervalValue.toString(); valMap.put("interval", intervalValueAsString); @@ -269,9 +269,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pair"); - openapiRequiredFields.add("contractType"); - openapiRequiredFields.add("interval"); } /** @@ -309,17 +306,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : - ContinuousContractKlineCandlestickStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -329,26 +315,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("pair").isJsonPrimitive()) { + if ((jsonObj.get("pair") != null && !jsonObj.get("pair").isJsonNull()) + && !jsonObj.get("pair").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `pair` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("pair").toString())); } - if (!jsonObj.get("contractType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `contractType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("contractType").toString())); + // validate the optional field `contractType` + if (jsonObj.get("contractType") != null && !jsonObj.get("contractType").isJsonNull()) { + ContractType.validateJsonElement(jsonObj.get("contractType")); } - if (!jsonObj.get("interval").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `interval` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("interval").toString())); + // validate the optional field `interval` + if (jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) { + Interval.validateJsonElement(jsonObj.get("interval")); } } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsResponse.java index b72aceb39..5daec2b8c 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** ContinuousContractKlineCandlestickStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ContinuousContractKlineCandlestickStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -79,7 +79,7 @@ public ContinuousContractKlineCandlestickStreamsResponse eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -99,7 +99,7 @@ public ContinuousContractKlineCandlestickStreamsResponse E( } /** - * Get E + * Event time * * @return E */ @@ -119,7 +119,7 @@ public ContinuousContractKlineCandlestickStreamsResponse ps( } /** - * Get ps + * Pair * * @return ps */ @@ -139,7 +139,7 @@ public ContinuousContractKlineCandlestickStreamsResponse ct( } /** - * Get ct + * Contract type * * @return ct */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsResponseK.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsResponseK.java index cd71f657a..55ef93bed 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsResponseK.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContinuousContractKlineCandlestickStreamsResponseK.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** ContinuousContractKlineCandlestickStreamsResponseK */ +/** Kline payload. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ContinuousContractKlineCandlestickStreamsResponseK extends BaseDTO { public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; @@ -144,7 +144,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK tLowerCase( } /** - * Get tLowerCase + * Kline start time * * @return tLowerCase */ @@ -164,7 +164,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK T( } /** - * Get T + * Kline close time * * @return T */ @@ -184,7 +184,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK iLowerCase( } /** - * Get iLowerCase + * Interval * * @return iLowerCase */ @@ -204,7 +204,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK fLowerCase( } /** - * Get fLowerCase + * First updateId * * @return fLowerCase */ @@ -224,7 +224,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK L( } /** - * Get L + * Last updateId * * @return L */ @@ -244,7 +244,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK oLowerCase( } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -264,7 +264,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK cLowerCase( } /** - * Get cLowerCase + * Close price * * @return cLowerCase */ @@ -284,7 +284,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK hLowerCase( } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -304,7 +304,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK lLowerCase( } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -324,7 +324,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK vLowerCase( } /** - * Get vLowerCase + * volume * * @return vLowerCase */ @@ -344,7 +344,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK nLowerCase( } /** - * Get nLowerCase + * Number of trades * * @return nLowerCase */ @@ -364,7 +364,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK xLowerCase( } /** - * Get xLowerCase + * Is this kline closed? * * @return xLowerCase */ @@ -384,7 +384,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK qLowerCase( } /** - * Get qLowerCase + * Quote asset volume * * @return qLowerCase */ @@ -404,7 +404,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK V( } /** - * Get V + * Taker buy volume * * @return V */ @@ -424,7 +424,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK Q( } /** - * Get Q + * Taker buy quote asset volume * * @return Q */ @@ -444,7 +444,7 @@ public ContinuousContractKlineCandlestickStreamsResponseK B( } /** - * Get B + * Ignore * * @return B */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContractInfoStreamRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContractInfoStreamRequest.java index 5d9cdff13..95156e742 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContractInfoStreamRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContractInfoStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** ContractInfoStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ContractInfoStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -53,7 +53,7 @@ public ContractInfoStreamRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Unique WebSocket request ID. * * @return id */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContractInfoStreamResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContractInfoStreamResponse.java index 34e727fd6..f6b51b8dd 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContractInfoStreamResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContractInfoStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** ContractInfoStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ContractInfoStreamResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -61,12 +61,6 @@ public class ContractInfoStreamResponse extends BaseDTO { @jakarta.annotation.Nullable private String sLowerCase; - public static final String SERIALIZED_NAME_PS = "ps"; - - @SerializedName(SERIALIZED_NAME_PS) - @jakarta.annotation.Nullable - private String ps; - public static final String SERIALIZED_NAME_CT = "ct"; @SerializedName(SERIALIZED_NAME_CT) @@ -97,6 +91,12 @@ public class ContractInfoStreamResponse extends BaseDTO { @jakarta.annotation.Nullable private List<@Valid ContractInfoStreamResponseBksInner> bks; + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public ContractInfoStreamResponse() {} public ContractInfoStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { @@ -105,7 +105,7 @@ public ContractInfoStreamResponse eLowerCase(@jakarta.annotation.Nullable String } /** - * Get eLowerCase + * Event type. * * @return eLowerCase */ @@ -124,7 +124,7 @@ public ContractInfoStreamResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time. * * @return E */ @@ -143,7 +143,7 @@ public ContractInfoStreamResponse sLowerCase(@jakarta.annotation.Nullable String } /** - * Get sLowerCase + * Symbol. * * @return sLowerCase */ @@ -156,32 +156,13 @@ public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { this.sLowerCase = sLowerCase; } - public ContractInfoStreamResponse ps(@jakarta.annotation.Nullable String ps) { - this.ps = ps; - return this; - } - - /** - * Get ps - * - * @return ps - */ - @jakarta.annotation.Nullable - public String getPs() { - return ps; - } - - public void setPs(@jakarta.annotation.Nullable String ps) { - this.ps = ps; - } - public ContractInfoStreamResponse ct(@jakarta.annotation.Nullable String ct) { this.ct = ct; return this; } /** - * Get ct + * Contract type. * * @return ct */ @@ -200,7 +181,7 @@ public ContractInfoStreamResponse dt(@jakarta.annotation.Nullable Long dt) { } /** - * Get dt + * Delivery date time. * * @return dt */ @@ -219,7 +200,7 @@ public ContractInfoStreamResponse ot(@jakarta.annotation.Nullable Long ot) { } /** - * Get ot + * Onboard date time. * * @return ot */ @@ -238,7 +219,7 @@ public ContractInfoStreamResponse cs(@jakarta.annotation.Nullable String cs) { } /** - * Get cs + * Contract status. * * @return cs */ @@ -266,7 +247,7 @@ public ContractInfoStreamResponse addBksItem(ContractInfoStreamResponseBksInner } /** - * Get bks + * Notional bracket updates. * * @return bks */ @@ -281,6 +262,25 @@ public void setBks( this.bks = bks; } + public ContractInfoStreamResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -293,17 +293,17 @@ public boolean equals(Object o) { return Objects.equals(this.eLowerCase, contractInfoStreamResponse.eLowerCase) && Objects.equals(this.E, contractInfoStreamResponse.E) && Objects.equals(this.sLowerCase, contractInfoStreamResponse.sLowerCase) - && Objects.equals(this.ps, contractInfoStreamResponse.ps) && Objects.equals(this.ct, contractInfoStreamResponse.ct) && Objects.equals(this.dt, contractInfoStreamResponse.dt) && Objects.equals(this.ot, contractInfoStreamResponse.ot) && Objects.equals(this.cs, contractInfoStreamResponse.cs) - && Objects.equals(this.bks, contractInfoStreamResponse.bks); + && Objects.equals(this.bks, contractInfoStreamResponse.bks) + && Objects.equals(this.st, contractInfoStreamResponse.st); } @Override public int hashCode() { - return Objects.hash(eLowerCase, E, sLowerCase, ps, ct, dt, ot, cs, bks); + return Objects.hash(eLowerCase, E, sLowerCase, ct, dt, ot, cs, bks, st); } @Override @@ -313,12 +313,12 @@ public String toString() { sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); sb.append(" E: ").append(toIndentedString(E)).append("\n"); sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); - sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); sb.append(" ct: ").append(toIndentedString(ct)).append("\n"); sb.append(" dt: ").append(toIndentedString(dt)).append("\n"); sb.append(" ot: ").append(toIndentedString(ot)).append("\n"); sb.append(" cs: ").append(toIndentedString(cs)).append("\n"); sb.append(" bks: ").append(toIndentedString(bks)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -342,11 +342,6 @@ public String toUrlQueryString() { String sLowerCaseValueAsString = sLowerCaseValue.toString(); valMap.put("sLowerCase", sLowerCaseValueAsString); } - String psValue = getPs(); - if (psValue != null) { - String psValueAsString = psValue.toString(); - valMap.put("ps", psValueAsString); - } String ctValue = getCt(); if (ctValue != null) { String ctValueAsString = ctValue.toString(); @@ -372,6 +367,11 @@ public String toUrlQueryString() { String bksValueAsString = JSON.getGson().toJson(bksValue); valMap.put("bks", bksValueAsString); } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -395,10 +395,6 @@ public Map toMap() { if (sLowerCaseValue != null) { valMap.put("sLowerCase", sLowerCaseValue); } - Object psValue = getPs(); - if (psValue != null) { - valMap.put("ps", psValue); - } Object ctValue = getCt(); if (ctValue != null) { valMap.put("ct", ctValue); @@ -419,6 +415,10 @@ public Map toMap() { if (bksValue != null) { valMap.put("bks", bksValue); } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -448,12 +448,12 @@ private String toIndentedString(Object o) { openapiFields.add("e"); openapiFields.add("E"); openapiFields.add("s"); - openapiFields.add("ps"); openapiFields.add("ct"); openapiFields.add("dt"); openapiFields.add("ot"); openapiFields.add("cs"); openapiFields.add("bks"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -505,14 +505,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("s").toString())); } - if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) - && !jsonObj.get("ps").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ps` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("ps").toString())); - } if ((jsonObj.get("ct") != null && !jsonObj.get("ct").isJsonNull()) && !jsonObj.get("ct").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContractInfoStreamResponseBksInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContractInfoStreamResponseBksInner.java index 8e5339017..66a84de43 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContractInfoStreamResponseBksInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContractInfoStreamResponseBksInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -39,7 +39,7 @@ /** ContractInfoStreamResponseBksInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ContractInfoStreamResponseBksInner extends BaseDTO { public static final String SERIALIZED_NAME_BS = "bs"; @@ -91,7 +91,7 @@ public ContractInfoStreamResponseBksInner bs(@jakarta.annotation.Nullable Long b } /** - * Get bs + * Notional bracket * * @return bs */ @@ -110,7 +110,7 @@ public ContractInfoStreamResponseBksInner bnf(@jakarta.annotation.Nullable Long } /** - * Get bnf + * Floor notional of this bracket * * @return bnf */ @@ -129,7 +129,7 @@ public ContractInfoStreamResponseBksInner bnc(@jakarta.annotation.Nullable Long } /** - * Get bnc + * Cap notional of this bracket * * @return bnc */ @@ -148,7 +148,7 @@ public ContractInfoStreamResponseBksInner mmr(@jakarta.annotation.Nullable Doubl } /** - * Get mmr + * Maintenance ratio for this bracket * * @return mmr */ @@ -168,7 +168,7 @@ public ContractInfoStreamResponseBksInner cf(@jakarta.annotation.Nullable Long c } /** - * Get cf + * Auxiliary number for quick calculation * * @return cf */ @@ -187,7 +187,7 @@ public ContractInfoStreamResponseBksInner mi(@jakarta.annotation.Nullable Long m } /** - * Get mi + * Min leverage for this bracket * * @return mi */ @@ -206,7 +206,7 @@ public ContractInfoStreamResponseBksInner ma(@jakarta.annotation.Nullable Long m } /** - * Get ma + * Max leverage for this bracket * * @return ma */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContractType.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContractType.java new file mode 100644 index 000000000..2a7217174 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ContractType.java @@ -0,0 +1,77 @@ +/* + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets contractType */ +@JsonAdapter(ContractType.Adapter.class) +public enum ContractType { + perpetual("perpetual"), + + current_quarter("current_quarter"), + + next_quarter("next_quarter"), + + tradifi_perpetual("tradifi_perpetual"); + + private String value; + + ContractType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ContractType fromValue(String value) { + for (ContractType b : ContractType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ContractType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ContractType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ContractType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ContractType.fromValue(value); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/DiffBookDepthStreamsRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/DiffBookDepthStreamsRequest.java index d39759d9c..4094a857b 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/DiffBookDepthStreamsRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/DiffBookDepthStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** DiffBookDepthStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DiffBookDepthStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,14 +49,14 @@ public class DiffBookDepthStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_UPDATE_SPEED = "updateSpeed"; @SerializedName(SERIALIZED_NAME_UPDATE_SPEED) @jakarta.annotation.Nullable - private String updateSpeed; + private UpdateSpeed updateSpeed; public DiffBookDepthStreamsRequest() {} @@ -65,7 +66,7 @@ public DiffBookDepthStreamsRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -78,28 +79,27 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public DiffBookDepthStreamsRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public DiffBookDepthStreamsRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Trading pair symbol. * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } public DiffBookDepthStreamsRequest updateSpeed( - @jakarta.annotation.Nullable String updateSpeed) { + @jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; return this; } @@ -110,11 +110,12 @@ public DiffBookDepthStreamsRequest updateSpeed( * @return updateSpeed */ @jakarta.annotation.Nullable - public String getUpdateSpeed() { + @Valid + public UpdateSpeed getUpdateSpeed() { return updateSpeed; } - public void setUpdateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public void setUpdateSpeed(@jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; } @@ -162,7 +163,7 @@ public String toUrlQueryString() { String symbolValueAsString = symbolValue.toString(); valMap.put("symbol", symbolValueAsString); } - String updateSpeedValue = getUpdateSpeed(); + UpdateSpeed updateSpeedValue = getUpdateSpeed(); if (updateSpeedValue != null) { String updateSpeedValueAsString = updateSpeedValue.toString(); valMap.put("updateSpeed", updateSpeedValueAsString); @@ -222,7 +223,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -255,16 +255,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DiffBookDepthStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -274,20 +264,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - if ((jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) - && !jsonObj.get("updateSpeed").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `updateSpeed` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("updateSpeed").toString())); + // validate the optional field `updateSpeed` + if (jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) { + UpdateSpeed.validateJsonElement(jsonObj.get("updateSpeed")); } } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/DiffBookDepthStreamsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/DiffBookDepthStreamsResponse.java index f9d6369a8..edad0f138 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/DiffBookDepthStreamsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/DiffBookDepthStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** DiffBookDepthStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DiffBookDepthStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -88,13 +88,25 @@ public class DiffBookDepthStreamsResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) @jakarta.annotation.Nullable - private List bLowerCase; + private List> bLowerCase; public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) @jakarta.annotation.Nullable - private List aLowerCase; + private List> aLowerCase; + + public static final String SERIALIZED_NAME_PS = "ps"; + + @SerializedName(SERIALIZED_NAME_PS) + @jakarta.annotation.Nullable + private String ps; + + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; public DiffBookDepthStreamsResponse() {} @@ -104,7 +116,7 @@ public DiffBookDepthStreamsResponse eLowerCase(@jakarta.annotation.Nullable Stri } /** - * Get eLowerCase + * Event type. * * @return eLowerCase */ @@ -123,7 +135,7 @@ public DiffBookDepthStreamsResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time. * * @return E */ @@ -142,7 +154,7 @@ public DiffBookDepthStreamsResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction time. * * @return T */ @@ -161,7 +173,7 @@ public DiffBookDepthStreamsResponse sLowerCase(@jakarta.annotation.Nullable Stri } /** - * Get sLowerCase + * Symbol. * * @return sLowerCase */ @@ -180,7 +192,7 @@ public DiffBookDepthStreamsResponse U(@jakarta.annotation.Nullable Long U) { } /** - * Get U + * First update ID in the event. * * @return U */ @@ -199,7 +211,7 @@ public DiffBookDepthStreamsResponse uLowerCase(@jakarta.annotation.Nullable Long } /** - * Get uLowerCase + * Final update ID in the event. * * @return uLowerCase */ @@ -218,7 +230,7 @@ public DiffBookDepthStreamsResponse pu(@jakarta.annotation.Nullable Long pu) { } /** - * Get pu + * Final update ID in the previous stream event. * * @return pu */ @@ -232,13 +244,12 @@ public void setPu(@jakarta.annotation.Nullable Long pu) { } public DiffBookDepthStreamsResponse bLowerCase( - @jakarta.annotation.Nullable List bLowerCase) { + @jakarta.annotation.Nullable List> bLowerCase) { this.bLowerCase = bLowerCase; return this; } - public DiffBookDepthStreamsResponse addBLowerCaseItem( - DiffBookDepthStreamsResponseBItem bLowerCaseItem) { + public DiffBookDepthStreamsResponse addBLowerCaseItem(List bLowerCaseItem) { if (this.bLowerCase == null) { this.bLowerCase = new ArrayList<>(); } @@ -247,29 +258,27 @@ public DiffBookDepthStreamsResponse addBLowerCaseItem( } /** - * Get bLowerCase + * Bid updates. * * @return bLowerCase */ @jakarta.annotation.Nullable @Valid - public List getbLowerCase() { + public List> getbLowerCase() { return bLowerCase; } - public void setbLowerCase( - @jakarta.annotation.Nullable List bLowerCase) { + public void setbLowerCase(@jakarta.annotation.Nullable List> bLowerCase) { this.bLowerCase = bLowerCase; } public DiffBookDepthStreamsResponse aLowerCase( - @jakarta.annotation.Nullable List aLowerCase) { + @jakarta.annotation.Nullable List> aLowerCase) { this.aLowerCase = aLowerCase; return this; } - public DiffBookDepthStreamsResponse addALowerCaseItem( - DiffBookDepthStreamsResponseAItem aLowerCaseItem) { + public DiffBookDepthStreamsResponse addALowerCaseItem(List aLowerCaseItem) { if (this.aLowerCase == null) { this.aLowerCase = new ArrayList<>(); } @@ -278,21 +287,58 @@ public DiffBookDepthStreamsResponse addALowerCaseItem( } /** - * Get aLowerCase + * Ask updates. * * @return aLowerCase */ @jakarta.annotation.Nullable @Valid - public List getaLowerCase() { + public List> getaLowerCase() { return aLowerCase; } - public void setaLowerCase( - @jakarta.annotation.Nullable List aLowerCase) { + public void setaLowerCase(@jakarta.annotation.Nullable List> aLowerCase) { this.aLowerCase = aLowerCase; } + public DiffBookDepthStreamsResponse ps(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + return this; + } + + /** + * (After CM migration) Pair symbol + * + * @return ps + */ + @jakarta.annotation.Nullable + public String getPs() { + return ps; + } + + public void setPs(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + } + + public DiffBookDepthStreamsResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -311,13 +357,15 @@ public boolean equals(Object o) { && Objects.equals(this.uLowerCase, diffBookDepthStreamsResponse.uLowerCase) && Objects.equals(this.pu, diffBookDepthStreamsResponse.pu) && Objects.equals(this.bLowerCase, diffBookDepthStreamsResponse.bLowerCase) - && Objects.equals(this.aLowerCase, diffBookDepthStreamsResponse.aLowerCase); + && Objects.equals(this.aLowerCase, diffBookDepthStreamsResponse.aLowerCase) + && Objects.equals(this.ps, diffBookDepthStreamsResponse.ps) + && Objects.equals(this.st, diffBookDepthStreamsResponse.st); } @Override public int hashCode() { return Objects.hash( - eLowerCase, E, T, sLowerCase, U, uLowerCase, pu, bLowerCase, aLowerCase); + eLowerCase, E, T, sLowerCase, U, uLowerCase, pu, bLowerCase, aLowerCase, ps, st); } @Override @@ -333,6 +381,8 @@ public String toString() { sb.append(" pu: ").append(toIndentedString(pu)).append("\n"); sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -376,16 +426,26 @@ public String toUrlQueryString() { String puValueAsString = puValue.toString(); valMap.put("pu", puValueAsString); } - List bLowerCaseValue = getbLowerCase(); + List> bLowerCaseValue = getbLowerCase(); if (bLowerCaseValue != null) { String bLowerCaseValueAsString = JSON.getGson().toJson(bLowerCaseValue); valMap.put("bLowerCase", bLowerCaseValueAsString); } - List aLowerCaseValue = getaLowerCase(); + List> aLowerCaseValue = getaLowerCase(); if (aLowerCaseValue != null) { String aLowerCaseValueAsString = JSON.getGson().toJson(aLowerCaseValue); valMap.put("aLowerCase", aLowerCaseValueAsString); } + String psValue = getPs(); + if (psValue != null) { + String psValueAsString = psValue.toString(); + valMap.put("ps", psValueAsString); + } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -433,6 +493,14 @@ public Map toMap() { if (aLowerCaseValue != null) { valMap.put("aLowerCase", aLowerCaseValue); } + Object psValue = getPs(); + if (psValue != null) { + valMap.put("ps", psValue); + } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -468,6 +536,8 @@ private String toIndentedString(Object o) { openapiFields.add("pu"); openapiFields.add("b"); openapiFields.add("a"); + openapiFields.add("ps"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -538,6 +608,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `a` to be an array in the JSON string but got `%s`", jsonObj.get("a").toString())); } + if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) + && !jsonObj.get("ps").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ps` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ps").toString())); + } } 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/stream/model/DiffBookDepthStreamsResponseAItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/DiffBookDepthStreamsResponseAItem.java deleted file mode 100644 index 39cd2a4fe..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/DiffBookDepthStreamsResponseAItem.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** DiffBookDepthStreamsResponseAItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DiffBookDepthStreamsResponseAItem extends ArrayList { - public DiffBookDepthStreamsResponseAItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DiffBookDepthStreamsResponseAItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * DiffBookDepthStreamsResponseAItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DiffBookDepthStreamsResponseAItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DiffBookDepthStreamsResponseAItem is" - + " not found in the empty JSON string", - DiffBookDepthStreamsResponseAItem.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DiffBookDepthStreamsResponseAItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DiffBookDepthStreamsResponseAItem` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DiffBookDepthStreamsResponseAItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DiffBookDepthStreamsResponseAItem' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DiffBookDepthStreamsResponseAItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DiffBookDepthStreamsResponseAItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public DiffBookDepthStreamsResponseAItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DiffBookDepthStreamsResponseAItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of DiffBookDepthStreamsResponseAItem - * @throws IOException if the JSON string is invalid with respect to - * DiffBookDepthStreamsResponseAItem - */ - public static DiffBookDepthStreamsResponseAItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DiffBookDepthStreamsResponseAItem.class); - } - - /** - * Convert an instance of DiffBookDepthStreamsResponseAItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/DiffBookDepthStreamsResponseBItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/DiffBookDepthStreamsResponseBItem.java deleted file mode 100644 index 12eea20e1..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/DiffBookDepthStreamsResponseBItem.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** DiffBookDepthStreamsResponseBItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DiffBookDepthStreamsResponseBItem extends ArrayList { - public DiffBookDepthStreamsResponseBItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DiffBookDepthStreamsResponseBItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * DiffBookDepthStreamsResponseBItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DiffBookDepthStreamsResponseBItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DiffBookDepthStreamsResponseBItem is" - + " not found in the empty JSON string", - DiffBookDepthStreamsResponseBItem.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DiffBookDepthStreamsResponseBItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DiffBookDepthStreamsResponseBItem` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DiffBookDepthStreamsResponseBItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DiffBookDepthStreamsResponseBItem' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DiffBookDepthStreamsResponseBItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DiffBookDepthStreamsResponseBItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public DiffBookDepthStreamsResponseBItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DiffBookDepthStreamsResponseBItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of DiffBookDepthStreamsResponseBItem - * @throws IOException if the JSON string is invalid with respect to - * DiffBookDepthStreamsResponseBItem - */ - public static DiffBookDepthStreamsResponseBItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DiffBookDepthStreamsResponseBItem.class); - } - - /** - * Convert an instance of DiffBookDepthStreamsResponseBItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/GridUpdate.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/GridUpdate.java index bad1813d5..ee7167fc3 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/GridUpdate.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/GridUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** GridUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GridUpdate extends BaseDTO { public static final String SERIALIZED_NAME_T = "T"; @@ -66,7 +66,7 @@ public GridUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ @@ -85,7 +85,7 @@ public GridUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/GridUpdateGu.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/GridUpdateGu.java index 587d5e27b..8acb0fc95 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/GridUpdateGu.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/GridUpdateGu.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** GridUpdateGu */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GridUpdateGu extends BaseDTO { public static final String SERIALIZED_NAME_SI = "si"; @@ -107,7 +107,7 @@ public GridUpdateGu si(@jakarta.annotation.Nullable Long si) { } /** - * Get si + * Strategy ID * * @return si */ @@ -126,7 +126,7 @@ public GridUpdateGu st(@jakarta.annotation.Nullable String st) { } /** - * Get st + * Strategy Type * * @return st */ @@ -145,7 +145,7 @@ public GridUpdateGu ss(@jakarta.annotation.Nullable String ss) { } /** - * Get ss + * Strategy Status * * @return ss */ @@ -164,7 +164,7 @@ public GridUpdateGu sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -183,7 +183,7 @@ public GridUpdateGu rLowerCase(@jakarta.annotation.Nullable String rLowerCase) { } /** - * Get rLowerCase + * Realized PNL * * @return rLowerCase */ @@ -202,7 +202,7 @@ public GridUpdateGu up(@jakarta.annotation.Nullable String up) { } /** - * Get up + * Unmatched Average Price * * @return up */ @@ -221,7 +221,7 @@ public GridUpdateGu uq(@jakarta.annotation.Nullable String uq) { } /** - * Get uq + * Unmatched Qty * * @return uq */ @@ -240,7 +240,7 @@ public GridUpdateGu uf(@jakarta.annotation.Nullable String uf) { } /** - * Get uf + * Unmatched Fee * * @return uf */ @@ -259,7 +259,7 @@ public GridUpdateGu mp(@jakarta.annotation.Nullable String mp) { } /** - * Get mp + * Matched PNL * * @return mp */ @@ -278,7 +278,7 @@ public GridUpdateGu ut(@jakarta.annotation.Nullable Long ut) { } /** - * Get ut + * Update Time * * @return ut */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolBookTickerStreamsRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolBookTickerStreamsRequest.java index 2e74aff07..3726277d0 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolBookTickerStreamsRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolBookTickerStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IndividualSymbolBookTickerStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndividualSymbolBookTickerStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,7 +48,7 @@ public class IndividualSymbolBookTickerStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public IndividualSymbolBookTickerStreamsRequest() {} @@ -59,7 +59,7 @@ public IndividualSymbolBookTickerStreamsRequest id(@jakarta.annotation.Nullable } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -73,23 +73,22 @@ public void setId(@jakarta.annotation.Nullable String id) { } public IndividualSymbolBookTickerStreamsRequest symbol( - @jakarta.annotation.Nonnull String symbol) { + @jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -186,7 +185,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -222,17 +220,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : - IndividualSymbolBookTickerStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -242,7 +229,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolBookTickerStreamsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolBookTickerStreamsResponse.java index a4b545e20..268b59745 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolBookTickerStreamsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolBookTickerStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IndividualSymbolBookTickerStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndividualSymbolBookTickerStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -69,6 +69,12 @@ public class IndividualSymbolBookTickerStreamsResponse extends BaseDTO { @jakarta.annotation.Nullable private String sLowerCase; + public static final String SERIALIZED_NAME_PS = "ps"; + + @SerializedName(SERIALIZED_NAME_PS) + @jakarta.annotation.Nullable + private String ps; + public static final String SERIALIZED_NAME_B_LOWER_CASE = "b"; @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) @@ -93,6 +99,12 @@ public class IndividualSymbolBookTickerStreamsResponse extends BaseDTO { @jakarta.annotation.Nullable private String A; + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public IndividualSymbolBookTickerStreamsResponse() {} public IndividualSymbolBookTickerStreamsResponse eLowerCase( @@ -102,7 +114,7 @@ public IndividualSymbolBookTickerStreamsResponse eLowerCase( } /** - * Get eLowerCase + * event type * * @return eLowerCase */ @@ -122,7 +134,7 @@ public IndividualSymbolBookTickerStreamsResponse uLowerCase( } /** - * Get uLowerCase + * order book updateId * * @return uLowerCase */ @@ -141,7 +153,7 @@ public IndividualSymbolBookTickerStreamsResponse E(@jakarta.annotation.Nullable } /** - * Get E + * event time * * @return E */ @@ -160,7 +172,7 @@ public IndividualSymbolBookTickerStreamsResponse T(@jakarta.annotation.Nullable } /** - * Get T + * transaction time * * @return T */ @@ -180,7 +192,7 @@ public IndividualSymbolBookTickerStreamsResponse sLowerCase( } /** - * Get sLowerCase + * symbol * * @return sLowerCase */ @@ -193,6 +205,25 @@ public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { this.sLowerCase = sLowerCase; } + public IndividualSymbolBookTickerStreamsResponse ps(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + return this; + } + + /** + * pair (After CM migration) + * + * @return ps + */ + @jakarta.annotation.Nullable + public String getPs() { + return ps; + } + + public void setPs(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + } + public IndividualSymbolBookTickerStreamsResponse bLowerCase( @jakarta.annotation.Nullable String bLowerCase) { this.bLowerCase = bLowerCase; @@ -200,7 +231,7 @@ public IndividualSymbolBookTickerStreamsResponse bLowerCase( } /** - * Get bLowerCase + * best bid price * * @return bLowerCase */ @@ -219,7 +250,7 @@ public IndividualSymbolBookTickerStreamsResponse B(@jakarta.annotation.Nullable } /** - * Get B + * best bid qty * * @return B */ @@ -239,7 +270,7 @@ public IndividualSymbolBookTickerStreamsResponse aLowerCase( } /** - * Get aLowerCase + * best ask price * * @return aLowerCase */ @@ -258,7 +289,7 @@ public IndividualSymbolBookTickerStreamsResponse A(@jakarta.annotation.Nullable } /** - * Get A + * best ask qty * * @return A */ @@ -271,6 +302,25 @@ public void setA(@jakarta.annotation.Nullable String A) { this.A = A; } + public IndividualSymbolBookTickerStreamsResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -288,17 +338,20 @@ public boolean equals(Object o) { && Objects.equals(this.T, individualSymbolBookTickerStreamsResponse.T) && Objects.equals( this.sLowerCase, individualSymbolBookTickerStreamsResponse.sLowerCase) + && Objects.equals(this.ps, individualSymbolBookTickerStreamsResponse.ps) && Objects.equals( this.bLowerCase, individualSymbolBookTickerStreamsResponse.bLowerCase) && Objects.equals(this.B, individualSymbolBookTickerStreamsResponse.B) && Objects.equals( this.aLowerCase, individualSymbolBookTickerStreamsResponse.aLowerCase) - && Objects.equals(this.A, individualSymbolBookTickerStreamsResponse.A); + && Objects.equals(this.A, individualSymbolBookTickerStreamsResponse.A) + && Objects.equals(this.st, individualSymbolBookTickerStreamsResponse.st); } @Override public int hashCode() { - return Objects.hash(eLowerCase, uLowerCase, E, T, sLowerCase, bLowerCase, B, aLowerCase, A); + return Objects.hash( + eLowerCase, uLowerCase, E, T, sLowerCase, ps, bLowerCase, B, aLowerCase, A, st); } @Override @@ -310,10 +363,12 @@ public String toString() { sb.append(" E: ").append(toIndentedString(E)).append("\n"); sb.append(" T: ").append(toIndentedString(T)).append("\n"); sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); sb.append(" B: ").append(toIndentedString(B)).append("\n"); sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); sb.append(" A: ").append(toIndentedString(A)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -347,6 +402,11 @@ public String toUrlQueryString() { String sLowerCaseValueAsString = sLowerCaseValue.toString(); valMap.put("sLowerCase", sLowerCaseValueAsString); } + String psValue = getPs(); + if (psValue != null) { + String psValueAsString = psValue.toString(); + valMap.put("ps", psValueAsString); + } String bLowerCaseValue = getbLowerCase(); if (bLowerCaseValue != null) { String bLowerCaseValueAsString = bLowerCaseValue.toString(); @@ -367,6 +427,11 @@ public String toUrlQueryString() { String AValueAsString = AValue.toString(); valMap.put("A", AValueAsString); } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -398,6 +463,10 @@ public Map toMap() { if (sLowerCaseValue != null) { valMap.put("sLowerCase", sLowerCaseValue); } + Object psValue = getPs(); + if (psValue != null) { + valMap.put("ps", psValue); + } Object bLowerCaseValue = getbLowerCase(); if (bLowerCaseValue != null) { valMap.put("bLowerCase", bLowerCaseValue); @@ -414,6 +483,10 @@ public Map toMap() { if (AValue != null) { valMap.put("A", AValue); } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -445,10 +518,12 @@ private String toIndentedString(Object o) { openapiFields.add("E"); openapiFields.add("T"); openapiFields.add("s"); + openapiFields.add("ps"); openapiFields.add("b"); openapiFields.add("B"); openapiFields.add("a"); openapiFields.add("A"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -504,6 +579,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("s").toString())); } + if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) + && !jsonObj.get("ps").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ps` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ps").toString())); + } if ((jsonObj.get("b") != null && !jsonObj.get("b").isJsonNull()) && !jsonObj.get("b").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolMiniTickerStreamRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolMiniTickerStreamRequest.java index 102883ecb..75eff419e 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolMiniTickerStreamRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolMiniTickerStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IndividualSymbolMiniTickerStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndividualSymbolMiniTickerStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,7 +48,7 @@ public class IndividualSymbolMiniTickerStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public IndividualSymbolMiniTickerStreamRequest() {} @@ -59,7 +59,7 @@ public IndividualSymbolMiniTickerStreamRequest id(@jakarta.annotation.Nullable S } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -73,23 +73,22 @@ public void setId(@jakarta.annotation.Nullable String id) { } public IndividualSymbolMiniTickerStreamRequest symbol( - @jakarta.annotation.Nonnull String symbol) { + @jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -186,7 +185,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -222,16 +220,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IndividualSymbolMiniTickerStreamRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -241,7 +229,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolMiniTickerStreamResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolMiniTickerStreamResponse.java index 49f62171c..bc354de76 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolMiniTickerStreamResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolMiniTickerStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IndividualSymbolMiniTickerStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndividualSymbolMiniTickerStreamResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -93,6 +93,18 @@ public class IndividualSymbolMiniTickerStreamResponse extends BaseDTO { @jakarta.annotation.Nullable private String qLowerCase; + public static final String SERIALIZED_NAME_PS = "ps"; + + @SerializedName(SERIALIZED_NAME_PS) + @jakarta.annotation.Nullable + private String ps; + + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public IndividualSymbolMiniTickerStreamResponse() {} public IndividualSymbolMiniTickerStreamResponse eLowerCase( @@ -102,7 +114,7 @@ public IndividualSymbolMiniTickerStreamResponse eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -121,7 +133,7 @@ public IndividualSymbolMiniTickerStreamResponse E(@jakarta.annotation.Nullable L } /** - * Get E + * Event time * * @return E */ @@ -141,7 +153,7 @@ public IndividualSymbolMiniTickerStreamResponse sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -161,7 +173,7 @@ public IndividualSymbolMiniTickerStreamResponse cLowerCase( } /** - * Get cLowerCase + * Close price * * @return cLowerCase */ @@ -181,7 +193,7 @@ public IndividualSymbolMiniTickerStreamResponse oLowerCase( } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -201,7 +213,7 @@ public IndividualSymbolMiniTickerStreamResponse hLowerCase( } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -221,7 +233,7 @@ public IndividualSymbolMiniTickerStreamResponse lLowerCase( } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -241,7 +253,7 @@ public IndividualSymbolMiniTickerStreamResponse vLowerCase( } /** - * Get vLowerCase + * Total traded base asset volume * * @return vLowerCase */ @@ -261,7 +273,7 @@ public IndividualSymbolMiniTickerStreamResponse qLowerCase( } /** - * Get qLowerCase + * Total traded quote asset volume * * @return qLowerCase */ @@ -274,6 +286,44 @@ public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { this.qLowerCase = qLowerCase; } + public IndividualSymbolMiniTickerStreamResponse ps(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + return this; + } + + /** + * (After CM migration) Pair symbol + * + * @return ps + */ + @jakarta.annotation.Nullable + public String getPs() { + return ps; + } + + public void setPs(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + } + + public IndividualSymbolMiniTickerStreamResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -299,7 +349,9 @@ public boolean equals(Object o) { && Objects.equals( this.vLowerCase, individualSymbolMiniTickerStreamResponse.vLowerCase) && Objects.equals( - this.qLowerCase, individualSymbolMiniTickerStreamResponse.qLowerCase); + this.qLowerCase, individualSymbolMiniTickerStreamResponse.qLowerCase) + && Objects.equals(this.ps, individualSymbolMiniTickerStreamResponse.ps) + && Objects.equals(this.st, individualSymbolMiniTickerStreamResponse.st); } @Override @@ -313,7 +365,9 @@ public int hashCode() { hLowerCase, lLowerCase, vLowerCase, - qLowerCase); + qLowerCase, + ps, + st); } @Override @@ -329,6 +383,8 @@ public String toString() { sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -382,6 +438,16 @@ public String toUrlQueryString() { String qLowerCaseValueAsString = qLowerCaseValue.toString(); valMap.put("qLowerCase", qLowerCaseValueAsString); } + String psValue = getPs(); + if (psValue != null) { + String psValueAsString = psValue.toString(); + valMap.put("ps", psValueAsString); + } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -429,6 +495,14 @@ public Map toMap() { if (qLowerCaseValue != null) { valMap.put("qLowerCase", qLowerCaseValue); } + Object psValue = getPs(); + if (psValue != null) { + valMap.put("ps", psValue); + } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -464,6 +538,8 @@ private String toIndentedString(Object o) { openapiFields.add("l"); openapiFields.add("v"); openapiFields.add("q"); + openapiFields.add("ps"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -567,6 +643,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("q").toString())); } + if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) + && !jsonObj.get("ps").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ps` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ps").toString())); + } } 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/stream/model/IndividualSymbolTickerStreamsRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolTickerStreamsRequest.java index 17764d6de..6fc3a6f4a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolTickerStreamsRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolTickerStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IndividualSymbolTickerStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndividualSymbolTickerStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,7 +48,7 @@ public class IndividualSymbolTickerStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public IndividualSymbolTickerStreamsRequest() {} @@ -59,7 +59,7 @@ public IndividualSymbolTickerStreamsRequest id(@jakarta.annotation.Nullable Stri } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -72,23 +72,22 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public IndividualSymbolTickerStreamsRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public IndividualSymbolTickerStreamsRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -185,7 +184,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -220,16 +218,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IndividualSymbolTickerStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -239,7 +227,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolTickerStreamsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolTickerStreamsResponse.java index 19498bae5..193192361 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolTickerStreamsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/IndividualSymbolTickerStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IndividualSymbolTickerStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IndividualSymbolTickerStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -147,6 +147,18 @@ public class IndividualSymbolTickerStreamsResponse extends BaseDTO { @jakarta.annotation.Nullable private Long nLowerCase; + public static final String SERIALIZED_NAME_PS = "ps"; + + @SerializedName(SERIALIZED_NAME_PS) + @jakarta.annotation.Nullable + private String ps; + + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public IndividualSymbolTickerStreamsResponse() {} public IndividualSymbolTickerStreamsResponse eLowerCase( @@ -156,7 +168,7 @@ public IndividualSymbolTickerStreamsResponse eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -175,7 +187,7 @@ public IndividualSymbolTickerStreamsResponse E(@jakarta.annotation.Nullable Long } /** - * Get E + * Event time * * @return E */ @@ -195,7 +207,7 @@ public IndividualSymbolTickerStreamsResponse sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -215,7 +227,7 @@ public IndividualSymbolTickerStreamsResponse pLowerCase( } /** - * Get pLowerCase + * Price change * * @return pLowerCase */ @@ -234,7 +246,7 @@ public IndividualSymbolTickerStreamsResponse P(@jakarta.annotation.Nullable Stri } /** - * Get P + * Price change percent * * @return P */ @@ -254,7 +266,7 @@ public IndividualSymbolTickerStreamsResponse wLowerCase( } /** - * Get wLowerCase + * Weighted average price * * @return wLowerCase */ @@ -274,7 +286,7 @@ public IndividualSymbolTickerStreamsResponse cLowerCase( } /** - * Get cLowerCase + * Last price * * @return cLowerCase */ @@ -293,7 +305,7 @@ public IndividualSymbolTickerStreamsResponse Q(@jakarta.annotation.Nullable Stri } /** - * Get Q + * Last quantity * * @return Q */ @@ -313,7 +325,7 @@ public IndividualSymbolTickerStreamsResponse oLowerCase( } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -333,7 +345,7 @@ public IndividualSymbolTickerStreamsResponse hLowerCase( } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -353,7 +365,7 @@ public IndividualSymbolTickerStreamsResponse lLowerCase( } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -373,7 +385,7 @@ public IndividualSymbolTickerStreamsResponse vLowerCase( } /** - * Get vLowerCase + * Total traded base asset volume * * @return vLowerCase */ @@ -393,7 +405,7 @@ public IndividualSymbolTickerStreamsResponse qLowerCase( } /** - * Get qLowerCase + * Total traded quote asset volume * * @return qLowerCase */ @@ -412,7 +424,7 @@ public IndividualSymbolTickerStreamsResponse O(@jakarta.annotation.Nullable Long } /** - * Get O + * Statistics open time * * @return O */ @@ -431,7 +443,7 @@ public IndividualSymbolTickerStreamsResponse C(@jakarta.annotation.Nullable Long } /** - * Get C + * Statistics close time * * @return C */ @@ -450,7 +462,7 @@ public IndividualSymbolTickerStreamsResponse F(@jakarta.annotation.Nullable Long } /** - * Get F + * First trade ID * * @return F */ @@ -469,7 +481,7 @@ public IndividualSymbolTickerStreamsResponse L(@jakarta.annotation.Nullable Long } /** - * Get L + * Last trade Id * * @return L */ @@ -489,7 +501,7 @@ public IndividualSymbolTickerStreamsResponse nLowerCase( } /** - * Get nLowerCase + * Total number of trades * * @return nLowerCase */ @@ -502,6 +514,44 @@ public void setnLowerCase(@jakarta.annotation.Nullable Long nLowerCase) { this.nLowerCase = nLowerCase; } + public IndividualSymbolTickerStreamsResponse ps(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + return this; + } + + /** + * (After CM migration) Pair symbol + * + * @return ps + */ + @jakarta.annotation.Nullable + public String getPs() { + return ps; + } + + public void setPs(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + } + + public IndividualSymbolTickerStreamsResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -529,8 +579,9 @@ public boolean equals(Object o) { && Objects.equals(this.C, individualSymbolTickerStreamsResponse.C) && Objects.equals(this.F, individualSymbolTickerStreamsResponse.F) && Objects.equals(this.L, individualSymbolTickerStreamsResponse.L) - && Objects.equals( - this.nLowerCase, individualSymbolTickerStreamsResponse.nLowerCase); + && Objects.equals(this.nLowerCase, individualSymbolTickerStreamsResponse.nLowerCase) + && Objects.equals(this.ps, individualSymbolTickerStreamsResponse.ps) + && Objects.equals(this.st, individualSymbolTickerStreamsResponse.st); } @Override @@ -553,7 +604,9 @@ public int hashCode() { C, F, L, - nLowerCase); + nLowerCase, + ps, + st); } @Override @@ -578,6 +631,8 @@ public String toString() { sb.append(" F: ").append(toIndentedString(F)).append("\n"); sb.append(" L: ").append(toIndentedString(L)).append("\n"); sb.append(" nLowerCase: ").append(toIndentedString(nLowerCase)).append("\n"); + sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -676,6 +731,16 @@ public String toUrlQueryString() { String nLowerCaseValueAsString = nLowerCaseValue.toString(); valMap.put("nLowerCase", nLowerCaseValueAsString); } + String psValue = getPs(); + if (psValue != null) { + String psValueAsString = psValue.toString(); + valMap.put("ps", psValueAsString); + } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -759,6 +824,14 @@ public Map toMap() { if (nLowerCaseValue != null) { valMap.put("nLowerCase", nLowerCaseValue); } + Object psValue = getPs(); + if (psValue != null) { + valMap.put("ps", psValue); + } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -803,6 +876,8 @@ private String toIndentedString(Object o) { openapiFields.add("F"); openapiFields.add("L"); openapiFields.add("n"); + openapiFields.add("ps"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -937,6 +1012,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("q").toString())); } + if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) + && !jsonObj.get("ps").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ps` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ps").toString())); + } } 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/stream/model/Interval.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/Interval.java new file mode 100644 index 000000000..d633ecb87 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/Interval.java @@ -0,0 +1,99 @@ +/* + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets interval */ +@JsonAdapter(Interval.Adapter.class) +public enum Interval { + INTERVAL_1m("1m"), + + INTERVAL_3m("3m"), + + INTERVAL_5m("5m"), + + INTERVAL_15m("15m"), + + INTERVAL_30m("30m"), + + INTERVAL_1h("1h"), + + INTERVAL_2h("2h"), + + INTERVAL_4h("4h"), + + INTERVAL_6h("6h"), + + INTERVAL_8h("8h"), + + INTERVAL_12h("12h"), + + INTERVAL_1d("1d"), + + INTERVAL_3d("3d"), + + INTERVAL_1w("1w"), + + INTERVAL_1M("1M"); + + private String value; + + Interval(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Interval fromValue(String value) { + for (Interval b : Interval.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Interval enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Interval read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Interval.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Interval.fromValue(value); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/KlineCandlestickStreamsRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/KlineCandlestickStreamsRequest.java index 608d41709..217d3a0af 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/KlineCandlestickStreamsRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/KlineCandlestickStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** KlineCandlestickStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlineCandlestickStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,14 +49,14 @@ public class KlineCandlestickStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_INTERVAL = "interval"; @SerializedName(SERIALIZED_NAME_INTERVAL) - @jakarta.annotation.Nonnull - private String interval; + @jakarta.annotation.Nullable + private Interval interval; public KlineCandlestickStreamsRequest() {} @@ -65,7 +66,7 @@ public KlineCandlestickStreamsRequest id(@jakarta.annotation.Nullable String id) } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -78,27 +79,26 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public KlineCandlestickStreamsRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public KlineCandlestickStreamsRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } - public KlineCandlestickStreamsRequest interval(@jakarta.annotation.Nonnull String interval) { + public KlineCandlestickStreamsRequest interval(@jakarta.annotation.Nullable Interval interval) { this.interval = interval; return this; } @@ -108,13 +108,13 @@ public KlineCandlestickStreamsRequest interval(@jakarta.annotation.Nonnull Strin * * @return interval */ - @jakarta.annotation.Nonnull - @NotNull - public String getInterval() { + @jakarta.annotation.Nullable + @Valid + public Interval getInterval() { return interval; } - public void setInterval(@jakarta.annotation.Nonnull String interval) { + public void setInterval(@jakarta.annotation.Nullable Interval interval) { this.interval = interval; } @@ -163,7 +163,7 @@ public String toUrlQueryString() { String symbolValueAsString = symbolValue.toString(); valMap.put("symbol", symbolValueAsString); } - String intervalValue = getInterval(); + Interval intervalValue = getInterval(); if (intervalValue != null) { String intervalValueAsString = intervalValue.toString(); valMap.put("interval", intervalValueAsString); @@ -223,8 +223,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); - openapiRequiredFields.add("interval"); } /** @@ -257,16 +255,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : KlineCandlestickStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -276,19 +264,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - if (!jsonObj.get("interval").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `interval` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("interval").toString())); + // validate the optional field `interval` + if (jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) { + Interval.validateJsonElement(jsonObj.get("interval")); } } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/KlineCandlestickStreamsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/KlineCandlestickStreamsResponse.java index 7c9ac150f..49f8b0794 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/KlineCandlestickStreamsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/KlineCandlestickStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** KlineCandlestickStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlineCandlestickStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -73,7 +73,7 @@ public KlineCandlestickStreamsResponse eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -92,7 +92,7 @@ public KlineCandlestickStreamsResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -112,7 +112,7 @@ public KlineCandlestickStreamsResponse sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/KlineCandlestickStreamsResponseK.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/KlineCandlestickStreamsResponseK.java index 069ad1804..d8a162e5b 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/KlineCandlestickStreamsResponseK.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/KlineCandlestickStreamsResponseK.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** KlineCandlestickStreamsResponseK */ +/** Kline payload. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlineCandlestickStreamsResponseK extends BaseDTO { public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; @@ -150,7 +150,7 @@ public KlineCandlestickStreamsResponseK tLowerCase( } /** - * Get tLowerCase + * Kline start time * * @return tLowerCase */ @@ -169,7 +169,7 @@ public KlineCandlestickStreamsResponseK T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Kline close time * * @return T */ @@ -189,7 +189,7 @@ public KlineCandlestickStreamsResponseK sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -209,7 +209,7 @@ public KlineCandlestickStreamsResponseK iLowerCase( } /** - * Get iLowerCase + * Interval * * @return iLowerCase */ @@ -229,7 +229,7 @@ public KlineCandlestickStreamsResponseK fLowerCase( } /** - * Get fLowerCase + * First trade ID * * @return fLowerCase */ @@ -248,7 +248,7 @@ public KlineCandlestickStreamsResponseK L(@jakarta.annotation.Nullable Long L) { } /** - * Get L + * Last trade ID * * @return L */ @@ -268,7 +268,7 @@ public KlineCandlestickStreamsResponseK oLowerCase( } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -288,7 +288,7 @@ public KlineCandlestickStreamsResponseK cLowerCase( } /** - * Get cLowerCase + * Close price * * @return cLowerCase */ @@ -308,7 +308,7 @@ public KlineCandlestickStreamsResponseK hLowerCase( } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -328,7 +328,7 @@ public KlineCandlestickStreamsResponseK lLowerCase( } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -348,7 +348,7 @@ public KlineCandlestickStreamsResponseK vLowerCase( } /** - * Get vLowerCase + * Base asset volume * * @return vLowerCase */ @@ -368,7 +368,7 @@ public KlineCandlestickStreamsResponseK nLowerCase( } /** - * Get nLowerCase + * Number of trades * * @return nLowerCase */ @@ -388,7 +388,7 @@ public KlineCandlestickStreamsResponseK xLowerCase( } /** - * Get xLowerCase + * Is this kline closed? * * @return xLowerCase */ @@ -408,7 +408,7 @@ public KlineCandlestickStreamsResponseK qLowerCase( } /** - * Get qLowerCase + * Quote asset volume * * @return qLowerCase */ @@ -427,7 +427,7 @@ public KlineCandlestickStreamsResponseK V(@jakarta.annotation.Nullable String V) } /** - * Get V + * Taker buy base asset volume * * @return V */ @@ -446,7 +446,7 @@ public KlineCandlestickStreamsResponseK Q(@jakarta.annotation.Nullable String Q) } /** - * Get Q + * Taker buy quote asset volume * * @return Q */ @@ -465,7 +465,7 @@ public KlineCandlestickStreamsResponseK B(@jakarta.annotation.Nullable String B) } /** - * Get B + * Ignore * * @return B */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/Levels.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/Levels.java new file mode 100644 index 000000000..e77111810 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/Levels.java @@ -0,0 +1,75 @@ +/* + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets levels */ +@JsonAdapter(Levels.Adapter.class) +public enum Levels { + LEVELS_5("5"), + + LEVELS_10("10"), + + LEVELS_20("20"); + + private String value; + + Levels(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Levels fromValue(String value) { + for (Levels b : Levels.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Levels enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Levels read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Levels.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Levels.fromValue(value); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/LiquidationOrderStreamsRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/LiquidationOrderStreamsRequest.java index 91edd698e..993dff8b2 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/LiquidationOrderStreamsRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/LiquidationOrderStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** LiquidationOrderStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class LiquidationOrderStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,7 +48,7 @@ public class LiquidationOrderStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public LiquidationOrderStreamsRequest() {} @@ -59,7 +59,7 @@ public LiquidationOrderStreamsRequest id(@jakarta.annotation.Nullable String id) } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -72,23 +72,22 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public LiquidationOrderStreamsRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public LiquidationOrderStreamsRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -185,7 +184,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -218,16 +216,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LiquidationOrderStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -237,7 +225,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/LiquidationOrderStreamsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/LiquidationOrderStreamsResponse.java index b87017842..d5b8179bf 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/LiquidationOrderStreamsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/LiquidationOrderStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** LiquidationOrderStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class LiquidationOrderStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -67,7 +67,7 @@ public LiquidationOrderStreamsResponse eLowerCase( } /** - * Get eLowerCase + * Event Type * * @return eLowerCase */ @@ -86,7 +86,7 @@ public LiquidationOrderStreamsResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ListenKeyExpired.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ListenKeyExpired.java new file mode 100644 index 000000000..b4b83914c --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ListenKeyExpired.java @@ -0,0 +1,277 @@ +/* + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ListenKeyExpired */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ListenKeyExpired extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; + + @SerializedName(SERIALIZED_NAME_LISTEN_KEY) + @jakarta.annotation.Nullable + private String listenKey; + + public ListenKeyExpired() {} + + public ListenKeyExpired E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public ListenKeyExpired listenKey(@jakarta.annotation.Nullable String listenKey) { + this.listenKey = listenKey; + return this; + } + + /** + * Get listenKey + * + * @return listenKey + */ + @jakarta.annotation.Nullable + public String getListenKey() { + return listenKey; + } + + public void setListenKey(@jakarta.annotation.Nullable String listenKey) { + this.listenKey = listenKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListenKeyExpired listenKeyExpired = (ListenKeyExpired) o; + return Objects.equals(this.E, listenKeyExpired.E) + && Objects.equals(this.listenKey, listenKeyExpired.listenKey); + } + + @Override + public int hashCode() { + return Objects.hash(E, listenKey); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListenKeyExpired {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" listenKey: ").append(toIndentedString(listenKey)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String listenKeyValue = getListenKey(); + if (listenKeyValue != null) { + String listenKeyValueAsString = listenKeyValue.toString(); + valMap.put("listenKey", listenKeyValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object listenKeyValue = getListenKey(); + if (listenKeyValue != null) { + valMap.put("listenKey", listenKeyValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("listenKey"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ListenKeyExpired + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ListenKeyExpired.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ListenKeyExpired is not found in the" + + " empty JSON string", + ListenKeyExpired.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ListenKeyExpired.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ListenKeyExpired` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("listenKey") != null && !jsonObj.get("listenKey").isJsonNull()) + && !jsonObj.get("listenKey").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `listenKey` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("listenKey").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ListenKeyExpired.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ListenKeyExpired' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ListenKeyExpired.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ListenKeyExpired value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ListenKeyExpired read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ListenKeyExpired given an JSON string + * + * @param jsonString JSON string + * @return An instance of ListenKeyExpired + * @throws IOException if the JSON string is invalid with respect to ListenKeyExpired + */ + public static ListenKeyExpired fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ListenKeyExpired.class); + } + + /** + * Convert an instance of ListenKeyExpired to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/Listenkeyexpired.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/Listenkeyexpired.java deleted file mode 100644 index 068704dd7..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/Listenkeyexpired.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** Listenkeyexpired */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Listenkeyexpired extends BaseDTO { - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private String E; - - public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; - - @SerializedName(SERIALIZED_NAME_LISTEN_KEY) - @jakarta.annotation.Nullable - private String listenKey; - - public Listenkeyexpired() {} - - public Listenkeyexpired E(@jakarta.annotation.Nullable String E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public String getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable String E) { - this.E = E; - } - - public Listenkeyexpired listenKey(@jakarta.annotation.Nullable String listenKey) { - this.listenKey = listenKey; - return this; - } - - /** - * Get listenKey - * - * @return listenKey - */ - @jakarta.annotation.Nullable - public String getListenKey() { - return listenKey; - } - - public void setListenKey(@jakarta.annotation.Nullable String listenKey) { - this.listenKey = listenKey; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Listenkeyexpired listenkeyexpired = (Listenkeyexpired) o; - return Objects.equals(this.E, listenkeyexpired.E) - && Objects.equals(this.listenKey, listenkeyexpired.listenKey); - } - - @Override - public int hashCode() { - return Objects.hash(E, listenKey); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Listenkeyexpired {\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" listenKey: ").append(toIndentedString(listenKey)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - String listenKeyValue = getListenKey(); - if (listenKeyValue != null) { - String listenKeyValueAsString = listenKeyValue.toString(); - valMap.put("listenKey", listenKeyValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object listenKeyValue = getListenKey(); - if (listenKeyValue != null) { - valMap.put("listenKey", listenKeyValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("E"); - openapiFields.add("listenKey"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Listenkeyexpired - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Listenkeyexpired.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Listenkeyexpired is not found in the" - + " empty JSON string", - Listenkeyexpired.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Listenkeyexpired.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Listenkeyexpired` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("E") != null && !jsonObj.get("E").isJsonNull()) - && !jsonObj.get("E").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `E` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("E").toString())); - } - if ((jsonObj.get("listenKey") != null && !jsonObj.get("listenKey").isJsonNull()) - && !jsonObj.get("listenKey").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `listenKey` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("listenKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Listenkeyexpired.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Listenkeyexpired' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Listenkeyexpired.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Listenkeyexpired value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Listenkeyexpired read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Listenkeyexpired given an JSON string - * - * @param jsonString JSON string - * @return An instance of Listenkeyexpired - * @throws IOException if the JSON string is invalid with respect to Listenkeyexpired - */ - public static Listenkeyexpired fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Listenkeyexpired.class); - } - - /** - * Convert an instance of Listenkeyexpired to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarginCall.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarginCall.java index b06a387e6..a64711ad5 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarginCall.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarginCall.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** MarginCall */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginCall extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -69,7 +69,7 @@ public MarginCall E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -88,7 +88,7 @@ public MarginCall cw(@jakarta.annotation.Nullable String cw) { } /** - * Get cw + * Cross Wallet Balance. Only pushed with crossed position margin call * * @return cw */ @@ -116,7 +116,7 @@ public MarginCall addPLowerCaseItem(MarginCallPInner pLowerCaseItem) { } /** - * Get pLowerCase + * Position(s) of Margin Call * * @return pLowerCase */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarginCallPInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarginCallPInner.java index 9351477bc..3a8b64f71 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarginCallPInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarginCallPInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MarginCallPInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginCallPInner extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -95,7 +95,7 @@ public MarginCallPInner sLowerCase(@jakarta.annotation.Nullable String sLowerCas } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -114,7 +114,7 @@ public MarginCallPInner ps(@jakarta.annotation.Nullable String ps) { } /** - * Get ps + * Position Side * * @return ps */ @@ -133,7 +133,7 @@ public MarginCallPInner pa(@jakarta.annotation.Nullable String pa) { } /** - * Get pa + * Position Amount * * @return pa */ @@ -152,7 +152,7 @@ public MarginCallPInner mt(@jakarta.annotation.Nullable String mt) { } /** - * Get mt + * Margin Type * * @return mt */ @@ -171,7 +171,7 @@ public MarginCallPInner iw(@jakarta.annotation.Nullable String iw) { } /** - * Get iw + * Isolated Wallet (if isolated position) * * @return iw */ @@ -190,7 +190,7 @@ public MarginCallPInner mp(@jakarta.annotation.Nullable String mp) { } /** - * Get mp + * Mark Price * * @return mp */ @@ -209,7 +209,7 @@ public MarginCallPInner up(@jakarta.annotation.Nullable String up) { } /** - * Get up + * Unrealized PnL * * @return up */ @@ -228,7 +228,7 @@ public MarginCallPInner mm(@jakarta.annotation.Nullable String mm) { } /** - * Get mm + * Maintenance Margin Required * * @return mm */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamForAllMarketRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamForAllMarketRequest.java index 37ff834ba..4f19b1e74 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamForAllMarketRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamForAllMarketRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** MarkPriceStreamForAllMarketRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceStreamForAllMarketRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -49,7 +50,7 @@ public class MarkPriceStreamForAllMarketRequest extends BaseDTO { @SerializedName(SERIALIZED_NAME_UPDATE_SPEED) @jakarta.annotation.Nullable - private String updateSpeed; + private UpdateSpeed updateSpeed; public MarkPriceStreamForAllMarketRequest() {} @@ -59,7 +60,7 @@ public MarkPriceStreamForAllMarketRequest id(@jakarta.annotation.Nullable String } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -73,7 +74,7 @@ public void setId(@jakarta.annotation.Nullable String id) { } public MarkPriceStreamForAllMarketRequest updateSpeed( - @jakarta.annotation.Nullable String updateSpeed) { + @jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; return this; } @@ -84,11 +85,12 @@ public MarkPriceStreamForAllMarketRequest updateSpeed( * @return updateSpeed */ @jakarta.annotation.Nullable - public String getUpdateSpeed() { + @Valid + public UpdateSpeed getUpdateSpeed() { return updateSpeed; } - public void setUpdateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public void setUpdateSpeed(@jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; } @@ -130,7 +132,7 @@ public String toUrlQueryString() { String idValueAsString = idValue.toString(); valMap.put("id", idValueAsString); } - String updateSpeedValue = getUpdateSpeed(); + UpdateSpeed updateSpeedValue = getUpdateSpeed(); if (updateSpeedValue != null) { String updateSpeedValueAsString = updateSpeedValue.toString(); valMap.put("updateSpeed", updateSpeedValueAsString); @@ -227,13 +229,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if ((jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) - && !jsonObj.get("updateSpeed").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `updateSpeed` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("updateSpeed").toString())); + // validate the optional field `updateSpeed` + if (jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) { + UpdateSpeed.validateJsonElement(jsonObj.get("updateSpeed")); } } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamForAllMarketResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamForAllMarketResponse.java index 7be2f3473..91f6ab869 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamForAllMarketResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamForAllMarketResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** MarkPriceStreamForAllMarketResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceStreamForAllMarketResponse extends ArrayList { public MarkPriceStreamForAllMarketResponse() {} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamForAllMarketResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamForAllMarketResponseInner.java index 5c5ff09ec..e99de01cf 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamForAllMarketResponseInner.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamForAllMarketResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MarkPriceStreamForAllMarketResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceStreamForAllMarketResponseInner extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -63,12 +63,6 @@ public class MarkPriceStreamForAllMarketResponseInner extends BaseDTO { @jakarta.annotation.Nullable private String pLowerCase; - public static final String SERIALIZED_NAME_AP = "ap"; - - @SerializedName(SERIALIZED_NAME_AP) - @jakarta.annotation.Nullable - private String ap; - public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) @@ -87,12 +81,24 @@ public class MarkPriceStreamForAllMarketResponseInner extends BaseDTO { @jakarta.annotation.Nullable private String rLowerCase; + public static final String SERIALIZED_NAME_AP = "ap"; + + @SerializedName(SERIALIZED_NAME_AP) + @jakarta.annotation.Nullable + private String ap; + public static final String SERIALIZED_NAME_T = "T"; @SerializedName(SERIALIZED_NAME_T) @jakarta.annotation.Nullable private Long T; + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public MarkPriceStreamForAllMarketResponseInner() {} public MarkPriceStreamForAllMarketResponseInner eLowerCase( @@ -102,7 +108,7 @@ public MarkPriceStreamForAllMarketResponseInner eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -121,7 +127,7 @@ public MarkPriceStreamForAllMarketResponseInner E(@jakarta.annotation.Nullable L } /** - * Get E + * Event time * * @return E */ @@ -141,7 +147,7 @@ public MarkPriceStreamForAllMarketResponseInner sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -161,7 +167,7 @@ public MarkPriceStreamForAllMarketResponseInner pLowerCase( } /** - * Get pLowerCase + * Mark price * * @return pLowerCase */ @@ -174,25 +180,6 @@ public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { this.pLowerCase = pLowerCase; } - public MarkPriceStreamForAllMarketResponseInner ap(@jakarta.annotation.Nullable String ap) { - this.ap = ap; - return this; - } - - /** - * Get ap - * - * @return ap - */ - @jakarta.annotation.Nullable - public String getAp() { - return ap; - } - - public void setAp(@jakarta.annotation.Nullable String ap) { - this.ap = ap; - } - public MarkPriceStreamForAllMarketResponseInner iLowerCase( @jakarta.annotation.Nullable String iLowerCase) { this.iLowerCase = iLowerCase; @@ -200,7 +187,7 @@ public MarkPriceStreamForAllMarketResponseInner iLowerCase( } /** - * Get iLowerCase + * Index price * * @return iLowerCase */ @@ -219,7 +206,7 @@ public MarkPriceStreamForAllMarketResponseInner P(@jakarta.annotation.Nullable S } /** - * Get P + * Estimated Settle Price, only useful in the last hour before the settlement starts * * @return P */ @@ -239,7 +226,7 @@ public MarkPriceStreamForAllMarketResponseInner rLowerCase( } /** - * Get rLowerCase + * Funding rate * * @return rLowerCase */ @@ -252,13 +239,32 @@ public void setrLowerCase(@jakarta.annotation.Nullable String rLowerCase) { this.rLowerCase = rLowerCase; } + public MarkPriceStreamForAllMarketResponseInner ap(@jakarta.annotation.Nullable String ap) { + this.ap = ap; + return this; + } + + /** + * Mark price moving average + * + * @return ap + */ + @jakarta.annotation.Nullable + public String getAp() { + return ap; + } + + public void setAp(@jakarta.annotation.Nullable String ap) { + this.ap = ap; + } + public MarkPriceStreamForAllMarketResponseInner T(@jakarta.annotation.Nullable Long T) { this.T = T; return this; } /** - * Get T + * Next funding time * * @return T */ @@ -271,6 +277,25 @@ public void setT(@jakarta.annotation.Nullable Long T) { this.T = T; } + public MarkPriceStreamForAllMarketResponseInner st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -287,19 +312,20 @@ public boolean equals(Object o) { this.sLowerCase, markPriceStreamForAllMarketResponseInner.sLowerCase) && Objects.equals( this.pLowerCase, markPriceStreamForAllMarketResponseInner.pLowerCase) - && Objects.equals(this.ap, markPriceStreamForAllMarketResponseInner.ap) && Objects.equals( this.iLowerCase, markPriceStreamForAllMarketResponseInner.iLowerCase) && Objects.equals(this.P, markPriceStreamForAllMarketResponseInner.P) && Objects.equals( this.rLowerCase, markPriceStreamForAllMarketResponseInner.rLowerCase) - && Objects.equals(this.T, markPriceStreamForAllMarketResponseInner.T); + && Objects.equals(this.ap, markPriceStreamForAllMarketResponseInner.ap) + && Objects.equals(this.T, markPriceStreamForAllMarketResponseInner.T) + && Objects.equals(this.st, markPriceStreamForAllMarketResponseInner.st); } @Override public int hashCode() { return Objects.hash( - eLowerCase, E, sLowerCase, pLowerCase, ap, iLowerCase, P, rLowerCase, T); + eLowerCase, E, sLowerCase, pLowerCase, iLowerCase, P, rLowerCase, ap, T, st); } @Override @@ -310,11 +336,12 @@ public String toString() { sb.append(" E: ").append(toIndentedString(E)).append("\n"); sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); - sb.append(" ap: ").append(toIndentedString(ap)).append("\n"); sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); sb.append(" P: ").append(toIndentedString(P)).append("\n"); sb.append(" rLowerCase: ").append(toIndentedString(rLowerCase)).append("\n"); + sb.append(" ap: ").append(toIndentedString(ap)).append("\n"); sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -343,11 +370,6 @@ public String toUrlQueryString() { String pLowerCaseValueAsString = pLowerCaseValue.toString(); valMap.put("pLowerCase", pLowerCaseValueAsString); } - String apValue = getAp(); - if (apValue != null) { - String apValueAsString = apValue.toString(); - valMap.put("ap", apValueAsString); - } String iLowerCaseValue = getiLowerCase(); if (iLowerCaseValue != null) { String iLowerCaseValueAsString = iLowerCaseValue.toString(); @@ -363,11 +385,21 @@ public String toUrlQueryString() { String rLowerCaseValueAsString = rLowerCaseValue.toString(); valMap.put("rLowerCase", rLowerCaseValueAsString); } + String apValue = getAp(); + if (apValue != null) { + String apValueAsString = apValue.toString(); + valMap.put("ap", apValueAsString); + } Long TValue = getT(); if (TValue != null) { String TValueAsString = TValue.toString(); valMap.put("T", TValueAsString); } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -395,10 +427,6 @@ public Map toMap() { if (pLowerCaseValue != null) { valMap.put("pLowerCase", pLowerCaseValue); } - Object apValue = getAp(); - if (apValue != null) { - valMap.put("ap", apValue); - } Object iLowerCaseValue = getiLowerCase(); if (iLowerCaseValue != null) { valMap.put("iLowerCase", iLowerCaseValue); @@ -411,10 +439,18 @@ public Map toMap() { if (rLowerCaseValue != null) { valMap.put("rLowerCase", rLowerCaseValue); } + Object apValue = getAp(); + if (apValue != null) { + valMap.put("ap", apValue); + } Object TValue = getT(); if (TValue != null) { valMap.put("T", TValue); } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -445,11 +481,12 @@ private String toIndentedString(Object o) { openapiFields.add("E"); openapiFields.add("s"); openapiFields.add("p"); - openapiFields.add("ap"); openapiFields.add("i"); openapiFields.add("P"); openapiFields.add("r"); + openapiFields.add("ap"); openapiFields.add("T"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -513,14 +550,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("p").toString())); } - if ((jsonObj.get("ap") != null && !jsonObj.get("ap").isJsonNull()) - && !jsonObj.get("ap").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ap` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("ap").toString())); - } if ((jsonObj.get("i") != null && !jsonObj.get("i").isJsonNull()) && !jsonObj.get("i").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -545,6 +574,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("r").toString())); } + if ((jsonObj.get("ap") != null && !jsonObj.get("ap").isJsonNull()) + && !jsonObj.get("ap").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ap` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ap").toString())); + } } 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/stream/model/MarkPriceStreamRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamRequest.java index 36d1a58bf..bb3fad5c8 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** MarkPriceStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,14 +49,14 @@ public class MarkPriceStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_UPDATE_SPEED = "updateSpeed"; @SerializedName(SERIALIZED_NAME_UPDATE_SPEED) @jakarta.annotation.Nullable - private String updateSpeed; + private UpdateSpeed updateSpeed; public MarkPriceStreamRequest() {} @@ -65,7 +66,7 @@ public MarkPriceStreamRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -78,27 +79,27 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public MarkPriceStreamRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public MarkPriceStreamRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } - public MarkPriceStreamRequest updateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public MarkPriceStreamRequest updateSpeed( + @jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; return this; } @@ -109,11 +110,12 @@ public MarkPriceStreamRequest updateSpeed(@jakarta.annotation.Nullable String up * @return updateSpeed */ @jakarta.annotation.Nullable - public String getUpdateSpeed() { + @Valid + public UpdateSpeed getUpdateSpeed() { return updateSpeed; } - public void setUpdateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public void setUpdateSpeed(@jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; } @@ -161,7 +163,7 @@ public String toUrlQueryString() { String symbolValueAsString = symbolValue.toString(); valMap.put("symbol", symbolValueAsString); } - String updateSpeedValue = getUpdateSpeed(); + UpdateSpeed updateSpeedValue = getUpdateSpeed(); if (updateSpeedValue != null) { String updateSpeedValueAsString = updateSpeedValue.toString(); valMap.put("updateSpeed", updateSpeedValueAsString); @@ -221,7 +223,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -253,16 +254,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MarkPriceStreamRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -272,20 +263,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - if ((jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) - && !jsonObj.get("updateSpeed").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `updateSpeed` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("updateSpeed").toString())); + // validate the optional field `updateSpeed` + if (jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) { + UpdateSpeed.validateJsonElement(jsonObj.get("updateSpeed")); } } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamResponse.java index ec3e7cd8b..b7a58f8fe 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarkPriceStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MarkPriceStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarkPriceStreamResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -63,12 +63,6 @@ public class MarkPriceStreamResponse extends BaseDTO { @jakarta.annotation.Nullable private String pLowerCase; - public static final String SERIALIZED_NAME_AP = "ap"; - - @SerializedName(SERIALIZED_NAME_AP) - @jakarta.annotation.Nullable - private String ap; - public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) @@ -87,12 +81,24 @@ public class MarkPriceStreamResponse extends BaseDTO { @jakarta.annotation.Nullable private String rLowerCase; + public static final String SERIALIZED_NAME_AP = "ap"; + + @SerializedName(SERIALIZED_NAME_AP) + @jakarta.annotation.Nullable + private String ap; + public static final String SERIALIZED_NAME_T = "T"; @SerializedName(SERIALIZED_NAME_T) @jakarta.annotation.Nullable private Long T; + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; + public MarkPriceStreamResponse() {} public MarkPriceStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { @@ -101,7 +107,7 @@ public MarkPriceStreamResponse eLowerCase(@jakarta.annotation.Nullable String eL } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -120,7 +126,7 @@ public MarkPriceStreamResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -139,7 +145,7 @@ public MarkPriceStreamResponse sLowerCase(@jakarta.annotation.Nullable String sL } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -158,7 +164,7 @@ public MarkPriceStreamResponse pLowerCase(@jakarta.annotation.Nullable String pL } /** - * Get pLowerCase + * Mark price * * @return pLowerCase */ @@ -171,32 +177,13 @@ public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { this.pLowerCase = pLowerCase; } - public MarkPriceStreamResponse ap(@jakarta.annotation.Nullable String ap) { - this.ap = ap; - return this; - } - - /** - * Get ap - * - * @return ap - */ - @jakarta.annotation.Nullable - public String getAp() { - return ap; - } - - public void setAp(@jakarta.annotation.Nullable String ap) { - this.ap = ap; - } - public MarkPriceStreamResponse iLowerCase(@jakarta.annotation.Nullable String iLowerCase) { this.iLowerCase = iLowerCase; return this; } /** - * Get iLowerCase + * Index price * * @return iLowerCase */ @@ -215,7 +202,7 @@ public MarkPriceStreamResponse P(@jakarta.annotation.Nullable String P) { } /** - * Get P + * Estimated Settle Price, only useful in the last hour before the settlement starts * * @return P */ @@ -234,7 +221,7 @@ public MarkPriceStreamResponse rLowerCase(@jakarta.annotation.Nullable String rL } /** - * Get rLowerCase + * Funding rate * * @return rLowerCase */ @@ -247,13 +234,32 @@ public void setrLowerCase(@jakarta.annotation.Nullable String rLowerCase) { this.rLowerCase = rLowerCase; } + public MarkPriceStreamResponse ap(@jakarta.annotation.Nullable String ap) { + this.ap = ap; + return this; + } + + /** + * Mark price moving average + * + * @return ap + */ + @jakarta.annotation.Nullable + public String getAp() { + return ap; + } + + public void setAp(@jakarta.annotation.Nullable String ap) { + this.ap = ap; + } + public MarkPriceStreamResponse T(@jakarta.annotation.Nullable Long T) { this.T = T; return this; } /** - * Get T + * Next funding time * * @return T */ @@ -266,6 +272,25 @@ public void setT(@jakarta.annotation.Nullable Long T) { this.T = T; } + public MarkPriceStreamResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -279,17 +304,18 @@ public boolean equals(Object o) { && Objects.equals(this.E, markPriceStreamResponse.E) && Objects.equals(this.sLowerCase, markPriceStreamResponse.sLowerCase) && Objects.equals(this.pLowerCase, markPriceStreamResponse.pLowerCase) - && Objects.equals(this.ap, markPriceStreamResponse.ap) && Objects.equals(this.iLowerCase, markPriceStreamResponse.iLowerCase) && Objects.equals(this.P, markPriceStreamResponse.P) && Objects.equals(this.rLowerCase, markPriceStreamResponse.rLowerCase) - && Objects.equals(this.T, markPriceStreamResponse.T); + && Objects.equals(this.ap, markPriceStreamResponse.ap) + && Objects.equals(this.T, markPriceStreamResponse.T) + && Objects.equals(this.st, markPriceStreamResponse.st); } @Override public int hashCode() { return Objects.hash( - eLowerCase, E, sLowerCase, pLowerCase, ap, iLowerCase, P, rLowerCase, T); + eLowerCase, E, sLowerCase, pLowerCase, iLowerCase, P, rLowerCase, ap, T, st); } @Override @@ -300,11 +326,12 @@ public String toString() { sb.append(" E: ").append(toIndentedString(E)).append("\n"); sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); - sb.append(" ap: ").append(toIndentedString(ap)).append("\n"); sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); sb.append(" P: ").append(toIndentedString(P)).append("\n"); sb.append(" rLowerCase: ").append(toIndentedString(rLowerCase)).append("\n"); + sb.append(" ap: ").append(toIndentedString(ap)).append("\n"); sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -333,11 +360,6 @@ public String toUrlQueryString() { String pLowerCaseValueAsString = pLowerCaseValue.toString(); valMap.put("pLowerCase", pLowerCaseValueAsString); } - String apValue = getAp(); - if (apValue != null) { - String apValueAsString = apValue.toString(); - valMap.put("ap", apValueAsString); - } String iLowerCaseValue = getiLowerCase(); if (iLowerCaseValue != null) { String iLowerCaseValueAsString = iLowerCaseValue.toString(); @@ -353,11 +375,21 @@ public String toUrlQueryString() { String rLowerCaseValueAsString = rLowerCaseValue.toString(); valMap.put("rLowerCase", rLowerCaseValueAsString); } + String apValue = getAp(); + if (apValue != null) { + String apValueAsString = apValue.toString(); + valMap.put("ap", apValueAsString); + } Long TValue = getT(); if (TValue != null) { String TValueAsString = TValue.toString(); valMap.put("T", TValueAsString); } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -385,10 +417,6 @@ public Map toMap() { if (pLowerCaseValue != null) { valMap.put("pLowerCase", pLowerCaseValue); } - Object apValue = getAp(); - if (apValue != null) { - valMap.put("ap", apValue); - } Object iLowerCaseValue = getiLowerCase(); if (iLowerCaseValue != null) { valMap.put("iLowerCase", iLowerCaseValue); @@ -401,10 +429,18 @@ public Map toMap() { if (rLowerCaseValue != null) { valMap.put("rLowerCase", rLowerCaseValue); } + Object apValue = getAp(); + if (apValue != null) { + valMap.put("ap", apValue); + } Object TValue = getT(); if (TValue != null) { valMap.put("T", TValue); } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -435,11 +471,12 @@ private String toIndentedString(Object o) { openapiFields.add("E"); openapiFields.add("s"); openapiFields.add("p"); - openapiFields.add("ap"); openapiFields.add("i"); openapiFields.add("P"); openapiFields.add("r"); + openapiFields.add("ap"); openapiFields.add("T"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -499,14 +536,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("p").toString())); } - if ((jsonObj.get("ap") != null && !jsonObj.get("ap").isJsonNull()) - && !jsonObj.get("ap").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ap` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("ap").toString())); - } if ((jsonObj.get("i") != null && !jsonObj.get("i").isJsonNull()) && !jsonObj.get("i").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -531,6 +560,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("r").toString())); } + if ((jsonObj.get("ap") != null && !jsonObj.get("ap").isJsonNull()) + && !jsonObj.get("ap").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ap` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ap").toString())); + } } 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/stream/model/MultiAssetsModeAssetIndexRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MultiAssetsModeAssetIndexRequest.java deleted file mode 100644 index cc83f9475..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MultiAssetsModeAssetIndexRequest.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** MultiAssetsModeAssetIndexRequest */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MultiAssetsModeAssetIndexRequest extends BaseDTO { - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @jakarta.annotation.Nullable - private String id; - - public MultiAssetsModeAssetIndexRequest() {} - - public MultiAssetsModeAssetIndexRequest id(@jakarta.annotation.Nullable String id) { - this.id = id; - return this; - } - - /** - * Get id - * - * @return id - */ - @jakarta.annotation.Nullable - public String getId() { - return id; - } - - public void setId(@jakarta.annotation.Nullable String id) { - this.id = id; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MultiAssetsModeAssetIndexRequest multiAssetsModeAssetIndexRequest = - (MultiAssetsModeAssetIndexRequest) o; - return Objects.equals(this.id, multiAssetsModeAssetIndexRequest.id); - } - - @Override - public int hashCode() { - return Objects.hash(id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MultiAssetsModeAssetIndexRequest {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String idValue = getId(); - if (idValue != null) { - String idValueAsString = idValue.toString(); - valMap.put("id", idValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object idValue = getId(); - if (idValue != null) { - valMap.put("id", idValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * MultiAssetsModeAssetIndexRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MultiAssetsModeAssetIndexRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MultiAssetsModeAssetIndexRequest is" - + " not found in the empty JSON string", - MultiAssetsModeAssetIndexRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MultiAssetsModeAssetIndexRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MultiAssetsModeAssetIndexRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) - && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MultiAssetsModeAssetIndexRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MultiAssetsModeAssetIndexRequest' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(MultiAssetsModeAssetIndexRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MultiAssetsModeAssetIndexRequest value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MultiAssetsModeAssetIndexRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MultiAssetsModeAssetIndexRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of MultiAssetsModeAssetIndexRequest - * @throws IOException if the JSON string is invalid with respect to - * MultiAssetsModeAssetIndexRequest - */ - public static MultiAssetsModeAssetIndexRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MultiAssetsModeAssetIndexRequest.class); - } - - /** - * Convert an instance of MultiAssetsModeAssetIndexRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MultiAssetsModeAssetIndexResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MultiAssetsModeAssetIndexResponse.java deleted file mode 100644 index 8d570ff7a..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MultiAssetsModeAssetIndexResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** MultiAssetsModeAssetIndexResponse */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MultiAssetsModeAssetIndexResponse - extends ArrayList { - public MultiAssetsModeAssetIndexResponse() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MultiAssetsModeAssetIndexResponse {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * MultiAssetsModeAssetIndexResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MultiAssetsModeAssetIndexResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MultiAssetsModeAssetIndexResponse is" - + " not found in the empty JSON string", - MultiAssetsModeAssetIndexResponse.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MultiAssetsModeAssetIndexResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MultiAssetsModeAssetIndexResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MultiAssetsModeAssetIndexResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MultiAssetsModeAssetIndexResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(MultiAssetsModeAssetIndexResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MultiAssetsModeAssetIndexResponse value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public MultiAssetsModeAssetIndexResponse read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MultiAssetsModeAssetIndexResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of MultiAssetsModeAssetIndexResponse - * @throws IOException if the JSON string is invalid with respect to - * MultiAssetsModeAssetIndexResponse - */ - public static MultiAssetsModeAssetIndexResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MultiAssetsModeAssetIndexResponse.class); - } - - /** - * Convert an instance of MultiAssetsModeAssetIndexResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MultiAssetsModeAssetIndexResponseInner.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MultiAssetsModeAssetIndexResponseInner.java deleted file mode 100644 index 7054c6c57..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MultiAssetsModeAssetIndexResponseInner.java +++ /dev/null @@ -1,762 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** MultiAssetsModeAssetIndexResponseInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MultiAssetsModeAssetIndexResponseInner extends BaseDTO { - public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; - - @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) - @jakarta.annotation.Nullable - private String eLowerCase; - - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private Long E; - - public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; - - @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) - @jakarta.annotation.Nullable - private String sLowerCase; - - public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; - - @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) - @jakarta.annotation.Nullable - private String iLowerCase; - - public static final String SERIALIZED_NAME_B_LOWER_CASE = "b"; - - @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) - @jakarta.annotation.Nullable - private String bLowerCase; - - public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; - - @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) - @jakarta.annotation.Nullable - private String aLowerCase; - - public static final String SERIALIZED_NAME_B = "B"; - - @SerializedName(SERIALIZED_NAME_B) - @jakarta.annotation.Nullable - private String B; - - public static final String SERIALIZED_NAME_A = "A"; - - @SerializedName(SERIALIZED_NAME_A) - @jakarta.annotation.Nullable - private String A; - - public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; - - @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) - @jakarta.annotation.Nullable - private String qLowerCase; - - public static final String SERIALIZED_NAME_G_LOWER_CASE = "g"; - - @SerializedName(SERIALIZED_NAME_G_LOWER_CASE) - @jakarta.annotation.Nullable - private String gLowerCase; - - public static final String SERIALIZED_NAME_Q = "Q"; - - @SerializedName(SERIALIZED_NAME_Q) - @jakarta.annotation.Nullable - private String Q; - - public static final String SERIALIZED_NAME_G = "G"; - - @SerializedName(SERIALIZED_NAME_G) - @jakarta.annotation.Nullable - private String G; - - public MultiAssetsModeAssetIndexResponseInner() {} - - public MultiAssetsModeAssetIndexResponseInner eLowerCase( - @jakarta.annotation.Nullable String eLowerCase) { - this.eLowerCase = eLowerCase; - return this; - } - - /** - * Get eLowerCase - * - * @return eLowerCase - */ - @jakarta.annotation.Nullable - public String geteLowerCase() { - return eLowerCase; - } - - public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { - this.eLowerCase = eLowerCase; - } - - public MultiAssetsModeAssetIndexResponseInner E(@jakarta.annotation.Nullable Long E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public Long getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable Long E) { - this.E = E; - } - - public MultiAssetsModeAssetIndexResponseInner sLowerCase( - @jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - return this; - } - - /** - * Get sLowerCase - * - * @return sLowerCase - */ - @jakarta.annotation.Nullable - public String getsLowerCase() { - return sLowerCase; - } - - public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - } - - public MultiAssetsModeAssetIndexResponseInner iLowerCase( - @jakarta.annotation.Nullable String iLowerCase) { - this.iLowerCase = iLowerCase; - return this; - } - - /** - * Get iLowerCase - * - * @return iLowerCase - */ - @jakarta.annotation.Nullable - public String getiLowerCase() { - return iLowerCase; - } - - public void setiLowerCase(@jakarta.annotation.Nullable String iLowerCase) { - this.iLowerCase = iLowerCase; - } - - public MultiAssetsModeAssetIndexResponseInner bLowerCase( - @jakarta.annotation.Nullable String bLowerCase) { - this.bLowerCase = bLowerCase; - return this; - } - - /** - * Get bLowerCase - * - * @return bLowerCase - */ - @jakarta.annotation.Nullable - public String getbLowerCase() { - return bLowerCase; - } - - public void setbLowerCase(@jakarta.annotation.Nullable String bLowerCase) { - this.bLowerCase = bLowerCase; - } - - public MultiAssetsModeAssetIndexResponseInner aLowerCase( - @jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - return this; - } - - /** - * Get aLowerCase - * - * @return aLowerCase - */ - @jakarta.annotation.Nullable - public String getaLowerCase() { - return aLowerCase; - } - - public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - } - - public MultiAssetsModeAssetIndexResponseInner B(@jakarta.annotation.Nullable String B) { - this.B = B; - return this; - } - - /** - * Get B - * - * @return B - */ - @jakarta.annotation.Nullable - public String getB() { - return B; - } - - public void setB(@jakarta.annotation.Nullable String B) { - this.B = B; - } - - public MultiAssetsModeAssetIndexResponseInner A(@jakarta.annotation.Nullable String A) { - this.A = A; - return this; - } - - /** - * Get A - * - * @return A - */ - @jakarta.annotation.Nullable - public String getA() { - return A; - } - - public void setA(@jakarta.annotation.Nullable String A) { - this.A = A; - } - - public MultiAssetsModeAssetIndexResponseInner qLowerCase( - @jakarta.annotation.Nullable String qLowerCase) { - this.qLowerCase = qLowerCase; - return this; - } - - /** - * Get qLowerCase - * - * @return qLowerCase - */ - @jakarta.annotation.Nullable - public String getqLowerCase() { - return qLowerCase; - } - - public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { - this.qLowerCase = qLowerCase; - } - - public MultiAssetsModeAssetIndexResponseInner gLowerCase( - @jakarta.annotation.Nullable String gLowerCase) { - this.gLowerCase = gLowerCase; - return this; - } - - /** - * Get gLowerCase - * - * @return gLowerCase - */ - @jakarta.annotation.Nullable - public String getgLowerCase() { - return gLowerCase; - } - - public void setgLowerCase(@jakarta.annotation.Nullable String gLowerCase) { - this.gLowerCase = gLowerCase; - } - - public MultiAssetsModeAssetIndexResponseInner Q(@jakarta.annotation.Nullable String Q) { - this.Q = Q; - return this; - } - - /** - * Get Q - * - * @return Q - */ - @jakarta.annotation.Nullable - public String getQ() { - return Q; - } - - public void setQ(@jakarta.annotation.Nullable String Q) { - this.Q = Q; - } - - public MultiAssetsModeAssetIndexResponseInner G(@jakarta.annotation.Nullable String G) { - this.G = G; - return this; - } - - /** - * Get G - * - * @return G - */ - @jakarta.annotation.Nullable - public String getG() { - return G; - } - - public void setG(@jakarta.annotation.Nullable String G) { - this.G = G; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MultiAssetsModeAssetIndexResponseInner multiAssetsModeAssetIndexResponseInner = - (MultiAssetsModeAssetIndexResponseInner) o; - return Objects.equals(this.eLowerCase, multiAssetsModeAssetIndexResponseInner.eLowerCase) - && Objects.equals(this.E, multiAssetsModeAssetIndexResponseInner.E) - && Objects.equals( - this.sLowerCase, multiAssetsModeAssetIndexResponseInner.sLowerCase) - && Objects.equals( - this.iLowerCase, multiAssetsModeAssetIndexResponseInner.iLowerCase) - && Objects.equals( - this.bLowerCase, multiAssetsModeAssetIndexResponseInner.bLowerCase) - && Objects.equals( - this.aLowerCase, multiAssetsModeAssetIndexResponseInner.aLowerCase) - && Objects.equals(this.B, multiAssetsModeAssetIndexResponseInner.B) - && Objects.equals(this.A, multiAssetsModeAssetIndexResponseInner.A) - && Objects.equals( - this.qLowerCase, multiAssetsModeAssetIndexResponseInner.qLowerCase) - && Objects.equals( - this.gLowerCase, multiAssetsModeAssetIndexResponseInner.gLowerCase) - && Objects.equals(this.Q, multiAssetsModeAssetIndexResponseInner.Q) - && Objects.equals(this.G, multiAssetsModeAssetIndexResponseInner.G); - } - - @Override - public int hashCode() { - return Objects.hash( - eLowerCase, - E, - sLowerCase, - iLowerCase, - bLowerCase, - aLowerCase, - B, - A, - qLowerCase, - gLowerCase, - Q, - G); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MultiAssetsModeAssetIndexResponseInner {\n"); - sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); - sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); - sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); - sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); - sb.append(" B: ").append(toIndentedString(B)).append("\n"); - sb.append(" A: ").append(toIndentedString(A)).append("\n"); - sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); - sb.append(" gLowerCase: ").append(toIndentedString(gLowerCase)).append("\n"); - sb.append(" Q: ").append(toIndentedString(Q)).append("\n"); - sb.append(" G: ").append(toIndentedString(G)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String eLowerCaseValue = geteLowerCase(); - if (eLowerCaseValue != null) { - String eLowerCaseValueAsString = eLowerCaseValue.toString(); - valMap.put("eLowerCase", eLowerCaseValueAsString); - } - Long EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - String sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - String sLowerCaseValueAsString = sLowerCaseValue.toString(); - valMap.put("sLowerCase", sLowerCaseValueAsString); - } - String iLowerCaseValue = getiLowerCase(); - if (iLowerCaseValue != null) { - String iLowerCaseValueAsString = iLowerCaseValue.toString(); - valMap.put("iLowerCase", iLowerCaseValueAsString); - } - String bLowerCaseValue = getbLowerCase(); - if (bLowerCaseValue != null) { - String bLowerCaseValueAsString = bLowerCaseValue.toString(); - valMap.put("bLowerCase", bLowerCaseValueAsString); - } - String aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - String aLowerCaseValueAsString = aLowerCaseValue.toString(); - valMap.put("aLowerCase", aLowerCaseValueAsString); - } - String BValue = getB(); - if (BValue != null) { - String BValueAsString = BValue.toString(); - valMap.put("B", BValueAsString); - } - String AValue = getA(); - if (AValue != null) { - String AValueAsString = AValue.toString(); - valMap.put("A", AValueAsString); - } - String qLowerCaseValue = getqLowerCase(); - if (qLowerCaseValue != null) { - String qLowerCaseValueAsString = qLowerCaseValue.toString(); - valMap.put("qLowerCase", qLowerCaseValueAsString); - } - String gLowerCaseValue = getgLowerCase(); - if (gLowerCaseValue != null) { - String gLowerCaseValueAsString = gLowerCaseValue.toString(); - valMap.put("gLowerCase", gLowerCaseValueAsString); - } - String QValue = getQ(); - if (QValue != null) { - String QValueAsString = QValue.toString(); - valMap.put("Q", QValueAsString); - } - String GValue = getG(); - if (GValue != null) { - String GValueAsString = GValue.toString(); - valMap.put("G", GValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object eLowerCaseValue = geteLowerCase(); - if (eLowerCaseValue != null) { - valMap.put("eLowerCase", eLowerCaseValue); - } - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - valMap.put("sLowerCase", sLowerCaseValue); - } - Object iLowerCaseValue = getiLowerCase(); - if (iLowerCaseValue != null) { - valMap.put("iLowerCase", iLowerCaseValue); - } - Object bLowerCaseValue = getbLowerCase(); - if (bLowerCaseValue != null) { - valMap.put("bLowerCase", bLowerCaseValue); - } - Object aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - valMap.put("aLowerCase", aLowerCaseValue); - } - Object BValue = getB(); - if (BValue != null) { - valMap.put("B", BValue); - } - Object AValue = getA(); - if (AValue != null) { - valMap.put("A", AValue); - } - Object qLowerCaseValue = getqLowerCase(); - if (qLowerCaseValue != null) { - valMap.put("qLowerCase", qLowerCaseValue); - } - Object gLowerCaseValue = getgLowerCase(); - if (gLowerCaseValue != null) { - valMap.put("gLowerCase", gLowerCaseValue); - } - Object QValue = getQ(); - if (QValue != null) { - valMap.put("Q", QValue); - } - Object GValue = getG(); - if (GValue != null) { - valMap.put("G", GValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("e"); - openapiFields.add("E"); - openapiFields.add("s"); - openapiFields.add("i"); - openapiFields.add("b"); - openapiFields.add("a"); - openapiFields.add("B"); - openapiFields.add("A"); - openapiFields.add("q"); - openapiFields.add("g"); - openapiFields.add("Q"); - openapiFields.add("G"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * MultiAssetsModeAssetIndexResponseInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MultiAssetsModeAssetIndexResponseInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MultiAssetsModeAssetIndexResponseInner" - + " is not found in the empty JSON string", - MultiAssetsModeAssetIndexResponseInner.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MultiAssetsModeAssetIndexResponseInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MultiAssetsModeAssetIndexResponseInner` properties. JSON:" - + " %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) - && !jsonObj.get("e").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `e` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("e").toString())); - } - if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) - && !jsonObj.get("s").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `s` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("s").toString())); - } - if ((jsonObj.get("i") != null && !jsonObj.get("i").isJsonNull()) - && !jsonObj.get("i").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `i` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("i").toString())); - } - if ((jsonObj.get("b") != null && !jsonObj.get("b").isJsonNull()) - && !jsonObj.get("b").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `b` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("b").toString())); - } - if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) - && !jsonObj.get("a").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `a` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("a").toString())); - } - if ((jsonObj.get("B") != null && !jsonObj.get("B").isJsonNull()) - && !jsonObj.get("B").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `B` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("B").toString())); - } - if ((jsonObj.get("A") != null && !jsonObj.get("A").isJsonNull()) - && !jsonObj.get("A").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `A` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("A").toString())); - } - if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) - && !jsonObj.get("q").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `q` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("q").toString())); - } - if ((jsonObj.get("g") != null && !jsonObj.get("g").isJsonNull()) - && !jsonObj.get("g").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `g` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("g").toString())); - } - if ((jsonObj.get("Q") != null && !jsonObj.get("Q").isJsonNull()) - && !jsonObj.get("Q").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Q` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("Q").toString())); - } - if ((jsonObj.get("G") != null && !jsonObj.get("G").isJsonNull()) - && !jsonObj.get("G").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `G` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("G").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MultiAssetsModeAssetIndexResponseInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MultiAssetsModeAssetIndexResponseInner' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(MultiAssetsModeAssetIndexResponseInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, MultiAssetsModeAssetIndexResponseInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MultiAssetsModeAssetIndexResponseInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MultiAssetsModeAssetIndexResponseInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of MultiAssetsModeAssetIndexResponseInner - * @throws IOException if the JSON string is invalid with respect to - * MultiAssetsModeAssetIndexResponseInner - */ - public static MultiAssetsModeAssetIndexResponseInner fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, MultiAssetsModeAssetIndexResponseInner.class); - } - - /** - * Convert an instance of MultiAssetsModeAssetIndexResponseInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/OrderTradeUpdate.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/OrderTradeUpdate.java index a4dfc8bae..57b363fdc 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/OrderTradeUpdate.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/OrderTradeUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** OrderTradeUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTradeUpdate extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -66,7 +66,7 @@ public OrderTradeUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -85,7 +85,7 @@ public OrderTradeUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/OrderTradeUpdateO.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/OrderTradeUpdateO.java index ffec04f20..39b325614 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/OrderTradeUpdateO.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/OrderTradeUpdateO.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderTradeUpdateO */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTradeUpdateO extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -111,6 +111,12 @@ public class OrderTradeUpdateO extends BaseDTO { @jakarta.annotation.Nullable private Long iLowerCase; + public static final String SERIALIZED_NAME_M = "M"; + + @SerializedName(SERIALIZED_NAME_M) + @jakarta.annotation.Nullable + private String M; + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) @@ -269,7 +275,7 @@ public OrderTradeUpdateO sLowerCase(@jakarta.annotation.Nullable String sLowerCa } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -288,7 +294,7 @@ public OrderTradeUpdateO cLowerCase(@jakarta.annotation.Nullable String cLowerCa } /** - * Get cLowerCase + * Client Order Id * * @return cLowerCase */ @@ -307,7 +313,7 @@ public OrderTradeUpdateO S(@jakarta.annotation.Nullable String S) { } /** - * Get S + * Side * * @return S */ @@ -326,7 +332,7 @@ public OrderTradeUpdateO oLowerCase(@jakarta.annotation.Nullable String oLowerCa } /** - * Get oLowerCase + * Order Type * * @return oLowerCase */ @@ -345,7 +351,7 @@ public OrderTradeUpdateO fLowerCase(@jakarta.annotation.Nullable String fLowerCa } /** - * Get fLowerCase + * Time in Force * * @return fLowerCase */ @@ -364,7 +370,7 @@ public OrderTradeUpdateO qLowerCase(@jakarta.annotation.Nullable String qLowerCa } /** - * Get qLowerCase + * Original Quantity * * @return qLowerCase */ @@ -383,7 +389,7 @@ public OrderTradeUpdateO pLowerCase(@jakarta.annotation.Nullable String pLowerCa } /** - * Get pLowerCase + * Original Price * * @return pLowerCase */ @@ -402,7 +408,7 @@ public OrderTradeUpdateO ap(@jakarta.annotation.Nullable String ap) { } /** - * Get ap + * Average Price * * @return ap */ @@ -421,7 +427,7 @@ public OrderTradeUpdateO sp(@jakarta.annotation.Nullable String sp) { } /** - * Get sp + * Stop Price. Please ignore with TRAILING_STOP_MARKET order * * @return sp */ @@ -440,7 +446,7 @@ public OrderTradeUpdateO xLowerCase(@jakarta.annotation.Nullable String xLowerCa } /** - * Get xLowerCase + * Execution Type * * @return xLowerCase */ @@ -459,7 +465,7 @@ public OrderTradeUpdateO X(@jakarta.annotation.Nullable String X) { } /** - * Get X + * Order Status * * @return X */ @@ -478,7 +484,7 @@ public OrderTradeUpdateO iLowerCase(@jakarta.annotation.Nullable Long iLowerCase } /** - * Get iLowerCase + * Order Id * * @return iLowerCase */ @@ -491,13 +497,33 @@ public void setiLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { this.iLowerCase = iLowerCase; } + public OrderTradeUpdateO M(@jakarta.annotation.Nullable String M) { + this.M = M; + return this; + } + + /** + * modifyId, only pushed for AMENDMENT (order modification) events when a modifyId was provided + * in the request + * + * @return M + */ + @jakarta.annotation.Nullable + public String getM() { + return M; + } + + public void setM(@jakarta.annotation.Nullable String M) { + this.M = M; + } + public OrderTradeUpdateO lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { this.lLowerCase = lLowerCase; return this; } /** - * Get lLowerCase + * Order Last Filled Quantity * * @return lLowerCase */ @@ -516,7 +542,7 @@ public OrderTradeUpdateO zLowerCase(@jakarta.annotation.Nullable String zLowerCa } /** - * Get zLowerCase + * Order Filled Accumulated Quantity * * @return zLowerCase */ @@ -535,7 +561,7 @@ public OrderTradeUpdateO L(@jakarta.annotation.Nullable String L) { } /** - * Get L + * Last Filled Price * * @return L */ @@ -554,7 +580,7 @@ public OrderTradeUpdateO N(@jakarta.annotation.Nullable String N) { } /** - * Get N + * Commission Asset * * @return N */ @@ -573,7 +599,7 @@ public OrderTradeUpdateO nLowerCase(@jakarta.annotation.Nullable String nLowerCa } /** - * Get nLowerCase + * Commission * * @return nLowerCase */ @@ -592,7 +618,7 @@ public OrderTradeUpdateO T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Order Trade Time * * @return T */ @@ -611,7 +637,7 @@ public OrderTradeUpdateO tLowerCase(@jakarta.annotation.Nullable Long tLowerCase } /** - * Get tLowerCase + * Trade Id * * @return tLowerCase */ @@ -630,7 +656,7 @@ public OrderTradeUpdateO bLowerCase(@jakarta.annotation.Nullable String bLowerCa } /** - * Get bLowerCase + * Bids Notional * * @return bLowerCase */ @@ -649,7 +675,7 @@ public OrderTradeUpdateO aLowerCase(@jakarta.annotation.Nullable String aLowerCa } /** - * Get aLowerCase + * Ask Notional * * @return aLowerCase */ @@ -668,7 +694,7 @@ public OrderTradeUpdateO mLowerCase(@jakarta.annotation.Nullable Boolean mLowerC } /** - * Get mLowerCase + * Is this trade the maker side? * * @return mLowerCase */ @@ -687,7 +713,7 @@ public OrderTradeUpdateO R(@jakarta.annotation.Nullable Boolean R) { } /** - * Get R + * Is this reduce only * * @return R */ @@ -706,7 +732,7 @@ public OrderTradeUpdateO wt(@jakarta.annotation.Nullable String wt) { } /** - * Get wt + * Stop Price Working Type * * @return wt */ @@ -725,7 +751,7 @@ public OrderTradeUpdateO ot(@jakarta.annotation.Nullable String ot) { } /** - * Get ot + * Original Order Type * * @return ot */ @@ -744,7 +770,7 @@ public OrderTradeUpdateO ps(@jakarta.annotation.Nullable String ps) { } /** - * Get ps + * Position Side * * @return ps */ @@ -763,7 +789,7 @@ public OrderTradeUpdateO cp(@jakarta.annotation.Nullable Boolean cp) { } /** - * Get cp + * If Close-All, pushed with conditional order * * @return cp */ @@ -782,7 +808,7 @@ public OrderTradeUpdateO AP(@jakarta.annotation.Nullable String AP) { } /** - * Get AP + * Activation Price, only pushed with TRAILING_STOP_MARKET order * * @return AP */ @@ -801,7 +827,7 @@ public OrderTradeUpdateO cr(@jakarta.annotation.Nullable String cr) { } /** - * Get cr + * Callback Rate, only pushed with TRAILING_STOP_MARKET order * * @return cr */ @@ -820,7 +846,7 @@ public OrderTradeUpdateO pP(@jakarta.annotation.Nullable Boolean pP) { } /** - * Get pP + * If price protection is turned on * * @return pP */ @@ -839,7 +865,7 @@ public OrderTradeUpdateO si(@jakarta.annotation.Nullable Long si) { } /** - * Get si + * ignore * * @return si */ @@ -858,7 +884,7 @@ public OrderTradeUpdateO ss(@jakarta.annotation.Nullable Long ss) { } /** - * Get ss + * ignore * * @return ss */ @@ -877,7 +903,7 @@ public OrderTradeUpdateO rp(@jakarta.annotation.Nullable String rp) { } /** - * Get rp + * Realized Profit of the trade * * @return rp */ @@ -896,7 +922,7 @@ public OrderTradeUpdateO V(@jakarta.annotation.Nullable String V) { } /** - * Get V + * STP mode * * @return V */ @@ -915,7 +941,7 @@ public OrderTradeUpdateO pm(@jakarta.annotation.Nullable String pm) { } /** - * Get pm + * Price match mode * * @return pm */ @@ -934,7 +960,7 @@ public OrderTradeUpdateO gtd(@jakarta.annotation.Nullable Long gtd) { } /** - * Get gtd + * TIF GTD order auto cancel time * * @return gtd */ @@ -953,7 +979,7 @@ public OrderTradeUpdateO er(@jakarta.annotation.Nullable String er) { } /** - * Get er + * Expiry Reason * * @return er */ @@ -987,6 +1013,7 @@ public boolean equals(Object o) { && Objects.equals(this.xLowerCase, orderTradeUpdateO.xLowerCase) && Objects.equals(this.X, orderTradeUpdateO.X) && Objects.equals(this.iLowerCase, orderTradeUpdateO.iLowerCase) + && Objects.equals(this.M, orderTradeUpdateO.M) && Objects.equals(this.lLowerCase, orderTradeUpdateO.lLowerCase) && Objects.equals(this.zLowerCase, orderTradeUpdateO.zLowerCase) && Objects.equals(this.L, orderTradeUpdateO.L) @@ -1029,6 +1056,7 @@ public int hashCode() { xLowerCase, X, iLowerCase, + M, lLowerCase, zLowerCase, L, @@ -1072,6 +1100,7 @@ public String toString() { sb.append(" xLowerCase: ").append(toIndentedString(xLowerCase)).append("\n"); sb.append(" X: ").append(toIndentedString(X)).append("\n"); sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); + sb.append(" M: ").append(toIndentedString(M)).append("\n"); sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); sb.append(" zLowerCase: ").append(toIndentedString(zLowerCase)).append("\n"); sb.append(" L: ").append(toIndentedString(L)).append("\n"); @@ -1165,6 +1194,11 @@ public String toUrlQueryString() { String iLowerCaseValueAsString = iLowerCaseValue.toString(); valMap.put("iLowerCase", iLowerCaseValueAsString); } + String MValue = getM(); + if (MValue != null) { + String MValueAsString = MValue.toString(); + valMap.put("M", MValueAsString); + } String lLowerCaseValue = getlLowerCase(); if (lLowerCaseValue != null) { String lLowerCaseValueAsString = lLowerCaseValue.toString(); @@ -1349,6 +1383,10 @@ public Map toMap() { if (iLowerCaseValue != null) { valMap.put("iLowerCase", iLowerCaseValue); } + Object MValue = getM(); + if (MValue != null) { + valMap.put("M", MValue); + } Object lLowerCaseValue = getlLowerCase(); if (lLowerCaseValue != null) { valMap.put("lLowerCase", lLowerCaseValue); @@ -1487,6 +1525,7 @@ private String toIndentedString(Object o) { openapiFields.add("x"); openapiFields.add("X"); openapiFields.add("i"); + openapiFields.add("M"); openapiFields.add("l"); openapiFields.add("z"); openapiFields.add("L"); @@ -1635,6 +1674,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("X").toString())); } + if ((jsonObj.get("M") != null && !jsonObj.get("M").isJsonNull()) + && !jsonObj.get("M").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `M` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("M").toString())); + } if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) && !jsonObj.get("l").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/PartialBookDepthStreamsRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/PartialBookDepthStreamsRequest.java index 95a255a49..806fc1c6b 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/PartialBookDepthStreamsRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/PartialBookDepthStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,7 +38,7 @@ /** PartialBookDepthStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PartialBookDepthStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,20 +49,20 @@ public class PartialBookDepthStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_LEVELS = "levels"; @SerializedName(SERIALIZED_NAME_LEVELS) - @jakarta.annotation.Nonnull - private Long levels; + @jakarta.annotation.Nullable + private Levels levels; public static final String SERIALIZED_NAME_UPDATE_SPEED = "updateSpeed"; @SerializedName(SERIALIZED_NAME_UPDATE_SPEED) @jakarta.annotation.Nullable - private String updateSpeed; + private UpdateSpeed updateSpeed; public PartialBookDepthStreamsRequest() {} @@ -71,7 +72,7 @@ public PartialBookDepthStreamsRequest id(@jakarta.annotation.Nullable String id) } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -84,27 +85,26 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public PartialBookDepthStreamsRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public PartialBookDepthStreamsRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } - public PartialBookDepthStreamsRequest levels(@jakarta.annotation.Nonnull Long levels) { + public PartialBookDepthStreamsRequest levels(@jakarta.annotation.Nullable Levels levels) { this.levels = levels; return this; } @@ -114,18 +114,18 @@ public PartialBookDepthStreamsRequest levels(@jakarta.annotation.Nonnull Long le * * @return levels */ - @jakarta.annotation.Nonnull - @NotNull - public Long getLevels() { + @jakarta.annotation.Nullable + @Valid + public Levels getLevels() { return levels; } - public void setLevels(@jakarta.annotation.Nonnull Long levels) { + public void setLevels(@jakarta.annotation.Nullable Levels levels) { this.levels = levels; } public PartialBookDepthStreamsRequest updateSpeed( - @jakarta.annotation.Nullable String updateSpeed) { + @jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; return this; } @@ -136,11 +136,12 @@ public PartialBookDepthStreamsRequest updateSpeed( * @return updateSpeed */ @jakarta.annotation.Nullable - public String getUpdateSpeed() { + @Valid + public UpdateSpeed getUpdateSpeed() { return updateSpeed; } - public void setUpdateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public void setUpdateSpeed(@jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; } @@ -191,12 +192,12 @@ public String toUrlQueryString() { String symbolValueAsString = symbolValue.toString(); valMap.put("symbol", symbolValueAsString); } - Long levelsValue = getLevels(); + Levels levelsValue = getLevels(); if (levelsValue != null) { String levelsValueAsString = levelsValue.toString(); valMap.put("levels", levelsValueAsString); } - String updateSpeedValue = getUpdateSpeed(); + UpdateSpeed updateSpeedValue = getUpdateSpeed(); if (updateSpeedValue != null) { String updateSpeedValueAsString = updateSpeedValue.toString(); valMap.put("updateSpeed", updateSpeedValueAsString); @@ -261,8 +262,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); - openapiRequiredFields.add("levels"); } /** @@ -295,16 +294,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PartialBookDepthStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -314,20 +303,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - if ((jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) - && !jsonObj.get("updateSpeed").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `updateSpeed` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("updateSpeed").toString())); + // validate the optional field `levels` + if (jsonObj.get("levels") != null && !jsonObj.get("levels").isJsonNull()) { + Levels.validateJsonElement(jsonObj.get("levels")); + } + // validate the optional field `updateSpeed` + if (jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) { + UpdateSpeed.validateJsonElement(jsonObj.get("updateSpeed")); } } diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/PartialBookDepthStreamsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/PartialBookDepthStreamsResponse.java index 743c5edec..1c3aacffd 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/PartialBookDepthStreamsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/PartialBookDepthStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** PartialBookDepthStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PartialBookDepthStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -88,13 +88,25 @@ public class PartialBookDepthStreamsResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) @jakarta.annotation.Nullable - private List bLowerCase; + private List> bLowerCase; public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) @jakarta.annotation.Nullable - private List aLowerCase; + private List> aLowerCase; + + public static final String SERIALIZED_NAME_PS = "ps"; + + @SerializedName(SERIALIZED_NAME_PS) + @jakarta.annotation.Nullable + private String ps; + + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; public PartialBookDepthStreamsResponse() {} @@ -105,7 +117,7 @@ public PartialBookDepthStreamsResponse eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -124,7 +136,7 @@ public PartialBookDepthStreamsResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -143,7 +155,7 @@ public PartialBookDepthStreamsResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction time * * @return T */ @@ -163,7 +175,7 @@ public PartialBookDepthStreamsResponse sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -182,7 +194,7 @@ public PartialBookDepthStreamsResponse U(@jakarta.annotation.Nullable Long U) { } /** - * Get U + * First update ID in event * * @return U */ @@ -202,7 +214,7 @@ public PartialBookDepthStreamsResponse uLowerCase( } /** - * Get uLowerCase + * Final update ID in event * * @return uLowerCase */ @@ -221,7 +233,7 @@ public PartialBookDepthStreamsResponse pu(@jakarta.annotation.Nullable Long pu) } /** - * Get pu + * Final update Id in last stream(ie `u` in last stream) * * @return pu */ @@ -235,13 +247,12 @@ public void setPu(@jakarta.annotation.Nullable Long pu) { } public PartialBookDepthStreamsResponse bLowerCase( - @jakarta.annotation.Nullable List bLowerCase) { + @jakarta.annotation.Nullable List> bLowerCase) { this.bLowerCase = bLowerCase; return this; } - public PartialBookDepthStreamsResponse addBLowerCaseItem( - PartialBookDepthStreamsResponseBItem bLowerCaseItem) { + public PartialBookDepthStreamsResponse addBLowerCaseItem(List bLowerCaseItem) { if (this.bLowerCase == null) { this.bLowerCase = new ArrayList<>(); } @@ -250,29 +261,27 @@ public PartialBookDepthStreamsResponse addBLowerCaseItem( } /** - * Get bLowerCase + * Bids to be updated * * @return bLowerCase */ @jakarta.annotation.Nullable @Valid - public List getbLowerCase() { + public List> getbLowerCase() { return bLowerCase; } - public void setbLowerCase( - @jakarta.annotation.Nullable List bLowerCase) { + public void setbLowerCase(@jakarta.annotation.Nullable List> bLowerCase) { this.bLowerCase = bLowerCase; } public PartialBookDepthStreamsResponse aLowerCase( - @jakarta.annotation.Nullable List aLowerCase) { + @jakarta.annotation.Nullable List> aLowerCase) { this.aLowerCase = aLowerCase; return this; } - public PartialBookDepthStreamsResponse addALowerCaseItem( - PartialBookDepthStreamsResponseAItem aLowerCaseItem) { + public PartialBookDepthStreamsResponse addALowerCaseItem(List aLowerCaseItem) { if (this.aLowerCase == null) { this.aLowerCase = new ArrayList<>(); } @@ -281,21 +290,58 @@ public PartialBookDepthStreamsResponse addALowerCaseItem( } /** - * Get aLowerCase + * Asks to be updated * * @return aLowerCase */ @jakarta.annotation.Nullable @Valid - public List getaLowerCase() { + public List> getaLowerCase() { return aLowerCase; } - public void setaLowerCase( - @jakarta.annotation.Nullable List aLowerCase) { + public void setaLowerCase(@jakarta.annotation.Nullable List> aLowerCase) { this.aLowerCase = aLowerCase; } + public PartialBookDepthStreamsResponse ps(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + return this; + } + + /** + * (After CM migration) Pair symbol + * + * @return ps + */ + @jakarta.annotation.Nullable + public String getPs() { + return ps; + } + + public void setPs(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + } + + public PartialBookDepthStreamsResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -314,13 +360,15 @@ public boolean equals(Object o) { && Objects.equals(this.uLowerCase, partialBookDepthStreamsResponse.uLowerCase) && Objects.equals(this.pu, partialBookDepthStreamsResponse.pu) && Objects.equals(this.bLowerCase, partialBookDepthStreamsResponse.bLowerCase) - && Objects.equals(this.aLowerCase, partialBookDepthStreamsResponse.aLowerCase); + && Objects.equals(this.aLowerCase, partialBookDepthStreamsResponse.aLowerCase) + && Objects.equals(this.ps, partialBookDepthStreamsResponse.ps) + && Objects.equals(this.st, partialBookDepthStreamsResponse.st); } @Override public int hashCode() { return Objects.hash( - eLowerCase, E, T, sLowerCase, U, uLowerCase, pu, bLowerCase, aLowerCase); + eLowerCase, E, T, sLowerCase, U, uLowerCase, pu, bLowerCase, aLowerCase, ps, st); } @Override @@ -336,6 +384,8 @@ public String toString() { sb.append(" pu: ").append(toIndentedString(pu)).append("\n"); sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -379,16 +429,26 @@ public String toUrlQueryString() { String puValueAsString = puValue.toString(); valMap.put("pu", puValueAsString); } - List bLowerCaseValue = getbLowerCase(); + List> bLowerCaseValue = getbLowerCase(); if (bLowerCaseValue != null) { String bLowerCaseValueAsString = JSON.getGson().toJson(bLowerCaseValue); valMap.put("bLowerCase", bLowerCaseValueAsString); } - List aLowerCaseValue = getaLowerCase(); + List> aLowerCaseValue = getaLowerCase(); if (aLowerCaseValue != null) { String aLowerCaseValueAsString = JSON.getGson().toJson(aLowerCaseValue); valMap.put("aLowerCase", aLowerCaseValueAsString); } + String psValue = getPs(); + if (psValue != null) { + String psValueAsString = psValue.toString(); + valMap.put("ps", psValueAsString); + } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -436,6 +496,14 @@ public Map toMap() { if (aLowerCaseValue != null) { valMap.put("aLowerCase", aLowerCaseValue); } + Object psValue = getPs(); + if (psValue != null) { + valMap.put("ps", psValue); + } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -471,6 +539,8 @@ private String toIndentedString(Object o) { openapiFields.add("pu"); openapiFields.add("b"); openapiFields.add("a"); + openapiFields.add("ps"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -541,6 +611,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `a` to be an array in the JSON string but got `%s`", jsonObj.get("a").toString())); } + if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) + && !jsonObj.get("ps").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ps` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ps").toString())); + } } 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/stream/model/PartialBookDepthStreamsResponseAItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/PartialBookDepthStreamsResponseAItem.java deleted file mode 100644 index 07b68844a..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/PartialBookDepthStreamsResponseAItem.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** PartialBookDepthStreamsResponseAItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PartialBookDepthStreamsResponseAItem extends ArrayList { - public PartialBookDepthStreamsResponseAItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PartialBookDepthStreamsResponseAItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * PartialBookDepthStreamsResponseAItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PartialBookDepthStreamsResponseAItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PartialBookDepthStreamsResponseAItem" - + " is not found in the empty JSON string", - PartialBookDepthStreamsResponseAItem.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PartialBookDepthStreamsResponseAItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PartialBookDepthStreamsResponseAItem` properties. JSON:" - + " %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PartialBookDepthStreamsResponseAItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PartialBookDepthStreamsResponseAItem' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(PartialBookDepthStreamsResponseAItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, PartialBookDepthStreamsResponseAItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public PartialBookDepthStreamsResponseAItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PartialBookDepthStreamsResponseAItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of PartialBookDepthStreamsResponseAItem - * @throws IOException if the JSON string is invalid with respect to - * PartialBookDepthStreamsResponseAItem - */ - public static PartialBookDepthStreamsResponseAItem fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, PartialBookDepthStreamsResponseAItem.class); - } - - /** - * Convert an instance of PartialBookDepthStreamsResponseAItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/PartialBookDepthStreamsResponseBItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/PartialBookDepthStreamsResponseBItem.java deleted file mode 100644 index a1a765779..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/PartialBookDepthStreamsResponseBItem.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** PartialBookDepthStreamsResponseBItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PartialBookDepthStreamsResponseBItem extends ArrayList { - public PartialBookDepthStreamsResponseBItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PartialBookDepthStreamsResponseBItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * PartialBookDepthStreamsResponseBItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PartialBookDepthStreamsResponseBItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PartialBookDepthStreamsResponseBItem" - + " is not found in the empty JSON string", - PartialBookDepthStreamsResponseBItem.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PartialBookDepthStreamsResponseBItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PartialBookDepthStreamsResponseBItem` properties. JSON:" - + " %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PartialBookDepthStreamsResponseBItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PartialBookDepthStreamsResponseBItem' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(PartialBookDepthStreamsResponseBItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, PartialBookDepthStreamsResponseBItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public PartialBookDepthStreamsResponseBItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PartialBookDepthStreamsResponseBItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of PartialBookDepthStreamsResponseBItem - * @throws IOException if the JSON string is invalid with respect to - * PartialBookDepthStreamsResponseBItem - */ - public static PartialBookDepthStreamsResponseBItem fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, PartialBookDepthStreamsResponseBItem.class); - } - - /** - * Convert an instance of PartialBookDepthStreamsResponseBItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/RpiDiffBookDepthStreamsRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/RpiDiffBookDepthStreamsRequest.java index a02e51c82..62c3c4c74 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/RpiDiffBookDepthStreamsRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/RpiDiffBookDepthStreamsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** RpiDiffBookDepthStreamsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RpiDiffBookDepthStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -48,7 +48,7 @@ public class RpiDiffBookDepthStreamsRequest extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public RpiDiffBookDepthStreamsRequest() {} @@ -59,7 +59,7 @@ public RpiDiffBookDepthStreamsRequest id(@jakarta.annotation.Nullable String id) } /** - * Get id + * Unique WebSocket request ID. * * @return id */ @@ -72,23 +72,22 @@ public void setId(@jakarta.annotation.Nullable String id) { this.id = id; } - public RpiDiffBookDepthStreamsRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public RpiDiffBookDepthStreamsRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * The symbol parameter * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -185,7 +184,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -218,16 +216,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RpiDiffBookDepthStreamsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -237,7 +225,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/RpiDiffBookDepthStreamsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/RpiDiffBookDepthStreamsResponse.java index e71b7bc9b..1691fcdcf 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/RpiDiffBookDepthStreamsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/RpiDiffBookDepthStreamsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** RpiDiffBookDepthStreamsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RpiDiffBookDepthStreamsResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -88,13 +88,25 @@ public class RpiDiffBookDepthStreamsResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) @jakarta.annotation.Nullable - private List bLowerCase; + private List> bLowerCase; public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) @jakarta.annotation.Nullable - private List aLowerCase; + private List> aLowerCase; + + public static final String SERIALIZED_NAME_PS = "ps"; + + @SerializedName(SERIALIZED_NAME_PS) + @jakarta.annotation.Nullable + private String ps; + + public static final String SERIALIZED_NAME_ST = "st"; + + @SerializedName(SERIALIZED_NAME_ST) + @jakarta.annotation.Nullable + private Integer st; public RpiDiffBookDepthStreamsResponse() {} @@ -105,7 +117,7 @@ public RpiDiffBookDepthStreamsResponse eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -124,7 +136,7 @@ public RpiDiffBookDepthStreamsResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -143,7 +155,7 @@ public RpiDiffBookDepthStreamsResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction time * * @return T */ @@ -163,7 +175,7 @@ public RpiDiffBookDepthStreamsResponse sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -182,7 +194,7 @@ public RpiDiffBookDepthStreamsResponse U(@jakarta.annotation.Nullable Long U) { } /** - * Get U + * First update ID in event * * @return U */ @@ -202,7 +214,7 @@ public RpiDiffBookDepthStreamsResponse uLowerCase( } /** - * Get uLowerCase + * Final update ID in event * * @return uLowerCase */ @@ -221,7 +233,7 @@ public RpiDiffBookDepthStreamsResponse pu(@jakarta.annotation.Nullable Long pu) } /** - * Get pu + * Final update Id in last stream(ie `u` in last stream) * * @return pu */ @@ -235,13 +247,12 @@ public void setPu(@jakarta.annotation.Nullable Long pu) { } public RpiDiffBookDepthStreamsResponse bLowerCase( - @jakarta.annotation.Nullable List bLowerCase) { + @jakarta.annotation.Nullable List> bLowerCase) { this.bLowerCase = bLowerCase; return this; } - public RpiDiffBookDepthStreamsResponse addBLowerCaseItem( - RpiDiffBookDepthStreamsResponseBItem bLowerCaseItem) { + public RpiDiffBookDepthStreamsResponse addBLowerCaseItem(List bLowerCaseItem) { if (this.bLowerCase == null) { this.bLowerCase = new ArrayList<>(); } @@ -250,29 +261,27 @@ public RpiDiffBookDepthStreamsResponse addBLowerCaseItem( } /** - * Get bLowerCase + * Bids to be updated * * @return bLowerCase */ @jakarta.annotation.Nullable @Valid - public List getbLowerCase() { + public List> getbLowerCase() { return bLowerCase; } - public void setbLowerCase( - @jakarta.annotation.Nullable List bLowerCase) { + public void setbLowerCase(@jakarta.annotation.Nullable List> bLowerCase) { this.bLowerCase = bLowerCase; } public RpiDiffBookDepthStreamsResponse aLowerCase( - @jakarta.annotation.Nullable List aLowerCase) { + @jakarta.annotation.Nullable List> aLowerCase) { this.aLowerCase = aLowerCase; return this; } - public RpiDiffBookDepthStreamsResponse addALowerCaseItem( - RpiDiffBookDepthStreamsResponseAItem aLowerCaseItem) { + public RpiDiffBookDepthStreamsResponse addALowerCaseItem(List aLowerCaseItem) { if (this.aLowerCase == null) { this.aLowerCase = new ArrayList<>(); } @@ -281,21 +290,58 @@ public RpiDiffBookDepthStreamsResponse addALowerCaseItem( } /** - * Get aLowerCase + * Asks to be updated * * @return aLowerCase */ @jakarta.annotation.Nullable @Valid - public List getaLowerCase() { + public List> getaLowerCase() { return aLowerCase; } - public void setaLowerCase( - @jakarta.annotation.Nullable List aLowerCase) { + public void setaLowerCase(@jakarta.annotation.Nullable List> aLowerCase) { this.aLowerCase = aLowerCase; } + public RpiDiffBookDepthStreamsResponse ps(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + return this; + } + + /** + * (After CM migration) Pair symbol + * + * @return ps + */ + @jakarta.annotation.Nullable + public String getPs() { + return ps; + } + + public void setPs(@jakarta.annotation.Nullable String ps) { + this.ps = ps; + } + + public RpiDiffBookDepthStreamsResponse st(@jakarta.annotation.Nullable Integer st) { + this.st = st; + return this; + } + + /** + * (After CM migration) Symbol type: 1 = UM, 2 = CM + * + * @return st + */ + @jakarta.annotation.Nullable + public Integer getSt() { + return st; + } + + public void setSt(@jakarta.annotation.Nullable Integer st) { + this.st = st; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -314,13 +360,15 @@ public boolean equals(Object o) { && Objects.equals(this.uLowerCase, rpiDiffBookDepthStreamsResponse.uLowerCase) && Objects.equals(this.pu, rpiDiffBookDepthStreamsResponse.pu) && Objects.equals(this.bLowerCase, rpiDiffBookDepthStreamsResponse.bLowerCase) - && Objects.equals(this.aLowerCase, rpiDiffBookDepthStreamsResponse.aLowerCase); + && Objects.equals(this.aLowerCase, rpiDiffBookDepthStreamsResponse.aLowerCase) + && Objects.equals(this.ps, rpiDiffBookDepthStreamsResponse.ps) + && Objects.equals(this.st, rpiDiffBookDepthStreamsResponse.st); } @Override public int hashCode() { return Objects.hash( - eLowerCase, E, T, sLowerCase, U, uLowerCase, pu, bLowerCase, aLowerCase); + eLowerCase, E, T, sLowerCase, U, uLowerCase, pu, bLowerCase, aLowerCase, ps, st); } @Override @@ -336,6 +384,8 @@ public String toString() { sb.append(" pu: ").append(toIndentedString(pu)).append("\n"); sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" ps: ").append(toIndentedString(ps)).append("\n"); + sb.append(" st: ").append(toIndentedString(st)).append("\n"); sb.append("}"); return sb.toString(); } @@ -379,16 +429,26 @@ public String toUrlQueryString() { String puValueAsString = puValue.toString(); valMap.put("pu", puValueAsString); } - List bLowerCaseValue = getbLowerCase(); + List> bLowerCaseValue = getbLowerCase(); if (bLowerCaseValue != null) { String bLowerCaseValueAsString = JSON.getGson().toJson(bLowerCaseValue); valMap.put("bLowerCase", bLowerCaseValueAsString); } - List aLowerCaseValue = getaLowerCase(); + List> aLowerCaseValue = getaLowerCase(); if (aLowerCaseValue != null) { String aLowerCaseValueAsString = JSON.getGson().toJson(aLowerCaseValue); valMap.put("aLowerCase", aLowerCaseValueAsString); } + String psValue = getPs(); + if (psValue != null) { + String psValueAsString = psValue.toString(); + valMap.put("ps", psValueAsString); + } + Integer stValue = getSt(); + if (stValue != null) { + String stValueAsString = stValue.toString(); + valMap.put("st", stValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -436,6 +496,14 @@ public Map toMap() { if (aLowerCaseValue != null) { valMap.put("aLowerCase", aLowerCaseValue); } + Object psValue = getPs(); + if (psValue != null) { + valMap.put("ps", psValue); + } + Object stValue = getSt(); + if (stValue != null) { + valMap.put("st", stValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -471,6 +539,8 @@ private String toIndentedString(Object o) { openapiFields.add("pu"); openapiFields.add("b"); openapiFields.add("a"); + openapiFields.add("ps"); + openapiFields.add("st"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -541,6 +611,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `a` to be an array in the JSON string but got `%s`", jsonObj.get("a").toString())); } + if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull()) + && !jsonObj.get("ps").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ps` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("ps").toString())); + } } 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/stream/model/RpiDiffBookDepthStreamsResponseAItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/RpiDiffBookDepthStreamsResponseAItem.java deleted file mode 100644 index 1d29cb896..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/RpiDiffBookDepthStreamsResponseAItem.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** RpiDiffBookDepthStreamsResponseAItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RpiDiffBookDepthStreamsResponseAItem extends ArrayList { - public RpiDiffBookDepthStreamsResponseAItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RpiDiffBookDepthStreamsResponseAItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * RpiDiffBookDepthStreamsResponseAItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RpiDiffBookDepthStreamsResponseAItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RpiDiffBookDepthStreamsResponseAItem" - + " is not found in the empty JSON string", - RpiDiffBookDepthStreamsResponseAItem.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RpiDiffBookDepthStreamsResponseAItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RpiDiffBookDepthStreamsResponseAItem` properties. JSON:" - + " %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RpiDiffBookDepthStreamsResponseAItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RpiDiffBookDepthStreamsResponseAItem' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(RpiDiffBookDepthStreamsResponseAItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, RpiDiffBookDepthStreamsResponseAItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public RpiDiffBookDepthStreamsResponseAItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RpiDiffBookDepthStreamsResponseAItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of RpiDiffBookDepthStreamsResponseAItem - * @throws IOException if the JSON string is invalid with respect to - * RpiDiffBookDepthStreamsResponseAItem - */ - public static RpiDiffBookDepthStreamsResponseAItem fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, RpiDiffBookDepthStreamsResponseAItem.class); - } - - /** - * Convert an instance of RpiDiffBookDepthStreamsResponseAItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/RpiDiffBookDepthStreamsResponseBItem.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/RpiDiffBookDepthStreamsResponseBItem.java deleted file mode 100644 index b86cb3289..000000000 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/RpiDiffBookDepthStreamsResponseBItem.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; - -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** RpiDiffBookDepthStreamsResponseBItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RpiDiffBookDepthStreamsResponseBItem extends ArrayList { - public RpiDiffBookDepthStreamsResponseBItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RpiDiffBookDepthStreamsResponseBItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * RpiDiffBookDepthStreamsResponseBItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RpiDiffBookDepthStreamsResponseBItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RpiDiffBookDepthStreamsResponseBItem" - + " is not found in the empty JSON string", - RpiDiffBookDepthStreamsResponseBItem.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RpiDiffBookDepthStreamsResponseBItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RpiDiffBookDepthStreamsResponseBItem` properties. JSON:" - + " %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RpiDiffBookDepthStreamsResponseBItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RpiDiffBookDepthStreamsResponseBItem' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(RpiDiffBookDepthStreamsResponseBItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, RpiDiffBookDepthStreamsResponseBItem value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public RpiDiffBookDepthStreamsResponseBItem read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RpiDiffBookDepthStreamsResponseBItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of RpiDiffBookDepthStreamsResponseBItem - * @throws IOException if the JSON string is invalid with respect to - * RpiDiffBookDepthStreamsResponseBItem - */ - public static RpiDiffBookDepthStreamsResponseBItem fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, RpiDiffBookDepthStreamsResponseBItem.class); - } - - /** - * Convert an instance of RpiDiffBookDepthStreamsResponseBItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/StrategyUpdate.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/StrategyUpdate.java index fb33328bb..00857120b 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/StrategyUpdate.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/StrategyUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** StrategyUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class StrategyUpdate extends BaseDTO { public static final String SERIALIZED_NAME_T = "T"; @@ -66,7 +66,7 @@ public StrategyUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ @@ -85,7 +85,7 @@ public StrategyUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/StrategyUpdateSu.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/StrategyUpdateSu.java index f5a5c3320..77fc01b68 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/StrategyUpdateSu.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/StrategyUpdateSu.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** StrategyUpdateSu */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class StrategyUpdateSu extends BaseDTO { public static final String SERIALIZED_NAME_SI = "si"; @@ -83,7 +83,7 @@ public StrategyUpdateSu si(@jakarta.annotation.Nullable Long si) { } /** - * Get si + * Strategy ID * * @return si */ @@ -102,7 +102,7 @@ public StrategyUpdateSu st(@jakarta.annotation.Nullable String st) { } /** - * Get st + * Strategy Type * * @return st */ @@ -121,7 +121,7 @@ public StrategyUpdateSu ss(@jakarta.annotation.Nullable String ss) { } /** - * Get ss + * Strategy Status * * @return ss */ @@ -140,7 +140,7 @@ public StrategyUpdateSu sLowerCase(@jakarta.annotation.Nullable String sLowerCas } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -159,7 +159,7 @@ public StrategyUpdateSu ut(@jakarta.annotation.Nullable Long ut) { } /** - * Get ut + * Update Time * * @return ut */ @@ -178,7 +178,7 @@ public StrategyUpdateSu cLowerCase(@jakarta.annotation.Nullable Long cLowerCase) } /** - * Get cLowerCase + * opCode * * @return cLowerCase */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/TradeLite.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/TradeLite.java index 7cc2bc203..c9630d5c5 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/TradeLite.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/TradeLite.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TradeLite */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradeLite extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -119,7 +119,7 @@ public TradeLite E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -138,7 +138,7 @@ public TradeLite T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ @@ -157,7 +157,7 @@ public TradeLite sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -176,7 +176,7 @@ public TradeLite qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { } /** - * Get qLowerCase + * Original Quantity * * @return qLowerCase */ @@ -195,7 +195,7 @@ public TradeLite pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { } /** - * Get pLowerCase + * Original Price * * @return pLowerCase */ @@ -214,7 +214,7 @@ public TradeLite mLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { } /** - * Get mLowerCase + * Is this trade the maker side? * * @return mLowerCase */ @@ -233,7 +233,7 @@ public TradeLite cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { } /** - * Get cLowerCase + * Client Order Id * * @return cLowerCase */ @@ -252,7 +252,7 @@ public TradeLite S(@jakarta.annotation.Nullable String S) { } /** - * Get S + * Side * * @return S */ @@ -271,7 +271,7 @@ public TradeLite L(@jakarta.annotation.Nullable String L) { } /** - * Get L + * Last Filled Price * * @return L */ @@ -290,7 +290,7 @@ public TradeLite lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { } /** - * Get lLowerCase + * Order Last Filled Quantity * * @return lLowerCase */ @@ -309,7 +309,7 @@ public TradeLite tLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { } /** - * Get tLowerCase + * Trade Id * * @return tLowerCase */ @@ -328,7 +328,7 @@ public TradeLite iLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { } /** - * Get iLowerCase + * Order Id * * @return iLowerCase */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/TradingSessionStreamRequest.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/TradingSessionStreamRequest.java index 586d8d0c3..e3f8bf53e 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/TradingSessionStreamRequest.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/TradingSessionStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TradingSessionStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradingSessionStreamRequest extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -53,7 +53,7 @@ public TradingSessionStreamRequest id(@jakarta.annotation.Nullable String id) { } /** - * Get id + * Unique WebSocket request ID. * * @return id */ 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 cef18b6c1..280b03c49 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 @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TradingSessionStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradingSessionStreamResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -77,7 +77,7 @@ public TradingSessionStreamResponse eLowerCase(@jakarta.annotation.Nullable Stri } /** - * Get eLowerCase + * Event type, can also be CommodityUpdate, KR_EquityUpdate or HK_EquityUpdate * * @return eLowerCase */ @@ -96,7 +96,7 @@ public TradingSessionStreamResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -115,7 +115,7 @@ public TradingSessionStreamResponse tLowerCase(@jakarta.annotation.Nullable Long } /** - * Get tLowerCase + * Session start time * * @return tLowerCase */ @@ -134,7 +134,7 @@ public TradingSessionStreamResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Session end time * * @return T */ @@ -153,7 +153,7 @@ public TradingSessionStreamResponse S(@jakarta.annotation.Nullable String S) { } /** - * Get S + * Session type * * @return S */ diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/UpdateSpeed.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/UpdateSpeed.java new file mode 100644 index 000000000..df9bd13b7 --- /dev/null +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/UpdateSpeed.java @@ -0,0 +1,73 @@ +/* + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets updateSpeed */ +@JsonAdapter(UpdateSpeed.Adapter.class) +public enum UpdateSpeed { + UPDATE_SPEED_100ms("100ms"), + + UPDATE_SPEED_500ms("500ms"); + + private String value; + + UpdateSpeed(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static UpdateSpeed fromValue(String value) { + for (UpdateSpeed b : UpdateSpeed.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UpdateSpeed enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UpdateSpeed read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UpdateSpeed.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UpdateSpeed.fromValue(value); + } +} diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/UserDataStreamEventsResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/UserDataStreamEventsResponse.java index 51f8d56e8..4e2afcd61 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/UserDataStreamEventsResponse.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/UserDataStreamEventsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures WebSocket Market Streams - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams + * Futures (USDⓈ-M) WebSocket Market Streams + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -33,7 +33,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserDataStreamEventsResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(UserDataStreamEventsResponse.class.getName()); @@ -49,15 +49,17 @@ public TypeAdapter create(Gson gson, TypeToken type) { final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter adapterAccountConfigUpdate = gson.getDelegateAdapter(this, TypeToken.get(AccountConfigUpdate.class)); - final TypeAdapter adapterAlgoUpdate = - gson.getDelegateAdapter(this, TypeToken.get(AlgoUpdate.class)); final TypeAdapter adapterAccountUpdate = gson.getDelegateAdapter(this, TypeToken.get(AccountUpdate.class)); + final TypeAdapter adapterAlgoUpdate = + gson.getDelegateAdapter(this, TypeToken.get(AlgoUpdate.class)); final TypeAdapter adapterConditionalOrderTriggerReject = gson.getDelegateAdapter( this, TypeToken.get(ConditionalOrderTriggerReject.class)); final TypeAdapter adapterGridUpdate = gson.getDelegateAdapter(this, TypeToken.get(GridUpdate.class)); + final TypeAdapter adapterListenKeyExpired = + gson.getDelegateAdapter(this, TypeToken.get(ListenKeyExpired.class)); final TypeAdapter adapterMarginCall = gson.getDelegateAdapter(this, TypeToken.get(MarginCall.class)); final TypeAdapter adapterOrderTradeUpdate = @@ -66,8 +68,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { gson.getDelegateAdapter(this, TypeToken.get(StrategyUpdate.class)); final TypeAdapter adapterTradeLite = gson.getDelegateAdapter(this, TypeToken.get(TradeLite.class)); - final TypeAdapter adapterListenkeyexpired = - gson.getDelegateAdapter(this, TypeToken.get(Listenkeyexpired.class)); return (TypeAdapter) new TypeAdapter() { @@ -87,14 +87,6 @@ public void write(JsonWriter out, UserDataStreamEventsResponse value) elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `AlgoUpdate` - if (value.getActualInstance() instanceof AlgoUpdate) { - JsonElement element = - adapterAlgoUpdate.toJsonTree( - (AlgoUpdate) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } // check if the actual instance is of the type `AccountUpdate` if (value.getActualInstance() instanceof AccountUpdate) { JsonElement element = @@ -103,6 +95,14 @@ public void write(JsonWriter out, UserDataStreamEventsResponse value) elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `AlgoUpdate` + if (value.getActualInstance() instanceof AlgoUpdate) { + JsonElement element = + adapterAlgoUpdate.toJsonTree( + (AlgoUpdate) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type // `ConditionalOrderTriggerReject` if (value.getActualInstance() @@ -122,6 +122,14 @@ public void write(JsonWriter out, UserDataStreamEventsResponse value) elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `ListenKeyExpired` + if (value.getActualInstance() instanceof ListenKeyExpired) { + JsonElement element = + adapterListenKeyExpired.toJsonTree( + (ListenKeyExpired) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `MarginCall` if (value.getActualInstance() instanceof MarginCall) { JsonElement element = @@ -154,19 +162,11 @@ public void write(JsonWriter out, UserDataStreamEventsResponse value) elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Listenkeyexpired` - if (value.getActualInstance() instanceof Listenkeyexpired) { - JsonElement element = - adapterListenkeyexpired.toJsonTree( - (Listenkeyexpired) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } throw new IOException( "Failed to serialize as the type doesn't match oneOf schemas:" + " AccountConfigUpdate, AccountUpdate, AlgoUpdate," + " ConditionalOrderTriggerReject, GridUpdate," - + " Listenkeyexpired, MarginCall, OrderTradeUpdate," + + " ListenKeyExpired, MarginCall, OrderTradeUpdate," + " StrategyUpdate, TradeLite"); } @@ -242,64 +242,7 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { return newUserDataStreamEventsResponse; case "listenKeyExpired": deserialized = - adapterListenkeyexpired.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "accountConfigUpdate": - deserialized = - adapterAccountConfigUpdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "accountUpdate": - deserialized = - adapterAccountUpdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "algoUpdate": - deserialized = adapterAlgoUpdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "conditionalOrderTriggerReject": - deserialized = - adapterConditionalOrderTriggerReject.fromJsonTree( - jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "gridUpdate": - deserialized = adapterGridUpdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "listenkeyexpired": - deserialized = - adapterListenkeyexpired.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "marginCall": - deserialized = adapterMarginCall.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "orderTradeUpdate": - deserialized = - adapterOrderTradeUpdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "strategyUpdate": - deserialized = - adapterStrategyUpdate.fromJsonTree(jsonObject); - newUserDataStreamEventsResponse.setActualInstance( - deserialized); - return newUserDataStreamEventsResponse; - case "tradeLite": - deserialized = adapterTradeLite.fromJsonTree(jsonObject); + adapterListenKeyExpired.fromJsonTree(jsonObject); newUserDataStreamEventsResponse.setActualInstance( deserialized); return newUserDataStreamEventsResponse; @@ -317,14 +260,8 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { + " CONDITIONAL_ORDER_TRIGGER_REJECT" + " GRID_UPDATE MARGIN_CALL" + " ORDER_TRADE_UPDATE STRATEGY_UPDATE" - + " TRADE_LITE listenKeyExpired" - + " accountConfigUpdate accountUpdate" - + " algoUpdate" - + " conditionalOrderTriggerReject" - + " gridUpdate listenkeyexpired" - + " marginCall orderTradeUpdate" - + " strategyUpdate tradeLite. Falling" - + " back to String.", + + " TRADE_LITE listenKeyExpired." + + " Falling back to String.", jsonObject.get("e").getAsString())); } } @@ -354,41 +291,41 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { "Input data does not match schema 'AccountConfigUpdate'", e); } - // deserialize AlgoUpdate + // deserialize AccountUpdate try { // validate the JSON object to see if any exception is thrown - AlgoUpdate.validateJsonElement(jsonElement); - actualAdapter = adapterAlgoUpdate; + AccountUpdate.validateJsonElement(jsonElement); + actualAdapter = adapterAccountUpdate; match++; - log.log(Level.FINER, "Input data matches schema 'AlgoUpdate'"); + log.log(Level.FINER, "Input data matches schema 'AccountUpdate'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for AlgoUpdate failed with `%s`.", + "Deserialization for AccountUpdate failed with" + + " `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'AlgoUpdate'", + "Input data does not match schema 'AccountUpdate'", e); } - // deserialize AccountUpdate + // deserialize AlgoUpdate try { // validate the JSON object to see if any exception is thrown - AccountUpdate.validateJsonElement(jsonElement); - actualAdapter = adapterAccountUpdate; + AlgoUpdate.validateJsonElement(jsonElement); + actualAdapter = adapterAlgoUpdate; match++; - log.log(Level.FINER, "Input data matches schema 'AccountUpdate'"); + log.log(Level.FINER, "Input data matches schema 'AlgoUpdate'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for AccountUpdate failed with" - + " `%s`.", + "Deserialization for AlgoUpdate failed with `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'AccountUpdate'", + "Input data does not match schema 'AlgoUpdate'", e); } // deserialize ConditionalOrderTriggerReject @@ -432,6 +369,27 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { "Input data does not match schema 'GridUpdate'", e); } + // deserialize ListenKeyExpired + try { + // validate the JSON object to see if any exception is thrown + ListenKeyExpired.validateJsonElement(jsonElement); + actualAdapter = adapterListenKeyExpired; + match++; + log.log( + Level.FINER, + "Input data matches schema 'ListenKeyExpired'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for ListenKeyExpired failed with" + + " `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'ListenKeyExpired'", + e); + } // deserialize MarginCall try { // validate the JSON object to see if any exception is thrown @@ -508,27 +466,6 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { "Input data does not match schema 'TradeLite'", e); } - // deserialize Listenkeyexpired - try { - // validate the JSON object to see if any exception is thrown - Listenkeyexpired.validateJsonElement(jsonElement); - actualAdapter = adapterListenkeyexpired; - match++; - log.log( - Level.FINER, - "Input data matches schema 'Listenkeyexpired'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for Listenkeyexpired failed with" - + " `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'Listenkeyexpired'", - e); - } if (match == 1) { UserDataStreamEventsResponse ret = @@ -563,15 +500,15 @@ public UserDataStreamEventsResponse(Object o) { static { schemas.put("AccountConfigUpdate", AccountConfigUpdate.class); - schemas.put("AlgoUpdate", AlgoUpdate.class); schemas.put("AccountUpdate", AccountUpdate.class); + schemas.put("AlgoUpdate", AlgoUpdate.class); schemas.put("ConditionalOrderTriggerReject", ConditionalOrderTriggerReject.class); schemas.put("GridUpdate", GridUpdate.class); + schemas.put("ListenKeyExpired", ListenKeyExpired.class); schemas.put("MarginCall", MarginCall.class); schemas.put("OrderTradeUpdate", OrderTradeUpdate.class); schemas.put("StrategyUpdate", StrategyUpdate.class); schemas.put("TradeLite", TradeLite.class); - schemas.put("Listenkeyexpired", Listenkeyexpired.class); } @Override @@ -582,7 +519,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid * against the oneOf child schemas: AccountConfigUpdate, AccountUpdate, AlgoUpdate, - * ConditionalOrderTriggerReject, GridUpdate, Listenkeyexpired, MarginCall, OrderTradeUpdate, + * ConditionalOrderTriggerReject, GridUpdate, ListenKeyExpired, MarginCall, OrderTradeUpdate, * StrategyUpdate, TradeLite * *

It could be an instance of the 'oneOf' schemas. @@ -594,12 +531,12 @@ public void setActualInstance(Object instance) { return; } - if (instance instanceof AlgoUpdate) { + if (instance instanceof AccountUpdate) { super.setActualInstance(instance); return; } - if (instance instanceof AccountUpdate) { + if (instance instanceof AlgoUpdate) { super.setActualInstance(instance); return; } @@ -614,44 +551,44 @@ public void setActualInstance(Object instance) { return; } - if (instance instanceof MarginCall) { + if (instance instanceof ListenKeyExpired) { super.setActualInstance(instance); return; } - if (instance instanceof OrderTradeUpdate) { + if (instance instanceof MarginCall) { super.setActualInstance(instance); return; } - if (instance instanceof StrategyUpdate) { + if (instance instanceof OrderTradeUpdate) { super.setActualInstance(instance); return; } - if (instance instanceof TradeLite) { + if (instance instanceof StrategyUpdate) { super.setActualInstance(instance); return; } - if (instance instanceof Listenkeyexpired) { + if (instance instanceof TradeLite) { super.setActualInstance(instance); return; } throw new RuntimeException( "Invalid instance type. Must be AccountConfigUpdate, AccountUpdate, AlgoUpdate," - + " ConditionalOrderTriggerReject, GridUpdate, Listenkeyexpired, MarginCall," + + " ConditionalOrderTriggerReject, GridUpdate, ListenKeyExpired, MarginCall," + " OrderTradeUpdate, StrategyUpdate, TradeLite"); } /** * Get the actual instance, which can be the following: AccountConfigUpdate, AccountUpdate, - * AlgoUpdate, ConditionalOrderTriggerReject, GridUpdate, Listenkeyexpired, MarginCall, + * AlgoUpdate, ConditionalOrderTriggerReject, GridUpdate, ListenKeyExpired, MarginCall, * OrderTradeUpdate, StrategyUpdate, TradeLite * * @return The actual instance (AccountConfigUpdate, AccountUpdate, AlgoUpdate, - * ConditionalOrderTriggerReject, GridUpdate, Listenkeyexpired, MarginCall, + * ConditionalOrderTriggerReject, GridUpdate, ListenKeyExpired, MarginCall, * OrderTradeUpdate, StrategyUpdate, TradeLite) */ @SuppressWarnings("unchecked") @@ -671,17 +608,6 @@ public AccountConfigUpdate getAccountConfigUpdate() throws ClassCastException { return (AccountConfigUpdate) super.getActualInstance(); } - /** - * Get the actual instance of `AlgoUpdate`. If the actual instance is not `AlgoUpdate`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `AlgoUpdate` - * @throws ClassCastException if the instance is not `AlgoUpdate` - */ - public AlgoUpdate getAlgoUpdate() throws ClassCastException { - return (AlgoUpdate) super.getActualInstance(); - } - /** * Get the actual instance of `AccountUpdate`. If the actual instance is not `AccountUpdate`, * the ClassCastException will be thrown. @@ -693,6 +619,17 @@ public AccountUpdate getAccountUpdate() throws ClassCastException { return (AccountUpdate) super.getActualInstance(); } + /** + * Get the actual instance of `AlgoUpdate`. If the actual instance is not `AlgoUpdate`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `AlgoUpdate` + * @throws ClassCastException if the instance is not `AlgoUpdate` + */ + public AlgoUpdate getAlgoUpdate() throws ClassCastException { + return (AlgoUpdate) super.getActualInstance(); + } + /** * Get the actual instance of `ConditionalOrderTriggerReject`. If the actual instance is not * `ConditionalOrderTriggerReject`, the ClassCastException will be thrown. @@ -716,6 +653,17 @@ public GridUpdate getGridUpdate() throws ClassCastException { return (GridUpdate) super.getActualInstance(); } + /** + * Get the actual instance of `ListenKeyExpired`. If the actual instance is not + * `ListenKeyExpired`, the ClassCastException will be thrown. + * + * @return The actual instance of `ListenKeyExpired` + * @throws ClassCastException if the instance is not `ListenKeyExpired` + */ + public ListenKeyExpired getListenKeyExpired() throws ClassCastException { + return (ListenKeyExpired) super.getActualInstance(); + } + /** * Get the actual instance of `MarginCall`. If the actual instance is not `MarginCall`, the * ClassCastException will be thrown. @@ -760,17 +708,6 @@ public TradeLite getTradeLite() throws ClassCastException { return (TradeLite) super.getActualInstance(); } - /** - * Get the actual instance of `Listenkeyexpired`. If the actual instance is not - * `Listenkeyexpired`, the ClassCastException will be thrown. - * - * @return The actual instance of `Listenkeyexpired` - * @throws ClassCastException if the instance is not `Listenkeyexpired` - */ - public Listenkeyexpired getListenkeyexpired() throws ClassCastException { - return (Listenkeyexpired) super.getActualInstance(); - } - /** * Validates the JSON Element and throws an exception if issues found * @@ -793,24 +730,24 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti e.getMessage())); // continue to the next one } - // validate the json string with AlgoUpdate + // validate the json string with AccountUpdate try { - AlgoUpdate.validateJsonElement(jsonElement); + AccountUpdate.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for AlgoUpdate failed with `%s`.", e.getMessage())); + "Deserialization for AccountUpdate failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with AccountUpdate + // validate the json string with AlgoUpdate try { - AccountUpdate.validateJsonElement(jsonElement); + AlgoUpdate.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for AccountUpdate failed with `%s`.", e.getMessage())); + "Deserialization for AlgoUpdate failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with ConditionalOrderTriggerReject @@ -834,6 +771,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Deserialization for GridUpdate failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with ListenKeyExpired + try { + ListenKeyExpired.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for ListenKeyExpired failed with `%s`.", + e.getMessage())); + // continue to the next one + } // validate the json string with MarginCall try { MarginCall.validateJsonElement(jsonElement); @@ -876,23 +824,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Deserialization for TradeLite failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Listenkeyexpired - try { - Listenkeyexpired.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for Listenkeyexpired failed with `%s`.", - e.getMessage())); - // continue to the next one - } if (validCount != 1) { throw new IOException( String.format( "The JSON string is invalid for UserDataStreamEventsResponse with oneOf" + " schemas: AccountConfigUpdate, AccountUpdate, AlgoUpdate," - + " ConditionalOrderTriggerReject, GridUpdate, Listenkeyexpired," + + " ConditionalOrderTriggerReject, GridUpdate, ListenKeyExpired," + " MarginCall, OrderTradeUpdate, StrategyUpdate, TradeLite. %d" + " class(es) match the result, expected 1. Detailed failure" + " message for oneOf schemas: %s. JSON: %s", diff --git a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/AccountApiTest.java b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/AccountApiTest.java index 10181c292..5d57f6ff0 100644 --- a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/AccountApiTest.java +++ b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/AccountApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -39,6 +39,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetFuturesTradeDownloadLinkByIdResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetFuturesTransactionHistoryDownloadLinkByIdResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetIncomeHistoryResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.IncomeType; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.NotionalAndLeverageBracketsResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.QueryUserRateLimitResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.SymbolConfigurationResponse; @@ -46,6 +47,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ToggleBnbBurnOnFuturesTradeResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.UserCommissionRateResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -97,15 +99,16 @@ public void initApiClient() throws ApiException { } /** - * Account Information V2(USER_DATA) + * Account Information V2 (USER_DATA) * *

Get current account information. User in single-asset/ multi-assets mode will see - * different value, see comments in response section for detail. Weight: 5 + * different value, see comments in response section for detail. Weight(IP): 5 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void accountInformationV2Test() throws ApiException, CryptoException { + public void accountInformationV2Test() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.accountInformationV2(recvWindow); @@ -127,15 +130,16 @@ public void accountInformationV2Test() throws ApiException, CryptoException { } /** - * Account Information V3(USER_DATA) + * Account Information V3 (USER_DATA) * *

Get current account information. User in single-asset/ multi-assets mode will see - * different value, see comments in response section for detail. Weight: 5 + * different value, see comments in response section for detail. Weight(IP): 5 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void accountInformationV3Test() throws ApiException, CryptoException { + public void accountInformationV3Test() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.accountInformationV3(recvWindow); @@ -159,12 +163,12 @@ public void accountInformationV3Test() throws ApiException, CryptoException { /** * Futures Account Balance V2 (USER_DATA) * - *

Query account balance info Weight: 5 + *

Query account balance information. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void futuresAccountBalanceV2Test() throws ApiException, CryptoException { + public void futuresAccountBalanceV2Test() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.futuresAccountBalanceV2(recvWindow); @@ -189,12 +193,12 @@ public void futuresAccountBalanceV2Test() throws ApiException, CryptoException { /** * Futures Account Balance V3 (USER_DATA) * - *

Query account balance info Weight: 5 + *

Query account balance information. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void futuresAccountBalanceV3Test() throws ApiException, CryptoException { + public void futuresAccountBalanceV3Test() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.futuresAccountBalanceV3(recvWindow); @@ -217,14 +221,15 @@ public void futuresAccountBalanceV3Test() throws ApiException, CryptoException { } /** - * Futures Account Configuration(USER_DATA) + * Futures Account Configuration (USER_DATA) * - *

Query account configuration Weight: 5 + *

Query account configuration Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void futuresAccountConfigurationTest() throws ApiException, CryptoException { + public void futuresAccountConfigurationTest() + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.futuresAccountConfiguration(recvWindow); @@ -251,15 +256,16 @@ public void futuresAccountConfigurationTest() throws ApiException, CryptoExcepti * *

Futures trading quantitative rules indicators, for more information on this, please refer * to the [Futures Trading Quantitative - * Rules](https://www.binance.com/en/support/faq/4f462ebe6ff445d4a170be7d9e897272) Weight: - 1 - * for a single symbol - 10 when the symbol parameter is omitted + * Rules](https://www.binance.com/en/support/faq/4f462ebe6ff445d4a170be7d9e897272) Weight: - + * **1** for a single symbol - **10** when the symbol parameter is omitted Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ @Test public void futuresTradingQuantitativeRulesIndicatorsTest() - throws ApiException, CryptoException { - String symbol = ""; + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.futuresTradingQuantitativeRulesIndicators(symbol, recvWindow); @@ -274,22 +280,27 @@ public void futuresTradingQuantitativeRulesIndicatorsTest() Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); + assertEquals( + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); - assertEquals("/fapi/v1/apiTradingStatus", actualRequest.url().encodedPath()); + assertEquals( + "/fapi/v1/apiTradingStatus", + actualRequest.url().encodedPath()); } /** * Get BNB Burn Status (USER_DATA) * - *

Get user's BNB Fee Discount (Fee Discount On or Fee Discount Off ) Weight: 30 + *

Get user's BNB Fee Discount (Fee Discount On or Fee Discount Off ) Weight(IP): 30 + * Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getBnbBurnStatusTest() throws ApiException, CryptoException { + public void getBnbBurnStatusTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getBnbBurnStatus(recvWindow); @@ -305,8 +316,7 @@ public void getBnbBurnStatusTest() throws ApiException, CryptoException { assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/feeBurn", actualRequest.url().encodedPath()); } @@ -314,12 +324,12 @@ public void getBnbBurnStatusTest() throws ApiException, CryptoException { * Get Current Multi-Assets Mode (USER_DATA) * *

Get user's Multi-Assets mode (Multi-Assets Mode or Single-Asset Mode) on ***Every - * symbol*** Weight: 30 + * symbol*** Weight(IP): 30 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getCurrentMultiAssetsModeTest() throws ApiException, CryptoException { + public void getCurrentMultiAssetsModeTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getCurrentMultiAssetsMode(recvWindow); @@ -342,15 +352,15 @@ public void getCurrentMultiAssetsModeTest() throws ApiException, CryptoException } /** - * Get Current Position Mode(USER_DATA) + * Get Current Position Mode (USER_DATA) * - *

Get user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol*** Weight: - * 30 + *

Get user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol*** + * Weight(IP): 30 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getCurrentPositionModeTest() throws ApiException, CryptoException { + public void getCurrentPositionModeTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getCurrentPositionMode(recvWindow); @@ -375,14 +385,15 @@ public void getCurrentPositionModeTest() throws ApiException, CryptoException { /** * Get Download Id For Futures Order History (USER_DATA) * - *

Get Download Id For Futures Order History * Request Limitation is 10 times per month, - * shared by front end download page and rest api * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 1000 + *

Get Download Id For Futures Order History Weight(IP): 1000 Security Type: USER_DATA Notes: + * - Request Limitation is 10 times per month, shared by front end download page and rest api - + * The time between `startTime` and `endTime` can not be longer than 1 year * * @throws ApiException if the Api call fails */ @Test - public void getDownloadIdForFuturesOrderHistoryTest() throws ApiException, CryptoException { + public void getDownloadIdForFuturesOrderHistoryTest() + throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; @@ -400,25 +411,26 @@ public void getDownloadIdForFuturesOrderHistoryTest() throws ApiException, Crypt Request actualRequest = captorValue.request(); assertEquals( - "startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "812caedbe8f349196a4532c2050ff706ed2569fed185039c7b60a78cd84bc718", actualRequest.url().queryParameter("signature")); - assertEquals("/fapi/v1/order/asyn", actualRequest.url().encodedPath()); + assertEquals( + "/fapi/v1/order/asyn", actualRequest.url().encodedPath()); } /** * Get Download Id For Futures Trade History (USER_DATA) * - *

Get download id for futures trade history * Request Limitation is 5 times per month, - * shared by front end download page and rest api * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 1000 + *

Get download id for futures trade history Weight(IP): 1000 Security Type: USER_DATA Notes: + * - Request Limitation is 5 times per month, shared by front end download page and rest api - + * The time between `startTime` and `endTime` can not be longer than 1 year * * @throws ApiException if the Api call fails */ @Test - public void getDownloadIdForFuturesTradeHistoryTest() throws ApiException, CryptoException { + public void getDownloadIdForFuturesTradeHistoryTest() + throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; @@ -436,26 +448,27 @@ public void getDownloadIdForFuturesTradeHistoryTest() throws ApiException, Crypt Request actualRequest = captorValue.request(); assertEquals( - "startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "812caedbe8f349196a4532c2050ff706ed2569fed185039c7b60a78cd84bc718", actualRequest.url().queryParameter("signature")); - assertEquals("/fapi/v1/trade/asyn", actualRequest.url().encodedPath()); + assertEquals( + "/fapi/v1/trade/asyn", actualRequest.url().encodedPath()); } /** - * Get Download Id For Futures Transaction History(USER_DATA) + * Get Download Id For Futures Transaction History (USER_DATA) * - *

Get download id for futures transaction history * Request Limitation is 5 times per month, - * shared by front end download page and rest api * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 1000 + *

Get download id for futures transaction history Weight(IP): 1000 Security Type: USER_DATA + * Notes: - Request Limitation is 5 times per month, shared by front end download page and rest + * api - The time between `startTime` and `endTime` can not be longer than 1 + * year * * @throws ApiException if the Api call fails */ @Test public void getDownloadIdForFuturesTransactionHistoryTest() - throws ApiException, CryptoException { + throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; @@ -478,19 +491,23 @@ public void getDownloadIdForFuturesTransactionHistoryTest() assertEquals( "812caedbe8f349196a4532c2050ff706ed2569fed185039c7b60a78cd84bc718", actualRequest.url().queryParameter("signature")); - assertEquals("/fapi/v1/income/asyn", actualRequest.url().encodedPath()); + assertEquals( + "/fapi/v1/income/asyn", + actualRequest.url().encodedPath()); } /** * Get Futures Order History Download Link by Id (USER_DATA) * - *

Get futures order history download link by Id * Download link expiration: 24h Weight: 10 + *

Get futures order history download link by Id Weight(IP): 10 Security Type: USER_DATA + * Notes: - Download link expiration: 7 days * * @throws ApiException if the Api call fails */ @Test - public void getFuturesOrderHistoryDownloadLinkByIdTest() throws ApiException, CryptoException { - String downloadId = "1"; + public void getFuturesOrderHistoryDownloadLinkByIdTest() + throws ApiException, CryptoException, IOException { + String downloadId = "545923594199212032"; Long recvWindow = 5000L; ApiResponse response = api.getFuturesOrderHistoryDownloadLinkById(downloadId, recvWindow); @@ -506,23 +523,27 @@ public void getFuturesOrderHistoryDownloadLinkByIdTest() throws ApiException, Cr Request actualRequest = captorValue.request(); assertEquals( - "downloadId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + "downloadId=545923594199212032&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); assertEquals( - "4947fe463a17e3ec0b50fc22b21afc2aafddf3da892fa0c8dfd1b9c50af87349", + "638547334c9bc29c0b148d1084ee5f9ba70e01bb0f80f5ab8b59e1b056942563", actualRequest.url().queryParameter("signature")); - assertEquals("/fapi/v1/order/asyn/id", actualRequest.url().encodedPath()); + assertEquals( + "/fapi/v1/order/asyn/id", actualRequest.url().encodedPath()); } /** - * Get Futures Trade Download Link by Id(USER_DATA) + * Get Futures Trade Download Link by Id (USER_DATA) * - *

Get futures trade download link by Id * Download link expiration: 24h Weight: 10 + *

Get futures trade download link by Id Weight(IP): 10 Security Type: USER_DATA Notes: - + * Download link expiration: 7 days * * @throws ApiException if the Api call fails */ @Test - public void getFuturesTradeDownloadLinkByIdTest() throws ApiException, CryptoException { - String downloadId = "1"; + public void getFuturesTradeDownloadLinkByIdTest() + throws ApiException, CryptoException, IOException { + String downloadId = "545923594199212032"; Long recvWindow = 5000L; ApiResponse response = api.getFuturesTradeDownloadLinkById(downloadId, recvWindow); @@ -537,10 +558,9 @@ public void getFuturesTradeDownloadLinkByIdTest() throws ApiException, CryptoExc Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("downloadId=545923594199212032&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "downloadId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "4947fe463a17e3ec0b50fc22b21afc2aafddf3da892fa0c8dfd1b9c50af87349", + "638547334c9bc29c0b148d1084ee5f9ba70e01bb0f80f5ab8b59e1b056942563", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/trade/asyn/id", actualRequest.url().encodedPath()); } @@ -548,15 +568,15 @@ public void getFuturesTradeDownloadLinkByIdTest() throws ApiException, CryptoExc /** * Get Futures Transaction History Download Link by Id (USER_DATA) * - *

Get futures transaction history download link by Id * Download link expiration: 24h - * Weight: 10 + *

Get futures transaction history download link by Id Weight(IP): 10 Security Type: + * USER_DATA Notes: - Download link expiration: 7 days * * @throws ApiException if the Api call fails */ @Test public void getFuturesTransactionHistoryDownloadLinkByIdTest() - throws ApiException, CryptoException { - String downloadId = "1"; + throws ApiException, CryptoException, IOException { + String downloadId = "545923594199212032"; Long recvWindow = 5000L; ApiResponse response = api.getFuturesTransactionHistoryDownloadLinkById(downloadId, recvWindow); @@ -572,31 +592,35 @@ public void getFuturesTransactionHistoryDownloadLinkByIdTest() Request actualRequest = captorValue.request(); assertEquals( - "downloadId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + "downloadId=545923594199212032&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); assertEquals( - "4947fe463a17e3ec0b50fc22b21afc2aafddf3da892fa0c8dfd1b9c50af87349", + "638547334c9bc29c0b148d1084ee5f9ba70e01bb0f80f5ab8b59e1b056942563", actualRequest.url().queryParameter("signature")); - assertEquals("/fapi/v1/income/asyn/id", actualRequest.url().encodedPath()); + assertEquals( + "/fapi/v1/income/asyn/id", + actualRequest.url().encodedPath()); } /** * Get Income History (USER_DATA) * - *

Query income history * If neither `startTime` nor `endTime` is sent, - * the recent 7-day data will be returned. * If `incomeType ` is not sent, all kinds - * of flow will be returned * \"trandId\" is unique in the same incomeType for a user - * * Income history only contains data for the last three months Weight: 30 + *

Query income history Weight(IP): 30 Security Type: USER_DATA Notes: - If `incomeType + * ` is not sent, all kinds of flow will be returned - If `startTime` and + * `endTime` are not sent, the recent 7-day data will be returned. - + * `trandId` is unique in the same `incomeType` for a user. - Income history + * only contains data for the last three months. * * @throws ApiException if the Api call fails */ @Test - public void getIncomeHistoryTest() throws ApiException, CryptoException { - String symbol = ""; - String incomeType = ""; + public void getIncomeHistoryTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + IncomeType incomeType = IncomeType.TRANSFER; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long page = 0L; - Long limit = 100L; + Long page = 1L; + Long limit = 30L; Long recvWindow = 5000L; ApiResponse response = api.getIncomeHistory( @@ -612,25 +636,24 @@ public void getIncomeHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&incomeType=TRANSFER&startTime=1623319461670&endTime=1641782889000&page=1&limit=30&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&incomeType=&startTime=1623319461670&endTime=1641782889000&page=0&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "05f9946fedf735df42817e55ffdc78ca315f60a95c723d2f957b7ce76546ef2e", - actualRequest.url().queryParameter("signature")); + "128f16c42dd66df38dc3a5d0a15371edcdb1bf4c2d103347020dcb40ccb5fb0c", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/income", actualRequest.url().encodedPath()); } /** * Notional and Leverage Brackets (USER_DATA) * - *

Query user notional and leverage bracket on speicfic symbol Weight: 1 + *

Query user notional and leverage bracket on speicfic symbol Weight(IP): 1 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void notionalAndLeverageBracketsTest() throws ApiException, CryptoException { - String symbol = ""; + public void notionalAndLeverageBracketsTest() + throws ApiException, CryptoException, IOException { + String symbol = "ETHUSDT"; Long recvWindow = 5000L; ApiResponse response = api.notionalAndLeverageBrackets(symbol, recvWindow); @@ -645,9 +668,9 @@ public void notionalAndLeverageBracketsTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=ETHUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "c975b46b635be947c7f599863263cb25892ecbaf7b1bf89b64011fc936a9e1ba", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/leverageBracket", actualRequest.url().encodedPath()); } @@ -655,12 +678,12 @@ public void notionalAndLeverageBracketsTest() throws ApiException, CryptoExcepti /** * Query User Rate Limit (USER_DATA) * - *

Query User Rate Limit Weight: 1 + *

Query User Rate Limit Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryUserRateLimitTest() throws ApiException, CryptoException { + public void queryUserRateLimitTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.queryUserRateLimit(recvWindow); @@ -676,21 +699,20 @@ public void queryUserRateLimitTest() throws ApiException, CryptoException { assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/rateLimit/order", actualRequest.url().encodedPath()); } /** - * Symbol Configuration(USER_DATA) + * Symbol Configuration (USER_DATA) * - *

Get current account symbol configuration. Weight: 5 + *

Get current account symbol configuration. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void symbolConfigurationTest() throws ApiException, CryptoException { - String symbol = ""; + public void symbolConfigurationTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.symbolConfiguration(symbol, recvWindow); @@ -705,10 +727,9 @@ public void symbolConfigurationTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", - actualRequest.url().queryParameter("signature")); + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/symbolConfig", actualRequest.url().encodedPath()); } @@ -716,16 +737,16 @@ public void symbolConfigurationTest() throws ApiException, CryptoException { * Toggle BNB Burn On Futures Trade (TRADE) * *

Change user's BNB Fee Discount (Fee Discount On or Fee Discount Off ) on ***EVERY - * symbol*** Weight: 1 + * symbol*** Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void toggleBnbBurnOnFuturesTradeTest() throws ApiException, CryptoException { + public void toggleBnbBurnOnFuturesTradeTest() + throws ApiException, CryptoException, IOException { ToggleBnbBurnOnFuturesTradeRequest toggleBnbBurnOnFuturesTradeRequest = new ToggleBnbBurnOnFuturesTradeRequest(); - - toggleBnbBurnOnFuturesTradeRequest.feeBurn(""); + toggleBnbBurnOnFuturesTradeRequest.feeBurn("true"); ApiResponse response = api.toggleBnbBurnOnFuturesTrade(toggleBnbBurnOnFuturesTradeRequest); @@ -740,9 +761,9 @@ public void toggleBnbBurnOnFuturesTradeTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000feeBurn=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000feeBurn=true", signInputCaptor.getValue()); assertEquals( - "b5185b9009ad5a0346daec6e86f58d6828c88fcc961b7eef5514f9bc0680560d", + "ff5edd18db9807ec9d50a2f885fad95e69ca0853908e5f65793984ea8d85e335", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/feeBurn", actualRequest.url().encodedPath()); } @@ -750,13 +771,13 @@ public void toggleBnbBurnOnFuturesTradeTest() throws ApiException, CryptoExcepti /** * User Commission Rate (USER_DATA) * - *

Get User Commission Rate Weight: 20 + *

Get User Commission Rate Weight(IP): 20 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void userCommissionRateTest() throws ApiException, CryptoException { - String symbol = ""; + public void userCommissionRateTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.userCommissionRate(symbol, recvWindow); @@ -771,10 +792,9 @@ public void userCommissionRateTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", - actualRequest.url().queryParameter("signature")); + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/commissionRate", actualRequest.url().encodedPath()); } } diff --git a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/ConvertApiTest.java b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/ConvertApiTest.java index fdde4d2f5..a274cd6be 100644 --- a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/ConvertApiTest.java +++ b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/ConvertApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -30,6 +30,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.SendQuoteRequestRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.SendQuoteRequestResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -83,15 +84,14 @@ public void initApiClient() throws ApiException { /** * Accept the offered quote (USER_DATA) * - *

Accept the offered quote by quote ID. Weight: 200(IP) + *

Accept the offered quote by quote ID. Weight(IP): 200 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void acceptTheOfferedQuoteTest() throws ApiException, CryptoException { + public void acceptTheOfferedQuoteTest() throws ApiException, CryptoException, IOException { AcceptTheOfferedQuoteRequest acceptTheOfferedQuoteRequest = new AcceptTheOfferedQuoteRequest(); - acceptTheOfferedQuoteRequest.quoteId("1"); ApiResponse response = @@ -117,17 +117,17 @@ public void acceptTheOfferedQuoteTest() throws ApiException, CryptoException { /** * List All Convert Pairs * - *

Query for all convertible token pairs and the tokens’ respective upper/lower limits * User - * needs to supply either or both of the input parameter * If not defined for both fromAsset and - * toAsset, only partial token pairs will be returned * Asset BNFCR is only available to convert - * for MICA region users. Weight: 20(IP) + *

Query for all convertible token pairs and the tokens’ respective upper/lower limits + * Weight(IP): 20 Notes: - User needs to supply either or both of the input parameter - If not + * defined for both fromAsset and toAsset, only partial token pairs will be returned - Asset + * BNFCR is only available to convert for MICA region users. * * @throws ApiException if the Api call fails */ @Test - public void listAllConvertPairsTest() throws ApiException, CryptoException { - String fromAsset = ""; - String toAsset = ""; + public void listAllConvertPairsTest() throws ApiException, CryptoException, IOException { + String fromAsset = "BTC"; + String toAsset = "USDT"; ApiResponse response = api.listAllConvertPairs(fromAsset, toAsset); @@ -138,20 +138,21 @@ public void listAllConvertPairsTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/convert/exchangeInfo", actualRequest.url().encodedPath()); } /** - * Order status(USER_DATA) + * Order status (USER_DATA) * - *

Query order status by order ID. Weight: 50(IP) + *

Query order status by order ID. Weight(IP): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void orderStatusTest() throws ApiException, CryptoException { - Long orderId = 1L; + public void orderStatusTest() throws ApiException, CryptoException, IOException { + String orderId = "933256278426274400"; String quoteId = "1"; ApiResponse response = api.orderStatus(orderId, quoteId); @@ -165,28 +166,25 @@ public void orderStatusTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("orderId=1"eId=1×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "c8ea02b290636497dfc9f4f59d01ea6ceff503bf1955b020615bd7bb133a81c4", - actualRequest.url().queryParameter("signature")); + assertEquals("orderId=933256278426274400"eId=1×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("9e19105826128423d09b9ea712efeef117dd60f49001b56378cdf1e987a582f0", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/convert/orderStatus", actualRequest.url().encodedPath()); } /** - * Send Quote Request(USER_DATA) + * Send Quote Request (USER_DATA) * - *

Request a quote for the requested token pairs * Either fromAmount or toAmount should be - * sent * `quoteId` will be returned only if you have enough funds to convert Weight: - * 50(IP) + *

Request a quote for the requested token pairs Weight: 50(IP) 360/hour, 500/day Security + * Type: USER_DATA Notes: - Either fromAmount or toAmount should be sent - `quoteId` + * will be returned only if you have enough funds to convert * * @throws ApiException if the Api call fails */ @Test - public void sendQuoteRequestTest() throws ApiException, CryptoException { + public void sendQuoteRequestTest() throws ApiException, CryptoException, IOException { SendQuoteRequestRequest sendQuoteRequestRequest = new SendQuoteRequestRequest(); - - sendQuoteRequestRequest.fromAsset(""); - sendQuoteRequestRequest.toAsset(""); + sendQuoteRequestRequest.fromAsset("BTC"); + sendQuoteRequestRequest.toAsset("USDT"); ApiResponse response = api.sendQuoteRequest(sendQuoteRequestRequest); @@ -201,10 +199,9 @@ public void sendQuoteRequestTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000toAsset=&fromAsset=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000toAsset=USDT&fromAsset=BTC", signInputCaptor.getValue()); assertEquals( - "b018f458ed01eaa557ea9adbacf293f684bee81ed29da077d1a5e54a264000c3", - actualRequest.url().queryParameter("signature")); + "f56c7aca9dc41f61b04a4494c9a17280dbfe9f8495368d25aa4397711693af9b", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/convert/getQuote", actualRequest.url().encodedPath()); } } diff --git a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/MarketDataApiTest.java b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/MarketDataApiTest.java index 1836a9502..da02ce8ca 100644 --- a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/MarketDataApiTest.java +++ b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/MarketDataApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,8 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AdlRiskResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AssetIndexResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.BasisResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CheckServerTimeResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CompositeIndexSymbolInformationResponse; @@ -38,7 +40,6 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.LongShortRatioResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.MarkPriceKlineCandlestickDataResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.MarkPriceResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.MultiAssetsModeAssetIndexResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OldTradesLookupResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OpenInterestResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OpenInterestStatisticsResponse; @@ -47,7 +48,9 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.PremiumIndexKlineDataResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.QuarterlyContractSettlementPriceResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.QueryIndexPriceConstituentsResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.QueryInsuranceFundBalanceSnapshotResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.RecentTradesListResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.RpiOrderBookResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.SymbolOrderBookTickerResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.SymbolPriceTickerResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.SymbolPriceTickerV2Response; @@ -55,7 +58,9 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Ticker24hrPriceChangeStatisticsResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.TopTraderLongShortRatioAccountsResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.TopTraderLongShortRatioPositionsResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.TradingScheduleResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -106,17 +111,71 @@ public void initApiClient() throws ApiException { api = new MarketDataApi(apiClientSpy); } + /** + * ADL Risk + * + *

Query the symbol-level ADL risk rating. The ADL risk rating measures the likelihood of ADL + * during liquidation, and the rating takes into account the insurance fund balance, position + * concentration on the symbol, order book depth, price volatility, average leverage, unrealized + * PnL, and margin utilization at the symbol level. The rating can be high, medium and low, and + * is updated every 30 minutes. Weight(IP): 1 + * + * @throws ApiException if the Api call fails + */ + @Test + public void adlRiskTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + ApiResponse response = api.adlRisk(symbol); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals("/fapi/v1/symbolAdlRisk", actualRequest.url().encodedPath()); + } + + /** + * Multi-Assets Mode Asset Index + * + *

Asset index price. > **CM-UM Integration (Effective 2026-06-30):** Renamed from + * *Multi-Assets Mode Asset Index*. The response now additionally pushes COIN-M settlement-asset + * price index entries (e.g., `BTCUSD`, `ETHUSD`, `BNBUSD`). The + * endpoint path `/fapi/v1/assetIndex` is unchanged. Weight: **1** for a single + * symbol; **10** when the symbol parameter is omitted + * + * @throws ApiException if the Api call fails + */ + @Test + public void assetIndexTest() throws ApiException, CryptoException, IOException { + String symbol = "ADAUSD"; + ApiResponse response = api.assetIndex(symbol); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals("/fapi/v1/assetIndex", actualRequest.url().encodedPath()); + } + /** * Basis * - *

Query future basis * If startTime and endTime are not sent, the most recent data is - * returned. * Only the data of the latest 30 days is available. Weight: 0 + *

Query future basis Weight(IP): 0 Notes: - If startTime and endTime are not sent, the most + * recent data is returned. - Only the data of the latest 30 days is available. * * @throws ApiException if the Api call fails */ @Test - public void basisTest() throws ApiException, CryptoException { - String pair = ""; + public void basisTest() throws ApiException, CryptoException, IOException { + String pair = "BTCUSDT"; ContractType contractType = ContractType.PERPETUAL; Period period = Period.PERIOD_5m; Long limit = 30L; @@ -139,12 +198,12 @@ public void basisTest() throws ApiException, CryptoException { /** * Check Server Time * - *

Test connectivity to the Rest API and get the current server time. Weight: 1 + *

Test connectivity to the Rest API and get the current server time. Weight(IP): 1 * * @throws ApiException if the Api call fails */ @Test - public void checkServerTimeTest() throws ApiException, CryptoException { + public void checkServerTimeTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.checkServerTime(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -154,20 +213,23 @@ public void checkServerTimeTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/time", actualRequest.url().encodedPath()); } /** * Composite Index Symbol Information * - *

Query composite index symbol information * Only for composite index symbols Weight: 1 + *

Query composite index symbol information Weight(IP): 1 Notes: - Only for composite index + * symbols * * @throws ApiException if the Api call fails */ @Test - public void compositeIndexSymbolInformationTest() throws ApiException, CryptoException { - String symbol = ""; + public void compositeIndexSymbolInformationTest() + throws ApiException, CryptoException, IOException { + String symbol = "DEFIUSDT"; ApiResponse response = api.compositeIndexSymbolInformation(symbol); @@ -178,7 +240,9 @@ public void compositeIndexSymbolInformationTest() throws ApiException, CryptoExc Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/indexInfo", actualRequest.url().encodedPath()); } @@ -186,25 +250,28 @@ public void compositeIndexSymbolInformationTest() throws ApiException, CryptoExc * Compressed/Aggregate Trades List * *

Get compressed, aggregate market trades. Market trades that fill in 100ms with the same - * price and the same taking side will have the quantity aggregated. * support querying futures - * trade histories that are not older than one year * If both `startTime` and - * `endTime` are sent, time between `startTime` and `endTime` must - * be less than 1 hour. * If `fromId`, `startTime`, and `endTime` - * are not sent, the most recent aggregate trades will be returned. * Only market trades will be - * aggregated and returned, which means the insurance fund trades and ADL trades won't be - * aggregated. * Sending both `startTime`/`endTime` and `fromId` - * might cause response timeout, please send either `fromId` or - * `startTime`/`endTime` Weight: 20 + * price and the same taking side will have the quantity aggregated. Retail Price + * Improvement(RPI) orders are aggregated and without special tags to be distinguished. + * Weight(IP): 20 Notes: - support querying futures trade histories that are not older than 24 + * hours - If both `startTime` and `endTime` are sent, time between + * `startTime` and `endTime` must be less than 1 hour. - If + * `fromId`, `startTime`, and `endTime` are not sent, the most + * recent aggregate trades will be returned. - Only market trades will be aggregated and + * returned, which means the insurance fund trades and ADL trades won't be aggregated. - + * Sending both `startTime`/`endTime` and `fromId` might cause + * response timeout, please send either `fromId` or + * `startTime`/`endTime` * * @throws ApiException if the Api call fails */ @Test - public void compressedAggregateTradesListTest() throws ApiException, CryptoException { - String symbol = ""; + public void compressedAggregateTradesListTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long fromId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; ApiResponse response = api.compressedAggregateTradesList(symbol, fromId, startTime, endTime, limit); @@ -215,7 +282,9 @@ public void compressedAggregateTradesListTest() throws ApiException, CryptoExcep Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/aggTrades", actualRequest.url().encodedPath()); } @@ -223,21 +292,21 @@ public void compressedAggregateTradesListTest() throws ApiException, CryptoExcep * Continuous Contract Kline/Candlestick Data * *

Kline/candlestick bars for a specific contract type. Klines are uniquely identified by - * their open time. * If startTime and endTime are not sent, the most recent klines are - * returned. * Contract type: * PERPETUAL * CURRENT_QUARTER * NEXT_QUARTER Weight: based on - * parameter LIMIT | LIMIT | weight | | ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 - * | | [500, 1000] | 5 | | > 1000 | 10 | + * their open time. Weight: based on parameter `LIMIT` | LIMIT | weight | | + * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | + * 10 | Notes: - If startTime and endTime are not sent, the most recent klines are returned. * * @throws ApiException if the Api call fails */ @Test - public void continuousContractKlineCandlestickDataTest() throws ApiException, CryptoException { - String pair = ""; + public void continuousContractKlineCandlestickDataTest() + throws ApiException, CryptoException, IOException { + String pair = "BTCUSDT"; ContractType contractType = ContractType.PERPETUAL; Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; ApiResponse response = api.continuousContractKlineCandlestickData( pair, contractType, interval, startTime, endTime, limit); @@ -249,19 +318,22 @@ public void continuousContractKlineCandlestickDataTest() throws ApiException, Cr Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); - assertEquals("/fapi/v1/continuousKlines", actualRequest.url().encodedPath()); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); + assertEquals( + "/fapi/v1/continuousKlines", actualRequest.url().encodedPath()); } /** * Exchange Information * - *

Current exchange trading rules and symbol information Weight: 1 + *

Current exchange trading rules and symbol information Weight(IP): 1 * * @throws ApiException if the Api call fails */ @Test - public void exchangeInformationTest() throws ApiException, CryptoException { + public void exchangeInformationTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.exchangeInformation(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -271,27 +343,28 @@ public void exchangeInformationTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/exchangeInfo", actualRequest.url().encodedPath()); } /** * Get Funding Rate History * - *

Get Funding Rate History * If `startTime` and `endTime` are not sent, - * the most recent `limit` datas are returned. * If the number of data between + *

Get Funding Rate History Weight: share 500/5min/IP rate limit with GET + * /fapi/v1/fundingInfo Notes: - If `startTime` and `endTime` are not sent, + * the most recent 200 records are returned. - If the number of data between * `startTime` and `endTime` is larger than `limit`, return as - * `startTime` + `limit`. * In ascending order. Weight: share 500/5min/IP - * rate limit with GET /fapi/v1/fundingInfo + * `startTime` + `limit`. - In ascending order. * * @throws ApiException if the Api call fails */ @Test - public void getFundingRateHistoryTest() throws ApiException, CryptoException { - String symbol = ""; + public void getFundingRateHistoryTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; ApiResponse response = api.getFundingRateHistory(symbol, startTime, endTime, limit); @@ -302,21 +375,23 @@ public void getFundingRateHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/fundingRate", actualRequest.url().encodedPath()); } /** * Get Funding Rate Info * - *

Query funding rate info for symbols that had FundingRateCap/ FundingRateFloor / - * fundingIntervalHours adjustment Weight: 0 share 500/5min/IP rate limit with GET - * /fapi/v1/fundingInfo + *

Query funding rate info for symbols that had FundingRateCap/FundingRateFloor / + * fundingIntervalHours adjustment Weight: **0** share 500/5min/IP rate limit with `GET + * /fapi/v1/fundingRate` * * @throws ApiException if the Api call fails */ @Test - public void getFundingRateInfoTest() throws ApiException, CryptoException { + public void getFundingRateInfoTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.getFundingRateInfo(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -326,7 +401,8 @@ public void getFundingRateInfoTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/fundingInfo", actualRequest.url().encodedPath()); } @@ -334,19 +410,20 @@ public void getFundingRateInfoTest() throws ApiException, CryptoException { * Index Price Kline/Candlestick Data * *

Kline/candlestick bars for the index price of a pair. Klines are uniquely identified by - * their open time. * If startTime and endTime are not sent, the most recent klines are - * returned. Weight: based on parameter LIMIT | LIMIT | weight | | ----------- | ------ | | - * [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | + * their open time. Weight: based on parameter `LIMIT` | LIMIT | weight | | + * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | + * 10 | Notes: - If startTime and endTime are not sent, the most recent klines are returned. * * @throws ApiException if the Api call fails */ @Test - public void indexPriceKlineCandlestickDataTest() throws ApiException, CryptoException { - String pair = ""; + public void indexPriceKlineCandlestickDataTest() + throws ApiException, CryptoException, IOException { + String pair = "BTCUSDT"; Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; ApiResponse response = api.indexPriceKlineCandlestickData(pair, interval, startTime, endTime, limit); @@ -357,27 +434,29 @@ public void indexPriceKlineCandlestickDataTest() throws ApiException, CryptoExce Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/indexPriceKlines", actualRequest.url().encodedPath()); } /** * Kline/Candlestick Data * - *

Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. * - * If startTime and endTime are not sent, the most recent klines are returned. Weight: based on - * parameter LIMIT | LIMIT | weight | | ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 - * | | [500, 1000] | 5 | | > 1000 | 10 | + *

Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. + * Weight: based on parameter `LIMIT` | LIMIT | weight | | ----------- | ------ | | + * [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - If startTime + * and endTime are not sent, the most recent klines are returned. * * @throws ApiException if the Api call fails */ @Test - public void klineCandlestickDataTest() throws ApiException, CryptoException { - String symbol = ""; + public void klineCandlestickDataTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; ApiResponse response = api.klineCandlestickData(symbol, interval, startTime, endTime, limit); @@ -388,24 +467,26 @@ public void klineCandlestickDataTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/klines", actualRequest.url().encodedPath()); } /** * Long/Short Ratio * - *

Query symbol Long/Short Ratio * If startTime and endTime are not sent, the most recent - * data is returned. * Only the data of the latest 30 days is available. * IP rate limit 1000 - * requests/5min Weight: 0 + *

Query symbol Long/Short Ratio Weight(IP): 0 Notes: - If startTime and endTime are not + * sent, the most recent data is returned. - Only the data of the latest 30 days is available. - + * IP rate limit 1000 requests/5min * * @throws ApiException if the Api call fails */ @Test - public void longShortRatioTest() throws ApiException, CryptoException { - String symbol = ""; + public void longShortRatioTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 50L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = @@ -419,20 +500,19 @@ public void longShortRatioTest() throws ApiException, CryptoException { Request actualRequest = captorValue.request(); assertEquals(null, actualRequest.url().queryParameter("signature")); - assertEquals( - "/futures/data/globalLongShortAccountRatio", actualRequest.url().encodedPath()); + assertEquals("/futures/data/globalLongShortAccountRatio", actualRequest.url().encodedPath()); } /** * Mark Price * - *

Mark Price and Funding Rate Weight: 1 + *

Mark Price and Funding Rate Weight: **1** with symbol, **10** without symbol * * @throws ApiException if the Api call fails */ @Test - public void markPriceTest() throws ApiException, CryptoException { - String symbol = ""; + public void markPriceTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; ApiResponse response = api.markPrice(symbol); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -450,19 +530,20 @@ public void markPriceTest() throws ApiException, CryptoException { * Mark Price Kline/Candlestick Data * *

Kline/candlestick bars for the mark price of a symbol. Klines are uniquely identified by - * their open time. * If startTime and endTime are not sent, the most recent klines are - * returned. Weight: based on parameter LIMIT | LIMIT | weight | | ----------- | ------ | | - * [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | + * their open time. Weight: based on parameter `LIMIT` | LIMIT | weight | | + * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | + * 10 | Notes: - If startTime and endTime are not sent, the most recent klines are returned. * * @throws ApiException if the Api call fails */ @Test - public void markPriceKlineCandlestickDataTest() throws ApiException, CryptoException { - String symbol = ""; + public void markPriceKlineCandlestickDataTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; ApiResponse response = api.markPriceKlineCandlestickData(symbol, interval, startTime, endTime, limit); @@ -473,48 +554,26 @@ public void markPriceKlineCandlestickDataTest() throws ApiException, CryptoExcep Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/markPriceKlines", actualRequest.url().encodedPath()); } - /** - * Multi-Assets Mode Asset Index - * - *

asset index for Multi-Assets mode Weight: 1 for a single symbol; 10 when the symbol - * parameter is omitted - * - * @throws ApiException if the Api call fails - */ - @Test - public void multiAssetsModeAssetIndexTest() throws ApiException, CryptoException { - String symbol = ""; - ApiResponse response = - api.multiAssetsModeAssetIndex(symbol); - - ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); - Mockito.verify(apiClientSpy) - .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); - - Call captorValue = callArgumentCaptor.getValue(); - Request actualRequest = captorValue.request(); - - assertEquals(null, actualRequest.url().queryParameter("signature")); - assertEquals("/fapi/v1/assetIndex", actualRequest.url().encodedPath()); - } - /** * Old Trades Lookup (MARKET_DATA) * - *

Get older market historical trades. * Market trades means trades filled in the order book. - * Only market trades will be returned, which means the insurance fund trades and ADL trades - * won't be returned. * Only supports data from within the last three months Weight: 20 + *

Get older market historical trades. Weight(IP): 20 Security Type: MARKET_DATA Notes: - + * Market trades means trades filled in the order book. Only market trades will be returned, + * which means the insurance fund trades and ADL trades won't be returned. - Only supports + * data from within the last one month * * @throws ApiException if the Api call fails */ @Test - public void oldTradesLookupTest() throws ApiException, CryptoException { - String symbol = ""; - Long limit = 100L; + public void oldTradesLookupTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long limit = 50L; Long fromId = 1L; ApiResponse response = api.oldTradesLookup(symbol, limit, fromId); @@ -525,20 +584,21 @@ public void oldTradesLookupTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/historicalTrades", actualRequest.url().encodedPath()); } /** * Open Interest * - *

Get present open interest of a specific symbol. Weight: 1 + *

Get present open interest of a specific symbol. Weight(IP): 1 * * @throws ApiException if the Api call fails */ @Test - public void openInterestTest() throws ApiException, CryptoException { - String symbol = ""; + public void openInterestTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; ApiResponse response = api.openInterest(symbol); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -555,17 +615,17 @@ public void openInterestTest() throws ApiException, CryptoException { /** * Open Interest Statistics * - *

Open Interest Statistics * If startTime and endTime are not sent, the most recent data is - * returned. * Only the data of the latest 1 month is available. * IP rate limit 1000 - * requests/5min Weight: 0 + *

Open Interest Statistics Weight(IP): 0 Notes: - If startTime and endTime are not sent, the + * most recent data is returned. - Only the data of the latest 1 month is available. - IP rate + * limit 1000 requests/5min * * @throws ApiException if the Api call fails */ @Test - public void openInterestStatisticsTest() throws ApiException, CryptoException { - String symbol = ""; + public void openInterestStatisticsTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 50L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = @@ -578,22 +638,25 @@ public void openInterestStatisticsTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/futures/data/openInterestHist", actualRequest.url().encodedPath()); } /** * Order Book * - *

Query symbol orderbook Weight: Adjusted based on the limit: | Limit | Weight | | + *

Query symbol orderbook Retail Price Improvement(RPI) orders are not visible and excluded + * in the response message. Weight: Adjusted based on the limit: | Limit | Weight | | * ------------- | ------ | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | 20 | * * @throws ApiException if the Api call fails */ @Test - public void orderBookTest() throws ApiException, CryptoException { - String symbol = ""; - Long limit = 100L; + public void orderBookTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long limit = 50L; ApiResponse response = api.orderBook(symbol, limit); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -610,20 +673,20 @@ public void orderBookTest() throws ApiException, CryptoException { /** * Premium index Kline Data * - *

Premium index kline bars of a symbol. Klines are uniquely identified by their open time. * - * If startTime and endTime are not sent, the most recent klines are returned. Weight: based on - * parameter LIMIT | LIMIT | weight | | ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 - * | | [500, 1000] | 5 | | > 1000 | 10 | + *

Premium index kline bars of a symbol. Klines are uniquely identified by their open time. + * Weight: based on parameter `LIMIT` | LIMIT | weight | | ----------- | ------ | | + * [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - If startTime + * and endTime are not sent, the most recent klines are returned. * * @throws ApiException if the Api call fails */ @Test - public void premiumIndexKlineDataTest() throws ApiException, CryptoException { - String symbol = ""; + public void premiumIndexKlineDataTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; ApiResponse response = api.premiumIndexKlineData(symbol, interval, startTime, endTime, limit); @@ -634,20 +697,23 @@ public void premiumIndexKlineDataTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/premiumIndexKlines", actualRequest.url().encodedPath()); } /** * Quarterly Contract Settlement Price * - *

Latest price for a symbol or symbols. Weight: 0 + *

Latest price for a symbol or symbols. Weight(IP): 0 * * @throws ApiException if the Api call fails */ @Test - public void quarterlyContractSettlementPriceTest() throws ApiException, CryptoException { - String pair = ""; + public void quarterlyContractSettlementPriceTest() + throws ApiException, CryptoException, IOException { + String pair = "BTCUSDT"; ApiResponse response = api.quarterlyContractSettlementPrice(pair); @@ -658,20 +724,24 @@ public void quarterlyContractSettlementPriceTest() throws ApiException, CryptoEx Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/futures/data/delivery-price", actualRequest.url().encodedPath()); } /** * Query Index Price Constituents * - *

Query index price constituents Weight: 2 + *

Query index price constituents **Note**: Prices from constituents of TradFi perps will be + * hiden and displayed as -1. Weight(IP): 2 * * @throws ApiException if the Api call fails */ @Test - public void queryIndexPriceConstituentsTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryIndexPriceConstituentsTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; ApiResponse response = api.queryIndexPriceConstituents(symbol); @@ -682,23 +752,52 @@ public void queryIndexPriceConstituentsTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/constituents", actualRequest.url().encodedPath()); } + /** + * Query Insurance Fund Balance Snapshot + * + *

Query Insurance Fund Balance Snapshot Weight(IP): 1 + * + * @throws ApiException if the Api call fails + */ + @Test + public void queryInsuranceFundBalanceSnapshotTest() + throws ApiException, CryptoException, IOException { + String symbol = "BNBUSDT"; + ApiResponse response = + api.queryInsuranceFundBalanceSnapshot(symbol); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + null, + actualRequest.url().queryParameter("signature")); + assertEquals("/fapi/v1/insuranceBalance", actualRequest.url().encodedPath()); + } + /** * Recent Trades List * - *

Get recent market trades * Market trades means trades filled in the order book. Only - * market trades will be returned, which means the insurance fund trades and ADL trades - * won't be returned. Weight: 5 + *

Get recent market trades Weight(IP): 5 Notes: - Market trades means trades filled in the + * order book. Only market trades will be returned, which means the insurance fund trades and + * ADL trades won't be returned. * * @throws ApiException if the Api call fails */ @Test - public void recentTradesListTest() throws ApiException, CryptoException { - String symbol = ""; - Long limit = 100L; + public void recentTradesListTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long limit = 50L; ApiResponse response = api.recentTradesList(symbol, limit); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -708,23 +807,52 @@ public void recentTradesListTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/trades", actualRequest.url().encodedPath()); } + /** + * RPI Order Book + * + *

Query symbol orderbook with RPI orders RPI(Retail Price Improvement) orders are included + * and aggreated in the response message. Crossed price levels are hidden and invisible. Weight: + * Adjusted based on the limit: | Limit | Weight | | ------------- | ------ | | 1000 | 20 | + * + * @throws ApiException if the Api call fails + */ + @Test + public void rpiOrderBookTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long limit = 1000L; + ApiResponse response = api.rpiOrderBook(symbol, limit); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals("/fapi/v1/rpiDepth", actualRequest.url().encodedPath()); + } + /** * Symbol Order Book Ticker * - *

Best price/qty on the order book for a symbol or symbols. * If the symbol is not sent, - * bookTickers for all symbols will be returned in an array. * The field + *

Best price/qty on the order book for a symbol or symbols. Retail Price Improvement(RPI) + * orders are not visible and excluded in the response message. Weight: **2** for a single + * symbol; **5** when the symbol parameter is omitted Notes: - If the symbol is not sent, + * bookTickers for all symbols will be returned in an array. - The field * `X-MBX-USED-WEIGHT-1M` in response header is not accurate from this endpoint, - * please ignore. Weight: 2 for a single symbol; 5 when the symbol parameter is omitted + * please ignore. * * @throws ApiException if the Api call fails */ @Test - public void symbolOrderBookTickerTest() throws ApiException, CryptoException { - String symbol = ""; + public void symbolOrderBookTickerTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; ApiResponse response = api.symbolOrderBookTicker(symbol); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -734,22 +862,24 @@ public void symbolOrderBookTickerTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/ticker/bookTicker", actualRequest.url().encodedPath()); } /** * Symbol Price Ticker * - *

Latest price for a symbol or symbols. * If the symbol is not sent, prices for all symbols - * will be returned in an array. Weight: 1 for a single symbol; 2 when the symbol parameter is - * omitted + *

Latest price for a symbol or symbols. Weight: 1 for a single symbol; 2 when the symbol + * parameter is omitted Notes: - If the symbol is not sent, prices for all symbols will be + * returned in an array. * * @throws ApiException if the Api call fails */ @Test - public void symbolPriceTickerTest() throws ApiException, CryptoException { - String symbol = ""; + public void symbolPriceTickerTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; ApiResponse response = api.symbolPriceTicker(symbol); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -759,23 +889,24 @@ public void symbolPriceTickerTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/ticker/price", actualRequest.url().encodedPath()); } /** * Symbol Price Ticker V2 * - *

Latest price for a symbol or symbols. * If the symbol is not sent, prices for all symbols - * will be returned in an array. * The field `X-MBX-USED-WEIGHT-1M` in response header - * is not accurate from this endpoint, please ignore. Weight: 1 for a single symbol; 2 when the - * symbol parameter is omitted + *

Latest price for a symbol or symbols. Weight: 1 for a single symbol; 2 when the symbol + * parameter is omitted Notes: - If the symbol is not sent, prices for all symbols will be + * returned in an array. - The field `X-MBX-USED-WEIGHT-1M` in response header is not + * accurate from this endpoint, please ignore. * * @throws ApiException if the Api call fails */ @Test - public void symbolPriceTickerV2Test() throws ApiException, CryptoException { - String symbol = ""; + public void symbolPriceTickerV2Test() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; ApiResponse response = api.symbolPriceTickerV2(symbol); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -785,24 +916,25 @@ public void symbolPriceTickerV2Test() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v2/ticker/price", actualRequest.url().encodedPath()); } /** * Taker Buy/Sell Volume * - *

Taker Buy/Sell Volume * If startTime and endTime are not sent, the most recent data is - * returned. * Only the data of the latest 30 days is available. * IP rate limit 1000 - * requests/5min Weight: 0 + *

Taker Buy/Sell Volume Weight(IP): 0 Notes: - If startTime and endTime are not sent, the + * most recent data is returned. - Only the data of the latest 30 days is available. - IP rate + * limit 1000 requests/5min * * @throws ApiException if the Api call fails */ @Test - public void takerBuySellVolumeTest() throws ApiException, CryptoException { - String symbol = ""; + public void takerBuySellVolumeTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 50L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = @@ -815,19 +947,20 @@ public void takerBuySellVolumeTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/futures/data/takerlongshortRatio", actualRequest.url().encodedPath()); } /** * Test Connectivity * - *

Test connectivity to the Rest API. Weight: 1 + *

Test connectivity to the Rest API. Weight(IP): 1 * * @throws ApiException if the Api call fails */ @Test - public void testConnectivityTest() throws ApiException, CryptoException { + public void testConnectivityTest() throws ApiException, CryptoException, IOException { api.testConnectivity(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -836,7 +969,8 @@ public void testConnectivityTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/ping", actualRequest.url().encodedPath()); } @@ -844,14 +978,15 @@ public void testConnectivityTest() throws ApiException, CryptoException { * 24hr Ticker Price Change Statistics * *

24 hour rolling window price change statistics. **Careful** when accessing this with no - * symbol. * If the symbol is not sent, tickers for all symbols will be returned in an array. - * Weight: 1 for a single symbol; 40 when the symbol parameter is omitted + * symbol. Weight: **1** for a single symbol; **40** when the symbol parameter is omitted Notes: + * - If the symbol is not sent, tickers for all symbols will be returned in an array. * * @throws ApiException if the Api call fails */ @Test - public void ticker24hrPriceChangeStatisticsTest() throws ApiException, CryptoException { - String symbol = ""; + public void ticker24hrPriceChangeStatisticsTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; ApiResponse response = api.ticker24hrPriceChangeStatistics(symbol); @@ -862,29 +997,32 @@ public void ticker24hrPriceChangeStatisticsTest() throws ApiException, CryptoExc Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/ticker/24hr", actualRequest.url().encodedPath()); } /** - * Top Trader Long/Short Ratio (Accounts) + * Top Trader Long/Short Account Ratio (MARKET_DATA) * *

The proportion of net long and net short accounts to total accounts of the top 20% users * with the highest margin balance. Each account is counted once only. Long Account % = * Accounts of top traders with net long positions / Total accounts of top traders with open * positions Short Account % = Accounts of top traders with net short positions / Total * accounts of top traders with open positions Long/Short Ratio (Accounts) = Long Account % - * / Short Account % * If startTime and endTime are not sent, the most recent data is returned. - * * Only the data of the latest 30 days is available. * IP rate limit 1000 requests/5min - * Weight: 0 + * / Short Account % Security Type: MARKET_DATA Notes: - If startTime and endTime are not sent, + * the most recent data is returned. - Only the data of the latest 30 days is available. - IP + * rate limit 1000 requests/5min * * @throws ApiException if the Api call fails */ @Test - public void topTraderLongShortRatioAccountsTest() throws ApiException, CryptoException { - String symbol = ""; + public void topTraderLongShortRatioAccountsTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 50L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = @@ -897,28 +1035,31 @@ public void topTraderLongShortRatioAccountsTest() throws ApiException, CryptoExc Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/futures/data/topLongShortAccountRatio", actualRequest.url().encodedPath()); } /** - * Top Trader Long/Short Ratio (Positions) + * Top Trader Long/Short Position Ratio (MARKET_DATA) * *

The proportion of net long and net short positions to total open positions of the top 20% * users with the highest margin balance. Long Position % = Long positions of top traders / * Total open positions of top traders Short Position % = Short positions of top traders / * Total open positions of top traders Long/Short Ratio (Positions) = Long Position % / - * Short Position % * If startTime and endTime are not sent, the most recent data is returned. * - * Only the data of the latest 30 days is available. * IP rate limit 1000 requests/5min Weight: - * 0 + * Short Position % Weight(IP): 0 Security Type: MARKET_DATA Notes: - If startTime and endTime + * are not sent, the most recent data is returned. - Only the data of the latest 30 days is + * available. - IP rate limit 1000 requests/5min * * @throws ApiException if the Api call fails */ @Test - public void topTraderLongShortRatioPositionsTest() throws ApiException, CryptoException { - String symbol = ""; + public void topTraderLongShortRatioPositionsTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 50L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = @@ -931,7 +1072,38 @@ public void topTraderLongShortRatioPositionsTest() throws ApiException, CryptoEx Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/futures/data/topLongShortPositionRatio", actualRequest.url().encodedPath()); } + + /** + * Trading Schedule + * + *

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 and the commodity 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\". Weight(IP): 5 + * + * @throws ApiException if the Api call fails + */ + @Test + public void tradingScheduleTest() throws ApiException, CryptoException, IOException { + ApiResponse response = api.tradingSchedule(); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + null, actualRequest.url().queryParameter("signature")); + assertEquals("/fapi/v1/tradingSchedule", actualRequest.url().encodedPath()); + } } diff --git a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/PortfolioMarginEndpointsApiTest.java b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/PortfolioMarginEndpointsApiTest.java index 63c5ed5e0..7f811d174 100644 --- a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/PortfolioMarginEndpointsApiTest.java +++ b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/PortfolioMarginEndpointsApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -25,6 +25,7 @@ import com.binance.connector.client.common.sign.SignatureGenerator; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ClassicPortfolioMarginAccountInformationResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -78,15 +79,15 @@ public void initApiClient() throws ApiException { /** * Classic Portfolio Margin Account Information (USER_DATA) * - *

Get Classic Portfolio Margin current account information. * maxWithdrawAmount is for asset - * transfer out to the spot wallet. Weight: 5 + *

Get Classic Portfolio Margin current account information. Weight(IP): 5 Security Type: + * USER_DATA Notes: - maxWithdrawAmount is for asset transfer out to the spot wallet. * * @throws ApiException if the Api call fails */ @Test public void classicPortfolioMarginAccountInformationTest() - throws ApiException, CryptoException { - String asset = ""; + throws ApiException, CryptoException, IOException { + String asset = "BTC"; Long recvWindow = 5000L; ApiResponse response = api.classicPortfolioMarginAccountInformation(asset, recvWindow); @@ -101,10 +102,14 @@ public void classicPortfolioMarginAccountInformationTest() Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("asset=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "a8610b861691761550acea81c71e6fe676ac39bd2020c66ff1115710eaf265a4", + "asset=BTC&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); + assertEquals( + "34cb82e49b7593f1656dc5e9f9c353c60ac924411707c46e3d5a527235965fe5", actualRequest.url().queryParameter("signature")); - assertEquals("/fapi/v1/pmAccountInfo", actualRequest.url().encodedPath()); + assertEquals( + "/fapi/v1/pmAccountInfo", + actualRequest.url().encodedPath()); } } diff --git a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/TradeApiTest.java b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/TradeApiTest.java index 1a1bbd6be..ec7b588ac 100644 --- a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/TradeApiTest.java +++ b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/TradeApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -24,12 +24,14 @@ import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AccountTradeListResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AlgoType; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AllOrdersResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AutoCancelAllOpenOrdersRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AutoCancelAllOpenOrdersResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AutoCloseType; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.BatchOrders; -import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.BatchOrdersPlaceMultipleOrders; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CancelAlgoOrderResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CancelAllAlgoOpenOrdersResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CancelAllOpenOrdersResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CancelMultipleOrdersResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CancelOrderResponse; @@ -41,7 +43,10 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ChangeMultiAssetsModeResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ChangePositionModeRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ChangePositionModeResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CurrentAllAlgoOpenOrdersResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CurrentAllOpenOrdersResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.FuturesTradfiPerpsContractRequest; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.FuturesTradfiPerpsContractResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetOrderModifyHistoryResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetPositionMarginChangeHistoryResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.MarginType; @@ -51,15 +56,20 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ModifyMultipleOrdersResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ModifyOrderRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ModifyOrderResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.NewAlgoOrderRequest; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.NewAlgoOrderResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.NewOrderRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.NewOrderResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OrderIdList; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OrderType; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OrigClientOrderIdList; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.PlaceMultipleOrdersRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.PlaceMultipleOrdersResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.PositionAdlQuantileEstimationResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.PositionInformationV2Response; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.PositionInformationV3Response; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.QueryAlgoOrderResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.QueryAllAlgoOrdersResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.QueryCurrentOpenOrderResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.QueryOrderResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Side; @@ -67,6 +77,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.TestOrderResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.UsersForceOrdersResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -120,22 +131,23 @@ public void initApiClient() throws ApiException { /** * Account Trade List (USER_DATA) * - *

Get trades for a specific account and symbol. * If `startTime` and - * `endTime` are both not sent, then the last 7 days' data will be returned. * The - * time between `startTime` and `endTime` cannot be longer than 7 days. * - * The parameter `fromId` cannot be sent with `startTime` or - * `endTime`. * Only support querying trade in the past 6 months Weight: 5 + *

Get trades for a specific account and symbol. Weight(IP): 5 Security Type: USER_DATA + * Notes: - If `startTime` and `endTime` are both not sent, then the last 7 + * days' data will be returned. - The time between `startTime` and + * `endTime` cannot be longer than 7 days. - The parameter `fromId` cannot + * be sent with `startTime` or `endTime`. - Only support querying trade in + * the past 6 months * * @throws ApiException if the Api call fails */ @Test - public void accountTradeListTest() throws ApiException, CryptoException { - String symbol = ""; - Long orderId = 1L; + public void accountTradeListTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long orderId = 25851813L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long fromId = 1L; - Long limit = 100L; + Long limit = 50L; Long recvWindow = 5000L; ApiResponse response = api.accountTradeList( @@ -151,34 +163,31 @@ public void accountTradeListTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&orderId=25851813&startTime=1623319461670&endTime=1641782889000&fromId=1&limit=50&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&orderId=1&startTime=1623319461670&endTime=1641782889000&fromId=1&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "10058794572cc782968aa3d3e6b73a369146898e471235e8712344dea70cb4d5", - actualRequest.url().queryParameter("signature")); + "112d12a3f2bb41fde16926832816f97757883ecc80d0f834949e1455af98cf60", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/userTrades", actualRequest.url().encodedPath()); } /** * All Orders (USER_DATA) * - *

Get all account orders; active, canceled, or filled. * These orders will not be found: * + *

Get all account orders; active, canceled, or filled. - These orders will not be found: - * order status is `CANCELED` or `EXPIRED` **AND** order has NO filled trade - * **AND** created time + 3 days < current time * order create time + 90 days < current - * time * If `orderId` is set, it will get orders >= that `orderId`. - * Otherwise most recent orders are returned. * The query time period must be less then 7 days( - * default as the recent 7 days). Weight: 5 + * **AND** created time + 3 days < current time - order create time + 90 days < current + * time Weight(IP): 5 Security Type: USER_DATA Notes: - If `orderId` is set, it will + * get orders >= that `orderId`. Otherwise most recent orders are returned. - + * The query time period must be less then 7 days( default as the recent 7 days). * * @throws ApiException if the Api call fails */ @Test - public void allOrdersTest() throws ApiException, CryptoException { - String symbol = ""; - Long orderId = 1L; + public void allOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long orderId = 1917641L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; Long recvWindow = 5000L; ApiResponse response = api.allOrders(symbol, orderId, startTime, endTime, limit, recvWindow); @@ -193,12 +202,8 @@ public void allOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "symbol=&orderId=1&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "dc0808314025fc813dcde0328cd6754c982d28888760fc74b17e072087eb4895", - actualRequest.url().queryParameter("signature")); + assertEquals("symbol=BTCUSDT&orderId=1917641&startTime=1623319461670&endTime=1641782889000&limit=50&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("d1a057b71926be10598d9bb88b1a716b0993682423d8051ddf297fee99c72ed2", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/allOrders", actualRequest.url().encodedPath()); } @@ -207,23 +212,22 @@ public void allOrdersTest() throws ApiException, CryptoException { * *

Cancel all open orders of the specified symbol at the end of the specified countdown. The * endpoint should be called repeatedly as heartbeats so that the existing countdown time can be - * canceled and replaced by a new one. * Example usage: Call this endpoint at 30s intervals with + * canceled and replaced by a new one. Example usage: Call this endpoint at 30s intervals with * an countdownTime of 120000 (120s). If this endpoint is not called within 120 seconds, all * your orders of the specified symbol will be automatically canceled. If this endpoint is * called with an countdownTime of 0, the countdown timer will be stopped. The system will check * all countdowns **approximately every 10 milliseconds**, so please note that sufficient * redundancy should be considered when using this function. We do not recommend setting the - * countdown time to be too precise or too small. Weight: 10 + * countdown time to be too precise or too small. Weight(IP): 10 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void autoCancelAllOpenOrdersTest() throws ApiException, CryptoException { + public void autoCancelAllOpenOrdersTest() throws ApiException, CryptoException, IOException { AutoCancelAllOpenOrdersRequest autoCancelAllOpenOrdersRequest = new AutoCancelAllOpenOrdersRequest(); - - autoCancelAllOpenOrdersRequest.symbol(""); - autoCancelAllOpenOrdersRequest.countdownTime(0L); + autoCancelAllOpenOrdersRequest.symbol("BTCUSDT"); + autoCancelAllOpenOrdersRequest.countdownTime(1000L); ApiResponse response = api.autoCancelAllOpenOrders(autoCancelAllOpenOrdersRequest); @@ -238,23 +242,88 @@ public void autoCancelAllOpenOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000symbol=&countdownTime=0", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&countdownTime=1000", signInputCaptor.getValue()); assertEquals( - "42826e2320d45fba6a83c5a5da223ab9f7e622a05303b8d5507c99448d3a0a88", + "e9bb86a708dfe5349c8752b9067b4dafed68fce404096ea4cbe783bcea370bdc", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/countdownCancelAll", actualRequest.url().encodedPath()); } + /** + * Cancel Algo Order (TRADE) + * + *

Cancel an active algo (conditional) order, including TP/SL (Take Profit / Stop Loss) and + * trailing stop orders on USD-M Futures. Weight(IP): 1 Security Type: TRADE Notes: - Either + * `algoId` or `clientAlgoId` must be sent. + * + * @throws ApiException if the Api call fails + */ + @Test + public void cancelAlgoOrderTest() throws ApiException, CryptoException, IOException { + Long algoId = 2146760L; + String clientAlgoId = "6B2I9XVcJpCjqPAJ4YoFX7"; + Long recvWindow = 5000L; + ApiResponse response = + api.cancelAlgoOrder(algoId, clientAlgoId, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("algoId=2146760&clientAlgoId=6B2I9XVcJpCjqPAJ4YoFX7&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "87096ab0f7ef63c753df68f8402162e99b54653f0b45ee1736f9b9f8b1ff7160", actualRequest.url().queryParameter("signature")); + assertEquals("/fapi/v1/algoOrder", actualRequest.url().encodedPath()); + } + + /** + * Cancel All Algo Open Orders (TRADE) + * + *

Cancel all open algo (conditional) orders on a symbol, including TP/SL (Take Profit / Stop + * Loss) and trailing stop orders on USD-M Futures. Weight(IP): 1 Security Type: TRADE + * + * @throws ApiException if the Api call fails + */ + @Test + public void cancelAllAlgoOpenOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long recvWindow = 5000L; + ApiResponse response = + api.cancelAllAlgoOpenOrders(symbol, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", + actualRequest.url().queryParameter("signature")); + assertEquals("/fapi/v1/algoOpenOrders", actualRequest.url().encodedPath()); + } + /** * Cancel All Open Orders (TRADE) * - *

Cancel All Open Orders Weight: 1 + *

Cancel All Open Orders Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void cancelAllOpenOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void cancelAllOpenOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.cancelAllOpenOrders(symbol, recvWindow); @@ -269,26 +338,26 @@ public void cancelAllOpenOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", - actualRequest.url().queryParameter("signature")); + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/allOpenOrders", actualRequest.url().encodedPath()); } /** * Cancel Multiple Orders (TRADE) * - *

Cancel Multiple Orders * Either `orderIdList` or `origClientOrderIdList - * ` must be sent. Weight: 1 + *

Cancel Multiple Orders Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderIdList` or `origClientOrderIdList ` must be sent. * * @throws ApiException if the Api call fails */ @Test - public void cancelMultipleOrdersTest() throws ApiException, CryptoException { - String symbol = ""; - OrderIdList orderIdList = null; - OrigClientOrderIdList origClientOrderIdList = null; + public void cancelMultipleOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + OrderIdList orderIdList = OrderIdList.fromJson("[1234567]"); + OrigClientOrderIdList origClientOrderIdList = + OrigClientOrderIdList.fromJson("[\"my_id_1\"]"); Long recvWindow = 5000L; ApiResponse response = api.cancelMultipleOrders(symbol, orderIdList, origClientOrderIdList, recvWindow); @@ -303,9 +372,9 @@ public void cancelMultipleOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&orderIdList=%5B1234567%5D&origClientOrderIdList=%5B%22my_id_1%22%5D&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "9aac844b6b7223dbf5f02ead8a277b7f68fb30bf38dfe499e1e8351195e2fb61", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/batchOrders", actualRequest.url().encodedPath()); } @@ -313,16 +382,16 @@ public void cancelMultipleOrdersTest() throws ApiException, CryptoException { /** * Cancel Order (TRADE) * - *

Cancel an active order. * Either `orderId` or `origClientOrderId` must - * be sent. Weight: 1 + *

Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent. * * @throws ApiException if the Api call fails */ @Test - public void cancelOrderTest() throws ApiException, CryptoException { - String symbol = ""; - Long orderId = 1L; - String origClientOrderId = "1"; + public void cancelOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long orderId = 283194212L; + String origClientOrderId = "myOrder1"; Long recvWindow = 5000L; ApiResponse response = api.cancelOrder(symbol, orderId, origClientOrderId, recvWindow); @@ -337,29 +406,25 @@ public void cancelOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "symbol=&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "cbec82483be2ad044b893ffb2e6bc0d55370e378eaea0b4b61d95893bd9cc458", - actualRequest.url().queryParameter("signature")); + assertEquals("symbol=BTCUSDT&orderId=283194212&origClientOrderId=myOrder1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("da02e45bd705baeff03b72cf656f68b68c67e7ac5ad328ec8dc867e26dfc0a48", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/order", actualRequest.url().encodedPath()); } /** - * Change Initial Leverage(TRADE) + * Change Initial Leverage (TRADE) * - *

Change user's initial leverage of specific symbol market. Weight: 1 + *

Change user's initial leverage of specific symbol market. Weight(IP): 1 Security Type: + * TRADE * * @throws ApiException if the Api call fails */ @Test - public void changeInitialLeverageTest() throws ApiException, CryptoException { + public void changeInitialLeverageTest() throws ApiException, CryptoException, IOException { ChangeInitialLeverageRequest changeInitialLeverageRequest = new ChangeInitialLeverageRequest(); - - changeInitialLeverageRequest.symbol(""); - changeInitialLeverageRequest.leverage(0L); + changeInitialLeverageRequest.symbol("BTCUSDT"); + changeInitialLeverageRequest.leverage(1L); ApiResponse response = api.changeInitialLeverage(changeInitialLeverageRequest); @@ -374,25 +439,24 @@ public void changeInitialLeverageTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000symbol=&leverage=0", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&leverage=1", signInputCaptor.getValue()); assertEquals( - "31c40eeb1a5a52384cff8a195c1c312e32b26a672ad8fb71dc96256a61c4101c", + "155331b13264bb9a61c6964e6f7a237b2a5348d3edfa097b2c3d30a014c2637b", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/leverage", actualRequest.url().encodedPath()); } /** - * Change Margin Type(TRADE) + * Change Margin Type (TRADE) * - *

Change symbol level margin type Weight: 1 + *

Change symbol level margin type Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void changeMarginTypeTest() throws ApiException, CryptoException { + public void changeMarginTypeTest() throws ApiException, CryptoException, IOException { ChangeMarginTypeRequest changeMarginTypeRequest = new ChangeMarginTypeRequest(); - - changeMarginTypeRequest.symbol(""); + changeMarginTypeRequest.symbol("BTCUSDT"); changeMarginTypeRequest.marginType(MarginType.ISOLATED); ApiResponse response = @@ -408,11 +472,9 @@ public void changeMarginTypeTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&marginType=ISOLATED", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000symbol=&marginType=ISOLATED", signInputCaptor.getValue()); - assertEquals( - "7cedb25e13ff6f8ca5b22d48cb06eaaa3b2a8c7d1f13a1aeb891f6a8125f5399", - actualRequest.url().queryParameter("signature")); + "2d44aebe8eb6fd4dfc9916652ec7ee9a4ef125f38d847240ffb7310fb9843089", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/marginType", actualRequest.url().encodedPath()); } @@ -420,16 +482,15 @@ public void changeMarginTypeTest() throws ApiException, CryptoException { * Change Multi-Assets Mode (TRADE) * *

Change user's Multi-Assets mode (Multi-Assets Mode or Single-Asset Mode) on ***Every - * symbol*** Weight: 1 + * symbol*** Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void changeMultiAssetsModeTest() throws ApiException, CryptoException { + public void changeMultiAssetsModeTest() throws ApiException, CryptoException, IOException { ChangeMultiAssetsModeRequest changeMultiAssetsModeRequest = new ChangeMultiAssetsModeRequest(); - - changeMultiAssetsModeRequest.multiAssetsMargin(""); + changeMultiAssetsModeRequest.multiAssetsMargin("true"); ApiResponse response = api.changeMultiAssetsMode(changeMultiAssetsModeRequest); @@ -444,26 +505,28 @@ public void changeMultiAssetsModeTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000multiAssetsMargin=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000multiAssetsMargin=true", signInputCaptor.getValue()); assertEquals( - "2bbddd5005c80c60a12618873cdf82e9e364838ddd3cfc74dd620b1bab630db2", + "906bfdccb2168a76e005394dca4b5be65f85cb3f94d1c811b0fbbfa158f9684e", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/multiAssetsMargin", actualRequest.url().encodedPath()); } /** - * Change Position Mode(TRADE) + * Change Position Mode (TRADE) * - *

Change user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol*** - * Weight: 1 + *

Change user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol***. + * **After CM migration**, UM and CM share the **same** `dualSidePosition` setting. + * Calling this endpoint flips both UM and CM at once. If either side has any open order or open + * position, the change is rejected: - `-4067` (open orders exist) - `-4068` + * (open position exists) Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void changePositionModeTest() throws ApiException, CryptoException { + public void changePositionModeTest() throws ApiException, CryptoException, IOException { ChangePositionModeRequest changePositionModeRequest = new ChangePositionModeRequest(); - - changePositionModeRequest.dualSidePosition(""); + changePositionModeRequest.dualSidePosition("true"); ApiResponse response = api.changePositionMode(changePositionModeRequest); @@ -478,25 +541,61 @@ public void changePositionModeTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000dualSidePosition=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000dualSidePosition=true", signInputCaptor.getValue()); assertEquals( - "234d62c8a0356474ae6889f6aee70005b8ded595c0d02364bc91a55e250c6017", - actualRequest.url().queryParameter("signature")); + "e5d54f89dd6a1e74ab1ef1fa8057f86c8736d76176c60cbbfdc4a54572efc7fa", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/positionSide/dual", actualRequest.url().encodedPath()); } + /** + * Current All Algo Open Orders (USER_DATA) + * + *

Get all open algo (conditional) orders on a symbol, including TP/SL (Take Profit / Stop + * Loss) and trailing stop orders on USD-M Futures. Weight: **1** for a single symbol; **40** + * when the symbol parameter is omitted **Careful** when accessing this with no symbol. Security + * Type: USER_DATA Notes: - If the symbol is not sent, orders for all symbols will be returned + * in an array. + * + * @throws ApiException if the Api call fails + */ + @Test + public void currentAllAlgoOpenOrdersTest() throws ApiException, CryptoException, IOException { + String algoType = "CONDITIONAL"; + String symbol = "BTCUSDT"; + Long algoId = 2148627L; + Long recvWindow = 5000L; + ApiResponse response = + api.currentAllAlgoOpenOrders(algoType, symbol, algoId, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("algoType=CONDITIONAL&symbol=BTCUSDT&algoId=2148627&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "73973747a6b353c9a81896cf7c83530e5ca468edabc8256b40ce8d651b8aa9e6", + actualRequest.url().queryParameter("signature")); + assertEquals("/fapi/v1/openAlgoOrders", actualRequest.url().encodedPath()); + } + /** * Current All Open Orders (USER_DATA) * - *

Get all open orders on a symbol. * If the symbol is not sent, orders for all symbols will - * be returned in an array. Weight: 1 for a single symbol; 40 when the symbol parameter is - * omitted Careful when accessing this with no symbol. + *

Get all open orders on a symbol. Weight: **1** for a single symbol; **40** when the symbol + * parameter is omitted **Careful** when accessing this with no symbol. Security Type: USER_DATA + * Notes: - If the symbol is not sent, orders for all symbols will be returned in an array. * * @throws ApiException if the Api call fails */ @Test - public void currentAllOpenOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void currentAllOpenOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.currentAllOpenOrders(symbol, recvWindow); @@ -511,30 +610,63 @@ public void currentAllOpenOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/openOrders", actualRequest.url().encodedPath()); } + /** + * Futures TradFi Perps Contract (USER_DATA) + * + *

Sign TradFi-Perps agreement contract Weight(IP): 50 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void futuresTradfiPerpsContractTest() throws ApiException, CryptoException, IOException { + FuturesTradfiPerpsContractRequest futuresTradfiPerpsContractRequest = + new FuturesTradfiPerpsContractRequest(); + + ApiResponse response = + api.futuresTradfiPerpsContract(futuresTradfiPerpsContractRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", + actualRequest.url().queryParameter("signature")); + assertEquals("/fapi/v1/stock/contract", actualRequest.url().encodedPath()); + } + /** * Get Order Modify History (USER_DATA) * - *

Get order modification history * Either `orderId` or - * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. * Order modify history longer than 3 month is not avaliable Weight: 1 + *

Get order modification history Weight(IP): 1 Security Type: USER_DATA Notes: - Either + * `orderId` or `origClientOrderId` must be sent, and the + * `orderId` will prevail if both are sent. - Order modify history longer than 3 month + * is not avaliable * * @throws ApiException if the Api call fails */ @Test - public void getOrderModifyHistoryTest() throws ApiException, CryptoException { - String symbol = ""; - Long orderId = 1L; - String origClientOrderId = "1"; + public void getOrderModifyHistoryTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long orderId = 20072994037L; + String origClientOrderId = "LJ9R4QZDihCaS8UAOOLpgW"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; Long recvWindow = 5000L; ApiResponse response = api.getOrderModifyHistory( @@ -550,11 +682,9 @@ public void getOrderModifyHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&orderId=20072994037&origClientOrderId=LJ9R4QZDihCaS8UAOOLpgW&startTime=1623319461670&endTime=1641782889000&limit=50&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&orderId=1&origClientOrderId=1&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "8dfcc843fc05f631a3b12c4a0080f9d1f2283472ee0032b3e7e7fd46d855bcde", + "2294284a523af7557fe89ef5dc78f234fa03898b25f54a0c789f8f5db330c696", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/orderAmendment", actualRequest.url().encodedPath()); } @@ -562,19 +692,20 @@ public void getOrderModifyHistoryTest() throws ApiException, CryptoException { /** * Get Position Margin Change History (TRADE) * - *

Get Position Margin Change History * Support querying future histories that are not older - * than 30 days * The time between `startTime` and `endTime`can't be - * more than 30 days Weight: 1 + *

Get Position Margin Change History Weight(IP): 1 Security Type: TRADE Notes: - Support + * querying future histories that are not older than 30 days - The time between + * `startTime` and `endTime`can't be more than 30 days * * @throws ApiException if the Api call fails */ @Test - public void getPositionMarginChangeHistoryTest() throws ApiException, CryptoException { - String symbol = ""; - String type = ""; + public void getPositionMarginChangeHistoryTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + String type = "1"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; Long recvWindow = 5000L; ApiResponse response = api.getPositionMarginChangeHistory( @@ -590,30 +721,29 @@ public void getPositionMarginChangeHistoryTest() throws ApiException, CryptoExce Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&type=1&startTime=1623319461670&endTime=1641782889000&limit=50&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&type=&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "9993f640a7ff2dec80d1ea367a29578129bbfd1b7dea64f0710fecff16fb887e", + "d80f95495789b10a60550626850d95015cbc2d976b45d397def52508b27420f8", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/positionMargin/history", actualRequest.url().encodedPath()); } /** - * Modify Isolated Position Margin(TRADE) + * Modify Isolated Position Margin (TRADE) * - *

Modify Isolated Position Margin * Only for isolated symbol Weight: 1 + *

Modify Isolated Position Margin Weight(IP): 1 Security Type: TRADE Notes: - Only for + * isolated symbol * * @throws ApiException if the Api call fails */ @Test - public void modifyIsolatedPositionMarginTest() throws ApiException, CryptoException { + public void modifyIsolatedPositionMarginTest() + throws ApiException, CryptoException, IOException { ModifyIsolatedPositionMarginRequest modifyIsolatedPositionMarginRequest = new ModifyIsolatedPositionMarginRequest(); - - modifyIsolatedPositionMarginRequest.symbol(""); - modifyIsolatedPositionMarginRequest.amount(1d); - modifyIsolatedPositionMarginRequest.type(""); + modifyIsolatedPositionMarginRequest.symbol("BTCUSDT"); + modifyIsolatedPositionMarginRequest.amount(1.0d); + modifyIsolatedPositionMarginRequest.type(1); ApiResponse response = api.modifyIsolatedPositionMargin(modifyIsolatedPositionMarginRequest); @@ -628,29 +758,28 @@ public void modifyIsolatedPositionMarginTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000symbol=&amount=1&type=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&amount=1&type=1", signInputCaptor.getValue()); assertEquals( - "921166da829e0f721b541df55b30dc589552e9b564377ec51db466f94d2e2f8b", + "0aa7d644eaa767ee27bf6f8014cea06c916e5d7b471b3bdf6748899112753937", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/positionMargin", actualRequest.url().encodedPath()); } /** - * Modify Multiple Orders(TRADE) + * Modify Multiple Orders (TRADE) * - *

Modify Multiple Orders (TRADE) * Parameter rules are same with `Modify Order` * - * Batch modify orders are processed concurrently, and the order of matching is not guaranteed. - * * The order of returned contents for batch modify orders is the same as the order of the - * order list. * One order can only be modfied for less than 10000 times Weight: 5 on 10s order - * rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 5 on IP - * rate limit(x-mbx-used-weight-1m); + *

Modify Multiple Orders (TRADE) Weight: 5 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 + * on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate limit(x-mbx-used-weight-1m); + * Security Type: TRADE Notes: - Parameter rules are same with `Modify Order` - Batch + * modify orders are processed concurrently, and the order of matching is not guaranteed. - The + * order of returned contents for batch modify orders is the same as the order of the order + * list. - One order can only be modfied for less than 10000 times * * @throws ApiException if the Api call fails */ @Test - public void modifyMultipleOrdersTest() throws ApiException, CryptoException { + public void modifyMultipleOrdersTest() throws ApiException, CryptoException, IOException { ModifyMultipleOrdersRequest modifyMultipleOrdersRequest = new ModifyMultipleOrdersRequest(); - modifyMultipleOrdersRequest.batchOrders(new BatchOrders()); ApiResponse response = @@ -677,29 +806,28 @@ public void modifyMultipleOrdersTest() throws ApiException, CryptoException { * Modify Order (TRADE) * *

Order modify function, currently only LIMIT order modification is supported, modified - * orders will be reordered in the match queue * Either `orderId` or + * 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 `orderId` or * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. * Both `quantity` and `price` must be sent, which is different - * from dapi modify order endpoint. * When the new `quantity` or `price` + * are sent. - Both `quantity` and `price` must be sent, which is different + * from dapi modify order endpoint. - When the new `quantity` or `price` * doesn'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 - * `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 * Modify order will set `selfTradePreventionMode` to - * `NONE` Weight: 1 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order - * rate limit(X-MBX-ORDER-COUNT-1M); 1 on IP rate limit(x-mbx-used-weight-1m) + * 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 + * `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 * * @throws ApiException if the Api call fails */ @Test - public void modifyOrderTest() throws ApiException, CryptoException { + public void modifyOrderTest() throws ApiException, CryptoException, IOException { ModifyOrderRequest modifyOrderRequest = new ModifyOrderRequest(); - - modifyOrderRequest.symbol(""); + modifyOrderRequest.symbol("BTCUSDT"); modifyOrderRequest.side(Side.BUY); - modifyOrderRequest.quantity(1d); - modifyOrderRequest.price(1d); + modifyOrderRequest.quantity(1.0d); + modifyOrderRequest.price(30005d); ApiResponse response = api.modifyOrder(modifyOrderRequest); @@ -713,66 +841,103 @@ public void modifyOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "timestamp=1736393892000symbol=&side=BUY&quantity=1&price=1", - signInputCaptor.getValue()); - assertEquals( - "5d55a15240b44cfacea70546cc8dc2e0e1394ec0f194ec1bf1e67bfac92cd911", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&side=BUY&quantity=1&price=30005", signInputCaptor.getValue()); + assertEquals("7a1d3d44b78f319ffdc267b36f0f6d32e7a9d63a1a4ffa7a1d25b0281b702ae6", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/order", actualRequest.url().encodedPath()); } /** - * New Order(TRADE) + * New Algo Order (TRADE) * - *

Send in a new order. * Order with type `STOP`, parameter `timeInForce` - * can be sent ( default `GTC`). * Order with type `TAKE_PROFIT`, parameter - * `timeInForce` can be sent ( default `GTC`). * Condition orders will be - * triggered when: * If parameter`priceProtect`is sent as true: * when price reaches - * the `stopPrice` ,the difference rate between \"MARK_PRICE\" and + *

Send in a new algo (conditional) order. Use this endpoint to place **TP/SL (Take Profit / + * Stop Loss)** and trailing stop orders on USD-M Futures. Supported order types under + * `algoType=CONDITIONAL` are `STOP_MARKET`, + * `TAKE_PROFIT_MARKET`, `STOP`, `TAKE_PROFIT`, and + * `TRAILING_STOP_MARKET`. 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: - Algo order with type `STOP`, parameter + * `timeInForce` can be sent (default `GTC`). - Algo order with type + * `TAKE_PROFIT`, parameter `timeInForce` can be sent ( default + * `GTC`). - Condition orders will be triggered when: - If + * parameter`priceProtect`is sent as true: - when price reaches the + * `triggerPrice` ,the difference rate between \"MARK_PRICE\" and * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed `<= - * `activationPrice`, and the latest price >`= the lowest price * (1 + - * `callbackRate`) * SELL: the highest price after order placed >= - * `activationPrice`, and the latest price <= the highest price * (1 - - * `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. - * ``{\"code\": -2021, \"msg\": \"Order would immediately - * trigger.\"}`` means that the parameters you send do not meet the following - * requirements: * BUY: `activationPrice` should be smaller than latest price. * SELL: - * `activationPrice` should be larger than latest price. * If `newOrderRespType - * ` is sent as `RESULT` : * `MARKET` order: the final FILLED result of - * the order will be return directly. * `LIMIT` order with special - * `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be - * returned directly. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` paremeter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with - * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * + * symbol - \"triggerProtect\" of a symbol can be got from `GET + * /fapi/v1/exchangeInfo` - `STOP`, `STOP_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= + * `triggerPrice` - SELL: latest price (\"MARK_PRICE\" or + * \"CONTRACT_PRICE\") - `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - + * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") - SELL: latest + * price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= + * `triggerPrice` - `TRAILING_STOP_MARKET`: - BUY: the lowest price after + * order placed = the lowest price * (1 + `callbackRate`) - SELL: the highest + * price after order placed >= `activatePrice`, and the latest price - For + * `TRAILING_STOP_MARKET`, if you got such error code. > `{\"code\": + * -2021, \"msg\": \"Order would immediately trigger.\"}` > means + * that the parameters you send do not meet the following requirements: - BUY: + * `activatePrice` should be smaller than latest price. - SELL: + * `activatePrice` should be larger than latest price. - `STOP_MARKET`, + * `TAKE_PROFIT_MARKET` with `closePosition`=`true`: - Follow + * the same rules for condition orders. - If triggered,**close all** current long position( if + * `SELL`) or current short position( if `BUY`). - Cannot be used with + * `quantity` paremeter - Cannot be used with `reduceOnly` parameter - In + * Hedge Mode,cannot be used with `BUY` orders in `LONG` position side. and + * cannot be used with `SELL` orders in `SHORT` position side - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. * In extreme market conditions, - * timeInForce `GTD` order auto cancel time might be delayed comparing to - * `goodTillDate` 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) + * `IOC` or `GTC` or `GTD`. * * @throws ApiException if the Api call fails */ @Test - public void newOrderTest() throws ApiException, CryptoException { - NewOrderRequest newOrderRequest = new NewOrderRequest(); + public void newAlgoOrderTest() throws ApiException, CryptoException, IOException { + NewAlgoOrderRequest newAlgoOrderRequest = new NewAlgoOrderRequest(); + newAlgoOrderRequest.algoType(AlgoType.CONDITIONAL); + newAlgoOrderRequest.symbol("BNBUSDT"); + newAlgoOrderRequest.side(Side.BUY); + newAlgoOrderRequest.type(OrderType.LIMIT); - newOrderRequest.symbol(""); + ApiResponse response = api.newAlgoOrder(newAlgoOrderRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000symbol=BNBUSDT&side=BUY&reduceOnly=false&algoType=CONDITIONAL&newOrderRespType=ACK&selfTradePreventionMode=NONE&type=LIMIT&priceProtect=false&workingType=CONTRACT_PRICE", signInputCaptor.getValue()); + assertEquals("e12ec8df92e5886319b32a913f0f988abfddaf9092516c76b7cb8dc39366423b", actualRequest.url().queryParameter("signature")); + assertEquals("/fapi/v1/algoOrder", actualRequest.url().encodedPath()); + } + + /** + * New Order (TRADE) + * + *

Send in a new order. 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: Additional mandatory parameters based on `type`: | Type | + * Additional mandatory parameters | |------|----------------------------------| | + * `LIMIT` | `timeInForce`, `quantity`, `price` | | + * `MARKET` | `quantity` | - If `newOrderRespType` is sent as + * `RESULT`: - `MARKET` order: the final FILLED result of the order will be + * returned directly. - `LIMIT` order with special `timeInForce`: the final + * status result of the order (FILLED or EXPIRED) will be returned directly. - + * `selfTradePreventionMode` is only effective when `timeInForce` is set to + * `IOC`, `GTC`, or `GTD`. - In extreme market conditions, + * `timeInForce` `GTD` order auto-cancel time might be delayed compared to + * `goodTillDate`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void newOrderTest() throws ApiException, CryptoException, IOException { + NewOrderRequest newOrderRequest = new NewOrderRequest(); + newOrderRequest.symbol("BTCUSDT"); newOrderRequest.side(Side.BUY); - newOrderRequest.type(""); + newOrderRequest.type(OrderType.LIMIT); ApiResponse response = api.newOrder(newOrderRequest); @@ -786,29 +951,26 @@ public void newOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000symbol=&side=BUY&type=", signInputCaptor.getValue()); - assertEquals( - "fa7ddab4a660903f7305421c43e7705a88aa40d3039a17e6bf6ad242ec379289", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&side=BUY&reduceOnly=false&newOrderRespType=ACK&selfTradePreventionMode=NONE&type=LIMIT", signInputCaptor.getValue()); + assertEquals("c1c527929b68b53933480df5c04fa37fa74061c457c6c1e730bda50ef68f96b4", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/order", actualRequest.url().encodedPath()); } /** - * Place Multiple Orders(TRADE) + * Place Multiple Orders (TRADE) * - *

Place Multiple Orders * Paremeter rules are same with `New Order` * Batch orders - * are processed concurrently, and the order of matching is not guaranteed. * The order of - * returned contents for batch orders is the same as the order of the order list. Weight: 5 on - * 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate - * limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate limit(x-mbx-used-weight-1m); + *

Place Multiple Orders Weight: 5 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min + * order rate limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate limit(x-mbx-used-weight-1m); Security + * Type: TRADE Notes: - Paremeter rules are same with `New Order` - Batch orders are + * processed concurrently, and the order of matching is not guaranteed. - The order of returned + * contents for batch orders is the same as the order of the order list. * * @throws ApiException if the Api call fails */ @Test - public void placeMultipleOrdersTest() throws ApiException, CryptoException { + public void placeMultipleOrdersTest() throws ApiException, CryptoException, IOException { PlaceMultipleOrdersRequest placeMultipleOrdersRequest = new PlaceMultipleOrdersRequest(); - - placeMultipleOrdersRequest.batchOrders(new BatchOrdersPlaceMultipleOrders()); + placeMultipleOrdersRequest.batchOrders(new BatchOrders()); ApiResponse response = api.placeMultipleOrders(placeMultipleOrdersRequest); @@ -825,13 +987,12 @@ public void placeMultipleOrdersTest() throws ApiException, CryptoException { assertEquals("timestamp=1736393892000batchOrders=%5B%5D", signInputCaptor.getValue()); assertEquals( - "84453de090bb6a9299c2928d3b767e0cd7298a2b7e7a004b22943b9d5990663b", - actualRequest.url().queryParameter("signature")); + "84453de090bb6a9299c2928d3b767e0cd7298a2b7e7a004b22943b9d5990663b", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/batchOrders", actualRequest.url().encodedPath()); } /** - * Position ADL Quantile Estimation(USER_DATA) + * Position ADL Quantile Estimation (USER_DATA) * *

Position ADL Quantile Estimation * Values update every 30s. * Values 0, 1, 2, 3, 4 shows * the queue position and possibility of ADL from low to high. * For positions of the symbol are @@ -841,13 +1002,14 @@ public void placeMultipleOrdersTest() throws ApiException, CryptoException { * \"HEDGE\" as a sign will be returned instead of \"BOTH\"; * A same value * caculated on unrealized pnls on long and short sides' positions will be shown for * \"LONG\" and \"SHORT\" when there are positions in both of long and short - * sides. Weight: 5 + * sides. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void positionAdlQuantileEstimationTest() throws ApiException, CryptoException { - String symbol = ""; + public void positionAdlQuantileEstimationTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.positionAdlQuantileEstimation(symbol, recvWindow); @@ -862,9 +1024,9 @@ public void positionAdlQuantileEstimationTest() throws ApiException, CryptoExcep Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/adlQuantile", actualRequest.url().encodedPath()); } @@ -872,14 +1034,15 @@ public void positionAdlQuantileEstimationTest() throws ApiException, CryptoExcep /** * Position Information V2 (USER_DATA) * - *

Get current position information. Please use with user data stream - * `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 5 + *

Get current position information. Weight(IP): 5 Security Type: USER_DATA Notes: - Please + * use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy + * needs. * * @throws ApiException if the Api call fails */ @Test - public void positionInformationV2Test() throws ApiException, CryptoException { - String symbol = ""; + public void positionInformationV2Test() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.positionInformationV2(symbol, recvWindow); @@ -894,9 +1057,9 @@ public void positionInformationV2Test() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v2/positionRisk", actualRequest.url().encodedPath()); } @@ -905,14 +1068,14 @@ public void positionInformationV2Test() throws ApiException, CryptoException { * Position Information V3 (USER_DATA) * *

Get current position information(only symbol that has position or open orders will be - * returned). Please use with user data stream `ACCOUNT_UPDATE` to meet your - * timeliness and accuracy needs. Weight: 5 + * returned). Weight(IP): 5 Security Type: USER_DATA Notes: - Please use with user data stream + * `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. * * @throws ApiException if the Api call fails */ @Test - public void positionInformationV3Test() throws ApiException, CryptoException { - String symbol = ""; + public void positionInformationV3Test() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.positionInformationV3(symbol, recvWindow); @@ -927,27 +1090,103 @@ public void positionInformationV3Test() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v3/positionRisk", actualRequest.url().encodedPath()); } + /** + * Query Algo Order (USER_DATA) + * + *

Check the status of an algo (conditional) order, such as TP/SL (Take Profit / Stop Loss) + * or trailing stop orders on USD-M Futures. * These orders will not be found: * order status is + * `CANCELED` or `EXPIRED` **AND** order has NO filled trade **AND** created + * time + 3 days < current time * order create time + 90 days < current time Weight(IP): 1 + * Security Type: USER_DATA Notes: - Either `algoId` or `clientAlgoId` must + * be sent. - `algoId` is self-increment for each specific `symbol` + * + * @throws ApiException if the Api call fails + */ + @Test + public void queryAlgoOrderTest() throws ApiException, CryptoException, IOException { + Long algoId = 1L; + String clientAlgoId = "1"; + Long recvWindow = 5000L; + ApiResponse response = + api.queryAlgoOrder(algoId, clientAlgoId, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("algoId=1&clientAlgoId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("45846156242c5b783dfbafe56f177eb51e9d45a16dcb15e667e825d16d7333a2", actualRequest.url().queryParameter("signature")); + assertEquals("/fapi/v1/algoOrder", actualRequest.url().encodedPath()); + } + + /** + * Query All Algo Orders (USER_DATA) + * + *

Get all algo (conditional) orders — active, CANCELED, TRIGGERED, or FINISHED — including + * TP/SL (Take Profit / Stop Loss) and trailing stop orders on USD-M Futures. * These orders + * will not be found: * order status is `CANCELED` or `EXPIRED` **AND** + * order has NO filled trade **AND** created time + 3 days < current time * order create time + * + 90 days < current time Weight(IP): 5 Security Type: USER_DATA Notes: - If + * `algoId` is set, it will get orders >= that `algoId`. Otherwise + * most recent orders are returned. - The query time period must be less then 7 days( default as + * the recent 7 days). + * + * @throws ApiException if the Api call fails + */ + @Test + public void queryAllAlgoOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long algoId = 2146760L; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long limit = 50L; + Long recvWindow = 5000L; + ApiResponse response = + api.queryAllAlgoOrders(symbol, algoId, startTime, endTime, limit, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("symbol=BTCUSDT&algoId=2146760&startTime=1623319461670&endTime=1641782889000&limit=50&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "30d9cf58adf890dd8dd4517ffbfd074467e59275fa5741115c5e3c38bbf8565b", actualRequest.url().queryParameter("signature")); + assertEquals("/fapi/v1/allAlgoOrders", actualRequest.url().encodedPath()); + } + /** * Query Current Open Order (USER_DATA) * - *

Query open order * Either`orderId` or `origClientOrderId` must be sent - * * If the queried order has been filled or cancelled, the error message \"Order does not - * exist\" will be returned. Weight: 1 + *

Query open order Weight(IP): 1 Security Type: USER_DATA Notes: - Either`orderId` + * or `origClientOrderId` must be sent - If the queried order has been filled or + * cancelled, the error message \"Order does not exist\" will be returned. * * @throws ApiException if the Api call fails */ @Test - public void queryCurrentOpenOrderTest() throws ApiException, CryptoException { - String symbol = ""; - Long orderId = 1L; - String origClientOrderId = "1"; + public void queryCurrentOpenOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long orderId = 1917641L; + String origClientOrderId = "abc"; Long recvWindow = 5000L; ApiResponse response = api.queryCurrentOpenOrder(symbol, orderId, origClientOrderId, recvWindow); @@ -962,11 +1201,9 @@ public void queryCurrentOpenOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&orderId=1917641&origClientOrderId=abc&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "cbec82483be2ad044b893ffb2e6bc0d55370e378eaea0b4b61d95893bd9cc458", + "e9a9f1217302762b1994fd8f413387e1956dad2b9eed05daa1d0d64fbf8993c8", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/openOrder", actualRequest.url().encodedPath()); } @@ -976,17 +1213,17 @@ public void queryCurrentOpenOrderTest() throws ApiException, CryptoException { * *

Check an order's status. * These orders will not be found: * order status is * `CANCELED` or `EXPIRED` **AND** order has NO filled trade **AND** created - * time + 3 days < current time * order create time + 90 days < current time * Either - * `orderId` or `origClientOrderId` must be sent. * `orderId` is - * self-increment for each specific `symbol` Weight: 1 + * time + 3 days < current time * order create time + 90 days < current time Weight(IP): 1 + * Security Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` + * must be sent. - `orderId` is self-increment for each specific `symbol` * * @throws ApiException if the Api call fails */ @Test - public void queryOrderTest() throws ApiException, CryptoException { - String symbol = ""; - Long orderId = 1L; - String origClientOrderId = "1"; + public void queryOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long orderId = 1917641L; + String origClientOrderId = "abc"; Long recvWindow = 5000L; ApiResponse response = api.queryOrder(symbol, orderId, origClientOrderId, recvWindow); @@ -1001,66 +1238,66 @@ public void queryOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "symbol=&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "cbec82483be2ad044b893ffb2e6bc0d55370e378eaea0b4b61d95893bd9cc458", - actualRequest.url().queryParameter("signature")); + assertEquals("symbol=BTCUSDT&orderId=1917641&origClientOrderId=abc&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("e9a9f1217302762b1994fd8f413387e1956dad2b9eed05daa1d0d64fbf8993c8", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/order", actualRequest.url().encodedPath()); } /** - * Test Order(TRADE) - * - *

Testing order request, this order will not be submitted to matching engine * Order with - * type `STOP`, parameter `timeInForce` can be sent ( default - * `GTC`). * Order with type `TAKE_PROFIT`, parameter - * `timeInForce` can be sent ( default `GTC`). * Condition orders will be - * triggered when: * If parameter`priceProtect`is sent as true: * when price reaches - * the `stopPrice` ,the difference rate between \"MARK_PRICE\" and + * Test Order (TRADE) + * + *

Testing order request, this order will not be submitted to matching engine Security Type: + * TRADE Notes: Additional mandatory parameters based on `type`: | Type | Additional + * mandatory parameters | | -------------------------------- | + * ---------------------------------- | | `LIMIT` | `timeInForce`, + * `quantity`, `price` | | `MARKET` | `quantity` | | + * `STOP/TAKE_PROFIT` | `quantity`, `price`, `stopPrice` + * | | `STOP_MARKET/TAKE_PROFIT_MARKET` | `stopPrice` | | + * `TRAILING_STOP_MARKET` | `callbackRate` | - Order with type + * `STOP`, parameter `timeInForce` can be sent ( default `GTC`). - + * Order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent + * (default `GTC`). - Condition orders will be triggered when: - If + * parameter`priceProtect`is sent as true: - when price reaches the + * `stopPrice` ,the difference rate between \"MARK_PRICE\" and * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed `<= - * `activationPrice`, and the latest price >`= the lowest price * (1 + - * `callbackRate`) * SELL: the highest price after order placed >= - * `activationPrice`, and the latest price <= the highest price * (1 - - * `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. - * ``{\"code\": -2021, \"msg\": \"Order would immediately - * trigger.\"}`` means that the parameters you send do not meet the following - * requirements: * BUY: `activationPrice` should be smaller than latest price. * SELL: - * `activationPrice` should be larger than latest price. * If `newOrderRespType - * ` is sent as `RESULT` : * `MARKET` order: the final FILLED result of - * the order will be return directly. * `LIMIT` order with special + * symbol - \"triggerProtect\" of a symbol can be got from `GET + * /fapi/v1/exchangeInfo` - `STOP`, `STOP_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - + * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") - + * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - + * `TRAILING_STOP_MARKET`: - BUY: the lowest price after order placed + * ``= the lowest price * (1 + `callbackRate`) - SELL: the highest + * price after order placed >= `activationPrice`, and the latest price - For + * `TRAILING_STOP_MARKET`, if you got such error code. > `{\"code\": + * -2021, \"msg\": \"Order would immediately trigger.\"}` > means + * that the parameters you send do not meet the following requirements: - BUY: + * `activationPrice` should be smaller than latest price. - SELL: + * `activationPrice` should be larger than latest price. - If `newOrderRespType + * ` is sent as `RESULT` : - `MARKET` order: the final FILLED result of + * the order will be return directly. - `LIMIT` order with special * `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be - * returned directly. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` paremeter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with + * returned directly. - `STOP_MARKET`, `TAKE_PROFIT_MARKET` with + * `closePosition`=`true`: - Follow the same rules for condition + * orders. - If triggered,**close all** current long position( if `SELL`) or current + * short position( if `BUY`). - Cannot be used with `quantity` paremeter - + * Cannot be used with `reduceOnly` parameter - In Hedge Mode,cannot be used with * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * + * `SELL` orders in `SHORT` position side - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. * In extreme market conditions, + * `IOC` or `GTC` or `GTD`. - In extreme market conditions, * timeInForce `GTD` order auto cancel time might be delayed comparing to - * `goodTillDate` Weight: 0 + * `goodTillDate` * * @throws ApiException if the Api call fails */ @Test - public void testOrderTest() throws ApiException, CryptoException { + public void testOrderTest() throws ApiException, CryptoException, IOException { TestOrderRequest testOrderRequest = new TestOrderRequest(); - - testOrderRequest.symbol(""); + testOrderRequest.symbol("BTCUSDT"); testOrderRequest.side(Side.BUY); - testOrderRequest.type(""); + testOrderRequest.type(OrderType.LIMIT); ApiResponse response = api.testOrder(testOrderRequest); @@ -1074,29 +1311,28 @@ public void testOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000symbol=&side=BUY&type=", signInputCaptor.getValue()); - assertEquals( - "fa7ddab4a660903f7305421c43e7705a88aa40d3039a17e6bf6ad242ec379289", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&side=BUY&reduceOnly=false&newOrderRespType=ACK&selfTradePreventionMode=NONE&type=LIMIT&priceProtect=false&workingType=CONTRACT_PRICE", signInputCaptor.getValue()); + assertEquals("f94675b1eda7bc2f3a75dd980ae74b50323a46281326728f8e74976c18dbabe3", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/order/test", actualRequest.url().encodedPath()); } /** * User's Force Orders (USER_DATA) * - *

Query user's Force Orders * If \"autoCloseType\" is not sent, orders with - * both of the types will be returned * If \"startTime\" is not sent, data within 7 - * days before \"endTime\" can be queried Weight: 20 with symbol, 50 without symbol + *

Query user's Force Orders Weight: **20** with symbol, **50** without symbol Security + * Type: USER_DATA Notes: - If \"autoCloseType\" is not sent, orders with both of the + * types will be returned - If \"startTime\" is not sent, data within 7 days before + * \"endTime\" can be queried * * @throws ApiException if the Api call fails */ @Test - public void usersForceOrdersTest() throws ApiException, CryptoException { - String symbol = ""; + public void usersForceOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; AutoCloseType autoCloseType = AutoCloseType.LIQUIDATION; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; Long recvWindow = 5000L; ApiResponse response = api.usersForceOrders(symbol, autoCloseType, startTime, endTime, limit, recvWindow); @@ -1111,12 +1347,9 @@ public void usersForceOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&autoCloseType=LIQUIDATION&startTime=1623319461670&endTime=1641782889000&limit=50&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&autoCloseType=LIQUIDATION&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "a8fbc61c925506a4d0328c80dbe4bd786245accbfc50aef2a14a769d18bde9d9", - actualRequest.url().queryParameter("signature")); + "46e5a20281632f247f2f44f5d90210688640d36919b65ad3dc793a9652be5e62", actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/forceOrders", actualRequest.url().encodedPath()); } } diff --git a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/UserDataStreamsApiTest.java b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/UserDataStreamsApiTest.java index 1c5fcfa9d..a1c358de5 100644 --- a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/UserDataStreamsApiTest.java +++ b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/UserDataStreamsApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Derivatives Trading USDS Futures REST API - * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API + * Futures (USDⓈ-M) REST API + * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * @@ -26,6 +26,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.KeepaliveUserDataStreamResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.StartUserDataStreamResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -79,12 +80,12 @@ public void initApiClient() throws ApiException { /** * Close User Data Stream (USER_STREAM) * - *

Close out a user data stream. Weight: 1 + *

Close out a user data stream. Weight(IP): 1 Security Type: USER_STREAM * * @throws ApiException if the Api call fails */ @Test - public void closeUserDataStreamTest() throws ApiException, CryptoException { + public void closeUserDataStreamTest() throws ApiException, CryptoException, IOException { api.closeUserDataStream(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -93,7 +94,8 @@ public void closeUserDataStreamTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/listenKey", actualRequest.url().encodedPath()); } @@ -101,12 +103,13 @@ public void closeUserDataStreamTest() throws ApiException, CryptoException { * Keepalive User Data Stream (USER_STREAM) * *

Keepalive a user data stream to prevent a time out. User data streams will close after 60 - * minutes. It's recommended to send a ping about every 60 minutes. Weight: 1 + * minutes. It's recommended to send a ping about every 60 minutes. Weight(IP): 1 Security + * Type: USER_STREAM * * @throws ApiException if the Api call fails */ @Test - public void keepaliveUserDataStreamTest() throws ApiException, CryptoException { + public void keepaliveUserDataStreamTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.keepaliveUserDataStream(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -116,7 +119,9 @@ public void keepaliveUserDataStreamTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/listenKey", actualRequest.url().encodedPath()); } @@ -125,12 +130,13 @@ public void keepaliveUserDataStreamTest() throws ApiException, CryptoException { * *

Start a new user data stream. The stream will close after 60 minutes unless a keepalive is * sent. If the account has an active `listenKey`, that `listenKey` will be - * returned and its validity will be extended for 60 minutes. Weight: 1 + * returned and its validity will be extended for 60 minutes. Weight(IP): 1 Security Type: + * USER_STREAM * * @throws ApiException if the Api call fails */ @Test - public void startUserDataStreamTest() throws ApiException, CryptoException { + public void startUserDataStreamTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.startUserDataStream(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -140,7 +146,8 @@ public void startUserDataStreamTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/fapi/v1/listenKey", actualRequest.url().encodedPath()); } } diff --git a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/TradeApiTest.java b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/TradeApiTest.java index ad06a81d2..b09a59cde 100644 --- a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/TradeApiTest.java +++ b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/TradeApiTest.java @@ -18,19 +18,8 @@ import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; import com.binance.connector.client.common.websocket.dtos.RequestWrapperDTO; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.CancelOrderRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.CancelOrderResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.ModifyOrderRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.ModifyOrderResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.NewOrderRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.NewOrderResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.PositionInformationRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.PositionInformationResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.PositionInformationV2Request; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.PositionInformationV2Response; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.QueryOrderRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.QueryOrderResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.Side; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.*; + import java.io.File; import java.io.IOException; import java.net.URISyntaxException; @@ -214,9 +203,9 @@ public void modifyOrderTest() throws ApiException, URISyntaxException, IOExcepti public void newOrderTest() throws ApiException, URISyntaxException, IOException { NewOrderRequest newOrderRequest = new NewOrderRequest(); - newOrderRequest.symbol(""); + newOrderRequest.symbol("BTCUSDT"); newOrderRequest.side(Side.BUY); - newOrderRequest.type(""); + newOrderRequest.type(OrderType.LIMIT); CompletableFuture response = api.newOrder(newOrderRequest); ArgumentCaptor> callArgumentCaptor = diff --git a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/MarketApiTest.java b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/MarketApiTest.java index 6465b3693..97ff95f94 100644 --- a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/MarketApiTest.java +++ b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/MarketApiTest.java @@ -19,42 +19,8 @@ import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; import com.binance.connector.client.common.websocket.dtos.RequestWrapperDTO; import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AggregateTradeStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AggregateTradeStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllBookTickersStreamRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllBookTickersStreamResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketLiquidationOrderStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketLiquidationOrderStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketMiniTickersStreamRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketMiniTickersStreamResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketTickersStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketTickersStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.CompositeIndexSymbolInformationStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.CompositeIndexSymbolInformationStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.ContinuousContractKlineCandlestickStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.ContinuousContractKlineCandlestickStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.ContractInfoStreamRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.ContractInfoStreamResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.DiffBookDepthStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.DiffBookDepthStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.IndividualSymbolBookTickerStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.IndividualSymbolBookTickerStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.IndividualSymbolMiniTickerStreamRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.IndividualSymbolMiniTickerStreamResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.IndividualSymbolTickerStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.IndividualSymbolTickerStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.KlineCandlestickStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.KlineCandlestickStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.LiquidationOrderStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.LiquidationOrderStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MarkPriceStreamForAllMarketRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MarkPriceStreamForAllMarketResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MarkPriceStreamRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MarkPriceStreamResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MultiAssetsModeAssetIndexRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MultiAssetsModeAssetIndexResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.PartialBookDepthStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.PartialBookDepthStreamsResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.*; + import java.io.File; import java.io.IOException; import java.net.URISyntaxException; @@ -316,8 +282,8 @@ public void continuousContractKlineCandlestickStreamsTest() new ContinuousContractKlineCandlestickStreamsRequest(); continuousContractKlineCandlestickStreamsRequest.pair("btcusdt"); - continuousContractKlineCandlestickStreamsRequest.contractType("next_quarter"); - continuousContractKlineCandlestickStreamsRequest.interval("1m"); + continuousContractKlineCandlestickStreamsRequest.contractType(ContractType.next_quarter); + continuousContractKlineCandlestickStreamsRequest.interval(Interval.INTERVAL_1m); StreamBlockingQueueWrapper response = api.continuousContractKlineCandlestickStreams( @@ -466,7 +432,7 @@ public void klineCandlestickStreamsTest() throws ApiException, URISyntaxExceptio new KlineCandlestickStreamsRequest(); klineCandlestickStreamsRequest.symbol("btcusdt"); - klineCandlestickStreamsRequest.interval("1m"); + klineCandlestickStreamsRequest.interval(Interval.INTERVAL_1m); StreamBlockingQueueWrapper response = api.klineCandlestickStreams(klineCandlestickStreamsRequest); @@ -596,38 +562,4 @@ public void markPriceStreamForAllMarketTest() String expectedJson = Files.readString(Paths.get(resource.toURI())); JSONAssert.assertEquals(expectedJson, sentPayload, true); } - - /** - * Multi-Assets Mode Asset Index - * - *

Asset index for multi-assets mode user Update Speed: 1s - * - * @throws ApiException if the Api call fails - */ - @Test - public void multiAssetsModeAssetIndexTest() - throws ApiException, URISyntaxException, IOException { - MultiAssetsModeAssetIndexRequest multiAssetsModeAssetIndexRequest = - new MultiAssetsModeAssetIndexRequest(); - - StreamBlockingQueueWrapper response = - api.multiAssetsModeAssetIndex(multiAssetsModeAssetIndexRequest); - ArgumentCaptor, MultiAssetsModeAssetIndexResponse>> - callArgumentCaptor = ArgumentCaptor.forClass(RequestWrapperDTO.class); - Mockito.verify(connectionSpy).innerSend(callArgumentCaptor.capture()); - ArgumentCaptor sendArgumentCaptor = ArgumentCaptor.forClass(String.class); - RemoteEndpoint remote = sessionMock.getRemote(); - Mockito.verify(remote).sendString(sendArgumentCaptor.capture(), Mockito.any()); - RequestWrapperDTO, MultiAssetsModeAssetIndexResponse> requestWrapperDTO = - callArgumentCaptor.getValue(); - Set params = requestWrapperDTO.getParams(); - // TODO: test validations - String sentPayload = sendArgumentCaptor.getValue(); - - URL resource = - MarketApiTest.class.getResource( - "/expected/stream/WebsocketMarketStreamsApi/!assetIndex@arr-test.json"); - String expectedJson = Files.readString(Paths.get(resource.toURI())); - JSONAssert.assertEquals(expectedJson, sentPayload, true); - } } diff --git a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/PublicApiTest.java b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/PublicApiTest.java index d63cc923e..3481e52fe 100644 --- a/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/PublicApiTest.java +++ b/clients/derivatives-trading-usds-futures/src/test/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/PublicApiTest.java @@ -18,42 +18,7 @@ import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; import com.binance.connector.client.common.websocket.dtos.RequestWrapperDTO; import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AggregateTradeStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AggregateTradeStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllBookTickersStreamRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllBookTickersStreamResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketLiquidationOrderStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketLiquidationOrderStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketMiniTickersStreamRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketMiniTickersStreamResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketTickersStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AllMarketTickersStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.CompositeIndexSymbolInformationStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.CompositeIndexSymbolInformationStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.ContinuousContractKlineCandlestickStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.ContinuousContractKlineCandlestickStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.ContractInfoStreamRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.ContractInfoStreamResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.DiffBookDepthStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.DiffBookDepthStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.IndividualSymbolBookTickerStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.IndividualSymbolBookTickerStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.IndividualSymbolMiniTickerStreamRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.IndividualSymbolMiniTickerStreamResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.IndividualSymbolTickerStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.IndividualSymbolTickerStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.KlineCandlestickStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.KlineCandlestickStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.LiquidationOrderStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.LiquidationOrderStreamsResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MarkPriceStreamForAllMarketRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MarkPriceStreamForAllMarketResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MarkPriceStreamRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MarkPriceStreamResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MultiAssetsModeAssetIndexRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MultiAssetsModeAssetIndexResponse; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.PartialBookDepthStreamsRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.PartialBookDepthStreamsResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.*; import org.eclipse.jetty.websocket.api.RemoteEndpoint; import org.eclipse.jetty.websocket.api.Session; import org.eclipse.jetty.websocket.client.WebSocketClient; @@ -233,8 +198,8 @@ public void partialBookDepthStreamsTest() throws ApiException, URISyntaxExceptio new PartialBookDepthStreamsRequest(); partialBookDepthStreamsRequest.symbol("btcusdt"); - partialBookDepthStreamsRequest.levels(10L); - partialBookDepthStreamsRequest.setUpdateSpeed("100ms"); + partialBookDepthStreamsRequest.levels(Levels.LEVELS_10); + partialBookDepthStreamsRequest.setUpdateSpeed(UpdateSpeed.UPDATE_SPEED_100ms); StreamBlockingQueueWrapper response = api.partialBookDepthStreams(partialBookDepthStreamsRequest); diff --git a/clients/derivatives-trading-usds-futures/src/test/resources/expected/api/TradeApi/order.place-test.json b/clients/derivatives-trading-usds-futures/src/test/resources/expected/api/TradeApi/order.place-test.json index e940d48a7..2fb112d19 100644 --- a/clients/derivatives-trading-usds-futures/src/test/resources/expected/api/TradeApi/order.place-test.json +++ b/clients/derivatives-trading-usds-futures/src/test/resources/expected/api/TradeApi/order.place-test.json @@ -1,12 +1,12 @@ { "id": "eaf3292c-64b6-4c04-ad4f-4ca2608b42b4", "params": { - "symbol": "", + "symbol": "BTCUSDT", "side": "BUY", - "type": "", + "type": "LIMIT", "apiKey": "apiKey", "timestamp": "1736393892000", - "signature": "hAtArjKFsgTF0Ldk/c0Y55C0RiNBcBWYJJ0+57jh+3EfqBh7c4ckex/Czj1w+LwWyK7vIsDR665WvqnNbhAzCA==" + "signature": "NY2J8Gl6ma79oNKejRwyRmuKvymgH5ybfEZ3fqC+wGnnfrIPNKY5iDB+btYVmBZq88HDZFMNHhjbxC+J7o3DBA==" }, "method": "order.place" -} +} \ No newline at end of file diff --git a/clients/dual-investment/CHANGELOG.md b/clients/dual-investment/CHANGELOG.md index f66651415..9fbdd0bc0 100644 --- a/clients/dual-investment/CHANGELOG.md +++ b/clients/dual-investment/CHANGELOG.md @@ -1,10 +1,37 @@ # Changelog +## 3.0.0 - 2026-07-29 + +### Changed (6) + +- Added parameter `autoCompoundPlan` + - affected methods: + - `changeAutoCompoundStatus()` (`POST /sapi/v1/dci/product/auto_compound/edit-status`) +- Deleted parameter `AutoCompoundPlan` + - affected methods: + - `changeAutoCompoundStatus()` (`POST /sapi/v1/dci/product/auto_compound/edit-status`) +- Modified parameter `autoCompoundPlan`: + - enum added: `NONE`, `STANDARD`, `ADVANCED` + - affected methods: + - `subscribeDualInvestmentProducts()` (`POST /sapi/v1/dci/product/subscribe`) +- Modified parameter `optionType`: + - enum added: `CALL`, `PUT` + - affected methods: + - `getDualInvestmentProductList()` (`GET /sapi/v1/dci/product/list`) +- Modified parameter `status`: + - enum added: `PENDING`, `PURCHASE_SUCCESS`, `SETTLED`, `PURCHASE_FAIL`, `REFUNDING`, `REFUND_SUCCESS`, `SETTLING` + - affected methods: + - `getDualInvestmentPositions()` (`GET /sapi/v1/dci/product/positions`) +- Modified response for `getDualInvestmentPositions()` (`GET /sapi/v1/dci/product/positions`): + - `list`.items: property `subscriptionTime` added + - `list`.items: item property `subscriptionTime` added + ## 2.1.2 - 2026-04-30 - Update `binance/common` module to version `2.4.2`. ## 2.1.1 - 2025-08-07 + - Update `binance/common` module to version `2.0.0`. - Add `Content-Type` header only if there is a body. diff --git a/clients/dual-investment/docs/AutoCompoundPlan.md b/clients/dual-investment/docs/AutoCompoundPlan.md new file mode 100644 index 000000000..c939ec347 --- /dev/null +++ b/clients/dual-investment/docs/AutoCompoundPlan.md @@ -0,0 +1,15 @@ + + +# AutoCompoundPlan + +## Enum + + +* `NONE` (value: `"NONE"`) + +* `STANDARD` (value: `"STANDARD"`) + +* `ADVANCED` (value: `"ADVANCED"`) + + + diff --git a/clients/dual-investment/docs/ChangeAutoCompoundStatusRequest.md b/clients/dual-investment/docs/ChangeAutoCompoundStatusRequest.md index 2392410f3..feb6ee034 100644 --- a/clients/dual-investment/docs/ChangeAutoCompoundStatusRequest.md +++ b/clients/dual-investment/docs/ChangeAutoCompoundStatusRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**positionId** | **String** | | | -|**autoCompoundPlan** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**positionId** | **String** | Get positionId from `/sapi/v1/dci/product/positions` | | +|**autoCompoundPlan** | **AutoCompoundPlan** | | | +|**recvWindow** | **Long** | Request validity window in milliseconds | [optional] | diff --git a/clients/dual-investment/docs/ChangeAutoCompoundStatusResponse.md b/clients/dual-investment/docs/ChangeAutoCompoundStatusResponse.md index 3b59f45bc..8666e6419 100644 --- a/clients/dual-investment/docs/ChangeAutoCompoundStatusResponse.md +++ b/clients/dual-investment/docs/ChangeAutoCompoundStatusResponse.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**positionId** | **String** | | [optional] | -|**autoCompoundPlan** | **String** | | [optional] | +|**autoCompoundPlan** | **String** | Auto-compound plan after the update | [optional] | diff --git a/clients/dual-investment/docs/CheckDualInvestmentAccountsResponse.md b/clients/dual-investment/docs/CheckDualInvestmentAccountsResponse.md index 59cc9cae3..de8844ab6 100644 --- a/clients/dual-investment/docs/CheckDualInvestmentAccountsResponse.md +++ b/clients/dual-investment/docs/CheckDualInvestmentAccountsResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**totalAmountInBTC** | **String** | | [optional] | -|**totalAmountInUSDT** | **String** | | [optional] | +|**totalAmountInBTC** | **String** | Total BTC amount in Dual Investment | [optional] | +|**totalAmountInUSDT** | **String** | Total USDT equivalent amount in Dual Investment | [optional] | diff --git a/clients/dual-investment/docs/GetDualInvestmentPositionsResponseListInner.md b/clients/dual-investment/docs/GetDualInvestmentPositionsResponseListInner.md index e080923e9..078e1d208 100644 --- a/clients/dual-investment/docs/GetDualInvestmentPositionsResponseListInner.md +++ b/clients/dual-investment/docs/GetDualInvestmentPositionsResponseListInner.md @@ -7,19 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | +|**id** | **String** | positionId | [optional] | |**investCoin** | **String** | | [optional] | |**exercisedCoin** | **String** | | [optional] | |**subscriptionAmount** | **String** | | [optional] | |**strikePrice** | **String** | | [optional] | |**duration** | **Long** | | [optional] | |**settleDate** | **Long** | | [optional] | -|**purchaseStatus** | **String** | | [optional] | +|**purchaseStatus** | **String** | Purchase status. Possible values include PENDING, PURCHASE_SUCCESS, SETTLED, PURCHASE_FAIL, REFUNDING, REFUND_SUCCESS, and SETTLING. | [optional] | |**apr** | **String** | | [optional] | |**orderId** | **Long** | | [optional] | |**purchaseEndTime** | **Long** | | [optional] | |**optionType** | **String** | | [optional] | -|**autoCompoundPlan** | **String** | | [optional] | +|**autoCompoundPlan** | **String** | NULL, STANDARD, ADVANCED | [optional] | +|**subscriptionTime** | **Long** | | [optional] | diff --git a/clients/dual-investment/docs/GetDualInvestmentProductListResponseListInner.md b/clients/dual-investment/docs/GetDualInvestmentProductListResponseListInner.md index ac00d79a1..6e91936f0 100644 --- a/clients/dual-investment/docs/GetDualInvestmentProductListResponseListInner.md +++ b/clients/dual-investment/docs/GetDualInvestmentProductListResponseListInner.md @@ -15,15 +15,15 @@ |**settleDate** | **Long** | | [optional] | |**purchaseDecimal** | **Long** | | [optional] | |**purchaseEndTime** | **Long** | | [optional] | -|**canPurchase** | **Boolean** | | [optional] | +|**canPurchase** | **Boolean** | Whether the product can be subscribed to currently | [optional] | |**apr** | **String** | | [optional] | |**orderId** | **Long** | | [optional] | |**minAmount** | **String** | | [optional] | |**maxAmount** | **String** | | [optional] | |**createTimestamp** | **Long** | | [optional] | |**optionType** | **String** | | [optional] | -|**isAutoCompoundEnable** | **Boolean** | | [optional] | -|**autoCompoundPlanList** | **List<String>** | | [optional] | +|**isAutoCompoundEnable** | **Boolean** | Whether auto-compound is enabled for this product | [optional] | +|**autoCompoundPlanList** | **List<String>** | Available auto-compound plans for this product | [optional] | diff --git a/clients/dual-investment/docs/MarketDataApi.md b/clients/dual-investment/docs/MarketDataApi.md index 9d9c8b06f..180b3e9ec 100644 --- a/clients/dual-investment/docs/MarketDataApi.md +++ b/clients/dual-investment/docs/MarketDataApi.md @@ -13,7 +13,7 @@ All URIs are relative to *https://api.binance.com* Get Dual Investment product list -Get Dual Investment product list Weight: 1(IP) +Get Dual Investment product list Weight(IP): 1 ### Example ```java @@ -30,12 +30,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String optionType = "optionType_example"; // String | Input CALL or PUT - String exercisedCoin = "exercisedCoin_example"; // String | Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input: `optionType`:CALL,`exercisedCoin`:USDT,`investCoin`:BNB; if you subscribe to a low buy product (put option), you should input: `optionType`:PUT,`exercisedCoin`:BNB,`investCoin`:USDT - String investCoin = "investCoin_example"; // String | Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input: `optionType`:CALL,`exercisedCoin`:USDT,`investCoin`:BNB; if you subscribe to a low buy product (put option), you should input: `optionType`:PUT,`exercisedCoin`:BNB,`investCoin`:USDT - Long pageSize = 56L; // Long | Default: 10, Maximum: 100 - Long pageIndex = 56L; // Long | Default: 1 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 + OptionType optionType = OptionType.fromValue("CALL"); // OptionType | Input CALL or PUT + String exercisedCoin = "USDT"; // String | Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input: `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT` + String investCoin = "BNB"; // String | Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input: `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT` + Long pageSize = 10L; // Long | Number of records per page + Long pageIndex = 1L; // Long | Page index + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { GetDualInvestmentProductListResponse result = apiInstance.getDualInvestmentProductList(optionType, exercisedCoin, investCoin, pageSize, pageIndex, recvWindow); System.out.println(result); @@ -54,12 +54,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **optionType** | **String**| Input CALL or PUT | | -| **exercisedCoin** | **String**| Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input: `optionType`:CALL,`exercisedCoin`:USDT,`investCoin`:BNB; if you subscribe to a low buy product (put option), you should input: `optionType`:PUT,`exercisedCoin`:BNB,`investCoin`:USDT | | -| **investCoin** | **String**| Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input: `optionType`:CALL,`exercisedCoin`:USDT,`investCoin`:BNB; if you subscribe to a low buy product (put option), you should input: `optionType`:PUT,`exercisedCoin`:BNB,`investCoin`:USDT | | -| **pageSize** | **Long**| Default: 10, Maximum: 100 | [optional] | -| **pageIndex** | **Long**| Default: 1 | [optional] | -| **recvWindow** | **Long**| The value cannot be greater than 60000 | [optional] | +| **optionType** | [**OptionType**](.md)| Input CALL or PUT | [enum: CALL, PUT] | +| **exercisedCoin** | **String**| Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input: `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT` | | +| **investCoin** | **String**| Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input: `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT` | | +| **pageSize** | **Long**| Number of records per page | [optional] | +| **pageIndex** | **Long**| Page index | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type diff --git a/clients/dual-investment/docs/OptionType.md b/clients/dual-investment/docs/OptionType.md new file mode 100644 index 000000000..a86925366 --- /dev/null +++ b/clients/dual-investment/docs/OptionType.md @@ -0,0 +1,13 @@ + + +# OptionType + +## Enum + + +* `CALL` (value: `"CALL"`) + +* `PUT` (value: `"PUT"`) + + + diff --git a/clients/dual-investment/docs/Status.md b/clients/dual-investment/docs/Status.md new file mode 100644 index 000000000..1a05a6b08 --- /dev/null +++ b/clients/dual-investment/docs/Status.md @@ -0,0 +1,23 @@ + + +# Status + +## Enum + + +* `PENDING` (value: `"PENDING"`) + +* `PURCHASE_SUCCESS` (value: `"PURCHASE_SUCCESS"`) + +* `SETTLED` (value: `"SETTLED"`) + +* `PURCHASE_FAIL` (value: `"PURCHASE_FAIL"`) + +* `REFUNDING` (value: `"REFUNDING"`) + +* `REFUND_SUCCESS` (value: `"REFUND_SUCCESS"`) + +* `SETTLING` (value: `"SETTLING"`) + + + diff --git a/clients/dual-investment/docs/SubscribeDualInvestmentProductsRequest.md b/clients/dual-investment/docs/SubscribeDualInvestmentProductsRequest.md index 485ff4c06..57b4ace43 100644 --- a/clients/dual-investment/docs/SubscribeDualInvestmentProductsRequest.md +++ b/clients/dual-investment/docs/SubscribeDualInvestmentProductsRequest.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | | -|**orderId** | **String** | | | -|**depositAmount** | **Double** | | | -|**autoCompoundPlan** | **String** | | | -|**recvWindow** | **Long** | | [optional] | +|**id** | **String** | get id from `/sapi/v1/dci/product/list` | | +|**orderId** | **String** | get orderId from `/sapi/v1/dci/product/list` | | +|**depositAmount** | **Double** | the amount for subscribing | | +|**autoCompoundPlan** | **AutoCompoundPlan** | | | +|**recvWindow** | **Long** | Request validity window in milliseconds | [optional] | diff --git a/clients/dual-investment/docs/SubscribeDualInvestmentProductsResponse.md b/clients/dual-investment/docs/SubscribeDualInvestmentProductsResponse.md index 1cc9a3320..d01344489 100644 --- a/clients/dual-investment/docs/SubscribeDualInvestmentProductsResponse.md +++ b/clients/dual-investment/docs/SubscribeDualInvestmentProductsResponse.md @@ -12,7 +12,7 @@ |**exercisedCoin** | **String** | | [optional] | |**subscriptionAmount** | **String** | | [optional] | |**duration** | **Long** | | [optional] | -|**autoCompoundPlan** | **String** | | [optional] | +|**autoCompoundPlan** | **String** | STANDARD, ADVANCED, this field won't display when autocompound is set to None | [optional] | |**strikePrice** | **String** | | [optional] | |**settleDate** | **Long** | | [optional] | |**purchaseStatus** | **String** | | [optional] | diff --git a/clients/dual-investment/docs/TradeApi.md b/clients/dual-investment/docs/TradeApi.md index 38e7014aa..ae5fb8e18 100644 --- a/clients/dual-investment/docs/TradeApi.md +++ b/clients/dual-investment/docs/TradeApi.md @@ -4,19 +4,19 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**changeAutoCompoundStatus**](TradeApi.md#changeAutoCompoundStatus) | **POST** /sapi/v1/dci/product/auto_compound/edit-status | Change Auto-Compound status(USER_DATA) | -| [**checkDualInvestmentAccounts**](TradeApi.md#checkDualInvestmentAccounts) | **GET** /sapi/v1/dci/product/accounts | Check Dual Investment accounts(USER_DATA) | -| [**getDualInvestmentPositions**](TradeApi.md#getDualInvestmentPositions) | **GET** /sapi/v1/dci/product/positions | Get Dual Investment positions(USER_DATA) | -| [**subscribeDualInvestmentProducts**](TradeApi.md#subscribeDualInvestmentProducts) | **POST** /sapi/v1/dci/product/subscribe | Subscribe Dual Investment products(USER_DATA) | +| [**changeAutoCompoundStatus**](TradeApi.md#changeAutoCompoundStatus) | **POST** /sapi/v1/dci/product/auto_compound/edit-status | Change Auto-Compound status (USER_DATA) | +| [**checkDualInvestmentAccounts**](TradeApi.md#checkDualInvestmentAccounts) | **GET** /sapi/v1/dci/product/accounts | Check Dual Investment accounts (USER_DATA) | +| [**getDualInvestmentPositions**](TradeApi.md#getDualInvestmentPositions) | **GET** /sapi/v1/dci/product/positions | Get Dual Investment positions (USER_DATA) | +| [**subscribeDualInvestmentProducts**](TradeApi.md#subscribeDualInvestmentProducts) | **POST** /sapi/v1/dci/product/subscribe | Subscribe Dual Investment products (USER_DATA) | # **changeAutoCompoundStatus** > ChangeAutoCompoundStatusResponse changeAutoCompoundStatus(changeAutoCompoundStatusRequest) -Change Auto-Compound status(USER_DATA) +Change Auto-Compound status (USER_DATA) -Change Auto-Compound status Weight: 1(IP) +Change Auto-Compound status Weight(IP): 1 Security Type: USER_DATA Notes: - 15:31 ~ 16:00 UTC+8: This function is disabled. ### Example ```java @@ -76,9 +76,9 @@ No authorization required # **checkDualInvestmentAccounts** > CheckDualInvestmentAccountsResponse checkDualInvestmentAccounts(recvWindow) -Check Dual Investment accounts(USER_DATA) +Check Dual Investment accounts (USER_DATA) -Check Dual Investment accounts Weight: 1(IP) +Check Dual Investment accounts Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -95,7 +95,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { CheckDualInvestmentAccountsResponse result = apiInstance.checkDualInvestmentAccounts(recvWindow); System.out.println(result); @@ -114,7 +114,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| The value cannot be greater than 60000 | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -138,9 +138,9 @@ No authorization required # **getDualInvestmentPositions** > GetDualInvestmentPositionsResponse getDualInvestmentPositions(status, pageSize, pageIndex, recvWindow) -Get Dual Investment positions(USER_DATA) +Get Dual Investment positions (USER_DATA) -Get Dual Investment positions (batch) Weight: 1(IP) +Get Dual Investment positions (batch) Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -157,10 +157,10 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String status = "status_example"; // String | `PENDING`:Products are purchasing, will give results later;`PURCHASE_SUCCESS`:purchase successfully;`SETTLED`: Products are finish settling;`PURCHASE_FAIL`:fail to purchase;`REFUNDING`:refund ongoing;`REFUND_SUCCESS`:refund to spot account successfully; `SETTLING`:Products are settling. If don't fill this field, will response all the position status. - Long pageSize = 56L; // Long | Default: 10, Maximum: 100 - Long pageIndex = 56L; // Long | Default: 1 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 + Status status = Status.fromValue("PENDING"); // Status | `PENDING`: Products are purchasing, will give results later; `PURCHASE_SUCCESS`: purchase successfully; `SETTLED`: Products are finish settling; `PURCHASE_FAIL`: fail to purchase; `REFUNDING`: refund ongoing; `REFUND_SUCCESS`: refund to spot account successfully; `SETTLING`: Products are settling. If don't fill this field, will response all the position status. + Long pageSize = 10L; // Long | Number of records per page + Long pageIndex = 1L; // Long | Page index + Long recvWindow = 5000L; // Long | Request validity window in milliseconds try { GetDualInvestmentPositionsResponse result = apiInstance.getDualInvestmentPositions(status, pageSize, pageIndex, recvWindow); System.out.println(result); @@ -179,10 +179,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **status** | **String**| `PENDING`:Products are purchasing, will give results later;`PURCHASE_SUCCESS`:purchase successfully;`SETTLED`: Products are finish settling;`PURCHASE_FAIL`:fail to purchase;`REFUNDING`:refund ongoing;`REFUND_SUCCESS`:refund to spot account successfully; `SETTLING`:Products are settling. If don't fill this field, will response all the position status. | [optional] | -| **pageSize** | **Long**| Default: 10, Maximum: 100 | [optional] | -| **pageIndex** | **Long**| Default: 1 | [optional] | -| **recvWindow** | **Long**| The value cannot be greater than 60000 | [optional] | +| **status** | [**Status**](.md)| `PENDING`: Products are purchasing, will give results later; `PURCHASE_SUCCESS`: purchase successfully; `SETTLED`: Products are finish settling; `PURCHASE_FAIL`: fail to purchase; `REFUNDING`: refund ongoing; `REFUND_SUCCESS`: refund to spot account successfully; `SETTLING`: Products are settling. If don't fill this field, will response all the position status. | [optional] [enum: PENDING, PURCHASE_SUCCESS, SETTLED, PURCHASE_FAIL, REFUNDING, REFUND_SUCCESS, SETTLING] | +| **pageSize** | **Long**| Number of records per page | [optional] | +| **pageIndex** | **Long**| Page index | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | ### Return type @@ -206,9 +206,9 @@ No authorization required # **subscribeDualInvestmentProducts** > SubscribeDualInvestmentProductsResponse subscribeDualInvestmentProducts(subscribeDualInvestmentProductsRequest) -Subscribe Dual Investment products(USER_DATA) +Subscribe Dual Investment products (USER_DATA) -Subscribe Dual Investment products * Products are not available. // this means APR changes to lower value, or orders are not unavailable. * Failed. This means System or network errors. Weight: 1(IP) +Subscribe Dual Investment products Weight(IP): 1 Security Type: USER_DATA Notes: - Failed messages: - Products are not available. This means APR changed to a lower value, or the order is unavailable. - Failed. This means system or network errors. ### Example ```java diff --git a/clients/dual-investment/docs/rest-api/migration-guide.md b/clients/dual-investment/docs/rest-api/migration-guide.md index 2e0d2e95b..3619bca1e 100644 --- a/clients/dual-investment/docs/rest-api/migration-guide.md +++ b/clients/dual-investment/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-dual-investment - 2.1.1 + 3.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-dual-investment - 2.1.1 + 3.0.0 ``` diff --git a/clients/dual-investment/example_rest.md b/clients/dual-investment/example_rest.md index e5b188089..62f7e2cec 100644 --- a/clients/dual-investment/example_rest.md +++ b/clients/dual-investment/example_rest.md @@ -1,14 +1,14 @@ ## MarketData -[GET /sapi/v1/dci/product/list](https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list) - getDualInvestmentProductList - [GetDualInvestmentProductListExample.java:47](/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/marketdata/GetDualInvestmentProductListExample.java#L47) +[GET /sapi/v1/dci/product/list](https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/market-data#get-dual-investment-product-list) - getDualInvestmentProductList - [GetDualInvestmentProductListExample.java:37](/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/marketdata/GetDualInvestmentProductListExample.java#L37) ## Trade -[POST /sapi/v1/dci/product/auto_compound/edit-status](https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status) - changeAutoCompoundStatus - [ChangeAutoCompoundStatusExample.java:48](/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/ChangeAutoCompoundStatusExample.java#L48) +[POST /sapi/v1/dci/product/auto_compound/edit-status](https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#change-auto-compound-status) - changeAutoCompoundStatus - [ChangeAutoCompoundStatusExample.java:39](/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/ChangeAutoCompoundStatusExample.java#L39) -[GET /sapi/v1/dci/product/accounts](https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts) - checkDualInvestmentAccounts - [CheckDualInvestmentAccountsExample.java:47](/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/CheckDualInvestmentAccountsExample.java#L47) +[GET /sapi/v1/dci/product/accounts](https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#check-dual-investment-accounts) - checkDualInvestmentAccounts - [CheckDualInvestmentAccountsExample.java:36](/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/CheckDualInvestmentAccountsExample.java#L36) -[GET /sapi/v1/dci/product/positions](https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions) - getDualInvestmentPositions - [GetDualInvestmentPositionsExample.java:47](/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/GetDualInvestmentPositionsExample.java#L47) +[GET /sapi/v1/dci/product/positions](https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#get-dual-investment-positions) - getDualInvestmentPositions - [GetDualInvestmentPositionsExample.java:37](/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/GetDualInvestmentPositionsExample.java#L37) -[POST /sapi/v1/dci/product/subscribe](https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products) - subscribeDualInvestmentProducts - [SubscribeDualInvestmentProductsExample.java:50](/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/SubscribeDualInvestmentProductsExample.java#L50) +[POST /sapi/v1/dci/product/subscribe](https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#subscribe-dual-investment-products) - subscribeDualInvestmentProducts - [SubscribeDualInvestmentProductsExample.java:40](/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/SubscribeDualInvestmentProductsExample.java#L40) diff --git a/clients/dual-investment/pom.xml b/clients/dual-investment/pom.xml index 73b6a0659..31f42b392 100644 --- a/clients/dual-investment/pom.xml +++ b/clients/dual-investment/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-dual-investment dual-investment - 2.1.2 + 3.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/JSON.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/JSON.java index 63c27af4d..d5f0aec25 100644 --- a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/JSON.java +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Dual Investment REST API - * OpenAPI Specification for the Binance Dual Investment REST API + * Dual Investment REST API + * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/DualInvestmentRestApi.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/DualInvestmentRestApi.java index 36174dd16..18c267e20 100644 --- a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/DualInvestmentRestApi.java +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/DualInvestmentRestApi.java @@ -10,6 +10,8 @@ import com.binance.connector.client.dual_investment.rest.model.CheckDualInvestmentAccountsResponse; import com.binance.connector.client.dual_investment.rest.model.GetDualInvestmentPositionsResponse; import com.binance.connector.client.dual_investment.rest.model.GetDualInvestmentProductListResponse; +import com.binance.connector.client.dual_investment.rest.model.OptionType; +import com.binance.connector.client.dual_investment.rest.model.Status; import com.binance.connector.client.dual_investment.rest.model.SubscribeDualInvestmentProductsRequest; import com.binance.connector.client.dual_investment.rest.model.SubscribeDualInvestmentProductsResponse; @@ -28,24 +30,22 @@ public DualInvestmentRestApi(ApiClient apiClient) { } /** - * Get Dual Investment product list Get Dual Investment product list Weight: 1(IP) + * Get Dual Investment product list Get Dual Investment product list Weight(IP): 1 * * @param optionType Input CALL or PUT (required) * @param exercisedCoin Target exercised asset, e.g.: if you subscribe to a high sell product - * (call option), you should input: - * `optionType`:CALL,`exercisedCoin`:USDT,`investCoin`:BNB; if - * you subscribe to a low buy product (put option), you should input: - * `optionType`:PUT,`exercisedCoin`:BNB,`investCoin`:USDT - * (required) + * (call option), you should input: `optionType: CALL`, `exercisedCoin: + * USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put + * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, + * `investCoin: USDT` (required) * @param investCoin Asset used for subscribing, e.g.: if you subscribe to a high sell product - * (call option), you should input: - * `optionType`:CALL,`exercisedCoin`:USDT,`investCoin`:BNB; if - * you subscribe to a low buy product (put option), you should input: - * `optionType`:PUT,`exercisedCoin`:BNB,`investCoin`:USDT - * (required) - * @param pageSize Default: 10, Maximum: 100 (optional) - * @param pageIndex Default: 1 (optional) - * @param recvWindow The value cannot be greater than 60000 (optional) + * (call option), you should input: `optionType: CALL`, `exercisedCoin: + * USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put + * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, + * `investCoin: USDT` (required) + * @param pageSize Number of records per page (optional) + * @param pageIndex Page index (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetDualInvestmentProductListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -57,11 +57,11 @@ public DualInvestmentRestApi(ApiClient apiClient) { * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/market-data#get-dual-investment-product-list">Get * Dual Investment product list Documentation */ public ApiResponse getDualInvestmentProductList( - String optionType, + OptionType optionType, String exercisedCoin, String investCoin, Long pageSize, @@ -73,7 +73,8 @@ public ApiResponse getDualInvestmentProduc } /** - * Change Auto-Compound status(USER_DATA) Change Auto-Compound status Weight: 1(IP) + * Change Auto-Compound status (USER_DATA) Change Auto-Compound status Weight(IP): 1 Security + * Type: USER_DATA Notes: - 15:31 ~ 16:00 UTC+8: This function is disabled. * * @param changeAutoCompoundStatusRequest (required) * @return ApiResponse<ChangeAutoCompoundStatusResponse> @@ -87,8 +88,8 @@ public ApiResponse getDualInvestmentProduc * * * @see Change - * Auto-Compound status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#change-auto-compound-status">Change + * Auto-Compound status (USER_DATA) Documentation */ public ApiResponse changeAutoCompoundStatus( ChangeAutoCompoundStatusRequest changeAutoCompoundStatusRequest) throws ApiException { @@ -96,9 +97,10 @@ public ApiResponse changeAutoCompoundStatus( } /** - * Check Dual Investment accounts(USER_DATA) Check Dual Investment accounts Weight: 1(IP) + * Check Dual Investment accounts (USER_DATA) Check Dual Investment accounts Weight(IP): 1 + * Security Type: USER_DATA * - * @param recvWindow The value cannot be greater than 60000 (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<CheckDualInvestmentAccountsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -110,8 +112,8 @@ public ApiResponse changeAutoCompoundStatus( * * * @see Check - * Dual Investment accounts(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#check-dual-investment-accounts">Check + * Dual Investment accounts (USER_DATA) Documentation */ public ApiResponse checkDualInvestmentAccounts( Long recvWindow) throws ApiException { @@ -119,17 +121,18 @@ public ApiResponse checkDualInvestmentAccou } /** - * Get Dual Investment positions(USER_DATA) Get Dual Investment positions (batch) Weight: 1(IP) + * Get Dual Investment positions (USER_DATA) Get Dual Investment positions (batch) Weight(IP): 1 + * Security Type: USER_DATA * - * @param status `PENDING`:Products are purchasing, will give results - * later;`PURCHASE_SUCCESS`:purchase successfully;`SETTLED`: Products - * are finish settling;`PURCHASE_FAIL`:fail to - * purchase;`REFUNDING`:refund ongoing;`REFUND_SUCCESS`:refund to spot - * account successfully; `SETTLING`:Products are settling. If don't fill this - * field, will response all the position status. (optional) - * @param pageSize Default: 10, Maximum: 100 (optional) - * @param pageIndex Default: 1 (optional) - * @param recvWindow The value cannot be greater than 60000 (optional) + * @param status `PENDING`: Products are purchasing, will give results later; + * `PURCHASE_SUCCESS`: purchase successfully; `SETTLED`: Products are + * finish settling; `PURCHASE_FAIL`: fail to purchase; `REFUNDING`: + * refund ongoing; `REFUND_SUCCESS`: refund to spot account successfully; + * `SETTLING`: Products are settling. If don't fill this field, will response + * all the position status. (optional) + * @param pageSize Number of records per page (optional) + * @param pageIndex Page index (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetDualInvestmentPositionsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -141,18 +144,19 @@ public ApiResponse checkDualInvestmentAccou * * * @see Get - * Dual Investment positions(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#get-dual-investment-positions">Get + * Dual Investment positions (USER_DATA) Documentation */ public ApiResponse getDualInvestmentPositions( - String status, Long pageSize, Long pageIndex, Long recvWindow) throws ApiException { + Status status, Long pageSize, Long pageIndex, Long recvWindow) throws ApiException { return tradeApi.getDualInvestmentPositions(status, pageSize, pageIndex, recvWindow); } /** - * Subscribe Dual Investment products(USER_DATA) Subscribe Dual Investment products * Products - * are not available. // this means APR changes to lower value, or orders are not unavailable. * - * Failed. This means System or network errors. Weight: 1(IP) + * Subscribe Dual Investment products (USER_DATA) Subscribe Dual Investment products Weight(IP): + * 1 Security Type: USER_DATA Notes: - Failed messages: - Products are not available. This means + * APR changed to a lower value, or the order is unavailable. - Failed. This means system or + * network errors. * * @param subscribeDualInvestmentProductsRequest (required) * @return ApiResponse<SubscribeDualInvestmentProductsResponse> @@ -166,8 +170,8 @@ public ApiResponse getDualInvestmentPosition * * * @see Subscribe - * Dual Investment products(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#subscribe-dual-investment-products">Subscribe + * Dual Investment products (USER_DATA) Documentation */ public ApiResponse subscribeDualInvestmentProducts( SubscribeDualInvestmentProductsRequest subscribeDualInvestmentProductsRequest) diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/MarketDataApi.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/MarketDataApi.java index 4d3d724a1..8754945e8 100644 --- a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/MarketDataApi.java +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/MarketDataApi.java @@ -1,6 +1,6 @@ /* - * Binance Dual Investment REST API - * OpenAPI Specification for the Binance Dual Investment REST API + * Dual Investment REST API + * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies. * * The version of the OpenAPI document: 1.0.0 * @@ -20,6 +20,7 @@ import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.exception.ConstraintViolationException; import com.binance.connector.client.dual_investment.rest.model.GetDualInvestmentProductListResponse; +import com.binance.connector.client.dual_investment.rest.model.OptionType; import com.google.gson.reflect.TypeToken; import jakarta.validation.ConstraintViolation; import jakarta.validation.Validation; @@ -42,7 +43,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-dual-investment/2.1.1 (Java/%s; %s; %s)", + "binance-dual-investment/3.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -84,20 +85,18 @@ public void setCustomBaseUrl(String customBaseUrl) { * * @param optionType Input CALL or PUT (required) * @param exercisedCoin Target exercised asset, e.g.: if you subscribe to a high sell product - * (call option), you should input: - * `optionType`:CALL,`exercisedCoin`:USDT,`investCoin`:BNB; if - * you subscribe to a low buy product (put option), you should input: - * `optionType`:PUT,`exercisedCoin`:BNB,`investCoin`:USDT - * (required) + * (call option), you should input: `optionType: CALL`, `exercisedCoin: + * USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put + * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, + * `investCoin: USDT` (required) * @param investCoin Asset used for subscribing, e.g.: if you subscribe to a high sell product - * (call option), you should input: - * `optionType`:CALL,`exercisedCoin`:USDT,`investCoin`:BNB; if - * you subscribe to a low buy product (put option), you should input: - * `optionType`:PUT,`exercisedCoin`:BNB,`investCoin`:USDT - * (required) - * @param pageSize Default: 10, Maximum: 100 (optional) - * @param pageIndex Default: 1 (optional) - * @param recvWindow The value cannot be greater than 60000 (optional) + * (call option), you should input: `optionType: CALL`, `exercisedCoin: + * USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put + * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, + * `investCoin: USDT` (required) + * @param pageSize Number of records per page (optional) + * @param pageIndex Page index (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -108,11 +107,11 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/market-data#get-dual-investment-product-list">Get * Dual Investment product list Documentation */ private okhttp3.Call getDualInvestmentProductListCall( - String optionType, + OptionType optionType, String exercisedCoin, String investCoin, Long pageSize, @@ -181,7 +180,6 @@ private okhttp3.Call getDualInvestmentProductListCall( localVarHeaderParams.put("Content-Type", localVarContentType); } Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); if (HAS_TIME_UNIT) { localVarAuthNames.add("timeUnit"); } @@ -200,7 +198,7 @@ private okhttp3.Call getDualInvestmentProductListCall( @SuppressWarnings("rawtypes") private okhttp3.Call getDualInvestmentProductListValidateBeforeCall( - String optionType, + OptionType optionType, String exercisedCoin, String investCoin, Long pageSize, @@ -223,7 +221,7 @@ private okhttp3.Call getDualInvestmentProductListValidateBeforeCall( this.getClass() .getMethod( "getDualInvestmentProductList", - String.class, + OptionType.class, String.class, String.class, Long.class, @@ -248,24 +246,22 @@ private okhttp3.Call getDualInvestmentProductListValidateBeforeCall( } /** - * Get Dual Investment product list Get Dual Investment product list Weight: 1(IP) + * Get Dual Investment product list Get Dual Investment product list Weight(IP): 1 * * @param optionType Input CALL or PUT (required) * @param exercisedCoin Target exercised asset, e.g.: if you subscribe to a high sell product - * (call option), you should input: - * `optionType`:CALL,`exercisedCoin`:USDT,`investCoin`:BNB; if - * you subscribe to a low buy product (put option), you should input: - * `optionType`:PUT,`exercisedCoin`:BNB,`investCoin`:USDT - * (required) + * (call option), you should input: `optionType: CALL`, `exercisedCoin: + * USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put + * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, + * `investCoin: USDT` (required) * @param investCoin Asset used for subscribing, e.g.: if you subscribe to a high sell product - * (call option), you should input: - * `optionType`:CALL,`exercisedCoin`:USDT,`investCoin`:BNB; if - * you subscribe to a low buy product (put option), you should input: - * `optionType`:PUT,`exercisedCoin`:BNB,`investCoin`:USDT - * (required) - * @param pageSize Default: 10, Maximum: 100 (optional) - * @param pageIndex Default: 1 (optional) - * @param recvWindow The value cannot be greater than 60000 (optional) + * (call option), you should input: `optionType: CALL`, `exercisedCoin: + * USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put + * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, + * `investCoin: USDT` (required) + * @param pageSize Number of records per page (optional) + * @param pageIndex Page index (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetDualInvestmentProductListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -277,16 +273,16 @@ private okhttp3.Call getDualInvestmentProductListValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/market-data#get-dual-investment-product-list">Get * Dual Investment product list Documentation */ public ApiResponse getDualInvestmentProductList( - @NotNull String optionType, + @NotNull OptionType optionType, @NotNull String exercisedCoin, @NotNull String investCoin, - Long pageSize, + @Max(100L) Long pageSize, Long pageIndex, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getDualInvestmentProductListValidateBeforeCall( diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/TradeApi.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/TradeApi.java index ab9abfb17..36aabdff3 100644 --- a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/TradeApi.java +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/TradeApi.java @@ -1,6 +1,6 @@ /* - * Binance Dual Investment REST API - * OpenAPI Specification for the Binance Dual Investment REST API + * Dual Investment REST API + * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies. * * The version of the OpenAPI document: 1.0.0 * @@ -24,6 +24,7 @@ import com.binance.connector.client.dual_investment.rest.model.ChangeAutoCompoundStatusResponse; import com.binance.connector.client.dual_investment.rest.model.CheckDualInvestmentAccountsResponse; import com.binance.connector.client.dual_investment.rest.model.GetDualInvestmentPositionsResponse; +import com.binance.connector.client.dual_investment.rest.model.Status; import com.binance.connector.client.dual_investment.rest.model.SubscribeDualInvestmentProductsRequest; import com.binance.connector.client.dual_investment.rest.model.SubscribeDualInvestmentProductsResponse; import com.google.gson.reflect.TypeToken; @@ -49,7 +50,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-dual-investment/2.1.1 (Java/%s; %s; %s)", + "binance-dual-investment/3.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -100,8 +101,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Change - * Auto-Compound status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#change-auto-compound-status">Change + * Auto-Compound status (USER_DATA) Documentation */ private okhttp3.Call changeAutoCompoundStatusCall( ChangeAutoCompoundStatusRequest changeAutoCompoundStatusRequest) throws ApiException { @@ -135,7 +136,7 @@ private okhttp3.Call changeAutoCompoundStatusCall( if (changeAutoCompoundStatusRequest.getAutoCompoundPlan() != null) { localVarFormParams.put( - "AutoCompoundPlan", changeAutoCompoundStatusRequest.getAutoCompoundPlan()); + "autoCompoundPlan", changeAutoCompoundStatusRequest.getAutoCompoundPlan()); } if (changeAutoCompoundStatusRequest.getRecvWindow() != null) { @@ -208,7 +209,8 @@ private okhttp3.Call changeAutoCompoundStatusValidateBeforeCall( } /** - * Change Auto-Compound status(USER_DATA) Change Auto-Compound status Weight: 1(IP) + * Change Auto-Compound status (USER_DATA) Change Auto-Compound status Weight(IP): 1 Security + * Type: USER_DATA Notes: - 15:31 ~ 16:00 UTC+8: This function is disabled. * * @param changeAutoCompoundStatusRequest (required) * @return ApiResponse<ChangeAutoCompoundStatusResponse> @@ -222,8 +224,8 @@ private okhttp3.Call changeAutoCompoundStatusValidateBeforeCall( * * * @see Change - * Auto-Compound status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#change-auto-compound-status">Change + * Auto-Compound status (USER_DATA) Documentation */ public ApiResponse changeAutoCompoundStatus( @Valid @NotNull ChangeAutoCompoundStatusRequest changeAutoCompoundStatusRequest) @@ -238,7 +240,7 @@ public ApiResponse changeAutoCompoundStatus( /** * Build call for checkDualInvestmentAccounts * - * @param recvWindow The value cannot be greater than 60000 (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -249,8 +251,8 @@ public ApiResponse changeAutoCompoundStatus( * * * @see Check - * Dual Investment accounts(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#check-dual-investment-accounts">Check + * Dual Investment accounts (USER_DATA) Documentation */ private okhttp3.Call checkDualInvestmentAccountsCall(Long recvWindow) throws ApiException { String basePath = null; @@ -343,9 +345,10 @@ private okhttp3.Call checkDualInvestmentAccountsValidateBeforeCall(Long recvWind } /** - * Check Dual Investment accounts(USER_DATA) Check Dual Investment accounts Weight: 1(IP) + * Check Dual Investment accounts (USER_DATA) Check Dual Investment accounts Weight(IP): 1 + * Security Type: USER_DATA * - * @param recvWindow The value cannot be greater than 60000 (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<CheckDualInvestmentAccountsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -357,11 +360,11 @@ private okhttp3.Call checkDualInvestmentAccountsValidateBeforeCall(Long recvWind * * * @see Check - * Dual Investment accounts(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#check-dual-investment-accounts">Check + * Dual Investment accounts (USER_DATA) Documentation */ public ApiResponse checkDualInvestmentAccounts( - Long recvWindow) throws ApiException { + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = checkDualInvestmentAccountsValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -371,15 +374,15 @@ public ApiResponse checkDualInvestmentAccou /** * Build call for getDualInvestmentPositions * - * @param status `PENDING`:Products are purchasing, will give results - * later;`PURCHASE_SUCCESS`:purchase successfully;`SETTLED`: Products - * are finish settling;`PURCHASE_FAIL`:fail to - * purchase;`REFUNDING`:refund ongoing;`REFUND_SUCCESS`:refund to spot - * account successfully; `SETTLING`:Products are settling. If don't fill this - * field, will response all the position status. (optional) - * @param pageSize Default: 10, Maximum: 100 (optional) - * @param pageIndex Default: 1 (optional) - * @param recvWindow The value cannot be greater than 60000 (optional) + * @param status `PENDING`: Products are purchasing, will give results later; + * `PURCHASE_SUCCESS`: purchase successfully; `SETTLED`: Products are + * finish settling; `PURCHASE_FAIL`: fail to purchase; `REFUNDING`: + * refund ongoing; `REFUND_SUCCESS`: refund to spot account successfully; + * `SETTLING`: Products are settling. If don't fill this field, will response + * all the position status. (optional) + * @param pageSize Number of records per page (optional) + * @param pageIndex Page index (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -390,11 +393,11 @@ public ApiResponse checkDualInvestmentAccou * * * @see Get - * Dual Investment positions(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#get-dual-investment-positions">Get + * Dual Investment positions (USER_DATA) Documentation */ private okhttp3.Call getDualInvestmentPositionsCall( - String status, Long pageSize, Long pageIndex, Long recvWindow) throws ApiException { + Status status, Long pageSize, Long pageIndex, Long recvWindow) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] {}; @@ -467,7 +470,7 @@ private okhttp3.Call getDualInvestmentPositionsCall( @SuppressWarnings("rawtypes") private okhttp3.Call getDualInvestmentPositionsValidateBeforeCall( - String status, Long pageSize, Long pageIndex, Long recvWindow) throws ApiException { + Status status, Long pageSize, Long pageIndex, Long recvWindow) throws ApiException { try { Validator validator = Validation.byDefaultProvider() @@ -482,7 +485,7 @@ private okhttp3.Call getDualInvestmentPositionsValidateBeforeCall( this.getClass() .getMethod( "getDualInvestmentPositions", - String.class, + Status.class, Long.class, Long.class, Long.class); @@ -504,17 +507,18 @@ private okhttp3.Call getDualInvestmentPositionsValidateBeforeCall( } /** - * Get Dual Investment positions(USER_DATA) Get Dual Investment positions (batch) Weight: 1(IP) + * Get Dual Investment positions (USER_DATA) Get Dual Investment positions (batch) Weight(IP): 1 + * Security Type: USER_DATA * - * @param status `PENDING`:Products are purchasing, will give results - * later;`PURCHASE_SUCCESS`:purchase successfully;`SETTLED`: Products - * are finish settling;`PURCHASE_FAIL`:fail to - * purchase;`REFUNDING`:refund ongoing;`REFUND_SUCCESS`:refund to spot - * account successfully; `SETTLING`:Products are settling. If don't fill this - * field, will response all the position status. (optional) - * @param pageSize Default: 10, Maximum: 100 (optional) - * @param pageIndex Default: 1 (optional) - * @param recvWindow The value cannot be greater than 60000 (optional) + * @param status `PENDING`: Products are purchasing, will give results later; + * `PURCHASE_SUCCESS`: purchase successfully; `SETTLED`: Products are + * finish settling; `PURCHASE_FAIL`: fail to purchase; `REFUNDING`: + * refund ongoing; `REFUND_SUCCESS`: refund to spot account successfully; + * `SETTLING`: Products are settling. If don't fill this field, will response + * all the position status. (optional) + * @param pageSize Number of records per page (optional) + * @param pageIndex Page index (optional) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetDualInvestmentPositionsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -526,11 +530,12 @@ private okhttp3.Call getDualInvestmentPositionsValidateBeforeCall( * * * @see Get - * Dual Investment positions(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#get-dual-investment-positions">Get + * Dual Investment positions (USER_DATA) Documentation */ public ApiResponse getDualInvestmentPositions( - String status, Long pageSize, Long pageIndex, Long recvWindow) throws ApiException { + Status status, @Max(100L) Long pageSize, Long pageIndex, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = getDualInvestmentPositionsValidateBeforeCall( status, pageSize, pageIndex, recvWindow); @@ -553,8 +558,8 @@ public ApiResponse getDualInvestmentPosition * * * @see Subscribe - * Dual Investment products(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#subscribe-dual-investment-products">Subscribe + * Dual Investment products (USER_DATA) Documentation */ private okhttp3.Call subscribeDualInvestmentProductsCall( SubscribeDualInvestmentProductsRequest subscribeDualInvestmentProductsRequest) @@ -676,9 +681,10 @@ private okhttp3.Call subscribeDualInvestmentProductsValidateBeforeCall( } /** - * Subscribe Dual Investment products(USER_DATA) Subscribe Dual Investment products * Products - * are not available. // this means APR changes to lower value, or orders are not unavailable. * - * Failed. This means System or network errors. Weight: 1(IP) + * Subscribe Dual Investment products (USER_DATA) Subscribe Dual Investment products Weight(IP): + * 1 Security Type: USER_DATA Notes: - Failed messages: - Products are not available. This means + * APR changed to a lower value, or the order is unavailable. - Failed. This means system or + * network errors. * * @param subscribeDualInvestmentProductsRequest (required) * @return ApiResponse<SubscribeDualInvestmentProductsResponse> @@ -692,8 +698,8 @@ private okhttp3.Call subscribeDualInvestmentProductsValidateBeforeCall( * * * @see Subscribe - * Dual Investment products(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#subscribe-dual-investment-products">Subscribe + * Dual Investment products (USER_DATA) Documentation */ public ApiResponse subscribeDualInvestmentProducts( @Valid @NotNull diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/AutoCompoundPlan.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/AutoCompoundPlan.java new file mode 100644 index 000000000..2cbb44cb1 --- /dev/null +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/AutoCompoundPlan.java @@ -0,0 +1,78 @@ +/* + * Dual Investment REST API + * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.dual_investment.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** + * `NONE`: switch off the plan, `STANDARD`: standard plan, `ADVANCED`: + * advanced plan + */ +@JsonAdapter(AutoCompoundPlan.Adapter.class) +public enum AutoCompoundPlan { + NONE("NONE"), + + STANDARD("STANDARD"), + + ADVANCED("ADVANCED"); + + private String value; + + AutoCompoundPlan(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AutoCompoundPlan fromValue(String value) { + for (AutoCompoundPlan b : AutoCompoundPlan.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AutoCompoundPlan enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AutoCompoundPlan read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AutoCompoundPlan.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AutoCompoundPlan.fromValue(value); + } +} diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/ChangeAutoCompoundStatusRequest.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/ChangeAutoCompoundStatusRequest.java index 5b79a790a..254e4acf4 100644 --- a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/ChangeAutoCompoundStatusRequest.java +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/ChangeAutoCompoundStatusRequest.java @@ -1,6 +1,6 @@ /* - * Binance Dual Investment REST API - * OpenAPI Specification for the Binance Dual Investment REST API + * Dual Investment REST API + * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -34,7 +35,7 @@ /** ChangeAutoCompoundStatusRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeAutoCompoundStatusRequest { public static final String SERIALIZED_NAME_POSITION_ID = "positionId"; @@ -42,11 +43,11 @@ public class ChangeAutoCompoundStatusRequest { @jakarta.annotation.Nonnull private String positionId; - public static final String SERIALIZED_NAME_AUTO_COMPOUND_PLAN = "AutoCompoundPlan"; + public static final String SERIALIZED_NAME_AUTO_COMPOUND_PLAN = "autoCompoundPlan"; @SerializedName(SERIALIZED_NAME_AUTO_COMPOUND_PLAN) - @jakarta.annotation.Nullable - private String autoCompoundPlan; + @jakarta.annotation.Nonnull + private AutoCompoundPlan autoCompoundPlan; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -63,7 +64,7 @@ public ChangeAutoCompoundStatusRequest positionId( } /** - * Get positionId + * Get positionId from `/sapi/v1/dci/product/positions` * * @return positionId */ @@ -78,7 +79,7 @@ public void setPositionId(@jakarta.annotation.Nonnull String positionId) { } public ChangeAutoCompoundStatusRequest autoCompoundPlan( - @jakarta.annotation.Nullable String autoCompoundPlan) { + @jakarta.annotation.Nonnull AutoCompoundPlan autoCompoundPlan) { this.autoCompoundPlan = autoCompoundPlan; return this; } @@ -88,12 +89,14 @@ public ChangeAutoCompoundStatusRequest autoCompoundPlan( * * @return autoCompoundPlan */ - @jakarta.annotation.Nullable - public String getAutoCompoundPlan() { + @jakarta.annotation.Nonnull + @NotNull + @Valid + public AutoCompoundPlan getAutoCompoundPlan() { return autoCompoundPlan; } - public void setAutoCompoundPlan(@jakarta.annotation.Nullable String autoCompoundPlan) { + public void setAutoCompoundPlan(@jakarta.annotation.Nonnull AutoCompoundPlan autoCompoundPlan) { this.autoCompoundPlan = autoCompoundPlan; } @@ -104,11 +107,12 @@ public ChangeAutoCompoundStatusRequest recvWindow( } /** - * Get recvWindow + * Request validity window in milliseconds maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -193,12 +197,13 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("positionId"); - openapiFields.add("AutoCompoundPlan"); + openapiFields.add("autoCompoundPlan"); openapiFields.add("recvWindow"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("positionId"); + openapiRequiredFields.add("autoCompoundPlan"); } /** @@ -237,15 +242,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("positionId").toString())); } - if ((jsonObj.get("AutoCompoundPlan") != null - && !jsonObj.get("AutoCompoundPlan").isJsonNull()) - && !jsonObj.get("AutoCompoundPlan").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AutoCompoundPlan` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("AutoCompoundPlan").toString())); - } + // validate the required field `autoCompoundPlan` + AutoCompoundPlan.validateJsonElement(jsonObj.get("autoCompoundPlan")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/ChangeAutoCompoundStatusResponse.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/ChangeAutoCompoundStatusResponse.java index ab15080fc..ab3940eb8 100644 --- a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/ChangeAutoCompoundStatusResponse.java +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/ChangeAutoCompoundStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Dual Investment REST API - * OpenAPI Specification for the Binance Dual Investment REST API + * Dual Investment REST API + * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ChangeAutoCompoundStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ChangeAutoCompoundStatusResponse { public static final String SERIALIZED_NAME_POSITION_ID = "positionId"; @@ -77,7 +77,7 @@ public ChangeAutoCompoundStatusResponse autoCompoundPlan( } /** - * Get autoCompoundPlan + * Auto-compound plan after the update * * @return autoCompoundPlan */ diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/CheckDualInvestmentAccountsResponse.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/CheckDualInvestmentAccountsResponse.java index 0b325b819..e9e1575c8 100644 --- a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/CheckDualInvestmentAccountsResponse.java +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/CheckDualInvestmentAccountsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Dual Investment REST API - * OpenAPI Specification for the Binance Dual Investment REST API + * Dual Investment REST API + * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CheckDualInvestmentAccountsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CheckDualInvestmentAccountsResponse { public static final String SERIALIZED_NAME_TOTAL_AMOUNT_IN_B_T_C = "totalAmountInBTC"; @@ -57,7 +57,7 @@ public CheckDualInvestmentAccountsResponse totalAmountInBTC( } /** - * Get totalAmountInBTC + * Total BTC amount in Dual Investment * * @return totalAmountInBTC */ @@ -77,7 +77,7 @@ public CheckDualInvestmentAccountsResponse totalAmountInUSDT( } /** - * Get totalAmountInUSDT + * Total USDT equivalent amount in Dual Investment * * @return totalAmountInUSDT */ diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/GetDualInvestmentPositionsResponse.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/GetDualInvestmentPositionsResponse.java index fa2071761..05e4eb44e 100644 --- a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/GetDualInvestmentPositionsResponse.java +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/GetDualInvestmentPositionsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Dual Investment REST API - * OpenAPI Specification for the Binance Dual Investment REST API + * Dual Investment REST API + * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetDualInvestmentPositionsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDualInvestmentPositionsResponse { public static final String SERIALIZED_NAME_TOTAL = "total"; diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/GetDualInvestmentPositionsResponseListInner.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/GetDualInvestmentPositionsResponseListInner.java index 658537e56..c8e1d9bcc 100644 --- a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/GetDualInvestmentPositionsResponseListInner.java +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/GetDualInvestmentPositionsResponseListInner.java @@ -1,6 +1,6 @@ /* - * Binance Dual Investment REST API - * OpenAPI Specification for the Binance Dual Investment REST API + * Dual Investment REST API + * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetDualInvestmentPositionsResponseListInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDualInvestmentPositionsResponseListInner { public static final String SERIALIZED_NAME_ID = "id"; @@ -114,6 +114,12 @@ public class GetDualInvestmentPositionsResponseListInner { @jakarta.annotation.Nullable private String autoCompoundPlan; + public static final String SERIALIZED_NAME_SUBSCRIPTION_TIME = "subscriptionTime"; + + @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_TIME) + @jakarta.annotation.Nullable + private Long subscriptionTime; + public GetDualInvestmentPositionsResponseListInner() {} public GetDualInvestmentPositionsResponseListInner id(@jakarta.annotation.Nullable String id) { @@ -122,7 +128,7 @@ public GetDualInvestmentPositionsResponseListInner id(@jakarta.annotation.Nullab } /** - * Get id + * positionId * * @return id */ @@ -262,7 +268,8 @@ public GetDualInvestmentPositionsResponseListInner purchaseStatus( } /** - * Get purchaseStatus + * Purchase status. Possible values include PENDING, PURCHASE_SUCCESS, SETTLED, PURCHASE_FAIL, + * REFUNDING, REFUND_SUCCESS, and SETTLING. * * @return purchaseStatus */ @@ -362,7 +369,7 @@ public GetDualInvestmentPositionsResponseListInner autoCompoundPlan( } /** - * Get autoCompoundPlan + * NULL, STANDARD, ADVANCED * * @return autoCompoundPlan */ @@ -375,6 +382,26 @@ public void setAutoCompoundPlan(@jakarta.annotation.Nullable String autoCompound this.autoCompoundPlan = autoCompoundPlan; } + public GetDualInvestmentPositionsResponseListInner subscriptionTime( + @jakarta.annotation.Nullable Long subscriptionTime) { + this.subscriptionTime = subscriptionTime; + return this; + } + + /** + * Get subscriptionTime + * + * @return subscriptionTime + */ + @jakarta.annotation.Nullable + public Long getSubscriptionTime() { + return subscriptionTime; + } + + public void setSubscriptionTime(@jakarta.annotation.Nullable Long subscriptionTime) { + this.subscriptionTime = subscriptionTime; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -412,7 +439,10 @@ public boolean equals(Object o) { this.optionType, getDualInvestmentPositionsResponseListInner.optionType) && Objects.equals( this.autoCompoundPlan, - getDualInvestmentPositionsResponseListInner.autoCompoundPlan); + getDualInvestmentPositionsResponseListInner.autoCompoundPlan) + && Objects.equals( + this.subscriptionTime, + getDualInvestmentPositionsResponseListInner.subscriptionTime); } @Override @@ -430,7 +460,8 @@ public int hashCode() { orderId, purchaseEndTime, optionType, - autoCompoundPlan); + autoCompoundPlan, + subscriptionTime); } @Override @@ -452,6 +483,7 @@ public String toString() { sb.append(" purchaseEndTime: ").append(toIndentedString(purchaseEndTime)).append("\n"); sb.append(" optionType: ").append(toIndentedString(optionType)).append("\n"); sb.append(" autoCompoundPlan: ").append(toIndentedString(autoCompoundPlan)).append("\n"); + sb.append(" subscriptionTime: ").append(toIndentedString(subscriptionTime)).append("\n"); sb.append("}"); return sb.toString(); } @@ -513,6 +545,10 @@ public String toUrlQueryString() { String autoCompoundPlanValueAsString = ""; autoCompoundPlanValueAsString = autoCompoundPlanValue.toString(); sb.append("autoCompoundPlan=").append(urlEncode(autoCompoundPlanValueAsString)).append(""); + Object subscriptionTimeValue = getSubscriptionTime(); + String subscriptionTimeValueAsString = ""; + subscriptionTimeValueAsString = subscriptionTimeValue.toString(); + sb.append("subscriptionTime=").append(urlEncode(subscriptionTimeValueAsString)).append(""); return sb.toString(); } @@ -554,6 +590,7 @@ private String toIndentedString(Object o) { openapiFields.add("purchaseEndTime"); openapiFields.add("optionType"); openapiFields.add("autoCompoundPlan"); + openapiFields.add("subscriptionTime"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/GetDualInvestmentProductListResponse.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/GetDualInvestmentProductListResponse.java index 7f5c98f14..7efddc877 100644 --- a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/GetDualInvestmentProductListResponse.java +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/GetDualInvestmentProductListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Dual Investment REST API - * OpenAPI Specification for the Binance Dual Investment REST API + * Dual Investment REST API + * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetDualInvestmentProductListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDualInvestmentProductListResponse { public static final String SERIALIZED_NAME_TOTAL = "total"; diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/GetDualInvestmentProductListResponseListInner.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/GetDualInvestmentProductListResponseListInner.java index 537b41956..5327cf56b 100644 --- a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/GetDualInvestmentProductListResponseListInner.java +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/GetDualInvestmentProductListResponseListInner.java @@ -1,6 +1,6 @@ /* - * Binance Dual Investment REST API - * OpenAPI Specification for the Binance Dual Investment REST API + * Dual Investment REST API + * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** GetDualInvestmentProductListResponseListInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDualInvestmentProductListResponseListInner { public static final String SERIALIZED_NAME_ID = "id"; @@ -311,7 +311,7 @@ public GetDualInvestmentProductListResponseListInner canPurchase( } /** - * Get canPurchase + * Whether the product can be subscribed to currently * * @return canPurchase */ @@ -451,7 +451,7 @@ public GetDualInvestmentProductListResponseListInner isAutoCompoundEnable( } /** - * Get isAutoCompoundEnable + * Whether auto-compound is enabled for this product * * @return isAutoCompoundEnable */ @@ -480,7 +480,7 @@ public GetDualInvestmentProductListResponseListInner addAutoCompoundPlanListItem } /** - * Get autoCompoundPlanList + * Available auto-compound plans for this product * * @return autoCompoundPlanList */ diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/OptionType.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/OptionType.java new file mode 100644 index 000000000..bbaf69f16 --- /dev/null +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/OptionType.java @@ -0,0 +1,73 @@ +/* + * Dual Investment REST API + * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.dual_investment.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets optionType */ +@JsonAdapter(OptionType.Adapter.class) +public enum OptionType { + CALL("CALL"), + + PUT("PUT"); + + private String value; + + OptionType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OptionType fromValue(String value) { + for (OptionType b : OptionType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OptionType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OptionType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OptionType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OptionType.fromValue(value); + } +} diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/Status.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/Status.java new file mode 100644 index 000000000..19448399c --- /dev/null +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/Status.java @@ -0,0 +1,83 @@ +/* + * Dual Investment REST API + * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.dual_investment.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets status */ +@JsonAdapter(Status.Adapter.class) +public enum Status { + PENDING("PENDING"), + + PURCHASE_SUCCESS("PURCHASE_SUCCESS"), + + SETTLED("SETTLED"), + + PURCHASE_FAIL("PURCHASE_FAIL"), + + REFUNDING("REFUNDING"), + + REFUND_SUCCESS("REFUND_SUCCESS"), + + SETTLING("SETTLING"); + + private String value; + + Status(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Status fromValue(String value) { + for (Status b : Status.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Status enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Status read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Status.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Status.fromValue(value); + } +} diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/SubscribeDualInvestmentProductsRequest.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/SubscribeDualInvestmentProductsRequest.java index 1678905af..850f8942b 100644 --- a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/SubscribeDualInvestmentProductsRequest.java +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/SubscribeDualInvestmentProductsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Dual Investment REST API - * OpenAPI Specification for the Binance Dual Investment REST API + * Dual Investment REST API + * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** SubscribeDualInvestmentProductsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubscribeDualInvestmentProductsRequest { public static final String SERIALIZED_NAME_ID = "id"; @@ -59,7 +59,7 @@ public class SubscribeDualInvestmentProductsRequest { @SerializedName(SERIALIZED_NAME_AUTO_COMPOUND_PLAN) @jakarta.annotation.Nonnull - private String autoCompoundPlan; + private AutoCompoundPlan autoCompoundPlan; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -75,7 +75,7 @@ public SubscribeDualInvestmentProductsRequest id(@jakarta.annotation.Nonnull Str } /** - * Get id + * get id from `/sapi/v1/dci/product/list` * * @return id */ @@ -96,7 +96,7 @@ public SubscribeDualInvestmentProductsRequest orderId( } /** - * Get orderId + * get orderId from `/sapi/v1/dci/product/list` * * @return orderId */ @@ -117,7 +117,7 @@ public SubscribeDualInvestmentProductsRequest depositAmount( } /** - * Get depositAmount + * the amount for subscribing * * @return depositAmount */ @@ -133,7 +133,7 @@ public void setDepositAmount(@jakarta.annotation.Nonnull Double depositAmount) { } public SubscribeDualInvestmentProductsRequest autoCompoundPlan( - @jakarta.annotation.Nonnull String autoCompoundPlan) { + @jakarta.annotation.Nonnull AutoCompoundPlan autoCompoundPlan) { this.autoCompoundPlan = autoCompoundPlan; return this; } @@ -145,11 +145,12 @@ public SubscribeDualInvestmentProductsRequest autoCompoundPlan( */ @jakarta.annotation.Nonnull @NotNull - public String getAutoCompoundPlan() { + @Valid + public AutoCompoundPlan getAutoCompoundPlan() { return autoCompoundPlan; } - public void setAutoCompoundPlan(@jakarta.annotation.Nonnull String autoCompoundPlan) { + public void setAutoCompoundPlan(@jakarta.annotation.Nonnull AutoCompoundPlan autoCompoundPlan) { this.autoCompoundPlan = autoCompoundPlan; } @@ -160,11 +161,12 @@ public SubscribeDualInvestmentProductsRequest recvWindow( } /** - * Get recvWindow + * Request validity window in milliseconds maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -321,13 +323,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("orderId").toString())); } - if (!jsonObj.get("autoCompoundPlan").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `autoCompoundPlan` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("autoCompoundPlan").toString())); - } + // validate the required field `autoCompoundPlan` + AutoCompoundPlan.validateJsonElement(jsonObj.get("autoCompoundPlan")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/SubscribeDualInvestmentProductsResponse.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/SubscribeDualInvestmentProductsResponse.java index b9618862a..78efc98d1 100644 --- a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/SubscribeDualInvestmentProductsResponse.java +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/model/SubscribeDualInvestmentProductsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Dual Investment REST API - * OpenAPI Specification for the Binance Dual Investment REST API + * Dual Investment REST API + * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SubscribeDualInvestmentProductsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubscribeDualInvestmentProductsResponse { public static final String SERIALIZED_NAME_POSITION_ID = "positionId"; @@ -223,7 +223,7 @@ public SubscribeDualInvestmentProductsResponse autoCompoundPlan( } /** - * Get autoCompoundPlan + * STANDARD, ADVANCED, this field won't display when autocompound is set to None * * @return autoCompoundPlan */ diff --git a/clients/dual-investment/src/test/java/com/binance/connector/client/dual_investment/rest/api/MarketDataApiTest.java b/clients/dual-investment/src/test/java/com/binance/connector/client/dual_investment/rest/api/MarketDataApiTest.java index 4d7671f03..404f5b885 100644 --- a/clients/dual-investment/src/test/java/com/binance/connector/client/dual_investment/rest/api/MarketDataApiTest.java +++ b/clients/dual-investment/src/test/java/com/binance/connector/client/dual_investment/rest/api/MarketDataApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Dual Investment REST API - * OpenAPI Specification for the Binance Dual Investment REST API + * Dual Investment REST API + * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies. * * The version of the OpenAPI document: 1.0.0 * @@ -24,7 +24,9 @@ import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; import com.binance.connector.client.dual_investment.rest.model.GetDualInvestmentProductListResponse; +import com.binance.connector.client.dual_investment.rest.model.OptionType; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -78,15 +80,16 @@ public void initApiClient() throws ApiException { /** * Get Dual Investment product list * - *

Get Dual Investment product list Weight: 1(IP) + *

Get Dual Investment product list Weight(IP): 1 * * @throws ApiException if the Api call fails */ @Test - public void getDualInvestmentProductListTest() throws ApiException, CryptoException { - String optionType = ""; - String exercisedCoin = ""; - String investCoin = ""; + public void getDualInvestmentProductListTest() + throws ApiException, CryptoException, IOException { + OptionType optionType = OptionType.CALL; + String exercisedCoin = "USDT"; + String investCoin = "BNB"; Long pageSize = 10L; Long pageIndex = 1L; Long recvWindow = 5000L; @@ -101,7 +104,9 @@ public void getDualInvestmentProductListTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("a24c80386b012637d68f2551fc77091cc04ed85361110636f1c4234d58735200", actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/dci/product/list", actualRequest.url().encodedPath()); } } diff --git a/clients/dual-investment/src/test/java/com/binance/connector/client/dual_investment/rest/api/TradeApiTest.java b/clients/dual-investment/src/test/java/com/binance/connector/client/dual_investment/rest/api/TradeApiTest.java index a029bae3e..c5cb6c444 100644 --- a/clients/dual-investment/src/test/java/com/binance/connector/client/dual_investment/rest/api/TradeApiTest.java +++ b/clients/dual-investment/src/test/java/com/binance/connector/client/dual_investment/rest/api/TradeApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Dual Investment REST API - * OpenAPI Specification for the Binance Dual Investment REST API + * Dual Investment REST API + * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies. * * The version of the OpenAPI document: 1.0.0 * @@ -23,13 +23,16 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; +import com.binance.connector.client.dual_investment.rest.model.AutoCompoundPlan; import com.binance.connector.client.dual_investment.rest.model.ChangeAutoCompoundStatusRequest; import com.binance.connector.client.dual_investment.rest.model.ChangeAutoCompoundStatusResponse; import com.binance.connector.client.dual_investment.rest.model.CheckDualInvestmentAccountsResponse; import com.binance.connector.client.dual_investment.rest.model.GetDualInvestmentPositionsResponse; +import com.binance.connector.client.dual_investment.rest.model.Status; import com.binance.connector.client.dual_investment.rest.model.SubscribeDualInvestmentProductsRequest; import com.binance.connector.client.dual_investment.rest.model.SubscribeDualInvestmentProductsResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -81,18 +84,19 @@ public void initApiClient() throws ApiException { } /** - * Change Auto-Compound status(USER_DATA) + * Change Auto-Compound status (USER_DATA) * - *

Change Auto-Compound status Weight: 1(IP) + *

Change Auto-Compound status Weight(IP): 1 Security Type: USER_DATA Notes: - 15:31 ~ 16:00 + * UTC+8: This function is disabled. * * @throws ApiException if the Api call fails */ @Test - public void changeAutoCompoundStatusTest() throws ApiException, CryptoException { + public void changeAutoCompoundStatusTest() throws ApiException, CryptoException, IOException { ChangeAutoCompoundStatusRequest changeAutoCompoundStatusRequest = new ChangeAutoCompoundStatusRequest(); - - changeAutoCompoundStatusRequest.positionId("1"); + changeAutoCompoundStatusRequest.positionId("741590"); + changeAutoCompoundStatusRequest.autoCompoundPlan(AutoCompoundPlan.NONE); ApiResponse response = api.changeAutoCompoundStatus(changeAutoCompoundStatusRequest); @@ -107,24 +111,23 @@ public void changeAutoCompoundStatusTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000positionId=1", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000autoCompoundPlan=NONE&positionId=741590", signInputCaptor.getValue()); assertEquals( - "05345189012e725ecf394a569c76b468c3a9d6377f5b644a1b90e1551920ce91", + "e31bd851a2eedfec73db47922e033769393a8018b305c7d5fdf13a5cc6fb776e", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/dci/product/auto_compound/edit-status", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/dci/product/auto_compound/edit-status", actualRequest.url().encodedPath()); } /** - * Check Dual Investment accounts(USER_DATA) + * Check Dual Investment accounts (USER_DATA) * - *

Check Dual Investment accounts Weight: 1(IP) + *

Check Dual Investment accounts Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void checkDualInvestmentAccountsTest() throws ApiException, CryptoException { + public void checkDualInvestmentAccountsTest() + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.checkDualInvestmentAccounts(recvWindow); @@ -147,15 +150,15 @@ public void checkDualInvestmentAccountsTest() throws ApiException, CryptoExcepti } /** - * Get Dual Investment positions(USER_DATA) + * Get Dual Investment positions (USER_DATA) * - *

Get Dual Investment positions (batch) Weight: 1(IP) + *

Get Dual Investment positions (batch) Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getDualInvestmentPositionsTest() throws ApiException, CryptoException { - String status = ""; + public void getDualInvestmentPositionsTest() throws ApiException, CryptoException, IOException { + Status status = Status.PENDING; Long pageSize = 10L; Long pageIndex = 1L; Long recvWindow = 5000L; @@ -172,33 +175,31 @@ public void getDualInvestmentPositionsTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("status=PENDING&pageSize=10&pageIndex=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "status=&pageSize=10&pageIndex=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "8d4826ce79b5dc7d026d0e57a40f1e16a368e00c38fe09afd78f785093d092d7", + "80e88e826b339ac8dbaaddc768a17b0f696bf4d702159e4cb583ce7ffbb8c5ee", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/dci/product/positions", actualRequest.url().encodedPath()); } /** - * Subscribe Dual Investment products(USER_DATA) + * Subscribe Dual Investment products (USER_DATA) * - *

Subscribe Dual Investment products * Products are not available. // this means APR changes - * to lower value, or orders are not unavailable. * Failed. This means System or network errors. - * Weight: 1(IP) + *

Subscribe Dual Investment products Weight(IP): 1 Security Type: USER_DATA Notes: - Failed + * messages: - Products are not available. This means APR changed to a lower value, or the order + * is unavailable. - Failed. This means system or network errors. * * @throws ApiException if the Api call fails */ @Test - public void subscribeDualInvestmentProductsTest() throws ApiException, CryptoException { + public void subscribeDualInvestmentProductsTest() + throws ApiException, CryptoException, IOException { SubscribeDualInvestmentProductsRequest subscribeDualInvestmentProductsRequest = new SubscribeDualInvestmentProductsRequest(); - - subscribeDualInvestmentProductsRequest.id(""); - subscribeDualInvestmentProductsRequest.orderId("1"); + subscribeDualInvestmentProductsRequest.id("741590"); + subscribeDualInvestmentProductsRequest.orderId("8257205859"); subscribeDualInvestmentProductsRequest.depositAmount(1d); - subscribeDualInvestmentProductsRequest.autoCompoundPlan("NONE"); + subscribeDualInvestmentProductsRequest.autoCompoundPlan(AutoCompoundPlan.NONE); ApiResponse response = api.subscribeDualInvestmentProducts(subscribeDualInvestmentProductsRequest); @@ -213,11 +214,9 @@ public void subscribeDualInvestmentProductsTest() throws ApiException, CryptoExc Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000depositAmount=1&autoCompoundPlan=NONE&orderId=8257205859&id=741590", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000depositAmount=1&autoCompoundPlan=NONE&orderId=1&id=", - signInputCaptor.getValue()); - assertEquals( - "c33f9d1dd0044db4e3dce19f93fcb81487a9c92151363981c666833756aab241", + "93d9f0e227ea10a44ee9b5a5640a430a90f71cfe7ab210baa867b35cfe527c7c", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/dci/product/subscribe", actualRequest.url().encodedPath()); } diff --git a/clients/fiat/CHANGELOG.md b/clients/fiat/CHANGELOG.md index c0cd54536..510da7cbf 100644 --- a/clients/fiat/CHANGELOG.md +++ b/clients/fiat/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 3.0.0 - 2026-07-29 + +- Update descriptions and examples. + ## 2.0.1 - 2026-04-30 - Update `binance/common` module to version `2.4.2`. diff --git a/clients/fiat/docs/AccountInfo.md b/clients/fiat/docs/AccountInfo.md deleted file mode 100644 index 27eb9f10d..000000000 --- a/clients/fiat/docs/AccountInfo.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# AccountInfo - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountNumber** | **String** | | [optional] | - - - diff --git a/clients/fiat/docs/ApiPaymentMethod.md b/clients/fiat/docs/ApiPaymentMethod.md new file mode 100644 index 000000000..7e717a9e1 --- /dev/null +++ b/clients/fiat/docs/ApiPaymentMethod.md @@ -0,0 +1,11 @@ + + +# ApiPaymentMethod + +## Enum + + +* `bank_transfer` (value: `"bank_transfer"`) + + + diff --git a/clients/fiat/docs/DefaultApi.md b/clients/fiat/docs/DefaultApi.md new file mode 100644 index 000000000..03c3ad61d --- /dev/null +++ b/clients/fiat/docs/DefaultApi.md @@ -0,0 +1,349 @@ +# DefaultApi + +All URIs are relative to *https://api.binance.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**deposit**](DefaultApi.md#deposit) | **POST** /sapi/v1/fiat/deposit | Deposit (TRADE) | +| [**fiatWithdraw**](DefaultApi.md#fiatWithdraw) | **POST** /sapi/v2/fiat/withdraw | Fiat Withdraw (TRADE) | +| [**getFiatDepositWithdrawHistory**](DefaultApi.md#getFiatDepositWithdrawHistory) | **GET** /sapi/v1/fiat/orders | Get Fiat Deposit/Withdraw History (USER_DATA) | +| [**getFiatPaymentsHistory**](DefaultApi.md#getFiatPaymentsHistory) | **GET** /sapi/v1/fiat/payments | Get Fiat Payments History (USER_DATA) | +| [**getOrderDetail**](DefaultApi.md#getOrderDetail) | **GET** /sapi/v1/fiat/get-order-detail | Get Order Detail (USER_DATA) | + + + +# **deposit** +> DepositResponse deposit(depositRequest, recvWindow) + +Deposit (TRADE) + +Submit deposit request, in this version, we only support BRL deposit via pix. For BRL deposit via pix, you need to place an order before making a transfer from your bank. Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website. Weight(UID): 45000 Security Type: TRADE Notes: - `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`. + +### Example +```java +// Import classes: +import com.binance.connector.client.fiat.ApiClient; +import com.binance.connector.client.fiat.ApiException; +import com.binance.connector.client.fiat.Configuration; +import com.binance.connector.client.fiat.models.*; +import com.binance.connector.client.fiat.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + DepositRequest depositRequest = new DepositRequest(); // DepositRequest | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds + try { + DepositResponse result = apiInstance.deposit(depositRequest, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#deposit"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **depositRequest** | [**DepositRequest**](DepositRequest.md)| | | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | + +### Return type + +[**DepositResponse**](DepositResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Deposit | - | + + +# **fiatWithdraw** +> FiatWithdrawResponse fiatWithdraw(fiatWithdrawRequest, recvWindow) + +Fiat Withdraw (TRADE) + +Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer. You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful. Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website. Weight(UID): 45000 Security Type: TRADE + +### Example +```java +// Import classes: +import com.binance.connector.client.fiat.ApiClient; +import com.binance.connector.client.fiat.ApiException; +import com.binance.connector.client.fiat.Configuration; +import com.binance.connector.client.fiat.models.*; +import com.binance.connector.client.fiat.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + FiatWithdrawRequest fiatWithdrawRequest = new FiatWithdrawRequest(); // FiatWithdrawRequest | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds + try { + FiatWithdrawResponse result = apiInstance.fiatWithdraw(fiatWithdrawRequest, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#fiatWithdraw"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **fiatWithdrawRequest** | [**FiatWithdrawRequest**](FiatWithdrawRequest.md)| | | +| **recvWindow** | **Long**| Request validity window in milliseconds | [optional] | + +### Return type + +[**FiatWithdrawResponse**](FiatWithdrawResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fiat Withdraw | - | + + +# **getFiatDepositWithdrawHistory** +> GetFiatDepositWithdrawHistoryResponse getFiatDepositWithdrawHistory(transactionType, beginTime, endTime, page, rows, recvWindow) + +Get Fiat Deposit/Withdraw History (USER_DATA) + +Get Fiat Deposit/Withdraw History Weight(UID): 45000 Security Type: USER_DATA Notes: - If `beginTime` and `endTime` are not sent, recent 30-day data is returned. + +### Example +```java +// Import classes: +import com.binance.connector.client.fiat.ApiClient; +import com.binance.connector.client.fiat.ApiException; +import com.binance.connector.client.fiat.Configuration; +import com.binance.connector.client.fiat.models.*; +import com.binance.connector.client.fiat.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String transactionType = "0"; // String | 0: deposit, 1: withdraw + Long beginTime = 1641782889000L; // Long | + Long endTime = 1641782889000L; // Long | + Long page = 1L; // Long | + Long rows = 100L; // Long | + Long recvWindow = 5000L; // Long | + try { + GetFiatDepositWithdrawHistoryResponse result = apiInstance.getFiatDepositWithdrawHistory(transactionType, beginTime, endTime, page, rows, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getFiatDepositWithdrawHistory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **transactionType** | **String**| 0: deposit, 1: withdraw | | +| **beginTime** | **Long**| | [optional] | +| **endTime** | **Long**| | [optional] | +| **page** | **Long**| | [optional] | +| **rows** | **Long**| | [optional] | +| **recvWindow** | **Long**| | [optional] | + +### Return type + +[**GetFiatDepositWithdrawHistoryResponse**](GetFiatDepositWithdrawHistoryResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Get Fiat Deposit/Withdraw History | - | + + +# **getFiatPaymentsHistory** +> GetFiatPaymentsHistoryResponse getFiatPaymentsHistory(transactionType, beginTime, endTime, page, rows, recvWindow) + +Get Fiat Payments History (USER_DATA) + +Get Fiat Payments History Weight(IP): 1 Security Type: USER_DATA Notes: - If `beginTime` and `endTime` are not sent, recent 30-day data is returned. - `paymentMethod` is returned only when querying buy history (`transactionType=0`). - Supported payment methods: `Cash Balance`, `Credit Card`, `Online Banking`, `Bank Transfer`. + +### Example +```java +// Import classes: +import com.binance.connector.client.fiat.ApiClient; +import com.binance.connector.client.fiat.ApiException; +import com.binance.connector.client.fiat.Configuration; +import com.binance.connector.client.fiat.models.*; +import com.binance.connector.client.fiat.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String transactionType = "0"; // String | 0: buy, 1: sell + Long beginTime = 1641782889000L; // Long | + Long endTime = 1641782889000L; // Long | + Long page = 1L; // Long | + Long rows = 100L; // Long | + Long recvWindow = 5000L; // Long | + try { + GetFiatPaymentsHistoryResponse result = apiInstance.getFiatPaymentsHistory(transactionType, beginTime, endTime, page, rows, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getFiatPaymentsHistory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **transactionType** | **String**| 0: buy, 1: sell | | +| **beginTime** | **Long**| | [optional] | +| **endTime** | **Long**| | [optional] | +| **page** | **Long**| | [optional] | +| **rows** | **Long**| | [optional] | +| **recvWindow** | **Long**| | [optional] | + +### Return type + +[**GetFiatPaymentsHistoryResponse**](GetFiatPaymentsHistoryResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Get Fiat Payments History | - | + + +# **getOrderDetail** +> GetOrderDetailResponse getOrderDetail(orderNo, recvWindow) + +Get Order Detail (USER_DATA) + +Get Order Detail Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website. Weight(IP): 1 Security Type: USER_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.fiat.ApiClient; +import com.binance.connector.client.fiat.ApiException; +import com.binance.connector.client.fiat.Configuration; +import com.binance.connector.client.fiat.models.*; +import com.binance.connector.client.fiat.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String orderNo = "036752*678"; // String | Order ID retrieved from the withdrawal API + Long recvWindow = 5000L; // Long | + try { + GetOrderDetailResponse result = apiInstance.getOrderDetail(orderNo, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getOrderDetail"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderNo** | **String**| Order ID retrieved from the withdrawal API | | +| **recvWindow** | **Long**| | [optional] | + +### Return type + +[**GetOrderDetailResponse**](GetOrderDetailResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Get Order Detail | - | + diff --git a/clients/fiat/docs/DepositRequest.md b/clients/fiat/docs/DepositRequest.md index df5194904..0bfba4215 100644 --- a/clients/fiat/docs/DepositRequest.md +++ b/clients/fiat/docs/DepositRequest.md @@ -7,10 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**recvWindow** | **Long** | | [optional] | |**currency** | **String** | | | -|**apiPaymentMethod** | **String** | | | -|**amount** | **Long** | | | +|**apiPaymentMethod** | **ApiPaymentMethod** | | | +|**amount** | **String** | deposit amount | | |**ext** | **Object** | | [optional] | diff --git a/clients/fiat/docs/FiatApi.md b/clients/fiat/docs/FiatApi.md deleted file mode 100644 index 7de4b1297..000000000 --- a/clients/fiat/docs/FiatApi.md +++ /dev/null @@ -1,345 +0,0 @@ -# FiatApi - -All URIs are relative to *https://api.binance.com* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**deposit**](FiatApi.md#deposit) | **POST** /sapi/v1/fiat/deposit | Deposit(TRADE) | -| [**fiatWithdraw**](FiatApi.md#fiatWithdraw) | **POST** /sapi/v2/fiat/withdraw | Fiat Withdraw(WITHDRAW) | -| [**getFiatDepositWithdrawHistory**](FiatApi.md#getFiatDepositWithdrawHistory) | **GET** /sapi/v1/fiat/orders | Get Fiat Deposit/Withdraw History (USER_DATA) | -| [**getFiatPaymentsHistory**](FiatApi.md#getFiatPaymentsHistory) | **GET** /sapi/v1/fiat/payments | Get Fiat Payments History (USER_DATA) | -| [**getOrderDetail**](FiatApi.md#getOrderDetail) | **GET** /sapi/v1/fiat/get-order-detail | Get Order Detail(USER_DATA) | - - - -# **deposit** -> DepositResponse deposit(depositRequest) - -Deposit(TRADE) - -Submit deposit request, in this version, we only support BRL deposit via pix. For BRL deposit via pix, you need to place an order before making a transfer from your bank. Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website. Weight: 45000 - -### Example -```java -// Import classes: -import com.binance.connector.client.fiat.ApiClient; -import com.binance.connector.client.fiat.ApiException; -import com.binance.connector.client.fiat.Configuration; -import com.binance.connector.client.fiat.models.*; -import com.binance.connector.client.fiat.rest.api.FiatApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - FiatApi apiInstance = new FiatApi(defaultClient); - DepositRequest depositRequest = new DepositRequest(); // DepositRequest | - try { - DepositResponse result = apiInstance.deposit(depositRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FiatApi#deposit"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **depositRequest** | [**DepositRequest**](DepositRequest.md)| | | - -### Return type - -[**DepositResponse**](DepositResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Deposit | - | - - -# **fiatWithdraw** -> FiatWithdrawResponse fiatWithdraw(fiatWithdrawRequest) - -Fiat Withdraw(WITHDRAW) - -Submit withdraw request, in this version, we only support BRL withdrawal via bank_transfer. You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful. Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website. you need to bind your bank account on web/app before using the corresponding account number Weight: 45000 - -### Example -```java -// Import classes: -import com.binance.connector.client.fiat.ApiClient; -import com.binance.connector.client.fiat.ApiException; -import com.binance.connector.client.fiat.Configuration; -import com.binance.connector.client.fiat.models.*; -import com.binance.connector.client.fiat.rest.api.FiatApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - FiatApi apiInstance = new FiatApi(defaultClient); - FiatWithdrawRequest fiatWithdrawRequest = new FiatWithdrawRequest(); // FiatWithdrawRequest | - try { - FiatWithdrawResponse result = apiInstance.fiatWithdraw(fiatWithdrawRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FiatApi#fiatWithdraw"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fiatWithdrawRequest** | [**FiatWithdrawRequest**](FiatWithdrawRequest.md)| | | - -### Return type - -[**FiatWithdrawResponse**](FiatWithdrawResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Fiat Withdraw | - | - - -# **getFiatDepositWithdrawHistory** -> GetFiatDepositWithdrawHistoryResponse getFiatDepositWithdrawHistory(transactionType, beginTime, endTime, page, rows, recvWindow) - -Get Fiat Deposit/Withdraw History (USER_DATA) - -Get Fiat Deposit/Withdraw History * If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight: 45000 - -### Example -```java -// Import classes: -import com.binance.connector.client.fiat.ApiClient; -import com.binance.connector.client.fiat.ApiException; -import com.binance.connector.client.fiat.Configuration; -import com.binance.connector.client.fiat.models.*; -import com.binance.connector.client.fiat.rest.api.FiatApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - FiatApi apiInstance = new FiatApi(defaultClient); - String transactionType = "transactionType_example"; // String | 0-buy,1-sell - Long beginTime = 56L; // Long | - Long endTime = 56L; // Long | - Long page = 56L; // Long | default 1 - Long rows = 56L; // Long | default 100, max 500 - Long recvWindow = 56L; // Long | - try { - GetFiatDepositWithdrawHistoryResponse result = apiInstance.getFiatDepositWithdrawHistory(transactionType, beginTime, endTime, page, rows, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FiatApi#getFiatDepositWithdrawHistory"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **transactionType** | **String**| 0-buy,1-sell | | -| **beginTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **page** | **Long**| default 1 | [optional] | -| **rows** | **Long**| default 100, max 500 | [optional] | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**GetFiatDepositWithdrawHistoryResponse**](GetFiatDepositWithdrawHistoryResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Get Fiat Deposit/Withdraw History | - | - - -# **getFiatPaymentsHistory** -> GetFiatPaymentsHistoryResponse getFiatPaymentsHistory(transactionType, beginTime, endTime, page, rows, recvWindow) - -Get Fiat Payments History (USER_DATA) - -Get Fiat Deposit/Withdraw History * If beginTime and endTime are not sent, the recent 30-day data will be returned. * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have: * Cash Balance * Credit Card * Online Banking * Bank Transfer Weight: 1 - -### Example -```java -// Import classes: -import com.binance.connector.client.fiat.ApiClient; -import com.binance.connector.client.fiat.ApiException; -import com.binance.connector.client.fiat.Configuration; -import com.binance.connector.client.fiat.models.*; -import com.binance.connector.client.fiat.rest.api.FiatApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - FiatApi apiInstance = new FiatApi(defaultClient); - String transactionType = "transactionType_example"; // String | 0-buy,1-sell - Long beginTime = 56L; // Long | - Long endTime = 56L; // Long | - Long page = 56L; // Long | default 1 - Long rows = 56L; // Long | default 100, max 500 - Long recvWindow = 56L; // Long | - try { - GetFiatPaymentsHistoryResponse result = apiInstance.getFiatPaymentsHistory(transactionType, beginTime, endTime, page, rows, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FiatApi#getFiatPaymentsHistory"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **transactionType** | **String**| 0-buy,1-sell | | -| **beginTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **page** | **Long**| default 1 | [optional] | -| **rows** | **Long**| default 100, max 500 | [optional] | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**GetFiatPaymentsHistoryResponse**](GetFiatPaymentsHistoryResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Get Fiat Payments History | - | - - -# **getOrderDetail** -> GetOrderDetailResponse getOrderDetail(orderNo, recvWindow) - -Get Order Detail(USER_DATA) - -Get Order Detail Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website. Weight: 1 - -### Example -```java -// Import classes: -import com.binance.connector.client.fiat.ApiClient; -import com.binance.connector.client.fiat.ApiException; -import com.binance.connector.client.fiat.Configuration; -import com.binance.connector.client.fiat.models.*; -import com.binance.connector.client.fiat.rest.api.FiatApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - FiatApi apiInstance = new FiatApi(defaultClient); - String orderNo = "orderNo_example"; // String | order id retrieved from the api call of withdrawal - Long recvWindow = 56L; // Long | - try { - GetOrderDetailResponse result = apiInstance.getOrderDetail(orderNo, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FiatApi#getOrderDetail"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **orderNo** | **String**| order id retrieved from the api call of withdrawal | | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**GetOrderDetailResponse**](GetOrderDetailResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Get Order Detail | - | - diff --git a/clients/fiat/docs/FiatWithdrawRequest.md b/clients/fiat/docs/FiatWithdrawRequest.md index 24df9e071..c1484cb23 100644 --- a/clients/fiat/docs/FiatWithdrawRequest.md +++ b/clients/fiat/docs/FiatWithdrawRequest.md @@ -7,11 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**recvWindow** | **Long** | | [optional] | -|**currency** | **String** | | | -|**apiPaymentMethod** | **String** | | | -|**amount** | **Long** | | | -|**accountInfo** | [**AccountInfo**](AccountInfo.md) | | | +|**currency** | **String** | Fiat currency, such as BRL, ARS, MXN | | +|**apiPaymentMethod** | **ApiPaymentMethod** | | | +|**amount** | **Long** | withdraw amount | | +|**accountInfo** | [**FiatWithdrawRequestAccountInfo**](FiatWithdrawRequestAccountInfo.md) | | | |**ext** | **Object** | | [optional] | diff --git a/clients/fiat/docs/FiatWithdrawRequestAccountInfo.md b/clients/fiat/docs/FiatWithdrawRequestAccountInfo.md new file mode 100644 index 000000000..4d66622bd --- /dev/null +++ b/clients/fiat/docs/FiatWithdrawRequestAccountInfo.md @@ -0,0 +1,17 @@ + + +# FiatWithdrawRequestAccountInfo + +withdraw account info + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accountNumber** | **String** | Your destination bank account number is required to receive the withdrawal. In Argentina, this will be your CBU/CVU; in Mexico, it will be your CLABE. | | +|**agency** | **String** | Bank agency code. If contains a hyphen (e.g. `123-4`), enter `123` only. | [optional] | +|**bankCodeForPix** | **String** | Bank code used for PIX routing. | [optional] | +|**accountType** | **String** | Account type, e.g. `current` (Checking Account), `saving` (Savings Account), etc. | [optional] | + + + diff --git a/clients/fiat/docs/GetFiatDepositWithdrawHistoryResponseDataInner.md b/clients/fiat/docs/GetFiatDepositWithdrawHistoryResponseDataInner.md index 7d460c1fa..f8057ca2e 100644 --- a/clients/fiat/docs/GetFiatDepositWithdrawHistoryResponseDataInner.md +++ b/clients/fiat/docs/GetFiatDepositWithdrawHistoryResponseDataInner.md @@ -13,7 +13,7 @@ |**amount** | **String** | | [optional] | |**totalFee** | **String** | | [optional] | |**method** | **String** | | [optional] | -|**status** | **String** | | [optional] | +|**status** | **String** | Processing, Failed, Successful, Finished, Refunding, Refunded, Refund Failed, Order Partial Credit Stopped | [optional] | |**createTime** | **Long** | | [optional] | |**updateTime** | **Long** | | [optional] | diff --git a/clients/fiat/docs/rest-api/migration-guide.md b/clients/fiat/docs/rest-api/migration-guide.md index df9be5a19..24e0b26d5 100644 --- a/clients/fiat/docs/rest-api/migration-guide.md +++ b/clients/fiat/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-fiat - 2.0.0 + 3.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-fiat - 2.0.0 + 3.0.0 ``` diff --git a/clients/fiat/example_rest.md b/clients/fiat/example_rest.md index 72cc0f53f..dbdafdfc8 100644 --- a/clients/fiat/example_rest.md +++ b/clients/fiat/example_rest.md @@ -1,12 +1,12 @@ -## Fiat +## Default -[POST /sapi/v1/fiat/deposit](https://developers.binance.com/docs/fiat/rest-api/Fiat-Deposit) - deposit - [DepositExample.java:50](/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/DepositExample.java#L50) +[POST /sapi/v1/fiat/deposit](https://developers.binance.com/en/docs/catalog/investment-and-services-fiat/api/rest-api/~#deposit) - deposit - [DepositExample.java:44](/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/DepositExample.java#L44) -[POST /sapi/v2/fiat/withdraw](https://developers.binance.com/docs/fiat/rest-api/Fiat-Withdraw) - fiatWithdraw - [FiatWithdrawExample.java:53](/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/FiatWithdrawExample.java#L53) +[POST /sapi/v2/fiat/withdraw](https://developers.binance.com/en/docs/catalog/investment-and-services-fiat/api/rest-api/~#fiat-withdraw) - fiatWithdraw - [FiatWithdrawExample.java:42](/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/FiatWithdrawExample.java#L42) -[GET /sapi/v1/fiat/orders](https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History) - getFiatDepositWithdrawHistory - [GetFiatDepositWithdrawHistoryExample.java:47](/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/GetFiatDepositWithdrawHistoryExample.java#L47) +[GET /sapi/v1/fiat/orders](https://developers.binance.com/en/docs/catalog/investment-and-services-fiat/api/rest-api/~#get-fiat-deposit-withdraw-history) - getFiatDepositWithdrawHistory - [GetFiatDepositWithdrawHistoryExample.java:36](/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/GetFiatDepositWithdrawHistoryExample.java#L36) -[GET /sapi/v1/fiat/payments](https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History) - getFiatPaymentsHistory - [GetFiatPaymentsHistoryExample.java:49](/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/GetFiatPaymentsHistoryExample.java#L49) +[GET /sapi/v1/fiat/payments](https://developers.binance.com/en/docs/catalog/investment-and-services-fiat/api/rest-api/~#get-fiat-payments-history) - getFiatPaymentsHistory - [GetFiatPaymentsHistoryExample.java:39](/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/GetFiatPaymentsHistoryExample.java#L39) -[GET /sapi/v1/fiat/get-order-detail](https://developers.binance.com/docs/fiat/rest-api/Get-Order-Detail) - getOrderDetail - [GetOrderDetailExample.java:47](/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/GetOrderDetailExample.java#L47) +[GET /sapi/v1/fiat/get-order-detail](https://developers.binance.com/en/docs/catalog/investment-and-services-fiat/api/rest-api/~#get-order-detail) - getOrderDetail - [GetOrderDetailExample.java:37](/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/GetOrderDetailExample.java#L37) diff --git a/clients/fiat/pom.xml b/clients/fiat/pom.xml index bf58389b0..1d4e1811c 100644 --- a/clients/fiat/pom.xml +++ b/clients/fiat/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-fiat fiat - 2.0.1 + 3.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/JSON.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/JSON.java index 46f9fab2d..d0eefd831 100644 --- a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/JSON.java +++ b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Fiat REST API - * OpenAPI Specification for the Binance Fiat REST API + * Fiat REST API + * Query Binance fiat deposit and withdrawal history. * * The version of the OpenAPI document: 1.0.0 * @@ -108,9 +108,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.fiat.rest.model.AccountInfo - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.fiat.rest.model.DepositRequest .CustomTypeAdapterFactory()); @@ -123,6 +120,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.fiat.rest.model.FiatWithdrawRequest .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.fiat.rest.model.FiatWithdrawRequestAccountInfo + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.fiat.rest.model.FiatWithdrawResponse .CustomTypeAdapterFactory()); diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/api/DefaultApi.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/api/DefaultApi.java new file mode 100644 index 000000000..ff1dcc7e2 --- /dev/null +++ b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/api/DefaultApi.java @@ -0,0 +1,954 @@ +/* + * Fiat REST API + * Query Binance fiat deposit and withdrawal history. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.fiat.rest.api; + +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.JSON; +import com.binance.connector.client.common.Pair; +import com.binance.connector.client.common.SystemUtil; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.exception.ConstraintViolationException; +import com.binance.connector.client.fiat.rest.model.DepositRequest; +import com.binance.connector.client.fiat.rest.model.DepositResponse; +import com.binance.connector.client.fiat.rest.model.FiatWithdrawRequest; +import com.binance.connector.client.fiat.rest.model.FiatWithdrawResponse; +import com.binance.connector.client.fiat.rest.model.GetFiatDepositWithdrawHistoryResponse; +import com.binance.connector.client.fiat.rest.model.GetFiatPaymentsHistoryResponse; +import com.binance.connector.client.fiat.rest.model.GetOrderDetailResponse; +import com.google.gson.reflect.TypeToken; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Valid; +import jakarta.validation.Validation; +import jakarta.validation.Validator; +import jakarta.validation.constraints.*; +import jakarta.validation.executable.ExecutableValidator; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; + +public class DefaultApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + private static final String USER_AGENT = + String.format( + "binance-fiat/3.0.0 (Java/%s; %s; %s)", + SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); + private static final boolean HAS_TIME_UNIT = false; + + public DefaultApi(ClientConfiguration clientConfiguration) { + this(new ApiClient(clientConfiguration)); + } + + public DefaultApi(ApiClient apiClient) { + apiClient.setUserAgent(USER_AGENT); + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for deposit + * + * @param depositRequest (required) + * @param recvWindow Request validity window in milliseconds (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Deposit -
+ * + * @see Deposit + * (TRADE) Documentation + */ + private okhttp3.Call depositCall(DepositRequest depositRequest, Long recvWindow) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/fiat/deposit"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (depositRequest.getCurrency() != null) { + localVarFormParams.put("currency", depositRequest.getCurrency()); + } + + if (depositRequest.getApiPaymentMethod() != null) { + localVarFormParams.put("apiPaymentMethod", depositRequest.getApiPaymentMethod()); + } + + if (depositRequest.getAmount() != null) { + localVarFormParams.put("amount", depositRequest.getAmount()); + } + + if (depositRequest.getExt() != null) { + localVarFormParams.put("ext", depositRequest.getExt()); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call depositValidateBeforeCall(DepositRequest depositRequest, Long recvWindow) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {depositRequest, recvWindow}; + Method method = this.getClass().getMethod("deposit", DepositRequest.class, Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return depositCall(depositRequest, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Deposit (TRADE) Submit deposit request, in this version, we only support BRL deposit via pix. + * For BRL deposit via pix, you need to place an order before making a transfer from your bank. + * Before calling this api, please make sure you have already completed your KYC or KYB, and + * already activated your fiat service on our website. Weight(UID): 45000 Security Type: TRADE + * Notes: - `timestamp`, `signature` and `recvWindow` are sent as + * query-string parameters, while the business fields (`currency`, + * `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON + * request body with `Content-Type: application/json`. + * + * @param depositRequest (required) + * @param recvWindow Request validity window in milliseconds (optional) + * @return ApiResponse<DepositResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Deposit -
+ * + * @see Deposit + * (TRADE) Documentation + */ + public ApiResponse deposit( + @Valid @NotNull DepositRequest depositRequest, @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = depositValidateBeforeCall(depositRequest, recvWindow); + java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for fiatWithdraw + * + * @param fiatWithdrawRequest (required) + * @param recvWindow Request validity window in milliseconds (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fiat Withdraw -
+ * + * @see Fiat + * Withdraw (TRADE) Documentation + */ + private okhttp3.Call fiatWithdrawCall(FiatWithdrawRequest fiatWithdrawRequest, Long recvWindow) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v2/fiat/withdraw"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (fiatWithdrawRequest.getCurrency() != null) { + localVarFormParams.put("currency", fiatWithdrawRequest.getCurrency()); + } + + if (fiatWithdrawRequest.getApiPaymentMethod() != null) { + localVarFormParams.put("apiPaymentMethod", fiatWithdrawRequest.getApiPaymentMethod()); + } + + if (fiatWithdrawRequest.getAmount() != null) { + localVarFormParams.put("amount", fiatWithdrawRequest.getAmount()); + } + + if (fiatWithdrawRequest.getAccountInfo() != null) { + String json = JSON.getGson().toJson(fiatWithdrawRequest.getAccountInfo()); + localVarFormParams.put("accountInfo", json); + } + + if (fiatWithdrawRequest.getExt() != null) { + localVarFormParams.put("ext", fiatWithdrawRequest.getExt()); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fiatWithdrawValidateBeforeCall( + FiatWithdrawRequest fiatWithdrawRequest, Long recvWindow) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {fiatWithdrawRequest, recvWindow}; + Method method = + this.getClass() + .getMethod("fiatWithdraw", FiatWithdrawRequest.class, Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return fiatWithdrawCall(fiatWithdrawRequest, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Fiat Withdraw (TRADE) Submit withdraw request, in this version, we support BRL,ARS,MXN + * withdrawal via bank_transfer. You need to call this api first, and call query order detail + * api in a loop to get the status of the order until this order is successful. Before calling + * this api, please make sure you have already completed your KYC or KYB, and already activated + * your fiat service on our website. Weight(UID): 45000 Security Type: TRADE + * + * @param fiatWithdrawRequest (required) + * @param recvWindow Request validity window in milliseconds (optional) + * @return ApiResponse<FiatWithdrawResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fiat Withdraw -
+ * + * @see Fiat + * Withdraw (TRADE) Documentation + */ + public ApiResponse fiatWithdraw( + @Valid @NotNull FiatWithdrawRequest fiatWithdrawRequest, @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = fiatWithdrawValidateBeforeCall(fiatWithdrawRequest, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for getFiatDepositWithdrawHistory + * + * @param transactionType 0: deposit, 1: withdraw (required) + * @param beginTime (optional) + * @param endTime (optional) + * @param page (optional) + * @param rows (optional) + * @param recvWindow (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get Fiat Deposit/Withdraw History -
+ * + * @see Get + * Fiat Deposit/Withdraw History (USER_DATA) Documentation + */ + private okhttp3.Call getFiatDepositWithdrawHistoryCall( + String transactionType, + Long beginTime, + Long endTime, + Long page, + Long rows, + Long recvWindow) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/fiat/orders"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (transactionType != null) { + localVarQueryParams.addAll( + localVarApiClient.parameterToPair("transactionType", transactionType)); + } + + if (beginTime != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("beginTime", beginTime)); + } + + if (endTime != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endTime", endTime)); + } + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (rows != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("rows", rows)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getFiatDepositWithdrawHistoryValidateBeforeCall( + String transactionType, + Long beginTime, + Long endTime, + Long page, + Long rows, + Long recvWindow) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = { + transactionType, beginTime, endTime, page, rows, recvWindow + }; + Method method = + this.getClass() + .getMethod( + "getFiatDepositWithdrawHistory", + String.class, + Long.class, + Long.class, + Long.class, + Long.class, + Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return getFiatDepositWithdrawHistoryCall( + transactionType, beginTime, endTime, page, rows, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Get Fiat Deposit/Withdraw History (USER_DATA) Get Fiat Deposit/Withdraw History Weight(UID): + * 45000 Security Type: USER_DATA Notes: - If `beginTime` and `endTime` are + * not sent, recent 30-day data is returned. + * + * @param transactionType 0: deposit, 1: withdraw (required) + * @param beginTime (optional) + * @param endTime (optional) + * @param page (optional) + * @param rows (optional) + * @param recvWindow (optional) + * @return ApiResponse<GetFiatDepositWithdrawHistoryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get Fiat Deposit/Withdraw History -
+ * + * @see Get + * Fiat Deposit/Withdraw History (USER_DATA) Documentation + */ + public ApiResponse getFiatDepositWithdrawHistory( + @NotNull String transactionType, + Long beginTime, + Long endTime, + Long page, + @Max(500L) Long rows, + @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = + getFiatDepositWithdrawHistoryValidateBeforeCall( + transactionType, beginTime, endTime, page, rows, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for getFiatPaymentsHistory + * + * @param transactionType 0: buy, 1: sell (required) + * @param beginTime (optional) + * @param endTime (optional) + * @param page (optional) + * @param rows (optional) + * @param recvWindow (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get Fiat Payments History -
+ * + * @see Get + * Fiat Payments History (USER_DATA) Documentation + */ + private okhttp3.Call getFiatPaymentsHistoryCall( + String transactionType, + Long beginTime, + Long endTime, + Long page, + Long rows, + Long recvWindow) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/fiat/payments"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (transactionType != null) { + localVarQueryParams.addAll( + localVarApiClient.parameterToPair("transactionType", transactionType)); + } + + if (beginTime != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("beginTime", beginTime)); + } + + if (endTime != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endTime", endTime)); + } + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (rows != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("rows", rows)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getFiatPaymentsHistoryValidateBeforeCall( + String transactionType, + Long beginTime, + Long endTime, + Long page, + Long rows, + Long recvWindow) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = { + transactionType, beginTime, endTime, page, rows, recvWindow + }; + Method method = + this.getClass() + .getMethod( + "getFiatPaymentsHistory", + String.class, + Long.class, + Long.class, + Long.class, + Long.class, + Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return getFiatPaymentsHistoryCall( + transactionType, beginTime, endTime, page, rows, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Get Fiat Payments History (USER_DATA) Get Fiat Payments History Weight(IP): 1 Security Type: + * USER_DATA Notes: - If `beginTime` and `endTime` are not sent, recent + * 30-day data is returned. - `paymentMethod` is returned only when querying buy + * history (`transactionType=0`). - Supported payment methods: `Cash + * Balance`, `Credit Card`, `Online Banking`, `Bank + * Transfer`. + * + * @param transactionType 0: buy, 1: sell (required) + * @param beginTime (optional) + * @param endTime (optional) + * @param page (optional) + * @param rows (optional) + * @param recvWindow (optional) + * @return ApiResponse<GetFiatPaymentsHistoryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get Fiat Payments History -
+ * + * @see Get + * Fiat Payments History (USER_DATA) Documentation + */ + public ApiResponse getFiatPaymentsHistory( + @NotNull String transactionType, + Long beginTime, + Long endTime, + Long page, + @Max(500L) Long rows, + @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = + getFiatPaymentsHistoryValidateBeforeCall( + transactionType, beginTime, endTime, page, rows, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for getOrderDetail + * + * @param orderNo Order ID retrieved from the withdrawal API (required) + * @param recvWindow (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get Order Detail -
+ * + * @see Get + * Order Detail (USER_DATA) Documentation + */ + private okhttp3.Call getOrderDetailCall(String orderNo, Long recvWindow) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/fiat/get-order-detail"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (orderNo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("orderNo", orderNo)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getOrderDetailValidateBeforeCall(String orderNo, Long recvWindow) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {orderNo, recvWindow}; + Method method = this.getClass().getMethod("getOrderDetail", String.class, Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return getOrderDetailCall(orderNo, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Get Order Detail (USER_DATA) Get Order Detail Before calling this api, please make sure you + * have already completed your KYC or KYB, and already activated your fiat service on our + * website. Weight(IP): 1 Security Type: USER_DATA + * + * @param orderNo Order ID retrieved from the withdrawal API (required) + * @param recvWindow (optional) + * @return ApiResponse<GetOrderDetailResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get Order Detail -
+ * + * @see Get + * Order Detail (USER_DATA) Documentation + */ + public ApiResponse getOrderDetail( + @NotNull String orderNo, @Max(60000L) Long recvWindow) throws ApiException { + okhttp3.Call localVarCall = getOrderDetailValidateBeforeCall(orderNo, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } +} diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/api/FiatApi.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/api/FiatApi.java deleted file mode 100644 index 040b1c553..000000000 --- a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/api/FiatApi.java +++ /dev/null @@ -1,934 +0,0 @@ -/* - * Binance Fiat REST API - * OpenAPI Specification for the Binance Fiat REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.fiat.rest.api; - -import com.binance.connector.client.common.ApiClient; -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.JSON; -import com.binance.connector.client.common.Pair; -import com.binance.connector.client.common.SystemUtil; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.exception.ConstraintViolationException; -import com.binance.connector.client.fiat.rest.model.DepositRequest; -import com.binance.connector.client.fiat.rest.model.DepositResponse; -import com.binance.connector.client.fiat.rest.model.FiatWithdrawRequest; -import com.binance.connector.client.fiat.rest.model.FiatWithdrawResponse; -import com.binance.connector.client.fiat.rest.model.GetFiatDepositWithdrawHistoryResponse; -import com.binance.connector.client.fiat.rest.model.GetFiatPaymentsHistoryResponse; -import com.binance.connector.client.fiat.rest.model.GetOrderDetailResponse; -import com.google.gson.reflect.TypeToken; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.Valid; -import jakarta.validation.Validation; -import jakarta.validation.Validator; -import jakarta.validation.constraints.*; -import jakarta.validation.executable.ExecutableValidator; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; - -public class FiatApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - private static final String USER_AGENT = - String.format( - "binance-fiat/2.0.0 (Java/%s; %s; %s)", - SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); - private static final boolean HAS_TIME_UNIT = false; - - public FiatApi(ClientConfiguration clientConfiguration) { - this(new ApiClient(clientConfiguration)); - } - - public FiatApi(ApiClient apiClient) { - apiClient.setUserAgent(USER_AGENT); - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for deposit - * - * @param depositRequest (required) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Deposit -
- * - * @see Deposit(TRADE) - * Documentation - */ - private okhttp3.Call depositCall(DepositRequest depositRequest) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/fiat/deposit"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (depositRequest.getRecvWindow() != null) { - localVarFormParams.put("recvWindow", depositRequest.getRecvWindow()); - } - - if (depositRequest.getCurrency() != null) { - localVarFormParams.put("currency", depositRequest.getCurrency()); - } - - if (depositRequest.getApiPaymentMethod() != null) { - localVarFormParams.put("apiPaymentMethod", depositRequest.getApiPaymentMethod()); - } - - if (depositRequest.getAmount() != null) { - localVarFormParams.put("amount", depositRequest.getAmount()); - } - - if (depositRequest.getExt() != null) { - localVarFormParams.put("ext", depositRequest.getExt()); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call depositValidateBeforeCall(DepositRequest depositRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {depositRequest}; - Method method = this.getClass().getMethod("deposit", DepositRequest.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return depositCall(depositRequest); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Deposit(TRADE) Submit deposit request, in this version, we only support BRL deposit via pix. - * For BRL deposit via pix, you need to place an order before making a transfer from your bank. - * Before calling this api, please make sure you have already completed your KYC or KYB, and - * already activated your fiat service on our website. Weight: 45000 - * - * @param depositRequest (required) - * @return ApiResponse<DepositResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Deposit -
- * - * @see Deposit(TRADE) - * Documentation - */ - public ApiResponse deposit(@Valid @NotNull DepositRequest depositRequest) - throws ApiException { - okhttp3.Call localVarCall = depositValidateBeforeCall(depositRequest); - java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for fiatWithdraw - * - * @param fiatWithdrawRequest (required) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fiat Withdraw -
- * - * @see Fiat - * Withdraw(WITHDRAW) Documentation - */ - private okhttp3.Call fiatWithdrawCall(FiatWithdrawRequest fiatWithdrawRequest) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v2/fiat/withdraw"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (fiatWithdrawRequest.getRecvWindow() != null) { - localVarFormParams.put("recvWindow", fiatWithdrawRequest.getRecvWindow()); - } - - if (fiatWithdrawRequest.getCurrency() != null) { - localVarFormParams.put("currency", fiatWithdrawRequest.getCurrency()); - } - - if (fiatWithdrawRequest.getApiPaymentMethod() != null) { - localVarFormParams.put("apiPaymentMethod", fiatWithdrawRequest.getApiPaymentMethod()); - } - - if (fiatWithdrawRequest.getAmount() != null) { - localVarFormParams.put("amount", fiatWithdrawRequest.getAmount()); - } - - if (fiatWithdrawRequest.getAccountInfo() != null) { - String json = JSON.getGson().toJson(fiatWithdrawRequest.getAccountInfo()); - localVarFormParams.put("accountInfo", json); - } - - if (fiatWithdrawRequest.getExt() != null) { - localVarFormParams.put("ext", fiatWithdrawRequest.getExt()); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call fiatWithdrawValidateBeforeCall(FiatWithdrawRequest fiatWithdrawRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {fiatWithdrawRequest}; - Method method = this.getClass().getMethod("fiatWithdraw", FiatWithdrawRequest.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return fiatWithdrawCall(fiatWithdrawRequest); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Fiat Withdraw(WITHDRAW) Submit withdraw request, in this version, we only support BRL - * withdrawal via bank_transfer. You need to call this api first, and call query order detail - * api in a loop to get the status of the order until this order is successful. Before calling - * this api, please make sure you have already completed your KYC or KYB, and already activated - * your fiat service on our website. you need to bind your bank account on web/app before using - * the corresponding account number Weight: 45000 - * - * @param fiatWithdrawRequest (required) - * @return ApiResponse<FiatWithdrawResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fiat Withdraw -
- * - * @see Fiat - * Withdraw(WITHDRAW) Documentation - */ - public ApiResponse fiatWithdraw( - @Valid @NotNull FiatWithdrawRequest fiatWithdrawRequest) throws ApiException { - okhttp3.Call localVarCall = fiatWithdrawValidateBeforeCall(fiatWithdrawRequest); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for getFiatDepositWithdrawHistory - * - * @param transactionType 0-buy,1-sell (required) - * @param beginTime (optional) - * @param endTime (optional) - * @param page default 1 (optional) - * @param rows default 100, max 500 (optional) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get Fiat Deposit/Withdraw History -
- * - * @see Get - * Fiat Deposit/Withdraw History (USER_DATA) Documentation - */ - private okhttp3.Call getFiatDepositWithdrawHistoryCall( - String transactionType, - Long beginTime, - Long endTime, - Long page, - Long rows, - Long recvWindow) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/fiat/orders"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (transactionType != null) { - localVarQueryParams.addAll( - localVarApiClient.parameterToPair("transactionType", transactionType)); - } - - if (beginTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("beginTime", beginTime)); - } - - if (endTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("endTime", endTime)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (rows != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("rows", rows)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getFiatDepositWithdrawHistoryValidateBeforeCall( - String transactionType, - Long beginTime, - Long endTime, - Long page, - Long rows, - Long recvWindow) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = { - transactionType, beginTime, endTime, page, rows, recvWindow - }; - Method method = - this.getClass() - .getMethod( - "getFiatDepositWithdrawHistory", - String.class, - Long.class, - Long.class, - Long.class, - Long.class, - Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return getFiatDepositWithdrawHistoryCall( - transactionType, beginTime, endTime, page, rows, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Get Fiat Deposit/Withdraw History (USER_DATA) Get Fiat Deposit/Withdraw History * If - * beginTime and endTime are not sent, the recent 30-day data will be returned. Weight: 45000 - * - * @param transactionType 0-buy,1-sell (required) - * @param beginTime (optional) - * @param endTime (optional) - * @param page default 1 (optional) - * @param rows default 100, max 500 (optional) - * @param recvWindow (optional) - * @return ApiResponse<GetFiatDepositWithdrawHistoryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get Fiat Deposit/Withdraw History -
- * - * @see Get - * Fiat Deposit/Withdraw History (USER_DATA) Documentation - */ - public ApiResponse getFiatDepositWithdrawHistory( - @NotNull String transactionType, - Long beginTime, - Long endTime, - Long page, - Long rows, - Long recvWindow) - throws ApiException { - okhttp3.Call localVarCall = - getFiatDepositWithdrawHistoryValidateBeforeCall( - transactionType, beginTime, endTime, page, rows, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for getFiatPaymentsHistory - * - * @param transactionType 0-buy,1-sell (required) - * @param beginTime (optional) - * @param endTime (optional) - * @param page default 1 (optional) - * @param rows default 100, max 500 (optional) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get Fiat Payments History -
- * - * @see Get - * Fiat Payments History (USER_DATA) Documentation - */ - private okhttp3.Call getFiatPaymentsHistoryCall( - String transactionType, - Long beginTime, - Long endTime, - Long page, - Long rows, - Long recvWindow) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/fiat/payments"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (transactionType != null) { - localVarQueryParams.addAll( - localVarApiClient.parameterToPair("transactionType", transactionType)); - } - - if (beginTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("beginTime", beginTime)); - } - - if (endTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("endTime", endTime)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (rows != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("rows", rows)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getFiatPaymentsHistoryValidateBeforeCall( - String transactionType, - Long beginTime, - Long endTime, - Long page, - Long rows, - Long recvWindow) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = { - transactionType, beginTime, endTime, page, rows, recvWindow - }; - Method method = - this.getClass() - .getMethod( - "getFiatPaymentsHistory", - String.class, - Long.class, - Long.class, - Long.class, - Long.class, - Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return getFiatPaymentsHistoryCall( - transactionType, beginTime, endTime, page, rows, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Get Fiat Payments History (USER_DATA) Get Fiat Deposit/Withdraw History * If beginTime and - * endTime are not sent, the recent 30-day data will be returned. * paymentMethod: Only when - * requesting payments history for buy (transactionType=0), response contains paymentMethod - * representing the way of purchase. Now we have: * Cash Balance * Credit Card * Online Banking - * * Bank Transfer Weight: 1 - * - * @param transactionType 0-buy,1-sell (required) - * @param beginTime (optional) - * @param endTime (optional) - * @param page default 1 (optional) - * @param rows default 100, max 500 (optional) - * @param recvWindow (optional) - * @return ApiResponse<GetFiatPaymentsHistoryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get Fiat Payments History -
- * - * @see Get - * Fiat Payments History (USER_DATA) Documentation - */ - public ApiResponse getFiatPaymentsHistory( - @NotNull String transactionType, - Long beginTime, - Long endTime, - Long page, - Long rows, - Long recvWindow) - throws ApiException { - okhttp3.Call localVarCall = - getFiatPaymentsHistoryValidateBeforeCall( - transactionType, beginTime, endTime, page, rows, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for getOrderDetail - * - * @param orderNo order id retrieved from the api call of withdrawal (required) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get Order Detail -
- * - * @see Get Order - * Detail(USER_DATA) Documentation - */ - private okhttp3.Call getOrderDetailCall(String orderNo, Long recvWindow) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/fiat/get-order-detail"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (orderNo != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("orderNo", orderNo)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getOrderDetailValidateBeforeCall(String orderNo, Long recvWindow) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {orderNo, recvWindow}; - Method method = this.getClass().getMethod("getOrderDetail", String.class, Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return getOrderDetailCall(orderNo, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Get Order Detail(USER_DATA) Get Order Detail Before calling this api, please make sure you - * have already completed your KYC or KYB, and already activated your fiat service on our - * website. Weight: 1 - * - * @param orderNo order id retrieved from the api call of withdrawal (required) - * @param recvWindow (optional) - * @return ApiResponse<GetOrderDetailResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get Order Detail -
- * - * @see Get Order - * Detail(USER_DATA) Documentation - */ - public ApiResponse getOrderDetail( - @NotNull String orderNo, Long recvWindow) throws ApiException { - okhttp3.Call localVarCall = getOrderDetailValidateBeforeCall(orderNo, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } -} diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/api/FiatRestApi.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/api/FiatRestApi.java index ee3dfdb04..7f379e2f6 100644 --- a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/api/FiatRestApi.java +++ b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/api/FiatRestApi.java @@ -15,23 +15,28 @@ public class FiatRestApi { - private final FiatApi fiatApi; + private final DefaultApi defaultApi; public FiatRestApi(ClientConfiguration configuration) { this(FiatRestApiUtil.getDefaultClient(configuration)); } public FiatRestApi(ApiClient apiClient) { - this.fiatApi = new FiatApi(apiClient); + this.defaultApi = new DefaultApi(apiClient); } /** - * Deposit(TRADE) Submit deposit request, in this version, we only support BRL deposit via pix. + * Deposit (TRADE) Submit deposit request, in this version, we only support BRL deposit via pix. * For BRL deposit via pix, you need to place an order before making a transfer from your bank. * Before calling this api, please make sure you have already completed your KYC or KYB, and - * already activated your fiat service on our website. Weight: 45000 + * already activated your fiat service on our website. Weight(UID): 45000 Security Type: TRADE + * Notes: - `timestamp`, `signature` and `recvWindow` are sent as + * query-string parameters, while the business fields (`currency`, + * `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON + * request body with `Content-Type: application/json`. * * @param depositRequest (required) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<DepositResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -42,22 +47,24 @@ public FiatRestApi(ApiClient apiClient) { * 200 Deposit - * * - * @see Deposit(TRADE) - * Documentation + * @see Deposit + * (TRADE) Documentation */ - public ApiResponse deposit(DepositRequest depositRequest) throws ApiException { - return fiatApi.deposit(depositRequest); + public ApiResponse deposit(DepositRequest depositRequest, Long recvWindow) + throws ApiException { + return defaultApi.deposit(depositRequest, recvWindow); } /** - * Fiat Withdraw(WITHDRAW) Submit withdraw request, in this version, we only support BRL + * Fiat Withdraw (TRADE) Submit withdraw request, in this version, we support BRL,ARS,MXN * withdrawal via bank_transfer. You need to call this api first, and call query order detail * api in a loop to get the status of the order until this order is successful. Before calling * this api, please make sure you have already completed your KYC or KYB, and already activated - * your fiat service on our website. you need to bind your bank account on web/app before using - * the corresponding account number Weight: 45000 + * your fiat service on our website. Weight(UID): 45000 Security Type: TRADE * * @param fiatWithdrawRequest (required) + * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<FiatWithdrawResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -68,23 +75,25 @@ public ApiResponse deposit(DepositRequest depositRequest) throw * 200 Fiat Withdraw - * * - * @see Fiat - * Withdraw(WITHDRAW) Documentation + * @see Fiat + * Withdraw (TRADE) Documentation */ - public ApiResponse fiatWithdraw(FiatWithdrawRequest fiatWithdrawRequest) - throws ApiException { - return fiatApi.fiatWithdraw(fiatWithdrawRequest); + public ApiResponse fiatWithdraw( + FiatWithdrawRequest fiatWithdrawRequest, Long recvWindow) throws ApiException { + return defaultApi.fiatWithdraw(fiatWithdrawRequest, recvWindow); } /** - * Get Fiat Deposit/Withdraw History (USER_DATA) Get Fiat Deposit/Withdraw History * If - * beginTime and endTime are not sent, the recent 30-day data will be returned. Weight: 45000 + * Get Fiat Deposit/Withdraw History (USER_DATA) Get Fiat Deposit/Withdraw History Weight(UID): + * 45000 Security Type: USER_DATA Notes: - If `beginTime` and `endTime` are + * not sent, recent 30-day data is returned. * - * @param transactionType 0-buy,1-sell (required) + * @param transactionType 0: deposit, 1: withdraw (required) * @param beginTime (optional) * @param endTime (optional) - * @param page default 1 (optional) - * @param rows default 100, max 500 (optional) + * @param page (optional) + * @param rows (optional) * @param recvWindow (optional) * @return ApiResponse<GetFiatDepositWithdrawHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -97,7 +106,7 @@ public ApiResponse fiatWithdraw(FiatWithdrawRequest fiatWi * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-fiat/api/rest-api/~#get-fiat-deposit-withdraw-history">Get * Fiat Deposit/Withdraw History (USER_DATA) Documentation */ public ApiResponse getFiatDepositWithdrawHistory( @@ -108,22 +117,23 @@ public ApiResponse getFiatDepositWithdraw Long rows, Long recvWindow) throws ApiException { - return fiatApi.getFiatDepositWithdrawHistory( + return defaultApi.getFiatDepositWithdrawHistory( transactionType, beginTime, endTime, page, rows, recvWindow); } /** - * Get Fiat Payments History (USER_DATA) Get Fiat Deposit/Withdraw History * If beginTime and - * endTime are not sent, the recent 30-day data will be returned. * paymentMethod: Only when - * requesting payments history for buy (transactionType=0), response contains paymentMethod - * representing the way of purchase. Now we have: * Cash Balance * Credit Card * Online Banking - * * Bank Transfer Weight: 1 + * Get Fiat Payments History (USER_DATA) Get Fiat Payments History Weight(IP): 1 Security Type: + * USER_DATA Notes: - If `beginTime` and `endTime` are not sent, recent + * 30-day data is returned. - `paymentMethod` is returned only when querying buy + * history (`transactionType=0`). - Supported payment methods: `Cash + * Balance`, `Credit Card`, `Online Banking`, `Bank + * Transfer`. * - * @param transactionType 0-buy,1-sell (required) + * @param transactionType 0: buy, 1: sell (required) * @param beginTime (optional) * @param endTime (optional) - * @param page default 1 (optional) - * @param rows default 100, max 500 (optional) + * @param page (optional) + * @param rows (optional) * @param recvWindow (optional) * @return ApiResponse<GetFiatPaymentsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -136,7 +146,7 @@ public ApiResponse getFiatDepositWithdraw * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-fiat/api/rest-api/~#get-fiat-payments-history">Get * Fiat Payments History (USER_DATA) Documentation */ public ApiResponse getFiatPaymentsHistory( @@ -147,16 +157,16 @@ public ApiResponse getFiatPaymentsHistory( Long rows, Long recvWindow) throws ApiException { - return fiatApi.getFiatPaymentsHistory( + return defaultApi.getFiatPaymentsHistory( transactionType, beginTime, endTime, page, rows, recvWindow); } /** - * Get Order Detail(USER_DATA) Get Order Detail Before calling this api, please make sure you + * Get Order Detail (USER_DATA) Get Order Detail Before calling this api, please make sure you * have already completed your KYC or KYB, and already activated your fiat service on our - * website. Weight: 1 + * website. Weight(IP): 1 Security Type: USER_DATA * - * @param orderNo order id retrieved from the api call of withdrawal (required) + * @param orderNo Order ID retrieved from the withdrawal API (required) * @param recvWindow (optional) * @return ApiResponse<GetOrderDetailResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -168,11 +178,12 @@ public ApiResponse getFiatPaymentsHistory( * 200 Get Order Detail - * * - * @see Get Order - * Detail(USER_DATA) Documentation + * @see Get + * Order Detail (USER_DATA) Documentation */ public ApiResponse getOrderDetail(String orderNo, Long recvWindow) throws ApiException { - return fiatApi.getOrderDetail(orderNo, recvWindow); + return defaultApi.getOrderDetail(orderNo, recvWindow); } } diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/AccountInfo.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/AccountInfo.java deleted file mode 100644 index 75ae637c7..000000000 --- a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/AccountInfo.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Binance Fiat REST API - * OpenAPI Specification for the Binance Fiat REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.fiat.rest.model; - -import com.binance.connector.client.fiat.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** AccountInfo */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AccountInfo { - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - @jakarta.annotation.Nullable - private String accountNumber; - - public AccountInfo() {} - - public AccountInfo accountNumber(@jakarta.annotation.Nullable String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * - * @return accountNumber - */ - @jakarta.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(@jakarta.annotation.Nullable String accountNumber) { - this.accountNumber = accountNumber; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountInfo accountInfo = (AccountInfo) o; - return Objects.equals(this.accountNumber, accountInfo.accountNumber); - } - - @Override - public int hashCode() { - return Objects.hash(accountNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountInfo {\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object accountNumberValue = getAccountNumber(); - String accountNumberValueAsString = ""; - accountNumberValueAsString = accountNumberValue.toString(); - sb.append("accountNumber=").append(urlEncode(accountNumberValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountNumber"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AccountInfo - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AccountInfo.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AccountInfo is not found in the empty" - + " JSON string", - AccountInfo.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) - && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `accountNumber` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("accountNumber").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AccountInfo.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AccountInfo' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AccountInfo.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AccountInfo value) throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AccountInfo read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AccountInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccountInfo - * @throws IOException if the JSON string is invalid with respect to AccountInfo - */ - public static AccountInfo fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AccountInfo.class); - } - - /** - * Convert an instance of AccountInfo to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/ApiPaymentMethod.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/ApiPaymentMethod.java new file mode 100644 index 000000000..ac07e23a5 --- /dev/null +++ b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/ApiPaymentMethod.java @@ -0,0 +1,71 @@ +/* + * Fiat REST API + * Query Binance fiat deposit and withdrawal history. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.fiat.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** payment method; current supported: bank_transfer */ +@JsonAdapter(ApiPaymentMethod.Adapter.class) +public enum ApiPaymentMethod { + bank_transfer("bank_transfer"); + + private String value; + + ApiPaymentMethod(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ApiPaymentMethod fromValue(String value) { + for (ApiPaymentMethod b : ApiPaymentMethod.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ApiPaymentMethod enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ApiPaymentMethod read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ApiPaymentMethod.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ApiPaymentMethod.fromValue(value); + } +} diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/DepositRequest.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/DepositRequest.java index 0d70a4fdd..b2a2ce491 100644 --- a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/DepositRequest.java +++ b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/DepositRequest.java @@ -1,6 +1,6 @@ /* - * Binance Fiat REST API - * OpenAPI Specification for the Binance Fiat REST API + * Fiat REST API + * Query Binance fiat deposit and withdrawal history. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -34,14 +35,8 @@ /** DepositRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DepositRequest { - public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; - - @SerializedName(SERIALIZED_NAME_RECV_WINDOW) - @jakarta.annotation.Nullable - private Long recvWindow; - public static final String SERIALIZED_NAME_CURRENCY = "currency"; @SerializedName(SERIALIZED_NAME_CURRENCY) @@ -52,13 +47,13 @@ public class DepositRequest { @SerializedName(SERIALIZED_NAME_API_PAYMENT_METHOD) @jakarta.annotation.Nonnull - private String apiPaymentMethod; + private ApiPaymentMethod apiPaymentMethod; public static final String SERIALIZED_NAME_AMOUNT = "amount"; @SerializedName(SERIALIZED_NAME_AMOUNT) @jakarta.annotation.Nonnull - private Long amount; + private String amount; public static final String SERIALIZED_NAME_EXT = "ext"; @@ -68,25 +63,6 @@ public class DepositRequest { public DepositRequest() {} - public DepositRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) { - this.recvWindow = recvWindow; - return this; - } - - /** - * Get recvWindow - * - * @return recvWindow - */ - @jakarta.annotation.Nullable - public Long getRecvWindow() { - return recvWindow; - } - - public void setRecvWindow(@jakarta.annotation.Nullable Long recvWindow) { - this.recvWindow = recvWindow; - } - public DepositRequest currency(@jakarta.annotation.Nonnull String currency) { this.currency = currency; return this; @@ -107,7 +83,8 @@ public void setCurrency(@jakarta.annotation.Nonnull String currency) { this.currency = currency; } - public DepositRequest apiPaymentMethod(@jakarta.annotation.Nonnull String apiPaymentMethod) { + public DepositRequest apiPaymentMethod( + @jakarta.annotation.Nonnull ApiPaymentMethod apiPaymentMethod) { this.apiPaymentMethod = apiPaymentMethod; return this; } @@ -119,31 +96,32 @@ public DepositRequest apiPaymentMethod(@jakarta.annotation.Nonnull String apiPay */ @jakarta.annotation.Nonnull @NotNull - public String getApiPaymentMethod() { + @Valid + public ApiPaymentMethod getApiPaymentMethod() { return apiPaymentMethod; } - public void setApiPaymentMethod(@jakarta.annotation.Nonnull String apiPaymentMethod) { + public void setApiPaymentMethod(@jakarta.annotation.Nonnull ApiPaymentMethod apiPaymentMethod) { this.apiPaymentMethod = apiPaymentMethod; } - public DepositRequest amount(@jakarta.annotation.Nonnull Long amount) { + public DepositRequest amount(@jakarta.annotation.Nonnull String amount) { this.amount = amount; return this; } /** - * Get amount + * deposit amount * * @return amount */ @jakarta.annotation.Nonnull @NotNull - public Long getAmount() { + public String getAmount() { return amount; } - public void setAmount(@jakarta.annotation.Nonnull Long amount) { + public void setAmount(@jakarta.annotation.Nonnull String amount) { this.amount = amount; } @@ -175,8 +153,7 @@ public boolean equals(Object o) { return false; } DepositRequest depositRequest = (DepositRequest) o; - return Objects.equals(this.recvWindow, depositRequest.recvWindow) - && Objects.equals(this.currency, depositRequest.currency) + return Objects.equals(this.currency, depositRequest.currency) && Objects.equals(this.apiPaymentMethod, depositRequest.apiPaymentMethod) && Objects.equals(this.amount, depositRequest.amount) && Objects.equals(this.ext, depositRequest.ext); @@ -184,14 +161,13 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(recvWindow, currency, apiPaymentMethod, amount, ext); + return Objects.hash(currency, apiPaymentMethod, amount, ext); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DepositRequest {\n"); - sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" apiPaymentMethod: ").append(toIndentedString(apiPaymentMethod)).append("\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); @@ -203,10 +179,6 @@ public String toString() { public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); - Object recvWindowValue = getRecvWindow(); - String recvWindowValueAsString = ""; - recvWindowValueAsString = recvWindowValue.toString(); - sb.append("recvWindow=").append(urlEncode(recvWindowValueAsString)).append(""); Object currencyValue = getCurrency(); String currencyValueAsString = ""; currencyValueAsString = currencyValue.toString(); @@ -251,7 +223,6 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("recvWindow"); openapiFields.add("currency"); openapiFields.add("apiPaymentMethod"); openapiFields.add("amount"); @@ -299,12 +270,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("currency").toString())); } - if (!jsonObj.get("apiPaymentMethod").isJsonPrimitive()) { + // validate the required field `apiPaymentMethod` + ApiPaymentMethod.validateJsonElement(jsonObj.get("apiPaymentMethod")); + if (!jsonObj.get("amount").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `apiPaymentMethod` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("apiPaymentMethod").toString())); + "Expected the field `amount` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("amount").toString())); } } diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/DepositResponse.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/DepositResponse.java index 35e2ae631..439425bcb 100644 --- a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/DepositResponse.java +++ b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/DepositResponse.java @@ -1,6 +1,6 @@ /* - * Binance Fiat REST API - * OpenAPI Specification for the Binance Fiat REST API + * Fiat REST API + * Query Binance fiat deposit and withdrawal history. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** DepositResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DepositResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/DepositResponseData.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/DepositResponseData.java index 661a3bcda..62f784a46 100644 --- a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/DepositResponseData.java +++ b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/DepositResponseData.java @@ -1,6 +1,6 @@ /* - * Binance Fiat REST API - * OpenAPI Specification for the Binance Fiat REST API + * Fiat REST API + * Query Binance fiat deposit and withdrawal history. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DepositResponseData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DepositResponseData { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/FiatWithdrawRequest.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/FiatWithdrawRequest.java index 53e201f7a..fc1e4243a 100644 --- a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/FiatWithdrawRequest.java +++ b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/FiatWithdrawRequest.java @@ -1,6 +1,6 @@ /* - * Binance Fiat REST API - * OpenAPI Specification for the Binance Fiat REST API + * Fiat REST API + * Query Binance fiat deposit and withdrawal history. * * The version of the OpenAPI document: 1.0.0 * @@ -35,14 +35,8 @@ /** FiatWithdrawRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FiatWithdrawRequest { - public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; - - @SerializedName(SERIALIZED_NAME_RECV_WINDOW) - @jakarta.annotation.Nullable - private Long recvWindow; - public static final String SERIALIZED_NAME_CURRENCY = "currency"; @SerializedName(SERIALIZED_NAME_CURRENCY) @@ -53,7 +47,7 @@ public class FiatWithdrawRequest { @SerializedName(SERIALIZED_NAME_API_PAYMENT_METHOD) @jakarta.annotation.Nonnull - private String apiPaymentMethod; + private ApiPaymentMethod apiPaymentMethod; public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -65,7 +59,7 @@ public class FiatWithdrawRequest { @SerializedName(SERIALIZED_NAME_ACCOUNT_INFO) @jakarta.annotation.Nonnull - private AccountInfo accountInfo; + private FiatWithdrawRequestAccountInfo accountInfo; public static final String SERIALIZED_NAME_EXT = "ext"; @@ -75,32 +69,13 @@ public class FiatWithdrawRequest { public FiatWithdrawRequest() {} - public FiatWithdrawRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) { - this.recvWindow = recvWindow; - return this; - } - - /** - * Get recvWindow - * - * @return recvWindow - */ - @jakarta.annotation.Nullable - public Long getRecvWindow() { - return recvWindow; - } - - public void setRecvWindow(@jakarta.annotation.Nullable Long recvWindow) { - this.recvWindow = recvWindow; - } - public FiatWithdrawRequest currency(@jakarta.annotation.Nonnull String currency) { this.currency = currency; return this; } /** - * Get currency + * Fiat currency, such as BRL, ARS, MXN * * @return currency */ @@ -115,7 +90,7 @@ public void setCurrency(@jakarta.annotation.Nonnull String currency) { } public FiatWithdrawRequest apiPaymentMethod( - @jakarta.annotation.Nonnull String apiPaymentMethod) { + @jakarta.annotation.Nonnull ApiPaymentMethod apiPaymentMethod) { this.apiPaymentMethod = apiPaymentMethod; return this; } @@ -127,11 +102,12 @@ public FiatWithdrawRequest apiPaymentMethod( */ @jakarta.annotation.Nonnull @NotNull - public String getApiPaymentMethod() { + @Valid + public ApiPaymentMethod getApiPaymentMethod() { return apiPaymentMethod; } - public void setApiPaymentMethod(@jakarta.annotation.Nonnull String apiPaymentMethod) { + public void setApiPaymentMethod(@jakarta.annotation.Nonnull ApiPaymentMethod apiPaymentMethod) { this.apiPaymentMethod = apiPaymentMethod; } @@ -141,7 +117,7 @@ public FiatWithdrawRequest amount(@jakarta.annotation.Nonnull Long amount) { } /** - * Get amount + * withdraw amount * * @return amount */ @@ -155,7 +131,8 @@ public void setAmount(@jakarta.annotation.Nonnull Long amount) { this.amount = amount; } - public FiatWithdrawRequest accountInfo(@jakarta.annotation.Nonnull AccountInfo accountInfo) { + public FiatWithdrawRequest accountInfo( + @jakarta.annotation.Nonnull FiatWithdrawRequestAccountInfo accountInfo) { this.accountInfo = accountInfo; return this; } @@ -168,11 +145,12 @@ public FiatWithdrawRequest accountInfo(@jakarta.annotation.Nonnull AccountInfo a @jakarta.annotation.Nonnull @NotNull @Valid - public AccountInfo getAccountInfo() { + public FiatWithdrawRequestAccountInfo getAccountInfo() { return accountInfo; } - public void setAccountInfo(@jakarta.annotation.Nonnull AccountInfo accountInfo) { + public void setAccountInfo( + @jakarta.annotation.Nonnull FiatWithdrawRequestAccountInfo accountInfo) { this.accountInfo = accountInfo; } @@ -204,8 +182,7 @@ public boolean equals(Object o) { return false; } FiatWithdrawRequest fiatWithdrawRequest = (FiatWithdrawRequest) o; - return Objects.equals(this.recvWindow, fiatWithdrawRequest.recvWindow) - && Objects.equals(this.currency, fiatWithdrawRequest.currency) + return Objects.equals(this.currency, fiatWithdrawRequest.currency) && Objects.equals(this.apiPaymentMethod, fiatWithdrawRequest.apiPaymentMethod) && Objects.equals(this.amount, fiatWithdrawRequest.amount) && Objects.equals(this.accountInfo, fiatWithdrawRequest.accountInfo) @@ -214,14 +191,13 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(recvWindow, currency, apiPaymentMethod, amount, accountInfo, ext); + return Objects.hash(currency, apiPaymentMethod, amount, accountInfo, ext); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FiatWithdrawRequest {\n"); - sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" apiPaymentMethod: ").append(toIndentedString(apiPaymentMethod)).append("\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); @@ -234,10 +210,6 @@ public String toString() { public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); - Object recvWindowValue = getRecvWindow(); - String recvWindowValueAsString = ""; - recvWindowValueAsString = recvWindowValue.toString(); - sb.append("recvWindow=").append(urlEncode(recvWindowValueAsString)).append(""); Object currencyValue = getCurrency(); String currencyValueAsString = ""; currencyValueAsString = currencyValue.toString(); @@ -286,7 +258,6 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("recvWindow"); openapiFields.add("currency"); openapiFields.add("apiPaymentMethod"); openapiFields.add("amount"); @@ -336,15 +307,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("currency").toString())); } - if (!jsonObj.get("apiPaymentMethod").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `apiPaymentMethod` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("apiPaymentMethod").toString())); - } + // validate the required field `apiPaymentMethod` + ApiPaymentMethod.validateJsonElement(jsonObj.get("apiPaymentMethod")); // validate the required field `accountInfo` - AccountInfo.validateJsonElement(jsonObj.get("accountInfo")); + FiatWithdrawRequestAccountInfo.validateJsonElement(jsonObj.get("accountInfo")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/FiatWithdrawRequestAccountInfo.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/FiatWithdrawRequestAccountInfo.java new file mode 100644 index 000000000..a3a8f4b3c --- /dev/null +++ b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/FiatWithdrawRequestAccountInfo.java @@ -0,0 +1,353 @@ +/* + * Fiat REST API + * Query Binance fiat deposit and withdrawal history. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.fiat.rest.model; + +import com.binance.connector.client.fiat.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** withdraw account info */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class FiatWithdrawRequestAccountInfo { + public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; + + @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) + @jakarta.annotation.Nonnull + private String accountNumber; + + public static final String SERIALIZED_NAME_AGENCY = "agency"; + + @SerializedName(SERIALIZED_NAME_AGENCY) + @jakarta.annotation.Nullable + private String agency; + + public static final String SERIALIZED_NAME_BANK_CODE_FOR_PIX = "bankCodeForPix"; + + @SerializedName(SERIALIZED_NAME_BANK_CODE_FOR_PIX) + @jakarta.annotation.Nullable + private String bankCodeForPix; + + public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "accountType"; + + @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) + @jakarta.annotation.Nullable + private String accountType; + + public FiatWithdrawRequestAccountInfo() {} + + public FiatWithdrawRequestAccountInfo accountNumber( + @jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Your destination bank account number is required to receive the withdrawal. In Argentina, + * this will be your CBU/CVU; in Mexico, it will be your CLABE. + * + * @return accountNumber + */ + @jakarta.annotation.Nonnull + @NotNull + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(@jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + } + + public FiatWithdrawRequestAccountInfo agency(@jakarta.annotation.Nullable String agency) { + this.agency = agency; + return this; + } + + /** + * Bank agency code. If contains a hyphen (e.g. `123-4`), enter `123` only. + * + * @return agency + */ + @jakarta.annotation.Nullable + public String getAgency() { + return agency; + } + + public void setAgency(@jakarta.annotation.Nullable String agency) { + this.agency = agency; + } + + public FiatWithdrawRequestAccountInfo bankCodeForPix( + @jakarta.annotation.Nullable String bankCodeForPix) { + this.bankCodeForPix = bankCodeForPix; + return this; + } + + /** + * Bank code used for PIX routing. + * + * @return bankCodeForPix + */ + @jakarta.annotation.Nullable + public String getBankCodeForPix() { + return bankCodeForPix; + } + + public void setBankCodeForPix(@jakarta.annotation.Nullable String bankCodeForPix) { + this.bankCodeForPix = bankCodeForPix; + } + + public FiatWithdrawRequestAccountInfo accountType( + @jakarta.annotation.Nullable String accountType) { + this.accountType = accountType; + return this; + } + + /** + * Account type, e.g. `current` (Checking Account), `saving` (Savings + * Account), etc. + * + * @return accountType + */ + @jakarta.annotation.Nullable + public String getAccountType() { + return accountType; + } + + public void setAccountType(@jakarta.annotation.Nullable String accountType) { + this.accountType = accountType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FiatWithdrawRequestAccountInfo fiatWithdrawRequestAccountInfo = + (FiatWithdrawRequestAccountInfo) o; + return Objects.equals(this.accountNumber, fiatWithdrawRequestAccountInfo.accountNumber) + && Objects.equals(this.agency, fiatWithdrawRequestAccountInfo.agency) + && Objects.equals( + this.bankCodeForPix, fiatWithdrawRequestAccountInfo.bankCodeForPix) + && Objects.equals(this.accountType, fiatWithdrawRequestAccountInfo.accountType); + } + + @Override + public int hashCode() { + return Objects.hash(accountNumber, agency, bankCodeForPix, accountType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FiatWithdrawRequestAccountInfo {\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" agency: ").append(toIndentedString(agency)).append("\n"); + sb.append(" bankCodeForPix: ").append(toIndentedString(bankCodeForPix)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object accountNumberValue = getAccountNumber(); + String accountNumberValueAsString = ""; + accountNumberValueAsString = accountNumberValue.toString(); + sb.append("accountNumber=").append(urlEncode(accountNumberValueAsString)).append(""); + Object agencyValue = getAgency(); + String agencyValueAsString = ""; + agencyValueAsString = agencyValue.toString(); + sb.append("agency=").append(urlEncode(agencyValueAsString)).append(""); + Object bankCodeForPixValue = getBankCodeForPix(); + String bankCodeForPixValueAsString = ""; + bankCodeForPixValueAsString = bankCodeForPixValue.toString(); + sb.append("bankCodeForPix=").append(urlEncode(bankCodeForPixValueAsString)).append(""); + Object accountTypeValue = getAccountType(); + String accountTypeValueAsString = ""; + accountTypeValueAsString = accountTypeValue.toString(); + sb.append("accountType=").append(urlEncode(accountTypeValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("accountNumber"); + openapiFields.add("agency"); + openapiFields.add("bankCodeForPix"); + openapiFields.add("accountType"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("accountNumber"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * FiatWithdrawRequestAccountInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FiatWithdrawRequestAccountInfo.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FiatWithdrawRequestAccountInfo is not" + + " found in the empty JSON string", + FiatWithdrawRequestAccountInfo.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FiatWithdrawRequestAccountInfo.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `accountNumber` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("agency") != null && !jsonObj.get("agency").isJsonNull()) + && !jsonObj.get("agency").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `agency` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("agency").toString())); + } + if ((jsonObj.get("bankCodeForPix") != null && !jsonObj.get("bankCodeForPix").isJsonNull()) + && !jsonObj.get("bankCodeForPix").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `bankCodeForPix` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("bankCodeForPix").toString())); + } + if ((jsonObj.get("accountType") != null && !jsonObj.get("accountType").isJsonNull()) + && !jsonObj.get("accountType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `accountType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("accountType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FiatWithdrawRequestAccountInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FiatWithdrawRequestAccountInfo' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(FiatWithdrawRequestAccountInfo.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FiatWithdrawRequestAccountInfo value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FiatWithdrawRequestAccountInfo read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of FiatWithdrawRequestAccountInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of FiatWithdrawRequestAccountInfo + * @throws IOException if the JSON string is invalid with respect to + * FiatWithdrawRequestAccountInfo + */ + public static FiatWithdrawRequestAccountInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FiatWithdrawRequestAccountInfo.class); + } + + /** + * Convert an instance of FiatWithdrawRequestAccountInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/FiatWithdrawResponse.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/FiatWithdrawResponse.java index 5fd65e0fa..5935ca50f 100644 --- a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/FiatWithdrawResponse.java +++ b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/FiatWithdrawResponse.java @@ -1,6 +1,6 @@ /* - * Binance Fiat REST API - * OpenAPI Specification for the Binance Fiat REST API + * Fiat REST API + * Query Binance fiat deposit and withdrawal history. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** FiatWithdrawResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FiatWithdrawResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetFiatDepositWithdrawHistoryResponse.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetFiatDepositWithdrawHistoryResponse.java index 8b23b186c..177d2c9a2 100644 --- a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetFiatDepositWithdrawHistoryResponse.java +++ b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetFiatDepositWithdrawHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Fiat REST API - * OpenAPI Specification for the Binance Fiat REST API + * Fiat REST API + * Query Binance fiat deposit and withdrawal history. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetFiatDepositWithdrawHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFiatDepositWithdrawHistoryResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetFiatDepositWithdrawHistoryResponseDataInner.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetFiatDepositWithdrawHistoryResponseDataInner.java index 21458ebe2..c40f33f4d 100644 --- a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetFiatDepositWithdrawHistoryResponseDataInner.java +++ b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetFiatDepositWithdrawHistoryResponseDataInner.java @@ -1,6 +1,6 @@ /* - * Binance Fiat REST API - * OpenAPI Specification for the Binance Fiat REST API + * Fiat REST API + * Query Binance fiat deposit and withdrawal history. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFiatDepositWithdrawHistoryResponseDataInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFiatDepositWithdrawHistoryResponseDataInner { public static final String SERIALIZED_NAME_ORDER_NO = "orderNo"; @@ -219,7 +219,8 @@ public GetFiatDepositWithdrawHistoryResponseDataInner status( } /** - * Get status + * Processing, Failed, Successful, Finished, Refunding, Refunded, Refund Failed, Order Partial + * Credit Stopped * * @return status */ diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetFiatPaymentsHistoryResponse.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetFiatPaymentsHistoryResponse.java index a65631d46..aad0e20e5 100644 --- a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetFiatPaymentsHistoryResponse.java +++ b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetFiatPaymentsHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Fiat REST API - * OpenAPI Specification for the Binance Fiat REST API + * Fiat REST API + * Query Binance fiat deposit and withdrawal history. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetFiatPaymentsHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFiatPaymentsHistoryResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetFiatPaymentsHistoryResponseDataInner.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetFiatPaymentsHistoryResponseDataInner.java index 7242a38c0..3dc8a4942 100644 --- a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetFiatPaymentsHistoryResponseDataInner.java +++ b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetFiatPaymentsHistoryResponseDataInner.java @@ -1,6 +1,6 @@ /* - * Binance Fiat REST API - * OpenAPI Specification for the Binance Fiat REST API + * Fiat REST API + * Query Binance fiat deposit and withdrawal history. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFiatPaymentsHistoryResponseDataInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFiatPaymentsHistoryResponseDataInner { public static final String SERIALIZED_NAME_ORDER_NO = "orderNo"; diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetOrderDetailResponse.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetOrderDetailResponse.java index 87175a163..5d4acce55 100644 --- a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetOrderDetailResponse.java +++ b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetOrderDetailResponse.java @@ -1,6 +1,6 @@ /* - * Binance Fiat REST API - * OpenAPI Specification for the Binance Fiat REST API + * Fiat REST API + * Query Binance fiat deposit and withdrawal history. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetOrderDetailResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOrderDetailResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetOrderDetailResponseData.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetOrderDetailResponseData.java index 80815d59b..65612938b 100644 --- a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetOrderDetailResponseData.java +++ b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/model/GetOrderDetailResponseData.java @@ -1,6 +1,6 @@ /* - * Binance Fiat REST API - * OpenAPI Specification for the Binance Fiat REST API + * Fiat REST API + * Query Binance fiat deposit and withdrawal history. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetOrderDetailResponseData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOrderDetailResponseData { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; diff --git a/clients/fiat/src/test/java/com/binance/connector/client/fiat/rest/api/DefaultApiTest.java b/clients/fiat/src/test/java/com/binance/connector/client/fiat/rest/api/DefaultApiTest.java new file mode 100644 index 000000000..ad9999246 --- /dev/null +++ b/clients/fiat/src/test/java/com/binance/connector/client/fiat/rest/api/DefaultApiTest.java @@ -0,0 +1,273 @@ +/* + * Fiat REST API + * Query Binance fiat deposit and withdrawal history. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.fiat.rest.api; + +import static org.junit.Assert.assertEquals; + +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.auth.BinanceAuthenticationFactory; +import com.binance.connector.client.common.auth.SignatureAuthentication; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.common.sign.HmacSignatureGenerator; +import com.binance.connector.client.common.sign.SignatureGenerator; +import com.binance.connector.client.fiat.rest.model.ApiPaymentMethod; +import com.binance.connector.client.fiat.rest.model.DepositRequest; +import com.binance.connector.client.fiat.rest.model.DepositResponse; +import com.binance.connector.client.fiat.rest.model.FiatWithdrawRequest; +import com.binance.connector.client.fiat.rest.model.FiatWithdrawRequestAccountInfo; +import com.binance.connector.client.fiat.rest.model.FiatWithdrawResponse; +import com.binance.connector.client.fiat.rest.model.GetFiatDepositWithdrawHistoryResponse; +import com.binance.connector.client.fiat.rest.model.GetFiatPaymentsHistoryResponse; +import com.binance.connector.client.fiat.rest.model.GetOrderDetailResponse; +import jakarta.validation.constraints.*; +import java.io.IOException; +import okhttp3.Call; +import okhttp3.Request; +import org.bouncycastle.crypto.CryptoException; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; + +/** API tests for DefaultApi */ +public class DefaultApiTest { + + private DefaultApi api; + private ApiClient apiClientSpy; + private SignatureGenerator signatureGeneratorSpy; + + @BeforeEach + public void initApiClient() throws ApiException { + ClientConfiguration clientConfiguration = new ClientConfiguration(); + clientConfiguration.setUrl("http://localhost:8080"); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setSecretKey("secretKey"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + + HmacSignatureGenerator signatureGenerator = + new HmacSignatureGenerator(signatureConfiguration.getSecretKey()); + signatureGeneratorSpy = Mockito.spy(signatureGenerator); + SignatureAuthentication signatureAuthentication = + new SignatureAuthentication( + signatureConfiguration.getApiKey(), signatureGeneratorSpy); + SignatureAuthentication authenticationSpy = Mockito.spy(signatureAuthentication); + Mockito.doReturn("1736393892000").when(authenticationSpy).buildTimestamp(); + + BinanceAuthenticationFactory factoryMock = Mockito.mock(BinanceAuthenticationFactory.class); + Mockito.doReturn(authenticationSpy) + .when(factoryMock) + .getAuthentication(signatureConfiguration); + + ApiClient apiClient = new ApiClient(clientConfiguration, factoryMock); + + apiClientSpy = Mockito.spy(apiClient); + Mockito.doReturn(new ApiResponse<>(200, null)) + .when(apiClientSpy) + .execute(Mockito.any(), Mockito.any(java.lang.reflect.Type.class)); + Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); + Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); + + api = new DefaultApi(apiClientSpy); + } + + /** + * Deposit (TRADE) + * + *

Submit deposit request, in this version, we only support BRL deposit via pix. For BRL + * deposit via pix, you need to place an order before making a transfer from your bank. Before + * calling this api, please make sure you have already completed your KYC or KYB, and already + * activated your fiat service on our website. Weight(UID): 45000 Security Type: TRADE Notes: - + * `timestamp`, `signature` and `recvWindow` are sent as + * query-string parameters, while the business fields (`currency`, + * `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON + * request body with `Content-Type: application/json`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void depositTest() throws ApiException, CryptoException, IOException { + DepositRequest depositRequest = new DepositRequest(); + depositRequest.currency("BRL"); + depositRequest.apiPaymentMethod(ApiPaymentMethod.bank_transfer); + depositRequest.amount("1"); + + Long recvWindow = 5000L; + ApiResponse response = api.deposit(depositRequest, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("recvWindow=5000×tamp=1736393892000amount=1&apiPaymentMethod=bank_transfer¤cy=BRL", signInputCaptor.getValue()); + assertEquals("22e9fedcd109c0299fcc60715c276f5c819c23f04493cbc08065a3e662cb81dd", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/fiat/deposit", actualRequest.url().encodedPath()); + } + + /** + * Fiat Withdraw (TRADE) + * + *

Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via + * bank_transfer. You need to call this api first, and call query order detail api in a loop to + * get the status of the order until this order is successful. Before calling this api, please + * make sure you have already completed your KYC or KYB, and already activated your fiat service + * on our website. Weight(UID): 45000 Security Type: TRADE + * + * @throws ApiException if the Api call fails + */ + @Test + public void fiatWithdrawTest() throws ApiException, CryptoException, IOException { + FiatWithdrawRequest fiatWithdrawRequest = new FiatWithdrawRequest(); + fiatWithdrawRequest.currency("BRL"); + fiatWithdrawRequest.apiPaymentMethod(ApiPaymentMethod.bank_transfer); + fiatWithdrawRequest.amount(10L); + FiatWithdrawRequestAccountInfo fiatWithdrawRequestAccountInfo = new FiatWithdrawRequestAccountInfo(); + fiatWithdrawRequestAccountInfo.setAccountNumber("123"); + fiatWithdrawRequest.accountInfo(fiatWithdrawRequestAccountInfo); + + Long recvWindow = 5000L; + ApiResponse response = + api.fiatWithdraw(fiatWithdrawRequest, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("recvWindow=5000×tamp=1736393892000accountInfo=%7B%22accountNumber%22%3A%22123%22%7D&amount=10&apiPaymentMethod=bank_transfer¤cy=BRL", signInputCaptor.getValue()); + assertEquals("fa25f54ecdcc0a201380276831386e0ddafc8e866752d21f663b785613030131", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v2/fiat/withdraw", actualRequest.url().encodedPath()); + } + + /** + * Get Fiat Deposit/Withdraw History (USER_DATA) + * + *

Get Fiat Deposit/Withdraw History Weight(UID): 45000 Security Type: USER_DATA Notes: - If + * `beginTime` and `endTime` are not sent, recent 30-day data is returned. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getFiatDepositWithdrawHistoryTest() + throws ApiException, CryptoException, IOException { + String transactionType = "0"; + Long beginTime = 1641782889000L; + Long endTime = 1641782889000L; + Long page = 1L; + Long rows = 100L; + Long recvWindow = 5000L; + ApiResponse response = + api.getFiatDepositWithdrawHistory( + transactionType, beginTime, endTime, page, rows, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("transactionType=0&beginTime=1641782889000&endTime=1641782889000&page=1&rows=100&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "148a587213e93618829291b697cd5ba7f0e3f715ae346ba4cd107e396a748bf8", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/fiat/orders", actualRequest.url().encodedPath()); + } + + /** + * Get Fiat Payments History (USER_DATA) + * + *

Get Fiat Payments History Weight(IP): 1 Security Type: USER_DATA Notes: - If + * `beginTime` and `endTime` are not sent, recent 30-day data is returned. - + * `paymentMethod` is returned only when querying buy history + * (`transactionType=0`). - Supported payment methods: `Cash Balance`, + * `Credit Card`, `Online Banking`, `Bank Transfer`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getFiatPaymentsHistoryTest() throws ApiException, CryptoException, IOException { + String transactionType = "0"; + Long beginTime = 1641782889000L; + Long endTime = 1641782889000L; + Long page = 1L; + Long rows = 100L; + Long recvWindow = 5000L; + ApiResponse response = + api.getFiatPaymentsHistory( + transactionType, beginTime, endTime, page, rows, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("transactionType=0&beginTime=1641782889000&endTime=1641782889000&page=1&rows=100&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "148a587213e93618829291b697cd5ba7f0e3f715ae346ba4cd107e396a748bf8", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/fiat/payments", actualRequest.url().encodedPath()); + } + + /** + * Get Order Detail (USER_DATA) + * + *

Get Order Detail Before calling this api, please make sure you have already completed your + * KYC or KYB, and already activated your fiat service on our website. Weight(IP): 1 Security + * Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOrderDetailTest() throws ApiException, CryptoException, IOException { + String orderNo = "036752*678"; + Long recvWindow = 5000L; + ApiResponse response = api.getOrderDetail(orderNo, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("orderNo=036752*678&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("437ad4588868a30680ddcf87d14eb1bf11e2f4960c5ecdbd2d2c67c36e004b3c", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/fiat/get-order-detail", actualRequest.url().encodedPath()); + } +} diff --git a/clients/fiat/src/test/java/com/binance/connector/client/fiat/rest/api/FiatApiTest.java b/clients/fiat/src/test/java/com/binance/connector/client/fiat/rest/api/FiatApiTest.java index e7e03548a..7c79c03e8 100644 --- a/clients/fiat/src/test/java/com/binance/connector/client/fiat/rest/api/FiatApiTest.java +++ b/clients/fiat/src/test/java/com/binance/connector/client/fiat/rest/api/FiatApiTest.java @@ -37,7 +37,7 @@ /** API tests for FiatApi */ public class FiatApiTest { - private FiatApi api; + private FiatRestApi api; private ApiClient apiClientSpy; private SignatureGenerator signatureGeneratorSpy; @@ -73,7 +73,7 @@ public void initApiClient() throws ApiException { Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); - api = new FiatApi(apiClientSpy); + api = new FiatRestApi(apiClientSpy); } /** diff --git a/clients/gift-card/CHANGELOG.md b/clients/gift-card/CHANGELOG.md index 9a88c2fba..ffdc2b883 100644 --- a/clients/gift-card/CHANGELOG.md +++ b/clients/gift-card/CHANGELOG.md @@ -1,10 +1,20 @@ # Changelog +## 2.0.0 - 2026-07-29 + +### Changed (1) + +- Modified parameter `externalUid`: + - maxLength `null` → `400` + - affected methods: + - `redeemABinanceGiftCard()` (`POST /sapi/v1/giftcard/redeemCode`) + ## 1.2.2 - 2026-04-30 - Update `binance/common` module to version `2.4.2`. ## 1.2.1 - 2025-08-07 + - Update `binance/common` module to version `2.0.0`. - Add `Content-Type` header only if there is a body. @@ -21,4 +31,4 @@ ## 1.0.0 - 2025-04-24 -- Initial release \ No newline at end of file +- Initial release diff --git a/clients/gift-card/docs/CreateADualTokenGiftCardRequest.md b/clients/gift-card/docs/CreateADualTokenGiftCardRequest.md index c12275dca..52df84fe0 100644 --- a/clients/gift-card/docs/CreateADualTokenGiftCardRequest.md +++ b/clients/gift-card/docs/CreateADualTokenGiftCardRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**baseToken** | **String** | | | -|**faceToken** | **String** | | | -|**baseTokenAmount** | **Double** | | | +|**baseToken** | **String** | The token you want to pay, example: BUSD | | +|**faceToken** | **String** | The token you want to buy, example: BNB. If faceToken = baseToken, it's the same as createCode endpoint. | | +|**baseTokenAmount** | **Double** | The base token asset quantity, example : 1.002 | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/gift-card/docs/CreateASingleTokenGiftCardRequest.md b/clients/gift-card/docs/CreateASingleTokenGiftCardRequest.md index 6a24db7f1..d4f5a6700 100644 --- a/clients/gift-card/docs/CreateASingleTokenGiftCardRequest.md +++ b/clients/gift-card/docs/CreateASingleTokenGiftCardRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**token** | **String** | | | -|**amount** | **Double** | | | +|**token** | **String** | The token type contained in the Binance Gift Card | | +|**amount** | **Double** | The amount of the token contained in the Binance Gift Card | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/gift-card/docs/FetchRsaPublicKeyResponse.md b/clients/gift-card/docs/FetchRSAPublicKeyResponse.md similarity index 100% rename from clients/gift-card/docs/FetchRsaPublicKeyResponse.md rename to clients/gift-card/docs/FetchRSAPublicKeyResponse.md diff --git a/clients/gift-card/docs/MarketDataApi.md b/clients/gift-card/docs/MarketDataApi.md index 058a574d6..e08884eb0 100644 --- a/clients/gift-card/docs/MarketDataApi.md +++ b/clients/gift-card/docs/MarketDataApi.md @@ -4,21 +4,21 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createADualTokenGiftCard**](MarketDataApi.md#createADualTokenGiftCard) | **POST** /sapi/v1/giftcard/buyCode | Create a dual-token gift card(fixed value, discount feature)(TRADE) | +| [**createADualTokenGiftCard**](MarketDataApi.md#createADualTokenGiftCard) | **POST** /sapi/v1/giftcard/buyCode | Create a dual-token gift card (fixed value, discount feature) (TRADE) | | [**createASingleTokenGiftCard**](MarketDataApi.md#createASingleTokenGiftCard) | **POST** /sapi/v1/giftcard/createCode | Create a single-token gift card (USER_DATA) | -| [**fetchRsaPublicKey**](MarketDataApi.md#fetchRsaPublicKey) | **GET** /sapi/v1/giftcard/cryptography/rsa-public-key | Fetch RSA Public Key(USER_DATA) | -| [**fetchTokenLimit**](MarketDataApi.md#fetchTokenLimit) | **GET** /sapi/v1/giftcard/buyCode/token-limit | Fetch Token Limit(USER_DATA) | -| [**redeemABinanceGiftCard**](MarketDataApi.md#redeemABinanceGiftCard) | **POST** /sapi/v1/giftcard/redeemCode | Redeem a Binance Gift Card(USER_DATA) | -| [**verifyBinanceGiftCardByGiftCardNumber**](MarketDataApi.md#verifyBinanceGiftCardByGiftCardNumber) | **GET** /sapi/v1/giftcard/verify | Verify Binance Gift Card by Gift Card Number(USER_DATA) | +| [**fetchRsaPublicKey**](MarketDataApi.md#fetchRsaPublicKey) | **GET** /sapi/v1/giftcard/cryptography/rsa-public-key | Fetch RSA Public Key (USER_DATA) | +| [**fetchTokenLimit**](MarketDataApi.md#fetchTokenLimit) | **GET** /sapi/v1/giftcard/buyCode/token-limit | Fetch Token Limit (USER_DATA) | +| [**redeemABinanceGiftCard**](MarketDataApi.md#redeemABinanceGiftCard) | **POST** /sapi/v1/giftcard/redeemCode | Redeem a Binance Gift Card (USER_DATA) | +| [**verifyBinanceGiftCardByGiftCardNumber**](MarketDataApi.md#verifyBinanceGiftCardByGiftCardNumber) | **GET** /sapi/v1/giftcard/verify | Verify Binance Gift Card by Gift Card Number (USER_DATA) | # **createADualTokenGiftCard** > CreateADualTokenGiftCardResponse createADualTokenGiftCard(createADualTokenGiftCardRequest) -Create a dual-token gift card(fixed value, discount feature)(TRADE) +Create a dual-token gift card (fixed value, discount feature) (TRADE) -* This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus 1 USDT fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption. * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet. * To get started with, please make sure: * You have a Binance account * You have passed KYB * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet * You need Enable Withdrawals for the API Key which requests this endpoint. Weight: 1 +* This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption. * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet. * To get started with, please make sure: * You have a Binance account * You have passed KYB * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet * You need Enable Withdrawals for the API Key which requests this endpoint. Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -80,7 +80,7 @@ No authorization required Create a single-token gift card (USER_DATA) -This API is for creating a Binance Gift Card. To get started with, please make sure: * You have a Binance account * You have passed KYB * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet * You need `Enable Withdrawals` for the API Key which requests this endpoint. Weight: 1 +This API is for creating a Binance Gift Card. To get started with, please make sure: * You have a Binance account * You have passed KYB * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet * You need `Enable Withdrawals` for the API Key which requests this endpoint. Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -140,9 +140,9 @@ No authorization required # **fetchRsaPublicKey** > FetchRsaPublicKeyResponse fetchRsaPublicKey(recvWindow) -Fetch RSA Public Key(USER_DATA) +Fetch RSA Public Key (USER_DATA) -This API is for fetching the RSA Public Key. This RSA Public key will be used to encrypt the card code. **Please note that the RSA Public key fetched is valid only for the current day.** Weight: 1 +This API is for fetching the RSA Public Key. This RSA Public key will be used to encrypt the card code. **Please note that the RSA Public key fetched is valid only for the current day.** Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -159,7 +159,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { FetchRsaPublicKeyResponse result = apiInstance.fetchRsaPublicKey(recvWindow); System.out.println(result); @@ -202,9 +202,9 @@ No authorization required # **fetchTokenLimit** > FetchTokenLimitResponse fetchTokenLimit(baseToken, recvWindow) -Fetch Token Limit(USER_DATA) +Fetch Token Limit (USER_DATA) -This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation. Weight: 1 +This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation. Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -221,8 +221,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String baseToken = "baseToken_example"; // String | The token you want to pay, example: BUSD - Long recvWindow = 56L; // Long | + String baseToken = "BUSD"; // String | The token you want to pay, example: BUSD + Long recvWindow = 5000L; // Long | try { FetchTokenLimitResponse result = apiInstance.fetchTokenLimit(baseToken, recvWindow); System.out.println(result); @@ -266,9 +266,9 @@ No authorization required # **redeemABinanceGiftCard** > RedeemABinanceGiftCardResponse redeemABinanceGiftCard(redeemABinanceGiftCardRequest) -Redeem a Binance Gift Card(USER_DATA) +Redeem a Binance Gift Card (USER_DATA) -This API is for redeeming a Binance Gift Card Once redeemed, the coins will be deposited in your funding wallet. * Parameter code can be sent in two formats: * Plaintext * Encrypted * Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed: * Fetch RSA public key from api stated below. * Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding` **A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:** Weight: 1 +This API is for redeeming a Binance Gift Card. Once redeemed, the coins will be deposited in your funding wallet. Weight(IP): 1 Security Type: USER_DATA Notes: - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`. - Sending `code` in encrypted format is more secure than plaintext. - To send encrypted `code`: - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`. - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`. - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day. ### Example ```java @@ -328,9 +328,9 @@ No authorization required # **verifyBinanceGiftCardByGiftCardNumber** > VerifyBinanceGiftCardByGiftCardNumberResponse verifyBinanceGiftCardByGiftCardNumber(referenceNo, recvWindow) -Verify Binance Gift Card by Gift Card Number(USER_DATA) +Verify Binance Gift Card by Gift Card Number (USER_DATA) -This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number. **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.** Weight: 1 +This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number. **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.** Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -347,8 +347,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String referenceNo = "referenceNo_example"; // String | Enter the Gift Card Number - Long recvWindow = 56L; // Long | + String referenceNo = "0033002328060227"; // String | Enter the Gift Card Number + Long recvWindow = 5000L; // Long | try { VerifyBinanceGiftCardByGiftCardNumberResponse result = apiInstance.verifyBinanceGiftCardByGiftCardNumber(referenceNo, recvWindow); System.out.println(result); diff --git a/clients/gift-card/docs/RedeemABinanceGiftCardRequest.md b/clients/gift-card/docs/RedeemABinanceGiftCardRequest.md index 089046abd..725cf03f1 100644 --- a/clients/gift-card/docs/RedeemABinanceGiftCardRequest.md +++ b/clients/gift-card/docs/RedeemABinanceGiftCardRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **String** | | | -|**externalUid** | **String** | | [optional] | +|**code** | **String** | Redemption code of Binance Gift Card to be redeemed, supports both Plaintext & Encrypted code. | | +|**externalUid** | **String** | Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters). | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/gift-card/docs/rest-api/migration-guide.md b/clients/gift-card/docs/rest-api/migration-guide.md index 7c6cd5c5d..e1c3943d5 100644 --- a/clients/gift-card/docs/rest-api/migration-guide.md +++ b/clients/gift-card/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-gift-card - 1.2.1 + 2.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-gift-card - 1.2.1 + 2.0.0 ``` diff --git a/clients/gift-card/example_rest.md b/clients/gift-card/example_rest.md index 3ea94df77..4f1157134 100644 --- a/clients/gift-card/example_rest.md +++ b/clients/gift-card/example_rest.md @@ -1,14 +1,14 @@ ## MarketData -[POST /sapi/v1/giftcard/buyCode](https://developers.binance.com/docs/gift_card/market-data/Create-a-dual-token-gift-card) - createADualTokenGiftCard - [CreateADualTokenGiftCardExample.java:56](/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateADualTokenGiftCardExample.java#L56) +[POST /sapi/v1/giftcard/buyCode](https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-adual-token-gift-card) - createADualTokenGiftCard - [CreateADualTokenGiftCardExample.java:45](/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateADualTokenGiftCardExample.java#L45) -[POST /sapi/v1/giftcard/createCode](https://developers.binance.com/docs/gift_card/market-data/Create-a-single-token-gift-card) - createASingleTokenGiftCard - [CreateASingleTokenGiftCardExample.java:50](/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateASingleTokenGiftCardExample.java#L50) +[POST /sapi/v1/giftcard/createCode](https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-asingle-token-gift-card) - createASingleTokenGiftCard - [CreateASingleTokenGiftCardExample.java:39](/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateASingleTokenGiftCardExample.java#L39) -[GET /sapi/v1/giftcard/cryptography/rsa-public-key](https://developers.binance.com/docs/gift_card/market-data/Fetch-RSA-Public-Key) - fetchRsaPublicKey - [FetchRsaPublicKeyExample.java:48](/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/FetchRsaPublicKeyExample.java#L48) +[GET /sapi/v1/giftcard/cryptography/rsa-public-key](https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#fetch-rsa-public-key) - fetchRsaPublicKey - [FetchRsaPublicKeyExample.java:37](/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/FetchRsaPublicKeyExample.java#L37) -[GET /sapi/v1/giftcard/buyCode/token-limit](https://developers.binance.com/docs/gift_card/market-data/Fetch-Token-Limit) - fetchTokenLimit - [FetchTokenLimitExample.java:47](/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/FetchTokenLimitExample.java#L47) +[GET /sapi/v1/giftcard/buyCode/token-limit](https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#fetch-token-limit) - fetchTokenLimit - [FetchTokenLimitExample.java:37](/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/FetchTokenLimitExample.java#L37) -[POST /sapi/v1/giftcard/redeemCode](https://developers.binance.com/docs/gift_card/market-data/Redeem-a-Binance-Gift-Card) - redeemABinanceGiftCard - [RedeemABinanceGiftCardExample.java:54](/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/RedeemABinanceGiftCardExample.java#L54) +[POST /sapi/v1/giftcard/redeemCode](https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#redeem-abinance-gift-card) - redeemABinanceGiftCard - [RedeemABinanceGiftCardExample.java:43](/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/RedeemABinanceGiftCardExample.java#L43) -[GET /sapi/v1/giftcard/verify](https://developers.binance.com/docs/gift_card/market-data/Verify-Binance-Gift-Card-by-Gift-Card-Number) - verifyBinanceGiftCardByGiftCardNumber - [VerifyBinanceGiftCardByGiftCardNumberExample.java:48](/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/VerifyBinanceGiftCardByGiftCardNumberExample.java#L48) +[GET /sapi/v1/giftcard/verify](https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#verify-binance-gift-card-by-gift-card-number) - verifyBinanceGiftCardByGiftCardNumber - [VerifyBinanceGiftCardByGiftCardNumberExample.java:38](/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/VerifyBinanceGiftCardByGiftCardNumberExample.java#L38) diff --git a/clients/gift-card/pom.xml b/clients/gift-card/pom.xml index c7cb32f20..d168fb746 100644 --- a/clients/gift-card/pom.xml +++ b/clients/gift-card/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-gift-card gift-card - 1.2.2 + 2.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/JSON.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/JSON.java index 5cacd7a9e..df32d02bd 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/JSON.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Gift Card REST API - * OpenAPI Specification for the Binance Gift Card REST API + * Gift Card REST API + * Create, redeem, and check the value of Binance crypto gift cards. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/api/GiftCardRestApi.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/api/GiftCardRestApi.java index 31578ae1e..a63a3858a 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/api/GiftCardRestApi.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/api/GiftCardRestApi.java @@ -28,17 +28,17 @@ public GiftCardRestApi(ApiClient apiClient) { } /** - * Create a dual-token gift card(fixed value, discount feature)(TRADE) * This API is for + * Create a dual-token gift card (fixed value, discount feature) (TRADE) * This API is for * creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card * using USDT as baseToken, that is redeemable to another designated token (faceToken). For - * example, you can create a fixed-value BTC gift card and pay with 100 USDT plus 1 USDT fee. + * example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. * This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable * to BTC equivalent to 100 USDT upon redemption. * Once successfully created, the amount of * baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from * your funding wallet. * To get started with, please make sure: * You have a Binance account * * You have passed KYB * You have a sufficient balance(Gift Card amount and fee amount) in your * Binance funding wallet * You need Enable Withdrawals for the API Key which requests this - * endpoint. Weight: 1 + * endpoint. Weight(IP): 1 Security Type: TRADE * * @param createADualTokenGiftCardRequest (required) * @return ApiResponse<CreateADualTokenGiftCardResponse> @@ -52,8 +52,8 @@ public GiftCardRestApi(ApiClient apiClient) { * * * @see Create - * a dual-token gift card(fixed value, discount feature)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-adual-token-gift-card">Create + * a dual-token gift card (fixed value, discount feature) (TRADE) Documentation */ public ApiResponse createADualTokenGiftCard( CreateADualTokenGiftCardRequest createADualTokenGiftCardRequest) throws ApiException { @@ -64,8 +64,8 @@ public ApiResponse createADualTokenGiftCard( * Create a single-token gift card (USER_DATA) This API is for creating a Binance Gift Card. To * get started with, please make sure: * You have a Binance account * You have passed KYB * You * have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet * - * You need `Enable Withdrawals` for the API Key which requests this endpoint. Weight: - * 1 + * You need `Enable Withdrawals` for the API Key which requests this endpoint. + * Weight(IP): 1 Security Type: USER_DATA * * @param createASingleTokenGiftCardRequest (required) * @return ApiResponse<CreateASingleTokenGiftCardResponse> @@ -79,7 +79,7 @@ public ApiResponse createADualTokenGiftCard( * * * @see Create + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-asingle-token-gift-card">Create * a single-token gift card (USER_DATA) Documentation */ public ApiResponse createASingleTokenGiftCard( @@ -89,9 +89,9 @@ public ApiResponse createASingleTokenGiftCar } /** - * Fetch RSA Public Key(USER_DATA) This API is for fetching the RSA Public Key. This RSA Public + * Fetch RSA Public Key (USER_DATA) This API is for fetching the RSA Public Key. This RSA Public * key will be used to encrypt the card code. **Please note that the RSA Public key fetched is - * valid only for the current day.** Weight: 1 + * valid only for the current day.** Weight(IP): 1 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<FetchRsaPublicKeyResponse> @@ -105,8 +105,8 @@ public ApiResponse createASingleTokenGiftCar * * * @see Fetch - * RSA Public Key(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#fetch-rsa-public-key">Fetch + * RSA Public Key (USER_DATA) Documentation */ public ApiResponse fetchRsaPublicKey(Long recvWindow) throws ApiException { @@ -114,9 +114,9 @@ public ApiResponse fetchRsaPublicKey(Long recvWindow) } /** - * Fetch Token Limit(USER_DATA) This API is to help you verify which tokens are available for + * Fetch Token Limit (USER_DATA) This API is to help you verify which tokens are available for * you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ - * limitation. Weight: 1 + * limitation. Weight(IP): 1 Security Type: USER_DATA * * @param baseToken The token you want to pay, example: BUSD (required) * @param recvWindow (optional) @@ -131,8 +131,8 @@ public ApiResponse fetchRsaPublicKey(Long recvWindow) * * * @see Fetch - * Token Limit(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#fetch-token-limit">Fetch + * Token Limit (USER_DATA) Documentation */ public ApiResponse fetchTokenLimit(String baseToken, Long recvWindow) throws ApiException { @@ -140,15 +140,15 @@ public ApiResponse fetchTokenLimit(String baseToken, Lo } /** - * Redeem a Binance Gift Card(USER_DATA) This API is for redeeming a Binance Gift Card Once - * redeemed, the coins will be deposited in your funding wallet. * Parameter code can be sent in - * two formats: * Plaintext * Encrypted * Sending code in Encrypted format provides more - * security than sending it as a plaintext. To send card code in encrypted format the following - * steps must be followed: * Fetch RSA public key from api stated below. * Use the below - * algorithm to encrypt the card code using the RSA public key fetched above: - * `RSA/ECB/OAEPWithSHA-256AndMGF1Padding` **A sample code snippet (JAVA) is stated - * below for reference, the same approach can be used for different languages like C#, PERL, - * PYTHON, SHELL etc.:** Weight: 1 + * Redeem a Binance Gift Card (USER_DATA) This API is for redeeming a Binance Gift Card. Once + * redeemed, the coins will be deposited in your funding wallet. Weight(IP): 1 Security Type: + * USER_DATA Notes: - Parameter `code` can be sent in two formats: + * `Plaintext` and `Encrypted`. - Sending `code` in encrypted + * format is more secure than plaintext. - To send encrypted `code`: - Fetch RSA + * public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`. - Encrypt card + * code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`. - If you enter the wrong + * redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance + * Gift Cards that day. * * @param redeemABinanceGiftCardRequest (required) * @return ApiResponse<RedeemABinanceGiftCardResponse> @@ -162,8 +162,8 @@ public ApiResponse fetchTokenLimit(String baseToken, Lo * * * @see Redeem - * a Binance Gift Card(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#redeem-abinance-gift-card">Redeem + * a Binance Gift Card (USER_DATA) Documentation */ public ApiResponse redeemABinanceGiftCard( RedeemABinanceGiftCardRequest redeemABinanceGiftCardRequest) throws ApiException { @@ -171,10 +171,10 @@ public ApiResponse redeemABinanceGiftCard( } /** - * Verify Binance Gift Card by Gift Card Number(USER_DATA) This API is for verifying whether the - * Binance Gift Card is valid or not by entering Gift Card Number. **Please note that if you + * Verify Binance Gift Card by Gift Card Number (USER_DATA) This API is for verifying whether + * the Binance Gift Card is valid or not by entering Gift Card Number. **Please note that if you * enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify - * any Gift Card Number for that hour.** Weight: 1 + * any Gift Card Number for that hour.** Weight(IP): 1 Security Type: USER_DATA * * @param referenceNo Enter the Gift Card Number (required) * @param recvWindow (optional) @@ -189,8 +189,8 @@ public ApiResponse redeemABinanceGiftCard( * * * @see Verify - * Binance Gift Card by Gift Card Number(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#verify-binance-gift-card-by-gift-card-number">Verify + * Binance Gift Card by Gift Card Number (USER_DATA) Documentation */ public ApiResponse verifyBinanceGiftCardByGiftCardNumber(String referenceNo, Long recvWindow) diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/api/MarketDataApi.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/api/MarketDataApi.java index fca6f1208..8b7d55d04 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/api/MarketDataApi.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/api/MarketDataApi.java @@ -1,6 +1,6 @@ /* - * Binance Gift Card REST API - * OpenAPI Specification for the Binance Gift Card REST API + * Gift Card REST API + * Create, redeem, and check the value of Binance crypto gift cards. * * The version of the OpenAPI document: 1.0.0 * @@ -52,7 +52,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-gift-card/1.2.1 (Java/%s; %s; %s)", + "binance-gift-card/2.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -103,8 +103,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Create - * a dual-token gift card(fixed value, discount feature)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-adual-token-gift-card">Create + * a dual-token gift card (fixed value, discount feature) (TRADE) Documentation */ private okhttp3.Call createADualTokenGiftCardCall( CreateADualTokenGiftCardRequest createADualTokenGiftCardRequest) throws ApiException { @@ -217,17 +217,17 @@ private okhttp3.Call createADualTokenGiftCardValidateBeforeCall( } /** - * Create a dual-token gift card(fixed value, discount feature)(TRADE) * This API is for + * Create a dual-token gift card (fixed value, discount feature) (TRADE) * This API is for * creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card * using USDT as baseToken, that is redeemable to another designated token (faceToken). For - * example, you can create a fixed-value BTC gift card and pay with 100 USDT plus 1 USDT fee. + * example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. * This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable * to BTC equivalent to 100 USDT upon redemption. * Once successfully created, the amount of * baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from * your funding wallet. * To get started with, please make sure: * You have a Binance account * * You have passed KYB * You have a sufficient balance(Gift Card amount and fee amount) in your * Binance funding wallet * You need Enable Withdrawals for the API Key which requests this - * endpoint. Weight: 1 + * endpoint. Weight(IP): 1 Security Type: TRADE * * @param createADualTokenGiftCardRequest (required) * @return ApiResponse<CreateADualTokenGiftCardResponse> @@ -241,8 +241,8 @@ private okhttp3.Call createADualTokenGiftCardValidateBeforeCall( * * * @see Create - * a dual-token gift card(fixed value, discount feature)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-adual-token-gift-card">Create + * a dual-token gift card (fixed value, discount feature) (TRADE) Documentation */ public ApiResponse createADualTokenGiftCard( @Valid @NotNull CreateADualTokenGiftCardRequest createADualTokenGiftCardRequest) @@ -268,7 +268,7 @@ public ApiResponse createADualTokenGiftCard( * * * @see Create + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-asingle-token-gift-card">Create * a single-token gift card (USER_DATA) Documentation */ private okhttp3.Call createASingleTokenGiftCardCall( @@ -383,8 +383,8 @@ private okhttp3.Call createASingleTokenGiftCardValidateBeforeCall( * Create a single-token gift card (USER_DATA) This API is for creating a Binance Gift Card. To * get started with, please make sure: * You have a Binance account * You have passed KYB * You * have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet * - * You need `Enable Withdrawals` for the API Key which requests this endpoint. Weight: - * 1 + * You need `Enable Withdrawals` for the API Key which requests this endpoint. + * Weight(IP): 1 Security Type: USER_DATA * * @param createASingleTokenGiftCardRequest (required) * @return ApiResponse<CreateASingleTokenGiftCardResponse> @@ -398,7 +398,7 @@ private okhttp3.Call createASingleTokenGiftCardValidateBeforeCall( * * * @see Create + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-asingle-token-gift-card">Create * a single-token gift card (USER_DATA) Documentation */ public ApiResponse createASingleTokenGiftCard( @@ -425,8 +425,8 @@ public ApiResponse createASingleTokenGiftCar * * * @see Fetch - * RSA Public Key(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#fetch-rsa-public-key">Fetch + * RSA Public Key (USER_DATA) Documentation */ private okhttp3.Call fetchRsaPublicKeyCall(Long recvWindow) throws ApiException { String basePath = null; @@ -518,9 +518,9 @@ private okhttp3.Call fetchRsaPublicKeyValidateBeforeCall(Long recvWindow) throws } /** - * Fetch RSA Public Key(USER_DATA) This API is for fetching the RSA Public Key. This RSA Public + * Fetch RSA Public Key (USER_DATA) This API is for fetching the RSA Public Key. This RSA Public * key will be used to encrypt the card code. **Please note that the RSA Public key fetched is - * valid only for the current day.** Weight: 1 + * valid only for the current day.** Weight(IP): 1 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<FetchRsaPublicKeyResponse> @@ -534,10 +534,10 @@ private okhttp3.Call fetchRsaPublicKeyValidateBeforeCall(Long recvWindow) throws * * * @see Fetch - * RSA Public Key(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#fetch-rsa-public-key">Fetch + * RSA Public Key (USER_DATA) Documentation */ - public ApiResponse fetchRsaPublicKey(Long recvWindow) + public ApiResponse fetchRsaPublicKey(@Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = fetchRsaPublicKeyValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = @@ -560,8 +560,8 @@ public ApiResponse fetchRsaPublicKey(Long recvWindow) * * * @see Fetch - * Token Limit(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#fetch-token-limit">Fetch + * Token Limit (USER_DATA) Documentation */ private okhttp3.Call fetchTokenLimitCall(String baseToken, Long recvWindow) throws ApiException { @@ -659,9 +659,9 @@ private okhttp3.Call fetchTokenLimitValidateBeforeCall(String baseToken, Long re } /** - * Fetch Token Limit(USER_DATA) This API is to help you verify which tokens are available for + * Fetch Token Limit (USER_DATA) This API is to help you verify which tokens are available for * you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ - * limitation. Weight: 1 + * limitation. Weight(IP): 1 Security Type: USER_DATA * * @param baseToken The token you want to pay, example: BUSD (required) * @param recvWindow (optional) @@ -676,11 +676,11 @@ private okhttp3.Call fetchTokenLimitValidateBeforeCall(String baseToken, Long re * * * @see Fetch - * Token Limit(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#fetch-token-limit">Fetch + * Token Limit (USER_DATA) Documentation */ public ApiResponse fetchTokenLimit( - @NotNull String baseToken, Long recvWindow) throws ApiException { + @NotNull String baseToken, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = fetchTokenLimitValidateBeforeCall(baseToken, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -701,8 +701,8 @@ public ApiResponse fetchTokenLimit( * * * @see Redeem - * a Binance Gift Card(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#redeem-abinance-gift-card">Redeem + * a Binance Gift Card (USER_DATA) Documentation */ private okhttp3.Call redeemABinanceGiftCardCall( RedeemABinanceGiftCardRequest redeemABinanceGiftCardRequest) throws ApiException { @@ -807,15 +807,15 @@ private okhttp3.Call redeemABinanceGiftCardValidateBeforeCall( } /** - * Redeem a Binance Gift Card(USER_DATA) This API is for redeeming a Binance Gift Card Once - * redeemed, the coins will be deposited in your funding wallet. * Parameter code can be sent in - * two formats: * Plaintext * Encrypted * Sending code in Encrypted format provides more - * security than sending it as a plaintext. To send card code in encrypted format the following - * steps must be followed: * Fetch RSA public key from api stated below. * Use the below - * algorithm to encrypt the card code using the RSA public key fetched above: - * `RSA/ECB/OAEPWithSHA-256AndMGF1Padding` **A sample code snippet (JAVA) is stated - * below for reference, the same approach can be used for different languages like C#, PERL, - * PYTHON, SHELL etc.:** Weight: 1 + * Redeem a Binance Gift Card (USER_DATA) This API is for redeeming a Binance Gift Card. Once + * redeemed, the coins will be deposited in your funding wallet. Weight(IP): 1 Security Type: + * USER_DATA Notes: - Parameter `code` can be sent in two formats: + * `Plaintext` and `Encrypted`. - Sending `code` in encrypted + * format is more secure than plaintext. - To send encrypted `code`: - Fetch RSA + * public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`. - Encrypt card + * code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`. - If you enter the wrong + * redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance + * Gift Cards that day. * * @param redeemABinanceGiftCardRequest (required) * @return ApiResponse<RedeemABinanceGiftCardResponse> @@ -829,8 +829,8 @@ private okhttp3.Call redeemABinanceGiftCardValidateBeforeCall( * * * @see Redeem - * a Binance Gift Card(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#redeem-abinance-gift-card">Redeem + * a Binance Gift Card (USER_DATA) Documentation */ public ApiResponse redeemABinanceGiftCard( @Valid @NotNull RedeemABinanceGiftCardRequest redeemABinanceGiftCardRequest) @@ -857,8 +857,8 @@ public ApiResponse redeemABinanceGiftCard( * * * @see Verify - * Binance Gift Card by Gift Card Number(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#verify-binance-gift-card-by-gift-card-number">Verify + * Binance Gift Card by Gift Card Number (USER_DATA) Documentation */ private okhttp3.Call verifyBinanceGiftCardByGiftCardNumberCall( String referenceNo, Long recvWindow) throws ApiException { @@ -962,10 +962,10 @@ private okhttp3.Call verifyBinanceGiftCardByGiftCardNumberValidateBeforeCall( } /** - * Verify Binance Gift Card by Gift Card Number(USER_DATA) This API is for verifying whether the - * Binance Gift Card is valid or not by entering Gift Card Number. **Please note that if you + * Verify Binance Gift Card by Gift Card Number (USER_DATA) This API is for verifying whether + * the Binance Gift Card is valid or not by entering Gift Card Number. **Please note that if you * enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify - * any Gift Card Number for that hour.** Weight: 1 + * any Gift Card Number for that hour.** Weight(IP): 1 Security Type: USER_DATA * * @param referenceNo Enter the Gift Card Number (required) * @param recvWindow (optional) @@ -980,12 +980,12 @@ private okhttp3.Call verifyBinanceGiftCardByGiftCardNumberValidateBeforeCall( * * * @see Verify - * Binance Gift Card by Gift Card Number(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#verify-binance-gift-card-by-gift-card-number">Verify + * Binance Gift Card by Gift Card Number (USER_DATA) Documentation */ public ApiResponse - verifyBinanceGiftCardByGiftCardNumber(@NotNull String referenceNo, Long recvWindow) - throws ApiException { + verifyBinanceGiftCardByGiftCardNumber( + @NotNull String referenceNo, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = verifyBinanceGiftCardByGiftCardNumberValidateBeforeCall(referenceNo, recvWindow); java.lang.reflect.Type localVarReturnType = diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateADualTokenGiftCardRequest.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateADualTokenGiftCardRequest.java index afe62e90a..fe906b651 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateADualTokenGiftCardRequest.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateADualTokenGiftCardRequest.java @@ -1,6 +1,6 @@ /* - * Binance Gift Card REST API - * OpenAPI Specification for the Binance Gift Card REST API + * Gift Card REST API + * Create, redeem, and check the value of Binance crypto gift cards. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** CreateADualTokenGiftCardRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CreateADualTokenGiftCardRequest { public static final String SERIALIZED_NAME_BASE_TOKEN = "baseToken"; @@ -69,7 +69,7 @@ public CreateADualTokenGiftCardRequest baseToken(@jakarta.annotation.Nonnull Str } /** - * Get baseToken + * The token you want to pay, example: BUSD * * @return baseToken */ @@ -89,7 +89,8 @@ public CreateADualTokenGiftCardRequest faceToken(@jakarta.annotation.Nonnull Str } /** - * Get faceToken + * The token you want to buy, example: BNB. If faceToken = baseToken, it's the same as + * createCode endpoint. * * @return faceToken */ @@ -110,7 +111,7 @@ public CreateADualTokenGiftCardRequest baseTokenAmount( } /** - * Get baseTokenAmount + * The base token asset quantity, example : 1.002 * * @return baseTokenAmount */ @@ -132,11 +133,12 @@ public CreateADualTokenGiftCardRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateADualTokenGiftCardResponse.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateADualTokenGiftCardResponse.java index 186a7f5f3..b3752f5a5 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateADualTokenGiftCardResponse.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateADualTokenGiftCardResponse.java @@ -1,6 +1,6 @@ /* - * Binance Gift Card REST API - * OpenAPI Specification for the Binance Gift Card REST API + * Gift Card REST API + * Create, redeem, and check the value of Binance crypto gift cards. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** CreateADualTokenGiftCardResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CreateADualTokenGiftCardResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateADualTokenGiftCardResponseData.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateADualTokenGiftCardResponseData.java index fc9f62d9b..4ba381cdf 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateADualTokenGiftCardResponseData.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateADualTokenGiftCardResponseData.java @@ -1,6 +1,6 @@ /* - * Binance Gift Card REST API - * OpenAPI Specification for the Binance Gift Card REST API + * Gift Card REST API + * Create, redeem, and check the value of Binance crypto gift cards. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CreateADualTokenGiftCardResponseData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CreateADualTokenGiftCardResponseData { public static final String SERIALIZED_NAME_REFERENCE_NO = "referenceNo"; diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateASingleTokenGiftCardRequest.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateASingleTokenGiftCardRequest.java index a35fcd62e..a64dc5ad9 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateASingleTokenGiftCardRequest.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateASingleTokenGiftCardRequest.java @@ -1,6 +1,6 @@ /* - * Binance Gift Card REST API - * OpenAPI Specification for the Binance Gift Card REST API + * Gift Card REST API + * Create, redeem, and check the value of Binance crypto gift cards. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** CreateASingleTokenGiftCardRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CreateASingleTokenGiftCardRequest { public static final String SERIALIZED_NAME_TOKEN = "token"; @@ -63,7 +63,7 @@ public CreateASingleTokenGiftCardRequest token(@jakarta.annotation.Nonnull Strin } /** - * Get token + * The token type contained in the Binance Gift Card * * @return token */ @@ -83,7 +83,7 @@ public CreateASingleTokenGiftCardRequest amount(@jakarta.annotation.Nonnull Doub } /** - * Get amount + * The amount of the token contained in the Binance Gift Card * * @return amount */ @@ -105,11 +105,12 @@ public CreateASingleTokenGiftCardRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateASingleTokenGiftCardResponse.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateASingleTokenGiftCardResponse.java index 050940fef..e21ab0923 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateASingleTokenGiftCardResponse.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/CreateASingleTokenGiftCardResponse.java @@ -1,6 +1,6 @@ /* - * Binance Gift Card REST API - * OpenAPI Specification for the Binance Gift Card REST API + * Gift Card REST API + * Create, redeem, and check the value of Binance crypto gift cards. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** CreateASingleTokenGiftCardResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CreateASingleTokenGiftCardResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/FetchRsaPublicKeyResponse.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/FetchRsaPublicKeyResponse.java index ce86f20b6..282924ec1 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/FetchRsaPublicKeyResponse.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/FetchRsaPublicKeyResponse.java @@ -1,6 +1,6 @@ /* - * Binance Gift Card REST API - * OpenAPI Specification for the Binance Gift Card REST API + * Gift Card REST API + * Create, redeem, and check the value of Binance crypto gift cards. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FetchRsaPublicKeyResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FetchRsaPublicKeyResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/FetchTokenLimitResponse.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/FetchTokenLimitResponse.java index 25ce2c7d0..519eac897 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/FetchTokenLimitResponse.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/FetchTokenLimitResponse.java @@ -1,6 +1,6 @@ /* - * Binance Gift Card REST API - * OpenAPI Specification for the Binance Gift Card REST API + * Gift Card REST API + * Create, redeem, and check the value of Binance crypto gift cards. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** FetchTokenLimitResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FetchTokenLimitResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/FetchTokenLimitResponseDataInner.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/FetchTokenLimitResponseDataInner.java index 2f3e93e24..27158c9f9 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/FetchTokenLimitResponseDataInner.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/FetchTokenLimitResponseDataInner.java @@ -1,6 +1,6 @@ /* - * Binance Gift Card REST API - * OpenAPI Specification for the Binance Gift Card REST API + * Gift Card REST API + * Create, redeem, and check the value of Binance crypto gift cards. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FetchTokenLimitResponseDataInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FetchTokenLimitResponseDataInner { public static final String SERIALIZED_NAME_COIN = "coin"; diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/RedeemABinanceGiftCardRequest.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/RedeemABinanceGiftCardRequest.java index db352e638..e02ed8138 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/RedeemABinanceGiftCardRequest.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/RedeemABinanceGiftCardRequest.java @@ -1,6 +1,6 @@ /* - * Binance Gift Card REST API - * OpenAPI Specification for the Binance Gift Card REST API + * Gift Card REST API + * Create, redeem, and check the value of Binance crypto gift cards. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RedeemABinanceGiftCardRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RedeemABinanceGiftCardRequest { public static final String SERIALIZED_NAME_CODE = "code"; @@ -62,7 +62,8 @@ public RedeemABinanceGiftCardRequest code(@jakarta.annotation.Nonnull String cod } /** - * Get code + * Redemption code of Binance Gift Card to be redeemed, supports both Plaintext & Encrypted + * code. * * @return code */ @@ -83,11 +84,19 @@ public RedeemABinanceGiftCardRequest externalUid( } /** - * Get externalUid + * Each external unique ID represents a unique user on the partner platform. The function helps + * you to identify the redemption behavior of different users, such as redemption frequency and + * amount. It also helps risk and limit control of a single account, such as daily limit on + * redemption volume, frequency, and incorrect number of entries. This will also prevent a + * single user account reach the partner's daily redemption limits. We strongly recommend + * you to use this feature and transfer us the User ID of your users if you have different users + * redeeming Binance Gift Cards on your platform. To protect user data privacy, you may choose + * to transfer the user id in any desired format (max. 400 characters). * * @return externalUid */ @jakarta.annotation.Nullable + @Size(max = 400) public String getExternalUid() { return externalUid; } @@ -102,11 +111,12 @@ public RedeemABinanceGiftCardRequest recvWindow(@jakarta.annotation.Nullable Lon } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/RedeemABinanceGiftCardResponse.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/RedeemABinanceGiftCardResponse.java index ba1110b52..5e7d9d8fc 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/RedeemABinanceGiftCardResponse.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/RedeemABinanceGiftCardResponse.java @@ -1,6 +1,6 @@ /* - * Binance Gift Card REST API - * OpenAPI Specification for the Binance Gift Card REST API + * Gift Card REST API + * Create, redeem, and check the value of Binance crypto gift cards. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** RedeemABinanceGiftCardResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RedeemABinanceGiftCardResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/RedeemABinanceGiftCardResponseData.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/RedeemABinanceGiftCardResponseData.java index 0ea3913e1..b9418bbd9 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/RedeemABinanceGiftCardResponseData.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/RedeemABinanceGiftCardResponseData.java @@ -1,6 +1,6 @@ /* - * Binance Gift Card REST API - * OpenAPI Specification for the Binance Gift Card REST API + * Gift Card REST API + * Create, redeem, and check the value of Binance crypto gift cards. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RedeemABinanceGiftCardResponseData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RedeemABinanceGiftCardResponseData { public static final String SERIALIZED_NAME_REFERENCE_NO = "referenceNo"; diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/VerifyBinanceGiftCardByGiftCardNumberResponse.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/VerifyBinanceGiftCardByGiftCardNumberResponse.java index 0b54f5147..a48b0d02e 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/VerifyBinanceGiftCardByGiftCardNumberResponse.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/VerifyBinanceGiftCardByGiftCardNumberResponse.java @@ -1,6 +1,6 @@ /* - * Binance Gift Card REST API - * OpenAPI Specification for the Binance Gift Card REST API + * Gift Card REST API + * Create, redeem, and check the value of Binance crypto gift cards. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** VerifyBinanceGiftCardByGiftCardNumberResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class VerifyBinanceGiftCardByGiftCardNumberResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/VerifyBinanceGiftCardByGiftCardNumberResponseData.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/VerifyBinanceGiftCardByGiftCardNumberResponseData.java index 0c2a37662..3cfc3a444 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/VerifyBinanceGiftCardByGiftCardNumberResponseData.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/model/VerifyBinanceGiftCardByGiftCardNumberResponseData.java @@ -1,6 +1,6 @@ /* - * Binance Gift Card REST API - * OpenAPI Specification for the Binance Gift Card REST API + * Gift Card REST API + * Create, redeem, and check the value of Binance crypto gift cards. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** VerifyBinanceGiftCardByGiftCardNumberResponseData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class VerifyBinanceGiftCardByGiftCardNumberResponseData { public static final String SERIALIZED_NAME_VALID = "valid"; diff --git a/clients/gift-card/src/test/java/com/binance/connector/client/gift_card/rest/api/MarketDataApiTest.java b/clients/gift-card/src/test/java/com/binance/connector/client/gift_card/rest/api/MarketDataApiTest.java index a727723e9..47420c73d 100644 --- a/clients/gift-card/src/test/java/com/binance/connector/client/gift_card/rest/api/MarketDataApiTest.java +++ b/clients/gift-card/src/test/java/com/binance/connector/client/gift_card/rest/api/MarketDataApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Gift Card REST API - * OpenAPI Specification for the Binance Gift Card REST API + * Gift Card REST API + * Create, redeem, and check the value of Binance crypto gift cards. * * The version of the OpenAPI document: 1.0.0 * @@ -33,6 +33,7 @@ import com.binance.connector.client.gift_card.rest.model.RedeemABinanceGiftCardResponse; import com.binance.connector.client.gift_card.rest.model.VerifyBinanceGiftCardByGiftCardNumberResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -84,29 +85,27 @@ public void initApiClient() throws ApiException { } /** - * Create a dual-token gift card(fixed value, discount feature)(TRADE) + * Create a dual-token gift card (fixed value, discount feature) (TRADE) * *

* This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You * may create a gift card using USDT as baseToken, that is redeemable to another designated * token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 - * USDT plus 1 USDT fee. This gift card can keep the value fixed at 100 USDT before redemption, + * USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, * and will be redeemable to BTC equivalent to 100 USDT upon redemption. * Once successfully * created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee * would be deducted from your funding wallet. * To get started with, please make sure: * You * have a Binance account * You have passed KYB * You have a sufficient balance(Gift Card amount * and fee amount) in your Binance funding wallet * You need Enable Withdrawals for the API Key - * which requests this endpoint. Weight: 1 * Monthly creation volume: 4,200,000 USDC / month / - * account * Monthly creation quantity: 6,000 Gift Cards / month / account + * which requests this endpoint. Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void createADualTokenGiftCardTest() throws ApiException, CryptoException { + public void createADualTokenGiftCardTest() throws ApiException, CryptoException, IOException { CreateADualTokenGiftCardRequest createADualTokenGiftCardRequest = new CreateADualTokenGiftCardRequest(); - - createADualTokenGiftCardRequest.baseToken(""); - createADualTokenGiftCardRequest.faceToken(""); + createADualTokenGiftCardRequest.baseToken("BUSD"); + createADualTokenGiftCardRequest.faceToken("BNB"); createADualTokenGiftCardRequest.baseTokenAmount(1d); ApiResponse response = @@ -122,11 +121,9 @@ public void createADualTokenGiftCardTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000faceToken=BNB&baseToken=BUSD&baseTokenAmount=1", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000faceToken=&baseToken=&baseTokenAmount=1", - signInputCaptor.getValue()); - assertEquals( - "bbe48ab31c99a9424cf70566cd9e185b82788212d8b92ac66e921f0f6cdece26", + "07659b7881671e2a39f62759f7f3bf2ca4b7c671f8a67afc56851a6782826e43", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/giftcard/buyCode", actualRequest.url().encodedPath()); } @@ -137,17 +134,15 @@ public void createADualTokenGiftCardTest() throws ApiException, CryptoException *

This API is for creating a Binance Gift Card. To get started with, please make sure: * You * have a Binance account * You have passed KYB * You have a sufficient balance(Gift Card amount * and fee amount) in your Binance funding wallet * You need `Enable Withdrawals` for - * the API Key which requests this endpoint. Weight: 1 * Monthly creation volume: 4,200,000 USDC - * / month / account * Monthly creation quantity: 6,000 Gift Cards / month / account + * the API Key which requests this endpoint. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void createASingleTokenGiftCardTest() throws ApiException, CryptoException { + public void createASingleTokenGiftCardTest() throws ApiException, CryptoException, IOException { CreateASingleTokenGiftCardRequest createASingleTokenGiftCardRequest = new CreateASingleTokenGiftCardRequest(); - - createASingleTokenGiftCardRequest.token(""); + createASingleTokenGiftCardRequest.token("BNB"); createASingleTokenGiftCardRequest.amount(1d); ApiResponse response = @@ -163,24 +158,24 @@ public void createASingleTokenGiftCardTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000amount=1&token=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000amount=1&token=BNB", signInputCaptor.getValue()); assertEquals( - "91dfe9e37be6d04c246a02fcc01ed644ea5257803912f5cef6f46a021a1b8248", + "8bdf3f52730631b6a3bd44da7ac1bacf7d252dc6048245d4875b62ffe36b7206", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/giftcard/createCode", actualRequest.url().encodedPath()); } /** - * Fetch RSA Public Key(USER_DATA) + * Fetch RSA Public Key (USER_DATA) * *

This API is for fetching the RSA Public Key. This RSA Public key will be used to encrypt * the card code. **Please note that the RSA Public key fetched is valid only for the current - * day.** Weight: 1 + * day.** Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void fetchRsaPublicKeyTest() throws ApiException, CryptoException { + public void fetchRsaPublicKeyTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.fetchRsaPublicKey(recvWindow); @@ -196,23 +191,22 @@ public void fetchRsaPublicKeyTest() throws ApiException, CryptoException { assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/giftcard/cryptography/rsa-public-key", actualRequest.url().encodedPath()); + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/giftcard/cryptography/rsa-public-key", actualRequest.url().encodedPath()); } /** - * Fetch Token Limit(USER_DATA) + * Fetch Token Limit (USER_DATA) * *

This API is to help you verify which tokens are available for you to create - * Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation. Weight: 1 + * Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation. Weight(IP): + * 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void fetchTokenLimitTest() throws ApiException, CryptoException { - String baseToken = ""; + public void fetchTokenLimitTest() throws ApiException, CryptoException, IOException { + String baseToken = "BUSD"; Long recvWindow = 5000L; ApiResponse response = api.fetchTokenLimit(baseToken, recvWindow); @@ -226,34 +220,31 @@ public void fetchTokenLimitTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("baseToken=BUSD&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "baseToken=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "ad48ec2424bc86ad21d7fc07d5661584031423f7843df207b496c96683f24adf", - actualRequest.url().queryParameter("signature")); + "2effe431d7d70bacce07fd901a4cde9fda23bae5daee514e3e793d57f6e0a61b", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/giftcard/buyCode/token-limit", actualRequest.url().encodedPath()); } /** - * Redeem a Binance Gift Card(USER_DATA) + * Redeem a Binance Gift Card (USER_DATA) * - *

This API is for redeeming a Binance Gift Card Once redeemed, the coins will be deposited - * in your funding wallet. * Parameter code can be sent in two formats: * Plaintext * Encrypted - * * Sending code in Encrypted format provides more security than sending it as a plaintext. To - * send card code in encrypted format the following steps must be followed: * Fetch RSA public - * key from api stated below. * Use the below algorithm to encrypt the card code using the RSA - * public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding` **A sample code - * snippet (JAVA) is stated below for reference, the same approach can be used for different - * languages like C#, PERL, PYTHON, SHELL etc.:** Weight: 1 + *

This API is for redeeming a Binance Gift Card. Once redeemed, the coins will be deposited + * in your funding wallet. Weight(IP): 1 Security Type: USER_DATA Notes: - Parameter + * `code` can be sent in two formats: `Plaintext` and `Encrypted`. + * - Sending `code` in encrypted format is more secure than plaintext. - To send + * encrypted `code`: - Fetch RSA public key from `GET + * /sapi/v1/giftcard/cryptography/rsa-public-key`. - Encrypt card code using + * `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`. - If you enter the wrong redemption code 5 + * times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day. * * @throws ApiException if the Api call fails */ @Test - public void redeemABinanceGiftCardTest() throws ApiException, CryptoException { + public void redeemABinanceGiftCardTest() throws ApiException, CryptoException, IOException { RedeemABinanceGiftCardRequest redeemABinanceGiftCardRequest = new RedeemABinanceGiftCardRequest(); - - redeemABinanceGiftCardRequest.code(""); + redeemABinanceGiftCardRequest.code("6H9EKF5ECCWFBHGE"); ApiResponse response = api.redeemABinanceGiftCard(redeemABinanceGiftCardRequest); @@ -268,25 +259,27 @@ public void redeemABinanceGiftCardTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000code=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000code=6H9EKF5ECCWFBHGE", signInputCaptor.getValue()); assertEquals( - "1bbed7491819e9e91dca721f71b689fd5802f67881ed39df565eef91d31a6ea1", + "300ebaee53fedcadc261c3a38d5059ed6872294d9d82e4c60f46cd68d5401467", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/giftcard/redeemCode", actualRequest.url().encodedPath()); } /** - * Verify Binance Gift Card by Gift Card Number(USER_DATA) + * Verify Binance Gift Card by Gift Card Number (USER_DATA) * *

This API is for verifying whether the Binance Gift Card is valid or not by entering Gift * Card Number. **Please note that if you enter the wrong Gift Card Number 5 times within an - * hour, you will no longer be able to verify any Gift Card Number for that hour.** Weight: 1 + * hour, you will no longer be able to verify any Gift Card Number for that hour.** Weight(IP): + * 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void verifyBinanceGiftCardByGiftCardNumberTest() throws ApiException, CryptoException { - String referenceNo = ""; + public void verifyBinanceGiftCardByGiftCardNumberTest() + throws ApiException, CryptoException, IOException { + String referenceNo = "0033002328060227"; Long recvWindow = 5000L; ApiResponse response = api.verifyBinanceGiftCardByGiftCardNumber(referenceNo, recvWindow); @@ -302,10 +295,12 @@ public void verifyBinanceGiftCardByGiftCardNumberTest() throws ApiException, Cry Request actualRequest = captorValue.request(); assertEquals( - "referenceNo=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + "referenceNo=0033002328060227&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); assertEquals( - "bf4fdc473e45ef2efce7f171ab61a231969e9924b1a839b72500868675378a6f", + "bd40b7f9e4c1955b964419d2f43987e2eb6c14e803731465e8f33489b0612a0d", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/giftcard/verify", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/giftcard/verify", actualRequest.url().encodedPath()); } } diff --git a/clients/margin-trading/CHANGELOG.md b/clients/margin-trading/CHANGELOG.md index bf1917e13..d509ebf6c 100644 --- a/clients/margin-trading/CHANGELOG.md +++ b/clients/margin-trading/CHANGELOG.md @@ -1,5 +1,163 @@ # Changelog +## 7.0.0 - 2026-07-29 + +### Added (4) + +#### REST API + +- `exitSpecialKeyMode()` (`POST /sapi/v1/margin/exit-special-key-mode`) +- `liquidationLoanRepay()` (`POST /sapi/v1/margin/liquidation-loan/repay`) +- `queryLiquidationLoan()` (`GET /sapi/v1/margin/liquidation-loan`) +- `queryLiquidationLoanRepayHistory()` (`GET /sapi/v1/margin/liquidation-loan/repay-history`) + +### Changed (29) + +#### REST API + +- Added parameter `trailingDelta` + - affected methods: + - `marginAccountNewOrder()` (`POST /sapi/v1/margin/order`) +- Modified parameter `assetNames`: + - type `array` → `string` + - affected methods: + - `smallLiabilityExchange()` (`POST /sapi/v1/margin/exchange-small-liability`) +- Modified parameter `isIsolated`: + - enum added: `TRUE`, `FALSE` + - affected methods: + - `queryMarginAccountsAllOco()` (`GET /sapi/v1/margin/allOrderList`) + - `queryMarginAccountsAllOrders()` (`GET /sapi/v1/margin/allOrders`) + - `queryPreventedMatches()` (`GET /sapi/v1/margin/myPreventedMatches`) + - `queryMarginAccountsTradeList()` (`GET /sapi/v1/margin/myTrades`) + - `queryMarginAccountsOpenOco()` (`GET /sapi/v1/margin/openOrderList`) + - `marginAccountCancelAllOpenOrdersOnASymbol()` (`DELETE /sapi/v1/margin/openOrders`) + - `queryMarginAccountsOpenOrders()` (`GET /sapi/v1/margin/openOrders`) + - `marginAccountCancelOrder()` (`DELETE /sapi/v1/margin/order`) + - `queryMarginAccountsOrder()` (`GET /sapi/v1/margin/order`) + - `marginAccountNewOrder()` (`POST /sapi/v1/margin/order`) + - `marginAccountNewOco()` (`POST /sapi/v1/margin/order/oco`) + - `marginAccountNewOto()` (`POST /sapi/v1/margin/order/oto`) + - `marginAccountNewOtoco()` (`POST /sapi/v1/margin/order/otoco`) + - `marginAccountCancelOco()` (`DELETE /sapi/v1/margin/orderList`) + - `queryMarginAccountsOco()` (`GET /sapi/v1/margin/orderList`) + - `queryCurrentMarginOrderCountUsage()` (`GET /sapi/v1/margin/rateLimit/order`) +- Modified parameter `isIsolated`: + - enum added: `TRUE`, `FALSE` + - affected methods: + - `marginAccountBorrowRepay()` (`POST /sapi/v1/margin/borrow-repay`) +- Modified parameter `isIsolated`: + - type `boolean` → `string` + - enum added: `TRUE`, `FALSE` + - affected methods: + - `getFutureHourlyInterestRate()` (`GET /sapi/v1/margin/next-hourly-interest-rate`) +- Modified parameter `pendingAboveTimeInForce`: + - enum added: `GTC`, `IOC`, `FOK` + - affected methods: + - `marginAccountNewOtoco()` (`POST /sapi/v1/margin/order/otoco`) +- Modified parameter `pendingAboveType`: + - enum added: `LIMIT_MAKER`, `STOP_LOSS`, `STOP_LOSS_LIMIT` + - affected methods: + - `marginAccountNewOtoco()` (`POST /sapi/v1/margin/order/otoco`) +- Modified parameter `pendingBelowTimeInForce`: + - enum added: `GTC`, `IOC`, `FOK` + - affected methods: + - `marginAccountNewOtoco()` (`POST /sapi/v1/margin/order/otoco`) +- Modified parameter `pendingBelowType`: + - enum added: `LIMIT_MAKER`, `STOP_LOSS`, `STOP_LOSS_LIMIT` + - affected methods: + - `marginAccountNewOtoco()` (`POST /sapi/v1/margin/order/otoco`) +- Modified parameter `pendingSide`: + - enum added: `BUY`, `SELL` + - affected methods: + - `marginAccountNewOto()` (`POST /sapi/v1/margin/order/oto`) + - `marginAccountNewOtoco()` (`POST /sapi/v1/margin/order/otoco`) +- Modified parameter `pendingTimeInForce`: + - enum added: `GTC`, `IOC`, `FOK` + - affected methods: + - `marginAccountNewOto()` (`POST /sapi/v1/margin/order/oto`) +- Modified parameter `pendingType`: + - enum added: `LIMIT`, `MARKET`, `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`, `LIMIT_MAKER` + - affected methods: + - `marginAccountNewOto()` (`POST /sapi/v1/margin/order/oto`) +- Modified parameter `permissionMode`: + - enum added: `TRADE`, `READ` + - affected methods: + - `createSpecialKey()` (`POST /sapi/v1/margin/apiKey`) +- Modified parameter `selfTradePreventionMode`: + - enum added: `EXPIRE_TAKER`, `EXPIRE_MAKER`, `EXPIRE_BOTH`, `NONE` + - affected methods: + - `marginAccountNewOrder()` (`POST /sapi/v1/margin/order`) + - `marginAccountNewOco()` (`POST /sapi/v1/margin/order/oco`) + - `marginAccountNewOto()` (`POST /sapi/v1/margin/order/oto`) + - `marginAccountNewOtoco()` (`POST /sapi/v1/margin/order/otoco`) +- Modified parameter `sideEffectType`: + - enum added: `NO_SIDE_EFFECT`, `MARGIN_BUY`, `AUTO_REPAY`, `AUTO_BORROW_REPAY` + - affected methods: + - `marginAccountNewOrder()` (`POST /sapi/v1/margin/order`) + - `marginAccountNewOco()` (`POST /sapi/v1/margin/order/oco`) +- Modified parameter `sideEffectType`: + - enum added: `NO_SIDE_EFFECT`, `MARGIN_BUY` + - affected methods: + - `marginAccountNewOto()` (`POST /sapi/v1/margin/order/oto`) + - `marginAccountNewOtoco()` (`POST /sapi/v1/margin/order/otoco`) +- Modified parameter `stopLimitTimeInForce`: + - enum added: `GTC`, `FOK`, `IOC` + - affected methods: + - `marginAccountNewOco()` (`POST /sapi/v1/margin/order/oco`) +- Modified parameter `symbol`: + - required: `true` → `false` + - affected methods: + - `marginAccountBorrowRepay()` (`POST /sapi/v1/margin/borrow-repay`) +- Modified parameter `type`: + - enum added: `MARGIN`, `ISOLATED` + - affected methods: + - `queryMarginAvailableInventory()` (`GET /sapi/v1/margin/available-inventory`) + - `marginManualLiquidation()` (`POST /sapi/v1/margin/manual-liquidation`) +- Modified parameter `type`: + - enum added: `BORROW`, `REPAY` + - affected methods: + - `queryBorrowRepayRecordsInMarginAccount()` (`GET /sapi/v1/margin/borrow-repay`) + - `marginAccountBorrowRepay()` (`POST /sapi/v1/margin/borrow-repay`) +- Modified parameter `type`: + - enum added: `TRANSFER`, `BORROW`, `REPAY`, `BUY_INCOME`, `BUY_EXPENSE`, `SELL_INCOME`, `SELL_EXPENSE`, `TRADING_COMMISSION`, `BUY_LIQUIDATION`, `SELL_LIQUIDATION`, `REPAY_LIQUIDATION`, `OTHER_LIQUIDATION`, `LIQUIDATION_FEE`, `SMALL_BALANCE_CONVERT`, `COMMISSION_RETURN`, `SMALL_CONVERT` + - affected methods: + - `queryCrossIsolatedMarginCapitalFlow()` (`GET /sapi/v1/margin/capital-flow`) +- Modified parameter `type`: + - enum added: `LIMIT`, `MARKET`, `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`, `LIMIT_MAKER` + - affected methods: + - `marginAccountNewOrder()` (`POST /sapi/v1/margin/order`) +- Modified parameter `type`: + - enum added: `ROLL_IN`, `ROLL_OUT` + - affected methods: + - `getCrossMarginTransferHistory()` (`GET /sapi/v1/margin/transfer`) +- Modified parameter `workingSide`: + - enum added: `BUY`, `SELL` + - affected methods: + - `marginAccountNewOto()` (`POST /sapi/v1/margin/order/oto`) + - `marginAccountNewOtoco()` (`POST /sapi/v1/margin/order/otoco`) +- Modified parameter `workingTimeInForce`: + - enum added: `GTC`, `IOC`, `FOK` + - affected methods: + - `marginAccountNewOto()` (`POST /sapi/v1/margin/order/oto`) +- Modified parameter `workingTimeInForce`: + - enum added: `GTC`, `IOC`, `FOK` + - affected methods: + - `marginAccountNewOtoco()` (`POST /sapi/v1/margin/order/otoco`) +- Modified parameter `workingType`: + - enum added: `LIMIT`, `LIMIT_MAKER` + - affected methods: + - `marginAccountNewOto()` (`POST /sapi/v1/margin/order/oto`) + - `marginAccountNewOtoco()` (`POST /sapi/v1/margin/order/otoco`) +- Modified response for `queryMarginAvailableInventory()` (`GET /sapi/v1/margin/available-inventory`): + - `assets`: property `MATIC` deleted + - `assets`: property `SHIB` deleted + - `assets`: property `STPT` deleted + - `assets`: property `TVK` deleted + +- Modified response for `queryCrossIsolatedMarginCapitalFlow()` (`GET /sapi/v1/margin/capital-flow`): + - items: property `note` added + - items: item property `note` added + ## 6.1.1 - 2026-04-30 - Update `binance/common` module to version `2.4.2`. diff --git a/clients/margin-trading/docs/AccountApi.md b/clients/margin-trading/docs/AccountApi.md index adcdfca5a..6c41ba125 100644 --- a/clients/margin-trading/docs/AccountApi.md +++ b/clients/margin-trading/docs/AccountApi.md @@ -23,7 +23,7 @@ All URIs are relative to *https://api.binance.com* Adjust cross margin max leverage (USER_DATA) -Adjust cross margin max leverage * The margin level need higher than the initial risk ratio of adjusted leverage, the initial risk ratio of 3x is 1.5 , the initial risk ratio of 5x is 1.25; The detail conditions on how to switch between Cross Margin Classic and Cross Margin Pro can refer to [the FAQ](https://www.binance.com/en/support/faq/how-to-activate-the-cross-margin-pro-mode-on-binance-e27786da05e743a694b8c625b3bc475d). Weight: 3000 +Adjust cross margin max leverage Weight(UID): 3000, 1 times/min per IP Security Type: USER_DATA Notes: - The margin level need higher than the initial risk ratio of adjusted leverage, the initial risk ratio of 3x is 1.5 , the initial risk ratio of 5x is 1.25; The detail conditions on how to switch between Cross Margin Classic and Cross Margin Pro can refer to [the FAQ](https://www.binance.com/en/support/faq/how-to-activate-the-cross-margin-pro-mode-on-binance-e27786da05e743a694b8c625b3bc475d). ### Example ```java @@ -85,7 +85,7 @@ No authorization required Disable Isolated Margin Account (TRADE) -Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24 hours. Weight: 300(UID) +Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24 hours. Weight(UID): 300 Security Type: TRADE ### Example ```java @@ -102,8 +102,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | No more than 60000 + String symbol = "BTCUSDT"; // String | + Long recvWindow = 5000L; // Long | try { DisableIsolatedMarginAccountResponse result = apiInstance.disableIsolatedMarginAccount(symbol, recvWindow); System.out.println(result); @@ -123,7 +123,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **symbol** | **String**| | | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -149,7 +149,7 @@ No authorization required Enable Isolated Margin Account (TRADE) -Enable isolated margin account for a specific symbol(Only supports activation of previously disabled accounts). Weight: 300(UID) +Enable isolated margin account for a specific symbol(Only supports activation of previously disabled accounts). Weight(UID): 300 Security Type: TRADE ### Example ```java @@ -211,7 +211,7 @@ No authorization required Get BNB Burn Status (USER_DATA) -Get BNB Burn Status Weight: 1(IP) +Get BNB Burn Status Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -228,7 +228,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | No more than 60000 + Long recvWindow = 5000L; // Long | try { GetBnbBurnStatusResponse result = apiInstance.getBnbBurnStatus(recvWindow); System.out.println(result); @@ -247,7 +247,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -273,7 +273,7 @@ No authorization required Get Summary of Margin account (USER_DATA) -Get personal margin level information Weight: 10(IP) +Get personal margin level information Weight(IP): 10 Security Type: USER_DATA ### Example ```java @@ -290,7 +290,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | No more than 60000 + Long recvWindow = 5000L; // Long | try { GetSummaryOfMarginAccountResponse result = apiInstance.getSummaryOfMarginAccount(recvWindow); System.out.println(result); @@ -309,7 +309,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -335,7 +335,7 @@ No authorization required Query Cross Isolated Margin Capital Flow (USER_DATA) -Query Cross Isolated Margin Capital Flow Weight: 100(IP) +Query Cross Isolated Margin Capital Flow Weight(IP): 100 Security Type: USER_DATA Notes: - Only supports querying the data of the last 90 days - The time between startTime and endTime cannot be longer than 7 days. - If fromId is set, the data with id > fromId will be returned. Otherwise the latest data will be returned - To query isolated data, Symbol needs to be entered. ### Example ```java @@ -352,14 +352,14 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String asset = "asset_example"; // String | - String symbol = "symbol_example"; // String | isolated margin pair - String type = "type_example"; // String | Transfer Type: ROLL_IN, ROLL_OUT - Long startTime = 56L; // Long | Only supports querying data from the past 90 days. - Long endTime = 56L; // Long | - Long fromId = 56L; // Long | If `fromId` is set, data with `id` greater than `fromId` will be returned. Otherwise, the latest data will be returned. - Long limit = 56L; // Long | Limit on the number of data records returned per request. Default: 500; Maximum: 1000. - Long recvWindow = 56L; // Long | No more than 60000 + String asset = "USDT"; // String | + String symbol = "BTCUSDT"; // String | Mandatory for Isolated data + OrderType type = OrderType.fromValue("ROLL_IN"); // OrderType | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long fromId = 1L; // Long | + Long limit = 500L; // Long | + Long recvWindow = 5000L; // Long | try { QueryCrossIsolatedMarginCapitalFlowResponse result = apiInstance.queryCrossIsolatedMarginCapitalFlow(asset, symbol, type, startTime, endTime, fromId, limit, recvWindow); System.out.println(result); @@ -379,13 +379,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **asset** | **String**| | [optional] | -| **symbol** | **String**| isolated margin pair | [optional] | -| **type** | **String**| Transfer Type: ROLL_IN, ROLL_OUT | [optional] | -| **startTime** | **Long**| Only supports querying data from the past 90 days. | [optional] | +| **symbol** | **String**| Mandatory for Isolated data | [optional] | +| **type** | [**OrderType**](.md)| | [optional] [enum: ROLL_IN, ROLL_OUT] | +| **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **fromId** | **Long**| If `fromId` is set, data with `id` greater than `fromId` will be returned. Otherwise, the latest data will be returned. | [optional] | -| **limit** | **Long**| Limit on the number of data records returned per request. Default: 500; Maximum: 1000. | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **fromId** | **Long**| | [optional] | +| **limit** | **Long**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -411,7 +411,7 @@ No authorization required Query Cross Margin Account Details (USER_DATA) -Query Cross Margin Account Details Weight: 10(IP) +Query Cross Margin Account Details Weight(IP): 10 Security Type: USER_DATA ### Example ```java @@ -428,7 +428,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | No more than 60000 + Long recvWindow = 5000L; // Long | try { QueryCrossMarginAccountDetailsResponse result = apiInstance.queryCrossMarginAccountDetails(recvWindow); System.out.println(result); @@ -447,7 +447,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -473,7 +473,7 @@ No authorization required Query Cross Margin Fee Data (USER_DATA) -Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight: 1 when coin is specified;(IP) +Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight: 1 when coin is specified;(IP) 5 when the coin parameter is omitted(IP) Security Type: USER_DATA ### Example ```java @@ -490,9 +490,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long vipLevel = 56L; // Long | User's current specific margin data will be returned if vipLevel is omitted - String coin = "coin_example"; // String | - Long recvWindow = 56L; // Long | No more than 60000 + Long vipLevel = 1L; // Long | User's current specific margin data will be returned if vipLevel is omitted + String coin = "BTC"; // String | + Long recvWindow = 5000L; // Long | try { QueryCrossMarginFeeDataResponse result = apiInstance.queryCrossMarginFeeData(vipLevel, coin, recvWindow); System.out.println(result); @@ -513,7 +513,7 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **vipLevel** | **Long**| User's current specific margin data will be returned if vipLevel is omitted | [optional] | | **coin** | **String**| | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -539,7 +539,7 @@ No authorization required Query Enabled Isolated Margin Account Limit (USER_DATA) -Query enabled isolated margin account limit. Weight: 1(IP) +Query enabled isolated margin account limit. Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -556,7 +556,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | No more than 60000 + Long recvWindow = 5000L; // Long | try { QueryEnabledIsolatedMarginAccountLimitResponse result = apiInstance.queryEnabledIsolatedMarginAccountLimit(recvWindow); System.out.println(result); @@ -575,7 +575,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -601,7 +601,7 @@ No authorization required Query Isolated Margin Account Info (USER_DATA) -Query Isolated Margin Account Info * If \"symbols\" is not sent, all isolated assets will be returned. * If \"symbols\" is sent, only the isolated assets of the sent symbols will be returned. Weight: 10(IP) +Query Isolated Margin Account Info Weight(IP): 10 Security Type: USER_DATA Notes: - If \"symbols\" is not sent, all isolated assets will be returned. - If \"symbols\" is sent, only the isolated assets of the sent symbols will be returned. ### Example ```java @@ -618,8 +618,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String symbols = "symbols_example"; // String | Max 5 symbols can be sent; separated by \",\". e.g. \"BTCUSDT,BNBUSDT,ADAUSDT\" - Long recvWindow = 56L; // Long | No more than 60000 + String symbols = "BTCUSDT,BNBUSDT,ADAUSDT"; // String | + Long recvWindow = 5000L; // Long | try { QueryIsolatedMarginAccountInfoResponse result = apiInstance.queryIsolatedMarginAccountInfo(symbols, recvWindow); System.out.println(result); @@ -638,8 +638,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbols** | **String**| Max 5 symbols can be sent; separated by \",\". e.g. \"BTCUSDT,BNBUSDT,ADAUSDT\" | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **symbols** | **String**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -665,7 +665,7 @@ No authorization required Query Isolated Margin Fee Data (USER_DATA) -Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight: 1 when a single is specified;(IP) +Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight: 1 when a single is specified;(IP) 10 when the symbol parameter is omitted(IP) Security Type: USER_DATA ### Example ```java @@ -682,9 +682,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long vipLevel = 56L; // Long | User's current specific margin data will be returned if vipLevel is omitted - String symbol = "symbol_example"; // String | isolated margin pair - Long recvWindow = 56L; // Long | No more than 60000 + Long vipLevel = 1L; // Long | + String symbol = "BTCUSDT"; // String | + Long recvWindow = 5000L; // Long | try { QueryIsolatedMarginFeeDataResponse result = apiInstance.queryIsolatedMarginFeeData(vipLevel, symbol, recvWindow); System.out.println(result); @@ -703,9 +703,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **vipLevel** | **Long**| User's current specific margin data will be returned if vipLevel is omitted | [optional] | -| **symbol** | **String**| isolated margin pair | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **vipLevel** | **Long**| | [optional] | +| **symbol** | **String**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type diff --git a/clients/margin-trading/docs/AdjustCrossMarginMaxLeverageRequest.md b/clients/margin-trading/docs/AdjustCrossMarginMaxLeverageRequest.md index e7dada81b..0a37afdd2 100644 --- a/clients/margin-trading/docs/AdjustCrossMarginMaxLeverageRequest.md +++ b/clients/margin-trading/docs/AdjustCrossMarginMaxLeverageRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**maxLeverage** | **Long** | | | +|**maxLeverage** | **Long** | Can only adjust 3 , 5 or 10,Example: maxLeverage = 5 or 3 for Cross Margin Classic; maxLeverage=10 for Cross Margin Pro 10x leverage or 20x if compliance allows. | | diff --git a/clients/margin-trading/docs/AdjustCrossMarginMaxLeverageResponse.md b/clients/margin-trading/docs/AdjustCrossMarginMaxLeverageResponse.md index 82fe5c77d..07fe51a47 100644 --- a/clients/margin-trading/docs/AdjustCrossMarginMaxLeverageResponse.md +++ b/clients/margin-trading/docs/AdjustCrossMarginMaxLeverageResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**success** | **Boolean** | | [optional] | +|**success** | **Boolean** | success. | [optional] | diff --git a/clients/margin-trading/docs/AssetNames.md b/clients/margin-trading/docs/AssetNames.md deleted file mode 100644 index 2eb2b304b..000000000 --- a/clients/margin-trading/docs/AssetNames.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# AssetNames - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/margin-trading/docs/Balanceupdate.md b/clients/margin-trading/docs/Balanceupdate.md index 281a9621e..48e40361b 100644 --- a/clients/margin-trading/docs/Balanceupdate.md +++ b/clients/margin-trading/docs/Balanceupdate.md @@ -1,16 +1,16 @@ -# Balanceupdate +# BalanceUpdate ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**dLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**aLowerCase** | **String** | Asset | [optional] | +|**dLowerCase** | **String** | Balance Delta | [optional] | +|**T** | **Long** | Clear Time | [optional] | diff --git a/clients/margin-trading/docs/BorrowRepayApi.md b/clients/margin-trading/docs/BorrowRepayApi.md index 2e300bb16..edc63cc16 100644 --- a/clients/margin-trading/docs/BorrowRepayApi.md +++ b/clients/margin-trading/docs/BorrowRepayApi.md @@ -6,8 +6,8 @@ All URIs are relative to *https://api.binance.com* |------------- | ------------- | -------------| | [**getFutureHourlyInterestRate**](BorrowRepayApi.md#getFutureHourlyInterestRate) | **GET** /sapi/v1/margin/next-hourly-interest-rate | Get future hourly interest rate (USER_DATA) | | [**getInterestHistory**](BorrowRepayApi.md#getInterestHistory) | **GET** /sapi/v1/margin/interestHistory | Get Interest History (USER_DATA) | -| [**marginAccountBorrowRepay**](BorrowRepayApi.md#marginAccountBorrowRepay) | **POST** /sapi/v1/margin/borrow-repay | Margin account borrow/repay(MARGIN) | -| [**queryBorrowRepayRecordsInMarginAccount**](BorrowRepayApi.md#queryBorrowRepayRecordsInMarginAccount) | **GET** /sapi/v1/margin/borrow-repay | Query borrow/repay records in Margin account(USER_DATA) | +| [**marginAccountBorrowRepay**](BorrowRepayApi.md#marginAccountBorrowRepay) | **POST** /sapi/v1/margin/borrow-repay | Margin account borrow/repay (USER_DATA) | +| [**queryBorrowRepayRecordsInMarginAccount**](BorrowRepayApi.md#queryBorrowRepayRecordsInMarginAccount) | **GET** /sapi/v1/margin/borrow-repay | Query borrow/repay records in Margin account (USER_DATA) | | [**queryMarginInterestRateHistory**](BorrowRepayApi.md#queryMarginInterestRateHistory) | **GET** /sapi/v1/margin/interestRateHistory | Query Margin Interest Rate History (USER_DATA) | | [**queryMaxBorrow**](BorrowRepayApi.md#queryMaxBorrow) | **GET** /sapi/v1/margin/maxBorrowable | Query Max Borrow (USER_DATA) | @@ -18,7 +18,7 @@ All URIs are relative to *https://api.binance.com* Get future hourly interest rate (USER_DATA) -Get future hourly interest rate Weight: 100 +Get future hourly interest rate Weight(IP): 100 Security Type: USER_DATA ### Example ```java @@ -35,8 +35,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); BorrowRepayApi apiInstance = new BorrowRepayApi(defaultClient); - String assets = "assets_example"; // String | List of assets, separated by commas, up to 20 - String isIsolated = "isIsolated_example"; // String | for isolated margin or not, \"TRUE\", \"FALSE\" + String assets = "BTC,ETH"; // String | + IsIsolated isIsolated = IsIsolated.fromValue("TRUE"); // IsIsolated | try { GetFutureHourlyInterestRateResponse result = apiInstance.getFutureHourlyInterestRate(assets, isIsolated); System.out.println(result); @@ -55,8 +55,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **assets** | **String**| List of assets, separated by commas, up to 20 | | -| **isIsolated** | **String**| for isolated margin or not, \"TRUE\", \"FALSE\" | | +| **assets** | **String**| | | +| **isIsolated** | [**IsIsolated**](.md)| | [default to FALSE] [enum: TRUE, FALSE] | ### Return type @@ -82,7 +82,7 @@ No authorization required Get Interest History (USER_DATA) -Get Interest History * Response in descending order * If isolatedSymbol is not sent, crossed margin data will be returned * The max interval between `startTime` and `endTime` is 30 days. It is a MUST to ensure data correctness. * If `startTime`and `endTime` not sent, return records of the last 7 days by default. * If `startTime` is sent and `endTime` is not sent, return records of [max(`startTime`, now-30d), now]. * If `startTime` is not sent and `endTime` is sent, return records of [`endTime`-7, `endTime`] * `type` in response has 4 enums: * `PERIODIC` interest charged per hour * `ON_BORROW` first interest charged on borrow * `PERIODIC_CONVERTED` interest charged per hour converted into BNB * `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB * `PORTFOLIO` interest charged daily on the portfolio margin negative balance Weight: 1(IP) +Get Interest History Weight(IP): 1 Security Type: USER_DATA Notes: - Response in descending order - If isolatedSymbol is not sent, crossed margin data will be returned - The max interval between `startTime` and `endTime` is 30 days. It is a MUST to ensure data correctness. - If `startTime`and `endTime` not sent, return records of the last 7 days by default. - If `startTime` is sent and `endTime` is not sent, return records of [max(`startTime`, now-30d), now]. - If `startTime` is not sent and `endTime` is sent, return records of [`endTime`-7, `endTime`] - `type` in response has 4 enums: - `PERIODIC` interest charged per hour - `ON_BORROW` first interest charged on borrow - `PERIODIC_CONVERTED` interest charged per hour converted into BNB - `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB - `PORTFOLIO` interest charged daily on the portfolio margin negative balance ### Example ```java @@ -99,13 +99,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); BorrowRepayApi apiInstance = new BorrowRepayApi(defaultClient); - String asset = "asset_example"; // String | - String isolatedSymbol = "isolatedSymbol_example"; // String | isolated symbol - Long startTime = 56L; // Long | Only supports querying data from the past 90 days. - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10 Max:100 - Long recvWindow = 56L; // Long | No more than 60000 + String asset = "USDT"; // String | + String isolatedSymbol = "BNBUSDT"; // String | + Long startTime = 1623319461670L; // Long | Only supports querying data from the past 90 days. + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | try { GetInterestHistoryResponse result = apiInstance.getInterestHistory(asset, isolatedSymbol, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -125,12 +125,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **asset** | **String**| | [optional] | -| **isolatedSymbol** | **String**| isolated symbol | [optional] | +| **isolatedSymbol** | **String**| | [optional] | | **startTime** | **Long**| Only supports querying data from the past 90 days. | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10 Max:100 | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **current** | **Long**| | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -154,9 +154,9 @@ No authorization required # **marginAccountBorrowRepay** > MarginAccountBorrowRepayResponse marginAccountBorrowRepay(marginAccountBorrowRepayRequest) -Margin account borrow/repay(MARGIN) +Margin account borrow/repay (USER_DATA) -Margin account borrow/repay(MARGIN) Weight: 1500 +Margin account borrow/repay Weight(UID): 1500 Security Type: USER_DATA ### Example ```java @@ -216,9 +216,9 @@ No authorization required # **queryBorrowRepayRecordsInMarginAccount** > QueryBorrowRepayRecordsInMarginAccountResponse queryBorrowRepayRecordsInMarginAccount(type, asset, isolatedSymbol, txId, startTime, endTime, current, size, recvWindow) -Query borrow/repay records in Margin account(USER_DATA) +Query borrow/repay records in Margin account (USER_DATA) -Query borrow/repay records in Margin account * `txId` or `startTime` must be sent. `txId` takes precedence. * If an asset is sent, data within 30 days before `endTime`; If an asset is not sent, data within 7 days before `endTime` * If neither `startTime` nor `endTime` is sent, the recent 7-day data will be returned. * `startTime` set as `endTime` - 7days by default, `endTime` set as current time by default Weight: 10(IP) +Query borrow/repay records in Margin account Weight(IP): 10 Security Type: USER_DATA Notes: - `txId` or `startTime` must be sent. `txId` takes precedence. - Response in descending order - If an asset is sent, data within 30 days before `endTime`; If an asset is not sent, data within 7 days before `endTime` - If neither `startTime` nor `endTime` is sent, the recent 7-day data will be returned. - `startTime` set as `endTime` - 7 days by default, `endTime` set as current time by default ### Example ```java @@ -235,15 +235,15 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); BorrowRepayApi apiInstance = new BorrowRepayApi(defaultClient); - String type = "type_example"; // String | MARGIN,ISOLATED - String asset = "asset_example"; // String | - String isolatedSymbol = "isolatedSymbol_example"; // String | isolated symbol - Long txId = 56L; // Long | `tranId` in `POST /sapi/v1/margin/loan` - Long startTime = 56L; // Long | Only supports querying data from the past 90 days. - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10 Max:100 - Long recvWindow = 56L; // Long | No more than 60000 + OrderType type = OrderType.fromValue("ROLL_IN"); // OrderType | + String asset = "BNB"; // String | + String isolatedSymbol = "BNBUSDT"; // String | + Long txId = 1L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | try { QueryBorrowRepayRecordsInMarginAccountResponse result = apiInstance.queryBorrowRepayRecordsInMarginAccount(type, asset, isolatedSymbol, txId, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -262,15 +262,15 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **type** | **String**| MARGIN,ISOLATED | | +| **type** | [**OrderType**](.md)| | [enum: ROLL_IN, ROLL_OUT] | | **asset** | **String**| | [optional] | -| **isolatedSymbol** | **String**| isolated symbol | [optional] | -| **txId** | **Long**| `tranId` in `POST /sapi/v1/margin/loan` | [optional] | -| **startTime** | **Long**| Only supports querying data from the past 90 days. | [optional] | +| **isolatedSymbol** | **String**| | [optional] | +| **txId** | **Long**| | [optional] | +| **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10 Max:100 | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **current** | **Long**| | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -296,7 +296,7 @@ No authorization required Query Margin Interest Rate History (USER_DATA) -Query Margin Interest Rate History Weight: 1(IP) +Query Margin Interest Rate History Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -313,11 +313,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); BorrowRepayApi apiInstance = new BorrowRepayApi(defaultClient); - String asset = "asset_example"; // String | - Long vipLevel = 56L; // Long | User's current specific margin data will be returned if vipLevel is omitted - Long startTime = 56L; // Long | Only supports querying data from the past 90 days. - Long endTime = 56L; // Long | - Long recvWindow = 56L; // Long | No more than 60000 + String asset = "BTC"; // String | + Long vipLevel = 1L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long recvWindow = 5000L; // Long | try { QueryMarginInterestRateHistoryResponse result = apiInstance.queryMarginInterestRateHistory(asset, vipLevel, startTime, endTime, recvWindow); System.out.println(result); @@ -337,10 +337,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **asset** | **String**| | | -| **vipLevel** | **Long**| User's current specific margin data will be returned if vipLevel is omitted | [optional] | -| **startTime** | **Long**| Only supports querying data from the past 90 days. | [optional] | +| **vipLevel** | **Long**| | [optional] | +| **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -366,7 +366,7 @@ No authorization required Query Max Borrow (USER_DATA) -Query Max Borrow * If isolatedSymbol is not sent, crossed margin data will be sent. * `borrowLimit` is also available from [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee) Weight: 50(IP) +Query Max Borrow Weight(IP): 50 Security Type: USER_DATA Notes: - If isolatedSymbol is not sent, crossed margin data will be sent. - `borrowLimit` is also available from [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee) ### Example ```java @@ -383,9 +383,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); BorrowRepayApi apiInstance = new BorrowRepayApi(defaultClient); - String asset = "asset_example"; // String | - String isolatedSymbol = "isolatedSymbol_example"; // String | isolated symbol - Long recvWindow = 56L; // Long | No more than 60000 + String asset = "BTC"; // String | + String isolatedSymbol = "BTCUSDT"; // String | + Long recvWindow = 5000L; // Long | try { QueryMaxBorrowResponse result = apiInstance.queryMaxBorrow(asset, isolatedSymbol, recvWindow); System.out.println(result); @@ -405,8 +405,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **asset** | **String**| | | -| **isolatedSymbol** | **String**| isolated symbol | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **isolatedSymbol** | **String**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type diff --git a/clients/margin-trading/docs/CreateSpecialKeyRequest.md b/clients/margin-trading/docs/CreateSpecialKeyRequest.md index 0c5f596c2..d7f95cd83 100644 --- a/clients/margin-trading/docs/CreateSpecialKeyRequest.md +++ b/clients/margin-trading/docs/CreateSpecialKeyRequest.md @@ -9,9 +9,9 @@ |------------ | ------------- | ------------- | -------------| |**apiName** | **String** | | | |**symbol** | **String** | | [optional] | -|**ip** | **String** | | [optional] | -|**publicKey** | **String** | | [optional] | -|**permissionMode** | **String** | | [optional] | +|**ip** | **String** | Can be added in batches, separated by commas. Max 30 for an API key | [optional] | +|**publicKey** | **String** | 1. If publicKey is inputted it will create an RSA or Ed25519 key. 2. Need to be encoded to URL-encoded format | [optional] | +|**permissionMode** | **PermissionMode** | | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/margin-trading/docs/CreateSpecialKeyResponse.md b/clients/margin-trading/docs/CreateSpecialKeyResponse.md index dd953290f..93adf1836 100644 --- a/clients/margin-trading/docs/CreateSpecialKeyResponse.md +++ b/clients/margin-trading/docs/CreateSpecialKeyResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**apiKey** | **String** | | [optional] | -|**secretKey** | **String** | | [optional] | -|**type** | **String** | | [optional] | +|**apiKey** | **String** | api Key. | [optional] | +|**secretKey** | **String** | secretKey will be null when creating an RSA key | [optional] | +|**type** | **String** | HMAC_SHA256 or RSA | [optional] | diff --git a/clients/margin-trading/docs/CrossMarginCollateralRatioResponseInner.md b/clients/margin-trading/docs/CrossMarginCollateralRatioResponseInner.md index 84c7b9082..9d62134b2 100644 --- a/clients/margin-trading/docs/CrossMarginCollateralRatioResponseInner.md +++ b/clients/margin-trading/docs/CrossMarginCollateralRatioResponseInner.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**collaterals** | [**List<CrossMarginCollateralRatioResponseInnerCollateralsInner>**](CrossMarginCollateralRatioResponseInnerCollateralsInner.md) | | [optional] | -|**assetNames** | **List<String>** | | [optional] | +|**collaterals** | [**List<CrossMarginCollateralRatioResponseInnerCollateralsInner>**](CrossMarginCollateralRatioResponseInnerCollateralsInner.md) | collaterals list. | [optional] | +|**assetNames** | **List<String>** | asset Names list. | [optional] | diff --git a/clients/margin-trading/docs/CrossMarginCollateralRatioResponseInnerCollateralsInner.md b/clients/margin-trading/docs/CrossMarginCollateralRatioResponseInnerCollateralsInner.md index 0bea47f67..41663044f 100644 --- a/clients/margin-trading/docs/CrossMarginCollateralRatioResponseInnerCollateralsInner.md +++ b/clients/margin-trading/docs/CrossMarginCollateralRatioResponseInnerCollateralsInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**minUsdValue** | **String** | | [optional] | -|**maxUsdValue** | **String** | | [optional] | -|**discountRate** | **String** | | [optional] | +|**minUsdValue** | **String** | min Usd Value. | [optional] | +|**maxUsdValue** | **String** | max Usd Value. | [optional] | +|**discountRate** | **String** | discount Rate. | [optional] | diff --git a/clients/margin-trading/docs/DisableIsolatedMarginAccountResponse.md b/clients/margin-trading/docs/DisableIsolatedMarginAccountResponse.md index a946d1705..8db23ff45 100644 --- a/clients/margin-trading/docs/DisableIsolatedMarginAccountResponse.md +++ b/clients/margin-trading/docs/DisableIsolatedMarginAccountResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**success** | **Boolean** | | [optional] | -|**symbol** | **String** | | [optional] | +|**success** | **Boolean** | success. | [optional] | +|**symbol** | **String** | symbol. | [optional] | diff --git a/clients/margin-trading/docs/EditIpForSpecialKeyRequest.md b/clients/margin-trading/docs/EditIpForSpecialKeyRequest.md index f37232115..f6a296962 100644 --- a/clients/margin-trading/docs/EditIpForSpecialKeyRequest.md +++ b/clients/margin-trading/docs/EditIpForSpecialKeyRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**ip** | **String** | | | +|**symbol** | **String** | isolated margin pair | [optional] | +|**ip** | **String** | Can be added in batches, separated by commas. Max 30 for an API key | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/margin-trading/docs/EnableIsolatedMarginAccountResponse.md b/clients/margin-trading/docs/EnableIsolatedMarginAccountResponse.md index 31475cf98..033eeb10b 100644 --- a/clients/margin-trading/docs/EnableIsolatedMarginAccountResponse.md +++ b/clients/margin-trading/docs/EnableIsolatedMarginAccountResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**success** | **Boolean** | | [optional] | -|**symbol** | **String** | | [optional] | +|**success** | **Boolean** | success. | [optional] | +|**symbol** | **String** | symbol. | [optional] | diff --git a/clients/margin-trading/docs/Executionreport.md b/clients/margin-trading/docs/Executionreport.md index 48c0b2d4f..8d4a94ff3 100644 --- a/clients/margin-trading/docs/Executionreport.md +++ b/clients/margin-trading/docs/Executionreport.md @@ -1,62 +1,62 @@ -# Executionreport +# ExecutionReport ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**S** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**F** | **String** | | [optional] | -|**gLowerCase** | **Long** | | [optional] | -|**C** | **String** | | [optional] | -|**xLowerCase** | **String** | | [optional] | -|**X** | **String** | | [optional] | -|**rLowerCase** | **String** | | [optional] | -|**iLowerCase** | **Long** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**zLowerCase** | **String** | | [optional] | -|**L** | **String** | | [optional] | -|**nLowerCase** | **String** | | [optional] | -|**N** | **String** | | [optional] | -|**T** | **Long** | | [optional] | -|**tLowerCase** | **Long** | | [optional] | -|**I** | **Long** | | [optional] | -|**wLowerCase** | **Boolean** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | -|**M** | **Boolean** | | [optional] | -|**O** | **Long** | | [optional] | -|**Z** | **String** | | [optional] | -|**Y** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**W** | **Long** | | [optional] | -|**V** | **String** | | [optional] | -|**dLowerCase** | **String** | | [optional] | -|**D** | **String** | | [optional] | -|**jLowerCase** | **String** | | [optional] | -|**J** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**A** | **String** | | [optional] | -|**B** | **String** | | [optional] | -|**uLowerCase** | **String** | | [optional] | -|**U** | **String** | | [optional] | -|**cs** | **String** | | [optional] | -|**pl** | **String** | | [optional] | -|**pL** | **String** | | [optional] | -|**pY** | **String** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**kLowerCase** | **String** | | [optional] | -|**uS** | **Boolean** | | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**cLowerCase** | **String** | Client order ID | [optional] | +|**S** | **String** | Side | [optional] | +|**oLowerCase** | **String** | Order type | [optional] | +|**fLowerCase** | **String** | Time in force | [optional] | +|**qLowerCase** | **String** | Order quantity | [optional] | +|**pLowerCase** | **String** | Order price | [optional] | +|**P** | **String** | Stop price | [optional] | +|**F** | **String** | Iceberg quantity | [optional] | +|**gLowerCase** | **Long** | OrderListId | [optional] | +|**C** | **String** | Original client order ID; This is the ID of the order being canceled | [optional] | +|**xLowerCase** | **String** | Current execution type | [optional] | +|**X** | **String** | Current order status | [optional] | +|**rLowerCase** | **String** | Order reject reason; will be an error code. | [optional] | +|**iLowerCase** | **Long** | Order ID | [optional] | +|**lLowerCase** | **String** | Last executed quantity | [optional] | +|**zLowerCase** | **String** | Cumulative filled quantity | [optional] | +|**L** | **String** | Last executed price | [optional] | +|**nLowerCase** | **String** | Commission amount | [optional] | +|**N** | **String** | Commission asset | [optional] | +|**T** | **Long** | Transaction time | [optional] | +|**tLowerCase** | **Long** | Trade ID | [optional] | +|**I** | **Long** | Ignore | [optional] | +|**wLowerCase** | **Boolean** | Is the order on the book? | [optional] | +|**mLowerCase** | **Boolean** | Is this trade the maker side? | [optional] | +|**M** | **Boolean** | Ignore | [optional] | +|**O** | **Long** | Order creation time | [optional] | +|**Z** | **String** | Cumulative quote asset transacted quantity | [optional] | +|**Y** | **String** | Last quote asset transacted quantity (i.e. lastPrice * lastQty) | [optional] | +|**Q** | **String** | Quote Order Quantity | [optional] | +|**W** | **Long** | Working Time; This is only visible if the order has been placed on the book. | [optional] | +|**V** | **String** | selfTradePreventionMode | [optional] | +|**dLowerCase** | **String** | Trailing Delta; This is only visible if the order was a trailing stop order. | [optional] | +|**D** | **String** | Trailing Time | [optional] | +|**jLowerCase** | **String** | Strategy Id | [optional] | +|**J** | **String** | Strategy Type | [optional] | +|**vLowerCase** | **String** | Prevented Match Id | [optional] | +|**A** | **String** | Prevented Quantity | [optional] | +|**B** | **String** | Last Prevented Quantity | [optional] | +|**uLowerCase** | **String** | Trade Group Id | [optional] | +|**U** | **String** | Counter Order Id | [optional] | +|**cs** | **String** | Counter Symbol | [optional] | +|**pl** | **String** | Prevented Execution Quantity | [optional] | +|**pL** | **String** | Prevented Execution Price | [optional] | +|**pY** | **String** | Prevented Execution Quote Qty | [optional] | +|**bLowerCase** | **String** | Match Type | [optional] | +|**aLowerCase** | **String** | Allocation ID | [optional] | +|**kLowerCase** | **String** | Working Floor | [optional] | +|**uS** | **Boolean** | UsedSor | [optional] | diff --git a/clients/margin-trading/docs/ExitSpecialKeyModeRequest.md b/clients/margin-trading/docs/ExitSpecialKeyModeRequest.md new file mode 100644 index 000000000..6c65c0fd9 --- /dev/null +++ b/clients/margin-trading/docs/ExitSpecialKeyModeRequest.md @@ -0,0 +1,13 @@ + + +# ExitSpecialKeyModeRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**recvWindow** | **Long** | The value cannot be greater than `60000` | [optional] | + + + diff --git a/clients/margin-trading/docs/GetAllCrossMarginPairsResponseInner.md b/clients/margin-trading/docs/GetAllCrossMarginPairsResponseInner.md index b82204d14..4e753f301 100644 --- a/clients/margin-trading/docs/GetAllCrossMarginPairsResponseInner.md +++ b/clients/margin-trading/docs/GetAllCrossMarginPairsResponseInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**base** | **String** | | [optional] | -|**id** | **Long** | | [optional] | -|**isBuyAllowed** | **Boolean** | | [optional] | -|**isMarginTrade** | **Boolean** | | [optional] | -|**isSellAllowed** | **Boolean** | | [optional] | -|**quote** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**delistTime** | **Long** | | [optional] | +|**base** | **String** | base. | [optional] | +|**id** | **Long** | id. | [optional] | +|**isBuyAllowed** | **Boolean** | is Buy Allowed. | [optional] | +|**isMarginTrade** | **Boolean** | is Margin Trade. | [optional] | +|**isSellAllowed** | **Boolean** | is Sell Allowed. | [optional] | +|**quote** | **String** | quote. | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**delistTime** | **Long** | delist Time. | [optional] | diff --git a/clients/margin-trading/docs/GetAllIsolatedMarginSymbolResponseInner.md b/clients/margin-trading/docs/GetAllIsolatedMarginSymbolResponseInner.md index 50dda2e3c..e955ccfff 100644 --- a/clients/margin-trading/docs/GetAllIsolatedMarginSymbolResponseInner.md +++ b/clients/margin-trading/docs/GetAllIsolatedMarginSymbolResponseInner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**base** | **String** | | [optional] | -|**isBuyAllowed** | **Boolean** | | [optional] | -|**isMarginTrade** | **Boolean** | | [optional] | -|**isSellAllowed** | **Boolean** | | [optional] | -|**quote** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | +|**base** | **String** | base. | [optional] | +|**isBuyAllowed** | **Boolean** | is Buy Allowed. | [optional] | +|**isMarginTrade** | **Boolean** | is Margin Trade. | [optional] | +|**isSellAllowed** | **Boolean** | is Sell Allowed. | [optional] | +|**quote** | **String** | quote. | [optional] | +|**symbol** | **String** | symbol. | [optional] | diff --git a/clients/margin-trading/docs/GetAllMarginAssetsResponseInner.md b/clients/margin-trading/docs/GetAllMarginAssetsResponseInner.md index be51dd615..f594b5159 100644 --- a/clients/margin-trading/docs/GetAllMarginAssetsResponseInner.md +++ b/clients/margin-trading/docs/GetAllMarginAssetsResponseInner.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**assetFullName** | **String** | | [optional] | -|**assetName** | **String** | | [optional] | -|**isBorrowable** | **Boolean** | | [optional] | -|**isMortgageable** | **Boolean** | | [optional] | -|**userMinBorrow** | **String** | | [optional] | -|**userMinRepay** | **String** | | [optional] | -|**delistTime** | **Long** | | [optional] | +|**assetFullName** | **String** | asset Full Name. | [optional] | +|**assetName** | **String** | asset Name. | [optional] | +|**isBorrowable** | **Boolean** | is Borrowable. | [optional] | +|**isMortgageable** | **Boolean** | is Mortgageable. | [optional] | +|**userMinBorrow** | **String** | user Min Borrow. | [optional] | +|**userMinRepay** | **String** | user Min Repay. | [optional] | +|**delistTime** | **Long** | delist Time. | [optional] | diff --git a/clients/margin-trading/docs/GetBnbBurnStatusResponse.md b/clients/margin-trading/docs/GetBnbBurnStatusResponse.md index 43d87941f..44ce4bb5b 100644 --- a/clients/margin-trading/docs/GetBnbBurnStatusResponse.md +++ b/clients/margin-trading/docs/GetBnbBurnStatusResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**spotBNBBurn** | **Boolean** | | [optional] | -|**interestBNBBurn** | **Boolean** | | [optional] | +|**spotBNBBurn** | **Boolean** | spot BNBBurn. | [optional] | +|**interestBNBBurn** | **Boolean** | interest BNBBurn. | [optional] | diff --git a/clients/margin-trading/docs/GetCrossMarginTransferHistoryResponse.md b/clients/margin-trading/docs/GetCrossMarginTransferHistoryResponse.md index 4f6f53422..64921a59c 100644 --- a/clients/margin-trading/docs/GetCrossMarginTransferHistoryResponse.md +++ b/clients/margin-trading/docs/GetCrossMarginTransferHistoryResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**rows** | [**List<GetCrossMarginTransferHistoryResponseRowsInner>**](GetCrossMarginTransferHistoryResponseRowsInner.md) | | [optional] | -|**total** | **Long** | | [optional] | +|**rows** | [**List<GetCrossMarginTransferHistoryResponseRowsInner>**](GetCrossMarginTransferHistoryResponseRowsInner.md) | rows list. | [optional] | +|**total** | **Long** | total. | [optional] | diff --git a/clients/margin-trading/docs/GetCrossMarginTransferHistoryResponseRowsInner.md b/clients/margin-trading/docs/GetCrossMarginTransferHistoryResponseRowsInner.md index d59a6e1fe..c22b3950e 100644 --- a/clients/margin-trading/docs/GetCrossMarginTransferHistoryResponseRowsInner.md +++ b/clients/margin-trading/docs/GetCrossMarginTransferHistoryResponseRowsInner.md @@ -7,16 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amount** | **String** | | [optional] | -|**asset** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timestamp** | **Long** | | [optional] | -|**txId** | **Long** | | [optional] | -|**type** | **String** | | [optional] | -|**transFrom** | **String** | | [optional] | -|**transTo** | **String** | | [optional] | -|**fromSymbol** | **String** | | [optional] | -|**toSymbol** | **String** | | [optional] | +|**amount** | **String** | amount. | [optional] | +|**asset** | **String** | asset. | [optional] | +|**status** | **String** | status. | [optional] | +|**timestamp** | **Long** | timestamp. | [optional] | +|**txId** | **Long** | tx Id. | [optional] | +|**type** | **String** | type. | [optional] | +|**transFrom** | **String** | SPOT,FUTURES,FIAT,DELIVERY,MINING,ISOLATED_MARGIN,FUNDING,MOTHER_SPOT,OPTION,SUB_SPOT,SUB_MARGIN,CROSS_MARGIN | [optional] | +|**transTo** | **String** | SPOT,FUTURES,FIAT,DELIVERY,MINING,ISOLATED_MARGIN,FUNDING,MOTHER_SPOT,OPTION,SUB_SPOT,SUB_MARGIN,CROSS_MARGIN | [optional] | +|**fromSymbol** | **String** | from Symbol. | [optional] | +|**toSymbol** | **String** | to Symbol. | [optional] | diff --git a/clients/margin-trading/docs/GetDelistScheduleResponseInner.md b/clients/margin-trading/docs/GetDelistScheduleResponseInner.md index f0c6b5623..e48308704 100644 --- a/clients/margin-trading/docs/GetDelistScheduleResponseInner.md +++ b/clients/margin-trading/docs/GetDelistScheduleResponseInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**delistTime** | **Long** | | [optional] | -|**crossMarginAssets** | **List<String>** | | [optional] | -|**isolatedMarginSymbols** | **List<String>** | | [optional] | +|**delistTime** | **Long** | delist Time. | [optional] | +|**crossMarginAssets** | **List<String>** | cross Margin Assets list. | [optional] | +|**isolatedMarginSymbols** | **List<String>** | isolated Margin Symbols list. | [optional] | diff --git a/clients/margin-trading/docs/GetForceLiquidationRecordResponse.md b/clients/margin-trading/docs/GetForceLiquidationRecordResponse.md index eb2b2e904..586113a06 100644 --- a/clients/margin-trading/docs/GetForceLiquidationRecordResponse.md +++ b/clients/margin-trading/docs/GetForceLiquidationRecordResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**rows** | [**List<GetForceLiquidationRecordResponseRowsInner>**](GetForceLiquidationRecordResponseRowsInner.md) | | [optional] | -|**total** | **Long** | | [optional] | +|**rows** | [**List<GetForceLiquidationRecordResponseRowsInner>**](GetForceLiquidationRecordResponseRowsInner.md) | rows list. | [optional] | +|**total** | **Long** | total. | [optional] | diff --git a/clients/margin-trading/docs/GetForceLiquidationRecordResponseRowsInner.md b/clients/margin-trading/docs/GetForceLiquidationRecordResponseRowsInner.md index 8730a93a8..bfafc7ce5 100644 --- a/clients/margin-trading/docs/GetForceLiquidationRecordResponseRowsInner.md +++ b/clients/margin-trading/docs/GetForceLiquidationRecordResponseRowsInner.md @@ -7,16 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**avgPrice** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**qty** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**isIsolated** | **Boolean** | | [optional] | -|**updatedTime** | **Long** | | [optional] | +|**avgPrice** | **String** | avg Price. | [optional] | +|**executedQty** | **String** | executed Qty. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**price** | **String** | price. | [optional] | +|**qty** | **String** | qty. | [optional] | +|**side** | **String** | side. | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**timeInForce** | **String** | time In Force. | [optional] | +|**isIsolated** | **Boolean** | is Isolated. | [optional] | +|**updatedTime** | **Long** | updated Time. | [optional] | diff --git a/clients/margin-trading/docs/GetFutureHourlyInterestRateResponseInner.md b/clients/margin-trading/docs/GetFutureHourlyInterestRateResponseInner.md index 4154ce075..a0e8a6062 100644 --- a/clients/margin-trading/docs/GetFutureHourlyInterestRateResponseInner.md +++ b/clients/margin-trading/docs/GetFutureHourlyInterestRateResponseInner.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**nextHourlyInterestRate** | **String** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**nextHourlyInterestRate** | **String** | next Hourly Interest Rate. | [optional] | diff --git a/clients/margin-trading/docs/GetInterestHistoryResponse.md b/clients/margin-trading/docs/GetInterestHistoryResponse.md index abde8be60..76c2faa0c 100644 --- a/clients/margin-trading/docs/GetInterestHistoryResponse.md +++ b/clients/margin-trading/docs/GetInterestHistoryResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**rows** | [**List<GetInterestHistoryResponseRowsInner>**](GetInterestHistoryResponseRowsInner.md) | | [optional] | -|**total** | **Long** | | [optional] | +|**rows** | [**List<GetInterestHistoryResponseRowsInner>**](GetInterestHistoryResponseRowsInner.md) | rows list. | [optional] | +|**total** | **Long** | total. | [optional] | diff --git a/clients/margin-trading/docs/GetInterestHistoryResponseRowsInner.md b/clients/margin-trading/docs/GetInterestHistoryResponseRowsInner.md index 6d63b1de6..c317bd24d 100644 --- a/clients/margin-trading/docs/GetInterestHistoryResponseRowsInner.md +++ b/clients/margin-trading/docs/GetInterestHistoryResponseRowsInner.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**txId** | **Long** | | [optional] | -|**interestAccuredTime** | **Long** | | [optional] | -|**asset** | **String** | | [optional] | -|**rawAsset** | **String** | | [optional] | -|**principal** | **String** | | [optional] | -|**interest** | **String** | | [optional] | -|**interestRate** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**isolatedSymbol** | **String** | | [optional] | +|**txId** | **Long** | tx Id. | [optional] | +|**interestAccuredTime** | **Long** | interest Accured Time. | [optional] | +|**asset** | **String** | asset. | [optional] | +|**rawAsset** | **String** | will not be returned for isolated margin | [optional] | +|**principal** | **String** | principal. | [optional] | +|**interest** | **String** | interest. | [optional] | +|**interestRate** | **String** | interest Rate. | [optional] | +|**type** | **String** | type. | [optional] | +|**isolatedSymbol** | **String** | isolated symbol, will not be returned for crossed margin | [optional] | diff --git a/clients/margin-trading/docs/GetLimitPricePairsResponse.md b/clients/margin-trading/docs/GetLimitPricePairsResponse.md index 6982e35c5..b86a36e38 100644 --- a/clients/margin-trading/docs/GetLimitPricePairsResponse.md +++ b/clients/margin-trading/docs/GetLimitPricePairsResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**crossMarginSymbols** | **List<String>** | | [optional] | +|**crossMarginSymbols** | **List<String>** | cross Margin Symbols list. | [optional] | diff --git a/clients/margin-trading/docs/GetListScheduleResponseInner.md b/clients/margin-trading/docs/GetListScheduleResponseInner.md index 22f5f33f6..0c8b60f14 100644 --- a/clients/margin-trading/docs/GetListScheduleResponseInner.md +++ b/clients/margin-trading/docs/GetListScheduleResponseInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**listTime** | **Long** | | [optional] | -|**crossMarginAssets** | **List<String>** | | [optional] | -|**isolatedMarginSymbols** | **List<String>** | | [optional] | +|**listTime** | **Long** | list Time. | [optional] | +|**crossMarginAssets** | **List<String>** | cross Margin Assets list. | [optional] | +|**isolatedMarginSymbols** | **List<String>** | isolated Margin Symbols list. | [optional] | diff --git a/clients/margin-trading/docs/GetMarginAssetRiskBasedLiquidationRatioResponseInner.md b/clients/margin-trading/docs/GetMarginAssetRiskBasedLiquidationRatioResponseInner.md index 43ebd448d..797181268 100644 --- a/clients/margin-trading/docs/GetMarginAssetRiskBasedLiquidationRatioResponseInner.md +++ b/clients/margin-trading/docs/GetMarginAssetRiskBasedLiquidationRatioResponseInner.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**riskBasedLiquidationRatio** | **String** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**riskBasedLiquidationRatio** | **String** | risk Based Liquidation Ratio. | [optional] | diff --git a/clients/margin-trading/docs/GetMarginRestrictedAssetsResponse.md b/clients/margin-trading/docs/GetMarginRestrictedAssetsResponse.md index fcb6e1a73..f81f9211c 100644 --- a/clients/margin-trading/docs/GetMarginRestrictedAssetsResponse.md +++ b/clients/margin-trading/docs/GetMarginRestrictedAssetsResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**openLongRestrictedAsset** | **List<String>** | | [optional] | -|**maxCollateralExceededAsset** | **List<String>** | | [optional] | +|**openLongRestrictedAsset** | **List<String>** | open Long Restricted Asset list. | [optional] | +|**maxCollateralExceededAsset** | **List<String>** | max Collateral Exceeded Asset list. | [optional] | diff --git a/clients/margin-trading/docs/GetSmallLiabilityExchangeCoinListResponseInner.md b/clients/margin-trading/docs/GetSmallLiabilityExchangeCoinListResponseInner.md index 9e3e4fcb0..b78c5fa14 100644 --- a/clients/margin-trading/docs/GetSmallLiabilityExchangeCoinListResponseInner.md +++ b/clients/margin-trading/docs/GetSmallLiabilityExchangeCoinListResponseInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**interest** | **String** | | [optional] | -|**principal** | **String** | | [optional] | -|**liabilityAsset** | **String** | | [optional] | -|**liabilityQty** | **Double** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**interest** | **String** | interest. | [optional] | +|**principal** | **String** | principal. | [optional] | +|**liabilityAsset** | **String** | liability Asset. | [optional] | +|**liabilityQty** | **Double** | liability Qty. | [optional] | diff --git a/clients/margin-trading/docs/GetSmallLiabilityExchangeHistoryResponse.md b/clients/margin-trading/docs/GetSmallLiabilityExchangeHistoryResponse.md index fbdcf15b1..35c0e6008 100644 --- a/clients/margin-trading/docs/GetSmallLiabilityExchangeHistoryResponse.md +++ b/clients/margin-trading/docs/GetSmallLiabilityExchangeHistoryResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**total** | **Long** | | [optional] | -|**rows** | [**List<GetSmallLiabilityExchangeHistoryResponseRowsInner>**](GetSmallLiabilityExchangeHistoryResponseRowsInner.md) | | [optional] | +|**total** | **Long** | total. | [optional] | +|**rows** | [**List<GetSmallLiabilityExchangeHistoryResponseRowsInner>**](GetSmallLiabilityExchangeHistoryResponseRowsInner.md) | rows list. | [optional] | diff --git a/clients/margin-trading/docs/GetSmallLiabilityExchangeHistoryResponseRowsInner.md b/clients/margin-trading/docs/GetSmallLiabilityExchangeHistoryResponseRowsInner.md index c7921c0c7..7c0ee75ee 100644 --- a/clients/margin-trading/docs/GetSmallLiabilityExchangeHistoryResponseRowsInner.md +++ b/clients/margin-trading/docs/GetSmallLiabilityExchangeHistoryResponseRowsInner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**amount** | **String** | | [optional] | -|**targetAsset** | **String** | | [optional] | -|**targetAmount** | **String** | | [optional] | -|**bizType** | **String** | | [optional] | -|**timestamp** | **Long** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**amount** | **String** | amount. | [optional] | +|**targetAsset** | **String** | target Asset. | [optional] | +|**targetAmount** | **String** | target Amount. | [optional] | +|**bizType** | **String** | biz Type. | [optional] | +|**timestamp** | **Long** | timestamp. | [optional] | diff --git a/clients/margin-trading/docs/GetSummaryOfMarginAccountResponse.md b/clients/margin-trading/docs/GetSummaryOfMarginAccountResponse.md index 1d0067e5a..1030f2361 100644 --- a/clients/margin-trading/docs/GetSummaryOfMarginAccountResponse.md +++ b/clients/margin-trading/docs/GetSummaryOfMarginAccountResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**normalBar** | **String** | | [optional] | -|**marginCallBar** | **String** | | [optional] | -|**forceLiquidationBar** | **String** | | [optional] | +|**normalBar** | **String** | normal Bar. | [optional] | +|**marginCallBar** | **String** | margin Call Bar. | [optional] | +|**forceLiquidationBar** | **String** | force Liquidation Bar. | [optional] | diff --git a/clients/margin-trading/docs/IsIsolated.md b/clients/margin-trading/docs/IsIsolated.md new file mode 100644 index 000000000..dfbdbd3bf --- /dev/null +++ b/clients/margin-trading/docs/IsIsolated.md @@ -0,0 +1,13 @@ + + +# IsIsolated + +## Enum + + +* `TRUE` (value: `"TRUE"`) + +* `FALSE` (value: `"FALSE"`) + + + diff --git a/clients/margin-trading/docs/LiquidationLoanRepayRequest.md b/clients/margin-trading/docs/LiquidationLoanRepayRequest.md new file mode 100644 index 000000000..50d6dc19d --- /dev/null +++ b/clients/margin-trading/docs/LiquidationLoanRepayRequest.md @@ -0,0 +1,15 @@ + + +# LiquidationLoanRepayRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**asset** | **String** | The asset to repay (e.g. USDT, USDC) | | +|**amount** | **Double** | Repayment amount, must be greater than 0 | | +|**recvWindow** | **Long** | | [optional] | + + + diff --git a/clients/margin-trading/docs/LiquidationLoanRepayResponse.md b/clients/margin-trading/docs/LiquidationLoanRepayResponse.md new file mode 100644 index 000000000..addd548d6 --- /dev/null +++ b/clients/margin-trading/docs/LiquidationLoanRepayResponse.md @@ -0,0 +1,17 @@ + + +# LiquidationLoanRepayResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**repayId** | **Long** | Unique identifier for this repayment transaction | [optional] | +|**asset** | **String** | Asset used for repayment | [optional] | +|**amount** | **String** | Actual repayment amount | [optional] | +|**status** | **String** | Repayment status: `SUCCESS` (completed) or `PENDING` (processing) | [optional] | +|**createTime** | **Long** | Unix timestamp (milliseconds) when the repayment was created | [optional] | + + + diff --git a/clients/margin-trading/docs/Listenkeyexpired.md b/clients/margin-trading/docs/Listenkeyexpired.md index a4f18a418..0df7cfbf1 100644 --- a/clients/margin-trading/docs/Listenkeyexpired.md +++ b/clients/margin-trading/docs/Listenkeyexpired.md @@ -1,13 +1,13 @@ -# Listenkeyexpired +# ListenKeyExpired ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **String** | | [optional] | +|**E** | **String** | Event time | [optional] | |**listenKey** | **String** | | [optional] | diff --git a/clients/margin-trading/docs/Liststatus.md b/clients/margin-trading/docs/Liststatus.md index 4f4123877..e2cde8e66 100644 --- a/clients/margin-trading/docs/Liststatus.md +++ b/clients/margin-trading/docs/Liststatus.md @@ -1,22 +1,22 @@ -# Liststatus +# ListStatus ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**gLowerCase** | **Long** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**L** | **String** | | [optional] | -|**rLowerCase** | **String** | | [optional] | -|**C** | **String** | | [optional] | -|**T** | **Long** | | [optional] | -|**O** | [**List<ListstatusOInner>**](ListstatusOInner.md) | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**gLowerCase** | **Long** | OrderListId | [optional] | +|**cLowerCase** | **String** | Contingency Type | [optional] | +|**lLowerCase** | **String** | List Status Type | [optional] | +|**L** | **String** | List Order Status | [optional] | +|**rLowerCase** | **String** | List Reject Reason | [optional] | +|**C** | **String** | List Client Order ID | [optional] | +|**T** | **Long** | Transaction Time | [optional] | +|**O** | [**List<ListStatusOInner>**](ListStatusOInner.md) | An array of objects | [optional] | diff --git a/clients/margin-trading/docs/ListstatusOInner.md b/clients/margin-trading/docs/ListstatusOInner.md index b0bd3c1e4..741f8fbc6 100644 --- a/clients/margin-trading/docs/ListstatusOInner.md +++ b/clients/margin-trading/docs/ListstatusOInner.md @@ -1,15 +1,15 @@ -# ListstatusOInner +# ListStatusOInner ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**iLowerCase** | **Long** | | [optional] | -|**cLowerCase** | **String** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**iLowerCase** | **Long** | orderId | [optional] | +|**cLowerCase** | **String** | ClientOrderId | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountBorrowRepayRequest.md b/clients/margin-trading/docs/MarginAccountBorrowRepayRequest.md index 0deb3c0dd..2f2ce4b23 100644 --- a/clients/margin-trading/docs/MarginAccountBorrowRepayRequest.md +++ b/clients/margin-trading/docs/MarginAccountBorrowRepayRequest.md @@ -8,10 +8,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**asset** | **String** | | | -|**isIsolated** | **String** | | | -|**symbol** | **String** | | | +|**isIsolated** | **IsIsolated** | | | +|**symbol** | **String** | Only for Isolated margin | [optional] | |**amount** | **String** | | | -|**type** | **String** | | | +|**type** | **OrderType** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountBorrowRepayResponse.md b/clients/margin-trading/docs/MarginAccountBorrowRepayResponse.md index 190cdfd01..cdfb29e98 100644 --- a/clients/margin-trading/docs/MarginAccountBorrowRepayResponse.md +++ b/clients/margin-trading/docs/MarginAccountBorrowRepayResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tranId** | **Long** | | [optional] | +|**tranId** | **Long** | tran Id. | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountCancelAllOpenOrdersOnASymbolResponseInner.md b/clients/margin-trading/docs/MarginAccountCancelAllOpenOrdersOnASymbolResponseInner.md index 067551d04..643cf5ce3 100644 --- a/clients/margin-trading/docs/MarginAccountCancelAllOpenOrdersOnASymbolResponseInner.md +++ b/clients/margin-trading/docs/MarginAccountCancelAllOpenOrdersOnASymbolResponseInner.md @@ -7,28 +7,28 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**isIsolated** | **Boolean** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**contingencyType** | **String** | | [optional] | -|**listStatusType** | **String** | | [optional] | -|**listOrderStatus** | **String** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | -|**transactionTime** | **Long** | | [optional] | -|**orders** | [**List<MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner>**](MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner.md) | | [optional] | -|**orderReports** | [**List<MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner>**](MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.md) | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**isIsolated** | **Boolean** | if isolated margin | [optional] | +|**origClientOrderId** | **String** | orig Client Order Id. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**orderListId** | **Long** | order List Id. | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | +|**price** | **String** | price. | [optional] | +|**origQty** | **String** | orig Qty. | [optional] | +|**executedQty** | **String** | executed Qty. | [optional] | +|**cummulativeQuoteQty** | **String** | cummulative Quote Qty. | [optional] | +|**status** | **String** | status. | [optional] | +|**timeInForce** | **String** | time In Force. | [optional] | +|**type** | **String** | type. | [optional] | +|**side** | **String** | side. | [optional] | +|**selfTradePreventionMode** | **String** | self Trade Prevention Mode. | [optional] | +|**contingencyType** | **String** | contingency Type. | [optional] | +|**listStatusType** | **String** | list Status Type. | [optional] | +|**listOrderStatus** | **String** | list Order Status. | [optional] | +|**listClientOrderId** | **String** | list Client Order Id. | [optional] | +|**transactionTime** | **Long** | transaction Time. | [optional] | +|**orders** | [**List<MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner>**](MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner.md) | orders list. | [optional] | +|**orderReports** | [**List<MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner>**](MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.md) | order Reports list. | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.md b/clients/margin-trading/docs/MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.md index 434b03433..a726832b4 100644 --- a/clients/margin-trading/docs/MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.md +++ b/clients/margin-trading/docs/MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.md @@ -7,21 +7,21 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**icebergQty** | **String** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**origClientOrderId** | **String** | orig Client Order Id. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**orderListId** | **Long** | order List Id. | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | +|**price** | **String** | price. | [optional] | +|**origQty** | **String** | orig Qty. | [optional] | +|**executedQty** | **String** | executed Qty. | [optional] | +|**cummulativeQuoteQty** | **String** | cummulative Quote Qty. | [optional] | +|**status** | **String** | status. | [optional] | +|**timeInForce** | **String** | time In Force. | [optional] | +|**type** | **String** | type. | [optional] | +|**side** | **String** | side. | [optional] | +|**stopPrice** | **String** | stop Price. | [optional] | +|**icebergQty** | **String** | iceberg Qty. | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner.md b/clients/margin-trading/docs/MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner.md index f7b63dcae..ae2306d68 100644 --- a/clients/margin-trading/docs/MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner.md +++ b/clients/margin-trading/docs/MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountCancelOcoResponse.md b/clients/margin-trading/docs/MarginAccountCancelOcoResponse.md index 4a4ded9cc..25a0f3ef5 100644 --- a/clients/margin-trading/docs/MarginAccountCancelOcoResponse.md +++ b/clients/margin-trading/docs/MarginAccountCancelOcoResponse.md @@ -7,16 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderListId** | **Long** | | [optional] | -|**contingencyType** | **String** | | [optional] | -|**listStatusType** | **String** | | [optional] | -|**listOrderStatus** | **String** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | -|**transactionTime** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**isIsolated** | **Boolean** | | [optional] | -|**orders** | [**List<MarginAccountCancelOcoResponseOrdersInner>**](MarginAccountCancelOcoResponseOrdersInner.md) | | [optional] | -|**orderReports** | [**List<MarginAccountCancelOcoResponseOrderReportsInner>**](MarginAccountCancelOcoResponseOrderReportsInner.md) | | [optional] | +|**orderListId** | **Long** | order List Id. | [optional] | +|**contingencyType** | **String** | contingency Type. | [optional] | +|**listStatusType** | **String** | list Status Type. | [optional] | +|**listOrderStatus** | **String** | list Order Status. | [optional] | +|**listClientOrderId** | **String** | list Client Order Id. | [optional] | +|**transactionTime** | **Long** | transaction Time. | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**isIsolated** | **Boolean** | if isolated margin | [optional] | +|**orders** | [**List<MarginAccountCancelOcoResponseOrdersInner>**](MarginAccountCancelOcoResponseOrdersInner.md) | orders list. | [optional] | +|**orderReports** | [**List<MarginAccountCancelOcoResponseOrderReportsInner>**](MarginAccountCancelOcoResponseOrderReportsInner.md) | order Reports. | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountCancelOcoResponseOrderReportsInner.md b/clients/margin-trading/docs/MarginAccountCancelOcoResponseOrderReportsInner.md index ff033fa0e..6f9c91f6b 100644 --- a/clients/margin-trading/docs/MarginAccountCancelOcoResponseOrderReportsInner.md +++ b/clients/margin-trading/docs/MarginAccountCancelOcoResponseOrderReportsInner.md @@ -7,21 +7,21 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**origClientOrderId** | **String** | orig Client Order Id. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**orderListId** | **Long** | order List Id. | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | +|**price** | **String** | price. | [optional] | +|**origQty** | **String** | orig Qty. | [optional] | +|**executedQty** | **String** | executed Qty. | [optional] | +|**cummulativeQuoteQty** | **String** | cummulative Quote Qty. | [optional] | +|**status** | **String** | status. | [optional] | +|**timeInForce** | **String** | time In Force. | [optional] | +|**type** | **String** | type. | [optional] | +|**side** | **String** | side. | [optional] | +|**stopPrice** | **String** | stop Price. | [optional] | +|**selfTradePreventionMode** | **String** | self Trade Prevention Mode. | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountCancelOcoResponseOrdersInner.md b/clients/margin-trading/docs/MarginAccountCancelOcoResponseOrdersInner.md index 391bceda6..e6fb7a13e 100644 --- a/clients/margin-trading/docs/MarginAccountCancelOcoResponseOrdersInner.md +++ b/clients/margin-trading/docs/MarginAccountCancelOcoResponseOrdersInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountCancelOrderResponse.md b/clients/margin-trading/docs/MarginAccountCancelOrderResponse.md index e757affd7..f16928f36 100644 --- a/clients/margin-trading/docs/MarginAccountCancelOrderResponse.md +++ b/clients/margin-trading/docs/MarginAccountCancelOrderResponse.md @@ -7,19 +7,19 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**isIsolated** | **Boolean** | | [optional] | -|**orderId** | **String** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**side** | **String** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**orderId** | **String** | order Id. | [optional] | +|**origClientOrderId** | **String** | orig Client Order Id. | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | +|**price** | **String** | price. | [optional] | +|**origQty** | **String** | orig Qty. | [optional] | +|**executedQty** | **String** | executed Qty. | [optional] | +|**cummulativeQuoteQty** | **String** | cummulative Quote Qty. | [optional] | +|**status** | **String** | status. | [optional] | +|**timeInForce** | **String** | time In Force. | [optional] | +|**type** | **String** | type. | [optional] | +|**side** | **String** | side. | [optional] | +|**isIsolated** | **Boolean** | if isolated margin | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountNewOcoRequest.md b/clients/margin-trading/docs/MarginAccountNewOcoRequest.md index 4f5fe37e3..1ed6bbf05 100644 --- a/clients/margin-trading/docs/MarginAccountNewOcoRequest.md +++ b/clients/margin-trading/docs/MarginAccountNewOcoRequest.md @@ -8,22 +8,22 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**isIsolated** | **String** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | +|**isIsolated** | **IsIsolated** | | [optional] | +|**listClientOrderId** | **String** | A unique Id for the entire orderList | [optional] | |**side** | **Side** | | | |**quantity** | **Double** | | | -|**limitClientOrderId** | **String** | | [optional] | +|**limitClientOrderId** | **String** | A unique Id for the limit order | [optional] | |**price** | **Double** | | | |**limitIcebergQty** | **Double** | | [optional] | -|**stopClientOrderId** | **String** | | [optional] | +|**stopClientOrderId** | **String** | A unique Id for the stop loss/stop loss limit leg | [optional] | |**stopPrice** | **Double** | | | -|**stopLimitPrice** | **Double** | | [optional] | +|**stopLimitPrice** | **Double** | If provided, `stopLimitTimeInForce` is required. | [optional] | |**stopIcebergQty** | **Double** | | [optional] | -|**stopLimitTimeInForce** | **String** | | [optional] | +|**stopLimitTimeInForce** | **StopLimitTimeInForce** | | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | -|**sideEffectType** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**autoRepayAtCancel** | **Boolean** | | [optional] | +|**sideEffectType** | **SideEffectType** | | [optional] | +|**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | +|**autoRepayAtCancel** | **Boolean** | Only when MARGIN_BUY or AUTO_BORROW_REPAY order takes effect, true means that the debt generated by the order needs to be repay after the order is cancelled. | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountNewOcoResponse.md b/clients/margin-trading/docs/MarginAccountNewOcoResponse.md index ecec1d621..a8a1c8e9e 100644 --- a/clients/margin-trading/docs/MarginAccountNewOcoResponse.md +++ b/clients/margin-trading/docs/MarginAccountNewOcoResponse.md @@ -7,17 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderListId** | **Long** | | [optional] | -|**contingencyType** | **String** | | [optional] | -|**listStatusType** | **String** | | [optional] | -|**listOrderStatus** | **String** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | -|**transactionTime** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**marginBuyBorrowAmount** | **String** | | [optional] | -|**marginBuyBorrowAsset** | **String** | | [optional] | -|**isIsolated** | **Boolean** | | [optional] | -|**orders** | [**List<MarginAccountNewOcoResponseOrdersInner>**](MarginAccountNewOcoResponseOrdersInner.md) | | [optional] | +|**orderListId** | **Long** | order List Id. | [optional] | +|**contingencyType** | **String** | contingency Type. | [optional] | +|**listStatusType** | **String** | list Status Type. | [optional] | +|**listOrderStatus** | **String** | list Order Status. | [optional] | +|**listClientOrderId** | **String** | list Client Order Id. | [optional] | +|**transactionTime** | **Long** | transaction Time. | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**marginBuyBorrowAmount** | **String** | will not return if no margin trade happens | [optional] | +|**marginBuyBorrowAsset** | **String** | will not return if no margin trade happens | [optional] | +|**isIsolated** | **Boolean** | if isolated margin | [optional] | +|**orders** | [**List<MarginAccountNewOcoResponseOrdersInner>**](MarginAccountNewOcoResponseOrdersInner.md) | orders list. | [optional] | |**orderReports** | [**List<MarginAccountNewOcoResponseOrderReportsInner>**](MarginAccountNewOcoResponseOrderReportsInner.md) | | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountNewOcoResponseOrderReportsInner.md b/clients/margin-trading/docs/MarginAccountNewOcoResponseOrderReportsInner.md index bee5aa1e7..9c7f5eff7 100644 --- a/clients/margin-trading/docs/MarginAccountNewOcoResponseOrderReportsInner.md +++ b/clients/margin-trading/docs/MarginAccountNewOcoResponseOrderReportsInner.md @@ -7,21 +7,21 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**transactTime** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**orderListId** | **Long** | order List Id. | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | +|**transactTime** | **Long** | transact Time. | [optional] | +|**price** | **String** | price. | [optional] | +|**origQty** | **String** | orig Qty. | [optional] | +|**executedQty** | **String** | executed Qty. | [optional] | +|**cummulativeQuoteQty** | **String** | cummulative Quote Qty. | [optional] | +|**status** | **String** | status. | [optional] | +|**timeInForce** | **String** | time In Force. | [optional] | +|**type** | **String** | type. | [optional] | +|**side** | **String** | side. | [optional] | +|**stopPrice** | **String** | stop Price. | [optional] | +|**selfTradePreventionMode** | **String** | self Trade Prevention Mode. | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountNewOcoResponseOrdersInner.md b/clients/margin-trading/docs/MarginAccountNewOcoResponseOrdersInner.md index d8473708d..a90b6baec 100644 --- a/clients/margin-trading/docs/MarginAccountNewOcoResponseOrdersInner.md +++ b/clients/margin-trading/docs/MarginAccountNewOcoResponseOrdersInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountNewOrderRequest.md b/clients/margin-trading/docs/MarginAccountNewOrderRequest.md index aa2b98774..acbd2172c 100644 --- a/clients/margin-trading/docs/MarginAccountNewOrderRequest.md +++ b/clients/margin-trading/docs/MarginAccountNewOrderRequest.md @@ -8,20 +8,21 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**isIsolated** | **String** | | [optional] | +|**isIsolated** | **IsIsolated** | | [optional] | |**side** | **Side** | | | -|**type** | **String** | | | +|**type** | **OrderType** | | | |**quantity** | **Double** | | [optional] | |**quoteOrderQty** | **Double** | | [optional] | |**price** | **Double** | | [optional] | -|**stopPrice** | **Double** | | [optional] | -|**newClientOrderId** | **String** | | [optional] | -|**icebergQty** | **Double** | | [optional] | +|**stopPrice** | **Double** | Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and `TAKE_PROFIT_LIMIT` orders. | [optional] | +|**newClientOrderId** | **String** | A unique id among open orders. Automatically generated if not sent. | [optional] | +|**icebergQty** | **Double** | Used with `LIMIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` to create an iceberg order. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | -|**sideEffectType** | **String** | | [optional] | +|**sideEffectType** | **SideEffectType** | | [optional] | |**timeInForce** | **TimeInForce** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**autoRepayAtCancel** | **Boolean** | | [optional] | +|**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | +|**trailingDelta** | **Long** | Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and `TAKE_PROFIT_LIMIT` orders. | [optional] | +|**autoRepayAtCancel** | **Boolean** | Only when MARGIN_BUY or AUTO_BORROW_REPAY order takes effect, true means that the debt generated by the order needs to be repaid after the order is cancelled. | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountNewOrderResponse.md b/clients/margin-trading/docs/MarginAccountNewOrderResponse.md index 30e5eb160..190c4f706 100644 --- a/clients/margin-trading/docs/MarginAccountNewOrderResponse.md +++ b/clients/margin-trading/docs/MarginAccountNewOrderResponse.md @@ -7,23 +7,23 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**isIsolated** | **Boolean** | | [optional] | -|**transactTime** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**marginBuyBorrowAmount** | **Long** | | [optional] | -|**marginBuyBorrowAsset** | **String** | | [optional] | -|**fills** | [**List<MarginAccountNewOrderResponseFillsInner>**](MarginAccountNewOrderResponseFillsInner.md) | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | +|**isIsolated** | **Boolean** | if isolated margin | [optional] | +|**transactTime** | **Long** | transact Time. | [optional] | +|**price** | **String** | price. | [optional] | +|**origQty** | **String** | orig Qty. | [optional] | +|**executedQty** | **String** | executed Qty. | [optional] | +|**cummulativeQuoteQty** | **String** | cummulative Quote Qty. | [optional] | +|**status** | **String** | status. | [optional] | +|**timeInForce** | **String** | time In Force. | [optional] | +|**type** | **String** | type. | [optional] | +|**side** | **String** | side. | [optional] | +|**selfTradePreventionMode** | **String** | self Trade Prevention Mode. | [optional] | +|**marginBuyBorrowAmount** | **Long** | margin Buy Borrow Amount. | [optional] | +|**marginBuyBorrowAsset** | **String** | margin Buy Borrow Asset. | [optional] | +|**fills** | [**List<MarginAccountNewOrderResponseFillsInner>**](MarginAccountNewOrderResponseFillsInner.md) | fills list. | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountNewOrderResponseFillsInner.md b/clients/margin-trading/docs/MarginAccountNewOrderResponseFillsInner.md index f734b62bf..0de899ea7 100644 --- a/clients/margin-trading/docs/MarginAccountNewOrderResponseFillsInner.md +++ b/clients/margin-trading/docs/MarginAccountNewOrderResponseFillsInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**price** | **String** | | [optional] | -|**qty** | **String** | | [optional] | -|**commission** | **String** | | [optional] | -|**commissionAsset** | **String** | | [optional] | -|**tradeId** | **Long** | | [optional] | +|**price** | **String** | price. | [optional] | +|**qty** | **String** | qty. | [optional] | +|**commission** | **String** | commission. | [optional] | +|**commissionAsset** | **String** | commission Asset. | [optional] | +|**tradeId** | **Long** | trade Id. | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountNewOtoRequest.md b/clients/margin-trading/docs/MarginAccountNewOtoRequest.md index f3376245e..0a58af6f9 100644 --- a/clients/margin-trading/docs/MarginAccountNewOtoRequest.md +++ b/clients/margin-trading/docs/MarginAccountNewOtoRequest.md @@ -8,28 +8,28 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**isIsolated** | **String** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | +|**isIsolated** | **IsIsolated** | | [optional] | +|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent.<br/>A new order list with the same listClientOrderId is accepted only when the previous one is filled or completely expired.<br/>`listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | -|**sideEffectType** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**autoRepayAtCancel** | **Boolean** | | [optional] | -|**workingType** | **String** | | | -|**workingSide** | **String** | | | -|**workingClientOrderId** | **String** | | [optional] | +|**sideEffectType** | **SideEffectType** | | [optional] | +|**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | +|**autoRepayAtCancel** | **Boolean** | Only when MARGIN_BUY order takes effect, true means that the debt generated by the order needs to be repaid after the order is cancelled. | [optional] | +|**workingType** | **WorkingType** | | | +|**workingSide** | **WorkingSide** | | | +|**workingClientOrderId** | **String** | Arbitrary unique ID among open orders for the working order. Automatically generated if not sent. | [optional] | |**workingPrice** | **Double** | | | -|**workingQuantity** | **Double** | | | -|**workingIcebergQty** | **Double** | | | -|**workingTimeInForce** | **String** | | [optional] | -|**pendingType** | **String** | | | -|**pendingSide** | **String** | | | -|**pendingClientOrderId** | **String** | | [optional] | +|**workingQuantity** | **Double** | Sets the quantity for the working order. | | +|**workingIcebergQty** | **Double** | This can only be used if `workingTimeInForce` is `GTC`. | | +|**workingTimeInForce** | **WorkingTimeInForce** | | [optional] | +|**pendingType** | **PendingType** | | | +|**pendingSide** | **PendingSide** | | | +|**pendingClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending order. Automatically generated if not sent. | [optional] | |**pendingPrice** | **Double** | | [optional] | |**pendingStopPrice** | **Double** | | [optional] | |**pendingTrailingDelta** | **Double** | | [optional] | -|**pendingQuantity** | **Double** | | | -|**pendingIcebergQty** | **Double** | | [optional] | -|**pendingTimeInForce** | **String** | | [optional] | +|**pendingQuantity** | **Double** | Sets the quantity for the pending order. | | +|**pendingIcebergQty** | **Double** | This can only be used if `pendingTimeInForce` is `GTC`. | [optional] | +|**pendingTimeInForce** | **PendingTimeInForce** | | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountNewOtoResponse.md b/clients/margin-trading/docs/MarginAccountNewOtoResponse.md index 50d4fa1d8..9550cdb2e 100644 --- a/clients/margin-trading/docs/MarginAccountNewOtoResponse.md +++ b/clients/margin-trading/docs/MarginAccountNewOtoResponse.md @@ -7,16 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderListId** | **Long** | | [optional] | -|**contingencyType** | **String** | | [optional] | -|**listStatusType** | **String** | | [optional] | -|**listOrderStatus** | **String** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | -|**transactionTime** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**isIsolated** | **Boolean** | | [optional] | -|**orders** | [**List<MarginAccountNewOtoResponseOrdersInner>**](MarginAccountNewOtoResponseOrdersInner.md) | | [optional] | -|**orderReports** | [**List<MarginAccountNewOtoResponseOrderReportsInner>**](MarginAccountNewOtoResponseOrderReportsInner.md) | | [optional] | +|**orderListId** | **Long** | order List Id. | [optional] | +|**contingencyType** | **String** | contingency Type. | [optional] | +|**listStatusType** | **String** | list Status Type. | [optional] | +|**listOrderStatus** | **String** | list Order Status. | [optional] | +|**listClientOrderId** | **String** | list Client Order Id. | [optional] | +|**transactionTime** | **Long** | transaction Time. | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**isIsolated** | **Boolean** | is Isolated. | [optional] | +|**orders** | [**List<MarginAccountNewOtoResponseOrdersInner>**](MarginAccountNewOtoResponseOrdersInner.md) | orders list. | [optional] | +|**orderReports** | [**List<MarginAccountNewOtoResponseOrderReportsInner>**](MarginAccountNewOtoResponseOrderReportsInner.md) | order Reports list. | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountNewOtoResponseOrderReportsInner.md b/clients/margin-trading/docs/MarginAccountNewOtoResponseOrderReportsInner.md index d6a21967c..6d996a7fc 100644 --- a/clients/margin-trading/docs/MarginAccountNewOtoResponseOrderReportsInner.md +++ b/clients/margin-trading/docs/MarginAccountNewOtoResponseOrderReportsInner.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**transactTime** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**orderListId** | **Long** | order List Id. | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | +|**transactTime** | **Long** | transact Time. | [optional] | +|**price** | **String** | price. | [optional] | +|**origQty** | **String** | orig Qty. | [optional] | +|**executedQty** | **String** | executed Qty. | [optional] | +|**cummulativeQuoteQty** | **String** | cummulative Quote Qty. | [optional] | +|**status** | **String** | status. | [optional] | +|**timeInForce** | **String** | time In Force. | [optional] | +|**type** | **String** | type. | [optional] | +|**side** | **String** | side. | [optional] | +|**selfTradePreventionMode** | **String** | self Trade Prevention Mode. | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountNewOtoResponseOrdersInner.md b/clients/margin-trading/docs/MarginAccountNewOtoResponseOrdersInner.md index da78e3df1..141f123ef 100644 --- a/clients/margin-trading/docs/MarginAccountNewOtoResponseOrdersInner.md +++ b/clients/margin-trading/docs/MarginAccountNewOtoResponseOrdersInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountNewOtocoRequest.md b/clients/margin-trading/docs/MarginAccountNewOtocoRequest.md index 01a964894..3f85c2bbc 100644 --- a/clients/margin-trading/docs/MarginAccountNewOtocoRequest.md +++ b/clients/margin-trading/docs/MarginAccountNewOtocoRequest.md @@ -8,35 +8,35 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**isIsolated** | **String** | | [optional] | -|**sideEffectType** | **String** | | [optional] | -|**autoRepayAtCancel** | **Boolean** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | +|**isIsolated** | **IsIsolated** | | [optional] | +|**sideEffectType** | **SideEffectType** | | [optional] | +|**autoRepayAtCancel** | **Boolean** | Only when MARGIN_BUY order takes effect, true means that the debt generated by the order needs to be repaid after the order is cancelled. | [optional] | +|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same listClientOrderId is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId`, `pendingAboveClientOrderId`, and the `pendingBelowClientOrderId`. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**workingType** | **String** | | | -|**workingSide** | **String** | | | -|**workingClientOrderId** | **String** | | [optional] | +|**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | +|**workingType** | **WorkingType** | | | +|**workingSide** | **WorkingSide** | | | +|**workingClientOrderId** | **String** | Arbitrary unique ID among open orders for the working order. Automatically generated if not sent. | [optional] | |**workingPrice** | **Double** | | | |**workingQuantity** | **Double** | | | -|**workingIcebergQty** | **Double** | | [optional] | -|**workingTimeInForce** | **String** | | [optional] | -|**pendingSide** | **String** | | | +|**workingIcebergQty** | **Double** | This can only be used if `workingTimeInForce` is `GTC`. | [optional] | +|**workingTimeInForce** | **WorkingTimeInForce** | | [optional] | +|**pendingSide** | **PendingSide** | | | |**pendingQuantity** | **Double** | | | -|**pendingAboveType** | **String** | | | -|**pendingAboveClientOrderId** | **String** | | [optional] | +|**pendingAboveType** | **PendingAboveType** | | | +|**pendingAboveClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending above order. Automatically generated if not sent. | [optional] | |**pendingAbovePrice** | **Double** | | [optional] | |**pendingAboveStopPrice** | **Double** | | [optional] | |**pendingAboveTrailingDelta** | **Double** | | [optional] | -|**pendingAboveIcebergQty** | **Double** | | [optional] | -|**pendingAboveTimeInForce** | **String** | | [optional] | -|**pendingBelowType** | **String** | | [optional] | -|**pendingBelowClientOrderId** | **String** | | [optional] | +|**pendingAboveIcebergQty** | **Double** | This can only be used if `pendingAboveTimeInForce` is `GTC`. | [optional] | +|**pendingAboveTimeInForce** | **PendingAboveTimeInForce** | | [optional] | +|**pendingBelowType** | **PendingBelowType** | | [optional] | +|**pendingBelowClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending below order. Automatically generated if not sent. | [optional] | |**pendingBelowPrice** | **Double** | | [optional] | |**pendingBelowStopPrice** | **Double** | | [optional] | |**pendingBelowTrailingDelta** | **Double** | | [optional] | -|**pendingBelowIcebergQty** | **Double** | | [optional] | -|**pendingBelowTimeInForce** | **String** | | [optional] | +|**pendingBelowIcebergQty** | **Double** | This can only be used if `pendingBelowTimeInForce` is `GTC`. | [optional] | +|**pendingBelowTimeInForce** | **PendingBelowTimeInForce** | | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountNewOtocoResponse.md b/clients/margin-trading/docs/MarginAccountNewOtocoResponse.md index bf89f3f6a..af1f6b560 100644 --- a/clients/margin-trading/docs/MarginAccountNewOtocoResponse.md +++ b/clients/margin-trading/docs/MarginAccountNewOtocoResponse.md @@ -7,16 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderListId** | **Long** | | [optional] | -|**contingencyType** | **String** | | [optional] | -|**listStatusType** | **String** | | [optional] | -|**listOrderStatus** | **String** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | -|**transactionTime** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**isIsolated** | **Boolean** | | [optional] | -|**orders** | [**List<MarginAccountNewOtocoResponseOrdersInner>**](MarginAccountNewOtocoResponseOrdersInner.md) | | [optional] | -|**orderReports** | [**List<MarginAccountNewOtocoResponseOrderReportsInner>**](MarginAccountNewOtocoResponseOrderReportsInner.md) | | [optional] | +|**orderListId** | **Long** | order List Id. | [optional] | +|**contingencyType** | **String** | contingency Type. | [optional] | +|**listStatusType** | **String** | list Status Type. | [optional] | +|**listOrderStatus** | **String** | list Order Status. | [optional] | +|**listClientOrderId** | **String** | list Client Order Id. | [optional] | +|**transactionTime** | **Long** | transaction Time. | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**isIsolated** | **Boolean** | is Isolated. | [optional] | +|**orders** | [**List<MarginAccountNewOtocoResponseOrdersInner>**](MarginAccountNewOtocoResponseOrdersInner.md) | orders list. | [optional] | +|**orderReports** | [**List<MarginAccountNewOtocoResponseOrderReportsInner>**](MarginAccountNewOtocoResponseOrderReportsInner.md) | order Reports list. | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountNewOtocoResponseOrderReportsInner.md b/clients/margin-trading/docs/MarginAccountNewOtocoResponseOrderReportsInner.md index 2272cb58a..d577ac2a9 100644 --- a/clients/margin-trading/docs/MarginAccountNewOtocoResponseOrderReportsInner.md +++ b/clients/margin-trading/docs/MarginAccountNewOtocoResponseOrderReportsInner.md @@ -7,21 +7,21 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**transactTime** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**orderListId** | **Long** | order List Id. | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | +|**transactTime** | **Long** | transact Time. | [optional] | +|**price** | **String** | price. | [optional] | +|**origQty** | **String** | orig Qty. | [optional] | +|**executedQty** | **String** | executed Qty. | [optional] | +|**cummulativeQuoteQty** | **String** | cummulative Quote Qty. | [optional] | +|**status** | **String** | status. | [optional] | +|**timeInForce** | **String** | time In Force. | [optional] | +|**type** | **String** | type. | [optional] | +|**side** | **String** | side. | [optional] | +|**selfTradePreventionMode** | **String** | self Trade Prevention Mode. | [optional] | +|**stopPrice** | **String** | stop Price. | [optional] | diff --git a/clients/margin-trading/docs/MarginAccountNewOtocoResponseOrdersInner.md b/clients/margin-trading/docs/MarginAccountNewOtocoResponseOrdersInner.md index abf919c6f..a7b0d1827 100644 --- a/clients/margin-trading/docs/MarginAccountNewOtocoResponseOrdersInner.md +++ b/clients/margin-trading/docs/MarginAccountNewOtocoResponseOrdersInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | diff --git a/clients/margin-trading/docs/MarginLevelStatusChange.md b/clients/margin-trading/docs/MarginLevelStatusChange.md index ae191317a..3449e9539 100644 --- a/clients/margin-trading/docs/MarginLevelStatusChange.md +++ b/clients/margin-trading/docs/MarginLevelStatusChange.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**sLowerCase** | **String** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**lLowerCase** | **String** | Margin level | [optional] | +|**sLowerCase** | **String** | Margin call status | [optional] | diff --git a/clients/margin-trading/docs/MarginManualLiquidationRequest.md b/clients/margin-trading/docs/MarginManualLiquidationRequest.md index 68e06f78e..f5de2994e 100644 --- a/clients/margin-trading/docs/MarginManualLiquidationRequest.md +++ b/clients/margin-trading/docs/MarginManualLiquidationRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**type** | **String** | | | -|**symbol** | **String** | | [optional] | +|**type** | **OrderType** | | | +|**symbol** | **String** | When type selects `ISOLATED`, `symbol` must be filled in | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/margin-trading/docs/MarginManualLiquidationResponse.md b/clients/margin-trading/docs/MarginManualLiquidationResponse.md index 2c299644c..6fa54b77c 100644 --- a/clients/margin-trading/docs/MarginManualLiquidationResponse.md +++ b/clients/margin-trading/docs/MarginManualLiquidationResponse.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**interest** | **String** | | [optional] | -|**principal** | **String** | | [optional] | -|**liabilityAsset** | **String** | | [optional] | -|**liabilityQty** | **Double** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**interest** | **String** | interest. | [optional] | +|**principal** | **String** | principal. | [optional] | +|**liabilityAsset** | **String** | liability Asset. | [optional] | +|**liabilityQty** | **Double** | liability Qty. | [optional] | diff --git a/clients/margin-trading/docs/MarketDataApi.md b/clients/margin-trading/docs/MarketDataApi.md index a83624723..3fb198c7f 100644 --- a/clients/margin-trading/docs/MarketDataApi.md +++ b/clients/margin-trading/docs/MarketDataApi.md @@ -6,16 +6,16 @@ All URIs are relative to *https://api.binance.com* |------------- | ------------- | -------------| | [**crossMarginCollateralRatio**](MarketDataApi.md#crossMarginCollateralRatio) | **GET** /sapi/v1/margin/crossMarginCollateralRatio | Cross margin collateral ratio (MARKET_DATA) | | [**getAllCrossMarginPairs**](MarketDataApi.md#getAllCrossMarginPairs) | **GET** /sapi/v1/margin/allPairs | Get All Cross Margin Pairs (MARKET_DATA) | -| [**getAllIsolatedMarginSymbol**](MarketDataApi.md#getAllIsolatedMarginSymbol) | **GET** /sapi/v1/margin/isolated/allPairs | Get All Isolated Margin Symbol(MARKET_DATA) | +| [**getAllIsolatedMarginSymbol**](MarketDataApi.md#getAllIsolatedMarginSymbol) | **GET** /sapi/v1/margin/isolated/allPairs | Get All Isolated Margin Symbol (MARKET_DATA) | | [**getAllMarginAssets**](MarketDataApi.md#getAllMarginAssets) | **GET** /sapi/v1/margin/allAssets | Get All Margin Assets (MARKET_DATA) | | [**getDelistSchedule**](MarketDataApi.md#getDelistSchedule) | **GET** /sapi/v1/margin/delist-schedule | Get Delist Schedule (MARKET_DATA) | -| [**getLimitPricePairs**](MarketDataApi.md#getLimitPricePairs) | **GET** /sapi/v1/margin/limit-price-pairs | Get Limit Price Pairs(MARKET_DATA) | +| [**getLimitPricePairs**](MarketDataApi.md#getLimitPricePairs) | **GET** /sapi/v1/margin/limit-price-pairs | Get Limit Price Pairs (MARKET_DATA) | | [**getListSchedule**](MarketDataApi.md#getListSchedule) | **GET** /sapi/v1/margin/list-schedule | Get list Schedule (MARKET_DATA) | | [**getMarginAssetRiskBasedLiquidationRatio**](MarketDataApi.md#getMarginAssetRiskBasedLiquidationRatio) | **GET** /sapi/v1/margin/risk-based-liquidation-ratio | Get Margin Asset Risk-Based Liquidation Ratio (MARKET_DATA) | | [**getMarginRestrictedAssets**](MarketDataApi.md#getMarginRestrictedAssets) | **GET** /sapi/v1/margin/restricted-asset | Get Margin Restricted Assets (MARKET_DATA) | | [**queryIsolatedMarginTierData**](MarketDataApi.md#queryIsolatedMarginTierData) | **GET** /sapi/v1/margin/isolatedMarginTier | Query Isolated Margin Tier Data (USER_DATA) | -| [**queryLiabilityCoinLeverageBracketInCrossMarginProMode**](MarketDataApi.md#queryLiabilityCoinLeverageBracketInCrossMarginProMode) | **GET** /sapi/v1/margin/leverageBracket | Query Liability Coin Leverage Bracket in Cross Margin Pro Mode(MARKET_DATA) | -| [**queryMarginAvailableInventory**](MarketDataApi.md#queryMarginAvailableInventory) | **GET** /sapi/v1/margin/available-inventory | Query Margin Available Inventory(USER_DATA) | +| [**queryLiabilityCoinLeverageBracketInCrossMarginProMode**](MarketDataApi.md#queryLiabilityCoinLeverageBracketInCrossMarginProMode) | **GET** /sapi/v1/margin/leverageBracket | Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) | +| [**queryMarginAvailableInventory**](MarketDataApi.md#queryMarginAvailableInventory) | **GET** /sapi/v1/margin/available-inventory | Query Margin Available Inventory (USER_DATA) | | [**queryMarginPriceindex**](MarketDataApi.md#queryMarginPriceindex) | **GET** /sapi/v1/margin/priceIndex | Query Margin PriceIndex (MARKET_DATA) | @@ -25,7 +25,7 @@ All URIs are relative to *https://api.binance.com* Cross margin collateral ratio (MARKET_DATA) -Cross margin collateral ratio Weight: 100(IP) +Cross margin collateral ratio Weight(IP): 100 Security Type: MARKET_DATA ### Example ```java @@ -83,7 +83,7 @@ No authorization required Get All Cross Margin Pairs (MARKET_DATA) -Get All Cross Margin Pairs Weight: 1(IP) +Get All Cross Margin Pairs Weight(IP): 1 Security Type: MARKET_DATA ### Example ```java @@ -100,7 +100,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | isolated margin pair + String symbol = "BNBBTC"; // String | try { GetAllCrossMarginPairsResponse result = apiInstance.getAllCrossMarginPairs(symbol); System.out.println(result); @@ -119,7 +119,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| isolated margin pair | [optional] | +| **symbol** | **String**| | [optional] | ### Return type @@ -143,9 +143,9 @@ No authorization required # **getAllIsolatedMarginSymbol** > GetAllIsolatedMarginSymbolResponse getAllIsolatedMarginSymbol(symbol, recvWindow) -Get All Isolated Margin Symbol(MARKET_DATA) +Get All Isolated Margin Symbol (MARKET_DATA) -Get All Isolated Margin Symbol Weight: 10(IP) +Get All Isolated Margin Symbol Weight(IP): 10 Security Type: MARKET_DATA ### Example ```java @@ -162,8 +162,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | isolated margin pair - Long recvWindow = 56L; // Long | No more than 60000 + String symbol = "BNBBTC"; // String | + Long recvWindow = 5000L; // Long | try { GetAllIsolatedMarginSymbolResponse result = apiInstance.getAllIsolatedMarginSymbol(symbol, recvWindow); System.out.println(result); @@ -182,8 +182,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| isolated margin pair | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **symbol** | **String**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -209,7 +209,7 @@ No authorization required Get All Margin Assets (MARKET_DATA) -Get All Margin Assets. Weight: 1(IP) +Get All Margin Assets. Weight(IP): 1 Security Type: MARKET_DATA ### Example ```java @@ -226,7 +226,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String asset = "asset_example"; // String | + String asset = "USDC"; // String | try { GetAllMarginAssetsResponse result = apiInstance.getAllMarginAssets(asset); System.out.println(result); @@ -271,7 +271,7 @@ No authorization required Get Delist Schedule (MARKET_DATA) -Get tokens or symbols delist schedule for cross margin and isolated margin Weight: 100 +Get tokens or symbols delist schedule for cross margin and isolated margin Weight(IP): 100 Security Type: MARKET_DATA ### Example ```java @@ -288,7 +288,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - Long recvWindow = 56L; // Long | No more than 60000 + Long recvWindow = 5000L; // Long | try { GetDelistScheduleResponse result = apiInstance.getDelistSchedule(recvWindow); System.out.println(result); @@ -307,7 +307,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -331,9 +331,9 @@ No authorization required # **getLimitPricePairs** > GetLimitPricePairsResponse getLimitPricePairs() -Get Limit Price Pairs(MARKET_DATA) +Get Limit Price Pairs (MARKET_DATA) -Query trading pairs with restriction on limit price range. In margin trading, you can place orders with limit price. Limit price should be within (-15%, 15%) of current index price for a list of margin trading pairs. This rule only impacts limit sell orders with limit price that is lower than current index price and limit buy orders with limit price that is higher than current index price. - Buy order: Your order will be rejected with an error message notification if the limit price is 15% above the index price. - Sell order: Your order will be rejected with an error message notification if the limit price is 15% below the index price. Please review the limit price order placing strategy, backtest and calibrate the planned order size with the trading volume and order book depth to prevent trading loss. Weight: 1 +Query trading pairs with restriction on limit price range. In margin trading, you can place orders with limit price. Limit price should be within (-15%, 15%) of current index price for a list of margin trading pairs. This rule only impacts limit sell orders with limit price that is lower than current index price and limit buy orders with limit price that is higher than current index price. - Buy order: Your order will be rejected with an error message notification if the limit price is 15% above the index price. - Sell order: Your order will be rejected with an error message notification if the limit price is 15% below the index price. Please review the limit price order placing strategy, backtest and calibrate the planned order size with the trading volume and order book depth to prevent trading loss. Weight(IP): 1 Security Type: MARKET_DATA ### Example ```java @@ -391,7 +391,7 @@ No authorization required Get list Schedule (MARKET_DATA) -Get the upcoming tokens or symbols listing schedule for Cross Margin and Isolated Margin. Weight: 100 +Get the upcoming tokens or symbols listing schedule for Cross Margin and Isolated Margin. Weight(IP): 100 Security Type: MARKET_DATA ### Example ```java @@ -408,7 +408,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - Long recvWindow = 56L; // Long | No more than 60000 + Long recvWindow = 5000L; // Long | try { GetListScheduleResponse result = apiInstance.getListSchedule(recvWindow); System.out.println(result); @@ -427,7 +427,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -453,7 +453,7 @@ No authorization required Get Margin Asset Risk-Based Liquidation Ratio (MARKET_DATA) -Get Margin Asset Risk-Based Liquidation Ratio Weight: 1 +Get Margin Asset Risk-Based Liquidation Ratio Weight(IP): 1 Security Type: MARKET_DATA ### Example ```java @@ -511,7 +511,7 @@ No authorization required Get Margin Restricted Assets (MARKET_DATA) -Get Margin Restricted Assets Weight: 1 +Get the list of margin-restricted assets. Weight(IP): 1 Security Type: MARKET_DATA ### Example ```java @@ -569,7 +569,7 @@ No authorization required Query Isolated Margin Tier Data (USER_DATA) -Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data Weight: 1(IP) +Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -586,9 +586,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | - Long tier = 56L; // Long | All margin tier data will be returned if tier is omitted - Long recvWindow = 56L; // Long | No more than 60000 + String symbol = "BTCUSDT"; // String | + Long tier = 1L; // Long | + Long recvWindow = 5000L; // Long | try { QueryIsolatedMarginTierDataResponse result = apiInstance.queryIsolatedMarginTierData(symbol, tier, recvWindow); System.out.println(result); @@ -608,8 +608,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **symbol** | **String**| | | -| **tier** | **Long**| All margin tier data will be returned if tier is omitted | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **tier** | **Long**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -633,9 +633,9 @@ No authorization required # **queryLiabilityCoinLeverageBracketInCrossMarginProMode** > QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse queryLiabilityCoinLeverageBracketInCrossMarginProMode() -Query Liability Coin Leverage Bracket in Cross Margin Pro Mode(MARKET_DATA) +Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) -Liability Coin Leverage Bracket in Cross Margin Pro Mode Weight: 1 +Liability Coin Leverage Bracket in Cross Margin Pro Mode Weight(IP): 1 Security Type: MARKET_DATA ### Example ```java @@ -691,9 +691,9 @@ No authorization required # **queryMarginAvailableInventory** > QueryMarginAvailableInventoryResponse queryMarginAvailableInventory(type) -Query Margin Available Inventory(USER_DATA) +Query Margin Available Inventory (USER_DATA) -Margin available Inventory query Weight: 50 +Margin available Inventory query Weight(UID): 50 Security Type: USER_DATA ### Example ```java @@ -710,7 +710,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String type = "type_example"; // String | MARGIN,ISOLATED + OrderType type = OrderType.fromValue("ROLL_IN"); // OrderType | try { QueryMarginAvailableInventoryResponse result = apiInstance.queryMarginAvailableInventory(type); System.out.println(result); @@ -729,7 +729,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **type** | **String**| MARGIN,ISOLATED | | +| **type** | [**OrderType**](.md)| | [enum: ROLL_IN, ROLL_OUT] | ### Return type @@ -755,7 +755,7 @@ No authorization required Query Margin PriceIndex (MARKET_DATA) -Query Margin PriceIndex Weight: 10(IP) +Query Margin PriceIndex Weight(IP): 10 Security Type: MARKET_DATA ### Example ```java @@ -772,7 +772,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String symbol = "symbol_example"; // String | + String symbol = "BNBBTC"; // String | try { QueryMarginPriceindexResponse result = apiInstance.queryMarginPriceindex(symbol); System.out.println(result); diff --git a/clients/margin-trading/docs/OrderType.md b/clients/margin-trading/docs/OrderType.md new file mode 100644 index 000000000..79117ae9f --- /dev/null +++ b/clients/margin-trading/docs/OrderType.md @@ -0,0 +1,13 @@ + + +# OrderType + +## Enum + + +* `ROLL_IN` (value: `"ROLL_IN"`) + +* `ROLL_OUT` (value: `"ROLL_OUT"`) + + + diff --git a/clients/margin-trading/docs/Outboundaccountposition.md b/clients/margin-trading/docs/Outboundaccountposition.md index 66c9d064a..c55dec52d 100644 --- a/clients/margin-trading/docs/Outboundaccountposition.md +++ b/clients/margin-trading/docs/Outboundaccountposition.md @@ -1,15 +1,15 @@ -# Outboundaccountposition +# OutboundAccountPosition ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**B** | [**List<OutboundaccountpositionBInner>**](OutboundaccountpositionBInner.md) | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**uLowerCase** | **Long** | Time of last account update | [optional] | +|**B** | [**List<OutboundAccountPositionBInner>**](OutboundAccountPositionBInner.md) | Balances Array | [optional] | diff --git a/clients/margin-trading/docs/OutboundaccountpositionBInner.md b/clients/margin-trading/docs/OutboundaccountpositionBInner.md index 3b50c0156..da7839b0d 100644 --- a/clients/margin-trading/docs/OutboundaccountpositionBInner.md +++ b/clients/margin-trading/docs/OutboundaccountpositionBInner.md @@ -1,15 +1,15 @@ -# OutboundaccountpositionBInner +# OutboundAccountPositionBInner ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**aLowerCase** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | +|**aLowerCase** | **String** | Asset | [optional] | +|**fLowerCase** | **String** | Free | [optional] | +|**lLowerCase** | **String** | Locked | [optional] | diff --git a/clients/margin-trading/docs/PendingAboveTimeInForce.md b/clients/margin-trading/docs/PendingAboveTimeInForce.md new file mode 100644 index 000000000..75bd17610 --- /dev/null +++ b/clients/margin-trading/docs/PendingAboveTimeInForce.md @@ -0,0 +1,15 @@ + + +# PendingAboveTimeInForce + +## Enum + + +* `GTC` (value: `"GTC"`) + +* `IOC` (value: `"IOC"`) + +* `FOK` (value: `"FOK"`) + + + diff --git a/clients/margin-trading/docs/PendingAboveType.md b/clients/margin-trading/docs/PendingAboveType.md new file mode 100644 index 000000000..e247d1c3c --- /dev/null +++ b/clients/margin-trading/docs/PendingAboveType.md @@ -0,0 +1,15 @@ + + +# PendingAboveType + +## Enum + + +* `LIMIT_MAKER` (value: `"LIMIT_MAKER"`) + +* `STOP_LOSS` (value: `"STOP_LOSS"`) + +* `STOP_LOSS_LIMIT` (value: `"STOP_LOSS_LIMIT"`) + + + diff --git a/clients/margin-trading/docs/PendingBelowTimeInForce.md b/clients/margin-trading/docs/PendingBelowTimeInForce.md new file mode 100644 index 000000000..821c60b8a --- /dev/null +++ b/clients/margin-trading/docs/PendingBelowTimeInForce.md @@ -0,0 +1,15 @@ + + +# PendingBelowTimeInForce + +## Enum + + +* `GTC` (value: `"GTC"`) + +* `IOC` (value: `"IOC"`) + +* `FOK` (value: `"FOK"`) + + + diff --git a/clients/margin-trading/docs/PendingBelowType.md b/clients/margin-trading/docs/PendingBelowType.md new file mode 100644 index 000000000..8887865de --- /dev/null +++ b/clients/margin-trading/docs/PendingBelowType.md @@ -0,0 +1,15 @@ + + +# PendingBelowType + +## Enum + + +* `LIMIT_MAKER` (value: `"LIMIT_MAKER"`) + +* `STOP_LOSS` (value: `"STOP_LOSS"`) + +* `STOP_LOSS_LIMIT` (value: `"STOP_LOSS_LIMIT"`) + + + diff --git a/clients/margin-trading/docs/PendingSide.md b/clients/margin-trading/docs/PendingSide.md new file mode 100644 index 000000000..a02d4c34d --- /dev/null +++ b/clients/margin-trading/docs/PendingSide.md @@ -0,0 +1,13 @@ + + +# PendingSide + +## Enum + + +* `BUY` (value: `"BUY"`) + +* `SELL` (value: `"SELL"`) + + + diff --git a/clients/margin-trading/docs/PendingTimeInForce.md b/clients/margin-trading/docs/PendingTimeInForce.md new file mode 100644 index 000000000..4f45696e1 --- /dev/null +++ b/clients/margin-trading/docs/PendingTimeInForce.md @@ -0,0 +1,15 @@ + + +# PendingTimeInForce + +## Enum + + +* `GTC` (value: `"GTC"`) + +* `IOC` (value: `"IOC"`) + +* `FOK` (value: `"FOK"`) + + + diff --git a/clients/margin-trading/docs/PendingType.md b/clients/margin-trading/docs/PendingType.md new file mode 100644 index 000000000..1a62ee895 --- /dev/null +++ b/clients/margin-trading/docs/PendingType.md @@ -0,0 +1,23 @@ + + +# PendingType + +## Enum + + +* `LIMIT` (value: `"LIMIT"`) + +* `MARKET` (value: `"MARKET"`) + +* `STOP_LOSS` (value: `"STOP_LOSS"`) + +* `STOP_LOSS_LIMIT` (value: `"STOP_LOSS_LIMIT"`) + +* `TAKE_PROFIT` (value: `"TAKE_PROFIT"`) + +* `TAKE_PROFIT_LIMIT` (value: `"TAKE_PROFIT_LIMIT"`) + +* `LIMIT_MAKER` (value: `"LIMIT_MAKER"`) + + + diff --git a/clients/margin-trading/docs/PermissionMode.md b/clients/margin-trading/docs/PermissionMode.md new file mode 100644 index 000000000..982787887 --- /dev/null +++ b/clients/margin-trading/docs/PermissionMode.md @@ -0,0 +1,13 @@ + + +# PermissionMode + +## Enum + + +* `TRADE` (value: `"TRADE"`) + +* `READ` (value: `"READ"`) + + + diff --git a/clients/margin-trading/docs/QueryBorrowRepayRecordsInMarginAccountResponse.md b/clients/margin-trading/docs/QueryBorrowRepayRecordsInMarginAccountResponse.md index fbe5a90c1..6e8dd78d8 100644 --- a/clients/margin-trading/docs/QueryBorrowRepayRecordsInMarginAccountResponse.md +++ b/clients/margin-trading/docs/QueryBorrowRepayRecordsInMarginAccountResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**rows** | [**List<QueryBorrowRepayRecordsInMarginAccountResponseRowsInner>**](QueryBorrowRepayRecordsInMarginAccountResponseRowsInner.md) | | [optional] | -|**total** | **Long** | | [optional] | +|**rows** | [**List<QueryBorrowRepayRecordsInMarginAccountResponseRowsInner>**](QueryBorrowRepayRecordsInMarginAccountResponseRowsInner.md) | rows list. | [optional] | +|**total** | **Long** | total. | [optional] | diff --git a/clients/margin-trading/docs/QueryBorrowRepayRecordsInMarginAccountResponseRowsInner.md b/clients/margin-trading/docs/QueryBorrowRepayRecordsInMarginAccountResponseRowsInner.md index 51f57acd7..8809aaf48 100644 --- a/clients/margin-trading/docs/QueryBorrowRepayRecordsInMarginAccountResponseRowsInner.md +++ b/clients/margin-trading/docs/QueryBorrowRepayRecordsInMarginAccountResponseRowsInner.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**type** | **String** | | [optional] | -|**isolatedSymbol** | **String** | | [optional] | -|**amount** | **String** | | [optional] | -|**asset** | **String** | | [optional] | -|**interest** | **String** | | [optional] | -|**principal** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timestamp** | **Long** | | [optional] | -|**txId** | **Long** | | [optional] | +|**type** | **String** | AUTO,MANUAL for Cross Margin Borrow; MANUAL,AUTO,BNB_AUTO_REPAY,POINT_AUTO_REPAY for Cross Margin Repay; AUTO,MANUAL for Isolated Margin Borrow/Repay; | [optional] | +|**isolatedSymbol** | **String** | isolated symbol, will not be returned for crossed margin | [optional] | +|**amount** | **String** | Total amount borrowed/repaid | [optional] | +|**asset** | **String** | asset. | [optional] | +|**interest** | **String** | Interest repaid | [optional] | +|**principal** | **String** | Principal repaid | [optional] | +|**status** | **String** | one of PENDING (pending execution), CONFIRMED (successfully execution), FAILED (execution failed, nothing happened to your account); | [optional] | +|**timestamp** | **Long** | timestamp. | [optional] | +|**txId** | **Long** | tx Id. | [optional] | diff --git a/clients/margin-trading/docs/QueryCrossIsolatedMarginCapitalFlowResponseInner.md b/clients/margin-trading/docs/QueryCrossIsolatedMarginCapitalFlowResponseInner.md index b7398f8d9..ed0082a9e 100644 --- a/clients/margin-trading/docs/QueryCrossIsolatedMarginCapitalFlowResponseInner.md +++ b/clients/margin-trading/docs/QueryCrossIsolatedMarginCapitalFlowResponseInner.md @@ -7,13 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**tranId** | **Long** | | [optional] | -|**timestamp** | **Long** | | [optional] | -|**asset** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**amount** | **String** | | [optional] | +|**id** | **Long** | id. | [optional] | +|**tranId** | **Long** | tran Id. | [optional] | +|**timestamp** | **Long** | timestamp. | [optional] | +|**asset** | **String** | asset. | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**type** | **String** | type. | [optional] | +|**amount** | **String** | amount. | [optional] | +|**note** | **String** | note. | [optional] | diff --git a/clients/margin-trading/docs/QueryCrossMarginAccountDetailsResponse.md b/clients/margin-trading/docs/QueryCrossMarginAccountDetailsResponse.md index 80cf3154b..0ceb72dfa 100644 --- a/clients/margin-trading/docs/QueryCrossMarginAccountDetailsResponse.md +++ b/clients/margin-trading/docs/QueryCrossMarginAccountDetailsResponse.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**created** | **Boolean** | | [optional] | -|**borrowEnabled** | **Boolean** | | [optional] | -|**marginLevel** | **String** | | [optional] | -|**collateralMarginLevel** | **String** | | [optional] | -|**totalAssetOfBtc** | **String** | | [optional] | -|**totalLiabilityOfBtc** | **String** | | [optional] | -|**totalNetAssetOfBtc** | **String** | | [optional] | -|**totalCollateralValueInUSDT** | **String** | | [optional] | -|**totalOpenOrderLossInUSDT** | **String** | | [optional] | -|**tradeEnabled** | **Boolean** | | [optional] | -|**transferInEnabled** | **Boolean** | | [optional] | -|**transferOutEnabled** | **Boolean** | | [optional] | -|**accountType** | **String** | | [optional] | -|**userAssets** | [**List<QueryCrossMarginAccountDetailsResponseUserAssetsInner>**](QueryCrossMarginAccountDetailsResponseUserAssetsInner.md) | | [optional] | +|**created** | **Boolean** | True means margin account created , false means margin account not created. | [optional] | +|**borrowEnabled** | **Boolean** | borrow Enabled. | [optional] | +|**marginLevel** | **String** | margin Level. | [optional] | +|**collateralMarginLevel** | **String** | collateral Margin Level. | [optional] | +|**totalAssetOfBtc** | **String** | total Asset Of Btc. | [optional] | +|**totalLiabilityOfBtc** | **String** | total Liability Of Btc. | [optional] | +|**totalNetAssetOfBtc** | **String** | total Net Asset Of Btc. | [optional] | +|**totalCollateralValueInUSDT** | **String** | Total Collateral Value In USDT. | [optional] | +|**totalOpenOrderLossInUSDT** | **String** | total Open Order Loss In USDT. | [optional] | +|**tradeEnabled** | **Boolean** | trade Enabled. | [optional] | +|**transferInEnabled** | **Boolean** | transfer In Enabled. | [optional] | +|**transferOutEnabled** | **Boolean** | transfer Out Enabled. | [optional] | +|**accountType** | **String** | // MARGIN_1 for Cross Margin Classic, MARGIN_2 for Cross Margin Pro | [optional] | +|**userAssets** | [**List<QueryCrossMarginAccountDetailsResponseUserAssetsInner>**](QueryCrossMarginAccountDetailsResponseUserAssetsInner.md) | user Assets list. | [optional] | diff --git a/clients/margin-trading/docs/QueryCrossMarginAccountDetailsResponseUserAssetsInner.md b/clients/margin-trading/docs/QueryCrossMarginAccountDetailsResponseUserAssetsInner.md index 2f0782b67..e1e1da1da 100644 --- a/clients/margin-trading/docs/QueryCrossMarginAccountDetailsResponseUserAssetsInner.md +++ b/clients/margin-trading/docs/QueryCrossMarginAccountDetailsResponseUserAssetsInner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**borrowed** | **String** | | [optional] | -|**free** | **String** | | [optional] | -|**interest** | **String** | | [optional] | -|**locked** | **String** | | [optional] | -|**netAsset** | **String** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**borrowed** | **String** | borrowed. | [optional] | +|**free** | **String** | free. | [optional] | +|**interest** | **String** | interest. | [optional] | +|**locked** | **String** | locked. | [optional] | +|**netAsset** | **String** | net Asset. | [optional] | diff --git a/clients/margin-trading/docs/QueryCrossMarginFeeDataResponseInner.md b/clients/margin-trading/docs/QueryCrossMarginFeeDataResponseInner.md index 3765d1f34..79aeae8d4 100644 --- a/clients/margin-trading/docs/QueryCrossMarginFeeDataResponseInner.md +++ b/clients/margin-trading/docs/QueryCrossMarginFeeDataResponseInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**vipLevel** | **Long** | | [optional] | -|**coin** | **String** | | [optional] | -|**transferIn** | **Boolean** | | [optional] | -|**borrowable** | **Boolean** | | [optional] | -|**dailyInterest** | **String** | | [optional] | -|**yearlyInterest** | **String** | | [optional] | -|**borrowLimit** | **String** | | [optional] | -|**marginablePairs** | **List<String>** | | [optional] | +|**vipLevel** | **Long** | vip Level. | [optional] | +|**coin** | **String** | coin. | [optional] | +|**transferIn** | **Boolean** | transfer In. | [optional] | +|**borrowable** | **Boolean** | borrowable. | [optional] | +|**dailyInterest** | **String** | daily Interest. | [optional] | +|**yearlyInterest** | **String** | yearly Interest. | [optional] | +|**borrowLimit** | **String** | borrow Limit. | [optional] | +|**marginablePairs** | **List<String>** | marginable Pairs list. | [optional] | diff --git a/clients/margin-trading/docs/QueryCurrentMarginOrderCountUsageResponseInner.md b/clients/margin-trading/docs/QueryCurrentMarginOrderCountUsageResponseInner.md index ee7069a45..24913830d 100644 --- a/clients/margin-trading/docs/QueryCurrentMarginOrderCountUsageResponseInner.md +++ b/clients/margin-trading/docs/QueryCurrentMarginOrderCountUsageResponseInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**rateLimitType** | **String** | | [optional] | -|**interval** | **String** | | [optional] | -|**intervalNum** | **Long** | | [optional] | -|**limit** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**rateLimitType** | **String** | rate Limit Type. | [optional] | +|**interval** | **String** | interval. | [optional] | +|**intervalNum** | **Long** | interval Num. | [optional] | +|**limit** | **Long** | limit. | [optional] | +|**count** | **Long** | count. | [optional] | diff --git a/clients/margin-trading/docs/QueryEnabledIsolatedMarginAccountLimitResponse.md b/clients/margin-trading/docs/QueryEnabledIsolatedMarginAccountLimitResponse.md index e1e5d6ca7..ec4687e98 100644 --- a/clients/margin-trading/docs/QueryEnabledIsolatedMarginAccountLimitResponse.md +++ b/clients/margin-trading/docs/QueryEnabledIsolatedMarginAccountLimitResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**enabledAccount** | **Long** | | [optional] | -|**maxAccount** | **Long** | | [optional] | +|**enabledAccount** | **Long** | enabled Account. | [optional] | +|**maxAccount** | **Long** | max Account. | [optional] | diff --git a/clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponse.md b/clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponse.md index 31d46fb73..d407285a7 100644 --- a/clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponse.md +++ b/clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**assets** | [**List<QueryIsolatedMarginAccountInfoResponseAssetsInner>**](QueryIsolatedMarginAccountInfoResponseAssetsInner.md) | | [optional] | -|**totalAssetOfBtc** | **String** | | [optional] | -|**totalLiabilityOfBtc** | **String** | | [optional] | -|**totalNetAssetOfBtc** | **String** | | [optional] | +|**assets** | [**List<QueryIsolatedMarginAccountInfoResponseAssetsInner>**](QueryIsolatedMarginAccountInfoResponseAssetsInner.md) | assets list. | [optional] | +|**totalAssetOfBtc** | **String** | total Asset Of Btc. | [optional] | +|**totalLiabilityOfBtc** | **String** | total Liability Of Btc. | [optional] | +|**totalNetAssetOfBtc** | **String** | total Net Asset Of Btc. | [optional] | diff --git a/clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponseAssetsInner.md b/clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponseAssetsInner.md index abf4fa70c..a1ae5ec75 100644 --- a/clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponseAssetsInner.md +++ b/clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponseAssetsInner.md @@ -9,16 +9,16 @@ |------------ | ------------- | ------------- | -------------| |**baseAsset** | [**QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset**](QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset.md) | | [optional] | |**quoteAsset** | [**QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset**](QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset.md) | | [optional] | -|**symbol** | **String** | | [optional] | -|**isolatedCreated** | **Boolean** | | [optional] | -|**enabled** | **Boolean** | | [optional] | -|**marginLevel** | **String** | | [optional] | -|**marginLevelStatus** | **String** | | [optional] | -|**marginRatio** | **String** | | [optional] | -|**indexPrice** | **String** | | [optional] | -|**liquidatePrice** | **String** | | [optional] | -|**liquidateRate** | **String** | | [optional] | -|**tradeEnabled** | **Boolean** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**isolatedCreated** | **Boolean** | isolated Created. | [optional] | +|**enabled** | **Boolean** | true-enabled, false-disabled | [optional] | +|**marginLevel** | **String** | margin Level. | [optional] | +|**marginLevelStatus** | **String** | \"EXCESSIVE\", \"NORMAL\", \"MARGIN_CALL\", \"PRE_LIQUIDATION\", \"FORCE_LIQUIDATION\" | [optional] | +|**marginRatio** | **String** | margin Ratio. | [optional] | +|**indexPrice** | **String** | index Price. | [optional] | +|**liquidatePrice** | **String** | liquidate Price. | [optional] | +|**liquidateRate** | **String** | liquidate Rate. | [optional] | +|**tradeEnabled** | **Boolean** | trade Enabled. | [optional] | diff --git a/clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset.md b/clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset.md index b073eab42..66d035b73 100644 --- a/clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset.md +++ b/clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset.md @@ -2,21 +2,22 @@ # QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset +base Asset object. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**borrowEnabled** | **Boolean** | | [optional] | -|**borrowed** | **String** | | [optional] | -|**free** | **String** | | [optional] | -|**interest** | **String** | | [optional] | -|**locked** | **String** | | [optional] | -|**netAsset** | **String** | | [optional] | -|**netAssetOfBtc** | **String** | | [optional] | -|**repayEnabled** | **Boolean** | | [optional] | -|**totalAsset** | **String** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**borrowEnabled** | **Boolean** | borrow Enabled. | [optional] | +|**borrowed** | **String** | borrowed. | [optional] | +|**free** | **String** | free. | [optional] | +|**interest** | **String** | interest. | [optional] | +|**locked** | **String** | locked. | [optional] | +|**netAsset** | **String** | net Asset. | [optional] | +|**netAssetOfBtc** | **String** | net Asset Of Btc. | [optional] | +|**repayEnabled** | **Boolean** | repay Enabled. | [optional] | +|**totalAsset** | **String** | total Asset. | [optional] | diff --git a/clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset.md b/clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset.md index 27da526a8..bc6578e10 100644 --- a/clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset.md +++ b/clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset.md @@ -2,21 +2,22 @@ # QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset +quote Asset object. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**borrowEnabled** | **Boolean** | | [optional] | -|**borrowed** | **String** | | [optional] | -|**free** | **String** | | [optional] | -|**interest** | **String** | | [optional] | -|**locked** | **String** | | [optional] | -|**netAsset** | **String** | | [optional] | -|**netAssetOfBtc** | **String** | | [optional] | -|**repayEnabled** | **Boolean** | | [optional] | -|**totalAsset** | **String** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**borrowEnabled** | **Boolean** | borrow Enabled. | [optional] | +|**borrowed** | **String** | borrowed. | [optional] | +|**free** | **String** | free. | [optional] | +|**interest** | **String** | interest. | [optional] | +|**locked** | **String** | locked. | [optional] | +|**netAsset** | **String** | net Asset. | [optional] | +|**netAssetOfBtc** | **String** | net Asset Of Btc. | [optional] | +|**repayEnabled** | **Boolean** | repay Enabled. | [optional] | +|**totalAsset** | **String** | total Asset. | [optional] | diff --git a/clients/margin-trading/docs/QueryIsolatedMarginFeeDataResponseInner.md b/clients/margin-trading/docs/QueryIsolatedMarginFeeDataResponseInner.md index 3defc97d4..035dc9017 100644 --- a/clients/margin-trading/docs/QueryIsolatedMarginFeeDataResponseInner.md +++ b/clients/margin-trading/docs/QueryIsolatedMarginFeeDataResponseInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**vipLevel** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**leverage** | **String** | | [optional] | -|**data** | [**List<QueryIsolatedMarginFeeDataResponseInnerDataInner>**](QueryIsolatedMarginFeeDataResponseInnerDataInner.md) | | [optional] | +|**vipLevel** | **Long** | vip Level. | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**leverage** | **String** | leverage. | [optional] | +|**data** | [**List<QueryIsolatedMarginFeeDataResponseInnerDataInner>**](QueryIsolatedMarginFeeDataResponseInnerDataInner.md) | data list. | [optional] | diff --git a/clients/margin-trading/docs/QueryIsolatedMarginFeeDataResponseInnerDataInner.md b/clients/margin-trading/docs/QueryIsolatedMarginFeeDataResponseInnerDataInner.md index e85da7889..d26fcd1b5 100644 --- a/clients/margin-trading/docs/QueryIsolatedMarginFeeDataResponseInnerDataInner.md +++ b/clients/margin-trading/docs/QueryIsolatedMarginFeeDataResponseInnerDataInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**coin** | **String** | | [optional] | -|**dailyInterest** | **String** | | [optional] | -|**borrowLimit** | **String** | | [optional] | +|**coin** | **String** | coin. | [optional] | +|**dailyInterest** | **String** | daily Interest. | [optional] | +|**borrowLimit** | **String** | borrow Limit. | [optional] | diff --git a/clients/margin-trading/docs/QueryIsolatedMarginTierDataResponseInner.md b/clients/margin-trading/docs/QueryIsolatedMarginTierDataResponseInner.md index 35090db3f..600ec8bc0 100644 --- a/clients/margin-trading/docs/QueryIsolatedMarginTierDataResponseInner.md +++ b/clients/margin-trading/docs/QueryIsolatedMarginTierDataResponseInner.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**tier** | **Long** | | [optional] | -|**effectiveMultiple** | **String** | | [optional] | -|**initialRiskRatio** | **String** | | [optional] | -|**liquidationRiskRatio** | **String** | | [optional] | -|**baseAssetMaxBorrowable** | **String** | | [optional] | -|**quoteAssetMaxBorrowable** | **String** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**tier** | **Long** | tier. | [optional] | +|**effectiveMultiple** | **String** | effective Multiple. | [optional] | +|**initialRiskRatio** | **String** | initial Risk Ratio. | [optional] | +|**liquidationRiskRatio** | **String** | liquidation Risk Ratio. | [optional] | +|**baseAssetMaxBorrowable** | **String** | base Asset Max Borrowable. | [optional] | +|**quoteAssetMaxBorrowable** | **String** | quote Asset Max Borrowable. | [optional] | diff --git a/clients/margin-trading/docs/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInner.md b/clients/margin-trading/docs/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInner.md index 165c15a5d..b3756da09 100644 --- a/clients/margin-trading/docs/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInner.md +++ b/clients/margin-trading/docs/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**assetNames** | **List<String>** | | [optional] | -|**rank** | **Long** | | [optional] | -|**brackets** | [**List<QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner>**](QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner.md) | | [optional] | +|**assetNames** | **List<String>** | asset Names list. | [optional] | +|**rank** | **Long** | rank. | [optional] | +|**brackets** | [**List<QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner>**](QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner.md) | brackets list. | [optional] | diff --git a/clients/margin-trading/docs/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner.md b/clients/margin-trading/docs/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner.md index 4074424d4..f656be8b0 100644 --- a/clients/margin-trading/docs/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner.md +++ b/clients/margin-trading/docs/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**leverage** | **Long** | | [optional] | -|**maxDebt** | **Double** | | [optional] | -|**maintenanceMarginRate** | **Double** | | [optional] | -|**initialMarginRate** | **Double** | | [optional] | -|**fastNum** | **Double** | | [optional] | +|**leverage** | **Long** | leverage. | [optional] | +|**maxDebt** | **Double** | max Debt. | [optional] | +|**maintenanceMarginRate** | **Double** | maintenance Margin Rate. | [optional] | +|**initialMarginRate** | **Double** | initial Margin Rate. | [optional] | +|**fastNum** | **Double** | fast Num. | [optional] | diff --git a/clients/margin-trading/docs/QueryLiquidationLoanRepayHistoryResponse.md b/clients/margin-trading/docs/QueryLiquidationLoanRepayHistoryResponse.md new file mode 100644 index 000000000..a008f87e8 --- /dev/null +++ b/clients/margin-trading/docs/QueryLiquidationLoanRepayHistoryResponse.md @@ -0,0 +1,14 @@ + + +# QueryLiquidationLoanRepayHistoryResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**total** | **Long** | Total number of repayment records | [optional] | +|**rows** | [**List<QueryLiquidationLoanRepayHistoryResponseRowsInner>**](QueryLiquidationLoanRepayHistoryResponseRowsInner.md) | | [optional] | + + + diff --git a/clients/margin-trading/docs/QueryLiquidationLoanRepayHistoryResponseRowsInner.md b/clients/margin-trading/docs/QueryLiquidationLoanRepayHistoryResponseRowsInner.md new file mode 100644 index 000000000..626c493c0 --- /dev/null +++ b/clients/margin-trading/docs/QueryLiquidationLoanRepayHistoryResponseRowsInner.md @@ -0,0 +1,17 @@ + + +# QueryLiquidationLoanRepayHistoryResponseRowsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**repayId** | **Long** | Unique identifier for the repayment transaction | [optional] | +|**asset** | **String** | Asset used for repayment | [optional] | +|**amount** | **String** | The repayment amount | [optional] | +|**status** | **String** | Repayment status: `SUCCESS` (completed) or `PENDING` (processing) | [optional] | +|**createTime** | **Long** | Unix timestamp (milliseconds) when the repayment was created | [optional] | + + + diff --git a/clients/margin-trading/docs/QueryLiquidationLoanResponse.md b/clients/margin-trading/docs/QueryLiquidationLoanResponse.md new file mode 100644 index 000000000..542175bf0 --- /dev/null +++ b/clients/margin-trading/docs/QueryLiquidationLoanResponse.md @@ -0,0 +1,16 @@ + + +# QueryLiquidationLoanResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**asset** | **String** | The asset of the liquidation loan (USDC by default) | [optional] | +|**amount** | **String** | Total liquidation loan amount | [optional] | +|**repaidAmount** | **String** | Amount that has been repaid | [optional] | +|**remainingAmount** | **String** | Outstanding amount remaining to be repaid | [optional] | + + + diff --git a/clients/margin-trading/docs/QueryMarginAccountsAllOcoResponseInner.md b/clients/margin-trading/docs/QueryMarginAccountsAllOcoResponseInner.md index a368b22b6..71c1403e3 100644 --- a/clients/margin-trading/docs/QueryMarginAccountsAllOcoResponseInner.md +++ b/clients/margin-trading/docs/QueryMarginAccountsAllOcoResponseInner.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderListId** | **Long** | | [optional] | -|**contingencyType** | **String** | | [optional] | -|**listStatusType** | **String** | | [optional] | -|**listOrderStatus** | **String** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | -|**transactionTime** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**isIsolated** | **Boolean** | | [optional] | -|**orders** | [**List<QueryMarginAccountsAllOcoResponseInnerOrdersInner>**](QueryMarginAccountsAllOcoResponseInnerOrdersInner.md) | | [optional] | +|**orderListId** | **Long** | order List Id. | [optional] | +|**contingencyType** | **String** | contingency Type. | [optional] | +|**listStatusType** | **String** | list Status Type. | [optional] | +|**listOrderStatus** | **String** | list Order Status. | [optional] | +|**listClientOrderId** | **String** | list Client Order Id. | [optional] | +|**transactionTime** | **Long** | transaction Time. | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**isIsolated** | **Boolean** | if isolated margin | [optional] | +|**orders** | [**List<QueryMarginAccountsAllOcoResponseInnerOrdersInner>**](QueryMarginAccountsAllOcoResponseInnerOrdersInner.md) | orders list. | [optional] | diff --git a/clients/margin-trading/docs/QueryMarginAccountsAllOcoResponseInnerOrdersInner.md b/clients/margin-trading/docs/QueryMarginAccountsAllOcoResponseInnerOrdersInner.md index 42ca034e6..14e9e7f5c 100644 --- a/clients/margin-trading/docs/QueryMarginAccountsAllOcoResponseInnerOrdersInner.md +++ b/clients/margin-trading/docs/QueryMarginAccountsAllOcoResponseInnerOrdersInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | diff --git a/clients/margin-trading/docs/QueryMarginAccountsAllOrdersResponseInner.md b/clients/margin-trading/docs/QueryMarginAccountsAllOrdersResponseInner.md index 0901aedf3..5026652ec 100644 --- a/clients/margin-trading/docs/QueryMarginAccountsAllOrdersResponseInner.md +++ b/clients/margin-trading/docs/QueryMarginAccountsAllOrdersResponseInner.md @@ -7,24 +7,24 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**clientOrderId** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**icebergQty** | **String** | | [optional] | -|**isWorking** | **Boolean** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**isIsolated** | **Boolean** | | [optional] | -|**time** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | +|**cummulativeQuoteQty** | **String** | cummulative Quote Qty. | [optional] | +|**executedQty** | **String** | executed Qty. | [optional] | +|**icebergQty** | **String** | iceberg Qty. | [optional] | +|**isWorking** | **Boolean** | is Working. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**origQty** | **String** | orig Qty. | [optional] | +|**price** | **String** | price. | [optional] | +|**side** | **String** | side. | [optional] | +|**status** | **String** | status. | [optional] | +|**stopPrice** | **String** | stop Price. | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**isIsolated** | **Boolean** | is Isolated. | [optional] | +|**time** | **Long** | time. | [optional] | +|**timeInForce** | **String** | time In Force. | [optional] | +|**type** | **String** | type. | [optional] | +|**selfTradePreventionMode** | **String** | self Trade Prevention Mode. | [optional] | +|**updateTime** | **Long** | update Time. | [optional] | diff --git a/clients/margin-trading/docs/QueryMarginAccountsOcoResponse.md b/clients/margin-trading/docs/QueryMarginAccountsOcoResponse.md index fbd0e9569..7161c5858 100644 --- a/clients/margin-trading/docs/QueryMarginAccountsOcoResponse.md +++ b/clients/margin-trading/docs/QueryMarginAccountsOcoResponse.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderListId** | **Long** | | [optional] | -|**contingencyType** | **String** | | [optional] | -|**listStatusType** | **String** | | [optional] | -|**listOrderStatus** | **String** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | -|**transactionTime** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**isIsolated** | **Boolean** | | [optional] | -|**orders** | [**List<QueryMarginAccountsOcoResponseOrdersInner>**](QueryMarginAccountsOcoResponseOrdersInner.md) | | [optional] | +|**orderListId** | **Long** | order List Id. | [optional] | +|**contingencyType** | **String** | contingency Type. | [optional] | +|**listStatusType** | **String** | list Status Type. | [optional] | +|**listOrderStatus** | **String** | list Order Status. | [optional] | +|**listClientOrderId** | **String** | list Client Order Id. | [optional] | +|**transactionTime** | **Long** | transaction Time. | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**isIsolated** | **Boolean** | if isolated margin | [optional] | +|**orders** | [**List<QueryMarginAccountsOcoResponseOrdersInner>**](QueryMarginAccountsOcoResponseOrdersInner.md) | orders list. | [optional] | diff --git a/clients/margin-trading/docs/QueryMarginAccountsOcoResponseOrdersInner.md b/clients/margin-trading/docs/QueryMarginAccountsOcoResponseOrdersInner.md index a46988d3b..4a2d1b550 100644 --- a/clients/margin-trading/docs/QueryMarginAccountsOcoResponseOrdersInner.md +++ b/clients/margin-trading/docs/QueryMarginAccountsOcoResponseOrdersInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | diff --git a/clients/margin-trading/docs/QueryMarginAccountsOpenOcoResponseInner.md b/clients/margin-trading/docs/QueryMarginAccountsOpenOcoResponseInner.md index ff220ae36..6865d9bde 100644 --- a/clients/margin-trading/docs/QueryMarginAccountsOpenOcoResponseInner.md +++ b/clients/margin-trading/docs/QueryMarginAccountsOpenOcoResponseInner.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderListId** | **Long** | | [optional] | -|**contingencyType** | **String** | | [optional] | -|**listStatusType** | **String** | | [optional] | -|**listOrderStatus** | **String** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | -|**transactionTime** | **Long** | | [optional] | -|**symbol** | **String** | | [optional] | -|**isIsolated** | **Boolean** | | [optional] | -|**orders** | [**List<QueryMarginAccountsOpenOcoResponseInnerOrdersInner>**](QueryMarginAccountsOpenOcoResponseInnerOrdersInner.md) | | [optional] | +|**orderListId** | **Long** | order List Id. | [optional] | +|**contingencyType** | **String** | contingency Type. | [optional] | +|**listStatusType** | **String** | list Status Type. | [optional] | +|**listOrderStatus** | **String** | list Order Status. | [optional] | +|**listClientOrderId** | **String** | list Client Order Id. | [optional] | +|**transactionTime** | **Long** | transaction Time. | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**isIsolated** | **Boolean** | if isolated margin | [optional] | +|**orders** | [**List<QueryMarginAccountsOpenOcoResponseInnerOrdersInner>**](QueryMarginAccountsOpenOcoResponseInnerOrdersInner.md) | orders list. | [optional] | diff --git a/clients/margin-trading/docs/QueryMarginAccountsOpenOcoResponseInnerOrdersInner.md b/clients/margin-trading/docs/QueryMarginAccountsOpenOcoResponseInnerOrdersInner.md index 662436d61..cfda6596c 100644 --- a/clients/margin-trading/docs/QueryMarginAccountsOpenOcoResponseInnerOrdersInner.md +++ b/clients/margin-trading/docs/QueryMarginAccountsOpenOcoResponseInnerOrdersInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | diff --git a/clients/margin-trading/docs/QueryMarginAccountsOpenOrdersResponseInner.md b/clients/margin-trading/docs/QueryMarginAccountsOpenOrdersResponseInner.md index 9ff377d56..63f6090d0 100644 --- a/clients/margin-trading/docs/QueryMarginAccountsOpenOrdersResponseInner.md +++ b/clients/margin-trading/docs/QueryMarginAccountsOpenOrdersResponseInner.md @@ -7,24 +7,24 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**clientOrderId** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**icebergQty** | **String** | | [optional] | -|**isWorking** | **Boolean** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**isIsolated** | **Boolean** | | [optional] | -|**time** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | +|**cummulativeQuoteQty** | **String** | cummulative Quote Qty. | [optional] | +|**executedQty** | **String** | executed Qty. | [optional] | +|**icebergQty** | **String** | iceberg Qty. | [optional] | +|**isWorking** | **Boolean** | is Working. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**origQty** | **String** | orig Qty. | [optional] | +|**price** | **String** | price. | [optional] | +|**side** | **String** | side. | [optional] | +|**status** | **String** | status. | [optional] | +|**stopPrice** | **String** | stop Price. | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**isIsolated** | **Boolean** | is Isolated. | [optional] | +|**time** | **Long** | time. | [optional] | +|**timeInForce** | **String** | time In Force. | [optional] | +|**type** | **String** | type. | [optional] | +|**selfTradePreventionMode** | **String** | self Trade Prevention Mode. | [optional] | +|**updateTime** | **Long** | update Time. | [optional] | diff --git a/clients/margin-trading/docs/QueryMarginAccountsOrderResponse.md b/clients/margin-trading/docs/QueryMarginAccountsOrderResponse.md index f7c309add..a42b03bc8 100644 --- a/clients/margin-trading/docs/QueryMarginAccountsOrderResponse.md +++ b/clients/margin-trading/docs/QueryMarginAccountsOrderResponse.md @@ -7,24 +7,24 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**clientOrderId** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**icebergQty** | **String** | | [optional] | -|**isWorking** | **Boolean** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**origQty** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**isIsolated** | **Boolean** | | [optional] | -|**time** | **Long** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | +|**cummulativeQuoteQty** | **String** | cummulative Quote Qty. | [optional] | +|**executedQty** | **String** | executed Qty. | [optional] | +|**icebergQty** | **String** | iceberg Qty. | [optional] | +|**isWorking** | **Boolean** | is Working. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**origQty** | **String** | orig Qty. | [optional] | +|**price** | **String** | price. | [optional] | +|**side** | **String** | side. | [optional] | +|**status** | **String** | status. | [optional] | +|**stopPrice** | **String** | stop Price. | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**isIsolated** | **Boolean** | is Isolated. | [optional] | +|**time** | **Long** | time. | [optional] | +|**timeInForce** | **String** | time In Force. | [optional] | +|**type** | **String** | type. | [optional] | +|**selfTradePreventionMode** | **String** | self Trade Prevention Mode. | [optional] | +|**updateTime** | **Long** | update Time. | [optional] | diff --git a/clients/margin-trading/docs/QueryMarginAccountsTradeListResponseInner.md b/clients/margin-trading/docs/QueryMarginAccountsTradeListResponseInner.md index 81654c6d5..a34502946 100644 --- a/clients/margin-trading/docs/QueryMarginAccountsTradeListResponseInner.md +++ b/clients/margin-trading/docs/QueryMarginAccountsTradeListResponseInner.md @@ -7,18 +7,18 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**commission** | **String** | | [optional] | -|**commissionAsset** | **String** | | [optional] | -|**id** | **Long** | | [optional] | -|**isBestMatch** | **Boolean** | | [optional] | -|**isBuyer** | **Boolean** | | [optional] | -|**isMaker** | **Boolean** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**qty** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**isIsolated** | **Boolean** | | [optional] | -|**time** | **Long** | | [optional] | +|**commission** | **String** | commission. | [optional] | +|**commissionAsset** | **String** | commission Asset. | [optional] | +|**id** | **Long** | id. | [optional] | +|**isBestMatch** | **Boolean** | is Best Match. | [optional] | +|**isBuyer** | **Boolean** | is Buyer. | [optional] | +|**isMaker** | **Boolean** | is Maker. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**price** | **String** | price. | [optional] | +|**qty** | **String** | qty. | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**isIsolated** | **Boolean** | is Isolated. | [optional] | +|**time** | **Long** | time. | [optional] | diff --git a/clients/margin-trading/docs/QueryMarginAvailableInventoryResponse.md b/clients/margin-trading/docs/QueryMarginAvailableInventoryResponse.md index de3e86d06..5bdf2c669 100644 --- a/clients/margin-trading/docs/QueryMarginAvailableInventoryResponse.md +++ b/clients/margin-trading/docs/QueryMarginAvailableInventoryResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**assets** | [**QueryMarginAvailableInventoryResponseAssets**](QueryMarginAvailableInventoryResponseAssets.md) | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**assets** | **Map<String, String>** | Available inventory per asset. Keys are asset symbols, values are available amounts. | [optional] | +|**updateTime** | **Long** | update Time. | [optional] | diff --git a/clients/margin-trading/docs/QueryMarginAvailableInventoryResponseAssets.md b/clients/margin-trading/docs/QueryMarginAvailableInventoryResponseAssets.md deleted file mode 100644 index 0893eb8dd..000000000 --- a/clients/margin-trading/docs/QueryMarginAvailableInventoryResponseAssets.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# QueryMarginAvailableInventoryResponseAssets - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**MATIC** | **String** | | [optional] | -|**STPT** | **String** | | [optional] | -|**TVK** | **String** | | [optional] | -|**SHIB** | **String** | | [optional] | - - - diff --git a/clients/margin-trading/docs/QueryMarginInterestRateHistoryResponseInner.md b/clients/margin-trading/docs/QueryMarginInterestRateHistoryResponseInner.md index 947d710ac..bf7dbb07d 100644 --- a/clients/margin-trading/docs/QueryMarginInterestRateHistoryResponseInner.md +++ b/clients/margin-trading/docs/QueryMarginInterestRateHistoryResponseInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**dailyInterestRate** | **String** | | [optional] | -|**timestamp** | **Long** | | [optional] | -|**vipLevel** | **Long** | | [optional] | +|**asset** | **String** | asset. | [optional] | +|**dailyInterestRate** | **String** | daily Interest Rate. | [optional] | +|**timestamp** | **Long** | timestamp. | [optional] | +|**vipLevel** | **Long** | vip Level. | [optional] | diff --git a/clients/margin-trading/docs/QueryMarginPriceindexResponse.md b/clients/margin-trading/docs/QueryMarginPriceindexResponse.md index e51b307e6..7ddd09783 100644 --- a/clients/margin-trading/docs/QueryMarginPriceindexResponse.md +++ b/clients/margin-trading/docs/QueryMarginPriceindexResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**calcTime** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | +|**calcTime** | **Long** | calc Time. | [optional] | +|**price** | **String** | price. | [optional] | +|**symbol** | **String** | symbol. | [optional] | diff --git a/clients/margin-trading/docs/QueryMaxBorrowResponse.md b/clients/margin-trading/docs/QueryMaxBorrowResponse.md index 1dfd800ad..5edeb1861 100644 --- a/clients/margin-trading/docs/QueryMaxBorrowResponse.md +++ b/clients/margin-trading/docs/QueryMaxBorrowResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amount** | **String** | | [optional] | -|**borrowLimit** | **String** | | [optional] | +|**amount** | **String** | account's currently max borrowable amount with sufficient system availability | [optional] | +|**borrowLimit** | **String** | max borrowable amount limited by the account level | [optional] | diff --git a/clients/margin-trading/docs/QueryMaxTransferOutAmountResponse.md b/clients/margin-trading/docs/QueryMaxTransferOutAmountResponse.md index 3204bc80d..d009def55 100644 --- a/clients/margin-trading/docs/QueryMaxTransferOutAmountResponse.md +++ b/clients/margin-trading/docs/QueryMaxTransferOutAmountResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amount** | **String** | | [optional] | +|**amount** | **String** | amount. | [optional] | diff --git a/clients/margin-trading/docs/QueryPreventedMatchesResponseInner.md b/clients/margin-trading/docs/QueryPreventedMatchesResponseInner.md index 51fc84ec5..bf0355ea3 100644 --- a/clients/margin-trading/docs/QueryPreventedMatchesResponseInner.md +++ b/clients/margin-trading/docs/QueryPreventedMatchesResponseInner.md @@ -7,16 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**preventedMatchId** | **Long** | | [optional] | -|**takerOrderId** | **Long** | | [optional] | -|**makerSymbol** | **String** | | [optional] | -|**makerOrderId** | **Long** | | [optional] | -|**tradeGroupId** | **Long** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**makerPreventedQuantity** | **String** | | [optional] | -|**transactTime** | **Long** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**preventedMatchId** | **Long** | prevented Match Id. | [optional] | +|**takerOrderId** | **Long** | taker Order Id. | [optional] | +|**makerSymbol** | **String** | maker Symbol. | [optional] | +|**makerOrderId** | **Long** | maker Order Id. | [optional] | +|**tradeGroupId** | **Long** | trade Group Id. | [optional] | +|**selfTradePreventionMode** | **String** | self Trade Prevention Mode. | [optional] | +|**price** | **String** | price. | [optional] | +|**makerPreventedQuantity** | **String** | maker Prevented Quantity. | [optional] | +|**transactTime** | **Long** | transact Time. | [optional] | diff --git a/clients/margin-trading/docs/QuerySpecialKeyListResponseInner.md b/clients/margin-trading/docs/QuerySpecialKeyListResponseInner.md index 7cf486ed1..73b636a07 100644 --- a/clients/margin-trading/docs/QuerySpecialKeyListResponseInner.md +++ b/clients/margin-trading/docs/QuerySpecialKeyListResponseInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**apiName** | **String** | | [optional] | -|**apiKey** | **String** | | [optional] | -|**ip** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**permissionMode** | **String** | | [optional] | +|**apiName** | **String** | api Name. | [optional] | +|**apiKey** | **String** | api Key. | [optional] | +|**ip** | **String** | ip. | [optional] | +|**type** | **String** | type. | [optional] | +|**permissionMode** | **String** | permission Mode. | [optional] | diff --git a/clients/margin-trading/docs/QuerySpecialKeyResponse.md b/clients/margin-trading/docs/QuerySpecialKeyResponse.md index ebe46d5fa..9ac74f091 100644 --- a/clients/margin-trading/docs/QuerySpecialKeyResponse.md +++ b/clients/margin-trading/docs/QuerySpecialKeyResponse.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**apiKey** | **String** | | [optional] | -|**ip** | **String** | | [optional] | -|**apiName** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**permissionMode** | **String** | | [optional] | +|**apiKey** | **String** | api Key. | [optional] | +|**ip** | **String** | 0.0.0.0 is just an initial statereference (no extra meaning). | [optional] | +|**apiName** | **String** | api Name. | [optional] | +|**type** | **String** | type. | [optional] | +|**permissionMode** | **String** | permission Mode. | [optional] | diff --git a/clients/margin-trading/docs/RiskDataStreamApi.md b/clients/margin-trading/docs/RiskDataStreamApi.md deleted file mode 100644 index e5f8c8073..000000000 --- a/clients/margin-trading/docs/RiskDataStreamApi.md +++ /dev/null @@ -1,187 +0,0 @@ -# RiskDataStreamApi - -All URIs are relative to *https://api.binance.com* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**closeUserDataStream**](RiskDataStreamApi.md#closeUserDataStream) | **DELETE** /sapi/v1/margin/listen-key | Close User Data Stream (USER_STREAM) | -| [**keepaliveUserDataStream**](RiskDataStreamApi.md#keepaliveUserDataStream) | **PUT** /sapi/v1/margin/listen-key | Keepalive User Data Stream (USER_STREAM) | -| [**startUserDataStream**](RiskDataStreamApi.md#startUserDataStream) | **POST** /sapi/v1/margin/listen-key | Start User Data Stream (USER_STREAM) | - - - -# **closeUserDataStream** -> closeUserDataStream() - -Close User Data Stream (USER_STREAM) - -Close out a user data stream. Weight: 3000 - -### Example -```java -// Import classes: -import com.binance.connector.client.margin_trading.ApiClient; -import com.binance.connector.client.margin_trading.ApiException; -import com.binance.connector.client.margin_trading.Configuration; -import com.binance.connector.client.margin_trading.models.*; -import com.binance.connector.client.margin_trading.rest.api.RiskDataStreamApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - RiskDataStreamApi apiInstance = new RiskDataStreamApi(defaultClient); - try { - apiInstance.closeUserDataStream(); - } catch (ApiException e) { - System.err.println("Exception when calling RiskDataStreamApi#closeUserDataStream"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | - - -# **keepaliveUserDataStream** -> keepaliveUserDataStream(keepaliveUserDataStreamRequest) - -Keepalive User Data Stream (USER_STREAM) - -Keepalive a user data stream to prevent a time out. Weight: 1 - -### Example -```java -// Import classes: -import com.binance.connector.client.margin_trading.ApiClient; -import com.binance.connector.client.margin_trading.ApiException; -import com.binance.connector.client.margin_trading.Configuration; -import com.binance.connector.client.margin_trading.models.*; -import com.binance.connector.client.margin_trading.rest.api.RiskDataStreamApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - RiskDataStreamApi apiInstance = new RiskDataStreamApi(defaultClient); - KeepaliveUserDataStreamRequest keepaliveUserDataStreamRequest = new KeepaliveUserDataStreamRequest(); // KeepaliveUserDataStreamRequest | - try { - apiInstance.keepaliveUserDataStream(keepaliveUserDataStreamRequest); - } catch (ApiException e) { - System.err.println("Exception when calling RiskDataStreamApi#keepaliveUserDataStream"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **keepaliveUserDataStreamRequest** | [**KeepaliveUserDataStreamRequest**](KeepaliveUserDataStreamRequest.md)| | | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | - - -# **startUserDataStream** -> StartUserDataStreamResponse startUserDataStream() - -Start User Data Stream (USER_STREAM) - -Start a new user data stream. Weight: 1 - -### Example -```java -// Import classes: -import com.binance.connector.client.margin_trading.ApiClient; -import com.binance.connector.client.margin_trading.ApiException; -import com.binance.connector.client.margin_trading.Configuration; -import com.binance.connector.client.margin_trading.models.*; -import com.binance.connector.client.margin_trading.rest.api.RiskDataStreamApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - RiskDataStreamApi apiInstance = new RiskDataStreamApi(defaultClient); - try { - StartUserDataStreamResponse result = apiInstance.startUserDataStream(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RiskDataStreamApi#startUserDataStream"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**StartUserDataStreamResponse**](StartUserDataStreamResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Start User Data Stream | - | - diff --git a/clients/margin-trading/docs/RiskDataStreamEventsResponse.md b/clients/margin-trading/docs/RiskDataStreamEventsResponse.md index 920c6256d..9439c4d3a 100644 --- a/clients/margin-trading/docs/RiskDataStreamEventsResponse.md +++ b/clients/margin-trading/docs/RiskDataStreamEventsResponse.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**tLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**sLowerCase** | **String** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**lLowerCase** | **String** | Margin level | [optional] | +|**sLowerCase** | **String** | Margin call status | [optional] | +|**aLowerCase** | **String** | Asset | [optional] | +|**tLowerCase** | **String** | Liability Update Type | [optional] | +|**pLowerCase** | **String** | Principle Quantity | [optional] | +|**iLowerCase** | **String** | Interest Quantity | [optional] | diff --git a/clients/margin-trading/docs/SelfTradePreventionMode.md b/clients/margin-trading/docs/SelfTradePreventionMode.md new file mode 100644 index 000000000..850c800a0 --- /dev/null +++ b/clients/margin-trading/docs/SelfTradePreventionMode.md @@ -0,0 +1,17 @@ + + +# SelfTradePreventionMode + +## Enum + + +* `EXPIRE_TAKER` (value: `"EXPIRE_TAKER"`) + +* `EXPIRE_MAKER` (value: `"EXPIRE_MAKER"`) + +* `EXPIRE_BOTH` (value: `"EXPIRE_BOTH"`) + +* `NONE` (value: `"NONE"`) + + + diff --git a/clients/margin-trading/docs/SideEffectType.md b/clients/margin-trading/docs/SideEffectType.md new file mode 100644 index 000000000..054f6db38 --- /dev/null +++ b/clients/margin-trading/docs/SideEffectType.md @@ -0,0 +1,13 @@ + + +# SideEffectType + +## Enum + + +* `NO_SIDE_EFFECT` (value: `"NO_SIDE_EFFECT"`) + +* `MARGIN_BUY` (value: `"MARGIN_BUY"`) + + + diff --git a/clients/margin-trading/docs/SmallLiabilityExchangeRequest.md b/clients/margin-trading/docs/SmallLiabilityExchangeRequest.md index f729c51ad..54eb64c65 100644 --- a/clients/margin-trading/docs/SmallLiabilityExchangeRequest.md +++ b/clients/margin-trading/docs/SmallLiabilityExchangeRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**assetNames** | **AssetNames** | | | +|**assetNames** | **String** | The assets list of small liability exchange | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/margin-trading/docs/StartUserDataStreamResponse.md b/clients/margin-trading/docs/StartUserDataStreamResponse.md index 5908d1f6e..a3c0cd526 100644 --- a/clients/margin-trading/docs/StartUserDataStreamResponse.md +++ b/clients/margin-trading/docs/StartUserDataStreamResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**listenKey** | **String** | | [optional] | +|**listenKey** | **String** | listen Key. | [optional] | diff --git a/clients/margin-trading/docs/StopLimitTimeInForce.md b/clients/margin-trading/docs/StopLimitTimeInForce.md new file mode 100644 index 000000000..eaf4e318f --- /dev/null +++ b/clients/margin-trading/docs/StopLimitTimeInForce.md @@ -0,0 +1,15 @@ + + +# StopLimitTimeInForce + +## Enum + + +* `GTC` (value: `"GTC"`) + +* `FOK` (value: `"FOK"`) + +* `IOC` (value: `"IOC"`) + + + diff --git a/clients/margin-trading/docs/TradeApi.md b/clients/margin-trading/docs/TradeApi.md index 5a95719d4..9fc47e6c3 100644 --- a/clients/margin-trading/docs/TradeApi.md +++ b/clients/margin-trading/docs/TradeApi.md @@ -4,12 +4,14 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createSpecialKey**](TradeApi.md#createSpecialKey) | **POST** /sapi/v1/margin/apiKey | Create Special Key(Low-Latency Trading)(TRADE) | -| [**deleteSpecialKey**](TradeApi.md#deleteSpecialKey) | **DELETE** /sapi/v1/margin/apiKey | Delete Special Key(Low-Latency Trading)(TRADE) | -| [**editIpForSpecialKey**](TradeApi.md#editIpForSpecialKey) | **PUT** /sapi/v1/margin/apiKey/ip | Edit ip for Special Key(Low-Latency Trading)(TRADE) | +| [**createSpecialKey**](TradeApi.md#createSpecialKey) | **POST** /sapi/v1/margin/apiKey | Create Special Key(Low-Latency Trading) (TRADE) | +| [**deleteSpecialKey**](TradeApi.md#deleteSpecialKey) | **DELETE** /sapi/v1/margin/apiKey | Delete Special Key(Low-Latency Trading) (TRADE) | +| [**editIpForSpecialKey**](TradeApi.md#editIpForSpecialKey) | **PUT** /sapi/v1/margin/apiKey/ip | Edit ip for Special Key(Low-Latency Trading) (TRADE) | +| [**exitSpecialKeyMode**](TradeApi.md#exitSpecialKeyMode) | **POST** /sapi/v1/margin/exit-special-key-mode | Exit Special Key Mode (TRADE) | | [**getForceLiquidationRecord**](TradeApi.md#getForceLiquidationRecord) | **GET** /sapi/v1/margin/forceLiquidationRec | Get Force Liquidation Record (USER_DATA) | | [**getSmallLiabilityExchangeCoinList**](TradeApi.md#getSmallLiabilityExchangeCoinList) | **GET** /sapi/v1/margin/exchange-small-liability | Get Small Liability Exchange Coin List (USER_DATA) | | [**getSmallLiabilityExchangeHistory**](TradeApi.md#getSmallLiabilityExchangeHistory) | **GET** /sapi/v1/margin/exchange-small-liability-history | Get Small Liability Exchange History (USER_DATA) | +| [**liquidationLoanRepay**](TradeApi.md#liquidationLoanRepay) | **POST** /sapi/v1/margin/liquidation-loan/repay | Liquidation Loan Repay (MARGIN) | | [**marginAccountCancelAllOpenOrdersOnASymbol**](TradeApi.md#marginAccountCancelAllOpenOrdersOnASymbol) | **DELETE** /sapi/v1/margin/openOrders | Margin Account Cancel all Open Orders on a Symbol (TRADE) | | [**marginAccountCancelOco**](TradeApi.md#marginAccountCancelOco) | **DELETE** /sapi/v1/margin/orderList | Margin Account Cancel OCO (TRADE) | | [**marginAccountCancelOrder**](TradeApi.md#marginAccountCancelOrder) | **DELETE** /sapi/v1/margin/order | Margin Account Cancel Order (TRADE) | @@ -17,8 +19,10 @@ All URIs are relative to *https://api.binance.com* | [**marginAccountNewOrder**](TradeApi.md#marginAccountNewOrder) | **POST** /sapi/v1/margin/order | Margin Account New Order (TRADE) | | [**marginAccountNewOto**](TradeApi.md#marginAccountNewOto) | **POST** /sapi/v1/margin/order/oto | Margin Account New OTO (TRADE) | | [**marginAccountNewOtoco**](TradeApi.md#marginAccountNewOtoco) | **POST** /sapi/v1/margin/order/otoco | Margin Account New OTOCO (TRADE) | -| [**marginManualLiquidation**](TradeApi.md#marginManualLiquidation) | **POST** /sapi/v1/margin/manual-liquidation | Margin Manual Liquidation(MARGIN) | +| [**marginManualLiquidation**](TradeApi.md#marginManualLiquidation) | **POST** /sapi/v1/margin/manual-liquidation | Margin Manual Liquidation (TRADE) | | [**queryCurrentMarginOrderCountUsage**](TradeApi.md#queryCurrentMarginOrderCountUsage) | **GET** /sapi/v1/margin/rateLimit/order | Query Current Margin Order Count Usage (TRADE) | +| [**queryLiquidationLoan**](TradeApi.md#queryLiquidationLoan) | **GET** /sapi/v1/margin/liquidation-loan | Query Liquidation Loan (USER_DATA) | +| [**queryLiquidationLoanRepayHistory**](TradeApi.md#queryLiquidationLoanRepayHistory) | **GET** /sapi/v1/margin/liquidation-loan/repay-history | Query Liquidation Loan Repay History (USER_DATA) | | [**queryMarginAccountsAllOco**](TradeApi.md#queryMarginAccountsAllOco) | **GET** /sapi/v1/margin/allOrderList | Query Margin Account's all OCO (USER_DATA) | | [**queryMarginAccountsAllOrders**](TradeApi.md#queryMarginAccountsAllOrders) | **GET** /sapi/v1/margin/allOrders | Query Margin Account's All Orders (USER_DATA) | | [**queryMarginAccountsOco**](TradeApi.md#queryMarginAccountsOco) | **GET** /sapi/v1/margin/orderList | Query Margin Account's OCO (USER_DATA) | @@ -26,9 +30,9 @@ All URIs are relative to *https://api.binance.com* | [**queryMarginAccountsOpenOrders**](TradeApi.md#queryMarginAccountsOpenOrders) | **GET** /sapi/v1/margin/openOrders | Query Margin Account's Open Orders (USER_DATA) | | [**queryMarginAccountsOrder**](TradeApi.md#queryMarginAccountsOrder) | **GET** /sapi/v1/margin/order | Query Margin Account's Order (USER_DATA) | | [**queryMarginAccountsTradeList**](TradeApi.md#queryMarginAccountsTradeList) | **GET** /sapi/v1/margin/myTrades | Query Margin Account's Trade List (USER_DATA) | -| [**queryPreventedMatches**](TradeApi.md#queryPreventedMatches) | **GET** /sapi/v1/margin/myPreventedMatches | Query Prevented Matches(USER_DATA) | -| [**querySpecialKey**](TradeApi.md#querySpecialKey) | **GET** /sapi/v1/margin/apiKey | Query Special key(Low Latency Trading)(TRADE) | -| [**querySpecialKeyList**](TradeApi.md#querySpecialKeyList) | **GET** /sapi/v1/margin/api-key-list | Query Special key List(Low Latency Trading)(TRADE) | +| [**queryPreventedMatches**](TradeApi.md#queryPreventedMatches) | **GET** /sapi/v1/margin/myPreventedMatches | Query Prevented Matches (USER_DATA) | +| [**querySpecialKey**](TradeApi.md#querySpecialKey) | **GET** /sapi/v1/margin/apiKey | Query Special key(Low Latency Trading) (TRADE) | +| [**querySpecialKeyList**](TradeApi.md#querySpecialKeyList) | **GET** /sapi/v1/margin/api-key-list | Query Special key List(Low Latency Trading) (TRADE) | | [**smallLiabilityExchange**](TradeApi.md#smallLiabilityExchange) | **POST** /sapi/v1/margin/exchange-small-liability | Small Liability Exchange (MARGIN) | @@ -36,9 +40,9 @@ All URIs are relative to *https://api.binance.com* # **createSpecialKey** > CreateSpecialKeyResponse createSpecialKey(createSpecialKeyRequest) -Create Special Key(Low-Latency Trading)(TRADE) +Create Special Key(Low-Latency Trading) (TRADE) -- Binance Margin offers low-latency trading through a [special key](https://www.binance.com/en/support/faq/frequently-asked-questions-on-margin-special-api-key-3208663e900d4d2e9fec4140e1832f4e), available exclusively to users with VIP level 4 or higher. - If you are VIP level 3 or below, please contact your VIP manager for eligibility criterias.** **Supported Products:** - Cross Margin - Isolated Margin - Portfolio Margin Pro - Cross Margin Pro (Additional agreement required and subject to meeting eligibility criteria) **Unsupported Products:** - Portfolio Margin We support several types of API keys: * Ed25519 (recommended) * HMAC * RSA We recommend to **use Ed25519 API keys** as it should provide the best performance and security out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). For how to generate an RSA key pair to send API requests on Binance. Please refer to the document below [FAQ](https://www.binance.com/en/support/faq/how-to-generate-an-rsa-key-pair-to-send-api-requests-on-binance-2b79728f331e43079b27440d9d15c5db) . Weight: 1(UID) +**Eligibility** - Binance Margin offers low-latency trading through a [special key](https://www.binance.com/en/support/faq/frequently-asked-questions-on-margin-special-api-key-3208663e900d4d2e9fec4140e1832f4e), available exclusively to users with VIP level 7 or higher. - If you are VIP level 6 or below, please contact your VIP manager for eligibility criterias. - All new Margin Special Key users are required to read, understand, and agree to the Margin Special Key Supplemental Product Terms at the master account level before creating a Margin Special Key. - Once signed at the master account level, the agreement applies to all sub-accounts. The master account and all sub-accounts (Cross Margin Classic and Portfolio Margin Pro) are authorized to create a Margin Special Key and are subject to the LiquidationLoan policy. For more information, please refer to [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). **Supported Products:** - Cross Margin - Isolated Margin - Portfolio Margin Pro **Unsupported Products:** - Portfolio Margin We support several types of API keys: * Ed25519 (recommended) * HMAC * RSA We recommend to **use Ed25519 API keys** as it should provide the best performance and security out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). For how to generate an RSA key pair to send API requests on Binance. Please refer to the document below [FAQ](https://www.binance.com/en/support/faq/how-to-generate-an-rsa-key-pair-to-send-api-requests-on-binance-2b79728f331e43079b27440d9d15c5db) . **How to use the Margin Special Key** - Use the below `sapi` endpoint to create your margin special API Key. - For accessing the Cross Margin account, do not send the `symbol` parameter. - For accessing the Isolated Margin account(s), pass the relevant `symbol` parameter in the API Key creation request. - Use the generated API Key (and Secret key, if applicable) to perform margin trading and listenKey generation via **Spot** REST API (`https://api.binance.com/api/v3/_*`) endpoints. Read [REST API](/products/spot/rest-api#signed-trade-and-user_data-endpoint-security) or [WebSocket API](/products/spot/web-socket-api#request-security) documentation to learn how to use different API keys You need to enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this endpoint. Weight(UID): 1 Security Type: TRADE Response Notes: - Error Code Description - **UNSUPPORTED_OPERATION** : Portfolio Margin is an unsupported product, please change the account type to a supported margin product. - **Forbidden**: Cross Margin Pro accounts require additional agreements, please contact your relationship manager. ### Example ```java @@ -98,9 +102,9 @@ No authorization required # **deleteSpecialKey** > deleteSpecialKey(apiName, symbol, recvWindow) -Delete Special Key(Low-Latency Trading)(TRADE) +Delete Special Key(Low-Latency Trading) (TRADE) -This only applies to Special Key for Low Latency Trading. If apiKey is given, apiName will be ignored. If apiName is given with no apiKey, all apikeys with given apiName will be deleted. You need to enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this endpoint. Weight: 1(UID) +Deleting your Margin Special Key alone does not exit you from the Margin Special Key framework or discharge your obligations under the Margin Special Key Supplemental Product Terms. To fully exit, you must: 1. Delete your Margin Special Key. 2. Ensure there are no outstanding liabilities on the account. 3. Call the Exit Margin Special Key API endpoint. 4. Confirm the exit status via the API response. Only after step 4 is completed and the exit status is confirmed by Binance will your account revert to standard liquidation logic and no longer be subject to the Margin Special Key Supplemental Product Terms. If apiKey is given, apiName will be ignored. If apiName is given with no apiKey, all apikeys with given apiName will be deleted. You need to enable Permits “Enable Spot & Margin” option for the API Key which requests this endpoint. Weight(UID): 1 Security Type: TRADE ### Example ```java @@ -117,9 +121,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String apiName = "apiName_example"; // String | - String symbol = "symbol_example"; // String | isolated margin pair - Long recvWindow = 56L; // Long | No more than 60000 + String apiName = "apiName"; // String | + String symbol = "BTCUSDT"; // String | + Long recvWindow = 5000L; // Long | try { apiInstance.deleteSpecialKey(apiName, symbol, recvWindow); } catch (ApiException e) { @@ -138,8 +142,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **apiName** | **String**| | [optional] | -| **symbol** | **String**| isolated margin pair | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **symbol** | **String**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -163,9 +167,9 @@ No authorization required # **editIpForSpecialKey** > editIpForSpecialKey(editIpForSpecialKeyRequest) -Edit ip for Special Key(Low-Latency Trading)(TRADE) +Edit ip for Special Key(Low-Latency Trading) (TRADE) -Edit ip restriction. This only applies to Special Key for Low Latency Trading. You need to enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this endpoint. Weight: 1(UID) +Edit ip restriction. This only applies to Special Key for Low Latency Trading. You need to enable Permits “Enable Spot & Margin” option for the API Key which requests this endpoint. Weight(UID): 1 Security Type: TRADE ### Example ```java @@ -220,13 +224,75 @@ No authorization required |-------------|-------------|------------------| | **200** | OK | - | + +# **exitSpecialKeyMode** +> Object exitSpecialKeyMode(exitSpecialKeyModeRequest) + +Exit Special Key Mode (TRADE) + +Exit the Margin Special Key mode for Cross Margin Classic accounts. **All outstanding liabilities under the Cross Margin Classic account must be fully repaid before calling this endpoint.** Deleting the Margin Special Key alone does not constitute a valid exit. When a user creates a Margin Special API Key, the account enters \"Special Key Mode\". Upon a successful request, the following actions will be performed atomically: 1. All existing Margin Special API Keys under the Cross Margin Classic mode account will be deleted. 2. All pre-execution margin checks (including Open-order-loss calculation) will revert to standard mode. 3. A cooldown period (default: 24 hours) will be enforced, during which the account will not be permitted to create new Margin Special API Keys. For more information, please refer to [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). **Preconditions:** The following conditions must be met; otherwise the request will be rejected: - Account type must be **Cross Margin Classic**. - Account must currently be in **Special Key Mode**. If not, the request silently succeeds. - Account must **not be in liquidation**. - Account must **have no liability**. You need to enable \"Permits Enable Spot & Margin Trading\" option for the API Key which requests this endpoint. Weight(UID): 10 Security Type: TRADE + +### Example +```java +// Import classes: +import com.binance.connector.client.margin_trading.ApiClient; +import com.binance.connector.client.margin_trading.ApiException; +import com.binance.connector.client.margin_trading.Configuration; +import com.binance.connector.client.margin_trading.models.*; +import com.binance.connector.client.margin_trading.rest.api.TradeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + TradeApi apiInstance = new TradeApi(defaultClient); + ExitSpecialKeyModeRequest exitSpecialKeyModeRequest = new ExitSpecialKeyModeRequest(); // ExitSpecialKeyModeRequest | + try { + Object result = apiInstance.exitSpecialKeyMode(exitSpecialKeyModeRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TradeApi#exitSpecialKeyMode"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **exitSpecialKeyModeRequest** | [**ExitSpecialKeyModeRequest**](ExitSpecialKeyModeRequest.md)| | [optional] | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Exit Special Key Mode | - | + # **getForceLiquidationRecord** > GetForceLiquidationRecordResponse getForceLiquidationRecord(startTime, endTime, isolatedSymbol, current, size, recvWindow) Get Force Liquidation Record (USER_DATA) -Get Force Liquidation Record * Response in descending order Weight: 1(IP) +Get Force Liquidation Record Weight(IP): 1 Security Type: USER_DATA Notes: - Response in descending order ### Example ```java @@ -243,12 +309,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - Long startTime = 56L; // Long | Only supports querying data from the past 90 days. - Long endTime = 56L; // Long | - String isolatedSymbol = "isolatedSymbol_example"; // String | isolated symbol - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10 Max:100 - Long recvWindow = 56L; // Long | No more than 60000 + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + String isolatedSymbol = "BTCUSDT"; // String | + Long current = 1L; // Long | + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | try { GetForceLiquidationRecordResponse result = apiInstance.getForceLiquidationRecord(startTime, endTime, isolatedSymbol, current, size, recvWindow); System.out.println(result); @@ -267,12 +333,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **startTime** | **Long**| Only supports querying data from the past 90 days. | [optional] | +| **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **isolatedSymbol** | **String**| isolated symbol | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10 Max:100 | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **isolatedSymbol** | **String**| | [optional] | +| **current** | **Long**| | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -298,7 +364,7 @@ No authorization required Get Small Liability Exchange Coin List (USER_DATA) -Query the coins which can be small liability exchange Weight: 100 +Query the coins which can be small liability exchange Weight(IP): 100 Security Type: USER_DATA ### Example ```java @@ -315,7 +381,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - Long recvWindow = 56L; // Long | No more than 60000 + Long recvWindow = 5000L; // Long | try { GetSmallLiabilityExchangeCoinListResponse result = apiInstance.getSmallLiabilityExchangeCoinList(recvWindow); System.out.println(result); @@ -334,7 +400,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -360,7 +426,7 @@ No authorization required Get Small Liability Exchange History (USER_DATA) -Get Small liability Exchange History Weight: 100(UID) +Get Small liability Exchange History Weight(UID): 100 Security Type: USER_DATA ### Example ```java @@ -377,11 +443,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long startTime = 56L; // Long | Only supports querying data from the past 90 days. - Long endTime = 56L; // Long | - Long recvWindow = 56L; // Long | No more than 60000 + Long current = 1L; // Long | + Long size = 10L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long recvWindow = 5000L; // Long | try { GetSmallLiabilityExchangeHistoryResponse result = apiInstance.getSmallLiabilityExchangeHistory(current, size, startTime, endTime, recvWindow); System.out.println(result); @@ -400,11 +466,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | | -| **size** | **Long**| Default:10, Max:100 | | -| **startTime** | **Long**| Only supports querying data from the past 90 days. | [optional] | +| **current** | **Long**| | | +| **size** | **Long**| | | +| **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -424,13 +490,75 @@ No authorization required |-------------|-------------|------------------| | **200** | Get Small Liability Exchange History | - | + +# **liquidationLoanRepay** +> LiquidationLoanRepayResponse liquidationLoanRepay(liquidationLoanRepayRequest) + +Liquidation Loan Repay (MARGIN) + +Repays the outstanding cross-margin liquidation loan from the user's spot wallet. A liquidation loan represents the account deficit incurred when account equity turns negative during liquidation (bankruptcy). The repayment amount must be greater than 0 and cannot exceed the remaining loan balance. If the Spot Account has insufficient USDC balance, the repayment will fail. Weight(UID): 100 Security Type: MARGIN + +### Example +```java +// Import classes: +import com.binance.connector.client.margin_trading.ApiClient; +import com.binance.connector.client.margin_trading.ApiException; +import com.binance.connector.client.margin_trading.Configuration; +import com.binance.connector.client.margin_trading.models.*; +import com.binance.connector.client.margin_trading.rest.api.TradeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + TradeApi apiInstance = new TradeApi(defaultClient); + LiquidationLoanRepayRequest liquidationLoanRepayRequest = new LiquidationLoanRepayRequest(); // LiquidationLoanRepayRequest | + try { + LiquidationLoanRepayResponse result = apiInstance.liquidationLoanRepay(liquidationLoanRepayRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TradeApi#liquidationLoanRepay"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **liquidationLoanRepayRequest** | [**LiquidationLoanRepayRequest**](LiquidationLoanRepayRequest.md)| | | + +### Return type + +[**LiquidationLoanRepayResponse**](LiquidationLoanRepayResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Liquidation Loan Repay | - | + # **marginAccountCancelAllOpenOrdersOnASymbol** > MarginAccountCancelAllOpenOrdersOnASymbolResponse marginAccountCancelAllOpenOrdersOnASymbol(symbol, isIsolated, recvWindow) Margin Account Cancel all Open Orders on a Symbol (TRADE) -Cancels all active orders on a symbol for margin account.<br></br> This includes OCO orders. Weight: 1 +Cancels all active orders on a symbol for margin account.<br></br> This includes OCO orders. Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -447,9 +575,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - String isIsolated = "isIsolated_example"; // String | For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" - Long recvWindow = 56L; // Long | No more than 60000 + String symbol = "BTCUSDT"; // String | + IsIsolated isIsolated = IsIsolated.fromValue("TRUE"); // IsIsolated | + Long recvWindow = 5000L; // Long | try { MarginAccountCancelAllOpenOrdersOnASymbolResponse result = apiInstance.marginAccountCancelAllOpenOrdersOnASymbol(symbol, isIsolated, recvWindow); System.out.println(result); @@ -469,8 +597,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **symbol** | **String**| | | -| **isIsolated** | **String**| For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **isIsolated** | [**IsIsolated**](.md)| | [optional] [default to FALSE] [enum: TRUE, FALSE] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -496,7 +624,7 @@ No authorization required Margin Account Cancel OCO (TRADE) -Cancel an entire Order List for a margin account. * Canceling an individual leg will cancel the entire OCO Weight: 1(UID) +Cancel an entire Order List for a margin account. Weight(UID): 1 Security Type: TRADE Notes: - Canceling an individual leg will cancel the entire OCO ### Example ```java @@ -513,12 +641,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - String isIsolated = "isIsolated_example"; // String | For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" - Long orderListId = 56L; // Long | Either `orderListId` or `listClientOrderId` must be provided - String listClientOrderId = "listClientOrderId_example"; // String | Either `orderListId` or `listClientOrderId` must be provided - String newClientOrderId = "newClientOrderId_example"; // String | Used to uniquely identify this cancel. Automatically generated by default - Long recvWindow = 56L; // Long | No more than 60000 + String symbol = "BTCUSDT"; // String | + IsIsolated isIsolated = IsIsolated.fromValue("TRUE"); // IsIsolated | + Long orderListId = 1L; // Long | + String listClientOrderId = "1"; // String | + String newClientOrderId = "1"; // String | + Long recvWindow = 5000L; // Long | try { MarginAccountCancelOcoResponse result = apiInstance.marginAccountCancelOco(symbol, isIsolated, orderListId, listClientOrderId, newClientOrderId, recvWindow); System.out.println(result); @@ -538,11 +666,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **symbol** | **String**| | | -| **isIsolated** | **String**| For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" | [optional] | -| **orderListId** | **Long**| Either `orderListId` or `listClientOrderId` must be provided | [optional] | -| **listClientOrderId** | **String**| Either `orderListId` or `listClientOrderId` must be provided | [optional] | -| **newClientOrderId** | **String**| Used to uniquely identify this cancel. Automatically generated by default | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **isIsolated** | [**IsIsolated**](.md)| | [optional] [default to FALSE] [enum: TRUE, FALSE] | +| **orderListId** | **Long**| | [optional] | +| **listClientOrderId** | **String**| | [optional] | +| **newClientOrderId** | **String**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -568,7 +696,7 @@ No authorization required Margin Account Cancel Order (TRADE) -Cancel an active order for margin account. * Either orderId or origClientOrderId must be sent. Weight: 10(IP) +Cancel an active order for margin account. Weight(IP): 10 Security Type: TRADE Notes: - Either orderId or origClientOrderId must be sent. ### Example ```java @@ -585,12 +713,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - String isIsolated = "isIsolated_example"; // String | For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" - Long orderId = 56L; // Long | - String origClientOrderId = "origClientOrderId_example"; // String | - String newClientOrderId = "newClientOrderId_example"; // String | Used to uniquely identify this cancel. Automatically generated by default - Long recvWindow = 56L; // Long | No more than 60000 + String symbol = "LTCBTC"; // String | + IsIsolated isIsolated = IsIsolated.fromValue("TRUE"); // IsIsolated | + Long orderId = 1L; // Long | + String origClientOrderId = "1"; // String | + String newClientOrderId = "1"; // String | + Long recvWindow = 5000L; // Long | try { MarginAccountCancelOrderResponse result = apiInstance.marginAccountCancelOrder(symbol, isIsolated, orderId, origClientOrderId, newClientOrderId, recvWindow); System.out.println(result); @@ -610,11 +738,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **symbol** | **String**| | | -| **isIsolated** | **String**| For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" | [optional] | +| **isIsolated** | [**IsIsolated**](.md)| | [optional] [default to FALSE] [enum: TRUE, FALSE] | | **orderId** | **Long**| | [optional] | | **origClientOrderId** | **String**| | [optional] | -| **newClientOrderId** | **String**| Used to uniquely identify this cancel. Automatically generated by default | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **newClientOrderId** | **String**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -640,7 +768,7 @@ No authorization required Margin Account New OCO (TRADE) -Send in a new OCO for a margin account * autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution Weight: 6(UID) +Send in a new OCO for a margin account Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: TRADE Notes: - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution ### Example ```java @@ -702,7 +830,7 @@ No authorization required Margin Account New Order (TRADE) -Post a new order for margin account. * autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution Weight: 6(UID) +Post a new order for margin account. Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: TRADE Notes: - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution ### Example ```java @@ -764,7 +892,7 @@ No authorization required Margin Account New OTO (TRADE) -Post a new OTO order for margin account: - An OTO (One-Triggers-the-Other) is an order list comprised of 2 orders. - The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The second order is called the **pending order**. It can be any order type except for `MARKET` orders using parameter `quoteOrderQty`. The pending order is only placed on the order book when the working order gets **fully filled**. - If either the working order or the pending order is cancelled individually, the other order in the order list will also be canceled or expired. - When the order list is placed, if the working order gets **immediately fully filled**, the placement response will show the working order as `FILLED` but the pending order will still appear as `PENDING_NEW`. You need to query the status of the pending order again to see its updated status. - OTOs add **2 orders** to the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. * autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution * Depending on the `pendingType` or `workingType`, some optional parameters will become mandatory: Weight: 6(UID) +Post a new OTO order for margin account: - An OTO (One-Triggers-the-Other) is an order list comprised of 2 orders. - The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The second order is called the **pending order**. It can be any order type except for `MARKET` orders using parameter `quoteOrderQty`. The pending order is only placed on the order book when the working order gets **fully filled**. - If either the working order or the pending order is cancelled individually, the other order in the order list will also be canceled or expired. - When the order list is placed, if the working order gets **immediately fully filled**, the placement response will show the working order as `FILLED` but the pending order will still appear as `PENDING_NEW`. You need to query the status of the pending order again to see its updated status. - OTOs add **2 orders** to the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: TRADE Notes: - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution - Depending on the `pendingType` or `workingType`, some optional - parameters will become mandatory: | Type | Additional mandatory parameters | Additional information | | -------------------------------------------------------- | ------------------------------------------------------------ | ---------------------- | | `workingType` = `LIMIT` | `workingTimeInForce` | | | `pendingType` = `LIMIT` | `pendingPrice`, `pendingTimeInForce` | | | `pendingType` = `STOP_LOSS` or `TAKE_PROFIT` | `pendingStopPrice` and/or `pendingTrailingDelta` | | | `pendingType` = `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT` | `pendingPrice`, `pendingStopPrice` and/or `pendingTrailingDelta`, `pendingTimeInForce` | | | `pendingTrailingDelta` is provided | `pendingPrice` | | ### Example ```java @@ -826,7 +954,7 @@ No authorization required Margin Account New OTOCO (TRADE) -Post a new OTOCO order for margin account: - An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders. - The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The behavior of the working order is the same as the OTO. - OTOCO has 2 pending orders (pending above and pending below), forming an OCO pair. The pending orders are only placed on the order book when the working order gets **fully filled**. - The rules of the pending above and pending below follow the same rules as the [Order List OCO](https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OCO). - OTOCOs add **3 orders** against the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter. * autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution * Depending on the `pendingAboveType`/`pendingBelowType` or `workingType`, some optional parameters will become mandatory: Weight: 6(UID) +Post a new OTOCO order for margin account: - An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders. - The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The behavior of the working order is the same as the OTO. - OTOCO has 2 pending orders (pending above and pending below), forming an OCO pair. The pending orders are only placed on the order book when the working order gets **fully filled**. - The rules of the pending above and pending below follow the same rules as the [Order List OCO](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco). - OTOCOs add **3 orders** against the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter. Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: TRADE Notes: - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution - Depending on the `pendingAboveType`/`pendingBelowType` or `workingType`, some optional parameters will become mandatory: | Type | Additional mandatory parameters | Additional information | | ------------------------------------ | ------------------------------------------------------------ | ---------------------- | | `workingType` = `LIMIT` | `workingTimeInForce` | | | `pendingAboveType`= `LIMIT_MAKER` | `pendingAbovePrice` | | | `pendingAboveType`= `STOP_LOSS` | `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta` | | | `pendingAboveType`=`STOP_LOSS_LIMIT` | `pendingAbovePrice`, `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`, `pendingAboveTimeInForce` | | | `pendingBelowType`= `LIMIT_MAKER` | `pendingBelowPrice` | | | `pendingBelowType`= `STOP_LOSS` | `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta` | | | `pendingBelowType`=`STOP_LOSS_LIMIT` | `pendingBelowPrice`, `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`, `pendingBelowTimeInForce` | | | `pendingAboveTrailingDelta` is provided | `pendingAbovePrice` | | | `pendingBelowTrailingDelta` is provided | `pendingBelowPrice` | | ### Example ```java @@ -886,9 +1014,9 @@ No authorization required # **marginManualLiquidation** > MarginManualLiquidationResponse marginManualLiquidation(marginManualLiquidationRequest) -Margin Manual Liquidation(MARGIN) +Margin Manual Liquidation (TRADE) -Margin Manual Liquidation * This endpoint can support Cross Margin Classic Mode and Pro Mode. * And only support Isolated Margin for restricted region. Weight: 3000 +Margin Manual Liquidation Weight(UID): 3000 Security Type: TRADE Notes: - This endpoint supports Cross Margin Classic Mode and Pro Mode. - Isolated Margin is only supported in restricted regions. ### Example ```java @@ -950,7 +1078,7 @@ No authorization required Query Current Margin Order Count Usage (TRADE) -Displays the user's current margin order count usage for all intervals. Weight: 20(IP) +Displays the user's current margin order count usage for all intervals. Weight(IP): 20 Security Type: TRADE ### Example ```java @@ -967,9 +1095,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String isIsolated = "isIsolated_example"; // String | For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" - String symbol = "symbol_example"; // String | isolated margin pair - Long recvWindow = 56L; // Long | No more than 60000 + IsIsolated isIsolated = IsIsolated.fromValue("TRUE"); // IsIsolated | + String symbol = "BTCUSDT"; // String | + Long recvWindow = 5000L; // Long | try { QueryCurrentMarginOrderCountUsageResponse result = apiInstance.queryCurrentMarginOrderCountUsage(isIsolated, symbol, recvWindow); System.out.println(result); @@ -988,9 +1116,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **isIsolated** | **String**| For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" | [optional] | -| **symbol** | **String**| isolated margin pair | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **isIsolated** | [**IsIsolated**](.md)| | [optional] [default to FALSE] [enum: TRUE, FALSE] | +| **symbol** | **String**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -1010,13 +1138,145 @@ No authorization required |-------------|-------------|------------------| | **200** | Current Margin Order Count Usage | - | + +# **queryLiquidationLoan** +> QueryLiquidationLoanResponse queryLiquidationLoan(recvWindow) + +Query Liquidation Loan (USER_DATA) + +Query the current user's cross-margin liquidation loan information, including the original loan amount, repaid amount, and remaining amount. When a cross-margin account is liquidated and the account equity turns negative (bankruptcy), the system generates a liquidation loan record representing the deficit. This represents the shortfall amount denominated in USDC. Weight(UID): 100 Security Type: USER_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.margin_trading.ApiClient; +import com.binance.connector.client.margin_trading.ApiException; +import com.binance.connector.client.margin_trading.Configuration; +import com.binance.connector.client.margin_trading.models.*; +import com.binance.connector.client.margin_trading.rest.api.TradeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + TradeApi apiInstance = new TradeApi(defaultClient); + Long recvWindow = 5000L; // Long | + try { + QueryLiquidationLoanResponse result = apiInstance.queryLiquidationLoan(recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TradeApi#queryLiquidationLoan"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **recvWindow** | **Long**| | [optional] | + +### Return type + +[**QueryLiquidationLoanResponse**](QueryLiquidationLoanResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Query Liquidation Loan | - | + + +# **queryLiquidationLoanRepayHistory** +> QueryLiquidationLoanRepayHistoryResponse queryLiquidationLoanRepayHistory(startTime, endTime, current, size, recvWindow) + +Query Liquidation Loan Repay History (USER_DATA) + +Query the repayment history of cross-margin liquidation loans (deficit caused by bankruptcy during liquidation). Supports time-range filtering and pagination. Weight(UID): 100 Security Type: USER_DATA Notes: - The maximum query range is 90 days. If `startTime` is earlier than 90 days ago, it will be clamped to 90 days ago. - Only records with status `SUCCESS` or `PENDING` are returned. Failed repayment records are excluded. + +### Example +```java +// Import classes: +import com.binance.connector.client.margin_trading.ApiClient; +import com.binance.connector.client.margin_trading.ApiException; +import com.binance.connector.client.margin_trading.Configuration; +import com.binance.connector.client.margin_trading.models.*; +import com.binance.connector.client.margin_trading.rest.api.TradeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + TradeApi apiInstance = new TradeApi(defaultClient); + Long startTime = 1714492800000L; // Long | Start time in Unix timestamp (milliseconds). Defaults to 7 days ago if not specified + Long endTime = 1714579200000L; // Long | End time in Unix timestamp (milliseconds). Defaults to now if not specified + Long current = 1L; // Long | Current page number, default `1` + Long size = 50L; // Long | Page size, default `50` + Long recvWindow = 5000L; // Long | + try { + QueryLiquidationLoanRepayHistoryResponse result = apiInstance.queryLiquidationLoanRepayHistory(startTime, endTime, current, size, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TradeApi#queryLiquidationLoanRepayHistory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **startTime** | **Long**| Start time in Unix timestamp (milliseconds). Defaults to 7 days ago if not specified | [optional] | +| **endTime** | **Long**| End time in Unix timestamp (milliseconds). Defaults to now if not specified | [optional] | +| **current** | **Long**| Current page number, default `1` | [optional] | +| **size** | **Long**| Page size, default `50` | [optional] | +| **recvWindow** | **Long**| | [optional] | + +### Return type + +[**QueryLiquidationLoanRepayHistoryResponse**](QueryLiquidationLoanRepayHistoryResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Query Liquidation Loan Repay History | - | + # **queryMarginAccountsAllOco** > QueryMarginAccountsAllOcoResponse queryMarginAccountsAllOco(isIsolated, symbol, fromId, startTime, endTime, limit, recvWindow) Query Margin Account's all OCO (USER_DATA) -Retrieves all OCO for a specific margin account based on provided optional parameters Weight: 200(IP) +Retrieves all OCO for a specific margin account based on provided optional parameters Weight(IP): 200 Security Type: USER_DATA ### Example ```java @@ -1033,13 +1293,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String isIsolated = "isIsolated_example"; // String | For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" - String symbol = "symbol_example"; // String | isolated margin pair - Long fromId = 56L; // Long | If `fromId` is set, data with `id` greater than `fromId` will be returned. Otherwise, the latest data will be returned. - Long startTime = 56L; // Long | Only supports querying data from the past 90 days. - Long endTime = 56L; // Long | - Long limit = 56L; // Long | Limit on the number of data records returned per request. Default: 500; Maximum: 1000. - Long recvWindow = 56L; // Long | No more than 60000 + IsIsolated isIsolated = IsIsolated.fromValue("TRUE"); // IsIsolated | + String symbol = "LTCBTC"; // String | + Long fromId = 1L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long limit = 100L; // Long | + Long recvWindow = 5000L; // Long | try { QueryMarginAccountsAllOcoResponse result = apiInstance.queryMarginAccountsAllOco(isIsolated, symbol, fromId, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -1058,13 +1318,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **isIsolated** | **String**| For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" | [optional] | -| **symbol** | **String**| isolated margin pair | [optional] | -| **fromId** | **Long**| If `fromId` is set, data with `id` greater than `fromId` will be returned. Otherwise, the latest data will be returned. | [optional] | -| **startTime** | **Long**| Only supports querying data from the past 90 days. | [optional] | +| **isIsolated** | [**IsIsolated**](.md)| | [optional] [default to FALSE] [enum: TRUE, FALSE] | +| **symbol** | **String**| | [optional] | +| **fromId** | **Long**| | [optional] | +| **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **limit** | **Long**| Limit on the number of data records returned per request. Default: 500; Maximum: 1000. | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **limit** | **Long**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -1090,7 +1350,7 @@ No authorization required Query Margin Account's All Orders (USER_DATA) -Query Margin Account's All Orders * If orderId is set, it will get orders >= that orderId. Otherwise the orders within 24 hours are returned. * For some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available at this time. * Less than 24 hours between startTime and endTime. Weight: 200(IP) +Query Margin Account's All Orders Weight(IP): 200 Security Type: USER_DATA Notes: - If orderId is set, it will get orders >= that orderId. Otherwise the orders within 24 hours are returned. - For some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available at this time. - Less than 24 hours between startTime and endTime. ### Example ```java @@ -1107,13 +1367,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - String isIsolated = "isIsolated_example"; // String | For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" - Long orderId = 56L; // Long | - Long startTime = 56L; // Long | Only supports querying data from the past 90 days. - Long endTime = 56L; // Long | - Long limit = 56L; // Long | Limit on the number of data records returned per request. Default: 500; Maximum: 1000. - Long recvWindow = 56L; // Long | No more than 60000 + String symbol = "BNBBTC"; // String | + IsIsolated isIsolated = IsIsolated.fromValue("TRUE"); // IsIsolated | + Long orderId = 1L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long limit = 100L; // Long | + Long recvWindow = 5000L; // Long | try { QueryMarginAccountsAllOrdersResponse result = apiInstance.queryMarginAccountsAllOrders(symbol, isIsolated, orderId, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -1133,12 +1393,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **symbol** | **String**| | | -| **isIsolated** | **String**| For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" | [optional] | +| **isIsolated** | [**IsIsolated**](.md)| | [optional] [default to FALSE] [enum: TRUE, FALSE] | | **orderId** | **Long**| | [optional] | -| **startTime** | **Long**| Only supports querying data from the past 90 days. | [optional] | +| **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **limit** | **Long**| Limit on the number of data records returned per request. Default: 500; Maximum: 1000. | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **limit** | **Long**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -1164,7 +1424,7 @@ No authorization required Query Margin Account's OCO (USER_DATA) -Retrieves a specific OCO based on provided optional parameters Weight: 10(IP) +Retrieves a specific OCO based on provided optional parameters Weight(IP): 10 Security Type: USER_DATA ### Example ```java @@ -1181,11 +1441,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String isIsolated = "isIsolated_example"; // String | For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" - String symbol = "symbol_example"; // String | isolated margin pair - Long orderListId = 56L; // Long | Either `orderListId` or `listClientOrderId` must be provided - String origClientOrderId = "origClientOrderId_example"; // String | - Long recvWindow = 56L; // Long | No more than 60000 + IsIsolated isIsolated = IsIsolated.fromValue("TRUE"); // IsIsolated | + String symbol = "LTCBTC"; // String | + Long orderListId = 1L; // Long | + String origClientOrderId = "1"; // String | + Long recvWindow = 5000L; // Long | try { QueryMarginAccountsOcoResponse result = apiInstance.queryMarginAccountsOco(isIsolated, symbol, orderListId, origClientOrderId, recvWindow); System.out.println(result); @@ -1204,11 +1464,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **isIsolated** | **String**| For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" | [optional] | -| **symbol** | **String**| isolated margin pair | [optional] | -| **orderListId** | **Long**| Either `orderListId` or `listClientOrderId` must be provided | [optional] | +| **isIsolated** | [**IsIsolated**](.md)| | [optional] [default to FALSE] [enum: TRUE, FALSE] | +| **symbol** | **String**| | [optional] | +| **orderListId** | **Long**| | [optional] | | **origClientOrderId** | **String**| | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -1234,7 +1494,7 @@ No authorization required Query Margin Account's Open OCO (USER_DATA) -Query Margin Account's Open OCO Weight: 10(IP) +Query Margin Account's Open OCO Weight(IP): 10 Security Type: USER_DATA ### Example ```java @@ -1251,9 +1511,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String isIsolated = "isIsolated_example"; // String | For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" - String symbol = "symbol_example"; // String | isolated margin pair - Long recvWindow = 56L; // Long | No more than 60000 + IsIsolated isIsolated = IsIsolated.fromValue("TRUE"); // IsIsolated | + String symbol = "LTCBTC"; // String | + Long recvWindow = 5000L; // Long | try { QueryMarginAccountsOpenOcoResponse result = apiInstance.queryMarginAccountsOpenOco(isIsolated, symbol, recvWindow); System.out.println(result); @@ -1272,9 +1532,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **isIsolated** | **String**| For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" | [optional] | -| **symbol** | **String**| isolated margin pair | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **isIsolated** | [**IsIsolated**](.md)| | [optional] [default to FALSE] [enum: TRUE, FALSE] | +| **symbol** | **String**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -1300,7 +1560,7 @@ No authorization required Query Margin Account's Open Orders (USER_DATA) -Query Margin Account's Open Orders * If the symbol is not sent, orders for all symbols will be returned in an array. * When all symbols are returned, the number of requests counted against the rate limiter is equal to the number of symbols currently trading on the exchange. * If isIsolated =\"TRUE\", symbol must be sent. Weight: 10(IP) +Query Margin Account's Open Orders Weight(IP): 10 Security Type: USER_DATA Notes: - If the symbol is not sent, orders for all symbols will be returned in an array. - When all symbols are returned, the number of requests counted against the rate limiter is equal to the number of symbols currently trading on the exchange. - If isIsolated =\"TRUE\", symbol must be sent. ### Example ```java @@ -1317,9 +1577,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | isolated margin pair - String isIsolated = "isIsolated_example"; // String | For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" - Long recvWindow = 56L; // Long | No more than 60000 + String symbol = "BNBBTC"; // String | isolated margin pair + IsIsolated isIsolated = IsIsolated.fromValue("TRUE"); // IsIsolated | + Long recvWindow = 5000L; // Long | try { QueryMarginAccountsOpenOrdersResponse result = apiInstance.queryMarginAccountsOpenOrders(symbol, isIsolated, recvWindow); System.out.println(result); @@ -1339,8 +1599,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **symbol** | **String**| isolated margin pair | [optional] | -| **isIsolated** | **String**| For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **isIsolated** | [**IsIsolated**](.md)| | [optional] [default to FALSE] [enum: TRUE, FALSE] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -1366,7 +1626,7 @@ No authorization required Query Margin Account's Order (USER_DATA) -Query Margin Account's Order * Either orderId or origClientOrderId must be sent. * For some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available at this time. Weight: 10(IP) +Query Margin Account's Order Weight(IP): 10 Security Type: USER_DATA Notes: - Either orderId or origClientOrderId must be sent. - For some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available at this time. ### Example ```java @@ -1383,11 +1643,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - String isIsolated = "isIsolated_example"; // String | For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" - Long orderId = 56L; // Long | - String origClientOrderId = "origClientOrderId_example"; // String | - Long recvWindow = 56L; // Long | No more than 60000 + String symbol = "BNBBTC"; // String | + IsIsolated isIsolated = IsIsolated.fromValue("TRUE"); // IsIsolated | + Long orderId = 1L; // Long | + String origClientOrderId = "1"; // String | + Long recvWindow = 5000L; // Long | try { QueryMarginAccountsOrderResponse result = apiInstance.queryMarginAccountsOrder(symbol, isIsolated, orderId, origClientOrderId, recvWindow); System.out.println(result); @@ -1407,10 +1667,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **symbol** | **String**| | | -| **isIsolated** | **String**| For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" | [optional] | +| **isIsolated** | [**IsIsolated**](.md)| | [optional] [default to FALSE] [enum: TRUE, FALSE] | | **orderId** | **Long**| | [optional] | | **origClientOrderId** | **String**| | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -1436,7 +1696,7 @@ No authorization required Query Margin Account's Trade List (USER_DATA) -Query Margin Account's Trade List * If fromId is set, it will get trades >= that fromId. Otherwise the trades within 24 hours are returned. * Less than 24 hours between startTime and endTime. Weight: 10(IP) +Query Margin Account's Trade List Weight(IP): 10 Security Type: USER_DATA Notes: - If fromId is set, it will get trades >= that fromId. Otherwise the trades within 24 hours are returned. - Less than 24 hours between startTime and endTime. ### Example ```java @@ -1453,14 +1713,14 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - String isIsolated = "isIsolated_example"; // String | For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" - Long orderId = 56L; // Long | - Long startTime = 56L; // Long | Only supports querying data from the past 90 days. - Long endTime = 56L; // Long | - Long fromId = 56L; // Long | If `fromId` is set, data with `id` greater than `fromId` will be returned. Otherwise, the latest data will be returned. - Long limit = 56L; // Long | Limit on the number of data records returned per request. Default: 500; Maximum: 1000. - Long recvWindow = 56L; // Long | No more than 60000 + String symbol = "BNBBTC"; // String | + IsIsolated isIsolated = IsIsolated.fromValue("TRUE"); // IsIsolated | + Long orderId = 1L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long fromId = 1L; // Long | + Long limit = 500L; // Long | + Long recvWindow = 5000L; // Long | try { QueryMarginAccountsTradeListResponse result = apiInstance.queryMarginAccountsTradeList(symbol, isIsolated, orderId, startTime, endTime, fromId, limit, recvWindow); System.out.println(result); @@ -1480,13 +1740,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **symbol** | **String**| | | -| **isIsolated** | **String**| For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" | [optional] | +| **isIsolated** | [**IsIsolated**](.md)| | [optional] [default to FALSE] [enum: TRUE, FALSE] | | **orderId** | **Long**| | [optional] | -| **startTime** | **Long**| Only supports querying data from the past 90 days. | [optional] | +| **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **fromId** | **Long**| If `fromId` is set, data with `id` greater than `fromId` will be returned. Otherwise, the latest data will be returned. | [optional] | -| **limit** | **Long**| Limit on the number of data records returned per request. Default: 500; Maximum: 1000. | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **fromId** | **Long**| | [optional] | +| **limit** | **Long**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -1508,11 +1768,11 @@ No authorization required # **queryPreventedMatches** -> QueryPreventedMatchesResponse queryPreventedMatches(symbol, preventedMatchId, orderId, fromPreventedMatchId, recvWindow, isIsolated) +> QueryPreventedMatchesResponse queryPreventedMatches(symbol, preventedMatchId, orderId, fromPreventedMatchId, isIsolated, recvWindow) -Query Prevented Matches(USER_DATA) +Query Prevented Matches (USER_DATA) - Weight: 10(IP) +Displays the list of orders that were expired due to STP. (Self-Trade Prevention). Weight(IP): 10 Security Type: USER_DATA Notes: - Supported parameter combinations: - `symbol` + `preventedMatchId` - `symbol` + `orderId` - `symbol` + `orderId` + `fromPreventedMatchId` - If `orderId` is provided, all prevented matches for that order will be returned. - If `preventedMatchId` is provided, the specific prevented match will be returned. - A single request returns a maximum of 500 records. If there are more than 500 records, use `symbol` + `orderId` + `fromPreventedMatchId` combination for pagination. ### Example ```java @@ -1529,14 +1789,14 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | - Long preventedMatchId = 56L; // Long | - Long orderId = 56L; // Long | - Long fromPreventedMatchId = 56L; // Long | - Long recvWindow = 56L; // Long | No more than 60000 - String isIsolated = "isIsolated_example"; // String | For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" + String symbol = "BTCUSDT"; // String | + Long preventedMatchId = 1L; // Long | + Long orderId = 1L; // Long | + Long fromPreventedMatchId = 1L; // Long | + IsIsolated isIsolated = IsIsolated.fromValue("TRUE"); // IsIsolated | + Long recvWindow = 5000L; // Long | try { - QueryPreventedMatchesResponse result = apiInstance.queryPreventedMatches(symbol, preventedMatchId, orderId, fromPreventedMatchId, recvWindow, isIsolated); + QueryPreventedMatchesResponse result = apiInstance.queryPreventedMatches(symbol, preventedMatchId, orderId, fromPreventedMatchId, isIsolated, recvWindow); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TradeApi#queryPreventedMatches"); @@ -1557,8 +1817,8 @@ public class Example { | **preventedMatchId** | **Long**| | [optional] | | **orderId** | **Long**| | [optional] | | **fromPreventedMatchId** | **Long**| | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | -| **isIsolated** | **String**| For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\" | [optional] | +| **isIsolated** | [**IsIsolated**](.md)| | [optional] [default to FALSE] [enum: TRUE, FALSE] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -1582,9 +1842,9 @@ No authorization required # **querySpecialKey** > QuerySpecialKeyResponse querySpecialKey(symbol, recvWindow) -Query Special key(Low Latency Trading)(TRADE) +Query Special key(Low Latency Trading) (TRADE) -Query Special Key Information. This only applies to Special Key for Low Latency Trading. Weight: 1(UID) +Query Special Key Information. This only applies to Special Key for Low Latency Trading. Weight(UID): 1 Security Type: TRADE ### Example ```java @@ -1601,8 +1861,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | isolated margin pair - Long recvWindow = 56L; // Long | No more than 60000 + String symbol = "BTCUSDT"; // String | + Long recvWindow = 5000L; // Long | try { QuerySpecialKeyResponse result = apiInstance.querySpecialKey(symbol, recvWindow); System.out.println(result); @@ -1621,8 +1881,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| isolated margin pair | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **symbol** | **String**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -1646,9 +1906,9 @@ No authorization required # **querySpecialKeyList** > QuerySpecialKeyListResponse querySpecialKeyList(symbol, recvWindow) -Query Special key List(Low Latency Trading)(TRADE) +Query Special key List(Low Latency Trading) (TRADE) -This only applies to Special Key for Low Latency Trading. Weight: 1(UID) +This only applies to Special Key for Low Latency Trading. Weight(UID): 1 Security Type: TRADE ### Example ```java @@ -1665,8 +1925,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "symbol_example"; // String | isolated margin pair - Long recvWindow = 56L; // Long | No more than 60000 + String symbol = "BTCUSDT"; // String | + Long recvWindow = 5000L; // Long | try { QuerySpecialKeyListResponse result = apiInstance.querySpecialKeyList(symbol, recvWindow); System.out.println(result); @@ -1685,8 +1945,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| isolated margin pair | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **symbol** | **String**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -1712,7 +1972,7 @@ No authorization required Small Liability Exchange (MARGIN) -Small Liability Exchange * Only convert once within 6 hours * Only liability valuation less than 10 USDT are supported * The maximum number of coin is 10 Weight: 3000(UID) +Small Liability Exchange Weight(UID): 3000 Security Type: MARGIN Notes: - Only convert once within 6 hours - Only liability valuation less than 10 USDT are supported - The maximum number of coin is 10 ### Example ```java diff --git a/clients/margin-trading/docs/TradeDataStreamEventsResponse.md b/clients/margin-trading/docs/TradeDataStreamEventsResponse.md index 7406c3a34..ea2e95148 100644 --- a/clients/margin-trading/docs/TradeDataStreamEventsResponse.md +++ b/clients/margin-trading/docs/TradeDataStreamEventsResponse.md @@ -7,57 +7,57 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**uLowerCase** | **String** | | [optional] | -|**B** | **String** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**dLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**lLowerCase** | **String** | List Status Type | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**aLowerCase** | **String** | Allocation ID | [optional] | +|**tLowerCase** | **Long** | Trade ID | [optional] | +|**pLowerCase** | **String** | Order price | [optional] | +|**iLowerCase** | **Long** | Order ID | [optional] | +|**dLowerCase** | **String** | Trailing Delta; This is only visible if the order was a trailing stop order. | [optional] | +|**T** | **Long** | Transaction Time | [optional] | +|**cLowerCase** | **String** | Contingency Type | [optional] | +|**S** | **String** | Side | [optional] | +|**oLowerCase** | **String** | Order type | [optional] | +|**fLowerCase** | **String** | Time in force | [optional] | +|**qLowerCase** | **String** | Order quantity | [optional] | +|**P** | **String** | Stop price | [optional] | +|**F** | **String** | Iceberg quantity | [optional] | +|**gLowerCase** | **Long** | OrderListId | [optional] | +|**C** | **String** | List Client Order ID | [optional] | +|**xLowerCase** | **String** | Current execution type | [optional] | +|**X** | **String** | Current order status | [optional] | +|**rLowerCase** | **String** | List Reject Reason | [optional] | +|**zLowerCase** | **String** | Cumulative filled quantity | [optional] | +|**L** | **String** | List Order Status | [optional] | +|**nLowerCase** | **String** | Commission amount | [optional] | +|**N** | **String** | Commission asset | [optional] | +|**I** | **Long** | Ignore | [optional] | +|**wLowerCase** | **Boolean** | Is the order on the book? | [optional] | +|**mLowerCase** | **Boolean** | Is this trade the maker side? | [optional] | +|**M** | **Boolean** | Ignore | [optional] | +|**O** | [**List<ListStatusOInner>**](ListStatusOInner.md) | An array of objects | [optional] | +|**Z** | **String** | Cumulative quote asset transacted quantity | [optional] | +|**Y** | **String** | Last quote asset transacted quantity (i.e. lastPrice * lastQty) | [optional] | +|**Q** | **String** | Quote Order Quantity | [optional] | +|**W** | **Long** | Working Time; This is only visible if the order has been placed on the book. | [optional] | +|**V** | **String** | selfTradePreventionMode | [optional] | +|**D** | **String** | Trailing Time | [optional] | +|**jLowerCase** | **String** | Strategy Id | [optional] | +|**J** | **String** | Strategy Type | [optional] | +|**vLowerCase** | **String** | Prevented Match Id | [optional] | +|**A** | **String** | Prevented Quantity | [optional] | +|**B** | [**List<OutboundAccountPositionBInner>**](OutboundAccountPositionBInner.md) | Balances Array | [optional] | +|**uLowerCase** | **Long** | Time of last account update | [optional] | +|**U** | **String** | Counter Order Id | [optional] | +|**cs** | **String** | Counter Symbol | [optional] | +|**pl** | **String** | Prevented Execution Quantity | [optional] | +|**pL** | **String** | Prevented Execution Price | [optional] | +|**pY** | **String** | Prevented Execution Quote Qty | [optional] | +|**bLowerCase** | **String** | Match Type | [optional] | +|**kLowerCase** | **String** | Working Floor | [optional] | +|**uS** | **Boolean** | UsedSor | [optional] | |**listenKey** | **String** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**S** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**F** | **String** | | [optional] | -|**gLowerCase** | **Long** | | [optional] | -|**C** | **String** | | [optional] | -|**xLowerCase** | **String** | | [optional] | -|**X** | **String** | | [optional] | -|**rLowerCase** | **String** | | [optional] | -|**iLowerCase** | **Long** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**zLowerCase** | **String** | | [optional] | -|**L** | **String** | | [optional] | -|**nLowerCase** | **String** | | [optional] | -|**N** | **String** | | [optional] | -|**tLowerCase** | **Long** | | [optional] | -|**I** | **Long** | | [optional] | -|**wLowerCase** | **Boolean** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | -|**M** | **Boolean** | | [optional] | -|**O** | [**List<ListstatusOInner>**](ListstatusOInner.md) | | [optional] | -|**Z** | **String** | | [optional] | -|**Y** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**W** | **Long** | | [optional] | -|**V** | **String** | | [optional] | -|**D** | **String** | | [optional] | -|**jLowerCase** | **String** | | [optional] | -|**J** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**A** | **String** | | [optional] | -|**U** | **String** | | [optional] | -|**cs** | **String** | | [optional] | -|**pl** | **String** | | [optional] | -|**pL** | **String** | | [optional] | -|**pY** | **String** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**kLowerCase** | **String** | | [optional] | -|**uS** | **Boolean** | | [optional] | diff --git a/clients/margin-trading/docs/TransferApi.md b/clients/margin-trading/docs/TransferApi.md index e96f755bd..b5eddd910 100644 --- a/clients/margin-trading/docs/TransferApi.md +++ b/clients/margin-trading/docs/TransferApi.md @@ -14,7 +14,7 @@ All URIs are relative to *https://api.binance.com* Get Cross Margin Transfer History (USER_DATA) -Get Cross Margin Transfer History * Response in descending order * The max interval between `startTime` and `endTime` is 30 days. * Returns data for last 7 days by default Weight: 1(IP) +Get Cross Margin Transfer History Weight(IP): 1 Security Type: USER_DATA Notes: - Response in descending order - The max interval between `startTime` and `endTime` is 30 days. - Returns data for last 7 days by default ### Example ```java @@ -31,14 +31,14 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TransferApi apiInstance = new TransferApi(defaultClient); - String asset = "asset_example"; // String | - String type = "type_example"; // String | Transfer Type: ROLL_IN, ROLL_OUT - Long startTime = 56L; // Long | Only supports querying data from the past 90 days. - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10 Max:100 - String isolatedSymbol = "isolatedSymbol_example"; // String | isolated symbol - Long recvWindow = 56L; // Long | No more than 60000 + String asset = "BNB"; // String | + OrderType type = OrderType.fromValue("ROLL_IN"); // OrderType | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | + Long size = 10L; // Long | + String isolatedSymbol = "BNBUSDT"; // String | + Long recvWindow = 5000L; // Long | try { GetCrossMarginTransferHistoryResponse result = apiInstance.getCrossMarginTransferHistory(asset, type, startTime, endTime, current, size, isolatedSymbol, recvWindow); System.out.println(result); @@ -58,13 +58,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **asset** | **String**| | [optional] | -| **type** | **String**| Transfer Type: ROLL_IN, ROLL_OUT | [optional] | -| **startTime** | **Long**| Only supports querying data from the past 90 days. | [optional] | +| **type** | [**OrderType**](.md)| | [optional] [enum: ROLL_IN, ROLL_OUT] | +| **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10 Max:100 | [optional] | -| **isolatedSymbol** | **String**| isolated symbol | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **current** | **Long**| | [optional] | +| **size** | **Long**| | [optional] | +| **isolatedSymbol** | **String**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -90,7 +90,7 @@ No authorization required Query Max Transfer-Out Amount (USER_DATA) -Query Max Transfer-Out Amount * If isolatedSymbol is not sent, crossed margin data will be sent. Weight: 50(IP) +Query Max Transfer-Out Amount Weight(IP): 50 Security Type: USER_DATA Notes: - If isolatedSymbol is not sent, crossed margin data will be sent. ### Example ```java @@ -107,9 +107,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TransferApi apiInstance = new TransferApi(defaultClient); - String asset = "asset_example"; // String | - String isolatedSymbol = "isolatedSymbol_example"; // String | isolated symbol - Long recvWindow = 56L; // Long | No more than 60000 + String asset = "BTC"; // String | + String isolatedSymbol = "BTCUSDT"; // String | + Long recvWindow = 5000L; // Long | try { QueryMaxTransferOutAmountResponse result = apiInstance.queryMaxTransferOutAmount(asset, isolatedSymbol, recvWindow); System.out.println(result); @@ -129,8 +129,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **asset** | **String**| | | -| **isolatedSymbol** | **String**| isolated symbol | [optional] | -| **recvWindow** | **Long**| No more than 60000 | [optional] | +| **isolatedSymbol** | **String**| | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type diff --git a/clients/margin-trading/docs/UserDataStreamApi.md b/clients/margin-trading/docs/UserDataStreamApi.md new file mode 100644 index 000000000..d785b8d2a --- /dev/null +++ b/clients/margin-trading/docs/UserDataStreamApi.md @@ -0,0 +1,187 @@ +# UserDataStreamApi + +All URIs are relative to *https://api.binance.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**closeUserDataStream**](UserDataStreamApi.md#closeUserDataStream) | **DELETE** /sapi/v1/margin/listen-key | Close User Data Stream (USER_STREAM) | +| [**keepaliveUserDataStream**](UserDataStreamApi.md#keepaliveUserDataStream) | **PUT** /sapi/v1/margin/listen-key | Keepalive User Data Stream (USER_STREAM) | +| [**startUserDataStream**](UserDataStreamApi.md#startUserDataStream) | **POST** /sapi/v1/margin/listen-key | Start User Data Stream (USER_STREAM) | + + + +# **closeUserDataStream** +> closeUserDataStream() + +Close User Data Stream (USER_STREAM) + +Close out a user data stream. Weight(UID): 3000 Security Type: USER_STREAM + +### Example +```java +// Import classes: +import com.binance.connector.client.margin_trading.ApiClient; +import com.binance.connector.client.margin_trading.ApiException; +import com.binance.connector.client.margin_trading.Configuration; +import com.binance.connector.client.margin_trading.models.*; +import com.binance.connector.client.margin_trading.rest.api.UserDataStreamApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + UserDataStreamApi apiInstance = new UserDataStreamApi(defaultClient); + try { + apiInstance.closeUserDataStream(); + } catch (ApiException e) { + System.err.println("Exception when calling UserDataStreamApi#closeUserDataStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + + +# **keepaliveUserDataStream** +> keepaliveUserDataStream(keepaliveUserDataStreamRequest) + +Keepalive User Data Stream (USER_STREAM) + +Keepalive a user data stream to prevent a time out. Weight(UID): 1 Security Type: USER_STREAM + +### Example +```java +// Import classes: +import com.binance.connector.client.margin_trading.ApiClient; +import com.binance.connector.client.margin_trading.ApiException; +import com.binance.connector.client.margin_trading.Configuration; +import com.binance.connector.client.margin_trading.models.*; +import com.binance.connector.client.margin_trading.rest.api.UserDataStreamApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + UserDataStreamApi apiInstance = new UserDataStreamApi(defaultClient); + KeepaliveUserDataStreamRequest keepaliveUserDataStreamRequest = new KeepaliveUserDataStreamRequest(); // KeepaliveUserDataStreamRequest | + try { + apiInstance.keepaliveUserDataStream(keepaliveUserDataStreamRequest); + } catch (ApiException e) { + System.err.println("Exception when calling UserDataStreamApi#keepaliveUserDataStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **keepaliveUserDataStreamRequest** | [**KeepaliveUserDataStreamRequest**](KeepaliveUserDataStreamRequest.md)| | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + + +# **startUserDataStream** +> StartUserDataStreamResponse startUserDataStream() + +Start User Data Stream (USER_STREAM) + +Start a new user data stream. Weight(UID): 1 Security Type: USER_STREAM + +### Example +```java +// Import classes: +import com.binance.connector.client.margin_trading.ApiClient; +import com.binance.connector.client.margin_trading.ApiException; +import com.binance.connector.client.margin_trading.Configuration; +import com.binance.connector.client.margin_trading.models.*; +import com.binance.connector.client.margin_trading.rest.api.UserDataStreamApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + UserDataStreamApi apiInstance = new UserDataStreamApi(defaultClient); + try { + StartUserDataStreamResponse result = apiInstance.startUserDataStream(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserDataStreamApi#startUserDataStream"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**StartUserDataStreamResponse**](StartUserDataStreamResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Start User Data Stream | - | + diff --git a/clients/margin-trading/docs/UserLiabilityChange.md b/clients/margin-trading/docs/UserLiabilityChange.md index bb89f6e2c..402e90b2e 100644 --- a/clients/margin-trading/docs/UserLiabilityChange.md +++ b/clients/margin-trading/docs/UserLiabilityChange.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**tLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**iLowerCase** | **String** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**aLowerCase** | **String** | Asset | [optional] | +|**tLowerCase** | **String** | Liability Update Type | [optional] | +|**pLowerCase** | **String** | Principle Quantity | [optional] | +|**iLowerCase** | **String** | Interest Quantity | [optional] | diff --git a/clients/margin-trading/docs/WorkingSide.md b/clients/margin-trading/docs/WorkingSide.md new file mode 100644 index 000000000..0c0982862 --- /dev/null +++ b/clients/margin-trading/docs/WorkingSide.md @@ -0,0 +1,13 @@ + + +# WorkingSide + +## Enum + + +* `BUY` (value: `"BUY"`) + +* `SELL` (value: `"SELL"`) + + + diff --git a/clients/margin-trading/docs/WorkingTimeInForce.md b/clients/margin-trading/docs/WorkingTimeInForce.md new file mode 100644 index 000000000..635c78914 --- /dev/null +++ b/clients/margin-trading/docs/WorkingTimeInForce.md @@ -0,0 +1,15 @@ + + +# WorkingTimeInForce + +## Enum + + +* `GTC` (value: `"GTC"`) + +* `IOC` (value: `"IOC"`) + +* `FOK` (value: `"FOK"`) + + + diff --git a/clients/margin-trading/docs/WorkingType.md b/clients/margin-trading/docs/WorkingType.md new file mode 100644 index 000000000..31b6b462f --- /dev/null +++ b/clients/margin-trading/docs/WorkingType.md @@ -0,0 +1,13 @@ + + +# WorkingType + +## Enum + + +* `LIMIT` (value: `"LIMIT"`) + +* `LIMIT_MAKER` (value: `"LIMIT_MAKER"`) + + + diff --git a/clients/margin-trading/docs/rest-api/migration-guide.md b/clients/margin-trading/docs/rest-api/migration-guide.md index c1098dd7d..2627ef0ce 100644 --- a/clients/margin-trading/docs/rest-api/migration-guide.md +++ b/clients/margin-trading/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-margin-trading - 6.1.0 + 7.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-margin-trading - 6.1.0 + 7.0.0 ``` diff --git a/clients/margin-trading/example_rest.md b/clients/margin-trading/example_rest.md index d35a78bfe..008c16de4 100644 --- a/clients/margin-trading/example_rest.md +++ b/clients/margin-trading/example_rest.md @@ -1,134 +1,142 @@ ## Account -[POST /sapi/v1/margin/max-leverage](https://developers.binance.com/docs/margin_trading/account/Adjust-cross-margin-max-leverage) - adjustCrossMarginMaxLeverage - [AdjustCrossMarginMaxLeverageExample.java:53](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/AdjustCrossMarginMaxLeverageExample.java#L53) +[POST /sapi/v1/margin/max-leverage](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#adjust-cross-margin-max-leverage) - adjustCrossMarginMaxLeverage - [AdjustCrossMarginMaxLeverageExample.java:42](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/AdjustCrossMarginMaxLeverageExample.java#L42) -[DELETE /sapi/v1/margin/isolated/account](https://developers.binance.com/docs/margin_trading/account/Disable-Isolated-Margin-Account) - disableIsolatedMarginAccount - [DisableIsolatedMarginAccountExample.java:48](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/DisableIsolatedMarginAccountExample.java#L48) +[DELETE /sapi/v1/margin/isolated/account](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#disable-isolated-margin-account) - disableIsolatedMarginAccount - [DisableIsolatedMarginAccountExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/DisableIsolatedMarginAccountExample.java#L37) -[POST /sapi/v1/margin/isolated/account](https://developers.binance.com/docs/margin_trading/account/Enable-Isolated-Margin-Account) - enableIsolatedMarginAccount - [EnableIsolatedMarginAccountExample.java:49](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/EnableIsolatedMarginAccountExample.java#L49) +[POST /sapi/v1/margin/isolated/account](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#enable-isolated-margin-account) - enableIsolatedMarginAccount - [EnableIsolatedMarginAccountExample.java:38](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/EnableIsolatedMarginAccountExample.java#L38) -[GET /sapi/v1/bnbBurn](https://developers.binance.com/docs/margin_trading/account/Get-BNB-Burn-Status) - getBnbBurnStatus - [GetBnbBurnStatusExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/GetBnbBurnStatusExample.java#L47) +[GET /sapi/v1/bnbBurn](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#get-bnb-burn-status) - getBnbBurnStatus - [GetBnbBurnStatusExample.java:36](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/GetBnbBurnStatusExample.java#L36) -[GET /sapi/v1/margin/tradeCoeff](https://developers.binance.com/docs/margin_trading/account/Get-Summary-of-Margin-account) - getSummaryOfMarginAccount - [GetSummaryOfMarginAccountExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/GetSummaryOfMarginAccountExample.java#L47) +[GET /sapi/v1/margin/tradeCoeff](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#get-summary-of-margin-account) - getSummaryOfMarginAccount - [GetSummaryOfMarginAccountExample.java:36](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/GetSummaryOfMarginAccountExample.java#L36) -[GET /sapi/v1/margin/capital-flow](https://developers.binance.com/docs/margin_trading/account/Query-Cross-Isolated-Margin-Capital-Flow) - queryCrossIsolatedMarginCapitalFlow - [QueryCrossIsolatedMarginCapitalFlowExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossIsolatedMarginCapitalFlowExample.java#L47) +[GET /sapi/v1/margin/capital-flow](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-isolated-margin-capital-flow) - queryCrossIsolatedMarginCapitalFlow - [QueryCrossIsolatedMarginCapitalFlowExample.java:41](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossIsolatedMarginCapitalFlowExample.java#L41) -[GET /sapi/v1/margin/account](https://developers.binance.com/docs/margin_trading/account/Query-Cross-Margin-Account-Details) - queryCrossMarginAccountDetails - [QueryCrossMarginAccountDetailsExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossMarginAccountDetailsExample.java#L47) +[GET /sapi/v1/margin/account](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-margin-account-details) - queryCrossMarginAccountDetails - [QueryCrossMarginAccountDetailsExample.java:36](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossMarginAccountDetailsExample.java#L36) -[GET /sapi/v1/margin/crossMarginData](https://developers.binance.com/docs/margin_trading/account/Query-Cross-Margin-Fee-Data) - queryCrossMarginFeeData - [QueryCrossMarginFeeDataExample.java:48](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossMarginFeeDataExample.java#L48) +[GET /sapi/v1/margin/crossMarginData](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-margin-fee-data) - queryCrossMarginFeeData - [QueryCrossMarginFeeDataExample.java:38](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossMarginFeeDataExample.java#L38) -[GET /sapi/v1/margin/isolated/accountLimit](https://developers.binance.com/docs/margin_trading/account/Query-Enabled-Isolated-Margin-Account-Limit) - queryEnabledIsolatedMarginAccountLimit - [QueryEnabledIsolatedMarginAccountLimitExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryEnabledIsolatedMarginAccountLimitExample.java#L47) +[GET /sapi/v1/margin/isolated/accountLimit](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-enabled-isolated-margin-account-limit) - queryEnabledIsolatedMarginAccountLimit - [QueryEnabledIsolatedMarginAccountLimitExample.java:36](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryEnabledIsolatedMarginAccountLimitExample.java#L36) -[GET /sapi/v1/margin/isolated/account](https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Account-Info) - queryIsolatedMarginAccountInfo - [QueryIsolatedMarginAccountInfoExample.java:49](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryIsolatedMarginAccountInfoExample.java#L49) +[GET /sapi/v1/margin/isolated/account](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-isolated-margin-account-info) - queryIsolatedMarginAccountInfo - [QueryIsolatedMarginAccountInfoExample.java:38](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryIsolatedMarginAccountInfoExample.java#L38) -[GET /sapi/v1/margin/isolatedMarginData](https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Fee-Data) - queryIsolatedMarginFeeData - [QueryIsolatedMarginFeeDataExample.java:48](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryIsolatedMarginFeeDataExample.java#L48) +[GET /sapi/v1/margin/isolatedMarginData](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-isolated-margin-fee-data) - queryIsolatedMarginFeeData - [QueryIsolatedMarginFeeDataExample.java:38](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryIsolatedMarginFeeDataExample.java#L38) ## BorrowRepay -[GET /sapi/v1/margin/next-hourly-interest-rate](https://developers.binance.com/docs/margin_trading/borrow-and-repay/Get-a-future-hourly-interest-rate) - getFutureHourlyInterestRate - [GetFutureHourlyInterestRateExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/GetFutureHourlyInterestRateExample.java#L47) +[GET /sapi/v1/margin/next-hourly-interest-rate](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#get-future-hourly-interest-rate) - getFutureHourlyInterestRate - [GetFutureHourlyInterestRateExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/GetFutureHourlyInterestRateExample.java#L37) -[GET /sapi/v1/margin/interestHistory](https://developers.binance.com/docs/margin_trading/borrow-and-repay/Get-Interest-History) - getInterestHistory - [GetInterestHistoryExample.java:59](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/GetInterestHistoryExample.java#L59) +[GET /sapi/v1/margin/interestHistory](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#get-interest-history) - getInterestHistory - [GetInterestHistoryExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/GetInterestHistoryExample.java#L47) -[POST /sapi/v1/margin/borrow-repay](https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-account-borrow-repay) - marginAccountBorrowRepay - [MarginAccountBorrowRepayExample.java:48](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/MarginAccountBorrowRepayExample.java#L48) +[POST /sapi/v1/margin/borrow-repay](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#margin-account-borrow-repay) - marginAccountBorrowRepay - [MarginAccountBorrowRepayExample.java:39](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/MarginAccountBorrowRepayExample.java#L39) -[GET /sapi/v1/margin/borrow-repay](https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Borrow-Repay) - queryBorrowRepayRecordsInMarginAccount - [QueryBorrowRepayRecordsInMarginAccountExample.java:52](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryBorrowRepayRecordsInMarginAccountExample.java#L52) +[GET /sapi/v1/margin/borrow-repay](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-borrow-repay-records-in-margin-account) - queryBorrowRepayRecordsInMarginAccount - [QueryBorrowRepayRecordsInMarginAccountExample.java:43](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryBorrowRepayRecordsInMarginAccountExample.java#L43) -[GET /sapi/v1/margin/interestRateHistory](https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Margin-Interest-Rate-History) - queryMarginInterestRateHistory - [QueryMarginInterestRateHistoryExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryMarginInterestRateHistoryExample.java#L47) +[GET /sapi/v1/margin/interestRateHistory](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-margin-interest-rate-history) - queryMarginInterestRateHistory - [QueryMarginInterestRateHistoryExample.java:36](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryMarginInterestRateHistoryExample.java#L36) -[GET /sapi/v1/margin/maxBorrowable](https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Max-Borrow) - queryMaxBorrow - [QueryMaxBorrowExample.java:49](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryMaxBorrowExample.java#L49) +[GET /sapi/v1/margin/maxBorrowable](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-max-borrow) - queryMaxBorrow - [QueryMaxBorrowExample.java:38](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryMaxBorrowExample.java#L38) ## MarketData -[GET /sapi/v1/margin/crossMarginCollateralRatio](https://developers.binance.com/docs/margin_trading/market-data/Cross-margin-collateral-ratio) - crossMarginCollateralRatio - [CrossMarginCollateralRatioExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/CrossMarginCollateralRatioExample.java#L47) +[GET /sapi/v1/margin/crossMarginCollateralRatio](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#cross-margin-collateral-ratio) - crossMarginCollateralRatio - [CrossMarginCollateralRatioExample.java:36](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/CrossMarginCollateralRatioExample.java#L36) -[GET /sapi/v1/margin/allPairs](https://developers.binance.com/docs/margin_trading/market-data/Get-All-Cross-Margin-Pairs) - getAllCrossMarginPairs - [GetAllCrossMarginPairsExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllCrossMarginPairsExample.java#L47) +[GET /sapi/v1/margin/allPairs](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-cross-margin-pairs) - getAllCrossMarginPairs - [GetAllCrossMarginPairsExample.java:36](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllCrossMarginPairsExample.java#L36) -[GET /sapi/v1/margin/isolated/allPairs](https://developers.binance.com/docs/margin_trading/market-data/Get-All-Isolated-Margin-Symbol) - getAllIsolatedMarginSymbol - [GetAllIsolatedMarginSymbolExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllIsolatedMarginSymbolExample.java#L47) +[GET /sapi/v1/margin/isolated/allPairs](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-isolated-margin-symbol) - getAllIsolatedMarginSymbol - [GetAllIsolatedMarginSymbolExample.java:36](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllIsolatedMarginSymbolExample.java#L36) -[GET /sapi/v1/margin/allAssets](https://developers.binance.com/docs/margin_trading/market-data/Get-All-Margin-Assets) - getAllMarginAssets - [GetAllMarginAssetsExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllMarginAssetsExample.java#L47) +[GET /sapi/v1/margin/allAssets](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-margin-assets) - getAllMarginAssets - [GetAllMarginAssetsExample.java:36](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllMarginAssetsExample.java#L36) -[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) +[GET /sapi/v1/margin/delist-schedule](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-delist-schedule) - getDelistSchedule - [GetDelistScheduleExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetDelistScheduleExample.java#L37) -[GET /sapi/v1/margin/limit-price-pairs](https://developers.binance.com/docs/margin_trading/market-data/Get-Limit-Price-Pairs) - getLimitPricePairs - [GetLimitPricePairsExample.java:56](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetLimitPricePairsExample.java#L56) +[GET /sapi/v1/margin/limit-price-pairs](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-limit-price-pairs) - getLimitPricePairs - [GetLimitPricePairsExample.java:45](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetLimitPricePairsExample.java#L45) -[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) +[GET /sapi/v1/margin/list-schedule](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-list-schedule) - getListSchedule - [GetListScheduleExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetListScheduleExample.java#L37) -[GET /sapi/v1/margin/risk-based-liquidation-ratio](https://developers.binance.com/docs/margin_trading/market-data/Get-Margin-Asset-Risk-Based-Liquidation-Ratio) - getMarginAssetRiskBasedLiquidationRatio - [GetMarginAssetRiskBasedLiquidationRatioExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetMarginAssetRiskBasedLiquidationRatioExample.java#L47) +[GET /sapi/v1/margin/risk-based-liquidation-ratio](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-margin-asset-risk-based-liquidation-ratio) - getMarginAssetRiskBasedLiquidationRatio - [GetMarginAssetRiskBasedLiquidationRatioExample.java:36](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetMarginAssetRiskBasedLiquidationRatioExample.java#L36) -[GET /sapi/v1/margin/restricted-asset](https://developers.binance.com/docs/margin_trading/market-data/Get-Margin-Restricted-Assets) - getMarginRestrictedAssets - [GetMarginRestrictedAssetsExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetMarginRestrictedAssetsExample.java#L47) +[GET /sapi/v1/margin/restricted-asset](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-margin-restricted-assets) - getMarginRestrictedAssets - [GetMarginRestrictedAssetsExample.java:36](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetMarginRestrictedAssetsExample.java#L36) -[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) +[GET /sapi/v1/margin/isolatedMarginTier](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-isolated-margin-tier-data) - queryIsolatedMarginTierData - [QueryIsolatedMarginTierDataExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryIsolatedMarginTierDataExample.java#L37) -[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) +[GET /sapi/v1/margin/leverageBracket](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-liability-coin-leverage-bracket-in-cross-margin-pro-mode) - queryLiabilityCoinLeverageBracketInCrossMarginProMode - [QueryLiabilityCoinLeverageBracketInCrossMarginProModeExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryLiabilityCoinLeverageBracketInCrossMarginProModeExample.java#L37) -[GET /sapi/v1/margin/available-inventory](https://developers.binance.com/docs/margin_trading/market-data/Query-margin-avaliable-inventory) - queryMarginAvailableInventory - [QueryMarginAvailableInventoryExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryMarginAvailableInventoryExample.java#L47) +[GET /sapi/v1/margin/available-inventory](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-margin-available-inventory) - queryMarginAvailableInventory - [QueryMarginAvailableInventoryExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryMarginAvailableInventoryExample.java#L37) -[GET /sapi/v1/margin/priceIndex](https://developers.binance.com/docs/margin_trading/market-data/Query-Margin-PriceIndex) - queryMarginPriceindex - [QueryMarginPriceindexExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryMarginPriceindexExample.java#L47) +[GET /sapi/v1/margin/priceIndex](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-margin-priceindex) - queryMarginPriceindex - [QueryMarginPriceindexExample.java:36](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryMarginPriceindexExample.java#L36) -## RiskDataStream +## Trade -[DELETE /sapi/v1/margin/listen-key](https://developers.binance.com/docs/margin_trading/risk-data-stream/Close-User-Data-Stream) - closeUserDataStream - [CloseUserDataStreamExample.java:45](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/riskdatastream/CloseUserDataStreamExample.java#L45) +[POST /sapi/v1/margin/apiKey](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#create-special-key) - createSpecialKey - [CreateSpecialKeyExample.java:67](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/CreateSpecialKeyExample.java#L67) -[PUT /sapi/v1/margin/listen-key](https://developers.binance.com/docs/margin_trading/risk-data-stream/Keepalive-User-Data-Stream) - keepaliveUserDataStream - [KeepaliveUserDataStreamExample.java:46](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/riskdatastream/KeepaliveUserDataStreamExample.java#L46) +[DELETE /sapi/v1/margin/apiKey](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#delete-special-key) - deleteSpecialKey - [DeleteSpecialKeyExample.java:43](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/DeleteSpecialKeyExample.java#L43) -[POST /sapi/v1/margin/listen-key](https://developers.binance.com/docs/margin_trading/risk-data-stream/Start-User-Data-Stream) - startUserDataStream - [StartUserDataStreamExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/riskdatastream/StartUserDataStreamExample.java#L47) +[PUT /sapi/v1/margin/apiKey/ip](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#edit-ip-for-special-key) - editIpForSpecialKey - [EditIpForSpecialKeyExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/EditIpForSpecialKeyExample.java#L37) -## Trade +[POST /sapi/v1/margin/exit-special-key-mode](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#exit-special-key-mode) - exitSpecialKeyMode - [ExitSpecialKeyModeExample.java:52](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/ExitSpecialKeyModeExample.java#L52) -[POST /sapi/v1/margin/apiKey](https://developers.binance.com/docs/margin_trading/trade/Create-Special-Key-of-Low-Latency-Trading) - createSpecialKey - [CreateSpecialKeyExample.java:59](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/CreateSpecialKeyExample.java#L59) +[GET /sapi/v1/margin/forceLiquidationRec](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-force-liquidation-record) - getForceLiquidationRecord - [GetForceLiquidationRecordExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetForceLiquidationRecordExample.java#L37) -[DELETE /sapi/v1/margin/apiKey](https://developers.binance.com/docs/margin_trading/trade/Delete-Special-Key-of-Low-Latency-Trading) - deleteSpecialKey - [DeleteSpecialKeyExample.java:48](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/DeleteSpecialKeyExample.java#L48) +[GET /sapi/v1/margin/exchange-small-liability](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-small-liability-exchange-coin-list) - getSmallLiabilityExchangeCoinList - [GetSmallLiabilityExchangeCoinListExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetSmallLiabilityExchangeCoinListExample.java#L37) -[PUT /sapi/v1/margin/apiKey/ip](https://developers.binance.com/docs/margin_trading/trade/Edit-ip-for-Special-Key-of-Low-Latency-Trading) - editIpForSpecialKey - [EditIpForSpecialKeyExample.java:48](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/EditIpForSpecialKeyExample.java#L48) +[GET /sapi/v1/margin/exchange-small-liability-history](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-small-liability-exchange-history) - getSmallLiabilityExchangeHistory - [GetSmallLiabilityExchangeHistoryExample.java:36](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetSmallLiabilityExchangeHistoryExample.java#L36) -[GET /sapi/v1/margin/forceLiquidationRec](https://developers.binance.com/docs/margin_trading/trade/Get-Force-Liquidation-Record) - getForceLiquidationRecord - [GetForceLiquidationRecordExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetForceLiquidationRecordExample.java#L47) +[POST /sapi/v1/margin/liquidation-loan/repay](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#liquidation-loan-repay) - liquidationLoanRepay - [LiquidationLoanRepayExample.java:41](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/LiquidationLoanRepayExample.java#L41) -[GET /sapi/v1/margin/exchange-small-liability](https://developers.binance.com/docs/margin_trading/trade/Get-Small-Liability-Exchange-Coin-List) - getSmallLiabilityExchangeCoinList - [GetSmallLiabilityExchangeCoinListExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetSmallLiabilityExchangeCoinListExample.java#L47) +[DELETE /sapi/v1/margin/openOrders](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-all-open-orders-on-asymbol) - marginAccountCancelAllOpenOrdersOnASymbol - [MarginAccountCancelAllOpenOrdersOnASymbolExample.java:38](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelAllOpenOrdersOnASymbolExample.java#L38) -[GET /sapi/v1/margin/exchange-small-liability-history](https://developers.binance.com/docs/margin_trading/trade/Get-Small-Liability-Exchange-History) - getSmallLiabilityExchangeHistory - [GetSmallLiabilityExchangeHistoryExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetSmallLiabilityExchangeHistoryExample.java#L47) +[DELETE /sapi/v1/margin/orderList](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-oco) - marginAccountCancelOco - [MarginAccountCancelOcoExample.java:38](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelOcoExample.java#L38) -[DELETE /sapi/v1/margin/openOrders](https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-All-Open-Orders) - marginAccountCancelAllOpenOrdersOnASymbol - [MarginAccountCancelAllOpenOrdersOnASymbolExample.java:48](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelAllOpenOrdersOnASymbolExample.java#L48) +[DELETE /sapi/v1/margin/order](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-order) - marginAccountCancelOrder - [MarginAccountCancelOrderExample.java:38](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelOrderExample.java#L38) -[DELETE /sapi/v1/margin/orderList](https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-OCO) - marginAccountCancelOco - [MarginAccountCancelOcoExample.java:48](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelOcoExample.java#L48) +[POST /sapi/v1/margin/order/oco](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco) - marginAccountNewOco - [MarginAccountNewOcoExample.java:41](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOcoExample.java#L41) -[DELETE /sapi/v1/margin/order](https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-Order) - marginAccountCancelOrder - [MarginAccountCancelOrderExample.java:48](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelOrderExample.java#L48) +[POST /sapi/v1/margin/order](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-order) - marginAccountNewOrder - [MarginAccountNewOrderExample.java:42](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOrderExample.java#L42) -[POST /sapi/v1/margin/order/oco](https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OCO) - marginAccountNewOco - [MarginAccountNewOcoExample.java:51](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOcoExample.java#L51) +[POST /sapi/v1/margin/order/oto](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oto) - marginAccountNewOto - [MarginAccountNewOtoExample.java:69](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtoExample.java#L69) -[POST /sapi/v1/margin/order](https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-Order) - marginAccountNewOrder - [MarginAccountNewOrderExample.java:50](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOrderExample.java#L50) +[POST /sapi/v1/margin/order/otoco](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-otoco) - marginAccountNewOtoco - [MarginAccountNewOtocoExample.java:72](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtocoExample.java#L72) -[POST /sapi/v1/margin/order/oto](https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OTO) - marginAccountNewOto - [MarginAccountNewOtoExample.java:63](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtoExample.java#L63) +[POST /sapi/v1/margin/manual-liquidation](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-manual-liquidation) - marginManualLiquidation - [MarginManualLiquidationExample.java:40](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginManualLiquidationExample.java#L40) -[POST /sapi/v1/margin/order/otoco](https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OTOCO) - marginAccountNewOtoco - [MarginAccountNewOtocoExample.java:60](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtocoExample.java#L60) +[GET /sapi/v1/margin/rateLimit/order](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-current-margin-order-count-usage) - queryCurrentMarginOrderCountUsage - [QueryCurrentMarginOrderCountUsageExample.java:38](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryCurrentMarginOrderCountUsageExample.java#L38) -[POST /sapi/v1/margin/manual-liquidation](https://developers.binance.com/docs/margin_trading/trade/Margin-Manual-Liquidation) - marginManualLiquidation - [MarginManualLiquidationExample.java:49](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginManualLiquidationExample.java#L49) +[GET /sapi/v1/margin/liquidation-loan](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-liquidation-loan) - queryLiquidationLoan - [QueryLiquidationLoanExample.java:40](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryLiquidationLoanExample.java#L40) -[GET /sapi/v1/margin/rateLimit/order](https://developers.binance.com/docs/margin_trading/trade/Query-Current-Margin-Order-Count-Usage) - queryCurrentMarginOrderCountUsage - [QueryCurrentMarginOrderCountUsageExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryCurrentMarginOrderCountUsageExample.java#L47) +[GET /sapi/v1/margin/liquidation-loan/repay-history](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-liquidation-loan-repay-history) - queryLiquidationLoanRepayHistory - [QueryLiquidationLoanRepayHistoryExample.java:41](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryLiquidationLoanRepayHistoryExample.java#L41) -[GET /sapi/v1/margin/allOrderList](https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-all-OCO) - queryMarginAccountsAllOco - [QueryMarginAccountsAllOcoExample.java:48](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsAllOcoExample.java#L48) +[GET /sapi/v1/margin/allOrderList](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-all-oco) - queryMarginAccountsAllOco - [QueryMarginAccountsAllOcoExample.java:38](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsAllOcoExample.java#L38) -[GET /sapi/v1/margin/allOrders](https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-Orders) - queryMarginAccountsAllOrders - [QueryMarginAccountsAllOrdersExample.java:50](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsAllOrdersExample.java#L50) +[GET /sapi/v1/margin/allOrders](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-all-orders) - queryMarginAccountsAllOrders - [QueryMarginAccountsAllOrdersExample.java:40](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsAllOrdersExample.java#L40) -[GET /sapi/v1/margin/orderList](https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-OCO) - queryMarginAccountsOco - [QueryMarginAccountsOcoExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOcoExample.java#L47) +[GET /sapi/v1/margin/orderList](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-oco) - queryMarginAccountsOco - [QueryMarginAccountsOcoExample.java:38](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOcoExample.java#L38) -[GET /sapi/v1/margin/openOrderList](https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Open-OCO) - queryMarginAccountsOpenOco - [QueryMarginAccountsOpenOcoExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOpenOcoExample.java#L47) +[GET /sapi/v1/margin/openOrderList](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-open-oco) - queryMarginAccountsOpenOco - [QueryMarginAccountsOpenOcoExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOpenOcoExample.java#L37) -[GET /sapi/v1/margin/openOrders](https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Open-Orders) - queryMarginAccountsOpenOrders - [QueryMarginAccountsOpenOrdersExample.java:50](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOpenOrdersExample.java#L50) +[GET /sapi/v1/margin/openOrders](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-open-orders) - queryMarginAccountsOpenOrders - [QueryMarginAccountsOpenOrdersExample.java:41](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOpenOrdersExample.java#L41) -[GET /sapi/v1/margin/order](https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Order) - queryMarginAccountsOrder - [QueryMarginAccountsOrderExample.java:49](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOrderExample.java#L49) +[GET /sapi/v1/margin/order](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-order) - queryMarginAccountsOrder - [QueryMarginAccountsOrderExample.java:39](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOrderExample.java#L39) -[GET /sapi/v1/margin/myTrades](https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Trade-List) - queryMarginAccountsTradeList - [QueryMarginAccountsTradeListExample.java:49](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsTradeListExample.java#L49) +[GET /sapi/v1/margin/myTrades](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-trade-list) - queryMarginAccountsTradeList - [QueryMarginAccountsTradeListExample.java:39](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsTradeListExample.java#L39) -[GET /sapi/v1/margin/myPreventedMatches](https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Prevented-Matches) - queryPreventedMatches - [QueryPreventedMatchesExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryPreventedMatchesExample.java#L47) +[GET /sapi/v1/margin/myPreventedMatches](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-prevented-matches) - queryPreventedMatches - [QueryPreventedMatchesExample.java:45](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryPreventedMatchesExample.java#L45) -[GET /sapi/v1/margin/apiKey](https://developers.binance.com/docs/margin_trading/trade/Query-Special-Key-of-Low-Latency-Trading) - querySpecialKey - [QuerySpecialKeyExample.java:48](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QuerySpecialKeyExample.java#L48) +[GET /sapi/v1/margin/apiKey](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-special-key) - querySpecialKey - [QuerySpecialKeyExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QuerySpecialKeyExample.java#L37) -[GET /sapi/v1/margin/api-key-list](https://developers.binance.com/docs/margin_trading/trade/Query-Special-Key-List-of-Low-Latency-Trading) - querySpecialKeyList - [QuerySpecialKeyListExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QuerySpecialKeyListExample.java#L47) +[GET /sapi/v1/margin/api-key-list](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-special-key-list) - querySpecialKeyList - [QuerySpecialKeyListExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QuerySpecialKeyListExample.java#L37) -[POST /sapi/v1/margin/exchange-small-liability](https://developers.binance.com/docs/margin_trading/trade/Small-Liability-Exchange) - smallLiabilityExchange - [SmallLiabilityExchangeExample.java:48](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/SmallLiabilityExchangeExample.java#L48) +[POST /sapi/v1/margin/exchange-small-liability](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#small-liability-exchange) - smallLiabilityExchange - [SmallLiabilityExchangeExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/SmallLiabilityExchangeExample.java#L37) ## Transfer -[GET /sapi/v1/margin/transfer](https://developers.binance.com/docs/margin_trading/transfer/Get-Cross-Margin-Transfer-History) - getCrossMarginTransferHistory - [GetCrossMarginTransferHistoryExample.java:49](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/transfer/GetCrossMarginTransferHistoryExample.java#L49) +[GET /sapi/v1/margin/transfer](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/transfer#get-cross-margin-transfer-history) - getCrossMarginTransferHistory - [GetCrossMarginTransferHistoryExample.java:39](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/transfer/GetCrossMarginTransferHistoryExample.java#L39) + +[GET /sapi/v1/margin/maxTransferable](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/transfer#query-max-transfer-out-amount) - queryMaxTransferOutAmount - [QueryMaxTransferOutAmountExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/transfer/QueryMaxTransferOutAmountExample.java#L37) + +## UserDataStream + +[DELETE /sapi/v1/margin/listen-key](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/user-data-stream#close-user-data-stream) - closeUserDataStream - [CloseUserDataStreamExample.java:34](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/userdatastream/CloseUserDataStreamExample.java#L34) + +[PUT /sapi/v1/margin/listen-key](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/user-data-stream#keepalive-user-data-stream) - keepaliveUserDataStream - [KeepaliveUserDataStreamExample.java:36](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/userdatastream/KeepaliveUserDataStreamExample.java#L36) -[GET /sapi/v1/margin/maxTransferable](https://developers.binance.com/docs/margin_trading/transfer/Query-Max-Transfer-Out-Amount) - queryMaxTransferOutAmount - [QueryMaxTransferOutAmountExample.java:48](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/transfer/QueryMaxTransferOutAmountExample.java#L48) +[POST /sapi/v1/margin/listen-key](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/user-data-stream#start-user-data-stream) - startUserDataStream - [StartUserDataStreamExample.java:36](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/userdatastream/StartUserDataStreamExample.java#L36) diff --git a/clients/margin-trading/pom.xml b/clients/margin-trading/pom.xml index 0a6b897c2..85f50e066 100644 --- a/clients/margin-trading/pom.xml +++ b/clients/margin-trading/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-margin-trading margin-trading - 6.1.1 + 7.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/JSON.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/JSON.java index f3528f92f..3758fe531 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/JSON.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -114,9 +114,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.margin_trading.rest.model .AdjustCrossMarginMaxLeverageResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.margin_trading.rest.model.AssetNames - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.margin_trading.rest.model.CreateSpecialKeyRequest .CustomTypeAdapterFactory()); @@ -145,6 +142,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.margin_trading.rest.model .EnableIsolatedMarginAccountResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.margin_trading.rest.model.ExitSpecialKeyModeRequest + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.margin_trading.rest.model .GetAllCrossMarginPairsResponse.CustomTypeAdapterFactory()); @@ -235,6 +235,12 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.margin_trading.rest.model .KeepaliveUserDataStreamRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.margin_trading.rest.model + .LiquidationLoanRepayRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.margin_trading.rest.model + .LiquidationLoanRepayResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.margin_trading.rest.model .MarginAccountBorrowRepayRequest.CustomTypeAdapterFactory()); @@ -400,6 +406,16 @@ private static Class getClassByDiscriminator( new com.binance.connector.client.margin_trading.rest.model .QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.margin_trading.rest.model + .QueryLiquidationLoanRepayHistoryResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.margin_trading.rest.model + .QueryLiquidationLoanRepayHistoryResponseRowsInner + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.margin_trading.rest.model + .QueryLiquidationLoanResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.margin_trading.rest.model .QueryMarginAccountsAllOcoResponse.CustomTypeAdapterFactory()); @@ -450,9 +466,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.margin_trading.rest.model .QueryMarginAvailableInventoryResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.margin_trading.rest.model - .QueryMarginAvailableInventoryResponseAssets.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.margin_trading.rest.model .QueryMarginInterestRateHistoryResponse.CustomTypeAdapterFactory()); diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/AccountApi.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/AccountApi.java index b0fd6eeb5..dd7239e86 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/AccountApi.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/AccountApi.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -26,6 +26,7 @@ import com.binance.connector.client.margin_trading.rest.model.EnableIsolatedMarginAccountResponse; import com.binance.connector.client.margin_trading.rest.model.GetBnbBurnStatusResponse; import com.binance.connector.client.margin_trading.rest.model.GetSummaryOfMarginAccountResponse; +import com.binance.connector.client.margin_trading.rest.model.OrderType; import com.binance.connector.client.margin_trading.rest.model.QueryCrossIsolatedMarginCapitalFlowResponse; import com.binance.connector.client.margin_trading.rest.model.QueryCrossMarginAccountDetailsResponse; import com.binance.connector.client.margin_trading.rest.model.QueryCrossMarginFeeDataResponse; @@ -55,7 +56,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-margin-trading/6.1.0 (Java/%s; %s; %s)", + "binance-margin-trading/7.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -106,7 +107,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Adjust + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#adjust-cross-margin-max-leverage">Adjust * cross margin max leverage (USER_DATA) Documentation */ private okhttp3.Call adjustCrossMarginMaxLeverageCall( @@ -208,12 +209,12 @@ private okhttp3.Call adjustCrossMarginMaxLeverageValidateBeforeCall( } /** - * Adjust cross margin max leverage (USER_DATA) Adjust cross margin max leverage * The margin - * level need higher than the initial risk ratio of adjusted leverage, the initial risk ratio of - * 3x is 1.5 , the initial risk ratio of 5x is 1.25; The detail conditions on how to switch - * between Cross Margin Classic and Cross Margin Pro can refer to [the + * Adjust cross margin max leverage (USER_DATA) Adjust cross margin max leverage Weight(UID): + * 3000, 1 times/min per IP Security Type: USER_DATA Notes: - The margin level need higher than + * the initial risk ratio of adjusted leverage, the initial risk ratio of 3x is 1.5 , the + * initial risk ratio of 5x is 1.25; The detail conditions on how to switch between Cross Margin + * Classic and Cross Margin Pro can refer to [the * FAQ](https://www.binance.com/en/support/faq/how-to-activate-the-cross-margin-pro-mode-on-binance-e27786da05e743a694b8c625b3bc475d). - * Weight: 3000 * * @param adjustCrossMarginMaxLeverageRequest (required) * @return ApiResponse<AdjustCrossMarginMaxLeverageResponse> @@ -227,7 +228,7 @@ private okhttp3.Call adjustCrossMarginMaxLeverageValidateBeforeCall( * * * @see Adjust + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#adjust-cross-margin-max-leverage">Adjust * cross margin max leverage (USER_DATA) Documentation */ public ApiResponse adjustCrossMarginMaxLeverage( @@ -244,7 +245,7 @@ public ApiResponse adjustCrossMarginMaxLev * Build call for disableIsolatedMarginAccount * * @param symbol (required) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -255,7 +256,7 @@ public ApiResponse adjustCrossMarginMaxLev * * * @see Disable + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#disable-isolated-margin-account">Disable * Isolated Margin Account (TRADE) Documentation */ private okhttp3.Call disableIsolatedMarginAccountCall(String symbol, Long recvWindow) @@ -357,10 +358,11 @@ private okhttp3.Call disableIsolatedMarginAccountValidateBeforeCall( /** * Disable Isolated Margin Account (TRADE) Disable isolated margin account for a specific - * symbol. Each trading pair can only be deactivated once every 24 hours. Weight: 300(UID) + * symbol. Each trading pair can only be deactivated once every 24 hours. Weight(UID): 300 + * Security Type: TRADE * * @param symbol (required) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<DisableIsolatedMarginAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -372,11 +374,11 @@ private okhttp3.Call disableIsolatedMarginAccountValidateBeforeCall( * * * @see Disable + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#disable-isolated-margin-account">Disable * Isolated Margin Account (TRADE) Documentation */ public ApiResponse disableIsolatedMarginAccount( - @NotNull String symbol, Long recvWindow) throws ApiException { + @NotNull String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = disableIsolatedMarginAccountValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -398,7 +400,7 @@ public ApiResponse disableIsolatedMarginAc * * * @see Enable + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#enable-isolated-margin-account">Enable * Isolated Margin Account (TRADE) Documentation */ private okhttp3.Call enableIsolatedMarginAccountCall( @@ -505,7 +507,8 @@ private okhttp3.Call enableIsolatedMarginAccountValidateBeforeCall( /** * Enable Isolated Margin Account (TRADE) Enable isolated margin account for a specific - * symbol(Only supports activation of previously disabled accounts). Weight: 300(UID) + * symbol(Only supports activation of previously disabled accounts). Weight(UID): 300 Security + * Type: TRADE * * @param enableIsolatedMarginAccountRequest (required) * @return ApiResponse<EnableIsolatedMarginAccountResponse> @@ -519,7 +522,7 @@ private okhttp3.Call enableIsolatedMarginAccountValidateBeforeCall( * * * @see Enable + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#enable-isolated-margin-account">Enable * Isolated Margin Account (TRADE) Documentation */ public ApiResponse enableIsolatedMarginAccount( @@ -535,7 +538,7 @@ public ApiResponse enableIsolatedMarginAcco /** * Build call for getBnbBurnStatus * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -546,7 +549,7 @@ public ApiResponse enableIsolatedMarginAcco * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#get-bnb-burn-status">Get * BNB Burn Status (USER_DATA) Documentation */ private okhttp3.Call getBnbBurnStatusCall(Long recvWindow) throws ApiException { @@ -639,9 +642,9 @@ private okhttp3.Call getBnbBurnStatusValidateBeforeCall(Long recvWindow) throws } /** - * Get BNB Burn Status (USER_DATA) Get BNB Burn Status Weight: 1(IP) + * Get BNB Burn Status (USER_DATA) Get BNB Burn Status Weight(IP): 1 Security Type: USER_DATA * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<GetBnbBurnStatusResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -653,10 +656,10 @@ private okhttp3.Call getBnbBurnStatusValidateBeforeCall(Long recvWindow) throws * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#get-bnb-burn-status">Get * BNB Burn Status (USER_DATA) Documentation */ - public ApiResponse getBnbBurnStatus(Long recvWindow) + public ApiResponse getBnbBurnStatus(@Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getBnbBurnStatusValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = @@ -667,7 +670,7 @@ public ApiResponse getBnbBurnStatus(Long recvWindow) /** * Build call for getSummaryOfMarginAccount * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -678,7 +681,7 @@ public ApiResponse getBnbBurnStatus(Long recvWindow) * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#get-summary-of-margin-account">Get * Summary of Margin account (USER_DATA) Documentation */ private okhttp3.Call getSummaryOfMarginAccountCall(Long recvWindow) throws ApiException { @@ -772,10 +775,10 @@ private okhttp3.Call getSummaryOfMarginAccountValidateBeforeCall(Long recvWindow } /** - * Get Summary of Margin account (USER_DATA) Get personal margin level information Weight: - * 10(IP) + * Get Summary of Margin account (USER_DATA) Get personal margin level information Weight(IP): + * 10 Security Type: USER_DATA * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<GetSummaryOfMarginAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -787,11 +790,11 @@ private okhttp3.Call getSummaryOfMarginAccountValidateBeforeCall(Long recvWindow * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#get-summary-of-margin-account">Get * Summary of Margin account (USER_DATA) Documentation */ - public ApiResponse getSummaryOfMarginAccount(Long recvWindow) - throws ApiException { + public ApiResponse getSummaryOfMarginAccount( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getSummaryOfMarginAccountValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -802,16 +805,13 @@ public ApiResponse getSummaryOfMarginAccount( * Build call for queryCrossIsolatedMarginCapitalFlow * * @param asset (optional) - * @param symbol isolated margin pair (optional) - * @param type Transfer Type: ROLL_IN, ROLL_OUT (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param symbol Mandatory for Isolated data (optional) + * @param type (optional) + * @param startTime (optional) * @param endTime (optional) - * @param fromId If `fromId` is set, data with `id` greater than - * `fromId` will be returned. Otherwise, the latest data will be returned. - * (optional) - * @param limit Limit on the number of data records returned per request. Default: 500; Maximum: - * 1000. (optional) - * @param recvWindow No more than 60000 (optional) + * @param fromId (optional) + * @param limit (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -822,13 +822,13 @@ public ApiResponse getSummaryOfMarginAccount( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-isolated-margin-capital-flow">Query * Cross Isolated Margin Capital Flow (USER_DATA) Documentation */ private okhttp3.Call queryCrossIsolatedMarginCapitalFlowCall( String asset, String symbol, - String type, + OrderType type, Long startTime, Long endTime, Long fromId, @@ -925,7 +925,7 @@ private okhttp3.Call queryCrossIsolatedMarginCapitalFlowCall( private okhttp3.Call queryCrossIsolatedMarginCapitalFlowValidateBeforeCall( String asset, String symbol, - String type, + OrderType type, Long startTime, Long endTime, Long fromId, @@ -950,7 +950,7 @@ private okhttp3.Call queryCrossIsolatedMarginCapitalFlowValidateBeforeCall( "queryCrossIsolatedMarginCapitalFlow", String.class, String.class, - String.class, + OrderType.class, Long.class, Long.class, Long.class, @@ -976,19 +976,19 @@ private okhttp3.Call queryCrossIsolatedMarginCapitalFlowValidateBeforeCall( /** * Query Cross Isolated Margin Capital Flow (USER_DATA) Query Cross Isolated Margin Capital Flow - * Weight: 100(IP) + * Weight(IP): 100 Security Type: USER_DATA Notes: - Only supports querying the data of the last + * 90 days - The time between startTime and endTime cannot be longer than 7 days. - If fromId is + * set, the data with id > fromId will be returned. Otherwise the latest data will be + * returned - To query isolated data, Symbol needs to be entered. * * @param asset (optional) - * @param symbol isolated margin pair (optional) - * @param type Transfer Type: ROLL_IN, ROLL_OUT (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param symbol Mandatory for Isolated data (optional) + * @param type (optional) + * @param startTime (optional) * @param endTime (optional) - * @param fromId If `fromId` is set, data with `id` greater than - * `fromId` will be returned. Otherwise, the latest data will be returned. - * (optional) - * @param limit Limit on the number of data records returned per request. Default: 500; Maximum: - * 1000. (optional) - * @param recvWindow No more than 60000 (optional) + * @param fromId (optional) + * @param limit (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryCrossIsolatedMarginCapitalFlowResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1000,19 +1000,19 @@ private okhttp3.Call queryCrossIsolatedMarginCapitalFlowValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-isolated-margin-capital-flow">Query * Cross Isolated Margin Capital Flow (USER_DATA) Documentation */ public ApiResponse queryCrossIsolatedMarginCapitalFlow( String asset, String symbol, - String type, + OrderType type, Long startTime, Long endTime, Long fromId, - Long limit, - Long recvWindow) + @Max(1000L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryCrossIsolatedMarginCapitalFlowValidateBeforeCall( @@ -1025,7 +1025,7 @@ private okhttp3.Call queryCrossIsolatedMarginCapitalFlowValidateBeforeCall( /** * Build call for queryCrossMarginAccountDetails * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1036,7 +1036,7 @@ private okhttp3.Call queryCrossIsolatedMarginCapitalFlowValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-margin-account-details">Query * Cross Margin Account Details (USER_DATA) Documentation */ private okhttp3.Call queryCrossMarginAccountDetailsCall(Long recvWindow) throws ApiException { @@ -1130,10 +1130,10 @@ private okhttp3.Call queryCrossMarginAccountDetailsValidateBeforeCall(Long recvW } /** - * Query Cross Margin Account Details (USER_DATA) Query Cross Margin Account Details Weight: - * 10(IP) + * Query Cross Margin Account Details (USER_DATA) Query Cross Margin Account Details Weight(IP): + * 10 Security Type: USER_DATA * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryCrossMarginAccountDetailsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1145,11 +1145,11 @@ private okhttp3.Call queryCrossMarginAccountDetailsValidateBeforeCall(Long recvW * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-margin-account-details">Query * Cross Margin Account Details (USER_DATA) Documentation */ public ApiResponse queryCrossMarginAccountDetails( - Long recvWindow) throws ApiException { + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryCrossMarginAccountDetailsValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -1162,7 +1162,7 @@ public ApiResponse queryCrossMarginAccou * @param vipLevel User's current specific margin data will be returned if vipLevel is * omitted (optional) * @param coin (optional) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1173,7 +1173,7 @@ public ApiResponse queryCrossMarginAccou * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-margin-fee-data">Query * Cross Margin Fee Data (USER_DATA) Documentation */ private okhttp3.Call queryCrossMarginFeeDataCall(Long vipLevel, String coin, Long recvWindow) @@ -1284,12 +1284,12 @@ private okhttp3.Call queryCrossMarginFeeDataValidateBeforeCall( /** * Query Cross Margin Fee Data (USER_DATA) Get cross margin fee data collection with any vip * level or user's current specific data as https://www.binance.com/en/margin-fee Weight: 1 - * when coin is specified;(IP) + * when coin is specified;(IP) 5 when the coin parameter is omitted(IP) Security Type: USER_DATA * * @param vipLevel User's current specific margin data will be returned if vipLevel is * omitted (optional) * @param coin (optional) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryCrossMarginFeeDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1301,11 +1301,11 @@ private okhttp3.Call queryCrossMarginFeeDataValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-margin-fee-data">Query * Cross Margin Fee Data (USER_DATA) Documentation */ public ApiResponse queryCrossMarginFeeData( - Long vipLevel, String coin, Long recvWindow) throws ApiException { + Long vipLevel, String coin, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryCrossMarginFeeDataValidateBeforeCall(vipLevel, coin, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1316,7 +1316,7 @@ public ApiResponse queryCrossMarginFeeData( /** * Build call for queryEnabledIsolatedMarginAccountLimit * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1327,7 +1327,7 @@ public ApiResponse queryCrossMarginFeeData( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-enabled-isolated-margin-account-limit">Query * Enabled Isolated Margin Account Limit (USER_DATA) Documentation */ private okhttp3.Call queryEnabledIsolatedMarginAccountLimitCall(Long recvWindow) @@ -1424,9 +1424,9 @@ private okhttp3.Call queryEnabledIsolatedMarginAccountLimitValidateBeforeCall(Lo /** * Query Enabled Isolated Margin Account Limit (USER_DATA) Query enabled isolated margin account - * limit. Weight: 1(IP) + * limit. Weight(IP): 1 Security Type: USER_DATA * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryEnabledIsolatedMarginAccountLimitResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1438,11 +1438,12 @@ private okhttp3.Call queryEnabledIsolatedMarginAccountLimitValidateBeforeCall(Lo * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-enabled-isolated-margin-account-limit">Query * Enabled Isolated Margin Account Limit (USER_DATA) Documentation */ public ApiResponse - queryEnabledIsolatedMarginAccountLimit(Long recvWindow) throws ApiException { + queryEnabledIsolatedMarginAccountLimit(@Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = queryEnabledIsolatedMarginAccountLimitValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1453,9 +1454,8 @@ private okhttp3.Call queryEnabledIsolatedMarginAccountLimitValidateBeforeCall(Lo /** * Build call for queryIsolatedMarginAccountInfo * - * @param symbols Max 5 symbols can be sent; separated by \",\". e.g. - * \"BTCUSDT,BNBUSDT,ADAUSDT\" (optional) - * @param recvWindow No more than 60000 (optional) + * @param symbols (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1466,7 +1466,7 @@ private okhttp3.Call queryEnabledIsolatedMarginAccountLimitValidateBeforeCall(Lo * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-isolated-margin-account-info">Query * Isolated Margin Account Info (USER_DATA) Documentation */ private okhttp3.Call queryIsolatedMarginAccountInfoCall(String symbols, Long recvWindow) @@ -1567,14 +1567,13 @@ private okhttp3.Call queryIsolatedMarginAccountInfoValidateBeforeCall( } /** - * Query Isolated Margin Account Info (USER_DATA) Query Isolated Margin Account Info * If - * \"symbols\" is not sent, all isolated assets will be returned. * If - * \"symbols\" is sent, only the isolated assets of the sent symbols will be returned. - * Weight: 10(IP) + * Query Isolated Margin Account Info (USER_DATA) Query Isolated Margin Account Info Weight(IP): + * 10 Security Type: USER_DATA Notes: - If \"symbols\" is not sent, all isolated + * assets will be returned. - If \"symbols\" is sent, only the isolated assets of the + * sent symbols will be returned. * - * @param symbols Max 5 symbols can be sent; separated by \",\". e.g. - * \"BTCUSDT,BNBUSDT,ADAUSDT\" (optional) - * @param recvWindow No more than 60000 (optional) + * @param symbols (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryIsolatedMarginAccountInfoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1586,11 +1585,11 @@ private okhttp3.Call queryIsolatedMarginAccountInfoValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-isolated-margin-account-info">Query * Isolated Margin Account Info (USER_DATA) Documentation */ public ApiResponse queryIsolatedMarginAccountInfo( - String symbols, Long recvWindow) throws ApiException { + String symbols, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryIsolatedMarginAccountInfoValidateBeforeCall(symbols, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1601,10 +1600,9 @@ public ApiResponse queryIsolatedMarginAc /** * Build call for queryIsolatedMarginFeeData * - * @param vipLevel User's current specific margin data will be returned if vipLevel is - * omitted (optional) - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param vipLevel (optional) + * @param symbol (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1615,7 +1613,7 @@ public ApiResponse queryIsolatedMarginAc * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-isolated-margin-fee-data">Query * Isolated Margin Fee Data (USER_DATA) Documentation */ private okhttp3.Call queryIsolatedMarginFeeDataCall( @@ -1726,12 +1724,12 @@ private okhttp3.Call queryIsolatedMarginFeeDataValidateBeforeCall( /** * Query Isolated Margin Fee Data (USER_DATA) Get isolated margin fee data collection with any * vip level or user's current specific data as https://www.binance.com/en/margin-fee - * Weight: 1 when a single is specified;(IP) + * Weight: 1 when a single is specified;(IP) 10 when the symbol parameter is omitted(IP) + * Security Type: USER_DATA * - * @param vipLevel User's current specific margin data will be returned if vipLevel is - * omitted (optional) - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param vipLevel (optional) + * @param symbol (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryIsolatedMarginFeeDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1743,11 +1741,11 @@ private okhttp3.Call queryIsolatedMarginFeeDataValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-isolated-margin-fee-data">Query * Isolated Margin Fee Data (USER_DATA) Documentation */ public ApiResponse queryIsolatedMarginFeeData( - Long vipLevel, String symbol, Long recvWindow) throws ApiException { + Long vipLevel, String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryIsolatedMarginFeeDataValidateBeforeCall(vipLevel, symbol, recvWindow); java.lang.reflect.Type localVarReturnType = diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/BorrowRepayApi.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/BorrowRepayApi.java index f57e2d4c2..51fa9af54 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/BorrowRepayApi.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/BorrowRepayApi.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -21,8 +21,10 @@ import com.binance.connector.client.common.exception.ConstraintViolationException; import com.binance.connector.client.margin_trading.rest.model.GetFutureHourlyInterestRateResponse; import com.binance.connector.client.margin_trading.rest.model.GetInterestHistoryResponse; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; import com.binance.connector.client.margin_trading.rest.model.MarginAccountBorrowRepayRequest; import com.binance.connector.client.margin_trading.rest.model.MarginAccountBorrowRepayResponse; +import com.binance.connector.client.margin_trading.rest.model.OrderType; import com.binance.connector.client.margin_trading.rest.model.QueryBorrowRepayRecordsInMarginAccountResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMarginInterestRateHistoryResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMaxBorrowResponse; @@ -49,7 +51,7 @@ public class BorrowRepayApi { private static final String USER_AGENT = String.format( - "binance-margin-trading/6.1.0 (Java/%s; %s; %s)", + "binance-margin-trading/7.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -89,9 +91,8 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for getFutureHourlyInterestRate * - * @param assets List of assets, separated by commas, up to 20 (required) - * @param isIsolated for isolated margin or not, \"TRUE\", \"FALSE\" - * (required) + * @param assets (required) + * @param isIsolated (required) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -102,10 +103,10 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#get-future-hourly-interest-rate">Get * future hourly interest rate (USER_DATA) Documentation */ - private okhttp3.Call getFutureHourlyInterestRateCall(String assets, String isIsolated) + private okhttp3.Call getFutureHourlyInterestRateCall(String assets, IsIsolated isIsolated) throws ApiException { String basePath = null; // Operation Servers @@ -171,7 +172,7 @@ private okhttp3.Call getFutureHourlyInterestRateCall(String assets, String isIso @SuppressWarnings("rawtypes") private okhttp3.Call getFutureHourlyInterestRateValidateBeforeCall( - String assets, String isIsolated) throws ApiException { + String assets, IsIsolated isIsolated) throws ApiException { try { Validator validator = Validation.byDefaultProvider() @@ -184,7 +185,8 @@ private okhttp3.Call getFutureHourlyInterestRateValidateBeforeCall( Object[] parameterValues = {assets, isIsolated}; Method method = this.getClass() - .getMethod("getFutureHourlyInterestRate", String.class, String.class); + .getMethod( + "getFutureHourlyInterestRate", String.class, IsIsolated.class); Set> violations = executableValidator.validateParameters(this, method, parameterValues); @@ -203,11 +205,11 @@ private okhttp3.Call getFutureHourlyInterestRateValidateBeforeCall( } /** - * Get future hourly interest rate (USER_DATA) Get future hourly interest rate Weight: 100 + * Get future hourly interest rate (USER_DATA) Get future hourly interest rate Weight(IP): 100 + * Security Type: USER_DATA * - * @param assets List of assets, separated by commas, up to 20 (required) - * @param isIsolated for isolated margin or not, \"TRUE\", \"FALSE\" - * (required) + * @param assets (required) + * @param isIsolated (required) * @return ApiResponse<GetFutureHourlyInterestRateResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -219,11 +221,11 @@ private okhttp3.Call getFutureHourlyInterestRateValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#get-future-hourly-interest-rate">Get * future hourly interest rate (USER_DATA) Documentation */ public ApiResponse getFutureHourlyInterestRate( - @NotNull String assets, @NotNull String isIsolated) throws ApiException { + @NotNull String assets, @NotNull IsIsolated isIsolated) throws ApiException { okhttp3.Call localVarCall = getFutureHourlyInterestRateValidateBeforeCall(assets, isIsolated); java.lang.reflect.Type localVarReturnType = @@ -235,12 +237,12 @@ public ApiResponse getFutureHourlyInterestR * Build call for getInterestHistory * * @param asset (optional) - * @param isolatedSymbol isolated symbol (optional) + * @param isolatedSymbol (optional) * @param startTime Only supports querying data from the past 90 days. (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param recvWindow No more than 60000 (optional) + * @param current (optional) + * @param size (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -251,7 +253,7 @@ public ApiResponse getFutureHourlyInterestR * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#get-interest-history">Get * Interest History (USER_DATA) Documentation */ private okhttp3.Call getInterestHistoryCall( @@ -398,27 +400,27 @@ private okhttp3.Call getInterestHistoryValidateBeforeCall( } /** - * Get Interest History (USER_DATA) Get Interest History * Response in descending order * If - * isolatedSymbol is not sent, crossed margin data will be returned * The max interval between - * `startTime` and `endTime` is 30 days. It is a MUST to ensure data - * correctness. * If `startTime`and `endTime` not sent, return records of - * the last 7 days by default. * If `startTime` is sent and `endTime` is not - * sent, return records of [max(`startTime`, now-30d), now]. * If - * `startTime` is not sent and `endTime` is sent, return records of - * [`endTime`-7, `endTime`] * `type` in response has 4 enums: * - * `PERIODIC` interest charged per hour * `ON_BORROW` first interest charged - * on borrow * `PERIODIC_CONVERTED` interest charged per hour converted into BNB * - * `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB * - * `PORTFOLIO` interest charged daily on the portfolio margin negative balance Weight: - * 1(IP) + * Get Interest History (USER_DATA) Get Interest History Weight(IP): 1 Security Type: USER_DATA + * Notes: - Response in descending order - If isolatedSymbol is not sent, crossed margin data + * will be returned - The max interval between `startTime` and `endTime` is + * 30 days. It is a MUST to ensure data correctness. - If `startTime`and + * `endTime` not sent, return records of the last 7 days by default. - If + * `startTime` is sent and `endTime` is not sent, return records of + * [max(`startTime`, now-30d), now]. - If `startTime` is not sent and + * `endTime` is sent, return records of [`endTime`-7, `endTime`] - + * `type` in response has 4 enums: - `PERIODIC` interest charged per hour - + * `ON_BORROW` first interest charged on borrow - `PERIODIC_CONVERTED` + * interest charged per hour converted into BNB - `ON_BORROW_CONVERTED` first interest + * charged on borrow converted into BNB - `PORTFOLIO` interest charged daily on the + * portfolio margin negative balance * * @param asset (optional) - * @param isolatedSymbol isolated symbol (optional) + * @param isolatedSymbol (optional) * @param startTime Only supports querying data from the past 90 days. (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param recvWindow No more than 60000 (optional) + * @param current (optional) + * @param size (optional) + * @param recvWindow (optional) * @return ApiResponse<GetInterestHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -430,7 +432,7 @@ private okhttp3.Call getInterestHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#get-interest-history">Get * Interest History (USER_DATA) Documentation */ public ApiResponse getInterestHistory( @@ -438,9 +440,9 @@ public ApiResponse getInterestHistory( String isolatedSymbol, Long startTime, Long endTime, - Long current, - Long size, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getInterestHistoryValidateBeforeCall( @@ -464,8 +466,8 @@ public ApiResponse getInterestHistory( * * * @see Margin - * account borrow/repay(MARGIN) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#margin-account-borrow-repay">Margin + * account borrow/repay (USER_DATA) Documentation */ private okhttp3.Call marginAccountBorrowRepayCall( MarginAccountBorrowRepayRequest marginAccountBorrowRepayRequest) throws ApiException { @@ -583,7 +585,8 @@ private okhttp3.Call marginAccountBorrowRepayValidateBeforeCall( } /** - * Margin account borrow/repay(MARGIN) Margin account borrow/repay(MARGIN) Weight: 1500 + * Margin account borrow/repay (USER_DATA) Margin account borrow/repay Weight(UID): 1500 + * Security Type: USER_DATA * * @param marginAccountBorrowRepayRequest (required) * @return ApiResponse<MarginAccountBorrowRepayResponse> @@ -597,8 +600,8 @@ private okhttp3.Call marginAccountBorrowRepayValidateBeforeCall( * * * @see Margin - * account borrow/repay(MARGIN) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#margin-account-borrow-repay">Margin + * account borrow/repay (USER_DATA) Documentation */ public ApiResponse marginAccountBorrowRepay( @Valid @NotNull MarginAccountBorrowRepayRequest marginAccountBorrowRepayRequest) @@ -613,15 +616,15 @@ public ApiResponse marginAccountBorrowRepay( /** * Build call for queryBorrowRepayRecordsInMarginAccount * - * @param type MARGIN,ISOLATED (required) + * @param type (required) * @param asset (optional) - * @param isolatedSymbol isolated symbol (optional) - * @param txId `tranId` in `POST /sapi/v1/margin/loan` (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param isolatedSymbol (optional) + * @param txId (optional) + * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param recvWindow No more than 60000 (optional) + * @param current (optional) + * @param size (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -632,11 +635,11 @@ public ApiResponse marginAccountBorrowRepay( * * * @see Query - * borrow/repay records in Margin account(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-borrow-repay-records-in-margin-account">Query + * borrow/repay records in Margin account (USER_DATA) Documentation */ private okhttp3.Call queryBorrowRepayRecordsInMarginAccountCall( - String type, + OrderType type, String asset, String isolatedSymbol, Long txId, @@ -739,7 +742,7 @@ private okhttp3.Call queryBorrowRepayRecordsInMarginAccountCall( @SuppressWarnings("rawtypes") private okhttp3.Call queryBorrowRepayRecordsInMarginAccountValidateBeforeCall( - String type, + OrderType type, String asset, String isolatedSymbol, Long txId, @@ -765,7 +768,7 @@ private okhttp3.Call queryBorrowRepayRecordsInMarginAccountValidateBeforeCall( this.getClass() .getMethod( "queryBorrowRepayRecordsInMarginAccount", - String.class, + OrderType.class, String.class, String.class, Long.class, @@ -801,23 +804,24 @@ private okhttp3.Call queryBorrowRepayRecordsInMarginAccountValidateBeforeCall( } /** - * Query borrow/repay records in Margin account(USER_DATA) Query borrow/repay records in Margin - * account * `txId` or `startTime` must be sent. `txId` takes - * precedence. * If an asset is sent, data within 30 days before `endTime`; If an - * asset is not sent, data within 7 days before `endTime` * If neither + * Query borrow/repay records in Margin account (USER_DATA) Query borrow/repay records in Margin + * account Weight(IP): 10 Security Type: USER_DATA Notes: - `txId` or + * `startTime` must be sent. `txId` takes precedence. - Response in + * descending order - If an asset is sent, data within 30 days before `endTime`; If an + * asset is not sent, data within 7 days before `endTime` - If neither * `startTime` nor `endTime` is sent, the recent 7-day data will be - * returned. * `startTime` set as `endTime` - 7days by default, - * `endTime` set as current time by default Weight: 10(IP) + * returned. - `startTime` set as `endTime` - 7 days by default, + * `endTime` set as current time by default * - * @param type MARGIN,ISOLATED (required) + * @param type (required) * @param asset (optional) - * @param isolatedSymbol isolated symbol (optional) - * @param txId `tranId` in `POST /sapi/v1/margin/loan` (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param isolatedSymbol (optional) + * @param txId (optional) + * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param recvWindow No more than 60000 (optional) + * @param current (optional) + * @param size (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryBorrowRepayRecordsInMarginAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -829,20 +833,20 @@ private okhttp3.Call queryBorrowRepayRecordsInMarginAccountValidateBeforeCall( * * * @see Query - * borrow/repay records in Margin account(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-borrow-repay-records-in-margin-account">Query + * borrow/repay records in Margin account (USER_DATA) Documentation */ public ApiResponse queryBorrowRepayRecordsInMarginAccount( - @NotNull String type, + @NotNull OrderType type, String asset, String isolatedSymbol, Long txId, Long startTime, Long endTime, - Long current, - Long size, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryBorrowRepayRecordsInMarginAccountValidateBeforeCall( @@ -864,11 +868,10 @@ private okhttp3.Call queryBorrowRepayRecordsInMarginAccountValidateBeforeCall( * Build call for queryMarginInterestRateHistory * * @param asset (required) - * @param vipLevel User's current specific margin data will be returned if vipLevel is - * omitted (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param vipLevel (optional) + * @param startTime (optional) * @param endTime (optional) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -879,7 +882,7 @@ private okhttp3.Call queryBorrowRepayRecordsInMarginAccountValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-margin-interest-rate-history">Query * Margin Interest Rate History (USER_DATA) Documentation */ private okhttp3.Call queryMarginInterestRateHistoryCall( @@ -1001,15 +1004,14 @@ private okhttp3.Call queryMarginInterestRateHistoryValidateBeforeCall( } /** - * Query Margin Interest Rate History (USER_DATA) Query Margin Interest Rate History Weight: - * 1(IP) + * Query Margin Interest Rate History (USER_DATA) Query Margin Interest Rate History Weight(IP): + * 1 Security Type: USER_DATA * * @param asset (required) - * @param vipLevel User's current specific margin data will be returned if vipLevel is - * omitted (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param vipLevel (optional) + * @param startTime (optional) * @param endTime (optional) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMarginInterestRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1021,11 +1023,15 @@ private okhttp3.Call queryMarginInterestRateHistoryValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-margin-interest-rate-history">Query * Margin Interest Rate History (USER_DATA) Documentation */ public ApiResponse queryMarginInterestRateHistory( - @NotNull String asset, Long vipLevel, Long startTime, Long endTime, Long recvWindow) + @NotNull String asset, + Long vipLevel, + Long startTime, + Long endTime, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryMarginInterestRateHistoryValidateBeforeCall( @@ -1039,8 +1045,8 @@ public ApiResponse queryMarginInterestRa * Build call for queryMaxBorrow * * @param asset (required) - * @param isolatedSymbol isolated symbol (optional) - * @param recvWindow No more than 60000 (optional) + * @param isolatedSymbol (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1051,7 +1057,7 @@ public ApiResponse queryMarginInterestRa * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-max-borrow">Query * Max Borrow (USER_DATA) Documentation */ private okhttp3.Call queryMaxBorrowCall(String asset, String isolatedSymbol, Long recvWindow) @@ -1157,13 +1163,14 @@ private okhttp3.Call queryMaxBorrowValidateBeforeCall( } /** - * Query Max Borrow (USER_DATA) Query Max Borrow * If isolatedSymbol is not sent, crossed margin - * data will be sent. * `borrowLimit` is also available from - * [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee) Weight: 50(IP) + * Query Max Borrow (USER_DATA) Query Max Borrow Weight(IP): 50 Security Type: USER_DATA Notes: + * - If isolatedSymbol is not sent, crossed margin data will be sent. - `borrowLimit` + * is also available from + * [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee) * * @param asset (required) - * @param isolatedSymbol isolated symbol (optional) - * @param recvWindow No more than 60000 (optional) + * @param isolatedSymbol (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMaxBorrowResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1175,11 +1182,12 @@ private okhttp3.Call queryMaxBorrowValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-max-borrow">Query * Max Borrow (USER_DATA) Documentation */ public ApiResponse queryMaxBorrow( - @NotNull String asset, String isolatedSymbol, Long recvWindow) throws ApiException { + @NotNull String asset, String isolatedSymbol, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = queryMaxBorrowValidateBeforeCall(asset, isolatedSymbol, recvWindow); java.lang.reflect.Type localVarReturnType = diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarginTradingRestApi.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarginTradingRestApi.java index 0f621f663..d467f18cc 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarginTradingRestApi.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarginTradingRestApi.java @@ -14,6 +14,7 @@ import com.binance.connector.client.margin_trading.rest.model.EditIpForSpecialKeyRequest; import com.binance.connector.client.margin_trading.rest.model.EnableIsolatedMarginAccountRequest; import com.binance.connector.client.margin_trading.rest.model.EnableIsolatedMarginAccountResponse; +import com.binance.connector.client.margin_trading.rest.model.ExitSpecialKeyModeRequest; import com.binance.connector.client.margin_trading.rest.model.GetAllCrossMarginPairsResponse; import com.binance.connector.client.margin_trading.rest.model.GetAllIsolatedMarginSymbolResponse; import com.binance.connector.client.margin_trading.rest.model.GetAllMarginAssetsResponse; @@ -30,7 +31,10 @@ import com.binance.connector.client.margin_trading.rest.model.GetSmallLiabilityExchangeCoinListResponse; import com.binance.connector.client.margin_trading.rest.model.GetSmallLiabilityExchangeHistoryResponse; import com.binance.connector.client.margin_trading.rest.model.GetSummaryOfMarginAccountResponse; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; import com.binance.connector.client.margin_trading.rest.model.KeepaliveUserDataStreamRequest; +import com.binance.connector.client.margin_trading.rest.model.LiquidationLoanRepayRequest; +import com.binance.connector.client.margin_trading.rest.model.LiquidationLoanRepayResponse; import com.binance.connector.client.margin_trading.rest.model.MarginAccountBorrowRepayRequest; import com.binance.connector.client.margin_trading.rest.model.MarginAccountBorrowRepayResponse; import com.binance.connector.client.margin_trading.rest.model.MarginAccountCancelAllOpenOrdersOnASymbolResponse; @@ -46,6 +50,7 @@ import com.binance.connector.client.margin_trading.rest.model.MarginAccountNewOtocoResponse; import com.binance.connector.client.margin_trading.rest.model.MarginManualLiquidationRequest; import com.binance.connector.client.margin_trading.rest.model.MarginManualLiquidationResponse; +import com.binance.connector.client.margin_trading.rest.model.OrderType; import com.binance.connector.client.margin_trading.rest.model.QueryBorrowRepayRecordsInMarginAccountResponse; import com.binance.connector.client.margin_trading.rest.model.QueryCrossIsolatedMarginCapitalFlowResponse; import com.binance.connector.client.margin_trading.rest.model.QueryCrossMarginAccountDetailsResponse; @@ -56,6 +61,8 @@ import com.binance.connector.client.margin_trading.rest.model.QueryIsolatedMarginFeeDataResponse; import com.binance.connector.client.margin_trading.rest.model.QueryIsolatedMarginTierDataResponse; import com.binance.connector.client.margin_trading.rest.model.QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse; +import com.binance.connector.client.margin_trading.rest.model.QueryLiquidationLoanRepayHistoryResponse; +import com.binance.connector.client.margin_trading.rest.model.QueryLiquidationLoanResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsAllOcoResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsAllOrdersResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsOcoResponse; @@ -79,9 +86,9 @@ public class MarginTradingRestApi { private final AccountApi accountApi; private final BorrowRepayApi borrowRepayApi; private final MarketDataApi marketDataApi; - private final RiskDataStreamApi riskDataStreamApi; private final TradeApi tradeApi; private final TransferApi transferApi; + private final UserDataStreamApi userDataStreamApi; public MarginTradingRestApi(ClientConfiguration configuration) { this(MarginTradingRestApiUtil.getDefaultClient(configuration)); @@ -91,18 +98,18 @@ public MarginTradingRestApi(ApiClient apiClient) { this.accountApi = new AccountApi(apiClient); this.borrowRepayApi = new BorrowRepayApi(apiClient); this.marketDataApi = new MarketDataApi(apiClient); - this.riskDataStreamApi = new RiskDataStreamApi(apiClient); this.tradeApi = new TradeApi(apiClient); this.transferApi = new TransferApi(apiClient); + this.userDataStreamApi = new UserDataStreamApi(apiClient); } /** - * Adjust cross margin max leverage (USER_DATA) Adjust cross margin max leverage * The margin - * level need higher than the initial risk ratio of adjusted leverage, the initial risk ratio of - * 3x is 1.5 , the initial risk ratio of 5x is 1.25; The detail conditions on how to switch - * between Cross Margin Classic and Cross Margin Pro can refer to [the + * Adjust cross margin max leverage (USER_DATA) Adjust cross margin max leverage Weight(UID): + * 3000, 1 times/min per IP Security Type: USER_DATA Notes: - The margin level need higher than + * the initial risk ratio of adjusted leverage, the initial risk ratio of 3x is 1.5 , the + * initial risk ratio of 5x is 1.25; The detail conditions on how to switch between Cross Margin + * Classic and Cross Margin Pro can refer to [the * FAQ](https://www.binance.com/en/support/faq/how-to-activate-the-cross-margin-pro-mode-on-binance-e27786da05e743a694b8c625b3bc475d). - * Weight: 3000 * * @param adjustCrossMarginMaxLeverageRequest (required) * @return ApiResponse<AdjustCrossMarginMaxLeverageResponse> @@ -116,7 +123,7 @@ public MarginTradingRestApi(ApiClient apiClient) { * * * @see Adjust + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#adjust-cross-margin-max-leverage">Adjust * cross margin max leverage (USER_DATA) Documentation */ public ApiResponse adjustCrossMarginMaxLeverage( @@ -127,10 +134,11 @@ public ApiResponse adjustCrossMarginMaxLev /** * Disable Isolated Margin Account (TRADE) Disable isolated margin account for a specific - * symbol. Each trading pair can only be deactivated once every 24 hours. Weight: 300(UID) + * symbol. Each trading pair can only be deactivated once every 24 hours. Weight(UID): 300 + * Security Type: TRADE * * @param symbol (required) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<DisableIsolatedMarginAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -142,7 +150,7 @@ public ApiResponse adjustCrossMarginMaxLev * * * @see Disable + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#disable-isolated-margin-account">Disable * Isolated Margin Account (TRADE) Documentation */ public ApiResponse disableIsolatedMarginAccount( @@ -152,7 +160,8 @@ public ApiResponse disableIsolatedMarginAc /** * Enable Isolated Margin Account (TRADE) Enable isolated margin account for a specific - * symbol(Only supports activation of previously disabled accounts). Weight: 300(UID) + * symbol(Only supports activation of previously disabled accounts). Weight(UID): 300 Security + * Type: TRADE * * @param enableIsolatedMarginAccountRequest (required) * @return ApiResponse<EnableIsolatedMarginAccountResponse> @@ -166,7 +175,7 @@ public ApiResponse disableIsolatedMarginAc * * * @see Enable + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#enable-isolated-margin-account">Enable * Isolated Margin Account (TRADE) Documentation */ public ApiResponse enableIsolatedMarginAccount( @@ -176,9 +185,9 @@ public ApiResponse enableIsolatedMarginAcco } /** - * Get BNB Burn Status (USER_DATA) Get BNB Burn Status Weight: 1(IP) + * Get BNB Burn Status (USER_DATA) Get BNB Burn Status Weight(IP): 1 Security Type: USER_DATA * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<GetBnbBurnStatusResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -190,7 +199,7 @@ public ApiResponse enableIsolatedMarginAcco * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#get-bnb-burn-status">Get * BNB Burn Status (USER_DATA) Documentation */ public ApiResponse getBnbBurnStatus(Long recvWindow) @@ -199,10 +208,10 @@ public ApiResponse getBnbBurnStatus(Long recvWindow) } /** - * Get Summary of Margin account (USER_DATA) Get personal margin level information Weight: - * 10(IP) + * Get Summary of Margin account (USER_DATA) Get personal margin level information Weight(IP): + * 10 Security Type: USER_DATA * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<GetSummaryOfMarginAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -214,7 +223,7 @@ public ApiResponse getBnbBurnStatus(Long recvWindow) * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#get-summary-of-margin-account">Get * Summary of Margin account (USER_DATA) Documentation */ public ApiResponse getSummaryOfMarginAccount(Long recvWindow) @@ -224,19 +233,19 @@ public ApiResponse getSummaryOfMarginAccount( /** * Query Cross Isolated Margin Capital Flow (USER_DATA) Query Cross Isolated Margin Capital Flow - * Weight: 100(IP) + * Weight(IP): 100 Security Type: USER_DATA Notes: - Only supports querying the data of the last + * 90 days - The time between startTime and endTime cannot be longer than 7 days. - If fromId is + * set, the data with id > fromId will be returned. Otherwise the latest data will be + * returned - To query isolated data, Symbol needs to be entered. * * @param asset (optional) - * @param symbol isolated margin pair (optional) - * @param type Transfer Type: ROLL_IN, ROLL_OUT (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param symbol Mandatory for Isolated data (optional) + * @param type (optional) + * @param startTime (optional) * @param endTime (optional) - * @param fromId If `fromId` is set, data with `id` greater than - * `fromId` will be returned. Otherwise, the latest data will be returned. - * (optional) - * @param limit Limit on the number of data records returned per request. Default: 500; Maximum: - * 1000. (optional) - * @param recvWindow No more than 60000 (optional) + * @param fromId (optional) + * @param limit (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryCrossIsolatedMarginCapitalFlowResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -248,14 +257,14 @@ public ApiResponse getSummaryOfMarginAccount( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-isolated-margin-capital-flow">Query * Cross Isolated Margin Capital Flow (USER_DATA) Documentation */ public ApiResponse queryCrossIsolatedMarginCapitalFlow( String asset, String symbol, - String type, + OrderType type, Long startTime, Long endTime, Long fromId, @@ -267,10 +276,10 @@ public ApiResponse getSummaryOfMarginAccount( } /** - * Query Cross Margin Account Details (USER_DATA) Query Cross Margin Account Details Weight: - * 10(IP) + * Query Cross Margin Account Details (USER_DATA) Query Cross Margin Account Details Weight(IP): + * 10 Security Type: USER_DATA * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryCrossMarginAccountDetailsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -282,7 +291,7 @@ public ApiResponse getSummaryOfMarginAccount( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-margin-account-details">Query * Cross Margin Account Details (USER_DATA) Documentation */ public ApiResponse queryCrossMarginAccountDetails( @@ -293,12 +302,12 @@ public ApiResponse queryCrossMarginAccou /** * Query Cross Margin Fee Data (USER_DATA) Get cross margin fee data collection with any vip * level or user's current specific data as https://www.binance.com/en/margin-fee Weight: 1 - * when coin is specified;(IP) + * when coin is specified;(IP) 5 when the coin parameter is omitted(IP) Security Type: USER_DATA * * @param vipLevel User's current specific margin data will be returned if vipLevel is * omitted (optional) * @param coin (optional) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryCrossMarginFeeDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -310,7 +319,7 @@ public ApiResponse queryCrossMarginAccou * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-margin-fee-data">Query * Cross Margin Fee Data (USER_DATA) Documentation */ public ApiResponse queryCrossMarginFeeData( @@ -320,9 +329,9 @@ public ApiResponse queryCrossMarginFeeData( /** * Query Enabled Isolated Margin Account Limit (USER_DATA) Query enabled isolated margin account - * limit. Weight: 1(IP) + * limit. Weight(IP): 1 Security Type: USER_DATA * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryEnabledIsolatedMarginAccountLimitResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -334,7 +343,7 @@ public ApiResponse queryCrossMarginFeeData( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-enabled-isolated-margin-account-limit">Query * Enabled Isolated Margin Account Limit (USER_DATA) Documentation */ public ApiResponse @@ -343,14 +352,13 @@ public ApiResponse queryCrossMarginFeeData( } /** - * Query Isolated Margin Account Info (USER_DATA) Query Isolated Margin Account Info * If - * \"symbols\" is not sent, all isolated assets will be returned. * If - * \"symbols\" is sent, only the isolated assets of the sent symbols will be returned. - * Weight: 10(IP) + * Query Isolated Margin Account Info (USER_DATA) Query Isolated Margin Account Info Weight(IP): + * 10 Security Type: USER_DATA Notes: - If \"symbols\" is not sent, all isolated + * assets will be returned. - If \"symbols\" is sent, only the isolated assets of the + * sent symbols will be returned. * - * @param symbols Max 5 symbols can be sent; separated by \",\". e.g. - * \"BTCUSDT,BNBUSDT,ADAUSDT\" (optional) - * @param recvWindow No more than 60000 (optional) + * @param symbols (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryIsolatedMarginAccountInfoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -362,7 +370,7 @@ public ApiResponse queryCrossMarginFeeData( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-isolated-margin-account-info">Query * Isolated Margin Account Info (USER_DATA) Documentation */ public ApiResponse queryIsolatedMarginAccountInfo( @@ -373,12 +381,12 @@ public ApiResponse queryIsolatedMarginAc /** * Query Isolated Margin Fee Data (USER_DATA) Get isolated margin fee data collection with any * vip level or user's current specific data as https://www.binance.com/en/margin-fee - * Weight: 1 when a single is specified;(IP) + * Weight: 1 when a single is specified;(IP) 10 when the symbol parameter is omitted(IP) + * Security Type: USER_DATA * - * @param vipLevel User's current specific margin data will be returned if vipLevel is - * omitted (optional) - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param vipLevel (optional) + * @param symbol (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryIsolatedMarginFeeDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -390,7 +398,7 @@ public ApiResponse queryIsolatedMarginAc * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-isolated-margin-fee-data">Query * Isolated Margin Fee Data (USER_DATA) Documentation */ public ApiResponse queryIsolatedMarginFeeData( @@ -399,11 +407,11 @@ public ApiResponse queryIsolatedMarginFeeDat } /** - * Get future hourly interest rate (USER_DATA) Get future hourly interest rate Weight: 100 + * Get future hourly interest rate (USER_DATA) Get future hourly interest rate Weight(IP): 100 + * Security Type: USER_DATA * - * @param assets List of assets, separated by commas, up to 20 (required) - * @param isIsolated for isolated margin or not, \"TRUE\", \"FALSE\" - * (required) + * @param assets (required) + * @param isIsolated (required) * @return ApiResponse<GetFutureHourlyInterestRateResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -415,36 +423,36 @@ public ApiResponse queryIsolatedMarginFeeDat * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#get-future-hourly-interest-rate">Get * future hourly interest rate (USER_DATA) Documentation */ public ApiResponse getFutureHourlyInterestRate( - String assets, String isIsolated) throws ApiException { + String assets, IsIsolated isIsolated) throws ApiException { return borrowRepayApi.getFutureHourlyInterestRate(assets, isIsolated); } /** - * Get Interest History (USER_DATA) Get Interest History * Response in descending order * If - * isolatedSymbol is not sent, crossed margin data will be returned * The max interval between - * `startTime` and `endTime` is 30 days. It is a MUST to ensure data - * correctness. * If `startTime`and `endTime` not sent, return records of - * the last 7 days by default. * If `startTime` is sent and `endTime` is not - * sent, return records of [max(`startTime`, now-30d), now]. * If - * `startTime` is not sent and `endTime` is sent, return records of - * [`endTime`-7, `endTime`] * `type` in response has 4 enums: * - * `PERIODIC` interest charged per hour * `ON_BORROW` first interest charged - * on borrow * `PERIODIC_CONVERTED` interest charged per hour converted into BNB * - * `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB * - * `PORTFOLIO` interest charged daily on the portfolio margin negative balance Weight: - * 1(IP) + * Get Interest History (USER_DATA) Get Interest History Weight(IP): 1 Security Type: USER_DATA + * Notes: - Response in descending order - If isolatedSymbol is not sent, crossed margin data + * will be returned - The max interval between `startTime` and `endTime` is + * 30 days. It is a MUST to ensure data correctness. - If `startTime`and + * `endTime` not sent, return records of the last 7 days by default. - If + * `startTime` is sent and `endTime` is not sent, return records of + * [max(`startTime`, now-30d), now]. - If `startTime` is not sent and + * `endTime` is sent, return records of [`endTime`-7, `endTime`] - + * `type` in response has 4 enums: - `PERIODIC` interest charged per hour - + * `ON_BORROW` first interest charged on borrow - `PERIODIC_CONVERTED` + * interest charged per hour converted into BNB - `ON_BORROW_CONVERTED` first interest + * charged on borrow converted into BNB - `PORTFOLIO` interest charged daily on the + * portfolio margin negative balance * * @param asset (optional) - * @param isolatedSymbol isolated symbol (optional) + * @param isolatedSymbol (optional) * @param startTime Only supports querying data from the past 90 days. (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param recvWindow No more than 60000 (optional) + * @param current (optional) + * @param size (optional) + * @param recvWindow (optional) * @return ApiResponse<GetInterestHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -456,7 +464,7 @@ public ApiResponse getFutureHourlyInterestR * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#get-interest-history">Get * Interest History (USER_DATA) Documentation */ public ApiResponse getInterestHistory( @@ -473,7 +481,8 @@ public ApiResponse getInterestHistory( } /** - * Margin account borrow/repay(MARGIN) Margin account borrow/repay(MARGIN) Weight: 1500 + * Margin account borrow/repay (USER_DATA) Margin account borrow/repay Weight(UID): 1500 + * Security Type: USER_DATA * * @param marginAccountBorrowRepayRequest (required) * @return ApiResponse<MarginAccountBorrowRepayResponse> @@ -487,8 +496,8 @@ public ApiResponse getInterestHistory( * * * @see Margin - * account borrow/repay(MARGIN) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#margin-account-borrow-repay">Margin + * account borrow/repay (USER_DATA) Documentation */ public ApiResponse marginAccountBorrowRepay( MarginAccountBorrowRepayRequest marginAccountBorrowRepayRequest) throws ApiException { @@ -496,23 +505,24 @@ public ApiResponse marginAccountBorrowRepay( } /** - * Query borrow/repay records in Margin account(USER_DATA) Query borrow/repay records in Margin - * account * `txId` or `startTime` must be sent. `txId` takes - * precedence. * If an asset is sent, data within 30 days before `endTime`; If an - * asset is not sent, data within 7 days before `endTime` * If neither + * Query borrow/repay records in Margin account (USER_DATA) Query borrow/repay records in Margin + * account Weight(IP): 10 Security Type: USER_DATA Notes: - `txId` or + * `startTime` must be sent. `txId` takes precedence. - Response in + * descending order - If an asset is sent, data within 30 days before `endTime`; If an + * asset is not sent, data within 7 days before `endTime` - If neither * `startTime` nor `endTime` is sent, the recent 7-day data will be - * returned. * `startTime` set as `endTime` - 7days by default, - * `endTime` set as current time by default Weight: 10(IP) + * returned. - `startTime` set as `endTime` - 7 days by default, + * `endTime` set as current time by default * - * @param type MARGIN,ISOLATED (required) + * @param type (required) * @param asset (optional) - * @param isolatedSymbol isolated symbol (optional) - * @param txId `tranId` in `POST /sapi/v1/margin/loan` (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param isolatedSymbol (optional) + * @param txId (optional) + * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param recvWindow No more than 60000 (optional) + * @param current (optional) + * @param size (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryBorrowRepayRecordsInMarginAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -524,12 +534,12 @@ public ApiResponse marginAccountBorrowRepay( * * * @see Query - * borrow/repay records in Margin account(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-borrow-repay-records-in-margin-account">Query + * borrow/repay records in Margin account (USER_DATA) Documentation */ public ApiResponse queryBorrowRepayRecordsInMarginAccount( - String type, + OrderType type, String asset, String isolatedSymbol, Long txId, @@ -544,15 +554,14 @@ public ApiResponse marginAccountBorrowRepay( } /** - * Query Margin Interest Rate History (USER_DATA) Query Margin Interest Rate History Weight: - * 1(IP) + * Query Margin Interest Rate History (USER_DATA) Query Margin Interest Rate History Weight(IP): + * 1 Security Type: USER_DATA * * @param asset (required) - * @param vipLevel User's current specific margin data will be returned if vipLevel is - * omitted (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param vipLevel (optional) + * @param startTime (optional) * @param endTime (optional) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMarginInterestRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -564,7 +573,7 @@ public ApiResponse marginAccountBorrowRepay( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-margin-interest-rate-history">Query * Margin Interest Rate History (USER_DATA) Documentation */ public ApiResponse queryMarginInterestRateHistory( @@ -575,13 +584,14 @@ public ApiResponse queryMarginInterestRa } /** - * Query Max Borrow (USER_DATA) Query Max Borrow * If isolatedSymbol is not sent, crossed margin - * data will be sent. * `borrowLimit` is also available from - * [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee) Weight: 50(IP) + * Query Max Borrow (USER_DATA) Query Max Borrow Weight(IP): 50 Security Type: USER_DATA Notes: + * - If isolatedSymbol is not sent, crossed margin data will be sent. - `borrowLimit` + * is also available from + * [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee) * * @param asset (required) - * @param isolatedSymbol isolated symbol (optional) - * @param recvWindow No more than 60000 (optional) + * @param isolatedSymbol (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMaxBorrowResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -593,7 +603,7 @@ public ApiResponse queryMarginInterestRa * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-max-borrow">Query * Max Borrow (USER_DATA) Documentation */ public ApiResponse queryMaxBorrow( @@ -602,7 +612,8 @@ public ApiResponse queryMaxBorrow( } /** - * Cross margin collateral ratio (MARKET_DATA) Cross margin collateral ratio Weight: 100(IP) + * Cross margin collateral ratio (MARKET_DATA) Cross margin collateral ratio Weight(IP): 100 + * Security Type: MARKET_DATA * * @return ApiResponse<CrossMarginCollateralRatioResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -615,7 +626,7 @@ public ApiResponse queryMaxBorrow( * * * @see Cross + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#cross-margin-collateral-ratio">Cross * margin collateral ratio (MARKET_DATA) Documentation */ public ApiResponse crossMarginCollateralRatio() @@ -624,9 +635,10 @@ public ApiResponse crossMarginCollateralRati } /** - * Get All Cross Margin Pairs (MARKET_DATA) Get All Cross Margin Pairs Weight: 1(IP) + * Get All Cross Margin Pairs (MARKET_DATA) Get All Cross Margin Pairs Weight(IP): 1 Security + * Type: MARKET_DATA * - * @param symbol isolated margin pair (optional) + * @param symbol (optional) * @return ApiResponse<GetAllCrossMarginPairsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -638,7 +650,7 @@ public ApiResponse crossMarginCollateralRati * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-cross-margin-pairs">Get * All Cross Margin Pairs (MARKET_DATA) Documentation */ public ApiResponse getAllCrossMarginPairs(String symbol) @@ -647,10 +659,11 @@ public ApiResponse getAllCrossMarginPairs(String } /** - * Get All Isolated Margin Symbol(MARKET_DATA) Get All Isolated Margin Symbol Weight: 10(IP) + * Get All Isolated Margin Symbol (MARKET_DATA) Get All Isolated Margin Symbol Weight(IP): 10 + * Security Type: MARKET_DATA * - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param symbol (optional) + * @param recvWindow (optional) * @return ApiResponse<GetAllIsolatedMarginSymbolResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -662,8 +675,8 @@ public ApiResponse getAllCrossMarginPairs(String * * * @see Get - * All Isolated Margin Symbol(MARKET_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-isolated-margin-symbol">Get + * All Isolated Margin Symbol (MARKET_DATA) Documentation */ public ApiResponse getAllIsolatedMarginSymbol( String symbol, Long recvWindow) throws ApiException { @@ -671,7 +684,8 @@ public ApiResponse getAllIsolatedMarginSymbo } /** - * Get All Margin Assets (MARKET_DATA) Get All Margin Assets. Weight: 1(IP) + * Get All Margin Assets (MARKET_DATA) Get All Margin Assets. Weight(IP): 1 Security Type: + * MARKET_DATA * * @param asset (optional) * @return ApiResponse<GetAllMarginAssetsResponse> @@ -685,7 +699,7 @@ public ApiResponse getAllIsolatedMarginSymbo * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-margin-assets">Get * All Margin Assets (MARKET_DATA) Documentation */ public ApiResponse getAllMarginAssets(String asset) @@ -695,9 +709,9 @@ public ApiResponse getAllMarginAssets(String asset) /** * Get Delist Schedule (MARKET_DATA) Get tokens or symbols delist schedule for cross margin and - * isolated margin Weight: 100 + * isolated margin Weight(IP): 100 Security Type: MARKET_DATA * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<GetDelistScheduleResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -709,7 +723,7 @@ public ApiResponse getAllMarginAssets(String asset) * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-delist-schedule">Get * Delist Schedule (MARKET_DATA) Documentation */ public ApiResponse getDelistSchedule(Long recvWindow) @@ -718,16 +732,16 @@ public ApiResponse getDelistSchedule(Long recvWindow) } /** - * Get Limit Price Pairs(MARKET_DATA) Query trading pairs with restriction on limit price range. - * In margin trading, you can place orders with limit price. Limit price should be within (-15%, - * 15%) of current index price for a list of margin trading pairs. This rule only impacts limit - * sell orders with limit price that is lower than current index price and limit buy orders with - * limit price that is higher than current index price. - Buy order: Your order will be rejected - * with an error message notification if the limit price is 15% above the index price. - Sell - * order: Your order will be rejected with an error message notification if the limit price is - * 15% below the index price. Please review the limit price order placing strategy, backtest and - * calibrate the planned order size with the trading volume and order book depth to prevent - * trading loss. Weight: 1 + * Get Limit Price Pairs (MARKET_DATA) Query trading pairs with restriction on limit price + * range. In margin trading, you can place orders with limit price. Limit price should be within + * (-15%, 15%) of current index price for a list of margin trading pairs. This rule only impacts + * limit sell orders with limit price that is lower than current index price and limit buy + * orders with limit price that is higher than current index price. - Buy order: Your order will + * be rejected with an error message notification if the limit price is 15% above the index + * price. - Sell order: Your order will be rejected with an error message notification if the + * limit price is 15% below the index price. Please review the limit price order placing + * strategy, backtest and calibrate the planned order size with the trading volume and order + * book depth to prevent trading loss. Weight(IP): 1 Security Type: MARKET_DATA * * @return ApiResponse<GetLimitPricePairsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -740,8 +754,8 @@ public ApiResponse getDelistSchedule(Long recvWindow) * * * @see Get - * Limit Price Pairs(MARKET_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-limit-price-pairs">Get + * Limit Price Pairs (MARKET_DATA) Documentation */ public ApiResponse getLimitPricePairs() throws ApiException { return marketDataApi.getLimitPricePairs(); @@ -749,9 +763,9 @@ public ApiResponse getLimitPricePairs() throws ApiEx /** * Get list Schedule (MARKET_DATA) Get the upcoming tokens or symbols listing schedule for Cross - * Margin and Isolated Margin. Weight: 100 + * Margin and Isolated Margin. Weight(IP): 100 Security Type: MARKET_DATA * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<GetListScheduleResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -763,7 +777,7 @@ public ApiResponse getLimitPricePairs() throws ApiEx * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-list-schedule">Get * list Schedule (MARKET_DATA) Documentation */ public ApiResponse getListSchedule(Long recvWindow) @@ -773,7 +787,7 @@ public ApiResponse getListSchedule(Long recvWindow) /** * Get Margin Asset Risk-Based Liquidation Ratio (MARKET_DATA) Get Margin Asset Risk-Based - * Liquidation Ratio Weight: 1 + * Liquidation Ratio Weight(IP): 1 Security Type: MARKET_DATA * * @return ApiResponse<GetMarginAssetRiskBasedLiquidationRatioResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -786,7 +800,7 @@ public ApiResponse getListSchedule(Long recvWindow) * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-margin-asset-risk-based-liquidation-ratio">Get * Margin Asset Risk-Based Liquidation Ratio (MARKET_DATA) Documentation */ public ApiResponse @@ -795,7 +809,8 @@ public ApiResponse getListSchedule(Long recvWindow) } /** - * Get Margin Restricted Assets (MARKET_DATA) Get Margin Restricted Assets Weight: 1 + * Get Margin Restricted Assets (MARKET_DATA) Get the list of margin-restricted assets. + * Weight(IP): 1 Security Type: MARKET_DATA * * @return ApiResponse<GetMarginRestrictedAssetsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -808,7 +823,7 @@ public ApiResponse getListSchedule(Long recvWindow) * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-margin-restricted-assets">Get * Margin Restricted Assets (MARKET_DATA) Documentation */ public ApiResponse getMarginRestrictedAssets() @@ -818,11 +833,11 @@ public ApiResponse getMarginRestrictedAssets( /** * Query Isolated Margin Tier Data (USER_DATA) Get isolated margin tier data collection with any - * tier as https://www.binance.com/en/margin-data Weight: 1(IP) + * tier as https://www.binance.com/en/margin-data Weight(IP): 1 Security Type: USER_DATA * * @param symbol (required) - * @param tier All margin tier data will be returned if tier is omitted (optional) - * @param recvWindow No more than 60000 (optional) + * @param tier (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryIsolatedMarginTierDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -834,7 +849,7 @@ public ApiResponse getMarginRestrictedAssets( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-isolated-margin-tier-data">Query * Isolated Margin Tier Data (USER_DATA) Documentation */ public ApiResponse queryIsolatedMarginTierData( @@ -843,8 +858,8 @@ public ApiResponse queryIsolatedMarginTierD } /** - * Query Liability Coin Leverage Bracket in Cross Margin Pro Mode(MARKET_DATA) Liability Coin - * Leverage Bracket in Cross Margin Pro Mode Weight: 1 + * Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) Liability Coin + * Leverage Bracket in Cross Margin Pro Mode Weight(IP): 1 Security Type: MARKET_DATA * * @return ApiResponse<QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -857,8 +872,8 @@ public ApiResponse queryIsolatedMarginTierD * * * @see Query - * Liability Coin Leverage Bracket in Cross Margin Pro Mode(MARKET_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-liability-coin-leverage-bracket-in-cross-margin-pro-mode">Query + * Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) Documentation */ public ApiResponse queryLiabilityCoinLeverageBracketInCrossMarginProMode() throws ApiException { @@ -866,9 +881,10 @@ public ApiResponse queryIsolatedMarginTierD } /** - * Query Margin Available Inventory(USER_DATA) Margin available Inventory query Weight: 50 + * Query Margin Available Inventory (USER_DATA) Margin available Inventory query Weight(UID): 50 + * Security Type: USER_DATA * - * @param type MARGIN,ISOLATED (required) + * @param type (required) * @return ApiResponse<QueryMarginAvailableInventoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -880,16 +896,17 @@ public ApiResponse queryIsolatedMarginTierD * * * @see Query - * Margin Available Inventory(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-margin-available-inventory">Query + * Margin Available Inventory (USER_DATA) Documentation */ public ApiResponse queryMarginAvailableInventory( - String type) throws ApiException { + OrderType type) throws ApiException { return marketDataApi.queryMarginAvailableInventory(type); } /** - * Query Margin PriceIndex (MARKET_DATA) Query Margin PriceIndex Weight: 10(IP) + * Query Margin PriceIndex (MARKET_DATA) Query Margin PriceIndex Weight(IP): 10 Security Type: + * MARKET_DATA * * @param symbol (required) * @return ApiResponse<QueryMarginPriceindexResponse> @@ -903,7 +920,7 @@ public ApiResponse queryMarginAvailableIn * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-margin-priceindex">Query * Margin PriceIndex (MARKET_DATA) Documentation */ public ApiResponse queryMarginPriceindex(String symbol) @@ -912,85 +929,38 @@ public ApiResponse queryMarginPriceindex(String s } /** - * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight: 3000 - * - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
- * - * @see Close - * User Data Stream (USER_STREAM) Documentation - */ - public void closeUserDataStream() throws ApiException { - riskDataStreamApi.closeUserDataStream(); - } - - /** - * Keepalive User Data Stream (USER_STREAM) Keepalive a user data stream to prevent a time out. - * Weight: 1 - * - * @param keepaliveUserDataStreamRequest (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
- * - * @see Keepalive - * User Data Stream (USER_STREAM) Documentation - */ - public void keepaliveUserDataStream( - KeepaliveUserDataStreamRequest keepaliveUserDataStreamRequest) throws ApiException { - riskDataStreamApi.keepaliveUserDataStream(keepaliveUserDataStreamRequest); - } - - /** - * Start User Data Stream (USER_STREAM) Start a new user data stream. Weight: 1 - * - * @return ApiResponse<StartUserDataStreamResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Start User Data Stream -
- * - * @see Start - * User Data Stream (USER_STREAM) Documentation - */ - public ApiResponse startUserDataStream() throws ApiException { - return riskDataStreamApi.startUserDataStream(); - } - - /** - * Create Special Key(Low-Latency Trading)(TRADE) - Binance Margin offers low-latency trading - * through a [special + * Create Special Key(Low-Latency Trading) (TRADE) **Eligibility** - Binance Margin offers + * low-latency trading through a [special * key](https://www.binance.com/en/support/faq/frequently-asked-questions-on-margin-special-api-key-3208663e900d4d2e9fec4140e1832f4e), - * available exclusively to users with VIP level 4 or higher. - If you are VIP level 3 or below, - * please contact your VIP manager for eligibility criterias.** **Supported Products:** - Cross - * Margin - Isolated Margin - Portfolio Margin Pro - Cross Margin Pro (Additional agreement - * required and subject to meeting eligibility criteria) **Unsupported Products:** - Portfolio - * Margin We support several types of API keys: * Ed25519 (recommended) * HMAC * RSA We - * recommend to **use Ed25519 API keys** as it should provide the best performance and security - * out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). For how to generate an - * RSA key pair to send API requests on Binance. Please refer to the document below + * available exclusively to users with VIP level 7 or higher. - If you are VIP level 6 or below, + * please contact your VIP manager for eligibility criterias. - All new Margin Special Key users + * are required to read, understand, and agree to the Margin Special Key Supplemental Product + * Terms at the master account level before creating a Margin Special Key. - Once signed at the + * master account level, the agreement applies to all sub-accounts. The master account and all + * sub-accounts (Cross Margin Classic and Portfolio Margin Pro) are authorized to create a + * Margin Special Key and are subject to the LiquidationLoan policy. For more information, + * please refer to + * [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). + * **Supported Products:** - Cross Margin - Isolated Margin - Portfolio Margin Pro **Unsupported + * Products:** - Portfolio Margin We support several types of API keys: * Ed25519 (recommended) + * * HMAC * RSA We recommend to **use Ed25519 API keys** as it should provide the best + * performance and security out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). + * For how to generate an RSA key pair to send API requests on Binance. Please refer to the + * document below * [FAQ](https://www.binance.com/en/support/faq/how-to-generate-an-rsa-key-pair-to-send-api-requests-on-binance-2b79728f331e43079b27440d9d15c5db) - * . Weight: 1(UID) + * . **How to use the Margin Special Key** - Use the below `sapi` endpoint to create + * your margin special API Key. - For accessing the Cross Margin account, do not send the + * `symbol` parameter. - For accessing the Isolated Margin account(s), pass the + * relevant `symbol` parameter in the API Key creation request. - Use the generated + * API Key (and Secret key, if applicable) to perform margin trading and listenKey generation + * via **Spot** REST API (`https://api.binance.com/api/v3/_*`) endpoints. Read [REST + * API](/products/spot/rest-api#signed-trade-and-user_data-endpoint-security) or [WebSocket + * API](/products/spot/web-socket-api#request-security) documentation to learn how to use + * different API keys You need to enable Permits “Enable Spot & Margin Trading” option for + * the API Key which requests this endpoint. Weight(UID): 1 Security Type: TRADE Response Notes: + * - Error Code Description - **UNSUPPORTED_OPERATION** : Portfolio Margin is an unsupported + * product, please change the account type to a supported margin product. - **Forbidden**: Cross + * Margin Pro accounts require additional agreements, please contact your relationship manager. * * @param createSpecialKeyRequest (required) * @return ApiResponse<CreateSpecialKeyResponse> @@ -1004,8 +974,8 @@ public ApiResponse startUserDataStream() throws Api * * * @see Create - * Special Key(Low-Latency Trading)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#create-special-key">Create + * Special Key(Low-Latency Trading) (TRADE) Documentation */ public ApiResponse createSpecialKey( CreateSpecialKeyRequest createSpecialKeyRequest) throws ApiException { @@ -1013,15 +983,21 @@ public ApiResponse createSpecialKey( } /** - * Delete Special Key(Low-Latency Trading)(TRADE) This only applies to Special Key for Low - * Latency Trading. If apiKey is given, apiName will be ignored. If apiName is given with no + * Delete Special Key(Low-Latency Trading) (TRADE) Deleting your Margin Special Key alone does + * not exit you from the Margin Special Key framework or discharge your obligations under the + * Margin Special Key Supplemental Product Terms. To fully exit, you must: 1. Delete your Margin + * Special Key. 2. Ensure there are no outstanding liabilities on the account. 3. Call the Exit + * Margin Special Key API endpoint. 4. Confirm the exit status via the API response. Only after + * step 4 is completed and the exit status is confirmed by Binance will your account revert to + * standard liquidation logic and no longer be subject to the Margin Special Key Supplemental + * Product Terms. If apiKey is given, apiName will be ignored. If apiName is given with no * apiKey, all apikeys with given apiName will be deleted. You need to enable Permits “Enable - * Spot & Margin Trading” option for the API Key which requests this endpoint. Weight: - * 1(UID) + * Spot & Margin” option for the API Key which requests this endpoint. Weight(UID): 1 + * Security Type: TRADE * * @param apiName (optional) - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param symbol (optional) + * @param recvWindow (optional) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1033,8 +1009,8 @@ public ApiResponse createSpecialKey( * * * @see Delete - * Special Key(Low-Latency Trading)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#delete-special-key">Delete + * Special Key(Low-Latency Trading) (TRADE) Documentation */ public void deleteSpecialKey(String apiName, String symbol, Long recvWindow) throws ApiException { @@ -1042,9 +1018,9 @@ public void deleteSpecialKey(String apiName, String symbol, Long recvWindow) } /** - * Edit ip for Special Key(Low-Latency Trading)(TRADE) Edit ip restriction. This only applies to - * Special Key for Low Latency Trading. You need to enable Permits “Enable Spot & Margin - * Trading” option for the API Key which requests this endpoint. Weight: 1(UID) + * Edit ip for Special Key(Low-Latency Trading) (TRADE) Edit ip restriction. This only applies + * to Special Key for Low Latency Trading. You need to enable Permits “Enable Spot & Margin” + * option for the API Key which requests this endpoint. Weight(UID): 1 Security Type: TRADE * * @param editIpForSpecialKeyRequest (required) * @return ApiResponse<Void> @@ -1058,8 +1034,8 @@ public void deleteSpecialKey(String apiName, String symbol, Long recvWindow) * * * @see Edit - * ip for Special Key(Low-Latency Trading)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#edit-ip-for-special-key">Edit + * ip for Special Key(Low-Latency Trading) (TRADE) Documentation */ public void editIpForSpecialKey(EditIpForSpecialKeyRequest editIpForSpecialKeyRequest) throws ApiException { @@ -1067,15 +1043,54 @@ public void editIpForSpecialKey(EditIpForSpecialKeyRequest editIpForSpecialKeyRe } /** - * Get Force Liquidation Record (USER_DATA) Get Force Liquidation Record * Response in - * descending order Weight: 1(IP) + * Exit Special Key Mode (TRADE) Exit the Margin Special Key mode for Cross Margin Classic + * accounts. **All outstanding liabilities under the Cross Margin Classic account must be fully + * repaid before calling this endpoint.** Deleting the Margin Special Key alone does not + * constitute a valid exit. When a user creates a Margin Special API Key, the account enters + * \"Special Key Mode\". Upon a successful request, the following actions will be + * performed atomically: 1. All existing Margin Special API Keys under the Cross Margin Classic + * mode account will be deleted. 2. All pre-execution margin checks (including Open-order-loss + * calculation) will revert to standard mode. 3. A cooldown period (default: 24 hours) will be + * enforced, during which the account will not be permitted to create new Margin Special API + * Keys. For more information, please refer to + * [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). + * **Preconditions:** The following conditions must be met; otherwise the request will be + * rejected: - Account type must be **Cross Margin Classic**. - Account must currently be in + * **Special Key Mode**. If not, the request silently succeeds. - Account must **not be in + * liquidation**. - Account must **have no liability**. You need to enable \"Permits Enable + * Spot & Margin Trading\" option for the API Key which requests this endpoint. + * Weight(UID): 10 Security Type: TRADE + * + * @param exitSpecialKeyModeRequest (optional) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Exit Special Key Mode -
* - * @param startTime Only supports querying data from the past 90 days. (optional) + * @see Exit + * Special Key Mode (TRADE) Documentation + */ + public ApiResponse exitSpecialKeyMode( + ExitSpecialKeyModeRequest exitSpecialKeyModeRequest) throws ApiException { + return tradeApi.exitSpecialKeyMode(exitSpecialKeyModeRequest); + } + + /** + * Get Force Liquidation Record (USER_DATA) Get Force Liquidation Record Weight(IP): 1 Security + * Type: USER_DATA Notes: - Response in descending order + * + * @param startTime (optional) * @param endTime (optional) - * @param isolatedSymbol isolated symbol (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param recvWindow No more than 60000 (optional) + * @param isolatedSymbol (optional) + * @param current (optional) + * @param size (optional) + * @param recvWindow (optional) * @return ApiResponse<GetForceLiquidationRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1087,7 +1102,7 @@ public void editIpForSpecialKey(EditIpForSpecialKeyRequest editIpForSpecialKeyRe * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-force-liquidation-record">Get * Force Liquidation Record (USER_DATA) Documentation */ public ApiResponse getForceLiquidationRecord( @@ -1104,9 +1119,9 @@ public ApiResponse getForceLiquidationRecord( /** * Get Small Liability Exchange Coin List (USER_DATA) Query the coins which can be small - * liability exchange Weight: 100 + * liability exchange Weight(IP): 100 Security Type: USER_DATA * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<GetSmallLiabilityExchangeCoinListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1118,7 +1133,7 @@ public ApiResponse getForceLiquidationRecord( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-small-liability-exchange-coin-list">Get * Small Liability Exchange Coin List (USER_DATA) Documentation */ public ApiResponse getSmallLiabilityExchangeCoinList( @@ -1127,14 +1142,14 @@ public ApiResponse getSmallLiabilityE } /** - * Get Small Liability Exchange History (USER_DATA) Get Small liability Exchange History Weight: - * 100(UID) + * Get Small Liability Exchange History (USER_DATA) Get Small liability Exchange History + * Weight(UID): 100 Security Type: USER_DATA * - * @param current Currently querying page. Start from 1. Default:1 (required) - * @param size Default:10, Max:100 (required) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param current (required) + * @param size (required) + * @param startTime (optional) * @param endTime (optional) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<GetSmallLiabilityExchangeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1146,7 +1161,7 @@ public ApiResponse getSmallLiabilityE * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-small-liability-exchange-history">Get * Small Liability Exchange History (USER_DATA) Documentation */ public ApiResponse getSmallLiabilityExchangeHistory( @@ -1156,14 +1171,41 @@ public ApiResponse getSmallLiabilityEx current, size, startTime, endTime, recvWindow); } + /** + * Liquidation Loan Repay (MARGIN) Repays the outstanding cross-margin liquidation loan from the + * user's spot wallet. A liquidation loan represents the account deficit incurred when + * account equity turns negative during liquidation (bankruptcy). The repayment amount must be + * greater than 0 and cannot exceed the remaining loan balance. If the Spot Account has + * insufficient USDC balance, the repayment will fail. Weight(UID): 100 Security Type: MARGIN + * + * @param liquidationLoanRepayRequest (required) + * @return ApiResponse<LiquidationLoanRepayResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Liquidation Loan Repay -
+ * + * @see Liquidation + * Loan Repay (MARGIN) Documentation + */ + public ApiResponse liquidationLoanRepay( + LiquidationLoanRepayRequest liquidationLoanRepayRequest) throws ApiException { + return tradeApi.liquidationLoanRepay(liquidationLoanRepayRequest); + } + /** * Margin Account Cancel all Open Orders on a Symbol (TRADE) Cancels all active orders on a - * symbol for margin account.<br></br> This includes OCO orders. Weight: 1 + * symbol for margin account.<br></br> This includes OCO orders. Weight(IP): 1 + * Security Type: TRADE * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param recvWindow No more than 60000 (optional) + * @param isIsolated (optional, default to FALSE) + * @param recvWindow (optional) * @return ApiResponse<MarginAccountCancelAllOpenOrdersOnASymbolResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1175,29 +1217,26 @@ public ApiResponse getSmallLiabilityEx * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-all-open-orders-on-asymbol">Margin * Account Cancel all Open Orders on a Symbol (TRADE) Documentation */ public ApiResponse marginAccountCancelAllOpenOrdersOnASymbol( - String symbol, String isIsolated, Long recvWindow) throws ApiException { + String symbol, IsIsolated isIsolated, Long recvWindow) throws ApiException { return tradeApi.marginAccountCancelAllOpenOrdersOnASymbol(symbol, isIsolated, recvWindow); } /** - * Margin Account Cancel OCO (TRADE) Cancel an entire Order List for a margin account. * - * Canceling an individual leg will cancel the entire OCO Weight: 1(UID) + * Margin Account Cancel OCO (TRADE) Cancel an entire Order List for a margin account. + * Weight(UID): 1 Security Type: TRADE Notes: - Canceling an individual leg will cancel the + * entire OCO * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param orderListId Either `orderListId` or `listClientOrderId` must be - * provided (optional) - * @param listClientOrderId Either `orderListId` or `listClientOrderId` must - * be provided (optional) - * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by - * default (optional) - * @param recvWindow No more than 60000 (optional) + * @param isIsolated (optional, default to FALSE) + * @param orderListId (optional) + * @param listClientOrderId (optional) + * @param newClientOrderId (optional) + * @param recvWindow (optional) * @return ApiResponse<MarginAccountCancelOcoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1209,12 +1248,12 @@ public ApiResponse getSmallLiabilityEx * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-oco">Margin * Account Cancel OCO (TRADE) Documentation */ public ApiResponse marginAccountCancelOco( String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderListId, String listClientOrderId, String newClientOrderId, @@ -1225,17 +1264,15 @@ public ApiResponse marginAccountCancelOco( } /** - * Margin Account Cancel Order (TRADE) Cancel an active order for margin account. * Either - * orderId or origClientOrderId must be sent. Weight: 10(IP) + * Margin Account Cancel Order (TRADE) Cancel an active order for margin account. Weight(IP): 10 + * Security Type: TRADE Notes: - Either orderId or origClientOrderId must be sent. * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) + * @param isIsolated (optional, default to FALSE) * @param orderId (optional) * @param origClientOrderId (optional) - * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by - * default (optional) - * @param recvWindow No more than 60000 (optional) + * @param newClientOrderId (optional) + * @param recvWindow (optional) * @return ApiResponse<MarginAccountCancelOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1247,12 +1284,12 @@ public ApiResponse marginAccountCancelOco( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-order">Margin * Account Cancel Order (TRADE) Documentation */ public ApiResponse marginAccountCancelOrder( String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderId, String origClientOrderId, String newClientOrderId, @@ -1263,9 +1300,10 @@ public ApiResponse marginAccountCancelOrder( } /** - * Margin Account New OCO (TRADE) Send in a new OCO for a margin account * autoRepayAtCancel is - * suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel - * order execution Weight: 6(UID) + * Margin Account New OCO (TRADE) Send in a new OCO for a margin account Weight: 6(UID) or + * 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: TRADE Notes: + * - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high + * frequent new order/cancel order execution * * @param marginAccountNewOcoRequest (required) * @return ApiResponse<MarginAccountNewOcoResponse> @@ -1279,7 +1317,7 @@ public ApiResponse marginAccountCancelOrder( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco">Margin * Account New OCO (TRADE) Documentation */ public ApiResponse marginAccountNewOco( @@ -1288,9 +1326,10 @@ public ApiResponse marginAccountNewOco( } /** - * Margin Account New Order (TRADE) Post a new order for margin account. * autoRepayAtCancel is - * suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel - * order execution Weight: 6(UID) + * Margin Account New Order (TRADE) Post a new order for margin account. Weight: 6(UID) or + * 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: TRADE Notes: + * - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high + * frequent new order/cancel order execution * * @param marginAccountNewOrderRequest (required) * @return ApiResponse<MarginAccountNewOrderResponse> @@ -1304,7 +1343,7 @@ public ApiResponse marginAccountNewOco( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-order">Margin * Account New Order (TRADE) Documentation */ public ApiResponse marginAccountNewOrder( @@ -1325,10 +1364,23 @@ public ApiResponse marginAccountNewOrder( * placement response will show the working order as `FILLED` but the pending order * will still appear as `PENDING_NEW`. You need to query the status of the pending * order again to see its updated status. - OTOs add **2 orders** to the unfilled order count, - * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. * - * autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high - * frequent new order/cancel order execution * Depending on the `pendingType` or - * `workingType`, some optional parameters will become mandatory: Weight: 6(UID) + * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight: + * 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: + * TRADE Notes: - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid + * under high frequent new order/cancel order execution - Depending on the + * `pendingType` or `workingType`, some optional - parameters will become + * mandatory: | Type | Additional mandatory parameters | Additional information | | + * -------------------------------------------------------- | + * ------------------------------------------------------------ | ---------------------- | | + * `workingType` = `LIMIT` | `workingTimeInForce` | | | + * `pendingType` = `LIMIT` | `pendingPrice`, + * `pendingTimeInForce` | | | `pendingType` = `STOP_LOSS` or + * `TAKE_PROFIT` | `pendingStopPrice` and/or + * `pendingTrailingDelta` | | | `pendingType` = + * `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT` | `pendingPrice`, + * `pendingStopPrice` and/or `pendingTrailingDelta`, + * `pendingTimeInForce` | | | `pendingTrailingDelta` is provided | + * `pendingPrice` | | * * @param marginAccountNewOtoRequest (required) * @return ApiResponse<MarginAccountNewOtoResponse> @@ -1342,7 +1394,7 @@ public ApiResponse marginAccountNewOrder( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oto">Margin * Account New OTO (TRADE) Documentation */ public ApiResponse marginAccountNewOto( @@ -1359,12 +1411,31 @@ public ApiResponse marginAccountNewOto( * above and pending below), forming an OCO pair. The pending orders are only placed on the * order book when the working order gets **fully filled**. - The rules of the pending above and * pending below follow the same rules as the [Order List - * OCO](https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OCO). - - * OTOCOs add **3 orders** against the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` - * filter, and `MAX_NUM_ORDERS` filter. * autoRepayAtCancel is suggested to set as - * “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution * - * Depending on the `pendingAboveType`/`pendingBelowType` or - * `workingType`, some optional parameters will become mandatory: Weight: 6(UID) + * OCO](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco). + * - OTOCOs add **3 orders** against the unfilled order count, + * `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter. Weight: + * 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: + * TRADE Notes: - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid + * under high frequent new order/cancel order execution - Depending on the + * `pendingAboveType`/`pendingBelowType` or `workingType`, some + * optional parameters will become mandatory: | Type | Additional mandatory parameters | + * Additional information | | ------------------------------------ | + * ------------------------------------------------------------ | ---------------------- | | + * `workingType` = `LIMIT` | `workingTimeInForce` | | | + * `pendingAboveType`= `LIMIT_MAKER` | `pendingAbovePrice` | + * | | `pendingAboveType`= `STOP_LOSS` | + * `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta` | | | + * `pendingAboveType`=`STOP_LOSS_LIMIT` | + * `pendingAbovePrice`, `pendingAboveStopPrice` and/or + * `pendingAboveTrailingDelta`, `pendingAboveTimeInForce` | | | + * `pendingBelowType`= `LIMIT_MAKER` | `pendingBelowPrice` | + * | | `pendingBelowType`= `STOP_LOSS` | + * `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta` | | | + * `pendingBelowType`=`STOP_LOSS_LIMIT` | + * `pendingBelowPrice`, `pendingBelowStopPrice` and/or + * `pendingBelowTrailingDelta`, `pendingBelowTimeInForce` | | | + * `pendingAboveTrailingDelta` is provided | `pendingAbovePrice` | | | + * `pendingBelowTrailingDelta` is provided | `pendingBelowPrice` | | * * @param marginAccountNewOtocoRequest (required) * @return ApiResponse<MarginAccountNewOtocoResponse> @@ -1378,7 +1449,7 @@ public ApiResponse marginAccountNewOto( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-otoco">Margin * Account New OTOCO (TRADE) Documentation */ public ApiResponse marginAccountNewOtoco( @@ -1387,9 +1458,9 @@ public ApiResponse marginAccountNewOtoco( } /** - * Margin Manual Liquidation(MARGIN) Margin Manual Liquidation * This endpoint can support Cross - * Margin Classic Mode and Pro Mode. * And only support Isolated Margin for restricted region. - * Weight: 3000 + * Margin Manual Liquidation (TRADE) Margin Manual Liquidation Weight(UID): 3000 Security Type: + * TRADE Notes: - This endpoint supports Cross Margin Classic Mode and Pro Mode. - Isolated + * Margin is only supported in restricted regions. * * @param marginManualLiquidationRequest (required) * @return ApiResponse<MarginManualLiquidationResponse> @@ -1403,8 +1474,8 @@ public ApiResponse marginAccountNewOtoco( * * * @see Margin - * Manual Liquidation(MARGIN) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-manual-liquidation">Margin + * Manual Liquidation (TRADE) Documentation */ public ApiResponse marginManualLiquidation( MarginManualLiquidationRequest marginManualLiquidationRequest) throws ApiException { @@ -1413,12 +1484,11 @@ public ApiResponse marginManualLiquidation( /** * Query Current Margin Order Count Usage (TRADE) Displays the user's current margin order - * count usage for all intervals. Weight: 20(IP) + * count usage for all intervals. Weight(IP): 20 Security Type: TRADE * - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param isIsolated (optional, default to FALSE) + * @param symbol (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryCurrentMarginOrderCountUsageResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1430,29 +1500,88 @@ public ApiResponse marginManualLiquidation( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-current-margin-order-count-usage">Query * Current Margin Order Count Usage (TRADE) Documentation */ public ApiResponse queryCurrentMarginOrderCountUsage( - String isIsolated, String symbol, Long recvWindow) throws ApiException { + IsIsolated isIsolated, String symbol, Long recvWindow) throws ApiException { return tradeApi.queryCurrentMarginOrderCountUsage(isIsolated, symbol, recvWindow); } /** - * Query Margin Account's all OCO (USER_DATA) Retrieves all OCO for a specific margin - * account based on provided optional parameters Weight: 200(IP) + * Query Liquidation Loan (USER_DATA) Query the current user's cross-margin liquidation loan + * information, including the original loan amount, repaid amount, and remaining amount. When a + * cross-margin account is liquidated and the account equity turns negative (bankruptcy), the + * system generates a liquidation loan record representing the deficit. This represents the + * shortfall amount denominated in USDC. Weight(UID): 100 Security Type: USER_DATA + * + * @param recvWindow (optional) + * @return ApiResponse<QueryLiquidationLoanResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Query Liquidation Loan -
* - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param symbol isolated margin pair (optional) - * @param fromId If `fromId` is set, data with `id` greater than - * `fromId` will be returned. Otherwise, the latest data will be returned. + * @see Query + * Liquidation Loan (USER_DATA) Documentation + */ + public ApiResponse queryLiquidationLoan(Long recvWindow) + throws ApiException { + return tradeApi.queryLiquidationLoan(recvWindow); + } + + /** + * Query Liquidation Loan Repay History (USER_DATA) Query the repayment history of cross-margin + * liquidation loans (deficit caused by bankruptcy during liquidation). Supports time-range + * filtering and pagination. Weight(UID): 100 Security Type: USER_DATA Notes: - The maximum + * query range is 90 days. If `startTime` is earlier than 90 days ago, it will be + * clamped to 90 days ago. - Only records with status `SUCCESS` or `PENDING` + * are returned. Failed repayment records are excluded. + * + * @param startTime Start time in Unix timestamp (milliseconds). Defaults to 7 days ago if not + * specified (optional) + * @param endTime End time in Unix timestamp (milliseconds). Defaults to now if not specified * (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param current Current page number, default `1` (optional) + * @param size Page size, default `50` (optional) + * @param recvWindow (optional) + * @return ApiResponse<QueryLiquidationLoanRepayHistoryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Query Liquidation Loan Repay History -
+ * + * @see Query + * Liquidation Loan Repay History (USER_DATA) Documentation + */ + public ApiResponse queryLiquidationLoanRepayHistory( + Long startTime, Long endTime, Long current, Long size, Long recvWindow) + throws ApiException { + return tradeApi.queryLiquidationLoanRepayHistory( + startTime, endTime, current, size, recvWindow); + } + + /** + * Query Margin Account's all OCO (USER_DATA) Retrieves all OCO for a specific margin + * account based on provided optional parameters Weight(IP): 200 Security Type: USER_DATA + * + * @param isIsolated (optional, default to FALSE) + * @param symbol (optional) + * @param fromId (optional) + * @param startTime (optional) * @param endTime (optional) - * @param limit Limit on the number of data records returned per request. Default: 500; Maximum: - * 1000. (optional) - * @param recvWindow No more than 60000 (optional) + * @param limit (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMarginAccountsAllOcoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1464,11 +1593,11 @@ public ApiResponse queryCurrentMargin * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-all-oco">Query * Margin Account's all OCO (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsAllOco( - String isIsolated, + IsIsolated isIsolated, String symbol, Long fromId, Long startTime, @@ -1481,21 +1610,19 @@ public ApiResponse queryMarginAccountsAllOco( } /** - * Query Margin Account's All Orders (USER_DATA) Query Margin Account's All Orders * If - * orderId is set, it will get orders >= that orderId. Otherwise the orders within 24 - * hours are returned. * For some historical orders cummulativeQuoteQty will be < 0, meaning - * the data is not available at this time. * Less than 24 hours between startTime and endTime. - * Weight: 200(IP) + * Query Margin Account's All Orders (USER_DATA) Query Margin Account's All Orders + * Weight(IP): 200 Security Type: USER_DATA Notes: - If orderId is set, it will get orders + * >= that orderId. Otherwise the orders within 24 hours are returned. - For some + * historical orders cummulativeQuoteQty will be < 0, meaning the data is not available at + * this time. - Less than 24 hours between startTime and endTime. * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) + * @param isIsolated (optional, default to FALSE) * @param orderId (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param startTime (optional) * @param endTime (optional) - * @param limit Limit on the number of data records returned per request. Default: 500; Maximum: - * 1000. (optional) - * @param recvWindow No more than 60000 (optional) + * @param limit (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMarginAccountsAllOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1507,12 +1634,12 @@ public ApiResponse queryMarginAccountsAllOco( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-all-orders">Query * Margin Account's All Orders (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsAllOrders( String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderId, Long startTime, Long endTime, @@ -1525,15 +1652,13 @@ public ApiResponse queryMarginAccountsAllO /** * Query Margin Account's OCO (USER_DATA) Retrieves a specific OCO based on provided - * optional parameters Weight: 10(IP) + * optional parameters Weight(IP): 10 Security Type: USER_DATA * - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param symbol isolated margin pair (optional) - * @param orderListId Either `orderListId` or `listClientOrderId` must be - * provided (optional) + * @param isIsolated (optional, default to FALSE) + * @param symbol (optional) + * @param orderListId (optional) * @param origClientOrderId (optional) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMarginAccountsOcoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1545,11 +1670,11 @@ public ApiResponse queryMarginAccountsAllO * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-oco">Query * Margin Account's OCO (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsOco( - String isIsolated, + IsIsolated isIsolated, String symbol, Long orderListId, String origClientOrderId, @@ -1560,13 +1685,12 @@ public ApiResponse queryMarginAccountsOco( } /** - * Query Margin Account's Open OCO (USER_DATA) Query Margin Account's Open OCO Weight: - * 10(IP) + * Query Margin Account's Open OCO (USER_DATA) Query Margin Account's Open OCO + * Weight(IP): 10 Security Type: USER_DATA * - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param isIsolated (optional, default to FALSE) + * @param symbol (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMarginAccountsOpenOcoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1578,25 +1702,24 @@ public ApiResponse queryMarginAccountsOco( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-open-oco">Query * Margin Account's Open OCO (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsOpenOco( - String isIsolated, String symbol, Long recvWindow) throws ApiException { + IsIsolated isIsolated, String symbol, Long recvWindow) throws ApiException { return tradeApi.queryMarginAccountsOpenOco(isIsolated, symbol, recvWindow); } /** - * Query Margin Account's Open Orders (USER_DATA) Query Margin Account's Open Orders * - * If the symbol is not sent, orders for all symbols will be returned in an array. * When all - * symbols are returned, the number of requests counted against the rate limiter is equal to the - * number of symbols currently trading on the exchange. * If isIsolated - * =\"TRUE\", symbol must be sent. Weight: 10(IP) + * Query Margin Account's Open Orders (USER_DATA) Query Margin Account's Open Orders + * Weight(IP): 10 Security Type: USER_DATA Notes: - If the symbol is not sent, orders for all + * symbols will be returned in an array. - When all symbols are returned, the number of requests + * counted against the rate limiter is equal to the number of symbols currently trading on the + * exchange. - If isIsolated =\"TRUE\", symbol must be sent. * * @param symbol isolated margin pair (optional) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param recvWindow No more than 60000 (optional) + * @param isIsolated (optional, default to FALSE) + * @param recvWindow (optional) * @return ApiResponse<QueryMarginAccountsOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1608,25 +1731,25 @@ public ApiResponse queryMarginAccountsOpenOc * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-open-orders">Query * Margin Account's Open Orders (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsOpenOrders( - String symbol, String isIsolated, Long recvWindow) throws ApiException { + String symbol, IsIsolated isIsolated, Long recvWindow) throws ApiException { return tradeApi.queryMarginAccountsOpenOrders(symbol, isIsolated, recvWindow); } /** - * Query Margin Account's Order (USER_DATA) Query Margin Account's Order * Either - * orderId or origClientOrderId must be sent. * For some historical orders cummulativeQuoteQty - * will be < 0, meaning the data is not available at this time. Weight: 10(IP) + * Query Margin Account's Order (USER_DATA) Query Margin Account's Order Weight(IP): 10 + * Security Type: USER_DATA Notes: - Either orderId or origClientOrderId must be sent. - For + * some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available + * at this time. * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) + * @param isIsolated (optional, default to FALSE) * @param orderId (optional) * @param origClientOrderId (optional) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMarginAccountsOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1638,12 +1761,12 @@ public ApiResponse queryMarginAccountsOpe * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-order">Query * Margin Account's Order (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsOrder( String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderId, String origClientOrderId, Long recvWindow) @@ -1653,22 +1776,19 @@ public ApiResponse queryMarginAccountsOrder( } /** - * Query Margin Account's Trade List (USER_DATA) Query Margin Account's Trade List * If - * fromId is set, it will get trades >= that fromId. Otherwise the trades within 24 - * hours are returned. * Less than 24 hours between startTime and endTime. Weight: 10(IP) + * Query Margin Account's Trade List (USER_DATA) Query Margin Account's Trade List + * Weight(IP): 10 Security Type: USER_DATA Notes: - If fromId is set, it will get trades + * >= that fromId. Otherwise the trades within 24 hours are returned. - Less than 24 + * hours between startTime and endTime. * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) + * @param isIsolated (optional, default to FALSE) * @param orderId (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param startTime (optional) * @param endTime (optional) - * @param fromId If `fromId` is set, data with `id` greater than - * `fromId` will be returned. Otherwise, the latest data will be returned. - * (optional) - * @param limit Limit on the number of data records returned per request. Default: 500; Maximum: - * 1000. (optional) - * @param recvWindow No more than 60000 (optional) + * @param fromId (optional) + * @param limit (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMarginAccountsTradeListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1680,12 +1800,12 @@ public ApiResponse queryMarginAccountsOrder( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-trade-list">Query * Margin Account's Trade List (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsTradeList( String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderId, Long startTime, Long endTime, @@ -1698,15 +1818,22 @@ public ApiResponse queryMarginAccountsTrad } /** - * Query Prevented Matches(USER_DATA) Weight: 10(IP) + * Query Prevented Matches (USER_DATA) Displays the list of orders that were expired due to STP. + * (Self-Trade Prevention). Weight(IP): 10 Security Type: USER_DATA Notes: - Supported parameter + * combinations: - `symbol` + `preventedMatchId` - `symbol` + + * `orderId` - `symbol` + `orderId` + + * `fromPreventedMatchId` - If `orderId` is provided, all prevented matches + * for that order will be returned. - If `preventedMatchId` is provided, the specific + * prevented match will be returned. - A single request returns a maximum of 500 records. If + * there are more than 500 records, use `symbol` + `orderId` + + * `fromPreventedMatchId` combination for pagination. * * @param symbol (required) * @param preventedMatchId (optional) * @param orderId (optional) * @param fromPreventedMatchId (optional) - * @param recvWindow No more than 60000 (optional) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) + * @param isIsolated (optional, default to FALSE) + * @param recvWindow (optional) * @return ApiResponse<QueryPreventedMatchesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1718,27 +1845,27 @@ public ApiResponse queryMarginAccountsTrad * * * @see Query - * Prevented Matches(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-prevented-matches">Query + * Prevented Matches (USER_DATA) Documentation */ public ApiResponse queryPreventedMatches( String symbol, Long preventedMatchId, Long orderId, Long fromPreventedMatchId, - Long recvWindow, - String isIsolated) + IsIsolated isIsolated, + Long recvWindow) throws ApiException { return tradeApi.queryPreventedMatches( - symbol, preventedMatchId, orderId, fromPreventedMatchId, recvWindow, isIsolated); + symbol, preventedMatchId, orderId, fromPreventedMatchId, isIsolated, recvWindow); } /** - * Query Special key(Low Latency Trading)(TRADE) Query Special Key Information. This only - * applies to Special Key for Low Latency Trading. Weight: 1(UID) + * Query Special key(Low Latency Trading) (TRADE) Query Special Key Information. This only + * applies to Special Key for Low Latency Trading. Weight(UID): 1 Security Type: TRADE * - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param symbol (optional) + * @param recvWindow (optional) * @return ApiResponse<QuerySpecialKeyResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1750,8 +1877,8 @@ public ApiResponse queryPreventedMatches( * * * @see Query - * Special key(Low Latency Trading)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-special-key">Query + * Special key(Low Latency Trading) (TRADE) Documentation */ public ApiResponse querySpecialKey(String symbol, Long recvWindow) throws ApiException { @@ -1759,11 +1886,11 @@ public ApiResponse querySpecialKey(String symbol, Long } /** - * Query Special key List(Low Latency Trading)(TRADE) This only applies to Special Key for Low - * Latency Trading. Weight: 1(UID) + * Query Special key List(Low Latency Trading) (TRADE) This only applies to Special Key for Low + * Latency Trading. Weight(UID): 1 Security Type: TRADE * - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param symbol (optional) + * @param recvWindow (optional) * @return ApiResponse<QuerySpecialKeyListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1775,8 +1902,8 @@ public ApiResponse querySpecialKey(String symbol, Long * * * @see Query - * Special key List(Low Latency Trading)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-special-key-list">Query + * Special key List(Low Latency Trading) (TRADE) Documentation */ public ApiResponse querySpecialKeyList( String symbol, Long recvWindow) throws ApiException { @@ -1784,9 +1911,9 @@ public ApiResponse querySpecialKeyList( } /** - * Small Liability Exchange (MARGIN) Small Liability Exchange * Only convert once within 6 hours - * * Only liability valuation less than 10 USDT are supported * The maximum number of coin is 10 - * Weight: 3000(UID) + * Small Liability Exchange (MARGIN) Small Liability Exchange Weight(UID): 3000 Security Type: + * MARGIN Notes: - Only convert once within 6 hours - Only liability valuation less than 10 USDT + * are supported - The maximum number of coin is 10 * * @param smallLiabilityExchangeRequest (required) * @return ApiResponse<Void> @@ -1800,7 +1927,7 @@ public ApiResponse querySpecialKeyList( * * * @see Small + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#small-liability-exchange">Small * Liability Exchange (MARGIN) Documentation */ public void smallLiabilityExchange(SmallLiabilityExchangeRequest smallLiabilityExchangeRequest) @@ -1809,18 +1936,19 @@ public void smallLiabilityExchange(SmallLiabilityExchangeRequest smallLiabilityE } /** - * Get Cross Margin Transfer History (USER_DATA) Get Cross Margin Transfer History * Response in - * descending order * The max interval between `startTime` and `endTime` is - * 30 days. * Returns data for last 7 days by default Weight: 1(IP) + * Get Cross Margin Transfer History (USER_DATA) Get Cross Margin Transfer History Weight(IP): 1 + * Security Type: USER_DATA Notes: - Response in descending order - The max interval between + * `startTime` and `endTime` is 30 days. - Returns data for last 7 days by + * default * * @param asset (optional) - * @param type Transfer Type: ROLL_IN, ROLL_OUT (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param type (optional) + * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param isolatedSymbol isolated symbol (optional) - * @param recvWindow No more than 60000 (optional) + * @param current (optional) + * @param size (optional) + * @param isolatedSymbol (optional) + * @param recvWindow (optional) * @return ApiResponse<GetCrossMarginTransferHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1832,12 +1960,12 @@ public void smallLiabilityExchange(SmallLiabilityExchangeRequest smallLiabilityE * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/transfer#get-cross-margin-transfer-history">Get * Cross Margin Transfer History (USER_DATA) Documentation */ public ApiResponse getCrossMarginTransferHistory( String asset, - String type, + OrderType type, Long startTime, Long endTime, Long current, @@ -1850,12 +1978,13 @@ public ApiResponse getCrossMarginTransfer } /** - * Query Max Transfer-Out Amount (USER_DATA) Query Max Transfer-Out Amount * If isolatedSymbol - * is not sent, crossed margin data will be sent. Weight: 50(IP) + * Query Max Transfer-Out Amount (USER_DATA) Query Max Transfer-Out Amount Weight(IP): 50 + * Security Type: USER_DATA Notes: - If isolatedSymbol is not sent, crossed margin data will be + * sent. * * @param asset (required) - * @param isolatedSymbol isolated symbol (optional) - * @param recvWindow No more than 60000 (optional) + * @param isolatedSymbol (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMaxTransferOutAmountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1867,11 +1996,79 @@ public ApiResponse getCrossMarginTransfer * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/transfer#query-max-transfer-out-amount">Query * Max Transfer-Out Amount (USER_DATA) Documentation */ public ApiResponse queryMaxTransferOutAmount( String asset, String isolatedSymbol, Long recvWindow) throws ApiException { return transferApi.queryMaxTransferOutAmount(asset, isolatedSymbol, recvWindow); } + + /** + * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight(UID): 3000 Security + * Type: USER_STREAM + * + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
+ * + * @see Close + * User Data Stream (USER_STREAM) Documentation + */ + public void closeUserDataStream() throws ApiException { + userDataStreamApi.closeUserDataStream(); + } + + /** + * Keepalive User Data Stream (USER_STREAM) Keepalive a user data stream to prevent a time out. + * Weight(UID): 1 Security Type: USER_STREAM + * + * @param keepaliveUserDataStreamRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
+ * + * @see Keepalive + * User Data Stream (USER_STREAM) Documentation + */ + public void keepaliveUserDataStream( + KeepaliveUserDataStreamRequest keepaliveUserDataStreamRequest) throws ApiException { + userDataStreamApi.keepaliveUserDataStream(keepaliveUserDataStreamRequest); + } + + /** + * Start User Data Stream (USER_STREAM) Start a new user data stream. Weight(UID): 1 Security + * Type: USER_STREAM + * + * @return ApiResponse<StartUserDataStreamResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Start User Data Stream -
+ * + * @see Start + * User Data Stream (USER_STREAM) Documentation + */ + public ApiResponse startUserDataStream() throws ApiException { + return userDataStreamApi.startUserDataStream(); + } } diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarketDataApi.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarketDataApi.java index 5e1121f07..772b34f8a 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarketDataApi.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarketDataApi.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -28,6 +28,7 @@ import com.binance.connector.client.margin_trading.rest.model.GetListScheduleResponse; import com.binance.connector.client.margin_trading.rest.model.GetMarginAssetRiskBasedLiquidationRatioResponse; import com.binance.connector.client.margin_trading.rest.model.GetMarginRestrictedAssetsResponse; +import com.binance.connector.client.margin_trading.rest.model.OrderType; import com.binance.connector.client.margin_trading.rest.model.QueryIsolatedMarginTierDataResponse; import com.binance.connector.client.margin_trading.rest.model.QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAvailableInventoryResponse; @@ -54,7 +55,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-margin-trading/6.1.0 (Java/%s; %s; %s)", + "binance-margin-trading/7.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -104,7 +105,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Cross + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#cross-margin-collateral-ratio">Cross * margin collateral ratio (MARKET_DATA) Documentation */ private okhttp3.Call crossMarginCollateralRatioCall() throws ApiException { @@ -192,7 +193,8 @@ private okhttp3.Call crossMarginCollateralRatioValidateBeforeCall() throws ApiEx } /** - * Cross margin collateral ratio (MARKET_DATA) Cross margin collateral ratio Weight: 100(IP) + * Cross margin collateral ratio (MARKET_DATA) Cross margin collateral ratio Weight(IP): 100 + * Security Type: MARKET_DATA * * @return ApiResponse<CrossMarginCollateralRatioResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -205,7 +207,7 @@ private okhttp3.Call crossMarginCollateralRatioValidateBeforeCall() throws ApiEx * * * @see Cross + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#cross-margin-collateral-ratio">Cross * margin collateral ratio (MARKET_DATA) Documentation */ public ApiResponse crossMarginCollateralRatio() @@ -219,7 +221,7 @@ public ApiResponse crossMarginCollateralRati /** * Build call for getAllCrossMarginPairs * - * @param symbol isolated margin pair (optional) + * @param symbol (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -230,7 +232,7 @@ public ApiResponse crossMarginCollateralRati * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-cross-margin-pairs">Get * All Cross Margin Pairs (MARKET_DATA) Documentation */ private okhttp3.Call getAllCrossMarginPairsCall(String symbol) throws ApiException { @@ -323,9 +325,10 @@ private okhttp3.Call getAllCrossMarginPairsValidateBeforeCall(String symbol) } /** - * Get All Cross Margin Pairs (MARKET_DATA) Get All Cross Margin Pairs Weight: 1(IP) + * Get All Cross Margin Pairs (MARKET_DATA) Get All Cross Margin Pairs Weight(IP): 1 Security + * Type: MARKET_DATA * - * @param symbol isolated margin pair (optional) + * @param symbol (optional) * @return ApiResponse<GetAllCrossMarginPairsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -337,7 +340,7 @@ private okhttp3.Call getAllCrossMarginPairsValidateBeforeCall(String symbol) * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-cross-margin-pairs">Get * All Cross Margin Pairs (MARKET_DATA) Documentation */ public ApiResponse getAllCrossMarginPairs(String symbol) @@ -351,8 +354,8 @@ public ApiResponse getAllCrossMarginPairs(String /** * Build call for getAllIsolatedMarginSymbol * - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param symbol (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -363,8 +366,8 @@ public ApiResponse getAllCrossMarginPairs(String * * * @see Get - * All Isolated Margin Symbol(MARKET_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-isolated-margin-symbol">Get + * All Isolated Margin Symbol (MARKET_DATA) Documentation */ private okhttp3.Call getAllIsolatedMarginSymbolCall(String symbol, Long recvWindow) throws ApiException { @@ -463,10 +466,11 @@ private okhttp3.Call getAllIsolatedMarginSymbolValidateBeforeCall( } /** - * Get All Isolated Margin Symbol(MARKET_DATA) Get All Isolated Margin Symbol Weight: 10(IP) + * Get All Isolated Margin Symbol (MARKET_DATA) Get All Isolated Margin Symbol Weight(IP): 10 + * Security Type: MARKET_DATA * - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param symbol (optional) + * @param recvWindow (optional) * @return ApiResponse<GetAllIsolatedMarginSymbolResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -478,11 +482,11 @@ private okhttp3.Call getAllIsolatedMarginSymbolValidateBeforeCall( * * * @see Get - * All Isolated Margin Symbol(MARKET_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-isolated-margin-symbol">Get + * All Isolated Margin Symbol (MARKET_DATA) Documentation */ public ApiResponse getAllIsolatedMarginSymbol( - String symbol, Long recvWindow) throws ApiException { + String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getAllIsolatedMarginSymbolValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -504,7 +508,7 @@ public ApiResponse getAllIsolatedMarginSymbo * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-margin-assets">Get * All Margin Assets (MARKET_DATA) Documentation */ private okhttp3.Call getAllMarginAssetsCall(String asset) throws ApiException { @@ -596,7 +600,8 @@ private okhttp3.Call getAllMarginAssetsValidateBeforeCall(String asset) throws A } /** - * Get All Margin Assets (MARKET_DATA) Get All Margin Assets. Weight: 1(IP) + * Get All Margin Assets (MARKET_DATA) Get All Margin Assets. Weight(IP): 1 Security Type: + * MARKET_DATA * * @param asset (optional) * @return ApiResponse<GetAllMarginAssetsResponse> @@ -610,7 +615,7 @@ private okhttp3.Call getAllMarginAssetsValidateBeforeCall(String asset) throws A * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-margin-assets">Get * All Margin Assets (MARKET_DATA) Documentation */ public ApiResponse getAllMarginAssets(String asset) @@ -624,7 +629,7 @@ public ApiResponse getAllMarginAssets(String asset) /** * Build call for getDelistSchedule * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -635,7 +640,7 @@ public ApiResponse getAllMarginAssets(String asset) * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-delist-schedule">Get * Delist Schedule (MARKET_DATA) Documentation */ private okhttp3.Call getDelistScheduleCall(Long recvWindow) throws ApiException { @@ -728,9 +733,9 @@ private okhttp3.Call getDelistScheduleValidateBeforeCall(Long recvWindow) throws /** * Get Delist Schedule (MARKET_DATA) Get tokens or symbols delist schedule for cross margin and - * isolated margin Weight: 100 + * isolated margin Weight(IP): 100 Security Type: MARKET_DATA * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<GetDelistScheduleResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -742,10 +747,10 @@ private okhttp3.Call getDelistScheduleValidateBeforeCall(Long recvWindow) throws * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-delist-schedule">Get * Delist Schedule (MARKET_DATA) Documentation */ - public ApiResponse getDelistSchedule(Long recvWindow) + public ApiResponse getDelistSchedule(@Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getDelistScheduleValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = @@ -766,8 +771,8 @@ public ApiResponse getDelistSchedule(Long recvWindow) * * * @see Get - * Limit Price Pairs(MARKET_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-limit-price-pairs">Get + * Limit Price Pairs (MARKET_DATA) Documentation */ private okhttp3.Call getLimitPricePairsCall() throws ApiException { String basePath = null; @@ -854,16 +859,16 @@ private okhttp3.Call getLimitPricePairsValidateBeforeCall() throws ApiException } /** - * Get Limit Price Pairs(MARKET_DATA) Query trading pairs with restriction on limit price range. - * In margin trading, you can place orders with limit price. Limit price should be within (-15%, - * 15%) of current index price for a list of margin trading pairs. This rule only impacts limit - * sell orders with limit price that is lower than current index price and limit buy orders with - * limit price that is higher than current index price. - Buy order: Your order will be rejected - * with an error message notification if the limit price is 15% above the index price. - Sell - * order: Your order will be rejected with an error message notification if the limit price is - * 15% below the index price. Please review the limit price order placing strategy, backtest and - * calibrate the planned order size with the trading volume and order book depth to prevent - * trading loss. Weight: 1 + * Get Limit Price Pairs (MARKET_DATA) Query trading pairs with restriction on limit price + * range. In margin trading, you can place orders with limit price. Limit price should be within + * (-15%, 15%) of current index price for a list of margin trading pairs. This rule only impacts + * limit sell orders with limit price that is lower than current index price and limit buy + * orders with limit price that is higher than current index price. - Buy order: Your order will + * be rejected with an error message notification if the limit price is 15% above the index + * price. - Sell order: Your order will be rejected with an error message notification if the + * limit price is 15% below the index price. Please review the limit price order placing + * strategy, backtest and calibrate the planned order size with the trading volume and order + * book depth to prevent trading loss. Weight(IP): 1 Security Type: MARKET_DATA * * @return ApiResponse<GetLimitPricePairsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -876,8 +881,8 @@ private okhttp3.Call getLimitPricePairsValidateBeforeCall() throws ApiException * * * @see Get - * Limit Price Pairs(MARKET_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-limit-price-pairs">Get + * Limit Price Pairs (MARKET_DATA) Documentation */ public ApiResponse getLimitPricePairs() throws ApiException { okhttp3.Call localVarCall = getLimitPricePairsValidateBeforeCall(); @@ -889,7 +894,7 @@ public ApiResponse getLimitPricePairs() throws ApiEx /** * Build call for getListSchedule * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -900,7 +905,7 @@ public ApiResponse getLimitPricePairs() throws ApiEx * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-list-schedule">Get * list Schedule (MARKET_DATA) Documentation */ private okhttp3.Call getListScheduleCall(Long recvWindow) throws ApiException { @@ -993,9 +998,9 @@ private okhttp3.Call getListScheduleValidateBeforeCall(Long recvWindow) throws A /** * Get list Schedule (MARKET_DATA) Get the upcoming tokens or symbols listing schedule for Cross - * Margin and Isolated Margin. Weight: 100 + * Margin and Isolated Margin. Weight(IP): 100 Security Type: MARKET_DATA * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<GetListScheduleResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1007,10 +1012,10 @@ private okhttp3.Call getListScheduleValidateBeforeCall(Long recvWindow) throws A * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-list-schedule">Get * list Schedule (MARKET_DATA) Documentation */ - public ApiResponse getListSchedule(Long recvWindow) + public ApiResponse getListSchedule(@Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getListScheduleValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1031,7 +1036,7 @@ public ApiResponse getListSchedule(Long recvWindow) * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-margin-asset-risk-based-liquidation-ratio">Get * Margin Asset Risk-Based Liquidation Ratio (MARKET_DATA) Documentation */ private okhttp3.Call getMarginAssetRiskBasedLiquidationRatioCall() throws ApiException { @@ -1121,7 +1126,7 @@ private okhttp3.Call getMarginAssetRiskBasedLiquidationRatioValidateBeforeCall() /** * Get Margin Asset Risk-Based Liquidation Ratio (MARKET_DATA) Get Margin Asset Risk-Based - * Liquidation Ratio Weight: 1 + * Liquidation Ratio Weight(IP): 1 Security Type: MARKET_DATA * * @return ApiResponse<GetMarginAssetRiskBasedLiquidationRatioResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1134,7 +1139,7 @@ private okhttp3.Call getMarginAssetRiskBasedLiquidationRatioValidateBeforeCall() * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-margin-asset-risk-based-liquidation-ratio">Get * Margin Asset Risk-Based Liquidation Ratio (MARKET_DATA) Documentation */ public ApiResponse @@ -1158,7 +1163,7 @@ private okhttp3.Call getMarginAssetRiskBasedLiquidationRatioValidateBeforeCall() * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-margin-restricted-assets">Get * Margin Restricted Assets (MARKET_DATA) Documentation */ private okhttp3.Call getMarginRestrictedAssetsCall() throws ApiException { @@ -1246,7 +1251,8 @@ private okhttp3.Call getMarginRestrictedAssetsValidateBeforeCall() throws ApiExc } /** - * Get Margin Restricted Assets (MARKET_DATA) Get Margin Restricted Assets Weight: 1 + * Get Margin Restricted Assets (MARKET_DATA) Get the list of margin-restricted assets. + * Weight(IP): 1 Security Type: MARKET_DATA * * @return ApiResponse<GetMarginRestrictedAssetsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1259,7 +1265,7 @@ private okhttp3.Call getMarginRestrictedAssetsValidateBeforeCall() throws ApiExc * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-margin-restricted-assets">Get * Margin Restricted Assets (MARKET_DATA) Documentation */ public ApiResponse getMarginRestrictedAssets() @@ -1274,8 +1280,8 @@ public ApiResponse getMarginRestrictedAssets( * Build call for queryIsolatedMarginTierData * * @param symbol (required) - * @param tier All margin tier data will be returned if tier is omitted (optional) - * @param recvWindow No more than 60000 (optional) + * @param tier (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1286,7 +1292,7 @@ public ApiResponse getMarginRestrictedAssets( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-isolated-margin-tier-data">Query * Isolated Margin Tier Data (USER_DATA) Documentation */ private okhttp3.Call queryIsolatedMarginTierDataCall(String symbol, Long tier, Long recvWindow) @@ -1396,11 +1402,11 @@ private okhttp3.Call queryIsolatedMarginTierDataValidateBeforeCall( /** * Query Isolated Margin Tier Data (USER_DATA) Get isolated margin tier data collection with any - * tier as https://www.binance.com/en/margin-data Weight: 1(IP) + * tier as https://www.binance.com/en/margin-data Weight(IP): 1 Security Type: USER_DATA * * @param symbol (required) - * @param tier All margin tier data will be returned if tier is omitted (optional) - * @param recvWindow No more than 60000 (optional) + * @param tier (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryIsolatedMarginTierDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1412,11 +1418,11 @@ private okhttp3.Call queryIsolatedMarginTierDataValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-isolated-margin-tier-data">Query * Isolated Margin Tier Data (USER_DATA) Documentation */ public ApiResponse queryIsolatedMarginTierData( - @NotNull String symbol, Long tier, Long recvWindow) throws ApiException { + @NotNull String symbol, Long tier, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryIsolatedMarginTierDataValidateBeforeCall(symbol, tier, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1437,8 +1443,8 @@ public ApiResponse queryIsolatedMarginTierD * * * @see Query - * Liability Coin Leverage Bracket in Cross Margin Pro Mode(MARKET_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-liability-coin-leverage-bracket-in-cross-margin-pro-mode">Query + * Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) Documentation */ private okhttp3.Call queryLiabilityCoinLeverageBracketInCrossMarginProModeCall() throws ApiException { @@ -1529,8 +1535,8 @@ private okhttp3.Call queryLiabilityCoinLeverageBracketInCrossMarginProModeValida } /** - * Query Liability Coin Leverage Bracket in Cross Margin Pro Mode(MARKET_DATA) Liability Coin - * Leverage Bracket in Cross Margin Pro Mode Weight: 1 + * Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) Liability Coin + * Leverage Bracket in Cross Margin Pro Mode Weight(IP): 1 Security Type: MARKET_DATA * * @return ApiResponse<QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1543,8 +1549,8 @@ private okhttp3.Call queryLiabilityCoinLeverageBracketInCrossMarginProModeValida * * * @see Query - * Liability Coin Leverage Bracket in Cross Margin Pro Mode(MARKET_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-liability-coin-leverage-bracket-in-cross-margin-pro-mode">Query + * Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) Documentation */ public ApiResponse queryLiabilityCoinLeverageBracketInCrossMarginProMode() throws ApiException { @@ -1559,7 +1565,7 @@ private okhttp3.Call queryLiabilityCoinLeverageBracketInCrossMarginProModeValida /** * Build call for queryMarginAvailableInventory * - * @param type MARGIN,ISOLATED (required) + * @param type (required) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1570,10 +1576,10 @@ private okhttp3.Call queryLiabilityCoinLeverageBracketInCrossMarginProModeValida * * * @see Query - * Margin Available Inventory(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-margin-available-inventory">Query + * Margin Available Inventory (USER_DATA) Documentation */ - private okhttp3.Call queryMarginAvailableInventoryCall(String type) throws ApiException { + private okhttp3.Call queryMarginAvailableInventoryCall(OrderType type) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] {}; @@ -1633,7 +1639,7 @@ private okhttp3.Call queryMarginAvailableInventoryCall(String type) throws ApiEx } @SuppressWarnings("rawtypes") - private okhttp3.Call queryMarginAvailableInventoryValidateBeforeCall(String type) + private okhttp3.Call queryMarginAvailableInventoryValidateBeforeCall(OrderType type) throws ApiException { try { Validator validator = @@ -1646,7 +1652,7 @@ private okhttp3.Call queryMarginAvailableInventoryValidateBeforeCall(String type Object[] parameterValues = {type}; Method method = - this.getClass().getMethod("queryMarginAvailableInventory", String.class); + this.getClass().getMethod("queryMarginAvailableInventory", OrderType.class); Set> violations = executableValidator.validateParameters(this, method, parameterValues); @@ -1665,9 +1671,10 @@ private okhttp3.Call queryMarginAvailableInventoryValidateBeforeCall(String type } /** - * Query Margin Available Inventory(USER_DATA) Margin available Inventory query Weight: 50 + * Query Margin Available Inventory (USER_DATA) Margin available Inventory query Weight(UID): 50 + * Security Type: USER_DATA * - * @param type MARGIN,ISOLATED (required) + * @param type (required) * @return ApiResponse<QueryMarginAvailableInventoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1679,11 +1686,11 @@ private okhttp3.Call queryMarginAvailableInventoryValidateBeforeCall(String type * * * @see Query - * Margin Available Inventory(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-margin-available-inventory">Query + * Margin Available Inventory (USER_DATA) Documentation */ public ApiResponse queryMarginAvailableInventory( - @NotNull String type) throws ApiException { + @NotNull OrderType type) throws ApiException { okhttp3.Call localVarCall = queryMarginAvailableInventoryValidateBeforeCall(type); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -1704,7 +1711,7 @@ public ApiResponse queryMarginAvailableIn * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-margin-priceindex">Query * Margin PriceIndex (MARKET_DATA) Documentation */ private okhttp3.Call queryMarginPriceindexCall(String symbol) throws ApiException { @@ -1797,7 +1804,8 @@ private okhttp3.Call queryMarginPriceindexValidateBeforeCall(String symbol) } /** - * Query Margin PriceIndex (MARKET_DATA) Query Margin PriceIndex Weight: 10(IP) + * Query Margin PriceIndex (MARKET_DATA) Query Margin PriceIndex Weight(IP): 10 Security Type: + * MARKET_DATA * * @param symbol (required) * @return ApiResponse<QueryMarginPriceindexResponse> @@ -1811,7 +1819,7 @@ private okhttp3.Call queryMarginPriceindexValidateBeforeCall(String symbol) * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-margin-priceindex">Query * Margin PriceIndex (MARKET_DATA) Documentation */ public ApiResponse queryMarginPriceindex(@NotNull String symbol) diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/RiskDataStreamApi.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/RiskDataStreamApi.java deleted file mode 100644 index 80e69b33d..000000000 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/RiskDataStreamApi.java +++ /dev/null @@ -1,467 +0,0 @@ -/* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.margin_trading.rest.api; - -import com.binance.connector.client.common.ApiClient; -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.Pair; -import com.binance.connector.client.common.SystemUtil; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.exception.ConstraintViolationException; -import com.binance.connector.client.margin_trading.rest.model.KeepaliveUserDataStreamRequest; -import com.binance.connector.client.margin_trading.rest.model.StartUserDataStreamResponse; -import com.google.gson.reflect.TypeToken; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.Valid; -import jakarta.validation.Validation; -import jakarta.validation.Validator; -import jakarta.validation.constraints.*; -import jakarta.validation.executable.ExecutableValidator; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; - -public class RiskDataStreamApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - private static final String USER_AGENT = - String.format( - "binance-margin-trading/6.1.0 (Java/%s; %s; %s)", - SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); - private static final boolean HAS_TIME_UNIT = false; - - public RiskDataStreamApi(ClientConfiguration clientConfiguration) { - this(new ApiClient(clientConfiguration)); - } - - public RiskDataStreamApi(ApiClient apiClient) { - apiClient.setUserAgent(USER_AGENT); - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for closeUserDataStream - * - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
- * - * @see Close - * User Data Stream (USER_STREAM) Documentation - */ - private okhttp3.Call closeUserDataStreamCall() throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/margin/listen-key"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "DELETE", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call closeUserDataStreamValidateBeforeCall() throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {}; - Method method = this.getClass().getMethod("closeUserDataStream"); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return closeUserDataStreamCall(); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight: 3000 - * - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
- * - * @see Close - * User Data Stream (USER_STREAM) Documentation - */ - public ApiResponse closeUserDataStream() throws ApiException { - okhttp3.Call localVarCall = closeUserDataStreamValidateBeforeCall(); - return localVarApiClient.execute(localVarCall); - } - - /** - * Build call for keepaliveUserDataStream - * - * @param keepaliveUserDataStreamRequest (required) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
- * - * @see Keepalive - * User Data Stream (USER_STREAM) Documentation - */ - private okhttp3.Call keepaliveUserDataStreamCall( - KeepaliveUserDataStreamRequest keepaliveUserDataStreamRequest) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/margin/listen-key"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (keepaliveUserDataStreamRequest.getListenKey() != null) { - localVarFormParams.put("listenKey", keepaliveUserDataStreamRequest.getListenKey()); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "PUT", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call keepaliveUserDataStreamValidateBeforeCall( - KeepaliveUserDataStreamRequest keepaliveUserDataStreamRequest) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {keepaliveUserDataStreamRequest}; - Method method = - this.getClass() - .getMethod( - "keepaliveUserDataStream", - KeepaliveUserDataStreamRequest.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return keepaliveUserDataStreamCall(keepaliveUserDataStreamRequest); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Keepalive User Data Stream (USER_STREAM) Keepalive a user data stream to prevent a time out. - * Weight: 1 - * - * @param keepaliveUserDataStreamRequest (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
- * - * @see Keepalive - * User Data Stream (USER_STREAM) Documentation - */ - public ApiResponse keepaliveUserDataStream( - @Valid @NotNull KeepaliveUserDataStreamRequest keepaliveUserDataStreamRequest) - throws ApiException { - okhttp3.Call localVarCall = - keepaliveUserDataStreamValidateBeforeCall(keepaliveUserDataStreamRequest); - return localVarApiClient.execute(localVarCall); - } - - /** - * Build call for startUserDataStream - * - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Start User Data Stream -
- * - * @see Start - * User Data Stream (USER_STREAM) Documentation - */ - private okhttp3.Call startUserDataStreamCall() throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/margin/listen-key"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call startUserDataStreamValidateBeforeCall() throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {}; - Method method = this.getClass().getMethod("startUserDataStream"); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return startUserDataStreamCall(); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Start User Data Stream (USER_STREAM) Start a new user data stream. Weight: 1 - * - * @return ApiResponse<StartUserDataStreamResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Start User Data Stream -
- * - * @see Start - * User Data Stream (USER_STREAM) Documentation - */ - public ApiResponse startUserDataStream() throws ApiException { - okhttp3.Call localVarCall = startUserDataStreamValidateBeforeCall(); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } -} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/TradeApi.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/TradeApi.java index c921a7c2a..b56298a1a 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/TradeApi.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/TradeApi.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -16,7 +16,6 @@ import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.DecimalFormatter; -import com.binance.connector.client.common.JSON; import com.binance.connector.client.common.Pair; import com.binance.connector.client.common.SystemUtil; import com.binance.connector.client.common.configuration.ClientConfiguration; @@ -24,9 +23,13 @@ import com.binance.connector.client.margin_trading.rest.model.CreateSpecialKeyRequest; import com.binance.connector.client.margin_trading.rest.model.CreateSpecialKeyResponse; import com.binance.connector.client.margin_trading.rest.model.EditIpForSpecialKeyRequest; +import com.binance.connector.client.margin_trading.rest.model.ExitSpecialKeyModeRequest; import com.binance.connector.client.margin_trading.rest.model.GetForceLiquidationRecordResponse; import com.binance.connector.client.margin_trading.rest.model.GetSmallLiabilityExchangeCoinListResponse; import com.binance.connector.client.margin_trading.rest.model.GetSmallLiabilityExchangeHistoryResponse; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; +import com.binance.connector.client.margin_trading.rest.model.LiquidationLoanRepayRequest; +import com.binance.connector.client.margin_trading.rest.model.LiquidationLoanRepayResponse; import com.binance.connector.client.margin_trading.rest.model.MarginAccountCancelAllOpenOrdersOnASymbolResponse; import com.binance.connector.client.margin_trading.rest.model.MarginAccountCancelOcoResponse; import com.binance.connector.client.margin_trading.rest.model.MarginAccountCancelOrderResponse; @@ -41,6 +44,8 @@ import com.binance.connector.client.margin_trading.rest.model.MarginManualLiquidationRequest; import com.binance.connector.client.margin_trading.rest.model.MarginManualLiquidationResponse; import com.binance.connector.client.margin_trading.rest.model.QueryCurrentMarginOrderCountUsageResponse; +import com.binance.connector.client.margin_trading.rest.model.QueryLiquidationLoanRepayHistoryResponse; +import com.binance.connector.client.margin_trading.rest.model.QueryLiquidationLoanResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsAllOcoResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsAllOrdersResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsOcoResponse; @@ -75,7 +80,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-margin-trading/6.1.0 (Java/%s; %s; %s)", + "binance-margin-trading/7.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -126,8 +131,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Create - * Special Key(Low-Latency Trading)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#create-special-key">Create + * Special Key(Low-Latency Trading) (TRADE) Documentation */ private okhttp3.Call createSpecialKeyCall(CreateSpecialKeyRequest createSpecialKeyRequest) throws ApiException { @@ -242,19 +247,38 @@ private okhttp3.Call createSpecialKeyValidateBeforeCall( } /** - * Create Special Key(Low-Latency Trading)(TRADE) - Binance Margin offers low-latency trading - * through a [special + * Create Special Key(Low-Latency Trading) (TRADE) **Eligibility** - Binance Margin offers + * low-latency trading through a [special * key](https://www.binance.com/en/support/faq/frequently-asked-questions-on-margin-special-api-key-3208663e900d4d2e9fec4140e1832f4e), - * available exclusively to users with VIP level 4 or higher. - If you are VIP level 3 or below, - * please contact your VIP manager for eligibility criterias.** **Supported Products:** - Cross - * Margin - Isolated Margin - Portfolio Margin Pro - Cross Margin Pro (Additional agreement - * required and subject to meeting eligibility criteria) **Unsupported Products:** - Portfolio - * Margin We support several types of API keys: * Ed25519 (recommended) * HMAC * RSA We - * recommend to **use Ed25519 API keys** as it should provide the best performance and security - * out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). For how to generate an - * RSA key pair to send API requests on Binance. Please refer to the document below + * available exclusively to users with VIP level 7 or higher. - If you are VIP level 6 or below, + * please contact your VIP manager for eligibility criterias. - All new Margin Special Key users + * are required to read, understand, and agree to the Margin Special Key Supplemental Product + * Terms at the master account level before creating a Margin Special Key. - Once signed at the + * master account level, the agreement applies to all sub-accounts. The master account and all + * sub-accounts (Cross Margin Classic and Portfolio Margin Pro) are authorized to create a + * Margin Special Key and are subject to the LiquidationLoan policy. For more information, + * please refer to + * [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). + * **Supported Products:** - Cross Margin - Isolated Margin - Portfolio Margin Pro **Unsupported + * Products:** - Portfolio Margin We support several types of API keys: * Ed25519 (recommended) + * * HMAC * RSA We recommend to **use Ed25519 API keys** as it should provide the best + * performance and security out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). + * For how to generate an RSA key pair to send API requests on Binance. Please refer to the + * document below * [FAQ](https://www.binance.com/en/support/faq/how-to-generate-an-rsa-key-pair-to-send-api-requests-on-binance-2b79728f331e43079b27440d9d15c5db) - * . Weight: 1(UID) + * . **How to use the Margin Special Key** - Use the below `sapi` endpoint to create + * your margin special API Key. - For accessing the Cross Margin account, do not send the + * `symbol` parameter. - For accessing the Isolated Margin account(s), pass the + * relevant `symbol` parameter in the API Key creation request. - Use the generated + * API Key (and Secret key, if applicable) to perform margin trading and listenKey generation + * via **Spot** REST API (`https://api.binance.com/api/v3/_*`) endpoints. Read [REST + * API](/products/spot/rest-api#signed-trade-and-user_data-endpoint-security) or [WebSocket + * API](/products/spot/web-socket-api#request-security) documentation to learn how to use + * different API keys You need to enable Permits “Enable Spot & Margin Trading” option for + * the API Key which requests this endpoint. Weight(UID): 1 Security Type: TRADE Response Notes: + * - Error Code Description - **UNSUPPORTED_OPERATION** : Portfolio Margin is an unsupported + * product, please change the account type to a supported margin product. - **Forbidden**: Cross + * Margin Pro accounts require additional agreements, please contact your relationship manager. * * @param createSpecialKeyRequest (required) * @return ApiResponse<CreateSpecialKeyResponse> @@ -268,8 +292,8 @@ private okhttp3.Call createSpecialKeyValidateBeforeCall( * * * @see Create - * Special Key(Low-Latency Trading)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#create-special-key">Create + * Special Key(Low-Latency Trading) (TRADE) Documentation */ public ApiResponse createSpecialKey( @Valid @NotNull CreateSpecialKeyRequest createSpecialKeyRequest) throws ApiException { @@ -283,8 +307,8 @@ public ApiResponse createSpecialKey( * Build call for deleteSpecialKey * * @param apiName (optional) - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param symbol (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -295,8 +319,8 @@ public ApiResponse createSpecialKey( * * * @see Delete - * Special Key(Low-Latency Trading)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#delete-special-key">Delete + * Special Key(Low-Latency Trading) (TRADE) Documentation */ private okhttp3.Call deleteSpecialKeyCall(String apiName, String symbol, Long recvWindow) throws ApiException { @@ -400,15 +424,21 @@ private okhttp3.Call deleteSpecialKeyValidateBeforeCall( } /** - * Delete Special Key(Low-Latency Trading)(TRADE) This only applies to Special Key for Low - * Latency Trading. If apiKey is given, apiName will be ignored. If apiName is given with no + * Delete Special Key(Low-Latency Trading) (TRADE) Deleting your Margin Special Key alone does + * not exit you from the Margin Special Key framework or discharge your obligations under the + * Margin Special Key Supplemental Product Terms. To fully exit, you must: 1. Delete your Margin + * Special Key. 2. Ensure there are no outstanding liabilities on the account. 3. Call the Exit + * Margin Special Key API endpoint. 4. Confirm the exit status via the API response. Only after + * step 4 is completed and the exit status is confirmed by Binance will your account revert to + * standard liquidation logic and no longer be subject to the Margin Special Key Supplemental + * Product Terms. If apiKey is given, apiName will be ignored. If apiName is given with no * apiKey, all apikeys with given apiName will be deleted. You need to enable Permits “Enable - * Spot & Margin Trading” option for the API Key which requests this endpoint. Weight: - * 1(UID) + * Spot & Margin” option for the API Key which requests this endpoint. Weight(UID): 1 + * Security Type: TRADE * * @param apiName (optional) - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param symbol (optional) + * @param recvWindow (optional) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -420,11 +450,11 @@ private okhttp3.Call deleteSpecialKeyValidateBeforeCall( * * * @see Delete - * Special Key(Low-Latency Trading)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#delete-special-key">Delete + * Special Key(Low-Latency Trading) (TRADE) Documentation */ - public ApiResponse deleteSpecialKey(String apiName, String symbol, Long recvWindow) - throws ApiException { + public ApiResponse deleteSpecialKey( + String apiName, String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = deleteSpecialKeyValidateBeforeCall(apiName, symbol, recvWindow); return localVarApiClient.execute(localVarCall); } @@ -443,8 +473,8 @@ public ApiResponse deleteSpecialKey(String apiName, String symbol, Long re * * * @see Edit - * ip for Special Key(Low-Latency Trading)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#edit-ip-for-special-key">Edit + * ip for Special Key(Low-Latency Trading) (TRADE) Documentation */ private okhttp3.Call editIpForSpecialKeyCall( EditIpForSpecialKeyRequest editIpForSpecialKeyRequest) throws ApiException { @@ -548,9 +578,9 @@ private okhttp3.Call editIpForSpecialKeyValidateBeforeCall( } /** - * Edit ip for Special Key(Low-Latency Trading)(TRADE) Edit ip restriction. This only applies to - * Special Key for Low Latency Trading. You need to enable Permits “Enable Spot & Margin - * Trading” option for the API Key which requests this endpoint. Weight: 1(UID) + * Edit ip for Special Key(Low-Latency Trading) (TRADE) Edit ip restriction. This only applies + * to Special Key for Low Latency Trading. You need to enable Permits “Enable Spot & Margin” + * option for the API Key which requests this endpoint. Weight(UID): 1 Security Type: TRADE * * @param editIpForSpecialKeyRequest (required) * @return ApiResponse<Void> @@ -564,8 +594,8 @@ private okhttp3.Call editIpForSpecialKeyValidateBeforeCall( * * * @see Edit - * ip for Special Key(Low-Latency Trading)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#edit-ip-for-special-key">Edit + * ip for Special Key(Low-Latency Trading) (TRADE) Documentation */ public ApiResponse editIpForSpecialKey( @Valid @NotNull EditIpForSpecialKeyRequest editIpForSpecialKeyRequest) @@ -575,15 +605,166 @@ public ApiResponse editIpForSpecialKey( return localVarApiClient.execute(localVarCall); } + /** + * Build call for exitSpecialKeyMode + * + * @param exitSpecialKeyModeRequest (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Exit Special Key Mode -
+ * + * @see Exit + * Special Key Mode (TRADE) Documentation + */ + private okhttp3.Call exitSpecialKeyModeCall(ExitSpecialKeyModeRequest exitSpecialKeyModeRequest) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/margin/exit-special-key-mode"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (exitSpecialKeyModeRequest.getRecvWindow() != null) { + localVarFormParams.put("recvWindow", exitSpecialKeyModeRequest.getRecvWindow()); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call exitSpecialKeyModeValidateBeforeCall( + ExitSpecialKeyModeRequest exitSpecialKeyModeRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {exitSpecialKeyModeRequest}; + Method method = + this.getClass() + .getMethod("exitSpecialKeyMode", ExitSpecialKeyModeRequest.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return exitSpecialKeyModeCall(exitSpecialKeyModeRequest); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Exit Special Key Mode (TRADE) Exit the Margin Special Key mode for Cross Margin Classic + * accounts. **All outstanding liabilities under the Cross Margin Classic account must be fully + * repaid before calling this endpoint.** Deleting the Margin Special Key alone does not + * constitute a valid exit. When a user creates a Margin Special API Key, the account enters + * \"Special Key Mode\". Upon a successful request, the following actions will be + * performed atomically: 1. All existing Margin Special API Keys under the Cross Margin Classic + * mode account will be deleted. 2. All pre-execution margin checks (including Open-order-loss + * calculation) will revert to standard mode. 3. A cooldown period (default: 24 hours) will be + * enforced, during which the account will not be permitted to create new Margin Special API + * Keys. For more information, please refer to + * [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). + * **Preconditions:** The following conditions must be met; otherwise the request will be + * rejected: - Account type must be **Cross Margin Classic**. - Account must currently be in + * **Special Key Mode**. If not, the request silently succeeds. - Account must **not be in + * liquidation**. - Account must **have no liability**. You need to enable \"Permits Enable + * Spot & Margin Trading\" option for the API Key which requests this endpoint. + * Weight(UID): 10 Security Type: TRADE + * + * @param exitSpecialKeyModeRequest (optional) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Exit Special Key Mode -
+ * + * @see Exit + * Special Key Mode (TRADE) Documentation + */ + public ApiResponse exitSpecialKeyMode( + @Valid ExitSpecialKeyModeRequest exitSpecialKeyModeRequest) throws ApiException { + okhttp3.Call localVarCall = exitSpecialKeyModeValidateBeforeCall(exitSpecialKeyModeRequest); + java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + /** * Build call for getForceLiquidationRecord * - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param startTime (optional) * @param endTime (optional) - * @param isolatedSymbol isolated symbol (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param recvWindow No more than 60000 (optional) + * @param isolatedSymbol (optional) + * @param current (optional) + * @param size (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -594,7 +775,7 @@ public ApiResponse editIpForSpecialKey( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-force-liquidation-record">Get * Force Liquidation Record (USER_DATA) Documentation */ private okhttp3.Call getForceLiquidationRecordCall( @@ -734,15 +915,15 @@ private okhttp3.Call getForceLiquidationRecordValidateBeforeCall( } /** - * Get Force Liquidation Record (USER_DATA) Get Force Liquidation Record * Response in - * descending order Weight: 1(IP) + * Get Force Liquidation Record (USER_DATA) Get Force Liquidation Record Weight(IP): 1 Security + * Type: USER_DATA Notes: - Response in descending order * - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param startTime (optional) * @param endTime (optional) - * @param isolatedSymbol isolated symbol (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param recvWindow No more than 60000 (optional) + * @param isolatedSymbol (optional) + * @param current (optional) + * @param size (optional) + * @param recvWindow (optional) * @return ApiResponse<GetForceLiquidationRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -754,16 +935,16 @@ private okhttp3.Call getForceLiquidationRecordValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-force-liquidation-record">Get * Force Liquidation Record (USER_DATA) Documentation */ public ApiResponse getForceLiquidationRecord( Long startTime, Long endTime, String isolatedSymbol, - Long current, - Long size, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getForceLiquidationRecordValidateBeforeCall( @@ -776,7 +957,7 @@ public ApiResponse getForceLiquidationRecord( /** * Build call for getSmallLiabilityExchangeCoinList * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -787,7 +968,7 @@ public ApiResponse getForceLiquidationRecord( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-small-liability-exchange-coin-list">Get * Small Liability Exchange Coin List (USER_DATA) Documentation */ private okhttp3.Call getSmallLiabilityExchangeCoinListCall(Long recvWindow) @@ -884,9 +1065,9 @@ private okhttp3.Call getSmallLiabilityExchangeCoinListValidateBeforeCall(Long re /** * Get Small Liability Exchange Coin List (USER_DATA) Query the coins which can be small - * liability exchange Weight: 100 + * liability exchange Weight(IP): 100 Security Type: USER_DATA * - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<GetSmallLiabilityExchangeCoinListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -898,11 +1079,11 @@ private okhttp3.Call getSmallLiabilityExchangeCoinListValidateBeforeCall(Long re * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-small-liability-exchange-coin-list">Get * Small Liability Exchange Coin List (USER_DATA) Documentation */ public ApiResponse getSmallLiabilityExchangeCoinList( - Long recvWindow) throws ApiException { + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getSmallLiabilityExchangeCoinListValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -912,11 +1093,11 @@ public ApiResponse getSmallLiabilityE /** * Build call for getSmallLiabilityExchangeHistory * - * @param current Currently querying page. Start from 1. Default:1 (required) - * @param size Default:10, Max:100 (required) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param current (required) + * @param size (required) + * @param startTime (optional) * @param endTime (optional) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -927,7 +1108,7 @@ public ApiResponse getSmallLiabilityE * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-small-liability-exchange-history">Get * Small Liability Exchange History (USER_DATA) Documentation */ private okhttp3.Call getSmallLiabilityExchangeHistoryCall( @@ -1049,14 +1230,14 @@ private okhttp3.Call getSmallLiabilityExchangeHistoryValidateBeforeCall( } /** - * Get Small Liability Exchange History (USER_DATA) Get Small liability Exchange History Weight: - * 100(UID) + * Get Small Liability Exchange History (USER_DATA) Get Small liability Exchange History + * Weight(UID): 100 Security Type: USER_DATA * - * @param current Currently querying page. Start from 1. Default:1 (required) - * @param size Default:10, Max:100 (required) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param current (required) + * @param size (required) + * @param startTime (optional) * @param endTime (optional) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<GetSmallLiabilityExchangeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1068,15 +1249,15 @@ private okhttp3.Call getSmallLiabilityExchangeHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-small-liability-exchange-history">Get * Small Liability Exchange History (USER_DATA) Documentation */ public ApiResponse getSmallLiabilityExchangeHistory( - @NotNull Long current, - @NotNull Long size, + @NotNull @Min(1L) Long current, + @NotNull @Max(100L) Long size, Long startTime, Long endTime, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getSmallLiabilityExchangeHistoryValidateBeforeCall( @@ -1086,13 +1267,165 @@ public ApiResponse getSmallLiabilityEx return localVarApiClient.execute(localVarCall, localVarReturnType); } + /** + * Build call for liquidationLoanRepay + * + * @param liquidationLoanRepayRequest (required) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Liquidation Loan Repay -
+ * + * @see Liquidation + * Loan Repay (MARGIN) Documentation + */ + private okhttp3.Call liquidationLoanRepayCall( + LiquidationLoanRepayRequest liquidationLoanRepayRequest) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/margin/liquidation-loan/repay"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (liquidationLoanRepayRequest.getAsset() != null) { + localVarFormParams.put("asset", liquidationLoanRepayRequest.getAsset()); + } + + if (liquidationLoanRepayRequest.getAmount() != null) { + localVarFormParams.put( + "amount", + DecimalFormatter.getFormatter() + .format(liquidationLoanRepayRequest.getAmount())); + } + + if (liquidationLoanRepayRequest.getRecvWindow() != null) { + localVarFormParams.put("recvWindow", liquidationLoanRepayRequest.getRecvWindow()); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call liquidationLoanRepayValidateBeforeCall( + LiquidationLoanRepayRequest liquidationLoanRepayRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {liquidationLoanRepayRequest}; + Method method = + this.getClass() + .getMethod("liquidationLoanRepay", LiquidationLoanRepayRequest.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return liquidationLoanRepayCall(liquidationLoanRepayRequest); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Liquidation Loan Repay (MARGIN) Repays the outstanding cross-margin liquidation loan from the + * user's spot wallet. A liquidation loan represents the account deficit incurred when + * account equity turns negative during liquidation (bankruptcy). The repayment amount must be + * greater than 0 and cannot exceed the remaining loan balance. If the Spot Account has + * insufficient USDC balance, the repayment will fail. Weight(UID): 100 Security Type: MARGIN + * + * @param liquidationLoanRepayRequest (required) + * @return ApiResponse<LiquidationLoanRepayResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Liquidation Loan Repay -
+ * + * @see Liquidation + * Loan Repay (MARGIN) Documentation + */ + public ApiResponse liquidationLoanRepay( + @Valid @NotNull LiquidationLoanRepayRequest liquidationLoanRepayRequest) + throws ApiException { + okhttp3.Call localVarCall = + liquidationLoanRepayValidateBeforeCall(liquidationLoanRepayRequest); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + /** * Build call for marginAccountCancelAllOpenOrdersOnASymbol * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param recvWindow No more than 60000 (optional) + * @param isIsolated (optional, default to FALSE) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1103,11 +1436,11 @@ public ApiResponse getSmallLiabilityEx * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-all-open-orders-on-asymbol">Margin * Account Cancel all Open Orders on a Symbol (TRADE) Documentation */ private okhttp3.Call marginAccountCancelAllOpenOrdersOnASymbolCall( - String symbol, String isIsolated, Long recvWindow) throws ApiException { + String symbol, IsIsolated isIsolated, Long recvWindow) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] {}; @@ -1176,7 +1509,7 @@ private okhttp3.Call marginAccountCancelAllOpenOrdersOnASymbolCall( @SuppressWarnings("rawtypes") private okhttp3.Call marginAccountCancelAllOpenOrdersOnASymbolValidateBeforeCall( - String symbol, String isIsolated, Long recvWindow) throws ApiException { + String symbol, IsIsolated isIsolated, Long recvWindow) throws ApiException { try { Validator validator = Validation.byDefaultProvider() @@ -1192,7 +1525,7 @@ private okhttp3.Call marginAccountCancelAllOpenOrdersOnASymbolValidateBeforeCall .getMethod( "marginAccountCancelAllOpenOrdersOnASymbol", String.class, - String.class, + IsIsolated.class, Long.class); Set> violations = executableValidator.validateParameters(this, method, parameterValues); @@ -1214,12 +1547,12 @@ private okhttp3.Call marginAccountCancelAllOpenOrdersOnASymbolValidateBeforeCall /** * Margin Account Cancel all Open Orders on a Symbol (TRADE) Cancels all active orders on a - * symbol for margin account.<br></br> This includes OCO orders. Weight: 1 + * symbol for margin account.<br></br> This includes OCO orders. Weight(IP): 1 + * Security Type: TRADE * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param recvWindow No more than 60000 (optional) + * @param isIsolated (optional, default to FALSE) + * @param recvWindow (optional) * @return ApiResponse<MarginAccountCancelAllOpenOrdersOnASymbolResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1231,12 +1564,12 @@ private okhttp3.Call marginAccountCancelAllOpenOrdersOnASymbolValidateBeforeCall * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-all-open-orders-on-asymbol">Margin * Account Cancel all Open Orders on a Symbol (TRADE) Documentation */ public ApiResponse marginAccountCancelAllOpenOrdersOnASymbol( - @NotNull String symbol, String isIsolated, Long recvWindow) + @NotNull String symbol, IsIsolated isIsolated, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = marginAccountCancelAllOpenOrdersOnASymbolValidateBeforeCall( @@ -1250,15 +1583,11 @@ private okhttp3.Call marginAccountCancelAllOpenOrdersOnASymbolValidateBeforeCall * Build call for marginAccountCancelOco * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param orderListId Either `orderListId` or `listClientOrderId` must be - * provided (optional) - * @param listClientOrderId Either `orderListId` or `listClientOrderId` must - * be provided (optional) - * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by - * default (optional) - * @param recvWindow No more than 60000 (optional) + * @param isIsolated (optional, default to FALSE) + * @param orderListId (optional) + * @param listClientOrderId (optional) + * @param newClientOrderId (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1269,12 +1598,12 @@ private okhttp3.Call marginAccountCancelAllOpenOrdersOnASymbolValidateBeforeCall * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-oco">Margin * Account Cancel OCO (TRADE) Documentation */ private okhttp3.Call marginAccountCancelOcoCall( String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderListId, String listClientOrderId, String newClientOrderId, @@ -1364,7 +1693,7 @@ private okhttp3.Call marginAccountCancelOcoCall( @SuppressWarnings("rawtypes") private okhttp3.Call marginAccountCancelOcoValidateBeforeCall( String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderListId, String listClientOrderId, String newClientOrderId, @@ -1387,7 +1716,7 @@ private okhttp3.Call marginAccountCancelOcoValidateBeforeCall( .getMethod( "marginAccountCancelOco", String.class, - String.class, + IsIsolated.class, Long.class, String.class, String.class, @@ -1416,19 +1745,16 @@ private okhttp3.Call marginAccountCancelOcoValidateBeforeCall( } /** - * Margin Account Cancel OCO (TRADE) Cancel an entire Order List for a margin account. * - * Canceling an individual leg will cancel the entire OCO Weight: 1(UID) + * Margin Account Cancel OCO (TRADE) Cancel an entire Order List for a margin account. + * Weight(UID): 1 Security Type: TRADE Notes: - Canceling an individual leg will cancel the + * entire OCO * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param orderListId Either `orderListId` or `listClientOrderId` must be - * provided (optional) - * @param listClientOrderId Either `orderListId` or `listClientOrderId` must - * be provided (optional) - * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by - * default (optional) - * @param recvWindow No more than 60000 (optional) + * @param isIsolated (optional, default to FALSE) + * @param orderListId (optional) + * @param listClientOrderId (optional) + * @param newClientOrderId (optional) + * @param recvWindow (optional) * @return ApiResponse<MarginAccountCancelOcoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1440,16 +1766,16 @@ private okhttp3.Call marginAccountCancelOcoValidateBeforeCall( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-oco">Margin * Account Cancel OCO (TRADE) Documentation */ public ApiResponse marginAccountCancelOco( @NotNull String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderListId, String listClientOrderId, String newClientOrderId, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = marginAccountCancelOcoValidateBeforeCall( @@ -1468,13 +1794,11 @@ public ApiResponse marginAccountCancelOco( * Build call for marginAccountCancelOrder * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) + * @param isIsolated (optional, default to FALSE) * @param orderId (optional) * @param origClientOrderId (optional) - * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by - * default (optional) - * @param recvWindow No more than 60000 (optional) + * @param newClientOrderId (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1485,12 +1809,12 @@ public ApiResponse marginAccountCancelOco( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-order">Margin * Account Cancel Order (TRADE) Documentation */ private okhttp3.Call marginAccountCancelOrderCall( String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderId, String origClientOrderId, String newClientOrderId, @@ -1579,7 +1903,7 @@ private okhttp3.Call marginAccountCancelOrderCall( @SuppressWarnings("rawtypes") private okhttp3.Call marginAccountCancelOrderValidateBeforeCall( String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderId, String origClientOrderId, String newClientOrderId, @@ -1602,7 +1926,7 @@ private okhttp3.Call marginAccountCancelOrderValidateBeforeCall( .getMethod( "marginAccountCancelOrder", String.class, - String.class, + IsIsolated.class, Long.class, String.class, String.class, @@ -1631,17 +1955,15 @@ private okhttp3.Call marginAccountCancelOrderValidateBeforeCall( } /** - * Margin Account Cancel Order (TRADE) Cancel an active order for margin account. * Either - * orderId or origClientOrderId must be sent. Weight: 10(IP) + * Margin Account Cancel Order (TRADE) Cancel an active order for margin account. Weight(IP): 10 + * Security Type: TRADE Notes: - Either orderId or origClientOrderId must be sent. * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) + * @param isIsolated (optional, default to FALSE) * @param orderId (optional) * @param origClientOrderId (optional) - * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by - * default (optional) - * @param recvWindow No more than 60000 (optional) + * @param newClientOrderId (optional) + * @param recvWindow (optional) * @return ApiResponse<MarginAccountCancelOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1653,16 +1975,16 @@ private okhttp3.Call marginAccountCancelOrderValidateBeforeCall( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-order">Margin * Account Cancel Order (TRADE) Documentation */ public ApiResponse marginAccountCancelOrder( @NotNull String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderId, String origClientOrderId, String newClientOrderId, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = marginAccountCancelOrderValidateBeforeCall( @@ -1691,7 +2013,7 @@ public ApiResponse marginAccountCancelOrder( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco">Margin * Account New OCO (TRADE) Documentation */ private okhttp3.Call marginAccountNewOcoCall( @@ -1882,9 +2204,10 @@ private okhttp3.Call marginAccountNewOcoValidateBeforeCall( } /** - * Margin Account New OCO (TRADE) Send in a new OCO for a margin account * autoRepayAtCancel is - * suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel - * order execution Weight: 6(UID) + * Margin Account New OCO (TRADE) Send in a new OCO for a margin account Weight: 6(UID) or + * 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: TRADE Notes: + * - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high + * frequent new order/cancel order execution * * @param marginAccountNewOcoRequest (required) * @return ApiResponse<MarginAccountNewOcoResponse> @@ -1898,7 +2221,7 @@ private okhttp3.Call marginAccountNewOcoValidateBeforeCall( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco">Margin * Account New OCO (TRADE) Documentation */ public ApiResponse marginAccountNewOco( @@ -1925,7 +2248,7 @@ public ApiResponse marginAccountNewOco( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-order">Margin * Account New Order (TRADE) Documentation */ private okhttp3.Call marginAccountNewOrderCall( @@ -2030,6 +2353,11 @@ private okhttp3.Call marginAccountNewOrderCall( marginAccountNewOrderRequest.getSelfTradePreventionMode()); } + if (marginAccountNewOrderRequest.getTrailingDelta() != null) { + localVarFormParams.put( + "trailingDelta", marginAccountNewOrderRequest.getTrailingDelta()); + } + if (marginAccountNewOrderRequest.getAutoRepayAtCancel() != null) { localVarFormParams.put( "autoRepayAtCancel", marginAccountNewOrderRequest.getAutoRepayAtCancel()); @@ -2103,9 +2431,10 @@ private okhttp3.Call marginAccountNewOrderValidateBeforeCall( } /** - * Margin Account New Order (TRADE) Post a new order for margin account. * autoRepayAtCancel is - * suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel - * order execution Weight: 6(UID) + * Margin Account New Order (TRADE) Post a new order for margin account. Weight: 6(UID) or + * 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: TRADE Notes: + * - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high + * frequent new order/cancel order execution * * @param marginAccountNewOrderRequest (required) * @return ApiResponse<MarginAccountNewOrderResponse> @@ -2119,7 +2448,7 @@ private okhttp3.Call marginAccountNewOrderValidateBeforeCall( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-order">Margin * Account New Order (TRADE) Documentation */ public ApiResponse marginAccountNewOrder( @@ -2146,7 +2475,7 @@ public ApiResponse marginAccountNewOrder( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oto">Margin * Account New OTO (TRADE) Documentation */ private okhttp3.Call marginAccountNewOtoCall( @@ -2377,10 +2706,23 @@ private okhttp3.Call marginAccountNewOtoValidateBeforeCall( * placement response will show the working order as `FILLED` but the pending order * will still appear as `PENDING_NEW`. You need to query the status of the pending * order again to see its updated status. - OTOs add **2 orders** to the unfilled order count, - * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. * - * autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high - * frequent new order/cancel order execution * Depending on the `pendingType` or - * `workingType`, some optional parameters will become mandatory: Weight: 6(UID) + * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight: + * 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: + * TRADE Notes: - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid + * under high frequent new order/cancel order execution - Depending on the + * `pendingType` or `workingType`, some optional - parameters will become + * mandatory: | Type | Additional mandatory parameters | Additional information | | + * -------------------------------------------------------- | + * ------------------------------------------------------------ | ---------------------- | | + * `workingType` = `LIMIT` | `workingTimeInForce` | | | + * `pendingType` = `LIMIT` | `pendingPrice`, + * `pendingTimeInForce` | | | `pendingType` = `STOP_LOSS` or + * `TAKE_PROFIT` | `pendingStopPrice` and/or + * `pendingTrailingDelta` | | | `pendingType` = + * `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT` | `pendingPrice`, + * `pendingStopPrice` and/or `pendingTrailingDelta`, + * `pendingTimeInForce` | | | `pendingTrailingDelta` is provided | + * `pendingPrice` | | * * @param marginAccountNewOtoRequest (required) * @return ApiResponse<MarginAccountNewOtoResponse> @@ -2394,7 +2736,7 @@ private okhttp3.Call marginAccountNewOtoValidateBeforeCall( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oto">Margin * Account New OTO (TRADE) Documentation */ public ApiResponse marginAccountNewOto( @@ -2421,7 +2763,7 @@ public ApiResponse marginAccountNewOto( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-otoco">Margin * Account New OTOCO (TRADE) Documentation */ private okhttp3.Call marginAccountNewOtocoCall( @@ -2696,12 +3038,31 @@ private okhttp3.Call marginAccountNewOtocoValidateBeforeCall( * above and pending below), forming an OCO pair. The pending orders are only placed on the * order book when the working order gets **fully filled**. - The rules of the pending above and * pending below follow the same rules as the [Order List - * OCO](https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OCO). - - * OTOCOs add **3 orders** against the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` - * filter, and `MAX_NUM_ORDERS` filter. * autoRepayAtCancel is suggested to set as - * “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution * - * Depending on the `pendingAboveType`/`pendingBelowType` or - * `workingType`, some optional parameters will become mandatory: Weight: 6(UID) + * OCO](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco). + * - OTOCOs add **3 orders** against the unfilled order count, + * `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter. Weight: + * 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: + * TRADE Notes: - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid + * under high frequent new order/cancel order execution - Depending on the + * `pendingAboveType`/`pendingBelowType` or `workingType`, some + * optional parameters will become mandatory: | Type | Additional mandatory parameters | + * Additional information | | ------------------------------------ | + * ------------------------------------------------------------ | ---------------------- | | + * `workingType` = `LIMIT` | `workingTimeInForce` | | | + * `pendingAboveType`= `LIMIT_MAKER` | `pendingAbovePrice` | + * | | `pendingAboveType`= `STOP_LOSS` | + * `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta` | | | + * `pendingAboveType`=`STOP_LOSS_LIMIT` | + * `pendingAbovePrice`, `pendingAboveStopPrice` and/or + * `pendingAboveTrailingDelta`, `pendingAboveTimeInForce` | | | + * `pendingBelowType`= `LIMIT_MAKER` | `pendingBelowPrice` | + * | | `pendingBelowType`= `STOP_LOSS` | + * `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta` | | | + * `pendingBelowType`=`STOP_LOSS_LIMIT` | + * `pendingBelowPrice`, `pendingBelowStopPrice` and/or + * `pendingBelowTrailingDelta`, `pendingBelowTimeInForce` | | | + * `pendingAboveTrailingDelta` is provided | `pendingAbovePrice` | | | + * `pendingBelowTrailingDelta` is provided | `pendingBelowPrice` | | * * @param marginAccountNewOtocoRequest (required) * @return ApiResponse<MarginAccountNewOtocoResponse> @@ -2715,7 +3076,7 @@ private okhttp3.Call marginAccountNewOtocoValidateBeforeCall( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-otoco">Margin * Account New OTOCO (TRADE) Documentation */ public ApiResponse marginAccountNewOtoco( @@ -2742,8 +3103,8 @@ public ApiResponse marginAccountNewOtoco( * * * @see Margin - * Manual Liquidation(MARGIN) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-manual-liquidation">Margin + * Manual Liquidation (TRADE) Documentation */ private okhttp3.Call marginManualLiquidationCall( MarginManualLiquidationRequest marginManualLiquidationRequest) throws ApiException { @@ -2849,9 +3210,9 @@ private okhttp3.Call marginManualLiquidationValidateBeforeCall( } /** - * Margin Manual Liquidation(MARGIN) Margin Manual Liquidation * This endpoint can support Cross - * Margin Classic Mode and Pro Mode. * And only support Isolated Margin for restricted region. - * Weight: 3000 + * Margin Manual Liquidation (TRADE) Margin Manual Liquidation Weight(UID): 3000 Security Type: + * TRADE Notes: - This endpoint supports Cross Margin Classic Mode and Pro Mode. - Isolated + * Margin is only supported in restricted regions. * * @param marginManualLiquidationRequest (required) * @return ApiResponse<MarginManualLiquidationResponse> @@ -2865,8 +3226,8 @@ private okhttp3.Call marginManualLiquidationValidateBeforeCall( * * * @see Margin - * Manual Liquidation(MARGIN) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-manual-liquidation">Margin + * Manual Liquidation (TRADE) Documentation */ public ApiResponse marginManualLiquidation( @Valid @NotNull MarginManualLiquidationRequest marginManualLiquidationRequest) @@ -2881,10 +3242,9 @@ public ApiResponse marginManualLiquidation( /** * Build call for queryCurrentMarginOrderCountUsage * - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param isIsolated (optional, default to FALSE) + * @param symbol (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2895,11 +3255,11 @@ public ApiResponse marginManualLiquidation( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-current-margin-order-count-usage">Query * Current Margin Order Count Usage (TRADE) Documentation */ private okhttp3.Call queryCurrentMarginOrderCountUsageCall( - String isIsolated, String symbol, Long recvWindow) throws ApiException { + IsIsolated isIsolated, String symbol, Long recvWindow) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] {}; @@ -2968,7 +3328,7 @@ private okhttp3.Call queryCurrentMarginOrderCountUsageCall( @SuppressWarnings("rawtypes") private okhttp3.Call queryCurrentMarginOrderCountUsageValidateBeforeCall( - String isIsolated, String symbol, Long recvWindow) throws ApiException { + IsIsolated isIsolated, String symbol, Long recvWindow) throws ApiException { try { Validator validator = Validation.byDefaultProvider() @@ -2983,7 +3343,7 @@ private okhttp3.Call queryCurrentMarginOrderCountUsageValidateBeforeCall( this.getClass() .getMethod( "queryCurrentMarginOrderCountUsage", - String.class, + IsIsolated.class, String.class, Long.class); Set> violations = @@ -3005,12 +3365,11 @@ private okhttp3.Call queryCurrentMarginOrderCountUsageValidateBeforeCall( /** * Query Current Margin Order Count Usage (TRADE) Displays the user's current margin order - * count usage for all intervals. Weight: 20(IP) + * count usage for all intervals. Weight(IP): 20 Security Type: TRADE * - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param isIsolated (optional, default to FALSE) + * @param symbol (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryCurrentMarginOrderCountUsageResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3022,11 +3381,12 @@ private okhttp3.Call queryCurrentMarginOrderCountUsageValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-current-margin-order-count-usage">Query * Current Margin Order Count Usage (TRADE) Documentation */ public ApiResponse queryCurrentMarginOrderCountUsage( - String isIsolated, String symbol, Long recvWindow) throws ApiException { + IsIsolated isIsolated, String symbol, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = queryCurrentMarginOrderCountUsageValidateBeforeCall(isIsolated, symbol, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -3035,34 +3395,348 @@ public ApiResponse queryCurrentMargin } /** - * Build call for queryMarginAccountsAllOco + * Build call for queryLiquidationLoan * - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param symbol isolated margin pair (optional) - * @param fromId If `fromId` is set, data with `id` greater than - * `fromId` will be returned. Otherwise, the latest data will be returned. - * (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) - * @param endTime (optional) - * @param limit Limit on the number of data records returned per request. Default: 500; Maximum: - * 1000. (optional) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details * * * - * + * *
Response Details
Status Code Description Response Headers
200 Margin Account's all OCO -
200 Query Liquidation Loan -
* * @see Query - * Margin Account's all OCO (USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-liquidation-loan">Query + * Liquidation Loan (USER_DATA) Documentation */ - private okhttp3.Call queryMarginAccountsAllOcoCall( - String isIsolated, + private okhttp3.Call queryLiquidationLoanCall(Long recvWindow) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/margin/liquidation-loan"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call queryLiquidationLoanValidateBeforeCall(Long recvWindow) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {recvWindow}; + Method method = this.getClass().getMethod("queryLiquidationLoan", Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return queryLiquidationLoanCall(recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Query Liquidation Loan (USER_DATA) Query the current user's cross-margin liquidation loan + * information, including the original loan amount, repaid amount, and remaining amount. When a + * cross-margin account is liquidated and the account equity turns negative (bankruptcy), the + * system generates a liquidation loan record representing the deficit. This represents the + * shortfall amount denominated in USDC. Weight(UID): 100 Security Type: USER_DATA + * + * @param recvWindow (optional) + * @return ApiResponse<QueryLiquidationLoanResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Query Liquidation Loan -
+ * + * @see Query + * Liquidation Loan (USER_DATA) Documentation + */ + public ApiResponse queryLiquidationLoan( + @Max(60000L) Long recvWindow) throws ApiException { + okhttp3.Call localVarCall = queryLiquidationLoanValidateBeforeCall(recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for queryLiquidationLoanRepayHistory + * + * @param startTime Start time in Unix timestamp (milliseconds). Defaults to 7 days ago if not + * specified (optional) + * @param endTime End time in Unix timestamp (milliseconds). Defaults to now if not specified + * (optional) + * @param current Current page number, default `1` (optional) + * @param size Page size, default `50` (optional) + * @param recvWindow (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Query Liquidation Loan Repay History -
+ * + * @see Query + * Liquidation Loan Repay History (USER_DATA) Documentation + */ + private okhttp3.Call queryLiquidationLoanRepayHistoryCall( + Long startTime, Long endTime, Long current, Long size, Long recvWindow) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/margin/liquidation-loan/repay-history"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (startTime != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("startTime", startTime)); + } + + if (endTime != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endTime", endTime)); + } + + if (current != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("current", current)); + } + + if (size != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call queryLiquidationLoanRepayHistoryValidateBeforeCall( + Long startTime, Long endTime, Long current, Long size, Long recvWindow) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {startTime, endTime, current, size, recvWindow}; + Method method = + this.getClass() + .getMethod( + "queryLiquidationLoanRepayHistory", + Long.class, + Long.class, + Long.class, + Long.class, + Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return queryLiquidationLoanRepayHistoryCall( + startTime, endTime, current, size, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Query Liquidation Loan Repay History (USER_DATA) Query the repayment history of cross-margin + * liquidation loans (deficit caused by bankruptcy during liquidation). Supports time-range + * filtering and pagination. Weight(UID): 100 Security Type: USER_DATA Notes: - The maximum + * query range is 90 days. If `startTime` is earlier than 90 days ago, it will be + * clamped to 90 days ago. - Only records with status `SUCCESS` or `PENDING` + * are returned. Failed repayment records are excluded. + * + * @param startTime Start time in Unix timestamp (milliseconds). Defaults to 7 days ago if not + * specified (optional) + * @param endTime End time in Unix timestamp (milliseconds). Defaults to now if not specified + * (optional) + * @param current Current page number, default `1` (optional) + * @param size Page size, default `50` (optional) + * @param recvWindow (optional) + * @return ApiResponse<QueryLiquidationLoanRepayHistoryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Query Liquidation Loan Repay History -
+ * + * @see Query + * Liquidation Loan Repay History (USER_DATA) Documentation + */ + public ApiResponse queryLiquidationLoanRepayHistory( + Long startTime, Long endTime, Long current, Long size, @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = + queryLiquidationLoanRepayHistoryValidateBeforeCall( + startTime, endTime, current, size, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for queryMarginAccountsAllOco + * + * @param isIsolated (optional, default to FALSE) + * @param symbol (optional) + * @param fromId (optional) + * @param startTime (optional) + * @param endTime (optional) + * @param limit (optional) + * @param recvWindow (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Margin Account's all OCO -
+ * + * @see Query + * Margin Account's all OCO (USER_DATA) Documentation + */ + private okhttp3.Call queryMarginAccountsAllOcoCall( + IsIsolated isIsolated, String symbol, Long fromId, Long startTime, @@ -3154,7 +3828,7 @@ private okhttp3.Call queryMarginAccountsAllOcoCall( @SuppressWarnings("rawtypes") private okhttp3.Call queryMarginAccountsAllOcoValidateBeforeCall( - String isIsolated, + IsIsolated isIsolated, String symbol, Long fromId, Long startTime, @@ -3178,7 +3852,7 @@ private okhttp3.Call queryMarginAccountsAllOcoValidateBeforeCall( this.getClass() .getMethod( "queryMarginAccountsAllOco", - String.class, + IsIsolated.class, String.class, Long.class, Long.class, @@ -3205,19 +3879,15 @@ private okhttp3.Call queryMarginAccountsAllOcoValidateBeforeCall( /** * Query Margin Account's all OCO (USER_DATA) Retrieves all OCO for a specific margin - * account based on provided optional parameters Weight: 200(IP) + * account based on provided optional parameters Weight(IP): 200 Security Type: USER_DATA * - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param symbol isolated margin pair (optional) - * @param fromId If `fromId` is set, data with `id` greater than - * `fromId` will be returned. Otherwise, the latest data will be returned. - * (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param isIsolated (optional, default to FALSE) + * @param symbol (optional) + * @param fromId (optional) + * @param startTime (optional) * @param endTime (optional) - * @param limit Limit on the number of data records returned per request. Default: 500; Maximum: - * 1000. (optional) - * @param recvWindow No more than 60000 (optional) + * @param limit (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMarginAccountsAllOcoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3229,17 +3899,17 @@ private okhttp3.Call queryMarginAccountsAllOcoValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-all-oco">Query * Margin Account's all OCO (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsAllOco( - String isIsolated, + IsIsolated isIsolated, String symbol, Long fromId, Long startTime, Long endTime, - Long limit, - Long recvWindow) + @Max(1000L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryMarginAccountsAllOcoValidateBeforeCall( @@ -3253,14 +3923,12 @@ public ApiResponse queryMarginAccountsAllOco( * Build call for queryMarginAccountsAllOrders * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) + * @param isIsolated (optional, default to FALSE) * @param orderId (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param startTime (optional) * @param endTime (optional) - * @param limit Limit on the number of data records returned per request. Default: 500; Maximum: - * 1000. (optional) - * @param recvWindow No more than 60000 (optional) + * @param limit (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -3271,12 +3939,12 @@ public ApiResponse queryMarginAccountsAllOco( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-all-orders">Query * Margin Account's All Orders (USER_DATA) Documentation */ private okhttp3.Call queryMarginAccountsAllOrdersCall( String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderId, Long startTime, Long endTime, @@ -3368,7 +4036,7 @@ private okhttp3.Call queryMarginAccountsAllOrdersCall( @SuppressWarnings("rawtypes") private okhttp3.Call queryMarginAccountsAllOrdersValidateBeforeCall( String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderId, Long startTime, Long endTime, @@ -3392,7 +4060,7 @@ private okhttp3.Call queryMarginAccountsAllOrdersValidateBeforeCall( .getMethod( "queryMarginAccountsAllOrders", String.class, - String.class, + IsIsolated.class, Long.class, Long.class, Long.class, @@ -3417,21 +4085,19 @@ private okhttp3.Call queryMarginAccountsAllOrdersValidateBeforeCall( } /** - * Query Margin Account's All Orders (USER_DATA) Query Margin Account's All Orders * If - * orderId is set, it will get orders >= that orderId. Otherwise the orders within 24 - * hours are returned. * For some historical orders cummulativeQuoteQty will be < 0, meaning - * the data is not available at this time. * Less than 24 hours between startTime and endTime. - * Weight: 200(IP) + * Query Margin Account's All Orders (USER_DATA) Query Margin Account's All Orders + * Weight(IP): 200 Security Type: USER_DATA Notes: - If orderId is set, it will get orders + * >= that orderId. Otherwise the orders within 24 hours are returned. - For some + * historical orders cummulativeQuoteQty will be < 0, meaning the data is not available at + * this time. - Less than 24 hours between startTime and endTime. * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) + * @param isIsolated (optional, default to FALSE) * @param orderId (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param startTime (optional) * @param endTime (optional) - * @param limit Limit on the number of data records returned per request. Default: 500; Maximum: - * 1000. (optional) - * @param recvWindow No more than 60000 (optional) + * @param limit (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMarginAccountsAllOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3443,17 +4109,17 @@ private okhttp3.Call queryMarginAccountsAllOrdersValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-all-orders">Query * Margin Account's All Orders (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsAllOrders( @NotNull String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderId, Long startTime, Long endTime, - Long limit, - Long recvWindow) + @Max(500L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryMarginAccountsAllOrdersValidateBeforeCall( @@ -3466,13 +4132,11 @@ public ApiResponse queryMarginAccountsAllO /** * Build call for queryMarginAccountsOco * - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param symbol isolated margin pair (optional) - * @param orderListId Either `orderListId` or `listClientOrderId` must be - * provided (optional) + * @param isIsolated (optional, default to FALSE) + * @param symbol (optional) + * @param orderListId (optional) * @param origClientOrderId (optional) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -3483,11 +4147,11 @@ public ApiResponse queryMarginAccountsAllO * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-oco">Query * Margin Account's OCO (USER_DATA) Documentation */ private okhttp3.Call queryMarginAccountsOcoCall( - String isIsolated, + IsIsolated isIsolated, String symbol, Long orderListId, String origClientOrderId, @@ -3571,7 +4235,7 @@ private okhttp3.Call queryMarginAccountsOcoCall( @SuppressWarnings("rawtypes") private okhttp3.Call queryMarginAccountsOcoValidateBeforeCall( - String isIsolated, + IsIsolated isIsolated, String symbol, Long orderListId, String origClientOrderId, @@ -3593,7 +4257,7 @@ private okhttp3.Call queryMarginAccountsOcoValidateBeforeCall( this.getClass() .getMethod( "queryMarginAccountsOco", - String.class, + IsIsolated.class, String.class, Long.class, String.class, @@ -3618,15 +4282,13 @@ private okhttp3.Call queryMarginAccountsOcoValidateBeforeCall( /** * Query Margin Account's OCO (USER_DATA) Retrieves a specific OCO based on provided - * optional parameters Weight: 10(IP) + * optional parameters Weight(IP): 10 Security Type: USER_DATA * - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param symbol isolated margin pair (optional) - * @param orderListId Either `orderListId` or `listClientOrderId` must be - * provided (optional) + * @param isIsolated (optional, default to FALSE) + * @param symbol (optional) + * @param orderListId (optional) * @param origClientOrderId (optional) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMarginAccountsOcoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3638,15 +4300,15 @@ private okhttp3.Call queryMarginAccountsOcoValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-oco">Query * Margin Account's OCO (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsOco( - String isIsolated, + IsIsolated isIsolated, String symbol, Long orderListId, String origClientOrderId, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryMarginAccountsOcoValidateBeforeCall( @@ -3659,10 +4321,9 @@ public ApiResponse queryMarginAccountsOco( /** * Build call for queryMarginAccountsOpenOco * - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param isIsolated (optional, default to FALSE) + * @param symbol (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -3673,11 +4334,11 @@ public ApiResponse queryMarginAccountsOco( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-open-oco">Query * Margin Account's Open OCO (USER_DATA) Documentation */ private okhttp3.Call queryMarginAccountsOpenOcoCall( - String isIsolated, String symbol, Long recvWindow) throws ApiException { + IsIsolated isIsolated, String symbol, Long recvWindow) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] {}; @@ -3746,7 +4407,7 @@ private okhttp3.Call queryMarginAccountsOpenOcoCall( @SuppressWarnings("rawtypes") private okhttp3.Call queryMarginAccountsOpenOcoValidateBeforeCall( - String isIsolated, String symbol, Long recvWindow) throws ApiException { + IsIsolated isIsolated, String symbol, Long recvWindow) throws ApiException { try { Validator validator = Validation.byDefaultProvider() @@ -3761,7 +4422,7 @@ private okhttp3.Call queryMarginAccountsOpenOcoValidateBeforeCall( this.getClass() .getMethod( "queryMarginAccountsOpenOco", - String.class, + IsIsolated.class, String.class, Long.class); Set> violations = @@ -3782,13 +4443,12 @@ private okhttp3.Call queryMarginAccountsOpenOcoValidateBeforeCall( } /** - * Query Margin Account's Open OCO (USER_DATA) Query Margin Account's Open OCO Weight: - * 10(IP) + * Query Margin Account's Open OCO (USER_DATA) Query Margin Account's Open OCO + * Weight(IP): 10 Security Type: USER_DATA * - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param isIsolated (optional, default to FALSE) + * @param symbol (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMarginAccountsOpenOcoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3800,11 +4460,12 @@ private okhttp3.Call queryMarginAccountsOpenOcoValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-open-oco">Query * Margin Account's Open OCO (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsOpenOco( - String isIsolated, String symbol, Long recvWindow) throws ApiException { + IsIsolated isIsolated, String symbol, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = queryMarginAccountsOpenOcoValidateBeforeCall(isIsolated, symbol, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -3816,9 +4477,8 @@ public ApiResponse queryMarginAccountsOpenOc * Build call for queryMarginAccountsOpenOrders * * @param symbol isolated margin pair (optional) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param recvWindow No more than 60000 (optional) + * @param isIsolated (optional, default to FALSE) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -3829,11 +4489,11 @@ public ApiResponse queryMarginAccountsOpenOc * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-open-orders">Query * Margin Account's Open Orders (USER_DATA) Documentation */ private okhttp3.Call queryMarginAccountsOpenOrdersCall( - String symbol, String isIsolated, Long recvWindow) throws ApiException { + String symbol, IsIsolated isIsolated, Long recvWindow) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] {}; @@ -3902,7 +4562,7 @@ private okhttp3.Call queryMarginAccountsOpenOrdersCall( @SuppressWarnings("rawtypes") private okhttp3.Call queryMarginAccountsOpenOrdersValidateBeforeCall( - String symbol, String isIsolated, Long recvWindow) throws ApiException { + String symbol, IsIsolated isIsolated, Long recvWindow) throws ApiException { try { Validator validator = Validation.byDefaultProvider() @@ -3918,7 +4578,7 @@ private okhttp3.Call queryMarginAccountsOpenOrdersValidateBeforeCall( .getMethod( "queryMarginAccountsOpenOrders", String.class, - String.class, + IsIsolated.class, Long.class); Set> violations = executableValidator.validateParameters(this, method, parameterValues); @@ -3938,16 +4598,15 @@ private okhttp3.Call queryMarginAccountsOpenOrdersValidateBeforeCall( } /** - * Query Margin Account's Open Orders (USER_DATA) Query Margin Account's Open Orders * - * If the symbol is not sent, orders for all symbols will be returned in an array. * When all - * symbols are returned, the number of requests counted against the rate limiter is equal to the - * number of symbols currently trading on the exchange. * If isIsolated - * =\"TRUE\", symbol must be sent. Weight: 10(IP) + * Query Margin Account's Open Orders (USER_DATA) Query Margin Account's Open Orders + * Weight(IP): 10 Security Type: USER_DATA Notes: - If the symbol is not sent, orders for all + * symbols will be returned in an array. - When all symbols are returned, the number of requests + * counted against the rate limiter is equal to the number of symbols currently trading on the + * exchange. - If isIsolated =\"TRUE\", symbol must be sent. * * @param symbol isolated margin pair (optional) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) - * @param recvWindow No more than 60000 (optional) + * @param isIsolated (optional, default to FALSE) + * @param recvWindow (optional) * @return ApiResponse<QueryMarginAccountsOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -3959,11 +4618,12 @@ private okhttp3.Call queryMarginAccountsOpenOrdersValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-open-orders">Query * Margin Account's Open Orders (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsOpenOrders( - String symbol, String isIsolated, Long recvWindow) throws ApiException { + String symbol, IsIsolated isIsolated, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = queryMarginAccountsOpenOrdersValidateBeforeCall(symbol, isIsolated, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -3975,11 +4635,10 @@ public ApiResponse queryMarginAccountsOpe * Build call for queryMarginAccountsOrder * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) + * @param isIsolated (optional, default to FALSE) * @param orderId (optional) * @param origClientOrderId (optional) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -3990,12 +4649,12 @@ public ApiResponse queryMarginAccountsOpe * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-order">Query * Margin Account's Order (USER_DATA) Documentation */ private okhttp3.Call queryMarginAccountsOrderCall( String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderId, String origClientOrderId, Long recvWindow) @@ -4078,7 +4737,7 @@ private okhttp3.Call queryMarginAccountsOrderCall( @SuppressWarnings("rawtypes") private okhttp3.Call queryMarginAccountsOrderValidateBeforeCall( String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderId, String origClientOrderId, Long recvWindow) @@ -4098,7 +4757,7 @@ private okhttp3.Call queryMarginAccountsOrderValidateBeforeCall( .getMethod( "queryMarginAccountsOrder", String.class, - String.class, + IsIsolated.class, Long.class, String.class, Long.class); @@ -4121,16 +4780,16 @@ private okhttp3.Call queryMarginAccountsOrderValidateBeforeCall( } /** - * Query Margin Account's Order (USER_DATA) Query Margin Account's Order * Either - * orderId or origClientOrderId must be sent. * For some historical orders cummulativeQuoteQty - * will be < 0, meaning the data is not available at this time. Weight: 10(IP) + * Query Margin Account's Order (USER_DATA) Query Margin Account's Order Weight(IP): 10 + * Security Type: USER_DATA Notes: - Either orderId or origClientOrderId must be sent. - For + * some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available + * at this time. * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) + * @param isIsolated (optional, default to FALSE) * @param orderId (optional) * @param origClientOrderId (optional) - * @param recvWindow No more than 60000 (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMarginAccountsOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -4142,15 +4801,15 @@ private okhttp3.Call queryMarginAccountsOrderValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-order">Query * Margin Account's Order (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsOrder( @NotNull String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderId, String origClientOrderId, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryMarginAccountsOrderValidateBeforeCall( @@ -4164,17 +4823,13 @@ public ApiResponse queryMarginAccountsOrder( * Build call for queryMarginAccountsTradeList * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) + * @param isIsolated (optional, default to FALSE) * @param orderId (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param startTime (optional) * @param endTime (optional) - * @param fromId If `fromId` is set, data with `id` greater than - * `fromId` will be returned. Otherwise, the latest data will be returned. - * (optional) - * @param limit Limit on the number of data records returned per request. Default: 500; Maximum: - * 1000. (optional) - * @param recvWindow No more than 60000 (optional) + * @param fromId (optional) + * @param limit (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -4185,12 +4840,12 @@ public ApiResponse queryMarginAccountsOrder( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-trade-list">Query * Margin Account's Trade List (USER_DATA) Documentation */ private okhttp3.Call queryMarginAccountsTradeListCall( String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderId, Long startTime, Long endTime, @@ -4287,7 +4942,7 @@ private okhttp3.Call queryMarginAccountsTradeListCall( @SuppressWarnings("rawtypes") private okhttp3.Call queryMarginAccountsTradeListValidateBeforeCall( String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderId, Long startTime, Long endTime, @@ -4312,7 +4967,7 @@ private okhttp3.Call queryMarginAccountsTradeListValidateBeforeCall( .getMethod( "queryMarginAccountsTradeList", String.class, - String.class, + IsIsolated.class, Long.class, Long.class, Long.class, @@ -4338,22 +4993,19 @@ private okhttp3.Call queryMarginAccountsTradeListValidateBeforeCall( } /** - * Query Margin Account's Trade List (USER_DATA) Query Margin Account's Trade List * If - * fromId is set, it will get trades >= that fromId. Otherwise the trades within 24 - * hours are returned. * Less than 24 hours between startTime and endTime. Weight: 10(IP) + * Query Margin Account's Trade List (USER_DATA) Query Margin Account's Trade List + * Weight(IP): 10 Security Type: USER_DATA Notes: - If fromId is set, it will get trades + * >= that fromId. Otherwise the trades within 24 hours are returned. - Less than 24 + * hours between startTime and endTime. * * @param symbol (required) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) + * @param isIsolated (optional, default to FALSE) * @param orderId (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param startTime (optional) * @param endTime (optional) - * @param fromId If `fromId` is set, data with `id` greater than - * `fromId` will be returned. Otherwise, the latest data will be returned. - * (optional) - * @param limit Limit on the number of data records returned per request. Default: 500; Maximum: - * 1000. (optional) - * @param recvWindow No more than 60000 (optional) + * @param fromId (optional) + * @param limit (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMarginAccountsTradeListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -4365,18 +5017,18 @@ private okhttp3.Call queryMarginAccountsTradeListValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-trade-list">Query * Margin Account's Trade List (USER_DATA) Documentation */ public ApiResponse queryMarginAccountsTradeList( @NotNull String symbol, - String isIsolated, + IsIsolated isIsolated, Long orderId, Long startTime, Long endTime, Long fromId, - Long limit, - Long recvWindow) + @Max(1000L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryMarginAccountsTradeListValidateBeforeCall( @@ -4393,9 +5045,8 @@ public ApiResponse queryMarginAccountsTrad * @param preventedMatchId (optional) * @param orderId (optional) * @param fromPreventedMatchId (optional) - * @param recvWindow No more than 60000 (optional) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) + * @param isIsolated (optional, default to FALSE) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -4406,16 +5057,16 @@ public ApiResponse queryMarginAccountsTrad * * * @see Query - * Prevented Matches(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-prevented-matches">Query + * Prevented Matches (USER_DATA) Documentation */ private okhttp3.Call queryPreventedMatchesCall( String symbol, Long preventedMatchId, Long orderId, Long fromPreventedMatchId, - Long recvWindow, - String isIsolated) + IsIsolated isIsolated, + Long recvWindow) throws ApiException { String basePath = null; // Operation Servers @@ -4460,14 +5111,14 @@ private okhttp3.Call queryPreventedMatchesCall( "fromPreventedMatchId", fromPreventedMatchId)); } - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - if (isIsolated != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("isIsolated", isIsolated)); } + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + final String[] localVarAccepts = {"application/json"}; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -4504,8 +5155,8 @@ private okhttp3.Call queryPreventedMatchesValidateBeforeCall( Long preventedMatchId, Long orderId, Long fromPreventedMatchId, - Long recvWindow, - String isIsolated) + IsIsolated isIsolated, + Long recvWindow) throws ApiException { try { Validator validator = @@ -4517,7 +5168,7 @@ private okhttp3.Call queryPreventedMatchesValidateBeforeCall( ExecutableValidator executableValidator = validator.forExecutables(); Object[] parameterValues = { - symbol, preventedMatchId, orderId, fromPreventedMatchId, recvWindow, isIsolated + symbol, preventedMatchId, orderId, fromPreventedMatchId, isIsolated, recvWindow }; Method method = this.getClass() @@ -4527,8 +5178,8 @@ private okhttp3.Call queryPreventedMatchesValidateBeforeCall( Long.class, Long.class, Long.class, - Long.class, - String.class); + IsIsolated.class, + Long.class); Set> violations = executableValidator.validateParameters(this, method, parameterValues); @@ -4538,8 +5189,8 @@ private okhttp3.Call queryPreventedMatchesValidateBeforeCall( preventedMatchId, orderId, fromPreventedMatchId, - recvWindow, - isIsolated); + isIsolated, + recvWindow); } else { throw new ConstraintViolationException((Set) violations); } @@ -4553,15 +5204,22 @@ private okhttp3.Call queryPreventedMatchesValidateBeforeCall( } /** - * Query Prevented Matches(USER_DATA) Weight: 10(IP) + * Query Prevented Matches (USER_DATA) Displays the list of orders that were expired due to STP. + * (Self-Trade Prevention). Weight(IP): 10 Security Type: USER_DATA Notes: - Supported parameter + * combinations: - `symbol` + `preventedMatchId` - `symbol` + + * `orderId` - `symbol` + `orderId` + + * `fromPreventedMatchId` - If `orderId` is provided, all prevented matches + * for that order will be returned. - If `preventedMatchId` is provided, the specific + * prevented match will be returned. - A single request returns a maximum of 500 records. If + * there are more than 500 records, use `symbol` + `orderId` + + * `fromPreventedMatchId` combination for pagination. * * @param symbol (required) * @param preventedMatchId (optional) * @param orderId (optional) * @param fromPreventedMatchId (optional) - * @param recvWindow No more than 60000 (optional) - * @param isIsolated For isolated margin or not, \"TRUE\", \"FALSE\", - * default \"FALSE\" (optional) + * @param isIsolated (optional, default to FALSE) + * @param recvWindow (optional) * @return ApiResponse<QueryPreventedMatchesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -4573,16 +5231,16 @@ private okhttp3.Call queryPreventedMatchesValidateBeforeCall( * * * @see Query - * Prevented Matches(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-prevented-matches">Query + * Prevented Matches (USER_DATA) Documentation */ public ApiResponse queryPreventedMatches( @NotNull String symbol, Long preventedMatchId, Long orderId, Long fromPreventedMatchId, - Long recvWindow, - String isIsolated) + IsIsolated isIsolated, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryPreventedMatchesValidateBeforeCall( @@ -4590,8 +5248,8 @@ public ApiResponse queryPreventedMatches( preventedMatchId, orderId, fromPreventedMatchId, - recvWindow, - isIsolated); + isIsolated, + recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -4600,8 +5258,8 @@ public ApiResponse queryPreventedMatches( /** * Build call for querySpecialKey * - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param symbol (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -4612,8 +5270,8 @@ public ApiResponse queryPreventedMatches( * * * @see Query - * Special key(Low Latency Trading)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-special-key">Query + * Special key(Low Latency Trading) (TRADE) Documentation */ private okhttp3.Call querySpecialKeyCall(String symbol, Long recvWindow) throws ApiException { String basePath = null; @@ -4710,11 +5368,11 @@ private okhttp3.Call querySpecialKeyValidateBeforeCall(String symbol, Long recvW } /** - * Query Special key(Low Latency Trading)(TRADE) Query Special Key Information. This only - * applies to Special Key for Low Latency Trading. Weight: 1(UID) + * Query Special key(Low Latency Trading) (TRADE) Query Special Key Information. This only + * applies to Special Key for Low Latency Trading. Weight(UID): 1 Security Type: TRADE * - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param symbol (optional) + * @param recvWindow (optional) * @return ApiResponse<QuerySpecialKeyResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -4726,11 +5384,11 @@ private okhttp3.Call querySpecialKeyValidateBeforeCall(String symbol, Long recvW * * * @see Query - * Special key(Low Latency Trading)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-special-key">Query + * Special key(Low Latency Trading) (TRADE) Documentation */ - public ApiResponse querySpecialKey(String symbol, Long recvWindow) - throws ApiException { + public ApiResponse querySpecialKey( + String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = querySpecialKeyValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -4740,8 +5398,8 @@ public ApiResponse querySpecialKey(String symbol, Long /** * Build call for querySpecialKeyList * - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param symbol (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -4752,8 +5410,8 @@ public ApiResponse querySpecialKey(String symbol, Long * * * @see Query - * Special key List(Low Latency Trading)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-special-key-list">Query + * Special key List(Low Latency Trading) (TRADE) Documentation */ private okhttp3.Call querySpecialKeyListCall(String symbol, Long recvWindow) throws ApiException { @@ -4852,11 +5510,11 @@ private okhttp3.Call querySpecialKeyListValidateBeforeCall(String symbol, Long r } /** - * Query Special key List(Low Latency Trading)(TRADE) This only applies to Special Key for Low - * Latency Trading. Weight: 1(UID) + * Query Special key List(Low Latency Trading) (TRADE) This only applies to Special Key for Low + * Latency Trading. Weight(UID): 1 Security Type: TRADE * - * @param symbol isolated margin pair (optional) - * @param recvWindow No more than 60000 (optional) + * @param symbol (optional) + * @param recvWindow (optional) * @return ApiResponse<QuerySpecialKeyListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -4868,11 +5526,11 @@ private okhttp3.Call querySpecialKeyListValidateBeforeCall(String symbol, Long r * * * @see Query - * Special key List(Low Latency Trading)(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-special-key-list">Query + * Special key List(Low Latency Trading) (TRADE) Documentation */ public ApiResponse querySpecialKeyList( - String symbol, Long recvWindow) throws ApiException { + String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = querySpecialKeyListValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -4893,7 +5551,7 @@ public ApiResponse querySpecialKeyList( * * * @see Small + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#small-liability-exchange">Small * Liability Exchange (MARGIN) Documentation */ private okhttp3.Call smallLiabilityExchangeCall( @@ -4923,8 +5581,7 @@ private okhttp3.Call smallLiabilityExchangeCall( Map localVarFormParams = new HashMap(); if (smallLiabilityExchangeRequest.getAssetNames() != null) { - String json = JSON.getGson().toJson(smallLiabilityExchangeRequest.getAssetNames()); - localVarFormParams.put("assetNames", json); + localVarFormParams.put("assetNames", smallLiabilityExchangeRequest.getAssetNames()); } if (smallLiabilityExchangeRequest.getRecvWindow() != null) { @@ -4996,9 +5653,9 @@ private okhttp3.Call smallLiabilityExchangeValidateBeforeCall( } /** - * Small Liability Exchange (MARGIN) Small Liability Exchange * Only convert once within 6 hours - * * Only liability valuation less than 10 USDT are supported * The maximum number of coin is 10 - * Weight: 3000(UID) + * Small Liability Exchange (MARGIN) Small Liability Exchange Weight(UID): 3000 Security Type: + * MARGIN Notes: - Only convert once within 6 hours - Only liability valuation less than 10 USDT + * are supported - The maximum number of coin is 10 * * @param smallLiabilityExchangeRequest (required) * @return ApiResponse<Void> @@ -5012,7 +5669,7 @@ private okhttp3.Call smallLiabilityExchangeValidateBeforeCall( * * * @see Small + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#small-liability-exchange">Small * Liability Exchange (MARGIN) Documentation */ public ApiResponse smallLiabilityExchange( diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/TransferApi.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/TransferApi.java index 9c87c627d..7b3ecd4e2 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/TransferApi.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/TransferApi.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -20,6 +20,7 @@ import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.exception.ConstraintViolationException; import com.binance.connector.client.margin_trading.rest.model.GetCrossMarginTransferHistoryResponse; +import com.binance.connector.client.margin_trading.rest.model.OrderType; import com.binance.connector.client.margin_trading.rest.model.QueryMaxTransferOutAmountResponse; import com.google.gson.reflect.TypeToken; import jakarta.validation.ConstraintViolation; @@ -43,7 +44,7 @@ public class TransferApi { private static final String USER_AGENT = String.format( - "binance-margin-trading/6.1.0 (Java/%s; %s; %s)", + "binance-margin-trading/7.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -84,13 +85,13 @@ public void setCustomBaseUrl(String customBaseUrl) { * Build call for getCrossMarginTransferHistory * * @param asset (optional) - * @param type Transfer Type: ROLL_IN, ROLL_OUT (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param type (optional) + * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param isolatedSymbol isolated symbol (optional) - * @param recvWindow No more than 60000 (optional) + * @param current (optional) + * @param size (optional) + * @param isolatedSymbol (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -101,12 +102,12 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/transfer#get-cross-margin-transfer-history">Get * Cross Margin Transfer History (USER_DATA) Documentation */ private okhttp3.Call getCrossMarginTransferHistoryCall( String asset, - String type, + OrderType type, Long startTime, Long endTime, Long current, @@ -204,7 +205,7 @@ private okhttp3.Call getCrossMarginTransferHistoryCall( @SuppressWarnings("rawtypes") private okhttp3.Call getCrossMarginTransferHistoryValidateBeforeCall( String asset, - String type, + OrderType type, Long startTime, Long endTime, Long current, @@ -229,7 +230,7 @@ private okhttp3.Call getCrossMarginTransferHistoryValidateBeforeCall( .getMethod( "getCrossMarginTransferHistory", String.class, - String.class, + OrderType.class, Long.class, Long.class, Long.class, @@ -255,18 +256,19 @@ private okhttp3.Call getCrossMarginTransferHistoryValidateBeforeCall( } /** - * Get Cross Margin Transfer History (USER_DATA) Get Cross Margin Transfer History * Response in - * descending order * The max interval between `startTime` and `endTime` is - * 30 days. * Returns data for last 7 days by default Weight: 1(IP) + * Get Cross Margin Transfer History (USER_DATA) Get Cross Margin Transfer History Weight(IP): 1 + * Security Type: USER_DATA Notes: - Response in descending order - The max interval between + * `startTime` and `endTime` is 30 days. - Returns data for last 7 days by + * default * * @param asset (optional) - * @param type Transfer Type: ROLL_IN, ROLL_OUT (optional) - * @param startTime Only supports querying data from the past 90 days. (optional) + * @param type (optional) + * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10 Max:100 (optional) - * @param isolatedSymbol isolated symbol (optional) - * @param recvWindow No more than 60000 (optional) + * @param current (optional) + * @param size (optional) + * @param isolatedSymbol (optional) + * @param recvWindow (optional) * @return ApiResponse<GetCrossMarginTransferHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -278,18 +280,18 @@ private okhttp3.Call getCrossMarginTransferHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/transfer#get-cross-margin-transfer-history">Get * Cross Margin Transfer History (USER_DATA) Documentation */ public ApiResponse getCrossMarginTransferHistory( String asset, - String type, + OrderType type, Long startTime, Long endTime, - Long current, - Long size, + @Min(1L) Long current, + @Max(100L) Long size, String isolatedSymbol, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getCrossMarginTransferHistoryValidateBeforeCall( @@ -303,8 +305,8 @@ public ApiResponse getCrossMarginTransfer * Build call for queryMaxTransferOutAmount * * @param asset (required) - * @param isolatedSymbol isolated symbol (optional) - * @param recvWindow No more than 60000 (optional) + * @param isolatedSymbol (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -315,7 +317,7 @@ public ApiResponse getCrossMarginTransfer * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/transfer#query-max-transfer-out-amount">Query * Max Transfer-Out Amount (USER_DATA) Documentation */ private okhttp3.Call queryMaxTransferOutAmountCall( @@ -425,12 +427,13 @@ private okhttp3.Call queryMaxTransferOutAmountValidateBeforeCall( } /** - * Query Max Transfer-Out Amount (USER_DATA) Query Max Transfer-Out Amount * If isolatedSymbol - * is not sent, crossed margin data will be sent. Weight: 50(IP) + * Query Max Transfer-Out Amount (USER_DATA) Query Max Transfer-Out Amount Weight(IP): 50 + * Security Type: USER_DATA Notes: - If isolatedSymbol is not sent, crossed margin data will be + * sent. * * @param asset (required) - * @param isolatedSymbol isolated symbol (optional) - * @param recvWindow No more than 60000 (optional) + * @param isolatedSymbol (optional) + * @param recvWindow (optional) * @return ApiResponse<QueryMaxTransferOutAmountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -442,11 +445,12 @@ private okhttp3.Call queryMaxTransferOutAmountValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/transfer#query-max-transfer-out-amount">Query * Max Transfer-Out Amount (USER_DATA) Documentation */ public ApiResponse queryMaxTransferOutAmount( - @NotNull String asset, String isolatedSymbol, Long recvWindow) throws ApiException { + @NotNull String asset, String isolatedSymbol, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = queryMaxTransferOutAmountValidateBeforeCall(asset, isolatedSymbol, recvWindow); java.lang.reflect.Type localVarReturnType = diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/UserDataStreamApi.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/UserDataStreamApi.java new file mode 100644 index 000000000..16323131f --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/UserDataStreamApi.java @@ -0,0 +1,469 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.api; + +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.Pair; +import com.binance.connector.client.common.SystemUtil; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.exception.ConstraintViolationException; +import com.binance.connector.client.margin_trading.rest.model.KeepaliveUserDataStreamRequest; +import com.binance.connector.client.margin_trading.rest.model.StartUserDataStreamResponse; +import com.google.gson.reflect.TypeToken; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Valid; +import jakarta.validation.Validation; +import jakarta.validation.Validator; +import jakarta.validation.constraints.*; +import jakarta.validation.executable.ExecutableValidator; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; + +public class UserDataStreamApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + private static final String USER_AGENT = + String.format( + "binance-margin-trading/7.0.0 (Java/%s; %s; %s)", + SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); + private static final boolean HAS_TIME_UNIT = false; + + public UserDataStreamApi(ClientConfiguration clientConfiguration) { + this(new ApiClient(clientConfiguration)); + } + + public UserDataStreamApi(ApiClient apiClient) { + apiClient.setUserAgent(USER_AGENT); + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for closeUserDataStream + * + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
+ * + * @see Close + * User Data Stream (USER_STREAM) Documentation + */ + private okhttp3.Call closeUserDataStreamCall() throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/margin/listen-key"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "DELETE", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call closeUserDataStreamValidateBeforeCall() throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {}; + Method method = this.getClass().getMethod("closeUserDataStream"); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return closeUserDataStreamCall(); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Close User Data Stream (USER_STREAM) Close out a user data stream. Weight(UID): 3000 Security + * Type: USER_STREAM + * + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
+ * + * @see Close + * User Data Stream (USER_STREAM) Documentation + */ + public ApiResponse closeUserDataStream() throws ApiException { + okhttp3.Call localVarCall = closeUserDataStreamValidateBeforeCall(); + return localVarApiClient.execute(localVarCall); + } + + /** + * Build call for keepaliveUserDataStream + * + * @param keepaliveUserDataStreamRequest (required) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
+ * + * @see Keepalive + * User Data Stream (USER_STREAM) Documentation + */ + private okhttp3.Call keepaliveUserDataStreamCall( + KeepaliveUserDataStreamRequest keepaliveUserDataStreamRequest) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/margin/listen-key"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (keepaliveUserDataStreamRequest.getListenKey() != null) { + localVarFormParams.put("listenKey", keepaliveUserDataStreamRequest.getListenKey()); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "PUT", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call keepaliveUserDataStreamValidateBeforeCall( + KeepaliveUserDataStreamRequest keepaliveUserDataStreamRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {keepaliveUserDataStreamRequest}; + Method method = + this.getClass() + .getMethod( + "keepaliveUserDataStream", + KeepaliveUserDataStreamRequest.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return keepaliveUserDataStreamCall(keepaliveUserDataStreamRequest); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Keepalive User Data Stream (USER_STREAM) Keepalive a user data stream to prevent a time out. + * Weight(UID): 1 Security Type: USER_STREAM + * + * @param keepaliveUserDataStreamRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
+ * + * @see Keepalive + * User Data Stream (USER_STREAM) Documentation + */ + public ApiResponse keepaliveUserDataStream( + @Valid @NotNull KeepaliveUserDataStreamRequest keepaliveUserDataStreamRequest) + throws ApiException { + okhttp3.Call localVarCall = + keepaliveUserDataStreamValidateBeforeCall(keepaliveUserDataStreamRequest); + return localVarApiClient.execute(localVarCall); + } + + /** + * Build call for startUserDataStream + * + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Start User Data Stream -
+ * + * @see Start + * User Data Stream (USER_STREAM) Documentation + */ + private okhttp3.Call startUserDataStreamCall() throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/margin/listen-key"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call startUserDataStreamValidateBeforeCall() throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {}; + Method method = this.getClass().getMethod("startUserDataStream"); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return startUserDataStreamCall(); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Start User Data Stream (USER_STREAM) Start a new user data stream. Weight(UID): 1 Security + * Type: USER_STREAM + * + * @return ApiResponse<StartUserDataStreamResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Start User Data Stream -
+ * + * @see Start + * User Data Stream (USER_STREAM) Documentation + */ + public ApiResponse startUserDataStream() throws ApiException { + okhttp3.Call localVarCall = startUserDataStreamValidateBeforeCall(); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/AdjustCrossMarginMaxLeverageRequest.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/AdjustCrossMarginMaxLeverageRequest.java index cb54a3473..93ea3d1d3 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/AdjustCrossMarginMaxLeverageRequest.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/AdjustCrossMarginMaxLeverageRequest.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AdjustCrossMarginMaxLeverageRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AdjustCrossMarginMaxLeverageRequest { public static final String SERIALIZED_NAME_MAX_LEVERAGE = "maxLeverage"; @@ -51,7 +51,8 @@ public AdjustCrossMarginMaxLeverageRequest maxLeverage( } /** - * Get maxLeverage + * Can only adjust 3 , 5 or 10,Example: maxLeverage = 5 or 3 for Cross Margin Classic; + * maxLeverage=10 for Cross Margin Pro 10x leverage or 20x if compliance allows. * * @return maxLeverage */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/AdjustCrossMarginMaxLeverageResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/AdjustCrossMarginMaxLeverageResponse.java index 41c12ae87..493415a33 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/AdjustCrossMarginMaxLeverageResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/AdjustCrossMarginMaxLeverageResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AdjustCrossMarginMaxLeverageResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AdjustCrossMarginMaxLeverageResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; @@ -51,7 +51,7 @@ public AdjustCrossMarginMaxLeverageResponse success( } /** - * Get success + * success. * * @return success */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/AssetNames.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/AssetNames.java deleted file mode 100644 index bbdaaad6a..000000000 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/AssetNames.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.margin_trading.rest.model; - -import com.binance.connector.client.margin_trading.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** AssetNames */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AssetNames extends ArrayList { - public AssetNames() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AssetNames {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AssetNames - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - if (!element.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected array items to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - } - if (jsonElement == null) { - if (!AssetNames.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AssetNames is not found in the empty" - + " JSON string", - AssetNames.openapiRequiredFields.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AssetNames.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AssetNames' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AssetNames.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AssetNames value) throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public AssetNames read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AssetNames given an JSON string - * - * @param jsonString JSON string - * @return An instance of AssetNames - * @throws IOException if the JSON string is invalid with respect to AssetNames - */ - public static AssetNames fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AssetNames.class); - } - - /** - * Convert an instance of AssetNames to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CreateSpecialKeyRequest.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CreateSpecialKeyRequest.java index 86ea3d1e0..36b5bf48d 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CreateSpecialKeyRequest.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CreateSpecialKeyRequest.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -34,7 +35,7 @@ /** CreateSpecialKeyRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CreateSpecialKeyRequest { public static final String SERIALIZED_NAME_API_NAME = "apiName"; @@ -64,7 +65,7 @@ public class CreateSpecialKeyRequest { @SerializedName(SERIALIZED_NAME_PERMISSION_MODE) @jakarta.annotation.Nullable - private String permissionMode; + private PermissionMode permissionMode = PermissionMode.TRADE; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -119,7 +120,7 @@ public CreateSpecialKeyRequest ip(@jakarta.annotation.Nullable String ip) { } /** - * Get ip + * Can be added in batches, separated by commas. Max 30 for an API key * * @return ip */ @@ -138,7 +139,8 @@ public CreateSpecialKeyRequest publicKey(@jakarta.annotation.Nullable String pub } /** - * Get publicKey + * 1. If publicKey is inputted it will create an RSA or Ed25519 key. 2. Need to be encoded to + * URL-encoded format * * @return publicKey */ @@ -152,7 +154,7 @@ public void setPublicKey(@jakarta.annotation.Nullable String publicKey) { } public CreateSpecialKeyRequest permissionMode( - @jakarta.annotation.Nullable String permissionMode) { + @jakarta.annotation.Nullable PermissionMode permissionMode) { this.permissionMode = permissionMode; return this; } @@ -163,11 +165,12 @@ public CreateSpecialKeyRequest permissionMode( * @return permissionMode */ @jakarta.annotation.Nullable - public String getPermissionMode() { + @Valid + public PermissionMode getPermissionMode() { return permissionMode; } - public void setPermissionMode(@jakarta.annotation.Nullable String permissionMode) { + public void setPermissionMode(@jakarta.annotation.Nullable PermissionMode permissionMode) { this.permissionMode = permissionMode; } @@ -177,11 +180,12 @@ public CreateSpecialKeyRequest recvWindow(@jakarta.annotation.Nullable Long recv } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -352,13 +356,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("publicKey").toString())); } - if ((jsonObj.get("permissionMode") != null && !jsonObj.get("permissionMode").isJsonNull()) - && !jsonObj.get("permissionMode").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `permissionMode` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("permissionMode").toString())); + // validate the optional field `permissionMode` + if (jsonObj.get("permissionMode") != null && !jsonObj.get("permissionMode").isJsonNull()) { + PermissionMode.validateJsonElement(jsonObj.get("permissionMode")); } } diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CreateSpecialKeyResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CreateSpecialKeyResponse.java index 6d3808695..b7b5aacc0 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CreateSpecialKeyResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CreateSpecialKeyResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CreateSpecialKeyResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CreateSpecialKeyResponse { public static final String SERIALIZED_NAME_API_KEY = "apiKey"; @@ -62,7 +62,7 @@ public CreateSpecialKeyResponse apiKey(@jakarta.annotation.Nullable String apiKe } /** - * Get apiKey + * api Key. * * @return apiKey */ @@ -81,7 +81,7 @@ public CreateSpecialKeyResponse secretKey(@jakarta.annotation.Nullable String se } /** - * Get secretKey + * secretKey will be null when creating an RSA key * * @return secretKey */ @@ -100,7 +100,7 @@ public CreateSpecialKeyResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * HMAC_SHA256 or RSA * * @return type */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CrossMarginCollateralRatioResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CrossMarginCollateralRatioResponse.java index faed60ea0..6b349d476 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CrossMarginCollateralRatioResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CrossMarginCollateralRatioResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CrossMarginCollateralRatioResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CrossMarginCollateralRatioResponse extends ArrayList { public CrossMarginCollateralRatioResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CrossMarginCollateralRatioResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CrossMarginCollateralRatioResponseInner.java index 17932708c..2ef5729bd 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CrossMarginCollateralRatioResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CrossMarginCollateralRatioResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** CrossMarginCollateralRatioResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CrossMarginCollateralRatioResponseInner { public static final String SERIALIZED_NAME_COLLATERALS = "collaterals"; @@ -74,7 +74,7 @@ public CrossMarginCollateralRatioResponseInner addCollateralsItem( } /** - * Get collaterals + * collaterals list. * * @return collaterals */ @@ -106,7 +106,7 @@ public CrossMarginCollateralRatioResponseInner addAssetNamesItem(String assetNam } /** - * Get assetNames + * asset Names list. * * @return assetNames */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CrossMarginCollateralRatioResponseInnerCollateralsInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CrossMarginCollateralRatioResponseInnerCollateralsInner.java index 84244df97..f67d0a7da 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CrossMarginCollateralRatioResponseInnerCollateralsInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/CrossMarginCollateralRatioResponseInnerCollateralsInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CrossMarginCollateralRatioResponseInnerCollateralsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CrossMarginCollateralRatioResponseInnerCollateralsInner { public static final String SERIALIZED_NAME_MIN_USD_VALUE = "minUsdValue"; @@ -63,7 +63,7 @@ public CrossMarginCollateralRatioResponseInnerCollateralsInner minUsdValue( } /** - * Get minUsdValue + * min Usd Value. * * @return minUsdValue */ @@ -83,7 +83,7 @@ public CrossMarginCollateralRatioResponseInnerCollateralsInner maxUsdValue( } /** - * Get maxUsdValue + * max Usd Value. * * @return maxUsdValue */ @@ -103,7 +103,7 @@ public CrossMarginCollateralRatioResponseInnerCollateralsInner discountRate( } /** - * Get discountRate + * discount Rate. * * @return discountRate */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/DisableIsolatedMarginAccountResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/DisableIsolatedMarginAccountResponse.java index 7d2859f15..21a4a9904 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/DisableIsolatedMarginAccountResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/DisableIsolatedMarginAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DisableIsolatedMarginAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DisableIsolatedMarginAccountResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; @@ -57,7 +57,7 @@ public DisableIsolatedMarginAccountResponse success( } /** - * Get success + * success. * * @return success */ @@ -76,7 +76,7 @@ public DisableIsolatedMarginAccountResponse symbol(@jakarta.annotation.Nullable } /** - * Get symbol + * symbol. * * @return symbol */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/EditIpForSpecialKeyRequest.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/EditIpForSpecialKeyRequest.java index 1b24939a8..aad9b87f8 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/EditIpForSpecialKeyRequest.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/EditIpForSpecialKeyRequest.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** EditIpForSpecialKeyRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class EditIpForSpecialKeyRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -62,7 +62,7 @@ public EditIpForSpecialKeyRequest symbol(@jakarta.annotation.Nullable String sym } /** - * Get symbol + * isolated margin pair * * @return symbol */ @@ -81,7 +81,7 @@ public EditIpForSpecialKeyRequest ip(@jakarta.annotation.Nonnull String ip) { } /** - * Get ip + * Can be added in batches, separated by commas. Max 30 for an API key * * @return ip */ @@ -101,11 +101,12 @@ public EditIpForSpecialKeyRequest recvWindow(@jakarta.annotation.Nullable Long r } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/EnableIsolatedMarginAccountRequest.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/EnableIsolatedMarginAccountRequest.java index 1aa7f8307..67d6b2a6a 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/EnableIsolatedMarginAccountRequest.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/EnableIsolatedMarginAccountRequest.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** EnableIsolatedMarginAccountRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class EnableIsolatedMarginAccountRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -77,11 +77,12 @@ public EnableIsolatedMarginAccountRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/EnableIsolatedMarginAccountResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/EnableIsolatedMarginAccountResponse.java index 11f8f55f6..5f2d9be90 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/EnableIsolatedMarginAccountResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/EnableIsolatedMarginAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** EnableIsolatedMarginAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class EnableIsolatedMarginAccountResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; @@ -57,7 +57,7 @@ public EnableIsolatedMarginAccountResponse success( } /** - * Get success + * success. * * @return success */ @@ -76,7 +76,7 @@ public EnableIsolatedMarginAccountResponse symbol(@jakarta.annotation.Nullable S } /** - * Get symbol + * symbol. * * @return symbol */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/ExitSpecialKeyModeRequest.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/ExitSpecialKeyModeRequest.java new file mode 100644 index 000000000..c4bea6ae6 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/ExitSpecialKeyModeRequest.java @@ -0,0 +1,204 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.binance.connector.client.margin_trading.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** ExitSpecialKeyModeRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ExitSpecialKeyModeRequest { + public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; + + @SerializedName(SERIALIZED_NAME_RECV_WINDOW) + @jakarta.annotation.Nullable + private Long recvWindow; + + public ExitSpecialKeyModeRequest() {} + + public ExitSpecialKeyModeRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) { + this.recvWindow = recvWindow; + return this; + } + + /** + * The value cannot be greater than `60000` maximum: 60000 + * + * @return recvWindow + */ + @jakarta.annotation.Nullable + @Max(60000L) + public Long getRecvWindow() { + return recvWindow; + } + + public void setRecvWindow(@jakarta.annotation.Nullable Long recvWindow) { + this.recvWindow = recvWindow; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExitSpecialKeyModeRequest exitSpecialKeyModeRequest = (ExitSpecialKeyModeRequest) o; + return Objects.equals(this.recvWindow, exitSpecialKeyModeRequest.recvWindow); + } + + @Override + public int hashCode() { + return Objects.hash(recvWindow); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExitSpecialKeyModeRequest {\n"); + sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object recvWindowValue = getRecvWindow(); + String recvWindowValueAsString = ""; + recvWindowValueAsString = recvWindowValue.toString(); + sb.append("recvWindow=").append(urlEncode(recvWindowValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("recvWindow"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExitSpecialKeyModeRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExitSpecialKeyModeRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ExitSpecialKeyModeRequest is not found" + + " in the empty JSON string", + ExitSpecialKeyModeRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExitSpecialKeyModeRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExitSpecialKeyModeRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ExitSpecialKeyModeRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ExitSpecialKeyModeRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExitSpecialKeyModeRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ExitSpecialKeyModeRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExitSpecialKeyModeRequest + * @throws IOException if the JSON string is invalid with respect to ExitSpecialKeyModeRequest + */ + public static ExitSpecialKeyModeRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExitSpecialKeyModeRequest.class); + } + + /** + * Convert an instance of ExitSpecialKeyModeRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllCrossMarginPairsResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllCrossMarginPairsResponse.java index 02dffe263..043d81629 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllCrossMarginPairsResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllCrossMarginPairsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetAllCrossMarginPairsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetAllCrossMarginPairsResponse extends ArrayList { public GetAllCrossMarginPairsResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllCrossMarginPairsResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllCrossMarginPairsResponseInner.java index da5c056a7..fadb29f74 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllCrossMarginPairsResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllCrossMarginPairsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetAllCrossMarginPairsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetAllCrossMarginPairsResponseInner { public static final String SERIALIZED_NAME_BASE = "base"; @@ -92,7 +92,7 @@ public GetAllCrossMarginPairsResponseInner base(@jakarta.annotation.Nullable Str } /** - * Get base + * base. * * @return base */ @@ -111,7 +111,7 @@ public GetAllCrossMarginPairsResponseInner id(@jakarta.annotation.Nullable Long } /** - * Get id + * id. * * @return id */ @@ -131,7 +131,7 @@ public GetAllCrossMarginPairsResponseInner isBuyAllowed( } /** - * Get isBuyAllowed + * is Buy Allowed. * * @return isBuyAllowed */ @@ -151,7 +151,7 @@ public GetAllCrossMarginPairsResponseInner isMarginTrade( } /** - * Get isMarginTrade + * is Margin Trade. * * @return isMarginTrade */ @@ -171,7 +171,7 @@ public GetAllCrossMarginPairsResponseInner isSellAllowed( } /** - * Get isSellAllowed + * is Sell Allowed. * * @return isSellAllowed */ @@ -190,7 +190,7 @@ public GetAllCrossMarginPairsResponseInner quote(@jakarta.annotation.Nullable St } /** - * Get quote + * quote. * * @return quote */ @@ -209,7 +209,7 @@ public GetAllCrossMarginPairsResponseInner symbol(@jakarta.annotation.Nullable S } /** - * Get symbol + * symbol. * * @return symbol */ @@ -229,7 +229,7 @@ public GetAllCrossMarginPairsResponseInner delistTime( } /** - * Get delistTime + * delist Time. * * @return delistTime */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllIsolatedMarginSymbolResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllIsolatedMarginSymbolResponse.java index 0e2b63afe..93a457930 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllIsolatedMarginSymbolResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllIsolatedMarginSymbolResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetAllIsolatedMarginSymbolResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetAllIsolatedMarginSymbolResponse extends ArrayList { public GetAllIsolatedMarginSymbolResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllIsolatedMarginSymbolResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllIsolatedMarginSymbolResponseInner.java index b98091c52..f331b7395 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllIsolatedMarginSymbolResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllIsolatedMarginSymbolResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetAllIsolatedMarginSymbolResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetAllIsolatedMarginSymbolResponseInner { public static final String SERIALIZED_NAME_BASE = "base"; @@ -80,7 +80,7 @@ public GetAllIsolatedMarginSymbolResponseInner base(@jakarta.annotation.Nullable } /** - * Get base + * base. * * @return base */ @@ -100,7 +100,7 @@ public GetAllIsolatedMarginSymbolResponseInner isBuyAllowed( } /** - * Get isBuyAllowed + * is Buy Allowed. * * @return isBuyAllowed */ @@ -120,7 +120,7 @@ public GetAllIsolatedMarginSymbolResponseInner isMarginTrade( } /** - * Get isMarginTrade + * is Margin Trade. * * @return isMarginTrade */ @@ -140,7 +140,7 @@ public GetAllIsolatedMarginSymbolResponseInner isSellAllowed( } /** - * Get isSellAllowed + * is Sell Allowed. * * @return isSellAllowed */ @@ -160,7 +160,7 @@ public GetAllIsolatedMarginSymbolResponseInner quote( } /** - * Get quote + * quote. * * @return quote */ @@ -180,7 +180,7 @@ public GetAllIsolatedMarginSymbolResponseInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllMarginAssetsResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllMarginAssetsResponse.java index c0de6a8d1..6183c1cf4 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllMarginAssetsResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllMarginAssetsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetAllMarginAssetsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetAllMarginAssetsResponse extends ArrayList { public GetAllMarginAssetsResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllMarginAssetsResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllMarginAssetsResponseInner.java index 86f2d10d7..9a98403b9 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllMarginAssetsResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetAllMarginAssetsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetAllMarginAssetsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetAllMarginAssetsResponseInner { public static final String SERIALIZED_NAME_ASSET_FULL_NAME = "assetFullName"; @@ -87,7 +87,7 @@ public GetAllMarginAssetsResponseInner assetFullName( } /** - * Get assetFullName + * asset Full Name. * * @return assetFullName */ @@ -107,7 +107,7 @@ public GetAllMarginAssetsResponseInner assetName( } /** - * Get assetName + * asset Name. * * @return assetName */ @@ -127,7 +127,7 @@ public GetAllMarginAssetsResponseInner isBorrowable( } /** - * Get isBorrowable + * is Borrowable. * * @return isBorrowable */ @@ -147,7 +147,7 @@ public GetAllMarginAssetsResponseInner isMortgageable( } /** - * Get isMortgageable + * is Mortgageable. * * @return isMortgageable */ @@ -167,7 +167,7 @@ public GetAllMarginAssetsResponseInner userMinBorrow( } /** - * Get userMinBorrow + * user Min Borrow. * * @return userMinBorrow */ @@ -187,7 +187,7 @@ public GetAllMarginAssetsResponseInner userMinRepay( } /** - * Get userMinRepay + * user Min Repay. * * @return userMinRepay */ @@ -207,7 +207,7 @@ public GetAllMarginAssetsResponseInner delistTime( } /** - * Get delistTime + * delist Time. * * @return delistTime */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetBnbBurnStatusResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetBnbBurnStatusResponse.java index 3cb92d84e..b68b18560 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetBnbBurnStatusResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetBnbBurnStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetBnbBurnStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBnbBurnStatusResponse { public static final String SERIALIZED_NAME_SPOT_B_N_B_BURN = "spotBNBBurn"; @@ -56,7 +56,7 @@ public GetBnbBurnStatusResponse spotBNBBurn(@jakarta.annotation.Nullable Boolean } /** - * Get spotBNBBurn + * spot BNBBurn. * * @return spotBNBBurn */ @@ -76,7 +76,7 @@ public GetBnbBurnStatusResponse interestBNBBurn( } /** - * Get interestBNBBurn + * interest BNBBurn. * * @return interestBNBBurn */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetCrossMarginTransferHistoryResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetCrossMarginTransferHistoryResponse.java index b5df20cb5..43e54280d 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetCrossMarginTransferHistoryResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetCrossMarginTransferHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetCrossMarginTransferHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCrossMarginTransferHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; @@ -73,7 +73,7 @@ public GetCrossMarginTransferHistoryResponse addRowsItem( } /** - * Get rows + * rows list. * * @return rows */ @@ -95,7 +95,7 @@ public GetCrossMarginTransferHistoryResponse total(@jakarta.annotation.Nullable } /** - * Get total + * total. * * @return total */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetCrossMarginTransferHistoryResponseRowsInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetCrossMarginTransferHistoryResponseRowsInner.java index d82ac458b..3c4668565 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetCrossMarginTransferHistoryResponseRowsInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetCrossMarginTransferHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetCrossMarginTransferHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCrossMarginTransferHistoryResponseRowsInner { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -105,7 +105,7 @@ public GetCrossMarginTransferHistoryResponseRowsInner amount( } /** - * Get amount + * amount. * * @return amount */ @@ -125,7 +125,7 @@ public GetCrossMarginTransferHistoryResponseRowsInner asset( } /** - * Get asset + * asset. * * @return asset */ @@ -145,7 +145,7 @@ public GetCrossMarginTransferHistoryResponseRowsInner status( } /** - * Get status + * status. * * @return status */ @@ -165,7 +165,7 @@ public GetCrossMarginTransferHistoryResponseRowsInner timestamp( } /** - * Get timestamp + * timestamp. * * @return timestamp */ @@ -185,7 +185,7 @@ public GetCrossMarginTransferHistoryResponseRowsInner txId( } /** - * Get txId + * tx Id. * * @return txId */ @@ -205,7 +205,7 @@ public GetCrossMarginTransferHistoryResponseRowsInner type( } /** - * Get type + * type. * * @return type */ @@ -225,7 +225,7 @@ public GetCrossMarginTransferHistoryResponseRowsInner transFrom( } /** - * Get transFrom + * SPOT,FUTURES,FIAT,DELIVERY,MINING,ISOLATED_MARGIN,FUNDING,MOTHER_SPOT,OPTION,SUB_SPOT,SUB_MARGIN,CROSS_MARGIN * * @return transFrom */ @@ -245,7 +245,7 @@ public GetCrossMarginTransferHistoryResponseRowsInner transTo( } /** - * Get transTo + * SPOT,FUTURES,FIAT,DELIVERY,MINING,ISOLATED_MARGIN,FUNDING,MOTHER_SPOT,OPTION,SUB_SPOT,SUB_MARGIN,CROSS_MARGIN * * @return transTo */ @@ -265,7 +265,7 @@ public GetCrossMarginTransferHistoryResponseRowsInner fromSymbol( } /** - * Get fromSymbol + * from Symbol. * * @return fromSymbol */ @@ -285,7 +285,7 @@ public GetCrossMarginTransferHistoryResponseRowsInner toSymbol( } /** - * Get toSymbol + * to Symbol. * * @return toSymbol */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetDelistScheduleResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetDelistScheduleResponse.java index b13c2b17c..a8a8eb76a 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetDelistScheduleResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetDelistScheduleResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetDelistScheduleResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDelistScheduleResponse extends ArrayList { public GetDelistScheduleResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetDelistScheduleResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetDelistScheduleResponseInner.java index 5ff228d13..4d7650554 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetDelistScheduleResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetDelistScheduleResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** GetDelistScheduleResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDelistScheduleResponseInner { public static final String SERIALIZED_NAME_DELIST_TIME = "delistTime"; @@ -66,7 +66,7 @@ public GetDelistScheduleResponseInner delistTime(@jakarta.annotation.Nullable Lo } /** - * Get delistTime + * delist Time. * * @return delistTime */ @@ -94,7 +94,7 @@ public GetDelistScheduleResponseInner addCrossMarginAssetsItem(String crossMargi } /** - * Get crossMarginAssets + * cross Margin Assets list. * * @return crossMarginAssets */ @@ -123,7 +123,7 @@ public GetDelistScheduleResponseInner addIsolatedMarginSymbolsItem( } /** - * Get isolatedMarginSymbols + * isolated Margin Symbols list. * * @return isolatedMarginSymbols */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetForceLiquidationRecordResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetForceLiquidationRecordResponse.java index 8789f483e..ac85dbf9c 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetForceLiquidationRecordResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetForceLiquidationRecordResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetForceLiquidationRecordResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetForceLiquidationRecordResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; @@ -73,7 +73,7 @@ public GetForceLiquidationRecordResponse addRowsItem( } /** - * Get rows + * rows list. * * @return rows */ @@ -95,7 +95,7 @@ public GetForceLiquidationRecordResponse total(@jakarta.annotation.Nullable Long } /** - * Get total + * total. * * @return total */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetForceLiquidationRecordResponseRowsInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetForceLiquidationRecordResponseRowsInner.java index 0ed7ccfd6..5d02f19eb 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetForceLiquidationRecordResponseRowsInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetForceLiquidationRecordResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetForceLiquidationRecordResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetForceLiquidationRecordResponseRowsInner { public static final String SERIALIZED_NAME_AVG_PRICE = "avgPrice"; @@ -105,7 +105,7 @@ public GetForceLiquidationRecordResponseRowsInner avgPrice( } /** - * Get avgPrice + * avg Price. * * @return avgPrice */ @@ -125,7 +125,7 @@ public GetForceLiquidationRecordResponseRowsInner executedQty( } /** - * Get executedQty + * executed Qty. * * @return executedQty */ @@ -145,7 +145,7 @@ public GetForceLiquidationRecordResponseRowsInner orderId( } /** - * Get orderId + * order Id. * * @return orderId */ @@ -165,7 +165,7 @@ public GetForceLiquidationRecordResponseRowsInner price( } /** - * Get price + * price. * * @return price */ @@ -184,7 +184,7 @@ public GetForceLiquidationRecordResponseRowsInner qty(@jakarta.annotation.Nullab } /** - * Get qty + * qty. * * @return qty */ @@ -204,7 +204,7 @@ public GetForceLiquidationRecordResponseRowsInner side( } /** - * Get side + * side. * * @return side */ @@ -224,7 +224,7 @@ public GetForceLiquidationRecordResponseRowsInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -244,7 +244,7 @@ public GetForceLiquidationRecordResponseRowsInner timeInForce( } /** - * Get timeInForce + * time In Force. * * @return timeInForce */ @@ -264,7 +264,7 @@ public GetForceLiquidationRecordResponseRowsInner isIsolated( } /** - * Get isIsolated + * is Isolated. * * @return isIsolated */ @@ -284,7 +284,7 @@ public GetForceLiquidationRecordResponseRowsInner updatedTime( } /** - * Get updatedTime + * updated Time. * * @return updatedTime */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetFutureHourlyInterestRateResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetFutureHourlyInterestRateResponse.java index c3fd45898..96353a4ed 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetFutureHourlyInterestRateResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetFutureHourlyInterestRateResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFutureHourlyInterestRateResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFutureHourlyInterestRateResponse extends ArrayList { public GetFutureHourlyInterestRateResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetFutureHourlyInterestRateResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetFutureHourlyInterestRateResponseInner.java index 440de0747..3cd1e5aa7 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetFutureHourlyInterestRateResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetFutureHourlyInterestRateResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFutureHourlyInterestRateResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFutureHourlyInterestRateResponseInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -57,7 +57,7 @@ public GetFutureHourlyInterestRateResponseInner asset( } /** - * Get asset + * asset. * * @return asset */ @@ -77,7 +77,7 @@ public GetFutureHourlyInterestRateResponseInner nextHourlyInterestRate( } /** - * Get nextHourlyInterestRate + * next Hourly Interest Rate. * * @return nextHourlyInterestRate */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetInterestHistoryResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetInterestHistoryResponse.java index 3b14ac659..37d212ae8 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetInterestHistoryResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetInterestHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetInterestHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetInterestHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; @@ -71,7 +71,7 @@ public GetInterestHistoryResponse addRowsItem(GetInterestHistoryResponseRowsInne } /** - * Get rows + * rows list. * * @return rows */ @@ -92,7 +92,7 @@ public GetInterestHistoryResponse total(@jakarta.annotation.Nullable Long total) } /** - * Get total + * total. * * @return total */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetInterestHistoryResponseRowsInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetInterestHistoryResponseRowsInner.java index e4b3a55fa..dcd841fe0 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetInterestHistoryResponseRowsInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetInterestHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetInterestHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetInterestHistoryResponseRowsInner { public static final String SERIALIZED_NAME_TX_ID = "txId"; @@ -98,7 +98,7 @@ public GetInterestHistoryResponseRowsInner txId(@jakarta.annotation.Nullable Lon } /** - * Get txId + * tx Id. * * @return txId */ @@ -118,7 +118,7 @@ public GetInterestHistoryResponseRowsInner interestAccuredTime( } /** - * Get interestAccuredTime + * interest Accured Time. * * @return interestAccuredTime */ @@ -137,7 +137,7 @@ public GetInterestHistoryResponseRowsInner asset(@jakarta.annotation.Nullable St } /** - * Get asset + * asset. * * @return asset */ @@ -157,7 +157,7 @@ public GetInterestHistoryResponseRowsInner rawAsset( } /** - * Get rawAsset + * will not be returned for isolated margin * * @return rawAsset */ @@ -177,7 +177,7 @@ public GetInterestHistoryResponseRowsInner principal( } /** - * Get principal + * principal. * * @return principal */ @@ -197,7 +197,7 @@ public GetInterestHistoryResponseRowsInner interest( } /** - * Get interest + * interest. * * @return interest */ @@ -217,7 +217,7 @@ public GetInterestHistoryResponseRowsInner interestRate( } /** - * Get interestRate + * interest Rate. * * @return interestRate */ @@ -236,7 +236,7 @@ public GetInterestHistoryResponseRowsInner type(@jakarta.annotation.Nullable Str } /** - * Get type + * type. * * @return type */ @@ -256,7 +256,7 @@ public GetInterestHistoryResponseRowsInner isolatedSymbol( } /** - * Get isolatedSymbol + * isolated symbol, will not be returned for crossed margin * * @return isolatedSymbol */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetLimitPricePairsResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetLimitPricePairsResponse.java index 7c75633ab..afd5c91c8 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetLimitPricePairsResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetLimitPricePairsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** GetLimitPricePairsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLimitPricePairsResponse { public static final String SERIALIZED_NAME_CROSS_MARGIN_SYMBOLS = "crossMarginSymbols"; @@ -63,7 +63,7 @@ public GetLimitPricePairsResponse addCrossMarginSymbolsItem(String crossMarginSy } /** - * Get crossMarginSymbols + * cross Margin Symbols list. * * @return crossMarginSymbols */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetListScheduleResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetListScheduleResponse.java index fc43811ce..f71498d01 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetListScheduleResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetListScheduleResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetListScheduleResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetListScheduleResponse extends ArrayList { public GetListScheduleResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetListScheduleResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetListScheduleResponseInner.java index b75a8205c..dcfb7e7b0 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetListScheduleResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetListScheduleResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** GetListScheduleResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetListScheduleResponseInner { public static final String SERIALIZED_NAME_LIST_TIME = "listTime"; @@ -66,7 +66,7 @@ public GetListScheduleResponseInner listTime(@jakarta.annotation.Nullable Long l } /** - * Get listTime + * list Time. * * @return listTime */ @@ -94,7 +94,7 @@ public GetListScheduleResponseInner addCrossMarginAssetsItem(String crossMarginA } /** - * Get crossMarginAssets + * cross Margin Assets list. * * @return crossMarginAssets */ @@ -123,7 +123,7 @@ public GetListScheduleResponseInner addIsolatedMarginSymbolsItem( } /** - * Get isolatedMarginSymbols + * isolated Margin Symbols list. * * @return isolatedMarginSymbols */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetMarginAssetRiskBasedLiquidationRatioResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetMarginAssetRiskBasedLiquidationRatioResponse.java index 73ff42abb..dc4ce6c26 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetMarginAssetRiskBasedLiquidationRatioResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetMarginAssetRiskBasedLiquidationRatioResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetMarginAssetRiskBasedLiquidationRatioResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetMarginAssetRiskBasedLiquidationRatioResponse extends ArrayList { public GetMarginAssetRiskBasedLiquidationRatioResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetMarginAssetRiskBasedLiquidationRatioResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetMarginAssetRiskBasedLiquidationRatioResponseInner.java index ce3802eaf..c6ac31a44 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetMarginAssetRiskBasedLiquidationRatioResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetMarginAssetRiskBasedLiquidationRatioResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetMarginAssetRiskBasedLiquidationRatioResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetMarginAssetRiskBasedLiquidationRatioResponseInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -58,7 +58,7 @@ public GetMarginAssetRiskBasedLiquidationRatioResponseInner asset( } /** - * Get asset + * asset. * * @return asset */ @@ -78,7 +78,7 @@ public GetMarginAssetRiskBasedLiquidationRatioResponseInner riskBasedLiquidation } /** - * Get riskBasedLiquidationRatio + * risk Based Liquidation Ratio. * * @return riskBasedLiquidationRatio */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetMarginRestrictedAssetsResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetMarginRestrictedAssetsResponse.java index 1a12af4b5..dc455adc2 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetMarginRestrictedAssetsResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetMarginRestrictedAssetsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** GetMarginRestrictedAssetsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetMarginRestrictedAssetsResponse { public static final String SERIALIZED_NAME_OPEN_LONG_RESTRICTED_ASSET = "openLongRestrictedAsset"; @@ -72,7 +72,7 @@ public GetMarginRestrictedAssetsResponse addOpenLongRestrictedAssetItem( } /** - * Get openLongRestrictedAsset + * open Long Restricted Asset list. * * @return openLongRestrictedAsset */ @@ -102,7 +102,7 @@ public GetMarginRestrictedAssetsResponse addMaxCollateralExceededAssetItem( } /** - * Get maxCollateralExceededAsset + * max Collateral Exceeded Asset list. * * @return maxCollateralExceededAsset */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSmallLiabilityExchangeCoinListResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSmallLiabilityExchangeCoinListResponse.java index 67237a2fe..dbe23ef16 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSmallLiabilityExchangeCoinListResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSmallLiabilityExchangeCoinListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSmallLiabilityExchangeCoinListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSmallLiabilityExchangeCoinListResponse extends ArrayList { public GetSmallLiabilityExchangeCoinListResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSmallLiabilityExchangeCoinListResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSmallLiabilityExchangeCoinListResponseInner.java index 090010f64..a36d09247 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSmallLiabilityExchangeCoinListResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSmallLiabilityExchangeCoinListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetSmallLiabilityExchangeCoinListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSmallLiabilityExchangeCoinListResponseInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -76,7 +76,7 @@ public GetSmallLiabilityExchangeCoinListResponseInner asset( } /** - * Get asset + * asset. * * @return asset */ @@ -96,7 +96,7 @@ public GetSmallLiabilityExchangeCoinListResponseInner interest( } /** - * Get interest + * interest. * * @return interest */ @@ -116,7 +116,7 @@ public GetSmallLiabilityExchangeCoinListResponseInner principal( } /** - * Get principal + * principal. * * @return principal */ @@ -136,7 +136,7 @@ public GetSmallLiabilityExchangeCoinListResponseInner liabilityAsset( } /** - * Get liabilityAsset + * liability Asset. * * @return liabilityAsset */ @@ -156,7 +156,7 @@ public GetSmallLiabilityExchangeCoinListResponseInner liabilityQty( } /** - * Get liabilityQty + * liability Qty. * * @return liabilityQty */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSmallLiabilityExchangeHistoryResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSmallLiabilityExchangeHistoryResponse.java index d42280873..df8122fc4 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSmallLiabilityExchangeHistoryResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSmallLiabilityExchangeHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetSmallLiabilityExchangeHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSmallLiabilityExchangeHistoryResponse { public static final String SERIALIZED_NAME_TOTAL = "total"; @@ -62,7 +62,7 @@ public GetSmallLiabilityExchangeHistoryResponse total(@jakarta.annotation.Nullab } /** - * Get total + * total. * * @return total */ @@ -92,7 +92,7 @@ public GetSmallLiabilityExchangeHistoryResponse addRowsItem( } /** - * Get rows + * rows list. * * @return rows */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSmallLiabilityExchangeHistoryResponseRowsInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSmallLiabilityExchangeHistoryResponseRowsInner.java index 51f592e5d..8e6074e97 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSmallLiabilityExchangeHistoryResponseRowsInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSmallLiabilityExchangeHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSmallLiabilityExchangeHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSmallLiabilityExchangeHistoryResponseRowsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -81,7 +81,7 @@ public GetSmallLiabilityExchangeHistoryResponseRowsInner asset( } /** - * Get asset + * asset. * * @return asset */ @@ -101,7 +101,7 @@ public GetSmallLiabilityExchangeHistoryResponseRowsInner amount( } /** - * Get amount + * amount. * * @return amount */ @@ -121,7 +121,7 @@ public GetSmallLiabilityExchangeHistoryResponseRowsInner targetAsset( } /** - * Get targetAsset + * target Asset. * * @return targetAsset */ @@ -141,7 +141,7 @@ public GetSmallLiabilityExchangeHistoryResponseRowsInner targetAmount( } /** - * Get targetAmount + * target Amount. * * @return targetAmount */ @@ -161,7 +161,7 @@ public GetSmallLiabilityExchangeHistoryResponseRowsInner bizType( } /** - * Get bizType + * biz Type. * * @return bizType */ @@ -181,7 +181,7 @@ public GetSmallLiabilityExchangeHistoryResponseRowsInner timestamp( } /** - * Get timestamp + * timestamp. * * @return timestamp */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSummaryOfMarginAccountResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSummaryOfMarginAccountResponse.java index 0cd3e0577..7044f4bea 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSummaryOfMarginAccountResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/GetSummaryOfMarginAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSummaryOfMarginAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSummaryOfMarginAccountResponse { public static final String SERIALIZED_NAME_NORMAL_BAR = "normalBar"; @@ -63,7 +63,7 @@ public GetSummaryOfMarginAccountResponse normalBar( } /** - * Get normalBar + * normal Bar. * * @return normalBar */ @@ -83,7 +83,7 @@ public GetSummaryOfMarginAccountResponse marginCallBar( } /** - * Get marginCallBar + * margin Call Bar. * * @return marginCallBar */ @@ -103,7 +103,7 @@ public GetSummaryOfMarginAccountResponse forceLiquidationBar( } /** - * Get forceLiquidationBar + * force Liquidation Bar. * * @return forceLiquidationBar */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/IsIsolated.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/IsIsolated.java new file mode 100644 index 000000000..01d6fadd2 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/IsIsolated.java @@ -0,0 +1,73 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets isIsolated */ +@JsonAdapter(IsIsolated.Adapter.class) +public enum IsIsolated { + TRUE("TRUE"), + + FALSE("FALSE"); + + private String value; + + IsIsolated(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static IsIsolated fromValue(String value) { + for (IsIsolated b : IsIsolated.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final IsIsolated enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public IsIsolated read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return IsIsolated.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + IsIsolated.fromValue(value); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/KeepaliveUserDataStreamRequest.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/KeepaliveUserDataStreamRequest.java index 29689110b..e2494ca16 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/KeepaliveUserDataStreamRequest.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/KeepaliveUserDataStreamRequest.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** KeepaliveUserDataStreamRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KeepaliveUserDataStreamRequest { public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/LiquidationLoanRepayRequest.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/LiquidationLoanRepayRequest.java new file mode 100644 index 000000000..980fcda9e --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/LiquidationLoanRepayRequest.java @@ -0,0 +1,292 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.binance.connector.client.margin_trading.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** LiquidationLoanRepayRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class LiquidationLoanRepayRequest { + public static final String SERIALIZED_NAME_ASSET = "asset"; + + @SerializedName(SERIALIZED_NAME_ASSET) + @jakarta.annotation.Nonnull + private String asset; + + public static final String SERIALIZED_NAME_AMOUNT = "amount"; + + @SerializedName(SERIALIZED_NAME_AMOUNT) + @jakarta.annotation.Nonnull + private Double amount; + + public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; + + @SerializedName(SERIALIZED_NAME_RECV_WINDOW) + @jakarta.annotation.Nullable + private Long recvWindow; + + public LiquidationLoanRepayRequest() {} + + public LiquidationLoanRepayRequest asset(@jakarta.annotation.Nonnull String asset) { + this.asset = asset; + return this; + } + + /** + * The asset to repay (e.g. USDT, USDC) + * + * @return asset + */ + @jakarta.annotation.Nonnull + @NotNull + public String getAsset() { + return asset; + } + + public void setAsset(@jakarta.annotation.Nonnull String asset) { + this.asset = asset; + } + + public LiquidationLoanRepayRequest amount(@jakarta.annotation.Nonnull Double amount) { + this.amount = amount; + return this; + } + + /** + * Repayment amount, must be greater than 0 + * + * @return amount + */ + @jakarta.annotation.Nonnull + @NotNull + @Valid + public Double getAmount() { + return amount; + } + + public void setAmount(@jakarta.annotation.Nonnull Double amount) { + this.amount = amount; + } + + public LiquidationLoanRepayRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) { + this.recvWindow = recvWindow; + return this; + } + + /** + * Get recvWindow maximum: 60000 + * + * @return recvWindow + */ + @jakarta.annotation.Nullable + @Max(60000L) + public Long getRecvWindow() { + return recvWindow; + } + + public void setRecvWindow(@jakarta.annotation.Nullable Long recvWindow) { + this.recvWindow = recvWindow; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LiquidationLoanRepayRequest liquidationLoanRepayRequest = (LiquidationLoanRepayRequest) o; + return Objects.equals(this.asset, liquidationLoanRepayRequest.asset) + && Objects.equals(this.amount, liquidationLoanRepayRequest.amount) + && Objects.equals(this.recvWindow, liquidationLoanRepayRequest.recvWindow); + } + + @Override + public int hashCode() { + return Objects.hash(asset, amount, recvWindow); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LiquidationLoanRepayRequest {\n"); + sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object assetValue = getAsset(); + String assetValueAsString = ""; + assetValueAsString = assetValue.toString(); + sb.append("asset=").append(urlEncode(assetValueAsString)).append(""); + Object amountValue = getAmount(); + String amountValueAsString = ""; + amountValueAsString = amountValue.toString(); + sb.append("amount=").append(urlEncode(amountValueAsString)).append(""); + Object recvWindowValue = getRecvWindow(); + String recvWindowValueAsString = ""; + recvWindowValueAsString = recvWindowValue.toString(); + sb.append("recvWindow=").append(urlEncode(recvWindowValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("asset"); + openapiFields.add("amount"); + openapiFields.add("recvWindow"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("asset"); + openapiRequiredFields.add("amount"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * LiquidationLoanRepayRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LiquidationLoanRepayRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in LiquidationLoanRepayRequest is not" + + " found in the empty JSON string", + LiquidationLoanRepayRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LiquidationLoanRepayRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("asset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `asset` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("asset").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LiquidationLoanRepayRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LiquidationLoanRepayRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(LiquidationLoanRepayRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, LiquidationLoanRepayRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LiquidationLoanRepayRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of LiquidationLoanRepayRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of LiquidationLoanRepayRequest + * @throws IOException if the JSON string is invalid with respect to LiquidationLoanRepayRequest + */ + public static LiquidationLoanRepayRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LiquidationLoanRepayRequest.class); + } + + /** + * Convert an instance of LiquidationLoanRepayRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/LiquidationLoanRepayResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/LiquidationLoanRepayResponse.java new file mode 100644 index 000000000..67ccc2948 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/LiquidationLoanRepayResponse.java @@ -0,0 +1,359 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.binance.connector.client.margin_trading.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** LiquidationLoanRepayResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class LiquidationLoanRepayResponse { + public static final String SERIALIZED_NAME_REPAY_ID = "repayId"; + + @SerializedName(SERIALIZED_NAME_REPAY_ID) + @jakarta.annotation.Nullable + private Long repayId; + + public static final String SERIALIZED_NAME_ASSET = "asset"; + + @SerializedName(SERIALIZED_NAME_ASSET) + @jakarta.annotation.Nullable + private String asset; + + public static final String SERIALIZED_NAME_AMOUNT = "amount"; + + @SerializedName(SERIALIZED_NAME_AMOUNT) + @jakarta.annotation.Nullable + private String amount; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @jakarta.annotation.Nullable + private String status; + + public static final String SERIALIZED_NAME_CREATE_TIME = "createTime"; + + @SerializedName(SERIALIZED_NAME_CREATE_TIME) + @jakarta.annotation.Nullable + private Long createTime; + + public LiquidationLoanRepayResponse() {} + + public LiquidationLoanRepayResponse repayId(@jakarta.annotation.Nullable Long repayId) { + this.repayId = repayId; + return this; + } + + /** + * Unique identifier for this repayment transaction + * + * @return repayId + */ + @jakarta.annotation.Nullable + public Long getRepayId() { + return repayId; + } + + public void setRepayId(@jakarta.annotation.Nullable Long repayId) { + this.repayId = repayId; + } + + public LiquidationLoanRepayResponse asset(@jakarta.annotation.Nullable String asset) { + this.asset = asset; + return this; + } + + /** + * Asset used for repayment + * + * @return asset + */ + @jakarta.annotation.Nullable + public String getAsset() { + return asset; + } + + public void setAsset(@jakarta.annotation.Nullable String asset) { + this.asset = asset; + } + + public LiquidationLoanRepayResponse amount(@jakarta.annotation.Nullable String amount) { + this.amount = amount; + return this; + } + + /** + * Actual repayment amount + * + * @return amount + */ + @jakarta.annotation.Nullable + public String getAmount() { + return amount; + } + + public void setAmount(@jakarta.annotation.Nullable String amount) { + this.amount = amount; + } + + public LiquidationLoanRepayResponse status(@jakarta.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * Repayment status: `SUCCESS` (completed) or `PENDING` (processing) + * + * @return status + */ + @jakarta.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(@jakarta.annotation.Nullable String status) { + this.status = status; + } + + public LiquidationLoanRepayResponse createTime(@jakarta.annotation.Nullable Long createTime) { + this.createTime = createTime; + return this; + } + + /** + * Unix timestamp (milliseconds) when the repayment was created + * + * @return createTime + */ + @jakarta.annotation.Nullable + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(@jakarta.annotation.Nullable Long createTime) { + this.createTime = createTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LiquidationLoanRepayResponse liquidationLoanRepayResponse = + (LiquidationLoanRepayResponse) o; + return Objects.equals(this.repayId, liquidationLoanRepayResponse.repayId) + && Objects.equals(this.asset, liquidationLoanRepayResponse.asset) + && Objects.equals(this.amount, liquidationLoanRepayResponse.amount) + && Objects.equals(this.status, liquidationLoanRepayResponse.status) + && Objects.equals(this.createTime, liquidationLoanRepayResponse.createTime); + } + + @Override + public int hashCode() { + return Objects.hash(repayId, asset, amount, status, createTime); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LiquidationLoanRepayResponse {\n"); + sb.append(" repayId: ").append(toIndentedString(repayId)).append("\n"); + sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" createTime: ").append(toIndentedString(createTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object repayIdValue = getRepayId(); + String repayIdValueAsString = ""; + repayIdValueAsString = repayIdValue.toString(); + sb.append("repayId=").append(urlEncode(repayIdValueAsString)).append(""); + Object assetValue = getAsset(); + String assetValueAsString = ""; + assetValueAsString = assetValue.toString(); + sb.append("asset=").append(urlEncode(assetValueAsString)).append(""); + Object amountValue = getAmount(); + String amountValueAsString = ""; + amountValueAsString = amountValue.toString(); + sb.append("amount=").append(urlEncode(amountValueAsString)).append(""); + Object statusValue = getStatus(); + String statusValueAsString = ""; + statusValueAsString = statusValue.toString(); + sb.append("status=").append(urlEncode(statusValueAsString)).append(""); + Object createTimeValue = getCreateTime(); + String createTimeValueAsString = ""; + createTimeValueAsString = createTimeValue.toString(); + sb.append("createTime=").append(urlEncode(createTimeValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("repayId"); + openapiFields.add("asset"); + openapiFields.add("amount"); + openapiFields.add("status"); + openapiFields.add("createTime"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * LiquidationLoanRepayResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LiquidationLoanRepayResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in LiquidationLoanRepayResponse is not" + + " found in the empty JSON string", + LiquidationLoanRepayResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) + && !jsonObj.get("asset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `asset` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("asset").toString())); + } + if ((jsonObj.get("amount") != null && !jsonObj.get("amount").isJsonNull()) + && !jsonObj.get("amount").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `amount` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("amount").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) + && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LiquidationLoanRepayResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LiquidationLoanRepayResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(LiquidationLoanRepayResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, LiquidationLoanRepayResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LiquidationLoanRepayResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of LiquidationLoanRepayResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of LiquidationLoanRepayResponse + * @throws IOException if the JSON string is invalid with respect to + * LiquidationLoanRepayResponse + */ + public static LiquidationLoanRepayResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LiquidationLoanRepayResponse.class); + } + + /** + * Convert an instance of LiquidationLoanRepayResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountBorrowRepayRequest.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountBorrowRepayRequest.java index cf570257e..5e9f8f7d1 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountBorrowRepayRequest.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountBorrowRepayRequest.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -34,7 +35,7 @@ /** MarginAccountBorrowRepayRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountBorrowRepayRequest { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -46,12 +47,12 @@ public class MarginAccountBorrowRepayRequest { @SerializedName(SERIALIZED_NAME_IS_ISOLATED) @jakarta.annotation.Nonnull - private String isIsolated; + private IsIsolated isIsolated = IsIsolated.FALSE; public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -64,7 +65,7 @@ public class MarginAccountBorrowRepayRequest { @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private String type; + private OrderType type; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -95,7 +96,7 @@ public void setAsset(@jakarta.annotation.Nonnull String asset) { } public MarginAccountBorrowRepayRequest isIsolated( - @jakarta.annotation.Nonnull String isIsolated) { + @jakarta.annotation.Nonnull IsIsolated isIsolated) { this.isIsolated = isIsolated; return this; } @@ -107,31 +108,31 @@ public MarginAccountBorrowRepayRequest isIsolated( */ @jakarta.annotation.Nonnull @NotNull - public String getIsIsolated() { + @Valid + public IsIsolated getIsIsolated() { return isIsolated; } - public void setIsIsolated(@jakarta.annotation.Nonnull String isIsolated) { + public void setIsIsolated(@jakarta.annotation.Nonnull IsIsolated isIsolated) { this.isIsolated = isIsolated; } - public MarginAccountBorrowRepayRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public MarginAccountBorrowRepayRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Only for Isolated margin * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -155,7 +156,7 @@ public void setAmount(@jakarta.annotation.Nonnull String amount) { this.amount = amount; } - public MarginAccountBorrowRepayRequest type(@jakarta.annotation.Nonnull String type) { + public MarginAccountBorrowRepayRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -167,11 +168,12 @@ public MarginAccountBorrowRepayRequest type(@jakarta.annotation.Nonnull String t */ @jakarta.annotation.Nonnull @NotNull - public String getType() { + @Valid + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull String type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } @@ -182,11 +184,12 @@ public MarginAccountBorrowRepayRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -298,7 +301,6 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); openapiRequiredFields.add("asset"); openapiRequiredFields.add("isIsolated"); - openapiRequiredFields.add("symbol"); openapiRequiredFields.add("amount"); openapiRequiredFields.add("type"); } @@ -339,14 +341,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("asset").toString())); } - if (!jsonObj.get("isIsolated").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `isIsolated` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("isIsolated").toString())); - } - if (!jsonObj.get("symbol").isJsonPrimitive()) { + // validate the required field `isIsolated` + IsIsolated.validateJsonElement(jsonObj.get("isIsolated")); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" @@ -360,13 +358,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("amount").toString())); } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } + // validate the required field `type` + OrderType.validateJsonElement(jsonObj.get("type")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountBorrowRepayResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountBorrowRepayResponse.java index 682795c56..a5a08c335 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountBorrowRepayResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountBorrowRepayResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountBorrowRepayResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountBorrowRepayResponse { public static final String SERIALIZED_NAME_TRAN_ID = "tranId"; @@ -50,7 +50,7 @@ public MarginAccountBorrowRepayResponse tranId(@jakarta.annotation.Nullable Long } /** - * Get tranId + * tran Id. * * @return tranId */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelAllOpenOrdersOnASymbolResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelAllOpenOrdersOnASymbolResponse.java index be4bd8567..c43a55a87 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelAllOpenOrdersOnASymbolResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelAllOpenOrdersOnASymbolResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountCancelAllOpenOrdersOnASymbolResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountCancelAllOpenOrdersOnASymbolResponse extends ArrayList { public MarginAccountCancelAllOpenOrdersOnASymbolResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelAllOpenOrdersOnASymbolResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelAllOpenOrdersOnASymbolResponseInner.java index fdcb2d595..d48c0eba9 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelAllOpenOrdersOnASymbolResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelAllOpenOrdersOnASymbolResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** MarginAccountCancelAllOpenOrdersOnASymbolResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountCancelAllOpenOrdersOnASymbolResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -185,7 +185,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -205,7 +205,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner isIsolated( } /** - * Get isIsolated + * if isolated margin * * @return isIsolated */ @@ -225,7 +225,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner origClientOrderId( } /** - * Get origClientOrderId + * orig Client Order Id. * * @return origClientOrderId */ @@ -245,7 +245,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner orderId( } /** - * Get orderId + * order Id. * * @return orderId */ @@ -265,7 +265,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner orderListId( } /** - * Get orderListId + * order List Id. * * @return orderListId */ @@ -285,7 +285,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner clientOrderId( } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ @@ -305,7 +305,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner price( } /** - * Get price + * price. * * @return price */ @@ -325,7 +325,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner origQty( } /** - * Get origQty + * orig Qty. * * @return origQty */ @@ -345,7 +345,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner executedQty( } /** - * Get executedQty + * executed Qty. * * @return executedQty */ @@ -365,7 +365,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner cummulativeQuoteQt } /** - * Get cummulativeQuoteQty + * cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -385,7 +385,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner status( } /** - * Get status + * status. * * @return status */ @@ -405,7 +405,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner timeInForce( } /** - * Get timeInForce + * time In Force. * * @return timeInForce */ @@ -425,7 +425,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner type( } /** - * Get type + * type. * * @return type */ @@ -445,7 +445,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner side( } /** - * Get side + * side. * * @return side */ @@ -465,7 +465,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner selfTradePreventio } /** - * Get selfTradePreventionMode + * self Trade Prevention Mode. * * @return selfTradePreventionMode */ @@ -486,7 +486,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner contingencyType( } /** - * Get contingencyType + * contingency Type. * * @return contingencyType */ @@ -506,7 +506,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner listStatusType( } /** - * Get listStatusType + * list Status Type. * * @return listStatusType */ @@ -526,7 +526,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner listOrderStatus( } /** - * Get listOrderStatus + * list Order Status. * * @return listOrderStatus */ @@ -546,7 +546,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner listClientOrderId( } /** - * Get listClientOrderId + * list Client Order Id. * * @return listClientOrderId */ @@ -566,7 +566,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner transactionTime( } /** - * Get transactionTime + * transaction Time. * * @return transactionTime */ @@ -597,7 +597,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner addOrdersItem( } /** - * Get orders + * orders list. * * @return orders */ @@ -636,7 +636,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInner addOrderReportsIte } /** - * Get orderReports + * order Reports list. * * @return orderReports */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.java index 2851f3ee4..07f9ac1d4 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -135,7 +135,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner s } /** - * Get symbol + * symbol. * * @return symbol */ @@ -155,7 +155,7 @@ public void setSymbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get origClientOrderId + * orig Client Order Id. * * @return origClientOrderId */ @@ -175,7 +175,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner o } /** - * Get orderId + * order Id. * * @return orderId */ @@ -195,7 +195,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner o } /** - * Get orderListId + * order List Id. * * @return orderListId */ @@ -215,7 +215,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner c } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ @@ -235,7 +235,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner p } /** - * Get price + * price. * * @return price */ @@ -255,7 +255,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner o } /** - * Get origQty + * orig Qty. * * @return origQty */ @@ -275,7 +275,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner e } /** - * Get executedQty + * executed Qty. * * @return executedQty */ @@ -295,7 +295,7 @@ public void setExecutedQty(@jakarta.annotation.Nullable String executedQty) { } /** - * Get cummulativeQuoteQty + * cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -315,7 +315,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner s } /** - * Get status + * status. * * @return status */ @@ -335,7 +335,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner t } /** - * Get timeInForce + * time In Force. * * @return timeInForce */ @@ -355,7 +355,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner t } /** - * Get type + * type. * * @return type */ @@ -375,7 +375,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner s } /** - * Get side + * side. * * @return side */ @@ -395,7 +395,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner s } /** - * Get stopPrice + * stop Price. * * @return stopPrice */ @@ -415,7 +415,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner i } /** - * Get icebergQty + * iceberg Qty. * * @return icebergQty */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner.java index 5532bb1ae..08509ca53 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -83,7 +83,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner orderId } /** - * Get orderId + * order Id. * * @return orderId */ @@ -103,7 +103,7 @@ public MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner clientO } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelOcoResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelOcoResponse.java index fa2222071..afd272a2b 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelOcoResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelOcoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** MarginAccountCancelOcoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountCancelOcoResponse { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; @@ -111,7 +111,7 @@ public MarginAccountCancelOcoResponse orderListId( } /** - * Get orderListId + * order List Id. * * @return orderListId */ @@ -131,7 +131,7 @@ public MarginAccountCancelOcoResponse contingencyType( } /** - * Get contingencyType + * contingency Type. * * @return contingencyType */ @@ -151,7 +151,7 @@ public MarginAccountCancelOcoResponse listStatusType( } /** - * Get listStatusType + * list Status Type. * * @return listStatusType */ @@ -171,7 +171,7 @@ public MarginAccountCancelOcoResponse listOrderStatus( } /** - * Get listOrderStatus + * list Order Status. * * @return listOrderStatus */ @@ -191,7 +191,7 @@ public MarginAccountCancelOcoResponse listClientOrderId( } /** - * Get listClientOrderId + * list Client Order Id. * * @return listClientOrderId */ @@ -211,7 +211,7 @@ public MarginAccountCancelOcoResponse transactionTime( } /** - * Get transactionTime + * transaction Time. * * @return transactionTime */ @@ -230,7 +230,7 @@ public MarginAccountCancelOcoResponse symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * symbol. * * @return symbol */ @@ -250,7 +250,7 @@ public MarginAccountCancelOcoResponse isIsolated( } /** - * Get isIsolated + * if isolated margin * * @return isIsolated */ @@ -280,7 +280,7 @@ public MarginAccountCancelOcoResponse addOrdersItem( } /** - * Get orders + * orders list. * * @return orders */ @@ -313,7 +313,7 @@ public MarginAccountCancelOcoResponse addOrderReportsItem( } /** - * Get orderReports + * order Reports. * * @return orderReports */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelOcoResponseOrderReportsInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelOcoResponseOrderReportsInner.java index 5168271c7..102a9a815 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelOcoResponseOrderReportsInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelOcoResponseOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountCancelOcoResponseOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountCancelOcoResponseOrderReportsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -136,7 +136,7 @@ public MarginAccountCancelOcoResponseOrderReportsInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -156,7 +156,7 @@ public MarginAccountCancelOcoResponseOrderReportsInner origClientOrderId( } /** - * Get origClientOrderId + * orig Client Order Id. * * @return origClientOrderId */ @@ -176,7 +176,7 @@ public MarginAccountCancelOcoResponseOrderReportsInner orderId( } /** - * Get orderId + * order Id. * * @return orderId */ @@ -196,7 +196,7 @@ public MarginAccountCancelOcoResponseOrderReportsInner orderListId( } /** - * Get orderListId + * order List Id. * * @return orderListId */ @@ -216,7 +216,7 @@ public MarginAccountCancelOcoResponseOrderReportsInner clientOrderId( } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ @@ -236,7 +236,7 @@ public MarginAccountCancelOcoResponseOrderReportsInner price( } /** - * Get price + * price. * * @return price */ @@ -256,7 +256,7 @@ public MarginAccountCancelOcoResponseOrderReportsInner origQty( } /** - * Get origQty + * orig Qty. * * @return origQty */ @@ -276,7 +276,7 @@ public MarginAccountCancelOcoResponseOrderReportsInner executedQty( } /** - * Get executedQty + * executed Qty. * * @return executedQty */ @@ -296,7 +296,7 @@ public MarginAccountCancelOcoResponseOrderReportsInner cummulativeQuoteQty( } /** - * Get cummulativeQuoteQty + * cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -316,7 +316,7 @@ public MarginAccountCancelOcoResponseOrderReportsInner status( } /** - * Get status + * status. * * @return status */ @@ -336,7 +336,7 @@ public MarginAccountCancelOcoResponseOrderReportsInner timeInForce( } /** - * Get timeInForce + * time In Force. * * @return timeInForce */ @@ -356,7 +356,7 @@ public MarginAccountCancelOcoResponseOrderReportsInner type( } /** - * Get type + * type. * * @return type */ @@ -376,7 +376,7 @@ public MarginAccountCancelOcoResponseOrderReportsInner side( } /** - * Get side + * side. * * @return side */ @@ -396,7 +396,7 @@ public MarginAccountCancelOcoResponseOrderReportsInner stopPrice( } /** - * Get stopPrice + * stop Price. * * @return stopPrice */ @@ -416,7 +416,7 @@ public MarginAccountCancelOcoResponseOrderReportsInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self Trade Prevention Mode. * * @return selfTradePreventionMode */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelOcoResponseOrdersInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelOcoResponseOrdersInner.java index 725fdf193..e9d27aab1 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelOcoResponseOrdersInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelOcoResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountCancelOcoResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountCancelOcoResponseOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public MarginAccountCancelOcoResponseOrdersInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -83,7 +83,7 @@ public MarginAccountCancelOcoResponseOrdersInner orderId( } /** - * Get orderId + * order Id. * * @return orderId */ @@ -103,7 +103,7 @@ public MarginAccountCancelOcoResponseOrdersInner clientOrderId( } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelOrderResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelOrderResponse.java index fdb3fa538..5dd606fec 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelOrderResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountCancelOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountCancelOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountCancelOrderResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -42,12 +42,6 @@ public class MarginAccountCancelOrderResponse { @jakarta.annotation.Nullable private String symbol; - public static final String SERIALIZED_NAME_IS_ISOLATED = "isIsolated"; - - @SerializedName(SERIALIZED_NAME_IS_ISOLATED) - @jakarta.annotation.Nullable - private Boolean isIsolated; - public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @SerializedName(SERIALIZED_NAME_ORDER_ID) @@ -114,6 +108,12 @@ public class MarginAccountCancelOrderResponse { @jakarta.annotation.Nullable private String side; + public static final String SERIALIZED_NAME_IS_ISOLATED = "isIsolated"; + + @SerializedName(SERIALIZED_NAME_IS_ISOLATED) + @jakarta.annotation.Nullable + private Boolean isIsolated; + public MarginAccountCancelOrderResponse() {} public MarginAccountCancelOrderResponse symbol(@jakarta.annotation.Nullable String symbol) { @@ -122,7 +122,7 @@ public MarginAccountCancelOrderResponse symbol(@jakarta.annotation.Nullable Stri } /** - * Get symbol + * symbol. * * @return symbol */ @@ -135,33 +135,13 @@ public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } - public MarginAccountCancelOrderResponse isIsolated( - @jakarta.annotation.Nullable Boolean isIsolated) { - this.isIsolated = isIsolated; - return this; - } - - /** - * Get isIsolated - * - * @return isIsolated - */ - @jakarta.annotation.Nullable - public Boolean getIsIsolated() { - return isIsolated; - } - - public void setIsIsolated(@jakarta.annotation.Nullable Boolean isIsolated) { - this.isIsolated = isIsolated; - } - public MarginAccountCancelOrderResponse orderId(@jakarta.annotation.Nullable String orderId) { this.orderId = orderId; return this; } /** - * Get orderId + * order Id. * * @return orderId */ @@ -181,7 +161,7 @@ public MarginAccountCancelOrderResponse origClientOrderId( } /** - * Get origClientOrderId + * orig Client Order Id. * * @return origClientOrderId */ @@ -201,7 +181,7 @@ public MarginAccountCancelOrderResponse clientOrderId( } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ @@ -220,7 +200,7 @@ public MarginAccountCancelOrderResponse price(@jakarta.annotation.Nullable Strin } /** - * Get price + * price. * * @return price */ @@ -239,7 +219,7 @@ public MarginAccountCancelOrderResponse origQty(@jakarta.annotation.Nullable Str } /** - * Get origQty + * orig Qty. * * @return origQty */ @@ -259,7 +239,7 @@ public MarginAccountCancelOrderResponse executedQty( } /** - * Get executedQty + * executed Qty. * * @return executedQty */ @@ -279,7 +259,7 @@ public MarginAccountCancelOrderResponse cummulativeQuoteQty( } /** - * Get cummulativeQuoteQty + * cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -298,7 +278,7 @@ public MarginAccountCancelOrderResponse status(@jakarta.annotation.Nullable Stri } /** - * Get status + * status. * * @return status */ @@ -318,7 +298,7 @@ public MarginAccountCancelOrderResponse timeInForce( } /** - * Get timeInForce + * time In Force. * * @return timeInForce */ @@ -337,7 +317,7 @@ public MarginAccountCancelOrderResponse type(@jakarta.annotation.Nullable String } /** - * Get type + * type. * * @return type */ @@ -356,7 +336,7 @@ public MarginAccountCancelOrderResponse side(@jakarta.annotation.Nullable String } /** - * Get side + * side. * * @return side */ @@ -369,6 +349,26 @@ public void setSide(@jakarta.annotation.Nullable String side) { this.side = side; } + public MarginAccountCancelOrderResponse isIsolated( + @jakarta.annotation.Nullable Boolean isIsolated) { + this.isIsolated = isIsolated; + return this; + } + + /** + * if isolated margin + * + * @return isIsolated + */ + @jakarta.annotation.Nullable + public Boolean getIsIsolated() { + return isIsolated; + } + + public void setIsIsolated(@jakarta.annotation.Nullable Boolean isIsolated) { + this.isIsolated = isIsolated; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -380,7 +380,6 @@ public boolean equals(Object o) { MarginAccountCancelOrderResponse marginAccountCancelOrderResponse = (MarginAccountCancelOrderResponse) o; return Objects.equals(this.symbol, marginAccountCancelOrderResponse.symbol) - && Objects.equals(this.isIsolated, marginAccountCancelOrderResponse.isIsolated) && Objects.equals(this.orderId, marginAccountCancelOrderResponse.orderId) && Objects.equals( this.origClientOrderId, marginAccountCancelOrderResponse.origClientOrderId) @@ -395,14 +394,14 @@ public boolean equals(Object o) { && Objects.equals(this.status, marginAccountCancelOrderResponse.status) && Objects.equals(this.timeInForce, marginAccountCancelOrderResponse.timeInForce) && Objects.equals(this.type, marginAccountCancelOrderResponse.type) - && Objects.equals(this.side, marginAccountCancelOrderResponse.side); + && Objects.equals(this.side, marginAccountCancelOrderResponse.side) + && Objects.equals(this.isIsolated, marginAccountCancelOrderResponse.isIsolated); } @Override public int hashCode() { return Objects.hash( symbol, - isIsolated, orderId, origClientOrderId, clientOrderId, @@ -413,7 +412,8 @@ public int hashCode() { status, timeInForce, type, - side); + side, + isIsolated); } @Override @@ -421,7 +421,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MarginAccountCancelOrderResponse {\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); - sb.append(" isIsolated: ").append(toIndentedString(isIsolated)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); sb.append(" origClientOrderId: ").append(toIndentedString(origClientOrderId)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); @@ -435,6 +434,7 @@ public String toString() { sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); + sb.append(" isIsolated: ").append(toIndentedString(isIsolated)).append("\n"); sb.append("}"); return sb.toString(); } @@ -446,10 +446,6 @@ public String toUrlQueryString() { String symbolValueAsString = ""; symbolValueAsString = symbolValue.toString(); sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); - Object isIsolatedValue = getIsIsolated(); - String isIsolatedValueAsString = ""; - isIsolatedValueAsString = isIsolatedValue.toString(); - sb.append("isIsolated=").append(urlEncode(isIsolatedValueAsString)).append(""); Object orderIdValue = getOrderId(); String orderIdValueAsString = ""; orderIdValueAsString = orderIdValue.toString(); @@ -498,6 +494,10 @@ public String toUrlQueryString() { String sideValueAsString = ""; sideValueAsString = sideValue.toString(); sb.append("side=").append(urlEncode(sideValueAsString)).append(""); + Object isIsolatedValue = getIsIsolated(); + String isIsolatedValueAsString = ""; + isIsolatedValueAsString = isIsolatedValue.toString(); + sb.append("isIsolated=").append(urlEncode(isIsolatedValueAsString)).append(""); return sb.toString(); } @@ -527,7 +527,6 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("symbol"); - openapiFields.add("isIsolated"); openapiFields.add("orderId"); openapiFields.add("origClientOrderId"); openapiFields.add("clientOrderId"); @@ -539,6 +538,7 @@ private String toIndentedString(Object o) { openapiFields.add("timeInForce"); openapiFields.add("type"); openapiFields.add("side"); + openapiFields.add("isIsolated"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOcoRequest.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOcoRequest.java index 0aa9e6bdc..c4dbf1f18 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOcoRequest.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOcoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** MarginAccountNewOcoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOcoRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -47,7 +47,7 @@ public class MarginAccountNewOcoRequest { @SerializedName(SERIALIZED_NAME_IS_ISOLATED) @jakarta.annotation.Nullable - private String isIsolated; + private IsIsolated isIsolated = IsIsolated.FALSE; public static final String SERIALIZED_NAME_LIST_CLIENT_ORDER_ID = "listClientOrderId"; @@ -113,7 +113,7 @@ public class MarginAccountNewOcoRequest { @SerializedName(SERIALIZED_NAME_STOP_LIMIT_TIME_IN_FORCE) @jakarta.annotation.Nullable - private String stopLimitTimeInForce; + private StopLimitTimeInForce stopLimitTimeInForce; public static final String SERIALIZED_NAME_NEW_ORDER_RESP_TYPE = "newOrderRespType"; @@ -125,20 +125,20 @@ public class MarginAccountNewOcoRequest { @SerializedName(SERIALIZED_NAME_SIDE_EFFECT_TYPE) @jakarta.annotation.Nullable - private String sideEffectType; + private SideEffectType sideEffectType; public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = "selfTradePreventionMode"; @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) @jakarta.annotation.Nullable - private String selfTradePreventionMode; + private SelfTradePreventionMode selfTradePreventionMode; public static final String SERIALIZED_NAME_AUTO_REPAY_AT_CANCEL = "autoRepayAtCancel"; @SerializedName(SERIALIZED_NAME_AUTO_REPAY_AT_CANCEL) @jakarta.annotation.Nullable - private Boolean autoRepayAtCancel; + private Boolean autoRepayAtCancel = true; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -168,7 +168,8 @@ public void setSymbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; } - public MarginAccountNewOcoRequest isIsolated(@jakarta.annotation.Nullable String isIsolated) { + public MarginAccountNewOcoRequest isIsolated( + @jakarta.annotation.Nullable IsIsolated isIsolated) { this.isIsolated = isIsolated; return this; } @@ -179,11 +180,12 @@ public MarginAccountNewOcoRequest isIsolated(@jakarta.annotation.Nullable String * @return isIsolated */ @jakarta.annotation.Nullable - public String getIsIsolated() { + @Valid + public IsIsolated getIsIsolated() { return isIsolated; } - public void setIsIsolated(@jakarta.annotation.Nullable String isIsolated) { + public void setIsIsolated(@jakarta.annotation.Nullable IsIsolated isIsolated) { this.isIsolated = isIsolated; } @@ -194,7 +196,7 @@ public MarginAccountNewOcoRequest listClientOrderId( } /** - * Get listClientOrderId + * A unique Id for the entire orderList * * @return listClientOrderId */ @@ -256,7 +258,7 @@ public MarginAccountNewOcoRequest limitClientOrderId( } /** - * Get limitClientOrderId + * A unique Id for the limit order * * @return limitClientOrderId */ @@ -318,7 +320,7 @@ public MarginAccountNewOcoRequest stopClientOrderId( } /** - * Get stopClientOrderId + * A unique Id for the stop loss/stop loss limit leg * * @return stopClientOrderId */ @@ -359,7 +361,7 @@ public MarginAccountNewOcoRequest stopLimitPrice( } /** - * Get stopLimitPrice + * If provided, `stopLimitTimeInForce` is required. * * @return stopLimitPrice */ @@ -395,7 +397,7 @@ public void setStopIcebergQty(@jakarta.annotation.Nullable Double stopIcebergQty } public MarginAccountNewOcoRequest stopLimitTimeInForce( - @jakarta.annotation.Nullable String stopLimitTimeInForce) { + @jakarta.annotation.Nullable StopLimitTimeInForce stopLimitTimeInForce) { this.stopLimitTimeInForce = stopLimitTimeInForce; return this; } @@ -406,11 +408,13 @@ public MarginAccountNewOcoRequest stopLimitTimeInForce( * @return stopLimitTimeInForce */ @jakarta.annotation.Nullable - public String getStopLimitTimeInForce() { + @Valid + public StopLimitTimeInForce getStopLimitTimeInForce() { return stopLimitTimeInForce; } - public void setStopLimitTimeInForce(@jakarta.annotation.Nullable String stopLimitTimeInForce) { + public void setStopLimitTimeInForce( + @jakarta.annotation.Nullable StopLimitTimeInForce stopLimitTimeInForce) { this.stopLimitTimeInForce = stopLimitTimeInForce; } @@ -437,7 +441,7 @@ public void setNewOrderRespType( } public MarginAccountNewOcoRequest sideEffectType( - @jakarta.annotation.Nullable String sideEffectType) { + @jakarta.annotation.Nullable SideEffectType sideEffectType) { this.sideEffectType = sideEffectType; return this; } @@ -448,16 +452,17 @@ public MarginAccountNewOcoRequest sideEffectType( * @return sideEffectType */ @jakarta.annotation.Nullable - public String getSideEffectType() { + @Valid + public SideEffectType getSideEffectType() { return sideEffectType; } - public void setSideEffectType(@jakarta.annotation.Nullable String sideEffectType) { + public void setSideEffectType(@jakarta.annotation.Nullable SideEffectType sideEffectType) { this.sideEffectType = sideEffectType; } public MarginAccountNewOcoRequest selfTradePreventionMode( - @jakarta.annotation.Nullable String selfTradePreventionMode) { + @jakarta.annotation.Nullable SelfTradePreventionMode selfTradePreventionMode) { this.selfTradePreventionMode = selfTradePreventionMode; return this; } @@ -468,12 +473,13 @@ public MarginAccountNewOcoRequest selfTradePreventionMode( * @return selfTradePreventionMode */ @jakarta.annotation.Nullable - public String getSelfTradePreventionMode() { + @Valid + public SelfTradePreventionMode getSelfTradePreventionMode() { return selfTradePreventionMode; } public void setSelfTradePreventionMode( - @jakarta.annotation.Nullable String selfTradePreventionMode) { + @jakarta.annotation.Nullable SelfTradePreventionMode selfTradePreventionMode) { this.selfTradePreventionMode = selfTradePreventionMode; } @@ -484,7 +490,8 @@ public MarginAccountNewOcoRequest autoRepayAtCancel( } /** - * Get autoRepayAtCancel + * Only when MARGIN_BUY or AUTO_BORROW_REPAY order takes effect, true means that the debt + * generated by the order needs to be repay after the order is cancelled. * * @return autoRepayAtCancel */ @@ -503,11 +510,12 @@ public MarginAccountNewOcoRequest recvWindow(@jakarta.annotation.Nullable Long r } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -786,13 +794,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("symbol").toString())); } - if ((jsonObj.get("isIsolated") != null && !jsonObj.get("isIsolated").isJsonNull()) - && !jsonObj.get("isIsolated").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `isIsolated` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("isIsolated").toString())); + // validate the optional field `isIsolated` + if (jsonObj.get("isIsolated") != null && !jsonObj.get("isIsolated").isJsonNull()) { + IsIsolated.validateJsonElement(jsonObj.get("isIsolated")); } if ((jsonObj.get("listClientOrderId") != null && !jsonObj.get("listClientOrderId").isJsonNull()) @@ -823,36 +827,24 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " JSON string but got `%s`", jsonObj.get("stopClientOrderId").toString())); } - if ((jsonObj.get("stopLimitTimeInForce") != null - && !jsonObj.get("stopLimitTimeInForce").isJsonNull()) - && !jsonObj.get("stopLimitTimeInForce").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `stopLimitTimeInForce` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("stopLimitTimeInForce").toString())); + // validate the optional field `stopLimitTimeInForce` + if (jsonObj.get("stopLimitTimeInForce") != null + && !jsonObj.get("stopLimitTimeInForce").isJsonNull()) { + StopLimitTimeInForce.validateJsonElement(jsonObj.get("stopLimitTimeInForce")); } // validate the optional field `newOrderRespType` if (jsonObj.get("newOrderRespType") != null && !jsonObj.get("newOrderRespType").isJsonNull()) { NewOrderRespType.validateJsonElement(jsonObj.get("newOrderRespType")); } - if ((jsonObj.get("sideEffectType") != null && !jsonObj.get("sideEffectType").isJsonNull()) - && !jsonObj.get("sideEffectType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `sideEffectType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("sideEffectType").toString())); + // validate the optional field `sideEffectType` + if (jsonObj.get("sideEffectType") != null && !jsonObj.get("sideEffectType").isJsonNull()) { + SideEffectType.validateJsonElement(jsonObj.get("sideEffectType")); } - if ((jsonObj.get("selfTradePreventionMode") != null - && !jsonObj.get("selfTradePreventionMode").isJsonNull()) - && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `selfTradePreventionMode` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("selfTradePreventionMode").toString())); + // validate the optional field `selfTradePreventionMode` + if (jsonObj.get("selfTradePreventionMode") != null + && !jsonObj.get("selfTradePreventionMode").isJsonNull()) { + SelfTradePreventionMode.validateJsonElement(jsonObj.get("selfTradePreventionMode")); } } diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOcoResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOcoResponse.java index 23a72a582..b8405731c 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOcoResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOcoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** MarginAccountNewOcoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOcoResponse { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; @@ -122,7 +122,7 @@ public MarginAccountNewOcoResponse orderListId(@jakarta.annotation.Nullable Long } /** - * Get orderListId + * order List Id. * * @return orderListId */ @@ -142,7 +142,7 @@ public MarginAccountNewOcoResponse contingencyType( } /** - * Get contingencyType + * contingency Type. * * @return contingencyType */ @@ -162,7 +162,7 @@ public MarginAccountNewOcoResponse listStatusType( } /** - * Get listStatusType + * list Status Type. * * @return listStatusType */ @@ -182,7 +182,7 @@ public MarginAccountNewOcoResponse listOrderStatus( } /** - * Get listOrderStatus + * list Order Status. * * @return listOrderStatus */ @@ -202,7 +202,7 @@ public MarginAccountNewOcoResponse listClientOrderId( } /** - * Get listClientOrderId + * list Client Order Id. * * @return listClientOrderId */ @@ -222,7 +222,7 @@ public MarginAccountNewOcoResponse transactionTime( } /** - * Get transactionTime + * transaction Time. * * @return transactionTime */ @@ -241,7 +241,7 @@ public MarginAccountNewOcoResponse symbol(@jakarta.annotation.Nullable String sy } /** - * Get symbol + * symbol. * * @return symbol */ @@ -261,7 +261,7 @@ public MarginAccountNewOcoResponse marginBuyBorrowAmount( } /** - * Get marginBuyBorrowAmount + * will not return if no margin trade happens * * @return marginBuyBorrowAmount */ @@ -282,7 +282,7 @@ public MarginAccountNewOcoResponse marginBuyBorrowAsset( } /** - * Get marginBuyBorrowAsset + * will not return if no margin trade happens * * @return marginBuyBorrowAsset */ @@ -301,7 +301,7 @@ public MarginAccountNewOcoResponse isIsolated(@jakarta.annotation.Nullable Boole } /** - * Get isIsolated + * if isolated margin * * @return isIsolated */ @@ -331,7 +331,7 @@ public MarginAccountNewOcoResponse addOrdersItem( } /** - * Get orders + * orders list. * * @return orders */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOcoResponseOrderReportsInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOcoResponseOrderReportsInner.java index 8df9f0cf9..f31543dcb 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOcoResponseOrderReportsInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOcoResponseOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountNewOcoResponseOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOcoResponseOrderReportsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -136,7 +136,7 @@ public MarginAccountNewOcoResponseOrderReportsInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -156,7 +156,7 @@ public MarginAccountNewOcoResponseOrderReportsInner orderId( } /** - * Get orderId + * order Id. * * @return orderId */ @@ -176,7 +176,7 @@ public MarginAccountNewOcoResponseOrderReportsInner orderListId( } /** - * Get orderListId + * order List Id. * * @return orderListId */ @@ -196,7 +196,7 @@ public MarginAccountNewOcoResponseOrderReportsInner clientOrderId( } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ @@ -216,7 +216,7 @@ public MarginAccountNewOcoResponseOrderReportsInner transactTime( } /** - * Get transactTime + * transact Time. * * @return transactTime */ @@ -236,7 +236,7 @@ public MarginAccountNewOcoResponseOrderReportsInner price( } /** - * Get price + * price. * * @return price */ @@ -256,7 +256,7 @@ public MarginAccountNewOcoResponseOrderReportsInner origQty( } /** - * Get origQty + * orig Qty. * * @return origQty */ @@ -276,7 +276,7 @@ public MarginAccountNewOcoResponseOrderReportsInner executedQty( } /** - * Get executedQty + * executed Qty. * * @return executedQty */ @@ -296,7 +296,7 @@ public MarginAccountNewOcoResponseOrderReportsInner cummulativeQuoteQty( } /** - * Get cummulativeQuoteQty + * cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -316,7 +316,7 @@ public MarginAccountNewOcoResponseOrderReportsInner status( } /** - * Get status + * status. * * @return status */ @@ -336,7 +336,7 @@ public MarginAccountNewOcoResponseOrderReportsInner timeInForce( } /** - * Get timeInForce + * time In Force. * * @return timeInForce */ @@ -356,7 +356,7 @@ public MarginAccountNewOcoResponseOrderReportsInner type( } /** - * Get type + * type. * * @return type */ @@ -376,7 +376,7 @@ public MarginAccountNewOcoResponseOrderReportsInner side( } /** - * Get side + * side. * * @return side */ @@ -396,7 +396,7 @@ public MarginAccountNewOcoResponseOrderReportsInner stopPrice( } /** - * Get stopPrice + * stop Price. * * @return stopPrice */ @@ -416,7 +416,7 @@ public MarginAccountNewOcoResponseOrderReportsInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self Trade Prevention Mode. * * @return selfTradePreventionMode */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOcoResponseOrdersInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOcoResponseOrdersInner.java index 1c0fae119..764a86826 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOcoResponseOrdersInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOcoResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountNewOcoResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOcoResponseOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public MarginAccountNewOcoResponseOrdersInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -83,7 +83,7 @@ public MarginAccountNewOcoResponseOrdersInner orderId( } /** - * Get orderId + * order Id. * * @return orderId */ @@ -103,7 +103,7 @@ public MarginAccountNewOcoResponseOrdersInner clientOrderId( } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOrderRequest.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOrderRequest.java index 58111d7e6..f1773eead 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOrderRequest.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** MarginAccountNewOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOrderRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -47,7 +47,7 @@ public class MarginAccountNewOrderRequest { @SerializedName(SERIALIZED_NAME_IS_ISOLATED) @jakarta.annotation.Nullable - private String isIsolated; + private IsIsolated isIsolated = IsIsolated.FALSE; public static final String SERIALIZED_NAME_SIDE = "side"; @@ -59,7 +59,7 @@ public class MarginAccountNewOrderRequest { @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private String type; + private OrderType type; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @@ -107,7 +107,7 @@ public class MarginAccountNewOrderRequest { @SerializedName(SERIALIZED_NAME_SIDE_EFFECT_TYPE) @jakarta.annotation.Nullable - private String sideEffectType; + private SideEffectType sideEffectType; public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; @@ -120,13 +120,19 @@ public class MarginAccountNewOrderRequest { @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) @jakarta.annotation.Nullable - private String selfTradePreventionMode; + private SelfTradePreventionMode selfTradePreventionMode; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; public static final String SERIALIZED_NAME_AUTO_REPAY_AT_CANCEL = "autoRepayAtCancel"; @SerializedName(SERIALIZED_NAME_AUTO_REPAY_AT_CANCEL) @jakarta.annotation.Nullable - private Boolean autoRepayAtCancel; + private Boolean autoRepayAtCancel = true; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -156,7 +162,8 @@ public void setSymbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; } - public MarginAccountNewOrderRequest isIsolated(@jakarta.annotation.Nullable String isIsolated) { + public MarginAccountNewOrderRequest isIsolated( + @jakarta.annotation.Nullable IsIsolated isIsolated) { this.isIsolated = isIsolated; return this; } @@ -167,11 +174,12 @@ public MarginAccountNewOrderRequest isIsolated(@jakarta.annotation.Nullable Stri * @return isIsolated */ @jakarta.annotation.Nullable - public String getIsIsolated() { + @Valid + public IsIsolated getIsIsolated() { return isIsolated; } - public void setIsIsolated(@jakarta.annotation.Nullable String isIsolated) { + public void setIsIsolated(@jakarta.annotation.Nullable IsIsolated isIsolated) { this.isIsolated = isIsolated; } @@ -196,7 +204,7 @@ public void setSide(@jakarta.annotation.Nonnull Side side) { this.side = side; } - public MarginAccountNewOrderRequest type(@jakarta.annotation.Nonnull String type) { + public MarginAccountNewOrderRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -208,11 +216,12 @@ public MarginAccountNewOrderRequest type(@jakarta.annotation.Nonnull String type */ @jakarta.annotation.Nonnull @NotNull - public String getType() { + @Valid + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull String type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } @@ -283,7 +292,8 @@ public MarginAccountNewOrderRequest stopPrice(@jakarta.annotation.Nullable Doubl } /** - * Get stopPrice + * Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and + * `TAKE_PROFIT_LIMIT` orders. * * @return stopPrice */ @@ -304,7 +314,7 @@ public MarginAccountNewOrderRequest newClientOrderId( } /** - * Get newClientOrderId + * A unique id among open orders. Automatically generated if not sent. * * @return newClientOrderId */ @@ -323,7 +333,8 @@ public MarginAccountNewOrderRequest icebergQty(@jakarta.annotation.Nullable Doub } /** - * Get icebergQty + * Used with `LIMIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` + * to create an iceberg order. * * @return icebergQty */ @@ -360,7 +371,7 @@ public void setNewOrderRespType( } public MarginAccountNewOrderRequest sideEffectType( - @jakarta.annotation.Nullable String sideEffectType) { + @jakarta.annotation.Nullable SideEffectType sideEffectType) { this.sideEffectType = sideEffectType; return this; } @@ -371,11 +382,12 @@ public MarginAccountNewOrderRequest sideEffectType( * @return sideEffectType */ @jakarta.annotation.Nullable - public String getSideEffectType() { + @Valid + public SideEffectType getSideEffectType() { return sideEffectType; } - public void setSideEffectType(@jakarta.annotation.Nullable String sideEffectType) { + public void setSideEffectType(@jakarta.annotation.Nullable SideEffectType sideEffectType) { this.sideEffectType = sideEffectType; } @@ -401,7 +413,7 @@ public void setTimeInForce(@jakarta.annotation.Nullable TimeInForce timeInForce) } public MarginAccountNewOrderRequest selfTradePreventionMode( - @jakarta.annotation.Nullable String selfTradePreventionMode) { + @jakarta.annotation.Nullable SelfTradePreventionMode selfTradePreventionMode) { this.selfTradePreventionMode = selfTradePreventionMode; return this; } @@ -412,15 +424,37 @@ public MarginAccountNewOrderRequest selfTradePreventionMode( * @return selfTradePreventionMode */ @jakarta.annotation.Nullable - public String getSelfTradePreventionMode() { + @Valid + public SelfTradePreventionMode getSelfTradePreventionMode() { return selfTradePreventionMode; } public void setSelfTradePreventionMode( - @jakarta.annotation.Nullable String selfTradePreventionMode) { + @jakarta.annotation.Nullable SelfTradePreventionMode selfTradePreventionMode) { this.selfTradePreventionMode = selfTradePreventionMode; } + public MarginAccountNewOrderRequest trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and + * `TAKE_PROFIT_LIMIT` orders. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + public MarginAccountNewOrderRequest autoRepayAtCancel( @jakarta.annotation.Nullable Boolean autoRepayAtCancel) { this.autoRepayAtCancel = autoRepayAtCancel; @@ -428,7 +462,8 @@ public MarginAccountNewOrderRequest autoRepayAtCancel( } /** - * Get autoRepayAtCancel + * Only when MARGIN_BUY or AUTO_BORROW_REPAY order takes effect, true means that the debt + * generated by the order needs to be repaid after the order is cancelled. * * @return autoRepayAtCancel */ @@ -447,11 +482,12 @@ public MarginAccountNewOrderRequest recvWindow(@jakarta.annotation.Nullable Long } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -488,6 +524,7 @@ public boolean equals(Object o) { && Objects.equals( this.selfTradePreventionMode, marginAccountNewOrderRequest.selfTradePreventionMode) + && Objects.equals(this.trailingDelta, marginAccountNewOrderRequest.trailingDelta) && Objects.equals( this.autoRepayAtCancel, marginAccountNewOrderRequest.autoRepayAtCancel) && Objects.equals(this.recvWindow, marginAccountNewOrderRequest.recvWindow); @@ -510,6 +547,7 @@ public int hashCode() { sideEffectType, timeInForce, selfTradePreventionMode, + trailingDelta, autoRepayAtCancel, recvWindow); } @@ -534,6 +572,7 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); sb.append(" autoRepayAtCancel: ").append(toIndentedString(autoRepayAtCancel)).append("\n"); sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); sb.append("}"); @@ -601,6 +640,10 @@ public String toUrlQueryString() { sb.append("selfTradePreventionMode=") .append(urlEncode(selfTradePreventionModeValueAsString)) .append(""); + Object trailingDeltaValue = getTrailingDelta(); + String trailingDeltaValueAsString = ""; + trailingDeltaValueAsString = trailingDeltaValue.toString(); + sb.append("trailingDelta=").append(urlEncode(trailingDeltaValueAsString)).append(""); Object autoRepayAtCancelValue = getAutoRepayAtCancel(); String autoRepayAtCancelValueAsString = ""; autoRepayAtCancelValueAsString = autoRepayAtCancelValue.toString(); @@ -653,6 +696,7 @@ private String toIndentedString(Object o) { openapiFields.add("sideEffectType"); openapiFields.add("timeInForce"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("trailingDelta"); openapiFields.add("autoRepayAtCancel"); openapiFields.add("recvWindow"); @@ -699,23 +743,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("symbol").toString())); } - if ((jsonObj.get("isIsolated") != null && !jsonObj.get("isIsolated").isJsonNull()) - && !jsonObj.get("isIsolated").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `isIsolated` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("isIsolated").toString())); + // validate the optional field `isIsolated` + if (jsonObj.get("isIsolated") != null && !jsonObj.get("isIsolated").isJsonNull()) { + IsIsolated.validateJsonElement(jsonObj.get("isIsolated")); } // validate the required field `side` Side.validateJsonElement(jsonObj.get("side")); - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } + // validate the required field `type` + OrderType.validateJsonElement(jsonObj.get("type")); if ((jsonObj.get("newClientOrderId") != null && !jsonObj.get("newClientOrderId").isJsonNull()) && !jsonObj.get("newClientOrderId").isJsonPrimitive()) { @@ -730,26 +765,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti && !jsonObj.get("newOrderRespType").isJsonNull()) { NewOrderRespType.validateJsonElement(jsonObj.get("newOrderRespType")); } - if ((jsonObj.get("sideEffectType") != null && !jsonObj.get("sideEffectType").isJsonNull()) - && !jsonObj.get("sideEffectType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `sideEffectType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("sideEffectType").toString())); + // validate the optional field `sideEffectType` + if (jsonObj.get("sideEffectType") != null && !jsonObj.get("sideEffectType").isJsonNull()) { + SideEffectType.validateJsonElement(jsonObj.get("sideEffectType")); } // validate the optional field `timeInForce` if (jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) { TimeInForce.validateJsonElement(jsonObj.get("timeInForce")); } - if ((jsonObj.get("selfTradePreventionMode") != null - && !jsonObj.get("selfTradePreventionMode").isJsonNull()) - && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `selfTradePreventionMode` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("selfTradePreventionMode").toString())); + // validate the optional field `selfTradePreventionMode` + if (jsonObj.get("selfTradePreventionMode") != null + && !jsonObj.get("selfTradePreventionMode").isJsonNull()) { + SelfTradePreventionMode.validateJsonElement(jsonObj.get("selfTradePreventionMode")); } } diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOrderResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOrderResponse.java index b1faac6b8..0d40707cc 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOrderResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** MarginAccountNewOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOrderResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -153,7 +153,7 @@ public MarginAccountNewOrderResponse symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * symbol. * * @return symbol */ @@ -172,7 +172,7 @@ public MarginAccountNewOrderResponse orderId(@jakarta.annotation.Nullable Long o } /** - * Get orderId + * order Id. * * @return orderId */ @@ -192,7 +192,7 @@ public MarginAccountNewOrderResponse clientOrderId( } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ @@ -212,7 +212,7 @@ public MarginAccountNewOrderResponse isIsolated( } /** - * Get isIsolated + * if isolated margin * * @return isIsolated */ @@ -232,7 +232,7 @@ public MarginAccountNewOrderResponse transactTime( } /** - * Get transactTime + * transact Time. * * @return transactTime */ @@ -251,7 +251,7 @@ public MarginAccountNewOrderResponse price(@jakarta.annotation.Nullable String p } /** - * Get price + * price. * * @return price */ @@ -270,7 +270,7 @@ public MarginAccountNewOrderResponse origQty(@jakarta.annotation.Nullable String } /** - * Get origQty + * orig Qty. * * @return origQty */ @@ -290,7 +290,7 @@ public MarginAccountNewOrderResponse executedQty( } /** - * Get executedQty + * executed Qty. * * @return executedQty */ @@ -310,7 +310,7 @@ public MarginAccountNewOrderResponse cummulativeQuoteQty( } /** - * Get cummulativeQuoteQty + * cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -329,7 +329,7 @@ public MarginAccountNewOrderResponse status(@jakarta.annotation.Nullable String } /** - * Get status + * status. * * @return status */ @@ -349,7 +349,7 @@ public MarginAccountNewOrderResponse timeInForce( } /** - * Get timeInForce + * time In Force. * * @return timeInForce */ @@ -368,7 +368,7 @@ public MarginAccountNewOrderResponse type(@jakarta.annotation.Nullable String ty } /** - * Get type + * type. * * @return type */ @@ -387,7 +387,7 @@ public MarginAccountNewOrderResponse side(@jakarta.annotation.Nullable String si } /** - * Get side + * side. * * @return side */ @@ -407,7 +407,7 @@ public MarginAccountNewOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self Trade Prevention Mode. * * @return selfTradePreventionMode */ @@ -428,7 +428,7 @@ public MarginAccountNewOrderResponse marginBuyBorrowAmount( } /** - * Get marginBuyBorrowAmount + * margin Buy Borrow Amount. * * @return marginBuyBorrowAmount */ @@ -448,7 +448,7 @@ public MarginAccountNewOrderResponse marginBuyBorrowAsset( } /** - * Get marginBuyBorrowAsset + * margin Buy Borrow Asset. * * @return marginBuyBorrowAsset */ @@ -478,7 +478,7 @@ public MarginAccountNewOrderResponse addFillsItem( } /** - * Get fills + * fills list. * * @return fills */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOrderResponseFillsInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOrderResponseFillsInner.java index cf92bfc0b..c4df59f27 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOrderResponseFillsInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOrderResponseFillsInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountNewOrderResponseFillsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOrderResponseFillsInner { public static final String SERIALIZED_NAME_PRICE = "price"; @@ -75,7 +75,7 @@ public MarginAccountNewOrderResponseFillsInner price( } /** - * Get price + * price. * * @return price */ @@ -94,7 +94,7 @@ public MarginAccountNewOrderResponseFillsInner qty(@jakarta.annotation.Nullable } /** - * Get qty + * qty. * * @return qty */ @@ -114,7 +114,7 @@ public MarginAccountNewOrderResponseFillsInner commission( } /** - * Get commission + * commission. * * @return commission */ @@ -134,7 +134,7 @@ public MarginAccountNewOrderResponseFillsInner commissionAsset( } /** - * Get commissionAsset + * commission Asset. * * @return commissionAsset */ @@ -154,7 +154,7 @@ public MarginAccountNewOrderResponseFillsInner tradeId( } /** - * Get tradeId + * trade Id. * * @return tradeId */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtoRequest.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtoRequest.java index 43bbcdb11..11f4251c4 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtoRequest.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** MarginAccountNewOtoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOtoRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -47,7 +47,7 @@ public class MarginAccountNewOtoRequest { @SerializedName(SERIALIZED_NAME_IS_ISOLATED) @jakarta.annotation.Nullable - private String isIsolated; + private IsIsolated isIsolated = IsIsolated.FALSE; public static final String SERIALIZED_NAME_LIST_CLIENT_ORDER_ID = "listClientOrderId"; @@ -65,32 +65,32 @@ public class MarginAccountNewOtoRequest { @SerializedName(SERIALIZED_NAME_SIDE_EFFECT_TYPE) @jakarta.annotation.Nullable - private String sideEffectType; + private SideEffectType sideEffectType; public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = "selfTradePreventionMode"; @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) @jakarta.annotation.Nullable - private String selfTradePreventionMode; + private SelfTradePreventionMode selfTradePreventionMode; public static final String SERIALIZED_NAME_AUTO_REPAY_AT_CANCEL = "autoRepayAtCancel"; @SerializedName(SERIALIZED_NAME_AUTO_REPAY_AT_CANCEL) @jakarta.annotation.Nullable - private Boolean autoRepayAtCancel; + private Boolean autoRepayAtCancel = true; public static final String SERIALIZED_NAME_WORKING_TYPE = "workingType"; @SerializedName(SERIALIZED_NAME_WORKING_TYPE) @jakarta.annotation.Nonnull - private String workingType; + private WorkingType workingType; public static final String SERIALIZED_NAME_WORKING_SIDE = "workingSide"; @SerializedName(SERIALIZED_NAME_WORKING_SIDE) @jakarta.annotation.Nonnull - private String workingSide; + private WorkingSide workingSide; public static final String SERIALIZED_NAME_WORKING_CLIENT_ORDER_ID = "workingClientOrderId"; @@ -120,19 +120,19 @@ public class MarginAccountNewOtoRequest { @SerializedName(SERIALIZED_NAME_WORKING_TIME_IN_FORCE) @jakarta.annotation.Nullable - private String workingTimeInForce; + private WorkingTimeInForce workingTimeInForce; public static final String SERIALIZED_NAME_PENDING_TYPE = "pendingType"; @SerializedName(SERIALIZED_NAME_PENDING_TYPE) @jakarta.annotation.Nonnull - private String pendingType; + private PendingType pendingType; public static final String SERIALIZED_NAME_PENDING_SIDE = "pendingSide"; @SerializedName(SERIALIZED_NAME_PENDING_SIDE) @jakarta.annotation.Nonnull - private String pendingSide; + private PendingSide pendingSide; public static final String SERIALIZED_NAME_PENDING_CLIENT_ORDER_ID = "pendingClientOrderId"; @@ -174,7 +174,7 @@ public class MarginAccountNewOtoRequest { @SerializedName(SERIALIZED_NAME_PENDING_TIME_IN_FORCE) @jakarta.annotation.Nullable - private String pendingTimeInForce; + private PendingTimeInForce pendingTimeInForce; public MarginAccountNewOtoRequest() {} @@ -198,7 +198,8 @@ public void setSymbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; } - public MarginAccountNewOtoRequest isIsolated(@jakarta.annotation.Nullable String isIsolated) { + public MarginAccountNewOtoRequest isIsolated( + @jakarta.annotation.Nullable IsIsolated isIsolated) { this.isIsolated = isIsolated; return this; } @@ -209,11 +210,12 @@ public MarginAccountNewOtoRequest isIsolated(@jakarta.annotation.Nullable String * @return isIsolated */ @jakarta.annotation.Nullable - public String getIsIsolated() { + @Valid + public IsIsolated getIsIsolated() { return isIsolated; } - public void setIsIsolated(@jakarta.annotation.Nullable String isIsolated) { + public void setIsIsolated(@jakarta.annotation.Nullable IsIsolated isIsolated) { this.isIsolated = isIsolated; } @@ -224,7 +226,10 @@ public MarginAccountNewOtoRequest listClientOrderId( } /** - * Get listClientOrderId + * Arbitrary unique ID among open order lists. Automatically generated if not sent.<br/>A + * new order list with the same listClientOrderId is accepted only when the previous one is + * filled or completely expired.<br/>`listClientOrderId` is distinct from the + * `workingClientOrderId` and the `pendingClientOrderId`. * * @return listClientOrderId */ @@ -260,7 +265,7 @@ public void setNewOrderRespType( } public MarginAccountNewOtoRequest sideEffectType( - @jakarta.annotation.Nullable String sideEffectType) { + @jakarta.annotation.Nullable SideEffectType sideEffectType) { this.sideEffectType = sideEffectType; return this; } @@ -271,16 +276,17 @@ public MarginAccountNewOtoRequest sideEffectType( * @return sideEffectType */ @jakarta.annotation.Nullable - public String getSideEffectType() { + @Valid + public SideEffectType getSideEffectType() { return sideEffectType; } - public void setSideEffectType(@jakarta.annotation.Nullable String sideEffectType) { + public void setSideEffectType(@jakarta.annotation.Nullable SideEffectType sideEffectType) { this.sideEffectType = sideEffectType; } public MarginAccountNewOtoRequest selfTradePreventionMode( - @jakarta.annotation.Nullable String selfTradePreventionMode) { + @jakarta.annotation.Nullable SelfTradePreventionMode selfTradePreventionMode) { this.selfTradePreventionMode = selfTradePreventionMode; return this; } @@ -291,12 +297,13 @@ public MarginAccountNewOtoRequest selfTradePreventionMode( * @return selfTradePreventionMode */ @jakarta.annotation.Nullable - public String getSelfTradePreventionMode() { + @Valid + public SelfTradePreventionMode getSelfTradePreventionMode() { return selfTradePreventionMode; } public void setSelfTradePreventionMode( - @jakarta.annotation.Nullable String selfTradePreventionMode) { + @jakarta.annotation.Nullable SelfTradePreventionMode selfTradePreventionMode) { this.selfTradePreventionMode = selfTradePreventionMode; } @@ -307,7 +314,8 @@ public MarginAccountNewOtoRequest autoRepayAtCancel( } /** - * Get autoRepayAtCancel + * Only when MARGIN_BUY order takes effect, true means that the debt generated by the order + * needs to be repaid after the order is cancelled. * * @return autoRepayAtCancel */ @@ -320,7 +328,8 @@ public void setAutoRepayAtCancel(@jakarta.annotation.Nullable Boolean autoRepayA this.autoRepayAtCancel = autoRepayAtCancel; } - public MarginAccountNewOtoRequest workingType(@jakarta.annotation.Nonnull String workingType) { + public MarginAccountNewOtoRequest workingType( + @jakarta.annotation.Nonnull WorkingType workingType) { this.workingType = workingType; return this; } @@ -332,15 +341,17 @@ public MarginAccountNewOtoRequest workingType(@jakarta.annotation.Nonnull String */ @jakarta.annotation.Nonnull @NotNull - public String getWorkingType() { + @Valid + public WorkingType getWorkingType() { return workingType; } - public void setWorkingType(@jakarta.annotation.Nonnull String workingType) { + public void setWorkingType(@jakarta.annotation.Nonnull WorkingType workingType) { this.workingType = workingType; } - public MarginAccountNewOtoRequest workingSide(@jakarta.annotation.Nonnull String workingSide) { + public MarginAccountNewOtoRequest workingSide( + @jakarta.annotation.Nonnull WorkingSide workingSide) { this.workingSide = workingSide; return this; } @@ -352,11 +363,12 @@ public MarginAccountNewOtoRequest workingSide(@jakarta.annotation.Nonnull String */ @jakarta.annotation.Nonnull @NotNull - public String getWorkingSide() { + @Valid + public WorkingSide getWorkingSide() { return workingSide; } - public void setWorkingSide(@jakarta.annotation.Nonnull String workingSide) { + public void setWorkingSide(@jakarta.annotation.Nonnull WorkingSide workingSide) { this.workingSide = workingSide; } @@ -367,7 +379,8 @@ public MarginAccountNewOtoRequest workingClientOrderId( } /** - * Get workingClientOrderId + * Arbitrary unique ID among open orders for the working order. Automatically generated if not + * sent. * * @return workingClientOrderId */ @@ -409,7 +422,7 @@ public MarginAccountNewOtoRequest workingQuantity( } /** - * Get workingQuantity + * Sets the quantity for the working order. * * @return workingQuantity */ @@ -431,7 +444,7 @@ public MarginAccountNewOtoRequest workingIcebergQty( } /** - * Get workingIcebergQty + * This can only be used if `workingTimeInForce` is `GTC`. * * @return workingIcebergQty */ @@ -447,7 +460,7 @@ public void setWorkingIcebergQty(@jakarta.annotation.Nonnull Double workingIcebe } public MarginAccountNewOtoRequest workingTimeInForce( - @jakarta.annotation.Nullable String workingTimeInForce) { + @jakarta.annotation.Nullable WorkingTimeInForce workingTimeInForce) { this.workingTimeInForce = workingTimeInForce; return this; } @@ -458,15 +471,18 @@ public MarginAccountNewOtoRequest workingTimeInForce( * @return workingTimeInForce */ @jakarta.annotation.Nullable - public String getWorkingTimeInForce() { + @Valid + public WorkingTimeInForce getWorkingTimeInForce() { return workingTimeInForce; } - public void setWorkingTimeInForce(@jakarta.annotation.Nullable String workingTimeInForce) { + public void setWorkingTimeInForce( + @jakarta.annotation.Nullable WorkingTimeInForce workingTimeInForce) { this.workingTimeInForce = workingTimeInForce; } - public MarginAccountNewOtoRequest pendingType(@jakarta.annotation.Nonnull String pendingType) { + public MarginAccountNewOtoRequest pendingType( + @jakarta.annotation.Nonnull PendingType pendingType) { this.pendingType = pendingType; return this; } @@ -478,15 +494,17 @@ public MarginAccountNewOtoRequest pendingType(@jakarta.annotation.Nonnull String */ @jakarta.annotation.Nonnull @NotNull - public String getPendingType() { + @Valid + public PendingType getPendingType() { return pendingType; } - public void setPendingType(@jakarta.annotation.Nonnull String pendingType) { + public void setPendingType(@jakarta.annotation.Nonnull PendingType pendingType) { this.pendingType = pendingType; } - public MarginAccountNewOtoRequest pendingSide(@jakarta.annotation.Nonnull String pendingSide) { + public MarginAccountNewOtoRequest pendingSide( + @jakarta.annotation.Nonnull PendingSide pendingSide) { this.pendingSide = pendingSide; return this; } @@ -498,11 +516,12 @@ public MarginAccountNewOtoRequest pendingSide(@jakarta.annotation.Nonnull String */ @jakarta.annotation.Nonnull @NotNull - public String getPendingSide() { + @Valid + public PendingSide getPendingSide() { return pendingSide; } - public void setPendingSide(@jakarta.annotation.Nonnull String pendingSide) { + public void setPendingSide(@jakarta.annotation.Nonnull PendingSide pendingSide) { this.pendingSide = pendingSide; } @@ -513,7 +532,8 @@ public MarginAccountNewOtoRequest pendingClientOrderId( } /** - * Get pendingClientOrderId + * Arbitrary unique ID among open orders for the pending order. Automatically generated if not + * sent. * * @return pendingClientOrderId */ @@ -596,7 +616,7 @@ public MarginAccountNewOtoRequest pendingQuantity( } /** - * Get pendingQuantity + * Sets the quantity for the pending order. * * @return pendingQuantity */ @@ -618,7 +638,7 @@ public MarginAccountNewOtoRequest pendingIcebergQty( } /** - * Get pendingIcebergQty + * This can only be used if `pendingTimeInForce` is `GTC`. * * @return pendingIcebergQty */ @@ -633,7 +653,7 @@ public void setPendingIcebergQty(@jakarta.annotation.Nullable Double pendingIceb } public MarginAccountNewOtoRequest pendingTimeInForce( - @jakarta.annotation.Nullable String pendingTimeInForce) { + @jakarta.annotation.Nullable PendingTimeInForce pendingTimeInForce) { this.pendingTimeInForce = pendingTimeInForce; return this; } @@ -644,11 +664,13 @@ public MarginAccountNewOtoRequest pendingTimeInForce( * @return pendingTimeInForce */ @jakarta.annotation.Nullable - public String getPendingTimeInForce() { + @Valid + public PendingTimeInForce getPendingTimeInForce() { return pendingTimeInForce; } - public void setPendingTimeInForce(@jakarta.annotation.Nullable String pendingTimeInForce) { + public void setPendingTimeInForce( + @jakarta.annotation.Nullable PendingTimeInForce pendingTimeInForce) { this.pendingTimeInForce = pendingTimeInForce; } @@ -985,13 +1007,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("symbol").toString())); } - if ((jsonObj.get("isIsolated") != null && !jsonObj.get("isIsolated").isJsonNull()) - && !jsonObj.get("isIsolated").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `isIsolated` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("isIsolated").toString())); + // validate the optional field `isIsolated` + if (jsonObj.get("isIsolated") != null && !jsonObj.get("isIsolated").isJsonNull()) { + IsIsolated.validateJsonElement(jsonObj.get("isIsolated")); } if ((jsonObj.get("listClientOrderId") != null && !jsonObj.get("listClientOrderId").isJsonNull()) @@ -1007,37 +1025,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti && !jsonObj.get("newOrderRespType").isJsonNull()) { NewOrderRespType.validateJsonElement(jsonObj.get("newOrderRespType")); } - if ((jsonObj.get("sideEffectType") != null && !jsonObj.get("sideEffectType").isJsonNull()) - && !jsonObj.get("sideEffectType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `sideEffectType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("sideEffectType").toString())); - } - if ((jsonObj.get("selfTradePreventionMode") != null - && !jsonObj.get("selfTradePreventionMode").isJsonNull()) - && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `selfTradePreventionMode` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("selfTradePreventionMode").toString())); - } - if (!jsonObj.get("workingType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `workingType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("workingType").toString())); + // validate the optional field `sideEffectType` + if (jsonObj.get("sideEffectType") != null && !jsonObj.get("sideEffectType").isJsonNull()) { + SideEffectType.validateJsonElement(jsonObj.get("sideEffectType")); } - if (!jsonObj.get("workingSide").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `workingSide` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("workingSide").toString())); + // validate the optional field `selfTradePreventionMode` + if (jsonObj.get("selfTradePreventionMode") != null + && !jsonObj.get("selfTradePreventionMode").isJsonNull()) { + SelfTradePreventionMode.validateJsonElement(jsonObj.get("selfTradePreventionMode")); } + // validate the required field `workingType` + WorkingType.validateJsonElement(jsonObj.get("workingType")); + // validate the required field `workingSide` + WorkingSide.validateJsonElement(jsonObj.get("workingSide")); if ((jsonObj.get("workingClientOrderId") != null && !jsonObj.get("workingClientOrderId").isJsonNull()) && !jsonObj.get("workingClientOrderId").isJsonPrimitive()) { @@ -1047,29 +1047,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("workingClientOrderId").toString())); } - if ((jsonObj.get("workingTimeInForce") != null - && !jsonObj.get("workingTimeInForce").isJsonNull()) - && !jsonObj.get("workingTimeInForce").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `workingTimeInForce` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("workingTimeInForce").toString())); - } - if (!jsonObj.get("pendingType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `pendingType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("pendingType").toString())); - } - if (!jsonObj.get("pendingSide").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `pendingSide` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("pendingSide").toString())); + // validate the optional field `workingTimeInForce` + if (jsonObj.get("workingTimeInForce") != null + && !jsonObj.get("workingTimeInForce").isJsonNull()) { + WorkingTimeInForce.validateJsonElement(jsonObj.get("workingTimeInForce")); } + // validate the required field `pendingType` + PendingType.validateJsonElement(jsonObj.get("pendingType")); + // validate the required field `pendingSide` + PendingSide.validateJsonElement(jsonObj.get("pendingSide")); if ((jsonObj.get("pendingClientOrderId") != null && !jsonObj.get("pendingClientOrderId").isJsonNull()) && !jsonObj.get("pendingClientOrderId").isJsonPrimitive()) { @@ -1079,14 +1065,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("pendingClientOrderId").toString())); } - if ((jsonObj.get("pendingTimeInForce") != null - && !jsonObj.get("pendingTimeInForce").isJsonNull()) - && !jsonObj.get("pendingTimeInForce").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `pendingTimeInForce` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("pendingTimeInForce").toString())); + // validate the optional field `pendingTimeInForce` + if (jsonObj.get("pendingTimeInForce") != null + && !jsonObj.get("pendingTimeInForce").isJsonNull()) { + PendingTimeInForce.validateJsonElement(jsonObj.get("pendingTimeInForce")); } } diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtoResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtoResponse.java index 7884cf93e..16a815d0a 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtoResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** MarginAccountNewOtoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOtoResponse { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; @@ -110,7 +110,7 @@ public MarginAccountNewOtoResponse orderListId(@jakarta.annotation.Nullable Long } /** - * Get orderListId + * order List Id. * * @return orderListId */ @@ -130,7 +130,7 @@ public MarginAccountNewOtoResponse contingencyType( } /** - * Get contingencyType + * contingency Type. * * @return contingencyType */ @@ -150,7 +150,7 @@ public MarginAccountNewOtoResponse listStatusType( } /** - * Get listStatusType + * list Status Type. * * @return listStatusType */ @@ -170,7 +170,7 @@ public MarginAccountNewOtoResponse listOrderStatus( } /** - * Get listOrderStatus + * list Order Status. * * @return listOrderStatus */ @@ -190,7 +190,7 @@ public MarginAccountNewOtoResponse listClientOrderId( } /** - * Get listClientOrderId + * list Client Order Id. * * @return listClientOrderId */ @@ -210,7 +210,7 @@ public MarginAccountNewOtoResponse transactionTime( } /** - * Get transactionTime + * transaction Time. * * @return transactionTime */ @@ -229,7 +229,7 @@ public MarginAccountNewOtoResponse symbol(@jakarta.annotation.Nullable String sy } /** - * Get symbol + * symbol. * * @return symbol */ @@ -248,7 +248,7 @@ public MarginAccountNewOtoResponse isIsolated(@jakarta.annotation.Nullable Boole } /** - * Get isIsolated + * is Isolated. * * @return isIsolated */ @@ -278,7 +278,7 @@ public MarginAccountNewOtoResponse addOrdersItem( } /** - * Get orders + * orders list. * * @return orders */ @@ -311,7 +311,7 @@ public MarginAccountNewOtoResponse addOrderReportsItem( } /** - * Get orderReports + * order Reports list. * * @return orderReports */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtoResponseOrderReportsInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtoResponseOrderReportsInner.java index 1dd08a395..081b9f07d 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtoResponseOrderReportsInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtoResponseOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountNewOtoResponseOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOtoResponseOrderReportsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -130,7 +130,7 @@ public MarginAccountNewOtoResponseOrderReportsInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -150,7 +150,7 @@ public MarginAccountNewOtoResponseOrderReportsInner orderId( } /** - * Get orderId + * order Id. * * @return orderId */ @@ -170,7 +170,7 @@ public MarginAccountNewOtoResponseOrderReportsInner orderListId( } /** - * Get orderListId + * order List Id. * * @return orderListId */ @@ -190,7 +190,7 @@ public MarginAccountNewOtoResponseOrderReportsInner clientOrderId( } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ @@ -210,7 +210,7 @@ public MarginAccountNewOtoResponseOrderReportsInner transactTime( } /** - * Get transactTime + * transact Time. * * @return transactTime */ @@ -230,7 +230,7 @@ public MarginAccountNewOtoResponseOrderReportsInner price( } /** - * Get price + * price. * * @return price */ @@ -250,7 +250,7 @@ public MarginAccountNewOtoResponseOrderReportsInner origQty( } /** - * Get origQty + * orig Qty. * * @return origQty */ @@ -270,7 +270,7 @@ public MarginAccountNewOtoResponseOrderReportsInner executedQty( } /** - * Get executedQty + * executed Qty. * * @return executedQty */ @@ -290,7 +290,7 @@ public MarginAccountNewOtoResponseOrderReportsInner cummulativeQuoteQty( } /** - * Get cummulativeQuoteQty + * cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -310,7 +310,7 @@ public MarginAccountNewOtoResponseOrderReportsInner status( } /** - * Get status + * status. * * @return status */ @@ -330,7 +330,7 @@ public MarginAccountNewOtoResponseOrderReportsInner timeInForce( } /** - * Get timeInForce + * time In Force. * * @return timeInForce */ @@ -350,7 +350,7 @@ public MarginAccountNewOtoResponseOrderReportsInner type( } /** - * Get type + * type. * * @return type */ @@ -370,7 +370,7 @@ public MarginAccountNewOtoResponseOrderReportsInner side( } /** - * Get side + * side. * * @return side */ @@ -390,7 +390,7 @@ public MarginAccountNewOtoResponseOrderReportsInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self Trade Prevention Mode. * * @return selfTradePreventionMode */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtoResponseOrdersInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtoResponseOrdersInner.java index 8475595ff..1c59404dc 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtoResponseOrdersInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtoResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountNewOtoResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOtoResponseOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public MarginAccountNewOtoResponseOrdersInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -83,7 +83,7 @@ public MarginAccountNewOtoResponseOrdersInner orderId( } /** - * Get orderId + * order Id. * * @return orderId */ @@ -103,7 +103,7 @@ public MarginAccountNewOtoResponseOrdersInner clientOrderId( } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtocoRequest.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtocoRequest.java index 502e6afe2..24226433d 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtocoRequest.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtocoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** MarginAccountNewOtocoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOtocoRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -47,19 +47,19 @@ public class MarginAccountNewOtocoRequest { @SerializedName(SERIALIZED_NAME_IS_ISOLATED) @jakarta.annotation.Nullable - private String isIsolated; + private IsIsolated isIsolated = IsIsolated.FALSE; public static final String SERIALIZED_NAME_SIDE_EFFECT_TYPE = "sideEffectType"; @SerializedName(SERIALIZED_NAME_SIDE_EFFECT_TYPE) @jakarta.annotation.Nullable - private String sideEffectType; + private SideEffectType sideEffectType; public static final String SERIALIZED_NAME_AUTO_REPAY_AT_CANCEL = "autoRepayAtCancel"; @SerializedName(SERIALIZED_NAME_AUTO_REPAY_AT_CANCEL) @jakarta.annotation.Nullable - private Boolean autoRepayAtCancel; + private Boolean autoRepayAtCancel = true; public static final String SERIALIZED_NAME_LIST_CLIENT_ORDER_ID = "listClientOrderId"; @@ -78,19 +78,19 @@ public class MarginAccountNewOtocoRequest { @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) @jakarta.annotation.Nullable - private String selfTradePreventionMode; + private SelfTradePreventionMode selfTradePreventionMode; public static final String SERIALIZED_NAME_WORKING_TYPE = "workingType"; @SerializedName(SERIALIZED_NAME_WORKING_TYPE) @jakarta.annotation.Nonnull - private String workingType; + private WorkingType workingType; public static final String SERIALIZED_NAME_WORKING_SIDE = "workingSide"; @SerializedName(SERIALIZED_NAME_WORKING_SIDE) @jakarta.annotation.Nonnull - private String workingSide; + private WorkingSide workingSide; public static final String SERIALIZED_NAME_WORKING_CLIENT_ORDER_ID = "workingClientOrderId"; @@ -120,13 +120,13 @@ public class MarginAccountNewOtocoRequest { @SerializedName(SERIALIZED_NAME_WORKING_TIME_IN_FORCE) @jakarta.annotation.Nullable - private String workingTimeInForce; + private WorkingTimeInForce workingTimeInForce; public static final String SERIALIZED_NAME_PENDING_SIDE = "pendingSide"; @SerializedName(SERIALIZED_NAME_PENDING_SIDE) @jakarta.annotation.Nonnull - private String pendingSide; + private PendingSide pendingSide; public static final String SERIALIZED_NAME_PENDING_QUANTITY = "pendingQuantity"; @@ -138,7 +138,7 @@ public class MarginAccountNewOtocoRequest { @SerializedName(SERIALIZED_NAME_PENDING_ABOVE_TYPE) @jakarta.annotation.Nonnull - private String pendingAboveType; + private PendingAboveType pendingAboveType; public static final String SERIALIZED_NAME_PENDING_ABOVE_CLIENT_ORDER_ID = "pendingAboveClientOrderId"; @@ -177,13 +177,13 @@ public class MarginAccountNewOtocoRequest { @SerializedName(SERIALIZED_NAME_PENDING_ABOVE_TIME_IN_FORCE) @jakarta.annotation.Nullable - private String pendingAboveTimeInForce; + private PendingAboveTimeInForce pendingAboveTimeInForce; public static final String SERIALIZED_NAME_PENDING_BELOW_TYPE = "pendingBelowType"; @SerializedName(SERIALIZED_NAME_PENDING_BELOW_TYPE) @jakarta.annotation.Nullable - private String pendingBelowType; + private PendingBelowType pendingBelowType; public static final String SERIALIZED_NAME_PENDING_BELOW_CLIENT_ORDER_ID = "pendingBelowClientOrderId"; @@ -222,7 +222,7 @@ public class MarginAccountNewOtocoRequest { @SerializedName(SERIALIZED_NAME_PENDING_BELOW_TIME_IN_FORCE) @jakarta.annotation.Nullable - private String pendingBelowTimeInForce; + private PendingBelowTimeInForce pendingBelowTimeInForce; public MarginAccountNewOtocoRequest() {} @@ -246,7 +246,8 @@ public void setSymbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; } - public MarginAccountNewOtocoRequest isIsolated(@jakarta.annotation.Nullable String isIsolated) { + public MarginAccountNewOtocoRequest isIsolated( + @jakarta.annotation.Nullable IsIsolated isIsolated) { this.isIsolated = isIsolated; return this; } @@ -257,16 +258,17 @@ public MarginAccountNewOtocoRequest isIsolated(@jakarta.annotation.Nullable Stri * @return isIsolated */ @jakarta.annotation.Nullable - public String getIsIsolated() { + @Valid + public IsIsolated getIsIsolated() { return isIsolated; } - public void setIsIsolated(@jakarta.annotation.Nullable String isIsolated) { + public void setIsIsolated(@jakarta.annotation.Nullable IsIsolated isIsolated) { this.isIsolated = isIsolated; } public MarginAccountNewOtocoRequest sideEffectType( - @jakarta.annotation.Nullable String sideEffectType) { + @jakarta.annotation.Nullable SideEffectType sideEffectType) { this.sideEffectType = sideEffectType; return this; } @@ -277,11 +279,12 @@ public MarginAccountNewOtocoRequest sideEffectType( * @return sideEffectType */ @jakarta.annotation.Nullable - public String getSideEffectType() { + @Valid + public SideEffectType getSideEffectType() { return sideEffectType; } - public void setSideEffectType(@jakarta.annotation.Nullable String sideEffectType) { + public void setSideEffectType(@jakarta.annotation.Nullable SideEffectType sideEffectType) { this.sideEffectType = sideEffectType; } @@ -292,7 +295,8 @@ public MarginAccountNewOtocoRequest autoRepayAtCancel( } /** - * Get autoRepayAtCancel + * Only when MARGIN_BUY order takes effect, true means that the debt generated by the order + * needs to be repaid after the order is cancelled. * * @return autoRepayAtCancel */ @@ -312,7 +316,11 @@ public MarginAccountNewOtocoRequest listClientOrderId( } /** - * Get listClientOrderId + * Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order + * list with the same listClientOrderId is accepted only when the previous one is filled or + * completely expired. `listClientOrderId` is distinct from the + * `workingClientOrderId`, `pendingAboveClientOrderId`, and the + * `pendingBelowClientOrderId`. * * @return listClientOrderId */ @@ -348,7 +356,7 @@ public void setNewOrderRespType( } public MarginAccountNewOtocoRequest selfTradePreventionMode( - @jakarta.annotation.Nullable String selfTradePreventionMode) { + @jakarta.annotation.Nullable SelfTradePreventionMode selfTradePreventionMode) { this.selfTradePreventionMode = selfTradePreventionMode; return this; } @@ -359,17 +367,18 @@ public MarginAccountNewOtocoRequest selfTradePreventionMode( * @return selfTradePreventionMode */ @jakarta.annotation.Nullable - public String getSelfTradePreventionMode() { + @Valid + public SelfTradePreventionMode getSelfTradePreventionMode() { return selfTradePreventionMode; } public void setSelfTradePreventionMode( - @jakarta.annotation.Nullable String selfTradePreventionMode) { + @jakarta.annotation.Nullable SelfTradePreventionMode selfTradePreventionMode) { this.selfTradePreventionMode = selfTradePreventionMode; } public MarginAccountNewOtocoRequest workingType( - @jakarta.annotation.Nonnull String workingType) { + @jakarta.annotation.Nonnull WorkingType workingType) { this.workingType = workingType; return this; } @@ -381,16 +390,17 @@ public MarginAccountNewOtocoRequest workingType( */ @jakarta.annotation.Nonnull @NotNull - public String getWorkingType() { + @Valid + public WorkingType getWorkingType() { return workingType; } - public void setWorkingType(@jakarta.annotation.Nonnull String workingType) { + public void setWorkingType(@jakarta.annotation.Nonnull WorkingType workingType) { this.workingType = workingType; } public MarginAccountNewOtocoRequest workingSide( - @jakarta.annotation.Nonnull String workingSide) { + @jakarta.annotation.Nonnull WorkingSide workingSide) { this.workingSide = workingSide; return this; } @@ -402,11 +412,12 @@ public MarginAccountNewOtocoRequest workingSide( */ @jakarta.annotation.Nonnull @NotNull - public String getWorkingSide() { + @Valid + public WorkingSide getWorkingSide() { return workingSide; } - public void setWorkingSide(@jakarta.annotation.Nonnull String workingSide) { + public void setWorkingSide(@jakarta.annotation.Nonnull WorkingSide workingSide) { this.workingSide = workingSide; } @@ -417,7 +428,8 @@ public MarginAccountNewOtocoRequest workingClientOrderId( } /** - * Get workingClientOrderId + * Arbitrary unique ID among open orders for the working order. Automatically generated if not + * sent. * * @return workingClientOrderId */ @@ -481,7 +493,7 @@ public MarginAccountNewOtocoRequest workingIcebergQty( } /** - * Get workingIcebergQty + * This can only be used if `workingTimeInForce` is `GTC`. * * @return workingIcebergQty */ @@ -496,7 +508,7 @@ public void setWorkingIcebergQty(@jakarta.annotation.Nullable Double workingIceb } public MarginAccountNewOtocoRequest workingTimeInForce( - @jakarta.annotation.Nullable String workingTimeInForce) { + @jakarta.annotation.Nullable WorkingTimeInForce workingTimeInForce) { this.workingTimeInForce = workingTimeInForce; return this; } @@ -507,16 +519,18 @@ public MarginAccountNewOtocoRequest workingTimeInForce( * @return workingTimeInForce */ @jakarta.annotation.Nullable - public String getWorkingTimeInForce() { + @Valid + public WorkingTimeInForce getWorkingTimeInForce() { return workingTimeInForce; } - public void setWorkingTimeInForce(@jakarta.annotation.Nullable String workingTimeInForce) { + public void setWorkingTimeInForce( + @jakarta.annotation.Nullable WorkingTimeInForce workingTimeInForce) { this.workingTimeInForce = workingTimeInForce; } public MarginAccountNewOtocoRequest pendingSide( - @jakarta.annotation.Nonnull String pendingSide) { + @jakarta.annotation.Nonnull PendingSide pendingSide) { this.pendingSide = pendingSide; return this; } @@ -528,11 +542,12 @@ public MarginAccountNewOtocoRequest pendingSide( */ @jakarta.annotation.Nonnull @NotNull - public String getPendingSide() { + @Valid + public PendingSide getPendingSide() { return pendingSide; } - public void setPendingSide(@jakarta.annotation.Nonnull String pendingSide) { + public void setPendingSide(@jakarta.annotation.Nonnull PendingSide pendingSide) { this.pendingSide = pendingSide; } @@ -559,7 +574,7 @@ public void setPendingQuantity(@jakarta.annotation.Nonnull Double pendingQuantit } public MarginAccountNewOtocoRequest pendingAboveType( - @jakarta.annotation.Nonnull String pendingAboveType) { + @jakarta.annotation.Nonnull PendingAboveType pendingAboveType) { this.pendingAboveType = pendingAboveType; return this; } @@ -571,11 +586,12 @@ public MarginAccountNewOtocoRequest pendingAboveType( */ @jakarta.annotation.Nonnull @NotNull - public String getPendingAboveType() { + @Valid + public PendingAboveType getPendingAboveType() { return pendingAboveType; } - public void setPendingAboveType(@jakarta.annotation.Nonnull String pendingAboveType) { + public void setPendingAboveType(@jakarta.annotation.Nonnull PendingAboveType pendingAboveType) { this.pendingAboveType = pendingAboveType; } @@ -586,7 +602,8 @@ public MarginAccountNewOtocoRequest pendingAboveClientOrderId( } /** - * Get pendingAboveClientOrderId + * Arbitrary unique ID among open orders for the pending above order. Automatically generated if + * not sent. * * @return pendingAboveClientOrderId */ @@ -672,7 +689,7 @@ public MarginAccountNewOtocoRequest pendingAboveIcebergQty( } /** - * Get pendingAboveIcebergQty + * This can only be used if `pendingAboveTimeInForce` is `GTC`. * * @return pendingAboveIcebergQty */ @@ -688,7 +705,7 @@ public void setPendingAboveIcebergQty( } public MarginAccountNewOtocoRequest pendingAboveTimeInForce( - @jakarta.annotation.Nullable String pendingAboveTimeInForce) { + @jakarta.annotation.Nullable PendingAboveTimeInForce pendingAboveTimeInForce) { this.pendingAboveTimeInForce = pendingAboveTimeInForce; return this; } @@ -699,17 +716,18 @@ public MarginAccountNewOtocoRequest pendingAboveTimeInForce( * @return pendingAboveTimeInForce */ @jakarta.annotation.Nullable - public String getPendingAboveTimeInForce() { + @Valid + public PendingAboveTimeInForce getPendingAboveTimeInForce() { return pendingAboveTimeInForce; } public void setPendingAboveTimeInForce( - @jakarta.annotation.Nullable String pendingAboveTimeInForce) { + @jakarta.annotation.Nullable PendingAboveTimeInForce pendingAboveTimeInForce) { this.pendingAboveTimeInForce = pendingAboveTimeInForce; } public MarginAccountNewOtocoRequest pendingBelowType( - @jakarta.annotation.Nullable String pendingBelowType) { + @jakarta.annotation.Nullable PendingBelowType pendingBelowType) { this.pendingBelowType = pendingBelowType; return this; } @@ -720,11 +738,13 @@ public MarginAccountNewOtocoRequest pendingBelowType( * @return pendingBelowType */ @jakarta.annotation.Nullable - public String getPendingBelowType() { + @Valid + public PendingBelowType getPendingBelowType() { return pendingBelowType; } - public void setPendingBelowType(@jakarta.annotation.Nullable String pendingBelowType) { + public void setPendingBelowType( + @jakarta.annotation.Nullable PendingBelowType pendingBelowType) { this.pendingBelowType = pendingBelowType; } @@ -735,7 +755,8 @@ public MarginAccountNewOtocoRequest pendingBelowClientOrderId( } /** - * Get pendingBelowClientOrderId + * Arbitrary unique ID among open orders for the pending below order. Automatically generated if + * not sent. * * @return pendingBelowClientOrderId */ @@ -821,7 +842,7 @@ public MarginAccountNewOtocoRequest pendingBelowIcebergQty( } /** - * Get pendingBelowIcebergQty + * This can only be used if `pendingBelowTimeInForce` is `GTC`. * * @return pendingBelowIcebergQty */ @@ -837,7 +858,7 @@ public void setPendingBelowIcebergQty( } public MarginAccountNewOtocoRequest pendingBelowTimeInForce( - @jakarta.annotation.Nullable String pendingBelowTimeInForce) { + @jakarta.annotation.Nullable PendingBelowTimeInForce pendingBelowTimeInForce) { this.pendingBelowTimeInForce = pendingBelowTimeInForce; return this; } @@ -848,12 +869,13 @@ public MarginAccountNewOtocoRequest pendingBelowTimeInForce( * @return pendingBelowTimeInForce */ @jakarta.annotation.Nullable - public String getPendingBelowTimeInForce() { + @Valid + public PendingBelowTimeInForce getPendingBelowTimeInForce() { return pendingBelowTimeInForce; } public void setPendingBelowTimeInForce( - @jakarta.annotation.Nullable String pendingBelowTimeInForce) { + @jakarta.annotation.Nullable PendingBelowTimeInForce pendingBelowTimeInForce) { this.pendingBelowTimeInForce = pendingBelowTimeInForce; } @@ -1299,21 +1321,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("symbol").toString())); } - if ((jsonObj.get("isIsolated") != null && !jsonObj.get("isIsolated").isJsonNull()) - && !jsonObj.get("isIsolated").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `isIsolated` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("isIsolated").toString())); + // validate the optional field `isIsolated` + if (jsonObj.get("isIsolated") != null && !jsonObj.get("isIsolated").isJsonNull()) { + IsIsolated.validateJsonElement(jsonObj.get("isIsolated")); } - if ((jsonObj.get("sideEffectType") != null && !jsonObj.get("sideEffectType").isJsonNull()) - && !jsonObj.get("sideEffectType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `sideEffectType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("sideEffectType").toString())); + // validate the optional field `sideEffectType` + if (jsonObj.get("sideEffectType") != null && !jsonObj.get("sideEffectType").isJsonNull()) { + SideEffectType.validateJsonElement(jsonObj.get("sideEffectType")); } if ((jsonObj.get("listClientOrderId") != null && !jsonObj.get("listClientOrderId").isJsonNull()) @@ -1329,29 +1343,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti && !jsonObj.get("newOrderRespType").isJsonNull()) { NewOrderRespType.validateJsonElement(jsonObj.get("newOrderRespType")); } - if ((jsonObj.get("selfTradePreventionMode") != null - && !jsonObj.get("selfTradePreventionMode").isJsonNull()) - && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `selfTradePreventionMode` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("selfTradePreventionMode").toString())); - } - if (!jsonObj.get("workingType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `workingType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("workingType").toString())); - } - if (!jsonObj.get("workingSide").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `workingSide` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("workingSide").toString())); + // validate the optional field `selfTradePreventionMode` + if (jsonObj.get("selfTradePreventionMode") != null + && !jsonObj.get("selfTradePreventionMode").isJsonNull()) { + SelfTradePreventionMode.validateJsonElement(jsonObj.get("selfTradePreventionMode")); } + // validate the required field `workingType` + WorkingType.validateJsonElement(jsonObj.get("workingType")); + // validate the required field `workingSide` + WorkingSide.validateJsonElement(jsonObj.get("workingSide")); if ((jsonObj.get("workingClientOrderId") != null && !jsonObj.get("workingClientOrderId").isJsonNull()) && !jsonObj.get("workingClientOrderId").isJsonPrimitive()) { @@ -1361,29 +1361,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("workingClientOrderId").toString())); } - if ((jsonObj.get("workingTimeInForce") != null - && !jsonObj.get("workingTimeInForce").isJsonNull()) - && !jsonObj.get("workingTimeInForce").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `workingTimeInForce` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("workingTimeInForce").toString())); - } - if (!jsonObj.get("pendingSide").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `pendingSide` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("pendingSide").toString())); - } - if (!jsonObj.get("pendingAboveType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `pendingAboveType` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("pendingAboveType").toString())); + // validate the optional field `workingTimeInForce` + if (jsonObj.get("workingTimeInForce") != null + && !jsonObj.get("workingTimeInForce").isJsonNull()) { + WorkingTimeInForce.validateJsonElement(jsonObj.get("workingTimeInForce")); } + // validate the required field `pendingSide` + PendingSide.validateJsonElement(jsonObj.get("pendingSide")); + // validate the required field `pendingAboveType` + PendingAboveType.validateJsonElement(jsonObj.get("pendingAboveType")); if ((jsonObj.get("pendingAboveClientOrderId") != null && !jsonObj.get("pendingAboveClientOrderId").isJsonNull()) && !jsonObj.get("pendingAboveClientOrderId").isJsonPrimitive()) { @@ -1393,23 +1379,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " in the JSON string but got `%s`", jsonObj.get("pendingAboveClientOrderId").toString())); } - if ((jsonObj.get("pendingAboveTimeInForce") != null - && !jsonObj.get("pendingAboveTimeInForce").isJsonNull()) - && !jsonObj.get("pendingAboveTimeInForce").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `pendingAboveTimeInForce` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("pendingAboveTimeInForce").toString())); + // validate the optional field `pendingAboveTimeInForce` + if (jsonObj.get("pendingAboveTimeInForce") != null + && !jsonObj.get("pendingAboveTimeInForce").isJsonNull()) { + PendingAboveTimeInForce.validateJsonElement(jsonObj.get("pendingAboveTimeInForce")); } - if ((jsonObj.get("pendingBelowType") != null - && !jsonObj.get("pendingBelowType").isJsonNull()) - && !jsonObj.get("pendingBelowType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `pendingBelowType` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("pendingBelowType").toString())); + // validate the optional field `pendingBelowType` + if (jsonObj.get("pendingBelowType") != null + && !jsonObj.get("pendingBelowType").isJsonNull()) { + PendingBelowType.validateJsonElement(jsonObj.get("pendingBelowType")); } if ((jsonObj.get("pendingBelowClientOrderId") != null && !jsonObj.get("pendingBelowClientOrderId").isJsonNull()) @@ -1420,14 +1398,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " in the JSON string but got `%s`", jsonObj.get("pendingBelowClientOrderId").toString())); } - if ((jsonObj.get("pendingBelowTimeInForce") != null - && !jsonObj.get("pendingBelowTimeInForce").isJsonNull()) - && !jsonObj.get("pendingBelowTimeInForce").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `pendingBelowTimeInForce` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("pendingBelowTimeInForce").toString())); + // validate the optional field `pendingBelowTimeInForce` + if (jsonObj.get("pendingBelowTimeInForce") != null + && !jsonObj.get("pendingBelowTimeInForce").isJsonNull()) { + PendingBelowTimeInForce.validateJsonElement(jsonObj.get("pendingBelowTimeInForce")); } } diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtocoResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtocoResponse.java index 3a1b57882..2aef7e9f7 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtocoResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtocoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** MarginAccountNewOtocoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOtocoResponse { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; @@ -111,7 +111,7 @@ public MarginAccountNewOtocoResponse orderListId( } /** - * Get orderListId + * order List Id. * * @return orderListId */ @@ -131,7 +131,7 @@ public MarginAccountNewOtocoResponse contingencyType( } /** - * Get contingencyType + * contingency Type. * * @return contingencyType */ @@ -151,7 +151,7 @@ public MarginAccountNewOtocoResponse listStatusType( } /** - * Get listStatusType + * list Status Type. * * @return listStatusType */ @@ -171,7 +171,7 @@ public MarginAccountNewOtocoResponse listOrderStatus( } /** - * Get listOrderStatus + * list Order Status. * * @return listOrderStatus */ @@ -191,7 +191,7 @@ public MarginAccountNewOtocoResponse listClientOrderId( } /** - * Get listClientOrderId + * list Client Order Id. * * @return listClientOrderId */ @@ -211,7 +211,7 @@ public MarginAccountNewOtocoResponse transactionTime( } /** - * Get transactionTime + * transaction Time. * * @return transactionTime */ @@ -230,7 +230,7 @@ public MarginAccountNewOtocoResponse symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * symbol. * * @return symbol */ @@ -250,7 +250,7 @@ public MarginAccountNewOtocoResponse isIsolated( } /** - * Get isIsolated + * is Isolated. * * @return isIsolated */ @@ -280,7 +280,7 @@ public MarginAccountNewOtocoResponse addOrdersItem( } /** - * Get orders + * orders list. * * @return orders */ @@ -313,7 +313,7 @@ public MarginAccountNewOtocoResponse addOrderReportsItem( } /** - * Get orderReports + * order Reports list. * * @return orderReports */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtocoResponseOrderReportsInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtocoResponseOrderReportsInner.java index 2fd8a46b7..1d4e712cc 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtocoResponseOrderReportsInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtocoResponseOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountNewOtocoResponseOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOtocoResponseOrderReportsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -136,7 +136,7 @@ public MarginAccountNewOtocoResponseOrderReportsInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -156,7 +156,7 @@ public MarginAccountNewOtocoResponseOrderReportsInner orderId( } /** - * Get orderId + * order Id. * * @return orderId */ @@ -176,7 +176,7 @@ public MarginAccountNewOtocoResponseOrderReportsInner orderListId( } /** - * Get orderListId + * order List Id. * * @return orderListId */ @@ -196,7 +196,7 @@ public MarginAccountNewOtocoResponseOrderReportsInner clientOrderId( } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ @@ -216,7 +216,7 @@ public MarginAccountNewOtocoResponseOrderReportsInner transactTime( } /** - * Get transactTime + * transact Time. * * @return transactTime */ @@ -236,7 +236,7 @@ public MarginAccountNewOtocoResponseOrderReportsInner price( } /** - * Get price + * price. * * @return price */ @@ -256,7 +256,7 @@ public MarginAccountNewOtocoResponseOrderReportsInner origQty( } /** - * Get origQty + * orig Qty. * * @return origQty */ @@ -276,7 +276,7 @@ public MarginAccountNewOtocoResponseOrderReportsInner executedQty( } /** - * Get executedQty + * executed Qty. * * @return executedQty */ @@ -296,7 +296,7 @@ public MarginAccountNewOtocoResponseOrderReportsInner cummulativeQuoteQty( } /** - * Get cummulativeQuoteQty + * cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -316,7 +316,7 @@ public MarginAccountNewOtocoResponseOrderReportsInner status( } /** - * Get status + * status. * * @return status */ @@ -336,7 +336,7 @@ public MarginAccountNewOtocoResponseOrderReportsInner timeInForce( } /** - * Get timeInForce + * time In Force. * * @return timeInForce */ @@ -356,7 +356,7 @@ public MarginAccountNewOtocoResponseOrderReportsInner type( } /** - * Get type + * type. * * @return type */ @@ -376,7 +376,7 @@ public MarginAccountNewOtocoResponseOrderReportsInner side( } /** - * Get side + * side. * * @return side */ @@ -396,7 +396,7 @@ public MarginAccountNewOtocoResponseOrderReportsInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self Trade Prevention Mode. * * @return selfTradePreventionMode */ @@ -417,7 +417,7 @@ public MarginAccountNewOtocoResponseOrderReportsInner stopPrice( } /** - * Get stopPrice + * stop Price. * * @return stopPrice */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtocoResponseOrdersInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtocoResponseOrdersInner.java index ad16c0dd7..3dfda4d8a 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtocoResponseOrdersInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginAccountNewOtocoResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginAccountNewOtocoResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginAccountNewOtocoResponseOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public MarginAccountNewOtocoResponseOrdersInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -83,7 +83,7 @@ public MarginAccountNewOtocoResponseOrdersInner orderId( } /** - * Get orderId + * order Id. * * @return orderId */ @@ -103,7 +103,7 @@ public MarginAccountNewOtocoResponseOrdersInner clientOrderId( } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginManualLiquidationRequest.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginManualLiquidationRequest.java index d122a1dad..50bd08b55 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginManualLiquidationRequest.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginManualLiquidationRequest.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -34,13 +35,13 @@ /** MarginManualLiquidationRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginManualLiquidationRequest { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private String type; + private OrderType type; public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -56,7 +57,7 @@ public class MarginManualLiquidationRequest { public MarginManualLiquidationRequest() {} - public MarginManualLiquidationRequest type(@jakarta.annotation.Nonnull String type) { + public MarginManualLiquidationRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -68,11 +69,12 @@ public MarginManualLiquidationRequest type(@jakarta.annotation.Nonnull String ty */ @jakarta.annotation.Nonnull @NotNull - public String getType() { + @Valid + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull String type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } @@ -82,7 +84,7 @@ public MarginManualLiquidationRequest symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * When type selects `ISOLATED`, `symbol` must be filled in * * @return symbol */ @@ -101,11 +103,12 @@ public MarginManualLiquidationRequest recvWindow(@jakarta.annotation.Nullable Lo } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -226,13 +229,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } + // validate the required field `type` + OrderType.validateJsonElement(jsonObj.get("type")); if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginManualLiquidationResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginManualLiquidationResponse.java index 87a028f25..00f0aaa7c 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginManualLiquidationResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/MarginManualLiquidationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** MarginManualLiquidationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginManualLiquidationResponse { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -75,7 +75,7 @@ public MarginManualLiquidationResponse asset(@jakarta.annotation.Nullable String } /** - * Get asset + * asset. * * @return asset */ @@ -94,7 +94,7 @@ public MarginManualLiquidationResponse interest(@jakarta.annotation.Nullable Str } /** - * Get interest + * interest. * * @return interest */ @@ -114,7 +114,7 @@ public MarginManualLiquidationResponse principal( } /** - * Get principal + * principal. * * @return principal */ @@ -134,7 +134,7 @@ public MarginManualLiquidationResponse liabilityAsset( } /** - * Get liabilityAsset + * liability Asset. * * @return liabilityAsset */ @@ -154,7 +154,7 @@ public MarginManualLiquidationResponse liabilityQty( } /** - * Get liabilityQty + * liability Qty. * * @return liabilityQty */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/NewOrderRespType.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/NewOrderRespType.java index eee943375..e80543572 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/NewOrderRespType.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/NewOrderRespType.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/OrderType.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/OrderType.java new file mode 100644 index 000000000..b0bf2c20e --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/OrderType.java @@ -0,0 +1,73 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets orderType */ +@JsonAdapter(OrderType.Adapter.class) +public enum OrderType { + ROLL_IN("ROLL_IN"), + + ROLL_OUT("ROLL_OUT"); + + private String value; + + OrderType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderType fromValue(String value) { + for (OrderType b : OrderType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderType.fromValue(value); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingAboveTimeInForce.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingAboveTimeInForce.java new file mode 100644 index 000000000..7e960d155 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingAboveTimeInForce.java @@ -0,0 +1,75 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets pendingAboveTimeInForce */ +@JsonAdapter(PendingAboveTimeInForce.Adapter.class) +public enum PendingAboveTimeInForce { + GTC("GTC"), + + IOC("IOC"), + + FOK("FOK"); + + private String value; + + PendingAboveTimeInForce(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PendingAboveTimeInForce fromValue(String value) { + for (PendingAboveTimeInForce b : PendingAboveTimeInForce.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PendingAboveTimeInForce enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PendingAboveTimeInForce read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PendingAboveTimeInForce.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PendingAboveTimeInForce.fromValue(value); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingAboveType.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingAboveType.java new file mode 100644 index 000000000..1f4ce0e32 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingAboveType.java @@ -0,0 +1,75 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets pendingAboveType */ +@JsonAdapter(PendingAboveType.Adapter.class) +public enum PendingAboveType { + LIMIT_MAKER("LIMIT_MAKER"), + + STOP_LOSS("STOP_LOSS"), + + STOP_LOSS_LIMIT("STOP_LOSS_LIMIT"); + + private String value; + + PendingAboveType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PendingAboveType fromValue(String value) { + for (PendingAboveType b : PendingAboveType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PendingAboveType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PendingAboveType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PendingAboveType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PendingAboveType.fromValue(value); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingBelowTimeInForce.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingBelowTimeInForce.java new file mode 100644 index 000000000..65fef617e --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingBelowTimeInForce.java @@ -0,0 +1,75 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets pendingBelowTimeInForce */ +@JsonAdapter(PendingBelowTimeInForce.Adapter.class) +public enum PendingBelowTimeInForce { + GTC("GTC"), + + IOC("IOC"), + + FOK("FOK"); + + private String value; + + PendingBelowTimeInForce(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PendingBelowTimeInForce fromValue(String value) { + for (PendingBelowTimeInForce b : PendingBelowTimeInForce.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PendingBelowTimeInForce enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PendingBelowTimeInForce read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PendingBelowTimeInForce.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PendingBelowTimeInForce.fromValue(value); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingBelowType.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingBelowType.java new file mode 100644 index 000000000..fa65e9516 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingBelowType.java @@ -0,0 +1,75 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets pendingBelowType */ +@JsonAdapter(PendingBelowType.Adapter.class) +public enum PendingBelowType { + LIMIT_MAKER("LIMIT_MAKER"), + + STOP_LOSS("STOP_LOSS"), + + STOP_LOSS_LIMIT("STOP_LOSS_LIMIT"); + + private String value; + + PendingBelowType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PendingBelowType fromValue(String value) { + for (PendingBelowType b : PendingBelowType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PendingBelowType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PendingBelowType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PendingBelowType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PendingBelowType.fromValue(value); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingSide.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingSide.java new file mode 100644 index 000000000..8d61a030a --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingSide.java @@ -0,0 +1,73 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets pendingSide */ +@JsonAdapter(PendingSide.Adapter.class) +public enum PendingSide { + BUY("BUY"), + + SELL("SELL"); + + private String value; + + PendingSide(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PendingSide fromValue(String value) { + for (PendingSide b : PendingSide.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PendingSide enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PendingSide read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PendingSide.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PendingSide.fromValue(value); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingTimeInForce.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingTimeInForce.java new file mode 100644 index 000000000..ae8655e0b --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingTimeInForce.java @@ -0,0 +1,75 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets pendingTimeInForce */ +@JsonAdapter(PendingTimeInForce.Adapter.class) +public enum PendingTimeInForce { + GTC("GTC"), + + IOC("IOC"), + + FOK("FOK"); + + private String value; + + PendingTimeInForce(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PendingTimeInForce fromValue(String value) { + for (PendingTimeInForce b : PendingTimeInForce.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PendingTimeInForce enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PendingTimeInForce read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PendingTimeInForce.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PendingTimeInForce.fromValue(value); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingType.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingType.java new file mode 100644 index 000000000..5a5ad67c6 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PendingType.java @@ -0,0 +1,83 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets pendingType */ +@JsonAdapter(PendingType.Adapter.class) +public enum PendingType { + LIMIT("LIMIT"), + + MARKET("MARKET"), + + STOP_LOSS("STOP_LOSS"), + + STOP_LOSS_LIMIT("STOP_LOSS_LIMIT"), + + TAKE_PROFIT("TAKE_PROFIT"), + + TAKE_PROFIT_LIMIT("TAKE_PROFIT_LIMIT"), + + LIMIT_MAKER("LIMIT_MAKER"); + + private String value; + + PendingType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PendingType fromValue(String value) { + for (PendingType b : PendingType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PendingType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PendingType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PendingType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PendingType.fromValue(value); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PermissionMode.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PermissionMode.java new file mode 100644 index 000000000..121acab6c --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/PermissionMode.java @@ -0,0 +1,77 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** + * This parameter is only for the Ed25519 API key, and does not effact for other encryption methods. + * The value can be TRADE (TRADE for all permissions) or READ (READ for USER_DATA, + * FIX_API_READ_ONLY). The default value is TRADE. + */ +@JsonAdapter(PermissionMode.Adapter.class) +public enum PermissionMode { + TRADE("TRADE"), + + READ("READ"); + + private String value; + + PermissionMode(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PermissionMode fromValue(String value) { + for (PermissionMode b : PermissionMode.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PermissionMode enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PermissionMode read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PermissionMode.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PermissionMode.fromValue(value); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryBorrowRepayRecordsInMarginAccountResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryBorrowRepayRecordsInMarginAccountResponse.java index 5c3107f3f..bddcb20a0 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryBorrowRepayRecordsInMarginAccountResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryBorrowRepayRecordsInMarginAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryBorrowRepayRecordsInMarginAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryBorrowRepayRecordsInMarginAccountResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; @@ -73,7 +73,7 @@ public QueryBorrowRepayRecordsInMarginAccountResponse addRowsItem( } /** - * Get rows + * rows list. * * @return rows */ @@ -96,7 +96,7 @@ public QueryBorrowRepayRecordsInMarginAccountResponse total( } /** - * Get total + * total. * * @return total */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryBorrowRepayRecordsInMarginAccountResponseRowsInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryBorrowRepayRecordsInMarginAccountResponseRowsInner.java index fc3619521..882cc47a0 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryBorrowRepayRecordsInMarginAccountResponseRowsInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryBorrowRepayRecordsInMarginAccountResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryBorrowRepayRecordsInMarginAccountResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryBorrowRepayRecordsInMarginAccountResponseRowsInner { public static final String SERIALIZED_NAME_TYPE = "type"; @@ -99,7 +99,8 @@ public QueryBorrowRepayRecordsInMarginAccountResponseRowsInner type( } /** - * Get type + * AUTO,MANUAL for Cross Margin Borrow; MANUAL,AUTO,BNB_AUTO_REPAY,POINT_AUTO_REPAY for Cross + * Margin Repay; AUTO,MANUAL for Isolated Margin Borrow/Repay; * * @return type */ @@ -119,7 +120,7 @@ public QueryBorrowRepayRecordsInMarginAccountResponseRowsInner isolatedSymbol( } /** - * Get isolatedSymbol + * isolated symbol, will not be returned for crossed margin * * @return isolatedSymbol */ @@ -139,7 +140,7 @@ public QueryBorrowRepayRecordsInMarginAccountResponseRowsInner amount( } /** - * Get amount + * Total amount borrowed/repaid * * @return amount */ @@ -159,7 +160,7 @@ public QueryBorrowRepayRecordsInMarginAccountResponseRowsInner asset( } /** - * Get asset + * asset. * * @return asset */ @@ -179,7 +180,7 @@ public QueryBorrowRepayRecordsInMarginAccountResponseRowsInner interest( } /** - * Get interest + * Interest repaid * * @return interest */ @@ -199,7 +200,7 @@ public QueryBorrowRepayRecordsInMarginAccountResponseRowsInner principal( } /** - * Get principal + * Principal repaid * * @return principal */ @@ -219,7 +220,8 @@ public QueryBorrowRepayRecordsInMarginAccountResponseRowsInner status( } /** - * Get status + * one of PENDING (pending execution), CONFIRMED (successfully execution), FAILED (execution + * failed, nothing happened to your account); * * @return status */ @@ -239,7 +241,7 @@ public QueryBorrowRepayRecordsInMarginAccountResponseRowsInner timestamp( } /** - * Get timestamp + * timestamp. * * @return timestamp */ @@ -259,7 +261,7 @@ public QueryBorrowRepayRecordsInMarginAccountResponseRowsInner txId( } /** - * Get txId + * tx Id. * * @return txId */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossIsolatedMarginCapitalFlowResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossIsolatedMarginCapitalFlowResponse.java index b499c7657..15ea4681c 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossIsolatedMarginCapitalFlowResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossIsolatedMarginCapitalFlowResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCrossIsolatedMarginCapitalFlowResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCrossIsolatedMarginCapitalFlowResponse extends ArrayList { public QueryCrossIsolatedMarginCapitalFlowResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossIsolatedMarginCapitalFlowResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossIsolatedMarginCapitalFlowResponseInner.java index 255284460..67ab08da4 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossIsolatedMarginCapitalFlowResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossIsolatedMarginCapitalFlowResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCrossIsolatedMarginCapitalFlowResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCrossIsolatedMarginCapitalFlowResponseInner { public static final String SERIALIZED_NAME_ID = "id"; @@ -78,6 +78,12 @@ public class QueryCrossIsolatedMarginCapitalFlowResponseInner { @jakarta.annotation.Nullable private String amount; + public static final String SERIALIZED_NAME_NOTE = "note"; + + @SerializedName(SERIALIZED_NAME_NOTE) + @jakarta.annotation.Nullable + private String note; + public QueryCrossIsolatedMarginCapitalFlowResponseInner() {} public QueryCrossIsolatedMarginCapitalFlowResponseInner id( @@ -87,7 +93,7 @@ public QueryCrossIsolatedMarginCapitalFlowResponseInner id( } /** - * Get id + * id. * * @return id */ @@ -107,7 +113,7 @@ public QueryCrossIsolatedMarginCapitalFlowResponseInner tranId( } /** - * Get tranId + * tran Id. * * @return tranId */ @@ -127,7 +133,7 @@ public QueryCrossIsolatedMarginCapitalFlowResponseInner timestamp( } /** - * Get timestamp + * timestamp. * * @return timestamp */ @@ -147,7 +153,7 @@ public QueryCrossIsolatedMarginCapitalFlowResponseInner asset( } /** - * Get asset + * asset. * * @return asset */ @@ -167,7 +173,7 @@ public QueryCrossIsolatedMarginCapitalFlowResponseInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -187,7 +193,7 @@ public QueryCrossIsolatedMarginCapitalFlowResponseInner type( } /** - * Get type + * type. * * @return type */ @@ -207,7 +213,7 @@ public QueryCrossIsolatedMarginCapitalFlowResponseInner amount( } /** - * Get amount + * amount. * * @return amount */ @@ -220,6 +226,26 @@ public void setAmount(@jakarta.annotation.Nullable String amount) { this.amount = amount; } + public QueryCrossIsolatedMarginCapitalFlowResponseInner note( + @jakarta.annotation.Nullable String note) { + this.note = note; + return this; + } + + /** + * note. + * + * @return note + */ + @jakarta.annotation.Nullable + public String getNote() { + return note; + } + + public void setNote(@jakarta.annotation.Nullable String note) { + this.note = note; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -242,12 +268,13 @@ public boolean equals(Object o) { this.symbol, queryCrossIsolatedMarginCapitalFlowResponseInner.symbol) && Objects.equals(this.type, queryCrossIsolatedMarginCapitalFlowResponseInner.type) && Objects.equals( - this.amount, queryCrossIsolatedMarginCapitalFlowResponseInner.amount); + this.amount, queryCrossIsolatedMarginCapitalFlowResponseInner.amount) + && Objects.equals(this.note, queryCrossIsolatedMarginCapitalFlowResponseInner.note); } @Override public int hashCode() { - return Objects.hash(id, tranId, timestamp, asset, symbol, type, amount); + return Objects.hash(id, tranId, timestamp, asset, symbol, type, amount, note); } @Override @@ -261,6 +288,7 @@ public String toString() { sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" note: ").append(toIndentedString(note)).append("\n"); sb.append("}"); return sb.toString(); } @@ -296,6 +324,10 @@ public String toUrlQueryString() { String amountValueAsString = ""; amountValueAsString = amountValue.toString(); sb.append("amount=").append(urlEncode(amountValueAsString)).append(""); + Object noteValue = getNote(); + String noteValueAsString = ""; + noteValueAsString = noteValue.toString(); + sb.append("note=").append(urlEncode(noteValueAsString)).append(""); return sb.toString(); } @@ -331,6 +363,7 @@ private String toIndentedString(Object o) { openapiFields.add("symbol"); openapiFields.add("type"); openapiFields.add("amount"); + openapiFields.add("note"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -390,6 +423,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("amount").toString())); } + if ((jsonObj.get("note") != null && !jsonObj.get("note").isJsonNull()) + && !jsonObj.get("note").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `note` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("note").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossMarginAccountDetailsResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossMarginAccountDetailsResponse.java index 827a92372..f48bce5a2 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossMarginAccountDetailsResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossMarginAccountDetailsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryCrossMarginAccountDetailsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCrossMarginAccountDetailsResponse { public static final String SERIALIZED_NAME_CREATED = "created"; @@ -137,7 +137,7 @@ public QueryCrossMarginAccountDetailsResponse created( } /** - * Get created + * True means margin account created , false means margin account not created. * * @return created */ @@ -157,7 +157,7 @@ public QueryCrossMarginAccountDetailsResponse borrowEnabled( } /** - * Get borrowEnabled + * borrow Enabled. * * @return borrowEnabled */ @@ -177,7 +177,7 @@ public QueryCrossMarginAccountDetailsResponse marginLevel( } /** - * Get marginLevel + * margin Level. * * @return marginLevel */ @@ -197,7 +197,7 @@ public QueryCrossMarginAccountDetailsResponse collateralMarginLevel( } /** - * Get collateralMarginLevel + * collateral Margin Level. * * @return collateralMarginLevel */ @@ -218,7 +218,7 @@ public QueryCrossMarginAccountDetailsResponse totalAssetOfBtc( } /** - * Get totalAssetOfBtc + * total Asset Of Btc. * * @return totalAssetOfBtc */ @@ -238,7 +238,7 @@ public QueryCrossMarginAccountDetailsResponse totalLiabilityOfBtc( } /** - * Get totalLiabilityOfBtc + * total Liability Of Btc. * * @return totalLiabilityOfBtc */ @@ -258,7 +258,7 @@ public QueryCrossMarginAccountDetailsResponse totalNetAssetOfBtc( } /** - * Get totalNetAssetOfBtc + * total Net Asset Of Btc. * * @return totalNetAssetOfBtc */ @@ -278,7 +278,7 @@ public QueryCrossMarginAccountDetailsResponse totalCollateralValueInUSDT( } /** - * Get totalCollateralValueInUSDT + * Total Collateral Value In USDT. * * @return totalCollateralValueInUSDT */ @@ -299,7 +299,7 @@ public QueryCrossMarginAccountDetailsResponse totalOpenOrderLossInUSDT( } /** - * Get totalOpenOrderLossInUSDT + * total Open Order Loss In USDT. * * @return totalOpenOrderLossInUSDT */ @@ -320,7 +320,7 @@ public QueryCrossMarginAccountDetailsResponse tradeEnabled( } /** - * Get tradeEnabled + * trade Enabled. * * @return tradeEnabled */ @@ -340,7 +340,7 @@ public QueryCrossMarginAccountDetailsResponse transferInEnabled( } /** - * Get transferInEnabled + * transfer In Enabled. * * @return transferInEnabled */ @@ -360,7 +360,7 @@ public QueryCrossMarginAccountDetailsResponse transferOutEnabled( } /** - * Get transferOutEnabled + * transfer Out Enabled. * * @return transferOutEnabled */ @@ -380,7 +380,7 @@ public QueryCrossMarginAccountDetailsResponse accountType( } /** - * Get accountType + * // MARGIN_1 for Cross Margin Classic, MARGIN_2 for Cross Margin Pro * * @return accountType */ @@ -410,7 +410,7 @@ public QueryCrossMarginAccountDetailsResponse addUserAssetsItem( } /** - * Get userAssets + * user Assets list. * * @return userAssets */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossMarginAccountDetailsResponseUserAssetsInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossMarginAccountDetailsResponseUserAssetsInner.java index 5b3e00433..8de5619cc 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossMarginAccountDetailsResponseUserAssetsInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossMarginAccountDetailsResponseUserAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCrossMarginAccountDetailsResponseUserAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCrossMarginAccountDetailsResponseUserAssetsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -81,7 +81,7 @@ public QueryCrossMarginAccountDetailsResponseUserAssetsInner asset( } /** - * Get asset + * asset. * * @return asset */ @@ -101,7 +101,7 @@ public QueryCrossMarginAccountDetailsResponseUserAssetsInner borrowed( } /** - * Get borrowed + * borrowed. * * @return borrowed */ @@ -121,7 +121,7 @@ public QueryCrossMarginAccountDetailsResponseUserAssetsInner free( } /** - * Get free + * free. * * @return free */ @@ -141,7 +141,7 @@ public QueryCrossMarginAccountDetailsResponseUserAssetsInner interest( } /** - * Get interest + * interest. * * @return interest */ @@ -161,7 +161,7 @@ public QueryCrossMarginAccountDetailsResponseUserAssetsInner locked( } /** - * Get locked + * locked. * * @return locked */ @@ -181,7 +181,7 @@ public QueryCrossMarginAccountDetailsResponseUserAssetsInner netAsset( } /** - * Get netAsset + * net Asset. * * @return netAsset */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossMarginFeeDataResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossMarginFeeDataResponse.java index 3549c1e19..3599a483e 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossMarginFeeDataResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossMarginFeeDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCrossMarginFeeDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCrossMarginFeeDataResponse extends ArrayList { public QueryCrossMarginFeeDataResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossMarginFeeDataResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossMarginFeeDataResponseInner.java index 20abd4d5a..2661ef00a 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossMarginFeeDataResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCrossMarginFeeDataResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** QueryCrossMarginFeeDataResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCrossMarginFeeDataResponseInner { public static final String SERIALIZED_NAME_VIP_LEVEL = "vipLevel"; @@ -97,7 +97,7 @@ public QueryCrossMarginFeeDataResponseInner vipLevel( } /** - * Get vipLevel + * vip Level. * * @return vipLevel */ @@ -116,7 +116,7 @@ public QueryCrossMarginFeeDataResponseInner coin(@jakarta.annotation.Nullable St } /** - * Get coin + * coin. * * @return coin */ @@ -136,7 +136,7 @@ public QueryCrossMarginFeeDataResponseInner transferIn( } /** - * Get transferIn + * transfer In. * * @return transferIn */ @@ -156,7 +156,7 @@ public QueryCrossMarginFeeDataResponseInner borrowable( } /** - * Get borrowable + * borrowable. * * @return borrowable */ @@ -176,7 +176,7 @@ public QueryCrossMarginFeeDataResponseInner dailyInterest( } /** - * Get dailyInterest + * daily Interest. * * @return dailyInterest */ @@ -196,7 +196,7 @@ public QueryCrossMarginFeeDataResponseInner yearlyInterest( } /** - * Get yearlyInterest + * yearly Interest. * * @return yearlyInterest */ @@ -216,7 +216,7 @@ public QueryCrossMarginFeeDataResponseInner borrowLimit( } /** - * Get borrowLimit + * borrow Limit. * * @return borrowLimit */ @@ -244,7 +244,7 @@ public QueryCrossMarginFeeDataResponseInner addMarginablePairsItem(String margin } /** - * Get marginablePairs + * marginable Pairs list. * * @return marginablePairs */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCurrentMarginOrderCountUsageResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCurrentMarginOrderCountUsageResponse.java index a1bbf5998..92db894a4 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCurrentMarginOrderCountUsageResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCurrentMarginOrderCountUsageResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCurrentMarginOrderCountUsageResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCurrentMarginOrderCountUsageResponse extends ArrayList { public QueryCurrentMarginOrderCountUsageResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCurrentMarginOrderCountUsageResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCurrentMarginOrderCountUsageResponseInner.java index afe241072..9307469a9 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCurrentMarginOrderCountUsageResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryCurrentMarginOrderCountUsageResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryCurrentMarginOrderCountUsageResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryCurrentMarginOrderCountUsageResponseInner { public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; @@ -75,7 +75,7 @@ public QueryCurrentMarginOrderCountUsageResponseInner rateLimitType( } /** - * Get rateLimitType + * rate Limit Type. * * @return rateLimitType */ @@ -95,7 +95,7 @@ public QueryCurrentMarginOrderCountUsageResponseInner interval( } /** - * Get interval + * interval. * * @return interval */ @@ -115,7 +115,7 @@ public QueryCurrentMarginOrderCountUsageResponseInner intervalNum( } /** - * Get intervalNum + * interval Num. * * @return intervalNum */ @@ -135,7 +135,7 @@ public QueryCurrentMarginOrderCountUsageResponseInner limit( } /** - * Get limit + * limit. * * @return limit */ @@ -155,7 +155,7 @@ public QueryCurrentMarginOrderCountUsageResponseInner count( } /** - * Get count + * count. * * @return count */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryEnabledIsolatedMarginAccountLimitResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryEnabledIsolatedMarginAccountLimitResponse.java index 1f1632fbb..c786deb0c 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryEnabledIsolatedMarginAccountLimitResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryEnabledIsolatedMarginAccountLimitResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryEnabledIsolatedMarginAccountLimitResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryEnabledIsolatedMarginAccountLimitResponse { public static final String SERIALIZED_NAME_ENABLED_ACCOUNT = "enabledAccount"; @@ -57,7 +57,7 @@ public QueryEnabledIsolatedMarginAccountLimitResponse enabledAccount( } /** - * Get enabledAccount + * enabled Account. * * @return enabledAccount */ @@ -77,7 +77,7 @@ public QueryEnabledIsolatedMarginAccountLimitResponse maxAccount( } /** - * Get maxAccount + * max Account. * * @return maxAccount */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginAccountInfoResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginAccountInfoResponse.java index aacf9d58f..8dca3a9b0 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginAccountInfoResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginAccountInfoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryIsolatedMarginAccountInfoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryIsolatedMarginAccountInfoResponse { public static final String SERIALIZED_NAME_ASSETS = "assets"; @@ -85,7 +85,7 @@ public QueryIsolatedMarginAccountInfoResponse addAssetsItem( } /** - * Get assets + * assets list. * * @return assets */ @@ -108,7 +108,7 @@ public QueryIsolatedMarginAccountInfoResponse totalAssetOfBtc( } /** - * Get totalAssetOfBtc + * total Asset Of Btc. * * @return totalAssetOfBtc */ @@ -128,7 +128,7 @@ public QueryIsolatedMarginAccountInfoResponse totalLiabilityOfBtc( } /** - * Get totalLiabilityOfBtc + * total Liability Of Btc. * * @return totalLiabilityOfBtc */ @@ -148,7 +148,7 @@ public QueryIsolatedMarginAccountInfoResponse totalNetAssetOfBtc( } /** - * Get totalNetAssetOfBtc + * total Net Asset Of Btc. * * @return totalNetAssetOfBtc */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginAccountInfoResponseAssetsInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginAccountInfoResponseAssetsInner.java index ae0bbeefe..d9d3534b6 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginAccountInfoResponseAssetsInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginAccountInfoResponseAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** QueryIsolatedMarginAccountInfoResponseAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryIsolatedMarginAccountInfoResponseAssetsInner { public static final String SERIALIZED_NAME_BASE_ASSET = "baseAsset"; @@ -166,7 +166,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -186,7 +186,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInner isolatedCreated( } /** - * Get isolatedCreated + * isolated Created. * * @return isolatedCreated */ @@ -206,7 +206,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInner enabled( } /** - * Get enabled + * true-enabled, false-disabled * * @return enabled */ @@ -226,7 +226,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInner marginLevel( } /** - * Get marginLevel + * margin Level. * * @return marginLevel */ @@ -246,7 +246,8 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInner marginLevelStatus( } /** - * Get marginLevelStatus + * \"EXCESSIVE\", \"NORMAL\", \"MARGIN_CALL\", + * \"PRE_LIQUIDATION\", \"FORCE_LIQUIDATION\" * * @return marginLevelStatus */ @@ -266,7 +267,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInner marginRatio( } /** - * Get marginRatio + * margin Ratio. * * @return marginRatio */ @@ -286,7 +287,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInner indexPrice( } /** - * Get indexPrice + * index Price. * * @return indexPrice */ @@ -306,7 +307,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInner liquidatePrice( } /** - * Get liquidatePrice + * liquidate Price. * * @return liquidatePrice */ @@ -326,7 +327,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInner liquidateRate( } /** - * Get liquidateRate + * liquidate Rate. * * @return liquidateRate */ @@ -346,7 +347,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInner tradeEnabled( } /** - * Get tradeEnabled + * trade Enabled. * * @return tradeEnabled */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset.java index b5491fa3f..c88ddfc6c 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset */ +/** base Asset object. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -105,7 +105,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset asset( } /** - * Get asset + * asset. * * @return asset */ @@ -125,7 +125,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset borrowEnabled( } /** - * Get borrowEnabled + * borrow Enabled. * * @return borrowEnabled */ @@ -145,7 +145,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset borrowed( } /** - * Get borrowed + * borrowed. * * @return borrowed */ @@ -165,7 +165,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset free( } /** - * Get free + * free. * * @return free */ @@ -185,7 +185,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset interest( } /** - * Get interest + * interest. * * @return interest */ @@ -205,7 +205,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset locked( } /** - * Get locked + * locked. * * @return locked */ @@ -225,7 +225,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset netAsset( } /** - * Get netAsset + * net Asset. * * @return netAsset */ @@ -245,7 +245,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset netAssetOfBtc( } /** - * Get netAssetOfBtc + * net Asset Of Btc. * * @return netAssetOfBtc */ @@ -265,7 +265,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset repayEnabled( } /** - * Get repayEnabled + * repay Enabled. * * @return repayEnabled */ @@ -285,7 +285,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset totalAsset( } /** - * Get totalAsset + * total Asset. * * @return totalAsset */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset.java index 988d5588b..985d95ce9 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset */ +/** quote Asset object. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -105,7 +105,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset asset( } /** - * Get asset + * asset. * * @return asset */ @@ -125,7 +125,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset borrowEnabled } /** - * Get borrowEnabled + * borrow Enabled. * * @return borrowEnabled */ @@ -145,7 +145,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset borrowed( } /** - * Get borrowed + * borrowed. * * @return borrowed */ @@ -165,7 +165,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset free( } /** - * Get free + * free. * * @return free */ @@ -185,7 +185,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset interest( } /** - * Get interest + * interest. * * @return interest */ @@ -205,7 +205,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset locked( } /** - * Get locked + * locked. * * @return locked */ @@ -225,7 +225,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset netAsset( } /** - * Get netAsset + * net Asset. * * @return netAsset */ @@ -245,7 +245,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset netAssetOfBtc } /** - * Get netAssetOfBtc + * net Asset Of Btc. * * @return netAssetOfBtc */ @@ -265,7 +265,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset repayEnabled( } /** - * Get repayEnabled + * repay Enabled. * * @return repayEnabled */ @@ -285,7 +285,7 @@ public QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset totalAsset( } /** - * Get totalAsset + * total Asset. * * @return totalAsset */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginFeeDataResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginFeeDataResponse.java index 6810a174e..c04ba978a 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginFeeDataResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginFeeDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryIsolatedMarginFeeDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryIsolatedMarginFeeDataResponse extends ArrayList { public QueryIsolatedMarginFeeDataResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginFeeDataResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginFeeDataResponseInner.java index 8470827b8..f95c17df4 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginFeeDataResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginFeeDataResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryIsolatedMarginFeeDataResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryIsolatedMarginFeeDataResponseInner { public static final String SERIALIZED_NAME_VIP_LEVEL = "vipLevel"; @@ -75,7 +75,7 @@ public QueryIsolatedMarginFeeDataResponseInner vipLevel( } /** - * Get vipLevel + * vip Level. * * @return vipLevel */ @@ -95,7 +95,7 @@ public QueryIsolatedMarginFeeDataResponseInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -115,7 +115,7 @@ public QueryIsolatedMarginFeeDataResponseInner leverage( } /** - * Get leverage + * leverage. * * @return leverage */ @@ -145,7 +145,7 @@ public QueryIsolatedMarginFeeDataResponseInner addDataItem( } /** - * Get data + * data list. * * @return data */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginFeeDataResponseInnerDataInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginFeeDataResponseInnerDataInner.java index dd058fd8b..93f0ffe82 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginFeeDataResponseInnerDataInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginFeeDataResponseInnerDataInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryIsolatedMarginFeeDataResponseInnerDataInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryIsolatedMarginFeeDataResponseInnerDataInner { public static final String SERIALIZED_NAME_COIN = "coin"; @@ -63,7 +63,7 @@ public QueryIsolatedMarginFeeDataResponseInnerDataInner coin( } /** - * Get coin + * coin. * * @return coin */ @@ -83,7 +83,7 @@ public QueryIsolatedMarginFeeDataResponseInnerDataInner dailyInterest( } /** - * Get dailyInterest + * daily Interest. * * @return dailyInterest */ @@ -103,7 +103,7 @@ public QueryIsolatedMarginFeeDataResponseInnerDataInner borrowLimit( } /** - * Get borrowLimit + * borrow Limit. * * @return borrowLimit */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginTierDataResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginTierDataResponse.java index 45bd14b40..1ffb62a65 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginTierDataResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginTierDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryIsolatedMarginTierDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryIsolatedMarginTierDataResponse extends ArrayList { public QueryIsolatedMarginTierDataResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginTierDataResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginTierDataResponseInner.java index 7fbca244d..5b46f8256 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginTierDataResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryIsolatedMarginTierDataResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryIsolatedMarginTierDataResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryIsolatedMarginTierDataResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -88,7 +88,7 @@ public QueryIsolatedMarginTierDataResponseInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -107,7 +107,7 @@ public QueryIsolatedMarginTierDataResponseInner tier(@jakarta.annotation.Nullabl } /** - * Get tier + * tier. * * @return tier */ @@ -127,7 +127,7 @@ public QueryIsolatedMarginTierDataResponseInner effectiveMultiple( } /** - * Get effectiveMultiple + * effective Multiple. * * @return effectiveMultiple */ @@ -147,7 +147,7 @@ public QueryIsolatedMarginTierDataResponseInner initialRiskRatio( } /** - * Get initialRiskRatio + * initial Risk Ratio. * * @return initialRiskRatio */ @@ -167,7 +167,7 @@ public QueryIsolatedMarginTierDataResponseInner liquidationRiskRatio( } /** - * Get liquidationRiskRatio + * liquidation Risk Ratio. * * @return liquidationRiskRatio */ @@ -187,7 +187,7 @@ public QueryIsolatedMarginTierDataResponseInner baseAssetMaxBorrowable( } /** - * Get baseAssetMaxBorrowable + * base Asset Max Borrowable. * * @return baseAssetMaxBorrowable */ @@ -208,7 +208,7 @@ public QueryIsolatedMarginTierDataResponseInner quoteAssetMaxBorrowable( } /** - * Get quoteAssetMaxBorrowable + * quote Asset Max Borrowable. * * @return quoteAssetMaxBorrowable */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse.java index 7fc2681c4..321662665 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse extends ArrayList { public QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInner.java index a9bdfa1cc..badd5ffa5 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInner { public static final String SERIALIZED_NAME_ASSET_NAMES = "assetNames"; @@ -81,7 +81,7 @@ public QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInner addAss } /** - * Get assetNames + * asset Names list. * * @return assetNames */ @@ -101,7 +101,7 @@ public QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInner rank( } /** - * Get rank + * rank. * * @return rank */ @@ -135,7 +135,7 @@ public QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInner addBra } /** - * Get brackets + * brackets list. * * @return brackets */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner.java index e211fb29c..2a9083b09 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner { public static final String SERIALIZED_NAME_LEVERAGE = "leverage"; @@ -76,7 +76,7 @@ public QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracket } /** - * Get leverage + * leverage. * * @return leverage */ @@ -96,7 +96,7 @@ public QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracket } /** - * Get maxDebt + * max Debt. * * @return maxDebt */ @@ -117,7 +117,7 @@ public void setMaxDebt(@jakarta.annotation.Nullable Double maxDebt) { } /** - * Get maintenanceMarginRate + * maintenance Margin Rate. * * @return maintenanceMarginRate */ @@ -139,7 +139,7 @@ public void setMaintenanceMarginRate( } /** - * Get initialMarginRate + * initial Margin Rate. * * @return initialMarginRate */ @@ -160,7 +160,7 @@ public QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracket } /** - * Get fastNum + * fast Num. * * @return fastNum */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiquidationLoanRepayHistoryResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiquidationLoanRepayHistoryResponse.java new file mode 100644 index 000000000..240d6e2c4 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiquidationLoanRepayHistoryResponse.java @@ -0,0 +1,288 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.binance.connector.client.margin_trading.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** QueryLiquidationLoanRepayHistoryResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class QueryLiquidationLoanRepayHistoryResponse { + public static final String SERIALIZED_NAME_TOTAL = "total"; + + @SerializedName(SERIALIZED_NAME_TOTAL) + @jakarta.annotation.Nullable + private Long total; + + public static final String SERIALIZED_NAME_ROWS = "rows"; + + @SerializedName(SERIALIZED_NAME_ROWS) + @jakarta.annotation.Nullable + private List<@Valid QueryLiquidationLoanRepayHistoryResponseRowsInner> rows; + + public QueryLiquidationLoanRepayHistoryResponse() {} + + public QueryLiquidationLoanRepayHistoryResponse total(@jakarta.annotation.Nullable Long total) { + this.total = total; + return this; + } + + /** + * Total number of repayment records + * + * @return total + */ + @jakarta.annotation.Nullable + public Long getTotal() { + return total; + } + + public void setTotal(@jakarta.annotation.Nullable Long total) { + this.total = total; + } + + public QueryLiquidationLoanRepayHistoryResponse rows( + @jakarta.annotation.Nullable + List<@Valid QueryLiquidationLoanRepayHistoryResponseRowsInner> rows) { + this.rows = rows; + return this; + } + + public QueryLiquidationLoanRepayHistoryResponse addRowsItem( + QueryLiquidationLoanRepayHistoryResponseRowsInner rowsItem) { + if (this.rows == null) { + this.rows = new ArrayList<>(); + } + this.rows.add(rowsItem); + return this; + } + + /** + * Get rows + * + * @return rows + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid QueryLiquidationLoanRepayHistoryResponseRowsInner> getRows() { + return rows; + } + + public void setRows( + @jakarta.annotation.Nullable + List<@Valid QueryLiquidationLoanRepayHistoryResponseRowsInner> rows) { + this.rows = rows; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryLiquidationLoanRepayHistoryResponse queryLiquidationLoanRepayHistoryResponse = + (QueryLiquidationLoanRepayHistoryResponse) o; + return Objects.equals(this.total, queryLiquidationLoanRepayHistoryResponse.total) + && Objects.equals(this.rows, queryLiquidationLoanRepayHistoryResponse.rows); + } + + @Override + public int hashCode() { + return Objects.hash(total, rows); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryLiquidationLoanRepayHistoryResponse {\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" rows: ").append(toIndentedString(rows)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object totalValue = getTotal(); + String totalValueAsString = ""; + totalValueAsString = totalValue.toString(); + sb.append("total=").append(urlEncode(totalValueAsString)).append(""); + Object rowsValue = getRows(); + String rowsValueAsString = ""; + rowsValueAsString = + (String) + ((Collection) rowsValue) + .stream().map(Object::toString).collect(Collectors.joining(",")); + sb.append("rows=").append(urlEncode(rowsValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("total"); + openapiFields.add("rows"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * QueryLiquidationLoanRepayHistoryResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QueryLiquidationLoanRepayHistoryResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " QueryLiquidationLoanRepayHistoryResponse is not found in" + + " the empty JSON string", + QueryLiquidationLoanRepayHistoryResponse.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("rows") != null && !jsonObj.get("rows").isJsonNull()) { + JsonArray jsonArrayrows = jsonObj.getAsJsonArray("rows"); + if (jsonArrayrows != null) { + // ensure the json data is an array + if (!jsonObj.get("rows").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rows` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("rows").toString())); + } + + // validate the optional field `rows` (array) + for (int i = 0; i < jsonArrayrows.size(); i++) { + QueryLiquidationLoanRepayHistoryResponseRowsInner.validateJsonElement( + jsonArrayrows.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QueryLiquidationLoanRepayHistoryResponse.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'QueryLiquidationLoanRepayHistoryResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(QueryLiquidationLoanRepayHistoryResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, QueryLiquidationLoanRepayHistoryResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QueryLiquidationLoanRepayHistoryResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of QueryLiquidationLoanRepayHistoryResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of QueryLiquidationLoanRepayHistoryResponse + * @throws IOException if the JSON string is invalid with respect to + * QueryLiquidationLoanRepayHistoryResponse + */ + public static QueryLiquidationLoanRepayHistoryResponse fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, QueryLiquidationLoanRepayHistoryResponse.class); + } + + /** + * Convert an instance of QueryLiquidationLoanRepayHistoryResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiquidationLoanRepayHistoryResponseRowsInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiquidationLoanRepayHistoryResponseRowsInner.java new file mode 100644 index 000000000..3fdace5d2 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiquidationLoanRepayHistoryResponseRowsInner.java @@ -0,0 +1,381 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.binance.connector.client.margin_trading.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** QueryLiquidationLoanRepayHistoryResponseRowsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class QueryLiquidationLoanRepayHistoryResponseRowsInner { + public static final String SERIALIZED_NAME_REPAY_ID = "repayId"; + + @SerializedName(SERIALIZED_NAME_REPAY_ID) + @jakarta.annotation.Nullable + private Long repayId; + + public static final String SERIALIZED_NAME_ASSET = "asset"; + + @SerializedName(SERIALIZED_NAME_ASSET) + @jakarta.annotation.Nullable + private String asset; + + public static final String SERIALIZED_NAME_AMOUNT = "amount"; + + @SerializedName(SERIALIZED_NAME_AMOUNT) + @jakarta.annotation.Nullable + private String amount; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @jakarta.annotation.Nullable + private String status; + + public static final String SERIALIZED_NAME_CREATE_TIME = "createTime"; + + @SerializedName(SERIALIZED_NAME_CREATE_TIME) + @jakarta.annotation.Nullable + private Long createTime; + + public QueryLiquidationLoanRepayHistoryResponseRowsInner() {} + + public QueryLiquidationLoanRepayHistoryResponseRowsInner repayId( + @jakarta.annotation.Nullable Long repayId) { + this.repayId = repayId; + return this; + } + + /** + * Unique identifier for the repayment transaction + * + * @return repayId + */ + @jakarta.annotation.Nullable + public Long getRepayId() { + return repayId; + } + + public void setRepayId(@jakarta.annotation.Nullable Long repayId) { + this.repayId = repayId; + } + + public QueryLiquidationLoanRepayHistoryResponseRowsInner asset( + @jakarta.annotation.Nullable String asset) { + this.asset = asset; + return this; + } + + /** + * Asset used for repayment + * + * @return asset + */ + @jakarta.annotation.Nullable + public String getAsset() { + return asset; + } + + public void setAsset(@jakarta.annotation.Nullable String asset) { + this.asset = asset; + } + + public QueryLiquidationLoanRepayHistoryResponseRowsInner amount( + @jakarta.annotation.Nullable String amount) { + this.amount = amount; + return this; + } + + /** + * The repayment amount + * + * @return amount + */ + @jakarta.annotation.Nullable + public String getAmount() { + return amount; + } + + public void setAmount(@jakarta.annotation.Nullable String amount) { + this.amount = amount; + } + + public QueryLiquidationLoanRepayHistoryResponseRowsInner status( + @jakarta.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * Repayment status: `SUCCESS` (completed) or `PENDING` (processing) + * + * @return status + */ + @jakarta.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(@jakarta.annotation.Nullable String status) { + this.status = status; + } + + public QueryLiquidationLoanRepayHistoryResponseRowsInner createTime( + @jakarta.annotation.Nullable Long createTime) { + this.createTime = createTime; + return this; + } + + /** + * Unix timestamp (milliseconds) when the repayment was created + * + * @return createTime + */ + @jakarta.annotation.Nullable + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(@jakarta.annotation.Nullable Long createTime) { + this.createTime = createTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryLiquidationLoanRepayHistoryResponseRowsInner + queryLiquidationLoanRepayHistoryResponseRowsInner = + (QueryLiquidationLoanRepayHistoryResponseRowsInner) o; + return Objects.equals( + this.repayId, queryLiquidationLoanRepayHistoryResponseRowsInner.repayId) + && Objects.equals( + this.asset, queryLiquidationLoanRepayHistoryResponseRowsInner.asset) + && Objects.equals( + this.amount, queryLiquidationLoanRepayHistoryResponseRowsInner.amount) + && Objects.equals( + this.status, queryLiquidationLoanRepayHistoryResponseRowsInner.status) + && Objects.equals( + this.createTime, + queryLiquidationLoanRepayHistoryResponseRowsInner.createTime); + } + + @Override + public int hashCode() { + return Objects.hash(repayId, asset, amount, status, createTime); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryLiquidationLoanRepayHistoryResponseRowsInner {\n"); + sb.append(" repayId: ").append(toIndentedString(repayId)).append("\n"); + sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" createTime: ").append(toIndentedString(createTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object repayIdValue = getRepayId(); + String repayIdValueAsString = ""; + repayIdValueAsString = repayIdValue.toString(); + sb.append("repayId=").append(urlEncode(repayIdValueAsString)).append(""); + Object assetValue = getAsset(); + String assetValueAsString = ""; + assetValueAsString = assetValue.toString(); + sb.append("asset=").append(urlEncode(assetValueAsString)).append(""); + Object amountValue = getAmount(); + String amountValueAsString = ""; + amountValueAsString = amountValue.toString(); + sb.append("amount=").append(urlEncode(amountValueAsString)).append(""); + Object statusValue = getStatus(); + String statusValueAsString = ""; + statusValueAsString = statusValue.toString(); + sb.append("status=").append(urlEncode(statusValueAsString)).append(""); + Object createTimeValue = getCreateTime(); + String createTimeValueAsString = ""; + createTimeValueAsString = createTimeValue.toString(); + sb.append("createTime=").append(urlEncode(createTimeValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("repayId"); + openapiFields.add("asset"); + openapiFields.add("amount"); + openapiFields.add("status"); + openapiFields.add("createTime"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * QueryLiquidationLoanRepayHistoryResponseRowsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QueryLiquidationLoanRepayHistoryResponseRowsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " QueryLiquidationLoanRepayHistoryResponseRowsInner is not" + + " found in the empty JSON string", + QueryLiquidationLoanRepayHistoryResponseRowsInner + .openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) + && !jsonObj.get("asset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `asset` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("asset").toString())); + } + if ((jsonObj.get("amount") != null && !jsonObj.get("amount").isJsonNull()) + && !jsonObj.get("amount").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `amount` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("amount").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) + && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QueryLiquidationLoanRepayHistoryResponseRowsInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'QueryLiquidationLoanRepayHistoryResponseRowsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get(QueryLiquidationLoanRepayHistoryResponseRowsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, + QueryLiquidationLoanRepayHistoryResponseRowsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QueryLiquidationLoanRepayHistoryResponseRowsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of QueryLiquidationLoanRepayHistoryResponseRowsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of QueryLiquidationLoanRepayHistoryResponseRowsInner + * @throws IOException if the JSON string is invalid with respect to + * QueryLiquidationLoanRepayHistoryResponseRowsInner + */ + public static QueryLiquidationLoanRepayHistoryResponseRowsInner fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, QueryLiquidationLoanRepayHistoryResponseRowsInner.class); + } + + /** + * Convert an instance of QueryLiquidationLoanRepayHistoryResponseRowsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiquidationLoanResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiquidationLoanResponse.java new file mode 100644 index 000000000..ebbd48bed --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryLiquidationLoanResponse.java @@ -0,0 +1,338 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.binance.connector.client.margin_trading.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** QueryLiquidationLoanResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class QueryLiquidationLoanResponse { + public static final String SERIALIZED_NAME_ASSET = "asset"; + + @SerializedName(SERIALIZED_NAME_ASSET) + @jakarta.annotation.Nullable + private String asset; + + public static final String SERIALIZED_NAME_AMOUNT = "amount"; + + @SerializedName(SERIALIZED_NAME_AMOUNT) + @jakarta.annotation.Nullable + private String amount; + + public static final String SERIALIZED_NAME_REPAID_AMOUNT = "repaidAmount"; + + @SerializedName(SERIALIZED_NAME_REPAID_AMOUNT) + @jakarta.annotation.Nullable + private String repaidAmount; + + public static final String SERIALIZED_NAME_REMAINING_AMOUNT = "remainingAmount"; + + @SerializedName(SERIALIZED_NAME_REMAINING_AMOUNT) + @jakarta.annotation.Nullable + private String remainingAmount; + + public QueryLiquidationLoanResponse() {} + + public QueryLiquidationLoanResponse asset(@jakarta.annotation.Nullable String asset) { + this.asset = asset; + return this; + } + + /** + * The asset of the liquidation loan (USDC by default) + * + * @return asset + */ + @jakarta.annotation.Nullable + public String getAsset() { + return asset; + } + + public void setAsset(@jakarta.annotation.Nullable String asset) { + this.asset = asset; + } + + public QueryLiquidationLoanResponse amount(@jakarta.annotation.Nullable String amount) { + this.amount = amount; + return this; + } + + /** + * Total liquidation loan amount + * + * @return amount + */ + @jakarta.annotation.Nullable + public String getAmount() { + return amount; + } + + public void setAmount(@jakarta.annotation.Nullable String amount) { + this.amount = amount; + } + + public QueryLiquidationLoanResponse repaidAmount( + @jakarta.annotation.Nullable String repaidAmount) { + this.repaidAmount = repaidAmount; + return this; + } + + /** + * Amount that has been repaid + * + * @return repaidAmount + */ + @jakarta.annotation.Nullable + public String getRepaidAmount() { + return repaidAmount; + } + + public void setRepaidAmount(@jakarta.annotation.Nullable String repaidAmount) { + this.repaidAmount = repaidAmount; + } + + public QueryLiquidationLoanResponse remainingAmount( + @jakarta.annotation.Nullable String remainingAmount) { + this.remainingAmount = remainingAmount; + return this; + } + + /** + * Outstanding amount remaining to be repaid + * + * @return remainingAmount + */ + @jakarta.annotation.Nullable + public String getRemainingAmount() { + return remainingAmount; + } + + public void setRemainingAmount(@jakarta.annotation.Nullable String remainingAmount) { + this.remainingAmount = remainingAmount; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryLiquidationLoanResponse queryLiquidationLoanResponse = + (QueryLiquidationLoanResponse) o; + return Objects.equals(this.asset, queryLiquidationLoanResponse.asset) + && Objects.equals(this.amount, queryLiquidationLoanResponse.amount) + && Objects.equals(this.repaidAmount, queryLiquidationLoanResponse.repaidAmount) + && Objects.equals( + this.remainingAmount, queryLiquidationLoanResponse.remainingAmount); + } + + @Override + public int hashCode() { + return Objects.hash(asset, amount, repaidAmount, remainingAmount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryLiquidationLoanResponse {\n"); + sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" repaidAmount: ").append(toIndentedString(repaidAmount)).append("\n"); + sb.append(" remainingAmount: ").append(toIndentedString(remainingAmount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object assetValue = getAsset(); + String assetValueAsString = ""; + assetValueAsString = assetValue.toString(); + sb.append("asset=").append(urlEncode(assetValueAsString)).append(""); + Object amountValue = getAmount(); + String amountValueAsString = ""; + amountValueAsString = amountValue.toString(); + sb.append("amount=").append(urlEncode(amountValueAsString)).append(""); + Object repaidAmountValue = getRepaidAmount(); + String repaidAmountValueAsString = ""; + repaidAmountValueAsString = repaidAmountValue.toString(); + sb.append("repaidAmount=").append(urlEncode(repaidAmountValueAsString)).append(""); + Object remainingAmountValue = getRemainingAmount(); + String remainingAmountValueAsString = ""; + remainingAmountValueAsString = remainingAmountValue.toString(); + sb.append("remainingAmount=").append(urlEncode(remainingAmountValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("asset"); + openapiFields.add("amount"); + openapiFields.add("repaidAmount"); + openapiFields.add("remainingAmount"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * QueryLiquidationLoanResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QueryLiquidationLoanResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in QueryLiquidationLoanResponse is not" + + " found in the empty JSON string", + QueryLiquidationLoanResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) + && !jsonObj.get("asset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `asset` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("asset").toString())); + } + if ((jsonObj.get("amount") != null && !jsonObj.get("amount").isJsonNull()) + && !jsonObj.get("amount").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `amount` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("amount").toString())); + } + if ((jsonObj.get("repaidAmount") != null && !jsonObj.get("repaidAmount").isJsonNull()) + && !jsonObj.get("repaidAmount").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `repaidAmount` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("repaidAmount").toString())); + } + if ((jsonObj.get("remainingAmount") != null && !jsonObj.get("remainingAmount").isJsonNull()) + && !jsonObj.get("remainingAmount").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `remainingAmount` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("remainingAmount").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QueryLiquidationLoanResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QueryLiquidationLoanResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(QueryLiquidationLoanResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, QueryLiquidationLoanResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QueryLiquidationLoanResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of QueryLiquidationLoanResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of QueryLiquidationLoanResponse + * @throws IOException if the JSON string is invalid with respect to + * QueryLiquidationLoanResponse + */ + public static QueryLiquidationLoanResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QueryLiquidationLoanResponse.class); + } + + /** + * Convert an instance of QueryLiquidationLoanResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOcoResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOcoResponse.java index 6e4bf8ff6..cb1c40270 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOcoResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOcoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountsAllOcoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsAllOcoResponse extends ArrayList { public QueryMarginAccountsAllOcoResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOcoResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOcoResponseInner.java index 131cc7717..6061212cb 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOcoResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOcoResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryMarginAccountsAllOcoResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsAllOcoResponseInner { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; @@ -105,7 +105,7 @@ public QueryMarginAccountsAllOcoResponseInner orderListId( } /** - * Get orderListId + * order List Id. * * @return orderListId */ @@ -125,7 +125,7 @@ public QueryMarginAccountsAllOcoResponseInner contingencyType( } /** - * Get contingencyType + * contingency Type. * * @return contingencyType */ @@ -145,7 +145,7 @@ public QueryMarginAccountsAllOcoResponseInner listStatusType( } /** - * Get listStatusType + * list Status Type. * * @return listStatusType */ @@ -165,7 +165,7 @@ public QueryMarginAccountsAllOcoResponseInner listOrderStatus( } /** - * Get listOrderStatus + * list Order Status. * * @return listOrderStatus */ @@ -185,7 +185,7 @@ public QueryMarginAccountsAllOcoResponseInner listClientOrderId( } /** - * Get listClientOrderId + * list Client Order Id. * * @return listClientOrderId */ @@ -205,7 +205,7 @@ public QueryMarginAccountsAllOcoResponseInner transactionTime( } /** - * Get transactionTime + * transaction Time. * * @return transactionTime */ @@ -225,7 +225,7 @@ public QueryMarginAccountsAllOcoResponseInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -245,7 +245,7 @@ public QueryMarginAccountsAllOcoResponseInner isIsolated( } /** - * Get isIsolated + * if isolated margin * * @return isIsolated */ @@ -275,7 +275,7 @@ public QueryMarginAccountsAllOcoResponseInner addOrdersItem( } /** - * Get orders + * orders list. * * @return orders */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOcoResponseInnerOrdersInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOcoResponseInnerOrdersInner.java index 7c2a52484..5cfb84ba4 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOcoResponseInnerOrdersInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOcoResponseInnerOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountsAllOcoResponseInnerOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsAllOcoResponseInnerOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public QueryMarginAccountsAllOcoResponseInnerOrdersInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -83,7 +83,7 @@ public QueryMarginAccountsAllOcoResponseInnerOrdersInner orderId( } /** - * Get orderId + * order Id. * * @return orderId */ @@ -103,7 +103,7 @@ public QueryMarginAccountsAllOcoResponseInnerOrdersInner clientOrderId( } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOrdersResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOrdersResponse.java index 04b9adbef..44bfd1993 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOrdersResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountsAllOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsAllOrdersResponse extends ArrayList { public QueryMarginAccountsAllOrdersResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOrdersResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOrdersResponseInner.java index fb9ea77b4..0d1698c80 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOrdersResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsAllOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountsAllOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsAllOrdersResponseInner { public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -154,7 +154,7 @@ public QueryMarginAccountsAllOrdersResponseInner clientOrderId( } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ @@ -174,7 +174,7 @@ public QueryMarginAccountsAllOrdersResponseInner cummulativeQuoteQty( } /** - * Get cummulativeQuoteQty + * cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -194,7 +194,7 @@ public QueryMarginAccountsAllOrdersResponseInner executedQty( } /** - * Get executedQty + * executed Qty. * * @return executedQty */ @@ -214,7 +214,7 @@ public QueryMarginAccountsAllOrdersResponseInner icebergQty( } /** - * Get icebergQty + * iceberg Qty. * * @return icebergQty */ @@ -234,7 +234,7 @@ public QueryMarginAccountsAllOrdersResponseInner isWorking( } /** - * Get isWorking + * is Working. * * @return isWorking */ @@ -254,7 +254,7 @@ public QueryMarginAccountsAllOrdersResponseInner orderId( } /** - * Get orderId + * order Id. * * @return orderId */ @@ -274,7 +274,7 @@ public QueryMarginAccountsAllOrdersResponseInner origQty( } /** - * Get origQty + * orig Qty. * * @return origQty */ @@ -294,7 +294,7 @@ public QueryMarginAccountsAllOrdersResponseInner price( } /** - * Get price + * price. * * @return price */ @@ -314,7 +314,7 @@ public QueryMarginAccountsAllOrdersResponseInner side( } /** - * Get side + * side. * * @return side */ @@ -334,7 +334,7 @@ public QueryMarginAccountsAllOrdersResponseInner status( } /** - * Get status + * status. * * @return status */ @@ -354,7 +354,7 @@ public QueryMarginAccountsAllOrdersResponseInner stopPrice( } /** - * Get stopPrice + * stop Price. * * @return stopPrice */ @@ -374,7 +374,7 @@ public QueryMarginAccountsAllOrdersResponseInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -394,7 +394,7 @@ public QueryMarginAccountsAllOrdersResponseInner isIsolated( } /** - * Get isIsolated + * is Isolated. * * @return isIsolated */ @@ -413,7 +413,7 @@ public QueryMarginAccountsAllOrdersResponseInner time(@jakarta.annotation.Nullab } /** - * Get time + * time. * * @return time */ @@ -433,7 +433,7 @@ public QueryMarginAccountsAllOrdersResponseInner timeInForce( } /** - * Get timeInForce + * time In Force. * * @return timeInForce */ @@ -453,7 +453,7 @@ public QueryMarginAccountsAllOrdersResponseInner type( } /** - * Get type + * type. * * @return type */ @@ -473,7 +473,7 @@ public QueryMarginAccountsAllOrdersResponseInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self Trade Prevention Mode. * * @return selfTradePreventionMode */ @@ -494,7 +494,7 @@ public QueryMarginAccountsAllOrdersResponseInner updateTime( } /** - * Get updateTime + * update Time. * * @return updateTime */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOcoResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOcoResponse.java index 87cff8126..25ab677e7 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOcoResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOcoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryMarginAccountsOcoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsOcoResponse { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; @@ -105,7 +105,7 @@ public QueryMarginAccountsOcoResponse orderListId( } /** - * Get orderListId + * order List Id. * * @return orderListId */ @@ -125,7 +125,7 @@ public QueryMarginAccountsOcoResponse contingencyType( } /** - * Get contingencyType + * contingency Type. * * @return contingencyType */ @@ -145,7 +145,7 @@ public QueryMarginAccountsOcoResponse listStatusType( } /** - * Get listStatusType + * list Status Type. * * @return listStatusType */ @@ -165,7 +165,7 @@ public QueryMarginAccountsOcoResponse listOrderStatus( } /** - * Get listOrderStatus + * list Order Status. * * @return listOrderStatus */ @@ -185,7 +185,7 @@ public QueryMarginAccountsOcoResponse listClientOrderId( } /** - * Get listClientOrderId + * list Client Order Id. * * @return listClientOrderId */ @@ -205,7 +205,7 @@ public QueryMarginAccountsOcoResponse transactionTime( } /** - * Get transactionTime + * transaction Time. * * @return transactionTime */ @@ -224,7 +224,7 @@ public QueryMarginAccountsOcoResponse symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * symbol. * * @return symbol */ @@ -244,7 +244,7 @@ public QueryMarginAccountsOcoResponse isIsolated( } /** - * Get isIsolated + * if isolated margin * * @return isIsolated */ @@ -274,7 +274,7 @@ public QueryMarginAccountsOcoResponse addOrdersItem( } /** - * Get orders + * orders list. * * @return orders */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOcoResponseOrdersInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOcoResponseOrdersInner.java index fd8e21173..a641e412c 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOcoResponseOrdersInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOcoResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountsOcoResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsOcoResponseOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public QueryMarginAccountsOcoResponseOrdersInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -83,7 +83,7 @@ public QueryMarginAccountsOcoResponseOrdersInner orderId( } /** - * Get orderId + * order Id. * * @return orderId */ @@ -103,7 +103,7 @@ public QueryMarginAccountsOcoResponseOrdersInner clientOrderId( } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOcoResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOcoResponse.java index c8d692d07..489597308 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOcoResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOcoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountsOpenOcoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsOpenOcoResponse extends ArrayList { public QueryMarginAccountsOpenOcoResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOcoResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOcoResponseInner.java index c6a0833e0..930899ee3 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOcoResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOcoResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryMarginAccountsOpenOcoResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsOpenOcoResponseInner { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; @@ -105,7 +105,7 @@ public QueryMarginAccountsOpenOcoResponseInner orderListId( } /** - * Get orderListId + * order List Id. * * @return orderListId */ @@ -125,7 +125,7 @@ public QueryMarginAccountsOpenOcoResponseInner contingencyType( } /** - * Get contingencyType + * contingency Type. * * @return contingencyType */ @@ -145,7 +145,7 @@ public QueryMarginAccountsOpenOcoResponseInner listStatusType( } /** - * Get listStatusType + * list Status Type. * * @return listStatusType */ @@ -165,7 +165,7 @@ public QueryMarginAccountsOpenOcoResponseInner listOrderStatus( } /** - * Get listOrderStatus + * list Order Status. * * @return listOrderStatus */ @@ -185,7 +185,7 @@ public QueryMarginAccountsOpenOcoResponseInner listClientOrderId( } /** - * Get listClientOrderId + * list Client Order Id. * * @return listClientOrderId */ @@ -205,7 +205,7 @@ public QueryMarginAccountsOpenOcoResponseInner transactionTime( } /** - * Get transactionTime + * transaction Time. * * @return transactionTime */ @@ -225,7 +225,7 @@ public QueryMarginAccountsOpenOcoResponseInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -245,7 +245,7 @@ public QueryMarginAccountsOpenOcoResponseInner isIsolated( } /** - * Get isIsolated + * if isolated margin * * @return isIsolated */ @@ -275,7 +275,7 @@ public QueryMarginAccountsOpenOcoResponseInner addOrdersItem( } /** - * Get orders + * orders list. * * @return orders */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOcoResponseInnerOrdersInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOcoResponseInnerOrdersInner.java index dd82413f3..df2fb9561 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOcoResponseInnerOrdersInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOcoResponseInnerOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountsOpenOcoResponseInnerOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsOpenOcoResponseInnerOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -63,7 +63,7 @@ public QueryMarginAccountsOpenOcoResponseInnerOrdersInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -83,7 +83,7 @@ public QueryMarginAccountsOpenOcoResponseInnerOrdersInner orderId( } /** - * Get orderId + * order Id. * * @return orderId */ @@ -103,7 +103,7 @@ public QueryMarginAccountsOpenOcoResponseInnerOrdersInner clientOrderId( } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOrdersResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOrdersResponse.java index cf850469e..2e701f7b5 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOrdersResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountsOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsOpenOrdersResponse extends ArrayList { public QueryMarginAccountsOpenOrdersResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOrdersResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOrdersResponseInner.java index 533eb4465..997502105 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOrdersResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOpenOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountsOpenOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsOpenOrdersResponseInner { public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -154,7 +154,7 @@ public QueryMarginAccountsOpenOrdersResponseInner clientOrderId( } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ @@ -174,7 +174,7 @@ public QueryMarginAccountsOpenOrdersResponseInner cummulativeQuoteQty( } /** - * Get cummulativeQuoteQty + * cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -194,7 +194,7 @@ public QueryMarginAccountsOpenOrdersResponseInner executedQty( } /** - * Get executedQty + * executed Qty. * * @return executedQty */ @@ -214,7 +214,7 @@ public QueryMarginAccountsOpenOrdersResponseInner icebergQty( } /** - * Get icebergQty + * iceberg Qty. * * @return icebergQty */ @@ -234,7 +234,7 @@ public QueryMarginAccountsOpenOrdersResponseInner isWorking( } /** - * Get isWorking + * is Working. * * @return isWorking */ @@ -254,7 +254,7 @@ public QueryMarginAccountsOpenOrdersResponseInner orderId( } /** - * Get orderId + * order Id. * * @return orderId */ @@ -274,7 +274,7 @@ public QueryMarginAccountsOpenOrdersResponseInner origQty( } /** - * Get origQty + * orig Qty. * * @return origQty */ @@ -294,7 +294,7 @@ public QueryMarginAccountsOpenOrdersResponseInner price( } /** - * Get price + * price. * * @return price */ @@ -314,7 +314,7 @@ public QueryMarginAccountsOpenOrdersResponseInner side( } /** - * Get side + * side. * * @return side */ @@ -334,7 +334,7 @@ public QueryMarginAccountsOpenOrdersResponseInner status( } /** - * Get status + * status. * * @return status */ @@ -354,7 +354,7 @@ public QueryMarginAccountsOpenOrdersResponseInner stopPrice( } /** - * Get stopPrice + * stop Price. * * @return stopPrice */ @@ -374,7 +374,7 @@ public QueryMarginAccountsOpenOrdersResponseInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -394,7 +394,7 @@ public QueryMarginAccountsOpenOrdersResponseInner isIsolated( } /** - * Get isIsolated + * is Isolated. * * @return isIsolated */ @@ -413,7 +413,7 @@ public QueryMarginAccountsOpenOrdersResponseInner time(@jakarta.annotation.Nulla } /** - * Get time + * time. * * @return time */ @@ -433,7 +433,7 @@ public QueryMarginAccountsOpenOrdersResponseInner timeInForce( } /** - * Get timeInForce + * time In Force. * * @return timeInForce */ @@ -453,7 +453,7 @@ public QueryMarginAccountsOpenOrdersResponseInner type( } /** - * Get type + * type. * * @return type */ @@ -473,7 +473,7 @@ public QueryMarginAccountsOpenOrdersResponseInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self Trade Prevention Mode. * * @return selfTradePreventionMode */ @@ -494,7 +494,7 @@ public QueryMarginAccountsOpenOrdersResponseInner updateTime( } /** - * Get updateTime + * update Time. * * @return updateTime */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOrderResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOrderResponse.java index 66fce8398..43bc7588d 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOrderResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountsOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsOrderResponse { public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @@ -154,7 +154,7 @@ public QueryMarginAccountsOrderResponse clientOrderId( } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ @@ -174,7 +174,7 @@ public QueryMarginAccountsOrderResponse cummulativeQuoteQty( } /** - * Get cummulativeQuoteQty + * cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -194,7 +194,7 @@ public QueryMarginAccountsOrderResponse executedQty( } /** - * Get executedQty + * executed Qty. * * @return executedQty */ @@ -214,7 +214,7 @@ public QueryMarginAccountsOrderResponse icebergQty( } /** - * Get icebergQty + * iceberg Qty. * * @return icebergQty */ @@ -234,7 +234,7 @@ public QueryMarginAccountsOrderResponse isWorking( } /** - * Get isWorking + * is Working. * * @return isWorking */ @@ -253,7 +253,7 @@ public QueryMarginAccountsOrderResponse orderId(@jakarta.annotation.Nullable Lon } /** - * Get orderId + * order Id. * * @return orderId */ @@ -272,7 +272,7 @@ public QueryMarginAccountsOrderResponse origQty(@jakarta.annotation.Nullable Str } /** - * Get origQty + * orig Qty. * * @return origQty */ @@ -291,7 +291,7 @@ public QueryMarginAccountsOrderResponse price(@jakarta.annotation.Nullable Strin } /** - * Get price + * price. * * @return price */ @@ -310,7 +310,7 @@ public QueryMarginAccountsOrderResponse side(@jakarta.annotation.Nullable String } /** - * Get side + * side. * * @return side */ @@ -329,7 +329,7 @@ public QueryMarginAccountsOrderResponse status(@jakarta.annotation.Nullable Stri } /** - * Get status + * status. * * @return status */ @@ -349,7 +349,7 @@ public QueryMarginAccountsOrderResponse stopPrice( } /** - * Get stopPrice + * stop Price. * * @return stopPrice */ @@ -368,7 +368,7 @@ public QueryMarginAccountsOrderResponse symbol(@jakarta.annotation.Nullable Stri } /** - * Get symbol + * symbol. * * @return symbol */ @@ -388,7 +388,7 @@ public QueryMarginAccountsOrderResponse isIsolated( } /** - * Get isIsolated + * is Isolated. * * @return isIsolated */ @@ -407,7 +407,7 @@ public QueryMarginAccountsOrderResponse time(@jakarta.annotation.Nullable Long t } /** - * Get time + * time. * * @return time */ @@ -427,7 +427,7 @@ public QueryMarginAccountsOrderResponse timeInForce( } /** - * Get timeInForce + * time In Force. * * @return timeInForce */ @@ -446,7 +446,7 @@ public QueryMarginAccountsOrderResponse type(@jakarta.annotation.Nullable String } /** - * Get type + * type. * * @return type */ @@ -466,7 +466,7 @@ public QueryMarginAccountsOrderResponse selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self Trade Prevention Mode. * * @return selfTradePreventionMode */ @@ -487,7 +487,7 @@ public QueryMarginAccountsOrderResponse updateTime( } /** - * Get updateTime + * update Time. * * @return updateTime */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsTradeListResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsTradeListResponse.java index 257e6bf75..4457647fb 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsTradeListResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsTradeListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountsTradeListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsTradeListResponse extends ArrayList { public QueryMarginAccountsTradeListResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsTradeListResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsTradeListResponseInner.java index 8353f3017..f8d151229 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsTradeListResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAccountsTradeListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginAccountsTradeListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAccountsTradeListResponseInner { public static final String SERIALIZED_NAME_COMMISSION = "commission"; @@ -117,7 +117,7 @@ public QueryMarginAccountsTradeListResponseInner commission( } /** - * Get commission + * commission. * * @return commission */ @@ -137,7 +137,7 @@ public QueryMarginAccountsTradeListResponseInner commissionAsset( } /** - * Get commissionAsset + * commission Asset. * * @return commissionAsset */ @@ -156,7 +156,7 @@ public QueryMarginAccountsTradeListResponseInner id(@jakarta.annotation.Nullable } /** - * Get id + * id. * * @return id */ @@ -176,7 +176,7 @@ public QueryMarginAccountsTradeListResponseInner isBestMatch( } /** - * Get isBestMatch + * is Best Match. * * @return isBestMatch */ @@ -196,7 +196,7 @@ public QueryMarginAccountsTradeListResponseInner isBuyer( } /** - * Get isBuyer + * is Buyer. * * @return isBuyer */ @@ -216,7 +216,7 @@ public QueryMarginAccountsTradeListResponseInner isMaker( } /** - * Get isMaker + * is Maker. * * @return isMaker */ @@ -236,7 +236,7 @@ public QueryMarginAccountsTradeListResponseInner orderId( } /** - * Get orderId + * order Id. * * @return orderId */ @@ -256,7 +256,7 @@ public QueryMarginAccountsTradeListResponseInner price( } /** - * Get price + * price. * * @return price */ @@ -275,7 +275,7 @@ public QueryMarginAccountsTradeListResponseInner qty(@jakarta.annotation.Nullabl } /** - * Get qty + * qty. * * @return qty */ @@ -295,7 +295,7 @@ public QueryMarginAccountsTradeListResponseInner symbol( } /** - * Get symbol + * symbol. * * @return symbol */ @@ -315,7 +315,7 @@ public QueryMarginAccountsTradeListResponseInner isIsolated( } /** - * Get isIsolated + * is Isolated. * * @return isIsolated */ @@ -334,7 +334,7 @@ public QueryMarginAccountsTradeListResponseInner time(@jakarta.annotation.Nullab } /** - * Get time + * time. * * @return time */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAvailableInventoryResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAvailableInventoryResponse.java index e338cbfb7..6be65668b 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAvailableInventoryResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAvailableInventoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -22,26 +22,27 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; +import java.util.HashMap; import java.util.HashSet; +import java.util.Map; import java.util.Objects; import org.hibernate.validator.constraints.*; /** QueryMarginAvailableInventoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginAvailableInventoryResponse { public static final String SERIALIZED_NAME_ASSETS = "assets"; @SerializedName(SERIALIZED_NAME_ASSETS) @jakarta.annotation.Nullable - private QueryMarginAvailableInventoryResponseAssets assets; + private Map assets; public static final String SERIALIZED_NAME_UPDATE_TIME = "updateTime"; @@ -52,24 +53,30 @@ public class QueryMarginAvailableInventoryResponse { public QueryMarginAvailableInventoryResponse() {} public QueryMarginAvailableInventoryResponse assets( - @jakarta.annotation.Nullable QueryMarginAvailableInventoryResponseAssets assets) { + @jakarta.annotation.Nullable Map assets) { this.assets = assets; return this; } + public QueryMarginAvailableInventoryResponse putAssetsItem(String key, String assetsItem) { + if (this.assets == null) { + this.assets = new HashMap<>(); + } + this.assets.put(key, assetsItem); + return this; + } + /** - * Get assets + * Available inventory per asset. Keys are asset symbols, values are available amounts. * * @return assets */ @jakarta.annotation.Nullable - @Valid - public QueryMarginAvailableInventoryResponseAssets getAssets() { + public Map getAssets() { return assets; } - public void setAssets( - @jakarta.annotation.Nullable QueryMarginAvailableInventoryResponseAssets assets) { + public void setAssets(@jakarta.annotation.Nullable Map assets) { this.assets = assets; } @@ -80,7 +87,7 @@ public QueryMarginAvailableInventoryResponse updateTime( } /** - * Get updateTime + * update Time. * * @return updateTime */ @@ -189,10 +196,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `assets` - if (jsonObj.get("assets") != null && !jsonObj.get("assets").isJsonNull()) { - QueryMarginAvailableInventoryResponseAssets.validateJsonElement(jsonObj.get("assets")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAvailableInventoryResponseAssets.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAvailableInventoryResponseAssets.java deleted file mode 100644 index 85782fccf..000000000 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginAvailableInventoryResponseAssets.java +++ /dev/null @@ -1,346 +0,0 @@ -/* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.margin_trading.rest.model; - -import com.binance.connector.client.margin_trading.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** QueryMarginAvailableInventoryResponseAssets */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class QueryMarginAvailableInventoryResponseAssets { - public static final String SERIALIZED_NAME_M_A_T_I_C = "MATIC"; - - @SerializedName(SERIALIZED_NAME_M_A_T_I_C) - @jakarta.annotation.Nullable - private String MATIC; - - public static final String SERIALIZED_NAME_S_T_P_T = "STPT"; - - @SerializedName(SERIALIZED_NAME_S_T_P_T) - @jakarta.annotation.Nullable - private String STPT; - - public static final String SERIALIZED_NAME_T_V_K = "TVK"; - - @SerializedName(SERIALIZED_NAME_T_V_K) - @jakarta.annotation.Nullable - private String TVK; - - public static final String SERIALIZED_NAME_S_H_I_B = "SHIB"; - - @SerializedName(SERIALIZED_NAME_S_H_I_B) - @jakarta.annotation.Nullable - private String SHIB; - - public QueryMarginAvailableInventoryResponseAssets() {} - - public QueryMarginAvailableInventoryResponseAssets MATIC( - @jakarta.annotation.Nullable String MATIC) { - this.MATIC = MATIC; - return this; - } - - /** - * Get MATIC - * - * @return MATIC - */ - @jakarta.annotation.Nullable - public String getMATIC() { - return MATIC; - } - - public void setMATIC(@jakarta.annotation.Nullable String MATIC) { - this.MATIC = MATIC; - } - - public QueryMarginAvailableInventoryResponseAssets STPT( - @jakarta.annotation.Nullable String STPT) { - this.STPT = STPT; - return this; - } - - /** - * Get STPT - * - * @return STPT - */ - @jakarta.annotation.Nullable - public String getSTPT() { - return STPT; - } - - public void setSTPT(@jakarta.annotation.Nullable String STPT) { - this.STPT = STPT; - } - - public QueryMarginAvailableInventoryResponseAssets TVK( - @jakarta.annotation.Nullable String TVK) { - this.TVK = TVK; - return this; - } - - /** - * Get TVK - * - * @return TVK - */ - @jakarta.annotation.Nullable - public String getTVK() { - return TVK; - } - - public void setTVK(@jakarta.annotation.Nullable String TVK) { - this.TVK = TVK; - } - - public QueryMarginAvailableInventoryResponseAssets SHIB( - @jakarta.annotation.Nullable String SHIB) { - this.SHIB = SHIB; - return this; - } - - /** - * Get SHIB - * - * @return SHIB - */ - @jakarta.annotation.Nullable - public String getSHIB() { - return SHIB; - } - - public void setSHIB(@jakarta.annotation.Nullable String SHIB) { - this.SHIB = SHIB; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - QueryMarginAvailableInventoryResponseAssets queryMarginAvailableInventoryResponseAssets = - (QueryMarginAvailableInventoryResponseAssets) o; - return Objects.equals(this.MATIC, queryMarginAvailableInventoryResponseAssets.MATIC) - && Objects.equals(this.STPT, queryMarginAvailableInventoryResponseAssets.STPT) - && Objects.equals(this.TVK, queryMarginAvailableInventoryResponseAssets.TVK) - && Objects.equals(this.SHIB, queryMarginAvailableInventoryResponseAssets.SHIB); - } - - @Override - public int hashCode() { - return Objects.hash(MATIC, STPT, TVK, SHIB); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class QueryMarginAvailableInventoryResponseAssets {\n"); - sb.append(" MATIC: ").append(toIndentedString(MATIC)).append("\n"); - sb.append(" STPT: ").append(toIndentedString(STPT)).append("\n"); - sb.append(" TVK: ").append(toIndentedString(TVK)).append("\n"); - sb.append(" SHIB: ").append(toIndentedString(SHIB)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object MATICValue = getMATIC(); - String MATICValueAsString = ""; - MATICValueAsString = MATICValue.toString(); - sb.append("MATIC=").append(urlEncode(MATICValueAsString)).append(""); - Object STPTValue = getSTPT(); - String STPTValueAsString = ""; - STPTValueAsString = STPTValue.toString(); - sb.append("STPT=").append(urlEncode(STPTValueAsString)).append(""); - Object TVKValue = getTVK(); - String TVKValueAsString = ""; - TVKValueAsString = TVKValue.toString(); - sb.append("TVK=").append(urlEncode(TVKValueAsString)).append(""); - Object SHIBValue = getSHIB(); - String SHIBValueAsString = ""; - SHIBValueAsString = SHIBValue.toString(); - sb.append("SHIB=").append(urlEncode(SHIBValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("MATIC"); - openapiFields.add("STPT"); - openapiFields.add("TVK"); - openapiFields.add("SHIB"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * QueryMarginAvailableInventoryResponseAssets - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!QueryMarginAvailableInventoryResponseAssets.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " QueryMarginAvailableInventoryResponseAssets is not found in" - + " the empty JSON string", - QueryMarginAvailableInventoryResponseAssets.openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("MATIC") != null && !jsonObj.get("MATIC").isJsonNull()) - && !jsonObj.get("MATIC").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `MATIC` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("MATIC").toString())); - } - if ((jsonObj.get("STPT") != null && !jsonObj.get("STPT").isJsonNull()) - && !jsonObj.get("STPT").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `STPT` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("STPT").toString())); - } - if ((jsonObj.get("TVK") != null && !jsonObj.get("TVK").isJsonNull()) - && !jsonObj.get("TVK").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TVK` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("TVK").toString())); - } - if ((jsonObj.get("SHIB") != null && !jsonObj.get("SHIB").isJsonNull()) - && !jsonObj.get("SHIB").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SHIB` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("SHIB").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!QueryMarginAvailableInventoryResponseAssets.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'QueryMarginAvailableInventoryResponseAssets' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(QueryMarginAvailableInventoryResponseAssets.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, QueryMarginAvailableInventoryResponseAssets value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public QueryMarginAvailableInventoryResponseAssets read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of QueryMarginAvailableInventoryResponseAssets given an JSON string - * - * @param jsonString JSON string - * @return An instance of QueryMarginAvailableInventoryResponseAssets - * @throws IOException if the JSON string is invalid with respect to - * QueryMarginAvailableInventoryResponseAssets - */ - public static QueryMarginAvailableInventoryResponseAssets fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, QueryMarginAvailableInventoryResponseAssets.class); - } - - /** - * Convert an instance of QueryMarginAvailableInventoryResponseAssets to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginInterestRateHistoryResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginInterestRateHistoryResponse.java index 3467c674b..2c5a6b85c 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginInterestRateHistoryResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginInterestRateHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginInterestRateHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginInterestRateHistoryResponse extends ArrayList { public QueryMarginInterestRateHistoryResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginInterestRateHistoryResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginInterestRateHistoryResponseInner.java index 341dcfeff..9c90ea211 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginInterestRateHistoryResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginInterestRateHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginInterestRateHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginInterestRateHistoryResponseInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -69,7 +69,7 @@ public QueryMarginInterestRateHistoryResponseInner asset( } /** - * Get asset + * asset. * * @return asset */ @@ -89,7 +89,7 @@ public QueryMarginInterestRateHistoryResponseInner dailyInterestRate( } /** - * Get dailyInterestRate + * daily Interest Rate. * * @return dailyInterestRate */ @@ -109,7 +109,7 @@ public QueryMarginInterestRateHistoryResponseInner timestamp( } /** - * Get timestamp + * timestamp. * * @return timestamp */ @@ -129,7 +129,7 @@ public QueryMarginInterestRateHistoryResponseInner vipLevel( } /** - * Get vipLevel + * vip Level. * * @return vipLevel */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginPriceindexResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginPriceindexResponse.java index ca28acc98..c057f10fc 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginPriceindexResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMarginPriceindexResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMarginPriceindexResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMarginPriceindexResponse { public static final String SERIALIZED_NAME_CALC_TIME = "calcTime"; @@ -62,7 +62,7 @@ public QueryMarginPriceindexResponse calcTime(@jakarta.annotation.Nullable Long } /** - * Get calcTime + * calc Time. * * @return calcTime */ @@ -81,7 +81,7 @@ public QueryMarginPriceindexResponse price(@jakarta.annotation.Nullable String p } /** - * Get price + * price. * * @return price */ @@ -100,7 +100,7 @@ public QueryMarginPriceindexResponse symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * symbol. * * @return symbol */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMaxBorrowResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMaxBorrowResponse.java index 5fe3f9e20..7f1da7137 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMaxBorrowResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMaxBorrowResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMaxBorrowResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMaxBorrowResponse { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -56,7 +56,7 @@ public QueryMaxBorrowResponse amount(@jakarta.annotation.Nullable String amount) } /** - * Get amount + * account's currently max borrowable amount with sufficient system availability * * @return amount */ @@ -75,7 +75,7 @@ public QueryMaxBorrowResponse borrowLimit(@jakarta.annotation.Nullable String bo } /** - * Get borrowLimit + * max borrowable amount limited by the account level * * @return borrowLimit */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMaxTransferOutAmountResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMaxTransferOutAmountResponse.java index 116d22630..e2e535d0b 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMaxTransferOutAmountResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryMaxTransferOutAmountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryMaxTransferOutAmountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryMaxTransferOutAmountResponse { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -50,7 +50,7 @@ public QueryMaxTransferOutAmountResponse amount(@jakarta.annotation.Nullable Str } /** - * Get amount + * amount. * * @return amount */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryPreventedMatchesResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryPreventedMatchesResponse.java index f1d4622c2..f0485b622 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryPreventedMatchesResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryPreventedMatchesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryPreventedMatchesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryPreventedMatchesResponse extends ArrayList { public QueryPreventedMatchesResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryPreventedMatchesResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryPreventedMatchesResponseInner.java index 8b39eec9c..2c31bb7b8 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryPreventedMatchesResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QueryPreventedMatchesResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryPreventedMatchesResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryPreventedMatchesResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -105,7 +105,7 @@ public QueryPreventedMatchesResponseInner symbol(@jakarta.annotation.Nullable St } /** - * Get symbol + * symbol. * * @return symbol */ @@ -125,7 +125,7 @@ public QueryPreventedMatchesResponseInner preventedMatchId( } /** - * Get preventedMatchId + * prevented Match Id. * * @return preventedMatchId */ @@ -145,7 +145,7 @@ public QueryPreventedMatchesResponseInner takerOrderId( } /** - * Get takerOrderId + * taker Order Id. * * @return takerOrderId */ @@ -165,7 +165,7 @@ public QueryPreventedMatchesResponseInner makerSymbol( } /** - * Get makerSymbol + * maker Symbol. * * @return makerSymbol */ @@ -185,7 +185,7 @@ public QueryPreventedMatchesResponseInner makerOrderId( } /** - * Get makerOrderId + * maker Order Id. * * @return makerOrderId */ @@ -205,7 +205,7 @@ public QueryPreventedMatchesResponseInner tradeGroupId( } /** - * Get tradeGroupId + * trade Group Id. * * @return tradeGroupId */ @@ -225,7 +225,7 @@ public QueryPreventedMatchesResponseInner selfTradePreventionMode( } /** - * Get selfTradePreventionMode + * self Trade Prevention Mode. * * @return selfTradePreventionMode */ @@ -245,7 +245,7 @@ public QueryPreventedMatchesResponseInner price(@jakarta.annotation.Nullable Str } /** - * Get price + * price. * * @return price */ @@ -265,7 +265,7 @@ public QueryPreventedMatchesResponseInner makerPreventedQuantity( } /** - * Get makerPreventedQuantity + * maker Prevented Quantity. * * @return makerPreventedQuantity */ @@ -286,7 +286,7 @@ public QueryPreventedMatchesResponseInner transactTime( } /** - * Get transactTime + * transact Time. * * @return transactTime */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QuerySpecialKeyListResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QuerySpecialKeyListResponse.java index 1e8f85bff..33af70228 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QuerySpecialKeyListResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QuerySpecialKeyListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QuerySpecialKeyListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySpecialKeyListResponse extends ArrayList { public QuerySpecialKeyListResponse() {} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QuerySpecialKeyListResponseInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QuerySpecialKeyListResponseInner.java index 21e56a72b..1272aca82 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QuerySpecialKeyListResponseInner.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QuerySpecialKeyListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QuerySpecialKeyListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySpecialKeyListResponseInner { public static final String SERIALIZED_NAME_API_NAME = "apiName"; @@ -74,7 +74,7 @@ public QuerySpecialKeyListResponseInner apiName(@jakarta.annotation.Nullable Str } /** - * Get apiName + * api Name. * * @return apiName */ @@ -93,7 +93,7 @@ public QuerySpecialKeyListResponseInner apiKey(@jakarta.annotation.Nullable Stri } /** - * Get apiKey + * api Key. * * @return apiKey */ @@ -112,7 +112,7 @@ public QuerySpecialKeyListResponseInner ip(@jakarta.annotation.Nullable String i } /** - * Get ip + * ip. * * @return ip */ @@ -131,7 +131,7 @@ public QuerySpecialKeyListResponseInner type(@jakarta.annotation.Nullable String } /** - * Get type + * type. * * @return type */ @@ -151,7 +151,7 @@ public QuerySpecialKeyListResponseInner permissionMode( } /** - * Get permissionMode + * permission Mode. * * @return permissionMode */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QuerySpecialKeyResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QuerySpecialKeyResponse.java index 3c6737d95..14e7b8f4d 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QuerySpecialKeyResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/QuerySpecialKeyResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QuerySpecialKeyResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySpecialKeyResponse { public static final String SERIALIZED_NAME_API_KEY = "apiKey"; @@ -74,7 +74,7 @@ public QuerySpecialKeyResponse apiKey(@jakarta.annotation.Nullable String apiKey } /** - * Get apiKey + * api Key. * * @return apiKey */ @@ -93,7 +93,7 @@ public QuerySpecialKeyResponse ip(@jakarta.annotation.Nullable String ip) { } /** - * Get ip + * 0.0.0.0 is just an initial statereference (no extra meaning). * * @return ip */ @@ -112,7 +112,7 @@ public QuerySpecialKeyResponse apiName(@jakarta.annotation.Nullable String apiNa } /** - * Get apiName + * api Name. * * @return apiName */ @@ -131,7 +131,7 @@ public QuerySpecialKeyResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * type. * * @return type */ @@ -151,7 +151,7 @@ public QuerySpecialKeyResponse permissionMode( } /** - * Get permissionMode + * permission Mode. * * @return permissionMode */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/SelfTradePreventionMode.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/SelfTradePreventionMode.java new file mode 100644 index 000000000..c006c22f6 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/SelfTradePreventionMode.java @@ -0,0 +1,77 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets selfTradePreventionMode */ +@JsonAdapter(SelfTradePreventionMode.Adapter.class) +public enum SelfTradePreventionMode { + EXPIRE_TAKER("EXPIRE_TAKER"), + + EXPIRE_MAKER("EXPIRE_MAKER"), + + EXPIRE_BOTH("EXPIRE_BOTH"), + + NONE("NONE"); + + private String value; + + SelfTradePreventionMode(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SelfTradePreventionMode fromValue(String value) { + for (SelfTradePreventionMode b : SelfTradePreventionMode.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SelfTradePreventionMode enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SelfTradePreventionMode read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SelfTradePreventionMode.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SelfTradePreventionMode.fromValue(value); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/Side.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/Side.java index 6c98e4f7f..aa148cc0d 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/Side.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/Side.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/SideEffectType.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/SideEffectType.java new file mode 100644 index 000000000..92d8c7a89 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/SideEffectType.java @@ -0,0 +1,73 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets sideEffectType */ +@JsonAdapter(SideEffectType.Adapter.class) +public enum SideEffectType { + NO_SIDE_EFFECT("NO_SIDE_EFFECT"), + + MARGIN_BUY("MARGIN_BUY"); + + private String value; + + SideEffectType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SideEffectType fromValue(String value) { + for (SideEffectType b : SideEffectType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SideEffectType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SideEffectType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SideEffectType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SideEffectType.fromValue(value); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/SmallLiabilityExchangeRequest.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/SmallLiabilityExchangeRequest.java index 637596946..2aeef868e 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/SmallLiabilityExchangeRequest.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/SmallLiabilityExchangeRequest.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -22,7 +22,6 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -35,13 +34,13 @@ /** SmallLiabilityExchangeRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SmallLiabilityExchangeRequest { public static final String SERIALIZED_NAME_ASSET_NAMES = "assetNames"; @SerializedName(SERIALIZED_NAME_ASSET_NAMES) @jakarta.annotation.Nonnull - private AssetNames assetNames; + private String assetNames; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -51,25 +50,23 @@ public class SmallLiabilityExchangeRequest { public SmallLiabilityExchangeRequest() {} - public SmallLiabilityExchangeRequest assetNames( - @jakarta.annotation.Nonnull AssetNames assetNames) { + public SmallLiabilityExchangeRequest assetNames(@jakarta.annotation.Nonnull String assetNames) { this.assetNames = assetNames; return this; } /** - * Get assetNames + * The assets list of small liability exchange * * @return assetNames */ @jakarta.annotation.Nonnull @NotNull - @Valid - public AssetNames getAssetNames() { + public String getAssetNames() { return assetNames; } - public void setAssetNames(@jakarta.annotation.Nonnull AssetNames assetNames) { + public void setAssetNames(@jakarta.annotation.Nonnull String assetNames) { this.assetNames = assetNames; } @@ -79,11 +76,12 @@ public SmallLiabilityExchangeRequest recvWindow(@jakarta.annotation.Nullable Lon } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -197,6 +195,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("assetNames").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `assetNames` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("assetNames").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/StartUserDataStreamResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/StartUserDataStreamResponse.java index 14905500e..fe236fba2 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/StartUserDataStreamResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/StartUserDataStreamResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** StartUserDataStreamResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class StartUserDataStreamResponse { public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; @@ -50,7 +50,7 @@ public StartUserDataStreamResponse listenKey(@jakarta.annotation.Nullable String } /** - * Get listenKey + * listen Key. * * @return listenKey */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/StopLimitTimeInForce.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/StopLimitTimeInForce.java new file mode 100644 index 000000000..ad716674b --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/StopLimitTimeInForce.java @@ -0,0 +1,75 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets stopLimitTimeInForce */ +@JsonAdapter(StopLimitTimeInForce.Adapter.class) +public enum StopLimitTimeInForce { + GTC("GTC"), + + FOK("FOK"), + + IOC("IOC"); + + private String value; + + StopLimitTimeInForce(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StopLimitTimeInForce fromValue(String value) { + for (StopLimitTimeInForce b : StopLimitTimeInForce.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StopLimitTimeInForce enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StopLimitTimeInForce read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StopLimitTimeInForce.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StopLimitTimeInForce.fromValue(value); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/TimeInForce.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/TimeInForce.java index c5a021aca..4b4525d5d 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/TimeInForce.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/TimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/WorkingSide.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/WorkingSide.java new file mode 100644 index 000000000..0cce51b33 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/WorkingSide.java @@ -0,0 +1,73 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets workingSide */ +@JsonAdapter(WorkingSide.Adapter.class) +public enum WorkingSide { + BUY("BUY"), + + SELL("SELL"); + + private String value; + + WorkingSide(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static WorkingSide fromValue(String value) { + for (WorkingSide b : WorkingSide.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final WorkingSide enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public WorkingSide read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return WorkingSide.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + WorkingSide.fromValue(value); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/WorkingTimeInForce.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/WorkingTimeInForce.java new file mode 100644 index 000000000..81cfcb036 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/WorkingTimeInForce.java @@ -0,0 +1,75 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets workingTimeInForce */ +@JsonAdapter(WorkingTimeInForce.Adapter.class) +public enum WorkingTimeInForce { + GTC("GTC"), + + IOC("IOC"), + + FOK("FOK"); + + private String value; + + WorkingTimeInForce(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static WorkingTimeInForce fromValue(String value) { + for (WorkingTimeInForce b : WorkingTimeInForce.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final WorkingTimeInForce enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public WorkingTimeInForce read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return WorkingTimeInForce.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + WorkingTimeInForce.fromValue(value); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/WorkingType.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/WorkingType.java new file mode 100644 index 000000000..8b6fdc939 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/model/WorkingType.java @@ -0,0 +1,73 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets workingType */ +@JsonAdapter(WorkingType.Adapter.class) +public enum WorkingType { + LIMIT("LIMIT"), + + LIMIT_MAKER("LIMIT_MAKER"); + + private String value; + + WorkingType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static WorkingType fromValue(String value) { + for (WorkingType b : WorkingType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final WorkingType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public WorkingType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return WorkingType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + WorkingType.fromValue(value); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/JSON.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/JSON.java index 239bb6c2d..8819689f5 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/JSON.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading WebSocket Market Streams - * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams + * Margin WebSocket Market Streams + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -88,16 +88,6 @@ public static GsonBuilder createGson() { com.binance.connector.client.margin_trading .websocket.stream.model.UserLiabilityChange .class); - classByDiscriminatorValue.put( - "marginLevelStatusChange", - com.binance.connector.client.margin_trading - .websocket.stream.model - .MarginLevelStatusChange.class); - classByDiscriminatorValue.put( - "userLiabilityChange", - com.binance.connector.client.margin_trading - .websocket.stream.model.UserLiabilityChange - .class); classByDiscriminatorValue.put( "RiskDataStreamEventsResponse", com.binance.connector.client.margin_trading @@ -125,53 +115,39 @@ public static GsonBuilder createGson() { Map classByDiscriminatorValue = new HashMap(); classByDiscriminatorValue.put( - "balanceUpdate", + "MARGIN_LEVEL_STATUS_CHANGE", com.binance.connector.client.margin_trading - .websocket.stream.model.Balanceupdate - .class); + .websocket.stream.model + .MarginLevelStatusChange.class); classByDiscriminatorValue.put( - "executionReport", + "USER_LIABILITY_CHANGE", com.binance.connector.client.margin_trading - .websocket.stream.model.Executionreport + .websocket.stream.model.UserLiabilityChange .class); classByDiscriminatorValue.put( - "listStatus", - com.binance.connector.client.margin_trading - .websocket.stream.model.Liststatus.class); - classByDiscriminatorValue.put( - "listenKeyExpired", + "balanceUpdate", com.binance.connector.client.margin_trading - .websocket.stream.model.Listenkeyexpired + .websocket.stream.model.BalanceUpdate .class); classByDiscriminatorValue.put( - "outboundAccountPosition", - com.binance.connector.client.margin_trading - .websocket.stream.model - .Outboundaccountposition.class); - classByDiscriminatorValue.put( - "balanceupdate", + "executionReport", com.binance.connector.client.margin_trading - .websocket.stream.model.Balanceupdate + .websocket.stream.model.ExecutionReport .class); classByDiscriminatorValue.put( - "executionreport", + "listStatus", com.binance.connector.client.margin_trading - .websocket.stream.model.Executionreport - .class); + .websocket.stream.model.ListStatus.class); classByDiscriminatorValue.put( - "listenkeyexpired", + "listenKeyExpired", com.binance.connector.client.margin_trading - .websocket.stream.model.Listenkeyexpired + .websocket.stream.model.ListenKeyExpired .class); classByDiscriminatorValue.put( - "liststatus", - com.binance.connector.client.margin_trading - .websocket.stream.model.Liststatus.class); - classByDiscriminatorValue.put( - "outboundaccountposition", + "outboundAccountPosition", com.binance.connector.client.margin_trading .websocket.stream.model - .Outboundaccountposition.class); + .OutboundAccountPosition.class); classByDiscriminatorValue.put( "TradeDataStreamEventsResponse", com.binance.connector.client.margin_trading @@ -232,29 +208,29 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.margin_trading.websocket.stream.model.Balanceupdate + new com.binance.connector.client.margin_trading.websocket.stream.model.BalanceUpdate .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.margin_trading.websocket.stream.model - .Executionreport.CustomTypeAdapterFactory()); + .ExecutionReport.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.margin_trading.websocket.stream.model - .Listenkeyexpired.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.margin_trading.websocket.stream.model.Liststatus + new com.binance.connector.client.margin_trading.websocket.stream.model.ListStatus .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.margin_trading.websocket.stream.model - .ListstatusOInner.CustomTypeAdapterFactory()); + .ListStatusOInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.margin_trading.websocket.stream.model + .ListenKeyExpired.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.margin_trading.websocket.stream.model .MarginLevelStatusChange.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.margin_trading.websocket.stream.model - .Outboundaccountposition.CustomTypeAdapterFactory()); + .OutboundAccountPosition.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.margin_trading.websocket.stream.model - .OutboundaccountpositionBInner.CustomTypeAdapterFactory()); + .OutboundAccountPositionBInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.margin_trading.websocket.stream.model .RiskDataStreamEventsResponse.CustomTypeAdapterFactory()); diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/MarginTradingWebSocketStreamsUtil.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/MarginTradingWebSocketStreamsUtil.java index b58ee6760..ce047e025 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/MarginTradingWebSocketStreamsUtil.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/MarginTradingWebSocketStreamsUtil.java @@ -3,7 +3,7 @@ import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; public class MarginTradingWebSocketStreamsUtil { - private static final String BASE_URL = "wss://stream.binance.com:9443"; + private static final String BASE_URL = "wss://margin-stream.binance.com"; private static final boolean HAS_TIME_UNIT = false; public static WebSocketClientConfiguration getClientConfiguration() { diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/api/MarginTradingWebSocketStreams.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/api/MarginTradingWebSocketStreams.java index 46563b37c..95aac79eb 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/api/MarginTradingWebSocketStreams.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/api/MarginTradingWebSocketStreams.java @@ -20,7 +20,7 @@ public class MarginTradingWebSocketStreams { private static final String USER_AGENT = String.format( - "binance-margin-trading/6.1.0 (Java/%s; %s; %s)", + "binance-margin-trading/7.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final StreamConnectionInterface connection; @@ -40,6 +40,12 @@ public MarginTradingWebSocketStreams(StreamConnectionInterface connection) { this.connection = connection; } + public void stop() throws Exception { + if (connection != null && connection.isConnected()) { + connection.stop(); + } + } + /** * Subscribes to the risk data WebSocket stream using the provided listen key. * diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/AbstractOpenApiSchema.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/AbstractOpenApiSchema.java index 86215f07e..6c9ed5bd2 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/AbstractOpenApiSchema.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/AbstractOpenApiSchema.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading WebSocket Market Streams - * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams + * Margin WebSocket Market Streams + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -18,7 +18,7 @@ /** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/BalanceUpdate.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/BalanceUpdate.java new file mode 100644 index 000000000..192a8110b --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/BalanceUpdate.java @@ -0,0 +1,358 @@ +/* + * Margin WebSocket Market Streams + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.margin_trading.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** BalanceUpdate */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class BalanceUpdate extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private String aLowerCase; + + public static final String SERIALIZED_NAME_D_LOWER_CASE = "d"; + + @SerializedName(SERIALIZED_NAME_D_LOWER_CASE) + @jakarta.annotation.Nullable + private String dLowerCase; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public BalanceUpdate() {} + + public BalanceUpdate E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public BalanceUpdate aLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + /** + * Asset + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + public String getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + } + + public BalanceUpdate dLowerCase(@jakarta.annotation.Nullable String dLowerCase) { + this.dLowerCase = dLowerCase; + return this; + } + + /** + * Balance Delta + * + * @return dLowerCase + */ + @jakarta.annotation.Nullable + public String getdLowerCase() { + return dLowerCase; + } + + public void setdLowerCase(@jakarta.annotation.Nullable String dLowerCase) { + this.dLowerCase = dLowerCase; + } + + public BalanceUpdate T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * Clear Time + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BalanceUpdate balanceUpdate = (BalanceUpdate) o; + return Objects.equals(this.E, balanceUpdate.E) + && Objects.equals(this.aLowerCase, balanceUpdate.aLowerCase) + && Objects.equals(this.dLowerCase, balanceUpdate.dLowerCase) + && Objects.equals(this.T, balanceUpdate.T); + } + + @Override + public int hashCode() { + return Objects.hash(E, aLowerCase, dLowerCase, T); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BalanceUpdate {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" dLowerCase: ").append(toIndentedString(dLowerCase)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = aLowerCaseValue.toString(); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + String dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + String dLowerCaseValueAsString = dLowerCaseValue.toString(); + valMap.put("dLowerCase", dLowerCaseValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + Object dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + valMap.put("dLowerCase", dLowerCaseValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("a"); + openapiFields.add("d"); + openapiFields.add("T"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BalanceUpdate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BalanceUpdate.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in BalanceUpdate is not found in the" + + " empty JSON string", + BalanceUpdate.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BalanceUpdate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `BalanceUpdate` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) + && !jsonObj.get("a").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `a` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("a").toString())); + } + if ((jsonObj.get("d") != null && !jsonObj.get("d").isJsonNull()) + && !jsonObj.get("d").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `d` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("d").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BalanceUpdate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BalanceUpdate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(BalanceUpdate.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, BalanceUpdate value) throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BalanceUpdate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of BalanceUpdate given an JSON string + * + * @param jsonString JSON string + * @return An instance of BalanceUpdate + * @throws IOException if the JSON string is invalid with respect to BalanceUpdate + */ + public static BalanceUpdate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BalanceUpdate.class); + } + + /** + * Convert an instance of BalanceUpdate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Balanceupdate.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Balanceupdate.java deleted file mode 100644 index 365f0e769..000000000 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Balanceupdate.java +++ /dev/null @@ -1,358 +0,0 @@ -/* - * Binance Margin Trading WebSocket Market Streams - * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.margin_trading.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.margin_trading.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** Balanceupdate */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Balanceupdate extends BaseDTO { - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private Long E; - - public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; - - @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) - @jakarta.annotation.Nullable - private String aLowerCase; - - public static final String SERIALIZED_NAME_D_LOWER_CASE = "d"; - - @SerializedName(SERIALIZED_NAME_D_LOWER_CASE) - @jakarta.annotation.Nullable - private String dLowerCase; - - public static final String SERIALIZED_NAME_T = "T"; - - @SerializedName(SERIALIZED_NAME_T) - @jakarta.annotation.Nullable - private Long T; - - public Balanceupdate() {} - - public Balanceupdate E(@jakarta.annotation.Nullable Long E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public Long getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable Long E) { - this.E = E; - } - - public Balanceupdate aLowerCase(@jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - return this; - } - - /** - * Get aLowerCase - * - * @return aLowerCase - */ - @jakarta.annotation.Nullable - public String getaLowerCase() { - return aLowerCase; - } - - public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - } - - public Balanceupdate dLowerCase(@jakarta.annotation.Nullable String dLowerCase) { - this.dLowerCase = dLowerCase; - return this; - } - - /** - * Get dLowerCase - * - * @return dLowerCase - */ - @jakarta.annotation.Nullable - public String getdLowerCase() { - return dLowerCase; - } - - public void setdLowerCase(@jakarta.annotation.Nullable String dLowerCase) { - this.dLowerCase = dLowerCase; - } - - public Balanceupdate T(@jakarta.annotation.Nullable Long T) { - this.T = T; - return this; - } - - /** - * Get T - * - * @return T - */ - @jakarta.annotation.Nullable - public Long getT() { - return T; - } - - public void setT(@jakarta.annotation.Nullable Long T) { - this.T = T; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Balanceupdate balanceupdate = (Balanceupdate) o; - return Objects.equals(this.E, balanceupdate.E) - && Objects.equals(this.aLowerCase, balanceupdate.aLowerCase) - && Objects.equals(this.dLowerCase, balanceupdate.dLowerCase) - && Objects.equals(this.T, balanceupdate.T); - } - - @Override - public int hashCode() { - return Objects.hash(E, aLowerCase, dLowerCase, T); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Balanceupdate {\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); - sb.append(" dLowerCase: ").append(toIndentedString(dLowerCase)).append("\n"); - sb.append(" T: ").append(toIndentedString(T)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Long EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - String aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - String aLowerCaseValueAsString = aLowerCaseValue.toString(); - valMap.put("aLowerCase", aLowerCaseValueAsString); - } - String dLowerCaseValue = getdLowerCase(); - if (dLowerCaseValue != null) { - String dLowerCaseValueAsString = dLowerCaseValue.toString(); - valMap.put("dLowerCase", dLowerCaseValueAsString); - } - Long TValue = getT(); - if (TValue != null) { - String TValueAsString = TValue.toString(); - valMap.put("T", TValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - valMap.put("aLowerCase", aLowerCaseValue); - } - Object dLowerCaseValue = getdLowerCase(); - if (dLowerCaseValue != null) { - valMap.put("dLowerCase", dLowerCaseValue); - } - Object TValue = getT(); - if (TValue != null) { - valMap.put("T", TValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("E"); - openapiFields.add("a"); - openapiFields.add("d"); - openapiFields.add("T"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Balanceupdate - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Balanceupdate.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Balanceupdate is not found in the" - + " empty JSON string", - Balanceupdate.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Balanceupdate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Balanceupdate` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) - && !jsonObj.get("a").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `a` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("a").toString())); - } - if ((jsonObj.get("d") != null && !jsonObj.get("d").isJsonNull()) - && !jsonObj.get("d").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `d` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("d").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Balanceupdate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Balanceupdate' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Balanceupdate.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Balanceupdate value) throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Balanceupdate read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Balanceupdate given an JSON string - * - * @param jsonString JSON string - * @return An instance of Balanceupdate - * @throws IOException if the JSON string is invalid with respect to Balanceupdate - */ - public static Balanceupdate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Balanceupdate.class); - } - - /** - * Convert an instance of Balanceupdate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/ExecutionReport.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/ExecutionReport.java new file mode 100644 index 000000000..02b8c999e --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/ExecutionReport.java @@ -0,0 +1,2399 @@ +/* + * Margin WebSocket Market Streams + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.margin_trading.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ExecutionReport */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ExecutionReport extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; + + @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) + @jakarta.annotation.Nullable + private String cLowerCase; + + public static final String SERIALIZED_NAME_S = "S"; + + @SerializedName(SERIALIZED_NAME_S) + @jakarta.annotation.Nullable + private String S; + + public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; + + @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) + @jakarta.annotation.Nullable + private String oLowerCase; + + public static final String SERIALIZED_NAME_F_LOWER_CASE = "f"; + + @SerializedName(SERIALIZED_NAME_F_LOWER_CASE) + @jakarta.annotation.Nullable + private String fLowerCase; + + public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; + + @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) + @jakarta.annotation.Nullable + private String qLowerCase; + + public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; + + @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) + @jakarta.annotation.Nullable + private String pLowerCase; + + public static final String SERIALIZED_NAME_P = "P"; + + @SerializedName(SERIALIZED_NAME_P) + @jakarta.annotation.Nullable + private String P; + + public static final String SERIALIZED_NAME_F = "F"; + + @SerializedName(SERIALIZED_NAME_F) + @jakarta.annotation.Nullable + private String F; + + public static final String SERIALIZED_NAME_G_LOWER_CASE = "g"; + + @SerializedName(SERIALIZED_NAME_G_LOWER_CASE) + @jakarta.annotation.Nullable + private Long gLowerCase; + + public static final String SERIALIZED_NAME_C = "C"; + + @SerializedName(SERIALIZED_NAME_C) + @jakarta.annotation.Nullable + private String C; + + public static final String SERIALIZED_NAME_X_LOWER_CASE = "x"; + + @SerializedName(SERIALIZED_NAME_X_LOWER_CASE) + @jakarta.annotation.Nullable + private String xLowerCase; + + public static final String SERIALIZED_NAME_X = "X"; + + @SerializedName(SERIALIZED_NAME_X) + @jakarta.annotation.Nullable + private String X; + + public static final String SERIALIZED_NAME_R_LOWER_CASE = "r"; + + @SerializedName(SERIALIZED_NAME_R_LOWER_CASE) + @jakarta.annotation.Nullable + private String rLowerCase; + + public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; + + @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) + @jakarta.annotation.Nullable + private Long iLowerCase; + + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; + + @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) + @jakarta.annotation.Nullable + private String lLowerCase; + + public static final String SERIALIZED_NAME_Z_LOWER_CASE = "z"; + + @SerializedName(SERIALIZED_NAME_Z_LOWER_CASE) + @jakarta.annotation.Nullable + private String zLowerCase; + + public static final String SERIALIZED_NAME_L = "L"; + + @SerializedName(SERIALIZED_NAME_L) + @jakarta.annotation.Nullable + private String L; + + public static final String SERIALIZED_NAME_N_LOWER_CASE = "n"; + + @SerializedName(SERIALIZED_NAME_N_LOWER_CASE) + @jakarta.annotation.Nullable + private String nLowerCase; + + public static final String SERIALIZED_NAME_N = "N"; + + @SerializedName(SERIALIZED_NAME_N) + @jakarta.annotation.Nullable + private String N; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; + + @SerializedName(SERIALIZED_NAME_T_LOWER_CASE) + @jakarta.annotation.Nullable + private Long tLowerCase; + + public static final String SERIALIZED_NAME_I = "I"; + + @SerializedName(SERIALIZED_NAME_I) + @jakarta.annotation.Nullable + private Long I; + + public static final String SERIALIZED_NAME_W_LOWER_CASE = "w"; + + @SerializedName(SERIALIZED_NAME_W_LOWER_CASE) + @jakarta.annotation.Nullable + private Boolean wLowerCase; + + public static final String SERIALIZED_NAME_M_LOWER_CASE = "m"; + + @SerializedName(SERIALIZED_NAME_M_LOWER_CASE) + @jakarta.annotation.Nullable + private Boolean mLowerCase; + + public static final String SERIALIZED_NAME_M = "M"; + + @SerializedName(SERIALIZED_NAME_M) + @jakarta.annotation.Nullable + private Boolean M; + + public static final String SERIALIZED_NAME_O = "O"; + + @SerializedName(SERIALIZED_NAME_O) + @jakarta.annotation.Nullable + private Long O; + + public static final String SERIALIZED_NAME_Z = "Z"; + + @SerializedName(SERIALIZED_NAME_Z) + @jakarta.annotation.Nullable + private String Z; + + public static final String SERIALIZED_NAME_Y = "Y"; + + @SerializedName(SERIALIZED_NAME_Y) + @jakarta.annotation.Nullable + private String Y; + + public static final String SERIALIZED_NAME_Q = "Q"; + + @SerializedName(SERIALIZED_NAME_Q) + @jakarta.annotation.Nullable + private String Q; + + public static final String SERIALIZED_NAME_W = "W"; + + @SerializedName(SERIALIZED_NAME_W) + @jakarta.annotation.Nullable + private Long W; + + public static final String SERIALIZED_NAME_V = "V"; + + @SerializedName(SERIALIZED_NAME_V) + @jakarta.annotation.Nullable + private String V; + + public static final String SERIALIZED_NAME_D_LOWER_CASE = "d"; + + @SerializedName(SERIALIZED_NAME_D_LOWER_CASE) + @jakarta.annotation.Nullable + private String dLowerCase; + + public static final String SERIALIZED_NAME_D = "D"; + + @SerializedName(SERIALIZED_NAME_D) + @jakarta.annotation.Nullable + private String D; + + public static final String SERIALIZED_NAME_J_LOWER_CASE = "j"; + + @SerializedName(SERIALIZED_NAME_J_LOWER_CASE) + @jakarta.annotation.Nullable + private String jLowerCase; + + public static final String SERIALIZED_NAME_J = "J"; + + @SerializedName(SERIALIZED_NAME_J) + @jakarta.annotation.Nullable + private String J; + + public static final String SERIALIZED_NAME_V_LOWER_CASE = "v"; + + @SerializedName(SERIALIZED_NAME_V_LOWER_CASE) + @jakarta.annotation.Nullable + private String vLowerCase; + + public static final String SERIALIZED_NAME_A = "A"; + + @SerializedName(SERIALIZED_NAME_A) + @jakarta.annotation.Nullable + private String A; + + public static final String SERIALIZED_NAME_B = "B"; + + @SerializedName(SERIALIZED_NAME_B) + @jakarta.annotation.Nullable + private String B; + + public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; + + @SerializedName(SERIALIZED_NAME_U_LOWER_CASE) + @jakarta.annotation.Nullable + private String uLowerCase; + + public static final String SERIALIZED_NAME_U = "U"; + + @SerializedName(SERIALIZED_NAME_U) + @jakarta.annotation.Nullable + private String U; + + public static final String SERIALIZED_NAME_CS = "Cs"; + + @SerializedName(SERIALIZED_NAME_CS) + @jakarta.annotation.Nullable + private String cs; + + public static final String SERIALIZED_NAME_PL = "pl"; + + @SerializedName(SERIALIZED_NAME_PL) + @jakarta.annotation.Nullable + private String pl; + + public static final String SERIALIZED_NAME_P_L = "pL"; + + @SerializedName(SERIALIZED_NAME_P_L) + @jakarta.annotation.Nullable + private String pL; + + public static final String SERIALIZED_NAME_P_Y = "pY"; + + @SerializedName(SERIALIZED_NAME_P_Y) + @jakarta.annotation.Nullable + private String pY; + + public static final String SERIALIZED_NAME_B_LOWER_CASE = "b"; + + @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) + @jakarta.annotation.Nullable + private String bLowerCase; + + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private String aLowerCase; + + public static final String SERIALIZED_NAME_K_LOWER_CASE = "k"; + + @SerializedName(SERIALIZED_NAME_K_LOWER_CASE) + @jakarta.annotation.Nullable + private String kLowerCase; + + public static final String SERIALIZED_NAME_U_S = "uS"; + + @SerializedName(SERIALIZED_NAME_U_S) + @jakarta.annotation.Nullable + private Boolean uS; + + public ExecutionReport() {} + + public ExecutionReport E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public ExecutionReport sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * Symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public ExecutionReport cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + return this; + } + + /** + * Client order ID + * + * @return cLowerCase + */ + @jakarta.annotation.Nullable + public String getcLowerCase() { + return cLowerCase; + } + + public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + } + + public ExecutionReport S(@jakarta.annotation.Nullable String S) { + this.S = S; + return this; + } + + /** + * Side + * + * @return S + */ + @jakarta.annotation.Nullable + public String getS() { + return S; + } + + public void setS(@jakarta.annotation.Nullable String S) { + this.S = S; + } + + public ExecutionReport oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + return this; + } + + /** + * Order type + * + * @return oLowerCase + */ + @jakarta.annotation.Nullable + public String getoLowerCase() { + return oLowerCase; + } + + public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + } + + public ExecutionReport fLowerCase(@jakarta.annotation.Nullable String fLowerCase) { + this.fLowerCase = fLowerCase; + return this; + } + + /** + * Time in force + * + * @return fLowerCase + */ + @jakarta.annotation.Nullable + public String getfLowerCase() { + return fLowerCase; + } + + public void setfLowerCase(@jakarta.annotation.Nullable String fLowerCase) { + this.fLowerCase = fLowerCase; + } + + public ExecutionReport qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + return this; + } + + /** + * Order quantity + * + * @return qLowerCase + */ + @jakarta.annotation.Nullable + public String getqLowerCase() { + return qLowerCase; + } + + public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + } + + public ExecutionReport pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + return this; + } + + /** + * Order price + * + * @return pLowerCase + */ + @jakarta.annotation.Nullable + public String getpLowerCase() { + return pLowerCase; + } + + public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + } + + public ExecutionReport P(@jakarta.annotation.Nullable String P) { + this.P = P; + return this; + } + + /** + * Stop price + * + * @return P + */ + @jakarta.annotation.Nullable + public String getP() { + return P; + } + + public void setP(@jakarta.annotation.Nullable String P) { + this.P = P; + } + + public ExecutionReport F(@jakarta.annotation.Nullable String F) { + this.F = F; + return this; + } + + /** + * Iceberg quantity + * + * @return F + */ + @jakarta.annotation.Nullable + public String getF() { + return F; + } + + public void setF(@jakarta.annotation.Nullable String F) { + this.F = F; + } + + public ExecutionReport gLowerCase(@jakarta.annotation.Nullable Long gLowerCase) { + this.gLowerCase = gLowerCase; + return this; + } + + /** + * OrderListId + * + * @return gLowerCase + */ + @jakarta.annotation.Nullable + public Long getgLowerCase() { + return gLowerCase; + } + + public void setgLowerCase(@jakarta.annotation.Nullable Long gLowerCase) { + this.gLowerCase = gLowerCase; + } + + public ExecutionReport C(@jakarta.annotation.Nullable String C) { + this.C = C; + return this; + } + + /** + * Original client order ID; This is the ID of the order being canceled + * + * @return C + */ + @jakarta.annotation.Nullable + public String getC() { + return C; + } + + public void setC(@jakarta.annotation.Nullable String C) { + this.C = C; + } + + public ExecutionReport xLowerCase(@jakarta.annotation.Nullable String xLowerCase) { + this.xLowerCase = xLowerCase; + return this; + } + + /** + * Current execution type + * + * @return xLowerCase + */ + @jakarta.annotation.Nullable + public String getxLowerCase() { + return xLowerCase; + } + + public void setxLowerCase(@jakarta.annotation.Nullable String xLowerCase) { + this.xLowerCase = xLowerCase; + } + + public ExecutionReport X(@jakarta.annotation.Nullable String X) { + this.X = X; + return this; + } + + /** + * Current order status + * + * @return X + */ + @jakarta.annotation.Nullable + public String getX() { + return X; + } + + public void setX(@jakarta.annotation.Nullable String X) { + this.X = X; + } + + public ExecutionReport rLowerCase(@jakarta.annotation.Nullable String rLowerCase) { + this.rLowerCase = rLowerCase; + return this; + } + + /** + * Order reject reason; will be an error code. + * + * @return rLowerCase + */ + @jakarta.annotation.Nullable + public String getrLowerCase() { + return rLowerCase; + } + + public void setrLowerCase(@jakarta.annotation.Nullable String rLowerCase) { + this.rLowerCase = rLowerCase; + } + + public ExecutionReport iLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { + this.iLowerCase = iLowerCase; + return this; + } + + /** + * Order ID + * + * @return iLowerCase + */ + @jakarta.annotation.Nullable + public Long getiLowerCase() { + return iLowerCase; + } + + public void setiLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { + this.iLowerCase = iLowerCase; + } + + public ExecutionReport lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + return this; + } + + /** + * Last executed quantity + * + * @return lLowerCase + */ + @jakarta.annotation.Nullable + public String getlLowerCase() { + return lLowerCase; + } + + public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + } + + public ExecutionReport zLowerCase(@jakarta.annotation.Nullable String zLowerCase) { + this.zLowerCase = zLowerCase; + return this; + } + + /** + * Cumulative filled quantity + * + * @return zLowerCase + */ + @jakarta.annotation.Nullable + public String getzLowerCase() { + return zLowerCase; + } + + public void setzLowerCase(@jakarta.annotation.Nullable String zLowerCase) { + this.zLowerCase = zLowerCase; + } + + public ExecutionReport L(@jakarta.annotation.Nullable String L) { + this.L = L; + return this; + } + + /** + * Last executed price + * + * @return L + */ + @jakarta.annotation.Nullable + public String getL() { + return L; + } + + public void setL(@jakarta.annotation.Nullable String L) { + this.L = L; + } + + public ExecutionReport nLowerCase(@jakarta.annotation.Nullable String nLowerCase) { + this.nLowerCase = nLowerCase; + return this; + } + + /** + * Commission amount + * + * @return nLowerCase + */ + @jakarta.annotation.Nullable + public String getnLowerCase() { + return nLowerCase; + } + + public void setnLowerCase(@jakarta.annotation.Nullable String nLowerCase) { + this.nLowerCase = nLowerCase; + } + + public ExecutionReport N(@jakarta.annotation.Nullable String N) { + this.N = N; + return this; + } + + /** + * Commission asset + * + * @return N + */ + @jakarta.annotation.Nullable + public String getN() { + return N; + } + + public void setN(@jakarta.annotation.Nullable String N) { + this.N = N; + } + + public ExecutionReport T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * Transaction time + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + public ExecutionReport tLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; + return this; + } + + /** + * Trade ID + * + * @return tLowerCase + */ + @jakarta.annotation.Nullable + public Long gettLowerCase() { + return tLowerCase; + } + + public void settLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; + } + + public ExecutionReport I(@jakarta.annotation.Nullable Long I) { + this.I = I; + return this; + } + + /** + * Ignore + * + * @return I + */ + @jakarta.annotation.Nullable + public Long getI() { + return I; + } + + public void setI(@jakarta.annotation.Nullable Long I) { + this.I = I; + } + + public ExecutionReport wLowerCase(@jakarta.annotation.Nullable Boolean wLowerCase) { + this.wLowerCase = wLowerCase; + return this; + } + + /** + * Is the order on the book? + * + * @return wLowerCase + */ + @jakarta.annotation.Nullable + public Boolean getwLowerCase() { + return wLowerCase; + } + + public void setwLowerCase(@jakarta.annotation.Nullable Boolean wLowerCase) { + this.wLowerCase = wLowerCase; + } + + public ExecutionReport mLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { + this.mLowerCase = mLowerCase; + return this; + } + + /** + * Is this trade the maker side? + * + * @return mLowerCase + */ + @jakarta.annotation.Nullable + public Boolean getmLowerCase() { + return mLowerCase; + } + + public void setmLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { + this.mLowerCase = mLowerCase; + } + + public ExecutionReport M(@jakarta.annotation.Nullable Boolean M) { + this.M = M; + return this; + } + + /** + * Ignore + * + * @return M + */ + @jakarta.annotation.Nullable + public Boolean getM() { + return M; + } + + public void setM(@jakarta.annotation.Nullable Boolean M) { + this.M = M; + } + + public ExecutionReport O(@jakarta.annotation.Nullable Long O) { + this.O = O; + return this; + } + + /** + * Order creation time + * + * @return O + */ + @jakarta.annotation.Nullable + public Long getO() { + return O; + } + + public void setO(@jakarta.annotation.Nullable Long O) { + this.O = O; + } + + public ExecutionReport Z(@jakarta.annotation.Nullable String Z) { + this.Z = Z; + return this; + } + + /** + * Cumulative quote asset transacted quantity + * + * @return Z + */ + @jakarta.annotation.Nullable + public String getZ() { + return Z; + } + + public void setZ(@jakarta.annotation.Nullable String Z) { + this.Z = Z; + } + + public ExecutionReport Y(@jakarta.annotation.Nullable String Y) { + this.Y = Y; + return this; + } + + /** + * Last quote asset transacted quantity (i.e. lastPrice * lastQty) + * + * @return Y + */ + @jakarta.annotation.Nullable + public String getY() { + return Y; + } + + public void setY(@jakarta.annotation.Nullable String Y) { + this.Y = Y; + } + + public ExecutionReport Q(@jakarta.annotation.Nullable String Q) { + this.Q = Q; + return this; + } + + /** + * Quote Order Quantity + * + * @return Q + */ + @jakarta.annotation.Nullable + public String getQ() { + return Q; + } + + public void setQ(@jakarta.annotation.Nullable String Q) { + this.Q = Q; + } + + public ExecutionReport W(@jakarta.annotation.Nullable Long W) { + this.W = W; + return this; + } + + /** + * Working Time; This is only visible if the order has been placed on the book. + * + * @return W + */ + @jakarta.annotation.Nullable + public Long getW() { + return W; + } + + public void setW(@jakarta.annotation.Nullable Long W) { + this.W = W; + } + + public ExecutionReport V(@jakarta.annotation.Nullable String V) { + this.V = V; + return this; + } + + /** + * selfTradePreventionMode + * + * @return V + */ + @jakarta.annotation.Nullable + public String getV() { + return V; + } + + public void setV(@jakarta.annotation.Nullable String V) { + this.V = V; + } + + public ExecutionReport dLowerCase(@jakarta.annotation.Nullable String dLowerCase) { + this.dLowerCase = dLowerCase; + return this; + } + + /** + * Trailing Delta; This is only visible if the order was a trailing stop order. + * + * @return dLowerCase + */ + @jakarta.annotation.Nullable + public String getdLowerCase() { + return dLowerCase; + } + + public void setdLowerCase(@jakarta.annotation.Nullable String dLowerCase) { + this.dLowerCase = dLowerCase; + } + + public ExecutionReport D(@jakarta.annotation.Nullable String D) { + this.D = D; + return this; + } + + /** + * Trailing Time + * + * @return D + */ + @jakarta.annotation.Nullable + public String getD() { + return D; + } + + public void setD(@jakarta.annotation.Nullable String D) { + this.D = D; + } + + public ExecutionReport jLowerCase(@jakarta.annotation.Nullable String jLowerCase) { + this.jLowerCase = jLowerCase; + return this; + } + + /** + * Strategy Id + * + * @return jLowerCase + */ + @jakarta.annotation.Nullable + public String getjLowerCase() { + return jLowerCase; + } + + public void setjLowerCase(@jakarta.annotation.Nullable String jLowerCase) { + this.jLowerCase = jLowerCase; + } + + public ExecutionReport J(@jakarta.annotation.Nullable String J) { + this.J = J; + return this; + } + + /** + * Strategy Type + * + * @return J + */ + @jakarta.annotation.Nullable + public String getJ() { + return J; + } + + public void setJ(@jakarta.annotation.Nullable String J) { + this.J = J; + } + + public ExecutionReport vLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + return this; + } + + /** + * Prevented Match Id + * + * @return vLowerCase + */ + @jakarta.annotation.Nullable + public String getvLowerCase() { + return vLowerCase; + } + + public void setvLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; + } + + public ExecutionReport A(@jakarta.annotation.Nullable String A) { + this.A = A; + return this; + } + + /** + * Prevented Quantity + * + * @return A + */ + @jakarta.annotation.Nullable + public String getA() { + return A; + } + + public void setA(@jakarta.annotation.Nullable String A) { + this.A = A; + } + + public ExecutionReport B(@jakarta.annotation.Nullable String B) { + this.B = B; + return this; + } + + /** + * Last Prevented Quantity + * + * @return B + */ + @jakarta.annotation.Nullable + public String getB() { + return B; + } + + public void setB(@jakarta.annotation.Nullable String B) { + this.B = B; + } + + public ExecutionReport uLowerCase(@jakarta.annotation.Nullable String uLowerCase) { + this.uLowerCase = uLowerCase; + return this; + } + + /** + * Trade Group Id + * + * @return uLowerCase + */ + @jakarta.annotation.Nullable + public String getuLowerCase() { + return uLowerCase; + } + + public void setuLowerCase(@jakarta.annotation.Nullable String uLowerCase) { + this.uLowerCase = uLowerCase; + } + + public ExecutionReport U(@jakarta.annotation.Nullable String U) { + this.U = U; + return this; + } + + /** + * Counter Order Id + * + * @return U + */ + @jakarta.annotation.Nullable + public String getU() { + return U; + } + + public void setU(@jakarta.annotation.Nullable String U) { + this.U = U; + } + + public ExecutionReport cs(@jakarta.annotation.Nullable String cs) { + this.cs = cs; + return this; + } + + /** + * Counter Symbol + * + * @return cs + */ + @jakarta.annotation.Nullable + public String getCs() { + return cs; + } + + public void setCs(@jakarta.annotation.Nullable String cs) { + this.cs = cs; + } + + public ExecutionReport pl(@jakarta.annotation.Nullable String pl) { + this.pl = pl; + return this; + } + + /** + * Prevented Execution Quantity + * + * @return pl + */ + @jakarta.annotation.Nullable + public String getPl() { + return pl; + } + + public void setPl(@jakarta.annotation.Nullable String pl) { + this.pl = pl; + } + + public ExecutionReport pL(@jakarta.annotation.Nullable String pL) { + this.pL = pL; + return this; + } + + /** + * Prevented Execution Price + * + * @return pL + */ + @jakarta.annotation.Nullable + public String getpL() { + return pL; + } + + public void setpL(@jakarta.annotation.Nullable String pL) { + this.pL = pL; + } + + public ExecutionReport pY(@jakarta.annotation.Nullable String pY) { + this.pY = pY; + return this; + } + + /** + * Prevented Execution Quote Qty + * + * @return pY + */ + @jakarta.annotation.Nullable + public String getpY() { + return pY; + } + + public void setpY(@jakarta.annotation.Nullable String pY) { + this.pY = pY; + } + + public ExecutionReport bLowerCase(@jakarta.annotation.Nullable String bLowerCase) { + this.bLowerCase = bLowerCase; + return this; + } + + /** + * Match Type + * + * @return bLowerCase + */ + @jakarta.annotation.Nullable + public String getbLowerCase() { + return bLowerCase; + } + + public void setbLowerCase(@jakarta.annotation.Nullable String bLowerCase) { + this.bLowerCase = bLowerCase; + } + + public ExecutionReport aLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + /** + * Allocation ID + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + public String getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + } + + public ExecutionReport kLowerCase(@jakarta.annotation.Nullable String kLowerCase) { + this.kLowerCase = kLowerCase; + return this; + } + + /** + * Working Floor + * + * @return kLowerCase + */ + @jakarta.annotation.Nullable + public String getkLowerCase() { + return kLowerCase; + } + + public void setkLowerCase(@jakarta.annotation.Nullable String kLowerCase) { + this.kLowerCase = kLowerCase; + } + + public ExecutionReport uS(@jakarta.annotation.Nullable Boolean uS) { + this.uS = uS; + return this; + } + + /** + * UsedSor + * + * @return uS + */ + @jakarta.annotation.Nullable + public Boolean getuS() { + return uS; + } + + public void setuS(@jakarta.annotation.Nullable Boolean uS) { + this.uS = uS; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecutionReport executionReport = (ExecutionReport) o; + return Objects.equals(this.E, executionReport.E) + && Objects.equals(this.sLowerCase, executionReport.sLowerCase) + && Objects.equals(this.cLowerCase, executionReport.cLowerCase) + && Objects.equals(this.S, executionReport.S) + && Objects.equals(this.oLowerCase, executionReport.oLowerCase) + && Objects.equals(this.fLowerCase, executionReport.fLowerCase) + && Objects.equals(this.qLowerCase, executionReport.qLowerCase) + && Objects.equals(this.pLowerCase, executionReport.pLowerCase) + && Objects.equals(this.P, executionReport.P) + && Objects.equals(this.F, executionReport.F) + && Objects.equals(this.gLowerCase, executionReport.gLowerCase) + && Objects.equals(this.C, executionReport.C) + && Objects.equals(this.xLowerCase, executionReport.xLowerCase) + && Objects.equals(this.X, executionReport.X) + && Objects.equals(this.rLowerCase, executionReport.rLowerCase) + && Objects.equals(this.iLowerCase, executionReport.iLowerCase) + && Objects.equals(this.lLowerCase, executionReport.lLowerCase) + && Objects.equals(this.zLowerCase, executionReport.zLowerCase) + && Objects.equals(this.L, executionReport.L) + && Objects.equals(this.nLowerCase, executionReport.nLowerCase) + && Objects.equals(this.N, executionReport.N) + && Objects.equals(this.T, executionReport.T) + && Objects.equals(this.tLowerCase, executionReport.tLowerCase) + && Objects.equals(this.I, executionReport.I) + && Objects.equals(this.wLowerCase, executionReport.wLowerCase) + && Objects.equals(this.mLowerCase, executionReport.mLowerCase) + && Objects.equals(this.M, executionReport.M) + && Objects.equals(this.O, executionReport.O) + && Objects.equals(this.Z, executionReport.Z) + && Objects.equals(this.Y, executionReport.Y) + && Objects.equals(this.Q, executionReport.Q) + && Objects.equals(this.W, executionReport.W) + && Objects.equals(this.V, executionReport.V) + && Objects.equals(this.dLowerCase, executionReport.dLowerCase) + && Objects.equals(this.D, executionReport.D) + && Objects.equals(this.jLowerCase, executionReport.jLowerCase) + && Objects.equals(this.J, executionReport.J) + && Objects.equals(this.vLowerCase, executionReport.vLowerCase) + && Objects.equals(this.A, executionReport.A) + && Objects.equals(this.B, executionReport.B) + && Objects.equals(this.uLowerCase, executionReport.uLowerCase) + && Objects.equals(this.U, executionReport.U) + && Objects.equals(this.cs, executionReport.cs) + && Objects.equals(this.pl, executionReport.pl) + && Objects.equals(this.pL, executionReport.pL) + && Objects.equals(this.pY, executionReport.pY) + && Objects.equals(this.bLowerCase, executionReport.bLowerCase) + && Objects.equals(this.aLowerCase, executionReport.aLowerCase) + && Objects.equals(this.kLowerCase, executionReport.kLowerCase) + && Objects.equals(this.uS, executionReport.uS); + } + + @Override + public int hashCode() { + return Objects.hash( + E, + sLowerCase, + cLowerCase, + S, + oLowerCase, + fLowerCase, + qLowerCase, + pLowerCase, + P, + F, + gLowerCase, + C, + xLowerCase, + X, + rLowerCase, + iLowerCase, + lLowerCase, + zLowerCase, + L, + nLowerCase, + N, + T, + tLowerCase, + I, + wLowerCase, + mLowerCase, + M, + O, + Z, + Y, + Q, + W, + V, + dLowerCase, + D, + jLowerCase, + J, + vLowerCase, + A, + B, + uLowerCase, + U, + cs, + pl, + pL, + pY, + bLowerCase, + aLowerCase, + kLowerCase, + uS); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecutionReport {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); + sb.append(" S: ").append(toIndentedString(S)).append("\n"); + sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); + sb.append(" fLowerCase: ").append(toIndentedString(fLowerCase)).append("\n"); + sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); + sb.append(" P: ").append(toIndentedString(P)).append("\n"); + sb.append(" F: ").append(toIndentedString(F)).append("\n"); + sb.append(" gLowerCase: ").append(toIndentedString(gLowerCase)).append("\n"); + sb.append(" C: ").append(toIndentedString(C)).append("\n"); + sb.append(" xLowerCase: ").append(toIndentedString(xLowerCase)).append("\n"); + sb.append(" X: ").append(toIndentedString(X)).append("\n"); + sb.append(" rLowerCase: ").append(toIndentedString(rLowerCase)).append("\n"); + sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append(" zLowerCase: ").append(toIndentedString(zLowerCase)).append("\n"); + sb.append(" L: ").append(toIndentedString(L)).append("\n"); + sb.append(" nLowerCase: ").append(toIndentedString(nLowerCase)).append("\n"); + sb.append(" N: ").append(toIndentedString(N)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" tLowerCase: ").append(toIndentedString(tLowerCase)).append("\n"); + sb.append(" I: ").append(toIndentedString(I)).append("\n"); + sb.append(" wLowerCase: ").append(toIndentedString(wLowerCase)).append("\n"); + sb.append(" mLowerCase: ").append(toIndentedString(mLowerCase)).append("\n"); + sb.append(" M: ").append(toIndentedString(M)).append("\n"); + sb.append(" O: ").append(toIndentedString(O)).append("\n"); + sb.append(" Z: ").append(toIndentedString(Z)).append("\n"); + sb.append(" Y: ").append(toIndentedString(Y)).append("\n"); + sb.append(" Q: ").append(toIndentedString(Q)).append("\n"); + sb.append(" W: ").append(toIndentedString(W)).append("\n"); + sb.append(" V: ").append(toIndentedString(V)).append("\n"); + sb.append(" dLowerCase: ").append(toIndentedString(dLowerCase)).append("\n"); + sb.append(" D: ").append(toIndentedString(D)).append("\n"); + sb.append(" jLowerCase: ").append(toIndentedString(jLowerCase)).append("\n"); + sb.append(" J: ").append(toIndentedString(J)).append("\n"); + sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); + sb.append(" A: ").append(toIndentedString(A)).append("\n"); + sb.append(" B: ").append(toIndentedString(B)).append("\n"); + sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); + sb.append(" U: ").append(toIndentedString(U)).append("\n"); + sb.append(" cs: ").append(toIndentedString(cs)).append("\n"); + sb.append(" pl: ").append(toIndentedString(pl)).append("\n"); + sb.append(" pL: ").append(toIndentedString(pL)).append("\n"); + sb.append(" pY: ").append(toIndentedString(pY)).append("\n"); + sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" kLowerCase: ").append(toIndentedString(kLowerCase)).append("\n"); + sb.append(" uS: ").append(toIndentedString(uS)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + String cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + String cLowerCaseValueAsString = cLowerCaseValue.toString(); + valMap.put("cLowerCase", cLowerCaseValueAsString); + } + String SValue = getS(); + if (SValue != null) { + String SValueAsString = SValue.toString(); + valMap.put("S", SValueAsString); + } + String oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + String oLowerCaseValueAsString = oLowerCaseValue.toString(); + valMap.put("oLowerCase", oLowerCaseValueAsString); + } + String fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + String fLowerCaseValueAsString = fLowerCaseValue.toString(); + valMap.put("fLowerCase", fLowerCaseValueAsString); + } + String qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + String qLowerCaseValueAsString = qLowerCaseValue.toString(); + valMap.put("qLowerCase", qLowerCaseValueAsString); + } + String pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + String pLowerCaseValueAsString = pLowerCaseValue.toString(); + valMap.put("pLowerCase", pLowerCaseValueAsString); + } + String PValue = getP(); + if (PValue != null) { + String PValueAsString = PValue.toString(); + valMap.put("P", PValueAsString); + } + String FValue = getF(); + if (FValue != null) { + String FValueAsString = FValue.toString(); + valMap.put("F", FValueAsString); + } + Long gLowerCaseValue = getgLowerCase(); + if (gLowerCaseValue != null) { + String gLowerCaseValueAsString = gLowerCaseValue.toString(); + valMap.put("gLowerCase", gLowerCaseValueAsString); + } + String CValue = getC(); + if (CValue != null) { + String CValueAsString = CValue.toString(); + valMap.put("C", CValueAsString); + } + String xLowerCaseValue = getxLowerCase(); + if (xLowerCaseValue != null) { + String xLowerCaseValueAsString = xLowerCaseValue.toString(); + valMap.put("xLowerCase", xLowerCaseValueAsString); + } + String XValue = getX(); + if (XValue != null) { + String XValueAsString = XValue.toString(); + valMap.put("X", XValueAsString); + } + String rLowerCaseValue = getrLowerCase(); + if (rLowerCaseValue != null) { + String rLowerCaseValueAsString = rLowerCaseValue.toString(); + valMap.put("rLowerCase", rLowerCaseValueAsString); + } + Long iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + String iLowerCaseValueAsString = iLowerCaseValue.toString(); + valMap.put("iLowerCase", iLowerCaseValueAsString); + } + String lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + String zLowerCaseValue = getzLowerCase(); + if (zLowerCaseValue != null) { + String zLowerCaseValueAsString = zLowerCaseValue.toString(); + valMap.put("zLowerCase", zLowerCaseValueAsString); + } + String LValue = getL(); + if (LValue != null) { + String LValueAsString = LValue.toString(); + valMap.put("L", LValueAsString); + } + String nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + String nLowerCaseValueAsString = nLowerCaseValue.toString(); + valMap.put("nLowerCase", nLowerCaseValueAsString); + } + String NValue = getN(); + if (NValue != null) { + String NValueAsString = NValue.toString(); + valMap.put("N", NValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + Long tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + String tLowerCaseValueAsString = tLowerCaseValue.toString(); + valMap.put("tLowerCase", tLowerCaseValueAsString); + } + Long IValue = getI(); + if (IValue != null) { + String IValueAsString = IValue.toString(); + valMap.put("I", IValueAsString); + } + Boolean wLowerCaseValue = getwLowerCase(); + if (wLowerCaseValue != null) { + String wLowerCaseValueAsString = wLowerCaseValue.toString(); + valMap.put("wLowerCase", wLowerCaseValueAsString); + } + Boolean mLowerCaseValue = getmLowerCase(); + if (mLowerCaseValue != null) { + String mLowerCaseValueAsString = mLowerCaseValue.toString(); + valMap.put("mLowerCase", mLowerCaseValueAsString); + } + Boolean MValue = getM(); + if (MValue != null) { + String MValueAsString = MValue.toString(); + valMap.put("M", MValueAsString); + } + Long OValue = getO(); + if (OValue != null) { + String OValueAsString = OValue.toString(); + valMap.put("O", OValueAsString); + } + String ZValue = getZ(); + if (ZValue != null) { + String ZValueAsString = ZValue.toString(); + valMap.put("Z", ZValueAsString); + } + String YValue = getY(); + if (YValue != null) { + String YValueAsString = YValue.toString(); + valMap.put("Y", YValueAsString); + } + String QValue = getQ(); + if (QValue != null) { + String QValueAsString = QValue.toString(); + valMap.put("Q", QValueAsString); + } + Long WValue = getW(); + if (WValue != null) { + String WValueAsString = WValue.toString(); + valMap.put("W", WValueAsString); + } + String VValue = getV(); + if (VValue != null) { + String VValueAsString = VValue.toString(); + valMap.put("V", VValueAsString); + } + String dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + String dLowerCaseValueAsString = dLowerCaseValue.toString(); + valMap.put("dLowerCase", dLowerCaseValueAsString); + } + String DValue = getD(); + if (DValue != null) { + String DValueAsString = DValue.toString(); + valMap.put("D", DValueAsString); + } + String jLowerCaseValue = getjLowerCase(); + if (jLowerCaseValue != null) { + String jLowerCaseValueAsString = jLowerCaseValue.toString(); + valMap.put("jLowerCase", jLowerCaseValueAsString); + } + String JValue = getJ(); + if (JValue != null) { + String JValueAsString = JValue.toString(); + valMap.put("J", JValueAsString); + } + String vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + String vLowerCaseValueAsString = vLowerCaseValue.toString(); + valMap.put("vLowerCase", vLowerCaseValueAsString); + } + String AValue = getA(); + if (AValue != null) { + String AValueAsString = AValue.toString(); + valMap.put("A", AValueAsString); + } + String BValue = getB(); + if (BValue != null) { + String BValueAsString = BValue.toString(); + valMap.put("B", BValueAsString); + } + String uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + String uLowerCaseValueAsString = uLowerCaseValue.toString(); + valMap.put("uLowerCase", uLowerCaseValueAsString); + } + String UValue = getU(); + if (UValue != null) { + String UValueAsString = UValue.toString(); + valMap.put("U", UValueAsString); + } + String csValue = getCs(); + if (csValue != null) { + String csValueAsString = csValue.toString(); + valMap.put("cs", csValueAsString); + } + String plValue = getPl(); + if (plValue != null) { + String plValueAsString = plValue.toString(); + valMap.put("pl", plValueAsString); + } + String pLValue = getpL(); + if (pLValue != null) { + String pLValueAsString = pLValue.toString(); + valMap.put("pL", pLValueAsString); + } + String pYValue = getpY(); + if (pYValue != null) { + String pYValueAsString = pYValue.toString(); + valMap.put("pY", pYValueAsString); + } + String bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + String bLowerCaseValueAsString = bLowerCaseValue.toString(); + valMap.put("bLowerCase", bLowerCaseValueAsString); + } + String aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = aLowerCaseValue.toString(); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + String kLowerCaseValue = getkLowerCase(); + if (kLowerCaseValue != null) { + String kLowerCaseValueAsString = kLowerCaseValue.toString(); + valMap.put("kLowerCase", kLowerCaseValueAsString); + } + Boolean uSValue = getuS(); + if (uSValue != null) { + String uSValueAsString = uSValue.toString(); + valMap.put("uS", uSValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + valMap.put("cLowerCase", cLowerCaseValue); + } + Object SValue = getS(); + if (SValue != null) { + valMap.put("S", SValue); + } + Object oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + valMap.put("oLowerCase", oLowerCaseValue); + } + Object fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + valMap.put("fLowerCase", fLowerCaseValue); + } + Object qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + valMap.put("qLowerCase", qLowerCaseValue); + } + Object pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + valMap.put("pLowerCase", pLowerCaseValue); + } + Object PValue = getP(); + if (PValue != null) { + valMap.put("P", PValue); + } + Object FValue = getF(); + if (FValue != null) { + valMap.put("F", FValue); + } + Object gLowerCaseValue = getgLowerCase(); + if (gLowerCaseValue != null) { + valMap.put("gLowerCase", gLowerCaseValue); + } + Object CValue = getC(); + if (CValue != null) { + valMap.put("C", CValue); + } + Object xLowerCaseValue = getxLowerCase(); + if (xLowerCaseValue != null) { + valMap.put("xLowerCase", xLowerCaseValue); + } + Object XValue = getX(); + if (XValue != null) { + valMap.put("X", XValue); + } + Object rLowerCaseValue = getrLowerCase(); + if (rLowerCaseValue != null) { + valMap.put("rLowerCase", rLowerCaseValue); + } + Object iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + valMap.put("iLowerCase", iLowerCaseValue); + } + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); + } + Object zLowerCaseValue = getzLowerCase(); + if (zLowerCaseValue != null) { + valMap.put("zLowerCase", zLowerCaseValue); + } + Object LValue = getL(); + if (LValue != null) { + valMap.put("L", LValue); + } + Object nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + valMap.put("nLowerCase", nLowerCaseValue); + } + Object NValue = getN(); + if (NValue != null) { + valMap.put("N", NValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + Object tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + valMap.put("tLowerCase", tLowerCaseValue); + } + Object IValue = getI(); + if (IValue != null) { + valMap.put("I", IValue); + } + Object wLowerCaseValue = getwLowerCase(); + if (wLowerCaseValue != null) { + valMap.put("wLowerCase", wLowerCaseValue); + } + Object mLowerCaseValue = getmLowerCase(); + if (mLowerCaseValue != null) { + valMap.put("mLowerCase", mLowerCaseValue); + } + Object MValue = getM(); + if (MValue != null) { + valMap.put("M", MValue); + } + Object OValue = getO(); + if (OValue != null) { + valMap.put("O", OValue); + } + Object ZValue = getZ(); + if (ZValue != null) { + valMap.put("Z", ZValue); + } + Object YValue = getY(); + if (YValue != null) { + valMap.put("Y", YValue); + } + Object QValue = getQ(); + if (QValue != null) { + valMap.put("Q", QValue); + } + Object WValue = getW(); + if (WValue != null) { + valMap.put("W", WValue); + } + Object VValue = getV(); + if (VValue != null) { + valMap.put("V", VValue); + } + Object dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + valMap.put("dLowerCase", dLowerCaseValue); + } + Object DValue = getD(); + if (DValue != null) { + valMap.put("D", DValue); + } + Object jLowerCaseValue = getjLowerCase(); + if (jLowerCaseValue != null) { + valMap.put("jLowerCase", jLowerCaseValue); + } + Object JValue = getJ(); + if (JValue != null) { + valMap.put("J", JValue); + } + Object vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + valMap.put("vLowerCase", vLowerCaseValue); + } + Object AValue = getA(); + if (AValue != null) { + valMap.put("A", AValue); + } + Object BValue = getB(); + if (BValue != null) { + valMap.put("B", BValue); + } + Object uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + valMap.put("uLowerCase", uLowerCaseValue); + } + Object UValue = getU(); + if (UValue != null) { + valMap.put("U", UValue); + } + Object csValue = getCs(); + if (csValue != null) { + valMap.put("cs", csValue); + } + Object plValue = getPl(); + if (plValue != null) { + valMap.put("pl", plValue); + } + Object pLValue = getpL(); + if (pLValue != null) { + valMap.put("pL", pLValue); + } + Object pYValue = getpY(); + if (pYValue != null) { + valMap.put("pY", pYValue); + } + Object bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + valMap.put("bLowerCase", bLowerCaseValue); + } + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + Object kLowerCaseValue = getkLowerCase(); + if (kLowerCaseValue != null) { + valMap.put("kLowerCase", kLowerCaseValue); + } + Object uSValue = getuS(); + if (uSValue != null) { + valMap.put("uS", uSValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("s"); + openapiFields.add("c"); + openapiFields.add("S"); + openapiFields.add("o"); + openapiFields.add("f"); + openapiFields.add("q"); + openapiFields.add("p"); + openapiFields.add("P"); + openapiFields.add("F"); + openapiFields.add("g"); + openapiFields.add("C"); + openapiFields.add("x"); + openapiFields.add("X"); + openapiFields.add("r"); + openapiFields.add("i"); + openapiFields.add("l"); + openapiFields.add("z"); + openapiFields.add("L"); + openapiFields.add("n"); + openapiFields.add("N"); + openapiFields.add("T"); + openapiFields.add("t"); + openapiFields.add("I"); + openapiFields.add("w"); + openapiFields.add("m"); + openapiFields.add("M"); + openapiFields.add("O"); + openapiFields.add("Z"); + openapiFields.add("Y"); + openapiFields.add("Q"); + openapiFields.add("W"); + openapiFields.add("V"); + openapiFields.add("d"); + openapiFields.add("D"); + openapiFields.add("j"); + openapiFields.add("J"); + openapiFields.add("v"); + openapiFields.add("A"); + openapiFields.add("B"); + openapiFields.add("u"); + openapiFields.add("U"); + openapiFields.add("Cs"); + openapiFields.add("pl"); + openapiFields.add("pL"); + openapiFields.add("pY"); + openapiFields.add("b"); + openapiFields.add("a"); + openapiFields.add("k"); + openapiFields.add("uS"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExecutionReport + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExecutionReport.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ExecutionReport is not found in the" + + " empty JSON string", + ExecutionReport.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExecutionReport.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ExecutionReport` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) + && !jsonObj.get("c").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `c` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("c").toString())); + } + if ((jsonObj.get("S") != null && !jsonObj.get("S").isJsonNull()) + && !jsonObj.get("S").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `S` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("S").toString())); + } + if ((jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) + && !jsonObj.get("o").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `o` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("o").toString())); + } + if ((jsonObj.get("f") != null && !jsonObj.get("f").isJsonNull()) + && !jsonObj.get("f").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `f` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("f").toString())); + } + if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) + && !jsonObj.get("q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("q").toString())); + } + if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) + && !jsonObj.get("p").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `p` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("p").toString())); + } + if ((jsonObj.get("P") != null && !jsonObj.get("P").isJsonNull()) + && !jsonObj.get("P").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `P` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("P").toString())); + } + if ((jsonObj.get("F") != null && !jsonObj.get("F").isJsonNull()) + && !jsonObj.get("F").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `F` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("F").toString())); + } + if ((jsonObj.get("C") != null && !jsonObj.get("C").isJsonNull()) + && !jsonObj.get("C").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `C` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("C").toString())); + } + if ((jsonObj.get("x") != null && !jsonObj.get("x").isJsonNull()) + && !jsonObj.get("x").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `x` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("x").toString())); + } + if ((jsonObj.get("X") != null && !jsonObj.get("X").isJsonNull()) + && !jsonObj.get("X").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `X` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("X").toString())); + } + if ((jsonObj.get("r") != null && !jsonObj.get("r").isJsonNull()) + && !jsonObj.get("r").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `r` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("r").toString())); + } + if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) + && !jsonObj.get("l").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `l` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("l").toString())); + } + if ((jsonObj.get("z") != null && !jsonObj.get("z").isJsonNull()) + && !jsonObj.get("z").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `z` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("z").toString())); + } + if ((jsonObj.get("L") != null && !jsonObj.get("L").isJsonNull()) + && !jsonObj.get("L").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `L` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("L").toString())); + } + if ((jsonObj.get("n") != null && !jsonObj.get("n").isJsonNull()) + && !jsonObj.get("n").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `n` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("n").toString())); + } + if ((jsonObj.get("N") != null && !jsonObj.get("N").isJsonNull()) + && !jsonObj.get("N").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `N` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("N").toString())); + } + if ((jsonObj.get("Z") != null && !jsonObj.get("Z").isJsonNull()) + && !jsonObj.get("Z").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Z` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("Z").toString())); + } + if ((jsonObj.get("Y") != null && !jsonObj.get("Y").isJsonNull()) + && !jsonObj.get("Y").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Y` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("Y").toString())); + } + if ((jsonObj.get("Q") != null && !jsonObj.get("Q").isJsonNull()) + && !jsonObj.get("Q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("Q").toString())); + } + if ((jsonObj.get("V") != null && !jsonObj.get("V").isJsonNull()) + && !jsonObj.get("V").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `V` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("V").toString())); + } + if ((jsonObj.get("d") != null && !jsonObj.get("d").isJsonNull()) + && !jsonObj.get("d").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `d` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("d").toString())); + } + if ((jsonObj.get("D") != null && !jsonObj.get("D").isJsonNull()) + && !jsonObj.get("D").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `D` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("D").toString())); + } + if ((jsonObj.get("j") != null && !jsonObj.get("j").isJsonNull()) + && !jsonObj.get("j").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `j` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("j").toString())); + } + if ((jsonObj.get("J") != null && !jsonObj.get("J").isJsonNull()) + && !jsonObj.get("J").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `J` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("J").toString())); + } + if ((jsonObj.get("v") != null && !jsonObj.get("v").isJsonNull()) + && !jsonObj.get("v").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `v` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("v").toString())); + } + if ((jsonObj.get("A") != null && !jsonObj.get("A").isJsonNull()) + && !jsonObj.get("A").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `A` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("A").toString())); + } + if ((jsonObj.get("B") != null && !jsonObj.get("B").isJsonNull()) + && !jsonObj.get("B").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `B` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("B").toString())); + } + if ((jsonObj.get("u") != null && !jsonObj.get("u").isJsonNull()) + && !jsonObj.get("u").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `u` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("u").toString())); + } + if ((jsonObj.get("U") != null && !jsonObj.get("U").isJsonNull()) + && !jsonObj.get("U").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `U` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("U").toString())); + } + if ((jsonObj.get("Cs") != null && !jsonObj.get("Cs").isJsonNull()) + && !jsonObj.get("Cs").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Cs` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("Cs").toString())); + } + if ((jsonObj.get("pl") != null && !jsonObj.get("pl").isJsonNull()) + && !jsonObj.get("pl").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pl` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("pl").toString())); + } + if ((jsonObj.get("pL") != null && !jsonObj.get("pL").isJsonNull()) + && !jsonObj.get("pL").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pL` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("pL").toString())); + } + if ((jsonObj.get("pY") != null && !jsonObj.get("pY").isJsonNull()) + && !jsonObj.get("pY").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pY` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("pY").toString())); + } + if ((jsonObj.get("b") != null && !jsonObj.get("b").isJsonNull()) + && !jsonObj.get("b").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `b` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("b").toString())); + } + if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) + && !jsonObj.get("a").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `a` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("a").toString())); + } + if ((jsonObj.get("k") != null && !jsonObj.get("k").isJsonNull()) + && !jsonObj.get("k").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `k` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("k").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExecutionReport.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExecutionReport' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ExecutionReport.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ExecutionReport value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExecutionReport read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ExecutionReport given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExecutionReport + * @throws IOException if the JSON string is invalid with respect to ExecutionReport + */ + public static ExecutionReport fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExecutionReport.class); + } + + /** + * Convert an instance of ExecutionReport to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Executionreport.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Executionreport.java deleted file mode 100644 index 9d446ef37..000000000 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Executionreport.java +++ /dev/null @@ -1,2399 +0,0 @@ -/* - * Binance Margin Trading WebSocket Market Streams - * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.margin_trading.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.margin_trading.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** Executionreport */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Executionreport extends BaseDTO { - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private Long E; - - public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; - - @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) - @jakarta.annotation.Nullable - private String sLowerCase; - - public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; - - @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) - @jakarta.annotation.Nullable - private String cLowerCase; - - public static final String SERIALIZED_NAME_S = "S"; - - @SerializedName(SERIALIZED_NAME_S) - @jakarta.annotation.Nullable - private String S; - - public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; - - @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) - @jakarta.annotation.Nullable - private String oLowerCase; - - public static final String SERIALIZED_NAME_F_LOWER_CASE = "f"; - - @SerializedName(SERIALIZED_NAME_F_LOWER_CASE) - @jakarta.annotation.Nullable - private String fLowerCase; - - public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; - - @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) - @jakarta.annotation.Nullable - private String qLowerCase; - - public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; - - @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) - @jakarta.annotation.Nullable - private String pLowerCase; - - public static final String SERIALIZED_NAME_P = "P"; - - @SerializedName(SERIALIZED_NAME_P) - @jakarta.annotation.Nullable - private String P; - - public static final String SERIALIZED_NAME_F = "F"; - - @SerializedName(SERIALIZED_NAME_F) - @jakarta.annotation.Nullable - private String F; - - public static final String SERIALIZED_NAME_G_LOWER_CASE = "g"; - - @SerializedName(SERIALIZED_NAME_G_LOWER_CASE) - @jakarta.annotation.Nullable - private Long gLowerCase; - - public static final String SERIALIZED_NAME_C = "C"; - - @SerializedName(SERIALIZED_NAME_C) - @jakarta.annotation.Nullable - private String C; - - public static final String SERIALIZED_NAME_X_LOWER_CASE = "x"; - - @SerializedName(SERIALIZED_NAME_X_LOWER_CASE) - @jakarta.annotation.Nullable - private String xLowerCase; - - public static final String SERIALIZED_NAME_X = "X"; - - @SerializedName(SERIALIZED_NAME_X) - @jakarta.annotation.Nullable - private String X; - - public static final String SERIALIZED_NAME_R_LOWER_CASE = "r"; - - @SerializedName(SERIALIZED_NAME_R_LOWER_CASE) - @jakarta.annotation.Nullable - private String rLowerCase; - - public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; - - @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) - @jakarta.annotation.Nullable - private Long iLowerCase; - - public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; - - @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) - @jakarta.annotation.Nullable - private String lLowerCase; - - public static final String SERIALIZED_NAME_Z_LOWER_CASE = "z"; - - @SerializedName(SERIALIZED_NAME_Z_LOWER_CASE) - @jakarta.annotation.Nullable - private String zLowerCase; - - public static final String SERIALIZED_NAME_L = "L"; - - @SerializedName(SERIALIZED_NAME_L) - @jakarta.annotation.Nullable - private String L; - - public static final String SERIALIZED_NAME_N_LOWER_CASE = "n"; - - @SerializedName(SERIALIZED_NAME_N_LOWER_CASE) - @jakarta.annotation.Nullable - private String nLowerCase; - - public static final String SERIALIZED_NAME_N = "N"; - - @SerializedName(SERIALIZED_NAME_N) - @jakarta.annotation.Nullable - private String N; - - public static final String SERIALIZED_NAME_T = "T"; - - @SerializedName(SERIALIZED_NAME_T) - @jakarta.annotation.Nullable - private Long T; - - public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; - - @SerializedName(SERIALIZED_NAME_T_LOWER_CASE) - @jakarta.annotation.Nullable - private Long tLowerCase; - - public static final String SERIALIZED_NAME_I = "I"; - - @SerializedName(SERIALIZED_NAME_I) - @jakarta.annotation.Nullable - private Long I; - - public static final String SERIALIZED_NAME_W_LOWER_CASE = "w"; - - @SerializedName(SERIALIZED_NAME_W_LOWER_CASE) - @jakarta.annotation.Nullable - private Boolean wLowerCase; - - public static final String SERIALIZED_NAME_M_LOWER_CASE = "m"; - - @SerializedName(SERIALIZED_NAME_M_LOWER_CASE) - @jakarta.annotation.Nullable - private Boolean mLowerCase; - - public static final String SERIALIZED_NAME_M = "M"; - - @SerializedName(SERIALIZED_NAME_M) - @jakarta.annotation.Nullable - private Boolean M; - - public static final String SERIALIZED_NAME_O = "O"; - - @SerializedName(SERIALIZED_NAME_O) - @jakarta.annotation.Nullable - private Long O; - - public static final String SERIALIZED_NAME_Z = "Z"; - - @SerializedName(SERIALIZED_NAME_Z) - @jakarta.annotation.Nullable - private String Z; - - public static final String SERIALIZED_NAME_Y = "Y"; - - @SerializedName(SERIALIZED_NAME_Y) - @jakarta.annotation.Nullable - private String Y; - - public static final String SERIALIZED_NAME_Q = "Q"; - - @SerializedName(SERIALIZED_NAME_Q) - @jakarta.annotation.Nullable - private String Q; - - public static final String SERIALIZED_NAME_W = "W"; - - @SerializedName(SERIALIZED_NAME_W) - @jakarta.annotation.Nullable - private Long W; - - public static final String SERIALIZED_NAME_V = "V"; - - @SerializedName(SERIALIZED_NAME_V) - @jakarta.annotation.Nullable - private String V; - - public static final String SERIALIZED_NAME_D_LOWER_CASE = "d"; - - @SerializedName(SERIALIZED_NAME_D_LOWER_CASE) - @jakarta.annotation.Nullable - private String dLowerCase; - - public static final String SERIALIZED_NAME_D = "D"; - - @SerializedName(SERIALIZED_NAME_D) - @jakarta.annotation.Nullable - private String D; - - public static final String SERIALIZED_NAME_J_LOWER_CASE = "j"; - - @SerializedName(SERIALIZED_NAME_J_LOWER_CASE) - @jakarta.annotation.Nullable - private String jLowerCase; - - public static final String SERIALIZED_NAME_J = "J"; - - @SerializedName(SERIALIZED_NAME_J) - @jakarta.annotation.Nullable - private String J; - - public static final String SERIALIZED_NAME_V_LOWER_CASE = "v"; - - @SerializedName(SERIALIZED_NAME_V_LOWER_CASE) - @jakarta.annotation.Nullable - private String vLowerCase; - - public static final String SERIALIZED_NAME_A = "A"; - - @SerializedName(SERIALIZED_NAME_A) - @jakarta.annotation.Nullable - private String A; - - public static final String SERIALIZED_NAME_B = "B"; - - @SerializedName(SERIALIZED_NAME_B) - @jakarta.annotation.Nullable - private String B; - - public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; - - @SerializedName(SERIALIZED_NAME_U_LOWER_CASE) - @jakarta.annotation.Nullable - private String uLowerCase; - - public static final String SERIALIZED_NAME_U = "U"; - - @SerializedName(SERIALIZED_NAME_U) - @jakarta.annotation.Nullable - private String U; - - public static final String SERIALIZED_NAME_CS = "Cs"; - - @SerializedName(SERIALIZED_NAME_CS) - @jakarta.annotation.Nullable - private String cs; - - public static final String SERIALIZED_NAME_PL = "pl"; - - @SerializedName(SERIALIZED_NAME_PL) - @jakarta.annotation.Nullable - private String pl; - - public static final String SERIALIZED_NAME_P_L = "pL"; - - @SerializedName(SERIALIZED_NAME_P_L) - @jakarta.annotation.Nullable - private String pL; - - public static final String SERIALIZED_NAME_P_Y = "pY"; - - @SerializedName(SERIALIZED_NAME_P_Y) - @jakarta.annotation.Nullable - private String pY; - - public static final String SERIALIZED_NAME_B_LOWER_CASE = "b"; - - @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) - @jakarta.annotation.Nullable - private String bLowerCase; - - public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; - - @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) - @jakarta.annotation.Nullable - private String aLowerCase; - - public static final String SERIALIZED_NAME_K_LOWER_CASE = "k"; - - @SerializedName(SERIALIZED_NAME_K_LOWER_CASE) - @jakarta.annotation.Nullable - private String kLowerCase; - - public static final String SERIALIZED_NAME_U_S = "uS"; - - @SerializedName(SERIALIZED_NAME_U_S) - @jakarta.annotation.Nullable - private Boolean uS; - - public Executionreport() {} - - public Executionreport E(@jakarta.annotation.Nullable Long E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public Long getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable Long E) { - this.E = E; - } - - public Executionreport sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - return this; - } - - /** - * Get sLowerCase - * - * @return sLowerCase - */ - @jakarta.annotation.Nullable - public String getsLowerCase() { - return sLowerCase; - } - - public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - } - - public Executionreport cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { - this.cLowerCase = cLowerCase; - return this; - } - - /** - * Get cLowerCase - * - * @return cLowerCase - */ - @jakarta.annotation.Nullable - public String getcLowerCase() { - return cLowerCase; - } - - public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { - this.cLowerCase = cLowerCase; - } - - public Executionreport S(@jakarta.annotation.Nullable String S) { - this.S = S; - return this; - } - - /** - * Get S - * - * @return S - */ - @jakarta.annotation.Nullable - public String getS() { - return S; - } - - public void setS(@jakarta.annotation.Nullable String S) { - this.S = S; - } - - public Executionreport oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { - this.oLowerCase = oLowerCase; - return this; - } - - /** - * Get oLowerCase - * - * @return oLowerCase - */ - @jakarta.annotation.Nullable - public String getoLowerCase() { - return oLowerCase; - } - - public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { - this.oLowerCase = oLowerCase; - } - - public Executionreport fLowerCase(@jakarta.annotation.Nullable String fLowerCase) { - this.fLowerCase = fLowerCase; - return this; - } - - /** - * Get fLowerCase - * - * @return fLowerCase - */ - @jakarta.annotation.Nullable - public String getfLowerCase() { - return fLowerCase; - } - - public void setfLowerCase(@jakarta.annotation.Nullable String fLowerCase) { - this.fLowerCase = fLowerCase; - } - - public Executionreport qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { - this.qLowerCase = qLowerCase; - return this; - } - - /** - * Get qLowerCase - * - * @return qLowerCase - */ - @jakarta.annotation.Nullable - public String getqLowerCase() { - return qLowerCase; - } - - public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { - this.qLowerCase = qLowerCase; - } - - public Executionreport pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { - this.pLowerCase = pLowerCase; - return this; - } - - /** - * Get pLowerCase - * - * @return pLowerCase - */ - @jakarta.annotation.Nullable - public String getpLowerCase() { - return pLowerCase; - } - - public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { - this.pLowerCase = pLowerCase; - } - - public Executionreport P(@jakarta.annotation.Nullable String P) { - this.P = P; - return this; - } - - /** - * Get P - * - * @return P - */ - @jakarta.annotation.Nullable - public String getP() { - return P; - } - - public void setP(@jakarta.annotation.Nullable String P) { - this.P = P; - } - - public Executionreport F(@jakarta.annotation.Nullable String F) { - this.F = F; - return this; - } - - /** - * Get F - * - * @return F - */ - @jakarta.annotation.Nullable - public String getF() { - return F; - } - - public void setF(@jakarta.annotation.Nullable String F) { - this.F = F; - } - - public Executionreport gLowerCase(@jakarta.annotation.Nullable Long gLowerCase) { - this.gLowerCase = gLowerCase; - return this; - } - - /** - * Get gLowerCase - * - * @return gLowerCase - */ - @jakarta.annotation.Nullable - public Long getgLowerCase() { - return gLowerCase; - } - - public void setgLowerCase(@jakarta.annotation.Nullable Long gLowerCase) { - this.gLowerCase = gLowerCase; - } - - public Executionreport C(@jakarta.annotation.Nullable String C) { - this.C = C; - return this; - } - - /** - * Get C - * - * @return C - */ - @jakarta.annotation.Nullable - public String getC() { - return C; - } - - public void setC(@jakarta.annotation.Nullable String C) { - this.C = C; - } - - public Executionreport xLowerCase(@jakarta.annotation.Nullable String xLowerCase) { - this.xLowerCase = xLowerCase; - return this; - } - - /** - * Get xLowerCase - * - * @return xLowerCase - */ - @jakarta.annotation.Nullable - public String getxLowerCase() { - return xLowerCase; - } - - public void setxLowerCase(@jakarta.annotation.Nullable String xLowerCase) { - this.xLowerCase = xLowerCase; - } - - public Executionreport X(@jakarta.annotation.Nullable String X) { - this.X = X; - return this; - } - - /** - * Get X - * - * @return X - */ - @jakarta.annotation.Nullable - public String getX() { - return X; - } - - public void setX(@jakarta.annotation.Nullable String X) { - this.X = X; - } - - public Executionreport rLowerCase(@jakarta.annotation.Nullable String rLowerCase) { - this.rLowerCase = rLowerCase; - return this; - } - - /** - * Get rLowerCase - * - * @return rLowerCase - */ - @jakarta.annotation.Nullable - public String getrLowerCase() { - return rLowerCase; - } - - public void setrLowerCase(@jakarta.annotation.Nullable String rLowerCase) { - this.rLowerCase = rLowerCase; - } - - public Executionreport iLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { - this.iLowerCase = iLowerCase; - return this; - } - - /** - * Get iLowerCase - * - * @return iLowerCase - */ - @jakarta.annotation.Nullable - public Long getiLowerCase() { - return iLowerCase; - } - - public void setiLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { - this.iLowerCase = iLowerCase; - } - - public Executionreport lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { - this.lLowerCase = lLowerCase; - return this; - } - - /** - * Get lLowerCase - * - * @return lLowerCase - */ - @jakarta.annotation.Nullable - public String getlLowerCase() { - return lLowerCase; - } - - public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { - this.lLowerCase = lLowerCase; - } - - public Executionreport zLowerCase(@jakarta.annotation.Nullable String zLowerCase) { - this.zLowerCase = zLowerCase; - return this; - } - - /** - * Get zLowerCase - * - * @return zLowerCase - */ - @jakarta.annotation.Nullable - public String getzLowerCase() { - return zLowerCase; - } - - public void setzLowerCase(@jakarta.annotation.Nullable String zLowerCase) { - this.zLowerCase = zLowerCase; - } - - public Executionreport L(@jakarta.annotation.Nullable String L) { - this.L = L; - return this; - } - - /** - * Get L - * - * @return L - */ - @jakarta.annotation.Nullable - public String getL() { - return L; - } - - public void setL(@jakarta.annotation.Nullable String L) { - this.L = L; - } - - public Executionreport nLowerCase(@jakarta.annotation.Nullable String nLowerCase) { - this.nLowerCase = nLowerCase; - return this; - } - - /** - * Get nLowerCase - * - * @return nLowerCase - */ - @jakarta.annotation.Nullable - public String getnLowerCase() { - return nLowerCase; - } - - public void setnLowerCase(@jakarta.annotation.Nullable String nLowerCase) { - this.nLowerCase = nLowerCase; - } - - public Executionreport N(@jakarta.annotation.Nullable String N) { - this.N = N; - return this; - } - - /** - * Get N - * - * @return N - */ - @jakarta.annotation.Nullable - public String getN() { - return N; - } - - public void setN(@jakarta.annotation.Nullable String N) { - this.N = N; - } - - public Executionreport T(@jakarta.annotation.Nullable Long T) { - this.T = T; - return this; - } - - /** - * Get T - * - * @return T - */ - @jakarta.annotation.Nullable - public Long getT() { - return T; - } - - public void setT(@jakarta.annotation.Nullable Long T) { - this.T = T; - } - - public Executionreport tLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { - this.tLowerCase = tLowerCase; - return this; - } - - /** - * Get tLowerCase - * - * @return tLowerCase - */ - @jakarta.annotation.Nullable - public Long gettLowerCase() { - return tLowerCase; - } - - public void settLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { - this.tLowerCase = tLowerCase; - } - - public Executionreport I(@jakarta.annotation.Nullable Long I) { - this.I = I; - return this; - } - - /** - * Get I - * - * @return I - */ - @jakarta.annotation.Nullable - public Long getI() { - return I; - } - - public void setI(@jakarta.annotation.Nullable Long I) { - this.I = I; - } - - public Executionreport wLowerCase(@jakarta.annotation.Nullable Boolean wLowerCase) { - this.wLowerCase = wLowerCase; - return this; - } - - /** - * Get wLowerCase - * - * @return wLowerCase - */ - @jakarta.annotation.Nullable - public Boolean getwLowerCase() { - return wLowerCase; - } - - public void setwLowerCase(@jakarta.annotation.Nullable Boolean wLowerCase) { - this.wLowerCase = wLowerCase; - } - - public Executionreport mLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { - this.mLowerCase = mLowerCase; - return this; - } - - /** - * Get mLowerCase - * - * @return mLowerCase - */ - @jakarta.annotation.Nullable - public Boolean getmLowerCase() { - return mLowerCase; - } - - public void setmLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { - this.mLowerCase = mLowerCase; - } - - public Executionreport M(@jakarta.annotation.Nullable Boolean M) { - this.M = M; - return this; - } - - /** - * Get M - * - * @return M - */ - @jakarta.annotation.Nullable - public Boolean getM() { - return M; - } - - public void setM(@jakarta.annotation.Nullable Boolean M) { - this.M = M; - } - - public Executionreport O(@jakarta.annotation.Nullable Long O) { - this.O = O; - return this; - } - - /** - * Get O - * - * @return O - */ - @jakarta.annotation.Nullable - public Long getO() { - return O; - } - - public void setO(@jakarta.annotation.Nullable Long O) { - this.O = O; - } - - public Executionreport Z(@jakarta.annotation.Nullable String Z) { - this.Z = Z; - return this; - } - - /** - * Get Z - * - * @return Z - */ - @jakarta.annotation.Nullable - public String getZ() { - return Z; - } - - public void setZ(@jakarta.annotation.Nullable String Z) { - this.Z = Z; - } - - public Executionreport Y(@jakarta.annotation.Nullable String Y) { - this.Y = Y; - return this; - } - - /** - * Get Y - * - * @return Y - */ - @jakarta.annotation.Nullable - public String getY() { - return Y; - } - - public void setY(@jakarta.annotation.Nullable String Y) { - this.Y = Y; - } - - public Executionreport Q(@jakarta.annotation.Nullable String Q) { - this.Q = Q; - return this; - } - - /** - * Get Q - * - * @return Q - */ - @jakarta.annotation.Nullable - public String getQ() { - return Q; - } - - public void setQ(@jakarta.annotation.Nullable String Q) { - this.Q = Q; - } - - public Executionreport W(@jakarta.annotation.Nullable Long W) { - this.W = W; - return this; - } - - /** - * Get W - * - * @return W - */ - @jakarta.annotation.Nullable - public Long getW() { - return W; - } - - public void setW(@jakarta.annotation.Nullable Long W) { - this.W = W; - } - - public Executionreport V(@jakarta.annotation.Nullable String V) { - this.V = V; - return this; - } - - /** - * Get V - * - * @return V - */ - @jakarta.annotation.Nullable - public String getV() { - return V; - } - - public void setV(@jakarta.annotation.Nullable String V) { - this.V = V; - } - - public Executionreport dLowerCase(@jakarta.annotation.Nullable String dLowerCase) { - this.dLowerCase = dLowerCase; - return this; - } - - /** - * Get dLowerCase - * - * @return dLowerCase - */ - @jakarta.annotation.Nullable - public String getdLowerCase() { - return dLowerCase; - } - - public void setdLowerCase(@jakarta.annotation.Nullable String dLowerCase) { - this.dLowerCase = dLowerCase; - } - - public Executionreport D(@jakarta.annotation.Nullable String D) { - this.D = D; - return this; - } - - /** - * Get D - * - * @return D - */ - @jakarta.annotation.Nullable - public String getD() { - return D; - } - - public void setD(@jakarta.annotation.Nullable String D) { - this.D = D; - } - - public Executionreport jLowerCase(@jakarta.annotation.Nullable String jLowerCase) { - this.jLowerCase = jLowerCase; - return this; - } - - /** - * Get jLowerCase - * - * @return jLowerCase - */ - @jakarta.annotation.Nullable - public String getjLowerCase() { - return jLowerCase; - } - - public void setjLowerCase(@jakarta.annotation.Nullable String jLowerCase) { - this.jLowerCase = jLowerCase; - } - - public Executionreport J(@jakarta.annotation.Nullable String J) { - this.J = J; - return this; - } - - /** - * Get J - * - * @return J - */ - @jakarta.annotation.Nullable - public String getJ() { - return J; - } - - public void setJ(@jakarta.annotation.Nullable String J) { - this.J = J; - } - - public Executionreport vLowerCase(@jakarta.annotation.Nullable String vLowerCase) { - this.vLowerCase = vLowerCase; - return this; - } - - /** - * Get vLowerCase - * - * @return vLowerCase - */ - @jakarta.annotation.Nullable - public String getvLowerCase() { - return vLowerCase; - } - - public void setvLowerCase(@jakarta.annotation.Nullable String vLowerCase) { - this.vLowerCase = vLowerCase; - } - - public Executionreport A(@jakarta.annotation.Nullable String A) { - this.A = A; - return this; - } - - /** - * Get A - * - * @return A - */ - @jakarta.annotation.Nullable - public String getA() { - return A; - } - - public void setA(@jakarta.annotation.Nullable String A) { - this.A = A; - } - - public Executionreport B(@jakarta.annotation.Nullable String B) { - this.B = B; - return this; - } - - /** - * Get B - * - * @return B - */ - @jakarta.annotation.Nullable - public String getB() { - return B; - } - - public void setB(@jakarta.annotation.Nullable String B) { - this.B = B; - } - - public Executionreport uLowerCase(@jakarta.annotation.Nullable String uLowerCase) { - this.uLowerCase = uLowerCase; - return this; - } - - /** - * Get uLowerCase - * - * @return uLowerCase - */ - @jakarta.annotation.Nullable - public String getuLowerCase() { - return uLowerCase; - } - - public void setuLowerCase(@jakarta.annotation.Nullable String uLowerCase) { - this.uLowerCase = uLowerCase; - } - - public Executionreport U(@jakarta.annotation.Nullable String U) { - this.U = U; - return this; - } - - /** - * Get U - * - * @return U - */ - @jakarta.annotation.Nullable - public String getU() { - return U; - } - - public void setU(@jakarta.annotation.Nullable String U) { - this.U = U; - } - - public Executionreport cs(@jakarta.annotation.Nullable String cs) { - this.cs = cs; - return this; - } - - /** - * Get cs - * - * @return cs - */ - @jakarta.annotation.Nullable - public String getCs() { - return cs; - } - - public void setCs(@jakarta.annotation.Nullable String cs) { - this.cs = cs; - } - - public Executionreport pl(@jakarta.annotation.Nullable String pl) { - this.pl = pl; - return this; - } - - /** - * Get pl - * - * @return pl - */ - @jakarta.annotation.Nullable - public String getPl() { - return pl; - } - - public void setPl(@jakarta.annotation.Nullable String pl) { - this.pl = pl; - } - - public Executionreport pL(@jakarta.annotation.Nullable String pL) { - this.pL = pL; - return this; - } - - /** - * Get pL - * - * @return pL - */ - @jakarta.annotation.Nullable - public String getpL() { - return pL; - } - - public void setpL(@jakarta.annotation.Nullable String pL) { - this.pL = pL; - } - - public Executionreport pY(@jakarta.annotation.Nullable String pY) { - this.pY = pY; - return this; - } - - /** - * Get pY - * - * @return pY - */ - @jakarta.annotation.Nullable - public String getpY() { - return pY; - } - - public void setpY(@jakarta.annotation.Nullable String pY) { - this.pY = pY; - } - - public Executionreport bLowerCase(@jakarta.annotation.Nullable String bLowerCase) { - this.bLowerCase = bLowerCase; - return this; - } - - /** - * Get bLowerCase - * - * @return bLowerCase - */ - @jakarta.annotation.Nullable - public String getbLowerCase() { - return bLowerCase; - } - - public void setbLowerCase(@jakarta.annotation.Nullable String bLowerCase) { - this.bLowerCase = bLowerCase; - } - - public Executionreport aLowerCase(@jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - return this; - } - - /** - * Get aLowerCase - * - * @return aLowerCase - */ - @jakarta.annotation.Nullable - public String getaLowerCase() { - return aLowerCase; - } - - public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - } - - public Executionreport kLowerCase(@jakarta.annotation.Nullable String kLowerCase) { - this.kLowerCase = kLowerCase; - return this; - } - - /** - * Get kLowerCase - * - * @return kLowerCase - */ - @jakarta.annotation.Nullable - public String getkLowerCase() { - return kLowerCase; - } - - public void setkLowerCase(@jakarta.annotation.Nullable String kLowerCase) { - this.kLowerCase = kLowerCase; - } - - public Executionreport uS(@jakarta.annotation.Nullable Boolean uS) { - this.uS = uS; - return this; - } - - /** - * Get uS - * - * @return uS - */ - @jakarta.annotation.Nullable - public Boolean getuS() { - return uS; - } - - public void setuS(@jakarta.annotation.Nullable Boolean uS) { - this.uS = uS; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Executionreport executionreport = (Executionreport) o; - return Objects.equals(this.E, executionreport.E) - && Objects.equals(this.sLowerCase, executionreport.sLowerCase) - && Objects.equals(this.cLowerCase, executionreport.cLowerCase) - && Objects.equals(this.S, executionreport.S) - && Objects.equals(this.oLowerCase, executionreport.oLowerCase) - && Objects.equals(this.fLowerCase, executionreport.fLowerCase) - && Objects.equals(this.qLowerCase, executionreport.qLowerCase) - && Objects.equals(this.pLowerCase, executionreport.pLowerCase) - && Objects.equals(this.P, executionreport.P) - && Objects.equals(this.F, executionreport.F) - && Objects.equals(this.gLowerCase, executionreport.gLowerCase) - && Objects.equals(this.C, executionreport.C) - && Objects.equals(this.xLowerCase, executionreport.xLowerCase) - && Objects.equals(this.X, executionreport.X) - && Objects.equals(this.rLowerCase, executionreport.rLowerCase) - && Objects.equals(this.iLowerCase, executionreport.iLowerCase) - && Objects.equals(this.lLowerCase, executionreport.lLowerCase) - && Objects.equals(this.zLowerCase, executionreport.zLowerCase) - && Objects.equals(this.L, executionreport.L) - && Objects.equals(this.nLowerCase, executionreport.nLowerCase) - && Objects.equals(this.N, executionreport.N) - && Objects.equals(this.T, executionreport.T) - && Objects.equals(this.tLowerCase, executionreport.tLowerCase) - && Objects.equals(this.I, executionreport.I) - && Objects.equals(this.wLowerCase, executionreport.wLowerCase) - && Objects.equals(this.mLowerCase, executionreport.mLowerCase) - && Objects.equals(this.M, executionreport.M) - && Objects.equals(this.O, executionreport.O) - && Objects.equals(this.Z, executionreport.Z) - && Objects.equals(this.Y, executionreport.Y) - && Objects.equals(this.Q, executionreport.Q) - && Objects.equals(this.W, executionreport.W) - && Objects.equals(this.V, executionreport.V) - && Objects.equals(this.dLowerCase, executionreport.dLowerCase) - && Objects.equals(this.D, executionreport.D) - && Objects.equals(this.jLowerCase, executionreport.jLowerCase) - && Objects.equals(this.J, executionreport.J) - && Objects.equals(this.vLowerCase, executionreport.vLowerCase) - && Objects.equals(this.A, executionreport.A) - && Objects.equals(this.B, executionreport.B) - && Objects.equals(this.uLowerCase, executionreport.uLowerCase) - && Objects.equals(this.U, executionreport.U) - && Objects.equals(this.cs, executionreport.cs) - && Objects.equals(this.pl, executionreport.pl) - && Objects.equals(this.pL, executionreport.pL) - && Objects.equals(this.pY, executionreport.pY) - && Objects.equals(this.bLowerCase, executionreport.bLowerCase) - && Objects.equals(this.aLowerCase, executionreport.aLowerCase) - && Objects.equals(this.kLowerCase, executionreport.kLowerCase) - && Objects.equals(this.uS, executionreport.uS); - } - - @Override - public int hashCode() { - return Objects.hash( - E, - sLowerCase, - cLowerCase, - S, - oLowerCase, - fLowerCase, - qLowerCase, - pLowerCase, - P, - F, - gLowerCase, - C, - xLowerCase, - X, - rLowerCase, - iLowerCase, - lLowerCase, - zLowerCase, - L, - nLowerCase, - N, - T, - tLowerCase, - I, - wLowerCase, - mLowerCase, - M, - O, - Z, - Y, - Q, - W, - V, - dLowerCase, - D, - jLowerCase, - J, - vLowerCase, - A, - B, - uLowerCase, - U, - cs, - pl, - pL, - pY, - bLowerCase, - aLowerCase, - kLowerCase, - uS); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Executionreport {\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); - sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); - sb.append(" S: ").append(toIndentedString(S)).append("\n"); - sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); - sb.append(" fLowerCase: ").append(toIndentedString(fLowerCase)).append("\n"); - sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); - sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); - sb.append(" P: ").append(toIndentedString(P)).append("\n"); - sb.append(" F: ").append(toIndentedString(F)).append("\n"); - sb.append(" gLowerCase: ").append(toIndentedString(gLowerCase)).append("\n"); - sb.append(" C: ").append(toIndentedString(C)).append("\n"); - sb.append(" xLowerCase: ").append(toIndentedString(xLowerCase)).append("\n"); - sb.append(" X: ").append(toIndentedString(X)).append("\n"); - sb.append(" rLowerCase: ").append(toIndentedString(rLowerCase)).append("\n"); - sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); - sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); - sb.append(" zLowerCase: ").append(toIndentedString(zLowerCase)).append("\n"); - sb.append(" L: ").append(toIndentedString(L)).append("\n"); - sb.append(" nLowerCase: ").append(toIndentedString(nLowerCase)).append("\n"); - sb.append(" N: ").append(toIndentedString(N)).append("\n"); - sb.append(" T: ").append(toIndentedString(T)).append("\n"); - sb.append(" tLowerCase: ").append(toIndentedString(tLowerCase)).append("\n"); - sb.append(" I: ").append(toIndentedString(I)).append("\n"); - sb.append(" wLowerCase: ").append(toIndentedString(wLowerCase)).append("\n"); - sb.append(" mLowerCase: ").append(toIndentedString(mLowerCase)).append("\n"); - sb.append(" M: ").append(toIndentedString(M)).append("\n"); - sb.append(" O: ").append(toIndentedString(O)).append("\n"); - sb.append(" Z: ").append(toIndentedString(Z)).append("\n"); - sb.append(" Y: ").append(toIndentedString(Y)).append("\n"); - sb.append(" Q: ").append(toIndentedString(Q)).append("\n"); - sb.append(" W: ").append(toIndentedString(W)).append("\n"); - sb.append(" V: ").append(toIndentedString(V)).append("\n"); - sb.append(" dLowerCase: ").append(toIndentedString(dLowerCase)).append("\n"); - sb.append(" D: ").append(toIndentedString(D)).append("\n"); - sb.append(" jLowerCase: ").append(toIndentedString(jLowerCase)).append("\n"); - sb.append(" J: ").append(toIndentedString(J)).append("\n"); - sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); - sb.append(" A: ").append(toIndentedString(A)).append("\n"); - sb.append(" B: ").append(toIndentedString(B)).append("\n"); - sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); - sb.append(" U: ").append(toIndentedString(U)).append("\n"); - sb.append(" cs: ").append(toIndentedString(cs)).append("\n"); - sb.append(" pl: ").append(toIndentedString(pl)).append("\n"); - sb.append(" pL: ").append(toIndentedString(pL)).append("\n"); - sb.append(" pY: ").append(toIndentedString(pY)).append("\n"); - sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); - sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); - sb.append(" kLowerCase: ").append(toIndentedString(kLowerCase)).append("\n"); - sb.append(" uS: ").append(toIndentedString(uS)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Long EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - String sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - String sLowerCaseValueAsString = sLowerCaseValue.toString(); - valMap.put("sLowerCase", sLowerCaseValueAsString); - } - String cLowerCaseValue = getcLowerCase(); - if (cLowerCaseValue != null) { - String cLowerCaseValueAsString = cLowerCaseValue.toString(); - valMap.put("cLowerCase", cLowerCaseValueAsString); - } - String SValue = getS(); - if (SValue != null) { - String SValueAsString = SValue.toString(); - valMap.put("S", SValueAsString); - } - String oLowerCaseValue = getoLowerCase(); - if (oLowerCaseValue != null) { - String oLowerCaseValueAsString = oLowerCaseValue.toString(); - valMap.put("oLowerCase", oLowerCaseValueAsString); - } - String fLowerCaseValue = getfLowerCase(); - if (fLowerCaseValue != null) { - String fLowerCaseValueAsString = fLowerCaseValue.toString(); - valMap.put("fLowerCase", fLowerCaseValueAsString); - } - String qLowerCaseValue = getqLowerCase(); - if (qLowerCaseValue != null) { - String qLowerCaseValueAsString = qLowerCaseValue.toString(); - valMap.put("qLowerCase", qLowerCaseValueAsString); - } - String pLowerCaseValue = getpLowerCase(); - if (pLowerCaseValue != null) { - String pLowerCaseValueAsString = pLowerCaseValue.toString(); - valMap.put("pLowerCase", pLowerCaseValueAsString); - } - String PValue = getP(); - if (PValue != null) { - String PValueAsString = PValue.toString(); - valMap.put("P", PValueAsString); - } - String FValue = getF(); - if (FValue != null) { - String FValueAsString = FValue.toString(); - valMap.put("F", FValueAsString); - } - Long gLowerCaseValue = getgLowerCase(); - if (gLowerCaseValue != null) { - String gLowerCaseValueAsString = gLowerCaseValue.toString(); - valMap.put("gLowerCase", gLowerCaseValueAsString); - } - String CValue = getC(); - if (CValue != null) { - String CValueAsString = CValue.toString(); - valMap.put("C", CValueAsString); - } - String xLowerCaseValue = getxLowerCase(); - if (xLowerCaseValue != null) { - String xLowerCaseValueAsString = xLowerCaseValue.toString(); - valMap.put("xLowerCase", xLowerCaseValueAsString); - } - String XValue = getX(); - if (XValue != null) { - String XValueAsString = XValue.toString(); - valMap.put("X", XValueAsString); - } - String rLowerCaseValue = getrLowerCase(); - if (rLowerCaseValue != null) { - String rLowerCaseValueAsString = rLowerCaseValue.toString(); - valMap.put("rLowerCase", rLowerCaseValueAsString); - } - Long iLowerCaseValue = getiLowerCase(); - if (iLowerCaseValue != null) { - String iLowerCaseValueAsString = iLowerCaseValue.toString(); - valMap.put("iLowerCase", iLowerCaseValueAsString); - } - String lLowerCaseValue = getlLowerCase(); - if (lLowerCaseValue != null) { - String lLowerCaseValueAsString = lLowerCaseValue.toString(); - valMap.put("lLowerCase", lLowerCaseValueAsString); - } - String zLowerCaseValue = getzLowerCase(); - if (zLowerCaseValue != null) { - String zLowerCaseValueAsString = zLowerCaseValue.toString(); - valMap.put("zLowerCase", zLowerCaseValueAsString); - } - String LValue = getL(); - if (LValue != null) { - String LValueAsString = LValue.toString(); - valMap.put("L", LValueAsString); - } - String nLowerCaseValue = getnLowerCase(); - if (nLowerCaseValue != null) { - String nLowerCaseValueAsString = nLowerCaseValue.toString(); - valMap.put("nLowerCase", nLowerCaseValueAsString); - } - String NValue = getN(); - if (NValue != null) { - String NValueAsString = NValue.toString(); - valMap.put("N", NValueAsString); - } - Long TValue = getT(); - if (TValue != null) { - String TValueAsString = TValue.toString(); - valMap.put("T", TValueAsString); - } - Long tLowerCaseValue = gettLowerCase(); - if (tLowerCaseValue != null) { - String tLowerCaseValueAsString = tLowerCaseValue.toString(); - valMap.put("tLowerCase", tLowerCaseValueAsString); - } - Long IValue = getI(); - if (IValue != null) { - String IValueAsString = IValue.toString(); - valMap.put("I", IValueAsString); - } - Boolean wLowerCaseValue = getwLowerCase(); - if (wLowerCaseValue != null) { - String wLowerCaseValueAsString = wLowerCaseValue.toString(); - valMap.put("wLowerCase", wLowerCaseValueAsString); - } - Boolean mLowerCaseValue = getmLowerCase(); - if (mLowerCaseValue != null) { - String mLowerCaseValueAsString = mLowerCaseValue.toString(); - valMap.put("mLowerCase", mLowerCaseValueAsString); - } - Boolean MValue = getM(); - if (MValue != null) { - String MValueAsString = MValue.toString(); - valMap.put("M", MValueAsString); - } - Long OValue = getO(); - if (OValue != null) { - String OValueAsString = OValue.toString(); - valMap.put("O", OValueAsString); - } - String ZValue = getZ(); - if (ZValue != null) { - String ZValueAsString = ZValue.toString(); - valMap.put("Z", ZValueAsString); - } - String YValue = getY(); - if (YValue != null) { - String YValueAsString = YValue.toString(); - valMap.put("Y", YValueAsString); - } - String QValue = getQ(); - if (QValue != null) { - String QValueAsString = QValue.toString(); - valMap.put("Q", QValueAsString); - } - Long WValue = getW(); - if (WValue != null) { - String WValueAsString = WValue.toString(); - valMap.put("W", WValueAsString); - } - String VValue = getV(); - if (VValue != null) { - String VValueAsString = VValue.toString(); - valMap.put("V", VValueAsString); - } - String dLowerCaseValue = getdLowerCase(); - if (dLowerCaseValue != null) { - String dLowerCaseValueAsString = dLowerCaseValue.toString(); - valMap.put("dLowerCase", dLowerCaseValueAsString); - } - String DValue = getD(); - if (DValue != null) { - String DValueAsString = DValue.toString(); - valMap.put("D", DValueAsString); - } - String jLowerCaseValue = getjLowerCase(); - if (jLowerCaseValue != null) { - String jLowerCaseValueAsString = jLowerCaseValue.toString(); - valMap.put("jLowerCase", jLowerCaseValueAsString); - } - String JValue = getJ(); - if (JValue != null) { - String JValueAsString = JValue.toString(); - valMap.put("J", JValueAsString); - } - String vLowerCaseValue = getvLowerCase(); - if (vLowerCaseValue != null) { - String vLowerCaseValueAsString = vLowerCaseValue.toString(); - valMap.put("vLowerCase", vLowerCaseValueAsString); - } - String AValue = getA(); - if (AValue != null) { - String AValueAsString = AValue.toString(); - valMap.put("A", AValueAsString); - } - String BValue = getB(); - if (BValue != null) { - String BValueAsString = BValue.toString(); - valMap.put("B", BValueAsString); - } - String uLowerCaseValue = getuLowerCase(); - if (uLowerCaseValue != null) { - String uLowerCaseValueAsString = uLowerCaseValue.toString(); - valMap.put("uLowerCase", uLowerCaseValueAsString); - } - String UValue = getU(); - if (UValue != null) { - String UValueAsString = UValue.toString(); - valMap.put("U", UValueAsString); - } - String csValue = getCs(); - if (csValue != null) { - String csValueAsString = csValue.toString(); - valMap.put("cs", csValueAsString); - } - String plValue = getPl(); - if (plValue != null) { - String plValueAsString = plValue.toString(); - valMap.put("pl", plValueAsString); - } - String pLValue = getpL(); - if (pLValue != null) { - String pLValueAsString = pLValue.toString(); - valMap.put("pL", pLValueAsString); - } - String pYValue = getpY(); - if (pYValue != null) { - String pYValueAsString = pYValue.toString(); - valMap.put("pY", pYValueAsString); - } - String bLowerCaseValue = getbLowerCase(); - if (bLowerCaseValue != null) { - String bLowerCaseValueAsString = bLowerCaseValue.toString(); - valMap.put("bLowerCase", bLowerCaseValueAsString); - } - String aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - String aLowerCaseValueAsString = aLowerCaseValue.toString(); - valMap.put("aLowerCase", aLowerCaseValueAsString); - } - String kLowerCaseValue = getkLowerCase(); - if (kLowerCaseValue != null) { - String kLowerCaseValueAsString = kLowerCaseValue.toString(); - valMap.put("kLowerCase", kLowerCaseValueAsString); - } - Boolean uSValue = getuS(); - if (uSValue != null) { - String uSValueAsString = uSValue.toString(); - valMap.put("uS", uSValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - valMap.put("sLowerCase", sLowerCaseValue); - } - Object cLowerCaseValue = getcLowerCase(); - if (cLowerCaseValue != null) { - valMap.put("cLowerCase", cLowerCaseValue); - } - Object SValue = getS(); - if (SValue != null) { - valMap.put("S", SValue); - } - Object oLowerCaseValue = getoLowerCase(); - if (oLowerCaseValue != null) { - valMap.put("oLowerCase", oLowerCaseValue); - } - Object fLowerCaseValue = getfLowerCase(); - if (fLowerCaseValue != null) { - valMap.put("fLowerCase", fLowerCaseValue); - } - Object qLowerCaseValue = getqLowerCase(); - if (qLowerCaseValue != null) { - valMap.put("qLowerCase", qLowerCaseValue); - } - Object pLowerCaseValue = getpLowerCase(); - if (pLowerCaseValue != null) { - valMap.put("pLowerCase", pLowerCaseValue); - } - Object PValue = getP(); - if (PValue != null) { - valMap.put("P", PValue); - } - Object FValue = getF(); - if (FValue != null) { - valMap.put("F", FValue); - } - Object gLowerCaseValue = getgLowerCase(); - if (gLowerCaseValue != null) { - valMap.put("gLowerCase", gLowerCaseValue); - } - Object CValue = getC(); - if (CValue != null) { - valMap.put("C", CValue); - } - Object xLowerCaseValue = getxLowerCase(); - if (xLowerCaseValue != null) { - valMap.put("xLowerCase", xLowerCaseValue); - } - Object XValue = getX(); - if (XValue != null) { - valMap.put("X", XValue); - } - Object rLowerCaseValue = getrLowerCase(); - if (rLowerCaseValue != null) { - valMap.put("rLowerCase", rLowerCaseValue); - } - Object iLowerCaseValue = getiLowerCase(); - if (iLowerCaseValue != null) { - valMap.put("iLowerCase", iLowerCaseValue); - } - Object lLowerCaseValue = getlLowerCase(); - if (lLowerCaseValue != null) { - valMap.put("lLowerCase", lLowerCaseValue); - } - Object zLowerCaseValue = getzLowerCase(); - if (zLowerCaseValue != null) { - valMap.put("zLowerCase", zLowerCaseValue); - } - Object LValue = getL(); - if (LValue != null) { - valMap.put("L", LValue); - } - Object nLowerCaseValue = getnLowerCase(); - if (nLowerCaseValue != null) { - valMap.put("nLowerCase", nLowerCaseValue); - } - Object NValue = getN(); - if (NValue != null) { - valMap.put("N", NValue); - } - Object TValue = getT(); - if (TValue != null) { - valMap.put("T", TValue); - } - Object tLowerCaseValue = gettLowerCase(); - if (tLowerCaseValue != null) { - valMap.put("tLowerCase", tLowerCaseValue); - } - Object IValue = getI(); - if (IValue != null) { - valMap.put("I", IValue); - } - Object wLowerCaseValue = getwLowerCase(); - if (wLowerCaseValue != null) { - valMap.put("wLowerCase", wLowerCaseValue); - } - Object mLowerCaseValue = getmLowerCase(); - if (mLowerCaseValue != null) { - valMap.put("mLowerCase", mLowerCaseValue); - } - Object MValue = getM(); - if (MValue != null) { - valMap.put("M", MValue); - } - Object OValue = getO(); - if (OValue != null) { - valMap.put("O", OValue); - } - Object ZValue = getZ(); - if (ZValue != null) { - valMap.put("Z", ZValue); - } - Object YValue = getY(); - if (YValue != null) { - valMap.put("Y", YValue); - } - Object QValue = getQ(); - if (QValue != null) { - valMap.put("Q", QValue); - } - Object WValue = getW(); - if (WValue != null) { - valMap.put("W", WValue); - } - Object VValue = getV(); - if (VValue != null) { - valMap.put("V", VValue); - } - Object dLowerCaseValue = getdLowerCase(); - if (dLowerCaseValue != null) { - valMap.put("dLowerCase", dLowerCaseValue); - } - Object DValue = getD(); - if (DValue != null) { - valMap.put("D", DValue); - } - Object jLowerCaseValue = getjLowerCase(); - if (jLowerCaseValue != null) { - valMap.put("jLowerCase", jLowerCaseValue); - } - Object JValue = getJ(); - if (JValue != null) { - valMap.put("J", JValue); - } - Object vLowerCaseValue = getvLowerCase(); - if (vLowerCaseValue != null) { - valMap.put("vLowerCase", vLowerCaseValue); - } - Object AValue = getA(); - if (AValue != null) { - valMap.put("A", AValue); - } - Object BValue = getB(); - if (BValue != null) { - valMap.put("B", BValue); - } - Object uLowerCaseValue = getuLowerCase(); - if (uLowerCaseValue != null) { - valMap.put("uLowerCase", uLowerCaseValue); - } - Object UValue = getU(); - if (UValue != null) { - valMap.put("U", UValue); - } - Object csValue = getCs(); - if (csValue != null) { - valMap.put("cs", csValue); - } - Object plValue = getPl(); - if (plValue != null) { - valMap.put("pl", plValue); - } - Object pLValue = getpL(); - if (pLValue != null) { - valMap.put("pL", pLValue); - } - Object pYValue = getpY(); - if (pYValue != null) { - valMap.put("pY", pYValue); - } - Object bLowerCaseValue = getbLowerCase(); - if (bLowerCaseValue != null) { - valMap.put("bLowerCase", bLowerCaseValue); - } - Object aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - valMap.put("aLowerCase", aLowerCaseValue); - } - Object kLowerCaseValue = getkLowerCase(); - if (kLowerCaseValue != null) { - valMap.put("kLowerCase", kLowerCaseValue); - } - Object uSValue = getuS(); - if (uSValue != null) { - valMap.put("uS", uSValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("E"); - openapiFields.add("s"); - openapiFields.add("c"); - openapiFields.add("S"); - openapiFields.add("o"); - openapiFields.add("f"); - openapiFields.add("q"); - openapiFields.add("p"); - openapiFields.add("P"); - openapiFields.add("F"); - openapiFields.add("g"); - openapiFields.add("C"); - openapiFields.add("x"); - openapiFields.add("X"); - openapiFields.add("r"); - openapiFields.add("i"); - openapiFields.add("l"); - openapiFields.add("z"); - openapiFields.add("L"); - openapiFields.add("n"); - openapiFields.add("N"); - openapiFields.add("T"); - openapiFields.add("t"); - openapiFields.add("I"); - openapiFields.add("w"); - openapiFields.add("m"); - openapiFields.add("M"); - openapiFields.add("O"); - openapiFields.add("Z"); - openapiFields.add("Y"); - openapiFields.add("Q"); - openapiFields.add("W"); - openapiFields.add("V"); - openapiFields.add("d"); - openapiFields.add("D"); - openapiFields.add("j"); - openapiFields.add("J"); - openapiFields.add("v"); - openapiFields.add("A"); - openapiFields.add("B"); - openapiFields.add("u"); - openapiFields.add("U"); - openapiFields.add("Cs"); - openapiFields.add("pl"); - openapiFields.add("pL"); - openapiFields.add("pY"); - openapiFields.add("b"); - openapiFields.add("a"); - openapiFields.add("k"); - openapiFields.add("uS"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Executionreport - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Executionreport.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Executionreport is not found in the" - + " empty JSON string", - Executionreport.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Executionreport.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Executionreport` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) - && !jsonObj.get("s").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `s` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("s").toString())); - } - if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) - && !jsonObj.get("c").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `c` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("c").toString())); - } - if ((jsonObj.get("S") != null && !jsonObj.get("S").isJsonNull()) - && !jsonObj.get("S").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `S` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("S").toString())); - } - if ((jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) - && !jsonObj.get("o").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `o` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("o").toString())); - } - if ((jsonObj.get("f") != null && !jsonObj.get("f").isJsonNull()) - && !jsonObj.get("f").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `f` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("f").toString())); - } - if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) - && !jsonObj.get("q").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `q` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("q").toString())); - } - if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) - && !jsonObj.get("p").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `p` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("p").toString())); - } - if ((jsonObj.get("P") != null && !jsonObj.get("P").isJsonNull()) - && !jsonObj.get("P").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `P` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("P").toString())); - } - if ((jsonObj.get("F") != null && !jsonObj.get("F").isJsonNull()) - && !jsonObj.get("F").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `F` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("F").toString())); - } - if ((jsonObj.get("C") != null && !jsonObj.get("C").isJsonNull()) - && !jsonObj.get("C").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `C` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("C").toString())); - } - if ((jsonObj.get("x") != null && !jsonObj.get("x").isJsonNull()) - && !jsonObj.get("x").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `x` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("x").toString())); - } - if ((jsonObj.get("X") != null && !jsonObj.get("X").isJsonNull()) - && !jsonObj.get("X").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `X` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("X").toString())); - } - if ((jsonObj.get("r") != null && !jsonObj.get("r").isJsonNull()) - && !jsonObj.get("r").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `r` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("r").toString())); - } - if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) - && !jsonObj.get("l").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `l` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("l").toString())); - } - if ((jsonObj.get("z") != null && !jsonObj.get("z").isJsonNull()) - && !jsonObj.get("z").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `z` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("z").toString())); - } - if ((jsonObj.get("L") != null && !jsonObj.get("L").isJsonNull()) - && !jsonObj.get("L").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `L` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("L").toString())); - } - if ((jsonObj.get("n") != null && !jsonObj.get("n").isJsonNull()) - && !jsonObj.get("n").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `n` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("n").toString())); - } - if ((jsonObj.get("N") != null && !jsonObj.get("N").isJsonNull()) - && !jsonObj.get("N").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `N` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("N").toString())); - } - if ((jsonObj.get("Z") != null && !jsonObj.get("Z").isJsonNull()) - && !jsonObj.get("Z").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Z` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("Z").toString())); - } - if ((jsonObj.get("Y") != null && !jsonObj.get("Y").isJsonNull()) - && !jsonObj.get("Y").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Y` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("Y").toString())); - } - if ((jsonObj.get("Q") != null && !jsonObj.get("Q").isJsonNull()) - && !jsonObj.get("Q").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Q` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("Q").toString())); - } - if ((jsonObj.get("V") != null && !jsonObj.get("V").isJsonNull()) - && !jsonObj.get("V").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `V` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("V").toString())); - } - if ((jsonObj.get("d") != null && !jsonObj.get("d").isJsonNull()) - && !jsonObj.get("d").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `d` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("d").toString())); - } - if ((jsonObj.get("D") != null && !jsonObj.get("D").isJsonNull()) - && !jsonObj.get("D").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `D` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("D").toString())); - } - if ((jsonObj.get("j") != null && !jsonObj.get("j").isJsonNull()) - && !jsonObj.get("j").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `j` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("j").toString())); - } - if ((jsonObj.get("J") != null && !jsonObj.get("J").isJsonNull()) - && !jsonObj.get("J").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `J` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("J").toString())); - } - if ((jsonObj.get("v") != null && !jsonObj.get("v").isJsonNull()) - && !jsonObj.get("v").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `v` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("v").toString())); - } - if ((jsonObj.get("A") != null && !jsonObj.get("A").isJsonNull()) - && !jsonObj.get("A").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `A` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("A").toString())); - } - if ((jsonObj.get("B") != null && !jsonObj.get("B").isJsonNull()) - && !jsonObj.get("B").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `B` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("B").toString())); - } - if ((jsonObj.get("u") != null && !jsonObj.get("u").isJsonNull()) - && !jsonObj.get("u").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `u` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("u").toString())); - } - if ((jsonObj.get("U") != null && !jsonObj.get("U").isJsonNull()) - && !jsonObj.get("U").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `U` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("U").toString())); - } - if ((jsonObj.get("Cs") != null && !jsonObj.get("Cs").isJsonNull()) - && !jsonObj.get("Cs").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Cs` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("Cs").toString())); - } - if ((jsonObj.get("pl") != null && !jsonObj.get("pl").isJsonNull()) - && !jsonObj.get("pl").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `pl` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("pl").toString())); - } - if ((jsonObj.get("pL") != null && !jsonObj.get("pL").isJsonNull()) - && !jsonObj.get("pL").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `pL` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("pL").toString())); - } - if ((jsonObj.get("pY") != null && !jsonObj.get("pY").isJsonNull()) - && !jsonObj.get("pY").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `pY` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("pY").toString())); - } - if ((jsonObj.get("b") != null && !jsonObj.get("b").isJsonNull()) - && !jsonObj.get("b").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `b` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("b").toString())); - } - if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) - && !jsonObj.get("a").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `a` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("a").toString())); - } - if ((jsonObj.get("k") != null && !jsonObj.get("k").isJsonNull()) - && !jsonObj.get("k").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `k` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("k").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Executionreport.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Executionreport' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Executionreport.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Executionreport value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Executionreport read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Executionreport given an JSON string - * - * @param jsonString JSON string - * @return An instance of Executionreport - * @throws IOException if the JSON string is invalid with respect to Executionreport - */ - public static Executionreport fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Executionreport.class); - } - - /** - * Convert an instance of Executionreport to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/ListStatus.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/ListStatus.java new file mode 100644 index 000000000..cbc52fc69 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/ListStatus.java @@ -0,0 +1,645 @@ +/* + * Margin WebSocket Market Streams + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.margin_trading.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ListStatus */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ListStatus extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_G_LOWER_CASE = "g"; + + @SerializedName(SERIALIZED_NAME_G_LOWER_CASE) + @jakarta.annotation.Nullable + private Long gLowerCase; + + public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; + + @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) + @jakarta.annotation.Nullable + private String cLowerCase; + + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; + + @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) + @jakarta.annotation.Nullable + private String lLowerCase; + + public static final String SERIALIZED_NAME_L = "L"; + + @SerializedName(SERIALIZED_NAME_L) + @jakarta.annotation.Nullable + private String L; + + public static final String SERIALIZED_NAME_R_LOWER_CASE = "r"; + + @SerializedName(SERIALIZED_NAME_R_LOWER_CASE) + @jakarta.annotation.Nullable + private String rLowerCase; + + public static final String SERIALIZED_NAME_C = "C"; + + @SerializedName(SERIALIZED_NAME_C) + @jakarta.annotation.Nullable + private String C; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public static final String SERIALIZED_NAME_O = "O"; + + @SerializedName(SERIALIZED_NAME_O) + @jakarta.annotation.Nullable + private List<@Valid ListStatusOInner> O; + + public ListStatus() {} + + public ListStatus E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public ListStatus sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * Symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public ListStatus gLowerCase(@jakarta.annotation.Nullable Long gLowerCase) { + this.gLowerCase = gLowerCase; + return this; + } + + /** + * OrderListId + * + * @return gLowerCase + */ + @jakarta.annotation.Nullable + public Long getgLowerCase() { + return gLowerCase; + } + + public void setgLowerCase(@jakarta.annotation.Nullable Long gLowerCase) { + this.gLowerCase = gLowerCase; + } + + public ListStatus cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + return this; + } + + /** + * Contingency Type + * + * @return cLowerCase + */ + @jakarta.annotation.Nullable + public String getcLowerCase() { + return cLowerCase; + } + + public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + } + + public ListStatus lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + return this; + } + + /** + * List Status Type + * + * @return lLowerCase + */ + @jakarta.annotation.Nullable + public String getlLowerCase() { + return lLowerCase; + } + + public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + } + + public ListStatus L(@jakarta.annotation.Nullable String L) { + this.L = L; + return this; + } + + /** + * List Order Status + * + * @return L + */ + @jakarta.annotation.Nullable + public String getL() { + return L; + } + + public void setL(@jakarta.annotation.Nullable String L) { + this.L = L; + } + + public ListStatus rLowerCase(@jakarta.annotation.Nullable String rLowerCase) { + this.rLowerCase = rLowerCase; + return this; + } + + /** + * List Reject Reason + * + * @return rLowerCase + */ + @jakarta.annotation.Nullable + public String getrLowerCase() { + return rLowerCase; + } + + public void setrLowerCase(@jakarta.annotation.Nullable String rLowerCase) { + this.rLowerCase = rLowerCase; + } + + public ListStatus C(@jakarta.annotation.Nullable String C) { + this.C = C; + return this; + } + + /** + * List Client Order ID + * + * @return C + */ + @jakarta.annotation.Nullable + public String getC() { + return C; + } + + public void setC(@jakarta.annotation.Nullable String C) { + this.C = C; + } + + public ListStatus T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * Transaction Time + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + public ListStatus O(@jakarta.annotation.Nullable List<@Valid ListStatusOInner> O) { + this.O = O; + return this; + } + + public ListStatus addOItem(ListStatusOInner OItem) { + if (this.O == null) { + this.O = new ArrayList<>(); + } + this.O.add(OItem); + return this; + } + + /** + * An array of objects + * + * @return O + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid ListStatusOInner> getO() { + return O; + } + + public void setO(@jakarta.annotation.Nullable List<@Valid ListStatusOInner> O) { + this.O = O; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListStatus listStatus = (ListStatus) o; + return Objects.equals(this.E, listStatus.E) + && Objects.equals(this.sLowerCase, listStatus.sLowerCase) + && Objects.equals(this.gLowerCase, listStatus.gLowerCase) + && Objects.equals(this.cLowerCase, listStatus.cLowerCase) + && Objects.equals(this.lLowerCase, listStatus.lLowerCase) + && Objects.equals(this.L, listStatus.L) + && Objects.equals(this.rLowerCase, listStatus.rLowerCase) + && Objects.equals(this.C, listStatus.C) + && Objects.equals(this.T, listStatus.T) + && Objects.equals(this.O, listStatus.O); + } + + @Override + public int hashCode() { + return Objects.hash( + E, sLowerCase, gLowerCase, cLowerCase, lLowerCase, L, rLowerCase, C, T, O); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListStatus {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" gLowerCase: ").append(toIndentedString(gLowerCase)).append("\n"); + sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append(" L: ").append(toIndentedString(L)).append("\n"); + sb.append(" rLowerCase: ").append(toIndentedString(rLowerCase)).append("\n"); + sb.append(" C: ").append(toIndentedString(C)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" O: ").append(toIndentedString(O)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + Long gLowerCaseValue = getgLowerCase(); + if (gLowerCaseValue != null) { + String gLowerCaseValueAsString = gLowerCaseValue.toString(); + valMap.put("gLowerCase", gLowerCaseValueAsString); + } + String cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + String cLowerCaseValueAsString = cLowerCaseValue.toString(); + valMap.put("cLowerCase", cLowerCaseValueAsString); + } + String lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + String LValue = getL(); + if (LValue != null) { + String LValueAsString = LValue.toString(); + valMap.put("L", LValueAsString); + } + String rLowerCaseValue = getrLowerCase(); + if (rLowerCaseValue != null) { + String rLowerCaseValueAsString = rLowerCaseValue.toString(); + valMap.put("rLowerCase", rLowerCaseValueAsString); + } + String CValue = getC(); + if (CValue != null) { + String CValueAsString = CValue.toString(); + valMap.put("C", CValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + List<@Valid ListStatusOInner> OValue = getO(); + if (OValue != null) { + String OValueAsString = JSON.getGson().toJson(OValue); + valMap.put("O", OValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object gLowerCaseValue = getgLowerCase(); + if (gLowerCaseValue != null) { + valMap.put("gLowerCase", gLowerCaseValue); + } + Object cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + valMap.put("cLowerCase", cLowerCaseValue); + } + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); + } + Object LValue = getL(); + if (LValue != null) { + valMap.put("L", LValue); + } + Object rLowerCaseValue = getrLowerCase(); + if (rLowerCaseValue != null) { + valMap.put("rLowerCase", rLowerCaseValue); + } + Object CValue = getC(); + if (CValue != null) { + valMap.put("C", CValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + Object OValue = getO(); + if (OValue != null) { + valMap.put("O", OValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("s"); + openapiFields.add("g"); + openapiFields.add("c"); + openapiFields.add("l"); + openapiFields.add("L"); + openapiFields.add("r"); + openapiFields.add("C"); + openapiFields.add("T"); + openapiFields.add("O"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ListStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ListStatus.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ListStatus is not found in the empty" + + " JSON string", + ListStatus.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ListStatus.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ListStatus` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) + && !jsonObj.get("c").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `c` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("c").toString())); + } + if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) + && !jsonObj.get("l").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `l` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("l").toString())); + } + if ((jsonObj.get("L") != null && !jsonObj.get("L").isJsonNull()) + && !jsonObj.get("L").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `L` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("L").toString())); + } + if ((jsonObj.get("r") != null && !jsonObj.get("r").isJsonNull()) + && !jsonObj.get("r").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `r` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("r").toString())); + } + if ((jsonObj.get("C") != null && !jsonObj.get("C").isJsonNull()) + && !jsonObj.get("C").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `C` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("C").toString())); + } + if (jsonObj.get("O") != null && !jsonObj.get("O").isJsonNull()) { + JsonArray jsonArrayO = jsonObj.getAsJsonArray("O"); + if (jsonArrayO != null) { + // ensure the json data is an array + if (!jsonObj.get("O").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `O` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("O").toString())); + } + + // validate the optional field `O` (array) + for (int i = 0; i < jsonArrayO.size(); i++) { + ListStatusOInner.validateJsonElement(jsonArrayO.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ListStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ListStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ListStatus.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ListStatus value) throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ListStatus read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ListStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of ListStatus + * @throws IOException if the JSON string is invalid with respect to ListStatus + */ + public static ListStatus fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ListStatus.class); + } + + /** + * Convert an instance of ListStatus to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/ListStatusOInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/ListStatusOInner.java new file mode 100644 index 000000000..b0057c01d --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/ListStatusOInner.java @@ -0,0 +1,322 @@ +/* + * Margin WebSocket Market Streams + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.margin_trading.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ListStatusOInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ListStatusOInner extends BaseDTO { + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; + + @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) + @jakarta.annotation.Nullable + private Long iLowerCase; + + public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; + + @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) + @jakarta.annotation.Nullable + private String cLowerCase; + + public ListStatusOInner() {} + + public ListStatusOInner sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * Symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public ListStatusOInner iLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { + this.iLowerCase = iLowerCase; + return this; + } + + /** + * orderId + * + * @return iLowerCase + */ + @jakarta.annotation.Nullable + public Long getiLowerCase() { + return iLowerCase; + } + + public void setiLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { + this.iLowerCase = iLowerCase; + } + + public ListStatusOInner cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + return this; + } + + /** + * ClientOrderId + * + * @return cLowerCase + */ + @jakarta.annotation.Nullable + public String getcLowerCase() { + return cLowerCase; + } + + public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListStatusOInner listStatusOInner = (ListStatusOInner) o; + return Objects.equals(this.sLowerCase, listStatusOInner.sLowerCase) + && Objects.equals(this.iLowerCase, listStatusOInner.iLowerCase) + && Objects.equals(this.cLowerCase, listStatusOInner.cLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash(sLowerCase, iLowerCase, cLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListStatusOInner {\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); + sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + Long iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + String iLowerCaseValueAsString = iLowerCaseValue.toString(); + valMap.put("iLowerCase", iLowerCaseValueAsString); + } + String cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + String cLowerCaseValueAsString = cLowerCaseValue.toString(); + valMap.put("cLowerCase", cLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + valMap.put("iLowerCase", iLowerCaseValue); + } + Object cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + valMap.put("cLowerCase", cLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("s"); + openapiFields.add("i"); + openapiFields.add("c"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ListStatusOInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ListStatusOInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ListStatusOInner is not found in the" + + " empty JSON string", + ListStatusOInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ListStatusOInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ListStatusOInner` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) + && !jsonObj.get("c").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `c` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("c").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ListStatusOInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ListStatusOInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ListStatusOInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ListStatusOInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ListStatusOInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ListStatusOInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ListStatusOInner + * @throws IOException if the JSON string is invalid with respect to ListStatusOInner + */ + public static ListStatusOInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ListStatusOInner.class); + } + + /** + * Convert an instance of ListStatusOInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/ListenKeyExpired.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/ListenKeyExpired.java new file mode 100644 index 000000000..5a4097b74 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/ListenKeyExpired.java @@ -0,0 +1,285 @@ +/* + * Margin WebSocket Market Streams + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.margin_trading.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ListenKeyExpired */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ListenKeyExpired extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private String E; + + public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; + + @SerializedName(SERIALIZED_NAME_LISTEN_KEY) + @jakarta.annotation.Nullable + private String listenKey; + + public ListenKeyExpired() {} + + public ListenKeyExpired E(@jakarta.annotation.Nullable String E) { + this.E = E; + return this; + } + + /** + * Event time + * + * @return E + */ + @jakarta.annotation.Nullable + public String getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable String E) { + this.E = E; + } + + public ListenKeyExpired listenKey(@jakarta.annotation.Nullable String listenKey) { + this.listenKey = listenKey; + return this; + } + + /** + * Get listenKey + * + * @return listenKey + */ + @jakarta.annotation.Nullable + public String getListenKey() { + return listenKey; + } + + public void setListenKey(@jakarta.annotation.Nullable String listenKey) { + this.listenKey = listenKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListenKeyExpired listenKeyExpired = (ListenKeyExpired) o; + return Objects.equals(this.E, listenKeyExpired.E) + && Objects.equals(this.listenKey, listenKeyExpired.listenKey); + } + + @Override + public int hashCode() { + return Objects.hash(E, listenKey); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListenKeyExpired {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" listenKey: ").append(toIndentedString(listenKey)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String listenKeyValue = getListenKey(); + if (listenKeyValue != null) { + String listenKeyValueAsString = listenKeyValue.toString(); + valMap.put("listenKey", listenKeyValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object listenKeyValue = getListenKey(); + if (listenKeyValue != null) { + valMap.put("listenKey", listenKeyValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("listenKey"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ListenKeyExpired + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ListenKeyExpired.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ListenKeyExpired is not found in the" + + " empty JSON string", + ListenKeyExpired.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ListenKeyExpired.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ListenKeyExpired` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("E") != null && !jsonObj.get("E").isJsonNull()) + && !jsonObj.get("E").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `E` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("E").toString())); + } + if ((jsonObj.get("listenKey") != null && !jsonObj.get("listenKey").isJsonNull()) + && !jsonObj.get("listenKey").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `listenKey` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("listenKey").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ListenKeyExpired.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ListenKeyExpired' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ListenKeyExpired.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ListenKeyExpired value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ListenKeyExpired read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ListenKeyExpired given an JSON string + * + * @param jsonString JSON string + * @return An instance of ListenKeyExpired + * @throws IOException if the JSON string is invalid with respect to ListenKeyExpired + */ + public static ListenKeyExpired fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ListenKeyExpired.class); + } + + /** + * Convert an instance of ListenKeyExpired to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Listenkeyexpired.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Listenkeyexpired.java deleted file mode 100644 index 5995e3a75..000000000 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Listenkeyexpired.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Binance Margin Trading WebSocket Market Streams - * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.margin_trading.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.margin_trading.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** Listenkeyexpired */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Listenkeyexpired extends BaseDTO { - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private String E; - - public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; - - @SerializedName(SERIALIZED_NAME_LISTEN_KEY) - @jakarta.annotation.Nullable - private String listenKey; - - public Listenkeyexpired() {} - - public Listenkeyexpired E(@jakarta.annotation.Nullable String E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public String getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable String E) { - this.E = E; - } - - public Listenkeyexpired listenKey(@jakarta.annotation.Nullable String listenKey) { - this.listenKey = listenKey; - return this; - } - - /** - * Get listenKey - * - * @return listenKey - */ - @jakarta.annotation.Nullable - public String getListenKey() { - return listenKey; - } - - public void setListenKey(@jakarta.annotation.Nullable String listenKey) { - this.listenKey = listenKey; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Listenkeyexpired listenkeyexpired = (Listenkeyexpired) o; - return Objects.equals(this.E, listenkeyexpired.E) - && Objects.equals(this.listenKey, listenkeyexpired.listenKey); - } - - @Override - public int hashCode() { - return Objects.hash(E, listenKey); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Listenkeyexpired {\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" listenKey: ").append(toIndentedString(listenKey)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - String listenKeyValue = getListenKey(); - if (listenKeyValue != null) { - String listenKeyValueAsString = listenKeyValue.toString(); - valMap.put("listenKey", listenKeyValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object listenKeyValue = getListenKey(); - if (listenKeyValue != null) { - valMap.put("listenKey", listenKeyValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("E"); - openapiFields.add("listenKey"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Listenkeyexpired - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Listenkeyexpired.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Listenkeyexpired is not found in the" - + " empty JSON string", - Listenkeyexpired.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Listenkeyexpired.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Listenkeyexpired` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("E") != null && !jsonObj.get("E").isJsonNull()) - && !jsonObj.get("E").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `E` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("E").toString())); - } - if ((jsonObj.get("listenKey") != null && !jsonObj.get("listenKey").isJsonNull()) - && !jsonObj.get("listenKey").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `listenKey` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("listenKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Listenkeyexpired.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Listenkeyexpired' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Listenkeyexpired.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Listenkeyexpired value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Listenkeyexpired read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Listenkeyexpired given an JSON string - * - * @param jsonString JSON string - * @return An instance of Listenkeyexpired - * @throws IOException if the JSON string is invalid with respect to Listenkeyexpired - */ - public static Listenkeyexpired fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Listenkeyexpired.class); - } - - /** - * Convert an instance of Listenkeyexpired to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Liststatus.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Liststatus.java deleted file mode 100644 index 948bc7dda..000000000 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Liststatus.java +++ /dev/null @@ -1,645 +0,0 @@ -/* - * Binance Margin Trading WebSocket Market Streams - * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.margin_trading.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.margin_trading.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** Liststatus */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Liststatus extends BaseDTO { - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private Long E; - - public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; - - @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) - @jakarta.annotation.Nullable - private String sLowerCase; - - public static final String SERIALIZED_NAME_G_LOWER_CASE = "g"; - - @SerializedName(SERIALIZED_NAME_G_LOWER_CASE) - @jakarta.annotation.Nullable - private Long gLowerCase; - - public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; - - @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) - @jakarta.annotation.Nullable - private String cLowerCase; - - public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; - - @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) - @jakarta.annotation.Nullable - private String lLowerCase; - - public static final String SERIALIZED_NAME_L = "L"; - - @SerializedName(SERIALIZED_NAME_L) - @jakarta.annotation.Nullable - private String L; - - public static final String SERIALIZED_NAME_R_LOWER_CASE = "r"; - - @SerializedName(SERIALIZED_NAME_R_LOWER_CASE) - @jakarta.annotation.Nullable - private String rLowerCase; - - public static final String SERIALIZED_NAME_C = "C"; - - @SerializedName(SERIALIZED_NAME_C) - @jakarta.annotation.Nullable - private String C; - - public static final String SERIALIZED_NAME_T = "T"; - - @SerializedName(SERIALIZED_NAME_T) - @jakarta.annotation.Nullable - private Long T; - - public static final String SERIALIZED_NAME_O = "O"; - - @SerializedName(SERIALIZED_NAME_O) - @jakarta.annotation.Nullable - private List<@Valid ListstatusOInner> O; - - public Liststatus() {} - - public Liststatus E(@jakarta.annotation.Nullable Long E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public Long getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable Long E) { - this.E = E; - } - - public Liststatus sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - return this; - } - - /** - * Get sLowerCase - * - * @return sLowerCase - */ - @jakarta.annotation.Nullable - public String getsLowerCase() { - return sLowerCase; - } - - public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - } - - public Liststatus gLowerCase(@jakarta.annotation.Nullable Long gLowerCase) { - this.gLowerCase = gLowerCase; - return this; - } - - /** - * Get gLowerCase - * - * @return gLowerCase - */ - @jakarta.annotation.Nullable - public Long getgLowerCase() { - return gLowerCase; - } - - public void setgLowerCase(@jakarta.annotation.Nullable Long gLowerCase) { - this.gLowerCase = gLowerCase; - } - - public Liststatus cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { - this.cLowerCase = cLowerCase; - return this; - } - - /** - * Get cLowerCase - * - * @return cLowerCase - */ - @jakarta.annotation.Nullable - public String getcLowerCase() { - return cLowerCase; - } - - public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { - this.cLowerCase = cLowerCase; - } - - public Liststatus lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { - this.lLowerCase = lLowerCase; - return this; - } - - /** - * Get lLowerCase - * - * @return lLowerCase - */ - @jakarta.annotation.Nullable - public String getlLowerCase() { - return lLowerCase; - } - - public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { - this.lLowerCase = lLowerCase; - } - - public Liststatus L(@jakarta.annotation.Nullable String L) { - this.L = L; - return this; - } - - /** - * Get L - * - * @return L - */ - @jakarta.annotation.Nullable - public String getL() { - return L; - } - - public void setL(@jakarta.annotation.Nullable String L) { - this.L = L; - } - - public Liststatus rLowerCase(@jakarta.annotation.Nullable String rLowerCase) { - this.rLowerCase = rLowerCase; - return this; - } - - /** - * Get rLowerCase - * - * @return rLowerCase - */ - @jakarta.annotation.Nullable - public String getrLowerCase() { - return rLowerCase; - } - - public void setrLowerCase(@jakarta.annotation.Nullable String rLowerCase) { - this.rLowerCase = rLowerCase; - } - - public Liststatus C(@jakarta.annotation.Nullable String C) { - this.C = C; - return this; - } - - /** - * Get C - * - * @return C - */ - @jakarta.annotation.Nullable - public String getC() { - return C; - } - - public void setC(@jakarta.annotation.Nullable String C) { - this.C = C; - } - - public Liststatus T(@jakarta.annotation.Nullable Long T) { - this.T = T; - return this; - } - - /** - * Get T - * - * @return T - */ - @jakarta.annotation.Nullable - public Long getT() { - return T; - } - - public void setT(@jakarta.annotation.Nullable Long T) { - this.T = T; - } - - public Liststatus O(@jakarta.annotation.Nullable List<@Valid ListstatusOInner> O) { - this.O = O; - return this; - } - - public Liststatus addOItem(ListstatusOInner OItem) { - if (this.O == null) { - this.O = new ArrayList<>(); - } - this.O.add(OItem); - return this; - } - - /** - * Get O - * - * @return O - */ - @jakarta.annotation.Nullable - @Valid - public List<@Valid ListstatusOInner> getO() { - return O; - } - - public void setO(@jakarta.annotation.Nullable List<@Valid ListstatusOInner> O) { - this.O = O; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Liststatus liststatus = (Liststatus) o; - return Objects.equals(this.E, liststatus.E) - && Objects.equals(this.sLowerCase, liststatus.sLowerCase) - && Objects.equals(this.gLowerCase, liststatus.gLowerCase) - && Objects.equals(this.cLowerCase, liststatus.cLowerCase) - && Objects.equals(this.lLowerCase, liststatus.lLowerCase) - && Objects.equals(this.L, liststatus.L) - && Objects.equals(this.rLowerCase, liststatus.rLowerCase) - && Objects.equals(this.C, liststatus.C) - && Objects.equals(this.T, liststatus.T) - && Objects.equals(this.O, liststatus.O); - } - - @Override - public int hashCode() { - return Objects.hash( - E, sLowerCase, gLowerCase, cLowerCase, lLowerCase, L, rLowerCase, C, T, O); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Liststatus {\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); - sb.append(" gLowerCase: ").append(toIndentedString(gLowerCase)).append("\n"); - sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); - sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); - sb.append(" L: ").append(toIndentedString(L)).append("\n"); - sb.append(" rLowerCase: ").append(toIndentedString(rLowerCase)).append("\n"); - sb.append(" C: ").append(toIndentedString(C)).append("\n"); - sb.append(" T: ").append(toIndentedString(T)).append("\n"); - sb.append(" O: ").append(toIndentedString(O)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Long EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - String sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - String sLowerCaseValueAsString = sLowerCaseValue.toString(); - valMap.put("sLowerCase", sLowerCaseValueAsString); - } - Long gLowerCaseValue = getgLowerCase(); - if (gLowerCaseValue != null) { - String gLowerCaseValueAsString = gLowerCaseValue.toString(); - valMap.put("gLowerCase", gLowerCaseValueAsString); - } - String cLowerCaseValue = getcLowerCase(); - if (cLowerCaseValue != null) { - String cLowerCaseValueAsString = cLowerCaseValue.toString(); - valMap.put("cLowerCase", cLowerCaseValueAsString); - } - String lLowerCaseValue = getlLowerCase(); - if (lLowerCaseValue != null) { - String lLowerCaseValueAsString = lLowerCaseValue.toString(); - valMap.put("lLowerCase", lLowerCaseValueAsString); - } - String LValue = getL(); - if (LValue != null) { - String LValueAsString = LValue.toString(); - valMap.put("L", LValueAsString); - } - String rLowerCaseValue = getrLowerCase(); - if (rLowerCaseValue != null) { - String rLowerCaseValueAsString = rLowerCaseValue.toString(); - valMap.put("rLowerCase", rLowerCaseValueAsString); - } - String CValue = getC(); - if (CValue != null) { - String CValueAsString = CValue.toString(); - valMap.put("C", CValueAsString); - } - Long TValue = getT(); - if (TValue != null) { - String TValueAsString = TValue.toString(); - valMap.put("T", TValueAsString); - } - List<@Valid ListstatusOInner> OValue = getO(); - if (OValue != null) { - String OValueAsString = JSON.getGson().toJson(OValue); - valMap.put("O", OValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - valMap.put("sLowerCase", sLowerCaseValue); - } - Object gLowerCaseValue = getgLowerCase(); - if (gLowerCaseValue != null) { - valMap.put("gLowerCase", gLowerCaseValue); - } - Object cLowerCaseValue = getcLowerCase(); - if (cLowerCaseValue != null) { - valMap.put("cLowerCase", cLowerCaseValue); - } - Object lLowerCaseValue = getlLowerCase(); - if (lLowerCaseValue != null) { - valMap.put("lLowerCase", lLowerCaseValue); - } - Object LValue = getL(); - if (LValue != null) { - valMap.put("L", LValue); - } - Object rLowerCaseValue = getrLowerCase(); - if (rLowerCaseValue != null) { - valMap.put("rLowerCase", rLowerCaseValue); - } - Object CValue = getC(); - if (CValue != null) { - valMap.put("C", CValue); - } - Object TValue = getT(); - if (TValue != null) { - valMap.put("T", TValue); - } - Object OValue = getO(); - if (OValue != null) { - valMap.put("O", OValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("E"); - openapiFields.add("s"); - openapiFields.add("g"); - openapiFields.add("c"); - openapiFields.add("l"); - openapiFields.add("L"); - openapiFields.add("r"); - openapiFields.add("C"); - openapiFields.add("T"); - openapiFields.add("O"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Liststatus - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Liststatus.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Liststatus is not found in the empty" - + " JSON string", - Liststatus.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Liststatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Liststatus` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) - && !jsonObj.get("s").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `s` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("s").toString())); - } - if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) - && !jsonObj.get("c").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `c` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("c").toString())); - } - if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) - && !jsonObj.get("l").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `l` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("l").toString())); - } - if ((jsonObj.get("L") != null && !jsonObj.get("L").isJsonNull()) - && !jsonObj.get("L").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `L` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("L").toString())); - } - if ((jsonObj.get("r") != null && !jsonObj.get("r").isJsonNull()) - && !jsonObj.get("r").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `r` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("r").toString())); - } - if ((jsonObj.get("C") != null && !jsonObj.get("C").isJsonNull()) - && !jsonObj.get("C").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `C` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("C").toString())); - } - if (jsonObj.get("O") != null && !jsonObj.get("O").isJsonNull()) { - JsonArray jsonArrayO = jsonObj.getAsJsonArray("O"); - if (jsonArrayO != null) { - // ensure the json data is an array - if (!jsonObj.get("O").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `O` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("O").toString())); - } - - // validate the optional field `O` (array) - for (int i = 0; i < jsonArrayO.size(); i++) { - ListstatusOInner.validateJsonElement(jsonArrayO.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Liststatus.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Liststatus' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Liststatus.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Liststatus value) throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Liststatus read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Liststatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of Liststatus - * @throws IOException if the JSON string is invalid with respect to Liststatus - */ - public static Liststatus fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Liststatus.class); - } - - /** - * Convert an instance of Liststatus to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/ListstatusOInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/ListstatusOInner.java deleted file mode 100644 index 3b0b0f934..000000000 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/ListstatusOInner.java +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Binance Margin Trading WebSocket Market Streams - * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.margin_trading.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.margin_trading.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** ListstatusOInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ListstatusOInner extends BaseDTO { - public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; - - @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) - @jakarta.annotation.Nullable - private String sLowerCase; - - public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; - - @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) - @jakarta.annotation.Nullable - private Long iLowerCase; - - public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; - - @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) - @jakarta.annotation.Nullable - private String cLowerCase; - - public ListstatusOInner() {} - - public ListstatusOInner sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - return this; - } - - /** - * Get sLowerCase - * - * @return sLowerCase - */ - @jakarta.annotation.Nullable - public String getsLowerCase() { - return sLowerCase; - } - - public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { - this.sLowerCase = sLowerCase; - } - - public ListstatusOInner iLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { - this.iLowerCase = iLowerCase; - return this; - } - - /** - * Get iLowerCase - * - * @return iLowerCase - */ - @jakarta.annotation.Nullable - public Long getiLowerCase() { - return iLowerCase; - } - - public void setiLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { - this.iLowerCase = iLowerCase; - } - - public ListstatusOInner cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { - this.cLowerCase = cLowerCase; - return this; - } - - /** - * Get cLowerCase - * - * @return cLowerCase - */ - @jakarta.annotation.Nullable - public String getcLowerCase() { - return cLowerCase; - } - - public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { - this.cLowerCase = cLowerCase; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ListstatusOInner liststatusOInner = (ListstatusOInner) o; - return Objects.equals(this.sLowerCase, liststatusOInner.sLowerCase) - && Objects.equals(this.iLowerCase, liststatusOInner.iLowerCase) - && Objects.equals(this.cLowerCase, liststatusOInner.cLowerCase); - } - - @Override - public int hashCode() { - return Objects.hash(sLowerCase, iLowerCase, cLowerCase); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ListstatusOInner {\n"); - sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); - sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); - sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - String sLowerCaseValueAsString = sLowerCaseValue.toString(); - valMap.put("sLowerCase", sLowerCaseValueAsString); - } - Long iLowerCaseValue = getiLowerCase(); - if (iLowerCaseValue != null) { - String iLowerCaseValueAsString = iLowerCaseValue.toString(); - valMap.put("iLowerCase", iLowerCaseValueAsString); - } - String cLowerCaseValue = getcLowerCase(); - if (cLowerCaseValue != null) { - String cLowerCaseValueAsString = cLowerCaseValue.toString(); - valMap.put("cLowerCase", cLowerCaseValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object sLowerCaseValue = getsLowerCase(); - if (sLowerCaseValue != null) { - valMap.put("sLowerCase", sLowerCaseValue); - } - Object iLowerCaseValue = getiLowerCase(); - if (iLowerCaseValue != null) { - valMap.put("iLowerCase", iLowerCaseValue); - } - Object cLowerCaseValue = getcLowerCase(); - if (cLowerCaseValue != null) { - valMap.put("cLowerCase", cLowerCaseValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("s"); - openapiFields.add("i"); - openapiFields.add("c"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ListstatusOInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ListstatusOInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ListstatusOInner is not found in the" - + " empty JSON string", - ListstatusOInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ListstatusOInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ListstatusOInner` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) - && !jsonObj.get("s").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `s` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("s").toString())); - } - if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) - && !jsonObj.get("c").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `c` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("c").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ListstatusOInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ListstatusOInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ListstatusOInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ListstatusOInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ListstatusOInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ListstatusOInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of ListstatusOInner - * @throws IOException if the JSON string is invalid with respect to ListstatusOInner - */ - public static ListstatusOInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ListstatusOInner.class); - } - - /** - * Convert an instance of ListstatusOInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/MarginLevelStatusChange.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/MarginLevelStatusChange.java index bcb382e2e..3875251f0 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/MarginLevelStatusChange.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/MarginLevelStatusChange.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading WebSocket Market Streams - * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams + * Margin WebSocket Market Streams + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MarginLevelStatusChange */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginLevelStatusChange extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -65,7 +65,7 @@ public MarginLevelStatusChange E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -84,7 +84,7 @@ public MarginLevelStatusChange lLowerCase(@jakarta.annotation.Nullable String lL } /** - * Get lLowerCase + * Margin level * * @return lLowerCase */ @@ -103,7 +103,7 @@ public MarginLevelStatusChange sLowerCase(@jakarta.annotation.Nullable String sL } /** - * Get sLowerCase + * Margin call status * * @return sLowerCase */ diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/OutboundAccountPosition.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/OutboundAccountPosition.java new file mode 100644 index 000000000..ff5012610 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/OutboundAccountPosition.java @@ -0,0 +1,340 @@ +/* + * Margin WebSocket Market Streams + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.margin_trading.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** OutboundAccountPosition */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OutboundAccountPosition extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; + + @SerializedName(SERIALIZED_NAME_U_LOWER_CASE) + @jakarta.annotation.Nullable + private Long uLowerCase; + + public static final String SERIALIZED_NAME_B = "B"; + + @SerializedName(SERIALIZED_NAME_B) + @jakarta.annotation.Nullable + private List<@Valid OutboundAccountPositionBInner> B; + + public OutboundAccountPosition() {} + + public OutboundAccountPosition E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public OutboundAccountPosition uLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + return this; + } + + /** + * Time of last account update + * + * @return uLowerCase + */ + @jakarta.annotation.Nullable + public Long getuLowerCase() { + return uLowerCase; + } + + public void setuLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + } + + public OutboundAccountPosition B( + @jakarta.annotation.Nullable List<@Valid OutboundAccountPositionBInner> B) { + this.B = B; + return this; + } + + public OutboundAccountPosition addBItem(OutboundAccountPositionBInner BItem) { + if (this.B == null) { + this.B = new ArrayList<>(); + } + this.B.add(BItem); + return this; + } + + /** + * Balances Array + * + * @return B + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid OutboundAccountPositionBInner> getB() { + return B; + } + + public void setB(@jakarta.annotation.Nullable List<@Valid OutboundAccountPositionBInner> B) { + this.B = B; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OutboundAccountPosition outboundAccountPosition = (OutboundAccountPosition) o; + return Objects.equals(this.E, outboundAccountPosition.E) + && Objects.equals(this.uLowerCase, outboundAccountPosition.uLowerCase) + && Objects.equals(this.B, outboundAccountPosition.B); + } + + @Override + public int hashCode() { + return Objects.hash(E, uLowerCase, B); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OutboundAccountPosition {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); + sb.append(" B: ").append(toIndentedString(B)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + Long uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + String uLowerCaseValueAsString = uLowerCaseValue.toString(); + valMap.put("uLowerCase", uLowerCaseValueAsString); + } + List<@Valid OutboundAccountPositionBInner> BValue = getB(); + if (BValue != null) { + String BValueAsString = JSON.getGson().toJson(BValue); + valMap.put("B", BValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + valMap.put("uLowerCase", uLowerCaseValue); + } + Object BValue = getB(); + if (BValue != null) { + valMap.put("B", BValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("u"); + openapiFields.add("B"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OutboundAccountPosition + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OutboundAccountPosition.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OutboundAccountPosition is not found" + + " in the empty JSON string", + OutboundAccountPosition.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OutboundAccountPosition.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OutboundAccountPosition` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("B") != null && !jsonObj.get("B").isJsonNull()) { + JsonArray jsonArrayB = jsonObj.getAsJsonArray("B"); + if (jsonArrayB != null) { + // ensure the json data is an array + if (!jsonObj.get("B").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `B` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("B").toString())); + } + + // validate the optional field `B` (array) + for (int i = 0; i < jsonArrayB.size(); i++) { + OutboundAccountPositionBInner.validateJsonElement(jsonArrayB.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OutboundAccountPosition.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OutboundAccountPosition' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(OutboundAccountPosition.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OutboundAccountPosition value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OutboundAccountPosition read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OutboundAccountPosition given an JSON string + * + * @param jsonString JSON string + * @return An instance of OutboundAccountPosition + * @throws IOException if the JSON string is invalid with respect to OutboundAccountPosition + */ + public static OutboundAccountPosition fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OutboundAccountPosition.class); + } + + /** + * Convert an instance of OutboundAccountPosition to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/OutboundAccountPositionBInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/OutboundAccountPositionBInner.java new file mode 100644 index 000000000..ec782f447 --- /dev/null +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/OutboundAccountPositionBInner.java @@ -0,0 +1,339 @@ +/* + * Margin WebSocket Market Streams + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.margin_trading.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** OutboundAccountPositionBInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OutboundAccountPositionBInner extends BaseDTO { + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private String aLowerCase; + + public static final String SERIALIZED_NAME_F_LOWER_CASE = "f"; + + @SerializedName(SERIALIZED_NAME_F_LOWER_CASE) + @jakarta.annotation.Nullable + private String fLowerCase; + + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; + + @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) + @jakarta.annotation.Nullable + private String lLowerCase; + + public OutboundAccountPositionBInner() {} + + public OutboundAccountPositionBInner aLowerCase( + @jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + /** + * Asset + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + public String getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + } + + public OutboundAccountPositionBInner fLowerCase( + @jakarta.annotation.Nullable String fLowerCase) { + this.fLowerCase = fLowerCase; + return this; + } + + /** + * Free + * + * @return fLowerCase + */ + @jakarta.annotation.Nullable + public String getfLowerCase() { + return fLowerCase; + } + + public void setfLowerCase(@jakarta.annotation.Nullable String fLowerCase) { + this.fLowerCase = fLowerCase; + } + + public OutboundAccountPositionBInner lLowerCase( + @jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + return this; + } + + /** + * Locked + * + * @return lLowerCase + */ + @jakarta.annotation.Nullable + public String getlLowerCase() { + return lLowerCase; + } + + public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OutboundAccountPositionBInner outboundAccountPositionBInner = + (OutboundAccountPositionBInner) o; + return Objects.equals(this.aLowerCase, outboundAccountPositionBInner.aLowerCase) + && Objects.equals(this.fLowerCase, outboundAccountPositionBInner.fLowerCase) + && Objects.equals(this.lLowerCase, outboundAccountPositionBInner.lLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash(aLowerCase, fLowerCase, lLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OutboundAccountPositionBInner {\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" fLowerCase: ").append(toIndentedString(fLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = aLowerCaseValue.toString(); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + String fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + String fLowerCaseValueAsString = fLowerCaseValue.toString(); + valMap.put("fLowerCase", fLowerCaseValueAsString); + } + String lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + Object fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + valMap.put("fLowerCase", fLowerCaseValue); + } + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("a"); + openapiFields.add("f"); + openapiFields.add("l"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * OutboundAccountPositionBInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OutboundAccountPositionBInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OutboundAccountPositionBInner is not" + + " found in the empty JSON string", + OutboundAccountPositionBInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OutboundAccountPositionBInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OutboundAccountPositionBInner` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) + && !jsonObj.get("a").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `a` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("a").toString())); + } + if ((jsonObj.get("f") != null && !jsonObj.get("f").isJsonNull()) + && !jsonObj.get("f").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `f` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("f").toString())); + } + if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) + && !jsonObj.get("l").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `l` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("l").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OutboundAccountPositionBInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OutboundAccountPositionBInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(OutboundAccountPositionBInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OutboundAccountPositionBInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OutboundAccountPositionBInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OutboundAccountPositionBInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OutboundAccountPositionBInner + * @throws IOException if the JSON string is invalid with respect to + * OutboundAccountPositionBInner + */ + public static OutboundAccountPositionBInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OutboundAccountPositionBInner.class); + } + + /** + * Convert an instance of OutboundAccountPositionBInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Outboundaccountposition.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Outboundaccountposition.java deleted file mode 100644 index e3e8cac10..000000000 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Outboundaccountposition.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Binance Margin Trading WebSocket Market Streams - * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.margin_trading.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.margin_trading.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** Outboundaccountposition */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Outboundaccountposition extends BaseDTO { - public static final String SERIALIZED_NAME_E = "E"; - - @SerializedName(SERIALIZED_NAME_E) - @jakarta.annotation.Nullable - private Long E; - - public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; - - @SerializedName(SERIALIZED_NAME_U_LOWER_CASE) - @jakarta.annotation.Nullable - private Long uLowerCase; - - public static final String SERIALIZED_NAME_B = "B"; - - @SerializedName(SERIALIZED_NAME_B) - @jakarta.annotation.Nullable - private List<@Valid OutboundaccountpositionBInner> B; - - public Outboundaccountposition() {} - - public Outboundaccountposition E(@jakarta.annotation.Nullable Long E) { - this.E = E; - return this; - } - - /** - * Get E - * - * @return E - */ - @jakarta.annotation.Nullable - public Long getE() { - return E; - } - - public void setE(@jakarta.annotation.Nullable Long E) { - this.E = E; - } - - public Outboundaccountposition uLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { - this.uLowerCase = uLowerCase; - return this; - } - - /** - * Get uLowerCase - * - * @return uLowerCase - */ - @jakarta.annotation.Nullable - public Long getuLowerCase() { - return uLowerCase; - } - - public void setuLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { - this.uLowerCase = uLowerCase; - } - - public Outboundaccountposition B( - @jakarta.annotation.Nullable List<@Valid OutboundaccountpositionBInner> B) { - this.B = B; - return this; - } - - public Outboundaccountposition addBItem(OutboundaccountpositionBInner BItem) { - if (this.B == null) { - this.B = new ArrayList<>(); - } - this.B.add(BItem); - return this; - } - - /** - * Get B - * - * @return B - */ - @jakarta.annotation.Nullable - @Valid - public List<@Valid OutboundaccountpositionBInner> getB() { - return B; - } - - public void setB(@jakarta.annotation.Nullable List<@Valid OutboundaccountpositionBInner> B) { - this.B = B; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Outboundaccountposition outboundaccountposition = (Outboundaccountposition) o; - return Objects.equals(this.E, outboundaccountposition.E) - && Objects.equals(this.uLowerCase, outboundaccountposition.uLowerCase) - && Objects.equals(this.B, outboundaccountposition.B); - } - - @Override - public int hashCode() { - return Objects.hash(E, uLowerCase, B); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Outboundaccountposition {\n"); - sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); - sb.append(" B: ").append(toIndentedString(B)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Long EValue = getE(); - if (EValue != null) { - String EValueAsString = EValue.toString(); - valMap.put("E", EValueAsString); - } - Long uLowerCaseValue = getuLowerCase(); - if (uLowerCaseValue != null) { - String uLowerCaseValueAsString = uLowerCaseValue.toString(); - valMap.put("uLowerCase", uLowerCaseValueAsString); - } - List<@Valid OutboundaccountpositionBInner> BValue = getB(); - if (BValue != null) { - String BValueAsString = JSON.getGson().toJson(BValue); - valMap.put("B", BValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object EValue = getE(); - if (EValue != null) { - valMap.put("E", EValue); - } - Object uLowerCaseValue = getuLowerCase(); - if (uLowerCaseValue != null) { - valMap.put("uLowerCase", uLowerCaseValue); - } - Object BValue = getB(); - if (BValue != null) { - valMap.put("B", BValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("E"); - openapiFields.add("u"); - openapiFields.add("B"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Outboundaccountposition - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Outboundaccountposition.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Outboundaccountposition is not found" - + " in the empty JSON string", - Outboundaccountposition.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Outboundaccountposition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Outboundaccountposition` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("B") != null && !jsonObj.get("B").isJsonNull()) { - JsonArray jsonArrayB = jsonObj.getAsJsonArray("B"); - if (jsonArrayB != null) { - // ensure the json data is an array - if (!jsonObj.get("B").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `B` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("B").toString())); - } - - // validate the optional field `B` (array) - for (int i = 0; i < jsonArrayB.size(); i++) { - OutboundaccountpositionBInner.validateJsonElement(jsonArrayB.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Outboundaccountposition.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Outboundaccountposition' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Outboundaccountposition.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Outboundaccountposition value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Outboundaccountposition read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Outboundaccountposition given an JSON string - * - * @param jsonString JSON string - * @return An instance of Outboundaccountposition - * @throws IOException if the JSON string is invalid with respect to Outboundaccountposition - */ - public static Outboundaccountposition fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Outboundaccountposition.class); - } - - /** - * Convert an instance of Outboundaccountposition to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/OutboundaccountpositionBInner.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/OutboundaccountpositionBInner.java deleted file mode 100644 index 6e53f31cd..000000000 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/OutboundaccountpositionBInner.java +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Binance Margin Trading WebSocket Market Streams - * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.margin_trading.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.margin_trading.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** OutboundaccountpositionBInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OutboundaccountpositionBInner extends BaseDTO { - public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; - - @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) - @jakarta.annotation.Nullable - private String aLowerCase; - - public static final String SERIALIZED_NAME_F_LOWER_CASE = "f"; - - @SerializedName(SERIALIZED_NAME_F_LOWER_CASE) - @jakarta.annotation.Nullable - private String fLowerCase; - - public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; - - @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) - @jakarta.annotation.Nullable - private String lLowerCase; - - public OutboundaccountpositionBInner() {} - - public OutboundaccountpositionBInner aLowerCase( - @jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - return this; - } - - /** - * Get aLowerCase - * - * @return aLowerCase - */ - @jakarta.annotation.Nullable - public String getaLowerCase() { - return aLowerCase; - } - - public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { - this.aLowerCase = aLowerCase; - } - - public OutboundaccountpositionBInner fLowerCase( - @jakarta.annotation.Nullable String fLowerCase) { - this.fLowerCase = fLowerCase; - return this; - } - - /** - * Get fLowerCase - * - * @return fLowerCase - */ - @jakarta.annotation.Nullable - public String getfLowerCase() { - return fLowerCase; - } - - public void setfLowerCase(@jakarta.annotation.Nullable String fLowerCase) { - this.fLowerCase = fLowerCase; - } - - public OutboundaccountpositionBInner lLowerCase( - @jakarta.annotation.Nullable String lLowerCase) { - this.lLowerCase = lLowerCase; - return this; - } - - /** - * Get lLowerCase - * - * @return lLowerCase - */ - @jakarta.annotation.Nullable - public String getlLowerCase() { - return lLowerCase; - } - - public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { - this.lLowerCase = lLowerCase; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OutboundaccountpositionBInner outboundaccountpositionBInner = - (OutboundaccountpositionBInner) o; - return Objects.equals(this.aLowerCase, outboundaccountpositionBInner.aLowerCase) - && Objects.equals(this.fLowerCase, outboundaccountpositionBInner.fLowerCase) - && Objects.equals(this.lLowerCase, outboundaccountpositionBInner.lLowerCase); - } - - @Override - public int hashCode() { - return Objects.hash(aLowerCase, fLowerCase, lLowerCase); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OutboundaccountpositionBInner {\n"); - sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); - sb.append(" fLowerCase: ").append(toIndentedString(fLowerCase)).append("\n"); - sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - String aLowerCaseValueAsString = aLowerCaseValue.toString(); - valMap.put("aLowerCase", aLowerCaseValueAsString); - } - String fLowerCaseValue = getfLowerCase(); - if (fLowerCaseValue != null) { - String fLowerCaseValueAsString = fLowerCaseValue.toString(); - valMap.put("fLowerCase", fLowerCaseValueAsString); - } - String lLowerCaseValue = getlLowerCase(); - if (lLowerCaseValue != null) { - String lLowerCaseValueAsString = lLowerCaseValue.toString(); - valMap.put("lLowerCase", lLowerCaseValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object aLowerCaseValue = getaLowerCase(); - if (aLowerCaseValue != null) { - valMap.put("aLowerCase", aLowerCaseValue); - } - Object fLowerCaseValue = getfLowerCase(); - if (fLowerCaseValue != null) { - valMap.put("fLowerCase", fLowerCaseValue); - } - Object lLowerCaseValue = getlLowerCase(); - if (lLowerCaseValue != null) { - valMap.put("lLowerCase", lLowerCaseValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("a"); - openapiFields.add("f"); - openapiFields.add("l"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * OutboundaccountpositionBInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OutboundaccountpositionBInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OutboundaccountpositionBInner is not" - + " found in the empty JSON string", - OutboundaccountpositionBInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OutboundaccountpositionBInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `OutboundaccountpositionBInner` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) - && !jsonObj.get("a").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `a` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("a").toString())); - } - if ((jsonObj.get("f") != null && !jsonObj.get("f").isJsonNull()) - && !jsonObj.get("f").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `f` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("f").toString())); - } - if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) - && !jsonObj.get("l").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `l` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("l").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OutboundaccountpositionBInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OutboundaccountpositionBInner' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(OutboundaccountpositionBInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OutboundaccountpositionBInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OutboundaccountpositionBInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OutboundaccountpositionBInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of OutboundaccountpositionBInner - * @throws IOException if the JSON string is invalid with respect to - * OutboundaccountpositionBInner - */ - public static OutboundaccountpositionBInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OutboundaccountpositionBInner.class); - } - - /** - * Convert an instance of OutboundaccountpositionBInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/RiskDataStreamEventsResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/RiskDataStreamEventsResponse.java index 308cddabb..9a470a45f 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/RiskDataStreamEventsResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/RiskDataStreamEventsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading WebSocket Market Streams - * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams + * Margin WebSocket Market Streams + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -33,7 +33,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RiskDataStreamEventsResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(RiskDataStreamEventsResponse.class.getName()); @@ -47,10 +47,10 @@ public TypeAdapter create(Gson gson, TypeToken type) { // subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterUserLiabilityChange = - gson.getDelegateAdapter(this, TypeToken.get(UserLiabilityChange.class)); final TypeAdapter adapterMarginLevelStatusChange = gson.getDelegateAdapter(this, TypeToken.get(MarginLevelStatusChange.class)); + final TypeAdapter adapterUserLiabilityChange = + gson.getDelegateAdapter(this, TypeToken.get(UserLiabilityChange.class)); return (TypeAdapter) new TypeAdapter() { @@ -62,14 +62,6 @@ public void write(JsonWriter out, RiskDataStreamEventsResponse value) return; } - // check if the actual instance is of the type `UserLiabilityChange` - if (value.getActualInstance() instanceof UserLiabilityChange) { - JsonElement element = - adapterUserLiabilityChange.toJsonTree( - (UserLiabilityChange) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } // check if the actual instance is of the type `MarginLevelStatusChange` if (value.getActualInstance() instanceof MarginLevelStatusChange) { JsonElement element = @@ -79,6 +71,14 @@ public void write(JsonWriter out, RiskDataStreamEventsResponse value) elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `UserLiabilityChange` + if (value.getActualInstance() instanceof UserLiabilityChange) { + JsonElement element = + adapterUserLiabilityChange.toJsonTree( + (UserLiabilityChange) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } throw new IOException( "Failed to serialize as the type doesn't match oneOf schemas:" + " MarginLevelStatusChange, UserLiabilityChange"); @@ -116,19 +116,6 @@ public RiskDataStreamEventsResponse read(JsonReader in) throws IOException { newRiskDataStreamEventsResponse.setActualInstance( deserialized); return newRiskDataStreamEventsResponse; - case "marginLevelStatusChange": - deserialized = - adapterMarginLevelStatusChange.fromJsonTree( - jsonObject); - newRiskDataStreamEventsResponse.setActualInstance( - deserialized); - return newRiskDataStreamEventsResponse; - case "userLiabilityChange": - deserialized = - adapterUserLiabilityChange.fromJsonTree(jsonObject); - newRiskDataStreamEventsResponse.setActualInstance( - deserialized); - return newRiskDataStreamEventsResponse; default: newRiskDataStreamEventsResponse.setActualInstance( jsonElement.toString()); @@ -139,9 +126,7 @@ public RiskDataStreamEventsResponse read(JsonReader in) throws IOException { + " for RiskDataStreamEventsResponse." + " Possible values:" + " MARGIN_LEVEL_STATUS_CHANGE" - + " USER_LIABILITY_CHANGE" - + " marginLevelStatusChange" - + " userLiabilityChange. Falling back" + + " USER_LIABILITY_CHANGE. Falling back" + " to String.", jsonObject.get("e").getAsString())); } @@ -151,47 +136,47 @@ public RiskDataStreamEventsResponse read(JsonReader in) throws IOException { ArrayList errorMessages = new ArrayList<>(); TypeAdapter actualAdapter = elementAdapter; - // deserialize UserLiabilityChange + // deserialize MarginLevelStatusChange try { // validate the JSON object to see if any exception is thrown - UserLiabilityChange.validateJsonElement(jsonElement); - actualAdapter = adapterUserLiabilityChange; + MarginLevelStatusChange.validateJsonElement(jsonElement); + actualAdapter = adapterMarginLevelStatusChange; match++; log.log( Level.FINER, - "Input data matches schema 'UserLiabilityChange'"); + "Input data matches schema 'MarginLevelStatusChange'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for UserLiabilityChange failed" + "Deserialization for MarginLevelStatusChange failed" + " with `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'UserLiabilityChange'", + "Input data does not match schema" + + " 'MarginLevelStatusChange'", e); } - // deserialize MarginLevelStatusChange + // deserialize UserLiabilityChange try { // validate the JSON object to see if any exception is thrown - MarginLevelStatusChange.validateJsonElement(jsonElement); - actualAdapter = adapterMarginLevelStatusChange; + UserLiabilityChange.validateJsonElement(jsonElement); + actualAdapter = adapterUserLiabilityChange; match++; log.log( Level.FINER, - "Input data matches schema 'MarginLevelStatusChange'"); + "Input data matches schema 'UserLiabilityChange'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for MarginLevelStatusChange failed" + "Deserialization for UserLiabilityChange failed" + " with `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema" - + " 'MarginLevelStatusChange'", + "Input data does not match schema 'UserLiabilityChange'", e); } @@ -227,8 +212,8 @@ public RiskDataStreamEventsResponse(Object o) { } static { - schemas.put("UserLiabilityChange", UserLiabilityChange.class); schemas.put("MarginLevelStatusChange", MarginLevelStatusChange.class); + schemas.put("UserLiabilityChange", UserLiabilityChange.class); } @Override @@ -244,12 +229,12 @@ public Map> getSchemas() { */ @Override public void setActualInstance(Object instance) { - if (instance instanceof UserLiabilityChange) { + if (instance instanceof MarginLevelStatusChange) { super.setActualInstance(instance); return; } - if (instance instanceof MarginLevelStatusChange) { + if (instance instanceof UserLiabilityChange) { super.setActualInstance(instance); return; } @@ -270,17 +255,6 @@ public Object getActualInstance() { return super.getActualInstance(); } - /** - * Get the actual instance of `UserLiabilityChange`. If the actual instance is not - * `UserLiabilityChange`, the ClassCastException will be thrown. - * - * @return The actual instance of `UserLiabilityChange` - * @throws ClassCastException if the instance is not `UserLiabilityChange` - */ - public UserLiabilityChange getUserLiabilityChange() throws ClassCastException { - return (UserLiabilityChange) super.getActualInstance(); - } - /** * Get the actual instance of `MarginLevelStatusChange`. If the actual instance is not * `MarginLevelStatusChange`, the ClassCastException will be thrown. @@ -292,6 +266,17 @@ public MarginLevelStatusChange getMarginLevelStatusChange() throws ClassCastExce return (MarginLevelStatusChange) super.getActualInstance(); } + /** + * Get the actual instance of `UserLiabilityChange`. If the actual instance is not + * `UserLiabilityChange`, the ClassCastException will be thrown. + * + * @return The actual instance of `UserLiabilityChange` + * @throws ClassCastException if the instance is not `UserLiabilityChange` + */ + public UserLiabilityChange getUserLiabilityChange() throws ClassCastException { + return (UserLiabilityChange) super.getActualInstance(); + } + /** * Validates the JSON Element and throws an exception if issues found * @@ -303,25 +288,25 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate oneOf schemas one by one int validCount = 0; ArrayList errorMessages = new ArrayList<>(); - // validate the json string with UserLiabilityChange + // validate the json string with MarginLevelStatusChange try { - UserLiabilityChange.validateJsonElement(jsonElement); + MarginLevelStatusChange.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for UserLiabilityChange failed with `%s`.", + "Deserialization for MarginLevelStatusChange failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with MarginLevelStatusChange + // validate the json string with UserLiabilityChange try { - MarginLevelStatusChange.validateJsonElement(jsonElement); + UserLiabilityChange.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for MarginLevelStatusChange failed with `%s`.", + "Deserialization for UserLiabilityChange failed with `%s`.", e.getMessage())); // continue to the next one } diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/TradeDataStreamEventsResponse.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/TradeDataStreamEventsResponse.java index 71af2b65d..07c5731a7 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/TradeDataStreamEventsResponse.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/TradeDataStreamEventsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading WebSocket Market Streams - * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams + * Margin WebSocket Market Streams + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -33,7 +33,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradeDataStreamEventsResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(TradeDataStreamEventsResponse.class.getName()); @@ -47,16 +47,20 @@ public TypeAdapter create(Gson gson, TypeToken type) { // subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterOutboundaccountposition = - gson.getDelegateAdapter(this, TypeToken.get(Outboundaccountposition.class)); - final TypeAdapter adapterBalanceupdate = - gson.getDelegateAdapter(this, TypeToken.get(Balanceupdate.class)); - final TypeAdapter adapterListenkeyexpired = - gson.getDelegateAdapter(this, TypeToken.get(Listenkeyexpired.class)); - final TypeAdapter adapterExecutionreport = - gson.getDelegateAdapter(this, TypeToken.get(Executionreport.class)); - final TypeAdapter adapterListstatus = - gson.getDelegateAdapter(this, TypeToken.get(Liststatus.class)); + final TypeAdapter adapterMarginLevelStatusChange = + gson.getDelegateAdapter(this, TypeToken.get(MarginLevelStatusChange.class)); + final TypeAdapter adapterUserLiabilityChange = + gson.getDelegateAdapter(this, TypeToken.get(UserLiabilityChange.class)); + final TypeAdapter adapterBalanceUpdate = + gson.getDelegateAdapter(this, TypeToken.get(BalanceUpdate.class)); + final TypeAdapter adapterExecutionReport = + gson.getDelegateAdapter(this, TypeToken.get(ExecutionReport.class)); + final TypeAdapter adapterListStatus = + gson.getDelegateAdapter(this, TypeToken.get(ListStatus.class)); + final TypeAdapter adapterListenKeyExpired = + gson.getDelegateAdapter(this, TypeToken.get(ListenKeyExpired.class)); + final TypeAdapter adapterOutboundAccountPosition = + gson.getDelegateAdapter(this, TypeToken.get(OutboundAccountPosition.class)); return (TypeAdapter) new TypeAdapter() { @@ -68,51 +72,69 @@ public void write(JsonWriter out, TradeDataStreamEventsResponse value) return; } - // check if the actual instance is of the type `Outboundaccountposition` - if (value.getActualInstance() instanceof Outboundaccountposition) { + // check if the actual instance is of the type `MarginLevelStatusChange` + if (value.getActualInstance() instanceof MarginLevelStatusChange) { JsonElement element = - adapterOutboundaccountposition.toJsonTree( - (Outboundaccountposition) + adapterMarginLevelStatusChange.toJsonTree( + (MarginLevelStatusChange) value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Balanceupdate` - if (value.getActualInstance() instanceof Balanceupdate) { + // check if the actual instance is of the type `UserLiabilityChange` + if (value.getActualInstance() instanceof UserLiabilityChange) { JsonElement element = - adapterBalanceupdate.toJsonTree( - (Balanceupdate) value.getActualInstance()); + adapterUserLiabilityChange.toJsonTree( + (UserLiabilityChange) value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Listenkeyexpired` - if (value.getActualInstance() instanceof Listenkeyexpired) { + // check if the actual instance is of the type `BalanceUpdate` + if (value.getActualInstance() instanceof BalanceUpdate) { JsonElement element = - adapterListenkeyexpired.toJsonTree( - (Listenkeyexpired) value.getActualInstance()); + adapterBalanceUpdate.toJsonTree( + (BalanceUpdate) value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Executionreport` - if (value.getActualInstance() instanceof Executionreport) { + // check if the actual instance is of the type `ExecutionReport` + if (value.getActualInstance() instanceof ExecutionReport) { JsonElement element = - adapterExecutionreport.toJsonTree( - (Executionreport) value.getActualInstance()); + adapterExecutionReport.toJsonTree( + (ExecutionReport) value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Liststatus` - if (value.getActualInstance() instanceof Liststatus) { + // check if the actual instance is of the type `ListStatus` + if (value.getActualInstance() instanceof ListStatus) { JsonElement element = - adapterListstatus.toJsonTree( - (Liststatus) value.getActualInstance()); + adapterListStatus.toJsonTree( + (ListStatus) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `ListenKeyExpired` + if (value.getActualInstance() instanceof ListenKeyExpired) { + JsonElement element = + adapterListenKeyExpired.toJsonTree( + (ListenKeyExpired) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `OutboundAccountPosition` + if (value.getActualInstance() instanceof OutboundAccountPosition) { + JsonElement element = + adapterOutboundAccountPosition.toJsonTree( + (OutboundAccountPosition) + value.getActualInstance()); elementAdapter.write(out, element); return; } throw new IOException( "Failed to serialize as the type doesn't match oneOf schemas:" - + " Balanceupdate, Executionreport, Listenkeyexpired," - + " Liststatus, Outboundaccountposition"); + + " BalanceUpdate, ExecutionReport, ListStatus," + + " ListenKeyExpired, MarginLevelStatusChange," + + " OutboundAccountPosition, UserLiabilityChange"); } @Override @@ -135,62 +157,45 @@ public TradeDataStreamEventsResponse read(JsonReader in) } else { // look up the discriminator value in the field `e` switch (jsonObject.get("e").getAsString()) { - case "balanceUpdate": - deserialized = - adapterBalanceupdate.fromJsonTree(jsonObject); - newTradeDataStreamEventsResponse.setActualInstance( - deserialized); - return newTradeDataStreamEventsResponse; - case "executionReport": + case "MARGIN_LEVEL_STATUS_CHANGE": deserialized = - adapterExecutionreport.fromJsonTree(jsonObject); - newTradeDataStreamEventsResponse.setActualInstance( - deserialized); - return newTradeDataStreamEventsResponse; - case "listStatus": - deserialized = adapterListstatus.fromJsonTree(jsonObject); + adapterMarginLevelStatusChange.fromJsonTree( + jsonObject); newTradeDataStreamEventsResponse.setActualInstance( deserialized); return newTradeDataStreamEventsResponse; - case "listenKeyExpired": + case "USER_LIABILITY_CHANGE": deserialized = - adapterListenkeyexpired.fromJsonTree(jsonObject); + adapterUserLiabilityChange.fromJsonTree(jsonObject); newTradeDataStreamEventsResponse.setActualInstance( deserialized); return newTradeDataStreamEventsResponse; - case "outboundAccountPosition": + case "balanceUpdate": deserialized = - adapterOutboundaccountposition.fromJsonTree( - jsonObject); + adapterBalanceUpdate.fromJsonTree(jsonObject); newTradeDataStreamEventsResponse.setActualInstance( deserialized); return newTradeDataStreamEventsResponse; - case "balanceupdate": + case "executionReport": deserialized = - adapterBalanceupdate.fromJsonTree(jsonObject); + adapterExecutionReport.fromJsonTree(jsonObject); newTradeDataStreamEventsResponse.setActualInstance( deserialized); return newTradeDataStreamEventsResponse; - case "executionreport": - deserialized = - adapterExecutionreport.fromJsonTree(jsonObject); + case "listStatus": + deserialized = adapterListStatus.fromJsonTree(jsonObject); newTradeDataStreamEventsResponse.setActualInstance( deserialized); return newTradeDataStreamEventsResponse; - case "listenkeyexpired": + case "listenKeyExpired": deserialized = - adapterListenkeyexpired.fromJsonTree(jsonObject); + adapterListenKeyExpired.fromJsonTree(jsonObject); newTradeDataStreamEventsResponse.setActualInstance( deserialized); return newTradeDataStreamEventsResponse; - case "liststatus": - deserialized = adapterListstatus.fromJsonTree(jsonObject); - newTradeDataStreamEventsResponse.setActualInstance( - deserialized); - return newTradeDataStreamEventsResponse; - case "outboundaccountposition": + case "outboundAccountPosition": deserialized = - adapterOutboundaccountposition.fromJsonTree( + adapterOutboundAccountPosition.fromJsonTree( jsonObject); newTradeDataStreamEventsResponse.setActualInstance( deserialized); @@ -203,13 +208,12 @@ public TradeDataStreamEventsResponse read(JsonReader in) String.format( "Failed to lookup discriminator value `%s`" + " for TradeDataStreamEventsResponse." - + " Possible values: balanceUpdate" + + " Possible values:" + + " MARGIN_LEVEL_STATUS_CHANGE" + + " USER_LIABILITY_CHANGE balanceUpdate" + " executionReport listStatus" + " listenKeyExpired" - + " outboundAccountPosition" - + " balanceupdate executionreport" - + " listenkeyexpired liststatus" - + " outboundaccountposition. Falling" + + " outboundAccountPosition. Falling" + " back to String.", jsonObject.get("e").getAsString())); } @@ -219,103 +223,146 @@ public TradeDataStreamEventsResponse read(JsonReader in) ArrayList errorMessages = new ArrayList<>(); TypeAdapter actualAdapter = elementAdapter; - // deserialize Outboundaccountposition + // deserialize MarginLevelStatusChange try { // validate the JSON object to see if any exception is thrown - Outboundaccountposition.validateJsonElement(jsonElement); - actualAdapter = adapterOutboundaccountposition; + MarginLevelStatusChange.validateJsonElement(jsonElement); + actualAdapter = adapterMarginLevelStatusChange; match++; log.log( Level.FINER, - "Input data matches schema 'Outboundaccountposition'"); + "Input data matches schema 'MarginLevelStatusChange'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for Outboundaccountposition failed" + "Deserialization for MarginLevelStatusChange failed" + " with `%s`.", e.getMessage())); log.log( Level.FINER, "Input data does not match schema" - + " 'Outboundaccountposition'", + + " 'MarginLevelStatusChange'", e); } - // deserialize Balanceupdate + // deserialize UserLiabilityChange try { // validate the JSON object to see if any exception is thrown - Balanceupdate.validateJsonElement(jsonElement); - actualAdapter = adapterBalanceupdate; + UserLiabilityChange.validateJsonElement(jsonElement); + actualAdapter = adapterUserLiabilityChange; match++; - log.log(Level.FINER, "Input data matches schema 'Balanceupdate'"); + log.log( + Level.FINER, + "Input data matches schema 'UserLiabilityChange'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for Balanceupdate failed with" - + " `%s`.", + "Deserialization for UserLiabilityChange failed" + + " with `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'Balanceupdate'", + "Input data does not match schema 'UserLiabilityChange'", e); } - // deserialize Listenkeyexpired + // deserialize BalanceUpdate try { // validate the JSON object to see if any exception is thrown - Listenkeyexpired.validateJsonElement(jsonElement); - actualAdapter = adapterListenkeyexpired; + BalanceUpdate.validateJsonElement(jsonElement); + actualAdapter = adapterBalanceUpdate; match++; + log.log(Level.FINER, "Input data matches schema 'BalanceUpdate'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for BalanceUpdate failed with" + + " `%s`.", + e.getMessage())); log.log( Level.FINER, - "Input data matches schema 'Listenkeyexpired'"); + "Input data does not match schema 'BalanceUpdate'", + e); + } + // deserialize ExecutionReport + try { + // validate the JSON object to see if any exception is thrown + ExecutionReport.validateJsonElement(jsonElement); + actualAdapter = adapterExecutionReport; + match++; + log.log(Level.FINER, "Input data matches schema 'ExecutionReport'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for Listenkeyexpired failed with" + "Deserialization for ExecutionReport failed with" + " `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'Listenkeyexpired'", + "Input data does not match schema 'ExecutionReport'", e); } - // deserialize Executionreport + // deserialize ListStatus try { // validate the JSON object to see if any exception is thrown - Executionreport.validateJsonElement(jsonElement); - actualAdapter = adapterExecutionreport; + ListStatus.validateJsonElement(jsonElement); + actualAdapter = adapterListStatus; match++; - log.log(Level.FINER, "Input data matches schema 'Executionreport'"); + log.log(Level.FINER, "Input data matches schema 'ListStatus'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for Executionreport failed with" + "Deserialization for ListStatus failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'ListStatus'", + e); + } + // deserialize ListenKeyExpired + try { + // validate the JSON object to see if any exception is thrown + ListenKeyExpired.validateJsonElement(jsonElement); + actualAdapter = adapterListenKeyExpired; + match++; + log.log( + Level.FINER, + "Input data matches schema 'ListenKeyExpired'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for ListenKeyExpired failed with" + " `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'Executionreport'", + "Input data does not match schema 'ListenKeyExpired'", e); } - // deserialize Liststatus + // deserialize OutboundAccountPosition try { // validate the JSON object to see if any exception is thrown - Liststatus.validateJsonElement(jsonElement); - actualAdapter = adapterListstatus; + OutboundAccountPosition.validateJsonElement(jsonElement); + actualAdapter = adapterOutboundAccountPosition; match++; - log.log(Level.FINER, "Input data matches schema 'Liststatus'"); + log.log( + Level.FINER, + "Input data matches schema 'OutboundAccountPosition'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for Liststatus failed with `%s`.", + "Deserialization for OutboundAccountPosition failed" + + " with `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'Liststatus'", + "Input data does not match schema" + + " 'OutboundAccountPosition'", e); } @@ -351,11 +398,13 @@ public TradeDataStreamEventsResponse(Object o) { } static { - schemas.put("Outboundaccountposition", Outboundaccountposition.class); - schemas.put("Balanceupdate", Balanceupdate.class); - schemas.put("Listenkeyexpired", Listenkeyexpired.class); - schemas.put("Executionreport", Executionreport.class); - schemas.put("Liststatus", Liststatus.class); + schemas.put("MarginLevelStatusChange", MarginLevelStatusChange.class); + schemas.put("UserLiabilityChange", UserLiabilityChange.class); + schemas.put("BalanceUpdate", BalanceUpdate.class); + schemas.put("ExecutionReport", ExecutionReport.class); + schemas.put("ListStatus", ListStatus.class); + schemas.put("ListenKeyExpired", ListenKeyExpired.class); + schemas.put("OutboundAccountPosition", OutboundAccountPosition.class); } @Override @@ -365,49 +414,61 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Balanceupdate, Executionreport, Listenkeyexpired, - * Liststatus, Outboundaccountposition + * against the oneOf child schemas: BalanceUpdate, ExecutionReport, ListStatus, + * ListenKeyExpired, MarginLevelStatusChange, OutboundAccountPosition, UserLiabilityChange * *

It could be an instance of the 'oneOf' schemas. */ @Override public void setActualInstance(Object instance) { - if (instance instanceof Outboundaccountposition) { + if (instance instanceof MarginLevelStatusChange) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof UserLiabilityChange) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof BalanceUpdate) { super.setActualInstance(instance); return; } - if (instance instanceof Balanceupdate) { + if (instance instanceof ExecutionReport) { super.setActualInstance(instance); return; } - if (instance instanceof Listenkeyexpired) { + if (instance instanceof ListStatus) { super.setActualInstance(instance); return; } - if (instance instanceof Executionreport) { + if (instance instanceof ListenKeyExpired) { super.setActualInstance(instance); return; } - if (instance instanceof Liststatus) { + if (instance instanceof OutboundAccountPosition) { super.setActualInstance(instance); return; } throw new RuntimeException( - "Invalid instance type. Must be Balanceupdate, Executionreport, Listenkeyexpired," - + " Liststatus, Outboundaccountposition"); + "Invalid instance type. Must be BalanceUpdate, ExecutionReport, ListStatus," + + " ListenKeyExpired, MarginLevelStatusChange, OutboundAccountPosition," + + " UserLiabilityChange"); } /** - * Get the actual instance, which can be the following: Balanceupdate, Executionreport, - * Listenkeyexpired, Liststatus, Outboundaccountposition + * Get the actual instance, which can be the following: BalanceUpdate, ExecutionReport, + * ListStatus, ListenKeyExpired, MarginLevelStatusChange, OutboundAccountPosition, + * UserLiabilityChange * - * @return The actual instance (Balanceupdate, Executionreport, Listenkeyexpired, Liststatus, - * Outboundaccountposition) + * @return The actual instance (BalanceUpdate, ExecutionReport, ListStatus, ListenKeyExpired, + * MarginLevelStatusChange, OutboundAccountPosition, UserLiabilityChange) */ @SuppressWarnings("unchecked") @Override @@ -416,58 +477,80 @@ public Object getActualInstance() { } /** - * Get the actual instance of `Outboundaccountposition`. If the actual instance is not - * `Outboundaccountposition`, the ClassCastException will be thrown. + * Get the actual instance of `MarginLevelStatusChange`. If the actual instance is not + * `MarginLevelStatusChange`, the ClassCastException will be thrown. * - * @return The actual instance of `Outboundaccountposition` - * @throws ClassCastException if the instance is not `Outboundaccountposition` + * @return The actual instance of `MarginLevelStatusChange` + * @throws ClassCastException if the instance is not `MarginLevelStatusChange` */ - public Outboundaccountposition getOutboundaccountposition() throws ClassCastException { - return (Outboundaccountposition) super.getActualInstance(); + public MarginLevelStatusChange getMarginLevelStatusChange() throws ClassCastException { + return (MarginLevelStatusChange) super.getActualInstance(); } /** - * Get the actual instance of `Balanceupdate`. If the actual instance is not `Balanceupdate`, - * the ClassCastException will be thrown. + * Get the actual instance of `UserLiabilityChange`. If the actual instance is not + * `UserLiabilityChange`, the ClassCastException will be thrown. * - * @return The actual instance of `Balanceupdate` - * @throws ClassCastException if the instance is not `Balanceupdate` + * @return The actual instance of `UserLiabilityChange` + * @throws ClassCastException if the instance is not `UserLiabilityChange` */ - public Balanceupdate getBalanceupdate() throws ClassCastException { - return (Balanceupdate) super.getActualInstance(); + public UserLiabilityChange getUserLiabilityChange() throws ClassCastException { + return (UserLiabilityChange) super.getActualInstance(); } /** - * Get the actual instance of `Listenkeyexpired`. If the actual instance is not - * `Listenkeyexpired`, the ClassCastException will be thrown. + * Get the actual instance of `BalanceUpdate`. If the actual instance is not `BalanceUpdate`, + * the ClassCastException will be thrown. * - * @return The actual instance of `Listenkeyexpired` - * @throws ClassCastException if the instance is not `Listenkeyexpired` + * @return The actual instance of `BalanceUpdate` + * @throws ClassCastException if the instance is not `BalanceUpdate` */ - public Listenkeyexpired getListenkeyexpired() throws ClassCastException { - return (Listenkeyexpired) super.getActualInstance(); + public BalanceUpdate getBalanceUpdate() throws ClassCastException { + return (BalanceUpdate) super.getActualInstance(); } /** - * Get the actual instance of `Executionreport`. If the actual instance is not - * `Executionreport`, the ClassCastException will be thrown. + * Get the actual instance of `ExecutionReport`. If the actual instance is not + * `ExecutionReport`, the ClassCastException will be thrown. * - * @return The actual instance of `Executionreport` - * @throws ClassCastException if the instance is not `Executionreport` + * @return The actual instance of `ExecutionReport` + * @throws ClassCastException if the instance is not `ExecutionReport` */ - public Executionreport getExecutionreport() throws ClassCastException { - return (Executionreport) super.getActualInstance(); + public ExecutionReport getExecutionReport() throws ClassCastException { + return (ExecutionReport) super.getActualInstance(); } /** - * Get the actual instance of `Liststatus`. If the actual instance is not `Liststatus`, the + * Get the actual instance of `ListStatus`. If the actual instance is not `ListStatus`, the * ClassCastException will be thrown. * - * @return The actual instance of `Liststatus` - * @throws ClassCastException if the instance is not `Liststatus` + * @return The actual instance of `ListStatus` + * @throws ClassCastException if the instance is not `ListStatus` + */ + public ListStatus getListStatus() throws ClassCastException { + return (ListStatus) super.getActualInstance(); + } + + /** + * Get the actual instance of `ListenKeyExpired`. If the actual instance is not + * `ListenKeyExpired`, the ClassCastException will be thrown. + * + * @return The actual instance of `ListenKeyExpired` + * @throws ClassCastException if the instance is not `ListenKeyExpired` */ - public Liststatus getListstatus() throws ClassCastException { - return (Liststatus) super.getActualInstance(); + public ListenKeyExpired getListenKeyExpired() throws ClassCastException { + return (ListenKeyExpired) super.getActualInstance(); + } + + /** + * Get the actual instance of `OutboundAccountPosition`. If the actual instance is not + * `OutboundAccountPosition`, the ClassCastException will be thrown. + * + * @return The actual instance of `OutboundAccountPosition` + * @throws ClassCastException if the instance is not `OutboundAccountPosition` + */ + public OutboundAccountPosition getOutboundAccountPosition() throws ClassCastException { + return (OutboundAccountPosition) super.getActualInstance(); } /** @@ -481,67 +564,90 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate oneOf schemas one by one int validCount = 0; ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Outboundaccountposition + // validate the json string with MarginLevelStatusChange try { - Outboundaccountposition.validateJsonElement(jsonElement); + MarginLevelStatusChange.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for Outboundaccountposition failed with `%s`.", + "Deserialization for MarginLevelStatusChange failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Balanceupdate + // validate the json string with UserLiabilityChange try { - Balanceupdate.validateJsonElement(jsonElement); + UserLiabilityChange.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for Balanceupdate failed with `%s`.", e.getMessage())); + "Deserialization for UserLiabilityChange failed with `%s`.", + e.getMessage())); // continue to the next one } - // validate the json string with Listenkeyexpired + // validate the json string with BalanceUpdate try { - Listenkeyexpired.validateJsonElement(jsonElement); + BalanceUpdate.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for Listenkeyexpired failed with `%s`.", + "Deserialization for BalanceUpdate failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with ExecutionReport + try { + ExecutionReport.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for ExecutionReport failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Executionreport + // validate the json string with ListStatus + try { + ListStatus.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for ListStatus failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with ListenKeyExpired try { - Executionreport.validateJsonElement(jsonElement); + ListenKeyExpired.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for Executionreport failed with `%s`.", + "Deserialization for ListenKeyExpired failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Liststatus + // validate the json string with OutboundAccountPosition try { - Liststatus.validateJsonElement(jsonElement); + OutboundAccountPosition.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for Liststatus failed with `%s`.", e.getMessage())); + "Deserialization for OutboundAccountPosition failed with `%s`.", + e.getMessage())); // continue to the next one } if (validCount != 1) { throw new IOException( String.format( "The JSON string is invalid for TradeDataStreamEventsResponse with" - + " oneOf schemas: Balanceupdate, Executionreport," - + " Listenkeyexpired, Liststatus, Outboundaccountposition. %d" - + " class(es) match the result, expected 1. Detailed failure" - + " message for oneOf schemas: %s. JSON: %s", + + " oneOf schemas: BalanceUpdate, ExecutionReport, ListStatus," + + " ListenKeyExpired, MarginLevelStatusChange," + + " OutboundAccountPosition, UserLiabilityChange. %d class(es)" + + " match the result, expected 1. Detailed failure message for" + + " oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/UserLiabilityChange.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/UserLiabilityChange.java index e043a3a54..046ac357e 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/UserLiabilityChange.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/UserLiabilityChange.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading WebSocket Market Streams - * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams + * Margin WebSocket Market Streams + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** UserLiabilityChange */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserLiabilityChange extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -77,7 +77,7 @@ public UserLiabilityChange E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -96,7 +96,7 @@ public UserLiabilityChange aLowerCase(@jakarta.annotation.Nullable String aLower } /** - * Get aLowerCase + * Asset * * @return aLowerCase */ @@ -115,7 +115,7 @@ public UserLiabilityChange tLowerCase(@jakarta.annotation.Nullable String tLower } /** - * Get tLowerCase + * Liability Update Type * * @return tLowerCase */ @@ -134,7 +134,7 @@ public UserLiabilityChange pLowerCase(@jakarta.annotation.Nullable String pLower } /** - * Get pLowerCase + * Principle Quantity * * @return pLowerCase */ @@ -153,7 +153,7 @@ public UserLiabilityChange iLowerCase(@jakarta.annotation.Nullable String iLower } /** - * Get iLowerCase + * Interest Quantity * * @return iLowerCase */ diff --git a/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/AccountApiTest.java b/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/AccountApiTest.java index 5ebbb8383..57b5a21c8 100644 --- a/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/AccountApiTest.java +++ b/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/AccountApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -30,6 +30,7 @@ import com.binance.connector.client.margin_trading.rest.model.EnableIsolatedMarginAccountResponse; import com.binance.connector.client.margin_trading.rest.model.GetBnbBurnStatusResponse; import com.binance.connector.client.margin_trading.rest.model.GetSummaryOfMarginAccountResponse; +import com.binance.connector.client.margin_trading.rest.model.OrderType; import com.binance.connector.client.margin_trading.rest.model.QueryCrossIsolatedMarginCapitalFlowResponse; import com.binance.connector.client.margin_trading.rest.model.QueryCrossMarginAccountDetailsResponse; import com.binance.connector.client.margin_trading.rest.model.QueryCrossMarginFeeDataResponse; @@ -37,6 +38,7 @@ import com.binance.connector.client.margin_trading.rest.model.QueryIsolatedMarginAccountInfoResponse; import com.binance.connector.client.margin_trading.rest.model.QueryIsolatedMarginFeeDataResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -90,21 +92,21 @@ public void initApiClient() throws ApiException { /** * Adjust cross margin max leverage (USER_DATA) * - *

Adjust cross margin max leverage * The margin level need higher than the initial risk - * ratio of adjusted leverage, the initial risk ratio of 3x is 1.5 , the initial risk ratio of - * 5x is 1.25; The detail conditions on how to switch between Cross Margin Classic and Cross - * Margin Pro can refer to [the + *

Adjust cross margin max leverage Weight(UID): 3000, 1 times/min per IP Security Type: + * USER_DATA Notes: - The margin level need higher than the initial risk ratio of adjusted + * leverage, the initial risk ratio of 3x is 1.5 , the initial risk ratio of 5x is 1.25; The + * detail conditions on how to switch between Cross Margin Classic and Cross Margin Pro can + * refer to [the * FAQ](https://www.binance.com/en/support/faq/how-to-activate-the-cross-margin-pro-mode-on-binance-e27786da05e743a694b8c625b3bc475d). - * Weight: 3000 * * @throws ApiException if the Api call fails */ @Test - public void adjustCrossMarginMaxLeverageTest() throws ApiException, CryptoException { + public void adjustCrossMarginMaxLeverageTest() + throws ApiException, CryptoException, IOException { AdjustCrossMarginMaxLeverageRequest adjustCrossMarginMaxLeverageRequest = new AdjustCrossMarginMaxLeverageRequest(); - - adjustCrossMarginMaxLeverageRequest.maxLeverage(0L); + adjustCrossMarginMaxLeverageRequest.maxLeverage(3L); ApiResponse response = api.adjustCrossMarginMaxLeverage(adjustCrossMarginMaxLeverageRequest); @@ -119,9 +121,9 @@ public void adjustCrossMarginMaxLeverageTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000maxLeverage=0", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000maxLeverage=3", signInputCaptor.getValue()); assertEquals( - "a39b1baf07c2a88b549c3f24c42e32acc0d249317c2d393b8a05e79f41a62687", + "eb6bad7981d2d8dd6fb3daa81aa70e145e4817325e1234b97a5088a9ccdc95f8", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/max-leverage", actualRequest.url().encodedPath()); } @@ -130,13 +132,14 @@ public void adjustCrossMarginMaxLeverageTest() throws ApiException, CryptoExcept * Disable Isolated Margin Account (TRADE) * *

Disable isolated margin account for a specific symbol. Each trading pair can only be - * deactivated once every 24 hours. Weight: 300(UID) + * deactivated once every 24 hours. Weight(UID): 300 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void disableIsolatedMarginAccountTest() throws ApiException, CryptoException { - String symbol = ""; + public void disableIsolatedMarginAccountTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.disableIsolatedMarginAccount(symbol, recvWindow); @@ -151,9 +154,9 @@ public void disableIsolatedMarginAccountTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/isolated/account", actualRequest.url().encodedPath()); } @@ -162,16 +165,16 @@ public void disableIsolatedMarginAccountTest() throws ApiException, CryptoExcept * Enable Isolated Margin Account (TRADE) * *

Enable isolated margin account for a specific symbol(Only supports activation of - * previously disabled accounts). Weight: 300(UID) + * previously disabled accounts). Weight(UID): 300 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void enableIsolatedMarginAccountTest() throws ApiException, CryptoException { + public void enableIsolatedMarginAccountTest() + throws ApiException, CryptoException, IOException { EnableIsolatedMarginAccountRequest enableIsolatedMarginAccountRequest = new EnableIsolatedMarginAccountRequest(); - - enableIsolatedMarginAccountRequest.symbol(""); + enableIsolatedMarginAccountRequest.symbol("BTCUSDT"); ApiResponse response = api.enableIsolatedMarginAccount(enableIsolatedMarginAccountRequest); @@ -186,9 +189,9 @@ public void enableIsolatedMarginAccountTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000symbol=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000symbol=BTCUSDT", signInputCaptor.getValue()); assertEquals( - "121e5417aa8a98df3f9c75d42ff90e316237814641c1f7a48f989064fd07a549", + "b2849379d99b0ce715e5ad9443d185c377f97a69766c31c6bc15eb0bc758e64e", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/isolated/account", actualRequest.url().encodedPath()); } @@ -196,12 +199,12 @@ public void enableIsolatedMarginAccountTest() throws ApiException, CryptoExcepti /** * Get BNB Burn Status (USER_DATA) * - *

Get BNB Burn Status Weight: 1(IP) + *

Get BNB Burn Status Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getBnbBurnStatusTest() throws ApiException, CryptoException { + public void getBnbBurnStatusTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getBnbBurnStatus(recvWindow); @@ -217,20 +220,19 @@ public void getBnbBurnStatusTest() throws ApiException, CryptoException { assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/bnbBurn", actualRequest.url().encodedPath()); } /** * Get Summary of Margin account (USER_DATA) * - *

Get personal margin level information Weight: 10(IP) + *

Get personal margin level information Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getSummaryOfMarginAccountTest() throws ApiException, CryptoException { + public void getSummaryOfMarginAccountTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getSummaryOfMarginAccount(recvWindow); @@ -255,15 +257,20 @@ public void getSummaryOfMarginAccountTest() throws ApiException, CryptoException /** * Query Cross Isolated Margin Capital Flow (USER_DATA) * - *

Query Cross Isolated Margin Capital Flow Weight: 100(IP) + *

Query Cross Isolated Margin Capital Flow Weight(IP): 100 Security Type: USER_DATA Notes: - + * Only supports querying the data of the last 90 days - The time between startTime and endTime + * cannot be longer than 7 days. - If fromId is set, the data with id > fromId will be + * returned. Otherwise the latest data will be returned - To query isolated data, Symbol needs + * to be entered. * * @throws ApiException if the Api call fails */ @Test - public void queryCrossIsolatedMarginCapitalFlowTest() throws ApiException, CryptoException { - String asset = ""; - String symbol = ""; - String type = ""; + public void queryCrossIsolatedMarginCapitalFlowTest() + throws ApiException, CryptoException, IOException { + String asset = "USDT"; + String symbol = "BTCUSDT"; + OrderType type = OrderType.ROLL_IN; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long fromId = 1L; @@ -284,23 +291,24 @@ public void queryCrossIsolatedMarginCapitalFlowTest() throws ApiException, Crypt Request actualRequest = captorValue.request(); assertEquals( - "asset=&symbol=&type=&startTime=1623319461670&endTime=1641782889000&fromId=1&limit=500&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "asset=USDT&symbol=BTCUSDT&type=ROLL_IN&startTime=1623319461670&endTime=1641782889000&fromId=1&limit=500&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "9011115f6529558999b5851d10ea31bc0b653ee04f639978eb42a32572f9108c", + "00cf7bea4876592845cf629b8ceda79c21300d60f6891267c4df070f2075a035", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/margin/capital-flow", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/margin/capital-flow", actualRequest.url().encodedPath()); } /** * Query Cross Margin Account Details (USER_DATA) * - *

Query Cross Margin Account Details Weight: 10(IP) + *

Query Cross Margin Account Details Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryCrossMarginAccountDetailsTest() throws ApiException, CryptoException { + public void queryCrossMarginAccountDetailsTest() + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.queryCrossMarginAccountDetails(recvWindow); @@ -326,14 +334,15 @@ public void queryCrossMarginAccountDetailsTest() throws ApiException, CryptoExce * Query Cross Margin Fee Data (USER_DATA) * *

Get cross margin fee data collection with any vip level or user's current specific - * data as https://www.binance.com/en/margin-fee Weight: 1 when coin is specified;(IP) + * data as https://www.binance.com/en/margin-fee Weight: 1 when coin is specified;(IP) 5 when + * the coin parameter is omitted(IP) Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryCrossMarginFeeDataTest() throws ApiException, CryptoException { + public void queryCrossMarginFeeDataTest() throws ApiException, CryptoException, IOException { Long vipLevel = 1L; - String coin = ""; + String coin = "BTC"; Long recvWindow = 5000L; ApiResponse response = api.queryCrossMarginFeeData(vipLevel, coin, recvWindow); @@ -348,11 +357,9 @@ public void queryCrossMarginFeeDataTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("vipLevel=1&coin=BTC&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "vipLevel=1&coin=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "ddb11dcaf68f149982ca2e477c168aa17faba9ba32646be05b1af39be5822acb", + "2c22ef830ed6fa7ca93fd85d9ac9cfdb8728945aea2db6b5cdddb8a8aa9e3ce3", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/crossMarginData", actualRequest.url().encodedPath()); } @@ -360,12 +367,13 @@ public void queryCrossMarginFeeDataTest() throws ApiException, CryptoException { /** * Query Enabled Isolated Margin Account Limit (USER_DATA) * - *

Query enabled isolated margin account limit. Weight: 1(IP) + *

Query enabled isolated margin account limit. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryEnabledIsolatedMarginAccountLimitTest() throws ApiException, CryptoException { + public void queryEnabledIsolatedMarginAccountLimitTest() + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.queryEnabledIsolatedMarginAccountLimit(recvWindow); @@ -380,25 +388,29 @@ public void queryEnabledIsolatedMarginAccountLimitTest() throws ApiException, Cr Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); assertEquals( "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/margin/isolated/accountLimit", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/margin/isolated/accountLimit", actualRequest.url().encodedPath()); } /** * Query Isolated Margin Account Info (USER_DATA) * - *

Query Isolated Margin Account Info * If \"symbols\" is not sent, all isolated - * assets will be returned. * If \"symbols\" is sent, only the isolated assets of the - * sent symbols will be returned. Weight: 10(IP) + *

Query Isolated Margin Account Info Weight(IP): 10 Security Type: USER_DATA Notes: - If + * \"symbols\" is not sent, all isolated assets will be returned. - If + * \"symbols\" is sent, only the isolated assets of the sent symbols will be returned. * * @throws ApiException if the Api call fails */ @Test - public void queryIsolatedMarginAccountInfoTest() throws ApiException, CryptoException { - String symbols = ""; + public void queryIsolatedMarginAccountInfoTest() + throws ApiException, CryptoException, IOException { + String symbols = "BTCUSDT,BNBUSDT,ADAUSDT"; Long recvWindow = 5000L; ApiResponse response = api.queryIsolatedMarginAccountInfo(symbols, recvWindow); @@ -413,10 +425,9 @@ public void queryIsolatedMarginAccountInfoTest() throws ApiException, CryptoExce Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbols=BTCUSDT%2CBNBUSDT%2CADAUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbols=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "75a5f82d3ffe60fadeb6d26bd9fa78c81c3f38810e0b7fb2fb801bc1b62a760f", + "c99ad6feba260e244f377c7b9aeff38f4a51b48770fe6f382e5b7e96710c0b37", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/isolated/account", actualRequest.url().encodedPath()); } @@ -425,14 +436,15 @@ public void queryIsolatedMarginAccountInfoTest() throws ApiException, CryptoExce * Query Isolated Margin Fee Data (USER_DATA) * *

Get isolated margin fee data collection with any vip level or user's current specific - * data as https://www.binance.com/en/margin-fee Weight: 1 when a single is specified;(IP) + * data as https://www.binance.com/en/margin-fee Weight: 1 when a single is specified;(IP) 10 + * when the symbol parameter is omitted(IP) Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryIsolatedMarginFeeDataTest() throws ApiException, CryptoException { + public void queryIsolatedMarginFeeDataTest() throws ApiException, CryptoException, IOException { Long vipLevel = 1L; - String symbol = ""; + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.queryIsolatedMarginFeeData(vipLevel, symbol, recvWindow); @@ -447,11 +459,9 @@ public void queryIsolatedMarginFeeDataTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("vipLevel=1&symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "vipLevel=1&symbol=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "a74c3d13b438d83d79b36502abddfc99e544e261b191d5610ccacc18158c152d", + "c507a43589780a442d0f6be3a81a6835e0e2ad0653cb7a9ce7f60466cc500ff1", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/isolatedMarginData", actualRequest.url().encodedPath()); } diff --git a/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/BorrowRepayApiTest.java b/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/BorrowRepayApiTest.java index 2fc0f32a9..534f8416d 100644 --- a/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/BorrowRepayApiTest.java +++ b/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/BorrowRepayApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -25,12 +25,15 @@ import com.binance.connector.client.common.sign.SignatureGenerator; import com.binance.connector.client.margin_trading.rest.model.GetFutureHourlyInterestRateResponse; import com.binance.connector.client.margin_trading.rest.model.GetInterestHistoryResponse; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; import com.binance.connector.client.margin_trading.rest.model.MarginAccountBorrowRepayRequest; import com.binance.connector.client.margin_trading.rest.model.MarginAccountBorrowRepayResponse; +import com.binance.connector.client.margin_trading.rest.model.OrderType; import com.binance.connector.client.margin_trading.rest.model.QueryBorrowRepayRecordsInMarginAccountResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMarginInterestRateHistoryResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMaxBorrowResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -84,14 +87,15 @@ public void initApiClient() throws ApiException { /** * Get future hourly interest rate (USER_DATA) * - *

Get future hourly interest rate Weight: 100 + *

Get future hourly interest rate Weight(IP): 100 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getFutureHourlyInterestRateTest() throws ApiException, CryptoException { - String assets = ""; - String isIsolated = "false"; + public void getFutureHourlyInterestRateTest() + throws ApiException, CryptoException, IOException { + String assets = "BTC,ETH"; + IsIsolated isIsolated = IsIsolated.TRUE; ApiResponse response = api.getFutureHourlyInterestRate(assets, isIsolated); @@ -105,38 +109,35 @@ public void getFutureHourlyInterestRateTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("assets=BTC%2CETH&isIsolated=TRUE×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "assets=&isIsolated=false×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "2387652ad7bac3e1193d741e641740cf64adb884868d4a1e300d99a49a15ea31", + "ce42d7d2f9cda5c0fd781420f7e8d4e60ec1c56b3003888573449623341962a7", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/margin/next-hourly-interest-rate", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/margin/next-hourly-interest-rate", actualRequest.url().encodedPath()); } /** * Get Interest History (USER_DATA) * - *

Get Interest History * Response in descending order * If isolatedSymbol is not sent, - * crossed margin data will be returned * The max interval between `startTime` and - * `endTime` is 30 days. It is a MUST to ensure data correctness. * If - * `startTime`and `endTime` not sent, return records of the last 7 days by - * default. * If `startTime` is sent and `endTime` is not sent, return - * records of [max(`startTime`, now-30d), now]. * If `startTime` is not sent - * and `endTime` is sent, return records of [`endTime`-7, - * `endTime`] * `type` in response has 4 enums: * `PERIODIC` - * interest charged per hour * `ON_BORROW` first interest charged on borrow * - * `PERIODIC_CONVERTED` interest charged per hour converted into BNB * - * `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB * - * `PORTFOLIO` interest charged daily on the portfolio margin negative balance Weight: - * 1(IP) + *

Get Interest History Weight(IP): 1 Security Type: USER_DATA Notes: - Response in + * descending order - If isolatedSymbol is not sent, crossed margin data will be returned - The + * max interval between `startTime` and `endTime` is 30 days. It is a MUST + * to ensure data correctness. - If `startTime`and `endTime` not sent, + * return records of the last 7 days by default. - If `startTime` is sent and + * `endTime` is not sent, return records of [max(`startTime`, now-30d), + * now]. - If `startTime` is not sent and `endTime` is sent, return records + * of [`endTime`-7, `endTime`] - `type` in response has 4 enums: - + * `PERIODIC` interest charged per hour - `ON_BORROW` first interest charged + * on borrow - `PERIODIC_CONVERTED` interest charged per hour converted into BNB - + * `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB - + * `PORTFOLIO` interest charged daily on the portfolio margin negative balance * * @throws ApiException if the Api call fails */ @Test - public void getInterestHistoryTest() throws ApiException, CryptoException { - String asset = ""; - String isolatedSymbol = ""; + public void getInterestHistoryTest() throws ApiException, CryptoException, IOException { + String asset = "USDT"; + String isolatedSymbol = "BNBUSDT"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -156,32 +157,27 @@ public void getInterestHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("asset=USDT&isolatedSymbol=BNBUSDT&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "asset=&isolatedSymbol=&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "dbde03d1c3fdbcc6436ec6818d4e920ff1602671280b0d98f33673c254b22efd", - actualRequest.url().queryParameter("signature")); + "a9713be993d941a0f191adc129144cf2fcc0a379d668d8db7c877ffcf2fb6c2b", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/interestHistory", actualRequest.url().encodedPath()); } /** - * Margin account borrow/repay(MARGIN) + * Margin account borrow/repay (USER_DATA) * - *

Margin account borrow/repay(MARGIN) Weight: 1500 + *

Margin account borrow/repay Weight(UID): 1500 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void marginAccountBorrowRepayTest() throws ApiException, CryptoException { + public void marginAccountBorrowRepayTest() throws ApiException, CryptoException, IOException { MarginAccountBorrowRepayRequest marginAccountBorrowRepayRequest = new MarginAccountBorrowRepayRequest(); - - marginAccountBorrowRepayRequest.asset(""); - marginAccountBorrowRepayRequest.isIsolated("false"); - marginAccountBorrowRepayRequest.symbol(""); - marginAccountBorrowRepayRequest.amount(""); - marginAccountBorrowRepayRequest.type(""); + marginAccountBorrowRepayRequest.asset("USDT"); + marginAccountBorrowRepayRequest.isIsolated(IsIsolated.TRUE); + marginAccountBorrowRepayRequest.amount("1.0"); + marginAccountBorrowRepayRequest.type(OrderType.ROLL_IN); ApiResponse response = api.marginAccountBorrowRepay(marginAccountBorrowRepayRequest); @@ -196,32 +192,32 @@ public void marginAccountBorrowRepayTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000amount=1.0&isIsolated=TRUE&asset=USDT&type=ROLL_IN", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000symbol=&amount=&isIsolated=false&asset=&type=", - signInputCaptor.getValue()); - assertEquals( - "cf39a535a9ce053d58cc411f8ed47fa0998432f15bf01424a936f508b6134ec8", + "3fba8c816720664dd968ac8a7a255bdc1a4024e739d1ff5c906ddec56cc950f7", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/borrow-repay", actualRequest.url().encodedPath()); } /** - * Query borrow/repay records in Margin account(USER_DATA) + * Query borrow/repay records in Margin account (USER_DATA) * - *

Query borrow/repay records in Margin account * `txId` or `startTime` - * must be sent. `txId` takes precedence. * If an asset is sent, data within 30 days - * before `endTime`; If an asset is not sent, data within 7 days before - * `endTime` * If neither `startTime` nor `endTime` is sent, the - * recent 7-day data will be returned. * `startTime` set as `endTime` - - * 7days by default, `endTime` set as current time by default Weight: 10(IP) + *

Query borrow/repay records in Margin account Weight(IP): 10 Security Type: USER_DATA + * Notes: - `txId` or `startTime` must be sent. `txId` takes + * precedence. - Response in descending order - If an asset is sent, data within 30 days before + * `endTime`; If an asset is not sent, data within 7 days before `endTime` - + * If neither `startTime` nor `endTime` is sent, the recent 7-day data will + * be returned. - `startTime` set as `endTime` - 7 days by default, + * `endTime` set as current time by default * * @throws ApiException if the Api call fails */ @Test - public void queryBorrowRepayRecordsInMarginAccountTest() throws ApiException, CryptoException { - String type = ""; - String asset = ""; - String isolatedSymbol = ""; + public void queryBorrowRepayRecordsInMarginAccountTest() + throws ApiException, CryptoException, IOException { + OrderType type = OrderType.ROLL_IN; + String asset = "BNB"; + String isolatedSymbol = "BNBUSDT"; Long txId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; @@ -251,24 +247,26 @@ public void queryBorrowRepayRecordsInMarginAccountTest() throws ApiException, Cr Request actualRequest = captorValue.request(); assertEquals( - "asset=&isolatedSymbol=&txId=1&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&type=&recvWindow=5000×tamp=1736393892000", + "asset=BNB&isolatedSymbol=BNBUSDT&txId=1&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&type=ROLL_IN&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "412d39a43c198510d843f932bec86af52957fc98447679840459426d9f3547ce", + "d3860b61343432bef178bc57c332d8c23bf6a93190060be5114e5ae32d4a5c24", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/margin/borrow-repay", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/margin/borrow-repay", actualRequest.url().encodedPath()); } /** * Query Margin Interest Rate History (USER_DATA) * - *

Query Margin Interest Rate History Weight: 1(IP) + *

Query Margin Interest Rate History Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryMarginInterestRateHistoryTest() throws ApiException, CryptoException { - String asset = ""; + public void queryMarginInterestRateHistoryTest() + throws ApiException, CryptoException, IOException { + String asset = "BTC"; Long vipLevel = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; @@ -286,11 +284,9 @@ public void queryMarginInterestRateHistoryTest() throws ApiException, CryptoExce Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("asset=BTC&vipLevel=1&startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "asset=&vipLevel=1&startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "6dd354c5666cefbda9607a5594913706b6681a6f388625f6781b39c2be2a858f", + "5dd2d2da84e45c1048b2e917120a0de1f10fa8471711a6eee7a0755679736ca0", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/interestRateHistory", actualRequest.url().encodedPath()); } @@ -298,16 +294,16 @@ public void queryMarginInterestRateHistoryTest() throws ApiException, CryptoExce /** * Query Max Borrow (USER_DATA) * - *

Query Max Borrow * If isolatedSymbol is not sent, crossed margin data will be sent. * - * `borrowLimit` is also available from - * [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee) Weight: 50(IP) + *

Query Max Borrow Weight(IP): 50 Security Type: USER_DATA Notes: - If isolatedSymbol is not + * sent, crossed margin data will be sent. - `borrowLimit` is also available from + * [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee) * * @throws ApiException if the Api call fails */ @Test - public void queryMaxBorrowTest() throws ApiException, CryptoException { - String asset = ""; - String isolatedSymbol = ""; + public void queryMaxBorrowTest() throws ApiException, CryptoException, IOException { + String asset = "BTC"; + String isolatedSymbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.queryMaxBorrow(asset, isolatedSymbol, recvWindow); @@ -322,12 +318,8 @@ public void queryMaxBorrowTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "asset=&isolatedSymbol=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "90c4a3668764b733f6c643c57f90568be4756aa70d3d7923c44995f762b25e21", - actualRequest.url().queryParameter("signature")); + assertEquals("asset=BTC&isolatedSymbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("ef15bb58e0af88d3e358c8e7b014798133d267e863c514921894375c6bd22336", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/maxBorrowable", actualRequest.url().encodedPath()); } } diff --git a/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/MarketDataApiTest.java b/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/MarketDataApiTest.java index fa2aa7dde..3ce50cbc9 100644 --- a/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/MarketDataApiTest.java +++ b/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/MarketDataApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -28,11 +28,17 @@ import com.binance.connector.client.margin_trading.rest.model.GetAllIsolatedMarginSymbolResponse; import com.binance.connector.client.margin_trading.rest.model.GetAllMarginAssetsResponse; import com.binance.connector.client.margin_trading.rest.model.GetDelistScheduleResponse; +import com.binance.connector.client.margin_trading.rest.model.GetLimitPricePairsResponse; +import com.binance.connector.client.margin_trading.rest.model.GetListScheduleResponse; +import com.binance.connector.client.margin_trading.rest.model.GetMarginAssetRiskBasedLiquidationRatioResponse; +import com.binance.connector.client.margin_trading.rest.model.GetMarginRestrictedAssetsResponse; +import com.binance.connector.client.margin_trading.rest.model.OrderType; import com.binance.connector.client.margin_trading.rest.model.QueryIsolatedMarginTierDataResponse; import com.binance.connector.client.margin_trading.rest.model.QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAvailableInventoryResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMarginPriceindexResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -86,12 +92,12 @@ public void initApiClient() throws ApiException { /** * Cross margin collateral ratio (MARKET_DATA) * - *

Cross margin collateral ratio Weight: 100(IP) + *

Cross margin collateral ratio Weight(IP): 100 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ @Test - public void crossMarginCollateralRatioTest() throws ApiException, CryptoException { + public void crossMarginCollateralRatioTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.crossMarginCollateralRatio(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -101,21 +107,22 @@ public void crossMarginCollateralRatioTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); assertEquals( - "/sapi/v1/margin/crossMarginCollateralRatio", actualRequest.url().encodedPath()); + null, + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/margin/crossMarginCollateralRatio", actualRequest.url().encodedPath()); } /** * Get All Cross Margin Pairs (MARKET_DATA) * - *

Get All Cross Margin Pairs Weight: 1(IP) + *

Get All Cross Margin Pairs Weight(IP): 1 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ @Test - public void getAllCrossMarginPairsTest() throws ApiException, CryptoException { - String symbol = ""; + public void getAllCrossMarginPairsTest() throws ApiException, CryptoException, IOException { + String symbol = "BNBBTC"; ApiResponse response = api.getAllCrossMarginPairs(symbol); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -125,20 +132,22 @@ public void getAllCrossMarginPairsTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/allPairs", actualRequest.url().encodedPath()); } /** - * Get All Isolated Margin Symbol(MARKET_DATA) + * Get All Isolated Margin Symbol (MARKET_DATA) * - *

Get All Isolated Margin Symbol Weight: 10(IP) + *

Get All Isolated Margin Symbol Weight(IP): 10 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ @Test - public void getAllIsolatedMarginSymbolTest() throws ApiException, CryptoException { - String symbol = ""; + public void getAllIsolatedMarginSymbolTest() throws ApiException, CryptoException, IOException { + String symbol = "BNBBTC"; Long recvWindow = 5000L; ApiResponse response = api.getAllIsolatedMarginSymbol(symbol, recvWindow); @@ -150,20 +159,22 @@ public void getAllIsolatedMarginSymbolTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/isolated/allPairs", actualRequest.url().encodedPath()); } /** * Get All Margin Assets (MARKET_DATA) * - *

Get All Margin Assets. Weight: 1(IP) + *

Get All Margin Assets. Weight(IP): 1 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ @Test - public void getAllMarginAssetsTest() throws ApiException, CryptoException { - String asset = ""; + public void getAllMarginAssetsTest() throws ApiException, CryptoException, IOException { + String asset = "USDC"; ApiResponse response = api.getAllMarginAssets(asset); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -173,19 +184,21 @@ public void getAllMarginAssetsTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/allAssets", actualRequest.url().encodedPath()); } /** * Get Delist Schedule (MARKET_DATA) * - *

Get tokens or symbols delist schedule for cross margin and isolated margin Weight: 100 + *

Get tokens or symbols delist schedule for cross margin and isolated margin Weight(IP): 100 + * Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ @Test - public void getDelistScheduleTest() throws ApiException, CryptoException { + public void getDelistScheduleTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getDelistSchedule(recvWindow); @@ -196,22 +209,133 @@ public void getDelistScheduleTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/delist-schedule", actualRequest.url().encodedPath()); } + /** + * Get Limit Price Pairs (MARKET_DATA) + * + *

Query trading pairs with restriction on limit price range. In margin trading, you can + * place orders with limit price. Limit price should be within (-15%, 15%) of current index + * price for a list of margin trading pairs. This rule only impacts limit sell orders with limit + * price that is lower than current index price and limit buy orders with limit price that is + * higher than current index price. - Buy order: Your order will be rejected with an error + * message notification if the limit price is 15% above the index price. - Sell order: Your + * order will be rejected with an error message notification if the limit price is 15% below the + * index price. Please review the limit price order placing strategy, backtest and calibrate the + * planned order size with the trading volume and order book depth to prevent trading loss. + * Weight(IP): 1 Security Type: MARKET_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getLimitPricePairsTest() throws ApiException, CryptoException, IOException { + ApiResponse response = api.getLimitPricePairs(); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + null, actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/margin/limit-price-pairs", actualRequest.url().encodedPath()); + } + + /** + * Get list Schedule (MARKET_DATA) + * + *

Get the upcoming tokens or symbols listing schedule for Cross Margin and Isolated Margin. + * Weight(IP): 100 Security Type: MARKET_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getListScheduleTest() throws ApiException, CryptoException, IOException { + Long recvWindow = 5000L; + ApiResponse response = api.getListSchedule(recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + null, actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/margin/list-schedule", actualRequest.url().encodedPath()); + } + + /** + * Get Margin Asset Risk-Based Liquidation Ratio (MARKET_DATA) + * + *

Get Margin Asset Risk-Based Liquidation Ratio Weight(IP): 1 Security Type: MARKET_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getMarginAssetRiskBasedLiquidationRatioTest() + throws ApiException, CryptoException, IOException { + ApiResponse response = + api.getMarginAssetRiskBasedLiquidationRatio(); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + null, + actualRequest.url().queryParameter("signature")); + assertEquals( + "/sapi/v1/margin/risk-based-liquidation-ratio", + actualRequest.url().encodedPath()); + } + + /** + * Get Margin Restricted Assets (MARKET_DATA) + * + *

Get the list of margin-restricted assets. Weight(IP): 1 Security Type: MARKET_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getMarginRestrictedAssetsTest() throws ApiException, CryptoException, IOException { + ApiResponse response = api.getMarginRestrictedAssets(); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + null, + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/margin/restricted-asset", actualRequest.url().encodedPath()); + } + /** * Query Isolated Margin Tier Data (USER_DATA) * *

Get isolated margin tier data collection with any tier as - * https://www.binance.com/en/margin-data Weight: 1(IP) + * https://www.binance.com/en/margin-data Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryIsolatedMarginTierDataTest() throws ApiException, CryptoException { - String symbol = ""; - Long tier = 0L; + public void queryIsolatedMarginTierDataTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long tier = 1L; Long recvWindow = 5000L; ApiResponse response = api.queryIsolatedMarginTierData(symbol, tier, recvWindow); @@ -226,25 +350,24 @@ public void queryIsolatedMarginTierDataTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&tier=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&tier=0&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "d598c86102a833b330fd5e0b272ae3ec3e38965235029950fe63b98d3f21118c", + "6a3f13f882bdae42ff9efe4de4c0a5d0ecbda82dbc9ad537d8b599903eee8635", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/isolatedMarginTier", actualRequest.url().encodedPath()); } /** - * Query Liability Coin Leverage Bracket in Cross Margin Pro Mode(MARKET_DATA) + * Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) * - *

Liability Coin Leverage Bracket in Cross Margin Pro Mode Weight: 1 + *

Liability Coin Leverage Bracket in Cross Margin Pro Mode Weight(IP): 1 Security Type: + * MARKET_DATA * * @throws ApiException if the Api call fails */ @Test public void queryLiabilityCoinLeverageBracketInCrossMarginProModeTest() - throws ApiException, CryptoException { + throws ApiException, CryptoException, IOException { ApiResponse response = api.queryLiabilityCoinLeverageBracketInCrossMarginProMode(); @@ -255,20 +378,25 @@ public void queryLiabilityCoinLeverageBracketInCrossMarginProModeTest() Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/margin/leverageBracket", actualRequest.url().encodedPath()); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); + assertEquals( + "/sapi/v1/margin/leverageBracket", + actualRequest.url().encodedPath()); } /** - * Query Margin Available Inventory(USER_DATA) + * Query Margin Available Inventory (USER_DATA) * - *

Margin available Inventory query Weight: 50 + *

Margin available Inventory query Weight(UID): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryMarginAvailableInventoryTest() throws ApiException, CryptoException { - String type = ""; + public void queryMarginAvailableInventoryTest() + throws ApiException, CryptoException, IOException { + OrderType type = OrderType.ROLL_IN; ApiResponse response = api.queryMarginAvailableInventory(type); @@ -282,9 +410,9 @@ public void queryMarginAvailableInventoryTest() throws ApiException, CryptoExcep Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("type=×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("type=ROLL_IN×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "a0a00da616718f873c1bc76aa304e6124894ea2b3df857101576732dca4e8f53", + "9a5b9ac20fe38cbe023bb49e62ad64f111412f99e7d3ffbb13bdd234e6772559", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/available-inventory", actualRequest.url().encodedPath()); } @@ -292,13 +420,13 @@ public void queryMarginAvailableInventoryTest() throws ApiException, CryptoExcep /** * Query Margin PriceIndex (MARKET_DATA) * - *

Query Margin PriceIndex Weight: 10(IP) + *

Query Margin PriceIndex Weight(IP): 10 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryMarginPriceindexTest() throws ApiException, CryptoException { - String symbol = ""; + public void queryMarginPriceindexTest() throws ApiException, CryptoException, IOException { + String symbol = "BNBBTC"; ApiResponse response = api.queryMarginPriceindex(symbol); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -308,7 +436,9 @@ public void queryMarginPriceindexTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/priceIndex", actualRequest.url().encodedPath()); } } diff --git a/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/RiskDataStreamApiTest.java b/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/RiskDataStreamApiTest.java deleted file mode 100644 index 9f3eac7a1..000000000 --- a/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/RiskDataStreamApiTest.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.margin_trading.rest.api; - -import static org.junit.Assert.assertEquals; - -import com.binance.connector.client.common.ApiClient; -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.auth.BinanceAuthenticationFactory; -import com.binance.connector.client.common.auth.SignatureAuthentication; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; -import com.binance.connector.client.common.sign.HmacSignatureGenerator; -import com.binance.connector.client.common.sign.SignatureGenerator; -import com.binance.connector.client.margin_trading.rest.model.KeepaliveUserDataStreamRequest; -import com.binance.connector.client.margin_trading.rest.model.StartUserDataStreamResponse; -import jakarta.validation.constraints.*; -import okhttp3.Call; -import okhttp3.Request; -import org.bouncycastle.crypto.CryptoException; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; - -/** API tests for RiskDataStreamApi */ -public class RiskDataStreamApiTest { - - private RiskDataStreamApi api; - private ApiClient apiClientSpy; - private SignatureGenerator signatureGeneratorSpy; - - @BeforeEach - public void initApiClient() throws ApiException { - ClientConfiguration clientConfiguration = new ClientConfiguration(); - clientConfiguration.setUrl("http://localhost:8080"); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setSecretKey("secretKey"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - - HmacSignatureGenerator signatureGenerator = - new HmacSignatureGenerator(signatureConfiguration.getSecretKey()); - signatureGeneratorSpy = Mockito.spy(signatureGenerator); - SignatureAuthentication signatureAuthentication = - new SignatureAuthentication( - signatureConfiguration.getApiKey(), signatureGeneratorSpy); - SignatureAuthentication authenticationSpy = Mockito.spy(signatureAuthentication); - Mockito.doReturn("1736393892000").when(authenticationSpy).buildTimestamp(); - - BinanceAuthenticationFactory factoryMock = Mockito.mock(BinanceAuthenticationFactory.class); - Mockito.doReturn(authenticationSpy) - .when(factoryMock) - .getAuthentication(signatureConfiguration); - - ApiClient apiClient = new ApiClient(clientConfiguration, factoryMock); - - apiClientSpy = Mockito.spy(apiClient); - Mockito.doReturn(new ApiResponse<>(200, null)) - .when(apiClientSpy) - .execute(Mockito.any(), Mockito.any(java.lang.reflect.Type.class)); - Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); - Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); - - api = new RiskDataStreamApi(apiClientSpy); - } - - /** - * Close User Data Stream (USER_STREAM) - * - *

Close out a user data stream. Weight: 3000 - * - * @throws ApiException if the Api call fails - */ - @Test - public void closeUserDataStreamTest() throws ApiException, CryptoException { - api.closeUserDataStream(); - - ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); - Mockito.verify(apiClientSpy).execute(callArgumentCaptor.capture()); - - Call captorValue = callArgumentCaptor.getValue(); - Request actualRequest = captorValue.request(); - - assertEquals(null, actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/margin/listen-key", actualRequest.url().encodedPath()); - } - - /** - * Keepalive User Data Stream (USER_STREAM) - * - *

Keepalive a user data stream to prevent a time out. Weight: 1 - * - * @throws ApiException if the Api call fails - */ - @Test - public void keepaliveUserDataStreamTest() throws ApiException, CryptoException { - KeepaliveUserDataStreamRequest keepaliveUserDataStreamRequest = - new KeepaliveUserDataStreamRequest(); - - keepaliveUserDataStreamRequest.listenKey(""); - - api.keepaliveUserDataStream(keepaliveUserDataStreamRequest); - - ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); - Mockito.verify(apiClientSpy).execute(callArgumentCaptor.capture()); - - Call captorValue = callArgumentCaptor.getValue(); - Request actualRequest = captorValue.request(); - - assertEquals(null, actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/margin/listen-key", actualRequest.url().encodedPath()); - } - - /** - * Start User Data Stream (USER_STREAM) - * - *

Start a new user data stream. Weight: 1 - * - * @throws ApiException if the Api call fails - */ - @Test - public void startUserDataStreamTest() throws ApiException, CryptoException { - ApiResponse response = api.startUserDataStream(); - - ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); - Mockito.verify(apiClientSpy) - .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); - - Call captorValue = callArgumentCaptor.getValue(); - Request actualRequest = captorValue.request(); - - assertEquals(null, actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/margin/listen-key", actualRequest.url().encodedPath()); - } -} diff --git a/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/TradeApiTest.java b/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/TradeApiTest.java index 543d50e49..f4204036a 100644 --- a/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/TradeApiTest.java +++ b/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/TradeApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -23,13 +23,16 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; -import com.binance.connector.client.margin_trading.rest.model.AssetNames; import com.binance.connector.client.margin_trading.rest.model.CreateSpecialKeyRequest; import com.binance.connector.client.margin_trading.rest.model.CreateSpecialKeyResponse; import com.binance.connector.client.margin_trading.rest.model.EditIpForSpecialKeyRequest; +import com.binance.connector.client.margin_trading.rest.model.ExitSpecialKeyModeRequest; import com.binance.connector.client.margin_trading.rest.model.GetForceLiquidationRecordResponse; import com.binance.connector.client.margin_trading.rest.model.GetSmallLiabilityExchangeCoinListResponse; import com.binance.connector.client.margin_trading.rest.model.GetSmallLiabilityExchangeHistoryResponse; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; +import com.binance.connector.client.margin_trading.rest.model.LiquidationLoanRepayRequest; +import com.binance.connector.client.margin_trading.rest.model.LiquidationLoanRepayResponse; import com.binance.connector.client.margin_trading.rest.model.MarginAccountCancelAllOpenOrdersOnASymbolResponse; import com.binance.connector.client.margin_trading.rest.model.MarginAccountCancelOcoResponse; import com.binance.connector.client.margin_trading.rest.model.MarginAccountCancelOrderResponse; @@ -43,7 +46,13 @@ import com.binance.connector.client.margin_trading.rest.model.MarginAccountNewOtocoResponse; import com.binance.connector.client.margin_trading.rest.model.MarginManualLiquidationRequest; import com.binance.connector.client.margin_trading.rest.model.MarginManualLiquidationResponse; +import com.binance.connector.client.margin_trading.rest.model.OrderType; +import com.binance.connector.client.margin_trading.rest.model.PendingAboveType; +import com.binance.connector.client.margin_trading.rest.model.PendingSide; +import com.binance.connector.client.margin_trading.rest.model.PendingType; import com.binance.connector.client.margin_trading.rest.model.QueryCurrentMarginOrderCountUsageResponse; +import com.binance.connector.client.margin_trading.rest.model.QueryLiquidationLoanRepayHistoryResponse; +import com.binance.connector.client.margin_trading.rest.model.QueryLiquidationLoanResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsAllOcoResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsAllOrdersResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsOcoResponse; @@ -51,11 +60,15 @@ import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsOpenOrdersResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsOrderResponse; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsTradeListResponse; +import com.binance.connector.client.margin_trading.rest.model.QueryPreventedMatchesResponse; import com.binance.connector.client.margin_trading.rest.model.QuerySpecialKeyListResponse; import com.binance.connector.client.margin_trading.rest.model.QuerySpecialKeyResponse; import com.binance.connector.client.margin_trading.rest.model.Side; import com.binance.connector.client.margin_trading.rest.model.SmallLiabilityExchangeRequest; +import com.binance.connector.client.margin_trading.rest.model.WorkingSide; +import com.binance.connector.client.margin_trading.rest.model.WorkingType; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -107,31 +120,46 @@ public void initApiClient() throws ApiException { } /** - * Create Special Key(Low-Latency Trading)(TRADE) + * Create Special Key(Low-Latency Trading) (TRADE) * - *

**Binance Margin offers low-latency trading through a [special + *

**Eligibility** - Binance Margin offers low-latency trading through a [special * key](https://www.binance.com/en/support/faq/frequently-asked-questions-on-margin-special-api-key-3208663e900d4d2e9fec4140e1832f4e), - * available exclusively to users with VIP level 4 or higher. ** **If you are VIP level 3 or - * below, please contact your VIP manager for eligibility criterias.** We support several types - * of API keys: * Ed25519 (recommended) * HMAC * RSA We recommend to **use Ed25519 API keys** as - * it should provide the best performance and security out of all supported key types. We accept - * PKCS#8 (BEGIN PUBLIC KEY). For how to generate an RSA key pair to send API requests on - * Binance. Please refer to the document below + * available exclusively to users with VIP level 7 or higher. - If you are VIP level 6 or below, + * please contact your VIP manager for eligibility criterias. - All new Margin Special Key users + * are required to read, understand, and agree to the Margin Special Key Supplemental Product + * Terms at the master account level before creating a Margin Special Key. - Once signed at the + * master account level, the agreement applies to all sub-accounts. The master account and all + * sub-accounts (Cross Margin Classic and Portfolio Margin Pro) are authorized to create a + * Margin Special Key and are subject to the LiquidationLoan policy. For more information, + * please refer to + * [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). + * **Supported Products:** - Cross Margin - Isolated Margin - Portfolio Margin Pro **Unsupported + * Products:** - Portfolio Margin We support several types of API keys: * Ed25519 (recommended) + * * HMAC * RSA We recommend to **use Ed25519 API keys** as it should provide the best + * performance and security out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). + * For how to generate an RSA key pair to send API requests on Binance. Please refer to the + * document below * [FAQ](https://www.binance.com/en/support/faq/how-to-generate-an-rsa-key-pair-to-send-api-requests-on-binance-2b79728f331e43079b27440d9d15c5db) - * . Read [REST - * API](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md#signed-trade-and-user_data-endpoint-security) - * or [WebSocket - * API](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md#request-security) - * documentation to learn how to use different API keys You need to enable Permits “Enable Spot - * & Margin Trading” option for the API Key which requests this endpoint. Weight: 1(UID) + * . **How to use the Margin Special Key** - Use the below `sapi` endpoint to create + * your margin special API Key. - For accessing the Cross Margin account, do not send the + * `symbol` parameter. - For accessing the Isolated Margin account(s), pass the + * relevant `symbol` parameter in the API Key creation request. - Use the generated + * API Key (and Secret key, if applicable) to perform margin trading and listenKey generation + * via **Spot** REST API (`https://api.binance.com/api/v3/_*`) endpoints. Read [REST + * API](/products/spot/rest-api#signed-trade-and-user_data-endpoint-security) or [WebSocket + * API](/products/spot/web-socket-api#request-security) documentation to learn how to use + * different API keys You need to enable Permits “Enable Spot & Margin Trading” option for + * the API Key which requests this endpoint. Weight(UID): 1 Security Type: TRADE Response Notes: + * - Error Code Description - **UNSUPPORTED_OPERATION** : Portfolio Margin is an unsupported + * product, please change the account type to a supported margin product. - **Forbidden**: Cross + * Margin Pro accounts require additional agreements, please contact your relationship manager. * * @throws ApiException if the Api call fails */ @Test - public void createSpecialKeyTest() throws ApiException, CryptoException { + public void createSpecialKeyTest() throws ApiException, CryptoException, IOException { CreateSpecialKeyRequest createSpecialKeyRequest = new CreateSpecialKeyRequest(); - - createSpecialKeyRequest.apiName(""); + createSpecialKeyRequest.apiName("apiName"); ApiResponse response = api.createSpecialKey(createSpecialKeyRequest); @@ -146,27 +174,32 @@ public void createSpecialKeyTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000apiName=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000apiName=apiName&permissionMode=TRADE", signInputCaptor.getValue()); assertEquals( - "a2ad423c0df49a3d8b7f2faeda0307aade418bcd976219b90d89fa8ef3f2a712", - actualRequest.url().queryParameter("signature")); + "22ad46fa1d14a2448abca205b7b6e6fb378ba7cd23940c41ecb8830c63c877c6", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/apiKey", actualRequest.url().encodedPath()); } /** - * Delete Special Key(Low-Latency Trading)(TRADE) + * Delete Special Key(Low-Latency Trading) (TRADE) * - *

This only applies to Special Key for Low Latency Trading. If apiKey is given, apiName will - * be ignored. If apiName is given with no apiKey, all apikeys with given apiName will be - * deleted. You need to enable Permits “Enable Spot & Margin Trading” option for the API Key - * which requests this endpoint. Weight: 1(UID) + *

Deleting your Margin Special Key alone does not exit you from the Margin Special Key + * framework or discharge your obligations under the Margin Special Key Supplemental Product + * Terms. To fully exit, you must: 1. Delete your Margin Special Key. 2. Ensure there are no + * outstanding liabilities on the account. 3. Call the Exit Margin Special Key API endpoint. 4. + * Confirm the exit status via the API response. Only after step 4 is completed and the exit + * status is confirmed by Binance will your account revert to standard liquidation logic and no + * longer be subject to the Margin Special Key Supplemental Product Terms. If apiKey is given, + * apiName will be ignored. If apiName is given with no apiKey, all apikeys with given apiName + * will be deleted. You need to enable Permits “Enable Spot & Margin” option for the API Key + * which requests this endpoint. Weight(UID): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void deleteSpecialKeyTest() throws ApiException, CryptoException { - String apiName = ""; - String symbol = ""; + public void deleteSpecialKeyTest() throws ApiException, CryptoException, IOException { + String apiName = "apiName"; + String symbol = "BTCUSDT"; Long recvWindow = 5000L; api.deleteSpecialKey(apiName, symbol, recvWindow); @@ -179,29 +212,25 @@ public void deleteSpecialKeyTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("apiName=apiName&symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "apiName=&symbol=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "9cb386225deeface4c3aea3d1600f720006f7e67c5fe0f7dc7ec4ff0fdc53fcf", - actualRequest.url().queryParameter("signature")); + "f9a6e8734c31de67e1021ab62810f62413aa4ff56845eaa120ed4946bfcff9fe", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/apiKey", actualRequest.url().encodedPath()); } /** - * Edit ip for Special Key(Low-Latency Trading)(TRADE) + * Edit ip for Special Key(Low-Latency Trading) (TRADE) * *

Edit ip restriction. This only applies to Special Key for Low Latency Trading. You need to - * enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this - * endpoint. Weight: 1(UID) + * enable Permits “Enable Spot & Margin” option for the API Key which requests this + * endpoint. Weight(UID): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void editIpForSpecialKeyTest() throws ApiException, CryptoException { + public void editIpForSpecialKeyTest() throws ApiException, CryptoException, IOException { EditIpForSpecialKeyRequest editIpForSpecialKeyRequest = new EditIpForSpecialKeyRequest(); - - editIpForSpecialKeyRequest.ip(""); + editIpForSpecialKeyRequest.ip("24.156.99.202"); api.editIpForSpecialKey(editIpForSpecialKeyRequest); @@ -214,25 +243,70 @@ public void editIpForSpecialKeyTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000ip=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000ip=24.156.99.202", signInputCaptor.getValue()); assertEquals( - "66267361179ca0a67b144a0ceadbd0338510680bed6f7d4546abbd4e4eb7fee0", - actualRequest.url().queryParameter("signature")); + "d57cc55c617d2beae2382f7ff82e1d2d446a47c1c90581dfda966fbcfd48620e", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/apiKey/ip", actualRequest.url().encodedPath()); } + /** + * Exit Special Key Mode (TRADE) + * + *

Exit the Margin Special Key mode for Cross Margin Classic accounts. **All outstanding + * liabilities under the Cross Margin Classic account must be fully repaid before calling this + * endpoint.** Deleting the Margin Special Key alone does not constitute a valid exit. When a + * user creates a Margin Special API Key, the account enters \"Special Key Mode\". + * Upon a successful request, the following actions will be performed atomically: 1. All + * existing Margin Special API Keys under the Cross Margin Classic mode account will be deleted. + * 2. All pre-execution margin checks (including Open-order-loss calculation) will revert to + * standard mode. 3. A cooldown period (default: 24 hours) will be enforced, during which the + * account will not be permitted to create new Margin Special API Keys. For more information, + * please refer to + * [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). + * **Preconditions:** The following conditions must be met; otherwise the request will be + * rejected: - Account type must be **Cross Margin Classic**. - Account must currently be in + * **Special Key Mode**. If not, the request silently succeeds. - Account must **not be in + * liquidation**. - Account must **have no liability**. You need to enable \"Permits Enable + * Spot & Margin Trading\" option for the API Key which requests this endpoint. + * Weight(UID): 10 Security Type: TRADE + * + * @throws ApiException if the Api call fails + */ + @Test + public void exitSpecialKeyModeTest() throws ApiException, CryptoException, IOException { + ExitSpecialKeyModeRequest exitSpecialKeyModeRequest = new ExitSpecialKeyModeRequest(); + + ApiResponse response = api.exitSpecialKeyMode(exitSpecialKeyModeRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/margin/exit-special-key-mode", actualRequest.url().encodedPath()); + } + /** * Get Force Liquidation Record (USER_DATA) * - *

Get Force Liquidation Record * Response in descending order Weight: 1(IP) + *

Get Force Liquidation Record Weight(IP): 1 Security Type: USER_DATA Notes: - Response in + * descending order * * @throws ApiException if the Api call fails */ @Test - public void getForceLiquidationRecordTest() throws ApiException, CryptoException { + public void getForceLiquidationRecordTest() throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; - String isolatedSymbol = ""; + String isolatedSymbol = "BTCUSDT"; Long current = 1L; Long size = 10L; Long recvWindow = 5000L; @@ -250,11 +324,9 @@ public void getForceLiquidationRecordTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("startTime=1623319461670&endTime=1641782889000&isolatedSymbol=BTCUSDT¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "startTime=1623319461670&endTime=1641782889000&isolatedSymbol=¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "dff844dbf8ae3029286ecfaf18cd34dbda2bc10e91ca64e3b9f17c59a4d9d12c", + "5d884a89dda04b4bd06504586dd5e7697e5e533cea5516e46d37a06fbdb94fab", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/forceLiquidationRec", actualRequest.url().encodedPath()); } @@ -262,12 +334,14 @@ public void getForceLiquidationRecordTest() throws ApiException, CryptoException /** * Get Small Liability Exchange Coin List (USER_DATA) * - *

Query the coins which can be small liability exchange Weight: 100 + *

Query the coins which can be small liability exchange Weight(IP): 100 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getSmallLiabilityExchangeCoinListTest() throws ApiException, CryptoException { + public void getSmallLiabilityExchangeCoinListTest() + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getSmallLiabilityExchangeCoinList(recvWindow); @@ -282,7 +356,8 @@ public void getSmallLiabilityExchangeCoinListTest() throws ApiException, CryptoE Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); @@ -292,12 +367,13 @@ public void getSmallLiabilityExchangeCoinListTest() throws ApiException, CryptoE /** * Get Small Liability Exchange History (USER_DATA) * - *

Get Small liability Exchange History Weight: 100(UID) + *

Get Small liability Exchange History Weight(UID): 100 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getSmallLiabilityExchangeHistoryTest() throws ApiException, CryptoException { + public void getSmallLiabilityExchangeHistoryTest() + throws ApiException, CryptoException, IOException { Long current = 1L; Long size = 10L; Long startTime = 1623319461670L; @@ -317,29 +393,63 @@ public void getSmallLiabilityExchangeHistoryTest() throws ApiException, CryptoEx Request actualRequest = captorValue.request(); assertEquals( - "current=1&size=10&startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "current=1&size=10&startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "cf3665c6ad1ae7c4af54fc90d8cae844164449f5f850748c21373dd86013616b", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/margin/exchange-small-liability-history", actualRequest.url().encodedPath()); + } + + /** + * Liquidation Loan Repay (MARGIN) + * + *

Repays the outstanding cross-margin liquidation loan from the user's spot wallet. A + * liquidation loan represents the account deficit incurred when account equity turns negative + * during liquidation (bankruptcy). The repayment amount must be greater than 0 and cannot + * exceed the remaining loan balance. If the Spot Account has insufficient USDC balance, the + * repayment will fail. Weight(UID): 100 Security Type: MARGIN + * + * @throws ApiException if the Api call fails + */ + @Test + public void liquidationLoanRepayTest() throws ApiException, CryptoException, IOException { + LiquidationLoanRepayRequest liquidationLoanRepayRequest = new LiquidationLoanRepayRequest(); + liquidationLoanRepayRequest.asset("USDT"); + liquidationLoanRepayRequest.amount(300.00d); + + ApiResponse response = + api.liquidationLoanRepay(liquidationLoanRepayRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000amount=300&asset=USDT", signInputCaptor.getValue()); assertEquals( - "/sapi/v1/margin/exchange-small-liability-history", - actualRequest.url().encodedPath()); + "be0084a4d7e91219e6a5861bc3795375aafc9b972b31d68162d75127402a7305", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/margin/liquidation-loan/repay", actualRequest.url().encodedPath()); } /** * Margin Account Cancel all Open Orders on a Symbol (TRADE) * *

Cancels all active orders on a symbol for margin account.<br></br> This - * includes OCO orders. Weight: 1 + * includes OCO orders. Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test public void marginAccountCancelAllOpenOrdersOnASymbolTest() - throws ApiException, CryptoException { - String symbol = ""; - String isIsolated = "false"; + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + IsIsolated isIsolated = IsIsolated.TRUE; Long recvWindow = 5000L; ApiResponse response = api.marginAccountCancelAllOpenOrdersOnASymbol(symbol, isIsolated, recvWindow); @@ -355,26 +465,28 @@ public void marginAccountCancelAllOpenOrdersOnASymbolTest() Request actualRequest = captorValue.request(); assertEquals( - "symbol=&isIsolated=false&recvWindow=5000×tamp=1736393892000", + "symbol=BTCUSDT&isIsolated=TRUE&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "add65e05865fdd18a5031b8cd03b817c53044ab47bc775e023898c5f451f9fab", + "a9e5c495bc4c2b347c88d6dd2ae2e0734124518b2dc7ba8cf04757535cd454a8", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/margin/openOrders", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/margin/openOrders", + actualRequest.url().encodedPath()); } /** * Margin Account Cancel OCO (TRADE) * - *

Cancel an entire Order List for a margin account. * Canceling an individual leg will - * cancel the entire OCO Weight: 1(UID) + *

Cancel an entire Order List for a margin account. Weight(UID): 1 Security Type: TRADE + * Notes: - Canceling an individual leg will cancel the entire OCO * * @throws ApiException if the Api call fails */ @Test - public void marginAccountCancelOcoTest() throws ApiException, CryptoException { - String symbol = ""; - String isIsolated = "false"; + public void marginAccountCancelOcoTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + IsIsolated isIsolated = IsIsolated.TRUE; Long orderListId = 1L; String listClientOrderId = "1"; String newClientOrderId = "1"; @@ -398,11 +510,9 @@ public void marginAccountCancelOcoTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&isIsolated=TRUE&orderListId=1&listClientOrderId=1&newClientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&isIsolated=false&orderListId=1&listClientOrderId=1&newClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "b9b55143daefd9ab6b09b85bfeb910d085e7558d9dc486af9975f9815ca1f72a", + "8f0b0f39d4dda8b1fbf7b78f69780ae7dfe6e590961dd9b0d400344252821c89", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/orderList", actualRequest.url().encodedPath()); } @@ -410,15 +520,15 @@ public void marginAccountCancelOcoTest() throws ApiException, CryptoException { /** * Margin Account Cancel Order (TRADE) * - *

Cancel an active order for margin account. * Either orderId or origClientOrderId must be - * sent. Weight: 10(IP) + *

Cancel an active order for margin account. Weight(IP): 10 Security Type: TRADE Notes: - + * Either orderId or origClientOrderId must be sent. * * @throws ApiException if the Api call fails */ @Test - public void marginAccountCancelOrderTest() throws ApiException, CryptoException { - String symbol = ""; - String isIsolated = "false"; + public void marginAccountCancelOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "LTCBTC"; + IsIsolated isIsolated = IsIsolated.TRUE; Long orderId = 1L; String origClientOrderId = "1"; String newClientOrderId = "1"; @@ -442,11 +552,9 @@ public void marginAccountCancelOrderTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=LTCBTC&isIsolated=TRUE&orderId=1&origClientOrderId=1&newClientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&isIsolated=false&orderId=1&origClientOrderId=1&newClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "524eb7d8ebb73bd66897f739ec254947072e8149af95053fd246d59bc6cff1f3", + "9739ba02f6ebf14f5f01d2ef9de088033f241bc20c903dcd8147c8b20b2a479c", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/order", actualRequest.url().encodedPath()); } @@ -454,21 +562,21 @@ public void marginAccountCancelOrderTest() throws ApiException, CryptoException /** * Margin Account New OCO (TRADE) * - *

Send in a new OCO for a margin account * autoRepayAtCancel is suggested to set as “FALSE” - * to keep liability unrepaid under high frequent new order/cancel order execution Weight: - * 6(UID) + *

Send in a new OCO for a margin account Weight: 6(UID) or 1500(UID) when sideEffectType is + * MARGIN_BUY or AUTO_BORROW_REPAY Security Type: TRADE Notes: - autoRepayAtCancel is suggested + * to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order + * execution * * @throws ApiException if the Api call fails */ @Test - public void marginAccountNewOcoTest() throws ApiException, CryptoException { + public void marginAccountNewOcoTest() throws ApiException, CryptoException, IOException { MarginAccountNewOcoRequest marginAccountNewOcoRequest = new MarginAccountNewOcoRequest(); - - marginAccountNewOcoRequest.symbol(""); + marginAccountNewOcoRequest.symbol("LTCBTC"); marginAccountNewOcoRequest.side(Side.BUY); - marginAccountNewOcoRequest.quantity(1d); - marginAccountNewOcoRequest.price(1d); - marginAccountNewOcoRequest.stopPrice(1d); + marginAccountNewOcoRequest.quantity(1.0d); + marginAccountNewOcoRequest.price(1.0d); + marginAccountNewOcoRequest.stopPrice(1.0d); ApiResponse response = api.marginAccountNewOco(marginAccountNewOcoRequest); @@ -483,31 +591,29 @@ public void marginAccountNewOcoTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000symbol=LTCBTC&side=BUY&stopPrice=1&quantity=1&price=1&autoRepayAtCancel=true&isIsolated=FALSE", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000symbol=&side=BUY&stopPrice=1&quantity=1&price=1", - signInputCaptor.getValue()); - assertEquals( - "a44f38881c72baae22ef0ab8d4275a3dad363487848a7ea9ea3c7ba58a6ccdb9", - actualRequest.url().queryParameter("signature")); + "5778123f3f43ebc1f9647ee561ecd4e1784f03979a36a0f140304d70c387e04e", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/order/oco", actualRequest.url().encodedPath()); } /** * Margin Account New Order (TRADE) * - *

Post a new order for margin account. * autoRepayAtCancel is suggested to set as “FALSE” to - * keep liability unrepaid under high frequent new order/cancel order execution Weight: 6(UID) + *

Post a new order for margin account. Weight: 6(UID) or 1500(UID) when sideEffectType is + * MARGIN_BUY or AUTO_BORROW_REPAY Security Type: TRADE Notes: - autoRepayAtCancel is suggested + * to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order + * execution * * @throws ApiException if the Api call fails */ @Test - public void marginAccountNewOrderTest() throws ApiException, CryptoException { + public void marginAccountNewOrderTest() throws ApiException, CryptoException, IOException { MarginAccountNewOrderRequest marginAccountNewOrderRequest = new MarginAccountNewOrderRequest(); - - marginAccountNewOrderRequest.symbol(""); + marginAccountNewOrderRequest.symbol("BTCUSDT"); marginAccountNewOrderRequest.side(Side.BUY); - marginAccountNewOrderRequest.type(""); + marginAccountNewOrderRequest.type(OrderType.ROLL_IN); ApiResponse response = api.marginAccountNewOrder(marginAccountNewOrderRequest); @@ -522,9 +628,9 @@ public void marginAccountNewOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000symbol=&side=BUY&type=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&side=BUY&autoRepayAtCancel=true&isIsolated=FALSE&type=ROLL_IN", signInputCaptor.getValue()); assertEquals( - "fa7ddab4a660903f7305421c43e7705a88aa40d3039a17e6bf6ad242ec379289", + "9fea4d490515e66415334514c3d1e8b1d2aad4df84452386fac145306aa31be9", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/order", actualRequest.url().encodedPath()); } @@ -544,26 +650,38 @@ public void marginAccountNewOrderTest() throws ApiException, CryptoException { * order as `FILLED` but the pending order will still appear as * `PENDING_NEW`. You need to query the status of the pending order again to see its * updated status. - OTOs add **2 orders** to the unfilled order count, - * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. * - * autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high - * frequent new order/cancel order execution * Depending on the `pendingType` or - * `workingType`, some optional parameters will become mandatory: Weight: 6(UID) + * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight: + * 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: + * TRADE Notes: - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid + * under high frequent new order/cancel order execution - Depending on the + * `pendingType` or `workingType`, some optional - parameters will become + * mandatory: | Type | Additional mandatory parameters | Additional information | | + * -------------------------------------------------------- | + * ------------------------------------------------------------ | ---------------------- | | + * `workingType` = `LIMIT` | `workingTimeInForce` | | | + * `pendingType` = `LIMIT` | `pendingPrice`, + * `pendingTimeInForce` | | | `pendingType` = `STOP_LOSS` or + * `TAKE_PROFIT` | `pendingStopPrice` and/or + * `pendingTrailingDelta` | | | `pendingType` = + * `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT` | `pendingPrice`, + * `pendingStopPrice` and/or `pendingTrailingDelta`, + * `pendingTimeInForce` | | | `pendingTrailingDelta` is provided | + * `pendingPrice` | | * * @throws ApiException if the Api call fails */ @Test - public void marginAccountNewOtoTest() throws ApiException, CryptoException { + public void marginAccountNewOtoTest() throws ApiException, CryptoException, IOException { MarginAccountNewOtoRequest marginAccountNewOtoRequest = new MarginAccountNewOtoRequest(); - - marginAccountNewOtoRequest.symbol(""); - marginAccountNewOtoRequest.workingType(""); - marginAccountNewOtoRequest.workingSide(""); - marginAccountNewOtoRequest.workingPrice(1d); - marginAccountNewOtoRequest.workingQuantity(1d); - marginAccountNewOtoRequest.workingIcebergQty(1d); - marginAccountNewOtoRequest.pendingType("Order Types"); - marginAccountNewOtoRequest.pendingSide(""); - marginAccountNewOtoRequest.pendingQuantity(1d); + marginAccountNewOtoRequest.symbol("BTCUSDT"); + marginAccountNewOtoRequest.workingType(WorkingType.LIMIT); + marginAccountNewOtoRequest.workingSide(WorkingSide.BUY); + marginAccountNewOtoRequest.workingPrice(1.0d); + marginAccountNewOtoRequest.workingQuantity(1.0d); + marginAccountNewOtoRequest.workingIcebergQty(1.0d); + marginAccountNewOtoRequest.pendingType(PendingType.LIMIT); + marginAccountNewOtoRequest.pendingSide(PendingSide.BUY); + marginAccountNewOtoRequest.pendingQuantity(1.0d); ApiResponse response = api.marginAccountNewOto(marginAccountNewOtoRequest); @@ -578,12 +696,9 @@ public void marginAccountNewOtoTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&workingIcebergQty=1&workingQuantity=1&pendingSide=BUY&pendingQuantity=1&autoRepayAtCancel=true&isIsolated=FALSE&pendingType=LIMIT&workingSide=BUY&workingPrice=1&workingType=LIMIT", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000symbol=&workingIcebergQty=1&workingQuantity=1&pendingSide=&pendingQuantity=1&pendingType=Order%20Types&workingSide=&workingPrice=1&workingType=", - signInputCaptor.getValue()); - assertEquals( - "b3e064facb953c7bfe41bc98b73c1d1e77e572950f680288dcac3fb4abee16e0", - actualRequest.url().queryParameter("signature")); + "379233b57f601659c1aeae73fea08e66e2062d7efa58701f82b939a359559d2e", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/order/oto", actualRequest.url().encodedPath()); } @@ -597,28 +712,46 @@ public void marginAccountNewOtoTest() throws ApiException, CryptoException { * pending orders (pending above and pending below), forming an OCO pair. The pending orders are * only placed on the order book when the working order gets **fully filled**. - The rules of * the pending above and pending below follow the same rules as the [Order List - * OCO](https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OCO). - - * OTOCOs add **3 orders** against the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` - * filter, and `MAX_NUM_ORDERS` filter. * autoRepayAtCancel is suggested to set as - * “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution * - * Depending on the `pendingAboveType`/`pendingBelowType` or - * `workingType`, some optional parameters will become mandatory: Weight: 6(UID) + * OCO](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco). + * - OTOCOs add **3 orders** against the unfilled order count, + * `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter. Weight: + * 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: + * TRADE Notes: - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid + * under high frequent new order/cancel order execution - Depending on the + * `pendingAboveType`/`pendingBelowType` or `workingType`, some + * optional parameters will become mandatory: | Type | Additional mandatory parameters | + * Additional information | | ------------------------------------ | + * ------------------------------------------------------------ | ---------------------- | | + * `workingType` = `LIMIT` | `workingTimeInForce` | | | + * `pendingAboveType`= `LIMIT_MAKER` | `pendingAbovePrice` | + * | | `pendingAboveType`= `STOP_LOSS` | + * `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta` | | | + * `pendingAboveType`=`STOP_LOSS_LIMIT` | + * `pendingAbovePrice`, `pendingAboveStopPrice` and/or + * `pendingAboveTrailingDelta`, `pendingAboveTimeInForce` | | | + * `pendingBelowType`= `LIMIT_MAKER` | `pendingBelowPrice` | + * | | `pendingBelowType`= `STOP_LOSS` | + * `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta` | | | + * `pendingBelowType`=`STOP_LOSS_LIMIT` | + * `pendingBelowPrice`, `pendingBelowStopPrice` and/or + * `pendingBelowTrailingDelta`, `pendingBelowTimeInForce` | | | + * `pendingAboveTrailingDelta` is provided | `pendingAbovePrice` | | | + * `pendingBelowTrailingDelta` is provided | `pendingBelowPrice` | | * * @throws ApiException if the Api call fails */ @Test - public void marginAccountNewOtocoTest() throws ApiException, CryptoException { + public void marginAccountNewOtocoTest() throws ApiException, CryptoException, IOException { MarginAccountNewOtocoRequest marginAccountNewOtocoRequest = new MarginAccountNewOtocoRequest(); - - marginAccountNewOtocoRequest.symbol(""); - marginAccountNewOtocoRequest.workingType(""); - marginAccountNewOtocoRequest.workingSide(""); - marginAccountNewOtocoRequest.workingPrice(1d); - marginAccountNewOtocoRequest.workingQuantity(1d); - marginAccountNewOtocoRequest.pendingSide(""); - marginAccountNewOtocoRequest.pendingQuantity(1d); - marginAccountNewOtocoRequest.pendingAboveType(""); + marginAccountNewOtocoRequest.symbol("BTCUSDT"); + marginAccountNewOtocoRequest.workingType(WorkingType.LIMIT); + marginAccountNewOtocoRequest.workingSide(WorkingSide.BUY); + marginAccountNewOtocoRequest.workingPrice(1.0d); + marginAccountNewOtocoRequest.workingQuantity(1.0d); + marginAccountNewOtocoRequest.pendingSide(PendingSide.BUY); + marginAccountNewOtocoRequest.pendingQuantity(1.0d); + marginAccountNewOtocoRequest.pendingAboveType(PendingAboveType.LIMIT_MAKER); ApiResponse response = api.marginAccountNewOtoco(marginAccountNewOtocoRequest); @@ -633,29 +766,27 @@ public void marginAccountNewOtocoTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000symbol=BTCUSDT&workingQuantity=1&pendingSide=BUY&pendingQuantity=1&pendingAboveType=LIMIT_MAKER&autoRepayAtCancel=true&isIsolated=FALSE&workingSide=BUY&workingPrice=1&workingType=LIMIT", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000symbol=&workingQuantity=1&pendingSide=&pendingQuantity=1&pendingAboveType=&workingSide=&workingPrice=1&workingType=", - signInputCaptor.getValue()); - assertEquals( - "b59af59f8ffdb7c77917fb2e5103f247b6ec76aa2f533042bc1277beebf0c112", + "4a4535c84c91075ac62ed418061bd9b56bcdebfc2197cb5caa30b33d7d3ded4d", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/order/otoco", actualRequest.url().encodedPath()); } /** - * Margin Manual Liquidation(MARGIN) + * Margin Manual Liquidation (TRADE) * - *

Margin Manual Liquidation * This endpoint can support Cross Margin Classic Mode and Pro - * Mode. * And only support Isolated Margin for restricted region. Weight: 3000 + *

Margin Manual Liquidation Weight(UID): 3000 Security Type: TRADE Notes: - This endpoint + * supports Cross Margin Classic Mode and Pro Mode. - Isolated Margin is only supported in + * restricted regions. * * @throws ApiException if the Api call fails */ @Test - public void marginManualLiquidationTest() throws ApiException, CryptoException { + public void marginManualLiquidationTest() throws ApiException, CryptoException, IOException { MarginManualLiquidationRequest marginManualLiquidationRequest = new MarginManualLiquidationRequest(); - - marginManualLiquidationRequest.type(""); + marginManualLiquidationRequest.type(OrderType.ROLL_IN); ApiResponse response = api.marginManualLiquidation(marginManualLiquidationRequest); @@ -670,9 +801,9 @@ public void marginManualLiquidationTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000type=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000type=ROLL_IN", signInputCaptor.getValue()); assertEquals( - "c32d33d6407f8d47d4fd8e91fbc9fbacb0db2d899069618021e801a0cf447157", + "a04dc574a8036f72e99afb75473a5f85eaba56d15fed01f013334e6a6d771051", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/manual-liquidation", actualRequest.url().encodedPath()); } @@ -680,14 +811,16 @@ public void marginManualLiquidationTest() throws ApiException, CryptoException { /** * Query Current Margin Order Count Usage (TRADE) * - *

Displays the user's current margin order count usage for all intervals. Weight: 20(IP) + *

Displays the user's current margin order count usage for all intervals. Weight(IP): 20 + * Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void queryCurrentMarginOrderCountUsageTest() throws ApiException, CryptoException { - String isIsolated = "false"; - String symbol = ""; + public void queryCurrentMarginOrderCountUsageTest() + throws ApiException, CryptoException, IOException { + IsIsolated isIsolated = IsIsolated.TRUE; + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.queryCurrentMarginOrderCountUsage(isIsolated, symbol, recvWindow); @@ -703,30 +836,103 @@ public void queryCurrentMarginOrderCountUsageTest() throws ApiException, CryptoE Request actualRequest = captorValue.request(); assertEquals( - "isIsolated=false&symbol=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "isIsolated=TRUE&symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "4af886ac30fe924fc1b3a164db48b5dc0a90f78ef1bc9ccff06a9c29e6ea221c", + "c2079648a70b986c96d6fb791c8f35ee9f2e91f6ba62bac3dc20773166a2eb84", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/rateLimit/order", actualRequest.url().encodedPath()); } + /** + * Query Liquidation Loan (USER_DATA) + * + *

Query the current user's cross-margin liquidation loan information, including the + * original loan amount, repaid amount, and remaining amount. When a cross-margin account is + * liquidated and the account equity turns negative (bankruptcy), the system generates a + * liquidation loan record representing the deficit. This represents the shortfall amount + * denominated in USDC. Weight(UID): 100 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void queryLiquidationLoanTest() throws ApiException, CryptoException, IOException { + Long recvWindow = 5000L; + ApiResponse response = api.queryLiquidationLoan(recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/margin/liquidation-loan", actualRequest.url().encodedPath()); + } + + /** + * Query Liquidation Loan Repay History (USER_DATA) + * + *

Query the repayment history of cross-margin liquidation loans (deficit caused by + * bankruptcy during liquidation). Supports time-range filtering and pagination. Weight(UID): + * 100 Security Type: USER_DATA Notes: - The maximum query range is 90 days. If + * `startTime` is earlier than 90 days ago, it will be clamped to 90 days ago. - Only + * records with status `SUCCESS` or `PENDING` are returned. Failed repayment + * records are excluded. + * + * @throws ApiException if the Api call fails + */ + @Test + public void queryLiquidationLoanRepayHistoryTest() + throws ApiException, CryptoException, IOException { + Long startTime = 1714492800000L; + Long endTime = 1714579200000L; + Long current = 1L; + Long size = 50L; + Long recvWindow = 5000L; + ApiResponse response = + api.queryLiquidationLoanRepayHistory(startTime, endTime, current, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + "startTime=1714492800000&endTime=1714579200000¤t=1&size=50&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "ed9ec6f53e92748df5a9a00b893537f636ddd3edee89be38934854bf472f4493", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/margin/liquidation-loan/repay-history", actualRequest.url().encodedPath()); + } + /** * Query Margin Account's all OCO (USER_DATA) * *

Retrieves all OCO for a specific margin account based on provided optional parameters - * Weight: 200(IP) + * Weight(IP): 200 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryMarginAccountsAllOcoTest() throws ApiException, CryptoException { - String isIsolated = "false"; - String symbol = ""; + public void queryMarginAccountsAllOcoTest() throws ApiException, CryptoException, IOException { + IsIsolated isIsolated = IsIsolated.TRUE; + String symbol = "LTCBTC"; Long fromId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 500L; + Long limit = 100L; Long recvWindow = 5000L; ApiResponse response = api.queryMarginAccountsAllOco( @@ -742,11 +948,9 @@ public void queryMarginAccountsAllOcoTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("isIsolated=TRUE&symbol=LTCBTC&fromId=1&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "isIsolated=false&symbol=&fromId=1&startTime=1623319461670&endTime=1641782889000&limit=500&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "59e78917e0ee7b158e98245287910e232a5b54ff6cbdece62b598c580665a879", + "2f7e0754b63ddfe1a9d23b36fd007a6c6bef752b53897687f39571a6897efb95", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/allOrderList", actualRequest.url().encodedPath()); } @@ -754,21 +958,22 @@ public void queryMarginAccountsAllOcoTest() throws ApiException, CryptoException /** * Query Margin Account's All Orders (USER_DATA) * - *

Query Margin Account's All Orders * If orderId is set, it will get orders >= - * that orderId. Otherwise the orders within 24 hours are returned. * For some historical orders - * cummulativeQuoteQty will be < 0, meaning the data is not available at this time. * Less - * than 24 hours between startTime and endTime. Weight: 200(IP) + *

Query Margin Account's All Orders Weight(IP): 200 Security Type: USER_DATA Notes: - If + * orderId is set, it will get orders >= that orderId. Otherwise the orders within 24 + * hours are returned. - For some historical orders cummulativeQuoteQty will be < 0, meaning + * the data is not available at this time. - Less than 24 hours between startTime and endTime. * * @throws ApiException if the Api call fails */ @Test - public void queryMarginAccountsAllOrdersTest() throws ApiException, CryptoException { - String symbol = ""; - String isIsolated = "false"; + public void queryMarginAccountsAllOrdersTest() + throws ApiException, CryptoException, IOException { + String symbol = "BNBBTC"; + IsIsolated isIsolated = IsIsolated.TRUE; Long orderId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 500L; + Long limit = 100L; Long recvWindow = 5000L; ApiResponse response = api.queryMarginAccountsAllOrders( @@ -784,11 +989,9 @@ public void queryMarginAccountsAllOrdersTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BNBBTC&isIsolated=TRUE&orderId=1&startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&isIsolated=false&orderId=1&startTime=1623319461670&endTime=1641782889000&limit=500&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "b19144d8ecaee65d9a44334e0bff7233225b2e742455de322f7d6cee6585236d", + "c56160ca5934c0ab21347e3b4a82052c7b26dcbdc3c5ad9f7f06ba524fc4beeb", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/allOrders", actualRequest.url().encodedPath()); } @@ -796,14 +999,15 @@ public void queryMarginAccountsAllOrdersTest() throws ApiException, CryptoExcept /** * Query Margin Account's OCO (USER_DATA) * - *

Retrieves a specific OCO based on provided optional parameters Weight: 10(IP) + *

Retrieves a specific OCO based on provided optional parameters Weight(IP): 10 Security + * Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryMarginAccountsOcoTest() throws ApiException, CryptoException { - String isIsolated = "false"; - String symbol = ""; + public void queryMarginAccountsOcoTest() throws ApiException, CryptoException, IOException { + IsIsolated isIsolated = IsIsolated.TRUE; + String symbol = "LTCBTC"; Long orderListId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; @@ -821,11 +1025,9 @@ public void queryMarginAccountsOcoTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("isIsolated=TRUE&symbol=LTCBTC&orderListId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "isIsolated=false&symbol=&orderListId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "65c1de468d71a9069148cfd2ab6a625c99380dc889980ab0420d121b301b8a44", + "f184108814decd244cd7ccd90febab16d5dd997c67f31153073092a97876df0c", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/orderList", actualRequest.url().encodedPath()); } @@ -833,14 +1035,14 @@ public void queryMarginAccountsOcoTest() throws ApiException, CryptoException { /** * Query Margin Account's Open OCO (USER_DATA) * - *

Query Margin Account's Open OCO Weight: 10(IP) + *

Query Margin Account's Open OCO Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryMarginAccountsOpenOcoTest() throws ApiException, CryptoException { - String isIsolated = "false"; - String symbol = ""; + public void queryMarginAccountsOpenOcoTest() throws ApiException, CryptoException, IOException { + IsIsolated isIsolated = IsIsolated.TRUE; + String symbol = "LTCBTC"; Long recvWindow = 5000L; ApiResponse response = api.queryMarginAccountsOpenOco(isIsolated, symbol, recvWindow); @@ -855,11 +1057,9 @@ public void queryMarginAccountsOpenOcoTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("isIsolated=TRUE&symbol=LTCBTC&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "isIsolated=false&symbol=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "4af886ac30fe924fc1b3a164db48b5dc0a90f78ef1bc9ccff06a9c29e6ea221c", + "5921b2aaafab24e97440e1efda2ce30cca40a6853f6d455a55db14d4544d7329", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/openOrderList", actualRequest.url().encodedPath()); } @@ -867,17 +1067,19 @@ public void queryMarginAccountsOpenOcoTest() throws ApiException, CryptoExceptio /** * Query Margin Account's Open Orders (USER_DATA) * - *

Query Margin Account's Open Orders * If the symbol is not sent, orders for all symbols - * will be returned in an array. * When all symbols are returned, the number of requests counted - * against the rate limiter is equal to the number of symbols currently trading on the exchange. - * * If isIsolated =\"TRUE\", symbol must be sent. Weight: 10(IP) + *

Query Margin Account's Open Orders Weight(IP): 10 Security Type: USER_DATA Notes: - If + * the symbol is not sent, orders for all symbols will be returned in an array. - When all + * symbols are returned, the number of requests counted against the rate limiter is equal to the + * number of symbols currently trading on the exchange. - If isIsolated + * =\"TRUE\", symbol must be sent. * * @throws ApiException if the Api call fails */ @Test - public void queryMarginAccountsOpenOrdersTest() throws ApiException, CryptoException { - String symbol = ""; - String isIsolated = "false"; + public void queryMarginAccountsOpenOrdersTest() + throws ApiException, CryptoException, IOException { + String symbol = "BNBBTC"; + IsIsolated isIsolated = IsIsolated.TRUE; Long recvWindow = 5000L; ApiResponse response = api.queryMarginAccountsOpenOrders(symbol, isIsolated, recvWindow); @@ -892,11 +1094,9 @@ public void queryMarginAccountsOpenOrdersTest() throws ApiException, CryptoExcep Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BNBBTC&isIsolated=TRUE&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&isIsolated=false&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "add65e05865fdd18a5031b8cd03b817c53044ab47bc775e023898c5f451f9fab", + "25e5a5034a529c39ad62c9deb0a2934506ffbad48b159321a398d6fbe7a9c21e", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/openOrders", actualRequest.url().encodedPath()); } @@ -904,16 +1104,16 @@ public void queryMarginAccountsOpenOrdersTest() throws ApiException, CryptoExcep /** * Query Margin Account's Order (USER_DATA) * - *

Query Margin Account's Order * Either orderId or origClientOrderId must be sent. * For - * some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available - * at this time. Weight: 10(IP) + *

Query Margin Account's Order Weight(IP): 10 Security Type: USER_DATA Notes: - Either + * orderId or origClientOrderId must be sent. - For some historical orders cummulativeQuoteQty + * will be < 0, meaning the data is not available at this time. * * @throws ApiException if the Api call fails */ @Test - public void queryMarginAccountsOrderTest() throws ApiException, CryptoException { - String symbol = ""; - String isIsolated = "false"; + public void queryMarginAccountsOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "BNBBTC"; + IsIsolated isIsolated = IsIsolated.TRUE; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; @@ -931,11 +1131,9 @@ public void queryMarginAccountsOrderTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BNBBTC&isIsolated=TRUE&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&isIsolated=false&orderId=1&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "28c77d755a10d018e01fcdf7982e25569fd38c91bd89e0dea2a98c986cebd842", + "a4124527493265570bbb4209580ae65b79d96a9953c2032c68f13badaa7ecc52", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/order", actualRequest.url().encodedPath()); } @@ -943,16 +1141,17 @@ public void queryMarginAccountsOrderTest() throws ApiException, CryptoException /** * Query Margin Account's Trade List (USER_DATA) * - *

Query Margin Account's Trade List * If fromId is set, it will get trades >= - * that fromId. Otherwise the trades within 24 hours are returned. * Less than 24 hours between - * startTime and endTime. Weight: 10(IP) + *

Query Margin Account's Trade List Weight(IP): 10 Security Type: USER_DATA Notes: - If + * fromId is set, it will get trades >= that fromId. Otherwise the trades within 24 + * hours are returned. - Less than 24 hours between startTime and endTime. * * @throws ApiException if the Api call fails */ @Test - public void queryMarginAccountsTradeListTest() throws ApiException, CryptoException { - String symbol = ""; - String isIsolated = "false"; + public void queryMarginAccountsTradeListTest() + throws ApiException, CryptoException, IOException { + String symbol = "BNBBTC"; + IsIsolated isIsolated = IsIsolated.TRUE; Long orderId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; @@ -973,26 +1172,73 @@ public void queryMarginAccountsTradeListTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BNBBTC&isIsolated=TRUE&orderId=1&startTime=1623319461670&endTime=1641782889000&fromId=1&limit=500&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=&isIsolated=false&orderId=1&startTime=1623319461670&endTime=1641782889000&fromId=1&limit=500&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "54ee52c6763e418b1d66b1520323fe3d0b3ace00a4e5fe68bd2fa0513d8d93e7", + "1cc5e937fe111eaaf139627d15a765f371bd57aa895dca0499218ff9516e121c", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/myTrades", actualRequest.url().encodedPath()); } /** - * Query Special key(Low Latency Trading)(TRADE) + * Query Prevented Matches (USER_DATA) + * + *

Displays the list of orders that were expired due to STP. (Self-Trade Prevention). + * Weight(IP): 10 Security Type: USER_DATA Notes: - Supported parameter combinations: - + * `symbol` + `preventedMatchId` - `symbol` + `orderId` + * - `symbol` + `orderId` + `fromPreventedMatchId` - If + * `orderId` is provided, all prevented matches for that order will be returned. - If + * `preventedMatchId` is provided, the specific prevented match will be returned. - A + * single request returns a maximum of 500 records. If there are more than 500 records, use + * `symbol` + `orderId` + `fromPreventedMatchId` combination for + * pagination. + * + * @throws ApiException if the Api call fails + */ + @Test + public void queryPreventedMatchesTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long preventedMatchId = 1L; + Long orderId = 1L; + Long fromPreventedMatchId = 1L; + IsIsolated isIsolated = IsIsolated.TRUE; + Long recvWindow = 5000L; + ApiResponse response = + api.queryPreventedMatches( + symbol, + preventedMatchId, + orderId, + fromPreventedMatchId, + isIsolated, + recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("symbol=BTCUSDT&preventedMatchId=1&orderId=1&fromPreventedMatchId=1&isIsolated=TRUE&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "cc5323d524bd25462542e8f5dc8b4cb238570cd91e39c842a06c5cda27319588", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/margin/myPreventedMatches", actualRequest.url().encodedPath()); + } + + /** + * Query Special key(Low Latency Trading) (TRADE) * *

Query Special Key Information. This only applies to Special Key for Low Latency Trading. - * Weight: 1(UID) + * Weight(UID): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void querySpecialKeyTest() throws ApiException, CryptoException { - String symbol = ""; + public void querySpecialKeyTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.querySpecialKey(symbol, recvWindow); @@ -1006,23 +1252,23 @@ public void querySpecialKeyTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", - actualRequest.url().queryParameter("signature")); + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/apiKey", actualRequest.url().encodedPath()); } /** - * Query Special key List(Low Latency Trading)(TRADE) + * Query Special key List(Low Latency Trading) (TRADE) * - *

This only applies to Special Key for Low Latency Trading. Weight: 1(UID) + *

This only applies to Special Key for Low Latency Trading. Weight(UID): 1 Security Type: + * TRADE * * @throws ApiException if the Api call fails */ @Test - public void querySpecialKeyListTest() throws ApiException, CryptoException { - String symbol = ""; + public void querySpecialKeyListTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.querySpecialKeyList(symbol, recvWindow); @@ -1037,27 +1283,26 @@ public void querySpecialKeyListTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", - actualRequest.url().queryParameter("signature")); + "5e7e1313cde51a8386d885dd02bf6a7f4f4cd7f28dce6810d75c97af7836b3bb", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/api-key-list", actualRequest.url().encodedPath()); } /** * Small Liability Exchange (MARGIN) * - *

Small Liability Exchange * Only convert once within 6 hours * Only liability valuation - * less than 10 USDT are supported * The maximum number of coin is 10 Weight: 3000(UID) + *

Small Liability Exchange Weight(UID): 3000 Security Type: MARGIN Notes: - Only convert + * once within 6 hours - Only liability valuation less than 10 USDT are supported - The maximum + * number of coin is 10 * * @throws ApiException if the Api call fails */ @Test - public void smallLiabilityExchangeTest() throws ApiException, CryptoException { + public void smallLiabilityExchangeTest() throws ApiException, CryptoException, IOException { SmallLiabilityExchangeRequest smallLiabilityExchangeRequest = new SmallLiabilityExchangeRequest(); - - smallLiabilityExchangeRequest.assetNames(new AssetNames()); + smallLiabilityExchangeRequest.assetNames("BTC,ETH"); api.smallLiabilityExchange(smallLiabilityExchangeRequest); @@ -1070,9 +1315,9 @@ public void smallLiabilityExchangeTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000assetNames=%5B%5D", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000assetNames=BTC%2CETH", signInputCaptor.getValue()); assertEquals( - "ba2268aff20977513c2ec557cdf2b6721242a78d2f8bf2791821f1fecffd01e2", + "b3624d3b89e7717231e6ab1bbff1a13efe4528ca72df1ce313b73074b30a457a", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/exchange-small-liability", actualRequest.url().encodedPath()); } diff --git a/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/TransferApiTest.java b/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/TransferApiTest.java index f5d343faf..6a83b01d0 100644 --- a/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/TransferApiTest.java +++ b/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/TransferApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Margin Trading REST API - * OpenAPI Specification for the Binance Margin Trading REST API + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. * * The version of the OpenAPI document: 1.0.0 * @@ -24,8 +24,10 @@ import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; import com.binance.connector.client.margin_trading.rest.model.GetCrossMarginTransferHistoryResponse; +import com.binance.connector.client.margin_trading.rest.model.OrderType; import com.binance.connector.client.margin_trading.rest.model.QueryMaxTransferOutAmountResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -79,21 +81,22 @@ public void initApiClient() throws ApiException { /** * Get Cross Margin Transfer History (USER_DATA) * - *

Get Cross Margin Transfer History * Response in descending order * The max interval - * between `startTime` and `endTime` is 30 days. * Returns data for last 7 - * days by default Weight: 1(IP) + *

Get Cross Margin Transfer History Weight(IP): 1 Security Type: USER_DATA Notes: - Response + * in descending order - The max interval between `startTime` and `endTime` + * is 30 days. - Returns data for last 7 days by default * * @throws ApiException if the Api call fails */ @Test - public void getCrossMarginTransferHistoryTest() throws ApiException, CryptoException { - String asset = ""; - String type = ""; + public void getCrossMarginTransferHistoryTest() + throws ApiException, CryptoException, IOException { + String asset = "BNB"; + OrderType type = OrderType.ROLL_IN; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; Long size = 10L; - String isolatedSymbol = ""; + String isolatedSymbol = "BNBUSDT"; Long recvWindow = 5000L; ApiResponse response = api.getCrossMarginTransferHistory( @@ -109,11 +112,9 @@ public void getCrossMarginTransferHistoryTest() throws ApiException, CryptoExcep Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("asset=BNB&type=ROLL_IN&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&isolatedSymbol=BNBUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "asset=&type=&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&isolatedSymbol=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "55cbed364121f637934cbda6a1bed334c2b241707d51d426b5b67f890b978a77", + "7308f1696fe00aa0147f8256f878965e3c4ffaaff988d1eec793135fe43290b7", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/transfer", actualRequest.url().encodedPath()); } @@ -121,15 +122,15 @@ public void getCrossMarginTransferHistoryTest() throws ApiException, CryptoExcep /** * Query Max Transfer-Out Amount (USER_DATA) * - *

Query Max Transfer-Out Amount * If isolatedSymbol is not sent, crossed margin data will be - * sent. Weight: 50(IP) + *

Query Max Transfer-Out Amount Weight(IP): 50 Security Type: USER_DATA Notes: - If + * isolatedSymbol is not sent, crossed margin data will be sent. * * @throws ApiException if the Api call fails */ @Test - public void queryMaxTransferOutAmountTest() throws ApiException, CryptoException { - String asset = ""; - String isolatedSymbol = ""; + public void queryMaxTransferOutAmountTest() throws ApiException, CryptoException, IOException { + String asset = "BTC"; + String isolatedSymbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = api.queryMaxTransferOutAmount(asset, isolatedSymbol, recvWindow); @@ -144,11 +145,9 @@ public void queryMaxTransferOutAmountTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("asset=BTC&isolatedSymbol=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "asset=&isolatedSymbol=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "90c4a3668764b733f6c643c57f90568be4756aa70d3d7923c44995f762b25e21", + "ef15bb58e0af88d3e358c8e7b014798133d267e863c514921894375c6bd22336", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/margin/maxTransferable", actualRequest.url().encodedPath()); } diff --git a/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/UserDataStreamApiTest.java b/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/UserDataStreamApiTest.java new file mode 100644 index 000000000..d9a832d6f --- /dev/null +++ b/clients/margin-trading/src/test/java/com/binance/connector/client/margin_trading/rest/api/UserDataStreamApiTest.java @@ -0,0 +1,152 @@ +/* + * Margin REST API + * Access account information, borrow and repay assets, and trade with Binance Margin. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.margin_trading.rest.api; + +import static org.junit.Assert.assertEquals; + +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.auth.BinanceAuthenticationFactory; +import com.binance.connector.client.common.auth.SignatureAuthentication; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.common.sign.HmacSignatureGenerator; +import com.binance.connector.client.common.sign.SignatureGenerator; +import com.binance.connector.client.margin_trading.rest.model.KeepaliveUserDataStreamRequest; +import com.binance.connector.client.margin_trading.rest.model.StartUserDataStreamResponse; +import jakarta.validation.constraints.*; +import java.io.IOException; +import okhttp3.Call; +import okhttp3.Request; +import org.bouncycastle.crypto.CryptoException; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; + +/** API tests for UserDataStreamApi */ +public class UserDataStreamApiTest { + + private UserDataStreamApi api; + private ApiClient apiClientSpy; + private SignatureGenerator signatureGeneratorSpy; + + @BeforeEach + public void initApiClient() throws ApiException { + ClientConfiguration clientConfiguration = new ClientConfiguration(); + clientConfiguration.setUrl("http://localhost:8080"); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setSecretKey("secretKey"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + + HmacSignatureGenerator signatureGenerator = + new HmacSignatureGenerator(signatureConfiguration.getSecretKey()); + signatureGeneratorSpy = Mockito.spy(signatureGenerator); + SignatureAuthentication signatureAuthentication = + new SignatureAuthentication( + signatureConfiguration.getApiKey(), signatureGeneratorSpy); + SignatureAuthentication authenticationSpy = Mockito.spy(signatureAuthentication); + Mockito.doReturn("1736393892000").when(authenticationSpy).buildTimestamp(); + + BinanceAuthenticationFactory factoryMock = Mockito.mock(BinanceAuthenticationFactory.class); + Mockito.doReturn(authenticationSpy) + .when(factoryMock) + .getAuthentication(signatureConfiguration); + + ApiClient apiClient = new ApiClient(clientConfiguration, factoryMock); + + apiClientSpy = Mockito.spy(apiClient); + Mockito.doReturn(new ApiResponse<>(200, null)) + .when(apiClientSpy) + .execute(Mockito.any(), Mockito.any(java.lang.reflect.Type.class)); + Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); + Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); + + api = new UserDataStreamApi(apiClientSpy); + } + + /** + * Close User Data Stream (USER_STREAM) + * + *

Close out a user data stream. Weight(UID): 3000 Security Type: USER_STREAM + * + * @throws ApiException if the Api call fails + */ + @Test + public void closeUserDataStreamTest() throws ApiException, CryptoException, IOException { + api.closeUserDataStream(); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy).execute(callArgumentCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + null, actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/margin/listen-key", actualRequest.url().encodedPath()); + } + + /** + * Keepalive User Data Stream (USER_STREAM) + * + *

Keepalive a user data stream to prevent a time out. Weight(UID): 1 Security Type: + * USER_STREAM + * + * @throws ApiException if the Api call fails + */ + @Test + public void keepaliveUserDataStreamTest() throws ApiException, CryptoException, IOException { + KeepaliveUserDataStreamRequest keepaliveUserDataStreamRequest = + new KeepaliveUserDataStreamRequest(); + keepaliveUserDataStreamRequest.listenKey(""); + + api.keepaliveUserDataStream(keepaliveUserDataStreamRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy).execute(callArgumentCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + null, + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/margin/listen-key", actualRequest.url().encodedPath()); + } + + /** + * Start User Data Stream (USER_STREAM) + * + *

Start a new user data stream. Weight(UID): 1 Security Type: USER_STREAM + * + * @throws ApiException if the Api call fails + */ + @Test + public void startUserDataStreamTest() throws ApiException, CryptoException, IOException { + ApiResponse response = api.startUserDataStream(); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + null, actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/margin/listen-key", actualRequest.url().encodedPath()); + } +} diff --git a/clients/mining/CHANGELOG.md b/clients/mining/CHANGELOG.md index 631a0e257..23c48a765 100644 --- a/clients/mining/CHANGELOG.md +++ b/clients/mining/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 4.0.0 - 2026-07-29 + +### Changed (1) + +- Modified response for `statisticList()` (`GET /sapi/v1/mining/statistics/user/status`): + - `data`.`profitToday`: property `BSV` deleted + - `data`.`profitToday`: property `BTC` deleted + - `data`.`profitToday`: property `BCH` deleted + - `data`.`profitYesterday`: property `BCH` deleted + - `data`.`profitYesterday`: property `BSV` deleted + - `data`.`profitYesterday`: property `BTC` deleted + ## 3.0.1 - 2026-04-30 - Update `binance/common` module to version `2.4.2`. diff --git a/clients/mining/docs/AccountListResponseDataInner.md b/clients/mining/docs/AccountListResponseDataInner.md index 7f74a23b2..c0cf2522e 100644 --- a/clients/mining/docs/AccountListResponseDataInner.md +++ b/clients/mining/docs/AccountListResponseDataInner.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**type** | **String** | | [optional] | -|**userName** | **String** | | [optional] | +|**type** | **String** | Type of hashrate bucket | [optional] | +|**userName** | **String** | Mining account | [optional] | |**_list** | [**List<AccountListResponseDataInnerListInner>**](AccountListResponseDataInnerListInner.md) | | [optional] | diff --git a/clients/mining/docs/AccountListResponseDataInnerListInner.md b/clients/mining/docs/AccountListResponseDataInnerListInner.md index a6a1ad455..0ba239139 100644 --- a/clients/mining/docs/AccountListResponseDataInnerListInner.md +++ b/clients/mining/docs/AccountListResponseDataInnerListInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**time** | **Long** | | [optional] | -|**hashrate** | **String** | | [optional] | -|**reject** | **String** | | [optional] | +|**time** | **Long** | Time | [optional] | +|**hashrate** | **String** | Hashrate | [optional] | +|**reject** | **String** | Rejection rate | [optional] | diff --git a/clients/mining/docs/AcquiringAlgorithmResponseDataInner.md b/clients/mining/docs/AcquiringAlgorithmResponseDataInner.md index 421cc374d..0d34a4532 100644 --- a/clients/mining/docs/AcquiringAlgorithmResponseDataInner.md +++ b/clients/mining/docs/AcquiringAlgorithmResponseDataInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**algoName** | **String** | | [optional] | -|**algoId** | **Long** | | [optional] | -|**poolIndex** | **Long** | | [optional] | -|**unit** | **String** | | [optional] | +|**algoName** | **String** | Algorithm name | [optional] | +|**algoId** | **Long** | Algorithm ID | [optional] | +|**poolIndex** | **Long** | Sequence | [optional] | +|**unit** | **String** | Unit | [optional] | diff --git a/clients/mining/docs/AcquiringCoinnameResponse.md b/clients/mining/docs/AcquiringCoinNameResponse.md similarity index 100% rename from clients/mining/docs/AcquiringCoinnameResponse.md rename to clients/mining/docs/AcquiringCoinNameResponse.md diff --git a/clients/mining/docs/AcquiringCoinNameResponseDataInner.md b/clients/mining/docs/AcquiringCoinNameResponseDataInner.md new file mode 100644 index 000000000..f3b1792e1 --- /dev/null +++ b/clients/mining/docs/AcquiringCoinNameResponseDataInner.md @@ -0,0 +1,17 @@ + + +# AcquiringCoinnameResponseDataInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**coinName** | **String** | Currency name | [optional] | +|**coinId** | **Long** | ID | [optional] | +|**poolIndex** | **Long** | Sort | [optional] | +|**algoId** | **Long** | Algorithm | [optional] | +|**algoName** | **String** | Name of algorithm | [optional] | + + + diff --git a/clients/mining/docs/AcquiringCoinnameResponseDataInner.md b/clients/mining/docs/AcquiringCoinnameResponseDataInner.md deleted file mode 100644 index a0802b191..000000000 --- a/clients/mining/docs/AcquiringCoinnameResponseDataInner.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# AcquiringCoinnameResponseDataInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**coinName** | **String** | | [optional] | -|**coinId** | **Long** | | [optional] | -|**poolIndex** | **Long** | | [optional] | -|**algoId** | **Long** | | [optional] | -|**algoName** | **String** | | [optional] | - - - diff --git a/clients/mining/docs/CancelHashrateResaleConfigurationRequest.md b/clients/mining/docs/CancelHashrateResaleConfigurationRequest.md index b870362c7..35aed1742 100644 --- a/clients/mining/docs/CancelHashrateResaleConfigurationRequest.md +++ b/clients/mining/docs/CancelHashrateResaleConfigurationRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**configId** | **Long** | | | -|**userName** | **String** | | | -|**recvWindow** | **Long** | | [optional] | +|**configId** | **Long** | Mining ID | | +|**userName** | **String** | Mining Account | | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/mining/docs/DefaultApi.md b/clients/mining/docs/DefaultApi.md new file mode 100644 index 000000000..64115a603 --- /dev/null +++ b/clients/mining/docs/DefaultApi.md @@ -0,0 +1,893 @@ +# DefaultApi + +All URIs are relative to *https://api.binance.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**accountList**](DefaultApi.md#accountList) | **GET** /sapi/v1/mining/statistics/user/list | Account List (USER_DATA) | +| [**acquiringAlgorithm**](DefaultApi.md#acquiringAlgorithm) | **GET** /sapi/v1/mining/pub/algoList | Acquiring Algorithm (MARKET_DATA) | +| [**acquiringCoinname**](DefaultApi.md#acquiringCoinname) | **GET** /sapi/v1/mining/pub/coinList | Acquiring CoinName (MARKET_DATA) | +| [**cancelHashrateResaleConfiguration**](DefaultApi.md#cancelHashrateResaleConfiguration) | **POST** /sapi/v1/mining/hash-transfer/config/cancel | Cancel hashrate resale configuration (USER_DATA) | +| [**earningsList**](DefaultApi.md#earningsList) | **GET** /sapi/v1/mining/payment/list | Earnings List (USER_DATA) | +| [**extraBonusList**](DefaultApi.md#extraBonusList) | **GET** /sapi/v1/mining/payment/other | Extra Bonus List (USER_DATA) | +| [**hashrateResaleDetail**](DefaultApi.md#hashrateResaleDetail) | **GET** /sapi/v1/mining/hash-transfer/profit/details | Hashrate Resale Detail (USER_DATA) | +| [**hashrateResaleList**](DefaultApi.md#hashrateResaleList) | **GET** /sapi/v1/mining/hash-transfer/config/details/list | Hashrate Resale List (USER_DATA) | +| [**hashrateResaleRequest**](DefaultApi.md#hashrateResaleRequest) | **POST** /sapi/v1/mining/hash-transfer/config | Hashrate Resale Request (USER_DATA) | +| [**miningAccountEarning**](DefaultApi.md#miningAccountEarning) | **GET** /sapi/v1/mining/payment/uid | Mining Account Earning (USER_DATA) | +| [**requestForDetailMinerList**](DefaultApi.md#requestForDetailMinerList) | **GET** /sapi/v1/mining/worker/detail | Request for Detail Miner List (USER_DATA) | +| [**requestForMinerList**](DefaultApi.md#requestForMinerList) | **GET** /sapi/v1/mining/worker/list | Request for Miner List (USER_DATA) | +| [**statisticList**](DefaultApi.md#statisticList) | **GET** /sapi/v1/mining/statistics/user/status | Statistic List (USER_DATA) | + + + +# **accountList** +> AccountListResponse accountList(algo, userName, recvWindow) + +Account List (USER_DATA) + +Query Account List Weight(IP): 1 Security Type: USER_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.mining.ApiClient; +import com.binance.connector.client.mining.ApiException; +import com.binance.connector.client.mining.Configuration; +import com.binance.connector.client.mining.models.*; +import com.binance.connector.client.mining.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String algo = "sha256"; // String | Algorithm name. + String userName = "test"; // String | Mining account + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. + try { + AccountListResponse result = apiInstance.accountList(algo, userName, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#accountList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **algo** | **String**| Algorithm name. | | +| **userName** | **String**| Mining account | | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | + +### Return type + +[**AccountListResponse**](AccountListResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Account List | - | + + +# **acquiringAlgorithm** +> AcquiringAlgorithmResponse acquiringAlgorithm() + +Acquiring Algorithm (MARKET_DATA) + +Acquiring Algorithm Weight(IP): 1 Security Type: MARKET_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.mining.ApiClient; +import com.binance.connector.client.mining.ApiException; +import com.binance.connector.client.mining.Configuration; +import com.binance.connector.client.mining.models.*; +import com.binance.connector.client.mining.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + try { + AcquiringAlgorithmResponse result = apiInstance.acquiringAlgorithm(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#acquiringAlgorithm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AcquiringAlgorithmResponse**](AcquiringAlgorithmResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Acquiring Algorithm | - | + + +# **acquiringCoinname** +> AcquiringCoinnameResponse acquiringCoinname() + +Acquiring CoinName (MARKET_DATA) + +Acquiring CoinName Weight(IP): 1 Security Type: MARKET_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.mining.ApiClient; +import com.binance.connector.client.mining.ApiException; +import com.binance.connector.client.mining.Configuration; +import com.binance.connector.client.mining.models.*; +import com.binance.connector.client.mining.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + try { + AcquiringCoinnameResponse result = apiInstance.acquiringCoinname(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#acquiringCoinname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AcquiringCoinnameResponse**](AcquiringCoinnameResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Acquiring CoinName | - | + + +# **cancelHashrateResaleConfiguration** +> CancelHashrateResaleConfigurationResponse cancelHashrateResaleConfiguration(cancelHashrateResaleConfigurationRequest) + +Cancel hashrate resale configuration (USER_DATA) + +Cancel hashrate resale configuration Weight(IP): 1 Security Type: USER_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.mining.ApiClient; +import com.binance.connector.client.mining.ApiException; +import com.binance.connector.client.mining.Configuration; +import com.binance.connector.client.mining.models.*; +import com.binance.connector.client.mining.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + CancelHashrateResaleConfigurationRequest cancelHashrateResaleConfigurationRequest = new CancelHashrateResaleConfigurationRequest(); // CancelHashrateResaleConfigurationRequest | + try { + CancelHashrateResaleConfigurationResponse result = apiInstance.cancelHashrateResaleConfiguration(cancelHashrateResaleConfigurationRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#cancelHashrateResaleConfiguration"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **cancelHashrateResaleConfigurationRequest** | [**CancelHashrateResaleConfigurationRequest**](CancelHashrateResaleConfigurationRequest.md)| | | + +### Return type + +[**CancelHashrateResaleConfigurationResponse**](CancelHashrateResaleConfigurationResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Cancel hashrate resale configuration | - | + + +# **earningsList** +> EarningsListResponse earningsList(algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow) + +Earnings List (USER_DATA) + +Query Earnings List Weight(IP): 1 Security Type: USER_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.mining.ApiClient; +import com.binance.connector.client.mining.ApiException; +import com.binance.connector.client.mining.Configuration; +import com.binance.connector.client.mining.models.*; +import com.binance.connector.client.mining.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String algo = "sha256"; // String | Algorithm name. + String userName = "test"; // String | Mining account. + String coin = "BTC"; // String | Coin name + Long startDate = 1770736694138L; // Long | Search start time in milliseconds. + Long endDate = 1770736694138L; // Long | Search end time in milliseconds. + Long pageIndex = 1L; // Long | Page number, starting from 1. + Long pageSize = 10L; // Long | Number of rows per page. + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. + try { + EarningsListResponse result = apiInstance.earningsList(algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#earningsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **algo** | **String**| Algorithm name. | | +| **userName** | **String**| Mining account. | | +| **coin** | **String**| Coin name | [optional] | +| **startDate** | **Long**| Search start time in milliseconds. | [optional] | +| **endDate** | **Long**| Search end time in milliseconds. | [optional] | +| **pageIndex** | **Long**| Page number, starting from 1. | [optional] | +| **pageSize** | **Long**| Number of rows per page. | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | + +### Return type + +[**EarningsListResponse**](EarningsListResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Earnings List | - | + + +# **extraBonusList** +> ExtraBonusListResponse extraBonusList(algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow) + +Extra Bonus List (USER_DATA) + +Extra Bonus List Weight(IP): 1 Security Type: USER_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.mining.ApiClient; +import com.binance.connector.client.mining.ApiException; +import com.binance.connector.client.mining.Configuration; +import com.binance.connector.client.mining.models.*; +import com.binance.connector.client.mining.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String algo = "sha256"; // String | Transfer algorithm + String userName = "test"; // String | Mining account + String coin = "BTC"; // String | Coin name + Long startDate = 1770736694138L; // Long | Search start time in milliseconds. + Long endDate = 1770736694138L; // Long | Search end time in milliseconds. + Long pageIndex = 1L; // Long | Page number, starting from 1. + Long pageSize = 10L; // Long | Number of rows per page. + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. + try { + ExtraBonusListResponse result = apiInstance.extraBonusList(algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#extraBonusList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **algo** | **String**| Transfer algorithm | | +| **userName** | **String**| Mining account | | +| **coin** | **String**| Coin name | [optional] | +| **startDate** | **Long**| Search start time in milliseconds. | [optional] | +| **endDate** | **Long**| Search end time in milliseconds. | [optional] | +| **pageIndex** | **Long**| Page number, starting from 1. | [optional] | +| **pageSize** | **Long**| Number of rows per page. | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | + +### Return type + +[**ExtraBonusListResponse**](ExtraBonusListResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Extra Bonus List | - | + + +# **hashrateResaleDetail** +> HashrateResaleDetailResponse hashrateResaleDetail(configId, pageIndex, pageSize, recvWindow) + +Hashrate Resale Detail (USER_DATA) + +Hashrate Resale Detail(USER_DATA) Weight(IP): 1 Security Type: USER_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.mining.ApiClient; +import com.binance.connector.client.mining.ApiException; +import com.binance.connector.client.mining.Configuration; +import com.binance.connector.client.mining.models.*; +import com.binance.connector.client.mining.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + Long configId = 168L; // Long | Configuration ID. + Long pageIndex = 1L; // Long | Page number, starting from 1. + Long pageSize = 10L; // Long | Number of rows per page. + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. + try { + HashrateResaleDetailResponse result = apiInstance.hashrateResaleDetail(configId, pageIndex, pageSize, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#hashrateResaleDetail"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **configId** | **Long**| Configuration ID. | | +| **pageIndex** | **Long**| Page number, starting from 1. | [optional] | +| **pageSize** | **Long**| Number of rows per page. | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | + +### Return type + +[**HashrateResaleDetailResponse**](HashrateResaleDetailResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Hashrate Resale Detail | - | + + +# **hashrateResaleList** +> HashrateResaleListResponse hashrateResaleList(pageIndex, pageSize, recvWindow) + +Hashrate Resale List (USER_DATA) + +Hashrate Resale List Weight(IP): 1 Security Type: USER_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.mining.ApiClient; +import com.binance.connector.client.mining.ApiException; +import com.binance.connector.client.mining.Configuration; +import com.binance.connector.client.mining.models.*; +import com.binance.connector.client.mining.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + Long pageIndex = 1L; // Long | Page number, starting from 1. + Long pageSize = 10L; // Long | Number of rows per page. + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. + try { + HashrateResaleListResponse result = apiInstance.hashrateResaleList(pageIndex, pageSize, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#hashrateResaleList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pageIndex** | **Long**| Page number, starting from 1. | [optional] | +| **pageSize** | **Long**| Number of rows per page. | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | + +### Return type + +[**HashrateResaleListResponse**](HashrateResaleListResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Hashrate Resale List | - | + + +# **hashrateResaleRequest** +> HashrateResaleRequestResponse hashrateResaleRequest(hashrateResaleRequestRequest) + +Hashrate Resale Request (USER_DATA) + +Hashrate Resale Request Weight(IP): 1 Security Type: USER_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.mining.ApiClient; +import com.binance.connector.client.mining.ApiException; +import com.binance.connector.client.mining.Configuration; +import com.binance.connector.client.mining.models.*; +import com.binance.connector.client.mining.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + HashrateResaleRequestRequest hashrateResaleRequestRequest = new HashrateResaleRequestRequest(); // HashrateResaleRequestRequest | + try { + HashrateResaleRequestResponse result = apiInstance.hashrateResaleRequest(hashrateResaleRequestRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#hashrateResaleRequest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **hashrateResaleRequestRequest** | [**HashrateResaleRequestRequest**](HashrateResaleRequestRequest.md)| | | + +### Return type + +[**HashrateResaleRequestResponse**](HashrateResaleRequestResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Hashrate Resale Request | - | + + +# **miningAccountEarning** +> MiningAccountEarningResponse miningAccountEarning(algo, startDate, endDate, pageIndex, pageSize, recvWindow) + +Mining Account Earning (USER_DATA) + +Mining Account Earning Weight(IP): 1 Security Type: USER_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.mining.ApiClient; +import com.binance.connector.client.mining.ApiException; +import com.binance.connector.client.mining.Configuration; +import com.binance.connector.client.mining.models.*; +import com.binance.connector.client.mining.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String algo = "sha256"; // String | Algorithm + Long startDate = 1770736694138L; // Long | Millisecond timestamp + Long endDate = 1770736694138L; // Long | Millisecond timestamp + Long pageIndex = 1L; // Long | Page number, starting from 1. + Long pageSize = 10L; // Long | Number of rows per page. + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. + try { + MiningAccountEarningResponse result = apiInstance.miningAccountEarning(algo, startDate, endDate, pageIndex, pageSize, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#miningAccountEarning"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **algo** | **String**| Algorithm | | +| **startDate** | **Long**| Millisecond timestamp | [optional] | +| **endDate** | **Long**| Millisecond timestamp | [optional] | +| **pageIndex** | **Long**| Page number, starting from 1. | [optional] | +| **pageSize** | **Long**| Number of rows per page. | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | + +### Return type + +[**MiningAccountEarningResponse**](MiningAccountEarningResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Mining Account Earning | - | + + +# **requestForDetailMinerList** +> RequestForDetailMinerListResponse requestForDetailMinerList(algo, userName, workerName, recvWindow) + +Request for Detail Miner List (USER_DATA) + +Request for Detail Miner List Weight(IP): 1 Security Type: USER_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.mining.ApiClient; +import com.binance.connector.client.mining.ApiException; +import com.binance.connector.client.mining.Configuration; +import com.binance.connector.client.mining.models.*; +import com.binance.connector.client.mining.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String algo = "sha256"; // String | Algorithm + String userName = "test"; // String | Mining account + String workerName = "bhdc1.16A10404B"; // String | Miner name. + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. + try { + RequestForDetailMinerListResponse result = apiInstance.requestForDetailMinerList(algo, userName, workerName, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#requestForDetailMinerList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **algo** | **String**| Algorithm | | +| **userName** | **String**| Mining account | | +| **workerName** | **String**| Miner name. | | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | + +### Return type + +[**RequestForDetailMinerListResponse**](RequestForDetailMinerListResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Request for Detail Miner List | - | + + +# **requestForMinerList** +> RequestForMinerListResponse requestForMinerList(algo, userName, pageIndex, sort, sortColumn, workerStatus, recvWindow) + +Request for Miner List (USER_DATA) + +Request for Miner List Weight(IP): 1 Security Type: USER_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.mining.ApiClient; +import com.binance.connector.client.mining.ApiException; +import com.binance.connector.client.mining.Configuration; +import com.binance.connector.client.mining.models.*; +import com.binance.connector.client.mining.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String algo = "sha256"; // String | Algorithm + String userName = "test"; // String | Mining account + Long pageIndex = 1L; // Long | Page number, starting from 1. + Long sort = 0L; // Long | Sort order. 0 for ascending, 1 for descending. + Long sortColumn = 1L; // Long | Sort by: 1 miner name, 2 real-time hashrate, 3 daily average hashrate, 4 real-time rejection rate, 5 last submission time + Long workerStatus = 0L; // Long | Miner status. 0 all, 1 valid, 2 invalid, 3 failure. + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. + try { + RequestForMinerListResponse result = apiInstance.requestForMinerList(algo, userName, pageIndex, sort, sortColumn, workerStatus, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#requestForMinerList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **algo** | **String**| Algorithm | | +| **userName** | **String**| Mining account | | +| **pageIndex** | **Long**| Page number, starting from 1. | [optional] | +| **sort** | **Long**| Sort order. 0 for ascending, 1 for descending. | [optional] | +| **sortColumn** | **Long**| Sort by: 1 miner name, 2 real-time hashrate, 3 daily average hashrate, 4 real-time rejection rate, 5 last submission time | [optional] | +| **workerStatus** | **Long**| Miner status. 0 all, 1 valid, 2 invalid, 3 failure. | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | + +### Return type + +[**RequestForMinerListResponse**](RequestForMinerListResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Request for Miner List | - | + + +# **statisticList** +> StatisticListResponse statisticList(algo, userName, recvWindow) + +Statistic List (USER_DATA) + +Statistic List Weight(IP): 1 Security Type: USER_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.mining.ApiClient; +import com.binance.connector.client.mining.ApiException; +import com.binance.connector.client.mining.Configuration; +import com.binance.connector.client.mining.models.*; +import com.binance.connector.client.mining.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String algo = "sha256"; // String | Algorithm + String userName = "test"; // String | Mining account + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. + try { + StatisticListResponse result = apiInstance.statisticList(algo, userName, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#statisticList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **algo** | **String**| Algorithm | | +| **userName** | **String**| Mining account | | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | + +### Return type + +[**StatisticListResponse**](StatisticListResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Statistic List | - | + diff --git a/clients/mining/docs/EarningsListResponseData.md b/clients/mining/docs/EarningsListResponseData.md index 1f27ec580..36294c728 100644 --- a/clients/mining/docs/EarningsListResponseData.md +++ b/clients/mining/docs/EarningsListResponseData.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**accountProfits** | [**List<EarningsListResponseDataAccountProfitsInner>**](EarningsListResponseDataAccountProfitsInner.md) | | [optional] | -|**totalNum** | **Long** | | [optional] | -|**pageSize** | **Long** | | [optional] | +|**totalNum** | **Long** | Total rows | [optional] | +|**pageSize** | **Long** | Rows per page | [optional] | diff --git a/clients/mining/docs/EarningsListResponseDataAccountProfitsInner.md b/clients/mining/docs/EarningsListResponseDataAccountProfitsInner.md index 23d19352c..78df825c1 100644 --- a/clients/mining/docs/EarningsListResponseDataAccountProfitsInner.md +++ b/clients/mining/docs/EarningsListResponseDataAccountProfitsInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**time** | **Long** | | [optional] | -|**type** | **Long** | | [optional] | -|**hashTransfer** | **Long** | | [optional] | -|**transferAmount** | **Double** | | [optional] | -|**dayHashRate** | **Long** | | [optional] | -|**profitAmount** | **Double** | | [optional] | -|**coinName** | **String** | | [optional] | -|**status** | **Long** | | [optional] | +|**time** | **Long** | Mining date | [optional] | +|**type** | **Long** | 0: Mining Wallet, 5: Mining Address, 7: Pool Savings, 8: Transferred, 31: Income Transfer, 32: Hashrate Resale-Mining Wallet, 33: Hashrate Resale-Pool Savings | [optional] | +|**hashTransfer** | **Long** | Transferred hashrate | [optional] | +|**transferAmount** | **Double** | Transferred income | [optional] | +|**dayHashRate** | **Long** | Daily hashrate | [optional] | +|**profitAmount** | **Double** | Earnings amount | [optional] | +|**coinName** | **String** | Coin type | [optional] | +|**status** | **Long** | Status: 0 Unpaid, 1 Paying, 2 Paid | [optional] | diff --git a/clients/mining/docs/ExtraBonusListResponseData.md b/clients/mining/docs/ExtraBonusListResponseData.md index 063c997ff..0f5d4e0ed 100644 --- a/clients/mining/docs/ExtraBonusListResponseData.md +++ b/clients/mining/docs/ExtraBonusListResponseData.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**otherProfits** | [**List<ExtraBonusListResponseDataOtherProfitsInner>**](ExtraBonusListResponseDataOtherProfitsInner.md) | | [optional] | -|**totalNum** | **Long** | | [optional] | -|**pageSize** | **Long** | | [optional] | +|**totalNum** | **Long** | Total rows | [optional] | +|**pageSize** | **Long** | Rows per page | [optional] | diff --git a/clients/mining/docs/ExtraBonusListResponseDataOtherProfitsInner.md b/clients/mining/docs/ExtraBonusListResponseDataOtherProfitsInner.md index b07577751..bfb0a23c1 100644 --- a/clients/mining/docs/ExtraBonusListResponseDataOtherProfitsInner.md +++ b/clients/mining/docs/ExtraBonusListResponseDataOtherProfitsInner.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**time** | **Long** | | [optional] | -|**coinName** | **String** | | [optional] | -|**type** | **Long** | | [optional] | -|**profitAmount** | **Double** | | [optional] | -|**status** | **Long** | | [optional] | +|**time** | **Long** | Mining date | [optional] | +|**coinName** | **String** | Coin name | [optional] | +|**type** | **Long** | 1: Merged Mining, 2: Activity Bonus, 3: Rebate, 4: Smart Pool, 6: Income Transfer, 7: Pool Savings | [optional] | +|**profitAmount** | **Double** | Amount | [optional] | +|**status** | **Long** | Status: 0 Unpaid, 1 Paying, 2 Paid | [optional] | diff --git a/clients/mining/docs/HashrateResaleDetailResponseData.md b/clients/mining/docs/HashrateResaleDetailResponseData.md index 2996e9cf2..4c3f9182a 100644 --- a/clients/mining/docs/HashrateResaleDetailResponseData.md +++ b/clients/mining/docs/HashrateResaleDetailResponseData.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**profitTransferDetails** | [**List<HashrateResaleDetailResponseDataProfitTransferDetailsInner>**](HashrateResaleDetailResponseDataProfitTransferDetailsInner.md) | | [optional] | -|**totalNum** | **Long** | | [optional] | -|**pageSize** | **Long** | | [optional] | +|**totalNum** | **Long** | Total rows | [optional] | +|**pageSize** | **Long** | Rows per page | [optional] | diff --git a/clients/mining/docs/HashrateResaleDetailResponseDataProfitTransferDetailsInner.md b/clients/mining/docs/HashrateResaleDetailResponseDataProfitTransferDetailsInner.md index 723e9ff87..16b7d9ba2 100644 --- a/clients/mining/docs/HashrateResaleDetailResponseDataProfitTransferDetailsInner.md +++ b/clients/mining/docs/HashrateResaleDetailResponseDataProfitTransferDetailsInner.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**poolUsername** | **String** | | [optional] | -|**toPoolUsername** | **String** | | [optional] | -|**algoName** | **String** | | [optional] | -|**hashRate** | **Long** | | [optional] | -|**day** | **Long** | | [optional] | -|**amount** | **Double** | | [optional] | -|**coinName** | **String** | | [optional] | +|**poolUsername** | **String** | Transfer-out sub-account | [optional] | +|**toPoolUsername** | **String** | Transfer-in sub-account | [optional] | +|**algoName** | **String** | Transfer algorithm name | [optional] | +|**hashRate** | **Long** | Transferred hashrate | [optional] | +|**day** | **Long** | Transfer date | [optional] | +|**amount** | **Double** | Transferred income | [optional] | +|**coinName** | **String** | Income coin | [optional] | diff --git a/clients/mining/docs/HashrateResaleListResponseData.md b/clients/mining/docs/HashrateResaleListResponseData.md index 994bdd51f..5085fb98d 100644 --- a/clients/mining/docs/HashrateResaleListResponseData.md +++ b/clients/mining/docs/HashrateResaleListResponseData.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**configDetails** | [**List<HashrateResaleListResponseDataConfigDetailsInner>**](HashrateResaleListResponseDataConfigDetailsInner.md) | | [optional] | -|**totalNum** | **Long** | | [optional] | -|**pageSize** | **Long** | | [optional] | +|**totalNum** | **Long** | Total rows | [optional] | +|**pageSize** | **Long** | Rows per page | [optional] | diff --git a/clients/mining/docs/HashrateResaleListResponseDataConfigDetailsInner.md b/clients/mining/docs/HashrateResaleListResponseDataConfigDetailsInner.md index e24933a63..7df24655c 100644 --- a/clients/mining/docs/HashrateResaleListResponseDataConfigDetailsInner.md +++ b/clients/mining/docs/HashrateResaleListResponseDataConfigDetailsInner.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**configId** | **Long** | | [optional] | -|**poolUsername** | **String** | | [optional] | -|**toPoolUsername** | **String** | | [optional] | -|**algoName** | **String** | | [optional] | -|**hashRate** | **Long** | | [optional] | -|**startDay** | **Long** | | [optional] | -|**endDay** | **Long** | | [optional] | -|**status** | **Long** | | [optional] | -|**type** | **Long** | | [optional] | +|**configId** | **Long** | Configuration ID | [optional] | +|**poolUsername** | **String** | Transfer-out sub-account | [optional] | +|**toPoolUsername** | **String** | Transfer-in sub-account | [optional] | +|**algoName** | **String** | Transfer algorithm name | [optional] | +|**hashRate** | **Long** | Transferred hashrate | [optional] | +|**startDay** | **Long** | Start date | [optional] | +|**endDay** | **Long** | End date | [optional] | +|**status** | **Long** | Status: 0 Processing, 1 Cancelled, 2 Terminated | [optional] | +|**type** | **Long** | Type: 0 Hashrate transfer record, 1 Hashrate receive record | [optional] | diff --git a/clients/mining/docs/HashrateResaleRequestRequest.md b/clients/mining/docs/HashrateResaleRequestRequest.md index 1d1f2e1cf..5b5176068 100644 --- a/clients/mining/docs/HashrateResaleRequestRequest.md +++ b/clients/mining/docs/HashrateResaleRequestRequest.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**userName** | **String** | | | -|**algo** | **String** | | | -|**endDate** | **Long** | | | -|**startDate** | **Long** | | | -|**toPoolUser** | **String** | | | -|**hashRate** | **Long** | | | -|**recvWindow** | **Long** | | [optional] | +|**userName** | **String** | Mining Account | | +|**algo** | **String** | Transfer algorithm | | +|**endDate** | **Long** | Resale End Time (Millisecond timestamp) | | +|**startDate** | **Long** | Resale Start Time(Millisecond timestamp) | | +|**toPoolUser** | **String** | Mining Account | | +|**hashRate** | **Long** | Resale hashrate h/s must be transferred (BTC is greater than 500000000000 ETH is greater than 500000) | | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/mining/docs/HashrateResaleRequestResponse.md b/clients/mining/docs/HashrateResaleRequestResponse.md index fcde3ace6..d15c58512 100644 --- a/clients/mining/docs/HashrateResaleRequestResponse.md +++ b/clients/mining/docs/HashrateResaleRequestResponse.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**code** | **Long** | | [optional] | |**msg** | **String** | | [optional] | -|**data** | **Long** | | [optional] | +|**data** | **Long** | Configuration ID | [optional] | diff --git a/clients/mining/docs/MiningAccountEarningResponseData.md b/clients/mining/docs/MiningAccountEarningResponseData.md index 11c465cf0..4aee619a0 100644 --- a/clients/mining/docs/MiningAccountEarningResponseData.md +++ b/clients/mining/docs/MiningAccountEarningResponseData.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**accountProfits** | [**List<MiningAccountEarningResponseDataAccountProfitsInner>**](MiningAccountEarningResponseDataAccountProfitsInner.md) | | [optional] | -|**totalNum** | **Long** | | [optional] | -|**pageSize** | **Long** | | [optional] | +|**totalNum** | **Long** | Total records | [optional] | +|**pageSize** | **Long** | Rows per page | [optional] | diff --git a/clients/mining/docs/MiningAccountEarningResponseDataAccountProfitsInner.md b/clients/mining/docs/MiningAccountEarningResponseDataAccountProfitsInner.md index 43a05b960..1234c0f32 100644 --- a/clients/mining/docs/MiningAccountEarningResponseDataAccountProfitsInner.md +++ b/clients/mining/docs/MiningAccountEarningResponseDataAccountProfitsInner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**time** | **Long** | | [optional] | -|**coinName** | **String** | | [optional] | -|**type** | **Long** | | [optional] | -|**puid** | **Long** | | [optional] | -|**subName** | **String** | | [optional] | -|**amount** | **Double** | | [optional] | +|**time** | **Long** | Time | [optional] | +|**coinName** | **String** | Coin | [optional] | +|**type** | **Long** | 0: Referral, 1: Refund, 2: Rebate | [optional] | +|**puid** | **Long** | Mining sub-account ID | [optional] | +|**subName** | **String** | Mining account | [optional] | +|**amount** | **Double** | Amount | [optional] | diff --git a/clients/mining/docs/MiningApi.md b/clients/mining/docs/MiningApi.md deleted file mode 100644 index 00f72e5ad..000000000 --- a/clients/mining/docs/MiningApi.md +++ /dev/null @@ -1,893 +0,0 @@ -# MiningApi - -All URIs are relative to *https://api.binance.com* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**accountList**](MiningApi.md#accountList) | **GET** /sapi/v1/mining/statistics/user/list | Account List(USER_DATA) | -| [**acquiringAlgorithm**](MiningApi.md#acquiringAlgorithm) | **GET** /sapi/v1/mining/pub/algoList | Acquiring Algorithm(MARKET_DATA) | -| [**acquiringCoinname**](MiningApi.md#acquiringCoinname) | **GET** /sapi/v1/mining/pub/coinList | Acquiring CoinName(MARKET_DATA) | -| [**cancelHashrateResaleConfiguration**](MiningApi.md#cancelHashrateResaleConfiguration) | **POST** /sapi/v1/mining/hash-transfer/config/cancel | Cancel hashrate resale configuration(USER_DATA) | -| [**earningsList**](MiningApi.md#earningsList) | **GET** /sapi/v1/mining/payment/list | Earnings List(USER_DATA) | -| [**extraBonusList**](MiningApi.md#extraBonusList) | **GET** /sapi/v1/mining/payment/other | Extra Bonus List(USER_DATA) | -| [**hashrateResaleDetail**](MiningApi.md#hashrateResaleDetail) | **GET** /sapi/v1/mining/hash-transfer/profit/details | Hashrate Resale Detail(USER_DATA) | -| [**hashrateResaleList**](MiningApi.md#hashrateResaleList) | **GET** /sapi/v1/mining/hash-transfer/config/details/list | Hashrate Resale List | -| [**hashrateResaleRequest**](MiningApi.md#hashrateResaleRequest) | **POST** /sapi/v1/mining/hash-transfer/config | Hashrate Resale Request(USER_DATA) | -| [**miningAccountEarning**](MiningApi.md#miningAccountEarning) | **GET** /sapi/v1/mining/payment/uid | Mining Account Earning(USER_DATA) | -| [**requestForDetailMinerList**](MiningApi.md#requestForDetailMinerList) | **GET** /sapi/v1/mining/worker/detail | Request for Detail Miner List(USER_DATA) | -| [**requestForMinerList**](MiningApi.md#requestForMinerList) | **GET** /sapi/v1/mining/worker/list | Request for Miner List(USER_DATA) | -| [**statisticList**](MiningApi.md#statisticList) | **GET** /sapi/v1/mining/statistics/user/status | Statistic List(USER_DATA) | - - - -# **accountList** -> AccountListResponse accountList(algo, userName, recvWindow) - -Account List(USER_DATA) - -Query Account List Weight: 5 - -### Example -```java -// Import classes: -import com.binance.connector.client.mining.ApiClient; -import com.binance.connector.client.mining.ApiException; -import com.binance.connector.client.mining.Configuration; -import com.binance.connector.client.mining.models.*; -import com.binance.connector.client.mining.rest.api.MiningApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - MiningApi apiInstance = new MiningApi(defaultClient); - String algo = "algo_example"; // String | Algorithm(sha256) sha256 - String userName = "userName_example"; // String | Mining account test - Long recvWindow = 56L; // Long | - try { - AccountListResponse result = apiInstance.accountList(algo, userName, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MiningApi#accountList"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **algo** | **String**| Algorithm(sha256) sha256 | | -| **userName** | **String**| Mining account test | | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**AccountListResponse**](AccountListResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Account List | - | - - -# **acquiringAlgorithm** -> AcquiringAlgorithmResponse acquiringAlgorithm() - -Acquiring Algorithm(MARKET_DATA) - -Acquiring Algorithm Weight: 1 - -### Example -```java -// Import classes: -import com.binance.connector.client.mining.ApiClient; -import com.binance.connector.client.mining.ApiException; -import com.binance.connector.client.mining.Configuration; -import com.binance.connector.client.mining.models.*; -import com.binance.connector.client.mining.rest.api.MiningApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - MiningApi apiInstance = new MiningApi(defaultClient); - try { - AcquiringAlgorithmResponse result = apiInstance.acquiringAlgorithm(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MiningApi#acquiringAlgorithm"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**AcquiringAlgorithmResponse**](AcquiringAlgorithmResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Acquiring Algorithm | - | - - -# **acquiringCoinname** -> AcquiringCoinnameResponse acquiringCoinname() - -Acquiring CoinName(MARKET_DATA) - -Acquiring CoinName Weight: 1 - -### Example -```java -// Import classes: -import com.binance.connector.client.mining.ApiClient; -import com.binance.connector.client.mining.ApiException; -import com.binance.connector.client.mining.Configuration; -import com.binance.connector.client.mining.models.*; -import com.binance.connector.client.mining.rest.api.MiningApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - MiningApi apiInstance = new MiningApi(defaultClient); - try { - AcquiringCoinnameResponse result = apiInstance.acquiringCoinname(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MiningApi#acquiringCoinname"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**AcquiringCoinnameResponse**](AcquiringCoinnameResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Acquiring CoinName | - | - - -# **cancelHashrateResaleConfiguration** -> CancelHashrateResaleConfigurationResponse cancelHashrateResaleConfiguration(cancelHashrateResaleConfigurationRequest) - -Cancel hashrate resale configuration(USER_DATA) - - Weight: 5 - -### Example -```java -// Import classes: -import com.binance.connector.client.mining.ApiClient; -import com.binance.connector.client.mining.ApiException; -import com.binance.connector.client.mining.Configuration; -import com.binance.connector.client.mining.models.*; -import com.binance.connector.client.mining.rest.api.MiningApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - MiningApi apiInstance = new MiningApi(defaultClient); - CancelHashrateResaleConfigurationRequest cancelHashrateResaleConfigurationRequest = new CancelHashrateResaleConfigurationRequest(); // CancelHashrateResaleConfigurationRequest | - try { - CancelHashrateResaleConfigurationResponse result = apiInstance.cancelHashrateResaleConfiguration(cancelHashrateResaleConfigurationRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MiningApi#cancelHashrateResaleConfiguration"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **cancelHashrateResaleConfigurationRequest** | [**CancelHashrateResaleConfigurationRequest**](CancelHashrateResaleConfigurationRequest.md)| | | - -### Return type - -[**CancelHashrateResaleConfigurationResponse**](CancelHashrateResaleConfigurationResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Cancel hashrate resale configuration | - | - - -# **earningsList** -> EarningsListResponse earningsList(algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow) - -Earnings List(USER_DATA) - -Query Earnings List Weight: 5 - -### Example -```java -// Import classes: -import com.binance.connector.client.mining.ApiClient; -import com.binance.connector.client.mining.ApiException; -import com.binance.connector.client.mining.Configuration; -import com.binance.connector.client.mining.models.*; -import com.binance.connector.client.mining.rest.api.MiningApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - MiningApi apiInstance = new MiningApi(defaultClient); - String algo = "algo_example"; // String | Algorithm(sha256) sha256 - String userName = "userName_example"; // String | Mining account test - String coin = "coin_example"; // String | Coin Name - Long startDate = 56L; // Long | Millisecond timestamp - Long endDate = 56L; // Long | Millisecond timestamp - Long pageIndex = 56L; // Long | Page number, empty default first page, starting from 1 - Long pageSize = 56L; // Long | Min 10,Max 200 - Long recvWindow = 56L; // Long | - try { - EarningsListResponse result = apiInstance.earningsList(algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MiningApi#earningsList"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **algo** | **String**| Algorithm(sha256) sha256 | | -| **userName** | **String**| Mining account test | | -| **coin** | **String**| Coin Name | [optional] | -| **startDate** | **Long**| Millisecond timestamp | [optional] | -| **endDate** | **Long**| Millisecond timestamp | [optional] | -| **pageIndex** | **Long**| Page number, empty default first page, starting from 1 | [optional] | -| **pageSize** | **Long**| Min 10,Max 200 | [optional] | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**EarningsListResponse**](EarningsListResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Earnings List | - | - - -# **extraBonusList** -> ExtraBonusListResponse extraBonusList(algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow) - -Extra Bonus List(USER_DATA) - -Extra Bonus List Weight: 5 - -### Example -```java -// Import classes: -import com.binance.connector.client.mining.ApiClient; -import com.binance.connector.client.mining.ApiException; -import com.binance.connector.client.mining.Configuration; -import com.binance.connector.client.mining.models.*; -import com.binance.connector.client.mining.rest.api.MiningApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - MiningApi apiInstance = new MiningApi(defaultClient); - String algo = "algo_example"; // String | Algorithm(sha256) sha256 - String userName = "userName_example"; // String | Mining account test - String coin = "coin_example"; // String | Coin Name - Long startDate = 56L; // Long | Millisecond timestamp - Long endDate = 56L; // Long | Millisecond timestamp - Long pageIndex = 56L; // Long | Page number, empty default first page, starting from 1 - Long pageSize = 56L; // Long | Min 10,Max 200 - Long recvWindow = 56L; // Long | - try { - ExtraBonusListResponse result = apiInstance.extraBonusList(algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MiningApi#extraBonusList"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **algo** | **String**| Algorithm(sha256) sha256 | | -| **userName** | **String**| Mining account test | | -| **coin** | **String**| Coin Name | [optional] | -| **startDate** | **Long**| Millisecond timestamp | [optional] | -| **endDate** | **Long**| Millisecond timestamp | [optional] | -| **pageIndex** | **Long**| Page number, empty default first page, starting from 1 | [optional] | -| **pageSize** | **Long**| Min 10,Max 200 | [optional] | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**ExtraBonusListResponse**](ExtraBonusListResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Extra Bonus List | - | - - -# **hashrateResaleDetail** -> HashrateResaleDetailResponse hashrateResaleDetail(configId, pageIndex, pageSize, recvWindow) - -Hashrate Resale Detail(USER_DATA) - -Hashrate Resale Detail(USER_DATA) Weight: 5 - -### Example -```java -// Import classes: -import com.binance.connector.client.mining.ApiClient; -import com.binance.connector.client.mining.ApiException; -import com.binance.connector.client.mining.Configuration; -import com.binance.connector.client.mining.models.*; -import com.binance.connector.client.mining.rest.api.MiningApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - MiningApi apiInstance = new MiningApi(defaultClient); - Long configId = 56L; // Long | Mining ID 168 - Long pageIndex = 56L; // Long | Page number, empty default first page, starting from 1 - Long pageSize = 56L; // Long | Min 10,Max 200 - Long recvWindow = 56L; // Long | - try { - HashrateResaleDetailResponse result = apiInstance.hashrateResaleDetail(configId, pageIndex, pageSize, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MiningApi#hashrateResaleDetail"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **configId** | **Long**| Mining ID 168 | | -| **pageIndex** | **Long**| Page number, empty default first page, starting from 1 | [optional] | -| **pageSize** | **Long**| Min 10,Max 200 | [optional] | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**HashrateResaleDetailResponse**](HashrateResaleDetailResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Hashrate Resale Detail | - | - - -# **hashrateResaleList** -> HashrateResaleListResponse hashrateResaleList(pageIndex, pageSize, recvWindow) - -Hashrate Resale List - -Hashrate Resale List Weight: 5 - -### Example -```java -// Import classes: -import com.binance.connector.client.mining.ApiClient; -import com.binance.connector.client.mining.ApiException; -import com.binance.connector.client.mining.Configuration; -import com.binance.connector.client.mining.models.*; -import com.binance.connector.client.mining.rest.api.MiningApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - MiningApi apiInstance = new MiningApi(defaultClient); - Long pageIndex = 56L; // Long | Page number, empty default first page, starting from 1 - Long pageSize = 56L; // Long | Min 10,Max 200 - Long recvWindow = 56L; // Long | - try { - HashrateResaleListResponse result = apiInstance.hashrateResaleList(pageIndex, pageSize, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MiningApi#hashrateResaleList"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **pageIndex** | **Long**| Page number, empty default first page, starting from 1 | [optional] | -| **pageSize** | **Long**| Min 10,Max 200 | [optional] | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**HashrateResaleListResponse**](HashrateResaleListResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Hashrate Resale List | - | - - -# **hashrateResaleRequest** -> HashrateResaleRequestResponse hashrateResaleRequest(hashrateResaleRequestRequest) - -Hashrate Resale Request(USER_DATA) - -Hashrate Resale Request Weight: 5 - -### Example -```java -// Import classes: -import com.binance.connector.client.mining.ApiClient; -import com.binance.connector.client.mining.ApiException; -import com.binance.connector.client.mining.Configuration; -import com.binance.connector.client.mining.models.*; -import com.binance.connector.client.mining.rest.api.MiningApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - MiningApi apiInstance = new MiningApi(defaultClient); - HashrateResaleRequestRequest hashrateResaleRequestRequest = new HashrateResaleRequestRequest(); // HashrateResaleRequestRequest | - try { - HashrateResaleRequestResponse result = apiInstance.hashrateResaleRequest(hashrateResaleRequestRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MiningApi#hashrateResaleRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **hashrateResaleRequestRequest** | [**HashrateResaleRequestRequest**](HashrateResaleRequestRequest.md)| | | - -### Return type - -[**HashrateResaleRequestResponse**](HashrateResaleRequestResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Hashrate Resale Request | - | - - -# **miningAccountEarning** -> MiningAccountEarningResponse miningAccountEarning(algo, startDate, endDate, pageIndex, pageSize, recvWindow) - -Mining Account Earning(USER_DATA) - -Mining Account Earning Weight: 5 - -### Example -```java -// Import classes: -import com.binance.connector.client.mining.ApiClient; -import com.binance.connector.client.mining.ApiException; -import com.binance.connector.client.mining.Configuration; -import com.binance.connector.client.mining.models.*; -import com.binance.connector.client.mining.rest.api.MiningApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - MiningApi apiInstance = new MiningApi(defaultClient); - String algo = "algo_example"; // String | Algorithm(sha256) sha256 - Long startDate = 56L; // Long | Millisecond timestamp - Long endDate = 56L; // Long | Millisecond timestamp - Long pageIndex = 56L; // Long | Page number, empty default first page, starting from 1 - Long pageSize = 56L; // Long | Min 10,Max 200 - Long recvWindow = 56L; // Long | - try { - MiningAccountEarningResponse result = apiInstance.miningAccountEarning(algo, startDate, endDate, pageIndex, pageSize, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MiningApi#miningAccountEarning"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **algo** | **String**| Algorithm(sha256) sha256 | | -| **startDate** | **Long**| Millisecond timestamp | [optional] | -| **endDate** | **Long**| Millisecond timestamp | [optional] | -| **pageIndex** | **Long**| Page number, empty default first page, starting from 1 | [optional] | -| **pageSize** | **Long**| Min 10,Max 200 | [optional] | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**MiningAccountEarningResponse**](MiningAccountEarningResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Mining Account Earning | - | - - -# **requestForDetailMinerList** -> RequestForDetailMinerListResponse requestForDetailMinerList(algo, userName, workerName, recvWindow) - -Request for Detail Miner List(USER_DATA) - -Request for Detail Miner List Weight: 5 - -### Example -```java -// Import classes: -import com.binance.connector.client.mining.ApiClient; -import com.binance.connector.client.mining.ApiException; -import com.binance.connector.client.mining.Configuration; -import com.binance.connector.client.mining.models.*; -import com.binance.connector.client.mining.rest.api.MiningApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - MiningApi apiInstance = new MiningApi(defaultClient); - String algo = "algo_example"; // String | Algorithm(sha256) sha256 - String userName = "userName_example"; // String | Mining account test - String workerName = "workerName_example"; // String | Miner’s name(required) bhdc1.16A10404B - Long recvWindow = 56L; // Long | - try { - RequestForDetailMinerListResponse result = apiInstance.requestForDetailMinerList(algo, userName, workerName, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MiningApi#requestForDetailMinerList"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **algo** | **String**| Algorithm(sha256) sha256 | | -| **userName** | **String**| Mining account test | | -| **workerName** | **String**| Miner’s name(required) bhdc1.16A10404B | | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**RequestForDetailMinerListResponse**](RequestForDetailMinerListResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Request for Detail Miner List | - | - - -# **requestForMinerList** -> RequestForMinerListResponse requestForMinerList(algo, userName, pageIndex, sort, sortColumn, workerStatus, recvWindow) - -Request for Miner List(USER_DATA) - -Request for Miner List Weight: 5 - -### Example -```java -// Import classes: -import com.binance.connector.client.mining.ApiClient; -import com.binance.connector.client.mining.ApiException; -import com.binance.connector.client.mining.Configuration; -import com.binance.connector.client.mining.models.*; -import com.binance.connector.client.mining.rest.api.MiningApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - MiningApi apiInstance = new MiningApi(defaultClient); - String algo = "algo_example"; // String | Algorithm(sha256) sha256 - String userName = "userName_example"; // String | Mining account test - Long pageIndex = 56L; // Long | Page number, empty default first page, starting from 1 - Long sort = 56L; // Long | sort sequence(default=0)0 positive sequence,1 negative sequence - Long sortColumn = 56L; // Long | Sort by( default 1):

1: miner name,

2: real-time computing power,

3: daily average computing power,

4: real-time rejection rate,

5: last submission time - Long workerStatus = 56L; // Long | miners status(default=0),0 all,1 valid,2 invalid,3 failure - Long recvWindow = 56L; // Long | - try { - RequestForMinerListResponse result = apiInstance.requestForMinerList(algo, userName, pageIndex, sort, sortColumn, workerStatus, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MiningApi#requestForMinerList"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **algo** | **String**| Algorithm(sha256) sha256 | | -| **userName** | **String**| Mining account test | | -| **pageIndex** | **Long**| Page number, empty default first page, starting from 1 | [optional] | -| **sort** | **Long**| sort sequence(default=0)0 positive sequence,1 negative sequence | [optional] | -| **sortColumn** | **Long**| Sort by( default 1): <br></br>1: miner name, <br></br>2: real-time computing power, <br></br>3: daily average computing power, <br></br>4: real-time rejection rate, <br></br>5: last submission time | [optional] | -| **workerStatus** | **Long**| miners status(default=0),0 all,1 valid,2 invalid,3 failure | [optional] | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**RequestForMinerListResponse**](RequestForMinerListResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Request for Miner List | - | - - -# **statisticList** -> StatisticListResponse statisticList(algo, userName, recvWindow) - -Statistic List(USER_DATA) - -Statistic List Weight: 5 - -### Example -```java -// Import classes: -import com.binance.connector.client.mining.ApiClient; -import com.binance.connector.client.mining.ApiException; -import com.binance.connector.client.mining.Configuration; -import com.binance.connector.client.mining.models.*; -import com.binance.connector.client.mining.rest.api.MiningApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - MiningApi apiInstance = new MiningApi(defaultClient); - String algo = "algo_example"; // String | Algorithm(sha256) sha256 - String userName = "userName_example"; // String | Mining account test - Long recvWindow = 56L; // Long | - try { - StatisticListResponse result = apiInstance.statisticList(algo, userName, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MiningApi#statisticList"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **algo** | **String**| Algorithm(sha256) sha256 | | -| **userName** | **String**| Mining account test | | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**StatisticListResponse**](StatisticListResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Statistic List | - | - diff --git a/clients/mining/docs/RequestForDetailMinerListResponseDataInner.md b/clients/mining/docs/RequestForDetailMinerListResponseDataInner.md index dd3d91e99..6d993edf3 100644 --- a/clients/mining/docs/RequestForDetailMinerListResponseDataInner.md +++ b/clients/mining/docs/RequestForDetailMinerListResponseDataInner.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**workerName** | **String** | | [optional] | -|**type** | **String** | | [optional] | +|**workerName** | **String** | Mining account name | [optional] | +|**type** | **String** | Type of hashrate bucket | [optional] | |**hashrateDatas** | [**List<RequestForDetailMinerListResponseDataInnerHashrateDatasInner>**](RequestForDetailMinerListResponseDataInnerHashrateDatasInner.md) | | [optional] | diff --git a/clients/mining/docs/RequestForDetailMinerListResponseDataInnerHashrateDatasInner.md b/clients/mining/docs/RequestForDetailMinerListResponseDataInnerHashrateDatasInner.md index 6e021dd24..bb5900e36 100644 --- a/clients/mining/docs/RequestForDetailMinerListResponseDataInnerHashrateDatasInner.md +++ b/clients/mining/docs/RequestForDetailMinerListResponseDataInnerHashrateDatasInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**time** | **Long** | | [optional] | -|**hashrate** | **String** | | [optional] | -|**reject** | **Long** | | [optional] | +|**time** | **Long** | Time | [optional] | +|**hashrate** | **String** | Hashrate | [optional] | +|**reject** | **Long** | Rejection rate | [optional] | diff --git a/clients/mining/docs/RequestForMinerListResponseData.md b/clients/mining/docs/RequestForMinerListResponseData.md index b64dd9018..ffb9d515f 100644 --- a/clients/mining/docs/RequestForMinerListResponseData.md +++ b/clients/mining/docs/RequestForMinerListResponseData.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**workerDatas** | [**List<RequestForMinerListResponseDataWorkerDatasInner>**](RequestForMinerListResponseDataWorkerDatasInner.md) | | [optional] | -|**totalNum** | **Long** | | [optional] | -|**pageSize** | **Long** | | [optional] | +|**totalNum** | **Long** | Total amount | [optional] | +|**pageSize** | **Long** | Rows per page | [optional] | diff --git a/clients/mining/docs/RequestForMinerListResponseDataWorkerDatasInner.md b/clients/mining/docs/RequestForMinerListResponseDataWorkerDatasInner.md index 6762b78df..5d69551d6 100644 --- a/clients/mining/docs/RequestForMinerListResponseDataWorkerDatasInner.md +++ b/clients/mining/docs/RequestForMinerListResponseDataWorkerDatasInner.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**workerId** | **String** | | [optional] | -|**workerName** | **String** | | [optional] | -|**status** | **Long** | | [optional] | -|**hashRate** | **Long** | | [optional] | -|**dayHashRate** | **Double** | | [optional] | -|**rejectRate** | **Long** | | [optional] | -|**lastShareTime** | **Long** | | [optional] | +|**workerId** | **String** | Miner ID | [optional] | +|**workerName** | **String** | Miner name | [optional] | +|**status** | **Long** | Status: 1 Valid, 2 Invalid, 3 No longer valid | [optional] | +|**hashRate** | **Long** | Real-time rate | [optional] | +|**dayHashRate** | **Double** | 24H hashrate | [optional] | +|**rejectRate** | **Long** | Real-time rejection rate | [optional] | +|**lastShareTime** | **Long** | Last share time | [optional] | diff --git a/clients/mining/docs/StatisticListResponseData.md b/clients/mining/docs/StatisticListResponseData.md index 19d792350..2b8a7fbf3 100644 --- a/clients/mining/docs/StatisticListResponseData.md +++ b/clients/mining/docs/StatisticListResponseData.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**fifteenMinHashRate** | **String** | | [optional] | -|**dayHashRate** | **String** | | [optional] | -|**validNum** | **Long** | | [optional] | -|**invalidNum** | **Long** | | [optional] | -|**profitToday** | [**StatisticListResponseDataProfitToday**](StatisticListResponseDataProfitToday.md) | | [optional] | -|**profitYesterday** | [**StatisticListResponseDataProfitToday**](StatisticListResponseDataProfitToday.md) | | [optional] | -|**userName** | **String** | | [optional] | -|**unit** | **String** | | [optional] | -|**algo** | **String** | | [optional] | +|**fifteenMinHashRate** | **String** | 15-minute hashrate | [optional] | +|**dayHashRate** | **String** | 24H hashrate | [optional] | +|**validNum** | **Long** | Effective quantity | [optional] | +|**invalidNum** | **Long** | Invalid quantity | [optional] | +|**profitToday** | **Map<String, String>** | Today's estimate. Keys are coin symbols (e.g. BTC, BSV, BCH), values are earning amounts as strings. | [optional] | +|**profitYesterday** | **Map<String, String>** | Yesterday's earnings. Keys are coin symbols (e.g. BTC, BSV, BCH), values are earning amounts as strings. | [optional] | +|**userName** | **String** | Mining account | [optional] | +|**unit** | **String** | Unit | [optional] | +|**algo** | **String** | Algorithm | [optional] | diff --git a/clients/mining/docs/StatisticListResponseDataProfitToday.md b/clients/mining/docs/StatisticListResponseDataProfitToday.md deleted file mode 100644 index d221bc88a..000000000 --- a/clients/mining/docs/StatisticListResponseDataProfitToday.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# StatisticListResponseDataProfitToday - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**BTC** | **String** | | [optional] | -|**BSV** | **String** | | [optional] | -|**BCH** | **String** | | [optional] | - - - diff --git a/clients/mining/docs/rest-api/migration-guide.md b/clients/mining/docs/rest-api/migration-guide.md index 56bd96e78..7d3d766b1 100644 --- a/clients/mining/docs/rest-api/migration-guide.md +++ b/clients/mining/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-mining - 3.0.0 + 4.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-mining - 3.0.0 + 4.0.0 ``` diff --git a/clients/mining/example_rest.md b/clients/mining/example_rest.md index 8ee382718..1fdece422 100644 --- a/clients/mining/example_rest.md +++ b/clients/mining/example_rest.md @@ -1,28 +1,28 @@ -## Mining +## Default -[GET /sapi/v1/mining/statistics/user/list](https://developers.binance.com/docs/mining/rest-api/Account-List) - accountList - [AccountListExample.java:46](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/AccountListExample.java#L46) +[GET /sapi/v1/mining/statistics/user/list](https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#account-list) - accountList - [AccountListExample.java:35](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/AccountListExample.java#L35) -[GET /sapi/v1/mining/pub/algoList](https://developers.binance.com/docs/mining/rest-api/Acquiring-Algorithm) - acquiringAlgorithm - [AcquiringAlgorithmExample.java:46](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/AcquiringAlgorithmExample.java#L46) +[GET /sapi/v1/mining/pub/algoList](https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#acquiring-algorithm) - acquiringAlgorithm - [AcquiringAlgorithmExample.java:35](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/AcquiringAlgorithmExample.java#L35) -[GET /sapi/v1/mining/pub/coinList](https://developers.binance.com/docs/mining/rest-api/Acquiring-CoinName) - acquiringCoinname - [AcquiringCoinnameExample.java:46](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/AcquiringCoinnameExample.java#L46) +[GET /sapi/v1/mining/pub/coinList](https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#acquiring-coinname) - acquiringCoinname - [AcquiringCoinnameExample.java:35](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/AcquiringCoinnameExample.java#L35) -[POST /sapi/v1/mining/hash-transfer/config/cancel](https://developers.binance.com/docs/mining/rest-api/Cancel-hashrate-resale-configuration) - cancelHashrateResaleConfiguration - [CancelHashrateResaleConfigurationExample.java:47](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/CancelHashrateResaleConfigurationExample.java#L47) +[POST /sapi/v1/mining/hash-transfer/config/cancel](https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#cancel-hashrate-resale-configuration) - cancelHashrateResaleConfiguration - [CancelHashrateResaleConfigurationExample.java:36](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/CancelHashrateResaleConfigurationExample.java#L36) -[GET /sapi/v1/mining/payment/list](https://developers.binance.com/docs/mining/rest-api/Earnings-List) - earningsList - [EarningsListExample.java:46](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/EarningsListExample.java#L46) +[GET /sapi/v1/mining/payment/list](https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#earnings-list) - earningsList - [EarningsListExample.java:35](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/EarningsListExample.java#L35) -[GET /sapi/v1/mining/payment/other](https://developers.binance.com/docs/mining/rest-api/Extra-Bonus-List) - extraBonusList - [ExtraBonusListExample.java:46](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/ExtraBonusListExample.java#L46) +[GET /sapi/v1/mining/payment/other](https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#extra-bonus-list) - extraBonusList - [ExtraBonusListExample.java:35](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/ExtraBonusListExample.java#L35) -[GET /sapi/v1/mining/hash-transfer/profit/details](https://developers.binance.com/docs/mining/rest-api/Hashrate-Resale-Detail) - hashrateResaleDetail - [HashrateResaleDetailExample.java:46](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/HashrateResaleDetailExample.java#L46) +[GET /sapi/v1/mining/hash-transfer/profit/details](https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#hashrate-resale-detail) - hashrateResaleDetail - [HashrateResaleDetailExample.java:35](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/HashrateResaleDetailExample.java#L35) -[GET /sapi/v1/mining/hash-transfer/config/details/list](https://developers.binance.com/docs/mining/rest-api/Hashrate-Resale-List) - hashrateResaleList - [HashrateResaleListExample.java:46](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/HashrateResaleListExample.java#L46) +[GET /sapi/v1/mining/hash-transfer/config/details/list](https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#hashrate-resale-list) - hashrateResaleList - [HashrateResaleListExample.java:35](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/HashrateResaleListExample.java#L35) -[POST /sapi/v1/mining/hash-transfer/config](https://developers.binance.com/docs/mining/rest-api/Hashrate-Resale-Request) - hashrateResaleRequest - [HashrateResaleRequestExample.java:47](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/HashrateResaleRequestExample.java#L47) +[POST /sapi/v1/mining/hash-transfer/config](https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#hashrate-resale-request) - hashrateResaleRequest - [HashrateResaleRequestExample.java:36](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/HashrateResaleRequestExample.java#L36) -[GET /sapi/v1/mining/payment/uid](https://developers.binance.com/docs/mining/rest-api/Mining-Account-Earning) - miningAccountEarning - [MiningAccountEarningExample.java:46](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/MiningAccountEarningExample.java#L46) +[GET /sapi/v1/mining/payment/uid](https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#mining-account-earning) - miningAccountEarning - [MiningAccountEarningExample.java:35](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/MiningAccountEarningExample.java#L35) -[GET /sapi/v1/mining/worker/detail](https://developers.binance.com/docs/mining/rest-api/Request-for-Detail-Miner-List) - requestForDetailMinerList - [RequestForDetailMinerListExample.java:46](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/RequestForDetailMinerListExample.java#L46) +[GET /sapi/v1/mining/worker/detail](https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#request-for-detail-miner-list) - requestForDetailMinerList - [RequestForDetailMinerListExample.java:35](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/RequestForDetailMinerListExample.java#L35) -[GET /sapi/v1/mining/worker/list](https://developers.binance.com/docs/mining/rest-api/Request-for-Miner-List) - requestForMinerList - [RequestForMinerListExample.java:46](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/RequestForMinerListExample.java#L46) +[GET /sapi/v1/mining/worker/list](https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#request-for-miner-list) - requestForMinerList - [RequestForMinerListExample.java:35](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/RequestForMinerListExample.java#L35) -[GET /sapi/v1/mining/statistics/user/status](https://developers.binance.com/docs/mining/rest-api/Statistic-List) - statisticList - [StatisticListExample.java:46](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/StatisticListExample.java#L46) +[GET /sapi/v1/mining/statistics/user/status](https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#statistic-list) - statisticList - [StatisticListExample.java:35](/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/StatisticListExample.java#L35) diff --git a/clients/mining/pom.xml b/clients/mining/pom.xml index cfb7aef3e..a844dfa9b 100644 --- a/clients/mining/pom.xml +++ b/clients/mining/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-mining mining - 3.0.1 + 4.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/JSON.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/JSON.java index 3409db4f3..01e8dbffe 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/JSON.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -215,9 +215,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.mining.rest.model.StatisticListResponseData .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.mining.rest.model - .StatisticListResponseDataProfitToday.CustomTypeAdapterFactory()); gson = gsonBuilder.create(); } diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/api/DefaultApi.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/api/DefaultApi.java new file mode 100644 index 000000000..fc485099d --- /dev/null +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/api/DefaultApi.java @@ -0,0 +1,2281 @@ +/* + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.mining.rest.api; + +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.Pair; +import com.binance.connector.client.common.SystemUtil; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.exception.ConstraintViolationException; +import com.binance.connector.client.mining.rest.model.AccountListResponse; +import com.binance.connector.client.mining.rest.model.AcquiringAlgorithmResponse; +import com.binance.connector.client.mining.rest.model.AcquiringCoinnameResponse; +import com.binance.connector.client.mining.rest.model.CancelHashrateResaleConfigurationRequest; +import com.binance.connector.client.mining.rest.model.CancelHashrateResaleConfigurationResponse; +import com.binance.connector.client.mining.rest.model.EarningsListResponse; +import com.binance.connector.client.mining.rest.model.ExtraBonusListResponse; +import com.binance.connector.client.mining.rest.model.HashrateResaleDetailResponse; +import com.binance.connector.client.mining.rest.model.HashrateResaleListResponse; +import com.binance.connector.client.mining.rest.model.HashrateResaleRequestRequest; +import com.binance.connector.client.mining.rest.model.HashrateResaleRequestResponse; +import com.binance.connector.client.mining.rest.model.MiningAccountEarningResponse; +import com.binance.connector.client.mining.rest.model.RequestForDetailMinerListResponse; +import com.binance.connector.client.mining.rest.model.RequestForMinerListResponse; +import com.binance.connector.client.mining.rest.model.StatisticListResponse; +import com.google.gson.reflect.TypeToken; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Valid; +import jakarta.validation.Validation; +import jakarta.validation.Validator; +import jakarta.validation.constraints.*; +import jakarta.validation.executable.ExecutableValidator; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; + +public class DefaultApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + private static final String USER_AGENT = + String.format( + "binance-mining/4.0.0 (Java/%s; %s; %s)", + SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); + private static final boolean HAS_TIME_UNIT = false; + + public DefaultApi(ClientConfiguration clientConfiguration) { + this(new ApiClient(clientConfiguration)); + } + + public DefaultApi(ApiClient apiClient) { + apiClient.setUserAgent(USER_AGENT); + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for accountList + * + * @param algo Algorithm name. (required) + * @param userName Mining account (required) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Account List -
+ * + * @see Account + * List (USER_DATA) Documentation + */ + private okhttp3.Call accountListCall(String algo, String userName, Long recvWindow) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/mining/statistics/user/list"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (algo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("algo", algo)); + } + + if (userName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userName", userName)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call accountListValidateBeforeCall( + String algo, String userName, Long recvWindow) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {algo, userName, recvWindow}; + Method method = + this.getClass() + .getMethod("accountList", String.class, String.class, Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return accountListCall(algo, userName, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Account List (USER_DATA) Query Account List Weight(IP): 1 Security Type: USER_DATA + * + * @param algo Algorithm name. (required) + * @param userName Mining account (required) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return ApiResponse<AccountListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Account List -
+ * + * @see Account + * List (USER_DATA) Documentation + */ + public ApiResponse accountList( + @NotNull String algo, @NotNull String userName, @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = accountListValidateBeforeCall(algo, userName, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for acquiringAlgorithm + * + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Acquiring Algorithm -
+ * + * @see Acquiring + * Algorithm (MARKET_DATA) Documentation + */ + private okhttp3.Call acquiringAlgorithmCall() throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/mining/pub/algoList"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call acquiringAlgorithmValidateBeforeCall() throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {}; + Method method = this.getClass().getMethod("acquiringAlgorithm"); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return acquiringAlgorithmCall(); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Acquiring Algorithm (MARKET_DATA) Acquiring Algorithm Weight(IP): 1 Security Type: + * MARKET_DATA + * + * @return ApiResponse<AcquiringAlgorithmResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Acquiring Algorithm -
+ * + * @see Acquiring + * Algorithm (MARKET_DATA) Documentation + */ + public ApiResponse acquiringAlgorithm() throws ApiException { + okhttp3.Call localVarCall = acquiringAlgorithmValidateBeforeCall(); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for acquiringCoinname + * + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Acquiring CoinName -
+ * + * @see Acquiring + * CoinName (MARKET_DATA) Documentation + */ + private okhttp3.Call acquiringCoinnameCall() throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/mining/pub/coinList"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call acquiringCoinnameValidateBeforeCall() throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {}; + Method method = this.getClass().getMethod("acquiringCoinname"); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return acquiringCoinnameCall(); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Acquiring CoinName (MARKET_DATA) Acquiring CoinName Weight(IP): 1 Security Type: MARKET_DATA + * + * @return ApiResponse<AcquiringCoinnameResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Acquiring CoinName -
+ * + * @see Acquiring + * CoinName (MARKET_DATA) Documentation + */ + public ApiResponse acquiringCoinname() throws ApiException { + okhttp3.Call localVarCall = acquiringCoinnameValidateBeforeCall(); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for cancelHashrateResaleConfiguration + * + * @param cancelHashrateResaleConfigurationRequest (required) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cancel hashrate resale configuration -
+ * + * @see Cancel + * hashrate resale configuration (USER_DATA) Documentation + */ + private okhttp3.Call cancelHashrateResaleConfigurationCall( + CancelHashrateResaleConfigurationRequest cancelHashrateResaleConfigurationRequest) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/mining/hash-transfer/config/cancel"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (cancelHashrateResaleConfigurationRequest.getConfigId() != null) { + localVarFormParams.put( + "configId", cancelHashrateResaleConfigurationRequest.getConfigId()); + } + + if (cancelHashrateResaleConfigurationRequest.getUserName() != null) { + localVarFormParams.put( + "userName", cancelHashrateResaleConfigurationRequest.getUserName()); + } + + if (cancelHashrateResaleConfigurationRequest.getRecvWindow() != null) { + localVarFormParams.put( + "recvWindow", cancelHashrateResaleConfigurationRequest.getRecvWindow()); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call cancelHashrateResaleConfigurationValidateBeforeCall( + CancelHashrateResaleConfigurationRequest cancelHashrateResaleConfigurationRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {cancelHashrateResaleConfigurationRequest}; + Method method = + this.getClass() + .getMethod( + "cancelHashrateResaleConfiguration", + CancelHashrateResaleConfigurationRequest.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return cancelHashrateResaleConfigurationCall( + cancelHashrateResaleConfigurationRequest); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Cancel hashrate resale configuration (USER_DATA) Cancel hashrate resale configuration + * Weight(IP): 1 Security Type: USER_DATA + * + * @param cancelHashrateResaleConfigurationRequest (required) + * @return ApiResponse<CancelHashrateResaleConfigurationResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cancel hashrate resale configuration -
+ * + * @see Cancel + * hashrate resale configuration (USER_DATA) Documentation + */ + public ApiResponse cancelHashrateResaleConfiguration( + @Valid @NotNull + CancelHashrateResaleConfigurationRequest + cancelHashrateResaleConfigurationRequest) + throws ApiException { + okhttp3.Call localVarCall = + cancelHashrateResaleConfigurationValidateBeforeCall( + cancelHashrateResaleConfigurationRequest); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for earningsList + * + * @param algo Algorithm name. (required) + * @param userName Mining account. (required) + * @param coin Coin name (optional) + * @param startDate Search start time in milliseconds. (optional) + * @param endDate Search end time in milliseconds. (optional) + * @param pageIndex Page number, starting from 1. (optional) + * @param pageSize Number of rows per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Earnings List -
+ * + * @see Earnings + * List (USER_DATA) Documentation + */ + private okhttp3.Call earningsListCall( + String algo, + String userName, + String coin, + Long startDate, + Long endDate, + Long pageIndex, + Long pageSize, + Long recvWindow) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/mining/payment/list"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (algo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("algo", algo)); + } + + if (userName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userName", userName)); + } + + if (coin != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("coin", coin)); + } + + if (startDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("startDate", startDate)); + } + + if (endDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endDate", endDate)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call earningsListValidateBeforeCall( + String algo, + String userName, + String coin, + Long startDate, + Long endDate, + Long pageIndex, + Long pageSize, + Long recvWindow) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = { + algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow + }; + Method method = + this.getClass() + .getMethod( + "earningsList", + String.class, + String.class, + String.class, + Long.class, + Long.class, + Long.class, + Long.class, + Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return earningsListCall( + algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Earnings List (USER_DATA) Query Earnings List Weight(IP): 1 Security Type: USER_DATA + * + * @param algo Algorithm name. (required) + * @param userName Mining account. (required) + * @param coin Coin name (optional) + * @param startDate Search start time in milliseconds. (optional) + * @param endDate Search end time in milliseconds. (optional) + * @param pageIndex Page number, starting from 1. (optional) + * @param pageSize Number of rows per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return ApiResponse<EarningsListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Earnings List -
+ * + * @see Earnings + * List (USER_DATA) Documentation + */ + public ApiResponse earningsList( + @NotNull String algo, + @NotNull String userName, + String coin, + Long startDate, + Long endDate, + Long pageIndex, + @Min(10L) @Max(200L) Long pageSize, + @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = + earningsListValidateBeforeCall( + algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for extraBonusList + * + * @param algo Transfer algorithm (required) + * @param userName Mining account (required) + * @param coin Coin name (optional) + * @param startDate Search start time in milliseconds. (optional) + * @param endDate Search end time in milliseconds. (optional) + * @param pageIndex Page number, starting from 1. (optional) + * @param pageSize Number of rows per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Extra Bonus List -
+ * + * @see Extra + * Bonus List (USER_DATA) Documentation + */ + private okhttp3.Call extraBonusListCall( + String algo, + String userName, + String coin, + Long startDate, + Long endDate, + Long pageIndex, + Long pageSize, + Long recvWindow) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/mining/payment/other"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (algo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("algo", algo)); + } + + if (userName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userName", userName)); + } + + if (coin != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("coin", coin)); + } + + if (startDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("startDate", startDate)); + } + + if (endDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endDate", endDate)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call extraBonusListValidateBeforeCall( + String algo, + String userName, + String coin, + Long startDate, + Long endDate, + Long pageIndex, + Long pageSize, + Long recvWindow) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = { + algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow + }; + Method method = + this.getClass() + .getMethod( + "extraBonusList", + String.class, + String.class, + String.class, + Long.class, + Long.class, + Long.class, + Long.class, + Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return extraBonusListCall( + algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Extra Bonus List (USER_DATA) Extra Bonus List Weight(IP): 1 Security Type: USER_DATA + * + * @param algo Transfer algorithm (required) + * @param userName Mining account (required) + * @param coin Coin name (optional) + * @param startDate Search start time in milliseconds. (optional) + * @param endDate Search end time in milliseconds. (optional) + * @param pageIndex Page number, starting from 1. (optional) + * @param pageSize Number of rows per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return ApiResponse<ExtraBonusListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Extra Bonus List -
+ * + * @see Extra + * Bonus List (USER_DATA) Documentation + */ + public ApiResponse extraBonusList( + @NotNull String algo, + @NotNull String userName, + String coin, + Long startDate, + Long endDate, + Long pageIndex, + @Min(10L) @Max(200L) Long pageSize, + @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = + extraBonusListValidateBeforeCall( + algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for hashrateResaleDetail + * + * @param configId Configuration ID. (required) + * @param pageIndex Page number, starting from 1. (optional) + * @param pageSize Number of rows per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Hashrate Resale Detail -
+ * + * @see Hashrate + * Resale Detail (USER_DATA) Documentation + */ + private okhttp3.Call hashrateResaleDetailCall( + Long configId, Long pageIndex, Long pageSize, Long recvWindow) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/mining/hash-transfer/profit/details"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (configId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("configId", configId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call hashrateResaleDetailValidateBeforeCall( + Long configId, Long pageIndex, Long pageSize, Long recvWindow) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {configId, pageIndex, pageSize, recvWindow}; + Method method = + this.getClass() + .getMethod( + "hashrateResaleDetail", + Long.class, + Long.class, + Long.class, + Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return hashrateResaleDetailCall(configId, pageIndex, pageSize, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Hashrate Resale Detail (USER_DATA) Hashrate Resale Detail(USER_DATA) Weight(IP): 1 Security + * Type: USER_DATA + * + * @param configId Configuration ID. (required) + * @param pageIndex Page number, starting from 1. (optional) + * @param pageSize Number of rows per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return ApiResponse<HashrateResaleDetailResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Hashrate Resale Detail -
+ * + * @see Hashrate + * Resale Detail (USER_DATA) Documentation + */ + public ApiResponse hashrateResaleDetail( + @NotNull Long configId, + Long pageIndex, + @Min(10L) @Max(200L) Long pageSize, + @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = + hashrateResaleDetailValidateBeforeCall(configId, pageIndex, pageSize, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for hashrateResaleList + * + * @param pageIndex Page number, starting from 1. (optional) + * @param pageSize Number of rows per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Hashrate Resale List -
+ * + * @see Hashrate + * Resale List (USER_DATA) Documentation + */ + private okhttp3.Call hashrateResaleListCall(Long pageIndex, Long pageSize, Long recvWindow) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/mining/hash-transfer/config/details/list"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call hashrateResaleListValidateBeforeCall( + Long pageIndex, Long pageSize, Long recvWindow) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {pageIndex, pageSize, recvWindow}; + Method method = + this.getClass() + .getMethod("hashrateResaleList", Long.class, Long.class, Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return hashrateResaleListCall(pageIndex, pageSize, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Hashrate Resale List (USER_DATA) Hashrate Resale List Weight(IP): 1 Security Type: USER_DATA + * + * @param pageIndex Page number, starting from 1. (optional) + * @param pageSize Number of rows per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return ApiResponse<HashrateResaleListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Hashrate Resale List -
+ * + * @see Hashrate + * Resale List (USER_DATA) Documentation + */ + public ApiResponse hashrateResaleList( + Long pageIndex, @Min(10L) @Max(200L) Long pageSize, @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = + hashrateResaleListValidateBeforeCall(pageIndex, pageSize, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for hashrateResaleRequest + * + * @param hashrateResaleRequestRequest (required) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Hashrate Resale Request -
+ * + * @see Hashrate + * Resale Request (USER_DATA) Documentation + */ + private okhttp3.Call hashrateResaleRequestCall( + HashrateResaleRequestRequest hashrateResaleRequestRequest) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/mining/hash-transfer/config"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (hashrateResaleRequestRequest.getUserName() != null) { + localVarFormParams.put("userName", hashrateResaleRequestRequest.getUserName()); + } + + if (hashrateResaleRequestRequest.getAlgo() != null) { + localVarFormParams.put("algo", hashrateResaleRequestRequest.getAlgo()); + } + + if (hashrateResaleRequestRequest.getEndDate() != null) { + localVarFormParams.put("endDate", hashrateResaleRequestRequest.getEndDate()); + } + + if (hashrateResaleRequestRequest.getStartDate() != null) { + localVarFormParams.put("startDate", hashrateResaleRequestRequest.getStartDate()); + } + + if (hashrateResaleRequestRequest.getToPoolUser() != null) { + localVarFormParams.put("toPoolUser", hashrateResaleRequestRequest.getToPoolUser()); + } + + if (hashrateResaleRequestRequest.getHashRate() != null) { + localVarFormParams.put("hashRate", hashrateResaleRequestRequest.getHashRate()); + } + + if (hashrateResaleRequestRequest.getRecvWindow() != null) { + localVarFormParams.put("recvWindow", hashrateResaleRequestRequest.getRecvWindow()); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call hashrateResaleRequestValidateBeforeCall( + HashrateResaleRequestRequest hashrateResaleRequestRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {hashrateResaleRequestRequest}; + Method method = + this.getClass() + .getMethod("hashrateResaleRequest", HashrateResaleRequestRequest.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return hashrateResaleRequestCall(hashrateResaleRequestRequest); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Hashrate Resale Request (USER_DATA) Hashrate Resale Request Weight(IP): 1 Security Type: + * USER_DATA + * + * @param hashrateResaleRequestRequest (required) + * @return ApiResponse<HashrateResaleRequestResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Hashrate Resale Request -
+ * + * @see Hashrate + * Resale Request (USER_DATA) Documentation + */ + public ApiResponse hashrateResaleRequest( + @Valid @NotNull HashrateResaleRequestRequest hashrateResaleRequestRequest) + throws ApiException { + okhttp3.Call localVarCall = + hashrateResaleRequestValidateBeforeCall(hashrateResaleRequestRequest); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for miningAccountEarning + * + * @param algo Algorithm (required) + * @param startDate Millisecond timestamp (optional) + * @param endDate Millisecond timestamp (optional) + * @param pageIndex Page number, starting from 1. (optional) + * @param pageSize Number of rows per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Mining Account Earning -
+ * + * @see Mining + * Account Earning (USER_DATA) Documentation + */ + private okhttp3.Call miningAccountEarningCall( + String algo, + Long startDate, + Long endDate, + Long pageIndex, + Long pageSize, + Long recvWindow) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/mining/payment/uid"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (algo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("algo", algo)); + } + + if (startDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("startDate", startDate)); + } + + if (endDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endDate", endDate)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call miningAccountEarningValidateBeforeCall( + String algo, + Long startDate, + Long endDate, + Long pageIndex, + Long pageSize, + Long recvWindow) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {algo, startDate, endDate, pageIndex, pageSize, recvWindow}; + Method method = + this.getClass() + .getMethod( + "miningAccountEarning", + String.class, + Long.class, + Long.class, + Long.class, + Long.class, + Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return miningAccountEarningCall( + algo, startDate, endDate, pageIndex, pageSize, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Mining Account Earning (USER_DATA) Mining Account Earning Weight(IP): 1 Security Type: + * USER_DATA + * + * @param algo Algorithm (required) + * @param startDate Millisecond timestamp (optional) + * @param endDate Millisecond timestamp (optional) + * @param pageIndex Page number, starting from 1. (optional) + * @param pageSize Number of rows per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return ApiResponse<MiningAccountEarningResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Mining Account Earning -
+ * + * @see Mining + * Account Earning (USER_DATA) Documentation + */ + public ApiResponse miningAccountEarning( + @NotNull String algo, + Long startDate, + Long endDate, + Long pageIndex, + @Min(10L) @Max(200L) Long pageSize, + @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = + miningAccountEarningValidateBeforeCall( + algo, startDate, endDate, pageIndex, pageSize, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for requestForDetailMinerList + * + * @param algo Algorithm (required) + * @param userName Mining account (required) + * @param workerName Miner name. (required) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Request for Detail Miner List -
+ * + * @see Request + * for Detail Miner List (USER_DATA) Documentation + */ + private okhttp3.Call requestForDetailMinerListCall( + String algo, String userName, String workerName, Long recvWindow) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/mining/worker/detail"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (algo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("algo", algo)); + } + + if (userName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userName", userName)); + } + + if (workerName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("workerName", workerName)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call requestForDetailMinerListValidateBeforeCall( + String algo, String userName, String workerName, Long recvWindow) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {algo, userName, workerName, recvWindow}; + Method method = + this.getClass() + .getMethod( + "requestForDetailMinerList", + String.class, + String.class, + String.class, + Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return requestForDetailMinerListCall(algo, userName, workerName, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Request for Detail Miner List (USER_DATA) Request for Detail Miner List Weight(IP): 1 + * Security Type: USER_DATA + * + * @param algo Algorithm (required) + * @param userName Mining account (required) + * @param workerName Miner name. (required) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return ApiResponse<RequestForDetailMinerListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Request for Detail Miner List -
+ * + * @see Request + * for Detail Miner List (USER_DATA) Documentation + */ + public ApiResponse requestForDetailMinerList( + @NotNull String algo, + @NotNull String userName, + @NotNull String workerName, + @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = + requestForDetailMinerListValidateBeforeCall(algo, userName, workerName, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for requestForMinerList + * + * @param algo Algorithm (required) + * @param userName Mining account (required) + * @param pageIndex Page number, starting from 1. (optional) + * @param sort Sort order. 0 for ascending, 1 for descending. (optional) + * @param sortColumn Sort by: 1 miner name, 2 real-time hashrate, 3 daily average hashrate, 4 + * real-time rejection rate, 5 last submission time (optional) + * @param workerStatus Miner status. 0 all, 1 valid, 2 invalid, 3 failure. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Request for Miner List -
+ * + * @see Request + * for Miner List (USER_DATA) Documentation + */ + private okhttp3.Call requestForMinerListCall( + String algo, + String userName, + Long pageIndex, + Long sort, + Long sortColumn, + Long workerStatus, + Long recvWindow) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/mining/worker/list"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (algo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("algo", algo)); + } + + if (userName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userName", userName)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (sort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); + } + + if (sortColumn != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortColumn", sortColumn)); + } + + if (workerStatus != null) { + localVarQueryParams.addAll( + localVarApiClient.parameterToPair("workerStatus", workerStatus)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call requestForMinerListValidateBeforeCall( + String algo, + String userName, + Long pageIndex, + Long sort, + Long sortColumn, + Long workerStatus, + Long recvWindow) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = { + algo, userName, pageIndex, sort, sortColumn, workerStatus, recvWindow + }; + Method method = + this.getClass() + .getMethod( + "requestForMinerList", + String.class, + String.class, + Long.class, + Long.class, + Long.class, + Long.class, + Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return requestForMinerListCall( + algo, userName, pageIndex, sort, sortColumn, workerStatus, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Request for Miner List (USER_DATA) Request for Miner List Weight(IP): 1 Security Type: + * USER_DATA + * + * @param algo Algorithm (required) + * @param userName Mining account (required) + * @param pageIndex Page number, starting from 1. (optional) + * @param sort Sort order. 0 for ascending, 1 for descending. (optional) + * @param sortColumn Sort by: 1 miner name, 2 real-time hashrate, 3 daily average hashrate, 4 + * real-time rejection rate, 5 last submission time (optional) + * @param workerStatus Miner status. 0 all, 1 valid, 2 invalid, 3 failure. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return ApiResponse<RequestForMinerListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Request for Miner List -
+ * + * @see Request + * for Miner List (USER_DATA) Documentation + */ + public ApiResponse requestForMinerList( + @NotNull String algo, + @NotNull String userName, + Long pageIndex, + Long sort, + Long sortColumn, + Long workerStatus, + @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = + requestForMinerListValidateBeforeCall( + algo, userName, pageIndex, sort, sortColumn, workerStatus, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for statisticList + * + * @param algo Algorithm (required) + * @param userName Mining account (required) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Statistic List -
+ * + * @see Statistic + * List (USER_DATA) Documentation + */ + private okhttp3.Call statisticListCall(String algo, String userName, Long recvWindow) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/mining/statistics/user/status"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (algo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("algo", algo)); + } + + if (userName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userName", userName)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call statisticListValidateBeforeCall( + String algo, String userName, Long recvWindow) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {algo, userName, recvWindow}; + Method method = + this.getClass() + .getMethod("statisticList", String.class, String.class, Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return statisticListCall(algo, userName, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Statistic List (USER_DATA) Statistic List Weight(IP): 1 Security Type: USER_DATA + * + * @param algo Algorithm (required) + * @param userName Mining account (required) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return ApiResponse<StatisticListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Statistic List -
+ * + * @see Statistic + * List (USER_DATA) Documentation + */ + public ApiResponse statisticList( + @NotNull String algo, @NotNull String userName, @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = statisticListValidateBeforeCall(algo, userName, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } +} diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/api/MiningApi.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/api/MiningApi.java deleted file mode 100644 index 48110aed0..000000000 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/api/MiningApi.java +++ /dev/null @@ -1,2266 +0,0 @@ -/* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.mining.rest.api; - -import com.binance.connector.client.common.ApiClient; -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.Pair; -import com.binance.connector.client.common.SystemUtil; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.exception.ConstraintViolationException; -import com.binance.connector.client.mining.rest.model.AccountListResponse; -import com.binance.connector.client.mining.rest.model.AcquiringAlgorithmResponse; -import com.binance.connector.client.mining.rest.model.AcquiringCoinnameResponse; -import com.binance.connector.client.mining.rest.model.CancelHashrateResaleConfigurationRequest; -import com.binance.connector.client.mining.rest.model.CancelHashrateResaleConfigurationResponse; -import com.binance.connector.client.mining.rest.model.EarningsListResponse; -import com.binance.connector.client.mining.rest.model.ExtraBonusListResponse; -import com.binance.connector.client.mining.rest.model.HashrateResaleDetailResponse; -import com.binance.connector.client.mining.rest.model.HashrateResaleListResponse; -import com.binance.connector.client.mining.rest.model.HashrateResaleRequestRequest; -import com.binance.connector.client.mining.rest.model.HashrateResaleRequestResponse; -import com.binance.connector.client.mining.rest.model.MiningAccountEarningResponse; -import com.binance.connector.client.mining.rest.model.RequestForDetailMinerListResponse; -import com.binance.connector.client.mining.rest.model.RequestForMinerListResponse; -import com.binance.connector.client.mining.rest.model.StatisticListResponse; -import com.google.gson.reflect.TypeToken; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.Valid; -import jakarta.validation.Validation; -import jakarta.validation.Validator; -import jakarta.validation.constraints.*; -import jakarta.validation.executable.ExecutableValidator; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; - -public class MiningApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - private static final String USER_AGENT = - String.format( - "binance-mining/3.0.0 (Java/%s; %s; %s)", - SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); - private static final boolean HAS_TIME_UNIT = false; - - public MiningApi(ClientConfiguration clientConfiguration) { - this(new ApiClient(clientConfiguration)); - } - - public MiningApi(ApiClient apiClient) { - apiClient.setUserAgent(USER_AGENT); - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for accountList - * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Account List -
- * - * @see Account - * List(USER_DATA) Documentation - */ - private okhttp3.Call accountListCall(String algo, String userName, Long recvWindow) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/mining/statistics/user/list"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (algo != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("algo", algo)); - } - - if (userName != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userName", userName)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call accountListValidateBeforeCall( - String algo, String userName, Long recvWindow) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {algo, userName, recvWindow}; - Method method = - this.getClass() - .getMethod("accountList", String.class, String.class, Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return accountListCall(algo, userName, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Account List(USER_DATA) Query Account List Weight: 5 - * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param recvWindow (optional) - * @return ApiResponse<AccountListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Account List -
- * - * @see Account - * List(USER_DATA) Documentation - */ - public ApiResponse accountList( - @NotNull String algo, @NotNull String userName, Long recvWindow) throws ApiException { - okhttp3.Call localVarCall = accountListValidateBeforeCall(algo, userName, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for acquiringAlgorithm - * - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Acquiring Algorithm -
- * - * @see Acquiring - * Algorithm(MARKET_DATA) Documentation - */ - private okhttp3.Call acquiringAlgorithmCall() throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/mining/pub/algoList"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call acquiringAlgorithmValidateBeforeCall() throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {}; - Method method = this.getClass().getMethod("acquiringAlgorithm"); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return acquiringAlgorithmCall(); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Acquiring Algorithm(MARKET_DATA) Acquiring Algorithm Weight: 1 - * - * @return ApiResponse<AcquiringAlgorithmResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Acquiring Algorithm -
- * - * @see Acquiring - * Algorithm(MARKET_DATA) Documentation - */ - public ApiResponse acquiringAlgorithm() throws ApiException { - okhttp3.Call localVarCall = acquiringAlgorithmValidateBeforeCall(); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for acquiringCoinname - * - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Acquiring CoinName -
- * - * @see Acquiring - * CoinName(MARKET_DATA) Documentation - */ - private okhttp3.Call acquiringCoinnameCall() throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/mining/pub/coinList"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call acquiringCoinnameValidateBeforeCall() throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {}; - Method method = this.getClass().getMethod("acquiringCoinname"); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return acquiringCoinnameCall(); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Acquiring CoinName(MARKET_DATA) Acquiring CoinName Weight: 1 - * - * @return ApiResponse<AcquiringCoinnameResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Acquiring CoinName -
- * - * @see Acquiring - * CoinName(MARKET_DATA) Documentation - */ - public ApiResponse acquiringCoinname() throws ApiException { - okhttp3.Call localVarCall = acquiringCoinnameValidateBeforeCall(); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for cancelHashrateResaleConfiguration - * - * @param cancelHashrateResaleConfigurationRequest (required) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cancel hashrate resale configuration -
- * - * @see Cancel - * hashrate resale configuration(USER_DATA) Documentation - */ - private okhttp3.Call cancelHashrateResaleConfigurationCall( - CancelHashrateResaleConfigurationRequest cancelHashrateResaleConfigurationRequest) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/mining/hash-transfer/config/cancel"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (cancelHashrateResaleConfigurationRequest.getConfigId() != null) { - localVarFormParams.put( - "configId", cancelHashrateResaleConfigurationRequest.getConfigId()); - } - - if (cancelHashrateResaleConfigurationRequest.getUserName() != null) { - localVarFormParams.put( - "userName", cancelHashrateResaleConfigurationRequest.getUserName()); - } - - if (cancelHashrateResaleConfigurationRequest.getRecvWindow() != null) { - localVarFormParams.put( - "recvWindow", cancelHashrateResaleConfigurationRequest.getRecvWindow()); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call cancelHashrateResaleConfigurationValidateBeforeCall( - CancelHashrateResaleConfigurationRequest cancelHashrateResaleConfigurationRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {cancelHashrateResaleConfigurationRequest}; - Method method = - this.getClass() - .getMethod( - "cancelHashrateResaleConfiguration", - CancelHashrateResaleConfigurationRequest.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return cancelHashrateResaleConfigurationCall( - cancelHashrateResaleConfigurationRequest); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Cancel hashrate resale configuration(USER_DATA) Weight: 5 - * - * @param cancelHashrateResaleConfigurationRequest (required) - * @return ApiResponse<CancelHashrateResaleConfigurationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cancel hashrate resale configuration -
- * - * @see Cancel - * hashrate resale configuration(USER_DATA) Documentation - */ - public ApiResponse cancelHashrateResaleConfiguration( - @Valid @NotNull - CancelHashrateResaleConfigurationRequest - cancelHashrateResaleConfigurationRequest) - throws ApiException { - okhttp3.Call localVarCall = - cancelHashrateResaleConfigurationValidateBeforeCall( - cancelHashrateResaleConfigurationRequest); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for earningsList - * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param coin Coin Name (optional) - * @param startDate Millisecond timestamp (optional) - * @param endDate Millisecond timestamp (optional) - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param pageSize Min 10,Max 200 (optional) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Earnings List -
- * - * @see Earnings - * List(USER_DATA) Documentation - */ - private okhttp3.Call earningsListCall( - String algo, - String userName, - String coin, - Long startDate, - Long endDate, - Long pageIndex, - Long pageSize, - Long recvWindow) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/mining/payment/list"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (algo != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("algo", algo)); - } - - if (userName != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userName", userName)); - } - - if (coin != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("coin", coin)); - } - - if (startDate != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("startDate", startDate)); - } - - if (endDate != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("endDate", endDate)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call earningsListValidateBeforeCall( - String algo, - String userName, - String coin, - Long startDate, - Long endDate, - Long pageIndex, - Long pageSize, - Long recvWindow) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = { - algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow - }; - Method method = - this.getClass() - .getMethod( - "earningsList", - String.class, - String.class, - String.class, - Long.class, - Long.class, - Long.class, - Long.class, - Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return earningsListCall( - algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Earnings List(USER_DATA) Query Earnings List Weight: 5 - * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param coin Coin Name (optional) - * @param startDate Millisecond timestamp (optional) - * @param endDate Millisecond timestamp (optional) - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param pageSize Min 10,Max 200 (optional) - * @param recvWindow (optional) - * @return ApiResponse<EarningsListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Earnings List -
- * - * @see Earnings - * List(USER_DATA) Documentation - */ - public ApiResponse earningsList( - @NotNull String algo, - @NotNull String userName, - String coin, - Long startDate, - Long endDate, - Long pageIndex, - Long pageSize, - Long recvWindow) - throws ApiException { - okhttp3.Call localVarCall = - earningsListValidateBeforeCall( - algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for extraBonusList - * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param coin Coin Name (optional) - * @param startDate Millisecond timestamp (optional) - * @param endDate Millisecond timestamp (optional) - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param pageSize Min 10,Max 200 (optional) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Extra Bonus List -
- * - * @see Extra - * Bonus List(USER_DATA) Documentation - */ - private okhttp3.Call extraBonusListCall( - String algo, - String userName, - String coin, - Long startDate, - Long endDate, - Long pageIndex, - Long pageSize, - Long recvWindow) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/mining/payment/other"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (algo != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("algo", algo)); - } - - if (userName != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userName", userName)); - } - - if (coin != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("coin", coin)); - } - - if (startDate != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("startDate", startDate)); - } - - if (endDate != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("endDate", endDate)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call extraBonusListValidateBeforeCall( - String algo, - String userName, - String coin, - Long startDate, - Long endDate, - Long pageIndex, - Long pageSize, - Long recvWindow) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = { - algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow - }; - Method method = - this.getClass() - .getMethod( - "extraBonusList", - String.class, - String.class, - String.class, - Long.class, - Long.class, - Long.class, - Long.class, - Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return extraBonusListCall( - algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Extra Bonus List(USER_DATA) Extra Bonus List Weight: 5 - * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param coin Coin Name (optional) - * @param startDate Millisecond timestamp (optional) - * @param endDate Millisecond timestamp (optional) - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param pageSize Min 10,Max 200 (optional) - * @param recvWindow (optional) - * @return ApiResponse<ExtraBonusListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Extra Bonus List -
- * - * @see Extra - * Bonus List(USER_DATA) Documentation - */ - public ApiResponse extraBonusList( - @NotNull String algo, - @NotNull String userName, - String coin, - Long startDate, - Long endDate, - Long pageIndex, - Long pageSize, - Long recvWindow) - throws ApiException { - okhttp3.Call localVarCall = - extraBonusListValidateBeforeCall( - algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for hashrateResaleDetail - * - * @param configId Mining ID 168 (required) - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param pageSize Min 10,Max 200 (optional) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Hashrate Resale Detail -
- * - * @see Hashrate - * Resale Detail(USER_DATA) Documentation - */ - private okhttp3.Call hashrateResaleDetailCall( - Long configId, Long pageIndex, Long pageSize, Long recvWindow) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/mining/hash-transfer/profit/details"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (configId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("configId", configId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call hashrateResaleDetailValidateBeforeCall( - Long configId, Long pageIndex, Long pageSize, Long recvWindow) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {configId, pageIndex, pageSize, recvWindow}; - Method method = - this.getClass() - .getMethod( - "hashrateResaleDetail", - Long.class, - Long.class, - Long.class, - Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return hashrateResaleDetailCall(configId, pageIndex, pageSize, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Hashrate Resale Detail(USER_DATA) Hashrate Resale Detail(USER_DATA) Weight: 5 - * - * @param configId Mining ID 168 (required) - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param pageSize Min 10,Max 200 (optional) - * @param recvWindow (optional) - * @return ApiResponse<HashrateResaleDetailResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Hashrate Resale Detail -
- * - * @see Hashrate - * Resale Detail(USER_DATA) Documentation - */ - public ApiResponse hashrateResaleDetail( - @NotNull Long configId, Long pageIndex, Long pageSize, Long recvWindow) - throws ApiException { - okhttp3.Call localVarCall = - hashrateResaleDetailValidateBeforeCall(configId, pageIndex, pageSize, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for hashrateResaleList - * - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param pageSize Min 10,Max 200 (optional) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Hashrate Resale List -
- * - * @see Hashrate - * Resale List Documentation - */ - private okhttp3.Call hashrateResaleListCall(Long pageIndex, Long pageSize, Long recvWindow) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/mining/hash-transfer/config/details/list"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call hashrateResaleListValidateBeforeCall( - Long pageIndex, Long pageSize, Long recvWindow) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {pageIndex, pageSize, recvWindow}; - Method method = - this.getClass() - .getMethod("hashrateResaleList", Long.class, Long.class, Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return hashrateResaleListCall(pageIndex, pageSize, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Hashrate Resale List Hashrate Resale List Weight: 5 - * - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param pageSize Min 10,Max 200 (optional) - * @param recvWindow (optional) - * @return ApiResponse<HashrateResaleListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Hashrate Resale List -
- * - * @see Hashrate - * Resale List Documentation - */ - public ApiResponse hashrateResaleList( - Long pageIndex, Long pageSize, Long recvWindow) throws ApiException { - okhttp3.Call localVarCall = - hashrateResaleListValidateBeforeCall(pageIndex, pageSize, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for hashrateResaleRequest - * - * @param hashrateResaleRequestRequest (required) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Hashrate Resale Request -
- * - * @see Hashrate - * Resale Request(USER_DATA) Documentation - */ - private okhttp3.Call hashrateResaleRequestCall( - HashrateResaleRequestRequest hashrateResaleRequestRequest) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/mining/hash-transfer/config"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (hashrateResaleRequestRequest.getUserName() != null) { - localVarFormParams.put("userName", hashrateResaleRequestRequest.getUserName()); - } - - if (hashrateResaleRequestRequest.getAlgo() != null) { - localVarFormParams.put("algo", hashrateResaleRequestRequest.getAlgo()); - } - - if (hashrateResaleRequestRequest.getEndDate() != null) { - localVarFormParams.put("endDate", hashrateResaleRequestRequest.getEndDate()); - } - - if (hashrateResaleRequestRequest.getStartDate() != null) { - localVarFormParams.put("startDate", hashrateResaleRequestRequest.getStartDate()); - } - - if (hashrateResaleRequestRequest.getToPoolUser() != null) { - localVarFormParams.put("toPoolUser", hashrateResaleRequestRequest.getToPoolUser()); - } - - if (hashrateResaleRequestRequest.getHashRate() != null) { - localVarFormParams.put("hashRate", hashrateResaleRequestRequest.getHashRate()); - } - - if (hashrateResaleRequestRequest.getRecvWindow() != null) { - localVarFormParams.put("recvWindow", hashrateResaleRequestRequest.getRecvWindow()); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call hashrateResaleRequestValidateBeforeCall( - HashrateResaleRequestRequest hashrateResaleRequestRequest) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {hashrateResaleRequestRequest}; - Method method = - this.getClass() - .getMethod("hashrateResaleRequest", HashrateResaleRequestRequest.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return hashrateResaleRequestCall(hashrateResaleRequestRequest); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Hashrate Resale Request(USER_DATA) Hashrate Resale Request Weight: 5 - * - * @param hashrateResaleRequestRequest (required) - * @return ApiResponse<HashrateResaleRequestResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Hashrate Resale Request -
- * - * @see Hashrate - * Resale Request(USER_DATA) Documentation - */ - public ApiResponse hashrateResaleRequest( - @Valid @NotNull HashrateResaleRequestRequest hashrateResaleRequestRequest) - throws ApiException { - okhttp3.Call localVarCall = - hashrateResaleRequestValidateBeforeCall(hashrateResaleRequestRequest); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for miningAccountEarning - * - * @param algo Algorithm(sha256) sha256 (required) - * @param startDate Millisecond timestamp (optional) - * @param endDate Millisecond timestamp (optional) - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param pageSize Min 10,Max 200 (optional) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Mining Account Earning -
- * - * @see Mining - * Account Earning(USER_DATA) Documentation - */ - private okhttp3.Call miningAccountEarningCall( - String algo, - Long startDate, - Long endDate, - Long pageIndex, - Long pageSize, - Long recvWindow) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/mining/payment/uid"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (algo != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("algo", algo)); - } - - if (startDate != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("startDate", startDate)); - } - - if (endDate != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("endDate", endDate)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call miningAccountEarningValidateBeforeCall( - String algo, - Long startDate, - Long endDate, - Long pageIndex, - Long pageSize, - Long recvWindow) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {algo, startDate, endDate, pageIndex, pageSize, recvWindow}; - Method method = - this.getClass() - .getMethod( - "miningAccountEarning", - String.class, - Long.class, - Long.class, - Long.class, - Long.class, - Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return miningAccountEarningCall( - algo, startDate, endDate, pageIndex, pageSize, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Mining Account Earning(USER_DATA) Mining Account Earning Weight: 5 - * - * @param algo Algorithm(sha256) sha256 (required) - * @param startDate Millisecond timestamp (optional) - * @param endDate Millisecond timestamp (optional) - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param pageSize Min 10,Max 200 (optional) - * @param recvWindow (optional) - * @return ApiResponse<MiningAccountEarningResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Mining Account Earning -
- * - * @see Mining - * Account Earning(USER_DATA) Documentation - */ - public ApiResponse miningAccountEarning( - @NotNull String algo, - Long startDate, - Long endDate, - Long pageIndex, - Long pageSize, - Long recvWindow) - throws ApiException { - okhttp3.Call localVarCall = - miningAccountEarningValidateBeforeCall( - algo, startDate, endDate, pageIndex, pageSize, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for requestForDetailMinerList - * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param workerName Miner’s name(required) bhdc1.16A10404B (required) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Request for Detail Miner List -
- * - * @see Request - * for Detail Miner List(USER_DATA) Documentation - */ - private okhttp3.Call requestForDetailMinerListCall( - String algo, String userName, String workerName, Long recvWindow) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/mining/worker/detail"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (algo != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("algo", algo)); - } - - if (userName != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userName", userName)); - } - - if (workerName != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("workerName", workerName)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call requestForDetailMinerListValidateBeforeCall( - String algo, String userName, String workerName, Long recvWindow) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {algo, userName, workerName, recvWindow}; - Method method = - this.getClass() - .getMethod( - "requestForDetailMinerList", - String.class, - String.class, - String.class, - Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return requestForDetailMinerListCall(algo, userName, workerName, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Request for Detail Miner List(USER_DATA) Request for Detail Miner List Weight: 5 - * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param workerName Miner’s name(required) bhdc1.16A10404B (required) - * @param recvWindow (optional) - * @return ApiResponse<RequestForDetailMinerListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Request for Detail Miner List -
- * - * @see Request - * for Detail Miner List(USER_DATA) Documentation - */ - public ApiResponse requestForDetailMinerList( - @NotNull String algo, - @NotNull String userName, - @NotNull String workerName, - Long recvWindow) - throws ApiException { - okhttp3.Call localVarCall = - requestForDetailMinerListValidateBeforeCall(algo, userName, workerName, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for requestForMinerList - * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param sort sort sequence(default=0)0 positive sequence,1 negative sequence (optional) - * @param sortColumn Sort by( default 1): <br></br>1: miner name, - * <br></br>2: real-time computing power, <br></br>3: daily average - * computing power, <br></br>4: real-time rejection rate, - * <br></br>5: last submission time (optional) - * @param workerStatus miners status(default=0),0 all,1 valid,2 invalid,3 failure - * (optional) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Request for Miner List -
- * - * @see Request - * for Miner List(USER_DATA) Documentation - */ - private okhttp3.Call requestForMinerListCall( - String algo, - String userName, - Long pageIndex, - Long sort, - Long sortColumn, - Long workerStatus, - Long recvWindow) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/mining/worker/list"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (algo != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("algo", algo)); - } - - if (userName != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userName", userName)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (sort != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); - } - - if (sortColumn != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortColumn", sortColumn)); - } - - if (workerStatus != null) { - localVarQueryParams.addAll( - localVarApiClient.parameterToPair("workerStatus", workerStatus)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call requestForMinerListValidateBeforeCall( - String algo, - String userName, - Long pageIndex, - Long sort, - Long sortColumn, - Long workerStatus, - Long recvWindow) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = { - algo, userName, pageIndex, sort, sortColumn, workerStatus, recvWindow - }; - Method method = - this.getClass() - .getMethod( - "requestForMinerList", - String.class, - String.class, - Long.class, - Long.class, - Long.class, - Long.class, - Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return requestForMinerListCall( - algo, userName, pageIndex, sort, sortColumn, workerStatus, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Request for Miner List(USER_DATA) Request for Miner List Weight: 5 - * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param sort sort sequence(default=0)0 positive sequence,1 negative sequence (optional) - * @param sortColumn Sort by( default 1): <br></br>1: miner name, - * <br></br>2: real-time computing power, <br></br>3: daily average - * computing power, <br></br>4: real-time rejection rate, - * <br></br>5: last submission time (optional) - * @param workerStatus miners status(default=0),0 all,1 valid,2 invalid,3 failure - * (optional) - * @param recvWindow (optional) - * @return ApiResponse<RequestForMinerListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Request for Miner List -
- * - * @see Request - * for Miner List(USER_DATA) Documentation - */ - public ApiResponse requestForMinerList( - @NotNull String algo, - @NotNull String userName, - Long pageIndex, - Long sort, - Long sortColumn, - Long workerStatus, - Long recvWindow) - throws ApiException { - okhttp3.Call localVarCall = - requestForMinerListValidateBeforeCall( - algo, userName, pageIndex, sort, sortColumn, workerStatus, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for statisticList - * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Statistic List -
- * - * @see Statistic - * List(USER_DATA) Documentation - */ - private okhttp3.Call statisticListCall(String algo, String userName, Long recvWindow) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/mining/statistics/user/status"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (algo != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("algo", algo)); - } - - if (userName != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userName", userName)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call statisticListValidateBeforeCall( - String algo, String userName, Long recvWindow) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {algo, userName, recvWindow}; - Method method = - this.getClass() - .getMethod("statisticList", String.class, String.class, Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return statisticListCall(algo, userName, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Statistic List(USER_DATA) Statistic List Weight: 5 - * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param recvWindow (optional) - * @return ApiResponse<StatisticListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Statistic List -
- * - * @see Statistic - * List(USER_DATA) Documentation - */ - public ApiResponse statisticList( - @NotNull String algo, @NotNull String userName, Long recvWindow) throws ApiException { - okhttp3.Call localVarCall = statisticListValidateBeforeCall(algo, userName, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } -} diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/api/MiningRestApi.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/api/MiningRestApi.java index 205b60617..8ff9b5af9 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/api/MiningRestApi.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/api/MiningRestApi.java @@ -23,22 +23,22 @@ public class MiningRestApi { - private final MiningApi miningApi; + private final DefaultApi defaultApi; public MiningRestApi(ClientConfiguration configuration) { this(MiningRestApiUtil.getDefaultClient(configuration)); } public MiningRestApi(ApiClient apiClient) { - this.miningApi = new MiningApi(apiClient); + this.defaultApi = new DefaultApi(apiClient); } /** - * Account List(USER_DATA) Query Account List Weight: 5 + * Account List (USER_DATA) Query Account List Weight(IP): 1 Security Type: USER_DATA * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param recvWindow (optional) + * @param algo Algorithm name. (required) + * @param userName Mining account (required) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<AccountListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -49,16 +49,18 @@ public MiningRestApi(ApiClient apiClient) { * 200 Account List - * * - * @see Account - * List(USER_DATA) Documentation + * @see Account + * List (USER_DATA) Documentation */ public ApiResponse accountList( String algo, String userName, Long recvWindow) throws ApiException { - return miningApi.accountList(algo, userName, recvWindow); + return defaultApi.accountList(algo, userName, recvWindow); } /** - * Acquiring Algorithm(MARKET_DATA) Acquiring Algorithm Weight: 1 + * Acquiring Algorithm (MARKET_DATA) Acquiring Algorithm Weight(IP): 1 Security Type: + * MARKET_DATA * * @return ApiResponse<AcquiringAlgorithmResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -71,15 +73,15 @@ public ApiResponse accountList( * * * @see Acquiring - * Algorithm(MARKET_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#acquiring-algorithm">Acquiring + * Algorithm (MARKET_DATA) Documentation */ public ApiResponse acquiringAlgorithm() throws ApiException { - return miningApi.acquiringAlgorithm(); + return defaultApi.acquiringAlgorithm(); } /** - * Acquiring CoinName(MARKET_DATA) Acquiring CoinName Weight: 1 + * Acquiring CoinName (MARKET_DATA) Acquiring CoinName Weight(IP): 1 Security Type: MARKET_DATA * * @return ApiResponse<AcquiringCoinnameResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -92,15 +94,16 @@ public ApiResponse acquiringAlgorithm() throws ApiEx * * * @see Acquiring - * CoinName(MARKET_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#acquiring-coinname">Acquiring + * CoinName (MARKET_DATA) Documentation */ public ApiResponse acquiringCoinname() throws ApiException { - return miningApi.acquiringCoinname(); + return defaultApi.acquiringCoinname(); } /** - * Cancel hashrate resale configuration(USER_DATA) Weight: 5 + * Cancel hashrate resale configuration (USER_DATA) Cancel hashrate resale configuration + * Weight(IP): 1 Security Type: USER_DATA * * @param cancelHashrateResaleConfigurationRequest (required) * @return ApiResponse<CancelHashrateResaleConfigurationResponse> @@ -114,27 +117,27 @@ public ApiResponse acquiringCoinname() throws ApiExce * * * @see Cancel - * hashrate resale configuration(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#cancel-hashrate-resale-configuration">Cancel + * hashrate resale configuration (USER_DATA) Documentation */ public ApiResponse cancelHashrateResaleConfiguration( CancelHashrateResaleConfigurationRequest cancelHashrateResaleConfigurationRequest) throws ApiException { - return miningApi.cancelHashrateResaleConfiguration( + return defaultApi.cancelHashrateResaleConfiguration( cancelHashrateResaleConfigurationRequest); } /** - * Earnings List(USER_DATA) Query Earnings List Weight: 5 + * Earnings List (USER_DATA) Query Earnings List Weight(IP): 1 Security Type: USER_DATA * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param coin Coin Name (optional) - * @param startDate Millisecond timestamp (optional) - * @param endDate Millisecond timestamp (optional) - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param pageSize Min 10,Max 200 (optional) - * @param recvWindow (optional) + * @param algo Algorithm name. (required) + * @param userName Mining account. (required) + * @param coin Coin name (optional) + * @param startDate Search start time in milliseconds. (optional) + * @param endDate Search end time in milliseconds. (optional) + * @param pageIndex Page number, starting from 1. (optional) + * @param pageSize Number of rows per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<EarningsListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -145,8 +148,9 @@ public ApiResponse cancelHashrateResa * 200 Earnings List - * * - * @see Earnings - * List(USER_DATA) Documentation + * @see Earnings + * List (USER_DATA) Documentation */ public ApiResponse earningsList( String algo, @@ -158,21 +162,21 @@ public ApiResponse earningsList( Long pageSize, Long recvWindow) throws ApiException { - return miningApi.earningsList( + return defaultApi.earningsList( algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow); } /** - * Extra Bonus List(USER_DATA) Extra Bonus List Weight: 5 + * Extra Bonus List (USER_DATA) Extra Bonus List Weight(IP): 1 Security Type: USER_DATA * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param coin Coin Name (optional) - * @param startDate Millisecond timestamp (optional) - * @param endDate Millisecond timestamp (optional) - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param pageSize Min 10,Max 200 (optional) - * @param recvWindow (optional) + * @param algo Transfer algorithm (required) + * @param userName Mining account (required) + * @param coin Coin name (optional) + * @param startDate Search start time in milliseconds. (optional) + * @param endDate Search end time in milliseconds. (optional) + * @param pageIndex Page number, starting from 1. (optional) + * @param pageSize Number of rows per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<ExtraBonusListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -183,8 +187,9 @@ public ApiResponse earningsList( * 200 Extra Bonus List - * * - * @see Extra - * Bonus List(USER_DATA) Documentation + * @see Extra + * Bonus List (USER_DATA) Documentation */ public ApiResponse extraBonusList( String algo, @@ -196,17 +201,18 @@ public ApiResponse extraBonusList( Long pageSize, Long recvWindow) throws ApiException { - return miningApi.extraBonusList( + return defaultApi.extraBonusList( algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow); } /** - * Hashrate Resale Detail(USER_DATA) Hashrate Resale Detail(USER_DATA) Weight: 5 + * Hashrate Resale Detail (USER_DATA) Hashrate Resale Detail(USER_DATA) Weight(IP): 1 Security + * Type: USER_DATA * - * @param configId Mining ID 168 (required) - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param pageSize Min 10,Max 200 (optional) - * @param recvWindow (optional) + * @param configId Configuration ID. (required) + * @param pageIndex Page number, starting from 1. (optional) + * @param pageSize Number of rows per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<HashrateResaleDetailResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -218,20 +224,20 @@ public ApiResponse extraBonusList( * * * @see Hashrate - * Resale Detail(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#hashrate-resale-detail">Hashrate + * Resale Detail (USER_DATA) Documentation */ public ApiResponse hashrateResaleDetail( Long configId, Long pageIndex, Long pageSize, Long recvWindow) throws ApiException { - return miningApi.hashrateResaleDetail(configId, pageIndex, pageSize, recvWindow); + return defaultApi.hashrateResaleDetail(configId, pageIndex, pageSize, recvWindow); } /** - * Hashrate Resale List Hashrate Resale List Weight: 5 + * Hashrate Resale List (USER_DATA) Hashrate Resale List Weight(IP): 1 Security Type: USER_DATA * - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param pageSize Min 10,Max 200 (optional) - * @param recvWindow (optional) + * @param pageIndex Page number, starting from 1. (optional) + * @param pageSize Number of rows per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<HashrateResaleListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -243,16 +249,17 @@ public ApiResponse hashrateResaleDetail( * * * @see Hashrate - * Resale List Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#hashrate-resale-list">Hashrate + * Resale List (USER_DATA) Documentation */ public ApiResponse hashrateResaleList( Long pageIndex, Long pageSize, Long recvWindow) throws ApiException { - return miningApi.hashrateResaleList(pageIndex, pageSize, recvWindow); + return defaultApi.hashrateResaleList(pageIndex, pageSize, recvWindow); } /** - * Hashrate Resale Request(USER_DATA) Hashrate Resale Request Weight: 5 + * Hashrate Resale Request (USER_DATA) Hashrate Resale Request Weight(IP): 1 Security Type: + * USER_DATA * * @param hashrateResaleRequestRequest (required) * @return ApiResponse<HashrateResaleRequestResponse> @@ -266,23 +273,24 @@ public ApiResponse hashrateResaleList( * * * @see Hashrate - * Resale Request(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#hashrate-resale-request">Hashrate + * Resale Request (USER_DATA) Documentation */ public ApiResponse hashrateResaleRequest( HashrateResaleRequestRequest hashrateResaleRequestRequest) throws ApiException { - return miningApi.hashrateResaleRequest(hashrateResaleRequestRequest); + return defaultApi.hashrateResaleRequest(hashrateResaleRequestRequest); } /** - * Mining Account Earning(USER_DATA) Mining Account Earning Weight: 5 + * Mining Account Earning (USER_DATA) Mining Account Earning Weight(IP): 1 Security Type: + * USER_DATA * - * @param algo Algorithm(sha256) sha256 (required) + * @param algo Algorithm (required) * @param startDate Millisecond timestamp (optional) * @param endDate Millisecond timestamp (optional) - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param pageSize Min 10,Max 200 (optional) - * @param recvWindow (optional) + * @param pageIndex Page number, starting from 1. (optional) + * @param pageSize Number of rows per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<MiningAccountEarningResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -294,8 +302,8 @@ public ApiResponse hashrateResaleRequest( * * * @see Mining - * Account Earning(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#mining-account-earning">Mining + * Account Earning (USER_DATA) Documentation */ public ApiResponse miningAccountEarning( String algo, @@ -305,17 +313,18 @@ public ApiResponse miningAccountEarning( Long pageSize, Long recvWindow) throws ApiException { - return miningApi.miningAccountEarning( + return defaultApi.miningAccountEarning( algo, startDate, endDate, pageIndex, pageSize, recvWindow); } /** - * Request for Detail Miner List(USER_DATA) Request for Detail Miner List Weight: 5 + * Request for Detail Miner List (USER_DATA) Request for Detail Miner List Weight(IP): 1 + * Security Type: USER_DATA * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param workerName Miner’s name(required) bhdc1.16A10404B (required) - * @param recvWindow (optional) + * @param algo Algorithm (required) + * @param userName Mining account (required) + * @param workerName Miner name. (required) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<RequestForDetailMinerListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -327,28 +336,26 @@ public ApiResponse miningAccountEarning( * * * @see Request - * for Detail Miner List(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#request-for-detail-miner-list">Request + * for Detail Miner List (USER_DATA) Documentation */ public ApiResponse requestForDetailMinerList( String algo, String userName, String workerName, Long recvWindow) throws ApiException { - return miningApi.requestForDetailMinerList(algo, userName, workerName, recvWindow); + return defaultApi.requestForDetailMinerList(algo, userName, workerName, recvWindow); } /** - * Request for Miner List(USER_DATA) Request for Miner List Weight: 5 + * Request for Miner List (USER_DATA) Request for Miner List Weight(IP): 1 Security Type: + * USER_DATA * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param pageIndex Page number, empty default first page, starting from 1 (optional) - * @param sort sort sequence(default=0)0 positive sequence,1 negative sequence (optional) - * @param sortColumn Sort by( default 1): <br></br>1: miner name, - * <br></br>2: real-time computing power, <br></br>3: daily average - * computing power, <br></br>4: real-time rejection rate, - * <br></br>5: last submission time (optional) - * @param workerStatus miners status(default=0),0 all,1 valid,2 invalid,3 failure - * (optional) - * @param recvWindow (optional) + * @param algo Algorithm (required) + * @param userName Mining account (required) + * @param pageIndex Page number, starting from 1. (optional) + * @param sort Sort order. 0 for ascending, 1 for descending. (optional) + * @param sortColumn Sort by: 1 miner name, 2 real-time hashrate, 3 daily average hashrate, 4 + * real-time rejection rate, 5 last submission time (optional) + * @param workerStatus Miner status. 0 all, 1 valid, 2 invalid, 3 failure. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<RequestForMinerListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -360,8 +367,8 @@ public ApiResponse requestForDetailMinerList( * * * @see Request - * for Miner List(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#request-for-miner-list">Request + * for Miner List (USER_DATA) Documentation */ public ApiResponse requestForMinerList( String algo, @@ -372,16 +379,16 @@ public ApiResponse requestForMinerList( Long workerStatus, Long recvWindow) throws ApiException { - return miningApi.requestForMinerList( + return defaultApi.requestForMinerList( algo, userName, pageIndex, sort, sortColumn, workerStatus, recvWindow); } /** - * Statistic List(USER_DATA) Statistic List Weight: 5 + * Statistic List (USER_DATA) Statistic List Weight(IP): 1 Security Type: USER_DATA * - * @param algo Algorithm(sha256) sha256 (required) - * @param userName Mining account test (required) - * @param recvWindow (optional) + * @param algo Algorithm (required) + * @param userName Mining account (required) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<StatisticListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -392,11 +399,12 @@ public ApiResponse requestForMinerList( * 200 Statistic List - * * - * @see Statistic - * List(USER_DATA) Documentation + * @see Statistic + * List (USER_DATA) Documentation */ public ApiResponse statisticList( String algo, String userName, Long recvWindow) throws ApiException { - return miningApi.statisticList(algo, userName, recvWindow); + return defaultApi.statisticList(algo, userName, recvWindow); } } diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AccountListResponse.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AccountListResponse.java index 835002d16..75e9c7a18 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AccountListResponse.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AccountListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** AccountListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountListResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AccountListResponseDataInner.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AccountListResponseDataInner.java index 3d98afaf8..4ab5442dd 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AccountListResponseDataInner.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AccountListResponseDataInner.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** AccountListResponseDataInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountListResponseDataInner { public static final String SERIALIZED_NAME_TYPE = "type"; @@ -68,7 +68,7 @@ public AccountListResponseDataInner type(@jakarta.annotation.Nullable String typ } /** - * Get type + * Type of hashrate bucket * * @return type */ @@ -87,7 +87,7 @@ public AccountListResponseDataInner userName(@jakarta.annotation.Nullable String } /** - * Get userName + * Mining account * * @return userName */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AccountListResponseDataInnerListInner.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AccountListResponseDataInnerListInner.java index 6b37948cc..279ce14e4 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AccountListResponseDataInnerListInner.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AccountListResponseDataInnerListInner.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountListResponseDataInnerListInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountListResponseDataInnerListInner { public static final String SERIALIZED_NAME_TIME = "time"; @@ -62,7 +62,7 @@ public AccountListResponseDataInnerListInner time(@jakarta.annotation.Nullable L } /** - * Get time + * Time * * @return time */ @@ -82,7 +82,7 @@ public AccountListResponseDataInnerListInner hashrate( } /** - * Get hashrate + * Hashrate * * @return hashrate */ @@ -102,7 +102,7 @@ public AccountListResponseDataInnerListInner reject( } /** - * Get reject + * Rejection rate * * @return reject */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AcquiringAlgorithmResponse.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AcquiringAlgorithmResponse.java index f5aa48dd5..b07f87527 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AcquiringAlgorithmResponse.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AcquiringAlgorithmResponse.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** AcquiringAlgorithmResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AcquiringAlgorithmResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AcquiringAlgorithmResponseDataInner.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AcquiringAlgorithmResponseDataInner.java index 1aab948a7..d4e5e1a03 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AcquiringAlgorithmResponseDataInner.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AcquiringAlgorithmResponseDataInner.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AcquiringAlgorithmResponseDataInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AcquiringAlgorithmResponseDataInner { public static final String SERIALIZED_NAME_ALGO_NAME = "algoName"; @@ -69,7 +69,7 @@ public AcquiringAlgorithmResponseDataInner algoName( } /** - * Get algoName + * Algorithm name * * @return algoName */ @@ -88,7 +88,7 @@ public AcquiringAlgorithmResponseDataInner algoId(@jakarta.annotation.Nullable L } /** - * Get algoId + * Algorithm ID * * @return algoId */ @@ -108,7 +108,7 @@ public AcquiringAlgorithmResponseDataInner poolIndex( } /** - * Get poolIndex + * Sequence * * @return poolIndex */ @@ -127,7 +127,7 @@ public AcquiringAlgorithmResponseDataInner unit(@jakarta.annotation.Nullable Str } /** - * Get unit + * Unit * * @return unit */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AcquiringCoinnameResponse.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AcquiringCoinnameResponse.java index 5dc27c3f0..4eb497d5d 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AcquiringCoinnameResponse.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AcquiringCoinnameResponse.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** AcquiringCoinnameResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AcquiringCoinnameResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AcquiringCoinnameResponseDataInner.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AcquiringCoinnameResponseDataInner.java index fa0a09423..7526a7a05 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AcquiringCoinnameResponseDataInner.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/AcquiringCoinnameResponseDataInner.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AcquiringCoinnameResponseDataInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AcquiringCoinnameResponseDataInner { public static final String SERIALIZED_NAME_COIN_NAME = "coinName"; @@ -75,7 +75,7 @@ public AcquiringCoinnameResponseDataInner coinName( } /** - * Get coinName + * Currency name * * @return coinName */ @@ -94,7 +94,7 @@ public AcquiringCoinnameResponseDataInner coinId(@jakarta.annotation.Nullable Lo } /** - * Get coinId + * ID * * @return coinId */ @@ -114,7 +114,7 @@ public AcquiringCoinnameResponseDataInner poolIndex( } /** - * Get poolIndex + * Sort * * @return poolIndex */ @@ -133,7 +133,7 @@ public AcquiringCoinnameResponseDataInner algoId(@jakarta.annotation.Nullable Lo } /** - * Get algoId + * Algorithm * * @return algoId */ @@ -153,7 +153,7 @@ public AcquiringCoinnameResponseDataInner algoName( } /** - * Get algoName + * Name of algorithm * * @return algoName */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/CancelHashrateResaleConfigurationRequest.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/CancelHashrateResaleConfigurationRequest.java index 888086be5..49dee9549 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/CancelHashrateResaleConfigurationRequest.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/CancelHashrateResaleConfigurationRequest.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelHashrateResaleConfigurationRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelHashrateResaleConfigurationRequest { public static final String SERIALIZED_NAME_CONFIG_ID = "configId"; @@ -63,7 +63,7 @@ public CancelHashrateResaleConfigurationRequest configId( } /** - * Get configId + * Mining ID * * @return configId */ @@ -84,7 +84,7 @@ public CancelHashrateResaleConfigurationRequest userName( } /** - * Get userName + * Mining Account * * @return userName */ @@ -105,11 +105,12 @@ public CancelHashrateResaleConfigurationRequest recvWindow( } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/CancelHashrateResaleConfigurationResponse.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/CancelHashrateResaleConfigurationResponse.java index 53f9aae94..6a7b61692 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/CancelHashrateResaleConfigurationResponse.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/CancelHashrateResaleConfigurationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CancelHashrateResaleConfigurationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CancelHashrateResaleConfigurationResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/EarningsListResponse.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/EarningsListResponse.java index 7d2ffed5d..03fb249aa 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/EarningsListResponse.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/EarningsListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** EarningsListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class EarningsListResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/EarningsListResponseData.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/EarningsListResponseData.java index 962a0a6be..7ff22f5ed 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/EarningsListResponseData.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/EarningsListResponseData.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** EarningsListResponseData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class EarningsListResponseData { public static final String SERIALIZED_NAME_ACCOUNT_PROFITS = "accountProfits"; @@ -101,7 +101,7 @@ public EarningsListResponseData totalNum(@jakarta.annotation.Nullable Long total } /** - * Get totalNum + * Total rows * * @return totalNum */ @@ -120,7 +120,7 @@ public EarningsListResponseData pageSize(@jakarta.annotation.Nullable Long pageS } /** - * Get pageSize + * Rows per page * * @return pageSize */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/EarningsListResponseDataAccountProfitsInner.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/EarningsListResponseDataAccountProfitsInner.java index 219fc6e5d..2ed9782d5 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/EarningsListResponseDataAccountProfitsInner.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/EarningsListResponseDataAccountProfitsInner.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** EarningsListResponseDataAccountProfitsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class EarningsListResponseDataAccountProfitsInner { public static final String SERIALIZED_NAME_TIME = "time"; @@ -94,7 +94,7 @@ public EarningsListResponseDataAccountProfitsInner time( } /** - * Get time + * Mining date * * @return time */ @@ -114,7 +114,8 @@ public EarningsListResponseDataAccountProfitsInner type( } /** - * Get type + * 0: Mining Wallet, 5: Mining Address, 7: Pool Savings, 8: Transferred, 31: Income Transfer, + * 32: Hashrate Resale-Mining Wallet, 33: Hashrate Resale-Pool Savings * * @return type */ @@ -134,7 +135,7 @@ public EarningsListResponseDataAccountProfitsInner hashTransfer( } /** - * Get hashTransfer + * Transferred hashrate * * @return hashTransfer */ @@ -154,7 +155,7 @@ public EarningsListResponseDataAccountProfitsInner transferAmount( } /** - * Get transferAmount + * Transferred income * * @return transferAmount */ @@ -175,7 +176,7 @@ public EarningsListResponseDataAccountProfitsInner dayHashRate( } /** - * Get dayHashRate + * Daily hashrate * * @return dayHashRate */ @@ -195,7 +196,7 @@ public EarningsListResponseDataAccountProfitsInner profitAmount( } /** - * Get profitAmount + * Earnings amount * * @return profitAmount */ @@ -216,7 +217,7 @@ public EarningsListResponseDataAccountProfitsInner coinName( } /** - * Get coinName + * Coin type * * @return coinName */ @@ -236,7 +237,7 @@ public EarningsListResponseDataAccountProfitsInner status( } /** - * Get status + * Status: 0 Unpaid, 1 Paying, 2 Paid * * @return status */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/ExtraBonusListResponse.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/ExtraBonusListResponse.java index 5fa327ea3..170ae2da2 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/ExtraBonusListResponse.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/ExtraBonusListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** ExtraBonusListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExtraBonusListResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/ExtraBonusListResponseData.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/ExtraBonusListResponseData.java index d8bc92216..275c7e39e 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/ExtraBonusListResponseData.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/ExtraBonusListResponseData.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** ExtraBonusListResponseData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExtraBonusListResponseData { public static final String SERIALIZED_NAME_OTHER_PROFITS = "otherProfits"; @@ -101,7 +101,7 @@ public ExtraBonusListResponseData totalNum(@jakarta.annotation.Nullable Long tot } /** - * Get totalNum + * Total rows * * @return totalNum */ @@ -120,7 +120,7 @@ public ExtraBonusListResponseData pageSize(@jakarta.annotation.Nullable Long pag } /** - * Get pageSize + * Rows per page * * @return pageSize */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/ExtraBonusListResponseDataOtherProfitsInner.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/ExtraBonusListResponseDataOtherProfitsInner.java index c3335ad26..606f11326 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/ExtraBonusListResponseDataOtherProfitsInner.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/ExtraBonusListResponseDataOtherProfitsInner.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** ExtraBonusListResponseDataOtherProfitsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExtraBonusListResponseDataOtherProfitsInner { public static final String SERIALIZED_NAME_TIME = "time"; @@ -76,7 +76,7 @@ public ExtraBonusListResponseDataOtherProfitsInner time( } /** - * Get time + * Mining date * * @return time */ @@ -96,7 +96,7 @@ public ExtraBonusListResponseDataOtherProfitsInner coinName( } /** - * Get coinName + * Coin name * * @return coinName */ @@ -116,7 +116,8 @@ public ExtraBonusListResponseDataOtherProfitsInner type( } /** - * Get type + * 1: Merged Mining, 2: Activity Bonus, 3: Rebate, 4: Smart Pool, 6: Income Transfer, 7: Pool + * Savings * * @return type */ @@ -136,7 +137,7 @@ public ExtraBonusListResponseDataOtherProfitsInner profitAmount( } /** - * Get profitAmount + * Amount * * @return profitAmount */ @@ -157,7 +158,7 @@ public ExtraBonusListResponseDataOtherProfitsInner status( } /** - * Get status + * Status: 0 Unpaid, 1 Paying, 2 Paid * * @return status */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleDetailResponse.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleDetailResponse.java index a6a4cdb14..71cd69e25 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleDetailResponse.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleDetailResponse.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** HashrateResaleDetailResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class HashrateResaleDetailResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleDetailResponseData.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleDetailResponseData.java index 6af3ee258..9549dee3c 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleDetailResponseData.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleDetailResponseData.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** HashrateResaleDetailResponseData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class HashrateResaleDetailResponseData { public static final String SERIALIZED_NAME_PROFIT_TRANSFER_DETAILS = "profitTransferDetails"; @@ -105,7 +105,7 @@ public HashrateResaleDetailResponseData totalNum(@jakarta.annotation.Nullable Lo } /** - * Get totalNum + * Total rows * * @return totalNum */ @@ -124,7 +124,7 @@ public HashrateResaleDetailResponseData pageSize(@jakarta.annotation.Nullable Lo } /** - * Get pageSize + * Rows per page * * @return pageSize */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleDetailResponseDataProfitTransferDetailsInner.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleDetailResponseDataProfitTransferDetailsInner.java index bba3a2ea9..5c0600a2e 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleDetailResponseDataProfitTransferDetailsInner.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleDetailResponseDataProfitTransferDetailsInner.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** HashrateResaleDetailResponseDataProfitTransferDetailsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class HashrateResaleDetailResponseDataProfitTransferDetailsInner { public static final String SERIALIZED_NAME_POOL_USERNAME = "poolUsername"; @@ -88,7 +88,7 @@ public HashrateResaleDetailResponseDataProfitTransferDetailsInner poolUsername( } /** - * Get poolUsername + * Transfer-out sub-account * * @return poolUsername */ @@ -108,7 +108,7 @@ public HashrateResaleDetailResponseDataProfitTransferDetailsInner toPoolUsername } /** - * Get toPoolUsername + * Transfer-in sub-account * * @return toPoolUsername */ @@ -128,7 +128,7 @@ public HashrateResaleDetailResponseDataProfitTransferDetailsInner algoName( } /** - * Get algoName + * Transfer algorithm name * * @return algoName */ @@ -148,7 +148,7 @@ public HashrateResaleDetailResponseDataProfitTransferDetailsInner hashRate( } /** - * Get hashRate + * Transferred hashrate * * @return hashRate */ @@ -168,7 +168,7 @@ public HashrateResaleDetailResponseDataProfitTransferDetailsInner day( } /** - * Get day + * Transfer date * * @return day */ @@ -188,7 +188,7 @@ public HashrateResaleDetailResponseDataProfitTransferDetailsInner amount( } /** - * Get amount + * Transferred income * * @return amount */ @@ -209,7 +209,7 @@ public HashrateResaleDetailResponseDataProfitTransferDetailsInner coinName( } /** - * Get coinName + * Income coin * * @return coinName */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleListResponse.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleListResponse.java index c611863c7..b4b6a5543 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleListResponse.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** HashrateResaleListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class HashrateResaleListResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleListResponseData.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleListResponseData.java index 89a96cbe5..845d57662 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleListResponseData.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleListResponseData.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** HashrateResaleListResponseData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class HashrateResaleListResponseData { public static final String SERIALIZED_NAME_CONFIG_DETAILS = "configDetails"; @@ -101,7 +101,7 @@ public HashrateResaleListResponseData totalNum(@jakarta.annotation.Nullable Long } /** - * Get totalNum + * Total rows * * @return totalNum */ @@ -120,7 +120,7 @@ public HashrateResaleListResponseData pageSize(@jakarta.annotation.Nullable Long } /** - * Get pageSize + * Rows per page * * @return pageSize */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleListResponseDataConfigDetailsInner.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleListResponseDataConfigDetailsInner.java index 968053402..15e52b05e 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleListResponseDataConfigDetailsInner.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleListResponseDataConfigDetailsInner.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** HashrateResaleListResponseDataConfigDetailsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class HashrateResaleListResponseDataConfigDetailsInner { public static final String SERIALIZED_NAME_CONFIG_ID = "configId"; @@ -99,7 +99,7 @@ public HashrateResaleListResponseDataConfigDetailsInner configId( } /** - * Get configId + * Configuration ID * * @return configId */ @@ -119,7 +119,7 @@ public HashrateResaleListResponseDataConfigDetailsInner poolUsername( } /** - * Get poolUsername + * Transfer-out sub-account * * @return poolUsername */ @@ -139,7 +139,7 @@ public HashrateResaleListResponseDataConfigDetailsInner toPoolUsername( } /** - * Get toPoolUsername + * Transfer-in sub-account * * @return toPoolUsername */ @@ -159,7 +159,7 @@ public HashrateResaleListResponseDataConfigDetailsInner algoName( } /** - * Get algoName + * Transfer algorithm name * * @return algoName */ @@ -179,7 +179,7 @@ public HashrateResaleListResponseDataConfigDetailsInner hashRate( } /** - * Get hashRate + * Transferred hashrate * * @return hashRate */ @@ -199,7 +199,7 @@ public HashrateResaleListResponseDataConfigDetailsInner startDay( } /** - * Get startDay + * Start date * * @return startDay */ @@ -219,7 +219,7 @@ public HashrateResaleListResponseDataConfigDetailsInner endDay( } /** - * Get endDay + * End date * * @return endDay */ @@ -239,7 +239,7 @@ public HashrateResaleListResponseDataConfigDetailsInner status( } /** - * Get status + * Status: 0 Processing, 1 Cancelled, 2 Terminated * * @return status */ @@ -259,7 +259,7 @@ public HashrateResaleListResponseDataConfigDetailsInner type( } /** - * Get type + * Type: 0 Hashrate transfer record, 1 Hashrate receive record * * @return type */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleRequestRequest.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleRequestRequest.java index 8f917a598..551f1e90e 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleRequestRequest.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleRequestRequest.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** HashrateResaleRequestRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class HashrateResaleRequestRequest { public static final String SERIALIZED_NAME_USER_NAME = "userName"; @@ -86,7 +86,7 @@ public HashrateResaleRequestRequest userName(@jakarta.annotation.Nonnull String } /** - * Get userName + * Mining Account * * @return userName */ @@ -106,7 +106,7 @@ public HashrateResaleRequestRequest algo(@jakarta.annotation.Nonnull String algo } /** - * Get algo + * Transfer algorithm * * @return algo */ @@ -126,7 +126,7 @@ public HashrateResaleRequestRequest endDate(@jakarta.annotation.Nonnull Long end } /** - * Get endDate + * Resale End Time (Millisecond timestamp) * * @return endDate */ @@ -146,7 +146,7 @@ public HashrateResaleRequestRequest startDate(@jakarta.annotation.Nonnull Long s } /** - * Get startDate + * Resale Start Time(Millisecond timestamp) * * @return startDate */ @@ -166,7 +166,7 @@ public HashrateResaleRequestRequest toPoolUser(@jakarta.annotation.Nonnull Strin } /** - * Get toPoolUser + * Mining Account * * @return toPoolUser */ @@ -186,7 +186,8 @@ public HashrateResaleRequestRequest hashRate(@jakarta.annotation.Nonnull Long ha } /** - * Get hashRate + * Resale hashrate h/s must be transferred (BTC is greater than 500000000000 ETH is greater than + * 500000) * * @return hashRate */ @@ -206,11 +207,12 @@ public HashrateResaleRequestRequest recvWindow(@jakarta.annotation.Nullable Long } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleRequestResponse.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleRequestResponse.java index bf49ad3e2..6ef02aacf 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleRequestResponse.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/HashrateResaleRequestResponse.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** HashrateResaleRequestResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class HashrateResaleRequestResponse { public static final String SERIALIZED_NAME_CODE = "code"; @@ -100,7 +100,7 @@ public HashrateResaleRequestResponse data(@jakarta.annotation.Nullable Long data } /** - * Get data + * Configuration ID * * @return data */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/MiningAccountEarningResponse.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/MiningAccountEarningResponse.java index 97cbc4791..60228f349 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/MiningAccountEarningResponse.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/MiningAccountEarningResponse.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** MiningAccountEarningResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MiningAccountEarningResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/MiningAccountEarningResponseData.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/MiningAccountEarningResponseData.java index b723a2329..60c332929 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/MiningAccountEarningResponseData.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/MiningAccountEarningResponseData.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** MiningAccountEarningResponseData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MiningAccountEarningResponseData { public static final String SERIALIZED_NAME_ACCOUNT_PROFITS = "accountProfits"; @@ -103,7 +103,7 @@ public MiningAccountEarningResponseData totalNum(@jakarta.annotation.Nullable Lo } /** - * Get totalNum + * Total records * * @return totalNum */ @@ -122,7 +122,7 @@ public MiningAccountEarningResponseData pageSize(@jakarta.annotation.Nullable Lo } /** - * Get pageSize + * Rows per page * * @return pageSize */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/MiningAccountEarningResponseDataAccountProfitsInner.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/MiningAccountEarningResponseDataAccountProfitsInner.java index 6c40815b9..a028a78c5 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/MiningAccountEarningResponseDataAccountProfitsInner.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/MiningAccountEarningResponseDataAccountProfitsInner.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** MiningAccountEarningResponseDataAccountProfitsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MiningAccountEarningResponseDataAccountProfitsInner { public static final String SERIALIZED_NAME_TIME = "time"; @@ -82,7 +82,7 @@ public MiningAccountEarningResponseDataAccountProfitsInner time( } /** - * Get time + * Time * * @return time */ @@ -102,7 +102,7 @@ public MiningAccountEarningResponseDataAccountProfitsInner coinName( } /** - * Get coinName + * Coin * * @return coinName */ @@ -122,7 +122,7 @@ public MiningAccountEarningResponseDataAccountProfitsInner type( } /** - * Get type + * 0: Referral, 1: Refund, 2: Rebate * * @return type */ @@ -142,7 +142,7 @@ public MiningAccountEarningResponseDataAccountProfitsInner puid( } /** - * Get puid + * Mining sub-account ID * * @return puid */ @@ -162,7 +162,7 @@ public MiningAccountEarningResponseDataAccountProfitsInner subName( } /** - * Get subName + * Mining account * * @return subName */ @@ -182,7 +182,7 @@ public MiningAccountEarningResponseDataAccountProfitsInner amount( } /** - * Get amount + * Amount * * @return amount */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForDetailMinerListResponse.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForDetailMinerListResponse.java index bb66541ea..257b0d1f6 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForDetailMinerListResponse.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForDetailMinerListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** RequestForDetailMinerListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RequestForDetailMinerListResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForDetailMinerListResponseDataInner.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForDetailMinerListResponseDataInner.java index 82896a375..d7a1a8971 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForDetailMinerListResponseDataInner.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForDetailMinerListResponseDataInner.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** RequestForDetailMinerListResponseDataInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RequestForDetailMinerListResponseDataInner { public static final String SERIALIZED_NAME_WORKER_NAME = "workerName"; @@ -69,7 +69,7 @@ public RequestForDetailMinerListResponseDataInner workerName( } /** - * Get workerName + * Mining account name * * @return workerName */ @@ -89,7 +89,7 @@ public RequestForDetailMinerListResponseDataInner type( } /** - * Get type + * Type of hashrate bucket * * @return type */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForDetailMinerListResponseDataInnerHashrateDatasInner.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForDetailMinerListResponseDataInnerHashrateDatasInner.java index 785d7d221..f3e4c7be3 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForDetailMinerListResponseDataInnerHashrateDatasInner.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForDetailMinerListResponseDataInnerHashrateDatasInner.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RequestForDetailMinerListResponseDataInnerHashrateDatasInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RequestForDetailMinerListResponseDataInnerHashrateDatasInner { public static final String SERIALIZED_NAME_TIME = "time"; @@ -63,7 +63,7 @@ public RequestForDetailMinerListResponseDataInnerHashrateDatasInner time( } /** - * Get time + * Time * * @return time */ @@ -83,7 +83,7 @@ public RequestForDetailMinerListResponseDataInnerHashrateDatasInner hashrate( } /** - * Get hashrate + * Hashrate * * @return hashrate */ @@ -103,7 +103,7 @@ public RequestForDetailMinerListResponseDataInnerHashrateDatasInner reject( } /** - * Get reject + * Rejection rate * * @return reject */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForMinerListResponse.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForMinerListResponse.java index 54675d92e..ec88beb01 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForMinerListResponse.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForMinerListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** RequestForMinerListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RequestForMinerListResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForMinerListResponseData.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForMinerListResponseData.java index 198b5b7b5..b8c164e1e 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForMinerListResponseData.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForMinerListResponseData.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** RequestForMinerListResponseData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RequestForMinerListResponseData { public static final String SERIALIZED_NAME_WORKER_DATAS = "workerDatas"; @@ -101,7 +101,7 @@ public RequestForMinerListResponseData totalNum(@jakarta.annotation.Nullable Lon } /** - * Get totalNum + * Total amount * * @return totalNum */ @@ -120,7 +120,7 @@ public RequestForMinerListResponseData pageSize(@jakarta.annotation.Nullable Lon } /** - * Get pageSize + * Rows per page * * @return pageSize */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForMinerListResponseDataWorkerDatasInner.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForMinerListResponseDataWorkerDatasInner.java index fd888dd38..0245f5a02 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForMinerListResponseDataWorkerDatasInner.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/RequestForMinerListResponseDataWorkerDatasInner.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** RequestForMinerListResponseDataWorkerDatasInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RequestForMinerListResponseDataWorkerDatasInner { public static final String SERIALIZED_NAME_WORKER_ID = "workerId"; @@ -88,7 +88,7 @@ public RequestForMinerListResponseDataWorkerDatasInner workerId( } /** - * Get workerId + * Miner ID * * @return workerId */ @@ -108,7 +108,7 @@ public RequestForMinerListResponseDataWorkerDatasInner workerName( } /** - * Get workerName + * Miner name * * @return workerName */ @@ -128,7 +128,7 @@ public RequestForMinerListResponseDataWorkerDatasInner status( } /** - * Get status + * Status: 1 Valid, 2 Invalid, 3 No longer valid * * @return status */ @@ -148,7 +148,7 @@ public RequestForMinerListResponseDataWorkerDatasInner hashRate( } /** - * Get hashRate + * Real-time rate * * @return hashRate */ @@ -168,7 +168,7 @@ public RequestForMinerListResponseDataWorkerDatasInner dayHashRate( } /** - * Get dayHashRate + * 24H hashrate * * @return dayHashRate */ @@ -189,7 +189,7 @@ public RequestForMinerListResponseDataWorkerDatasInner rejectRate( } /** - * Get rejectRate + * Real-time rejection rate * * @return rejectRate */ @@ -209,7 +209,7 @@ public RequestForMinerListResponseDataWorkerDatasInner lastShareTime( } /** - * Get lastShareTime + * Last share time * * @return lastShareTime */ diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/StatisticListResponse.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/StatisticListResponse.java index d71e7e695..cd752af22 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/StatisticListResponse.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/StatisticListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** StatisticListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class StatisticListResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/StatisticListResponseData.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/StatisticListResponseData.java index 133440229..e623c9d2e 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/StatisticListResponseData.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/StatisticListResponseData.java @@ -1,6 +1,6 @@ /* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. * * The version of the OpenAPI document: 1.0.0 * @@ -22,20 +22,21 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; +import java.util.HashMap; import java.util.HashSet; +import java.util.Map; import java.util.Objects; import org.hibernate.validator.constraints.*; /** StatisticListResponseData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class StatisticListResponseData { public static final String SERIALIZED_NAME_FIFTEEN_MIN_HASH_RATE = "fifteenMinHashRate"; @@ -65,13 +66,13 @@ public class StatisticListResponseData { @SerializedName(SERIALIZED_NAME_PROFIT_TODAY) @jakarta.annotation.Nullable - private StatisticListResponseDataProfitToday profitToday; + private Map profitToday; public static final String SERIALIZED_NAME_PROFIT_YESTERDAY = "profitYesterday"; @SerializedName(SERIALIZED_NAME_PROFIT_YESTERDAY) @jakarta.annotation.Nullable - private StatisticListResponseDataProfitToday profitYesterday; + private Map profitYesterday; public static final String SERIALIZED_NAME_USER_NAME = "userName"; @@ -100,7 +101,7 @@ public StatisticListResponseData fifteenMinHashRate( } /** - * Get fifteenMinHashRate + * 15-minute hashrate * * @return fifteenMinHashRate */ @@ -119,7 +120,7 @@ public StatisticListResponseData dayHashRate(@jakarta.annotation.Nullable String } /** - * Get dayHashRate + * 24H hashrate * * @return dayHashRate */ @@ -138,7 +139,7 @@ public StatisticListResponseData validNum(@jakarta.annotation.Nullable Long vali } /** - * Get validNum + * Effective quantity * * @return validNum */ @@ -157,7 +158,7 @@ public StatisticListResponseData invalidNum(@jakarta.annotation.Nullable Long in } /** - * Get invalidNum + * Invalid quantity * * @return invalidNum */ @@ -171,46 +172,62 @@ public void setInvalidNum(@jakarta.annotation.Nullable Long invalidNum) { } public StatisticListResponseData profitToday( - @jakarta.annotation.Nullable StatisticListResponseDataProfitToday profitToday) { + @jakarta.annotation.Nullable Map profitToday) { this.profitToday = profitToday; return this; } + public StatisticListResponseData putProfitTodayItem(String key, String profitTodayItem) { + if (this.profitToday == null) { + this.profitToday = new HashMap<>(); + } + this.profitToday.put(key, profitTodayItem); + return this; + } + /** - * Get profitToday + * Today's estimate. Keys are coin symbols (e.g. BTC, BSV, BCH), values are earning amounts + * as strings. * * @return profitToday */ @jakarta.annotation.Nullable - @Valid - public StatisticListResponseDataProfitToday getProfitToday() { + public Map getProfitToday() { return profitToday; } - public void setProfitToday( - @jakarta.annotation.Nullable StatisticListResponseDataProfitToday profitToday) { + public void setProfitToday(@jakarta.annotation.Nullable Map profitToday) { this.profitToday = profitToday; } public StatisticListResponseData profitYesterday( - @jakarta.annotation.Nullable StatisticListResponseDataProfitToday profitYesterday) { + @jakarta.annotation.Nullable Map profitYesterday) { this.profitYesterday = profitYesterday; return this; } + public StatisticListResponseData putProfitYesterdayItem( + String key, String profitYesterdayItem) { + if (this.profitYesterday == null) { + this.profitYesterday = new HashMap<>(); + } + this.profitYesterday.put(key, profitYesterdayItem); + return this; + } + /** - * Get profitYesterday + * Yesterday's earnings. Keys are coin symbols (e.g. BTC, BSV, BCH), values are earning + * amounts as strings. * * @return profitYesterday */ @jakarta.annotation.Nullable - @Valid - public StatisticListResponseDataProfitToday getProfitYesterday() { + public Map getProfitYesterday() { return profitYesterday; } public void setProfitYesterday( - @jakarta.annotation.Nullable StatisticListResponseDataProfitToday profitYesterday) { + @jakarta.annotation.Nullable Map profitYesterday) { this.profitYesterday = profitYesterday; } @@ -220,7 +237,7 @@ public StatisticListResponseData userName(@jakarta.annotation.Nullable String us } /** - * Get userName + * Mining account * * @return userName */ @@ -239,7 +256,7 @@ public StatisticListResponseData unit(@jakarta.annotation.Nullable String unit) } /** - * Get unit + * Unit * * @return unit */ @@ -258,7 +275,7 @@ public StatisticListResponseData algo(@jakarta.annotation.Nullable String algo) } /** - * Get algo + * Algorithm * * @return algo */ @@ -442,16 +459,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("dayHashRate").toString())); } - // validate the optional field `profitToday` - if (jsonObj.get("profitToday") != null && !jsonObj.get("profitToday").isJsonNull()) { - StatisticListResponseDataProfitToday.validateJsonElement(jsonObj.get("profitToday")); - } - // validate the optional field `profitYesterday` - if (jsonObj.get("profitYesterday") != null - && !jsonObj.get("profitYesterday").isJsonNull()) { - StatisticListResponseDataProfitToday.validateJsonElement( - jsonObj.get("profitYesterday")); - } if ((jsonObj.get("userName") != null && !jsonObj.get("userName").isJsonNull()) && !jsonObj.get("userName").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/StatisticListResponseDataProfitToday.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/StatisticListResponseDataProfitToday.java deleted file mode 100644 index 706eb9106..000000000 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/model/StatisticListResponseDataProfitToday.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Binance Mining REST API - * OpenAPI Specification for the Binance Mining REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.mining.rest.model; - -import com.binance.connector.client.mining.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** StatisticListResponseDataProfitToday */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class StatisticListResponseDataProfitToday { - public static final String SERIALIZED_NAME_B_T_C = "BTC"; - - @SerializedName(SERIALIZED_NAME_B_T_C) - @jakarta.annotation.Nullable - private String BTC; - - public static final String SERIALIZED_NAME_B_S_V = "BSV"; - - @SerializedName(SERIALIZED_NAME_B_S_V) - @jakarta.annotation.Nullable - private String BSV; - - public static final String SERIALIZED_NAME_B_C_H = "BCH"; - - @SerializedName(SERIALIZED_NAME_B_C_H) - @jakarta.annotation.Nullable - private String BCH; - - public StatisticListResponseDataProfitToday() {} - - public StatisticListResponseDataProfitToday BTC(@jakarta.annotation.Nullable String BTC) { - this.BTC = BTC; - return this; - } - - /** - * Get BTC - * - * @return BTC - */ - @jakarta.annotation.Nullable - public String getBTC() { - return BTC; - } - - public void setBTC(@jakarta.annotation.Nullable String BTC) { - this.BTC = BTC; - } - - public StatisticListResponseDataProfitToday BSV(@jakarta.annotation.Nullable String BSV) { - this.BSV = BSV; - return this; - } - - /** - * Get BSV - * - * @return BSV - */ - @jakarta.annotation.Nullable - public String getBSV() { - return BSV; - } - - public void setBSV(@jakarta.annotation.Nullable String BSV) { - this.BSV = BSV; - } - - public StatisticListResponseDataProfitToday BCH(@jakarta.annotation.Nullable String BCH) { - this.BCH = BCH; - return this; - } - - /** - * Get BCH - * - * @return BCH - */ - @jakarta.annotation.Nullable - public String getBCH() { - return BCH; - } - - public void setBCH(@jakarta.annotation.Nullable String BCH) { - this.BCH = BCH; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StatisticListResponseDataProfitToday statisticListResponseDataProfitToday = - (StatisticListResponseDataProfitToday) o; - return Objects.equals(this.BTC, statisticListResponseDataProfitToday.BTC) - && Objects.equals(this.BSV, statisticListResponseDataProfitToday.BSV) - && Objects.equals(this.BCH, statisticListResponseDataProfitToday.BCH); - } - - @Override - public int hashCode() { - return Objects.hash(BTC, BSV, BCH); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StatisticListResponseDataProfitToday {\n"); - sb.append(" BTC: ").append(toIndentedString(BTC)).append("\n"); - sb.append(" BSV: ").append(toIndentedString(BSV)).append("\n"); - sb.append(" BCH: ").append(toIndentedString(BCH)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object BTCValue = getBTC(); - String BTCValueAsString = ""; - BTCValueAsString = BTCValue.toString(); - sb.append("BTC=").append(urlEncode(BTCValueAsString)).append(""); - Object BSVValue = getBSV(); - String BSVValueAsString = ""; - BSVValueAsString = BSVValue.toString(); - sb.append("BSV=").append(urlEncode(BSVValueAsString)).append(""); - Object BCHValue = getBCH(); - String BCHValueAsString = ""; - BCHValueAsString = BCHValue.toString(); - sb.append("BCH=").append(urlEncode(BCHValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BTC"); - openapiFields.add("BSV"); - openapiFields.add("BCH"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * StatisticListResponseDataProfitToday - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StatisticListResponseDataProfitToday.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in StatisticListResponseDataProfitToday" - + " is not found in the empty JSON string", - StatisticListResponseDataProfitToday.openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("BTC") != null && !jsonObj.get("BTC").isJsonNull()) - && !jsonObj.get("BTC").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BTC` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("BTC").toString())); - } - if ((jsonObj.get("BSV") != null && !jsonObj.get("BSV").isJsonNull()) - && !jsonObj.get("BSV").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BSV` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("BSV").toString())); - } - if ((jsonObj.get("BCH") != null && !jsonObj.get("BCH").isJsonNull()) - && !jsonObj.get("BCH").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BCH` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("BCH").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StatisticListResponseDataProfitToday.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StatisticListResponseDataProfitToday' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(StatisticListResponseDataProfitToday.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, StatisticListResponseDataProfitToday value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StatisticListResponseDataProfitToday read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of StatisticListResponseDataProfitToday given an JSON string - * - * @param jsonString JSON string - * @return An instance of StatisticListResponseDataProfitToday - * @throws IOException if the JSON string is invalid with respect to - * StatisticListResponseDataProfitToday - */ - public static StatisticListResponseDataProfitToday fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, StatisticListResponseDataProfitToday.class); - } - - /** - * Convert an instance of StatisticListResponseDataProfitToday to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/mining/src/test/java/com/binance/connector/client/mining/rest/api/DefaultApiTest.java b/clients/mining/src/test/java/com/binance/connector/client/mining/rest/api/DefaultApiTest.java new file mode 100644 index 000000000..891d1f589 --- /dev/null +++ b/clients/mining/src/test/java/com/binance/connector/client/mining/rest/api/DefaultApiTest.java @@ -0,0 +1,510 @@ +/* + * Mining REST API + * Query mining status, earnings, and account data via the Binance Pool API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.mining.rest.api; + +import static org.junit.Assert.assertEquals; + +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.auth.BinanceAuthenticationFactory; +import com.binance.connector.client.common.auth.SignatureAuthentication; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.common.sign.HmacSignatureGenerator; +import com.binance.connector.client.common.sign.SignatureGenerator; +import com.binance.connector.client.mining.rest.model.AccountListResponse; +import com.binance.connector.client.mining.rest.model.AcquiringAlgorithmResponse; +import com.binance.connector.client.mining.rest.model.AcquiringCoinnameResponse; +import com.binance.connector.client.mining.rest.model.CancelHashrateResaleConfigurationRequest; +import com.binance.connector.client.mining.rest.model.CancelHashrateResaleConfigurationResponse; +import com.binance.connector.client.mining.rest.model.EarningsListResponse; +import com.binance.connector.client.mining.rest.model.ExtraBonusListResponse; +import com.binance.connector.client.mining.rest.model.HashrateResaleDetailResponse; +import com.binance.connector.client.mining.rest.model.HashrateResaleListResponse; +import com.binance.connector.client.mining.rest.model.HashrateResaleRequestRequest; +import com.binance.connector.client.mining.rest.model.HashrateResaleRequestResponse; +import com.binance.connector.client.mining.rest.model.MiningAccountEarningResponse; +import com.binance.connector.client.mining.rest.model.RequestForDetailMinerListResponse; +import com.binance.connector.client.mining.rest.model.RequestForMinerListResponse; +import com.binance.connector.client.mining.rest.model.StatisticListResponse; +import jakarta.validation.constraints.*; +import java.io.IOException; +import okhttp3.Call; +import okhttp3.Request; +import org.bouncycastle.crypto.CryptoException; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; + +/** API tests for DefaultApi */ +public class DefaultApiTest { + + private DefaultApi api; + private ApiClient apiClientSpy; + private SignatureGenerator signatureGeneratorSpy; + + @BeforeEach + public void initApiClient() throws ApiException { + ClientConfiguration clientConfiguration = new ClientConfiguration(); + clientConfiguration.setUrl("http://localhost:8080"); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setSecretKey("secretKey"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + + HmacSignatureGenerator signatureGenerator = + new HmacSignatureGenerator(signatureConfiguration.getSecretKey()); + signatureGeneratorSpy = Mockito.spy(signatureGenerator); + SignatureAuthentication signatureAuthentication = + new SignatureAuthentication( + signatureConfiguration.getApiKey(), signatureGeneratorSpy); + SignatureAuthentication authenticationSpy = Mockito.spy(signatureAuthentication); + Mockito.doReturn("1736393892000").when(authenticationSpy).buildTimestamp(); + + BinanceAuthenticationFactory factoryMock = Mockito.mock(BinanceAuthenticationFactory.class); + Mockito.doReturn(authenticationSpy) + .when(factoryMock) + .getAuthentication(signatureConfiguration); + + ApiClient apiClient = new ApiClient(clientConfiguration, factoryMock); + + apiClientSpy = Mockito.spy(apiClient); + Mockito.doReturn(new ApiResponse<>(200, null)) + .when(apiClientSpy) + .execute(Mockito.any(), Mockito.any(java.lang.reflect.Type.class)); + Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); + Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); + + api = new DefaultApi(apiClientSpy); + } + + /** + * Account List (USER_DATA) + * + *

Query Account List Weight(IP): 1 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void accountListTest() throws ApiException, CryptoException, IOException { + String algo = "sha256"; + String userName = "test"; + Long recvWindow = 5000L; + ApiResponse response = api.accountList(algo, userName, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("algo=sha256&userName=test&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("05518147bd340521fe0a08f11f7330b0bb8b42976e9cb2e54a3f1576367a5448", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/mining/statistics/user/list", actualRequest.url().encodedPath()); + } + + /** + * Acquiring Algorithm (MARKET_DATA) + * + *

Acquiring Algorithm Weight(IP): 1 Security Type: MARKET_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void acquiringAlgorithmTest() throws ApiException, CryptoException, IOException { + ApiResponse response = api.acquiringAlgorithm(); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + null, actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/mining/pub/algoList", actualRequest.url().encodedPath()); + } + + /** + * Acquiring CoinName (MARKET_DATA) + * + *

Acquiring CoinName Weight(IP): 1 Security Type: MARKET_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void acquiringCoinnameTest() throws ApiException, CryptoException, IOException { + ApiResponse response = api.acquiringCoinname(); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + null, actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/mining/pub/coinList", actualRequest.url().encodedPath()); + } + + /** + * Cancel hashrate resale configuration (USER_DATA) + * + *

Cancel hashrate resale configuration Weight(IP): 1 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void cancelHashrateResaleConfigurationTest() + throws ApiException, CryptoException, IOException { + CancelHashrateResaleConfigurationRequest cancelHashrateResaleConfigurationRequest = + new CancelHashrateResaleConfigurationRequest(); + cancelHashrateResaleConfigurationRequest.configId(168L); + cancelHashrateResaleConfigurationRequest.userName("test"); + + ApiResponse response = + api.cancelHashrateResaleConfiguration(cancelHashrateResaleConfigurationRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + "timestamp=1736393892000configId=168&userName=test", signInputCaptor.getValue()); + assertEquals( + "8ac29a5c1358d69ee45d406694a67e0c724b0110ae60bba736b1ec7ed6f57e5f", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/mining/hash-transfer/config/cancel", actualRequest.url().encodedPath()); + } + + /** + * Earnings List (USER_DATA) + * + *

Query Earnings List Weight(IP): 1 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void earningsListTest() throws ApiException, CryptoException, IOException { + String algo = "sha256"; + String userName = "test"; + String coin = "BTC"; + Long startDate = 1770736694138L; + Long endDate = 1770736694138L; + Long pageIndex = 1L; + Long pageSize = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.earningsList( + algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("algo=sha256&userName=test&coin=BTC&startDate=1770736694138&endDate=1770736694138&pageIndex=1&pageSize=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("a502ab402c8a6ee527689734d02ae815cf9c4e6e0e0a492d913626e92a53ff48", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/mining/payment/list", actualRequest.url().encodedPath()); + } + + /** + * Extra Bonus List (USER_DATA) + * + *

Extra Bonus List Weight(IP): 1 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void extraBonusListTest() throws ApiException, CryptoException, IOException { + String algo = "sha256"; + String userName = "test"; + String coin = "BTC"; + Long startDate = 1770736694138L; + Long endDate = 1770736694138L; + Long pageIndex = 1L; + Long pageSize = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.extraBonusList( + algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("algo=sha256&userName=test&coin=BTC&startDate=1770736694138&endDate=1770736694138&pageIndex=1&pageSize=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("a502ab402c8a6ee527689734d02ae815cf9c4e6e0e0a492d913626e92a53ff48", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/mining/payment/other", actualRequest.url().encodedPath()); + } + + /** + * Hashrate Resale Detail (USER_DATA) + * + *

Hashrate Resale Detail(USER_DATA) Weight(IP): 1 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void hashrateResaleDetailTest() throws ApiException, CryptoException, IOException { + Long configId = 168L; + Long pageIndex = 1L; + Long pageSize = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.hashrateResaleDetail(configId, pageIndex, pageSize, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("configId=168&pageIndex=1&pageSize=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "cfb957f7f5f89e84c3eb96d83cd6eed901b60947c857d7387b46c6020a338ed8", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/mining/hash-transfer/profit/details", actualRequest.url().encodedPath()); + } + + /** + * Hashrate Resale List (USER_DATA) + * + *

Hashrate Resale List Weight(IP): 1 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void hashrateResaleListTest() throws ApiException, CryptoException, IOException { + Long pageIndex = 1L; + Long pageSize = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.hashrateResaleList(pageIndex, pageSize, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("pageIndex=1&pageSize=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "3afaf7183f03d1042c49aa8527fffd90347a96e61867b5bfd5ae183f8fa1f746", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/mining/hash-transfer/config/details/list", actualRequest.url().encodedPath()); + } + + /** + * Hashrate Resale Request (USER_DATA) + * + *

Hashrate Resale Request Weight(IP): 1 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void hashrateResaleRequestTest() throws ApiException, CryptoException, IOException { + HashrateResaleRequestRequest hashrateResaleRequestRequest = + new HashrateResaleRequestRequest(); + hashrateResaleRequestRequest.userName("test"); + hashrateResaleRequestRequest.algo("sha256"); + hashrateResaleRequestRequest.endDate(1770736694138L); + hashrateResaleRequestRequest.startDate(1770736694138L); + hashrateResaleRequestRequest.toPoolUser("S19pro"); + hashrateResaleRequestRequest.hashRate(100000000L); + + ApiResponse response = + api.hashrateResaleRequest(hashrateResaleRequestRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000endDate=1770736694138&hashRate=100000000&toPoolUser=S19pro&userName=test&algo=sha256&startDate=1770736694138", signInputCaptor.getValue()); + assertEquals( + "a7eb79f0f158615b142438fc6fdb119ebb0a535aebb963075ab4cd6825b3c4af", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/mining/hash-transfer/config", actualRequest.url().encodedPath()); + } + + /** + * Mining Account Earning (USER_DATA) + * + *

Mining Account Earning Weight(IP): 1 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void miningAccountEarningTest() throws ApiException, CryptoException, IOException { + String algo = "sha256"; + Long startDate = 1770736694138L; + Long endDate = 1770736694138L; + Long pageIndex = 1L; + Long pageSize = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.miningAccountEarning(algo, startDate, endDate, pageIndex, pageSize, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("algo=sha256&startDate=1770736694138&endDate=1770736694138&pageIndex=1&pageSize=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "ae6b2077a850d3bf994d1c66a9b318a7ba0e8c5ee392c46f6934bd8752dc594b", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/mining/payment/uid", actualRequest.url().encodedPath()); + } + + /** + * Request for Detail Miner List (USER_DATA) + * + *

Request for Detail Miner List Weight(IP): 1 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void requestForDetailMinerListTest() throws ApiException, CryptoException, IOException { + String algo = "sha256"; + String userName = "test"; + String workerName = "bhdc1.16A10404B"; + Long recvWindow = 5000L; + ApiResponse response = + api.requestForDetailMinerList(algo, userName, workerName, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("algo=sha256&userName=test&workerName=bhdc1.16A10404B&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "bb6000cd13b802c98208a3fb719f7069a0952d49d7f77ece496c45f478c56bef", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/mining/worker/detail", actualRequest.url().encodedPath()); + } + + /** + * Request for Miner List (USER_DATA) + * + *

Request for Miner List Weight(IP): 1 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void requestForMinerListTest() throws ApiException, CryptoException, IOException { + String algo = "sha256"; + String userName = "test"; + Long pageIndex = 1L; + Long sort = 0L; + Long sortColumn = 1L; + Long workerStatus = 0L; + Long recvWindow = 5000L; + ApiResponse response = + api.requestForMinerList( + algo, userName, pageIndex, sort, sortColumn, workerStatus, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("algo=sha256&userName=test&pageIndex=1&sort=0&sortColumn=1&workerStatus=0&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "05f15b7628289441d80d57937ac1025b7a619411ffda6cf53ea099e6433f336d", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/mining/worker/list", actualRequest.url().encodedPath()); + } + + /** + * Statistic List (USER_DATA) + * + *

Statistic List Weight(IP): 1 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void statisticListTest() throws ApiException, CryptoException, IOException { + String algo = "sha256"; + String userName = "test"; + Long recvWindow = 5000L; + ApiResponse response = api.statisticList(algo, userName, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("algo=sha256&userName=test&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("05518147bd340521fe0a08f11f7330b0bb8b42976e9cb2e54a3f1576367a5448", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/mining/statistics/user/status", actualRequest.url().encodedPath()); + } +} diff --git a/clients/mining/src/test/java/com/binance/connector/client/mining/rest/api/MiningApiTest.java b/clients/mining/src/test/java/com/binance/connector/client/mining/rest/api/MiningApiTest.java index 2c774af80..97653fa0d 100644 --- a/clients/mining/src/test/java/com/binance/connector/client/mining/rest/api/MiningApiTest.java +++ b/clients/mining/src/test/java/com/binance/connector/client/mining/rest/api/MiningApiTest.java @@ -50,7 +50,7 @@ /** API tests for MiningApi */ public class MiningApiTest { - private MiningApi api; + private MiningRestApi api; private ApiClient apiClientSpy; private SignatureGenerator signatureGeneratorSpy; @@ -86,7 +86,7 @@ public void initApiClient() throws ApiException { Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); - api = new MiningApi(apiClientSpy); + api = new MiningRestApi(apiClientSpy); } /** @@ -217,7 +217,7 @@ public void earningsListTest() throws ApiException, CryptoException { Long startDate = 0L; Long endDate = 0L; Long pageIndex = 1L; - Long pageSize = 0L; + Long pageSize = 10L; Long recvWindow = 5000L; ApiResponse response = api.earningsList( @@ -234,10 +234,10 @@ public void earningsListTest() throws ApiException, CryptoException { Request actualRequest = captorValue.request(); assertEquals( - "algo=&userName=&coin=&startDate=0&endDate=0&pageIndex=1&pageSize=0&recvWindow=5000×tamp=1736393892000", + "algo=&userName=&coin=&startDate=0&endDate=0&pageIndex=1&pageSize=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "7f6636bd78ea170d9f83c50fc67019daf7418a882cd6cbe3004b3e7d9dad6ebe", + "f5b5bedc5befc8ec59e483e7124c94ca34e6383e483c18a88164526803e6f9f1", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/mining/payment/list", actualRequest.url().encodedPath()); } @@ -257,7 +257,7 @@ public void extraBonusListTest() throws ApiException, CryptoException { Long startDate = 0L; Long endDate = 0L; Long pageIndex = 1L; - Long pageSize = 0L; + Long pageSize = 10L; Long recvWindow = 5000L; ApiResponse response = api.extraBonusList( @@ -274,10 +274,10 @@ public void extraBonusListTest() throws ApiException, CryptoException { Request actualRequest = captorValue.request(); assertEquals( - "algo=&userName=&coin=&startDate=0&endDate=0&pageIndex=1&pageSize=0&recvWindow=5000×tamp=1736393892000", + "algo=&userName=&coin=&startDate=0&endDate=0&pageIndex=1&pageSize=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "7f6636bd78ea170d9f83c50fc67019daf7418a882cd6cbe3004b3e7d9dad6ebe", + "f5b5bedc5befc8ec59e483e7124c94ca34e6383e483c18a88164526803e6f9f1", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/mining/payment/other", actualRequest.url().encodedPath()); } @@ -293,7 +293,7 @@ public void extraBonusListTest() throws ApiException, CryptoException { public void hashrateResaleDetailTest() throws ApiException, CryptoException { Long configId = 1L; Long pageIndex = 1L; - Long pageSize = 0L; + Long pageSize = 10L; Long recvWindow = 5000L; ApiResponse response = api.hashrateResaleDetail(configId, pageIndex, pageSize, recvWindow); @@ -309,10 +309,10 @@ public void hashrateResaleDetailTest() throws ApiException, CryptoException { Request actualRequest = captorValue.request(); assertEquals( - "configId=1&pageIndex=1&pageSize=0&recvWindow=5000×tamp=1736393892000", + "configId=1&pageIndex=1&pageSize=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "9c805c6c53b91db70e29b00b8a524eefa85aa8a2df6112589da273da49ebb200", + "246bd97019f10e370218889d8a2e4fe03eac751b4c449b274379f069590220c3", actualRequest.url().queryParameter("signature")); assertEquals( "/sapi/v1/mining/hash-transfer/profit/details", actualRequest.url().encodedPath()); @@ -328,7 +328,7 @@ public void hashrateResaleDetailTest() throws ApiException, CryptoException { @Test public void hashrateResaleListTest() throws ApiException, CryptoException { Long pageIndex = 1L; - Long pageSize = 0L; + Long pageSize = 10L; Long recvWindow = 5000L; ApiResponse response = api.hashrateResaleList(pageIndex, pageSize, recvWindow); @@ -340,7 +340,7 @@ public void hashrateResaleListTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("d8ae1288fcf5d755677e6a954f8f825df9c16fb2c2072ecced72f4c1be96abc5", actualRequest.url().queryParameter("signature")); + assertEquals("3afaf7183f03d1042c49aa8527fffd90347a96e61867b5bfd5ae183f8fa1f746", actualRequest.url().queryParameter("signature")); assertEquals( "/sapi/v1/mining/hash-transfer/config/details/list", actualRequest.url().encodedPath()); @@ -400,7 +400,7 @@ public void miningAccountEarningTest() throws ApiException, CryptoException { Long startDate = 0L; Long endDate = 0L; Long pageIndex = 1L; - Long pageSize = 0L; + Long pageSize = 10L; Long recvWindow = 5000L; ApiResponse response = api.miningAccountEarning(algo, startDate, endDate, pageIndex, pageSize, recvWindow); @@ -416,10 +416,10 @@ public void miningAccountEarningTest() throws ApiException, CryptoException { Request actualRequest = captorValue.request(); assertEquals( - "algo=&startDate=0&endDate=0&pageIndex=1&pageSize=0&recvWindow=5000×tamp=1736393892000", + "algo=&startDate=0&endDate=0&pageIndex=1&pageSize=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "6c64a0ee43b62211c4efc572d1e296e39065c906a64f73198a5bf1b4d3669e14", + "52dcdeacbc5e9e724af6de40b7c914eab2c7b5717cf2a2f29858475ad412c019", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/mining/payment/uid", actualRequest.url().encodedPath()); } diff --git a/clients/nft/pom.xml b/clients/nft/pom.xml index 1d1f41d6c..5ae7fc32f 100644 --- a/clients/nft/pom.xml +++ b/clients/nft/pom.xml @@ -11,7 +11,7 @@ io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/pay/CHANGELOG.md b/clients/pay/CHANGELOG.md index dd2d865af..ff2745608 100644 --- a/clients/pay/CHANGELOG.md +++ b/clients/pay/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 5.0.0 - 2026-07-29 + +### Changed (1) + +- Modified response for `getPayTradeHistory()` (`GET /sapi/v1/pay/transactions`): + - `data`.items.`fundsDetail`.items.`walletAssetCost`: property `1` deleted + - `data`.items.`fundsDetail`.items.`walletAssetCost`: property `2` deleted + - `data`.items.`fundsDetail`.items.`walletAssetCost`: property `1` deleted + - `data`.items.`fundsDetail`.items.`walletAssetCost`: property `2` deleted + - `data`.items.`fundsDetail`.items.`walletAssetCost`: property `1` deleted + - `data`.items.`fundsDetail`.items.`walletAssetCost`: property `2` deleted + - `data`.items.`fundsDetail`.items.`walletAssetCost`: property `1` deleted + - `data`.items.`fundsDetail`.items.`walletAssetCost`: property `2` deleted + ## 4.0.0 - 2026-05-04 ### Changed (1) diff --git a/clients/pay/docs/DefaultApi.md b/clients/pay/docs/DefaultApi.md new file mode 100644 index 000000000..0625218aa --- /dev/null +++ b/clients/pay/docs/DefaultApi.md @@ -0,0 +1,77 @@ +# DefaultApi + +All URIs are relative to *https://api.binance.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getPayTradeHistory**](DefaultApi.md#getPayTradeHistory) | **GET** /sapi/v1/pay/transactions | Get Pay Trade History | + + + +# **getPayTradeHistory** +> GetPayTradeHistoryResponse getPayTradeHistory(startTime, endTime, limit, recvWindow) + +Get Pay Trade History + +Get Pay Trade History Weight(UID): 3000 Notes: - If `startTime` and `endTime` are not sent, the recent 90 days' data will be returned. - The max interval between `startTime` and `endTime` is 90 days. - Support for querying orders within the last 18 months. - `payerInfo` and `receiverInfo` return different fields in different `orderType` values: - C2C sender: `payerInfo=binanceId`; `receiverInfo=name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode` (based on user input). - C2C receiver: `payerInfo=name`; `receiverInfo=binanceId`. - CRYPTO_BOX sender: `payerInfo=binanceId`; `receiverInfo=name` (always `\"Crypto Box\"`). - CRYPTO_BOX receiver: `payerInfo=name`; `receiverInfo=binanceId`. - PAY sender: `payerInfo=binanceId`; `receiverInfo=name`. - PAY receiver: `payerInfo=name`; `receiverInfo=binanceId, name`. - PAY_REFUND sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`. - PAY_REFUND receiver: `payerInfo=name`; `receiverInfo=binanceId`. - PAYOUT sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`. - PAYOUT receiver: `payerInfo=name`; `receiverInfo=binanceId`. - CRYPTO_BOX_RF receiver: `payerInfo=name` (always `\"Crypto Box\"`); `receiverInfo=binanceId`. - REMITTANCE sender: `payerInfo=binanceId`; `receiverInfo=name, institutionName, cardNumber, digitalWalletId`. + +### Example +```java +// Import classes: +import com.binance.connector.client.pay.ApiClient; +import com.binance.connector.client.pay.ApiException; +import com.binance.connector.client.pay.Configuration; +import com.binance.connector.client.pay.models.*; +import com.binance.connector.client.pay.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + Long startTime = 1623319461670L; // Long | Start time in milliseconds. + Long endTime = 1641782889000L; // Long | End time in milliseconds. + Long limit = 100L; // Long | Number of records to return. + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. + try { + GetPayTradeHistoryResponse result = apiInstance.getPayTradeHistory(startTime, endTime, limit, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getPayTradeHistory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **startTime** | **Long**| Start time in milliseconds. | [optional] | +| **endTime** | **Long**| End time in milliseconds. | [optional] | +| **limit** | **Long**| Number of records to return. | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | + +### Return type + +[**GetPayTradeHistoryResponse**](GetPayTradeHistoryResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Get Pay Trade History | - | + diff --git a/clients/pay/docs/GetPayTradeHistoryResponseDataInner.md b/clients/pay/docs/GetPayTradeHistoryResponseDataInner.md index 91d102d06..83cea15f6 100644 --- a/clients/pay/docs/GetPayTradeHistoryResponseDataInner.md +++ b/clients/pay/docs/GetPayTradeHistoryResponseDataInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orderType** | **String** | | [optional] | -|**transactionId** | **String** | | [optional] | -|**transactionTime** | **Long** | | [optional] | -|**amount** | **String** | | [optional] | -|**currency** | **String** | | [optional] | -|**walletType** | **Long** | | [optional] | -|**walletTypes** | **List<Long>** | | [optional] | -|**fundsDetail** | [**List<GetPayTradeHistoryResponseDataInnerFundsDetailInner>**](GetPayTradeHistoryResponseDataInnerFundsDetailInner.md) | | [optional] | +|**orderType** | **String** | Order type. Enum: PAY, PAY_REFUND, C2C, CRYPTO_BOX, CRYPTO_BOX_RF, C2C_HOLDING, C2C_HOLDING_RF, PAYOUT, REMITTANCE. | [optional] | +|**transactionId** | **String** | Transaction ID. | [optional] | +|**transactionTime** | **Long** | Trade timestamp. | [optional] | +|**amount** | **String** | Order amount (up to 8 decimal places). Positive means income; negative means expenditure. | [optional] | +|**currency** | **String** | Order asset. | [optional] | +|**walletType** | **Long** | Main wallet type: 1=funding wallet, 2=spot wallet, 3=fiat wallet, 4 or 6=card payment, 5=earn wallet. | [optional] | +|**walletTypes** | **List<Long>** | Array format of wallet types. Multiple values may appear for combined payments. | [optional] | +|**fundsDetail** | [**List<GetPayTradeHistoryResponseDataInnerFundsDetailInner>**](GetPayTradeHistoryResponseDataInnerFundsDetailInner.md) | Funds usage details. | [optional] | |**payerInfo** | [**GetPayTradeHistoryResponseDataInnerPayerInfo**](GetPayTradeHistoryResponseDataInnerPayerInfo.md) | | [optional] | |**receiverInfo** | [**GetPayTradeHistoryResponseDataInnerReceiverInfo**](GetPayTradeHistoryResponseDataInnerReceiverInfo.md) | | [optional] | diff --git a/clients/pay/docs/GetPayTradeHistoryResponseDataInnerFundsDetailInner.md b/clients/pay/docs/GetPayTradeHistoryResponseDataInnerFundsDetailInner.md index f5ae4c32f..fb56b3990 100644 --- a/clients/pay/docs/GetPayTradeHistoryResponseDataInnerFundsDetailInner.md +++ b/clients/pay/docs/GetPayTradeHistoryResponseDataInnerFundsDetailInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**currency** | **String** | | [optional] | -|**amount** | **String** | | [optional] | -|**walletAssetCost** | [**GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost**](GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost.md) | | [optional] | +|**currency** | **String** | Asset. | [optional] | +|**amount** | **String** | Asset amount. | [optional] | +|**walletAssetCost** | **Map<String, String>** | Asset cost details per wallet type. Keys are wallet type IDs (e.g. \"1\", \"2\"), values are cost amounts. | [optional] | diff --git a/clients/pay/docs/GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost.md b/clients/pay/docs/GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost.md deleted file mode 100644 index 3bbd50551..000000000 --- a/clients/pay/docs/GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_1** | **String** | | [optional] | -|**_2** | **String** | | [optional] | - - - diff --git a/clients/pay/docs/GetPayTradeHistoryResponseDataInnerPayerInfo.md b/clients/pay/docs/GetPayTradeHistoryResponseDataInnerPayerInfo.md index 00aff2087..81e29c6f8 100644 --- a/clients/pay/docs/GetPayTradeHistoryResponseDataInnerPayerInfo.md +++ b/clients/pay/docs/GetPayTradeHistoryResponseDataInnerPayerInfo.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**binanceId** | **String** | | [optional] | +|**name** | **String** | Nickname or merchant name. | [optional] | +|**type** | **String** | Account type: USER for personal, MERCHANT for merchant. | [optional] | +|**binanceId** | **String** | Binance UID. | [optional] | diff --git a/clients/pay/docs/GetPayTradeHistoryResponseDataInnerReceiverInfo.md b/clients/pay/docs/GetPayTradeHistoryResponseDataInnerReceiverInfo.md index fe9fdb51d..daeda0cd7 100644 --- a/clients/pay/docs/GetPayTradeHistoryResponseDataInnerReceiverInfo.md +++ b/clients/pay/docs/GetPayTradeHistoryResponseDataInnerReceiverInfo.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**email** | **String** | | [optional] | -|**binanceId** | **String** | | [optional] | -|**accountId** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**phoneNumber** | **String** | | [optional] | -|**mobileCode** | **String** | | [optional] | +|**name** | **String** | Nickname or merchant name. | [optional] | +|**type** | **String** | Account type: USER for personal, MERCHANT for merchant. | [optional] | +|**email** | **String** | Email. | [optional] | +|**binanceId** | **String** | Binance UID. | [optional] | +|**accountId** | **String** | Binance Pay ID. | [optional] | +|**countryCode** | **String** | International area code. | [optional] | +|**phoneNumber** | **String** | Phone number. | [optional] | +|**mobileCode** | **String** | Country code. | [optional] | |**extend** | [**GetPayTradeHistoryResponseDataInnerReceiverInfoExtend**](GetPayTradeHistoryResponseDataInnerReceiverInfoExtend.md) | | [optional] | diff --git a/clients/pay/docs/GetPayTradeHistoryResponseDataInnerReceiverInfoExtend.md b/clients/pay/docs/GetPayTradeHistoryResponseDataInnerReceiverInfoExtend.md index 7426f5de6..4bc7b8e76 100644 --- a/clients/pay/docs/GetPayTradeHistoryResponseDataInnerReceiverInfoExtend.md +++ b/clients/pay/docs/GetPayTradeHistoryResponseDataInnerReceiverInfoExtend.md @@ -2,14 +2,15 @@ # GetPayTradeHistoryResponseDataInnerReceiverInfoExtend +Extension fields. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**institutionName** | **String** | | [optional] | -|**cardNumber** | **String** | | [optional] | -|**digitalWalletId** | **String** | | [optional] | +|**institutionName** | **String** | Bank name or digital wallet name. | [optional] | +|**cardNumber** | **String** | Card number. | [optional] | +|**digitalWalletId** | **String** | Digital wallet ID. | [optional] | diff --git a/clients/pay/docs/PayApi.md b/clients/pay/docs/PayApi.md deleted file mode 100644 index 1d2a4ffed..000000000 --- a/clients/pay/docs/PayApi.md +++ /dev/null @@ -1,77 +0,0 @@ -# PayApi - -All URIs are relative to *https://api.binance.com* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**getPayTradeHistory**](PayApi.md#getPayTradeHistory) | **GET** /sapi/v1/pay/transactions | Get Pay Trade History | - - - -# **getPayTradeHistory** -> GetPayTradeHistoryResponse getPayTradeHistory(startTime, endTime, limit, recvWindow) - -Get Pay Trade History - -Get Pay Trade History * If startTime and endTime are not sent, the recent 90 days' data will be returned. * The max interval between startTime and endTime is 90 days. * Support for querying orders within the last 18 months. * For payerInfo and receiverInfo,there are different return values in different orderTypes. * Sender's perspective when orderType is C2C * payerInfo : binanceId * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input) * Receiver's perspective when orderType is C2C * payerInfo : name * receiverInfo : binanceId * Sender's perspective when orderType is CRYPTO_BOX * payerInfo : binanceId * receiverInfo : name(the value is always \"Crypto Box\") * Receiver's perspective when orderType is CRYPTO_BOX * payerInfo : name * receiverInfo : binanceId * Sender's perspective when orderType is PAY * payerInfo : binanceId * receiverInfo : name * Receiver's perspective when orderType is PAY * payerInfo : name * receiverInfo : binanceId, name * Sender's perspective when orderType is PAY_REFUND * payerInfo : binanceId, name * receiverInfo : name, accountId * Receiver's perspective when orderType is PAY_REFUND * payerInfo : name * receiverInfo : binanceId * Sender's perspective when orderType is PAYOUT * payerInfo : binanceId, name * receiverInfo : name, accountId * Receiver's perspective when orderType is PAYOUT * payerInfo : name * receiverInfo : binanceId * Receiver's perspective when orderType is CRYPTO_BOX_RF * payerInfo : name(the value is always \"Crypto Box\") * receiverInfo : binanceId * Sender's perspective when orderType is REMITTANCE * payerInfo : binanceId * receiverInfo : name, institutionName, cardNumber, digitalWalletId Weight: 3000 - -### Example -```java -// Import classes: -import com.binance.connector.client.pay.ApiClient; -import com.binance.connector.client.pay.ApiException; -import com.binance.connector.client.pay.Configuration; -import com.binance.connector.client.pay.models.*; -import com.binance.connector.client.pay.rest.api.PayApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - PayApi apiInstance = new PayApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | default 100, max 100 - Long recvWindow = 56L; // Long | - try { - GetPayTradeHistoryResponse result = apiInstance.getPayTradeHistory(startTime, endTime, limit, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PayApi#getPayTradeHistory"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **limit** | **Long**| default 100, max 100 | [optional] | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**GetPayTradeHistoryResponse**](GetPayTradeHistoryResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Get Pay Trade History | - | - diff --git a/clients/pay/docs/rest-api/migration-guide.md b/clients/pay/docs/rest-api/migration-guide.md index 929cf858c..6c36cfc83 100644 --- a/clients/pay/docs/rest-api/migration-guide.md +++ b/clients/pay/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-pay - 4.0.0 + 5.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-pay - 4.0.0 + 5.0.0 ``` diff --git a/clients/pay/example_rest.md b/clients/pay/example_rest.md index ce2267a26..c0a9d5042 100644 --- a/clients/pay/example_rest.md +++ b/clients/pay/example_rest.md @@ -1,4 +1,4 @@ -## Pay +## Default -[GET /sapi/v1/pay/transactions](https://developers.binance.com/docs/pay/rest-api/Get-Pay-Trade-History) - getPayTradeHistory - [GetPayTradeHistoryExample.java:66](/examples/pay/src/main/java/com/binance/connector/client/pay/rest/pay/GetPayTradeHistoryExample.java#L66) +[GET /sapi/v1/pay/transactions](https://developers.binance.com/en/docs/catalog/investment-and-services-pay/api/rest-api/~#get-pay-trade-history) - getPayTradeHistory - [GetPayTradeHistoryExample.java:56](/examples/pay/src/main/java/com/binance/connector/client/pay/rest/defaultpkg/GetPayTradeHistoryExample.java#L56) diff --git a/clients/pay/pom.xml b/clients/pay/pom.xml index bda773580..35ce66b26 100644 --- a/clients/pay/pom.xml +++ b/clients/pay/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-pay pay - 4.0.0 + 5.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/JSON.java b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/JSON.java index 8aa448163..e5767c7b9 100644 --- a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/JSON.java +++ b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/JSON.java @@ -1,6 +1,6 @@ /* * Binance Pay REST API - * OpenAPI Specification for the Binance Pay REST API + * Query Binance Pay transaction history. * * The version of the OpenAPI document: 1.0.0 * @@ -118,10 +118,6 @@ private static Class getClassByDiscriminator( new com.binance.connector.client.pay.rest.model .GetPayTradeHistoryResponseDataInnerFundsDetailInner .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.pay.rest.model - .GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.pay.rest.model .GetPayTradeHistoryResponseDataInnerPayerInfo.CustomTypeAdapterFactory()); diff --git a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/api/DefaultApi.java b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/api/DefaultApi.java new file mode 100644 index 000000000..98fa53d73 --- /dev/null +++ b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/api/DefaultApi.java @@ -0,0 +1,263 @@ +/* + * Binance Pay REST API + * Query Binance Pay transaction history. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.pay.rest.api; + +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.Pair; +import com.binance.connector.client.common.SystemUtil; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.exception.ConstraintViolationException; +import com.binance.connector.client.pay.rest.model.GetPayTradeHistoryResponse; +import com.google.gson.reflect.TypeToken; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Validation; +import jakarta.validation.Validator; +import jakarta.validation.constraints.*; +import jakarta.validation.executable.ExecutableValidator; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; + +public class DefaultApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + private static final String USER_AGENT = + String.format( + "binance-pay/5.0.0 (Java/%s; %s; %s)", + SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); + private static final boolean HAS_TIME_UNIT = false; + + public DefaultApi(ClientConfiguration clientConfiguration) { + this(new ApiClient(clientConfiguration)); + } + + public DefaultApi(ApiClient apiClient) { + apiClient.setUserAgent(USER_AGENT); + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getPayTradeHistory + * + * @param startTime Start time in milliseconds. (optional) + * @param endTime End time in milliseconds. (optional) + * @param limit Number of records to return. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get Pay Trade History -
+ * + * @see Get + * Pay Trade History Documentation + */ + private okhttp3.Call getPayTradeHistoryCall( + Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/pay/transactions"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (startTime != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("startTime", startTime)); + } + + if (endTime != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endTime", endTime)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getPayTradeHistoryValidateBeforeCall( + Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {startTime, endTime, limit, recvWindow}; + Method method = + this.getClass() + .getMethod( + "getPayTradeHistory", + Long.class, + Long.class, + Long.class, + Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return getPayTradeHistoryCall(startTime, endTime, limit, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Get Pay Trade History Get Pay Trade History Weight(UID): 3000 Notes: - If + * `startTime` and `endTime` are not sent, the recent 90 days' data will + * be returned. - The max interval between `startTime` and `endTime` is 90 + * days. - Support for querying orders within the last 18 months. - `payerInfo` and + * `receiverInfo` return different fields in different `orderType` values: - + * C2C sender: `payerInfo=binanceId`; `receiverInfo=name, + * binanceId/accountId/email/countryCode/phoneNumber/mobileCode` (based on user input). - + * C2C receiver: `payerInfo=name`; `receiverInfo=binanceId`. - + * CRYPTO_BOX sender: `payerInfo=binanceId`; `receiverInfo=name` + * (always `\"Crypto Box\"`). - CRYPTO_BOX receiver: + * `payerInfo=name`; `receiverInfo=binanceId`. - PAY sender: + * `payerInfo=binanceId`; `receiverInfo=name`. - PAY receiver: + * `payerInfo=name`; `receiverInfo=binanceId, name`. - PAY_REFUND + * sender: `payerInfo=binanceId, name`; `receiverInfo=name, + * accountId`. - PAY_REFUND receiver: `payerInfo=name`; + * `receiverInfo=binanceId`. - PAYOUT sender: `payerInfo=binanceId, + * name`; `receiverInfo=name, accountId`. - PAYOUT receiver: + * `payerInfo=name`; `receiverInfo=binanceId`. - CRYPTO_BOX_RF + * receiver: `payerInfo=name` (always `\"Crypto Box\"`); + * `receiverInfo=binanceId`. - REMITTANCE sender: + * `payerInfo=binanceId`; `receiverInfo=name, institutionName, + * cardNumber, digitalWalletId`. + * + * @param startTime Start time in milliseconds. (optional) + * @param endTime End time in milliseconds. (optional) + * @param limit Number of records to return. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return ApiResponse<GetPayTradeHistoryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get Pay Trade History -
+ * + * @see Get + * Pay Trade History Documentation + */ + public ApiResponse getPayTradeHistory( + Long startTime, Long endTime, @Max(100L) Long limit, @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = + getPayTradeHistoryValidateBeforeCall(startTime, endTime, limit, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } +} diff --git a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/api/PayApi.java b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/api/PayApi.java deleted file mode 100644 index 35aa0fcc0..000000000 --- a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/api/PayApi.java +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Binance Pay REST API - * OpenAPI Specification for the Binance Pay REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.pay.rest.api; - -import com.binance.connector.client.common.ApiClient; -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.Pair; -import com.binance.connector.client.common.SystemUtil; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.exception.ConstraintViolationException; -import com.binance.connector.client.pay.rest.model.GetPayTradeHistoryResponse; -import com.google.gson.reflect.TypeToken; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.Validation; -import jakarta.validation.Validator; -import jakarta.validation.constraints.*; -import jakarta.validation.executable.ExecutableValidator; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; - -public class PayApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - private static final String USER_AGENT = - String.format( - "binance-pay/4.0.0 (Java/%s; %s; %s)", - SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); - private static final boolean HAS_TIME_UNIT = false; - - public PayApi(ClientConfiguration clientConfiguration) { - this(new ApiClient(clientConfiguration)); - } - - public PayApi(ApiClient apiClient) { - apiClient.setUserAgent(USER_AGENT); - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for getPayTradeHistory - * - * @param startTime (optional) - * @param endTime (optional) - * @param limit default 100, max 100 (optional) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get Pay Trade History -
- * - * @see Get Pay - * Trade History Documentation - */ - private okhttp3.Call getPayTradeHistoryCall( - Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/pay/transactions"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (startTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("startTime", startTime)); - } - - if (endTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("endTime", endTime)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getPayTradeHistoryValidateBeforeCall( - Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {startTime, endTime, limit, recvWindow}; - Method method = - this.getClass() - .getMethod( - "getPayTradeHistory", - Long.class, - Long.class, - Long.class, - Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return getPayTradeHistoryCall(startTime, endTime, limit, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Get Pay Trade History Get Pay Trade History * If startTime and endTime are not sent, the - * recent 90 days' data will be returned. * The max interval between startTime and endTime - * is 90 days. * Support for querying orders within the last 18 months. * For payerInfo and - * receiverInfo,there are different return values in different orderTypes. * Sender's - * perspective when orderType is C2C * payerInfo : binanceId * receiverInfo : name, - * binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input) * - * Receiver's perspective when orderType is C2C * payerInfo : name * receiverInfo : - * binanceId * Sender's perspective when orderType is CRYPTO_BOX * payerInfo : binanceId * - * receiverInfo : name(the value is always \"Crypto Box\") * Receiver's - * perspective when orderType is CRYPTO_BOX * payerInfo : name * receiverInfo : binanceId * - * Sender's perspective when orderType is PAY * payerInfo : binanceId * receiverInfo : name - * * Receiver's perspective when orderType is PAY * payerInfo : name * receiverInfo : - * binanceId, name * Sender's perspective when orderType is PAY_REFUND * payerInfo : - * binanceId, name * receiverInfo : name, accountId * Receiver's perspective when orderType - * is PAY_REFUND * payerInfo : name * receiverInfo : binanceId * Sender's perspective when - * orderType is PAYOUT * payerInfo : binanceId, name * receiverInfo : name, accountId * - * Receiver's perspective when orderType is PAYOUT * payerInfo : name * receiverInfo : - * binanceId * Receiver's perspective when orderType is CRYPTO_BOX_RF * payerInfo : name(the - * value is always \"Crypto Box\") * receiverInfo : binanceId * Sender's - * perspective when orderType is REMITTANCE * payerInfo : binanceId * receiverInfo : name, - * institutionName, cardNumber, digitalWalletId Weight: 3000 - * - * @param startTime (optional) - * @param endTime (optional) - * @param limit default 100, max 100 (optional) - * @param recvWindow (optional) - * @return ApiResponse<GetPayTradeHistoryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get Pay Trade History -
- * - * @see Get Pay - * Trade History Documentation - */ - public ApiResponse getPayTradeHistory( - Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { - okhttp3.Call localVarCall = - getPayTradeHistoryValidateBeforeCall(startTime, endTime, limit, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } -} diff --git a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/api/PayRestApi.java b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/api/PayRestApi.java index a4c7378a0..b8c772b9c 100644 --- a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/api/PayRestApi.java +++ b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/api/PayRestApi.java @@ -9,43 +9,44 @@ public class PayRestApi { - private final PayApi payApi; + private final DefaultApi defaultApi; public PayRestApi(ClientConfiguration configuration) { this(PayRestApiUtil.getDefaultClient(configuration)); } public PayRestApi(ApiClient apiClient) { - this.payApi = new PayApi(apiClient); + this.defaultApi = new DefaultApi(apiClient); } /** - * Get Pay Trade History Get Pay Trade History * If startTime and endTime are not sent, the - * recent 90 days' data will be returned. * The max interval between startTime and endTime - * is 90 days. * Support for querying orders within the last 18 months. * For payerInfo and - * receiverInfo,there are different return values in different orderTypes. * Sender's - * perspective when orderType is C2C * payerInfo : binanceId * receiverInfo : name, - * binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input) * - * Receiver's perspective when orderType is C2C * payerInfo : name * receiverInfo : - * binanceId * Sender's perspective when orderType is CRYPTO_BOX * payerInfo : binanceId * - * receiverInfo : name(the value is always \"Crypto Box\") * Receiver's - * perspective when orderType is CRYPTO_BOX * payerInfo : name * receiverInfo : binanceId * - * Sender's perspective when orderType is PAY * payerInfo : binanceId * receiverInfo : name - * * Receiver's perspective when orderType is PAY * payerInfo : name * receiverInfo : - * binanceId, name * Sender's perspective when orderType is PAY_REFUND * payerInfo : - * binanceId, name * receiverInfo : name, accountId * Receiver's perspective when orderType - * is PAY_REFUND * payerInfo : name * receiverInfo : binanceId * Sender's perspective when - * orderType is PAYOUT * payerInfo : binanceId, name * receiverInfo : name, accountId * - * Receiver's perspective when orderType is PAYOUT * payerInfo : name * receiverInfo : - * binanceId * Receiver's perspective when orderType is CRYPTO_BOX_RF * payerInfo : name(the - * value is always \"Crypto Box\") * receiverInfo : binanceId * Sender's - * perspective when orderType is REMITTANCE * payerInfo : binanceId * receiverInfo : name, - * institutionName, cardNumber, digitalWalletId Weight: 3000 + * Get Pay Trade History Get Pay Trade History Weight(UID): 3000 Notes: - If + * `startTime` and `endTime` are not sent, the recent 90 days' data will + * be returned. - The max interval between `startTime` and `endTime` is 90 + * days. - Support for querying orders within the last 18 months. - `payerInfo` and + * `receiverInfo` return different fields in different `orderType` values: - + * C2C sender: `payerInfo=binanceId`; `receiverInfo=name, + * binanceId/accountId/email/countryCode/phoneNumber/mobileCode` (based on user input). - + * C2C receiver: `payerInfo=name`; `receiverInfo=binanceId`. - + * CRYPTO_BOX sender: `payerInfo=binanceId`; `receiverInfo=name` + * (always `\"Crypto Box\"`). - CRYPTO_BOX receiver: + * `payerInfo=name`; `receiverInfo=binanceId`. - PAY sender: + * `payerInfo=binanceId`; `receiverInfo=name`. - PAY receiver: + * `payerInfo=name`; `receiverInfo=binanceId, name`. - PAY_REFUND + * sender: `payerInfo=binanceId, name`; `receiverInfo=name, + * accountId`. - PAY_REFUND receiver: `payerInfo=name`; + * `receiverInfo=binanceId`. - PAYOUT sender: `payerInfo=binanceId, + * name`; `receiverInfo=name, accountId`. - PAYOUT receiver: + * `payerInfo=name`; `receiverInfo=binanceId`. - CRYPTO_BOX_RF + * receiver: `payerInfo=name` (always `\"Crypto Box\"`); + * `receiverInfo=binanceId`. - REMITTANCE sender: + * `payerInfo=binanceId`; `receiverInfo=name, institutionName, + * cardNumber, digitalWalletId`. * - * @param startTime (optional) - * @param endTime (optional) - * @param limit default 100, max 100 (optional) - * @param recvWindow (optional) + * @param startTime Start time in milliseconds. (optional) + * @param endTime End time in milliseconds. (optional) + * @param limit Number of records to return. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetPayTradeHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -56,11 +57,12 @@ public PayRestApi(ApiClient apiClient) { * 200 Get Pay Trade History - * * - * @see Get Pay - * Trade History Documentation + * @see Get + * Pay Trade History Documentation */ public ApiResponse getPayTradeHistory( Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { - return payApi.getPayTradeHistory(startTime, endTime, limit, recvWindow); + return defaultApi.getPayTradeHistory(startTime, endTime, limit, recvWindow); } } diff --git a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponse.java b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponse.java index a5ec81792..8105be17f 100644 --- a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponse.java +++ b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponse.java @@ -1,6 +1,6 @@ /* * Binance Pay REST API - * OpenAPI Specification for the Binance Pay REST API + * Query Binance Pay transaction history. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetPayTradeHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetPayTradeHistoryResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInner.java b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInner.java index 0cf35efde..9781c1927 100644 --- a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInner.java +++ b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInner.java @@ -1,6 +1,6 @@ /* * Binance Pay REST API - * OpenAPI Specification for the Binance Pay REST API + * Query Binance Pay transaction history. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetPayTradeHistoryResponseDataInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetPayTradeHistoryResponseDataInner { public static final String SERIALIZED_NAME_ORDER_TYPE = "orderType"; @@ -111,7 +111,8 @@ public GetPayTradeHistoryResponseDataInner orderType( } /** - * Get orderType + * Order type. Enum: PAY, PAY_REFUND, C2C, CRYPTO_BOX, CRYPTO_BOX_RF, C2C_HOLDING, + * C2C_HOLDING_RF, PAYOUT, REMITTANCE. * * @return orderType */ @@ -131,7 +132,7 @@ public GetPayTradeHistoryResponseDataInner transactionId( } /** - * Get transactionId + * Transaction ID. * * @return transactionId */ @@ -151,7 +152,7 @@ public GetPayTradeHistoryResponseDataInner transactionTime( } /** - * Get transactionTime + * Trade timestamp. * * @return transactionTime */ @@ -170,7 +171,7 @@ public GetPayTradeHistoryResponseDataInner amount(@jakarta.annotation.Nullable S } /** - * Get amount + * Order amount (up to 8 decimal places). Positive means income; negative means expenditure. * * @return amount */ @@ -190,7 +191,7 @@ public GetPayTradeHistoryResponseDataInner currency( } /** - * Get currency + * Order asset. * * @return currency */ @@ -210,7 +211,8 @@ public GetPayTradeHistoryResponseDataInner walletType( } /** - * Get walletType + * Main wallet type: 1=funding wallet, 2=spot wallet, 3=fiat wallet, 4 or + * 6=card payment, 5=earn wallet. * * @return walletType */ @@ -238,7 +240,7 @@ public GetPayTradeHistoryResponseDataInner addWalletTypesItem(Long walletTypesIt } /** - * Get walletTypes + * Array format of wallet types. Multiple values may appear for combined payments. * * @return walletTypes */ @@ -268,7 +270,7 @@ public GetPayTradeHistoryResponseDataInner addFundsDetailItem( } /** - * Get fundsDetail + * Funds usage details. * * @return fundsDetail */ diff --git a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerFundsDetailInner.java b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerFundsDetailInner.java index 595dda37d..518f64e85 100644 --- a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerFundsDetailInner.java +++ b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerFundsDetailInner.java @@ -1,6 +1,6 @@ /* * Binance Pay REST API - * OpenAPI Specification for the Binance Pay REST API + * Query Binance Pay transaction history. * * The version of the OpenAPI document: 1.0.0 * @@ -22,20 +22,21 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; +import java.util.HashMap; import java.util.HashSet; +import java.util.Map; import java.util.Objects; import org.hibernate.validator.constraints.*; /** GetPayTradeHistoryResponseDataInnerFundsDetailInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetPayTradeHistoryResponseDataInnerFundsDetailInner { public static final String SERIALIZED_NAME_CURRENCY = "currency"; @@ -53,7 +54,7 @@ public class GetPayTradeHistoryResponseDataInnerFundsDetailInner { @SerializedName(SERIALIZED_NAME_WALLET_ASSET_COST) @jakarta.annotation.Nullable - private GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost walletAssetCost; + private Map walletAssetCost; public GetPayTradeHistoryResponseDataInnerFundsDetailInner() {} @@ -64,7 +65,7 @@ public GetPayTradeHistoryResponseDataInnerFundsDetailInner currency( } /** - * Get currency + * Asset. * * @return currency */ @@ -84,7 +85,7 @@ public GetPayTradeHistoryResponseDataInnerFundsDetailInner amount( } /** - * Get amount + * Asset amount. * * @return amount */ @@ -98,28 +99,33 @@ public void setAmount(@jakarta.annotation.Nullable String amount) { } public GetPayTradeHistoryResponseDataInnerFundsDetailInner walletAssetCost( - @jakarta.annotation.Nullable - GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost - walletAssetCost) { + @jakarta.annotation.Nullable Map walletAssetCost) { this.walletAssetCost = walletAssetCost; return this; } + public GetPayTradeHistoryResponseDataInnerFundsDetailInner putWalletAssetCostItem( + String key, String walletAssetCostItem) { + if (this.walletAssetCost == null) { + this.walletAssetCost = new HashMap<>(); + } + this.walletAssetCost.put(key, walletAssetCostItem); + return this; + } + /** - * Get walletAssetCost + * Asset cost details per wallet type. Keys are wallet type IDs (e.g. \"1\", + * \"2\"), values are cost amounts. * * @return walletAssetCost */ @jakarta.annotation.Nullable - @Valid - public GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost getWalletAssetCost() { + public Map getWalletAssetCost() { return walletAssetCost; } public void setWalletAssetCost( - @jakarta.annotation.Nullable - GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost - walletAssetCost) { + @jakarta.annotation.Nullable Map walletAssetCost) { this.walletAssetCost = walletAssetCost; } @@ -248,12 +254,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("amount").toString())); } - // validate the optional field `walletAssetCost` - if (jsonObj.get("walletAssetCost") != null - && !jsonObj.get("walletAssetCost").isJsonNull()) { - GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost.validateJsonElement( - jsonObj.get("walletAssetCost")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost.java b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost.java deleted file mode 100644 index 38f6427f2..000000000 --- a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Binance Pay REST API - * OpenAPI Specification for the Binance Pay REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.pay.rest.model; - -import com.binance.connector.client.pay.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost { - public static final String SERIALIZED_NAME_1 = "1"; - - @SerializedName(SERIALIZED_NAME_1) - @jakarta.annotation.Nullable - private String _1; - - public static final String SERIALIZED_NAME_2 = "2"; - - @SerializedName(SERIALIZED_NAME_2) - @jakarta.annotation.Nullable - private String _2; - - public GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost() {} - - public GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost _1( - @jakarta.annotation.Nullable String _1) { - this._1 = _1; - return this; - } - - /** - * Get _1 - * - * @return _1 - */ - @jakarta.annotation.Nullable - public String get1() { - return _1; - } - - public void set1(@jakarta.annotation.Nullable String _1) { - this._1 = _1; - } - - public GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost _2( - @jakarta.annotation.Nullable String _2) { - this._2 = _2; - return this; - } - - /** - * Get _2 - * - * @return _2 - */ - @jakarta.annotation.Nullable - public String get2() { - return _2; - } - - public void set2(@jakarta.annotation.Nullable String _2) { - this._2 = _2; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost - getPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost = - (GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost) o; - return Objects.equals( - this._1, - getPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost._1) - && Objects.equals( - this._2, - getPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost._2); - } - - @Override - public int hashCode() { - return Objects.hash(_1, _2); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost {\n"); - sb.append(" _1: ").append(toIndentedString(_1)).append("\n"); - sb.append(" _2: ").append(toIndentedString(_2)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object _1Value = get1(); - String _1ValueAsString = ""; - _1ValueAsString = _1Value.toString(); - sb.append("_1=").append(urlEncode(_1ValueAsString)).append(""); - Object _2Value = get2(); - String _2ValueAsString = ""; - _2ValueAsString = _2Value.toString(); - sb.append("_2=").append(urlEncode(_2ValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("1"); - openapiFields.add("2"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost - .openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost" - + " is not found in the empty JSON string", - GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost - .openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("1") != null && !jsonObj.get("1").isJsonNull()) - && !jsonObj.get("1").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `1` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("1").toString())); - } - if ((jsonObj.get("2") != null && !jsonObj.get("2").isJsonNull()) - && !jsonObj.get("2").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `2` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("2").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost.class - .isAssignableFrom(type.getRawType())) { - return null; // this class only serializes - // 'GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter - thisAdapter = - gson.getDelegateAdapter( - this, - TypeToken.get( - GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost - .class)); - - return (TypeAdapter) - new TypeAdapter< - GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost>() { - @Override - public void write( - JsonWriter out, - GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost - value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost - read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost - * given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost - * @throws IOException if the JSON string is invalid with respect to - * GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost - */ - public static GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost fromJson( - String jsonString) throws IOException { - return JSON.getGson() - .fromJson( - jsonString, - GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost.class); - } - - /** - * Convert an instance of GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost to - * an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerPayerInfo.java b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerPayerInfo.java index 0c4e15681..65d2d22b1 100644 --- a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerPayerInfo.java +++ b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerPayerInfo.java @@ -1,6 +1,6 @@ /* * Binance Pay REST API - * OpenAPI Specification for the Binance Pay REST API + * Query Binance Pay transaction history. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetPayTradeHistoryResponseDataInnerPayerInfo */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetPayTradeHistoryResponseDataInnerPayerInfo { public static final String SERIALIZED_NAME_NAME = "name"; @@ -63,7 +63,7 @@ public GetPayTradeHistoryResponseDataInnerPayerInfo name( } /** - * Get name + * Nickname or merchant name. * * @return name */ @@ -83,7 +83,7 @@ public GetPayTradeHistoryResponseDataInnerPayerInfo type( } /** - * Get type + * Account type: USER for personal, MERCHANT for merchant. * * @return type */ @@ -103,7 +103,7 @@ public GetPayTradeHistoryResponseDataInnerPayerInfo binanceId( } /** - * Get binanceId + * Binance UID. * * @return binanceId */ diff --git a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerReceiverInfo.java b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerReceiverInfo.java index f62495d09..7c7c9c730 100644 --- a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerReceiverInfo.java +++ b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerReceiverInfo.java @@ -1,6 +1,6 @@ /* * Binance Pay REST API - * OpenAPI Specification for the Binance Pay REST API + * Query Binance Pay transaction history. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetPayTradeHistoryResponseDataInnerReceiverInfo */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetPayTradeHistoryResponseDataInnerReceiverInfo { public static final String SERIALIZED_NAME_NAME = "name"; @@ -100,7 +100,7 @@ public GetPayTradeHistoryResponseDataInnerReceiverInfo name( } /** - * Get name + * Nickname or merchant name. * * @return name */ @@ -120,7 +120,7 @@ public GetPayTradeHistoryResponseDataInnerReceiverInfo type( } /** - * Get type + * Account type: USER for personal, MERCHANT for merchant. * * @return type */ @@ -140,7 +140,7 @@ public GetPayTradeHistoryResponseDataInnerReceiverInfo email( } /** - * Get email + * Email. * * @return email */ @@ -160,7 +160,7 @@ public GetPayTradeHistoryResponseDataInnerReceiverInfo binanceId( } /** - * Get binanceId + * Binance UID. * * @return binanceId */ @@ -180,7 +180,7 @@ public GetPayTradeHistoryResponseDataInnerReceiverInfo accountId( } /** - * Get accountId + * Binance Pay ID. * * @return accountId */ @@ -200,7 +200,7 @@ public GetPayTradeHistoryResponseDataInnerReceiverInfo countryCode( } /** - * Get countryCode + * International area code. * * @return countryCode */ @@ -220,7 +220,7 @@ public GetPayTradeHistoryResponseDataInnerReceiverInfo phoneNumber( } /** - * Get phoneNumber + * Phone number. * * @return phoneNumber */ @@ -240,7 +240,7 @@ public GetPayTradeHistoryResponseDataInnerReceiverInfo mobileCode( } /** - * Get mobileCode + * Country code. * * @return mobileCode */ diff --git a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerReceiverInfoExtend.java b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerReceiverInfoExtend.java index 43bd1c4c6..572904018 100644 --- a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerReceiverInfoExtend.java +++ b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/model/GetPayTradeHistoryResponseDataInnerReceiverInfoExtend.java @@ -1,6 +1,6 @@ /* * Binance Pay REST API - * OpenAPI Specification for the Binance Pay REST API + * Query Binance Pay transaction history. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** GetPayTradeHistoryResponseDataInnerReceiverInfoExtend */ +/** Extension fields. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetPayTradeHistoryResponseDataInnerReceiverInfoExtend { public static final String SERIALIZED_NAME_INSTITUTION_NAME = "institutionName"; @@ -63,7 +63,7 @@ public GetPayTradeHistoryResponseDataInnerReceiverInfoExtend institutionName( } /** - * Get institutionName + * Bank name or digital wallet name. * * @return institutionName */ @@ -83,7 +83,7 @@ public GetPayTradeHistoryResponseDataInnerReceiverInfoExtend cardNumber( } /** - * Get cardNumber + * Card number. * * @return cardNumber */ @@ -103,7 +103,7 @@ public GetPayTradeHistoryResponseDataInnerReceiverInfoExtend digitalWalletId( } /** - * Get digitalWalletId + * Digital wallet ID. * * @return digitalWalletId */ diff --git a/clients/pay/src/test/java/com/binance/connector/client/pay/rest/api/DefaultApiTest.java b/clients/pay/src/test/java/com/binance/connector/client/pay/rest/api/DefaultApiTest.java new file mode 100644 index 000000000..67320b108 --- /dev/null +++ b/clients/pay/src/test/java/com/binance/connector/client/pay/rest/api/DefaultApiTest.java @@ -0,0 +1,131 @@ +/* + * Binance Pay REST API + * Query Binance Pay transaction history. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.pay.rest.api; + +import static org.junit.Assert.assertEquals; + +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.auth.BinanceAuthenticationFactory; +import com.binance.connector.client.common.auth.SignatureAuthentication; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.common.sign.HmacSignatureGenerator; +import com.binance.connector.client.common.sign.SignatureGenerator; +import com.binance.connector.client.pay.rest.model.GetPayTradeHistoryResponse; +import jakarta.validation.constraints.*; +import java.io.IOException; +import okhttp3.Call; +import okhttp3.Request; +import org.bouncycastle.crypto.CryptoException; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; + +/** API tests for DefaultApi */ +public class DefaultApiTest { + + private DefaultApi api; + private ApiClient apiClientSpy; + private SignatureGenerator signatureGeneratorSpy; + + @BeforeEach + public void initApiClient() throws ApiException { + ClientConfiguration clientConfiguration = new ClientConfiguration(); + clientConfiguration.setUrl("http://localhost:8080"); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setSecretKey("secretKey"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + + HmacSignatureGenerator signatureGenerator = + new HmacSignatureGenerator(signatureConfiguration.getSecretKey()); + signatureGeneratorSpy = Mockito.spy(signatureGenerator); + SignatureAuthentication signatureAuthentication = + new SignatureAuthentication( + signatureConfiguration.getApiKey(), signatureGeneratorSpy); + SignatureAuthentication authenticationSpy = Mockito.spy(signatureAuthentication); + Mockito.doReturn("1736393892000").when(authenticationSpy).buildTimestamp(); + + BinanceAuthenticationFactory factoryMock = Mockito.mock(BinanceAuthenticationFactory.class); + Mockito.doReturn(authenticationSpy) + .when(factoryMock) + .getAuthentication(signatureConfiguration); + + ApiClient apiClient = new ApiClient(clientConfiguration, factoryMock); + + apiClientSpy = Mockito.spy(apiClient); + Mockito.doReturn(new ApiResponse<>(200, null)) + .when(apiClientSpy) + .execute(Mockito.any(), Mockito.any(java.lang.reflect.Type.class)); + Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); + Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); + + api = new DefaultApi(apiClientSpy); + } + + /** + * Get Pay Trade History + * + *

Get Pay Trade History Weight(UID): 3000 Notes: - If `startTime` and + * `endTime` are not sent, the recent 90 days' data will be returned. - The max + * interval between `startTime` and `endTime` is 90 days. - Support for + * querying orders within the last 18 months. - `payerInfo` and + * `receiverInfo` return different fields in different `orderType` values: - + * C2C sender: `payerInfo=binanceId`; `receiverInfo=name, + * binanceId/accountId/email/countryCode/phoneNumber/mobileCode` (based on user input). - + * C2C receiver: `payerInfo=name`; `receiverInfo=binanceId`. - + * CRYPTO_BOX sender: `payerInfo=binanceId`; `receiverInfo=name` + * (always `\"Crypto Box\"`). - CRYPTO_BOX receiver: + * `payerInfo=name`; `receiverInfo=binanceId`. - PAY sender: + * `payerInfo=binanceId`; `receiverInfo=name`. - PAY receiver: + * `payerInfo=name`; `receiverInfo=binanceId, name`. - PAY_REFUND + * sender: `payerInfo=binanceId, name`; `receiverInfo=name, + * accountId`. - PAY_REFUND receiver: `payerInfo=name`; + * `receiverInfo=binanceId`. - PAYOUT sender: `payerInfo=binanceId, + * name`; `receiverInfo=name, accountId`. - PAYOUT receiver: + * `payerInfo=name`; `receiverInfo=binanceId`. - CRYPTO_BOX_RF + * receiver: `payerInfo=name` (always `\"Crypto Box\"`); + * `receiverInfo=binanceId`. - REMITTANCE sender: + * `payerInfo=binanceId`; `receiverInfo=name, institutionName, + * cardNumber, digitalWalletId`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getPayTradeHistoryTest() throws ApiException, CryptoException, IOException { + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long limit = 100L; + Long recvWindow = 5000L; + ApiResponse response = + api.getPayTradeHistory(startTime, endTime, limit, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("startTime=1623319461670&endTime=1641782889000&limit=100&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "23689f3330f331d9db9c46c9dc87d2217486442f1746adfdda02c10e3dbde13e", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/pay/transactions", actualRequest.url().encodedPath()); + } +} diff --git a/clients/pay/src/test/java/com/binance/connector/client/pay/rest/api/PayApiTest.java b/clients/pay/src/test/java/com/binance/connector/client/pay/rest/api/PayApiTest.java index c5d26cbd9..c448e33a4 100644 --- a/clients/pay/src/test/java/com/binance/connector/client/pay/rest/api/PayApiTest.java +++ b/clients/pay/src/test/java/com/binance/connector/client/pay/rest/api/PayApiTest.java @@ -36,7 +36,7 @@ /** API tests for PayApi */ public class PayApiTest { - private PayApi api; + private PayRestApi api; private ApiClient apiClientSpy; private SignatureGenerator signatureGeneratorSpy; @@ -72,7 +72,7 @@ public void initApiClient() throws ApiException { Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); - api = new PayApi(apiClientSpy); + api = new PayRestApi(apiClientSpy); } /** diff --git a/clients/pom.xml b/clients/pom.xml index 219d1bcc0..8389e2319 100644 --- a/clients/pom.xml +++ b/clients/pom.xml @@ -5,7 +5,7 @@ binance-connector-java-clients pom binance-connector-java-clients - 1.1.2 + 1.1.3 https://github.com/binance/binance-connector-java Java connector to Binance APIs @@ -391,7 +391,7 @@ org.eclipse.jetty.websocket websocket-jetty-client - 11.0.26 + ${jetty.version} @@ -403,7 +403,7 @@ 2.12.1 3.18.0 0.2.6 - 2.19.0 + 2.22.1 3.0.0 3.1.1 5.10.3 @@ -411,5 +411,6 @@ 1.1.1 UTF-8 2.44.4 + 11.0.26 diff --git a/clients/rebate/CHANGELOG.md b/clients/rebate/CHANGELOG.md index 9a88c2fba..c1484745f 100644 --- a/clients/rebate/CHANGELOG.md +++ b/clients/rebate/CHANGELOG.md @@ -1,10 +1,15 @@ # Changelog +## 2.0.0 - 2026-07-29 + +- Update descriptions and examples. + ## 1.2.2 - 2026-04-30 - Update `binance/common` module to version `2.4.2`. ## 1.2.1 - 2025-08-07 + - Update `binance/common` module to version `2.0.0`. - Add `Content-Type` header only if there is a body. @@ -21,4 +26,4 @@ ## 1.0.0 - 2025-04-24 -- Initial release \ No newline at end of file +- Initial release diff --git a/clients/rebate/docs/DefaultApi.md b/clients/rebate/docs/DefaultApi.md new file mode 100644 index 000000000..9d8fb111e --- /dev/null +++ b/clients/rebate/docs/DefaultApi.md @@ -0,0 +1,77 @@ +# DefaultApi + +All URIs are relative to *https://api.binance.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getSpotRebateHistoryRecords**](DefaultApi.md#getSpotRebateHistoryRecords) | **GET** /sapi/v1/rebate/taxQuery | Get Spot Rebate History Records (USER_DATA) | + + + +# **getSpotRebateHistoryRecords** +> GetSpotRebateHistoryRecordsResponse getSpotRebateHistoryRecords(startTime, endTime, page, recvWindow) + +Get Spot Rebate History Records (USER_DATA) + +Get Spot Rebate History Records Weight(UID): 12000 Security Type: USER_DATA Notes: - The max interval between `startTime` and `endTime` is 30 days. - If `startTime` and `endTime` are not sent, the recent 7 days' data will be returned. - The earliest supported `startTime` is June 10, 2020. - Return up to 200 records per request. + +### Example +```java +// Import classes: +import com.binance.connector.client.rebate.ApiClient; +import com.binance.connector.client.rebate.ApiException; +import com.binance.connector.client.rebate.Configuration; +import com.binance.connector.client.rebate.models.*; +import com.binance.connector.client.rebate.rest.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + Long startTime = 1623319461670L; // Long | Start time in milliseconds. + Long endTime = 1641782889000L; // Long | End time in milliseconds. + Long page = 1L; // Long | Page number. + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. + try { + GetSpotRebateHistoryRecordsResponse result = apiInstance.getSpotRebateHistoryRecords(startTime, endTime, page, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getSpotRebateHistoryRecords"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **startTime** | **Long**| Start time in milliseconds. | [optional] | +| **endTime** | **Long**| End time in milliseconds. | [optional] | +| **page** | **Long**| Page number. | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | + +### Return type + +[**GetSpotRebateHistoryRecordsResponse**](GetSpotRebateHistoryRecordsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Get Spot Rebate History Records | - | + diff --git a/clients/rebate/docs/GetSpotRebateHistoryRecordsResponseData.md b/clients/rebate/docs/GetSpotRebateHistoryRecordsResponseData.md index 7fb28cf94..d3fc29abd 100644 --- a/clients/rebate/docs/GetSpotRebateHistoryRecordsResponseData.md +++ b/clients/rebate/docs/GetSpotRebateHistoryRecordsResponseData.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**page** | **Long** | | [optional] | -|**totalRecords** | **Long** | | [optional] | -|**totalPageNum** | **Long** | | [optional] | -|**data** | [**List<GetSpotRebateHistoryRecordsResponseDataDataInner>**](GetSpotRebateHistoryRecordsResponseDataDataInner.md) | | [optional] | +|**page** | **Long** | Current page number. | [optional] | +|**totalRecords** | **Long** | Total number of records. | [optional] | +|**totalPageNum** | **Long** | Total number of pages. | [optional] | +|**data** | [**List<GetSpotRebateHistoryRecordsResponseDataDataInner>**](GetSpotRebateHistoryRecordsResponseDataDataInner.md) | Rebate records. | [optional] | diff --git a/clients/rebate/docs/GetSpotRebateHistoryRecordsResponseDataDataInner.md b/clients/rebate/docs/GetSpotRebateHistoryRecordsResponseDataDataInner.md index df6fdcfc3..dd3abf98d 100644 --- a/clients/rebate/docs/GetSpotRebateHistoryRecordsResponseDataDataInner.md +++ b/clients/rebate/docs/GetSpotRebateHistoryRecordsResponseDataDataInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**type** | **Long** | | [optional] | -|**amount** | **String** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**asset** | **String** | Rebate asset. | [optional] | +|**type** | **Long** | 1 is commission rebate, 2 is referral kickback | [optional] | +|**amount** | **String** | Rebate amount. | [optional] | +|**updateTime** | **Long** | Update timestamp. | [optional] | diff --git a/clients/rebate/docs/RebateApi.md b/clients/rebate/docs/RebateApi.md deleted file mode 100644 index 061eb261f..000000000 --- a/clients/rebate/docs/RebateApi.md +++ /dev/null @@ -1,77 +0,0 @@ -# RebateApi - -All URIs are relative to *https://api.binance.com* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**getSpotRebateHistoryRecords**](RebateApi.md#getSpotRebateHistoryRecords) | **GET** /sapi/v1/rebate/taxQuery | Get Spot Rebate History Records (USER_DATA) | - - - -# **getSpotRebateHistoryRecords** -> GetSpotRebateHistoryRecordsResponse getSpotRebateHistoryRecords(startTime, endTime, page, recvWindow) - -Get Spot Rebate History Records (USER_DATA) - -Get Spot Rebate History Records * The max interval between startTime and endTime is 30 days. * If startTime and endTime are not sent, the recent 7 days' data will be returned. * The earliest startTime is supported on June 10, 2020 * Return up to 200 records per request. Weight: 12000 - -### Example -```java -// Import classes: -import com.binance.connector.client.rebate.ApiClient; -import com.binance.connector.client.rebate.ApiException; -import com.binance.connector.client.rebate.Configuration; -import com.binance.connector.client.rebate.models.*; -import com.binance.connector.client.rebate.rest.api.RebateApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - RebateApi apiInstance = new RebateApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long page = 56L; // Long | Default 1 - Long recvWindow = 56L; // Long | - try { - GetSpotRebateHistoryRecordsResponse result = apiInstance.getSpotRebateHistoryRecords(startTime, endTime, page, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RebateApi#getSpotRebateHistoryRecords"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **page** | **Long**| Default 1 | [optional] | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**GetSpotRebateHistoryRecordsResponse**](GetSpotRebateHistoryRecordsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Get Spot Rebate History Records | - | - diff --git a/clients/rebate/docs/rest-api/migration-guide.md b/clients/rebate/docs/rest-api/migration-guide.md index e08a1349b..e589ec2fc 100644 --- a/clients/rebate/docs/rest-api/migration-guide.md +++ b/clients/rebate/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-rebate - 1.2.1 + 2.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-rebate - 1.2.1 + 2.0.0 ``` diff --git a/clients/rebate/example_rest.md b/clients/rebate/example_rest.md index fa925a1ab..aa57626b3 100644 --- a/clients/rebate/example_rest.md +++ b/clients/rebate/example_rest.md @@ -1,4 +1,4 @@ -## Rebate +## Default -[GET /sapi/v1/rebate/taxQuery](https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records) - getSpotRebateHistoryRecords - [GetSpotRebateHistoryRecordsExample.java:49](/examples/rebate/src/main/java/com/binance/connector/client/rebate/rest/rebate/GetSpotRebateHistoryRecordsExample.java#L49) +[GET /sapi/v1/rebate/taxQuery](https://developers.binance.com/en/docs/catalog/investment-and-services-rebate/api/rest-api/~#get-spot-rebate-history-records) - getSpotRebateHistoryRecords - [GetSpotRebateHistoryRecordsExample.java:39](/examples/rebate/src/main/java/com/binance/connector/client/rebate/rest/defaultpkg/GetSpotRebateHistoryRecordsExample.java#L39) diff --git a/clients/rebate/pom.xml b/clients/rebate/pom.xml index b90540b5b..25fa58c17 100644 --- a/clients/rebate/pom.xml +++ b/clients/rebate/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-rebate rebate - 1.2.2 + 2.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/JSON.java b/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/JSON.java index aa6982c30..fb9f8bb70 100644 --- a/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/JSON.java +++ b/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Rebate REST API - * OpenAPI Specification for the Binance Rebate REST API + * Rebate REST API + * Query spot trading rebate history records. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/api/DefaultApi.java b/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/api/DefaultApi.java new file mode 100644 index 000000000..23971e500 --- /dev/null +++ b/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/api/DefaultApi.java @@ -0,0 +1,246 @@ +/* + * Rebate REST API + * Query spot trading rebate history records. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.rebate.rest.api; + +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.Pair; +import com.binance.connector.client.common.SystemUtil; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.exception.ConstraintViolationException; +import com.binance.connector.client.rebate.rest.model.GetSpotRebateHistoryRecordsResponse; +import com.google.gson.reflect.TypeToken; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Validation; +import jakarta.validation.Validator; +import jakarta.validation.constraints.*; +import jakarta.validation.executable.ExecutableValidator; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; + +public class DefaultApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + private static final String USER_AGENT = + String.format( + "binance-rebate/2.0.0 (Java/%s; %s; %s)", + SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); + private static final boolean HAS_TIME_UNIT = false; + + public DefaultApi(ClientConfiguration clientConfiguration) { + this(new ApiClient(clientConfiguration)); + } + + public DefaultApi(ApiClient apiClient) { + apiClient.setUserAgent(USER_AGENT); + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getSpotRebateHistoryRecords + * + * @param startTime Start time in milliseconds. (optional) + * @param endTime End time in milliseconds. (optional) + * @param page Page number. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get Spot Rebate History Records -
+ * + * @see Get + * Spot Rebate History Records (USER_DATA) Documentation + */ + private okhttp3.Call getSpotRebateHistoryRecordsCall( + Long startTime, Long endTime, Long page, Long recvWindow) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/rebate/taxQuery"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (startTime != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("startTime", startTime)); + } + + if (endTime != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endTime", endTime)); + } + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getSpotRebateHistoryRecordsValidateBeforeCall( + Long startTime, Long endTime, Long page, Long recvWindow) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {startTime, endTime, page, recvWindow}; + Method method = + this.getClass() + .getMethod( + "getSpotRebateHistoryRecords", + Long.class, + Long.class, + Long.class, + Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return getSpotRebateHistoryRecordsCall(startTime, endTime, page, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Get Spot Rebate History Records (USER_DATA) Get Spot Rebate History Records Weight(UID): + * 12000 Security Type: USER_DATA Notes: - The max interval between `startTime` and + * `endTime` is 30 days. - If `startTime` and `endTime` are not + * sent, the recent 7 days' data will be returned. - The earliest supported + * `startTime` is June 10, 2020. - Return up to 200 records per request. + * + * @param startTime Start time in milliseconds. (optional) + * @param endTime End time in milliseconds. (optional) + * @param page Page number. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) + * @return ApiResponse<GetSpotRebateHistoryRecordsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get Spot Rebate History Records -
+ * + * @see Get + * Spot Rebate History Records (USER_DATA) Documentation + */ + public ApiResponse getSpotRebateHistoryRecords( + Long startTime, Long endTime, Long page, @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = + getSpotRebateHistoryRecordsValidateBeforeCall(startTime, endTime, page, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } +} diff --git a/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/api/RebateApi.java b/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/api/RebateApi.java deleted file mode 100644 index 2703ad4c8..000000000 --- a/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/api/RebateApi.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Binance Rebate REST API - * OpenAPI Specification for the Binance Rebate REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.rebate.rest.api; - -import com.binance.connector.client.common.ApiClient; -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.Pair; -import com.binance.connector.client.common.SystemUtil; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.exception.ConstraintViolationException; -import com.binance.connector.client.rebate.rest.model.GetSpotRebateHistoryRecordsResponse; -import com.google.gson.reflect.TypeToken; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.Validation; -import jakarta.validation.Validator; -import jakarta.validation.constraints.*; -import jakarta.validation.executable.ExecutableValidator; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; - -public class RebateApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - private static final String USER_AGENT = - String.format( - "binance-rebate/1.2.1 (Java/%s; %s; %s)", - SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); - private static final boolean HAS_TIME_UNIT = false; - - public RebateApi(ClientConfiguration clientConfiguration) { - this(new ApiClient(clientConfiguration)); - } - - public RebateApi(ApiClient apiClient) { - apiClient.setUserAgent(USER_AGENT); - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for getSpotRebateHistoryRecords - * - * @param startTime (optional) - * @param endTime (optional) - * @param page Default 1 (optional) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get Spot Rebate History Records -
- * - * @see Get - * Spot Rebate History Records (USER_DATA) Documentation - */ - private okhttp3.Call getSpotRebateHistoryRecordsCall( - Long startTime, Long endTime, Long page, Long recvWindow) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/rebate/taxQuery"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (startTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("startTime", startTime)); - } - - if (endTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("endTime", endTime)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getSpotRebateHistoryRecordsValidateBeforeCall( - Long startTime, Long endTime, Long page, Long recvWindow) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {startTime, endTime, page, recvWindow}; - Method method = - this.getClass() - .getMethod( - "getSpotRebateHistoryRecords", - Long.class, - Long.class, - Long.class, - Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return getSpotRebateHistoryRecordsCall(startTime, endTime, page, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Get Spot Rebate History Records (USER_DATA) Get Spot Rebate History Records * The max - * interval between startTime and endTime is 30 days. * If startTime and endTime are not sent, - * the recent 7 days' data will be returned. * The earliest startTime is supported on June - * 10, 2020 * Return up to 200 records per request. Weight: 12000 - * - * @param startTime (optional) - * @param endTime (optional) - * @param page Default 1 (optional) - * @param recvWindow (optional) - * @return ApiResponse<GetSpotRebateHistoryRecordsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get Spot Rebate History Records -
- * - * @see Get - * Spot Rebate History Records (USER_DATA) Documentation - */ - public ApiResponse getSpotRebateHistoryRecords( - Long startTime, Long endTime, Long page, Long recvWindow) throws ApiException { - okhttp3.Call localVarCall = - getSpotRebateHistoryRecordsValidateBeforeCall(startTime, endTime, page, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } -} diff --git a/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/api/RebateRestApi.java b/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/api/RebateRestApi.java index 774359c8c..922913a34 100644 --- a/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/api/RebateRestApi.java +++ b/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/api/RebateRestApi.java @@ -9,26 +9,27 @@ public class RebateRestApi { - private final RebateApi rebateApi; + private final DefaultApi defaultApi; public RebateRestApi(ClientConfiguration configuration) { this(RebateRestApiUtil.getDefaultClient(configuration)); } public RebateRestApi(ApiClient apiClient) { - this.rebateApi = new RebateApi(apiClient); + this.defaultApi = new DefaultApi(apiClient); } /** - * Get Spot Rebate History Records (USER_DATA) Get Spot Rebate History Records * The max - * interval between startTime and endTime is 30 days. * If startTime and endTime are not sent, - * the recent 7 days' data will be returned. * The earliest startTime is supported on June - * 10, 2020 * Return up to 200 records per request. Weight: 12000 + * Get Spot Rebate History Records (USER_DATA) Get Spot Rebate History Records Weight(UID): + * 12000 Security Type: USER_DATA Notes: - The max interval between `startTime` and + * `endTime` is 30 days. - If `startTime` and `endTime` are not + * sent, the recent 7 days' data will be returned. - The earliest supported + * `startTime` is June 10, 2020. - Return up to 200 records per request. * - * @param startTime (optional) - * @param endTime (optional) - * @param page Default 1 (optional) - * @param recvWindow (optional) + * @param startTime Start time in milliseconds. (optional) + * @param endTime End time in milliseconds. (optional) + * @param page Page number. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetSpotRebateHistoryRecordsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -40,11 +41,11 @@ public RebateRestApi(ApiClient apiClient) { * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-rebate/api/rest-api/~#get-spot-rebate-history-records">Get * Spot Rebate History Records (USER_DATA) Documentation */ public ApiResponse getSpotRebateHistoryRecords( Long startTime, Long endTime, Long page, Long recvWindow) throws ApiException { - return rebateApi.getSpotRebateHistoryRecords(startTime, endTime, page, recvWindow); + return defaultApi.getSpotRebateHistoryRecords(startTime, endTime, page, recvWindow); } } diff --git a/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/model/GetSpotRebateHistoryRecordsResponse.java b/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/model/GetSpotRebateHistoryRecordsResponse.java index fe24e5914..b8ee5119f 100644 --- a/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/model/GetSpotRebateHistoryRecordsResponse.java +++ b/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/model/GetSpotRebateHistoryRecordsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Rebate REST API - * OpenAPI Specification for the Binance Rebate REST API + * Rebate REST API + * Query spot trading rebate history records. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetSpotRebateHistoryRecordsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSpotRebateHistoryRecordsResponse { public static final String SERIALIZED_NAME_STATUS = "status"; diff --git a/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/model/GetSpotRebateHistoryRecordsResponseData.java b/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/model/GetSpotRebateHistoryRecordsResponseData.java index 8465354e9..0db9f8346 100644 --- a/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/model/GetSpotRebateHistoryRecordsResponseData.java +++ b/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/model/GetSpotRebateHistoryRecordsResponseData.java @@ -1,6 +1,6 @@ /* - * Binance Rebate REST API - * OpenAPI Specification for the Binance Rebate REST API + * Rebate REST API + * Query spot trading rebate history records. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetSpotRebateHistoryRecordsResponseData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSpotRebateHistoryRecordsResponseData { public static final String SERIALIZED_NAME_PAGE = "page"; @@ -74,7 +74,7 @@ public GetSpotRebateHistoryRecordsResponseData page(@jakarta.annotation.Nullable } /** - * Get page + * Current page number. * * @return page */ @@ -94,7 +94,7 @@ public GetSpotRebateHistoryRecordsResponseData totalRecords( } /** - * Get totalRecords + * Total number of records. * * @return totalRecords */ @@ -114,7 +114,7 @@ public GetSpotRebateHistoryRecordsResponseData totalPageNum( } /** - * Get totalPageNum + * Total number of pages. * * @return totalPageNum */ @@ -144,7 +144,7 @@ public GetSpotRebateHistoryRecordsResponseData addDataItem( } /** - * Get data + * Rebate records. * * @return data */ diff --git a/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/model/GetSpotRebateHistoryRecordsResponseDataDataInner.java b/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/model/GetSpotRebateHistoryRecordsResponseDataDataInner.java index a2e8301b5..ce70ee4ee 100644 --- a/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/model/GetSpotRebateHistoryRecordsResponseDataDataInner.java +++ b/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/model/GetSpotRebateHistoryRecordsResponseDataDataInner.java @@ -1,6 +1,6 @@ /* - * Binance Rebate REST API - * OpenAPI Specification for the Binance Rebate REST API + * Rebate REST API + * Query spot trading rebate history records. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSpotRebateHistoryRecordsResponseDataDataInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSpotRebateHistoryRecordsResponseDataDataInner { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -69,7 +69,7 @@ public GetSpotRebateHistoryRecordsResponseDataDataInner asset( } /** - * Get asset + * Rebate asset. * * @return asset */ @@ -89,7 +89,7 @@ public GetSpotRebateHistoryRecordsResponseDataDataInner type( } /** - * Get type + * 1 is commission rebate, 2 is referral kickback * * @return type */ @@ -109,7 +109,7 @@ public GetSpotRebateHistoryRecordsResponseDataDataInner amount( } /** - * Get amount + * Rebate amount. * * @return amount */ @@ -129,7 +129,7 @@ public GetSpotRebateHistoryRecordsResponseDataDataInner updateTime( } /** - * Get updateTime + * Update timestamp. * * @return updateTime */ diff --git a/clients/rebate/src/test/java/com/binance/connector/client/rebate/rest/api/DefaultApiTest.java b/clients/rebate/src/test/java/com/binance/connector/client/rebate/rest/api/DefaultApiTest.java new file mode 100644 index 000000000..fbb3878a4 --- /dev/null +++ b/clients/rebate/src/test/java/com/binance/connector/client/rebate/rest/api/DefaultApiTest.java @@ -0,0 +1,116 @@ +/* + * Rebate REST API + * Query spot trading rebate history records. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.rebate.rest.api; + +import static org.junit.Assert.assertEquals; + +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.auth.BinanceAuthenticationFactory; +import com.binance.connector.client.common.auth.SignatureAuthentication; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.common.sign.HmacSignatureGenerator; +import com.binance.connector.client.common.sign.SignatureGenerator; +import com.binance.connector.client.rebate.rest.model.GetSpotRebateHistoryRecordsResponse; +import jakarta.validation.constraints.*; +import java.io.IOException; +import okhttp3.Call; +import okhttp3.Request; +import org.bouncycastle.crypto.CryptoException; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; + +/** API tests for DefaultApi */ +public class DefaultApiTest { + + private DefaultApi api; + private ApiClient apiClientSpy; + private SignatureGenerator signatureGeneratorSpy; + + @BeforeEach + public void initApiClient() throws ApiException { + ClientConfiguration clientConfiguration = new ClientConfiguration(); + clientConfiguration.setUrl("http://localhost:8080"); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setSecretKey("secretKey"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + + HmacSignatureGenerator signatureGenerator = + new HmacSignatureGenerator(signatureConfiguration.getSecretKey()); + signatureGeneratorSpy = Mockito.spy(signatureGenerator); + SignatureAuthentication signatureAuthentication = + new SignatureAuthentication( + signatureConfiguration.getApiKey(), signatureGeneratorSpy); + SignatureAuthentication authenticationSpy = Mockito.spy(signatureAuthentication); + Mockito.doReturn("1736393892000").when(authenticationSpy).buildTimestamp(); + + BinanceAuthenticationFactory factoryMock = Mockito.mock(BinanceAuthenticationFactory.class); + Mockito.doReturn(authenticationSpy) + .when(factoryMock) + .getAuthentication(signatureConfiguration); + + ApiClient apiClient = new ApiClient(clientConfiguration, factoryMock); + + apiClientSpy = Mockito.spy(apiClient); + Mockito.doReturn(new ApiResponse<>(200, null)) + .when(apiClientSpy) + .execute(Mockito.any(), Mockito.any(java.lang.reflect.Type.class)); + Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); + Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); + + api = new DefaultApi(apiClientSpy); + } + + /** + * Get Spot Rebate History Records (USER_DATA) + * + *

Get Spot Rebate History Records Weight(UID): 12000 Security Type: USER_DATA Notes: - The + * max interval between `startTime` and `endTime` is 30 days. - If + * `startTime` and `endTime` are not sent, the recent 7 days' data will + * be returned. - The earliest supported `startTime` is June 10, 2020. - Return up to + * 200 records per request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getSpotRebateHistoryRecordsTest() + throws ApiException, CryptoException, IOException { + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long page = 1L; + Long recvWindow = 5000L; + ApiResponse response = + api.getSpotRebateHistoryRecords(startTime, endTime, page, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("startTime=1623319461670&endTime=1641782889000&page=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "d8669595398c3478db78736dbf4210642841e9920062e47dd9e504f877e947a8", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/rebate/taxQuery", actualRequest.url().encodedPath()); + } +} diff --git a/clients/rebate/src/test/java/com/binance/connector/client/rebate/rest/api/RebateApiTest.java b/clients/rebate/src/test/java/com/binance/connector/client/rebate/rest/api/RebateApiTest.java index d8e21c416..503be8f08 100644 --- a/clients/rebate/src/test/java/com/binance/connector/client/rebate/rest/api/RebateApiTest.java +++ b/clients/rebate/src/test/java/com/binance/connector/client/rebate/rest/api/RebateApiTest.java @@ -36,7 +36,7 @@ /** API tests for RebateApi */ public class RebateApiTest { - private RebateApi api; + private RebateRestApi api; private ApiClient apiClientSpy; private SignatureGenerator signatureGeneratorSpy; @@ -72,7 +72,7 @@ public void initApiClient() throws ApiException { Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); - api = new RebateApi(apiClientSpy); + api = new RebateRestApi(apiClientSpy); } /** diff --git a/clients/simple-earn/CHANGELOG.md b/clients/simple-earn/CHANGELOG.md index d7d9c7726..10b31d681 100644 --- a/clients/simple-earn/CHANGELOG.md +++ b/clients/simple-earn/CHANGELOG.md @@ -1,5 +1,59 @@ # Changelog +## 7.0.0 - 2026-07-29 + +### Changed (11) + +- Added parameter `lang` + - affected methods: + - `getYieldArenaActivities()` (`GET /sapi/v1/earn/arena/activities`) +- Modified parameter `aprPeriod`: + - enum added: `DAY`, `YEAR` + - affected methods: + - `getRateHistory()` (`GET /sapi/v1/simple-earn/flexible/history/rateHistory`) +- Modified parameter `asset`: + - enum added: `USDC`, `USDT` + - affected methods: + - `getBfusdSubscriptionHistory()` (`GET /sapi/v1/bfusd/history/subscriptionHistory`) + - `getRwusdSubscriptionHistory()` (`GET /sapi/v1/rwusd/history/subscriptionHistory`) +- Modified parameter `asset`: + - enum added: `USDT`, `USDC` + - affected methods: + - `subscribeRwusd()` (`POST /sapi/v1/rwusd/subscribe`) +- Modified parameter `destAccount`: + - enum added: `SPOT`, `FUND` + - affected methods: + - `redeemFlexibleProduct()` (`POST /sapi/v1/simple-earn/flexible/redeem`) +- Modified parameter `positionId`: + - type `integer` → `string` + - affected methods: + - `getLockedRedemptionRecord()` (`GET /sapi/v1/simple-earn/locked/history/redemptionRecord`) + - `getLockedRewardsHistory()` (`GET /sapi/v1/simple-earn/locked/history/rewardsRecord`) + - `getLockedProductPosition()` (`GET /sapi/v1/simple-earn/locked/position`) +- Modified parameter `redeemTo`: + - enum added: `SPOT`, `FLEXIBLE` + - affected methods: + - `setLockedProductRedeemOption()` (`POST /sapi/v1/simple-earn/locked/setRedeemOption`) +- Modified parameter `redeemTo`: + - enum added: `SPOT`, `FLEXIBLE` + - affected methods: + - `subscribeLockedProduct()` (`POST /sapi/v1/simple-earn/locked/subscribe`) +- Modified parameter `sourceAccount`: + - enum added: `SPOT`, `FUND`, `ALL` + - affected methods: + - `subscribeFlexibleProduct()` (`POST /sapi/v1/simple-earn/flexible/subscribe`) + - `subscribeLockedProduct()` (`POST /sapi/v1/simple-earn/locked/subscribe`) +- Modified parameter `type`: + - enum added: `FAST`, `STANDARD` + - affected methods: + - `redeemBfusd()` (`POST /sapi/v1/bfusd/redeem`) + - `redeemRwusd()` (`POST /sapi/v1/rwusd/redeem`) +- Modified parameter `type`: + - required: `true` → `false` + - enum added: `BONUS`, `REALTIME`, `REWARDS`, `ALL` + - affected methods: + - `getFlexibleRewardsHistory()` (`GET /sapi/v1/simple-earn/flexible/history/rewardsRecord`) + ## 6.0.1 - 2026-04-30 - Update `binance/common` module to version `2.4.2`. diff --git a/clients/simple-earn/docs/AprPeriod.md b/clients/simple-earn/docs/AprPeriod.md new file mode 100644 index 000000000..cc788096c --- /dev/null +++ b/clients/simple-earn/docs/AprPeriod.md @@ -0,0 +1,13 @@ + + +# AprPeriod + +## Enum + + +* `DAY` (value: `"DAY"`) + +* `YEAR` (value: `"YEAR"`) + + + diff --git a/clients/simple-earn/docs/Asset.md b/clients/simple-earn/docs/Asset.md new file mode 100644 index 000000000..92623f509 --- /dev/null +++ b/clients/simple-earn/docs/Asset.md @@ -0,0 +1,13 @@ + + +# Asset + +## Enum + + +* `USDT` (value: `"USDT"`) + +* `USDC` (value: `"USDC"`) + + + diff --git a/clients/simple-earn/docs/BfusdApi.md b/clients/simple-earn/docs/BfusdApi.md index c9f04e0fb..c40d48889 100644 --- a/clients/simple-earn/docs/BfusdApi.md +++ b/clients/simple-earn/docs/BfusdApi.md @@ -9,9 +9,9 @@ All URIs are relative to *https://api.binance.com* | [**getBfusdRateHistory**](BfusdApi.md#getBfusdRateHistory) | **GET** /sapi/v1/bfusd/history/rateHistory | Get BFUSD Rate History (USER_DATA) | | [**getBfusdRedemptionHistory**](BfusdApi.md#getBfusdRedemptionHistory) | **GET** /sapi/v1/bfusd/history/redemptionHistory | Get BFUSD Redemption History (USER_DATA) | | [**getBfusdRewardsHistory**](BfusdApi.md#getBfusdRewardsHistory) | **GET** /sapi/v1/bfusd/history/rewardsHistory | Get BFUSD Rewards History (USER_DATA) | -| [**getBfusdSubscriptionHistory**](BfusdApi.md#getBfusdSubscriptionHistory) | **GET** /sapi/v1/bfusd/history/subscriptionHistory | Get BFUSD subscription history(USER_DATA) | -| [**redeemBfusd**](BfusdApi.md#redeemBfusd) | **POST** /sapi/v1/bfusd/redeem | Redeem BFUSD(TRADE) | -| [**subscribeBfusd**](BfusdApi.md#subscribeBfusd) | **POST** /sapi/v1/bfusd/subscribe | Subscribe BFUSD(TRADE) | +| [**getBfusdSubscriptionHistory**](BfusdApi.md#getBfusdSubscriptionHistory) | **GET** /sapi/v1/bfusd/history/subscriptionHistory | Get BFUSD subscription history (USER_DATA) | +| [**redeemBfusd**](BfusdApi.md#redeemBfusd) | **POST** /sapi/v1/bfusd/redeem | Redeem BFUSD (TRADE) | +| [**subscribeBfusd**](BfusdApi.md#subscribeBfusd) | **POST** /sapi/v1/bfusd/subscribe | Subscribe BFUSD (TRADE) | @@ -20,7 +20,7 @@ All URIs are relative to *https://api.binance.com* Get BFUSD Account (USER_DATA) -Get BFUSD account information. Weight: 150 +Get BFUSD account information. Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -37,7 +37,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); BfusdApi apiInstance = new BfusdApi(defaultClient); - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + Long recvWindow = 5000L; // Long | try { GetBfusdAccountResponse result = apiInstance.getBfusdAccount(recvWindow); System.out.println(result); @@ -56,7 +56,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -82,7 +82,7 @@ No authorization required Get BFUSD Quota Details (USER_DATA) -Get BFUSD quota details including subscription quota, fast redemption quota and standard redemption quota. Weight: 150 +Get BFUSD quota details including subscription quota, fast redemption quota, and standard redemption quota. Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -99,7 +99,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); BfusdApi apiInstance = new BfusdApi(defaultClient); - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + Long recvWindow = 5000L; // Long | try { GetBfusdQuotaDetailsResponse result = apiInstance.getBfusdQuotaDetails(recvWindow); System.out.println(result); @@ -118,7 +118,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -144,7 +144,7 @@ No authorization required Get BFUSD Rate History (USER_DATA) -Get BFUSD rate history sorted by descending order. * The time between `startTime` and `endTime` cannot be longer than 6 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned. * If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned. Weight: 150 +Get BFUSD rate history sorted by descending order. Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 6 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned. - If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned. ### Example ```java @@ -161,11 +161,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); BfusdApi apiInstance = new BfusdApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page. Starts from 1. + Long size = 10L; // Long | Number of results per page. + Long recvWindow = 5000L; // Long | try { GetBfusdRateHistoryResponse result = apiInstance.getBfusdRateHistory(startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -186,9 +186,9 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | -| **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | +| **current** | **Long**| Currently querying page. Starts from 1. | [optional] | +| **size** | **Long**| Number of results per page. | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -214,7 +214,7 @@ No authorization required Get BFUSD Redemption History (USER_DATA) -Get BFUSD redemption history. * The time between `startTime` and `endTime` cannot be longer than 6 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned. * If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned. Weight: 150 +Get BFUSD redemption history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 6 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned. - If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned. ### Example ```java @@ -231,11 +231,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); BfusdApi apiInstance = new BfusdApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page. + Long size = 10L; // Long | Number of results per page. + Long recvWindow = 5000L; // Long | try { GetBfusdRedemptionHistoryResponse result = apiInstance.getBfusdRedemptionHistory(startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -256,9 +256,9 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | -| **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | +| **current** | **Long**| Currently querying page. | [optional] | +| **size** | **Long**| Number of results per page. | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -284,7 +284,7 @@ No authorization required Get BFUSD Rewards History (USER_DATA) -Get BFUSD rewards history. * The time between `startTime` and `endTime` cannot be longer than 6 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned. * If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned. Weight: 150 +Get BFUSD rewards history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 6 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned. - If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned. ### Example ```java @@ -301,11 +301,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); BfusdApi apiInstance = new BfusdApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page. + Long size = 10L; // Long | Number of results per page. + Long recvWindow = 5000L; // Long | try { GetBfusdRewardsHistoryResponse result = apiInstance.getBfusdRewardsHistory(startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -326,9 +326,9 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | -| **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | +| **current** | **Long**| Currently querying page. | [optional] | +| **size** | **Long**| Number of results per page. | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -352,9 +352,9 @@ No authorization required # **getBfusdSubscriptionHistory** > GetBfusdSubscriptionHistoryResponse getBfusdSubscriptionHistory(asset, startTime, endTime, current, size, recvWindow) -Get BFUSD subscription history(USER_DATA) +Get BFUSD subscription history (USER_DATA) -Get BFUSD subscription history * The time between `startTime` and `endTime` cannot be longer than 6 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned. * If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time advanced by one month, and data between `startTime` and `endTime` will be returned. Weight: 150 +Get BFUSD subscription history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 6 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned. - If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time advanced by one month, and data between `startTime` and `endTime` will be returned. ### Example ```java @@ -371,12 +371,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); BfusdApi apiInstance = new BfusdApi(defaultClient); - String asset = "asset_example"; // String | USDC or USDT - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + Asset asset = Asset.fromValue("USDT"); // Asset | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page. + Long size = 10L; // Long | Number of results per page. + Long recvWindow = 5000L; // Long | try { GetBfusdSubscriptionHistoryResponse result = apiInstance.getBfusdSubscriptionHistory(asset, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -395,12 +395,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **asset** | **String**| USDC or USDT | [optional] | +| **asset** | [**Asset**](.md)| | [optional] [enum: USDT, USDC] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | -| **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | +| **current** | **Long**| Currently querying page. | [optional] | +| **size** | **Long**| Number of results per page. | [optional] | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -424,9 +424,9 @@ No authorization required # **redeemBfusd** > RedeemBfusdResponse redeemBfusd(redeemBfusdRequest) -Redeem BFUSD(TRADE) +Redeem BFUSD (TRADE) -Redeem BFUSD to USDT * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight: 150 +Redeem BFUSD to USDT Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. - This API only supports BFUSD redemption to the Spot Account. Redemptions to the Funding Account or any other account type are not supported. ### Example ```java @@ -486,9 +486,9 @@ No authorization required # **subscribeBfusd** > SubscribeBfusdResponse subscribeBfusd(subscribeBfusdRequest) -Subscribe BFUSD(TRADE) +Subscribe BFUSD (TRADE) -Subscribe BFUSD * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight: 150 +Subscribe BFUSD Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. - This API only supports BFUSD subscription using assets held in the Spot Account. Subscriptions initiated from the Funding Account or any other account type are not supported. ### Example ```java diff --git a/clients/simple-earn/docs/DestAccount.md b/clients/simple-earn/docs/DestAccount.md new file mode 100644 index 000000000..1ff9d5e47 --- /dev/null +++ b/clients/simple-earn/docs/DestAccount.md @@ -0,0 +1,13 @@ + + +# DestAccount + +## Enum + + +* `SPOT` (value: `"SPOT"`) + +* `FUND` (value: `"FUND"`) + + + diff --git a/clients/simple-earn/docs/FlexibleLockedApi.md b/clients/simple-earn/docs/FlexibleLockedApi.md index 2651947cf..b314f3cf3 100644 --- a/clients/simple-earn/docs/FlexibleLockedApi.md +++ b/clients/simple-earn/docs/FlexibleLockedApi.md @@ -4,39 +4,39 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getCollateralRecord**](FlexibleLockedApi.md#getCollateralRecord) | **GET** /sapi/v1/simple-earn/flexible/history/collateralRecord | Get Collateral Record(USER_DATA) | -| [**getFlexiblePersonalLeftQuota**](FlexibleLockedApi.md#getFlexiblePersonalLeftQuota) | **GET** /sapi/v1/simple-earn/flexible/personalLeftQuota | Get Flexible Personal Left Quota(USER_DATA) | -| [**getFlexibleProductPosition**](FlexibleLockedApi.md#getFlexibleProductPosition) | **GET** /sapi/v1/simple-earn/flexible/position | Get Flexible Product Position(USER_DATA) | -| [**getFlexibleRedemptionRecord**](FlexibleLockedApi.md#getFlexibleRedemptionRecord) | **GET** /sapi/v1/simple-earn/flexible/history/redemptionRecord | Get Flexible Redemption Record(USER_DATA) | -| [**getFlexibleRewardsHistory**](FlexibleLockedApi.md#getFlexibleRewardsHistory) | **GET** /sapi/v1/simple-earn/flexible/history/rewardsRecord | Get Flexible Rewards History(USER_DATA) | -| [**getFlexibleSubscriptionPreview**](FlexibleLockedApi.md#getFlexibleSubscriptionPreview) | **GET** /sapi/v1/simple-earn/flexible/subscriptionPreview | Get Flexible Subscription Preview(USER_DATA) | -| [**getFlexibleSubscriptionRecord**](FlexibleLockedApi.md#getFlexibleSubscriptionRecord) | **GET** /sapi/v1/simple-earn/flexible/history/subscriptionRecord | Get Flexible Subscription Record(USER_DATA) | -| [**getLockedPersonalLeftQuota**](FlexibleLockedApi.md#getLockedPersonalLeftQuota) | **GET** /sapi/v1/simple-earn/locked/personalLeftQuota | Get Locked Personal Left Quota(USER_DATA) | -| [**getLockedProductPosition**](FlexibleLockedApi.md#getLockedProductPosition) | **GET** /sapi/v1/simple-earn/locked/position | Get Locked Product Position | -| [**getLockedRedemptionRecord**](FlexibleLockedApi.md#getLockedRedemptionRecord) | **GET** /sapi/v1/simple-earn/locked/history/redemptionRecord | Get Locked Redemption Record(USER_DATA) | -| [**getLockedRewardsHistory**](FlexibleLockedApi.md#getLockedRewardsHistory) | **GET** /sapi/v1/simple-earn/locked/history/rewardsRecord | Get Locked Rewards History(USER_DATA) | -| [**getLockedSubscriptionPreview**](FlexibleLockedApi.md#getLockedSubscriptionPreview) | **GET** /sapi/v1/simple-earn/locked/subscriptionPreview | Get Locked Subscription Preview(USER_DATA) | -| [**getLockedSubscriptionRecord**](FlexibleLockedApi.md#getLockedSubscriptionRecord) | **GET** /sapi/v1/simple-earn/locked/history/subscriptionRecord | Get Locked Subscription Record(USER_DATA) | -| [**getRateHistory**](FlexibleLockedApi.md#getRateHistory) | **GET** /sapi/v1/simple-earn/flexible/history/rateHistory | Get Rate History(USER_DATA) | -| [**getSimpleEarnFlexibleProductList**](FlexibleLockedApi.md#getSimpleEarnFlexibleProductList) | **GET** /sapi/v1/simple-earn/flexible/list | Get Simple Earn Flexible Product List(USER_DATA) | -| [**getSimpleEarnLockedProductList**](FlexibleLockedApi.md#getSimpleEarnLockedProductList) | **GET** /sapi/v1/simple-earn/locked/list | Get Simple Earn Locked Product List(USER_DATA) | -| [**redeemFlexibleProduct**](FlexibleLockedApi.md#redeemFlexibleProduct) | **POST** /sapi/v1/simple-earn/flexible/redeem | Redeem Flexible Product(TRADE) | -| [**redeemLockedProduct**](FlexibleLockedApi.md#redeemLockedProduct) | **POST** /sapi/v1/simple-earn/locked/redeem | Redeem Locked Product(TRADE) | -| [**setFlexibleAutoSubscribe**](FlexibleLockedApi.md#setFlexibleAutoSubscribe) | **POST** /sapi/v1/simple-earn/flexible/setAutoSubscribe | Set Flexible Auto Subscribe(USER_DATA) | -| [**setLockedAutoSubscribe**](FlexibleLockedApi.md#setLockedAutoSubscribe) | **POST** /sapi/v1/simple-earn/locked/setAutoSubscribe | Set Locked Auto Subscribe(USER_DATA) | -| [**setLockedProductRedeemOption**](FlexibleLockedApi.md#setLockedProductRedeemOption) | **POST** /sapi/v1/simple-earn/locked/setRedeemOption | Set Locked Product Redeem Option(USER_DATA) | -| [**simpleAccount**](FlexibleLockedApi.md#simpleAccount) | **GET** /sapi/v1/simple-earn/account | Simple Account(USER_DATA) | -| [**subscribeFlexibleProduct**](FlexibleLockedApi.md#subscribeFlexibleProduct) | **POST** /sapi/v1/simple-earn/flexible/subscribe | Subscribe Flexible Product(TRADE) | -| [**subscribeLockedProduct**](FlexibleLockedApi.md#subscribeLockedProduct) | **POST** /sapi/v1/simple-earn/locked/subscribe | Subscribe Locked Product(TRADE) | +| [**getCollateralRecord**](FlexibleLockedApi.md#getCollateralRecord) | **GET** /sapi/v1/simple-earn/flexible/history/collateralRecord | Get Collateral Record (USER_DATA) | +| [**getFlexiblePersonalLeftQuota**](FlexibleLockedApi.md#getFlexiblePersonalLeftQuota) | **GET** /sapi/v1/simple-earn/flexible/personalLeftQuota | Get Flexible Personal Left Quota (USER_DATA) | +| [**getFlexibleProductPosition**](FlexibleLockedApi.md#getFlexibleProductPosition) | **GET** /sapi/v1/simple-earn/flexible/position | Get Flexible Product Position (USER_DATA) | +| [**getFlexibleRedemptionRecord**](FlexibleLockedApi.md#getFlexibleRedemptionRecord) | **GET** /sapi/v1/simple-earn/flexible/history/redemptionRecord | Get Flexible Redemption Record (USER_DATA) | +| [**getFlexibleRewardsHistory**](FlexibleLockedApi.md#getFlexibleRewardsHistory) | **GET** /sapi/v1/simple-earn/flexible/history/rewardsRecord | Get Flexible Rewards History (USER_DATA) | +| [**getFlexibleSubscriptionPreview**](FlexibleLockedApi.md#getFlexibleSubscriptionPreview) | **GET** /sapi/v1/simple-earn/flexible/subscriptionPreview | Get Flexible Subscription Preview (USER_DATA) | +| [**getFlexibleSubscriptionRecord**](FlexibleLockedApi.md#getFlexibleSubscriptionRecord) | **GET** /sapi/v1/simple-earn/flexible/history/subscriptionRecord | Get Flexible Subscription Record (USER_DATA) | +| [**getLockedPersonalLeftQuota**](FlexibleLockedApi.md#getLockedPersonalLeftQuota) | **GET** /sapi/v1/simple-earn/locked/personalLeftQuota | Get Locked Personal Left Quota (USER_DATA) | +| [**getLockedProductPosition**](FlexibleLockedApi.md#getLockedProductPosition) | **GET** /sapi/v1/simple-earn/locked/position | Get Locked Product Position (USER_DATA) | +| [**getLockedRedemptionRecord**](FlexibleLockedApi.md#getLockedRedemptionRecord) | **GET** /sapi/v1/simple-earn/locked/history/redemptionRecord | Get Locked Redemption Record (USER_DATA) | +| [**getLockedRewardsHistory**](FlexibleLockedApi.md#getLockedRewardsHistory) | **GET** /sapi/v1/simple-earn/locked/history/rewardsRecord | Get Locked Rewards History (USER_DATA) | +| [**getLockedSubscriptionPreview**](FlexibleLockedApi.md#getLockedSubscriptionPreview) | **GET** /sapi/v1/simple-earn/locked/subscriptionPreview | Get Locked Subscription Preview (USER_DATA) | +| [**getLockedSubscriptionRecord**](FlexibleLockedApi.md#getLockedSubscriptionRecord) | **GET** /sapi/v1/simple-earn/locked/history/subscriptionRecord | Get Locked Subscription Record (USER_DATA) | +| [**getRateHistory**](FlexibleLockedApi.md#getRateHistory) | **GET** /sapi/v1/simple-earn/flexible/history/rateHistory | Get Rate History (USER_DATA) | +| [**getSimpleEarnFlexibleProductList**](FlexibleLockedApi.md#getSimpleEarnFlexibleProductList) | **GET** /sapi/v1/simple-earn/flexible/list | Get Simple Earn Flexible Product List (USER_DATA) | +| [**getSimpleEarnLockedProductList**](FlexibleLockedApi.md#getSimpleEarnLockedProductList) | **GET** /sapi/v1/simple-earn/locked/list | Get Simple Earn Locked Product List (USER_DATA) | +| [**redeemFlexibleProduct**](FlexibleLockedApi.md#redeemFlexibleProduct) | **POST** /sapi/v1/simple-earn/flexible/redeem | Redeem Flexible Product (TRADE) | +| [**redeemLockedProduct**](FlexibleLockedApi.md#redeemLockedProduct) | **POST** /sapi/v1/simple-earn/locked/redeem | Redeem Locked Product (TRADE) | +| [**setFlexibleAutoSubscribe**](FlexibleLockedApi.md#setFlexibleAutoSubscribe) | **POST** /sapi/v1/simple-earn/flexible/setAutoSubscribe | Set Flexible Auto Subscribe (USER_DATA) | +| [**setLockedAutoSubscribe**](FlexibleLockedApi.md#setLockedAutoSubscribe) | **POST** /sapi/v1/simple-earn/locked/setAutoSubscribe | Set Locked Auto Subscribe (USER_DATA) | +| [**setLockedProductRedeemOption**](FlexibleLockedApi.md#setLockedProductRedeemOption) | **POST** /sapi/v1/simple-earn/locked/setRedeemOption | Set Locked Product Redeem Option (USER_DATA) | +| [**simpleAccount**](FlexibleLockedApi.md#simpleAccount) | **GET** /sapi/v1/simple-earn/account | Simple Account (USER_DATA) | +| [**subscribeFlexibleProduct**](FlexibleLockedApi.md#subscribeFlexibleProduct) | **POST** /sapi/v1/simple-earn/flexible/subscribe | Subscribe Flexible Product (TRADE) | +| [**subscribeLockedProduct**](FlexibleLockedApi.md#subscribeLockedProduct) | **POST** /sapi/v1/simple-earn/locked/subscribe | Subscribe Locked Product (TRADE) | # **getCollateralRecord** > GetCollateralRecordResponse getCollateralRecord(productId, startTime, endTime, current, size, recvWindow) -Get Collateral Record(USER_DATA) +Get Collateral Record (USER_DATA) -Get Collateral Record * The time between `startTime` and `endTime` cannot be longer than 30 days. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 1 +Get Collateral Record Weight(IP): 1 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 30 days. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -53,12 +53,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleLockedApi apiInstance = new FlexibleLockedApi(defaultClient); - String productId = "productId_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + String productId = "1"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page. + Long size = 10L; // Long | Number of results per page. + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetCollateralRecordResponse result = apiInstance.getCollateralRecord(productId, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -80,8 +80,8 @@ public class Example { | **productId** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | +| **current** | **Long**| Currently querying page. | [optional] | +| **size** | **Long**| Number of results per page. | [optional] | | **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | ### Return type @@ -106,9 +106,9 @@ No authorization required # **getFlexiblePersonalLeftQuota** > GetFlexiblePersonalLeftQuotaResponse getFlexiblePersonalLeftQuota(productId, recvWindow) -Get Flexible Personal Left Quota(USER_DATA) +Get Flexible Personal Left Quota (USER_DATA) -Get Flexible Personal Left Quota Weight: 150 +Get Flexible Personal Left Quota Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -125,8 +125,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleLockedApi apiInstance = new FlexibleLockedApi(defaultClient); - String productId = "productId_example"; // String | - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + String productId = "1"; // String | + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetFlexiblePersonalLeftQuotaResponse result = apiInstance.getFlexiblePersonalLeftQuota(productId, recvWindow); System.out.println(result); @@ -170,9 +170,9 @@ No authorization required # **getFlexibleProductPosition** > GetFlexibleProductPositionResponse getFlexibleProductPosition(asset, productId, current, size, recvWindow) -Get Flexible Product Position(USER_DATA) +Get Flexible Product Position (USER_DATA) -Get Flexible Product Position Weight: 150 +Get Flexible Product Position Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -189,11 +189,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleLockedApi apiInstance = new FlexibleLockedApi(defaultClient); - String asset = "asset_example"; // String | USDC or USDT - String productId = "productId_example"; // String | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + String asset = "USDC"; // String | + String productId = "1"; // String | + Long current = 1L; // Long | Currently querying page. Starts from 1. + Long size = 10L; // Long | Number of results per page. + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetFlexibleProductPositionResponse result = apiInstance.getFlexibleProductPosition(asset, productId, current, size, recvWindow); System.out.println(result); @@ -212,10 +212,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **asset** | **String**| USDC or USDT | [optional] | +| **asset** | **String**| | [optional] | | **productId** | **String**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | +| **current** | **Long**| Currently querying page. Starts from 1. | [optional] | +| **size** | **Long**| Number of results per page. | [optional] | | **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | ### Return type @@ -240,9 +240,9 @@ No authorization required # **getFlexibleRedemptionRecord** > GetFlexibleRedemptionRecordResponse getFlexibleRedemptionRecord(productId, redeemId, asset, startTime, endTime, current, size, recvWindow) -Get Flexible Redemption Record(USER_DATA) +Get Flexible Redemption Record (USER_DATA) -Get Flexible Redemption Record * The time between `startTime` and `endTime` cannot be longer than 30 days. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get Flexible Redemption Record Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 30 days. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -259,14 +259,14 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleLockedApi apiInstance = new FlexibleLockedApi(defaultClient); - String productId = "productId_example"; // String | - String redeemId = "redeemId_example"; // String | - String asset = "asset_example"; // String | USDC or USDT - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + String productId = "1"; // String | + String redeemId = "1"; // String | + String asset = "USDC"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page. Starts from 1. + Long size = 10L; // Long | Number of results per page. + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetFlexibleRedemptionRecordResponse result = apiInstance.getFlexibleRedemptionRecord(productId, redeemId, asset, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -287,11 +287,11 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **productId** | **String**| | [optional] | | **redeemId** | **String**| | [optional] | -| **asset** | **String**| USDC or USDT | [optional] | +| **asset** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | +| **current** | **Long**| Currently querying page. Starts from 1. | [optional] | +| **size** | **Long**| Number of results per page. | [optional] | | **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | ### Return type @@ -314,11 +314,11 @@ No authorization required # **getFlexibleRewardsHistory** -> GetFlexibleRewardsHistoryResponse getFlexibleRewardsHistory(type, productId, asset, startTime, endTime, current, size, recvWindow) +> GetFlexibleRewardsHistoryResponse getFlexibleRewardsHistory(productId, asset, startTime, endTime, type, current, size, recvWindow) -Get Flexible Rewards History(USER_DATA) +Get Flexible Rewards History (USER_DATA) -Get Flexible Rewards History * The time between `startTime` and `endTime` cannot be longer than 30 days. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get Flexible Rewards History Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 30 days. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -335,16 +335,16 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleLockedApi apiInstance = new FlexibleLockedApi(defaultClient); - String type = "type_example"; // String | `BONUS` - Bonus tiered APR, `REALTIME` Real-time APR, `REWARDS` Historical rewards,`ALL`(set to default) - String productId = "productId_example"; // String | - String asset = "asset_example"; // String | USDC or USDT - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + String productId = "1"; // String | + String asset = "USDC"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + OrderType type = OrderType.fromValue("FAST"); // OrderType | `BONUS` - Bonus tiered APR, `REALTIME` - Real-time APR, `REWARDS` - Historical rewards, `ALL` - All types. Default: `ALL` + Long current = 1L; // Long | Currently querying page. Starts from 1. + Long size = 10L; // Long | Number of results per page. + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { - GetFlexibleRewardsHistoryResponse result = apiInstance.getFlexibleRewardsHistory(type, productId, asset, startTime, endTime, current, size, recvWindow); + GetFlexibleRewardsHistoryResponse result = apiInstance.getFlexibleRewardsHistory(productId, asset, startTime, endTime, type, current, size, recvWindow); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FlexibleLockedApi#getFlexibleRewardsHistory"); @@ -361,13 +361,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **type** | **String**| `BONUS` - Bonus tiered APR, `REALTIME` Real-time APR, `REWARDS` Historical rewards,`ALL`(set to default) | | | **productId** | **String**| | [optional] | -| **asset** | **String**| USDC or USDT | [optional] | +| **asset** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | +| **type** | [**OrderType**](.md)| `BONUS` - Bonus tiered APR, `REALTIME` - Real-time APR, `REWARDS` - Historical rewards, `ALL` - All types. Default: `ALL` | [optional] [default to STANDARD] [enum: FAST, STANDARD] | +| **current** | **Long**| Currently querying page. Starts from 1. | [optional] | +| **size** | **Long**| Number of results per page. | [optional] | | **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | ### Return type @@ -392,9 +392,9 @@ No authorization required # **getFlexibleSubscriptionPreview** > GetFlexibleSubscriptionPreviewResponse getFlexibleSubscriptionPreview(productId, amount, recvWindow) -Get Flexible Subscription Preview(USER_DATA) +Get Flexible Subscription Preview (USER_DATA) -Get Flexible Subscription Preview Weight: 150 +Get Flexible Subscription Preview Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -411,9 +411,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleLockedApi apiInstance = new FlexibleLockedApi(defaultClient); - String productId = "productId_example"; // String | - Double amount = 3.4D; // Double | - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + String productId = "1"; // String | + Double amount = 1.0D; // Double | + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetFlexibleSubscriptionPreviewResponse result = apiInstance.getFlexibleSubscriptionPreview(productId, amount, recvWindow); System.out.println(result); @@ -458,9 +458,9 @@ No authorization required # **getFlexibleSubscriptionRecord** > GetFlexibleSubscriptionRecordResponse getFlexibleSubscriptionRecord(productId, purchaseId, asset, startTime, endTime, current, size, recvWindow) -Get Flexible Subscription Record(USER_DATA) +Get Flexible Subscription Record (USER_DATA) -Get Flexible Subscription Record * The time between `startTime` and `endTime` cannot be longer than 30 days. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get Flexible Subscription Record Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 30 days. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -477,14 +477,14 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleLockedApi apiInstance = new FlexibleLockedApi(defaultClient); - String productId = "productId_example"; // String | - String purchaseId = "purchaseId_example"; // String | - String asset = "asset_example"; // String | USDC or USDT - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + String productId = "1"; // String | + String purchaseId = "1"; // String | + String asset = "USDC"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page. Starts from 1. + Long size = 10L; // Long | Number of results per page. + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetFlexibleSubscriptionRecordResponse result = apiInstance.getFlexibleSubscriptionRecord(productId, purchaseId, asset, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -505,11 +505,11 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **productId** | **String**| | [optional] | | **purchaseId** | **String**| | [optional] | -| **asset** | **String**| USDC or USDT | [optional] | +| **asset** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | +| **current** | **Long**| Currently querying page. Starts from 1. | [optional] | +| **size** | **Long**| Number of results per page. | [optional] | | **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | ### Return type @@ -534,9 +534,9 @@ No authorization required # **getLockedPersonalLeftQuota** > GetLockedPersonalLeftQuotaResponse getLockedPersonalLeftQuota(projectId, recvWindow) -Get Locked Personal Left Quota(USER_DATA) +Get Locked Personal Left Quota (USER_DATA) -Get Locked Personal Left Quota Weight: 150 +Get Locked Personal Left Quota Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -553,8 +553,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleLockedApi apiInstance = new FlexibleLockedApi(defaultClient); - String projectId = "projectId_example"; // String | - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + String projectId = "1"; // String | + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetLockedPersonalLeftQuotaResponse result = apiInstance.getLockedPersonalLeftQuota(projectId, recvWindow); System.out.println(result); @@ -598,9 +598,9 @@ No authorization required # **getLockedProductPosition** > GetLockedProductPositionResponse getLockedProductPosition(asset, positionId, projectId, current, size, recvWindow) -Get Locked Product Position +Get Locked Product Position (USER_DATA) -Get Locked Product Position Weight: 150 +Get Locked Product Position Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -617,12 +617,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleLockedApi apiInstance = new FlexibleLockedApi(defaultClient); - String asset = "asset_example"; // String | USDC or USDT - String positionId = "positionId_example"; // String | - String projectId = "projectId_example"; // String | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + String asset = "USDC"; // String | + String positionId = "1"; // String | + String projectId = "1"; // String | + Long current = 1L; // Long | Currently querying page. Starts from 1. + Long size = 10L; // Long | Number of results per page. + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetLockedProductPositionResponse result = apiInstance.getLockedProductPosition(asset, positionId, projectId, current, size, recvWindow); System.out.println(result); @@ -641,11 +641,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **asset** | **String**| USDC or USDT | [optional] | +| **asset** | **String**| | [optional] | | **positionId** | **String**| | [optional] | | **projectId** | **String**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | +| **current** | **Long**| Currently querying page. Starts from 1. | [optional] | +| **size** | **Long**| Number of results per page. | [optional] | | **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | ### Return type @@ -670,9 +670,9 @@ No authorization required # **getLockedRedemptionRecord** > GetLockedRedemptionRecordResponse getLockedRedemptionRecord(positionId, redeemId, asset, startTime, endTime, current, size, recvWindow) -Get Locked Redemption Record(USER_DATA) +Get Locked Redemption Record (USER_DATA) -Get Locked Redemption Record * The time between `startTime` and `endTime` cannot be longer than 30 days. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get Locked Redemption Record Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 30 days. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -689,14 +689,14 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleLockedApi apiInstance = new FlexibleLockedApi(defaultClient); - String positionId = "positionId_example"; // String | - String redeemId = "redeemId_example"; // String | - String asset = "asset_example"; // String | USDC or USDT - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + String positionId = "1"; // String | + String redeemId = "1"; // String | + String asset = "USDC"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page. Starts from 1. + Long size = 10L; // Long | Number of results per page. + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetLockedRedemptionRecordResponse result = apiInstance.getLockedRedemptionRecord(positionId, redeemId, asset, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -717,11 +717,11 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **positionId** | **String**| | [optional] | | **redeemId** | **String**| | [optional] | -| **asset** | **String**| USDC or USDT | [optional] | +| **asset** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | +| **current** | **Long**| Currently querying page. Starts from 1. | [optional] | +| **size** | **Long**| Number of results per page. | [optional] | | **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | ### Return type @@ -746,9 +746,9 @@ No authorization required # **getLockedRewardsHistory** > GetLockedRewardsHistoryResponse getLockedRewardsHistory(positionId, asset, startTime, endTime, current, size, recvWindow) -Get Locked Rewards History(USER_DATA) +Get Locked Rewards History (USER_DATA) -Get Locked Rewards History * The time between `startTime` and `endTime` cannot be longer than 30 days. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get Locked Rewards History Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 30 days. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -765,13 +765,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleLockedApi apiInstance = new FlexibleLockedApi(defaultClient); - String positionId = "positionId_example"; // String | - String asset = "asset_example"; // String | USDC or USDT - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + String positionId = "1"; // String | + String asset = "USDC"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page. Starts from 1. + Long size = 10L; // Long | Number of results per page. + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetLockedRewardsHistoryResponse result = apiInstance.getLockedRewardsHistory(positionId, asset, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -791,11 +791,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **positionId** | **String**| | [optional] | -| **asset** | **String**| USDC or USDT | [optional] | +| **asset** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | +| **current** | **Long**| Currently querying page. Starts from 1. | [optional] | +| **size** | **Long**| Number of results per page. | [optional] | | **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | ### Return type @@ -820,9 +820,9 @@ No authorization required # **getLockedSubscriptionPreview** > GetLockedSubscriptionPreviewResponse getLockedSubscriptionPreview(projectId, amount, autoSubscribe, recvWindow) -Get Locked Subscription Preview(USER_DATA) +Get Locked Subscription Preview (USER_DATA) -Get Locked Subscription Preview Weight: 150 +Get Locked Subscription Preview Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -839,10 +839,10 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleLockedApi apiInstance = new FlexibleLockedApi(defaultClient); - String projectId = "projectId_example"; // String | - Double amount = 3.4D; // Double | - Boolean autoSubscribe = true; // Boolean | true or false, default true. - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + String projectId = "1"; // String | + Double amount = 1.0D; // Double | + Boolean autoSubscribe = true; // Boolean | default true. + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetLockedSubscriptionPreviewResponse result = apiInstance.getLockedSubscriptionPreview(projectId, amount, autoSubscribe, recvWindow); System.out.println(result); @@ -863,7 +863,7 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **projectId** | **String**| | | | **amount** | **Double**| | | -| **autoSubscribe** | **Boolean**| true or false, default true. | [optional] | +| **autoSubscribe** | **Boolean**| default true. | [optional] | | **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | ### Return type @@ -888,9 +888,9 @@ No authorization required # **getLockedSubscriptionRecord** > GetLockedSubscriptionRecordResponse getLockedSubscriptionRecord(purchaseId, asset, startTime, endTime, current, size, recvWindow) -Get Locked Subscription Record(USER_DATA) +Get Locked Subscription Record (USER_DATA) -Get Locked Subscription Record * The time between `startTime` and `endTime` cannot be longer than 30 days. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get Locked Subscription Record Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 30 days. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -907,13 +907,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleLockedApi apiInstance = new FlexibleLockedApi(defaultClient); - String purchaseId = "purchaseId_example"; // String | - String asset = "asset_example"; // String | USDC or USDT - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + String purchaseId = "1"; // String | + String asset = "USDC"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page. Starts from 1. + Long size = 10L; // Long | Number of results per page. + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetLockedSubscriptionRecordResponse result = apiInstance.getLockedSubscriptionRecord(purchaseId, asset, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -933,11 +933,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **purchaseId** | **String**| | [optional] | -| **asset** | **String**| USDC or USDT | [optional] | +| **asset** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | +| **current** | **Long**| Currently querying page. Starts from 1. | [optional] | +| **size** | **Long**| Number of results per page. | [optional] | | **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | ### Return type @@ -962,9 +962,9 @@ No authorization required # **getRateHistory** > GetRateHistoryResponse getRateHistory(productId, aprPeriod, startTime, endTime, current, size, recvWindow) -Get Rate History(USER_DATA) +Get Rate History (USER_DATA) -Get Rate History * The time between startTime and endTime cannot be longer than 1 year. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get Rate History Weight(IP): 150 Security Type: USER_DATA Notes: - The time between startTime and endTime cannot be longer than 1 year. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -981,13 +981,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleLockedApi apiInstance = new FlexibleLockedApi(defaultClient); - String productId = "productId_example"; // String | - String aprPeriod = "aprPeriod_example"; // String | \"DAY\",\"YEAR\",default\"DAY\" - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + String productId = "1"; // String | + AprPeriod aprPeriod = AprPeriod.fromValue("DAY"); // AprPeriod | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | Number of results per page + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetRateHistoryResponse result = apiInstance.getRateHistory(productId, aprPeriod, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -1007,11 +1007,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **productId** | **String**| | | -| **aprPeriod** | **String**| \"DAY\",\"YEAR\",default\"DAY\" | [optional] | +| **aprPeriod** | [**AprPeriod**](.md)| | [optional] [default to DAY] [enum: DAY, YEAR] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| Number of results per page | [optional] | | **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | ### Return type @@ -1036,9 +1036,9 @@ No authorization required # **getSimpleEarnFlexibleProductList** > GetSimpleEarnFlexibleProductListResponse getSimpleEarnFlexibleProductList(asset, current, size, recvWindow) -Get Simple Earn Flexible Product List(USER_DATA) +Get Simple Earn Flexible Product List (USER_DATA) -Get available Simple Earn flexible product list Weight: 150 +Get available Simple Earn flexible product list Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -1055,10 +1055,10 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleLockedApi apiInstance = new FlexibleLockedApi(defaultClient); - String asset = "asset_example"; // String | USDC or USDT - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + String asset = "USDC"; // String | + Long current = 1L; // Long | Currently querying page. Starts from 1. + Long size = 10L; // Long | Number of results per page. + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetSimpleEarnFlexibleProductListResponse result = apiInstance.getSimpleEarnFlexibleProductList(asset, current, size, recvWindow); System.out.println(result); @@ -1077,9 +1077,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **asset** | **String**| USDC or USDT | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | +| **asset** | **String**| | [optional] | +| **current** | **Long**| Currently querying page. Starts from 1. | [optional] | +| **size** | **Long**| Number of results per page. | [optional] | | **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | ### Return type @@ -1104,9 +1104,9 @@ No authorization required # **getSimpleEarnLockedProductList** > GetSimpleEarnLockedProductListResponse getSimpleEarnLockedProductList(asset, current, size, recvWindow) -Get Simple Earn Locked Product List(USER_DATA) +Get Simple Earn Locked Product List (USER_DATA) -Get Simple Earn Locked Product List * Get available Simple Earn locked product list Weight: 150 +Get Simple Earn Locked Product List Weight(IP): 150 Security Type: USER_DATA Notes: - Get available Simple Earn locked product list ### Example ```java @@ -1123,10 +1123,10 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleLockedApi apiInstance = new FlexibleLockedApi(defaultClient); - String asset = "asset_example"; // String | USDC or USDT - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + String asset = "USDC"; // String | + Long current = 1L; // Long | Currently querying page. Starts from 1. + Long size = 10L; // Long | Number of results per page. + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetSimpleEarnLockedProductListResponse result = apiInstance.getSimpleEarnLockedProductList(asset, current, size, recvWindow); System.out.println(result); @@ -1145,9 +1145,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **asset** | **String**| USDC or USDT | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | +| **asset** | **String**| | [optional] | +| **current** | **Long**| Currently querying page. Starts from 1. | [optional] | +| **size** | **Long**| Number of results per page. | [optional] | | **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | ### Return type @@ -1172,9 +1172,9 @@ No authorization required # **redeemFlexibleProduct** > RedeemFlexibleProductResponse redeemFlexibleProduct(redeemFlexibleProductRequest) -Redeem Flexible Product(TRADE) +Redeem Flexible Product (TRADE) -Redeem Flexible Product * You need to open `Enable Spot & Margin Trading` permission for the API Key which requests this endpoint. Weight: 1 +Redeem Flexible Product Weight(IP): 1 Security Type: TRADE Notes: - You need to open `Enable Spot & Margin Trading` permission for the API Key which requests this endpoint. ### Example ```java @@ -1234,9 +1234,9 @@ No authorization required # **redeemLockedProduct** > RedeemLockedProductResponse redeemLockedProduct(redeemLockedProductRequest) -Redeem Locked Product(TRADE) +Redeem Locked Product (TRADE) -Redeem Locked Product * You need to open `Enable Spot & Margin Trading` permission for the API Key which requests this endpoint. Weight: 1/3s per account +Redeem Locked Product Weight(IP): 1 Security Type: TRADE Notes: - You need to open `Enable Spot & Margin Trading` permission for the API Key which requests this endpoint. ### Example ```java @@ -1296,9 +1296,9 @@ No authorization required # **setFlexibleAutoSubscribe** > SetFlexibleAutoSubscribeResponse setFlexibleAutoSubscribe(setFlexibleAutoSubscribeRequest) -Set Flexible Auto Subscribe(USER_DATA) +Set Flexible Auto Subscribe (USER_DATA) -Set Flexible Auto Subscribe Weight: 150 +Set Flexible Auto Subscribe Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -1358,9 +1358,9 @@ No authorization required # **setLockedAutoSubscribe** > SetLockedAutoSubscribeResponse setLockedAutoSubscribe(setLockedAutoSubscribeRequest) -Set Locked Auto Subscribe(USER_DATA) +Set Locked Auto Subscribe (USER_DATA) -Set locked auto subscribe Weight: 150 +Set locked auto subscribe Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -1420,9 +1420,9 @@ No authorization required # **setLockedProductRedeemOption** > SetLockedProductRedeemOptionResponse setLockedProductRedeemOption(setLockedProductRedeemOptionRequest) -Set Locked Product Redeem Option(USER_DATA) +Set Locked Product Redeem Option (USER_DATA) -Set redeem option for Locked product Weight: 50 +Set redeem option for Locked product Weight(IP): 50 Security Type: USER_DATA ### Example ```java @@ -1482,9 +1482,9 @@ No authorization required # **simpleAccount** > SimpleAccountResponse simpleAccount(recvWindow) -Simple Account(USER_DATA) +Simple Account (USER_DATA) -Simple Account query Weight: 150 +Simple Account query Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -1501,7 +1501,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); FlexibleLockedApi apiInstance = new FlexibleLockedApi(defaultClient); - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { SimpleAccountResponse result = apiInstance.simpleAccount(recvWindow); System.out.println(result); @@ -1544,9 +1544,9 @@ No authorization required # **subscribeFlexibleProduct** > SubscribeFlexibleProductResponse subscribeFlexibleProduct(subscribeFlexibleProductRequest) -Subscribe Flexible Product(TRADE) +Subscribe Flexible Product (TRADE) -Subscribe Flexible Product * You need to open `Enable Spot & Margin Trading` permission for the API Key which requests this endpoint. Weight: 1 +Subscribe Flexible Product Weight(IP): 1 Security Type: TRADE Notes: - You need to open `Enable Spot & Margin Trading` permission for the API Key which requests this endpoint. ### Example ```java @@ -1606,9 +1606,9 @@ No authorization required # **subscribeLockedProduct** > SubscribeLockedProductResponse subscribeLockedProduct(subscribeLockedProductRequest) -Subscribe Locked Product(TRADE) +Subscribe Locked Product (TRADE) -Subscribe Locked Product * You need to open `Enable Spot & Margin Trading` permission for the API Key which requests this endpoint. Weight: 1 +Subscribe Locked Product Weight(IP): 1 Security Type: TRADE Notes: - You need to open `Enable Spot & Margin Trading` permission for the API Key which requests this endpoint. ### Example ```java diff --git a/clients/simple-earn/docs/GetLockedProductPositionResponseRowsInner.md b/clients/simple-earn/docs/GetLockedProductPositionResponseRowsInner.md index b3bae95a6..814463360 100644 --- a/clients/simple-earn/docs/GetLockedProductPositionResponseRowsInner.md +++ b/clients/simple-earn/docs/GetLockedProductPositionResponseRowsInner.md @@ -12,7 +12,7 @@ |**projectId** | **String** | | [optional] | |**asset** | **String** | | [optional] | |**amount** | **String** | | [optional] | -|**purchaseTime** | **String** | | [optional] | +|**purchaseTime** | **Long** | | [optional] | |**duration** | **String** | | [optional] | |**accrualDays** | **String** | | [optional] | |**rewardAsset** | **String** | | [optional] | @@ -25,15 +25,15 @@ |**boostApr** | **String** | | [optional] | |**totalBoostRewardAmt** | **String** | | [optional] | |**nextPay** | **String** | | [optional] | -|**nextPayDate** | **String** | | [optional] | +|**nextPayDate** | **Long** | | [optional] | |**payPeriod** | **String** | | [optional] | |**redeemAmountEarly** | **String** | | [optional] | -|**rewardsEndDate** | **String** | | [optional] | -|**deliverDate** | **String** | | [optional] | +|**rewardsEndDate** | **Long** | | [optional] | +|**deliverDate** | **Long** | | [optional] | |**redeemPeriod** | **String** | | [optional] | |**redeemingAmt** | **String** | | [optional] | |**redeemTo** | **String** | | [optional] | -|**partialAmtDeliverDate** | **String** | | [optional] | +|**partialAmtDeliverDate** | **Long** | | [optional] | |**canRedeemEarly** | **Boolean** | | [optional] | |**canFastRedemption** | **Boolean** | | [optional] | |**autoSubscribe** | **Boolean** | | [optional] | diff --git a/clients/simple-earn/docs/GetLockedRedemptionRecordResponseRowsInner.md b/clients/simple-earn/docs/GetLockedRedemptionRecordResponseRowsInner.md index 5c3c4b51a..7fb881a78 100644 --- a/clients/simple-earn/docs/GetLockedRedemptionRecordResponseRowsInner.md +++ b/clients/simple-earn/docs/GetLockedRedemptionRecordResponseRowsInner.md @@ -15,7 +15,7 @@ |**amount** | **String** | | [optional] | |**originalAmount** | **String** | | [optional] | |**type** | **String** | | [optional] | -|**deliverDate** | **String** | | [optional] | +|**deliverDate** | **Long** | | [optional] | |**lossAmount** | **String** | | [optional] | |**isComplete** | **Boolean** | | [optional] | |**rewardAsset** | **String** | | [optional] | diff --git a/clients/simple-earn/docs/GetLockedSubscriptionPreviewResponseInner.md b/clients/simple-earn/docs/GetLockedSubscriptionPreviewResponseInner.md index 9c4e251c5..4f1ac5487 100644 --- a/clients/simple-earn/docs/GetLockedSubscriptionPreviewResponseInner.md +++ b/clients/simple-earn/docs/GetLockedSubscriptionPreviewResponseInner.md @@ -14,11 +14,11 @@ |**boostRewardAsset** | **String** | | [optional] | |**estDailyRewardAmt** | **String** | | [optional] | |**nextPay** | **String** | | [optional] | -|**nextPayDate** | **String** | | [optional] | -|**valueDate** | **String** | | [optional] | -|**rewardsEndDate** | **String** | | [optional] | -|**deliverDate** | **String** | | [optional] | -|**nextSubscriptionDate** | **String** | | [optional] | +|**nextPayDate** | **Long** | | [optional] | +|**valueDate** | **Long** | | [optional] | +|**rewardsEndDate** | **Long** | | [optional] | +|**deliverDate** | **Long** | | [optional] | +|**nextSubscriptionDate** | **Long** | | [optional] | diff --git a/clients/simple-earn/docs/GetYieldArenaActivitiesResponse.md b/clients/simple-earn/docs/GetYieldArenaActivitiesResponse.md new file mode 100644 index 000000000..265fbea31 --- /dev/null +++ b/clients/simple-earn/docs/GetYieldArenaActivitiesResponse.md @@ -0,0 +1,13 @@ + + +# GetYieldArenaActivitiesResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**activities** | [**List<GetYieldArenaActivitiesResponseActivitiesInner>**](GetYieldArenaActivitiesResponseActivitiesInner.md) | | [optional] | + + + diff --git a/clients/simple-earn/docs/GetYieldArenaActivitiesResponseActivitiesInner.md b/clients/simple-earn/docs/GetYieldArenaActivitiesResponseActivitiesInner.md new file mode 100644 index 000000000..9b4a3ddd7 --- /dev/null +++ b/clients/simple-earn/docs/GetYieldArenaActivitiesResponseActivitiesInner.md @@ -0,0 +1,21 @@ + + +# GetYieldArenaActivitiesResponseActivitiesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**activityId** | **Long** | Activity ID. | [optional] | +|**activityType** | **String** | Activity category: `AIRDROP`, `LEADERBOARD`, or `EVENT`. | [optional] | +|**title** | **String** | Activity title, localized via the `lang` header. | [optional] | +|**description** | **String** | Activity description, localized via the `lang` header. | [optional] | +|**rewardPoolInUsd** | **String** | USD value of the reward pool. | [optional] | +|**rewardToken** | **List<String>** | Reward token symbols (e.g. `[\"BNB\"]`); may be empty. | [optional] | +|**redirectUrl** | **String** | Web URL to the activity landing page. | [optional] | +|**startTime** | **Long** | Activity start time in milliseconds; may be null for activities that are immediately effective. | [optional] | +|**endTime** | **Long** | Activity end time in milliseconds; may be null for activities with no fixed end. | [optional] | + + + diff --git a/clients/simple-earn/docs/OrderType.md b/clients/simple-earn/docs/OrderType.md new file mode 100644 index 000000000..9fba54b93 --- /dev/null +++ b/clients/simple-earn/docs/OrderType.md @@ -0,0 +1,13 @@ + + +# OrderType + +## Enum + + +* `FAST` (value: `"FAST"`) + +* `STANDARD` (value: `"STANDARD"`) + + + diff --git a/clients/simple-earn/docs/RedeemBfusdRequest.md b/clients/simple-earn/docs/RedeemBfusdRequest.md index 60252b504..b192fd096 100644 --- a/clients/simple-earn/docs/RedeemBfusdRequest.md +++ b/clients/simple-earn/docs/RedeemBfusdRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amount** | **Double** | | | -|**type** | **String** | | | -|**recvWindow** | **Long** | | [optional] | +|**amount** | **Double** | Amount in BFUSD | | +|**type** | **OrderType** | | | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/simple-earn/docs/RedeemFlexibleProductRequest.md b/clients/simple-earn/docs/RedeemFlexibleProductRequest.md index c6c391b71..171dcb11d 100644 --- a/clients/simple-earn/docs/RedeemFlexibleProductRequest.md +++ b/clients/simple-earn/docs/RedeemFlexibleProductRequest.md @@ -9,9 +9,9 @@ |------------ | ------------- | ------------- | -------------| |**productId** | **String** | | | |**redeemAll** | **Boolean** | | [optional] | -|**amount** | **Double** | | [optional] | -|**destAccount** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**amount** | **Double** | if redeemAll is false, amount is mandatory | [optional] | +|**destAccount** | **DestAccount** | | [optional] | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/simple-earn/docs/RedeemLockedProductRequest.md b/clients/simple-earn/docs/RedeemLockedProductRequest.md index 697da96a4..b73fc77e8 100644 --- a/clients/simple-earn/docs/RedeemLockedProductRequest.md +++ b/clients/simple-earn/docs/RedeemLockedProductRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**positionId** | **String** | | | -|**recvWindow** | **Long** | | [optional] | +|**positionId** | **String** | Locked product position ID | | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/simple-earn/docs/RedeemRwusdRequest.md b/clients/simple-earn/docs/RedeemRwusdRequest.md index fe2ee820e..7b137f88b 100644 --- a/clients/simple-earn/docs/RedeemRwusdRequest.md +++ b/clients/simple-earn/docs/RedeemRwusdRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amount** | **Double** | | | -|**type** | **String** | | | -|**recvWindow** | **Long** | | [optional] | +|**amount** | **Double** | Amount in RWUSD | | +|**type** | **OrderType** | | | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/simple-earn/docs/RedeemTo.md b/clients/simple-earn/docs/RedeemTo.md new file mode 100644 index 000000000..5ebbf054d --- /dev/null +++ b/clients/simple-earn/docs/RedeemTo.md @@ -0,0 +1,13 @@ + + +# RedeemTo + +## Enum + + +* `SPOT` (value: `"SPOT"`) + +* `FLEXIBLE` (value: `"FLEXIBLE"`) + + + diff --git a/clients/simple-earn/docs/RwusdApi.md b/clients/simple-earn/docs/RwusdApi.md index 6be842661..06cfccd71 100644 --- a/clients/simple-earn/docs/RwusdApi.md +++ b/clients/simple-earn/docs/RwusdApi.md @@ -9,9 +9,9 @@ All URIs are relative to *https://api.binance.com* | [**getRwusdRateHistory**](RwusdApi.md#getRwusdRateHistory) | **GET** /sapi/v1/rwusd/history/rateHistory | Get RWUSD Rate History (USER_DATA) | | [**getRwusdRedemptionHistory**](RwusdApi.md#getRwusdRedemptionHistory) | **GET** /sapi/v1/rwusd/history/redemptionHistory | Get RWUSD Redemption History (USER_DATA) | | [**getRwusdRewardsHistory**](RwusdApi.md#getRwusdRewardsHistory) | **GET** /sapi/v1/rwusd/history/rewardsHistory | Get RWUSD Rewards History (USER_DATA) | -| [**getRwusdSubscriptionHistory**](RwusdApi.md#getRwusdSubscriptionHistory) | **GET** /sapi/v1/rwusd/history/subscriptionHistory | Get RWUSD subscription history(USER_DATA) | -| [**redeemRwusd**](RwusdApi.md#redeemRwusd) | **POST** /sapi/v1/rwusd/redeem | Redeem RWUSD(TRADE) | -| [**subscribeRwusd**](RwusdApi.md#subscribeRwusd) | **POST** /sapi/v1/rwusd/subscribe | Subscribe RWUSD(TRADE) | +| [**getRwusdSubscriptionHistory**](RwusdApi.md#getRwusdSubscriptionHistory) | **GET** /sapi/v1/rwusd/history/subscriptionHistory | Get RWUSD subscription history (USER_DATA) | +| [**redeemRwusd**](RwusdApi.md#redeemRwusd) | **POST** /sapi/v1/rwusd/redeem | Redeem RWUSD (TRADE) | +| [**subscribeRwusd**](RwusdApi.md#subscribeRwusd) | **POST** /sapi/v1/rwusd/subscribe | Subscribe RWUSD (TRADE) | @@ -20,7 +20,7 @@ All URIs are relative to *https://api.binance.com* Get RWUSD Account (USER_DATA) -Get RWUSD account information. Weight: 150 +Get RWUSD account information. Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -37,7 +37,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); RwusdApi apiInstance = new RwusdApi(defaultClient); - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetRwusdAccountResponse result = apiInstance.getRwusdAccount(recvWindow); System.out.println(result); @@ -82,7 +82,7 @@ No authorization required Get RWUSD Quota Details (USER_DATA) -Get RWUSD quota details including subscription quota, fast redemption quota, and standard redemption quota. Weight: 150 +Get RWUSD quota details including subscription quota, fast redemption quota, and standard redemption quota. Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -99,7 +99,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); RwusdApi apiInstance = new RwusdApi(defaultClient); - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetRwusdQuotaDetailsResponse result = apiInstance.getRwusdQuotaDetails(recvWindow); System.out.println(result); @@ -144,7 +144,7 @@ No authorization required Get RWUSD Rate History (USER_DATA) -Get RWUSD rate history sorted by descending order. * The time between `startTime` and `endTime` cannot be longer than 6 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned. * If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned. Weight: 150 +Get RWUSD rate history sorted by descending order. Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 6 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned. - If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned. ### Example ```java @@ -161,11 +161,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); RwusdApi apiInstance = new RwusdApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | Number of results per page + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetRwusdRateHistoryResponse result = apiInstance.getRwusdRateHistory(startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -186,8 +186,8 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| Number of results per page | [optional] | | **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | ### Return type @@ -214,7 +214,7 @@ No authorization required Get RWUSD Redemption History (USER_DATA) -Get RWUSD redemption history. * The time between `startTime` and `endTime` cannot be longer than 6 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned. * If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned. Weight: 150 +Get RWUSD redemption history. Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 6 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned. - If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned. ### Example ```java @@ -231,11 +231,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); RwusdApi apiInstance = new RwusdApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | Number of results per page + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetRwusdRedemptionHistoryResponse result = apiInstance.getRwusdRedemptionHistory(startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -256,8 +256,8 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| Number of results per page | [optional] | | **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | ### Return type @@ -284,7 +284,7 @@ No authorization required Get RWUSD Rewards History (USER_DATA) -Get RWUSD rewards history. * The time between `startTime` and `endTime` cannot be longer than 6 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned. * If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned. Weight: 150 +Get RWUSD rewards history. Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 6 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned. - If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned. ### Example ```java @@ -301,11 +301,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); RwusdApi apiInstance = new RwusdApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | Number of results per page + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetRwusdRewardsHistoryResponse result = apiInstance.getRwusdRewardsHistory(startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -326,8 +326,8 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| Number of results per page | [optional] | | **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | ### Return type @@ -352,9 +352,9 @@ No authorization required # **getRwusdSubscriptionHistory** > GetRwusdSubscriptionHistoryResponse getRwusdSubscriptionHistory(asset, startTime, endTime, current, size, recvWindow) -Get RWUSD subscription history(USER_DATA) +Get RWUSD subscription history (USER_DATA) -Get RWUSD subscription history * The time between `startTime` and `endTime` cannot be longer than 6 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned. * If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time advanced by one month, and data between `startTime` and `endTime` will be returned. Weight: 150 +Get RWUSD subscription history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 6 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned. - If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time advanced by one month, and data between `startTime` and `endTime` will be returned. ### Example ```java @@ -371,12 +371,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); RwusdApi apiInstance = new RwusdApi(defaultClient); - String asset = "asset_example"; // String | USDC or USDT - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Starts from 1. Default: 1 - Long size = 56L; // Long | Number of results per page. Default: 10, Max: 100 - Long recvWindow = 56L; // Long | The value cannot be greater than 60000 (ms) + Asset asset = Asset.fromValue("USDT"); // Asset | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | Number of results per page + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 (ms) try { GetRwusdSubscriptionHistoryResponse result = apiInstance.getRwusdSubscriptionHistory(asset, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -395,11 +395,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **asset** | **String**| USDC or USDT | [optional] | +| **asset** | [**Asset**](.md)| | [optional] [enum: USDT, USDC] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Starts from 1. Default: 1 | [optional] | -| **size** | **Long**| Number of results per page. Default: 10, Max: 100 | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| Number of results per page | [optional] | | **recvWindow** | **Long**| The value cannot be greater than 60000 (ms) | [optional] | ### Return type @@ -424,9 +424,9 @@ No authorization required # **redeemRwusd** > RedeemRwusdResponse redeemRwusd(redeemRwusdRequest) -Redeem RWUSD(TRADE) +Redeem RWUSD (TRADE) -Redeem RWUSD to USDC * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight: 150 +Redeem RWUSD to USDC Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. - This API only supports RWUSD redemption to the Spot Account. Redemptions to the Funding Account or any other account type are not supported. ### Example ```java @@ -486,9 +486,9 @@ No authorization required # **subscribeRwusd** > SubscribeRwusdResponse subscribeRwusd(subscribeRwusdRequest) -Subscribe RWUSD(TRADE) +Subscribe RWUSD (TRADE) -Subscribe RWUSD * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight: 150 +Subscribe RWUSD Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. - This API only supports RWUSD subscription using assets held in the Spot Account. Subscriptions initiated from the Funding Account or any other account type are not supported. ### Example ```java diff --git a/clients/simple-earn/docs/SetFlexibleAutoSubscribeRequest.md b/clients/simple-earn/docs/SetFlexibleAutoSubscribeRequest.md index 4eb3a2d2d..c2149b726 100644 --- a/clients/simple-earn/docs/SetFlexibleAutoSubscribeRequest.md +++ b/clients/simple-earn/docs/SetFlexibleAutoSubscribeRequest.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**productId** | **String** | | | |**autoSubscribe** | **Boolean** | | | -|**recvWindow** | **Long** | | [optional] | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/simple-earn/docs/SetLockedAutoSubscribeRequest.md b/clients/simple-earn/docs/SetLockedAutoSubscribeRequest.md index ec3e144a5..2d3318e90 100644 --- a/clients/simple-earn/docs/SetLockedAutoSubscribeRequest.md +++ b/clients/simple-earn/docs/SetLockedAutoSubscribeRequest.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**positionId** | **String** | | | |**autoSubscribe** | **Boolean** | | | -|**recvWindow** | **Long** | | [optional] | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/simple-earn/docs/SetLockedProductRedeemOptionRequest.md b/clients/simple-earn/docs/SetLockedProductRedeemOptionRequest.md index 23d1b3f51..4976b57cb 100644 --- a/clients/simple-earn/docs/SetLockedProductRedeemOptionRequest.md +++ b/clients/simple-earn/docs/SetLockedProductRedeemOptionRequest.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**positionId** | **String** | | | -|**redeemTo** | **String** | | | -|**recvWindow** | **Long** | | [optional] | +|**redeemTo** | **RedeemTo** | | | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/simple-earn/docs/SourceAccount.md b/clients/simple-earn/docs/SourceAccount.md new file mode 100644 index 000000000..752c54258 --- /dev/null +++ b/clients/simple-earn/docs/SourceAccount.md @@ -0,0 +1,15 @@ + + +# SourceAccount + +## Enum + + +* `SPOT` (value: `"SPOT"`) + +* `FUND` (value: `"FUND"`) + +* `ALL` (value: `"ALL"`) + + + diff --git a/clients/simple-earn/docs/SubscribeBfusdRequest.md b/clients/simple-earn/docs/SubscribeBfusdRequest.md index 7ba239426..76d56b8e8 100644 --- a/clients/simple-earn/docs/SubscribeBfusdRequest.md +++ b/clients/simple-earn/docs/SubscribeBfusdRequest.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**asset** | **String** | | | -|**amount** | **Double** | | | -|**recvWindow** | **Long** | | [optional] | +|**amount** | **Double** | Amount | | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/simple-earn/docs/SubscribeFlexibleProductRequest.md b/clients/simple-earn/docs/SubscribeFlexibleProductRequest.md index 4f3b8fc5a..bdaced621 100644 --- a/clients/simple-earn/docs/SubscribeFlexibleProductRequest.md +++ b/clients/simple-earn/docs/SubscribeFlexibleProductRequest.md @@ -10,8 +10,8 @@ |**productId** | **String** | | | |**amount** | **Double** | | | |**autoSubscribe** | **Boolean** | | [optional] | -|**sourceAccount** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**sourceAccount** | **SourceAccount** | | [optional] | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/simple-earn/docs/SubscribeLockedProductRequest.md b/clients/simple-earn/docs/SubscribeLockedProductRequest.md index 7a57b426f..6eba4b671 100644 --- a/clients/simple-earn/docs/SubscribeLockedProductRequest.md +++ b/clients/simple-earn/docs/SubscribeLockedProductRequest.md @@ -10,9 +10,9 @@ |**projectId** | **String** | | | |**amount** | **Double** | | | |**autoSubscribe** | **Boolean** | | [optional] | -|**sourceAccount** | **String** | | [optional] | -|**redeemTo** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**sourceAccount** | **SourceAccount** | | [optional] | +|**redeemTo** | **RedeemTo** | | [optional] | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/simple-earn/docs/SubscribeRwusdRequest.md b/clients/simple-earn/docs/SubscribeRwusdRequest.md index e742fc7ea..dbc6a5e5d 100644 --- a/clients/simple-earn/docs/SubscribeRwusdRequest.md +++ b/clients/simple-earn/docs/SubscribeRwusdRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | | -|**amount** | **Double** | | | -|**recvWindow** | **Long** | | [optional] | +|**asset** | **Asset** | | | +|**amount** | **Double** | Amount | | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/simple-earn/docs/YieldArenaApi.md b/clients/simple-earn/docs/YieldArenaApi.md new file mode 100644 index 000000000..1cb16dd66 --- /dev/null +++ b/clients/simple-earn/docs/YieldArenaApi.md @@ -0,0 +1,73 @@ +# YieldArenaApi + +All URIs are relative to *https://api.binance.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getYieldArenaActivities**](YieldArenaApi.md#getYieldArenaActivities) | **GET** /sapi/v1/earn/arena/activities | Get Yield Arena Activities (USER_DATA) | + + + +# **getYieldArenaActivities** +> GetYieldArenaActivitiesResponse getYieldArenaActivities(lang, recvWindow) + +Get Yield Arena Activities (USER_DATA) + +Get the list of Earn Yield Arena giveaway activities currently available to the user. Weight(IP): 150 Security Type: USER_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.simple_earn.ApiClient; +import com.binance.connector.client.simple_earn.ApiException; +import com.binance.connector.client.simple_earn.Configuration; +import com.binance.connector.client.simple_earn.models.*; +import com.binance.connector.client.simple_earn.rest.api.YieldArenaApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + YieldArenaApi apiInstance = new YieldArenaApi(defaultClient); + String lang = "en"; // String | Locale tag for `title` and `description` (e.g. `en`, `zh-CN`, `pt-BR`). Default: `en`. If the value is missing, malformed, or has no translation configured, content is returned in `en`. + Long recvWindow = 5000L; // Long | + try { + GetYieldArenaActivitiesResponse result = apiInstance.getYieldArenaActivities(lang, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling YieldArenaApi#getYieldArenaActivities"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **lang** | **String**| Locale tag for `title` and `description` (e.g. `en`, `zh-CN`, `pt-BR`). Default: `en`. If the value is missing, malformed, or has no translation configured, content is returned in `en`. | [optional] | +| **recvWindow** | **Long**| | [optional] | + +### Return type + +[**GetYieldArenaActivitiesResponse**](GetYieldArenaActivitiesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Yield Arena Activities | - | + diff --git a/clients/simple-earn/docs/rest-api/migration-guide.md b/clients/simple-earn/docs/rest-api/migration-guide.md index 852cd5c7c..dce837fee 100644 --- a/clients/simple-earn/docs/rest-api/migration-guide.md +++ b/clients/simple-earn/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-simple-earn - 6.0.0 + 7.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-simple-earn - 6.0.0 + 7.0.0 ``` diff --git a/clients/simple-earn/example_rest.md b/clients/simple-earn/example_rest.md index 8a0abef32..83882f4cf 100644 --- a/clients/simple-earn/example_rest.md +++ b/clients/simple-earn/example_rest.md @@ -1,86 +1,90 @@ ## Bfusd -[GET /sapi/v1/bfusd/account](https://developers.binance.com/docs/simple_earn/bfusd/account/) - getBfusdAccount - [GetBfusdAccountExample.java:47](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdAccountExample.java#L47) +[GET /sapi/v1/bfusd/account](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-account) - getBfusdAccount - [GetBfusdAccountExample.java:36](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdAccountExample.java#L36) -[GET /sapi/v1/bfusd/quota](https://developers.binance.com/docs/simple_earn/bfusd/account/Get-BFUSD-Quota-Details) - getBfusdQuotaDetails - [GetBfusdQuotaDetailsExample.java:48](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdQuotaDetailsExample.java#L48) +[GET /sapi/v1/bfusd/quota](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-quota-details) - getBfusdQuotaDetails - [GetBfusdQuotaDetailsExample.java:37](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdQuotaDetailsExample.java#L37) -[GET /sapi/v1/bfusd/history/rateHistory](https://developers.binance.com/docs/simple_earn/bfusd/history/Get-BFUSD-Rate-History) - getBfusdRateHistory - [GetBfusdRateHistoryExample.java:55](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRateHistoryExample.java#L55) +[GET /sapi/v1/bfusd/history/rateHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-rate-history) - getBfusdRateHistory - [GetBfusdRateHistoryExample.java:44](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRateHistoryExample.java#L44) -[GET /sapi/v1/bfusd/history/redemptionHistory](https://developers.binance.com/docs/simple_earn/bfusd/history/Get-BFUSD-Redemption-History) - getBfusdRedemptionHistory - [GetBfusdRedemptionHistoryExample.java:54](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRedemptionHistoryExample.java#L54) +[GET /sapi/v1/bfusd/history/redemptionHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-redemption-history) - getBfusdRedemptionHistory - [GetBfusdRedemptionHistoryExample.java:43](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRedemptionHistoryExample.java#L43) -[GET /sapi/v1/bfusd/history/rewardsHistory](https://developers.binance.com/docs/simple_earn/bfusd/history/Get-BFUSD-Rewards-History) - getBfusdRewardsHistory - [GetBfusdRewardsHistoryExample.java:54](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRewardsHistoryExample.java#L54) +[GET /sapi/v1/bfusd/history/rewardsHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-rewards-history) - getBfusdRewardsHistory - [GetBfusdRewardsHistoryExample.java:43](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRewardsHistoryExample.java#L43) -[GET /sapi/v1/bfusd/history/subscriptionHistory](https://developers.binance.com/docs/simple_earn/bfusd/history/Get-BFUSD-subscription-history) - getBfusdSubscriptionHistory - [GetBfusdSubscriptionHistoryExample.java:54](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdSubscriptionHistoryExample.java#L54) +[GET /sapi/v1/bfusd/history/subscriptionHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-subscription-history) - getBfusdSubscriptionHistory - [GetBfusdSubscriptionHistoryExample.java:45](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdSubscriptionHistoryExample.java#L45) -[POST /sapi/v1/bfusd/redeem](https://developers.binance.com/docs/simple_earn/bfusd/earn/Redeem-BFUSD) - redeemBfusd - [RedeemBfusdExample.java:49](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/RedeemBfusdExample.java#L49) +[POST /sapi/v1/bfusd/redeem](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#redeem-bfusd) - redeemBfusd - [RedeemBfusdExample.java:41](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/RedeemBfusdExample.java#L41) -[POST /sapi/v1/bfusd/subscribe](https://developers.binance.com/docs/simple_earn/bfusd/earn/Subscribe-BFUSD) - subscribeBfusd - [SubscribeBfusdExample.java:49](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/SubscribeBfusdExample.java#L49) +[POST /sapi/v1/bfusd/subscribe](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#subscribe-bfusd) - subscribeBfusd - [SubscribeBfusdExample.java:40](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/SubscribeBfusdExample.java#L40) ## FlexibleLocked -[GET /sapi/v1/simple-earn/flexible/history/collateralRecord](https://developers.binance.com/docs/simple_earn/flexible-locked/history/Get-Collateral-Record) - getCollateralRecord - [GetCollateralRecordExample.java:53](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetCollateralRecordExample.java#L53) +[GET /sapi/v1/simple-earn/flexible/history/collateralRecord](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-collateral-record) - getCollateralRecord - [GetCollateralRecordExample.java:42](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetCollateralRecordExample.java#L42) -[GET /sapi/v1/simple-earn/flexible/personalLeftQuota](https://developers.binance.com/docs/simple_earn/flexible-locked/account/Get-Flexible-Personal-Left-Quota) - getFlexiblePersonalLeftQuota - [GetFlexiblePersonalLeftQuotaExample.java:47](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexiblePersonalLeftQuotaExample.java#L47) +[GET /sapi/v1/simple-earn/flexible/personalLeftQuota](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-personal-left-quota) - getFlexiblePersonalLeftQuota - [GetFlexiblePersonalLeftQuotaExample.java:36](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexiblePersonalLeftQuotaExample.java#L36) -[GET /sapi/v1/simple-earn/flexible/position](https://developers.binance.com/docs/simple_earn/flexible-locked/account/Get-Flexible-Product-Position) - getFlexibleProductPosition - [GetFlexibleProductPositionExample.java:47](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleProductPositionExample.java#L47) +[GET /sapi/v1/simple-earn/flexible/position](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-product-position) - getFlexibleProductPosition - [GetFlexibleProductPositionExample.java:36](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleProductPositionExample.java#L36) -[GET /sapi/v1/simple-earn/flexible/history/redemptionRecord](https://developers.binance.com/docs/simple_earn/flexible-locked/history/Get-Flexible-Redemption-Record) - getFlexibleRedemptionRecord - [GetFlexibleRedemptionRecordExample.java:53](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleRedemptionRecordExample.java#L53) +[GET /sapi/v1/simple-earn/flexible/history/redemptionRecord](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-redemption-record) - getFlexibleRedemptionRecord - [GetFlexibleRedemptionRecordExample.java:42](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleRedemptionRecordExample.java#L42) -[GET /sapi/v1/simple-earn/flexible/history/rewardsRecord](https://developers.binance.com/docs/simple_earn/flexible-locked/history/Get-Flexible-Rewards-History) - getFlexibleRewardsHistory - [GetFlexibleRewardsHistoryExample.java:53](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleRewardsHistoryExample.java#L53) +[GET /sapi/v1/simple-earn/flexible/history/rewardsRecord](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-rewards-history) - getFlexibleRewardsHistory - [GetFlexibleRewardsHistoryExample.java:43](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleRewardsHistoryExample.java#L43) -[GET /sapi/v1/simple-earn/flexible/subscriptionPreview](https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Get-Flexible-Subscription-Preview) - getFlexibleSubscriptionPreview - [GetFlexibleSubscriptionPreviewExample.java:47](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleSubscriptionPreviewExample.java#L47) +[GET /sapi/v1/simple-earn/flexible/subscriptionPreview](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-subscription-preview) - getFlexibleSubscriptionPreview - [GetFlexibleSubscriptionPreviewExample.java:36](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleSubscriptionPreviewExample.java#L36) -[GET /sapi/v1/simple-earn/flexible/history/subscriptionRecord](https://developers.binance.com/docs/simple_earn/flexible-locked/history/Get-Flexible-Subscription-Record) - getFlexibleSubscriptionRecord - [GetFlexibleSubscriptionRecordExample.java:53](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleSubscriptionRecordExample.java#L53) +[GET /sapi/v1/simple-earn/flexible/history/subscriptionRecord](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-subscription-record) - getFlexibleSubscriptionRecord - [GetFlexibleSubscriptionRecordExample.java:42](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleSubscriptionRecordExample.java#L42) -[GET /sapi/v1/simple-earn/locked/personalLeftQuota](https://developers.binance.com/docs/simple_earn/flexible-locked/account/Get-Locked-Personal-Left-Quota) - getLockedPersonalLeftQuota - [GetLockedPersonalLeftQuotaExample.java:47](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedPersonalLeftQuotaExample.java#L47) +[GET /sapi/v1/simple-earn/locked/personalLeftQuota](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-personal-left-quota) - getLockedPersonalLeftQuota - [GetLockedPersonalLeftQuotaExample.java:36](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedPersonalLeftQuotaExample.java#L36) -[GET /sapi/v1/simple-earn/locked/position](https://developers.binance.com/docs/simple_earn/flexible-locked/account/Get-Locked-Product-Position) - getLockedProductPosition - [GetLockedProductPositionExample.java:47](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedProductPositionExample.java#L47) +[GET /sapi/v1/simple-earn/locked/position](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-product-position) - getLockedProductPosition - [GetLockedProductPositionExample.java:36](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedProductPositionExample.java#L36) -[GET /sapi/v1/simple-earn/locked/history/redemptionRecord](https://developers.binance.com/docs/simple_earn/flexible-locked/history/Get-Locked-Redemption-Record) - getLockedRedemptionRecord - [GetLockedRedemptionRecordExample.java:53](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedRedemptionRecordExample.java#L53) +[GET /sapi/v1/simple-earn/locked/history/redemptionRecord](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-redemption-record) - getLockedRedemptionRecord - [GetLockedRedemptionRecordExample.java:42](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedRedemptionRecordExample.java#L42) -[GET /sapi/v1/simple-earn/locked/history/rewardsRecord](https://developers.binance.com/docs/simple_earn/flexible-locked/history/Get-Locked-Rewards-History) - getLockedRewardsHistory - [GetLockedRewardsHistoryExample.java:53](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedRewardsHistoryExample.java#L53) +[GET /sapi/v1/simple-earn/locked/history/rewardsRecord](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-rewards-history) - getLockedRewardsHistory - [GetLockedRewardsHistoryExample.java:42](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedRewardsHistoryExample.java#L42) -[GET /sapi/v1/simple-earn/locked/subscriptionPreview](https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Get-Locked-Subscription-Preview) - getLockedSubscriptionPreview - [GetLockedSubscriptionPreviewExample.java:47](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedSubscriptionPreviewExample.java#L47) +[GET /sapi/v1/simple-earn/locked/subscriptionPreview](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-subscription-preview) - getLockedSubscriptionPreview - [GetLockedSubscriptionPreviewExample.java:36](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedSubscriptionPreviewExample.java#L36) -[GET /sapi/v1/simple-earn/locked/history/subscriptionRecord](https://developers.binance.com/docs/simple_earn/flexible-locked/history/Get-Locked-Subscription-Record) - getLockedSubscriptionRecord - [GetLockedSubscriptionRecordExample.java:53](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedSubscriptionRecordExample.java#L53) +[GET /sapi/v1/simple-earn/locked/history/subscriptionRecord](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-subscription-record) - getLockedSubscriptionRecord - [GetLockedSubscriptionRecordExample.java:42](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedSubscriptionRecordExample.java#L42) -[GET /sapi/v1/simple-earn/flexible/history/rateHistory](https://developers.binance.com/docs/simple_earn/flexible-locked/history/Get-Rate-History) - getRateHistory - [GetRateHistoryExample.java:52](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetRateHistoryExample.java#L52) +[GET /sapi/v1/simple-earn/flexible/history/rateHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-rate-history) - getRateHistory - [GetRateHistoryExample.java:43](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetRateHistoryExample.java#L43) -[GET /sapi/v1/simple-earn/flexible/list](https://developers.binance.com/docs/simple_earn/flexible-locked/account/Get-Simple-Earn-Flexible-Product-List) - getSimpleEarnFlexibleProductList - [GetSimpleEarnFlexibleProductListExample.java:47](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetSimpleEarnFlexibleProductListExample.java#L47) +[GET /sapi/v1/simple-earn/flexible/list](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-simple-earn-flexible-product-list) - getSimpleEarnFlexibleProductList - [GetSimpleEarnFlexibleProductListExample.java:36](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetSimpleEarnFlexibleProductListExample.java#L36) -[GET /sapi/v1/simple-earn/locked/list](https://developers.binance.com/docs/simple_earn/flexible-locked/account/Get-Simple-Earn-Locked-Product-List) - getSimpleEarnLockedProductList - [GetSimpleEarnLockedProductListExample.java:48](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetSimpleEarnLockedProductListExample.java#L48) +[GET /sapi/v1/simple-earn/locked/list](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-simple-earn-locked-product-list) - getSimpleEarnLockedProductList - [GetSimpleEarnLockedProductListExample.java:37](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetSimpleEarnLockedProductListExample.java#L37) -[POST /sapi/v1/simple-earn/flexible/redeem](https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Redeem-Flexible-Product) - redeemFlexibleProduct - [RedeemFlexibleProductExample.java:49](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/RedeemFlexibleProductExample.java#L49) +[POST /sapi/v1/simple-earn/flexible/redeem](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#redeem-flexible-product) - redeemFlexibleProduct - [RedeemFlexibleProductExample.java:39](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/RedeemFlexibleProductExample.java#L39) -[POST /sapi/v1/simple-earn/locked/redeem](https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Redeem-Locked-Product) - redeemLockedProduct - [RedeemLockedProductExample.java:49](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/RedeemLockedProductExample.java#L49) +[POST /sapi/v1/simple-earn/locked/redeem](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#redeem-locked-product) - redeemLockedProduct - [RedeemLockedProductExample.java:39](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/RedeemLockedProductExample.java#L39) -[POST /sapi/v1/simple-earn/flexible/setAutoSubscribe](https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Set-Flexible-Auto-Subscribe) - setFlexibleAutoSubscribe - [SetFlexibleAutoSubscribeExample.java:48](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetFlexibleAutoSubscribeExample.java#L48) +[POST /sapi/v1/simple-earn/flexible/setAutoSubscribe](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#set-flexible-auto-subscribe) - setFlexibleAutoSubscribe - [SetFlexibleAutoSubscribeExample.java:37](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetFlexibleAutoSubscribeExample.java#L37) -[POST /sapi/v1/simple-earn/locked/setAutoSubscribe](https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Set-Locked-Auto-Subscribe) - setLockedAutoSubscribe - [SetLockedAutoSubscribeExample.java:48](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetLockedAutoSubscribeExample.java#L48) +[POST /sapi/v1/simple-earn/locked/setAutoSubscribe](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#set-locked-auto-subscribe) - setLockedAutoSubscribe - [SetLockedAutoSubscribeExample.java:37](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetLockedAutoSubscribeExample.java#L37) -[POST /sapi/v1/simple-earn/locked/setRedeemOption](https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Set-Locked-Redeem-Option) - setLockedProductRedeemOption - [SetLockedProductRedeemOptionExample.java:48](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetLockedProductRedeemOptionExample.java#L48) +[POST /sapi/v1/simple-earn/locked/setRedeemOption](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#set-locked-product-redeem-option) - setLockedProductRedeemOption - [SetLockedProductRedeemOptionExample.java:38](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetLockedProductRedeemOptionExample.java#L38) -[GET /sapi/v1/simple-earn/account](https://developers.binance.com/docs/simple_earn/flexible-locked/account/Simple-Account) - simpleAccount - [SimpleAccountExample.java:47](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SimpleAccountExample.java#L47) +[GET /sapi/v1/simple-earn/account](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#simple-account) - simpleAccount - [SimpleAccountExample.java:36](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SimpleAccountExample.java#L36) -[POST /sapi/v1/simple-earn/flexible/subscribe](https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Subscribe-Flexible-Product) - subscribeFlexibleProduct - [SubscribeFlexibleProductExample.java:49](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SubscribeFlexibleProductExample.java#L49) +[POST /sapi/v1/simple-earn/flexible/subscribe](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#subscribe-flexible-product) - subscribeFlexibleProduct - [SubscribeFlexibleProductExample.java:39](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SubscribeFlexibleProductExample.java#L39) -[POST /sapi/v1/simple-earn/locked/subscribe](https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Subscribe-Locked-Product) - subscribeLockedProduct - [SubscribeLockedProductExample.java:49](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SubscribeLockedProductExample.java#L49) +[POST /sapi/v1/simple-earn/locked/subscribe](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#subscribe-locked-product) - subscribeLockedProduct - [SubscribeLockedProductExample.java:39](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SubscribeLockedProductExample.java#L39) ## Rwusd -[GET /sapi/v1/rwusd/account](https://developers.binance.com/docs/simple_earn/rwusd/account/) - getRwusdAccount - [GetRwusdAccountExample.java:47](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdAccountExample.java#L47) +[GET /sapi/v1/rwusd/account](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-account) - getRwusdAccount - [GetRwusdAccountExample.java:36](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdAccountExample.java#L36) -[GET /sapi/v1/rwusd/quota](https://developers.binance.com/docs/simple_earn/rwusd/account/Get-RWUSD-Quota-Details) - getRwusdQuotaDetails - [GetRwusdQuotaDetailsExample.java:48](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdQuotaDetailsExample.java#L48) +[GET /sapi/v1/rwusd/quota](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-quota-details) - getRwusdQuotaDetails - [GetRwusdQuotaDetailsExample.java:37](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdQuotaDetailsExample.java#L37) -[GET /sapi/v1/rwusd/history/rateHistory](https://developers.binance.com/docs/simple_earn/rwusd/history/Get-RWUSD-Rate-History) - getRwusdRateHistory - [GetRwusdRateHistoryExample.java:55](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRateHistoryExample.java#L55) +[GET /sapi/v1/rwusd/history/rateHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-rate-history) - getRwusdRateHistory - [GetRwusdRateHistoryExample.java:44](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRateHistoryExample.java#L44) -[GET /sapi/v1/rwusd/history/redemptionHistory](https://developers.binance.com/docs/simple_earn/rwusd/history/Get-RWUSD-Redemption-History) - getRwusdRedemptionHistory - [GetRwusdRedemptionHistoryExample.java:54](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRedemptionHistoryExample.java#L54) +[GET /sapi/v1/rwusd/history/redemptionHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-redemption-history) - getRwusdRedemptionHistory - [GetRwusdRedemptionHistoryExample.java:43](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRedemptionHistoryExample.java#L43) -[GET /sapi/v1/rwusd/history/rewardsHistory](https://developers.binance.com/docs/simple_earn/rwusd/history/Get-RWUSD-Rewards-History) - getRwusdRewardsHistory - [GetRwusdRewardsHistoryExample.java:54](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRewardsHistoryExample.java#L54) +[GET /sapi/v1/rwusd/history/rewardsHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-rewards-history) - getRwusdRewardsHistory - [GetRwusdRewardsHistoryExample.java:43](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRewardsHistoryExample.java#L43) -[GET /sapi/v1/rwusd/history/subscriptionHistory](https://developers.binance.com/docs/simple_earn/rwusd/history/Get-RWUSD-subscription-history) - getRwusdSubscriptionHistory - [GetRwusdSubscriptionHistoryExample.java:54](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdSubscriptionHistoryExample.java#L54) +[GET /sapi/v1/rwusd/history/subscriptionHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-subscription-history) - getRwusdSubscriptionHistory - [GetRwusdSubscriptionHistoryExample.java:45](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdSubscriptionHistoryExample.java#L45) -[POST /sapi/v1/rwusd/redeem](https://developers.binance.com/docs/simple_earn/rwusd/earn/Redeem-RWUSD) - redeemRwusd - [RedeemRwusdExample.java:49](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/RedeemRwusdExample.java#L49) +[POST /sapi/v1/rwusd/redeem](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#redeem-rwusd) - redeemRwusd - [RedeemRwusdExample.java:41](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/RedeemRwusdExample.java#L41) -[POST /sapi/v1/rwusd/subscribe](https://developers.binance.com/docs/simple_earn/rwusd/earn/Subscribe-RWUSD) - subscribeRwusd - [SubscribeRwusdExample.java:49](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/SubscribeRwusdExample.java#L49) +[POST /sapi/v1/rwusd/subscribe](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#subscribe-rwusd) - subscribeRwusd - [SubscribeRwusdExample.java:41](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/SubscribeRwusdExample.java#L41) + +## YieldArena + +[GET /sapi/v1/earn/arena/activities](https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/yield-arena#get-yield-arena-activities) - getYieldArenaActivities - [GetYieldArenaActivitiesExample.java:37](/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/yieldarena/GetYieldArenaActivitiesExample.java#L37) diff --git a/clients/simple-earn/pom.xml b/clients/simple-earn/pom.xml index cd260f670..64294db0f 100644 --- a/clients/simple-earn/pom.xml +++ b/clients/simple-earn/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-simple-earn simple-earn - 6.0.1 + 7.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/JSON.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/JSON.java index 5be3f6e5b..885a1801a 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/JSON.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -288,6 +288,12 @@ private static Class getClassByDiscriminator( new com.binance.connector.client.simple_earn.rest.model .GetSimpleEarnLockedProductListResponseRowsInnerQuota .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.simple_earn.rest.model + .GetYieldArenaActivitiesResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.simple_earn.rest.model + .GetYieldArenaActivitiesResponseActivitiesInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.simple_earn.rest.model.RedeemBfusdRequest .CustomTypeAdapterFactory()); diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/BfusdApi.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/BfusdApi.java index 794f88c77..0268c4875 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/BfusdApi.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/BfusdApi.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -20,6 +20,7 @@ import com.binance.connector.client.common.SystemUtil; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.exception.ConstraintViolationException; +import com.binance.connector.client.simple_earn.rest.model.Asset; import com.binance.connector.client.simple_earn.rest.model.GetBfusdAccountResponse; import com.binance.connector.client.simple_earn.rest.model.GetBfusdQuotaDetailsResponse; import com.binance.connector.client.simple_earn.rest.model.GetBfusdRateHistoryResponse; @@ -53,7 +54,7 @@ public class BfusdApi { private static final String USER_AGENT = String.format( - "binance-simple-earn/6.0.0 (Java/%s; %s; %s)", + "binance-simple-earn/7.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -93,7 +94,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for getBfusdAccount * - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -103,8 +104,9 @@ public void setCustomBaseUrl(String customBaseUrl) { * 200 Get BFUSD Account - * * - * @see Get BFUSD - * Account (USER_DATA) Documentation + * @see Get + * BFUSD Account (USER_DATA) Documentation */ private okhttp3.Call getBfusdAccountCall(Long recvWindow) throws ApiException { String basePath = null; @@ -196,9 +198,10 @@ private okhttp3.Call getBfusdAccountValidateBeforeCall(Long recvWindow) throws A } /** - * Get BFUSD Account (USER_DATA) Get BFUSD account information. Weight: 150 + * Get BFUSD Account (USER_DATA) Get BFUSD account information. Weight(IP): 150 Security Type: + * USER_DATA * - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param recvWindow (optional) * @return ApiResponse<GetBfusdAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -209,10 +212,11 @@ private okhttp3.Call getBfusdAccountValidateBeforeCall(Long recvWindow) throws A * 200 Get BFUSD Account - * * - * @see Get BFUSD - * Account (USER_DATA) Documentation + * @see Get + * BFUSD Account (USER_DATA) Documentation */ - public ApiResponse getBfusdAccount(Long recvWindow) + public ApiResponse getBfusdAccount(@Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getBfusdAccountValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = @@ -223,7 +227,7 @@ public ApiResponse getBfusdAccount(Long recvWindow) /** * Build call for getBfusdQuotaDetails * - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -234,7 +238,7 @@ public ApiResponse getBfusdAccount(Long recvWindow) * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-quota-details">Get * BFUSD Quota Details (USER_DATA) Documentation */ private okhttp3.Call getBfusdQuotaDetailsCall(Long recvWindow) throws ApiException { @@ -329,9 +333,10 @@ private okhttp3.Call getBfusdQuotaDetailsValidateBeforeCall(Long recvWindow) /** * Get BFUSD Quota Details (USER_DATA) Get BFUSD quota details including subscription quota, - * fast redemption quota and standard redemption quota. Weight: 150 + * fast redemption quota, and standard redemption quota. Weight(IP): 150 Security Type: + * USER_DATA * - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param recvWindow (optional) * @return ApiResponse<GetBfusdQuotaDetailsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -343,11 +348,11 @@ private okhttp3.Call getBfusdQuotaDetailsValidateBeforeCall(Long recvWindow) * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-quota-details">Get * BFUSD Quota Details (USER_DATA) Documentation */ - public ApiResponse getBfusdQuotaDetails(Long recvWindow) - throws ApiException { + public ApiResponse getBfusdQuotaDetails( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getBfusdQuotaDetailsValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -359,9 +364,9 @@ public ApiResponse getBfusdQuotaDetails(Long recvW * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -372,7 +377,7 @@ public ApiResponse getBfusdQuotaDetails(Long recvW * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-rate-history">Get * BFUSD Rate History (USER_DATA) Documentation */ private okhttp3.Call getBfusdRateHistoryCall( @@ -493,21 +498,21 @@ private okhttp3.Call getBfusdRateHistoryValidateBeforeCall( } /** - * Get BFUSD Rate History (USER_DATA) Get BFUSD rate history sorted by descending order. * The - * time between `startTime` and `endTime` cannot be longer than 6 months. * - * If `startTime` and `endTime` are both not sent, then the last 30 - * days' data will be returned. * If `startTime` is sent but `endTime` - * is not sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time minus - * one month, and data between `startTime` and `endTime` will be returned. - * Weight: 150 + * Get BFUSD Rate History (USER_DATA) Get BFUSD rate history sorted by descending order. + * Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 6 months. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, `endTime` will + * default to current time, and results from `startTime` onward will be returned. - If + * `endTime` is sent but `startTime` is not sent, `startTime` + * defaults to the current time minus one month, and data between `startTime` and + * `endTime` will be returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) + * @param recvWindow (optional) * @return ApiResponse<GetBfusdRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -519,11 +524,15 @@ private okhttp3.Call getBfusdRateHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-rate-history">Get * BFUSD Rate History (USER_DATA) Documentation */ public ApiResponse getBfusdRateHistory( - Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getBfusdRateHistoryValidateBeforeCall( @@ -538,9 +547,9 @@ public ApiResponse getBfusdRateHistory( * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param current Currently querying page. (optional) + * @param size Number of results per page. (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -551,7 +560,7 @@ public ApiResponse getBfusdRateHistory( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-redemption-history">Get * BFUSD Redemption History (USER_DATA) Documentation */ private okhttp3.Call getBfusdRedemptionHistoryCall( @@ -672,21 +681,21 @@ private okhttp3.Call getBfusdRedemptionHistoryValidateBeforeCall( } /** - * Get BFUSD Redemption History (USER_DATA) Get BFUSD redemption history. * The time between - * `startTime` and `endTime` cannot be longer than 6 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time minus - * one month, and data between `startTime` and `endTime` will be returned. - * Weight: 150 + * Get BFUSD Redemption History (USER_DATA) Get BFUSD redemption history Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 6 months. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, `endTime` will + * default to current time, and results from `startTime` onward will be returned. - If + * `endTime` is sent but `startTime` is not sent, `startTime` + * defaults to the current time minus one month, and data between `startTime` and + * `endTime` will be returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param current Currently querying page. (optional) + * @param size Number of results per page. (optional) + * @param recvWindow (optional) * @return ApiResponse<GetBfusdRedemptionHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -698,11 +707,15 @@ private okhttp3.Call getBfusdRedemptionHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-redemption-history">Get * BFUSD Redemption History (USER_DATA) Documentation */ public ApiResponse getBfusdRedemptionHistory( - Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getBfusdRedemptionHistoryValidateBeforeCall( @@ -717,9 +730,9 @@ public ApiResponse getBfusdRedemptionHistory( * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param current Currently querying page. (optional) + * @param size Number of results per page. (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -730,7 +743,7 @@ public ApiResponse getBfusdRedemptionHistory( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-rewards-history">Get * BFUSD Rewards History (USER_DATA) Documentation */ private okhttp3.Call getBfusdRewardsHistoryCall( @@ -851,21 +864,21 @@ private okhttp3.Call getBfusdRewardsHistoryValidateBeforeCall( } /** - * Get BFUSD Rewards History (USER_DATA) Get BFUSD rewards history. * The time between - * `startTime` and `endTime` cannot be longer than 6 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time minus - * one month, and data between `startTime` and `endTime` will be returned. - * Weight: 150 + * Get BFUSD Rewards History (USER_DATA) Get BFUSD rewards history Weight(IP): 150 Security + * Type: USER_DATA Notes: - The time between `startTime` and `endTime` + * cannot be longer than 6 months. - If `startTime` and `endTime` are both + * not sent, then the last 30 days' data will be returned. - If `startTime` is + * sent but `endTime` is not sent, `endTime` will default to current time, + * and results from `startTime` onward will be returned. - If `endTime` is + * sent but `startTime` is not sent, `startTime` defaults to the current + * time minus one month, and data between `startTime` and `endTime` will be + * returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param current Currently querying page. (optional) + * @param size Number of results per page. (optional) + * @param recvWindow (optional) * @return ApiResponse<GetBfusdRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -877,11 +890,15 @@ private okhttp3.Call getBfusdRewardsHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-rewards-history">Get * BFUSD Rewards History (USER_DATA) Documentation */ public ApiResponse getBfusdRewardsHistory( - Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getBfusdRewardsHistoryValidateBeforeCall( @@ -894,12 +911,12 @@ public ApiResponse getBfusdRewardsHistory( /** * Build call for getBfusdSubscriptionHistory * - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param current Currently querying page. (optional) + * @param size Number of results per page. (optional) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -910,11 +927,11 @@ public ApiResponse getBfusdRewardsHistory( * * * @see Get - * BFUSD subscription history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-subscription-history">Get + * BFUSD subscription history (USER_DATA) Documentation */ private okhttp3.Call getBfusdSubscriptionHistoryCall( - String asset, Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Asset asset, Long startTime, Long endTime, Long current, Long size, Long recvWindow) throws ApiException { String basePath = null; // Operation Servers @@ -996,7 +1013,7 @@ private okhttp3.Call getBfusdSubscriptionHistoryCall( @SuppressWarnings("rawtypes") private okhttp3.Call getBfusdSubscriptionHistoryValidateBeforeCall( - String asset, Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Asset asset, Long startTime, Long endTime, Long current, Long size, Long recvWindow) throws ApiException { try { Validator validator = @@ -1012,7 +1029,7 @@ private okhttp3.Call getBfusdSubscriptionHistoryValidateBeforeCall( this.getClass() .getMethod( "getBfusdSubscriptionHistory", - String.class, + Asset.class, Long.class, Long.class, Long.class, @@ -1037,22 +1054,22 @@ private okhttp3.Call getBfusdSubscriptionHistoryValidateBeforeCall( } /** - * Get BFUSD subscription history(USER_DATA) Get BFUSD subscription history * The time between - * `startTime` and `endTime` cannot be longer than 6 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time - * advanced by one month, and data between `startTime` and `endTime` will be - * returned. Weight: 150 + * Get BFUSD subscription history (USER_DATA) Get BFUSD subscription history Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 6 months. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, `endTime` will + * default to current time, and results from `startTime` onward will be returned. - If + * `endTime` is sent but `startTime` is not sent, `startTime` + * defaults to the current time advanced by one month, and data between `startTime` + * and `endTime` will be returned. * - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param current Currently querying page. (optional) + * @param size Number of results per page. (optional) + * @param recvWindow (optional) * @return ApiResponse<GetBfusdSubscriptionHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1064,11 +1081,16 @@ private okhttp3.Call getBfusdSubscriptionHistoryValidateBeforeCall( * * * @see Get - * BFUSD subscription history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-subscription-history">Get + * BFUSD subscription history (USER_DATA) Documentation */ public ApiResponse getBfusdSubscriptionHistory( - String asset, Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Asset asset, + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getBfusdSubscriptionHistoryValidateBeforeCall( @@ -1091,8 +1113,9 @@ public ApiResponse getBfusdSubscriptionHist * 200 Redeem BFUSD - * * - * @see Redeem - * BFUSD(TRADE) Documentation + * @see Redeem + * BFUSD (TRADE) Documentation */ private okhttp3.Call redeemBfusdCall(RedeemBfusdRequest redeemBfusdRequest) throws ApiException { @@ -1196,8 +1219,10 @@ private okhttp3.Call redeemBfusdValidateBeforeCall(RedeemBfusdRequest redeemBfus } /** - * Redeem BFUSD(TRADE) Redeem BFUSD to USDT * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 150 + * Redeem BFUSD (TRADE) Redeem BFUSD to USDT Weight(IP): 150 Security Type: TRADE Notes: - You + * need to open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. - This API only supports BFUSD redemption to the Spot Account. Redemptions to the + * Funding Account or any other account type are not supported. * * @param redeemBfusdRequest (required) * @return ApiResponse<RedeemBfusdResponse> @@ -1210,8 +1235,9 @@ private okhttp3.Call redeemBfusdValidateBeforeCall(RedeemBfusdRequest redeemBfus * 200 Redeem BFUSD - * * - * @see Redeem - * BFUSD(TRADE) Documentation + * @see Redeem + * BFUSD (TRADE) Documentation */ public ApiResponse redeemBfusd( @Valid @NotNull RedeemBfusdRequest redeemBfusdRequest) throws ApiException { @@ -1235,8 +1261,8 @@ public ApiResponse redeemBfusd( * * * @see Subscribe - * BFUSD(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#subscribe-bfusd">Subscribe + * BFUSD (TRADE) Documentation */ private okhttp3.Call subscribeBfusdCall(SubscribeBfusdRequest subscribeBfusdRequest) throws ApiException { @@ -1341,8 +1367,10 @@ private okhttp3.Call subscribeBfusdValidateBeforeCall( } /** - * Subscribe BFUSD(TRADE) Subscribe BFUSD * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 150 + * Subscribe BFUSD (TRADE) Subscribe BFUSD Weight(IP): 150 Security Type: TRADE Notes: - You + * need to open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. - This API only supports BFUSD subscription using assets held in the Spot Account. + * Subscriptions initiated from the Funding Account or any other account type are not supported. * * @param subscribeBfusdRequest (required) * @return ApiResponse<SubscribeBfusdResponse> @@ -1356,8 +1384,8 @@ private okhttp3.Call subscribeBfusdValidateBeforeCall( * * * @see Subscribe - * BFUSD(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#subscribe-bfusd">Subscribe + * BFUSD (TRADE) Documentation */ public ApiResponse subscribeBfusd( @Valid @NotNull SubscribeBfusdRequest subscribeBfusdRequest) throws ApiException { diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/FlexibleLockedApi.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/FlexibleLockedApi.java index 603a52b4c..8a844338c 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/FlexibleLockedApi.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/FlexibleLockedApi.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -20,6 +20,7 @@ import com.binance.connector.client.common.SystemUtil; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.exception.ConstraintViolationException; +import com.binance.connector.client.simple_earn.rest.model.AprPeriod; import com.binance.connector.client.simple_earn.rest.model.GetCollateralRecordResponse; import com.binance.connector.client.simple_earn.rest.model.GetFlexiblePersonalLeftQuotaResponse; import com.binance.connector.client.simple_earn.rest.model.GetFlexibleProductPositionResponse; @@ -36,6 +37,7 @@ import com.binance.connector.client.simple_earn.rest.model.GetRateHistoryResponse; import com.binance.connector.client.simple_earn.rest.model.GetSimpleEarnFlexibleProductListResponse; import com.binance.connector.client.simple_earn.rest.model.GetSimpleEarnLockedProductListResponse; +import com.binance.connector.client.simple_earn.rest.model.OrderType; import com.binance.connector.client.simple_earn.rest.model.RedeemFlexibleProductRequest; import com.binance.connector.client.simple_earn.rest.model.RedeemFlexibleProductResponse; import com.binance.connector.client.simple_earn.rest.model.RedeemLockedProductRequest; @@ -74,7 +76,7 @@ public class FlexibleLockedApi { private static final String USER_AGENT = String.format( - "binance-simple-earn/6.0.0 (Java/%s; %s; %s)", + "binance-simple-earn/7.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -117,8 +119,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @param productId (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -130,8 +132,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Get - * Collateral Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-collateral-record">Get + * Collateral Record (USER_DATA) Documentation */ private okhttp3.Call getCollateralRecordCall( String productId, @@ -267,19 +269,20 @@ private okhttp3.Call getCollateralRecordValidateBeforeCall( } /** - * Get Collateral Record(USER_DATA) Get Collateral Record * The time between - * `startTime` and `endTime` cannot be longer than 30 days. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 1 + * Get Collateral Record (USER_DATA) Get Collateral Record Weight(IP): 1 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 30 days. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param productId (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetCollateralRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -292,16 +295,16 @@ private okhttp3.Call getCollateralRecordValidateBeforeCall( * * * @see Get - * Collateral Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-collateral-record">Get + * Collateral Record (USER_DATA) Documentation */ public ApiResponse getCollateralRecord( String productId, Long startTime, Long endTime, - Long current, - Long size, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getCollateralRecordValidateBeforeCall( @@ -326,8 +329,8 @@ public ApiResponse getCollateralRecord( * * * @see Get - * Flexible Personal Left Quota(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-personal-left-quota">Get + * Flexible Personal Left Quota (USER_DATA) Documentation */ private okhttp3.Call getFlexiblePersonalLeftQuotaCall(String productId, Long recvWindow) throws ApiException { @@ -427,7 +430,8 @@ private okhttp3.Call getFlexiblePersonalLeftQuotaValidateBeforeCall( } /** - * Get Flexible Personal Left Quota(USER_DATA) Get Flexible Personal Left Quota Weight: 150 + * Get Flexible Personal Left Quota (USER_DATA) Get Flexible Personal Left Quota Weight(IP): 150 + * Security Type: USER_DATA * * @param productId (required) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) @@ -442,11 +446,11 @@ private okhttp3.Call getFlexiblePersonalLeftQuotaValidateBeforeCall( * * * @see Get - * Flexible Personal Left Quota(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-personal-left-quota">Get + * Flexible Personal Left Quota (USER_DATA) Documentation */ public ApiResponse getFlexiblePersonalLeftQuota( - @NotNull String productId, Long recvWindow) throws ApiException { + @NotNull String productId, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFlexiblePersonalLeftQuotaValidateBeforeCall(productId, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -457,10 +461,10 @@ public ApiResponse getFlexiblePersonalLeft /** * Build call for getFlexibleProductPosition * - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param productId (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -472,8 +476,8 @@ public ApiResponse getFlexiblePersonalLeft * * * @see Get - * Flexible Product Position(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-product-position">Get + * Flexible Product Position (USER_DATA) Documentation */ private okhttp3.Call getFlexibleProductPositionCall( String asset, String productId, Long current, Long size, Long recvWindow) @@ -593,12 +597,13 @@ private okhttp3.Call getFlexibleProductPositionValidateBeforeCall( } /** - * Get Flexible Product Position(USER_DATA) Get Flexible Product Position Weight: 150 + * Get Flexible Product Position (USER_DATA) Get Flexible Product Position Weight(IP): 150 + * Security Type: USER_DATA * - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param productId (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetFlexibleProductPositionResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -611,11 +616,15 @@ private okhttp3.Call getFlexibleProductPositionValidateBeforeCall( * * * @see Get - * Flexible Product Position(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-product-position">Get + * Flexible Product Position (USER_DATA) Documentation */ public ApiResponse getFlexibleProductPosition( - String asset, String productId, Long current, Long size, Long recvWindow) + String asset, + String productId, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFlexibleProductPositionValidateBeforeCall( @@ -630,11 +639,11 @@ public ApiResponse getFlexibleProductPositio * * @param productId (optional) * @param redeemId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -646,8 +655,8 @@ public ApiResponse getFlexibleProductPositio * * * @see Get - * Flexible Redemption Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-redemption-record">Get + * Flexible Redemption Record (USER_DATA) Documentation */ private okhttp3.Call getFlexibleRedemptionRecordCall( String productId, @@ -799,21 +808,22 @@ private okhttp3.Call getFlexibleRedemptionRecordValidateBeforeCall( } /** - * Get Flexible Redemption Record(USER_DATA) Get Flexible Redemption Record * The time between - * `startTime` and `endTime` cannot be longer than 30 days. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get Flexible Redemption Record (USER_DATA) Get Flexible Redemption Record Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 30 days. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, the next 30 days' data + * beginning from `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param productId (optional) * @param redeemId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetFlexibleRedemptionRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -826,8 +836,8 @@ private okhttp3.Call getFlexibleRedemptionRecordValidateBeforeCall( * * * @see Get - * Flexible Redemption Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-redemption-record">Get + * Flexible Redemption Record (USER_DATA) Documentation */ public ApiResponse getFlexibleRedemptionRecord( String productId, @@ -835,9 +845,9 @@ public ApiResponse getFlexibleRedemptionRec String asset, Long startTime, Long endTime, - Long current, - Long size, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFlexibleRedemptionRecordValidateBeforeCall( @@ -850,14 +860,15 @@ public ApiResponse getFlexibleRedemptionRec /** * Build call for getFlexibleRewardsHistory * - * @param type `BONUS` - Bonus tiered APR, `REALTIME` Real-time APR, - * `REWARDS` Historical rewards,`ALL`(set to default) (required) * @param productId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param type `BONUS` - Bonus tiered APR, `REALTIME` - Real-time APR, + * `REWARDS` - Historical rewards, `ALL` - All types. Default: + * `ALL` (optional, default to STANDARD) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -869,15 +880,15 @@ public ApiResponse getFlexibleRedemptionRec * * * @see Get - * Flexible Rewards History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-rewards-history">Get + * Flexible Rewards History (USER_DATA) Documentation */ private okhttp3.Call getFlexibleRewardsHistoryCall( - String type, String productId, String asset, Long startTime, Long endTime, + OrderType type, Long current, Long size, Long recvWindow) @@ -970,11 +981,11 @@ private okhttp3.Call getFlexibleRewardsHistoryCall( @SuppressWarnings("rawtypes") private okhttp3.Call getFlexibleRewardsHistoryValidateBeforeCall( - String type, String productId, String asset, Long startTime, Long endTime, + OrderType type, Long current, Long size, Long recvWindow) @@ -989,7 +1000,7 @@ private okhttp3.Call getFlexibleRewardsHistoryValidateBeforeCall( ExecutableValidator executableValidator = validator.forExecutables(); Object[] parameterValues = { - type, productId, asset, startTime, endTime, current, size, recvWindow + productId, asset, startTime, endTime, type, current, size, recvWindow }; Method method = this.getClass() @@ -997,9 +1008,9 @@ private okhttp3.Call getFlexibleRewardsHistoryValidateBeforeCall( "getFlexibleRewardsHistory", String.class, String.class, - String.class, Long.class, Long.class, + OrderType.class, Long.class, Long.class, Long.class); @@ -1008,7 +1019,7 @@ private okhttp3.Call getFlexibleRewardsHistoryValidateBeforeCall( if (violations.size() == 0) { return getFlexibleRewardsHistoryCall( - type, productId, asset, startTime, endTime, current, size, recvWindow); + productId, asset, startTime, endTime, type, current, size, recvWindow); } else { throw new ConstraintViolationException((Set) violations); } @@ -1022,22 +1033,24 @@ private okhttp3.Call getFlexibleRewardsHistoryValidateBeforeCall( } /** - * Get Flexible Rewards History(USER_DATA) Get Flexible Rewards History * The time between - * `startTime` and `endTime` cannot be longer than 30 days. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get Flexible Rewards History (USER_DATA) Get Flexible Rewards History Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 30 days. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, the next 30 days' data + * beginning from `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * - * @param type `BONUS` - Bonus tiered APR, `REALTIME` Real-time APR, - * `REWARDS` Historical rewards,`ALL`(set to default) (required) * @param productId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param type `BONUS` - Bonus tiered APR, `REALTIME` - Real-time APR, + * `REWARDS` - Historical rewards, `ALL` - All types. Default: + * `ALL` (optional, default to STANDARD) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetFlexibleRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1050,22 +1063,22 @@ private okhttp3.Call getFlexibleRewardsHistoryValidateBeforeCall( * * * @see Get - * Flexible Rewards History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-rewards-history">Get + * Flexible Rewards History (USER_DATA) Documentation */ public ApiResponse getFlexibleRewardsHistory( - @NotNull String type, String productId, String asset, Long startTime, Long endTime, - Long current, - Long size, - Long recvWindow) + OrderType type, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFlexibleRewardsHistoryValidateBeforeCall( - type, productId, asset, startTime, endTime, current, size, recvWindow); + productId, asset, startTime, endTime, type, current, size, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1087,8 +1100,8 @@ public ApiResponse getFlexibleRewardsHistory( * * * @see Get - * Flexible Subscription Preview(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-subscription-preview">Get + * Flexible Subscription Preview (USER_DATA) Documentation */ private okhttp3.Call getFlexibleSubscriptionPreviewCall( String productId, Double amount, Long recvWindow) throws ApiException { @@ -1198,7 +1211,8 @@ private okhttp3.Call getFlexibleSubscriptionPreviewValidateBeforeCall( } /** - * Get Flexible Subscription Preview(USER_DATA) Get Flexible Subscription Preview Weight: 150 + * Get Flexible Subscription Preview (USER_DATA) Get Flexible Subscription Preview Weight(IP): + * 150 Security Type: USER_DATA * * @param productId (required) * @param amount (required) @@ -1214,11 +1228,11 @@ private okhttp3.Call getFlexibleSubscriptionPreviewValidateBeforeCall( * * * @see Get - * Flexible Subscription Preview(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-subscription-preview">Get + * Flexible Subscription Preview (USER_DATA) Documentation */ public ApiResponse getFlexibleSubscriptionPreview( - @NotNull String productId, @NotNull Double amount, Long recvWindow) + @NotNull String productId, @NotNull Double amount, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFlexibleSubscriptionPreviewValidateBeforeCall(productId, amount, recvWindow); @@ -1232,11 +1246,11 @@ public ApiResponse getFlexibleSubscripti * * @param productId (optional) * @param purchaseId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1248,8 +1262,8 @@ public ApiResponse getFlexibleSubscripti * * * @see Get - * Flexible Subscription Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-subscription-record">Get + * Flexible Subscription Record (USER_DATA) Documentation */ private okhttp3.Call getFlexibleSubscriptionRecordCall( String productId, @@ -1408,21 +1422,22 @@ private okhttp3.Call getFlexibleSubscriptionRecordValidateBeforeCall( } /** - * Get Flexible Subscription Record(USER_DATA) Get Flexible Subscription Record * The time - * between `startTime` and `endTime` cannot be longer than 30 days. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get Flexible Subscription Record (USER_DATA) Get Flexible Subscription Record Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 30 days. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, the next 30 days' data + * beginning from `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param productId (optional) * @param purchaseId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetFlexibleSubscriptionRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1435,8 +1450,8 @@ private okhttp3.Call getFlexibleSubscriptionRecordValidateBeforeCall( * * * @see Get - * Flexible Subscription Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-subscription-record">Get + * Flexible Subscription Record (USER_DATA) Documentation */ public ApiResponse getFlexibleSubscriptionRecord( String productId, @@ -1444,9 +1459,9 @@ public ApiResponse getFlexibleSubscriptio String asset, Long startTime, Long endTime, - Long current, - Long size, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFlexibleSubscriptionRecordValidateBeforeCall( @@ -1478,8 +1493,8 @@ public ApiResponse getFlexibleSubscriptio * * * @see Get - * Locked Personal Left Quota(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-personal-left-quota">Get + * Locked Personal Left Quota (USER_DATA) Documentation */ private okhttp3.Call getLockedPersonalLeftQuotaCall(String projectId, Long recvWindow) throws ApiException { @@ -1579,7 +1594,8 @@ private okhttp3.Call getLockedPersonalLeftQuotaValidateBeforeCall( } /** - * Get Locked Personal Left Quota(USER_DATA) Get Locked Personal Left Quota Weight: 150 + * Get Locked Personal Left Quota (USER_DATA) Get Locked Personal Left Quota Weight(IP): 150 + * Security Type: USER_DATA * * @param projectId (required) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) @@ -1594,11 +1610,11 @@ private okhttp3.Call getLockedPersonalLeftQuotaValidateBeforeCall( * * * @see Get - * Locked Personal Left Quota(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-personal-left-quota">Get + * Locked Personal Left Quota (USER_DATA) Documentation */ public ApiResponse getLockedPersonalLeftQuota( - @NotNull String projectId, Long recvWindow) throws ApiException { + @NotNull String projectId, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getLockedPersonalLeftQuotaValidateBeforeCall(projectId, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1609,11 +1625,11 @@ public ApiResponse getLockedPersonalLeftQuot /** * Build call for getLockedProductPosition * - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param positionId (optional) * @param projectId (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1625,8 +1641,8 @@ public ApiResponse getLockedPersonalLeftQuot * * * @see Get - * Locked Product Position Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-product-position">Get + * Locked Product Position (USER_DATA) Documentation */ private okhttp3.Call getLockedProductPositionCall( String asset, @@ -1762,13 +1778,14 @@ private okhttp3.Call getLockedProductPositionValidateBeforeCall( } /** - * Get Locked Product Position Get Locked Product Position Weight: 150 + * Get Locked Product Position (USER_DATA) Get Locked Product Position Weight(IP): 150 Security + * Type: USER_DATA * - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param positionId (optional) * @param projectId (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetLockedProductPositionResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1781,16 +1798,16 @@ private okhttp3.Call getLockedProductPositionValidateBeforeCall( * * * @see Get - * Locked Product Position Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-product-position">Get + * Locked Product Position (USER_DATA) Documentation */ public ApiResponse getLockedProductPosition( String asset, String positionId, String projectId, - Long current, - Long size, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getLockedProductPositionValidateBeforeCall( @@ -1805,11 +1822,11 @@ public ApiResponse getLockedProductPosition( * * @param positionId (optional) * @param redeemId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1821,8 +1838,8 @@ public ApiResponse getLockedProductPosition( * * * @see Get - * Locked Redemption Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-redemption-record">Get + * Locked Redemption Record (USER_DATA) Documentation */ private okhttp3.Call getLockedRedemptionRecordCall( String positionId, @@ -1974,21 +1991,22 @@ private okhttp3.Call getLockedRedemptionRecordValidateBeforeCall( } /** - * Get Locked Redemption Record(USER_DATA) Get Locked Redemption Record * The time between - * `startTime` and `endTime` cannot be longer than 30 days. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get Locked Redemption Record (USER_DATA) Get Locked Redemption Record Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 30 days. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, the next 30 days' data + * beginning from `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param positionId (optional) * @param redeemId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetLockedRedemptionRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2001,8 +2019,8 @@ private okhttp3.Call getLockedRedemptionRecordValidateBeforeCall( * * * @see Get - * Locked Redemption Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-redemption-record">Get + * Locked Redemption Record (USER_DATA) Documentation */ public ApiResponse getLockedRedemptionRecord( String positionId, @@ -2010,9 +2028,9 @@ public ApiResponse getLockedRedemptionRecord( String asset, Long startTime, Long endTime, - Long current, - Long size, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getLockedRedemptionRecordValidateBeforeCall( @@ -2026,11 +2044,11 @@ public ApiResponse getLockedRedemptionRecord( * Build call for getLockedRewardsHistory * * @param positionId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2042,8 +2060,8 @@ public ApiResponse getLockedRedemptionRecord( * * * @see Get - * Locked Rewards History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-rewards-history">Get + * Locked Rewards History (USER_DATA) Documentation */ private okhttp3.Call getLockedRewardsHistoryCall( String positionId, @@ -2188,20 +2206,21 @@ private okhttp3.Call getLockedRewardsHistoryValidateBeforeCall( } /** - * Get Locked Rewards History(USER_DATA) Get Locked Rewards History * The time between - * `startTime` and `endTime` cannot be longer than 30 days. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get Locked Rewards History (USER_DATA) Get Locked Rewards History Weight(IP): 150 Security + * Type: USER_DATA Notes: - The time between `startTime` and `endTime` + * cannot be longer than 30 days. - If `startTime` and `endTime` are both + * not sent, then the last 30 days' data will be returned. - If `startTime` is + * sent but `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param positionId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetLockedRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2214,17 +2233,17 @@ private okhttp3.Call getLockedRewardsHistoryValidateBeforeCall( * * * @see Get - * Locked Rewards History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-rewards-history">Get + * Locked Rewards History (USER_DATA) Documentation */ public ApiResponse getLockedRewardsHistory( String positionId, String asset, Long startTime, Long endTime, - Long current, - Long size, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getLockedRewardsHistoryValidateBeforeCall( @@ -2239,7 +2258,7 @@ public ApiResponse getLockedRewardsHistory( * * @param projectId (required) * @param amount (required) - * @param autoSubscribe true or false, default true. (optional) + * @param autoSubscribe default true. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2251,8 +2270,8 @@ public ApiResponse getLockedRewardsHistory( * * * @see Get - * Locked Subscription Preview(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-subscription-preview">Get + * Locked Subscription Preview (USER_DATA) Documentation */ private okhttp3.Call getLockedSubscriptionPreviewCall( String projectId, Double amount, Boolean autoSubscribe, Long recvWindow) @@ -2371,11 +2390,12 @@ private okhttp3.Call getLockedSubscriptionPreviewValidateBeforeCall( } /** - * Get Locked Subscription Preview(USER_DATA) Get Locked Subscription Preview Weight: 150 + * Get Locked Subscription Preview (USER_DATA) Get Locked Subscription Preview Weight(IP): 150 + * Security Type: USER_DATA * * @param projectId (required) * @param amount (required) - * @param autoSubscribe true or false, default true. (optional) + * @param autoSubscribe default true. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetLockedSubscriptionPreviewResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2388,14 +2408,14 @@ private okhttp3.Call getLockedSubscriptionPreviewValidateBeforeCall( * * * @see Get - * Locked Subscription Preview(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-subscription-preview">Get + * Locked Subscription Preview (USER_DATA) Documentation */ public ApiResponse getLockedSubscriptionPreview( @NotNull String projectId, @NotNull Double amount, Boolean autoSubscribe, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getLockedSubscriptionPreviewValidateBeforeCall( @@ -2409,11 +2429,11 @@ public ApiResponse getLockedSubscriptionPr * Build call for getLockedSubscriptionRecord * * @param purchaseId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2425,8 +2445,8 @@ public ApiResponse getLockedSubscriptionPr * * * @see Get - * Locked Subscription Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-subscription-record">Get + * Locked Subscription Record (USER_DATA) Documentation */ private okhttp3.Call getLockedSubscriptionRecordCall( String purchaseId, @@ -2571,20 +2591,21 @@ private okhttp3.Call getLockedSubscriptionRecordValidateBeforeCall( } /** - * Get Locked Subscription Record(USER_DATA) Get Locked Subscription Record * The time between - * `startTime` and `endTime` cannot be longer than 30 days. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get Locked Subscription Record (USER_DATA) Get Locked Subscription Record Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 30 days. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, the next 30 days' data + * beginning from `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param purchaseId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetLockedSubscriptionRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2597,17 +2618,17 @@ private okhttp3.Call getLockedSubscriptionRecordValidateBeforeCall( * * * @see Get - * Locked Subscription Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-subscription-record">Get + * Locked Subscription Record (USER_DATA) Documentation */ public ApiResponse getLockedSubscriptionRecord( String purchaseId, String asset, Long startTime, Long endTime, - Long current, - Long size, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getLockedSubscriptionRecordValidateBeforeCall( @@ -2621,11 +2642,11 @@ public ApiResponse getLockedSubscriptionRec * Build call for getRateHistory * * @param productId (required) - * @param aprPeriod \"DAY\",\"YEAR\",default\"DAY\" (optional) + * @param aprPeriod (optional, default to DAY) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2637,12 +2658,12 @@ public ApiResponse getLockedSubscriptionRec * * * @see Get - * Rate History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-rate-history">Get + * Rate History (USER_DATA) Documentation */ private okhttp3.Call getRateHistoryCall( String productId, - String aprPeriod, + AprPeriod aprPeriod, Long startTime, Long endTime, Long current, @@ -2734,7 +2755,7 @@ private okhttp3.Call getRateHistoryCall( @SuppressWarnings("rawtypes") private okhttp3.Call getRateHistoryValidateBeforeCall( String productId, - String aprPeriod, + AprPeriod aprPeriod, Long startTime, Long endTime, Long current, @@ -2758,7 +2779,7 @@ private okhttp3.Call getRateHistoryValidateBeforeCall( .getMethod( "getRateHistory", String.class, - String.class, + AprPeriod.class, Long.class, Long.class, Long.class, @@ -2783,20 +2804,20 @@ private okhttp3.Call getRateHistoryValidateBeforeCall( } /** - * Get Rate History(USER_DATA) Get Rate History * The time between startTime and endTime cannot - * be longer than 1 year. * If `startTime` and `endTime` are both not sent, - * then the last 30 days' data will be returned. * If `startTime` is sent but - * `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + * Get Rate History (USER_DATA) Get Rate History Weight(IP): 150 Security Type: USER_DATA Notes: + * - The time between startTime and endTime cannot be longer than 1 year. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @param productId (required) - * @param aprPeriod \"DAY\",\"YEAR\",default\"DAY\" (optional) + * @param aprPeriod (optional, default to DAY) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2809,17 +2830,17 @@ private okhttp3.Call getRateHistoryValidateBeforeCall( * * * @see Get - * Rate History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-rate-history">Get + * Rate History (USER_DATA) Documentation */ public ApiResponse getRateHistory( @NotNull String productId, - String aprPeriod, + AprPeriod aprPeriod, Long startTime, Long endTime, - Long current, - Long size, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getRateHistoryValidateBeforeCall( @@ -2832,9 +2853,9 @@ public ApiResponse getRateHistory( /** * Build call for getSimpleEarnFlexibleProductList * - * @param asset USDC or USDT (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param asset (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2846,8 +2867,8 @@ public ApiResponse getRateHistory( * * * @see Get - * Simple Earn Flexible Product List(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-simple-earn-flexible-product-list">Get + * Simple Earn Flexible Product List (USER_DATA) Documentation */ private okhttp3.Call getSimpleEarnFlexibleProductListCall( String asset, Long current, Long size, Long recvWindow) throws ApiException { @@ -2960,12 +2981,12 @@ private okhttp3.Call getSimpleEarnFlexibleProductListValidateBeforeCall( } /** - * Get Simple Earn Flexible Product List(USER_DATA) Get available Simple Earn flexible product - * list Weight: 150 + * Get Simple Earn Flexible Product List (USER_DATA) Get available Simple Earn flexible product + * list Weight(IP): 150 Security Type: USER_DATA * - * @param asset USDC or USDT (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param asset (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetSimpleEarnFlexibleProductListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2978,11 +2999,12 @@ private okhttp3.Call getSimpleEarnFlexibleProductListValidateBeforeCall( * * * @see Get - * Simple Earn Flexible Product List(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-simple-earn-flexible-product-list">Get + * Simple Earn Flexible Product List (USER_DATA) Documentation */ public ApiResponse getSimpleEarnFlexibleProductList( - String asset, Long current, Long size, Long recvWindow) throws ApiException { + String asset, @Min(1L) Long current, @Max(100L) Long size, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = getSimpleEarnFlexibleProductListValidateBeforeCall( asset, current, size, recvWindow); @@ -2994,9 +3016,9 @@ public ApiResponse getSimpleEarnFlexib /** * Build call for getSimpleEarnLockedProductList * - * @param asset USDC or USDT (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param asset (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3008,8 +3030,8 @@ public ApiResponse getSimpleEarnFlexib * * * @see Get - * Simple Earn Locked Product List(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-simple-earn-locked-product-list">Get + * Simple Earn Locked Product List (USER_DATA) Documentation */ private okhttp3.Call getSimpleEarnLockedProductListCall( String asset, Long current, Long size, Long recvWindow) throws ApiException { @@ -3122,12 +3144,13 @@ private okhttp3.Call getSimpleEarnLockedProductListValidateBeforeCall( } /** - * Get Simple Earn Locked Product List(USER_DATA) Get Simple Earn Locked Product List * Get - * available Simple Earn locked product list Weight: 150 + * Get Simple Earn Locked Product List (USER_DATA) Get Simple Earn Locked Product List + * Weight(IP): 150 Security Type: USER_DATA Notes: - Get available Simple Earn locked product + * list * - * @param asset USDC or USDT (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param asset (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetSimpleEarnLockedProductListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -3140,11 +3163,12 @@ private okhttp3.Call getSimpleEarnLockedProductListValidateBeforeCall( * * * @see Get - * Simple Earn Locked Product List(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-simple-earn-locked-product-list">Get + * Simple Earn Locked Product List (USER_DATA) Documentation */ public ApiResponse getSimpleEarnLockedProductList( - String asset, Long current, Long size, Long recvWindow) throws ApiException { + String asset, @Min(1L) Long current, @Max(100L) Long size, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = getSimpleEarnLockedProductListValidateBeforeCall(asset, current, size, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -3166,8 +3190,8 @@ public ApiResponse getSimpleEarnLockedPr * * * @see Redeem - * Flexible Product(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#redeem-flexible-product">Redeem + * Flexible Product (TRADE) Documentation */ private okhttp3.Call redeemFlexibleProductCall( RedeemFlexibleProductRequest redeemFlexibleProductRequest) throws ApiException { @@ -3282,8 +3306,9 @@ private okhttp3.Call redeemFlexibleProductValidateBeforeCall( } /** - * Redeem Flexible Product(TRADE) Redeem Flexible Product * You need to open `Enable Spot - * & Margin Trading` permission for the API Key which requests this endpoint. Weight: 1 + * Redeem Flexible Product (TRADE) Redeem Flexible Product Weight(IP): 1 Security Type: TRADE + * Notes: - You need to open `Enable Spot & Margin Trading` permission for the API + * Key which requests this endpoint. * * @param redeemFlexibleProductRequest (required) * @return ApiResponse<RedeemFlexibleProductResponse> @@ -3297,8 +3322,8 @@ private okhttp3.Call redeemFlexibleProductValidateBeforeCall( * * * @see Redeem - * Flexible Product(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#redeem-flexible-product">Redeem + * Flexible Product (TRADE) Documentation */ public ApiResponse redeemFlexibleProduct( @Valid @NotNull RedeemFlexibleProductRequest redeemFlexibleProductRequest) @@ -3324,8 +3349,8 @@ public ApiResponse redeemFlexibleProduct( * * * @see Redeem - * Locked Product(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#redeem-locked-product">Redeem + * Locked Product (TRADE) Documentation */ private okhttp3.Call redeemLockedProductCall( RedeemLockedProductRequest redeemLockedProductRequest) throws ApiException { @@ -3425,9 +3450,9 @@ private okhttp3.Call redeemLockedProductValidateBeforeCall( } /** - * Redeem Locked Product(TRADE) Redeem Locked Product * You need to open `Enable Spot & - * Margin Trading` permission for the API Key which requests this endpoint. Weight: 1/3s - * per account + * Redeem Locked Product (TRADE) Redeem Locked Product Weight(IP): 1 Security Type: TRADE Notes: + * - You need to open `Enable Spot & Margin Trading` permission for the API Key + * which requests this endpoint. * * @param redeemLockedProductRequest (required) * @return ApiResponse<RedeemLockedProductResponse> @@ -3441,8 +3466,8 @@ private okhttp3.Call redeemLockedProductValidateBeforeCall( * * * @see Redeem - * Locked Product(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#redeem-locked-product">Redeem + * Locked Product (TRADE) Documentation */ public ApiResponse redeemLockedProduct( @Valid @NotNull RedeemLockedProductRequest redeemLockedProductRequest) @@ -3468,8 +3493,8 @@ public ApiResponse redeemLockedProduct( * * * @see Set - * Flexible Auto Subscribe(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#set-flexible-auto-subscribe">Set + * Flexible Auto Subscribe (USER_DATA) Documentation */ private okhttp3.Call setFlexibleAutoSubscribeCall( SetFlexibleAutoSubscribeRequest setFlexibleAutoSubscribeRequest) throws ApiException { @@ -3576,7 +3601,8 @@ private okhttp3.Call setFlexibleAutoSubscribeValidateBeforeCall( } /** - * Set Flexible Auto Subscribe(USER_DATA) Set Flexible Auto Subscribe Weight: 150 + * Set Flexible Auto Subscribe (USER_DATA) Set Flexible Auto Subscribe Weight(IP): 150 Security + * Type: USER_DATA * * @param setFlexibleAutoSubscribeRequest (required) * @return ApiResponse<SetFlexibleAutoSubscribeResponse> @@ -3590,8 +3616,8 @@ private okhttp3.Call setFlexibleAutoSubscribeValidateBeforeCall( * * * @see Set - * Flexible Auto Subscribe(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#set-flexible-auto-subscribe">Set + * Flexible Auto Subscribe (USER_DATA) Documentation */ public ApiResponse setFlexibleAutoSubscribe( @Valid @NotNull SetFlexibleAutoSubscribeRequest setFlexibleAutoSubscribeRequest) @@ -3617,8 +3643,8 @@ public ApiResponse setFlexibleAutoSubscribe( * * * @see Set - * Locked Auto Subscribe(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#set-locked-auto-subscribe">Set + * Locked Auto Subscribe (USER_DATA) Documentation */ private okhttp3.Call setLockedAutoSubscribeCall( SetLockedAutoSubscribeRequest setLockedAutoSubscribeRequest) throws ApiException { @@ -3724,7 +3750,8 @@ private okhttp3.Call setLockedAutoSubscribeValidateBeforeCall( } /** - * Set Locked Auto Subscribe(USER_DATA) Set locked auto subscribe Weight: 150 + * Set Locked Auto Subscribe (USER_DATA) Set locked auto subscribe Weight(IP): 150 Security + * Type: USER_DATA * * @param setLockedAutoSubscribeRequest (required) * @return ApiResponse<SetLockedAutoSubscribeResponse> @@ -3738,8 +3765,8 @@ private okhttp3.Call setLockedAutoSubscribeValidateBeforeCall( * * * @see Set - * Locked Auto Subscribe(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#set-locked-auto-subscribe">Set + * Locked Auto Subscribe (USER_DATA) Documentation */ public ApiResponse setLockedAutoSubscribe( @Valid @NotNull SetLockedAutoSubscribeRequest setLockedAutoSubscribeRequest) @@ -3765,8 +3792,8 @@ public ApiResponse setLockedAutoSubscribe( * * * @see Set - * Locked Product Redeem Option(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#set-locked-product-redeem-option">Set + * Locked Product Redeem Option (USER_DATA) Documentation */ private okhttp3.Call setLockedProductRedeemOptionCall( SetLockedProductRedeemOptionRequest setLockedProductRedeemOptionRequest) @@ -3876,7 +3903,8 @@ private okhttp3.Call setLockedProductRedeemOptionValidateBeforeCall( } /** - * Set Locked Product Redeem Option(USER_DATA) Set redeem option for Locked product Weight: 50 + * Set Locked Product Redeem Option (USER_DATA) Set redeem option for Locked product Weight(IP): + * 50 Security Type: USER_DATA * * @param setLockedProductRedeemOptionRequest (required) * @return ApiResponse<SetLockedProductRedeemOptionResponse> @@ -3890,8 +3918,8 @@ private okhttp3.Call setLockedProductRedeemOptionValidateBeforeCall( * * * @see Set - * Locked Product Redeem Option(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#set-locked-product-redeem-option">Set + * Locked Product Redeem Option (USER_DATA) Documentation */ public ApiResponse setLockedProductRedeemOption( @Valid @NotNull SetLockedProductRedeemOptionRequest setLockedProductRedeemOptionRequest) @@ -3917,8 +3945,8 @@ public ApiResponse setLockedProductRedeemO * * * @see Simple - * Account(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#simple-account">Simple + * Account (USER_DATA) Documentation */ private okhttp3.Call simpleAccountCall(Long recvWindow) throws ApiException { String basePath = null; @@ -4010,7 +4038,7 @@ private okhttp3.Call simpleAccountValidateBeforeCall(Long recvWindow) throws Api } /** - * Simple Account(USER_DATA) Simple Account query Weight: 150 + * Simple Account (USER_DATA) Simple Account query Weight(IP): 150 Security Type: USER_DATA * * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<SimpleAccountResponse> @@ -4024,10 +4052,11 @@ private okhttp3.Call simpleAccountValidateBeforeCall(Long recvWindow) throws Api * * * @see Simple - * Account(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#simple-account">Simple + * Account (USER_DATA) Documentation */ - public ApiResponse simpleAccount(Long recvWindow) throws ApiException { + public ApiResponse simpleAccount(@Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = simpleAccountValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -4048,8 +4077,8 @@ public ApiResponse simpleAccount(Long recvWindow) throws * * * @see Subscribe - * Flexible Product(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#subscribe-flexible-product">Subscribe + * Flexible Product (TRADE) Documentation */ private okhttp3.Call subscribeFlexibleProductCall( SubscribeFlexibleProductRequest subscribeFlexibleProductRequest) throws ApiException { @@ -4168,9 +4197,9 @@ private okhttp3.Call subscribeFlexibleProductValidateBeforeCall( } /** - * Subscribe Flexible Product(TRADE) Subscribe Flexible Product * You need to open `Enable - * Spot & Margin Trading` permission for the API Key which requests this endpoint. - * Weight: 1 + * Subscribe Flexible Product (TRADE) Subscribe Flexible Product Weight(IP): 1 Security Type: + * TRADE Notes: - You need to open `Enable Spot & Margin Trading` permission for + * the API Key which requests this endpoint. * * @param subscribeFlexibleProductRequest (required) * @return ApiResponse<SubscribeFlexibleProductResponse> @@ -4184,8 +4213,8 @@ private okhttp3.Call subscribeFlexibleProductValidateBeforeCall( * * * @see Subscribe - * Flexible Product(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#subscribe-flexible-product">Subscribe + * Flexible Product (TRADE) Documentation */ public ApiResponse subscribeFlexibleProduct( @Valid @NotNull SubscribeFlexibleProductRequest subscribeFlexibleProductRequest) @@ -4211,8 +4240,8 @@ public ApiResponse subscribeFlexibleProduct( * * * @see Subscribe - * Locked Product(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#subscribe-locked-product">Subscribe + * Locked Product (TRADE) Documentation */ private okhttp3.Call subscribeLockedProductCall( SubscribeLockedProductRequest subscribeLockedProductRequest) throws ApiException { @@ -4334,8 +4363,9 @@ private okhttp3.Call subscribeLockedProductValidateBeforeCall( } /** - * Subscribe Locked Product(TRADE) Subscribe Locked Product * You need to open `Enable Spot - * & Margin Trading` permission for the API Key which requests this endpoint. Weight: 1 + * Subscribe Locked Product (TRADE) Subscribe Locked Product Weight(IP): 1 Security Type: TRADE + * Notes: - You need to open `Enable Spot & Margin Trading` permission for the API + * Key which requests this endpoint. * * @param subscribeLockedProductRequest (required) * @return ApiResponse<SubscribeLockedProductResponse> @@ -4349,8 +4379,8 @@ private okhttp3.Call subscribeLockedProductValidateBeforeCall( * * * @see Subscribe - * Locked Product(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#subscribe-locked-product">Subscribe + * Locked Product (TRADE) Documentation */ public ApiResponse subscribeLockedProduct( @Valid @NotNull SubscribeLockedProductRequest subscribeLockedProductRequest) diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/RwusdApi.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/RwusdApi.java index 73c400b8d..789315959 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/RwusdApi.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/RwusdApi.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -20,6 +20,7 @@ import com.binance.connector.client.common.SystemUtil; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.exception.ConstraintViolationException; +import com.binance.connector.client.simple_earn.rest.model.Asset; import com.binance.connector.client.simple_earn.rest.model.GetRwusdAccountResponse; import com.binance.connector.client.simple_earn.rest.model.GetRwusdQuotaDetailsResponse; import com.binance.connector.client.simple_earn.rest.model.GetRwusdRateHistoryResponse; @@ -53,7 +54,7 @@ public class RwusdApi { private static final String USER_AGENT = String.format( - "binance-simple-earn/6.0.0 (Java/%s; %s; %s)", + "binance-simple-earn/7.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -103,8 +104,9 @@ public void setCustomBaseUrl(String customBaseUrl) { * 200 Get RWUSD Account - * * - * @see Get RWUSD - * Account (USER_DATA) Documentation + * @see Get + * RWUSD Account (USER_DATA) Documentation */ private okhttp3.Call getRwusdAccountCall(Long recvWindow) throws ApiException { String basePath = null; @@ -196,7 +198,8 @@ private okhttp3.Call getRwusdAccountValidateBeforeCall(Long recvWindow) throws A } /** - * Get RWUSD Account (USER_DATA) Get RWUSD account information. Weight: 150 + * Get RWUSD Account (USER_DATA) Get RWUSD account information. Weight(IP): 150 Security Type: + * USER_DATA * * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetRwusdAccountResponse> @@ -209,10 +212,11 @@ private okhttp3.Call getRwusdAccountValidateBeforeCall(Long recvWindow) throws A * 200 Get RWUSD Account - * * - * @see Get RWUSD - * Account (USER_DATA) Documentation + * @see Get + * RWUSD Account (USER_DATA) Documentation */ - public ApiResponse getRwusdAccount(Long recvWindow) + public ApiResponse getRwusdAccount(@Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getRwusdAccountValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = @@ -234,7 +238,7 @@ public ApiResponse getRwusdAccount(Long recvWindow) * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-quota-details">Get * RWUSD Quota Details (USER_DATA) Documentation */ private okhttp3.Call getRwusdQuotaDetailsCall(Long recvWindow) throws ApiException { @@ -329,7 +333,8 @@ private okhttp3.Call getRwusdQuotaDetailsValidateBeforeCall(Long recvWindow) /** * Get RWUSD Quota Details (USER_DATA) Get RWUSD quota details including subscription quota, - * fast redemption quota, and standard redemption quota. Weight: 150 + * fast redemption quota, and standard redemption quota. Weight(IP): 150 Security Type: + * USER_DATA * * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetRwusdQuotaDetailsResponse> @@ -343,11 +348,11 @@ private okhttp3.Call getRwusdQuotaDetailsValidateBeforeCall(Long recvWindow) * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-quota-details">Get * RWUSD Quota Details (USER_DATA) Documentation */ - public ApiResponse getRwusdQuotaDetails(Long recvWindow) - throws ApiException { + public ApiResponse getRwusdQuotaDetails( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getRwusdQuotaDetailsValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -359,8 +364,8 @@ public ApiResponse getRwusdQuotaDetails(Long recvW * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -372,7 +377,7 @@ public ApiResponse getRwusdQuotaDetails(Long recvW * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-rate-history">Get * RWUSD Rate History (USER_DATA) Documentation */ private okhttp3.Call getRwusdRateHistoryCall( @@ -493,20 +498,20 @@ private okhttp3.Call getRwusdRateHistoryValidateBeforeCall( } /** - * Get RWUSD Rate History (USER_DATA) Get RWUSD rate history sorted by descending order. * The - * time between `startTime` and `endTime` cannot be longer than 6 months. * - * If `startTime` and `endTime` are both not sent, then the last 30 - * days' data will be returned. * If `startTime` is sent but `endTime` - * is not sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time minus - * one month, and data between `startTime` and `endTime` will be returned. - * Weight: 150 + * Get RWUSD Rate History (USER_DATA) Get RWUSD rate history sorted by descending order. + * Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 6 months. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, `endTime` will + * default to current time, and results from `startTime` onward will be returned. - If + * `endTime` is sent but `startTime` is not sent, `startTime` + * defaults to the current time minus one month, and data between `startTime` and + * `endTime` will be returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetRwusdRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -519,11 +524,15 @@ private okhttp3.Call getRwusdRateHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-rate-history">Get * RWUSD Rate History (USER_DATA) Documentation */ public ApiResponse getRwusdRateHistory( - Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getRwusdRateHistoryValidateBeforeCall( @@ -538,8 +547,8 @@ public ApiResponse getRwusdRateHistory( * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -551,7 +560,7 @@ public ApiResponse getRwusdRateHistory( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-redemption-history">Get * RWUSD Redemption History (USER_DATA) Documentation */ private okhttp3.Call getRwusdRedemptionHistoryCall( @@ -672,20 +681,20 @@ private okhttp3.Call getRwusdRedemptionHistoryValidateBeforeCall( } /** - * Get RWUSD Redemption History (USER_DATA) Get RWUSD redemption history. * The time between - * `startTime` and `endTime` cannot be longer than 6 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time minus - * one month, and data between `startTime` and `endTime` will be returned. - * Weight: 150 + * Get RWUSD Redemption History (USER_DATA) Get RWUSD redemption history. Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 6 months. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, `endTime` will + * default to current time, and results from `startTime` onward will be returned. - If + * `endTime` is sent but `startTime` is not sent, `startTime` + * defaults to the current time minus one month, and data between `startTime` and + * `endTime` will be returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetRwusdRedemptionHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -698,11 +707,15 @@ private okhttp3.Call getRwusdRedemptionHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-redemption-history">Get * RWUSD Redemption History (USER_DATA) Documentation */ public ApiResponse getRwusdRedemptionHistory( - Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getRwusdRedemptionHistoryValidateBeforeCall( @@ -717,8 +730,8 @@ public ApiResponse getRwusdRedemptionHistory( * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -730,7 +743,7 @@ public ApiResponse getRwusdRedemptionHistory( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-rewards-history">Get * RWUSD Rewards History (USER_DATA) Documentation */ private okhttp3.Call getRwusdRewardsHistoryCall( @@ -851,20 +864,20 @@ private okhttp3.Call getRwusdRewardsHistoryValidateBeforeCall( } /** - * Get RWUSD Rewards History (USER_DATA) Get RWUSD rewards history. * The time between - * `startTime` and `endTime` cannot be longer than 6 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time minus - * one month, and data between `startTime` and `endTime` will be returned. - * Weight: 150 + * Get RWUSD Rewards History (USER_DATA) Get RWUSD rewards history. Weight(IP): 150 Security + * Type: USER_DATA Notes: - The time between `startTime` and `endTime` + * cannot be longer than 6 months. - If `startTime` and `endTime` are both + * not sent, then the last 30 days' data will be returned. - If `startTime` is + * sent but `endTime` is not sent, `endTime` will default to current time, + * and results from `startTime` onward will be returned. - If `endTime` is + * sent but `startTime` is not sent, `startTime` defaults to the current + * time minus one month, and data between `startTime` and `endTime` will be + * returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetRwusdRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -877,11 +890,15 @@ private okhttp3.Call getRwusdRewardsHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-rewards-history">Get * RWUSD Rewards History (USER_DATA) Documentation */ public ApiResponse getRwusdRewardsHistory( - Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getRwusdRewardsHistoryValidateBeforeCall( @@ -894,11 +911,11 @@ public ApiResponse getRwusdRewardsHistory( /** * Build call for getRwusdSubscriptionHistory * - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -910,11 +927,11 @@ public ApiResponse getRwusdRewardsHistory( * * * @see Get - * RWUSD subscription history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-subscription-history">Get + * RWUSD subscription history (USER_DATA) Documentation */ private okhttp3.Call getRwusdSubscriptionHistoryCall( - String asset, Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Asset asset, Long startTime, Long endTime, Long current, Long size, Long recvWindow) throws ApiException { String basePath = null; // Operation Servers @@ -996,7 +1013,7 @@ private okhttp3.Call getRwusdSubscriptionHistoryCall( @SuppressWarnings("rawtypes") private okhttp3.Call getRwusdSubscriptionHistoryValidateBeforeCall( - String asset, Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Asset asset, Long startTime, Long endTime, Long current, Long size, Long recvWindow) throws ApiException { try { Validator validator = @@ -1012,7 +1029,7 @@ private okhttp3.Call getRwusdSubscriptionHistoryValidateBeforeCall( this.getClass() .getMethod( "getRwusdSubscriptionHistory", - String.class, + Asset.class, Long.class, Long.class, Long.class, @@ -1037,21 +1054,21 @@ private okhttp3.Call getRwusdSubscriptionHistoryValidateBeforeCall( } /** - * Get RWUSD subscription history(USER_DATA) Get RWUSD subscription history * The time between - * `startTime` and `endTime` cannot be longer than 6 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time - * advanced by one month, and data between `startTime` and `endTime` will be - * returned. Weight: 150 + * Get RWUSD subscription history (USER_DATA) Get RWUSD subscription history Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 6 months. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, `endTime` will + * default to current time, and results from `startTime` onward will be returned. - If + * `endTime` is sent but `startTime` is not sent, `startTime` + * defaults to the current time advanced by one month, and data between `startTime` + * and `endTime` will be returned. * - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetRwusdSubscriptionHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1064,11 +1081,16 @@ private okhttp3.Call getRwusdSubscriptionHistoryValidateBeforeCall( * * * @see Get - * RWUSD subscription history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-subscription-history">Get + * RWUSD subscription history (USER_DATA) Documentation */ public ApiResponse getRwusdSubscriptionHistory( - String asset, Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Asset asset, + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getRwusdSubscriptionHistoryValidateBeforeCall( @@ -1091,8 +1113,9 @@ public ApiResponse getRwusdSubscriptionHist * 200 Redeem RWUSD - * * - * @see Redeem - * RWUSD(TRADE) Documentation + * @see Redeem + * RWUSD (TRADE) Documentation */ private okhttp3.Call redeemRwusdCall(RedeemRwusdRequest redeemRwusdRequest) throws ApiException { @@ -1196,8 +1219,10 @@ private okhttp3.Call redeemRwusdValidateBeforeCall(RedeemRwusdRequest redeemRwus } /** - * Redeem RWUSD(TRADE) Redeem RWUSD to USDC * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 150 + * Redeem RWUSD (TRADE) Redeem RWUSD to USDC Weight(IP): 150 Security Type: TRADE Notes: - You + * need to open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. - This API only supports RWUSD redemption to the Spot Account. Redemptions to the + * Funding Account or any other account type are not supported. * * @param redeemRwusdRequest (required) * @return ApiResponse<RedeemRwusdResponse> @@ -1210,8 +1235,9 @@ private okhttp3.Call redeemRwusdValidateBeforeCall(RedeemRwusdRequest redeemRwus * 200 Redeem RWUSD - * * - * @see Redeem - * RWUSD(TRADE) Documentation + * @see Redeem + * RWUSD (TRADE) Documentation */ public ApiResponse redeemRwusd( @Valid @NotNull RedeemRwusdRequest redeemRwusdRequest) throws ApiException { @@ -1235,8 +1261,8 @@ public ApiResponse redeemRwusd( * * * @see Subscribe - * RWUSD(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#subscribe-rwusd">Subscribe + * RWUSD (TRADE) Documentation */ private okhttp3.Call subscribeRwusdCall(SubscribeRwusdRequest subscribeRwusdRequest) throws ApiException { @@ -1341,8 +1367,10 @@ private okhttp3.Call subscribeRwusdValidateBeforeCall( } /** - * Subscribe RWUSD(TRADE) Subscribe RWUSD * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 150 + * Subscribe RWUSD (TRADE) Subscribe RWUSD Weight(IP): 150 Security Type: TRADE Notes: - You + * need to open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. - This API only supports RWUSD subscription using assets held in the Spot Account. + * Subscriptions initiated from the Funding Account or any other account type are not supported. * * @param subscribeRwusdRequest (required) * @return ApiResponse<SubscribeRwusdResponse> @@ -1356,8 +1384,8 @@ private okhttp3.Call subscribeRwusdValidateBeforeCall( * * * @see Subscribe - * RWUSD(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#subscribe-rwusd">Subscribe + * RWUSD (TRADE) Documentation */ public ApiResponse subscribeRwusd( @Valid @NotNull SubscribeRwusdRequest subscribeRwusdRequest) throws ApiException { diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/SimpleEarnRestApi.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/SimpleEarnRestApi.java index 15751280a..5b875369b 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/SimpleEarnRestApi.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/SimpleEarnRestApi.java @@ -5,6 +5,8 @@ import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; +import com.binance.connector.client.simple_earn.rest.model.AprPeriod; +import com.binance.connector.client.simple_earn.rest.model.Asset; import com.binance.connector.client.simple_earn.rest.model.GetBfusdAccountResponse; import com.binance.connector.client.simple_earn.rest.model.GetBfusdQuotaDetailsResponse; import com.binance.connector.client.simple_earn.rest.model.GetBfusdRateHistoryResponse; @@ -33,6 +35,8 @@ import com.binance.connector.client.simple_earn.rest.model.GetRwusdSubscriptionHistoryResponse; import com.binance.connector.client.simple_earn.rest.model.GetSimpleEarnFlexibleProductListResponse; import com.binance.connector.client.simple_earn.rest.model.GetSimpleEarnLockedProductListResponse; +import com.binance.connector.client.simple_earn.rest.model.GetYieldArenaActivitiesResponse; +import com.binance.connector.client.simple_earn.rest.model.OrderType; import com.binance.connector.client.simple_earn.rest.model.RedeemBfusdRequest; import com.binance.connector.client.simple_earn.rest.model.RedeemBfusdResponse; import com.binance.connector.client.simple_earn.rest.model.RedeemFlexibleProductRequest; @@ -62,6 +66,7 @@ public class SimpleEarnRestApi { private final BfusdApi bfusdApi; private final FlexibleLockedApi flexibleLockedApi; private final RwusdApi rwusdApi; + private final YieldArenaApi yieldArenaApi; public SimpleEarnRestApi(ClientConfiguration configuration) { this(SimpleEarnRestApiUtil.getDefaultClient(configuration)); @@ -71,12 +76,14 @@ public SimpleEarnRestApi(ApiClient apiClient) { this.bfusdApi = new BfusdApi(apiClient); this.flexibleLockedApi = new FlexibleLockedApi(apiClient); this.rwusdApi = new RwusdApi(apiClient); + this.yieldArenaApi = new YieldArenaApi(apiClient); } /** - * Get BFUSD Account (USER_DATA) Get BFUSD account information. Weight: 150 + * Get BFUSD Account (USER_DATA) Get BFUSD account information. Weight(IP): 150 Security Type: + * USER_DATA * - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param recvWindow (optional) * @return ApiResponse<GetBfusdAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -87,8 +94,9 @@ public SimpleEarnRestApi(ApiClient apiClient) { * 200 Get BFUSD Account - * * - * @see Get BFUSD - * Account (USER_DATA) Documentation + * @see Get + * BFUSD Account (USER_DATA) Documentation */ public ApiResponse getBfusdAccount(Long recvWindow) throws ApiException { @@ -97,9 +105,10 @@ public ApiResponse getBfusdAccount(Long recvWindow) /** * Get BFUSD Quota Details (USER_DATA) Get BFUSD quota details including subscription quota, - * fast redemption quota and standard redemption quota. Weight: 150 + * fast redemption quota, and standard redemption quota. Weight(IP): 150 Security Type: + * USER_DATA * - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param recvWindow (optional) * @return ApiResponse<GetBfusdQuotaDetailsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -111,7 +120,7 @@ public ApiResponse getBfusdAccount(Long recvWindow) * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-quota-details">Get * BFUSD Quota Details (USER_DATA) Documentation */ public ApiResponse getBfusdQuotaDetails(Long recvWindow) @@ -120,21 +129,21 @@ public ApiResponse getBfusdQuotaDetails(Long recvW } /** - * Get BFUSD Rate History (USER_DATA) Get BFUSD rate history sorted by descending order. * The - * time between `startTime` and `endTime` cannot be longer than 6 months. * - * If `startTime` and `endTime` are both not sent, then the last 30 - * days' data will be returned. * If `startTime` is sent but `endTime` - * is not sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time minus - * one month, and data between `startTime` and `endTime` will be returned. - * Weight: 150 + * Get BFUSD Rate History (USER_DATA) Get BFUSD rate history sorted by descending order. + * Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 6 months. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, `endTime` will + * default to current time, and results from `startTime` onward will be returned. - If + * `endTime` is sent but `startTime` is not sent, `startTime` + * defaults to the current time minus one month, and data between `startTime` and + * `endTime` will be returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) + * @param recvWindow (optional) * @return ApiResponse<GetBfusdRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -146,7 +155,7 @@ public ApiResponse getBfusdQuotaDetails(Long recvW * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-rate-history">Get * BFUSD Rate History (USER_DATA) Documentation */ public ApiResponse getBfusdRateHistory( @@ -156,21 +165,21 @@ public ApiResponse getBfusdRateHistory( } /** - * Get BFUSD Redemption History (USER_DATA) Get BFUSD redemption history. * The time between - * `startTime` and `endTime` cannot be longer than 6 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time minus - * one month, and data between `startTime` and `endTime` will be returned. - * Weight: 150 + * Get BFUSD Redemption History (USER_DATA) Get BFUSD redemption history Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 6 months. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, `endTime` will + * default to current time, and results from `startTime` onward will be returned. - If + * `endTime` is sent but `startTime` is not sent, `startTime` + * defaults to the current time minus one month, and data between `startTime` and + * `endTime` will be returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param current Currently querying page. (optional) + * @param size Number of results per page. (optional) + * @param recvWindow (optional) * @return ApiResponse<GetBfusdRedemptionHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -182,7 +191,7 @@ public ApiResponse getBfusdRateHistory( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-redemption-history">Get * BFUSD Redemption History (USER_DATA) Documentation */ public ApiResponse getBfusdRedemptionHistory( @@ -192,21 +201,21 @@ public ApiResponse getBfusdRedemptionHistory( } /** - * Get BFUSD Rewards History (USER_DATA) Get BFUSD rewards history. * The time between - * `startTime` and `endTime` cannot be longer than 6 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time minus - * one month, and data between `startTime` and `endTime` will be returned. - * Weight: 150 + * Get BFUSD Rewards History (USER_DATA) Get BFUSD rewards history Weight(IP): 150 Security + * Type: USER_DATA Notes: - The time between `startTime` and `endTime` + * cannot be longer than 6 months. - If `startTime` and `endTime` are both + * not sent, then the last 30 days' data will be returned. - If `startTime` is + * sent but `endTime` is not sent, `endTime` will default to current time, + * and results from `startTime` onward will be returned. - If `endTime` is + * sent but `startTime` is not sent, `startTime` defaults to the current + * time minus one month, and data between `startTime` and `endTime` will be + * returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param current Currently querying page. (optional) + * @param size Number of results per page. (optional) + * @param recvWindow (optional) * @return ApiResponse<GetBfusdRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -218,7 +227,7 @@ public ApiResponse getBfusdRedemptionHistory( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-rewards-history">Get * BFUSD Rewards History (USER_DATA) Documentation */ public ApiResponse getBfusdRewardsHistory( @@ -228,22 +237,22 @@ public ApiResponse getBfusdRewardsHistory( } /** - * Get BFUSD subscription history(USER_DATA) Get BFUSD subscription history * The time between - * `startTime` and `endTime` cannot be longer than 6 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time - * advanced by one month, and data between `startTime` and `endTime` will be - * returned. Weight: 150 - * - * @param asset USDC or USDT (optional) + * Get BFUSD subscription history (USER_DATA) Get BFUSD subscription history Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 6 months. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, `endTime` will + * default to current time, and results from `startTime` onward will be returned. - If + * `endTime` is sent but `startTime` is not sent, `startTime` + * defaults to the current time advanced by one month, and data between `startTime` + * and `endTime` will be returned. + * + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) - * @param recvWindow The value cannot be greater than 60000 (ms) (optional) + * @param current Currently querying page. (optional) + * @param size Number of results per page. (optional) + * @param recvWindow (optional) * @return ApiResponse<GetBfusdSubscriptionHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -255,19 +264,21 @@ public ApiResponse getBfusdRewardsHistory( * * * @see Get - * BFUSD subscription history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#get-bfusd-subscription-history">Get + * BFUSD subscription history (USER_DATA) Documentation */ public ApiResponse getBfusdSubscriptionHistory( - String asset, Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Asset asset, Long startTime, Long endTime, Long current, Long size, Long recvWindow) throws ApiException { return bfusdApi.getBfusdSubscriptionHistory( asset, startTime, endTime, current, size, recvWindow); } /** - * Redeem BFUSD(TRADE) Redeem BFUSD to USDT * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 150 + * Redeem BFUSD (TRADE) Redeem BFUSD to USDT Weight(IP): 150 Security Type: TRADE Notes: - You + * need to open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. - This API only supports BFUSD redemption to the Spot Account. Redemptions to the + * Funding Account or any other account type are not supported. * * @param redeemBfusdRequest (required) * @return ApiResponse<RedeemBfusdResponse> @@ -280,8 +291,9 @@ public ApiResponse getBfusdSubscriptionHist * 200 Redeem BFUSD - * * - * @see Redeem - * BFUSD(TRADE) Documentation + * @see Redeem + * BFUSD (TRADE) Documentation */ public ApiResponse redeemBfusd(RedeemBfusdRequest redeemBfusdRequest) throws ApiException { @@ -289,8 +301,10 @@ public ApiResponse redeemBfusd(RedeemBfusdRequest redeemBfu } /** - * Subscribe BFUSD(TRADE) Subscribe BFUSD * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 150 + * Subscribe BFUSD (TRADE) Subscribe BFUSD Weight(IP): 150 Security Type: TRADE Notes: - You + * need to open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. - This API only supports BFUSD subscription using assets held in the Spot Account. + * Subscriptions initiated from the Funding Account or any other account type are not supported. * * @param subscribeBfusdRequest (required) * @return ApiResponse<SubscribeBfusdResponse> @@ -304,8 +318,8 @@ public ApiResponse redeemBfusd(RedeemBfusdRequest redeemBfu * * * @see Subscribe - * BFUSD(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/bfusd#subscribe-bfusd">Subscribe + * BFUSD (TRADE) Documentation */ public ApiResponse subscribeBfusd( SubscribeBfusdRequest subscribeBfusdRequest) throws ApiException { @@ -313,19 +327,20 @@ public ApiResponse subscribeBfusd( } /** - * Get Collateral Record(USER_DATA) Get Collateral Record * The time between - * `startTime` and `endTime` cannot be longer than 30 days. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 1 + * Get Collateral Record (USER_DATA) Get Collateral Record Weight(IP): 1 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 30 days. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param productId (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetCollateralRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -338,8 +353,8 @@ public ApiResponse subscribeBfusd( * * * @see Get - * Collateral Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-collateral-record">Get + * Collateral Record (USER_DATA) Documentation */ public ApiResponse getCollateralRecord( String productId, @@ -354,7 +369,8 @@ public ApiResponse getCollateralRecord( } /** - * Get Flexible Personal Left Quota(USER_DATA) Get Flexible Personal Left Quota Weight: 150 + * Get Flexible Personal Left Quota (USER_DATA) Get Flexible Personal Left Quota Weight(IP): 150 + * Security Type: USER_DATA * * @param productId (required) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) @@ -369,8 +385,8 @@ public ApiResponse getCollateralRecord( * * * @see Get - * Flexible Personal Left Quota(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-personal-left-quota">Get + * Flexible Personal Left Quota (USER_DATA) Documentation */ public ApiResponse getFlexiblePersonalLeftQuota( String productId, Long recvWindow) throws ApiException { @@ -378,12 +394,13 @@ public ApiResponse getFlexiblePersonalLeft } /** - * Get Flexible Product Position(USER_DATA) Get Flexible Product Position Weight: 150 + * Get Flexible Product Position (USER_DATA) Get Flexible Product Position Weight(IP): 150 + * Security Type: USER_DATA * - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param productId (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetFlexibleProductPositionResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -396,8 +413,8 @@ public ApiResponse getFlexiblePersonalLeft * * * @see Get - * Flexible Product Position(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-product-position">Get + * Flexible Product Position (USER_DATA) Documentation */ public ApiResponse getFlexibleProductPosition( String asset, String productId, Long current, Long size, Long recvWindow) @@ -407,21 +424,22 @@ public ApiResponse getFlexibleProductPositio } /** - * Get Flexible Redemption Record(USER_DATA) Get Flexible Redemption Record * The time between - * `startTime` and `endTime` cannot be longer than 30 days. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get Flexible Redemption Record (USER_DATA) Get Flexible Redemption Record Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 30 days. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, the next 30 days' data + * beginning from `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param productId (optional) * @param redeemId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetFlexibleRedemptionRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -434,8 +452,8 @@ public ApiResponse getFlexibleProductPositio * * * @see Get - * Flexible Redemption Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-redemption-record">Get + * Flexible Redemption Record (USER_DATA) Documentation */ public ApiResponse getFlexibleRedemptionRecord( String productId, @@ -452,22 +470,24 @@ public ApiResponse getFlexibleRedemptionRec } /** - * Get Flexible Rewards History(USER_DATA) Get Flexible Rewards History * The time between - * `startTime` and `endTime` cannot be longer than 30 days. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get Flexible Rewards History (USER_DATA) Get Flexible Rewards History Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 30 days. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, the next 30 days' data + * beginning from `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * - * @param type `BONUS` - Bonus tiered APR, `REALTIME` Real-time APR, - * `REWARDS` Historical rewards,`ALL`(set to default) (required) * @param productId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param type `BONUS` - Bonus tiered APR, `REALTIME` - Real-time APR, + * `REWARDS` - Historical rewards, `ALL` - All types. Default: + * `ALL` (optional, default to STANDARD) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetFlexibleRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -480,25 +500,26 @@ public ApiResponse getFlexibleRedemptionRec * * * @see Get - * Flexible Rewards History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-rewards-history">Get + * Flexible Rewards History (USER_DATA) Documentation */ public ApiResponse getFlexibleRewardsHistory( - String type, String productId, String asset, Long startTime, Long endTime, + OrderType type, Long current, Long size, Long recvWindow) throws ApiException { return flexibleLockedApi.getFlexibleRewardsHistory( - type, productId, asset, startTime, endTime, current, size, recvWindow); + productId, asset, startTime, endTime, type, current, size, recvWindow); } /** - * Get Flexible Subscription Preview(USER_DATA) Get Flexible Subscription Preview Weight: 150 + * Get Flexible Subscription Preview (USER_DATA) Get Flexible Subscription Preview Weight(IP): + * 150 Security Type: USER_DATA * * @param productId (required) * @param amount (required) @@ -514,8 +535,8 @@ public ApiResponse getFlexibleRewardsHistory( * * * @see Get - * Flexible Subscription Preview(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-subscription-preview">Get + * Flexible Subscription Preview (USER_DATA) Documentation */ public ApiResponse getFlexibleSubscriptionPreview( String productId, Double amount, Long recvWindow) throws ApiException { @@ -523,21 +544,22 @@ public ApiResponse getFlexibleSubscripti } /** - * Get Flexible Subscription Record(USER_DATA) Get Flexible Subscription Record * The time - * between `startTime` and `endTime` cannot be longer than 30 days. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get Flexible Subscription Record (USER_DATA) Get Flexible Subscription Record Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 30 days. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, the next 30 days' data + * beginning from `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param productId (optional) * @param purchaseId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetFlexibleSubscriptionRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -550,8 +572,8 @@ public ApiResponse getFlexibleSubscripti * * * @see Get - * Flexible Subscription Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-flexible-subscription-record">Get + * Flexible Subscription Record (USER_DATA) Documentation */ public ApiResponse getFlexibleSubscriptionRecord( String productId, @@ -568,7 +590,8 @@ public ApiResponse getFlexibleSubscriptio } /** - * Get Locked Personal Left Quota(USER_DATA) Get Locked Personal Left Quota Weight: 150 + * Get Locked Personal Left Quota (USER_DATA) Get Locked Personal Left Quota Weight(IP): 150 + * Security Type: USER_DATA * * @param projectId (required) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) @@ -583,8 +606,8 @@ public ApiResponse getFlexibleSubscriptio * * * @see Get - * Locked Personal Left Quota(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-personal-left-quota">Get + * Locked Personal Left Quota (USER_DATA) Documentation */ public ApiResponse getLockedPersonalLeftQuota( String projectId, Long recvWindow) throws ApiException { @@ -592,13 +615,14 @@ public ApiResponse getLockedPersonalLeftQuot } /** - * Get Locked Product Position Get Locked Product Position Weight: 150 + * Get Locked Product Position (USER_DATA) Get Locked Product Position Weight(IP): 150 Security + * Type: USER_DATA * - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param positionId (optional) * @param projectId (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetLockedProductPositionResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -611,8 +635,8 @@ public ApiResponse getLockedPersonalLeftQuot * * * @see Get - * Locked Product Position Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-product-position">Get + * Locked Product Position (USER_DATA) Documentation */ public ApiResponse getLockedProductPosition( String asset, @@ -627,21 +651,22 @@ public ApiResponse getLockedProductPosition( } /** - * Get Locked Redemption Record(USER_DATA) Get Locked Redemption Record * The time between - * `startTime` and `endTime` cannot be longer than 30 days. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get Locked Redemption Record (USER_DATA) Get Locked Redemption Record Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 30 days. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, the next 30 days' data + * beginning from `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param positionId (optional) * @param redeemId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetLockedRedemptionRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -654,8 +679,8 @@ public ApiResponse getLockedProductPosition( * * * @see Get - * Locked Redemption Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-redemption-record">Get + * Locked Redemption Record (USER_DATA) Documentation */ public ApiResponse getLockedRedemptionRecord( String positionId, @@ -672,20 +697,21 @@ public ApiResponse getLockedRedemptionRecord( } /** - * Get Locked Rewards History(USER_DATA) Get Locked Rewards History * The time between - * `startTime` and `endTime` cannot be longer than 30 days. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get Locked Rewards History (USER_DATA) Get Locked Rewards History Weight(IP): 150 Security + * Type: USER_DATA Notes: - The time between `startTime` and `endTime` + * cannot be longer than 30 days. - If `startTime` and `endTime` are both + * not sent, then the last 30 days' data will be returned. - If `startTime` is + * sent but `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param positionId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetLockedRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -698,8 +724,8 @@ public ApiResponse getLockedRedemptionRecord( * * * @see Get - * Locked Rewards History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-rewards-history">Get + * Locked Rewards History (USER_DATA) Documentation */ public ApiResponse getLockedRewardsHistory( String positionId, @@ -715,11 +741,12 @@ public ApiResponse getLockedRewardsHistory( } /** - * Get Locked Subscription Preview(USER_DATA) Get Locked Subscription Preview Weight: 150 + * Get Locked Subscription Preview (USER_DATA) Get Locked Subscription Preview Weight(IP): 150 + * Security Type: USER_DATA * * @param projectId (required) * @param amount (required) - * @param autoSubscribe true or false, default true. (optional) + * @param autoSubscribe default true. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetLockedSubscriptionPreviewResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -732,8 +759,8 @@ public ApiResponse getLockedRewardsHistory( * * * @see Get - * Locked Subscription Preview(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-subscription-preview">Get + * Locked Subscription Preview (USER_DATA) Documentation */ public ApiResponse getLockedSubscriptionPreview( String projectId, Double amount, Boolean autoSubscribe, Long recvWindow) @@ -743,20 +770,21 @@ public ApiResponse getLockedSubscriptionPr } /** - * Get Locked Subscription Record(USER_DATA) Get Locked Subscription Record * The time between - * `startTime` and `endTime` cannot be longer than 30 days. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get Locked Subscription Record (USER_DATA) Get Locked Subscription Record Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 30 days. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, the next 30 days' data + * beginning from `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param purchaseId (optional) - * @param asset USDC or USDT (optional) + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetLockedSubscriptionRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -769,8 +797,8 @@ public ApiResponse getLockedSubscriptionPr * * * @see Get - * Locked Subscription Record(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-locked-subscription-record">Get + * Locked Subscription Record (USER_DATA) Documentation */ public ApiResponse getLockedSubscriptionRecord( String purchaseId, @@ -786,20 +814,20 @@ public ApiResponse getLockedSubscriptionRec } /** - * Get Rate History(USER_DATA) Get Rate History * The time between startTime and endTime cannot - * be longer than 1 year. * If `startTime` and `endTime` are both not sent, - * then the last 30 days' data will be returned. * If `startTime` is sent but - * `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + * Get Rate History (USER_DATA) Get Rate History Weight(IP): 150 Security Type: USER_DATA Notes: + * - The time between startTime and endTime cannot be longer than 1 year. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @param productId (required) - * @param aprPeriod \"DAY\",\"YEAR\",default\"DAY\" (optional) + * @param aprPeriod (optional, default to DAY) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -812,12 +840,12 @@ public ApiResponse getLockedSubscriptionRec * * * @see Get - * Rate History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-rate-history">Get + * Rate History (USER_DATA) Documentation */ public ApiResponse getRateHistory( String productId, - String aprPeriod, + AprPeriod aprPeriod, Long startTime, Long endTime, Long current, @@ -829,12 +857,12 @@ public ApiResponse getRateHistory( } /** - * Get Simple Earn Flexible Product List(USER_DATA) Get available Simple Earn flexible product - * list Weight: 150 + * Get Simple Earn Flexible Product List (USER_DATA) Get available Simple Earn flexible product + * list Weight(IP): 150 Security Type: USER_DATA * - * @param asset USDC or USDT (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param asset (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetSimpleEarnFlexibleProductListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -847,8 +875,8 @@ public ApiResponse getRateHistory( * * * @see Get - * Simple Earn Flexible Product List(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-simple-earn-flexible-product-list">Get + * Simple Earn Flexible Product List (USER_DATA) Documentation */ public ApiResponse getSimpleEarnFlexibleProductList( String asset, Long current, Long size, Long recvWindow) throws ApiException { @@ -856,12 +884,13 @@ public ApiResponse getSimpleEarnFlexib } /** - * Get Simple Earn Locked Product List(USER_DATA) Get Simple Earn Locked Product List * Get - * available Simple Earn locked product list Weight: 150 + * Get Simple Earn Locked Product List (USER_DATA) Get Simple Earn Locked Product List + * Weight(IP): 150 Security Type: USER_DATA Notes: - Get available Simple Earn locked product + * list * - * @param asset USDC or USDT (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param asset (optional) + * @param current Currently querying page. Starts from 1. (optional) + * @param size Number of results per page. (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetSimpleEarnLockedProductListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -874,8 +903,8 @@ public ApiResponse getSimpleEarnFlexib * * * @see Get - * Simple Earn Locked Product List(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#get-simple-earn-locked-product-list">Get + * Simple Earn Locked Product List (USER_DATA) Documentation */ public ApiResponse getSimpleEarnLockedProductList( String asset, Long current, Long size, Long recvWindow) throws ApiException { @@ -883,8 +912,9 @@ public ApiResponse getSimpleEarnLockedPr } /** - * Redeem Flexible Product(TRADE) Redeem Flexible Product * You need to open `Enable Spot - * & Margin Trading` permission for the API Key which requests this endpoint. Weight: 1 + * Redeem Flexible Product (TRADE) Redeem Flexible Product Weight(IP): 1 Security Type: TRADE + * Notes: - You need to open `Enable Spot & Margin Trading` permission for the API + * Key which requests this endpoint. * * @param redeemFlexibleProductRequest (required) * @return ApiResponse<RedeemFlexibleProductResponse> @@ -898,8 +928,8 @@ public ApiResponse getSimpleEarnLockedPr * * * @see Redeem - * Flexible Product(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#redeem-flexible-product">Redeem + * Flexible Product (TRADE) Documentation */ public ApiResponse redeemFlexibleProduct( RedeemFlexibleProductRequest redeemFlexibleProductRequest) throws ApiException { @@ -907,9 +937,9 @@ public ApiResponse redeemFlexibleProduct( } /** - * Redeem Locked Product(TRADE) Redeem Locked Product * You need to open `Enable Spot & - * Margin Trading` permission for the API Key which requests this endpoint. Weight: 1/3s - * per account + * Redeem Locked Product (TRADE) Redeem Locked Product Weight(IP): 1 Security Type: TRADE Notes: + * - You need to open `Enable Spot & Margin Trading` permission for the API Key + * which requests this endpoint. * * @param redeemLockedProductRequest (required) * @return ApiResponse<RedeemLockedProductResponse> @@ -923,8 +953,8 @@ public ApiResponse redeemFlexibleProduct( * * * @see Redeem - * Locked Product(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#redeem-locked-product">Redeem + * Locked Product (TRADE) Documentation */ public ApiResponse redeemLockedProduct( RedeemLockedProductRequest redeemLockedProductRequest) throws ApiException { @@ -932,7 +962,8 @@ public ApiResponse redeemLockedProduct( } /** - * Set Flexible Auto Subscribe(USER_DATA) Set Flexible Auto Subscribe Weight: 150 + * Set Flexible Auto Subscribe (USER_DATA) Set Flexible Auto Subscribe Weight(IP): 150 Security + * Type: USER_DATA * * @param setFlexibleAutoSubscribeRequest (required) * @return ApiResponse<SetFlexibleAutoSubscribeResponse> @@ -946,8 +977,8 @@ public ApiResponse redeemLockedProduct( * * * @see Set - * Flexible Auto Subscribe(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#set-flexible-auto-subscribe">Set + * Flexible Auto Subscribe (USER_DATA) Documentation */ public ApiResponse setFlexibleAutoSubscribe( SetFlexibleAutoSubscribeRequest setFlexibleAutoSubscribeRequest) throws ApiException { @@ -955,7 +986,8 @@ public ApiResponse setFlexibleAutoSubscribe( } /** - * Set Locked Auto Subscribe(USER_DATA) Set locked auto subscribe Weight: 150 + * Set Locked Auto Subscribe (USER_DATA) Set locked auto subscribe Weight(IP): 150 Security + * Type: USER_DATA * * @param setLockedAutoSubscribeRequest (required) * @return ApiResponse<SetLockedAutoSubscribeResponse> @@ -969,8 +1001,8 @@ public ApiResponse setFlexibleAutoSubscribe( * * * @see Set - * Locked Auto Subscribe(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#set-locked-auto-subscribe">Set + * Locked Auto Subscribe (USER_DATA) Documentation */ public ApiResponse setLockedAutoSubscribe( SetLockedAutoSubscribeRequest setLockedAutoSubscribeRequest) throws ApiException { @@ -978,7 +1010,8 @@ public ApiResponse setLockedAutoSubscribe( } /** - * Set Locked Product Redeem Option(USER_DATA) Set redeem option for Locked product Weight: 50 + * Set Locked Product Redeem Option (USER_DATA) Set redeem option for Locked product Weight(IP): + * 50 Security Type: USER_DATA * * @param setLockedProductRedeemOptionRequest (required) * @return ApiResponse<SetLockedProductRedeemOptionResponse> @@ -992,8 +1025,8 @@ public ApiResponse setLockedAutoSubscribe( * * * @see Set - * Locked Product Redeem Option(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#set-locked-product-redeem-option">Set + * Locked Product Redeem Option (USER_DATA) Documentation */ public ApiResponse setLockedProductRedeemOption( SetLockedProductRedeemOptionRequest setLockedProductRedeemOptionRequest) @@ -1002,7 +1035,7 @@ public ApiResponse setLockedProductRedeemO } /** - * Simple Account(USER_DATA) Simple Account query Weight: 150 + * Simple Account (USER_DATA) Simple Account query Weight(IP): 150 Security Type: USER_DATA * * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<SimpleAccountResponse> @@ -1016,17 +1049,17 @@ public ApiResponse setLockedProductRedeemO * * * @see Simple - * Account(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#simple-account">Simple + * Account (USER_DATA) Documentation */ public ApiResponse simpleAccount(Long recvWindow) throws ApiException { return flexibleLockedApi.simpleAccount(recvWindow); } /** - * Subscribe Flexible Product(TRADE) Subscribe Flexible Product * You need to open `Enable - * Spot & Margin Trading` permission for the API Key which requests this endpoint. - * Weight: 1 + * Subscribe Flexible Product (TRADE) Subscribe Flexible Product Weight(IP): 1 Security Type: + * TRADE Notes: - You need to open `Enable Spot & Margin Trading` permission for + * the API Key which requests this endpoint. * * @param subscribeFlexibleProductRequest (required) * @return ApiResponse<SubscribeFlexibleProductResponse> @@ -1040,8 +1073,8 @@ public ApiResponse simpleAccount(Long recvWindow) throws * * * @see Subscribe - * Flexible Product(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#subscribe-flexible-product">Subscribe + * Flexible Product (TRADE) Documentation */ public ApiResponse subscribeFlexibleProduct( SubscribeFlexibleProductRequest subscribeFlexibleProductRequest) throws ApiException { @@ -1049,8 +1082,9 @@ public ApiResponse subscribeFlexibleProduct( } /** - * Subscribe Locked Product(TRADE) Subscribe Locked Product * You need to open `Enable Spot - * & Margin Trading` permission for the API Key which requests this endpoint. Weight: 1 + * Subscribe Locked Product (TRADE) Subscribe Locked Product Weight(IP): 1 Security Type: TRADE + * Notes: - You need to open `Enable Spot & Margin Trading` permission for the API + * Key which requests this endpoint. * * @param subscribeLockedProductRequest (required) * @return ApiResponse<SubscribeLockedProductResponse> @@ -1064,8 +1098,8 @@ public ApiResponse subscribeFlexibleProduct( * * * @see Subscribe - * Locked Product(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/flexible-locked#subscribe-locked-product">Subscribe + * Locked Product (TRADE) Documentation */ public ApiResponse subscribeLockedProduct( SubscribeLockedProductRequest subscribeLockedProductRequest) throws ApiException { @@ -1073,7 +1107,8 @@ public ApiResponse subscribeLockedProduct( } /** - * Get RWUSD Account (USER_DATA) Get RWUSD account information. Weight: 150 + * Get RWUSD Account (USER_DATA) Get RWUSD account information. Weight(IP): 150 Security Type: + * USER_DATA * * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetRwusdAccountResponse> @@ -1086,8 +1121,9 @@ public ApiResponse subscribeLockedProduct( * 200 Get RWUSD Account - * * - * @see Get RWUSD - * Account (USER_DATA) Documentation + * @see Get + * RWUSD Account (USER_DATA) Documentation */ public ApiResponse getRwusdAccount(Long recvWindow) throws ApiException { @@ -1096,7 +1132,8 @@ public ApiResponse getRwusdAccount(Long recvWindow) /** * Get RWUSD Quota Details (USER_DATA) Get RWUSD quota details including subscription quota, - * fast redemption quota, and standard redemption quota. Weight: 150 + * fast redemption quota, and standard redemption quota. Weight(IP): 150 Security Type: + * USER_DATA * * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetRwusdQuotaDetailsResponse> @@ -1110,7 +1147,7 @@ public ApiResponse getRwusdAccount(Long recvWindow) * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-quota-details">Get * RWUSD Quota Details (USER_DATA) Documentation */ public ApiResponse getRwusdQuotaDetails(Long recvWindow) @@ -1119,20 +1156,20 @@ public ApiResponse getRwusdQuotaDetails(Long recvW } /** - * Get RWUSD Rate History (USER_DATA) Get RWUSD rate history sorted by descending order. * The - * time between `startTime` and `endTime` cannot be longer than 6 months. * - * If `startTime` and `endTime` are both not sent, then the last 30 - * days' data will be returned. * If `startTime` is sent but `endTime` - * is not sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time minus - * one month, and data between `startTime` and `endTime` will be returned. - * Weight: 150 + * Get RWUSD Rate History (USER_DATA) Get RWUSD rate history sorted by descending order. + * Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 6 months. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, `endTime` will + * default to current time, and results from `startTime` onward will be returned. - If + * `endTime` is sent but `startTime` is not sent, `startTime` + * defaults to the current time minus one month, and data between `startTime` and + * `endTime` will be returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetRwusdRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1145,7 +1182,7 @@ public ApiResponse getRwusdQuotaDetails(Long recvW * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-rate-history">Get * RWUSD Rate History (USER_DATA) Documentation */ public ApiResponse getRwusdRateHistory( @@ -1155,20 +1192,20 @@ public ApiResponse getRwusdRateHistory( } /** - * Get RWUSD Redemption History (USER_DATA) Get RWUSD redemption history. * The time between - * `startTime` and `endTime` cannot be longer than 6 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time minus - * one month, and data between `startTime` and `endTime` will be returned. - * Weight: 150 + * Get RWUSD Redemption History (USER_DATA) Get RWUSD redemption history. Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 6 months. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, `endTime` will + * default to current time, and results from `startTime` onward will be returned. - If + * `endTime` is sent but `startTime` is not sent, `startTime` + * defaults to the current time minus one month, and data between `startTime` and + * `endTime` will be returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetRwusdRedemptionHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1181,7 +1218,7 @@ public ApiResponse getRwusdRateHistory( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-redemption-history">Get * RWUSD Redemption History (USER_DATA) Documentation */ public ApiResponse getRwusdRedemptionHistory( @@ -1191,20 +1228,20 @@ public ApiResponse getRwusdRedemptionHistory( } /** - * Get RWUSD Rewards History (USER_DATA) Get RWUSD rewards history. * The time between - * `startTime` and `endTime` cannot be longer than 6 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time minus - * one month, and data between `startTime` and `endTime` will be returned. - * Weight: 150 + * Get RWUSD Rewards History (USER_DATA) Get RWUSD rewards history. Weight(IP): 150 Security + * Type: USER_DATA Notes: - The time between `startTime` and `endTime` + * cannot be longer than 6 months. - If `startTime` and `endTime` are both + * not sent, then the last 30 days' data will be returned. - If `startTime` is + * sent but `endTime` is not sent, `endTime` will default to current time, + * and results from `startTime` onward will be returned. - If `endTime` is + * sent but `startTime` is not sent, `startTime` defaults to the current + * time minus one month, and data between `startTime` and `endTime` will be + * returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetRwusdRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1217,7 +1254,7 @@ public ApiResponse getRwusdRedemptionHistory( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-rewards-history">Get * RWUSD Rewards History (USER_DATA) Documentation */ public ApiResponse getRwusdRewardsHistory( @@ -1227,21 +1264,21 @@ public ApiResponse getRwusdRewardsHistory( } /** - * Get RWUSD subscription history(USER_DATA) Get RWUSD subscription history * The time between - * `startTime` and `endTime` cannot be longer than 6 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time - * advanced by one month, and data between `startTime` and `endTime` will be - * returned. Weight: 150 - * - * @param asset USDC or USDT (optional) + * Get RWUSD subscription history (USER_DATA) Get RWUSD subscription history Weight(IP): 150 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 6 months. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, `endTime` will + * default to current time, and results from `startTime` onward will be returned. - If + * `endTime` is sent but `startTime` is not sent, `startTime` + * defaults to the current time advanced by one month, and data between `startTime` + * and `endTime` will be returned. + * + * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Starts from 1. Default: 1 (optional) - * @param size Number of results per page. Default: 10, Max: 100 (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page (optional) * @param recvWindow The value cannot be greater than 60000 (ms) (optional) * @return ApiResponse<GetRwusdSubscriptionHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1254,19 +1291,21 @@ public ApiResponse getRwusdRewardsHistory( * * * @see Get - * RWUSD subscription history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#get-rwusd-subscription-history">Get + * RWUSD subscription history (USER_DATA) Documentation */ public ApiResponse getRwusdSubscriptionHistory( - String asset, Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Asset asset, Long startTime, Long endTime, Long current, Long size, Long recvWindow) throws ApiException { return rwusdApi.getRwusdSubscriptionHistory( asset, startTime, endTime, current, size, recvWindow); } /** - * Redeem RWUSD(TRADE) Redeem RWUSD to USDC * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 150 + * Redeem RWUSD (TRADE) Redeem RWUSD to USDC Weight(IP): 150 Security Type: TRADE Notes: - You + * need to open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. - This API only supports RWUSD redemption to the Spot Account. Redemptions to the + * Funding Account or any other account type are not supported. * * @param redeemRwusdRequest (required) * @return ApiResponse<RedeemRwusdResponse> @@ -1279,8 +1318,9 @@ public ApiResponse getRwusdSubscriptionHist * 200 Redeem RWUSD - * * - * @see Redeem - * RWUSD(TRADE) Documentation + * @see Redeem + * RWUSD (TRADE) Documentation */ public ApiResponse redeemRwusd(RedeemRwusdRequest redeemRwusdRequest) throws ApiException { @@ -1288,8 +1328,10 @@ public ApiResponse redeemRwusd(RedeemRwusdRequest redeemRwu } /** - * Subscribe RWUSD(TRADE) Subscribe RWUSD * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 150 + * Subscribe RWUSD (TRADE) Subscribe RWUSD Weight(IP): 150 Security Type: TRADE Notes: - You + * need to open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. - This API only supports RWUSD subscription using assets held in the Spot Account. + * Subscriptions initiated from the Funding Account or any other account type are not supported. * * @param subscribeRwusdRequest (required) * @return ApiResponse<SubscribeRwusdResponse> @@ -1303,11 +1345,39 @@ public ApiResponse redeemRwusd(RedeemRwusdRequest redeemRwu * * * @see Subscribe - * RWUSD(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-simple-earn/api/rest-api/rwusd#subscribe-rwusd">Subscribe + * RWUSD (TRADE) Documentation */ public ApiResponse subscribeRwusd( SubscribeRwusdRequest subscribeRwusdRequest) throws ApiException { return rwusdApi.subscribeRwusd(subscribeRwusdRequest); } + + /** + * Get Yield Arena Activities (USER_DATA) Get the list of Earn Yield Arena giveaway activities + * currently available to the user. Weight(IP): 150 Security Type: USER_DATA + * + * @param lang Locale tag for `title` and `description` (e.g. + * `en`, `zh-CN`, `pt-BR`). Default: `en`. If the + * value is missing, malformed, or has no translation configured, content is returned in + * `en`. (optional) + * @param recvWindow (optional) + * @return ApiResponse<GetYieldArenaActivitiesResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Yield Arena Activities -
+ * + * @see Get + * Yield Arena Activities (USER_DATA) Documentation + */ + public ApiResponse getYieldArenaActivities( + String lang, Long recvWindow) throws ApiException { + return yieldArenaApi.getYieldArenaActivities(lang, recvWindow); + } } diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/YieldArenaApi.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/YieldArenaApi.java new file mode 100644 index 000000000..3e8caa3df --- /dev/null +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/YieldArenaApi.java @@ -0,0 +1,230 @@ +/* + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.simple_earn.rest.api; + +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.Pair; +import com.binance.connector.client.common.SystemUtil; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.exception.ConstraintViolationException; +import com.binance.connector.client.simple_earn.rest.model.GetYieldArenaActivitiesResponse; +import com.google.gson.reflect.TypeToken; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Validation; +import jakarta.validation.Validator; +import jakarta.validation.constraints.*; +import jakarta.validation.executable.ExecutableValidator; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; + +public class YieldArenaApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + private static final String USER_AGENT = + String.format( + "binance-simple-earn/7.0.0 (Java/%s; %s; %s)", + SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); + private static final boolean HAS_TIME_UNIT = false; + + public YieldArenaApi(ClientConfiguration clientConfiguration) { + this(new ApiClient(clientConfiguration)); + } + + public YieldArenaApi(ApiClient apiClient) { + apiClient.setUserAgent(USER_AGENT); + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getYieldArenaActivities + * + * @param lang Locale tag for `title` and `description` (e.g. + * `en`, `zh-CN`, `pt-BR`). Default: `en`. If the + * value is missing, malformed, or has no translation configured, content is returned in + * `en`. (optional) + * @param recvWindow (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Yield Arena Activities -
+ * + * @see Get + * Yield Arena Activities (USER_DATA) Documentation + */ + private okhttp3.Call getYieldArenaActivitiesCall(String lang, Long recvWindow) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/earn/arena/activities"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + if (lang != null) { + localVarHeaderParams.put("lang", localVarApiClient.parameterToString(lang)); + } + + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getYieldArenaActivitiesValidateBeforeCall(String lang, Long recvWindow) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {lang, recvWindow}; + Method method = + this.getClass().getMethod("getYieldArenaActivities", String.class, Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return getYieldArenaActivitiesCall(lang, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Get Yield Arena Activities (USER_DATA) Get the list of Earn Yield Arena giveaway activities + * currently available to the user. Weight(IP): 150 Security Type: USER_DATA + * + * @param lang Locale tag for `title` and `description` (e.g. + * `en`, `zh-CN`, `pt-BR`). Default: `en`. If the + * value is missing, malformed, or has no translation configured, content is returned in + * `en`. (optional) + * @param recvWindow (optional) + * @return ApiResponse<GetYieldArenaActivitiesResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Yield Arena Activities -
+ * + * @see Get + * Yield Arena Activities (USER_DATA) Documentation + */ + public ApiResponse getYieldArenaActivities( + String lang, @Max(60000L) Long recvWindow) throws ApiException { + okhttp3.Call localVarCall = getYieldArenaActivitiesValidateBeforeCall(lang, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } +} diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/AprPeriod.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/AprPeriod.java new file mode 100644 index 000000000..4718cea78 --- /dev/null +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/AprPeriod.java @@ -0,0 +1,73 @@ +/* + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.simple_earn.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets aprPeriod */ +@JsonAdapter(AprPeriod.Adapter.class) +public enum AprPeriod { + DAY("DAY"), + + YEAR("YEAR"); + + private String value; + + AprPeriod(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AprPeriod fromValue(String value) { + for (AprPeriod b : AprPeriod.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AprPeriod enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AprPeriod read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AprPeriod.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AprPeriod.fromValue(value); + } +} diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/Asset.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/Asset.java new file mode 100644 index 000000000..7fa6fb722 --- /dev/null +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/Asset.java @@ -0,0 +1,72 @@ +/* + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.simple_earn.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets asset */ +@JsonAdapter(Asset.Adapter.class) +public enum Asset { + USDT("USDT"), + + USDC("USDC"); + + private String value; + + Asset(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Asset fromValue(String value) { + for (Asset b : Asset.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Asset enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Asset read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Asset.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Asset.fromValue(value); + } +} diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/DestAccount.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/DestAccount.java new file mode 100644 index 000000000..40dacdf33 --- /dev/null +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/DestAccount.java @@ -0,0 +1,73 @@ +/* + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.simple_earn.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets destAccount */ +@JsonAdapter(DestAccount.Adapter.class) +public enum DestAccount { + SPOT("SPOT"), + + FUND("FUND"); + + private String value; + + DestAccount(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DestAccount fromValue(String value) { + for (DestAccount b : DestAccount.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DestAccount enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DestAccount read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DestAccount.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DestAccount.fromValue(value); + } +} diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdAccountResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdAccountResponse.java index 8cb7451a4..c9e580db3 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdAccountResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetBfusdAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBfusdAccountResponse { public static final String SERIALIZED_NAME_BFUSD_AMOUNT = "bfusdAmount"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdQuotaDetailsResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdQuotaDetailsResponse.java index baf25514b..49686f3e1 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdQuotaDetailsResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdQuotaDetailsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetBfusdQuotaDetailsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBfusdQuotaDetailsResponse { public static final String SERIALIZED_NAME_SUBSCRIPTION_QUOTA = "subscriptionQuota"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdQuotaDetailsResponseFastRedemptionQuota.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdQuotaDetailsResponseFastRedemptionQuota.java index 34e079182..7b5432f15 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdQuotaDetailsResponseFastRedemptionQuota.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdQuotaDetailsResponseFastRedemptionQuota.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetBfusdQuotaDetailsResponseFastRedemptionQuota */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBfusdQuotaDetailsResponseFastRedemptionQuota { public static final String SERIALIZED_NAME_LEFT_QUOTA = "leftQuota"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdQuotaDetailsResponseStandardRedemptionQuota.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdQuotaDetailsResponseStandardRedemptionQuota.java index 23800c9ff..ef93cb056 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdQuotaDetailsResponseStandardRedemptionQuota.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdQuotaDetailsResponseStandardRedemptionQuota.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetBfusdQuotaDetailsResponseStandardRedemptionQuota */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBfusdQuotaDetailsResponseStandardRedemptionQuota { public static final String SERIALIZED_NAME_LEFT_QUOTA = "leftQuota"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdQuotaDetailsResponseSubscriptionQuota.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdQuotaDetailsResponseSubscriptionQuota.java index 00a0c211b..30cf5b098 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdQuotaDetailsResponseSubscriptionQuota.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdQuotaDetailsResponseSubscriptionQuota.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetBfusdQuotaDetailsResponseSubscriptionQuota */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBfusdQuotaDetailsResponseSubscriptionQuota { public static final String SERIALIZED_NAME_LEFT_QUOTA = "leftQuota"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRateHistoryResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRateHistoryResponse.java index 9a8db537c..5fba479c2 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRateHistoryResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRateHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetBfusdRateHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBfusdRateHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRateHistoryResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRateHistoryResponseRowsInner.java index b2a016776..fb75c157b 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRateHistoryResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRateHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetBfusdRateHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBfusdRateHistoryResponseRowsInner { public static final String SERIALIZED_NAME_ANNUAL_PERCENTAGE_RATE = "annualPercentageRate"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRedemptionHistoryResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRedemptionHistoryResponse.java index 37a53209f..184b8fec8 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRedemptionHistoryResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRedemptionHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetBfusdRedemptionHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBfusdRedemptionHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRedemptionHistoryResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRedemptionHistoryResponseRowsInner.java index 7fad65015..c30807029 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRedemptionHistoryResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRedemptionHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetBfusdRedemptionHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBfusdRedemptionHistoryResponseRowsInner { public static final String SERIALIZED_NAME_TIME = "time"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRewardsHistoryResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRewardsHistoryResponse.java index a383f0ec8..83a2aa47b 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRewardsHistoryResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRewardsHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetBfusdRewardsHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBfusdRewardsHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRewardsHistoryResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRewardsHistoryResponseRowsInner.java index d863b9816..6dcf58fb3 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRewardsHistoryResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdRewardsHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetBfusdRewardsHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBfusdRewardsHistoryResponseRowsInner { public static final String SERIALIZED_NAME_TIME = "time"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdSubscriptionHistoryResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdSubscriptionHistoryResponse.java index 93e30e4f0..803944e78 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdSubscriptionHistoryResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdSubscriptionHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetBfusdSubscriptionHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBfusdSubscriptionHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdSubscriptionHistoryResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdSubscriptionHistoryResponseRowsInner.java index 9a38dc9d5..17a677f45 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdSubscriptionHistoryResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetBfusdSubscriptionHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetBfusdSubscriptionHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBfusdSubscriptionHistoryResponseRowsInner { public static final String SERIALIZED_NAME_TIME = "time"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetCollateralRecordResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetCollateralRecordResponse.java index 19bb72df8..e56b901d5 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetCollateralRecordResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetCollateralRecordResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetCollateralRecordResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCollateralRecordResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetCollateralRecordResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetCollateralRecordResponseRowsInner.java index 9d89a3e09..c70318994 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetCollateralRecordResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetCollateralRecordResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetCollateralRecordResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCollateralRecordResponseRowsInner { public static final String SERIALIZED_NAME_AMOUNT = "amount"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexiblePersonalLeftQuotaResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexiblePersonalLeftQuotaResponse.java index cd897ab46..631134a41 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexiblePersonalLeftQuotaResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexiblePersonalLeftQuotaResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFlexiblePersonalLeftQuotaResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexiblePersonalLeftQuotaResponse { public static final String SERIALIZED_NAME_LEFT_PERSONAL_QUOTA = "leftPersonalQuota"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleProductPositionResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleProductPositionResponse.java index e31c475a3..2c970d659 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleProductPositionResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleProductPositionResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetFlexibleProductPositionResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleProductPositionResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleProductPositionResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleProductPositionResponseRowsInner.java index 761448b87..400085dee 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleProductPositionResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleProductPositionResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetFlexibleProductPositionResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleProductPositionResponseRowsInner { public static final String SERIALIZED_NAME_TOTAL_AMOUNT = "totalAmount"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleProductPositionResponseRowsInnerTierAnnualPercentageRate.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleProductPositionResponseRowsInnerTierAnnualPercentageRate.java index 09d6ea59c..f5913d4a4 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleProductPositionResponseRowsInnerTierAnnualPercentageRate.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleProductPositionResponseRowsInnerTierAnnualPercentageRate.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetFlexibleProductPositionResponseRowsInnerTierAnnualPercentageRate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleProductPositionResponseRowsInnerTierAnnualPercentageRate { public static final String SERIALIZED_NAME_05_B_T_C = "0-5BTC"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleRedemptionRecordResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleRedemptionRecordResponse.java index 02e8d3ba7..428c8c2ca 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleRedemptionRecordResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleRedemptionRecordResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetFlexibleRedemptionRecordResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleRedemptionRecordResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleRedemptionRecordResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleRedemptionRecordResponseRowsInner.java index 6e9d50c13..199b2e3b6 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleRedemptionRecordResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleRedemptionRecordResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFlexibleRedemptionRecordResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleRedemptionRecordResponseRowsInner { public static final String SERIALIZED_NAME_AMOUNT = "amount"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleRewardsHistoryResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleRewardsHistoryResponse.java index 4481fbd04..a587e580b 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleRewardsHistoryResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleRewardsHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetFlexibleRewardsHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleRewardsHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleRewardsHistoryResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleRewardsHistoryResponseRowsInner.java index 5c461e5b9..224aa65c1 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleRewardsHistoryResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleRewardsHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFlexibleRewardsHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleRewardsHistoryResponseRowsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleSubscriptionPreviewResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleSubscriptionPreviewResponse.java index b5b6755cb..f75d56bfb 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleSubscriptionPreviewResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleSubscriptionPreviewResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFlexibleSubscriptionPreviewResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleSubscriptionPreviewResponse { public static final String SERIALIZED_NAME_TOTAL_AMOUNT = "totalAmount"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleSubscriptionRecordResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleSubscriptionRecordResponse.java index 5262ec381..22e69b311 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleSubscriptionRecordResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleSubscriptionRecordResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetFlexibleSubscriptionRecordResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleSubscriptionRecordResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleSubscriptionRecordResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleSubscriptionRecordResponseRowsInner.java index 0d908a6f5..04faa28f5 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleSubscriptionRecordResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetFlexibleSubscriptionRecordResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFlexibleSubscriptionRecordResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFlexibleSubscriptionRecordResponseRowsInner { public static final String SERIALIZED_NAME_AMOUNT = "amount"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedPersonalLeftQuotaResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedPersonalLeftQuotaResponse.java index d0860afa1..2dc165005 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedPersonalLeftQuotaResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedPersonalLeftQuotaResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetLockedPersonalLeftQuotaResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLockedPersonalLeftQuotaResponse { public static final String SERIALIZED_NAME_LEFT_PERSONAL_QUOTA = "leftPersonalQuota"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedProductPositionResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedProductPositionResponse.java index 0f57026a1..047ae59bc 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedProductPositionResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedProductPositionResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetLockedProductPositionResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLockedProductPositionResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedProductPositionResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedProductPositionResponseRowsInner.java index 9e9ad8f70..83979fb0d 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedProductPositionResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedProductPositionResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetLockedProductPositionResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLockedProductPositionResponseRowsInner { public static final String SERIALIZED_NAME_POSITION_ID = "positionId"; @@ -70,7 +70,7 @@ public class GetLockedProductPositionResponseRowsInner { @SerializedName(SERIALIZED_NAME_PURCHASE_TIME) @jakarta.annotation.Nullable - private String purchaseTime; + private Long purchaseTime; public static final String SERIALIZED_NAME_DURATION = "duration"; @@ -148,7 +148,7 @@ public class GetLockedProductPositionResponseRowsInner { @SerializedName(SERIALIZED_NAME_NEXT_PAY_DATE) @jakarta.annotation.Nullable - private String nextPayDate; + private Long nextPayDate; public static final String SERIALIZED_NAME_PAY_PERIOD = "payPeriod"; @@ -166,13 +166,13 @@ public class GetLockedProductPositionResponseRowsInner { @SerializedName(SERIALIZED_NAME_REWARDS_END_DATE) @jakarta.annotation.Nullable - private String rewardsEndDate; + private Long rewardsEndDate; public static final String SERIALIZED_NAME_DELIVER_DATE = "deliverDate"; @SerializedName(SERIALIZED_NAME_DELIVER_DATE) @jakarta.annotation.Nullable - private String deliverDate; + private Long deliverDate; public static final String SERIALIZED_NAME_REDEEM_PERIOD = "redeemPeriod"; @@ -196,7 +196,7 @@ public class GetLockedProductPositionResponseRowsInner { @SerializedName(SERIALIZED_NAME_PARTIAL_AMT_DELIVER_DATE) @jakarta.annotation.Nullable - private String partialAmtDeliverDate; + private Long partialAmtDeliverDate; public static final String SERIALIZED_NAME_CAN_REDEEM_EARLY = "canRedeemEarly"; @@ -337,7 +337,7 @@ public void setAmount(@jakarta.annotation.Nullable String amount) { } public GetLockedProductPositionResponseRowsInner purchaseTime( - @jakarta.annotation.Nullable String purchaseTime) { + @jakarta.annotation.Nullable Long purchaseTime) { this.purchaseTime = purchaseTime; return this; } @@ -348,11 +348,11 @@ public GetLockedProductPositionResponseRowsInner purchaseTime( * @return purchaseTime */ @jakarta.annotation.Nullable - public String getPurchaseTime() { + public Long getPurchaseTime() { return purchaseTime; } - public void setPurchaseTime(@jakarta.annotation.Nullable String purchaseTime) { + public void setPurchaseTime(@jakarta.annotation.Nullable Long purchaseTime) { this.purchaseTime = purchaseTime; } @@ -596,7 +596,7 @@ public void setNextPay(@jakarta.annotation.Nullable String nextPay) { } public GetLockedProductPositionResponseRowsInner nextPayDate( - @jakarta.annotation.Nullable String nextPayDate) { + @jakarta.annotation.Nullable Long nextPayDate) { this.nextPayDate = nextPayDate; return this; } @@ -607,11 +607,11 @@ public GetLockedProductPositionResponseRowsInner nextPayDate( * @return nextPayDate */ @jakarta.annotation.Nullable - public String getNextPayDate() { + public Long getNextPayDate() { return nextPayDate; } - public void setNextPayDate(@jakarta.annotation.Nullable String nextPayDate) { + public void setNextPayDate(@jakarta.annotation.Nullable Long nextPayDate) { this.nextPayDate = nextPayDate; } @@ -656,7 +656,7 @@ public void setRedeemAmountEarly(@jakarta.annotation.Nullable String redeemAmoun } public GetLockedProductPositionResponseRowsInner rewardsEndDate( - @jakarta.annotation.Nullable String rewardsEndDate) { + @jakarta.annotation.Nullable Long rewardsEndDate) { this.rewardsEndDate = rewardsEndDate; return this; } @@ -667,16 +667,16 @@ public GetLockedProductPositionResponseRowsInner rewardsEndDate( * @return rewardsEndDate */ @jakarta.annotation.Nullable - public String getRewardsEndDate() { + public Long getRewardsEndDate() { return rewardsEndDate; } - public void setRewardsEndDate(@jakarta.annotation.Nullable String rewardsEndDate) { + public void setRewardsEndDate(@jakarta.annotation.Nullable Long rewardsEndDate) { this.rewardsEndDate = rewardsEndDate; } public GetLockedProductPositionResponseRowsInner deliverDate( - @jakarta.annotation.Nullable String deliverDate) { + @jakarta.annotation.Nullable Long deliverDate) { this.deliverDate = deliverDate; return this; } @@ -687,11 +687,11 @@ public GetLockedProductPositionResponseRowsInner deliverDate( * @return deliverDate */ @jakarta.annotation.Nullable - public String getDeliverDate() { + public Long getDeliverDate() { return deliverDate; } - public void setDeliverDate(@jakarta.annotation.Nullable String deliverDate) { + public void setDeliverDate(@jakarta.annotation.Nullable Long deliverDate) { this.deliverDate = deliverDate; } @@ -756,7 +756,7 @@ public void setRedeemTo(@jakarta.annotation.Nullable String redeemTo) { } public GetLockedProductPositionResponseRowsInner partialAmtDeliverDate( - @jakarta.annotation.Nullable String partialAmtDeliverDate) { + @jakarta.annotation.Nullable Long partialAmtDeliverDate) { this.partialAmtDeliverDate = partialAmtDeliverDate; return this; } @@ -767,12 +767,11 @@ public GetLockedProductPositionResponseRowsInner partialAmtDeliverDate( * @return partialAmtDeliverDate */ @jakarta.annotation.Nullable - public String getPartialAmtDeliverDate() { + public Long getPartialAmtDeliverDate() { return partialAmtDeliverDate; } - public void setPartialAmtDeliverDate( - @jakarta.annotation.Nullable String partialAmtDeliverDate) { + public void setPartialAmtDeliverDate(@jakarta.annotation.Nullable Long partialAmtDeliverDate) { this.partialAmtDeliverDate = partialAmtDeliverDate; } @@ -1314,14 +1313,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("amount").toString())); } - if ((jsonObj.get("purchaseTime") != null && !jsonObj.get("purchaseTime").isJsonNull()) - && !jsonObj.get("purchaseTime").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `purchaseTime` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("purchaseTime").toString())); - } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1422,14 +1413,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("nextPay").toString())); } - if ((jsonObj.get("nextPayDate") != null && !jsonObj.get("nextPayDate").isJsonNull()) - && !jsonObj.get("nextPayDate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `nextPayDate` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("nextPayDate").toString())); - } if ((jsonObj.get("payPeriod") != null && !jsonObj.get("payPeriod").isJsonNull()) && !jsonObj.get("payPeriod").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1447,22 +1430,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " JSON string but got `%s`", jsonObj.get("redeemAmountEarly").toString())); } - if ((jsonObj.get("rewardsEndDate") != null && !jsonObj.get("rewardsEndDate").isJsonNull()) - && !jsonObj.get("rewardsEndDate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `rewardsEndDate` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("rewardsEndDate").toString())); - } - if ((jsonObj.get("deliverDate") != null && !jsonObj.get("deliverDate").isJsonNull()) - && !jsonObj.get("deliverDate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `deliverDate` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("deliverDate").toString())); - } if ((jsonObj.get("redeemPeriod") != null && !jsonObj.get("redeemPeriod").isJsonNull()) && !jsonObj.get("redeemPeriod").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1487,15 +1454,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("redeemTo").toString())); } - if ((jsonObj.get("partialAmtDeliverDate") != null - && !jsonObj.get("partialAmtDeliverDate").isJsonNull()) - && !jsonObj.get("partialAmtDeliverDate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `partialAmtDeliverDate` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("partialAmtDeliverDate").toString())); - } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedRedemptionRecordResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedRedemptionRecordResponse.java index c40f9231b..e47f83372 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedRedemptionRecordResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedRedemptionRecordResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetLockedRedemptionRecordResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLockedRedemptionRecordResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedRedemptionRecordResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedRedemptionRecordResponseRowsInner.java index 916ba6e0a..ee62d0842 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedRedemptionRecordResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedRedemptionRecordResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetLockedRedemptionRecordResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLockedRedemptionRecordResponseRowsInner { public static final String SERIALIZED_NAME_POSITION_ID = "positionId"; @@ -88,7 +88,7 @@ public class GetLockedRedemptionRecordResponseRowsInner { @SerializedName(SERIALIZED_NAME_DELIVER_DATE) @jakarta.annotation.Nullable - private String deliverDate; + private Long deliverDate; public static final String SERIALIZED_NAME_LOSS_AMOUNT = "lossAmount"; @@ -294,7 +294,7 @@ public void setType(@jakarta.annotation.Nullable String type) { } public GetLockedRedemptionRecordResponseRowsInner deliverDate( - @jakarta.annotation.Nullable String deliverDate) { + @jakarta.annotation.Nullable Long deliverDate) { this.deliverDate = deliverDate; return this; } @@ -305,11 +305,11 @@ public GetLockedRedemptionRecordResponseRowsInner deliverDate( * @return deliverDate */ @jakarta.annotation.Nullable - public String getDeliverDate() { + public Long getDeliverDate() { return deliverDate; } - public void setDeliverDate(@jakarta.annotation.Nullable String deliverDate) { + public void setDeliverDate(@jakarta.annotation.Nullable Long deliverDate) { this.deliverDate = deliverDate; } @@ -719,14 +719,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("type").toString())); } - if ((jsonObj.get("deliverDate") != null && !jsonObj.get("deliverDate").isJsonNull()) - && !jsonObj.get("deliverDate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `deliverDate` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("deliverDate").toString())); - } if ((jsonObj.get("lossAmount") != null && !jsonObj.get("lossAmount").isJsonNull()) && !jsonObj.get("lossAmount").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedRewardsHistoryResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedRewardsHistoryResponse.java index 238b1aa95..ef4851857 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedRewardsHistoryResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedRewardsHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetLockedRewardsHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLockedRewardsHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedRewardsHistoryResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedRewardsHistoryResponseRowsInner.java index e731c7e6b..70196cfd9 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedRewardsHistoryResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedRewardsHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetLockedRewardsHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLockedRewardsHistoryResponseRowsInner { public static final String SERIALIZED_NAME_POSITION_ID = "positionId"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedSubscriptionPreviewResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedSubscriptionPreviewResponse.java index 90b1b7e75..84a285d76 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedSubscriptionPreviewResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedSubscriptionPreviewResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetLockedSubscriptionPreviewResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLockedSubscriptionPreviewResponse extends ArrayList { public GetLockedSubscriptionPreviewResponse() {} diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedSubscriptionPreviewResponseInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedSubscriptionPreviewResponseInner.java index 450f321c5..1b1446039 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedSubscriptionPreviewResponseInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedSubscriptionPreviewResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetLockedSubscriptionPreviewResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLockedSubscriptionPreviewResponseInner { public static final String SERIALIZED_NAME_REWARD_ASSET = "rewardAsset"; @@ -83,31 +83,31 @@ public class GetLockedSubscriptionPreviewResponseInner { @SerializedName(SERIALIZED_NAME_NEXT_PAY_DATE) @jakarta.annotation.Nullable - private String nextPayDate; + private Long nextPayDate; public static final String SERIALIZED_NAME_VALUE_DATE = "valueDate"; @SerializedName(SERIALIZED_NAME_VALUE_DATE) @jakarta.annotation.Nullable - private String valueDate; + private Long valueDate; public static final String SERIALIZED_NAME_REWARDS_END_DATE = "rewardsEndDate"; @SerializedName(SERIALIZED_NAME_REWARDS_END_DATE) @jakarta.annotation.Nullable - private String rewardsEndDate; + private Long rewardsEndDate; public static final String SERIALIZED_NAME_DELIVER_DATE = "deliverDate"; @SerializedName(SERIALIZED_NAME_DELIVER_DATE) @jakarta.annotation.Nullable - private String deliverDate; + private Long deliverDate; public static final String SERIALIZED_NAME_NEXT_SUBSCRIPTION_DATE = "nextSubscriptionDate"; @SerializedName(SERIALIZED_NAME_NEXT_SUBSCRIPTION_DATE) @jakarta.annotation.Nullable - private String nextSubscriptionDate; + private Long nextSubscriptionDate; public GetLockedSubscriptionPreviewResponseInner() {} @@ -253,7 +253,7 @@ public void setNextPay(@jakarta.annotation.Nullable String nextPay) { } public GetLockedSubscriptionPreviewResponseInner nextPayDate( - @jakarta.annotation.Nullable String nextPayDate) { + @jakarta.annotation.Nullable Long nextPayDate) { this.nextPayDate = nextPayDate; return this; } @@ -264,16 +264,16 @@ public GetLockedSubscriptionPreviewResponseInner nextPayDate( * @return nextPayDate */ @jakarta.annotation.Nullable - public String getNextPayDate() { + public Long getNextPayDate() { return nextPayDate; } - public void setNextPayDate(@jakarta.annotation.Nullable String nextPayDate) { + public void setNextPayDate(@jakarta.annotation.Nullable Long nextPayDate) { this.nextPayDate = nextPayDate; } public GetLockedSubscriptionPreviewResponseInner valueDate( - @jakarta.annotation.Nullable String valueDate) { + @jakarta.annotation.Nullable Long valueDate) { this.valueDate = valueDate; return this; } @@ -284,16 +284,16 @@ public GetLockedSubscriptionPreviewResponseInner valueDate( * @return valueDate */ @jakarta.annotation.Nullable - public String getValueDate() { + public Long getValueDate() { return valueDate; } - public void setValueDate(@jakarta.annotation.Nullable String valueDate) { + public void setValueDate(@jakarta.annotation.Nullable Long valueDate) { this.valueDate = valueDate; } public GetLockedSubscriptionPreviewResponseInner rewardsEndDate( - @jakarta.annotation.Nullable String rewardsEndDate) { + @jakarta.annotation.Nullable Long rewardsEndDate) { this.rewardsEndDate = rewardsEndDate; return this; } @@ -304,16 +304,16 @@ public GetLockedSubscriptionPreviewResponseInner rewardsEndDate( * @return rewardsEndDate */ @jakarta.annotation.Nullable - public String getRewardsEndDate() { + public Long getRewardsEndDate() { return rewardsEndDate; } - public void setRewardsEndDate(@jakarta.annotation.Nullable String rewardsEndDate) { + public void setRewardsEndDate(@jakarta.annotation.Nullable Long rewardsEndDate) { this.rewardsEndDate = rewardsEndDate; } public GetLockedSubscriptionPreviewResponseInner deliverDate( - @jakarta.annotation.Nullable String deliverDate) { + @jakarta.annotation.Nullable Long deliverDate) { this.deliverDate = deliverDate; return this; } @@ -324,16 +324,16 @@ public GetLockedSubscriptionPreviewResponseInner deliverDate( * @return deliverDate */ @jakarta.annotation.Nullable - public String getDeliverDate() { + public Long getDeliverDate() { return deliverDate; } - public void setDeliverDate(@jakarta.annotation.Nullable String deliverDate) { + public void setDeliverDate(@jakarta.annotation.Nullable Long deliverDate) { this.deliverDate = deliverDate; } public GetLockedSubscriptionPreviewResponseInner nextSubscriptionDate( - @jakarta.annotation.Nullable String nextSubscriptionDate) { + @jakarta.annotation.Nullable Long nextSubscriptionDate) { this.nextSubscriptionDate = nextSubscriptionDate; return this; } @@ -344,11 +344,11 @@ public GetLockedSubscriptionPreviewResponseInner nextSubscriptionDate( * @return nextSubscriptionDate */ @jakarta.annotation.Nullable - public String getNextSubscriptionDate() { + public Long getNextSubscriptionDate() { return nextSubscriptionDate; } - public void setNextSubscriptionDate(@jakarta.annotation.Nullable String nextSubscriptionDate) { + public void setNextSubscriptionDate(@jakarta.annotation.Nullable Long nextSubscriptionDate) { this.nextSubscriptionDate = nextSubscriptionDate; } @@ -618,47 +618,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("nextPay").toString())); } - if ((jsonObj.get("nextPayDate") != null && !jsonObj.get("nextPayDate").isJsonNull()) - && !jsonObj.get("nextPayDate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `nextPayDate` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("nextPayDate").toString())); - } - if ((jsonObj.get("valueDate") != null && !jsonObj.get("valueDate").isJsonNull()) - && !jsonObj.get("valueDate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `valueDate` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("valueDate").toString())); - } - if ((jsonObj.get("rewardsEndDate") != null && !jsonObj.get("rewardsEndDate").isJsonNull()) - && !jsonObj.get("rewardsEndDate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `rewardsEndDate` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("rewardsEndDate").toString())); - } - if ((jsonObj.get("deliverDate") != null && !jsonObj.get("deliverDate").isJsonNull()) - && !jsonObj.get("deliverDate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `deliverDate` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("deliverDate").toString())); - } - if ((jsonObj.get("nextSubscriptionDate") != null - && !jsonObj.get("nextSubscriptionDate").isJsonNull()) - && !jsonObj.get("nextSubscriptionDate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `nextSubscriptionDate` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("nextSubscriptionDate").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedSubscriptionRecordResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedSubscriptionRecordResponse.java index 05e264a84..4dc567202 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedSubscriptionRecordResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedSubscriptionRecordResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetLockedSubscriptionRecordResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLockedSubscriptionRecordResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedSubscriptionRecordResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedSubscriptionRecordResponseRowsInner.java index ed199a792..35a4b4e4d 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedSubscriptionRecordResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetLockedSubscriptionRecordResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetLockedSubscriptionRecordResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLockedSubscriptionRecordResponseRowsInner { public static final String SERIALIZED_NAME_POSITION_ID = "positionId"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRateHistoryResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRateHistoryResponse.java index 68cde5dc1..b24b877a2 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRateHistoryResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRateHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetRateHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetRateHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRateHistoryResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRateHistoryResponseRowsInner.java index d8f450308..ad90830a4 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRateHistoryResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRateHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetRateHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetRateHistoryResponseRowsInner { public static final String SERIALIZED_NAME_PRODUCT_ID = "productId"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdAccountResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdAccountResponse.java index a24676c8a..aa0b6c447 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdAccountResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetRwusdAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetRwusdAccountResponse { public static final String SERIALIZED_NAME_RWUSD_AMOUNT = "rwusdAmount"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdQuotaDetailsResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdQuotaDetailsResponse.java index 2c34d4d3b..3d1868a08 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdQuotaDetailsResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdQuotaDetailsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetRwusdQuotaDetailsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetRwusdQuotaDetailsResponse { public static final String SERIALIZED_NAME_SUBSCRIPTION_QUOTA = "subscriptionQuota"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdQuotaDetailsResponseFastRedemptionQuota.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdQuotaDetailsResponseFastRedemptionQuota.java index 99bd1c587..69efe56e6 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdQuotaDetailsResponseFastRedemptionQuota.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdQuotaDetailsResponseFastRedemptionQuota.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetRwusdQuotaDetailsResponseFastRedemptionQuota */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetRwusdQuotaDetailsResponseFastRedemptionQuota { public static final String SERIALIZED_NAME_LEFT_QUOTA = "leftQuota"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdQuotaDetailsResponseStandardRedemptionQuota.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdQuotaDetailsResponseStandardRedemptionQuota.java index 718602d93..6e121f07b 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdQuotaDetailsResponseStandardRedemptionQuota.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdQuotaDetailsResponseStandardRedemptionQuota.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetRwusdQuotaDetailsResponseStandardRedemptionQuota */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetRwusdQuotaDetailsResponseStandardRedemptionQuota { public static final String SERIALIZED_NAME_LEFT_QUOTA = "leftQuota"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdQuotaDetailsResponseSubscriptionQuota.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdQuotaDetailsResponseSubscriptionQuota.java index 933ee0e03..75d97d116 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdQuotaDetailsResponseSubscriptionQuota.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdQuotaDetailsResponseSubscriptionQuota.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** GetRwusdQuotaDetailsResponseSubscriptionQuota */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetRwusdQuotaDetailsResponseSubscriptionQuota { public static final String SERIALIZED_NAME_ASSETS = "assets"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRateHistoryResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRateHistoryResponse.java index 8e9de75ed..0f6b136f8 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRateHistoryResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRateHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetRwusdRateHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetRwusdRateHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRedemptionHistoryResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRedemptionHistoryResponse.java index 862c66a51..864db9a80 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRedemptionHistoryResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRedemptionHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetRwusdRedemptionHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetRwusdRedemptionHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRedemptionHistoryResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRedemptionHistoryResponseRowsInner.java index bcbc879b7..75c788ce4 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRedemptionHistoryResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRedemptionHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetRwusdRedemptionHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetRwusdRedemptionHistoryResponseRowsInner { public static final String SERIALIZED_NAME_TIME = "time"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRewardsHistoryResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRewardsHistoryResponse.java index 92345b0bc..41e6382bc 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRewardsHistoryResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRewardsHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetRwusdRewardsHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetRwusdRewardsHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRewardsHistoryResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRewardsHistoryResponseRowsInner.java index e6acb3327..1056f0a3d 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRewardsHistoryResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdRewardsHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetRwusdRewardsHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetRwusdRewardsHistoryResponseRowsInner { public static final String SERIALIZED_NAME_TIME = "time"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdSubscriptionHistoryResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdSubscriptionHistoryResponse.java index a7001f88e..4e2334107 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdSubscriptionHistoryResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdSubscriptionHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetRwusdSubscriptionHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetRwusdSubscriptionHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdSubscriptionHistoryResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdSubscriptionHistoryResponseRowsInner.java index 18fe6b042..3c128bce8 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdSubscriptionHistoryResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetRwusdSubscriptionHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetRwusdSubscriptionHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetRwusdSubscriptionHistoryResponseRowsInner { public static final String SERIALIZED_NAME_TIME = "time"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnFlexibleProductListResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnFlexibleProductListResponse.java index 642d22a89..931fc2c11 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnFlexibleProductListResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnFlexibleProductListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetSimpleEarnFlexibleProductListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSimpleEarnFlexibleProductListResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnFlexibleProductListResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnFlexibleProductListResponseRowsInner.java index b08fecb6f..118f6d7e3 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnFlexibleProductListResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnFlexibleProductListResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetSimpleEarnFlexibleProductListResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSimpleEarnFlexibleProductListResponseRowsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnLockedProductListResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnLockedProductListResponse.java index 7b83b36b6..2d45cefe7 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnLockedProductListResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnLockedProductListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetSimpleEarnLockedProductListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSimpleEarnLockedProductListResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnLockedProductListResponseRowsInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnLockedProductListResponseRowsInner.java index a25abf337..bd051960d 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnLockedProductListResponseRowsInner.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnLockedProductListResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetSimpleEarnLockedProductListResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSimpleEarnLockedProductListResponseRowsInner { public static final String SERIALIZED_NAME_PROJECT_ID = "projectId"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnLockedProductListResponseRowsInnerDetail.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnLockedProductListResponseRowsInnerDetail.java index f151d6762..6262d7c81 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnLockedProductListResponseRowsInnerDetail.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnLockedProductListResponseRowsInnerDetail.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSimpleEarnLockedProductListResponseRowsInnerDetail */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSimpleEarnLockedProductListResponseRowsInnerDetail { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnLockedProductListResponseRowsInnerQuota.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnLockedProductListResponseRowsInnerQuota.java index ff8b9dc4d..88792b6c1 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnLockedProductListResponseRowsInnerQuota.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetSimpleEarnLockedProductListResponseRowsInnerQuota.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSimpleEarnLockedProductListResponseRowsInnerQuota */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSimpleEarnLockedProductListResponseRowsInnerQuota { public static final String SERIALIZED_NAME_TOTAL_PERSONAL_QUOTA = "totalPersonalQuota"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetYieldArenaActivitiesResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetYieldArenaActivitiesResponse.java new file mode 100644 index 000000000..b763081a2 --- /dev/null +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetYieldArenaActivitiesResponse.java @@ -0,0 +1,251 @@ +/* + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.simple_earn.rest.model; + +import com.binance.connector.client.simple_earn.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** GetYieldArenaActivitiesResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class GetYieldArenaActivitiesResponse { + public static final String SERIALIZED_NAME_ACTIVITIES = "activities"; + + @SerializedName(SERIALIZED_NAME_ACTIVITIES) + @jakarta.annotation.Nullable + private List<@Valid GetYieldArenaActivitiesResponseActivitiesInner> activities; + + public GetYieldArenaActivitiesResponse() {} + + public GetYieldArenaActivitiesResponse activities( + @jakarta.annotation.Nullable + List<@Valid GetYieldArenaActivitiesResponseActivitiesInner> activities) { + this.activities = activities; + return this; + } + + public GetYieldArenaActivitiesResponse addActivitiesItem( + GetYieldArenaActivitiesResponseActivitiesInner activitiesItem) { + if (this.activities == null) { + this.activities = new ArrayList<>(); + } + this.activities.add(activitiesItem); + return this; + } + + /** + * Get activities + * + * @return activities + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid GetYieldArenaActivitiesResponseActivitiesInner> getActivities() { + return activities; + } + + public void setActivities( + @jakarta.annotation.Nullable + List<@Valid GetYieldArenaActivitiesResponseActivitiesInner> activities) { + this.activities = activities; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetYieldArenaActivitiesResponse getYieldArenaActivitiesResponse = + (GetYieldArenaActivitiesResponse) o; + return Objects.equals(this.activities, getYieldArenaActivitiesResponse.activities); + } + + @Override + public int hashCode() { + return Objects.hash(activities); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetYieldArenaActivitiesResponse {\n"); + sb.append(" activities: ").append(toIndentedString(activities)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object activitiesValue = getActivities(); + String activitiesValueAsString = ""; + activitiesValueAsString = + (String) + ((Collection) activitiesValue) + .stream().map(Object::toString).collect(Collectors.joining(",")); + sb.append("activities=").append(urlEncode(activitiesValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("activities"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * GetYieldArenaActivitiesResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetYieldArenaActivitiesResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetYieldArenaActivitiesResponse is not" + + " found in the empty JSON string", + GetYieldArenaActivitiesResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("activities") != null && !jsonObj.get("activities").isJsonNull()) { + JsonArray jsonArrayactivities = jsonObj.getAsJsonArray("activities"); + if (jsonArrayactivities != null) { + // ensure the json data is an array + if (!jsonObj.get("activities").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `activities` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("activities").toString())); + } + + // validate the optional field `activities` (array) + for (int i = 0; i < jsonArrayactivities.size(); i++) { + GetYieldArenaActivitiesResponseActivitiesInner.validateJsonElement( + jsonArrayactivities.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetYieldArenaActivitiesResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetYieldArenaActivitiesResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(GetYieldArenaActivitiesResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GetYieldArenaActivitiesResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetYieldArenaActivitiesResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetYieldArenaActivitiesResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetYieldArenaActivitiesResponse + * @throws IOException if the JSON string is invalid with respect to + * GetYieldArenaActivitiesResponse + */ + public static GetYieldArenaActivitiesResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetYieldArenaActivitiesResponse.class); + } + + /** + * Convert an instance of GetYieldArenaActivitiesResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetYieldArenaActivitiesResponseActivitiesInner.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetYieldArenaActivitiesResponseActivitiesInner.java new file mode 100644 index 000000000..2c9d99762 --- /dev/null +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/GetYieldArenaActivitiesResponseActivitiesInner.java @@ -0,0 +1,571 @@ +/* + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.simple_earn.rest.model; + +import com.binance.connector.client.simple_earn.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** GetYieldArenaActivitiesResponseActivitiesInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class GetYieldArenaActivitiesResponseActivitiesInner { + public static final String SERIALIZED_NAME_ACTIVITY_ID = "activityId"; + + @SerializedName(SERIALIZED_NAME_ACTIVITY_ID) + @jakarta.annotation.Nullable + private Long activityId; + + public static final String SERIALIZED_NAME_ACTIVITY_TYPE = "activityType"; + + @SerializedName(SERIALIZED_NAME_ACTIVITY_TYPE) + @jakarta.annotation.Nullable + private String activityType; + + public static final String SERIALIZED_NAME_TITLE = "title"; + + @SerializedName(SERIALIZED_NAME_TITLE) + @jakarta.annotation.Nullable + private String title; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @jakarta.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_REWARD_POOL_IN_USD = "rewardPoolInUsd"; + + @SerializedName(SERIALIZED_NAME_REWARD_POOL_IN_USD) + @jakarta.annotation.Nullable + private String rewardPoolInUsd; + + public static final String SERIALIZED_NAME_REWARD_TOKEN = "rewardToken"; + + @SerializedName(SERIALIZED_NAME_REWARD_TOKEN) + @jakarta.annotation.Nullable + private List rewardToken; + + public static final String SERIALIZED_NAME_REDIRECT_URL = "redirectUrl"; + + @SerializedName(SERIALIZED_NAME_REDIRECT_URL) + @jakarta.annotation.Nullable + private String redirectUrl; + + public static final String SERIALIZED_NAME_START_TIME = "startTime"; + + @SerializedName(SERIALIZED_NAME_START_TIME) + @jakarta.annotation.Nullable + private Long startTime; + + public static final String SERIALIZED_NAME_END_TIME = "endTime"; + + @SerializedName(SERIALIZED_NAME_END_TIME) + @jakarta.annotation.Nullable + private Long endTime; + + public GetYieldArenaActivitiesResponseActivitiesInner() {} + + public GetYieldArenaActivitiesResponseActivitiesInner activityId( + @jakarta.annotation.Nullable Long activityId) { + this.activityId = activityId; + return this; + } + + /** + * Activity ID. + * + * @return activityId + */ + @jakarta.annotation.Nullable + public Long getActivityId() { + return activityId; + } + + public void setActivityId(@jakarta.annotation.Nullable Long activityId) { + this.activityId = activityId; + } + + public GetYieldArenaActivitiesResponseActivitiesInner activityType( + @jakarta.annotation.Nullable String activityType) { + this.activityType = activityType; + return this; + } + + /** + * Activity category: `AIRDROP`, `LEADERBOARD`, or `EVENT`. + * + * @return activityType + */ + @jakarta.annotation.Nullable + public String getActivityType() { + return activityType; + } + + public void setActivityType(@jakarta.annotation.Nullable String activityType) { + this.activityType = activityType; + } + + public GetYieldArenaActivitiesResponseActivitiesInner title( + @jakarta.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * Activity title, localized via the `lang` header. + * + * @return title + */ + @jakarta.annotation.Nullable + public String getTitle() { + return title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = title; + } + + public GetYieldArenaActivitiesResponseActivitiesInner description( + @jakarta.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Activity description, localized via the `lang` header. + * + * @return description + */ + @jakarta.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = description; + } + + public GetYieldArenaActivitiesResponseActivitiesInner rewardPoolInUsd( + @jakarta.annotation.Nullable String rewardPoolInUsd) { + this.rewardPoolInUsd = rewardPoolInUsd; + return this; + } + + /** + * USD value of the reward pool. + * + * @return rewardPoolInUsd + */ + @jakarta.annotation.Nullable + public String getRewardPoolInUsd() { + return rewardPoolInUsd; + } + + public void setRewardPoolInUsd(@jakarta.annotation.Nullable String rewardPoolInUsd) { + this.rewardPoolInUsd = rewardPoolInUsd; + } + + public GetYieldArenaActivitiesResponseActivitiesInner rewardToken( + @jakarta.annotation.Nullable List rewardToken) { + this.rewardToken = rewardToken; + return this; + } + + public GetYieldArenaActivitiesResponseActivitiesInner addRewardTokenItem( + String rewardTokenItem) { + if (this.rewardToken == null) { + this.rewardToken = new ArrayList<>(); + } + this.rewardToken.add(rewardTokenItem); + return this; + } + + /** + * Reward token symbols (e.g. `[\"BNB\"]`); may be empty. + * + * @return rewardToken + */ + @jakarta.annotation.Nullable + public List getRewardToken() { + return rewardToken; + } + + public void setRewardToken(@jakarta.annotation.Nullable List rewardToken) { + this.rewardToken = rewardToken; + } + + public GetYieldArenaActivitiesResponseActivitiesInner redirectUrl( + @jakarta.annotation.Nullable String redirectUrl) { + this.redirectUrl = redirectUrl; + return this; + } + + /** + * Web URL to the activity landing page. + * + * @return redirectUrl + */ + @jakarta.annotation.Nullable + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(@jakarta.annotation.Nullable String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + public GetYieldArenaActivitiesResponseActivitiesInner startTime( + @jakarta.annotation.Nullable Long startTime) { + this.startTime = startTime; + return this; + } + + /** + * Activity start time in milliseconds; may be null for activities that are immediately + * effective. + * + * @return startTime + */ + @jakarta.annotation.Nullable + public Long getStartTime() { + return startTime; + } + + public void setStartTime(@jakarta.annotation.Nullable Long startTime) { + this.startTime = startTime; + } + + public GetYieldArenaActivitiesResponseActivitiesInner endTime( + @jakarta.annotation.Nullable Long endTime) { + this.endTime = endTime; + return this; + } + + /** + * Activity end time in milliseconds; may be null for activities with no fixed end. + * + * @return endTime + */ + @jakarta.annotation.Nullable + public Long getEndTime() { + return endTime; + } + + public void setEndTime(@jakarta.annotation.Nullable Long endTime) { + this.endTime = endTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetYieldArenaActivitiesResponseActivitiesInner + getYieldArenaActivitiesResponseActivitiesInner = + (GetYieldArenaActivitiesResponseActivitiesInner) o; + return Objects.equals( + this.activityId, getYieldArenaActivitiesResponseActivitiesInner.activityId) + && Objects.equals( + this.activityType, + getYieldArenaActivitiesResponseActivitiesInner.activityType) + && Objects.equals(this.title, getYieldArenaActivitiesResponseActivitiesInner.title) + && Objects.equals( + this.description, + getYieldArenaActivitiesResponseActivitiesInner.description) + && Objects.equals( + this.rewardPoolInUsd, + getYieldArenaActivitiesResponseActivitiesInner.rewardPoolInUsd) + && Objects.equals( + this.rewardToken, + getYieldArenaActivitiesResponseActivitiesInner.rewardToken) + && Objects.equals( + this.redirectUrl, + getYieldArenaActivitiesResponseActivitiesInner.redirectUrl) + && Objects.equals( + this.startTime, getYieldArenaActivitiesResponseActivitiesInner.startTime) + && Objects.equals( + this.endTime, getYieldArenaActivitiesResponseActivitiesInner.endTime); + } + + @Override + public int hashCode() { + return Objects.hash( + activityId, + activityType, + title, + description, + rewardPoolInUsd, + rewardToken, + redirectUrl, + startTime, + endTime); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetYieldArenaActivitiesResponseActivitiesInner {\n"); + sb.append(" activityId: ").append(toIndentedString(activityId)).append("\n"); + sb.append(" activityType: ").append(toIndentedString(activityType)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" rewardPoolInUsd: ").append(toIndentedString(rewardPoolInUsd)).append("\n"); + sb.append(" rewardToken: ").append(toIndentedString(rewardToken)).append("\n"); + sb.append(" redirectUrl: ").append(toIndentedString(redirectUrl)).append("\n"); + sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); + sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object activityIdValue = getActivityId(); + String activityIdValueAsString = ""; + activityIdValueAsString = activityIdValue.toString(); + sb.append("activityId=").append(urlEncode(activityIdValueAsString)).append(""); + Object activityTypeValue = getActivityType(); + String activityTypeValueAsString = ""; + activityTypeValueAsString = activityTypeValue.toString(); + sb.append("activityType=").append(urlEncode(activityTypeValueAsString)).append(""); + Object titleValue = getTitle(); + String titleValueAsString = ""; + titleValueAsString = titleValue.toString(); + sb.append("title=").append(urlEncode(titleValueAsString)).append(""); + Object descriptionValue = getDescription(); + String descriptionValueAsString = ""; + descriptionValueAsString = descriptionValue.toString(); + sb.append("description=").append(urlEncode(descriptionValueAsString)).append(""); + Object rewardPoolInUsdValue = getRewardPoolInUsd(); + String rewardPoolInUsdValueAsString = ""; + rewardPoolInUsdValueAsString = rewardPoolInUsdValue.toString(); + sb.append("rewardPoolInUsd=").append(urlEncode(rewardPoolInUsdValueAsString)).append(""); + Object rewardTokenValue = getRewardToken(); + String rewardTokenValueAsString = ""; + rewardTokenValueAsString = + (String) + ((Collection) rewardTokenValue) + .stream().map(Object::toString).collect(Collectors.joining(",")); + sb.append("rewardToken=").append(urlEncode(rewardTokenValueAsString)).append(""); + Object redirectUrlValue = getRedirectUrl(); + String redirectUrlValueAsString = ""; + redirectUrlValueAsString = redirectUrlValue.toString(); + sb.append("redirectUrl=").append(urlEncode(redirectUrlValueAsString)).append(""); + Object startTimeValue = getStartTime(); + String startTimeValueAsString = ""; + startTimeValueAsString = startTimeValue.toString(); + sb.append("startTime=").append(urlEncode(startTimeValueAsString)).append(""); + Object endTimeValue = getEndTime(); + String endTimeValueAsString = ""; + endTimeValueAsString = endTimeValue.toString(); + sb.append("endTime=").append(urlEncode(endTimeValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("activityId"); + openapiFields.add("activityType"); + openapiFields.add("title"); + openapiFields.add("description"); + openapiFields.add("rewardPoolInUsd"); + openapiFields.add("rewardToken"); + openapiFields.add("redirectUrl"); + openapiFields.add("startTime"); + openapiFields.add("endTime"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * GetYieldArenaActivitiesResponseActivitiesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetYieldArenaActivitiesResponseActivitiesInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " GetYieldArenaActivitiesResponseActivitiesInner is not found" + + " in the empty JSON string", + GetYieldArenaActivitiesResponseActivitiesInner.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("activityType") != null && !jsonObj.get("activityType").isJsonNull()) + && !jsonObj.get("activityType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `activityType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("activityType").toString())); + } + if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) + && !jsonObj.get("title").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `title` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("title").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if ((jsonObj.get("rewardPoolInUsd") != null && !jsonObj.get("rewardPoolInUsd").isJsonNull()) + && !jsonObj.get("rewardPoolInUsd").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rewardPoolInUsd` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("rewardPoolInUsd").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("rewardToken") != null + && !jsonObj.get("rewardToken").isJsonNull() + && !jsonObj.get("rewardToken").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rewardToken` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("rewardToken").toString())); + } + if ((jsonObj.get("redirectUrl") != null && !jsonObj.get("redirectUrl").isJsonNull()) + && !jsonObj.get("redirectUrl").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `redirectUrl` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("redirectUrl").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetYieldArenaActivitiesResponseActivitiesInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'GetYieldArenaActivitiesResponseActivitiesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get(GetYieldArenaActivitiesResponseActivitiesInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, + GetYieldArenaActivitiesResponseActivitiesInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetYieldArenaActivitiesResponseActivitiesInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetYieldArenaActivitiesResponseActivitiesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetYieldArenaActivitiesResponseActivitiesInner + * @throws IOException if the JSON string is invalid with respect to + * GetYieldArenaActivitiesResponseActivitiesInner + */ + public static GetYieldArenaActivitiesResponseActivitiesInner fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, GetYieldArenaActivitiesResponseActivitiesInner.class); + } + + /** + * Convert an instance of GetYieldArenaActivitiesResponseActivitiesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/OrderType.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/OrderType.java new file mode 100644 index 000000000..56f08e7ba --- /dev/null +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/OrderType.java @@ -0,0 +1,73 @@ +/* + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.simple_earn.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets orderType */ +@JsonAdapter(OrderType.Adapter.class) +public enum OrderType { + FAST("FAST"), + + STANDARD("STANDARD"); + + private String value; + + OrderType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderType fromValue(String value) { + for (OrderType b : OrderType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderType.fromValue(value); + } +} diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemBfusdRequest.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemBfusdRequest.java index cb28efca8..1323c7f6a 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemBfusdRequest.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemBfusdRequest.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** RedeemBfusdRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RedeemBfusdRequest { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -47,7 +47,7 @@ public class RedeemBfusdRequest { @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private String type; + private OrderType type = OrderType.STANDARD; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -63,7 +63,7 @@ public RedeemBfusdRequest amount(@jakarta.annotation.Nonnull Double amount) { } /** - * Get amount + * Amount in BFUSD * * @return amount */ @@ -78,7 +78,7 @@ public void setAmount(@jakarta.annotation.Nonnull Double amount) { this.amount = amount; } - public RedeemBfusdRequest type(@jakarta.annotation.Nonnull String type) { + public RedeemBfusdRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -90,11 +90,12 @@ public RedeemBfusdRequest type(@jakarta.annotation.Nonnull String type) { */ @jakarta.annotation.Nonnull @NotNull - public String getType() { + @Valid + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull String type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } @@ -104,11 +105,12 @@ public RedeemBfusdRequest recvWindow(@jakarta.annotation.Nullable Long recvWindo } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -228,13 +230,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } + // validate the required field `type` + OrderType.validateJsonElement(jsonObj.get("type")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemBfusdResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemBfusdResponse.java index 5ddd33107..742fd06cd 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemBfusdResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemBfusdResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RedeemBfusdResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RedeemBfusdResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemFlexibleProductRequest.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemFlexibleProductRequest.java index fea33b980..f3f3a52e0 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemFlexibleProductRequest.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemFlexibleProductRequest.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** RedeemFlexibleProductRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RedeemFlexibleProductRequest { public static final String SERIALIZED_NAME_PRODUCT_ID = "productId"; @@ -47,7 +47,7 @@ public class RedeemFlexibleProductRequest { @SerializedName(SERIALIZED_NAME_REDEEM_ALL) @jakarta.annotation.Nullable - private Boolean redeemAll; + private Boolean redeemAll = false; public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -59,7 +59,7 @@ public class RedeemFlexibleProductRequest { @SerializedName(SERIALIZED_NAME_DEST_ACCOUNT) @jakarta.annotation.Nullable - private String destAccount; + private DestAccount destAccount = DestAccount.SPOT; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -114,7 +114,7 @@ public RedeemFlexibleProductRequest amount(@jakarta.annotation.Nullable Double a } /** - * Get amount + * if redeemAll is false, amount is mandatory * * @return amount */ @@ -129,7 +129,7 @@ public void setAmount(@jakarta.annotation.Nullable Double amount) { } public RedeemFlexibleProductRequest destAccount( - @jakarta.annotation.Nullable String destAccount) { + @jakarta.annotation.Nullable DestAccount destAccount) { this.destAccount = destAccount; return this; } @@ -140,11 +140,12 @@ public RedeemFlexibleProductRequest destAccount( * @return destAccount */ @jakarta.annotation.Nullable - public String getDestAccount() { + @Valid + public DestAccount getDestAccount() { return destAccount; } - public void setDestAccount(@jakarta.annotation.Nullable String destAccount) { + public void setDestAccount(@jakarta.annotation.Nullable DestAccount destAccount) { this.destAccount = destAccount; } @@ -154,11 +155,12 @@ public RedeemFlexibleProductRequest recvWindow(@jakarta.annotation.Nullable Long } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -300,13 +302,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("productId").toString())); } - if ((jsonObj.get("destAccount") != null && !jsonObj.get("destAccount").isJsonNull()) - && !jsonObj.get("destAccount").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `destAccount` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("destAccount").toString())); + // validate the optional field `destAccount` + if (jsonObj.get("destAccount") != null && !jsonObj.get("destAccount").isJsonNull()) { + DestAccount.validateJsonElement(jsonObj.get("destAccount")); } } diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemFlexibleProductResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemFlexibleProductResponse.java index 52c032640..f3629355d 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemFlexibleProductResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemFlexibleProductResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RedeemFlexibleProductResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RedeemFlexibleProductResponse { public static final String SERIALIZED_NAME_REDEEM_ID = "redeemId"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemLockedProductRequest.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemLockedProductRequest.java index c6d79c570..0777958e8 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemLockedProductRequest.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemLockedProductRequest.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RedeemLockedProductRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RedeemLockedProductRequest { public static final String SERIALIZED_NAME_POSITION_ID = "positionId"; @@ -56,7 +56,7 @@ public RedeemLockedProductRequest positionId(@jakarta.annotation.Nonnull String } /** - * Get positionId + * Locked product position ID * * @return positionId */ @@ -76,11 +76,12 @@ public RedeemLockedProductRequest recvWindow(@jakarta.annotation.Nullable Long r } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemLockedProductResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemLockedProductResponse.java index a48ab0da5..6b83e87a4 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemLockedProductResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemLockedProductResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RedeemLockedProductResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RedeemLockedProductResponse { public static final String SERIALIZED_NAME_REDEEM_ID = "redeemId"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemRwusdRequest.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemRwusdRequest.java index 62aa45c2c..ffb5c4b12 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemRwusdRequest.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemRwusdRequest.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** RedeemRwusdRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RedeemRwusdRequest { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -47,7 +47,7 @@ public class RedeemRwusdRequest { @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private String type; + private OrderType type = OrderType.STANDARD; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -63,7 +63,7 @@ public RedeemRwusdRequest amount(@jakarta.annotation.Nonnull Double amount) { } /** - * Get amount + * Amount in RWUSD * * @return amount */ @@ -78,7 +78,7 @@ public void setAmount(@jakarta.annotation.Nonnull Double amount) { this.amount = amount; } - public RedeemRwusdRequest type(@jakarta.annotation.Nonnull String type) { + public RedeemRwusdRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -90,11 +90,12 @@ public RedeemRwusdRequest type(@jakarta.annotation.Nonnull String type) { */ @jakarta.annotation.Nonnull @NotNull - public String getType() { + @Valid + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull String type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } @@ -104,11 +105,12 @@ public RedeemRwusdRequest recvWindow(@jakarta.annotation.Nullable Long recvWindo } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -228,13 +230,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } + // validate the required field `type` + OrderType.validateJsonElement(jsonObj.get("type")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemRwusdResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemRwusdResponse.java index 88d77e2cd..7557be665 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemRwusdResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemRwusdResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RedeemRwusdResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RedeemRwusdResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemTo.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemTo.java new file mode 100644 index 000000000..b313b9220 --- /dev/null +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/RedeemTo.java @@ -0,0 +1,73 @@ +/* + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.simple_earn.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets redeemTo */ +@JsonAdapter(RedeemTo.Adapter.class) +public enum RedeemTo { + SPOT("SPOT"), + + FLEXIBLE("FLEXIBLE"); + + private String value; + + RedeemTo(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static RedeemTo fromValue(String value) { + for (RedeemTo b : RedeemTo.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final RedeemTo enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public RedeemTo read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return RedeemTo.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + RedeemTo.fromValue(value); + } +} diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetFlexibleAutoSubscribeRequest.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetFlexibleAutoSubscribeRequest.java index 5a3775abc..599456101 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetFlexibleAutoSubscribeRequest.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetFlexibleAutoSubscribeRequest.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SetFlexibleAutoSubscribeRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SetFlexibleAutoSubscribeRequest { public static final String SERIALIZED_NAME_PRODUCT_ID = "productId"; @@ -104,11 +104,12 @@ public SetFlexibleAutoSubscribeRequest recvWindow( } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetFlexibleAutoSubscribeResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetFlexibleAutoSubscribeResponse.java index d024fa791..bfca8632e 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetFlexibleAutoSubscribeResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetFlexibleAutoSubscribeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SetFlexibleAutoSubscribeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SetFlexibleAutoSubscribeResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetLockedAutoSubscribeRequest.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetLockedAutoSubscribeRequest.java index 3160f42fb..a8acaf378 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetLockedAutoSubscribeRequest.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetLockedAutoSubscribeRequest.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SetLockedAutoSubscribeRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SetLockedAutoSubscribeRequest { public static final String SERIALIZED_NAME_POSITION_ID = "positionId"; @@ -103,11 +103,12 @@ public SetLockedAutoSubscribeRequest recvWindow(@jakarta.annotation.Nullable Lon } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetLockedAutoSubscribeResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetLockedAutoSubscribeResponse.java index 5314e6521..191359566 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetLockedAutoSubscribeResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetLockedAutoSubscribeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SetLockedAutoSubscribeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SetLockedAutoSubscribeResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetLockedProductRedeemOptionRequest.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetLockedProductRedeemOptionRequest.java index b7e88285d..55427d3ac 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetLockedProductRedeemOptionRequest.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetLockedProductRedeemOptionRequest.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -34,7 +35,7 @@ /** SetLockedProductRedeemOptionRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SetLockedProductRedeemOptionRequest { public static final String SERIALIZED_NAME_POSITION_ID = "positionId"; @@ -46,7 +47,7 @@ public class SetLockedProductRedeemOptionRequest { @SerializedName(SERIALIZED_NAME_REDEEM_TO) @jakarta.annotation.Nonnull - private String redeemTo; + private RedeemTo redeemTo = RedeemTo.SPOT; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -78,7 +79,7 @@ public void setPositionId(@jakarta.annotation.Nonnull String positionId) { } public SetLockedProductRedeemOptionRequest redeemTo( - @jakarta.annotation.Nonnull String redeemTo) { + @jakarta.annotation.Nonnull RedeemTo redeemTo) { this.redeemTo = redeemTo; return this; } @@ -90,11 +91,12 @@ public SetLockedProductRedeemOptionRequest redeemTo( */ @jakarta.annotation.Nonnull @NotNull - public String getRedeemTo() { + @Valid + public RedeemTo getRedeemTo() { return redeemTo; } - public void setRedeemTo(@jakarta.annotation.Nonnull String redeemTo) { + public void setRedeemTo(@jakarta.annotation.Nonnull RedeemTo redeemTo) { this.redeemTo = redeemTo; } @@ -105,11 +107,12 @@ public SetLockedProductRedeemOptionRequest recvWindow( } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -239,13 +242,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("positionId").toString())); } - if (!jsonObj.get("redeemTo").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `redeemTo` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("redeemTo").toString())); - } + // validate the required field `redeemTo` + RedeemTo.validateJsonElement(jsonObj.get("redeemTo")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetLockedProductRedeemOptionResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetLockedProductRedeemOptionResponse.java index e145badce..d6d6b825b 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetLockedProductRedeemOptionResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SetLockedProductRedeemOptionResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SetLockedProductRedeemOptionResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SetLockedProductRedeemOptionResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SimpleAccountResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SimpleAccountResponse.java index 7b760cc14..01796f9a9 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SimpleAccountResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SimpleAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SimpleAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SimpleAccountResponse { public static final String SERIALIZED_NAME_TOTAL_AMOUNT_IN_B_T_C = "totalAmountInBTC"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SourceAccount.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SourceAccount.java new file mode 100644 index 000000000..66690c890 --- /dev/null +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SourceAccount.java @@ -0,0 +1,75 @@ +/* + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.simple_earn.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets sourceAccount */ +@JsonAdapter(SourceAccount.Adapter.class) +public enum SourceAccount { + SPOT("SPOT"), + + FUND("FUND"), + + ALL("ALL"); + + private String value; + + SourceAccount(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SourceAccount fromValue(String value) { + for (SourceAccount b : SourceAccount.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SourceAccount enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SourceAccount read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SourceAccount.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SourceAccount.fromValue(value); + } +} diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeBfusdRequest.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeBfusdRequest.java index 7f9c34912..55b1dc2d3 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeBfusdRequest.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeBfusdRequest.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** SubscribeBfusdRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubscribeBfusdRequest { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -83,7 +83,7 @@ public SubscribeBfusdRequest amount(@jakarta.annotation.Nonnull Double amount) { } /** - * Get amount + * Amount * * @return amount */ @@ -104,11 +104,12 @@ public SubscribeBfusdRequest recvWindow(@jakarta.annotation.Nullable Long recvWi } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeBfusdResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeBfusdResponse.java index d8a552bd6..95ea8d00d 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeBfusdResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeBfusdResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SubscribeBfusdResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubscribeBfusdResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeFlexibleProductRequest.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeFlexibleProductRequest.java index 0b8f56330..c041e7a3f 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeFlexibleProductRequest.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeFlexibleProductRequest.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** SubscribeFlexibleProductRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubscribeFlexibleProductRequest { public static final String SERIALIZED_NAME_PRODUCT_ID = "productId"; @@ -53,13 +53,13 @@ public class SubscribeFlexibleProductRequest { @SerializedName(SERIALIZED_NAME_AUTO_SUBSCRIBE) @jakarta.annotation.Nullable - private Boolean autoSubscribe; + private Boolean autoSubscribe = true; public static final String SERIALIZED_NAME_SOURCE_ACCOUNT = "sourceAccount"; @SerializedName(SERIALIZED_NAME_SOURCE_ACCOUNT) @jakarta.annotation.Nullable - private String sourceAccount; + private SourceAccount sourceAccount = SourceAccount.SPOT; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -131,7 +131,7 @@ public void setAutoSubscribe(@jakarta.annotation.Nullable Boolean autoSubscribe) } public SubscribeFlexibleProductRequest sourceAccount( - @jakarta.annotation.Nullable String sourceAccount) { + @jakarta.annotation.Nullable SourceAccount sourceAccount) { this.sourceAccount = sourceAccount; return this; } @@ -142,11 +142,12 @@ public SubscribeFlexibleProductRequest sourceAccount( * @return sourceAccount */ @jakarta.annotation.Nullable - public String getSourceAccount() { + @Valid + public SourceAccount getSourceAccount() { return sourceAccount; } - public void setSourceAccount(@jakarta.annotation.Nullable String sourceAccount) { + public void setSourceAccount(@jakarta.annotation.Nullable SourceAccount sourceAccount) { this.sourceAccount = sourceAccount; } @@ -157,11 +158,12 @@ public SubscribeFlexibleProductRequest recvWindow( } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -304,13 +306,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("productId").toString())); } - if ((jsonObj.get("sourceAccount") != null && !jsonObj.get("sourceAccount").isJsonNull()) - && !jsonObj.get("sourceAccount").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `sourceAccount` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("sourceAccount").toString())); + // validate the optional field `sourceAccount` + if (jsonObj.get("sourceAccount") != null && !jsonObj.get("sourceAccount").isJsonNull()) { + SourceAccount.validateJsonElement(jsonObj.get("sourceAccount")); } } diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeFlexibleProductResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeFlexibleProductResponse.java index f90765998..4e2249370 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeFlexibleProductResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeFlexibleProductResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SubscribeFlexibleProductResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubscribeFlexibleProductResponse { public static final String SERIALIZED_NAME_PURCHASE_ID = "purchaseId"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeLockedProductRequest.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeLockedProductRequest.java index 235984667..6d3623f41 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeLockedProductRequest.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeLockedProductRequest.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** SubscribeLockedProductRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubscribeLockedProductRequest { public static final String SERIALIZED_NAME_PROJECT_ID = "projectId"; @@ -53,19 +53,19 @@ public class SubscribeLockedProductRequest { @SerializedName(SERIALIZED_NAME_AUTO_SUBSCRIBE) @jakarta.annotation.Nullable - private Boolean autoSubscribe; + private Boolean autoSubscribe = false; public static final String SERIALIZED_NAME_SOURCE_ACCOUNT = "sourceAccount"; @SerializedName(SERIALIZED_NAME_SOURCE_ACCOUNT) @jakarta.annotation.Nullable - private String sourceAccount; + private SourceAccount sourceAccount = SourceAccount.SPOT; public static final String SERIALIZED_NAME_REDEEM_TO = "redeemTo"; @SerializedName(SERIALIZED_NAME_REDEEM_TO) @jakarta.annotation.Nullable - private String redeemTo; + private RedeemTo redeemTo = RedeemTo.SPOT; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -137,7 +137,7 @@ public void setAutoSubscribe(@jakarta.annotation.Nullable Boolean autoSubscribe) } public SubscribeLockedProductRequest sourceAccount( - @jakarta.annotation.Nullable String sourceAccount) { + @jakarta.annotation.Nullable SourceAccount sourceAccount) { this.sourceAccount = sourceAccount; return this; } @@ -148,15 +148,16 @@ public SubscribeLockedProductRequest sourceAccount( * @return sourceAccount */ @jakarta.annotation.Nullable - public String getSourceAccount() { + @Valid + public SourceAccount getSourceAccount() { return sourceAccount; } - public void setSourceAccount(@jakarta.annotation.Nullable String sourceAccount) { + public void setSourceAccount(@jakarta.annotation.Nullable SourceAccount sourceAccount) { this.sourceAccount = sourceAccount; } - public SubscribeLockedProductRequest redeemTo(@jakarta.annotation.Nullable String redeemTo) { + public SubscribeLockedProductRequest redeemTo(@jakarta.annotation.Nullable RedeemTo redeemTo) { this.redeemTo = redeemTo; return this; } @@ -167,11 +168,12 @@ public SubscribeLockedProductRequest redeemTo(@jakarta.annotation.Nullable Strin * @return redeemTo */ @jakarta.annotation.Nullable - public String getRedeemTo() { + @Valid + public RedeemTo getRedeemTo() { return redeemTo; } - public void setRedeemTo(@jakarta.annotation.Nullable String redeemTo) { + public void setRedeemTo(@jakarta.annotation.Nullable RedeemTo redeemTo) { this.redeemTo = redeemTo; } @@ -181,11 +183,12 @@ public SubscribeLockedProductRequest recvWindow(@jakarta.annotation.Nullable Lon } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -335,21 +338,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("projectId").toString())); } - if ((jsonObj.get("sourceAccount") != null && !jsonObj.get("sourceAccount").isJsonNull()) - && !jsonObj.get("sourceAccount").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `sourceAccount` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("sourceAccount").toString())); + // validate the optional field `sourceAccount` + if (jsonObj.get("sourceAccount") != null && !jsonObj.get("sourceAccount").isJsonNull()) { + SourceAccount.validateJsonElement(jsonObj.get("sourceAccount")); } - if ((jsonObj.get("redeemTo") != null && !jsonObj.get("redeemTo").isJsonNull()) - && !jsonObj.get("redeemTo").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `redeemTo` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("redeemTo").toString())); + // validate the optional field `redeemTo` + if (jsonObj.get("redeemTo") != null && !jsonObj.get("redeemTo").isJsonNull()) { + RedeemTo.validateJsonElement(jsonObj.get("redeemTo")); } } diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeLockedProductResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeLockedProductResponse.java index b67d6eb26..7254bec47 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeLockedProductResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeLockedProductResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SubscribeLockedProductResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubscribeLockedProductResponse { public static final String SERIALIZED_NAME_PURCHASE_ID = "purchaseId"; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeRwusdRequest.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeRwusdRequest.java index 38f76377f..61821bf25 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeRwusdRequest.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeRwusdRequest.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -35,13 +35,13 @@ /** SubscribeRwusdRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubscribeRwusdRequest { public static final String SERIALIZED_NAME_ASSET = "asset"; @SerializedName(SERIALIZED_NAME_ASSET) @jakarta.annotation.Nonnull - private String asset; + private Asset asset; public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -57,7 +57,7 @@ public class SubscribeRwusdRequest { public SubscribeRwusdRequest() {} - public SubscribeRwusdRequest asset(@jakarta.annotation.Nonnull String asset) { + public SubscribeRwusdRequest asset(@jakarta.annotation.Nonnull Asset asset) { this.asset = asset; return this; } @@ -69,11 +69,12 @@ public SubscribeRwusdRequest asset(@jakarta.annotation.Nonnull String asset) { */ @jakarta.annotation.Nonnull @NotNull - public String getAsset() { + @Valid + public Asset getAsset() { return asset; } - public void setAsset(@jakarta.annotation.Nonnull String asset) { + public void setAsset(@jakarta.annotation.Nonnull Asset asset) { this.asset = asset; } @@ -83,7 +84,7 @@ public SubscribeRwusdRequest amount(@jakarta.annotation.Nonnull Double amount) { } /** - * Get amount + * Amount * * @return amount */ @@ -104,11 +105,12 @@ public SubscribeRwusdRequest recvWindow(@jakarta.annotation.Nullable Long recvWi } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -228,13 +230,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("asset").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `asset` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("asset").toString())); - } + // validate the required field `asset` + Asset.validateJsonElement(jsonObj.get("asset")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeRwusdResponse.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeRwusdResponse.java index d0b63808a..09f935185 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeRwusdResponse.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/model/SubscribeRwusdResponse.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SubscribeRwusdResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubscribeRwusdResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; diff --git a/clients/simple-earn/src/test/java/com/binance/connector/client/simple_earn/rest/api/BfusdApiTest.java b/clients/simple-earn/src/test/java/com/binance/connector/client/simple_earn/rest/api/BfusdApiTest.java new file mode 100644 index 000000000..4bc9afe1f --- /dev/null +++ b/clients/simple-earn/src/test/java/com/binance/connector/client/simple_earn/rest/api/BfusdApiTest.java @@ -0,0 +1,381 @@ +/* + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.simple_earn.rest.api; + +import static org.junit.Assert.assertEquals; + +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.auth.BinanceAuthenticationFactory; +import com.binance.connector.client.common.auth.SignatureAuthentication; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.common.sign.HmacSignatureGenerator; +import com.binance.connector.client.common.sign.SignatureGenerator; +import com.binance.connector.client.simple_earn.rest.model.Asset; +import com.binance.connector.client.simple_earn.rest.model.GetBfusdAccountResponse; +import com.binance.connector.client.simple_earn.rest.model.GetBfusdQuotaDetailsResponse; +import com.binance.connector.client.simple_earn.rest.model.GetBfusdRateHistoryResponse; +import com.binance.connector.client.simple_earn.rest.model.GetBfusdRedemptionHistoryResponse; +import com.binance.connector.client.simple_earn.rest.model.GetBfusdRewardsHistoryResponse; +import com.binance.connector.client.simple_earn.rest.model.GetBfusdSubscriptionHistoryResponse; +import com.binance.connector.client.simple_earn.rest.model.OrderType; +import com.binance.connector.client.simple_earn.rest.model.RedeemBfusdRequest; +import com.binance.connector.client.simple_earn.rest.model.RedeemBfusdResponse; +import com.binance.connector.client.simple_earn.rest.model.SubscribeBfusdRequest; +import com.binance.connector.client.simple_earn.rest.model.SubscribeBfusdResponse; +import jakarta.validation.constraints.*; +import java.io.IOException; +import okhttp3.Call; +import okhttp3.Request; +import org.bouncycastle.crypto.CryptoException; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; + +/** API tests for BfusdApi */ +public class BfusdApiTest { + + private BfusdApi api; + private ApiClient apiClientSpy; + private SignatureGenerator signatureGeneratorSpy; + + @BeforeEach + public void initApiClient() throws ApiException { + ClientConfiguration clientConfiguration = new ClientConfiguration(); + clientConfiguration.setUrl("http://localhost:8080"); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setSecretKey("secretKey"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + + HmacSignatureGenerator signatureGenerator = + new HmacSignatureGenerator(signatureConfiguration.getSecretKey()); + signatureGeneratorSpy = Mockito.spy(signatureGenerator); + SignatureAuthentication signatureAuthentication = + new SignatureAuthentication( + signatureConfiguration.getApiKey(), signatureGeneratorSpy); + SignatureAuthentication authenticationSpy = Mockito.spy(signatureAuthentication); + Mockito.doReturn("1736393892000").when(authenticationSpy).buildTimestamp(); + + BinanceAuthenticationFactory factoryMock = Mockito.mock(BinanceAuthenticationFactory.class); + Mockito.doReturn(authenticationSpy) + .when(factoryMock) + .getAuthentication(signatureConfiguration); + + ApiClient apiClient = new ApiClient(clientConfiguration, factoryMock); + + apiClientSpy = Mockito.spy(apiClient); + Mockito.doReturn(new ApiResponse<>(200, null)) + .when(apiClientSpy) + .execute(Mockito.any(), Mockito.any(java.lang.reflect.Type.class)); + Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); + Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); + + api = new BfusdApi(apiClientSpy); + } + + /** + * Get BFUSD Account (USER_DATA) + * + *

Get BFUSD account information. Weight(IP): 150 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getBfusdAccountTest() throws ApiException, CryptoException, IOException { + Long recvWindow = 5000L; + ApiResponse response = api.getBfusdAccount(recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/bfusd/account", actualRequest.url().encodedPath()); + } + + /** + * Get BFUSD Quota Details (USER_DATA) + * + *

Get BFUSD quota details including subscription quota, fast redemption quota, and standard + * redemption quota. Weight(IP): 150 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getBfusdQuotaDetailsTest() throws ApiException, CryptoException, IOException { + Long recvWindow = 5000L; + ApiResponse response = api.getBfusdQuotaDetails(recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/bfusd/quota", actualRequest.url().encodedPath()); + } + + /** + * Get BFUSD Rate History (USER_DATA) + * + *

Get BFUSD rate history sorted by descending order. Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 6 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, `endTime` will default to current time, and + * results from `startTime` onward will be returned. - If `endTime` is sent + * but `startTime` is not sent, `startTime` defaults to the current time + * minus one month, and data between `startTime` and `endTime` will be + * returned. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getBfusdRateHistoryTest() throws ApiException, CryptoException, IOException { + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getBfusdRateHistory(startTime, endTime, current, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "2ecc0415a3bdb2963e8030cdf6cf00de6f49d21b71ff939dda42e5756eb8ba66", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/bfusd/history/rateHistory", actualRequest.url().encodedPath()); + } + + /** + * Get BFUSD Redemption History (USER_DATA) + * + *

Get BFUSD redemption history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 6 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, `endTime` will default to current time, and results from + * `startTime` onward will be returned. - If `endTime` is sent but + * `startTime` is not sent, `startTime` defaults to the current time minus + * one month, and data between `startTime` and `endTime` will be returned. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getBfusdRedemptionHistoryTest() throws ApiException, CryptoException, IOException { + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getBfusdRedemptionHistory(startTime, endTime, current, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "2ecc0415a3bdb2963e8030cdf6cf00de6f49d21b71ff939dda42e5756eb8ba66", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/bfusd/history/redemptionHistory", actualRequest.url().encodedPath()); + } + + /** + * Get BFUSD Rewards History (USER_DATA) + * + *

Get BFUSD rewards history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 6 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, `endTime` will default to current time, and results from + * `startTime` onward will be returned. - If `endTime` is sent but + * `startTime` is not sent, `startTime` defaults to the current time minus + * one month, and data between `startTime` and `endTime` will be returned. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getBfusdRewardsHistoryTest() throws ApiException, CryptoException, IOException { + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getBfusdRewardsHistory(startTime, endTime, current, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "2ecc0415a3bdb2963e8030cdf6cf00de6f49d21b71ff939dda42e5756eb8ba66", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/bfusd/history/rewardsHistory", actualRequest.url().encodedPath()); + } + + /** + * Get BFUSD subscription history (USER_DATA) + * + *

Get BFUSD subscription history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 6 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, `endTime` will default to current time, and results from + * `startTime` onward will be returned. - If `endTime` is sent but + * `startTime` is not sent, `startTime` defaults to the current time + * advanced by one month, and data between `startTime` and `endTime` will be + * returned. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getBfusdSubscriptionHistoryTest() + throws ApiException, CryptoException, IOException { + Asset asset = Asset.USDT; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getBfusdSubscriptionHistory( + asset, startTime, endTime, current, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("asset=USDT&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "d2d3f4b1832a72b887dcf51b8c18488ce4d7d5d86e46472a30d10f94beda49cc", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/bfusd/history/subscriptionHistory", actualRequest.url().encodedPath()); + } + + /** + * Redeem BFUSD (TRADE) + * + *

Redeem BFUSD to USDT Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable + * Spot & Margin Trading permission for the API Key which requests this endpoint. - This API + * only supports BFUSD redemption to the Spot Account. Redemptions to the Funding Account or any + * other account type are not supported. + * + * @throws ApiException if the Api call fails + */ + @Test + public void redeemBfusdTest() throws ApiException, CryptoException, IOException { + RedeemBfusdRequest redeemBfusdRequest = new RedeemBfusdRequest(); + redeemBfusdRequest.amount(1.0d); + redeemBfusdRequest.type(OrderType.FAST); + + ApiResponse response = api.redeemBfusd(redeemBfusdRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000amount=1&type=FAST", signInputCaptor.getValue()); + assertEquals("f6b786b1b7e5d812712d7c48a17ae30772ce0689744c3735e3a5b85c25595377", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/bfusd/redeem", actualRequest.url().encodedPath()); + } + + /** + * Subscribe BFUSD (TRADE) + * + *

Subscribe BFUSD Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable Spot + * & Margin Trading permission for the API Key which requests this endpoint. - This API only + * supports BFUSD subscription using assets held in the Spot Account. Subscriptions initiated + * from the Funding Account or any other account type are not supported. + * + * @throws ApiException if the Api call fails + */ + @Test + public void subscribeBfusdTest() throws ApiException, CryptoException, IOException { + SubscribeBfusdRequest subscribeBfusdRequest = new SubscribeBfusdRequest(); + subscribeBfusdRequest.asset("USDT"); + subscribeBfusdRequest.amount(1.0d); + + ApiResponse response = api.subscribeBfusd(subscribeBfusdRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000amount=1&asset=USDT", signInputCaptor.getValue()); + assertEquals("5a68a35d483ec36a064e5f87613afb24d2c7b4e4b9849e4bd0fd85f6dd3b056a", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/bfusd/subscribe", actualRequest.url().encodedPath()); + } +} diff --git a/clients/simple-earn/src/test/java/com/binance/connector/client/simple_earn/rest/api/FlexibleLockedApiTest.java b/clients/simple-earn/src/test/java/com/binance/connector/client/simple_earn/rest/api/FlexibleLockedApiTest.java index 099b34dba..70f415967 100644 --- a/clients/simple-earn/src/test/java/com/binance/connector/client/simple_earn/rest/api/FlexibleLockedApiTest.java +++ b/clients/simple-earn/src/test/java/com/binance/connector/client/simple_earn/rest/api/FlexibleLockedApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Simple Earn REST API - * OpenAPI Specification for the Binance Simple Earn REST API + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; +import com.binance.connector.client.simple_earn.rest.model.AprPeriod; import com.binance.connector.client.simple_earn.rest.model.GetCollateralRecordResponse; import com.binance.connector.client.simple_earn.rest.model.GetFlexiblePersonalLeftQuotaResponse; import com.binance.connector.client.simple_earn.rest.model.GetFlexibleProductPositionResponse; @@ -39,10 +40,12 @@ import com.binance.connector.client.simple_earn.rest.model.GetRateHistoryResponse; import com.binance.connector.client.simple_earn.rest.model.GetSimpleEarnFlexibleProductListResponse; import com.binance.connector.client.simple_earn.rest.model.GetSimpleEarnLockedProductListResponse; +import com.binance.connector.client.simple_earn.rest.model.OrderType; import com.binance.connector.client.simple_earn.rest.model.RedeemFlexibleProductRequest; import com.binance.connector.client.simple_earn.rest.model.RedeemFlexibleProductResponse; import com.binance.connector.client.simple_earn.rest.model.RedeemLockedProductRequest; import com.binance.connector.client.simple_earn.rest.model.RedeemLockedProductResponse; +import com.binance.connector.client.simple_earn.rest.model.RedeemTo; import com.binance.connector.client.simple_earn.rest.model.SetFlexibleAutoSubscribeRequest; import com.binance.connector.client.simple_earn.rest.model.SetFlexibleAutoSubscribeResponse; import com.binance.connector.client.simple_earn.rest.model.SetLockedAutoSubscribeRequest; @@ -54,6 +57,8 @@ import com.binance.connector.client.simple_earn.rest.model.SubscribeFlexibleProductResponse; import com.binance.connector.client.simple_earn.rest.model.SubscribeLockedProductRequest; import com.binance.connector.client.simple_earn.rest.model.SubscribeLockedProductResponse; +import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -62,7 +67,7 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mockito; -/** API tests for AccountApi */ +/** API tests for FlexibleLockedApi */ public class FlexibleLockedApiTest { private FlexibleLockedApi api; @@ -105,18 +110,28 @@ public void initApiClient() throws ApiException { } /** - * Get Flexible Personal Left Quota(USER_DATA) + * Get Collateral Record (USER_DATA) * - *

Get Flexible Personal Left Quota Weight: 150 + *

Get Collateral Record Weight(IP): 1 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 30 days. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void getFlexiblePersonalLeftQuotaTest() throws ApiException, CryptoException { + public void getCollateralRecordTest() throws ApiException, CryptoException, IOException { String productId = "1"; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; Long recvWindow = 5000L; - ApiResponse response = - api.getFlexiblePersonalLeftQuota(productId, recvWindow); + ApiResponse response = + api.getCollateralRecord(productId, startTime, endTime, current, size, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -128,32 +143,26 @@ public void getFlexiblePersonalLeftQuotaTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("productId=1&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "productId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "3449171bcce7a8aa43ee9684da7eebf17feeecb24ed8fd2858ca78fcc5d87e85", - actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/simple-earn/flexible/personalLeftQuota", - actualRequest.url().encodedPath()); + "906323d23878072da9680bca3160b76d28b6ea07530e027f762757a381c263c0", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/simple-earn/flexible/history/collateralRecord", actualRequest.url().encodedPath()); } /** - * Get Flexible Product Position(USER_DATA) + * Get Flexible Personal Left Quota (USER_DATA) * - *

Get Flexible Product Position Weight: 150 + *

Get Flexible Personal Left Quota Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getFlexibleProductPositionTest() throws ApiException, CryptoException { - String asset = ""; + public void getFlexiblePersonalLeftQuotaTest() + throws ApiException, CryptoException, IOException { String productId = "1"; - Long current = 1L; - Long size = 10L; Long recvWindow = 5000L; - ApiResponse response = - api.getFlexibleProductPosition(asset, productId, current, size, recvWindow); + ApiResponse response = + api.getFlexiblePersonalLeftQuota(productId, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -165,28 +174,29 @@ public void getFlexibleProductPositionTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("productId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "asset=&productId=1¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "1cc1b386baba7fc174869f28bbc9dcbfff30e18b98f074dd3f90eadd0fee8692", + "3449171bcce7a8aa43ee9684da7eebf17feeecb24ed8fd2858ca78fcc5d87e85", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/simple-earn/flexible/position", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/flexible/personalLeftQuota", actualRequest.url().encodedPath()); } /** - * Get Locked Personal Left Quota(USER_DATA) + * Get Flexible Product Position (USER_DATA) * - *

Get Locked Personal Left Quota Weight: 150 + *

Get Flexible Product Position Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getLockedPersonalLeftQuotaTest() throws ApiException, CryptoException { - String projectId = "1"; + public void getFlexibleProductPositionTest() throws ApiException, CryptoException, IOException { + String asset = "USDC"; + String productId = "1"; + Long current = 1L; + Long size = 10L; Long recvWindow = 5000L; - ApiResponse response = - api.getLockedPersonalLeftQuota(projectId, recvWindow); + ApiResponse response = + api.getFlexibleProductPosition(asset, productId, current, size, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -198,60 +208,84 @@ public void getLockedPersonalLeftQuotaTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("asset=USDC&productId=1¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "projectId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "7df8536b8711da59322819086e27ee0e183d18d1f4d6a68377c9c4a87f835ab8", + "205c48c4fd76f24599ab28f0ab325bb711d1ada679bb06451c62b46570fa2baa", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/simple-earn/locked/personalLeftQuota", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/flexible/position", actualRequest.url().encodedPath()); } /** - * Get Locked Product Position + * Get Flexible Redemption Record (USER_DATA) * - *

Get Locked Product Position Weight: 150 + *

Get Flexible Redemption Record Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 30 days. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void getLockedProductPositionTest() throws ApiException, CryptoException { - String asset = ""; - String positionId = "1"; - String projectId = "1"; + public void getFlexibleRedemptionRecordTest() + throws ApiException, CryptoException, IOException { + String productId = "1"; + String redeemId = "1"; + String asset = "USDC"; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; Long current = 1L; Long size = 10L; Long recvWindow = 5000L; - ApiResponse response = - api.getLockedProductPosition( - asset, positionId, projectId, current, size, recvWindow); + ApiResponse response = + api.getFlexibleRedemptionRecord( + productId, redeemId, asset, startTime, endTime, current, size, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("3fa625e0c98e6f4e9f1ec21a44584f64734fa62a263ad96d4bea3583baa409d7", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/simple-earn/locked/position", actualRequest.url().encodedPath()); + assertEquals("productId=1&redeemId=1&asset=USDC&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "907945e0a1a31a90ab8515ae45491ff57247c05d8372f41e47d0fde8b670e0fd", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/simple-earn/flexible/history/redemptionRecord", actualRequest.url().encodedPath()); } /** - * Get Simple Earn Flexible Product List(USER_DATA) + * Get Flexible Rewards History (USER_DATA) * - *

Get available Simple Earn flexible product list Weight: 150 + *

Get Flexible Rewards History Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 30 days. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void getSimpleEarnFlexibleProductListTest() throws ApiException, CryptoException { - String asset = ""; + public void getFlexibleRewardsHistoryTest() throws ApiException, CryptoException, IOException { + String productId = "1"; + String asset = "USDC"; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + OrderType type = OrderType.FAST; Long current = 1L; Long size = 10L; Long recvWindow = 5000L; - ApiResponse response = - api.getSimpleEarnFlexibleProductList(asset, current, size, recvWindow); + ApiResponse response = + api.getFlexibleRewardsHistory( + productId, asset, startTime, endTime, type, current, size, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -263,31 +297,28 @@ public void getSimpleEarnFlexibleProductListTest() throws ApiException, CryptoEx Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("productId=1&asset=USDC&startTime=1623319461670&endTime=1641782889000&type=FAST¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "asset=¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "a8d7174d9767b6c5ac9e2a1b5c161cef80476f7dbb006361943091d5b77cd212", + "5dfd8a9ebbfa27d45697fb7599acc13aa5cbb47ab85d8e07abd9eae12f480bfc", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/simple-earn/flexible/list", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/flexible/history/rewardsRecord", actualRequest.url().encodedPath()); } /** - * Get Simple Earn Locked Product List(USER_DATA) + * Get Flexible Subscription Preview (USER_DATA) * - *

Get Simple Earn Locked Product List * Get available Simple Earn locked product list - * Weight: 150 + *

Get Flexible Subscription Preview Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getSimpleEarnLockedProductListTest() throws ApiException, CryptoException { - String asset = ""; - Long current = 1L; - Long size = 10L; + public void getFlexibleSubscriptionPreviewTest() + throws ApiException, CryptoException, IOException { + String productId = "1"; + Double amount = 1.0d; Long recvWindow = 5000L; - ApiResponse response = - api.getSimpleEarnLockedProductList(asset, current, size, recvWindow); + ApiResponse response = + api.getFlexibleSubscriptionPreview(productId, amount, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -299,26 +330,47 @@ public void getSimpleEarnLockedProductListTest() throws ApiException, CryptoExce Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("productId=1&amount=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "asset=¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "a8d7174d9767b6c5ac9e2a1b5c161cef80476f7dbb006361943091d5b77cd212", + "00a7c80c0c410b10c6a3067e01f82fc810a365b87c83c5086e7224f826896ff5", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/simple-earn/locked/list", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/flexible/subscriptionPreview", actualRequest.url().encodedPath()); } /** - * Simple Account(USER_DATA) + * Get Flexible Subscription Record (USER_DATA) * - *

Simple Account query Weight: 150 + *

Get Flexible Subscription Record Weight(IP): 150 Security Type: USER_DATA Notes: - The + * time between `startTime` and `endTime` cannot be longer than 30 days. - + * If `startTime` and `endTime` are both not sent, then the last 30 + * days' data will be returned. - If `startTime` is sent but `endTime` + * is not sent, the next 30 days' data beginning from `startTime` will be + * returned. - If `endTime` is sent but `startTime` is not sent, the 30 + * days' data before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void simpleAccountTest() throws ApiException, CryptoException { + public void getFlexibleSubscriptionRecordTest() + throws ApiException, CryptoException, IOException { + String productId = "1"; + String purchaseId = "1"; + String asset = "USDC"; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; Long recvWindow = 5000L; - ApiResponse response = api.simpleAccount(recvWindow); + ApiResponse response = + api.getFlexibleSubscriptionRecord( + productId, + purchaseId, + asset, + startTime, + endTime, + current, + size, + recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -330,27 +382,26 @@ public void simpleAccountTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("productId=1&purchaseId=1&asset=USDC&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", + "e7e61fce165f623d32fb05e19fcf43a882a872b5b3f3d35a5ab2f3560b59aaab", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/simple-earn/account", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/flexible/history/subscriptionRecord", actualRequest.url().encodedPath()); } /** - * Get Flexible Subscription Preview(USER_DATA) + * Get Locked Personal Left Quota (USER_DATA) * - *

Get Flexible Subscription Preview Weight: 150 + *

Get Locked Personal Left Quota Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getFlexibleSubscriptionPreviewTest() throws ApiException, CryptoException { - String productId = "1"; - Double amount = 1d; + public void getLockedPersonalLeftQuotaTest() throws ApiException, CryptoException, IOException { + String projectId = "1"; Long recvWindow = 5000L; - ApiResponse response = - api.getFlexibleSubscriptionPreview(productId, amount, recvWindow); + ApiResponse response = + api.getLockedPersonalLeftQuota(projectId, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -362,32 +413,31 @@ public void getFlexibleSubscriptionPreviewTest() throws ApiException, CryptoExce Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("projectId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "productId=1&amount=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "00a7c80c0c410b10c6a3067e01f82fc810a365b87c83c5086e7224f826896ff5", + "7df8536b8711da59322819086e27ee0e183d18d1f4d6a68377c9c4a87f835ab8", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/simple-earn/flexible/subscriptionPreview", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/locked/personalLeftQuota", actualRequest.url().encodedPath()); } /** - * Get Locked Subscription Preview(USER_DATA) + * Get Locked Product Position (USER_DATA) * - *

Get Locked Subscription Preview Weight: 150 + *

Get Locked Product Position Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getLockedSubscriptionPreviewTest() throws ApiException, CryptoException { + public void getLockedProductPositionTest() throws ApiException, CryptoException, IOException { + String asset = "USDC"; + String positionId = "1"; String projectId = "1"; - Double amount = 1d; - Boolean autoSubscribe = false; + Long current = 1L; + Long size = 10L; Long recvWindow = 5000L; - ApiResponse response = - api.getLockedSubscriptionPreview(projectId, amount, autoSubscribe, recvWindow); + ApiResponse response = + api.getLockedProductPosition( + asset, positionId, projectId, current, size, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -399,34 +449,39 @@ public void getLockedSubscriptionPreviewTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("asset=USDC&positionId=1&projectId=1¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "projectId=1&amount=1&autoSubscribe=false&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "ed6d60bbbd167523b7f2ff4be5baa4485dbf0f39322a1cb34907612d59aac34a", + "55f8123bcf85be60aa9a94100d0eca7e18538319ae18a18cffe627d144e9f4c1", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/simple-earn/locked/subscriptionPreview", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/locked/position", actualRequest.url().encodedPath()); } /** - * Redeem Flexible Product(TRADE) + * Get Locked Redemption Record (USER_DATA) * - *

Redeem Flexible Product * You need to open `Enable Spot & Margin Trading` - * permission for the API Key which requests this endpoint. Weight: 1 + *

Get Locked Redemption Record Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 30 days. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void redeemFlexibleProductTest() throws ApiException, CryptoException { - RedeemFlexibleProductRequest redeemFlexibleProductRequest = - new RedeemFlexibleProductRequest(); - - redeemFlexibleProductRequest.productId("1"); - - ApiResponse response = - api.redeemFlexibleProduct(redeemFlexibleProductRequest); + public void getLockedRedemptionRecordTest() throws ApiException, CryptoException, IOException { + String positionId = "1"; + String redeemId = "1"; + String asset = "USDC"; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getLockedRedemptionRecord( + positionId, redeemId, asset, startTime, endTime, current, size, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -438,29 +493,38 @@ public void redeemFlexibleProductTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000productId=1", signInputCaptor.getValue()); + assertEquals("positionId=1&redeemId=1&asset=USDC&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "c4c7af86a6a8cfafc9909bb0dec0f67695e17aba2a88ca75e983de6e0b915279", + "46bd7992ea72294fdb0f7e36c07b29e85adeea06e64d399efb120be0b269ebe1", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/simple-earn/flexible/redeem", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/locked/history/redemptionRecord", actualRequest.url().encodedPath()); } /** - * Redeem Locked Product(TRADE) + * Get Locked Rewards History (USER_DATA) * - *

Redeem Locked Product * You need to open `Enable Spot & Margin Trading` - * permission for the API Key which requests this endpoint. Weight: 1/3s per account + *

Get Locked Rewards History Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 30 days. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void redeemLockedProductTest() throws ApiException, CryptoException { - RedeemLockedProductRequest redeemLockedProductRequest = new RedeemLockedProductRequest(); - - redeemLockedProductRequest.positionId("1"); - - ApiResponse response = - api.redeemLockedProduct(redeemLockedProductRequest); + public void getLockedRewardsHistoryTest() throws ApiException, CryptoException, IOException { + String positionId = "1"; + String asset = "USDC"; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getLockedRewardsHistory( + positionId, asset, startTime, endTime, current, size, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -472,30 +536,29 @@ public void redeemLockedProductTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000positionId=1", signInputCaptor.getValue()); + assertEquals("positionId=1&asset=USDC&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "05345189012e725ecf394a569c76b468c3a9d6377f5b644a1b90e1551920ce91", + "7279f71f44a4e793bb7189854628ec3b60d49e559c55a525145a848ff3ab9f85", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/simple-earn/locked/redeem", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/locked/history/rewardsRecord", actualRequest.url().encodedPath()); } /** - * Set Flexible Auto Subscribe(USER_DATA) + * Get Locked Subscription Preview (USER_DATA) * - *

Set Flexible Auto Subscribe Weight: 150 + *

Get Locked Subscription Preview Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void setFlexibleAutoSubscribeTest() throws ApiException, CryptoException { - SetFlexibleAutoSubscribeRequest setFlexibleAutoSubscribeRequest = - new SetFlexibleAutoSubscribeRequest(); - - setFlexibleAutoSubscribeRequest.productId("1"); - setFlexibleAutoSubscribeRequest.autoSubscribe(false); - - ApiResponse response = - api.setFlexibleAutoSubscribe(setFlexibleAutoSubscribeRequest); + public void getLockedSubscriptionPreviewTest() + throws ApiException, CryptoException, IOException { + String projectId = "1"; + Double amount = 1.0d; + Boolean autoSubscribe = true; + Long recvWindow = 5000L; + ApiResponse response = + api.getLockedSubscriptionPreview(projectId, amount, autoSubscribe, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -507,34 +570,39 @@ public void setFlexibleAutoSubscribeTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("projectId=1&amount=1&autoSubscribe=true&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000productId=1&autoSubscribe=false", - signInputCaptor.getValue()); - assertEquals( - "7f0e71e1d2216401bdf0ebda0fabfe4e4c1000d47e4c68eb693dac11779f033f", + "ecc2c9a2d68e05051696f604598a440ee1aeaed7b90bc546e17a9edcdc6ae43a", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/simple-earn/flexible/setAutoSubscribe", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/locked/subscriptionPreview", actualRequest.url().encodedPath()); } /** - * Set Locked Auto Subscribe(USER_DATA) + * Get Locked Subscription Record (USER_DATA) * - *

Set locked auto subscribe Weight: 150 + *

Get Locked Subscription Record Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 30 days. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void setLockedAutoSubscribeTest() throws ApiException, CryptoException { - SetLockedAutoSubscribeRequest setLockedAutoSubscribeRequest = - new SetLockedAutoSubscribeRequest(); - - setLockedAutoSubscribeRequest.positionId("1"); - setLockedAutoSubscribeRequest.autoSubscribe(false); - - ApiResponse response = - api.setLockedAutoSubscribe(setLockedAutoSubscribeRequest); + public void getLockedSubscriptionRecordTest() + throws ApiException, CryptoException, IOException { + String purchaseId = "1"; + String asset = "USDC"; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getLockedSubscriptionRecord( + purchaseId, asset, startTime, endTime, current, size, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -546,33 +614,38 @@ public void setLockedAutoSubscribeTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("purchaseId=1&asset=USDC&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000positionId=1&autoSubscribe=false", - signInputCaptor.getValue()); - assertEquals( - "3a195934cb713ee1998b4fa336da6ec3a9a4b2087a91d11a2d5602c7af3474e0", + "4235939d0db60868b64c46b7e89d7546a9fdc5d2240aa82e65b4de84e74248d0", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/simple-earn/locked/setAutoSubscribe", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/locked/history/subscriptionRecord", actualRequest.url().encodedPath()); } /** - * Set Locked Product Redeem Option(USER_DATA) + * Get Rate History (USER_DATA) * - *

Set redeem option for Locked product Weight: 50 + *

Get Rate History Weight(IP): 150 Security Type: USER_DATA Notes: - The time between + * startTime and endTime cannot be longer than 1 year. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, the next 30 days' data + * beginning from `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @throws ApiException if the Api call fails */ @Test - public void setLockedProductRedeemOptionTest() throws ApiException, CryptoException { - SetLockedProductRedeemOptionRequest setLockedProductRedeemOptionRequest = - new SetLockedProductRedeemOptionRequest(); - - setLockedProductRedeemOptionRequest.positionId("1"); - setLockedProductRedeemOptionRequest.redeemTo(""); - - ApiResponse response = - api.setLockedProductRedeemOption(setLockedProductRedeemOptionRequest); + public void getRateHistoryTest() throws ApiException, CryptoException, IOException { + String productId = "1"; + AprPeriod aprPeriod = AprPeriod.DAY; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getRateHistory( + productId, aprPeriod, startTime, endTime, current, size, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -584,32 +657,27 @@ public void setLockedProductRedeemOptionTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000positionId=1&redeemTo=", signInputCaptor.getValue()); - assertEquals( - "f8aaddc07f48085384e59233efb3421133330e9bcd0357b99332f1202fe03d70", - actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/simple-earn/locked/setRedeemOption", actualRequest.url().encodedPath()); + assertEquals("productId=1&aprPeriod=DAY&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("0af754bef31bbc2eacb35fc0379a27fbebb9e93765a6b817a1c1a593149b478f", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/simple-earn/flexible/history/rateHistory", actualRequest.url().encodedPath()); } /** - * Subscribe Flexible Product(TRADE) + * Get Simple Earn Flexible Product List (USER_DATA) * - *

Subscribe Flexible Product * You need to open `Enable Spot & Margin Trading` - * permission for the API Key which requests this endpoint. Weight: 1 + *

Get available Simple Earn flexible product list Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void subscribeFlexibleProductTest() throws ApiException, CryptoException { - SubscribeFlexibleProductRequest subscribeFlexibleProductRequest = - new SubscribeFlexibleProductRequest(); - - subscribeFlexibleProductRequest.productId("1"); - subscribeFlexibleProductRequest.amount(1d); - - ApiResponse response = - api.subscribeFlexibleProduct(subscribeFlexibleProductRequest); + public void getSimpleEarnFlexibleProductListTest() + throws ApiException, CryptoException, IOException { + String asset = "USDC"; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getSimpleEarnFlexibleProductList(asset, current, size, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -621,31 +689,31 @@ public void subscribeFlexibleProductTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000amount=1&productId=1", signInputCaptor.getValue()); assertEquals( - "d71f21fc51817b324b37ac741557e5f0e37ba4c300b9b0dcf20dadffde1a1e1a", + "asset=USDC¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "1bd00651b1d3470bc5207521f585044d8795a618d07615786a0f9a25afaf8b35", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/simple-earn/flexible/subscribe", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/flexible/list", actualRequest.url().encodedPath()); } /** - * Subscribe Locked Product(TRADE) + * Get Simple Earn Locked Product List (USER_DATA) * - *

Subscribe Locked Product * You need to open `Enable Spot & Margin Trading` - * permission for the API Key which requests this endpoint. Weight: 1 + *

Get Simple Earn Locked Product List Weight(IP): 150 Security Type: USER_DATA Notes: - Get + * available Simple Earn locked product list * * @throws ApiException if the Api call fails */ @Test - public void subscribeLockedProductTest() throws ApiException, CryptoException { - SubscribeLockedProductRequest subscribeLockedProductRequest = - new SubscribeLockedProductRequest(); - - subscribeLockedProductRequest.projectId("1"); - subscribeLockedProductRequest.amount(1d); - - ApiResponse response = - api.subscribeLockedProduct(subscribeLockedProductRequest); + public void getSimpleEarnLockedProductListTest() + throws ApiException, CryptoException, IOException { + String asset = "USDC"; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getSimpleEarnLockedProductList(asset, current, size, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -657,36 +725,30 @@ public void subscribeLockedProductTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000amount=1&projectId=1", signInputCaptor.getValue()); + assertEquals("asset=USDC¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "7ef22d632c2aec6bea9e728707f8eac15fbf16144341682080788f00ceb268ac", + "1bd00651b1d3470bc5207521f585044d8795a618d07615786a0f9a25afaf8b35", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/simple-earn/locked/subscribe", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/locked/list", actualRequest.url().encodedPath()); } /** - * Get Collateral Record(USER_DATA) + * Redeem Flexible Product (TRADE) * - *

Get Collateral Record * The time between `startTime` and `endTime` - * cannot be longer than 30 days. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 1 + *

Redeem Flexible Product Weight(IP): 1 Security Type: TRADE Notes: - You need to open + * `Enable Spot & Margin Trading` permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ @Test - public void getCollateralRecordTest() throws ApiException, CryptoException { - String productId = "1"; - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; - Long current = 1L; - Long size = 10L; - Long recvWindow = 5000L; - ApiResponse response = - api.getCollateralRecord(productId, startTime, endTime, current, size, recvWindow); + public void redeemFlexibleProductTest() throws ApiException, CryptoException, IOException { + RedeemFlexibleProductRequest redeemFlexibleProductRequest = + new RedeemFlexibleProductRequest(); + redeemFlexibleProductRequest.productId("1"); + + ApiResponse response = + api.redeemFlexibleProduct(redeemFlexibleProductRequest); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -698,43 +760,29 @@ public void getCollateralRecordTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000productId=1&destAccount=SPOT&redeemAll=false", signInputCaptor.getValue()); assertEquals( - "productId=1&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "906323d23878072da9680bca3160b76d28b6ea07530e027f762757a381c263c0", + "1923492b39982c2a14769c4c96e75365b8627a00f73639458fbd03886e8097bc", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/simple-earn/flexible/history/collateralRecord", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/flexible/redeem", actualRequest.url().encodedPath()); } /** - * Get Flexible Redemption Record(USER_DATA) + * Redeem Locked Product (TRADE) * - *

Get Flexible Redemption Record * The time between `startTime` and - * `endTime` cannot be longer than 3 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Redeem Locked Product Weight(IP): 1 Security Type: TRADE Notes: - You need to open + * `Enable Spot & Margin Trading` permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ @Test - public void getFlexibleRedemptionRecordTest() throws ApiException, CryptoException { - String productId = "1"; - String redeemId = "1"; - String asset = ""; - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; - Long current = 1L; - Long size = 10L; - Long recvWindow = 5000L; - ApiResponse response = - api.getFlexibleRedemptionRecord( - productId, redeemId, asset, startTime, endTime, current, size, recvWindow); + public void redeemLockedProductTest() throws ApiException, CryptoException, IOException { + RedeemLockedProductRequest redeemLockedProductRequest = new RedeemLockedProductRequest(); + redeemLockedProductRequest.positionId("1"); + + ApiResponse response = + api.redeemLockedProduct(redeemLockedProductRequest); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -746,42 +794,28 @@ public void getFlexibleRedemptionRecordTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000positionId=1", signInputCaptor.getValue()); assertEquals( - "productId=1&redeemId=1&asset=&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "d1703f8758c55672f9a39da68d446692dde9bf216f7ebef51b7093b2a9d37bd1", - actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/simple-earn/flexible/history/redemptionRecord", - actualRequest.url().encodedPath()); + "05345189012e725ecf394a569c76b468c3a9d6377f5b644a1b90e1551920ce91", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/simple-earn/locked/redeem", actualRequest.url().encodedPath()); } /** - * Get Flexible Rewards History(USER_DATA) + * Set Flexible Auto Subscribe (USER_DATA) * - *

Get Flexible Rewards History * The time between `startTime` and - * `endTime` cannot be longer than 3 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Set Flexible Auto Subscribe Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getFlexibleRewardsHistoryTest() throws ApiException, CryptoException { - String type = "Bonus"; - String productId = "1"; - String asset = ""; - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; - Long current = null; - Long size = null; - Long recvWindow = null; - ApiResponse response = - api.getFlexibleRewardsHistory(type, productId, asset, startTime, endTime, current, size, recvWindow); + public void setFlexibleAutoSubscribeTest() throws ApiException, CryptoException, IOException { + SetFlexibleAutoSubscribeRequest setFlexibleAutoSubscribeRequest = + new SetFlexibleAutoSubscribeRequest(); + setFlexibleAutoSubscribeRequest.productId("1"); + setFlexibleAutoSubscribeRequest.autoSubscribe(true); + + ApiResponse response = + api.setFlexibleAutoSubscribe(setFlexibleAutoSubscribeRequest); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -793,50 +827,29 @@ public void getFlexibleRewardsHistoryTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000productId=1&autoSubscribe=true", signInputCaptor.getValue()); assertEquals( - "productId=1&asset=&startTime=1623319461670&endTime=1641782889000&type=Bonus×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "aaca82b4120f35ab3bf0bc811eb9e830f570191c637ef87b11b4e820934b3f50", + "d7860697c281e19aa84608fd813c8aa97ae6f872d6be69e3b2917e52c5452e21", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/simple-earn/flexible/history/rewardsRecord", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/flexible/setAutoSubscribe", actualRequest.url().encodedPath()); } /** - * Get Flexible Subscription Record(USER_DATA) + * Set Locked Auto Subscribe (USER_DATA) * - *

Get Flexible Subscription Record * The time between `startTime` and - * `endTime` cannot be longer than 3 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Set locked auto subscribe Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getFlexibleSubscriptionRecordTest() throws ApiException, CryptoException { - String productId = "1"; - String purchaseId = "1"; - String asset = ""; - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; - Long current = 1L; - Long size = 10L; - Long recvWindow = 5000L; - ApiResponse response = - api.getFlexibleSubscriptionRecord( - productId, - purchaseId, - asset, - startTime, - endTime, - current, - size, - recvWindow); + public void setLockedAutoSubscribeTest() throws ApiException, CryptoException, IOException { + SetLockedAutoSubscribeRequest setLockedAutoSubscribeRequest = + new SetLockedAutoSubscribeRequest(); + setLockedAutoSubscribeRequest.positionId("1"); + setLockedAutoSubscribeRequest.autoSubscribe(true); + + ApiResponse response = + api.setLockedAutoSubscribe(setLockedAutoSubscribeRequest); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -848,43 +861,30 @@ public void getFlexibleSubscriptionRecordTest() throws ApiException, CryptoExcep Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000positionId=1&autoSubscribe=true", signInputCaptor.getValue()); assertEquals( - "productId=1&purchaseId=1&asset=&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "e68ebd079318006615cac9e1f467bdc7c3ac82bf05a7180825541e5925b07e51", + "ccf4485e39f5a5902d6132dc3dff0cebd2ef3a8bd3920de8ebf5ab46d448213a", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/simple-earn/flexible/history/subscriptionRecord", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/locked/setAutoSubscribe", actualRequest.url().encodedPath()); } /** - * Get Locked Redemption Record(USER_DATA) + * Set Locked Product Redeem Option (USER_DATA) * - *

Get Locked Redemption Record * The time between `startTime` and - * `endTime` cannot be longer than 3 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Set redeem option for Locked product Weight(IP): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getLockedRedemptionRecordTest() throws ApiException, CryptoException { - String positionId = "1"; - String redeemId = "1"; - String asset = ""; - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; - Long current = 1L; - Long size = 10L; - Long recvWindow = 5000L; - ApiResponse response = - api.getLockedRedemptionRecord( - positionId, redeemId, asset, startTime, endTime, current, size, recvWindow); + public void setLockedProductRedeemOptionTest() + throws ApiException, CryptoException, IOException { + SetLockedProductRedeemOptionRequest setLockedProductRedeemOptionRequest = + new SetLockedProductRedeemOptionRequest(); + setLockedProductRedeemOptionRequest.positionId("1"); + setLockedProductRedeemOptionRequest.redeemTo(RedeemTo.SPOT); + + ApiResponse response = + api.setLockedProductRedeemOption(setLockedProductRedeemOptionRequest); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -896,42 +896,24 @@ public void getLockedRedemptionRecordTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000positionId=1&redeemTo=SPOT", signInputCaptor.getValue()); assertEquals( - "positionId=1&redeemId=1&asset=&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "b969874fd814b72e7c29bdebdc319072c1dc23126f0a117b9b22f3617918204d", + "54b4c36882fe7b0b06bb851e208c082cdc9e6d0ca526a21cbb323a3659e02a2e", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/simple-earn/locked/history/redemptionRecord", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/locked/setRedeemOption", actualRequest.url().encodedPath()); } /** - * Get Locked Rewards History(USER_DATA) + * Simple Account (USER_DATA) * - *

Get Locked Rewards History * The time between `startTime` and - * `endTime` cannot be longer than 3 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Simple Account query Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getLockedRewardsHistoryTest() throws ApiException, CryptoException { - String positionId = "1"; - String asset = ""; - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; - Long current = 1L; - Long size = 10L; + public void simpleAccountTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; - ApiResponse response = - api.getLockedRewardsHistory( - positionId, asset, startTime, endTime, current, size, recvWindow); + ApiResponse response = api.simpleAccount(recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -943,42 +925,29 @@ public void getLockedRewardsHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "positionId=1&asset=&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "fa00e647d10a074646817619a9a8485086bbc8257eed00382562bf960d5f0143", - actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/simple-earn/locked/history/rewardsRecord", - actualRequest.url().encodedPath()); + assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/simple-earn/account", actualRequest.url().encodedPath()); } /** - * Get Locked Subscription Record(USER_DATA) + * Subscribe Flexible Product (TRADE) * - *

Get Locked Subscription Record * The time between `startTime` and - * `endTime` cannot be longer than 3 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Subscribe Flexible Product Weight(IP): 1 Security Type: TRADE Notes: - You need to open + * `Enable Spot & Margin Trading` permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ @Test - public void getLockedSubscriptionRecordTest() throws ApiException, CryptoException { - String purchaseId = "1"; - String asset = ""; - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; - Long current = 1L; - Long size = 10L; - Long recvWindow = 5000L; - ApiResponse response = - api.getLockedSubscriptionRecord( - purchaseId, asset, startTime, endTime, current, size, recvWindow); + public void subscribeFlexibleProductTest() throws ApiException, CryptoException, IOException { + SubscribeFlexibleProductRequest subscribeFlexibleProductRequest = + new SubscribeFlexibleProductRequest(); + subscribeFlexibleProductRequest.productId("1"); + subscribeFlexibleProductRequest.amount(1.0d); + + ApiResponse response = + api.subscribeFlexibleProduct(subscribeFlexibleProductRequest); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -990,41 +959,31 @@ public void getLockedSubscriptionRecordTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000amount=1&productId=1&sourceAccount=SPOT&autoSubscribe=true", signInputCaptor.getValue()); assertEquals( - "purchaseId=1&asset=&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "bd233092b66eaad8df11be01a5a41670f67daa39dfc19880a9d14424471cfba7", + "0360447bba35d792b76aff3e94da6ca8061180e0405465a27d6f0c25889c26a9", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/simple-earn/locked/history/subscriptionRecord", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/flexible/subscribe", actualRequest.url().encodedPath()); } /** - * Get Rate History(USER_DATA) + * Subscribe Locked Product (TRADE) * - *

Get Rate History * The time between startTime and endTime cannot be longer than 1 year. * - * If `startTime` and `endTime` are both not sent, then the last 30 - * days' data will be returned. * If `startTime` is sent but `endTime` - * is not sent, the next 30 days' data beginning from `startTime` will be - * returned. * If `endTime` is sent but `startTime` is not sent, the 30 - * days' data before `endTime` will be returned. Weight: 150 + *

Subscribe Locked Product Weight(IP): 1 Security Type: TRADE Notes: - You need to open + * `Enable Spot & Margin Trading` permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ @Test - public void getRateHistoryTest() throws ApiException, CryptoException { - String productId = "1"; - String aprPeriod = "DAY"; - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; - Long current = 1L; - Long size = 10L; - Long recvWindow = 5000L; - ApiResponse response = - api.getRateHistory( - productId, aprPeriod, startTime, endTime, current, size, recvWindow); + public void subscribeLockedProductTest() throws ApiException, CryptoException, IOException { + SubscribeLockedProductRequest subscribeLockedProductRequest = + new SubscribeLockedProductRequest(); + subscribeLockedProductRequest.projectId("1"); + subscribeLockedProductRequest.amount(1.0d); + + ApiResponse response = + api.subscribeLockedProduct(subscribeLockedProductRequest); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -1036,14 +995,10 @@ public void getRateHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000amount=1&sourceAccount=SPOT&redeemTo=SPOT&autoSubscribe=false&projectId=1", signInputCaptor.getValue()); assertEquals( - "productId=1&aprPeriod=DAY&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "0af754bef31bbc2eacb35fc0379a27fbebb9e93765a6b817a1c1a593149b478f", + "a7686908b7fbd13b024b68567f206f1335df97bc0798274055745eee6e379047", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/simple-earn/flexible/history/rateHistory", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/simple-earn/locked/subscribe", actualRequest.url().encodedPath()); } } diff --git a/clients/simple-earn/src/test/java/com/binance/connector/client/simple_earn/rest/api/RwusdApiTest.java b/clients/simple-earn/src/test/java/com/binance/connector/client/simple_earn/rest/api/RwusdApiTest.java new file mode 100644 index 000000000..55f724064 --- /dev/null +++ b/clients/simple-earn/src/test/java/com/binance/connector/client/simple_earn/rest/api/RwusdApiTest.java @@ -0,0 +1,381 @@ +/* + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.simple_earn.rest.api; + +import static org.junit.Assert.assertEquals; + +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.auth.BinanceAuthenticationFactory; +import com.binance.connector.client.common.auth.SignatureAuthentication; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.common.sign.HmacSignatureGenerator; +import com.binance.connector.client.common.sign.SignatureGenerator; +import com.binance.connector.client.simple_earn.rest.model.Asset; +import com.binance.connector.client.simple_earn.rest.model.GetRwusdAccountResponse; +import com.binance.connector.client.simple_earn.rest.model.GetRwusdQuotaDetailsResponse; +import com.binance.connector.client.simple_earn.rest.model.GetRwusdRateHistoryResponse; +import com.binance.connector.client.simple_earn.rest.model.GetRwusdRedemptionHistoryResponse; +import com.binance.connector.client.simple_earn.rest.model.GetRwusdRewardsHistoryResponse; +import com.binance.connector.client.simple_earn.rest.model.GetRwusdSubscriptionHistoryResponse; +import com.binance.connector.client.simple_earn.rest.model.OrderType; +import com.binance.connector.client.simple_earn.rest.model.RedeemRwusdRequest; +import com.binance.connector.client.simple_earn.rest.model.RedeemRwusdResponse; +import com.binance.connector.client.simple_earn.rest.model.SubscribeRwusdRequest; +import com.binance.connector.client.simple_earn.rest.model.SubscribeRwusdResponse; +import jakarta.validation.constraints.*; +import java.io.IOException; +import okhttp3.Call; +import okhttp3.Request; +import org.bouncycastle.crypto.CryptoException; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; + +/** API tests for RwusdApi */ +public class RwusdApiTest { + + private RwusdApi api; + private ApiClient apiClientSpy; + private SignatureGenerator signatureGeneratorSpy; + + @BeforeEach + public void initApiClient() throws ApiException { + ClientConfiguration clientConfiguration = new ClientConfiguration(); + clientConfiguration.setUrl("http://localhost:8080"); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setSecretKey("secretKey"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + + HmacSignatureGenerator signatureGenerator = + new HmacSignatureGenerator(signatureConfiguration.getSecretKey()); + signatureGeneratorSpy = Mockito.spy(signatureGenerator); + SignatureAuthentication signatureAuthentication = + new SignatureAuthentication( + signatureConfiguration.getApiKey(), signatureGeneratorSpy); + SignatureAuthentication authenticationSpy = Mockito.spy(signatureAuthentication); + Mockito.doReturn("1736393892000").when(authenticationSpy).buildTimestamp(); + + BinanceAuthenticationFactory factoryMock = Mockito.mock(BinanceAuthenticationFactory.class); + Mockito.doReturn(authenticationSpy) + .when(factoryMock) + .getAuthentication(signatureConfiguration); + + ApiClient apiClient = new ApiClient(clientConfiguration, factoryMock); + + apiClientSpy = Mockito.spy(apiClient); + Mockito.doReturn(new ApiResponse<>(200, null)) + .when(apiClientSpy) + .execute(Mockito.any(), Mockito.any(java.lang.reflect.Type.class)); + Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); + Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); + + api = new RwusdApi(apiClientSpy); + } + + /** + * Get RWUSD Account (USER_DATA) + * + *

Get RWUSD account information. Weight(IP): 150 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getRwusdAccountTest() throws ApiException, CryptoException, IOException { + Long recvWindow = 5000L; + ApiResponse response = api.getRwusdAccount(recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/rwusd/account", actualRequest.url().encodedPath()); + } + + /** + * Get RWUSD Quota Details (USER_DATA) + * + *

Get RWUSD quota details including subscription quota, fast redemption quota, and standard + * redemption quota. Weight(IP): 150 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getRwusdQuotaDetailsTest() throws ApiException, CryptoException, IOException { + Long recvWindow = 5000L; + ApiResponse response = api.getRwusdQuotaDetails(recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/rwusd/quota", actualRequest.url().encodedPath()); + } + + /** + * Get RWUSD Rate History (USER_DATA) + * + *

Get RWUSD rate history sorted by descending order. Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 6 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, `endTime` will default to current time, and + * results from `startTime` onward will be returned. - If `endTime` is sent + * but `startTime` is not sent, `startTime` defaults to the current time + * minus one month, and data between `startTime` and `endTime` will be + * returned. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getRwusdRateHistoryTest() throws ApiException, CryptoException, IOException { + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getRwusdRateHistory(startTime, endTime, current, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "2ecc0415a3bdb2963e8030cdf6cf00de6f49d21b71ff939dda42e5756eb8ba66", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/rwusd/history/rateHistory", actualRequest.url().encodedPath()); + } + + /** + * Get RWUSD Redemption History (USER_DATA) + * + *

Get RWUSD redemption history. Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 6 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, `endTime` will default to current time, and results from + * `startTime` onward will be returned. - If `endTime` is sent but + * `startTime` is not sent, `startTime` defaults to the current time minus + * one month, and data between `startTime` and `endTime` will be returned. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getRwusdRedemptionHistoryTest() throws ApiException, CryptoException, IOException { + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getRwusdRedemptionHistory(startTime, endTime, current, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "2ecc0415a3bdb2963e8030cdf6cf00de6f49d21b71ff939dda42e5756eb8ba66", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/rwusd/history/redemptionHistory", actualRequest.url().encodedPath()); + } + + /** + * Get RWUSD Rewards History (USER_DATA) + * + *

Get RWUSD rewards history. Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 6 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, `endTime` will default to current time, and results from + * `startTime` onward will be returned. - If `endTime` is sent but + * `startTime` is not sent, `startTime` defaults to the current time minus + * one month, and data between `startTime` and `endTime` will be returned. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getRwusdRewardsHistoryTest() throws ApiException, CryptoException, IOException { + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getRwusdRewardsHistory(startTime, endTime, current, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "2ecc0415a3bdb2963e8030cdf6cf00de6f49d21b71ff939dda42e5756eb8ba66", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/rwusd/history/rewardsHistory", actualRequest.url().encodedPath()); + } + + /** + * Get RWUSD subscription history (USER_DATA) + * + *

Get RWUSD subscription history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 6 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, `endTime` will default to current time, and results from + * `startTime` onward will be returned. - If `endTime` is sent but + * `startTime` is not sent, `startTime` defaults to the current time + * advanced by one month, and data between `startTime` and `endTime` will be + * returned. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getRwusdSubscriptionHistoryTest() + throws ApiException, CryptoException, IOException { + Asset asset = Asset.USDT; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getRwusdSubscriptionHistory( + asset, startTime, endTime, current, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("asset=USDT&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "d2d3f4b1832a72b887dcf51b8c18488ce4d7d5d86e46472a30d10f94beda49cc", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/rwusd/history/subscriptionHistory", actualRequest.url().encodedPath()); + } + + /** + * Redeem RWUSD (TRADE) + * + *

Redeem RWUSD to USDC Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable + * Spot & Margin Trading permission for the API Key which requests this endpoint. - This API + * only supports RWUSD redemption to the Spot Account. Redemptions to the Funding Account or any + * other account type are not supported. + * + * @throws ApiException if the Api call fails + */ + @Test + public void redeemRwusdTest() throws ApiException, CryptoException, IOException { + RedeemRwusdRequest redeemRwusdRequest = new RedeemRwusdRequest(); + redeemRwusdRequest.amount(1.0d); + redeemRwusdRequest.type(OrderType.FAST); + + ApiResponse response = api.redeemRwusd(redeemRwusdRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000amount=1&type=FAST", signInputCaptor.getValue()); + assertEquals("f6b786b1b7e5d812712d7c48a17ae30772ce0689744c3735e3a5b85c25595377", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/rwusd/redeem", actualRequest.url().encodedPath()); + } + + /** + * Subscribe RWUSD (TRADE) + * + *

Subscribe RWUSD Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable Spot + * & Margin Trading permission for the API Key which requests this endpoint. - This API only + * supports RWUSD subscription using assets held in the Spot Account. Subscriptions initiated + * from the Funding Account or any other account type are not supported. + * + * @throws ApiException if the Api call fails + */ + @Test + public void subscribeRwusdTest() throws ApiException, CryptoException, IOException { + SubscribeRwusdRequest subscribeRwusdRequest = new SubscribeRwusdRequest(); + subscribeRwusdRequest.asset(Asset.USDT); + subscribeRwusdRequest.amount(1.0d); + + ApiResponse response = api.subscribeRwusd(subscribeRwusdRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000amount=1&asset=USDT", signInputCaptor.getValue()); + assertEquals("5a68a35d483ec36a064e5f87613afb24d2c7b4e4b9849e4bd0fd85f6dd3b056a", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/rwusd/subscribe", actualRequest.url().encodedPath()); + } +} diff --git a/clients/simple-earn/src/test/java/com/binance/connector/client/simple_earn/rest/api/YieldArenaApiTest.java b/clients/simple-earn/src/test/java/com/binance/connector/client/simple_earn/rest/api/YieldArenaApiTest.java new file mode 100644 index 000000000..c8e0f5b78 --- /dev/null +++ b/clients/simple-earn/src/test/java/com/binance/connector/client/simple_earn/rest/api/YieldArenaApiTest.java @@ -0,0 +1,110 @@ +/* + * Simple Earn REST API + * Earn rewards by subscribing to flexible or locked Simple Earn products. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.simple_earn.rest.api; + +import static org.junit.Assert.assertEquals; + +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.auth.BinanceAuthenticationFactory; +import com.binance.connector.client.common.auth.SignatureAuthentication; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.common.sign.HmacSignatureGenerator; +import com.binance.connector.client.common.sign.SignatureGenerator; +import com.binance.connector.client.simple_earn.rest.model.GetYieldArenaActivitiesResponse; +import jakarta.validation.constraints.*; +import java.io.IOException; +import okhttp3.Call; +import okhttp3.Request; +import org.bouncycastle.crypto.CryptoException; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; + +/** API tests for YieldArenaApi */ +public class YieldArenaApiTest { + + private YieldArenaApi api; + private ApiClient apiClientSpy; + private SignatureGenerator signatureGeneratorSpy; + + @BeforeEach + public void initApiClient() throws ApiException { + ClientConfiguration clientConfiguration = new ClientConfiguration(); + clientConfiguration.setUrl("http://localhost:8080"); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setSecretKey("secretKey"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + + HmacSignatureGenerator signatureGenerator = + new HmacSignatureGenerator(signatureConfiguration.getSecretKey()); + signatureGeneratorSpy = Mockito.spy(signatureGenerator); + SignatureAuthentication signatureAuthentication = + new SignatureAuthentication( + signatureConfiguration.getApiKey(), signatureGeneratorSpy); + SignatureAuthentication authenticationSpy = Mockito.spy(signatureAuthentication); + Mockito.doReturn("1736393892000").when(authenticationSpy).buildTimestamp(); + + BinanceAuthenticationFactory factoryMock = Mockito.mock(BinanceAuthenticationFactory.class); + Mockito.doReturn(authenticationSpy) + .when(factoryMock) + .getAuthentication(signatureConfiguration); + + ApiClient apiClient = new ApiClient(clientConfiguration, factoryMock); + + apiClientSpy = Mockito.spy(apiClient); + Mockito.doReturn(new ApiResponse<>(200, null)) + .when(apiClientSpy) + .execute(Mockito.any(), Mockito.any(java.lang.reflect.Type.class)); + Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); + Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); + + api = new YieldArenaApi(apiClientSpy); + } + + /** + * Get Yield Arena Activities (USER_DATA) + * + *

Get the list of Earn Yield Arena giveaway activities currently available to the user. + * Weight(IP): 150 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getYieldArenaActivitiesTest() throws ApiException, CryptoException, IOException { + String lang = "en"; + Long recvWindow = 5000L; + ApiResponse response = + api.getYieldArenaActivities(lang, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/earn/arena/activities", actualRequest.url().encodedPath()); + } +} diff --git a/clients/spot/CHANGELOG.md b/clients/spot/CHANGELOG.md index a175d46d5..8ff401769 100644 --- a/clients/spot/CHANGELOG.md +++ b/clients/spot/CHANGELOG.md @@ -1,5 +1,1092 @@ # Changelog +## 11.0.0 - 2026-07-29 + +### Changed (76) + +#### REST API + +- Modified parameter `cancelRestrictions`: + - enum removed: `NEW`, `PARTIALLY_FILLED` + - affected methods: + - `deleteOrder()` (`DELETE /api/v3/order`) + - `orderCancelReplace()` (`POST /api/v3/order/cancelReplace`) +- Modified parameter `newOrderRespType`: + - enum removed: `MARKET`, `LIMIT` + - affected methods: + - `newOrder()` (`POST /api/v3/order`) + - `orderCancelReplace()` (`POST /api/v3/order/cancelReplace`) + - `orderOco()` (`POST /api/v3/order/oco`) + - `orderTest()` (`POST /api/v3/order/test`) + - `orderListOco()` (`POST /api/v3/orderList/oco`) + - `orderListOpo()` (`POST /api/v3/orderList/opo`) + - `orderListOpoco()` (`POST /api/v3/orderList/opoco`) + - `orderListOto()` (`POST /api/v3/orderList/oto`) + - `orderListOtoco()` (`POST /api/v3/orderList/otoco`) + - `sorOrder()` (`POST /api/v3/sor/order`) + - `sorOrderTest()` (`POST /api/v3/sor/order/test`) +- Modified parameter `pegOffsetType`: + - enum removed: `NON_REPRESENTABLE` + - affected methods: + - `newOrder()` (`POST /api/v3/order`) + - `orderCancelReplace()` (`POST /api/v3/order/cancelReplace`) + - `orderTest()` (`POST /api/v3/order/test`) +- Modified parameter `pegPriceType`: + - enum removed: `NON_REPRESENTABLE` + - affected methods: + - `newOrder()` (`POST /api/v3/order`) + - `orderCancelReplace()` (`POST /api/v3/order/cancelReplace`) + - `orderTest()` (`POST /api/v3/order/test`) +- Modified parameter `permissions`: + - items: enum added: `SPOT`, `MARGIN`, `LEVERAGED`, `TRD_GRP_002`, `TRD_GRP_003`, `TRD_GRP_004`, `TRD_GRP_005`, `TRD_GRP_006`, `TRD_GRP_007`, `TRD_GRP_008`, `TRD_GRP_009`, `TRD_GRP_010`, `TRD_GRP_011`, `TRD_GRP_012`, `TRD_GRP_013`, `TRD_GRP_014`, `TRD_GRP_015`, `TRD_GRP_016`, `TRD_GRP_017`, `TRD_GRP_018`, `TRD_GRP_019`, `TRD_GRP_020`, `TRD_GRP_021`, `TRD_GRP_022`, `TRD_GRP_023`, `TRD_GRP_024`, `TRD_GRP_025` + - affected methods: + - `exchangeInfo()` (`GET /api/v3/exchangeInfo`) +- Modified parameter `selfTradePreventionMode`: + - enum removed: `NON_REPRESENTABLE` + - affected methods: + - `newOrder()` (`POST /api/v3/order`) + - `orderCancelReplace()` (`POST /api/v3/order/cancelReplace`) + - `orderOco()` (`POST /api/v3/order/oco`) + - `orderTest()` (`POST /api/v3/order/test`) + - `orderListOco()` (`POST /api/v3/orderList/oco`) + - `orderListOpo()` (`POST /api/v3/orderList/opo`) + - `orderListOpoco()` (`POST /api/v3/orderList/opoco`) + - `orderListOto()` (`POST /api/v3/orderList/oto`) + - `orderListOtoco()` (`POST /api/v3/orderList/otoco`) + - `sorOrder()` (`POST /api/v3/sor/order`) + - `sorOrderTest()` (`POST /api/v3/sor/order/test`) +- Modified parameter `symbolStatus`: + - enum removed: `END_OF_DAY`, `NON_REPRESENTABLE` + - affected methods: + - `depth()` (`GET /api/v3/depth`) + - `exchangeInfo()` (`GET /api/v3/exchangeInfo`) + - `executionRules()` (`GET /api/v3/executionRules`) + - `referencePriceCalculation()` (`GET /api/v3/referencePrice/calculation`) + - `tickerBookTicker()` (`GET /api/v3/ticker/bookTicker`) + - `tickerPrice()` (`GET /api/v3/ticker/price`) + - `tickerTradingDay()` (`GET /api/v3/ticker/tradingDay`) +- Modified parameter `symbolStatus`: + - enum removed: `END_OF_DAY`, `NON_REPRESENTABLE` + - affected methods: + - `ticker()` (`GET /api/v3/ticker`) + - `ticker24hr()` (`GET /api/v3/ticker/24hr`) +- Modified parameter `timeInForce`: + - enum removed: `NON_REPRESENTABLE` + - affected methods: + - `newOrder()` (`POST /api/v3/order`) + - `orderCancelReplace()` (`POST /api/v3/order/cancelReplace`) + - `orderTest()` (`POST /api/v3/order/test`) + - `sorOrder()` (`POST /api/v3/sor/order`) + - `sorOrderTest()` (`POST /api/v3/sor/order/test`) +- Modified parameter `type`: + - enum removed: `NON_REPRESENTABLE` + - affected methods: + - `newOrder()` (`POST /api/v3/order`) + - `orderCancelReplace()` (`POST /api/v3/order/cancelReplace`) + - `orderTest()` (`POST /api/v3/order/test`) +- Modified parameter `type`: + - enum removed: `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`, `LIMIT_MAKER`, `NON_REPRESENTABLE` + - affected methods: + - `sorOrder()` (`POST /api/v3/sor/order`) + - `sorOrderTest()` (`POST /api/v3/sor/order/test`) +- Modified parameter `windowSize`: + - enum added: `7d` + - affected methods: + - `ticker()` (`GET /api/v3/ticker`) +- Modified response for `allOrders()` (`GET /api/v3/allOrders`): + - items: property `preventedQuantity` added + - items: property `strategyId` added + - items: property `trailingTime` added + - items: property `peggedPrice` added + - items: property `pegPriceType` added + - items: property `pegOffsetValue` added + - items: property `strategyType` added + - items: property `usedSor` added + - items: property `expiryReason` added + - items: property `workingFloor` added + - items: property `pegOffsetType` added + - items: property `trailingDelta` added + - items: property `preventedMatchId` added + - items: item property `preventedQuantity` added + - items: item property `strategyId` added + - items: item property `trailingTime` added + - items: item property `peggedPrice` added + - items: item property `pegPriceType` added + - items: item property `pegOffsetValue` added + - items: item property `strategyType` added + - items: item property `usedSor` added + - items: item property `expiryReason` added + - items: item property `workingFloor` added + - items: item property `pegOffsetType` added + - items: item property `trailingDelta` added + - items: item property `preventedMatchId` added + +- Modified response for `depth()` (`GET /api/v3/depth`): + - `asks`.items: minItems `0` → `2` + - `asks`.items: maxItems `null` → `2` + - `bids`.items: minItems `0` → `2` + - `bids`.items: maxItems `null` → `2` + +- Modified response for `exchangeInfo()` (`GET /api/v3/exchangeInfo`): + - property `sors` added + - `exchangeFilters`.items: oneOf modified + - `symbols`.items.`filters`.items: oneOf modified + - `symbols`.items.`filters`.items: oneOf modified + +- Modified response for `klines()` (`GET /api/v3/klines`): + - items.items: oneOf added 2 schema(s) + - items.items: oneOf removed 2 schema(s) + +- Modified response for `myFilters()` (`GET /api/v3/myFilters`): + - `assetFilters`.items: oneOf modified + - `exchangeFilters`.items: oneOf modified + - `symbolFilters`.items: oneOf modified + +- Modified response for `getOpenOrders()` (`GET /api/v3/openOrders`): + - items: property `strategyId` added + - items: property `trailingTime` added + - items: property `usedSor` added + - items: property `workingFloor` added + - items: property `pegOffsetType` added + - items: property `preventedMatchId` added + - items: property `peggedPrice` added + - items: property `trailingDelta` added + - items: property `pegPriceType` added + - items: property `preventedQuantity` added + - items: property `strategyType` added + - items: property `expiryReason` added + - items: property `pegOffsetValue` added + - items: item property `strategyId` added + - items: item property `trailingTime` added + - items: item property `usedSor` added + - items: item property `workingFloor` added + - items: item property `pegOffsetType` added + - items: item property `preventedMatchId` added + - items: item property `peggedPrice` added + - items: item property `trailingDelta` added + - items: item property `pegPriceType` added + - items: item property `preventedQuantity` added + - items: item property `strategyType` added + - items: item property `expiryReason` added + - items: item property `pegOffsetValue` added + +- Modified response for `deleteOrder()` (`DELETE /api/v3/order`): + - property `pegOffsetType` added + - property `strategyId` added + - property `stopPrice` added + - property `workingFloor` added + - property `preventedQuantity` added + - property `pegOffsetValue` added + - property `preventedMatchId` added + - property `strategyType` added + - property `pegPriceType` added + - property `peggedPrice` added + - property `trailingTime` added + - property `usedSor` added + - property `icebergQty` added + - property `trailingDelta` added + - property `expiryReason` added + +- Modified response for `getOrder()` (`GET /api/v3/order`): + - property `preventedMatchId` added + - property `workingFloor` added + - property `preventedQuantity` added + - property `trailingDelta` added + - property `trailingTime` added + - property `usedSor` added + - property `strategyType` added + - property `expiryReason` added + - property `peggedPrice` added + - property `pegOffsetType` added + - property `pegOffsetValue` added + - property `pegPriceType` added + - property `strategyId` added + +- Modified response for `orderAmendKeepPriority()` (`PUT /api/v3/order/amend/keepPriority`): + - `amendedOrder`: property `expiryReason` added + - `amendedOrder`: property `peggedPrice` added + - `amendedOrder`: property `trailingDelta` added + - `amendedOrder`: property `pegOffsetValue` added + - `amendedOrder`: property `pegPriceType` added + - `amendedOrder`: property `strategyType` added + - `amendedOrder`: property `strategyId` added + - `amendedOrder`: property `workingFloor` added + - `amendedOrder`: property `trailingTime` added + - `amendedOrder`: property `pegOffsetType` added + - `amendedOrder`: property `preventedQuantity` added + - `amendedOrder`: property `stopPrice` added + - `amendedOrder`: property `icebergQty` added + - `amendedOrder`: property `usedSor` added + - `amendedOrder`: property `preventedMatchId` added + +- Modified response for `orderCancelReplace()` (`POST /api/v3/order/cancelReplace`): + - property `code` deleted + - property `data` deleted + - property `msg` deleted + - `cancelResponse`: property `pegOffsetValue` added + - `cancelResponse`: property `pegPriceType` added + - `cancelResponse`: property `workingFloor` added + - `cancelResponse`: property `trailingTime` added + - `cancelResponse`: property `preventedMatchId` added + - `cancelResponse`: property `trailingDelta` added + - `cancelResponse`: property `peggedPrice` added + - `cancelResponse`: property `preventedQuantity` added + - `cancelResponse`: property `usedSor` added + - `cancelResponse`: property `strategyId` added + - `cancelResponse`: property `stopPrice` added + - `cancelResponse`: property `strategyType` added + - `cancelResponse`: property `icebergQty` added + - `cancelResponse`: property `expiryReason` added + - `cancelResponse`: property `pegOffsetType` added + - `newOrderResponse`: property `usedSor` added + - `newOrderResponse`: property `pegOffsetType` added + - `newOrderResponse`: property `workingFloor` added + - `newOrderResponse`: property `preventedQuantity` added + - `newOrderResponse`: property `trailingDelta` added + - `newOrderResponse`: property `pegPriceType` added + - `newOrderResponse`: property `strategyId` added + - `newOrderResponse`: property `trailingTime` added + - `newOrderResponse`: property `preventedMatchId` added + - `newOrderResponse`: property `expiryReason` added + - `newOrderResponse`: property `icebergQty` added + - `newOrderResponse`: property `peggedPrice` added + - `newOrderResponse`: property `strategyType` added + - `newOrderResponse`: property `pegOffsetValue` added + - `newOrderResponse`: property `stopPrice` added + - `newOrderResponse`.`fills`.items: type `string` → `object` + - `newOrderResponse`.`fills`.items: property `tradeId` added + - `newOrderResponse`.`fills`.items: property `commission` added + - `newOrderResponse`.`fills`.items: property `commissionAsset` added + - `newOrderResponse`.`fills`.items: property `price` added + - `newOrderResponse`.`fills`.items: property `qty` added + - `newOrderResponse`.`fills`.items: item property `tradeId` added + - `newOrderResponse`.`fills`.items: item property `commission` added + - `newOrderResponse`.`fills`.items: item property `commissionAsset` added + - `newOrderResponse`.`fills`.items: item property `price` added + - `newOrderResponse`.`fills`.items: item property `qty` added + +- Modified response for `deleteOrderList()` (`DELETE /api/v3/orderList`): + - `orderReports`.items: property `icebergQty` added + - `orderReports`.items: property `trailingDelta` added + - `orderReports`.items: property `workingFloor` added + - `orderReports`.items: property `pegPriceType` added + - `orderReports`.items: property `preventedQuantity` added + - `orderReports`.items: property `strategyId` added + - `orderReports`.items: property `trailingTime` added + - `orderReports`.items: property `pegOffsetType` added + - `orderReports`.items: property `peggedPrice` added + - `orderReports`.items: property `preventedMatchId` added + - `orderReports`.items: property `strategyType` added + - `orderReports`.items: property `pegOffsetValue` added + - `orderReports`.items: property `expiryReason` added + - `orderReports`.items: property `usedSor` added + - `orderReports`.items: property `selfTradePreventionMode` deleted + - `orderReports`.items: item property `icebergQty` added + - `orderReports`.items: item property `trailingDelta` added + - `orderReports`.items: item property `workingFloor` added + - `orderReports`.items: item property `pegPriceType` added + - `orderReports`.items: item property `preventedQuantity` added + - `orderReports`.items: item property `strategyId` added + - `orderReports`.items: item property `trailingTime` added + - `orderReports`.items: item property `pegOffsetType` added + - `orderReports`.items: item property `peggedPrice` added + - `orderReports`.items: item property `preventedMatchId` added + - `orderReports`.items: item property `strategyType` added + - `orderReports`.items: item property `pegOffsetValue` added + - `orderReports`.items: item property `expiryReason` added + - `orderReports`.items: item property `usedSor` added + - `orderReports`.items: item property `selfTradePreventionMode` deleted + +- Modified response for `orderListOpo()` (`POST /api/v3/orderList/opo`): + - `orderReports`.items: property `workingFloor` added + - `orderReports`.items: property `trailingTime` added + - `orderReports`.items: property `pegOffsetValue` added + - `orderReports`.items: property `preventedMatchId` added + - `orderReports`.items: property `trailingDelta` added + - `orderReports`.items: property `pegPriceType` added + - `orderReports`.items: property `preventedQuantity` added + - `orderReports`.items: property `strategyId` added + - `orderReports`.items: property `strategyType` added + - `orderReports`.items: property `pegOffsetType` added + - `orderReports`.items: property `icebergQty` added + - `orderReports`.items: property `expiryReason` added + - `orderReports`.items: property `peggedPrice` added + - `orderReports`.items: property `usedSor` added + - `orderReports`.items: property `stopPrice` added + - `orderReports`.items: item property `workingFloor` added + - `orderReports`.items: item property `trailingTime` added + - `orderReports`.items: item property `pegOffsetValue` added + - `orderReports`.items: item property `preventedMatchId` added + - `orderReports`.items: item property `trailingDelta` added + - `orderReports`.items: item property `pegPriceType` added + - `orderReports`.items: item property `preventedQuantity` added + - `orderReports`.items: item property `strategyId` added + - `orderReports`.items: item property `strategyType` added + - `orderReports`.items: item property `pegOffsetType` added + - `orderReports`.items: item property `icebergQty` added + - `orderReports`.items: item property `expiryReason` added + - `orderReports`.items: item property `peggedPrice` added + - `orderReports`.items: item property `usedSor` added + - `orderReports`.items: item property `stopPrice` added + +- Modified response for `orderListOpoco()` (`POST /api/v3/orderList/opoco`): + - `orderReports`.items: property `preventedMatchId` added + - `orderReports`.items: property `expiryReason` added + - `orderReports`.items: property `icebergQty` added + - `orderReports`.items: property `peggedPrice` added + - `orderReports`.items: property `usedSor` added + - `orderReports`.items: property `pegOffsetValue` added + - `orderReports`.items: property `trailingDelta` added + - `orderReports`.items: property `pegPriceType` added + - `orderReports`.items: property `pegOffsetType` added + - `orderReports`.items: property `workingFloor` added + - `orderReports`.items: property `strategyId` added + - `orderReports`.items: property `preventedQuantity` added + - `orderReports`.items: property `trailingTime` added + - `orderReports`.items: property `strategyType` added + - `orderReports`.items: item property `preventedMatchId` added + - `orderReports`.items: item property `expiryReason` added + - `orderReports`.items: item property `icebergQty` added + - `orderReports`.items: item property `peggedPrice` added + - `orderReports`.items: item property `usedSor` added + - `orderReports`.items: item property `pegOffsetValue` added + - `orderReports`.items: item property `trailingDelta` added + - `orderReports`.items: item property `pegPriceType` added + - `orderReports`.items: item property `pegOffsetType` added + - `orderReports`.items: item property `workingFloor` added + - `orderReports`.items: item property `strategyId` added + - `orderReports`.items: item property `preventedQuantity` added + - `orderReports`.items: item property `trailingTime` added + - `orderReports`.items: item property `strategyType` added + +- Modified response for `orderListOto()` (`POST /api/v3/orderList/oto`): + - `orderReports`.items: property `workingFloor` added + - `orderReports`.items: property `pegOffsetType` added + - `orderReports`.items: property `icebergQty` added + - `orderReports`.items: property `pegOffsetValue` added + - `orderReports`.items: property `trailingDelta` added + - `orderReports`.items: property `pegPriceType` added + - `orderReports`.items: property `stopPrice` added + - `orderReports`.items: property `peggedPrice` added + - `orderReports`.items: property `expiryReason` added + - `orderReports`.items: property `strategyType` added + - `orderReports`.items: property `preventedQuantity` added + - `orderReports`.items: property `trailingTime` added + - `orderReports`.items: property `strategyId` added + - `orderReports`.items: property `usedSor` added + - `orderReports`.items: property `preventedMatchId` added + - `orderReports`.items: item property `workingFloor` added + - `orderReports`.items: item property `pegOffsetType` added + - `orderReports`.items: item property `icebergQty` added + - `orderReports`.items: item property `pegOffsetValue` added + - `orderReports`.items: item property `trailingDelta` added + - `orderReports`.items: item property `pegPriceType` added + - `orderReports`.items: item property `stopPrice` added + - `orderReports`.items: item property `peggedPrice` added + - `orderReports`.items: item property `expiryReason` added + - `orderReports`.items: item property `strategyType` added + - `orderReports`.items: item property `preventedQuantity` added + - `orderReports`.items: item property `trailingTime` added + - `orderReports`.items: item property `strategyId` added + - `orderReports`.items: item property `usedSor` added + - `orderReports`.items: item property `preventedMatchId` added + +- Modified response for `orderListOtoco()` (`POST /api/v3/orderList/otoco`): + - `orderReports`.items: property `icebergQty` added + - `orderReports`.items: property `preventedMatchId` added + - `orderReports`.items: property `strategyId` added + - `orderReports`.items: property `strategyType` added + - `orderReports`.items: property `trailingTime` added + - `orderReports`.items: property `pegPriceType` added + - `orderReports`.items: property `workingFloor` added + - `orderReports`.items: property `peggedPrice` added + - `orderReports`.items: property `preventedQuantity` added + - `orderReports`.items: property `usedSor` added + - `orderReports`.items: property `pegOffsetType` added + - `orderReports`.items: property `pegOffsetValue` added + - `orderReports`.items: property `trailingDelta` added + - `orderReports`.items: property `expiryReason` added + - `orderReports`.items: item property `icebergQty` added + - `orderReports`.items: item property `preventedMatchId` added + - `orderReports`.items: item property `strategyId` added + - `orderReports`.items: item property `strategyType` added + - `orderReports`.items: item property `trailingTime` added + - `orderReports`.items: item property `pegPriceType` added + - `orderReports`.items: item property `workingFloor` added + - `orderReports`.items: item property `peggedPrice` added + - `orderReports`.items: item property `preventedQuantity` added + - `orderReports`.items: item property `usedSor` added + - `orderReports`.items: item property `pegOffsetType` added + - `orderReports`.items: item property `pegOffsetValue` added + - `orderReports`.items: item property `trailingDelta` added + - `orderReports`.items: item property `expiryReason` added + +- Modified response for `ticker()` (`GET /api/v3/ticker`): + - oneOf modified + +- Modified response for `ticker24hr()` (`GET /api/v3/ticker/24hr`): + - oneOf modified + +- Modified response for `tickerBookTicker()` (`GET /api/v3/ticker/bookTicker`): + - oneOf modified + +- Modified response for `tickerPrice()` (`GET /api/v3/ticker/price`): + - oneOf modified + +- Modified response for `tickerTradingDay()` (`GET /api/v3/ticker/tradingDay`): + - oneOf modified + +- Modified response for `uiKlines()` (`GET /api/v3/uiKlines`): + - items.items: oneOf added 2 schema(s) + - items.items: oneOf removed 2 schema(s) + +- Marked `orderOco()` (`POST /api/v3/order/oco`) as deprecated. + +#### WebSocket API + +- Modified parameter `cancelRestrictions`: + - enum removed: `NEW`, `PARTIALLY_FILLED` + - affected methods: + - `orderCancel()` (`order.cancel` method) + - `orderCancelReplace()` (`order.cancelReplace` method) +- Modified parameter `newOrderRespType`: + - enum removed: `MARKET`, `LIMIT` + - affected methods: + - `orderCancelReplace()` (`order.cancelReplace` method) + - `orderPlace()` (`order.place` method) + - `orderTest()` (`order.test` method) + - `orderListPlace()` (`orderList.place` method) + - `orderListPlaceOco()` (`orderList.place.oco` method) + - `orderListPlaceOpo()` (`orderList.place.opo` method) + - `orderListPlaceOpoco()` (`orderList.place.opoco` method) + - `orderListPlaceOto()` (`orderList.place.oto` method) + - `orderListPlaceOtoco()` (`orderList.place.otoco` method) + - `sorOrderPlace()` (`sor.order.place` method) + - `sorOrderTest()` (`sor.order.test` method) +- Modified parameter `pegOffsetType`: + - enum removed: `NON_REPRESENTABLE` + - affected methods: + - `orderCancelReplace()` (`order.cancelReplace` method) + - `orderPlace()` (`order.place` method) + - `orderTest()` (`order.test` method) +- Modified parameter `pegPriceType`: + - enum removed: `NON_REPRESENTABLE` + - affected methods: + - `orderCancelReplace()` (`order.cancelReplace` method) + - `orderPlace()` (`order.place` method) + - `orderTest()` (`order.test` method) +- Modified parameter `selfTradePreventionMode`: + - enum removed: `NON_REPRESENTABLE` + - affected methods: + - `orderCancelReplace()` (`order.cancelReplace` method) + - `orderPlace()` (`order.place` method) + - `orderTest()` (`order.test` method) + - `orderListPlace()` (`orderList.place` method) + - `orderListPlaceOco()` (`orderList.place.oco` method) + - `orderListPlaceOpo()` (`orderList.place.opo` method) + - `orderListPlaceOpoco()` (`orderList.place.opoco` method) + - `orderListPlaceOto()` (`orderList.place.oto` method) + - `orderListPlaceOtoco()` (`orderList.place.otoco` method) + - `sorOrderPlace()` (`sor.order.place` method) + - `sorOrderTest()` (`sor.order.test` method) +- Modified parameter `symbolStatus`: + - enum removed: `END_OF_DAY`, `NON_REPRESENTABLE` + - affected methods: + - `depth()` (`depth` method) + - `exchangeInfo()` (`exchangeInfo` method) + - `executionRules()` (`executionRules` method) + - `ticker()` (`ticker` method) + - `ticker24hr()` (`ticker.24hr` method) + - `tickerBook()` (`ticker.book` method) + - `tickerPrice()` (`ticker.price` method) + - `tickerTradingDay()` (`ticker.tradingDay` method) +- Modified parameter `symbolStatus`: + - enum removed: `END_OF_DAY`, `NON_REPRESENTABLE` + - affected methods: + - `referencePriceCalculation()` (`referencePrice.calculation` method) +- Modified parameter `timeInForce`: + - enum removed: `NON_REPRESENTABLE` + - affected methods: + - `orderCancelReplace()` (`order.cancelReplace` method) + - `orderPlace()` (`order.place` method) + - `orderTest()` (`order.test` method) + - `sorOrderPlace()` (`sor.order.place` method) + - `sorOrderTest()` (`sor.order.test` method) +- Modified parameter `type`: + - enum removed: `NON_REPRESENTABLE` + - affected methods: + - `orderCancelReplace()` (`order.cancelReplace` method) + - `orderPlace()` (`order.place` method) + - `orderTest()` (`order.test` method) +- Modified parameter `type`: + - enum removed: `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`, `LIMIT_MAKER`, `NON_REPRESENTABLE` + - affected methods: + - `sorOrderPlace()` (`sor.order.place` method) + - `sorOrderTest()` (`sor.order.test` method) +- Modified parameter `windowSize`: + - enum added: `7d` + - affected methods: + - `ticker()` (`ticker` method) +- Modified response for `allOrders()` (`allOrders` method): + - `result`.items: property `pegOffsetType` added + - `result`.items: property `pegPriceType` added + - `result`.items: property `trailingTime` added + - `result`.items: property `expiryReason` added + - `result`.items: property `strategyType` added + - `result`.items: property `strategyId` added + - `result`.items: property `workingFloor` added + - `result`.items: property `pegOffsetValue` added + - `result`.items: property `peggedPrice` added + - `result`.items: property `trailingDelta` added + - `result`.items: property `usedSor` added + - `result`.items: item property `pegOffsetType` added + - `result`.items: item property `pegPriceType` added + - `result`.items: item property `trailingTime` added + - `result`.items: item property `expiryReason` added + - `result`.items: item property `strategyType` added + - `result`.items: item property `strategyId` added + - `result`.items: item property `workingFloor` added + - `result`.items: item property `pegOffsetValue` added + - `result`.items: item property `peggedPrice` added + - `result`.items: item property `trailingDelta` added + - `result`.items: item property `usedSor` added + +- Modified response for `depth()` (`depth` method): + - `result`.`asks`.items: minItems `0` → `2` + - `result`.`asks`.items: maxItems `null` → `2` + - `result`.`bids`.items: minItems `0` → `2` + - `result`.`bids`.items: maxItems `null` → `2` + +- Modified response for `exchangeInfo()` (`exchangeInfo` method): + - property `sors` added + - property `symbols` added + - property `timezone` added + - property `exchangeFilters` added + - property `serverTime` added + - property `status` deleted + - property `id` deleted + - property `result` deleted + +- Modified response for `klines()` (`klines` method): + - `result`.items: minItems `0` → `12` + - `result`.items: maxItems `null` → `12` + - `result`.items.items: oneOf added 2 schema(s) + - `result`.items.items: oneOf removed 2 schema(s) + +- Modified response for `myFilters()` (`myFilters` method): + - property `assetFilters` added + - property `exchangeFilters` added + - property `symbolFilters` added + - property `id` deleted + - property `result` deleted + - property `status` deleted + +- Modified response for `openOrdersCancelAll()` (`openOrders.cancelAll` method): + - `result`.items: property `workingFloor` added + - `result`.items: property `preventedMatchId` added + - `result`.items: property `preventedQuantity` added + - `result`.items: property `usedSor` added + - `result`.items: property `pegPriceType` added + - `result`.items: property `peggedPrice` added + - `result`.items: property `expiryReason` added + - `result`.items: property `pegOffsetValue` added + - `result`.items: property `pegOffsetType` added + - `result`.items.`orderReports`.items: property `icebergQty` added + - `result`.items.`orderReports`.items: property `pegOffsetValue` added + - `result`.items.`orderReports`.items: property `pegPriceType` added + - `result`.items.`orderReports`.items: property `workingFloor` added + - `result`.items.`orderReports`.items: property `preventedMatchId` added + - `result`.items.`orderReports`.items: property `trailingDelta` added + - `result`.items.`orderReports`.items: property `expiryReason` added + - `result`.items.`orderReports`.items: property `pegOffsetType` added + - `result`.items.`orderReports`.items: property `peggedPrice` added + - `result`.items.`orderReports`.items: property `preventedQuantity` added + - `result`.items.`orderReports`.items: property `strategyId` added + - `result`.items.`orderReports`.items: property `strategyType` added + - `result`.items.`orderReports`.items: property `trailingTime` added + - `result`.items.`orderReports`.items: property `usedSor` added + - `result`.items.`orderReports`.items: item property `icebergQty` added + - `result`.items.`orderReports`.items: item property `pegOffsetValue` added + - `result`.items.`orderReports`.items: item property `pegPriceType` added + - `result`.items.`orderReports`.items: item property `workingFloor` added + - `result`.items.`orderReports`.items: item property `preventedMatchId` added + - `result`.items.`orderReports`.items: item property `trailingDelta` added + - `result`.items.`orderReports`.items: item property `expiryReason` added + - `result`.items.`orderReports`.items: item property `pegOffsetType` added + - `result`.items.`orderReports`.items: item property `peggedPrice` added + - `result`.items.`orderReports`.items: item property `preventedQuantity` added + - `result`.items.`orderReports`.items: item property `strategyId` added + - `result`.items.`orderReports`.items: item property `strategyType` added + - `result`.items.`orderReports`.items: item property `trailingTime` added + - `result`.items.`orderReports`.items: item property `usedSor` added + - `result`.items: item property `workingFloor` added + - `result`.items: item property `preventedMatchId` added + - `result`.items: item property `preventedQuantity` added + - `result`.items: item property `usedSor` added + - `result`.items: item property `pegPriceType` added + - `result`.items: item property `peggedPrice` added + - `result`.items: item property `expiryReason` added + - `result`.items: item property `pegOffsetValue` added + - `result`.items: item property `pegOffsetType` added + - `result`.items.`orderReports`.items: property `icebergQty` added + - `result`.items.`orderReports`.items: property `pegOffsetValue` added + - `result`.items.`orderReports`.items: property `pegPriceType` added + - `result`.items.`orderReports`.items: property `workingFloor` added + - `result`.items.`orderReports`.items: property `preventedMatchId` added + - `result`.items.`orderReports`.items: property `trailingDelta` added + - `result`.items.`orderReports`.items: property `expiryReason` added + - `result`.items.`orderReports`.items: property `pegOffsetType` added + - `result`.items.`orderReports`.items: property `peggedPrice` added + - `result`.items.`orderReports`.items: property `preventedQuantity` added + - `result`.items.`orderReports`.items: property `strategyId` added + - `result`.items.`orderReports`.items: property `strategyType` added + - `result`.items.`orderReports`.items: property `trailingTime` added + - `result`.items.`orderReports`.items: property `usedSor` added + - `result`.items.`orderReports`.items: item property `icebergQty` added + - `result`.items.`orderReports`.items: item property `pegOffsetValue` added + - `result`.items.`orderReports`.items: item property `pegPriceType` added + - `result`.items.`orderReports`.items: item property `workingFloor` added + - `result`.items.`orderReports`.items: item property `preventedMatchId` added + - `result`.items.`orderReports`.items: item property `trailingDelta` added + - `result`.items.`orderReports`.items: item property `expiryReason` added + - `result`.items.`orderReports`.items: item property `pegOffsetType` added + - `result`.items.`orderReports`.items: item property `peggedPrice` added + - `result`.items.`orderReports`.items: item property `preventedQuantity` added + - `result`.items.`orderReports`.items: item property `strategyId` added + - `result`.items.`orderReports`.items: item property `strategyType` added + - `result`.items.`orderReports`.items: item property `trailingTime` added + - `result`.items.`orderReports`.items: item property `usedSor` added + +- Modified response for `openOrdersStatus()` (`openOrders.status` method): + - `result`.items: property `strategyId` added + - `result`.items: property `usedSor` added + - `result`.items: property `strategyType` added + - `result`.items: property `pegOffsetType` added + - `result`.items: property `preventedMatchId` added + - `result`.items: property `trailingDelta` added + - `result`.items: property `preventedQuantity` added + - `result`.items: property `trailingTime` added + - `result`.items: property `pegPriceType` added + - `result`.items: property `expiryReason` added + - `result`.items: property `peggedPrice` added + - `result`.items: property `workingFloor` added + - `result`.items: property `pegOffsetValue` added + - `result`.items: item property `strategyId` added + - `result`.items: item property `usedSor` added + - `result`.items: item property `strategyType` added + - `result`.items: item property `pegOffsetType` added + - `result`.items: item property `preventedMatchId` added + - `result`.items: item property `trailingDelta` added + - `result`.items: item property `preventedQuantity` added + - `result`.items: item property `trailingTime` added + - `result`.items: item property `pegPriceType` added + - `result`.items: item property `expiryReason` added + - `result`.items: item property `peggedPrice` added + - `result`.items: item property `workingFloor` added + - `result`.items: item property `pegOffsetValue` added + +- Modified response for `orderAmendKeepPriority()` (`order.amend.keepPriority` method): + - `result`.`amendedOrder`: property `trailingTime` added + - `result`.`amendedOrder`: property `peggedPrice` added + - `result`.`amendedOrder`: property `stopPrice` added + - `result`.`amendedOrder`: property `usedSor` added + - `result`.`amendedOrder`: property `preventedQuantity` added + - `result`.`amendedOrder`: property `trailingDelta` added + - `result`.`amendedOrder`: property `preventedMatchId` added + - `result`.`amendedOrder`: property `strategyType` added + - `result`.`amendedOrder`: property `workingFloor` added + - `result`.`amendedOrder`: property `expiryReason` added + - `result`.`amendedOrder`: property `pegPriceType` added + - `result`.`amendedOrder`: property `strategyId` added + - `result`.`amendedOrder`: property `pegOffsetType` added + - `result`.`amendedOrder`: property `icebergQty` added + - `result`.`amendedOrder`: property `pegOffsetValue` added + +- Modified response for `orderCancel()` (`order.cancel` method): + - `result`: property `workingFloor` added + - `result`: property `usedSor` added + - `result`: property `trailingTime` added + - `result`: property `pegOffsetType` added + - `result`: property `pegPriceType` added + - `result`: property `peggedPrice` added + - `result`: property `expiryReason` added + - `result`: property `preventedMatchId` added + - `result`: property `pegOffsetValue` added + - `result`: property `preventedQuantity` added + - `result`.`orderReports`.items: property `peggedPrice` added + - `result`.`orderReports`.items: property `pegPriceType` added + - `result`.`orderReports`.items: property `workingFloor` added + - `result`.`orderReports`.items: property `icebergQty` added + - `result`.`orderReports`.items: property `pegOffsetType` added + - `result`.`orderReports`.items: property `strategyType` added + - `result`.`orderReports`.items: property `strategyId` added + - `result`.`orderReports`.items: property `preventedMatchId` added + - `result`.`orderReports`.items: property `preventedQuantity` added + - `result`.`orderReports`.items: property `expiryReason` added + - `result`.`orderReports`.items: property `pegOffsetValue` added + - `result`.`orderReports`.items: property `trailingDelta` added + - `result`.`orderReports`.items: property `trailingTime` added + - `result`.`orderReports`.items: property `usedSor` added + - `result`.`orderReports`.items: item property `peggedPrice` added + - `result`.`orderReports`.items: item property `pegPriceType` added + - `result`.`orderReports`.items: item property `workingFloor` added + - `result`.`orderReports`.items: item property `icebergQty` added + - `result`.`orderReports`.items: item property `pegOffsetType` added + - `result`.`orderReports`.items: item property `strategyType` added + - `result`.`orderReports`.items: item property `strategyId` added + - `result`.`orderReports`.items: item property `preventedMatchId` added + - `result`.`orderReports`.items: item property `preventedQuantity` added + - `result`.`orderReports`.items: item property `expiryReason` added + - `result`.`orderReports`.items: item property `pegOffsetValue` added + - `result`.`orderReports`.items: item property `trailingDelta` added + - `result`.`orderReports`.items: item property `trailingTime` added + - `result`.`orderReports`.items: item property `usedSor` added + +- Modified response for `orderCancelReplace()` (`order.cancelReplace` method): + - `result`.`cancelResponse`: property `pegPriceType` added + - `result`.`cancelResponse`: property `stopPrice` added + - `result`.`cancelResponse`: property `strategyType` added + - `result`.`cancelResponse`: property `workingFloor` added + - `result`.`cancelResponse`: property `expiryReason` added + - `result`.`cancelResponse`: property `pegOffsetType` added + - `result`.`cancelResponse`: property `peggedPrice` added + - `result`.`cancelResponse`: property `preventedMatchId` added + - `result`.`cancelResponse`: property `pegOffsetValue` added + - `result`.`cancelResponse`: property `trailingTime` added + - `result`.`cancelResponse`: property `usedSor` added + - `result`.`cancelResponse`: property `strategyId` added + - `result`.`cancelResponse`: property `trailingDelta` added + - `result`.`cancelResponse`: property `icebergQty` added + - `result`.`cancelResponse`: property `preventedQuantity` added + - `result`.`newOrderResponse`: property `icebergQty` added + - `result`.`newOrderResponse`: property `peggedPrice` added + - `result`.`newOrderResponse`: property `trailingTime` added + - `result`.`newOrderResponse`: property `pegOffsetType` added + - `result`.`newOrderResponse`: property `strategyType` added + - `result`.`newOrderResponse`: property `pegPriceType` added + - `result`.`newOrderResponse`: property `usedSor` added + - `result`.`newOrderResponse`: property `preventedMatchId` added + - `result`.`newOrderResponse`: property `preventedQuantity` added + - `result`.`newOrderResponse`: property `pegOffsetValue` added + - `result`.`newOrderResponse`: property `strategyId` added + - `result`.`newOrderResponse`: property `stopPrice` added + - `result`.`newOrderResponse`: property `trailingDelta` added + - `result`.`newOrderResponse`: property `expiryReason` added + - `result`.`newOrderResponse`: property `workingFloor` added + +- Modified response for `orderPlace()` (`order.place` method): + - `result`: property `pegOffsetValue` added + - `result`: property `strategyId` added + - `result`: property `trailingDelta` added + - `result`: property `stopPrice` added + - `result`: property `pegOffsetType` added + - `result`: property `pegPriceType` added + - `result`: property `trailingTime` added + - `result`: property `preventedMatchId` added + - `result`: property `strategyType` added + - `result`: property `workingFloor` added + - `result`: property `usedSor` added + - `result`: property `expiryReason` added + - `result`: property `icebergQty` added + - `result`: property `preventedQuantity` added + - `result`: property `peggedPrice` added + +- Modified response for `orderStatus()` (`order.status` method): + - `result`: property `peggedPrice` added + - `result`: property `pegOffsetType` added + - `result`: property `pegOffsetValue` added + - `result`: property `expiryReason` added + - `result`: property `usedSor` added + - `result`: property `pegPriceType` added + - `result`: property `workingFloor` added + +- Modified response for `orderListCancel()` (`orderList.cancel` method): + - `result`.`orderReports`.items: property `preventedQuantity` added + - `result`.`orderReports`.items: property `strategyType` added + - `result`.`orderReports`.items: property `icebergQty` added + - `result`.`orderReports`.items: property `pegOffsetType` added + - `result`.`orderReports`.items: property `usedSor` added + - `result`.`orderReports`.items: property `pegPriceType` added + - `result`.`orderReports`.items: property `workingFloor` added + - `result`.`orderReports`.items: property `pegOffsetValue` added + - `result`.`orderReports`.items: property `trailingDelta` added + - `result`.`orderReports`.items: property `expiryReason` added + - `result`.`orderReports`.items: property `strategyId` added + - `result`.`orderReports`.items: property `trailingTime` added + - `result`.`orderReports`.items: property `peggedPrice` added + - `result`.`orderReports`.items: property `preventedMatchId` added + - `result`.`orderReports`.items: item property `preventedQuantity` added + - `result`.`orderReports`.items: item property `strategyType` added + - `result`.`orderReports`.items: item property `icebergQty` added + - `result`.`orderReports`.items: item property `pegOffsetType` added + - `result`.`orderReports`.items: item property `usedSor` added + - `result`.`orderReports`.items: item property `pegPriceType` added + - `result`.`orderReports`.items: item property `workingFloor` added + - `result`.`orderReports`.items: item property `pegOffsetValue` added + - `result`.`orderReports`.items: item property `trailingDelta` added + - `result`.`orderReports`.items: item property `expiryReason` added + - `result`.`orderReports`.items: item property `strategyId` added + - `result`.`orderReports`.items: item property `trailingTime` added + - `result`.`orderReports`.items: item property `peggedPrice` added + - `result`.`orderReports`.items: item property `preventedMatchId` added + +- Modified response for `orderListPlace()` (`orderList.place` method): + - `result`.`orderReports`.items: property `peggedPrice` added + - `result`.`orderReports`.items: property `pegOffsetType` added + - `result`.`orderReports`.items: property `preventedQuantity` added + - `result`.`orderReports`.items: property `icebergQty` added + - `result`.`orderReports`.items: property `pegOffsetValue` added + - `result`.`orderReports`.items: property `preventedMatchId` added + - `result`.`orderReports`.items: property `expiryReason` added + - `result`.`orderReports`.items: property `trailingDelta` added + - `result`.`orderReports`.items: property `usedSor` added + - `result`.`orderReports`.items: property `strategyId` added + - `result`.`orderReports`.items: property `strategyType` added + - `result`.`orderReports`.items: property `trailingTime` added + - `result`.`orderReports`.items: property `pegPriceType` added + - `result`.`orderReports`.items: property `workingFloor` added + - `result`.`orderReports`.items: item property `peggedPrice` added + - `result`.`orderReports`.items: item property `pegOffsetType` added + - `result`.`orderReports`.items: item property `preventedQuantity` added + - `result`.`orderReports`.items: item property `icebergQty` added + - `result`.`orderReports`.items: item property `pegOffsetValue` added + - `result`.`orderReports`.items: item property `preventedMatchId` added + - `result`.`orderReports`.items: item property `expiryReason` added + - `result`.`orderReports`.items: item property `trailingDelta` added + - `result`.`orderReports`.items: item property `usedSor` added + - `result`.`orderReports`.items: item property `strategyId` added + - `result`.`orderReports`.items: item property `strategyType` added + - `result`.`orderReports`.items: item property `trailingTime` added + - `result`.`orderReports`.items: item property `pegPriceType` added + - `result`.`orderReports`.items: item property `workingFloor` added + +- Modified response for `orderListPlaceOco()` (`orderList.place.oco` method): + - `result`.`orderReports`.items: property `pegOffsetValue` added + - `result`.`orderReports`.items: property `preventedMatchId` added + - `result`.`orderReports`.items: property `pegPriceType` added + - `result`.`orderReports`.items: property `preventedQuantity` added + - `result`.`orderReports`.items: property `trailingTime` added + - `result`.`orderReports`.items: property `icebergQty` added + - `result`.`orderReports`.items: property `strategyType` added + - `result`.`orderReports`.items: property `peggedPrice` added + - `result`.`orderReports`.items: property `usedSor` added + - `result`.`orderReports`.items: property `workingFloor` added + - `result`.`orderReports`.items: property `trailingDelta` added + - `result`.`orderReports`.items: property `strategyId` added + - `result`.`orderReports`.items: property `pegOffsetType` added + - `result`.`orderReports`.items: property `expiryReason` added + - `result`.`orderReports`.items: item property `pegOffsetValue` added + - `result`.`orderReports`.items: item property `preventedMatchId` added + - `result`.`orderReports`.items: item property `pegPriceType` added + - `result`.`orderReports`.items: item property `preventedQuantity` added + - `result`.`orderReports`.items: item property `trailingTime` added + - `result`.`orderReports`.items: item property `icebergQty` added + - `result`.`orderReports`.items: item property `strategyType` added + - `result`.`orderReports`.items: item property `peggedPrice` added + - `result`.`orderReports`.items: item property `usedSor` added + - `result`.`orderReports`.items: item property `workingFloor` added + - `result`.`orderReports`.items: item property `trailingDelta` added + - `result`.`orderReports`.items: item property `strategyId` added + - `result`.`orderReports`.items: item property `pegOffsetType` added + - `result`.`orderReports`.items: item property `expiryReason` added + +- Modified response for `orderListPlaceOpo()` (`orderList.place.opo` method): + - `result`.`orderReports`.items: property `pegOffsetValue` added + - `result`.`orderReports`.items: property `icebergQty` added + - `result`.`orderReports`.items: property `stopPrice` added + - `result`.`orderReports`.items: property `workingFloor` added + - `result`.`orderReports`.items: property `trailingTime` added + - `result`.`orderReports`.items: property `preventedMatchId` added + - `result`.`orderReports`.items: property `peggedPrice` added + - `result`.`orderReports`.items: property `strategyId` added + - `result`.`orderReports`.items: property `preventedQuantity` added + - `result`.`orderReports`.items: property `usedSor` added + - `result`.`orderReports`.items: property `strategyType` added + - `result`.`orderReports`.items: property `expiryReason` added + - `result`.`orderReports`.items: property `pegOffsetType` added + - `result`.`orderReports`.items: property `pegPriceType` added + - `result`.`orderReports`.items: property `trailingDelta` added + - `result`.`orderReports`.items: item property `pegOffsetValue` added + - `result`.`orderReports`.items: item property `icebergQty` added + - `result`.`orderReports`.items: item property `stopPrice` added + - `result`.`orderReports`.items: item property `workingFloor` added + - `result`.`orderReports`.items: item property `trailingTime` added + - `result`.`orderReports`.items: item property `preventedMatchId` added + - `result`.`orderReports`.items: item property `peggedPrice` added + - `result`.`orderReports`.items: item property `strategyId` added + - `result`.`orderReports`.items: item property `preventedQuantity` added + - `result`.`orderReports`.items: item property `usedSor` added + - `result`.`orderReports`.items: item property `strategyType` added + - `result`.`orderReports`.items: item property `expiryReason` added + - `result`.`orderReports`.items: item property `pegOffsetType` added + - `result`.`orderReports`.items: item property `pegPriceType` added + - `result`.`orderReports`.items: item property `trailingDelta` added + +- Modified response for `orderListPlaceOpoco()` (`orderList.place.opoco` method): + - `result`.`orderReports`.items: property `strategyId` added + - `result`.`orderReports`.items: property `trailingDelta` added + - `result`.`orderReports`.items: property `peggedPrice` added + - `result`.`orderReports`.items: property `icebergQty` added + - `result`.`orderReports`.items: property `pegOffsetValue` added + - `result`.`orderReports`.items: property `pegPriceType` added + - `result`.`orderReports`.items: property `strategyType` added + - `result`.`orderReports`.items: property `trailingTime` added + - `result`.`orderReports`.items: property `expiryReason` added + - `result`.`orderReports`.items: property `preventedQuantity` added + - `result`.`orderReports`.items: property `workingFloor` added + - `result`.`orderReports`.items: property `preventedMatchId` added + - `result`.`orderReports`.items: property `usedSor` added + - `result`.`orderReports`.items: property `pegOffsetType` added + - `result`.`orderReports`.items: item property `strategyId` added + - `result`.`orderReports`.items: item property `trailingDelta` added + - `result`.`orderReports`.items: item property `peggedPrice` added + - `result`.`orderReports`.items: item property `icebergQty` added + - `result`.`orderReports`.items: item property `pegOffsetValue` added + - `result`.`orderReports`.items: item property `pegPriceType` added + - `result`.`orderReports`.items: item property `strategyType` added + - `result`.`orderReports`.items: item property `trailingTime` added + - `result`.`orderReports`.items: item property `expiryReason` added + - `result`.`orderReports`.items: item property `preventedQuantity` added + - `result`.`orderReports`.items: item property `workingFloor` added + - `result`.`orderReports`.items: item property `preventedMatchId` added + - `result`.`orderReports`.items: item property `usedSor` added + - `result`.`orderReports`.items: item property `pegOffsetType` added + +- Modified response for `orderListPlaceOto()` (`orderList.place.oto` method): + - `result`.`orderReports`.items: property `preventedQuantity` added + - `result`.`orderReports`.items: property `stopPrice` added + - `result`.`orderReports`.items: property `strategyType` added + - `result`.`orderReports`.items: property `icebergQty` added + - `result`.`orderReports`.items: property `pegOffsetType` added + - `result`.`orderReports`.items: property `peggedPrice` added + - `result`.`orderReports`.items: property `workingFloor` added + - `result`.`orderReports`.items: property `pegOffsetValue` added + - `result`.`orderReports`.items: property `preventedMatchId` added + - `result`.`orderReports`.items: property `strategyId` added + - `result`.`orderReports`.items: property `trailingDelta` added + - `result`.`orderReports`.items: property `trailingTime` added + - `result`.`orderReports`.items: property `usedSor` added + - `result`.`orderReports`.items: property `pegPriceType` added + - `result`.`orderReports`.items: property `expiryReason` added + - `result`.`orderReports`.items: item property `preventedQuantity` added + - `result`.`orderReports`.items: item property `stopPrice` added + - `result`.`orderReports`.items: item property `strategyType` added + - `result`.`orderReports`.items: item property `icebergQty` added + - `result`.`orderReports`.items: item property `pegOffsetType` added + - `result`.`orderReports`.items: item property `peggedPrice` added + - `result`.`orderReports`.items: item property `workingFloor` added + - `result`.`orderReports`.items: item property `pegOffsetValue` added + - `result`.`orderReports`.items: item property `preventedMatchId` added + - `result`.`orderReports`.items: item property `strategyId` added + - `result`.`orderReports`.items: item property `trailingDelta` added + - `result`.`orderReports`.items: item property `trailingTime` added + - `result`.`orderReports`.items: item property `usedSor` added + - `result`.`orderReports`.items: item property `pegPriceType` added + - `result`.`orderReports`.items: item property `expiryReason` added + +- Modified response for `orderListPlaceOtoco()` (`orderList.place.otoco` method): + - `result`.`orderReports`.items: property `pegOffsetType` added + - `result`.`orderReports`.items: property `workingFloor` added + - `result`.`orderReports`.items: property `icebergQty` added + - `result`.`orderReports`.items: property `strategyId` added + - `result`.`orderReports`.items: property `pegPriceType` added + - `result`.`orderReports`.items: property `expiryReason` added + - `result`.`orderReports`.items: property `pegOffsetValue` added + - `result`.`orderReports`.items: property `peggedPrice` added + - `result`.`orderReports`.items: property `strategyType` added + - `result`.`orderReports`.items: property `trailingDelta` added + - `result`.`orderReports`.items: property `usedSor` added + - `result`.`orderReports`.items: property `preventedQuantity` added + - `result`.`orderReports`.items: property `preventedMatchId` added + - `result`.`orderReports`.items: property `trailingTime` added + - `result`.`orderReports`.items: item property `pegOffsetType` added + - `result`.`orderReports`.items: item property `workingFloor` added + - `result`.`orderReports`.items: item property `icebergQty` added + - `result`.`orderReports`.items: item property `strategyId` added + - `result`.`orderReports`.items: item property `pegPriceType` added + - `result`.`orderReports`.items: item property `expiryReason` added + - `result`.`orderReports`.items: item property `pegOffsetValue` added + - `result`.`orderReports`.items: item property `peggedPrice` added + - `result`.`orderReports`.items: item property `strategyType` added + - `result`.`orderReports`.items: item property `trailingDelta` added + - `result`.`orderReports`.items: item property `usedSor` added + - `result`.`orderReports`.items: item property `preventedQuantity` added + - `result`.`orderReports`.items: item property `preventedMatchId` added + - `result`.`orderReports`.items: item property `trailingTime` added + +- Modified response for `referencePrice()` (`referencePrice` method): + - property `rateLimits` added + +- Modified response for `referencePriceCalculation()` (`referencePrice.calculation` method): + - property `rateLimits` added + +- Modified response for `sorOrderPlace()` (`sor.order.place` method): + - `result`.items: property `preventedQuantity` added + - `result`.items: property `strategyId` added + - `result`.items: property `pegOffsetValue` added + - `result`.items: property `peggedPrice` added + - `result`.items: property `icebergQty` added + - `result`.items: property `pegPriceType` added + - `result`.items: property `trailingTime` added + - `result`.items: property `trailingDelta` added + - `result`.items: property `expiryReason` added + - `result`.items: property `preventedMatchId` added + - `result`.items: property `pegOffsetType` added + - `result`.items: property `stopPrice` added + - `result`.items: property `strategyType` added + - `result`.items: item property `preventedQuantity` added + - `result`.items: item property `strategyId` added + - `result`.items: item property `pegOffsetValue` added + - `result`.items: item property `peggedPrice` added + - `result`.items: item property `icebergQty` added + - `result`.items: item property `pegPriceType` added + - `result`.items: item property `trailingTime` added + - `result`.items: item property `trailingDelta` added + - `result`.items: item property `expiryReason` added + - `result`.items: item property `preventedMatchId` added + - `result`.items: item property `pegOffsetType` added + - `result`.items: item property `stopPrice` added + - `result`.items: item property `strategyType` added + +- Modified response for `ticker()` (`ticker` method): + - oneOf modified + +- Modified response for `ticker24hr()` (`ticker.24hr` method): + - oneOf modified + +- Modified response for `tickerBook()` (`ticker.book` method): + - oneOf modified + +- Modified response for `tickerPrice()` (`ticker.price` method): + - oneOf modified + +- Modified response for `uiKlines()` (`uiKlines` method): + - `result`.items: minItems `0` → `12` + - `result`.items: maxItems `null` → `12` + - `result`.items.items: oneOf added 2 schema(s) + - `result`.items.items: oneOf removed 2 schema(s) + +- Marked `orderListPlace()` (`orderList.place` method) as deprecated. + +#### WebSocket Streams + +- Modified parameter `updateSpeed`: + - enum added: `100ms` + - affected methods: + - `partialBookDepth()` (`@depth@` stream) + - `diffBookDepth()` (`@depth@` stream) +- Modified response for `partialBookDepth()` (`@depth@` stream): + - `asks`.items: minItems `0` → `2` + - `asks`.items: maxItems `null` → `2` + - `bids`.items: minItems `0` → `2` + - `bids`.items: maxItems `null` → `2` + +- Modified response for `diffBookDepth()` (`@depth@` stream): + - `a`.items: minItems `0` → `2` + - `a`.items: maxItems `null` → `2` + - `b`.items: minItems `0` → `2` + - `b`.items: maxItems `null` → `2` + ## 10.1.1 - 2026-05-04 - Added stop method for WebSocket diff --git a/clients/spot/docs/AccountApi.md b/clients/spot/docs/AccountApi.md index 9eb5b1d2f..01a5110e9 100644 --- a/clients/spot/docs/AccountApi.md +++ b/clients/spot/docs/AccountApi.md @@ -4,29 +4,29 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**accountCommission**](AccountApi.md#accountCommission) | **POST** /account.commission | WebSocket Account Commission Rates | -| [**accountRateLimitsOrders**](AccountApi.md#accountRateLimitsOrders) | **POST** /account.rateLimits.orders | WebSocket Unfilled Order Count | -| [**accountStatus**](AccountApi.md#accountStatus) | **POST** /account.status | WebSocket Account information | -| [**allOrderLists**](AccountApi.md#allOrderLists) | **POST** /allOrderLists | WebSocket Account order list history | -| [**allOrders**](AccountApi.md#allOrders) | **POST** /allOrders | WebSocket Account order history | -| [**myAllocations**](AccountApi.md#myAllocations) | **POST** /myAllocations | WebSocket Account allocations | -| [**myFilters**](AccountApi.md#myFilters) | **POST** /myFilters | WebSocket Query Relevant Filters | -| [**myPreventedMatches**](AccountApi.md#myPreventedMatches) | **POST** /myPreventedMatches | WebSocket Account prevented matches | -| [**myTrades**](AccountApi.md#myTrades) | **POST** /myTrades | WebSocket Account trade history | -| [**openOrderListsStatus**](AccountApi.md#openOrderListsStatus) | **POST** /openOrderLists.status | WebSocket Current open Order lists | -| [**openOrdersStatus**](AccountApi.md#openOrdersStatus) | **POST** /openOrders.status | WebSocket Current open orders | -| [**orderAmendments**](AccountApi.md#orderAmendments) | **POST** /order.amendments | WebSocket Query Order Amendments | -| [**orderListStatus**](AccountApi.md#orderListStatus) | **POST** /orderList.status | WebSocket Query Order list | -| [**orderStatus**](AccountApi.md#orderStatus) | **POST** /order.status | WebSocket Query order | +| [**accountCommission**](AccountApi.md#accountCommission) | **POST** /account.commission | Account Commission Rates (USER_DATA) | +| [**accountRateLimitsOrders**](AccountApi.md#accountRateLimitsOrders) | **POST** /account.rateLimits.orders | Unfilled Order Count (USER_DATA) | +| [**accountStatus**](AccountApi.md#accountStatus) | **POST** /account.status | Account information (USER_DATA) | +| [**allOrderLists**](AccountApi.md#allOrderLists) | **POST** /allOrderLists | Account order list history (USER_DATA) | +| [**allOrders**](AccountApi.md#allOrders) | **POST** /allOrders | Account order history (USER_DATA) | +| [**myAllocations**](AccountApi.md#myAllocations) | **POST** /myAllocations | Account allocations (USER_DATA) | +| [**myFilters**](AccountApi.md#myFilters) | **POST** /myFilters | Query Relevant Filters (USER_DATA) | +| [**myPreventedMatches**](AccountApi.md#myPreventedMatches) | **POST** /myPreventedMatches | Account prevented matches (USER_DATA) | +| [**myTrades**](AccountApi.md#myTrades) | **POST** /myTrades | Account trade history (USER_DATA) | +| [**openOrderListsStatus**](AccountApi.md#openOrderListsStatus) | **POST** /openOrderLists.status | Current open Order lists (USER_DATA) | +| [**openOrdersStatus**](AccountApi.md#openOrdersStatus) | **POST** /openOrders.status | Current open orders (USER_DATA) | +| [**orderAmendments**](AccountApi.md#orderAmendments) | **POST** /order.amendments | Query Order Amendments (USER_DATA) | +| [**orderListStatus**](AccountApi.md#orderListStatus) | **POST** /orderList.status | Query Order list (USER_DATA) | +| [**orderStatus**](AccountApi.md#orderStatus) | **POST** /order.status | Query order (USER_DATA) | # **accountCommission** > AccountCommissionResponse accountCommission(accountCommissionRequest) -WebSocket Account Commission Rates +Account Commission Rates (USER_DATA) -Get current account commission rates. Weight: 20 +Get current account commission rates. Weight(IP): 20 Security Type: USER_DATA Notes: **Data Source:** Database ### Example ```java @@ -86,9 +86,9 @@ No authorization required # **accountRateLimitsOrders** > AccountRateLimitsOrdersResponse accountRateLimitsOrders(accountRateLimitsOrdersRequest) -WebSocket Unfilled Order Count +Unfilled Order Count (USER_DATA) -Query your current unfilled order count for all intervals. Weight: 40 +Query your current unfilled order count for all intervals. Weight(IP): 40 Security Type: USER_DATA Notes: **Data Source:** Memory ### Example ```java @@ -148,9 +148,9 @@ No authorization required # **accountStatus** > AccountStatusResponse accountStatus(accountStatusRequest) -WebSocket Account information +Account information (USER_DATA) -Query information about your account. Weight: 20 +Query information about your account. Weight(IP): 20 Security Type: USER_DATA Notes: **Data Source:** Memory => Database ### Example ```java @@ -210,9 +210,9 @@ No authorization required # **allOrderLists** > AllOrderListsResponse allOrderLists(allOrderListsRequest) -WebSocket Account order list history +Account order list history (USER_DATA) -Query information about all your order lists, filtered by time range. Weight: 20 +Query information about all your order lists, filtered by time range. Weight(IP): 20 Security Type: USER_DATA Notes: **Data Source:** Database Notes: * If `startTime` and/or `endTime` are specified, `fromId` is ignored. Order lists are filtered by `transactionTime` of the last order list execution status update. * If `fromId` is specified, return order lists with order list ID >= `fromId`. * If no condition is specified, the most recent order lists are returned. * The time between `startTime` and `endTime` can't be longer than 24 hours. ### Example ```java @@ -272,9 +272,9 @@ No authorization required # **allOrders** > AllOrdersResponse allOrders(allOrdersRequest) -WebSocket Account order history +Account order history (USER_DATA) -Query information about all your orders – active, canceled, filled – filtered by time range. Weight: 20 +Query information about all your orders – active, canceled, filled – filtered by time range. Weight(IP): 20 Security Type: USER_DATA Notes: **Data Source:** Database Notes: * If `startTime` and/or `endTime` are specified, `orderId` is ignored. Orders are filtered by `time` of the last execution status update. * If `orderId` is specified, return orders with order ID >= `orderId`. * If no condition is specified, the most recent orders are returned. * For some historical orders the `cummulativeQuoteQty` response field may be negative, meaning the data is not available at this time. * The time between `startTime` and `endTime` can't be longer than 24 hours. ### Example ```java @@ -334,9 +334,9 @@ No authorization required # **myAllocations** > MyAllocationsResponse myAllocations(myAllocationsRequest) -WebSocket Account allocations +Account allocations (USER_DATA) -Retrieves allocations resulting from SOR order placement. Weight: 20 +Retrieves allocations resulting from SOR order placement. Weight(IP): 20 Security Type: USER_DATA Notes: **Data Source:** Database Supported parameter combinations: Parameters | Response | ------------------------------------------- | -------- | `symbol` | allocations from oldest to newest | `symbol` + `startTime` | oldest allocations since `startTime` | `symbol` + `endTime` | newest allocations until `endTime` | `symbol` + `startTime` + `endTime` | allocations within the time range | `symbol` + `fromAllocationId` | allocations by allocation ID | `symbol` + `orderId` | allocations related to an order starting with oldest | `symbol` + `orderId` + `fromAllocationId` | allocations related to an order by allocation ID | **Note:** The time between `startTime` and `endTime` can't be longer than 24 hours. ### Example ```java @@ -396,9 +396,9 @@ No authorization required # **myFilters** > MyFiltersResponse myFilters(myFiltersRequest) -WebSocket Query Relevant Filters +Query Relevant Filters (USER_DATA) -Retrieves the list of [filters](filters.md) relevant to an account on a given symbol. This is the only method that shows if an account has `MAX_ASSET` filters applied to it. Weight: 40 +Retrieves the list of [filters](/products/spot/filters) relevant to an account on a given symbol. This is the only method that shows if an account has [`MAX_ASSET`](/products/spot/filters#max_asset) filters applied to it. Weight(IP): 40 Security Type: USER_DATA Notes: **Data Source:** Memory ### Example ```java @@ -458,9 +458,9 @@ No authorization required # **myPreventedMatches** > MyPreventedMatchesResponse myPreventedMatches(myPreventedMatchesRequest) -WebSocket Account prevented matches +Account prevented matches (USER_DATA) -Displays the list of orders that were expired due to STP. These are the combinations supported: * `symbol` + `preventedMatchId` * `symbol` + `orderId` * `symbol` + `orderId` + `fromPreventedMatchId` (`limit` will default to 500) * `symbol` + `orderId` + `fromPreventedMatchId` + `limit` Weight: Case | Weight ---- | ----- If `symbol` is invalid | 2 Querying by `preventedMatchId` | 2 Querying by `orderId` | 20 +Displays the list of orders that were expired due to STP. These are the combinations supported: * `symbol` + `preventedMatchId` * `symbol` + `orderId` * `symbol` + `orderId` + `fromPreventedMatchId` (`limit` will default to 500) * `symbol` + `orderId` + `fromPreventedMatchId` + `limit` Weight: Case | Weight ---- | ----- If `symbol` is invalid | 2 Querying by `preventedMatchId` | 2 Querying by `orderId` | 20 Security Type: USER_DATA Notes: **Data Source:** Database ### Example ```java @@ -520,9 +520,9 @@ No authorization required # **myTrades** > MyTradesResponse myTrades(myTradesRequest) -WebSocket Account trade history +Account trade history (USER_DATA) -Query information about all your trades, filtered by time range. Weight: Condition| Weight| ---| --- |Without orderId|20| |With orderId|5| +Query information about all your trades, filtered by time range. Weight: Condition| Weight| ---| --- |Without orderId|20| |With orderId|5| Security Type: USER_DATA Notes: Data Source: Memory => Database Notes: - If `fromId` is specified, return trades with trade ID >= `fromId`. - If `startTime` and/or `endTime` are specified, trades are filtered by execution time (`time`). - `fromId` cannot be used together with `startTime` and `endTime`. - If `orderId` is specified, only trades related to that order are returned. - `startTime` and `endTime` cannot be used together with `orderId`. - If no condition is specified, the most recent trades are returned. - The time between `startTime` and `endTime` can't be longer than 24 hours. ### Example ```java @@ -582,9 +582,9 @@ No authorization required # **openOrderListsStatus** > OpenOrderListsStatusResponse openOrderListsStatus(openOrderListsStatusRequest) -WebSocket Current open Order lists +Current open Order lists (USER_DATA) -Query execution status of all open order lists. If you need to continuously monitor order status updates, please consider using WebSocket Streams: * `userDataStream.start` request * `executionReport` user data stream event Weight: 6 +Query execution status of all open order lists. If you need to continuously monitor order status updates, please consider using WebSocket Streams: * `userDataStream.subscribe` if on an authenticated session * `userDataStream.subscribe.signature` if subscribing through signature subscription Weight(IP): 6 Security Type: USER_DATA Notes: **Data Source:** Memory -> Database ### Example ```java @@ -644,9 +644,9 @@ No authorization required # **openOrdersStatus** > OpenOrdersStatusResponse openOrdersStatus(openOrdersStatusRequest) -WebSocket Current open orders +Current open orders (USER_DATA) -Query execution status of all open orders. If you need to continuously monitor order status updates, please consider using WebSocket Streams: * `userDataStream.start` request * `executionReport` user data stream event Weight: Adjusted based on the number of requested symbols: | Parameter | Weight | | --------- | ------ | | `symbol` | 6 | | none | 80 | +Query execution status of all open orders. If you need to continuously monitor order status updates, please consider using WebSocket Streams: * `userDataStream.subscribe` if on an authenticated session * `userDataStream.subscribe.signature` if subscribing through signature subscription Weight: | Parameter | Weight | | --------- | ------ | | `symbol` | 6 | | none | 80 | Security Type: USER_DATA Notes: Data Source: Memory => Database ### Example ```java @@ -706,9 +706,9 @@ No authorization required # **orderAmendments** > OrderAmendmentsResponse orderAmendments(orderAmendmentsRequest) -WebSocket Query Order Amendments +Query Order Amendments (USER_DATA) -Queries all amendments of a single order. Weight: 4 +Queries all amendments of a single order. Weight(IP): 4 Security Type: USER_DATA Notes: **Data Source:** Database ### Example ```java @@ -768,9 +768,9 @@ No authorization required # **orderListStatus** > OrderListStatusResponse orderListStatus(orderListStatusRequest) -WebSocket Query Order list +Query Order list (USER_DATA) -Check execution status of an Order list. For execution status of individual orders, use `order.status`. Weight: 4 +Check execution status of an Order list. For execution status of individual orders, use `order.status`. Weight(IP): 4 Security Type: USER_DATA Notes: **Data Source:** Database Notes: * `origClientOrderId` refers to `listClientOrderId` of the order list itself. * If both `origClientOrderId` and `orderListId` parameters are specified, only `origClientOrderId` is used and `orderListId` is ignored. ### Example ```java @@ -830,9 +830,9 @@ No authorization required # **orderStatus** > OrderStatusResponse orderStatus(orderStatusRequest) -WebSocket Query order +Query order (USER_DATA) -Check execution status of an order. Weight: 4 +Check execution status of an order. Weight(IP): 4 Security Type: USER_DATA Notes: **Data Source:** Memory => Database Notes: * If both `orderId` and `origClientOrderId` are provided, the `orderId` is searched first, then the `origClientOrderId` from that result is checked against that order. If both conditions are not met the request will be rejected. * For some historical orders the `cummulativeQuoteQty` response field may be negative, meaning the data is not available at this time. ### Example ```java diff --git a/clients/spot/docs/AccountCommissionRequest.md b/clients/spot/docs/AccountCommissionRequest.md index 0817c1c6b..3a897a0e6 100644 --- a/clients/spot/docs/AccountCommissionRequest.md +++ b/clients/spot/docs/AccountCommissionRequest.md @@ -7,6 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | diff --git a/clients/spot/docs/AccountCommissionResponse.md b/clients/spot/docs/AccountCommissionResponse.md index 667924353..d30661e6e 100644 --- a/clients/spot/docs/AccountCommissionResponse.md +++ b/clients/spot/docs/AccountCommissionResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**AccountCommissionResponseResult**](AccountCommissionResponseResult.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/AccountCommissionResponseDiscount.md b/clients/spot/docs/AccountCommissionResponseDiscount.md index 9ccaa9a86..dae5ed59d 100644 --- a/clients/spot/docs/AccountCommissionResponseDiscount.md +++ b/clients/spot/docs/AccountCommissionResponseDiscount.md @@ -2,6 +2,7 @@ # AccountCommissionResponseDiscount +Discount commission when paying in BNB ## Properties @@ -10,7 +11,7 @@ |**enabledForAccount** | **Boolean** | | [optional] | |**enabledForSymbol** | **Boolean** | | [optional] | |**discountAsset** | **String** | | [optional] | -|**discount** | **String** | | [optional] | +|**discount** | **String** | Standard commission is reduced by this rate when paying commission in BNB. | [optional] | diff --git a/clients/spot/docs/AccountCommissionResponseRateLimitsInner.md b/clients/spot/docs/AccountCommissionResponseRateLimitsInner.md new file mode 100644 index 000000000..9760a229d --- /dev/null +++ b/clients/spot/docs/AccountCommissionResponseRateLimitsInner.md @@ -0,0 +1,17 @@ + + +# AccountCommissionResponseRateLimitsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rateLimitType** | **String** | | [optional] | +|**interval** | **String** | | [optional] | +|**intervalNum** | **Long** | | [optional] | +|**limit** | **Long** | | [optional] | +|**count** | **Long** | | [optional] | + + + diff --git a/clients/spot/docs/AccountCommissionResponseResultDiscount.md b/clients/spot/docs/AccountCommissionResponseResultDiscount.md index 7ca71e24c..e1d7bfea1 100644 --- a/clients/spot/docs/AccountCommissionResponseResultDiscount.md +++ b/clients/spot/docs/AccountCommissionResponseResultDiscount.md @@ -2,6 +2,7 @@ # AccountCommissionResponseResultDiscount +Discount on standard commissions when paying in BNB. ## Properties @@ -10,7 +11,7 @@ |**enabledForAccount** | **Boolean** | | [optional] | |**enabledForSymbol** | **Boolean** | | [optional] | |**discountAsset** | **String** | | [optional] | -|**discount** | **String** | | [optional] | +|**discount** | **String** | Standard commission is reduced by this rate when paying commission in BNB. | [optional] | diff --git a/clients/spot/docs/AccountCommissionResponseResultSpecialCommission.md b/clients/spot/docs/AccountCommissionResponseResultSpecialCommission.md index e7bef36e8..543a688c5 100644 --- a/clients/spot/docs/AccountCommissionResponseResultSpecialCommission.md +++ b/clients/spot/docs/AccountCommissionResponseResultSpecialCommission.md @@ -2,6 +2,7 @@ # AccountCommissionResponseResultSpecialCommission +Special commission rates from the order. ## Properties diff --git a/clients/spot/docs/AccountCommissionResponseResultStandardCommission.md b/clients/spot/docs/AccountCommissionResponseResultStandardCommission.md index 6ad68aa9d..13a5b8e84 100644 --- a/clients/spot/docs/AccountCommissionResponseResultStandardCommission.md +++ b/clients/spot/docs/AccountCommissionResponseResultStandardCommission.md @@ -2,6 +2,7 @@ # AccountCommissionResponseResultStandardCommission +Standard commission rates on trades from the order. ## Properties diff --git a/clients/spot/docs/AccountCommissionResponseResultTaxCommission.md b/clients/spot/docs/AccountCommissionResponseResultTaxCommission.md index 5ea11434b..66d8400e6 100644 --- a/clients/spot/docs/AccountCommissionResponseResultTaxCommission.md +++ b/clients/spot/docs/AccountCommissionResponseResultTaxCommission.md @@ -2,6 +2,7 @@ # AccountCommissionResponseResultTaxCommission +Tax commission rates on trades from the order. ## Properties diff --git a/clients/spot/docs/AccountCommissionResponseSpecialCommission.md b/clients/spot/docs/AccountCommissionResponseSpecialCommission.md index 65c69083d..5b136802d 100644 --- a/clients/spot/docs/AccountCommissionResponseSpecialCommission.md +++ b/clients/spot/docs/AccountCommissionResponseSpecialCommission.md @@ -2,6 +2,7 @@ # AccountCommissionResponseSpecialCommission +Special commission rates from the order. ## Properties diff --git a/clients/spot/docs/AccountCommissionResponseStandardCommission.md b/clients/spot/docs/AccountCommissionResponseStandardCommission.md index 0fa6bace1..5fbbf7ae6 100644 --- a/clients/spot/docs/AccountCommissionResponseStandardCommission.md +++ b/clients/spot/docs/AccountCommissionResponseStandardCommission.md @@ -2,6 +2,7 @@ # AccountCommissionResponseStandardCommission +Commission rates on trades from the order. ## Properties diff --git a/clients/spot/docs/AccountCommissionResponseTaxCommission.md b/clients/spot/docs/AccountCommissionResponseTaxCommission.md index 0f312ba8e..0f72eca1b 100644 --- a/clients/spot/docs/AccountCommissionResponseTaxCommission.md +++ b/clients/spot/docs/AccountCommissionResponseTaxCommission.md @@ -2,6 +2,7 @@ # AccountCommissionResponseTaxCommission +Tax commission rates for trades from the order. ## Properties diff --git a/clients/spot/docs/AccountRateLimitsOrdersRequest.md b/clients/spot/docs/AccountRateLimitsOrdersRequest.md index b7e24f7d3..e1570d3df 100644 --- a/clients/spot/docs/AccountRateLimitsOrdersRequest.md +++ b/clients/spot/docs/AccountRateLimitsOrdersRequest.md @@ -7,7 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**recvWindow** | **Double** | | [optional] | +|**id** | **String** | Client-generated request identifier. | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/AccountRateLimitsOrdersResponse.md b/clients/spot/docs/AccountRateLimitsOrdersResponse.md index f5ccb2dda..05cb75f49 100644 --- a/clients/spot/docs/AccountRateLimitsOrdersResponse.md +++ b/clients/spot/docs/AccountRateLimitsOrdersResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<AccountRateLimitsOrdersResponseResultInner>**](AccountRateLimitsOrdersResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/AccountStatusRequest.md b/clients/spot/docs/AccountStatusRequest.md index 046a60d00..569793c66 100644 --- a/clients/spot/docs/AccountStatusRequest.md +++ b/clients/spot/docs/AccountStatusRequest.md @@ -7,8 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**omitZeroBalances** | **Boolean** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**id** | **String** | Client-generated request identifier. | [optional] | +|**omitZeroBalances** | **Boolean** | When set to `true`, emits only the non-zero balances of an account. Default value: `false`. | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/AccountStatusResponse.md b/clients/spot/docs/AccountStatusResponse.md index a5c4e1556..1630779d4 100644 --- a/clients/spot/docs/AccountStatusResponse.md +++ b/clients/spot/docs/AccountStatusResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**AccountStatusResponseResult**](AccountStatusResponseResult.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/AggTradeRequest.md b/clients/spot/docs/AggTradeRequest.md index e8a31ad14..b34873623 100644 --- a/clients/spot/docs/AggTradeRequest.md +++ b/clients/spot/docs/AggTradeRequest.md @@ -7,7 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to query | [optional] | diff --git a/clients/spot/docs/AggTradeResponse.md b/clients/spot/docs/AggTradeResponse.md index bee408cb8..b2ab7647a 100644 --- a/clients/spot/docs/AggTradeResponse.md +++ b/clients/spot/docs/AggTradeResponse.md @@ -7,17 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**aLowerCase** | **Long** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**fLowerCase** | **Long** | | [optional] | -|**lLowerCase** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | -|**M** | **Boolean** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**aLowerCase** | **Long** | Aggregate trade ID | [optional] | +|**pLowerCase** | **String** | Price | [optional] | +|**qLowerCase** | **String** | Quantity | [optional] | +|**fLowerCase** | **Long** | First trade ID | [optional] | +|**lLowerCase** | **Long** | Last trade ID | [optional] | +|**T** | **Long** | Trade time | [optional] | +|**mLowerCase** | **Boolean** | Is the buyer the market maker? | [optional] | +|**M** | **Boolean** | Ignore | [optional] | diff --git a/clients/spot/docs/AggTradesResponseInner.md b/clients/spot/docs/AggTradesResponseInner.md index 1f17b3399..2618f3b72 100644 --- a/clients/spot/docs/AggTradesResponseInner.md +++ b/clients/spot/docs/AggTradesResponseInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**aLowerCase** | **Long** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**fLowerCase** | **Long** | | [optional] | -|**lLowerCase** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | -|**M** | **Boolean** | | [optional] | +|**aLowerCase** | **Long** | Aggregate tradeId | [optional] | +|**pLowerCase** | **String** | Price | [optional] | +|**qLowerCase** | **String** | Quantity | [optional] | +|**fLowerCase** | **Long** | First tradeId | [optional] | +|**lLowerCase** | **Long** | Last tradeId | [optional] | +|**T** | **Long** | Timestamp | [optional] | +|**mLowerCase** | **Boolean** | Was the buyer the maker? | [optional] | +|**M** | **Boolean** | Was the trade the best price match? | [optional] | diff --git a/clients/spot/docs/AllMarketRollingWindowTickerRequest.md b/clients/spot/docs/AllMarketRollingWindowTickerRequest.md index 2bed2dcf3..ac4eb9366 100644 --- a/clients/spot/docs/AllMarketRollingWindowTickerRequest.md +++ b/clients/spot/docs/AllMarketRollingWindowTickerRequest.md @@ -7,7 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**windowSize** | **WindowSize** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**windowSize** | **WindowSize** | | [optional] | diff --git a/clients/spot/docs/AllMarketRollingWindowTickerResponseInner.md b/clients/spot/docs/AllMarketRollingWindowTickerResponseInner.md index 47bb948e8..01d68b1ad 100644 --- a/clients/spot/docs/AllMarketRollingWindowTickerResponseInner.md +++ b/clients/spot/docs/AllMarketRollingWindowTickerResponseInner.md @@ -7,23 +7,23 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**wLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**O** | **Long** | | [optional] | -|**C** | **Long** | | [optional] | -|**F** | **Long** | | [optional] | -|**L** | **Long** | | [optional] | -|**nLowerCase** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**pLowerCase** | **String** | Price change | [optional] | +|**P** | **String** | Price change percent | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**cLowerCase** | **String** | Last price | [optional] | +|**wLowerCase** | **String** | Weighted average price | [optional] | +|**vLowerCase** | **String** | Total traded base asset volume | [optional] | +|**qLowerCase** | **String** | Total traded quote asset volume | [optional] | +|**O** | **Long** | Statistics open time | [optional] | +|**C** | **Long** | Statistics close time | [optional] | +|**F** | **Long** | First trade ID | [optional] | +|**L** | **Long** | Last trade Id | [optional] | +|**nLowerCase** | **Long** | Total number of trades | [optional] | diff --git a/clients/spot/docs/AllMiniTickerRequest.md b/clients/spot/docs/AllMiniTickerRequest.md new file mode 100644 index 000000000..a16783fdd --- /dev/null +++ b/clients/spot/docs/AllMiniTickerRequest.md @@ -0,0 +1,13 @@ + + +# AllMiniTickerRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique WebSocket request ID. | [optional] | + + + diff --git a/clients/spot/docs/AllMiniTickerResponseInner.md b/clients/spot/docs/AllMiniTickerResponseInner.md index bab951fbd..6cd0ae373 100644 --- a/clients/spot/docs/AllMiniTickerResponseInner.md +++ b/clients/spot/docs/AllMiniTickerResponseInner.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**cLowerCase** | **String** | Close price | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | Total traded base asset volume | [optional] | +|**qLowerCase** | **String** | Total traded quote asset volume | [optional] | diff --git a/clients/spot/docs/AllOrderListsRequest.md b/clients/spot/docs/AllOrderListsRequest.md index d054b2c78..1102b5148 100644 --- a/clients/spot/docs/AllOrderListsRequest.md +++ b/clients/spot/docs/AllOrderListsRequest.md @@ -7,11 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**fromId** | **Integer** | | [optional] | -|**startTime** | **Long** | | [optional] | -|**endTime** | **Long** | | [optional] | -|**limit** | **Integer** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**id** | **String** | Client-generated request identifier. | [optional] | +|**fromId** | **Integer** | Order list ID to begin at | [optional] | +|**startTime** | **Long** | Timestamp in ms | [optional] | +|**endTime** | **Long** | Timestamp in ms | [optional] | +|**limit** | **Integer** | Default: 500; Maximum: 1000 | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/AllOrderListsResponse.md b/clients/spot/docs/AllOrderListsResponse.md index d53a4ec78..a65f52f49 100644 --- a/clients/spot/docs/AllOrderListsResponse.md +++ b/clients/spot/docs/AllOrderListsResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<AllOrderListsResponseResultInner>**](AllOrderListsResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/AllOrderListsResponseResultInner.md b/clients/spot/docs/AllOrderListsResponseResultInner.md index 3e3a85d8d..e9e6f3fa1 100644 --- a/clients/spot/docs/AllOrderListsResponseResultInner.md +++ b/clients/spot/docs/AllOrderListsResponseResultInner.md @@ -14,7 +14,7 @@ |**listClientOrderId** | **String** | | [optional] | |**transactionTime** | **Long** | | [optional] | |**symbol** | **String** | | [optional] | -|**orders** | [**List<OrderListCancelResponseResultOrdersInner>**](OrderListCancelResponseResultOrdersInner.md) | | [optional] | +|**orders** | [**List<AllOrderListsResponseResultInnerOrdersInner>**](AllOrderListsResponseResultInnerOrdersInner.md) | | [optional] | diff --git a/clients/spot/docs/AllOrderListsResponseResultInnerOrdersInner.md b/clients/spot/docs/AllOrderListsResponseResultInnerOrdersInner.md new file mode 100644 index 000000000..60fb5c2e8 --- /dev/null +++ b/clients/spot/docs/AllOrderListsResponseResultInnerOrdersInner.md @@ -0,0 +1,15 @@ + + +# AllOrderListsResponseResultInnerOrdersInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**symbol** | **String** | | [optional] | +|**orderId** | **Long** | | [optional] | +|**clientOrderId** | **String** | | [optional] | + + + diff --git a/clients/spot/docs/AllOrdersRequest.md b/clients/spot/docs/AllOrdersRequest.md index 8eb155db5..8580409bd 100644 --- a/clients/spot/docs/AllOrdersRequest.md +++ b/clients/spot/docs/AllOrdersRequest.md @@ -7,12 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**orderId** | **Long** | | [optional] | -|**startTime** | **Long** | | [optional] | -|**endTime** | **Long** | | [optional] | -|**limit** | **Integer** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**orderId** | **Long** | Order ID to begin at | [optional] | +|**startTime** | **Long** | Timestamp in ms | [optional] | +|**endTime** | **Long** | Timestamp in ms | [optional] | +|**limit** | **Integer** | Default: 500; Maximum: 1000 | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/AllOrdersResponse.md b/clients/spot/docs/AllOrdersResponse.md index 63db56ef9..a829b6f65 100644 --- a/clients/spot/docs/AllOrdersResponse.md +++ b/clients/spot/docs/AllOrdersResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<AllOrdersResponseResultInner>**](AllOrdersResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/AllOrdersResponseInner.md b/clients/spot/docs/AllOrdersResponseInner.md index 17e7206c5..ac86df900 100644 --- a/clients/spot/docs/AllOrdersResponseInner.md +++ b/clients/spot/docs/AllOrdersResponseInner.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | |**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | +|**orderListId** | **Long** | Unless it's part of an order list, value will be -1 | [optional] | |**clientOrderId** | **String** | | [optional] | |**price** | **String** | | [optional] | |**origQty** | **String** | | [optional] | @@ -19,14 +19,27 @@ |**timeInForce** | **String** | | [optional] | |**type** | **String** | | [optional] | |**side** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**icebergQty** | **String** | | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | |**time** | **Long** | | [optional] | |**updateTime** | **Long** | | [optional] | |**isWorking** | **Boolean** | | [optional] | |**origQuoteOrderQty** | **String** | | [optional] | |**workingTime** | **Long** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/AllOrdersResponseResultInner.md b/clients/spot/docs/AllOrdersResponseResultInner.md index dac60c76e..31df2dade 100644 --- a/clients/spot/docs/AllOrdersResponseResultInner.md +++ b/clients/spot/docs/AllOrdersResponseResultInner.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | |**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | +|**orderListId** | **Long** | Present only for orders that belong to an order list. | [optional] | |**clientOrderId** | **String** | | [optional] | |**price** | **String** | | [optional] | |**origQty** | **String** | | [optional] | @@ -19,16 +19,27 @@ |**timeInForce** | **String** | | [optional] | |**type** | **String** | | [optional] | |**side** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**icebergQty** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**time** | **Long** | Order placement time. | [optional] | +|**updateTime** | **Long** | Time of the last update to the order. | [optional] | |**isWorking** | **Boolean** | | [optional] | |**workingTime** | **Long** | | [optional] | -|**origQuoteOrderQty** | **String** | | [optional] | +|**origQuoteOrderQty** | **String** | Always present. Zero if the order type does not use `quoteOrderQty`. | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | -|**preventedMatchId** | **Long** | | [optional] | -|**preventedQuantity** | **String** | | [optional] | +|**preventedMatchId** | **Long** | Present only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Present only if the order expired due to STP. | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/AssetFilters.md b/clients/spot/docs/AssetFilters.md deleted file mode 100644 index afba59391..000000000 --- a/clients/spot/docs/AssetFilters.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# AssetFilters - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**filterType** | **String** | | [optional] | -|**qtyExponent** | **Integer** | | [optional] | -|**limit** | **String** | | [optional] | -|**asset** | **String** | | [optional] | - - - diff --git a/clients/spot/docs/AuthApi.md b/clients/spot/docs/AuthApi.md index 911f40ef1..eeb922d46 100644 --- a/clients/spot/docs/AuthApi.md +++ b/clients/spot/docs/AuthApi.md @@ -4,18 +4,18 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**sessionLogon**](AuthApi.md#sessionLogon) | **POST** /session.logon | WebSocket Log in with API key | -| [**sessionLogout**](AuthApi.md#sessionLogout) | **POST** /session.logout | WebSocket Log out of the session | -| [**sessionStatus**](AuthApi.md#sessionStatus) | **POST** /session.status | WebSocket Query session status | +| [**sessionLogon**](AuthApi.md#sessionLogon) | **POST** /session.logon | Log in with API key (USER_DATA) | +| [**sessionLogout**](AuthApi.md#sessionLogout) | **POST** /session.logout | Log out of the session | +| [**sessionStatus**](AuthApi.md#sessionStatus) | **POST** /session.status | Query session status | # **sessionLogon** > SessionLogonResponse sessionLogon(sessionLogonRequest) -WebSocket Log in with API key +Log in with API key (USER_DATA) -Authenticate WebSocket connection using the provided API key. After calling `session.logon`, you can omit `apiKey` and `signature` parameters for future requests that require them. Note that only one API key can be authenticated. Calling `session.logon` multiple times changes the current authenticated API key. Weight: 2 +Authenticate WebSocket connection using the provided API key. After calling `session.logon`, you can omit `apiKey` and `signature` parameters for future requests that require them. Note that only one API key can be authenticated. Calling `session.logon` multiple times changes the current authenticated API key. **Note:** Only Ed25519 keys are supported for this feature. Weight(IP): 2 Security Type: USER_DATA Notes: **Data Source:** Memory ### Example ```java @@ -75,9 +75,9 @@ No authorization required # **sessionLogout** > SessionLogoutResponse sessionLogout() -WebSocket Log out of the session +Log out of the session -Forget the API key previously authenticated. If the connection is not authenticated, this request does nothing. Note that the WebSocket connection stays open after `session.logout` request. You can continue using the connection, but now you will have to explicitly provide the `apiKey` and `signature` parameters where needed. Weight: 2 +Forget the API key previously authenticated. If the connection is not authenticated, this request does nothing. Note that the WebSocket connection stays open after `session.logout` request. You can continue using the connection, but now you will have to explicitly provide the `apiKey` and `signature` parameters where needed. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory ### Example ```java @@ -133,9 +133,9 @@ No authorization required # **sessionStatus** > SessionStatusResponse sessionStatus() -WebSocket Query session status +Query session status -Query the status of the WebSocket connection, inspecting which API key (if any) is used to authorize requests. Weight: 2 +Query the status of the WebSocket connection, inspecting which API key (if any) is used to authorize requests. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory ### Example ```java diff --git a/clients/spot/docs/AvgPriceRequest.md b/clients/spot/docs/AvgPriceRequest.md index 585049daa..c9378985c 100644 --- a/clients/spot/docs/AvgPriceRequest.md +++ b/clients/spot/docs/AvgPriceRequest.md @@ -7,7 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to query | [optional] | diff --git a/clients/spot/docs/AvgPriceResponse.md b/clients/spot/docs/AvgPriceResponse.md index 833765c09..c6f331e60 100644 --- a/clients/spot/docs/AvgPriceResponse.md +++ b/clients/spot/docs/AvgPriceResponse.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**wLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**iLowerCase** | **String** | Average price interval | [optional] | +|**wLowerCase** | **String** | Average price | [optional] | +|**T** | **Long** | Last trade time | [optional] | diff --git a/clients/spot/docs/AvgPriceResponseResult.md b/clients/spot/docs/AvgPriceResponseResult.md index 692d3c5ac..5ae16b226 100644 --- a/clients/spot/docs/AvgPriceResponseResult.md +++ b/clients/spot/docs/AvgPriceResponseResult.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**mins** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**closeTime** | **Long** | | [optional] | +|**mins** | **Long** | Average price interval (in minutes) | [optional] | +|**price** | **String** | Average price | [optional] | +|**closeTime** | **Long** | Last trade time | [optional] | diff --git a/clients/spot/docs/BalanceUpdate.md b/clients/spot/docs/BalanceUpdate.md index 600ac5b35..48e40361b 100644 --- a/clients/spot/docs/BalanceUpdate.md +++ b/clients/spot/docs/BalanceUpdate.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**dLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**aLowerCase** | **String** | Asset | [optional] | +|**dLowerCase** | **String** | Balance Delta | [optional] | +|**T** | **Long** | Clear Time | [optional] | diff --git a/clients/spot/docs/BlockTradeRequest.md b/clients/spot/docs/BlockTradeRequest.md new file mode 100644 index 000000000..67bb452c2 --- /dev/null +++ b/clients/spot/docs/BlockTradeRequest.md @@ -0,0 +1,14 @@ + + +# BlockTradeRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to query | [optional] | + + + diff --git a/clients/spot/docs/BlockTradeResponse.md b/clients/spot/docs/BlockTradeResponse.md new file mode 100644 index 000000000..deb08721c --- /dev/null +++ b/clients/spot/docs/BlockTradeResponse.md @@ -0,0 +1,20 @@ + + +# BlockTradeResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**tLowerCase** | **Long** | Block Trade ID | [optional] | +|**pLowerCase** | **String** | Price | [optional] | +|**qLowerCase** | **String** | Quantity | [optional] | +|**T** | **Long** | Trade time | [optional] | +|**mLowerCase** | **Boolean** | Is the buyer the maker? | [optional] | + + + diff --git a/clients/spot/docs/BlockTradesHistoricalRequest.md b/clients/spot/docs/BlockTradesHistoricalRequest.md new file mode 100644 index 000000000..7e3af8bc6 --- /dev/null +++ b/clients/spot/docs/BlockTradesHistoricalRequest.md @@ -0,0 +1,16 @@ + + +# BlockTradesHistoricalRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | +|**symbol** | **String** | | | +|**fromId** | **Long** | Block trade ID to fetch from | | +|**limit** | **Long** | Default: 500; Maximum: 1000 | [optional] | + + + diff --git a/clients/spot/docs/BlockTradesHistoricalResponse.md b/clients/spot/docs/BlockTradesHistoricalResponse.md new file mode 100644 index 000000000..0079c0724 --- /dev/null +++ b/clients/spot/docs/BlockTradesHistoricalResponse.md @@ -0,0 +1,16 @@ + + +# BlockTradesHistoricalResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**status** | **Integer** | | [optional] | +|**result** | [**List<BlockTradesHistoricalResponseResultInner>**](BlockTradesHistoricalResponseResultInner.md) | | [optional] | +|**rateLimits** | [**List<BlockTradesHistoricalResponseRateLimitsInner>**](BlockTradesHistoricalResponseRateLimitsInner.md) | | [optional] | + + + diff --git a/clients/spot/docs/BlockTradesHistoricalResponseRateLimitsInner.md b/clients/spot/docs/BlockTradesHistoricalResponseRateLimitsInner.md new file mode 100644 index 000000000..c9af57f5d --- /dev/null +++ b/clients/spot/docs/BlockTradesHistoricalResponseRateLimitsInner.md @@ -0,0 +1,17 @@ + + +# BlockTradesHistoricalResponseRateLimitsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rateLimitType** | **String** | | [optional] | +|**interval** | **String** | | [optional] | +|**intervalNum** | **Integer** | | [optional] | +|**limit** | **Integer** | | [optional] | +|**count** | **Integer** | | [optional] | + + + diff --git a/clients/spot/docs/BlockTradesHistoricalResponseResultInner.md b/clients/spot/docs/BlockTradesHistoricalResponseResultInner.md new file mode 100644 index 000000000..c12deb4e0 --- /dev/null +++ b/clients/spot/docs/BlockTradesHistoricalResponseResultInner.md @@ -0,0 +1,18 @@ + + +# BlockTradesHistoricalResponseResultInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**price** | **String** | | [optional] | +|**qty** | **String** | | [optional] | +|**quoteQty** | **String** | | [optional] | +|**time** | **Long** | | [optional] | +|**isBuyerMaker** | **Boolean** | | [optional] | + + + diff --git a/clients/spot/docs/BookTickerRequest.md b/clients/spot/docs/BookTickerRequest.md index 544fd2987..fd5722042 100644 --- a/clients/spot/docs/BookTickerRequest.md +++ b/clients/spot/docs/BookTickerRequest.md @@ -7,7 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to query | [optional] | diff --git a/clients/spot/docs/BookTickerResponse.md b/clients/spot/docs/BookTickerResponse.md index d0a098b6e..21c33e4b1 100644 --- a/clients/spot/docs/BookTickerResponse.md +++ b/clients/spot/docs/BookTickerResponse.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**uLowerCase** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**B** | **String** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**A** | **String** | | [optional] | +|**uLowerCase** | **Long** | Order book updateId | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**bLowerCase** | **String** | Best bid price | [optional] | +|**B** | **String** | Best bid qty | [optional] | +|**aLowerCase** | **String** | Best ask price | [optional] | +|**A** | **String** | Best ask qty | [optional] | diff --git a/clients/spot/docs/CancelRestrictions.md b/clients/spot/docs/CancelRestrictions.md index 125fd34c8..94fe352d4 100644 --- a/clients/spot/docs/CancelRestrictions.md +++ b/clients/spot/docs/CancelRestrictions.md @@ -7,11 +7,7 @@ * `ONLY_NEW` (value: `"ONLY_NEW"`) -* `NEW` (value: `"NEW"`) - * `ONLY_PARTIALLY_FILLED` (value: `"ONLY_PARTIALLY_FILLED"`) -* `PARTIALLY_FILLED` (value: `"PARTIALLY_FILLED"`) - diff --git a/clients/spot/docs/DefaultApi.md b/clients/spot/docs/DefaultApi.md new file mode 100644 index 000000000..70c050934 --- /dev/null +++ b/clients/spot/docs/DefaultApi.md @@ -0,0 +1,953 @@ +# DefaultApi + +All URIs are relative to *http://localhost* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**aggTrade**](DefaultApi.md#aggTrade) | **POST** /<symbol>@aggTrade | Aggregate Trade Streams | +| [**allMarketRollingWindowTicker**](DefaultApi.md#allMarketRollingWindowTicker) | **POST** /!ticker_<windowSize>@arr | All Market Rolling Window Statistics Streams | +| [**allMiniTicker**](DefaultApi.md#allMiniTicker) | **POST** /!miniTicker@arr | All Market Mini Tickers Stream | +| [**avgPrice**](DefaultApi.md#avgPrice) | **POST** /<symbol>@avgPrice | Average Price | +| [**blockTrade**](DefaultApi.md#blockTrade) | **POST** /<symbol>@blockTrade | Block Trade Streams | +| [**bookTicker**](DefaultApi.md#bookTicker) | **POST** /<symbol>@bookTicker | Individual Symbol Book Ticker Streams | +| [**diffBookDepth**](DefaultApi.md#diffBookDepth) | **POST** /<symbol>@depth@<updateSpeed> | Diff. Depth Stream | +| [**kline**](DefaultApi.md#kline) | **POST** /<symbol>@kline_<interval> | Kline/Candlestick Streams for UTC | +| [**klineOffset**](DefaultApi.md#klineOffset) | **POST** /<symbol>@kline_<interval>@+08:00 | Kline/Candlestick Streams with timezone offset | +| [**miniTicker**](DefaultApi.md#miniTicker) | **POST** /<symbol>@miniTicker | Individual Symbol Mini Ticker Stream | +| [**partialBookDepth**](DefaultApi.md#partialBookDepth) | **POST** /<symbol>@depth<levels>@<updateSpeed> | WebSocket Partial Book Depth Streams | +| [**referencePrice**](DefaultApi.md#referencePrice) | **POST** /<symbol>@referencePrice | Reference Price Streams | +| [**rollingWindowTicker**](DefaultApi.md#rollingWindowTicker) | **POST** /<symbol>@ticker_<windowSize> | Individual Symbol Rolling Window Statistics Streams | +| [**ticker**](DefaultApi.md#ticker) | **POST** /<symbol>@ticker | Individual Symbol Ticker Streams | +| [**trade**](DefaultApi.md#trade) | **POST** /<symbol>@trade | Trade Streams | + + + +# **aggTrade** +> AggTradeResponse aggTrade(aggTradeRequest) + +Aggregate Trade Streams + +The Aggregate Trade Streams push trade information that is aggregated for a single taker order. Update Speed: Real-time + +### Example +```java +// Import classes: +import com.binance.connector.client.spot.ApiClient; +import com.binance.connector.client.spot.ApiException; +import com.binance.connector.client.spot.Configuration; +import com.binance.connector.client.spot.models.*; +import com.binance.connector.client.spot.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + AggTradeRequest aggTradeRequest = new AggTradeRequest(); // AggTradeRequest | + try { + AggTradeResponse result = apiInstance.aggTrade(aggTradeRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#aggTrade"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **aggTradeRequest** | [**AggTradeRequest**](AggTradeRequest.md)| | | + +### Return type + +[**AggTradeResponse**](AggTradeResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Aggregate Trade Streams | - | + + +# **allMarketRollingWindowTicker** +> AllMarketRollingWindowTickerResponse allMarketRollingWindowTicker(allMarketRollingWindowTickerRequest) + +All Market Rolling Window Statistics Streams + +Rolling window ticker statistics for all market symbols, computed over multiple windows. Note that only tickers that have changed will be present in the array. Update Speed: 1000ms + +### Example +```java +// Import classes: +import com.binance.connector.client.spot.ApiClient; +import com.binance.connector.client.spot.ApiException; +import com.binance.connector.client.spot.Configuration; +import com.binance.connector.client.spot.models.*; +import com.binance.connector.client.spot.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + AllMarketRollingWindowTickerRequest allMarketRollingWindowTickerRequest = new AllMarketRollingWindowTickerRequest(); // AllMarketRollingWindowTickerRequest | + try { + AllMarketRollingWindowTickerResponse result = apiInstance.allMarketRollingWindowTicker(allMarketRollingWindowTickerRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#allMarketRollingWindowTicker"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **allMarketRollingWindowTickerRequest** | [**AllMarketRollingWindowTickerRequest**](AllMarketRollingWindowTickerRequest.md)| | | + +### Return type + +[**AllMarketRollingWindowTickerResponse**](AllMarketRollingWindowTickerResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | All Market Rolling Window Statistics Streams | - | + + +# **allMiniTicker** +> AllMiniTickerResponse allMiniTicker(allMiniTickerRequest) + +All Market Mini Tickers Stream + +24hr rolling window mini-ticker statistics for all symbols that changed in an array. These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs. Note that only tickers that have changed will be present in the array. Update Speed: 1000ms + +### Example +```java +// Import classes: +import com.binance.connector.client.spot.ApiClient; +import com.binance.connector.client.spot.ApiException; +import com.binance.connector.client.spot.Configuration; +import com.binance.connector.client.spot.models.*; +import com.binance.connector.client.spot.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + AllMiniTickerRequest allMiniTickerRequest = new AllMiniTickerRequest(); // AllMiniTickerRequest | + try { + AllMiniTickerResponse result = apiInstance.allMiniTicker(allMiniTickerRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#allMiniTicker"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **allMiniTickerRequest** | [**AllMiniTickerRequest**](AllMiniTickerRequest.md)| | | + +### Return type + +[**AllMiniTickerResponse**](AllMiniTickerResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | All Market Mini Tickers Stream | - | + + +# **avgPrice** +> AvgPriceResponse avgPrice(avgPriceRequest) + +Average Price + +Average price streams push changes in the average price over a fixed time interval. Update Speed: 1000ms + +### Example +```java +// Import classes: +import com.binance.connector.client.spot.ApiClient; +import com.binance.connector.client.spot.ApiException; +import com.binance.connector.client.spot.Configuration; +import com.binance.connector.client.spot.models.*; +import com.binance.connector.client.spot.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + AvgPriceRequest avgPriceRequest = new AvgPriceRequest(); // AvgPriceRequest | + try { + AvgPriceResponse result = apiInstance.avgPrice(avgPriceRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#avgPrice"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **avgPriceRequest** | [**AvgPriceRequest**](AvgPriceRequest.md)| | | + +### Return type + +[**AvgPriceResponse**](AvgPriceResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Average Price | - | + + +# **blockTrade** +> BlockTradeResponse blockTrade(blockTradeRequest) + +Block Trade Streams + +Block Trade Streams push block trade information in real-time. Update Speed: Real-time + +### Example +```java +// Import classes: +import com.binance.connector.client.spot.ApiClient; +import com.binance.connector.client.spot.ApiException; +import com.binance.connector.client.spot.Configuration; +import com.binance.connector.client.spot.models.*; +import com.binance.connector.client.spot.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + BlockTradeRequest blockTradeRequest = new BlockTradeRequest(); // BlockTradeRequest | + try { + BlockTradeResponse result = apiInstance.blockTrade(blockTradeRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#blockTrade"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **blockTradeRequest** | [**BlockTradeRequest**](BlockTradeRequest.md)| | | + +### Return type + +[**BlockTradeResponse**](BlockTradeResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Block Trade Streams | - | + + +# **bookTicker** +> BookTickerResponse bookTicker(bookTickerRequest) + +Individual Symbol Book Ticker Streams + +Pushes any update to the best bid or ask's price or quantity in real-time for a specified symbol. Multiple `<symbol>@bookTicker` streams can be subscribed to over one connection. Update Speed: Real-time + +### Example +```java +// Import classes: +import com.binance.connector.client.spot.ApiClient; +import com.binance.connector.client.spot.ApiException; +import com.binance.connector.client.spot.Configuration; +import com.binance.connector.client.spot.models.*; +import com.binance.connector.client.spot.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + BookTickerRequest bookTickerRequest = new BookTickerRequest(); // BookTickerRequest | + try { + BookTickerResponse result = apiInstance.bookTicker(bookTickerRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#bookTicker"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bookTickerRequest** | [**BookTickerRequest**](BookTickerRequest.md)| | | + +### Return type + +[**BookTickerResponse**](BookTickerResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Individual Symbol Book Ticker Streams | - | + + +# **diffBookDepth** +> DiffBookDepthResponse diffBookDepth(diffBookDepthRequest) + +Diff. Depth Stream + +Order book price and quantity depth updates used to locally manage an order book. Update Speed: 1000ms or 100ms + +### Example +```java +// Import classes: +import com.binance.connector.client.spot.ApiClient; +import com.binance.connector.client.spot.ApiException; +import com.binance.connector.client.spot.Configuration; +import com.binance.connector.client.spot.models.*; +import com.binance.connector.client.spot.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + DiffBookDepthRequest diffBookDepthRequest = new DiffBookDepthRequest(); // DiffBookDepthRequest | + try { + DiffBookDepthResponse result = apiInstance.diffBookDepth(diffBookDepthRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#diffBookDepth"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **diffBookDepthRequest** | [**DiffBookDepthRequest**](DiffBookDepthRequest.md)| | | + +### Return type + +[**DiffBookDepthResponse**](DiffBookDepthResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Diff. Depth Stream | - | + + +# **kline** +> KlineResponse kline(klineRequest) + +Kline/Candlestick Streams for UTC + +The Kline/Candlestick Stream push updates to the current klines/candlestick every second in `UTC+0` timezone Update Speed: 1000ms for `1s`, 2000ms for the other intervals + +### Example +```java +// Import classes: +import com.binance.connector.client.spot.ApiClient; +import com.binance.connector.client.spot.ApiException; +import com.binance.connector.client.spot.Configuration; +import com.binance.connector.client.spot.models.*; +import com.binance.connector.client.spot.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + KlineRequest klineRequest = new KlineRequest(); // KlineRequest | + try { + KlineResponse result = apiInstance.kline(klineRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#kline"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **klineRequest** | [**KlineRequest**](KlineRequest.md)| | | + +### Return type + +[**KlineResponse**](KlineResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Kline/Candlestick Streams for UTC | - | + + +# **klineOffset** +> KlineOffsetResponse klineOffset(klineOffsetRequest) + +Kline/Candlestick Streams with timezone offset + +The Kline/Candlestick Stream push updates to the current klines/candlestick every second in `UTC+8` timezone **Kline/Candlestick chart intervals:** Supported intervals: See Kline/Candlestick chart intervals **UTC+8 timezone offset:** - Kline intervals open and close in the UTC+8 timezone. For example the 1d klines will open at the beginning of the UTC+8 day, and close at the end of the UTC+8 day. - Note that E (event time), t (start time) and T (close time) in the payload are Unix timestamps, which are always interpreted in UTC. Update Speed: 1000ms for `1s`, 2000ms for the other intervals + +### Example +```java +// Import classes: +import com.binance.connector.client.spot.ApiClient; +import com.binance.connector.client.spot.ApiException; +import com.binance.connector.client.spot.Configuration; +import com.binance.connector.client.spot.models.*; +import com.binance.connector.client.spot.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + KlineOffsetRequest klineOffsetRequest = new KlineOffsetRequest(); // KlineOffsetRequest | + try { + KlineOffsetResponse result = apiInstance.klineOffset(klineOffsetRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#klineOffset"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **klineOffsetRequest** | [**KlineOffsetRequest**](KlineOffsetRequest.md)| | | + +### Return type + +[**KlineOffsetResponse**](KlineOffsetResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Kline/Candlestick Streams with timezone offset | - | + + +# **miniTicker** +> MiniTickerResponse miniTicker(miniTickerRequest) + +Individual Symbol Mini Ticker Stream + +24hr rolling window mini-ticker statistics. These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs. Update Speed: 1000ms + +### Example +```java +// Import classes: +import com.binance.connector.client.spot.ApiClient; +import com.binance.connector.client.spot.ApiException; +import com.binance.connector.client.spot.Configuration; +import com.binance.connector.client.spot.models.*; +import com.binance.connector.client.spot.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + MiniTickerRequest miniTickerRequest = new MiniTickerRequest(); // MiniTickerRequest | + try { + MiniTickerResponse result = apiInstance.miniTicker(miniTickerRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#miniTicker"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **miniTickerRequest** | [**MiniTickerRequest**](MiniTickerRequest.md)| | | + +### Return type + +[**MiniTickerResponse**](MiniTickerResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Individual Symbol Mini Ticker Stream | - | + + +# **partialBookDepth** +> PartialBookDepthResponse partialBookDepth(partialBookDepthRequest) + +WebSocket Partial Book Depth Streams + +Top **\\<levels\\>** bids and asks, pushed every second. Update Speed: 1000ms or 100ms + +### Example +```java +// Import classes: +import com.binance.connector.client.spot.ApiClient; +import com.binance.connector.client.spot.ApiException; +import com.binance.connector.client.spot.Configuration; +import com.binance.connector.client.spot.models.*; +import com.binance.connector.client.spot.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + PartialBookDepthRequest partialBookDepthRequest = new PartialBookDepthRequest(); // PartialBookDepthRequest | + try { + PartialBookDepthResponse result = apiInstance.partialBookDepth(partialBookDepthRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#partialBookDepth"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **partialBookDepthRequest** | [**PartialBookDepthRequest**](PartialBookDepthRequest.md)| | | + +### Return type + +[**PartialBookDepthResponse**](PartialBookDepthResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Partial Book Depth Streams | - | + + +# **referencePrice** +> ReferencePriceResponse referencePrice(referencePriceRequest) + +Reference Price Streams + +Reference price stream for a symbol. Update Speed: 1000ms + +### Example +```java +// Import classes: +import com.binance.connector.client.spot.ApiClient; +import com.binance.connector.client.spot.ApiException; +import com.binance.connector.client.spot.Configuration; +import com.binance.connector.client.spot.models.*; +import com.binance.connector.client.spot.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + ReferencePriceRequest referencePriceRequest = new ReferencePriceRequest(); // ReferencePriceRequest | + try { + ReferencePriceResponse result = apiInstance.referencePrice(referencePriceRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#referencePrice"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **referencePriceRequest** | [**ReferencePriceRequest**](ReferencePriceRequest.md)| | | + +### Return type + +[**ReferencePriceResponse**](ReferencePriceResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Reference Price Streams | - | + + +# **rollingWindowTicker** +> RollingWindowTickerResponse rollingWindowTicker(rollingWindowTickerRequest) + +Individual Symbol Rolling Window Statistics Streams + +Rolling window ticker statistics for a single symbol, computed over multiple windows. **Note:** This stream is different from the `<symbol>@ticker` stream. The open time `\"O\"` always starts on a minute, while the closing time `\"C\"` is the current time of the update. As such, the effective window might be up to 59999ms wider than `<window_size>`. Update Speed: 1000ms + +### Example +```java +// Import classes: +import com.binance.connector.client.spot.ApiClient; +import com.binance.connector.client.spot.ApiException; +import com.binance.connector.client.spot.Configuration; +import com.binance.connector.client.spot.models.*; +import com.binance.connector.client.spot.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + RollingWindowTickerRequest rollingWindowTickerRequest = new RollingWindowTickerRequest(); // RollingWindowTickerRequest | + try { + RollingWindowTickerResponse result = apiInstance.rollingWindowTicker(rollingWindowTickerRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#rollingWindowTicker"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **rollingWindowTickerRequest** | [**RollingWindowTickerRequest**](RollingWindowTickerRequest.md)| | | + +### Return type + +[**RollingWindowTickerResponse**](RollingWindowTickerResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Individual Symbol Rolling Window Statistics Streams | - | + + +# **ticker** +> TickerResponse ticker(tickerRequest) + +Individual Symbol Ticker Streams + +24hr rolling window ticker statistics for a single symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs. Update Speed: 1000ms + +### Example +```java +// Import classes: +import com.binance.connector.client.spot.ApiClient; +import com.binance.connector.client.spot.ApiException; +import com.binance.connector.client.spot.Configuration; +import com.binance.connector.client.spot.models.*; +import com.binance.connector.client.spot.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + TickerRequest tickerRequest = new TickerRequest(); // TickerRequest | + try { + TickerResponse result = apiInstance.ticker(tickerRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#ticker"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tickerRequest** | [**TickerRequest**](TickerRequest.md)| | | + +### Return type + +[**TickerResponse**](TickerResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Individual Symbol Ticker Streams | - | + + +# **trade** +> TradeResponse trade(tradeRequest) + +Trade Streams + +The Trade Streams push raw trade information; each trade has a unique buyer and seller. Update Speed: Real-time + +### Example +```java +// Import classes: +import com.binance.connector.client.spot.ApiClient; +import com.binance.connector.client.spot.ApiException; +import com.binance.connector.client.spot.Configuration; +import com.binance.connector.client.spot.models.*; +import com.binance.connector.client.spot.websocket.stream.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + TradeRequest tradeRequest = new TradeRequest(); // TradeRequest | + try { + TradeResponse result = apiInstance.trade(tradeRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#trade"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tradeRequest** | [**TradeRequest**](TradeRequest.md)| | | + +### Return type + +[**TradeResponse**](TradeResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Trade Streams | - | + diff --git a/clients/spot/docs/DeleteOrderListResponseOrderReportsInner.md b/clients/spot/docs/DeleteOrderListResponseOrderReportsInner.md index 50c8b7191..66f03363d 100644 --- a/clients/spot/docs/DeleteOrderListResponseOrderReportsInner.md +++ b/clients/spot/docs/DeleteOrderListResponseOrderReportsInner.md @@ -22,8 +22,21 @@ |**timeInForce** | **String** | | [optional] | |**type** | **String** | | [optional] | |**side** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/DeleteOrderResponse.md b/clients/spot/docs/DeleteOrderResponse.md index 84310b9b3..850b2a4c6 100644 --- a/clients/spot/docs/DeleteOrderResponse.md +++ b/clients/spot/docs/DeleteOrderResponse.md @@ -8,9 +8,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | |**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | +|**orderListId** | **Long** | Unless it's part of an order list, value will be -1 | [optional] | +|**origClientOrderId** | **String** | | [optional] | |**clientOrderId** | **String** | | [optional] | |**transactTime** | **Long** | | [optional] | |**price** | **String** | | [optional] | @@ -23,6 +23,21 @@ |**type** | **String** | | [optional] | |**side** | **String** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | +|**icebergQty** | **String** | Quantity for the iceberg order. Appears only if the parameter `icebergQty` was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | When used together with `symbol`, can be used to query a prevented match. Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. Appears only if the order expired due to STP. | [optional] | +|**stopPrice** | **String** | Price when the algorithmic order will be triggered. Appears for `STOP_LOSS`, `TAKE_PROFIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` orders. | [optional] | +|**strategyId** | **Long** | Can be used to label an order that's part of an order strategy. Appears if the parameter was populated in the request. | [optional] | +|**strategyType** | **Long** | Can be used to label an order that is using an order strategy. Appears if the parameter was populated in the request. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. Appears for trailing stop orders. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order becomes active and starts tracking price changes. Appears only for trailing stop orders. | [optional] | +|**usedSor** | **Boolean** | Indicates whether the order used SOR. Appears when placing orders using SOR. | [optional] | +|**workingFloor** | **String** | Indicates whether the order is being filled by SOR or by the order book to which it was submitted. Appears when placing orders using SOR. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price the order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Returned when an order has expired. | [optional] | diff --git a/clients/spot/docs/DepthRequest.md b/clients/spot/docs/DepthRequest.md index 667da1b0c..e6fd97a0f 100644 --- a/clients/spot/docs/DepthRequest.md +++ b/clients/spot/docs/DepthRequest.md @@ -7,6 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | |**limit** | **Integer** | | [optional] | |**symbolStatus** | **SymbolStatus** | | [optional] | diff --git a/clients/spot/docs/DepthResponse.md b/clients/spot/docs/DepthResponse.md index d7ec591a6..f68a1beaa 100644 --- a/clients/spot/docs/DepthResponse.md +++ b/clients/spot/docs/DepthResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**DepthResponseResult**](DepthResponseResult.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/DepthResponseResult.md b/clients/spot/docs/DepthResponseResult.md index b1931bb27..83fa8e5aa 100644 --- a/clients/spot/docs/DepthResponseResult.md +++ b/clients/spot/docs/DepthResponseResult.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**lastUpdateId** | **Long** | | [optional] | -|**bids** | **List<List<String>>** | | [optional] | -|**asks** | **List<List<String>>** | | [optional] | +|**bids** | **List<List<String>>** | Bid orders. Each entry is [price, quantity]. | [optional] | +|**asks** | **List<List<String>>** | Ask orders. Each entry is [price, quantity]. | [optional] | diff --git a/clients/spot/docs/DiffBookDepthRequest.md b/clients/spot/docs/DiffBookDepthRequest.md index 4e70ad955..1f63f3d10 100644 --- a/clients/spot/docs/DiffBookDepthRequest.md +++ b/clients/spot/docs/DiffBookDepthRequest.md @@ -7,8 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | -|**updateSpeed** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to query | [optional] | +|**updateSpeed** | **UpdateSpeed** | | [optional] | diff --git a/clients/spot/docs/DiffBookDepthResponse.md b/clients/spot/docs/DiffBookDepthResponse.md index 467901a3b..bb838684d 100644 --- a/clients/spot/docs/DiffBookDepthResponse.md +++ b/clients/spot/docs/DiffBookDepthResponse.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**U** | **Long** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**bLowerCase** | **List<List<String>>** | | [optional] | -|**aLowerCase** | **List<List<String>>** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**U** | **Long** | First update ID in event | [optional] | +|**uLowerCase** | **Long** | Final update ID in event | [optional] | +|**bLowerCase** | **List<List<String>>** | Bids to be updated | [optional] | +|**aLowerCase** | **List<List<String>>** | Asks to be updated | [optional] | diff --git a/clients/spot/docs/EventStreamTerminated.md b/clients/spot/docs/EventStreamTerminated.md index ce20cc043..9435b6103 100644 --- a/clients/spot/docs/EventStreamTerminated.md +++ b/clients/spot/docs/EventStreamTerminated.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | diff --git a/clients/spot/docs/ExchangeInfoRequest.md b/clients/spot/docs/ExchangeInfoRequest.md index 9eab31af6..6a35ca64f 100644 --- a/clients/spot/docs/ExchangeInfoRequest.md +++ b/clients/spot/docs/ExchangeInfoRequest.md @@ -7,10 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | +|**id** | **String** | Client-generated request identifier. | [optional] | +|**symbol** | **String** | Describe a single symbol | [optional] | |**symbols** | **Symbols** | | [optional] | |**permissions** | **Permissions** | | [optional] | -|**showPermissionSets** | **Boolean** | | [optional] | +|**showPermissionSets** | **Boolean** | Controls whether the content of the `permissionSets` field is populated or not. Defaults to `true`. | [optional] | |**symbolStatus** | **SymbolStatus** | | [optional] | diff --git a/clients/spot/docs/ExchangeInfoResponse.md b/clients/spot/docs/ExchangeInfoResponse.md index 09350806e..bde556570 100644 --- a/clients/spot/docs/ExchangeInfoResponse.md +++ b/clients/spot/docs/ExchangeInfoResponse.md @@ -7,10 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**status** | **Long** | | [optional] | -|**result** | [**ExchangeInfoResponseResult**](ExchangeInfoResponseResult.md) | | [optional] | +|**timezone** | **String** | | [optional] | +|**serverTime** | **Long** | | [optional] | |**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**exchangeFilters** | [**List<ExchangeFilters>**](ExchangeFilters.md) | | [optional] | +|**symbols** | [**List<ExchangeInfoResponseSymbolsInner>**](ExchangeInfoResponseSymbolsInner.md) | | [optional] | +|**sors** | [**List<ExchangeInfoResponseSorsInner>**](ExchangeInfoResponseSorsInner.md) | | [optional] | diff --git a/clients/spot/docs/ExchangeInfoResponseResult.md b/clients/spot/docs/ExchangeInfoResponseResult.md deleted file mode 100644 index 4b8556d64..000000000 --- a/clients/spot/docs/ExchangeInfoResponseResult.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# ExchangeInfoResponseResult - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**timezone** | **String** | | [optional] | -|**serverTime** | **Long** | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | -|**exchangeFilters** | [**List<ExchangeFilters>**](ExchangeFilters.md) | | [optional] | -|**symbols** | [**List<ExchangeInfoResponseResultSymbolsInner>**](ExchangeInfoResponseResultSymbolsInner.md) | | [optional] | -|**sors** | [**List<ExchangeInfoResponseResultSorsInner>**](ExchangeInfoResponseResultSorsInner.md) | | [optional] | - - - diff --git a/clients/spot/docs/ExchangeInfoResponseResultSorsInner.md b/clients/spot/docs/ExchangeInfoResponseResultSorsInner.md deleted file mode 100644 index ee42caed2..000000000 --- a/clients/spot/docs/ExchangeInfoResponseResultSorsInner.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ExchangeInfoResponseResultSorsInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**baseAsset** | **String** | | [optional] | -|**symbols** | **List<String>** | | [optional] | - - - diff --git a/clients/spot/docs/ExchangeInfoResponseResultSymbolsInner.md b/clients/spot/docs/ExchangeInfoResponseResultSymbolsInner.md deleted file mode 100644 index 25a5f62ff..000000000 --- a/clients/spot/docs/ExchangeInfoResponseResultSymbolsInner.md +++ /dev/null @@ -1,38 +0,0 @@ - - -# ExchangeInfoResponseResultSymbolsInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**baseAsset** | **String** | | [optional] | -|**baseAssetPrecision** | **Long** | | [optional] | -|**quoteAsset** | **String** | | [optional] | -|**quotePrecision** | **Long** | | [optional] | -|**quoteAssetPrecision** | **Long** | | [optional] | -|**baseCommissionPrecision** | **Long** | | [optional] | -|**quoteCommissionPrecision** | **Long** | | [optional] | -|**orderTypes** | **List<String>** | | [optional] | -|**icebergAllowed** | **Boolean** | | [optional] | -|**ocoAllowed** | **Boolean** | | [optional] | -|**otoAllowed** | **Boolean** | | [optional] | -|**opoAllowed** | **Boolean** | | [optional] | -|**quoteOrderQtyMarketAllowed** | **Boolean** | | [optional] | -|**allowTrailingStop** | **Boolean** | | [optional] | -|**cancelReplaceAllowed** | **Boolean** | | [optional] | -|**amendAllowed** | **Boolean** | | [optional] | -|**pegInstructionsAllowed** | **Boolean** | | [optional] | -|**isSpotTradingAllowed** | **Boolean** | | [optional] | -|**isMarginTradingAllowed** | **Boolean** | | [optional] | -|**filters** | [**List<SymbolFilters>**](SymbolFilters.md) | | [optional] | -|**permissions** | **List<String>** | | [optional] | -|**permissionSets** | **List<List<String>>** | | [optional] | -|**defaultSelfTradePreventionMode** | **String** | | [optional] | -|**allowedSelfTradePreventionModes** | **List<String>** | | [optional] | - - - diff --git a/clients/spot/docs/ExchangeInfoResponseSorsInner.md b/clients/spot/docs/ExchangeInfoResponseSorsInner.md new file mode 100644 index 000000000..fe04b671a --- /dev/null +++ b/clients/spot/docs/ExchangeInfoResponseSorsInner.md @@ -0,0 +1,14 @@ + + +# ExchangeInfoResponseSorsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**baseAsset** | **String** | | [optional] | +|**symbols** | **List<String>** | | [optional] | + + + diff --git a/clients/spot/docs/ExecutionReport.md b/clients/spot/docs/ExecutionReport.md index 02ce47d44..a10a87182 100644 --- a/clients/spot/docs/ExecutionReport.md +++ b/clients/spot/docs/ExecutionReport.md @@ -7,61 +7,61 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**S** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**F** | **String** | | [optional] | -|**gLowerCase** | **Long** | | [optional] | -|**C** | **String** | | [optional] | -|**xLowerCase** | **String** | | [optional] | -|**X** | **String** | | [optional] | -|**rLowerCase** | **String** | | [optional] | -|**iLowerCase** | **Long** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**zLowerCase** | **String** | | [optional] | -|**L** | **String** | | [optional] | -|**nLowerCase** | **String** | | [optional] | -|**N** | **String** | | [optional] | -|**T** | **Long** | | [optional] | -|**tLowerCase** | **Long** | | [optional] | -|**vLowerCase** | **Long** | | [optional] | -|**I** | **Long** | | [optional] | -|**wLowerCase** | **Boolean** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | -|**M** | **Boolean** | | [optional] | -|**O** | **Long** | | [optional] | -|**Z** | **String** | | [optional] | -|**Y** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**W** | **Long** | | [optional] | -|**V** | **String** | | [optional] | -|**dLowerCase** | **Long** | | [optional] | -|**D** | **Long** | | [optional] | -|**jLowerCase** | **Long** | | [optional] | -|**J** | **Long** | | [optional] | -|**A** | **String** | | [optional] | -|**B** | **String** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**U** | **Long** | | [optional] | -|**cs** | **String** | | [optional] | -|**pl** | **String** | | [optional] | -|**pL** | **String** | | [optional] | -|**pY** | **String** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**aLowerCase** | **Long** | | [optional] | -|**kLowerCase** | **String** | | [optional] | -|**uS** | **Boolean** | | [optional] | -|**gP** | **String** | | [optional] | -|**gOT** | **String** | | [optional] | -|**gOV** | **Long** | | [optional] | -|**gp** | **String** | | [optional] | -|**eR** | **String** | | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**cLowerCase** | **String** | Client order ID | [optional] | +|**S** | **String** | Side | [optional] | +|**oLowerCase** | **String** | Order type | [optional] | +|**fLowerCase** | **String** | Time in force | [optional] | +|**qLowerCase** | **String** | Order quantity | [optional] | +|**pLowerCase** | **String** | Order price | [optional] | +|**P** | **String** | Stop price | [optional] | +|**F** | **String** | Iceberg quantity | [optional] | +|**gLowerCase** | **Long** | OrderListId | [optional] | +|**C** | **String** | Original client order ID; This is the ID of the order being canceled | [optional] | +|**xLowerCase** | **String** | Current execution type | [optional] | +|**X** | **String** | Current order status | [optional] | +|**rLowerCase** | **String** | Order reject reason; Please see Order Reject Reason for more information. | [optional] | +|**iLowerCase** | **Long** | Order ID | [optional] | +|**lLowerCase** | **String** | Last executed quantity | [optional] | +|**zLowerCase** | **String** | Cumulative filled quantity | [optional] | +|**L** | **String** | Last executed price | [optional] | +|**nLowerCase** | **String** | Commission amount | [optional] | +|**N** | **String** | Commission asset | [optional] | +|**T** | **Long** | Transaction time | [optional] | +|**tLowerCase** | **Long** | Trade ID | [optional] | +|**vLowerCase** | **Long** | Prevented Match Id; This is only visible if the order expired due to STP | [optional] | +|**I** | **Long** | Execution Id | [optional] | +|**wLowerCase** | **Boolean** | Is the order on the book? | [optional] | +|**mLowerCase** | **Boolean** | Is this trade the maker side? | [optional] | +|**M** | **Boolean** | Ignore | [optional] | +|**O** | **Long** | Order creation time | [optional] | +|**Z** | **String** | Cumulative quote asset transacted quantity | [optional] | +|**Y** | **String** | Last quote asset transacted quantity (i.e. lastPrice * lastQty) | [optional] | +|**Q** | **String** | Quote Order Quantity | [optional] | +|**W** | **Long** | Working Time; This is only visible if the order has been placed on the book. | [optional] | +|**V** | **String** | SelfTradePreventionMode | [optional] | +|**dLowerCase** | **Long** | Trailing Delta | [optional] | +|**D** | **Long** | Trailing Time | [optional] | +|**jLowerCase** | **Long** | Strategy Id | [optional] | +|**J** | **Long** | Strategy Type | [optional] | +|**A** | **String** | Prevented Quantity | [optional] | +|**B** | **String** | Last Prevented Quantity | [optional] | +|**uLowerCase** | **Long** | Trade Group Id | [optional] | +|**U** | **Long** | Counter Order Id | [optional] | +|**cs** | **String** | Counter Symbol | [optional] | +|**pl** | **String** | Prevented Execution Quantity | [optional] | +|**pL** | **String** | Prevented Execution Price | [optional] | +|**pY** | **String** | Prevented Execution Quote Qty | [optional] | +|**bLowerCase** | **String** | Match Type | [optional] | +|**aLowerCase** | **Long** | Allocation ID | [optional] | +|**kLowerCase** | **String** | Working Floor | [optional] | +|**uS** | **Boolean** | UsedSor | [optional] | +|**gP** | **String** | Pegged Price Type | [optional] | +|**gOT** | **String** | Pegged Offset Type | [optional] | +|**gOV** | **Long** | Pegged Offset Value | [optional] | +|**gp** | **String** | Pegged Price | [optional] | +|**eR** | **String** | Expiry Reason. Appears when the order has expired. | [optional] | diff --git a/clients/spot/docs/ExecutionRulesRequest.md b/clients/spot/docs/ExecutionRulesRequest.md index 51c2a7595..316a8ba4e 100644 --- a/clients/spot/docs/ExecutionRulesRequest.md +++ b/clients/spot/docs/ExecutionRulesRequest.md @@ -7,7 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | +|**id** | **String** | Client-generated request identifier. | [optional] | +|**symbol** | **String** | Query for specified symbol. | [optional] | |**symbols** | **Symbols** | | [optional] | |**symbolStatus** | **SymbolStatus** | | [optional] | diff --git a/clients/spot/docs/ExternalLockUpdate.md b/clients/spot/docs/ExternalLockUpdate.md index b9f1e74b1..8bc9950ea 100644 --- a/clients/spot/docs/ExternalLockUpdate.md +++ b/clients/spot/docs/ExternalLockUpdate.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**dLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**aLowerCase** | **String** | Asset | [optional] | +|**dLowerCase** | **String** | Delta | [optional] | +|**T** | **Long** | Transaction Time | [optional] | diff --git a/clients/spot/docs/GeneralApi.md b/clients/spot/docs/GeneralApi.md index fc59fc17d..408f6fb6a 100644 --- a/clients/spot/docs/GeneralApi.md +++ b/clients/spot/docs/GeneralApi.md @@ -4,19 +4,19 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**exchangeInfo**](GeneralApi.md#exchangeInfo) | **POST** /exchangeInfo | WebSocket Exchange information | -| [**executionRules**](GeneralApi.md#executionRules) | **POST** /executionRules | WebSocket Query Execution Rules | -| [**ping**](GeneralApi.md#ping) | **POST** /ping | WebSocket Test connectivity | -| [**time**](GeneralApi.md#time) | **POST** /time | WebSocket Check server time | +| [**exchangeInfo**](GeneralApi.md#exchangeInfo) | **POST** /exchangeInfo | Exchange information | +| [**executionRules**](GeneralApi.md#executionRules) | **POST** /executionRules | Query Execution Rules | +| [**ping**](GeneralApi.md#ping) | **POST** /ping | Test connectivity | +| [**time**](GeneralApi.md#time) | **POST** /time | Check server time | # **exchangeInfo** > ExchangeInfoResponse exchangeInfo(exchangeInfoRequest) -WebSocket Exchange information +Exchange information -Query current exchange trading rules, rate limits, and symbol information. Weight: 20 +Query current exchange trading rules, rate limits, and symbol information. Weight(IP): 20 Security Type: NONE Notes: **Data Source:** Memory **Notes:** * If the value provided to `symbol` or `symbols` do not exist, the endpoint will throw an error saying the symbol is invalid. * All parameters are optional. * Only one of `symbol`, `symbols`, `permissions` parameters can be specified. * Without parameters, `exchangeInfo` displays all symbols with `[\"SPOT\", \"MARGIN\", \"LEVERAGED\"]` permissions. * In order to list *all* active symbols on the exchange, you need to explicitly request all permissions. * `permissions` accepts either a list of permissions, or a single permission name. E.g. `\"SPOT\"`. **Examples of Symbol Permissions Interpretation from the Response:** * `[[\"A\",\"B\"]]` means you may place an order if your account has either permission \"A\" **or** permission \"B\". * `[[\"A\"],[\"B\"]]` means you can place an order if your account has permission \"A\" **and** permission \"B\". * `[[\"A\"],[\"B\",\"C\"]]` means you can place an order if your account has permission \"A\" **and** permission \"B\" or permission \"C\". (Inclusive or is applied here, not exclusive or, so your account may have both permission \"B\" and permission \"C\".) ### Example ```java @@ -76,9 +76,9 @@ No authorization required # **executionRules** > ExecutionRulesResponse executionRules(executionRulesRequest) -WebSocket Query Execution Rules +Query Execution Rules - Weight: Parameter | Weight| --- | --- `symbol` | 2 `symbols` | 2 for each `symbol`, capped at a max of 40| `symbolStatus` |40| None |40| +Query execution rules for symbols. Weight: Parameter | Weight --- | --- `symbol` | 2 `symbols` | 2 for each `symbol`, capped at a max of 40 `symbolStatus` | 40 None | 40 Security Type: NONE Notes: **Data Source:** Memory **Note:** No combination of multiple parameters is allowed. ### Example ```java @@ -138,9 +138,9 @@ No authorization required # **ping** > PingResponse ping() -WebSocket Test connectivity +Test connectivity -Test connectivity to the WebSocket API. Weight: 1 +Test connectivity to the WebSocket API. Note: You can use regular WebSocket ping frames to test connectivity as well, WebSocket API will respond with pong frames as soon as possible. ping request along with time is a safe way to test request-response handling in your application. Weight(IP): 1 Security Type: NONE Notes: **Data Source:** Memory ### Example ```java @@ -196,9 +196,9 @@ No authorization required # **time** > TimeResponse time() -WebSocket Check server time +Check server time -Test connectivity to the WebSocket API and get the current server time. Weight: 1 +Test connectivity to the WebSocket API and get the current server time. Weight(IP): 1 Security Type: NONE Notes: **Data Source:** Memory ### Example ```java diff --git a/clients/spot/docs/GetOpenOrdersResponseInner.md b/clients/spot/docs/GetOpenOrdersResponseInner.md new file mode 100644 index 000000000..548fd39b2 --- /dev/null +++ b/clients/spot/docs/GetOpenOrdersResponseInner.md @@ -0,0 +1,45 @@ + + +# GetOpenOrdersResponseInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**symbol** | **String** | | [optional] | +|**orderId** | **Long** | | [optional] | +|**orderListId** | **Long** | Unless it's part of an order list, value will be -1 | [optional] | +|**clientOrderId** | **String** | | [optional] | +|**price** | **String** | | [optional] | +|**origQty** | **String** | | [optional] | +|**executedQty** | **String** | | [optional] | +|**origQuoteOrderQty** | **String** | | [optional] | +|**cummulativeQuoteQty** | **String** | | [optional] | +|**status** | **String** | | [optional] | +|**timeInForce** | **String** | | [optional] | +|**type** | **String** | | [optional] | +|**side** | **String** | | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**time** | **Long** | | [optional] | +|**updateTime** | **Long** | | [optional] | +|**isWorking** | **Boolean** | | [optional] | +|**workingTime** | **Long** | | [optional] | +|**selfTradePreventionMode** | **String** | | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | + + + diff --git a/clients/spot/docs/GetOrderResponse.md b/clients/spot/docs/GetOrderResponse.md index c56b95e12..f590bd502 100644 --- a/clients/spot/docs/GetOrderResponse.md +++ b/clients/spot/docs/GetOrderResponse.md @@ -7,26 +7,39 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**icebergQty** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | -|**isWorking** | **Boolean** | | [optional] | -|**workingTime** | **Long** | | [optional] | -|**origQuoteOrderQty** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | +|**symbol** | **String** | symbol. | [optional] | +|**orderId** | **Long** | order Id. | [optional] | +|**orderListId** | **Long** | This field will always have a value of -1 if not an order list. | [optional] | +|**clientOrderId** | **String** | client Order Id. | [optional] | +|**price** | **String** | price. | [optional] | +|**origQty** | **String** | orig Qty. | [optional] | +|**executedQty** | **String** | executed Qty. | [optional] | +|**origQuoteOrderQty** | **String** | orig Quote Order Qty. | [optional] | +|**cummulativeQuoteQty** | **String** | cummulative Quote Qty. | [optional] | +|**status** | **String** | status. | [optional] | +|**timeInForce** | **String** | time In Force. | [optional] | +|**type** | **String** | type. | [optional] | +|**side** | **String** | side. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**time** | **Long** | time. | [optional] | +|**updateTime** | **Long** | update Time. | [optional] | +|**isWorking** | **Boolean** | is Working. | [optional] | +|**workingTime** | **Long** | working Time. | [optional] | +|**selfTradePreventionMode** | **String** | self Trade Prevention Mode. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/GetTradesResponseInner.md b/clients/spot/docs/GetTradesResponseInner.md new file mode 100644 index 000000000..87e967465 --- /dev/null +++ b/clients/spot/docs/GetTradesResponseInner.md @@ -0,0 +1,19 @@ + + +# GetTradesResponseInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**price** | **String** | | [optional] | +|**qty** | **String** | | [optional] | +|**quoteQty** | **String** | | [optional] | +|**time** | **Long** | | [optional] | +|**isBuyerMaker** | **Boolean** | | [optional] | +|**isBestMatch** | **Boolean** | | [optional] | + + + diff --git a/clients/spot/docs/HistoricalBlockTradesResponse.md b/clients/spot/docs/HistoricalBlockTradesResponse.md new file mode 100644 index 000000000..edc4d4eaf --- /dev/null +++ b/clients/spot/docs/HistoricalBlockTradesResponse.md @@ -0,0 +1,12 @@ + + +# HistoricalBlockTradesResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/spot/docs/HistoricalBlockTradesResponseInner.md b/clients/spot/docs/HistoricalBlockTradesResponseInner.md new file mode 100644 index 000000000..10e286ba5 --- /dev/null +++ b/clients/spot/docs/HistoricalBlockTradesResponseInner.md @@ -0,0 +1,18 @@ + + +# HistoricalBlockTradesResponseInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**price** | **String** | | [optional] | +|**qty** | **String** | | [optional] | +|**quoteQty** | **String** | | [optional] | +|**time** | **Long** | | [optional] | +|**isBuyerMaker** | **Boolean** | | [optional] | + + + diff --git a/clients/spot/docs/HistoricalTradesResponseInner.md b/clients/spot/docs/HistoricalTradesResponseInner.md deleted file mode 100644 index 7808f253d..000000000 --- a/clients/spot/docs/HistoricalTradesResponseInner.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# HistoricalTradesResponseInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**qty** | **String** | | [optional] | -|**quoteQty** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**isBuyerMaker** | **Boolean** | | [optional] | -|**isBestMatch** | **Boolean** | | [optional] | - - - diff --git a/clients/spot/docs/KlineOffsetRequest.md b/clients/spot/docs/KlineOffsetRequest.md index ae7feb045..277eef183 100644 --- a/clients/spot/docs/KlineOffsetRequest.md +++ b/clients/spot/docs/KlineOffsetRequest.md @@ -7,8 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | -|**interval** | **Interval** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to query | [optional] | +|**interval** | **Interval** | | [optional] | diff --git a/clients/spot/docs/KlineOffsetResponse.md b/clients/spot/docs/KlineOffsetResponse.md index a876243c8..b8bee17c1 100644 --- a/clients/spot/docs/KlineOffsetResponse.md +++ b/clients/spot/docs/KlineOffsetResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | |**kLowerCase** | [**KlineResponseK**](KlineResponseK.md) | | [optional] | diff --git a/clients/spot/docs/KlineRequest.md b/clients/spot/docs/KlineRequest.md index 29ec3c78f..fbdea997f 100644 --- a/clients/spot/docs/KlineRequest.md +++ b/clients/spot/docs/KlineRequest.md @@ -7,8 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | -|**interval** | **Interval** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to query | [optional] | +|**interval** | **Interval** | | [optional] | diff --git a/clients/spot/docs/KlineResponse.md b/clients/spot/docs/KlineResponse.md index f16863203..74fbbc94f 100644 --- a/clients/spot/docs/KlineResponse.md +++ b/clients/spot/docs/KlineResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | |**kLowerCase** | [**KlineResponseK**](KlineResponseK.md) | | [optional] | diff --git a/clients/spot/docs/KlineResponseK.md b/clients/spot/docs/KlineResponseK.md index cb4b458dd..798026990 100644 --- a/clients/spot/docs/KlineResponseK.md +++ b/clients/spot/docs/KlineResponseK.md @@ -2,28 +2,29 @@ # KlineResponseK +Kline payload ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tLowerCase** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**iLowerCase** | **String** | | [optional] | -|**fLowerCase** | **Long** | | [optional] | -|**L** | **Long** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**nLowerCase** | **Long** | | [optional] | -|**xLowerCase** | **Boolean** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**V** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**B** | **String** | | [optional] | +|**tLowerCase** | **Long** | Kline start time | [optional] | +|**T** | **Long** | Kline close time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**iLowerCase** | **String** | Interval | [optional] | +|**fLowerCase** | **Long** | First trade ID | [optional] | +|**L** | **Long** | Last trade ID | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**cLowerCase** | **String** | Close price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | Base asset volume | [optional] | +|**nLowerCase** | **Long** | Number of trades | [optional] | +|**xLowerCase** | **Boolean** | Is this kline closed? | [optional] | +|**qLowerCase** | **String** | Quote asset volume | [optional] | +|**V** | **String** | Taker buy base asset volume | [optional] | +|**Q** | **String** | Taker buy quote asset volume | [optional] | +|**B** | **String** | Ignore | [optional] | diff --git a/clients/spot/docs/KlinesRequest.md b/clients/spot/docs/KlinesRequest.md index 6901816b7..b8f02e2f8 100644 --- a/clients/spot/docs/KlinesRequest.md +++ b/clients/spot/docs/KlinesRequest.md @@ -7,11 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | |**interval** | **Interval** | | | |**startTime** | **Long** | | [optional] | |**endTime** | **Long** | | [optional] | -|**timeZone** | **String** | | [optional] | +|**timeZone** | **String** | Default: 0 (UTC) | [optional] | |**limit** | **Integer** | | [optional] | diff --git a/clients/spot/docs/KlinesResponse.md b/clients/spot/docs/KlinesResponse.md index e5ed84bcb..7c995343d 100644 --- a/clients/spot/docs/KlinesResponse.md +++ b/clients/spot/docs/KlinesResponse.md @@ -9,8 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | -|**result** | **List<KlinesItem>** | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**result** | **List<List<KlinesResponseResultInnerInner>>** | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/KlinesResponseResultInnerInner.md b/clients/spot/docs/KlinesResponseResultInnerInner.md new file mode 100644 index 000000000..f6362291d --- /dev/null +++ b/clients/spot/docs/KlinesResponseResultInnerInner.md @@ -0,0 +1,12 @@ + + +# KlinesResponseResultInnerInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/clients/spot/docs/ListStatus.md b/clients/spot/docs/ListStatus.md index 7c7994081..e2cde8e66 100644 --- a/clients/spot/docs/ListStatus.md +++ b/clients/spot/docs/ListStatus.md @@ -7,16 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**gLowerCase** | **Long** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**L** | **String** | | [optional] | -|**rLowerCase** | **String** | | [optional] | -|**C** | **String** | | [optional] | -|**T** | **Long** | | [optional] | -|**O** | [**List<ListStatusOInner>**](ListStatusOInner.md) | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**gLowerCase** | **Long** | OrderListId | [optional] | +|**cLowerCase** | **String** | Contingency Type | [optional] | +|**lLowerCase** | **String** | List Status Type | [optional] | +|**L** | **String** | List Order Status | [optional] | +|**rLowerCase** | **String** | List Reject Reason | [optional] | +|**C** | **String** | List Client Order ID | [optional] | +|**T** | **Long** | Transaction Time | [optional] | +|**O** | [**List<ListStatusOInner>**](ListStatusOInner.md) | An array of objects | [optional] | diff --git a/clients/spot/docs/ListStatusOInner.md b/clients/spot/docs/ListStatusOInner.md index e96dac730..2c1a7274a 100644 --- a/clients/spot/docs/ListStatusOInner.md +++ b/clients/spot/docs/ListStatusOInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**sLowerCase** | **String** | | [optional] | -|**iLowerCase** | **Long** | | [optional] | -|**cLowerCase** | **String** | | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**iLowerCase** | **Long** | OrderId | [optional] | +|**cLowerCase** | **String** | ClientOrderId | [optional] | diff --git a/clients/spot/docs/MarketApi.md b/clients/spot/docs/MarketApi.md index 20a07c40c..1bb3358cb 100644 --- a/clients/spot/docs/MarketApi.md +++ b/clients/spot/docs/MarketApi.md @@ -4,29 +4,30 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**avgPrice**](MarketApi.md#avgPrice) | **POST** /avgPrice | WebSocket Current average price | -| [**depth**](MarketApi.md#depth) | **POST** /depth | WebSocket Order book | -| [**klines**](MarketApi.md#klines) | **POST** /klines | WebSocket Klines | -| [**referencePrice**](MarketApi.md#referencePrice) | **POST** /referencePrice | WebSocket Query Reference Price | -| [**referencePriceCalculation**](MarketApi.md#referencePriceCalculation) | **POST** /referencePrice.calculation | WebSocket Query Reference Price Calculation | -| [**ticker**](MarketApi.md#ticker) | **POST** /ticker | WebSocket Rolling window price change statistics | -| [**ticker24hr**](MarketApi.md#ticker24hr) | **POST** /ticker.24hr | WebSocket 24hr ticker price change statistics | -| [**tickerBook**](MarketApi.md#tickerBook) | **POST** /ticker.book | WebSocket Symbol order book ticker | -| [**tickerPrice**](MarketApi.md#tickerPrice) | **POST** /ticker.price | WebSocket Symbol price ticker | -| [**tickerTradingDay**](MarketApi.md#tickerTradingDay) | **POST** /ticker.tradingDay | WebSocket Trading Day Ticker | -| [**tradesAggregate**](MarketApi.md#tradesAggregate) | **POST** /trades.aggregate | WebSocket Aggregate trades | -| [**tradesHistorical**](MarketApi.md#tradesHistorical) | **POST** /trades.historical | WebSocket Historical trades | -| [**tradesRecent**](MarketApi.md#tradesRecent) | **POST** /trades.recent | WebSocket Recent trades | -| [**uiKlines**](MarketApi.md#uiKlines) | **POST** /uiKlines | WebSocket UI Klines | +| [**avgPrice**](MarketApi.md#avgPrice) | **POST** /avgPrice | Current average price | +| [**blockTradesHistorical**](MarketApi.md#blockTradesHistorical) | **POST** /blockTrades.historical | Historical Block Trades | +| [**depth**](MarketApi.md#depth) | **POST** /depth | Order book | +| [**klines**](MarketApi.md#klines) | **POST** /klines | Klines | +| [**referencePrice**](MarketApi.md#referencePrice) | **POST** /referencePrice | Query Reference Price | +| [**referencePriceCalculation**](MarketApi.md#referencePriceCalculation) | **POST** /referencePrice.calculation | Query Reference Price Calculation | +| [**ticker**](MarketApi.md#ticker) | **POST** /ticker | Rolling window price change statistics | +| [**ticker24hr**](MarketApi.md#ticker24hr) | **POST** /ticker.24hr | 24hr ticker price change statistics | +| [**tickerBook**](MarketApi.md#tickerBook) | **POST** /ticker.book | Symbol order book ticker | +| [**tickerPrice**](MarketApi.md#tickerPrice) | **POST** /ticker.price | Symbol price ticker | +| [**tickerTradingDay**](MarketApi.md#tickerTradingDay) | **POST** /ticker.tradingDay | Trading Day Ticker | +| [**tradesAggregate**](MarketApi.md#tradesAggregate) | **POST** /trades.aggregate | Aggregate trades | +| [**tradesHistorical**](MarketApi.md#tradesHistorical) | **POST** /trades.historical | Historical trades | +| [**tradesRecent**](MarketApi.md#tradesRecent) | **POST** /trades.recent | Recent trades | +| [**uiKlines**](MarketApi.md#uiKlines) | **POST** /uiKlines | UI Klines | # **avgPrice** > AvgPriceResponse avgPrice(avgPriceRequest) -WebSocket Current average price +Current average price -Get current average price for a symbol. Weight: 2 +Get current average price for a symbol. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory ### Example ```java @@ -82,13 +83,75 @@ No authorization required |-------------|-------------|------------------| | **200** | Current average price | - | + +# **blockTradesHistorical** +> BlockTradesHistoricalResponse blockTradesHistorical(blockTradesHistoricalRequest) + +Historical Block Trades + +Get block trades. Weight(IP): 25 Security Type: NONE Notes: - Data Source: Database + +### Example +```java +// Import classes: +import com.binance.connector.client.spot.ApiClient; +import com.binance.connector.client.spot.ApiException; +import com.binance.connector.client.spot.Configuration; +import com.binance.connector.client.spot.models.*; +import com.binance.connector.client.spot.websocket.api.api.MarketApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + MarketApi apiInstance = new MarketApi(defaultClient); + BlockTradesHistoricalRequest blockTradesHistoricalRequest = new BlockTradesHistoricalRequest(); // BlockTradesHistoricalRequest | + try { + BlockTradesHistoricalResponse result = apiInstance.blockTradesHistorical(blockTradesHistoricalRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MarketApi#blockTradesHistorical"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **blockTradesHistoricalRequest** | [**BlockTradesHistoricalRequest**](BlockTradesHistoricalRequest.md)| | | + +### Return type + +[**BlockTradesHistoricalResponse**](BlockTradesHistoricalResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Historical Block Trades | - | + # **depth** > DepthResponse depth(depthRequest) -WebSocket Order book +Order book -Get current order book. Note that this request returns limited market depth. If you need to continuously monitor order book updates, please consider using WebSocket Streams: * `<symbol>@depth<levels>` * `<symbol>@depth` You can use `depth` request together with `<symbol>@depth` streams to [maintain a local order book](web-socket-streams.md#how-to-manage-a-local-order-book-correctly). Weight: Adjusted based on the limit: | Limit | Weight | |:---------:|:------:| | 1–100 | 5 | | 101–500 | 25| | 501–1000 | 50 | | 1001–5000 | 250 | +Get current order book. Note that this request returns limited market depth. If you need to continuously monitor order book updates, please consider using WebSocket Streams: * `<symbol>@depth<levels>` * `<symbol>@depth` You can use `depth` request together with `<symbol>@depth` streams to [maintain a local order book](/products/spot/web-socket-streams#how-to-manage-a-local-order-book-correctly). Weight: Adjusted based on the limit: |Limit|Request Weight ------|------- 1-100| 5 101-500| 25 501-1000| 50 1001-5000| 250 Security Type: NONE Notes: **Data Source:** Memory ### Example ```java @@ -148,9 +211,9 @@ No authorization required # **klines** > KlinesResponse klines(klinesRequest) -WebSocket Klines +Klines -Get klines (candlestick bars). Klines are uniquely identified by their open & close time. If you need access to real-time kline updates, please consider using WebSocket Streams: * `<symbol>@kline_<interval>` If you need historical kline data, please consider using [data.binance.vision](https://github.com/binance/binance-public-data/#klines). Weight: 2 +Get klines (candlestick bars). Klines are uniquely identified by their open & close time. If you need access to real-time kline updates, please consider using WebSocket Streams: * `<symbol>@kline_<interval>` If you need historical kline data, please consider using [data.binance.vision](https://github.com/binance/binance-public-data/#klines). Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Database Supported kline intervals (case-sensitive): Interval | `interval` value --------- | ---------------- seconds | `1s` minutes | `1m`, `3m`, `5m`, `15m`, `30m` hours | `1h`, `2h`, `4h`, `6h`, `8h`, `12h` days | `1d`, `3d` weeks | `1w` months | `1M` **Notes:** * If `startTime` and `endTime` are not sent, the most recent klines are returned. * Supported values for `timeZone`: * Hours and minutes (e.g. `-1:00`, `05:45`) * Only hours (e.g. `0`, `8`, `4`) * Accepted range is strictly [-12:00 to +14:00] inclusive * If `timeZone` provided, kline intervals are interpreted in that timezone instead of UTC. * Note that `startTime` and `endTime` are always interpreted in UTC, regardless of `timeZone`. ### Example ```java @@ -210,9 +273,9 @@ No authorization required # **referencePrice** > ReferencePriceResponse referencePrice(referencePriceRequest) -WebSocket Query Reference Price +Query Reference Price - Weight: 2 +Query Reference Price Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory ### Example ```java @@ -272,9 +335,9 @@ No authorization required # **referencePriceCalculation** > ReferencePriceCalculationResponse referencePriceCalculation(referencePriceCalculationRequest) -WebSocket Query Reference Price Calculation +Query Reference Price Calculation -Describes how reference price is calculated for a given symbol. Weight: 2 +Query Reference Price Calculation Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory ### Example ```java @@ -334,9 +397,9 @@ No authorization required # **ticker** > TickerResponse ticker(tickerRequest) -WebSocket Rolling window price change statistics +Rolling window price change statistics -Get rolling window price change statistics with a custom window. This request is similar to `ticker.24hr`, but statistics are computed on demand using the arbitrary window you specify. Weight: Adjusted based on the number of requested symbols: | Symbols | Weight | |:-------:|:------:| | 1–50 | 4 per symbol | | 51–100 | 200 | +Get rolling window price change statistics with a custom window. This request is similar to `ticker.24hr` but statistics are computed on demand using the arbitrary window you specify. **Note:** Window size precision is limited to 1 minute. While the `closeTime` is the current time of the request, `openTime` always start on a minute boundary. As such, the effective window might be up to 59999 ms wider than the requested `windowSize`. <details> <summary>Window computation example</summary> For example, a request for `\"windowSize\": \"7d\"` might result in the following window: ```javascript { \"openTime\": 1659580020000, \"closeTime\": 1660184865291 } ``` Time of the request – `closeTime` – is 1660184865291 (August 11, 2022 02:27:45.291). Requested window size should put the `openTime` 7 days before that – August 4, 02:27:45.291 – but due to limited precision it ends up a bit earlier: 1659580020000 (August 4, 2022 02:27:00), exactly at the start of a minute. </details> If you need to continuously monitor trading statistics, please consider using WebSocket Streams: * `<symbol>@ticker_<window_size>` or `!ticker_<window-size>@arr` Weight: Adjusted based on the number of requested symbols: | Symbols | Weight | |:-------:|:------:| | 1–50 | 4 per symbol | | 51–100 | 200 | Security Type: NONE Notes: **Data Source:** Database Supported window sizes: Unit | `windowSize` value ------- | ------------------ minutes | `1m`, `2m` ... `59m` hours | `1h`, `2h` ... `23h` days | `1d`, `2d` ... `7d` Notes: * Either `symbol` or `symbols` must be specified. * Maximum number of symbols in one request: 200. * Window size units cannot be combined. E.g., <code>1d 2h</code> is not supported. ### Example ```java @@ -396,9 +459,9 @@ No authorization required # **ticker24hr** > Ticker24hrResponse ticker24hr(ticker24hrRequest) -WebSocket 24hr ticker price change statistics +24hr ticker price change statistics -Get 24-hour rolling window price change statistics. If you need to continuously monitor trading statistics, please consider using WebSocket Streams: * `<symbol>@ticker` or `!ticker@arr` * `<symbol>@miniTicker` or `!miniTicker@arr` If you need different window sizes, use the `ticker` request. Weight: Adjusted based on the number of requested symbols: | Symbols | Weight | |:-----------:|:------:| | 1–20 | 2 | | 21–100 | 40 | | 101 or more | 80 | | all symbols | 80 | +Get 24-hour rolling window price change statistics. If you need to continuously monitor trading statistics, please consider using WebSocket Streams: * `<symbol>@ticker` or `!ticker@arr` * `<symbol>@miniTicker` or `!miniTicker@arr` If you need different window sizes, use the `ticker` request. Weight: Adjusted based on the number of requested symbols: |Parameter|Symbols Provided|Weight| |---|---|---| |symbol| 1 |2| | |omitted| 80| |symbols| 1-20 |2| | | 21-100 |40| | | 101+ |80| | |omitted| 80| Security Type: NONE Notes: **Data Source:** Memory Notes: * `symbol` and `symbols` cannot be used together. * If no symbol is specified, returns information about all symbols currently trading on the exchange. ### Example ```java @@ -458,9 +521,9 @@ No authorization required # **tickerBook** > TickerBookResponse tickerBook(tickerBookRequest) -WebSocket Symbol order book ticker +Symbol order book ticker -Get the current best price and quantity on the order book. If you need access to real-time order book ticker updates, please consider using WebSocket Streams: * `<symbol>@bookTicker` Weight: Adjusted based on the number of requested symbols: | Parameter | Weight | | --------- |:------:| | `symbol` | 2 | | `symbols` | 4 | | none | 4 | +Get the current best price and quantity on the order book. If you need access to real-time order book ticker updates, please consider using WebSocket Streams: * `<symbol>@bookTicker` Weight: Adjusted based on the number of requested symbols: |Parameter|Symbols Provided|Weight| |---|---|---| |symbol| 1 |2| | |omitted| 4| |symbols| Any |4| Security Type: NONE Notes: **Data Source:** Memory Notes: * `symbol` and `symbols` cannot be used together. * If no symbol is specified, returns information about all symbols currently trading on the exchange. ### Example ```java @@ -520,9 +583,9 @@ No authorization required # **tickerPrice** > TickerPriceResponse tickerPrice(tickerPriceRequest) -WebSocket Symbol price ticker +Symbol price ticker -Get the latest market price for a symbol. If you need access to real-time price updates, please consider using WebSocket Streams: * `<symbol>@aggTrade` * `<symbol>@trade` Weight: Adjusted based on the number of requested symbols: | Parameter | Weight | | --------- |:------:| | `symbol` | 2 | | `symbols` | 4 | | none | 4 | +Get the latest market price for a symbol. If you need access to real-time price updates, please consider using WebSocket Streams: * `<symbol>@aggTrade` * `<symbol>@trade` Weight: Adjusted based on the number of requested symbols: |Parameter|Symbols Provided|Weight| |---|---|---| |symbol| 1 |2| | |omitted| 4| |symbols| Any |4| Security Type: NONE Notes: **Data Source:** Memory Notes: * `symbol` and `symbols` cannot be used together. * If no symbol is specified, returns information about all symbols currently trading on the exchange. ### Example ```java @@ -582,9 +645,9 @@ No authorization required # **tickerTradingDay** > TickerTradingDayResponse tickerTradingDay(tickerTradingDayRequest) -WebSocket Trading Day Ticker +Trading Day Ticker -Price change statistics for a trading day. Weight: 4 for each requested <tt>symbol</tt>. <br/><br/> The weight for this request will cap at 200 once the number of `symbols` in the request is more than 50. +Price change statistics for a trading day. Weight: 4 for each requested symbol regardless of windowSize. The weight for this request will cap at 200 once the number of symbols in the request is more than 50. Security Type: NONE Notes: **Data Source:** Database **Notes:** * Supported values for `timeZone`: * Hours and minutes (e.g. `-1:00`, `05:45`) * Only hours (e.g. `0`, `8`, `4`) ### Example ```java @@ -644,9 +707,9 @@ No authorization required # **tradesAggregate** > TradesAggregateResponse tradesAggregate(tradesAggregateRequest) -WebSocket Aggregate trades +Aggregate trades -Get aggregate trades. An *aggregate trade* (aggtrade) represents one or more individual trades. Trades that fill at the same time, from the same taker order, with the same price – those trades are collected into an aggregate trade with total quantity of the individual trades. If you need access to real-time trading activity, please consider using WebSocket Streams: * `<symbol>@aggTrade` If you need historical aggregate trade data, please consider using [data.binance.vision](https://github.com/binance/binance-public-data/#aggtrades). Weight: 4 +Get aggregate trades. An *aggregate trade* (aggtrade) represents one or more individual trades. Trades that fill at the same time, from the same taker order, with the same price – those trades are collected into an aggregate trade with total quantity of the individual trades. If you need access to real-time trading activity, please consider using WebSocket Streams: * `<symbol>@aggTrade` If you need historical aggregate trade data, please consider using [data.binance.vision](https://github.com/binance/binance-public-data/#aggtrades). Weight(IP): 4 Security Type: NONE Notes: **Data Source:** Database - If `fromId` is specified, return aggtrades with aggregate trade ID >= `fromId`. Use `fromId` and `limit` to page through all aggtrades. - If `startTime` and/or `endTime` are specified, aggtrades are filtered by execution time (`T`). `fromId` cannot be used together with `startTime` and `endTime`. - If no condition is specified, the most recent aggregate trades are returned. ### Example ```java @@ -706,9 +769,9 @@ No authorization required # **tradesHistorical** > TradesHistoricalResponse tradesHistorical(tradesHistoricalRequest) -WebSocket Historical trades +Historical trades -Get historical trades. Weight: 25 +Get historical trades. Weight(IP): 25 Security Type: NONE Notes: **Data Source:** Database Notes: * If `fromId` is not specified, the most recent trades are returned. ### Example ```java @@ -768,9 +831,9 @@ No authorization required # **tradesRecent** > TradesRecentResponse tradesRecent(tradesRecentRequest) -WebSocket Recent trades +Recent trades -Get recent trades. If you need access to real-time trading activity, please consider using WebSocket Streams: * `<symbol>@trade` Weight: 25 +Get recent trades. If you need access to real-time trading activity, please consider using WebSocket Streams: * `<symbol>@trade` Weight(IP): 25 Security Type: NONE Notes: **Data Source:** Memory ### Example ```java @@ -830,9 +893,9 @@ No authorization required # **uiKlines** > UiKlinesResponse uiKlines(uiKlinesRequest) -WebSocket UI Klines +UI Klines -Get klines (candlestick bars) optimized for presentation. This request is similar to `klines`, having the same parameters and response. `uiKlines` return modified kline data, optimized for presentation of candlestick charts. Weight: 2 +Get klines (candlestick bars) optimized for presentation. This request is similar to `klines`, having the same parameters and response. `uiKlines` return modified kline data, optimized for presentation of candlestick charts. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Database - If `startTime` and `endTime` are not sent, the most recent klines are returned. - Supported values for `timeZone`: - Hours and minutes (e.g. `-1:00`, `05:45`) - Only hours (e.g. `0`, `8`, `4`) - Accepted range is strictly [-12:00 to +14:00] inclusive - If `timeZone` provided, kline intervals are interpreted in that timezone instead of UTC. - Note that `startTime` and `endTime` are always interpreted in UTC, regardless of `timeZone`. ### Example ```java diff --git a/clients/spot/docs/MiniTickerRequest.md b/clients/spot/docs/MiniTickerRequest.md index 0647b1fbd..7abd2ec98 100644 --- a/clients/spot/docs/MiniTickerRequest.md +++ b/clients/spot/docs/MiniTickerRequest.md @@ -7,7 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to query | [optional] | diff --git a/clients/spot/docs/MiniTickerResponse.md b/clients/spot/docs/MiniTickerResponse.md index 8df3a5c34..58fb62d2c 100644 --- a/clients/spot/docs/MiniTickerResponse.md +++ b/clients/spot/docs/MiniTickerResponse.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**cLowerCase** | **String** | Close price | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | Total traded base asset volume | [optional] | +|**qLowerCase** | **String** | Total traded quote asset volume | [optional] | diff --git a/clients/spot/docs/MyAllocationsRequest.md b/clients/spot/docs/MyAllocationsRequest.md index 43cf12db4..7645cb7c6 100644 --- a/clients/spot/docs/MyAllocationsRequest.md +++ b/clients/spot/docs/MyAllocationsRequest.md @@ -7,13 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**startTime** | **Long** | | [optional] | -|**endTime** | **Long** | | [optional] | -|**fromAllocationId** | **Integer** | | [optional] | -|**limit** | **Integer** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**startTime** | **Long** | Timestamp in ms | [optional] | +|**endTime** | **Long** | Timestamp in ms | [optional] | +|**fromAllocationId** | **Integer** | Allocation ID to begin at | [optional] | +|**limit** | **Integer** | Default: 500; Maximum: 1000 | [optional] | +|**orderId** | **Long** | Order ID | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/MyAllocationsResponse.md b/clients/spot/docs/MyAllocationsResponse.md index 39364a0fb..77a450cc9 100644 --- a/clients/spot/docs/MyAllocationsResponse.md +++ b/clients/spot/docs/MyAllocationsResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<MyAllocationsResponseResultInner>**](MyAllocationsResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/MyFiltersRequest.md b/clients/spot/docs/MyFiltersRequest.md index 3ea2987a8..aa1548de9 100644 --- a/clients/spot/docs/MyFiltersRequest.md +++ b/clients/spot/docs/MyFiltersRequest.md @@ -7,8 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/MyFiltersResponse.md b/clients/spot/docs/MyFiltersResponse.md index c06b61b95..92956777a 100644 --- a/clients/spot/docs/MyFiltersResponse.md +++ b/clients/spot/docs/MyFiltersResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**status** | **Long** | | [optional] | -|**result** | [**MyFiltersResponseResult**](MyFiltersResponseResult.md) | | [optional] | +|**exchangeFilters** | [**List<ExchangeFilters>**](ExchangeFilters.md) | | [optional] | +|**symbolFilters** | [**List<SymbolFilters>**](SymbolFilters.md) | | [optional] | +|**assetFilters** | [**List<MaxAssetFilter>**](MaxAssetFilter.md) | | [optional] | |**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | diff --git a/clients/spot/docs/MyFiltersResponseAssetFiltersInner.md b/clients/spot/docs/MyFiltersResponseAssetFiltersInner.md new file mode 100644 index 000000000..68c3007d7 --- /dev/null +++ b/clients/spot/docs/MyFiltersResponseAssetFiltersInner.md @@ -0,0 +1,16 @@ + + +# MyFiltersResponseAssetFiltersInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filterType** | **String** | | [optional] | +|**qtyExponent** | **Integer** | | [optional] | +|**limit** | **String** | | [optional] | +|**asset** | **String** | | [optional] | + + + diff --git a/clients/spot/docs/MyFiltersResponseExchangeFiltersInner.md b/clients/spot/docs/MyFiltersResponseExchangeFiltersInner.md new file mode 100644 index 000000000..0b8250431 --- /dev/null +++ b/clients/spot/docs/MyFiltersResponseExchangeFiltersInner.md @@ -0,0 +1,17 @@ + + +# MyFiltersResponseExchangeFiltersInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filterType** | **String** | | [optional] | +|**maxNumOrders** | **Long** | | [optional] | +|**maxNumAlgoOrders** | **Long** | | [optional] | +|**maxNumIcebergOrders** | **Long** | | [optional] | +|**maxNumOrderLists** | **Long** | | [optional] | + + + diff --git a/clients/spot/docs/MyFiltersResponseRateLimitsInner.md b/clients/spot/docs/MyFiltersResponseRateLimitsInner.md new file mode 100644 index 000000000..739a5b182 --- /dev/null +++ b/clients/spot/docs/MyFiltersResponseRateLimitsInner.md @@ -0,0 +1,17 @@ + + +# MyFiltersResponseRateLimitsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rateLimitType** | **String** | | [optional] | +|**interval** | **String** | | [optional] | +|**intervalNum** | **Long** | | [optional] | +|**limit** | **Long** | | [optional] | +|**count** | **Long** | | [optional] | + + + diff --git a/clients/spot/docs/MyFiltersResponseResult.md b/clients/spot/docs/MyFiltersResponseResult.md deleted file mode 100644 index 629c279d0..000000000 --- a/clients/spot/docs/MyFiltersResponseResult.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# MyFiltersResponseResult - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**exchangeFilters** | [**List<ExchangeFilters>**](ExchangeFilters.md) | | [optional] | -|**symbolFilters** | [**List<SymbolFilters>**](SymbolFilters.md) | | [optional] | -|**assetFilters** | [**List<AssetFilters>**](AssetFilters.md) | | [optional] | - - - diff --git a/clients/spot/docs/MyFiltersResponseSymbolFiltersInner.md b/clients/spot/docs/MyFiltersResponseSymbolFiltersInner.md new file mode 100644 index 000000000..630e87e71 --- /dev/null +++ b/clients/spot/docs/MyFiltersResponseSymbolFiltersInner.md @@ -0,0 +1,46 @@ + + +# MyFiltersResponseSymbolFiltersInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filterType** | **String** | | [optional] | +|**priceExponent** | **Integer** | | [optional] | +|**minPrice** | **String** | | [optional] | +|**maxPrice** | **String** | | [optional] | +|**tickSize** | **String** | | [optional] | +|**multiplierExponent** | **Integer** | | [optional] | +|**multiplierUp** | **String** | | [optional] | +|**multiplierDown** | **String** | | [optional] | +|**avgPriceMins** | **Integer** | | [optional] | +|**bidMultiplierUp** | **String** | | [optional] | +|**bidMultiplierDown** | **String** | | [optional] | +|**askMultiplierUp** | **String** | | [optional] | +|**askMultiplierDown** | **String** | | [optional] | +|**qtyExponent** | **Integer** | | [optional] | +|**minQty** | **String** | | [optional] | +|**maxQty** | **String** | | [optional] | +|**stepSize** | **String** | | [optional] | +|**minNotional** | **String** | | [optional] | +|**applyToMarket** | **Boolean** | | [optional] | +|**applyMinToMarket** | **Boolean** | | [optional] | +|**maxNotional** | **String** | | [optional] | +|**applyMaxToMarket** | **Boolean** | | [optional] | +|**limit** | **Long** | | [optional] | +|**maxNumOrders** | **Long** | | [optional] | +|**maxNumAlgoOrders** | **Long** | | [optional] | +|**maxNumIcebergOrders** | **Long** | | [optional] | +|**maxPosition** | **String** | | [optional] | +|**minTrailingAboveDelta** | **Long** | | [optional] | +|**maxTrailingAboveDelta** | **Long** | | [optional] | +|**minTrailingBelowDelta** | **Long** | | [optional] | +|**maxTrailingBelowDelta** | **Long** | | [optional] | +|**endTime** | **Long** | | [optional] | +|**maxNumOrderLists** | **Long** | | [optional] | +|**maxNumOrderAmends** | **Long** | | [optional] | + + + diff --git a/clients/spot/docs/MyPreventedMatchesRequest.md b/clients/spot/docs/MyPreventedMatchesRequest.md index 95e70a9d5..44be1839d 100644 --- a/clients/spot/docs/MyPreventedMatchesRequest.md +++ b/clients/spot/docs/MyPreventedMatchesRequest.md @@ -7,12 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**preventedMatchId** | **Long** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**fromPreventedMatchId** | **Long** | | [optional] | -|**limit** | **Integer** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**preventedMatchId** | **Long** | Prevented match ID | [optional] | +|**orderId** | **Long** | Order ID | [optional] | +|**fromPreventedMatchId** | **Long** | Prevented match ID to begin at | [optional] | +|**limit** | **Integer** | Default: 500; Maximum: 1000 | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/MyPreventedMatchesResponse.md b/clients/spot/docs/MyPreventedMatchesResponse.md index 3cc95631f..3272dc2ac 100644 --- a/clients/spot/docs/MyPreventedMatchesResponse.md +++ b/clients/spot/docs/MyPreventedMatchesResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<MyPreventedMatchesResponseResultInner>**](MyPreventedMatchesResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/MyTradesRequest.md b/clients/spot/docs/MyTradesRequest.md index 0f46b095f..c527765ba 100644 --- a/clients/spot/docs/MyTradesRequest.md +++ b/clients/spot/docs/MyTradesRequest.md @@ -7,13 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**orderId** | **Long** | | [optional] | -|**startTime** | **Long** | | [optional] | -|**endTime** | **Long** | | [optional] | -|**fromId** | **Integer** | | [optional] | -|**limit** | **Integer** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**orderId** | **Long** | This can only be used in combination with `symbol`. | [optional] | +|**startTime** | **Long** | Timestamp in ms | [optional] | +|**endTime** | **Long** | Timestamp in ms | [optional] | +|**fromId** | **Integer** | First trade ID to query | [optional] | +|**limit** | **Integer** | Default: 500; Maximum: 1000 | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/MyTradesResponse.md b/clients/spot/docs/MyTradesResponse.md index 52ef468aa..da1b74e13 100644 --- a/clients/spot/docs/MyTradesResponse.md +++ b/clients/spot/docs/MyTradesResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<MyTradesResponseResultInner>**](MyTradesResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/NewOrderRequest.md b/clients/spot/docs/NewOrderRequest.md index d9bb0bd9e..a61a02dea 100644 --- a/clients/spot/docs/NewOrderRequest.md +++ b/clients/spot/docs/NewOrderRequest.md @@ -14,18 +14,18 @@ |**quantity** | **Double** | | [optional] | |**quoteOrderQty** | **Double** | | [optional] | |**price** | **Double** | | [optional] | -|**newClientOrderId** | **String** | | [optional] | +|**newClientOrderId** | **String** | A unique id among open orders. Automatically generated if not sent.<br/> Orders with the same `newClientOrderID` can be accepted only when the previous one is filled, otherwise the order will be rejected. | [optional] | |**strategyId** | **Long** | | [optional] | -|**strategyType** | **Integer** | | [optional] | -|**stopPrice** | **Double** | | [optional] | -|**trailingDelta** | **Long** | | [optional] | -|**icebergQty** | **Double** | | [optional] | +|**strategyType** | **Integer** | The value cannot be less than `1000000`. | [optional] | +|**stopPrice** | **Double** | Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and `TAKE_PROFIT_LIMIT` orders. | [optional] | +|**trailingDelta** | **Long** | See Trailing Stop order FAQ | [optional] | +|**icebergQty** | **Double** | Used with `LIMIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` to create an iceberg order. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**pegPriceType** | **PegPriceType** | | [optional] | -|**pegOffsetValue** | **Integer** | | [optional] | +|**pegOffsetValue** | **Integer** | Price level to peg the price to (max: 100). See Pegged Orders Info | [optional] | |**pegOffsetType** | **PegOffsetType** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/NewOrderRespType.md b/clients/spot/docs/NewOrderRespType.md index f887be3b0..84608948e 100644 --- a/clients/spot/docs/NewOrderRespType.md +++ b/clients/spot/docs/NewOrderRespType.md @@ -11,9 +11,5 @@ * `FULL` (value: `"FULL"`) -* `MARKET` (value: `"MARKET"`) - -* `LIMIT` (value: `"LIMIT"`) - diff --git a/clients/spot/docs/NewOrderResponse.md b/clients/spot/docs/NewOrderResponse.md index e8ae6a145..8a97f1c67 100644 --- a/clients/spot/docs/NewOrderResponse.md +++ b/clients/spot/docs/NewOrderResponse.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | |**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | +|**orderListId** | **Long** | Unless it's part of an order list, value will be -1 | [optional] | |**clientOrderId** | **String** | | [optional] | |**transactTime** | **Long** | | [optional] | |**price** | **String** | | [optional] | diff --git a/clients/spot/docs/OpenOrderListsStatusRequest.md b/clients/spot/docs/OpenOrderListsStatusRequest.md index adbd84a3f..6f49a4fe1 100644 --- a/clients/spot/docs/OpenOrderListsStatusRequest.md +++ b/clients/spot/docs/OpenOrderListsStatusRequest.md @@ -7,7 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**recvWindow** | **Double** | | [optional] | +|**id** | **String** | Client-generated request identifier. | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OpenOrderListsStatusResponse.md b/clients/spot/docs/OpenOrderListsStatusResponse.md index 706f8bd47..7e11c895d 100644 --- a/clients/spot/docs/OpenOrderListsStatusResponse.md +++ b/clients/spot/docs/OpenOrderListsStatusResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<OpenOrderListsStatusResponseResultInner>**](OpenOrderListsStatusResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OpenOrdersCancelAllRequest.md b/clients/spot/docs/OpenOrdersCancelAllRequest.md index 4d79f9ede..3b7bdcbc9 100644 --- a/clients/spot/docs/OpenOrdersCancelAllRequest.md +++ b/clients/spot/docs/OpenOrdersCancelAllRequest.md @@ -7,8 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OpenOrdersCancelAllResponse.md b/clients/spot/docs/OpenOrdersCancelAllResponse.md index a5b064ef1..92995c596 100644 --- a/clients/spot/docs/OpenOrdersCancelAllResponse.md +++ b/clients/spot/docs/OpenOrdersCancelAllResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<OpenOrdersCancelAllResponseResultInner>**](OpenOrdersCancelAllResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OpenOrdersCancelAllResponseResultInner.md b/clients/spot/docs/OpenOrdersCancelAllResponseResultInner.md index 10ab1db74..4714a16a6 100644 --- a/clients/spot/docs/OpenOrdersCancelAllResponseResultInner.md +++ b/clients/spot/docs/OpenOrdersCancelAllResponseResultInner.md @@ -29,13 +29,22 @@ |**timeInForce** | **String** | | [optional] | |**type** | **String** | | [optional] | |**side** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**trailingDelta** | **Long** | | [optional] | -|**trailingTime** | **Long** | | [optional] | -|**icebergQty** | **String** | | [optional] | -|**strategyId** | **Long** | | [optional] | -|**strategyType** | **Long** | | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OpenOrdersCancelAllResponseResultInnerOrderReportsInner.md b/clients/spot/docs/OpenOrdersCancelAllResponseResultInnerOrderReportsInner.md index 7245b34f2..08f8f3a64 100644 --- a/clients/spot/docs/OpenOrdersCancelAllResponseResultInnerOrderReportsInner.md +++ b/clients/spot/docs/OpenOrdersCancelAllResponseResultInnerOrderReportsInner.md @@ -23,7 +23,21 @@ |**type** | **String** | | [optional] | |**side** | **String** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OpenOrdersStatusRequest.md b/clients/spot/docs/OpenOrdersStatusRequest.md index c694a5460..005e27e4d 100644 --- a/clients/spot/docs/OpenOrdersStatusRequest.md +++ b/clients/spot/docs/OpenOrdersStatusRequest.md @@ -7,8 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**id** | **String** | Client-generated request identifier. | [optional] | +|**symbol** | **String** | If omitted, open orders for all symbols are returned | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OpenOrdersStatusResponse.md b/clients/spot/docs/OpenOrdersStatusResponse.md index b8ccae222..f1961d3f9 100644 --- a/clients/spot/docs/OpenOrdersStatusResponse.md +++ b/clients/spot/docs/OpenOrdersStatusResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<OpenOrdersStatusResponseResultInner>**](OpenOrdersStatusResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OpenOrdersStatusResponseResultInner.md b/clients/spot/docs/OpenOrdersStatusResponseResultInner.md index ac8126b5c..e116a050f 100644 --- a/clients/spot/docs/OpenOrdersStatusResponseResultInner.md +++ b/clients/spot/docs/OpenOrdersStatusResponseResultInner.md @@ -9,24 +9,37 @@ |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | |**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | +|**orderListId** | **Long** | Present only for orders that belong to an order list. | [optional] | |**clientOrderId** | **String** | | [optional] | |**price** | **String** | | [optional] | |**origQty** | **String** | | [optional] | |**executedQty** | **String** | | [optional] | -|**origQuoteOrderQty** | **String** | | [optional] | +|**origQuoteOrderQty** | **String** | Always present. Zero if the order type does not use `quoteOrderQty`. | [optional] | |**cummulativeQuoteQty** | **String** | | [optional] | |**status** | **String** | | [optional] | |**timeInForce** | **String** | | [optional] | |**type** | **String** | | [optional] | |**side** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**icebergQty** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**time** | **Long** | Order placement time. | [optional] | +|**updateTime** | **Long** | Time of the last update to the order. | [optional] | |**isWorking** | **Boolean** | | [optional] | |**workingTime** | **Long** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderAmendKeepPriorityRequest.md b/clients/spot/docs/OrderAmendKeepPriorityRequest.md index 9484fd869..05f924052 100644 --- a/clients/spot/docs/OrderAmendKeepPriorityRequest.md +++ b/clients/spot/docs/OrderAmendKeepPriorityRequest.md @@ -7,12 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**orderId** | **Long** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | -|**newClientOrderId** | **String** | | [optional] | -|**newQty** | **Double** | | | -|**recvWindow** | **Double** | | [optional] | +|**orderId** | **Long** | `orderId` or `origClientOrderId` must be sent | [optional] | +|**origClientOrderId** | **String** | `orderId` or `origClientOrderId` must be sent | [optional] | +|**newClientOrderId** | **String** | The new client order ID for the order after being amended. <br> If not sent, one will be randomly generated. <br> It is possible to reuse the current clientOrderId by sending it as the `newClientOrderId`. | [optional] | +|**newQty** | **Double** | `newQty` must be greater than 0 and less than the order's quantity. | | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderAmendKeepPriorityResponse.md b/clients/spot/docs/OrderAmendKeepPriorityResponse.md index cdcd7765b..1e8f06bb4 100644 --- a/clients/spot/docs/OrderAmendKeepPriorityResponse.md +++ b/clients/spot/docs/OrderAmendKeepPriorityResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderAmendKeepPriorityResponseResult**](OrderAmendKeepPriorityResponseResult.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderAmendKeepPriorityResponseAmendedOrder.md b/clients/spot/docs/OrderAmendKeepPriorityResponseAmendedOrder.md index 399a5f628..f5ddfd548 100644 --- a/clients/spot/docs/OrderAmendKeepPriorityResponseAmendedOrder.md +++ b/clients/spot/docs/OrderAmendKeepPriorityResponseAmendedOrder.md @@ -24,6 +24,21 @@ |**side** | **String** | | [optional] | |**workingTime** | **Long** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderAmendKeepPriorityResponseResultAmendedOrder.md b/clients/spot/docs/OrderAmendKeepPriorityResponseResultAmendedOrder.md index ca56ed0d4..ca45926d4 100644 --- a/clients/spot/docs/OrderAmendKeepPriorityResponseResultAmendedOrder.md +++ b/clients/spot/docs/OrderAmendKeepPriorityResponseResultAmendedOrder.md @@ -24,6 +24,21 @@ |**side** | **String** | | [optional] | |**workingTime** | **Long** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderAmendmentsRequest.md b/clients/spot/docs/OrderAmendmentsRequest.md index 2e311b11a..7f5aa8af9 100644 --- a/clients/spot/docs/OrderAmendmentsRequest.md +++ b/clients/spot/docs/OrderAmendmentsRequest.md @@ -7,11 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**orderId** | **Long** | | | -|**fromExecutionId** | **Long** | | [optional] | -|**limit** | **Long** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**orderId** | **Long** | Order ID | | +|**fromExecutionId** | **Long** | Execution ID to begin at | [optional] | +|**limit** | **Long** | Default: 500; Maximum: 1000 | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderAmendmentsResponse.md b/clients/spot/docs/OrderAmendmentsResponse.md index 24f16cde5..195637f95 100644 --- a/clients/spot/docs/OrderAmendmentsResponse.md +++ b/clients/spot/docs/OrderAmendmentsResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<OrderAmendmentsResponseResultInner>**](OrderAmendmentsResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderCancelReplaceRequest.md b/clients/spot/docs/OrderCancelReplaceRequest.md index 3c4c6b1f3..a45385977 100644 --- a/clients/spot/docs/OrderCancelReplaceRequest.md +++ b/clients/spot/docs/OrderCancelReplaceRequest.md @@ -7,31 +7,32 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | |**cancelReplaceMode** | **CancelReplaceMode** | | | -|**cancelOrderId** | **Long** | | [optional] | -|**cancelOrigClientOrderId** | **String** | | [optional] | -|**cancelNewClientOrderId** | **String** | | [optional] | +|**cancelOrderId** | **Long** | Either `cancelOrderId` or `cancelOrigClientOrderId` must be sent. <br></br>If both `cancelOrderId` and `cancelOrigClientOrderId` parameters are provided, the `cancelOrderId` is searched first, then the `cancelOrigClientOrderId` from that result is checked against that order. <br></br>If both conditions are not met the request will be rejected. | [optional] | +|**cancelOrigClientOrderId** | **String** | Either `cancelOrderId` or `cancelOrigClientOrderId` must be sent. <br></br> If both `cancelOrderId` and `cancelOrigClientOrderId` parameters are provided, the `cancelOrderId` is searched first, then the `cancelOrigClientOrderId` from that result is checked against that order. <br></br> If both conditions are not met the request will be rejected. | [optional] | +|**cancelNewClientOrderId** | **String** | Used to uniquely identify this cancel. Automatically generated by default. | [optional] | |**side** | **Side** | | | |**type** | **OrderType** | | | |**timeInForce** | **TimeInForce** | | [optional] | |**price** | **Double** | | [optional] | |**quantity** | **Double** | | [optional] | |**quoteOrderQty** | **Double** | | [optional] | -|**newClientOrderId** | **String** | | [optional] | +|**newClientOrderId** | **String** | Used to identify the new order. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | -|**stopPrice** | **Double** | | [optional] | -|**trailingDelta** | **Double** | | [optional] | -|**icebergQty** | **Double** | | [optional] | +|**stopPrice** | **Double** | Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and `TAKE_PROFIT_LIMIT` orders. | [optional] | +|**trailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**icebergQty** | **Double** | Used with `LIMIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` to create an iceberg order. | [optional] | |**strategyId** | **Long** | | [optional] | -|**strategyType** | **Integer** | | [optional] | +|**strategyType** | **Integer** | The value cannot be less than `1000000`. | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**cancelRestrictions** | **CancelRestrictions** | | [optional] | |**orderRateLimitExceededMode** | **OrderRateLimitExceededMode** | | [optional] | |**pegPriceType** | **PegPriceType** | | [optional] | -|**pegOffsetValue** | **Integer** | | [optional] | +|**pegOffsetValue** | **Integer** | Price level to peg the price to (max: 100) <br> See Pegged Orders | [optional] | |**pegOffsetType** | **PegOffsetType** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderCancelReplaceResponse.md b/clients/spot/docs/OrderCancelReplaceResponse.md index 94112db22..23f9825af 100644 --- a/clients/spot/docs/OrderCancelReplaceResponse.md +++ b/clients/spot/docs/OrderCancelReplaceResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderCancelReplaceResponseResult**](OrderCancelReplaceResponseResult.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderCancelReplaceResponseCancelResponse.md b/clients/spot/docs/OrderCancelReplaceResponseCancelResponse.md index db2c334eb..5da8905a8 100644 --- a/clients/spot/docs/OrderCancelReplaceResponseCancelResponse.md +++ b/clients/spot/docs/OrderCancelReplaceResponseCancelResponse.md @@ -10,7 +10,7 @@ |**symbol** | **String** | | [optional] | |**origClientOrderId** | **String** | | [optional] | |**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | +|**orderListId** | **Long** | Unless it's part of an order list, value will be -1 | [optional] | |**clientOrderId** | **String** | | [optional] | |**transactTime** | **Long** | | [optional] | |**price** | **String** | | [optional] | @@ -23,6 +23,21 @@ |**type** | **String** | | [optional] | |**side** | **String** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderCancelReplaceResponseData.md b/clients/spot/docs/OrderCancelReplaceResponseData.md deleted file mode 100644 index 5685dd8e5..000000000 --- a/clients/spot/docs/OrderCancelReplaceResponseData.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# OrderCancelReplaceResponseData - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**cancelResult** | **String** | | [optional] | -|**newOrderResult** | **String** | | [optional] | -|**cancelResponse** | [**OrderCancelReplaceResponseDataCancelResponse**](OrderCancelReplaceResponseDataCancelResponse.md) | | [optional] | -|**newOrderResponse** | [**OrderCancelReplaceResponseDataNewOrderResponse**](OrderCancelReplaceResponseDataNewOrderResponse.md) | | [optional] | - - - diff --git a/clients/spot/docs/OrderCancelReplaceResponseDataCancelResponse.md b/clients/spot/docs/OrderCancelReplaceResponseDataCancelResponse.md deleted file mode 100644 index f6124e563..000000000 --- a/clients/spot/docs/OrderCancelReplaceResponseDataCancelResponse.md +++ /dev/null @@ -1,30 +0,0 @@ - - -# OrderCancelReplaceResponseDataCancelResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **Long** | | [optional] | -|**msg** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**transactTime** | **Long** | | [optional] | -|**price** | **String** | | [optional] | -|**origQty** | **String** | | [optional] | -|**executedQty** | **String** | | [optional] | -|**origQuoteOrderQty** | **String** | | [optional] | -|**cummulativeQuoteQty** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**timeInForce** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**side** | **String** | | [optional] | -|**selfTradePreventionMode** | **String** | | [optional] | - - - diff --git a/clients/spot/docs/OrderCancelReplaceResponseDataNewOrderResponse.md b/clients/spot/docs/OrderCancelReplaceResponseDataNewOrderResponse.md deleted file mode 100644 index 87f37bdc2..000000000 --- a/clients/spot/docs/OrderCancelReplaceResponseDataNewOrderResponse.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# OrderCancelReplaceResponseDataNewOrderResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **Long** | | [optional] | -|**msg** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | -|**transactTime** | **Long** | | [optional] | - - - diff --git a/clients/spot/docs/OrderCancelReplaceResponseNewOrderResponse.md b/clients/spot/docs/OrderCancelReplaceResponseNewOrderResponse.md index f995b4e85..30ba6d8c6 100644 --- a/clients/spot/docs/OrderCancelReplaceResponseNewOrderResponse.md +++ b/clients/spot/docs/OrderCancelReplaceResponseNewOrderResponse.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | |**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | +|**orderListId** | **Long** | Unless it's part of an order list, value will be -1 | [optional] | |**clientOrderId** | **String** | | [optional] | |**transactTime** | **Long** | | [optional] | |**price** | **String** | | [optional] | @@ -22,8 +22,23 @@ |**type** | **String** | | [optional] | |**side** | **String** | | [optional] | |**workingTime** | **Long** | | [optional] | -|**fills** | **List<String>** | | [optional] | +|**fills** | [**List<OrderCancelReplaceResponseNewOrderResponseFillsInner>**](OrderCancelReplaceResponseNewOrderResponseFillsInner.md) | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderCancelReplaceResponseNewOrderResponseFillsInner.md b/clients/spot/docs/OrderCancelReplaceResponseNewOrderResponseFillsInner.md new file mode 100644 index 000000000..87c77539a --- /dev/null +++ b/clients/spot/docs/OrderCancelReplaceResponseNewOrderResponseFillsInner.md @@ -0,0 +1,17 @@ + + +# OrderCancelReplaceResponseNewOrderResponseFillsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**price** | **String** | | [optional] | +|**qty** | **String** | | [optional] | +|**commission** | **String** | | [optional] | +|**commissionAsset** | **String** | | [optional] | +|**tradeId** | **Long** | | [optional] | + + + diff --git a/clients/spot/docs/OrderCancelReplaceResponseResultCancelResponse.md b/clients/spot/docs/OrderCancelReplaceResponseResultCancelResponse.md index 277166500..0fe4f73ad 100644 --- a/clients/spot/docs/OrderCancelReplaceResponseResultCancelResponse.md +++ b/clients/spot/docs/OrderCancelReplaceResponseResultCancelResponse.md @@ -23,6 +23,21 @@ |**type** | **String** | | [optional] | |**side** | **String** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderCancelReplaceResponseResultNewOrderResponse.md b/clients/spot/docs/OrderCancelReplaceResponseResultNewOrderResponse.md index 37710b56c..4075546f9 100644 --- a/clients/spot/docs/OrderCancelReplaceResponseResultNewOrderResponse.md +++ b/clients/spot/docs/OrderCancelReplaceResponseResultNewOrderResponse.md @@ -22,6 +22,21 @@ |**type** | **String** | | [optional] | |**side** | **String** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderCancelRequest.md b/clients/spot/docs/OrderCancelRequest.md index 4e209892c..7007e66ae 100644 --- a/clients/spot/docs/OrderCancelRequest.md +++ b/clients/spot/docs/OrderCancelRequest.md @@ -7,12 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | |**orderId** | **Long** | | [optional] | |**origClientOrderId** | **String** | | [optional] | -|**newClientOrderId** | **String** | | [optional] | +|**newClientOrderId** | **String** | Used to uniquely identify this cancel. Automatically generated by default. | [optional] | |**cancelRestrictions** | **CancelRestrictions** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderCancelResponse.md b/clients/spot/docs/OrderCancelResponse.md index 2cd896581..9ed0cef24 100644 --- a/clients/spot/docs/OrderCancelResponse.md +++ b/clients/spot/docs/OrderCancelResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderCancelResponseResult**](OrderCancelResponseResult.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderCancelResponseResult.md b/clients/spot/docs/OrderCancelResponseResult.md index f2de337cc..0e2b0e3fb 100644 --- a/clients/spot/docs/OrderCancelResponseResult.md +++ b/clients/spot/docs/OrderCancelResponseResult.md @@ -22,12 +22,22 @@ |**timeInForce** | **String** | | [optional] | |**type** | **String** | | [optional] | |**side** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**trailingDelta** | **Long** | | [optional] | -|**icebergQty** | **String** | | [optional] | -|**strategyId** | **Long** | | [optional] | -|**strategyType** | **Long** | | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | |**contingencyType** | **String** | | [optional] | |**listStatusType** | **String** | | [optional] | |**listOrderStatus** | **String** | | [optional] | diff --git a/clients/spot/docs/OrderListCancelRequest.md b/clients/spot/docs/OrderListCancelRequest.md index 237328133..5ea3e1505 100644 --- a/clients/spot/docs/OrderListCancelRequest.md +++ b/clients/spot/docs/OrderListCancelRequest.md @@ -7,11 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**orderListId** | **Integer** | | [optional] | -|**listClientOrderId** | **String** | | [optional] | -|**newClientOrderId** | **String** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**orderListId** | **Integer** | Either `orderListId` or `listClientOrderId` must be provided | [optional] | +|**listClientOrderId** | **String** | Either `orderListId` or `listClientOrderId` must be provided | [optional] | +|**newClientOrderId** | **String** | Used to uniquely identify this cancel. Automatically generated by default. | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderListCancelResponse.md b/clients/spot/docs/OrderListCancelResponse.md index 5a123bd1e..52f98a2f7 100644 --- a/clients/spot/docs/OrderListCancelResponse.md +++ b/clients/spot/docs/OrderListCancelResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderListCancelResponseResult**](OrderListCancelResponseResult.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderListCancelResponseResult.md b/clients/spot/docs/OrderListCancelResponseResult.md index e4da46f02..0da0c4a0d 100644 --- a/clients/spot/docs/OrderListCancelResponseResult.md +++ b/clients/spot/docs/OrderListCancelResponseResult.md @@ -14,7 +14,7 @@ |**listClientOrderId** | **String** | | [optional] | |**transactionTime** | **Long** | | [optional] | |**symbol** | **String** | | [optional] | -|**orders** | [**List<OrderListCancelResponseResultOrdersInner>**](OrderListCancelResponseResultOrdersInner.md) | | [optional] | +|**orders** | [**List<AllOrderListsResponseResultInnerOrdersInner>**](AllOrderListsResponseResultInnerOrdersInner.md) | | [optional] | |**orderReports** | [**List<OrderListCancelResponseResultOrderReportsInner>**](OrderListCancelResponseResultOrderReportsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderListCancelResponseResultOrderReportsInner.md b/clients/spot/docs/OrderListCancelResponseResultOrderReportsInner.md index fde663d45..5bdd1fa4f 100644 --- a/clients/spot/docs/OrderListCancelResponseResultOrderReportsInner.md +++ b/clients/spot/docs/OrderListCancelResponseResultOrderReportsInner.md @@ -22,7 +22,21 @@ |**type** | **String** | | [optional] | |**side** | **String** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderListCancelResponseResultOrdersInner.md b/clients/spot/docs/OrderListCancelResponseResultOrdersInner.md deleted file mode 100644 index e16613ec1..000000000 --- a/clients/spot/docs/OrderListCancelResponseResultOrdersInner.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# OrderListCancelResponseResultOrdersInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**orderId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | - - - diff --git a/clients/spot/docs/OrderListOcoRequest.md b/clients/spot/docs/OrderListOcoRequest.md index 08a32c460..0644f164c 100644 --- a/clients/spot/docs/OrderListOcoRequest.md +++ b/clients/spot/docs/OrderListOcoRequest.md @@ -8,36 +8,36 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**listClientOrderId** | **String** | | [optional] | +|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `aboveClientOrderId` and the `belowClientOrderId`. | [optional] | |**side** | **Side** | | | -|**quantity** | **Double** | | | +|**quantity** | **Double** | Quantity for both orders of the order list. | | |**aboveType** | **AboveType** | | | -|**aboveClientOrderId** | **String** | | [optional] | -|**aboveIcebergQty** | **Long** | | [optional] | -|**abovePrice** | **Double** | | [optional] | -|**aboveStopPrice** | **Double** | | [optional] | -|**aboveTrailingDelta** | **Long** | | [optional] | +|**aboveClientOrderId** | **String** | Arbitrary unique ID among open orders for the above order. Automatically generated if not sent. | [optional] | +|**aboveIcebergQty** | **Long** | Note that this can only be used if `aboveTimeInForce` is `GTC`. | [optional] | +|**abovePrice** | **Double** | Can be used if `aboveType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | +|**aboveStopPrice** | **Double** | Can be used if `aboveType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `aboveStopPrice` or `aboveTrailingDelta` or both, must be specified. | [optional] | +|**aboveTrailingDelta** | **Long** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | |**aboveTimeInForce** | **AboveTimeInForce** | | [optional] | -|**aboveStrategyId** | **Long** | | [optional] | -|**aboveStrategyType** | **Integer** | | [optional] | +|**aboveStrategyId** | **Long** | Arbitrary numeric value identifying the above order within an order strategy. | [optional] | +|**aboveStrategyType** | **Integer** | Arbitrary numeric value identifying the above order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**abovePegPriceType** | **AbovePegPriceType** | | [optional] | |**abovePegOffsetType** | **AbovePegOffsetType** | | [optional] | |**abovePegOffsetValue** | **Integer** | | [optional] | |**belowType** | **BelowType** | | | -|**belowClientOrderId** | **String** | | [optional] | -|**belowIcebergQty** | **Long** | | [optional] | -|**belowPrice** | **Double** | | [optional] | -|**belowStopPrice** | **Double** | | [optional] | -|**belowTrailingDelta** | **Long** | | [optional] | +|**belowClientOrderId** | **String** | Arbitrary unique ID among open orders for the below order. Automatically generated if not sent. | [optional] | +|**belowIcebergQty** | **Long** | Note that this can only be used if `belowTimeInForce` is `GTC`. | [optional] | +|**belowPrice** | **Double** | Can be used if `belowType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | +|**belowStopPrice** | **Double** | Can be used if `belowType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `belowStopPrice` or `belowTrailingDelta` or both, must be specified. | [optional] | +|**belowTrailingDelta** | **Long** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | |**belowTimeInForce** | **BelowTimeInForce** | | [optional] | -|**belowStrategyId** | **Long** | | [optional] | -|**belowStrategyType** | **Integer** | | [optional] | +|**belowStrategyId** | **Long** | Arbitrary numeric value identifying the below order within an order strategy. | [optional] | +|**belowStrategyType** | **Integer** | Arbitrary numeric value identifying the below order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**belowPegPriceType** | **BelowPegPriceType** | | [optional] | |**belowPegOffsetType** | **BelowPegOffsetType** | | [optional] | |**belowPegOffsetValue** | **Integer** | | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | The value cannot be greater than `60000`. Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderListOpoRequest.md b/clients/spot/docs/OrderListOpoRequest.md index 1eba62d6d..903336809 100644 --- a/clients/spot/docs/OrderListOpoRequest.md +++ b/clients/spot/docs/OrderListOpoRequest.md @@ -8,35 +8,35 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**listClientOrderId** | **String** | | [optional] | +|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**workingType** | **WorkingType** | | | |**workingSide** | **WorkingSide** | | | -|**workingClientOrderId** | **String** | | [optional] | -|**workingPrice** | **Double** | | | -|**workingQuantity** | **Double** | | | -|**workingIcebergQty** | **Double** | | [optional] | +|**workingClientOrderId** | **String** | Arbitrary unique ID among open orders for the working order. Automatically generated if not sent. | [optional] | +|**workingPrice** | **Double** | Price for the working order. | | +|**workingQuantity** | **Double** | Sets the quantity for the working order. | | +|**workingIcebergQty** | **Double** | This can only be used if `workingTimeInForce` is `GTC`, or if `workingType` is `LIMIT_MAKER`. | [optional] | |**workingTimeInForce** | **WorkingTimeInForce** | | [optional] | -|**workingStrategyId** | **Long** | | [optional] | -|**workingStrategyType** | **Integer** | | [optional] | +|**workingStrategyId** | **Long** | Arbitrary numeric value identifying the working order within an order strategy. | [optional] | +|**workingStrategyType** | **Integer** | Arbitrary numeric value identifying the working order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**workingPegPriceType** | **WorkingPegPriceType** | | [optional] | |**workingPegOffsetType** | **WorkingPegOffsetType** | | [optional] | |**workingPegOffsetValue** | **Integer** | | [optional] | |**pendingType** | **PendingType** | | | |**pendingSide** | **PendingSide** | | | -|**pendingClientOrderId** | **String** | | [optional] | -|**pendingPrice** | **Double** | | [optional] | -|**pendingStopPrice** | **Double** | | [optional] | -|**pendingTrailingDelta** | **Double** | | [optional] | -|**pendingIcebergQty** | **Double** | | [optional] | +|**pendingClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending order. Automatically generated if not sent. | [optional] | +|**pendingPrice** | **Double** | Price for the pending order. | [optional] | +|**pendingStopPrice** | **Double** | Stop price for the pending order. | [optional] | +|**pendingTrailingDelta** | **Double** | Trailing delta for the pending order. | [optional] | +|**pendingIcebergQty** | **Double** | This can only be used if `pendingTimeInForce` is `GTC` or if `pendingType` is `LIMIT_MAKER`. | [optional] | |**pendingTimeInForce** | **PendingTimeInForce** | | [optional] | -|**pendingStrategyId** | **Long** | | [optional] | -|**pendingStrategyType** | **Integer** | | [optional] | +|**pendingStrategyId** | **Long** | Arbitrary numeric value identifying the pending order within an order strategy. | [optional] | +|**pendingStrategyType** | **Integer** | Arbitrary numeric value identifying the pending order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**pendingPegPriceType** | **PendingPegPriceType** | | [optional] | |**pendingPegOffsetType** | **PendingPegOffsetType** | | [optional] | |**pendingPegOffsetValue** | **Integer** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderListOpoResponseOrderReportsInner.md b/clients/spot/docs/OrderListOpoResponseOrderReportsInner.md index c316d1785..0207aab53 100644 --- a/clients/spot/docs/OrderListOpoResponseOrderReportsInner.md +++ b/clients/spot/docs/OrderListOpoResponseOrderReportsInner.md @@ -23,6 +23,21 @@ |**workingTime** | **Long** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | |**origQty** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderListOpocoRequest.md b/clients/spot/docs/OrderListOpocoRequest.md index 0c93b25c7..75e1c2a30 100644 --- a/clients/spot/docs/OrderListOpocoRequest.md +++ b/clients/spot/docs/OrderListOpocoRequest.md @@ -8,47 +8,47 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**listClientOrderId** | **String** | | [optional] | +|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**workingType** | **WorkingType** | | | |**workingSide** | **WorkingSide** | | | -|**workingClientOrderId** | **String** | | [optional] | -|**workingPrice** | **Double** | | | -|**workingQuantity** | **Double** | | | -|**workingIcebergQty** | **Double** | | [optional] | +|**workingClientOrderId** | **String** | Arbitrary unique ID among open orders for the working order. Automatically generated if not sent. | [optional] | +|**workingPrice** | **Double** | Price for the working order. | | +|**workingQuantity** | **Double** | Sets the quantity for the working order. | | +|**workingIcebergQty** | **Double** | This can only be used if `workingTimeInForce` is `GTC`, or if `workingType` is `LIMIT_MAKER`. | [optional] | |**workingTimeInForce** | **WorkingTimeInForce** | | [optional] | -|**workingStrategyId** | **Long** | | [optional] | -|**workingStrategyType** | **Integer** | | [optional] | +|**workingStrategyId** | **Long** | Arbitrary numeric value identifying the working order within an order strategy. | [optional] | +|**workingStrategyType** | **Integer** | Arbitrary numeric value identifying the working order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**workingPegPriceType** | **WorkingPegPriceType** | | [optional] | |**workingPegOffsetType** | **WorkingPegOffsetType** | | [optional] | -|**workingPegOffsetValue** | **Integer** | | [optional] | +|**workingPegOffsetValue** | **Integer** | Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) | [optional] | |**pendingSide** | **PendingSide** | | | |**pendingAboveType** | **PendingAboveType** | | | -|**pendingAboveClientOrderId** | **String** | | [optional] | -|**pendingAbovePrice** | **Double** | | [optional] | -|**pendingAboveStopPrice** | **Double** | | [optional] | -|**pendingAboveTrailingDelta** | **Double** | | [optional] | -|**pendingAboveIcebergQty** | **Double** | | [optional] | +|**pendingAboveClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending above order. Automatically generated if not sent. | [optional] | +|**pendingAbovePrice** | **Double** | Can be used if `pendingAboveType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | +|**pendingAboveStopPrice** | **Double** | Can be used if `pendingAboveType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. | [optional] | +|**pendingAboveTrailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**pendingAboveIcebergQty** | **Double** | This can only be used if `pendingAboveTimeInForce` is `GTC` or `pendingAboveType` is `LIMIT_MAKER`. | [optional] | |**pendingAboveTimeInForce** | **PendingAboveTimeInForce** | | [optional] | -|**pendingAboveStrategyId** | **Long** | | [optional] | -|**pendingAboveStrategyType** | **Integer** | | [optional] | +|**pendingAboveStrategyId** | **Long** | Arbitrary numeric value identifying the pending above order within an order strategy. | [optional] | +|**pendingAboveStrategyType** | **Integer** | Arbitrary numeric value identifying the pending above order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**pendingAbovePegPriceType** | **PendingAbovePegPriceType** | | [optional] | |**pendingAbovePegOffsetType** | **PendingAbovePegOffsetType** | | [optional] | -|**pendingAbovePegOffsetValue** | **Integer** | | [optional] | +|**pendingAbovePegOffsetValue** | **Integer** | Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) | [optional] | |**pendingBelowType** | **PendingBelowType** | | [optional] | -|**pendingBelowClientOrderId** | **String** | | [optional] | -|**pendingBelowPrice** | **Double** | | [optional] | -|**pendingBelowStopPrice** | **Double** | | [optional] | -|**pendingBelowTrailingDelta** | **Double** | | [optional] | -|**pendingBelowIcebergQty** | **Double** | | [optional] | +|**pendingBelowClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending below order. Automatically generated if not sent. | [optional] | +|**pendingBelowPrice** | **Double** | Can be used if `pendingBelowType` is `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | +|**pendingBelowStopPrice** | **Double** | Can be used if `pendingBelowType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `pendingBelowStopPrice` or `pendingBelowTrailingDelta` or both, must be specified. | [optional] | +|**pendingBelowTrailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**pendingBelowIcebergQty** | **Double** | This can only be used if `pendingBelowTimeInForce` is `GTC` or `pendingBelowType` is `LIMIT_MAKER`. | [optional] | |**pendingBelowTimeInForce** | **PendingBelowTimeInForce** | | [optional] | -|**pendingBelowStrategyId** | **Long** | | [optional] | -|**pendingBelowStrategyType** | **Integer** | | [optional] | +|**pendingBelowStrategyId** | **Long** | Arbitrary numeric value identifying the pending below order within an order strategy. | [optional] | +|**pendingBelowStrategyType** | **Integer** | Arbitrary numeric value identifying the pending below order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**pendingBelowPegPriceType** | **PendingBelowPegPriceType** | | [optional] | |**pendingBelowPegOffsetType** | **PendingBelowPegOffsetType** | | [optional] | |**pendingBelowPegOffsetValue** | **Integer** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | The value cannot be greater than `60000`. Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderListOpocoResponseOrderReportsInner.md b/clients/spot/docs/OrderListOpocoResponseOrderReportsInner.md index 3eb373593..b66e7245f 100644 --- a/clients/spot/docs/OrderListOpocoResponseOrderReportsInner.md +++ b/clients/spot/docs/OrderListOpocoResponseOrderReportsInner.md @@ -22,8 +22,22 @@ |**side** | **String** | | [optional] | |**workingTime** | **Long** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | |**origQty** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderListOtoRequest.md b/clients/spot/docs/OrderListOtoRequest.md index 718bb2aef..0d72f7f3c 100644 --- a/clients/spot/docs/OrderListOtoRequest.md +++ b/clients/spot/docs/OrderListOtoRequest.md @@ -8,36 +8,36 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**listClientOrderId** | **String** | | [optional] | +|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**workingType** | **WorkingType** | | | |**workingSide** | **WorkingSide** | | | -|**workingClientOrderId** | **String** | | [optional] | +|**workingClientOrderId** | **String** | Arbitrary unique ID among open orders for the working order. Automatically generated if not sent. | [optional] | |**workingPrice** | **Double** | | | -|**workingQuantity** | **Double** | | | -|**workingIcebergQty** | **Double** | | [optional] | +|**workingQuantity** | **Double** | Sets the quantity for the working order. | | +|**workingIcebergQty** | **Double** | This can only be used if `workingTimeInForce` is `GTC`, or if `workingType` is `LIMIT_MAKER`. | [optional] | |**workingTimeInForce** | **WorkingTimeInForce** | | [optional] | -|**workingStrategyId** | **Long** | | [optional] | -|**workingStrategyType** | **Integer** | | [optional] | +|**workingStrategyId** | **Long** | Arbitrary numeric value identifying the working order within an order strategy. | [optional] | +|**workingStrategyType** | **Integer** | Arbitrary numeric value identifying the working order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | +|**pendingType** | **PendingType** | | | |**workingPegPriceType** | **WorkingPegPriceType** | | [optional] | |**workingPegOffsetType** | **WorkingPegOffsetType** | | [optional] | |**workingPegOffsetValue** | **Integer** | | [optional] | -|**pendingType** | **PendingType** | | | |**pendingSide** | **PendingSide** | | | -|**pendingClientOrderId** | **String** | | [optional] | +|**pendingClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending order. Automatically generated if not sent. | [optional] | |**pendingPrice** | **Double** | | [optional] | |**pendingStopPrice** | **Double** | | [optional] | |**pendingTrailingDelta** | **Double** | | [optional] | -|**pendingQuantity** | **Double** | | | -|**pendingIcebergQty** | **Double** | | [optional] | +|**pendingQuantity** | **Double** | Sets the quantity for the pending order. | | +|**pendingIcebergQty** | **Double** | This can only be used if `pendingTimeInForce` is `GTC` or if `pendingType` is `LIMIT_MAKER`. | [optional] | |**pendingTimeInForce** | **PendingTimeInForce** | | [optional] | -|**pendingStrategyId** | **Long** | | [optional] | -|**pendingStrategyType** | **Integer** | | [optional] | +|**pendingStrategyId** | **Long** | Arbitrary numeric value identifying the pending order within an order strategy. | [optional] | +|**pendingStrategyType** | **Integer** | Arbitrary numeric value identifying the pending order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**pendingPegPriceType** | **PendingPegPriceType** | | [optional] | |**pendingPegOffsetType** | **PendingPegOffsetType** | | [optional] | |**pendingPegOffsetValue** | **Integer** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | The value cannot be greater than `60000`. Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderListOtoResponseOrderReportsInner.md b/clients/spot/docs/OrderListOtoResponseOrderReportsInner.md index 27457f477..2a951f5e2 100644 --- a/clients/spot/docs/OrderListOtoResponseOrderReportsInner.md +++ b/clients/spot/docs/OrderListOtoResponseOrderReportsInner.md @@ -23,6 +23,21 @@ |**side** | **String** | | [optional] | |**workingTime** | **Long** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderListOtocoRequest.md b/clients/spot/docs/OrderListOtocoRequest.md index 3fbc5b9ac..863f97337 100644 --- a/clients/spot/docs/OrderListOtocoRequest.md +++ b/clients/spot/docs/OrderListOtocoRequest.md @@ -8,48 +8,48 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**listClientOrderId** | **String** | | [optional] | +|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**workingType** | **WorkingType** | | | |**workingSide** | **WorkingSide** | | | -|**workingClientOrderId** | **String** | | [optional] | +|**workingClientOrderId** | **String** | Arbitrary unique ID among open orders for the working order. Automatically generated if not sent. | [optional] | |**workingPrice** | **Double** | | | -|**workingQuantity** | **Double** | | | -|**workingIcebergQty** | **Double** | | [optional] | +|**workingQuantity** | **Double** | Sets the quantity for the working order. | | +|**workingIcebergQty** | **Double** | This can only be used if `workingTimeInForce` is `GTC`, or if `workingType` is `LIMIT_MAKER`. | [optional] | |**workingTimeInForce** | **WorkingTimeInForce** | | [optional] | -|**workingStrategyId** | **Long** | | [optional] | -|**workingStrategyType** | **Integer** | | [optional] | +|**workingStrategyId** | **Long** | Arbitrary numeric value identifying the working order within an order strategy. | [optional] | +|**workingStrategyType** | **Integer** | Arbitrary numeric value identifying the working order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**workingPegPriceType** | **WorkingPegPriceType** | | [optional] | |**workingPegOffsetType** | **WorkingPegOffsetType** | | [optional] | |**workingPegOffsetValue** | **Integer** | | [optional] | |**pendingSide** | **PendingSide** | | | -|**pendingQuantity** | **Double** | | | +|**pendingQuantity** | **Double** | Sets the quantity for the pending orders. | | |**pendingAboveType** | **PendingAboveType** | | | -|**pendingAboveClientOrderId** | **String** | | [optional] | -|**pendingAbovePrice** | **Double** | | [optional] | -|**pendingAboveStopPrice** | **Double** | | [optional] | -|**pendingAboveTrailingDelta** | **Double** | | [optional] | -|**pendingAboveIcebergQty** | **Double** | | [optional] | +|**pendingAboveClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending above order. Automatically generated if not sent. | [optional] | +|**pendingAbovePrice** | **Double** | Can be used if `pendingAboveType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | +|**pendingAboveStopPrice** | **Double** | Can be used if `pendingAboveType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. | [optional] | +|**pendingAboveTrailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**pendingAboveIcebergQty** | **Double** | This can only be used if `pendingAboveTimeInForce` is `GTC` or if `pendingAboveType` is `LIMIT_MAKER`. | [optional] | |**pendingAboveTimeInForce** | **PendingAboveTimeInForce** | | [optional] | -|**pendingAboveStrategyId** | **Long** | | [optional] | -|**pendingAboveStrategyType** | **Integer** | | [optional] | +|**pendingAboveStrategyId** | **Long** | Arbitrary numeric value identifying the pending above order within an order strategy. | [optional] | +|**pendingAboveStrategyType** | **Integer** | Arbitrary numeric value identifying the pending above order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**pendingAbovePegPriceType** | **PendingAbovePegPriceType** | | [optional] | |**pendingAbovePegOffsetType** | **PendingAbovePegOffsetType** | | [optional] | |**pendingAbovePegOffsetValue** | **Integer** | | [optional] | |**pendingBelowType** | **PendingBelowType** | | [optional] | -|**pendingBelowClientOrderId** | **String** | | [optional] | -|**pendingBelowPrice** | **Double** | | [optional] | -|**pendingBelowStopPrice** | **Double** | | [optional] | -|**pendingBelowTrailingDelta** | **Double** | | [optional] | -|**pendingBelowIcebergQty** | **Double** | | [optional] | +|**pendingBelowClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending below order. Automatically generated if not sent. | [optional] | +|**pendingBelowPrice** | **Double** | Can be used if `pendingBelowType` is `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | +|**pendingBelowStopPrice** | **Double** | Can be used if `pendingBelowType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `pendingBelowStopPrice` or `pendingBelowTrailingDelta` or both, must be specified. | [optional] | +|**pendingBelowTrailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**pendingBelowIcebergQty** | **Double** | This can only be used if `pendingBelowTimeInForce` is `GTC`, or if `pendingBelowType` is `LIMIT_MAKER`. | [optional] | |**pendingBelowTimeInForce** | **PendingBelowTimeInForce** | | [optional] | -|**pendingBelowStrategyId** | **Long** | | [optional] | -|**pendingBelowStrategyType** | **Integer** | | [optional] | +|**pendingBelowStrategyId** | **Long** | Arbitrary numeric value identifying the pending below order within an order strategy. | [optional] | +|**pendingBelowStrategyType** | **Integer** | Arbitrary numeric value identifying the pending below order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**pendingBelowPegPriceType** | **PendingBelowPegPriceType** | | [optional] | |**pendingBelowPegOffsetType** | **PendingBelowPegOffsetType** | | [optional] | |**pendingBelowPegOffsetValue** | **Integer** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | The value cannot be greater than `60000`. Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderListOtocoResponseOrderReportsInner.md b/clients/spot/docs/OrderListOtocoResponseOrderReportsInner.md index d12a39b1c..dcf67dc03 100644 --- a/clients/spot/docs/OrderListOtocoResponseOrderReportsInner.md +++ b/clients/spot/docs/OrderListOtocoResponseOrderReportsInner.md @@ -23,7 +23,21 @@ |**side** | **String** | | [optional] | |**workingTime** | **Long** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOcoRequest.md b/clients/spot/docs/OrderListPlaceOcoRequest.md index c5eb42693..1d7e66bce 100644 --- a/clients/spot/docs/OrderListPlaceOcoRequest.md +++ b/clients/spot/docs/OrderListPlaceOcoRequest.md @@ -7,37 +7,38 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**listClientOrderId** | **String** | | [optional] | +|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `aboveClientOrderId` and the `belowClientOrderId`. | [optional] | |**side** | **Side** | | | -|**quantity** | **Double** | | | +|**quantity** | **Double** | Quantity for both orders of the order list. | | |**aboveType** | **AboveType** | | | -|**aboveClientOrderId** | **String** | | [optional] | -|**aboveIcebergQty** | **Long** | | [optional] | -|**abovePrice** | **Double** | | [optional] | -|**aboveStopPrice** | **Double** | | [optional] | -|**aboveTrailingDelta** | **Long** | | [optional] | +|**aboveClientOrderId** | **String** | Arbitrary unique ID among open orders for the above order. Automatically generated if not sent. | [optional] | +|**aboveIcebergQty** | **Long** | Note that this can only be used if `aboveTimeInForce` is `GTC`. | [optional] | +|**abovePrice** | **Double** | Can be used if `aboveType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | +|**aboveStopPrice** | **Double** | Can be used if `aboveType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `aboveStopPrice` or `aboveTrailingDelta` or both, must be specified. | [optional] | +|**aboveTrailingDelta** | **Long** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | |**aboveTimeInForce** | **AboveTimeInForce** | | [optional] | -|**aboveStrategyId** | **Long** | | [optional] | -|**aboveStrategyType** | **Integer** | | [optional] | +|**aboveStrategyId** | **Long** | Arbitrary numeric value identifying the above order within an order strategy. | [optional] | +|**aboveStrategyType** | **Integer** | Arbitrary numeric value identifying the above order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**abovePegPriceType** | **AbovePegPriceType** | | [optional] | |**abovePegOffsetType** | **AbovePegOffsetType** | | [optional] | |**abovePegOffsetValue** | **Integer** | | [optional] | |**belowType** | **BelowType** | | | -|**belowClientOrderId** | **String** | | [optional] | -|**belowIcebergQty** | **Long** | | [optional] | -|**belowPrice** | **Double** | | [optional] | -|**belowStopPrice** | **Double** | | [optional] | -|**belowTrailingDelta** | **Long** | | [optional] | +|**belowClientOrderId** | **String** | Arbitrary unique ID among open orders for the below order. Automatically generated if not sent. | [optional] | +|**belowIcebergQty** | **Long** | Note that this can only be used if `belowTimeInForce` is `GTC`. | [optional] | +|**belowPrice** | **Double** | Can be used if `belowType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | +|**belowStopPrice** | **Double** | Can be used if `belowType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `belowStopPrice` or `belowTrailingDelta` or both, must be specified. | [optional] | +|**belowTrailingDelta** | **Long** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | |**belowTimeInForce** | **BelowTimeInForce** | | [optional] | -|**belowStrategyId** | **Long** | | [optional] | -|**belowStrategyType** | **Integer** | | [optional] | +|**belowStrategyId** | **Long** | Arbitrary numeric value identifying the below order within an order strategy. | [optional] | +|**belowStrategyType** | **Integer** | Arbitrary numeric value identifying the below order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**belowPegPriceType** | **BelowPegPriceType** | | [optional] | |**belowPegOffsetType** | **BelowPegOffsetType** | | [optional] | |**belowPegOffsetValue** | **Integer** | | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOcoResponse.md b/clients/spot/docs/OrderListPlaceOcoResponse.md index a071620a2..784d6930b 100644 --- a/clients/spot/docs/OrderListPlaceOcoResponse.md +++ b/clients/spot/docs/OrderListPlaceOcoResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderListPlaceOcoResponseResult**](OrderListPlaceOcoResponseResult.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOcoResponseResultOrderReportsInner.md b/clients/spot/docs/OrderListPlaceOcoResponseResultOrderReportsInner.md index 28cffaca0..721eea97a 100644 --- a/clients/spot/docs/OrderListPlaceOcoResponseResultOrderReportsInner.md +++ b/clients/spot/docs/OrderListPlaceOcoResponseResultOrderReportsInner.md @@ -23,7 +23,21 @@ |**side** | **String** | | [optional] | |**workingTime** | **Long** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOpoRequest.md b/clients/spot/docs/OrderListPlaceOpoRequest.md index 85a7a0a7a..39cb8c85a 100644 --- a/clients/spot/docs/OrderListPlaceOpoRequest.md +++ b/clients/spot/docs/OrderListPlaceOpoRequest.md @@ -7,36 +7,37 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**listClientOrderId** | **String** | | [optional] | +|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**workingType** | **WorkingType** | | | |**workingSide** | **WorkingSide** | | | -|**workingClientOrderId** | **String** | | [optional] | -|**workingPrice** | **Double** | | | -|**workingQuantity** | **Double** | | | -|**workingIcebergQty** | **Double** | | [optional] | +|**workingClientOrderId** | **String** | Arbitrary unique ID among open orders for the working order. Automatically generated if not sent. | [optional] | +|**workingPrice** | **Double** | Price for the working order. | | +|**workingQuantity** | **Double** | Sets the quantity for the working order. | | +|**workingIcebergQty** | **Double** | This can only be used if `workingTimeInForce` is `GTC`, or if `workingType` is `LIMIT_MAKER`. | [optional] | |**workingTimeInForce** | **WorkingTimeInForce** | | [optional] | -|**workingStrategyId** | **Long** | | [optional] | -|**workingStrategyType** | **Integer** | | [optional] | +|**workingStrategyId** | **Long** | Arbitrary numeric value identifying the working order within an order strategy. | [optional] | +|**workingStrategyType** | **Integer** | Arbitrary numeric value identifying the working order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**workingPegPriceType** | **WorkingPegPriceType** | | [optional] | |**workingPegOffsetType** | **WorkingPegOffsetType** | | [optional] | |**workingPegOffsetValue** | **Integer** | | [optional] | |**pendingType** | **PendingType** | | | |**pendingSide** | **PendingSide** | | | -|**pendingClientOrderId** | **String** | | [optional] | -|**pendingPrice** | **Double** | | [optional] | -|**pendingStopPrice** | **Double** | | [optional] | -|**pendingTrailingDelta** | **Double** | | [optional] | -|**pendingIcebergQty** | **Double** | | [optional] | +|**pendingClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending order. Automatically generated if not sent. | [optional] | +|**pendingPrice** | **Double** | Price for the pending order. | [optional] | +|**pendingStopPrice** | **Double** | Stop price for the pending order. | [optional] | +|**pendingTrailingDelta** | **Double** | Trailing delta for the pending order. | [optional] | +|**pendingIcebergQty** | **Double** | This can only be used if `pendingTimeInForce` is `GTC` or if `pendingType` is `LIMIT_MAKER`. | [optional] | |**pendingTimeInForce** | **PendingTimeInForce** | | [optional] | -|**pendingStrategyId** | **Long** | | [optional] | -|**pendingStrategyType** | **Integer** | | [optional] | +|**pendingStrategyId** | **Long** | Arbitrary numeric value identifying the pending order within an order strategy. | [optional] | +|**pendingStrategyType** | **Integer** | Arbitrary numeric value identifying the pending order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**pendingPegPriceType** | **PendingPegPriceType** | | [optional] | |**pendingPegOffsetType** | **PendingPegOffsetType** | | [optional] | |**pendingPegOffsetValue** | **Integer** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOpoResponseResultOrderReportsInner.md b/clients/spot/docs/OrderListPlaceOpoResponseResultOrderReportsInner.md index f26e63a0a..ba6a32bd2 100644 --- a/clients/spot/docs/OrderListPlaceOpoResponseResultOrderReportsInner.md +++ b/clients/spot/docs/OrderListPlaceOpoResponseResultOrderReportsInner.md @@ -23,6 +23,21 @@ |**workingTime** | **Long** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | |**origQty** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOpocoRequest.md b/clients/spot/docs/OrderListPlaceOpocoRequest.md index 2385e7ea9..3df78fe59 100644 --- a/clients/spot/docs/OrderListPlaceOpocoRequest.md +++ b/clients/spot/docs/OrderListPlaceOpocoRequest.md @@ -7,48 +7,49 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**listClientOrderId** | **String** | | [optional] | +|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**workingType** | **WorkingType** | | | |**workingSide** | **WorkingSide** | | | -|**workingClientOrderId** | **String** | | [optional] | -|**workingPrice** | **Double** | | | -|**workingQuantity** | **Double** | | | -|**workingIcebergQty** | **Double** | | [optional] | +|**workingClientOrderId** | **String** | Arbitrary unique ID among open orders for the working order. Automatically generated if not sent. | [optional] | +|**workingPrice** | **Double** | Price for the working order. | | +|**workingQuantity** | **Double** | Sets the quantity for the working order. | | +|**workingIcebergQty** | **Double** | This can only be used if `workingTimeInForce` is `GTC`, or if `workingType` is `LIMIT_MAKER`. | [optional] | |**workingTimeInForce** | **WorkingTimeInForce** | | [optional] | -|**workingStrategyId** | **Long** | | [optional] | -|**workingStrategyType** | **Integer** | | [optional] | +|**workingStrategyId** | **Long** | Arbitrary numeric value identifying the working order within an order strategy. | [optional] | +|**workingStrategyType** | **Integer** | Arbitrary numeric value identifying the working order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**workingPegPriceType** | **WorkingPegPriceType** | | [optional] | |**workingPegOffsetType** | **WorkingPegOffsetType** | | [optional] | -|**workingPegOffsetValue** | **Integer** | | [optional] | +|**workingPegOffsetValue** | **Integer** | Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) | [optional] | |**pendingSide** | **PendingSide** | | | |**pendingAboveType** | **PendingAboveType** | | | -|**pendingAboveClientOrderId** | **String** | | [optional] | -|**pendingAbovePrice** | **Double** | | [optional] | -|**pendingAboveStopPrice** | **Double** | | [optional] | -|**pendingAboveTrailingDelta** | **Double** | | [optional] | -|**pendingAboveIcebergQty** | **Double** | | [optional] | +|**pendingAboveClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending above order. Automatically generated if not sent. | [optional] | +|**pendingAbovePrice** | **Double** | Can be used if `pendingAboveType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | +|**pendingAboveStopPrice** | **Double** | Can be used if `pendingAboveType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. | [optional] | +|**pendingAboveTrailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**pendingAboveIcebergQty** | **Double** | This can only be used if `pendingAboveTimeInForce` is `GTC` or `pendingAboveType` is `LIMIT_MAKER`. | [optional] | |**pendingAboveTimeInForce** | **PendingAboveTimeInForce** | | [optional] | -|**pendingAboveStrategyId** | **Long** | | [optional] | -|**pendingAboveStrategyType** | **Integer** | | [optional] | +|**pendingAboveStrategyId** | **Long** | Arbitrary numeric value identifying the pending above order within an order strategy. | [optional] | +|**pendingAboveStrategyType** | **Integer** | Arbitrary numeric value identifying the pending above order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**pendingAbovePegPriceType** | **PendingAbovePegPriceType** | | [optional] | |**pendingAbovePegOffsetType** | **PendingAbovePegOffsetType** | | [optional] | -|**pendingAbovePegOffsetValue** | **Integer** | | [optional] | +|**pendingAbovePegOffsetValue** | **Integer** | Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) | [optional] | |**pendingBelowType** | **PendingBelowType** | | [optional] | -|**pendingBelowClientOrderId** | **String** | | [optional] | -|**pendingBelowPrice** | **Double** | | [optional] | -|**pendingBelowStopPrice** | **Double** | | [optional] | -|**pendingBelowTrailingDelta** | **Double** | | [optional] | -|**pendingBelowIcebergQty** | **Double** | | [optional] | +|**pendingBelowClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending below order. Automatically generated if not sent. | [optional] | +|**pendingBelowPrice** | **Double** | Can be used if `pendingBelowType` is `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | +|**pendingBelowStopPrice** | **Double** | Can be used if `pendingBelowType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `pendingBelowStopPrice` or `pendingBelowTrailingDelta` or both, must be specified. | [optional] | +|**pendingBelowTrailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**pendingBelowIcebergQty** | **Double** | This can only be used if `pendingBelowTimeInForce` is `GTC` or `pendingBelowType` is `LIMIT_MAKER`. | [optional] | |**pendingBelowTimeInForce** | **PendingBelowTimeInForce** | | [optional] | -|**pendingBelowStrategyId** | **Long** | | [optional] | -|**pendingBelowStrategyType** | **Integer** | | [optional] | +|**pendingBelowStrategyId** | **Long** | Arbitrary numeric value identifying the pending below order within an order strategy. | [optional] | +|**pendingBelowStrategyType** | **Integer** | Arbitrary numeric value identifying the pending below order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**pendingBelowPegPriceType** | **PendingBelowPegPriceType** | | [optional] | |**pendingBelowPegOffsetType** | **PendingBelowPegOffsetType** | | [optional] | |**pendingBelowPegOffsetValue** | **Integer** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOpocoResponseResultOrderReportsInner.md b/clients/spot/docs/OrderListPlaceOpocoResponseResultOrderReportsInner.md index 03c83d04f..a2bc2ad56 100644 --- a/clients/spot/docs/OrderListPlaceOpocoResponseResultOrderReportsInner.md +++ b/clients/spot/docs/OrderListPlaceOpocoResponseResultOrderReportsInner.md @@ -22,8 +22,22 @@ |**side** | **String** | | [optional] | |**workingTime** | **Long** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | |**origQty** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOtoRequest.md b/clients/spot/docs/OrderListPlaceOtoRequest.md index ade0c932c..43db2bb31 100644 --- a/clients/spot/docs/OrderListPlaceOtoRequest.md +++ b/clients/spot/docs/OrderListPlaceOtoRequest.md @@ -7,37 +7,38 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**listClientOrderId** | **String** | | [optional] | +|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**workingType** | **WorkingType** | | | |**workingSide** | **WorkingSide** | | | -|**workingClientOrderId** | **String** | | [optional] | +|**workingClientOrderId** | **String** | Arbitrary unique ID among open orders for the working order. Automatically generated if not sent. | [optional] | |**workingPrice** | **Double** | | | -|**workingQuantity** | **Double** | | | -|**workingIcebergQty** | **Double** | | [optional] | +|**workingQuantity** | **Double** | Sets the quantity for the working order. | | +|**workingIcebergQty** | **Double** | This can only be used if `workingTimeInForce` is `GTC`, or if `workingType` is `LIMIT_MAKER`. | [optional] | |**workingTimeInForce** | **WorkingTimeInForce** | | [optional] | -|**workingStrategyId** | **Long** | | [optional] | -|**workingStrategyType** | **Integer** | | [optional] | +|**workingStrategyId** | **Long** | Arbitrary numeric value identifying the working order within an order strategy. | [optional] | +|**workingStrategyType** | **Integer** | Arbitrary numeric value identifying the working order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**workingPegPriceType** | **WorkingPegPriceType** | | [optional] | |**workingPegOffsetType** | **WorkingPegOffsetType** | | [optional] | |**workingPegOffsetValue** | **Integer** | | [optional] | |**pendingType** | **PendingType** | | | |**pendingSide** | **PendingSide** | | | -|**pendingClientOrderId** | **String** | | [optional] | +|**pendingClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending order. Automatically generated if not sent. | [optional] | |**pendingPrice** | **Double** | | [optional] | |**pendingStopPrice** | **Double** | | [optional] | |**pendingTrailingDelta** | **Double** | | [optional] | -|**pendingQuantity** | **Double** | | | -|**pendingIcebergQty** | **Double** | | [optional] | +|**pendingQuantity** | **Double** | Sets the quantity for the pending order. | | +|**pendingIcebergQty** | **Double** | This can only be used if `pendingTimeInForce` is `GTC` or if `pendingType` is `LIMIT_MAKER`. | [optional] | |**pendingTimeInForce** | **PendingTimeInForce** | | [optional] | -|**pendingStrategyId** | **Long** | | [optional] | -|**pendingStrategyType** | **Integer** | | [optional] | +|**pendingStrategyId** | **Long** | Arbitrary numeric value identifying the pending order within an order strategy. | [optional] | +|**pendingStrategyType** | **Integer** | Arbitrary numeric value identifying the pending order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**pendingPegOffsetType** | **PendingPegOffsetType** | | [optional] | |**pendingPegPriceType** | **PendingPegPriceType** | | [optional] | |**pendingPegOffsetValue** | **Integer** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOtoResponse.md b/clients/spot/docs/OrderListPlaceOtoResponse.md index 61b0ff80a..6cb9c4f18 100644 --- a/clients/spot/docs/OrderListPlaceOtoResponse.md +++ b/clients/spot/docs/OrderListPlaceOtoResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderListPlaceOtoResponseResult**](OrderListPlaceOtoResponseResult.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOtoResponseResultOrderReportsInner.md b/clients/spot/docs/OrderListPlaceOtoResponseResultOrderReportsInner.md index b9c3383d0..f8bb04f41 100644 --- a/clients/spot/docs/OrderListPlaceOtoResponseResultOrderReportsInner.md +++ b/clients/spot/docs/OrderListPlaceOtoResponseResultOrderReportsInner.md @@ -23,6 +23,21 @@ |**side** | **String** | | [optional] | |**workingTime** | **Long** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOtocoRequest.md b/clients/spot/docs/OrderListPlaceOtocoRequest.md index 47ee2a971..68f1957d5 100644 --- a/clients/spot/docs/OrderListPlaceOtocoRequest.md +++ b/clients/spot/docs/OrderListPlaceOtocoRequest.md @@ -7,49 +7,50 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**listClientOrderId** | **String** | | [optional] | +|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**workingType** | **WorkingType** | | | |**workingSide** | **WorkingSide** | | | -|**workingClientOrderId** | **String** | | [optional] | +|**workingClientOrderId** | **String** | Arbitrary unique ID among open orders for the working order. Automatically generated if not sent. | [optional] | |**workingPrice** | **Double** | | | -|**workingQuantity** | **Double** | | | -|**workingIcebergQty** | **Double** | | [optional] | +|**workingQuantity** | **Double** | Sets the quantity for the working order. | | +|**workingIcebergQty** | **Double** | This can only be used if `workingTimeInForce` is `GTC`, or if `workingType` is `LIMIT_MAKER`. | [optional] | |**workingTimeInForce** | **WorkingTimeInForce** | | [optional] | -|**workingStrategyId** | **Long** | | [optional] | -|**workingStrategyType** | **Integer** | | [optional] | +|**workingStrategyId** | **Long** | Arbitrary numeric value identifying the working order within an order strategy. | [optional] | +|**workingStrategyType** | **Integer** | Arbitrary numeric value identifying the working order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**workingPegPriceType** | **WorkingPegPriceType** | | [optional] | |**workingPegOffsetType** | **WorkingPegOffsetType** | | [optional] | |**workingPegOffsetValue** | **Integer** | | [optional] | |**pendingSide** | **PendingSide** | | | -|**pendingQuantity** | **Double** | | | +|**pendingQuantity** | **Double** | Sets the quantity for the pending orders. | | |**pendingAboveType** | **PendingAboveType** | | | -|**pendingAboveClientOrderId** | **String** | | [optional] | -|**pendingAbovePrice** | **Double** | | [optional] | -|**pendingAboveStopPrice** | **Double** | | [optional] | -|**pendingAboveTrailingDelta** | **Double** | | [optional] | -|**pendingAboveIcebergQty** | **Double** | | [optional] | +|**pendingAboveClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending above order. Automatically generated if not sent. | [optional] | +|**pendingAbovePrice** | **Double** | Can be used if `pendingAboveType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | +|**pendingAboveStopPrice** | **Double** | Can be used if `pendingAboveType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. | [optional] | +|**pendingAboveTrailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**pendingAboveIcebergQty** | **Double** | This can only be used if `pendingAboveTimeInForce` is `GTC` or if `pendingAboveType` is `LIMIT_MAKER`. | [optional] | |**pendingAboveTimeInForce** | **PendingAboveTimeInForce** | | [optional] | -|**pendingAboveStrategyId** | **Long** | | [optional] | -|**pendingAboveStrategyType** | **Integer** | | [optional] | +|**pendingAboveStrategyId** | **Long** | Arbitrary numeric value identifying the pending above order within an order strategy. | [optional] | +|**pendingAboveStrategyType** | **Integer** | Arbitrary numeric value identifying the pending above order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**pendingAbovePegPriceType** | **PendingAbovePegPriceType** | | [optional] | |**pendingAbovePegOffsetType** | **PendingAbovePegOffsetType** | | [optional] | |**pendingAbovePegOffsetValue** | **Integer** | | [optional] | |**pendingBelowType** | **PendingBelowType** | | [optional] | -|**pendingBelowClientOrderId** | **String** | | [optional] | -|**pendingBelowPrice** | **Double** | | [optional] | -|**pendingBelowStopPrice** | **Double** | | [optional] | -|**pendingBelowTrailingDelta** | **Double** | | [optional] | -|**pendingBelowIcebergQty** | **Double** | | [optional] | +|**pendingBelowClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending below order. Automatically generated if not sent. | [optional] | +|**pendingBelowPrice** | **Double** | Can be used if `pendingBelowType` is `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | +|**pendingBelowStopPrice** | **Double** | Can be used if `pendingBelowType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `pendingBelowStopPrice` or `pendingBelowTrailingDelta` or both, must be specified. | [optional] | +|**pendingBelowTrailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**pendingBelowIcebergQty** | **Double** | This can only be used if `pendingBelowTimeInForce` is `GTC`, or if `pendingBelowType` is `LIMIT_MAKER`. | [optional] | |**pendingBelowTimeInForce** | **PendingBelowTimeInForce** | | [optional] | -|**pendingBelowStrategyId** | **Long** | | [optional] | -|**pendingBelowStrategyType** | **Integer** | | [optional] | +|**pendingBelowStrategyId** | **Long** | Arbitrary numeric value identifying the pending below order within an order strategy. | [optional] | +|**pendingBelowStrategyType** | **Integer** | Arbitrary numeric value identifying the pending below order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**pendingBelowPegPriceType** | **PendingBelowPegPriceType** | | [optional] | |**pendingBelowPegOffsetType** | **PendingBelowPegOffsetType** | | [optional] | |**pendingBelowPegOffsetValue** | **Integer** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOtocoResponse.md b/clients/spot/docs/OrderListPlaceOtocoResponse.md index b8e1fe7b7..323f59dd4 100644 --- a/clients/spot/docs/OrderListPlaceOtocoResponse.md +++ b/clients/spot/docs/OrderListPlaceOtocoResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderListPlaceOtocoResponseResult**](OrderListPlaceOtocoResponseResult.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOtocoResponseResultOrderReportsInner.md b/clients/spot/docs/OrderListPlaceOtocoResponseResultOrderReportsInner.md index c8617fe89..a3ebf7710 100644 --- a/clients/spot/docs/OrderListPlaceOtocoResponseResultOrderReportsInner.md +++ b/clients/spot/docs/OrderListPlaceOtocoResponseResultOrderReportsInner.md @@ -23,7 +23,21 @@ |**side** | **String** | | [optional] | |**workingTime** | **Long** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderListPlaceRequest.md b/clients/spot/docs/OrderListPlaceRequest.md index 79d57f7f1..7e9c0c7fa 100644 --- a/clients/spot/docs/OrderListPlaceRequest.md +++ b/clients/spot/docs/OrderListPlaceRequest.md @@ -7,26 +7,27 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | |**side** | **Side** | | | |**price** | **Double** | | | |**quantity** | **Double** | | | -|**listClientOrderId** | **String** | | [optional] | -|**limitClientOrderId** | **String** | | [optional] | -|**limitIcebergQty** | **Double** | | [optional] | +|**listClientOrderId** | **String** | A unique Id for the entire orderList | [optional] | +|**limitClientOrderId** | **String** | A unique Id for the limit order | [optional] | +|**limitIcebergQty** | **Double** | Used to make the `LIMIT_MAKER` leg an iceberg order. | [optional] | |**limitStrategyId** | **Long** | | [optional] | -|**limitStrategyType** | **Integer** | | [optional] | +|**limitStrategyType** | **Integer** | The value cannot be less than `1000000`. | [optional] | |**stopPrice** | **Double** | | [optional] | |**trailingDelta** | **Integer** | | [optional] | -|**stopClientOrderId** | **String** | | [optional] | -|**stopLimitPrice** | **Double** | | [optional] | +|**stopClientOrderId** | **String** | A unique Id for the stop loss/stop loss limit leg | [optional] | +|**stopLimitPrice** | **Double** | If provided, `stopLimitTimeInForce` is required. | [optional] | |**stopLimitTimeInForce** | **StopLimitTimeInForce** | | [optional] | -|**stopIcebergQty** | **Double** | | [optional] | +|**stopIcebergQty** | **Double** | Used with `STOP_LOSS_LIMIT` leg to make an iceberg order. | [optional] | |**stopStrategyId** | **Long** | | [optional] | -|**stopStrategyType** | **Integer** | | [optional] | +|**stopStrategyType** | **Integer** | The value cannot be less than `1000000`. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderListPlaceResponse.md b/clients/spot/docs/OrderListPlaceResponse.md index 9cf35942a..045894ad1 100644 --- a/clients/spot/docs/OrderListPlaceResponse.md +++ b/clients/spot/docs/OrderListPlaceResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderListPlaceResponseResult**](OrderListPlaceResponseResult.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderListPlaceResponseResult.md b/clients/spot/docs/OrderListPlaceResponseResult.md index b97c356a6..9f639aa9e 100644 --- a/clients/spot/docs/OrderListPlaceResponseResult.md +++ b/clients/spot/docs/OrderListPlaceResponseResult.md @@ -14,7 +14,7 @@ |**listClientOrderId** | **String** | | [optional] | |**transactionTime** | **Long** | | [optional] | |**symbol** | **String** | | [optional] | -|**orders** | [**List<OrderListCancelResponseResultOrdersInner>**](OrderListCancelResponseResultOrdersInner.md) | | [optional] | +|**orders** | [**List<AllOrderListsResponseResultInnerOrdersInner>**](AllOrderListsResponseResultInnerOrdersInner.md) | | [optional] | |**orderReports** | [**List<OrderListPlaceResponseResultOrderReportsInner>**](OrderListPlaceResponseResultOrderReportsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderListPlaceResponseResultOrderReportsInner.md b/clients/spot/docs/OrderListPlaceResponseResultOrderReportsInner.md index 2952439a5..e686259f1 100644 --- a/clients/spot/docs/OrderListPlaceResponseResultOrderReportsInner.md +++ b/clients/spot/docs/OrderListPlaceResponseResultOrderReportsInner.md @@ -23,7 +23,21 @@ |**side** | **String** | | [optional] | |**workingTime** | **Long** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderListStatusRequest.md b/clients/spot/docs/OrderListStatusRequest.md index 1f161e0c3..df172632f 100644 --- a/clients/spot/docs/OrderListStatusRequest.md +++ b/clients/spot/docs/OrderListStatusRequest.md @@ -7,9 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**origClientOrderId** | **String** | | [optional] | -|**orderListId** | **Integer** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**id** | **String** | Client-generated request identifier. | [optional] | +|**origClientOrderId** | **String** | Query order list by `listClientOrderId`. `orderListId` or `origClientOrderId` must be provided. | [optional] | +|**orderListId** | **Integer** | Query order list by `orderListId`. `orderListId` or `origClientOrderId` must be provided. | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderListStatusResponse.md b/clients/spot/docs/OrderListStatusResponse.md index 978c34bb2..d04b219bc 100644 --- a/clients/spot/docs/OrderListStatusResponse.md +++ b/clients/spot/docs/OrderListStatusResponse.md @@ -9,8 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | -|**result** | [**AllOrderListsResponseResultInner**](AllOrderListsResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**result** | [**OrderListStatusResponseResult**](OrderListStatusResponseResult.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderListStatusResponseResult.md b/clients/spot/docs/OrderListStatusResponseResult.md new file mode 100644 index 000000000..0be28ff2a --- /dev/null +++ b/clients/spot/docs/OrderListStatusResponseResult.md @@ -0,0 +1,20 @@ + + +# OrderListStatusResponseResult + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**orderListId** | **Long** | | [optional] | +|**contingencyType** | **String** | | [optional] | +|**listStatusType** | **String** | | [optional] | +|**listOrderStatus** | **String** | | [optional] | +|**listClientOrderId** | **String** | | [optional] | +|**transactionTime** | **Long** | | [optional] | +|**symbol** | **String** | | [optional] | +|**orders** | [**List<AllOrderListsResponseResultInnerOrdersInner>**](AllOrderListsResponseResultInnerOrdersInner.md) | | [optional] | + + + diff --git a/clients/spot/docs/OrderOcoRequest.md b/clients/spot/docs/OrderOcoRequest.md index edd8a68eb..389a16da1 100644 --- a/clients/spot/docs/OrderOcoRequest.md +++ b/clients/spot/docs/OrderOcoRequest.md @@ -8,25 +8,25 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**listClientOrderId** | **String** | | [optional] | +|**listClientOrderId** | **String** | A unique Id for the entire orderList | [optional] | |**side** | **Side** | | | |**quantity** | **Double** | | | -|**limitClientOrderId** | **String** | | [optional] | +|**limitClientOrderId** | **String** | A unique Id for the limit order | [optional] | |**price** | **Double** | | | |**limitStrategyId** | **Long** | | [optional] | -|**limitStrategyType** | **Integer** | | [optional] | -|**limitIcebergQty** | **Double** | | [optional] | +|**limitStrategyType** | **Integer** | The value cannot be less than `1000000`. | [optional] | +|**limitIcebergQty** | **Double** | Used to make the `LIMIT_MAKER` leg an iceberg order. | [optional] | |**trailingDelta** | **Long** | | [optional] | -|**stopClientOrderId** | **String** | | [optional] | +|**stopClientOrderId** | **String** | A unique Id for the stop loss/stop loss limit leg | [optional] | |**stopPrice** | **Double** | | | |**stopStrategyId** | **Long** | | [optional] | -|**stopStrategyType** | **Integer** | | [optional] | -|**stopLimitPrice** | **Double** | | [optional] | -|**stopIcebergQty** | **Double** | | [optional] | +|**stopStrategyType** | **Integer** | The value cannot be less than `1000000`. | [optional] | +|**stopLimitPrice** | **Double** | If provided, `stopLimitTimeInForce` is required. | [optional] | +|**stopIcebergQty** | **Double** | Used with `STOP_LOSS_LIMIT` leg to make an iceberg order. | [optional] | |**stopLimitTimeInForce** | **StopLimitTimeInForce** | | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | The value cannot be greater than `60000`. <br> Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderPlaceRequest.md b/clients/spot/docs/OrderPlaceRequest.md index 7ee8090f8..3f109d769 100644 --- a/clients/spot/docs/OrderPlaceRequest.md +++ b/clients/spot/docs/OrderPlaceRequest.md @@ -7,6 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | |**side** | **Side** | | | |**type** | **OrderType** | | | @@ -14,18 +15,18 @@ |**price** | **Double** | | [optional] | |**quantity** | **Double** | | [optional] | |**quoteOrderQty** | **Double** | | [optional] | -|**newClientOrderId** | **String** | | [optional] | +|**newClientOrderId** | **String** | A unique id among open orders. Automatically generated if not sent.<br/> Orders with the same `newClientOrderID` can be accepted only when the previous one is filled, otherwise the order will be rejected. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | -|**stopPrice** | **Double** | | [optional] | -|**trailingDelta** | **Integer** | | [optional] | -|**icebergQty** | **Double** | | [optional] | +|**stopPrice** | **Double** | Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and `TAKE_PROFIT_LIMIT` orders. | [optional] | +|**trailingDelta** | **Integer** | See Trailing Stop order FAQ | [optional] | +|**icebergQty** | **Double** | Used with `LIMIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` to create an iceberg order. | [optional] | |**strategyId** | **Long** | | [optional] | -|**strategyType** | **Integer** | | [optional] | +|**strategyType** | **Integer** | The value cannot be less than `1000000`. | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**pegPriceType** | **PegPriceType** | | [optional] | -|**pegOffsetValue** | **Integer** | | [optional] | +|**pegOffsetValue** | **Integer** | Price level to peg the price to (max: 100). See Pegged Orders Info | [optional] | |**pegOffsetType** | **PegOffsetType** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderPlaceResponse.md b/clients/spot/docs/OrderPlaceResponse.md index 9e036217b..aa260db3d 100644 --- a/clients/spot/docs/OrderPlaceResponse.md +++ b/clients/spot/docs/OrderPlaceResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderPlaceResponseResult**](OrderPlaceResponseResult.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderPlaceResponseResult.md b/clients/spot/docs/OrderPlaceResponseResult.md index 4facf75dc..482aa6d10 100644 --- a/clients/spot/docs/OrderPlaceResponseResult.md +++ b/clients/spot/docs/OrderPlaceResponseResult.md @@ -23,6 +23,21 @@ |**side** | **String** | | [optional] | |**workingTime** | **Long** | | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | |**fills** | [**List<OrderPlaceResponseResultFillsInner>**](OrderPlaceResponseResultFillsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderStatusRequest.md b/clients/spot/docs/OrderStatusRequest.md index 8bc9f6c3d..061fb30cc 100644 --- a/clients/spot/docs/OrderStatusRequest.md +++ b/clients/spot/docs/OrderStatusRequest.md @@ -7,10 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**orderId** | **Long** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**orderId** | **Long** | Lookup order by `orderId` | [optional] | +|**origClientOrderId** | **String** | Lookup order by `clientOrderId` | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderStatusResponse.md b/clients/spot/docs/OrderStatusResponse.md index d6e82c7a8..230a21e3c 100644 --- a/clients/spot/docs/OrderStatusResponse.md +++ b/clients/spot/docs/OrderStatusResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderStatusResponseResult**](OrderStatusResponseResult.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderStatusResponseResult.md b/clients/spot/docs/OrderStatusResponseResult.md index 92d5784d5..bddb30f60 100644 --- a/clients/spot/docs/OrderStatusResponseResult.md +++ b/clients/spot/docs/OrderStatusResponseResult.md @@ -9,30 +9,37 @@ |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | |**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | +|**orderListId** | **Long** | Present only for orders that belong to an order list. | [optional] | |**clientOrderId** | **String** | | [optional] | |**price** | **String** | | [optional] | |**origQty** | **String** | | [optional] | |**executedQty** | **String** | | [optional] | +|**origQuoteOrderQty** | **String** | Always present. Zero if the order type does not use `quoteOrderQty`. | [optional] | |**cummulativeQuoteQty** | **String** | | [optional] | |**status** | **String** | | [optional] | |**timeInForce** | **String** | | [optional] | |**type** | **String** | | [optional] | |**side** | **String** | | [optional] | -|**stopPrice** | **String** | | [optional] | -|**trailingDelta** | **Long** | | [optional] | -|**trailingTime** | **Long** | | [optional] | -|**icebergQty** | **String** | | [optional] | -|**time** | **Long** | | [optional] | -|**updateTime** | **Long** | | [optional] | +|**stopPrice** | **String** | Always present. Zero if the order type does not use `stopPrice`. | [optional] | +|**trailingDelta** | **Long** | Present only if `trailingDelta` was set on the order. | [optional] | +|**trailingTime** | **Long** | Present only if `trailingDelta` was set on the order. | [optional] | +|**icebergQty** | **String** | Always present. Zero for non-iceberg orders. | [optional] | +|**time** | **Long** | Order placement time. | [optional] | +|**updateTime** | **Long** | Time of the last update to the order. | [optional] | |**isWorking** | **Boolean** | | [optional] | |**workingTime** | **Long** | | [optional] | -|**origQuoteOrderQty** | **String** | | [optional] | -|**strategyId** | **Long** | | [optional] | -|**strategyType** | **Long** | | [optional] | +|**strategyId** | **Long** | Present only if `strategyId` was set on the order. | [optional] | +|**strategyType** | **Long** | Present only if `strategyType` was set on the order. | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | -|**preventedMatchId** | **Long** | | [optional] | -|**preventedQuantity** | **String** | | [optional] | +|**preventedMatchId** | **Long** | Present only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Present only if the order expired due to STP. | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/OrderTestRequest.md b/clients/spot/docs/OrderTestRequest.md index e1dd96efe..cc0f95f1a 100644 --- a/clients/spot/docs/OrderTestRequest.md +++ b/clients/spot/docs/OrderTestRequest.md @@ -7,7 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**computeCommissionRates** | **Boolean** | | [optional] | +|**id** | **String** | Client-generated request identifier. | [optional] | +|**computeCommissionRates** | **Boolean** | Default: `false` <br> See [Commissions FAQ](/products/spot/faqs/commission_faq#test-order-diferences) to learn more. | [optional] | |**symbol** | **String** | | | |**side** | **Side** | | | |**type** | **OrderType** | | | @@ -15,18 +16,18 @@ |**price** | **Double** | | [optional] | |**quantity** | **Double** | | [optional] | |**quoteOrderQty** | **Double** | | [optional] | -|**newClientOrderId** | **String** | | [optional] | +|**newClientOrderId** | **String** | A unique id among open orders. Automatically generated if not sent. Orders with the same `newClientOrderID` can be accepted only when the previous one is filled, otherwise the order will be rejected. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | -|**stopPrice** | **Double** | | [optional] | -|**trailingDelta** | **Integer** | | [optional] | -|**icebergQty** | **Double** | | [optional] | +|**stopPrice** | **Double** | Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and `TAKE_PROFIT_LIMIT` orders. | [optional] | +|**trailingDelta** | **Integer** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**icebergQty** | **Double** | Used with `LIMIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` to create an iceberg order. | [optional] | |**strategyId** | **Long** | | [optional] | -|**strategyType** | **Integer** | | [optional] | +|**strategyType** | **Integer** | The value cannot be less than `1000000`. | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**pegPriceType** | **PegPriceType** | | [optional] | -|**pegOffsetValue** | **Integer** | | [optional] | +|**pegOffsetValue** | **Integer** | Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) | [optional] | |**pegOffsetType** | **PegOffsetType** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderTestResponse.md b/clients/spot/docs/OrderTestResponse.md index 594dd2501..2e09b0c34 100644 --- a/clients/spot/docs/OrderTestResponse.md +++ b/clients/spot/docs/OrderTestResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderTestResponseResult**](OrderTestResponseResult.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderTestResponseDiscount.md b/clients/spot/docs/OrderTestResponseDiscount.md index 706bc0a75..708af84cf 100644 --- a/clients/spot/docs/OrderTestResponseDiscount.md +++ b/clients/spot/docs/OrderTestResponseDiscount.md @@ -2,6 +2,7 @@ # OrderTestResponseDiscount +Discount on standard commissions when paying in BNB. ## Properties diff --git a/clients/spot/docs/OrderTestResponseResult.md b/clients/spot/docs/OrderTestResponseResult.md index a0950794c..db5943128 100644 --- a/clients/spot/docs/OrderTestResponseResult.md +++ b/clients/spot/docs/OrderTestResponseResult.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**standardCommissionForOrder** | [**OrderTestResponseResultStandardCommissionForOrder**](OrderTestResponseResultStandardCommissionForOrder.md) | | [optional] | -|**specialCommissionForOrder** | [**OrderTestResponseResultSpecialCommissionForOrder**](OrderTestResponseResultSpecialCommissionForOrder.md) | | [optional] | +|**specialCommissionForOrder** | [**OrderTestResponseResultStandardCommissionForOrder**](OrderTestResponseResultStandardCommissionForOrder.md) | | [optional] | |**taxCommissionForOrder** | [**OrderTestResponseResultStandardCommissionForOrder**](OrderTestResponseResultStandardCommissionForOrder.md) | | [optional] | |**discount** | [**OrderTestResponseResultDiscount**](OrderTestResponseResultDiscount.md) | | [optional] | diff --git a/clients/spot/docs/OrderTestResponseResultSpecialCommissionForOrder.md b/clients/spot/docs/OrderTestResponseResultSpecialCommissionForOrder.md deleted file mode 100644 index 38d799fa4..000000000 --- a/clients/spot/docs/OrderTestResponseResultSpecialCommissionForOrder.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OrderTestResponseResultSpecialCommissionForOrder - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**maker** | **String** | | [optional] | -|**taker** | **String** | | [optional] | - - - diff --git a/clients/spot/docs/OrderTestResponseSpecialCommissionForOrder.md b/clients/spot/docs/OrderTestResponseSpecialCommissionForOrder.md index 164c28180..e22a81bb9 100644 --- a/clients/spot/docs/OrderTestResponseSpecialCommissionForOrder.md +++ b/clients/spot/docs/OrderTestResponseSpecialCommissionForOrder.md @@ -2,6 +2,7 @@ # OrderTestResponseSpecialCommissionForOrder +Special commission rates on trades from the order. ## Properties diff --git a/clients/spot/docs/OrderTestResponseStandardCommissionForOrder.md b/clients/spot/docs/OrderTestResponseStandardCommissionForOrder.md index 5211f0ea2..a20abc0c4 100644 --- a/clients/spot/docs/OrderTestResponseStandardCommissionForOrder.md +++ b/clients/spot/docs/OrderTestResponseStandardCommissionForOrder.md @@ -2,6 +2,7 @@ # OrderTestResponseStandardCommissionForOrder +Standard commission rates on trades from the order. ## Properties diff --git a/clients/spot/docs/OrderTestResponseTaxCommissionForOrder.md b/clients/spot/docs/OrderTestResponseTaxCommissionForOrder.md new file mode 100644 index 000000000..fca5427a3 --- /dev/null +++ b/clients/spot/docs/OrderTestResponseTaxCommissionForOrder.md @@ -0,0 +1,15 @@ + + +# OrderTestResponseTaxCommissionForOrder + +Tax commission rates for trades from the order. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**maker** | **String** | | [optional] | +|**taker** | **String** | | [optional] | + + + diff --git a/clients/spot/docs/OrderType.md b/clients/spot/docs/OrderType.md index 2fcb4d655..966b64a12 100644 --- a/clients/spot/docs/OrderType.md +++ b/clients/spot/docs/OrderType.md @@ -9,17 +9,5 @@ * `LIMIT` (value: `"LIMIT"`) -* `STOP_LOSS` (value: `"STOP_LOSS"`) - -* `STOP_LOSS_LIMIT` (value: `"STOP_LOSS_LIMIT"`) - -* `TAKE_PROFIT` (value: `"TAKE_PROFIT"`) - -* `TAKE_PROFIT_LIMIT` (value: `"TAKE_PROFIT_LIMIT"`) - -* `LIMIT_MAKER` (value: `"LIMIT_MAKER"`) - -* `NON_REPRESENTABLE` (value: `"NON_REPRESENTABLE"`) - diff --git a/clients/spot/docs/OutboundAccountPosition.md b/clients/spot/docs/OutboundAccountPosition.md index d37e6e760..c55dec52d 100644 --- a/clients/spot/docs/OutboundAccountPosition.md +++ b/clients/spot/docs/OutboundAccountPosition.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**B** | [**List<OutboundAccountPositionBInner>**](OutboundAccountPositionBInner.md) | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**uLowerCase** | **Long** | Time of last account update | [optional] | +|**B** | [**List<OutboundAccountPositionBInner>**](OutboundAccountPositionBInner.md) | Balances Array | [optional] | diff --git a/clients/spot/docs/OutboundAccountPositionBInner.md b/clients/spot/docs/OutboundAccountPositionBInner.md index 0b76413e5..da7839b0d 100644 --- a/clients/spot/docs/OutboundAccountPositionBInner.md +++ b/clients/spot/docs/OutboundAccountPositionBInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**aLowerCase** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | +|**aLowerCase** | **String** | Asset | [optional] | +|**fLowerCase** | **String** | Free | [optional] | +|**lLowerCase** | **String** | Locked | [optional] | diff --git a/clients/spot/docs/PartialBookDepthRequest.md b/clients/spot/docs/PartialBookDepthRequest.md index 0d7e18c5f..cef4c034e 100644 --- a/clients/spot/docs/PartialBookDepthRequest.md +++ b/clients/spot/docs/PartialBookDepthRequest.md @@ -7,9 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | -|**levels** | **Levels** | | | -|**updateSpeed** | **String** | | [optional] | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to query | [optional] | +|**levels** | **Levels** | | [optional] | +|**updateSpeed** | **UpdateSpeed** | | [optional] | diff --git a/clients/spot/docs/PartialBookDepthResponse.md b/clients/spot/docs/PartialBookDepthResponse.md index f15837bff..f0707933d 100644 --- a/clients/spot/docs/PartialBookDepthResponse.md +++ b/clients/spot/docs/PartialBookDepthResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**lastUpdateId** | **Long** | | [optional] | -|**bids** | **List<List<String>>** | | [optional] | -|**asks** | **List<List<String>>** | | [optional] | +|**lastUpdateId** | **Long** | Last update ID | [optional] | +|**bids** | **List<List<String>>** | Bids to be updated | [optional] | +|**asks** | **List<List<String>>** | Asks to be updated | [optional] | diff --git a/clients/spot/docs/PegOffsetType.md b/clients/spot/docs/PegOffsetType.md index 2a1817956..208a8dcd6 100644 --- a/clients/spot/docs/PegOffsetType.md +++ b/clients/spot/docs/PegOffsetType.md @@ -7,7 +7,5 @@ * `PRICE_LEVEL` (value: `"PRICE_LEVEL"`) -* `NON_REPRESENTABLE` (value: `"NON_REPRESENTABLE"`) - diff --git a/clients/spot/docs/PegPriceType.md b/clients/spot/docs/PegPriceType.md index 936bbcce4..3c1be7ba2 100644 --- a/clients/spot/docs/PegPriceType.md +++ b/clients/spot/docs/PegPriceType.md @@ -9,7 +9,5 @@ * `MARKET_PEG` (value: `"MARKET_PEG"`) -* `NON_REPRESENTABLE` (value: `"NON_REPRESENTABLE"`) - diff --git a/clients/spot/docs/Permissions.md b/clients/spot/docs/Permissions.md index 1af900a9a..00db7186a 100644 --- a/clients/spot/docs/Permissions.md +++ b/clients/spot/docs/Permissions.md @@ -2,6 +2,7 @@ # Permissions +Filter symbols by permissions ## Properties diff --git a/clients/spot/docs/PingResponse.md b/clients/spot/docs/PingResponse.md index 9ee7217eb..2ec69fa2c 100644 --- a/clients/spot/docs/PingResponse.md +++ b/clients/spot/docs/PingResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | **Object** | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/ReferencePriceCalculationRequest.md b/clients/spot/docs/ReferencePriceCalculationRequest.md index 42da0e7d2..8c75452a9 100644 --- a/clients/spot/docs/ReferencePriceCalculationRequest.md +++ b/clients/spot/docs/ReferencePriceCalculationRequest.md @@ -7,6 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | |**symbolStatus** | **SymbolStatus** | | [optional] | diff --git a/clients/spot/docs/ReferencePriceCalculationResponse.md b/clients/spot/docs/ReferencePriceCalculationResponse.md index 5dcdb7774..b2f450d3e 100644 --- a/clients/spot/docs/ReferencePriceCalculationResponse.md +++ b/clients/spot/docs/ReferencePriceCalculationResponse.md @@ -10,6 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**ReferencePriceCalculationResponseResult**](ReferencePriceCalculationResponseResult.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/ReferencePriceCalculationResponseResult.md b/clients/spot/docs/ReferencePriceCalculationResponseResult.md index 708dc42c9..430dcaa72 100644 --- a/clients/spot/docs/ReferencePriceCalculationResponseResult.md +++ b/clients/spot/docs/ReferencePriceCalculationResponseResult.md @@ -9,9 +9,9 @@ |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | |**calculationType** | **String** | | [optional] | -|**bucketCount** | **Long** | | [optional] | -|**bucketWidthMs** | **Long** | | [optional] | -|**externalCalculationId** | **Long** | | [optional] | +|**bucketCount** | **Long** | If the reference price is being calculated by the matching engine as an arithmetic mean | [optional] | +|**bucketWidthMs** | **Long** | If the reference price is being calculated by the matching engine as an arithmetic mean | [optional] | +|**externalCalculationId** | **Long** | If the reference price is being calculated outside the matching engine | [optional] | diff --git a/clients/spot/docs/ReferencePriceRequest.md b/clients/spot/docs/ReferencePriceRequest.md index 86baf0e69..786896a5b 100644 --- a/clients/spot/docs/ReferencePriceRequest.md +++ b/clients/spot/docs/ReferencePriceRequest.md @@ -7,7 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to query | [optional] | diff --git a/clients/spot/docs/ReferencePriceResponse.md b/clients/spot/docs/ReferencePriceResponse.md index e89d0f9d7..b8e1ecc46 100644 --- a/clients/spot/docs/ReferencePriceResponse.md +++ b/clients/spot/docs/ReferencePriceResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**rLowerCase** | **String** | | [optional] | -|**tLowerCase** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**rLowerCase** | **String** | Reference price (null if no reference price) | [optional] | +|**tLowerCase** | **Long** | Engine timestamp when reference price was valid | [optional] | diff --git a/clients/spot/docs/ReferencePriceResponseResult.md b/clients/spot/docs/ReferencePriceResponseResult.md index f10750255..f7a53919e 100644 --- a/clients/spot/docs/ReferencePriceResponseResult.md +++ b/clients/spot/docs/ReferencePriceResponseResult.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | |**referencePrice** | **String** | | [optional] | -|**timestamp** | **Long** | | [optional] | +|**timestamp** | **Long** | Timestamp when the reference price was valid | [optional] | |**code** | **Long** | | [optional] | |**msg** | **String** | | [optional] | diff --git a/clients/spot/docs/RollingWindowTickerRequest.md b/clients/spot/docs/RollingWindowTickerRequest.md index 59f23046b..46449eeab 100644 --- a/clients/spot/docs/RollingWindowTickerRequest.md +++ b/clients/spot/docs/RollingWindowTickerRequest.md @@ -7,8 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | -|**windowSize** | **WindowSize** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to query | [optional] | +|**windowSize** | **WindowSize** | | [optional] | diff --git a/clients/spot/docs/RollingWindowTickerResponse.md b/clients/spot/docs/RollingWindowTickerResponse.md index 3e9f9f503..10e9c6558 100644 --- a/clients/spot/docs/RollingWindowTickerResponse.md +++ b/clients/spot/docs/RollingWindowTickerResponse.md @@ -7,23 +7,23 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**wLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**O** | **Long** | | [optional] | -|**C** | **Long** | | [optional] | -|**F** | **Long** | | [optional] | -|**L** | **Long** | | [optional] | -|**nLowerCase** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**pLowerCase** | **String** | Price change | [optional] | +|**P** | **String** | Price change percent | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**cLowerCase** | **String** | Last price | [optional] | +|**wLowerCase** | **String** | Weighted average price | [optional] | +|**vLowerCase** | **String** | Total traded base asset volume | [optional] | +|**qLowerCase** | **String** | Total traded quote asset volume | [optional] | +|**O** | **Long** | Statistics open time | [optional] | +|**C** | **Long** | Statistics close time | [optional] | +|**F** | **Long** | First trade ID | [optional] | +|**L** | **Long** | Last trade Id | [optional] | +|**nLowerCase** | **Long** | Total number of trades | [optional] | diff --git a/clients/spot/docs/SelfTradePreventionMode.md b/clients/spot/docs/SelfTradePreventionMode.md index 112eb6bef..2efc37e22 100644 --- a/clients/spot/docs/SelfTradePreventionMode.md +++ b/clients/spot/docs/SelfTradePreventionMode.md @@ -15,7 +15,7 @@ * `DECREMENT` (value: `"DECREMENT"`) -* `NON_REPRESENTABLE` (value: `"NON_REPRESENTABLE"`) +* `TRANSFER` (value: `"TRANSFER"`) diff --git a/clients/spot/docs/SessionLogonRequest.md b/clients/spot/docs/SessionLogonRequest.md index 78a2da46f..11ce77ff1 100644 --- a/clients/spot/docs/SessionLogonRequest.md +++ b/clients/spot/docs/SessionLogonRequest.md @@ -7,7 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**recvWindow** | **Double** | | [optional] | +|**id** | **String** | Client-generated request identifier. | [optional] | +|**recvWindow** | **Double** | The value cannot be greater than `60000`. Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/SessionLogonResponseResult.md b/clients/spot/docs/SessionLogonResponseResult.md index 8a1e4744e..9c1175633 100644 --- a/clients/spot/docs/SessionLogonResponseResult.md +++ b/clients/spot/docs/SessionLogonResponseResult.md @@ -12,7 +12,7 @@ |**connectedSince** | **Long** | | [optional] | |**returnRateLimits** | **Boolean** | | [optional] | |**serverTime** | **Long** | | [optional] | -|**userDataStream** | **Boolean** | | [optional] | +|**userDataStream** | **Boolean** | Is User Data Stream subscription active? | [optional] | diff --git a/clients/spot/docs/SessionLogoutResponseResult.md b/clients/spot/docs/SessionLogoutResponseResult.md index ddf1a503b..30c759a5e 100644 --- a/clients/spot/docs/SessionLogoutResponseResult.md +++ b/clients/spot/docs/SessionLogoutResponseResult.md @@ -12,7 +12,7 @@ |**connectedSince** | **Long** | | [optional] | |**returnRateLimits** | **Boolean** | | [optional] | |**serverTime** | **Long** | | [optional] | -|**userDataStream** | **Boolean** | | [optional] | +|**userDataStream** | **Boolean** | Is User Data Stream subscription active? | [optional] | diff --git a/clients/spot/docs/SessionStatusResponseResult.md b/clients/spot/docs/SessionStatusResponseResult.md index dcf2d4279..ca25b6777 100644 --- a/clients/spot/docs/SessionStatusResponseResult.md +++ b/clients/spot/docs/SessionStatusResponseResult.md @@ -12,7 +12,7 @@ |**connectedSince** | **Long** | | [optional] | |**returnRateLimits** | **Boolean** | | [optional] | |**serverTime** | **Long** | | [optional] | -|**userDataStream** | **Boolean** | | [optional] | +|**userDataStream** | **Boolean** | Is User Data Stream subscription active? | [optional] | diff --git a/clients/spot/docs/SorOrderPlaceRequest.md b/clients/spot/docs/SorOrderPlaceRequest.md index d2b7e945c..d3dcb0a75 100644 --- a/clients/spot/docs/SorOrderPlaceRequest.md +++ b/clients/spot/docs/SorOrderPlaceRequest.md @@ -7,19 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | |**side** | **Side** | | | |**type** | **OrderType** | | | |**timeInForce** | **TimeInForce** | | [optional] | |**price** | **Double** | | [optional] | |**quantity** | **Double** | | | -|**newClientOrderId** | **String** | | [optional] | +|**newClientOrderId** | **String** | A unique id among open orders. Automatically generated if not sent.<br/> Orders with the same `newClientOrderID` can be accepted only when the previous one is filled, otherwise the order will be rejected. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | -|**icebergQty** | **Double** | | [optional] | +|**icebergQty** | **Double** | Used with `LIMIT` to create an iceberg order. | [optional] | |**strategyId** | **Long** | | [optional] | -|**strategyType** | **Integer** | | [optional] | +|**strategyType** | **Integer** | The value cannot be less than `1000000`. | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/SorOrderPlaceResponse.md b/clients/spot/docs/SorOrderPlaceResponse.md index 48e3ab896..69a10665e 100644 --- a/clients/spot/docs/SorOrderPlaceResponse.md +++ b/clients/spot/docs/SorOrderPlaceResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<SorOrderPlaceResponseResultInner>**](SorOrderPlaceResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/SorOrderPlaceResponseResultInner.md b/clients/spot/docs/SorOrderPlaceResponseResultInner.md index a21e220c7..43b38d5f5 100644 --- a/clients/spot/docs/SorOrderPlaceResponseResultInner.md +++ b/clients/spot/docs/SorOrderPlaceResponseResultInner.md @@ -23,9 +23,22 @@ |**side** | **String** | | [optional] | |**workingTime** | **Long** | | [optional] | |**fills** | [**List<SorOrderPlaceResponseResultInnerFillsInner>**](SorOrderPlaceResponseResultInnerFillsInner.md) | | [optional] | -|**workingFloor** | **String** | | [optional] | +|**workingFloor** | **String** | Determines whether the order is being filled by the SOR or by the order book. | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | -|**usedSor** | **Boolean** | | [optional] | +|**usedSor** | **Boolean** | Field that determines whether order used SOR. | [optional] | +|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | +|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | +|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | +|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | +|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | +|**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | +|**trailingTime** | **Long** | Time when the trailing order is now active and tracking price changes. | [optional] | +|**pegPriceType** | **String** | Price peg type. Only for pegged orders. | [optional] | +|**pegOffsetType** | **String** | Price peg offset type. Only for pegged orders, if requested. | [optional] | +|**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | +|**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | +|**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | diff --git a/clients/spot/docs/SorOrderRequest.md b/clients/spot/docs/SorOrderRequest.md index 8982f2804..6ba06d6a2 100644 --- a/clients/spot/docs/SorOrderRequest.md +++ b/clients/spot/docs/SorOrderRequest.md @@ -13,13 +13,13 @@ |**timeInForce** | **TimeInForce** | | [optional] | |**quantity** | **Double** | | | |**price** | **Double** | | [optional] | -|**newClientOrderId** | **String** | | [optional] | +|**newClientOrderId** | **String** | A unique id among open orders. Automatically generated if not sent.<br/> Orders with the same `newClientOrderID` can be accepted only when the previous one is filled, otherwise the order will be rejected. | [optional] | |**strategyId** | **Long** | | [optional] | -|**strategyType** | **Integer** | | [optional] | -|**icebergQty** | **Double** | | [optional] | +|**strategyType** | **Integer** | The value cannot be less than `1000000`. | [optional] | +|**icebergQty** | **Double** | Used with `LIMIT` to create an iceberg order. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | The value cannot be greater than `60000`. <br> Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/SorOrderTestRequest.md b/clients/spot/docs/SorOrderTestRequest.md index 79f36a6f8..2890f6953 100644 --- a/clients/spot/docs/SorOrderTestRequest.md +++ b/clients/spot/docs/SorOrderTestRequest.md @@ -7,20 +7,21 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**computeCommissionRates** | **Boolean** | | [optional] | +|**id** | **String** | Client-generated request identifier. | [optional] | +|**computeCommissionRates** | **Boolean** | Default: `false` | [optional] | |**symbol** | **String** | | | |**side** | **Side** | | | |**type** | **OrderType** | | | |**timeInForce** | **TimeInForce** | | [optional] | |**price** | **Double** | | [optional] | |**quantity** | **Double** | | | -|**newClientOrderId** | **String** | | [optional] | +|**newClientOrderId** | **String** | A unique id among open orders. Automatically generated if not sent. Orders with the same `newClientOrderID` can be accepted only when the previous one is filled, otherwise the order will be rejected. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | -|**icebergQty** | **Double** | | [optional] | +|**icebergQty** | **Double** | Used with `LIMIT` to create an iceberg order. | [optional] | |**strategyId** | **Long** | | [optional] | -|**strategyType** | **Integer** | | [optional] | +|**strategyType** | **Integer** | The value cannot be less than `1000000`. | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | -|**recvWindow** | **Double** | | [optional] | +|**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/SorOrderTestResponse.md b/clients/spot/docs/SorOrderTestResponse.md index 423d129a6..f7a7c6d43 100644 --- a/clients/spot/docs/SorOrderTestResponse.md +++ b/clients/spot/docs/SorOrderTestResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**SorOrderTestResponseResult**](SorOrderTestResponseResult.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/SymbolStatus.md b/clients/spot/docs/SymbolStatus.md index b50cef96c..481405cc1 100644 --- a/clients/spot/docs/SymbolStatus.md +++ b/clients/spot/docs/SymbolStatus.md @@ -7,13 +7,9 @@ * `TRADING` (value: `"TRADING"`) -* `END_OF_DAY` (value: `"END_OF_DAY"`) - * `HALT` (value: `"HALT"`) * `BREAK` (value: `"BREAK"`) -* `NON_REPRESENTABLE` (value: `"NON_REPRESENTABLE"`) - diff --git a/clients/spot/docs/Ticker24hrRequest.md b/clients/spot/docs/Ticker24hrRequest.md index 9a10d77b9..35bcb18f8 100644 --- a/clients/spot/docs/Ticker24hrRequest.md +++ b/clients/spot/docs/Ticker24hrRequest.md @@ -7,9 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | [optional] | |**symbols** | **Symbols** | | [optional] | -|**tickerType** | **TickerType** | | [optional] | +|**type** | **TickerType** | | [optional] | |**symbolStatus** | **SymbolStatus** | | [optional] | diff --git a/clients/spot/docs/Ticker24hrResponse.md b/clients/spot/docs/Ticker24hrResponse.md index bbaa47a2a..23069a833 100644 --- a/clients/spot/docs/Ticker24hrResponse.md +++ b/clients/spot/docs/Ticker24hrResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<Ticker24hrResponse2ResultInner>**](Ticker24hrResponse2ResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/Ticker24hrResponse1.md b/clients/spot/docs/Ticker24hrResponse1.md index 2a12d16f6..afffd05b9 100644 --- a/clients/spot/docs/Ticker24hrResponse1.md +++ b/clients/spot/docs/Ticker24hrResponse1.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**Ticker24hrResponse1Result**](Ticker24hrResponse1Result.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/Ticker24hrResponse1Result.md b/clients/spot/docs/Ticker24hrResponse1Result.md index 72d523fcf..b2eac510c 100644 --- a/clients/spot/docs/Ticker24hrResponse1Result.md +++ b/clients/spot/docs/Ticker24hrResponse1Result.md @@ -7,27 +7,27 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | +|**symbol** | **String** | Symbol Name | [optional] | |**priceChange** | **String** | | [optional] | |**priceChangePercent** | **String** | | [optional] | |**weightedAvgPrice** | **String** | | [optional] | |**prevClosePrice** | **String** | | [optional] | -|**lastPrice** | **String** | | [optional] | +|**lastPrice** | **String** | Closing price of the interval | [optional] | |**lastQty** | **String** | | [optional] | |**bidPrice** | **String** | | [optional] | |**bidQty** | **String** | | [optional] | |**askPrice** | **String** | | [optional] | |**askQty** | **String** | | [optional] | -|**openPrice** | **String** | | [optional] | -|**highPrice** | **String** | | [optional] | -|**lowPrice** | **String** | | [optional] | -|**volume** | **String** | | [optional] | -|**quoteVolume** | **String** | | [optional] | -|**openTime** | **Long** | | [optional] | -|**closeTime** | **Long** | | [optional] | -|**firstId** | **Long** | | [optional] | -|**lastId** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**openPrice** | **String** | Opening price of the Interval | [optional] | +|**highPrice** | **String** | Highest price in the interval | [optional] | +|**lowPrice** | **String** | Lowest price in the interval | [optional] | +|**volume** | **String** | Total trade volume (in base asset) | [optional] | +|**quoteVolume** | **String** | Total trade volume (in quote asset) | [optional] | +|**openTime** | **Long** | Start of the ticker interval | [optional] | +|**closeTime** | **Long** | End of the ticker interval | [optional] | +|**firstId** | **Long** | First tradeId | [optional] | +|**lastId** | **Long** | Last tradeId | [optional] | +|**count** | **Long** | Trade count | [optional] | diff --git a/clients/spot/docs/Ticker24hrResponse2.md b/clients/spot/docs/Ticker24hrResponse2.md index 97fae071b..e04456f38 100644 --- a/clients/spot/docs/Ticker24hrResponse2.md +++ b/clients/spot/docs/Ticker24hrResponse2.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<Ticker24hrResponse2ResultInner>**](Ticker24hrResponse2ResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/Ticker24hrResponse2Inner.md b/clients/spot/docs/Ticker24hrResponse2Inner.md index a04f9dd4e..7e12b2e35 100644 --- a/clients/spot/docs/Ticker24hrResponse2Inner.md +++ b/clients/spot/docs/Ticker24hrResponse2Inner.md @@ -7,27 +7,27 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | +|**symbol** | **String** | Symbol Name | [optional] | |**priceChange** | **String** | | [optional] | |**priceChangePercent** | **String** | | [optional] | |**weightedAvgPrice** | **String** | | [optional] | |**prevClosePrice** | **String** | | [optional] | -|**lastPrice** | **String** | | [optional] | +|**lastPrice** | **String** | Closing price of the interval | [optional] | |**lastQty** | **String** | | [optional] | |**bidPrice** | **String** | | [optional] | |**bidQty** | **String** | | [optional] | |**askPrice** | **String** | | [optional] | |**askQty** | **String** | | [optional] | -|**openPrice** | **String** | | [optional] | -|**highPrice** | **String** | | [optional] | -|**lowPrice** | **String** | | [optional] | -|**volume** | **String** | | [optional] | -|**quoteVolume** | **String** | | [optional] | -|**openTime** | **Long** | | [optional] | -|**closeTime** | **Long** | | [optional] | -|**firstId** | **Long** | | [optional] | -|**lastId** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**openPrice** | **String** | Opening price of the Interval | [optional] | +|**highPrice** | **String** | Highest price in the interval | [optional] | +|**lowPrice** | **String** | Lowest price in the interval | [optional] | +|**volume** | **String** | Total trade volume (in base asset) | [optional] | +|**quoteVolume** | **String** | Total trade volume (in quote asset) | [optional] | +|**openTime** | **Long** | Start of the ticker interval | [optional] | +|**closeTime** | **Long** | End of the ticker interval | [optional] | +|**firstId** | **Long** | First tradeId | [optional] | +|**lastId** | **Long** | Last tradeId | [optional] | +|**count** | **Long** | Trade count | [optional] | diff --git a/clients/spot/docs/Ticker24hrResponse2ResultInner.md b/clients/spot/docs/Ticker24hrResponse2ResultInner.md index 9145d9133..09635dc72 100644 --- a/clients/spot/docs/Ticker24hrResponse2ResultInner.md +++ b/clients/spot/docs/Ticker24hrResponse2ResultInner.md @@ -7,27 +7,27 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | +|**symbol** | **String** | Symbol Name | [optional] | |**priceChange** | **String** | | [optional] | |**priceChangePercent** | **String** | | [optional] | |**weightedAvgPrice** | **String** | | [optional] | |**prevClosePrice** | **String** | | [optional] | -|**lastPrice** | **String** | | [optional] | +|**lastPrice** | **String** | Closing price of the interval | [optional] | |**lastQty** | **String** | | [optional] | |**bidPrice** | **String** | | [optional] | |**bidQty** | **String** | | [optional] | |**askPrice** | **String** | | [optional] | |**askQty** | **String** | | [optional] | -|**openPrice** | **String** | | [optional] | -|**highPrice** | **String** | | [optional] | -|**lowPrice** | **String** | | [optional] | -|**volume** | **String** | | [optional] | -|**quoteVolume** | **String** | | [optional] | -|**openTime** | **Long** | | [optional] | -|**closeTime** | **Long** | | [optional] | -|**firstId** | **Long** | | [optional] | -|**lastId** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**openPrice** | **String** | Opening price of the Interval | [optional] | +|**highPrice** | **String** | Highest price in the interval | [optional] | +|**lowPrice** | **String** | Lowest price in the interval | [optional] | +|**volume** | **String** | Total trade volume (in base asset) | [optional] | +|**quoteVolume** | **String** | Total trade volume (in quote asset) | [optional] | +|**openTime** | **Long** | Start of the ticker interval | [optional] | +|**closeTime** | **Long** | End of the ticker interval | [optional] | +|**firstId** | **Long** | First tradeId | [optional] | +|**lastId** | **Long** | Last tradeId | [optional] | +|**count** | **Long** | Trade count | [optional] | diff --git a/clients/spot/docs/TickerBookRequest.md b/clients/spot/docs/TickerBookRequest.md index e807bc2db..c7380b9bb 100644 --- a/clients/spot/docs/TickerBookRequest.md +++ b/clients/spot/docs/TickerBookRequest.md @@ -7,7 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | +|**id** | **String** | Client-generated request identifier. | [optional] | +|**symbol** | **String** | Query ticker for a single symbol | [optional] | |**symbols** | **Symbols** | | [optional] | |**symbolStatus** | **SymbolStatus** | | [optional] | diff --git a/clients/spot/docs/TickerBookResponse.md b/clients/spot/docs/TickerBookResponse.md index 40f9dc823..6fdc5f20d 100644 --- a/clients/spot/docs/TickerBookResponse.md +++ b/clients/spot/docs/TickerBookResponse.md @@ -9,8 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | -|**result** | [**List<TickerBookResponse1Result>**](TickerBookResponse1Result.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**result** | [**List<TickerBookResponse2ResultInner>**](TickerBookResponse2ResultInner.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerBookResponse1.md b/clients/spot/docs/TickerBookResponse1.md index 5c8c4d616..eedeed21a 100644 --- a/clients/spot/docs/TickerBookResponse1.md +++ b/clients/spot/docs/TickerBookResponse1.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**TickerBookResponse1Result**](TickerBookResponse1Result.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerBookResponse1Result.md b/clients/spot/docs/TickerBookResponse1Result.md index 8542320df..6a07ba091 100644 --- a/clients/spot/docs/TickerBookResponse1Result.md +++ b/clients/spot/docs/TickerBookResponse1Result.md @@ -8,10 +8,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**bidPrice** | **String** | | [optional] | -|**bidQty** | **String** | | [optional] | -|**askPrice** | **String** | | [optional] | -|**askQty** | **String** | | [optional] | +|**bidPrice** | **String** | best bid price. | [optional] | +|**bidQty** | **String** | bid/ask qty. | [optional] | +|**askPrice** | **String** | best ask price. | [optional] | +|**askQty** | **String** | bid/ask qty. | [optional] | diff --git a/clients/spot/docs/TickerBookResponse2.md b/clients/spot/docs/TickerBookResponse2.md index 7ef7d1368..66a2fcc66 100644 --- a/clients/spot/docs/TickerBookResponse2.md +++ b/clients/spot/docs/TickerBookResponse2.md @@ -9,8 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | -|**result** | [**List<TickerBookResponse1Result>**](TickerBookResponse1Result.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**result** | [**List<TickerBookResponse2ResultInner>**](TickerBookResponse2ResultInner.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerBookResponse2ResultInner.md b/clients/spot/docs/TickerBookResponse2ResultInner.md new file mode 100644 index 000000000..86a6baf0b --- /dev/null +++ b/clients/spot/docs/TickerBookResponse2ResultInner.md @@ -0,0 +1,17 @@ + + +# TickerBookResponse2ResultInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**symbol** | **String** | | [optional] | +|**bidPrice** | **String** | best bid price. | [optional] | +|**bidQty** | **String** | bid/ask qty. | [optional] | +|**askPrice** | **String** | best ask price. | [optional] | +|**askQty** | **String** | bid/ask qty. | [optional] | + + + diff --git a/clients/spot/docs/TickerBookTickerResponse.md b/clients/spot/docs/TickerBookTickerResponse.md index 4cddf0970..23d5cbf20 100644 --- a/clients/spot/docs/TickerBookTickerResponse.md +++ b/clients/spot/docs/TickerBookTickerResponse.md @@ -8,10 +8,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**bidPrice** | **String** | | [optional] | -|**bidQty** | **String** | | [optional] | -|**askPrice** | **String** | | [optional] | -|**askQty** | **String** | | [optional] | +|**bidPrice** | **String** | best bid price. | [optional] | +|**bidQty** | **String** | bid/ask qty. | [optional] | +|**askPrice** | **String** | best ask price. | [optional] | +|**askQty** | **String** | bid/ask qty. | [optional] | diff --git a/clients/spot/docs/TickerBookTickerResponse1.md b/clients/spot/docs/TickerBookTickerResponse1.md index 0bf3efc56..36004b93b 100644 --- a/clients/spot/docs/TickerBookTickerResponse1.md +++ b/clients/spot/docs/TickerBookTickerResponse1.md @@ -8,10 +8,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**bidPrice** | **String** | | [optional] | -|**bidQty** | **String** | | [optional] | -|**askPrice** | **String** | | [optional] | -|**askQty** | **String** | | [optional] | +|**bidPrice** | **String** | best bid price. | [optional] | +|**bidQty** | **String** | bid/ask qty. | [optional] | +|**askPrice** | **String** | best ask price. | [optional] | +|**askQty** | **String** | bid/ask qty. | [optional] | diff --git a/clients/spot/docs/TickerBookTickerResponse2Inner.md b/clients/spot/docs/TickerBookTickerResponse2Inner.md index bbad85235..72a8c7205 100644 --- a/clients/spot/docs/TickerBookTickerResponse2Inner.md +++ b/clients/spot/docs/TickerBookTickerResponse2Inner.md @@ -8,10 +8,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**bidPrice** | **String** | | [optional] | -|**bidQty** | **String** | | [optional] | -|**askPrice** | **String** | | [optional] | -|**askQty** | **String** | | [optional] | +|**bidPrice** | **String** | best bid price. | [optional] | +|**bidQty** | **String** | bid/ask qty. | [optional] | +|**askPrice** | **String** | best ask price. | [optional] | +|**askQty** | **String** | bid/ask qty. | [optional] | diff --git a/clients/spot/docs/TickerPriceRequest.md b/clients/spot/docs/TickerPriceRequest.md index 009607b2e..c0690e738 100644 --- a/clients/spot/docs/TickerPriceRequest.md +++ b/clients/spot/docs/TickerPriceRequest.md @@ -7,7 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | +|**id** | **String** | Client-generated request identifier. | [optional] | +|**symbol** | **String** | Query price for a single symbol | [optional] | |**symbols** | **Symbols** | | [optional] | |**symbolStatus** | **SymbolStatus** | | [optional] | diff --git a/clients/spot/docs/TickerPriceResponse.md b/clients/spot/docs/TickerPriceResponse.md index d5869dcad..2d0daf18e 100644 --- a/clients/spot/docs/TickerPriceResponse.md +++ b/clients/spot/docs/TickerPriceResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<TickerPriceResponse2ResultInner>**](TickerPriceResponse2ResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerPriceResponse1.md b/clients/spot/docs/TickerPriceResponse1.md index f0e660ee2..d9ad9042e 100644 --- a/clients/spot/docs/TickerPriceResponse1.md +++ b/clients/spot/docs/TickerPriceResponse1.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**TickerPriceResponse1Result**](TickerPriceResponse1Result.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerPriceResponse2.md b/clients/spot/docs/TickerPriceResponse2.md index 77017731b..61494cf50 100644 --- a/clients/spot/docs/TickerPriceResponse2.md +++ b/clients/spot/docs/TickerPriceResponse2.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<TickerPriceResponse2ResultInner>**](TickerPriceResponse2ResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerRequest.md b/clients/spot/docs/TickerRequest.md index c333583ab..7e66b9d0c 100644 --- a/clients/spot/docs/TickerRequest.md +++ b/clients/spot/docs/TickerRequest.md @@ -7,7 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to query | [optional] | diff --git a/clients/spot/docs/TickerResponse.md b/clients/spot/docs/TickerResponse.md index b8679bb67..0ab4469c6 100644 --- a/clients/spot/docs/TickerResponse.md +++ b/clients/spot/docs/TickerResponse.md @@ -7,29 +7,29 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**wLowerCase** | **String** | | [optional] | -|**xLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**B** | **String** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**A** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**hLowerCase** | **String** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**vLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**O** | **Long** | | [optional] | -|**C** | **Long** | | [optional] | -|**F** | **Long** | | [optional] | -|**L** | **Long** | | [optional] | -|**nLowerCase** | **Long** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**pLowerCase** | **String** | Price change | [optional] | +|**P** | **String** | Price change percent | [optional] | +|**wLowerCase** | **String** | Weighted average price | [optional] | +|**xLowerCase** | **String** | First trade(F)-1 price (first trade before the 24hr rolling window) | [optional] | +|**cLowerCase** | **String** | Last price | [optional] | +|**Q** | **String** | Last quantity | [optional] | +|**bLowerCase** | **String** | Best bid price | [optional] | +|**B** | **String** | Best bid quantity | [optional] | +|**aLowerCase** | **String** | Best ask price | [optional] | +|**A** | **String** | Best ask quantity | [optional] | +|**oLowerCase** | **String** | Open price | [optional] | +|**hLowerCase** | **String** | High price | [optional] | +|**lLowerCase** | **String** | Low price | [optional] | +|**vLowerCase** | **String** | Total traded base asset volume | [optional] | +|**qLowerCase** | **String** | Total traded quote asset volume | [optional] | +|**O** | **Long** | Statistics open time | [optional] | +|**C** | **Long** | Statistics close time | [optional] | +|**F** | **Long** | First trade ID | [optional] | +|**L** | **Long** | Last trade Id | [optional] | +|**nLowerCase** | **Long** | Total number of trades | [optional] | diff --git a/clients/spot/docs/TickerResponse1.md b/clients/spot/docs/TickerResponse1.md index df9f5e1f3..2de129c3b 100644 --- a/clients/spot/docs/TickerResponse1.md +++ b/clients/spot/docs/TickerResponse1.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**TickerResponse1Result**](TickerResponse1Result.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerResponse1Result.md b/clients/spot/docs/TickerResponse1Result.md index 367d25b77..53253c3dc 100644 --- a/clients/spot/docs/TickerResponse1Result.md +++ b/clients/spot/docs/TickerResponse1Result.md @@ -8,20 +8,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**priceChange** | **String** | | [optional] | -|**priceChangePercent** | **String** | | [optional] | -|**weightedAvgPrice** | **String** | | [optional] | +|**priceChange** | **String** | Absolute price change | [optional] | +|**priceChangePercent** | **String** | Relative price change in percent | [optional] | +|**weightedAvgPrice** | **String** | QuoteVolume / Volume | [optional] | |**openPrice** | **String** | | [optional] | |**highPrice** | **String** | | [optional] | |**lowPrice** | **String** | | [optional] | |**lastPrice** | **String** | | [optional] | |**volume** | **String** | | [optional] | -|**quoteVolume** | **String** | | [optional] | -|**openTime** | **Long** | | [optional] | -|**closeTime** | **Long** | | [optional] | -|**firstId** | **Long** | | [optional] | +|**quoteVolume** | **String** | Sum of (price * volume) for all trades | [optional] | +|**openTime** | **Long** | Open time for ticker window | [optional] | +|**closeTime** | **Long** | Close time for ticker window | [optional] | +|**firstId** | **Long** | Trade IDs | [optional] | |**lastId** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**count** | **Long** | Number of trades in the interval | [optional] | diff --git a/clients/spot/docs/TickerResponse2.md b/clients/spot/docs/TickerResponse2.md index db8ba5f27..56f6e680f 100644 --- a/clients/spot/docs/TickerResponse2.md +++ b/clients/spot/docs/TickerResponse2.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<TickerResponse2ResultInner>**](TickerResponse2ResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerResponse2Inner.md b/clients/spot/docs/TickerResponse2Inner.md index 000402e0d..dc395fb52 100644 --- a/clients/spot/docs/TickerResponse2Inner.md +++ b/clients/spot/docs/TickerResponse2Inner.md @@ -8,20 +8,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**priceChange** | **String** | | [optional] | -|**priceChangePercent** | **String** | | [optional] | -|**weightedAvgPrice** | **String** | | [optional] | +|**priceChange** | **String** | Absolute price change | [optional] | +|**priceChangePercent** | **String** | Relative price change in percent | [optional] | +|**weightedAvgPrice** | **String** | QuoteVolume / Volume | [optional] | |**openPrice** | **String** | | [optional] | |**highPrice** | **String** | | [optional] | |**lowPrice** | **String** | | [optional] | |**lastPrice** | **String** | | [optional] | |**volume** | **String** | | [optional] | -|**quoteVolume** | **String** | | [optional] | -|**openTime** | **Long** | | [optional] | -|**closeTime** | **Long** | | [optional] | -|**firstId** | **Long** | | [optional] | +|**quoteVolume** | **String** | Sum of (price * volume) for all trades | [optional] | +|**openTime** | **Long** | Open time for ticker window | [optional] | +|**closeTime** | **Long** | Close time for ticker window | [optional] | +|**firstId** | **Long** | Trade IDs | [optional] | |**lastId** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**count** | **Long** | Number of trades in the interval | [optional] | diff --git a/clients/spot/docs/TickerResponse2ResultInner.md b/clients/spot/docs/TickerResponse2ResultInner.md index d0e521775..35c7d9225 100644 --- a/clients/spot/docs/TickerResponse2ResultInner.md +++ b/clients/spot/docs/TickerResponse2ResultInner.md @@ -8,20 +8,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**priceChange** | **String** | | [optional] | -|**priceChangePercent** | **String** | | [optional] | -|**weightedAvgPrice** | **String** | | [optional] | +|**priceChange** | **String** | Absolute price change | [optional] | +|**priceChangePercent** | **String** | Relative price change in percent | [optional] | +|**weightedAvgPrice** | **String** | QuoteVolume / Volume | [optional] | |**openPrice** | **String** | | [optional] | |**highPrice** | **String** | | [optional] | |**lowPrice** | **String** | | [optional] | |**lastPrice** | **String** | | [optional] | |**volume** | **String** | | [optional] | -|**quoteVolume** | **String** | | [optional] | -|**openTime** | **Long** | | [optional] | -|**closeTime** | **Long** | | [optional] | -|**firstId** | **Long** | | [optional] | +|**quoteVolume** | **String** | Sum of (price * volume) for all trades | [optional] | +|**openTime** | **Long** | Open time for ticker window | [optional] | +|**closeTime** | **Long** | Close time for ticker window | [optional] | +|**firstId** | **Long** | Trade IDs | [optional] | |**lastId** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**count** | **Long** | Number of trades in the interval | [optional] | diff --git a/clients/spot/docs/TickerTradingDayRequest.md b/clients/spot/docs/TickerTradingDayRequest.md index 2e13c309d..ce4b1b6fc 100644 --- a/clients/spot/docs/TickerTradingDayRequest.md +++ b/clients/spot/docs/TickerTradingDayRequest.md @@ -7,10 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | [optional] | |**symbols** | **Symbols** | | [optional] | -|**timeZone** | **String** | | [optional] | -|**tickerType** | **TickerType** | | [optional] | +|**timeZone** | **String** | Default: 0 (UTC) | [optional] | +|**type** | **TickerType** | | [optional] | |**symbolStatus** | **SymbolStatus** | | [optional] | diff --git a/clients/spot/docs/TickerTradingDayResponse.md b/clients/spot/docs/TickerTradingDayResponse.md index d3f9fc2ba..bc5450cd8 100644 --- a/clients/spot/docs/TickerTradingDayResponse.md +++ b/clients/spot/docs/TickerTradingDayResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<TickerTradingDayResponseResultInner>**](TickerTradingDayResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerTradingDayResponse1.md b/clients/spot/docs/TickerTradingDayResponse1.md index d4eeeea65..330c24fcc 100644 --- a/clients/spot/docs/TickerTradingDayResponse1.md +++ b/clients/spot/docs/TickerTradingDayResponse1.md @@ -8,20 +8,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**priceChange** | **String** | | [optional] | -|**priceChangePercent** | **String** | | [optional] | -|**weightedAvgPrice** | **String** | | [optional] | +|**priceChange** | **String** | Absolute price change | [optional] | +|**priceChangePercent** | **String** | Relative price change in percent | [optional] | +|**weightedAvgPrice** | **String** | quoteVolume / volume | [optional] | |**openPrice** | **String** | | [optional] | |**highPrice** | **String** | | [optional] | |**lowPrice** | **String** | | [optional] | |**lastPrice** | **String** | | [optional] | -|**volume** | **String** | | [optional] | -|**quoteVolume** | **String** | | [optional] | +|**volume** | **String** | Volume in base asset | [optional] | +|**quoteVolume** | **String** | Volume in quote asset | [optional] | |**openTime** | **Long** | | [optional] | |**closeTime** | **Long** | | [optional] | -|**firstId** | **Long** | | [optional] | -|**lastId** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**firstId** | **Long** | Trade ID of the first trade in the interval | [optional] | +|**lastId** | **Long** | Trade ID of the last trade in the interval | [optional] | +|**count** | **Long** | Number of trades in the interval | [optional] | diff --git a/clients/spot/docs/TickerTradingDayResponse2Inner.md b/clients/spot/docs/TickerTradingDayResponse2Inner.md index 77a3f9eb8..90dd2af4e 100644 --- a/clients/spot/docs/TickerTradingDayResponse2Inner.md +++ b/clients/spot/docs/TickerTradingDayResponse2Inner.md @@ -8,20 +8,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**priceChange** | **String** | | [optional] | -|**priceChangePercent** | **String** | | [optional] | -|**weightedAvgPrice** | **String** | | [optional] | +|**priceChange** | **String** | Absolute price change | [optional] | +|**priceChangePercent** | **String** | Relative price change in percent | [optional] | +|**weightedAvgPrice** | **String** | quoteVolume / volume | [optional] | |**openPrice** | **String** | | [optional] | |**highPrice** | **String** | | [optional] | |**lowPrice** | **String** | | [optional] | |**lastPrice** | **String** | | [optional] | -|**volume** | **String** | | [optional] | -|**quoteVolume** | **String** | | [optional] | +|**volume** | **String** | Volume in base asset | [optional] | +|**quoteVolume** | **String** | Volume in quote asset | [optional] | |**openTime** | **Long** | | [optional] | |**closeTime** | **Long** | | [optional] | -|**firstId** | **Long** | | [optional] | -|**lastId** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**firstId** | **Long** | Trade ID of the first trade in the interval | [optional] | +|**lastId** | **Long** | Trade ID of the last trade in the interval | [optional] | +|**count** | **Long** | Number of trades in the interval | [optional] | diff --git a/clients/spot/docs/TickerTradingDayResponseResultInner.md b/clients/spot/docs/TickerTradingDayResponseResultInner.md index ad6c5b487..8c5db69df 100644 --- a/clients/spot/docs/TickerTradingDayResponseResultInner.md +++ b/clients/spot/docs/TickerTradingDayResponseResultInner.md @@ -8,20 +8,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**priceChange** | **String** | | [optional] | -|**priceChangePercent** | **String** | | [optional] | -|**weightedAvgPrice** | **String** | | [optional] | +|**priceChange** | **String** | Absolute price change | [optional] | +|**priceChangePercent** | **String** | Relative price change in percent | [optional] | +|**weightedAvgPrice** | **String** | quoteVolume / volume | [optional] | |**openPrice** | **String** | | [optional] | |**highPrice** | **String** | | [optional] | |**lowPrice** | **String** | | [optional] | |**lastPrice** | **String** | | [optional] | -|**volume** | **String** | | [optional] | -|**quoteVolume** | **String** | | [optional] | +|**volume** | **String** | Volume in base asset | [optional] | +|**quoteVolume** | **String** | Volume in quote asset | [optional] | |**openTime** | **Long** | | [optional] | |**closeTime** | **Long** | | [optional] | -|**firstId** | **Long** | | [optional] | -|**lastId** | **Long** | | [optional] | -|**count** | **Long** | | [optional] | +|**firstId** | **Long** | Trade ID of the first trade in the interval | [optional] | +|**lastId** | **Long** | Trade ID of the last trade in the interval | [optional] | +|**count** | **Long** | Number of trades in the interval | [optional] | diff --git a/clients/spot/docs/TimeInForce.md b/clients/spot/docs/TimeInForce.md index cf140bbae..551040eb9 100644 --- a/clients/spot/docs/TimeInForce.md +++ b/clients/spot/docs/TimeInForce.md @@ -11,7 +11,5 @@ * `FOK` (value: `"FOK"`) -* `NON_REPRESENTABLE` (value: `"NON_REPRESENTABLE"`) - diff --git a/clients/spot/docs/TimeResponse.md b/clients/spot/docs/TimeResponse.md index f11e30b6d..907d9dc5d 100644 --- a/clients/spot/docs/TimeResponse.md +++ b/clients/spot/docs/TimeResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**TimeResponseResult**](TimeResponseResult.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TradeApi.md b/clients/spot/docs/TradeApi.md index 313cfd279..2074bbc10 100644 --- a/clients/spot/docs/TradeApi.md +++ b/clients/spot/docs/TradeApi.md @@ -4,30 +4,30 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**openOrdersCancelAll**](TradeApi.md#openOrdersCancelAll) | **POST** /openOrders.cancelAll | WebSocket Cancel open orders | -| [**orderAmendKeepPriority**](TradeApi.md#orderAmendKeepPriority) | **POST** /order.amend.keepPriority | WebSocket Order Amend Keep Priority | -| [**orderCancel**](TradeApi.md#orderCancel) | **POST** /order.cancel | WebSocket Cancel order | -| [**orderCancelReplace**](TradeApi.md#orderCancelReplace) | **POST** /order.cancelReplace | WebSocket Cancel and replace order | -| [**orderListCancel**](TradeApi.md#orderListCancel) | **POST** /orderList.cancel | WebSocket Cancel Order list | -| [**orderListPlace**](TradeApi.md#orderListPlace) | **POST** /orderList.place | WebSocket Place new OCO - Deprecated | -| [**orderListPlaceOco**](TradeApi.md#orderListPlaceOco) | **POST** /orderList.place.oco | WebSocket Place new Order list - OCO | -| [**orderListPlaceOpo**](TradeApi.md#orderListPlaceOpo) | **POST** /orderList.place.opo | WebSocket OPO | -| [**orderListPlaceOpoco**](TradeApi.md#orderListPlaceOpoco) | **POST** /orderList.place.opoco | WebSocket OPOCO | -| [**orderListPlaceOto**](TradeApi.md#orderListPlaceOto) | **POST** /orderList.place.oto | WebSocket Place new Order list - OTO | -| [**orderListPlaceOtoco**](TradeApi.md#orderListPlaceOtoco) | **POST** /orderList.place.otoco | WebSocket Place new Order list - OTOCO | -| [**orderPlace**](TradeApi.md#orderPlace) | **POST** /order.place | WebSocket Place new order | -| [**orderTest**](TradeApi.md#orderTest) | **POST** /order.test | WebSocket Test new order | -| [**sorOrderPlace**](TradeApi.md#sorOrderPlace) | **POST** /sor.order.place | WebSocket Place new order using SOR | -| [**sorOrderTest**](TradeApi.md#sorOrderTest) | **POST** /sor.order.test | WebSocket Test new order using SOR | +| [**openOrdersCancelAll**](TradeApi.md#openOrdersCancelAll) | **POST** /openOrders.cancelAll | Cancel open orders (TRADE) | +| [**orderAmendKeepPriority**](TradeApi.md#orderAmendKeepPriority) | **POST** /order.amend.keepPriority | Order Amend Keep Priority (TRADE) | +| [**orderCancel**](TradeApi.md#orderCancel) | **POST** /order.cancel | Cancel order (TRADE) | +| [**orderCancelReplace**](TradeApi.md#orderCancelReplace) | **POST** /order.cancelReplace | Cancel and replace order (TRADE) | +| [**orderListCancel**](TradeApi.md#orderListCancel) | **POST** /orderList.cancel | Cancel Order list (TRADE) | +| [**orderListPlace**](TradeApi.md#orderListPlace) | **POST** /orderList.place | Place new OCO - Deprecated (TRADE) | +| [**orderListPlaceOco**](TradeApi.md#orderListPlaceOco) | **POST** /orderList.place.oco | Place new Order list - OCO (TRADE) | +| [**orderListPlaceOpo**](TradeApi.md#orderListPlaceOpo) | **POST** /orderList.place.opo | OPO (TRADE) | +| [**orderListPlaceOpoco**](TradeApi.md#orderListPlaceOpoco) | **POST** /orderList.place.opoco | OPOCO (TRADE) | +| [**orderListPlaceOto**](TradeApi.md#orderListPlaceOto) | **POST** /orderList.place.oto | Place new Order list - OTO (TRADE) | +| [**orderListPlaceOtoco**](TradeApi.md#orderListPlaceOtoco) | **POST** /orderList.place.otoco | Place new Order list - OTOCO (TRADE) | +| [**orderPlace**](TradeApi.md#orderPlace) | **POST** /order.place | Place new order (TRADE) | +| [**orderTest**](TradeApi.md#orderTest) | **POST** /order.test | Test new order (TRADE) | +| [**sorOrderPlace**](TradeApi.md#sorOrderPlace) | **POST** /sor.order.place | Place new order using SOR (TRADE) | +| [**sorOrderTest**](TradeApi.md#sorOrderTest) | **POST** /sor.order.test | Test new order using SOR (TRADE) | # **openOrdersCancelAll** > OpenOrdersCancelAllResponse openOrdersCancelAll(openOrdersCancelAllRequest) -WebSocket Cancel open orders +Cancel open orders (TRADE) -Cancel all open orders on a symbol. This includes orders that are part of an order list. Weight: 1 +Cancel all open orders on a symbol. This includes orders that are part of an order list. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching Engine ### Example ```java @@ -87,9 +87,9 @@ No authorization required # **orderAmendKeepPriority** > OrderAmendKeepPriorityResponse orderAmendKeepPriority(orderAmendKeepPriorityRequest) -WebSocket Order Amend Keep Priority +Order Amend Keep Priority (TRADE) -Reduce the quantity of an existing open order. This adds 0 orders to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [Order Amend Keep Priority FAQ](faqs/order_amend_keep_priority.md) to learn more. Weight: 4 +Reduce the quantity of an existing open order. This adds 0 orders to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [Order Amend Keep Priority FAQ](/products/spot/faqs/order_amend_keep_priority) to learn more. Weight(IP): 4 Unfilled Order Count: 0 Security Type: TRADE Notes: **Data Source:** Matching Engine ### Example ```java @@ -149,9 +149,9 @@ No authorization required # **orderCancel** > OrderCancelResponse orderCancel(orderCancelRequest) -WebSocket Cancel order +Cancel order (TRADE) -Cancel an active order. Weight: 1 +Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Notes: * If both `orderId` and `origClientOrderId` parameters are provided, the `orderId` is searched first, then the `origClientOrderId` from that result is checked against that order. If both conditions are not met the request will be rejected. * `newClientOrderId` will replace `clientOrderId` of the canceled order, freeing it up for new orders. * If you cancel an order that is a part of an order list, the entire order list is canceled. * The performance for canceling an order (single cancel or as part of a cancel-replace) is always better when only `orderId` is sent. Sending `origClientOrderId` or both `orderId` + `origClientOrderId` will be slower. ### Example ```java @@ -211,9 +211,9 @@ No authorization required # **orderCancelReplace** > OrderCancelReplaceResponse orderCancelReplace(orderCancelReplaceRequest) -WebSocket Cancel and replace order +Cancel and replace order (TRADE) -* Cancel an existing order and immediately place a new order instead of the canceled one. * A new order that was not attempted (i.e. when `newOrderResult: NOT_ATTEMPTED`), will still increase the unfilled order count by 1. * You can only cancel an individual order from an orderList using this method, but the result is the same as canceling the entire orderList. Weight: 1 +* Cancel an existing order and immediately place a new order instead of the canceled one. * A new order that was not attempted (i.e. when `newOrderResult: NOT_ATTEMPTED`), will still increase the unfilled order count by 1. * You can only cancel an individual order from an orderList using this method, but the result is the same as canceling the entire orderList.not attempted (i.e. when `newOrderResult: NOT_ATTEMPTED`), will still increase the unfilled order count by 1. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Similar to the [`order.place`](#order-place) request, additional mandatory parameters (*) are determined by the new order `type`. Available `cancelReplaceMode` options: * `STOP_ON_FAILURE` – if cancellation request fails, new order placement will not be attempted. * `ALLOW_FAILURE` – new order placement will be attempted even if the cancel request fails. <table> <thead> <tr> <th colspan=3 align=left>Request</th> <th colspan=3 align=left>Response</th> </tr> <tr> <th><code>cancelReplaceMode</code></th> <th><code>orderRateLimitExceededMode</code></th> <th>Unfilled Order Count</th> <th><code>cancelResult</code></th> <th><code>newOrderResult</code></th> <th><code>status</code></th> </tr> </thead> <tbody> <tr> <td rowspan=\"11\"><code>STOP_ON_FAILURE</code></td> <td rowspan=\"6\"><code>DO_NOTHING</code></td> <td rowspan=\"3\">Within Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>200</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>➖ <code>NOT_ATTEMPTED</code></td> <td align=right><code>400</code></td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>409</code></td> </tr> <tr> <td rowspan=\"3\">Exceeds Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right>N/A</td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>➖ <code>NOT_ATTEMPTED</code></td> <td align=right>N/A</td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right>N/A</td> </tr> <tr> <td rowspan=\"5\"><code>CANCEL_ONLY</code></td> <td rowspan=\"3\">Within Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>200</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>➖ <code>NOT_ATTEMPTED</code></td> <td align=right><code>400</code></td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>409</code></td> </tr> <tr> <td rowspan=\"2\">Exceeds Limits</td> <td>❌ <code>FAILURE</code></td> <td>➖ <code>NOT_ATTEMPTED</code></td> <td align=right><code>429</code></td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>429</code></td> </tr> <tr> <td rowspan=\"16\"><code>ALLOW_FAILURE</code></td> <td rowspan=\"8\"><code>DO_NOTHING</code></td> <td rowspan=\"4\">Within Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>200</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>400</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>409</code></td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>409</code></td> </tr> <tr> <td rowspan=\"4\">Exceeds Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right>N/A</td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ <code>FAILURE</code></td> <td align=right>N/A</td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right>N/A</td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right>N/A</td> </tr> <tr> <td rowspan=\"8\"><CODE>CANCEL_ONLY</CODE></td> <td rowspan=\"4\">Within Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>200</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>400</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>409</code></td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>409</code></td> </tr> <tr> <td rowspan=\"4\">Exceeds Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>200</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>400</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right>N/A</td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>409</code></td> </tr> </tbody> </table> Notes: * If both `cancelOrderId` and `cancelOrigClientOrderId` parameters are provided, the `cancelOrderId` is searched first, then the `cancelOrigClientOrderId` from that result is checked against that order. If both conditions are not met the request will be rejected. * `cancelNewClientOrderId` will replace `clientOrderId` of the canceled order, freeing it up for new orders. * `newClientOrderId` specifies `clientOrderId` value for the placed order. A new order with the same `clientOrderId` is accepted only when the previous one is filled or expired. The new order can reuse old `clientOrderId` of the canceled order. * This cancel-replace operation is **not transactional**. If one operation succeeds but the other one fails, the successful operation is still executed. For example, in `STOP_ON_FAILURE` mode, if the new order placement fails, the old order is still canceled. * Filters and order count limits are evaluated before cancellation and order placement occurs. * If new order placement is not attempted, your order count is still incremented. * Like [`order.cancel`](#order-cancel), if you cancel an individual order from an order list, the entire order list is canceled. * The performance for canceling an order (single cancel or as part of a cancel-replace) is always better when only `orderId` is sent. Sending `origClientOrderId` or both `orderId` + `origClientOrderId` will be slower. ### Example ```java @@ -273,9 +273,9 @@ No authorization required # **orderListCancel** > OrderListCancelResponse orderListCancel(orderListCancelRequest) -WebSocket Cancel Order list +Cancel Order list (TRADE) -Cancel an active order list. Weight: 1 +Cancel an active order list. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Notes: * If both `orderListId` and `listClientOrderId` parameters are provided, the `orderListId` is searched first, then the `listClientOrderId` from that result is checked against that order. If both conditions are not met the request will be rejected. * Canceling an individual order with [`order.cancel`](#order-cancel) will cancel the entire order list as well. ### Example ```java @@ -335,9 +335,9 @@ No authorization required # **orderListPlace** > OrderListPlaceResponse orderListPlace(orderListPlaceRequest) -WebSocket Place new OCO - Deprecated +Place new OCO - Deprecated (TRADE) -Send in a new one-cancels-the-other (OCO) pair: `LIMIT_MAKER` + `STOP_LOSS`/`STOP_LOSS_LIMIT` orders (called *legs*), where activation of one order immediately cancels the other. This adds 1 order to `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter Weight: 1 Unfilled Order Count: 1 +Send in a new one-cancels-the-other (OCO) pair: `LIMIT_MAKER` + `STOP_LOSS`/`STOP_LOSS_LIMIT` orders (called *legs*), where activation of one order immediately cancels the other. This adds 1 order to `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Notes: * `listClientOrderId` parameter specifies `listClientOrderId` for the OCO pair. A new OCO with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from `clientOrderId` of individual orders. * `limitClientOrderId` and `stopClientOrderId` specify `clientOrderId` values for both legs of the OCO. A new order with the same `clientOrderId` is accepted only when the previous one is filled or expired. * Price restrictions on the legs: | `side` | Price relation | | ------ | -------------- | | `BUY` | `price` < market price < `stopPrice` | | `SELL` | `price` > market price > `stopPrice` | * Both legs have the same `quantity`. However, you can set different iceberg quantity for individual legs. If `stopIcebergQty` is used, `stopLimitTimeInForce` must be `GTC`. * `trailingDelta` applies only to the `STOP_LOSS`/`STOP_LOSS_LIMIT` leg of the OCO. ### Example ```java @@ -397,9 +397,9 @@ No authorization required # **orderListPlaceOco** > OrderListPlaceOcoResponse orderListPlaceOco(orderListPlaceOcoRequest) -WebSocket Place new Order list - OCO +Place new Order list - OCO (TRADE) -Send in an one-cancels-the-other (OCO) pair, where activation of one order immediately cancels the other. * An OCO has 2 orders called the **above order** and **below order**. * One of the orders must be a `LIMIT_MAKER/TAKE_PROFIT/TAKE_PROFIT_LIMIT` order and the other must be `STOP_LOSS` or `STOP_LOSS_LIMIT` order. * Price restrictions: * If the OCO is on the `SELL` side: * `LIMIT_MAKER/TAKE_PROFIT_LIMIT` `price` > Last Traded Price > `STOP_LOSS/STOP_LOSS_LIMIT` `stopPrice` * `TAKE_PROFIT stopPrice` > Last Traded Price > `STOP_LOSS/STOP_LOSS_LIMIT stopPrice` * If the OCO is on the `BUY` side: * `LIMIT_MAKER` `price` < Last Traded Price < `STOP_LOSS/STOP_LOSS_LIMIT` `stopPrice` * `TAKE_PROFIT stopPrice` > Last Traded Price > `STOP_LOSS/STOP_LOSS_LIMIT stopPrice` * OCOs add **2 orders** to the `EXCHANGE_MAX_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight: 1 Unfilled Order Count: 2 +Send in an one-cancels-the-other (OCO) pair, where activation of one order immediately cancels the other. * An OCO has 2 orders called the **above order** and **below order**. * One of the orders must be a `LIMIT_MAKER/TAKE_PROFIT/TAKE_PROFIT_LIMIT` order and the other must be `STOP_LOSS` or `STOP_LOSS_LIMIT` order. * Price restrictions: * If the OCO is on the `SELL` side: * `LIMIT_MAKER/TAKE_PROFIT_LIMIT` `price` > Last Traded Price > `STOP_LOSS/STOP_LOSS_LIMIT` `stopPrice` * `TAKE_PROFIT stopPrice` > Last Traded Price > `STOP_LOSS/STOP_LOSS_LIMIT stopPrice` * If the OCO is on the `BUY` side: * `LIMIT_MAKER` `price` < Last Traded Price < `STOP_LOSS/STOP_LOSS_LIMIT` `stopPrice` * `TAKE_PROFIT stopPrice` > Last Traded Price > `STOP_LOSS/STOP_LOSS_LIMIT stopPrice` * OCOs add **2 orders** to the `EXCHANGE_MAX_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** Matching Engine ### Example ```java @@ -459,9 +459,9 @@ No authorization required # **orderListPlaceOpo** > OrderListPlaceOpoResponse orderListPlaceOpo(orderListPlaceOpoRequest) -WebSocket OPO +OPO (TRADE) -Place an [OPO](./faqs/opo.md). * OPOs add 2 orders to the EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS filter. Weight: 1 Unfilled Order Count: 2 +Place an [OPO](/products/spot/faqs/opo). * OPOs add 2 orders to the EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** Matching Engine ### Example ```java @@ -521,9 +521,9 @@ No authorization required # **orderListPlaceOpoco** > OrderListPlaceOpocoResponse orderListPlaceOpoco(orderListPlaceOpocoRequest) -WebSocket OPOCO +OPOCO (TRADE) -Place an [OPOCO](./faqs/opo.md). Weight: 1 Unfilled Order Count: 3 +Place an [OPOCO](/products/spot/faqs/opo). Weight(IP): 1 Unfilled Order Count: 3 Security Type: TRADE Notes: **Data Source:** Matching Engine ### Example ```java @@ -583,9 +583,9 @@ No authorization required # **orderListPlaceOto** > OrderListPlaceOtoResponse orderListPlaceOto(orderListPlaceOtoRequest) -WebSocket Place new Order list - OTO +Place new Order list - OTO (TRADE) -Places an OTO. * An OTO (One-Triggers-the-Other) is an order list comprised of 2 orders. * The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The second order is called the **pending order**. It can be any order type except for `MARKET` orders using parameter `quoteOrderQty`. The pending order is only placed on the order book when the working order gets **fully filled**. * If either the working order or the pending order is cancelled individually, the other order in the order list will also be canceled or expired. * When the order list is placed, if the working order gets **immediately fully filled**, the placement response will show the working order as `FILLED` but the pending order will still appear as `PENDING_NEW`. You need to query the status of the pending order again to see its updated status. * OTOs add **2 orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight: 1 Unfilled Order Count: 2 +Places an OTO. * An OTO (One-Triggers-the-Other) is an order list comprised of 2 orders. * The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The second order is called the **pending order**. It can be any order type except for `MARKET` orders using parameter `quoteOrderQty`. The pending order is only placed on the order book when the working order gets **fully filled**. * If either the working order or the pending order is cancelled individually, the other order in the order list will also be canceled or expired. * When the order list is placed, if the working order gets **immediately fully filled**, the placement response will show the working order as `FILLED` but the pending order will still appear as `PENDING_NEW`. You need to query the status of the pending order again to see its updated status. * OTOs add **2 orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** Matching Engine **Mandatory parameters based on `pendingType` or `workingType`** Depending on the `pendingType` or `workingType`, some optional parameters will become mandatory. |Type |Additional mandatory parameters|Additional information| |---- |---- |------ |`workingType` = `LIMIT` |`workingTimeInForce` | |`pendingType` = `LIMIT` |`pendingPrice`, `pendingTimeInForce` | |`pendingType` = `STOP_LOSS` or `TAKE_PROFIT` |`pendingStopPrice` and/or `pendingTrailingDelta`| |`pendingType` =`STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT`|`pendingPrice`, `pendingStopPrice` and/or `pendingTrailingDelta`, `pendingTimeInForce`| ### Example ```java @@ -645,9 +645,9 @@ No authorization required # **orderListPlaceOtoco** > OrderListPlaceOtocoResponse orderListPlaceOtoco(orderListPlaceOtocoRequest) -WebSocket Place new Order list - OTOCO +Place new Order list - OTOCO (TRADE) -Place an OTOCO. * An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders. * The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The behavior of the working order is the same as the [OTO](#place-new-order-list---oto-trade). * OTOCO has 2 pending orders (pending above and pending below), forming an OCO pair. The pending orders are only placed on the order book when the working order gets **fully filled**. * The rules of the pending above and pending below follow the same rules as the [Order list OCO](#new-order-list---oco-trade). * OTOCOs add **3 orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight: 1 Unfilled Order Count: 3 +Place an OTOCO. * An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders. * The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The behavior of the working order is the same as the [OTO](#order-list-place-oto). * OTOCO has 2 pending orders (pending above and pending below), forming an OCO pair. The pending orders are only placed on the order book when the working order gets **fully filled**. * The rules of the pending above and pending below follow the same rules as the [Order list OCO](#order-list-place-oco). * OTOCOs add **3 orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 3 Security Type: TRADE Notes: **Data Source:** Matching Engine **Mandatory parameters based on `pendingAboveType`, `pendingBelowType` or `workingType`** Depending on the `pendingAboveType`/`pendingBelowType` or `workingType`, some optional parameters will become mandatory. |Type |Additional mandatory parameters|Additional information| |---- |---- |------ |`workingType` = `LIMIT` |`workingTimeInForce` | |`pendingAboveType`= `LIMIT_MAKER` |`pendingAbovePrice` | |`pendingAboveType` = `STOP_LOSS/TAKE_PROFIT` |`pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`| |`pendingAboveType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT`|`pendingAbovePrice`, `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`, `pendingAboveTimeInForce`| |`pendingBelowType`= `LIMIT_MAKER` |`pendingBelowPrice` | `pendingBelowType= STOP_LOSS/TAKE_PROFIT` |`pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`| |`pendingBelowType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT`|`pendingBelowPrice`, `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`, `pendingBelowTimeInForce`| ### Example ```java @@ -707,9 +707,9 @@ No authorization required # **orderPlace** > OrderPlaceResponse orderPlace(orderPlaceRequest) -WebSocket Place new order +Place new order (TRADE) -Send in a new order. This adds 1 order to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Weight: 1 +Send in a new order. This adds 1 order to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine <a id=\"order-type\">Certain parameters (*)</a> become mandatory based on the order `type`: <table> <thead> <tr> <th>Order <code>type</code></th> <th>Mandatory parameters</th> </tr> </thead> <tbody> <tr> <td><code>LIMIT</code></td> <td> <ul> <li><code>timeInForce</code></li> <li><code>price</code></li> <li><code>quantity</code></li> </ul> </td> </tr> <tr> <td><code>LIMIT_MAKER</code></td> <td> <ul> <li><code>price</code></li> <li><code>quantity</code></li> </ul> </td> </tr> <tr> <td><code>MARKET</code></td> <td> <ul> <li><code>quantity</code> or <code>quoteOrderQty</code></li> </ul> </td> </tr> <tr> <td><code>STOP_LOSS</code></td> <td> <ul> <li><code>quantity</code></li> <li><code>stopPrice</code> or <code>trailingDelta</code></li> </ul> </td> </tr> <tr> <td><code>STOP_LOSS_LIMIT</code></td> <td> <ul> <li><code>timeInForce</code></li> <li><code>price</code></li> <li><code>quantity</code></li> <li><code>stopPrice</code> or <code>trailingDelta</code></li> </ul> </td> </tr> <tr> <td><code>TAKE_PROFIT</code></td> <td> <ul> <li><code>quantity</code></li> <li><code>stopPrice</code> or <code>trailingDelta</code></li> </ul> </td> </tr> <tr> <td><code>TAKE_PROFIT_LIMIT</code></td> <td> <ul> <li><code>timeInForce</code></li> <li><code>price</code></li> <li><code>quantity</code></li> <li><code>stopPrice</code> or <code>trailingDelta</code></li> </ul> </td> </tr> </tbody> </table> Supported order types: <table> <thead> <tr> <th>Order <code>type</code></th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>LIMIT</code></td> <td> <p> Buy or sell <code>quantity</code> at the specified <code>price</code> or better. </p> </td> </tr> <tr> <td><code>LIMIT_MAKER</code></td> <td> <p> <code>LIMIT</code> order that will be rejected if it immediately matches and trades as a taker. </p> <p> This order type is also known as a POST-ONLY order. </p> </td> </tr> <tr> <td><code>MARKET</code></td> <td> <p> Buy or sell at the best available market price. </p> <ul> <li> <p> <code>MARKET</code> order with <code>quantity</code> parameter specifies the amount of the <em>base asset</em> you want to buy or sell. Actually executed quantity of the quote asset will be determined by available market liquidity. </p> <p> E.g., a MARKET BUY order on BTCUSDT for <code>\"quantity\": \"0.1000\"</code> specifies that you want to buy 0.1 BTC at the best available price. If there is not enough BTC at the best price, keep buying at the next best price, until either your order is filled, or you run out of USDT, or market runs out of BTC. </p> </li> <li> <p> <code>MARKET</code> order with <code>quoteOrderQty</code> parameter specifies the amount of the <em>quote asset</em> you want to spend (when buying) or receive (when selling). Actually executed quantity of the base asset will be determined by available market liquidity. </p> <p> E.g., a MARKET BUY on BTCUSDT for <code>\"quoteOrderQty\": \"100.00\"</code> specifies that you want to buy as much BTC as you can for 100 USDT at the best available price. Similarly, a SELL order will sell as much available BTC as needed for you to receive 100 USDT (before commission). </p> </li> </ul> </td> </tr> <tr> <td><code>STOP_LOSS</code></td> <td> <p> Execute a <code>MARKET</code> order for given <code>quantity</code> when specified conditions are met. </p> <p> I.e., when <code>stopPrice</code> is reached, or when <code>trailingDelta</code> is activated. </p> </td> </tr> <tr> <td><code>STOP_LOSS_LIMIT</code></td> <td> <p> Place a <code>LIMIT</code> order with given parameters when specified conditions are met. </p> </td> </tr> <tr> <td><code>TAKE_PROFIT</code></td> <td> <p> Like <code>STOP_LOSS</code> but activates when market price moves in the favorable direction. </p> </td> </tr> <tr> <td><code>TAKE_PROFIT_LIMIT</code></td> <td> <p> Like <code>STOP_LOSS_LIMIT</code> but activates when market price moves in the favorable direction. </p> </td> </tr> </tbody> </table> <a id=\"pegged-orders-info\"></a> Notes on using parameters for Pegged Orders: * These parameters are allowed for `LIMIT`, `LIMIT_MAKER`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT_LIMIT` orders. * If `pegPriceType` is specified, `price` becomes optional. Otherwise, it is still mandatory. * `pegPriceType=PRIMARY_PEG` means the primary peg, that is the best price on the same side of the order book as your order. * `pegPriceType=MARKET_PEG` means the market peg, that is the best price on the opposite side of the order book from your order. * Use `pegOffsetType` and `pegOffsetValue` to request a price level other than the best one. These parameters must be specified together. <a id=\"timeInForce\"></a> Available `timeInForce` options, setting how long the order should be active before expiration: TIF | Description ----- | -------------- `GTC` | **Good 'til Canceled** – the order will remain on the book until you cancel it, or the order is completely filled. `IOC` | **Immediate or Cancel** – the order will be filled for as much as possible, the unfilled quantity immediately expires. `FOK` | **Fill or Kill** – the order will expire unless it cannot be immediately filled for the entire quantity. Notes: * `newClientOrderId` specifies `clientOrderId` value for the order. A new order with the same `clientOrderId` is accepted only when the previous one is filled or expired. * Any `LIMIT` or `LIMIT_MAKER` order can be made into an iceberg order by specifying the `icebergQty`. An order with an `icebergQty` must have `timeInForce` set to `GTC`. * Trigger order price rules for `STOP_LOSS`/`TAKE_PROFIT` orders: * `stopPrice` must be above market price: `STOP_LOSS BUY`, `TAKE_PROFIT SELL` * `stopPrice` must be below market price: `STOP_LOSS SELL`, `TAKE_PROFIT BUY` * `MARKET` orders using `quoteOrderQty` follow [`LOT_SIZE`](/products/spot/filters#lot_size) filter rules. The order will execute a quantity that has notional value as close as possible to requested `quoteOrderQty`. ### Example ```java @@ -769,9 +769,9 @@ No authorization required # **orderTest** > OrderTestResponse orderTest(orderTestRequest) -WebSocket Test new order +Test new order (TRADE) -Test order placement. Validates new order parameters and verifies your signature but does not send the order into the matching engine. Weight: |Condition| Request Weight| |------------ | ------------ | |Without `computeCommissionRates`| 1| |With `computeCommissionRates`|20| +Test order placement. Validates new order parameters and verifies your signature but does not send the order into the matching engine. Weight: | Condition | Request Weight | | --- | --- | | Without `computeCommissionRates` | 1 | | With `computeCommissionRates` | 20 | Security Type: TRADE Notes: **Data Source:** Memory ### Example ```java @@ -831,9 +831,9 @@ No authorization required # **sorOrderPlace** > SorOrderPlaceResponse sorOrderPlace(sorOrderPlaceRequest) -WebSocket Place new order using SOR +Place new order using SOR (TRADE) -Places an order using smart order routing (SOR). This adds 1 order to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [SOR FAQ](../faqs/sor_faq.md) to learn more. Weight: 1 Unfilled Order Count: 1 +Places an order using smart order routing (SOR). This adds 1 order to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [SOR FAQ](/products/spot/faqs/sor_faq) to learn more. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine **Note:** `sor.order.place` only supports `LIMIT` and `MARKET` orders. `quoteOrderQty` is not supported. ### Example ```java @@ -893,9 +893,9 @@ No authorization required # **sorOrderTest** > SorOrderTestResponse sorOrderTest(sorOrderTestRequest) -WebSocket Test new order using SOR +Test new order using SOR (TRADE) -Test new order creation and signature/recvWindow using smart order routing (SOR). Creates and validates a new order but does not send it into the matching engine. Weight: |Condition | Request Weight| |------------ | ------------ | |Without `computeCommissionRates`| 1 | |With `computeCommissionRates` |20 | +Test new order creation and signature/recvWindow using smart order routing (SOR). Creates and validates a new order but does not send it into the matching engine. Weight: | Condition | Request Weight | | --- | --- | | Without `computeCommissionRates` | 1 | | With `computeCommissionRates` | 20 | Security Type: TRADE Notes: **Data Source:** Memory ### Example ```java diff --git a/clients/spot/docs/TradeRequest.md b/clients/spot/docs/TradeRequest.md index ad4be8b4d..1e0a2d268 100644 --- a/clients/spot/docs/TradeRequest.md +++ b/clients/spot/docs/TradeRequest.md @@ -7,7 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | | +|**id** | **String** | Unique WebSocket request ID. | [optional] | +|**symbol** | **String** | Symbol to query | [optional] | diff --git a/clients/spot/docs/TradeResponse.md b/clients/spot/docs/TradeResponse.md index 6fb3e9b40..7cff4eb2b 100644 --- a/clients/spot/docs/TradeResponse.md +++ b/clients/spot/docs/TradeResponse.md @@ -7,15 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eLowerCase** | **String** | | [optional] | -|**E** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**tLowerCase** | **Long** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | -|**M** | **Boolean** | | [optional] | +|**eLowerCase** | **String** | Event type | [optional] | +|**E** | **Long** | Event time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**tLowerCase** | **Long** | Trade ID | [optional] | +|**pLowerCase** | **String** | Price | [optional] | +|**qLowerCase** | **String** | Quantity | [optional] | +|**T** | **Long** | Trade time | [optional] | +|**mLowerCase** | **Boolean** | Is the buyer the market maker? | [optional] | +|**M** | **Boolean** | Ignore | [optional] | diff --git a/clients/spot/docs/TradesAggregateRequest.md b/clients/spot/docs/TradesAggregateRequest.md index b85f5fdcd..d27f00dc2 100644 --- a/clients/spot/docs/TradesAggregateRequest.md +++ b/clients/spot/docs/TradesAggregateRequest.md @@ -7,11 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**fromId** | **Long** | | [optional] | -|**startTime** | **Long** | | [optional] | -|**endTime** | **Long** | | [optional] | -|**limit** | **Long** | | [optional] | +|**fromId** | **Long** | Aggregate trade ID to begin at | [optional] | +|**startTime** | **Long** | Timestamp in ms to get aggregate trades from INCLUSIVE. | [optional] | +|**endTime** | **Long** | Timestamp in ms to get aggregate trades until INCLUSIVE. | [optional] | +|**limit** | **Integer** | | [optional] | diff --git a/clients/spot/docs/TradesAggregateResponse.md b/clients/spot/docs/TradesAggregateResponse.md index f2b8670b0..bd09124e6 100644 --- a/clients/spot/docs/TradesAggregateResponse.md +++ b/clients/spot/docs/TradesAggregateResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<TradesAggregateResponseResultInner>**](TradesAggregateResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TradesAggregateResponseResultInner.md b/clients/spot/docs/TradesAggregateResponseResultInner.md index 735c912f1..190a1cc7b 100644 --- a/clients/spot/docs/TradesAggregateResponseResultInner.md +++ b/clients/spot/docs/TradesAggregateResponseResultInner.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**aLowerCase** | **Long** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**fLowerCase** | **Long** | | [optional] | -|**lLowerCase** | **Long** | | [optional] | -|**T** | **Long** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | -|**M** | **Boolean** | | [optional] | +|**aLowerCase** | **Long** | Aggregate tradeId | [optional] | +|**pLowerCase** | **String** | Price | [optional] | +|**qLowerCase** | **String** | Quantity | [optional] | +|**fLowerCase** | **Long** | First tradeId | [optional] | +|**lLowerCase** | **Long** | Last tradeId | [optional] | +|**T** | **Long** | Timestamp | [optional] | +|**mLowerCase** | **Boolean** | Was the buyer the maker? | [optional] | +|**M** | **Boolean** | Was the trade the best price match? | [optional] | diff --git a/clients/spot/docs/TradesHistoricalRequest.md b/clients/spot/docs/TradesHistoricalRequest.md index 613e29553..1e4c5b5f7 100644 --- a/clients/spot/docs/TradesHistoricalRequest.md +++ b/clients/spot/docs/TradesHistoricalRequest.md @@ -7,8 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**fromId** | **Integer** | | [optional] | +|**fromId** | **Long** | Trade ID to begin at | [optional] | |**limit** | **Integer** | | [optional] | diff --git a/clients/spot/docs/TradesHistoricalResponse.md b/clients/spot/docs/TradesHistoricalResponse.md index 6f7932129..0f8c83052 100644 --- a/clients/spot/docs/TradesHistoricalResponse.md +++ b/clients/spot/docs/TradesHistoricalResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<TradesHistoricalResponseResultInner>**](TradesHistoricalResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TradesRecentRequest.md b/clients/spot/docs/TradesRecentRequest.md index 52989930e..309477314 100644 --- a/clients/spot/docs/TradesRecentRequest.md +++ b/clients/spot/docs/TradesRecentRequest.md @@ -7,6 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | |**limit** | **Integer** | | [optional] | diff --git a/clients/spot/docs/TradesRecentResponse.md b/clients/spot/docs/TradesRecentResponse.md index 642baf618..b771a2c41 100644 --- a/clients/spot/docs/TradesRecentResponse.md +++ b/clients/spot/docs/TradesRecentResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<TradesRecentResponseResultInner>**](TradesRecentResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/UiKlinesRequest.md b/clients/spot/docs/UiKlinesRequest.md index 9f9080b3d..e6c6792c2 100644 --- a/clients/spot/docs/UiKlinesRequest.md +++ b/clients/spot/docs/UiKlinesRequest.md @@ -7,11 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | |**interval** | **Interval** | | | |**startTime** | **Long** | | [optional] | |**endTime** | **Long** | | [optional] | -|**timeZone** | **String** | | [optional] | +|**timeZone** | **String** | Default: 0 (UTC) | [optional] | |**limit** | **Integer** | | [optional] | diff --git a/clients/spot/docs/UiKlinesResponse.md b/clients/spot/docs/UiKlinesResponse.md index ab01c119a..12212d05d 100644 --- a/clients/spot/docs/UiKlinesResponse.md +++ b/clients/spot/docs/UiKlinesResponse.md @@ -9,8 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | -|**result** | **List<UiKlinesItem>** | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | +|**result** | **List<List<KlinesResponseResultInnerInner>>** | | [optional] | +|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/UpdateSpeed.md b/clients/spot/docs/UpdateSpeed.md new file mode 100644 index 000000000..3fb109b4f --- /dev/null +++ b/clients/spot/docs/UpdateSpeed.md @@ -0,0 +1,11 @@ + + +# UpdateSpeed + +## Enum + + +* `UPDATE_SPEED_100ms` (value: `"100ms"`) + + + diff --git a/clients/spot/docs/UserDataStreamApi.md b/clients/spot/docs/UserDataStreamApi.md index 3d1caa4d1..edc7f5eb6 100644 --- a/clients/spot/docs/UserDataStreamApi.md +++ b/clients/spot/docs/UserDataStreamApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**sessionSubscriptions**](UserDataStreamApi.md#sessionSubscriptions) | **POST** /session.subscriptions | WebSocket Listing all subscriptions | -| [**userDataStreamSubscribe**](UserDataStreamApi.md#userDataStreamSubscribe) | **POST** /userDataStream.subscribe | WebSocket Subscribe to User Data Stream | -| [**userDataStreamSubscribeSignature**](UserDataStreamApi.md#userDataStreamSubscribeSignature) | **POST** /userDataStream.subscribe.signature | WebSocket Subscribe to User Data Stream through signature subscription | +| [**sessionSubscriptions**](UserDataStreamApi.md#sessionSubscriptions) | **POST** /session.subscriptions | Listing all subscriptions | +| [**userDataStreamSubscribe**](UserDataStreamApi.md#userDataStreamSubscribe) | **POST** /userDataStream.subscribe | Subscribe to User Data Stream | +| [**userDataStreamSubscribeSignature**](UserDataStreamApi.md#userDataStreamSubscribeSignature) | **POST** /userDataStream.subscribe.signature | Subscribe to User Data Stream through signature subscription (USER_STREAM) | | [**userDataStreamUnsubscribe**](UserDataStreamApi.md#userDataStreamUnsubscribe) | **POST** /userDataStream.unsubscribe | WebSocket Unsubscribe from User Data Stream | @@ -14,9 +14,9 @@ All URIs are relative to *http://localhost* # **sessionSubscriptions** > SessionSubscriptionsResponse sessionSubscriptions() -WebSocket Listing all subscriptions +Listing all subscriptions - Weight: 2 **Data Source**: Memory +**Note:** * Users should track the corresponding subscription status of related accounts as needed. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory ### Example ```java @@ -72,9 +72,9 @@ No authorization required # **userDataStreamSubscribe** > UserDataStreamSubscribeResponse userDataStreamSubscribe() -WebSocket Subscribe to User Data Stream +Subscribe to User Data Stream -Subscribe to the User Data Stream in the current WebSocket connection. Weight: 2 +Subscribe to the User Data Stream in the current WebSocket connection. **Notes:** - This method requires an authenticated WebSocket connection using Ed25519 keys. Please refer to [`session.logon`](/catalog/core-trading-spot-trading/api/ws-api/auth#session-logon). - To check the subscription status, use [`session.status`](/catalog/core-trading-spot-trading/api/ws-api/auth#session-status), see the `userDataStream` flag indicating you have have an active subscription. - User Data Stream events are available in both JSON and [SBE](/products/spot/faqs/sbe_faq) sessions. - Please refer to [User Data Streams](/products/spot/user-data-stream) for the event format details. - For SBE, only SBE schema 2:1 or later is supported. Weight(IP): 2 Security Type: NONE ### Example ```java @@ -128,11 +128,11 @@ No authorization required # **userDataStreamSubscribeSignature** -> UserDataStreamSubscribeSignatureResponse userDataStreamSubscribeSignature(userDataStreamSubscribeSignatureRequest) +> UserDataStreamSubscribeSignatureResponse userDataStreamSubscribeSignature() -WebSocket Subscribe to User Data Stream through signature subscription +Subscribe to User Data Stream through signature subscription (USER_STREAM) - Weight: 2 +Weight(IP): 2 Security Type: USER_STREAM Notes: **Data Source:** Memory ### Example ```java @@ -149,9 +149,8 @@ public class Example { defaultClient.setBasePath("http://localhost"); UserDataStreamApi apiInstance = new UserDataStreamApi(defaultClient); - UserDataStreamSubscribeSignatureRequest userDataStreamSubscribeSignatureRequest = new UserDataStreamSubscribeSignatureRequest(); // UserDataStreamSubscribeSignatureRequest | try { - UserDataStreamSubscribeSignatureResponse result = apiInstance.userDataStreamSubscribeSignature(userDataStreamSubscribeSignatureRequest); + UserDataStreamSubscribeSignatureResponse result = apiInstance.userDataStreamSubscribeSignature(); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UserDataStreamApi#userDataStreamSubscribeSignature"); @@ -165,10 +164,7 @@ public class Example { ``` ### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **userDataStreamSubscribeSignatureRequest** | [**UserDataStreamSubscribeSignatureRequest**](UserDataStreamSubscribeSignatureRequest.md)| | [optional] | +This endpoint does not need any parameter. ### Return type @@ -180,7 +176,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -194,7 +190,7 @@ No authorization required WebSocket Unsubscribe from User Data Stream -Stop listening to the User Data Stream in the current WebSocket connection. Note that `session.logout` will only close the subscription created with `userDataStream.subscribe` but not subscriptions opened with `userDataStream.subscribe.signature`. Weight: 2 +Stop listening to the User Data Stream in the current WebSocket connection. Note that `session.logout` will only close the subscription created with `userDataStream.subscribe` but not subscriptions opened with `userDataStream.subscribe.signature`. Weight(IP): 2 ### Example ```java diff --git a/clients/spot/docs/UserDataStreamEventsResponse.md b/clients/spot/docs/UserDataStreamEventsResponse.md index f548239cd..e3d876c77 100644 --- a/clients/spot/docs/UserDataStreamEventsResponse.md +++ b/clients/spot/docs/UserDataStreamEventsResponse.md @@ -7,61 +7,61 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**E** | **Long** | | [optional] | -|**uLowerCase** | **Long** | | [optional] | -|**B** | **String** | | [optional] | -|**aLowerCase** | **String** | | [optional] | -|**dLowerCase** | **String** | | [optional] | -|**T** | **Long** | | [optional] | -|**sLowerCase** | **String** | | [optional] | -|**cLowerCase** | **String** | | [optional] | -|**S** | **String** | | [optional] | -|**oLowerCase** | **String** | | [optional] | -|**fLowerCase** | **String** | | [optional] | -|**qLowerCase** | **String** | | [optional] | -|**pLowerCase** | **String** | | [optional] | -|**P** | **String** | | [optional] | -|**F** | **String** | | [optional] | -|**gLowerCase** | **Long** | | [optional] | -|**C** | **String** | | [optional] | -|**xLowerCase** | **String** | | [optional] | -|**X** | **String** | | [optional] | -|**rLowerCase** | **String** | | [optional] | -|**iLowerCase** | **Long** | | [optional] | -|**lLowerCase** | **String** | | [optional] | -|**zLowerCase** | **String** | | [optional] | -|**L** | **String** | | [optional] | -|**nLowerCase** | **String** | | [optional] | -|**N** | **String** | | [optional] | -|**tLowerCase** | **Long** | | [optional] | -|**vLowerCase** | **Long** | | [optional] | -|**I** | **Long** | | [optional] | -|**wLowerCase** | **Boolean** | | [optional] | -|**mLowerCase** | **Boolean** | | [optional] | -|**M** | **Boolean** | | [optional] | -|**O** | [**List<ListStatusOInner>**](ListStatusOInner.md) | | [optional] | -|**Z** | **String** | | [optional] | -|**Y** | **String** | | [optional] | -|**Q** | **String** | | [optional] | -|**W** | **Long** | | [optional] | -|**V** | **String** | | [optional] | -|**D** | **Long** | | [optional] | -|**jLowerCase** | **Long** | | [optional] | -|**J** | **Long** | | [optional] | -|**A** | **String** | | [optional] | -|**U** | **Long** | | [optional] | -|**cs** | **String** | | [optional] | -|**pl** | **String** | | [optional] | -|**pL** | **String** | | [optional] | -|**pY** | **String** | | [optional] | -|**bLowerCase** | **String** | | [optional] | -|**kLowerCase** | **String** | | [optional] | -|**uS** | **Boolean** | | [optional] | -|**gP** | **String** | | [optional] | -|**gOT** | **String** | | [optional] | -|**gOV** | **Long** | | [optional] | -|**gp** | **String** | | [optional] | -|**eR** | **String** | | [optional] | +|**E** | **Long** | Event Time | [optional] | +|**aLowerCase** | **String** | Asset | [optional] | +|**dLowerCase** | **String** | Delta | [optional] | +|**T** | **Long** | Transaction Time | [optional] | +|**sLowerCase** | **String** | Symbol | [optional] | +|**cLowerCase** | **String** | Contingency Type | [optional] | +|**S** | **String** | Side | [optional] | +|**oLowerCase** | **String** | Order type | [optional] | +|**fLowerCase** | **String** | Time in force | [optional] | +|**qLowerCase** | **String** | Order quantity | [optional] | +|**pLowerCase** | **String** | Order price | [optional] | +|**P** | **String** | Stop price | [optional] | +|**F** | **String** | Iceberg quantity | [optional] | +|**gLowerCase** | **Long** | OrderListId | [optional] | +|**C** | **String** | List Client Order ID | [optional] | +|**xLowerCase** | **String** | Current execution type | [optional] | +|**X** | **String** | Current order status | [optional] | +|**rLowerCase** | **String** | List Reject Reason | [optional] | +|**iLowerCase** | **Long** | Order ID | [optional] | +|**lLowerCase** | **String** | List Status Type | [optional] | +|**zLowerCase** | **String** | Cumulative filled quantity | [optional] | +|**L** | **String** | List Order Status | [optional] | +|**nLowerCase** | **String** | Commission amount | [optional] | +|**N** | **String** | Commission asset | [optional] | +|**tLowerCase** | **Long** | Trade ID | [optional] | +|**vLowerCase** | **Long** | Prevented Match Id; This is only visible if the order expired due to STP | [optional] | +|**I** | **Long** | Execution Id | [optional] | +|**wLowerCase** | **Boolean** | Is the order on the book? | [optional] | +|**mLowerCase** | **Boolean** | Is this trade the maker side? | [optional] | +|**M** | **Boolean** | Ignore | [optional] | +|**O** | [**List<ListStatusOInner>**](ListStatusOInner.md) | An array of objects | [optional] | +|**Z** | **String** | Cumulative quote asset transacted quantity | [optional] | +|**Y** | **String** | Last quote asset transacted quantity (i.e. lastPrice * lastQty) | [optional] | +|**Q** | **String** | Quote Order Quantity | [optional] | +|**W** | **Long** | Working Time; This is only visible if the order has been placed on the book. | [optional] | +|**V** | **String** | SelfTradePreventionMode | [optional] | +|**D** | **Long** | Trailing Time | [optional] | +|**jLowerCase** | **Long** | Strategy Id | [optional] | +|**J** | **Long** | Strategy Type | [optional] | +|**A** | **String** | Prevented Quantity | [optional] | +|**B** | [**List<OutboundAccountPositionBInner>**](OutboundAccountPositionBInner.md) | Balances Array | [optional] | +|**uLowerCase** | **Long** | Time of last account update | [optional] | +|**U** | **Long** | Counter Order Id | [optional] | +|**cs** | **String** | Counter Symbol | [optional] | +|**pl** | **String** | Prevented Execution Quantity | [optional] | +|**pL** | **String** | Prevented Execution Price | [optional] | +|**pY** | **String** | Prevented Execution Quote Qty | [optional] | +|**bLowerCase** | **String** | Match Type | [optional] | +|**kLowerCase** | **String** | Working Floor | [optional] | +|**uS** | **Boolean** | UsedSor | [optional] | +|**gP** | **String** | Pegged Price Type | [optional] | +|**gOT** | **String** | Pegged Offset Type | [optional] | +|**gOV** | **Long** | Pegged Offset Value | [optional] | +|**gp** | **String** | Pegged Price | [optional] | +|**eR** | **String** | Expiry Reason. Appears when the order has expired. | [optional] | diff --git a/clients/spot/docs/UserDataStreamSubscribeResponse.md b/clients/spot/docs/UserDataStreamSubscribeResponse.md index 7f23b1dc2..f2e6f6e02 100644 --- a/clients/spot/docs/UserDataStreamSubscribeResponse.md +++ b/clients/spot/docs/UserDataStreamSubscribeResponse.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | -|**result** | [**SessionSubscriptionsResponseResultInner**](SessionSubscriptionsResponseResultInner.md) | | [optional] | +|**result** | [**UserDataStreamSubscribeResponseResult**](UserDataStreamSubscribeResponseResult.md) | | [optional] | diff --git a/clients/spot/docs/UserDataStreamSubscribeResponseResult.md b/clients/spot/docs/UserDataStreamSubscribeResponseResult.md new file mode 100644 index 000000000..f038fe472 --- /dev/null +++ b/clients/spot/docs/UserDataStreamSubscribeResponseResult.md @@ -0,0 +1,13 @@ + + +# UserDataStreamSubscribeResponseResult + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**subscriptionId** | **Long** | | [optional] | + + + diff --git a/clients/spot/docs/UserDataStreamSubscribeSignatureRequest.md b/clients/spot/docs/UserDataStreamSubscribeSignatureRequest.md deleted file mode 100644 index 6b40648ed..000000000 --- a/clients/spot/docs/UserDataStreamSubscribeSignatureRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# UserDataStreamSubscribeSignatureRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**recvWindow** | **Double** | | [optional] | - - - diff --git a/clients/spot/docs/UserDataStreamSubscribeSignatureResponse.md b/clients/spot/docs/UserDataStreamSubscribeSignatureResponse.md index 7dc41d246..e9778ce2c 100644 --- a/clients/spot/docs/UserDataStreamSubscribeSignatureResponse.md +++ b/clients/spot/docs/UserDataStreamSubscribeSignatureResponse.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | -|**result** | [**SessionSubscriptionsResponseResultInner**](SessionSubscriptionsResponseResultInner.md) | | [optional] | +|**result** | [**UserDataStreamSubscribeResponseResult**](UserDataStreamSubscribeResponseResult.md) | | [optional] | diff --git a/clients/spot/docs/UserDataStreamUnsubscribeRequest.md b/clients/spot/docs/UserDataStreamUnsubscribeRequest.md index bd80789f7..7f673b07c 100644 --- a/clients/spot/docs/UserDataStreamUnsubscribeRequest.md +++ b/clients/spot/docs/UserDataStreamUnsubscribeRequest.md @@ -7,7 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**subscriptionId** | **Integer** | | [optional] | +|**id** | **String** | Client-generated request identifier. | [optional] | +|**subscriptionId** | **Integer** | When called with no parameter, this will close all subscriptions. When called with the subscriptionId parameter, this will attempt to close the subscription with that subscription id, if it exists. | [optional] | diff --git a/clients/spot/docs/WebSocketStreamsApi.md b/clients/spot/docs/WebSocketStreamsApi.md deleted file mode 100644 index 625b60a79..000000000 --- a/clients/spot/docs/WebSocketStreamsApi.md +++ /dev/null @@ -1,886 +0,0 @@ -# WebSocketStreamsApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**aggTrade**](WebSocketStreamsApi.md#aggTrade) | **POST** /<symbol>@aggTrade | WebSocket Aggregate Trade Streams | -| [**allMarketRollingWindowTicker**](WebSocketStreamsApi.md#allMarketRollingWindowTicker) | **POST** /!ticker_<windowSize>@arr | WebSocket All Market Rolling Window Statistics Streams | -| [**allMiniTicker**](WebSocketStreamsApi.md#allMiniTicker) | **POST** /!miniTicker@arr | WebSocket All Market Mini Tickers Stream | -| [**avgPrice**](WebSocketStreamsApi.md#avgPrice) | **POST** /<symbol>@avgPrice | WebSocket Average Price | -| [**bookTicker**](WebSocketStreamsApi.md#bookTicker) | **POST** /<symbol>@bookTicker | WebSocket Individual Symbol Book Ticker Streams | -| [**diffBookDepth**](WebSocketStreamsApi.md#diffBookDepth) | **POST** /<symbol>@depth@<updateSpeed> | WebSocket Diff. Depth Stream | -| [**kline**](WebSocketStreamsApi.md#kline) | **POST** /<symbol>@kline_<interval> | WebSocket Kline/Candlestick Streams for UTC | -| [**klineOffset**](WebSocketStreamsApi.md#klineOffset) | **POST** /<symbol>@kline_<interval>@+08:00 | WebSocket Kline/Candlestick Streams with timezone offset | -| [**miniTicker**](WebSocketStreamsApi.md#miniTicker) | **POST** /<symbol>@miniTicker | WebSocket Individual Symbol Mini Ticker Stream | -| [**partialBookDepth**](WebSocketStreamsApi.md#partialBookDepth) | **POST** /<symbol>@depth<levels>@<updateSpeed> | WebSocket Partial Book Depth Streams | -| [**referencePrice**](WebSocketStreamsApi.md#referencePrice) | **POST** /<symbol>@referencePrice | WebSocket Reference Price Streams | -| [**rollingWindowTicker**](WebSocketStreamsApi.md#rollingWindowTicker) | **POST** /<symbol>@ticker_<windowSize> | WebSocket Individual Symbol Rolling Window Statistics Streams | -| [**ticker**](WebSocketStreamsApi.md#ticker) | **POST** /<symbol>@ticker | WebSocket Individual Symbol Ticker Streams | -| [**trade**](WebSocketStreamsApi.md#trade) | **POST** /<symbol>@trade | WebSocket Trade Streams | - - - -# **aggTrade** -> AggTradeResponse aggTrade(aggTradeRequest) - -WebSocket Aggregate Trade Streams - -The Aggregate Trade Streams push trade information that is aggregated for a single taker order. - -### Example -```java -// Import classes: -import com.binance.connector.client.spot.ApiClient; -import com.binance.connector.client.spot.ApiException; -import com.binance.connector.client.spot.Configuration; -import com.binance.connector.client.spot.models.*; -import com.binance.connector.client.spot.websocket.stream.api.WebSocketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebSocketStreamsApi apiInstance = new WebSocketStreamsApi(defaultClient); - AggTradeRequest aggTradeRequest = new AggTradeRequest(); // AggTradeRequest | - try { - AggTradeResponse result = apiInstance.aggTrade(aggTradeRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebSocketStreamsApi#aggTrade"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **aggTradeRequest** | [**AggTradeRequest**](AggTradeRequest.md)| | | - -### Return type - -[**AggTradeResponse**](AggTradeResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Aggregate Trade Streams | - | - - -# **allMarketRollingWindowTicker** -> AllMarketRollingWindowTickerResponse allMarketRollingWindowTicker(allMarketRollingWindowTickerRequest) - -WebSocket All Market Rolling Window Statistics Streams - -Rolling window ticker statistics for all market symbols, computed over multiple windows. Note that only tickers that have changed will be present in the array. - -### Example -```java -// Import classes: -import com.binance.connector.client.spot.ApiClient; -import com.binance.connector.client.spot.ApiException; -import com.binance.connector.client.spot.Configuration; -import com.binance.connector.client.spot.models.*; -import com.binance.connector.client.spot.websocket.stream.api.WebSocketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebSocketStreamsApi apiInstance = new WebSocketStreamsApi(defaultClient); - AllMarketRollingWindowTickerRequest allMarketRollingWindowTickerRequest = new AllMarketRollingWindowTickerRequest(); // AllMarketRollingWindowTickerRequest | - try { - AllMarketRollingWindowTickerResponse result = apiInstance.allMarketRollingWindowTicker(allMarketRollingWindowTickerRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebSocketStreamsApi#allMarketRollingWindowTicker"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **allMarketRollingWindowTickerRequest** | [**AllMarketRollingWindowTickerRequest**](AllMarketRollingWindowTickerRequest.md)| | | - -### Return type - -[**AllMarketRollingWindowTickerResponse**](AllMarketRollingWindowTickerResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | All Market Rolling Window Statistics Streams | - | - - -# **allMiniTicker** -> AllMiniTickerResponse allMiniTicker() - -WebSocket All Market Mini Tickers Stream - -24hr rolling window mini-ticker statistics for all symbols that changed in an array. These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs. Note that only tickers that have changed will be present in the array. - -### Example -```java -// Import classes: -import com.binance.connector.client.spot.ApiClient; -import com.binance.connector.client.spot.ApiException; -import com.binance.connector.client.spot.Configuration; -import com.binance.connector.client.spot.models.*; -import com.binance.connector.client.spot.websocket.stream.api.WebSocketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebSocketStreamsApi apiInstance = new WebSocketStreamsApi(defaultClient); - try { - AllMiniTickerResponse result = apiInstance.allMiniTicker(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebSocketStreamsApi#allMiniTicker"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**AllMiniTickerResponse**](AllMiniTickerResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | All Market Mini Tickers Stream | - | - - -# **avgPrice** -> AvgPriceResponse avgPrice(avgPriceRequest) - -WebSocket Average Price - -Average price streams push changes in the average price over a fixed time interval. - -### Example -```java -// Import classes: -import com.binance.connector.client.spot.ApiClient; -import com.binance.connector.client.spot.ApiException; -import com.binance.connector.client.spot.Configuration; -import com.binance.connector.client.spot.models.*; -import com.binance.connector.client.spot.websocket.stream.api.WebSocketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebSocketStreamsApi apiInstance = new WebSocketStreamsApi(defaultClient); - AvgPriceRequest avgPriceRequest = new AvgPriceRequest(); // AvgPriceRequest | - try { - AvgPriceResponse result = apiInstance.avgPrice(avgPriceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebSocketStreamsApi#avgPrice"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **avgPriceRequest** | [**AvgPriceRequest**](AvgPriceRequest.md)| | | - -### Return type - -[**AvgPriceResponse**](AvgPriceResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Average Price | - | - - -# **bookTicker** -> BookTickerResponse bookTicker(bookTickerRequest) - -WebSocket Individual Symbol Book Ticker Streams - -Pushes any update to the best bid or ask's price or quantity in real-time for a specified symbol. Multiple `<symbol>@bookTicker` streams can be subscribed to over one connection. - -### Example -```java -// Import classes: -import com.binance.connector.client.spot.ApiClient; -import com.binance.connector.client.spot.ApiException; -import com.binance.connector.client.spot.Configuration; -import com.binance.connector.client.spot.models.*; -import com.binance.connector.client.spot.websocket.stream.api.WebSocketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebSocketStreamsApi apiInstance = new WebSocketStreamsApi(defaultClient); - BookTickerRequest bookTickerRequest = new BookTickerRequest(); // BookTickerRequest | - try { - BookTickerResponse result = apiInstance.bookTicker(bookTickerRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebSocketStreamsApi#bookTicker"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **bookTickerRequest** | [**BookTickerRequest**](BookTickerRequest.md)| | | - -### Return type - -[**BookTickerResponse**](BookTickerResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Individual Symbol Book Ticker Streams | - | - - -# **diffBookDepth** -> DiffBookDepthResponse diffBookDepth(diffBookDepthRequest) - -WebSocket Diff. Depth Stream - -Order book price and quantity depth updates used to locally manage an order book. - -### Example -```java -// Import classes: -import com.binance.connector.client.spot.ApiClient; -import com.binance.connector.client.spot.ApiException; -import com.binance.connector.client.spot.Configuration; -import com.binance.connector.client.spot.models.*; -import com.binance.connector.client.spot.websocket.stream.api.WebSocketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebSocketStreamsApi apiInstance = new WebSocketStreamsApi(defaultClient); - DiffBookDepthRequest diffBookDepthRequest = new DiffBookDepthRequest(); // DiffBookDepthRequest | - try { - DiffBookDepthResponse result = apiInstance.diffBookDepth(diffBookDepthRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebSocketStreamsApi#diffBookDepth"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **diffBookDepthRequest** | [**DiffBookDepthRequest**](DiffBookDepthRequest.md)| | | - -### Return type - -[**DiffBookDepthResponse**](DiffBookDepthResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Diff. Depth Stream | - | - - -# **kline** -> KlineResponse kline(klineRequest) - -WebSocket Kline/Candlestick Streams for UTC - -The Kline/Candlestick Stream push updates to the current klines/candlestick every second in `UTC+0` timezone <a id=\"kline-intervals\"></a> - -### Example -```java -// Import classes: -import com.binance.connector.client.spot.ApiClient; -import com.binance.connector.client.spot.ApiException; -import com.binance.connector.client.spot.Configuration; -import com.binance.connector.client.spot.models.*; -import com.binance.connector.client.spot.websocket.stream.api.WebSocketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebSocketStreamsApi apiInstance = new WebSocketStreamsApi(defaultClient); - KlineRequest klineRequest = new KlineRequest(); // KlineRequest | - try { - KlineResponse result = apiInstance.kline(klineRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebSocketStreamsApi#kline"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **klineRequest** | [**KlineRequest**](KlineRequest.md)| | | - -### Return type - -[**KlineResponse**](KlineResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Kline/Candlestick Streams for UTC | - | - - -# **klineOffset** -> KlineOffsetResponse klineOffset(klineOffsetRequest) - -WebSocket Kline/Candlestick Streams with timezone offset - -The Kline/Candlestick Stream push updates to the current klines/candlestick every second in `UTC+8` timezone - -### Example -```java -// Import classes: -import com.binance.connector.client.spot.ApiClient; -import com.binance.connector.client.spot.ApiException; -import com.binance.connector.client.spot.Configuration; -import com.binance.connector.client.spot.models.*; -import com.binance.connector.client.spot.websocket.stream.api.WebSocketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebSocketStreamsApi apiInstance = new WebSocketStreamsApi(defaultClient); - KlineOffsetRequest klineOffsetRequest = new KlineOffsetRequest(); // KlineOffsetRequest | - try { - KlineOffsetResponse result = apiInstance.klineOffset(klineOffsetRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebSocketStreamsApi#klineOffset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **klineOffsetRequest** | [**KlineOffsetRequest**](KlineOffsetRequest.md)| | | - -### Return type - -[**KlineOffsetResponse**](KlineOffsetResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Kline/Candlestick Streams with timezone offset | - | - - -# **miniTicker** -> MiniTickerResponse miniTicker(miniTickerRequest) - -WebSocket Individual Symbol Mini Ticker Stream - -24hr rolling window mini-ticker statistics. These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs. - -### Example -```java -// Import classes: -import com.binance.connector.client.spot.ApiClient; -import com.binance.connector.client.spot.ApiException; -import com.binance.connector.client.spot.Configuration; -import com.binance.connector.client.spot.models.*; -import com.binance.connector.client.spot.websocket.stream.api.WebSocketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebSocketStreamsApi apiInstance = new WebSocketStreamsApi(defaultClient); - MiniTickerRequest miniTickerRequest = new MiniTickerRequest(); // MiniTickerRequest | - try { - MiniTickerResponse result = apiInstance.miniTicker(miniTickerRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebSocketStreamsApi#miniTicker"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **miniTickerRequest** | [**MiniTickerRequest**](MiniTickerRequest.md)| | | - -### Return type - -[**MiniTickerResponse**](MiniTickerResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Individual Symbol Mini Ticker Stream | - | - - -# **partialBookDepth** -> PartialBookDepthResponse partialBookDepth(partialBookDepthRequest) - -WebSocket Partial Book Depth Streams - -Top **\\<levels\\>** bids and asks, pushed every second. Valid **\\<levels\\>** are 5, 10, or 20. - -### Example -```java -// Import classes: -import com.binance.connector.client.spot.ApiClient; -import com.binance.connector.client.spot.ApiException; -import com.binance.connector.client.spot.Configuration; -import com.binance.connector.client.spot.models.*; -import com.binance.connector.client.spot.websocket.stream.api.WebSocketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebSocketStreamsApi apiInstance = new WebSocketStreamsApi(defaultClient); - PartialBookDepthRequest partialBookDepthRequest = new PartialBookDepthRequest(); // PartialBookDepthRequest | - try { - PartialBookDepthResponse result = apiInstance.partialBookDepth(partialBookDepthRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebSocketStreamsApi#partialBookDepth"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **partialBookDepthRequest** | [**PartialBookDepthRequest**](PartialBookDepthRequest.md)| | | - -### Return type - -[**PartialBookDepthResponse**](PartialBookDepthResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Partial Book Depth Streams | - | - - -# **referencePrice** -> ReferencePriceResponse referencePrice(referencePriceRequest) - -WebSocket Reference Price Streams - - - -### Example -```java -// Import classes: -import com.binance.connector.client.spot.ApiClient; -import com.binance.connector.client.spot.ApiException; -import com.binance.connector.client.spot.Configuration; -import com.binance.connector.client.spot.models.*; -import com.binance.connector.client.spot.websocket.stream.api.WebSocketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebSocketStreamsApi apiInstance = new WebSocketStreamsApi(defaultClient); - ReferencePriceRequest referencePriceRequest = new ReferencePriceRequest(); // ReferencePriceRequest | - try { - ReferencePriceResponse result = apiInstance.referencePrice(referencePriceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebSocketStreamsApi#referencePrice"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **referencePriceRequest** | [**ReferencePriceRequest**](ReferencePriceRequest.md)| | | - -### Return type - -[**ReferencePriceResponse**](ReferencePriceResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Reference Price Streams | - | - - -# **rollingWindowTicker** -> RollingWindowTickerResponse rollingWindowTicker(rollingWindowTickerRequest) - -WebSocket Individual Symbol Rolling Window Statistics Streams - -Rolling window ticker statistics for a single symbol, computed over multiple windows. - -### Example -```java -// Import classes: -import com.binance.connector.client.spot.ApiClient; -import com.binance.connector.client.spot.ApiException; -import com.binance.connector.client.spot.Configuration; -import com.binance.connector.client.spot.models.*; -import com.binance.connector.client.spot.websocket.stream.api.WebSocketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebSocketStreamsApi apiInstance = new WebSocketStreamsApi(defaultClient); - RollingWindowTickerRequest rollingWindowTickerRequest = new RollingWindowTickerRequest(); // RollingWindowTickerRequest | - try { - RollingWindowTickerResponse result = apiInstance.rollingWindowTicker(rollingWindowTickerRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebSocketStreamsApi#rollingWindowTicker"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **rollingWindowTickerRequest** | [**RollingWindowTickerRequest**](RollingWindowTickerRequest.md)| | | - -### Return type - -[**RollingWindowTickerResponse**](RollingWindowTickerResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Individual Symbol Rolling Window Statistics Streams | - | - - -# **ticker** -> TickerResponse ticker(tickerRequest) - -WebSocket Individual Symbol Ticker Streams - -24hr rolling window ticker statistics for a single symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs. - -### Example -```java -// Import classes: -import com.binance.connector.client.spot.ApiClient; -import com.binance.connector.client.spot.ApiException; -import com.binance.connector.client.spot.Configuration; -import com.binance.connector.client.spot.models.*; -import com.binance.connector.client.spot.websocket.stream.api.WebSocketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebSocketStreamsApi apiInstance = new WebSocketStreamsApi(defaultClient); - TickerRequest tickerRequest = new TickerRequest(); // TickerRequest | - try { - TickerResponse result = apiInstance.ticker(tickerRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebSocketStreamsApi#ticker"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **tickerRequest** | [**TickerRequest**](TickerRequest.md)| | | - -### Return type - -[**TickerResponse**](TickerResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Individual Symbol Ticker Streams | - | - - -# **trade** -> TradeResponse trade(tradeRequest) - -WebSocket Trade Streams - -The Trade Streams push raw trade information; each trade has a unique buyer and seller. - -### Example -```java -// Import classes: -import com.binance.connector.client.spot.ApiClient; -import com.binance.connector.client.spot.ApiException; -import com.binance.connector.client.spot.Configuration; -import com.binance.connector.client.spot.models.*; -import com.binance.connector.client.spot.websocket.stream.api.WebSocketStreamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - WebSocketStreamsApi apiInstance = new WebSocketStreamsApi(defaultClient); - TradeRequest tradeRequest = new TradeRequest(); // TradeRequest | - try { - TradeResponse result = apiInstance.trade(tradeRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebSocketStreamsApi#trade"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **tradeRequest** | [**TradeRequest**](TradeRequest.md)| | | - -### Return type - -[**TradeResponse**](TradeResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Trade Streams | - | - diff --git a/clients/spot/docs/rest-api/migration-guide.md b/clients/spot/docs/rest-api/migration-guide.md index a5eb2df6a..ffb2d3dd1 100644 --- a/clients/spot/docs/rest-api/migration-guide.md +++ b/clients/spot/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-spot - 10.1.1 + 11.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-spot - 10.1.1 + 11.0.0 ``` diff --git a/clients/spot/example_rest.md b/clients/spot/example_rest.md index c2f329c18..0a59a8960 100644 --- a/clients/spot/example_rest.md +++ b/clients/spot/example_rest.md @@ -1,102 +1,104 @@ ## Account -[GET /api/v3/account/commission](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#query-commission-rates-user_data) - accountCommission - [AccountCommissionExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AccountCommissionExample.java#L46) +[GET /api/v3/account/commission](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#account-commission) - accountCommission - [AccountCommissionExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AccountCommissionExample.java#L36) -[GET /api/v3/allOrderList](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#query-all-order-lists-user_data) - allOrderList - [AllOrderListExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrderListExample.java#L48) +[GET /api/v3/allOrderList](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#all-order-list) - allOrderList - [AllOrderListExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrderListExample.java#L37) -[GET /api/v3/allOrders](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#all-orders-user_data) - allOrders - [AllOrdersExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrdersExample.java#L46) +[GET /api/v3/allOrders](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#all-orders) - allOrders - [AllOrdersExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrdersExample.java#L41) -[GET /api/v3/account](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#account-information-user_data) - getAccount - [GetAccountExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetAccountExample.java#L46) +[GET /api/v3/account](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-account) - getAccount - [GetAccountExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetAccountExample.java#L36) -[GET /api/v3/openOrders](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#current-open-orders-user_data) - getOpenOrders - [GetOpenOrdersExample.java:47](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOpenOrdersExample.java#L47) +[GET /api/v3/openOrders](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-open-orders) - getOpenOrders - [GetOpenOrdersExample.java:38](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOpenOrdersExample.java#L38) -[GET /api/v3/order](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#query-order-user_data) - getOrder - [GetOrderExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderExample.java#L46) +[GET /api/v3/order](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-order) - getOrder - [GetOrderExample.java:42](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderExample.java#L42) -[GET /api/v3/orderList](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#query-order-list-user_data) - getOrderList - [GetOrderListExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderListExample.java#L46) +[GET /api/v3/orderList](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-order-list) - getOrderList - [GetOrderListExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderListExample.java#L36) -[GET /api/v3/myAllocations](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#query-allocations-user_data) - myAllocations - [MyAllocationsExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyAllocationsExample.java#L46) +[GET /api/v3/myAllocations](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#my-allocations) - myAllocations - [MyAllocationsExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyAllocationsExample.java#L46) -[GET /api/v3/myFilters](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#query-relevant-filters-user_data) - myFilters - [MyFiltersExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyFiltersExample.java#L48) +[GET /api/v3/myFilters](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#my-filters) - myFilters - [MyFiltersExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyFiltersExample.java#L37) -[GET /api/v3/myPreventedMatches](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#query-prevented-matches-user_data) - myPreventedMatches - [MyPreventedMatchesExample.java:52](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyPreventedMatchesExample.java#L52) +[GET /api/v3/myPreventedMatches](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#my-prevented-matches) - myPreventedMatches - [MyPreventedMatchesExample.java:42](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyPreventedMatchesExample.java#L42) -[GET /api/v3/myTrades](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#account-trade-list-user_data) - myTrades - [MyTradesExample.java:47](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyTradesExample.java#L47) +[GET /api/v3/myTrades](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#my-trades) - myTrades - [MyTradesExample.java:44](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyTradesExample.java#L44) -[GET /api/v3/openOrderList](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#query-open-order-lists-user_data) - openOrderList - [OpenOrderListExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/OpenOrderListExample.java#L46) +[GET /api/v3/openOrderList](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#open-order-list) - openOrderList - [OpenOrderListExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/OpenOrderListExample.java#L36) -[GET /api/v3/order/amendments](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#query-order-amendments-user_data) - orderAmendments - [OrderAmendmentsExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/OrderAmendmentsExample.java#L46) +[GET /api/v3/order/amendments](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#order-amendments) - orderAmendments - [OrderAmendmentsExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/OrderAmendmentsExample.java#L36) -[GET /api/v3/rateLimit/order](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#query-unfilled-order-count-user_data) - rateLimitOrder - [RateLimitOrderExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/RateLimitOrderExample.java#L46) +[GET /api/v3/rateLimit/order](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#rate-limit-order) - rateLimitOrder - [RateLimitOrderExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/RateLimitOrderExample.java#L36) ## General -[GET /api/v3/exchangeInfo](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-endpoints#exchange-information) - exchangeInfo - [ExchangeInfoExample.java:49](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/ExchangeInfoExample.java#L49) +[GET /api/v3/exchangeInfo](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#exchange-info) - exchangeInfo - [ExchangeInfoExample.java:57](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/ExchangeInfoExample.java#L57) -[GET /api/v3/executionRules](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-endpoints#query-execution-rules) - executionRules - [ExecutionRulesExample.java:49](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/ExecutionRulesExample.java#L49) +[GET /api/v3/executionRules](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#execution-rules) - executionRules - [ExecutionRulesExample.java:40](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/ExecutionRulesExample.java#L40) -[GET /api/v3/ping](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-endpoints#test-connectivity) - ping - [PingExample.java:44](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/PingExample.java#L44) +[GET /api/v3/ping](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#ping) - ping - [PingExample.java:33](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/PingExample.java#L33) -[GET /api/v3/time](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-endpoints#check-server-time) - time - [TimeExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/TimeExample.java#L46) +[GET /api/v3/time](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#time) - time - [TimeExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/TimeExample.java#L36) ## Market -[GET /api/v3/aggTrades](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#compressedaggregate-trades-list) - aggTrades - [AggTradesExample.java:47](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/AggTradesExample.java#L47) +[GET /api/v3/aggTrades](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#agg-trades) - aggTrades - [AggTradesExample.java:38](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/AggTradesExample.java#L38) -[GET /api/v3/avgPrice](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#current-average-price) - avgPrice - [AvgPriceExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/AvgPriceExample.java#L46) +[GET /api/v3/avgPrice](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#avg-price) - avgPrice - [AvgPriceExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/AvgPriceExample.java#L36) -[GET /api/v3/depth](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#order-book) - depth - [DepthExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/DepthExample.java#L48) +[GET /api/v3/depth](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#depth) - depth - [DepthExample.java:38](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/DepthExample.java#L38) -[GET /api/v3/trades](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#recent-trades-list) - getTrades - [GetTradesExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/GetTradesExample.java#L46) +[GET /api/v3/trades](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#get-trades) - getTrades - [GetTradesExample.java:35](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/GetTradesExample.java#L35) -[GET /api/v3/historicalTrades](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#old-trade-lookup) - historicalTrades - [HistoricalTradesExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/HistoricalTradesExample.java#L46) +[GET /api/v3/historicalBlockTrades](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#historical-block-trades) - historicalBlockTrades - [HistoricalBlockTradesExample.java:35](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/HistoricalBlockTradesExample.java#L35) -[GET /api/v3/klines](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#klinecandlestick-data) - klines - [KlinesExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/KlinesExample.java#L48) +[GET /api/v3/historicalTrades](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#historical-trades) - historicalTrades - [HistoricalTradesExample.java:35](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/HistoricalTradesExample.java#L35) -[GET /api/v3/referencePrice](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#query-reference-price) - referencePrice - [ReferencePriceExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceExample.java#L46) +[GET /api/v3/klines](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#klines) - klines - [KlinesExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/KlinesExample.java#L48) -[GET /api/v3/referencePrice/calculation](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#query-reference-price-calculation) - referencePriceCalculation - [ReferencePriceCalculationExample.java:47](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceCalculationExample.java#L47) +[GET /api/v3/referencePrice](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#reference-price) - referencePrice - [ReferencePriceExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceExample.java#L36) -[GET /api/v3/ticker](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#rolling-window-price-change-statistics) - ticker - [TickerExample.java:52](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerExample.java#L52) +[GET /api/v3/referencePrice/calculation](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#reference-price-calculation) - referencePriceCalculation - [ReferencePriceCalculationExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceCalculationExample.java#L37) -[GET /api/v3/ticker/24hr](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#24hr-ticker-price-change-statistics) - ticker24hr - [Ticker24hrExample.java:59](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/Ticker24hrExample.java#L59) +[GET /api/v3/ticker](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker) - ticker - [TickerExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerExample.java#L48) -[GET /api/v3/ticker/bookTicker](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#symbol-order-book-ticker) - tickerBookTicker - [TickerBookTickerExample.java:54](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerBookTickerExample.java#L54) +[GET /api/v3/ticker/24hr](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker24hr) - ticker24hr - [Ticker24hrExample.java:49](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/Ticker24hrExample.java#L49) -[GET /api/v3/ticker/price](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#symbol-price-ticker) - tickerPrice - [TickerPriceExample.java:54](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerPriceExample.java#L54) +[GET /api/v3/ticker/bookTicker](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker-book-ticker) - tickerBookTicker - [TickerBookTickerExample.java:39](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerBookTickerExample.java#L39) -[GET /api/v3/ticker/tradingDay](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#trading-day-ticker) - tickerTradingDay - [TickerTradingDayExample.java:51](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerTradingDayExample.java#L51) +[GET /api/v3/ticker/price](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker-price) - tickerPrice - [TickerPriceExample.java:39](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerPriceExample.java#L39) -[GET /api/v3/uiKlines](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#uiklines) - uiKlines - [UiKlinesExample.java:49](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/UiKlinesExample.java#L49) +[GET /api/v3/ticker/tradingDay](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker-trading-day) - tickerTradingDay - [TickerTradingDayExample.java:42](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerTradingDayExample.java#L42) + +[GET /api/v3/uiKlines](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ui-klines) - uiKlines - [UiKlinesExample.java:45](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/UiKlinesExample.java#L45) ## Trade -[DELETE /api/v3/openOrders](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#cancel-all-open-orders-on-a-symbol-trade) - deleteOpenOrders - [DeleteOpenOrdersExample.java:47](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOpenOrdersExample.java#L47) +[DELETE /api/v3/openOrders](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#delete-open-orders) - deleteOpenOrders - [DeleteOpenOrdersExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOpenOrdersExample.java#L36) -[DELETE /api/v3/order](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#cancel-order-trade) - deleteOrder - [DeleteOrderExample.java:47](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderExample.java#L47) +[DELETE /api/v3/order](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#delete-order) - deleteOrder - [DeleteOrderExample.java:44](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderExample.java#L44) -[DELETE /api/v3/orderList](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#cancel-order-list-trade) - deleteOrderList - [DeleteOrderListExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderListExample.java#L46) +[DELETE /api/v3/orderList](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#delete-order-list) - deleteOrderList - [DeleteOrderListExample.java:39](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderListExample.java#L39) -[POST /api/v3/order](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-trade) - newOrder - [NewOrderExample.java:50](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/NewOrderExample.java#L50) +[POST /api/v3/order](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#new-order) - newOrder - [NewOrderExample.java:85](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/NewOrderExample.java#L85) -[PUT /api/v3/order/amend/keepPriority](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#order-amend-keep-priority-trade) - orderAmendKeepPriority - [OrderAmendKeepPriorityExample.java:49](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderAmendKeepPriorityExample.java#L49) +[PUT /api/v3/order/amend/keepPriority](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-amend-keep-priority) - orderAmendKeepPriority - [OrderAmendKeepPriorityExample.java:39](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderAmendKeepPriorityExample.java#L39) -[POST /api/v3/order/cancelReplace](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#cancel-an-existing-order-and-send-a-new-order-trade) - orderCancelReplace - [OrderCancelReplaceExample.java:55](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderCancelReplaceExample.java#L55) +[POST /api/v3/order/cancelReplace](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-cancel-replace) - orderCancelReplace - [OrderCancelReplaceExample.java:148](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderCancelReplaceExample.java#L148) -[POST /api/v3/orderList/oco](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-list---oco-trade) - orderListOco - [OrderListOcoExample.java:62](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOcoExample.java#L62) +[POST /api/v3/orderList/oco](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-oco) - orderListOco - [OrderListOcoExample.java:53](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOcoExample.java#L53) -[POST /api/v3/orderList/opo](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-list---opo-trade) - orderListOpo - [OrderListOpoExample.java:52](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpoExample.java#L52) +[POST /api/v3/orderList/opo](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-opo) - orderListOpo - [OrderListOpoExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpoExample.java#L43) -[POST /api/v3/orderList/opoco](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-list---opoco-trade) - orderListOpoco - [OrderListOpocoExample.java:51](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpocoExample.java#L51) +[POST /api/v3/orderList/opoco](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-opoco) - orderListOpoco - [OrderListOpocoExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpocoExample.java#L41) -[POST /api/v3/orderList/oto](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-list---oto-trade) - orderListOto - [OrderListOtoExample.java:63](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtoExample.java#L63) +[POST /api/v3/orderList/oto](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-oto) - orderListOto - [OrderListOtoExample.java:63](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtoExample.java#L63) -[POST /api/v3/orderList/otoco](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-list---otoco-trade) - orderListOtoco - [OrderListOtocoExample.java:60](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtocoExample.java#L60) +[POST /api/v3/orderList/otoco](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-otoco) - orderListOtoco - [OrderListOtocoExample.java:66](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtocoExample.java#L66) -[POST /api/v3/order/oco](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-oco---deprecated-trade) - orderOco - [OrderOcoExample.java:53](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderOcoExample.java#L53) +[POST /api/v3/order/oco](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-oco) - orderOco - [OrderOcoExample.java:42](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderOcoExample.java#L42) -[POST /api/v3/order/test](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#test-new-order-trade) - orderTest - [OrderTestExample.java:52](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderTestExample.java#L52) +[POST /api/v3/order/test](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-test) - orderTest - [OrderTestExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderTestExample.java#L41) -[POST /api/v3/sor/order](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-using-sor-trade) - sorOrder - [SorOrderExample.java:51](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderExample.java#L51) +[POST /api/v3/sor/order](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#sor-order) - sorOrder - [SorOrderExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderExample.java#L43) -[POST /api/v3/sor/order/test](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#test-new-order-using-sor-trade) - sorOrderTest - [SorOrderTestExample.java:52](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderTestExample.java#L52) +[POST /api/v3/sor/order/test](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#sor-order-test) - sorOrderTest - [SorOrderTestExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderTestExample.java#L41) diff --git a/clients/spot/example_websocket_api.md b/clients/spot/example_websocket_api.md index c6cccd646..c410a0108 100644 --- a/clients/spot/example_websocket_api.md +++ b/clients/spot/example_websocket_api.md @@ -1,120 +1,122 @@ ## Account -[account.commission](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#account-commission-rates-user_data) - accountCommission - [AccountCommissionExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountCommissionExample.java#L48) +[account.commission](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#account-commission) - accountCommission - [AccountCommissionExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountCommissionExample.java#L37) -[account.rateLimits.orders](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#unfilled-order-count-user_data) - accountRateLimitsOrders - [AccountRateLimitsOrdersExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountRateLimitsOrdersExample.java#L48) +[account.rateLimits.orders](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#account-rate-limits-orders) - accountRateLimitsOrders - [AccountRateLimitsOrdersExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountRateLimitsOrdersExample.java#L37) -[account.status](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#account-information-user_data) - accountStatus - [AccountStatusExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountStatusExample.java#L48) +[account.status](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#account-status) - accountStatus - [AccountStatusExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountStatusExample.java#L37) -[allOrderLists](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#account-order-list-history-user_data) - allOrderLists - [AllOrderListsExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AllOrderListsExample.java#L48) +[allOrderLists](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#all-order-lists) - allOrderLists - [AllOrderListsExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AllOrderListsExample.java#L43) -[allOrders](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#account-order-history-user_data) - allOrders - [AllOrdersExample.java:49](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AllOrdersExample.java#L49) +[allOrders](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#all-orders) - allOrders - [AllOrdersExample.java:44](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AllOrdersExample.java#L44) -[myAllocations](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#account-allocations-user_data) - myAllocations - [MyAllocationsExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyAllocationsExample.java#L48) +[myAllocations](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#my-allocations) - myAllocations - [MyAllocationsExample.java:47](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyAllocationsExample.java#L47) -[myFilters](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#query-relevant-filters-user_data) - myFilters - [MyFiltersExample.java:50](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyFiltersExample.java#L50) +[myFilters](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#my-filters) - myFilters - [MyFiltersExample.java:39](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyFiltersExample.java#L39) -[myPreventedMatches](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#account-prevented-matches-user_data) - myPreventedMatches - [MyPreventedMatchesExample.java:54](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyPreventedMatchesExample.java#L54) +[myPreventedMatches](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#my-prevented-matches) - myPreventedMatches - [MyPreventedMatchesExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyPreventedMatchesExample.java#L43) -[myTrades](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#account-trade-history-user_data) - myTrades - [MyTradesExample.java:49](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyTradesExample.java#L49) +[myTrades](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#my-trades) - myTrades - [MyTradesExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyTradesExample.java#L46) -[openOrderLists.status](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#current-open-order-lists-user_data) - openOrderListsStatus - [OpenOrderListsStatusExample.java:50](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrderListsStatusExample.java#L50) +[openOrderLists.status](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#open-order-lists-status) - openOrderListsStatus - [OpenOrderListsStatusExample.java:40](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrderListsStatusExample.java#L40) -[openOrders.status](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#current-open-orders-user_data) - openOrdersStatus - [OpenOrdersStatusExample.java:52](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrdersStatusExample.java#L52) +[openOrders.status](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#open-orders-status) - openOrdersStatus - [OpenOrdersStatusExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrdersStatusExample.java#L41) -[order.amendments](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#query-order-amendments-user_data) - orderAmendments - [OrderAmendmentsExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderAmendmentsExample.java#L48) +[order.amendments](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#order-amendments) - orderAmendments - [OrderAmendmentsExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderAmendmentsExample.java#L37) -[orderList.status](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#query-order-list-user_data) - orderListStatus - [OrderListStatusExample.java:49](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderListStatusExample.java#L49) +[orderList.status](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#order-list-status) - orderListStatus - [OrderListStatusExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderListStatusExample.java#L41) -[order.status](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#query-order-user_data) - orderStatus - [OrderStatusExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderStatusExample.java#L48) +[order.status](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#order-status) - orderStatus - [OrderStatusExample.java:42](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderStatusExample.java#L42) ## Auth -[session.logon](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/authentication-requests#log-in-with-api-key-signed) - sessionLogon - [SessionLogonExample.java:52](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionLogonExample.java#L52) +[session.logon](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/auth#session-logon) - sessionLogon - [SessionLogonExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionLogonExample.java#L41) -[session.logout](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/authentication-requests#log-out-of-the-session) - sessionLogout - [SessionLogoutExample.java:51](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionLogoutExample.java#L51) +[session.logout](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/auth#session-logout) - sessionLogout - [SessionLogoutExample.java:39](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionLogoutExample.java#L39) -[session.status](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/authentication-requests#query-session-status) - sessionStatus - [SessionStatusExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionStatusExample.java#L48) +[session.status](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/auth#session-status) - sessionStatus - [SessionStatusExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionStatusExample.java#L36) ## General -[exchangeInfo](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/general-requests#exchange-information) - exchangeInfo - [ExchangeInfoExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/ExchangeInfoExample.java#L48) +[exchangeInfo](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/general#exchange-info) - exchangeInfo - [ExchangeInfoExample.java:53](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/ExchangeInfoExample.java#L53) -[executionRules](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/general-requests#query-execution-rules) - executionRules - [ExecutionRulesExample.java:49](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/ExecutionRulesExample.java#L49) +[executionRules](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/general#execution-rules) - executionRules - [ExecutionRulesExample.java:39](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/ExecutionRulesExample.java#L39) -[ping](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/general-requests#test-connectivity) - ping - [PingExample.java:47](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/PingExample.java#L47) +[ping](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/general#ping) - ping - [PingExample.java:38](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/PingExample.java#L38) -[time](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/general-requests#check-server-time) - time - [TimeExample.java:47](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/TimeExample.java#L47) +[time](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/general#time) - time - [TimeExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/TimeExample.java#L36) ## Market -[avgPrice](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#current-average-price) - avgPrice - [AvgPriceExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/AvgPriceExample.java#L48) +[avgPrice](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#avg-price) - avgPrice - [AvgPriceExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/AvgPriceExample.java#L37) -[depth](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#order-book) - depth - [DepthExample.java:54](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/DepthExample.java#L54) +[blockTrades.historical](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#block-trades-historical) - blockTradesHistorical - [BlockTradesHistoricalExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/BlockTradesHistoricalExample.java#L36) -[klines](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#klines) - klines - [KlinesExample.java:53](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/KlinesExample.java#L53) +[depth](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#depth) - depth - [DepthExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/DepthExample.java#L43) -[referencePrice](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#query-reference-price) - referencePrice - [ReferencePriceExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceExample.java#L48) +[klines](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#klines) - klines - [KlinesExample.java:52](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/KlinesExample.java#L52) -[referencePrice.calculation](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#query-reference-price-calculation) - referencePriceCalculation - [ReferencePriceCalculationExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceCalculationExample.java#L48) +[referencePrice](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#reference-price) - referencePrice - [ReferencePriceExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceExample.java#L36) -[ticker](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#rolling-window-price-change-statistics) - ticker - [TickerExample.java:51](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerExample.java#L51) +[referencePrice.calculation](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#reference-price-calculation) - referencePriceCalculation - [ReferencePriceCalculationExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceCalculationExample.java#L37) -[ticker.24hr](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#24hr-ticker-price-change-statistics) - ticker24hr - [Ticker24hrExample.java:54](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/Ticker24hrExample.java#L54) +[ticker](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#ticker) - ticker - [TickerExample.java:58](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerExample.java#L58) -[ticker.book](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#symbol-order-book-ticker) - tickerBook - [TickerBookExample.java:52](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerBookExample.java#L52) +[ticker.24hr](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#ticker24hr) - ticker24hr - [Ticker24hrExample.java:45](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/Ticker24hrExample.java#L45) -[ticker.price](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#symbol-price-ticker) - tickerPrice - [TickerPriceExample.java:52](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerPriceExample.java#L52) +[ticker.book](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#ticker-book) - tickerBook - [TickerBookExample.java:42](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerBookExample.java#L42) -[ticker.tradingDay](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#trading-day-ticker) - tickerTradingDay - [TickerTradingDayExample.java:50](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerTradingDayExample.java#L50) +[ticker.price](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#ticker-price) - tickerPrice - [TickerPriceExample.java:42](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerPriceExample.java#L42) -[trades.aggregate](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#aggregate-trades) - tradesAggregate - [TradesAggregateExample.java:54](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesAggregateExample.java#L54) +[ticker.tradingDay](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#ticker-trading-day) - tickerTradingDay - [TickerTradingDayExample.java:40](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerTradingDayExample.java#L40) -[trades.historical](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#historical-trades) - tradesHistorical - [TradesHistoricalExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesHistoricalExample.java#L48) +[trades.aggregate](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#trades-aggregate) - tradesAggregate - [TradesAggregateExample.java:49](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesAggregateExample.java#L49) -[trades.recent](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#recent-trades) - tradesRecent - [TradesRecentExample.java:49](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesRecentExample.java#L49) +[trades.historical](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#trades-historical) - tradesHistorical - [TradesHistoricalExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesHistoricalExample.java#L37) -[uiKlines](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#ui-klines) - uiKlines - [UiKlinesExample.java:51](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/UiKlinesExample.java#L51) +[trades.recent](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#trades-recent) - tradesRecent - [TradesRecentExample.java:38](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesRecentExample.java#L38) + +[uiKlines](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#ui-klines) - uiKlines - [UiKlinesExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/UiKlinesExample.java#L46) ## Trade -[openOrders.cancelAll](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#cancel-open-orders-trade) - openOrdersCancelAll - [OpenOrdersCancelAllExample.java:49](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OpenOrdersCancelAllExample.java#L49) +[openOrders.cancelAll](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#open-orders-cancel-all) - openOrdersCancelAll - [OpenOrdersCancelAllExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OpenOrdersCancelAllExample.java#L37) -[order.amend.keepPriority](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#order-amend-keep-priority-trade) - orderAmendKeepPriority - [OrderAmendKeepPriorityExample.java:50](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderAmendKeepPriorityExample.java#L50) +[order.amend.keepPriority](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-amend-keep-priority) - orderAmendKeepPriority - [OrderAmendKeepPriorityExample.java:40](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderAmendKeepPriorityExample.java#L40) -[order.cancel](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#cancel-order-trade) - orderCancel - [OrderCancelExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelExample.java#L48) +[order.cancel](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-cancel) - orderCancel - [OrderCancelExample.java:45](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelExample.java#L45) -[order.cancelReplace](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#cancel-and-replace-order-trade) - orderCancelReplace - [OrderCancelReplaceExample.java:55](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelReplaceExample.java#L55) +[order.cancelReplace](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-cancel-replace) - orderCancelReplace - [OrderCancelReplaceExample.java:166](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelReplaceExample.java#L166) -[orderList.cancel](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#cancel-order-list-trade) - orderListCancel - [OrderListCancelExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListCancelExample.java#L48) +[orderList.cancel](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-cancel) - orderListCancel - [OrderListCancelExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListCancelExample.java#L41) -[orderList.place](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#place-new-oco---deprecated-trade) - orderListPlace - [OrderListPlaceExample.java:52](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceExample.java#L52) +[orderList.place](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place) - orderListPlace - [OrderListPlaceExample.java:54](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceExample.java#L54) -[orderList.place.oco](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#place-new-order-list---oco-trade) - orderListPlaceOco - [OrderListPlaceOcoExample.java:63](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOcoExample.java#L63) +[orderList.place.oco](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-oco) - orderListPlaceOco - [OrderListPlaceOcoExample.java:52](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOcoExample.java#L52) -[orderList.place.opo](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#opo-trade) - orderListPlaceOpo - [OrderListPlaceOpoExample.java:53](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpoExample.java#L53) +[orderList.place.opo](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-opo) - orderListPlaceOpo - [OrderListPlaceOpoExample.java:42](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpoExample.java#L42) -[orderList.place.opoco](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#opoco-trade) - orderListPlaceOpoco - [OrderListPlaceOpocoExample.java:52](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpocoExample.java#L52) +[orderList.place.opoco](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-opoco) - orderListPlaceOpoco - [OrderListPlaceOpocoExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpocoExample.java#L41) -[orderList.place.oto](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#place-new-order-list---oto-trade) - orderListPlaceOto - [OrderListPlaceOtoExample.java:64](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtoExample.java#L64) +[orderList.place.oto](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-oto) - orderListPlaceOto - [OrderListPlaceOtoExample.java:63](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtoExample.java#L63) -[orderList.place.otoco](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#place-new-order-list---otoco-trade) - orderListPlaceOtoco - [OrderListPlaceOtocoExample.java:61](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtocoExample.java#L61) +[orderList.place.otoco](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-otoco) - orderListPlaceOtoco - [OrderListPlaceOtocoExample.java:67](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtocoExample.java#L67) -[order.place](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#place-new-order-trade) - orderPlace - [OrderPlaceExample.java:51](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderPlaceExample.java#L51) +[order.place](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-place) - orderPlace - [OrderPlaceExample.java:144](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderPlaceExample.java#L144) -[order.test](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#test-new-order-trade) - orderTest - [OrderTestExample.java:53](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderTestExample.java#L53) +[order.test](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-test) - orderTest - [OrderTestExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderTestExample.java#L41) -[sor.order.place](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#place-new-order-using-sor-trade) - sorOrderPlace - [SorOrderPlaceExample.java:52](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderPlaceExample.java#L52) +[sor.order.place](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#sor-order-place) - sorOrderPlace - [SorOrderPlaceExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderPlaceExample.java#L43) -[sor.order.test](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#test-new-order-using-sor-trade) - sorOrderTest - [SorOrderTestExample.java:53](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderTestExample.java#L53) +[sor.order.test](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#sor-order-test) - sorOrderTest - [SorOrderTestExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderTestExample.java#L41) ## UserDataStream -[session.subscriptions](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/user-Data-Stream-requests#listing-all-subscriptions) - sessionSubscriptions - [SessionSubscriptionsExample.java:47](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/SessionSubscriptionsExample.java#L47) +[session.subscriptions](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/user-data-stream#session-subscriptions) - sessionSubscriptions - [SessionSubscriptionsExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/SessionSubscriptionsExample.java#L36) -[userDataStream.subscribe](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/user-Data-Stream-requests#subscribe-to-user-data-stream-user_stream) - userDataStreamSubscribe - [UserDataStreamSubscribeExample.java:49](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeExample.java#L49) +[userDataStream.subscribe](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/user-data-stream#user-data-stream-subscribe) - userDataStreamSubscribe - [UserDataStreamSubscribeExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeExample.java#L46) -[userDataStream.subscribe.signature](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/user-Data-Stream-requests#subscribe-to-user-data-stream-through-signature-subscription-user_stream) - userDataStreamSubscribeSignature - [UserDataStreamSubscribeSignatureExample.java:49](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeSignatureExample.java#L49) +[userDataStream.subscribe.signature](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/user-data-stream#user-data-stream-subscribe-signature) - userDataStreamSubscribeSignature - [UserDataStreamSubscribeSignatureExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeSignatureExample.java#L37) -[userDataStream.unsubscribe](https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/user-Data-Stream-requests#unsubscribe-from-user-data-stream) - userDataStreamUnsubscribe - [UserDataStreamUnsubscribeExample.java:51](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamUnsubscribeExample.java#L51) +[userDataStream.unsubscribe](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/user-data-stream#user-data-stream-unsubscribe) - userDataStreamUnsubscribe - [UserDataStreamUnsubscribeExample.java:39](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamUnsubscribeExample.java#L39) diff --git a/clients/spot/example_websocket_stream.md b/clients/spot/example_websocket_stream.md index 37e062e83..28e93e54f 100644 --- a/clients/spot/example_websocket_stream.md +++ b/clients/spot/example_websocket_stream.md @@ -1,30 +1,32 @@ -## WebSocketStreams +## Default -[@aggTrade](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#aggregate-trade-streams) - aggTrade - [AggTradeExample.java:44](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/AggTradeExample.java#L44) +[@aggTrade](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#agg-trade) - aggTrade - [AggTradeExample.java:32](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/AggTradeExample.java#L32) -[!ticker_@arr](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#all-market-rolling-window-statistics-streams) - allMarketRollingWindowTicker - [AllMarketRollingWindowTickerExample.java:45](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/AllMarketRollingWindowTickerExample.java#L45) +[!ticker_@arr](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#all-market-rolling-window-ticker) - allMarketRollingWindowTicker - [AllMarketRollingWindowTickerExample.java:32](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/AllMarketRollingWindowTickerExample.java#L32) -[!miniTicker@arr](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#all-market-mini-tickers-stream) - allMiniTicker - [AllMiniTickerExample.java:44](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/AllMiniTickerExample.java#L44) +[!miniTicker@arr](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#all-mini-ticker) - allMiniTicker - [AllMiniTickerExample.java:33](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/AllMiniTickerExample.java#L33) -[@avgPrice](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#average-price) - avgPrice - [AvgPriceExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/AvgPriceExample.java#L43) +[@avgPrice](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#avg-price) - avgPrice - [AvgPriceExample.java:32](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/AvgPriceExample.java#L32) -[@bookTicker](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#individual-symbol-book-ticker-streams) - bookTicker - [BookTickerExample.java:45](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/BookTickerExample.java#L45) +[@blockTrade](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#block-trade) - blockTrade - [BlockTradeExample.java:31](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/BlockTradeExample.java#L31) -[@depth@](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#diff-depth-stream) - diffBookDepth - [DiffBookDepthExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/DiffBookDepthExample.java#L43) +[@bookTicker](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#book-ticker) - bookTicker - [BookTickerExample.java:33](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/BookTickerExample.java#L33) -[@kline_](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#klinecandlestick-streams-for-utc) - kline - [KlineExample.java:45](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/KlineExample.java#L45) +[@depth@](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#diff-book-depth) - diffBookDepth - [DiffBookDepthExample.java:32](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/DiffBookDepthExample.java#L32) -[@kline_@+08:00](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#klinecandlestick-streams-with-timezone-offset) - klineOffset - [KlineOffsetExample.java:45](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/KlineOffsetExample.java#L45) +[@kline_](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#kline) - kline - [KlineExample.java:33](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/KlineExample.java#L33) -[@miniTicker](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#individual-symbol-mini-ticker-stream) - miniTicker - [MiniTickerExample.java:44](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/MiniTickerExample.java#L44) +[@kline_@+08:00](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#kline-offset) - klineOffset - [KlineOffsetExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/KlineOffsetExample.java#L37) -[@depth@](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#partial-book-depth-streams) - partialBookDepth - [PartialBookDepthExample.java:45](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/PartialBookDepthExample.java#L45) +[@miniTicker](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#mini-ticker) - miniTicker - [MiniTickerExample.java:32](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/MiniTickerExample.java#L32) -[@referencePrice](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#reference-price-streams) - referencePrice - [ReferencePriceExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/ReferencePriceExample.java#L41) +[@depth@](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#partial-book-depth) - partialBookDepth - [PartialBookDepthExample.java:32](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/PartialBookDepthExample.java#L32) -[@ticker_](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#individual-symbol-rolling-window-statistics-streams) - rollingWindowTicker - [RollingWindowTickerExample.java:44](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/RollingWindowTickerExample.java#L44) +[@referencePrice](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#reference-price) - referencePrice - [ReferencePriceExample.java:31](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/ReferencePriceExample.java#L31) -[@ticker](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#individual-symbol-ticker-streams) - ticker - [TickerExample.java:44](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/TickerExample.java#L44) +[@ticker_](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#rolling-window-ticker) - rollingWindowTicker - [RollingWindowTickerExample.java:35](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/RollingWindowTickerExample.java#L35) -[@trade](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#trade-streams) - trade - [TradeExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/TradeExample.java#L43) +[@ticker](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#ticker) - ticker - [TickerExample.java:32](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/TickerExample.java#L32) + +[@trade](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#trade) - trade - [TradeExample.java:32](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/TradeExample.java#L32) diff --git a/clients/spot/pom.xml b/clients/spot/pom.xml index f2385fcb6..f9814712f 100644 --- a/clients/spot/pom.xml +++ b/clients/spot/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-spot spot - 10.1.1 + 11.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/JSON.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/JSON.java index d9a5d6544..b57f83b82 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/JSON.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -63,45 +63,83 @@ public static GsonBuilder createGson() { GsonFireBuilder fireBuilder = new GsonFireBuilder() .registerTypeSelector( - com.binance.connector.client.spot.rest.model.AssetFilters.class, + com.binance.connector.client.spot.rest.model.ExchangeFilters.class, new TypeSelector< com.binance.connector.client.spot.rest.model - .AssetFilters>() { + .ExchangeFilters>() { @Override public Class< ? extends com.binance.connector.client.spot.rest - .model.AssetFilters> + .model.ExchangeFilters> getClassForElement(JsonElement readElement) { Map classByDiscriminatorValue = new HashMap(); classByDiscriminatorValue.put( - "MAX_ASSET", + "EXCHANGE_MAX_NUM_ALGO_ORDERS", com.binance.connector.client.spot.rest.model - .MaxAssetFilter.class); + .ExchangeMaxNumAlgoOrdersFilter.class); + classByDiscriminatorValue.put( + "EXCHANGE_MAX_NUM_ICEBERG_ORDERS", + com.binance.connector.client.spot.rest.model + .ExchangeMaxNumIcebergOrdersFilter.class); classByDiscriminatorValue.put( - "MaxAssetFilter", + "EXCHANGE_MAX_NUM_ORDERS", + com.binance.connector.client.spot.rest.model + .ExchangeMaxNumOrdersFilter.class); + classByDiscriminatorValue.put( + "EXCHANGE_MAX_NUM_ORDER_LISTS", + com.binance.connector.client.spot.rest.model + .ExchangeMaxNumOrderListsFilter.class); + classByDiscriminatorValue.put( + "exchangeFilters", + com.binance.connector.client.spot.rest.model + .ExchangeFilters.class); + return getClassByDiscriminator( + classByDiscriminatorValue, + getDiscriminatorValue(readElement, "filterType")); + } + }) + .registerTypeSelector( + com.binance.connector.client.spot.rest.model + .MyFiltersResponseAssetFiltersInner.class, + new TypeSelector< + com.binance.connector.client.spot.rest.model + .MyFiltersResponseAssetFiltersInner>() { + @Override + public Class< + ? extends + com.binance.connector.client.spot.rest + .model + .MyFiltersResponseAssetFiltersInner> + getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = + new HashMap(); + classByDiscriminatorValue.put( + "MAX_ASSET", com.binance.connector.client.spot.rest.model .MaxAssetFilter.class); classByDiscriminatorValue.put( - "assetFilters", + "myFiltersResponse_assetFilters_inner", com.binance.connector.client.spot.rest.model - .AssetFilters.class); + .MyFiltersResponseAssetFiltersInner.class); return getClassByDiscriminator( classByDiscriminatorValue, getDiscriminatorValue(readElement, "filterType")); } }) .registerTypeSelector( - com.binance.connector.client.spot.rest.model.ExchangeFilters.class, + com.binance.connector.client.spot.rest.model + .MyFiltersResponseExchangeFiltersInner.class, new TypeSelector< com.binance.connector.client.spot.rest.model - .ExchangeFilters>() { + .MyFiltersResponseExchangeFiltersInner>() { @Override public Class< ? extends com.binance.connector.client.spot.rest - .model.ExchangeFilters> + .model + .MyFiltersResponseExchangeFiltersInner> getClassForElement(JsonElement readElement) { Map classByDiscriminatorValue = new HashMap(); @@ -122,40 +160,27 @@ public static GsonBuilder createGson() { com.binance.connector.client.spot.rest.model .ExchangeMaxNumOrderListsFilter.class); classByDiscriminatorValue.put( - "ExchangeMaxNumAlgoOrdersFilter", - com.binance.connector.client.spot.rest.model - .ExchangeMaxNumAlgoOrdersFilter.class); - classByDiscriminatorValue.put( - "ExchangeMaxNumIcebergOrdersFilter", - com.binance.connector.client.spot.rest.model - .ExchangeMaxNumIcebergOrdersFilter.class); - classByDiscriminatorValue.put( - "ExchangeMaxNumOrderListsFilter", - com.binance.connector.client.spot.rest.model - .ExchangeMaxNumOrderListsFilter.class); - classByDiscriminatorValue.put( - "ExchangeMaxNumOrdersFilter", - com.binance.connector.client.spot.rest.model - .ExchangeMaxNumOrdersFilter.class); - classByDiscriminatorValue.put( - "exchangeFilters", + "myFiltersResponse_exchangeFilters_inner", com.binance.connector.client.spot.rest.model - .ExchangeFilters.class); + .MyFiltersResponseExchangeFiltersInner + .class); return getClassByDiscriminator( classByDiscriminatorValue, getDiscriminatorValue(readElement, "filterType")); } }) .registerTypeSelector( - com.binance.connector.client.spot.rest.model.SymbolFilters.class, + com.binance.connector.client.spot.rest.model + .MyFiltersResponseSymbolFiltersInner.class, new TypeSelector< com.binance.connector.client.spot.rest.model - .SymbolFilters>() { + .MyFiltersResponseSymbolFiltersInner>() { @Override public Class< ? extends com.binance.connector.client.spot.rest - .model.SymbolFilters> + .model + .MyFiltersResponseSymbolFiltersInner> getClassForElement(JsonElement readElement) { Map classByDiscriminatorValue = new HashMap(); @@ -224,69 +249,91 @@ public static GsonBuilder createGson() { com.binance.connector.client.spot.rest.model .TPlusSellFilter.class); classByDiscriminatorValue.put( - "IcebergPartsFilter", + "myFiltersResponse_symbolFilters_inner", + com.binance.connector.client.spot.rest.model + .MyFiltersResponseSymbolFiltersInner.class); + return getClassByDiscriminator( + classByDiscriminatorValue, + getDiscriminatorValue(readElement, "filterType")); + } + }) + .registerTypeSelector( + com.binance.connector.client.spot.rest.model.SymbolFilters.class, + new TypeSelector< + com.binance.connector.client.spot.rest.model + .SymbolFilters>() { + @Override + public Class< + ? extends + com.binance.connector.client.spot.rest + .model.SymbolFilters> + getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = + new HashMap(); + classByDiscriminatorValue.put( + "ICEBERG_PARTS", com.binance.connector.client.spot.rest.model .IcebergPartsFilter.class); classByDiscriminatorValue.put( - "LotSizeFilter", + "LOT_SIZE", com.binance.connector.client.spot.rest.model .LotSizeFilter.class); classByDiscriminatorValue.put( - "MarketLotSizeFilter", + "MARKET_LOT_SIZE", com.binance.connector.client.spot.rest.model .MarketLotSizeFilter.class); classByDiscriminatorValue.put( - "MaxNumAlgoOrdersFilter", + "MAX_NUM_ALGO_ORDERS", com.binance.connector.client.spot.rest.model .MaxNumAlgoOrdersFilter.class); classByDiscriminatorValue.put( - "MaxNumIcebergOrdersFilter", + "MAX_NUM_ICEBERG_ORDERS", com.binance.connector.client.spot.rest.model .MaxNumIcebergOrdersFilter.class); classByDiscriminatorValue.put( - "MaxNumOrderAmendsFilter", + "MAX_NUM_ORDERS", com.binance.connector.client.spot.rest.model - .MaxNumOrderAmendsFilter.class); + .MaxNumOrdersFilter.class); classByDiscriminatorValue.put( - "MaxNumOrderListsFilter", + "MAX_NUM_ORDER_AMENDS", com.binance.connector.client.spot.rest.model - .MaxNumOrderListsFilter.class); + .MaxNumOrderAmendsFilter.class); classByDiscriminatorValue.put( - "MaxNumOrdersFilter", + "MAX_NUM_ORDER_LISTS", com.binance.connector.client.spot.rest.model - .MaxNumOrdersFilter.class); + .MaxNumOrderListsFilter.class); classByDiscriminatorValue.put( - "MaxPositionFilter", + "MAX_POSITION", com.binance.connector.client.spot.rest.model .MaxPositionFilter.class); classByDiscriminatorValue.put( - "MinNotionalFilter", + "MIN_NOTIONAL", com.binance.connector.client.spot.rest.model .MinNotionalFilter.class); classByDiscriminatorValue.put( - "NotionalFilter", + "NOTIONAL", com.binance.connector.client.spot.rest.model .NotionalFilter.class); classByDiscriminatorValue.put( - "PercentPriceBySideFilter", + "PERCENT_PRICE", com.binance.connector.client.spot.rest.model - .PercentPriceBySideFilter.class); + .PercentPriceFilter.class); classByDiscriminatorValue.put( - "PercentPriceFilter", + "PERCENT_PRICE_BY_SIDE", com.binance.connector.client.spot.rest.model - .PercentPriceFilter.class); + .PercentPriceBySideFilter.class); classByDiscriminatorValue.put( - "PriceFilter", + "PRICE_FILTER", com.binance.connector.client.spot.rest.model .PriceFilter.class); classByDiscriminatorValue.put( - "TPlusSellFilter", + "TRAILING_DELTA", com.binance.connector.client.spot.rest.model - .TPlusSellFilter.class); + .TrailingDeltaFilter.class); classByDiscriminatorValue.put( - "TrailingDeltaFilter", + "T_PLUS_SELL", com.binance.connector.client.spot.rest.model - .TrailingDeltaFilter.class); + .TPlusSellFilter.class); classByDiscriminatorValue.put( "symbolFilters", com.binance.connector.client.spot.rest.model @@ -381,9 +428,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.rest.model.AllOrdersResponseInner .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.rest.model.AssetFilters - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.rest.model.AvgPriceResponse .CustomTypeAdapterFactory()); @@ -414,6 +458,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.rest.model.ExchangeInfoResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.rest.model.ExchangeInfoResponseSorsInner + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.rest.model.ExchangeInfoResponseSymbolsInner .CustomTypeAdapterFactory()); @@ -451,6 +498,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.rest.model.GetOpenOrdersResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.rest.model.GetOpenOrdersResponseInner + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.rest.model.GetOrderListResponse .CustomTypeAdapterFactory()); @@ -464,10 +514,16 @@ private static Class getClassByDiscriminator( new com.binance.connector.client.spot.rest.model.GetTradesResponse .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.rest.model.HistoricalTradesResponse + new com.binance.connector.client.spot.rest.model.GetTradesResponseInner + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.rest.model.HistoricalBlockTradesResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.rest.model.HistoricalBlockTradesResponseInner .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.rest.model.HistoricalTradesResponseInner + new com.binance.connector.client.spot.rest.model.HistoricalTradesResponse .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.rest.model.IcebergPartsFilter @@ -520,6 +576,18 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.rest.model.MyFiltersResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.rest.model.MyFiltersResponseAssetFiltersInner + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.rest.model + .MyFiltersResponseExchangeFiltersInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.rest.model.MyFiltersResponseRateLimitsInner + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.rest.model.MyFiltersResponseSymbolFiltersInner + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.rest.model.MyPreventedMatchesResponse .CustomTypeAdapterFactory()); @@ -584,18 +652,13 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.rest.model .OrderCancelReplaceResponseCancelResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.rest.model.OrderCancelReplaceResponseData - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.rest.model - .OrderCancelReplaceResponseDataCancelResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.rest.model - .OrderCancelReplaceResponseDataNewOrderResponse.CustomTypeAdapterFactory()); + .OrderCancelReplaceResponseNewOrderResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.rest.model - .OrderCancelReplaceResponseNewOrderResponse.CustomTypeAdapterFactory()); + .OrderCancelReplaceResponseNewOrderResponseFillsInner + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.rest.model.OrderListOcoRequest .CustomTypeAdapterFactory()); @@ -683,6 +746,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.rest.model .OrderTestResponseStandardCommissionForOrder.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.rest.model + .OrderTestResponseTaxCommissionForOrder.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.rest.model.PercentPriceBySideFilter .CustomTypeAdapterFactory()); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/AccountApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/AccountApi.java index 490141d15..7e59a892e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/AccountApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/AccountApi.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -56,7 +56,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-spot/10.1.1 (Java/%s; %s; %s)", + "binance-spot/11.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = true; @@ -107,8 +107,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Query - * Commission Rates Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#account-commission">Query + * Commission Rates (USER_DATA) Documentation */ private okhttp3.Call accountCommissionCall(String symbol) throws ApiException { String basePath = null; @@ -200,7 +200,8 @@ private okhttp3.Call accountCommissionValidateBeforeCall(String symbol) throws A } /** - * Query Commission Rates Get current account commission rates. Weight: 20 + * Query Commission Rates (USER_DATA) Get current account commission rates. Weight(IP): 20 + * Security Type: USER_DATA Notes: **Data Source:** Database * * @param symbol (required) * @return ApiResponse<AccountCommissionResponse> @@ -214,8 +215,8 @@ private okhttp3.Call accountCommissionValidateBeforeCall(String symbol) throws A * * * @see Query - * Commission Rates Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#account-commission">Query + * Commission Rates (USER_DATA) Documentation */ public ApiResponse accountCommission(@NotNull String symbol) throws ApiException { @@ -228,13 +229,12 @@ public ApiResponse accountCommission(@NotNull String /** * Build call for allOrderList * - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) - * @param limit Default: 500; Maximum: 1000. (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param fromId If supplied, neither startTime or endTime can be provided (optional) + * @param startTime (optional) + * @param endTime (optional) + * @param limit (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -245,8 +245,8 @@ public ApiResponse accountCommission(@NotNull String * * * @see Query - * all Order lists Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#all-order-list">Query + * all Order lists (USER_DATA) Documentation */ private okhttp3.Call allOrderListCall( Long fromId, Long startTime, Long endTime, Integer limit, Double recvWindow) @@ -368,17 +368,17 @@ private okhttp3.Call allOrderListValidateBeforeCall( } /** - * Query all Order lists Retrieves all order lists based on provided optional parameters. Note - * that the time between `startTime` and `endTime` can't be longer than - * 24 hours. Weight: 20 + * Query all Order lists (USER_DATA) Retrieves all order lists based on provided optional + * parameters. Note that the time between `startTime` and `endTime` + * can't be longer than 24 hours. Weight(IP): 20 Security Type: USER_DATA Notes: **Data + * Source:** Database * - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) - * @param limit Default: 500; Maximum: 1000. (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param fromId If supplied, neither startTime or endTime can be provided (optional) + * @param startTime (optional) + * @param endTime (optional) + * @param limit (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<AllOrderListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -390,11 +390,15 @@ private okhttp3.Call allOrderListValidateBeforeCall( * * * @see Query - * all Order lists Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#all-order-list">Query + * all Order lists (USER_DATA) Documentation */ public ApiResponse allOrderList( - Long fromId, Long startTime, Long endTime, Integer limit, Double recvWindow) + Long fromId, + Long startTime, + Long endTime, + @Max(1000) Integer limit, + @DecimalMax("60000") Double recvWindow) throws ApiException { okhttp3.Call localVarCall = allOrderListValidateBeforeCall(fromId, startTime, endTime, limit, recvWindow); @@ -408,9 +412,9 @@ public ApiResponse allOrderList( * * @param symbol (required) * @param orderId (optional) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param startTime (optional) + * @param endTime (optional) + * @param limit (optional) * @param recvWindow The value cannot be greater than `60000`. <br> Supports up * to three decimal places of precision (e.g., 6000.346) so that microseconds may be * specified. (optional) @@ -424,8 +428,8 @@ public ApiResponse allOrderList( * * * @see All - * orders Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#all-orders">All + * orders (USER_DATA) Documentation */ private okhttp3.Call allOrdersCall( String symbol, @@ -562,13 +566,19 @@ private okhttp3.Call allOrdersValidateBeforeCall( } /** - * All orders Get all account orders; active, canceled, or filled. Weight: 20 + * All orders (USER_DATA) Get all account orders; active, canceled, or filled. Weight(IP): 20 + * Security Type: USER_DATA Notes: **Data Source:** Database - If `orderId` is set, it + * will get orders >= that `orderId`. Otherwise most recent orders are + * returned. - For some historical orders `cummulativeQuoteQty` will be < 0, + * meaning the data is not available at this time. - If `startTime` and/or + * `endTime` provided, `orderId` is not required. - The time between + * `startTime` and `endTime` can't be longer than 24 hours. * * @param symbol (required) * @param orderId (optional) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param startTime (optional) + * @param endTime (optional) + * @param limit (optional) * @param recvWindow The value cannot be greater than `60000`. <br> Supports up * to three decimal places of precision (e.g., 6000.346) so that microseconds may be * specified. (optional) @@ -583,15 +593,15 @@ private okhttp3.Call allOrdersValidateBeforeCall( * * * @see All - * orders Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#all-orders">All + * orders (USER_DATA) Documentation */ public ApiResponse allOrders( @NotNull String symbol, Long orderId, Long startTime, Long endTime, - Integer limit, + @Max(1000) Integer limit, Double recvWindow) throws ApiException { okhttp3.Call localVarCall = @@ -604,10 +614,9 @@ public ApiResponse allOrders( * Build call for getAccount * * @param omitZeroBalances When set to `true`, emits only the non-zero balances of an - * account. <br>Default value: `false` (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * account. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -618,8 +627,8 @@ public ApiResponse allOrders( * * * @see Account - * information Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-account">Account + * information (USER_DATA) Documentation */ private okhttp3.Call getAccountCall(Boolean omitZeroBalances, Double recvWindow) throws ApiException { @@ -720,13 +729,13 @@ private okhttp3.Call getAccountValidateBeforeCall(Boolean omitZeroBalances, Doub } /** - * Account information Get current account information. Weight: 20 + * Account information (USER_DATA) Get current account information. Weight(IP): 20 Security + * Type: USER_DATA Notes: **Data Source:** Memory => Database * * @param omitZeroBalances When set to `true`, emits only the non-zero balances of an - * account. <br>Default value: `false` (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * account. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<GetAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -738,11 +747,11 @@ private okhttp3.Call getAccountValidateBeforeCall(Boolean omitZeroBalances, Doub * * * @see Account - * information Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-account">Account + * information (USER_DATA) Documentation */ - public ApiResponse getAccount(Boolean omitZeroBalances, Double recvWindow) - throws ApiException { + public ApiResponse getAccount( + Boolean omitZeroBalances, @DecimalMax("60000") Double recvWindow) throws ApiException { okhttp3.Call localVarCall = getAccountValidateBeforeCall(omitZeroBalances, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -752,10 +761,9 @@ public ApiResponse getAccount(Boolean omitZeroBalances, Doub /** * Build call for getOpenOrders * - * @param symbol Symbol to query (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param symbol (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -766,8 +774,8 @@ public ApiResponse getAccount(Boolean omitZeroBalances, Doub * * * @see Current - * open orders Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-open-orders">Current + * open orders (USER_DATA) Documentation */ private okhttp3.Call getOpenOrdersCall(String symbol, Double recvWindow) throws ApiException { String basePath = null; @@ -866,13 +874,14 @@ private okhttp3.Call getOpenOrdersValidateBeforeCall(String symbol, Double recvW } /** - * Current open orders Get all open orders on a symbol. **Careful** when accessing this with no - * symbol. Weight: 6 for a single symbol; **80** when the symbol parameter is omitted + * Current open orders (USER_DATA) Get all open orders on a symbol. **Careful** when accessing + * this with no symbol. Weight: 6 for a single symbol; 80 when the symbol parameter is omitted + * Security Type: USER_DATA Notes: **Data Source:** Memory => Database - If the symbol + * is not sent, orders for all symbols will be returned in an array. * - * @param symbol Symbol to query (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param symbol (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<GetOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -884,11 +893,11 @@ private okhttp3.Call getOpenOrdersValidateBeforeCall(String symbol, Double recvW * * * @see Current - * open orders Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-open-orders">Current + * open orders (USER_DATA) Documentation */ - public ApiResponse getOpenOrders(String symbol, Double recvWindow) - throws ApiException { + public ApiResponse getOpenOrders( + String symbol, @DecimalMax("60000") Double recvWindow) throws ApiException { okhttp3.Call localVarCall = getOpenOrdersValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -901,9 +910,8 @@ public ApiResponse getOpenOrders(String symbol, Double re * @param symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -914,8 +922,8 @@ public ApiResponse getOpenOrders(String symbol, Double re * * * @see Query - * order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-order">Query + * order (USER_DATA) Documentation */ private okhttp3.Call getOrderCall( String symbol, Long orderId, String origClientOrderId, Double recvWindow) @@ -1033,14 +1041,20 @@ private okhttp3.Call getOrderValidateBeforeCall( } /** - * Query order Check an order's status. Weight: 4 + * Query order (USER_DATA) Check an order's status. Weight(IP): 4 Security Type: USER_DATA + * Notes: **Data Source:** Memory => Database - Either `orderId` or + * `origClientOrderId` must be sent. - If both `orderId` and + * `origClientOrderId` are provided, the `orderId` is searched first, then + * the `origClientOrderId` from that result is checked against that order. If both + * conditions are not met the request will be rejected. - For some historical orders + * `cummulativeQuoteQty` will be < 0, meaning the data is not available at this + * time. * * @param symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<GetOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1052,11 +1066,14 @@ private okhttp3.Call getOrderValidateBeforeCall( * * * @see Query - * order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-order">Query + * order (USER_DATA) Documentation */ public ApiResponse getOrder( - @NotNull String symbol, Long orderId, String origClientOrderId, Double recvWindow) + @NotNull String symbol, + Long orderId, + String origClientOrderId, + @DecimalMax("60000") Double recvWindow) throws ApiException { okhttp3.Call localVarCall = getOrderValidateBeforeCall(symbol, orderId, origClientOrderId, recvWindow); @@ -1067,12 +1084,12 @@ public ApiResponse getOrder( /** * Build call for getOrderList * - * @param orderListId Either `orderListId` or `listClientOrderId` must be - * provided (optional) - * @param origClientOrderId (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param orderListId Query order list by `orderListId`. `orderListId` or + * `origClientOrderId` must be provided. (optional) + * @param origClientOrderId Query order list by `listClientOrderId`. + * `orderListId` or `origClientOrderId` must be provided. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1083,8 +1100,8 @@ public ApiResponse getOrder( * * * @see Query - * Order list Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-order-list">Query + * Order list (USER_DATA) Documentation */ private okhttp3.Call getOrderListCall( Long orderListId, String origClientOrderId, Double recvWindow) throws ApiException { @@ -1192,15 +1209,15 @@ private okhttp3.Call getOrderListValidateBeforeCall( } /** - * Query Order list Retrieves a specific order list based on provided optional parameters. - * Weight: 4 + * Query Order list (USER_DATA) Retrieves a specific order list based on provided optional + * parameters. Weight(IP): 4 Security Type: USER_DATA Notes: **Data Source:** Database * - * @param orderListId Either `orderListId` or `listClientOrderId` must be - * provided (optional) - * @param origClientOrderId (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param orderListId Query order list by `orderListId`. `orderListId` or + * `origClientOrderId` must be provided. (optional) + * @param origClientOrderId Query order list by `listClientOrderId`. + * `orderListId` or `origClientOrderId` must be provided. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<GetOrderListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1212,11 +1229,12 @@ private okhttp3.Call getOrderListValidateBeforeCall( * * * @see Query - * Order list Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-order-list">Query + * Order list (USER_DATA) Documentation */ public ApiResponse getOrderList( - Long orderListId, String origClientOrderId, Double recvWindow) throws ApiException { + Long orderListId, String origClientOrderId, @DecimalMax("60000") Double recvWindow) + throws ApiException { okhttp3.Call localVarCall = getOrderListValidateBeforeCall(orderListId, origClientOrderId, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1228,14 +1246,13 @@ public ApiResponse getOrderList( * Build call for myAllocations * * @param symbol (required) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) + * @param startTime (optional) + * @param endTime (optional) * @param fromAllocationId (optional) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param limit (optional) * @param orderId (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1246,8 +1263,8 @@ public ApiResponse getOrderList( * * * @see Query - * Allocations Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#my-allocations">Query + * Allocations (USER_DATA) Documentation */ private okhttp3.Call myAllocationsCall( String symbol, @@ -1395,17 +1412,27 @@ private okhttp3.Call myAllocationsValidateBeforeCall( } /** - * Query Allocations Retrieves allocations resulting from SOR order placement. Weight: 20 + * Query Allocations (USER_DATA) Retrieves allocations resulting from SOR order placement. + * Weight(IP): 20 Security Type: USER_DATA Notes: **Data Source:** Database\" Supported + * parameter combinations: Parameters | Response | ------------------------------------------- | + * -------- | `symbol` | allocations from oldest to newest | `symbol` + + * `startTime` | oldest allocations since `startTime` | `symbol` + + * `endTime` | newest allocations until `endTime` | `symbol` + + * `startTime` + `endTime` | allocations within the time range | + * `symbol` + `fromAllocationId` | allocations by allocation ID | + * `symbol` + `orderId` | allocations related to an order starting with + * oldest | `symbol` + `orderId` + `fromAllocationId` | + * allocations related to an order by allocation ID | **Note:** The time between + * `startTime` and `endTime` can't be longer than 24 hours. * * @param symbol (required) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) + * @param startTime (optional) + * @param endTime (optional) * @param fromAllocationId (optional) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param limit (optional) * @param orderId (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<MyAllocationsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1417,17 +1444,17 @@ private okhttp3.Call myAllocationsValidateBeforeCall( * * * @see Query - * Allocations Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#my-allocations">Query + * Allocations (USER_DATA) Documentation */ public ApiResponse myAllocations( @NotNull String symbol, Long startTime, Long endTime, Integer fromAllocationId, - Integer limit, + @Max(1000) Integer limit, Long orderId, - Double recvWindow) + @DecimalMax("60000") Double recvWindow) throws ApiException { okhttp3.Call localVarCall = myAllocationsValidateBeforeCall( @@ -1441,9 +1468,8 @@ public ApiResponse myAllocations( * Build call for myFilters * * @param symbol (required) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1454,8 +1480,8 @@ public ApiResponse myAllocations( * * * @see Query - * relevant filters Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#my-filters">Query + * relevant filters (USER_DATA) Documentation */ private okhttp3.Call myFiltersCall(String symbol, Double recvWindow) throws ApiException { String basePath = null; @@ -1554,14 +1580,13 @@ private okhttp3.Call myFiltersValidateBeforeCall(String symbol, Double recvWindo } /** - * Query relevant filters Retrieves the list of [filters](filters.md) relevant to an account on - * a given symbol. This is the only endpoint that shows if an account has `MAX_ASSET` - * filters applied to it. Weight: 40 + * Query relevant filters (USER_DATA) Retrieves the list of filters relevant to an account on a + * given symbol. This is the only endpoint that shows if an account has `MAX_ASSET` + * filters applied to it. Weight(IP): 40 Security Type: USER_DATA Notes: **Data Source:** Memory * * @param symbol (required) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<MyFiltersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1573,11 +1598,11 @@ private okhttp3.Call myFiltersValidateBeforeCall(String symbol, Double recvWindo * * * @see Query - * relevant filters Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#my-filters">Query + * relevant filters (USER_DATA) Documentation */ - public ApiResponse myFilters(@NotNull String symbol, Double recvWindow) - throws ApiException { + public ApiResponse myFilters( + @NotNull String symbol, @DecimalMax("60000") Double recvWindow) throws ApiException { okhttp3.Call localVarCall = myFiltersValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1590,10 +1615,9 @@ public ApiResponse myFilters(@NotNull String symbol, Double r * @param preventedMatchId (optional) * @param orderId (optional) * @param fromPreventedMatchId (optional) - * @param limit Default: 500; Maximum: 1000. (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param limit (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1604,8 +1628,8 @@ public ApiResponse myFilters(@NotNull String symbol, Double r * * * @see Query - * Prevented Matches Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#my-prevented-matches">Query + * Prevented Matches (USER_DATA) Documentation */ private okhttp3.Call myPreventedMatchesCall( String symbol, @@ -1748,22 +1772,22 @@ private okhttp3.Call myPreventedMatchesValidateBeforeCall( } /** - * Query Prevented Matches Displays the list of orders that were expired due to STP. These are - * the combinations supported: * `symbol` + `preventedMatchId` * - * `symbol` + `orderId` * `symbol` + `orderId` + - * `fromPreventedMatchId` (`limit` will default to 500) * `symbol` + * Query Prevented Matches (USER_DATA) Displays the list of orders that were expired due to STP. + * These are the combinations supported: - `symbol` + `preventedMatchId` - + * `symbol` + `orderId` - `symbol` + `orderId` + + * `fromPreventedMatchId` (`limit` will default to 500) - `symbol` * + `orderId` + `fromPreventedMatchId` + `limit` Weight: Case | * Weight ---- | ----- If `symbol` is invalid | 2 Querying by - * `preventedMatchId` | 2 Querying by `orderId` | 20 + * `preventedMatchId` | 2 Querying by `orderId` | 20 Security Type: + * USER_DATA Notes: **Data Source:** Database * * @param symbol (required) * @param preventedMatchId (optional) * @param orderId (optional) * @param fromPreventedMatchId (optional) - * @param limit Default: 500; Maximum: 1000. (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param limit (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<MyPreventedMatchesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1775,16 +1799,16 @@ private okhttp3.Call myPreventedMatchesValidateBeforeCall( * * * @see Query - * Prevented Matches Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#my-prevented-matches">Query + * Prevented Matches (USER_DATA) Documentation */ public ApiResponse myPreventedMatches( @NotNull String symbol, Long preventedMatchId, Long orderId, Long fromPreventedMatchId, - Integer limit, - Double recvWindow) + @Max(1000) Integer limit, + @DecimalMax("60000") Double recvWindow) throws ApiException { okhttp3.Call localVarCall = myPreventedMatchesValidateBeforeCall( @@ -1798,14 +1822,13 @@ public ApiResponse myPreventedMatches( * Build call for myTrades * * @param symbol (required) - * @param orderId (optional) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param limit Default: 500; Maximum: 1000. (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param orderId This can only be used in combination with `symbol`. (optional) + * @param startTime (optional) + * @param endTime (optional) + * @param fromId TradeId to fetch from. Default gets most recent trades. (optional) + * @param limit (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1816,8 +1839,8 @@ public ApiResponse myPreventedMatches( * * * @see Account - * trade list Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#my-trades">Account + * trade list (USER_DATA) Documentation */ private okhttp3.Call myTradesCall( String symbol, @@ -1963,18 +1986,25 @@ private okhttp3.Call myTradesValidateBeforeCall( } /** - * Account trade list Get trades for a specific account and symbol. Weight: Condition| Weight| - * ---| --- |Without orderId|20| |With orderId|5| + * Account trade list (USER_DATA) Get trades for a specific account and symbol. Weight: + * Condition| Weight| ---| --- |Without orderId|20| |With orderId|5| Security Type: USER_DATA + * Notes: **Data Source:** Memory => Database **Notes:**: - If `fromId` is + * set, it will get trades >= that `fromId`. Otherwise most recent trades are + * returned. - The time between `startTime` and `endTime` can't be + * longer than 24 hours. - These are the supported combinations of all parameters: - + * `symbol` - `symbol` + `orderId` - `symbol` + + * `startTime` - `symbol` + `endTime` - `symbol` + + * `fromId` - `symbol` + `startTime` + `endTime` - + * `symbol`+ `orderId` + `fromId` * * @param symbol (required) - * @param orderId (optional) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param limit Default: 500; Maximum: 1000. (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param orderId This can only be used in combination with `symbol`. (optional) + * @param startTime (optional) + * @param endTime (optional) + * @param fromId TradeId to fetch from. Default gets most recent trades. (optional) + * @param limit (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<MyTradesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1986,8 +2016,8 @@ private okhttp3.Call myTradesValidateBeforeCall( * * * @see Account - * trade list Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#my-trades">Account + * trade list (USER_DATA) Documentation */ public ApiResponse myTrades( @NotNull String symbol, @@ -1995,8 +2025,8 @@ public ApiResponse myTrades( Long startTime, Long endTime, Long fromId, - Integer limit, - Double recvWindow) + @Max(1000) Integer limit, + @DecimalMax("60000") Double recvWindow) throws ApiException { okhttp3.Call localVarCall = myTradesValidateBeforeCall( @@ -2008,9 +2038,8 @@ public ApiResponse myTrades( /** * Build call for openOrderList * - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2021,8 +2050,8 @@ public ApiResponse myTrades( * * * @see Query - * Open Order lists Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#open-order-list">Query + * Open Order lists (USER_DATA) Documentation */ private okhttp3.Call openOrderListCall(Double recvWindow) throws ApiException { String basePath = null; @@ -2116,11 +2145,11 @@ private okhttp3.Call openOrderListValidateBeforeCall(Double recvWindow) throws A } /** - * Query Open Order lists Weight: 6 + * Query Open Order lists (USER_DATA) Query Open Order lists Weight(IP): 6 Security Type: + * USER_DATA Notes: **Data Source:** Memory -> Database * - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<OpenOrderListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2132,10 +2161,11 @@ private okhttp3.Call openOrderListValidateBeforeCall(Double recvWindow) throws A * * * @see Query - * Open Order lists Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#open-order-list">Query + * Open Order lists (USER_DATA) Documentation */ - public ApiResponse openOrderList(Double recvWindow) throws ApiException { + public ApiResponse openOrderList(@DecimalMax("60000") Double recvWindow) + throws ApiException { okhttp3.Call localVarCall = openOrderListValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -2148,10 +2178,9 @@ public ApiResponse openOrderList(Double recvWindow) throw * @param symbol (required) * @param orderId (required) * @param fromExecutionId (optional) - * @param limit Default:500; Maximum: 1000 (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param limit (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2162,8 +2191,8 @@ public ApiResponse openOrderList(Double recvWindow) throw * * * @see Query - * Order Amendments Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#order-amendments">Query + * Order Amendments (USER_DATA) Documentation */ private okhttp3.Call orderAmendmentsCall( String symbol, Long orderId, Long fromExecutionId, Long limit, Double recvWindow) @@ -2286,15 +2315,15 @@ private okhttp3.Call orderAmendmentsValidateBeforeCall( } /** - * Query Order Amendments Queries all amendments of a single order. Weight: 4 + * Query Order Amendments (USER_DATA) Queries all amendments of a single order. Weight(IP): 4 + * Security Type: USER_DATA Notes: **Data Source:** Database * * @param symbol (required) * @param orderId (required) * @param fromExecutionId (optional) - * @param limit Default:500; Maximum: 1000 (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param limit (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<OrderAmendmentsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2306,15 +2335,15 @@ private okhttp3.Call orderAmendmentsValidateBeforeCall( * * * @see Query - * Order Amendments Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#order-amendments">Query + * Order Amendments (USER_DATA) Documentation */ public ApiResponse orderAmendments( @NotNull String symbol, @NotNull Long orderId, Long fromExecutionId, - Long limit, - Double recvWindow) + @Max(1000L) Long limit, + @DecimalMax("60000") Double recvWindow) throws ApiException { okhttp3.Call localVarCall = orderAmendmentsValidateBeforeCall( @@ -2327,9 +2356,8 @@ public ApiResponse orderAmendments( /** * Build call for rateLimitOrder * - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2340,8 +2368,8 @@ public ApiResponse orderAmendments( * * * @see Query - * Unfilled Order Count Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#rate-limit-order">Query + * Unfilled Order Count (USER_DATA) Documentation */ private okhttp3.Call rateLimitOrderCall(Double recvWindow) throws ApiException { String basePath = null; @@ -2435,12 +2463,11 @@ private okhttp3.Call rateLimitOrderValidateBeforeCall(Double recvWindow) throws } /** - * Query Unfilled Order Count Displays the user's unfilled order count for all intervals. - * Weight: 40 + * Query Unfilled Order Count (USER_DATA) Displays the user's unfilled order count for all + * intervals. Weight(IP): 40 Security Type: USER_DATA Notes: **Data Source:** Memory * - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<RateLimitOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2452,11 +2479,11 @@ private okhttp3.Call rateLimitOrderValidateBeforeCall(Double recvWindow) throws * * * @see Query - * Unfilled Order Count Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#rate-limit-order">Query + * Unfilled Order Count (USER_DATA) Documentation */ - public ApiResponse rateLimitOrder(Double recvWindow) - throws ApiException { + public ApiResponse rateLimitOrder( + @DecimalMax("60000") Double recvWindow) throws ApiException { okhttp3.Call localVarCall = rateLimitOrderValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/GeneralApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/GeneralApi.java index 39d62a091..1ae26a57e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/GeneralApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/GeneralApi.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -48,7 +48,7 @@ public class GeneralApi { private static final String USER_AGENT = String.format( - "binance-spot/10.1.1 (Java/%s; %s; %s)", + "binance-spot/11.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = true; @@ -88,12 +88,24 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for exchangeInfo * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param permissions List of permissions to query (optional) + * @param symbol Example: curl -X GET + * \"https://api.binance.com/api/v3/exchangeInfo?symbol=BNBBTC\" (optional) + * @param symbols Examples: curl -X GET + * \"https://api.binance.com/api/v3/exchangeInfo?symbols=%5B%22BNBBTC%22,%22BTCUSDT%22%5D\" + * or curl -g -X GET + * 'https://api.binance.com/api/v3/exchangeInfo?symbols=[\"BTCUSDT\",\"BNBBTC\"]' + * (optional) + * @param permissions Examples: curl -X GET + * \"https://api.binance.com/api/v3/exchangeInfo?permissions=SPOT\" curl -X + * GET + * \"https://api.binance.com/api/v3/exchangeInfo?permissions=%5B%22MARGIN%22%2C%22LEVERAGED%22%5D\" + * or curl -g -X GET + * 'https://api.binance.com/api/v3/exchangeInfo?permissions=[\"MARGIN\",\"LEVERAGED\"]' + * (optional) * @param showPermissionSets Controls whether the content of the `permissionSets` - * field is populated or not. Defaults to `true` (optional) - * @param symbolStatus (optional) + * field is populated or not. (optional) + * @param symbolStatus Filters for symbols that have this `tradingStatus`. Cannot be + * used in combination with `symbols` or `symbol`. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -104,7 +116,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Exchange + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#exchange-info">Exchange * information Documentation */ private okhttp3.Call exchangeInfoCall( @@ -239,14 +251,45 @@ private okhttp3.Call exchangeInfoValidateBeforeCall( } /** - * Exchange information Current exchange trading rules and symbol information Weight: 20 + * Exchange information Current exchange trading rules and symbol information Weight(IP): 20 + * Security Type: NONE Notes: **Data Source:** Memory **Notes:** * If the value provided to + * `symbol` or `symbols` do not exist, the endpoint will throw an error + * saying the symbol is invalid. * All parameters are optional. * `permissions` can + * support single or multiple values (e.g. `SPOT`, + * `[\"MARGIN\",\"LEVERAGED\"]`). This cannot be used in + * combination with `symbol` or `symbols`. * If `permissions` + * parameter not provided, all symbols that have either `SPOT`, `MARGIN`, or + * `LEVERAGED` permission will be exposed. * To display symbols with any permission + * you need to specify them explicitly in `permissions`: (e.g. + * `[\"SPOT\",\"MARGIN\",...]`.). See Account and Symbol + * Permissions for the full list. **Examples of Symbol Permissions Interpretation from the + * Response:** * `[[\"A\",\"B\"]]` means you may place an order if + * your account has either permission \"A\" **or** permission \"B\". * + * `[[\"A\"],[\"B\"]]` means you can place an order if your + * account has permission \"A\" **and** permission \"B\". * + * `[[\"A\"],[\"B\",\"C\"]]` means you can place an + * order if your account has permission \"A\" **and** permission \"B\" or + * permission \"C\". (Inclusive or is applied here, not exclusive or, so your account + * may have both permission \"B\" and permission \"C\".) * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param permissions List of permissions to query (optional) + * @param symbol Example: curl -X GET + * \"https://api.binance.com/api/v3/exchangeInfo?symbol=BNBBTC\" (optional) + * @param symbols Examples: curl -X GET + * \"https://api.binance.com/api/v3/exchangeInfo?symbols=%5B%22BNBBTC%22,%22BTCUSDT%22%5D\" + * or curl -g -X GET + * 'https://api.binance.com/api/v3/exchangeInfo?symbols=[\"BTCUSDT\",\"BNBBTC\"]' + * (optional) + * @param permissions Examples: curl -X GET + * \"https://api.binance.com/api/v3/exchangeInfo?permissions=SPOT\" curl -X + * GET + * \"https://api.binance.com/api/v3/exchangeInfo?permissions=%5B%22MARGIN%22%2C%22LEVERAGED%22%5D\" + * or curl -g -X GET + * 'https://api.binance.com/api/v3/exchangeInfo?permissions=[\"MARGIN\",\"LEVERAGED\"]' + * (optional) * @param showPermissionSets Controls whether the content of the `permissionSets` - * field is populated or not. Defaults to `true` (optional) - * @param symbolStatus (optional) + * field is populated or not. (optional) + * @param symbolStatus Filters for symbols that have this `tradingStatus`. Cannot be + * used in combination with `symbols` or `symbol`. (optional) * @return ApiResponse<ExchangeInfoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -258,7 +301,7 @@ private okhttp3.Call exchangeInfoValidateBeforeCall( * * * @see Exchange + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#exchange-info">Exchange * information Documentation */ public ApiResponse exchangeInfo( @@ -279,20 +322,20 @@ public ApiResponse exchangeInfo( /** * Build call for executionRules * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param symbolStatus (optional) + * @param symbol Query for specified symbol. (optional) + * @param symbols Query for multiple symbols. (optional) + * @param symbolStatus Query for all symbols with the specified status. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details * * * - * + * *
Response Details
Status Code Description Response Headers
200 Query Execution Rules -
200 Query execution rules -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#execution-rules">Query * Execution Rules Documentation */ private okhttp3.Call executionRulesCall( @@ -402,13 +445,14 @@ private okhttp3.Call executionRulesValidateBeforeCall( } /** - * Query Execution Rules Weight: Parameter | Weight| --- | --- `symbol` | 2 - * `symbols` | 2 for each `symbol`, capped at a max of 40| - * `symbolStatus` |40| None |40| + * Query Execution Rules Query execution rules for symbols. Weight: Parameter | Weight --- | --- + * `symbol` | 2 `symbols` | 2 for each `symbol`, capped at a max + * of 40 `symbolStatus` | 40 None | 40 Security Type: NONE Notes: **Data Source:** + * Memory **Note:**: No combination of multiple parameters is allowed. * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param symbolStatus (optional) + * @param symbol Query for specified symbol. (optional) + * @param symbols Query for multiple symbols. (optional) + * @param symbolStatus Query for all symbols with the specified status. (optional) * @return ApiResponse<ExecutionRulesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -416,11 +460,11 @@ private okhttp3.Call executionRulesValidateBeforeCall( * * * - * + * *
Response Details
Status Code Description Response Headers
200 Query Execution Rules -
200 Query execution rules -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#execution-rules">Query * Execution Rules Documentation */ public ApiResponse executionRules( @@ -444,7 +488,7 @@ public ApiResponse executionRules( * * * @see Test + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#ping">Test * connectivity Documentation */ private okhttp3.Call pingCall() throws ApiException { @@ -532,7 +576,7 @@ private okhttp3.Call pingValidateBeforeCall() throws ApiException { } /** - * Test connectivity Test connectivity to the Rest API. Weight: 1 + * Test connectivity Test connectivity to the Rest API. Weight(IP): 1 Security Type: NONE * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -545,7 +589,7 @@ private okhttp3.Call pingValidateBeforeCall() throws ApiException { * * * @see Test + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#ping">Test * connectivity Documentation */ public ApiResponse ping() throws ApiException { @@ -566,7 +610,7 @@ public ApiResponse ping() throws ApiException { * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#time">Check * server time Documentation */ private okhttp3.Call timeCall() throws ApiException { @@ -654,8 +698,8 @@ private okhttp3.Call timeValidateBeforeCall() throws ApiException { } /** - * Check server time Test connectivity to the Rest API and get the current server time. Weight: - * 1 + * Check server time Test connectivity to the Rest API and get the current server time. + * Weight(IP): 1 Security Type: NONE * * @return ApiResponse<TimeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -668,7 +712,7 @@ private okhttp3.Call timeValidateBeforeCall() throws ApiException { * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#time">Check * server time Documentation */ public ApiResponse time() throws ApiException { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/MarketApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/MarketApi.java index 52d27d099..c8d41f129 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/MarketApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/MarketApi.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -24,6 +24,7 @@ import com.binance.connector.client.spot.rest.model.AvgPriceResponse; import com.binance.connector.client.spot.rest.model.DepthResponse; import com.binance.connector.client.spot.rest.model.GetTradesResponse; +import com.binance.connector.client.spot.rest.model.HistoricalBlockTradesResponse; import com.binance.connector.client.spot.rest.model.HistoricalTradesResponse; import com.binance.connector.client.spot.rest.model.Interval; import com.binance.connector.client.spot.rest.model.KlinesResponse; @@ -61,7 +62,7 @@ public class MarketApi { private static final String USER_AGENT = String.format( - "binance-spot/10.1.1 (Java/%s; %s; %s)", + "binance-spot/11.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = true; @@ -105,7 +106,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param limit (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -116,7 +117,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Compressed/Aggregate + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#agg-trades">Compressed/Aggregate * trades list Documentation */ private okhttp3.Call aggTradesCall( @@ -238,13 +239,14 @@ private okhttp3.Call aggTradesValidateBeforeCall( /** * Compressed/Aggregate trades list Get compressed, aggregate trades. Trades that fill at the * time, from the same taker order, with the same price will have the quantity aggregated. - * Weight: 4 + * Weight(IP): 4 Security Type: NONE Notes: **Data Source:** Database - If fromId, startTime, + * and endTime are not sent, the most recent aggregate trades will be returned. * * @param symbol (required) * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param limit (optional) * @return ApiResponse<AggTradesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -256,11 +258,15 @@ private okhttp3.Call aggTradesValidateBeforeCall( * * * @see Compressed/Aggregate + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#agg-trades">Compressed/Aggregate * trades list Documentation */ public ApiResponse aggTrades( - @NotNull String symbol, Long fromId, Long startTime, Long endTime, Integer limit) + @NotNull String symbol, + Long fromId, + Long startTime, + Long endTime, + @Max(1000) Integer limit) throws ApiException { okhttp3.Call localVarCall = aggTradesValidateBeforeCall(symbol, fromId, startTime, endTime, limit); @@ -282,7 +288,7 @@ public ApiResponse aggTrades( * * * @see Current + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#avg-price">Current * average price Documentation */ private okhttp3.Call avgPriceCall(String symbol) throws ApiException { @@ -374,7 +380,8 @@ private okhttp3.Call avgPriceValidateBeforeCall(String symbol) throws ApiExcepti } /** - * Current average price Current average price for a symbol. Weight: 2 + * Current average price Current average price for a symbol. Weight(IP): 2 Security Type: NONE + * Notes: **Data Source:** Memory * * @param symbol (required) * @return ApiResponse<AvgPriceResponse> @@ -388,7 +395,7 @@ private okhttp3.Call avgPriceValidateBeforeCall(String symbol) throws ApiExcepti * * * @see Current + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#avg-price">Current * average price Documentation */ public ApiResponse avgPrice(@NotNull String symbol) throws ApiException { @@ -401,8 +408,9 @@ public ApiResponse avgPrice(@NotNull String symbol) throws Api * Build call for depth * * @param symbol (required) - * @param limit Default: 500; Maximum: 1000. (optional) - * @param symbolStatus (optional) + * @param limit If limit > 5000, only 5000 entries will be returned. (optional) + * @param symbolStatus Filters for symbols that have this `tradingStatus`. A status + * mismatch returns error `-1220 SYMBOL_DOES_NOT_MATCH_STATUS`. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -413,7 +421,7 @@ public ApiResponse avgPrice(@NotNull String symbol) throws Api * * * @see Order + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#depth">Order * book Documentation */ private okhttp3.Call depthCall(String symbol, Integer limit, SymbolStatus symbolStatus) @@ -518,12 +526,14 @@ private okhttp3.Call depthValidateBeforeCall( } /** - * Order book Weight: Adjusted based on the limit: |Limit|Request Weight ------|------- 1-100| 5 - * 101-500| 25 501-1000| 50 1001-5000| 250 + * Order book Order book Weight: Adjusted based on the limit: |Limit|Request Weight + * ------|------- 1-100| 5 101-500| 25 501-1000| 50 1001-5000| 250 Security Type: NONE Notes: + * **Data Source:** Memory * * @param symbol (required) - * @param limit Default: 500; Maximum: 1000. (optional) - * @param symbolStatus (optional) + * @param limit If limit > 5000, only 5000 entries will be returned. (optional) + * @param symbolStatus Filters for symbols that have this `tradingStatus`. A status + * mismatch returns error `-1220 SYMBOL_DOES_NOT_MATCH_STATUS`. (optional) * @return ApiResponse<DepthResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -535,11 +545,12 @@ private okhttp3.Call depthValidateBeforeCall( * * * @see Order + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#depth">Order * book Documentation */ public ApiResponse depth( - @NotNull String symbol, Integer limit, SymbolStatus symbolStatus) throws ApiException { + @NotNull String symbol, @Max(5000) Integer limit, SymbolStatus symbolStatus) + throws ApiException { okhttp3.Call localVarCall = depthValidateBeforeCall(symbol, limit, symbolStatus); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -549,7 +560,7 @@ public ApiResponse depth( * Build call for getTrades * * @param symbol (required) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param limit (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -560,7 +571,7 @@ public ApiResponse depth( * * * @see Recent + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#get-trades">Recent * trades list Documentation */ private okhttp3.Call getTradesCall(String symbol, Integer limit) throws ApiException { @@ -657,10 +668,11 @@ private okhttp3.Call getTradesValidateBeforeCall(String symbol, Integer limit) } /** - * Recent trades list Get recent trades. Weight: 25 + * Recent trades list Get recent trades. Weight(IP): 25 Security Type: NONE Notes: **Data + * Source:** Memory * * @param symbol (required) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param limit (optional) * @return ApiResponse<GetTradesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -672,22 +684,173 @@ private okhttp3.Call getTradesValidateBeforeCall(String symbol, Integer limit) * * * @see Recent + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#get-trades">Recent * trades list Documentation */ - public ApiResponse getTrades(@NotNull String symbol, Integer limit) - throws ApiException { + public ApiResponse getTrades( + @NotNull String symbol, @Max(1000) Integer limit) throws ApiException { okhttp3.Call localVarCall = getTradesValidateBeforeCall(symbol, limit); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } + /** + * Build call for historicalBlockTrades + * + * @param symbol (required) + * @param fromId Block trade ID to fetch from (required) + * @param limit Default: 500; Maximum: 1000 (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Historical Block Trades -
+ * + * @see Historical + * Block Trades (MARKET_DATA) Documentation + */ + private okhttp3.Call historicalBlockTradesCall(String symbol, Long fromId, Long limit) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v3/historicalBlockTrades"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (symbol != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("symbol", symbol)); + } + + if (fromId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fromId", fromId)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceApiKeyOnly"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call historicalBlockTradesValidateBeforeCall( + String symbol, Long fromId, Long limit) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {symbol, fromId, limit}; + Method method = + this.getClass() + .getMethod( + "historicalBlockTrades", String.class, Long.class, Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return historicalBlockTradesCall(symbol, fromId, limit); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Historical Block Trades (MARKET_DATA) Get block trades. Weight(IP): 25 Security Type: + * MARKET_DATA Notes: - Data Source: Database + * + * @param symbol (required) + * @param fromId Block trade ID to fetch from (required) + * @param limit Default: 500; Maximum: 1000 (optional) + * @return ApiResponse<HistoricalBlockTradesResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Historical Block Trades -
+ * + * @see Historical + * Block Trades (MARKET_DATA) Documentation + */ + public ApiResponse historicalBlockTrades( + @NotNull String symbol, @NotNull Long fromId, @Max(1000L) Long limit) + throws ApiException { + okhttp3.Call localVarCall = historicalBlockTradesValidateBeforeCall(symbol, fromId, limit); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + /** * Build call for historicalTrades * * @param symbol (required) - * @param limit Default: 500; Maximum: 1000. (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) + * @param limit (optional) + * @param fromId TradeId to fetch from. Default gets most recent trades. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -698,7 +861,7 @@ public ApiResponse getTrades(@NotNull String symbol, Integer * * * @see Old + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#historical-trades">Old * trade lookup Documentation */ private okhttp3.Call historicalTradesCall(String symbol, Integer limit, Long fromId) @@ -802,11 +965,12 @@ private okhttp3.Call historicalTradesValidateBeforeCall( } /** - * Old trade lookup Get older trades. Weight: 25 + * Old trade lookup Get older trades. Weight(IP): 25 Security Type: NONE Notes: **Data Source:** + * Database * * @param symbol (required) - * @param limit Default: 500; Maximum: 1000. (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) + * @param limit (optional) + * @param fromId TradeId to fetch from. Default gets most recent trades. (optional) * @return ApiResponse<HistoricalTradesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -818,11 +982,11 @@ private okhttp3.Call historicalTradesValidateBeforeCall( * * * @see Old + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#historical-trades">Old * trade lookup Documentation */ public ApiResponse historicalTrades( - @NotNull String symbol, Integer limit, Long fromId) throws ApiException { + @NotNull String symbol, @Max(1000) Integer limit, Long fromId) throws ApiException { okhttp3.Call localVarCall = historicalTradesValidateBeforeCall(symbol, limit, fromId); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -834,10 +998,10 @@ public ApiResponse historicalTrades( * * @param symbol (required) * @param interval (required) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) + * @param startTime (optional) + * @param endTime (optional) * @param timeZone Default: 0 (UTC) (optional) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param limit (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -848,7 +1012,7 @@ public ApiResponse historicalTrades( * * * @see Kline/Candlestick + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#klines">Kline/Candlestick * data Documentation */ private okhttp3.Call klinesCall( @@ -984,14 +1148,26 @@ private okhttp3.Call klinesValidateBeforeCall( /** * Kline/Candlestick data Kline/candlestick bars for a symbol. Klines are uniquely identified by - * their open time. Weight: 2 + * their open time. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Database Supported + * kline intervals (case-sensitive): Interval | `interval` value --------- | + * ---------------- seconds | `1s` minutes | `1m`, `3m`, + * `5m`, `15m`, `30m` hours | `1h`, `2h`, + * `4h`, `6h`, `8h`, `12h` days | `1d`, + * `3d` weeks | `1w` months | `1M` **Notes:** * If + * `startTime` and `endTime` are not sent, the most recent klines are + * returned. * Supported values for `timeZone`: * Hours and minutes (e.g. + * `-1:00`, `05:45`) * Only hours (e.g. `0`, `8`, + * `4`) * Accepted range is strictly [-12:00 to +14:00] inclusive * If + * `timeZone` provided, kline intervals are interpreted in that timezone instead of + * UTC. * Note that `startTime` and `endTime` are always interpreted in UTC, + * regardless of `timeZone`. * * @param symbol (required) * @param interval (required) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) + * @param startTime (optional) + * @param endTime (optional) * @param timeZone Default: 0 (UTC) (optional) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param limit (optional) * @return ApiResponse<KlinesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1003,7 +1179,7 @@ private okhttp3.Call klinesValidateBeforeCall( * * * @see Kline/Candlestick + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#klines">Kline/Candlestick * data Documentation */ public ApiResponse klines( @@ -1012,7 +1188,7 @@ public ApiResponse klines( Long startTime, Long endTime, String timeZone, - Integer limit) + @Max(1000) Integer limit) throws ApiException { okhttp3.Call localVarCall = klinesValidateBeforeCall(symbol, interval, startTime, endTime, timeZone, limit); @@ -1030,11 +1206,11 @@ public ApiResponse klines( * * * - * + * *
Response Details
Status Code Description Response Headers
200 Query Reference Price -
200 Reference price -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#reference-price">Query * Reference Price Documentation */ private okhttp3.Call referencePriceCall(String symbol) throws ApiException { @@ -1126,7 +1302,8 @@ private okhttp3.Call referencePriceValidateBeforeCall(String symbol) throws ApiE } /** - * Query Reference Price Weight: 2 + * Query Reference Price Query the reference price for a symbol. Weight(IP): 2 Security Type: + * NONE Notes: **Data Source:** Memory * * @param symbol (required) * @return ApiResponse<ReferencePriceResponse> @@ -1136,11 +1313,11 @@ private okhttp3.Call referencePriceValidateBeforeCall(String symbol) throws ApiE * * * - * + * *
Response Details
Status Code Description Response Headers
200 Query Reference Price -
200 Reference price -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#reference-price">Query * Reference Price Documentation */ public ApiResponse referencePrice(@NotNull String symbol) @@ -1155,18 +1332,19 @@ public ApiResponse referencePrice(@NotNull String symbol * Build call for referencePriceCalculation * * @param symbol (required) - * @param symbolStatus (optional) + * @param symbolStatus Supported values: `TRADING`, `HALT`, + * `BREAK` (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details * * * - * + * *
Response Details
Status Code Description Response Headers
200 Query Reference Price Calculation -
200 Reference price calculation -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#reference-price-calculation">Query * Reference Price Calculation Documentation */ private okhttp3.Call referencePriceCalculationCall(String symbol, SymbolStatus symbolStatus) @@ -1269,10 +1447,11 @@ private okhttp3.Call referencePriceCalculationValidateBeforeCall( /** * Query Reference Price Calculation Describes how reference price is calculated for a given - * symbol. Weight: 2 + * symbol. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory * * @param symbol (required) - * @param symbolStatus (optional) + * @param symbolStatus Supported values: `TRADING`, `HALT`, + * `BREAK` (optional) * @return ApiResponse<ReferencePriceCalculationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1280,11 +1459,11 @@ private okhttp3.Call referencePriceCalculationValidateBeforeCall( * * * - * + * *
Response Details
Status Code Description Response Headers
200 Query Reference Price Calculation -
200 Reference price calculation -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#reference-price-calculation">Query * Reference Price Calculation Documentation */ public ApiResponse referencePriceCalculation( @@ -1299,10 +1478,14 @@ public ApiResponse referencePriceCalculation( /** * Build call for ticker * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param windowSize (optional) - * @param type (optional) + * @param symbol Either `symbol` or `symbols` must be provided (optional) + * @param symbols Either `symbol` or `symbols` must be provided Examples of + * accepted format for the `symbols` parameter: + * [\"BTCUSDT\",\"BNBUSDT\"] or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D The + * maximum number of symbols allowed in a request is 100. (optional) + * @param windowSize Units cannot be combined (e.g. `1d2h` is not allowed). (optional, + * default to 1d) + * @param type (optional, default to FULL) * @param symbolStatus (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1314,7 +1497,7 @@ public ApiResponse referencePriceCalculation( * * * @see Rolling + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker">Rolling * window price change statistics Documentation */ private okhttp3.Call tickerCall( @@ -1444,15 +1627,25 @@ private okhttp3.Call tickerValidateBeforeCall( } /** - * Rolling window price change statistics Weight: 4 for each requested - * <tt>symbol</tt> regardless of <tt>windowSize</tt>. - * <br/><br/> The weight for this request will cap at 200 once the number of - * `symbols` in the request is more than 50. + * Rolling window price change statistics **Note:** This endpoint differs from `GET + * /api/v3/ticker/24hr`. The statistical time range of this endpoint can be up to 59999ms + * longer than the requested `windowSize`. `openTime` starts at the + * beginning of a minute, while the end time is the current time. Therefore, the actual interval + * can be up to 59999ms longer than the requested window. For example, if `closeTime` + * is 1641287867099 (January 04, 2022 09:17:47:099 UTC) and `windowSize` is + * `1d`, then `openTime` is 1641201420000 (January 3, 2022, 09:17:00 UTC). + * Weight: 4 for each requested symbol regardless of windowSize. The weight for this request + * will cap at 200 once the number of `symbols` in the request is more than 50. + * Security Type: NONE Notes: **Data Source:** Database * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param windowSize (optional) - * @param type (optional) + * @param symbol Either `symbol` or `symbols` must be provided (optional) + * @param symbols Either `symbol` or `symbols` must be provided Examples of + * accepted format for the `symbols` parameter: + * [\"BTCUSDT\",\"BNBUSDT\"] or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D The + * maximum number of symbols allowed in a request is 100. (optional) + * @param windowSize Units cannot be combined (e.g. `1d2h` is not allowed). (optional, + * default to 1d) + * @param type (optional, default to FULL) * @param symbolStatus (optional) * @return ApiResponse<TickerResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1465,7 +1658,7 @@ private okhttp3.Call tickerValidateBeforeCall( * * * @see Rolling + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker">Rolling * window price change statistics Documentation */ public ApiResponse ticker( @@ -1484,9 +1677,12 @@ public ApiResponse ticker( /** * Build call for ticker24hr * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param type (optional) + * @param symbol Either `symbol` or `symbols` must be provided (optional) + * @param symbols Either `symbol` or `symbols` must be provided Examples of + * accepted format for the `symbols` parameter: + * [\"BTCUSDT\",\"BNBUSDT\"] or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D The + * maximum number of symbols allowed in a request is 100. (optional) + * @param type (optional, default to FULL) * @param symbolStatus (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1498,7 +1694,7 @@ public ApiResponse ticker( * * * @see 24hr + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker24hr">24hr * ticker price change statistics Documentation */ private okhttp3.Call ticker24hrCall( @@ -1626,11 +1822,15 @@ private okhttp3.Call ticker24hrValidateBeforeCall( * <td>2</td> </tr> <tr> <td>21-100</td> * <td>40</td> </tr> <tr> <td>101 or more</td> * <td>80</td> </tr> <tr> <td>symbols parameter is - * omitted</td> <td>80</td> </tr> </tbody> </table> + * omitted</td> <td>80</td> </tr> </tbody> </table> Security + * Type: NONE Notes: **Data Source:** Memory * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param type (optional) + * @param symbol Either `symbol` or `symbols` must be provided (optional) + * @param symbols Either `symbol` or `symbols` must be provided Examples of + * accepted format for the `symbols` parameter: + * [\"BTCUSDT\",\"BNBUSDT\"] or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D The + * maximum number of symbols allowed in a request is 100. (optional) + * @param type (optional, default to FULL) * @param symbolStatus (optional) * @return ApiResponse<Ticker24hrResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1643,7 +1843,7 @@ private okhttp3.Call ticker24hrValidateBeforeCall( * * * @see 24hr + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker24hr">24hr * ticker price change statistics Documentation */ public ApiResponse ticker24hr( @@ -1659,9 +1859,18 @@ public ApiResponse ticker24hr( /** * Build call for tickerBookTicker * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param symbolStatus (optional) + * @param symbol Parameter symbol and symbols cannot be used in combination. If neither + * parameter is sent, `bookTickers` for all symbols will be returned in an array. + * (optional) + * @param symbols Parameter symbol and symbols cannot be used in combination. If neither + * parameter is sent, `bookTickers` for all symbols will be returned in an array. + * Examples of accepted format for the symbols parameter: + * [\"BTCUSDT\",\"BNBUSDT\"] or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D + * (optional) + * @param symbolStatus Filters for symbols that have this `tradingStatus`. For a + * single symbol, a status mismatch returns error `-1220 + * SYMBOL_DOES_NOT_MATCH_STATUS`. For multiple or all symbols, non-matching ones are + * simply excluded from the response. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1672,7 +1881,7 @@ public ApiResponse ticker24hr( * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker-book-ticker">Symbol * order book ticker Documentation */ private okhttp3.Call tickerBookTickerCall( @@ -1783,16 +1992,21 @@ private okhttp3.Call tickerBookTickerValidateBeforeCall( /** * Symbol order book ticker Best price/qty on the order book for a symbol or symbols. Weight: - * <table> <thead> <tr> <th>Parameter</th> <th>Symbols - * Provided</th> <th>Weight</th> </tr> </thead> <tbody> - * <tr> <td rowspan=\"2\">symbol</td> <td>1</td> - * <td>2</td> </tr> <tr> <td>symbol parameter is - * omitted</td> <td>4</td> </tr> <tr> <td>symbols</td> - * <td>Any</td> <td>4</td> </tr> </tbody> </table> + * |Parameter|Symbols Provided|Weight| |---|---|---| |symbol| 1 |2| | |omitted| 4| |symbols| Any + * |4| Security Type: NONE Notes: **Data Source:** Memory * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param symbolStatus (optional) + * @param symbol Parameter symbol and symbols cannot be used in combination. If neither + * parameter is sent, `bookTickers` for all symbols will be returned in an array. + * (optional) + * @param symbols Parameter symbol and symbols cannot be used in combination. If neither + * parameter is sent, `bookTickers` for all symbols will be returned in an array. + * Examples of accepted format for the symbols parameter: + * [\"BTCUSDT\",\"BNBUSDT\"] or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D + * (optional) + * @param symbolStatus Filters for symbols that have this `tradingStatus`. For a + * single symbol, a status mismatch returns error `-1220 + * SYMBOL_DOES_NOT_MATCH_STATUS`. For multiple or all symbols, non-matching ones are + * simply excluded from the response. (optional) * @return ApiResponse<TickerBookTickerResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1804,7 +2018,7 @@ private okhttp3.Call tickerBookTickerValidateBeforeCall( * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker-book-ticker">Symbol * order book ticker Documentation */ public ApiResponse tickerBookTicker( @@ -1819,9 +2033,16 @@ public ApiResponse tickerBookTicker( /** * Build call for tickerPrice * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param symbolStatus (optional) + * @param symbol Parameter symbol and symbols cannot be used in combination. If neither + * parameter is sent, prices for all symbols will be returned in an array. (optional) + * @param symbols Parameter symbol and symbols cannot be used in combination. If neither + * parameter is sent, prices for all symbols will be returned in an array. Examples of + * accepted format for the symbols parameter: [\"BTCUSDT\",\"BNBUSDT\"] + * or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D (optional) + * @param symbolStatus Filters for symbols that have this `tradingStatus`. For a + * single symbol, a status mismatch returns error `-1220 + * SYMBOL_DOES_NOT_MATCH_STATUS`. For multiple or all symbols, non-matching ones are + * simply excluded from the response. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1832,7 +2053,7 @@ public ApiResponse tickerBookTicker( * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker-price">Symbol * price ticker Documentation */ private okhttp3.Call tickerPriceCall(String symbol, Symbols symbols, SymbolStatus symbolStatus) @@ -1939,17 +2160,20 @@ private okhttp3.Call tickerPriceValidateBeforeCall( } /** - * Symbol price ticker Latest price for a symbol or symbols. Weight: <table> <thead> - * <tr> <th>Parameter</th> <th>Symbols Provided</th> - * <th>Weight</th> </tr> </thead> <tbody> <tr> <td - * rowspan=\"2\">symbol</td> <td>1</td> - * <td>2</td> </tr> <tr> <td>symbol parameter is - * omitted</td> <td>4</td> </tr> <tr> <td>symbols</td> - * <td>Any</td> <td>4</td> </tr> </tbody> </table> + * Symbol price ticker Latest price for a symbol or symbols. Weight: |Parameter|Symbols + * Provided|Weight| |---|---|---| |symbol| 1 |2| | |omitted| 4| |symbols| Any |4| Security Type: + * NONE Notes: **Data Source:** Memory * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param symbolStatus (optional) + * @param symbol Parameter symbol and symbols cannot be used in combination. If neither + * parameter is sent, prices for all symbols will be returned in an array. (optional) + * @param symbols Parameter symbol and symbols cannot be used in combination. If neither + * parameter is sent, prices for all symbols will be returned in an array. Examples of + * accepted format for the symbols parameter: [\"BTCUSDT\",\"BNBUSDT\"] + * or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D (optional) + * @param symbolStatus Filters for symbols that have this `tradingStatus`. For a + * single symbol, a status mismatch returns error `-1220 + * SYMBOL_DOES_NOT_MATCH_STATUS`. For multiple or all symbols, non-matching ones are + * simply excluded from the response. (optional) * @return ApiResponse<TickerPriceResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1961,7 +2185,7 @@ private okhttp3.Call tickerPriceValidateBeforeCall( * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker-price">Symbol * price ticker Documentation */ public ApiResponse tickerPrice( @@ -1975,11 +2199,17 @@ public ApiResponse tickerPrice( /** * Build call for tickerTradingDay * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) + * @param symbol Either `symbol` or `symbols` must be provided. (optional) + * @param symbols Either `symbol` or `symbols` must be provided. Examples of + * accepted format for the `symbols` parameter: + * [\"BTCUSDT\",\"BNBUSDT\"] or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D. The + * maximum number of `symbols` allowed in a request is 100. (optional) * @param timeZone Default: 0 (UTC) (optional) - * @param type (optional) - * @param symbolStatus (optional) + * @param type (optional, default to FULL) + * @param symbolStatus Filters for symbols that have this `tradingStatus`. For a + * single symbol, a status mismatch returns error `-1220 + * SYMBOL_DOES_NOT_MATCH_STATUS`. For multiple symbols, non-matching ones are simply + * excluded from the response. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1990,7 +2220,7 @@ public ApiResponse tickerPrice( * * * @see Trading + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker-trading-day">Trading * Day Ticker Documentation */ private okhttp3.Call tickerTradingDayCall( @@ -2121,14 +2351,22 @@ private okhttp3.Call tickerTradingDayValidateBeforeCall( /** * Trading Day Ticker Price change statistics for a trading day. Weight: 4 for each requested - * <tt>symbol</tt>. <br/><br/> The weight for this request will cap at - * 200 once the number of `symbols` in the request is more than 50. + * symbol. The weight for this request will cap at 200 once the number of symbols in the request + * is more than 50. Security Type: NONE Notes: **Data Source:** Database **Notes:**: - Supported + * values for `timeZone`: - Hours and minutes (e.g. `-1:00`, + * `05:45`) - Only hours (e.g. `0`, `8`, `4`) * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) + * @param symbol Either `symbol` or `symbols` must be provided. (optional) + * @param symbols Either `symbol` or `symbols` must be provided. Examples of + * accepted format for the `symbols` parameter: + * [\"BTCUSDT\",\"BNBUSDT\"] or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D. The + * maximum number of `symbols` allowed in a request is 100. (optional) * @param timeZone Default: 0 (UTC) (optional) - * @param type (optional) - * @param symbolStatus (optional) + * @param type (optional, default to FULL) + * @param symbolStatus Filters for symbols that have this `tradingStatus`. For a + * single symbol, a status mismatch returns error `-1220 + * SYMBOL_DOES_NOT_MATCH_STATUS`. For multiple symbols, non-matching ones are simply + * excluded from the response. (optional) * @return ApiResponse<TickerTradingDayResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2140,7 +2378,7 @@ private okhttp3.Call tickerTradingDayValidateBeforeCall( * * * @see Trading + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker-trading-day">Trading * Day Ticker Documentation */ public ApiResponse tickerTradingDay( @@ -2162,10 +2400,10 @@ public ApiResponse tickerTradingDay( * * @param symbol (required) * @param interval (required) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) + * @param startTime (optional) + * @param endTime (optional) * @param timeZone Default: 0 (UTC) (optional) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param limit (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2176,7 +2414,7 @@ public ApiResponse tickerTradingDay( * * * @see UIKlines + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ui-klines">UIKlines * Documentation */ private okhttp3.Call uiKlinesCall( @@ -2313,14 +2551,21 @@ private okhttp3.Call uiKlinesValidateBeforeCall( /** * UIKlines The request is similar to klines having the same parameters and response. * `uiKlines` return modified kline data, optimized for presentation of candlestick - * charts. Weight: 2 + * charts. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Database - If + * `startTime` and `endTime` are not sent, the most recent klines are + * returned. - Supported values for `timeZone`: - Hours and minutes (e.g. + * `-1:00`, `05:45`) - Only hours (e.g. `0`, `8`, + * `4`) - Accepted range is strictly [-12:00 to +14:00] inclusive - If + * `timeZone` provided, kline intervals are interpreted in that timezone instead of + * UTC. - Note that `startTime` and `endTime` are always interpreted in UTC, + * regardless of `timeZone`. * * @param symbol (required) * @param interval (required) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) + * @param startTime (optional) + * @param endTime (optional) * @param timeZone Default: 0 (UTC) (optional) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param limit (optional) * @return ApiResponse<UiKlinesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2332,7 +2577,7 @@ private okhttp3.Call uiKlinesValidateBeforeCall( * * * @see UIKlines + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ui-klines">UIKlines * Documentation */ public ApiResponse uiKlines( @@ -2341,7 +2586,7 @@ public ApiResponse uiKlines( Long startTime, Long endTime, String timeZone, - Integer limit) + @Max(1000) Integer limit) throws ApiException { okhttp3.Call localVarCall = uiKlinesValidateBeforeCall(symbol, interval, startTime, endTime, timeZone, limit); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/SpotRestApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/SpotRestApi.java index 3b0b1ebc9..5ae4e6418 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/SpotRestApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/SpotRestApi.java @@ -22,6 +22,7 @@ import com.binance.connector.client.spot.rest.model.GetOrderListResponse; import com.binance.connector.client.spot.rest.model.GetOrderResponse; import com.binance.connector.client.spot.rest.model.GetTradesResponse; +import com.binance.connector.client.spot.rest.model.HistoricalBlockTradesResponse; import com.binance.connector.client.spot.rest.model.HistoricalTradesResponse; import com.binance.connector.client.spot.rest.model.Interval; import com.binance.connector.client.spot.rest.model.KlinesResponse; @@ -90,7 +91,8 @@ public SpotRestApi(ApiClient apiClient) { } /** - * Query Commission Rates Get current account commission rates. Weight: 20 + * Query Commission Rates (USER_DATA) Get current account commission rates. Weight(IP): 20 + * Security Type: USER_DATA Notes: **Data Source:** Database * * @param symbol (required) * @return ApiResponse<AccountCommissionResponse> @@ -104,8 +106,8 @@ public SpotRestApi(ApiClient apiClient) { * * * @see Query - * Commission Rates Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#account-commission">Query + * Commission Rates (USER_DATA) Documentation */ public ApiResponse accountCommission(String symbol) throws ApiException { @@ -113,17 +115,17 @@ public ApiResponse accountCommission(String symbol) } /** - * Query all Order lists Retrieves all order lists based on provided optional parameters. Note - * that the time between `startTime` and `endTime` can't be longer than - * 24 hours. Weight: 20 - * - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) - * @param limit Default: 500; Maximum: 1000. (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * Query all Order lists (USER_DATA) Retrieves all order lists based on provided optional + * parameters. Note that the time between `startTime` and `endTime` + * can't be longer than 24 hours. Weight(IP): 20 Security Type: USER_DATA Notes: **Data + * Source:** Database + * + * @param fromId If supplied, neither startTime or endTime can be provided (optional) + * @param startTime (optional) + * @param endTime (optional) + * @param limit (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<AllOrderListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -135,8 +137,8 @@ public ApiResponse accountCommission(String symbol) * * * @see Query - * all Order lists Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#all-order-list">Query + * all Order lists (USER_DATA) Documentation */ public ApiResponse allOrderList( Long fromId, Long startTime, Long endTime, Integer limit, Double recvWindow) @@ -145,13 +147,19 @@ public ApiResponse allOrderList( } /** - * All orders Get all account orders; active, canceled, or filled. Weight: 20 + * All orders (USER_DATA) Get all account orders; active, canceled, or filled. Weight(IP): 20 + * Security Type: USER_DATA Notes: **Data Source:** Database - If `orderId` is set, it + * will get orders >= that `orderId`. Otherwise most recent orders are + * returned. - For some historical orders `cummulativeQuoteQty` will be < 0, + * meaning the data is not available at this time. - If `startTime` and/or + * `endTime` provided, `orderId` is not required. - The time between + * `startTime` and `endTime` can't be longer than 24 hours. * * @param symbol (required) * @param orderId (optional) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param startTime (optional) + * @param endTime (optional) + * @param limit (optional) * @param recvWindow The value cannot be greater than `60000`. <br> Supports up * to three decimal places of precision (e.g., 6000.346) so that microseconds may be * specified. (optional) @@ -166,8 +174,8 @@ public ApiResponse allOrderList( * * * @see All - * orders Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#all-orders">All + * orders (USER_DATA) Documentation */ public ApiResponse allOrders( String symbol, @@ -181,13 +189,13 @@ public ApiResponse allOrders( } /** - * Account information Get current account information. Weight: 20 + * Account information (USER_DATA) Get current account information. Weight(IP): 20 Security + * Type: USER_DATA Notes: **Data Source:** Memory => Database * * @param omitZeroBalances When set to `true`, emits only the non-zero balances of an - * account. <br>Default value: `false` (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * account. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<GetAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -199,8 +207,8 @@ public ApiResponse allOrders( * * * @see Account - * information Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-account">Account + * information (USER_DATA) Documentation */ public ApiResponse getAccount(Boolean omitZeroBalances, Double recvWindow) throws ApiException { @@ -208,13 +216,14 @@ public ApiResponse getAccount(Boolean omitZeroBalances, Doub } /** - * Current open orders Get all open orders on a symbol. **Careful** when accessing this with no - * symbol. Weight: 6 for a single symbol; **80** when the symbol parameter is omitted - * - * @param symbol Symbol to query (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * Current open orders (USER_DATA) Get all open orders on a symbol. **Careful** when accessing + * this with no symbol. Weight: 6 for a single symbol; 80 when the symbol parameter is omitted + * Security Type: USER_DATA Notes: **Data Source:** Memory => Database - If the symbol + * is not sent, orders for all symbols will be returned in an array. + * + * @param symbol (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<GetOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -226,8 +235,8 @@ public ApiResponse getAccount(Boolean omitZeroBalances, Doub * * * @see Current - * open orders Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-open-orders">Current + * open orders (USER_DATA) Documentation */ public ApiResponse getOpenOrders(String symbol, Double recvWindow) throws ApiException { @@ -235,14 +244,20 @@ public ApiResponse getOpenOrders(String symbol, Double re } /** - * Query order Check an order's status. Weight: 4 + * Query order (USER_DATA) Check an order's status. Weight(IP): 4 Security Type: USER_DATA + * Notes: **Data Source:** Memory => Database - Either `orderId` or + * `origClientOrderId` must be sent. - If both `orderId` and + * `origClientOrderId` are provided, the `orderId` is searched first, then + * the `origClientOrderId` from that result is checked against that order. If both + * conditions are not met the request will be rejected. - For some historical orders + * `cummulativeQuoteQty` will be < 0, meaning the data is not available at this + * time. * * @param symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<GetOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -254,8 +269,8 @@ public ApiResponse getOpenOrders(String symbol, Double re * * * @see Query - * order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-order">Query + * order (USER_DATA) Documentation */ public ApiResponse getOrder( String symbol, Long orderId, String origClientOrderId, Double recvWindow) @@ -264,15 +279,15 @@ public ApiResponse getOrder( } /** - * Query Order list Retrieves a specific order list based on provided optional parameters. - * Weight: 4 - * - * @param orderListId Either `orderListId` or `listClientOrderId` must be - * provided (optional) - * @param origClientOrderId (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * Query Order list (USER_DATA) Retrieves a specific order list based on provided optional + * parameters. Weight(IP): 4 Security Type: USER_DATA Notes: **Data Source:** Database + * + * @param orderListId Query order list by `orderListId`. `orderListId` or + * `origClientOrderId` must be provided. (optional) + * @param origClientOrderId Query order list by `listClientOrderId`. + * `orderListId` or `origClientOrderId` must be provided. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<GetOrderListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -284,8 +299,8 @@ public ApiResponse getOrder( * * * @see Query - * Order list Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-order-list">Query + * Order list (USER_DATA) Documentation */ public ApiResponse getOrderList( Long orderListId, String origClientOrderId, Double recvWindow) throws ApiException { @@ -293,17 +308,27 @@ public ApiResponse getOrderList( } /** - * Query Allocations Retrieves allocations resulting from SOR order placement. Weight: 20 + * Query Allocations (USER_DATA) Retrieves allocations resulting from SOR order placement. + * Weight(IP): 20 Security Type: USER_DATA Notes: **Data Source:** Database\" Supported + * parameter combinations: Parameters | Response | ------------------------------------------- | + * -------- | `symbol` | allocations from oldest to newest | `symbol` + + * `startTime` | oldest allocations since `startTime` | `symbol` + + * `endTime` | newest allocations until `endTime` | `symbol` + + * `startTime` + `endTime` | allocations within the time range | + * `symbol` + `fromAllocationId` | allocations by allocation ID | + * `symbol` + `orderId` | allocations related to an order starting with + * oldest | `symbol` + `orderId` + `fromAllocationId` | + * allocations related to an order by allocation ID | **Note:** The time between + * `startTime` and `endTime` can't be longer than 24 hours. * * @param symbol (required) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) + * @param startTime (optional) + * @param endTime (optional) * @param fromAllocationId (optional) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param limit (optional) * @param orderId (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<MyAllocationsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -315,8 +340,8 @@ public ApiResponse getOrderList( * * * @see Query - * Allocations Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#my-allocations">Query + * Allocations (USER_DATA) Documentation */ public ApiResponse myAllocations( String symbol, @@ -332,14 +357,13 @@ public ApiResponse myAllocations( } /** - * Query relevant filters Retrieves the list of [filters](filters.md) relevant to an account on - * a given symbol. This is the only endpoint that shows if an account has `MAX_ASSET` - * filters applied to it. Weight: 40 + * Query relevant filters (USER_DATA) Retrieves the list of filters relevant to an account on a + * given symbol. This is the only endpoint that shows if an account has `MAX_ASSET` + * filters applied to it. Weight(IP): 40 Security Type: USER_DATA Notes: **Data Source:** Memory * * @param symbol (required) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<MyFiltersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -351,8 +375,8 @@ public ApiResponse myAllocations( * * * @see Query - * relevant filters Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#my-filters">Query + * relevant filters (USER_DATA) Documentation */ public ApiResponse myFilters(String symbol, Double recvWindow) throws ApiException { @@ -360,22 +384,22 @@ public ApiResponse myFilters(String symbol, Double recvWindow } /** - * Query Prevented Matches Displays the list of orders that were expired due to STP. These are - * the combinations supported: * `symbol` + `preventedMatchId` * - * `symbol` + `orderId` * `symbol` + `orderId` + - * `fromPreventedMatchId` (`limit` will default to 500) * `symbol` + * Query Prevented Matches (USER_DATA) Displays the list of orders that were expired due to STP. + * These are the combinations supported: - `symbol` + `preventedMatchId` - + * `symbol` + `orderId` - `symbol` + `orderId` + + * `fromPreventedMatchId` (`limit` will default to 500) - `symbol` * + `orderId` + `fromPreventedMatchId` + `limit` Weight: Case | * Weight ---- | ----- If `symbol` is invalid | 2 Querying by - * `preventedMatchId` | 2 Querying by `orderId` | 20 + * `preventedMatchId` | 2 Querying by `orderId` | 20 Security Type: + * USER_DATA Notes: **Data Source:** Database * * @param symbol (required) * @param preventedMatchId (optional) * @param orderId (optional) * @param fromPreventedMatchId (optional) - * @param limit Default: 500; Maximum: 1000. (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param limit (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<MyPreventedMatchesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -387,8 +411,8 @@ public ApiResponse myFilters(String symbol, Double recvWindow * * * @see Query - * Prevented Matches Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#my-prevented-matches">Query + * Prevented Matches (USER_DATA) Documentation */ public ApiResponse myPreventedMatches( String symbol, @@ -403,18 +427,25 @@ public ApiResponse myPreventedMatches( } /** - * Account trade list Get trades for a specific account and symbol. Weight: Condition| Weight| - * ---| --- |Without orderId|20| |With orderId|5| + * Account trade list (USER_DATA) Get trades for a specific account and symbol. Weight: + * Condition| Weight| ---| --- |Without orderId|20| |With orderId|5| Security Type: USER_DATA + * Notes: **Data Source:** Memory => Database **Notes:**: - If `fromId` is + * set, it will get trades >= that `fromId`. Otherwise most recent trades are + * returned. - The time between `startTime` and `endTime` can't be + * longer than 24 hours. - These are the supported combinations of all parameters: - + * `symbol` - `symbol` + `orderId` - `symbol` + + * `startTime` - `symbol` + `endTime` - `symbol` + + * `fromId` - `symbol` + `startTime` + `endTime` - + * `symbol`+ `orderId` + `fromId` * * @param symbol (required) - * @param orderId (optional) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) - * @param limit Default: 500; Maximum: 1000. (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param orderId This can only be used in combination with `symbol`. (optional) + * @param startTime (optional) + * @param endTime (optional) + * @param fromId TradeId to fetch from. Default gets most recent trades. (optional) + * @param limit (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<MyTradesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -426,8 +457,8 @@ public ApiResponse myPreventedMatches( * * * @see Account - * trade list Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#my-trades">Account + * trade list (USER_DATA) Documentation */ public ApiResponse myTrades( String symbol, @@ -442,11 +473,11 @@ public ApiResponse myTrades( } /** - * Query Open Order lists Weight: 6 + * Query Open Order lists (USER_DATA) Query Open Order lists Weight(IP): 6 Security Type: + * USER_DATA Notes: **Data Source:** Memory -> Database * - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<OpenOrderListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -458,23 +489,23 @@ public ApiResponse myTrades( * * * @see Query - * Open Order lists Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#open-order-list">Query + * Open Order lists (USER_DATA) Documentation */ public ApiResponse openOrderList(Double recvWindow) throws ApiException { return accountApi.openOrderList(recvWindow); } /** - * Query Order Amendments Queries all amendments of a single order. Weight: 4 + * Query Order Amendments (USER_DATA) Queries all amendments of a single order. Weight(IP): 4 + * Security Type: USER_DATA Notes: **Data Source:** Database * * @param symbol (required) * @param orderId (required) * @param fromExecutionId (optional) - * @param limit Default:500; Maximum: 1000 (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param limit (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<OrderAmendmentsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -486,8 +517,8 @@ public ApiResponse openOrderList(Double recvWindow) throw * * * @see Query - * Order Amendments Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#order-amendments">Query + * Order Amendments (USER_DATA) Documentation */ public ApiResponse orderAmendments( String symbol, Long orderId, Long fromExecutionId, Long limit, Double recvWindow) @@ -496,12 +527,11 @@ public ApiResponse orderAmendments( } /** - * Query Unfilled Order Count Displays the user's unfilled order count for all intervals. - * Weight: 40 + * Query Unfilled Order Count (USER_DATA) Displays the user's unfilled order count for all + * intervals. Weight(IP): 40 Security Type: USER_DATA Notes: **Data Source:** Memory * - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<RateLimitOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -513,8 +543,8 @@ public ApiResponse orderAmendments( * * * @see Query - * Unfilled Order Count Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#rate-limit-order">Query + * Unfilled Order Count (USER_DATA) Documentation */ public ApiResponse rateLimitOrder(Double recvWindow) throws ApiException { @@ -522,14 +552,45 @@ public ApiResponse rateLimitOrder(Double recvWindow) } /** - * Exchange information Current exchange trading rules and symbol information Weight: 20 - * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param permissions List of permissions to query (optional) + * Exchange information Current exchange trading rules and symbol information Weight(IP): 20 + * Security Type: NONE Notes: **Data Source:** Memory **Notes:** * If the value provided to + * `symbol` or `symbols` do not exist, the endpoint will throw an error + * saying the symbol is invalid. * All parameters are optional. * `permissions` can + * support single or multiple values (e.g. `SPOT`, + * `[\"MARGIN\",\"LEVERAGED\"]`). This cannot be used in + * combination with `symbol` or `symbols`. * If `permissions` + * parameter not provided, all symbols that have either `SPOT`, `MARGIN`, or + * `LEVERAGED` permission will be exposed. * To display symbols with any permission + * you need to specify them explicitly in `permissions`: (e.g. + * `[\"SPOT\",\"MARGIN\",...]`.). See Account and Symbol + * Permissions for the full list. **Examples of Symbol Permissions Interpretation from the + * Response:** * `[[\"A\",\"B\"]]` means you may place an order if + * your account has either permission \"A\" **or** permission \"B\". * + * `[[\"A\"],[\"B\"]]` means you can place an order if your + * account has permission \"A\" **and** permission \"B\". * + * `[[\"A\"],[\"B\",\"C\"]]` means you can place an + * order if your account has permission \"A\" **and** permission \"B\" or + * permission \"C\". (Inclusive or is applied here, not exclusive or, so your account + * may have both permission \"B\" and permission \"C\".) + * + * @param symbol Example: curl -X GET + * \"https://api.binance.com/api/v3/exchangeInfo?symbol=BNBBTC\" (optional) + * @param symbols Examples: curl -X GET + * \"https://api.binance.com/api/v3/exchangeInfo?symbols=%5B%22BNBBTC%22,%22BTCUSDT%22%5D\" + * or curl -g -X GET + * 'https://api.binance.com/api/v3/exchangeInfo?symbols=[\"BTCUSDT\",\"BNBBTC\"]' + * (optional) + * @param permissions Examples: curl -X GET + * \"https://api.binance.com/api/v3/exchangeInfo?permissions=SPOT\" curl -X + * GET + * \"https://api.binance.com/api/v3/exchangeInfo?permissions=%5B%22MARGIN%22%2C%22LEVERAGED%22%5D\" + * or curl -g -X GET + * 'https://api.binance.com/api/v3/exchangeInfo?permissions=[\"MARGIN\",\"LEVERAGED\"]' + * (optional) * @param showPermissionSets Controls whether the content of the `permissionSets` - * field is populated or not. Defaults to `true` (optional) - * @param symbolStatus (optional) + * field is populated or not. (optional) + * @param symbolStatus Filters for symbols that have this `tradingStatus`. Cannot be + * used in combination with `symbols` or `symbol`. (optional) * @return ApiResponse<ExchangeInfoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -541,7 +602,7 @@ public ApiResponse rateLimitOrder(Double recvWindow) * * * @see Exchange + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#exchange-info">Exchange * information Documentation */ public ApiResponse exchangeInfo( @@ -556,13 +617,14 @@ public ApiResponse exchangeInfo( } /** - * Query Execution Rules Weight: Parameter | Weight| --- | --- `symbol` | 2 - * `symbols` | 2 for each `symbol`, capped at a max of 40| - * `symbolStatus` |40| None |40| - * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param symbolStatus (optional) + * Query Execution Rules Query execution rules for symbols. Weight: Parameter | Weight --- | --- + * `symbol` | 2 `symbols` | 2 for each `symbol`, capped at a max + * of 40 `symbolStatus` | 40 None | 40 Security Type: NONE Notes: **Data Source:** + * Memory **Note:**: No combination of multiple parameters is allowed. + * + * @param symbol Query for specified symbol. (optional) + * @param symbols Query for multiple symbols. (optional) + * @param symbolStatus Query for all symbols with the specified status. (optional) * @return ApiResponse<ExecutionRulesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -570,11 +632,11 @@ public ApiResponse exchangeInfo( * * * - * + * *
Response Details
Status Code Description Response Headers
200 Query Execution Rules -
200 Query execution rules -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#execution-rules">Query * Execution Rules Documentation */ public ApiResponse executionRules( @@ -583,7 +645,7 @@ public ApiResponse executionRules( } /** - * Test connectivity Test connectivity to the Rest API. Weight: 1 + * Test connectivity Test connectivity to the Rest API. Weight(IP): 1 Security Type: NONE * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -596,7 +658,7 @@ public ApiResponse executionRules( * * * @see Test + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#ping">Test * connectivity Documentation */ public void ping() throws ApiException { @@ -604,8 +666,8 @@ public void ping() throws ApiException { } /** - * Check server time Test connectivity to the Rest API and get the current server time. Weight: - * 1 + * Check server time Test connectivity to the Rest API and get the current server time. + * Weight(IP): 1 Security Type: NONE * * @return ApiResponse<TimeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -618,7 +680,7 @@ public void ping() throws ApiException { * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#time">Check * server time Documentation */ public ApiResponse time() throws ApiException { @@ -628,13 +690,14 @@ public ApiResponse time() throws ApiException { /** * Compressed/Aggregate trades list Get compressed, aggregate trades. Trades that fill at the * time, from the same taker order, with the same price will have the quantity aggregated. - * Weight: 4 + * Weight(IP): 4 Security Type: NONE Notes: **Data Source:** Database - If fromId, startTime, + * and endTime are not sent, the most recent aggregate trades will be returned. * * @param symbol (required) * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param limit (optional) * @return ApiResponse<AggTradesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -646,7 +709,7 @@ public ApiResponse time() throws ApiException { * * * @see Compressed/Aggregate + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#agg-trades">Compressed/Aggregate * trades list Documentation */ public ApiResponse aggTrades( @@ -656,7 +719,8 @@ public ApiResponse aggTrades( } /** - * Current average price Current average price for a symbol. Weight: 2 + * Current average price Current average price for a symbol. Weight(IP): 2 Security Type: NONE + * Notes: **Data Source:** Memory * * @param symbol (required) * @return ApiResponse<AvgPriceResponse> @@ -670,7 +734,7 @@ public ApiResponse aggTrades( * * * @see Current + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#avg-price">Current * average price Documentation */ public ApiResponse avgPrice(String symbol) throws ApiException { @@ -678,12 +742,14 @@ public ApiResponse avgPrice(String symbol) throws ApiException } /** - * Order book Weight: Adjusted based on the limit: |Limit|Request Weight ------|------- 1-100| 5 - * 101-500| 25 501-1000| 50 1001-5000| 250 + * Order book Order book Weight: Adjusted based on the limit: |Limit|Request Weight + * ------|------- 1-100| 5 101-500| 25 501-1000| 50 1001-5000| 250 Security Type: NONE Notes: + * **Data Source:** Memory * * @param symbol (required) - * @param limit Default: 500; Maximum: 1000. (optional) - * @param symbolStatus (optional) + * @param limit If limit > 5000, only 5000 entries will be returned. (optional) + * @param symbolStatus Filters for symbols that have this `tradingStatus`. A status + * mismatch returns error `-1220 SYMBOL_DOES_NOT_MATCH_STATUS`. (optional) * @return ApiResponse<DepthResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -695,7 +761,7 @@ public ApiResponse avgPrice(String symbol) throws ApiException * * * @see Order + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#depth">Order * book Documentation */ public ApiResponse depth(String symbol, Integer limit, SymbolStatus symbolStatus) @@ -704,10 +770,11 @@ public ApiResponse depth(String symbol, Integer limit, SymbolStat } /** - * Recent trades list Get recent trades. Weight: 25 + * Recent trades list Get recent trades. Weight(IP): 25 Security Type: NONE Notes: **Data + * Source:** Memory * * @param symbol (required) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param limit (optional) * @return ApiResponse<GetTradesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -719,7 +786,7 @@ public ApiResponse depth(String symbol, Integer limit, SymbolStat * * * @see Recent + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#get-trades">Recent * trades list Documentation */ public ApiResponse getTrades(String symbol, Integer limit) @@ -728,11 +795,38 @@ public ApiResponse getTrades(String symbol, Integer limit) } /** - * Old trade lookup Get older trades. Weight: 25 + * Historical Block Trades (MARKET_DATA) Get block trades. Weight(IP): 25 Security Type: + * MARKET_DATA Notes: - Data Source: Database * * @param symbol (required) - * @param limit Default: 500; Maximum: 1000. (optional) - * @param fromId ID to get aggregate trades from INCLUSIVE. (optional) + * @param fromId Block trade ID to fetch from (required) + * @param limit Default: 500; Maximum: 1000 (optional) + * @return ApiResponse<HistoricalBlockTradesResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Historical Block Trades -
+ * + * @see Historical + * Block Trades (MARKET_DATA) Documentation + */ + public ApiResponse historicalBlockTrades( + String symbol, Long fromId, Long limit) throws ApiException { + return marketApi.historicalBlockTrades(symbol, fromId, limit); + } + + /** + * Old trade lookup Get older trades. Weight(IP): 25 Security Type: NONE Notes: **Data Source:** + * Database + * + * @param symbol (required) + * @param limit (optional) + * @param fromId TradeId to fetch from. Default gets most recent trades. (optional) * @return ApiResponse<HistoricalTradesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -744,7 +838,7 @@ public ApiResponse getTrades(String symbol, Integer limit) * * * @see Old + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#historical-trades">Old * trade lookup Documentation */ public ApiResponse historicalTrades( @@ -754,14 +848,26 @@ public ApiResponse historicalTrades( /** * Kline/Candlestick data Kline/candlestick bars for a symbol. Klines are uniquely identified by - * their open time. Weight: 2 + * their open time. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Database Supported + * kline intervals (case-sensitive): Interval | `interval` value --------- | + * ---------------- seconds | `1s` minutes | `1m`, `3m`, + * `5m`, `15m`, `30m` hours | `1h`, `2h`, + * `4h`, `6h`, `8h`, `12h` days | `1d`, + * `3d` weeks | `1w` months | `1M` **Notes:** * If + * `startTime` and `endTime` are not sent, the most recent klines are + * returned. * Supported values for `timeZone`: * Hours and minutes (e.g. + * `-1:00`, `05:45`) * Only hours (e.g. `0`, `8`, + * `4`) * Accepted range is strictly [-12:00 to +14:00] inclusive * If + * `timeZone` provided, kline intervals are interpreted in that timezone instead of + * UTC. * Note that `startTime` and `endTime` are always interpreted in UTC, + * regardless of `timeZone`. * * @param symbol (required) * @param interval (required) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) + * @param startTime (optional) + * @param endTime (optional) * @param timeZone Default: 0 (UTC) (optional) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param limit (optional) * @return ApiResponse<KlinesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -773,7 +879,7 @@ public ApiResponse historicalTrades( * * * @see Kline/Candlestick + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#klines">Kline/Candlestick * data Documentation */ public ApiResponse klines( @@ -788,7 +894,8 @@ public ApiResponse klines( } /** - * Query Reference Price Weight: 2 + * Query Reference Price Query the reference price for a symbol. Weight(IP): 2 Security Type: + * NONE Notes: **Data Source:** Memory * * @param symbol (required) * @return ApiResponse<ReferencePriceResponse> @@ -798,11 +905,11 @@ public ApiResponse klines( * * * - * + * *
Response Details
Status Code Description Response Headers
200 Query Reference Price -
200 Reference price -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#reference-price">Query * Reference Price Documentation */ public ApiResponse referencePrice(String symbol) throws ApiException { @@ -811,10 +918,11 @@ public ApiResponse referencePrice(String symbol) throws /** * Query Reference Price Calculation Describes how reference price is calculated for a given - * symbol. Weight: 2 + * symbol. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory * * @param symbol (required) - * @param symbolStatus (optional) + * @param symbolStatus Supported values: `TRADING`, `HALT`, + * `BREAK` (optional) * @return ApiResponse<ReferencePriceCalculationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -822,11 +930,11 @@ public ApiResponse referencePrice(String symbol) throws * * * - * + * *
Response Details
Status Code Description Response Headers
200 Query Reference Price Calculation -
200 Reference price calculation -
* * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#reference-price-calculation">Query * Reference Price Calculation Documentation */ public ApiResponse referencePriceCalculation( @@ -835,15 +943,25 @@ public ApiResponse referencePriceCalculation( } /** - * Rolling window price change statistics Weight: 4 for each requested - * <tt>symbol</tt> regardless of <tt>windowSize</tt>. - * <br/><br/> The weight for this request will cap at 200 once the number of - * `symbols` in the request is more than 50. - * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param windowSize (optional) - * @param type (optional) + * Rolling window price change statistics **Note:** This endpoint differs from `GET + * /api/v3/ticker/24hr`. The statistical time range of this endpoint can be up to 59999ms + * longer than the requested `windowSize`. `openTime` starts at the + * beginning of a minute, while the end time is the current time. Therefore, the actual interval + * can be up to 59999ms longer than the requested window. For example, if `closeTime` + * is 1641287867099 (January 04, 2022 09:17:47:099 UTC) and `windowSize` is + * `1d`, then `openTime` is 1641201420000 (January 3, 2022, 09:17:00 UTC). + * Weight: 4 for each requested symbol regardless of windowSize. The weight for this request + * will cap at 200 once the number of `symbols` in the request is more than 50. + * Security Type: NONE Notes: **Data Source:** Database + * + * @param symbol Either `symbol` or `symbols` must be provided (optional) + * @param symbols Either `symbol` or `symbols` must be provided Examples of + * accepted format for the `symbols` parameter: + * [\"BTCUSDT\",\"BNBUSDT\"] or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D The + * maximum number of symbols allowed in a request is 100. (optional) + * @param windowSize Units cannot be combined (e.g. `1d2h` is not allowed). (optional, + * default to 1d) + * @param type (optional, default to FULL) * @param symbolStatus (optional) * @return ApiResponse<TickerResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -856,7 +974,7 @@ public ApiResponse referencePriceCalculation( * * * @see Rolling + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker">Rolling * window price change statistics Documentation */ public ApiResponse ticker( @@ -881,11 +999,15 @@ public ApiResponse ticker( * <td>2</td> </tr> <tr> <td>21-100</td> * <td>40</td> </tr> <tr> <td>101 or more</td> * <td>80</td> </tr> <tr> <td>symbols parameter is - * omitted</td> <td>80</td> </tr> </tbody> </table> - * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param type (optional) + * omitted</td> <td>80</td> </tr> </tbody> </table> Security + * Type: NONE Notes: **Data Source:** Memory + * + * @param symbol Either `symbol` or `symbols` must be provided (optional) + * @param symbols Either `symbol` or `symbols` must be provided Examples of + * accepted format for the `symbols` parameter: + * [\"BTCUSDT\",\"BNBUSDT\"] or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D The + * maximum number of symbols allowed in a request is 100. (optional) + * @param type (optional, default to FULL) * @param symbolStatus (optional) * @return ApiResponse<Ticker24hrResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -898,7 +1020,7 @@ public ApiResponse ticker( * * * @see 24hr + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker24hr">24hr * ticker price change statistics Documentation */ public ApiResponse ticker24hr( @@ -909,16 +1031,21 @@ public ApiResponse ticker24hr( /** * Symbol order book ticker Best price/qty on the order book for a symbol or symbols. Weight: - * <table> <thead> <tr> <th>Parameter</th> <th>Symbols - * Provided</th> <th>Weight</th> </tr> </thead> <tbody> - * <tr> <td rowspan=\"2\">symbol</td> <td>1</td> - * <td>2</td> </tr> <tr> <td>symbol parameter is - * omitted</td> <td>4</td> </tr> <tr> <td>symbols</td> - * <td>Any</td> <td>4</td> </tr> </tbody> </table> - * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param symbolStatus (optional) + * |Parameter|Symbols Provided|Weight| |---|---|---| |symbol| 1 |2| | |omitted| 4| |symbols| Any + * |4| Security Type: NONE Notes: **Data Source:** Memory + * + * @param symbol Parameter symbol and symbols cannot be used in combination. If neither + * parameter is sent, `bookTickers` for all symbols will be returned in an array. + * (optional) + * @param symbols Parameter symbol and symbols cannot be used in combination. If neither + * parameter is sent, `bookTickers` for all symbols will be returned in an array. + * Examples of accepted format for the symbols parameter: + * [\"BTCUSDT\",\"BNBUSDT\"] or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D + * (optional) + * @param symbolStatus Filters for symbols that have this `tradingStatus`. For a + * single symbol, a status mismatch returns error `-1220 + * SYMBOL_DOES_NOT_MATCH_STATUS`. For multiple or all symbols, non-matching ones are + * simply excluded from the response. (optional) * @return ApiResponse<TickerBookTickerResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -930,7 +1057,7 @@ public ApiResponse ticker24hr( * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker-book-ticker">Symbol * order book ticker Documentation */ public ApiResponse tickerBookTicker( @@ -939,17 +1066,20 @@ public ApiResponse tickerBookTicker( } /** - * Symbol price ticker Latest price for a symbol or symbols. Weight: <table> <thead> - * <tr> <th>Parameter</th> <th>Symbols Provided</th> - * <th>Weight</th> </tr> </thead> <tbody> <tr> <td - * rowspan=\"2\">symbol</td> <td>1</td> - * <td>2</td> </tr> <tr> <td>symbol parameter is - * omitted</td> <td>4</td> </tr> <tr> <td>symbols</td> - * <td>Any</td> <td>4</td> </tr> </tbody> </table> - * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) - * @param symbolStatus (optional) + * Symbol price ticker Latest price for a symbol or symbols. Weight: |Parameter|Symbols + * Provided|Weight| |---|---|---| |symbol| 1 |2| | |omitted| 4| |symbols| Any |4| Security Type: + * NONE Notes: **Data Source:** Memory + * + * @param symbol Parameter symbol and symbols cannot be used in combination. If neither + * parameter is sent, prices for all symbols will be returned in an array. (optional) + * @param symbols Parameter symbol and symbols cannot be used in combination. If neither + * parameter is sent, prices for all symbols will be returned in an array. Examples of + * accepted format for the symbols parameter: [\"BTCUSDT\",\"BNBUSDT\"] + * or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D (optional) + * @param symbolStatus Filters for symbols that have this `tradingStatus`. For a + * single symbol, a status mismatch returns error `-1220 + * SYMBOL_DOES_NOT_MATCH_STATUS`. For multiple or all symbols, non-matching ones are + * simply excluded from the response. (optional) * @return ApiResponse<TickerPriceResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -961,7 +1091,7 @@ public ApiResponse tickerBookTicker( * * * @see Symbol + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker-price">Symbol * price ticker Documentation */ public ApiResponse tickerPrice( @@ -971,14 +1101,22 @@ public ApiResponse tickerPrice( /** * Trading Day Ticker Price change statistics for a trading day. Weight: 4 for each requested - * <tt>symbol</tt>. <br/><br/> The weight for this request will cap at - * 200 once the number of `symbols` in the request is more than 50. - * - * @param symbol Symbol to query (optional) - * @param symbols List of symbols to query (optional) + * symbol. The weight for this request will cap at 200 once the number of symbols in the request + * is more than 50. Security Type: NONE Notes: **Data Source:** Database **Notes:**: - Supported + * values for `timeZone`: - Hours and minutes (e.g. `-1:00`, + * `05:45`) - Only hours (e.g. `0`, `8`, `4`) + * + * @param symbol Either `symbol` or `symbols` must be provided. (optional) + * @param symbols Either `symbol` or `symbols` must be provided. Examples of + * accepted format for the `symbols` parameter: + * [\"BTCUSDT\",\"BNBUSDT\"] or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D. The + * maximum number of `symbols` allowed in a request is 100. (optional) * @param timeZone Default: 0 (UTC) (optional) - * @param type (optional) - * @param symbolStatus (optional) + * @param type (optional, default to FULL) + * @param symbolStatus Filters for symbols that have this `tradingStatus`. For a + * single symbol, a status mismatch returns error `-1220 + * SYMBOL_DOES_NOT_MATCH_STATUS`. For multiple symbols, non-matching ones are simply + * excluded from the response. (optional) * @return ApiResponse<TickerTradingDayResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -990,7 +1128,7 @@ public ApiResponse tickerPrice( * * * @see Trading + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ticker-trading-day">Trading * Day Ticker Documentation */ public ApiResponse tickerTradingDay( @@ -1006,14 +1144,21 @@ public ApiResponse tickerTradingDay( /** * UIKlines The request is similar to klines having the same parameters and response. * `uiKlines` return modified kline data, optimized for presentation of candlestick - * charts. Weight: 2 + * charts. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Database - If + * `startTime` and `endTime` are not sent, the most recent klines are + * returned. - Supported values for `timeZone`: - Hours and minutes (e.g. + * `-1:00`, `05:45`) - Only hours (e.g. `0`, `8`, + * `4`) - Accepted range is strictly [-12:00 to +14:00] inclusive - If + * `timeZone` provided, kline intervals are interpreted in that timezone instead of + * UTC. - Note that `startTime` and `endTime` are always interpreted in UTC, + * regardless of `timeZone`. * * @param symbol (required) * @param interval (required) - * @param startTime Timestamp in ms to get aggregate trades from INCLUSIVE. (optional) - * @param endTime Timestamp in ms to get aggregate trades until INCLUSIVE. (optional) + * @param startTime (optional) + * @param endTime (optional) * @param timeZone Default: 0 (UTC) (optional) - * @param limit Default: 500; Maximum: 1000. (optional) + * @param limit (optional) * @return ApiResponse<UiKlinesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1025,7 +1170,7 @@ public ApiResponse tickerTradingDay( * * * @see UIKlines + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#ui-klines">UIKlines * Documentation */ public ApiResponse uiKlines( @@ -1040,13 +1185,13 @@ public ApiResponse uiKlines( } /** - * Cancel All Open Orders on a Symbol Cancels all active orders on a symbol. This includes - * orders that are part of an order list. Weight: 1 + * Cancel All Open Orders on a Symbol (TRADE) Cancels all active orders on a symbol. This + * includes orders that are part of an order list. Weight(IP): 1 Security Type: TRADE Notes: + * **Data Source:** Matching Engine * * @param symbol (required) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<DeleteOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1058,8 +1203,8 @@ public ApiResponse uiKlines( * * * @see Cancel - * All Open Orders on a Symbol Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#delete-open-orders">Cancel + * All Open Orders on a Symbol (TRADE) Documentation */ public ApiResponse deleteOpenOrders(String symbol, Double recvWindow) throws ApiException { @@ -1067,18 +1212,27 @@ public ApiResponse deleteOpenOrders(String symbol, Dou } /** - * Cancel order Cancel an active order. Weight: 1 + * Cancel order (TRADE) Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: **Data + * Source:** Matching Engine - Either `orderId` or `origClientOrderId` must + * be sent. - If both `orderId` and `origClientOrderId` are provided, the + * `orderId` is searched first, then the `origClientOrderId` from that + * result is checked against that order. If both conditions are not met the request will be + * rejected. - The performance for canceling an order (single cancel or as part of a + * cancel-replace) is always better when only `orderId` is sent. Sending + * `origClientOrderId` or both `orderId` + `origClientOrderId` + * will be slower. * * @param symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) - * @param newClientOrderId A unique id among open orders. Automatically generated if not - * sent.<br/> Orders with the same `newClientOrderID` can be accepted only - * when the previous one is filled, otherwise the order will be rejected. (optional) - * @param cancelRestrictions (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by + * default. (optional) + * @param cancelRestrictions Supported values: <br>`ONLY_NEW` - Cancel will + * succeed if the order status is `NEW`.<br> + * `ONLY_PARTIALLY_FILLED` - Cancel will succeed if order status is + * `PARTIALLY_FILLED`. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<DeleteOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1090,8 +1244,8 @@ public ApiResponse deleteOpenOrders(String symbol, Dou * * * @see Cancel - * order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#delete-order">Cancel + * order (TRADE) Documentation */ public ApiResponse deleteOrder( String symbol, @@ -1111,18 +1265,22 @@ public ApiResponse deleteOrder( } /** - * Cancel Order list Cancel an entire Order list Weight: 1 + * Cancel Order list (TRADE) Cancel an entire Order list Weight(IP): 1 Security Type: TRADE + * Notes: **Data Source:** Matching Engine **Notes:** - Canceling an individual order from an + * order list will cancel the entire order list. - If both orderListId and listClientOrderId + * parameters are provided, the orderListId is searched first, then the listClientOrderId from + * that result is checked against that order. If both conditions are not met the request will be + * rejected. * * @param symbol (required) * @param orderListId Either `orderListId` or `listClientOrderId` must be * provided (optional) - * @param listClientOrderId A unique Id for the entire orderList (optional) - * @param newClientOrderId A unique id among open orders. Automatically generated if not - * sent.<br/> Orders with the same `newClientOrderID` can be accepted only - * when the previous one is filled, otherwise the order will be rejected. (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param listClientOrderId Either `orderListId` or `listClientOrderId` must + * be provided (optional) + * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by + * default. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<DeleteOrderListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1134,8 +1292,8 @@ public ApiResponse deleteOrder( * * * @see Cancel - * Order list Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#delete-order-list">Cancel + * Order list (TRADE) Documentation */ public ApiResponse deleteOrderList( String symbol, @@ -1149,8 +1307,54 @@ public ApiResponse deleteOrderList( } /** - * New order Send in a new order. This adds 1 order to the `EXCHANGE_MAX_ORDERS` - * filter and the `MAX_NUM_ORDERS` filter. Weight: 1 + * New order (TRADE) Send in a new order. This adds 1 order to the + * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Weight(IP): + * 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Some + * additional mandatory parameters based on order `type`: Type | Additional mandatory + * parameters | Additional Information ------------ | ------------| ------ `LIMIT` | + * `timeInForce`, `quantity`, `price`| `MARKET` | + * `quantity` or `quoteOrderQty`| `MARKET` orders using the + * `quantity` field specifies the amount of the `base asset` the user wants + * to buy or sell at the market price. <br/> E.g. MARKET order on BTCUSDT will specify how + * much BTC the user is buying or selling. <br/><br/> `MARKET` orders + * using `quoteOrderQty` specifies the amount the user wants to spend (when buying) or + * receive (when selling) the `quote` asset; the correct `quantity` will be + * determined based on the market liquidity and `quoteOrderQty`. <br/> E.g. + * Using the symbol BTCUSDT: <br/> `BUY` side, the order will buy as many BTC as + * `quoteOrderQty` USDT can. <br/> `SELL` side, the order will sell as + * much BTC needed to receive `quoteOrderQty` USDT. `STOP_LOSS` | + * `quantity`, `stopPrice` or `trailingDelta`| This will execute a + * `MARKET` order when the conditions are met. (e.g. `stopPrice` is met or + * `trailingDelta` is activated) `STOP_LOSS_LIMIT` | + * `timeInForce`, `quantity`, `price`, `stopPrice` or + * `trailingDelta` `TAKE_PROFIT` | `quantity`, + * `stopPrice` or `trailingDelta` | This will execute a `MARKET` + * order when the conditions are met. (e.g. `stopPrice` is met or + * `trailingDelta` is activated) `TAKE_PROFIT_LIMIT` | + * `timeInForce`, `quantity`, `price`, `stopPrice` or + * `trailingDelta` | `LIMIT_MAKER` | `quantity`, + * `price`| This is a `LIMIT` order that will be rejected if the order + * immediately matches and trades as a taker. <br/> This is also known as a POST-ONLY + * order. Notes on using parameters for Pegged Orders: * These parameters are allowed for + * `LIMIT`, `LIMIT_MAKER`, `STOP_LOSS_LIMIT`, + * `TAKE_PROFIT_LIMIT` orders. * If `pegPriceType` is specified, + * `price` becomes optional. Otherwise, it is still mandatory. * + * `pegPriceType=PRIMARY_PEG` means the primary peg, that is the best price on + * the same side of the order book as your order. * `pegPriceType=MARKET_PEG` + * means the market peg, that is the best price on the opposite side of the order book from your + * order. * Use `pegOffsetType` and `pegOffsetValue` to request a price + * level other than the best one. These parameters must be specified together. Other info: * Any + * `LIMIT` or `LIMIT_MAKER` type order can be made an iceberg order by + * sending an `icebergQty`. * Any order with an `icebergQty` MUST have + * `timeInForce` set to `GTC`. * For `STOP_LOSS`, + * `STOP_LOSS_LIMIT`, `TAKE_PROFIT_LIMIT` and `TAKE_PROFIT` + * orders, `trailingDelta` can be combined with `stopPrice`. * + * `MARKET` orders using `quoteOrderQty` will not break `LOT_SIZE` + * filter rules; the order will execute a `quantity` that will have the notional value + * as close as possible to `quoteOrderQty`. Trigger order price rules against market + * price for both MARKET and LIMIT versions: * Price above market price: `STOP_LOSS` + * `BUY`, `TAKE_PROFIT` `SELL` * Price below market price: + * `STOP_LOSS` `SELL`, `TAKE_PROFIT` `BUY` * * @param newOrderRequest (required) * @return ApiResponse<NewOrderResponse> @@ -1164,8 +1368,8 @@ public ApiResponse deleteOrderList( * * * @see New - * order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#new-order">New + * order (TRADE) Documentation */ public ApiResponse newOrder(NewOrderRequest newOrderRequest) throws ApiException { @@ -1173,9 +1377,10 @@ public ApiResponse newOrder(NewOrderRequest newOrderRequest) } /** - * Order Amend Keep Priority Reduce the quantity of an existing open order. This adds 0 orders - * to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read - * [Order Amend Keep Priority FAQ](faqs/order_amend_keep_priority.md) to learn more. Weight: 4 + * Order Amend Keep Priority (TRADE) Reduce the quantity of an existing open order. This adds 0 + * orders to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` + * filter. Read Order Amend Keep Priority FAQ to learn more. Weight(IP): 4 Unfilled Order Count: + * 0 Security Type: TRADE Notes: **Data Source:** Matching Engine * * @param orderAmendKeepPriorityRequest (required) * @return ApiResponse<OrderAmendKeepPriorityResponse> @@ -1189,8 +1394,8 @@ public ApiResponse newOrder(NewOrderRequest newOrderRequest) * * * @see Order - * Amend Keep Priority Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-amend-keep-priority">Order + * Amend Keep Priority (TRADE) Documentation */ public ApiResponse orderAmendKeepPriority( OrderAmendKeepPriorityRequest orderAmendKeepPriorityRequest) throws ApiException { @@ -1198,12 +1403,117 @@ public ApiResponse orderAmendKeepPriority( } /** - * Cancel an Existing Order and Send a New Order * Cancels an existing order and places a new - * order on the same symbol. * Filters and Order Count are evaluated before the processing of - * the cancellation and order placement occurs. * A new order that was not attempted (i.e. when - * `newOrderResult: NOT_ATTEMPTED`), will still increase the unfilled order count by - * 1. * You can only cancel an individual order from an orderList using this endpoint, but the - * result is the same as canceling the entire orderList. Weight: 1 + * Cancel an Existing Order and Send a New Order (TRADE) - Cancels an existing order and places + * a new order on the same symbol. - Filters and Order Count are evaluated before the processing + * of the cancellation and order placement occurs. - A new order that was not attempted (i.e. + * when `newOrderResult: NOT_ATTEMPTED`), will still increase the unfilled order count + * by 1. - You can only cancel an individual order from an orderList using this endpoint, but + * the result is the same as canceling the entire orderList. Weight(IP): 1 Unfilled Order Count: + * 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Similar to `POST + * /api/v3/order`, additional mandatory parameters are determined by `type`. + * Response format varies depending on whether the processing of the message succeeded, + * partially succeeded, or failed. <table> <thead> <tr> <th colspan=3 + * align=left>Request</th> <th colspan=3 + * align=left>Response</th> </tr> <tr> + * <th><code>cancelReplaceMode</code></th> + * <th><code>orderRateLimitExceededMode</code></th> <th>Unfilled + * Order Count</th> <th><code>cancelResult</code></th> + * <th><code>newOrderResult</code></th> + * <th><code>status</code></th> </tr> </thead> <tbody> + * <tr> <td + * rowspan=\"11\"><code>STOP_ON_FAILURE</code></td> <td + * rowspan=\"6\"><code>DO_NOTHING</code></td> <td + * rowspan=\"3\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"3\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td + * rowspan=\"5\"><code>CANCEL_ONLY</code></td> <td + * rowspan=\"3\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"2\">Exceeds Limits</td> <td>❌ + * <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>429</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>429</code></td> </tr> <tr> <td + * rowspan=\"16\"><code>ALLOW_FAILURE</code></td> <td + * rowspan=\"8\"><code>DO_NOTHING</code></td> <td + * rowspan=\"4\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>409</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"4\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td + * rowspan=\"8\"><CODE>CANCEL_ONLY</CODE></td> <td + * rowspan=\"4\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>409</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"4\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>N/A</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> </tbody> + * </table> **Notes:** - The performance for canceling an order (single cancel or as part + * of a cancel-replace) is always better when only `orderId` is sent. Sending + * `origClientOrderId` or both `orderId` + `origClientOrderId` + * will be slower. * * @param orderCancelReplaceRequest (required) * @return ApiResponse<OrderCancelReplaceResponse> @@ -1213,12 +1523,12 @@ public ApiResponse orderAmendKeepPriority( * * * - * + * *
Response Details
Status Code Description Response Headers
200 Cancel an Existing Order and Send a New Order -
200 Both cancel and new order succeed -
* * @see Cancel - * an Existing Order and Send a New Order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-cancel-replace">Cancel + * an Existing Order and Send a New Order (TRADE) Documentation */ public ApiResponse orderCancelReplace( OrderCancelReplaceRequest orderCancelReplaceRequest) throws ApiException { @@ -1226,20 +1536,22 @@ public ApiResponse orderCancelReplace( } /** - * New Order list - OCO Send in an one-cancels-the-other (OCO) pair, where activation of one - * order immediately cancels the other. * An OCO has 2 orders called the **above order** and - * **below order**. * One of the orders must be a + * New Order list - OCO (TRADE) Send in an one-cancels-the-other (OCO) pair, where activation of + * one order immediately cancels the other. - An OCO has 2 orders called the **above order** and + * **below order**. - One of the orders must be a * `LIMIT_MAKER/TAKE_PROFIT/TAKE_PROFIT_LIMIT` order and the other must be - * `STOP_LOSS` or `STOP_LOSS_LIMIT` order. * Price restrictions * If the OCO - * is on the `SELL` side: * `LIMIT_MAKER/TAKE_PROFIT_LIMIT` + * `STOP_LOSS` or `STOP_LOSS_LIMIT` order. - Price restrictions - If the OCO + * is on the `SELL` side: - `LIMIT_MAKER/TAKE_PROFIT_LIMIT` * `price` > Last Traded Price > `STOP_LOSS/STOP_LOSS_LIMIT` - * `stopPrice` * `TAKE_PROFIT stopPrice` > Last Traded Price > - * `STOP_LOSS/STOP_LOSS_LIMIT stopPrice` * If the OCO is on the `BUY` side: - * * `LIMIT_MAKER/TAKE_PROFIT_LIMIT price` < Last Traded Price < - * `stopPrice` * `TAKE_PROFIT stopPrice` < Last Traded Price < + * `stopPrice` - `TAKE_PROFIT stopPrice` > Last Traded Price > + * `STOP_LOSS/STOP_LOSS_LIMIT stopPrice` - If the OCO is on the `BUY` side: + * - `LIMIT_MAKER/TAKE_PROFIT_LIMIT price` < Last Traded Price < + * `stopPrice` - `TAKE_PROFIT stopPrice` < Last Traded Price < * `STOP_LOSS/STOP_LOSS_LIMIT stopPrice` * OCOs add **2 orders** to the - * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Weight: 1 - * Unfilled Order Count: 2 + * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. - OCOs add + * 2 orders to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` + * filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** + * Matching Engine * * @param orderListOcoRequest (required) * @return ApiResponse<OrderListOcoResponse> @@ -1253,8 +1565,8 @@ public ApiResponse orderCancelReplace( * * * @see New - * Order list - OCO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-oco">New + * Order list - OCO (TRADE) Documentation */ public ApiResponse orderListOco(OrderListOcoRequest orderListOcoRequest) throws ApiException { @@ -1262,8 +1574,10 @@ public ApiResponse orderListOco(OrderListOcoRequest orderL } /** - * New Order List - OPO Place an [OPO](./faqs/opo.md). * OPOs add 2 orders to the - * EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS filter. Weight: 1 Unfilled Order Count: 2 + * New Order List - OPO (TRADE) Place an [OPO](/products/spot/faqs/opo). - OPOs add 2 orders to + * the `EXCHANGE_MAX_NUM_ORDERS`` filter and `MAX_NUM_ORDERS`` + * filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** + * Matching Engine * * @param orderListOpoRequest (required) * @return ApiResponse<OrderListOpoResponse> @@ -1277,8 +1591,8 @@ public ApiResponse orderListOco(OrderListOcoRequest orderL * * * @see New - * Order List - OPO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-opo">New + * Order List - OPO (TRADE) Documentation */ public ApiResponse orderListOpo(OrderListOpoRequest orderListOpoRequest) throws ApiException { @@ -1286,7 +1600,8 @@ public ApiResponse orderListOpo(OrderListOpoRequest orderL } /** - * New Order List - OPOCO Place an [OPOCO](./faqs/opo.md). Weight: 1 Unfilled Order Count: 3 + * New Order List - OPOCO (TRADE) Place an [OPOCO](/products/spot/faqs/opo). Weight(IP): 1 + * Unfilled Order Count: 3 Security Type: TRADE Notes: **Data Source:** Matching Engine * * @param orderListOpocoRequest (required) * @return ApiResponse<OrderListOpocoResponse> @@ -1300,8 +1615,8 @@ public ApiResponse orderListOpo(OrderListOpoRequest orderL * * * @see New - * Order List - OPOCO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-opoco">New + * Order List - OPOCO (TRADE) Documentation */ public ApiResponse orderListOpoco( OrderListOpocoRequest orderListOpocoRequest) throws ApiException { @@ -1309,19 +1624,30 @@ public ApiResponse orderListOpoco( } /** - * New Order list - OTO Place an OTO. * An OTO (One-Triggers-the-Other) is an order list - * comprised of 2 orders. * The first order is called the **working order** and must be + * New Order list - OTO (TRADE) Place an OTO. - An OTO (One-Triggers-the-Other) is an order list + * comprised of 2 orders. - The first order is called the **working order** and must be * `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the - * order book. * The second order is called the **pending order**. It can be any order type + * order book. - The second order is called the **pending order**. It can be any order type * except for `MARKET` orders using parameter `quoteOrderQty`. The pending - * order is only placed on the order book when the working order gets **fully filled**. * If + * order is only placed on the order book when the working order gets **fully filled**. - If * either the working order or the pending order is cancelled individually, the other order in - * the order list will also be canceled or expired. * When the order list is placed, if the + * the order list will also be canceled or expired. - When the order list is placed, if the * working order gets **immediately fully filled**, the placement response will show the working * order as `FILLED` but the pending order will still appear as * `PENDING_NEW`. You need to query the status of the pending order again to see its - * updated status. * OTOs add **2 orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and - * `MAX_NUM_ORDERS` filter. Weight: 1 Unfilled Order Count: 2 + * updated status. - OTOs add **2 orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and + * `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE + * Notes: **Data Source:** Matching Engine **Mandatory parameters based on + * `pendingType` or `workingType`** Depending on the `pendingType` + * or `workingType`, some optional parameters will become mandatory. |Type |Additional + * mandatory parameters|Additional information| |---- |---- |------ |`workingType` + * = `LIMIT` |`workingTimeInForce` | |`pendingType` = + * `LIMIT` |`pendingPrice`, `pendingTimeInForce` | + * |`pendingType` = `STOP_LOSS` or `TAKE_PROFIT` + * |`pendingStopPrice` and/or `pendingTrailingDelta`| + * |`pendingType` = `STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT`|`pendingPrice`, `pendingStopPrice` and/or + * `pendingTrailingDelta`, `pendingTimeInForce`| * * @param orderListOtoRequest (required) * @return ApiResponse<OrderListOtoResponse> @@ -1335,8 +1661,8 @@ public ApiResponse orderListOpoco( * * * @see New - * Order list - OTO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-oto">New + * Order list - OTO (TRADE) Documentation */ public ApiResponse orderListOto(OrderListOtoRequest orderListOtoRequest) throws ApiException { @@ -1344,16 +1670,34 @@ public ApiResponse orderListOto(OrderListOtoRequest orderL } /** - * New Order list - OTOCO Place an OTOCO. * An OTOCO (One-Triggers-One-Cancels-the-Other) is an - * order list comprised of 3 orders. * The first order is called the **working order** and must - * be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on - * the order book. * The behavior of the working order is the same as the - * [OTO](#new-order-list---oto-trade). * OTOCO has 2 pending orders (pending above and pending - * below), forming an OCO pair. The pending orders are only placed on the order book when the - * working order gets **fully filled**. * The rules of the pending above and pending below - * follow the same rules as the [Order list OCO](#new-order-list---oco-trade). * OTOCOs add **3 - * orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` - * filter. Weight: 1 Unfilled Order Count: 3 + * New Order list - OTOCO (TRADE) Place an OTOCO. - An OTOCO + * (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders. - The first + * order is called the **working order** and must be `LIMIT` or + * `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The + * behavior of the working order is the same as the [OTO](#order-list-oto). - OTOCO has 2 + * pending orders (pending above and pending below), forming an OCO pair. The pending orders are + * only placed on the order book when the working order gets **fully filled**. - The rules of + * the pending above and pending below follow the same rules as the [Order list + * OCO](#order-list-oco). - OTOCOs add **3 orders** to the `EXCHANGE_MAX_NUM_ORDERS` + * filter and `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 3 Security + * Type: TRADE Notes: **Data Source:** Matching Engine **Mandatory parameters based on + * `pendingAboveType`, `pendingBelowType` or `workingType`** + * Depending on the `pendingAboveType`/`pendingBelowType` or + * `workingType`, some optional parameters will become mandatory. |Type |Additional + * mandatory parameters|Additional information| |---- |---- |------ |`workingType` + * = `LIMIT` |`workingTimeInForce` | + * |`pendingAboveType`= `LIMIT_MAKER` |`pendingAbovePrice` | + * |`pendingAboveType` = `STOP_LOSS/TAKE_PROFIT` + * |`pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`| + * |`pendingAboveType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT` + * |`pendingAbovePrice`, `pendingAboveStopPrice` and/or + * `pendingAboveTrailingDelta`, `pendingAboveTimeInForce`| + * |`pendingBelowType`= `LIMIT_MAKER` |`pendingBelowPrice` | + * |`pendingBelowType= STOP_LOSS/TAKE_PROFIT` |`pendingBelowStopPrice` + * and/or `pendingBelowTrailingDelta`| + * |`pendingBelowType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT` + * |`pendingBelowPrice`, `pendingBelowStopPrice` and/or + * `pendingBelowTrailingDelta`, `pendingBelowTimeInForce`| * * @param orderListOtocoRequest (required) * @return ApiResponse<OrderListOtocoResponse> @@ -1367,8 +1711,8 @@ public ApiResponse orderListOto(OrderListOtoRequest orderL * * * @see New - * Order list - OTOCO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-otoco">New + * Order list - OTOCO (TRADE) Documentation */ public ApiResponse orderListOtoco( OrderListOtocoRequest orderListOtocoRequest) throws ApiException { @@ -1376,12 +1720,13 @@ public ApiResponse orderListOtoco( } /** - * New OCO - Deprecated Send in a new OCO. * Price Restrictions: * `SELL`: Limit Price - * > Last Price > Stop Price * `BUY`: Limit Price < Last Price < Stop - * Price * Quantity Restrictions: * Both legs must have the same quantity. * `ICEBERG` - * quantities however do not have to be the same * `OCO` adds **2 orders** to the - * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Weight: 1 - * Unfilled Order Count: 2 + * New OCO - Deprecated (TRADE) Send in a new OCO. - Price Restrictions: - `SELL`: + * Limit Price > Last Price > Stop Price - `BUY`: Limit Price < Last Price + * < Stop Price - Quantity Restrictions: - Both legs must have the same quantity. - + * `ICEBERG` quantities however do not have to be the same - `OCO` adds **2 + * orders** to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` + * filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** + * Matching Engine * * @param orderOcoRequest (required) * @return ApiResponse<OrderOcoResponse> @@ -1396,8 +1741,8 @@ public ApiResponse orderListOtoco( * * @deprecated * @see New - * OCO - Deprecated Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-oco">New + * OCO - Deprecated (TRADE) Documentation */ public ApiResponse orderOco(OrderOcoRequest orderOcoRequest) throws ApiException { @@ -1405,10 +1750,10 @@ public ApiResponse orderOco(OrderOcoRequest orderOcoRequest) } /** - * Test new order Test new order creation and signature/recvWindow long. Creates and validates a - * new order but does not send it into the matching engine. Weight: |Condition| Request Weight| - * |------------ | ------------ | |Without `computeCommissionRates`| 1| |With - * `computeCommissionRates`|20| + * Test new order (TRADE) Test new order creation and signature/recvWindow long. Creates and + * validates a new order but does not send it into the matching engine. Weight: + * |Condition|Weight| |---|---| |Without `computeCommissionRates`|1| |With + * `computeCommissionRates`|20| Security Type: TRADE Notes: **Data Source:** Memory * * @param orderTestRequest (required) * @return ApiResponse<OrderTestResponse> @@ -1422,8 +1767,8 @@ public ApiResponse orderOco(OrderOcoRequest orderOcoRequest) * * * @see Test - * new order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-test">Test + * new order (TRADE) Documentation */ public ApiResponse orderTest(OrderTestRequest orderTestRequest) throws ApiException { @@ -1431,9 +1776,12 @@ public ApiResponse orderTest(OrderTestRequest orderTestReques } /** - * New order using SOR Places an order using smart order routing (SOR). This adds 1 order to the - * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [SOR - * FAQ](faqs/sor_faq.md) to learn more. Weight: 1 Unfilled Order Count: 1 + * New order using SOR (TRADE) Places an order using smart order routing (SOR). This adds 1 + * order to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` + * filter. Read [SOR FAQ](/products/spot/faqs/sor_faq) to learn more. Weight(IP): 1 Unfilled + * Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine **Note:** + * `POST /api/v3/sor/order` only supports `LIMIT` and `MARKET` + * orders. `quoteOrderQty` is not supported. * * @param sorOrderRequest (required) * @return ApiResponse<SorOrderResponse> @@ -1447,8 +1795,8 @@ public ApiResponse orderTest(OrderTestRequest orderTestReques * * * @see New - * order using SOR Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#sor-order">New + * order using SOR (TRADE) Documentation */ public ApiResponse sorOrder(SorOrderRequest sorOrderRequest) throws ApiException { @@ -1456,10 +1804,11 @@ public ApiResponse sorOrder(SorOrderRequest sorOrderRequest) } /** - * Test new order using SOR Test new order creation and signature/recvWindow using smart order - * routing (SOR). Creates and validates a new order but does not send it into the matching - * engine. Weight: | Condition | Request Weight | | --------- | -------------- | | Without - * `computeCommissionRates` | 1 | | With `computeCommissionRates` | 20 | + * Test new order using SOR (TRADE) Test new order creation and signature/recvWindow using smart + * order routing (SOR). Creates and validates a new order but does not send it into the matching + * engine. Weight: |Condition|Weight| |---|---| |Without `computeCommissionRates`|1| + * |With `computeCommissionRates`|20| Security Type: TRADE Notes: **Data Source:** + * Memory * * @param sorOrderTestRequest (required) * @return ApiResponse<SorOrderTestResponse> @@ -1473,8 +1822,8 @@ public ApiResponse sorOrder(SorOrderRequest sorOrderRequest) * * * @see Test - * new order using SOR Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#sor-order-test">Test + * new order using SOR (TRADE) Documentation */ public ApiResponse sorOrderTest(SorOrderTestRequest sorOrderTestRequest) throws ApiException { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/TradeApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/TradeApi.java index 63d40d266..2e6f99e05 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/TradeApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/TradeApi.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -71,7 +71,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-spot/10.1.1 (Java/%s; %s; %s)", + "binance-spot/11.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = true; @@ -112,9 +112,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * Build call for deleteOpenOrders * * @param symbol (required) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -125,8 +124,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Cancel - * All Open Orders on a Symbol Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#delete-open-orders">Cancel + * All Open Orders on a Symbol (TRADE) Documentation */ private okhttp3.Call deleteOpenOrdersCall(String symbol, Double recvWindow) throws ApiException { @@ -227,13 +226,13 @@ private okhttp3.Call deleteOpenOrdersValidateBeforeCall(String symbol, Double re } /** - * Cancel All Open Orders on a Symbol Cancels all active orders on a symbol. This includes - * orders that are part of an order list. Weight: 1 + * Cancel All Open Orders on a Symbol (TRADE) Cancels all active orders on a symbol. This + * includes orders that are part of an order list. Weight(IP): 1 Security Type: TRADE Notes: + * **Data Source:** Matching Engine * * @param symbol (required) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<DeleteOpenOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -245,11 +244,11 @@ private okhttp3.Call deleteOpenOrdersValidateBeforeCall(String symbol, Double re * * * @see Cancel - * All Open Orders on a Symbol Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#delete-open-orders">Cancel + * All Open Orders on a Symbol (TRADE) Documentation */ public ApiResponse deleteOpenOrders( - @NotNull String symbol, Double recvWindow) throws ApiException { + @NotNull String symbol, @DecimalMax("60000") Double recvWindow) throws ApiException { okhttp3.Call localVarCall = deleteOpenOrdersValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -262,13 +261,14 @@ public ApiResponse deleteOpenOrders( * @param symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) - * @param newClientOrderId A unique id among open orders. Automatically generated if not - * sent.<br/> Orders with the same `newClientOrderID` can be accepted only - * when the previous one is filled, otherwise the order will be rejected. (optional) - * @param cancelRestrictions (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by + * default. (optional) + * @param cancelRestrictions Supported values: <br>`ONLY_NEW` - Cancel will + * succeed if the order status is `NEW`.<br> + * `ONLY_PARTIALLY_FILLED` - Cancel will succeed if order status is + * `PARTIALLY_FILLED`. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -279,8 +279,8 @@ public ApiResponse deleteOpenOrders( * * * @see Cancel - * order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#delete-order">Cancel + * order (TRADE) Documentation */ private okhttp3.Call deleteOrderCall( String symbol, @@ -428,18 +428,27 @@ private okhttp3.Call deleteOrderValidateBeforeCall( } /** - * Cancel order Cancel an active order. Weight: 1 + * Cancel order (TRADE) Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: **Data + * Source:** Matching Engine - Either `orderId` or `origClientOrderId` must + * be sent. - If both `orderId` and `origClientOrderId` are provided, the + * `orderId` is searched first, then the `origClientOrderId` from that + * result is checked against that order. If both conditions are not met the request will be + * rejected. - The performance for canceling an order (single cancel or as part of a + * cancel-replace) is always better when only `orderId` is sent. Sending + * `origClientOrderId` or both `orderId` + `origClientOrderId` + * will be slower. * * @param symbol (required) * @param orderId (optional) * @param origClientOrderId (optional) - * @param newClientOrderId A unique id among open orders. Automatically generated if not - * sent.<br/> Orders with the same `newClientOrderID` can be accepted only - * when the previous one is filled, otherwise the order will be rejected. (optional) - * @param cancelRestrictions (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by + * default. (optional) + * @param cancelRestrictions Supported values: <br>`ONLY_NEW` - Cancel will + * succeed if the order status is `NEW`.<br> + * `ONLY_PARTIALLY_FILLED` - Cancel will succeed if order status is + * `PARTIALLY_FILLED`. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<DeleteOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -451,8 +460,8 @@ private okhttp3.Call deleteOrderValidateBeforeCall( * * * @see Cancel - * order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#delete-order">Cancel + * order (TRADE) Documentation */ public ApiResponse deleteOrder( @NotNull String symbol, @@ -460,7 +469,7 @@ public ApiResponse deleteOrder( String origClientOrderId, String newClientOrderId, CancelRestrictions cancelRestrictions, - Double recvWindow) + @DecimalMax("60000") Double recvWindow) throws ApiException { okhttp3.Call localVarCall = deleteOrderValidateBeforeCall( @@ -481,13 +490,12 @@ public ApiResponse deleteOrder( * @param symbol (required) * @param orderListId Either `orderListId` or `listClientOrderId` must be * provided (optional) - * @param listClientOrderId A unique Id for the entire orderList (optional) - * @param newClientOrderId A unique id among open orders. Automatically generated if not - * sent.<br/> Orders with the same `newClientOrderID` can be accepted only - * when the previous one is filled, otherwise the order will be rejected. (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param listClientOrderId Either `orderListId` or `listClientOrderId` must + * be provided (optional) + * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by + * default. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -498,8 +506,8 @@ public ApiResponse deleteOrder( * * * @see Cancel - * Order list Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#delete-order-list">Cancel + * Order list (TRADE) Documentation */ private okhttp3.Call deleteOrderListCall( String symbol, @@ -635,18 +643,22 @@ private okhttp3.Call deleteOrderListValidateBeforeCall( } /** - * Cancel Order list Cancel an entire Order list Weight: 1 + * Cancel Order list (TRADE) Cancel an entire Order list Weight(IP): 1 Security Type: TRADE + * Notes: **Data Source:** Matching Engine **Notes:** - Canceling an individual order from an + * order list will cancel the entire order list. - If both orderListId and listClientOrderId + * parameters are provided, the orderListId is searched first, then the listClientOrderId from + * that result is checked against that order. If both conditions are not met the request will be + * rejected. * * @param symbol (required) * @param orderListId Either `orderListId` or `listClientOrderId` must be * provided (optional) - * @param listClientOrderId A unique Id for the entire orderList (optional) - * @param newClientOrderId A unique id among open orders. Automatically generated if not - * sent.<br/> Orders with the same `newClientOrderID` can be accepted only - * when the previous one is filled, otherwise the order will be rejected. (optional) - * @param recvWindow The value cannot be greater than `60000`. <br> Supports up - * to three decimal places of precision (e.g., 6000.346) so that microseconds may be - * specified. (optional) + * @param listClientOrderId Either `orderListId` or `listClientOrderId` must + * be provided (optional) + * @param newClientOrderId Used to uniquely identify this cancel. Automatically generated by + * default. (optional) + * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that + * microseconds may be specified. (optional) * @return ApiResponse<DeleteOrderListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -658,15 +670,15 @@ private okhttp3.Call deleteOrderListValidateBeforeCall( * * * @see Cancel - * Order list Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#delete-order-list">Cancel + * Order list (TRADE) Documentation */ public ApiResponse deleteOrderList( @NotNull String symbol, Long orderListId, String listClientOrderId, String newClientOrderId, - Double recvWindow) + @DecimalMax("60000") Double recvWindow) throws ApiException { okhttp3.Call localVarCall = deleteOrderListValidateBeforeCall( @@ -690,8 +702,8 @@ public ApiResponse deleteOrderList( * * * @see New - * order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#new-order">New + * order (TRADE) Documentation */ private okhttp3.Call newOrderCall(NewOrderRequest newOrderRequest) throws ApiException { String basePath = null; @@ -868,8 +880,54 @@ private okhttp3.Call newOrderValidateBeforeCall(NewOrderRequest newOrderRequest) } /** - * New order Send in a new order. This adds 1 order to the `EXCHANGE_MAX_ORDERS` - * filter and the `MAX_NUM_ORDERS` filter. Weight: 1 + * New order (TRADE) Send in a new order. This adds 1 order to the + * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Weight(IP): + * 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Some + * additional mandatory parameters based on order `type`: Type | Additional mandatory + * parameters | Additional Information ------------ | ------------| ------ `LIMIT` | + * `timeInForce`, `quantity`, `price`| `MARKET` | + * `quantity` or `quoteOrderQty`| `MARKET` orders using the + * `quantity` field specifies the amount of the `base asset` the user wants + * to buy or sell at the market price. <br/> E.g. MARKET order on BTCUSDT will specify how + * much BTC the user is buying or selling. <br/><br/> `MARKET` orders + * using `quoteOrderQty` specifies the amount the user wants to spend (when buying) or + * receive (when selling) the `quote` asset; the correct `quantity` will be + * determined based on the market liquidity and `quoteOrderQty`. <br/> E.g. + * Using the symbol BTCUSDT: <br/> `BUY` side, the order will buy as many BTC as + * `quoteOrderQty` USDT can. <br/> `SELL` side, the order will sell as + * much BTC needed to receive `quoteOrderQty` USDT. `STOP_LOSS` | + * `quantity`, `stopPrice` or `trailingDelta`| This will execute a + * `MARKET` order when the conditions are met. (e.g. `stopPrice` is met or + * `trailingDelta` is activated) `STOP_LOSS_LIMIT` | + * `timeInForce`, `quantity`, `price`, `stopPrice` or + * `trailingDelta` `TAKE_PROFIT` | `quantity`, + * `stopPrice` or `trailingDelta` | This will execute a `MARKET` + * order when the conditions are met. (e.g. `stopPrice` is met or + * `trailingDelta` is activated) `TAKE_PROFIT_LIMIT` | + * `timeInForce`, `quantity`, `price`, `stopPrice` or + * `trailingDelta` | `LIMIT_MAKER` | `quantity`, + * `price`| This is a `LIMIT` order that will be rejected if the order + * immediately matches and trades as a taker. <br/> This is also known as a POST-ONLY + * order. Notes on using parameters for Pegged Orders: * These parameters are allowed for + * `LIMIT`, `LIMIT_MAKER`, `STOP_LOSS_LIMIT`, + * `TAKE_PROFIT_LIMIT` orders. * If `pegPriceType` is specified, + * `price` becomes optional. Otherwise, it is still mandatory. * + * `pegPriceType=PRIMARY_PEG` means the primary peg, that is the best price on + * the same side of the order book as your order. * `pegPriceType=MARKET_PEG` + * means the market peg, that is the best price on the opposite side of the order book from your + * order. * Use `pegOffsetType` and `pegOffsetValue` to request a price + * level other than the best one. These parameters must be specified together. Other info: * Any + * `LIMIT` or `LIMIT_MAKER` type order can be made an iceberg order by + * sending an `icebergQty`. * Any order with an `icebergQty` MUST have + * `timeInForce` set to `GTC`. * For `STOP_LOSS`, + * `STOP_LOSS_LIMIT`, `TAKE_PROFIT_LIMIT` and `TAKE_PROFIT` + * orders, `trailingDelta` can be combined with `stopPrice`. * + * `MARKET` orders using `quoteOrderQty` will not break `LOT_SIZE` + * filter rules; the order will execute a `quantity` that will have the notional value + * as close as possible to `quoteOrderQty`. Trigger order price rules against market + * price for both MARKET and LIMIT versions: * Price above market price: `STOP_LOSS` + * `BUY`, `TAKE_PROFIT` `SELL` * Price below market price: + * `STOP_LOSS` `SELL`, `TAKE_PROFIT` `BUY` * * @param newOrderRequest (required) * @return ApiResponse<NewOrderResponse> @@ -883,8 +941,8 @@ private okhttp3.Call newOrderValidateBeforeCall(NewOrderRequest newOrderRequest) * * * @see New - * order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#new-order">New + * order (TRADE) Documentation */ public ApiResponse newOrder(@Valid @NotNull NewOrderRequest newOrderRequest) throws ApiException { @@ -907,8 +965,8 @@ public ApiResponse newOrder(@Valid @NotNull NewOrderRequest ne * * * @see Order - * Amend Keep Priority Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-amend-keep-priority">Order + * Amend Keep Priority (TRADE) Documentation */ private okhttp3.Call orderAmendKeepPriorityCall( OrderAmendKeepPriorityRequest orderAmendKeepPriorityRequest) throws ApiException { @@ -1033,9 +1091,10 @@ private okhttp3.Call orderAmendKeepPriorityValidateBeforeCall( } /** - * Order Amend Keep Priority Reduce the quantity of an existing open order. This adds 0 orders - * to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read - * [Order Amend Keep Priority FAQ](faqs/order_amend_keep_priority.md) to learn more. Weight: 4 + * Order Amend Keep Priority (TRADE) Reduce the quantity of an existing open order. This adds 0 + * orders to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` + * filter. Read Order Amend Keep Priority FAQ to learn more. Weight(IP): 4 Unfilled Order Count: + * 0 Security Type: TRADE Notes: **Data Source:** Matching Engine * * @param orderAmendKeepPriorityRequest (required) * @return ApiResponse<OrderAmendKeepPriorityResponse> @@ -1049,8 +1108,8 @@ private okhttp3.Call orderAmendKeepPriorityValidateBeforeCall( * * * @see Order - * Amend Keep Priority Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-amend-keep-priority">Order + * Amend Keep Priority (TRADE) Documentation */ public ApiResponse orderAmendKeepPriority( @Valid @NotNull OrderAmendKeepPriorityRequest orderAmendKeepPriorityRequest) @@ -1072,12 +1131,12 @@ public ApiResponse orderAmendKeepPriority( * * * - * + * *
Response Details
Status Code Description Response Headers
200 Cancel an Existing Order and Send a New Order -
200 Both cancel and new order succeed -
* * @see Cancel - * an Existing Order and Send a New Order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-cancel-replace">Cancel + * an Existing Order and Send a New Order (TRADE) Documentation */ private okhttp3.Call orderCancelReplaceCall(OrderCancelReplaceRequest orderCancelReplaceRequest) throws ApiException { @@ -1298,12 +1357,117 @@ private okhttp3.Call orderCancelReplaceValidateBeforeCall( } /** - * Cancel an Existing Order and Send a New Order * Cancels an existing order and places a new - * order on the same symbol. * Filters and Order Count are evaluated before the processing of - * the cancellation and order placement occurs. * A new order that was not attempted (i.e. when - * `newOrderResult: NOT_ATTEMPTED`), will still increase the unfilled order count by - * 1. * You can only cancel an individual order from an orderList using this endpoint, but the - * result is the same as canceling the entire orderList. Weight: 1 + * Cancel an Existing Order and Send a New Order (TRADE) - Cancels an existing order and places + * a new order on the same symbol. - Filters and Order Count are evaluated before the processing + * of the cancellation and order placement occurs. - A new order that was not attempted (i.e. + * when `newOrderResult: NOT_ATTEMPTED`), will still increase the unfilled order count + * by 1. - You can only cancel an individual order from an orderList using this endpoint, but + * the result is the same as canceling the entire orderList. Weight(IP): 1 Unfilled Order Count: + * 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Similar to `POST + * /api/v3/order`, additional mandatory parameters are determined by `type`. + * Response format varies depending on whether the processing of the message succeeded, + * partially succeeded, or failed. <table> <thead> <tr> <th colspan=3 + * align=left>Request</th> <th colspan=3 + * align=left>Response</th> </tr> <tr> + * <th><code>cancelReplaceMode</code></th> + * <th><code>orderRateLimitExceededMode</code></th> <th>Unfilled + * Order Count</th> <th><code>cancelResult</code></th> + * <th><code>newOrderResult</code></th> + * <th><code>status</code></th> </tr> </thead> <tbody> + * <tr> <td + * rowspan=\"11\"><code>STOP_ON_FAILURE</code></td> <td + * rowspan=\"6\"><code>DO_NOTHING</code></td> <td + * rowspan=\"3\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"3\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td + * rowspan=\"5\"><code>CANCEL_ONLY</code></td> <td + * rowspan=\"3\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"2\">Exceeds Limits</td> <td>❌ + * <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>429</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>429</code></td> </tr> <tr> <td + * rowspan=\"16\"><code>ALLOW_FAILURE</code></td> <td + * rowspan=\"8\"><code>DO_NOTHING</code></td> <td + * rowspan=\"4\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>409</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"4\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td + * rowspan=\"8\"><CODE>CANCEL_ONLY</CODE></td> <td + * rowspan=\"4\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>409</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"4\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>N/A</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> </tbody> + * </table> **Notes:** - The performance for canceling an order (single cancel or as part + * of a cancel-replace) is always better when only `orderId` is sent. Sending + * `origClientOrderId` or both `orderId` + `origClientOrderId` + * will be slower. * * @param orderCancelReplaceRequest (required) * @return ApiResponse<OrderCancelReplaceResponse> @@ -1313,12 +1477,12 @@ private okhttp3.Call orderCancelReplaceValidateBeforeCall( * * * - * + * *
Response Details
Status Code Description Response Headers
200 Cancel an Existing Order and Send a New Order -
200 Both cancel and new order succeed -
* * @see Cancel - * an Existing Order and Send a New Order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-cancel-replace">Cancel + * an Existing Order and Send a New Order (TRADE) Documentation */ public ApiResponse orderCancelReplace( @Valid @NotNull OrderCancelReplaceRequest orderCancelReplaceRequest) @@ -1343,8 +1507,8 @@ public ApiResponse orderCancelReplace( * * * @see New - * Order list - OCO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-oco">New + * Order list - OCO (TRADE) Documentation */ private okhttp3.Call orderListOcoCall(OrderListOcoRequest orderListOcoRequest) throws ApiException { @@ -1581,20 +1745,22 @@ private okhttp3.Call orderListOcoValidateBeforeCall(OrderListOcoRequest orderLis } /** - * New Order list - OCO Send in an one-cancels-the-other (OCO) pair, where activation of one - * order immediately cancels the other. * An OCO has 2 orders called the **above order** and - * **below order**. * One of the orders must be a + * New Order list - OCO (TRADE) Send in an one-cancels-the-other (OCO) pair, where activation of + * one order immediately cancels the other. - An OCO has 2 orders called the **above order** and + * **below order**. - One of the orders must be a * `LIMIT_MAKER/TAKE_PROFIT/TAKE_PROFIT_LIMIT` order and the other must be - * `STOP_LOSS` or `STOP_LOSS_LIMIT` order. * Price restrictions * If the OCO - * is on the `SELL` side: * `LIMIT_MAKER/TAKE_PROFIT_LIMIT` + * `STOP_LOSS` or `STOP_LOSS_LIMIT` order. - Price restrictions - If the OCO + * is on the `SELL` side: - `LIMIT_MAKER/TAKE_PROFIT_LIMIT` * `price` > Last Traded Price > `STOP_LOSS/STOP_LOSS_LIMIT` - * `stopPrice` * `TAKE_PROFIT stopPrice` > Last Traded Price > - * `STOP_LOSS/STOP_LOSS_LIMIT stopPrice` * If the OCO is on the `BUY` side: - * * `LIMIT_MAKER/TAKE_PROFIT_LIMIT price` < Last Traded Price < - * `stopPrice` * `TAKE_PROFIT stopPrice` < Last Traded Price < + * `stopPrice` - `TAKE_PROFIT stopPrice` > Last Traded Price > + * `STOP_LOSS/STOP_LOSS_LIMIT stopPrice` - If the OCO is on the `BUY` side: + * - `LIMIT_MAKER/TAKE_PROFIT_LIMIT price` < Last Traded Price < + * `stopPrice` - `TAKE_PROFIT stopPrice` < Last Traded Price < * `STOP_LOSS/STOP_LOSS_LIMIT stopPrice` * OCOs add **2 orders** to the - * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Weight: 1 - * Unfilled Order Count: 2 + * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. - OCOs add + * 2 orders to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` + * filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** + * Matching Engine * * @param orderListOcoRequest (required) * @return ApiResponse<OrderListOcoResponse> @@ -1608,8 +1774,8 @@ private okhttp3.Call orderListOcoValidateBeforeCall(OrderListOcoRequest orderLis * * * @see New - * Order list - OCO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-oco">New + * Order list - OCO (TRADE) Documentation */ public ApiResponse orderListOco( @Valid @NotNull OrderListOcoRequest orderListOcoRequest) throws ApiException { @@ -1633,8 +1799,8 @@ public ApiResponse orderListOco( * * * @see New - * Order List - OPO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-opo">New + * Order List - OPO (TRADE) Documentation */ private okhttp3.Call orderListOpoCall(OrderListOpoRequest orderListOpoRequest) throws ApiException { @@ -1878,8 +2044,10 @@ private okhttp3.Call orderListOpoValidateBeforeCall(OrderListOpoRequest orderLis } /** - * New Order List - OPO Place an [OPO](./faqs/opo.md). * OPOs add 2 orders to the - * EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS filter. Weight: 1 Unfilled Order Count: 2 + * New Order List - OPO (TRADE) Place an [OPO](/products/spot/faqs/opo). - OPOs add 2 orders to + * the `EXCHANGE_MAX_NUM_ORDERS`` filter and `MAX_NUM_ORDERS`` + * filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** + * Matching Engine * * @param orderListOpoRequest (required) * @return ApiResponse<OrderListOpoResponse> @@ -1893,8 +2061,8 @@ private okhttp3.Call orderListOpoValidateBeforeCall(OrderListOpoRequest orderLis * * * @see New - * Order List - OPO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-opo">New + * Order List - OPO (TRADE) Documentation */ public ApiResponse orderListOpo( @Valid @NotNull OrderListOpoRequest orderListOpoRequest) throws ApiException { @@ -1918,8 +2086,8 @@ public ApiResponse orderListOpo( * * * @see New - * Order List - OPOCO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-opoco">New + * Order List - OPOCO (TRADE) Documentation */ private okhttp3.Call orderListOpocoCall(OrderListOpocoRequest orderListOpocoRequest) throws ApiException { @@ -2246,7 +2414,8 @@ private okhttp3.Call orderListOpocoValidateBeforeCall( } /** - * New Order List - OPOCO Place an [OPOCO](./faqs/opo.md). Weight: 1 Unfilled Order Count: 3 + * New Order List - OPOCO (TRADE) Place an [OPOCO](/products/spot/faqs/opo). Weight(IP): 1 + * Unfilled Order Count: 3 Security Type: TRADE Notes: **Data Source:** Matching Engine * * @param orderListOpocoRequest (required) * @return ApiResponse<OrderListOpocoResponse> @@ -2260,8 +2429,8 @@ private okhttp3.Call orderListOpocoValidateBeforeCall( * * * @see New - * Order List - OPOCO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-opoco">New + * Order List - OPOCO (TRADE) Documentation */ public ApiResponse orderListOpoco( @Valid @NotNull OrderListOpocoRequest orderListOpocoRequest) throws ApiException { @@ -2285,8 +2454,8 @@ public ApiResponse orderListOpoco( * * * @see New - * Order list - OTO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-oto">New + * Order list - OTO (TRADE) Documentation */ private okhttp3.Call orderListOtoCall(OrderListOtoRequest orderListOtoRequest) throws ApiException { @@ -2378,6 +2547,10 @@ private okhttp3.Call orderListOtoCall(OrderListOtoRequest orderListOtoRequest) "workingStrategyType", orderListOtoRequest.getWorkingStrategyType()); } + if (orderListOtoRequest.getPendingType() != null) { + localVarFormParams.put("pendingType", orderListOtoRequest.getPendingType()); + } + if (orderListOtoRequest.getWorkingPegPriceType() != null) { localVarFormParams.put( "workingPegPriceType", orderListOtoRequest.getWorkingPegPriceType()); @@ -2393,10 +2566,6 @@ private okhttp3.Call orderListOtoCall(OrderListOtoRequest orderListOtoRequest) "workingPegOffsetValue", orderListOtoRequest.getWorkingPegOffsetValue()); } - if (orderListOtoRequest.getPendingType() != null) { - localVarFormParams.put("pendingType", orderListOtoRequest.getPendingType()); - } - if (orderListOtoRequest.getPendingSide() != null) { localVarFormParams.put("pendingSide", orderListOtoRequest.getPendingSide()); } @@ -2537,19 +2706,30 @@ private okhttp3.Call orderListOtoValidateBeforeCall(OrderListOtoRequest orderLis } /** - * New Order list - OTO Place an OTO. * An OTO (One-Triggers-the-Other) is an order list - * comprised of 2 orders. * The first order is called the **working order** and must be + * New Order list - OTO (TRADE) Place an OTO. - An OTO (One-Triggers-the-Other) is an order list + * comprised of 2 orders. - The first order is called the **working order** and must be * `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the - * order book. * The second order is called the **pending order**. It can be any order type + * order book. - The second order is called the **pending order**. It can be any order type * except for `MARKET` orders using parameter `quoteOrderQty`. The pending - * order is only placed on the order book when the working order gets **fully filled**. * If + * order is only placed on the order book when the working order gets **fully filled**. - If * either the working order or the pending order is cancelled individually, the other order in - * the order list will also be canceled or expired. * When the order list is placed, if the + * the order list will also be canceled or expired. - When the order list is placed, if the * working order gets **immediately fully filled**, the placement response will show the working * order as `FILLED` but the pending order will still appear as * `PENDING_NEW`. You need to query the status of the pending order again to see its - * updated status. * OTOs add **2 orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and - * `MAX_NUM_ORDERS` filter. Weight: 1 Unfilled Order Count: 2 + * updated status. - OTOs add **2 orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and + * `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE + * Notes: **Data Source:** Matching Engine **Mandatory parameters based on + * `pendingType` or `workingType`** Depending on the `pendingType` + * or `workingType`, some optional parameters will become mandatory. |Type |Additional + * mandatory parameters|Additional information| |---- |---- |------ |`workingType` + * = `LIMIT` |`workingTimeInForce` | |`pendingType` = + * `LIMIT` |`pendingPrice`, `pendingTimeInForce` | + * |`pendingType` = `STOP_LOSS` or `TAKE_PROFIT` + * |`pendingStopPrice` and/or `pendingTrailingDelta`| + * |`pendingType` = `STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT`|`pendingPrice`, `pendingStopPrice` and/or + * `pendingTrailingDelta`, `pendingTimeInForce`| * * @param orderListOtoRequest (required) * @return ApiResponse<OrderListOtoResponse> @@ -2563,8 +2743,8 @@ private okhttp3.Call orderListOtoValidateBeforeCall(OrderListOtoRequest orderLis * * * @see New - * Order list - OTO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-oto">New + * Order list - OTO (TRADE) Documentation */ public ApiResponse orderListOto( @Valid @NotNull OrderListOtoRequest orderListOtoRequest) throws ApiException { @@ -2588,8 +2768,8 @@ public ApiResponse orderListOto( * * * @see New - * Order list - OTOCO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-otoco">New + * Order list - OTOCO (TRADE) Documentation */ private okhttp3.Call orderListOtocoCall(OrderListOtocoRequest orderListOtocoRequest) throws ApiException { @@ -2923,16 +3103,34 @@ private okhttp3.Call orderListOtocoValidateBeforeCall( } /** - * New Order list - OTOCO Place an OTOCO. * An OTOCO (One-Triggers-One-Cancels-the-Other) is an - * order list comprised of 3 orders. * The first order is called the **working order** and must - * be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on - * the order book. * The behavior of the working order is the same as the - * [OTO](#new-order-list---oto-trade). * OTOCO has 2 pending orders (pending above and pending - * below), forming an OCO pair. The pending orders are only placed on the order book when the - * working order gets **fully filled**. * The rules of the pending above and pending below - * follow the same rules as the [Order list OCO](#new-order-list---oco-trade). * OTOCOs add **3 - * orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` - * filter. Weight: 1 Unfilled Order Count: 3 + * New Order list - OTOCO (TRADE) Place an OTOCO. - An OTOCO + * (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders. - The first + * order is called the **working order** and must be `LIMIT` or + * `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The + * behavior of the working order is the same as the [OTO](#order-list-oto). - OTOCO has 2 + * pending orders (pending above and pending below), forming an OCO pair. The pending orders are + * only placed on the order book when the working order gets **fully filled**. - The rules of + * the pending above and pending below follow the same rules as the [Order list + * OCO](#order-list-oco). - OTOCOs add **3 orders** to the `EXCHANGE_MAX_NUM_ORDERS` + * filter and `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 3 Security + * Type: TRADE Notes: **Data Source:** Matching Engine **Mandatory parameters based on + * `pendingAboveType`, `pendingBelowType` or `workingType`** + * Depending on the `pendingAboveType`/`pendingBelowType` or + * `workingType`, some optional parameters will become mandatory. |Type |Additional + * mandatory parameters|Additional information| |---- |---- |------ |`workingType` + * = `LIMIT` |`workingTimeInForce` | + * |`pendingAboveType`= `LIMIT_MAKER` |`pendingAbovePrice` | + * |`pendingAboveType` = `STOP_LOSS/TAKE_PROFIT` + * |`pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`| + * |`pendingAboveType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT` + * |`pendingAbovePrice`, `pendingAboveStopPrice` and/or + * `pendingAboveTrailingDelta`, `pendingAboveTimeInForce`| + * |`pendingBelowType`= `LIMIT_MAKER` |`pendingBelowPrice` | + * |`pendingBelowType= STOP_LOSS/TAKE_PROFIT` |`pendingBelowStopPrice` + * and/or `pendingBelowTrailingDelta`| + * |`pendingBelowType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT` + * |`pendingBelowPrice`, `pendingBelowStopPrice` and/or + * `pendingBelowTrailingDelta`, `pendingBelowTimeInForce`| * * @param orderListOtocoRequest (required) * @return ApiResponse<OrderListOtocoResponse> @@ -2946,8 +3144,8 @@ private okhttp3.Call orderListOtocoValidateBeforeCall( * * * @see New - * Order list - OTOCO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-otoco">New + * Order list - OTOCO (TRADE) Documentation */ public ApiResponse orderListOtoco( @Valid @NotNull OrderListOtocoRequest orderListOtocoRequest) throws ApiException { @@ -2972,8 +3170,8 @@ public ApiResponse orderListOtoco( * * @deprecated * @see New - * OCO - Deprecated Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-oco">New + * OCO - Deprecated (TRADE) Documentation */ @Deprecated private okhttp3.Call orderOcoCall(OrderOcoRequest orderOcoRequest) throws ApiException { @@ -3159,12 +3357,13 @@ private okhttp3.Call orderOcoValidateBeforeCall(OrderOcoRequest orderOcoRequest) } /** - * New OCO - Deprecated Send in a new OCO. * Price Restrictions: * `SELL`: Limit Price - * > Last Price > Stop Price * `BUY`: Limit Price < Last Price < Stop - * Price * Quantity Restrictions: * Both legs must have the same quantity. * `ICEBERG` - * quantities however do not have to be the same * `OCO` adds **2 orders** to the - * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Weight: 1 - * Unfilled Order Count: 2 + * New OCO - Deprecated (TRADE) Send in a new OCO. - Price Restrictions: - `SELL`: + * Limit Price > Last Price > Stop Price - `BUY`: Limit Price < Last Price + * < Stop Price - Quantity Restrictions: - Both legs must have the same quantity. - + * `ICEBERG` quantities however do not have to be the same - `OCO` adds **2 + * orders** to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` + * filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** + * Matching Engine * * @param orderOcoRequest (required) * @return ApiResponse<OrderOcoResponse> @@ -3179,8 +3378,8 @@ private okhttp3.Call orderOcoValidateBeforeCall(OrderOcoRequest orderOcoRequest) * * @deprecated * @see New - * OCO - Deprecated Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-oco">New + * OCO - Deprecated (TRADE) Documentation */ @Deprecated public ApiResponse orderOco(@Valid @NotNull OrderOcoRequest orderOcoRequest) @@ -3204,8 +3403,8 @@ public ApiResponse orderOco(@Valid @NotNull OrderOcoRequest or * * * @see Test - * new order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-test">Test + * new order (TRADE) Documentation */ private okhttp3.Call orderTestCall(OrderTestRequest orderTestRequest) throws ApiException { String basePath = null; @@ -3387,10 +3586,10 @@ private okhttp3.Call orderTestValidateBeforeCall(OrderTestRequest orderTestReque } /** - * Test new order Test new order creation and signature/recvWindow long. Creates and validates a - * new order but does not send it into the matching engine. Weight: |Condition| Request Weight| - * |------------ | ------------ | |Without `computeCommissionRates`| 1| |With - * `computeCommissionRates`|20| + * Test new order (TRADE) Test new order creation and signature/recvWindow long. Creates and + * validates a new order but does not send it into the matching engine. Weight: + * |Condition|Weight| |---|---| |Without `computeCommissionRates`|1| |With + * `computeCommissionRates`|20| Security Type: TRADE Notes: **Data Source:** Memory * * @param orderTestRequest (required) * @return ApiResponse<OrderTestResponse> @@ -3404,8 +3603,8 @@ private okhttp3.Call orderTestValidateBeforeCall(OrderTestRequest orderTestReque * * * @see Test - * new order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-test">Test + * new order (TRADE) Documentation */ public ApiResponse orderTest( @Valid @NotNull OrderTestRequest orderTestRequest) throws ApiException { @@ -3428,8 +3627,8 @@ public ApiResponse orderTest( * * * @see New - * order using SOR Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#sor-order">New + * order using SOR (TRADE) Documentation */ private okhttp3.Call sorOrderCall(SorOrderRequest sorOrderRequest) throws ApiException { String basePath = null; @@ -3578,9 +3777,12 @@ private okhttp3.Call sorOrderValidateBeforeCall(SorOrderRequest sorOrderRequest) } /** - * New order using SOR Places an order using smart order routing (SOR). This adds 1 order to the - * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [SOR - * FAQ](faqs/sor_faq.md) to learn more. Weight: 1 Unfilled Order Count: 1 + * New order using SOR (TRADE) Places an order using smart order routing (SOR). This adds 1 + * order to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` + * filter. Read [SOR FAQ](/products/spot/faqs/sor_faq) to learn more. Weight(IP): 1 Unfilled + * Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine **Note:** + * `POST /api/v3/sor/order` only supports `LIMIT` and `MARKET` + * orders. `quoteOrderQty` is not supported. * * @param sorOrderRequest (required) * @return ApiResponse<SorOrderResponse> @@ -3594,8 +3796,8 @@ private okhttp3.Call sorOrderValidateBeforeCall(SorOrderRequest sorOrderRequest) * * * @see New - * order using SOR Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#sor-order">New + * order using SOR (TRADE) Documentation */ public ApiResponse sorOrder(@Valid @NotNull SorOrderRequest sorOrderRequest) throws ApiException { @@ -3618,8 +3820,8 @@ public ApiResponse sorOrder(@Valid @NotNull SorOrderRequest so * * * @see Test - * new order using SOR Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#sor-order-test">Test + * new order using SOR (TRADE) Documentation */ private okhttp3.Call sorOrderTestCall(SorOrderTestRequest sorOrderTestRequest) throws ApiException { @@ -3775,10 +3977,11 @@ private okhttp3.Call sorOrderTestValidateBeforeCall(SorOrderTestRequest sorOrder } /** - * Test new order using SOR Test new order creation and signature/recvWindow using smart order - * routing (SOR). Creates and validates a new order but does not send it into the matching - * engine. Weight: | Condition | Request Weight | | --------- | -------------- | | Without - * `computeCommissionRates` | 1 | | With `computeCommissionRates` | 20 | + * Test new order using SOR (TRADE) Test new order creation and signature/recvWindow using smart + * order routing (SOR). Creates and validates a new order but does not send it into the matching + * engine. Weight: |Condition|Weight| |---|---| |Without `computeCommissionRates`|1| + * |With `computeCommissionRates`|20| Security Type: TRADE Notes: **Data Source:** + * Memory * * @param sorOrderTestRequest (required) * @return ApiResponse<SorOrderTestResponse> @@ -3792,8 +3995,8 @@ private okhttp3.Call sorOrderTestValidateBeforeCall(SorOrderTestRequest sorOrder * * * @see Test - * new order using SOR Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#sor-order-test">Test + * new order using SOR (TRADE) Documentation */ public ApiResponse sorOrderTest( @Valid @NotNull SorOrderTestRequest sorOrderTestRequest) throws ApiException { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AbovePegOffsetType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AbovePegOffsetType.java index bcc6172c8..dd155e742 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AbovePegOffsetType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AbovePegOffsetType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AbovePegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AbovePegPriceType.java index eeda657a8..f729323de 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AbovePegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AbovePegPriceType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets abovePegPriceType */ +/** + * `PRIMARY_PEG` or `MARKET_PEG`. See [Pegged + * Orders](/products/spot/faqs/pegged_orders) + */ @JsonAdapter(AbovePegPriceType.Adapter.class) public enum AbovePegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AboveTimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AboveTimeInForce.java index 0361fe54c..484260c48 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AboveTimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AboveTimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets aboveTimeInForce */ +/** + * Required if `aboveType` is `STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT`. + */ @JsonAdapter(AboveTimeInForce.Adapter.class) public enum AboveTimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AboveType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AboveType.java index f1349683f..166719a56 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AboveType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AboveType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponse.java index aba7e3252..1279371ed 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** AccountCommissionResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountCommissionResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponseDiscount.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponseDiscount.java index da741a5c5..a1d25a071 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponseDiscount.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponseDiscount.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** AccountCommissionResponseDiscount */ +/** Discount commission when paying in BNB */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountCommissionResponseDiscount { public static final String SERIALIZED_NAME_ENABLED_FOR_ACCOUNT = "enabledForAccount"; @@ -129,7 +129,7 @@ public AccountCommissionResponseDiscount discount( } /** - * Get discount + * Standard commission is reduced by this rate when paying commission in BNB. * * @return discount */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponseSpecialCommission.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponseSpecialCommission.java index 3f7af5705..f5631319d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponseSpecialCommission.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponseSpecialCommission.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** AccountCommissionResponseSpecialCommission */ +/** Special commission rates from the order. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountCommissionResponseSpecialCommission { public static final String SERIALIZED_NAME_MAKER = "maker"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponseStandardCommission.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponseStandardCommission.java index 53eab3cc2..674e0eadc 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponseStandardCommission.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponseStandardCommission.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** AccountCommissionResponseStandardCommission */ +/** Commission rates on trades from the order. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountCommissionResponseStandardCommission { public static final String SERIALIZED_NAME_MAKER = "maker"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponseTaxCommission.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponseTaxCommission.java index e3abf3ebd..e460878b2 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponseTaxCommission.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AccountCommissionResponseTaxCommission.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** AccountCommissionResponseTaxCommission */ +/** Tax commission rates for trades from the order. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountCommissionResponseTaxCommission { public static final String SERIALIZED_NAME_MAKER = "maker"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AggTradesResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AggTradesResponse.java index 47de697c7..ea7eb0442 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AggTradesResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AggTradesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AggTradesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AggTradesResponse extends ArrayList { public AggTradesResponse() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AggTradesResponseInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AggTradesResponseInner.java index e28dd6a9a..f0d2241cc 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AggTradesResponseInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AggTradesResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AggTradesResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AggTradesResponseInner { public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; @@ -92,7 +92,7 @@ public AggTradesResponseInner aLowerCase(@jakarta.annotation.Nullable Long aLowe } /** - * Get aLowerCase + * Aggregate tradeId * * @return aLowerCase */ @@ -111,7 +111,7 @@ public AggTradesResponseInner pLowerCase(@jakarta.annotation.Nullable String pLo } /** - * Get pLowerCase + * Price * * @return pLowerCase */ @@ -130,7 +130,7 @@ public AggTradesResponseInner qLowerCase(@jakarta.annotation.Nullable String qLo } /** - * Get qLowerCase + * Quantity * * @return qLowerCase */ @@ -149,7 +149,7 @@ public AggTradesResponseInner fLowerCase(@jakarta.annotation.Nullable Long fLowe } /** - * Get fLowerCase + * First tradeId * * @return fLowerCase */ @@ -168,7 +168,7 @@ public AggTradesResponseInner lLowerCase(@jakarta.annotation.Nullable Long lLowe } /** - * Get lLowerCase + * Last tradeId * * @return lLowerCase */ @@ -187,7 +187,7 @@ public AggTradesResponseInner T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Timestamp * * @return T */ @@ -206,7 +206,7 @@ public AggTradesResponseInner mLowerCase(@jakarta.annotation.Nullable Boolean mL } /** - * Get mLowerCase + * Was the buyer the maker? * * @return mLowerCase */ @@ -225,7 +225,7 @@ public AggTradesResponseInner M(@jakarta.annotation.Nullable Boolean M) { } /** - * Get M + * Was the trade the best price match? * * @return M */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrderListResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrderListResponse.java index d85ccab16..13c02248a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrderListResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrderListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AllOrderListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllOrderListResponse extends ArrayList { public AllOrderListResponse() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrderListResponseInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrderListResponseInner.java index 8ce1e4f2d..b2e57e410 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrderListResponseInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrderListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** AllOrderListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllOrderListResponseInner { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrderListResponseInnerOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrderListResponseInnerOrdersInner.java index e49890db8..b7ac44675 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrderListResponseInnerOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrderListResponseInnerOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AllOrderListResponseInnerOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllOrderListResponseInnerOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrdersResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrdersResponse.java index e21f143c9..d17c6c52d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrdersResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AllOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllOrdersResponse extends ArrayList { public AllOrdersResponse() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrdersResponseInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrdersResponseInner.java index 53b7ac455..e81c901f0 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrdersResponseInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AllOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AllOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllOrdersResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -157,6 +157,84 @@ public class AllOrdersResponseInner { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public AllOrdersResponseInner() {} public AllOrdersResponseInner symbol(@jakarta.annotation.Nullable String symbol) { @@ -203,7 +281,7 @@ public AllOrdersResponseInner orderListId(@jakarta.annotation.Nullable Long orde } /** - * Get orderListId + * Unless it's part of an order list, value will be -1 * * @return orderListId */ @@ -394,7 +472,7 @@ public AllOrdersResponseInner stopPrice(@jakarta.annotation.Nullable String stop } /** - * Get stopPrice + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. * * @return stopPrice */ @@ -413,7 +491,7 @@ public AllOrdersResponseInner icebergQty(@jakarta.annotation.Nullable String ice } /** - * Get icebergQty + * Appears only if the parameter icebergQty was sent in the request. * * @return icebergQty */ @@ -543,6 +621,255 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public AllOrdersResponseInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public AllOrdersResponseInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public AllOrdersResponseInner strategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public AllOrdersResponseInner strategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public AllOrdersResponseInner trailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public AllOrdersResponseInner trailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public AllOrdersResponseInner usedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public AllOrdersResponseInner workingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public AllOrdersResponseInner pegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public AllOrdersResponseInner pegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public AllOrdersResponseInner pegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public AllOrdersResponseInner peggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public AllOrdersResponseInner expiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -574,7 +901,20 @@ public boolean equals(Object o) { && Objects.equals(this.workingTime, allOrdersResponseInner.workingTime) && Objects.equals( this.selfTradePreventionMode, - allOrdersResponseInner.selfTradePreventionMode); + allOrdersResponseInner.selfTradePreventionMode) + && Objects.equals(this.preventedMatchId, allOrdersResponseInner.preventedMatchId) + && Objects.equals(this.preventedQuantity, allOrdersResponseInner.preventedQuantity) + && Objects.equals(this.strategyId, allOrdersResponseInner.strategyId) + && Objects.equals(this.strategyType, allOrdersResponseInner.strategyType) + && Objects.equals(this.trailingDelta, allOrdersResponseInner.trailingDelta) + && Objects.equals(this.trailingTime, allOrdersResponseInner.trailingTime) + && Objects.equals(this.usedSor, allOrdersResponseInner.usedSor) + && Objects.equals(this.workingFloor, allOrdersResponseInner.workingFloor) + && Objects.equals(this.pegPriceType, allOrdersResponseInner.pegPriceType) + && Objects.equals(this.pegOffsetType, allOrdersResponseInner.pegOffsetType) + && Objects.equals(this.pegOffsetValue, allOrdersResponseInner.pegOffsetValue) + && Objects.equals(this.peggedPrice, allOrdersResponseInner.peggedPrice) + && Objects.equals(this.expiryReason, allOrdersResponseInner.expiryReason); } @Override @@ -599,7 +939,20 @@ public int hashCode() { isWorking, origQuoteOrderQty, workingTime, - selfTradePreventionMode); + selfTradePreventionMode, + preventedMatchId, + preventedQuantity, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -630,6 +983,19 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -723,6 +1089,60 @@ public String toUrlQueryString() { sb.append("selfTradePreventionMode=") .append(urlEncode(selfTradePreventionModeValueAsString)) .append(""); + Object preventedMatchIdValue = getPreventedMatchId(); + String preventedMatchIdValueAsString = ""; + preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + sb.append("preventedMatchId=").append(urlEncode(preventedMatchIdValueAsString)).append(""); + Object preventedQuantityValue = getPreventedQuantity(); + String preventedQuantityValueAsString = ""; + preventedQuantityValueAsString = preventedQuantityValue.toString(); + sb.append("preventedQuantity=") + .append(urlEncode(preventedQuantityValueAsString)) + .append(""); + Object strategyIdValue = getStrategyId(); + String strategyIdValueAsString = ""; + strategyIdValueAsString = strategyIdValue.toString(); + sb.append("strategyId=").append(urlEncode(strategyIdValueAsString)).append(""); + Object strategyTypeValue = getStrategyType(); + String strategyTypeValueAsString = ""; + strategyTypeValueAsString = strategyTypeValue.toString(); + sb.append("strategyType=").append(urlEncode(strategyTypeValueAsString)).append(""); + Object trailingDeltaValue = getTrailingDelta(); + String trailingDeltaValueAsString = ""; + trailingDeltaValueAsString = trailingDeltaValue.toString(); + sb.append("trailingDelta=").append(urlEncode(trailingDeltaValueAsString)).append(""); + Object trailingTimeValue = getTrailingTime(); + String trailingTimeValueAsString = ""; + trailingTimeValueAsString = trailingTimeValue.toString(); + sb.append("trailingTime=").append(urlEncode(trailingTimeValueAsString)).append(""); + Object usedSorValue = getUsedSor(); + String usedSorValueAsString = ""; + usedSorValueAsString = usedSorValue.toString(); + sb.append("usedSor=").append(urlEncode(usedSorValueAsString)).append(""); + Object workingFloorValue = getWorkingFloor(); + String workingFloorValueAsString = ""; + workingFloorValueAsString = workingFloorValue.toString(); + sb.append("workingFloor=").append(urlEncode(workingFloorValueAsString)).append(""); + Object pegPriceTypeValue = getPegPriceType(); + String pegPriceTypeValueAsString = ""; + pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + sb.append("pegPriceType=").append(urlEncode(pegPriceTypeValueAsString)).append(""); + Object pegOffsetTypeValue = getPegOffsetType(); + String pegOffsetTypeValueAsString = ""; + pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + sb.append("pegOffsetType=").append(urlEncode(pegOffsetTypeValueAsString)).append(""); + Object pegOffsetValueValue = getPegOffsetValue(); + String pegOffsetValueValueAsString = ""; + pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + sb.append("pegOffsetValue=").append(urlEncode(pegOffsetValueValueAsString)).append(""); + Object peggedPriceValue = getPeggedPrice(); + String peggedPriceValueAsString = ""; + peggedPriceValueAsString = peggedPriceValue.toString(); + sb.append("peggedPrice=").append(urlEncode(peggedPriceValueAsString)).append(""); + Object expiryReasonValue = getExpiryReason(); + String expiryReasonValueAsString = ""; + expiryReasonValueAsString = expiryReasonValue.toString(); + sb.append("expiryReason=").append(urlEncode(expiryReasonValueAsString)).append(""); return sb.toString(); } @@ -771,6 +1191,19 @@ private String toIndentedString(Object o) { openapiFields.add("origQuoteOrderQty"); openapiFields.add("workingTime"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -909,6 +1342,55 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AssetFilters.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AssetFilters.java deleted file mode 100644 index af44c3955..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AssetFilters.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.rest.model; - -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.binance.connector.client.spot.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AssetFilters extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(AssetFilters.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AssetFilters.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AssetFilters' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterMaxAssetFilter = - gson.getDelegateAdapter(this, TypeToken.get(MaxAssetFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AssetFilters value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `MaxAssetFilter` - if (value.getActualInstance() instanceof MaxAssetFilter) { - JsonElement element = - adapterMaxAssetFilter.toJsonTree( - (MaxAssetFilter) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " MaxAssetFilter"); - } - - @Override - public AssetFilters read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - JsonObject jsonObject = jsonElement.getAsJsonObject(); - - // use discriminator value for faster oneOf lookup - AssetFilters newAssetFilters = new AssetFilters(); - if (jsonObject.get("filterType") == null) { - log.log( - Level.WARNING, - "Failed to lookup discriminator value for AssetFilters as" - + " `filterType` was not found in the payload or the" - + " payload is empty."); - } else { - // look up the discriminator value in the field `filterType` - switch (jsonObject.get("filterType").getAsString()) { - case "MAX_ASSET": - deserialized = - adapterMaxAssetFilter.fromJsonTree(jsonObject); - newAssetFilters.setActualInstance(deserialized); - return newAssetFilters; - case "MaxAssetFilter": - deserialized = - adapterMaxAssetFilter.fromJsonTree(jsonObject); - newAssetFilters.setActualInstance(deserialized); - return newAssetFilters; - default: - log.log( - Level.WARNING, - String.format( - "Failed to lookup discriminator value `%s`" - + " for AssetFilters. Possible values:" - + " MAX_ASSET MaxAssetFilter", - jsonObject - .get("filterType") - .getAsString())); - } - } - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize MaxAssetFilter - try { - // validate the JSON object to see if any exception is thrown - MaxAssetFilter.validateJsonElement(jsonElement); - actualAdapter = adapterMaxAssetFilter; - match++; - log.log(Level.FINER, "Input data matches schema 'MaxAssetFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for MaxAssetFilter failed with" - + " `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'MaxAssetFilter'", - e); - } - - if (match == 1) { - AssetFilters ret = new AssetFilters(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for AssetFilters: %d classes" - + " match result, expected 1. Detailed failure" - + " message for oneOf schemas: %s. JSON: %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public AssetFilters() { - super("oneOf", Boolean.FALSE); - } - - public AssetFilters(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("MaxAssetFilter", MaxAssetFilter.class); - } - - @Override - public Map> getSchemas() { - return AssetFilters.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: MaxAssetFilter - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof MaxAssetFilter) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be MaxAssetFilter"); - } - - /** - * Get the actual instance, which can be the following: MaxAssetFilter - * - * @return The actual instance (MaxAssetFilter) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `MaxAssetFilter`. If the actual instance is not `MaxAssetFilter`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `MaxAssetFilter` - * @throws ClassCastException if the instance is not `MaxAssetFilter` - */ - public MaxAssetFilter getMaxAssetFilter() throws ClassCastException { - return (MaxAssetFilter) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AssetFilters - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with MaxAssetFilter - try { - MaxAssetFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for MaxAssetFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for AssetFilters with oneOf schemas:" - + " MaxAssetFilter. %d class(es) match the result, expected 1." - + " Detailed failure message for oneOf schemas: %s. JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of AssetFilters given an JSON string - * - * @param jsonString JSON string - * @return An instance of AssetFilters - * @throws IOException if the JSON string is invalid with respect to AssetFilters - */ - public static AssetFilters fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AssetFilters.class); - } - - /** - * Convert an instance of AssetFilters to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AvgPriceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AvgPriceResponse.java index f32bd18e6..5df25740a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AvgPriceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/AvgPriceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AvgPriceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AvgPriceResponse { public static final String SERIALIZED_NAME_MINS = "mins"; @@ -62,7 +62,7 @@ public AvgPriceResponse mins(@jakarta.annotation.Nullable Long mins) { } /** - * Get mins + * Average price interval (in minutes) * * @return mins */ @@ -81,7 +81,7 @@ public AvgPriceResponse price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Average price * * @return price */ @@ -100,7 +100,7 @@ public AvgPriceResponse closeTime(@jakarta.annotation.Nullable Long closeTime) { } /** - * Get closeTime + * Last trade time * * @return closeTime */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/BelowPegOffsetType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/BelowPegOffsetType.java index 9a2bb3174..b2413f8d0 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/BelowPegOffsetType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/BelowPegOffsetType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/BelowPegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/BelowPegPriceType.java index e376004f6..c96b95011 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/BelowPegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/BelowPegPriceType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets belowPegPriceType */ +/** See [Pegged Orders](/products/spot/faqs/pegged_orders) */ @JsonAdapter(BelowPegPriceType.Adapter.class) public enum BelowPegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/BelowTimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/BelowTimeInForce.java index 6c27e5ccf..844cf2135 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/BelowTimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/BelowTimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets belowTimeInForce */ +/** + * Required if `belowType` is `STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT`. + */ @JsonAdapter(BelowTimeInForce.Adapter.class) public enum BelowTimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/BelowType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/BelowType.java index 1e70b932c..2824797ab 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/BelowType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/BelowType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets belowType */ +/** + * Supported values: `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, + * `TAKE_PROFIT_LIMIT` + */ @JsonAdapter(BelowType.Adapter.class) public enum BelowType { STOP_LOSS("STOP_LOSS"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/CancelReplaceMode.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/CancelReplaceMode.java index 137009663..63f8b71a5 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/CancelReplaceMode.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/CancelReplaceMode.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,11 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets cancelReplaceMode */ +/** + * The allowed values are: <br/> `STOP_ON_FAILURE` - If the cancel request fails, + * the new order placement will not be attempted. <br/> `ALLOW_FAILURE` - new order + * placement will be attempted even if cancel request fails. + */ @JsonAdapter(CancelReplaceMode.Adapter.class) public enum CancelReplaceMode { STOP_ON_FAILURE("STOP_ON_FAILURE"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/CancelRestrictions.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/CancelRestrictions.java index bea4f3839..4ea0a0284 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/CancelRestrictions.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/CancelRestrictions.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,16 +21,16 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets cancelRestrictions */ +/** + * Supported values: <br>`ONLY_NEW` - Cancel will succeed if the order status is + * `NEW`.<br> `ONLY_PARTIALLY_FILLED ` - Cancel will succeed if order + * status is `PARTIALLY_FILLED`. + */ @JsonAdapter(CancelRestrictions.Adapter.class) public enum CancelRestrictions { ONLY_NEW("ONLY_NEW"), - NEW("NEW"), - - ONLY_PARTIALLY_FILLED("ONLY_PARTIALLY_FILLED"), - - PARTIALLY_FILLED("PARTIALLY_FILLED"); + ONLY_PARTIALLY_FILLED("ONLY_PARTIALLY_FILLED"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOpenOrdersResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOpenOrdersResponse.java index a735ebbd9..cbbce4641 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOpenOrdersResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DeleteOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DeleteOpenOrdersResponse extends ArrayList { public DeleteOpenOrdersResponse() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOpenOrdersResponseInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOpenOrdersResponseInner.java index 412444fd2..eb74805bf 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOpenOrdersResponseInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOpenOrdersResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DeleteOpenOrdersResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DeleteOpenOrdersResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOrderListResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOrderListResponse.java index de851815d..3266285a6 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOrderListResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOrderListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** DeleteOrderListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DeleteOrderListResponse { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOrderListResponseOrderReportsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOrderListResponseOrderReportsInner.java index 7017092c8..ffb0f3db2 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOrderListResponseOrderReportsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOrderListResponseOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DeleteOrderListResponseOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DeleteOrderListResponseOrderReportsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -126,12 +126,23 @@ public class DeleteOrderListResponseOrderReportsInner { @jakarta.annotation.Nullable private String side; - public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = - "selfTradePreventionMode"; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; - @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) @jakarta.annotation.Nullable - private String selfTradePreventionMode; + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; @@ -139,6 +150,72 @@ public class DeleteOrderListResponseOrderReportsInner { @jakarta.annotation.Nullable private String stopPrice; + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public DeleteOrderListResponseOrderReportsInner() {} public DeleteOrderListResponseOrderReportsInner symbol( @@ -439,25 +516,64 @@ public void setSide(@jakarta.annotation.Nullable String side) { this.side = side; } - public DeleteOrderListResponseOrderReportsInner selfTradePreventionMode( - @jakarta.annotation.Nullable String selfTradePreventionMode) { - this.selfTradePreventionMode = selfTradePreventionMode; + public DeleteOrderListResponseOrderReportsInner icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public DeleteOrderListResponseOrderReportsInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public DeleteOrderListResponseOrderReportsInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; return this; } /** - * Get selfTradePreventionMode + * Order quantity that expired due to STP. * - * @return selfTradePreventionMode + * @return preventedQuantity */ @jakarta.annotation.Nullable - public String getSelfTradePreventionMode() { - return selfTradePreventionMode; + public String getPreventedQuantity() { + return preventedQuantity; } - public void setSelfTradePreventionMode( - @jakarta.annotation.Nullable String selfTradePreventionMode) { - this.selfTradePreventionMode = selfTradePreventionMode; + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; } public DeleteOrderListResponseOrderReportsInner stopPrice( @@ -467,7 +583,7 @@ public DeleteOrderListResponseOrderReportsInner stopPrice( } /** - * Get stopPrice + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. * * @return stopPrice */ @@ -480,6 +596,226 @@ public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { this.stopPrice = stopPrice; } + public DeleteOrderListResponseOrderReportsInner strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public DeleteOrderListResponseOrderReportsInner strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public DeleteOrderListResponseOrderReportsInner trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public DeleteOrderListResponseOrderReportsInner trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public DeleteOrderListResponseOrderReportsInner usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public DeleteOrderListResponseOrderReportsInner workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public DeleteOrderListResponseOrderReportsInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public DeleteOrderListResponseOrderReportsInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public DeleteOrderListResponseOrderReportsInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public DeleteOrderListResponseOrderReportsInner peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public DeleteOrderListResponseOrderReportsInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -517,10 +853,37 @@ public boolean equals(Object o) { && Objects.equals(this.type, deleteOrderListResponseOrderReportsInner.type) && Objects.equals(this.side, deleteOrderListResponseOrderReportsInner.side) && Objects.equals( - this.selfTradePreventionMode, - deleteOrderListResponseOrderReportsInner.selfTradePreventionMode) + this.icebergQty, deleteOrderListResponseOrderReportsInner.icebergQty) + && Objects.equals( + this.preventedMatchId, + deleteOrderListResponseOrderReportsInner.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + deleteOrderListResponseOrderReportsInner.preventedQuantity) + && Objects.equals( + this.stopPrice, deleteOrderListResponseOrderReportsInner.stopPrice) + && Objects.equals( + this.strategyId, deleteOrderListResponseOrderReportsInner.strategyId) + && Objects.equals( + this.strategyType, deleteOrderListResponseOrderReportsInner.strategyType) + && Objects.equals( + this.trailingDelta, deleteOrderListResponseOrderReportsInner.trailingDelta) + && Objects.equals( + this.trailingTime, deleteOrderListResponseOrderReportsInner.trailingTime) + && Objects.equals(this.usedSor, deleteOrderListResponseOrderReportsInner.usedSor) + && Objects.equals( + this.workingFloor, deleteOrderListResponseOrderReportsInner.workingFloor) + && Objects.equals( + this.pegPriceType, deleteOrderListResponseOrderReportsInner.pegPriceType) + && Objects.equals( + this.pegOffsetType, deleteOrderListResponseOrderReportsInner.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, + deleteOrderListResponseOrderReportsInner.pegOffsetValue) && Objects.equals( - this.stopPrice, deleteOrderListResponseOrderReportsInner.stopPrice); + this.peggedPrice, deleteOrderListResponseOrderReportsInner.peggedPrice) + && Objects.equals( + this.expiryReason, deleteOrderListResponseOrderReportsInner.expiryReason); } @Override @@ -541,8 +904,21 @@ public int hashCode() { timeInForce, type, side, - selfTradePreventionMode, - stopPrice); + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -566,10 +942,21 @@ public String toString() { sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); - sb.append(" selfTradePreventionMode: ") - .append(toIndentedString(selfTradePreventionMode)) - .append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -643,16 +1030,68 @@ public String toUrlQueryString() { String sideValueAsString = ""; sideValueAsString = sideValue.toString(); sb.append("side=").append(urlEncode(sideValueAsString)).append(""); - Object selfTradePreventionModeValue = getSelfTradePreventionMode(); - String selfTradePreventionModeValueAsString = ""; - selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); - sb.append("selfTradePreventionMode=") - .append(urlEncode(selfTradePreventionModeValueAsString)) + Object icebergQtyValue = getIcebergQty(); + String icebergQtyValueAsString = ""; + icebergQtyValueAsString = icebergQtyValue.toString(); + sb.append("icebergQty=").append(urlEncode(icebergQtyValueAsString)).append(""); + Object preventedMatchIdValue = getPreventedMatchId(); + String preventedMatchIdValueAsString = ""; + preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + sb.append("preventedMatchId=").append(urlEncode(preventedMatchIdValueAsString)).append(""); + Object preventedQuantityValue = getPreventedQuantity(); + String preventedQuantityValueAsString = ""; + preventedQuantityValueAsString = preventedQuantityValue.toString(); + sb.append("preventedQuantity=") + .append(urlEncode(preventedQuantityValueAsString)) .append(""); Object stopPriceValue = getStopPrice(); String stopPriceValueAsString = ""; stopPriceValueAsString = stopPriceValue.toString(); sb.append("stopPrice=").append(urlEncode(stopPriceValueAsString)).append(""); + Object strategyIdValue = getStrategyId(); + String strategyIdValueAsString = ""; + strategyIdValueAsString = strategyIdValue.toString(); + sb.append("strategyId=").append(urlEncode(strategyIdValueAsString)).append(""); + Object strategyTypeValue = getStrategyType(); + String strategyTypeValueAsString = ""; + strategyTypeValueAsString = strategyTypeValue.toString(); + sb.append("strategyType=").append(urlEncode(strategyTypeValueAsString)).append(""); + Object trailingDeltaValue = getTrailingDelta(); + String trailingDeltaValueAsString = ""; + trailingDeltaValueAsString = trailingDeltaValue.toString(); + sb.append("trailingDelta=").append(urlEncode(trailingDeltaValueAsString)).append(""); + Object trailingTimeValue = getTrailingTime(); + String trailingTimeValueAsString = ""; + trailingTimeValueAsString = trailingTimeValue.toString(); + sb.append("trailingTime=").append(urlEncode(trailingTimeValueAsString)).append(""); + Object usedSorValue = getUsedSor(); + String usedSorValueAsString = ""; + usedSorValueAsString = usedSorValue.toString(); + sb.append("usedSor=").append(urlEncode(usedSorValueAsString)).append(""); + Object workingFloorValue = getWorkingFloor(); + String workingFloorValueAsString = ""; + workingFloorValueAsString = workingFloorValue.toString(); + sb.append("workingFloor=").append(urlEncode(workingFloorValueAsString)).append(""); + Object pegPriceTypeValue = getPegPriceType(); + String pegPriceTypeValueAsString = ""; + pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + sb.append("pegPriceType=").append(urlEncode(pegPriceTypeValueAsString)).append(""); + Object pegOffsetTypeValue = getPegOffsetType(); + String pegOffsetTypeValueAsString = ""; + pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + sb.append("pegOffsetType=").append(urlEncode(pegOffsetTypeValueAsString)).append(""); + Object pegOffsetValueValue = getPegOffsetValue(); + String pegOffsetValueValueAsString = ""; + pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + sb.append("pegOffsetValue=").append(urlEncode(pegOffsetValueValueAsString)).append(""); + Object peggedPriceValue = getPeggedPrice(); + String peggedPriceValueAsString = ""; + peggedPriceValueAsString = peggedPriceValue.toString(); + sb.append("peggedPrice=").append(urlEncode(peggedPriceValueAsString)).append(""); + Object expiryReasonValue = getExpiryReason(); + String expiryReasonValueAsString = ""; + expiryReasonValueAsString = expiryReasonValue.toString(); + sb.append("expiryReason=").append(urlEncode(expiryReasonValueAsString)).append(""); return sb.toString(); } @@ -696,8 +1135,21 @@ private String toIndentedString(Object o) { openapiFields.add("timeInForce"); openapiFields.add("type"); openapiFields.add("side"); - openapiFields.add("selfTradePreventionMode"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -823,14 +1275,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("side").toString())); } - if ((jsonObj.get("selfTradePreventionMode") != null - && !jsonObj.get("selfTradePreventionMode").isJsonNull()) - && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `selfTradePreventionMode` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("selfTradePreventionMode").toString())); + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); } if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) && !jsonObj.get("stopPrice").isJsonPrimitive()) { @@ -840,6 +1300,46 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("stopPrice").toString())); } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOrderListResponseOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOrderListResponseOrdersInner.java index 6abfa160f..075ba60c8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOrderListResponseOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOrderListResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DeleteOrderListResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DeleteOrderListResponseOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOrderResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOrderResponse.java index c2d6277ab..8b6c299a8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOrderResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DeleteOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DeleteOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DeleteOrderResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -42,12 +42,6 @@ public class DeleteOrderResponse { @jakarta.annotation.Nullable private String symbol; - public static final String SERIALIZED_NAME_ORIG_CLIENT_ORDER_ID = "origClientOrderId"; - - @SerializedName(SERIALIZED_NAME_ORIG_CLIENT_ORDER_ID) - @jakarta.annotation.Nullable - private String origClientOrderId; - public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @SerializedName(SERIALIZED_NAME_ORDER_ID) @@ -60,6 +54,12 @@ public class DeleteOrderResponse { @jakarta.annotation.Nullable private Long orderListId; + public static final String SERIALIZED_NAME_ORIG_CLIENT_ORDER_ID = "origClientOrderId"; + + @SerializedName(SERIALIZED_NAME_ORIG_CLIENT_ORDER_ID) + @jakarta.annotation.Nullable + private String origClientOrderId; + public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; @SerializedName(SERIALIZED_NAME_CLIENT_ORDER_ID) @@ -133,6 +133,96 @@ public class DeleteOrderResponse { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + + @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @jakarta.annotation.Nullable + private String stopPrice; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public DeleteOrderResponse() {} public DeleteOrderResponse symbol(@jakarta.annotation.Nullable String symbol) { @@ -154,26 +244,6 @@ public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } - public DeleteOrderResponse origClientOrderId( - @jakarta.annotation.Nullable String origClientOrderId) { - this.origClientOrderId = origClientOrderId; - return this; - } - - /** - * Get origClientOrderId - * - * @return origClientOrderId - */ - @jakarta.annotation.Nullable - public String getOrigClientOrderId() { - return origClientOrderId; - } - - public void setOrigClientOrderId(@jakarta.annotation.Nullable String origClientOrderId) { - this.origClientOrderId = origClientOrderId; - } - public DeleteOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) { this.orderId = orderId; return this; @@ -199,7 +269,7 @@ public DeleteOrderResponse orderListId(@jakarta.annotation.Nullable Long orderLi } /** - * Get orderListId + * Unless it's part of an order list, value will be -1 * * @return orderListId */ @@ -212,6 +282,26 @@ public void setOrderListId(@jakarta.annotation.Nullable Long orderListId) { this.orderListId = orderListId; } + public DeleteOrderResponse origClientOrderId( + @jakarta.annotation.Nullable String origClientOrderId) { + this.origClientOrderId = origClientOrderId; + return this; + } + + /** + * Get origClientOrderId + * + * @return origClientOrderId + */ + @jakarta.annotation.Nullable + public String getOrigClientOrderId() { + return origClientOrderId; + } + + public void setOrigClientOrderId(@jakarta.annotation.Nullable String origClientOrderId) { + this.origClientOrderId = origClientOrderId; + } + public DeleteOrderResponse clientOrderId(@jakarta.annotation.Nullable String clientOrderId) { this.clientOrderId = clientOrderId; return this; @@ -444,6 +534,301 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public DeleteOrderResponse icebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Quantity for the iceberg order. Appears only if the parameter `icebergQty` was sent + * in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public DeleteOrderResponse preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * When used together with `symbol`, can be used to query a prevented match. Appears + * only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public DeleteOrderResponse preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. Appears only if the order expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public DeleteOrderResponse stopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + /** + * Price when the algorithmic order will be triggered. Appears for `STOP_LOSS`, + * `TAKE_PROFIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` + * orders. + * + * @return stopPrice + */ + @jakarta.annotation.Nullable + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + } + + public DeleteOrderResponse strategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Can be used to label an order that's part of an order strategy. Appears if the parameter + * was populated in the request. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public DeleteOrderResponse strategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Can be used to label an order that is using an order strategy. Appears if the parameter was + * populated in the request. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public DeleteOrderResponse trailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. Appears for trailing stop orders. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public DeleteOrderResponse trailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order becomes active and starts tracking price changes. Appears only + * for trailing stop orders. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public DeleteOrderResponse usedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Indicates whether the order used SOR. Appears when placing orders using SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public DeleteOrderResponse workingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Indicates whether the order is being filled by SOR or by the order book to which it was + * submitted. Appears when placing orders using SOR. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public DeleteOrderResponse pegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public DeleteOrderResponse pegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public DeleteOrderResponse pegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public DeleteOrderResponse peggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price the order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public DeleteOrderResponse expiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Returned when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -454,9 +839,9 @@ public boolean equals(Object o) { } DeleteOrderResponse deleteOrderResponse = (DeleteOrderResponse) o; return Objects.equals(this.symbol, deleteOrderResponse.symbol) - && Objects.equals(this.origClientOrderId, deleteOrderResponse.origClientOrderId) && Objects.equals(this.orderId, deleteOrderResponse.orderId) && Objects.equals(this.orderListId, deleteOrderResponse.orderListId) + && Objects.equals(this.origClientOrderId, deleteOrderResponse.origClientOrderId) && Objects.equals(this.clientOrderId, deleteOrderResponse.clientOrderId) && Objects.equals(this.transactTime, deleteOrderResponse.transactTime) && Objects.equals(this.price, deleteOrderResponse.price) @@ -469,16 +854,31 @@ public boolean equals(Object o) { && Objects.equals(this.type, deleteOrderResponse.type) && Objects.equals(this.side, deleteOrderResponse.side) && Objects.equals( - this.selfTradePreventionMode, deleteOrderResponse.selfTradePreventionMode); + this.selfTradePreventionMode, deleteOrderResponse.selfTradePreventionMode) + && Objects.equals(this.icebergQty, deleteOrderResponse.icebergQty) + && Objects.equals(this.preventedMatchId, deleteOrderResponse.preventedMatchId) + && Objects.equals(this.preventedQuantity, deleteOrderResponse.preventedQuantity) + && Objects.equals(this.stopPrice, deleteOrderResponse.stopPrice) + && Objects.equals(this.strategyId, deleteOrderResponse.strategyId) + && Objects.equals(this.strategyType, deleteOrderResponse.strategyType) + && Objects.equals(this.trailingDelta, deleteOrderResponse.trailingDelta) + && Objects.equals(this.trailingTime, deleteOrderResponse.trailingTime) + && Objects.equals(this.usedSor, deleteOrderResponse.usedSor) + && Objects.equals(this.workingFloor, deleteOrderResponse.workingFloor) + && Objects.equals(this.pegPriceType, deleteOrderResponse.pegPriceType) + && Objects.equals(this.pegOffsetType, deleteOrderResponse.pegOffsetType) + && Objects.equals(this.pegOffsetValue, deleteOrderResponse.pegOffsetValue) + && Objects.equals(this.peggedPrice, deleteOrderResponse.peggedPrice) + && Objects.equals(this.expiryReason, deleteOrderResponse.expiryReason); } @Override public int hashCode() { return Objects.hash( symbol, - origClientOrderId, orderId, orderListId, + origClientOrderId, clientOrderId, transactTime, price, @@ -490,7 +890,22 @@ public int hashCode() { timeInForce, type, side, - selfTradePreventionMode); + selfTradePreventionMode, + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -498,9 +913,9 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeleteOrderResponse {\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); - sb.append(" origClientOrderId: ").append(toIndentedString(origClientOrderId)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); sb.append(" orderListId: ").append(toIndentedString(orderListId)).append("\n"); + sb.append(" origClientOrderId: ").append(toIndentedString(origClientOrderId)).append("\n"); sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); sb.append(" transactTime: ").append(toIndentedString(transactTime)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); @@ -517,6 +932,21 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -528,12 +958,6 @@ public String toUrlQueryString() { String symbolValueAsString = ""; symbolValueAsString = symbolValue.toString(); sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); - Object origClientOrderIdValue = getOrigClientOrderId(); - String origClientOrderIdValueAsString = ""; - origClientOrderIdValueAsString = origClientOrderIdValue.toString(); - sb.append("origClientOrderId=") - .append(urlEncode(origClientOrderIdValueAsString)) - .append(""); Object orderIdValue = getOrderId(); String orderIdValueAsString = ""; orderIdValueAsString = orderIdValue.toString(); @@ -542,6 +966,12 @@ public String toUrlQueryString() { String orderListIdValueAsString = ""; orderListIdValueAsString = orderListIdValue.toString(); sb.append("orderListId=").append(urlEncode(orderListIdValueAsString)).append(""); + Object origClientOrderIdValue = getOrigClientOrderId(); + String origClientOrderIdValueAsString = ""; + origClientOrderIdValueAsString = origClientOrderIdValue.toString(); + sb.append("origClientOrderId=") + .append(urlEncode(origClientOrderIdValueAsString)) + .append(""); Object clientOrderIdValue = getClientOrderId(); String clientOrderIdValueAsString = ""; clientOrderIdValueAsString = clientOrderIdValue.toString(); @@ -596,6 +1026,68 @@ public String toUrlQueryString() { sb.append("selfTradePreventionMode=") .append(urlEncode(selfTradePreventionModeValueAsString)) .append(""); + Object icebergQtyValue = getIcebergQty(); + String icebergQtyValueAsString = ""; + icebergQtyValueAsString = icebergQtyValue.toString(); + sb.append("icebergQty=").append(urlEncode(icebergQtyValueAsString)).append(""); + Object preventedMatchIdValue = getPreventedMatchId(); + String preventedMatchIdValueAsString = ""; + preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + sb.append("preventedMatchId=").append(urlEncode(preventedMatchIdValueAsString)).append(""); + Object preventedQuantityValue = getPreventedQuantity(); + String preventedQuantityValueAsString = ""; + preventedQuantityValueAsString = preventedQuantityValue.toString(); + sb.append("preventedQuantity=") + .append(urlEncode(preventedQuantityValueAsString)) + .append(""); + Object stopPriceValue = getStopPrice(); + String stopPriceValueAsString = ""; + stopPriceValueAsString = stopPriceValue.toString(); + sb.append("stopPrice=").append(urlEncode(stopPriceValueAsString)).append(""); + Object strategyIdValue = getStrategyId(); + String strategyIdValueAsString = ""; + strategyIdValueAsString = strategyIdValue.toString(); + sb.append("strategyId=").append(urlEncode(strategyIdValueAsString)).append(""); + Object strategyTypeValue = getStrategyType(); + String strategyTypeValueAsString = ""; + strategyTypeValueAsString = strategyTypeValue.toString(); + sb.append("strategyType=").append(urlEncode(strategyTypeValueAsString)).append(""); + Object trailingDeltaValue = getTrailingDelta(); + String trailingDeltaValueAsString = ""; + trailingDeltaValueAsString = trailingDeltaValue.toString(); + sb.append("trailingDelta=").append(urlEncode(trailingDeltaValueAsString)).append(""); + Object trailingTimeValue = getTrailingTime(); + String trailingTimeValueAsString = ""; + trailingTimeValueAsString = trailingTimeValue.toString(); + sb.append("trailingTime=").append(urlEncode(trailingTimeValueAsString)).append(""); + Object usedSorValue = getUsedSor(); + String usedSorValueAsString = ""; + usedSorValueAsString = usedSorValue.toString(); + sb.append("usedSor=").append(urlEncode(usedSorValueAsString)).append(""); + Object workingFloorValue = getWorkingFloor(); + String workingFloorValueAsString = ""; + workingFloorValueAsString = workingFloorValue.toString(); + sb.append("workingFloor=").append(urlEncode(workingFloorValueAsString)).append(""); + Object pegPriceTypeValue = getPegPriceType(); + String pegPriceTypeValueAsString = ""; + pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + sb.append("pegPriceType=").append(urlEncode(pegPriceTypeValueAsString)).append(""); + Object pegOffsetTypeValue = getPegOffsetType(); + String pegOffsetTypeValueAsString = ""; + pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + sb.append("pegOffsetType=").append(urlEncode(pegOffsetTypeValueAsString)).append(""); + Object pegOffsetValueValue = getPegOffsetValue(); + String pegOffsetValueValueAsString = ""; + pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + sb.append("pegOffsetValue=").append(urlEncode(pegOffsetValueValueAsString)).append(""); + Object peggedPriceValue = getPeggedPrice(); + String peggedPriceValueAsString = ""; + peggedPriceValueAsString = peggedPriceValue.toString(); + sb.append("peggedPrice=").append(urlEncode(peggedPriceValueAsString)).append(""); + Object expiryReasonValue = getExpiryReason(); + String expiryReasonValueAsString = ""; + expiryReasonValueAsString = expiryReasonValue.toString(); + sb.append("expiryReason=").append(urlEncode(expiryReasonValueAsString)).append(""); return sb.toString(); } @@ -625,9 +1117,9 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("symbol"); - openapiFields.add("origClientOrderId"); openapiFields.add("orderId"); openapiFields.add("orderListId"); + openapiFields.add("origClientOrderId"); openapiFields.add("clientOrderId"); openapiFields.add("transactTime"); openapiFields.add("price"); @@ -640,6 +1132,21 @@ private String toIndentedString(Object o) { openapiFields.add("type"); openapiFields.add("side"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -771,6 +1278,71 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) + && !jsonObj.get("stopPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `stopPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("stopPrice").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DepthResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DepthResponse.java index 61c37a6e9..c87e3b83a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DepthResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/DepthResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,7 +39,7 @@ /** DepthResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DepthResponse { public static final String SERIALIZED_NAME_LAST_UPDATE_ID = "lastUpdateId"; @@ -94,7 +94,7 @@ public DepthResponse addBidsItem(List bidsItem) { } /** - * Get bids + * Bid orders. Each entry is [price, quantity]. * * @return bids */ @@ -122,7 +122,7 @@ public DepthResponse addAsksItem(List asksItem) { } /** - * Get asks + * Ask orders. Each entry is [price, quantity]. * * @return asks */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeFilters.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeFilters.java index 9d6622518..23316dee2 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeFilters.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeFilters.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -33,7 +33,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeFilters extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(ExchangeFilters.class.getName()); @@ -163,45 +163,17 @@ public ExchangeFilters read(JsonReader in) throws IOException { jsonObject); newExchangeFilters.setActualInstance(deserialized); return newExchangeFilters; - case "ExchangeMaxNumAlgoOrdersFilter": - deserialized = - adapterExchangeMaxNumAlgoOrdersFilter.fromJsonTree( - jsonObject); - newExchangeFilters.setActualInstance(deserialized); - return newExchangeFilters; - case "ExchangeMaxNumIcebergOrdersFilter": - deserialized = - adapterExchangeMaxNumIcebergOrdersFilter - .fromJsonTree(jsonObject); - newExchangeFilters.setActualInstance(deserialized); - return newExchangeFilters; - case "ExchangeMaxNumOrderListsFilter": - deserialized = - adapterExchangeMaxNumOrderListsFilter.fromJsonTree( - jsonObject); - newExchangeFilters.setActualInstance(deserialized); - return newExchangeFilters; - case "ExchangeMaxNumOrdersFilter": - deserialized = - adapterExchangeMaxNumOrdersFilter.fromJsonTree( - jsonObject); - newExchangeFilters.setActualInstance(deserialized); - return newExchangeFilters; default: log.log( Level.WARNING, String.format( "Failed to lookup discriminator value `%s`" - + " for ExchangeFilters. Possible" - + " values:" - + " EXCHANGE_MAX_NUM_ALGO_ORDERS" - + " EXCHANGE_MAX_NUM_ICEBERG_ORDERS" - + " EXCHANGE_MAX_NUM_ORDERS" - + " EXCHANGE_MAX_NUM_ORDER_LISTS" - + " ExchangeMaxNumAlgoOrdersFilter" - + " ExchangeMaxNumIcebergOrdersFilter" - + " ExchangeMaxNumOrderListsFilter" - + " ExchangeMaxNumOrdersFilter", + + " for ExchangeFilters. Possible" + + " values:" + + " EXCHANGE_MAX_NUM_ALGO_ORDERS" + + " EXCHANGE_MAX_NUM_ICEBERG_ORDERS" + + " EXCHANGE_MAX_NUM_ORDERS" + + " EXCHANGE_MAX_NUM_ORDER_LISTS", jsonObject .get("filterType") .getAsString())); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeInfoResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeInfoResponse.java index 6e8da2e53..2407032e9 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeInfoResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeInfoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** ExchangeInfoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInfoResponse { public static final String SERIALIZED_NAME_TIMEZONE = "timezone"; @@ -58,13 +58,13 @@ public class ExchangeInfoResponse { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid MyFiltersResponseRateLimitsInner> rateLimits; public static final String SERIALIZED_NAME_EXCHANGE_FILTERS = "exchangeFilters"; @SerializedName(SERIALIZED_NAME_EXCHANGE_FILTERS) @jakarta.annotation.Nullable - private List exchangeFilters; + private List exchangeFilters; public static final String SERIALIZED_NAME_SYMBOLS = "symbols"; @@ -72,6 +72,12 @@ public class ExchangeInfoResponse { @jakarta.annotation.Nullable private List<@Valid ExchangeInfoResponseSymbolsInner> symbols; + public static final String SERIALIZED_NAME_SORS = "sors"; + + @SerializedName(SERIALIZED_NAME_SORS) + @jakarta.annotation.Nullable + private List<@Valid ExchangeInfoResponseSorsInner> sors; + public ExchangeInfoResponse() {} public ExchangeInfoResponse timezone(@jakarta.annotation.Nullable String timezone) { @@ -113,12 +119,12 @@ public void setServerTime(@jakarta.annotation.Nullable Long serverTime) { } public ExchangeInfoResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable List<@Valid MyFiltersResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public ExchangeInfoResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public ExchangeInfoResponse addRateLimitsItem(MyFiltersResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -133,21 +139,24 @@ public ExchangeInfoResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid MyFiltersResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable List<@Valid MyFiltersResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } public ExchangeInfoResponse exchangeFilters( - @jakarta.annotation.Nullable List exchangeFilters) { + @jakarta.annotation.Nullable + List exchangeFilters) { this.exchangeFilters = exchangeFilters; return this; } - public ExchangeInfoResponse addExchangeFiltersItem(ExchangeFilters exchangeFiltersItem) { + public ExchangeInfoResponse addExchangeFiltersItem( + MyFiltersResponseExchangeFiltersInner exchangeFiltersItem) { if (this.exchangeFilters == null) { this.exchangeFilters = new ArrayList<>(); } @@ -162,12 +171,13 @@ public ExchangeInfoResponse addExchangeFiltersItem(ExchangeFilters exchangeFilte */ @jakarta.annotation.Nullable @Valid - public List getExchangeFilters() { + public List getExchangeFilters() { return exchangeFilters; } public void setExchangeFilters( - @jakarta.annotation.Nullable List exchangeFilters) { + @jakarta.annotation.Nullable + List exchangeFilters) { this.exchangeFilters = exchangeFilters; } @@ -201,6 +211,36 @@ public void setSymbols( this.symbols = symbols; } + public ExchangeInfoResponse sors( + @jakarta.annotation.Nullable List<@Valid ExchangeInfoResponseSorsInner> sors) { + this.sors = sors; + return this; + } + + public ExchangeInfoResponse addSorsItem(ExchangeInfoResponseSorsInner sorsItem) { + if (this.sors == null) { + this.sors = new ArrayList<>(); + } + this.sors.add(sorsItem); + return this; + } + + /** + * Optional. Present only when SOR is available. + * + * @return sors + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid ExchangeInfoResponseSorsInner> getSors() { + return sors; + } + + public void setSors( + @jakarta.annotation.Nullable List<@Valid ExchangeInfoResponseSorsInner> sors) { + this.sors = sors; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -214,12 +254,13 @@ public boolean equals(Object o) { && Objects.equals(this.serverTime, exchangeInfoResponse.serverTime) && Objects.equals(this.rateLimits, exchangeInfoResponse.rateLimits) && Objects.equals(this.exchangeFilters, exchangeInfoResponse.exchangeFilters) - && Objects.equals(this.symbols, exchangeInfoResponse.symbols); + && Objects.equals(this.symbols, exchangeInfoResponse.symbols) + && Objects.equals(this.sors, exchangeInfoResponse.sors); } @Override public int hashCode() { - return Objects.hash(timezone, serverTime, rateLimits, exchangeFilters, symbols); + return Objects.hash(timezone, serverTime, rateLimits, exchangeFilters, symbols, sors); } @Override @@ -231,6 +272,7 @@ public String toString() { sb.append(" rateLimits: ").append(toIndentedString(rateLimits)).append("\n"); sb.append(" exchangeFilters: ").append(toIndentedString(exchangeFilters)).append("\n"); sb.append(" symbols: ").append(toIndentedString(symbols)).append("\n"); + sb.append(" sors: ").append(toIndentedString(sors)).append("\n"); sb.append("}"); return sb.toString(); } @@ -267,6 +309,13 @@ public String toUrlQueryString() { ((Collection) symbolsValue) .stream().map(Object::toString).collect(Collectors.joining(",")); sb.append("symbols=").append(urlEncode(symbolsValueAsString)).append(""); + Object sorsValue = getSors(); + String sorsValueAsString = ""; + sorsValueAsString = + (String) + ((Collection) sorsValue) + .stream().map(Object::toString).collect(Collectors.joining(",")); + sb.append("sors=").append(urlEncode(sorsValueAsString)).append(""); return sb.toString(); } @@ -300,6 +349,7 @@ private String toIndentedString(Object o) { openapiFields.add("rateLimits"); openapiFields.add("exchangeFilters"); openapiFields.add("symbols"); + openapiFields.add("sors"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -345,7 +395,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + MyFiltersResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } @@ -365,7 +416,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `exchangeFilters` (array) for (int i = 0; i < jsonArrayexchangeFilters.size(); i++) { - ExchangeFilters.validateJsonElement(jsonArrayexchangeFilters.get(i)); + MyFiltersResponseExchangeFiltersInner.validateJsonElement( + jsonArrayexchangeFilters.get(i)); } ; } @@ -389,6 +441,25 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti ; } } + if (jsonObj.get("sors") != null && !jsonObj.get("sors").isJsonNull()) { + JsonArray jsonArraysors = jsonObj.getAsJsonArray("sors"); + if (jsonArraysors != null) { + // ensure the json data is an array + if (!jsonObj.get("sors").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `sors` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("sors").toString())); + } + + // validate the optional field `sors` (array) + for (int i = 0; i < jsonArraysors.size(); i++) { + ExchangeInfoResponseSorsInner.validateJsonElement(jsonArraysors.get(i)); + } + ; + } + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeInfoResponseSorsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeInfoResponseSorsInner.java new file mode 100644 index 000000000..bf3a21cde --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeInfoResponseSorsInner.java @@ -0,0 +1,274 @@ +/* + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.rest.model; + +import com.binance.connector.client.spot.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ExchangeInfoResponseSorsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ExchangeInfoResponseSorsInner { + public static final String SERIALIZED_NAME_BASE_ASSET = "baseAsset"; + + @SerializedName(SERIALIZED_NAME_BASE_ASSET) + @jakarta.annotation.Nullable + private String baseAsset; + + public static final String SERIALIZED_NAME_SYMBOLS = "symbols"; + + @SerializedName(SERIALIZED_NAME_SYMBOLS) + @jakarta.annotation.Nullable + private List symbols; + + public ExchangeInfoResponseSorsInner() {} + + public ExchangeInfoResponseSorsInner baseAsset(@jakarta.annotation.Nullable String baseAsset) { + this.baseAsset = baseAsset; + return this; + } + + /** + * Get baseAsset + * + * @return baseAsset + */ + @jakarta.annotation.Nullable + public String getBaseAsset() { + return baseAsset; + } + + public void setBaseAsset(@jakarta.annotation.Nullable String baseAsset) { + this.baseAsset = baseAsset; + } + + public ExchangeInfoResponseSorsInner symbols( + @jakarta.annotation.Nullable List symbols) { + this.symbols = symbols; + return this; + } + + public ExchangeInfoResponseSorsInner addSymbolsItem(String symbolsItem) { + if (this.symbols == null) { + this.symbols = new ArrayList<>(); + } + this.symbols.add(symbolsItem); + return this; + } + + /** + * Get symbols + * + * @return symbols + */ + @jakarta.annotation.Nullable + public List getSymbols() { + return symbols; + } + + public void setSymbols(@jakarta.annotation.Nullable List symbols) { + this.symbols = symbols; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExchangeInfoResponseSorsInner exchangeInfoResponseSorsInner = + (ExchangeInfoResponseSorsInner) o; + return Objects.equals(this.baseAsset, exchangeInfoResponseSorsInner.baseAsset) + && Objects.equals(this.symbols, exchangeInfoResponseSorsInner.symbols); + } + + @Override + public int hashCode() { + return Objects.hash(baseAsset, symbols); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExchangeInfoResponseSorsInner {\n"); + sb.append(" baseAsset: ").append(toIndentedString(baseAsset)).append("\n"); + sb.append(" symbols: ").append(toIndentedString(symbols)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object baseAssetValue = getBaseAsset(); + String baseAssetValueAsString = ""; + baseAssetValueAsString = baseAssetValue.toString(); + sb.append("baseAsset=").append(urlEncode(baseAssetValueAsString)).append(""); + Object symbolsValue = getSymbols(); + String symbolsValueAsString = ""; + symbolsValueAsString = + (String) + ((Collection) symbolsValue) + .stream().map(Object::toString).collect(Collectors.joining(",")); + sb.append("symbols=").append(urlEncode(symbolsValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("baseAsset"); + openapiFields.add("symbols"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ExchangeInfoResponseSorsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExchangeInfoResponseSorsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ExchangeInfoResponseSorsInner is not" + + " found in the empty JSON string", + ExchangeInfoResponseSorsInner.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("baseAsset") != null && !jsonObj.get("baseAsset").isJsonNull()) + && !jsonObj.get("baseAsset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `baseAsset` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("baseAsset").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("symbols") != null + && !jsonObj.get("symbols").isJsonNull() + && !jsonObj.get("symbols").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbols` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("symbols").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExchangeInfoResponseSorsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExchangeInfoResponseSorsInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ExchangeInfoResponseSorsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ExchangeInfoResponseSorsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExchangeInfoResponseSorsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ExchangeInfoResponseSorsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExchangeInfoResponseSorsInner + * @throws IOException if the JSON string is invalid with respect to + * ExchangeInfoResponseSorsInner + */ + public static ExchangeInfoResponseSorsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExchangeInfoResponseSorsInner.class); + } + + /** + * Convert an instance of ExchangeInfoResponseSorsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeInfoResponseSymbolsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeInfoResponseSymbolsInner.java index 7d1923cc7..d1227e5d7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeInfoResponseSymbolsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeInfoResponseSymbolsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** ExchangeInfoResponseSymbolsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInfoResponseSymbolsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -175,7 +175,7 @@ public class ExchangeInfoResponseSymbolsInner { @SerializedName(SERIALIZED_NAME_FILTERS) @jakarta.annotation.Nullable - private List filters; + private List filters; public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; @@ -637,12 +637,13 @@ public void setIsMarginTradingAllowed( } public ExchangeInfoResponseSymbolsInner filters( - @jakarta.annotation.Nullable List filters) { + @jakarta.annotation.Nullable List filters) { this.filters = filters; return this; } - public ExchangeInfoResponseSymbolsInner addFiltersItem(SymbolFilters filtersItem) { + public ExchangeInfoResponseSymbolsInner addFiltersItem( + MyFiltersResponseSymbolFiltersInner filtersItem) { if (this.filters == null) { this.filters = new ArrayList<>(); } @@ -657,11 +658,12 @@ public ExchangeInfoResponseSymbolsInner addFiltersItem(SymbolFilters filtersItem */ @jakarta.annotation.Nullable @Valid - public List getFilters() { + public List getFilters() { return filters; } - public void setFilters(@jakarta.annotation.Nullable List filters) { + public void setFilters( + @jakarta.annotation.Nullable List filters) { this.filters = filters; } @@ -1205,7 +1207,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `filters` (array) for (int i = 0; i < jsonArrayfilters.size(); i++) { - SymbolFilters.validateJsonElement(jsonArrayfilters.get(i)); + MyFiltersResponseSymbolFiltersInner.validateJsonElement( + jsonArrayfilters.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeMaxNumAlgoOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeMaxNumAlgoOrdersFilter.java index 8a670dd08..552f3bd4e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeMaxNumAlgoOrdersFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeMaxNumAlgoOrdersFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ExchangeMaxNumAlgoOrdersFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeMaxNumAlgoOrdersFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeMaxNumIcebergOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeMaxNumIcebergOrdersFilter.java index 0a30f8897..fc24a6486 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeMaxNumIcebergOrdersFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeMaxNumIcebergOrdersFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ExchangeMaxNumIcebergOrdersFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeMaxNumIcebergOrdersFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeMaxNumOrderListsFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeMaxNumOrderListsFilter.java index 8b18465e8..afb0128ce 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeMaxNumOrderListsFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeMaxNumOrderListsFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ExchangeMaxNumOrderListsFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeMaxNumOrderListsFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeMaxNumOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeMaxNumOrdersFilter.java index fe973789e..f82438a90 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeMaxNumOrdersFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExchangeMaxNumOrdersFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ExchangeMaxNumOrdersFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeMaxNumOrdersFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExecutionRulesResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExecutionRulesResponse.java index 4e20bb791..19c275cb1 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExecutionRulesResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExecutionRulesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** ExecutionRulesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExecutionRulesResponse { public static final String SERIALIZED_NAME_SYMBOL_RULES = "symbolRules"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExecutionRulesResponseSymbolRulesInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExecutionRulesResponseSymbolRulesInner.java index 09fa24ac1..c99f27fd8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExecutionRulesResponseSymbolRulesInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExecutionRulesResponseSymbolRulesInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** ExecutionRulesResponseSymbolRulesInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExecutionRulesResponseSymbolRulesInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExecutionRulesResponseSymbolRulesInnerRulesInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExecutionRulesResponseSymbolRulesInnerRulesInner.java index fcb7f7473..b4079794a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExecutionRulesResponseSymbolRulesInnerRulesInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ExecutionRulesResponseSymbolRulesInnerRulesInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ExecutionRulesResponseSymbolRulesInnerRulesInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExecutionRulesResponseSymbolRulesInnerRulesInner { public static final String SERIALIZED_NAME_RULE_TYPE = "ruleType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetAccountResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetAccountResponse.java index 988511b3e..5ebe2d0df 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetAccountResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetAccountResponse { public static final String SERIALIZED_NAME_MAKER_COMMISSION = "makerCommission"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetAccountResponseBalancesInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetAccountResponseBalancesInner.java index 387d1ef45..5516dc8ea 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetAccountResponseBalancesInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetAccountResponseBalancesInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetAccountResponseBalancesInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetAccountResponseBalancesInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetAccountResponseCommissionRates.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetAccountResponseCommissionRates.java index 51a0a3332..253133a0d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetAccountResponseCommissionRates.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetAccountResponseCommissionRates.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetAccountResponseCommissionRates */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetAccountResponseCommissionRates { public static final String SERIALIZED_NAME_MAKER = "maker"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOpenOrdersResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOpenOrdersResponse.java index fa0e76988..3e436d5de 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOpenOrdersResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOpenOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,8 +34,8 @@ /** GetOpenOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetOpenOrdersResponse extends ArrayList { + comments = "Generator version: 7.22.0") +public class GetOpenOrdersResponse extends ArrayList { public GetOpenOrdersResponse() {} @Override @@ -116,7 +116,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - AllOrdersResponseInner.validateJsonElement(element); + GetOpenOrdersResponseInner.validateJsonElement(element); } if (jsonElement == null) { if (!GetOpenOrdersResponse.openapiRequiredFields diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOpenOrdersResponseInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOpenOrdersResponseInner.java new file mode 100644 index 000000000..a74b331d3 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOpenOrdersResponseInner.java @@ -0,0 +1,1456 @@ +/* + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.rest.model; + +import com.binance.connector.client.spot.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** GetOpenOrdersResponseInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class GetOpenOrdersResponseInner { + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; + + @SerializedName(SERIALIZED_NAME_ORDER_ID) + @jakarta.annotation.Nullable + private Long orderId; + + public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; + + @SerializedName(SERIALIZED_NAME_ORDER_LIST_ID) + @jakarta.annotation.Nullable + private Long orderListId; + + public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; + + @SerializedName(SERIALIZED_NAME_CLIENT_ORDER_ID) + @jakarta.annotation.Nullable + private String clientOrderId; + + public static final String SERIALIZED_NAME_PRICE = "price"; + + @SerializedName(SERIALIZED_NAME_PRICE) + @jakarta.annotation.Nullable + private String price; + + public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; + + @SerializedName(SERIALIZED_NAME_ORIG_QTY) + @jakarta.annotation.Nullable + private String origQty; + + public static final String SERIALIZED_NAME_EXECUTED_QTY = "executedQty"; + + @SerializedName(SERIALIZED_NAME_EXECUTED_QTY) + @jakarta.annotation.Nullable + private String executedQty; + + public static final String SERIALIZED_NAME_ORIG_QUOTE_ORDER_QTY = "origQuoteOrderQty"; + + @SerializedName(SERIALIZED_NAME_ORIG_QUOTE_ORDER_QTY) + @jakarta.annotation.Nullable + private String origQuoteOrderQty; + + public static final String SERIALIZED_NAME_CUMMULATIVE_QUOTE_QTY = "cummulativeQuoteQty"; + + @SerializedName(SERIALIZED_NAME_CUMMULATIVE_QUOTE_QTY) + @jakarta.annotation.Nullable + private String cummulativeQuoteQty; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @jakarta.annotation.Nullable + private String status; + + public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; + + @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) + @jakarta.annotation.Nullable + private String timeInForce; + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @jakarta.annotation.Nullable + private String type; + + public static final String SERIALIZED_NAME_SIDE = "side"; + + @SerializedName(SERIALIZED_NAME_SIDE) + @jakarta.annotation.Nullable + private String side; + + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + + @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @jakarta.annotation.Nullable + private String stopPrice; + + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_TIME = "time"; + + @SerializedName(SERIALIZED_NAME_TIME) + @jakarta.annotation.Nullable + private Long time; + + public static final String SERIALIZED_NAME_UPDATE_TIME = "updateTime"; + + @SerializedName(SERIALIZED_NAME_UPDATE_TIME) + @jakarta.annotation.Nullable + private Long updateTime; + + public static final String SERIALIZED_NAME_IS_WORKING = "isWorking"; + + @SerializedName(SERIALIZED_NAME_IS_WORKING) + @jakarta.annotation.Nullable + private Boolean isWorking; + + public static final String SERIALIZED_NAME_WORKING_TIME = "workingTime"; + + @SerializedName(SERIALIZED_NAME_WORKING_TIME) + @jakarta.annotation.Nullable + private Long workingTime; + + public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = + "selfTradePreventionMode"; + + @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) + @jakarta.annotation.Nullable + private String selfTradePreventionMode; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + + public GetOpenOrdersResponseInner() {} + + public GetOpenOrdersResponseInner symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Get symbol + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public GetOpenOrdersResponseInner orderId(@jakarta.annotation.Nullable Long orderId) { + this.orderId = orderId; + return this; + } + + /** + * Get orderId + * + * @return orderId + */ + @jakarta.annotation.Nullable + public Long getOrderId() { + return orderId; + } + + public void setOrderId(@jakarta.annotation.Nullable Long orderId) { + this.orderId = orderId; + } + + public GetOpenOrdersResponseInner orderListId(@jakarta.annotation.Nullable Long orderListId) { + this.orderListId = orderListId; + return this; + } + + /** + * Unless it's part of an order list, value will be -1 + * + * @return orderListId + */ + @jakarta.annotation.Nullable + public Long getOrderListId() { + return orderListId; + } + + public void setOrderListId(@jakarta.annotation.Nullable Long orderListId) { + this.orderListId = orderListId; + } + + public GetOpenOrdersResponseInner clientOrderId( + @jakarta.annotation.Nullable String clientOrderId) { + this.clientOrderId = clientOrderId; + return this; + } + + /** + * Get clientOrderId + * + * @return clientOrderId + */ + @jakarta.annotation.Nullable + public String getClientOrderId() { + return clientOrderId; + } + + public void setClientOrderId(@jakarta.annotation.Nullable String clientOrderId) { + this.clientOrderId = clientOrderId; + } + + public GetOpenOrdersResponseInner price(@jakarta.annotation.Nullable String price) { + this.price = price; + return this; + } + + /** + * Get price + * + * @return price + */ + @jakarta.annotation.Nullable + public String getPrice() { + return price; + } + + public void setPrice(@jakarta.annotation.Nullable String price) { + this.price = price; + } + + public GetOpenOrdersResponseInner origQty(@jakarta.annotation.Nullable String origQty) { + this.origQty = origQty; + return this; + } + + /** + * Get origQty + * + * @return origQty + */ + @jakarta.annotation.Nullable + public String getOrigQty() { + return origQty; + } + + public void setOrigQty(@jakarta.annotation.Nullable String origQty) { + this.origQty = origQty; + } + + public GetOpenOrdersResponseInner executedQty(@jakarta.annotation.Nullable String executedQty) { + this.executedQty = executedQty; + return this; + } + + /** + * Get executedQty + * + * @return executedQty + */ + @jakarta.annotation.Nullable + public String getExecutedQty() { + return executedQty; + } + + public void setExecutedQty(@jakarta.annotation.Nullable String executedQty) { + this.executedQty = executedQty; + } + + public GetOpenOrdersResponseInner origQuoteOrderQty( + @jakarta.annotation.Nullable String origQuoteOrderQty) { + this.origQuoteOrderQty = origQuoteOrderQty; + return this; + } + + /** + * Get origQuoteOrderQty + * + * @return origQuoteOrderQty + */ + @jakarta.annotation.Nullable + public String getOrigQuoteOrderQty() { + return origQuoteOrderQty; + } + + public void setOrigQuoteOrderQty(@jakarta.annotation.Nullable String origQuoteOrderQty) { + this.origQuoteOrderQty = origQuoteOrderQty; + } + + public GetOpenOrdersResponseInner cummulativeQuoteQty( + @jakarta.annotation.Nullable String cummulativeQuoteQty) { + this.cummulativeQuoteQty = cummulativeQuoteQty; + return this; + } + + /** + * Get cummulativeQuoteQty + * + * @return cummulativeQuoteQty + */ + @jakarta.annotation.Nullable + public String getCummulativeQuoteQty() { + return cummulativeQuoteQty; + } + + public void setCummulativeQuoteQty(@jakarta.annotation.Nullable String cummulativeQuoteQty) { + this.cummulativeQuoteQty = cummulativeQuoteQty; + } + + public GetOpenOrdersResponseInner status(@jakarta.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(@jakarta.annotation.Nullable String status) { + this.status = status; + } + + public GetOpenOrdersResponseInner timeInForce(@jakarta.annotation.Nullable String timeInForce) { + this.timeInForce = timeInForce; + return this; + } + + /** + * Get timeInForce + * + * @return timeInForce + */ + @jakarta.annotation.Nullable + public String getTimeInForce() { + return timeInForce; + } + + public void setTimeInForce(@jakarta.annotation.Nullable String timeInForce) { + this.timeInForce = timeInForce; + } + + public GetOpenOrdersResponseInner type(@jakarta.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@jakarta.annotation.Nullable String type) { + this.type = type; + } + + public GetOpenOrdersResponseInner side(@jakarta.annotation.Nullable String side) { + this.side = side; + return this; + } + + /** + * Get side + * + * @return side + */ + @jakarta.annotation.Nullable + public String getSide() { + return side; + } + + public void setSide(@jakarta.annotation.Nullable String side) { + this.side = side; + } + + public GetOpenOrdersResponseInner stopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + /** + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. + * + * @return stopPrice + */ + @jakarta.annotation.Nullable + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + } + + public GetOpenOrdersResponseInner icebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public GetOpenOrdersResponseInner time(@jakarta.annotation.Nullable Long time) { + this.time = time; + return this; + } + + /** + * Get time + * + * @return time + */ + @jakarta.annotation.Nullable + public Long getTime() { + return time; + } + + public void setTime(@jakarta.annotation.Nullable Long time) { + this.time = time; + } + + public GetOpenOrdersResponseInner updateTime(@jakarta.annotation.Nullable Long updateTime) { + this.updateTime = updateTime; + return this; + } + + /** + * Get updateTime + * + * @return updateTime + */ + @jakarta.annotation.Nullable + public Long getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(@jakarta.annotation.Nullable Long updateTime) { + this.updateTime = updateTime; + } + + public GetOpenOrdersResponseInner isWorking(@jakarta.annotation.Nullable Boolean isWorking) { + this.isWorking = isWorking; + return this; + } + + /** + * Get isWorking + * + * @return isWorking + */ + @jakarta.annotation.Nullable + public Boolean getIsWorking() { + return isWorking; + } + + public void setIsWorking(@jakarta.annotation.Nullable Boolean isWorking) { + this.isWorking = isWorking; + } + + public GetOpenOrdersResponseInner workingTime(@jakarta.annotation.Nullable Long workingTime) { + this.workingTime = workingTime; + return this; + } + + /** + * Get workingTime + * + * @return workingTime + */ + @jakarta.annotation.Nullable + public Long getWorkingTime() { + return workingTime; + } + + public void setWorkingTime(@jakarta.annotation.Nullable Long workingTime) { + this.workingTime = workingTime; + } + + public GetOpenOrdersResponseInner selfTradePreventionMode( + @jakarta.annotation.Nullable String selfTradePreventionMode) { + this.selfTradePreventionMode = selfTradePreventionMode; + return this; + } + + /** + * Get selfTradePreventionMode + * + * @return selfTradePreventionMode + */ + @jakarta.annotation.Nullable + public String getSelfTradePreventionMode() { + return selfTradePreventionMode; + } + + public void setSelfTradePreventionMode( + @jakarta.annotation.Nullable String selfTradePreventionMode) { + this.selfTradePreventionMode = selfTradePreventionMode; + } + + public GetOpenOrdersResponseInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public GetOpenOrdersResponseInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public GetOpenOrdersResponseInner strategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public GetOpenOrdersResponseInner strategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public GetOpenOrdersResponseInner trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public GetOpenOrdersResponseInner trailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public GetOpenOrdersResponseInner usedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public GetOpenOrdersResponseInner workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public GetOpenOrdersResponseInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public GetOpenOrdersResponseInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public GetOpenOrdersResponseInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public GetOpenOrdersResponseInner peggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public GetOpenOrdersResponseInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOpenOrdersResponseInner getOpenOrdersResponseInner = (GetOpenOrdersResponseInner) o; + return Objects.equals(this.symbol, getOpenOrdersResponseInner.symbol) + && Objects.equals(this.orderId, getOpenOrdersResponseInner.orderId) + && Objects.equals(this.orderListId, getOpenOrdersResponseInner.orderListId) + && Objects.equals(this.clientOrderId, getOpenOrdersResponseInner.clientOrderId) + && Objects.equals(this.price, getOpenOrdersResponseInner.price) + && Objects.equals(this.origQty, getOpenOrdersResponseInner.origQty) + && Objects.equals(this.executedQty, getOpenOrdersResponseInner.executedQty) + && Objects.equals( + this.origQuoteOrderQty, getOpenOrdersResponseInner.origQuoteOrderQty) + && Objects.equals( + this.cummulativeQuoteQty, getOpenOrdersResponseInner.cummulativeQuoteQty) + && Objects.equals(this.status, getOpenOrdersResponseInner.status) + && Objects.equals(this.timeInForce, getOpenOrdersResponseInner.timeInForce) + && Objects.equals(this.type, getOpenOrdersResponseInner.type) + && Objects.equals(this.side, getOpenOrdersResponseInner.side) + && Objects.equals(this.stopPrice, getOpenOrdersResponseInner.stopPrice) + && Objects.equals(this.icebergQty, getOpenOrdersResponseInner.icebergQty) + && Objects.equals(this.time, getOpenOrdersResponseInner.time) + && Objects.equals(this.updateTime, getOpenOrdersResponseInner.updateTime) + && Objects.equals(this.isWorking, getOpenOrdersResponseInner.isWorking) + && Objects.equals(this.workingTime, getOpenOrdersResponseInner.workingTime) + && Objects.equals( + this.selfTradePreventionMode, + getOpenOrdersResponseInner.selfTradePreventionMode) + && Objects.equals( + this.preventedMatchId, getOpenOrdersResponseInner.preventedMatchId) + && Objects.equals( + this.preventedQuantity, getOpenOrdersResponseInner.preventedQuantity) + && Objects.equals(this.strategyId, getOpenOrdersResponseInner.strategyId) + && Objects.equals(this.strategyType, getOpenOrdersResponseInner.strategyType) + && Objects.equals(this.trailingDelta, getOpenOrdersResponseInner.trailingDelta) + && Objects.equals(this.trailingTime, getOpenOrdersResponseInner.trailingTime) + && Objects.equals(this.usedSor, getOpenOrdersResponseInner.usedSor) + && Objects.equals(this.workingFloor, getOpenOrdersResponseInner.workingFloor) + && Objects.equals(this.pegPriceType, getOpenOrdersResponseInner.pegPriceType) + && Objects.equals(this.pegOffsetType, getOpenOrdersResponseInner.pegOffsetType) + && Objects.equals(this.pegOffsetValue, getOpenOrdersResponseInner.pegOffsetValue) + && Objects.equals(this.peggedPrice, getOpenOrdersResponseInner.peggedPrice) + && Objects.equals(this.expiryReason, getOpenOrdersResponseInner.expiryReason); + } + + @Override + public int hashCode() { + return Objects.hash( + symbol, + orderId, + orderListId, + clientOrderId, + price, + origQty, + executedQty, + origQuoteOrderQty, + cummulativeQuoteQty, + status, + timeInForce, + type, + side, + stopPrice, + icebergQty, + time, + updateTime, + isWorking, + workingTime, + selfTradePreventionMode, + preventedMatchId, + preventedQuantity, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetOpenOrdersResponseInner {\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); + sb.append(" orderListId: ").append(toIndentedString(orderListId)).append("\n"); + sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); + sb.append(" price: ").append(toIndentedString(price)).append("\n"); + sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); + sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); + sb.append(" origQuoteOrderQty: ").append(toIndentedString(origQuoteOrderQty)).append("\n"); + sb.append(" cummulativeQuoteQty: ") + .append(toIndentedString(cummulativeQuoteQty)) + .append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" side: ").append(toIndentedString(side)).append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); + sb.append(" isWorking: ").append(toIndentedString(isWorking)).append("\n"); + sb.append(" workingTime: ").append(toIndentedString(workingTime)).append("\n"); + sb.append(" selfTradePreventionMode: ") + .append(toIndentedString(selfTradePreventionMode)) + .append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object symbolValue = getSymbol(); + String symbolValueAsString = ""; + symbolValueAsString = symbolValue.toString(); + sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); + Object orderIdValue = getOrderId(); + String orderIdValueAsString = ""; + orderIdValueAsString = orderIdValue.toString(); + sb.append("orderId=").append(urlEncode(orderIdValueAsString)).append(""); + Object orderListIdValue = getOrderListId(); + String orderListIdValueAsString = ""; + orderListIdValueAsString = orderListIdValue.toString(); + sb.append("orderListId=").append(urlEncode(orderListIdValueAsString)).append(""); + Object clientOrderIdValue = getClientOrderId(); + String clientOrderIdValueAsString = ""; + clientOrderIdValueAsString = clientOrderIdValue.toString(); + sb.append("clientOrderId=").append(urlEncode(clientOrderIdValueAsString)).append(""); + Object priceValue = getPrice(); + String priceValueAsString = ""; + priceValueAsString = priceValue.toString(); + sb.append("price=").append(urlEncode(priceValueAsString)).append(""); + Object origQtyValue = getOrigQty(); + String origQtyValueAsString = ""; + origQtyValueAsString = origQtyValue.toString(); + sb.append("origQty=").append(urlEncode(origQtyValueAsString)).append(""); + Object executedQtyValue = getExecutedQty(); + String executedQtyValueAsString = ""; + executedQtyValueAsString = executedQtyValue.toString(); + sb.append("executedQty=").append(urlEncode(executedQtyValueAsString)).append(""); + Object origQuoteOrderQtyValue = getOrigQuoteOrderQty(); + String origQuoteOrderQtyValueAsString = ""; + origQuoteOrderQtyValueAsString = origQuoteOrderQtyValue.toString(); + sb.append("origQuoteOrderQty=") + .append(urlEncode(origQuoteOrderQtyValueAsString)) + .append(""); + Object cummulativeQuoteQtyValue = getCummulativeQuoteQty(); + String cummulativeQuoteQtyValueAsString = ""; + cummulativeQuoteQtyValueAsString = cummulativeQuoteQtyValue.toString(); + sb.append("cummulativeQuoteQty=") + .append(urlEncode(cummulativeQuoteQtyValueAsString)) + .append(""); + Object statusValue = getStatus(); + String statusValueAsString = ""; + statusValueAsString = statusValue.toString(); + sb.append("status=").append(urlEncode(statusValueAsString)).append(""); + Object timeInForceValue = getTimeInForce(); + String timeInForceValueAsString = ""; + timeInForceValueAsString = timeInForceValue.toString(); + sb.append("timeInForce=").append(urlEncode(timeInForceValueAsString)).append(""); + Object typeValue = getType(); + String typeValueAsString = ""; + typeValueAsString = typeValue.toString(); + sb.append("type=").append(urlEncode(typeValueAsString)).append(""); + Object sideValue = getSide(); + String sideValueAsString = ""; + sideValueAsString = sideValue.toString(); + sb.append("side=").append(urlEncode(sideValueAsString)).append(""); + Object stopPriceValue = getStopPrice(); + String stopPriceValueAsString = ""; + stopPriceValueAsString = stopPriceValue.toString(); + sb.append("stopPrice=").append(urlEncode(stopPriceValueAsString)).append(""); + Object icebergQtyValue = getIcebergQty(); + String icebergQtyValueAsString = ""; + icebergQtyValueAsString = icebergQtyValue.toString(); + sb.append("icebergQty=").append(urlEncode(icebergQtyValueAsString)).append(""); + Object timeValue = getTime(); + String timeValueAsString = ""; + timeValueAsString = timeValue.toString(); + sb.append("time=").append(urlEncode(timeValueAsString)).append(""); + Object updateTimeValue = getUpdateTime(); + String updateTimeValueAsString = ""; + updateTimeValueAsString = updateTimeValue.toString(); + sb.append("updateTime=").append(urlEncode(updateTimeValueAsString)).append(""); + Object isWorkingValue = getIsWorking(); + String isWorkingValueAsString = ""; + isWorkingValueAsString = isWorkingValue.toString(); + sb.append("isWorking=").append(urlEncode(isWorkingValueAsString)).append(""); + Object workingTimeValue = getWorkingTime(); + String workingTimeValueAsString = ""; + workingTimeValueAsString = workingTimeValue.toString(); + sb.append("workingTime=").append(urlEncode(workingTimeValueAsString)).append(""); + Object selfTradePreventionModeValue = getSelfTradePreventionMode(); + String selfTradePreventionModeValueAsString = ""; + selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); + sb.append("selfTradePreventionMode=") + .append(urlEncode(selfTradePreventionModeValueAsString)) + .append(""); + Object preventedMatchIdValue = getPreventedMatchId(); + String preventedMatchIdValueAsString = ""; + preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + sb.append("preventedMatchId=").append(urlEncode(preventedMatchIdValueAsString)).append(""); + Object preventedQuantityValue = getPreventedQuantity(); + String preventedQuantityValueAsString = ""; + preventedQuantityValueAsString = preventedQuantityValue.toString(); + sb.append("preventedQuantity=") + .append(urlEncode(preventedQuantityValueAsString)) + .append(""); + Object strategyIdValue = getStrategyId(); + String strategyIdValueAsString = ""; + strategyIdValueAsString = strategyIdValue.toString(); + sb.append("strategyId=").append(urlEncode(strategyIdValueAsString)).append(""); + Object strategyTypeValue = getStrategyType(); + String strategyTypeValueAsString = ""; + strategyTypeValueAsString = strategyTypeValue.toString(); + sb.append("strategyType=").append(urlEncode(strategyTypeValueAsString)).append(""); + Object trailingDeltaValue = getTrailingDelta(); + String trailingDeltaValueAsString = ""; + trailingDeltaValueAsString = trailingDeltaValue.toString(); + sb.append("trailingDelta=").append(urlEncode(trailingDeltaValueAsString)).append(""); + Object trailingTimeValue = getTrailingTime(); + String trailingTimeValueAsString = ""; + trailingTimeValueAsString = trailingTimeValue.toString(); + sb.append("trailingTime=").append(urlEncode(trailingTimeValueAsString)).append(""); + Object usedSorValue = getUsedSor(); + String usedSorValueAsString = ""; + usedSorValueAsString = usedSorValue.toString(); + sb.append("usedSor=").append(urlEncode(usedSorValueAsString)).append(""); + Object workingFloorValue = getWorkingFloor(); + String workingFloorValueAsString = ""; + workingFloorValueAsString = workingFloorValue.toString(); + sb.append("workingFloor=").append(urlEncode(workingFloorValueAsString)).append(""); + Object pegPriceTypeValue = getPegPriceType(); + String pegPriceTypeValueAsString = ""; + pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + sb.append("pegPriceType=").append(urlEncode(pegPriceTypeValueAsString)).append(""); + Object pegOffsetTypeValue = getPegOffsetType(); + String pegOffsetTypeValueAsString = ""; + pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + sb.append("pegOffsetType=").append(urlEncode(pegOffsetTypeValueAsString)).append(""); + Object pegOffsetValueValue = getPegOffsetValue(); + String pegOffsetValueValueAsString = ""; + pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + sb.append("pegOffsetValue=").append(urlEncode(pegOffsetValueValueAsString)).append(""); + Object peggedPriceValue = getPeggedPrice(); + String peggedPriceValueAsString = ""; + peggedPriceValueAsString = peggedPriceValue.toString(); + sb.append("peggedPrice=").append(urlEncode(peggedPriceValueAsString)).append(""); + Object expiryReasonValue = getExpiryReason(); + String expiryReasonValueAsString = ""; + expiryReasonValueAsString = expiryReasonValue.toString(); + sb.append("expiryReason=").append(urlEncode(expiryReasonValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("symbol"); + openapiFields.add("orderId"); + openapiFields.add("orderListId"); + openapiFields.add("clientOrderId"); + openapiFields.add("price"); + openapiFields.add("origQty"); + openapiFields.add("executedQty"); + openapiFields.add("origQuoteOrderQty"); + openapiFields.add("cummulativeQuoteQty"); + openapiFields.add("status"); + openapiFields.add("timeInForce"); + openapiFields.add("type"); + openapiFields.add("side"); + openapiFields.add("stopPrice"); + openapiFields.add("icebergQty"); + openapiFields.add("time"); + openapiFields.add("updateTime"); + openapiFields.add("isWorking"); + openapiFields.add("workingTime"); + openapiFields.add("selfTradePreventionMode"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetOpenOrdersResponseInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetOpenOrdersResponseInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetOpenOrdersResponseInner is not" + + " found in the empty JSON string", + GetOpenOrdersResponseInner.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + if ((jsonObj.get("clientOrderId") != null && !jsonObj.get("clientOrderId").isJsonNull()) + && !jsonObj.get("clientOrderId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `clientOrderId` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("clientOrderId").toString())); + } + if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) + && !jsonObj.get("price").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `price` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("price").toString())); + } + if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) + && !jsonObj.get("origQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `origQty` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("origQty").toString())); + } + if ((jsonObj.get("executedQty") != null && !jsonObj.get("executedQty").isJsonNull()) + && !jsonObj.get("executedQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `executedQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("executedQty").toString())); + } + if ((jsonObj.get("origQuoteOrderQty") != null + && !jsonObj.get("origQuoteOrderQty").isJsonNull()) + && !jsonObj.get("origQuoteOrderQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `origQuoteOrderQty` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("origQuoteOrderQty").toString())); + } + if ((jsonObj.get("cummulativeQuoteQty") != null + && !jsonObj.get("cummulativeQuoteQty").isJsonNull()) + && !jsonObj.get("cummulativeQuoteQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `cummulativeQuoteQty` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("cummulativeQuoteQty").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) + && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("status").toString())); + } + if ((jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) + && !jsonObj.get("timeInForce").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `timeInForce` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("timeInForce").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + if ((jsonObj.get("side") != null && !jsonObj.get("side").isJsonNull()) + && !jsonObj.get("side").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `side` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("side").toString())); + } + if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) + && !jsonObj.get("stopPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `stopPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("stopPrice").toString())); + } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("selfTradePreventionMode") != null + && !jsonObj.get("selfTradePreventionMode").isJsonNull()) + && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `selfTradePreventionMode` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("selfTradePreventionMode").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetOpenOrdersResponseInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetOpenOrdersResponseInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(GetOpenOrdersResponseInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GetOpenOrdersResponseInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetOpenOrdersResponseInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetOpenOrdersResponseInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetOpenOrdersResponseInner + * @throws IOException if the JSON string is invalid with respect to GetOpenOrdersResponseInner + */ + public static GetOpenOrdersResponseInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetOpenOrdersResponseInner.class); + } + + /** + * Convert an instance of GetOpenOrdersResponseInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOrderListResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOrderListResponse.java index a3b6cdd49..8f11d98aa 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOrderListResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOrderListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetOrderListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOrderListResponse { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOrderListResponseOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOrderListResponseOrdersInner.java index 2af7a6ca4..976767d53 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOrderListResponseOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOrderListResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetOrderListResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOrderListResponseOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOrderResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOrderResponse.java index 8883d4b68..cb55c1da1 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOrderResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOrderResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -78,6 +78,12 @@ public class GetOrderResponse { @jakarta.annotation.Nullable private String executedQty; + public static final String SERIALIZED_NAME_ORIG_QUOTE_ORDER_QTY = "origQuoteOrderQty"; + + @SerializedName(SERIALIZED_NAME_ORIG_QUOTE_ORDER_QTY) + @jakarta.annotation.Nullable + private String origQuoteOrderQty; + public static final String SERIALIZED_NAME_CUMMULATIVE_QUOTE_QTY = "cummulativeQuoteQty"; @SerializedName(SERIALIZED_NAME_CUMMULATIVE_QUOTE_QTY) @@ -144,12 +150,6 @@ public class GetOrderResponse { @jakarta.annotation.Nullable private Long workingTime; - public static final String SERIALIZED_NAME_ORIG_QUOTE_ORDER_QTY = "origQuoteOrderQty"; - - @SerializedName(SERIALIZED_NAME_ORIG_QUOTE_ORDER_QTY) - @jakarta.annotation.Nullable - private String origQuoteOrderQty; - public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = "selfTradePreventionMode"; @@ -157,6 +157,84 @@ public class GetOrderResponse { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public GetOrderResponse() {} public GetOrderResponse symbol(@jakarta.annotation.Nullable String symbol) { @@ -165,7 +243,7 @@ public GetOrderResponse symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * symbol. * * @return symbol */ @@ -184,7 +262,7 @@ public GetOrderResponse orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * order Id. * * @return orderId */ @@ -203,7 +281,7 @@ public GetOrderResponse orderListId(@jakarta.annotation.Nullable Long orderListI } /** - * Get orderListId + * This field will always have a value of -1 if not an order list. * * @return orderListId */ @@ -222,7 +300,7 @@ public GetOrderResponse clientOrderId(@jakarta.annotation.Nullable String client } /** - * Get clientOrderId + * client Order Id. * * @return clientOrderId */ @@ -241,7 +319,7 @@ public GetOrderResponse price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * price. * * @return price */ @@ -260,7 +338,7 @@ public GetOrderResponse origQty(@jakarta.annotation.Nullable String origQty) { } /** - * Get origQty + * orig Qty. * * @return origQty */ @@ -279,7 +357,7 @@ public GetOrderResponse executedQty(@jakarta.annotation.Nullable String executed } /** - * Get executedQty + * executed Qty. * * @return executedQty */ @@ -292,6 +370,26 @@ public void setExecutedQty(@jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; } + public GetOrderResponse origQuoteOrderQty( + @jakarta.annotation.Nullable String origQuoteOrderQty) { + this.origQuoteOrderQty = origQuoteOrderQty; + return this; + } + + /** + * orig Quote Order Qty. + * + * @return origQuoteOrderQty + */ + @jakarta.annotation.Nullable + public String getOrigQuoteOrderQty() { + return origQuoteOrderQty; + } + + public void setOrigQuoteOrderQty(@jakarta.annotation.Nullable String origQuoteOrderQty) { + this.origQuoteOrderQty = origQuoteOrderQty; + } + public GetOrderResponse cummulativeQuoteQty( @jakarta.annotation.Nullable String cummulativeQuoteQty) { this.cummulativeQuoteQty = cummulativeQuoteQty; @@ -299,7 +397,7 @@ public GetOrderResponse cummulativeQuoteQty( } /** - * Get cummulativeQuoteQty + * cummulative Quote Qty. * * @return cummulativeQuoteQty */ @@ -318,7 +416,7 @@ public GetOrderResponse status(@jakarta.annotation.Nullable String status) { } /** - * Get status + * status. * * @return status */ @@ -337,7 +435,7 @@ public GetOrderResponse timeInForce(@jakarta.annotation.Nullable String timeInFo } /** - * Get timeInForce + * time In Force. * * @return timeInForce */ @@ -356,7 +454,7 @@ public GetOrderResponse type(@jakarta.annotation.Nullable String type) { } /** - * Get type + * type. * * @return type */ @@ -375,7 +473,7 @@ public GetOrderResponse side(@jakarta.annotation.Nullable String side) { } /** - * Get side + * side. * * @return side */ @@ -394,7 +492,7 @@ public GetOrderResponse stopPrice(@jakarta.annotation.Nullable String stopPrice) } /** - * Get stopPrice + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. * * @return stopPrice */ @@ -413,7 +511,7 @@ public GetOrderResponse icebergQty(@jakarta.annotation.Nullable String icebergQt } /** - * Get icebergQty + * Appears only if the parameter icebergQty was sent in the request. * * @return icebergQty */ @@ -432,7 +530,7 @@ public GetOrderResponse time(@jakarta.annotation.Nullable Long time) { } /** - * Get time + * time. * * @return time */ @@ -451,7 +549,7 @@ public GetOrderResponse updateTime(@jakarta.annotation.Nullable Long updateTime) } /** - * Get updateTime + * update Time. * * @return updateTime */ @@ -470,7 +568,7 @@ public GetOrderResponse isWorking(@jakarta.annotation.Nullable Boolean isWorking } /** - * Get isWorking + * is Working. * * @return isWorking */ @@ -489,7 +587,7 @@ public GetOrderResponse workingTime(@jakarta.annotation.Nullable Long workingTim } /** - * Get workingTime + * working Time. * * @return workingTime */ @@ -502,45 +600,273 @@ public void setWorkingTime(@jakarta.annotation.Nullable Long workingTime) { this.workingTime = workingTime; } - public GetOrderResponse origQuoteOrderQty( - @jakarta.annotation.Nullable String origQuoteOrderQty) { - this.origQuoteOrderQty = origQuoteOrderQty; + public GetOrderResponse selfTradePreventionMode( + @jakarta.annotation.Nullable String selfTradePreventionMode) { + this.selfTradePreventionMode = selfTradePreventionMode; return this; } /** - * Get origQuoteOrderQty + * self Trade Prevention Mode. * - * @return origQuoteOrderQty + * @return selfTradePreventionMode */ @jakarta.annotation.Nullable - public String getOrigQuoteOrderQty() { - return origQuoteOrderQty; - } - - public void setOrigQuoteOrderQty(@jakarta.annotation.Nullable String origQuoteOrderQty) { - this.origQuoteOrderQty = origQuoteOrderQty; + public String getSelfTradePreventionMode() { + return selfTradePreventionMode; } - public GetOrderResponse selfTradePreventionMode( + public void setSelfTradePreventionMode( @jakarta.annotation.Nullable String selfTradePreventionMode) { this.selfTradePreventionMode = selfTradePreventionMode; + } + + public GetOrderResponse preventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; return this; } /** - * Get selfTradePreventionMode + * Appears only if the order expired due to STP. * - * @return selfTradePreventionMode + * @return preventedMatchId */ @jakarta.annotation.Nullable - public String getSelfTradePreventionMode() { - return selfTradePreventionMode; + public Long getPreventedMatchId() { + return preventedMatchId; } - public void setSelfTradePreventionMode( - @jakarta.annotation.Nullable String selfTradePreventionMode) { - this.selfTradePreventionMode = selfTradePreventionMode; + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public GetOrderResponse preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public GetOrderResponse strategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public GetOrderResponse strategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public GetOrderResponse trailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public GetOrderResponse trailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public GetOrderResponse usedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public GetOrderResponse workingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public GetOrderResponse pegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public GetOrderResponse pegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public GetOrderResponse pegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public GetOrderResponse peggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public GetOrderResponse expiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; } @Override @@ -559,6 +885,7 @@ public boolean equals(Object o) { && Objects.equals(this.price, getOrderResponse.price) && Objects.equals(this.origQty, getOrderResponse.origQty) && Objects.equals(this.executedQty, getOrderResponse.executedQty) + && Objects.equals(this.origQuoteOrderQty, getOrderResponse.origQuoteOrderQty) && Objects.equals(this.cummulativeQuoteQty, getOrderResponse.cummulativeQuoteQty) && Objects.equals(this.status, getOrderResponse.status) && Objects.equals(this.timeInForce, getOrderResponse.timeInForce) @@ -570,9 +897,21 @@ public boolean equals(Object o) { && Objects.equals(this.updateTime, getOrderResponse.updateTime) && Objects.equals(this.isWorking, getOrderResponse.isWorking) && Objects.equals(this.workingTime, getOrderResponse.workingTime) - && Objects.equals(this.origQuoteOrderQty, getOrderResponse.origQuoteOrderQty) && Objects.equals( - this.selfTradePreventionMode, getOrderResponse.selfTradePreventionMode); + this.selfTradePreventionMode, getOrderResponse.selfTradePreventionMode) + && Objects.equals(this.preventedMatchId, getOrderResponse.preventedMatchId) + && Objects.equals(this.preventedQuantity, getOrderResponse.preventedQuantity) + && Objects.equals(this.strategyId, getOrderResponse.strategyId) + && Objects.equals(this.strategyType, getOrderResponse.strategyType) + && Objects.equals(this.trailingDelta, getOrderResponse.trailingDelta) + && Objects.equals(this.trailingTime, getOrderResponse.trailingTime) + && Objects.equals(this.usedSor, getOrderResponse.usedSor) + && Objects.equals(this.workingFloor, getOrderResponse.workingFloor) + && Objects.equals(this.pegPriceType, getOrderResponse.pegPriceType) + && Objects.equals(this.pegOffsetType, getOrderResponse.pegOffsetType) + && Objects.equals(this.pegOffsetValue, getOrderResponse.pegOffsetValue) + && Objects.equals(this.peggedPrice, getOrderResponse.peggedPrice) + && Objects.equals(this.expiryReason, getOrderResponse.expiryReason); } @Override @@ -585,6 +924,7 @@ public int hashCode() { price, origQty, executedQty, + origQuoteOrderQty, cummulativeQuoteQty, status, timeInForce, @@ -596,8 +936,20 @@ public int hashCode() { updateTime, isWorking, workingTime, - origQuoteOrderQty, - selfTradePreventionMode); + selfTradePreventionMode, + preventedMatchId, + preventedQuantity, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -611,6 +963,7 @@ public String toString() { sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); + sb.append(" origQuoteOrderQty: ").append(toIndentedString(origQuoteOrderQty)).append("\n"); sb.append(" cummulativeQuoteQty: ") .append(toIndentedString(cummulativeQuoteQty)) .append("\n"); @@ -624,10 +977,22 @@ public String toString() { sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); sb.append(" isWorking: ").append(toIndentedString(isWorking)).append("\n"); sb.append(" workingTime: ").append(toIndentedString(workingTime)).append("\n"); - sb.append(" origQuoteOrderQty: ").append(toIndentedString(origQuoteOrderQty)).append("\n"); sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -663,6 +1028,12 @@ public String toUrlQueryString() { String executedQtyValueAsString = ""; executedQtyValueAsString = executedQtyValue.toString(); sb.append("executedQty=").append(urlEncode(executedQtyValueAsString)).append(""); + Object origQuoteOrderQtyValue = getOrigQuoteOrderQty(); + String origQuoteOrderQtyValueAsString = ""; + origQuoteOrderQtyValueAsString = origQuoteOrderQtyValue.toString(); + sb.append("origQuoteOrderQty=") + .append(urlEncode(origQuoteOrderQtyValueAsString)) + .append(""); Object cummulativeQuoteQtyValue = getCummulativeQuoteQty(); String cummulativeQuoteQtyValueAsString = ""; cummulativeQuoteQtyValueAsString = cummulativeQuoteQtyValue.toString(); @@ -709,18 +1080,66 @@ public String toUrlQueryString() { String workingTimeValueAsString = ""; workingTimeValueAsString = workingTimeValue.toString(); sb.append("workingTime=").append(urlEncode(workingTimeValueAsString)).append(""); - Object origQuoteOrderQtyValue = getOrigQuoteOrderQty(); - String origQuoteOrderQtyValueAsString = ""; - origQuoteOrderQtyValueAsString = origQuoteOrderQtyValue.toString(); - sb.append("origQuoteOrderQty=") - .append(urlEncode(origQuoteOrderQtyValueAsString)) - .append(""); Object selfTradePreventionModeValue = getSelfTradePreventionMode(); String selfTradePreventionModeValueAsString = ""; selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); sb.append("selfTradePreventionMode=") .append(urlEncode(selfTradePreventionModeValueAsString)) .append(""); + Object preventedMatchIdValue = getPreventedMatchId(); + String preventedMatchIdValueAsString = ""; + preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + sb.append("preventedMatchId=").append(urlEncode(preventedMatchIdValueAsString)).append(""); + Object preventedQuantityValue = getPreventedQuantity(); + String preventedQuantityValueAsString = ""; + preventedQuantityValueAsString = preventedQuantityValue.toString(); + sb.append("preventedQuantity=") + .append(urlEncode(preventedQuantityValueAsString)) + .append(""); + Object strategyIdValue = getStrategyId(); + String strategyIdValueAsString = ""; + strategyIdValueAsString = strategyIdValue.toString(); + sb.append("strategyId=").append(urlEncode(strategyIdValueAsString)).append(""); + Object strategyTypeValue = getStrategyType(); + String strategyTypeValueAsString = ""; + strategyTypeValueAsString = strategyTypeValue.toString(); + sb.append("strategyType=").append(urlEncode(strategyTypeValueAsString)).append(""); + Object trailingDeltaValue = getTrailingDelta(); + String trailingDeltaValueAsString = ""; + trailingDeltaValueAsString = trailingDeltaValue.toString(); + sb.append("trailingDelta=").append(urlEncode(trailingDeltaValueAsString)).append(""); + Object trailingTimeValue = getTrailingTime(); + String trailingTimeValueAsString = ""; + trailingTimeValueAsString = trailingTimeValue.toString(); + sb.append("trailingTime=").append(urlEncode(trailingTimeValueAsString)).append(""); + Object usedSorValue = getUsedSor(); + String usedSorValueAsString = ""; + usedSorValueAsString = usedSorValue.toString(); + sb.append("usedSor=").append(urlEncode(usedSorValueAsString)).append(""); + Object workingFloorValue = getWorkingFloor(); + String workingFloorValueAsString = ""; + workingFloorValueAsString = workingFloorValue.toString(); + sb.append("workingFloor=").append(urlEncode(workingFloorValueAsString)).append(""); + Object pegPriceTypeValue = getPegPriceType(); + String pegPriceTypeValueAsString = ""; + pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + sb.append("pegPriceType=").append(urlEncode(pegPriceTypeValueAsString)).append(""); + Object pegOffsetTypeValue = getPegOffsetType(); + String pegOffsetTypeValueAsString = ""; + pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + sb.append("pegOffsetType=").append(urlEncode(pegOffsetTypeValueAsString)).append(""); + Object pegOffsetValueValue = getPegOffsetValue(); + String pegOffsetValueValueAsString = ""; + pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + sb.append("pegOffsetValue=").append(urlEncode(pegOffsetValueValueAsString)).append(""); + Object peggedPriceValue = getPeggedPrice(); + String peggedPriceValueAsString = ""; + peggedPriceValueAsString = peggedPriceValue.toString(); + sb.append("peggedPrice=").append(urlEncode(peggedPriceValueAsString)).append(""); + Object expiryReasonValue = getExpiryReason(); + String expiryReasonValueAsString = ""; + expiryReasonValueAsString = expiryReasonValue.toString(); + sb.append("expiryReason=").append(urlEncode(expiryReasonValueAsString)).append(""); return sb.toString(); } @@ -756,6 +1175,7 @@ private String toIndentedString(Object o) { openapiFields.add("price"); openapiFields.add("origQty"); openapiFields.add("executedQty"); + openapiFields.add("origQuoteOrderQty"); openapiFields.add("cummulativeQuoteQty"); openapiFields.add("status"); openapiFields.add("timeInForce"); @@ -767,8 +1187,20 @@ private String toIndentedString(Object o) { openapiFields.add("updateTime"); openapiFields.add("isWorking"); openapiFields.add("workingTime"); - openapiFields.add("origQuoteOrderQty"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -832,6 +1264,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("executedQty").toString())); } + if ((jsonObj.get("origQuoteOrderQty") != null + && !jsonObj.get("origQuoteOrderQty").isJsonNull()) + && !jsonObj.get("origQuoteOrderQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `origQuoteOrderQty` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("origQuoteOrderQty").toString())); + } if ((jsonObj.get("cummulativeQuoteQty") != null && !jsonObj.get("cummulativeQuoteQty").isJsonNull()) && !jsonObj.get("cummulativeQuoteQty").isJsonPrimitive()) { @@ -889,15 +1330,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("icebergQty").toString())); } - if ((jsonObj.get("origQuoteOrderQty") != null - && !jsonObj.get("origQuoteOrderQty").isJsonNull()) - && !jsonObj.get("origQuoteOrderQty").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `origQuoteOrderQty` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("origQuoteOrderQty").toString())); - } if ((jsonObj.get("selfTradePreventionMode") != null && !jsonObj.get("selfTradePreventionMode").isJsonNull()) && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { @@ -907,6 +1339,55 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetTradesResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetTradesResponse.java index 6f4c7c350..bbb764792 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetTradesResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetTradesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,8 +34,8 @@ /** GetTradesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetTradesResponse extends ArrayList { + comments = "Generator version: 7.22.0") +public class GetTradesResponse extends ArrayList { public GetTradesResponse() {} @Override @@ -116,7 +116,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - HistoricalTradesResponseInner.validateJsonElement(element); + GetTradesResponseInner.validateJsonElement(element); } if (jsonElement == null) { if (!GetTradesResponse.openapiRequiredFields diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetTradesResponseInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetTradesResponseInner.java new file mode 100644 index 000000000..a278cf8e8 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/GetTradesResponseInner.java @@ -0,0 +1,418 @@ +/* + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.rest.model; + +import com.binance.connector.client.spot.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** GetTradesResponseInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class GetTradesResponseInner { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Long id; + + public static final String SERIALIZED_NAME_PRICE = "price"; + + @SerializedName(SERIALIZED_NAME_PRICE) + @jakarta.annotation.Nullable + private String price; + + public static final String SERIALIZED_NAME_QTY = "qty"; + + @SerializedName(SERIALIZED_NAME_QTY) + @jakarta.annotation.Nullable + private String qty; + + public static final String SERIALIZED_NAME_QUOTE_QTY = "quoteQty"; + + @SerializedName(SERIALIZED_NAME_QUOTE_QTY) + @jakarta.annotation.Nullable + private String quoteQty; + + public static final String SERIALIZED_NAME_TIME = "time"; + + @SerializedName(SERIALIZED_NAME_TIME) + @jakarta.annotation.Nullable + private Long time; + + public static final String SERIALIZED_NAME_IS_BUYER_MAKER = "isBuyerMaker"; + + @SerializedName(SERIALIZED_NAME_IS_BUYER_MAKER) + @jakarta.annotation.Nullable + private Boolean isBuyerMaker; + + public static final String SERIALIZED_NAME_IS_BEST_MATCH = "isBestMatch"; + + @SerializedName(SERIALIZED_NAME_IS_BEST_MATCH) + @jakarta.annotation.Nullable + private Boolean isBestMatch; + + public GetTradesResponseInner() {} + + public GetTradesResponseInner id(@jakarta.annotation.Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @jakarta.annotation.Nullable + public Long getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Long id) { + this.id = id; + } + + public GetTradesResponseInner price(@jakarta.annotation.Nullable String price) { + this.price = price; + return this; + } + + /** + * Get price + * + * @return price + */ + @jakarta.annotation.Nullable + public String getPrice() { + return price; + } + + public void setPrice(@jakarta.annotation.Nullable String price) { + this.price = price; + } + + public GetTradesResponseInner qty(@jakarta.annotation.Nullable String qty) { + this.qty = qty; + return this; + } + + /** + * Get qty + * + * @return qty + */ + @jakarta.annotation.Nullable + public String getQty() { + return qty; + } + + public void setQty(@jakarta.annotation.Nullable String qty) { + this.qty = qty; + } + + public GetTradesResponseInner quoteQty(@jakarta.annotation.Nullable String quoteQty) { + this.quoteQty = quoteQty; + return this; + } + + /** + * Get quoteQty + * + * @return quoteQty + */ + @jakarta.annotation.Nullable + public String getQuoteQty() { + return quoteQty; + } + + public void setQuoteQty(@jakarta.annotation.Nullable String quoteQty) { + this.quoteQty = quoteQty; + } + + public GetTradesResponseInner time(@jakarta.annotation.Nullable Long time) { + this.time = time; + return this; + } + + /** + * Get time + * + * @return time + */ + @jakarta.annotation.Nullable + public Long getTime() { + return time; + } + + public void setTime(@jakarta.annotation.Nullable Long time) { + this.time = time; + } + + public GetTradesResponseInner isBuyerMaker(@jakarta.annotation.Nullable Boolean isBuyerMaker) { + this.isBuyerMaker = isBuyerMaker; + return this; + } + + /** + * Get isBuyerMaker + * + * @return isBuyerMaker + */ + @jakarta.annotation.Nullable + public Boolean getIsBuyerMaker() { + return isBuyerMaker; + } + + public void setIsBuyerMaker(@jakarta.annotation.Nullable Boolean isBuyerMaker) { + this.isBuyerMaker = isBuyerMaker; + } + + public GetTradesResponseInner isBestMatch(@jakarta.annotation.Nullable Boolean isBestMatch) { + this.isBestMatch = isBestMatch; + return this; + } + + /** + * Get isBestMatch + * + * @return isBestMatch + */ + @jakarta.annotation.Nullable + public Boolean getIsBestMatch() { + return isBestMatch; + } + + public void setIsBestMatch(@jakarta.annotation.Nullable Boolean isBestMatch) { + this.isBestMatch = isBestMatch; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTradesResponseInner getTradesResponseInner = (GetTradesResponseInner) o; + return Objects.equals(this.id, getTradesResponseInner.id) + && Objects.equals(this.price, getTradesResponseInner.price) + && Objects.equals(this.qty, getTradesResponseInner.qty) + && Objects.equals(this.quoteQty, getTradesResponseInner.quoteQty) + && Objects.equals(this.time, getTradesResponseInner.time) + && Objects.equals(this.isBuyerMaker, getTradesResponseInner.isBuyerMaker) + && Objects.equals(this.isBestMatch, getTradesResponseInner.isBestMatch); + } + + @Override + public int hashCode() { + return Objects.hash(id, price, qty, quoteQty, time, isBuyerMaker, isBestMatch); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetTradesResponseInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" price: ").append(toIndentedString(price)).append("\n"); + sb.append(" qty: ").append(toIndentedString(qty)).append("\n"); + sb.append(" quoteQty: ").append(toIndentedString(quoteQty)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append(" isBuyerMaker: ").append(toIndentedString(isBuyerMaker)).append("\n"); + sb.append(" isBestMatch: ").append(toIndentedString(isBestMatch)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object idValue = getId(); + String idValueAsString = ""; + idValueAsString = idValue.toString(); + sb.append("id=").append(urlEncode(idValueAsString)).append(""); + Object priceValue = getPrice(); + String priceValueAsString = ""; + priceValueAsString = priceValue.toString(); + sb.append("price=").append(urlEncode(priceValueAsString)).append(""); + Object qtyValue = getQty(); + String qtyValueAsString = ""; + qtyValueAsString = qtyValue.toString(); + sb.append("qty=").append(urlEncode(qtyValueAsString)).append(""); + Object quoteQtyValue = getQuoteQty(); + String quoteQtyValueAsString = ""; + quoteQtyValueAsString = quoteQtyValue.toString(); + sb.append("quoteQty=").append(urlEncode(quoteQtyValueAsString)).append(""); + Object timeValue = getTime(); + String timeValueAsString = ""; + timeValueAsString = timeValue.toString(); + sb.append("time=").append(urlEncode(timeValueAsString)).append(""); + Object isBuyerMakerValue = getIsBuyerMaker(); + String isBuyerMakerValueAsString = ""; + isBuyerMakerValueAsString = isBuyerMakerValue.toString(); + sb.append("isBuyerMaker=").append(urlEncode(isBuyerMakerValueAsString)).append(""); + Object isBestMatchValue = getIsBestMatch(); + String isBestMatchValueAsString = ""; + isBestMatchValueAsString = isBestMatchValue.toString(); + sb.append("isBestMatch=").append(urlEncode(isBestMatchValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("price"); + openapiFields.add("qty"); + openapiFields.add("quoteQty"); + openapiFields.add("time"); + openapiFields.add("isBuyerMaker"); + openapiFields.add("isBestMatch"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetTradesResponseInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetTradesResponseInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetTradesResponseInner is not found in" + + " the empty JSON string", + GetTradesResponseInner.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) + && !jsonObj.get("price").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `price` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("price").toString())); + } + if ((jsonObj.get("qty") != null && !jsonObj.get("qty").isJsonNull()) + && !jsonObj.get("qty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `qty` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("qty").toString())); + } + if ((jsonObj.get("quoteQty") != null && !jsonObj.get("quoteQty").isJsonNull()) + && !jsonObj.get("quoteQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `quoteQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("quoteQty").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetTradesResponseInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetTradesResponseInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(GetTradesResponseInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GetTradesResponseInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetTradesResponseInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetTradesResponseInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetTradesResponseInner + * @throws IOException if the JSON string is invalid with respect to GetTradesResponseInner + */ + public static GetTradesResponseInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetTradesResponseInner.class); + } + + /** + * Convert an instance of GetTradesResponseInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/HistoricalBlockTradesResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/HistoricalBlockTradesResponse.java new file mode 100644 index 000000000..8ac768d90 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/HistoricalBlockTradesResponse.java @@ -0,0 +1,187 @@ +/* + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.rest.model; + +import com.binance.connector.client.spot.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** HistoricalBlockTradesResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class HistoricalBlockTradesResponse extends ArrayList { + public HistoricalBlockTradesResponse() {} + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HistoricalBlockTradesResponse {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * HistoricalBlockTradesResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be a array type in the JSON string but got" + + " `%s`", + jsonElement.toString())); + } + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for (JsonElement element : array) { + HistoricalBlockTradesResponseInner.validateJsonElement(element); + } + if (jsonElement == null) { + if (!HistoricalBlockTradesResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in HistoricalBlockTradesResponse is not" + + " found in the empty JSON string", + HistoricalBlockTradesResponse.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!HistoricalBlockTradesResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'HistoricalBlockTradesResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(HistoricalBlockTradesResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, HistoricalBlockTradesResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); + elementAdapter.write(out, obj); + } + + @Override + public HistoricalBlockTradesResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of HistoricalBlockTradesResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of HistoricalBlockTradesResponse + * @throws IOException if the JSON string is invalid with respect to + * HistoricalBlockTradesResponse + */ + public static HistoricalBlockTradesResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, HistoricalBlockTradesResponse.class); + } + + /** + * Convert an instance of HistoricalBlockTradesResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/HistoricalBlockTradesResponseInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/HistoricalBlockTradesResponseInner.java new file mode 100644 index 000000000..b33562289 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/HistoricalBlockTradesResponseInner.java @@ -0,0 +1,397 @@ +/* + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.rest.model; + +import com.binance.connector.client.spot.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** HistoricalBlockTradesResponseInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class HistoricalBlockTradesResponseInner { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Long id; + + public static final String SERIALIZED_NAME_PRICE = "price"; + + @SerializedName(SERIALIZED_NAME_PRICE) + @jakarta.annotation.Nullable + private String price; + + public static final String SERIALIZED_NAME_QTY = "qty"; + + @SerializedName(SERIALIZED_NAME_QTY) + @jakarta.annotation.Nullable + private String qty; + + public static final String SERIALIZED_NAME_QUOTE_QTY = "quoteQty"; + + @SerializedName(SERIALIZED_NAME_QUOTE_QTY) + @jakarta.annotation.Nullable + private String quoteQty; + + public static final String SERIALIZED_NAME_TIME = "time"; + + @SerializedName(SERIALIZED_NAME_TIME) + @jakarta.annotation.Nullable + private Long time; + + public static final String SERIALIZED_NAME_IS_BUYER_MAKER = "isBuyerMaker"; + + @SerializedName(SERIALIZED_NAME_IS_BUYER_MAKER) + @jakarta.annotation.Nullable + private Boolean isBuyerMaker; + + public HistoricalBlockTradesResponseInner() {} + + public HistoricalBlockTradesResponseInner id(@jakarta.annotation.Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @jakarta.annotation.Nullable + public Long getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Long id) { + this.id = id; + } + + public HistoricalBlockTradesResponseInner price(@jakarta.annotation.Nullable String price) { + this.price = price; + return this; + } + + /** + * Get price + * + * @return price + */ + @jakarta.annotation.Nullable + public String getPrice() { + return price; + } + + public void setPrice(@jakarta.annotation.Nullable String price) { + this.price = price; + } + + public HistoricalBlockTradesResponseInner qty(@jakarta.annotation.Nullable String qty) { + this.qty = qty; + return this; + } + + /** + * Get qty + * + * @return qty + */ + @jakarta.annotation.Nullable + public String getQty() { + return qty; + } + + public void setQty(@jakarta.annotation.Nullable String qty) { + this.qty = qty; + } + + public HistoricalBlockTradesResponseInner quoteQty( + @jakarta.annotation.Nullable String quoteQty) { + this.quoteQty = quoteQty; + return this; + } + + /** + * Get quoteQty + * + * @return quoteQty + */ + @jakarta.annotation.Nullable + public String getQuoteQty() { + return quoteQty; + } + + public void setQuoteQty(@jakarta.annotation.Nullable String quoteQty) { + this.quoteQty = quoteQty; + } + + public HistoricalBlockTradesResponseInner time(@jakarta.annotation.Nullable Long time) { + this.time = time; + return this; + } + + /** + * Get time + * + * @return time + */ + @jakarta.annotation.Nullable + public Long getTime() { + return time; + } + + public void setTime(@jakarta.annotation.Nullable Long time) { + this.time = time; + } + + public HistoricalBlockTradesResponseInner isBuyerMaker( + @jakarta.annotation.Nullable Boolean isBuyerMaker) { + this.isBuyerMaker = isBuyerMaker; + return this; + } + + /** + * Get isBuyerMaker + * + * @return isBuyerMaker + */ + @jakarta.annotation.Nullable + public Boolean getIsBuyerMaker() { + return isBuyerMaker; + } + + public void setIsBuyerMaker(@jakarta.annotation.Nullable Boolean isBuyerMaker) { + this.isBuyerMaker = isBuyerMaker; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HistoricalBlockTradesResponseInner historicalBlockTradesResponseInner = + (HistoricalBlockTradesResponseInner) o; + return Objects.equals(this.id, historicalBlockTradesResponseInner.id) + && Objects.equals(this.price, historicalBlockTradesResponseInner.price) + && Objects.equals(this.qty, historicalBlockTradesResponseInner.qty) + && Objects.equals(this.quoteQty, historicalBlockTradesResponseInner.quoteQty) + && Objects.equals(this.time, historicalBlockTradesResponseInner.time) + && Objects.equals( + this.isBuyerMaker, historicalBlockTradesResponseInner.isBuyerMaker); + } + + @Override + public int hashCode() { + return Objects.hash(id, price, qty, quoteQty, time, isBuyerMaker); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HistoricalBlockTradesResponseInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" price: ").append(toIndentedString(price)).append("\n"); + sb.append(" qty: ").append(toIndentedString(qty)).append("\n"); + sb.append(" quoteQty: ").append(toIndentedString(quoteQty)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append(" isBuyerMaker: ").append(toIndentedString(isBuyerMaker)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object idValue = getId(); + String idValueAsString = ""; + idValueAsString = idValue.toString(); + sb.append("id=").append(urlEncode(idValueAsString)).append(""); + Object priceValue = getPrice(); + String priceValueAsString = ""; + priceValueAsString = priceValue.toString(); + sb.append("price=").append(urlEncode(priceValueAsString)).append(""); + Object qtyValue = getQty(); + String qtyValueAsString = ""; + qtyValueAsString = qtyValue.toString(); + sb.append("qty=").append(urlEncode(qtyValueAsString)).append(""); + Object quoteQtyValue = getQuoteQty(); + String quoteQtyValueAsString = ""; + quoteQtyValueAsString = quoteQtyValue.toString(); + sb.append("quoteQty=").append(urlEncode(quoteQtyValueAsString)).append(""); + Object timeValue = getTime(); + String timeValueAsString = ""; + timeValueAsString = timeValue.toString(); + sb.append("time=").append(urlEncode(timeValueAsString)).append(""); + Object isBuyerMakerValue = getIsBuyerMaker(); + String isBuyerMakerValueAsString = ""; + isBuyerMakerValueAsString = isBuyerMakerValue.toString(); + sb.append("isBuyerMaker=").append(urlEncode(isBuyerMakerValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("price"); + openapiFields.add("qty"); + openapiFields.add("quoteQty"); + openapiFields.add("time"); + openapiFields.add("isBuyerMaker"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * HistoricalBlockTradesResponseInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!HistoricalBlockTradesResponseInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in HistoricalBlockTradesResponseInner is" + + " not found in the empty JSON string", + HistoricalBlockTradesResponseInner.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) + && !jsonObj.get("price").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `price` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("price").toString())); + } + if ((jsonObj.get("qty") != null && !jsonObj.get("qty").isJsonNull()) + && !jsonObj.get("qty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `qty` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("qty").toString())); + } + if ((jsonObj.get("quoteQty") != null && !jsonObj.get("quoteQty").isJsonNull()) + && !jsonObj.get("quoteQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `quoteQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("quoteQty").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!HistoricalBlockTradesResponseInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'HistoricalBlockTradesResponseInner' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(HistoricalBlockTradesResponseInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, HistoricalBlockTradesResponseInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public HistoricalBlockTradesResponseInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of HistoricalBlockTradesResponseInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of HistoricalBlockTradesResponseInner + * @throws IOException if the JSON string is invalid with respect to + * HistoricalBlockTradesResponseInner + */ + public static HistoricalBlockTradesResponseInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, HistoricalBlockTradesResponseInner.class); + } + + /** + * Convert an instance of HistoricalBlockTradesResponseInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/HistoricalTradesResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/HistoricalTradesResponse.java index 063f768db..0de64d0ea 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/HistoricalTradesResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/HistoricalTradesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,8 +34,8 @@ /** HistoricalTradesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class HistoricalTradesResponse extends ArrayList { + comments = "Generator version: 7.22.0") +public class HistoricalTradesResponse extends ArrayList { public HistoricalTradesResponse() {} @Override @@ -116,7 +116,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - HistoricalTradesResponseInner.validateJsonElement(element); + GetTradesResponseInner.validateJsonElement(element); } if (jsonElement == null) { if (!HistoricalTradesResponse.openapiRequiredFields diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/HistoricalTradesResponseInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/HistoricalTradesResponseInner.java deleted file mode 100644 index d15f3e01d..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/HistoricalTradesResponseInner.java +++ /dev/null @@ -1,426 +0,0 @@ -/* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.rest.model; - -import com.binance.connector.client.spot.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** HistoricalTradesResponseInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class HistoricalTradesResponseInner { - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @jakarta.annotation.Nullable - private Long id; - - public static final String SERIALIZED_NAME_PRICE = "price"; - - @SerializedName(SERIALIZED_NAME_PRICE) - @jakarta.annotation.Nullable - private String price; - - public static final String SERIALIZED_NAME_QTY = "qty"; - - @SerializedName(SERIALIZED_NAME_QTY) - @jakarta.annotation.Nullable - private String qty; - - public static final String SERIALIZED_NAME_QUOTE_QTY = "quoteQty"; - - @SerializedName(SERIALIZED_NAME_QUOTE_QTY) - @jakarta.annotation.Nullable - private String quoteQty; - - public static final String SERIALIZED_NAME_TIME = "time"; - - @SerializedName(SERIALIZED_NAME_TIME) - @jakarta.annotation.Nullable - private Long time; - - public static final String SERIALIZED_NAME_IS_BUYER_MAKER = "isBuyerMaker"; - - @SerializedName(SERIALIZED_NAME_IS_BUYER_MAKER) - @jakarta.annotation.Nullable - private Boolean isBuyerMaker; - - public static final String SERIALIZED_NAME_IS_BEST_MATCH = "isBestMatch"; - - @SerializedName(SERIALIZED_NAME_IS_BEST_MATCH) - @jakarta.annotation.Nullable - private Boolean isBestMatch; - - public HistoricalTradesResponseInner() {} - - public HistoricalTradesResponseInner id(@jakarta.annotation.Nullable Long id) { - this.id = id; - return this; - } - - /** - * Get id - * - * @return id - */ - @jakarta.annotation.Nullable - public Long getId() { - return id; - } - - public void setId(@jakarta.annotation.Nullable Long id) { - this.id = id; - } - - public HistoricalTradesResponseInner price(@jakarta.annotation.Nullable String price) { - this.price = price; - return this; - } - - /** - * Get price - * - * @return price - */ - @jakarta.annotation.Nullable - public String getPrice() { - return price; - } - - public void setPrice(@jakarta.annotation.Nullable String price) { - this.price = price; - } - - public HistoricalTradesResponseInner qty(@jakarta.annotation.Nullable String qty) { - this.qty = qty; - return this; - } - - /** - * Get qty - * - * @return qty - */ - @jakarta.annotation.Nullable - public String getQty() { - return qty; - } - - public void setQty(@jakarta.annotation.Nullable String qty) { - this.qty = qty; - } - - public HistoricalTradesResponseInner quoteQty(@jakarta.annotation.Nullable String quoteQty) { - this.quoteQty = quoteQty; - return this; - } - - /** - * Get quoteQty - * - * @return quoteQty - */ - @jakarta.annotation.Nullable - public String getQuoteQty() { - return quoteQty; - } - - public void setQuoteQty(@jakarta.annotation.Nullable String quoteQty) { - this.quoteQty = quoteQty; - } - - public HistoricalTradesResponseInner time(@jakarta.annotation.Nullable Long time) { - this.time = time; - return this; - } - - /** - * Get time - * - * @return time - */ - @jakarta.annotation.Nullable - public Long getTime() { - return time; - } - - public void setTime(@jakarta.annotation.Nullable Long time) { - this.time = time; - } - - public HistoricalTradesResponseInner isBuyerMaker( - @jakarta.annotation.Nullable Boolean isBuyerMaker) { - this.isBuyerMaker = isBuyerMaker; - return this; - } - - /** - * Get isBuyerMaker - * - * @return isBuyerMaker - */ - @jakarta.annotation.Nullable - public Boolean getIsBuyerMaker() { - return isBuyerMaker; - } - - public void setIsBuyerMaker(@jakarta.annotation.Nullable Boolean isBuyerMaker) { - this.isBuyerMaker = isBuyerMaker; - } - - public HistoricalTradesResponseInner isBestMatch( - @jakarta.annotation.Nullable Boolean isBestMatch) { - this.isBestMatch = isBestMatch; - return this; - } - - /** - * Get isBestMatch - * - * @return isBestMatch - */ - @jakarta.annotation.Nullable - public Boolean getIsBestMatch() { - return isBestMatch; - } - - public void setIsBestMatch(@jakarta.annotation.Nullable Boolean isBestMatch) { - this.isBestMatch = isBestMatch; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HistoricalTradesResponseInner historicalTradesResponseInner = - (HistoricalTradesResponseInner) o; - return Objects.equals(this.id, historicalTradesResponseInner.id) - && Objects.equals(this.price, historicalTradesResponseInner.price) - && Objects.equals(this.qty, historicalTradesResponseInner.qty) - && Objects.equals(this.quoteQty, historicalTradesResponseInner.quoteQty) - && Objects.equals(this.time, historicalTradesResponseInner.time) - && Objects.equals(this.isBuyerMaker, historicalTradesResponseInner.isBuyerMaker) - && Objects.equals(this.isBestMatch, historicalTradesResponseInner.isBestMatch); - } - - @Override - public int hashCode() { - return Objects.hash(id, price, qty, quoteQty, time, isBuyerMaker, isBestMatch); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HistoricalTradesResponseInner {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" qty: ").append(toIndentedString(qty)).append("\n"); - sb.append(" quoteQty: ").append(toIndentedString(quoteQty)).append("\n"); - sb.append(" time: ").append(toIndentedString(time)).append("\n"); - sb.append(" isBuyerMaker: ").append(toIndentedString(isBuyerMaker)).append("\n"); - sb.append(" isBestMatch: ").append(toIndentedString(isBestMatch)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object idValue = getId(); - String idValueAsString = ""; - idValueAsString = idValue.toString(); - sb.append("id=").append(urlEncode(idValueAsString)).append(""); - Object priceValue = getPrice(); - String priceValueAsString = ""; - priceValueAsString = priceValue.toString(); - sb.append("price=").append(urlEncode(priceValueAsString)).append(""); - Object qtyValue = getQty(); - String qtyValueAsString = ""; - qtyValueAsString = qtyValue.toString(); - sb.append("qty=").append(urlEncode(qtyValueAsString)).append(""); - Object quoteQtyValue = getQuoteQty(); - String quoteQtyValueAsString = ""; - quoteQtyValueAsString = quoteQtyValue.toString(); - sb.append("quoteQty=").append(urlEncode(quoteQtyValueAsString)).append(""); - Object timeValue = getTime(); - String timeValueAsString = ""; - timeValueAsString = timeValue.toString(); - sb.append("time=").append(urlEncode(timeValueAsString)).append(""); - Object isBuyerMakerValue = getIsBuyerMaker(); - String isBuyerMakerValueAsString = ""; - isBuyerMakerValueAsString = isBuyerMakerValue.toString(); - sb.append("isBuyerMaker=").append(urlEncode(isBuyerMakerValueAsString)).append(""); - Object isBestMatchValue = getIsBestMatch(); - String isBestMatchValueAsString = ""; - isBestMatchValueAsString = isBestMatchValue.toString(); - sb.append("isBestMatch=").append(urlEncode(isBestMatchValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("price"); - openapiFields.add("qty"); - openapiFields.add("quoteQty"); - openapiFields.add("time"); - openapiFields.add("isBuyerMaker"); - openapiFields.add("isBestMatch"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * HistoricalTradesResponseInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HistoricalTradesResponseInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in HistoricalTradesResponseInner is not" - + " found in the empty JSON string", - HistoricalTradesResponseInner.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) - && !jsonObj.get("price").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `price` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("price").toString())); - } - if ((jsonObj.get("qty") != null && !jsonObj.get("qty").isJsonNull()) - && !jsonObj.get("qty").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `qty` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("qty").toString())); - } - if ((jsonObj.get("quoteQty") != null && !jsonObj.get("quoteQty").isJsonNull()) - && !jsonObj.get("quoteQty").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `quoteQty` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("quoteQty").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!HistoricalTradesResponseInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'HistoricalTradesResponseInner' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(HistoricalTradesResponseInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, HistoricalTradesResponseInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public HistoricalTradesResponseInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of HistoricalTradesResponseInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of HistoricalTradesResponseInner - * @throws IOException if the JSON string is invalid with respect to - * HistoricalTradesResponseInner - */ - public static HistoricalTradesResponseInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, HistoricalTradesResponseInner.class); - } - - /** - * Convert an instance of HistoricalTradesResponseInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/IcebergPartsFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/IcebergPartsFilter.java index 6d36eeaf3..3360d0dc7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/IcebergPartsFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/IcebergPartsFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** IcebergPartsFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IcebergPartsFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Interval.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Interval.java index c46eb850f..a75ecef98 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Interval.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Interval.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/KlinesItem.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/KlinesItem.java index 41f5f0d3e..b20b2a264 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/KlinesItem.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/KlinesItem.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** KlinesItem */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlinesItem extends ArrayList { public KlinesItem() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/KlinesItemInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/KlinesItemInner.java index e5aad71e2..a643e2fba 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/KlinesItemInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/KlinesItemInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -33,7 +33,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlinesItemInner extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(KlinesItemInner.class.getName()); @@ -45,10 +45,10 @@ public TypeAdapter create(Gson gson, TypeToken type) { return null; // this class only serializes 'KlinesItemInner' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterString = - gson.getDelegateAdapter(this, TypeToken.get(String.class)); final TypeAdapter adapterLong = gson.getDelegateAdapter(this, TypeToken.get(Long.class)); + final TypeAdapter adapterString = + gson.getDelegateAdapter(this, TypeToken.get(String.class)); return (TypeAdapter) new TypeAdapter() { @@ -60,20 +60,20 @@ public void write(JsonWriter out, KlinesItemInner value) return; } - // check if the actual instance is of the type `String` - if (value.getActualInstance() instanceof String) { + // check if the actual instance is of the type `Long` + if (value.getActualInstance() instanceof Long) { JsonPrimitive primitive = - adapterString - .toJsonTree((String) value.getActualInstance()) + adapterLong + .toJsonTree((Long) value.getActualInstance()) .getAsJsonPrimitive(); elementAdapter.write(out, primitive); return; } - // check if the actual instance is of the type `Long` - if (value.getActualInstance() instanceof Long) { + // check if the actual instance is of the type `String` + if (value.getActualInstance() instanceof String) { JsonPrimitive primitive = - adapterLong - .toJsonTree((Long) value.getActualInstance()) + adapterString + .toJsonTree((String) value.getActualInstance()) .getAsJsonPrimitive(); elementAdapter.write(out, primitive); return; @@ -92,50 +92,50 @@ public KlinesItemInner read(JsonReader in) throws IOException { ArrayList errorMessages = new ArrayList<>(); TypeAdapter actualAdapter = elementAdapter; - // deserialize String + // deserialize Long try { // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isString()) { + if (!jsonElement.getAsJsonPrimitive().isNumber()) { throw new IllegalArgumentException( String.format( - "Expected json element to be of type String in" + "Expected json element to be of type Number in" + " the JSON string but got `%s`", jsonElement.toString())); } - actualAdapter = adapterString; + actualAdapter = adapterLong; match++; - log.log(Level.FINER, "Input data matches schema 'String'"); + log.log(Level.FINER, "Input data matches schema 'Long'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for String failed with `%s`.", + "Deserialization for Long failed with `%s`.", e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'String'", - e); + log.log(Level.FINER, "Input data does not match schema 'Long'", e); } - // deserialize Long + // deserialize String try { // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isNumber()) { + if (!jsonElement.getAsJsonPrimitive().isString()) { throw new IllegalArgumentException( String.format( - "Expected json element to be of type Number in" + "Expected json element to be of type String in" + " the JSON string but got `%s`", jsonElement.toString())); } - actualAdapter = adapterLong; + actualAdapter = adapterString; match++; - log.log(Level.FINER, "Input data matches schema 'Long'"); + log.log(Level.FINER, "Input data matches schema 'String'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for Long failed with `%s`.", + "Deserialization for String failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Long'", e); + log.log( + Level.FINER, + "Input data does not match schema 'String'", + e); } if (match == 1) { @@ -168,8 +168,8 @@ public KlinesItemInner(Object o) { } static { - schemas.put("String", String.class); schemas.put("Long", Long.class); + schemas.put("String", String.class); } @Override @@ -185,12 +185,12 @@ public Map> getSchemas() { */ @Override public void setActualInstance(Object instance) { - if (instance instanceof String) { + if (instance instanceof Long) { super.setActualInstance(instance); return; } - if (instance instanceof Long) { + if (instance instanceof String) { super.setActualInstance(instance); return; } @@ -210,25 +210,25 @@ public Object getActualInstance() { } /** - * Get the actual instance of `String`. If the actual instance is not `String`, the + * Get the actual instance of `Long`. If the actual instance is not `Long`, the * ClassCastException will be thrown. * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` + * @return The actual instance of `Long` + * @throws ClassCastException if the instance is not `Long` */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); + public Long getLong() throws ClassCastException { + return (Long) super.getActualInstance(); } /** - * Get the actual instance of `Long`. If the actual instance is not `Long`, the + * Get the actual instance of `String`. If the actual instance is not `String`, the * ClassCastException will be thrown. * - * @return The actual instance of `Long` - * @throws ClassCastException if the instance is not `Long` + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` */ - public Long getLong() throws ClassCastException { - return (Long) super.getActualInstance(); + public String getString() throws ClassCastException { + return (String) super.getActualInstance(); } /** @@ -241,34 +241,34 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate oneOf schemas one by one int validCount = 0; ArrayList errorMessages = new ArrayList<>(); - // validate the json string with String + // validate the json string with Long try { - if (!jsonElement.getAsJsonPrimitive().isString()) { + if (!jsonElement.getAsJsonPrimitive().isNumber()) { throw new IllegalArgumentException( String.format( - "Expected json element to be of type String in the JSON string but" + "Expected json element to be of type Number in the JSON string but" + " got `%s`", jsonElement.toString())); } validCount++; } catch (Exception e) { errorMessages.add( - String.format("Deserialization for String failed with `%s`.", e.getMessage())); + String.format("Deserialization for Long failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Long + // validate the json string with String try { - if (!jsonElement.getAsJsonPrimitive().isNumber()) { + if (!jsonElement.getAsJsonPrimitive().isString()) { throw new IllegalArgumentException( String.format( - "Expected json element to be of type Number in the JSON string but" + "Expected json element to be of type String in the JSON string but" + " got `%s`", jsonElement.toString())); } validCount++; } catch (Exception e) { errorMessages.add( - String.format("Deserialization for Long failed with `%s`.", e.getMessage())); + String.format("Deserialization for String failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/KlinesResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/KlinesResponse.java index 159d9ff8a..e2c9c7152 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/KlinesResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/KlinesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** KlinesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlinesResponse extends ArrayList { public KlinesResponse() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/LotSizeFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/LotSizeFilter.java index ee76642bb..de45bd316 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/LotSizeFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/LotSizeFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** LotSizeFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class LotSizeFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MarketLotSizeFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MarketLotSizeFilter.java index 748ab1a3c..82714bf98 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MarketLotSizeFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MarketLotSizeFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarketLotSizeFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarketLotSizeFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxAssetFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxAssetFilter.java index 92f75e7cd..b3e123863 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxAssetFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxAssetFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MaxAssetFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MaxAssetFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumAlgoOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumAlgoOrdersFilter.java index 06135eef5..4dabd22cf 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumAlgoOrdersFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumAlgoOrdersFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MaxNumAlgoOrdersFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MaxNumAlgoOrdersFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumIcebergOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumIcebergOrdersFilter.java index 5da4a5785..da01d0de5 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumIcebergOrdersFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumIcebergOrdersFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MaxNumIcebergOrdersFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MaxNumIcebergOrdersFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumOrderAmendsFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumOrderAmendsFilter.java index e0ee917e8..c98d494be 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumOrderAmendsFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumOrderAmendsFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MaxNumOrderAmendsFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MaxNumOrderAmendsFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumOrderListsFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumOrderListsFilter.java index f32496d0f..e53ba87f7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumOrderListsFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumOrderListsFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MaxNumOrderListsFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MaxNumOrderListsFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumOrdersFilter.java index 6ae1f9833..02f0d9dd8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumOrdersFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxNumOrdersFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MaxNumOrdersFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MaxNumOrdersFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxPositionFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxPositionFilter.java index ca3b3a58b..c5e4a6e47 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxPositionFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MaxPositionFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MaxPositionFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MaxPositionFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MinNotionalFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MinNotionalFilter.java index 4ca68d7bd..1b9289ff4 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MinNotionalFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MinNotionalFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MinNotionalFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MinNotionalFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyAllocationsResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyAllocationsResponse.java index 2391d2080..ef30e1820 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyAllocationsResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyAllocationsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MyAllocationsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyAllocationsResponse extends ArrayList { public MyAllocationsResponse() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyAllocationsResponseInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyAllocationsResponseInner.java index 3e62b0b45..5963a1924 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyAllocationsResponseInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyAllocationsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MyAllocationsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyAllocationsResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyFiltersResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyFiltersResponse.java index 2b0c42bbb..0dcacce1b 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyFiltersResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyFiltersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,41 +40,43 @@ /** MyFiltersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyFiltersResponse { public static final String SERIALIZED_NAME_EXCHANGE_FILTERS = "exchangeFilters"; @SerializedName(SERIALIZED_NAME_EXCHANGE_FILTERS) @jakarta.annotation.Nullable - private List exchangeFilters; + private List exchangeFilters; public static final String SERIALIZED_NAME_SYMBOL_FILTERS = "symbolFilters"; @SerializedName(SERIALIZED_NAME_SYMBOL_FILTERS) @jakarta.annotation.Nullable - private List symbolFilters; + private List symbolFilters; public static final String SERIALIZED_NAME_ASSET_FILTERS = "assetFilters"; @SerializedName(SERIALIZED_NAME_ASSET_FILTERS) @jakarta.annotation.Nullable - private List assetFilters; + private List assetFilters; public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid MyFiltersResponseRateLimitsInner> rateLimits; public MyFiltersResponse() {} public MyFiltersResponse exchangeFilters( - @jakarta.annotation.Nullable List exchangeFilters) { + @jakarta.annotation.Nullable + List exchangeFilters) { this.exchangeFilters = exchangeFilters; return this; } - public MyFiltersResponse addExchangeFiltersItem(ExchangeFilters exchangeFiltersItem) { + public MyFiltersResponse addExchangeFiltersItem( + MyFiltersResponseExchangeFiltersInner exchangeFiltersItem) { if (this.exchangeFilters == null) { this.exchangeFilters = new ArrayList<>(); } @@ -89,22 +91,24 @@ public MyFiltersResponse addExchangeFiltersItem(ExchangeFilters exchangeFiltersI */ @jakarta.annotation.Nullable @Valid - public List getExchangeFilters() { + public List getExchangeFilters() { return exchangeFilters; } public void setExchangeFilters( - @jakarta.annotation.Nullable List exchangeFilters) { + @jakarta.annotation.Nullable + List exchangeFilters) { this.exchangeFilters = exchangeFilters; } public MyFiltersResponse symbolFilters( - @jakarta.annotation.Nullable List symbolFilters) { + @jakarta.annotation.Nullable List symbolFilters) { this.symbolFilters = symbolFilters; return this; } - public MyFiltersResponse addSymbolFiltersItem(SymbolFilters symbolFiltersItem) { + public MyFiltersResponse addSymbolFiltersItem( + MyFiltersResponseSymbolFiltersInner symbolFiltersItem) { if (this.symbolFilters == null) { this.symbolFilters = new ArrayList<>(); } @@ -119,21 +123,23 @@ public MyFiltersResponse addSymbolFiltersItem(SymbolFilters symbolFiltersItem) { */ @jakarta.annotation.Nullable @Valid - public List getSymbolFilters() { + public List getSymbolFilters() { return symbolFilters; } - public void setSymbolFilters(@jakarta.annotation.Nullable List symbolFilters) { + public void setSymbolFilters( + @jakarta.annotation.Nullable List symbolFilters) { this.symbolFilters = symbolFilters; } public MyFiltersResponse assetFilters( - @jakarta.annotation.Nullable List assetFilters) { + @jakarta.annotation.Nullable List assetFilters) { this.assetFilters = assetFilters; return this; } - public MyFiltersResponse addAssetFiltersItem(AssetFilters assetFiltersItem) { + public MyFiltersResponse addAssetFiltersItem( + MyFiltersResponseAssetFiltersInner assetFiltersItem) { if (this.assetFilters == null) { this.assetFilters = new ArrayList<>(); } @@ -148,21 +154,22 @@ public MyFiltersResponse addAssetFiltersItem(AssetFilters assetFiltersItem) { */ @jakarta.annotation.Nullable @Valid - public List getAssetFilters() { + public List getAssetFilters() { return assetFilters; } - public void setAssetFilters(@jakarta.annotation.Nullable List assetFilters) { + public void setAssetFilters( + @jakarta.annotation.Nullable List assetFilters) { this.assetFilters = assetFilters; } public MyFiltersResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable List<@Valid MyFiltersResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public MyFiltersResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public MyFiltersResponse addRateLimitsItem(MyFiltersResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -177,11 +184,12 @@ public MyFiltersResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid MyFiltersResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable List<@Valid MyFiltersResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -318,7 +326,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `exchangeFilters` (array) for (int i = 0; i < jsonArrayexchangeFilters.size(); i++) { - ExchangeFilters.validateJsonElement(jsonArrayexchangeFilters.get(i)); + MyFiltersResponseExchangeFiltersInner.validateJsonElement( + jsonArrayexchangeFilters.get(i)); } ; } @@ -337,7 +346,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `symbolFilters` (array) for (int i = 0; i < jsonArraysymbolFilters.size(); i++) { - SymbolFilters.validateJsonElement(jsonArraysymbolFilters.get(i)); + MyFiltersResponseSymbolFiltersInner.validateJsonElement( + jsonArraysymbolFilters.get(i)); } ; } @@ -356,7 +366,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `assetFilters` (array) for (int i = 0; i < jsonArrayassetFilters.size(); i++) { - AssetFilters.validateJsonElement(jsonArrayassetFilters.get(i)); + MyFiltersResponseAssetFiltersInner.validateJsonElement( + jsonArrayassetFilters.get(i)); } ; } @@ -375,7 +386,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + MyFiltersResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyFiltersResponseAssetFiltersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyFiltersResponseAssetFiltersInner.java new file mode 100644 index 000000000..fa6747a7b --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyFiltersResponseAssetFiltersInner.java @@ -0,0 +1,273 @@ +/* + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.rest.model; + +import com.binance.connector.client.common.AbstractOpenApiSchema; +import com.binance.connector.client.spot.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.hibernate.validator.constraints.*; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class MyFiltersResponseAssetFiltersInner extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(MyFiltersResponseAssetFiltersInner.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MyFiltersResponseAssetFiltersInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MyFiltersResponseAssetFiltersInner' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterMaxAssetFilter = + gson.getDelegateAdapter(this, TypeToken.get(MaxAssetFilter.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, MyFiltersResponseAssetFiltersInner value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `MaxAssetFilter` + if (value.getActualInstance() instanceof MaxAssetFilter) { + JsonElement element = + adapterMaxAssetFilter.toJsonTree( + (MaxAssetFilter) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " MaxAssetFilter"); + } + + @Override + public MyFiltersResponseAssetFiltersInner read(JsonReader in) + throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + JsonObject jsonObject = jsonElement.getAsJsonObject(); + + // use discriminator value for faster oneOf lookup + MyFiltersResponseAssetFiltersInner + newMyFiltersResponseAssetFiltersInner = + new MyFiltersResponseAssetFiltersInner(); + if (jsonObject.get("filterType") == null) { + log.log( + Level.WARNING, + "Failed to lookup discriminator value for" + + " MyFiltersResponseAssetFiltersInner as `filterType`" + + " was not found in the payload or the payload is" + + " empty."); + } else { + // look up the discriminator value in the field `filterType` + switch (jsonObject.get("filterType").getAsString()) { + case "MAX_ASSET": + deserialized = + adapterMaxAssetFilter.fromJsonTree(jsonObject); + newMyFiltersResponseAssetFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseAssetFiltersInner; + default: + log.log( + Level.WARNING, + String.format( + "Failed to lookup discriminator value `%s`" + + " for MyFiltersResponseAssetFiltersInner." + + " Possible values: MAX_ASSET", + jsonObject + .get("filterType") + .getAsString())); + } + } + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize MaxAssetFilter + try { + // validate the JSON object to see if any exception is thrown + MaxAssetFilter.validateJsonElement(jsonElement); + actualAdapter = adapterMaxAssetFilter; + match++; + log.log(Level.FINER, "Input data matches schema 'MaxAssetFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for MaxAssetFilter failed with" + + " `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'MaxAssetFilter'", + e); + } + + if (match == 1) { + MyFiltersResponseAssetFiltersInner ret = + new MyFiltersResponseAssetFiltersInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for" + + " MyFiltersResponseAssetFiltersInner: %d classes" + + " match result, expected 1. Detailed failure" + + " message for oneOf schemas: %s. JSON: %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public MyFiltersResponseAssetFiltersInner() { + super("oneOf", Boolean.FALSE); + } + + public MyFiltersResponseAssetFiltersInner(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("MaxAssetFilter", MaxAssetFilter.class); + } + + @Override + public Map> getSchemas() { + return MyFiltersResponseAssetFiltersInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: MaxAssetFilter + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof MaxAssetFilter) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be MaxAssetFilter"); + } + + /** + * Get the actual instance, which can be the following: MaxAssetFilter + * + * @return The actual instance (MaxAssetFilter) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `MaxAssetFilter`. If the actual instance is not `MaxAssetFilter`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MaxAssetFilter` + * @throws ClassCastException if the instance is not `MaxAssetFilter` + */ + public MaxAssetFilter getMaxAssetFilter() throws ClassCastException { + return (MaxAssetFilter) super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * MyFiltersResponseAssetFiltersInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with MaxAssetFilter + try { + MaxAssetFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for MaxAssetFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for MyFiltersResponseAssetFiltersInner with" + + " oneOf schemas: MaxAssetFilter. %d class(es) match the result," + + " expected 1. Detailed failure message for oneOf schemas: %s." + + " JSON: %s", + validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of MyFiltersResponseAssetFiltersInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of MyFiltersResponseAssetFiltersInner + * @throws IOException if the JSON string is invalid with respect to + * MyFiltersResponseAssetFiltersInner + */ + public static MyFiltersResponseAssetFiltersInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, MyFiltersResponseAssetFiltersInner.class); + } + + /** + * Convert an instance of MyFiltersResponseAssetFiltersInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyFiltersResponseExchangeFiltersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyFiltersResponseExchangeFiltersInner.java new file mode 100644 index 000000000..0f9c8a8a6 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyFiltersResponseExchangeFiltersInner.java @@ -0,0 +1,521 @@ +/* + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.rest.model; + +import com.binance.connector.client.common.AbstractOpenApiSchema; +import com.binance.connector.client.spot.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.hibernate.validator.constraints.*; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class MyFiltersResponseExchangeFiltersInner extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(MyFiltersResponseExchangeFiltersInner.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MyFiltersResponseExchangeFiltersInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MyFiltersResponseExchangeFiltersInner' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterExchangeMaxNumOrdersFilter = + gson.getDelegateAdapter(this, TypeToken.get(ExchangeMaxNumOrdersFilter.class)); + final TypeAdapter + adapterExchangeMaxNumAlgoOrdersFilter = + gson.getDelegateAdapter( + this, TypeToken.get(ExchangeMaxNumAlgoOrdersFilter.class)); + final TypeAdapter + adapterExchangeMaxNumIcebergOrdersFilter = + gson.getDelegateAdapter( + this, TypeToken.get(ExchangeMaxNumIcebergOrdersFilter.class)); + final TypeAdapter + adapterExchangeMaxNumOrderListsFilter = + gson.getDelegateAdapter( + this, TypeToken.get(ExchangeMaxNumOrderListsFilter.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, MyFiltersResponseExchangeFiltersInner value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type + // `ExchangeMaxNumOrdersFilter` + if (value.getActualInstance() instanceof ExchangeMaxNumOrdersFilter) { + JsonElement element = + adapterExchangeMaxNumOrdersFilter.toJsonTree( + (ExchangeMaxNumOrdersFilter) + value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type + // `ExchangeMaxNumAlgoOrdersFilter` + if (value.getActualInstance() + instanceof ExchangeMaxNumAlgoOrdersFilter) { + JsonElement element = + adapterExchangeMaxNumAlgoOrdersFilter.toJsonTree( + (ExchangeMaxNumAlgoOrdersFilter) + value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type + // `ExchangeMaxNumIcebergOrdersFilter` + if (value.getActualInstance() + instanceof ExchangeMaxNumIcebergOrdersFilter) { + JsonElement element = + adapterExchangeMaxNumIcebergOrdersFilter.toJsonTree( + (ExchangeMaxNumIcebergOrdersFilter) + value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type + // `ExchangeMaxNumOrderListsFilter` + if (value.getActualInstance() + instanceof ExchangeMaxNumOrderListsFilter) { + JsonElement element = + adapterExchangeMaxNumOrderListsFilter.toJsonTree( + (ExchangeMaxNumOrderListsFilter) + value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " ExchangeMaxNumAlgoOrdersFilter," + + " ExchangeMaxNumIcebergOrdersFilter," + + " ExchangeMaxNumOrderListsFilter," + + " ExchangeMaxNumOrdersFilter"); + } + + @Override + public MyFiltersResponseExchangeFiltersInner read(JsonReader in) + throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + JsonObject jsonObject = jsonElement.getAsJsonObject(); + + // use discriminator value for faster oneOf lookup + MyFiltersResponseExchangeFiltersInner + newMyFiltersResponseExchangeFiltersInner = + new MyFiltersResponseExchangeFiltersInner(); + if (jsonObject.get("filterType") == null) { + log.log( + Level.WARNING, + "Failed to lookup discriminator value for" + + " MyFiltersResponseExchangeFiltersInner as" + + " `filterType` was not found in the payload or the" + + " payload is empty."); + } else { + // look up the discriminator value in the field `filterType` + switch (jsonObject.get("filterType").getAsString()) { + case "EXCHANGE_MAX_NUM_ALGO_ORDERS": + deserialized = + adapterExchangeMaxNumAlgoOrdersFilter.fromJsonTree( + jsonObject); + newMyFiltersResponseExchangeFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseExchangeFiltersInner; + case "EXCHANGE_MAX_NUM_ICEBERG_ORDERS": + deserialized = + adapterExchangeMaxNumIcebergOrdersFilter + .fromJsonTree(jsonObject); + newMyFiltersResponseExchangeFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseExchangeFiltersInner; + case "EXCHANGE_MAX_NUM_ORDERS": + deserialized = + adapterExchangeMaxNumOrdersFilter.fromJsonTree( + jsonObject); + newMyFiltersResponseExchangeFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseExchangeFiltersInner; + case "EXCHANGE_MAX_NUM_ORDER_LISTS": + deserialized = + adapterExchangeMaxNumOrderListsFilter.fromJsonTree( + jsonObject); + newMyFiltersResponseExchangeFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseExchangeFiltersInner; + default: + log.log( + Level.WARNING, + String.format( + "Failed to lookup discriminator value `%s`" + + " for MyFiltersResponseExchangeFiltersInner." + + " Possible values:" + + " EXCHANGE_MAX_NUM_ALGO_ORDERS" + + " EXCHANGE_MAX_NUM_ICEBERG_ORDERS" + + " EXCHANGE_MAX_NUM_ORDERS" + + " EXCHANGE_MAX_NUM_ORDER_LISTS", + jsonObject + .get("filterType") + .getAsString())); + } + } + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize ExchangeMaxNumOrdersFilter + try { + // validate the JSON object to see if any exception is thrown + ExchangeMaxNumOrdersFilter.validateJsonElement(jsonElement); + actualAdapter = adapterExchangeMaxNumOrdersFilter; + match++; + log.log( + Level.FINER, + "Input data matches schema 'ExchangeMaxNumOrdersFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for ExchangeMaxNumOrdersFilter" + + " failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema" + + " 'ExchangeMaxNumOrdersFilter'", + e); + } + // deserialize ExchangeMaxNumAlgoOrdersFilter + try { + // validate the JSON object to see if any exception is thrown + ExchangeMaxNumAlgoOrdersFilter.validateJsonElement(jsonElement); + actualAdapter = adapterExchangeMaxNumAlgoOrdersFilter; + match++; + log.log( + Level.FINER, + "Input data matches schema" + + " 'ExchangeMaxNumAlgoOrdersFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for ExchangeMaxNumAlgoOrdersFilter" + + " failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema" + + " 'ExchangeMaxNumAlgoOrdersFilter'", + e); + } + // deserialize ExchangeMaxNumIcebergOrdersFilter + try { + // validate the JSON object to see if any exception is thrown + ExchangeMaxNumIcebergOrdersFilter.validateJsonElement(jsonElement); + actualAdapter = adapterExchangeMaxNumIcebergOrdersFilter; + match++; + log.log( + Level.FINER, + "Input data matches schema" + + " 'ExchangeMaxNumIcebergOrdersFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for" + + " ExchangeMaxNumIcebergOrdersFilter failed" + + " with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema" + + " 'ExchangeMaxNumIcebergOrdersFilter'", + e); + } + // deserialize ExchangeMaxNumOrderListsFilter + try { + // validate the JSON object to see if any exception is thrown + ExchangeMaxNumOrderListsFilter.validateJsonElement(jsonElement); + actualAdapter = adapterExchangeMaxNumOrderListsFilter; + match++; + log.log( + Level.FINER, + "Input data matches schema" + + " 'ExchangeMaxNumOrderListsFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for ExchangeMaxNumOrderListsFilter" + + " failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema" + + " 'ExchangeMaxNumOrderListsFilter'", + e); + } + + if (match == 1) { + MyFiltersResponseExchangeFiltersInner ret = + new MyFiltersResponseExchangeFiltersInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for" + + " MyFiltersResponseExchangeFiltersInner: %d" + + " classes match result, expected 1. Detailed" + + " failure message for oneOf schemas: %s. JSON:" + + " %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public MyFiltersResponseExchangeFiltersInner() { + super("oneOf", Boolean.FALSE); + } + + public MyFiltersResponseExchangeFiltersInner(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("ExchangeMaxNumOrdersFilter", ExchangeMaxNumOrdersFilter.class); + schemas.put("ExchangeMaxNumAlgoOrdersFilter", ExchangeMaxNumAlgoOrdersFilter.class); + schemas.put("ExchangeMaxNumIcebergOrdersFilter", ExchangeMaxNumIcebergOrdersFilter.class); + schemas.put("ExchangeMaxNumOrderListsFilter", ExchangeMaxNumOrderListsFilter.class); + } + + @Override + public Map> getSchemas() { + return MyFiltersResponseExchangeFiltersInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: ExchangeMaxNumAlgoOrdersFilter, + * ExchangeMaxNumIcebergOrdersFilter, ExchangeMaxNumOrderListsFilter, ExchangeMaxNumOrdersFilter + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof ExchangeMaxNumOrdersFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof ExchangeMaxNumAlgoOrdersFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof ExchangeMaxNumIcebergOrdersFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof ExchangeMaxNumOrderListsFilter) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be ExchangeMaxNumAlgoOrdersFilter," + + " ExchangeMaxNumIcebergOrdersFilter, ExchangeMaxNumOrderListsFilter," + + " ExchangeMaxNumOrdersFilter"); + } + + /** + * Get the actual instance, which can be the following: ExchangeMaxNumAlgoOrdersFilter, + * ExchangeMaxNumIcebergOrdersFilter, ExchangeMaxNumOrderListsFilter, ExchangeMaxNumOrdersFilter + * + * @return The actual instance (ExchangeMaxNumAlgoOrdersFilter, + * ExchangeMaxNumIcebergOrdersFilter, ExchangeMaxNumOrderListsFilter, + * ExchangeMaxNumOrdersFilter) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `ExchangeMaxNumOrdersFilter`. If the actual instance is not + * `ExchangeMaxNumOrdersFilter`, the ClassCastException will be thrown. + * + * @return The actual instance of `ExchangeMaxNumOrdersFilter` + * @throws ClassCastException if the instance is not `ExchangeMaxNumOrdersFilter` + */ + public ExchangeMaxNumOrdersFilter getExchangeMaxNumOrdersFilter() throws ClassCastException { + return (ExchangeMaxNumOrdersFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `ExchangeMaxNumAlgoOrdersFilter`. If the actual instance is not + * `ExchangeMaxNumAlgoOrdersFilter`, the ClassCastException will be thrown. + * + * @return The actual instance of `ExchangeMaxNumAlgoOrdersFilter` + * @throws ClassCastException if the instance is not `ExchangeMaxNumAlgoOrdersFilter` + */ + public ExchangeMaxNumAlgoOrdersFilter getExchangeMaxNumAlgoOrdersFilter() + throws ClassCastException { + return (ExchangeMaxNumAlgoOrdersFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `ExchangeMaxNumIcebergOrdersFilter`. If the actual instance is not + * `ExchangeMaxNumIcebergOrdersFilter`, the ClassCastException will be thrown. + * + * @return The actual instance of `ExchangeMaxNumIcebergOrdersFilter` + * @throws ClassCastException if the instance is not `ExchangeMaxNumIcebergOrdersFilter` + */ + public ExchangeMaxNumIcebergOrdersFilter getExchangeMaxNumIcebergOrdersFilter() + throws ClassCastException { + return (ExchangeMaxNumIcebergOrdersFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `ExchangeMaxNumOrderListsFilter`. If the actual instance is not + * `ExchangeMaxNumOrderListsFilter`, the ClassCastException will be thrown. + * + * @return The actual instance of `ExchangeMaxNumOrderListsFilter` + * @throws ClassCastException if the instance is not `ExchangeMaxNumOrderListsFilter` + */ + public ExchangeMaxNumOrderListsFilter getExchangeMaxNumOrderListsFilter() + throws ClassCastException { + return (ExchangeMaxNumOrderListsFilter) super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * MyFiltersResponseExchangeFiltersInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with ExchangeMaxNumOrdersFilter + try { + ExchangeMaxNumOrdersFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for ExchangeMaxNumOrdersFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with ExchangeMaxNumAlgoOrdersFilter + try { + ExchangeMaxNumAlgoOrdersFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for ExchangeMaxNumAlgoOrdersFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with ExchangeMaxNumIcebergOrdersFilter + try { + ExchangeMaxNumIcebergOrdersFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for ExchangeMaxNumIcebergOrdersFilter failed with" + + " `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with ExchangeMaxNumOrderListsFilter + try { + ExchangeMaxNumOrderListsFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for ExchangeMaxNumOrderListsFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for MyFiltersResponseExchangeFiltersInner" + + " with oneOf schemas: ExchangeMaxNumAlgoOrdersFilter," + + " ExchangeMaxNumIcebergOrdersFilter," + + " ExchangeMaxNumOrderListsFilter, ExchangeMaxNumOrdersFilter. %d" + + " class(es) match the result, expected 1. Detailed failure" + + " message for oneOf schemas: %s. JSON: %s", + validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of MyFiltersResponseExchangeFiltersInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of MyFiltersResponseExchangeFiltersInner + * @throws IOException if the JSON string is invalid with respect to + * MyFiltersResponseExchangeFiltersInner + */ + public static MyFiltersResponseExchangeFiltersInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, MyFiltersResponseExchangeFiltersInner.class); + } + + /** + * Convert an instance of MyFiltersResponseExchangeFiltersInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyFiltersResponseRateLimitsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyFiltersResponseRateLimitsInner.java new file mode 100644 index 000000000..bceb8f553 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyFiltersResponseRateLimitsInner.java @@ -0,0 +1,354 @@ +/* + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.rest.model; + +import com.binance.connector.client.spot.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** MyFiltersResponseRateLimitsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class MyFiltersResponseRateLimitsInner { + public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMIT_TYPE) + @jakarta.annotation.Nullable + private String rateLimitType; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private String interval; + + public static final String SERIALIZED_NAME_INTERVAL_NUM = "intervalNum"; + + @SerializedName(SERIALIZED_NAME_INTERVAL_NUM) + @jakarta.annotation.Nullable + private Long intervalNum; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + + @SerializedName(SERIALIZED_NAME_LIMIT) + @jakarta.annotation.Nullable + private Long limit; + + public static final String SERIALIZED_NAME_COUNT = "count"; + + @SerializedName(SERIALIZED_NAME_COUNT) + @jakarta.annotation.Nullable + private Long count; + + public MyFiltersResponseRateLimitsInner() {} + + public MyFiltersResponseRateLimitsInner rateLimitType( + @jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + return this; + } + + /** + * Get rateLimitType + * + * @return rateLimitType + */ + @jakarta.annotation.Nullable + public String getRateLimitType() { + return rateLimitType; + } + + public void setRateLimitType(@jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + } + + public MyFiltersResponseRateLimitsInner interval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + public String getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + } + + public MyFiltersResponseRateLimitsInner intervalNum( + @jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + return this; + } + + /** + * Get intervalNum + * + * @return intervalNum + */ + @jakarta.annotation.Nullable + public Long getIntervalNum() { + return intervalNum; + } + + public void setIntervalNum(@jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + } + + public MyFiltersResponseRateLimitsInner limit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * + * @return limit + */ + @jakarta.annotation.Nullable + public Long getLimit() { + return limit; + } + + public void setLimit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + } + + public MyFiltersResponseRateLimitsInner count(@jakarta.annotation.Nullable Long count) { + this.count = count; + return this; + } + + /** + * Get count + * + * @return count + */ + @jakarta.annotation.Nullable + public Long getCount() { + return count; + } + + public void setCount(@jakarta.annotation.Nullable Long count) { + this.count = count; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MyFiltersResponseRateLimitsInner myFiltersResponseRateLimitsInner = + (MyFiltersResponseRateLimitsInner) o; + return Objects.equals(this.rateLimitType, myFiltersResponseRateLimitsInner.rateLimitType) + && Objects.equals(this.interval, myFiltersResponseRateLimitsInner.interval) + && Objects.equals(this.intervalNum, myFiltersResponseRateLimitsInner.intervalNum) + && Objects.equals(this.limit, myFiltersResponseRateLimitsInner.limit) + && Objects.equals(this.count, myFiltersResponseRateLimitsInner.count); + } + + @Override + public int hashCode() { + return Objects.hash(rateLimitType, interval, intervalNum, limit, count); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MyFiltersResponseRateLimitsInner {\n"); + sb.append(" rateLimitType: ").append(toIndentedString(rateLimitType)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" intervalNum: ").append(toIndentedString(intervalNum)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object rateLimitTypeValue = getRateLimitType(); + String rateLimitTypeValueAsString = ""; + rateLimitTypeValueAsString = rateLimitTypeValue.toString(); + sb.append("rateLimitType=").append(urlEncode(rateLimitTypeValueAsString)).append(""); + Object intervalValue = getInterval(); + String intervalValueAsString = ""; + intervalValueAsString = intervalValue.toString(); + sb.append("interval=").append(urlEncode(intervalValueAsString)).append(""); + Object intervalNumValue = getIntervalNum(); + String intervalNumValueAsString = ""; + intervalNumValueAsString = intervalNumValue.toString(); + sb.append("intervalNum=").append(urlEncode(intervalNumValueAsString)).append(""); + Object limitValue = getLimit(); + String limitValueAsString = ""; + limitValueAsString = limitValue.toString(); + sb.append("limit=").append(urlEncode(limitValueAsString)).append(""); + Object countValue = getCount(); + String countValueAsString = ""; + countValueAsString = countValue.toString(); + sb.append("count=").append(urlEncode(countValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("rateLimitType"); + openapiFields.add("interval"); + openapiFields.add("intervalNum"); + openapiFields.add("limit"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * MyFiltersResponseRateLimitsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MyFiltersResponseRateLimitsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in MyFiltersResponseRateLimitsInner is" + + " not found in the empty JSON string", + MyFiltersResponseRateLimitsInner.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("rateLimitType") != null && !jsonObj.get("rateLimitType").isJsonNull()) + && !jsonObj.get("rateLimitType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimitType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimitType").toString())); + } + if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) + && !jsonObj.get("interval").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `interval` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("interval").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MyFiltersResponseRateLimitsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MyFiltersResponseRateLimitsInner' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(MyFiltersResponseRateLimitsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, MyFiltersResponseRateLimitsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MyFiltersResponseRateLimitsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of MyFiltersResponseRateLimitsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of MyFiltersResponseRateLimitsInner + * @throws IOException if the JSON string is invalid with respect to + * MyFiltersResponseRateLimitsInner + */ + public static MyFiltersResponseRateLimitsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MyFiltersResponseRateLimitsInner.class); + } + + /** + * Convert an instance of MyFiltersResponseRateLimitsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyFiltersResponseSymbolFiltersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyFiltersResponseSymbolFiltersInner.java new file mode 100644 index 000000000..19045bc6d --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyFiltersResponseSymbolFiltersInner.java @@ -0,0 +1,1288 @@ +/* + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.rest.model; + +import com.binance.connector.client.common.AbstractOpenApiSchema; +import com.binance.connector.client.spot.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.hibernate.validator.constraints.*; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class MyFiltersResponseSymbolFiltersInner extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(MyFiltersResponseSymbolFiltersInner.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MyFiltersResponseSymbolFiltersInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MyFiltersResponseSymbolFiltersInner' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterPriceFilter = + gson.getDelegateAdapter(this, TypeToken.get(PriceFilter.class)); + final TypeAdapter adapterPercentPriceFilter = + gson.getDelegateAdapter(this, TypeToken.get(PercentPriceFilter.class)); + final TypeAdapter adapterPercentPriceBySideFilter = + gson.getDelegateAdapter(this, TypeToken.get(PercentPriceBySideFilter.class)); + final TypeAdapter adapterLotSizeFilter = + gson.getDelegateAdapter(this, TypeToken.get(LotSizeFilter.class)); + final TypeAdapter adapterMinNotionalFilter = + gson.getDelegateAdapter(this, TypeToken.get(MinNotionalFilter.class)); + final TypeAdapter adapterNotionalFilter = + gson.getDelegateAdapter(this, TypeToken.get(NotionalFilter.class)); + final TypeAdapter adapterIcebergPartsFilter = + gson.getDelegateAdapter(this, TypeToken.get(IcebergPartsFilter.class)); + final TypeAdapter adapterMarketLotSizeFilter = + gson.getDelegateAdapter(this, TypeToken.get(MarketLotSizeFilter.class)); + final TypeAdapter adapterMaxNumOrdersFilter = + gson.getDelegateAdapter(this, TypeToken.get(MaxNumOrdersFilter.class)); + final TypeAdapter adapterMaxNumAlgoOrdersFilter = + gson.getDelegateAdapter(this, TypeToken.get(MaxNumAlgoOrdersFilter.class)); + final TypeAdapter adapterMaxNumIcebergOrdersFilter = + gson.getDelegateAdapter(this, TypeToken.get(MaxNumIcebergOrdersFilter.class)); + final TypeAdapter adapterMaxPositionFilter = + gson.getDelegateAdapter(this, TypeToken.get(MaxPositionFilter.class)); + final TypeAdapter adapterTrailingDeltaFilter = + gson.getDelegateAdapter(this, TypeToken.get(TrailingDeltaFilter.class)); + final TypeAdapter adapterTPlusSellFilter = + gson.getDelegateAdapter(this, TypeToken.get(TPlusSellFilter.class)); + final TypeAdapter adapterMaxNumOrderListsFilter = + gson.getDelegateAdapter(this, TypeToken.get(MaxNumOrderListsFilter.class)); + final TypeAdapter adapterMaxNumOrderAmendsFilter = + gson.getDelegateAdapter(this, TypeToken.get(MaxNumOrderAmendsFilter.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, MyFiltersResponseSymbolFiltersInner value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `PriceFilter` + if (value.getActualInstance() instanceof PriceFilter) { + JsonElement element = + adapterPriceFilter.toJsonTree( + (PriceFilter) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `PercentPriceFilter` + if (value.getActualInstance() instanceof PercentPriceFilter) { + JsonElement element = + adapterPercentPriceFilter.toJsonTree( + (PercentPriceFilter) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type + // `PercentPriceBySideFilter` + if (value.getActualInstance() instanceof PercentPriceBySideFilter) { + JsonElement element = + adapterPercentPriceBySideFilter.toJsonTree( + (PercentPriceBySideFilter) + value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `LotSizeFilter` + if (value.getActualInstance() instanceof LotSizeFilter) { + JsonElement element = + adapterLotSizeFilter.toJsonTree( + (LotSizeFilter) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `MinNotionalFilter` + if (value.getActualInstance() instanceof MinNotionalFilter) { + JsonElement element = + adapterMinNotionalFilter.toJsonTree( + (MinNotionalFilter) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `NotionalFilter` + if (value.getActualInstance() instanceof NotionalFilter) { + JsonElement element = + adapterNotionalFilter.toJsonTree( + (NotionalFilter) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `IcebergPartsFilter` + if (value.getActualInstance() instanceof IcebergPartsFilter) { + JsonElement element = + adapterIcebergPartsFilter.toJsonTree( + (IcebergPartsFilter) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `MarketLotSizeFilter` + if (value.getActualInstance() instanceof MarketLotSizeFilter) { + JsonElement element = + adapterMarketLotSizeFilter.toJsonTree( + (MarketLotSizeFilter) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `MaxNumOrdersFilter` + if (value.getActualInstance() instanceof MaxNumOrdersFilter) { + JsonElement element = + adapterMaxNumOrdersFilter.toJsonTree( + (MaxNumOrdersFilter) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `MaxNumAlgoOrdersFilter` + if (value.getActualInstance() instanceof MaxNumAlgoOrdersFilter) { + JsonElement element = + adapterMaxNumAlgoOrdersFilter.toJsonTree( + (MaxNumAlgoOrdersFilter) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type + // `MaxNumIcebergOrdersFilter` + if (value.getActualInstance() instanceof MaxNumIcebergOrdersFilter) { + JsonElement element = + adapterMaxNumIcebergOrdersFilter.toJsonTree( + (MaxNumIcebergOrdersFilter) + value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `MaxPositionFilter` + if (value.getActualInstance() instanceof MaxPositionFilter) { + JsonElement element = + adapterMaxPositionFilter.toJsonTree( + (MaxPositionFilter) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `TrailingDeltaFilter` + if (value.getActualInstance() instanceof TrailingDeltaFilter) { + JsonElement element = + adapterTrailingDeltaFilter.toJsonTree( + (TrailingDeltaFilter) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `TPlusSellFilter` + if (value.getActualInstance() instanceof TPlusSellFilter) { + JsonElement element = + adapterTPlusSellFilter.toJsonTree( + (TPlusSellFilter) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `MaxNumOrderListsFilter` + if (value.getActualInstance() instanceof MaxNumOrderListsFilter) { + JsonElement element = + adapterMaxNumOrderListsFilter.toJsonTree( + (MaxNumOrderListsFilter) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `MaxNumOrderAmendsFilter` + if (value.getActualInstance() instanceof MaxNumOrderAmendsFilter) { + JsonElement element = + adapterMaxNumOrderAmendsFilter.toJsonTree( + (MaxNumOrderAmendsFilter) + value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " IcebergPartsFilter, LotSizeFilter, MarketLotSizeFilter," + + " MaxNumAlgoOrdersFilter, MaxNumIcebergOrdersFilter," + + " MaxNumOrderAmendsFilter, MaxNumOrderListsFilter," + + " MaxNumOrdersFilter, MaxPositionFilter," + + " MinNotionalFilter, NotionalFilter," + + " PercentPriceBySideFilter, PercentPriceFilter," + + " PriceFilter, TPlusSellFilter, TrailingDeltaFilter"); + } + + @Override + public MyFiltersResponseSymbolFiltersInner read(JsonReader in) + throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + JsonObject jsonObject = jsonElement.getAsJsonObject(); + + // use discriminator value for faster oneOf lookup + MyFiltersResponseSymbolFiltersInner + newMyFiltersResponseSymbolFiltersInner = + new MyFiltersResponseSymbolFiltersInner(); + if (jsonObject.get("filterType") == null) { + log.log( + Level.WARNING, + "Failed to lookup discriminator value for" + + " MyFiltersResponseSymbolFiltersInner as `filterType`" + + " was not found in the payload or the payload is" + + " empty."); + } else { + // look up the discriminator value in the field `filterType` + switch (jsonObject.get("filterType").getAsString()) { + case "ICEBERG_PARTS": + deserialized = + adapterIcebergPartsFilter.fromJsonTree(jsonObject); + newMyFiltersResponseSymbolFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseSymbolFiltersInner; + case "LOT_SIZE": + deserialized = + adapterLotSizeFilter.fromJsonTree(jsonObject); + newMyFiltersResponseSymbolFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseSymbolFiltersInner; + case "MARKET_LOT_SIZE": + deserialized = + adapterMarketLotSizeFilter.fromJsonTree(jsonObject); + newMyFiltersResponseSymbolFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseSymbolFiltersInner; + case "MAX_NUM_ALGO_ORDERS": + deserialized = + adapterMaxNumAlgoOrdersFilter.fromJsonTree( + jsonObject); + newMyFiltersResponseSymbolFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseSymbolFiltersInner; + case "MAX_NUM_ICEBERG_ORDERS": + deserialized = + adapterMaxNumIcebergOrdersFilter.fromJsonTree( + jsonObject); + newMyFiltersResponseSymbolFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseSymbolFiltersInner; + case "MAX_NUM_ORDERS": + deserialized = + adapterMaxNumOrdersFilter.fromJsonTree(jsonObject); + newMyFiltersResponseSymbolFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseSymbolFiltersInner; + case "MAX_NUM_ORDER_AMENDS": + deserialized = + adapterMaxNumOrderAmendsFilter.fromJsonTree( + jsonObject); + newMyFiltersResponseSymbolFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseSymbolFiltersInner; + case "MAX_NUM_ORDER_LISTS": + deserialized = + adapterMaxNumOrderListsFilter.fromJsonTree( + jsonObject); + newMyFiltersResponseSymbolFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseSymbolFiltersInner; + case "MAX_POSITION": + deserialized = + adapterMaxPositionFilter.fromJsonTree(jsonObject); + newMyFiltersResponseSymbolFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseSymbolFiltersInner; + case "MIN_NOTIONAL": + deserialized = + adapterMinNotionalFilter.fromJsonTree(jsonObject); + newMyFiltersResponseSymbolFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseSymbolFiltersInner; + case "NOTIONAL": + deserialized = + adapterNotionalFilter.fromJsonTree(jsonObject); + newMyFiltersResponseSymbolFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseSymbolFiltersInner; + case "PERCENT_PRICE": + deserialized = + adapterPercentPriceFilter.fromJsonTree(jsonObject); + newMyFiltersResponseSymbolFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseSymbolFiltersInner; + case "PERCENT_PRICE_BY_SIDE": + deserialized = + adapterPercentPriceBySideFilter.fromJsonTree( + jsonObject); + newMyFiltersResponseSymbolFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseSymbolFiltersInner; + case "PRICE_FILTER": + deserialized = adapterPriceFilter.fromJsonTree(jsonObject); + newMyFiltersResponseSymbolFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseSymbolFiltersInner; + case "TRAILING_DELTA": + deserialized = + adapterTrailingDeltaFilter.fromJsonTree(jsonObject); + newMyFiltersResponseSymbolFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseSymbolFiltersInner; + case "T_PLUS_SELL": + deserialized = + adapterTPlusSellFilter.fromJsonTree(jsonObject); + newMyFiltersResponseSymbolFiltersInner.setActualInstance( + deserialized); + return newMyFiltersResponseSymbolFiltersInner; + default: + log.log( + Level.WARNING, + String.format( + "Failed to lookup discriminator value `%s`" + + " for MyFiltersResponseSymbolFiltersInner." + + " Possible values: ICEBERG_PARTS" + + " LOT_SIZE MARKET_LOT_SIZE" + + " MAX_NUM_ALGO_ORDERS" + + " MAX_NUM_ICEBERG_ORDERS" + + " MAX_NUM_ORDERS MAX_NUM_ORDER_AMENDS" + + " MAX_NUM_ORDER_LISTS MAX_POSITION" + + " MIN_NOTIONAL NOTIONAL PERCENT_PRICE" + + " PERCENT_PRICE_BY_SIDE PRICE_FILTER" + + " TRAILING_DELTA T_PLUS_SELL", + jsonObject + .get("filterType") + .getAsString())); + } + } + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize PriceFilter + try { + // validate the JSON object to see if any exception is thrown + PriceFilter.validateJsonElement(jsonElement); + actualAdapter = adapterPriceFilter; + match++; + log.log(Level.FINER, "Input data matches schema 'PriceFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for PriceFilter failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'PriceFilter'", + e); + } + // deserialize PercentPriceFilter + try { + // validate the JSON object to see if any exception is thrown + PercentPriceFilter.validateJsonElement(jsonElement); + actualAdapter = adapterPercentPriceFilter; + match++; + log.log( + Level.FINER, + "Input data matches schema 'PercentPriceFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for PercentPriceFilter failed with" + + " `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'PercentPriceFilter'", + e); + } + // deserialize PercentPriceBySideFilter + try { + // validate the JSON object to see if any exception is thrown + PercentPriceBySideFilter.validateJsonElement(jsonElement); + actualAdapter = adapterPercentPriceBySideFilter; + match++; + log.log( + Level.FINER, + "Input data matches schema 'PercentPriceBySideFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for PercentPriceBySideFilter" + + " failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema" + + " 'PercentPriceBySideFilter'", + e); + } + // deserialize LotSizeFilter + try { + // validate the JSON object to see if any exception is thrown + LotSizeFilter.validateJsonElement(jsonElement); + actualAdapter = adapterLotSizeFilter; + match++; + log.log(Level.FINER, "Input data matches schema 'LotSizeFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for LotSizeFilter failed with" + + " `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'LotSizeFilter'", + e); + } + // deserialize MinNotionalFilter + try { + // validate the JSON object to see if any exception is thrown + MinNotionalFilter.validateJsonElement(jsonElement); + actualAdapter = adapterMinNotionalFilter; + match++; + log.log( + Level.FINER, + "Input data matches schema 'MinNotionalFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for MinNotionalFilter failed with" + + " `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'MinNotionalFilter'", + e); + } + // deserialize NotionalFilter + try { + // validate the JSON object to see if any exception is thrown + NotionalFilter.validateJsonElement(jsonElement); + actualAdapter = adapterNotionalFilter; + match++; + log.log(Level.FINER, "Input data matches schema 'NotionalFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for NotionalFilter failed with" + + " `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'NotionalFilter'", + e); + } + // deserialize IcebergPartsFilter + try { + // validate the JSON object to see if any exception is thrown + IcebergPartsFilter.validateJsonElement(jsonElement); + actualAdapter = adapterIcebergPartsFilter; + match++; + log.log( + Level.FINER, + "Input data matches schema 'IcebergPartsFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for IcebergPartsFilter failed with" + + " `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'IcebergPartsFilter'", + e); + } + // deserialize MarketLotSizeFilter + try { + // validate the JSON object to see if any exception is thrown + MarketLotSizeFilter.validateJsonElement(jsonElement); + actualAdapter = adapterMarketLotSizeFilter; + match++; + log.log( + Level.FINER, + "Input data matches schema 'MarketLotSizeFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for MarketLotSizeFilter failed" + + " with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'MarketLotSizeFilter'", + e); + } + // deserialize MaxNumOrdersFilter + try { + // validate the JSON object to see if any exception is thrown + MaxNumOrdersFilter.validateJsonElement(jsonElement); + actualAdapter = adapterMaxNumOrdersFilter; + match++; + log.log( + Level.FINER, + "Input data matches schema 'MaxNumOrdersFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for MaxNumOrdersFilter failed with" + + " `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'MaxNumOrdersFilter'", + e); + } + // deserialize MaxNumAlgoOrdersFilter + try { + // validate the JSON object to see if any exception is thrown + MaxNumAlgoOrdersFilter.validateJsonElement(jsonElement); + actualAdapter = adapterMaxNumAlgoOrdersFilter; + match++; + log.log( + Level.FINER, + "Input data matches schema 'MaxNumAlgoOrdersFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for MaxNumAlgoOrdersFilter failed" + + " with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'MaxNumAlgoOrdersFilter'", + e); + } + // deserialize MaxNumIcebergOrdersFilter + try { + // validate the JSON object to see if any exception is thrown + MaxNumIcebergOrdersFilter.validateJsonElement(jsonElement); + actualAdapter = adapterMaxNumIcebergOrdersFilter; + match++; + log.log( + Level.FINER, + "Input data matches schema 'MaxNumIcebergOrdersFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for MaxNumIcebergOrdersFilter" + + " failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema" + + " 'MaxNumIcebergOrdersFilter'", + e); + } + // deserialize MaxPositionFilter + try { + // validate the JSON object to see if any exception is thrown + MaxPositionFilter.validateJsonElement(jsonElement); + actualAdapter = adapterMaxPositionFilter; + match++; + log.log( + Level.FINER, + "Input data matches schema 'MaxPositionFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for MaxPositionFilter failed with" + + " `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'MaxPositionFilter'", + e); + } + // deserialize TrailingDeltaFilter + try { + // validate the JSON object to see if any exception is thrown + TrailingDeltaFilter.validateJsonElement(jsonElement); + actualAdapter = adapterTrailingDeltaFilter; + match++; + log.log( + Level.FINER, + "Input data matches schema 'TrailingDeltaFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for TrailingDeltaFilter failed" + + " with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'TrailingDeltaFilter'", + e); + } + // deserialize TPlusSellFilter + try { + // validate the JSON object to see if any exception is thrown + TPlusSellFilter.validateJsonElement(jsonElement); + actualAdapter = adapterTPlusSellFilter; + match++; + log.log(Level.FINER, "Input data matches schema 'TPlusSellFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for TPlusSellFilter failed with" + + " `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'TPlusSellFilter'", + e); + } + // deserialize MaxNumOrderListsFilter + try { + // validate the JSON object to see if any exception is thrown + MaxNumOrderListsFilter.validateJsonElement(jsonElement); + actualAdapter = adapterMaxNumOrderListsFilter; + match++; + log.log( + Level.FINER, + "Input data matches schema 'MaxNumOrderListsFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for MaxNumOrderListsFilter failed" + + " with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'MaxNumOrderListsFilter'", + e); + } + // deserialize MaxNumOrderAmendsFilter + try { + // validate the JSON object to see if any exception is thrown + MaxNumOrderAmendsFilter.validateJsonElement(jsonElement); + actualAdapter = adapterMaxNumOrderAmendsFilter; + match++; + log.log( + Level.FINER, + "Input data matches schema 'MaxNumOrderAmendsFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for MaxNumOrderAmendsFilter failed" + + " with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema" + + " 'MaxNumOrderAmendsFilter'", + e); + } + + if (match == 1) { + MyFiltersResponseSymbolFiltersInner ret = + new MyFiltersResponseSymbolFiltersInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for" + + " MyFiltersResponseSymbolFiltersInner: %d classes" + + " match result, expected 1. Detailed failure" + + " message for oneOf schemas: %s. JSON: %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public MyFiltersResponseSymbolFiltersInner() { + super("oneOf", Boolean.FALSE); + } + + public MyFiltersResponseSymbolFiltersInner(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("PriceFilter", PriceFilter.class); + schemas.put("PercentPriceFilter", PercentPriceFilter.class); + schemas.put("PercentPriceBySideFilter", PercentPriceBySideFilter.class); + schemas.put("LotSizeFilter", LotSizeFilter.class); + schemas.put("MinNotionalFilter", MinNotionalFilter.class); + schemas.put("NotionalFilter", NotionalFilter.class); + schemas.put("IcebergPartsFilter", IcebergPartsFilter.class); + schemas.put("MarketLotSizeFilter", MarketLotSizeFilter.class); + schemas.put("MaxNumOrdersFilter", MaxNumOrdersFilter.class); + schemas.put("MaxNumAlgoOrdersFilter", MaxNumAlgoOrdersFilter.class); + schemas.put("MaxNumIcebergOrdersFilter", MaxNumIcebergOrdersFilter.class); + schemas.put("MaxPositionFilter", MaxPositionFilter.class); + schemas.put("TrailingDeltaFilter", TrailingDeltaFilter.class); + schemas.put("TPlusSellFilter", TPlusSellFilter.class); + schemas.put("MaxNumOrderListsFilter", MaxNumOrderListsFilter.class); + schemas.put("MaxNumOrderAmendsFilter", MaxNumOrderAmendsFilter.class); + } + + @Override + public Map> getSchemas() { + return MyFiltersResponseSymbolFiltersInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: IcebergPartsFilter, LotSizeFilter, MarketLotSizeFilter, + * MaxNumAlgoOrdersFilter, MaxNumIcebergOrdersFilter, MaxNumOrderAmendsFilter, + * MaxNumOrderListsFilter, MaxNumOrdersFilter, MaxPositionFilter, MinNotionalFilter, + * NotionalFilter, PercentPriceBySideFilter, PercentPriceFilter, PriceFilter, TPlusSellFilter, + * TrailingDeltaFilter + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof PriceFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof PercentPriceFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof PercentPriceBySideFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof LotSizeFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof MinNotionalFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof NotionalFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof IcebergPartsFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof MarketLotSizeFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof MaxNumOrdersFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof MaxNumAlgoOrdersFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof MaxNumIcebergOrdersFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof MaxPositionFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof TrailingDeltaFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof TPlusSellFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof MaxNumOrderListsFilter) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof MaxNumOrderAmendsFilter) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be IcebergPartsFilter, LotSizeFilter," + + " MarketLotSizeFilter, MaxNumAlgoOrdersFilter, MaxNumIcebergOrdersFilter," + + " MaxNumOrderAmendsFilter, MaxNumOrderListsFilter, MaxNumOrdersFilter," + + " MaxPositionFilter, MinNotionalFilter, NotionalFilter," + + " PercentPriceBySideFilter, PercentPriceFilter, PriceFilter, TPlusSellFilter," + + " TrailingDeltaFilter"); + } + + /** + * Get the actual instance, which can be the following: IcebergPartsFilter, LotSizeFilter, + * MarketLotSizeFilter, MaxNumAlgoOrdersFilter, MaxNumIcebergOrdersFilter, + * MaxNumOrderAmendsFilter, MaxNumOrderListsFilter, MaxNumOrdersFilter, MaxPositionFilter, + * MinNotionalFilter, NotionalFilter, PercentPriceBySideFilter, PercentPriceFilter, PriceFilter, + * TPlusSellFilter, TrailingDeltaFilter + * + * @return The actual instance (IcebergPartsFilter, LotSizeFilter, MarketLotSizeFilter, + * MaxNumAlgoOrdersFilter, MaxNumIcebergOrdersFilter, MaxNumOrderAmendsFilter, + * MaxNumOrderListsFilter, MaxNumOrdersFilter, MaxPositionFilter, MinNotionalFilter, + * NotionalFilter, PercentPriceBySideFilter, PercentPriceFilter, PriceFilter, + * TPlusSellFilter, TrailingDeltaFilter) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `PriceFilter`. If the actual instance is not `PriceFilter`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `PriceFilter` + * @throws ClassCastException if the instance is not `PriceFilter` + */ + public PriceFilter getPriceFilter() throws ClassCastException { + return (PriceFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `PercentPriceFilter`. If the actual instance is not + * `PercentPriceFilter`, the ClassCastException will be thrown. + * + * @return The actual instance of `PercentPriceFilter` + * @throws ClassCastException if the instance is not `PercentPriceFilter` + */ + public PercentPriceFilter getPercentPriceFilter() throws ClassCastException { + return (PercentPriceFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `PercentPriceBySideFilter`. If the actual instance is not + * `PercentPriceBySideFilter`, the ClassCastException will be thrown. + * + * @return The actual instance of `PercentPriceBySideFilter` + * @throws ClassCastException if the instance is not `PercentPriceBySideFilter` + */ + public PercentPriceBySideFilter getPercentPriceBySideFilter() throws ClassCastException { + return (PercentPriceBySideFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `LotSizeFilter`. If the actual instance is not `LotSizeFilter`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LotSizeFilter` + * @throws ClassCastException if the instance is not `LotSizeFilter` + */ + public LotSizeFilter getLotSizeFilter() throws ClassCastException { + return (LotSizeFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `MinNotionalFilter`. If the actual instance is not + * `MinNotionalFilter`, the ClassCastException will be thrown. + * + * @return The actual instance of `MinNotionalFilter` + * @throws ClassCastException if the instance is not `MinNotionalFilter` + */ + public MinNotionalFilter getMinNotionalFilter() throws ClassCastException { + return (MinNotionalFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `NotionalFilter`. If the actual instance is not `NotionalFilter`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotionalFilter` + * @throws ClassCastException if the instance is not `NotionalFilter` + */ + public NotionalFilter getNotionalFilter() throws ClassCastException { + return (NotionalFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `IcebergPartsFilter`. If the actual instance is not + * `IcebergPartsFilter`, the ClassCastException will be thrown. + * + * @return The actual instance of `IcebergPartsFilter` + * @throws ClassCastException if the instance is not `IcebergPartsFilter` + */ + public IcebergPartsFilter getIcebergPartsFilter() throws ClassCastException { + return (IcebergPartsFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `MarketLotSizeFilter`. If the actual instance is not + * `MarketLotSizeFilter`, the ClassCastException will be thrown. + * + * @return The actual instance of `MarketLotSizeFilter` + * @throws ClassCastException if the instance is not `MarketLotSizeFilter` + */ + public MarketLotSizeFilter getMarketLotSizeFilter() throws ClassCastException { + return (MarketLotSizeFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `MaxNumOrdersFilter`. If the actual instance is not + * `MaxNumOrdersFilter`, the ClassCastException will be thrown. + * + * @return The actual instance of `MaxNumOrdersFilter` + * @throws ClassCastException if the instance is not `MaxNumOrdersFilter` + */ + public MaxNumOrdersFilter getMaxNumOrdersFilter() throws ClassCastException { + return (MaxNumOrdersFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `MaxNumAlgoOrdersFilter`. If the actual instance is not + * `MaxNumAlgoOrdersFilter`, the ClassCastException will be thrown. + * + * @return The actual instance of `MaxNumAlgoOrdersFilter` + * @throws ClassCastException if the instance is not `MaxNumAlgoOrdersFilter` + */ + public MaxNumAlgoOrdersFilter getMaxNumAlgoOrdersFilter() throws ClassCastException { + return (MaxNumAlgoOrdersFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `MaxNumIcebergOrdersFilter`. If the actual instance is not + * `MaxNumIcebergOrdersFilter`, the ClassCastException will be thrown. + * + * @return The actual instance of `MaxNumIcebergOrdersFilter` + * @throws ClassCastException if the instance is not `MaxNumIcebergOrdersFilter` + */ + public MaxNumIcebergOrdersFilter getMaxNumIcebergOrdersFilter() throws ClassCastException { + return (MaxNumIcebergOrdersFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `MaxPositionFilter`. If the actual instance is not + * `MaxPositionFilter`, the ClassCastException will be thrown. + * + * @return The actual instance of `MaxPositionFilter` + * @throws ClassCastException if the instance is not `MaxPositionFilter` + */ + public MaxPositionFilter getMaxPositionFilter() throws ClassCastException { + return (MaxPositionFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `TrailingDeltaFilter`. If the actual instance is not + * `TrailingDeltaFilter`, the ClassCastException will be thrown. + * + * @return The actual instance of `TrailingDeltaFilter` + * @throws ClassCastException if the instance is not `TrailingDeltaFilter` + */ + public TrailingDeltaFilter getTrailingDeltaFilter() throws ClassCastException { + return (TrailingDeltaFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `TPlusSellFilter`. If the actual instance is not + * `TPlusSellFilter`, the ClassCastException will be thrown. + * + * @return The actual instance of `TPlusSellFilter` + * @throws ClassCastException if the instance is not `TPlusSellFilter` + */ + public TPlusSellFilter getTPlusSellFilter() throws ClassCastException { + return (TPlusSellFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `MaxNumOrderListsFilter`. If the actual instance is not + * `MaxNumOrderListsFilter`, the ClassCastException will be thrown. + * + * @return The actual instance of `MaxNumOrderListsFilter` + * @throws ClassCastException if the instance is not `MaxNumOrderListsFilter` + */ + public MaxNumOrderListsFilter getMaxNumOrderListsFilter() throws ClassCastException { + return (MaxNumOrderListsFilter) super.getActualInstance(); + } + + /** + * Get the actual instance of `MaxNumOrderAmendsFilter`. If the actual instance is not + * `MaxNumOrderAmendsFilter`, the ClassCastException will be thrown. + * + * @return The actual instance of `MaxNumOrderAmendsFilter` + * @throws ClassCastException if the instance is not `MaxNumOrderAmendsFilter` + */ + public MaxNumOrderAmendsFilter getMaxNumOrderAmendsFilter() throws ClassCastException { + return (MaxNumOrderAmendsFilter) super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * MyFiltersResponseSymbolFiltersInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with PriceFilter + try { + PriceFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for PriceFilter failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with PercentPriceFilter + try { + PercentPriceFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for PercentPriceFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with PercentPriceBySideFilter + try { + PercentPriceBySideFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for PercentPriceBySideFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with LotSizeFilter + try { + LotSizeFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for LotSizeFilter failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with MinNotionalFilter + try { + MinNotionalFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for MinNotionalFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with NotionalFilter + try { + NotionalFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for NotionalFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with IcebergPartsFilter + try { + IcebergPartsFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for IcebergPartsFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with MarketLotSizeFilter + try { + MarketLotSizeFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for MarketLotSizeFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with MaxNumOrdersFilter + try { + MaxNumOrdersFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for MaxNumOrdersFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with MaxNumAlgoOrdersFilter + try { + MaxNumAlgoOrdersFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for MaxNumAlgoOrdersFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with MaxNumIcebergOrdersFilter + try { + MaxNumIcebergOrdersFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for MaxNumIcebergOrdersFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with MaxPositionFilter + try { + MaxPositionFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for MaxPositionFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with TrailingDeltaFilter + try { + TrailingDeltaFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for TrailingDeltaFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with TPlusSellFilter + try { + TPlusSellFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for TPlusSellFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with MaxNumOrderListsFilter + try { + MaxNumOrderListsFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for MaxNumOrderListsFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with MaxNumOrderAmendsFilter + try { + MaxNumOrderAmendsFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for MaxNumOrderAmendsFilter failed with `%s`.", + e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for MyFiltersResponseSymbolFiltersInner" + + " with oneOf schemas: IcebergPartsFilter, LotSizeFilter," + + " MarketLotSizeFilter, MaxNumAlgoOrdersFilter," + + " MaxNumIcebergOrdersFilter, MaxNumOrderAmendsFilter," + + " MaxNumOrderListsFilter, MaxNumOrdersFilter, MaxPositionFilter," + + " MinNotionalFilter, NotionalFilter, PercentPriceBySideFilter," + + " PercentPriceFilter, PriceFilter, TPlusSellFilter," + + " TrailingDeltaFilter. %d class(es) match the result, expected 1." + + " Detailed failure message for oneOf schemas: %s. JSON: %s", + validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of MyFiltersResponseSymbolFiltersInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of MyFiltersResponseSymbolFiltersInner + * @throws IOException if the JSON string is invalid with respect to + * MyFiltersResponseSymbolFiltersInner + */ + public static MyFiltersResponseSymbolFiltersInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, MyFiltersResponseSymbolFiltersInner.class); + } + + /** + * Convert an instance of MyFiltersResponseSymbolFiltersInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyPreventedMatchesResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyPreventedMatchesResponse.java index 81117f49d..bbd69be2f 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyPreventedMatchesResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyPreventedMatchesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MyPreventedMatchesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyPreventedMatchesResponse extends ArrayList { public MyPreventedMatchesResponse() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyPreventedMatchesResponseInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyPreventedMatchesResponseInner.java index bf5f79ef7..c0feb09ff 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyPreventedMatchesResponseInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyPreventedMatchesResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MyPreventedMatchesResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyPreventedMatchesResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyTradesResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyTradesResponse.java index cd590b942..2722d990f 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyTradesResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyTradesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MyTradesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyTradesResponse extends ArrayList { public MyTradesResponse() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyTradesResponseInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyTradesResponseInner.java index 96a8032c6..aaf0826f3 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyTradesResponseInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/MyTradesResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MyTradesResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyTradesResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NewOrderRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NewOrderRequest.java index 7d887b85c..66e76db03 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NewOrderRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NewOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** NewOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewOrderRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -302,7 +302,9 @@ public NewOrderRequest newClientOrderId(@jakarta.annotation.Nullable String newC } /** - * Get newClientOrderId + * A unique id among open orders. Automatically generated if not sent.<br/> Orders with + * the same `newClientOrderID` can be accepted only when the previous one is filled, + * otherwise the order will be rejected. * * @return newClientOrderId */ @@ -340,11 +342,12 @@ public NewOrderRequest strategyType(@jakarta.annotation.Nullable Integer strateg } /** - * Get strategyType + * The value cannot be less than `1000000`. minimum: 1000000 * * @return strategyType */ @jakarta.annotation.Nullable + @Min(1000000) public Integer getStrategyType() { return strategyType; } @@ -359,7 +362,8 @@ public NewOrderRequest stopPrice(@jakarta.annotation.Nullable Double stopPrice) } /** - * Get stopPrice + * Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and + * `TAKE_PROFIT_LIMIT` orders. * * @return stopPrice */ @@ -379,7 +383,7 @@ public NewOrderRequest trailingDelta(@jakarta.annotation.Nullable Long trailingD } /** - * Get trailingDelta + * See Trailing Stop order FAQ * * @return trailingDelta */ @@ -398,7 +402,8 @@ public NewOrderRequest icebergQty(@jakarta.annotation.Nullable Double icebergQty } /** - * Get icebergQty + * Used with `LIMIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` + * to create an iceberg order. * * @return icebergQty */ @@ -482,11 +487,12 @@ public NewOrderRequest pegOffsetValue(@jakarta.annotation.Nullable Integer pegOf } /** - * Get pegOffsetValue + * Price level to peg the price to (max: 100). See Pegged Orders Info maximum: 100 * * @return pegOffsetValue */ @jakarta.annotation.Nullable + @Max(100) public Integer getPegOffsetValue() { return pegOffsetValue; } @@ -521,12 +527,14 @@ public NewOrderRequest recvWindow(@jakarta.annotation.Nullable Double recvWindow } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NewOrderRespType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NewOrderRespType.java index f261bdf07..681c40877 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NewOrderRespType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NewOrderRespType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,18 +21,17 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets newOrderRespType */ +/** + * Set the response JSON. `ACK`, `RESULT`, or `FULL`. Default to + * `FULL`. + */ @JsonAdapter(NewOrderRespType.Adapter.class) public enum NewOrderRespType { ACK("ACK"), RESULT("RESULT"), - FULL("FULL"), - - MARKET("MARKET"), - - LIMIT("LIMIT"); + FULL("FULL"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NewOrderResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NewOrderResponse.java index 03cb8ad27..f660366a8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NewOrderResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NewOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** NewOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewOrderResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -191,7 +191,7 @@ public NewOrderResponse orderListId(@jakarta.annotation.Nullable Long orderListI } /** - * Get orderListId + * Unless it's part of an order list, value will be -1 * * @return orderListId */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NewOrderResponseFillsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NewOrderResponseFillsInner.java index 6b215af73..db2b71489 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NewOrderResponseFillsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NewOrderResponseFillsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** NewOrderResponseFillsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NewOrderResponseFillsInner { public static final String SERIALIZED_NAME_PRICE = "price"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NotionalFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NotionalFilter.java index 5d688bd98..5a3d52f4a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NotionalFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/NotionalFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** NotionalFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NotionalFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OpenOrderListResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OpenOrderListResponse.java index 2414e9ab6..309771c29 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OpenOrderListResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OpenOrderListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OpenOrderListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenOrderListResponse extends ArrayList { public OpenOrderListResponse() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OpenOrderListResponseInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OpenOrderListResponseInner.java index f0e3adaa0..bf5b9487b 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OpenOrderListResponseInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OpenOrderListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** OpenOrderListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenOrderListResponseInner { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OpenOrderListResponseInnerOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OpenOrderListResponseInnerOrdersInner.java index 487cad714..282791266 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OpenOrderListResponseInnerOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OpenOrderListResponseInnerOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OpenOrderListResponseInnerOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenOrderListResponseInnerOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityRequest.java index 9c6d24bd7..450aa7dab 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** OrderAmendKeepPriorityRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderAmendKeepPriorityRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -101,7 +101,7 @@ public OrderAmendKeepPriorityRequest orderId(@jakarta.annotation.Nullable Long o } /** - * Get orderId + * `orderId` or `origClientOrderId` must be sent * * @return orderId */ @@ -121,7 +121,7 @@ public OrderAmendKeepPriorityRequest origClientOrderId( } /** - * Get origClientOrderId + * `orderId` or `origClientOrderId` must be sent * * @return origClientOrderId */ @@ -141,7 +141,9 @@ public OrderAmendKeepPriorityRequest newClientOrderId( } /** - * Get newClientOrderId + * The new client order ID for the order after being amended. <br> If not sent, one will + * be randomly generated. <br> It is possible to reuse the current clientOrderId by + * sending it as the `newClientOrderId`. * * @return newClientOrderId */ @@ -160,7 +162,7 @@ public OrderAmendKeepPriorityRequest newQty(@jakarta.annotation.Nonnull Double n } /** - * Get newQty + * `newQty` must be greater than 0 and less than the order's quantity. * * @return newQty */ @@ -182,7 +184,8 @@ public OrderAmendKeepPriorityRequest recvWindow( } /** - * Get recvWindow + * The value cannot be greater than `60000`. <br> Supports up to three decimal + * places of precision (e.g., 6000.346) so that microseconds may be specified. * * @return recvWindow */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityResponse.java index 22ddd9786..6be51af55 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** OrderAmendKeepPriorityResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderAmendKeepPriorityResponse { public static final String SERIALIZED_NAME_TRANSACT_TIME = "transactTime"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityResponseAmendedOrder.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityResponseAmendedOrder.java index eedbed209..d66ac4a6c 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityResponseAmendedOrder.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityResponseAmendedOrder.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderAmendKeepPriorityResponseAmendedOrder */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderAmendKeepPriorityResponseAmendedOrder { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -139,6 +139,96 @@ public class OrderAmendKeepPriorityResponseAmendedOrder { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + + @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @jakarta.annotation.Nullable + private String stopPrice; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OrderAmendKeepPriorityResponseAmendedOrder() {} public OrderAmendKeepPriorityResponseAmendedOrder symbol( @@ -481,6 +571,306 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OrderAmendKeepPriorityResponseAmendedOrder icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderAmendKeepPriorityResponseAmendedOrder preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderAmendKeepPriorityResponseAmendedOrder preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public OrderAmendKeepPriorityResponseAmendedOrder stopPrice( + @jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + /** + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. + * + * @return stopPrice + */ + @jakarta.annotation.Nullable + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + } + + public OrderAmendKeepPriorityResponseAmendedOrder strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderAmendKeepPriorityResponseAmendedOrder strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderAmendKeepPriorityResponseAmendedOrder trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderAmendKeepPriorityResponseAmendedOrder trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderAmendKeepPriorityResponseAmendedOrder usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderAmendKeepPriorityResponseAmendedOrder workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderAmendKeepPriorityResponseAmendedOrder pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderAmendKeepPriorityResponseAmendedOrder pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderAmendKeepPriorityResponseAmendedOrder pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderAmendKeepPriorityResponseAmendedOrder peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderAmendKeepPriorityResponseAmendedOrder expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -522,7 +912,41 @@ public boolean equals(Object o) { this.workingTime, orderAmendKeepPriorityResponseAmendedOrder.workingTime) && Objects.equals( this.selfTradePreventionMode, - orderAmendKeepPriorityResponseAmendedOrder.selfTradePreventionMode); + orderAmendKeepPriorityResponseAmendedOrder.selfTradePreventionMode) + && Objects.equals( + this.icebergQty, orderAmendKeepPriorityResponseAmendedOrder.icebergQty) + && Objects.equals( + this.preventedMatchId, + orderAmendKeepPriorityResponseAmendedOrder.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + orderAmendKeepPriorityResponseAmendedOrder.preventedQuantity) + && Objects.equals( + this.stopPrice, orderAmendKeepPriorityResponseAmendedOrder.stopPrice) + && Objects.equals( + this.strategyId, orderAmendKeepPriorityResponseAmendedOrder.strategyId) + && Objects.equals( + this.strategyType, orderAmendKeepPriorityResponseAmendedOrder.strategyType) + && Objects.equals( + this.trailingDelta, + orderAmendKeepPriorityResponseAmendedOrder.trailingDelta) + && Objects.equals( + this.trailingTime, orderAmendKeepPriorityResponseAmendedOrder.trailingTime) + && Objects.equals(this.usedSor, orderAmendKeepPriorityResponseAmendedOrder.usedSor) + && Objects.equals( + this.workingFloor, orderAmendKeepPriorityResponseAmendedOrder.workingFloor) + && Objects.equals( + this.pegPriceType, orderAmendKeepPriorityResponseAmendedOrder.pegPriceType) + && Objects.equals( + this.pegOffsetType, + orderAmendKeepPriorityResponseAmendedOrder.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, + orderAmendKeepPriorityResponseAmendedOrder.pegOffsetValue) + && Objects.equals( + this.peggedPrice, orderAmendKeepPriorityResponseAmendedOrder.peggedPrice) + && Objects.equals( + this.expiryReason, orderAmendKeepPriorityResponseAmendedOrder.expiryReason); } @Override @@ -544,7 +968,22 @@ public int hashCode() { type, side, workingTime, - selfTradePreventionMode); + selfTradePreventionMode, + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -572,6 +1011,21 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -653,6 +1107,68 @@ public String toUrlQueryString() { sb.append("selfTradePreventionMode=") .append(urlEncode(selfTradePreventionModeValueAsString)) .append(""); + Object icebergQtyValue = getIcebergQty(); + String icebergQtyValueAsString = ""; + icebergQtyValueAsString = icebergQtyValue.toString(); + sb.append("icebergQty=").append(urlEncode(icebergQtyValueAsString)).append(""); + Object preventedMatchIdValue = getPreventedMatchId(); + String preventedMatchIdValueAsString = ""; + preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + sb.append("preventedMatchId=").append(urlEncode(preventedMatchIdValueAsString)).append(""); + Object preventedQuantityValue = getPreventedQuantity(); + String preventedQuantityValueAsString = ""; + preventedQuantityValueAsString = preventedQuantityValue.toString(); + sb.append("preventedQuantity=") + .append(urlEncode(preventedQuantityValueAsString)) + .append(""); + Object stopPriceValue = getStopPrice(); + String stopPriceValueAsString = ""; + stopPriceValueAsString = stopPriceValue.toString(); + sb.append("stopPrice=").append(urlEncode(stopPriceValueAsString)).append(""); + Object strategyIdValue = getStrategyId(); + String strategyIdValueAsString = ""; + strategyIdValueAsString = strategyIdValue.toString(); + sb.append("strategyId=").append(urlEncode(strategyIdValueAsString)).append(""); + Object strategyTypeValue = getStrategyType(); + String strategyTypeValueAsString = ""; + strategyTypeValueAsString = strategyTypeValue.toString(); + sb.append("strategyType=").append(urlEncode(strategyTypeValueAsString)).append(""); + Object trailingDeltaValue = getTrailingDelta(); + String trailingDeltaValueAsString = ""; + trailingDeltaValueAsString = trailingDeltaValue.toString(); + sb.append("trailingDelta=").append(urlEncode(trailingDeltaValueAsString)).append(""); + Object trailingTimeValue = getTrailingTime(); + String trailingTimeValueAsString = ""; + trailingTimeValueAsString = trailingTimeValue.toString(); + sb.append("trailingTime=").append(urlEncode(trailingTimeValueAsString)).append(""); + Object usedSorValue = getUsedSor(); + String usedSorValueAsString = ""; + usedSorValueAsString = usedSorValue.toString(); + sb.append("usedSor=").append(urlEncode(usedSorValueAsString)).append(""); + Object workingFloorValue = getWorkingFloor(); + String workingFloorValueAsString = ""; + workingFloorValueAsString = workingFloorValue.toString(); + sb.append("workingFloor=").append(urlEncode(workingFloorValueAsString)).append(""); + Object pegPriceTypeValue = getPegPriceType(); + String pegPriceTypeValueAsString = ""; + pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + sb.append("pegPriceType=").append(urlEncode(pegPriceTypeValueAsString)).append(""); + Object pegOffsetTypeValue = getPegOffsetType(); + String pegOffsetTypeValueAsString = ""; + pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + sb.append("pegOffsetType=").append(urlEncode(pegOffsetTypeValueAsString)).append(""); + Object pegOffsetValueValue = getPegOffsetValue(); + String pegOffsetValueValueAsString = ""; + pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + sb.append("pegOffsetValue=").append(urlEncode(pegOffsetValueValueAsString)).append(""); + Object peggedPriceValue = getPeggedPrice(); + String peggedPriceValueAsString = ""; + peggedPriceValueAsString = peggedPriceValue.toString(); + sb.append("peggedPrice=").append(urlEncode(peggedPriceValueAsString)).append(""); + Object expiryReasonValue = getExpiryReason(); + String expiryReasonValueAsString = ""; + expiryReasonValueAsString = expiryReasonValue.toString(); + sb.append("expiryReason=").append(urlEncode(expiryReasonValueAsString)).append(""); return sb.toString(); } @@ -698,6 +1214,21 @@ private String toIndentedString(Object o) { openapiFields.add("side"); openapiFields.add("workingTime"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -839,6 +1370,71 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) + && !jsonObj.get("stopPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `stopPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("stopPrice").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityResponseListStatus.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityResponseListStatus.java index c68230752..acbdd9ab8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityResponseListStatus.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityResponseListStatus.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** OrderAmendKeepPriorityResponseListStatus */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderAmendKeepPriorityResponseListStatus { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityResponseListStatusOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityResponseListStatusOrdersInner.java index f01372f8f..690e537dc 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityResponseListStatusOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendKeepPriorityResponseListStatusOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderAmendKeepPriorityResponseListStatusOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderAmendKeepPriorityResponseListStatusOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendmentsResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendmentsResponse.java index b4bb18858..3e41470a6 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendmentsResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendmentsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderAmendmentsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderAmendmentsResponse extends ArrayList { public OrderAmendmentsResponse() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendmentsResponseInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendmentsResponseInner.java index edfeb623b..7d9248d13 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendmentsResponseInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderAmendmentsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderAmendmentsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderAmendmentsResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceRequest.java index 769256d7f..7e09c5ae2 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** OrderCancelReplaceRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderCancelReplaceRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -367,7 +367,7 @@ public OrderCancelReplaceRequest cancelNewClientOrderId( } /** - * Get cancelNewClientOrderId + * Used to uniquely identify this cancel. Automatically generated by default. * * @return cancelNewClientOrderId */ @@ -388,7 +388,12 @@ public OrderCancelReplaceRequest cancelOrigClientOrderId( } /** - * Get cancelOrigClientOrderId + * Either `cancelOrderId` or `cancelOrigClientOrderId` must be sent. + * <br></br> If both `cancelOrderId` and + * `cancelOrigClientOrderId` parameters are provided, the `cancelOrderId` is + * searched first, then the `cancelOrigClientOrderId` from that result is checked + * against that order. <br></br> If both conditions are not met the request will be + * rejected. * * @return cancelOrigClientOrderId */ @@ -409,7 +414,12 @@ public OrderCancelReplaceRequest cancelOrderId( } /** - * Get cancelOrderId + * Either `cancelOrderId` or `cancelOrigClientOrderId` must be sent. + * <br></br>If both `cancelOrderId` and + * `cancelOrigClientOrderId` parameters are provided, the `cancelOrderId` is + * searched first, then the `cancelOrigClientOrderId` from that result is checked + * against that order. <br></br>If both conditions are not met the request will be + * rejected. * * @return cancelOrderId */ @@ -429,7 +439,7 @@ public OrderCancelReplaceRequest newClientOrderId( } /** - * Get newClientOrderId + * Used to identify the new order. * * @return newClientOrderId */ @@ -468,7 +478,7 @@ public OrderCancelReplaceRequest strategyType( } /** - * Get strategyType + * The value cannot be less than `1000000`. * * @return strategyType */ @@ -508,7 +518,7 @@ public OrderCancelReplaceRequest trailingDelta( } /** - * Get trailingDelta + * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) * * @return trailingDelta */ @@ -657,7 +667,7 @@ public OrderCancelReplaceRequest pegOffsetValue( } /** - * Get pegOffsetValue + * Price level to peg the price to (max: 100) <br> See Pegged Orders * * @return pegOffsetValue */ @@ -697,12 +707,14 @@ public OrderCancelReplaceRequest recvWindow(@jakarta.annotation.Nullable Double } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponse.java index f6b018e97..d5a780a88 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** OrderCancelReplaceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderCancelReplaceResponse { public static final String SERIALIZED_NAME_CANCEL_RESULT = "cancelResult"; @@ -61,24 +61,6 @@ public class OrderCancelReplaceResponse { @jakarta.annotation.Nullable private OrderCancelReplaceResponseNewOrderResponse newOrderResponse; - public static final String SERIALIZED_NAME_CODE = "code"; - - @SerializedName(SERIALIZED_NAME_CODE) - @jakarta.annotation.Nullable - private Long code; - - public static final String SERIALIZED_NAME_MSG = "msg"; - - @SerializedName(SERIALIZED_NAME_MSG) - @jakarta.annotation.Nullable - private String msg; - - public static final String SERIALIZED_NAME_DATA = "data"; - - @SerializedName(SERIALIZED_NAME_DATA) - @jakarta.annotation.Nullable - private OrderCancelReplaceResponseData data; - public OrderCancelReplaceResponse() {} public OrderCancelReplaceResponse cancelResult( @@ -167,65 +149,6 @@ public void setNewOrderResponse( this.newOrderResponse = newOrderResponse; } - public OrderCancelReplaceResponse code(@jakarta.annotation.Nullable Long code) { - this.code = code; - return this; - } - - /** - * Get code - * - * @return code - */ - @jakarta.annotation.Nullable - public Long getCode() { - return code; - } - - public void setCode(@jakarta.annotation.Nullable Long code) { - this.code = code; - } - - public OrderCancelReplaceResponse msg(@jakarta.annotation.Nullable String msg) { - this.msg = msg; - return this; - } - - /** - * Get msg - * - * @return msg - */ - @jakarta.annotation.Nullable - public String getMsg() { - return msg; - } - - public void setMsg(@jakarta.annotation.Nullable String msg) { - this.msg = msg; - } - - public OrderCancelReplaceResponse data( - @jakarta.annotation.Nullable OrderCancelReplaceResponseData data) { - this.data = data; - return this; - } - - /** - * Get data - * - * @return data - */ - @jakarta.annotation.Nullable - @Valid - public OrderCancelReplaceResponseData getData() { - return data; - } - - public void setData(@jakarta.annotation.Nullable OrderCancelReplaceResponseData data) { - this.data = data; - } - @Override public boolean equals(Object o) { if (this == o) { @@ -239,16 +162,12 @@ public boolean equals(Object o) { && Objects.equals(this.newOrderResult, orderCancelReplaceResponse.newOrderResult) && Objects.equals(this.cancelResponse, orderCancelReplaceResponse.cancelResponse) && Objects.equals( - this.newOrderResponse, orderCancelReplaceResponse.newOrderResponse) - && Objects.equals(this.code, orderCancelReplaceResponse.code) - && Objects.equals(this.msg, orderCancelReplaceResponse.msg) - && Objects.equals(this.data, orderCancelReplaceResponse.data); + this.newOrderResponse, orderCancelReplaceResponse.newOrderResponse); } @Override public int hashCode() { - return Objects.hash( - cancelResult, newOrderResult, cancelResponse, newOrderResponse, code, msg, data); + return Objects.hash(cancelResult, newOrderResult, cancelResponse, newOrderResponse); } @Override @@ -259,9 +178,6 @@ public String toString() { sb.append(" newOrderResult: ").append(toIndentedString(newOrderResult)).append("\n"); sb.append(" cancelResponse: ").append(toIndentedString(cancelResponse)).append("\n"); sb.append(" newOrderResponse: ").append(toIndentedString(newOrderResponse)).append("\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" msg: ").append(toIndentedString(msg)).append("\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); } @@ -285,18 +201,6 @@ public String toUrlQueryString() { String newOrderResponseValueAsString = ""; newOrderResponseValueAsString = newOrderResponseValue.toString(); sb.append("newOrderResponse=").append(urlEncode(newOrderResponseValueAsString)).append(""); - Object codeValue = getCode(); - String codeValueAsString = ""; - codeValueAsString = codeValue.toString(); - sb.append("code=").append(urlEncode(codeValueAsString)).append(""); - Object msgValue = getMsg(); - String msgValueAsString = ""; - msgValueAsString = msgValue.toString(); - sb.append("msg=").append(urlEncode(msgValueAsString)).append(""); - Object dataValue = getData(); - String dataValueAsString = ""; - dataValueAsString = dataValue.toString(); - sb.append("data=").append(urlEncode(dataValueAsString)).append(""); return sb.toString(); } @@ -329,9 +233,6 @@ private String toIndentedString(Object o) { openapiFields.add("newOrderResult"); openapiFields.add("cancelResponse"); openapiFields.add("newOrderResponse"); - openapiFields.add("code"); - openapiFields.add("msg"); - openapiFields.add("data"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -382,18 +283,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti OrderCancelReplaceResponseNewOrderResponse.validateJsonElement( jsonObj.get("newOrderResponse")); } - if ((jsonObj.get("msg") != null && !jsonObj.get("msg").isJsonNull()) - && !jsonObj.get("msg").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `msg` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("msg").toString())); - } - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - OrderCancelReplaceResponseData.validateJsonElement(jsonObj.get("data")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseCancelResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseCancelResponse.java index 71a5598a2..77e03ea63 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseCancelResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseCancelResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderCancelReplaceResponseCancelResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderCancelReplaceResponseCancelResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -133,6 +133,96 @@ public class OrderCancelReplaceResponseCancelResponse { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + + @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @jakarta.annotation.Nullable + private String stopPrice; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OrderCancelReplaceResponseCancelResponse() {} public OrderCancelReplaceResponseCancelResponse symbol( @@ -202,7 +292,7 @@ public OrderCancelReplaceResponseCancelResponse orderListId( } /** - * Get orderListId + * Unless it's part of an order list, value will be -1 * * @return orderListId */ @@ -454,6 +544,306 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OrderCancelReplaceResponseCancelResponse icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderCancelReplaceResponseCancelResponse preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderCancelReplaceResponseCancelResponse preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public OrderCancelReplaceResponseCancelResponse stopPrice( + @jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + /** + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. + * + * @return stopPrice + */ + @jakarta.annotation.Nullable + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + } + + public OrderCancelReplaceResponseCancelResponse strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderCancelReplaceResponseCancelResponse strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderCancelReplaceResponseCancelResponse trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderCancelReplaceResponseCancelResponse trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderCancelReplaceResponseCancelResponse usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderCancelReplaceResponseCancelResponse workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderCancelReplaceResponseCancelResponse pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderCancelReplaceResponseCancelResponse pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderCancelReplaceResponseCancelResponse pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderCancelReplaceResponseCancelResponse peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderCancelReplaceResponseCancelResponse expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -492,7 +882,39 @@ public boolean equals(Object o) { && Objects.equals(this.side, orderCancelReplaceResponseCancelResponse.side) && Objects.equals( this.selfTradePreventionMode, - orderCancelReplaceResponseCancelResponse.selfTradePreventionMode); + orderCancelReplaceResponseCancelResponse.selfTradePreventionMode) + && Objects.equals( + this.icebergQty, orderCancelReplaceResponseCancelResponse.icebergQty) + && Objects.equals( + this.preventedMatchId, + orderCancelReplaceResponseCancelResponse.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + orderCancelReplaceResponseCancelResponse.preventedQuantity) + && Objects.equals( + this.stopPrice, orderCancelReplaceResponseCancelResponse.stopPrice) + && Objects.equals( + this.strategyId, orderCancelReplaceResponseCancelResponse.strategyId) + && Objects.equals( + this.strategyType, orderCancelReplaceResponseCancelResponse.strategyType) + && Objects.equals( + this.trailingDelta, orderCancelReplaceResponseCancelResponse.trailingDelta) + && Objects.equals( + this.trailingTime, orderCancelReplaceResponseCancelResponse.trailingTime) + && Objects.equals(this.usedSor, orderCancelReplaceResponseCancelResponse.usedSor) + && Objects.equals( + this.workingFloor, orderCancelReplaceResponseCancelResponse.workingFloor) + && Objects.equals( + this.pegPriceType, orderCancelReplaceResponseCancelResponse.pegPriceType) + && Objects.equals( + this.pegOffsetType, orderCancelReplaceResponseCancelResponse.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, + orderCancelReplaceResponseCancelResponse.pegOffsetValue) + && Objects.equals( + this.peggedPrice, orderCancelReplaceResponseCancelResponse.peggedPrice) + && Objects.equals( + this.expiryReason, orderCancelReplaceResponseCancelResponse.expiryReason); } @Override @@ -513,7 +935,22 @@ public int hashCode() { timeInForce, type, side, - selfTradePreventionMode); + selfTradePreventionMode, + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -540,6 +977,21 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -619,6 +1071,68 @@ public String toUrlQueryString() { sb.append("selfTradePreventionMode=") .append(urlEncode(selfTradePreventionModeValueAsString)) .append(""); + Object icebergQtyValue = getIcebergQty(); + String icebergQtyValueAsString = ""; + icebergQtyValueAsString = icebergQtyValue.toString(); + sb.append("icebergQty=").append(urlEncode(icebergQtyValueAsString)).append(""); + Object preventedMatchIdValue = getPreventedMatchId(); + String preventedMatchIdValueAsString = ""; + preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + sb.append("preventedMatchId=").append(urlEncode(preventedMatchIdValueAsString)).append(""); + Object preventedQuantityValue = getPreventedQuantity(); + String preventedQuantityValueAsString = ""; + preventedQuantityValueAsString = preventedQuantityValue.toString(); + sb.append("preventedQuantity=") + .append(urlEncode(preventedQuantityValueAsString)) + .append(""); + Object stopPriceValue = getStopPrice(); + String stopPriceValueAsString = ""; + stopPriceValueAsString = stopPriceValue.toString(); + sb.append("stopPrice=").append(urlEncode(stopPriceValueAsString)).append(""); + Object strategyIdValue = getStrategyId(); + String strategyIdValueAsString = ""; + strategyIdValueAsString = strategyIdValue.toString(); + sb.append("strategyId=").append(urlEncode(strategyIdValueAsString)).append(""); + Object strategyTypeValue = getStrategyType(); + String strategyTypeValueAsString = ""; + strategyTypeValueAsString = strategyTypeValue.toString(); + sb.append("strategyType=").append(urlEncode(strategyTypeValueAsString)).append(""); + Object trailingDeltaValue = getTrailingDelta(); + String trailingDeltaValueAsString = ""; + trailingDeltaValueAsString = trailingDeltaValue.toString(); + sb.append("trailingDelta=").append(urlEncode(trailingDeltaValueAsString)).append(""); + Object trailingTimeValue = getTrailingTime(); + String trailingTimeValueAsString = ""; + trailingTimeValueAsString = trailingTimeValue.toString(); + sb.append("trailingTime=").append(urlEncode(trailingTimeValueAsString)).append(""); + Object usedSorValue = getUsedSor(); + String usedSorValueAsString = ""; + usedSorValueAsString = usedSorValue.toString(); + sb.append("usedSor=").append(urlEncode(usedSorValueAsString)).append(""); + Object workingFloorValue = getWorkingFloor(); + String workingFloorValueAsString = ""; + workingFloorValueAsString = workingFloorValue.toString(); + sb.append("workingFloor=").append(urlEncode(workingFloorValueAsString)).append(""); + Object pegPriceTypeValue = getPegPriceType(); + String pegPriceTypeValueAsString = ""; + pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + sb.append("pegPriceType=").append(urlEncode(pegPriceTypeValueAsString)).append(""); + Object pegOffsetTypeValue = getPegOffsetType(); + String pegOffsetTypeValueAsString = ""; + pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + sb.append("pegOffsetType=").append(urlEncode(pegOffsetTypeValueAsString)).append(""); + Object pegOffsetValueValue = getPegOffsetValue(); + String pegOffsetValueValueAsString = ""; + pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + sb.append("pegOffsetValue=").append(urlEncode(pegOffsetValueValueAsString)).append(""); + Object peggedPriceValue = getPeggedPrice(); + String peggedPriceValueAsString = ""; + peggedPriceValueAsString = peggedPriceValue.toString(); + sb.append("peggedPrice=").append(urlEncode(peggedPriceValueAsString)).append(""); + Object expiryReasonValue = getExpiryReason(); + String expiryReasonValueAsString = ""; + expiryReasonValueAsString = expiryReasonValue.toString(); + sb.append("expiryReason=").append(urlEncode(expiryReasonValueAsString)).append(""); return sb.toString(); } @@ -663,6 +1177,21 @@ private String toIndentedString(Object o) { openapiFields.add("type"); openapiFields.add("side"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -797,6 +1326,71 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) + && !jsonObj.get("stopPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `stopPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("stopPrice").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseData.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseData.java deleted file mode 100644 index 9edb48980..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseData.java +++ /dev/null @@ -1,347 +0,0 @@ -/* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.rest.model; - -import com.binance.connector.client.spot.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** OrderCancelReplaceResponseData */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OrderCancelReplaceResponseData { - public static final String SERIALIZED_NAME_CANCEL_RESULT = "cancelResult"; - - @SerializedName(SERIALIZED_NAME_CANCEL_RESULT) - @jakarta.annotation.Nullable - private String cancelResult; - - public static final String SERIALIZED_NAME_NEW_ORDER_RESULT = "newOrderResult"; - - @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESULT) - @jakarta.annotation.Nullable - private String newOrderResult; - - public static final String SERIALIZED_NAME_CANCEL_RESPONSE = "cancelResponse"; - - @SerializedName(SERIALIZED_NAME_CANCEL_RESPONSE) - @jakarta.annotation.Nullable - private OrderCancelReplaceResponseDataCancelResponse cancelResponse; - - public static final String SERIALIZED_NAME_NEW_ORDER_RESPONSE = "newOrderResponse"; - - @SerializedName(SERIALIZED_NAME_NEW_ORDER_RESPONSE) - @jakarta.annotation.Nullable - private OrderCancelReplaceResponseDataNewOrderResponse newOrderResponse; - - public OrderCancelReplaceResponseData() {} - - public OrderCancelReplaceResponseData cancelResult( - @jakarta.annotation.Nullable String cancelResult) { - this.cancelResult = cancelResult; - return this; - } - - /** - * Get cancelResult - * - * @return cancelResult - */ - @jakarta.annotation.Nullable - public String getCancelResult() { - return cancelResult; - } - - public void setCancelResult(@jakarta.annotation.Nullable String cancelResult) { - this.cancelResult = cancelResult; - } - - public OrderCancelReplaceResponseData newOrderResult( - @jakarta.annotation.Nullable String newOrderResult) { - this.newOrderResult = newOrderResult; - return this; - } - - /** - * Get newOrderResult - * - * @return newOrderResult - */ - @jakarta.annotation.Nullable - public String getNewOrderResult() { - return newOrderResult; - } - - public void setNewOrderResult(@jakarta.annotation.Nullable String newOrderResult) { - this.newOrderResult = newOrderResult; - } - - public OrderCancelReplaceResponseData cancelResponse( - @jakarta.annotation.Nullable - OrderCancelReplaceResponseDataCancelResponse cancelResponse) { - this.cancelResponse = cancelResponse; - return this; - } - - /** - * Get cancelResponse - * - * @return cancelResponse - */ - @jakarta.annotation.Nullable - @Valid - public OrderCancelReplaceResponseDataCancelResponse getCancelResponse() { - return cancelResponse; - } - - public void setCancelResponse( - @jakarta.annotation.Nullable - OrderCancelReplaceResponseDataCancelResponse cancelResponse) { - this.cancelResponse = cancelResponse; - } - - public OrderCancelReplaceResponseData newOrderResponse( - @jakarta.annotation.Nullable - OrderCancelReplaceResponseDataNewOrderResponse newOrderResponse) { - this.newOrderResponse = newOrderResponse; - return this; - } - - /** - * Get newOrderResponse - * - * @return newOrderResponse - */ - @jakarta.annotation.Nullable - @Valid - public OrderCancelReplaceResponseDataNewOrderResponse getNewOrderResponse() { - return newOrderResponse; - } - - public void setNewOrderResponse( - @jakarta.annotation.Nullable - OrderCancelReplaceResponseDataNewOrderResponse newOrderResponse) { - this.newOrderResponse = newOrderResponse; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrderCancelReplaceResponseData orderCancelReplaceResponseData = - (OrderCancelReplaceResponseData) o; - return Objects.equals(this.cancelResult, orderCancelReplaceResponseData.cancelResult) - && Objects.equals( - this.newOrderResult, orderCancelReplaceResponseData.newOrderResult) - && Objects.equals( - this.cancelResponse, orderCancelReplaceResponseData.cancelResponse) - && Objects.equals( - this.newOrderResponse, orderCancelReplaceResponseData.newOrderResponse); - } - - @Override - public int hashCode() { - return Objects.hash(cancelResult, newOrderResult, cancelResponse, newOrderResponse); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrderCancelReplaceResponseData {\n"); - sb.append(" cancelResult: ").append(toIndentedString(cancelResult)).append("\n"); - sb.append(" newOrderResult: ").append(toIndentedString(newOrderResult)).append("\n"); - sb.append(" cancelResponse: ").append(toIndentedString(cancelResponse)).append("\n"); - sb.append(" newOrderResponse: ").append(toIndentedString(newOrderResponse)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object cancelResultValue = getCancelResult(); - String cancelResultValueAsString = ""; - cancelResultValueAsString = cancelResultValue.toString(); - sb.append("cancelResult=").append(urlEncode(cancelResultValueAsString)).append(""); - Object newOrderResultValue = getNewOrderResult(); - String newOrderResultValueAsString = ""; - newOrderResultValueAsString = newOrderResultValue.toString(); - sb.append("newOrderResult=").append(urlEncode(newOrderResultValueAsString)).append(""); - Object cancelResponseValue = getCancelResponse(); - String cancelResponseValueAsString = ""; - cancelResponseValueAsString = cancelResponseValue.toString(); - sb.append("cancelResponse=").append(urlEncode(cancelResponseValueAsString)).append(""); - Object newOrderResponseValue = getNewOrderResponse(); - String newOrderResponseValueAsString = ""; - newOrderResponseValueAsString = newOrderResponseValue.toString(); - sb.append("newOrderResponse=").append(urlEncode(newOrderResponseValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("cancelResult"); - openapiFields.add("newOrderResult"); - openapiFields.add("cancelResponse"); - openapiFields.add("newOrderResponse"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * OrderCancelReplaceResponseData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OrderCancelReplaceResponseData.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OrderCancelReplaceResponseData is not" - + " found in the empty JSON string", - OrderCancelReplaceResponseData.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("cancelResult") != null && !jsonObj.get("cancelResult").isJsonNull()) - && !jsonObj.get("cancelResult").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cancelResult` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("cancelResult").toString())); - } - if ((jsonObj.get("newOrderResult") != null && !jsonObj.get("newOrderResult").isJsonNull()) - && !jsonObj.get("newOrderResult").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `newOrderResult` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("newOrderResult").toString())); - } - // validate the optional field `cancelResponse` - if (jsonObj.get("cancelResponse") != null && !jsonObj.get("cancelResponse").isJsonNull()) { - OrderCancelReplaceResponseDataCancelResponse.validateJsonElement( - jsonObj.get("cancelResponse")); - } - // validate the optional field `newOrderResponse` - if (jsonObj.get("newOrderResponse") != null - && !jsonObj.get("newOrderResponse").isJsonNull()) { - OrderCancelReplaceResponseDataNewOrderResponse.validateJsonElement( - jsonObj.get("newOrderResponse")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrderCancelReplaceResponseData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OrderCancelReplaceResponseData' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(OrderCancelReplaceResponseData.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OrderCancelReplaceResponseData value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OrderCancelReplaceResponseData read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OrderCancelReplaceResponseData given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrderCancelReplaceResponseData - * @throws IOException if the JSON string is invalid with respect to - * OrderCancelReplaceResponseData - */ - public static OrderCancelReplaceResponseData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OrderCancelReplaceResponseData.class); - } - - /** - * Convert an instance of OrderCancelReplaceResponseData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseDataCancelResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseDataCancelResponse.java deleted file mode 100644 index e0504e001..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseDataCancelResponse.java +++ /dev/null @@ -1,942 +0,0 @@ -/* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.rest.model; - -import com.binance.connector.client.spot.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** OrderCancelReplaceResponseDataCancelResponse */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OrderCancelReplaceResponseDataCancelResponse { - public static final String SERIALIZED_NAME_CODE = "code"; - - @SerializedName(SERIALIZED_NAME_CODE) - @jakarta.annotation.Nullable - private Long code; - - public static final String SERIALIZED_NAME_MSG = "msg"; - - @SerializedName(SERIALIZED_NAME_MSG) - @jakarta.annotation.Nullable - private String msg; - - public static final String SERIALIZED_NAME_SYMBOL = "symbol"; - - @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nullable - private String symbol; - - public static final String SERIALIZED_NAME_ORIG_CLIENT_ORDER_ID = "origClientOrderId"; - - @SerializedName(SERIALIZED_NAME_ORIG_CLIENT_ORDER_ID) - @jakarta.annotation.Nullable - private String origClientOrderId; - - public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; - - @SerializedName(SERIALIZED_NAME_ORDER_ID) - @jakarta.annotation.Nullable - private Long orderId; - - public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; - - @SerializedName(SERIALIZED_NAME_ORDER_LIST_ID) - @jakarta.annotation.Nullable - private Long orderListId; - - public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; - - @SerializedName(SERIALIZED_NAME_CLIENT_ORDER_ID) - @jakarta.annotation.Nullable - private String clientOrderId; - - public static final String SERIALIZED_NAME_TRANSACT_TIME = "transactTime"; - - @SerializedName(SERIALIZED_NAME_TRANSACT_TIME) - @jakarta.annotation.Nullable - private Long transactTime; - - public static final String SERIALIZED_NAME_PRICE = "price"; - - @SerializedName(SERIALIZED_NAME_PRICE) - @jakarta.annotation.Nullable - private String price; - - public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; - - @SerializedName(SERIALIZED_NAME_ORIG_QTY) - @jakarta.annotation.Nullable - private String origQty; - - public static final String SERIALIZED_NAME_EXECUTED_QTY = "executedQty"; - - @SerializedName(SERIALIZED_NAME_EXECUTED_QTY) - @jakarta.annotation.Nullable - private String executedQty; - - public static final String SERIALIZED_NAME_ORIG_QUOTE_ORDER_QTY = "origQuoteOrderQty"; - - @SerializedName(SERIALIZED_NAME_ORIG_QUOTE_ORDER_QTY) - @jakarta.annotation.Nullable - private String origQuoteOrderQty; - - public static final String SERIALIZED_NAME_CUMMULATIVE_QUOTE_QTY = "cummulativeQuoteQty"; - - @SerializedName(SERIALIZED_NAME_CUMMULATIVE_QUOTE_QTY) - @jakarta.annotation.Nullable - private String cummulativeQuoteQty; - - public static final String SERIALIZED_NAME_STATUS = "status"; - - @SerializedName(SERIALIZED_NAME_STATUS) - @jakarta.annotation.Nullable - private String status; - - public static final String SERIALIZED_NAME_TIME_IN_FORCE = "timeInForce"; - - @SerializedName(SERIALIZED_NAME_TIME_IN_FORCE) - @jakarta.annotation.Nullable - private String timeInForce; - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @jakarta.annotation.Nullable - private String type; - - public static final String SERIALIZED_NAME_SIDE = "side"; - - @SerializedName(SERIALIZED_NAME_SIDE) - @jakarta.annotation.Nullable - private String side; - - public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = - "selfTradePreventionMode"; - - @SerializedName(SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE) - @jakarta.annotation.Nullable - private String selfTradePreventionMode; - - public OrderCancelReplaceResponseDataCancelResponse() {} - - public OrderCancelReplaceResponseDataCancelResponse code( - @jakarta.annotation.Nullable Long code) { - this.code = code; - return this; - } - - /** - * Get code - * - * @return code - */ - @jakarta.annotation.Nullable - public Long getCode() { - return code; - } - - public void setCode(@jakarta.annotation.Nullable Long code) { - this.code = code; - } - - public OrderCancelReplaceResponseDataCancelResponse msg( - @jakarta.annotation.Nullable String msg) { - this.msg = msg; - return this; - } - - /** - * Get msg - * - * @return msg - */ - @jakarta.annotation.Nullable - public String getMsg() { - return msg; - } - - public void setMsg(@jakarta.annotation.Nullable String msg) { - this.msg = msg; - } - - public OrderCancelReplaceResponseDataCancelResponse symbol( - @jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - return this; - } - - /** - * Get symbol - * - * @return symbol - */ - @jakarta.annotation.Nullable - public String getSymbol() { - return symbol; - } - - public void setSymbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - } - - public OrderCancelReplaceResponseDataCancelResponse origClientOrderId( - @jakarta.annotation.Nullable String origClientOrderId) { - this.origClientOrderId = origClientOrderId; - return this; - } - - /** - * Get origClientOrderId - * - * @return origClientOrderId - */ - @jakarta.annotation.Nullable - public String getOrigClientOrderId() { - return origClientOrderId; - } - - public void setOrigClientOrderId(@jakarta.annotation.Nullable String origClientOrderId) { - this.origClientOrderId = origClientOrderId; - } - - public OrderCancelReplaceResponseDataCancelResponse orderId( - @jakarta.annotation.Nullable Long orderId) { - this.orderId = orderId; - return this; - } - - /** - * Get orderId - * - * @return orderId - */ - @jakarta.annotation.Nullable - public Long getOrderId() { - return orderId; - } - - public void setOrderId(@jakarta.annotation.Nullable Long orderId) { - this.orderId = orderId; - } - - public OrderCancelReplaceResponseDataCancelResponse orderListId( - @jakarta.annotation.Nullable Long orderListId) { - this.orderListId = orderListId; - return this; - } - - /** - * Get orderListId - * - * @return orderListId - */ - @jakarta.annotation.Nullable - public Long getOrderListId() { - return orderListId; - } - - public void setOrderListId(@jakarta.annotation.Nullable Long orderListId) { - this.orderListId = orderListId; - } - - public OrderCancelReplaceResponseDataCancelResponse clientOrderId( - @jakarta.annotation.Nullable String clientOrderId) { - this.clientOrderId = clientOrderId; - return this; - } - - /** - * Get clientOrderId - * - * @return clientOrderId - */ - @jakarta.annotation.Nullable - public String getClientOrderId() { - return clientOrderId; - } - - public void setClientOrderId(@jakarta.annotation.Nullable String clientOrderId) { - this.clientOrderId = clientOrderId; - } - - public OrderCancelReplaceResponseDataCancelResponse transactTime( - @jakarta.annotation.Nullable Long transactTime) { - this.transactTime = transactTime; - return this; - } - - /** - * Get transactTime - * - * @return transactTime - */ - @jakarta.annotation.Nullable - public Long getTransactTime() { - return transactTime; - } - - public void setTransactTime(@jakarta.annotation.Nullable Long transactTime) { - this.transactTime = transactTime; - } - - public OrderCancelReplaceResponseDataCancelResponse price( - @jakarta.annotation.Nullable String price) { - this.price = price; - return this; - } - - /** - * Get price - * - * @return price - */ - @jakarta.annotation.Nullable - public String getPrice() { - return price; - } - - public void setPrice(@jakarta.annotation.Nullable String price) { - this.price = price; - } - - public OrderCancelReplaceResponseDataCancelResponse origQty( - @jakarta.annotation.Nullable String origQty) { - this.origQty = origQty; - return this; - } - - /** - * Get origQty - * - * @return origQty - */ - @jakarta.annotation.Nullable - public String getOrigQty() { - return origQty; - } - - public void setOrigQty(@jakarta.annotation.Nullable String origQty) { - this.origQty = origQty; - } - - public OrderCancelReplaceResponseDataCancelResponse executedQty( - @jakarta.annotation.Nullable String executedQty) { - this.executedQty = executedQty; - return this; - } - - /** - * Get executedQty - * - * @return executedQty - */ - @jakarta.annotation.Nullable - public String getExecutedQty() { - return executedQty; - } - - public void setExecutedQty(@jakarta.annotation.Nullable String executedQty) { - this.executedQty = executedQty; - } - - public OrderCancelReplaceResponseDataCancelResponse origQuoteOrderQty( - @jakarta.annotation.Nullable String origQuoteOrderQty) { - this.origQuoteOrderQty = origQuoteOrderQty; - return this; - } - - /** - * Get origQuoteOrderQty - * - * @return origQuoteOrderQty - */ - @jakarta.annotation.Nullable - public String getOrigQuoteOrderQty() { - return origQuoteOrderQty; - } - - public void setOrigQuoteOrderQty(@jakarta.annotation.Nullable String origQuoteOrderQty) { - this.origQuoteOrderQty = origQuoteOrderQty; - } - - public OrderCancelReplaceResponseDataCancelResponse cummulativeQuoteQty( - @jakarta.annotation.Nullable String cummulativeQuoteQty) { - this.cummulativeQuoteQty = cummulativeQuoteQty; - return this; - } - - /** - * Get cummulativeQuoteQty - * - * @return cummulativeQuoteQty - */ - @jakarta.annotation.Nullable - public String getCummulativeQuoteQty() { - return cummulativeQuoteQty; - } - - public void setCummulativeQuoteQty(@jakarta.annotation.Nullable String cummulativeQuoteQty) { - this.cummulativeQuoteQty = cummulativeQuoteQty; - } - - public OrderCancelReplaceResponseDataCancelResponse status( - @jakarta.annotation.Nullable String status) { - this.status = status; - return this; - } - - /** - * Get status - * - * @return status - */ - @jakarta.annotation.Nullable - public String getStatus() { - return status; - } - - public void setStatus(@jakarta.annotation.Nullable String status) { - this.status = status; - } - - public OrderCancelReplaceResponseDataCancelResponse timeInForce( - @jakarta.annotation.Nullable String timeInForce) { - this.timeInForce = timeInForce; - return this; - } - - /** - * Get timeInForce - * - * @return timeInForce - */ - @jakarta.annotation.Nullable - public String getTimeInForce() { - return timeInForce; - } - - public void setTimeInForce(@jakarta.annotation.Nullable String timeInForce) { - this.timeInForce = timeInForce; - } - - public OrderCancelReplaceResponseDataCancelResponse type( - @jakarta.annotation.Nullable String type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @jakarta.annotation.Nullable - public String getType() { - return type; - } - - public void setType(@jakarta.annotation.Nullable String type) { - this.type = type; - } - - public OrderCancelReplaceResponseDataCancelResponse side( - @jakarta.annotation.Nullable String side) { - this.side = side; - return this; - } - - /** - * Get side - * - * @return side - */ - @jakarta.annotation.Nullable - public String getSide() { - return side; - } - - public void setSide(@jakarta.annotation.Nullable String side) { - this.side = side; - } - - public OrderCancelReplaceResponseDataCancelResponse selfTradePreventionMode( - @jakarta.annotation.Nullable String selfTradePreventionMode) { - this.selfTradePreventionMode = selfTradePreventionMode; - return this; - } - - /** - * Get selfTradePreventionMode - * - * @return selfTradePreventionMode - */ - @jakarta.annotation.Nullable - public String getSelfTradePreventionMode() { - return selfTradePreventionMode; - } - - public void setSelfTradePreventionMode( - @jakarta.annotation.Nullable String selfTradePreventionMode) { - this.selfTradePreventionMode = selfTradePreventionMode; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrderCancelReplaceResponseDataCancelResponse orderCancelReplaceResponseDataCancelResponse = - (OrderCancelReplaceResponseDataCancelResponse) o; - return Objects.equals(this.code, orderCancelReplaceResponseDataCancelResponse.code) - && Objects.equals(this.msg, orderCancelReplaceResponseDataCancelResponse.msg) - && Objects.equals(this.symbol, orderCancelReplaceResponseDataCancelResponse.symbol) - && Objects.equals( - this.origClientOrderId, - orderCancelReplaceResponseDataCancelResponse.origClientOrderId) - && Objects.equals( - this.orderId, orderCancelReplaceResponseDataCancelResponse.orderId) - && Objects.equals( - this.orderListId, orderCancelReplaceResponseDataCancelResponse.orderListId) - && Objects.equals( - this.clientOrderId, - orderCancelReplaceResponseDataCancelResponse.clientOrderId) - && Objects.equals( - this.transactTime, - orderCancelReplaceResponseDataCancelResponse.transactTime) - && Objects.equals(this.price, orderCancelReplaceResponseDataCancelResponse.price) - && Objects.equals( - this.origQty, orderCancelReplaceResponseDataCancelResponse.origQty) - && Objects.equals( - this.executedQty, orderCancelReplaceResponseDataCancelResponse.executedQty) - && Objects.equals( - this.origQuoteOrderQty, - orderCancelReplaceResponseDataCancelResponse.origQuoteOrderQty) - && Objects.equals( - this.cummulativeQuoteQty, - orderCancelReplaceResponseDataCancelResponse.cummulativeQuoteQty) - && Objects.equals(this.status, orderCancelReplaceResponseDataCancelResponse.status) - && Objects.equals( - this.timeInForce, orderCancelReplaceResponseDataCancelResponse.timeInForce) - && Objects.equals(this.type, orderCancelReplaceResponseDataCancelResponse.type) - && Objects.equals(this.side, orderCancelReplaceResponseDataCancelResponse.side) - && Objects.equals( - this.selfTradePreventionMode, - orderCancelReplaceResponseDataCancelResponse.selfTradePreventionMode); - } - - @Override - public int hashCode() { - return Objects.hash( - code, - msg, - symbol, - origClientOrderId, - orderId, - orderListId, - clientOrderId, - transactTime, - price, - origQty, - executedQty, - origQuoteOrderQty, - cummulativeQuoteQty, - status, - timeInForce, - type, - side, - selfTradePreventionMode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrderCancelReplaceResponseDataCancelResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" msg: ").append(toIndentedString(msg)).append("\n"); - sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); - sb.append(" origClientOrderId: ").append(toIndentedString(origClientOrderId)).append("\n"); - sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); - sb.append(" orderListId: ").append(toIndentedString(orderListId)).append("\n"); - sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); - sb.append(" transactTime: ").append(toIndentedString(transactTime)).append("\n"); - sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); - sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); - sb.append(" origQuoteOrderQty: ").append(toIndentedString(origQuoteOrderQty)).append("\n"); - sb.append(" cummulativeQuoteQty: ") - .append(toIndentedString(cummulativeQuoteQty)) - .append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" side: ").append(toIndentedString(side)).append("\n"); - sb.append(" selfTradePreventionMode: ") - .append(toIndentedString(selfTradePreventionMode)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object codeValue = getCode(); - String codeValueAsString = ""; - codeValueAsString = codeValue.toString(); - sb.append("code=").append(urlEncode(codeValueAsString)).append(""); - Object msgValue = getMsg(); - String msgValueAsString = ""; - msgValueAsString = msgValue.toString(); - sb.append("msg=").append(urlEncode(msgValueAsString)).append(""); - Object symbolValue = getSymbol(); - String symbolValueAsString = ""; - symbolValueAsString = symbolValue.toString(); - sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); - Object origClientOrderIdValue = getOrigClientOrderId(); - String origClientOrderIdValueAsString = ""; - origClientOrderIdValueAsString = origClientOrderIdValue.toString(); - sb.append("origClientOrderId=") - .append(urlEncode(origClientOrderIdValueAsString)) - .append(""); - Object orderIdValue = getOrderId(); - String orderIdValueAsString = ""; - orderIdValueAsString = orderIdValue.toString(); - sb.append("orderId=").append(urlEncode(orderIdValueAsString)).append(""); - Object orderListIdValue = getOrderListId(); - String orderListIdValueAsString = ""; - orderListIdValueAsString = orderListIdValue.toString(); - sb.append("orderListId=").append(urlEncode(orderListIdValueAsString)).append(""); - Object clientOrderIdValue = getClientOrderId(); - String clientOrderIdValueAsString = ""; - clientOrderIdValueAsString = clientOrderIdValue.toString(); - sb.append("clientOrderId=").append(urlEncode(clientOrderIdValueAsString)).append(""); - Object transactTimeValue = getTransactTime(); - String transactTimeValueAsString = ""; - transactTimeValueAsString = transactTimeValue.toString(); - sb.append("transactTime=").append(urlEncode(transactTimeValueAsString)).append(""); - Object priceValue = getPrice(); - String priceValueAsString = ""; - priceValueAsString = priceValue.toString(); - sb.append("price=").append(urlEncode(priceValueAsString)).append(""); - Object origQtyValue = getOrigQty(); - String origQtyValueAsString = ""; - origQtyValueAsString = origQtyValue.toString(); - sb.append("origQty=").append(urlEncode(origQtyValueAsString)).append(""); - Object executedQtyValue = getExecutedQty(); - String executedQtyValueAsString = ""; - executedQtyValueAsString = executedQtyValue.toString(); - sb.append("executedQty=").append(urlEncode(executedQtyValueAsString)).append(""); - Object origQuoteOrderQtyValue = getOrigQuoteOrderQty(); - String origQuoteOrderQtyValueAsString = ""; - origQuoteOrderQtyValueAsString = origQuoteOrderQtyValue.toString(); - sb.append("origQuoteOrderQty=") - .append(urlEncode(origQuoteOrderQtyValueAsString)) - .append(""); - Object cummulativeQuoteQtyValue = getCummulativeQuoteQty(); - String cummulativeQuoteQtyValueAsString = ""; - cummulativeQuoteQtyValueAsString = cummulativeQuoteQtyValue.toString(); - sb.append("cummulativeQuoteQty=") - .append(urlEncode(cummulativeQuoteQtyValueAsString)) - .append(""); - Object statusValue = getStatus(); - String statusValueAsString = ""; - statusValueAsString = statusValue.toString(); - sb.append("status=").append(urlEncode(statusValueAsString)).append(""); - Object timeInForceValue = getTimeInForce(); - String timeInForceValueAsString = ""; - timeInForceValueAsString = timeInForceValue.toString(); - sb.append("timeInForce=").append(urlEncode(timeInForceValueAsString)).append(""); - Object typeValue = getType(); - String typeValueAsString = ""; - typeValueAsString = typeValue.toString(); - sb.append("type=").append(urlEncode(typeValueAsString)).append(""); - Object sideValue = getSide(); - String sideValueAsString = ""; - sideValueAsString = sideValue.toString(); - sb.append("side=").append(urlEncode(sideValueAsString)).append(""); - Object selfTradePreventionModeValue = getSelfTradePreventionMode(); - String selfTradePreventionModeValueAsString = ""; - selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); - sb.append("selfTradePreventionMode=") - .append(urlEncode(selfTradePreventionModeValueAsString)) - .append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("code"); - openapiFields.add("msg"); - openapiFields.add("symbol"); - openapiFields.add("origClientOrderId"); - openapiFields.add("orderId"); - openapiFields.add("orderListId"); - openapiFields.add("clientOrderId"); - openapiFields.add("transactTime"); - openapiFields.add("price"); - openapiFields.add("origQty"); - openapiFields.add("executedQty"); - openapiFields.add("origQuoteOrderQty"); - openapiFields.add("cummulativeQuoteQty"); - openapiFields.add("status"); - openapiFields.add("timeInForce"); - openapiFields.add("type"); - openapiFields.add("side"); - openapiFields.add("selfTradePreventionMode"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * OrderCancelReplaceResponseDataCancelResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OrderCancelReplaceResponseDataCancelResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " OrderCancelReplaceResponseDataCancelResponse is not found" - + " in the empty JSON string", - OrderCancelReplaceResponseDataCancelResponse.openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("msg") != null && !jsonObj.get("msg").isJsonNull()) - && !jsonObj.get("msg").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `msg` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("msg").toString())); - } - if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) - && !jsonObj.get("symbol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `symbol` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("symbol").toString())); - } - if ((jsonObj.get("origClientOrderId") != null - && !jsonObj.get("origClientOrderId").isJsonNull()) - && !jsonObj.get("origClientOrderId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `origClientOrderId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("origClientOrderId").toString())); - } - if ((jsonObj.get("clientOrderId") != null && !jsonObj.get("clientOrderId").isJsonNull()) - && !jsonObj.get("clientOrderId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `clientOrderId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("clientOrderId").toString())); - } - if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) - && !jsonObj.get("price").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `price` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("price").toString())); - } - if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) - && !jsonObj.get("origQty").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `origQty` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("origQty").toString())); - } - if ((jsonObj.get("executedQty") != null && !jsonObj.get("executedQty").isJsonNull()) - && !jsonObj.get("executedQty").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `executedQty` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("executedQty").toString())); - } - if ((jsonObj.get("origQuoteOrderQty") != null - && !jsonObj.get("origQuoteOrderQty").isJsonNull()) - && !jsonObj.get("origQuoteOrderQty").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `origQuoteOrderQty` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("origQuoteOrderQty").toString())); - } - if ((jsonObj.get("cummulativeQuoteQty") != null - && !jsonObj.get("cummulativeQuoteQty").isJsonNull()) - && !jsonObj.get("cummulativeQuoteQty").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cummulativeQuoteQty` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("cummulativeQuoteQty").toString())); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) - && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `status` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("status").toString())); - } - if ((jsonObj.get("timeInForce") != null && !jsonObj.get("timeInForce").isJsonNull()) - && !jsonObj.get("timeInForce").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `timeInForce` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("timeInForce").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - if ((jsonObj.get("side") != null && !jsonObj.get("side").isJsonNull()) - && !jsonObj.get("side").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `side` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("side").toString())); - } - if ((jsonObj.get("selfTradePreventionMode") != null - && !jsonObj.get("selfTradePreventionMode").isJsonNull()) - && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `selfTradePreventionMode` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("selfTradePreventionMode").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrderCancelReplaceResponseDataCancelResponse.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'OrderCancelReplaceResponseDataCancelResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, - TypeToken.get(OrderCancelReplaceResponseDataCancelResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, OrderCancelReplaceResponseDataCancelResponse value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OrderCancelReplaceResponseDataCancelResponse read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OrderCancelReplaceResponseDataCancelResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrderCancelReplaceResponseDataCancelResponse - * @throws IOException if the JSON string is invalid with respect to - * OrderCancelReplaceResponseDataCancelResponse - */ - public static OrderCancelReplaceResponseDataCancelResponse fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, OrderCancelReplaceResponseDataCancelResponse.class); - } - - /** - * Convert an instance of OrderCancelReplaceResponseDataCancelResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseDataNewOrderResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseDataNewOrderResponse.java deleted file mode 100644 index d1fbd4001..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseDataNewOrderResponse.java +++ /dev/null @@ -1,448 +0,0 @@ -/* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.rest.model; - -import com.binance.connector.client.spot.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** OrderCancelReplaceResponseDataNewOrderResponse */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OrderCancelReplaceResponseDataNewOrderResponse { - public static final String SERIALIZED_NAME_CODE = "code"; - - @SerializedName(SERIALIZED_NAME_CODE) - @jakarta.annotation.Nullable - private Long code; - - public static final String SERIALIZED_NAME_MSG = "msg"; - - @SerializedName(SERIALIZED_NAME_MSG) - @jakarta.annotation.Nullable - private String msg; - - public static final String SERIALIZED_NAME_SYMBOL = "symbol"; - - @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nullable - private String symbol; - - public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; - - @SerializedName(SERIALIZED_NAME_ORDER_ID) - @jakarta.annotation.Nullable - private Long orderId; - - public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; - - @SerializedName(SERIALIZED_NAME_ORDER_LIST_ID) - @jakarta.annotation.Nullable - private Long orderListId; - - public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; - - @SerializedName(SERIALIZED_NAME_CLIENT_ORDER_ID) - @jakarta.annotation.Nullable - private String clientOrderId; - - public static final String SERIALIZED_NAME_TRANSACT_TIME = "transactTime"; - - @SerializedName(SERIALIZED_NAME_TRANSACT_TIME) - @jakarta.annotation.Nullable - private Long transactTime; - - public OrderCancelReplaceResponseDataNewOrderResponse() {} - - public OrderCancelReplaceResponseDataNewOrderResponse code( - @jakarta.annotation.Nullable Long code) { - this.code = code; - return this; - } - - /** - * Get code - * - * @return code - */ - @jakarta.annotation.Nullable - public Long getCode() { - return code; - } - - public void setCode(@jakarta.annotation.Nullable Long code) { - this.code = code; - } - - public OrderCancelReplaceResponseDataNewOrderResponse msg( - @jakarta.annotation.Nullable String msg) { - this.msg = msg; - return this; - } - - /** - * Get msg - * - * @return msg - */ - @jakarta.annotation.Nullable - public String getMsg() { - return msg; - } - - public void setMsg(@jakarta.annotation.Nullable String msg) { - this.msg = msg; - } - - public OrderCancelReplaceResponseDataNewOrderResponse symbol( - @jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - return this; - } - - /** - * Get symbol - * - * @return symbol - */ - @jakarta.annotation.Nullable - public String getSymbol() { - return symbol; - } - - public void setSymbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - } - - public OrderCancelReplaceResponseDataNewOrderResponse orderId( - @jakarta.annotation.Nullable Long orderId) { - this.orderId = orderId; - return this; - } - - /** - * Get orderId - * - * @return orderId - */ - @jakarta.annotation.Nullable - public Long getOrderId() { - return orderId; - } - - public void setOrderId(@jakarta.annotation.Nullable Long orderId) { - this.orderId = orderId; - } - - public OrderCancelReplaceResponseDataNewOrderResponse orderListId( - @jakarta.annotation.Nullable Long orderListId) { - this.orderListId = orderListId; - return this; - } - - /** - * Get orderListId - * - * @return orderListId - */ - @jakarta.annotation.Nullable - public Long getOrderListId() { - return orderListId; - } - - public void setOrderListId(@jakarta.annotation.Nullable Long orderListId) { - this.orderListId = orderListId; - } - - public OrderCancelReplaceResponseDataNewOrderResponse clientOrderId( - @jakarta.annotation.Nullable String clientOrderId) { - this.clientOrderId = clientOrderId; - return this; - } - - /** - * Get clientOrderId - * - * @return clientOrderId - */ - @jakarta.annotation.Nullable - public String getClientOrderId() { - return clientOrderId; - } - - public void setClientOrderId(@jakarta.annotation.Nullable String clientOrderId) { - this.clientOrderId = clientOrderId; - } - - public OrderCancelReplaceResponseDataNewOrderResponse transactTime( - @jakarta.annotation.Nullable Long transactTime) { - this.transactTime = transactTime; - return this; - } - - /** - * Get transactTime - * - * @return transactTime - */ - @jakarta.annotation.Nullable - public Long getTransactTime() { - return transactTime; - } - - public void setTransactTime(@jakarta.annotation.Nullable Long transactTime) { - this.transactTime = transactTime; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrderCancelReplaceResponseDataNewOrderResponse - orderCancelReplaceResponseDataNewOrderResponse = - (OrderCancelReplaceResponseDataNewOrderResponse) o; - return Objects.equals(this.code, orderCancelReplaceResponseDataNewOrderResponse.code) - && Objects.equals(this.msg, orderCancelReplaceResponseDataNewOrderResponse.msg) - && Objects.equals( - this.symbol, orderCancelReplaceResponseDataNewOrderResponse.symbol) - && Objects.equals( - this.orderId, orderCancelReplaceResponseDataNewOrderResponse.orderId) - && Objects.equals( - this.orderListId, - orderCancelReplaceResponseDataNewOrderResponse.orderListId) - && Objects.equals( - this.clientOrderId, - orderCancelReplaceResponseDataNewOrderResponse.clientOrderId) - && Objects.equals( - this.transactTime, - orderCancelReplaceResponseDataNewOrderResponse.transactTime); - } - - @Override - public int hashCode() { - return Objects.hash(code, msg, symbol, orderId, orderListId, clientOrderId, transactTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrderCancelReplaceResponseDataNewOrderResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" msg: ").append(toIndentedString(msg)).append("\n"); - sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); - sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); - sb.append(" orderListId: ").append(toIndentedString(orderListId)).append("\n"); - sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); - sb.append(" transactTime: ").append(toIndentedString(transactTime)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object codeValue = getCode(); - String codeValueAsString = ""; - codeValueAsString = codeValue.toString(); - sb.append("code=").append(urlEncode(codeValueAsString)).append(""); - Object msgValue = getMsg(); - String msgValueAsString = ""; - msgValueAsString = msgValue.toString(); - sb.append("msg=").append(urlEncode(msgValueAsString)).append(""); - Object symbolValue = getSymbol(); - String symbolValueAsString = ""; - symbolValueAsString = symbolValue.toString(); - sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); - Object orderIdValue = getOrderId(); - String orderIdValueAsString = ""; - orderIdValueAsString = orderIdValue.toString(); - sb.append("orderId=").append(urlEncode(orderIdValueAsString)).append(""); - Object orderListIdValue = getOrderListId(); - String orderListIdValueAsString = ""; - orderListIdValueAsString = orderListIdValue.toString(); - sb.append("orderListId=").append(urlEncode(orderListIdValueAsString)).append(""); - Object clientOrderIdValue = getClientOrderId(); - String clientOrderIdValueAsString = ""; - clientOrderIdValueAsString = clientOrderIdValue.toString(); - sb.append("clientOrderId=").append(urlEncode(clientOrderIdValueAsString)).append(""); - Object transactTimeValue = getTransactTime(); - String transactTimeValueAsString = ""; - transactTimeValueAsString = transactTimeValue.toString(); - sb.append("transactTime=").append(urlEncode(transactTimeValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("code"); - openapiFields.add("msg"); - openapiFields.add("symbol"); - openapiFields.add("orderId"); - openapiFields.add("orderListId"); - openapiFields.add("clientOrderId"); - openapiFields.add("transactTime"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * OrderCancelReplaceResponseDataNewOrderResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OrderCancelReplaceResponseDataNewOrderResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " OrderCancelReplaceResponseDataNewOrderResponse is not found" - + " in the empty JSON string", - OrderCancelReplaceResponseDataNewOrderResponse.openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("msg") != null && !jsonObj.get("msg").isJsonNull()) - && !jsonObj.get("msg").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `msg` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("msg").toString())); - } - if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) - && !jsonObj.get("symbol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `symbol` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("symbol").toString())); - } - if ((jsonObj.get("clientOrderId") != null && !jsonObj.get("clientOrderId").isJsonNull()) - && !jsonObj.get("clientOrderId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `clientOrderId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("clientOrderId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrderCancelReplaceResponseDataNewOrderResponse.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'OrderCancelReplaceResponseDataNewOrderResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, - TypeToken.get(OrderCancelReplaceResponseDataNewOrderResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, - OrderCancelReplaceResponseDataNewOrderResponse value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OrderCancelReplaceResponseDataNewOrderResponse read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OrderCancelReplaceResponseDataNewOrderResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrderCancelReplaceResponseDataNewOrderResponse - * @throws IOException if the JSON string is invalid with respect to - * OrderCancelReplaceResponseDataNewOrderResponse - */ - public static OrderCancelReplaceResponseDataNewOrderResponse fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, OrderCancelReplaceResponseDataNewOrderResponse.class); - } - - /** - * Convert an instance of OrderCancelReplaceResponseDataNewOrderResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseNewOrderResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseNewOrderResponse.java index 79a14299a..a4419d5c0 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseNewOrderResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseNewOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -14,6 +14,7 @@ import com.binance.connector.client.spot.rest.JSON; import com.google.gson.Gson; +import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; @@ -22,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -38,7 +40,7 @@ /** OrderCancelReplaceResponseNewOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderCancelReplaceResponseNewOrderResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -134,7 +136,7 @@ public class OrderCancelReplaceResponseNewOrderResponse { @SerializedName(SERIALIZED_NAME_FILLS) @jakarta.annotation.Nullable - private List fills; + private List<@Valid OrderCancelReplaceResponseNewOrderResponseFillsInner> fills; public static final String SERIALIZED_NAME_SELF_TRADE_PREVENTION_MODE = "selfTradePreventionMode"; @@ -143,6 +145,96 @@ public class OrderCancelReplaceResponseNewOrderResponse { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + + @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @jakarta.annotation.Nullable + private String stopPrice; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OrderCancelReplaceResponseNewOrderResponse() {} public OrderCancelReplaceResponseNewOrderResponse symbol( @@ -192,7 +284,7 @@ public OrderCancelReplaceResponseNewOrderResponse orderListId( } /** - * Get orderListId + * Unless it's part of an order list, value will be -1 * * @return orderListId */ @@ -446,12 +538,14 @@ public void setWorkingTime(@jakarta.annotation.Nullable Long workingTime) { } public OrderCancelReplaceResponseNewOrderResponse fills( - @jakarta.annotation.Nullable List fills) { + @jakarta.annotation.Nullable + List<@Valid OrderCancelReplaceResponseNewOrderResponseFillsInner> fills) { this.fills = fills; return this; } - public OrderCancelReplaceResponseNewOrderResponse addFillsItem(String fillsItem) { + public OrderCancelReplaceResponseNewOrderResponse addFillsItem( + OrderCancelReplaceResponseNewOrderResponseFillsInner fillsItem) { if (this.fills == null) { this.fills = new ArrayList<>(); } @@ -465,11 +559,14 @@ public OrderCancelReplaceResponseNewOrderResponse addFillsItem(String fillsItem) * @return fills */ @jakarta.annotation.Nullable - public List getFills() { + @Valid + public List<@Valid OrderCancelReplaceResponseNewOrderResponseFillsInner> getFills() { return fills; } - public void setFills(@jakarta.annotation.Nullable List fills) { + public void setFills( + @jakarta.annotation.Nullable + List<@Valid OrderCancelReplaceResponseNewOrderResponseFillsInner> fills) { this.fills = fills; } @@ -494,6 +591,306 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OrderCancelReplaceResponseNewOrderResponse icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderCancelReplaceResponseNewOrderResponse preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderCancelReplaceResponseNewOrderResponse preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public OrderCancelReplaceResponseNewOrderResponse stopPrice( + @jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + /** + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. + * + * @return stopPrice + */ + @jakarta.annotation.Nullable + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + } + + public OrderCancelReplaceResponseNewOrderResponse strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderCancelReplaceResponseNewOrderResponse strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderCancelReplaceResponseNewOrderResponse trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderCancelReplaceResponseNewOrderResponse trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderCancelReplaceResponseNewOrderResponse usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderCancelReplaceResponseNewOrderResponse workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderCancelReplaceResponseNewOrderResponse pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderCancelReplaceResponseNewOrderResponse pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderCancelReplaceResponseNewOrderResponse pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderCancelReplaceResponseNewOrderResponse peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderCancelReplaceResponseNewOrderResponse expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -533,7 +930,41 @@ public boolean equals(Object o) { && Objects.equals(this.fills, orderCancelReplaceResponseNewOrderResponse.fills) && Objects.equals( this.selfTradePreventionMode, - orderCancelReplaceResponseNewOrderResponse.selfTradePreventionMode); + orderCancelReplaceResponseNewOrderResponse.selfTradePreventionMode) + && Objects.equals( + this.icebergQty, orderCancelReplaceResponseNewOrderResponse.icebergQty) + && Objects.equals( + this.preventedMatchId, + orderCancelReplaceResponseNewOrderResponse.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + orderCancelReplaceResponseNewOrderResponse.preventedQuantity) + && Objects.equals( + this.stopPrice, orderCancelReplaceResponseNewOrderResponse.stopPrice) + && Objects.equals( + this.strategyId, orderCancelReplaceResponseNewOrderResponse.strategyId) + && Objects.equals( + this.strategyType, orderCancelReplaceResponseNewOrderResponse.strategyType) + && Objects.equals( + this.trailingDelta, + orderCancelReplaceResponseNewOrderResponse.trailingDelta) + && Objects.equals( + this.trailingTime, orderCancelReplaceResponseNewOrderResponse.trailingTime) + && Objects.equals(this.usedSor, orderCancelReplaceResponseNewOrderResponse.usedSor) + && Objects.equals( + this.workingFloor, orderCancelReplaceResponseNewOrderResponse.workingFloor) + && Objects.equals( + this.pegPriceType, orderCancelReplaceResponseNewOrderResponse.pegPriceType) + && Objects.equals( + this.pegOffsetType, + orderCancelReplaceResponseNewOrderResponse.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, + orderCancelReplaceResponseNewOrderResponse.pegOffsetValue) + && Objects.equals( + this.peggedPrice, orderCancelReplaceResponseNewOrderResponse.peggedPrice) + && Objects.equals( + this.expiryReason, orderCancelReplaceResponseNewOrderResponse.expiryReason); } @Override @@ -555,7 +986,22 @@ public int hashCode() { side, workingTime, fills, - selfTradePreventionMode); + selfTradePreventionMode, + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -583,6 +1029,21 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -667,6 +1128,68 @@ public String toUrlQueryString() { sb.append("selfTradePreventionMode=") .append(urlEncode(selfTradePreventionModeValueAsString)) .append(""); + Object icebergQtyValue = getIcebergQty(); + String icebergQtyValueAsString = ""; + icebergQtyValueAsString = icebergQtyValue.toString(); + sb.append("icebergQty=").append(urlEncode(icebergQtyValueAsString)).append(""); + Object preventedMatchIdValue = getPreventedMatchId(); + String preventedMatchIdValueAsString = ""; + preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + sb.append("preventedMatchId=").append(urlEncode(preventedMatchIdValueAsString)).append(""); + Object preventedQuantityValue = getPreventedQuantity(); + String preventedQuantityValueAsString = ""; + preventedQuantityValueAsString = preventedQuantityValue.toString(); + sb.append("preventedQuantity=") + .append(urlEncode(preventedQuantityValueAsString)) + .append(""); + Object stopPriceValue = getStopPrice(); + String stopPriceValueAsString = ""; + stopPriceValueAsString = stopPriceValue.toString(); + sb.append("stopPrice=").append(urlEncode(stopPriceValueAsString)).append(""); + Object strategyIdValue = getStrategyId(); + String strategyIdValueAsString = ""; + strategyIdValueAsString = strategyIdValue.toString(); + sb.append("strategyId=").append(urlEncode(strategyIdValueAsString)).append(""); + Object strategyTypeValue = getStrategyType(); + String strategyTypeValueAsString = ""; + strategyTypeValueAsString = strategyTypeValue.toString(); + sb.append("strategyType=").append(urlEncode(strategyTypeValueAsString)).append(""); + Object trailingDeltaValue = getTrailingDelta(); + String trailingDeltaValueAsString = ""; + trailingDeltaValueAsString = trailingDeltaValue.toString(); + sb.append("trailingDelta=").append(urlEncode(trailingDeltaValueAsString)).append(""); + Object trailingTimeValue = getTrailingTime(); + String trailingTimeValueAsString = ""; + trailingTimeValueAsString = trailingTimeValue.toString(); + sb.append("trailingTime=").append(urlEncode(trailingTimeValueAsString)).append(""); + Object usedSorValue = getUsedSor(); + String usedSorValueAsString = ""; + usedSorValueAsString = usedSorValue.toString(); + sb.append("usedSor=").append(urlEncode(usedSorValueAsString)).append(""); + Object workingFloorValue = getWorkingFloor(); + String workingFloorValueAsString = ""; + workingFloorValueAsString = workingFloorValue.toString(); + sb.append("workingFloor=").append(urlEncode(workingFloorValueAsString)).append(""); + Object pegPriceTypeValue = getPegPriceType(); + String pegPriceTypeValueAsString = ""; + pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + sb.append("pegPriceType=").append(urlEncode(pegPriceTypeValueAsString)).append(""); + Object pegOffsetTypeValue = getPegOffsetType(); + String pegOffsetTypeValueAsString = ""; + pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + sb.append("pegOffsetType=").append(urlEncode(pegOffsetTypeValueAsString)).append(""); + Object pegOffsetValueValue = getPegOffsetValue(); + String pegOffsetValueValueAsString = ""; + pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + sb.append("pegOffsetValue=").append(urlEncode(pegOffsetValueValueAsString)).append(""); + Object peggedPriceValue = getPeggedPrice(); + String peggedPriceValueAsString = ""; + peggedPriceValueAsString = peggedPriceValue.toString(); + sb.append("peggedPrice=").append(urlEncode(peggedPriceValueAsString)).append(""); + Object expiryReasonValue = getExpiryReason(); + String expiryReasonValueAsString = ""; + expiryReasonValueAsString = expiryReasonValue.toString(); + sb.append("expiryReason=").append(urlEncode(expiryReasonValueAsString)).append(""); return sb.toString(); } @@ -712,6 +1235,21 @@ private String toIndentedString(Object o) { openapiFields.add("workingTime"); openapiFields.add("fills"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -828,15 +1366,25 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("side").toString())); } - // ensure the optional json data is an array if present - if (jsonObj.get("fills") != null - && !jsonObj.get("fills").isJsonNull() - && !jsonObj.get("fills").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `fills` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("fills").toString())); + if (jsonObj.get("fills") != null && !jsonObj.get("fills").isJsonNull()) { + JsonArray jsonArrayfills = jsonObj.getAsJsonArray("fills"); + if (jsonArrayfills != null) { + // ensure the json data is an array + if (!jsonObj.get("fills").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `fills` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("fills").toString())); + } + + // validate the optional field `fills` (array) + for (int i = 0; i < jsonArrayfills.size(); i++) { + OrderCancelReplaceResponseNewOrderResponseFillsInner.validateJsonElement( + jsonArrayfills.get(i)); + } + ; + } } if ((jsonObj.get("selfTradePreventionMode") != null && !jsonObj.get("selfTradePreventionMode").isJsonNull()) @@ -847,6 +1395,71 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) + && !jsonObj.get("stopPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `stopPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("stopPrice").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseNewOrderResponseFillsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseNewOrderResponseFillsInner.java new file mode 100644 index 000000000..1d2771dbf --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseNewOrderResponseFillsInner.java @@ -0,0 +1,393 @@ +/* + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.rest.model; + +import com.binance.connector.client.spot.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** OrderCancelReplaceResponseNewOrderResponseFillsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OrderCancelReplaceResponseNewOrderResponseFillsInner { + public static final String SERIALIZED_NAME_PRICE = "price"; + + @SerializedName(SERIALIZED_NAME_PRICE) + @jakarta.annotation.Nullable + private String price; + + public static final String SERIALIZED_NAME_QTY = "qty"; + + @SerializedName(SERIALIZED_NAME_QTY) + @jakarta.annotation.Nullable + private String qty; + + public static final String SERIALIZED_NAME_COMMISSION = "commission"; + + @SerializedName(SERIALIZED_NAME_COMMISSION) + @jakarta.annotation.Nullable + private String commission; + + public static final String SERIALIZED_NAME_COMMISSION_ASSET = "commissionAsset"; + + @SerializedName(SERIALIZED_NAME_COMMISSION_ASSET) + @jakarta.annotation.Nullable + private String commissionAsset; + + public static final String SERIALIZED_NAME_TRADE_ID = "tradeId"; + + @SerializedName(SERIALIZED_NAME_TRADE_ID) + @jakarta.annotation.Nullable + private Long tradeId; + + public OrderCancelReplaceResponseNewOrderResponseFillsInner() {} + + public OrderCancelReplaceResponseNewOrderResponseFillsInner price( + @jakarta.annotation.Nullable String price) { + this.price = price; + return this; + } + + /** + * Get price + * + * @return price + */ + @jakarta.annotation.Nullable + public String getPrice() { + return price; + } + + public void setPrice(@jakarta.annotation.Nullable String price) { + this.price = price; + } + + public OrderCancelReplaceResponseNewOrderResponseFillsInner qty( + @jakarta.annotation.Nullable String qty) { + this.qty = qty; + return this; + } + + /** + * Get qty + * + * @return qty + */ + @jakarta.annotation.Nullable + public String getQty() { + return qty; + } + + public void setQty(@jakarta.annotation.Nullable String qty) { + this.qty = qty; + } + + public OrderCancelReplaceResponseNewOrderResponseFillsInner commission( + @jakarta.annotation.Nullable String commission) { + this.commission = commission; + return this; + } + + /** + * Get commission + * + * @return commission + */ + @jakarta.annotation.Nullable + public String getCommission() { + return commission; + } + + public void setCommission(@jakarta.annotation.Nullable String commission) { + this.commission = commission; + } + + public OrderCancelReplaceResponseNewOrderResponseFillsInner commissionAsset( + @jakarta.annotation.Nullable String commissionAsset) { + this.commissionAsset = commissionAsset; + return this; + } + + /** + * Get commissionAsset + * + * @return commissionAsset + */ + @jakarta.annotation.Nullable + public String getCommissionAsset() { + return commissionAsset; + } + + public void setCommissionAsset(@jakarta.annotation.Nullable String commissionAsset) { + this.commissionAsset = commissionAsset; + } + + public OrderCancelReplaceResponseNewOrderResponseFillsInner tradeId( + @jakarta.annotation.Nullable Long tradeId) { + this.tradeId = tradeId; + return this; + } + + /** + * Get tradeId + * + * @return tradeId + */ + @jakarta.annotation.Nullable + public Long getTradeId() { + return tradeId; + } + + public void setTradeId(@jakarta.annotation.Nullable Long tradeId) { + this.tradeId = tradeId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCancelReplaceResponseNewOrderResponseFillsInner + orderCancelReplaceResponseNewOrderResponseFillsInner = + (OrderCancelReplaceResponseNewOrderResponseFillsInner) o; + return Objects.equals( + this.price, orderCancelReplaceResponseNewOrderResponseFillsInner.price) + && Objects.equals( + this.qty, orderCancelReplaceResponseNewOrderResponseFillsInner.qty) + && Objects.equals( + this.commission, + orderCancelReplaceResponseNewOrderResponseFillsInner.commission) + && Objects.equals( + this.commissionAsset, + orderCancelReplaceResponseNewOrderResponseFillsInner.commissionAsset) + && Objects.equals( + this.tradeId, orderCancelReplaceResponseNewOrderResponseFillsInner.tradeId); + } + + @Override + public int hashCode() { + return Objects.hash(price, qty, commission, commissionAsset, tradeId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCancelReplaceResponseNewOrderResponseFillsInner {\n"); + sb.append(" price: ").append(toIndentedString(price)).append("\n"); + sb.append(" qty: ").append(toIndentedString(qty)).append("\n"); + sb.append(" commission: ").append(toIndentedString(commission)).append("\n"); + sb.append(" commissionAsset: ").append(toIndentedString(commissionAsset)).append("\n"); + sb.append(" tradeId: ").append(toIndentedString(tradeId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object priceValue = getPrice(); + String priceValueAsString = ""; + priceValueAsString = priceValue.toString(); + sb.append("price=").append(urlEncode(priceValueAsString)).append(""); + Object qtyValue = getQty(); + String qtyValueAsString = ""; + qtyValueAsString = qtyValue.toString(); + sb.append("qty=").append(urlEncode(qtyValueAsString)).append(""); + Object commissionValue = getCommission(); + String commissionValueAsString = ""; + commissionValueAsString = commissionValue.toString(); + sb.append("commission=").append(urlEncode(commissionValueAsString)).append(""); + Object commissionAssetValue = getCommissionAsset(); + String commissionAssetValueAsString = ""; + commissionAssetValueAsString = commissionAssetValue.toString(); + sb.append("commissionAsset=").append(urlEncode(commissionAssetValueAsString)).append(""); + Object tradeIdValue = getTradeId(); + String tradeIdValueAsString = ""; + tradeIdValueAsString = tradeIdValue.toString(); + sb.append("tradeId=").append(urlEncode(tradeIdValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("price"); + openapiFields.add("qty"); + openapiFields.add("commission"); + openapiFields.add("commissionAsset"); + openapiFields.add("tradeId"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * OrderCancelReplaceResponseNewOrderResponseFillsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCancelReplaceResponseNewOrderResponseFillsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " OrderCancelReplaceResponseNewOrderResponseFillsInner is not" + + " found in the empty JSON string", + OrderCancelReplaceResponseNewOrderResponseFillsInner + .openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) + && !jsonObj.get("price").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `price` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("price").toString())); + } + if ((jsonObj.get("qty") != null && !jsonObj.get("qty").isJsonNull()) + && !jsonObj.get("qty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `qty` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("qty").toString())); + } + if ((jsonObj.get("commission") != null && !jsonObj.get("commission").isJsonNull()) + && !jsonObj.get("commission").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `commission` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("commission").toString())); + } + if ((jsonObj.get("commissionAsset") != null && !jsonObj.get("commissionAsset").isJsonNull()) + && !jsonObj.get("commissionAsset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `commissionAsset` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("commissionAsset").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCancelReplaceResponseNewOrderResponseFillsInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'OrderCancelReplaceResponseNewOrderResponseFillsInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get( + OrderCancelReplaceResponseNewOrderResponseFillsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, + OrderCancelReplaceResponseNewOrderResponseFillsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCancelReplaceResponseNewOrderResponseFillsInner read( + JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCancelReplaceResponseNewOrderResponseFillsInner given an JSON + * string + * + * @param jsonString JSON string + * @return An instance of OrderCancelReplaceResponseNewOrderResponseFillsInner + * @throws IOException if the JSON string is invalid with respect to + * OrderCancelReplaceResponseNewOrderResponseFillsInner + */ + public static OrderCancelReplaceResponseNewOrderResponseFillsInner fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, OrderCancelReplaceResponseNewOrderResponseFillsInner.class); + } + + /** + * Convert an instance of OrderCancelReplaceResponseNewOrderResponseFillsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOcoRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOcoRequest.java index 3914a93a7..959d584e9 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOcoRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOcoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** OrderListOcoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOcoRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -253,7 +253,10 @@ public OrderListOcoRequest listClientOrderId( } /** - * Get listClientOrderId + * Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order + * list with the same `listClientOrderId` is accepted only when the previous one is + * filled or completely expired. `listClientOrderId` is distinct from the + * `aboveClientOrderId` and the `belowClientOrderId`. * * @return listClientOrderId */ @@ -293,7 +296,7 @@ public OrderListOcoRequest quantity(@jakarta.annotation.Nonnull Double quantity) } /** - * Get quantity + * Quantity for both orders of the order list. * * @return quantity */ @@ -336,7 +339,8 @@ public OrderListOcoRequest aboveClientOrderId( } /** - * Get aboveClientOrderId + * Arbitrary unique ID among open orders for the above order. Automatically generated if not + * sent. * * @return aboveClientOrderId */ @@ -355,7 +359,7 @@ public OrderListOcoRequest aboveIcebergQty(@jakarta.annotation.Nullable Long abo } /** - * Get aboveIcebergQty + * Note that this can only be used if `aboveTimeInForce` is `GTC`. * * @return aboveIcebergQty */ @@ -374,7 +378,8 @@ public OrderListOcoRequest abovePrice(@jakarta.annotation.Nullable Double aboveP } /** - * Get abovePrice + * Can be used if `aboveType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, + * or `TAKE_PROFIT_LIMIT` to specify the limit price. * * @return abovePrice */ @@ -394,7 +399,9 @@ public OrderListOcoRequest aboveStopPrice(@jakarta.annotation.Nullable Double ab } /** - * Get aboveStopPrice + * Can be used if `aboveType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, + * `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `aboveStopPrice` or + * `aboveTrailingDelta` or both, must be specified. * * @return aboveStopPrice */ @@ -415,7 +422,7 @@ public OrderListOcoRequest aboveTrailingDelta( } /** - * Get aboveTrailingDelta + * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) * * @return aboveTrailingDelta */ @@ -456,7 +463,7 @@ public OrderListOcoRequest aboveStrategyId(@jakarta.annotation.Nullable Long abo } /** - * Get aboveStrategyId + * Arbitrary numeric value identifying the above order within an order strategy. * * @return aboveStrategyId */ @@ -476,7 +483,8 @@ public OrderListOcoRequest aboveStrategyType( } /** - * Get aboveStrategyType + * Arbitrary numeric value identifying the above order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return aboveStrategyType */ @@ -581,7 +589,8 @@ public OrderListOcoRequest belowClientOrderId( } /** - * Get belowClientOrderId + * Arbitrary unique ID among open orders for the below order. Automatically generated if not + * sent. * * @return belowClientOrderId */ @@ -600,7 +609,7 @@ public OrderListOcoRequest belowIcebergQty(@jakarta.annotation.Nullable Long bel } /** - * Get belowIcebergQty + * Note that this can only be used if `belowTimeInForce` is `GTC`. * * @return belowIcebergQty */ @@ -619,7 +628,8 @@ public OrderListOcoRequest belowPrice(@jakarta.annotation.Nullable Double belowP } /** - * Get belowPrice + * Can be used if `belowType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, + * or `TAKE_PROFIT_LIMIT` to specify the limit price. * * @return belowPrice */ @@ -639,7 +649,9 @@ public OrderListOcoRequest belowStopPrice(@jakarta.annotation.Nullable Double be } /** - * Get belowStopPrice + * Can be used if `belowType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, + * `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `belowStopPrice` or + * `belowTrailingDelta` or both, must be specified. * * @return belowStopPrice */ @@ -660,7 +672,7 @@ public OrderListOcoRequest belowTrailingDelta( } /** - * Get belowTrailingDelta + * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) * * @return belowTrailingDelta */ @@ -701,7 +713,7 @@ public OrderListOcoRequest belowStrategyId(@jakarta.annotation.Nullable Long bel } /** - * Get belowStrategyId + * Arbitrary numeric value identifying the below order within an order strategy. * * @return belowStrategyId */ @@ -721,7 +733,8 @@ public OrderListOcoRequest belowStrategyType( } /** - * Get belowStrategyType + * Arbitrary numeric value identifying the below order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return belowStrategyType */ @@ -848,7 +861,8 @@ public OrderListOcoRequest recvWindow(@jakarta.annotation.Nullable Double recvWi } /** - * Get recvWindow + * The value cannot be greater than `60000`. Supports up to three decimal places of + * precision (e.g., 6000.346) so that microseconds may be specified. * * @return recvWindow */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOcoResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOcoResponse.java index e26c5a061..60f8ee47a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOcoResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOcoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** OrderListOcoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOcoResponse { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOcoResponseOrderReportsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOcoResponseOrderReportsInner.java index e9243f8d6..2acbee2ce 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOcoResponseOrderReportsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOcoResponseOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderListOcoResponseOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOcoResponseOrderReportsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOcoResponseOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOcoResponseOrdersInner.java index 514b1f83f..eca443ba3 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOcoResponseOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOcoResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderListOcoResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOcoResponseOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpoRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpoRequest.java index f4ab4b000..9e030a468 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpoRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** OrderListOpoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOpoRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -247,7 +247,10 @@ public OrderListOpoRequest listClientOrderId( } /** - * Get listClientOrderId + * Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order + * list with the same `listClientOrderId` is accepted only when the previous one is + * filled or completely expired. `listClientOrderId` is distinct from the + * `workingClientOrderId` and the `pendingClientOrderId`. * * @return listClientOrderId */ @@ -353,7 +356,8 @@ public OrderListOpoRequest workingClientOrderId( } /** - * Get workingClientOrderId + * Arbitrary unique ID among open orders for the working order. Automatically generated if not + * sent. * * @return workingClientOrderId */ @@ -372,7 +376,7 @@ public OrderListOpoRequest workingPrice(@jakarta.annotation.Nonnull Double worki } /** - * Get workingPrice + * Price for the working order. * * @return workingPrice */ @@ -393,7 +397,7 @@ public OrderListOpoRequest workingQuantity(@jakarta.annotation.Nonnull Double wo } /** - * Get workingQuantity + * Sets the quantity for the working order. * * @return workingQuantity */ @@ -415,7 +419,8 @@ public OrderListOpoRequest workingIcebergQty( } /** - * Get workingIcebergQty + * This can only be used if `workingTimeInForce` is `GTC`, or if + * `workingType` is `LIMIT_MAKER`. * * @return workingIcebergQty */ @@ -458,7 +463,7 @@ public OrderListOpoRequest workingStrategyId( } /** - * Get workingStrategyId + * Arbitrary numeric value identifying the working order within an order strategy. * * @return workingStrategyId */ @@ -478,7 +483,8 @@ public OrderListOpoRequest workingStrategyType( } /** - * Get workingStrategyType + * Arbitrary numeric value identifying the working order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return workingStrategyType */ @@ -605,7 +611,8 @@ public OrderListOpoRequest pendingClientOrderId( } /** - * Get pendingClientOrderId + * Arbitrary unique ID among open orders for the pending order. Automatically generated if not + * sent. * * @return pendingClientOrderId */ @@ -624,7 +631,7 @@ public OrderListOpoRequest pendingPrice(@jakarta.annotation.Nullable Double pend } /** - * Get pendingPrice + * Price for the pending order. * * @return pendingPrice */ @@ -645,7 +652,7 @@ public OrderListOpoRequest pendingStopPrice( } /** - * Get pendingStopPrice + * Stop price for the pending order. * * @return pendingStopPrice */ @@ -666,7 +673,7 @@ public OrderListOpoRequest pendingTrailingDelta( } /** - * Get pendingTrailingDelta + * Trailing delta for the pending order. * * @return pendingTrailingDelta */ @@ -687,7 +694,8 @@ public OrderListOpoRequest pendingIcebergQty( } /** - * Get pendingIcebergQty + * This can only be used if `pendingTimeInForce` is `GTC` or if + * `pendingType` is `LIMIT_MAKER`. * * @return pendingIcebergQty */ @@ -730,7 +738,7 @@ public OrderListOpoRequest pendingStrategyId( } /** - * Get pendingStrategyId + * Arbitrary numeric value identifying the pending order within an order strategy. * * @return pendingStrategyId */ @@ -750,7 +758,8 @@ public OrderListOpoRequest pendingStrategyType( } /** - * Get pendingStrategyType + * Arbitrary numeric value identifying the pending order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return pendingStrategyType */ @@ -834,12 +843,14 @@ public OrderListOpoRequest recvWindow(@jakarta.annotation.Nullable Double recvWi } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpoResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpoResponse.java index e54364c86..5a5fc65b0 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpoResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** OrderListOpoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOpoResponse { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpoResponseOrderReportsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpoResponseOrderReportsInner.java index ea0c514ba..f3c2de449 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpoResponseOrderReportsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpoResponseOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderListOpoResponseOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOpoResponseOrderReportsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -133,6 +133,96 @@ public class OrderListOpoResponseOrderReportsInner { @jakarta.annotation.Nullable private String origQty; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + + @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @jakarta.annotation.Nullable + private String stopPrice; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OrderListOpoResponseOrderReportsInner() {} public OrderListOpoResponseOrderReportsInner symbol( @@ -453,6 +543,306 @@ public void setOrigQty(@jakarta.annotation.Nullable String origQty) { this.origQty = origQty; } + public OrderListOpoResponseOrderReportsInner icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderListOpoResponseOrderReportsInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderListOpoResponseOrderReportsInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public OrderListOpoResponseOrderReportsInner stopPrice( + @jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + /** + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. + * + * @return stopPrice + */ + @jakarta.annotation.Nullable + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + } + + public OrderListOpoResponseOrderReportsInner strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderListOpoResponseOrderReportsInner strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderListOpoResponseOrderReportsInner trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderListOpoResponseOrderReportsInner trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderListOpoResponseOrderReportsInner usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderListOpoResponseOrderReportsInner workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderListOpoResponseOrderReportsInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderListOpoResponseOrderReportsInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderListOpoResponseOrderReportsInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderListOpoResponseOrderReportsInner peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderListOpoResponseOrderReportsInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -490,7 +880,35 @@ public boolean equals(Object o) { && Objects.equals( this.selfTradePreventionMode, orderListOpoResponseOrderReportsInner.selfTradePreventionMode) - && Objects.equals(this.origQty, orderListOpoResponseOrderReportsInner.origQty); + && Objects.equals(this.origQty, orderListOpoResponseOrderReportsInner.origQty) + && Objects.equals(this.icebergQty, orderListOpoResponseOrderReportsInner.icebergQty) + && Objects.equals( + this.preventedMatchId, + orderListOpoResponseOrderReportsInner.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + orderListOpoResponseOrderReportsInner.preventedQuantity) + && Objects.equals(this.stopPrice, orderListOpoResponseOrderReportsInner.stopPrice) + && Objects.equals(this.strategyId, orderListOpoResponseOrderReportsInner.strategyId) + && Objects.equals( + this.strategyType, orderListOpoResponseOrderReportsInner.strategyType) + && Objects.equals( + this.trailingDelta, orderListOpoResponseOrderReportsInner.trailingDelta) + && Objects.equals( + this.trailingTime, orderListOpoResponseOrderReportsInner.trailingTime) + && Objects.equals(this.usedSor, orderListOpoResponseOrderReportsInner.usedSor) + && Objects.equals( + this.workingFloor, orderListOpoResponseOrderReportsInner.workingFloor) + && Objects.equals( + this.pegPriceType, orderListOpoResponseOrderReportsInner.pegPriceType) + && Objects.equals( + this.pegOffsetType, orderListOpoResponseOrderReportsInner.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, orderListOpoResponseOrderReportsInner.pegOffsetValue) + && Objects.equals( + this.peggedPrice, orderListOpoResponseOrderReportsInner.peggedPrice) + && Objects.equals( + this.expiryReason, orderListOpoResponseOrderReportsInner.expiryReason); } @Override @@ -511,7 +929,22 @@ public int hashCode() { side, workingTime, selfTradePreventionMode, - origQty); + origQty, + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -538,6 +971,21 @@ public String toString() { .append(toIndentedString(selfTradePreventionMode)) .append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -615,6 +1063,68 @@ public String toUrlQueryString() { String origQtyValueAsString = ""; origQtyValueAsString = origQtyValue.toString(); sb.append("origQty=").append(urlEncode(origQtyValueAsString)).append(""); + Object icebergQtyValue = getIcebergQty(); + String icebergQtyValueAsString = ""; + icebergQtyValueAsString = icebergQtyValue.toString(); + sb.append("icebergQty=").append(urlEncode(icebergQtyValueAsString)).append(""); + Object preventedMatchIdValue = getPreventedMatchId(); + String preventedMatchIdValueAsString = ""; + preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + sb.append("preventedMatchId=").append(urlEncode(preventedMatchIdValueAsString)).append(""); + Object preventedQuantityValue = getPreventedQuantity(); + String preventedQuantityValueAsString = ""; + preventedQuantityValueAsString = preventedQuantityValue.toString(); + sb.append("preventedQuantity=") + .append(urlEncode(preventedQuantityValueAsString)) + .append(""); + Object stopPriceValue = getStopPrice(); + String stopPriceValueAsString = ""; + stopPriceValueAsString = stopPriceValue.toString(); + sb.append("stopPrice=").append(urlEncode(stopPriceValueAsString)).append(""); + Object strategyIdValue = getStrategyId(); + String strategyIdValueAsString = ""; + strategyIdValueAsString = strategyIdValue.toString(); + sb.append("strategyId=").append(urlEncode(strategyIdValueAsString)).append(""); + Object strategyTypeValue = getStrategyType(); + String strategyTypeValueAsString = ""; + strategyTypeValueAsString = strategyTypeValue.toString(); + sb.append("strategyType=").append(urlEncode(strategyTypeValueAsString)).append(""); + Object trailingDeltaValue = getTrailingDelta(); + String trailingDeltaValueAsString = ""; + trailingDeltaValueAsString = trailingDeltaValue.toString(); + sb.append("trailingDelta=").append(urlEncode(trailingDeltaValueAsString)).append(""); + Object trailingTimeValue = getTrailingTime(); + String trailingTimeValueAsString = ""; + trailingTimeValueAsString = trailingTimeValue.toString(); + sb.append("trailingTime=").append(urlEncode(trailingTimeValueAsString)).append(""); + Object usedSorValue = getUsedSor(); + String usedSorValueAsString = ""; + usedSorValueAsString = usedSorValue.toString(); + sb.append("usedSor=").append(urlEncode(usedSorValueAsString)).append(""); + Object workingFloorValue = getWorkingFloor(); + String workingFloorValueAsString = ""; + workingFloorValueAsString = workingFloorValue.toString(); + sb.append("workingFloor=").append(urlEncode(workingFloorValueAsString)).append(""); + Object pegPriceTypeValue = getPegPriceType(); + String pegPriceTypeValueAsString = ""; + pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + sb.append("pegPriceType=").append(urlEncode(pegPriceTypeValueAsString)).append(""); + Object pegOffsetTypeValue = getPegOffsetType(); + String pegOffsetTypeValueAsString = ""; + pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + sb.append("pegOffsetType=").append(urlEncode(pegOffsetTypeValueAsString)).append(""); + Object pegOffsetValueValue = getPegOffsetValue(); + String pegOffsetValueValueAsString = ""; + pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + sb.append("pegOffsetValue=").append(urlEncode(pegOffsetValueValueAsString)).append(""); + Object peggedPriceValue = getPeggedPrice(); + String peggedPriceValueAsString = ""; + peggedPriceValueAsString = peggedPriceValue.toString(); + sb.append("peggedPrice=").append(urlEncode(peggedPriceValueAsString)).append(""); + Object expiryReasonValue = getExpiryReason(); + String expiryReasonValueAsString = ""; + expiryReasonValueAsString = expiryReasonValue.toString(); + sb.append("expiryReason=").append(urlEncode(expiryReasonValueAsString)).append(""); return sb.toString(); } @@ -659,6 +1169,21 @@ private String toIndentedString(Object o) { openapiFields.add("workingTime"); openapiFields.add("selfTradePreventionMode"); openapiFields.add("origQty"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -783,6 +1308,71 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("origQty").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) + && !jsonObj.get("stopPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `stopPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("stopPrice").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpoResponseOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpoResponseOrdersInner.java index 4861c0453..28cf1f010 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpoResponseOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpoResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderListOpoResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOpoResponseOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpocoRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpocoRequest.java index fab9e5319..54b7b2131 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpocoRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpocoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** OrderListOpocoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOpocoRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -333,7 +333,10 @@ public OrderListOpocoRequest listClientOrderId( } /** - * Get listClientOrderId + * Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order + * list with the same `listClientOrderId` is accepted only when the previous one is + * filled or completely expired. `listClientOrderId` is distinct from the + * `workingClientOrderId` and the `pendingClientOrderId`. * * @return listClientOrderId */ @@ -439,7 +442,8 @@ public OrderListOpocoRequest workingClientOrderId( } /** - * Get workingClientOrderId + * Arbitrary unique ID among open orders for the working order. Automatically generated if not + * sent. * * @return workingClientOrderId */ @@ -458,7 +462,7 @@ public OrderListOpocoRequest workingPrice(@jakarta.annotation.Nonnull Double wor } /** - * Get workingPrice + * Price for the working order. * * @return workingPrice */ @@ -480,7 +484,7 @@ public OrderListOpocoRequest workingQuantity( } /** - * Get workingQuantity + * Sets the quantity for the working order. * * @return workingQuantity */ @@ -502,7 +506,8 @@ public OrderListOpocoRequest workingIcebergQty( } /** - * Get workingIcebergQty + * This can only be used if `workingTimeInForce` is `GTC`, or if + * `workingType` is `LIMIT_MAKER`. * * @return workingIcebergQty */ @@ -545,7 +550,7 @@ public OrderListOpocoRequest workingStrategyId( } /** - * Get workingStrategyId + * Arbitrary numeric value identifying the working order within an order strategy. * * @return workingStrategyId */ @@ -565,7 +570,8 @@ public OrderListOpocoRequest workingStrategyType( } /** - * Get workingStrategyType + * Arbitrary numeric value identifying the working order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return workingStrategyType */ @@ -629,7 +635,7 @@ public OrderListOpocoRequest workingPegOffsetValue( } /** - * Get workingPegOffsetValue + * Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) * * @return workingPegOffsetValue */ @@ -693,7 +699,8 @@ public OrderListOpocoRequest pendingAboveClientOrderId( } /** - * Get pendingAboveClientOrderId + * Arbitrary unique ID among open orders for the pending above order. Automatically generated if + * not sent. * * @return pendingAboveClientOrderId */ @@ -714,7 +721,8 @@ public OrderListOpocoRequest pendingAbovePrice( } /** - * Get pendingAbovePrice + * Can be used if `pendingAboveType` is `STOP_LOSS_LIMIT`, + * `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. * * @return pendingAbovePrice */ @@ -735,7 +743,8 @@ public OrderListOpocoRequest pendingAboveStopPrice( } /** - * Get pendingAboveStopPrice + * Can be used if `pendingAboveType` is `STOP_LOSS`, + * `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. * * @return pendingAboveStopPrice */ @@ -757,7 +766,7 @@ public OrderListOpocoRequest pendingAboveTrailingDelta( } /** - * Get pendingAboveTrailingDelta + * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) * * @return pendingAboveTrailingDelta */ @@ -779,7 +788,8 @@ public OrderListOpocoRequest pendingAboveIcebergQty( } /** - * Get pendingAboveIcebergQty + * This can only be used if `pendingAboveTimeInForce` is `GTC` or + * `pendingAboveType` is `LIMIT_MAKER`. * * @return pendingAboveIcebergQty */ @@ -823,7 +833,7 @@ public OrderListOpocoRequest pendingAboveStrategyId( } /** - * Get pendingAboveStrategyId + * Arbitrary numeric value identifying the pending above order within an order strategy. * * @return pendingAboveStrategyId */ @@ -844,7 +854,8 @@ public OrderListOpocoRequest pendingAboveStrategyType( } /** - * Get pendingAboveStrategyType + * Arbitrary numeric value identifying the pending above order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return pendingAboveStrategyType */ @@ -909,7 +920,7 @@ public OrderListOpocoRequest pendingAbovePegOffsetValue( } /** - * Get pendingAbovePegOffsetValue + * Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) * * @return pendingAbovePegOffsetValue */ @@ -952,7 +963,8 @@ public OrderListOpocoRequest pendingBelowClientOrderId( } /** - * Get pendingBelowClientOrderId + * Arbitrary unique ID among open orders for the pending below order. Automatically generated if + * not sent. * * @return pendingBelowClientOrderId */ @@ -973,7 +985,8 @@ public OrderListOpocoRequest pendingBelowPrice( } /** - * Get pendingBelowPrice + * Can be used if `pendingBelowType` is `STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT` to specify the limit price. * * @return pendingBelowPrice */ @@ -994,7 +1007,10 @@ public OrderListOpocoRequest pendingBelowStopPrice( } /** - * Get pendingBelowStopPrice + * Can be used if `pendingBelowType` is `STOP_LOSS`, + * `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either + * `pendingBelowStopPrice` or `pendingBelowTrailingDelta` or both, must be + * specified. * * @return pendingBelowStopPrice */ @@ -1016,7 +1032,7 @@ public OrderListOpocoRequest pendingBelowTrailingDelta( } /** - * Get pendingBelowTrailingDelta + * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) * * @return pendingBelowTrailingDelta */ @@ -1038,7 +1054,8 @@ public OrderListOpocoRequest pendingBelowIcebergQty( } /** - * Get pendingBelowIcebergQty + * This can only be used if `pendingBelowTimeInForce` is `GTC` or + * `pendingBelowType` is `LIMIT_MAKER`. * * @return pendingBelowIcebergQty */ @@ -1082,7 +1099,7 @@ public OrderListOpocoRequest pendingBelowStrategyId( } /** - * Get pendingBelowStrategyId + * Arbitrary numeric value identifying the pending below order within an order strategy. * * @return pendingBelowStrategyId */ @@ -1103,7 +1120,8 @@ public OrderListOpocoRequest pendingBelowStrategyType( } /** - * Get pendingBelowStrategyType + * Arbitrary numeric value identifying the pending below order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return pendingBelowStrategyType */ @@ -1188,7 +1206,8 @@ public OrderListOpocoRequest recvWindow(@jakarta.annotation.Nullable Double recv } /** - * Get recvWindow + * The value cannot be greater than `60000`. Supports up to three decimal places of + * precision (e.g., 6000.346) so that microseconds may be specified. * * @return recvWindow */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpocoResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpocoResponse.java index a2065fb6c..6d09d4025 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpocoResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpocoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** OrderListOpocoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOpocoResponse { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpocoResponseOrderReportsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpocoResponseOrderReportsInner.java index bc3d0ce1b..3a76d6b9e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpocoResponseOrderReportsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpocoResponseOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderListOpocoResponseOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOpocoResponseOrderReportsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -127,17 +127,101 @@ public class OrderListOpocoResponseOrderReportsInner { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; + + @SerializedName(SERIALIZED_NAME_ORIG_QTY) + @jakarta.annotation.Nullable + private String origQty; + + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; @SerializedName(SERIALIZED_NAME_STOP_PRICE) @jakarta.annotation.Nullable private String stopPrice; - public static final String SERIALIZED_NAME_ORIG_QTY = "origQty"; + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; - @SerializedName(SERIALIZED_NAME_ORIG_QTY) + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) @jakarta.annotation.Nullable - private String origQty; + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; public OrderListOpocoResponseOrderReportsInner() {} @@ -440,6 +524,86 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OrderListOpocoResponseOrderReportsInner origQty( + @jakarta.annotation.Nullable String origQty) { + this.origQty = origQty; + return this; + } + + /** + * Get origQty + * + * @return origQty + */ + @jakarta.annotation.Nullable + public String getOrigQty() { + return origQty; + } + + public void setOrigQty(@jakarta.annotation.Nullable String origQty) { + this.origQty = origQty; + } + + public OrderListOpocoResponseOrderReportsInner icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderListOpocoResponseOrderReportsInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderListOpocoResponseOrderReportsInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + public OrderListOpocoResponseOrderReportsInner stopPrice( @jakarta.annotation.Nullable String stopPrice) { this.stopPrice = stopPrice; @@ -447,7 +611,7 @@ public OrderListOpocoResponseOrderReportsInner stopPrice( } /** - * Get stopPrice + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. * * @return stopPrice */ @@ -460,24 +624,224 @@ public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { this.stopPrice = stopPrice; } - public OrderListOpocoResponseOrderReportsInner origQty( - @jakarta.annotation.Nullable String origQty) { - this.origQty = origQty; + public OrderListOpocoResponseOrderReportsInner strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; return this; } /** - * Get origQty + * Appears only if the strategyId parameter was provided upon order placement. * - * @return origQty + * @return strategyId */ @jakarta.annotation.Nullable - public String getOrigQty() { - return origQty; + public Long getStrategyId() { + return strategyId; } - public void setOrigQty(@jakarta.annotation.Nullable String origQty) { - this.origQty = origQty; + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderListOpocoResponseOrderReportsInner strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderListOpocoResponseOrderReportsInner trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderListOpocoResponseOrderReportsInner trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderListOpocoResponseOrderReportsInner usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderListOpocoResponseOrderReportsInner workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderListOpocoResponseOrderReportsInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderListOpocoResponseOrderReportsInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderListOpocoResponseOrderReportsInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderListOpocoResponseOrderReportsInner peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderListOpocoResponseOrderReportsInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; } @Override @@ -517,8 +881,37 @@ public boolean equals(Object o) { && Objects.equals( this.selfTradePreventionMode, orderListOpocoResponseOrderReportsInner.selfTradePreventionMode) + && Objects.equals(this.origQty, orderListOpocoResponseOrderReportsInner.origQty) + && Objects.equals( + this.icebergQty, orderListOpocoResponseOrderReportsInner.icebergQty) + && Objects.equals( + this.preventedMatchId, + orderListOpocoResponseOrderReportsInner.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + orderListOpocoResponseOrderReportsInner.preventedQuantity) && Objects.equals(this.stopPrice, orderListOpocoResponseOrderReportsInner.stopPrice) - && Objects.equals(this.origQty, orderListOpocoResponseOrderReportsInner.origQty); + && Objects.equals( + this.strategyId, orderListOpocoResponseOrderReportsInner.strategyId) + && Objects.equals( + this.strategyType, orderListOpocoResponseOrderReportsInner.strategyType) + && Objects.equals( + this.trailingDelta, orderListOpocoResponseOrderReportsInner.trailingDelta) + && Objects.equals( + this.trailingTime, orderListOpocoResponseOrderReportsInner.trailingTime) + && Objects.equals(this.usedSor, orderListOpocoResponseOrderReportsInner.usedSor) + && Objects.equals( + this.workingFloor, orderListOpocoResponseOrderReportsInner.workingFloor) + && Objects.equals( + this.pegPriceType, orderListOpocoResponseOrderReportsInner.pegPriceType) + && Objects.equals( + this.pegOffsetType, orderListOpocoResponseOrderReportsInner.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, orderListOpocoResponseOrderReportsInner.pegOffsetValue) + && Objects.equals( + this.peggedPrice, orderListOpocoResponseOrderReportsInner.peggedPrice) + && Objects.equals( + this.expiryReason, orderListOpocoResponseOrderReportsInner.expiryReason); } @Override @@ -539,8 +932,22 @@ public int hashCode() { side, workingTime, selfTradePreventionMode, + origQty, + icebergQty, + preventedMatchId, + preventedQuantity, stopPrice, - origQty); + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -566,8 +973,22 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); - sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -641,14 +1062,72 @@ public String toUrlQueryString() { sb.append("selfTradePreventionMode=") .append(urlEncode(selfTradePreventionModeValueAsString)) .append(""); - Object stopPriceValue = getStopPrice(); - String stopPriceValueAsString = ""; - stopPriceValueAsString = stopPriceValue.toString(); - sb.append("stopPrice=").append(urlEncode(stopPriceValueAsString)).append(""); Object origQtyValue = getOrigQty(); String origQtyValueAsString = ""; origQtyValueAsString = origQtyValue.toString(); sb.append("origQty=").append(urlEncode(origQtyValueAsString)).append(""); + Object icebergQtyValue = getIcebergQty(); + String icebergQtyValueAsString = ""; + icebergQtyValueAsString = icebergQtyValue.toString(); + sb.append("icebergQty=").append(urlEncode(icebergQtyValueAsString)).append(""); + Object preventedMatchIdValue = getPreventedMatchId(); + String preventedMatchIdValueAsString = ""; + preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + sb.append("preventedMatchId=").append(urlEncode(preventedMatchIdValueAsString)).append(""); + Object preventedQuantityValue = getPreventedQuantity(); + String preventedQuantityValueAsString = ""; + preventedQuantityValueAsString = preventedQuantityValue.toString(); + sb.append("preventedQuantity=") + .append(urlEncode(preventedQuantityValueAsString)) + .append(""); + Object stopPriceValue = getStopPrice(); + String stopPriceValueAsString = ""; + stopPriceValueAsString = stopPriceValue.toString(); + sb.append("stopPrice=").append(urlEncode(stopPriceValueAsString)).append(""); + Object strategyIdValue = getStrategyId(); + String strategyIdValueAsString = ""; + strategyIdValueAsString = strategyIdValue.toString(); + sb.append("strategyId=").append(urlEncode(strategyIdValueAsString)).append(""); + Object strategyTypeValue = getStrategyType(); + String strategyTypeValueAsString = ""; + strategyTypeValueAsString = strategyTypeValue.toString(); + sb.append("strategyType=").append(urlEncode(strategyTypeValueAsString)).append(""); + Object trailingDeltaValue = getTrailingDelta(); + String trailingDeltaValueAsString = ""; + trailingDeltaValueAsString = trailingDeltaValue.toString(); + sb.append("trailingDelta=").append(urlEncode(trailingDeltaValueAsString)).append(""); + Object trailingTimeValue = getTrailingTime(); + String trailingTimeValueAsString = ""; + trailingTimeValueAsString = trailingTimeValue.toString(); + sb.append("trailingTime=").append(urlEncode(trailingTimeValueAsString)).append(""); + Object usedSorValue = getUsedSor(); + String usedSorValueAsString = ""; + usedSorValueAsString = usedSorValue.toString(); + sb.append("usedSor=").append(urlEncode(usedSorValueAsString)).append(""); + Object workingFloorValue = getWorkingFloor(); + String workingFloorValueAsString = ""; + workingFloorValueAsString = workingFloorValue.toString(); + sb.append("workingFloor=").append(urlEncode(workingFloorValueAsString)).append(""); + Object pegPriceTypeValue = getPegPriceType(); + String pegPriceTypeValueAsString = ""; + pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + sb.append("pegPriceType=").append(urlEncode(pegPriceTypeValueAsString)).append(""); + Object pegOffsetTypeValue = getPegOffsetType(); + String pegOffsetTypeValueAsString = ""; + pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + sb.append("pegOffsetType=").append(urlEncode(pegOffsetTypeValueAsString)).append(""); + Object pegOffsetValueValue = getPegOffsetValue(); + String pegOffsetValueValueAsString = ""; + pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + sb.append("pegOffsetValue=").append(urlEncode(pegOffsetValueValueAsString)).append(""); + Object peggedPriceValue = getPeggedPrice(); + String peggedPriceValueAsString = ""; + peggedPriceValueAsString = peggedPriceValue.toString(); + sb.append("peggedPrice=").append(urlEncode(peggedPriceValueAsString)).append(""); + Object expiryReasonValue = getExpiryReason(); + String expiryReasonValueAsString = ""; + expiryReasonValueAsString = expiryReasonValue.toString(); + sb.append("expiryReason=").append(urlEncode(expiryReasonValueAsString)).append(""); return sb.toString(); } @@ -692,8 +1171,22 @@ private String toIndentedString(Object o) { openapiFields.add("side"); openapiFields.add("workingTime"); openapiFields.add("selfTradePreventionMode"); - openapiFields.add("stopPrice"); openapiFields.add("origQty"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -811,6 +1304,31 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) + && !jsonObj.get("origQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `origQty` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("origQty").toString())); + } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) && !jsonObj.get("stopPrice").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -819,13 +1337,45 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("stopPrice").toString())); } - if ((jsonObj.get("origQty") != null && !jsonObj.get("origQty").isJsonNull()) - && !jsonObj.get("origQty").isJsonPrimitive()) { + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `origQty` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("origQty").toString())); + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); } } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpocoResponseOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpocoResponseOrdersInner.java index daa036c80..ebfa4f911 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpocoResponseOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOpocoResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderListOpocoResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOpocoResponseOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtoRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtoRequest.java index d1d645416..9d41272af 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtoRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** OrderListOtoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOtoRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -116,6 +116,12 @@ public class OrderListOtoRequest { @jakarta.annotation.Nullable private Integer workingStrategyType; + public static final String SERIALIZED_NAME_PENDING_TYPE = "pendingType"; + + @SerializedName(SERIALIZED_NAME_PENDING_TYPE) + @jakarta.annotation.Nonnull + private PendingType pendingType; + public static final String SERIALIZED_NAME_WORKING_PEG_PRICE_TYPE = "workingPegPriceType"; @SerializedName(SERIALIZED_NAME_WORKING_PEG_PRICE_TYPE) @@ -134,12 +140,6 @@ public class OrderListOtoRequest { @jakarta.annotation.Nullable private Integer workingPegOffsetValue; - public static final String SERIALIZED_NAME_PENDING_TYPE = "pendingType"; - - @SerializedName(SERIALIZED_NAME_PENDING_TYPE) - @jakarta.annotation.Nonnull - private PendingType pendingType; - public static final String SERIALIZED_NAME_PENDING_SIDE = "pendingSide"; @SerializedName(SERIALIZED_NAME_PENDING_SIDE) @@ -253,7 +253,10 @@ public OrderListOtoRequest listClientOrderId( } /** - * Get listClientOrderId + * Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order + * list with the same `listClientOrderId` is accepted only when the previous one is + * filled or completely expired. `listClientOrderId` is distinct from the + * `workingClientOrderId` and the `pendingClientOrderId`. * * @return listClientOrderId */ @@ -359,7 +362,8 @@ public OrderListOtoRequest workingClientOrderId( } /** - * Get workingClientOrderId + * Arbitrary unique ID among open orders for the working order. Automatically generated if not + * sent. * * @return workingClientOrderId */ @@ -399,7 +403,7 @@ public OrderListOtoRequest workingQuantity(@jakarta.annotation.Nonnull Double wo } /** - * Get workingQuantity + * Sets the quantity for the working order. * * @return workingQuantity */ @@ -421,7 +425,8 @@ public OrderListOtoRequest workingIcebergQty( } /** - * Get workingIcebergQty + * This can only be used if `workingTimeInForce` is `GTC`, or if + * `workingType` is `LIMIT_MAKER`. * * @return workingIcebergQty */ @@ -464,7 +469,7 @@ public OrderListOtoRequest workingStrategyId( } /** - * Get workingStrategyId + * Arbitrary numeric value identifying the working order within an order strategy. * * @return workingStrategyId */ @@ -484,7 +489,8 @@ public OrderListOtoRequest workingStrategyType( } /** - * Get workingStrategyType + * Arbitrary numeric value identifying the working order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return workingStrategyType */ @@ -497,6 +503,27 @@ public void setWorkingStrategyType(@jakarta.annotation.Nullable Integer workingS this.workingStrategyType = workingStrategyType; } + public OrderListOtoRequest pendingType(@jakarta.annotation.Nonnull PendingType pendingType) { + this.pendingType = pendingType; + return this; + } + + /** + * Get pendingType + * + * @return pendingType + */ + @jakarta.annotation.Nonnull + @NotNull + @Valid + public PendingType getPendingType() { + return pendingType; + } + + public void setPendingType(@jakarta.annotation.Nonnull PendingType pendingType) { + this.pendingType = pendingType; + } + public OrderListOtoRequest workingPegPriceType( @jakarta.annotation.Nullable WorkingPegPriceType workingPegPriceType) { this.workingPegPriceType = workingPegPriceType; @@ -562,27 +589,6 @@ public void setWorkingPegOffsetValue( this.workingPegOffsetValue = workingPegOffsetValue; } - public OrderListOtoRequest pendingType(@jakarta.annotation.Nonnull PendingType pendingType) { - this.pendingType = pendingType; - return this; - } - - /** - * Get pendingType - * - * @return pendingType - */ - @jakarta.annotation.Nonnull - @NotNull - @Valid - public PendingType getPendingType() { - return pendingType; - } - - public void setPendingType(@jakarta.annotation.Nonnull PendingType pendingType) { - this.pendingType = pendingType; - } - public OrderListOtoRequest pendingSide(@jakarta.annotation.Nonnull PendingSide pendingSide) { this.pendingSide = pendingSide; return this; @@ -611,7 +617,8 @@ public OrderListOtoRequest pendingClientOrderId( } /** - * Get pendingClientOrderId + * Arbitrary unique ID among open orders for the pending order. Automatically generated if not + * sent. * * @return pendingClientOrderId */ @@ -692,7 +699,7 @@ public OrderListOtoRequest pendingQuantity(@jakarta.annotation.Nonnull Double pe } /** - * Get pendingQuantity + * Sets the quantity for the pending order. * * @return pendingQuantity */ @@ -714,7 +721,8 @@ public OrderListOtoRequest pendingIcebergQty( } /** - * Get pendingIcebergQty + * This can only be used if `pendingTimeInForce` is `GTC` or if + * `pendingType` is `LIMIT_MAKER`. * * @return pendingIcebergQty */ @@ -757,7 +765,7 @@ public OrderListOtoRequest pendingStrategyId( } /** - * Get pendingStrategyId + * Arbitrary numeric value identifying the pending order within an order strategy. * * @return pendingStrategyId */ @@ -777,7 +785,8 @@ public OrderListOtoRequest pendingStrategyType( } /** - * Get pendingStrategyType + * Arbitrary numeric value identifying the pending order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return pendingStrategyType */ @@ -861,7 +870,8 @@ public OrderListOtoRequest recvWindow(@jakarta.annotation.Nullable Double recvWi } /** - * Get recvWindow + * The value cannot be greater than `60000`. Supports up to three decimal places of + * precision (e.g., 6000.346) so that microseconds may be specified. * * @return recvWindow */ @@ -899,12 +909,12 @@ public boolean equals(Object o) { && Objects.equals(this.workingTimeInForce, orderListOtoRequest.workingTimeInForce) && Objects.equals(this.workingStrategyId, orderListOtoRequest.workingStrategyId) && Objects.equals(this.workingStrategyType, orderListOtoRequest.workingStrategyType) + && Objects.equals(this.pendingType, orderListOtoRequest.pendingType) && Objects.equals(this.workingPegPriceType, orderListOtoRequest.workingPegPriceType) && Objects.equals( this.workingPegOffsetType, orderListOtoRequest.workingPegOffsetType) && Objects.equals( this.workingPegOffsetValue, orderListOtoRequest.workingPegOffsetValue) - && Objects.equals(this.pendingType, orderListOtoRequest.pendingType) && Objects.equals(this.pendingSide, orderListOtoRequest.pendingSide) && Objects.equals( this.pendingClientOrderId, orderListOtoRequest.pendingClientOrderId) @@ -941,10 +951,10 @@ public int hashCode() { workingTimeInForce, workingStrategyId, workingStrategyType, + pendingType, workingPegPriceType, workingPegOffsetType, workingPegOffsetValue, - pendingType, pendingSide, pendingClientOrderId, pendingPrice, @@ -986,6 +996,7 @@ public String toString() { sb.append(" workingStrategyType: ") .append(toIndentedString(workingStrategyType)) .append("\n"); + sb.append(" pendingType: ").append(toIndentedString(pendingType)).append("\n"); sb.append(" workingPegPriceType: ") .append(toIndentedString(workingPegPriceType)) .append("\n"); @@ -995,7 +1006,6 @@ public String toString() { sb.append(" workingPegOffsetValue: ") .append(toIndentedString(workingPegOffsetValue)) .append("\n"); - sb.append(" pendingType: ").append(toIndentedString(pendingType)).append("\n"); sb.append(" pendingSide: ").append(toIndentedString(pendingSide)).append("\n"); sb.append(" pendingClientOrderId: ") .append(toIndentedString(pendingClientOrderId)) @@ -1097,6 +1107,10 @@ public String toUrlQueryString() { sb.append("workingStrategyType=") .append(urlEncode(workingStrategyTypeValueAsString)) .append(""); + Object pendingTypeValue = getPendingType(); + String pendingTypeValueAsString = ""; + pendingTypeValueAsString = pendingTypeValue.toString(); + sb.append("pendingType=").append(urlEncode(pendingTypeValueAsString)).append(""); Object workingPegPriceTypeValue = getWorkingPegPriceType(); String workingPegPriceTypeValueAsString = ""; workingPegPriceTypeValueAsString = workingPegPriceTypeValue.toString(); @@ -1115,10 +1129,6 @@ public String toUrlQueryString() { sb.append("workingPegOffsetValue=") .append(urlEncode(workingPegOffsetValueValueAsString)) .append(""); - Object pendingTypeValue = getPendingType(); - String pendingTypeValueAsString = ""; - pendingTypeValueAsString = pendingTypeValue.toString(); - sb.append("pendingType=").append(urlEncode(pendingTypeValueAsString)).append(""); Object pendingSideValue = getPendingSide(); String pendingSideValueAsString = ""; pendingSideValueAsString = pendingSideValue.toString(); @@ -1234,10 +1244,10 @@ private String toIndentedString(Object o) { openapiFields.add("workingTimeInForce"); openapiFields.add("workingStrategyId"); openapiFields.add("workingStrategyType"); + openapiFields.add("pendingType"); openapiFields.add("workingPegPriceType"); openapiFields.add("workingPegOffsetType"); openapiFields.add("workingPegOffsetValue"); - openapiFields.add("pendingType"); openapiFields.add("pendingSide"); openapiFields.add("pendingClientOrderId"); openapiFields.add("pendingPrice"); @@ -1337,6 +1347,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti && !jsonObj.get("workingTimeInForce").isJsonNull()) { WorkingTimeInForce.validateJsonElement(jsonObj.get("workingTimeInForce")); } + // validate the required field `pendingType` + PendingType.validateJsonElement(jsonObj.get("pendingType")); // validate the optional field `workingPegPriceType` if (jsonObj.get("workingPegPriceType") != null && !jsonObj.get("workingPegPriceType").isJsonNull()) { @@ -1347,8 +1359,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti && !jsonObj.get("workingPegOffsetType").isJsonNull()) { WorkingPegOffsetType.validateJsonElement(jsonObj.get("workingPegOffsetType")); } - // validate the required field `pendingType` - PendingType.validateJsonElement(jsonObj.get("pendingType")); // validate the required field `pendingSide` PendingSide.validateJsonElement(jsonObj.get("pendingSide")); if ((jsonObj.get("pendingClientOrderId") != null diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtoResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtoResponse.java index f8e5a796e..337e4fed4 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtoResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** OrderListOtoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOtoResponse { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtoResponseOrderReportsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtoResponseOrderReportsInner.java index d6fe8ec0d..f4ef5d1ba 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtoResponseOrderReportsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtoResponseOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderListOtoResponseOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOtoResponseOrderReportsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -133,6 +133,96 @@ public class OrderListOtoResponseOrderReportsInner { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + + @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @jakarta.annotation.Nullable + private String stopPrice; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OrderListOtoResponseOrderReportsInner() {} public OrderListOtoResponseOrderReportsInner symbol( @@ -453,6 +543,306 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OrderListOtoResponseOrderReportsInner icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderListOtoResponseOrderReportsInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderListOtoResponseOrderReportsInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public OrderListOtoResponseOrderReportsInner stopPrice( + @jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + /** + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. + * + * @return stopPrice + */ + @jakarta.annotation.Nullable + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + } + + public OrderListOtoResponseOrderReportsInner strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderListOtoResponseOrderReportsInner strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderListOtoResponseOrderReportsInner trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderListOtoResponseOrderReportsInner trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderListOtoResponseOrderReportsInner usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderListOtoResponseOrderReportsInner workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderListOtoResponseOrderReportsInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderListOtoResponseOrderReportsInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderListOtoResponseOrderReportsInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderListOtoResponseOrderReportsInner peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderListOtoResponseOrderReportsInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -490,7 +880,35 @@ public boolean equals(Object o) { this.workingTime, orderListOtoResponseOrderReportsInner.workingTime) && Objects.equals( this.selfTradePreventionMode, - orderListOtoResponseOrderReportsInner.selfTradePreventionMode); + orderListOtoResponseOrderReportsInner.selfTradePreventionMode) + && Objects.equals(this.icebergQty, orderListOtoResponseOrderReportsInner.icebergQty) + && Objects.equals( + this.preventedMatchId, + orderListOtoResponseOrderReportsInner.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + orderListOtoResponseOrderReportsInner.preventedQuantity) + && Objects.equals(this.stopPrice, orderListOtoResponseOrderReportsInner.stopPrice) + && Objects.equals(this.strategyId, orderListOtoResponseOrderReportsInner.strategyId) + && Objects.equals( + this.strategyType, orderListOtoResponseOrderReportsInner.strategyType) + && Objects.equals( + this.trailingDelta, orderListOtoResponseOrderReportsInner.trailingDelta) + && Objects.equals( + this.trailingTime, orderListOtoResponseOrderReportsInner.trailingTime) + && Objects.equals(this.usedSor, orderListOtoResponseOrderReportsInner.usedSor) + && Objects.equals( + this.workingFloor, orderListOtoResponseOrderReportsInner.workingFloor) + && Objects.equals( + this.pegPriceType, orderListOtoResponseOrderReportsInner.pegPriceType) + && Objects.equals( + this.pegOffsetType, orderListOtoResponseOrderReportsInner.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, orderListOtoResponseOrderReportsInner.pegOffsetValue) + && Objects.equals( + this.peggedPrice, orderListOtoResponseOrderReportsInner.peggedPrice) + && Objects.equals( + this.expiryReason, orderListOtoResponseOrderReportsInner.expiryReason); } @Override @@ -511,7 +929,22 @@ public int hashCode() { type, side, workingTime, - selfTradePreventionMode); + selfTradePreventionMode, + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -538,6 +971,21 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -615,6 +1063,68 @@ public String toUrlQueryString() { sb.append("selfTradePreventionMode=") .append(urlEncode(selfTradePreventionModeValueAsString)) .append(""); + Object icebergQtyValue = getIcebergQty(); + String icebergQtyValueAsString = ""; + icebergQtyValueAsString = icebergQtyValue.toString(); + sb.append("icebergQty=").append(urlEncode(icebergQtyValueAsString)).append(""); + Object preventedMatchIdValue = getPreventedMatchId(); + String preventedMatchIdValueAsString = ""; + preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + sb.append("preventedMatchId=").append(urlEncode(preventedMatchIdValueAsString)).append(""); + Object preventedQuantityValue = getPreventedQuantity(); + String preventedQuantityValueAsString = ""; + preventedQuantityValueAsString = preventedQuantityValue.toString(); + sb.append("preventedQuantity=") + .append(urlEncode(preventedQuantityValueAsString)) + .append(""); + Object stopPriceValue = getStopPrice(); + String stopPriceValueAsString = ""; + stopPriceValueAsString = stopPriceValue.toString(); + sb.append("stopPrice=").append(urlEncode(stopPriceValueAsString)).append(""); + Object strategyIdValue = getStrategyId(); + String strategyIdValueAsString = ""; + strategyIdValueAsString = strategyIdValue.toString(); + sb.append("strategyId=").append(urlEncode(strategyIdValueAsString)).append(""); + Object strategyTypeValue = getStrategyType(); + String strategyTypeValueAsString = ""; + strategyTypeValueAsString = strategyTypeValue.toString(); + sb.append("strategyType=").append(urlEncode(strategyTypeValueAsString)).append(""); + Object trailingDeltaValue = getTrailingDelta(); + String trailingDeltaValueAsString = ""; + trailingDeltaValueAsString = trailingDeltaValue.toString(); + sb.append("trailingDelta=").append(urlEncode(trailingDeltaValueAsString)).append(""); + Object trailingTimeValue = getTrailingTime(); + String trailingTimeValueAsString = ""; + trailingTimeValueAsString = trailingTimeValue.toString(); + sb.append("trailingTime=").append(urlEncode(trailingTimeValueAsString)).append(""); + Object usedSorValue = getUsedSor(); + String usedSorValueAsString = ""; + usedSorValueAsString = usedSorValue.toString(); + sb.append("usedSor=").append(urlEncode(usedSorValueAsString)).append(""); + Object workingFloorValue = getWorkingFloor(); + String workingFloorValueAsString = ""; + workingFloorValueAsString = workingFloorValue.toString(); + sb.append("workingFloor=").append(urlEncode(workingFloorValueAsString)).append(""); + Object pegPriceTypeValue = getPegPriceType(); + String pegPriceTypeValueAsString = ""; + pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + sb.append("pegPriceType=").append(urlEncode(pegPriceTypeValueAsString)).append(""); + Object pegOffsetTypeValue = getPegOffsetType(); + String pegOffsetTypeValueAsString = ""; + pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + sb.append("pegOffsetType=").append(urlEncode(pegOffsetTypeValueAsString)).append(""); + Object pegOffsetValueValue = getPegOffsetValue(); + String pegOffsetValueValueAsString = ""; + pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + sb.append("pegOffsetValue=").append(urlEncode(pegOffsetValueValueAsString)).append(""); + Object peggedPriceValue = getPeggedPrice(); + String peggedPriceValueAsString = ""; + peggedPriceValueAsString = peggedPriceValue.toString(); + sb.append("peggedPrice=").append(urlEncode(peggedPriceValueAsString)).append(""); + Object expiryReasonValue = getExpiryReason(); + String expiryReasonValueAsString = ""; + expiryReasonValueAsString = expiryReasonValue.toString(); + sb.append("expiryReason=").append(urlEncode(expiryReasonValueAsString)).append(""); return sb.toString(); } @@ -659,6 +1169,21 @@ private String toIndentedString(Object o) { openapiFields.add("side"); openapiFields.add("workingTime"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -783,6 +1308,71 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) + && !jsonObj.get("stopPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `stopPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("stopPrice").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtoResponseOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtoResponseOrdersInner.java index 0722be1e0..ba0950530 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtoResponseOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtoResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderListOtoResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOtoResponseOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtocoRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtocoRequest.java index 45ae00bb4..eb6b8bcd1 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtocoRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtocoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** OrderListOtocoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOtocoRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -339,7 +339,10 @@ public OrderListOtocoRequest listClientOrderId( } /** - * Get listClientOrderId + * Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order + * list with the same `listClientOrderId` is accepted only when the previous one is + * filled or completely expired. `listClientOrderId` is distinct from the + * `workingClientOrderId` and the `pendingClientOrderId`. * * @return listClientOrderId */ @@ -445,7 +448,8 @@ public OrderListOtocoRequest workingClientOrderId( } /** - * Get workingClientOrderId + * Arbitrary unique ID among open orders for the working order. Automatically generated if not + * sent. * * @return workingClientOrderId */ @@ -486,7 +490,7 @@ public OrderListOtocoRequest workingQuantity( } /** - * Get workingQuantity + * Sets the quantity for the working order. * * @return workingQuantity */ @@ -508,7 +512,8 @@ public OrderListOtocoRequest workingIcebergQty( } /** - * Get workingIcebergQty + * This can only be used if `workingTimeInForce` is `GTC`, or if + * `workingType` is `LIMIT_MAKER`. * * @return workingIcebergQty */ @@ -551,7 +556,7 @@ public OrderListOtocoRequest workingStrategyId( } /** - * Get workingStrategyId + * Arbitrary numeric value identifying the working order within an order strategy. * * @return workingStrategyId */ @@ -571,7 +576,8 @@ public OrderListOtocoRequest workingStrategyType( } /** - * Get workingStrategyType + * Arbitrary numeric value identifying the working order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return workingStrategyType */ @@ -677,7 +683,7 @@ public OrderListOtocoRequest pendingQuantity( } /** - * Get pendingQuantity + * Sets the quantity for the pending orders. * * @return pendingQuantity */ @@ -721,7 +727,8 @@ public OrderListOtocoRequest pendingAboveClientOrderId( } /** - * Get pendingAboveClientOrderId + * Arbitrary unique ID among open orders for the pending above order. Automatically generated if + * not sent. * * @return pendingAboveClientOrderId */ @@ -742,7 +749,8 @@ public OrderListOtocoRequest pendingAbovePrice( } /** - * Get pendingAbovePrice + * Can be used if `pendingAboveType` is `STOP_LOSS_LIMIT`, + * `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. * * @return pendingAbovePrice */ @@ -763,7 +771,8 @@ public OrderListOtocoRequest pendingAboveStopPrice( } /** - * Get pendingAboveStopPrice + * Can be used if `pendingAboveType` is `STOP_LOSS`, + * `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. * * @return pendingAboveStopPrice */ @@ -785,7 +794,7 @@ public OrderListOtocoRequest pendingAboveTrailingDelta( } /** - * Get pendingAboveTrailingDelta + * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) * * @return pendingAboveTrailingDelta */ @@ -807,7 +816,8 @@ public OrderListOtocoRequest pendingAboveIcebergQty( } /** - * Get pendingAboveIcebergQty + * This can only be used if `pendingAboveTimeInForce` is `GTC` or if + * `pendingAboveType` is `LIMIT_MAKER`. * * @return pendingAboveIcebergQty */ @@ -851,7 +861,7 @@ public OrderListOtocoRequest pendingAboveStrategyId( } /** - * Get pendingAboveStrategyId + * Arbitrary numeric value identifying the pending above order within an order strategy. * * @return pendingAboveStrategyId */ @@ -872,7 +882,8 @@ public OrderListOtocoRequest pendingAboveStrategyType( } /** - * Get pendingAboveStrategyType + * Arbitrary numeric value identifying the pending above order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return pendingAboveStrategyType */ @@ -980,7 +991,8 @@ public OrderListOtocoRequest pendingBelowClientOrderId( } /** - * Get pendingBelowClientOrderId + * Arbitrary unique ID among open orders for the pending below order. Automatically generated if + * not sent. * * @return pendingBelowClientOrderId */ @@ -1001,7 +1013,8 @@ public OrderListOtocoRequest pendingBelowPrice( } /** - * Get pendingBelowPrice + * Can be used if `pendingBelowType` is `STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT` to specify the limit price. * * @return pendingBelowPrice */ @@ -1022,7 +1035,10 @@ public OrderListOtocoRequest pendingBelowStopPrice( } /** - * Get pendingBelowStopPrice + * Can be used if `pendingBelowType` is `STOP_LOSS`, + * `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either + * `pendingBelowStopPrice` or `pendingBelowTrailingDelta` or both, must be + * specified. * * @return pendingBelowStopPrice */ @@ -1044,7 +1060,7 @@ public OrderListOtocoRequest pendingBelowTrailingDelta( } /** - * Get pendingBelowTrailingDelta + * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) * * @return pendingBelowTrailingDelta */ @@ -1066,7 +1082,8 @@ public OrderListOtocoRequest pendingBelowIcebergQty( } /** - * Get pendingBelowIcebergQty + * This can only be used if `pendingBelowTimeInForce` is `GTC`, or if + * `pendingBelowType` is `LIMIT_MAKER`. * * @return pendingBelowIcebergQty */ @@ -1110,7 +1127,7 @@ public OrderListOtocoRequest pendingBelowStrategyId( } /** - * Get pendingBelowStrategyId + * Arbitrary numeric value identifying the pending below order within an order strategy. * * @return pendingBelowStrategyId */ @@ -1131,7 +1148,8 @@ public OrderListOtocoRequest pendingBelowStrategyType( } /** - * Get pendingBelowStrategyType + * Arbitrary numeric value identifying the pending below order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return pendingBelowStrategyType */ @@ -1216,7 +1234,8 @@ public OrderListOtocoRequest recvWindow(@jakarta.annotation.Nullable Double recv } /** - * Get recvWindow + * The value cannot be greater than `60000`. Supports up to three decimal places of + * precision (e.g., 6000.346) so that microseconds may be specified. * * @return recvWindow */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtocoResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtocoResponse.java index eb2c74498..5fc3b5513 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtocoResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtocoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** OrderListOtocoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOtocoResponse { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtocoResponseOrderReportsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtocoResponseOrderReportsInner.java index 379f60460..485a60219 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtocoResponseOrderReportsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtocoResponseOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderListOtocoResponseOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOtocoResponseOrderReportsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -133,12 +133,96 @@ public class OrderListOtocoResponseOrderReportsInner { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; @SerializedName(SERIALIZED_NAME_STOP_PRICE) @jakarta.annotation.Nullable private String stopPrice; + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OrderListOtocoResponseOrderReportsInner() {} public OrderListOtocoResponseOrderReportsInner symbol( @@ -460,6 +544,66 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OrderListOtocoResponseOrderReportsInner icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderListOtocoResponseOrderReportsInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderListOtocoResponseOrderReportsInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + public OrderListOtocoResponseOrderReportsInner stopPrice( @jakarta.annotation.Nullable String stopPrice) { this.stopPrice = stopPrice; @@ -467,7 +611,7 @@ public OrderListOtocoResponseOrderReportsInner stopPrice( } /** - * Get stopPrice + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. * * @return stopPrice */ @@ -480,6 +624,226 @@ public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { this.stopPrice = stopPrice; } + public OrderListOtocoResponseOrderReportsInner strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderListOtocoResponseOrderReportsInner strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderListOtocoResponseOrderReportsInner trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderListOtocoResponseOrderReportsInner trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderListOtocoResponseOrderReportsInner usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderListOtocoResponseOrderReportsInner workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderListOtocoResponseOrderReportsInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderListOtocoResponseOrderReportsInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderListOtocoResponseOrderReportsInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderListOtocoResponseOrderReportsInner peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderListOtocoResponseOrderReportsInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -519,7 +883,35 @@ public boolean equals(Object o) { this.selfTradePreventionMode, orderListOtocoResponseOrderReportsInner.selfTradePreventionMode) && Objects.equals( - this.stopPrice, orderListOtocoResponseOrderReportsInner.stopPrice); + this.icebergQty, orderListOtocoResponseOrderReportsInner.icebergQty) + && Objects.equals( + this.preventedMatchId, + orderListOtocoResponseOrderReportsInner.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + orderListOtocoResponseOrderReportsInner.preventedQuantity) + && Objects.equals(this.stopPrice, orderListOtocoResponseOrderReportsInner.stopPrice) + && Objects.equals( + this.strategyId, orderListOtocoResponseOrderReportsInner.strategyId) + && Objects.equals( + this.strategyType, orderListOtocoResponseOrderReportsInner.strategyType) + && Objects.equals( + this.trailingDelta, orderListOtocoResponseOrderReportsInner.trailingDelta) + && Objects.equals( + this.trailingTime, orderListOtocoResponseOrderReportsInner.trailingTime) + && Objects.equals(this.usedSor, orderListOtocoResponseOrderReportsInner.usedSor) + && Objects.equals( + this.workingFloor, orderListOtocoResponseOrderReportsInner.workingFloor) + && Objects.equals( + this.pegPriceType, orderListOtocoResponseOrderReportsInner.pegPriceType) + && Objects.equals( + this.pegOffsetType, orderListOtocoResponseOrderReportsInner.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, orderListOtocoResponseOrderReportsInner.pegOffsetValue) + && Objects.equals( + this.peggedPrice, orderListOtocoResponseOrderReportsInner.peggedPrice) + && Objects.equals( + this.expiryReason, orderListOtocoResponseOrderReportsInner.expiryReason); } @Override @@ -541,7 +933,21 @@ public int hashCode() { side, workingTime, selfTradePreventionMode, - stopPrice); + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -568,7 +974,21 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -646,10 +1066,68 @@ public String toUrlQueryString() { sb.append("selfTradePreventionMode=") .append(urlEncode(selfTradePreventionModeValueAsString)) .append(""); + Object icebergQtyValue = getIcebergQty(); + String icebergQtyValueAsString = ""; + icebergQtyValueAsString = icebergQtyValue.toString(); + sb.append("icebergQty=").append(urlEncode(icebergQtyValueAsString)).append(""); + Object preventedMatchIdValue = getPreventedMatchId(); + String preventedMatchIdValueAsString = ""; + preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + sb.append("preventedMatchId=").append(urlEncode(preventedMatchIdValueAsString)).append(""); + Object preventedQuantityValue = getPreventedQuantity(); + String preventedQuantityValueAsString = ""; + preventedQuantityValueAsString = preventedQuantityValue.toString(); + sb.append("preventedQuantity=") + .append(urlEncode(preventedQuantityValueAsString)) + .append(""); Object stopPriceValue = getStopPrice(); String stopPriceValueAsString = ""; stopPriceValueAsString = stopPriceValue.toString(); sb.append("stopPrice=").append(urlEncode(stopPriceValueAsString)).append(""); + Object strategyIdValue = getStrategyId(); + String strategyIdValueAsString = ""; + strategyIdValueAsString = strategyIdValue.toString(); + sb.append("strategyId=").append(urlEncode(strategyIdValueAsString)).append(""); + Object strategyTypeValue = getStrategyType(); + String strategyTypeValueAsString = ""; + strategyTypeValueAsString = strategyTypeValue.toString(); + sb.append("strategyType=").append(urlEncode(strategyTypeValueAsString)).append(""); + Object trailingDeltaValue = getTrailingDelta(); + String trailingDeltaValueAsString = ""; + trailingDeltaValueAsString = trailingDeltaValue.toString(); + sb.append("trailingDelta=").append(urlEncode(trailingDeltaValueAsString)).append(""); + Object trailingTimeValue = getTrailingTime(); + String trailingTimeValueAsString = ""; + trailingTimeValueAsString = trailingTimeValue.toString(); + sb.append("trailingTime=").append(urlEncode(trailingTimeValueAsString)).append(""); + Object usedSorValue = getUsedSor(); + String usedSorValueAsString = ""; + usedSorValueAsString = usedSorValue.toString(); + sb.append("usedSor=").append(urlEncode(usedSorValueAsString)).append(""); + Object workingFloorValue = getWorkingFloor(); + String workingFloorValueAsString = ""; + workingFloorValueAsString = workingFloorValue.toString(); + sb.append("workingFloor=").append(urlEncode(workingFloorValueAsString)).append(""); + Object pegPriceTypeValue = getPegPriceType(); + String pegPriceTypeValueAsString = ""; + pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + sb.append("pegPriceType=").append(urlEncode(pegPriceTypeValueAsString)).append(""); + Object pegOffsetTypeValue = getPegOffsetType(); + String pegOffsetTypeValueAsString = ""; + pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + sb.append("pegOffsetType=").append(urlEncode(pegOffsetTypeValueAsString)).append(""); + Object pegOffsetValueValue = getPegOffsetValue(); + String pegOffsetValueValueAsString = ""; + pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + sb.append("pegOffsetValue=").append(urlEncode(pegOffsetValueValueAsString)).append(""); + Object peggedPriceValue = getPeggedPrice(); + String peggedPriceValueAsString = ""; + peggedPriceValueAsString = peggedPriceValue.toString(); + sb.append("peggedPrice=").append(urlEncode(peggedPriceValueAsString)).append(""); + Object expiryReasonValue = getExpiryReason(); + String expiryReasonValueAsString = ""; + expiryReasonValueAsString = expiryReasonValue.toString(); + sb.append("expiryReason=").append(urlEncode(expiryReasonValueAsString)).append(""); return sb.toString(); } @@ -694,7 +1172,21 @@ private String toIndentedString(Object o) { openapiFields.add("side"); openapiFields.add("workingTime"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -820,6 +1312,23 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) && !jsonObj.get("stopPrice").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -828,6 +1337,46 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("stopPrice").toString())); } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtocoResponseOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtocoResponseOrdersInner.java index 6f10364fd..07e98ae6d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtocoResponseOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderListOtocoResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderListOtocoResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListOtocoResponseOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderOcoRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderOcoRequest.java index 31b88db2e..28c5647a7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderOcoRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderOcoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** OrderOcoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderOcoRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -187,7 +187,7 @@ public OrderOcoRequest listClientOrderId( } /** - * Get listClientOrderId + * A unique Id for the entire orderList * * @return listClientOrderId */ @@ -249,7 +249,7 @@ public OrderOcoRequest limitClientOrderId( } /** - * Get limitClientOrderId + * A unique Id for the limit order * * @return limitClientOrderId */ @@ -309,7 +309,7 @@ public OrderOcoRequest limitStrategyType( } /** - * Get limitStrategyType + * The value cannot be less than `1000000`. * * @return limitStrategyType */ @@ -328,7 +328,7 @@ public OrderOcoRequest limitIcebergQty(@jakarta.annotation.Nullable Double limit } /** - * Get limitIcebergQty + * Used to make the `LIMIT_MAKER` leg an iceberg order. * * @return limitIcebergQty */ @@ -368,7 +368,7 @@ public OrderOcoRequest stopClientOrderId( } /** - * Get stopClientOrderId + * A unique Id for the stop loss/stop loss limit leg * * @return stopClientOrderId */ @@ -427,7 +427,7 @@ public OrderOcoRequest stopStrategyType(@jakarta.annotation.Nullable Integer sto } /** - * Get stopStrategyType + * The value cannot be less than `1000000`. * * @return stopStrategyType */ @@ -446,7 +446,7 @@ public OrderOcoRequest stopLimitPrice(@jakarta.annotation.Nullable Double stopLi } /** - * Get stopLimitPrice + * If provided, `stopLimitTimeInForce` is required. * * @return stopLimitPrice */ @@ -466,7 +466,7 @@ public OrderOcoRequest stopIcebergQty(@jakarta.annotation.Nullable Double stopIc } /** - * Get stopIcebergQty + * Used with `STOP_LOSS_LIMIT` leg to make an iceberg order. * * @return stopIcebergQty */ @@ -552,7 +552,8 @@ public OrderOcoRequest recvWindow(@jakarta.annotation.Nullable Double recvWindow } /** - * Get recvWindow + * The value cannot be greater than `60000`. <br> Supports up to three decimal + * places of precision (e.g., 6000.346) so that microseconds may be specified. * * @return recvWindow */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderOcoResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderOcoResponse.java index 0fc5e977f..28228978a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderOcoResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderOcoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** OrderOcoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderOcoResponse { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderOcoResponseOrderReportsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderOcoResponseOrderReportsInner.java index 1a663a5c4..2d8f91d50 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderOcoResponseOrderReportsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderOcoResponseOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderOcoResponseOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderOcoResponseOrderReportsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderOcoResponseOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderOcoResponseOrdersInner.java index 9840ea8c3..71652c8d9 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderOcoResponseOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderOcoResponseOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OrderOcoResponseOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderOcoResponseOrdersInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderRateLimitExceededMode.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderRateLimitExceededMode.java index 71985deab..9e45066ee 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderRateLimitExceededMode.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderRateLimitExceededMode.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,11 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets orderRateLimitExceededMode */ +/** + * Supported values: <br> `DO_NOTHING` (default)- will only attempt to cancel the + * order if account has not exceeded the unfilled order rate limit<br> `CANCEL_ONLY` + * - will always cancel the order + */ @JsonAdapter(OrderRateLimitExceededMode.Adapter.class) public enum OrderRateLimitExceededMode { DO_NOTHING("DO_NOTHING"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestRequest.java index 4a169ae2d..0828d8ba2 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** OrderTestRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTestRequest { public static final String SERIALIZED_NAME_COMPUTE_COMMISSION_RATES = "computeCommissionRates"; @@ -167,7 +167,8 @@ public OrderTestRequest computeCommissionRates( } /** - * Get computeCommissionRates + * Default: `false` <br> See [Commissions + * FAQ](/products/spot/faqs/commission_faq#test-order-diferences) to learn more. * * @return computeCommissionRates */ @@ -329,7 +330,9 @@ public OrderTestRequest newClientOrderId(@jakarta.annotation.Nullable String new } /** - * Get newClientOrderId + * A unique id among open orders. Automatically generated if not sent. Orders with the same + * `newClientOrderID` can be accepted only when the previous one is filled, otherwise + * the order will be rejected. * * @return newClientOrderId */ @@ -367,7 +370,7 @@ public OrderTestRequest strategyType(@jakarta.annotation.Nullable Integer strate } /** - * Get strategyType + * The value cannot be less than `1000000`. * * @return strategyType */ @@ -386,7 +389,8 @@ public OrderTestRequest stopPrice(@jakarta.annotation.Nullable Double stopPrice) } /** - * Get stopPrice + * Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and + * `TAKE_PROFIT_LIMIT` orders. * * @return stopPrice */ @@ -406,7 +410,7 @@ public OrderTestRequest trailingDelta(@jakarta.annotation.Nullable Long trailing } /** - * Get trailingDelta + * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) * * @return trailingDelta */ @@ -425,7 +429,8 @@ public OrderTestRequest icebergQty(@jakarta.annotation.Nullable Double icebergQt } /** - * Get icebergQty + * Used with `LIMIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` + * to create an iceberg order. * * @return icebergQty */ @@ -509,7 +514,7 @@ public OrderTestRequest pegOffsetValue(@jakarta.annotation.Nullable Integer pegO } /** - * Get pegOffsetValue + * Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) * * @return pegOffsetValue */ @@ -549,7 +554,8 @@ public OrderTestRequest recvWindow(@jakarta.annotation.Nullable Double recvWindo } /** - * Get recvWindow + * The value cannot be greater than `60000`. Supports up to three decimal places of + * precision (e.g., 6000.346) so that microseconds may be specified. * * @return recvWindow */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponse.java index 9bb6d8dbf..1b0ecf34f 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** OrderTestResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTestResponse { public static final String SERIALIZED_NAME_STANDARD_COMMISSION_FOR_ORDER = "standardCommissionForOrder"; @@ -55,7 +55,7 @@ public class OrderTestResponse { @SerializedName(SERIALIZED_NAME_TAX_COMMISSION_FOR_ORDER) @jakarta.annotation.Nullable - private OrderTestResponseStandardCommissionForOrder taxCommissionForOrder; + private OrderTestResponseTaxCommissionForOrder taxCommissionForOrder; public static final String SERIALIZED_NAME_DISCOUNT = "discount"; @@ -115,7 +115,7 @@ public void setSpecialCommissionForOrder( public OrderTestResponse taxCommissionForOrder( @jakarta.annotation.Nullable - OrderTestResponseStandardCommissionForOrder taxCommissionForOrder) { + OrderTestResponseTaxCommissionForOrder taxCommissionForOrder) { this.taxCommissionForOrder = taxCommissionForOrder; return this; } @@ -127,13 +127,13 @@ public OrderTestResponse taxCommissionForOrder( */ @jakarta.annotation.Nullable @Valid - public OrderTestResponseStandardCommissionForOrder getTaxCommissionForOrder() { + public OrderTestResponseTaxCommissionForOrder getTaxCommissionForOrder() { return taxCommissionForOrder; } public void setTaxCommissionForOrder( @jakarta.annotation.Nullable - OrderTestResponseStandardCommissionForOrder taxCommissionForOrder) { + OrderTestResponseTaxCommissionForOrder taxCommissionForOrder) { this.taxCommissionForOrder = taxCommissionForOrder; } @@ -299,7 +299,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `taxCommissionForOrder` if (jsonObj.get("taxCommissionForOrder") != null && !jsonObj.get("taxCommissionForOrder").isJsonNull()) { - OrderTestResponseStandardCommissionForOrder.validateJsonElement( + OrderTestResponseTaxCommissionForOrder.validateJsonElement( jsonObj.get("taxCommissionForOrder")); } // validate the optional field `discount` diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponseDiscount.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponseDiscount.java index 3cf2dd4fd..ebbdf9b18 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponseDiscount.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponseDiscount.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** OrderTestResponseDiscount */ +/** Discount on standard commissions when paying in BNB. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTestResponseDiscount { public static final String SERIALIZED_NAME_ENABLED_FOR_ACCOUNT = "enabledForAccount"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponseSpecialCommissionForOrder.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponseSpecialCommissionForOrder.java index 997a7e720..e981531e0 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponseSpecialCommissionForOrder.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponseSpecialCommissionForOrder.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** OrderTestResponseSpecialCommissionForOrder */ +/** Special commission rates on trades from the order. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTestResponseSpecialCommissionForOrder { public static final String SERIALIZED_NAME_MAKER = "maker"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponseStandardCommissionForOrder.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponseStandardCommissionForOrder.java index 3ee583dcd..3ff26e60b 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponseStandardCommissionForOrder.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponseStandardCommissionForOrder.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,10 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** OrderTestResponseStandardCommissionForOrder */ +/** Standard commission rates on trades from the order. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTestResponseStandardCommissionForOrder { public static final String SERIALIZED_NAME_MAKER = "maker"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponseTaxCommissionForOrder.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponseTaxCommissionForOrder.java new file mode 100644 index 000000000..d62876c9c --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderTestResponseTaxCommissionForOrder.java @@ -0,0 +1,259 @@ +/* + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.rest.model; + +import com.binance.connector.client.spot.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** Tax commission rates for trades from the order. */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OrderTestResponseTaxCommissionForOrder { + public static final String SERIALIZED_NAME_MAKER = "maker"; + + @SerializedName(SERIALIZED_NAME_MAKER) + @jakarta.annotation.Nullable + private String maker; + + public static final String SERIALIZED_NAME_TAKER = "taker"; + + @SerializedName(SERIALIZED_NAME_TAKER) + @jakarta.annotation.Nullable + private String taker; + + public OrderTestResponseTaxCommissionForOrder() {} + + public OrderTestResponseTaxCommissionForOrder maker(@jakarta.annotation.Nullable String maker) { + this.maker = maker; + return this; + } + + /** + * Get maker + * + * @return maker + */ + @jakarta.annotation.Nullable + public String getMaker() { + return maker; + } + + public void setMaker(@jakarta.annotation.Nullable String maker) { + this.maker = maker; + } + + public OrderTestResponseTaxCommissionForOrder taker(@jakarta.annotation.Nullable String taker) { + this.taker = taker; + return this; + } + + /** + * Get taker + * + * @return taker + */ + @jakarta.annotation.Nullable + public String getTaker() { + return taker; + } + + public void setTaker(@jakarta.annotation.Nullable String taker) { + this.taker = taker; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderTestResponseTaxCommissionForOrder orderTestResponseTaxCommissionForOrder = + (OrderTestResponseTaxCommissionForOrder) o; + return Objects.equals(this.maker, orderTestResponseTaxCommissionForOrder.maker) + && Objects.equals(this.taker, orderTestResponseTaxCommissionForOrder.taker); + } + + @Override + public int hashCode() { + return Objects.hash(maker, taker); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderTestResponseTaxCommissionForOrder {\n"); + sb.append(" maker: ").append(toIndentedString(maker)).append("\n"); + sb.append(" taker: ").append(toIndentedString(taker)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object makerValue = getMaker(); + String makerValueAsString = ""; + makerValueAsString = makerValue.toString(); + sb.append("maker=").append(urlEncode(makerValueAsString)).append(""); + Object takerValue = getTaker(); + String takerValueAsString = ""; + takerValueAsString = takerValue.toString(); + sb.append("taker=").append(urlEncode(takerValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("maker"); + openapiFields.add("taker"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * OrderTestResponseTaxCommissionForOrder + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderTestResponseTaxCommissionForOrder.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OrderTestResponseTaxCommissionForOrder" + + " is not found in the empty JSON string", + OrderTestResponseTaxCommissionForOrder.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("maker") != null && !jsonObj.get("maker").isJsonNull()) + && !jsonObj.get("maker").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `maker` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("maker").toString())); + } + if ((jsonObj.get("taker") != null && !jsonObj.get("taker").isJsonNull()) + && !jsonObj.get("taker").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `taker` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("taker").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderTestResponseTaxCommissionForOrder.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderTestResponseTaxCommissionForOrder' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(OrderTestResponseTaxCommissionForOrder.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, OrderTestResponseTaxCommissionForOrder value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderTestResponseTaxCommissionForOrder read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OrderTestResponseTaxCommissionForOrder given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderTestResponseTaxCommissionForOrder + * @throws IOException if the JSON string is invalid with respect to + * OrderTestResponseTaxCommissionForOrder + */ + public static OrderTestResponseTaxCommissionForOrder fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, OrderTestResponseTaxCommissionForOrder.class); + } + + /** + * Convert an instance of OrderTestResponseTaxCommissionForOrder to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderType.java index efb957bbd..317da7448 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,24 +21,12 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets orderType */ +/** Please see [Enums](/products/spot/enums#ordertypes) for supported values. */ @JsonAdapter(OrderType.Adapter.class) public enum OrderType { MARKET("MARKET"), - LIMIT("LIMIT"), - - STOP_LOSS("STOP_LOSS"), - - STOP_LOSS_LIMIT("STOP_LOSS_LIMIT"), - - TAKE_PROFIT("TAKE_PROFIT"), - - TAKE_PROFIT_LIMIT("TAKE_PROFIT_LIMIT"), - - LIMIT_MAKER("LIMIT_MAKER"), - - NON_REPRESENTABLE("NON_REPRESENTABLE"); + LIMIT("LIMIT"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PegOffsetType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PegOffsetType.java index 025d1e277..aac3513a4 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PegOffsetType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PegOffsetType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,12 +21,12 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pegOffsetType */ +/** + * Only `PRICE_LEVEL` is supported. See [Pegged Orders](/products/spot/faqs/pegged_orders) + */ @JsonAdapter(PegOffsetType.Adapter.class) public enum PegOffsetType { - PRICE_LEVEL("PRICE_LEVEL"), - - NON_REPRESENTABLE("NON_REPRESENTABLE"); + PRICE_LEVEL("PRICE_LEVEL"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PegPriceType.java index 2390ffc4e..14ff0e397 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PegPriceType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,14 +21,15 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pegPriceType */ +/** + * `PRIMARY_PEG` or `MARKET_PEG`. See [Pegged + * Orders](/products/spot/faqs/pegged_orders) + */ @JsonAdapter(PegPriceType.Adapter.class) public enum PegPriceType { PRIMARY_PEG("PRIMARY_PEG"), - MARKET_PEG("MARKET_PEG"), - - NON_REPRESENTABLE("NON_REPRESENTABLE"); + MARKET_PEG("MARKET_PEG"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingAbovePegOffsetType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingAbovePegOffsetType.java index 4202b4392..41cf48a14 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingAbovePegOffsetType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingAbovePegOffsetType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingAbovePegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingAbovePegPriceType.java index f70fa5ba9..0c8b282aa 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingAbovePegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingAbovePegPriceType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingAbovePegPriceType */ +/** See [Pegged Orders](/products/spot/faqs/pegged_orders) */ @JsonAdapter(PendingAbovePegPriceType.Adapter.class) public enum PendingAbovePegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingAboveTimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingAboveTimeInForce.java index b1f269fea..65b875f9b 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingAboveTimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingAboveTimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingAboveTimeInForce */ +/** + * Required if `pendingAboveType` is `STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT`. + */ @JsonAdapter(PendingAboveTimeInForce.Adapter.class) public enum PendingAboveTimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingAboveType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingAboveType.java index 611b9d9f0..05c2a2d6d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingAboveType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingAboveType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingAboveType */ +/** + * Supported values: `STOP_LOSS_LIMIT`, `STOP_LOSS`, `LIMIT_MAKER`, + * `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT` + */ @JsonAdapter(PendingAboveType.Adapter.class) public enum PendingAboveType { STOP_LOSS_LIMIT("STOP_LOSS_LIMIT"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingBelowPegOffsetType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingBelowPegOffsetType.java index 3069c8872..2ecf51039 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingBelowPegOffsetType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingBelowPegOffsetType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingBelowPegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingBelowPegPriceType.java index d03e0b0d5..fadb75723 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingBelowPegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingBelowPegPriceType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingBelowPegPriceType */ +/** See [Pegged Orders](/products/spot/faqs/pegged_orders) */ @JsonAdapter(PendingBelowPegPriceType.Adapter.class) public enum PendingBelowPegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingBelowTimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingBelowTimeInForce.java index 6d14a7743..5f5ea490c 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingBelowTimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingBelowTimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingBelowTimeInForce */ +/** + * Required if `pendingBelowType` is `STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT`. + */ @JsonAdapter(PendingBelowTimeInForce.Adapter.class) public enum PendingBelowTimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingBelowType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingBelowType.java index c6df6f4a2..1212d1ee1 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingBelowType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingBelowType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingBelowType */ +/** + * Supported values: `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, + * `TAKE_PROFIT_LIMIT` + */ @JsonAdapter(PendingBelowType.Adapter.class) public enum PendingBelowType { STOP_LOSS("STOP_LOSS"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingPegOffsetType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingPegOffsetType.java index fde83dcb2..1b240eb1e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingPegOffsetType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingPegOffsetType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingPegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingPegPriceType.java index 0befb3a25..d730e3f2a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingPegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingPegPriceType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingPegPriceType */ +/** See [Pegged Orders](/products/spot/faqs/pegged_orders) */ @JsonAdapter(PendingPegPriceType.Adapter.class) public enum PendingPegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingSide.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingSide.java index 75c2de2de..5d271301c 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingSide.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingSide.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingSide */ +/** Supported values: [Order Side](/products/spot/enums#side) */ @JsonAdapter(PendingSide.Adapter.class) public enum PendingSide { BUY("BUY"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingTimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingTimeInForce.java index 909b87916..549a7b8f1 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingTimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingTimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingTimeInForce */ +/** Supported values: [Time In Force](/products/spot/enums#timeinforce) */ @JsonAdapter(PendingTimeInForce.Adapter.class) public enum PendingTimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingType.java index 888431397..ac22220fb 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PendingType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingType */ +/** + * Supported values: [Order Types](/products/spot/enums#ordertypes). Note that `MARKET` + * orders using `quoteOrderQty` are not supported. + */ @JsonAdapter(PendingType.Adapter.class) public enum PendingType { LIMIT("LIMIT"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PercentPriceBySideFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PercentPriceBySideFilter.java index 5fbbadcd8..c1cd3c9b2 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PercentPriceBySideFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PercentPriceBySideFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PercentPriceBySideFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PercentPriceBySideFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PercentPriceFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PercentPriceFilter.java index 436fd04d8..a6c214ca8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PercentPriceFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PercentPriceFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PercentPriceFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PercentPriceFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Permissions.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Permissions.java index 3b1998ccc..113c9fcd1 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Permissions.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Permissions.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** Permissions */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Permissions extends ArrayList { public Permissions() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PriceFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PriceFilter.java index 45e0f3bab..3d1d3ec83 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PriceFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/PriceFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** PriceFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PriceFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/RateLimitOrderResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/RateLimitOrderResponse.java index 92ee12482..4e869faa3 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/RateLimitOrderResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/RateLimitOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RateLimitOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RateLimitOrderResponse extends ArrayList { public RateLimitOrderResponse() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/RateLimitOrderResponseInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/RateLimitOrderResponseInner.java index b5dec68ab..0a6c8ef9a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/RateLimitOrderResponseInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/RateLimitOrderResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RateLimitOrderResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RateLimitOrderResponseInner { public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/RateLimits.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/RateLimits.java index e4845e5de..afad3ee71 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/RateLimits.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/RateLimits.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RateLimits */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RateLimits { public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ReferencePriceCalculationResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ReferencePriceCalculationResponse.java index a7a256db3..64b2ed0bd 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ReferencePriceCalculationResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ReferencePriceCalculationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ReferencePriceCalculationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ReferencePriceCalculationResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -94,7 +94,7 @@ public ReferencePriceCalculationResponse calculationType( } /** - * Get calculationType + * Either `ARITHMETIC_MEAN` or `EXTERNAL`. * * @return calculationType */ @@ -114,7 +114,7 @@ public ReferencePriceCalculationResponse bucketCount( } /** - * Get bucketCount + * Present when calculationType is ARITHMETIC_MEAN. * * @return bucketCount */ @@ -134,7 +134,7 @@ public ReferencePriceCalculationResponse bucketWidthMs( } /** - * Get bucketWidthMs + * Present when calculationType is ARITHMETIC_MEAN. * * @return bucketWidthMs */ @@ -154,7 +154,7 @@ public ReferencePriceCalculationResponse externalCalculationId( } /** - * Get externalCalculationId + * Present when calculationType is EXTERNAL. * * @return externalCalculationId */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ReferencePriceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ReferencePriceResponse.java index 6b3f2dea6..f8a20bbad 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ReferencePriceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ReferencePriceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ReferencePriceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ReferencePriceResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -82,7 +82,7 @@ public ReferencePriceResponse referencePrice( } /** - * Get referencePrice + * Reference price. Can be `null` if no reference price is set. * * @return referencePrice */ @@ -101,7 +101,7 @@ public ReferencePriceResponse timestamp(@jakarta.annotation.Nullable Long timest } /** - * Get timestamp + * Timestamp when reference price was valid. * * @return timestamp */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SelfTradePreventionMode.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SelfTradePreventionMode.java index de62ca6fd..a34f89b9c 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SelfTradePreventionMode.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SelfTradePreventionMode.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets selfTradePreventionMode */ +/** + * The allowed enums is dependent on what is configured on the symbol. Supported values: [STP + * Modes](/products/spot/enums#stpmodes) + */ @JsonAdapter(SelfTradePreventionMode.Adapter.class) public enum SelfTradePreventionMode { NONE("NONE"), @@ -34,7 +37,7 @@ public enum SelfTradePreventionMode { DECREMENT("DECREMENT"), - NON_REPRESENTABLE("NON_REPRESENTABLE"); + TRANSFER("TRANSFER"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Side.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Side.java index 3cfb7d4d2..9e745b8ab 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Side.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Side.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets side */ +/** Please see [Enums](/products/spot/enums#side) for supported values. */ @JsonAdapter(Side.Adapter.class) public enum Side { BUY("BUY"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderRequest.java index 8ec9f6393..a89b0fdf3 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** SorOrderRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SorOrderRequest { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -247,7 +247,9 @@ public SorOrderRequest newClientOrderId(@jakarta.annotation.Nullable String newC } /** - * Get newClientOrderId + * A unique id among open orders. Automatically generated if not sent.<br/> Orders with + * the same `newClientOrderID` can be accepted only when the previous one is filled, + * otherwise the order will be rejected. * * @return newClientOrderId */ @@ -285,7 +287,7 @@ public SorOrderRequest strategyType(@jakarta.annotation.Nullable Integer strateg } /** - * Get strategyType + * The value cannot be less than `1000000`. * * @return strategyType */ @@ -304,7 +306,7 @@ public SorOrderRequest icebergQty(@jakarta.annotation.Nullable Double icebergQty } /** - * Get icebergQty + * Used with `LIMIT` to create an iceberg order. * * @return icebergQty */ @@ -368,7 +370,8 @@ public SorOrderRequest recvWindow(@jakarta.annotation.Nullable Double recvWindow } /** - * Get recvWindow + * The value cannot be greater than `60000`. <br> Supports up to three decimal + * places of precision (e.g., 6000.346) so that microseconds may be specified. * * @return recvWindow */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderResponse.java index 5b83918e5..73ed597d7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** SorOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SorOrderResponse { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderResponseFillsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderResponseFillsInner.java index f847f303d..93a6128e2 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderResponseFillsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderResponseFillsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SorOrderResponseFillsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SorOrderResponseFillsInner { public static final String SERIALIZED_NAME_MATCH_TYPE = "matchType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderTestRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderTestRequest.java index 0f1038fa7..f5a5ffd81 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderTestRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderTestRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,13 +35,13 @@ /** SorOrderTestRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SorOrderTestRequest { public static final String SERIALIZED_NAME_COMPUTE_COMMISSION_RATES = "computeCommissionRates"; @SerializedName(SERIALIZED_NAME_COMPUTE_COMMISSION_RATES) @jakarta.annotation.Nullable - private Boolean computeCommissionRates; + private Boolean computeCommissionRates = false; public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -275,7 +275,9 @@ public SorOrderTestRequest newClientOrderId( } /** - * Get newClientOrderId + * A unique id among open orders. Automatically generated if not sent. Orders with the same + * `newClientOrderID` can be accepted only when the previous one is filled, otherwise + * the order will be rejected. * * @return newClientOrderId */ @@ -313,7 +315,7 @@ public SorOrderTestRequest strategyType(@jakarta.annotation.Nullable Integer str } /** - * Get strategyType + * The value cannot be less than `1000000`. * * @return strategyType */ @@ -332,7 +334,7 @@ public SorOrderTestRequest icebergQty(@jakarta.annotation.Nullable Double iceber } /** - * Get icebergQty + * Used with `LIMIT` to create an iceberg order. * * @return icebergQty */ @@ -396,7 +398,8 @@ public SorOrderTestRequest recvWindow(@jakarta.annotation.Nullable Double recvWi } /** - * Get recvWindow + * The value cannot be greater than `60000`. Supports up to three decimal places of + * precision (e.g., 6000.346) so that microseconds may be specified. * * @return recvWindow */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderTestResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderTestResponse.java index c92b45ffd..c169d287f 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderTestResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderTestResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** SorOrderTestResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SorOrderTestResponse { public static final String SERIALIZED_NAME_STANDARD_COMMISSION_FOR_ORDER = "standardCommissionForOrder"; @@ -48,7 +48,7 @@ public class SorOrderTestResponse { @SerializedName(SERIALIZED_NAME_TAX_COMMISSION_FOR_ORDER) @jakarta.annotation.Nullable - private OrderTestResponseStandardCommissionForOrder taxCommissionForOrder; + private OrderTestResponseTaxCommissionForOrder taxCommissionForOrder; public static final String SERIALIZED_NAME_DISCOUNT = "discount"; @@ -84,7 +84,7 @@ public void setStandardCommissionForOrder( public SorOrderTestResponse taxCommissionForOrder( @jakarta.annotation.Nullable - OrderTestResponseStandardCommissionForOrder taxCommissionForOrder) { + OrderTestResponseTaxCommissionForOrder taxCommissionForOrder) { this.taxCommissionForOrder = taxCommissionForOrder; return this; } @@ -96,13 +96,13 @@ public SorOrderTestResponse taxCommissionForOrder( */ @jakarta.annotation.Nullable @Valid - public OrderTestResponseStandardCommissionForOrder getTaxCommissionForOrder() { + public OrderTestResponseTaxCommissionForOrder getTaxCommissionForOrder() { return taxCommissionForOrder; } public void setTaxCommissionForOrder( @jakarta.annotation.Nullable - OrderTestResponseStandardCommissionForOrder taxCommissionForOrder) { + OrderTestResponseTaxCommissionForOrder taxCommissionForOrder) { this.taxCommissionForOrder = taxCommissionForOrder; } @@ -246,7 +246,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `taxCommissionForOrder` if (jsonObj.get("taxCommissionForOrder") != null && !jsonObj.get("taxCommissionForOrder").isJsonNull()) { - OrderTestResponseStandardCommissionForOrder.validateJsonElement( + OrderTestResponseTaxCommissionForOrder.validateJsonElement( jsonObj.get("taxCommissionForOrder")); } // validate the optional field `discount` diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/StopLimitTimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/StopLimitTimeInForce.java index ec550e26d..1b0fc2da1 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/StopLimitTimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/StopLimitTimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets stopLimitTimeInForce */ +/** Valid values are `GTC`/`FOK`/`IOC` */ @JsonAdapter(StopLimitTimeInForce.Adapter.class) public enum StopLimitTimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SymbolFilters.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SymbolFilters.java index 0eb4e9d1c..f8701c619 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SymbolFilters.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SymbolFilters.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -33,7 +33,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolFilters extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(SymbolFilters.class.getName()); @@ -333,90 +333,6 @@ public SymbolFilters read(JsonReader in) throws IOException { adapterTPlusSellFilter.fromJsonTree(jsonObject); newSymbolFilters.setActualInstance(deserialized); return newSymbolFilters; - case "IcebergPartsFilter": - deserialized = - adapterIcebergPartsFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "LotSizeFilter": - deserialized = - adapterLotSizeFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MarketLotSizeFilter": - deserialized = - adapterMarketLotSizeFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxNumAlgoOrdersFilter": - deserialized = - adapterMaxNumAlgoOrdersFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxNumIcebergOrdersFilter": - deserialized = - adapterMaxNumIcebergOrdersFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxNumOrderAmendsFilter": - deserialized = - adapterMaxNumOrderAmendsFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxNumOrderListsFilter": - deserialized = - adapterMaxNumOrderListsFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxNumOrdersFilter": - deserialized = - adapterMaxNumOrdersFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxPositionFilter": - deserialized = - adapterMaxPositionFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MinNotionalFilter": - deserialized = - adapterMinNotionalFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "NotionalFilter": - deserialized = - adapterNotionalFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "PercentPriceBySideFilter": - deserialized = - adapterPercentPriceBySideFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "PercentPriceFilter": - deserialized = - adapterPercentPriceFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "PriceFilter": - deserialized = adapterPriceFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "TPlusSellFilter": - deserialized = - adapterTPlusSellFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "TrailingDeltaFilter": - deserialized = - adapterTrailingDeltaFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; default: log.log( Level.WARNING, @@ -430,20 +346,7 @@ public SymbolFilters read(JsonReader in) throws IOException { + " MAX_NUM_ORDER_LISTS MAX_POSITION" + " MIN_NOTIONAL NOTIONAL PERCENT_PRICE" + " PERCENT_PRICE_BY_SIDE PRICE_FILTER" - + " TRAILING_DELTA T_PLUS_SELL" - + " IcebergPartsFilter LotSizeFilter" - + " MarketLotSizeFilter" - + " MaxNumAlgoOrdersFilter" - + " MaxNumIcebergOrdersFilter" - + " MaxNumOrderAmendsFilter" - + " MaxNumOrderListsFilter" - + " MaxNumOrdersFilter" - + " MaxPositionFilter MinNotionalFilter" - + " NotionalFilter" - + " PercentPriceBySideFilter" - + " PercentPriceFilter PriceFilter" - + " TPlusSellFilter" - + " TrailingDeltaFilter", + + " TRAILING_DELTA T_PLUS_SELL", jsonObject .get("filterType") .getAsString())); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SymbolStatus.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SymbolStatus.java index b99720303..dfa9c5dc4 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SymbolStatus.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SymbolStatus.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -26,13 +26,9 @@ public enum SymbolStatus { TRADING("TRADING"), - END_OF_DAY("END_OF_DAY"), - HALT("HALT"), - BREAK("BREAK"), - - NON_REPRESENTABLE("NON_REPRESENTABLE"); + BREAK("BREAK"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Symbols.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Symbols.java index 5649a90c8..d5aeebbcf 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Symbols.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Symbols.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** Symbols */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Symbols extends ArrayList { public Symbols() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TPlusSellFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TPlusSellFilter.java index c6aeddc86..65d215ef4 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TPlusSellFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TPlusSellFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TPlusSellFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TPlusSellFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Ticker24hrResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Ticker24hrResponse.java index 89da3e5ce..508bd1fe8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Ticker24hrResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Ticker24hrResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(Ticker24hrResponse.class.getName()); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Ticker24hrResponse1.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Ticker24hrResponse1.java index e353e2f68..469483ba8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Ticker24hrResponse1.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Ticker24hrResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** Ticker24hrResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrResponse1 { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -170,7 +170,7 @@ public Ticker24hrResponse1 symbol(@jakarta.annotation.Nullable String symbol) { } /** - * Get symbol + * Symbol Name * * @return symbol */ @@ -267,7 +267,7 @@ public Ticker24hrResponse1 lastPrice(@jakarta.annotation.Nullable String lastPri } /** - * Get lastPrice + * Closing price of the interval * * @return lastPrice */ @@ -381,7 +381,7 @@ public Ticker24hrResponse1 openPrice(@jakarta.annotation.Nullable String openPri } /** - * Get openPrice + * Opening price of the Interval * * @return openPrice */ @@ -400,7 +400,7 @@ public Ticker24hrResponse1 highPrice(@jakarta.annotation.Nullable String highPri } /** - * Get highPrice + * Highest price in the interval * * @return highPrice */ @@ -419,7 +419,7 @@ public Ticker24hrResponse1 lowPrice(@jakarta.annotation.Nullable String lowPrice } /** - * Get lowPrice + * Lowest price in the interval * * @return lowPrice */ @@ -438,7 +438,7 @@ public Ticker24hrResponse1 volume(@jakarta.annotation.Nullable String volume) { } /** - * Get volume + * Total trade volume (in base asset) * * @return volume */ @@ -457,7 +457,7 @@ public Ticker24hrResponse1 quoteVolume(@jakarta.annotation.Nullable String quote } /** - * Get quoteVolume + * Total trade volume (in quote asset) * * @return quoteVolume */ @@ -476,7 +476,7 @@ public Ticker24hrResponse1 openTime(@jakarta.annotation.Nullable Long openTime) } /** - * Get openTime + * Start of the ticker interval * * @return openTime */ @@ -495,7 +495,7 @@ public Ticker24hrResponse1 closeTime(@jakarta.annotation.Nullable Long closeTime } /** - * Get closeTime + * End of the ticker interval * * @return closeTime */ @@ -514,7 +514,7 @@ public Ticker24hrResponse1 firstId(@jakarta.annotation.Nullable Long firstId) { } /** - * Get firstId + * First tradeId * * @return firstId */ @@ -533,7 +533,7 @@ public Ticker24hrResponse1 lastId(@jakarta.annotation.Nullable Long lastId) { } /** - * Get lastId + * Last tradeId * * @return lastId */ @@ -552,7 +552,7 @@ public Ticker24hrResponse1 count(@jakarta.annotation.Nullable Long count) { } /** - * Get count + * Trade count * * @return count */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Ticker24hrResponse2.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Ticker24hrResponse2.java index 68e2900b0..afac32412 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Ticker24hrResponse2.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Ticker24hrResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** Ticker24hrResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrResponse2 extends ArrayList { public Ticker24hrResponse2() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Ticker24hrResponse2Inner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Ticker24hrResponse2Inner.java index 9ba378af9..f7c60263d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Ticker24hrResponse2Inner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Ticker24hrResponse2Inner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** Ticker24hrResponse2Inner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrResponse2Inner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -170,7 +170,7 @@ public Ticker24hrResponse2Inner symbol(@jakarta.annotation.Nullable String symbo } /** - * Get symbol + * Symbol Name * * @return symbol */ @@ -268,7 +268,7 @@ public Ticker24hrResponse2Inner lastPrice(@jakarta.annotation.Nullable String la } /** - * Get lastPrice + * Closing price of the interval * * @return lastPrice */ @@ -382,7 +382,7 @@ public Ticker24hrResponse2Inner openPrice(@jakarta.annotation.Nullable String op } /** - * Get openPrice + * Opening price of the Interval * * @return openPrice */ @@ -401,7 +401,7 @@ public Ticker24hrResponse2Inner highPrice(@jakarta.annotation.Nullable String hi } /** - * Get highPrice + * Highest price in the interval * * @return highPrice */ @@ -420,7 +420,7 @@ public Ticker24hrResponse2Inner lowPrice(@jakarta.annotation.Nullable String low } /** - * Get lowPrice + * Lowest price in the interval * * @return lowPrice */ @@ -439,7 +439,7 @@ public Ticker24hrResponse2Inner volume(@jakarta.annotation.Nullable String volum } /** - * Get volume + * Total trade volume (in base asset) * * @return volume */ @@ -458,7 +458,7 @@ public Ticker24hrResponse2Inner quoteVolume(@jakarta.annotation.Nullable String } /** - * Get quoteVolume + * Total trade volume (in quote asset) * * @return quoteVolume */ @@ -477,7 +477,7 @@ public Ticker24hrResponse2Inner openTime(@jakarta.annotation.Nullable Long openT } /** - * Get openTime + * Start of the ticker interval * * @return openTime */ @@ -496,7 +496,7 @@ public Ticker24hrResponse2Inner closeTime(@jakarta.annotation.Nullable Long clos } /** - * Get closeTime + * End of the ticker interval * * @return closeTime */ @@ -515,7 +515,7 @@ public Ticker24hrResponse2Inner firstId(@jakarta.annotation.Nullable Long firstI } /** - * Get firstId + * First tradeId * * @return firstId */ @@ -534,7 +534,7 @@ public Ticker24hrResponse2Inner lastId(@jakarta.annotation.Nullable Long lastId) } /** - * Get lastId + * Last tradeId * * @return lastId */ @@ -553,7 +553,7 @@ public Ticker24hrResponse2Inner count(@jakarta.annotation.Nullable Long count) { } /** - * Get count + * Trade count * * @return count */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerBookTickerResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerBookTickerResponse.java index df0bffa04..13453c2e7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerBookTickerResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerBookTickerResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerBookTickerResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(TickerBookTickerResponse.class.getName()); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerBookTickerResponse1.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerBookTickerResponse1.java index f6dcfd7f7..3190bb30d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerBookTickerResponse1.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerBookTickerResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TickerBookTickerResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerBookTickerResponse1 { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -93,7 +93,7 @@ public TickerBookTickerResponse1 bidPrice(@jakarta.annotation.Nullable String bi } /** - * Get bidPrice + * best bid price. * * @return bidPrice */ @@ -112,7 +112,7 @@ public TickerBookTickerResponse1 bidQty(@jakarta.annotation.Nullable String bidQ } /** - * Get bidQty + * bid/ask qty. * * @return bidQty */ @@ -131,7 +131,7 @@ public TickerBookTickerResponse1 askPrice(@jakarta.annotation.Nullable String as } /** - * Get askPrice + * best ask price. * * @return askPrice */ @@ -150,7 +150,7 @@ public TickerBookTickerResponse1 askQty(@jakarta.annotation.Nullable String askQ } /** - * Get askQty + * bid/ask qty. * * @return askQty */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerBookTickerResponse2.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerBookTickerResponse2.java index 0e52c9890..ebcd661dd 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerBookTickerResponse2.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerBookTickerResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TickerBookTickerResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerBookTickerResponse2 extends ArrayList { public TickerBookTickerResponse2() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerBookTickerResponse2Inner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerBookTickerResponse2Inner.java index 58740d96a..f5ea54da8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerBookTickerResponse2Inner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerBookTickerResponse2Inner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TickerBookTickerResponse2Inner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerBookTickerResponse2Inner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -93,7 +93,7 @@ public TickerBookTickerResponse2Inner bidPrice(@jakarta.annotation.Nullable Stri } /** - * Get bidPrice + * best bid price. * * @return bidPrice */ @@ -112,7 +112,7 @@ public TickerBookTickerResponse2Inner bidQty(@jakarta.annotation.Nullable String } /** - * Get bidQty + * bid/ask qty. * * @return bidQty */ @@ -131,7 +131,7 @@ public TickerBookTickerResponse2Inner askPrice(@jakarta.annotation.Nullable Stri } /** - * Get askPrice + * best ask price. * * @return askPrice */ @@ -150,7 +150,7 @@ public TickerBookTickerResponse2Inner askQty(@jakarta.annotation.Nullable String } /** - * Get askQty + * bid/ask qty. * * @return askQty */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerPriceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerPriceResponse.java index 5397d2dae..18e61c31b 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerPriceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerPriceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerPriceResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(TickerPriceResponse.class.getName()); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerPriceResponse1.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerPriceResponse1.java index 358c51ae4..3171fc0cf 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerPriceResponse1.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerPriceResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TickerPriceResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerPriceResponse1 { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerPriceResponse2.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerPriceResponse2.java index 1c03c3f05..e1124abe5 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerPriceResponse2.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerPriceResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TickerPriceResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerPriceResponse2 extends ArrayList { public TickerPriceResponse2() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerPriceResponse2Inner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerPriceResponse2Inner.java index ceefa139a..f762de9a0 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerPriceResponse2Inner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerPriceResponse2Inner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TickerPriceResponse2Inner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerPriceResponse2Inner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerResponse.java index 370a1628c..7cc648418 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(TickerResponse.class.getName()); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerResponse1.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerResponse1.java index 8a624c099..5df51d7f7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerResponse1.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TickerResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerResponse1 { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -153,7 +153,7 @@ public TickerResponse1 priceChange(@jakarta.annotation.Nullable String priceChan } /** - * Get priceChange + * Absolute price change * * @return priceChange */ @@ -173,7 +173,7 @@ public TickerResponse1 priceChangePercent( } /** - * Get priceChangePercent + * Relative price change in percent * * @return priceChangePercent */ @@ -192,7 +192,7 @@ public TickerResponse1 weightedAvgPrice(@jakarta.annotation.Nullable String weig } /** - * Get weightedAvgPrice + * QuoteVolume / Volume * * @return weightedAvgPrice */ @@ -306,7 +306,7 @@ public TickerResponse1 quoteVolume(@jakarta.annotation.Nullable String quoteVolu } /** - * Get quoteVolume + * Sum of (price * volume) for all trades * * @return quoteVolume */ @@ -325,7 +325,7 @@ public TickerResponse1 openTime(@jakarta.annotation.Nullable Long openTime) { } /** - * Get openTime + * Open time for ticker window * * @return openTime */ @@ -344,7 +344,7 @@ public TickerResponse1 closeTime(@jakarta.annotation.Nullable Long closeTime) { } /** - * Get closeTime + * Close time for ticker window * * @return closeTime */ @@ -363,7 +363,7 @@ public TickerResponse1 firstId(@jakarta.annotation.Nullable Long firstId) { } /** - * Get firstId + * Trade IDs * * @return firstId */ @@ -401,7 +401,7 @@ public TickerResponse1 count(@jakarta.annotation.Nullable Long count) { } /** - * Get count + * Number of trades in the interval * * @return count */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerResponse2.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerResponse2.java index 90cea19ee..5e4695faa 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerResponse2.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TickerResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerResponse2 extends ArrayList { public TickerResponse2() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerResponse2Inner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerResponse2Inner.java index c1238d98c..9de69f72a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerResponse2Inner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerResponse2Inner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TickerResponse2Inner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerResponse2Inner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -153,7 +153,7 @@ public TickerResponse2Inner priceChange(@jakarta.annotation.Nullable String pric } /** - * Get priceChange + * Absolute price change * * @return priceChange */ @@ -173,7 +173,7 @@ public TickerResponse2Inner priceChangePercent( } /** - * Get priceChangePercent + * Relative price change in percent * * @return priceChangePercent */ @@ -193,7 +193,7 @@ public TickerResponse2Inner weightedAvgPrice( } /** - * Get weightedAvgPrice + * QuoteVolume / Volume * * @return weightedAvgPrice */ @@ -307,7 +307,7 @@ public TickerResponse2Inner quoteVolume(@jakarta.annotation.Nullable String quot } /** - * Get quoteVolume + * Sum of (price * volume) for all trades * * @return quoteVolume */ @@ -326,7 +326,7 @@ public TickerResponse2Inner openTime(@jakarta.annotation.Nullable Long openTime) } /** - * Get openTime + * Open time for ticker window * * @return openTime */ @@ -345,7 +345,7 @@ public TickerResponse2Inner closeTime(@jakarta.annotation.Nullable Long closeTim } /** - * Get closeTime + * Close time for ticker window * * @return closeTime */ @@ -364,7 +364,7 @@ public TickerResponse2Inner firstId(@jakarta.annotation.Nullable Long firstId) { } /** - * Get firstId + * Trade IDs * * @return firstId */ @@ -402,7 +402,7 @@ public TickerResponse2Inner count(@jakarta.annotation.Nullable Long count) { } /** - * Get count + * Number of trades in the interval * * @return count */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerTradingDayResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerTradingDayResponse.java index f84422492..4c79f516a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerTradingDayResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerTradingDayResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerTradingDayResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(TickerTradingDayResponse.class.getName()); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerTradingDayResponse1.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerTradingDayResponse1.java index 577605934..dea0c9f71 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerTradingDayResponse1.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerTradingDayResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TickerTradingDayResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerTradingDayResponse1 { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -153,7 +153,7 @@ public TickerTradingDayResponse1 priceChange(@jakarta.annotation.Nullable String } /** - * Get priceChange + * Absolute price change * * @return priceChange */ @@ -173,7 +173,7 @@ public TickerTradingDayResponse1 priceChangePercent( } /** - * Get priceChangePercent + * Relative price change in percent * * @return priceChangePercent */ @@ -193,7 +193,7 @@ public TickerTradingDayResponse1 weightedAvgPrice( } /** - * Get weightedAvgPrice + * quoteVolume / volume * * @return weightedAvgPrice */ @@ -288,7 +288,7 @@ public TickerTradingDayResponse1 volume(@jakarta.annotation.Nullable String volu } /** - * Get volume + * Volume in base asset * * @return volume */ @@ -307,7 +307,7 @@ public TickerTradingDayResponse1 quoteVolume(@jakarta.annotation.Nullable String } /** - * Get quoteVolume + * Volume in quote asset * * @return quoteVolume */ @@ -364,7 +364,7 @@ public TickerTradingDayResponse1 firstId(@jakarta.annotation.Nullable Long first } /** - * Get firstId + * Trade ID of the first trade in the interval * * @return firstId */ @@ -383,7 +383,7 @@ public TickerTradingDayResponse1 lastId(@jakarta.annotation.Nullable Long lastId } /** - * Get lastId + * Trade ID of the last trade in the interval * * @return lastId */ @@ -402,7 +402,7 @@ public TickerTradingDayResponse1 count(@jakarta.annotation.Nullable Long count) } /** - * Get count + * Number of trades in the interval * * @return count */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerTradingDayResponse2.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerTradingDayResponse2.java index 590032718..3def965d1 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerTradingDayResponse2.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerTradingDayResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TickerTradingDayResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerTradingDayResponse2 extends ArrayList { public TickerTradingDayResponse2() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerTradingDayResponse2Inner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerTradingDayResponse2Inner.java index b684b108e..708621ea5 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerTradingDayResponse2Inner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerTradingDayResponse2Inner.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TickerTradingDayResponse2Inner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerTradingDayResponse2Inner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -154,7 +154,7 @@ public TickerTradingDayResponse2Inner priceChange( } /** - * Get priceChange + * Absolute price change * * @return priceChange */ @@ -174,7 +174,7 @@ public TickerTradingDayResponse2Inner priceChangePercent( } /** - * Get priceChangePercent + * Relative price change in percent * * @return priceChangePercent */ @@ -194,7 +194,7 @@ public TickerTradingDayResponse2Inner weightedAvgPrice( } /** - * Get weightedAvgPrice + * quoteVolume / volume * * @return weightedAvgPrice */ @@ -289,7 +289,7 @@ public TickerTradingDayResponse2Inner volume(@jakarta.annotation.Nullable String } /** - * Get volume + * Volume in base asset * * @return volume */ @@ -309,7 +309,7 @@ public TickerTradingDayResponse2Inner quoteVolume( } /** - * Get quoteVolume + * Volume in quote asset * * @return quoteVolume */ @@ -366,7 +366,7 @@ public TickerTradingDayResponse2Inner firstId(@jakarta.annotation.Nullable Long } /** - * Get firstId + * Trade ID of the first trade in the interval * * @return firstId */ @@ -385,7 +385,7 @@ public TickerTradingDayResponse2Inner lastId(@jakarta.annotation.Nullable Long l } /** - * Get lastId + * Trade ID of the last trade in the interval * * @return lastId */ @@ -404,7 +404,7 @@ public TickerTradingDayResponse2Inner count(@jakarta.annotation.Nullable Long co } /** - * Get count + * Number of trades in the interval * * @return count */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerType.java index 7678cee04..b36189b14 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TickerType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TimeInForce.java index d915caa86..87f23c40c 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,16 +21,14 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets timeInForce */ +/** Please see [Enums](/products/spot/enums#timeinforce) for supported values. */ @JsonAdapter(TimeInForce.Adapter.class) public enum TimeInForce { GTC("GTC"), IOC("IOC"), - FOK("FOK"), - - NON_REPRESENTABLE("NON_REPRESENTABLE"); + FOK("FOK"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TimeResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TimeResponse.java index 1d8d9f156..9b55b947a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TimeResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TimeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TimeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TimeResponse { public static final String SERIALIZED_NAME_SERVER_TIME = "serverTime"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TrailingDeltaFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TrailingDeltaFilter.java index 45ab2b151..c473387dd 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TrailingDeltaFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TrailingDeltaFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TrailingDeltaFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TrailingDeltaFilter { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/UiKlinesItem.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/UiKlinesItem.java index f691e397c..0926a29cf 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/UiKlinesItem.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/UiKlinesItem.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UiKlinesItem */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UiKlinesItem extends ArrayList { public UiKlinesItem() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/UiKlinesResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/UiKlinesResponse.java index 99fb7e49e..15f2efbf8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/UiKlinesResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/UiKlinesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UiKlinesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UiKlinesResponse extends ArrayList { public UiKlinesResponse() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WindowSize.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WindowSize.java index 6af500045..755854149 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WindowSize.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WindowSize.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -198,7 +198,9 @@ public enum WindowSize { WINDOW_SIZE_5d("5d"), - WINDOW_SIZE_6d("6d"); + WINDOW_SIZE_6d("6d"), + + WINDOW_SIZE_7d("7d"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingPegOffsetType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingPegOffsetType.java index cee7e7aba..f6184dbf9 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingPegOffsetType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingPegOffsetType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingPegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingPegPriceType.java index d53c82127..dfe915db3 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingPegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingPegPriceType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets workingPegPriceType */ +/** See [Pegged Orders](/products/spot/faqs/pegged_orders) */ @JsonAdapter(WorkingPegPriceType.Adapter.class) public enum WorkingPegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingSide.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingSide.java index c8a58710b..99b20bc6d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingSide.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingSide.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets workingSide */ +/** Supported values: [Order Side](/products/spot/enums#side) */ @JsonAdapter(WorkingSide.Adapter.class) public enum WorkingSide { BUY("BUY"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingTimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingTimeInForce.java index a923039f1..e4df4c1fd 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingTimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingTimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets workingTimeInForce */ +/** Supported values: [Time In Force](/products/spot/enums#timeinforce) */ @JsonAdapter(WorkingTimeInForce.Adapter.class) public enum WorkingTimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingType.java index 781634ebb..7f12a40f3 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingType.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets workingType */ +/** Supported values: `LIMIT`, `LIMIT_MAKER` */ @JsonAdapter(WorkingType.Adapter.class) public enum WorkingType { LIMIT("LIMIT"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/JSON.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/JSON.java index 03ba7b3a2..460ddbab4 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/JSON.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -62,38 +62,6 @@ public class JSON { public static GsonBuilder createGson() { GsonFireBuilder fireBuilder = new GsonFireBuilder() - .registerTypeSelector( - com.binance.connector.client.spot.websocket.api.model.AssetFilters - .class, - new TypeSelector< - com.binance.connector.client.spot.websocket.api.model - .AssetFilters>() { - @Override - public Class< - ? extends - com.binance.connector.client.spot - .websocket.api.model - .AssetFilters> - getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = - new HashMap(); - classByDiscriminatorValue.put( - "MAX_ASSET", - com.binance.connector.client.spot.websocket.api - .model.MaxAssetFilter.class); - classByDiscriminatorValue.put( - "MaxAssetFilter", - com.binance.connector.client.spot.websocket.api - .model.MaxAssetFilter.class); - classByDiscriminatorValue.put( - "assetFilters", - com.binance.connector.client.spot.websocket.api - .model.AssetFilters.class); - return getClassByDiscriminator( - classByDiscriminatorValue, - getDiscriminatorValue(readElement, "filterType")); - } - }) .registerTypeSelector( com.binance.connector.client.spot.websocket.api.model .ExchangeFilters.class, @@ -128,25 +96,6 @@ public static GsonBuilder createGson() { com.binance.connector.client.spot.websocket.api .model.ExchangeMaxNumOrderListsFilter .class); - classByDiscriminatorValue.put( - "ExchangeMaxNumAlgoOrdersFilter", - com.binance.connector.client.spot.websocket.api - .model.ExchangeMaxNumAlgoOrdersFilter - .class); - classByDiscriminatorValue.put( - "ExchangeMaxNumIcebergOrdersFilter", - com.binance.connector.client.spot.websocket.api - .model.ExchangeMaxNumIcebergOrdersFilter - .class); - classByDiscriminatorValue.put( - "ExchangeMaxNumOrderListsFilter", - com.binance.connector.client.spot.websocket.api - .model.ExchangeMaxNumOrderListsFilter - .class); - classByDiscriminatorValue.put( - "ExchangeMaxNumOrdersFilter", - com.binance.connector.client.spot.websocket.api - .model.ExchangeMaxNumOrdersFilter.class); classByDiscriminatorValue.put( "exchangeFilters", com.binance.connector.client.spot.websocket.api @@ -235,70 +184,6 @@ public static GsonBuilder createGson() { "T_PLUS_SELL", com.binance.connector.client.spot.websocket.api .model.TPlusSellFilter.class); - classByDiscriminatorValue.put( - "IcebergPartsFilter", - com.binance.connector.client.spot.websocket.api - .model.IcebergPartsFilter.class); - classByDiscriminatorValue.put( - "LotSizeFilter", - com.binance.connector.client.spot.websocket.api - .model.LotSizeFilter.class); - classByDiscriminatorValue.put( - "MarketLotSizeFilter", - com.binance.connector.client.spot.websocket.api - .model.MarketLotSizeFilter.class); - classByDiscriminatorValue.put( - "MaxNumAlgoOrdersFilter", - com.binance.connector.client.spot.websocket.api - .model.MaxNumAlgoOrdersFilter.class); - classByDiscriminatorValue.put( - "MaxNumIcebergOrdersFilter", - com.binance.connector.client.spot.websocket.api - .model.MaxNumIcebergOrdersFilter.class); - classByDiscriminatorValue.put( - "MaxNumOrderAmendsFilter", - com.binance.connector.client.spot.websocket.api - .model.MaxNumOrderAmendsFilter.class); - classByDiscriminatorValue.put( - "MaxNumOrderListsFilter", - com.binance.connector.client.spot.websocket.api - .model.MaxNumOrderListsFilter.class); - classByDiscriminatorValue.put( - "MaxNumOrdersFilter", - com.binance.connector.client.spot.websocket.api - .model.MaxNumOrdersFilter.class); - classByDiscriminatorValue.put( - "MaxPositionFilter", - com.binance.connector.client.spot.websocket.api - .model.MaxPositionFilter.class); - classByDiscriminatorValue.put( - "MinNotionalFilter", - com.binance.connector.client.spot.websocket.api - .model.MinNotionalFilter.class); - classByDiscriminatorValue.put( - "NotionalFilter", - com.binance.connector.client.spot.websocket.api - .model.NotionalFilter.class); - classByDiscriminatorValue.put( - "PercentPriceBySideFilter", - com.binance.connector.client.spot.websocket.api - .model.PercentPriceBySideFilter.class); - classByDiscriminatorValue.put( - "PercentPriceFilter", - com.binance.connector.client.spot.websocket.api - .model.PercentPriceFilter.class); - classByDiscriminatorValue.put( - "PriceFilter", - com.binance.connector.client.spot.websocket.api - .model.PriceFilter.class); - classByDiscriminatorValue.put( - "TPlusSellFilter", - com.binance.connector.client.spot.websocket.api - .model.TPlusSellFilter.class); - classByDiscriminatorValue.put( - "TrailingDeltaFilter", - com.binance.connector.client.spot.websocket.api - .model.TrailingDeltaFilter.class); classByDiscriminatorValue.put( "symbolFilters", com.binance.connector.client.spot.websocket.api @@ -411,6 +296,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.AccountCommissionResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .AccountCommissionResponseRateLimitsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model .AccountCommissionResponseResult.CustomTypeAdapterFactory()); @@ -461,6 +349,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model .AllOrderListsResponseResultInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .AllOrderListsResponseResultInnerOrdersInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.AllOrdersRequest .CustomTypeAdapterFactory()); @@ -470,9 +361,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model .AllOrdersResponseResultInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.api.model.AssetFilters - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.AvgPriceRequest .CustomTypeAdapterFactory()); @@ -485,6 +373,18 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.BalanceUpdate .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .BlockTradesHistoricalRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .BlockTradesHistoricalResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .BlockTradesHistoricalResponseRateLimitsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .BlockTradesHistoricalResponseResultInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.DepthRequest .CustomTypeAdapterFactory()); @@ -506,15 +406,12 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.ExchangeInfoResponse .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.api.model.ExchangeInfoResponseResult - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model - .ExchangeInfoResponseResultSorsInner.CustomTypeAdapterFactory()); + .ExchangeInfoResponseSorsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model - .ExchangeInfoResponseResultSymbolsInner.CustomTypeAdapterFactory()); + .ExchangeInfoResponseSymbolsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model .ExchangeMaxNumAlgoOrdersFilter.CustomTypeAdapterFactory()); @@ -552,18 +449,15 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.IcebergPartsFilter .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.api.model.KlinesItem - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.api.model.KlinesItemInner - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.KlinesRequest .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.KlinesResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .KlinesResponseResultInnerInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.ListStatus .CustomTypeAdapterFactory()); @@ -615,9 +509,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.MyFiltersResponse .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.api.model.MyFiltersResponseResult - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.MyPreventedMatchesRequest .CustomTypeAdapterFactory()); @@ -744,9 +635,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model .OrderListCancelResponseResultOrderReportsInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.api.model - .OrderListCancelResponseResultOrdersInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.OrderListPlaceOcoRequest .CustomTypeAdapterFactory()); @@ -845,6 +733,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.OrderListStatusResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .OrderListStatusResponseResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.OrderPlaceRequest .CustomTypeAdapterFactory()); @@ -878,10 +769,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model .OrderTestResponseResultDiscount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.api.model - .OrderTestResponseResultSpecialCommissionForOrder - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model .OrderTestResponseResultStandardCommissionForOrder @@ -1018,6 +905,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.TickerBookResponse2 .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .TickerBookResponse2ResultInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.TickerPriceRequest .CustomTypeAdapterFactory()); @@ -1099,9 +989,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.TrailingDeltaFilter .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.api.model.UiKlinesItem - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.UiKlinesRequest .CustomTypeAdapterFactory()); @@ -1116,7 +1003,7 @@ private static Class getClassByDiscriminator( .UserDataStreamSubscribeResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model - .UserDataStreamSubscribeSignatureRequest.CustomTypeAdapterFactory()); + .UserDataStreamSubscribeResponseResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model .UserDataStreamSubscribeSignatureResponse.CustomTypeAdapterFactory()); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/AccountApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/AccountApi.java index e437fab2d..88d58cfe8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/AccountApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/AccountApi.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -67,7 +67,8 @@ public ConnectionInterface getConnection() { } /** - * WebSocket Account Commission Rates Get current account commission rates. Weight: 20 + * Account Commission Rates (USER_DATA) Get current account commission rates. Weight(IP): 20 + * Security Type: USER_DATA Notes: **Data Source:** Database * * @param accountCommissionRequest (required) * @return AccountCommissionResponse @@ -81,8 +82,8 @@ public ConnectionInterface getConnection() { * * * @see WebSocket - * Account Commission Rates Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#account-commission">Account + * Commission Rates (USER_DATA) Documentation */ public CompletableFuture accountCommission( AccountCommissionRequest accountCommissionRequest) throws ApiException { @@ -129,8 +130,8 @@ private void accountCommissionValidateBeforeCall( } /** - * WebSocket Unfilled Order Count Query your current unfilled order count for all intervals. - * Weight: 40 + * Unfilled Order Count (USER_DATA) Query your current unfilled order count for all intervals. + * Weight(IP): 40 Security Type: USER_DATA Notes: **Data Source:** Memory * * @param accountRateLimitsOrdersRequest (optional) * @return AccountRateLimitsOrdersResponse @@ -144,8 +145,8 @@ private void accountCommissionValidateBeforeCall( * * * @see WebSocket - * Unfilled Order Count Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#account-rate-limits-orders">Unfilled + * Order Count (USER_DATA) Documentation */ public CompletableFuture accountRateLimitsOrders( AccountRateLimitsOrdersRequest accountRateLimitsOrdersRequest) throws ApiException { @@ -194,7 +195,8 @@ private void accountRateLimitsOrdersValidateBeforeCall( } /** - * WebSocket Account information Query information about your account. Weight: 20 + * Account information (USER_DATA) Query information about your account. Weight(IP): 20 Security + * Type: USER_DATA Notes: **Data Source:** Memory => Database * * @param accountStatusRequest (optional) * @return AccountStatusResponse @@ -208,8 +210,8 @@ private void accountRateLimitsOrdersValidateBeforeCall( * * * @see WebSocket - * Account information Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#account-status">Account + * information (USER_DATA) Documentation */ public CompletableFuture accountStatus( AccountStatusRequest accountStatusRequest) throws ApiException { @@ -255,8 +257,14 @@ private void accountStatusValidateBeforeCall(AccountStatusRequest accountStatusR } /** - * WebSocket Account order list history Query information about all your order lists, filtered - * by time range. Weight: 20 + * Account order list history (USER_DATA) Query information about all your order lists, filtered + * by time range. Weight(IP): 20 Security Type: USER_DATA Notes: **Data Source:** Database + * Notes: * If `startTime` and/or `endTime` are specified, + * `fromId` is ignored. Order lists are filtered by `transactionTime` of the + * last order list execution status update. * If `fromId` is specified, return order + * lists with order list ID >= `fromId`. * If no condition is specified, the + * most recent order lists are returned. * The time between `startTime` and + * `endTime` can't be longer than 24 hours. * * @param allOrderListsRequest (optional) * @return AllOrderListsResponse @@ -270,8 +278,8 @@ private void accountStatusValidateBeforeCall(AccountStatusRequest accountStatusR * * * @see WebSocket - * Account order list history Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#all-order-lists">Account + * order list history (USER_DATA) Documentation */ public CompletableFuture allOrderLists( AllOrderListsRequest allOrderListsRequest) throws ApiException { @@ -317,8 +325,15 @@ private void allOrderListsValidateBeforeCall(AllOrderListsRequest allOrderListsR } /** - * WebSocket Account order history Query information about all your orders – active, canceled, - * filled – filtered by time range. Weight: 20 + * Account order history (USER_DATA) Query information about all your orders – active, canceled, + * filled – filtered by time range. Weight(IP): 20 Security Type: USER_DATA Notes: **Data + * Source:** Database Notes: * If `startTime` and/or `endTime` are + * specified, `orderId` is ignored. Orders are filtered by `time` of the + * last execution status update. * If `orderId` is specified, return orders with order + * ID >= `orderId`. * If no condition is specified, the most recent orders are + * returned. * For some historical orders the `cummulativeQuoteQty` response field may + * be negative, meaning the data is not available at this time. * The time between + * `startTime` and `endTime` can't be longer than 24 hours. * * @param allOrdersRequest (required) * @return AllOrdersResponse @@ -332,8 +347,8 @@ private void allOrderListsValidateBeforeCall(AllOrderListsRequest allOrderListsR * * * @see WebSocket - * Account order history Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#all-orders">Account + * order history (USER_DATA) Documentation */ public CompletableFuture allOrders(AllOrdersRequest allOrdersRequest) throws ApiException { @@ -379,8 +394,18 @@ private void allOrdersValidateBeforeCall(AllOrdersRequest allOrdersRequest) } /** - * WebSocket Account allocations Retrieves allocations resulting from SOR order placement. - * Weight: 20 + * Account allocations (USER_DATA) Retrieves allocations resulting from SOR order placement. + * Weight(IP): 20 Security Type: USER_DATA Notes: **Data Source:** Database Supported parameter + * combinations: Parameters | Response | ------------------------------------------- | -------- + * | `symbol` | allocations from oldest to newest | `symbol` + + * `startTime` | oldest allocations since `startTime` | `symbol` + + * `endTime` | newest allocations until `endTime` | `symbol` + + * `startTime` + `endTime` | allocations within the time range | + * `symbol` + `fromAllocationId` | allocations by allocation ID | + * `symbol` + `orderId` | allocations related to an order starting with + * oldest | `symbol` + `orderId` + `fromAllocationId` | + * allocations related to an order by allocation ID | **Note:** The time between + * `startTime` and `endTime` can't be longer than 24 hours. * * @param myAllocationsRequest (required) * @return MyAllocationsResponse @@ -394,8 +419,8 @@ private void allOrdersValidateBeforeCall(AllOrdersRequest allOrdersRequest) * * * @see WebSocket - * Account allocations Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#my-allocations">Account + * allocations (USER_DATA) Documentation */ public CompletableFuture myAllocations( MyAllocationsRequest myAllocationsRequest) throws ApiException { @@ -441,9 +466,10 @@ private void myAllocationsValidateBeforeCall(MyAllocationsRequest myAllocationsR } /** - * WebSocket Query Relevant Filters Retrieves the list of [filters](filters.md) relevant to an - * account on a given symbol. This is the only method that shows if an account has - * `MAX_ASSET` filters applied to it. Weight: 40 + * Query Relevant Filters (USER_DATA) Retrieves the list of [filters](/products/spot/filters) + * relevant to an account on a given symbol. This is the only method that shows if an account + * has [`MAX_ASSET`](/products/spot/filters#max_asset) filters applied to it. + * Weight(IP): 40 Security Type: USER_DATA Notes: **Data Source:** Memory * * @param myFiltersRequest (required) * @return MyFiltersResponse @@ -457,8 +483,8 @@ private void myAllocationsValidateBeforeCall(MyAllocationsRequest myAllocationsR * * * @see WebSocket - * Query Relevant Filters Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#my-filters">Query + * Relevant Filters (USER_DATA) Documentation */ public CompletableFuture myFilters(MyFiltersRequest myFiltersRequest) throws ApiException { @@ -504,13 +530,14 @@ private void myFiltersValidateBeforeCall(MyFiltersRequest myFiltersRequest) } /** - * WebSocket Account prevented matches Displays the list of orders that were expired due to STP. - * These are the combinations supported: * `symbol` + `preventedMatchId` * - * `symbol` + `orderId` * `symbol` + `orderId` + - * `fromPreventedMatchId` (`limit` will default to 500) * `symbol` - * + `orderId` + `fromPreventedMatchId` + `limit` Weight: Case | - * Weight ---- | ----- If `symbol` is invalid | 2 Querying by - * `preventedMatchId` | 2 Querying by `orderId` | 20 + * Account prevented matches (USER_DATA) Displays the list of orders that were expired due to + * STP. These are the combinations supported: * `symbol` + + * `preventedMatchId` * `symbol` + `orderId` * `symbol` + * + `orderId` + `fromPreventedMatchId` (`limit` will default to + * 500) * `symbol` + `orderId` + `fromPreventedMatchId` + + * `limit` Weight: Case | Weight ---- | ----- If `symbol` is invalid | 2 + * Querying by `preventedMatchId` | 2 Querying by `orderId` | 20 Security + * Type: USER_DATA Notes: **Data Source:** Database * * @param myPreventedMatchesRequest (required) * @return MyPreventedMatchesResponse @@ -524,8 +551,8 @@ private void myFiltersValidateBeforeCall(MyFiltersRequest myFiltersRequest) * * * @see WebSocket - * Account prevented matches Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#my-prevented-matches">Account + * prevented matches (USER_DATA) Documentation */ public CompletableFuture myPreventedMatches( MyPreventedMatchesRequest myPreventedMatchesRequest) throws ApiException { @@ -572,8 +599,17 @@ private void myPreventedMatchesValidateBeforeCall( } /** - * WebSocket Account trade history Query information about all your trades, filtered by time - * range. Weight: Condition| Weight| ---| --- |Without orderId|20| |With orderId|5| + * Account trade history (USER_DATA) Query information about all your trades, filtered by time + * range. Weight: Condition| Weight| ---| --- |Without orderId|20| |With orderId|5| Security + * Type: USER_DATA Notes: Data Source: Memory => Database Notes: - If `fromId` + * is specified, return trades with trade ID >= `fromId`. - If + * `startTime` and/or `endTime` are specified, trades are filtered by + * execution time (`time`). - `fromId` cannot be used together with + * `startTime` and `endTime`. - If `orderId` is specified, only + * trades related to that order are returned. - `startTime` and `endTime` + * cannot be used together with `orderId`. - If no condition is specified, the most + * recent trades are returned. - The time between `startTime` and `endTime` + * can't be longer than 24 hours. * * @param myTradesRequest (required) * @return MyTradesResponse @@ -587,8 +623,8 @@ private void myPreventedMatchesValidateBeforeCall( * * * @see WebSocket - * Account trade history Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#my-trades">Account + * trade history (USER_DATA) Documentation */ public CompletableFuture myTrades(MyTradesRequest myTradesRequest) throws ApiException { @@ -633,10 +669,11 @@ private void myTradesValidateBeforeCall(MyTradesRequest myTradesRequest) throws } /** - * WebSocket Current open Order lists Query execution status of all open order lists. If you + * Current open Order lists (USER_DATA) Query execution status of all open order lists. If you * need to continuously monitor order status updates, please consider using WebSocket Streams: * - * `userDataStream.start` request * `executionReport` user data stream event - * Weight: 6 + * `userDataStream.subscribe` if on an authenticated session * + * `userDataStream.subscribe.signature` if subscribing through signature subscription + * Weight(IP): 6 Security Type: USER_DATA Notes: **Data Source:** Memory -> Database * * @param openOrderListsStatusRequest (optional) * @return OpenOrderListsStatusResponse @@ -650,8 +687,8 @@ private void myTradesValidateBeforeCall(MyTradesRequest myTradesRequest) throws * * * @see WebSocket - * Current open Order lists Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#open-order-lists-status">Current + * open Order lists (USER_DATA) Documentation */ public CompletableFuture openOrderListsStatus( OpenOrderListsStatusRequest openOrderListsStatusRequest) throws ApiException { @@ -698,11 +735,12 @@ private void openOrderListsStatusValidateBeforeCall( } /** - * WebSocket Current open orders Query execution status of all open orders. If you need to + * Current open orders (USER_DATA) Query execution status of all open orders. If you need to * continuously monitor order status updates, please consider using WebSocket Streams: * - * `userDataStream.start` request * `executionReport` user data stream event - * Weight: Adjusted based on the number of requested symbols: | Parameter | Weight | | --------- - * | ------ | | `symbol` | 6 | | none | 80 | + * `userDataStream.subscribe` if on an authenticated session * + * `userDataStream.subscribe.signature` if subscribing through signature subscription + * Weight: | Parameter | Weight | | --------- | ------ | | `symbol` | 6 | | none | 80 + * | Security Type: USER_DATA Notes: Data Source: Memory => Database * * @param openOrdersStatusRequest (optional) * @return OpenOrdersStatusResponse @@ -716,8 +754,8 @@ private void openOrderListsStatusValidateBeforeCall( * * * @see WebSocket - * Current open orders Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#open-orders-status">Current + * open orders (USER_DATA) Documentation */ public CompletableFuture openOrdersStatus( OpenOrdersStatusRequest openOrdersStatusRequest) throws ApiException { @@ -764,7 +802,8 @@ private void openOrdersStatusValidateBeforeCall(OpenOrdersStatusRequest openOrde } /** - * WebSocket Query Order Amendments Queries all amendments of a single order. Weight: 4 + * Query Order Amendments (USER_DATA) Queries all amendments of a single order. Weight(IP): 4 + * Security Type: USER_DATA Notes: **Data Source:** Database * * @param orderAmendmentsRequest (required) * @return OrderAmendmentsResponse @@ -778,8 +817,8 @@ private void openOrdersStatusValidateBeforeCall(OpenOrdersStatusRequest openOrde * * * @see WebSocket - * Query Order Amendments Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#order-amendments">Query + * Order Amendments (USER_DATA) Documentation */ public CompletableFuture orderAmendments( OrderAmendmentsRequest orderAmendmentsRequest) throws ApiException { @@ -825,8 +864,12 @@ private void orderAmendmentsValidateBeforeCall(OrderAmendmentsRequest orderAmend } /** - * WebSocket Query Order list Check execution status of an Order list. For execution status of - * individual orders, use `order.status`. Weight: 4 + * Query Order list (USER_DATA) Check execution status of an Order list. For execution status of + * individual orders, use `order.status`. Weight(IP): 4 Security Type: USER_DATA + * Notes: **Data Source:** Database Notes: * `origClientOrderId` refers to + * `listClientOrderId` of the order list itself. * If both + * `origClientOrderId` and `orderListId` parameters are specified, only + * `origClientOrderId` is used and `orderListId` is ignored. * * @param orderListStatusRequest (optional) * @return OrderListStatusResponse @@ -840,8 +883,8 @@ private void orderAmendmentsValidateBeforeCall(OrderAmendmentsRequest orderAmend * * * @see WebSocket - * Query Order list Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#order-list-status">Query + * Order list (USER_DATA) Documentation */ public CompletableFuture orderListStatus( OrderListStatusRequest orderListStatusRequest) throws ApiException { @@ -887,7 +930,13 @@ private void orderListStatusValidateBeforeCall(OrderListStatusRequest orderListS } /** - * WebSocket Query order Check execution status of an order. Weight: 4 + * Query order (USER_DATA) Check execution status of an order. Weight(IP): 4 Security Type: + * USER_DATA Notes: **Data Source:** Memory => Database Notes: * If both + * `orderId` and `origClientOrderId` are provided, the `orderId` + * is searched first, then the `origClientOrderId` from that result is checked against + * that order. If both conditions are not met the request will be rejected. * For some + * historical orders the `cummulativeQuoteQty` response field may be negative, meaning + * the data is not available at this time. * * @param orderStatusRequest (required) * @return OrderStatusResponse @@ -901,8 +950,8 @@ private void orderListStatusValidateBeforeCall(OrderListStatusRequest orderListS * * * @see WebSocket - * Query order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#order-status">Query + * order (USER_DATA) Documentation */ public CompletableFuture orderStatus(OrderStatusRequest orderStatusRequest) throws ApiException { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/AuthApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/AuthApi.java index 5c87eea81..e22812a0e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/AuthApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/AuthApi.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -44,11 +44,12 @@ public ConnectionInterface getConnection() { } /** - * WebSocket Log in with API key Authenticate WebSocket connection using the provided API key. + * Log in with API key (USER_DATA) Authenticate WebSocket connection using the provided API key. * After calling `session.logon`, you can omit `apiKey` and * `signature` parameters for future requests that require them. Note that only one * API key can be authenticated. Calling `session.logon` multiple times changes the - * current authenticated API key. Weight: 2 + * current authenticated API key. **Note:** Only Ed25519 keys are supported for this feature. + * Weight(IP): 2 Security Type: USER_DATA Notes: **Data Source:** Memory * * @param sessionLogonRequest (optional) * @return SessionLogonResponse @@ -62,8 +63,8 @@ public ConnectionInterface getConnection() { * * * @see WebSocket - * Log in with API key Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/auth#session-logon">Log + * in with API key (USER_DATA) Documentation */ public CompletableFuture sessionLogon( SessionLogonRequest sessionLogonRequest) throws ApiException { @@ -109,11 +110,11 @@ private void sessionLogonValidateBeforeCall(SessionLogonRequest sessionLogonRequ } /** - * WebSocket Log out of the session Forget the API key previously authenticated. If the - * connection is not authenticated, this request does nothing. Note that the WebSocket - * connection stays open after `session.logout` request. You can continue using the - * connection, but now you will have to explicitly provide the `apiKey` and - * `signature` parameters where needed. Weight: 2 + * Log out of the session Forget the API key previously authenticated. If the connection is not + * authenticated, this request does nothing. Note that the WebSocket connection stays open after + * `session.logout` request. You can continue using the connection, but now you will + * have to explicitly provide the `apiKey` and `signature` parameters where + * needed. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory * * @return SessionLogoutResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -126,8 +127,8 @@ private void sessionLogonValidateBeforeCall(SessionLogonRequest sessionLogonRequ * * * @see WebSocket - * Log out of the session Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/auth#session-logout">Log + * out of the session Documentation */ public CompletableFuture sessionLogout() throws ApiException { sessionLogoutValidateBeforeCall(); @@ -153,8 +154,9 @@ public CompletableFuture sessionLogout() throws ApiExcept private void sessionLogoutValidateBeforeCall() throws ApiException {} /** - * WebSocket Query session status Query the status of the WebSocket connection, inspecting which - * API key (if any) is used to authorize requests. Weight: 2 + * Query session status Query the status of the WebSocket connection, inspecting which API key + * (if any) is used to authorize requests. Weight(IP): 2 Security Type: NONE Notes: **Data + * Source:** Memory * * @return SessionStatusResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -167,8 +169,8 @@ private void sessionLogoutValidateBeforeCall() throws ApiException {} * * * @see WebSocket - * Query session status Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/auth#session-status">Query + * session status Documentation */ public CompletableFuture sessionStatus() throws ApiException { sessionStatusValidateBeforeCall(); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/GeneralApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/GeneralApi.java index 75aac6848..149e77eb0 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/GeneralApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/GeneralApi.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -46,8 +46,24 @@ public ConnectionInterface getConnection() { } /** - * WebSocket Exchange information Query current exchange trading rules, rate limits, and symbol - * information. Weight: 20 + * Exchange information Query current exchange trading rules, rate limits, and symbol + * information. Weight(IP): 20 Security Type: NONE Notes: **Data Source:** Memory **Notes:** * + * If the value provided to `symbol` or `symbols` do not exist, the endpoint + * will throw an error saying the symbol is invalid. * All parameters are optional. * Only one + * of `symbol`, `symbols`, `permissions` parameters can be + * specified. * Without parameters, `exchangeInfo` displays all symbols with + * `[\"SPOT\", \"MARGIN\", \"LEVERAGED\"]` permissions. + * * In order to list *all* active symbols on the exchange, you need to explicitly request all + * permissions. * `permissions` accepts either a list of permissions, or a single + * permission name. E.g. `\"SPOT\"`. **Examples of Symbol Permissions + * Interpretation from the Response:** * `[[\"A\",\"B\"]]` means + * you may place an order if your account has either permission \"A\" **or** + * permission \"B\". * `[[\"A\"],[\"B\"]]` means you can + * place an order if your account has permission \"A\" **and** permission + * \"B\". * `[[\"A\"],[\"B\",\"C\"]]` means + * you can place an order if your account has permission \"A\" **and** permission + * \"B\" or permission \"C\". (Inclusive or is applied here, not exclusive + * or, so your account may have both permission \"B\" and permission \"C\".) * * @param exchangeInfoRequest (optional) * @return ExchangeInfoResponse @@ -61,8 +77,8 @@ public ConnectionInterface getConnection() { * * * @see WebSocket - * Exchange information Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/general#exchange-info">Exchange + * information Documentation */ public CompletableFuture exchangeInfo( ExchangeInfoRequest exchangeInfoRequest) throws ApiException { @@ -109,9 +125,10 @@ private void exchangeInfoValidateBeforeCall(ExchangeInfoRequest exchangeInfoRequ } /** - * WebSocket Query Execution Rules Weight: Parameter | Weight| --- | --- `symbol` | 2 - * `symbols` | 2 for each `symbol`, capped at a max of 40| - * `symbolStatus` |40| None |40| + * Query Execution Rules Query execution rules for symbols. Weight: Parameter | Weight --- | --- + * `symbol` | 2 `symbols` | 2 for each `symbol`, capped at a max + * of 40 `symbolStatus` | 40 None | 40 Security Type: NONE Notes: **Data Source:** + * Memory **Note:** No combination of multiple parameters is allowed. * * @param executionRulesRequest (optional) * @return ExecutionRulesResponse @@ -125,8 +142,8 @@ private void exchangeInfoValidateBeforeCall(ExchangeInfoRequest exchangeInfoRequ * * * @see WebSocket - * Query Execution Rules Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/general#execution-rules">Query + * Execution Rules Documentation */ public CompletableFuture executionRules( ExecutionRulesRequest executionRulesRequest) throws ApiException { @@ -173,7 +190,10 @@ private void executionRulesValidateBeforeCall(ExecutionRulesRequest executionRul } /** - * WebSocket Test connectivity Test connectivity to the WebSocket API. Weight: 1 + * Test connectivity Test connectivity to the WebSocket API. Note: You can use regular WebSocket + * ping frames to test connectivity as well, WebSocket API will respond with pong frames as soon + * as possible. ping request along with time is a safe way to test request-response handling in + * your application. Weight(IP): 1 Security Type: NONE Notes: **Data Source:** Memory * * @return PingResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -186,8 +206,8 @@ private void executionRulesValidateBeforeCall(ExecutionRulesRequest executionRul * * * @see WebSocket - * Test connectivity Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/general#ping">Test + * connectivity Documentation */ public CompletableFuture ping() throws ApiException { pingValidateBeforeCall(); @@ -213,8 +233,8 @@ public CompletableFuture ping() throws ApiException { private void pingValidateBeforeCall() throws ApiException {} /** - * WebSocket Check server time Test connectivity to the WebSocket API and get the current server - * time. Weight: 1 + * Check server time Test connectivity to the WebSocket API and get the current server time. + * Weight(IP): 1 Security Type: NONE Notes: **Data Source:** Memory * * @return TimeResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -227,8 +247,8 @@ private void pingValidateBeforeCall() throws ApiException {} * * * @see WebSocket - * Check server time Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/general#time">Check + * server time Documentation */ public CompletableFuture time() throws ApiException { timeValidateBeforeCall(); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/MarketApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/MarketApi.java index 8f940766f..16422b4a6 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/MarketApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/MarketApi.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -18,6 +18,8 @@ import com.binance.connector.client.common.websocket.dtos.ApiRequestWrapperDTO; import com.binance.connector.client.spot.websocket.api.model.AvgPriceRequest; import com.binance.connector.client.spot.websocket.api.model.AvgPriceResponse; +import com.binance.connector.client.spot.websocket.api.model.BlockTradesHistoricalRequest; +import com.binance.connector.client.spot.websocket.api.model.BlockTradesHistoricalResponse; import com.binance.connector.client.spot.websocket.api.model.DepthRequest; import com.binance.connector.client.spot.websocket.api.model.DepthResponse; import com.binance.connector.client.spot.websocket.api.model.KlinesRequest; @@ -67,7 +69,8 @@ public ConnectionInterface getConnection() { } /** - * WebSocket Current average price Get current average price for a symbol. Weight: 2 + * Current average price Get current average price for a symbol. Weight(IP): 2 Security Type: + * NONE Notes: **Data Source:** Memory * * @param avgPriceRequest (required) * @return AvgPriceResponse @@ -81,8 +84,8 @@ public ConnectionInterface getConnection() { * * * @see WebSocket - * Current average price Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#avg-price">Current + * average price Documentation */ public CompletableFuture avgPrice(AvgPriceRequest avgPriceRequest) throws ApiException { @@ -128,14 +131,78 @@ private void avgPriceValidateBeforeCall(AvgPriceRequest avgPriceRequest) throws } /** - * WebSocket Order book Get current order book. Note that this request returns limited market - * depth. If you need to continuously monitor order book updates, please consider using - * WebSocket Streams: * `<symbol>@depth<levels>` * - * `<symbol>@depth` You can use `depth` request together with - * `<symbol>@depth` streams to [maintain a local order - * book](web-socket-streams.md#how-to-manage-a-local-order-book-correctly). Weight: Adjusted - * based on the limit: | Limit | Weight | |:---------:|:------:| | 1–100 | 5 | | 101–500 | 25| | - * 501–1000 | 50 | | 1001–5000 | 250 | + * Historical Block Trades Get block trades. Weight(IP): 25 Security Type: NONE Notes: - Data + * Source: Database + * + * @param blockTradesHistoricalRequest (required) + * @return BlockTradesHistoricalResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Historical Block Trades -
+ * + * @see Historical + * Block Trades Documentation + */ + public CompletableFuture blockTradesHistorical( + BlockTradesHistoricalRequest blockTradesHistoricalRequest) throws ApiException { + blockTradesHistoricalValidateBeforeCall(blockTradesHistoricalRequest); + String methodName = "/blockTrades.historical".substring(1); + ApiRequestWrapperDTO build = + new ApiRequestWrapperDTO.Builder< + BlockTradesHistoricalRequest, BlockTradesHistoricalResponse>() + .id(getRequestID()) + .method(methodName) + .params(blockTradesHistoricalRequest) + .responseType(BlockTradesHistoricalResponse.class) + .signed(false) + .build(); + + try { + connection.send(build); + } catch (InterruptedException e) { + throw new ApiException(e); + } + return build.getResponseCallback(); + } + + @SuppressWarnings("rawtypes") + private void blockTradesHistoricalValidateBeforeCall( + BlockTradesHistoricalRequest blockTradesHistoricalRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(blockTradesHistoricalRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Order book Get current order book. Note that this request returns limited market depth. If + * you need to continuously monitor order book updates, please consider using WebSocket Streams: + * * `<symbol>@depth<levels>` * `<symbol>@depth` You can + * use `depth` request together with `<symbol>@depth` streams to + * [maintain a local order + * book](/products/spot/web-socket-streams#how-to-manage-a-local-order-book-correctly). Weight: + * Adjusted based on the limit: |Limit|Request Weight ------|------- 1-100| 5 101-500| 25 + * 501-1000| 50 1001-5000| 250 Security Type: NONE Notes: **Data Source:** Memory * * @param depthRequest (required) * @return DepthResponse @@ -149,8 +216,8 @@ private void avgPriceValidateBeforeCall(AvgPriceRequest avgPriceRequest) throws * * * @see WebSocket - * Order book Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#depth">Order + * book Documentation */ public CompletableFuture depth(DepthRequest depthRequest) throws ApiException { depthValidateBeforeCall(depthRequest); @@ -194,11 +261,23 @@ private void depthValidateBeforeCall(DepthRequest depthRequest) throws ApiExcept } /** - * WebSocket Klines Get klines (candlestick bars). Klines are uniquely identified by their open - * & close time. If you need access to real-time kline updates, please consider using - * WebSocket Streams: * `<symbol>@kline_<interval>` If you need historical - * kline data, please consider using - * [data.binance.vision](https://github.com/binance/binance-public-data/#klines). Weight: 2 + * Klines Get klines (candlestick bars). Klines are uniquely identified by their open & + * close time. If you need access to real-time kline updates, please consider using WebSocket + * Streams: * `<symbol>@kline_<interval>` If you need historical kline + * data, please consider using + * [data.binance.vision](https://github.com/binance/binance-public-data/#klines). Weight(IP): 2 + * Security Type: NONE Notes: **Data Source:** Database Supported kline intervals + * (case-sensitive): Interval | `interval` value --------- | ---------------- seconds + * | `1s` minutes | `1m`, `3m`, `5m`, `15m`, + * `30m` hours | `1h`, `2h`, `4h`, `6h`, + * `8h`, `12h` days | `1d`, `3d` weeks | `1w` + * months | `1M` **Notes:** * If `startTime` and `endTime` are not + * sent, the most recent klines are returned. * Supported values for `timeZone`: * + * Hours and minutes (e.g. `-1:00`, `05:45`) * Only hours (e.g. + * `0`, `8`, `4`) * Accepted range is strictly [-12:00 to +14:00] + * inclusive * If `timeZone` provided, kline intervals are interpreted in that + * timezone instead of UTC. * Note that `startTime` and `endTime` are always + * interpreted in UTC, regardless of `timeZone`. * * @param klinesRequest (required) * @return KlinesResponse @@ -212,8 +291,8 @@ private void depthValidateBeforeCall(DepthRequest depthRequest) throws ApiExcept * * * @see WebSocket - * Klines Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#klines">Klines + * Documentation */ public CompletableFuture klines(KlinesRequest klinesRequest) throws ApiException { @@ -258,7 +337,8 @@ private void klinesValidateBeforeCall(KlinesRequest klinesRequest) throws ApiExc } /** - * WebSocket Query Reference Price Weight: 2 + * Query Reference Price Query Reference Price Weight(IP): 2 Security Type: NONE Notes: **Data + * Source:** Memory * * @param referencePriceRequest (required) * @return ReferencePriceResponse @@ -272,8 +352,8 @@ private void klinesValidateBeforeCall(KlinesRequest klinesRequest) throws ApiExc * * * @see WebSocket - * Query Reference Price Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#reference-price">Query + * Reference Price Documentation */ public CompletableFuture referencePrice( ReferencePriceRequest referencePriceRequest) throws ApiException { @@ -320,8 +400,8 @@ private void referencePriceValidateBeforeCall(ReferencePriceRequest referencePri } /** - * WebSocket Query Reference Price Calculation Describes how reference price is calculated for a - * given symbol. Weight: 2 + * Query Reference Price Calculation Query Reference Price Calculation Weight(IP): 2 Security + * Type: NONE Notes: **Data Source:** Memory * * @param referencePriceCalculationRequest (required) * @return ReferencePriceCalculationResponse @@ -335,8 +415,8 @@ private void referencePriceValidateBeforeCall(ReferencePriceRequest referencePri * * * @see WebSocket - * Query Reference Price Calculation Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#reference-price-calculation">Query + * Reference Price Calculation Documentation */ public CompletableFuture referencePriceCalculation( ReferencePriceCalculationRequest referencePriceCalculationRequest) throws ApiException { @@ -386,11 +466,30 @@ private void referencePriceCalculationValidateBeforeCall( } /** - * WebSocket Rolling window price change statistics Get rolling window price change statistics - * with a custom window. This request is similar to `ticker.24hr`, but statistics are - * computed on demand using the arbitrary window you specify. Weight: Adjusted based on the - * number of requested symbols: | Symbols | Weight | |:-------:|:------:| | 1–50 | 4 per symbol - * | | 51–100 | 200 | + * Rolling window price change statistics Get rolling window price change statistics with a + * custom window. This request is similar to `ticker.24hr` but statistics are computed + * on demand using the arbitrary window you specify. **Note:** Window size precision is limited + * to 1 minute. While the `closeTime` is the current time of the request, + * `openTime` always start on a minute boundary. As such, the effective window might + * be up to 59999 ms wider than the requested `windowSize`. <details> + * <summary>Window computation example</summary> For example, a request for + * `\"windowSize\": \"7d\"` might result in the following window: + * ```javascript { \"openTime\": 1659580020000, + * \"closeTime\": 1660184865291 } ``` Time of the request – + * `closeTime` – is 1660184865291 (August 11, 2022 02:27:45.291). Requested window + * size should put the `openTime` 7 days before that – August 4, 02:27:45.291 – but + * due to limited precision it ends up a bit earlier: 1659580020000 (August 4, 2022 02:27:00), + * exactly at the start of a minute. </details> If you need to continuously monitor + * trading statistics, please consider using WebSocket Streams: * + * `<symbol>@ticker_<window_size>` or + * `!ticker_<window-size>@arr` Weight: Adjusted based on the number of requested + * symbols: | Symbols | Weight | |:-------:|:------:| | 1–50 | 4 per symbol | | 51–100 | 200 | + * Security Type: NONE Notes: **Data Source:** Database Supported window sizes: Unit | + * `windowSize` value ------- | ------------------ minutes | `1m`, + * `2m` ... `59m` hours | `1h`, `2h` ... `23h` + * days | `1d`, `2d` ... `7d` Notes: * Either `symbol` + * or `symbols` must be specified. * Maximum number of symbols in one request: 200. * + * Window size units cannot be combined. E.g., <code>1d 2h</code> is not supported. * * @param tickerRequest (optional) * @return TickerResponse @@ -404,8 +503,8 @@ private void referencePriceCalculationValidateBeforeCall( * * * @see WebSocket - * Rolling window price change statistics Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#ticker">Rolling + * window price change statistics Documentation */ public CompletableFuture ticker(TickerRequest tickerRequest) throws ApiException { @@ -450,13 +549,16 @@ private void tickerValidateBeforeCall(TickerRequest tickerRequest) throws ApiExc } /** - * WebSocket 24hr ticker price change statistics Get 24-hour rolling window price change - * statistics. If you need to continuously monitor trading statistics, please consider using - * WebSocket Streams: * `<symbol>@ticker` or `!ticker@arr` * + * 24hr ticker price change statistics Get 24-hour rolling window price change statistics. If + * you need to continuously monitor trading statistics, please consider using WebSocket Streams: + * * `<symbol>@ticker` or `!ticker@arr` * * `<symbol>@miniTicker` or `!miniTicker@arr` If you need different * window sizes, use the `ticker` request. Weight: Adjusted based on the number of - * requested symbols: | Symbols | Weight | |:-----------:|:------:| | 1–20 | 2 | | 21–100 | 40 | - * | 101 or more | 80 | | all symbols | 80 | + * requested symbols: |Parameter|Symbols Provided|Weight| |---|---|---| |symbol| 1 |2| | + * |omitted| 80| |symbols| 1-20 |2| | | 21-100 |40| | | 101+ |80| | |omitted| 80| Security Type: + * NONE Notes: **Data Source:** Memory Notes: * `symbol` and `symbols` + * cannot be used together. * If no symbol is specified, returns information about all symbols + * currently trading on the exchange. * * @param ticker24hrRequest (optional) * @return Ticker24hrResponse @@ -470,8 +572,8 @@ private void tickerValidateBeforeCall(TickerRequest tickerRequest) throws ApiExc * * * @see WebSocket - * 24hr ticker price change statistics Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#ticker24hr">24hr + * ticker price change statistics Documentation */ public CompletableFuture ticker24hr(Ticker24hrRequest ticker24hrRequest) throws ApiException { @@ -518,11 +620,13 @@ private void ticker24hrValidateBeforeCall(Ticker24hrRequest ticker24hrRequest) } /** - * WebSocket Symbol order book ticker Get the current best price and quantity on the order book. - * If you need access to real-time order book ticker updates, please consider using WebSocket - * Streams: * `<symbol>@bookTicker` Weight: Adjusted based on the number of - * requested symbols: | Parameter | Weight | | --------- |:------:| | `symbol` | 2 | | - * `symbols` | 4 | | none | 4 | + * Symbol order book ticker Get the current best price and quantity on the order book. If you + * need access to real-time order book ticker updates, please consider using WebSocket Streams: + * * `<symbol>@bookTicker` Weight: Adjusted based on the number of requested + * symbols: |Parameter|Symbols Provided|Weight| |---|---|---| |symbol| 1 |2| | |omitted| 4| + * |symbols| Any |4| Security Type: NONE Notes: **Data Source:** Memory Notes: * + * `symbol` and `symbols` cannot be used together. * If no symbol is + * specified, returns information about all symbols currently trading on the exchange. * * @param tickerBookRequest (optional) * @return TickerBookResponse @@ -536,8 +640,8 @@ private void ticker24hrValidateBeforeCall(Ticker24hrRequest ticker24hrRequest) * * * @see WebSocket - * Symbol order book ticker Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#ticker-book">Symbol + * order book ticker Documentation */ public CompletableFuture tickerBook(TickerBookRequest tickerBookRequest) throws ApiException { @@ -584,11 +688,13 @@ private void tickerBookValidateBeforeCall(TickerBookRequest tickerBookRequest) } /** - * WebSocket Symbol price ticker Get the latest market price for a symbol. If you need access to - * real-time price updates, please consider using WebSocket Streams: * - * `<symbol>@aggTrade` * `<symbol>@trade` Weight: Adjusted based - * on the number of requested symbols: | Parameter | Weight | | --------- |:------:| | - * `symbol` | 2 | | `symbols` | 4 | | none | 4 | + * Symbol price ticker Get the latest market price for a symbol. If you need access to real-time + * price updates, please consider using WebSocket Streams: * `<symbol>@aggTrade` + * * `<symbol>@trade` Weight: Adjusted based on the number of requested symbols: + * |Parameter|Symbols Provided|Weight| |---|---|---| |symbol| 1 |2| | |omitted| 4| |symbols| Any + * |4| Security Type: NONE Notes: **Data Source:** Memory Notes: * `symbol` and + * `symbols` cannot be used together. * If no symbol is specified, returns information + * about all symbols currently trading on the exchange. * * @param tickerPriceRequest (optional) * @return TickerPriceResponse @@ -602,8 +708,8 @@ private void tickerBookValidateBeforeCall(TickerBookRequest tickerBookRequest) * * * @see WebSocket - * Symbol price ticker Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#ticker-price">Symbol + * price ticker Documentation */ public CompletableFuture tickerPrice(TickerPriceRequest tickerPriceRequest) throws ApiException { @@ -650,9 +756,12 @@ private void tickerPriceValidateBeforeCall(TickerPriceRequest tickerPriceRequest } /** - * WebSocket Trading Day Ticker Price change statistics for a trading day. Weight: 4 for each - * requested <tt>symbol</tt>. <br/><br/> The weight for this request - * will cap at 200 once the number of `symbols` in the request is more than 50. + * Trading Day Ticker Price change statistics for a trading day. Weight: 4 for each requested + * symbol regardless of windowSize. The weight for this request will cap at 200 once the number + * of symbols in the request is more than 50. Security Type: NONE Notes: **Data Source:** + * Database **Notes:** * Supported values for `timeZone`: * Hours and minutes (e.g. + * `-1:00`, `05:45`) * Only hours (e.g. `0`, `8`, + * `4`) * * @param tickerTradingDayRequest (optional) * @return TickerTradingDayResponse @@ -666,8 +775,8 @@ private void tickerPriceValidateBeforeCall(TickerPriceRequest tickerPriceRequest * * * @see WebSocket - * Trading Day Ticker Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#ticker-trading-day">Trading + * Day Ticker Documentation */ public CompletableFuture tickerTradingDay( TickerTradingDayRequest tickerTradingDayRequest) throws ApiException { @@ -715,13 +824,20 @@ private void tickerTradingDayValidateBeforeCall(TickerTradingDayRequest tickerTr } /** - * WebSocket Aggregate trades Get aggregate trades. An *aggregate trade* (aggtrade) represents - * one or more individual trades. Trades that fill at the same time, from the same taker order, - * with the same price – those trades are collected into an aggregate trade with total quantity - * of the individual trades. If you need access to real-time trading activity, please consider - * using WebSocket Streams: * `<symbol>@aggTrade` If you need historical - * aggregate trade data, please consider using - * [data.binance.vision](https://github.com/binance/binance-public-data/#aggtrades). Weight: 4 + * Aggregate trades Get aggregate trades. An *aggregate trade* (aggtrade) represents one or more + * individual trades. Trades that fill at the same time, from the same taker order, with the + * same price – those trades are collected into an aggregate trade with total quantity of the + * individual trades. If you need access to real-time trading activity, please consider using + * WebSocket Streams: * `<symbol>@aggTrade` If you need historical aggregate + * trade data, please consider using + * [data.binance.vision](https://github.com/binance/binance-public-data/#aggtrades). Weight(IP): + * 4 Security Type: NONE Notes: **Data Source:** Database - If `fromId` is specified, + * return aggtrades with aggregate trade ID >= `fromId`. Use + * `fromId` and `limit` to page through all aggtrades. - If + * `startTime` and/or `endTime` are specified, aggtrades are filtered by + * execution time (`T`). `fromId` cannot be used together with + * `startTime` and `endTime`. - If no condition is specified, the most + * recent aggregate trades are returned. * * @param tradesAggregateRequest (required) * @return TradesAggregateResponse @@ -735,8 +851,8 @@ private void tickerTradingDayValidateBeforeCall(TickerTradingDayRequest tickerTr * * * @see WebSocket - * Aggregate trades Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#trades-aggregate">Aggregate + * trades Documentation */ public CompletableFuture tradesAggregate( TradesAggregateRequest tradesAggregateRequest) throws ApiException { @@ -783,7 +899,9 @@ private void tradesAggregateValidateBeforeCall(TradesAggregateRequest tradesAggr } /** - * WebSocket Historical trades Get historical trades. Weight: 25 + * Historical trades Get historical trades. Weight(IP): 25 Security Type: NONE Notes: **Data + * Source:** Database Notes: * If `fromId` is not specified, the most recent trades + * are returned. * * @param tradesHistoricalRequest (required) * @return TradesHistoricalResponse @@ -797,8 +915,8 @@ private void tradesAggregateValidateBeforeCall(TradesAggregateRequest tradesAggr * * * @see WebSocket - * Historical trades Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#trades-historical">Historical + * trades Documentation */ public CompletableFuture tradesHistorical( TradesHistoricalRequest tradesHistoricalRequest) throws ApiException { @@ -846,8 +964,9 @@ private void tradesHistoricalValidateBeforeCall(TradesHistoricalRequest tradesHi } /** - * WebSocket Recent trades Get recent trades. If you need access to real-time trading activity, - * please consider using WebSocket Streams: * `<symbol>@trade` Weight: 25 + * Recent trades Get recent trades. If you need access to real-time trading activity, please + * consider using WebSocket Streams: * `<symbol>@trade` Weight(IP): 25 Security + * Type: NONE Notes: **Data Source:** Memory * * @param tradesRecentRequest (required) * @return TradesRecentResponse @@ -861,8 +980,8 @@ private void tradesHistoricalValidateBeforeCall(TradesHistoricalRequest tradesHi * * * @see WebSocket - * Recent trades Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#trades-recent">Recent + * trades Documentation */ public CompletableFuture tradesRecent( TradesRecentRequest tradesRecentRequest) throws ApiException { @@ -909,9 +1028,16 @@ private void tradesRecentValidateBeforeCall(TradesRecentRequest tradesRecentRequ } /** - * WebSocket UI Klines Get klines (candlestick bars) optimized for presentation. This request is - * similar to `klines`, having the same parameters and response. `uiKlines` - * return modified kline data, optimized for presentation of candlestick charts. Weight: 2 + * UI Klines Get klines (candlestick bars) optimized for presentation. This request is similar + * to `klines`, having the same parameters and response. `uiKlines` return + * modified kline data, optimized for presentation of candlestick charts. Weight(IP): 2 Security + * Type: NONE Notes: **Data Source:** Database - If `startTime` and + * `endTime` are not sent, the most recent klines are returned. - Supported values for + * `timeZone`: - Hours and minutes (e.g. `-1:00`, `05:45`) - Only + * hours (e.g. `0`, `8`, `4`) - Accepted range is strictly [-12:00 + * to +14:00] inclusive - If `timeZone` provided, kline intervals are interpreted in + * that timezone instead of UTC. - Note that `startTime` and `endTime` are + * always interpreted in UTC, regardless of `timeZone`. * * @param uiKlinesRequest (required) * @return UiKlinesResponse @@ -925,8 +1051,8 @@ private void tradesRecentValidateBeforeCall(TradesRecentRequest tradesRecentRequ * * * @see WebSocket - * UI Klines Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#ui-klines">UI + * Klines Documentation */ public CompletableFuture uiKlines(UiKlinesRequest uiKlinesRequest) throws ApiException { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/SpotWebSocketApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/SpotWebSocketApi.java index ef28407d6..b3814300d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/SpotWebSocketApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/SpotWebSocketApi.java @@ -20,6 +20,8 @@ import com.binance.connector.client.spot.websocket.api.model.AllOrdersResponse; import com.binance.connector.client.spot.websocket.api.model.AvgPriceRequest; import com.binance.connector.client.spot.websocket.api.model.AvgPriceResponse; +import com.binance.connector.client.spot.websocket.api.model.BlockTradesHistoricalRequest; +import com.binance.connector.client.spot.websocket.api.model.BlockTradesHistoricalResponse; import com.binance.connector.client.spot.websocket.api.model.DepthRequest; import com.binance.connector.client.spot.websocket.api.model.DepthResponse; import com.binance.connector.client.spot.websocket.api.model.ExchangeInfoRequest; @@ -107,7 +109,6 @@ import com.binance.connector.client.spot.websocket.api.model.UiKlinesResponse; import com.binance.connector.client.spot.websocket.api.model.UserDataStreamEventsResponse; import com.binance.connector.client.spot.websocket.api.model.UserDataStreamSubscribeResponse; -import com.binance.connector.client.spot.websocket.api.model.UserDataStreamSubscribeSignatureRequest; import com.binance.connector.client.spot.websocket.api.model.UserDataStreamSubscribeSignatureResponse; import com.binance.connector.client.spot.websocket.api.model.UserDataStreamUnsubscribeRequest; import com.binance.connector.client.spot.websocket.api.model.UserDataStreamUnsubscribeResponse; @@ -118,7 +119,7 @@ public class SpotWebSocketApi { private static final String USER_AGENT = String.format( - "binance-spot/10.1.1 (Java/%s; %s; %s)", + "binance-spot/11.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final ConnectionInterface connection; @@ -274,6 +275,11 @@ public CompletableFuture avgPrice(AvgPriceRequest avgPriceRequ return marketApi.avgPrice(avgPriceRequest); } + public CompletableFuture blockTradesHistorical( + BlockTradesHistoricalRequest blockTradesHistoricalRequest) throws ApiException { + return marketApi.blockTradesHistorical(blockTradesHistoricalRequest); + } + public CompletableFuture depth(DepthRequest depthRequest) throws ApiException { return marketApi.depth(depthRequest); } @@ -424,11 +430,8 @@ public CompletableFuture sessionSubscriptions() } public StreamResponse - userDataStreamSubscribeSignature( - UserDataStreamSubscribeSignatureRequest userDataStreamSubscribeSignatureRequest) - throws ApiException { - return userDataStreamApi.userDataStreamSubscribeSignature( - userDataStreamSubscribeSignatureRequest); + userDataStreamSubscribeSignature() throws ApiException { + return userDataStreamApi.userDataStreamSubscribeSignature(); } public CompletableFuture userDataStreamUnsubscribe( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/TradeApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/TradeApi.java index bfd92c281..13aa6214c 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/TradeApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/TradeApi.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -69,8 +69,9 @@ public ConnectionInterface getConnection() { } /** - * WebSocket Cancel open orders Cancel all open orders on a symbol. This includes orders that - * are part of an order list. Weight: 1 + * Cancel open orders (TRADE) Cancel all open orders on a symbol. This includes orders that are + * part of an order list. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching + * Engine * * @param openOrdersCancelAllRequest (required) * @return OpenOrdersCancelAllResponse @@ -84,8 +85,8 @@ public ConnectionInterface getConnection() { * * * @see WebSocket - * Cancel open orders Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#open-orders-cancel-all">Cancel + * open orders (TRADE) Documentation */ public CompletableFuture openOrdersCancelAll( OpenOrdersCancelAllRequest openOrdersCancelAllRequest) throws ApiException { @@ -132,10 +133,11 @@ private void openOrdersCancelAllValidateBeforeCall( } /** - * WebSocket Order Amend Keep Priority Reduce the quantity of an existing open order. This adds - * 0 orders to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` - * filter. Read [Order Amend Keep Priority FAQ](faqs/order_amend_keep_priority.md) to learn - * more. Weight: 4 + * Order Amend Keep Priority (TRADE) Reduce the quantity of an existing open order. This adds 0 + * orders to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` + * filter. Read [Order Amend Keep Priority FAQ](/products/spot/faqs/order_amend_keep_priority) + * to learn more. Weight(IP): 4 Unfilled Order Count: 0 Security Type: TRADE Notes: **Data + * Source:** Matching Engine * * @param orderAmendKeepPriorityRequest (required) * @return OrderAmendKeepPriorityResponse @@ -149,8 +151,8 @@ private void openOrdersCancelAllValidateBeforeCall( * * * @see WebSocket - * Order Amend Keep Priority Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-amend-keep-priority">Order + * Amend Keep Priority (TRADE) Documentation */ public CompletableFuture orderAmendKeepPriority( OrderAmendKeepPriorityRequest orderAmendKeepPriorityRequest) throws ApiException { @@ -197,7 +199,16 @@ private void orderAmendKeepPriorityValidateBeforeCall( } /** - * WebSocket Cancel order Cancel an active order. Weight: 1 + * Cancel order (TRADE) Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: **Data + * Source:** Matching Engine Notes: * If both `orderId` and + * `origClientOrderId` parameters are provided, the `orderId` is searched + * first, then the `origClientOrderId` from that result is checked against that order. + * If both conditions are not met the request will be rejected. * `newClientOrderId` + * will replace `clientOrderId` of the canceled order, freeing it up for new orders. * + * If you cancel an order that is a part of an order list, the entire order list is canceled. * + * The performance for canceling an order (single cancel or as part of a cancel-replace) is + * always better when only `orderId` is sent. Sending `origClientOrderId` or + * both `orderId` + `origClientOrderId` will be slower. * * @param orderCancelRequest (required) * @return OrderCancelResponse @@ -211,8 +222,8 @@ private void orderAmendKeepPriorityValidateBeforeCall( * * * @see WebSocket - * Cancel order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-cancel">Cancel + * order (TRADE) Documentation */ public CompletableFuture orderCancel(OrderCancelRequest orderCancelRequest) throws ApiException { @@ -258,11 +269,134 @@ private void orderCancelValidateBeforeCall(OrderCancelRequest orderCancelRequest } /** - * WebSocket Cancel and replace order * Cancel an existing order and immediately place a new - * order instead of the canceled one. * A new order that was not attempted (i.e. when + * Cancel and replace order (TRADE) * Cancel an existing order and immediately place a new order + * instead of the canceled one. * A new order that was not attempted (i.e. when * `newOrderResult: NOT_ATTEMPTED`), will still increase the unfilled order count by * 1. * You can only cancel an individual order from an orderList using this method, but the - * result is the same as canceling the entire orderList. Weight: 1 + * result is the same as canceling the entire orderList.not attempted (i.e. when + * `newOrderResult: NOT_ATTEMPTED`), will still increase the unfilled order count by + * 1. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** + * Matching Engine Similar to the [`order.place`](#order-place) request, additional + * mandatory parameters (*) are determined by the new order `type`. Available + * `cancelReplaceMode` options: * `STOP_ON_FAILURE` – if cancellation + * request fails, new order placement will not be attempted. * `ALLOW_FAILURE` – new + * order placement will be attempted even if the cancel request fails. <table> + * <thead> <tr> <th colspan=3 align=left>Request</th> <th + * colspan=3 align=left>Response</th> </tr> <tr> + * <th><code>cancelReplaceMode</code></th> + * <th><code>orderRateLimitExceededMode</code></th> <th>Unfilled + * Order Count</th> <th><code>cancelResult</code></th> + * <th><code>newOrderResult</code></th> + * <th><code>status</code></th> </tr> </thead> <tbody> + * <tr> <td + * rowspan=\"11\"><code>STOP_ON_FAILURE</code></td> <td + * rowspan=\"6\"><code>DO_NOTHING</code></td> <td + * rowspan=\"3\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"3\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td + * rowspan=\"5\"><code>CANCEL_ONLY</code></td> <td + * rowspan=\"3\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"2\">Exceeds Limits</td> <td>❌ + * <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>429</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>429</code></td> </tr> <tr> <td + * rowspan=\"16\"><code>ALLOW_FAILURE</code></td> <td + * rowspan=\"8\"><code>DO_NOTHING</code></td> <td + * rowspan=\"4\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>409</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"4\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td + * rowspan=\"8\"><CODE>CANCEL_ONLY</CODE></td> <td + * rowspan=\"4\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>409</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"4\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> </tbody> + * </table> Notes: * If both `cancelOrderId` and + * `cancelOrigClientOrderId` parameters are provided, the `cancelOrderId` is + * searched first, then the `cancelOrigClientOrderId` from that result is checked + * against that order. If both conditions are not met the request will be rejected. * + * `cancelNewClientOrderId` will replace `clientOrderId` of the canceled + * order, freeing it up for new orders. * `newClientOrderId` specifies + * `clientOrderId` value for the placed order. A new order with the same + * `clientOrderId` is accepted only when the previous one is filled or expired. The + * new order can reuse old `clientOrderId` of the canceled order. * This + * cancel-replace operation is **not transactional**. If one operation succeeds but the other + * one fails, the successful operation is still executed. For example, in + * `STOP_ON_FAILURE` mode, if the new order placement fails, the old order is still + * canceled. * Filters and order count limits are evaluated before cancellation and order + * placement occurs. * If new order placement is not attempted, your order count is still + * incremented. * Like [`order.cancel`](#order-cancel), if you cancel an individual + * order from an order list, the entire order list is canceled. * The performance for canceling + * an order (single cancel or as part of a cancel-replace) is always better when only + * `orderId` is sent. Sending `origClientOrderId` or both + * `orderId` + `origClientOrderId` will be slower. * * @param orderCancelReplaceRequest (required) * @return OrderCancelReplaceResponse @@ -276,8 +410,8 @@ private void orderCancelValidateBeforeCall(OrderCancelRequest orderCancelRequest * * * @see WebSocket - * Cancel and replace order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-cancel-replace">Cancel + * and replace order (TRADE) Documentation */ public CompletableFuture orderCancelReplace( OrderCancelReplaceRequest orderCancelReplaceRequest) throws ApiException { @@ -324,7 +458,13 @@ private void orderCancelReplaceValidateBeforeCall( } /** - * WebSocket Cancel Order list Cancel an active order list. Weight: 1 + * Cancel Order list (TRADE) Cancel an active order list. Weight(IP): 1 Security Type: TRADE + * Notes: **Data Source:** Matching Engine Notes: * If both `orderListId` and + * `listClientOrderId` parameters are provided, the `orderListId` is + * searched first, then the `listClientOrderId` from that result is checked against + * that order. If both conditions are not met the request will be rejected. * Canceling an + * individual order with [`order.cancel`](#order-cancel) will cancel the entire order + * list as well. * * @param orderListCancelRequest (required) * @return OrderListCancelResponse @@ -338,8 +478,8 @@ private void orderCancelReplaceValidateBeforeCall( * * * @see WebSocket - * Cancel Order list Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-cancel">Cancel + * Order list (TRADE) Documentation */ public CompletableFuture orderListCancel( OrderListCancelRequest orderListCancelRequest) throws ApiException { @@ -385,11 +525,24 @@ private void orderListCancelValidateBeforeCall(OrderListCancelRequest orderListC } /** - * WebSocket Place new OCO - Deprecated Send in a new one-cancels-the-other (OCO) pair: + * Place new OCO - Deprecated (TRADE) Send in a new one-cancels-the-other (OCO) pair: * `LIMIT_MAKER` + `STOP_LOSS`/`STOP_LOSS_LIMIT` orders (called * *legs*), where activation of one order immediately cancels the other. This adds 1 order to - * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter Weight: 1 - * Unfilled Order Count: 1 + * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter Weight(IP): + * 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Notes: + * * `listClientOrderId` parameter specifies `listClientOrderId` for the OCO + * pair. A new OCO with the same `listClientOrderId` is accepted only when the + * previous one is filled or completely expired. `listClientOrderId` is distinct from + * `clientOrderId` of individual orders. * `limitClientOrderId` and + * `stopClientOrderId` specify `clientOrderId` values for both legs of the + * OCO. A new order with the same `clientOrderId` is accepted only when the previous + * one is filled or expired. * Price restrictions on the legs: | `side` | Price + * relation | | ------ | -------------- | | `BUY` | `price` < market + * price < `stopPrice` | | `SELL` | `price` > market price + * > `stopPrice` | * Both legs have the same `quantity`. However, you can + * set different iceberg quantity for individual legs. If `stopIcebergQty` is used, + * `stopLimitTimeInForce` must be `GTC`. * `trailingDelta` applies + * only to the `STOP_LOSS`/`STOP_LOSS_LIMIT` leg of the OCO. * * @param orderListPlaceRequest (required) * @return OrderListPlaceResponse @@ -404,8 +557,8 @@ private void orderListCancelValidateBeforeCall(OrderListCancelRequest orderListC * * @deprecated * @see WebSocket - * Place new OCO - Deprecated Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place">Place + * new OCO - Deprecated (TRADE) Documentation */ @Deprecated public CompletableFuture orderListPlace( @@ -453,7 +606,7 @@ private void orderListPlaceValidateBeforeCall(OrderListPlaceRequest orderListPla } /** - * WebSocket Place new Order list - OCO Send in an one-cancels-the-other (OCO) pair, where + * Place new Order list - OCO (TRADE) Send in an one-cancels-the-other (OCO) pair, where * activation of one order immediately cancels the other. * An OCO has 2 orders called the * **above order** and **below order**. * One of the orders must be a * `LIMIT_MAKER/TAKE_PROFIT/TAKE_PROFIT_LIMIT` order and the other must be @@ -466,7 +619,8 @@ private void orderListPlaceValidateBeforeCall(OrderListPlaceRequest orderListPla * `STOP_LOSS/STOP_LOSS_LIMIT` `stopPrice` * `TAKE_PROFIT * stopPrice` > Last Traded Price > `STOP_LOSS/STOP_LOSS_LIMIT stopPrice` * * OCOs add **2 orders** to the `EXCHANGE_MAX_ORDERS` filter and - * `MAX_NUM_ORDERS` filter. Weight: 1 Unfilled Order Count: 2 + * `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE + * Notes: **Data Source:** Matching Engine * * @param orderListPlaceOcoRequest (required) * @return OrderListPlaceOcoResponse @@ -480,8 +634,8 @@ private void orderListPlaceValidateBeforeCall(OrderListPlaceRequest orderListPla * * * @see WebSocket - * Place new Order list - OCO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-oco">Place + * new Order list - OCO (TRADE) Documentation */ public CompletableFuture orderListPlaceOco( OrderListPlaceOcoRequest orderListPlaceOcoRequest) throws ApiException { @@ -528,8 +682,9 @@ private void orderListPlaceOcoValidateBeforeCall( } /** - * WebSocket OPO Place an [OPO](./faqs/opo.md). * OPOs add 2 orders to the - * EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS filter. Weight: 1 Unfilled Order Count: 2 + * OPO (TRADE) Place an [OPO](/products/spot/faqs/opo). * OPOs add 2 orders to the + * EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS filter. Weight(IP): 1 Unfilled Order Count: + * 2 Security Type: TRADE Notes: **Data Source:** Matching Engine * * @param orderListPlaceOpoRequest (required) * @return OrderListPlaceOpoResponse @@ -543,8 +698,8 @@ private void orderListPlaceOcoValidateBeforeCall( * * * @see WebSocket - * OPO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-opo">OPO + * (TRADE) Documentation */ public CompletableFuture orderListPlaceOpo( OrderListPlaceOpoRequest orderListPlaceOpoRequest) throws ApiException { @@ -591,7 +746,8 @@ private void orderListPlaceOpoValidateBeforeCall( } /** - * WebSocket OPOCO Place an [OPOCO](./faqs/opo.md). Weight: 1 Unfilled Order Count: 3 + * OPOCO (TRADE) Place an [OPOCO](/products/spot/faqs/opo). Weight(IP): 1 Unfilled Order Count: + * 3 Security Type: TRADE Notes: **Data Source:** Matching Engine * * @param orderListPlaceOpocoRequest (required) * @return OrderListPlaceOpocoResponse @@ -605,8 +761,8 @@ private void orderListPlaceOpoValidateBeforeCall( * * * @see WebSocket - * OPOCO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-opoco">OPOCO + * (TRADE) Documentation */ public CompletableFuture orderListPlaceOpoco( OrderListPlaceOpocoRequest orderListPlaceOpocoRequest) throws ApiException { @@ -653,7 +809,7 @@ private void orderListPlaceOpocoValidateBeforeCall( } /** - * WebSocket Place new Order list - OTO Places an OTO. * An OTO (One-Triggers-the-Other) is an + * Place new Order list - OTO (TRADE) Places an OTO. * An OTO (One-Triggers-the-Other) is an * order list comprised of 2 orders. * The first order is called the **working order** and must * be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on * the order book. * The second order is called the **pending order**. It can be any order type @@ -665,7 +821,18 @@ private void orderListPlaceOpocoValidateBeforeCall( * order as `FILLED` but the pending order will still appear as * `PENDING_NEW`. You need to query the status of the pending order again to see its * updated status. * OTOs add **2 orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and - * `MAX_NUM_ORDERS` filter. Weight: 1 Unfilled Order Count: 2 + * `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE + * Notes: **Data Source:** Matching Engine **Mandatory parameters based on + * `pendingType` or `workingType`** Depending on the `pendingType` + * or `workingType`, some optional parameters will become mandatory. |Type |Additional + * mandatory parameters|Additional information| |---- |---- |------ |`workingType` + * = `LIMIT` |`workingTimeInForce` | |`pendingType` = + * `LIMIT` |`pendingPrice`, `pendingTimeInForce` | + * |`pendingType` = `STOP_LOSS` or `TAKE_PROFIT` + * |`pendingStopPrice` and/or `pendingTrailingDelta`| + * |`pendingType` =`STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT`|`pendingPrice`, `pendingStopPrice` and/or + * `pendingTrailingDelta`, `pendingTimeInForce`| * * @param orderListPlaceOtoRequest (required) * @return OrderListPlaceOtoResponse @@ -679,8 +846,8 @@ private void orderListPlaceOpocoValidateBeforeCall( * * * @see WebSocket - * Place new Order list - OTO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-oto">Place + * new Order list - OTO (TRADE) Documentation */ public CompletableFuture orderListPlaceOto( OrderListPlaceOtoRequest orderListPlaceOtoRequest) throws ApiException { @@ -727,17 +894,35 @@ private void orderListPlaceOtoValidateBeforeCall( } /** - * WebSocket Place new Order list - OTOCO Place an OTOCO. * An OTOCO + * Place new Order list - OTOCO (TRADE) Place an OTOCO. * An OTOCO * (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders. * The first * order is called the **working order** and must be `LIMIT` or * `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The - * behavior of the working order is the same as the [OTO](#place-new-order-list---oto-trade). * - * OTOCO has 2 pending orders (pending above and pending below), forming an OCO pair. The - * pending orders are only placed on the order book when the working order gets **fully - * filled**. * The rules of the pending above and pending below follow the same rules as the - * [Order list OCO](#new-order-list---oco-trade). * OTOCOs add **3 orders** to the - * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight: 1 - * Unfilled Order Count: 3 + * behavior of the working order is the same as the [OTO](#order-list-place-oto). * OTOCO has 2 + * pending orders (pending above and pending below), forming an OCO pair. The pending orders are + * only placed on the order book when the working order gets **fully filled**. * The rules of + * the pending above and pending below follow the same rules as the [Order list + * OCO](#order-list-place-oco). * OTOCOs add **3 orders** to the + * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight(IP): + * 1 Unfilled Order Count: 3 Security Type: TRADE Notes: **Data Source:** Matching Engine + * **Mandatory parameters based on `pendingAboveType`, `pendingBelowType` or + * `workingType`** Depending on the + * `pendingAboveType`/`pendingBelowType` or `workingType`, some + * optional parameters will become mandatory. |Type |Additional mandatory parameters|Additional + * information| |---- |---- |------ |`workingType` = `LIMIT` + * |`workingTimeInForce` | |`pendingAboveType`= `LIMIT_MAKER` + * |`pendingAbovePrice` | |`pendingAboveType` = + * `STOP_LOSS/TAKE_PROFIT` |`pendingAboveStopPrice` and/or + * `pendingAboveTrailingDelta`| + * |`pendingAboveType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT`|`pendingAbovePrice`, + * `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`, + * `pendingAboveTimeInForce`| |`pendingBelowType`= + * `LIMIT_MAKER` |`pendingBelowPrice` | `pendingBelowType= + * STOP_LOSS/TAKE_PROFIT` |`pendingBelowStopPrice` and/or + * `pendingBelowTrailingDelta`| + * |`pendingBelowType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT`|`pendingBelowPrice`, + * `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`, + * `pendingBelowTimeInForce`| * * @param orderListPlaceOtocoRequest (required) * @return OrderListPlaceOtocoResponse @@ -751,8 +936,8 @@ private void orderListPlaceOtoValidateBeforeCall( * * * @see WebSocket - * Place new Order list - OTOCO Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-otoco">Place + * new Order list - OTOCO (TRADE) Documentation */ public CompletableFuture orderListPlaceOtoco( OrderListPlaceOtocoRequest orderListPlaceOtocoRequest) throws ApiException { @@ -799,8 +984,113 @@ private void orderListPlaceOtocoValidateBeforeCall( } /** - * WebSocket Place new order Send in a new order. This adds 1 order to the - * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Weight: 1 + * Place new order (TRADE) Send in a new order. This adds 1 order to the + * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Weight(IP): + * 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine <a + * id=\"order-type\">Certain parameters (*)</a> become mandatory based + * on the order `type`: <table> <thead> <tr> <th>Order + * <code>type</code></th> <th>Mandatory parameters</th> + * </tr> </thead> <tbody> <tr> + * <td><code>LIMIT</code></td> <td> <ul> + * <li><code>timeInForce</code></li> + * <li><code>price</code></li> + * <li><code>quantity</code></li> </ul> </td> </tr> + * <tr> <td><code>LIMIT_MAKER</code></td> <td> <ul> + * <li><code>price</code></li> + * <li><code>quantity</code></li> </ul> </td> </tr> + * <tr> <td><code>MARKET</code></td> <td> <ul> + * <li><code>quantity</code> or + * <code>quoteOrderQty</code></li> </ul> </td> </tr> + * <tr> <td><code>STOP_LOSS</code></td> <td> <ul> + * <li><code>quantity</code></li> + * <li><code>stopPrice</code> or + * <code>trailingDelta</code></li> </ul> </td> </tr> + * <tr> <td><code>STOP_LOSS_LIMIT</code></td> <td> + * <ul> <li><code>timeInForce</code></li> + * <li><code>price</code></li> + * <li><code>quantity</code></li> + * <li><code>stopPrice</code> or + * <code>trailingDelta</code></li> </ul> </td> </tr> + * <tr> <td><code>TAKE_PROFIT</code></td> <td> <ul> + * <li><code>quantity</code></li> + * <li><code>stopPrice</code> or + * <code>trailingDelta</code></li> </ul> </td> </tr> + * <tr> <td><code>TAKE_PROFIT_LIMIT</code></td> <td> + * <ul> <li><code>timeInForce</code></li> + * <li><code>price</code></li> + * <li><code>quantity</code></li> + * <li><code>stopPrice</code> or + * <code>trailingDelta</code></li> </ul> </td> </tr> + * </tbody> </table> Supported order types: <table> <thead> <tr> + * <th>Order <code>type</code></th> <th>Description</th> + * </tr> </thead> <tbody> <tr> + * <td><code>LIMIT</code></td> <td> <p> Buy or sell + * <code>quantity</code> at the specified <code>price</code> or better. + * </p> </td> </tr> <tr> + * <td><code>LIMIT_MAKER</code></td> <td> <p> + * <code>LIMIT</code> order that will be rejected if it immediately matches and + * trades as a taker. </p> <p> This order type is also known as a POST-ONLY order. + * </p> </td> </tr> <tr> + * <td><code>MARKET</code></td> <td> <p> Buy or sell at the + * best available market price. </p> <ul> <li> <p> + * <code>MARKET</code> order with <code>quantity</code> parameter + * specifies the amount of the <em>base asset</em> you want to buy or sell. Actually + * executed quantity of the quote asset will be determined by available market liquidity. + * </p> <p> E.g., a MARKET BUY order on BTCUSDT for + * <code>\"quantity\": \"0.1000\"</code> specifies that you want + * to buy 0.1 BTC at the best available price. If there is not enough BTC at the best price, + * keep buying at the next best price, until either your order is filled, or you run out of + * USDT, or market runs out of BTC. </p> </li> <li> <p> + * <code>MARKET</code> order with <code>quoteOrderQty</code> parameter + * specifies the amount of the <em>quote asset</em> you want to spend (when buying) + * or receive (when selling). Actually executed quantity of the base asset will be determined by + * available market liquidity. </p> <p> E.g., a MARKET BUY on BTCUSDT for + * <code>\"quoteOrderQty\": \"100.00\"</code> specifies that you + * want to buy as much BTC as you can for 100 USDT at the best available price. Similarly, a + * SELL order will sell as much available BTC as needed for you to receive 100 USDT (before + * commission). </p> </li> </ul> </td> </tr> <tr> + * <td><code>STOP_LOSS</code></td> <td> <p> Execute a + * <code>MARKET</code> order for given <code>quantity</code> when + * specified conditions are met. </p> <p> I.e., when + * <code>stopPrice</code> is reached, or when <code>trailingDelta</code> + * is activated. </p> </td> </tr> <tr> + * <td><code>STOP_LOSS_LIMIT</code></td> <td> <p> Place a + * <code>LIMIT</code> order with given parameters when specified conditions are met. + * </p> </td> </tr> <tr> + * <td><code>TAKE_PROFIT</code></td> <td> <p> Like + * <code>STOP_LOSS</code> but activates when market price moves in the favorable + * direction. </p> </td> </tr> <tr> + * <td><code>TAKE_PROFIT_LIMIT</code></td> <td> <p> Like + * <code>STOP_LOSS_LIMIT</code> but activates when market price moves in the + * favorable direction. </p> </td> </tr> </tbody> </table> <a + * id=\"pegged-orders-info\"></a> Notes on using parameters for Pegged + * Orders: * These parameters are allowed for `LIMIT`, `LIMIT_MAKER`, + * `STOP_LOSS_LIMIT`, `TAKE_PROFIT_LIMIT` orders. * If + * `pegPriceType` is specified, `price` becomes optional. Otherwise, it is + * still mandatory. * `pegPriceType=PRIMARY_PEG` means the primary peg, that is + * the best price on the same side of the order book as your order. * + * `pegPriceType=MARKET_PEG` means the market peg, that is the best price on the + * opposite side of the order book from your order. * Use `pegOffsetType` and + * `pegOffsetValue` to request a price level other than the best one. These parameters + * must be specified together. <a id=\"timeInForce\"></a> Available + * `timeInForce` options, setting how long the order should be active before + * expiration: TIF | Description ----- | -------------- `GTC` | **Good 'til + * Canceled** – the order will remain on the book until you cancel it, or the order is + * completely filled. `IOC` | **Immediate or Cancel** – the order will be filled for + * as much as possible, the unfilled quantity immediately expires. `FOK` | **Fill or + * Kill** – the order will expire unless it cannot be immediately filled for the entire + * quantity. Notes: * `newClientOrderId` specifies `clientOrderId` value for + * the order. A new order with the same `clientOrderId` is accepted only when the + * previous one is filled or expired. * Any `LIMIT` or `LIMIT_MAKER` order + * can be made into an iceberg order by specifying the `icebergQty`. An order with an + * `icebergQty` must have `timeInForce` set to `GTC`. * Trigger + * order price rules for `STOP_LOSS`/`TAKE_PROFIT` orders: * + * `stopPrice` must be above market price: `STOP_LOSS BUY`, + * `TAKE_PROFIT SELL` * `stopPrice` must be below market price: + * `STOP_LOSS SELL`, `TAKE_PROFIT BUY` * `MARKET` orders using + * `quoteOrderQty` follow [`LOT_SIZE`](/products/spot/filters#lot_size) + * filter rules. The order will execute a quantity that has notional value as close as possible + * to requested `quoteOrderQty`. * * @param orderPlaceRequest (required) * @return OrderPlaceResponse @@ -814,8 +1104,8 @@ private void orderListPlaceOtocoValidateBeforeCall( * * * @see WebSocket - * Place new order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-place">Place + * new order (TRADE) Documentation */ public CompletableFuture orderPlace(OrderPlaceRequest orderPlaceRequest) throws ApiException { @@ -861,10 +1151,10 @@ private void orderPlaceValidateBeforeCall(OrderPlaceRequest orderPlaceRequest) } /** - * WebSocket Test new order Test order placement. Validates new order parameters and verifies - * your signature but does not send the order into the matching engine. Weight: |Condition| - * Request Weight| |------------ | ------------ | |Without `computeCommissionRates`| - * 1| |With `computeCommissionRates`|20| + * Test new order (TRADE) Test order placement. Validates new order parameters and verifies your + * signature but does not send the order into the matching engine. Weight: | Condition | Request + * Weight | | --- | --- | | Without `computeCommissionRates` | 1 | | With + * `computeCommissionRates` | 20 | Security Type: TRADE Notes: **Data Source:** Memory * * @param orderTestRequest (required) * @return OrderTestResponse @@ -878,8 +1168,8 @@ private void orderPlaceValidateBeforeCall(OrderPlaceRequest orderPlaceRequest) * * * @see WebSocket - * Test new order Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-test">Test + * new order (TRADE) Documentation */ public CompletableFuture orderTest(OrderTestRequest orderTestRequest) throws ApiException { @@ -925,9 +1215,12 @@ private void orderTestValidateBeforeCall(OrderTestRequest orderTestRequest) } /** - * WebSocket Place new order using SOR Places an order using smart order routing (SOR). This - * adds 1 order to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` - * filter. Read [SOR FAQ](../faqs/sor_faq.md) to learn more. Weight: 1 Unfilled Order Count: 1 + * Place new order using SOR (TRADE) Places an order using smart order routing (SOR). This adds + * 1 order to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` + * filter. Read [SOR FAQ](/products/spot/faqs/sor_faq) to learn more. Weight(IP): 1 Unfilled + * Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine **Note:** + * `sor.order.place` only supports `LIMIT` and `MARKET` orders. + * `quoteOrderQty` is not supported. * * @param sorOrderPlaceRequest (required) * @return SorOrderPlaceResponse @@ -941,8 +1234,8 @@ private void orderTestValidateBeforeCall(OrderTestRequest orderTestRequest) * * * @see WebSocket - * Place new order using SOR Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#sor-order-place">Place + * new order using SOR (TRADE) Documentation */ public CompletableFuture sorOrderPlace( SorOrderPlaceRequest sorOrderPlaceRequest) throws ApiException { @@ -988,10 +1281,11 @@ private void sorOrderPlaceValidateBeforeCall(SorOrderPlaceRequest sorOrderPlaceR } /** - * WebSocket Test new order using SOR Test new order creation and signature/recvWindow using - * smart order routing (SOR). Creates and validates a new order but does not send it into the - * matching engine. Weight: |Condition | Request Weight| |------------ | ------------ | |Without - * `computeCommissionRates`| 1 | |With `computeCommissionRates` |20 | + * Test new order using SOR (TRADE) Test new order creation and signature/recvWindow using smart + * order routing (SOR). Creates and validates a new order but does not send it into the matching + * engine. Weight: | Condition | Request Weight | | --- | --- | | Without + * `computeCommissionRates` | 1 | | With `computeCommissionRates` | 20 | + * Security Type: TRADE Notes: **Data Source:** Memory * * @param sorOrderTestRequest (required) * @return SorOrderTestResponse @@ -1005,8 +1299,8 @@ private void sorOrderPlaceValidateBeforeCall(SorOrderPlaceRequest sorOrderPlaceR * * * @see WebSocket - * Test new order using SOR Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#sor-order-test">Test + * new order using SOR (TRADE) Documentation */ public CompletableFuture sorOrderTest( SorOrderTestRequest sorOrderTestRequest) throws ApiException { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/UserDataStreamApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/UserDataStreamApi.java index a61a9402d..40e85da6c 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/UserDataStreamApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/UserDataStreamApi.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -24,7 +24,6 @@ import com.binance.connector.client.spot.websocket.api.model.SessionSubscriptionsResponse; import com.binance.connector.client.spot.websocket.api.model.UserDataStreamEventsResponse; import com.binance.connector.client.spot.websocket.api.model.UserDataStreamSubscribeResponse; -import com.binance.connector.client.spot.websocket.api.model.UserDataStreamSubscribeSignatureRequest; import com.binance.connector.client.spot.websocket.api.model.UserDataStreamSubscribeSignatureResponse; import com.binance.connector.client.spot.websocket.api.model.UserDataStreamUnsubscribeRequest; import com.binance.connector.client.spot.websocket.api.model.UserDataStreamUnsubscribeResponse; @@ -53,7 +52,9 @@ public ConnectionInterface getConnection() { } /** - * WebSocket Listing all subscriptions Weight: 2 **Data Source**: Memory + * Listing all subscriptions **Note:** * Users should track the corresponding subscription + * status of related accounts as needed. Weight(IP): 2 Security Type: NONE Notes: **Data + * Source:** Memory * * @return SessionSubscriptionsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -66,8 +67,8 @@ public ConnectionInterface getConnection() { * * * @see WebSocket - * Listing all subscriptions Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/user-data-stream#session-subscriptions">Listing + * all subscriptions Documentation */ public CompletableFuture sessionSubscriptions() throws ApiException { @@ -94,8 +95,17 @@ public CompletableFuture sessionSubscriptions() private void sessionSubscriptionsValidateBeforeCall() throws ApiException {} /** - * WebSocket Subscribe to User Data Stream Subscribe to the User Data Stream in the current - * WebSocket connection. Weight: 2 + * Subscribe to User Data Stream Subscribe to the User Data Stream in the current WebSocket + * connection. **Notes:** - This method requires an authenticated WebSocket connection using + * Ed25519 keys. Please refer to + * [`session.logon`](/catalog/core-trading-spot-trading/api/ws-api/auth#session-logon). + * - To check the subscription status, use + * [`session.status`](/catalog/core-trading-spot-trading/api/ws-api/auth#session-status), + * see the `userDataStream` flag indicating you have have an active subscription. - + * User Data Stream events are available in both JSON and [SBE](/products/spot/faqs/sbe_faq) + * sessions. - Please refer to [User Data Streams](/products/spot/user-data-stream) for the + * event format details. - For SBE, only SBE schema 2:1 or later is supported. Weight(IP): 2 + * Security Type: NONE * * @return UserDataStreamSubscribeResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -108,8 +118,8 @@ private void sessionSubscriptionsValidateBeforeCall() throws ApiException {} * * * @see WebSocket - * Subscribe to User Data Stream Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/user-data-stream#user-data-stream-subscribe">Subscribe + * to User Data Stream Documentation */ public StreamResponse userDataStreamSubscribe() throws ApiException { @@ -141,9 +151,9 @@ private void sessionSubscriptionsValidateBeforeCall() throws ApiException {} private void userDataStreamSubscribeValidateBeforeCall() throws ApiException {} /** - * WebSocket Subscribe to User Data Stream through signature subscription Weight: 2 + * Subscribe to User Data Stream through signature subscription (USER_STREAM) Weight(IP): 2 + * Security Type: USER_STREAM Notes: **Data Source:** Memory * - * @param userDataStreamSubscribeSignatureRequest (optional) * @return UserDataStreamSubscribeSignatureResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -155,27 +165,21 @@ private void userDataStreamSubscribeValidateBeforeCall() throws ApiException {} * * * @see WebSocket - * Subscribe to User Data Stream through signature subscription Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/user-data-stream#user-data-stream-subscribe-signature">Subscribe + * to User Data Stream through signature subscription (USER_STREAM) Documentation */ public StreamResponse - userDataStreamSubscribeSignature( - UserDataStreamSubscribeSignatureRequest userDataStreamSubscribeSignatureRequest) - throws ApiException { - userDataStreamSubscribeSignatureValidateBeforeCall(userDataStreamSubscribeSignatureRequest); + userDataStreamSubscribeSignature() throws ApiException { + userDataStreamSubscribeSignatureValidateBeforeCall(); String methodName = "/userDataStream.subscribe.signature".substring(1); - ApiRequestWrapperDTO< - UserDataStreamSubscribeSignatureRequest, - UserDataStreamSubscribeSignatureResponse> - build = - new ApiRequestWrapperDTO.Builder< - UserDataStreamSubscribeSignatureRequest, - UserDataStreamSubscribeSignatureResponse>() - .id(getRequestID()) - .method(methodName) - .params(userDataStreamSubscribeSignatureRequest) - .responseType(UserDataStreamSubscribeSignatureResponse.class) - .build(); + ApiRequestWrapperDTO build = + new ApiRequestWrapperDTO.Builder< + BaseRequestDTO, UserDataStreamSubscribeSignatureResponse>() + .id(getRequestID()) + .method(methodName) + .params(new BaseRequestDTO()) + .responseType(UserDataStreamSubscribeSignatureResponse.class) + .build(); try { BlockingQueue queue = connection.sendForStream(build); @@ -191,34 +195,13 @@ private void userDataStreamSubscribeValidateBeforeCall() throws ApiException {} } @SuppressWarnings("rawtypes") - private void userDataStreamSubscribeSignatureValidateBeforeCall( - UserDataStreamSubscribeSignatureRequest userDataStreamSubscribeSignatureRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(userDataStreamSubscribeSignatureRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } + private void userDataStreamSubscribeSignatureValidateBeforeCall() throws ApiException {} /** * WebSocket Unsubscribe from User Data Stream Stop listening to the User Data Stream in the * current WebSocket connection. Note that `session.logout` will only close the * subscription created with `userDataStream.subscribe` but not subscriptions opened - * with `userDataStream.subscribe.signature`. Weight: 2 + * with `userDataStream.subscribe.signature`. Weight(IP): 2 * * @param userDataStreamUnsubscribeRequest (optional) * @return UserDataStreamUnsubscribeResponse @@ -232,7 +215,7 @@ private void userDataStreamSubscribeSignatureValidateBeforeCall( * * * @see WebSocket + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/user-data-stream#user-data-stream-unsubscribe">WebSocket * Unsubscribe from User Data Stream Documentation */ public CompletableFuture userDataStreamUnsubscribe( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AbovePegOffsetType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AbovePegOffsetType.java index b116a1c2e..aedd81219 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AbovePegOffsetType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AbovePegOffsetType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AbovePegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AbovePegPriceType.java index 3314e3ca2..b221f9a6d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AbovePegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AbovePegPriceType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets abovePegPriceType */ +/** + * `PRIMARY_PEG` or `MARKET_PEG`. See [Pegged + * Orders](/products/spot/faqs/pegged_orders) + */ @JsonAdapter(AbovePegPriceType.Adapter.class) public enum AbovePegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AboveTimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AboveTimeInForce.java index 70c154dab..e3dca9406 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AboveTimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AboveTimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets aboveTimeInForce */ +/** + * Required if `aboveType` is `STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT`. + */ @JsonAdapter(AboveTimeInForce.Adapter.class) public enum AboveTimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AboveType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AboveType.java index 11ada8c5c..6b055f2cd 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AboveType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AboveType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AbstractOpenApiSchema.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AbstractOpenApiSchema.java index 4acc022c4..cb28ef8e7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AbstractOpenApiSchema.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AbstractOpenApiSchema.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -18,7 +18,7 @@ /** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionRequest.java index 97e86307a..ba244f9e0 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,8 +37,14 @@ /** AccountCommissionRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountCommissionRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -47,6 +53,25 @@ public class AccountCommissionRequest extends BaseDTO { public AccountCommissionRequest() {} + public AccountCommissionRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public AccountCommissionRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -76,18 +101,20 @@ public boolean equals(Object o) { return false; } AccountCommissionRequest accountCommissionRequest = (AccountCommissionRequest) o; - return Objects.equals(this.symbol, accountCommissionRequest.symbol); + return Objects.equals(this.id, accountCommissionRequest.id) + && Objects.equals(this.symbol, accountCommissionRequest.symbol); } @Override public int hashCode() { - return Objects.hash(symbol); + return Objects.hash(id, symbol); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AccountCommissionRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append("}"); return sb.toString(); @@ -97,6 +124,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -113,6 +145,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -143,6 +179,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); // a set of required properties/fields (JSON key names) @@ -190,6 +227,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponse.java index 1f6a37506..0a08d9b7d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** AccountCommissionResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountCommissionResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class AccountCommissionResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public AccountCommissionResponse() {} @@ -129,12 +129,14 @@ public void setResult(@jakarta.annotation.Nullable AccountCommissionResponseResu } public AccountCommissionResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public AccountCommissionResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public AccountCommissionResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -149,11 +151,13 @@ public AccountCommissionResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -208,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -331,7 +335,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseRateLimitsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseRateLimitsInner.java new file mode 100644 index 000000000..28e9d2c27 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseRateLimitsInner.java @@ -0,0 +1,413 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AccountCommissionResponseRateLimitsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AccountCommissionResponseRateLimitsInner extends BaseDTO { + public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMIT_TYPE) + @jakarta.annotation.Nullable + private String rateLimitType; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private String interval; + + public static final String SERIALIZED_NAME_INTERVAL_NUM = "intervalNum"; + + @SerializedName(SERIALIZED_NAME_INTERVAL_NUM) + @jakarta.annotation.Nullable + private Long intervalNum; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + + @SerializedName(SERIALIZED_NAME_LIMIT) + @jakarta.annotation.Nullable + private Long limit; + + public static final String SERIALIZED_NAME_COUNT = "count"; + + @SerializedName(SERIALIZED_NAME_COUNT) + @jakarta.annotation.Nullable + private Long count; + + public AccountCommissionResponseRateLimitsInner() {} + + public AccountCommissionResponseRateLimitsInner rateLimitType( + @jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + return this; + } + + /** + * Get rateLimitType + * + * @return rateLimitType + */ + @jakarta.annotation.Nullable + public String getRateLimitType() { + return rateLimitType; + } + + public void setRateLimitType(@jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + } + + public AccountCommissionResponseRateLimitsInner interval( + @jakarta.annotation.Nullable String interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + public String getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + } + + public AccountCommissionResponseRateLimitsInner intervalNum( + @jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + return this; + } + + /** + * Get intervalNum + * + * @return intervalNum + */ + @jakarta.annotation.Nullable + public Long getIntervalNum() { + return intervalNum; + } + + public void setIntervalNum(@jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + } + + public AccountCommissionResponseRateLimitsInner limit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * + * @return limit + */ + @jakarta.annotation.Nullable + public Long getLimit() { + return limit; + } + + public void setLimit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + } + + public AccountCommissionResponseRateLimitsInner count(@jakarta.annotation.Nullable Long count) { + this.count = count; + return this; + } + + /** + * Get count + * + * @return count + */ + @jakarta.annotation.Nullable + public Long getCount() { + return count; + } + + public void setCount(@jakarta.annotation.Nullable Long count) { + this.count = count; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountCommissionResponseRateLimitsInner accountCommissionResponseRateLimitsInner = + (AccountCommissionResponseRateLimitsInner) o; + return Objects.equals( + this.rateLimitType, accountCommissionResponseRateLimitsInner.rateLimitType) + && Objects.equals(this.interval, accountCommissionResponseRateLimitsInner.interval) + && Objects.equals( + this.intervalNum, accountCommissionResponseRateLimitsInner.intervalNum) + && Objects.equals(this.limit, accountCommissionResponseRateLimitsInner.limit) + && Objects.equals(this.count, accountCommissionResponseRateLimitsInner.count); + } + + @Override + public int hashCode() { + return Objects.hash(rateLimitType, interval, intervalNum, limit, count); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountCommissionResponseRateLimitsInner {\n"); + sb.append(" rateLimitType: ").append(toIndentedString(rateLimitType)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" intervalNum: ").append(toIndentedString(intervalNum)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + String rateLimitTypeValueAsString = rateLimitTypeValue.toString(); + valMap.put("rateLimitType", rateLimitTypeValueAsString); + } + String intervalValue = getInterval(); + if (intervalValue != null) { + String intervalValueAsString = intervalValue.toString(); + valMap.put("interval", intervalValueAsString); + } + Long intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + String intervalNumValueAsString = intervalNumValue.toString(); + valMap.put("intervalNum", intervalNumValueAsString); + } + Long limitValue = getLimit(); + if (limitValue != null) { + String limitValueAsString = limitValue.toString(); + valMap.put("limit", limitValueAsString); + } + Long countValue = getCount(); + if (countValue != null) { + String countValueAsString = countValue.toString(); + valMap.put("count", countValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + valMap.put("rateLimitType", rateLimitTypeValue); + } + Object intervalValue = getInterval(); + if (intervalValue != null) { + valMap.put("interval", intervalValue); + } + Object intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + valMap.put("intervalNum", intervalNumValue); + } + Object limitValue = getLimit(); + if (limitValue != null) { + valMap.put("limit", limitValue); + } + Object countValue = getCount(); + if (countValue != null) { + valMap.put("count", countValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("rateLimitType"); + openapiFields.add("interval"); + openapiFields.add("intervalNum"); + openapiFields.add("limit"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * AccountCommissionResponseRateLimitsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AccountCommissionResponseRateLimitsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " AccountCommissionResponseRateLimitsInner is not found in" + + " the empty JSON string", + AccountCommissionResponseRateLimitsInner.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AccountCommissionResponseRateLimitsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AccountCommissionResponseRateLimitsInner` properties." + + " JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("rateLimitType") != null && !jsonObj.get("rateLimitType").isJsonNull()) + && !jsonObj.get("rateLimitType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimitType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimitType").toString())); + } + if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) + && !jsonObj.get("interval").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `interval` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("interval").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AccountCommissionResponseRateLimitsInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'AccountCommissionResponseRateLimitsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(AccountCommissionResponseRateLimitsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, AccountCommissionResponseRateLimitsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AccountCommissionResponseRateLimitsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AccountCommissionResponseRateLimitsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountCommissionResponseRateLimitsInner + * @throws IOException if the JSON string is invalid with respect to + * AccountCommissionResponseRateLimitsInner + */ + public static AccountCommissionResponseRateLimitsInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, AccountCommissionResponseRateLimitsInner.class); + } + + /** + * Convert an instance of AccountCommissionResponseRateLimitsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResult.java index 2f07e76bb..2789e9689 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** AccountCommissionResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountCommissionResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResultDiscount.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResultDiscount.java index 49d64383e..4c8291c36 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResultDiscount.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResultDiscount.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** AccountCommissionResponseResultDiscount */ +/** Discount on standard commissions when paying in BNB. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountCommissionResponseResultDiscount extends BaseDTO { public static final String SERIALIZED_NAME_ENABLED_FOR_ACCOUNT = "enabledForAccount"; @@ -132,7 +132,7 @@ public AccountCommissionResponseResultDiscount discount( } /** - * Get discount + * Standard commission is reduced by this rate when paying commission in BNB. * * @return discount */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResultSpecialCommission.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResultSpecialCommission.java index 8cafef582..54fd70acc 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResultSpecialCommission.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResultSpecialCommission.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** AccountCommissionResponseResultSpecialCommission */ +/** Special commission rates from the order. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountCommissionResponseResultSpecialCommission extends BaseDTO { public static final String SERIALIZED_NAME_MAKER = "maker"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResultStandardCommission.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResultStandardCommission.java index cca8c4eb8..29e3177f3 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResultStandardCommission.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResultStandardCommission.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** AccountCommissionResponseResultStandardCommission */ +/** Standard commission rates on trades from the order. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountCommissionResponseResultStandardCommission extends BaseDTO { public static final String SERIALIZED_NAME_MAKER = "maker"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResultTaxCommission.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResultTaxCommission.java index cbc5b3105..77b0a99ff 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResultTaxCommission.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountCommissionResponseResultTaxCommission.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** AccountCommissionResponseResultTaxCommission */ +/** Tax commission rates on trades from the order. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountCommissionResponseResultTaxCommission extends BaseDTO { public static final String SERIALIZED_NAME_MAKER = "maker"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersRequest.java index 339f36a8c..cf23dc153 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** AccountRateLimitsOrdersRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountRateLimitsOrdersRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @SerializedName(SERIALIZED_NAME_RECV_WINDOW) @@ -49,6 +55,25 @@ public class AccountRateLimitsOrdersRequest extends BaseDTO { public AccountRateLimitsOrdersRequest() {} + public AccountRateLimitsOrdersRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public AccountRateLimitsOrdersRequest recvWindow( @jakarta.annotation.Nullable Double recvWindow) { this.recvWindow = recvWindow; @@ -56,12 +81,14 @@ public AccountRateLimitsOrdersRequest recvWindow( } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -80,18 +107,20 @@ public boolean equals(Object o) { } AccountRateLimitsOrdersRequest accountRateLimitsOrdersRequest = (AccountRateLimitsOrdersRequest) o; - return Objects.equals(this.recvWindow, accountRateLimitsOrdersRequest.recvWindow); + return Objects.equals(this.id, accountRateLimitsOrdersRequest.id) + && Objects.equals(this.recvWindow, accountRateLimitsOrdersRequest.recvWindow); } @Override public int hashCode() { - return Objects.hash(recvWindow); + return Objects.hash(id, recvWindow); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AccountRateLimitsOrdersRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); sb.append("}"); return sb.toString(); @@ -101,6 +130,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } Double recvWindowValue = getRecvWindow(); if (recvWindowValue != null) { String recvWindowValueAsString = @@ -118,6 +152,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object recvWindowValue = getRecvWindow(); if (recvWindowValue != null) { valMap.put("recvWindow", recvWindowValue); @@ -148,6 +186,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("recvWindow"); // a set of required properties/fields (JSON key names) @@ -185,6 +224,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersResponse.java index e34804797..2af9dce49 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** AccountRateLimitsOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountRateLimitsOrdersResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class AccountRateLimitsOrdersResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public AccountRateLimitsOrdersResponse() {} @@ -141,12 +141,14 @@ public void setResult( } public AccountRateLimitsOrdersResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public AccountRateLimitsOrdersResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public AccountRateLimitsOrdersResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -161,11 +163,13 @@ public AccountRateLimitsOrdersResponse addRateLimitsItem(RateLimits rateLimitsIt */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -221,7 +225,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -361,7 +365,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersResponseResultInner.java index b92094e4b..226dd15a0 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersResponseResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountRateLimitsOrdersResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountRateLimitsOrdersResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusRequest.java index 90af3c7d0..40a2e2ca1 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** AccountStatusRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountStatusRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_OMIT_ZERO_BALANCES = "omitZeroBalances"; @SerializedName(SERIALIZED_NAME_OMIT_ZERO_BALANCES) @@ -55,6 +61,25 @@ public class AccountStatusRequest extends BaseDTO { public AccountStatusRequest() {} + public AccountStatusRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public AccountStatusRequest omitZeroBalances( @jakarta.annotation.Nullable Boolean omitZeroBalances) { this.omitZeroBalances = omitZeroBalances; @@ -62,7 +87,8 @@ public AccountStatusRequest omitZeroBalances( } /** - * Get omitZeroBalances + * When set to `true`, emits only the non-zero balances of an account. Default value: + * `false`. * * @return omitZeroBalances */ @@ -81,12 +107,14 @@ public AccountStatusRequest recvWindow(@jakarta.annotation.Nullable Double recvW } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -104,19 +132,21 @@ public boolean equals(Object o) { return false; } AccountStatusRequest accountStatusRequest = (AccountStatusRequest) o; - return Objects.equals(this.omitZeroBalances, accountStatusRequest.omitZeroBalances) + return Objects.equals(this.id, accountStatusRequest.id) + && Objects.equals(this.omitZeroBalances, accountStatusRequest.omitZeroBalances) && Objects.equals(this.recvWindow, accountStatusRequest.recvWindow); } @Override public int hashCode() { - return Objects.hash(omitZeroBalances, recvWindow); + return Objects.hash(id, omitZeroBalances, recvWindow); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AccountStatusRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" omitZeroBalances: ").append(toIndentedString(omitZeroBalances)).append("\n"); sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); sb.append("}"); @@ -127,6 +157,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } Boolean omitZeroBalancesValue = getOmitZeroBalances(); if (omitZeroBalancesValue != null) { String omitZeroBalancesValueAsString = omitZeroBalancesValue.toString(); @@ -149,6 +184,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object omitZeroBalancesValue = getOmitZeroBalances(); if (omitZeroBalancesValue != null) { valMap.put("omitZeroBalances", omitZeroBalancesValue); @@ -183,6 +222,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("omitZeroBalances"); openapiFields.add("recvWindow"); @@ -220,6 +260,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusResponse.java index d57988548..64a53ee13 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** AccountStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountStatusResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class AccountStatusResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public AccountStatusResponse() {} @@ -129,12 +129,14 @@ public void setResult(@jakarta.annotation.Nullable AccountStatusResponseResult r } public AccountStatusResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public AccountStatusResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public AccountStatusResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -149,11 +151,13 @@ public AccountStatusResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -208,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -331,7 +335,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusResponseResult.java index 7ca225ead..9cab82e13 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** AccountStatusResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountStatusResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_MAKER_COMMISSION = "makerCommission"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusResponseResultBalancesInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusResponseResultBalancesInner.java index 3150ff8ac..0f92b8d1e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusResponseResultBalancesInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusResponseResultBalancesInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountStatusResponseResultBalancesInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountStatusResponseResultBalancesInner extends BaseDTO { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusResponseResultCommissionRates.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusResponseResultCommissionRates.java index 8956f0c47..fc8c3a556 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusResponseResultCommissionRates.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountStatusResponseResultCommissionRates.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AccountStatusResponseResultCommissionRates */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountStatusResponseResultCommissionRates extends BaseDTO { public static final String SERIALIZED_NAME_MAKER = "maker"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrderListsRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrderListsRequest.java index be5bde0df..888636df9 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrderListsRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrderListsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** AllOrderListsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllOrderListsRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_FROM_ID = "fromId"; @SerializedName(SERIALIZED_NAME_FROM_ID) @@ -73,13 +79,32 @@ public class AllOrderListsRequest extends BaseDTO { public AllOrderListsRequest() {} + public AllOrderListsRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public AllOrderListsRequest fromId(@jakarta.annotation.Nullable Integer fromId) { this.fromId = fromId; return this; } /** - * Get fromId + * Order list ID to begin at * * @return fromId */ @@ -98,7 +123,7 @@ public AllOrderListsRequest startTime(@jakarta.annotation.Nullable Long startTim } /** - * Get startTime + * Timestamp in ms * * @return startTime */ @@ -117,7 +142,7 @@ public AllOrderListsRequest endTime(@jakarta.annotation.Nullable Long endTime) { } /** - * Get endTime + * Timestamp in ms * * @return endTime */ @@ -136,11 +161,12 @@ public AllOrderListsRequest limit(@jakarta.annotation.Nullable Integer limit) { } /** - * Get limit + * Default: 500; Maximum: 1000 maximum: 1000 * * @return limit */ @jakarta.annotation.Nullable + @Max(1000) public Integer getLimit() { return limit; } @@ -155,12 +181,14 @@ public AllOrderListsRequest recvWindow(@jakarta.annotation.Nullable Double recvW } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -178,7 +206,8 @@ public boolean equals(Object o) { return false; } AllOrderListsRequest allOrderListsRequest = (AllOrderListsRequest) o; - return Objects.equals(this.fromId, allOrderListsRequest.fromId) + return Objects.equals(this.id, allOrderListsRequest.id) + && Objects.equals(this.fromId, allOrderListsRequest.fromId) && Objects.equals(this.startTime, allOrderListsRequest.startTime) && Objects.equals(this.endTime, allOrderListsRequest.endTime) && Objects.equals(this.limit, allOrderListsRequest.limit) @@ -187,13 +216,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(fromId, startTime, endTime, limit, recvWindow); + return Objects.hash(id, fromId, startTime, endTime, limit, recvWindow); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AllOrderListsRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" fromId: ").append(toIndentedString(fromId)).append("\n"); sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); @@ -207,6 +237,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } Integer fromIdValue = getFromId(); if (fromIdValue != null) { String fromIdValueAsString = fromIdValue.toString(); @@ -244,6 +279,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object fromIdValue = getFromId(); if (fromIdValue != null) { valMap.put("fromId", fromIdValue); @@ -290,6 +329,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("fromId"); openapiFields.add("startTime"); openapiFields.add("endTime"); @@ -330,6 +370,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrderListsResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrderListsResponse.java index b040e59a0..b1fc2879d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrderListsResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrderListsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** AllOrderListsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllOrderListsResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class AllOrderListsResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public AllOrderListsResponse() {} @@ -138,12 +138,14 @@ public void setResult( } public AllOrderListsResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public AllOrderListsResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public AllOrderListsResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -158,11 +160,13 @@ public AllOrderListsResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -217,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -355,7 +359,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrderListsResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrderListsResponseResultInner.java index 0600f1d66..3b2064ecb 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrderListsResponseResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrderListsResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** AllOrderListsResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllOrderListsResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; @@ -89,7 +89,7 @@ public class AllOrderListsResponseResultInner extends BaseDTO { @SerializedName(SERIALIZED_NAME_ORDERS) @jakarta.annotation.Nullable - private List<@Valid OrderListCancelResponseResultOrdersInner> orders; + private List<@Valid AllOrderListsResponseResultInnerOrdersInner> orders; public AllOrderListsResponseResultInner() {} @@ -234,13 +234,13 @@ public void setSymbol(@jakarta.annotation.Nullable String symbol) { public AllOrderListsResponseResultInner orders( @jakarta.annotation.Nullable - List<@Valid OrderListCancelResponseResultOrdersInner> orders) { + List<@Valid AllOrderListsResponseResultInnerOrdersInner> orders) { this.orders = orders; return this; } public AllOrderListsResponseResultInner addOrdersItem( - OrderListCancelResponseResultOrdersInner ordersItem) { + AllOrderListsResponseResultInnerOrdersInner ordersItem) { if (this.orders == null) { this.orders = new ArrayList<>(); } @@ -255,13 +255,13 @@ public AllOrderListsResponseResultInner addOrdersItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid OrderListCancelResponseResultOrdersInner> getOrders() { + public List<@Valid AllOrderListsResponseResultInnerOrdersInner> getOrders() { return orders; } public void setOrders( @jakarta.annotation.Nullable - List<@Valid OrderListCancelResponseResultOrdersInner> orders) { + List<@Valid AllOrderListsResponseResultInnerOrdersInner> orders) { this.orders = orders; } @@ -358,7 +358,7 @@ public String toUrlQueryString() { String symbolValueAsString = symbolValue.toString(); valMap.put("symbol", symbolValueAsString); } - List<@Valid OrderListCancelResponseResultOrdersInner> ordersValue = getOrders(); + List<@Valid AllOrderListsResponseResultInnerOrdersInner> ordersValue = getOrders(); if (ordersValue != null) { String ordersValueAsString = JSON.getGson().toJson(ordersValue); valMap.put("orders", ordersValueAsString); @@ -531,7 +531,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `orders` (array) for (int i = 0; i < jsonArrayorders.size(); i++) { - OrderListCancelResponseResultOrdersInner.validateJsonElement( + AllOrderListsResponseResultInnerOrdersInner.validateJsonElement( jsonArrayorders.get(i)); } ; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrderListsResponseResultInnerOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrderListsResponseResultInnerOrdersInner.java new file mode 100644 index 000000000..f1b72e403 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrderListsResponseResultInnerOrdersInner.java @@ -0,0 +1,341 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AllOrderListsResponseResultInnerOrdersInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AllOrderListsResponseResultInnerOrdersInner extends BaseDTO { + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; + + @SerializedName(SERIALIZED_NAME_ORDER_ID) + @jakarta.annotation.Nullable + private Long orderId; + + public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; + + @SerializedName(SERIALIZED_NAME_CLIENT_ORDER_ID) + @jakarta.annotation.Nullable + private String clientOrderId; + + public AllOrderListsResponseResultInnerOrdersInner() {} + + public AllOrderListsResponseResultInnerOrdersInner symbol( + @jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Get symbol + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public AllOrderListsResponseResultInnerOrdersInner orderId( + @jakarta.annotation.Nullable Long orderId) { + this.orderId = orderId; + return this; + } + + /** + * Get orderId + * + * @return orderId + */ + @jakarta.annotation.Nullable + public Long getOrderId() { + return orderId; + } + + public void setOrderId(@jakarta.annotation.Nullable Long orderId) { + this.orderId = orderId; + } + + public AllOrderListsResponseResultInnerOrdersInner clientOrderId( + @jakarta.annotation.Nullable String clientOrderId) { + this.clientOrderId = clientOrderId; + return this; + } + + /** + * Get clientOrderId + * + * @return clientOrderId + */ + @jakarta.annotation.Nullable + public String getClientOrderId() { + return clientOrderId; + } + + public void setClientOrderId(@jakarta.annotation.Nullable String clientOrderId) { + this.clientOrderId = clientOrderId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllOrderListsResponseResultInnerOrdersInner allOrderListsResponseResultInnerOrdersInner = + (AllOrderListsResponseResultInnerOrdersInner) o; + return Objects.equals(this.symbol, allOrderListsResponseResultInnerOrdersInner.symbol) + && Objects.equals(this.orderId, allOrderListsResponseResultInnerOrdersInner.orderId) + && Objects.equals( + this.clientOrderId, + allOrderListsResponseResultInnerOrdersInner.clientOrderId); + } + + @Override + public int hashCode() { + return Objects.hash(symbol, orderId, clientOrderId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllOrderListsResponseResultInnerOrdersInner {\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); + sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + Long orderIdValue = getOrderId(); + if (orderIdValue != null) { + String orderIdValueAsString = orderIdValue.toString(); + valMap.put("orderId", orderIdValueAsString); + } + String clientOrderIdValue = getClientOrderId(); + if (clientOrderIdValue != null) { + String clientOrderIdValueAsString = clientOrderIdValue.toString(); + valMap.put("clientOrderId", clientOrderIdValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + Object orderIdValue = getOrderId(); + if (orderIdValue != null) { + valMap.put("orderId", orderIdValue); + } + Object clientOrderIdValue = getClientOrderId(); + if (clientOrderIdValue != null) { + valMap.put("clientOrderId", clientOrderIdValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("symbol"); + openapiFields.add("orderId"); + openapiFields.add("clientOrderId"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * AllOrderListsResponseResultInnerOrdersInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AllOrderListsResponseResultInnerOrdersInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " AllOrderListsResponseResultInnerOrdersInner is not found in" + + " the empty JSON string", + AllOrderListsResponseResultInnerOrdersInner.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AllOrderListsResponseResultInnerOrdersInner.openapiFields.contains( + entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AllOrderListsResponseResultInnerOrdersInner` properties." + + " JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + if ((jsonObj.get("clientOrderId") != null && !jsonObj.get("clientOrderId").isJsonNull()) + && !jsonObj.get("clientOrderId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `clientOrderId` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("clientOrderId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AllOrderListsResponseResultInnerOrdersInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'AllOrderListsResponseResultInnerOrdersInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(AllOrderListsResponseResultInnerOrdersInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, AllOrderListsResponseResultInnerOrdersInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AllOrderListsResponseResultInnerOrdersInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AllOrderListsResponseResultInnerOrdersInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of AllOrderListsResponseResultInnerOrdersInner + * @throws IOException if the JSON string is invalid with respect to + * AllOrderListsResponseResultInnerOrdersInner + */ + public static AllOrderListsResponseResultInnerOrdersInner fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, AllOrderListsResponseResultInnerOrdersInner.class); + } + + /** + * Convert an instance of AllOrderListsResponseResultInnerOrdersInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrdersRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrdersRequest.java index 35b0bff41..fb1d76291 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrdersRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrdersRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** AllOrdersRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllOrdersRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -79,6 +85,25 @@ public class AllOrdersRequest extends BaseDTO { public AllOrdersRequest() {} + public AllOrdersRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public AllOrdersRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -105,7 +130,7 @@ public AllOrdersRequest orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Order ID to begin at * * @return orderId */ @@ -124,7 +149,7 @@ public AllOrdersRequest startTime(@jakarta.annotation.Nullable Long startTime) { } /** - * Get startTime + * Timestamp in ms * * @return startTime */ @@ -143,7 +168,7 @@ public AllOrdersRequest endTime(@jakarta.annotation.Nullable Long endTime) { } /** - * Get endTime + * Timestamp in ms * * @return endTime */ @@ -162,11 +187,12 @@ public AllOrdersRequest limit(@jakarta.annotation.Nullable Integer limit) { } /** - * Get limit + * Default: 500; Maximum: 1000 maximum: 1000 * * @return limit */ @jakarta.annotation.Nullable + @Max(1000) public Integer getLimit() { return limit; } @@ -181,12 +207,14 @@ public AllOrdersRequest recvWindow(@jakarta.annotation.Nullable Double recvWindo } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -204,7 +232,8 @@ public boolean equals(Object o) { return false; } AllOrdersRequest allOrdersRequest = (AllOrdersRequest) o; - return Objects.equals(this.symbol, allOrdersRequest.symbol) + return Objects.equals(this.id, allOrdersRequest.id) + && Objects.equals(this.symbol, allOrdersRequest.symbol) && Objects.equals(this.orderId, allOrdersRequest.orderId) && Objects.equals(this.startTime, allOrdersRequest.startTime) && Objects.equals(this.endTime, allOrdersRequest.endTime) @@ -214,13 +243,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(symbol, orderId, startTime, endTime, limit, recvWindow); + return Objects.hash(id, symbol, orderId, startTime, endTime, limit, recvWindow); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AllOrdersRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); @@ -235,6 +265,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -277,6 +312,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -327,6 +366,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("orderId"); openapiFields.add("startTime"); @@ -379,6 +419,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrdersResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrdersResponse.java index 44475ae84..7c6bb0cd4 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrdersResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** AllOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllOrdersResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class AllOrdersResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public AllOrdersResponse() {} @@ -138,12 +138,14 @@ public void setResult( } public AllOrdersResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public AllOrdersResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public AllOrdersResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -158,11 +160,13 @@ public AllOrdersResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -217,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -355,7 +359,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrdersResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrdersResponseResultInner.java index 79befea37..5e38c0e5c 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrdersResponseResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AllOrdersResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AllOrdersResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllOrdersResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -111,18 +111,6 @@ public class AllOrdersResponseResultInner extends BaseDTO { @jakarta.annotation.Nullable private String side; - public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; - - @SerializedName(SERIALIZED_NAME_STOP_PRICE) - @jakarta.annotation.Nullable - private String stopPrice; - - public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; - - @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) - @jakarta.annotation.Nullable - private String icebergQty; - public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) @@ -172,6 +160,84 @@ public class AllOrdersResponseResultInner extends BaseDTO { @jakarta.annotation.Nullable private String preventedQuantity; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + + @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @jakarta.annotation.Nullable + private String stopPrice; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public AllOrdersResponseResultInner() {} public AllOrdersResponseResultInner symbol(@jakarta.annotation.Nullable String symbol) { @@ -218,7 +284,7 @@ public AllOrdersResponseResultInner orderListId(@jakarta.annotation.Nullable Lon } /** - * Get orderListId + * Present only for orders that belong to an order list. * * @return orderListId */ @@ -406,51 +472,13 @@ public void setSide(@jakarta.annotation.Nullable String side) { this.side = side; } - public AllOrdersResponseResultInner stopPrice(@jakarta.annotation.Nullable String stopPrice) { - this.stopPrice = stopPrice; - return this; - } - - /** - * Get stopPrice - * - * @return stopPrice - */ - @jakarta.annotation.Nullable - public String getStopPrice() { - return stopPrice; - } - - public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { - this.stopPrice = stopPrice; - } - - public AllOrdersResponseResultInner icebergQty(@jakarta.annotation.Nullable String icebergQty) { - this.icebergQty = icebergQty; - return this; - } - - /** - * Get icebergQty - * - * @return icebergQty - */ - @jakarta.annotation.Nullable - public String getIcebergQty() { - return icebergQty; - } - - public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { - this.icebergQty = icebergQty; - } - public AllOrdersResponseResultInner time(@jakarta.annotation.Nullable Long time) { this.time = time; return this; } /** - * Get time + * Order placement time. * * @return time */ @@ -469,7 +497,7 @@ public AllOrdersResponseResultInner updateTime(@jakarta.annotation.Nullable Long } /** - * Get updateTime + * Time of the last update to the order. * * @return updateTime */ @@ -527,7 +555,7 @@ public AllOrdersResponseResultInner origQuoteOrderQty( } /** - * Get origQuoteOrderQty + * Always present. Zero if the order type does not use `quoteOrderQty`. * * @return origQuoteOrderQty */ @@ -568,7 +596,7 @@ public AllOrdersResponseResultInner preventedMatchId( } /** - * Get preventedMatchId + * Present only if the order expired due to STP. * * @return preventedMatchId */ @@ -588,7 +616,7 @@ public AllOrdersResponseResultInner preventedQuantity( } /** - * Get preventedQuantity + * Present only if the order expired due to STP. * * @return preventedQuantity */ @@ -601,6 +629,262 @@ public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQu this.preventedQuantity = preventedQuantity; } + public AllOrdersResponseResultInner icebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public AllOrdersResponseResultInner stopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + /** + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. + * + * @return stopPrice + */ + @jakarta.annotation.Nullable + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + } + + public AllOrdersResponseResultInner strategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public AllOrdersResponseResultInner strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public AllOrdersResponseResultInner trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public AllOrdersResponseResultInner trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public AllOrdersResponseResultInner usedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public AllOrdersResponseResultInner workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public AllOrdersResponseResultInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public AllOrdersResponseResultInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public AllOrdersResponseResultInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public AllOrdersResponseResultInner peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public AllOrdersResponseResultInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -624,8 +908,6 @@ public boolean equals(Object o) { && Objects.equals(this.timeInForce, allOrdersResponseResultInner.timeInForce) && Objects.equals(this.type, allOrdersResponseResultInner.type) && Objects.equals(this.side, allOrdersResponseResultInner.side) - && Objects.equals(this.stopPrice, allOrdersResponseResultInner.stopPrice) - && Objects.equals(this.icebergQty, allOrdersResponseResultInner.icebergQty) && Objects.equals(this.time, allOrdersResponseResultInner.time) && Objects.equals(this.updateTime, allOrdersResponseResultInner.updateTime) && Objects.equals(this.isWorking, allOrdersResponseResultInner.isWorking) @@ -638,7 +920,20 @@ public boolean equals(Object o) { && Objects.equals( this.preventedMatchId, allOrdersResponseResultInner.preventedMatchId) && Objects.equals( - this.preventedQuantity, allOrdersResponseResultInner.preventedQuantity); + this.preventedQuantity, allOrdersResponseResultInner.preventedQuantity) + && Objects.equals(this.icebergQty, allOrdersResponseResultInner.icebergQty) + && Objects.equals(this.stopPrice, allOrdersResponseResultInner.stopPrice) + && Objects.equals(this.strategyId, allOrdersResponseResultInner.strategyId) + && Objects.equals(this.strategyType, allOrdersResponseResultInner.strategyType) + && Objects.equals(this.trailingDelta, allOrdersResponseResultInner.trailingDelta) + && Objects.equals(this.trailingTime, allOrdersResponseResultInner.trailingTime) + && Objects.equals(this.usedSor, allOrdersResponseResultInner.usedSor) + && Objects.equals(this.workingFloor, allOrdersResponseResultInner.workingFloor) + && Objects.equals(this.pegPriceType, allOrdersResponseResultInner.pegPriceType) + && Objects.equals(this.pegOffsetType, allOrdersResponseResultInner.pegOffsetType) + && Objects.equals(this.pegOffsetValue, allOrdersResponseResultInner.pegOffsetValue) + && Objects.equals(this.peggedPrice, allOrdersResponseResultInner.peggedPrice) + && Objects.equals(this.expiryReason, allOrdersResponseResultInner.expiryReason); } @Override @@ -656,8 +951,6 @@ public int hashCode() { timeInForce, type, side, - stopPrice, - icebergQty, time, updateTime, isWorking, @@ -665,7 +958,20 @@ public int hashCode() { origQuoteOrderQty, selfTradePreventionMode, preventedMatchId, - preventedQuantity); + preventedQuantity, + icebergQty, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -686,8 +992,6 @@ public String toString() { sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); - sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); - sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); sb.append(" time: ").append(toIndentedString(time)).append("\n"); sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); sb.append(" isWorking: ").append(toIndentedString(isWorking)).append("\n"); @@ -698,6 +1002,19 @@ public String toString() { .append("\n"); sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -766,16 +1083,6 @@ public String toUrlQueryString() { String sideValueAsString = sideValue.toString(); valMap.put("side", sideValueAsString); } - String stopPriceValue = getStopPrice(); - if (stopPriceValue != null) { - String stopPriceValueAsString = stopPriceValue.toString(); - valMap.put("stopPrice", stopPriceValueAsString); - } - String icebergQtyValue = getIcebergQty(); - if (icebergQtyValue != null) { - String icebergQtyValueAsString = icebergQtyValue.toString(); - valMap.put("icebergQty", icebergQtyValueAsString); - } Long timeValue = getTime(); if (timeValue != null) { String timeValueAsString = timeValue.toString(); @@ -816,6 +1123,71 @@ public String toUrlQueryString() { String preventedQuantityValueAsString = preventedQuantityValue.toString(); valMap.put("preventedQuantity", preventedQuantityValueAsString); } + String icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + String icebergQtyValueAsString = icebergQtyValue.toString(); + valMap.put("icebergQty", icebergQtyValueAsString); + } + String stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + String stopPriceValueAsString = stopPriceValue.toString(); + valMap.put("stopPrice", stopPriceValueAsString); + } + Long strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + String strategyIdValueAsString = strategyIdValue.toString(); + valMap.put("strategyId", strategyIdValueAsString); + } + Long strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + String strategyTypeValueAsString = strategyTypeValue.toString(); + valMap.put("strategyType", strategyTypeValueAsString); + } + Long trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + String trailingDeltaValueAsString = trailingDeltaValue.toString(); + valMap.put("trailingDelta", trailingDeltaValueAsString); + } + Long trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + String trailingTimeValueAsString = trailingTimeValue.toString(); + valMap.put("trailingTime", trailingTimeValueAsString); + } + Boolean usedSorValue = getUsedSor(); + if (usedSorValue != null) { + String usedSorValueAsString = usedSorValue.toString(); + valMap.put("usedSor", usedSorValueAsString); + } + String workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + String workingFloorValueAsString = workingFloorValue.toString(); + valMap.put("workingFloor", workingFloorValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -875,14 +1247,6 @@ public Map toMap() { if (sideValue != null) { valMap.put("side", sideValue); } - Object stopPriceValue = getStopPrice(); - if (stopPriceValue != null) { - valMap.put("stopPrice", stopPriceValue); - } - Object icebergQtyValue = getIcebergQty(); - if (icebergQtyValue != null) { - valMap.put("icebergQty", icebergQtyValue); - } Object timeValue = getTime(); if (timeValue != null) { valMap.put("time", timeValue); @@ -915,6 +1279,58 @@ public Map toMap() { if (preventedQuantityValue != null) { valMap.put("preventedQuantity", preventedQuantityValue); } + Object icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + valMap.put("icebergQty", icebergQtyValue); + } + Object stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + valMap.put("stopPrice", stopPriceValue); + } + Object strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + valMap.put("strategyId", strategyIdValue); + } + Object strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + valMap.put("strategyType", strategyTypeValue); + } + Object trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + valMap.put("trailingDelta", trailingDeltaValue); + } + Object trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + valMap.put("trailingTime", trailingTimeValue); + } + Object usedSorValue = getUsedSor(); + if (usedSorValue != null) { + valMap.put("usedSor", usedSorValue); + } + Object workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + valMap.put("workingFloor", workingFloorValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -953,8 +1369,6 @@ private String toIndentedString(Object o) { openapiFields.add("timeInForce"); openapiFields.add("type"); openapiFields.add("side"); - openapiFields.add("stopPrice"); - openapiFields.add("icebergQty"); openapiFields.add("time"); openapiFields.add("updateTime"); openapiFields.add("isWorking"); @@ -963,6 +1377,19 @@ private String toIndentedString(Object o) { openapiFields.add("selfTradePreventionMode"); openapiFields.add("preventedMatchId"); openapiFields.add("preventedQuantity"); + openapiFields.add("icebergQty"); + openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -1080,22 +1507,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("side").toString())); } - if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) - && !jsonObj.get("stopPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `stopPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("stopPrice").toString())); - } - if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) - && !jsonObj.get("icebergQty").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `icebergQty` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("icebergQty").toString())); - } if ((jsonObj.get("origQuoteOrderQty") != null && !jsonObj.get("origQuoteOrderQty").isJsonNull()) && !jsonObj.get("origQuoteOrderQty").isJsonPrimitive()) { @@ -1123,6 +1534,62 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " JSON string but got `%s`", jsonObj.get("preventedQuantity").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) + && !jsonObj.get("stopPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `stopPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("stopPrice").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AssetFilters.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AssetFilters.java deleted file mode 100644 index 0c5be8987..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AssetFilters.java +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.api.model; - -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.binance.connector.client.spot.websocket.api.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AssetFilters extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(AssetFilters.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AssetFilters.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AssetFilters' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterMaxAssetFilter = - gson.getDelegateAdapter(this, TypeToken.get(MaxAssetFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AssetFilters value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `MaxAssetFilter` - if (value.getActualInstance() instanceof MaxAssetFilter) { - JsonElement element = - adapterMaxAssetFilter.toJsonTree( - (MaxAssetFilter) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " MaxAssetFilter"); - } - - @Override - public AssetFilters read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - JsonObject jsonObject = jsonElement.getAsJsonObject(); - - // use discriminator value for faster oneOf lookup - AssetFilters newAssetFilters = new AssetFilters(); - if (jsonObject.get("filterType") == null) { - log.log( - Level.WARNING, - "Failed to lookup discriminator value for AssetFilters as" - + " `filterType` was not found in the payload or the" - + " payload is empty."); - } else { - // look up the discriminator value in the field `filterType` - switch (jsonObject.get("filterType").getAsString()) { - case "MAX_ASSET": - deserialized = - adapterMaxAssetFilter.fromJsonTree(jsonObject); - newAssetFilters.setActualInstance(deserialized); - return newAssetFilters; - case "MaxAssetFilter": - deserialized = - adapterMaxAssetFilter.fromJsonTree(jsonObject); - newAssetFilters.setActualInstance(deserialized); - return newAssetFilters; - default: - newAssetFilters.setActualInstance(jsonElement.toString()); - log.log( - Level.WARNING, - String.format( - "Failed to lookup discriminator value `%s`" - + " for AssetFilters. Possible values:" - + " MAX_ASSET MaxAssetFilter. Falling" - + " back to String.", - jsonObject - .get("filterType") - .getAsString())); - } - } - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize MaxAssetFilter - try { - // validate the JSON object to see if any exception is thrown - MaxAssetFilter.validateJsonElement(jsonElement); - actualAdapter = adapterMaxAssetFilter; - match++; - log.log(Level.FINER, "Input data matches schema 'MaxAssetFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for MaxAssetFilter failed with" - + " `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'MaxAssetFilter'", - e); - } - - if (match == 1) { - AssetFilters ret = new AssetFilters(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for AssetFilters: %d classes" - + " match result, expected 1. Detailed failure" - + " message for oneOf schemas: %s. JSON: %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public AssetFilters() { - super("oneOf", Boolean.FALSE); - } - - public AssetFilters(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("MaxAssetFilter", MaxAssetFilter.class); - } - - @Override - public Map> getSchemas() { - return AssetFilters.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: MaxAssetFilter - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof MaxAssetFilter) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be MaxAssetFilter"); - } - - /** - * Get the actual instance, which can be the following: MaxAssetFilter - * - * @return The actual instance (MaxAssetFilter) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `MaxAssetFilter`. If the actual instance is not `MaxAssetFilter`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `MaxAssetFilter` - * @throws ClassCastException if the instance is not `MaxAssetFilter` - */ - public MaxAssetFilter getMaxAssetFilter() throws ClassCastException { - return (MaxAssetFilter) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AssetFilters - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with MaxAssetFilter - try { - MaxAssetFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for MaxAssetFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for AssetFilters with oneOf schemas:" - + " MaxAssetFilter. %d class(es) match the result, expected 1." - + " Detailed failure message for oneOf schemas: %s. JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of AssetFilters given an JSON string - * - * @param jsonString JSON string - * @return An instance of AssetFilters - * @throws IOException if the JSON string is invalid with respect to AssetFilters - */ - public static AssetFilters fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AssetFilters.class); - } - - /** - * Convert an instance of AssetFilters to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceRequest.java index aa892a333..a713a9f6a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,8 +37,14 @@ /** AvgPriceRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AvgPriceRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -47,6 +53,25 @@ public class AvgPriceRequest extends BaseDTO { public AvgPriceRequest() {} + public AvgPriceRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public AvgPriceRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -76,18 +101,20 @@ public boolean equals(Object o) { return false; } AvgPriceRequest avgPriceRequest = (AvgPriceRequest) o; - return Objects.equals(this.symbol, avgPriceRequest.symbol); + return Objects.equals(this.id, avgPriceRequest.id) + && Objects.equals(this.symbol, avgPriceRequest.symbol); } @Override public int hashCode() { - return Objects.hash(symbol); + return Objects.hash(id, symbol); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AvgPriceRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append("}"); return sb.toString(); @@ -97,6 +124,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -113,6 +145,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -143,6 +179,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); // a set of required properties/fields (JSON key names) @@ -190,6 +227,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceResponse.java index af4aab626..f47fa59b1 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** AvgPriceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AvgPriceResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class AvgPriceResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public AvgPriceResponse() {} @@ -128,12 +128,14 @@ public void setResult(@jakarta.annotation.Nullable AvgPriceResponseResult result } public AvgPriceResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public AvgPriceResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public AvgPriceResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -148,11 +150,13 @@ public AvgPriceResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -207,7 +211,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -330,7 +334,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceResponseResult.java index 3de17c8ab..0fd549859 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AvgPriceResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AvgPriceResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_MINS = "mins"; @@ -65,7 +65,7 @@ public AvgPriceResponseResult mins(@jakarta.annotation.Nullable Long mins) { } /** - * Get mins + * Average price interval (in minutes) * * @return mins */ @@ -84,7 +84,7 @@ public AvgPriceResponseResult price(@jakarta.annotation.Nullable String price) { } /** - * Get price + * Average price * * @return price */ @@ -103,7 +103,7 @@ public AvgPriceResponseResult closeTime(@jakarta.annotation.Nullable Long closeT } /** - * Get closeTime + * Last trade time * * @return closeTime */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BalanceUpdate.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BalanceUpdate.java index 89b3b57e5..fb3cca3a1 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BalanceUpdate.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BalanceUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** BalanceUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BalanceUpdate extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -71,7 +71,7 @@ public BalanceUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -90,7 +90,7 @@ public BalanceUpdate aLowerCase(@jakarta.annotation.Nullable String aLowerCase) } /** - * Get aLowerCase + * Asset * * @return aLowerCase */ @@ -109,7 +109,7 @@ public BalanceUpdate dLowerCase(@jakarta.annotation.Nullable String dLowerCase) } /** - * Get dLowerCase + * Balance Delta * * @return dLowerCase */ @@ -128,7 +128,7 @@ public BalanceUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Clear Time * * @return T */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowPegOffsetType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowPegOffsetType.java index d45db7628..74d88a24e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowPegOffsetType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowPegOffsetType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowPegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowPegPriceType.java index aa79ec1ef..4ad58fea0 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowPegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowPegPriceType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets belowPegPriceType */ +/** See [Pegged Orders](/products/spot/faqs/pegged_orders) */ @JsonAdapter(BelowPegPriceType.Adapter.class) public enum BelowPegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowTimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowTimeInForce.java index 4057995a3..d7d469f59 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowTimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowTimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets belowTimeInForce */ +/** + * Required if `belowType` is `STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT`. + */ @JsonAdapter(BelowTimeInForce.Adapter.class) public enum BelowTimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowType.java index 954c7f35e..62619f9ee 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets belowType */ +/** + * Supported values: `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, + * `TAKE_PROFIT_LIMIT` + */ @JsonAdapter(BelowType.Adapter.class) public enum BelowType { STOP_LOSS("STOP_LOSS"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BlockTradesHistoricalRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BlockTradesHistoricalRequest.java new file mode 100644 index 000000000..858370c00 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BlockTradesHistoricalRequest.java @@ -0,0 +1,378 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** BlockTradesHistoricalRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class BlockTradesHistoricalRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nonnull + private String symbol; + + public static final String SERIALIZED_NAME_FROM_ID = "fromId"; + + @SerializedName(SERIALIZED_NAME_FROM_ID) + @jakarta.annotation.Nonnull + private Long fromId; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + + @SerializedName(SERIALIZED_NAME_LIMIT) + @jakarta.annotation.Nullable + private Long limit; + + public BlockTradesHistoricalRequest() {} + + public BlockTradesHistoricalRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public BlockTradesHistoricalRequest symbol(@jakarta.annotation.Nonnull String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Get symbol + * + * @return symbol + */ + @jakarta.annotation.Nonnull + @NotNull + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + this.symbol = symbol; + } + + public BlockTradesHistoricalRequest fromId(@jakarta.annotation.Nonnull Long fromId) { + this.fromId = fromId; + return this; + } + + /** + * Block trade ID to fetch from + * + * @return fromId + */ + @jakarta.annotation.Nonnull + @NotNull + public Long getFromId() { + return fromId; + } + + public void setFromId(@jakarta.annotation.Nonnull Long fromId) { + this.fromId = fromId; + } + + public BlockTradesHistoricalRequest limit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + return this; + } + + /** + * Default: 500; Maximum: 1000 maximum: 1000 + * + * @return limit + */ + @jakarta.annotation.Nullable + @Max(1000L) + public Long getLimit() { + return limit; + } + + public void setLimit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BlockTradesHistoricalRequest blockTradesHistoricalRequest = + (BlockTradesHistoricalRequest) o; + return Objects.equals(this.id, blockTradesHistoricalRequest.id) + && Objects.equals(this.symbol, blockTradesHistoricalRequest.symbol) + && Objects.equals(this.fromId, blockTradesHistoricalRequest.fromId) + && Objects.equals(this.limit, blockTradesHistoricalRequest.limit); + } + + @Override + public int hashCode() { + return Objects.hash(id, symbol, fromId, limit); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BlockTradesHistoricalRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" fromId: ").append(toIndentedString(fromId)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + Long fromIdValue = getFromId(); + if (fromIdValue != null) { + String fromIdValueAsString = fromIdValue.toString(); + valMap.put("fromId", fromIdValueAsString); + } + Long limitValue = getLimit(); + if (limitValue != null) { + String limitValueAsString = limitValue.toString(); + valMap.put("limit", limitValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + Object fromIdValue = getFromId(); + if (fromIdValue != null) { + valMap.put("fromId", fromIdValue); + } + Object limitValue = getLimit(); + if (limitValue != null) { + valMap.put("limit", limitValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("symbol"); + openapiFields.add("fromId"); + openapiFields.add("limit"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("symbol"); + openapiRequiredFields.add("fromId"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * BlockTradesHistoricalRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BlockTradesHistoricalRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in BlockTradesHistoricalRequest is not" + + " found in the empty JSON string", + BlockTradesHistoricalRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BlockTradesHistoricalRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `BlockTradesHistoricalRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : BlockTradesHistoricalRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BlockTradesHistoricalRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BlockTradesHistoricalRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(BlockTradesHistoricalRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, BlockTradesHistoricalRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BlockTradesHistoricalRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of BlockTradesHistoricalRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of BlockTradesHistoricalRequest + * @throws IOException if the JSON string is invalid with respect to + * BlockTradesHistoricalRequest + */ + public static BlockTradesHistoricalRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BlockTradesHistoricalRequest.class); + } + + /** + * Convert an instance of BlockTradesHistoricalRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BlockTradesHistoricalResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BlockTradesHistoricalResponse.java new file mode 100644 index 000000000..c872970a8 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BlockTradesHistoricalResponse.java @@ -0,0 +1,429 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** BlockTradesHistoricalResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class BlockTradesHistoricalResponse extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @jakarta.annotation.Nullable + private Integer status; + + public static final String SERIALIZED_NAME_RESULT = "result"; + + @SerializedName(SERIALIZED_NAME_RESULT) + @jakarta.annotation.Nullable + private List<@Valid BlockTradesHistoricalResponseResultInner> result; + + public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMITS) + @jakarta.annotation.Nullable + private List<@Valid BlockTradesHistoricalResponseRateLimitsInner> rateLimits; + + public BlockTradesHistoricalResponse() {} + + public BlockTradesHistoricalResponse id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public BlockTradesHistoricalResponse status(@jakarta.annotation.Nullable Integer status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nullable + public Integer getStatus() { + return status; + } + + public void setStatus(@jakarta.annotation.Nullable Integer status) { + this.status = status; + } + + public BlockTradesHistoricalResponse result( + @jakarta.annotation.Nullable + List<@Valid BlockTradesHistoricalResponseResultInner> result) { + this.result = result; + return this; + } + + public BlockTradesHistoricalResponse addResultItem( + BlockTradesHistoricalResponseResultInner resultItem) { + if (this.result == null) { + this.result = new ArrayList<>(); + } + this.result.add(resultItem); + return this; + } + + /** + * Get result + * + * @return result + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid BlockTradesHistoricalResponseResultInner> getResult() { + return result; + } + + public void setResult( + @jakarta.annotation.Nullable + List<@Valid BlockTradesHistoricalResponseResultInner> result) { + this.result = result; + } + + public BlockTradesHistoricalResponse rateLimits( + @jakarta.annotation.Nullable + List<@Valid BlockTradesHistoricalResponseRateLimitsInner> rateLimits) { + this.rateLimits = rateLimits; + return this; + } + + public BlockTradesHistoricalResponse addRateLimitsItem( + BlockTradesHistoricalResponseRateLimitsInner rateLimitsItem) { + if (this.rateLimits == null) { + this.rateLimits = new ArrayList<>(); + } + this.rateLimits.add(rateLimitsItem); + return this; + } + + /** + * Get rateLimits + * + * @return rateLimits + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid BlockTradesHistoricalResponseRateLimitsInner> getRateLimits() { + return rateLimits; + } + + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid BlockTradesHistoricalResponseRateLimitsInner> rateLimits) { + this.rateLimits = rateLimits; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BlockTradesHistoricalResponse blockTradesHistoricalResponse = + (BlockTradesHistoricalResponse) o; + return Objects.equals(this.id, blockTradesHistoricalResponse.id) + && Objects.equals(this.status, blockTradesHistoricalResponse.status) + && Objects.equals(this.result, blockTradesHistoricalResponse.result) + && Objects.equals(this.rateLimits, blockTradesHistoricalResponse.rateLimits); + } + + @Override + public int hashCode() { + return Objects.hash(id, status, result, rateLimits); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BlockTradesHistoricalResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" rateLimits: ").append(toIndentedString(rateLimits)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + Integer statusValue = getStatus(); + if (statusValue != null) { + String statusValueAsString = statusValue.toString(); + valMap.put("status", statusValueAsString); + } + List<@Valid BlockTradesHistoricalResponseResultInner> resultValue = getResult(); + if (resultValue != null) { + String resultValueAsString = JSON.getGson().toJson(resultValue); + valMap.put("result", resultValueAsString); + } + List<@Valid BlockTradesHistoricalResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + if (rateLimitsValue != null) { + String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); + valMap.put("rateLimits", rateLimitsValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object statusValue = getStatus(); + if (statusValue != null) { + valMap.put("status", statusValue); + } + Object resultValue = getResult(); + if (resultValue != null) { + valMap.put("result", resultValue); + } + Object rateLimitsValue = getRateLimits(); + if (rateLimitsValue != null) { + valMap.put("rateLimits", rateLimitsValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("status"); + openapiFields.add("result"); + openapiFields.add("rateLimits"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * BlockTradesHistoricalResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BlockTradesHistoricalResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in BlockTradesHistoricalResponse is not" + + " found in the empty JSON string", + BlockTradesHistoricalResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BlockTradesHistoricalResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `BlockTradesHistoricalResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { + JsonArray jsonArrayresult = jsonObj.getAsJsonArray("result"); + if (jsonArrayresult != null) { + // ensure the json data is an array + if (!jsonObj.get("result").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `result` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("result").toString())); + } + + // validate the optional field `result` (array) + for (int i = 0; i < jsonArrayresult.size(); i++) { + BlockTradesHistoricalResponseResultInner.validateJsonElement( + jsonArrayresult.get(i)); + } + ; + } + } + if (jsonObj.get("rateLimits") != null && !jsonObj.get("rateLimits").isJsonNull()) { + JsonArray jsonArrayrateLimits = jsonObj.getAsJsonArray("rateLimits"); + if (jsonArrayrateLimits != null) { + // ensure the json data is an array + if (!jsonObj.get("rateLimits").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimits` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimits").toString())); + } + + // validate the optional field `rateLimits` (array) + for (int i = 0; i < jsonArrayrateLimits.size(); i++) { + BlockTradesHistoricalResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BlockTradesHistoricalResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BlockTradesHistoricalResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(BlockTradesHistoricalResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, BlockTradesHistoricalResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BlockTradesHistoricalResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of BlockTradesHistoricalResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of BlockTradesHistoricalResponse + * @throws IOException if the JSON string is invalid with respect to + * BlockTradesHistoricalResponse + */ + public static BlockTradesHistoricalResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BlockTradesHistoricalResponse.class); + } + + /** + * Convert an instance of BlockTradesHistoricalResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BlockTradesHistoricalResponseRateLimitsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BlockTradesHistoricalResponseRateLimitsInner.java new file mode 100644 index 000000000..c3cdc7e4d --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BlockTradesHistoricalResponseRateLimitsInner.java @@ -0,0 +1,420 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** BlockTradesHistoricalResponseRateLimitsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class BlockTradesHistoricalResponseRateLimitsInner extends BaseDTO { + public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMIT_TYPE) + @jakarta.annotation.Nullable + private String rateLimitType; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private String interval; + + public static final String SERIALIZED_NAME_INTERVAL_NUM = "intervalNum"; + + @SerializedName(SERIALIZED_NAME_INTERVAL_NUM) + @jakarta.annotation.Nullable + private Integer intervalNum; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + + @SerializedName(SERIALIZED_NAME_LIMIT) + @jakarta.annotation.Nullable + private Integer limit; + + public static final String SERIALIZED_NAME_COUNT = "count"; + + @SerializedName(SERIALIZED_NAME_COUNT) + @jakarta.annotation.Nullable + private Integer count; + + public BlockTradesHistoricalResponseRateLimitsInner() {} + + public BlockTradesHistoricalResponseRateLimitsInner rateLimitType( + @jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + return this; + } + + /** + * Get rateLimitType + * + * @return rateLimitType + */ + @jakarta.annotation.Nullable + public String getRateLimitType() { + return rateLimitType; + } + + public void setRateLimitType(@jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + } + + public BlockTradesHistoricalResponseRateLimitsInner interval( + @jakarta.annotation.Nullable String interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + public String getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + } + + public BlockTradesHistoricalResponseRateLimitsInner intervalNum( + @jakarta.annotation.Nullable Integer intervalNum) { + this.intervalNum = intervalNum; + return this; + } + + /** + * Get intervalNum + * + * @return intervalNum + */ + @jakarta.annotation.Nullable + public Integer getIntervalNum() { + return intervalNum; + } + + public void setIntervalNum(@jakarta.annotation.Nullable Integer intervalNum) { + this.intervalNum = intervalNum; + } + + public BlockTradesHistoricalResponseRateLimitsInner limit( + @jakarta.annotation.Nullable Integer limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * + * @return limit + */ + @jakarta.annotation.Nullable + public Integer getLimit() { + return limit; + } + + public void setLimit(@jakarta.annotation.Nullable Integer limit) { + this.limit = limit; + } + + public BlockTradesHistoricalResponseRateLimitsInner count( + @jakarta.annotation.Nullable Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * + * @return count + */ + @jakarta.annotation.Nullable + public Integer getCount() { + return count; + } + + public void setCount(@jakarta.annotation.Nullable Integer count) { + this.count = count; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BlockTradesHistoricalResponseRateLimitsInner blockTradesHistoricalResponseRateLimitsInner = + (BlockTradesHistoricalResponseRateLimitsInner) o; + return Objects.equals( + this.rateLimitType, + blockTradesHistoricalResponseRateLimitsInner.rateLimitType) + && Objects.equals( + this.interval, blockTradesHistoricalResponseRateLimitsInner.interval) + && Objects.equals( + this.intervalNum, blockTradesHistoricalResponseRateLimitsInner.intervalNum) + && Objects.equals(this.limit, blockTradesHistoricalResponseRateLimitsInner.limit) + && Objects.equals(this.count, blockTradesHistoricalResponseRateLimitsInner.count); + } + + @Override + public int hashCode() { + return Objects.hash(rateLimitType, interval, intervalNum, limit, count); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BlockTradesHistoricalResponseRateLimitsInner {\n"); + sb.append(" rateLimitType: ").append(toIndentedString(rateLimitType)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" intervalNum: ").append(toIndentedString(intervalNum)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + String rateLimitTypeValueAsString = rateLimitTypeValue.toString(); + valMap.put("rateLimitType", rateLimitTypeValueAsString); + } + String intervalValue = getInterval(); + if (intervalValue != null) { + String intervalValueAsString = intervalValue.toString(); + valMap.put("interval", intervalValueAsString); + } + Integer intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + String intervalNumValueAsString = intervalNumValue.toString(); + valMap.put("intervalNum", intervalNumValueAsString); + } + Integer limitValue = getLimit(); + if (limitValue != null) { + String limitValueAsString = limitValue.toString(); + valMap.put("limit", limitValueAsString); + } + Integer countValue = getCount(); + if (countValue != null) { + String countValueAsString = countValue.toString(); + valMap.put("count", countValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + valMap.put("rateLimitType", rateLimitTypeValue); + } + Object intervalValue = getInterval(); + if (intervalValue != null) { + valMap.put("interval", intervalValue); + } + Object intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + valMap.put("intervalNum", intervalNumValue); + } + Object limitValue = getLimit(); + if (limitValue != null) { + valMap.put("limit", limitValue); + } + Object countValue = getCount(); + if (countValue != null) { + valMap.put("count", countValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("rateLimitType"); + openapiFields.add("interval"); + openapiFields.add("intervalNum"); + openapiFields.add("limit"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * BlockTradesHistoricalResponseRateLimitsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BlockTradesHistoricalResponseRateLimitsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " BlockTradesHistoricalResponseRateLimitsInner is not found" + + " in the empty JSON string", + BlockTradesHistoricalResponseRateLimitsInner.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BlockTradesHistoricalResponseRateLimitsInner.openapiFields.contains( + entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `BlockTradesHistoricalResponseRateLimitsInner` properties." + + " JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("rateLimitType") != null && !jsonObj.get("rateLimitType").isJsonNull()) + && !jsonObj.get("rateLimitType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimitType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimitType").toString())); + } + if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) + && !jsonObj.get("interval").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `interval` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("interval").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BlockTradesHistoricalResponseRateLimitsInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'BlockTradesHistoricalResponseRateLimitsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get(BlockTradesHistoricalResponseRateLimitsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, BlockTradesHistoricalResponseRateLimitsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BlockTradesHistoricalResponseRateLimitsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of BlockTradesHistoricalResponseRateLimitsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of BlockTradesHistoricalResponseRateLimitsInner + * @throws IOException if the JSON string is invalid with respect to + * BlockTradesHistoricalResponseRateLimitsInner + */ + public static BlockTradesHistoricalResponseRateLimitsInner fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, BlockTradesHistoricalResponseRateLimitsInner.class); + } + + /** + * Convert an instance of BlockTradesHistoricalResponseRateLimitsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BlockTradesHistoricalResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BlockTradesHistoricalResponseResultInner.java new file mode 100644 index 000000000..1a00d2506 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BlockTradesHistoricalResponseResultInner.java @@ -0,0 +1,457 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** BlockTradesHistoricalResponseResultInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class BlockTradesHistoricalResponseResultInner extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private Long id; + + public static final String SERIALIZED_NAME_PRICE = "price"; + + @SerializedName(SERIALIZED_NAME_PRICE) + @jakarta.annotation.Nullable + private String price; + + public static final String SERIALIZED_NAME_QTY = "qty"; + + @SerializedName(SERIALIZED_NAME_QTY) + @jakarta.annotation.Nullable + private String qty; + + public static final String SERIALIZED_NAME_QUOTE_QTY = "quoteQty"; + + @SerializedName(SERIALIZED_NAME_QUOTE_QTY) + @jakarta.annotation.Nullable + private String quoteQty; + + public static final String SERIALIZED_NAME_TIME = "time"; + + @SerializedName(SERIALIZED_NAME_TIME) + @jakarta.annotation.Nullable + private Long time; + + public static final String SERIALIZED_NAME_IS_BUYER_MAKER = "isBuyerMaker"; + + @SerializedName(SERIALIZED_NAME_IS_BUYER_MAKER) + @jakarta.annotation.Nullable + private Boolean isBuyerMaker; + + public BlockTradesHistoricalResponseResultInner() {} + + public BlockTradesHistoricalResponseResultInner id(@jakarta.annotation.Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @jakarta.annotation.Nullable + public Long getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable Long id) { + this.id = id; + } + + public BlockTradesHistoricalResponseResultInner price( + @jakarta.annotation.Nullable String price) { + this.price = price; + return this; + } + + /** + * Get price + * + * @return price + */ + @jakarta.annotation.Nullable + public String getPrice() { + return price; + } + + public void setPrice(@jakarta.annotation.Nullable String price) { + this.price = price; + } + + public BlockTradesHistoricalResponseResultInner qty(@jakarta.annotation.Nullable String qty) { + this.qty = qty; + return this; + } + + /** + * Get qty + * + * @return qty + */ + @jakarta.annotation.Nullable + public String getQty() { + return qty; + } + + public void setQty(@jakarta.annotation.Nullable String qty) { + this.qty = qty; + } + + public BlockTradesHistoricalResponseResultInner quoteQty( + @jakarta.annotation.Nullable String quoteQty) { + this.quoteQty = quoteQty; + return this; + } + + /** + * Get quoteQty + * + * @return quoteQty + */ + @jakarta.annotation.Nullable + public String getQuoteQty() { + return quoteQty; + } + + public void setQuoteQty(@jakarta.annotation.Nullable String quoteQty) { + this.quoteQty = quoteQty; + } + + public BlockTradesHistoricalResponseResultInner time(@jakarta.annotation.Nullable Long time) { + this.time = time; + return this; + } + + /** + * Get time + * + * @return time + */ + @jakarta.annotation.Nullable + public Long getTime() { + return time; + } + + public void setTime(@jakarta.annotation.Nullable Long time) { + this.time = time; + } + + public BlockTradesHistoricalResponseResultInner isBuyerMaker( + @jakarta.annotation.Nullable Boolean isBuyerMaker) { + this.isBuyerMaker = isBuyerMaker; + return this; + } + + /** + * Get isBuyerMaker + * + * @return isBuyerMaker + */ + @jakarta.annotation.Nullable + public Boolean getIsBuyerMaker() { + return isBuyerMaker; + } + + public void setIsBuyerMaker(@jakarta.annotation.Nullable Boolean isBuyerMaker) { + this.isBuyerMaker = isBuyerMaker; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BlockTradesHistoricalResponseResultInner blockTradesHistoricalResponseResultInner = + (BlockTradesHistoricalResponseResultInner) o; + return Objects.equals(this.id, blockTradesHistoricalResponseResultInner.id) + && Objects.equals(this.price, blockTradesHistoricalResponseResultInner.price) + && Objects.equals(this.qty, blockTradesHistoricalResponseResultInner.qty) + && Objects.equals(this.quoteQty, blockTradesHistoricalResponseResultInner.quoteQty) + && Objects.equals(this.time, blockTradesHistoricalResponseResultInner.time) + && Objects.equals( + this.isBuyerMaker, blockTradesHistoricalResponseResultInner.isBuyerMaker); + } + + @Override + public int hashCode() { + return Objects.hash(id, price, qty, quoteQty, time, isBuyerMaker); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BlockTradesHistoricalResponseResultInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" price: ").append(toIndentedString(price)).append("\n"); + sb.append(" qty: ").append(toIndentedString(qty)).append("\n"); + sb.append(" quoteQty: ").append(toIndentedString(quoteQty)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append(" isBuyerMaker: ").append(toIndentedString(isBuyerMaker)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + String priceValue = getPrice(); + if (priceValue != null) { + String priceValueAsString = priceValue.toString(); + valMap.put("price", priceValueAsString); + } + String qtyValue = getQty(); + if (qtyValue != null) { + String qtyValueAsString = qtyValue.toString(); + valMap.put("qty", qtyValueAsString); + } + String quoteQtyValue = getQuoteQty(); + if (quoteQtyValue != null) { + String quoteQtyValueAsString = quoteQtyValue.toString(); + valMap.put("quoteQty", quoteQtyValueAsString); + } + Long timeValue = getTime(); + if (timeValue != null) { + String timeValueAsString = timeValue.toString(); + valMap.put("time", timeValueAsString); + } + Boolean isBuyerMakerValue = getIsBuyerMaker(); + if (isBuyerMakerValue != null) { + String isBuyerMakerValueAsString = isBuyerMakerValue.toString(); + valMap.put("isBuyerMaker", isBuyerMakerValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object priceValue = getPrice(); + if (priceValue != null) { + valMap.put("price", priceValue); + } + Object qtyValue = getQty(); + if (qtyValue != null) { + valMap.put("qty", qtyValue); + } + Object quoteQtyValue = getQuoteQty(); + if (quoteQtyValue != null) { + valMap.put("quoteQty", quoteQtyValue); + } + Object timeValue = getTime(); + if (timeValue != null) { + valMap.put("time", timeValue); + } + Object isBuyerMakerValue = getIsBuyerMaker(); + if (isBuyerMakerValue != null) { + valMap.put("isBuyerMaker", isBuyerMakerValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("price"); + openapiFields.add("qty"); + openapiFields.add("quoteQty"); + openapiFields.add("time"); + openapiFields.add("isBuyerMaker"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * BlockTradesHistoricalResponseResultInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BlockTradesHistoricalResponseResultInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " BlockTradesHistoricalResponseResultInner is not found in" + + " the empty JSON string", + BlockTradesHistoricalResponseResultInner.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BlockTradesHistoricalResponseResultInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `BlockTradesHistoricalResponseResultInner` properties." + + " JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) + && !jsonObj.get("price").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `price` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("price").toString())); + } + if ((jsonObj.get("qty") != null && !jsonObj.get("qty").isJsonNull()) + && !jsonObj.get("qty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `qty` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("qty").toString())); + } + if ((jsonObj.get("quoteQty") != null && !jsonObj.get("quoteQty").isJsonNull()) + && !jsonObj.get("quoteQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `quoteQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("quoteQty").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BlockTradesHistoricalResponseResultInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'BlockTradesHistoricalResponseResultInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(BlockTradesHistoricalResponseResultInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, BlockTradesHistoricalResponseResultInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BlockTradesHistoricalResponseResultInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of BlockTradesHistoricalResponseResultInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of BlockTradesHistoricalResponseResultInner + * @throws IOException if the JSON string is invalid with respect to + * BlockTradesHistoricalResponseResultInner + */ + public static BlockTradesHistoricalResponseResultInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, BlockTradesHistoricalResponseResultInner.class); + } + + /** + * Convert an instance of BlockTradesHistoricalResponseResultInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/CancelReplaceMode.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/CancelReplaceMode.java index 56881e7f2..e82f6633b 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/CancelReplaceMode.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/CancelReplaceMode.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,11 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets cancelReplaceMode */ +/** + * The allowed values are: <br/> `STOP_ON_FAILURE` - If the cancel request fails, + * the new order placement will not be attempted. <br/> `ALLOW_FAILURE` - new order + * placement will be attempted even if cancel request fails. + */ @JsonAdapter(CancelReplaceMode.Adapter.class) public enum CancelReplaceMode { STOP_ON_FAILURE("STOP_ON_FAILURE"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/CancelRestrictions.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/CancelRestrictions.java index 5c8a65d93..ce9dd2421 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/CancelRestrictions.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/CancelRestrictions.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,16 +21,16 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets cancelRestrictions */ +/** + * Supported values: <br>`ONLY_NEW` - Cancel will succeed if the order status is + * `NEW`.<br> `ONLY_PARTIALLY_FILLED` - Cancel will succeed if order + * status is `PARTIALLY_FILLED`. + */ @JsonAdapter(CancelRestrictions.Adapter.class) public enum CancelRestrictions { ONLY_NEW("ONLY_NEW"), - NEW("NEW"), - - ONLY_PARTIALLY_FILLED("ONLY_PARTIALLY_FILLED"), - - PARTIALLY_FILLED("PARTIALLY_FILLED"); + ONLY_PARTIALLY_FILLED("ONLY_PARTIALLY_FILLED"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/DepthRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/DepthRequest.java index e50d57f3b..d547db49b 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/DepthRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/DepthRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,8 +38,14 @@ /** DepthRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DepthRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -60,6 +66,25 @@ public class DepthRequest extends BaseDTO { public DepthRequest() {} + public DepthRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public DepthRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -86,11 +111,12 @@ public DepthRequest limit(@jakarta.annotation.Nullable Integer limit) { } /** - * Get limit + * Get limit maximum: 5000 * * @return limit */ @jakarta.annotation.Nullable + @Max(5000) public Integer getLimit() { return limit; } @@ -128,20 +154,22 @@ public boolean equals(Object o) { return false; } DepthRequest depthRequest = (DepthRequest) o; - return Objects.equals(this.symbol, depthRequest.symbol) + return Objects.equals(this.id, depthRequest.id) + && Objects.equals(this.symbol, depthRequest.symbol) && Objects.equals(this.limit, depthRequest.limit) && Objects.equals(this.symbolStatus, depthRequest.symbolStatus); } @Override public int hashCode() { - return Objects.hash(symbol, limit, symbolStatus); + return Objects.hash(id, symbol, limit, symbolStatus); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DepthRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); sb.append(" symbolStatus: ").append(toIndentedString(symbolStatus)).append("\n"); @@ -153,6 +181,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -179,6 +212,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -217,6 +254,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("limit"); openapiFields.add("symbolStatus"); @@ -266,6 +304,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/DepthResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/DepthResponse.java index 2dfe7f401..a3464bba1 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/DepthResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/DepthResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** DepthResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DepthResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class DepthResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public DepthResponse() {} @@ -128,12 +128,14 @@ public void setResult(@jakarta.annotation.Nullable DepthResponseResult result) { } public DepthResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public DepthResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public DepthResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -148,11 +150,13 @@ public DepthResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -207,7 +211,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -330,7 +334,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/DepthResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/DepthResponseResult.java index d941c1c38..2b71b064a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/DepthResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/DepthResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** DepthResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DepthResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_LAST_UPDATE_ID = "lastUpdateId"; @@ -95,7 +95,7 @@ public DepthResponseResult addBidsItem(List bidsItem) { } /** - * Get bids + * Bid orders. Each entry is [price, quantity]. * * @return bids */ @@ -123,7 +123,7 @@ public DepthResponseResult addAsksItem(List asksItem) { } /** - * Get asks + * Ask orders. Each entry is [price, quantity]. * * @return asks */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/EventStreamTerminated.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/EventStreamTerminated.java index d21507459..ad4125fdd 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/EventStreamTerminated.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/EventStreamTerminated.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** EventStreamTerminated */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class EventStreamTerminated extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -53,7 +53,7 @@ public EventStreamTerminated E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeFilters.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeFilters.java index 698b67f72..1034d8d83 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeFilters.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeFilters.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -33,7 +33,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeFilters extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(ExchangeFilters.class.getName()); @@ -163,30 +163,6 @@ public ExchangeFilters read(JsonReader in) throws IOException { jsonObject); newExchangeFilters.setActualInstance(deserialized); return newExchangeFilters; - case "ExchangeMaxNumAlgoOrdersFilter": - deserialized = - adapterExchangeMaxNumAlgoOrdersFilter.fromJsonTree( - jsonObject); - newExchangeFilters.setActualInstance(deserialized); - return newExchangeFilters; - case "ExchangeMaxNumIcebergOrdersFilter": - deserialized = - adapterExchangeMaxNumIcebergOrdersFilter - .fromJsonTree(jsonObject); - newExchangeFilters.setActualInstance(deserialized); - return newExchangeFilters; - case "ExchangeMaxNumOrderListsFilter": - deserialized = - adapterExchangeMaxNumOrderListsFilter.fromJsonTree( - jsonObject); - newExchangeFilters.setActualInstance(deserialized); - return newExchangeFilters; - case "ExchangeMaxNumOrdersFilter": - deserialized = - adapterExchangeMaxNumOrdersFilter.fromJsonTree( - jsonObject); - newExchangeFilters.setActualInstance(deserialized); - return newExchangeFilters; default: newExchangeFilters.setActualInstance( jsonElement.toString()); @@ -194,17 +170,13 @@ public ExchangeFilters read(JsonReader in) throws IOException { Level.WARNING, String.format( "Failed to lookup discriminator value `%s`" - + " for ExchangeFilters. Possible" - + " values:" - + " EXCHANGE_MAX_NUM_ALGO_ORDERS" - + " EXCHANGE_MAX_NUM_ICEBERG_ORDERS" - + " EXCHANGE_MAX_NUM_ORDERS" - + " EXCHANGE_MAX_NUM_ORDER_LISTS" - + " ExchangeMaxNumAlgoOrdersFilter" - + " ExchangeMaxNumIcebergOrdersFilter" - + " ExchangeMaxNumOrderListsFilter" - + " ExchangeMaxNumOrdersFilter. Falling" - + " back to String.", + + " for ExchangeFilters. Possible" + + " values:" + + " EXCHANGE_MAX_NUM_ALGO_ORDERS" + + " EXCHANGE_MAX_NUM_ICEBERG_ORDERS" + + " EXCHANGE_MAX_NUM_ORDERS" + + " EXCHANGE_MAX_NUM_ORDER_LISTS." + + " Falling back to String.", jsonObject .get("filterType") .getAsString())); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoRequest.java index ef06946b4..bb741028d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,8 +38,14 @@ /** ExchangeInfoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInfoRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -72,13 +78,32 @@ public class ExchangeInfoRequest extends BaseDTO { public ExchangeInfoRequest() {} + public ExchangeInfoRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public ExchangeInfoRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Describe a single symbol * * @return symbol */ @@ -138,7 +163,8 @@ public ExchangeInfoRequest showPermissionSets( } /** - * Get showPermissionSets + * Controls whether the content of the `permissionSets` field is populated or not. + * Defaults to `true`. * * @return showPermissionSets */ @@ -181,7 +207,8 @@ public boolean equals(Object o) { return false; } ExchangeInfoRequest exchangeInfoRequest = (ExchangeInfoRequest) o; - return Objects.equals(this.symbol, exchangeInfoRequest.symbol) + return Objects.equals(this.id, exchangeInfoRequest.id) + && Objects.equals(this.symbol, exchangeInfoRequest.symbol) && Objects.equals(this.symbols, exchangeInfoRequest.symbols) && Objects.equals(this.permissions, exchangeInfoRequest.permissions) && Objects.equals(this.showPermissionSets, exchangeInfoRequest.showPermissionSets) @@ -190,13 +217,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(symbol, symbols, permissions, showPermissionSets, symbolStatus); + return Objects.hash(id, symbol, symbols, permissions, showPermissionSets, symbolStatus); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ExchangeInfoRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" symbols: ").append(toIndentedString(symbols)).append("\n"); sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); @@ -212,6 +240,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -248,6 +281,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -294,6 +331,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("symbols"); openapiFields.add("permissions"); @@ -334,6 +372,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponse.java index 6505103a8..93b7979e4 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,25 +41,19 @@ /** ExchangeInfoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeInfoResponse extends BaseDTO { - public static final String SERIALIZED_NAME_ID = "id"; + public static final String SERIALIZED_NAME_TIMEZONE = "timezone"; - @SerializedName(SERIALIZED_NAME_ID) + @SerializedName(SERIALIZED_NAME_TIMEZONE) @jakarta.annotation.Nullable - private String id; + private String timezone; - public static final String SERIALIZED_NAME_STATUS = "status"; + public static final String SERIALIZED_NAME_SERVER_TIME = "serverTime"; - @SerializedName(SERIALIZED_NAME_STATUS) + @SerializedName(SERIALIZED_NAME_SERVER_TIME) @jakarta.annotation.Nullable - private Long status; - - public static final String SERIALIZED_NAME_RESULT = "result"; - - @SerializedName(SERIALIZED_NAME_RESULT) - @jakarta.annotation.Nullable - private ExchangeInfoResponseResult result; + private Long serverTime; public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; @@ -67,65 +61,62 @@ public class ExchangeInfoResponse extends BaseDTO { @jakarta.annotation.Nullable private List<@Valid RateLimits> rateLimits; - public ExchangeInfoResponse() {} + public static final String SERIALIZED_NAME_EXCHANGE_FILTERS = "exchangeFilters"; - public ExchangeInfoResponse id(@jakarta.annotation.Nullable String id) { - this.id = id; - return this; - } + @SerializedName(SERIALIZED_NAME_EXCHANGE_FILTERS) + @jakarta.annotation.Nullable + private List exchangeFilters; - /** - * Get id - * - * @return id - */ + public static final String SERIALIZED_NAME_SYMBOLS = "symbols"; + + @SerializedName(SERIALIZED_NAME_SYMBOLS) @jakarta.annotation.Nullable - public String getId() { - return id; - } + private List<@Valid ExchangeInfoResponseSymbolsInner> symbols; - public void setId(@jakarta.annotation.Nullable String id) { - this.id = id; - } + public static final String SERIALIZED_NAME_SORS = "sors"; - public ExchangeInfoResponse status(@jakarta.annotation.Nullable Long status) { - this.status = status; + @SerializedName(SERIALIZED_NAME_SORS) + @jakarta.annotation.Nullable + private List<@Valid ExchangeInfoResponseSorsInner> sors; + + public ExchangeInfoResponse() {} + + public ExchangeInfoResponse timezone(@jakarta.annotation.Nullable String timezone) { + this.timezone = timezone; return this; } /** - * Get status + * Get timezone * - * @return status + * @return timezone */ @jakarta.annotation.Nullable - public Long getStatus() { - return status; + public String getTimezone() { + return timezone; } - public void setStatus(@jakarta.annotation.Nullable Long status) { - this.status = status; + public void setTimezone(@jakarta.annotation.Nullable String timezone) { + this.timezone = timezone; } - public ExchangeInfoResponse result( - @jakarta.annotation.Nullable ExchangeInfoResponseResult result) { - this.result = result; + public ExchangeInfoResponse serverTime(@jakarta.annotation.Nullable Long serverTime) { + this.serverTime = serverTime; return this; } /** - * Get result + * Get serverTime * - * @return result + * @return serverTime */ @jakarta.annotation.Nullable - @Valid - public ExchangeInfoResponseResult getResult() { - return result; + public Long getServerTime() { + return serverTime; } - public void setResult(@jakarta.annotation.Nullable ExchangeInfoResponseResult result) { - this.result = result; + public void setServerTime(@jakarta.annotation.Nullable Long serverTime) { + this.serverTime = serverTime; } public ExchangeInfoResponse rateLimits( @@ -157,6 +148,96 @@ public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> r this.rateLimits = rateLimits; } + public ExchangeInfoResponse exchangeFilters( + @jakarta.annotation.Nullable List exchangeFilters) { + this.exchangeFilters = exchangeFilters; + return this; + } + + public ExchangeInfoResponse addExchangeFiltersItem(ExchangeFilters exchangeFiltersItem) { + if (this.exchangeFilters == null) { + this.exchangeFilters = new ArrayList<>(); + } + this.exchangeFilters.add(exchangeFiltersItem); + return this; + } + + /** + * Get exchangeFilters + * + * @return exchangeFilters + */ + @jakarta.annotation.Nullable + @Valid + public List getExchangeFilters() { + return exchangeFilters; + } + + public void setExchangeFilters( + @jakarta.annotation.Nullable List exchangeFilters) { + this.exchangeFilters = exchangeFilters; + } + + public ExchangeInfoResponse symbols( + @jakarta.annotation.Nullable List<@Valid ExchangeInfoResponseSymbolsInner> symbols) { + this.symbols = symbols; + return this; + } + + public ExchangeInfoResponse addSymbolsItem(ExchangeInfoResponseSymbolsInner symbolsItem) { + if (this.symbols == null) { + this.symbols = new ArrayList<>(); + } + this.symbols.add(symbolsItem); + return this; + } + + /** + * Get symbols + * + * @return symbols + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid ExchangeInfoResponseSymbolsInner> getSymbols() { + return symbols; + } + + public void setSymbols( + @jakarta.annotation.Nullable List<@Valid ExchangeInfoResponseSymbolsInner> symbols) { + this.symbols = symbols; + } + + public ExchangeInfoResponse sors( + @jakarta.annotation.Nullable List<@Valid ExchangeInfoResponseSorsInner> sors) { + this.sors = sors; + return this; + } + + public ExchangeInfoResponse addSorsItem(ExchangeInfoResponseSorsInner sorsItem) { + if (this.sors == null) { + this.sors = new ArrayList<>(); + } + this.sors.add(sorsItem); + return this; + } + + /** + * Get sors + * + * @return sors + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid ExchangeInfoResponseSorsInner> getSors() { + return sors; + } + + public void setSors( + @jakarta.annotation.Nullable List<@Valid ExchangeInfoResponseSorsInner> sors) { + this.sors = sors; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -166,25 +247,29 @@ public boolean equals(Object o) { return false; } ExchangeInfoResponse exchangeInfoResponse = (ExchangeInfoResponse) o; - return Objects.equals(this.id, exchangeInfoResponse.id) - && Objects.equals(this.status, exchangeInfoResponse.status) - && Objects.equals(this.result, exchangeInfoResponse.result) - && Objects.equals(this.rateLimits, exchangeInfoResponse.rateLimits); + return Objects.equals(this.timezone, exchangeInfoResponse.timezone) + && Objects.equals(this.serverTime, exchangeInfoResponse.serverTime) + && Objects.equals(this.rateLimits, exchangeInfoResponse.rateLimits) + && Objects.equals(this.exchangeFilters, exchangeInfoResponse.exchangeFilters) + && Objects.equals(this.symbols, exchangeInfoResponse.symbols) + && Objects.equals(this.sors, exchangeInfoResponse.sors); } @Override public int hashCode() { - return Objects.hash(id, status, result, rateLimits); + return Objects.hash(timezone, serverTime, rateLimits, exchangeFilters, symbols, sors); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ExchangeInfoResponse {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); + sb.append(" serverTime: ").append(toIndentedString(serverTime)).append("\n"); sb.append(" rateLimits: ").append(toIndentedString(rateLimits)).append("\n"); + sb.append(" exchangeFilters: ").append(toIndentedString(exchangeFilters)).append("\n"); + sb.append(" symbols: ").append(toIndentedString(symbols)).append("\n"); + sb.append(" sors: ").append(toIndentedString(sors)).append("\n"); sb.append("}"); return sb.toString(); } @@ -193,26 +278,36 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - String idValue = getId(); - if (idValue != null) { - String idValueAsString = idValue.toString(); - valMap.put("id", idValueAsString); + String timezoneValue = getTimezone(); + if (timezoneValue != null) { + String timezoneValueAsString = timezoneValue.toString(); + valMap.put("timezone", timezoneValueAsString); } - Long statusValue = getStatus(); - if (statusValue != null) { - String statusValueAsString = statusValue.toString(); - valMap.put("status", statusValueAsString); - } - ExchangeInfoResponseResult resultValue = getResult(); - if (resultValue != null) { - String resultValueAsString = JSON.getGson().toJson(resultValue); - valMap.put("result", resultValueAsString); + Long serverTimeValue = getServerTime(); + if (serverTimeValue != null) { + String serverTimeValueAsString = serverTimeValue.toString(); + valMap.put("serverTime", serverTimeValueAsString); } List<@Valid RateLimits> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); } + List exchangeFiltersValue = getExchangeFilters(); + if (exchangeFiltersValue != null) { + String exchangeFiltersValueAsString = JSON.getGson().toJson(exchangeFiltersValue); + valMap.put("exchangeFilters", exchangeFiltersValueAsString); + } + List<@Valid ExchangeInfoResponseSymbolsInner> symbolsValue = getSymbols(); + if (symbolsValue != null) { + String symbolsValueAsString = JSON.getGson().toJson(symbolsValue); + valMap.put("symbols", symbolsValueAsString); + } + List<@Valid ExchangeInfoResponseSorsInner> sorsValue = getSors(); + if (sorsValue != null) { + String sorsValueAsString = JSON.getGson().toJson(sorsValue); + valMap.put("sors", sorsValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -224,22 +319,30 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - Object idValue = getId(); - if (idValue != null) { - valMap.put("id", idValue); - } - Object statusValue = getStatus(); - if (statusValue != null) { - valMap.put("status", statusValue); + Object timezoneValue = getTimezone(); + if (timezoneValue != null) { + valMap.put("timezone", timezoneValue); } - Object resultValue = getResult(); - if (resultValue != null) { - valMap.put("result", resultValue); + Object serverTimeValue = getServerTime(); + if (serverTimeValue != null) { + valMap.put("serverTime", serverTimeValue); } Object rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { valMap.put("rateLimits", rateLimitsValue); } + Object exchangeFiltersValue = getExchangeFilters(); + if (exchangeFiltersValue != null) { + valMap.put("exchangeFilters", exchangeFiltersValue); + } + Object symbolsValue = getSymbols(); + if (symbolsValue != null) { + valMap.put("symbols", symbolsValue); + } + Object sorsValue = getSors(); + if (sorsValue != null) { + valMap.put("sors", sorsValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -266,10 +369,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("status"); - openapiFields.add("result"); + openapiFields.add("timezone"); + openapiFields.add("serverTime"); openapiFields.add("rateLimits"); + openapiFields.add("exchangeFilters"); + openapiFields.add("symbols"); + openapiFields.add("sors"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -305,17 +410,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) - && !jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("timezone") != null && !jsonObj.get("timezone").isJsonNull()) + && !jsonObj.get("timezone").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - // validate the optional field `result` - if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { - ExchangeInfoResponseResult.validateJsonElement(jsonObj.get("result")); + "Expected the field `timezone` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("timezone").toString())); } if (jsonObj.get("rateLimits") != null && !jsonObj.get("rateLimits").isJsonNull()) { JsonArray jsonArrayrateLimits = jsonObj.getAsJsonArray("rateLimits"); @@ -336,6 +437,64 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti ; } } + if (jsonObj.get("exchangeFilters") != null + && !jsonObj.get("exchangeFilters").isJsonNull()) { + JsonArray jsonArrayexchangeFilters = jsonObj.getAsJsonArray("exchangeFilters"); + if (jsonArrayexchangeFilters != null) { + // ensure the json data is an array + if (!jsonObj.get("exchangeFilters").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `exchangeFilters` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("exchangeFilters").toString())); + } + + // validate the optional field `exchangeFilters` (array) + for (int i = 0; i < jsonArrayexchangeFilters.size(); i++) { + ExchangeFilters.validateJsonElement(jsonArrayexchangeFilters.get(i)); + } + ; + } + } + if (jsonObj.get("symbols") != null && !jsonObj.get("symbols").isJsonNull()) { + JsonArray jsonArraysymbols = jsonObj.getAsJsonArray("symbols"); + if (jsonArraysymbols != null) { + // ensure the json data is an array + if (!jsonObj.get("symbols").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbols` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("symbols").toString())); + } + + // validate the optional field `symbols` (array) + for (int i = 0; i < jsonArraysymbols.size(); i++) { + ExchangeInfoResponseSymbolsInner.validateJsonElement(jsonArraysymbols.get(i)); + } + ; + } + } + if (jsonObj.get("sors") != null && !jsonObj.get("sors").isJsonNull()) { + JsonArray jsonArraysors = jsonObj.getAsJsonArray("sors"); + if (jsonArraysors != null) { + // ensure the json data is an array + if (!jsonObj.get("sors").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `sors` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("sors").toString())); + } + + // validate the optional field `sors` (array) + for (int i = 0; i < jsonArraysors.size(); i++) { + ExchangeInfoResponseSorsInner.validateJsonElement(jsonArraysors.get(i)); + } + ; + } + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseResult.java deleted file mode 100644 index 1ed13b18c..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseResult.java +++ /dev/null @@ -1,554 +0,0 @@ -/* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.api.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.api.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** ExchangeInfoResponseResult */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ExchangeInfoResponseResult extends BaseDTO { - public static final String SERIALIZED_NAME_TIMEZONE = "timezone"; - - @SerializedName(SERIALIZED_NAME_TIMEZONE) - @jakarta.annotation.Nullable - private String timezone; - - public static final String SERIALIZED_NAME_SERVER_TIME = "serverTime"; - - @SerializedName(SERIALIZED_NAME_SERVER_TIME) - @jakarta.annotation.Nullable - private Long serverTime; - - public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; - - @SerializedName(SERIALIZED_NAME_RATE_LIMITS) - @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; - - public static final String SERIALIZED_NAME_EXCHANGE_FILTERS = "exchangeFilters"; - - @SerializedName(SERIALIZED_NAME_EXCHANGE_FILTERS) - @jakarta.annotation.Nullable - private List exchangeFilters; - - public static final String SERIALIZED_NAME_SYMBOLS = "symbols"; - - @SerializedName(SERIALIZED_NAME_SYMBOLS) - @jakarta.annotation.Nullable - private List<@Valid ExchangeInfoResponseResultSymbolsInner> symbols; - - public static final String SERIALIZED_NAME_SORS = "sors"; - - @SerializedName(SERIALIZED_NAME_SORS) - @jakarta.annotation.Nullable - private List<@Valid ExchangeInfoResponseResultSorsInner> sors; - - public ExchangeInfoResponseResult() {} - - public ExchangeInfoResponseResult timezone(@jakarta.annotation.Nullable String timezone) { - this.timezone = timezone; - return this; - } - - /** - * Get timezone - * - * @return timezone - */ - @jakarta.annotation.Nullable - public String getTimezone() { - return timezone; - } - - public void setTimezone(@jakarta.annotation.Nullable String timezone) { - this.timezone = timezone; - } - - public ExchangeInfoResponseResult serverTime(@jakarta.annotation.Nullable Long serverTime) { - this.serverTime = serverTime; - return this; - } - - /** - * Get serverTime - * - * @return serverTime - */ - @jakarta.annotation.Nullable - public Long getServerTime() { - return serverTime; - } - - public void setServerTime(@jakarta.annotation.Nullable Long serverTime) { - this.serverTime = serverTime; - } - - public ExchangeInfoResponseResult rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { - this.rateLimits = rateLimits; - return this; - } - - public ExchangeInfoResponseResult addRateLimitsItem(RateLimits rateLimitsItem) { - if (this.rateLimits == null) { - this.rateLimits = new ArrayList<>(); - } - this.rateLimits.add(rateLimitsItem); - return this; - } - - /** - * Get rateLimits - * - * @return rateLimits - */ - @jakarta.annotation.Nullable - @Valid - public List<@Valid RateLimits> getRateLimits() { - return rateLimits; - } - - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { - this.rateLimits = rateLimits; - } - - public ExchangeInfoResponseResult exchangeFilters( - @jakarta.annotation.Nullable List exchangeFilters) { - this.exchangeFilters = exchangeFilters; - return this; - } - - public ExchangeInfoResponseResult addExchangeFiltersItem(ExchangeFilters exchangeFiltersItem) { - if (this.exchangeFilters == null) { - this.exchangeFilters = new ArrayList<>(); - } - this.exchangeFilters.add(exchangeFiltersItem); - return this; - } - - /** - * Get exchangeFilters - * - * @return exchangeFilters - */ - @jakarta.annotation.Nullable - @Valid - public List getExchangeFilters() { - return exchangeFilters; - } - - public void setExchangeFilters( - @jakarta.annotation.Nullable List exchangeFilters) { - this.exchangeFilters = exchangeFilters; - } - - public ExchangeInfoResponseResult symbols( - @jakarta.annotation.Nullable - List<@Valid ExchangeInfoResponseResultSymbolsInner> symbols) { - this.symbols = symbols; - return this; - } - - public ExchangeInfoResponseResult addSymbolsItem( - ExchangeInfoResponseResultSymbolsInner symbolsItem) { - if (this.symbols == null) { - this.symbols = new ArrayList<>(); - } - this.symbols.add(symbolsItem); - return this; - } - - /** - * Get symbols - * - * @return symbols - */ - @jakarta.annotation.Nullable - @Valid - public List<@Valid ExchangeInfoResponseResultSymbolsInner> getSymbols() { - return symbols; - } - - public void setSymbols( - @jakarta.annotation.Nullable - List<@Valid ExchangeInfoResponseResultSymbolsInner> symbols) { - this.symbols = symbols; - } - - public ExchangeInfoResponseResult sors( - @jakarta.annotation.Nullable List<@Valid ExchangeInfoResponseResultSorsInner> sors) { - this.sors = sors; - return this; - } - - public ExchangeInfoResponseResult addSorsItem(ExchangeInfoResponseResultSorsInner sorsItem) { - if (this.sors == null) { - this.sors = new ArrayList<>(); - } - this.sors.add(sorsItem); - return this; - } - - /** - * Get sors - * - * @return sors - */ - @jakarta.annotation.Nullable - @Valid - public List<@Valid ExchangeInfoResponseResultSorsInner> getSors() { - return sors; - } - - public void setSors( - @jakarta.annotation.Nullable List<@Valid ExchangeInfoResponseResultSorsInner> sors) { - this.sors = sors; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExchangeInfoResponseResult exchangeInfoResponseResult = (ExchangeInfoResponseResult) o; - return Objects.equals(this.timezone, exchangeInfoResponseResult.timezone) - && Objects.equals(this.serverTime, exchangeInfoResponseResult.serverTime) - && Objects.equals(this.rateLimits, exchangeInfoResponseResult.rateLimits) - && Objects.equals(this.exchangeFilters, exchangeInfoResponseResult.exchangeFilters) - && Objects.equals(this.symbols, exchangeInfoResponseResult.symbols) - && Objects.equals(this.sors, exchangeInfoResponseResult.sors); - } - - @Override - public int hashCode() { - return Objects.hash(timezone, serverTime, rateLimits, exchangeFilters, symbols, sors); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExchangeInfoResponseResult {\n"); - sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); - sb.append(" serverTime: ").append(toIndentedString(serverTime)).append("\n"); - sb.append(" rateLimits: ").append(toIndentedString(rateLimits)).append("\n"); - sb.append(" exchangeFilters: ").append(toIndentedString(exchangeFilters)).append("\n"); - sb.append(" symbols: ").append(toIndentedString(symbols)).append("\n"); - sb.append(" sors: ").append(toIndentedString(sors)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String timezoneValue = getTimezone(); - if (timezoneValue != null) { - String timezoneValueAsString = timezoneValue.toString(); - valMap.put("timezone", timezoneValueAsString); - } - Long serverTimeValue = getServerTime(); - if (serverTimeValue != null) { - String serverTimeValueAsString = serverTimeValue.toString(); - valMap.put("serverTime", serverTimeValueAsString); - } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); - if (rateLimitsValue != null) { - String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); - valMap.put("rateLimits", rateLimitsValueAsString); - } - List exchangeFiltersValue = getExchangeFilters(); - if (exchangeFiltersValue != null) { - String exchangeFiltersValueAsString = JSON.getGson().toJson(exchangeFiltersValue); - valMap.put("exchangeFilters", exchangeFiltersValueAsString); - } - List<@Valid ExchangeInfoResponseResultSymbolsInner> symbolsValue = getSymbols(); - if (symbolsValue != null) { - String symbolsValueAsString = JSON.getGson().toJson(symbolsValue); - valMap.put("symbols", symbolsValueAsString); - } - List<@Valid ExchangeInfoResponseResultSorsInner> sorsValue = getSors(); - if (sorsValue != null) { - String sorsValueAsString = JSON.getGson().toJson(sorsValue); - valMap.put("sors", sorsValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object timezoneValue = getTimezone(); - if (timezoneValue != null) { - valMap.put("timezone", timezoneValue); - } - Object serverTimeValue = getServerTime(); - if (serverTimeValue != null) { - valMap.put("serverTime", serverTimeValue); - } - Object rateLimitsValue = getRateLimits(); - if (rateLimitsValue != null) { - valMap.put("rateLimits", rateLimitsValue); - } - Object exchangeFiltersValue = getExchangeFilters(); - if (exchangeFiltersValue != null) { - valMap.put("exchangeFilters", exchangeFiltersValue); - } - Object symbolsValue = getSymbols(); - if (symbolsValue != null) { - valMap.put("symbols", symbolsValue); - } - Object sorsValue = getSors(); - if (sorsValue != null) { - valMap.put("sors", sorsValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("timezone"); - openapiFields.add("serverTime"); - openapiFields.add("rateLimits"); - openapiFields.add("exchangeFilters"); - openapiFields.add("symbols"); - openapiFields.add("sors"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExchangeInfoResponseResult - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExchangeInfoResponseResult.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ExchangeInfoResponseResult is not" - + " found in the empty JSON string", - ExchangeInfoResponseResult.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExchangeInfoResponseResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ExchangeInfoResponseResult` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("timezone") != null && !jsonObj.get("timezone").isJsonNull()) - && !jsonObj.get("timezone").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `timezone` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("timezone").toString())); - } - if (jsonObj.get("rateLimits") != null && !jsonObj.get("rateLimits").isJsonNull()) { - JsonArray jsonArrayrateLimits = jsonObj.getAsJsonArray("rateLimits"); - if (jsonArrayrateLimits != null) { - // ensure the json data is an array - if (!jsonObj.get("rateLimits").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `rateLimits` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("rateLimits").toString())); - } - - // validate the optional field `rateLimits` (array) - for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); - } - ; - } - } - if (jsonObj.get("exchangeFilters") != null - && !jsonObj.get("exchangeFilters").isJsonNull()) { - JsonArray jsonArrayexchangeFilters = jsonObj.getAsJsonArray("exchangeFilters"); - if (jsonArrayexchangeFilters != null) { - // ensure the json data is an array - if (!jsonObj.get("exchangeFilters").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `exchangeFilters` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("exchangeFilters").toString())); - } - - // validate the optional field `exchangeFilters` (array) - for (int i = 0; i < jsonArrayexchangeFilters.size(); i++) { - ExchangeFilters.validateJsonElement(jsonArrayexchangeFilters.get(i)); - } - ; - } - } - if (jsonObj.get("symbols") != null && !jsonObj.get("symbols").isJsonNull()) { - JsonArray jsonArraysymbols = jsonObj.getAsJsonArray("symbols"); - if (jsonArraysymbols != null) { - // ensure the json data is an array - if (!jsonObj.get("symbols").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `symbols` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("symbols").toString())); - } - - // validate the optional field `symbols` (array) - for (int i = 0; i < jsonArraysymbols.size(); i++) { - ExchangeInfoResponseResultSymbolsInner.validateJsonElement( - jsonArraysymbols.get(i)); - } - ; - } - } - if (jsonObj.get("sors") != null && !jsonObj.get("sors").isJsonNull()) { - JsonArray jsonArraysors = jsonObj.getAsJsonArray("sors"); - if (jsonArraysors != null) { - // ensure the json data is an array - if (!jsonObj.get("sors").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `sors` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("sors").toString())); - } - - // validate the optional field `sors` (array) - for (int i = 0; i < jsonArraysors.size(); i++) { - ExchangeInfoResponseResultSorsInner.validateJsonElement(jsonArraysors.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExchangeInfoResponseResult.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExchangeInfoResponseResult' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ExchangeInfoResponseResult.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ExchangeInfoResponseResult value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExchangeInfoResponseResult read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ExchangeInfoResponseResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExchangeInfoResponseResult - * @throws IOException if the JSON string is invalid with respect to ExchangeInfoResponseResult - */ - public static ExchangeInfoResponseResult fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExchangeInfoResponseResult.class); - } - - /** - * Convert an instance of ExchangeInfoResponseResult to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseResultSorsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseResultSorsInner.java deleted file mode 100644 index c189e1638..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseResultSorsInner.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.api.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.api.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** ExchangeInfoResponseResultSorsInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ExchangeInfoResponseResultSorsInner extends BaseDTO { - public static final String SERIALIZED_NAME_BASE_ASSET = "baseAsset"; - - @SerializedName(SERIALIZED_NAME_BASE_ASSET) - @jakarta.annotation.Nullable - private String baseAsset; - - public static final String SERIALIZED_NAME_SYMBOLS = "symbols"; - - @SerializedName(SERIALIZED_NAME_SYMBOLS) - @jakarta.annotation.Nullable - private List symbols; - - public ExchangeInfoResponseResultSorsInner() {} - - public ExchangeInfoResponseResultSorsInner baseAsset( - @jakarta.annotation.Nullable String baseAsset) { - this.baseAsset = baseAsset; - return this; - } - - /** - * Get baseAsset - * - * @return baseAsset - */ - @jakarta.annotation.Nullable - public String getBaseAsset() { - return baseAsset; - } - - public void setBaseAsset(@jakarta.annotation.Nullable String baseAsset) { - this.baseAsset = baseAsset; - } - - public ExchangeInfoResponseResultSorsInner symbols( - @jakarta.annotation.Nullable List symbols) { - this.symbols = symbols; - return this; - } - - public ExchangeInfoResponseResultSorsInner addSymbolsItem(String symbolsItem) { - if (this.symbols == null) { - this.symbols = new ArrayList<>(); - } - this.symbols.add(symbolsItem); - return this; - } - - /** - * Get symbols - * - * @return symbols - */ - @jakarta.annotation.Nullable - public List getSymbols() { - return symbols; - } - - public void setSymbols(@jakarta.annotation.Nullable List symbols) { - this.symbols = symbols; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExchangeInfoResponseResultSorsInner exchangeInfoResponseResultSorsInner = - (ExchangeInfoResponseResultSorsInner) o; - return Objects.equals(this.baseAsset, exchangeInfoResponseResultSorsInner.baseAsset) - && Objects.equals(this.symbols, exchangeInfoResponseResultSorsInner.symbols); - } - - @Override - public int hashCode() { - return Objects.hash(baseAsset, symbols); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExchangeInfoResponseResultSorsInner {\n"); - sb.append(" baseAsset: ").append(toIndentedString(baseAsset)).append("\n"); - sb.append(" symbols: ").append(toIndentedString(symbols)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String baseAssetValue = getBaseAsset(); - if (baseAssetValue != null) { - String baseAssetValueAsString = baseAssetValue.toString(); - valMap.put("baseAsset", baseAssetValueAsString); - } - List symbolsValue = getSymbols(); - if (symbolsValue != null) { - String symbolsValueAsString = symbolsValue.toString(); - valMap.put("symbols", symbolsValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object baseAssetValue = getBaseAsset(); - if (baseAssetValue != null) { - valMap.put("baseAsset", baseAssetValue); - } - Object symbolsValue = getSymbols(); - if (symbolsValue != null) { - valMap.put("symbols", symbolsValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("baseAsset"); - openapiFields.add("symbols"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ExchangeInfoResponseResultSorsInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExchangeInfoResponseResultSorsInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ExchangeInfoResponseResultSorsInner is" - + " not found in the empty JSON string", - ExchangeInfoResponseResultSorsInner.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExchangeInfoResponseResultSorsInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ExchangeInfoResponseResultSorsInner` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("baseAsset") != null && !jsonObj.get("baseAsset").isJsonNull()) - && !jsonObj.get("baseAsset").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `baseAsset` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("baseAsset").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("symbols") != null - && !jsonObj.get("symbols").isJsonNull() - && !jsonObj.get("symbols").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `symbols` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("symbols").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExchangeInfoResponseResultSorsInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExchangeInfoResponseResultSorsInner' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ExchangeInfoResponseResultSorsInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ExchangeInfoResponseResultSorsInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExchangeInfoResponseResultSorsInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ExchangeInfoResponseResultSorsInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExchangeInfoResponseResultSorsInner - * @throws IOException if the JSON string is invalid with respect to - * ExchangeInfoResponseResultSorsInner - */ - public static ExchangeInfoResponseResultSorsInner fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, ExchangeInfoResponseResultSorsInner.class); - } - - /** - * Convert an instance of ExchangeInfoResponseResultSorsInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseResultSymbolsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseResultSymbolsInner.java deleted file mode 100644 index 0f01bf36d..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseResultSymbolsInner.java +++ /dev/null @@ -1,1441 +0,0 @@ -/* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.api.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.api.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** ExchangeInfoResponseResultSymbolsInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ExchangeInfoResponseResultSymbolsInner extends BaseDTO { - public static final String SERIALIZED_NAME_SYMBOL = "symbol"; - - @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nullable - private String symbol; - - public static final String SERIALIZED_NAME_STATUS = "status"; - - @SerializedName(SERIALIZED_NAME_STATUS) - @jakarta.annotation.Nullable - private String status; - - public static final String SERIALIZED_NAME_BASE_ASSET = "baseAsset"; - - @SerializedName(SERIALIZED_NAME_BASE_ASSET) - @jakarta.annotation.Nullable - private String baseAsset; - - public static final String SERIALIZED_NAME_BASE_ASSET_PRECISION = "baseAssetPrecision"; - - @SerializedName(SERIALIZED_NAME_BASE_ASSET_PRECISION) - @jakarta.annotation.Nullable - private Long baseAssetPrecision; - - public static final String SERIALIZED_NAME_QUOTE_ASSET = "quoteAsset"; - - @SerializedName(SERIALIZED_NAME_QUOTE_ASSET) - @jakarta.annotation.Nullable - private String quoteAsset; - - public static final String SERIALIZED_NAME_QUOTE_PRECISION = "quotePrecision"; - - @SerializedName(SERIALIZED_NAME_QUOTE_PRECISION) - @jakarta.annotation.Nullable - private Long quotePrecision; - - public static final String SERIALIZED_NAME_QUOTE_ASSET_PRECISION = "quoteAssetPrecision"; - - @SerializedName(SERIALIZED_NAME_QUOTE_ASSET_PRECISION) - @jakarta.annotation.Nullable - private Long quoteAssetPrecision; - - public static final String SERIALIZED_NAME_BASE_COMMISSION_PRECISION = - "baseCommissionPrecision"; - - @SerializedName(SERIALIZED_NAME_BASE_COMMISSION_PRECISION) - @jakarta.annotation.Nullable - private Long baseCommissionPrecision; - - public static final String SERIALIZED_NAME_QUOTE_COMMISSION_PRECISION = - "quoteCommissionPrecision"; - - @SerializedName(SERIALIZED_NAME_QUOTE_COMMISSION_PRECISION) - @jakarta.annotation.Nullable - private Long quoteCommissionPrecision; - - public static final String SERIALIZED_NAME_ORDER_TYPES = "orderTypes"; - - @SerializedName(SERIALIZED_NAME_ORDER_TYPES) - @jakarta.annotation.Nullable - private List orderTypes; - - public static final String SERIALIZED_NAME_ICEBERG_ALLOWED = "icebergAllowed"; - - @SerializedName(SERIALIZED_NAME_ICEBERG_ALLOWED) - @jakarta.annotation.Nullable - private Boolean icebergAllowed; - - public static final String SERIALIZED_NAME_OCO_ALLOWED = "ocoAllowed"; - - @SerializedName(SERIALIZED_NAME_OCO_ALLOWED) - @jakarta.annotation.Nullable - private Boolean ocoAllowed; - - public static final String SERIALIZED_NAME_OTO_ALLOWED = "otoAllowed"; - - @SerializedName(SERIALIZED_NAME_OTO_ALLOWED) - @jakarta.annotation.Nullable - private Boolean otoAllowed; - - public static final String SERIALIZED_NAME_OPO_ALLOWED = "opoAllowed"; - - @SerializedName(SERIALIZED_NAME_OPO_ALLOWED) - @jakarta.annotation.Nullable - private Boolean opoAllowed; - - public static final String SERIALIZED_NAME_QUOTE_ORDER_QTY_MARKET_ALLOWED = - "quoteOrderQtyMarketAllowed"; - - @SerializedName(SERIALIZED_NAME_QUOTE_ORDER_QTY_MARKET_ALLOWED) - @jakarta.annotation.Nullable - private Boolean quoteOrderQtyMarketAllowed; - - public static final String SERIALIZED_NAME_ALLOW_TRAILING_STOP = "allowTrailingStop"; - - @SerializedName(SERIALIZED_NAME_ALLOW_TRAILING_STOP) - @jakarta.annotation.Nullable - private Boolean allowTrailingStop; - - public static final String SERIALIZED_NAME_CANCEL_REPLACE_ALLOWED = "cancelReplaceAllowed"; - - @SerializedName(SERIALIZED_NAME_CANCEL_REPLACE_ALLOWED) - @jakarta.annotation.Nullable - private Boolean cancelReplaceAllowed; - - public static final String SERIALIZED_NAME_AMEND_ALLOWED = "amendAllowed"; - - @SerializedName(SERIALIZED_NAME_AMEND_ALLOWED) - @jakarta.annotation.Nullable - private Boolean amendAllowed; - - public static final String SERIALIZED_NAME_PEG_INSTRUCTIONS_ALLOWED = "pegInstructionsAllowed"; - - @SerializedName(SERIALIZED_NAME_PEG_INSTRUCTIONS_ALLOWED) - @jakarta.annotation.Nullable - private Boolean pegInstructionsAllowed; - - public static final String SERIALIZED_NAME_IS_SPOT_TRADING_ALLOWED = "isSpotTradingAllowed"; - - @SerializedName(SERIALIZED_NAME_IS_SPOT_TRADING_ALLOWED) - @jakarta.annotation.Nullable - private Boolean isSpotTradingAllowed; - - public static final String SERIALIZED_NAME_IS_MARGIN_TRADING_ALLOWED = "isMarginTradingAllowed"; - - @SerializedName(SERIALIZED_NAME_IS_MARGIN_TRADING_ALLOWED) - @jakarta.annotation.Nullable - private Boolean isMarginTradingAllowed; - - public static final String SERIALIZED_NAME_FILTERS = "filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - @jakarta.annotation.Nullable - private List filters; - - public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; - - @SerializedName(SERIALIZED_NAME_PERMISSIONS) - @jakarta.annotation.Nullable - private List permissions; - - public static final String SERIALIZED_NAME_PERMISSION_SETS = "permissionSets"; - - @SerializedName(SERIALIZED_NAME_PERMISSION_SETS) - @jakarta.annotation.Nullable - private List> permissionSets; - - public static final String SERIALIZED_NAME_DEFAULT_SELF_TRADE_PREVENTION_MODE = - "defaultSelfTradePreventionMode"; - - @SerializedName(SERIALIZED_NAME_DEFAULT_SELF_TRADE_PREVENTION_MODE) - @jakarta.annotation.Nullable - private String defaultSelfTradePreventionMode; - - public static final String SERIALIZED_NAME_ALLOWED_SELF_TRADE_PREVENTION_MODES = - "allowedSelfTradePreventionModes"; - - @SerializedName(SERIALIZED_NAME_ALLOWED_SELF_TRADE_PREVENTION_MODES) - @jakarta.annotation.Nullable - private List allowedSelfTradePreventionModes; - - public ExchangeInfoResponseResultSymbolsInner() {} - - public ExchangeInfoResponseResultSymbolsInner symbol( - @jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - return this; - } - - /** - * Get symbol - * - * @return symbol - */ - @jakarta.annotation.Nullable - public String getSymbol() { - return symbol; - } - - public void setSymbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - } - - public ExchangeInfoResponseResultSymbolsInner status( - @jakarta.annotation.Nullable String status) { - this.status = status; - return this; - } - - /** - * Get status - * - * @return status - */ - @jakarta.annotation.Nullable - public String getStatus() { - return status; - } - - public void setStatus(@jakarta.annotation.Nullable String status) { - this.status = status; - } - - public ExchangeInfoResponseResultSymbolsInner baseAsset( - @jakarta.annotation.Nullable String baseAsset) { - this.baseAsset = baseAsset; - return this; - } - - /** - * Get baseAsset - * - * @return baseAsset - */ - @jakarta.annotation.Nullable - public String getBaseAsset() { - return baseAsset; - } - - public void setBaseAsset(@jakarta.annotation.Nullable String baseAsset) { - this.baseAsset = baseAsset; - } - - public ExchangeInfoResponseResultSymbolsInner baseAssetPrecision( - @jakarta.annotation.Nullable Long baseAssetPrecision) { - this.baseAssetPrecision = baseAssetPrecision; - return this; - } - - /** - * Get baseAssetPrecision - * - * @return baseAssetPrecision - */ - @jakarta.annotation.Nullable - public Long getBaseAssetPrecision() { - return baseAssetPrecision; - } - - public void setBaseAssetPrecision(@jakarta.annotation.Nullable Long baseAssetPrecision) { - this.baseAssetPrecision = baseAssetPrecision; - } - - public ExchangeInfoResponseResultSymbolsInner quoteAsset( - @jakarta.annotation.Nullable String quoteAsset) { - this.quoteAsset = quoteAsset; - return this; - } - - /** - * Get quoteAsset - * - * @return quoteAsset - */ - @jakarta.annotation.Nullable - public String getQuoteAsset() { - return quoteAsset; - } - - public void setQuoteAsset(@jakarta.annotation.Nullable String quoteAsset) { - this.quoteAsset = quoteAsset; - } - - public ExchangeInfoResponseResultSymbolsInner quotePrecision( - @jakarta.annotation.Nullable Long quotePrecision) { - this.quotePrecision = quotePrecision; - return this; - } - - /** - * Get quotePrecision - * - * @return quotePrecision - */ - @jakarta.annotation.Nullable - public Long getQuotePrecision() { - return quotePrecision; - } - - public void setQuotePrecision(@jakarta.annotation.Nullable Long quotePrecision) { - this.quotePrecision = quotePrecision; - } - - public ExchangeInfoResponseResultSymbolsInner quoteAssetPrecision( - @jakarta.annotation.Nullable Long quoteAssetPrecision) { - this.quoteAssetPrecision = quoteAssetPrecision; - return this; - } - - /** - * Get quoteAssetPrecision - * - * @return quoteAssetPrecision - */ - @jakarta.annotation.Nullable - public Long getQuoteAssetPrecision() { - return quoteAssetPrecision; - } - - public void setQuoteAssetPrecision(@jakarta.annotation.Nullable Long quoteAssetPrecision) { - this.quoteAssetPrecision = quoteAssetPrecision; - } - - public ExchangeInfoResponseResultSymbolsInner baseCommissionPrecision( - @jakarta.annotation.Nullable Long baseCommissionPrecision) { - this.baseCommissionPrecision = baseCommissionPrecision; - return this; - } - - /** - * Get baseCommissionPrecision - * - * @return baseCommissionPrecision - */ - @jakarta.annotation.Nullable - public Long getBaseCommissionPrecision() { - return baseCommissionPrecision; - } - - public void setBaseCommissionPrecision( - @jakarta.annotation.Nullable Long baseCommissionPrecision) { - this.baseCommissionPrecision = baseCommissionPrecision; - } - - public ExchangeInfoResponseResultSymbolsInner quoteCommissionPrecision( - @jakarta.annotation.Nullable Long quoteCommissionPrecision) { - this.quoteCommissionPrecision = quoteCommissionPrecision; - return this; - } - - /** - * Get quoteCommissionPrecision - * - * @return quoteCommissionPrecision - */ - @jakarta.annotation.Nullable - public Long getQuoteCommissionPrecision() { - return quoteCommissionPrecision; - } - - public void setQuoteCommissionPrecision( - @jakarta.annotation.Nullable Long quoteCommissionPrecision) { - this.quoteCommissionPrecision = quoteCommissionPrecision; - } - - public ExchangeInfoResponseResultSymbolsInner orderTypes( - @jakarta.annotation.Nullable List orderTypes) { - this.orderTypes = orderTypes; - return this; - } - - public ExchangeInfoResponseResultSymbolsInner addOrderTypesItem(String orderTypesItem) { - if (this.orderTypes == null) { - this.orderTypes = new ArrayList<>(); - } - this.orderTypes.add(orderTypesItem); - return this; - } - - /** - * Get orderTypes - * - * @return orderTypes - */ - @jakarta.annotation.Nullable - public List getOrderTypes() { - return orderTypes; - } - - public void setOrderTypes(@jakarta.annotation.Nullable List orderTypes) { - this.orderTypes = orderTypes; - } - - public ExchangeInfoResponseResultSymbolsInner icebergAllowed( - @jakarta.annotation.Nullable Boolean icebergAllowed) { - this.icebergAllowed = icebergAllowed; - return this; - } - - /** - * Get icebergAllowed - * - * @return icebergAllowed - */ - @jakarta.annotation.Nullable - public Boolean getIcebergAllowed() { - return icebergAllowed; - } - - public void setIcebergAllowed(@jakarta.annotation.Nullable Boolean icebergAllowed) { - this.icebergAllowed = icebergAllowed; - } - - public ExchangeInfoResponseResultSymbolsInner ocoAllowed( - @jakarta.annotation.Nullable Boolean ocoAllowed) { - this.ocoAllowed = ocoAllowed; - return this; - } - - /** - * Get ocoAllowed - * - * @return ocoAllowed - */ - @jakarta.annotation.Nullable - public Boolean getOcoAllowed() { - return ocoAllowed; - } - - public void setOcoAllowed(@jakarta.annotation.Nullable Boolean ocoAllowed) { - this.ocoAllowed = ocoAllowed; - } - - public ExchangeInfoResponseResultSymbolsInner otoAllowed( - @jakarta.annotation.Nullable Boolean otoAllowed) { - this.otoAllowed = otoAllowed; - return this; - } - - /** - * Get otoAllowed - * - * @return otoAllowed - */ - @jakarta.annotation.Nullable - public Boolean getOtoAllowed() { - return otoAllowed; - } - - public void setOtoAllowed(@jakarta.annotation.Nullable Boolean otoAllowed) { - this.otoAllowed = otoAllowed; - } - - public ExchangeInfoResponseResultSymbolsInner opoAllowed( - @jakarta.annotation.Nullable Boolean opoAllowed) { - this.opoAllowed = opoAllowed; - return this; - } - - /** - * Get opoAllowed - * - * @return opoAllowed - */ - @jakarta.annotation.Nullable - public Boolean getOpoAllowed() { - return opoAllowed; - } - - public void setOpoAllowed(@jakarta.annotation.Nullable Boolean opoAllowed) { - this.opoAllowed = opoAllowed; - } - - public ExchangeInfoResponseResultSymbolsInner quoteOrderQtyMarketAllowed( - @jakarta.annotation.Nullable Boolean quoteOrderQtyMarketAllowed) { - this.quoteOrderQtyMarketAllowed = quoteOrderQtyMarketAllowed; - return this; - } - - /** - * Get quoteOrderQtyMarketAllowed - * - * @return quoteOrderQtyMarketAllowed - */ - @jakarta.annotation.Nullable - public Boolean getQuoteOrderQtyMarketAllowed() { - return quoteOrderQtyMarketAllowed; - } - - public void setQuoteOrderQtyMarketAllowed( - @jakarta.annotation.Nullable Boolean quoteOrderQtyMarketAllowed) { - this.quoteOrderQtyMarketAllowed = quoteOrderQtyMarketAllowed; - } - - public ExchangeInfoResponseResultSymbolsInner allowTrailingStop( - @jakarta.annotation.Nullable Boolean allowTrailingStop) { - this.allowTrailingStop = allowTrailingStop; - return this; - } - - /** - * Get allowTrailingStop - * - * @return allowTrailingStop - */ - @jakarta.annotation.Nullable - public Boolean getAllowTrailingStop() { - return allowTrailingStop; - } - - public void setAllowTrailingStop(@jakarta.annotation.Nullable Boolean allowTrailingStop) { - this.allowTrailingStop = allowTrailingStop; - } - - public ExchangeInfoResponseResultSymbolsInner cancelReplaceAllowed( - @jakarta.annotation.Nullable Boolean cancelReplaceAllowed) { - this.cancelReplaceAllowed = cancelReplaceAllowed; - return this; - } - - /** - * Get cancelReplaceAllowed - * - * @return cancelReplaceAllowed - */ - @jakarta.annotation.Nullable - public Boolean getCancelReplaceAllowed() { - return cancelReplaceAllowed; - } - - public void setCancelReplaceAllowed(@jakarta.annotation.Nullable Boolean cancelReplaceAllowed) { - this.cancelReplaceAllowed = cancelReplaceAllowed; - } - - public ExchangeInfoResponseResultSymbolsInner amendAllowed( - @jakarta.annotation.Nullable Boolean amendAllowed) { - this.amendAllowed = amendAllowed; - return this; - } - - /** - * Get amendAllowed - * - * @return amendAllowed - */ - @jakarta.annotation.Nullable - public Boolean getAmendAllowed() { - return amendAllowed; - } - - public void setAmendAllowed(@jakarta.annotation.Nullable Boolean amendAllowed) { - this.amendAllowed = amendAllowed; - } - - public ExchangeInfoResponseResultSymbolsInner pegInstructionsAllowed( - @jakarta.annotation.Nullable Boolean pegInstructionsAllowed) { - this.pegInstructionsAllowed = pegInstructionsAllowed; - return this; - } - - /** - * Get pegInstructionsAllowed - * - * @return pegInstructionsAllowed - */ - @jakarta.annotation.Nullable - public Boolean getPegInstructionsAllowed() { - return pegInstructionsAllowed; - } - - public void setPegInstructionsAllowed( - @jakarta.annotation.Nullable Boolean pegInstructionsAllowed) { - this.pegInstructionsAllowed = pegInstructionsAllowed; - } - - public ExchangeInfoResponseResultSymbolsInner isSpotTradingAllowed( - @jakarta.annotation.Nullable Boolean isSpotTradingAllowed) { - this.isSpotTradingAllowed = isSpotTradingAllowed; - return this; - } - - /** - * Get isSpotTradingAllowed - * - * @return isSpotTradingAllowed - */ - @jakarta.annotation.Nullable - public Boolean getIsSpotTradingAllowed() { - return isSpotTradingAllowed; - } - - public void setIsSpotTradingAllowed(@jakarta.annotation.Nullable Boolean isSpotTradingAllowed) { - this.isSpotTradingAllowed = isSpotTradingAllowed; - } - - public ExchangeInfoResponseResultSymbolsInner isMarginTradingAllowed( - @jakarta.annotation.Nullable Boolean isMarginTradingAllowed) { - this.isMarginTradingAllowed = isMarginTradingAllowed; - return this; - } - - /** - * Get isMarginTradingAllowed - * - * @return isMarginTradingAllowed - */ - @jakarta.annotation.Nullable - public Boolean getIsMarginTradingAllowed() { - return isMarginTradingAllowed; - } - - public void setIsMarginTradingAllowed( - @jakarta.annotation.Nullable Boolean isMarginTradingAllowed) { - this.isMarginTradingAllowed = isMarginTradingAllowed; - } - - public ExchangeInfoResponseResultSymbolsInner filters( - @jakarta.annotation.Nullable List filters) { - this.filters = filters; - return this; - } - - public ExchangeInfoResponseResultSymbolsInner addFiltersItem(SymbolFilters filtersItem) { - if (this.filters == null) { - this.filters = new ArrayList<>(); - } - this.filters.add(filtersItem); - return this; - } - - /** - * Get filters - * - * @return filters - */ - @jakarta.annotation.Nullable - @Valid - public List getFilters() { - return filters; - } - - public void setFilters(@jakarta.annotation.Nullable List filters) { - this.filters = filters; - } - - public ExchangeInfoResponseResultSymbolsInner permissions( - @jakarta.annotation.Nullable List permissions) { - this.permissions = permissions; - return this; - } - - public ExchangeInfoResponseResultSymbolsInner addPermissionsItem(String permissionsItem) { - if (this.permissions == null) { - this.permissions = new ArrayList<>(); - } - this.permissions.add(permissionsItem); - return this; - } - - /** - * Get permissions - * - * @return permissions - */ - @jakarta.annotation.Nullable - public List getPermissions() { - return permissions; - } - - public void setPermissions(@jakarta.annotation.Nullable List permissions) { - this.permissions = permissions; - } - - public ExchangeInfoResponseResultSymbolsInner permissionSets( - @jakarta.annotation.Nullable List> permissionSets) { - this.permissionSets = permissionSets; - return this; - } - - public ExchangeInfoResponseResultSymbolsInner addPermissionSetsItem( - List permissionSetsItem) { - if (this.permissionSets == null) { - this.permissionSets = new ArrayList<>(); - } - this.permissionSets.add(permissionSetsItem); - return this; - } - - /** - * Get permissionSets - * - * @return permissionSets - */ - @jakarta.annotation.Nullable - @Valid - public List> getPermissionSets() { - return permissionSets; - } - - public void setPermissionSets(@jakarta.annotation.Nullable List> permissionSets) { - this.permissionSets = permissionSets; - } - - public ExchangeInfoResponseResultSymbolsInner defaultSelfTradePreventionMode( - @jakarta.annotation.Nullable String defaultSelfTradePreventionMode) { - this.defaultSelfTradePreventionMode = defaultSelfTradePreventionMode; - return this; - } - - /** - * Get defaultSelfTradePreventionMode - * - * @return defaultSelfTradePreventionMode - */ - @jakarta.annotation.Nullable - public String getDefaultSelfTradePreventionMode() { - return defaultSelfTradePreventionMode; - } - - public void setDefaultSelfTradePreventionMode( - @jakarta.annotation.Nullable String defaultSelfTradePreventionMode) { - this.defaultSelfTradePreventionMode = defaultSelfTradePreventionMode; - } - - public ExchangeInfoResponseResultSymbolsInner allowedSelfTradePreventionModes( - @jakarta.annotation.Nullable List allowedSelfTradePreventionModes) { - this.allowedSelfTradePreventionModes = allowedSelfTradePreventionModes; - return this; - } - - public ExchangeInfoResponseResultSymbolsInner addAllowedSelfTradePreventionModesItem( - String allowedSelfTradePreventionModesItem) { - if (this.allowedSelfTradePreventionModes == null) { - this.allowedSelfTradePreventionModes = new ArrayList<>(); - } - this.allowedSelfTradePreventionModes.add(allowedSelfTradePreventionModesItem); - return this; - } - - /** - * Get allowedSelfTradePreventionModes - * - * @return allowedSelfTradePreventionModes - */ - @jakarta.annotation.Nullable - public List getAllowedSelfTradePreventionModes() { - return allowedSelfTradePreventionModes; - } - - public void setAllowedSelfTradePreventionModes( - @jakarta.annotation.Nullable List allowedSelfTradePreventionModes) { - this.allowedSelfTradePreventionModes = allowedSelfTradePreventionModes; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExchangeInfoResponseResultSymbolsInner exchangeInfoResponseResultSymbolsInner = - (ExchangeInfoResponseResultSymbolsInner) o; - return Objects.equals(this.symbol, exchangeInfoResponseResultSymbolsInner.symbol) - && Objects.equals(this.status, exchangeInfoResponseResultSymbolsInner.status) - && Objects.equals(this.baseAsset, exchangeInfoResponseResultSymbolsInner.baseAsset) - && Objects.equals( - this.baseAssetPrecision, - exchangeInfoResponseResultSymbolsInner.baseAssetPrecision) - && Objects.equals( - this.quoteAsset, exchangeInfoResponseResultSymbolsInner.quoteAsset) - && Objects.equals( - this.quotePrecision, exchangeInfoResponseResultSymbolsInner.quotePrecision) - && Objects.equals( - this.quoteAssetPrecision, - exchangeInfoResponseResultSymbolsInner.quoteAssetPrecision) - && Objects.equals( - this.baseCommissionPrecision, - exchangeInfoResponseResultSymbolsInner.baseCommissionPrecision) - && Objects.equals( - this.quoteCommissionPrecision, - exchangeInfoResponseResultSymbolsInner.quoteCommissionPrecision) - && Objects.equals( - this.orderTypes, exchangeInfoResponseResultSymbolsInner.orderTypes) - && Objects.equals( - this.icebergAllowed, exchangeInfoResponseResultSymbolsInner.icebergAllowed) - && Objects.equals( - this.ocoAllowed, exchangeInfoResponseResultSymbolsInner.ocoAllowed) - && Objects.equals( - this.otoAllowed, exchangeInfoResponseResultSymbolsInner.otoAllowed) - && Objects.equals( - this.opoAllowed, exchangeInfoResponseResultSymbolsInner.opoAllowed) - && Objects.equals( - this.quoteOrderQtyMarketAllowed, - exchangeInfoResponseResultSymbolsInner.quoteOrderQtyMarketAllowed) - && Objects.equals( - this.allowTrailingStop, - exchangeInfoResponseResultSymbolsInner.allowTrailingStop) - && Objects.equals( - this.cancelReplaceAllowed, - exchangeInfoResponseResultSymbolsInner.cancelReplaceAllowed) - && Objects.equals( - this.amendAllowed, exchangeInfoResponseResultSymbolsInner.amendAllowed) - && Objects.equals( - this.pegInstructionsAllowed, - exchangeInfoResponseResultSymbolsInner.pegInstructionsAllowed) - && Objects.equals( - this.isSpotTradingAllowed, - exchangeInfoResponseResultSymbolsInner.isSpotTradingAllowed) - && Objects.equals( - this.isMarginTradingAllowed, - exchangeInfoResponseResultSymbolsInner.isMarginTradingAllowed) - && Objects.equals(this.filters, exchangeInfoResponseResultSymbolsInner.filters) - && Objects.equals( - this.permissions, exchangeInfoResponseResultSymbolsInner.permissions) - && Objects.equals( - this.permissionSets, exchangeInfoResponseResultSymbolsInner.permissionSets) - && Objects.equals( - this.defaultSelfTradePreventionMode, - exchangeInfoResponseResultSymbolsInner.defaultSelfTradePreventionMode) - && Objects.equals( - this.allowedSelfTradePreventionModes, - exchangeInfoResponseResultSymbolsInner.allowedSelfTradePreventionModes); - } - - @Override - public int hashCode() { - return Objects.hash( - symbol, - status, - baseAsset, - baseAssetPrecision, - quoteAsset, - quotePrecision, - quoteAssetPrecision, - baseCommissionPrecision, - quoteCommissionPrecision, - orderTypes, - icebergAllowed, - ocoAllowed, - otoAllowed, - opoAllowed, - quoteOrderQtyMarketAllowed, - allowTrailingStop, - cancelReplaceAllowed, - amendAllowed, - pegInstructionsAllowed, - isSpotTradingAllowed, - isMarginTradingAllowed, - filters, - permissions, - permissionSets, - defaultSelfTradePreventionMode, - allowedSelfTradePreventionModes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExchangeInfoResponseResultSymbolsInner {\n"); - sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" baseAsset: ").append(toIndentedString(baseAsset)).append("\n"); - sb.append(" baseAssetPrecision: ") - .append(toIndentedString(baseAssetPrecision)) - .append("\n"); - sb.append(" quoteAsset: ").append(toIndentedString(quoteAsset)).append("\n"); - sb.append(" quotePrecision: ").append(toIndentedString(quotePrecision)).append("\n"); - sb.append(" quoteAssetPrecision: ") - .append(toIndentedString(quoteAssetPrecision)) - .append("\n"); - sb.append(" baseCommissionPrecision: ") - .append(toIndentedString(baseCommissionPrecision)) - .append("\n"); - sb.append(" quoteCommissionPrecision: ") - .append(toIndentedString(quoteCommissionPrecision)) - .append("\n"); - sb.append(" orderTypes: ").append(toIndentedString(orderTypes)).append("\n"); - sb.append(" icebergAllowed: ").append(toIndentedString(icebergAllowed)).append("\n"); - sb.append(" ocoAllowed: ").append(toIndentedString(ocoAllowed)).append("\n"); - sb.append(" otoAllowed: ").append(toIndentedString(otoAllowed)).append("\n"); - sb.append(" opoAllowed: ").append(toIndentedString(opoAllowed)).append("\n"); - sb.append(" quoteOrderQtyMarketAllowed: ") - .append(toIndentedString(quoteOrderQtyMarketAllowed)) - .append("\n"); - sb.append(" allowTrailingStop: ").append(toIndentedString(allowTrailingStop)).append("\n"); - sb.append(" cancelReplaceAllowed: ") - .append(toIndentedString(cancelReplaceAllowed)) - .append("\n"); - sb.append(" amendAllowed: ").append(toIndentedString(amendAllowed)).append("\n"); - sb.append(" pegInstructionsAllowed: ") - .append(toIndentedString(pegInstructionsAllowed)) - .append("\n"); - sb.append(" isSpotTradingAllowed: ") - .append(toIndentedString(isSpotTradingAllowed)) - .append("\n"); - sb.append(" isMarginTradingAllowed: ") - .append(toIndentedString(isMarginTradingAllowed)) - .append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); - sb.append(" permissionSets: ").append(toIndentedString(permissionSets)).append("\n"); - sb.append(" defaultSelfTradePreventionMode: ") - .append(toIndentedString(defaultSelfTradePreventionMode)) - .append("\n"); - sb.append(" allowedSelfTradePreventionModes: ") - .append(toIndentedString(allowedSelfTradePreventionModes)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String symbolValue = getSymbol(); - if (symbolValue != null) { - String symbolValueAsString = symbolValue.toString(); - valMap.put("symbol", symbolValueAsString); - } - String statusValue = getStatus(); - if (statusValue != null) { - String statusValueAsString = statusValue.toString(); - valMap.put("status", statusValueAsString); - } - String baseAssetValue = getBaseAsset(); - if (baseAssetValue != null) { - String baseAssetValueAsString = baseAssetValue.toString(); - valMap.put("baseAsset", baseAssetValueAsString); - } - Long baseAssetPrecisionValue = getBaseAssetPrecision(); - if (baseAssetPrecisionValue != null) { - String baseAssetPrecisionValueAsString = baseAssetPrecisionValue.toString(); - valMap.put("baseAssetPrecision", baseAssetPrecisionValueAsString); - } - String quoteAssetValue = getQuoteAsset(); - if (quoteAssetValue != null) { - String quoteAssetValueAsString = quoteAssetValue.toString(); - valMap.put("quoteAsset", quoteAssetValueAsString); - } - Long quotePrecisionValue = getQuotePrecision(); - if (quotePrecisionValue != null) { - String quotePrecisionValueAsString = quotePrecisionValue.toString(); - valMap.put("quotePrecision", quotePrecisionValueAsString); - } - Long quoteAssetPrecisionValue = getQuoteAssetPrecision(); - if (quoteAssetPrecisionValue != null) { - String quoteAssetPrecisionValueAsString = quoteAssetPrecisionValue.toString(); - valMap.put("quoteAssetPrecision", quoteAssetPrecisionValueAsString); - } - Long baseCommissionPrecisionValue = getBaseCommissionPrecision(); - if (baseCommissionPrecisionValue != null) { - String baseCommissionPrecisionValueAsString = baseCommissionPrecisionValue.toString(); - valMap.put("baseCommissionPrecision", baseCommissionPrecisionValueAsString); - } - Long quoteCommissionPrecisionValue = getQuoteCommissionPrecision(); - if (quoteCommissionPrecisionValue != null) { - String quoteCommissionPrecisionValueAsString = quoteCommissionPrecisionValue.toString(); - valMap.put("quoteCommissionPrecision", quoteCommissionPrecisionValueAsString); - } - List orderTypesValue = getOrderTypes(); - if (orderTypesValue != null) { - String orderTypesValueAsString = orderTypesValue.toString(); - valMap.put("orderTypes", orderTypesValueAsString); - } - Boolean icebergAllowedValue = getIcebergAllowed(); - if (icebergAllowedValue != null) { - String icebergAllowedValueAsString = icebergAllowedValue.toString(); - valMap.put("icebergAllowed", icebergAllowedValueAsString); - } - Boolean ocoAllowedValue = getOcoAllowed(); - if (ocoAllowedValue != null) { - String ocoAllowedValueAsString = ocoAllowedValue.toString(); - valMap.put("ocoAllowed", ocoAllowedValueAsString); - } - Boolean otoAllowedValue = getOtoAllowed(); - if (otoAllowedValue != null) { - String otoAllowedValueAsString = otoAllowedValue.toString(); - valMap.put("otoAllowed", otoAllowedValueAsString); - } - Boolean opoAllowedValue = getOpoAllowed(); - if (opoAllowedValue != null) { - String opoAllowedValueAsString = opoAllowedValue.toString(); - valMap.put("opoAllowed", opoAllowedValueAsString); - } - Boolean quoteOrderQtyMarketAllowedValue = getQuoteOrderQtyMarketAllowed(); - if (quoteOrderQtyMarketAllowedValue != null) { - String quoteOrderQtyMarketAllowedValueAsString = - quoteOrderQtyMarketAllowedValue.toString(); - valMap.put("quoteOrderQtyMarketAllowed", quoteOrderQtyMarketAllowedValueAsString); - } - Boolean allowTrailingStopValue = getAllowTrailingStop(); - if (allowTrailingStopValue != null) { - String allowTrailingStopValueAsString = allowTrailingStopValue.toString(); - valMap.put("allowTrailingStop", allowTrailingStopValueAsString); - } - Boolean cancelReplaceAllowedValue = getCancelReplaceAllowed(); - if (cancelReplaceAllowedValue != null) { - String cancelReplaceAllowedValueAsString = cancelReplaceAllowedValue.toString(); - valMap.put("cancelReplaceAllowed", cancelReplaceAllowedValueAsString); - } - Boolean amendAllowedValue = getAmendAllowed(); - if (amendAllowedValue != null) { - String amendAllowedValueAsString = amendAllowedValue.toString(); - valMap.put("amendAllowed", amendAllowedValueAsString); - } - Boolean pegInstructionsAllowedValue = getPegInstructionsAllowed(); - if (pegInstructionsAllowedValue != null) { - String pegInstructionsAllowedValueAsString = pegInstructionsAllowedValue.toString(); - valMap.put("pegInstructionsAllowed", pegInstructionsAllowedValueAsString); - } - Boolean isSpotTradingAllowedValue = getIsSpotTradingAllowed(); - if (isSpotTradingAllowedValue != null) { - String isSpotTradingAllowedValueAsString = isSpotTradingAllowedValue.toString(); - valMap.put("isSpotTradingAllowed", isSpotTradingAllowedValueAsString); - } - Boolean isMarginTradingAllowedValue = getIsMarginTradingAllowed(); - if (isMarginTradingAllowedValue != null) { - String isMarginTradingAllowedValueAsString = isMarginTradingAllowedValue.toString(); - valMap.put("isMarginTradingAllowed", isMarginTradingAllowedValueAsString); - } - List filtersValue = getFilters(); - if (filtersValue != null) { - String filtersValueAsString = JSON.getGson().toJson(filtersValue); - valMap.put("filters", filtersValueAsString); - } - List permissionsValue = getPermissions(); - if (permissionsValue != null) { - String permissionsValueAsString = permissionsValue.toString(); - valMap.put("permissions", permissionsValueAsString); - } - List> permissionSetsValue = getPermissionSets(); - if (permissionSetsValue != null) { - String permissionSetsValueAsString = JSON.getGson().toJson(permissionSetsValue); - valMap.put("permissionSets", permissionSetsValueAsString); - } - String defaultSelfTradePreventionModeValue = getDefaultSelfTradePreventionMode(); - if (defaultSelfTradePreventionModeValue != null) { - String defaultSelfTradePreventionModeValueAsString = - defaultSelfTradePreventionModeValue.toString(); - valMap.put( - "defaultSelfTradePreventionMode", defaultSelfTradePreventionModeValueAsString); - } - List allowedSelfTradePreventionModesValue = getAllowedSelfTradePreventionModes(); - if (allowedSelfTradePreventionModesValue != null) { - String allowedSelfTradePreventionModesValueAsString = - allowedSelfTradePreventionModesValue.toString(); - valMap.put( - "allowedSelfTradePreventionModes", - allowedSelfTradePreventionModesValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object symbolValue = getSymbol(); - if (symbolValue != null) { - valMap.put("symbol", symbolValue); - } - Object statusValue = getStatus(); - if (statusValue != null) { - valMap.put("status", statusValue); - } - Object baseAssetValue = getBaseAsset(); - if (baseAssetValue != null) { - valMap.put("baseAsset", baseAssetValue); - } - Object baseAssetPrecisionValue = getBaseAssetPrecision(); - if (baseAssetPrecisionValue != null) { - valMap.put("baseAssetPrecision", baseAssetPrecisionValue); - } - Object quoteAssetValue = getQuoteAsset(); - if (quoteAssetValue != null) { - valMap.put("quoteAsset", quoteAssetValue); - } - Object quotePrecisionValue = getQuotePrecision(); - if (quotePrecisionValue != null) { - valMap.put("quotePrecision", quotePrecisionValue); - } - Object quoteAssetPrecisionValue = getQuoteAssetPrecision(); - if (quoteAssetPrecisionValue != null) { - valMap.put("quoteAssetPrecision", quoteAssetPrecisionValue); - } - Object baseCommissionPrecisionValue = getBaseCommissionPrecision(); - if (baseCommissionPrecisionValue != null) { - valMap.put("baseCommissionPrecision", baseCommissionPrecisionValue); - } - Object quoteCommissionPrecisionValue = getQuoteCommissionPrecision(); - if (quoteCommissionPrecisionValue != null) { - valMap.put("quoteCommissionPrecision", quoteCommissionPrecisionValue); - } - Object orderTypesValue = getOrderTypes(); - if (orderTypesValue != null) { - valMap.put("orderTypes", orderTypesValue); - } - Object icebergAllowedValue = getIcebergAllowed(); - if (icebergAllowedValue != null) { - valMap.put("icebergAllowed", icebergAllowedValue); - } - Object ocoAllowedValue = getOcoAllowed(); - if (ocoAllowedValue != null) { - valMap.put("ocoAllowed", ocoAllowedValue); - } - Object otoAllowedValue = getOtoAllowed(); - if (otoAllowedValue != null) { - valMap.put("otoAllowed", otoAllowedValue); - } - Object opoAllowedValue = getOpoAllowed(); - if (opoAllowedValue != null) { - valMap.put("opoAllowed", opoAllowedValue); - } - Object quoteOrderQtyMarketAllowedValue = getQuoteOrderQtyMarketAllowed(); - if (quoteOrderQtyMarketAllowedValue != null) { - valMap.put("quoteOrderQtyMarketAllowed", quoteOrderQtyMarketAllowedValue); - } - Object allowTrailingStopValue = getAllowTrailingStop(); - if (allowTrailingStopValue != null) { - valMap.put("allowTrailingStop", allowTrailingStopValue); - } - Object cancelReplaceAllowedValue = getCancelReplaceAllowed(); - if (cancelReplaceAllowedValue != null) { - valMap.put("cancelReplaceAllowed", cancelReplaceAllowedValue); - } - Object amendAllowedValue = getAmendAllowed(); - if (amendAllowedValue != null) { - valMap.put("amendAllowed", amendAllowedValue); - } - Object pegInstructionsAllowedValue = getPegInstructionsAllowed(); - if (pegInstructionsAllowedValue != null) { - valMap.put("pegInstructionsAllowed", pegInstructionsAllowedValue); - } - Object isSpotTradingAllowedValue = getIsSpotTradingAllowed(); - if (isSpotTradingAllowedValue != null) { - valMap.put("isSpotTradingAllowed", isSpotTradingAllowedValue); - } - Object isMarginTradingAllowedValue = getIsMarginTradingAllowed(); - if (isMarginTradingAllowedValue != null) { - valMap.put("isMarginTradingAllowed", isMarginTradingAllowedValue); - } - Object filtersValue = getFilters(); - if (filtersValue != null) { - valMap.put("filters", filtersValue); - } - Object permissionsValue = getPermissions(); - if (permissionsValue != null) { - valMap.put("permissions", permissionsValue); - } - Object permissionSetsValue = getPermissionSets(); - if (permissionSetsValue != null) { - valMap.put("permissionSets", permissionSetsValue); - } - Object defaultSelfTradePreventionModeValue = getDefaultSelfTradePreventionMode(); - if (defaultSelfTradePreventionModeValue != null) { - valMap.put("defaultSelfTradePreventionMode", defaultSelfTradePreventionModeValue); - } - Object allowedSelfTradePreventionModesValue = getAllowedSelfTradePreventionModes(); - if (allowedSelfTradePreventionModesValue != null) { - valMap.put("allowedSelfTradePreventionModes", allowedSelfTradePreventionModesValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("symbol"); - openapiFields.add("status"); - openapiFields.add("baseAsset"); - openapiFields.add("baseAssetPrecision"); - openapiFields.add("quoteAsset"); - openapiFields.add("quotePrecision"); - openapiFields.add("quoteAssetPrecision"); - openapiFields.add("baseCommissionPrecision"); - openapiFields.add("quoteCommissionPrecision"); - openapiFields.add("orderTypes"); - openapiFields.add("icebergAllowed"); - openapiFields.add("ocoAllowed"); - openapiFields.add("otoAllowed"); - openapiFields.add("opoAllowed"); - openapiFields.add("quoteOrderQtyMarketAllowed"); - openapiFields.add("allowTrailingStop"); - openapiFields.add("cancelReplaceAllowed"); - openapiFields.add("amendAllowed"); - openapiFields.add("pegInstructionsAllowed"); - openapiFields.add("isSpotTradingAllowed"); - openapiFields.add("isMarginTradingAllowed"); - openapiFields.add("filters"); - openapiFields.add("permissions"); - openapiFields.add("permissionSets"); - openapiFields.add("defaultSelfTradePreventionMode"); - openapiFields.add("allowedSelfTradePreventionModes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ExchangeInfoResponseResultSymbolsInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExchangeInfoResponseResultSymbolsInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ExchangeInfoResponseResultSymbolsInner" - + " is not found in the empty JSON string", - ExchangeInfoResponseResultSymbolsInner.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExchangeInfoResponseResultSymbolsInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ExchangeInfoResponseResultSymbolsInner` properties. JSON:" - + " %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) - && !jsonObj.get("symbol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `symbol` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("symbol").toString())); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) - && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `status` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("status").toString())); - } - if ((jsonObj.get("baseAsset") != null && !jsonObj.get("baseAsset").isJsonNull()) - && !jsonObj.get("baseAsset").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `baseAsset` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("baseAsset").toString())); - } - if ((jsonObj.get("quoteAsset") != null && !jsonObj.get("quoteAsset").isJsonNull()) - && !jsonObj.get("quoteAsset").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `quoteAsset` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("quoteAsset").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("orderTypes") != null - && !jsonObj.get("orderTypes").isJsonNull() - && !jsonObj.get("orderTypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `orderTypes` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("orderTypes").toString())); - } - if (jsonObj.get("filters") != null && !jsonObj.get("filters").isJsonNull()) { - JsonArray jsonArrayfilters = jsonObj.getAsJsonArray("filters"); - if (jsonArrayfilters != null) { - // ensure the json data is an array - if (!jsonObj.get("filters").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filters` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("filters").toString())); - } - - // validate the optional field `filters` (array) - for (int i = 0; i < jsonArrayfilters.size(); i++) { - SymbolFilters.validateJsonElement(jsonArrayfilters.get(i)); - } - ; - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("permissions") != null - && !jsonObj.get("permissions").isJsonNull() - && !jsonObj.get("permissions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `permissions` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("permissions").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("permissionSets") != null - && !jsonObj.get("permissionSets").isJsonNull() - && !jsonObj.get("permissionSets").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `permissionSets` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("permissionSets").toString())); - } - if ((jsonObj.get("defaultSelfTradePreventionMode") != null - && !jsonObj.get("defaultSelfTradePreventionMode").isJsonNull()) - && !jsonObj.get("defaultSelfTradePreventionMode").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `defaultSelfTradePreventionMode` to be a primitive" - + " type in the JSON string but got `%s`", - jsonObj.get("defaultSelfTradePreventionMode").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("allowedSelfTradePreventionModes") != null - && !jsonObj.get("allowedSelfTradePreventionModes").isJsonNull() - && !jsonObj.get("allowedSelfTradePreventionModes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `allowedSelfTradePreventionModes` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("allowedSelfTradePreventionModes").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExchangeInfoResponseResultSymbolsInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExchangeInfoResponseResultSymbolsInner' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ExchangeInfoResponseResultSymbolsInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, ExchangeInfoResponseResultSymbolsInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExchangeInfoResponseResultSymbolsInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ExchangeInfoResponseResultSymbolsInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExchangeInfoResponseResultSymbolsInner - * @throws IOException if the JSON string is invalid with respect to - * ExchangeInfoResponseResultSymbolsInner - */ - public static ExchangeInfoResponseResultSymbolsInner fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, ExchangeInfoResponseResultSymbolsInner.class); - } - - /** - * Convert an instance of ExchangeInfoResponseResultSymbolsInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseSorsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseSorsInner.java new file mode 100644 index 000000000..7ee53886a --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseSorsInner.java @@ -0,0 +1,304 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ExchangeInfoResponseSorsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ExchangeInfoResponseSorsInner extends BaseDTO { + public static final String SERIALIZED_NAME_BASE_ASSET = "baseAsset"; + + @SerializedName(SERIALIZED_NAME_BASE_ASSET) + @jakarta.annotation.Nullable + private String baseAsset; + + public static final String SERIALIZED_NAME_SYMBOLS = "symbols"; + + @SerializedName(SERIALIZED_NAME_SYMBOLS) + @jakarta.annotation.Nullable + private List symbols; + + public ExchangeInfoResponseSorsInner() {} + + public ExchangeInfoResponseSorsInner baseAsset(@jakarta.annotation.Nullable String baseAsset) { + this.baseAsset = baseAsset; + return this; + } + + /** + * Get baseAsset + * + * @return baseAsset + */ + @jakarta.annotation.Nullable + public String getBaseAsset() { + return baseAsset; + } + + public void setBaseAsset(@jakarta.annotation.Nullable String baseAsset) { + this.baseAsset = baseAsset; + } + + public ExchangeInfoResponseSorsInner symbols( + @jakarta.annotation.Nullable List symbols) { + this.symbols = symbols; + return this; + } + + public ExchangeInfoResponseSorsInner addSymbolsItem(String symbolsItem) { + if (this.symbols == null) { + this.symbols = new ArrayList<>(); + } + this.symbols.add(symbolsItem); + return this; + } + + /** + * Get symbols + * + * @return symbols + */ + @jakarta.annotation.Nullable + public List getSymbols() { + return symbols; + } + + public void setSymbols(@jakarta.annotation.Nullable List symbols) { + this.symbols = symbols; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExchangeInfoResponseSorsInner exchangeInfoResponseSorsInner = + (ExchangeInfoResponseSorsInner) o; + return Objects.equals(this.baseAsset, exchangeInfoResponseSorsInner.baseAsset) + && Objects.equals(this.symbols, exchangeInfoResponseSorsInner.symbols); + } + + @Override + public int hashCode() { + return Objects.hash(baseAsset, symbols); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExchangeInfoResponseSorsInner {\n"); + sb.append(" baseAsset: ").append(toIndentedString(baseAsset)).append("\n"); + sb.append(" symbols: ").append(toIndentedString(symbols)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String baseAssetValue = getBaseAsset(); + if (baseAssetValue != null) { + String baseAssetValueAsString = baseAssetValue.toString(); + valMap.put("baseAsset", baseAssetValueAsString); + } + List symbolsValue = getSymbols(); + if (symbolsValue != null) { + String symbolsValueAsString = symbolsValue.toString(); + valMap.put("symbols", symbolsValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object baseAssetValue = getBaseAsset(); + if (baseAssetValue != null) { + valMap.put("baseAsset", baseAssetValue); + } + Object symbolsValue = getSymbols(); + if (symbolsValue != null) { + valMap.put("symbols", symbolsValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("baseAsset"); + openapiFields.add("symbols"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ExchangeInfoResponseSorsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExchangeInfoResponseSorsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ExchangeInfoResponseSorsInner is not" + + " found in the empty JSON string", + ExchangeInfoResponseSorsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExchangeInfoResponseSorsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ExchangeInfoResponseSorsInner` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("baseAsset") != null && !jsonObj.get("baseAsset").isJsonNull()) + && !jsonObj.get("baseAsset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `baseAsset` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("baseAsset").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("symbols") != null + && !jsonObj.get("symbols").isJsonNull() + && !jsonObj.get("symbols").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbols` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("symbols").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExchangeInfoResponseSorsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExchangeInfoResponseSorsInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ExchangeInfoResponseSorsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ExchangeInfoResponseSorsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExchangeInfoResponseSorsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ExchangeInfoResponseSorsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExchangeInfoResponseSorsInner + * @throws IOException if the JSON string is invalid with respect to + * ExchangeInfoResponseSorsInner + */ + public static ExchangeInfoResponseSorsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExchangeInfoResponseSorsInner.class); + } + + /** + * Convert an instance of ExchangeInfoResponseSorsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseSymbolsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseSymbolsInner.java new file mode 100644 index 000000000..e88907169 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseSymbolsInner.java @@ -0,0 +1,1426 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ExchangeInfoResponseSymbolsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ExchangeInfoResponseSymbolsInner extends BaseDTO { + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @jakarta.annotation.Nullable + private String status; + + public static final String SERIALIZED_NAME_BASE_ASSET = "baseAsset"; + + @SerializedName(SERIALIZED_NAME_BASE_ASSET) + @jakarta.annotation.Nullable + private String baseAsset; + + public static final String SERIALIZED_NAME_BASE_ASSET_PRECISION = "baseAssetPrecision"; + + @SerializedName(SERIALIZED_NAME_BASE_ASSET_PRECISION) + @jakarta.annotation.Nullable + private Long baseAssetPrecision; + + public static final String SERIALIZED_NAME_QUOTE_ASSET = "quoteAsset"; + + @SerializedName(SERIALIZED_NAME_QUOTE_ASSET) + @jakarta.annotation.Nullable + private String quoteAsset; + + public static final String SERIALIZED_NAME_QUOTE_PRECISION = "quotePrecision"; + + @SerializedName(SERIALIZED_NAME_QUOTE_PRECISION) + @jakarta.annotation.Nullable + private Long quotePrecision; + + public static final String SERIALIZED_NAME_QUOTE_ASSET_PRECISION = "quoteAssetPrecision"; + + @SerializedName(SERIALIZED_NAME_QUOTE_ASSET_PRECISION) + @jakarta.annotation.Nullable + private Long quoteAssetPrecision; + + public static final String SERIALIZED_NAME_BASE_COMMISSION_PRECISION = + "baseCommissionPrecision"; + + @SerializedName(SERIALIZED_NAME_BASE_COMMISSION_PRECISION) + @jakarta.annotation.Nullable + private Long baseCommissionPrecision; + + public static final String SERIALIZED_NAME_QUOTE_COMMISSION_PRECISION = + "quoteCommissionPrecision"; + + @SerializedName(SERIALIZED_NAME_QUOTE_COMMISSION_PRECISION) + @jakarta.annotation.Nullable + private Long quoteCommissionPrecision; + + public static final String SERIALIZED_NAME_ORDER_TYPES = "orderTypes"; + + @SerializedName(SERIALIZED_NAME_ORDER_TYPES) + @jakarta.annotation.Nullable + private List orderTypes; + + public static final String SERIALIZED_NAME_ICEBERG_ALLOWED = "icebergAllowed"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_ALLOWED) + @jakarta.annotation.Nullable + private Boolean icebergAllowed; + + public static final String SERIALIZED_NAME_OCO_ALLOWED = "ocoAllowed"; + + @SerializedName(SERIALIZED_NAME_OCO_ALLOWED) + @jakarta.annotation.Nullable + private Boolean ocoAllowed; + + public static final String SERIALIZED_NAME_OTO_ALLOWED = "otoAllowed"; + + @SerializedName(SERIALIZED_NAME_OTO_ALLOWED) + @jakarta.annotation.Nullable + private Boolean otoAllowed; + + public static final String SERIALIZED_NAME_OPO_ALLOWED = "opoAllowed"; + + @SerializedName(SERIALIZED_NAME_OPO_ALLOWED) + @jakarta.annotation.Nullable + private Boolean opoAllowed; + + public static final String SERIALIZED_NAME_QUOTE_ORDER_QTY_MARKET_ALLOWED = + "quoteOrderQtyMarketAllowed"; + + @SerializedName(SERIALIZED_NAME_QUOTE_ORDER_QTY_MARKET_ALLOWED) + @jakarta.annotation.Nullable + private Boolean quoteOrderQtyMarketAllowed; + + public static final String SERIALIZED_NAME_ALLOW_TRAILING_STOP = "allowTrailingStop"; + + @SerializedName(SERIALIZED_NAME_ALLOW_TRAILING_STOP) + @jakarta.annotation.Nullable + private Boolean allowTrailingStop; + + public static final String SERIALIZED_NAME_CANCEL_REPLACE_ALLOWED = "cancelReplaceAllowed"; + + @SerializedName(SERIALIZED_NAME_CANCEL_REPLACE_ALLOWED) + @jakarta.annotation.Nullable + private Boolean cancelReplaceAllowed; + + public static final String SERIALIZED_NAME_AMEND_ALLOWED = "amendAllowed"; + + @SerializedName(SERIALIZED_NAME_AMEND_ALLOWED) + @jakarta.annotation.Nullable + private Boolean amendAllowed; + + public static final String SERIALIZED_NAME_PEG_INSTRUCTIONS_ALLOWED = "pegInstructionsAllowed"; + + @SerializedName(SERIALIZED_NAME_PEG_INSTRUCTIONS_ALLOWED) + @jakarta.annotation.Nullable + private Boolean pegInstructionsAllowed; + + public static final String SERIALIZED_NAME_IS_SPOT_TRADING_ALLOWED = "isSpotTradingAllowed"; + + @SerializedName(SERIALIZED_NAME_IS_SPOT_TRADING_ALLOWED) + @jakarta.annotation.Nullable + private Boolean isSpotTradingAllowed; + + public static final String SERIALIZED_NAME_IS_MARGIN_TRADING_ALLOWED = "isMarginTradingAllowed"; + + @SerializedName(SERIALIZED_NAME_IS_MARGIN_TRADING_ALLOWED) + @jakarta.annotation.Nullable + private Boolean isMarginTradingAllowed; + + public static final String SERIALIZED_NAME_FILTERS = "filters"; + + @SerializedName(SERIALIZED_NAME_FILTERS) + @jakarta.annotation.Nullable + private List filters; + + public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; + + @SerializedName(SERIALIZED_NAME_PERMISSIONS) + @jakarta.annotation.Nullable + private List permissions; + + public static final String SERIALIZED_NAME_PERMISSION_SETS = "permissionSets"; + + @SerializedName(SERIALIZED_NAME_PERMISSION_SETS) + @jakarta.annotation.Nullable + private List> permissionSets; + + public static final String SERIALIZED_NAME_DEFAULT_SELF_TRADE_PREVENTION_MODE = + "defaultSelfTradePreventionMode"; + + @SerializedName(SERIALIZED_NAME_DEFAULT_SELF_TRADE_PREVENTION_MODE) + @jakarta.annotation.Nullable + private String defaultSelfTradePreventionMode; + + public static final String SERIALIZED_NAME_ALLOWED_SELF_TRADE_PREVENTION_MODES = + "allowedSelfTradePreventionModes"; + + @SerializedName(SERIALIZED_NAME_ALLOWED_SELF_TRADE_PREVENTION_MODES) + @jakarta.annotation.Nullable + private List allowedSelfTradePreventionModes; + + public ExchangeInfoResponseSymbolsInner() {} + + public ExchangeInfoResponseSymbolsInner symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Get symbol + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public ExchangeInfoResponseSymbolsInner status(@jakarta.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(@jakarta.annotation.Nullable String status) { + this.status = status; + } + + public ExchangeInfoResponseSymbolsInner baseAsset( + @jakarta.annotation.Nullable String baseAsset) { + this.baseAsset = baseAsset; + return this; + } + + /** + * Get baseAsset + * + * @return baseAsset + */ + @jakarta.annotation.Nullable + public String getBaseAsset() { + return baseAsset; + } + + public void setBaseAsset(@jakarta.annotation.Nullable String baseAsset) { + this.baseAsset = baseAsset; + } + + public ExchangeInfoResponseSymbolsInner baseAssetPrecision( + @jakarta.annotation.Nullable Long baseAssetPrecision) { + this.baseAssetPrecision = baseAssetPrecision; + return this; + } + + /** + * Get baseAssetPrecision + * + * @return baseAssetPrecision + */ + @jakarta.annotation.Nullable + public Long getBaseAssetPrecision() { + return baseAssetPrecision; + } + + public void setBaseAssetPrecision(@jakarta.annotation.Nullable Long baseAssetPrecision) { + this.baseAssetPrecision = baseAssetPrecision; + } + + public ExchangeInfoResponseSymbolsInner quoteAsset( + @jakarta.annotation.Nullable String quoteAsset) { + this.quoteAsset = quoteAsset; + return this; + } + + /** + * Get quoteAsset + * + * @return quoteAsset + */ + @jakarta.annotation.Nullable + public String getQuoteAsset() { + return quoteAsset; + } + + public void setQuoteAsset(@jakarta.annotation.Nullable String quoteAsset) { + this.quoteAsset = quoteAsset; + } + + public ExchangeInfoResponseSymbolsInner quotePrecision( + @jakarta.annotation.Nullable Long quotePrecision) { + this.quotePrecision = quotePrecision; + return this; + } + + /** + * Get quotePrecision + * + * @return quotePrecision + */ + @jakarta.annotation.Nullable + public Long getQuotePrecision() { + return quotePrecision; + } + + public void setQuotePrecision(@jakarta.annotation.Nullable Long quotePrecision) { + this.quotePrecision = quotePrecision; + } + + public ExchangeInfoResponseSymbolsInner quoteAssetPrecision( + @jakarta.annotation.Nullable Long quoteAssetPrecision) { + this.quoteAssetPrecision = quoteAssetPrecision; + return this; + } + + /** + * Get quoteAssetPrecision + * + * @return quoteAssetPrecision + */ + @jakarta.annotation.Nullable + public Long getQuoteAssetPrecision() { + return quoteAssetPrecision; + } + + public void setQuoteAssetPrecision(@jakarta.annotation.Nullable Long quoteAssetPrecision) { + this.quoteAssetPrecision = quoteAssetPrecision; + } + + public ExchangeInfoResponseSymbolsInner baseCommissionPrecision( + @jakarta.annotation.Nullable Long baseCommissionPrecision) { + this.baseCommissionPrecision = baseCommissionPrecision; + return this; + } + + /** + * Get baseCommissionPrecision + * + * @return baseCommissionPrecision + */ + @jakarta.annotation.Nullable + public Long getBaseCommissionPrecision() { + return baseCommissionPrecision; + } + + public void setBaseCommissionPrecision( + @jakarta.annotation.Nullable Long baseCommissionPrecision) { + this.baseCommissionPrecision = baseCommissionPrecision; + } + + public ExchangeInfoResponseSymbolsInner quoteCommissionPrecision( + @jakarta.annotation.Nullable Long quoteCommissionPrecision) { + this.quoteCommissionPrecision = quoteCommissionPrecision; + return this; + } + + /** + * Get quoteCommissionPrecision + * + * @return quoteCommissionPrecision + */ + @jakarta.annotation.Nullable + public Long getQuoteCommissionPrecision() { + return quoteCommissionPrecision; + } + + public void setQuoteCommissionPrecision( + @jakarta.annotation.Nullable Long quoteCommissionPrecision) { + this.quoteCommissionPrecision = quoteCommissionPrecision; + } + + public ExchangeInfoResponseSymbolsInner orderTypes( + @jakarta.annotation.Nullable List orderTypes) { + this.orderTypes = orderTypes; + return this; + } + + public ExchangeInfoResponseSymbolsInner addOrderTypesItem(String orderTypesItem) { + if (this.orderTypes == null) { + this.orderTypes = new ArrayList<>(); + } + this.orderTypes.add(orderTypesItem); + return this; + } + + /** + * Get orderTypes + * + * @return orderTypes + */ + @jakarta.annotation.Nullable + public List getOrderTypes() { + return orderTypes; + } + + public void setOrderTypes(@jakarta.annotation.Nullable List orderTypes) { + this.orderTypes = orderTypes; + } + + public ExchangeInfoResponseSymbolsInner icebergAllowed( + @jakarta.annotation.Nullable Boolean icebergAllowed) { + this.icebergAllowed = icebergAllowed; + return this; + } + + /** + * Get icebergAllowed + * + * @return icebergAllowed + */ + @jakarta.annotation.Nullable + public Boolean getIcebergAllowed() { + return icebergAllowed; + } + + public void setIcebergAllowed(@jakarta.annotation.Nullable Boolean icebergAllowed) { + this.icebergAllowed = icebergAllowed; + } + + public ExchangeInfoResponseSymbolsInner ocoAllowed( + @jakarta.annotation.Nullable Boolean ocoAllowed) { + this.ocoAllowed = ocoAllowed; + return this; + } + + /** + * Get ocoAllowed + * + * @return ocoAllowed + */ + @jakarta.annotation.Nullable + public Boolean getOcoAllowed() { + return ocoAllowed; + } + + public void setOcoAllowed(@jakarta.annotation.Nullable Boolean ocoAllowed) { + this.ocoAllowed = ocoAllowed; + } + + public ExchangeInfoResponseSymbolsInner otoAllowed( + @jakarta.annotation.Nullable Boolean otoAllowed) { + this.otoAllowed = otoAllowed; + return this; + } + + /** + * Get otoAllowed + * + * @return otoAllowed + */ + @jakarta.annotation.Nullable + public Boolean getOtoAllowed() { + return otoAllowed; + } + + public void setOtoAllowed(@jakarta.annotation.Nullable Boolean otoAllowed) { + this.otoAllowed = otoAllowed; + } + + public ExchangeInfoResponseSymbolsInner opoAllowed( + @jakarta.annotation.Nullable Boolean opoAllowed) { + this.opoAllowed = opoAllowed; + return this; + } + + /** + * Get opoAllowed + * + * @return opoAllowed + */ + @jakarta.annotation.Nullable + public Boolean getOpoAllowed() { + return opoAllowed; + } + + public void setOpoAllowed(@jakarta.annotation.Nullable Boolean opoAllowed) { + this.opoAllowed = opoAllowed; + } + + public ExchangeInfoResponseSymbolsInner quoteOrderQtyMarketAllowed( + @jakarta.annotation.Nullable Boolean quoteOrderQtyMarketAllowed) { + this.quoteOrderQtyMarketAllowed = quoteOrderQtyMarketAllowed; + return this; + } + + /** + * Get quoteOrderQtyMarketAllowed + * + * @return quoteOrderQtyMarketAllowed + */ + @jakarta.annotation.Nullable + public Boolean getQuoteOrderQtyMarketAllowed() { + return quoteOrderQtyMarketAllowed; + } + + public void setQuoteOrderQtyMarketAllowed( + @jakarta.annotation.Nullable Boolean quoteOrderQtyMarketAllowed) { + this.quoteOrderQtyMarketAllowed = quoteOrderQtyMarketAllowed; + } + + public ExchangeInfoResponseSymbolsInner allowTrailingStop( + @jakarta.annotation.Nullable Boolean allowTrailingStop) { + this.allowTrailingStop = allowTrailingStop; + return this; + } + + /** + * Get allowTrailingStop + * + * @return allowTrailingStop + */ + @jakarta.annotation.Nullable + public Boolean getAllowTrailingStop() { + return allowTrailingStop; + } + + public void setAllowTrailingStop(@jakarta.annotation.Nullable Boolean allowTrailingStop) { + this.allowTrailingStop = allowTrailingStop; + } + + public ExchangeInfoResponseSymbolsInner cancelReplaceAllowed( + @jakarta.annotation.Nullable Boolean cancelReplaceAllowed) { + this.cancelReplaceAllowed = cancelReplaceAllowed; + return this; + } + + /** + * Get cancelReplaceAllowed + * + * @return cancelReplaceAllowed + */ + @jakarta.annotation.Nullable + public Boolean getCancelReplaceAllowed() { + return cancelReplaceAllowed; + } + + public void setCancelReplaceAllowed(@jakarta.annotation.Nullable Boolean cancelReplaceAllowed) { + this.cancelReplaceAllowed = cancelReplaceAllowed; + } + + public ExchangeInfoResponseSymbolsInner amendAllowed( + @jakarta.annotation.Nullable Boolean amendAllowed) { + this.amendAllowed = amendAllowed; + return this; + } + + /** + * Get amendAllowed + * + * @return amendAllowed + */ + @jakarta.annotation.Nullable + public Boolean getAmendAllowed() { + return amendAllowed; + } + + public void setAmendAllowed(@jakarta.annotation.Nullable Boolean amendAllowed) { + this.amendAllowed = amendAllowed; + } + + public ExchangeInfoResponseSymbolsInner pegInstructionsAllowed( + @jakarta.annotation.Nullable Boolean pegInstructionsAllowed) { + this.pegInstructionsAllowed = pegInstructionsAllowed; + return this; + } + + /** + * Get pegInstructionsAllowed + * + * @return pegInstructionsAllowed + */ + @jakarta.annotation.Nullable + public Boolean getPegInstructionsAllowed() { + return pegInstructionsAllowed; + } + + public void setPegInstructionsAllowed( + @jakarta.annotation.Nullable Boolean pegInstructionsAllowed) { + this.pegInstructionsAllowed = pegInstructionsAllowed; + } + + public ExchangeInfoResponseSymbolsInner isSpotTradingAllowed( + @jakarta.annotation.Nullable Boolean isSpotTradingAllowed) { + this.isSpotTradingAllowed = isSpotTradingAllowed; + return this; + } + + /** + * Get isSpotTradingAllowed + * + * @return isSpotTradingAllowed + */ + @jakarta.annotation.Nullable + public Boolean getIsSpotTradingAllowed() { + return isSpotTradingAllowed; + } + + public void setIsSpotTradingAllowed(@jakarta.annotation.Nullable Boolean isSpotTradingAllowed) { + this.isSpotTradingAllowed = isSpotTradingAllowed; + } + + public ExchangeInfoResponseSymbolsInner isMarginTradingAllowed( + @jakarta.annotation.Nullable Boolean isMarginTradingAllowed) { + this.isMarginTradingAllowed = isMarginTradingAllowed; + return this; + } + + /** + * Get isMarginTradingAllowed + * + * @return isMarginTradingAllowed + */ + @jakarta.annotation.Nullable + public Boolean getIsMarginTradingAllowed() { + return isMarginTradingAllowed; + } + + public void setIsMarginTradingAllowed( + @jakarta.annotation.Nullable Boolean isMarginTradingAllowed) { + this.isMarginTradingAllowed = isMarginTradingAllowed; + } + + public ExchangeInfoResponseSymbolsInner filters( + @jakarta.annotation.Nullable List filters) { + this.filters = filters; + return this; + } + + public ExchangeInfoResponseSymbolsInner addFiltersItem(SymbolFilters filtersItem) { + if (this.filters == null) { + this.filters = new ArrayList<>(); + } + this.filters.add(filtersItem); + return this; + } + + /** + * Get filters + * + * @return filters + */ + @jakarta.annotation.Nullable + @Valid + public List getFilters() { + return filters; + } + + public void setFilters(@jakarta.annotation.Nullable List filters) { + this.filters = filters; + } + + public ExchangeInfoResponseSymbolsInner permissions( + @jakarta.annotation.Nullable List permissions) { + this.permissions = permissions; + return this; + } + + public ExchangeInfoResponseSymbolsInner addPermissionsItem(String permissionsItem) { + if (this.permissions == null) { + this.permissions = new ArrayList<>(); + } + this.permissions.add(permissionsItem); + return this; + } + + /** + * Get permissions + * + * @return permissions + */ + @jakarta.annotation.Nullable + public List getPermissions() { + return permissions; + } + + public void setPermissions(@jakarta.annotation.Nullable List permissions) { + this.permissions = permissions; + } + + public ExchangeInfoResponseSymbolsInner permissionSets( + @jakarta.annotation.Nullable List> permissionSets) { + this.permissionSets = permissionSets; + return this; + } + + public ExchangeInfoResponseSymbolsInner addPermissionSetsItem(List permissionSetsItem) { + if (this.permissionSets == null) { + this.permissionSets = new ArrayList<>(); + } + this.permissionSets.add(permissionSetsItem); + return this; + } + + /** + * Get permissionSets + * + * @return permissionSets + */ + @jakarta.annotation.Nullable + @Valid + public List> getPermissionSets() { + return permissionSets; + } + + public void setPermissionSets(@jakarta.annotation.Nullable List> permissionSets) { + this.permissionSets = permissionSets; + } + + public ExchangeInfoResponseSymbolsInner defaultSelfTradePreventionMode( + @jakarta.annotation.Nullable String defaultSelfTradePreventionMode) { + this.defaultSelfTradePreventionMode = defaultSelfTradePreventionMode; + return this; + } + + /** + * Get defaultSelfTradePreventionMode + * + * @return defaultSelfTradePreventionMode + */ + @jakarta.annotation.Nullable + public String getDefaultSelfTradePreventionMode() { + return defaultSelfTradePreventionMode; + } + + public void setDefaultSelfTradePreventionMode( + @jakarta.annotation.Nullable String defaultSelfTradePreventionMode) { + this.defaultSelfTradePreventionMode = defaultSelfTradePreventionMode; + } + + public ExchangeInfoResponseSymbolsInner allowedSelfTradePreventionModes( + @jakarta.annotation.Nullable List allowedSelfTradePreventionModes) { + this.allowedSelfTradePreventionModes = allowedSelfTradePreventionModes; + return this; + } + + public ExchangeInfoResponseSymbolsInner addAllowedSelfTradePreventionModesItem( + String allowedSelfTradePreventionModesItem) { + if (this.allowedSelfTradePreventionModes == null) { + this.allowedSelfTradePreventionModes = new ArrayList<>(); + } + this.allowedSelfTradePreventionModes.add(allowedSelfTradePreventionModesItem); + return this; + } + + /** + * Get allowedSelfTradePreventionModes + * + * @return allowedSelfTradePreventionModes + */ + @jakarta.annotation.Nullable + public List getAllowedSelfTradePreventionModes() { + return allowedSelfTradePreventionModes; + } + + public void setAllowedSelfTradePreventionModes( + @jakarta.annotation.Nullable List allowedSelfTradePreventionModes) { + this.allowedSelfTradePreventionModes = allowedSelfTradePreventionModes; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExchangeInfoResponseSymbolsInner exchangeInfoResponseSymbolsInner = + (ExchangeInfoResponseSymbolsInner) o; + return Objects.equals(this.symbol, exchangeInfoResponseSymbolsInner.symbol) + && Objects.equals(this.status, exchangeInfoResponseSymbolsInner.status) + && Objects.equals(this.baseAsset, exchangeInfoResponseSymbolsInner.baseAsset) + && Objects.equals( + this.baseAssetPrecision, + exchangeInfoResponseSymbolsInner.baseAssetPrecision) + && Objects.equals(this.quoteAsset, exchangeInfoResponseSymbolsInner.quoteAsset) + && Objects.equals( + this.quotePrecision, exchangeInfoResponseSymbolsInner.quotePrecision) + && Objects.equals( + this.quoteAssetPrecision, + exchangeInfoResponseSymbolsInner.quoteAssetPrecision) + && Objects.equals( + this.baseCommissionPrecision, + exchangeInfoResponseSymbolsInner.baseCommissionPrecision) + && Objects.equals( + this.quoteCommissionPrecision, + exchangeInfoResponseSymbolsInner.quoteCommissionPrecision) + && Objects.equals(this.orderTypes, exchangeInfoResponseSymbolsInner.orderTypes) + && Objects.equals( + this.icebergAllowed, exchangeInfoResponseSymbolsInner.icebergAllowed) + && Objects.equals(this.ocoAllowed, exchangeInfoResponseSymbolsInner.ocoAllowed) + && Objects.equals(this.otoAllowed, exchangeInfoResponseSymbolsInner.otoAllowed) + && Objects.equals(this.opoAllowed, exchangeInfoResponseSymbolsInner.opoAllowed) + && Objects.equals( + this.quoteOrderQtyMarketAllowed, + exchangeInfoResponseSymbolsInner.quoteOrderQtyMarketAllowed) + && Objects.equals( + this.allowTrailingStop, exchangeInfoResponseSymbolsInner.allowTrailingStop) + && Objects.equals( + this.cancelReplaceAllowed, + exchangeInfoResponseSymbolsInner.cancelReplaceAllowed) + && Objects.equals(this.amendAllowed, exchangeInfoResponseSymbolsInner.amendAllowed) + && Objects.equals( + this.pegInstructionsAllowed, + exchangeInfoResponseSymbolsInner.pegInstructionsAllowed) + && Objects.equals( + this.isSpotTradingAllowed, + exchangeInfoResponseSymbolsInner.isSpotTradingAllowed) + && Objects.equals( + this.isMarginTradingAllowed, + exchangeInfoResponseSymbolsInner.isMarginTradingAllowed) + && Objects.equals(this.filters, exchangeInfoResponseSymbolsInner.filters) + && Objects.equals(this.permissions, exchangeInfoResponseSymbolsInner.permissions) + && Objects.equals( + this.permissionSets, exchangeInfoResponseSymbolsInner.permissionSets) + && Objects.equals( + this.defaultSelfTradePreventionMode, + exchangeInfoResponseSymbolsInner.defaultSelfTradePreventionMode) + && Objects.equals( + this.allowedSelfTradePreventionModes, + exchangeInfoResponseSymbolsInner.allowedSelfTradePreventionModes); + } + + @Override + public int hashCode() { + return Objects.hash( + symbol, + status, + baseAsset, + baseAssetPrecision, + quoteAsset, + quotePrecision, + quoteAssetPrecision, + baseCommissionPrecision, + quoteCommissionPrecision, + orderTypes, + icebergAllowed, + ocoAllowed, + otoAllowed, + opoAllowed, + quoteOrderQtyMarketAllowed, + allowTrailingStop, + cancelReplaceAllowed, + amendAllowed, + pegInstructionsAllowed, + isSpotTradingAllowed, + isMarginTradingAllowed, + filters, + permissions, + permissionSets, + defaultSelfTradePreventionMode, + allowedSelfTradePreventionModes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExchangeInfoResponseSymbolsInner {\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" baseAsset: ").append(toIndentedString(baseAsset)).append("\n"); + sb.append(" baseAssetPrecision: ") + .append(toIndentedString(baseAssetPrecision)) + .append("\n"); + sb.append(" quoteAsset: ").append(toIndentedString(quoteAsset)).append("\n"); + sb.append(" quotePrecision: ").append(toIndentedString(quotePrecision)).append("\n"); + sb.append(" quoteAssetPrecision: ") + .append(toIndentedString(quoteAssetPrecision)) + .append("\n"); + sb.append(" baseCommissionPrecision: ") + .append(toIndentedString(baseCommissionPrecision)) + .append("\n"); + sb.append(" quoteCommissionPrecision: ") + .append(toIndentedString(quoteCommissionPrecision)) + .append("\n"); + sb.append(" orderTypes: ").append(toIndentedString(orderTypes)).append("\n"); + sb.append(" icebergAllowed: ").append(toIndentedString(icebergAllowed)).append("\n"); + sb.append(" ocoAllowed: ").append(toIndentedString(ocoAllowed)).append("\n"); + sb.append(" otoAllowed: ").append(toIndentedString(otoAllowed)).append("\n"); + sb.append(" opoAllowed: ").append(toIndentedString(opoAllowed)).append("\n"); + sb.append(" quoteOrderQtyMarketAllowed: ") + .append(toIndentedString(quoteOrderQtyMarketAllowed)) + .append("\n"); + sb.append(" allowTrailingStop: ").append(toIndentedString(allowTrailingStop)).append("\n"); + sb.append(" cancelReplaceAllowed: ") + .append(toIndentedString(cancelReplaceAllowed)) + .append("\n"); + sb.append(" amendAllowed: ").append(toIndentedString(amendAllowed)).append("\n"); + sb.append(" pegInstructionsAllowed: ") + .append(toIndentedString(pegInstructionsAllowed)) + .append("\n"); + sb.append(" isSpotTradingAllowed: ") + .append(toIndentedString(isSpotTradingAllowed)) + .append("\n"); + sb.append(" isMarginTradingAllowed: ") + .append(toIndentedString(isMarginTradingAllowed)) + .append("\n"); + sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append(" permissionSets: ").append(toIndentedString(permissionSets)).append("\n"); + sb.append(" defaultSelfTradePreventionMode: ") + .append(toIndentedString(defaultSelfTradePreventionMode)) + .append("\n"); + sb.append(" allowedSelfTradePreventionModes: ") + .append(toIndentedString(allowedSelfTradePreventionModes)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + String statusValue = getStatus(); + if (statusValue != null) { + String statusValueAsString = statusValue.toString(); + valMap.put("status", statusValueAsString); + } + String baseAssetValue = getBaseAsset(); + if (baseAssetValue != null) { + String baseAssetValueAsString = baseAssetValue.toString(); + valMap.put("baseAsset", baseAssetValueAsString); + } + Long baseAssetPrecisionValue = getBaseAssetPrecision(); + if (baseAssetPrecisionValue != null) { + String baseAssetPrecisionValueAsString = baseAssetPrecisionValue.toString(); + valMap.put("baseAssetPrecision", baseAssetPrecisionValueAsString); + } + String quoteAssetValue = getQuoteAsset(); + if (quoteAssetValue != null) { + String quoteAssetValueAsString = quoteAssetValue.toString(); + valMap.put("quoteAsset", quoteAssetValueAsString); + } + Long quotePrecisionValue = getQuotePrecision(); + if (quotePrecisionValue != null) { + String quotePrecisionValueAsString = quotePrecisionValue.toString(); + valMap.put("quotePrecision", quotePrecisionValueAsString); + } + Long quoteAssetPrecisionValue = getQuoteAssetPrecision(); + if (quoteAssetPrecisionValue != null) { + String quoteAssetPrecisionValueAsString = quoteAssetPrecisionValue.toString(); + valMap.put("quoteAssetPrecision", quoteAssetPrecisionValueAsString); + } + Long baseCommissionPrecisionValue = getBaseCommissionPrecision(); + if (baseCommissionPrecisionValue != null) { + String baseCommissionPrecisionValueAsString = baseCommissionPrecisionValue.toString(); + valMap.put("baseCommissionPrecision", baseCommissionPrecisionValueAsString); + } + Long quoteCommissionPrecisionValue = getQuoteCommissionPrecision(); + if (quoteCommissionPrecisionValue != null) { + String quoteCommissionPrecisionValueAsString = quoteCommissionPrecisionValue.toString(); + valMap.put("quoteCommissionPrecision", quoteCommissionPrecisionValueAsString); + } + List orderTypesValue = getOrderTypes(); + if (orderTypesValue != null) { + String orderTypesValueAsString = orderTypesValue.toString(); + valMap.put("orderTypes", orderTypesValueAsString); + } + Boolean icebergAllowedValue = getIcebergAllowed(); + if (icebergAllowedValue != null) { + String icebergAllowedValueAsString = icebergAllowedValue.toString(); + valMap.put("icebergAllowed", icebergAllowedValueAsString); + } + Boolean ocoAllowedValue = getOcoAllowed(); + if (ocoAllowedValue != null) { + String ocoAllowedValueAsString = ocoAllowedValue.toString(); + valMap.put("ocoAllowed", ocoAllowedValueAsString); + } + Boolean otoAllowedValue = getOtoAllowed(); + if (otoAllowedValue != null) { + String otoAllowedValueAsString = otoAllowedValue.toString(); + valMap.put("otoAllowed", otoAllowedValueAsString); + } + Boolean opoAllowedValue = getOpoAllowed(); + if (opoAllowedValue != null) { + String opoAllowedValueAsString = opoAllowedValue.toString(); + valMap.put("opoAllowed", opoAllowedValueAsString); + } + Boolean quoteOrderQtyMarketAllowedValue = getQuoteOrderQtyMarketAllowed(); + if (quoteOrderQtyMarketAllowedValue != null) { + String quoteOrderQtyMarketAllowedValueAsString = + quoteOrderQtyMarketAllowedValue.toString(); + valMap.put("quoteOrderQtyMarketAllowed", quoteOrderQtyMarketAllowedValueAsString); + } + Boolean allowTrailingStopValue = getAllowTrailingStop(); + if (allowTrailingStopValue != null) { + String allowTrailingStopValueAsString = allowTrailingStopValue.toString(); + valMap.put("allowTrailingStop", allowTrailingStopValueAsString); + } + Boolean cancelReplaceAllowedValue = getCancelReplaceAllowed(); + if (cancelReplaceAllowedValue != null) { + String cancelReplaceAllowedValueAsString = cancelReplaceAllowedValue.toString(); + valMap.put("cancelReplaceAllowed", cancelReplaceAllowedValueAsString); + } + Boolean amendAllowedValue = getAmendAllowed(); + if (amendAllowedValue != null) { + String amendAllowedValueAsString = amendAllowedValue.toString(); + valMap.put("amendAllowed", amendAllowedValueAsString); + } + Boolean pegInstructionsAllowedValue = getPegInstructionsAllowed(); + if (pegInstructionsAllowedValue != null) { + String pegInstructionsAllowedValueAsString = pegInstructionsAllowedValue.toString(); + valMap.put("pegInstructionsAllowed", pegInstructionsAllowedValueAsString); + } + Boolean isSpotTradingAllowedValue = getIsSpotTradingAllowed(); + if (isSpotTradingAllowedValue != null) { + String isSpotTradingAllowedValueAsString = isSpotTradingAllowedValue.toString(); + valMap.put("isSpotTradingAllowed", isSpotTradingAllowedValueAsString); + } + Boolean isMarginTradingAllowedValue = getIsMarginTradingAllowed(); + if (isMarginTradingAllowedValue != null) { + String isMarginTradingAllowedValueAsString = isMarginTradingAllowedValue.toString(); + valMap.put("isMarginTradingAllowed", isMarginTradingAllowedValueAsString); + } + List filtersValue = getFilters(); + if (filtersValue != null) { + String filtersValueAsString = JSON.getGson().toJson(filtersValue); + valMap.put("filters", filtersValueAsString); + } + List permissionsValue = getPermissions(); + if (permissionsValue != null) { + String permissionsValueAsString = permissionsValue.toString(); + valMap.put("permissions", permissionsValueAsString); + } + List> permissionSetsValue = getPermissionSets(); + if (permissionSetsValue != null) { + String permissionSetsValueAsString = JSON.getGson().toJson(permissionSetsValue); + valMap.put("permissionSets", permissionSetsValueAsString); + } + String defaultSelfTradePreventionModeValue = getDefaultSelfTradePreventionMode(); + if (defaultSelfTradePreventionModeValue != null) { + String defaultSelfTradePreventionModeValueAsString = + defaultSelfTradePreventionModeValue.toString(); + valMap.put( + "defaultSelfTradePreventionMode", defaultSelfTradePreventionModeValueAsString); + } + List allowedSelfTradePreventionModesValue = getAllowedSelfTradePreventionModes(); + if (allowedSelfTradePreventionModesValue != null) { + String allowedSelfTradePreventionModesValueAsString = + allowedSelfTradePreventionModesValue.toString(); + valMap.put( + "allowedSelfTradePreventionModes", + allowedSelfTradePreventionModesValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + Object statusValue = getStatus(); + if (statusValue != null) { + valMap.put("status", statusValue); + } + Object baseAssetValue = getBaseAsset(); + if (baseAssetValue != null) { + valMap.put("baseAsset", baseAssetValue); + } + Object baseAssetPrecisionValue = getBaseAssetPrecision(); + if (baseAssetPrecisionValue != null) { + valMap.put("baseAssetPrecision", baseAssetPrecisionValue); + } + Object quoteAssetValue = getQuoteAsset(); + if (quoteAssetValue != null) { + valMap.put("quoteAsset", quoteAssetValue); + } + Object quotePrecisionValue = getQuotePrecision(); + if (quotePrecisionValue != null) { + valMap.put("quotePrecision", quotePrecisionValue); + } + Object quoteAssetPrecisionValue = getQuoteAssetPrecision(); + if (quoteAssetPrecisionValue != null) { + valMap.put("quoteAssetPrecision", quoteAssetPrecisionValue); + } + Object baseCommissionPrecisionValue = getBaseCommissionPrecision(); + if (baseCommissionPrecisionValue != null) { + valMap.put("baseCommissionPrecision", baseCommissionPrecisionValue); + } + Object quoteCommissionPrecisionValue = getQuoteCommissionPrecision(); + if (quoteCommissionPrecisionValue != null) { + valMap.put("quoteCommissionPrecision", quoteCommissionPrecisionValue); + } + Object orderTypesValue = getOrderTypes(); + if (orderTypesValue != null) { + valMap.put("orderTypes", orderTypesValue); + } + Object icebergAllowedValue = getIcebergAllowed(); + if (icebergAllowedValue != null) { + valMap.put("icebergAllowed", icebergAllowedValue); + } + Object ocoAllowedValue = getOcoAllowed(); + if (ocoAllowedValue != null) { + valMap.put("ocoAllowed", ocoAllowedValue); + } + Object otoAllowedValue = getOtoAllowed(); + if (otoAllowedValue != null) { + valMap.put("otoAllowed", otoAllowedValue); + } + Object opoAllowedValue = getOpoAllowed(); + if (opoAllowedValue != null) { + valMap.put("opoAllowed", opoAllowedValue); + } + Object quoteOrderQtyMarketAllowedValue = getQuoteOrderQtyMarketAllowed(); + if (quoteOrderQtyMarketAllowedValue != null) { + valMap.put("quoteOrderQtyMarketAllowed", quoteOrderQtyMarketAllowedValue); + } + Object allowTrailingStopValue = getAllowTrailingStop(); + if (allowTrailingStopValue != null) { + valMap.put("allowTrailingStop", allowTrailingStopValue); + } + Object cancelReplaceAllowedValue = getCancelReplaceAllowed(); + if (cancelReplaceAllowedValue != null) { + valMap.put("cancelReplaceAllowed", cancelReplaceAllowedValue); + } + Object amendAllowedValue = getAmendAllowed(); + if (amendAllowedValue != null) { + valMap.put("amendAllowed", amendAllowedValue); + } + Object pegInstructionsAllowedValue = getPegInstructionsAllowed(); + if (pegInstructionsAllowedValue != null) { + valMap.put("pegInstructionsAllowed", pegInstructionsAllowedValue); + } + Object isSpotTradingAllowedValue = getIsSpotTradingAllowed(); + if (isSpotTradingAllowedValue != null) { + valMap.put("isSpotTradingAllowed", isSpotTradingAllowedValue); + } + Object isMarginTradingAllowedValue = getIsMarginTradingAllowed(); + if (isMarginTradingAllowedValue != null) { + valMap.put("isMarginTradingAllowed", isMarginTradingAllowedValue); + } + Object filtersValue = getFilters(); + if (filtersValue != null) { + valMap.put("filters", filtersValue); + } + Object permissionsValue = getPermissions(); + if (permissionsValue != null) { + valMap.put("permissions", permissionsValue); + } + Object permissionSetsValue = getPermissionSets(); + if (permissionSetsValue != null) { + valMap.put("permissionSets", permissionSetsValue); + } + Object defaultSelfTradePreventionModeValue = getDefaultSelfTradePreventionMode(); + if (defaultSelfTradePreventionModeValue != null) { + valMap.put("defaultSelfTradePreventionMode", defaultSelfTradePreventionModeValue); + } + Object allowedSelfTradePreventionModesValue = getAllowedSelfTradePreventionModes(); + if (allowedSelfTradePreventionModesValue != null) { + valMap.put("allowedSelfTradePreventionModes", allowedSelfTradePreventionModesValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("symbol"); + openapiFields.add("status"); + openapiFields.add("baseAsset"); + openapiFields.add("baseAssetPrecision"); + openapiFields.add("quoteAsset"); + openapiFields.add("quotePrecision"); + openapiFields.add("quoteAssetPrecision"); + openapiFields.add("baseCommissionPrecision"); + openapiFields.add("quoteCommissionPrecision"); + openapiFields.add("orderTypes"); + openapiFields.add("icebergAllowed"); + openapiFields.add("ocoAllowed"); + openapiFields.add("otoAllowed"); + openapiFields.add("opoAllowed"); + openapiFields.add("quoteOrderQtyMarketAllowed"); + openapiFields.add("allowTrailingStop"); + openapiFields.add("cancelReplaceAllowed"); + openapiFields.add("amendAllowed"); + openapiFields.add("pegInstructionsAllowed"); + openapiFields.add("isSpotTradingAllowed"); + openapiFields.add("isMarginTradingAllowed"); + openapiFields.add("filters"); + openapiFields.add("permissions"); + openapiFields.add("permissionSets"); + openapiFields.add("defaultSelfTradePreventionMode"); + openapiFields.add("allowedSelfTradePreventionModes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ExchangeInfoResponseSymbolsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExchangeInfoResponseSymbolsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ExchangeInfoResponseSymbolsInner is" + + " not found in the empty JSON string", + ExchangeInfoResponseSymbolsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExchangeInfoResponseSymbolsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ExchangeInfoResponseSymbolsInner` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) + && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("status").toString())); + } + if ((jsonObj.get("baseAsset") != null && !jsonObj.get("baseAsset").isJsonNull()) + && !jsonObj.get("baseAsset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `baseAsset` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("baseAsset").toString())); + } + if ((jsonObj.get("quoteAsset") != null && !jsonObj.get("quoteAsset").isJsonNull()) + && !jsonObj.get("quoteAsset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `quoteAsset` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("quoteAsset").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("orderTypes") != null + && !jsonObj.get("orderTypes").isJsonNull() + && !jsonObj.get("orderTypes").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `orderTypes` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("orderTypes").toString())); + } + if (jsonObj.get("filters") != null && !jsonObj.get("filters").isJsonNull()) { + JsonArray jsonArrayfilters = jsonObj.getAsJsonArray("filters"); + if (jsonArrayfilters != null) { + // ensure the json data is an array + if (!jsonObj.get("filters").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `filters` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("filters").toString())); + } + + // validate the optional field `filters` (array) + for (int i = 0; i < jsonArrayfilters.size(); i++) { + SymbolFilters.validateJsonElement(jsonArrayfilters.get(i)); + } + ; + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("permissions") != null + && !jsonObj.get("permissions").isJsonNull() + && !jsonObj.get("permissions").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `permissions` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("permissions").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("permissionSets") != null + && !jsonObj.get("permissionSets").isJsonNull() + && !jsonObj.get("permissionSets").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `permissionSets` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("permissionSets").toString())); + } + if ((jsonObj.get("defaultSelfTradePreventionMode") != null + && !jsonObj.get("defaultSelfTradePreventionMode").isJsonNull()) + && !jsonObj.get("defaultSelfTradePreventionMode").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `defaultSelfTradePreventionMode` to be a primitive" + + " type in the JSON string but got `%s`", + jsonObj.get("defaultSelfTradePreventionMode").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("allowedSelfTradePreventionModes") != null + && !jsonObj.get("allowedSelfTradePreventionModes").isJsonNull() + && !jsonObj.get("allowedSelfTradePreventionModes").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `allowedSelfTradePreventionModes` to be an array in" + + " the JSON string but got `%s`", + jsonObj.get("allowedSelfTradePreventionModes").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExchangeInfoResponseSymbolsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExchangeInfoResponseSymbolsInner' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ExchangeInfoResponseSymbolsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ExchangeInfoResponseSymbolsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExchangeInfoResponseSymbolsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ExchangeInfoResponseSymbolsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExchangeInfoResponseSymbolsInner + * @throws IOException if the JSON string is invalid with respect to + * ExchangeInfoResponseSymbolsInner + */ + public static ExchangeInfoResponseSymbolsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExchangeInfoResponseSymbolsInner.class); + } + + /** + * Convert an instance of ExchangeInfoResponseSymbolsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeMaxNumAlgoOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeMaxNumAlgoOrdersFilter.java index 0e2e367e1..317cc7974 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeMaxNumAlgoOrdersFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeMaxNumAlgoOrdersFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** ExchangeMaxNumAlgoOrdersFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeMaxNumAlgoOrdersFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeMaxNumIcebergOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeMaxNumIcebergOrdersFilter.java index bb26391db..264ab45f5 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeMaxNumIcebergOrdersFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeMaxNumIcebergOrdersFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** ExchangeMaxNumIcebergOrdersFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeMaxNumIcebergOrdersFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeMaxNumOrderListsFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeMaxNumOrderListsFilter.java index 99ccf0d1d..26c3336c6 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeMaxNumOrderListsFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeMaxNumOrderListsFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** ExchangeMaxNumOrderListsFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeMaxNumOrderListsFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeMaxNumOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeMaxNumOrdersFilter.java index ef4c59aed..033e66480 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeMaxNumOrdersFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeMaxNumOrdersFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** ExchangeMaxNumOrdersFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExchangeMaxNumOrdersFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionReport.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionReport.java index 46898d15f..ef1acca73 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionReport.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionReport.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** ExecutionReport */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExecutionReport extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -377,7 +377,7 @@ public ExecutionReport E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -396,7 +396,7 @@ public ExecutionReport sLowerCase(@jakarta.annotation.Nullable String sLowerCase } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -415,7 +415,7 @@ public ExecutionReport cLowerCase(@jakarta.annotation.Nullable String cLowerCase } /** - * Get cLowerCase + * Client order ID * * @return cLowerCase */ @@ -434,7 +434,7 @@ public ExecutionReport S(@jakarta.annotation.Nullable String S) { } /** - * Get S + * Side * * @return S */ @@ -453,7 +453,7 @@ public ExecutionReport oLowerCase(@jakarta.annotation.Nullable String oLowerCase } /** - * Get oLowerCase + * Order type * * @return oLowerCase */ @@ -472,7 +472,7 @@ public ExecutionReport fLowerCase(@jakarta.annotation.Nullable String fLowerCase } /** - * Get fLowerCase + * Time in force * * @return fLowerCase */ @@ -491,7 +491,7 @@ public ExecutionReport qLowerCase(@jakarta.annotation.Nullable String qLowerCase } /** - * Get qLowerCase + * Order quantity * * @return qLowerCase */ @@ -510,7 +510,7 @@ public ExecutionReport pLowerCase(@jakarta.annotation.Nullable String pLowerCase } /** - * Get pLowerCase + * Order price * * @return pLowerCase */ @@ -529,7 +529,7 @@ public ExecutionReport P(@jakarta.annotation.Nullable String P) { } /** - * Get P + * Stop price * * @return P */ @@ -548,7 +548,7 @@ public ExecutionReport F(@jakarta.annotation.Nullable String F) { } /** - * Get F + * Iceberg quantity * * @return F */ @@ -567,7 +567,7 @@ public ExecutionReport gLowerCase(@jakarta.annotation.Nullable Long gLowerCase) } /** - * Get gLowerCase + * OrderListId * * @return gLowerCase */ @@ -586,7 +586,7 @@ public ExecutionReport C(@jakarta.annotation.Nullable String C) { } /** - * Get C + * Original client order ID; This is the ID of the order being canceled * * @return C */ @@ -605,7 +605,7 @@ public ExecutionReport xLowerCase(@jakarta.annotation.Nullable String xLowerCase } /** - * Get xLowerCase + * Current execution type * * @return xLowerCase */ @@ -624,7 +624,7 @@ public ExecutionReport X(@jakarta.annotation.Nullable String X) { } /** - * Get X + * Current order status * * @return X */ @@ -643,7 +643,7 @@ public ExecutionReport rLowerCase(@jakarta.annotation.Nullable String rLowerCase } /** - * Get rLowerCase + * Order reject reason; Please see Order Reject Reason for more information. * * @return rLowerCase */ @@ -662,7 +662,7 @@ public ExecutionReport iLowerCase(@jakarta.annotation.Nullable Long iLowerCase) } /** - * Get iLowerCase + * Order ID * * @return iLowerCase */ @@ -681,7 +681,7 @@ public ExecutionReport lLowerCase(@jakarta.annotation.Nullable String lLowerCase } /** - * Get lLowerCase + * Last executed quantity * * @return lLowerCase */ @@ -700,7 +700,7 @@ public ExecutionReport zLowerCase(@jakarta.annotation.Nullable String zLowerCase } /** - * Get zLowerCase + * Cumulative filled quantity * * @return zLowerCase */ @@ -719,7 +719,7 @@ public ExecutionReport L(@jakarta.annotation.Nullable String L) { } /** - * Get L + * Last executed price * * @return L */ @@ -738,7 +738,7 @@ public ExecutionReport nLowerCase(@jakarta.annotation.Nullable String nLowerCase } /** - * Get nLowerCase + * Commission amount * * @return nLowerCase */ @@ -757,7 +757,7 @@ public ExecutionReport N(@jakarta.annotation.Nullable String N) { } /** - * Get N + * Commission asset * * @return N */ @@ -776,7 +776,7 @@ public ExecutionReport T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction time * * @return T */ @@ -795,7 +795,7 @@ public ExecutionReport tLowerCase(@jakarta.annotation.Nullable Long tLowerCase) } /** - * Get tLowerCase + * Trade ID * * @return tLowerCase */ @@ -814,7 +814,7 @@ public ExecutionReport vLowerCase(@jakarta.annotation.Nullable Long vLowerCase) } /** - * Get vLowerCase + * Prevented Match Id; This is only visible if the order expired due to STP * * @return vLowerCase */ @@ -833,7 +833,7 @@ public ExecutionReport I(@jakarta.annotation.Nullable Long I) { } /** - * Get I + * Execution Id * * @return I */ @@ -852,7 +852,7 @@ public ExecutionReport wLowerCase(@jakarta.annotation.Nullable Boolean wLowerCas } /** - * Get wLowerCase + * Is the order on the book? * * @return wLowerCase */ @@ -871,7 +871,7 @@ public ExecutionReport mLowerCase(@jakarta.annotation.Nullable Boolean mLowerCas } /** - * Get mLowerCase + * Is this trade the maker side? * * @return mLowerCase */ @@ -890,7 +890,7 @@ public ExecutionReport M(@jakarta.annotation.Nullable Boolean M) { } /** - * Get M + * Ignore * * @return M */ @@ -909,7 +909,7 @@ public ExecutionReport O(@jakarta.annotation.Nullable Long O) { } /** - * Get O + * Order creation time * * @return O */ @@ -928,7 +928,7 @@ public ExecutionReport Z(@jakarta.annotation.Nullable String Z) { } /** - * Get Z + * Cumulative quote asset transacted quantity * * @return Z */ @@ -947,7 +947,7 @@ public ExecutionReport Y(@jakarta.annotation.Nullable String Y) { } /** - * Get Y + * Last quote asset transacted quantity (i.e. lastPrice * lastQty) * * @return Y */ @@ -966,7 +966,7 @@ public ExecutionReport Q(@jakarta.annotation.Nullable String Q) { } /** - * Get Q + * Quote Order Quantity * * @return Q */ @@ -985,7 +985,7 @@ public ExecutionReport W(@jakarta.annotation.Nullable Long W) { } /** - * Get W + * Working Time; This is only visible if the order has been placed on the book. * * @return W */ @@ -1004,7 +1004,7 @@ public ExecutionReport V(@jakarta.annotation.Nullable String V) { } /** - * Get V + * SelfTradePreventionMode * * @return V */ @@ -1023,7 +1023,7 @@ public ExecutionReport dLowerCase(@jakarta.annotation.Nullable Long dLowerCase) } /** - * Get dLowerCase + * Trailing Delta * * @return dLowerCase */ @@ -1042,7 +1042,7 @@ public ExecutionReport D(@jakarta.annotation.Nullable Long D) { } /** - * Get D + * Trailing Time * * @return D */ @@ -1061,7 +1061,7 @@ public ExecutionReport jLowerCase(@jakarta.annotation.Nullable Long jLowerCase) } /** - * Get jLowerCase + * Strategy Id * * @return jLowerCase */ @@ -1080,7 +1080,7 @@ public ExecutionReport J(@jakarta.annotation.Nullable Long J) { } /** - * Get J + * Strategy Type * * @return J */ @@ -1099,7 +1099,7 @@ public ExecutionReport A(@jakarta.annotation.Nullable String A) { } /** - * Get A + * Prevented Quantity * * @return A */ @@ -1118,7 +1118,7 @@ public ExecutionReport B(@jakarta.annotation.Nullable String B) { } /** - * Get B + * Last Prevented Quantity * * @return B */ @@ -1137,7 +1137,7 @@ public ExecutionReport uLowerCase(@jakarta.annotation.Nullable Long uLowerCase) } /** - * Get uLowerCase + * Trade Group Id * * @return uLowerCase */ @@ -1156,7 +1156,7 @@ public ExecutionReport U(@jakarta.annotation.Nullable Long U) { } /** - * Get U + * Counter Order Id * * @return U */ @@ -1175,7 +1175,7 @@ public ExecutionReport cs(@jakarta.annotation.Nullable String cs) { } /** - * Get cs + * Counter Symbol * * @return cs */ @@ -1194,7 +1194,7 @@ public ExecutionReport pl(@jakarta.annotation.Nullable String pl) { } /** - * Get pl + * Prevented Execution Quantity * * @return pl */ @@ -1213,7 +1213,7 @@ public ExecutionReport pL(@jakarta.annotation.Nullable String pL) { } /** - * Get pL + * Prevented Execution Price * * @return pL */ @@ -1232,7 +1232,7 @@ public ExecutionReport pY(@jakarta.annotation.Nullable String pY) { } /** - * Get pY + * Prevented Execution Quote Qty * * @return pY */ @@ -1251,7 +1251,7 @@ public ExecutionReport bLowerCase(@jakarta.annotation.Nullable String bLowerCase } /** - * Get bLowerCase + * Match Type * * @return bLowerCase */ @@ -1270,7 +1270,7 @@ public ExecutionReport aLowerCase(@jakarta.annotation.Nullable Long aLowerCase) } /** - * Get aLowerCase + * Allocation ID * * @return aLowerCase */ @@ -1289,7 +1289,7 @@ public ExecutionReport kLowerCase(@jakarta.annotation.Nullable String kLowerCase } /** - * Get kLowerCase + * Working Floor * * @return kLowerCase */ @@ -1308,7 +1308,7 @@ public ExecutionReport uS(@jakarta.annotation.Nullable Boolean uS) { } /** - * Get uS + * UsedSor * * @return uS */ @@ -1327,7 +1327,7 @@ public ExecutionReport gP(@jakarta.annotation.Nullable String gP) { } /** - * Get gP + * Pegged Price Type * * @return gP */ @@ -1346,7 +1346,7 @@ public ExecutionReport gOT(@jakarta.annotation.Nullable String gOT) { } /** - * Get gOT + * Pegged Offset Type * * @return gOT */ @@ -1365,7 +1365,7 @@ public ExecutionReport gOV(@jakarta.annotation.Nullable Long gOV) { } /** - * Get gOV + * Pegged Offset Value * * @return gOV */ @@ -1384,7 +1384,7 @@ public ExecutionReport gp(@jakarta.annotation.Nullable String gp) { } /** - * Get gp + * Pegged Price * * @return gp */ @@ -1403,7 +1403,7 @@ public ExecutionReport eR(@jakarta.annotation.Nullable String eR) { } /** - * Get eR + * Expiry Reason. Appears when the order has expired. * * @return eR */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesRequest.java index 3e64e32d8..6d0b8257c 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,8 +38,14 @@ /** ExecutionRulesRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExecutionRulesRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -60,13 +66,32 @@ public class ExecutionRulesRequest extends BaseDTO { public ExecutionRulesRequest() {} + public ExecutionRulesRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public ExecutionRulesRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Query for specified symbol. * * @return symbol */ @@ -129,20 +154,22 @@ public boolean equals(Object o) { return false; } ExecutionRulesRequest executionRulesRequest = (ExecutionRulesRequest) o; - return Objects.equals(this.symbol, executionRulesRequest.symbol) + return Objects.equals(this.id, executionRulesRequest.id) + && Objects.equals(this.symbol, executionRulesRequest.symbol) && Objects.equals(this.symbols, executionRulesRequest.symbols) && Objects.equals(this.symbolStatus, executionRulesRequest.symbolStatus); } @Override public int hashCode() { - return Objects.hash(symbol, symbols, symbolStatus); + return Objects.hash(id, symbol, symbols, symbolStatus); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ExecutionRulesRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" symbols: ").append(toIndentedString(symbols)).append("\n"); sb.append(" symbolStatus: ").append(toIndentedString(symbolStatus)).append("\n"); @@ -154,6 +181,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -180,6 +212,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -218,6 +254,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("symbols"); openapiFields.add("symbolStatus"); @@ -256,6 +293,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesResponse.java index 9377a667f..216bdab74 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** ExecutionRulesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExecutionRulesResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesResponseResult.java index 08dd60296..9a5eb2233 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** ExecutionRulesResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExecutionRulesResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL_RULES = "symbolRules"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesResponseResultSymbolRulesInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesResponseResultSymbolRulesInner.java index 99253e556..ac46d1187 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesResponseResultSymbolRulesInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesResponseResultSymbolRulesInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** ExecutionRulesResponseResultSymbolRulesInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExecutionRulesResponseResultSymbolRulesInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesResponseResultSymbolRulesInnerRulesInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesResponseResultSymbolRulesInnerRulesInner.java index 58489d5c6..aba62275c 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesResponseResultSymbolRulesInnerRulesInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionRulesResponseResultSymbolRulesInnerRulesInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** ExecutionRulesResponseResultSymbolRulesInnerRulesInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExecutionRulesResponseResultSymbolRulesInnerRulesInner extends BaseDTO { public static final String SERIALIZED_NAME_RULE_TYPE = "ruleType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExternalLockUpdate.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExternalLockUpdate.java index afcac0253..be942c2af 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExternalLockUpdate.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExternalLockUpdate.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** ExternalLockUpdate */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ExternalLockUpdate extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -71,7 +71,7 @@ public ExternalLockUpdate E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -90,7 +90,7 @@ public ExternalLockUpdate aLowerCase(@jakarta.annotation.Nullable String aLowerC } /** - * Get aLowerCase + * Asset * * @return aLowerCase */ @@ -109,7 +109,7 @@ public ExternalLockUpdate dLowerCase(@jakarta.annotation.Nullable String dLowerC } /** - * Get dLowerCase + * Delta * * @return dLowerCase */ @@ -128,7 +128,7 @@ public ExternalLockUpdate T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/IcebergPartsFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/IcebergPartsFilter.java index c53864465..48e4968c5 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/IcebergPartsFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/IcebergPartsFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** IcebergPartsFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class IcebergPartsFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Interval.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Interval.java index 1e74865eb..ff6e96558 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Interval.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Interval.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesItem.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesItem.java deleted file mode 100644 index 2991c1d34..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesItem.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.api.model; - -import com.binance.connector.client.spot.websocket.api.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** KlinesItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class KlinesItem extends ArrayList { - public KlinesItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class KlinesItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to KlinesItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!KlinesItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in KlinesItem is not found in the empty" - + " JSON string", - KlinesItem.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!KlinesItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `KlinesItem` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!KlinesItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'KlinesItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(KlinesItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, KlinesItem value) throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public KlinesItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of KlinesItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of KlinesItem - * @throws IOException if the JSON string is invalid with respect to KlinesItem - */ - public static KlinesItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, KlinesItem.class); - } - - /** - * Convert an instance of KlinesItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesItemInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesItemInner.java deleted file mode 100644 index f6c67d9f0..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesItemInner.java +++ /dev/null @@ -1,303 +0,0 @@ -/* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.api.model; - -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.binance.connector.client.spot.websocket.api.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonPrimitive; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class KlinesItemInner extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(KlinesItemInner.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!KlinesItemInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'KlinesItemInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterString = - gson.getDelegateAdapter(this, TypeToken.get(String.class)); - final TypeAdapter adapterLong = - gson.getDelegateAdapter(this, TypeToken.get(Long.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, KlinesItemInner value) - throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `String` - if (value.getActualInstance() instanceof String) { - JsonPrimitive primitive = - adapterString - .toJsonTree((String) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - // check if the actual instance is of the type `Long` - if (value.getActualInstance() instanceof Long) { - JsonPrimitive primitive = - adapterLong - .toJsonTree((Long) value.getActualInstance()) - .getAsJsonPrimitive(); - elementAdapter.write(out, primitive); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " Long, String"); - } - - @Override - public KlinesItemInner read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize String - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterString; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for String failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'String'", - e); - } - // deserialize Long - try { - // validate the JSON object to see if any exception is thrown - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in" - + " the JSON string but got `%s`", - jsonElement.toString())); - } - actualAdapter = adapterLong; - match++; - log.log(Level.FINER, "Input data matches schema 'Long'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for Long failed with `%s`.", - e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Long'", e); - } - - if (match == 1) { - KlinesItemInner ret = new KlinesItemInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for KlinesItemInner: %d classes" - + " match result, expected 1. Detailed failure" - + " message for oneOf schemas: %s. JSON: %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public KlinesItemInner() { - super("oneOf", Boolean.FALSE); - } - - public KlinesItemInner(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("String", String.class); - schemas.put("Long", Long.class); - } - - @Override - public Map> getSchemas() { - return KlinesItemInner.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Long, String - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof String) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Long) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Long, String"); - } - - /** - * Get the actual instance, which can be the following: Long, String - * - * @return The actual instance (Long, String) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } - - /** - * Get the actual instance of `Long`. If the actual instance is not `Long`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Long` - * @throws ClassCastException if the instance is not `Long` - */ - public Long getLong() throws ClassCastException { - return (Long) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to KlinesItemInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with String - try { - if (!jsonElement.getAsJsonPrimitive().isString()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type String in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for String failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Long - try { - if (!jsonElement.getAsJsonPrimitive().isNumber()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be of type Number in the JSON string but" - + " got `%s`", - jsonElement.toString())); - } - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format("Deserialization for Long failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for KlinesItemInner with oneOf schemas:" - + " Long, String. %d class(es) match the result, expected 1." - + " Detailed failure message for oneOf schemas: %s. JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of KlinesItemInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of KlinesItemInner - * @throws IOException if the JSON string is invalid with respect to KlinesItemInner - */ - public static KlinesItemInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, KlinesItemInner.class); - } - - /** - * Convert an instance of KlinesItemInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesRequest.java index ad46b38d2..4e2ce4dd5 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,8 +38,14 @@ /** KlinesRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlinesRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -78,6 +84,25 @@ public class KlinesRequest extends BaseDTO { public KlinesRequest() {} + public KlinesRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public KlinesRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -163,7 +188,7 @@ public KlinesRequest timeZone(@jakarta.annotation.Nullable String timeZone) { } /** - * Get timeZone + * Default: 0 (UTC) * * @return timeZone */ @@ -182,11 +207,12 @@ public KlinesRequest limit(@jakarta.annotation.Nullable Integer limit) { } /** - * Get limit + * Get limit maximum: 1000 * * @return limit */ @jakarta.annotation.Nullable + @Max(1000) public Integer getLimit() { return limit; } @@ -204,7 +230,8 @@ public boolean equals(Object o) { return false; } KlinesRequest klinesRequest = (KlinesRequest) o; - return Objects.equals(this.symbol, klinesRequest.symbol) + return Objects.equals(this.id, klinesRequest.id) + && Objects.equals(this.symbol, klinesRequest.symbol) && Objects.equals(this.interval, klinesRequest.interval) && Objects.equals(this.startTime, klinesRequest.startTime) && Objects.equals(this.endTime, klinesRequest.endTime) @@ -214,13 +241,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(symbol, interval, startTime, endTime, timeZone, limit); + return Objects.hash(id, symbol, interval, startTime, endTime, timeZone, limit); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class KlinesRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); @@ -235,6 +263,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -276,6 +309,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -326,6 +363,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("interval"); openapiFields.add("startTime"); @@ -379,6 +417,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesResponse.java index effa0fb84..c8600258c 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** KlinesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlinesResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -59,13 +59,13 @@ public class KlinesResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RESULT) @jakarta.annotation.Nullable - private List result; + private List> result; public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public KlinesResponse() {} @@ -107,12 +107,13 @@ public void setStatus(@jakarta.annotation.Nullable Long status) { this.status = status; } - public KlinesResponse result(@jakarta.annotation.Nullable List result) { + public KlinesResponse result( + @jakarta.annotation.Nullable List> result) { this.result = result; return this; } - public KlinesResponse addResultItem(KlinesItem resultItem) { + public KlinesResponse addResultItem(List resultItem) { if (this.result == null) { this.result = new ArrayList<>(); } @@ -127,21 +128,24 @@ public KlinesResponse addResultItem(KlinesItem resultItem) { */ @jakarta.annotation.Nullable @Valid - public List getResult() { + public List> getResult() { return result; } - public void setResult(@jakarta.annotation.Nullable List result) { + public void setResult( + @jakarta.annotation.Nullable List> result) { this.result = result; } public KlinesResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public KlinesResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public KlinesResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -156,11 +160,13 @@ public KlinesResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -210,12 +216,12 @@ public String toUrlQueryString() { String statusValueAsString = statusValue.toString(); valMap.put("status", statusValueAsString); } - List resultValue = getResult(); + List> resultValue = getResult(); if (resultValue != null) { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -344,7 +350,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesResponseResultInnerInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesResponseResultInnerInner.java new file mode 100644 index 000000000..4939212e4 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesResponseResultInnerInner.java @@ -0,0 +1,311 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.AbstractOpenApiSchema; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonPrimitive; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.hibernate.validator.constraints.*; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class KlinesResponseResultInnerInner extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(KlinesResponseResultInnerInner.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!KlinesResponseResultInnerInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'KlinesResponseResultInnerInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterLong = + gson.getDelegateAdapter(this, TypeToken.get(Long.class)); + final TypeAdapter adapterString = + gson.getDelegateAdapter(this, TypeToken.get(String.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, KlinesResponseResultInnerInner value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `Long` + if (value.getActualInstance() instanceof Long) { + JsonPrimitive primitive = + adapterLong + .toJsonTree((Long) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + // check if the actual instance is of the type `String` + if (value.getActualInstance() instanceof String) { + JsonPrimitive primitive = + adapterString + .toJsonTree((String) value.getActualInstance()) + .getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " Long, String"); + } + + @Override + public KlinesResponseResultInnerInner read(JsonReader in) + throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize Long + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterLong; + match++; + log.log(Level.FINER, "Input data matches schema 'Long'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for Long failed with `%s`.", + e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Long'", e); + } + // deserialize String + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in" + + " the JSON string but got `%s`", + jsonElement.toString())); + } + actualAdapter = adapterString; + match++; + log.log(Level.FINER, "Input data matches schema 'String'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for String failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'String'", + e); + } + + if (match == 1) { + KlinesResponseResultInnerInner ret = + new KlinesResponseResultInnerInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for" + + " KlinesResponseResultInnerInner: %d classes" + + " match result, expected 1. Detailed failure" + + " message for oneOf schemas: %s. JSON: %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public KlinesResponseResultInnerInner() { + super("oneOf", Boolean.FALSE); + } + + public KlinesResponseResultInnerInner(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Long", Long.class); + schemas.put("String", String.class); + } + + @Override + public Map> getSchemas() { + return KlinesResponseResultInnerInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: Long, String + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof Long) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof String) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Long, String"); + } + + /** + * Get the actual instance, which can be the following: Long, String + * + * @return The actual instance (Long, String) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Long`. If the actual instance is not `Long`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `Long` + * @throws ClassCastException if the instance is not `Long` + */ + public Long getLong() throws ClassCastException { + return (Long) super.getActualInstance(); + } + + /** + * Get the actual instance of `String`. If the actual instance is not `String`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String) super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * KlinesResponseResultInnerInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with Long + try { + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type Number in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for Long failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with String + try { + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException( + String.format( + "Expected json element to be of type String in the JSON string but" + + " got `%s`", + jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format("Deserialization for String failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for KlinesResponseResultInnerInner with" + + " oneOf schemas: Long, String. %d class(es) match the result," + + " expected 1. Detailed failure message for oneOf schemas: %s." + + " JSON: %s", + validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of KlinesResponseResultInnerInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of KlinesResponseResultInnerInner + * @throws IOException if the JSON string is invalid with respect to + * KlinesResponseResultInnerInner + */ + public static KlinesResponseResultInnerInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, KlinesResponseResultInnerInner.class); + } + + /** + * Convert an instance of KlinesResponseResultInnerInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ListStatus.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ListStatus.java index 7870b058d..2bc0b87d3 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ListStatus.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ListStatus.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** ListStatus */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ListStatus extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -111,7 +111,7 @@ public ListStatus E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -130,7 +130,7 @@ public ListStatus sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -149,7 +149,7 @@ public ListStatus gLowerCase(@jakarta.annotation.Nullable Long gLowerCase) { } /** - * Get gLowerCase + * OrderListId * * @return gLowerCase */ @@ -168,7 +168,7 @@ public ListStatus cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { } /** - * Get cLowerCase + * Contingency Type * * @return cLowerCase */ @@ -187,7 +187,7 @@ public ListStatus lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { } /** - * Get lLowerCase + * List Status Type * * @return lLowerCase */ @@ -206,7 +206,7 @@ public ListStatus L(@jakarta.annotation.Nullable String L) { } /** - * Get L + * List Order Status * * @return L */ @@ -225,7 +225,7 @@ public ListStatus rLowerCase(@jakarta.annotation.Nullable String rLowerCase) { } /** - * Get rLowerCase + * List Reject Reason * * @return rLowerCase */ @@ -244,7 +244,7 @@ public ListStatus C(@jakarta.annotation.Nullable String C) { } /** - * Get C + * List Client Order ID * * @return C */ @@ -263,7 +263,7 @@ public ListStatus T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Transaction Time * * @return T */ @@ -290,7 +290,7 @@ public ListStatus addOItem(ListStatusOInner OItem) { } /** - * Get O + * An array of objects * * @return O */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ListStatusOInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ListStatusOInner.java index c85c83901..a2231edba 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ListStatusOInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ListStatusOInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** ListStatusOInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ListStatusOInner extends BaseDTO { public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @@ -65,7 +65,7 @@ public ListStatusOInner sLowerCase(@jakarta.annotation.Nullable String sLowerCas } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -84,7 +84,7 @@ public ListStatusOInner iLowerCase(@jakarta.annotation.Nullable Long iLowerCase) } /** - * Get iLowerCase + * OrderId * * @return iLowerCase */ @@ -103,7 +103,7 @@ public ListStatusOInner cLowerCase(@jakarta.annotation.Nullable String cLowerCas } /** - * Get cLowerCase + * ClientOrderId * * @return cLowerCase */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/LotSizeFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/LotSizeFilter.java index f84765372..b07c1efd3 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/LotSizeFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/LotSizeFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** LotSizeFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class LotSizeFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MarketLotSizeFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MarketLotSizeFilter.java index 5079ac407..ff91cbc18 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MarketLotSizeFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MarketLotSizeFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MarketLotSizeFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarketLotSizeFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxAssetFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxAssetFilter.java index f23478c8f..5168f6b59 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxAssetFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxAssetFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MaxAssetFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MaxAssetFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumAlgoOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumAlgoOrdersFilter.java index 486f54c7c..62b9a498f 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumAlgoOrdersFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumAlgoOrdersFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MaxNumAlgoOrdersFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MaxNumAlgoOrdersFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumIcebergOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumIcebergOrdersFilter.java index 984091afd..4039102a0 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumIcebergOrdersFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumIcebergOrdersFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MaxNumIcebergOrdersFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MaxNumIcebergOrdersFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumOrderAmendsFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumOrderAmendsFilter.java index 8194edff4..5955f85dd 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumOrderAmendsFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumOrderAmendsFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MaxNumOrderAmendsFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MaxNumOrderAmendsFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumOrderListsFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumOrderListsFilter.java index b62480f9a..dc380143d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumOrderListsFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumOrderListsFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MaxNumOrderListsFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MaxNumOrderListsFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumOrdersFilter.java index 31536b38f..f551fef68 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumOrdersFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxNumOrdersFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MaxNumOrdersFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MaxNumOrdersFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxPositionFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxPositionFilter.java index be2a4600f..a5744a3b8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxPositionFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MaxPositionFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MaxPositionFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MaxPositionFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MinNotionalFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MinNotionalFilter.java index 6a7c25ef7..db0047efd 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MinNotionalFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MinNotionalFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MinNotionalFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MinNotionalFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyAllocationsRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyAllocationsRequest.java index 52480f3b5..03dbb44c7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyAllocationsRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyAllocationsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** MyAllocationsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyAllocationsRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -85,6 +91,25 @@ public class MyAllocationsRequest extends BaseDTO { public MyAllocationsRequest() {} + public MyAllocationsRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public MyAllocationsRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -111,7 +136,7 @@ public MyAllocationsRequest startTime(@jakarta.annotation.Nullable Long startTim } /** - * Get startTime + * Timestamp in ms * * @return startTime */ @@ -130,7 +155,7 @@ public MyAllocationsRequest endTime(@jakarta.annotation.Nullable Long endTime) { } /** - * Get endTime + * Timestamp in ms * * @return endTime */ @@ -150,7 +175,7 @@ public MyAllocationsRequest fromAllocationId( } /** - * Get fromAllocationId + * Allocation ID to begin at * * @return fromAllocationId */ @@ -169,11 +194,12 @@ public MyAllocationsRequest limit(@jakarta.annotation.Nullable Integer limit) { } /** - * Get limit + * Default: 500; Maximum: 1000 maximum: 1000 * * @return limit */ @jakarta.annotation.Nullable + @Max(1000) public Integer getLimit() { return limit; } @@ -188,7 +214,7 @@ public MyAllocationsRequest orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Order ID * * @return orderId */ @@ -207,12 +233,14 @@ public MyAllocationsRequest recvWindow(@jakarta.annotation.Nullable Double recvW } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -230,7 +258,8 @@ public boolean equals(Object o) { return false; } MyAllocationsRequest myAllocationsRequest = (MyAllocationsRequest) o; - return Objects.equals(this.symbol, myAllocationsRequest.symbol) + return Objects.equals(this.id, myAllocationsRequest.id) + && Objects.equals(this.symbol, myAllocationsRequest.symbol) && Objects.equals(this.startTime, myAllocationsRequest.startTime) && Objects.equals(this.endTime, myAllocationsRequest.endTime) && Objects.equals(this.fromAllocationId, myAllocationsRequest.fromAllocationId) @@ -242,13 +271,14 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - symbol, startTime, endTime, fromAllocationId, limit, orderId, recvWindow); + id, symbol, startTime, endTime, fromAllocationId, limit, orderId, recvWindow); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MyAllocationsRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); @@ -264,6 +294,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -311,6 +346,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -365,6 +404,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("startTime"); openapiFields.add("endTime"); @@ -418,6 +458,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyAllocationsResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyAllocationsResponse.java index ed5624480..ba99cc1e9 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyAllocationsResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyAllocationsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** MyAllocationsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyAllocationsResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class MyAllocationsResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public MyAllocationsResponse() {} @@ -138,12 +138,14 @@ public void setResult( } public MyAllocationsResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public MyAllocationsResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public MyAllocationsResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -158,11 +160,13 @@ public MyAllocationsResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -217,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -355,7 +359,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyAllocationsResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyAllocationsResponseResultInner.java index c30cc87cb..70000d89e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyAllocationsResponseResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyAllocationsResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MyAllocationsResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyAllocationsResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyFiltersRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyFiltersRequest.java index d9b2d1d18..e51d4c717 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyFiltersRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyFiltersRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** MyFiltersRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyFiltersRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -55,6 +61,25 @@ public class MyFiltersRequest extends BaseDTO { public MyFiltersRequest() {} + public MyFiltersRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public MyFiltersRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -81,12 +106,14 @@ public MyFiltersRequest recvWindow(@jakarta.annotation.Nullable Double recvWindo } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -104,19 +131,21 @@ public boolean equals(Object o) { return false; } MyFiltersRequest myFiltersRequest = (MyFiltersRequest) o; - return Objects.equals(this.symbol, myFiltersRequest.symbol) + return Objects.equals(this.id, myFiltersRequest.id) + && Objects.equals(this.symbol, myFiltersRequest.symbol) && Objects.equals(this.recvWindow, myFiltersRequest.recvWindow); } @Override public int hashCode() { - return Objects.hash(symbol, recvWindow); + return Objects.hash(id, symbol, recvWindow); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MyFiltersRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); sb.append("}"); @@ -127,6 +156,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -149,6 +183,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -183,6 +221,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("recvWindow"); @@ -231,6 +270,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyFiltersResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyFiltersResponse.java index b93f8ce33..1a3ebdc7f 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyFiltersResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyFiltersResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,25 +41,25 @@ /** MyFiltersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyFiltersResponse extends BaseDTO { - public static final String SERIALIZED_NAME_ID = "id"; + public static final String SERIALIZED_NAME_EXCHANGE_FILTERS = "exchangeFilters"; - @SerializedName(SERIALIZED_NAME_ID) + @SerializedName(SERIALIZED_NAME_EXCHANGE_FILTERS) @jakarta.annotation.Nullable - private String id; + private List exchangeFilters; - public static final String SERIALIZED_NAME_STATUS = "status"; + public static final String SERIALIZED_NAME_SYMBOL_FILTERS = "symbolFilters"; - @SerializedName(SERIALIZED_NAME_STATUS) + @SerializedName(SERIALIZED_NAME_SYMBOL_FILTERS) @jakarta.annotation.Nullable - private Long status; + private List symbolFilters; - public static final String SERIALIZED_NAME_RESULT = "result"; + public static final String SERIALIZED_NAME_ASSET_FILTERS = "assetFilters"; - @SerializedName(SERIALIZED_NAME_RESULT) + @SerializedName(SERIALIZED_NAME_ASSET_FILTERS) @jakarta.annotation.Nullable - private MyFiltersResponseResult result; + private List assetFilters; public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; @@ -69,62 +69,92 @@ public class MyFiltersResponse extends BaseDTO { public MyFiltersResponse() {} - public MyFiltersResponse id(@jakarta.annotation.Nullable String id) { - this.id = id; + public MyFiltersResponse exchangeFilters( + @jakarta.annotation.Nullable List exchangeFilters) { + this.exchangeFilters = exchangeFilters; + return this; + } + + public MyFiltersResponse addExchangeFiltersItem(ExchangeFilters exchangeFiltersItem) { + if (this.exchangeFilters == null) { + this.exchangeFilters = new ArrayList<>(); + } + this.exchangeFilters.add(exchangeFiltersItem); return this; } /** - * Get id + * Get exchangeFilters * - * @return id + * @return exchangeFilters */ @jakarta.annotation.Nullable - public String getId() { - return id; + @Valid + public List getExchangeFilters() { + return exchangeFilters; } - public void setId(@jakarta.annotation.Nullable String id) { - this.id = id; + public void setExchangeFilters( + @jakarta.annotation.Nullable List exchangeFilters) { + this.exchangeFilters = exchangeFilters; } - public MyFiltersResponse status(@jakarta.annotation.Nullable Long status) { - this.status = status; + public MyFiltersResponse symbolFilters( + @jakarta.annotation.Nullable List symbolFilters) { + this.symbolFilters = symbolFilters; + return this; + } + + public MyFiltersResponse addSymbolFiltersItem(SymbolFilters symbolFiltersItem) { + if (this.symbolFilters == null) { + this.symbolFilters = new ArrayList<>(); + } + this.symbolFilters.add(symbolFiltersItem); return this; } /** - * Get status + * Get symbolFilters * - * @return status + * @return symbolFilters */ @jakarta.annotation.Nullable - public Long getStatus() { - return status; + @Valid + public List getSymbolFilters() { + return symbolFilters; } - public void setStatus(@jakarta.annotation.Nullable Long status) { - this.status = status; + public void setSymbolFilters(@jakarta.annotation.Nullable List symbolFilters) { + this.symbolFilters = symbolFilters; } - public MyFiltersResponse result(@jakarta.annotation.Nullable MyFiltersResponseResult result) { - this.result = result; + public MyFiltersResponse assetFilters( + @jakarta.annotation.Nullable List assetFilters) { + this.assetFilters = assetFilters; + return this; + } + + public MyFiltersResponse addAssetFiltersItem(MaxAssetFilter assetFiltersItem) { + if (this.assetFilters == null) { + this.assetFilters = new ArrayList<>(); + } + this.assetFilters.add(assetFiltersItem); return this; } /** - * Get result + * Get assetFilters * - * @return result + * @return assetFilters */ @jakarta.annotation.Nullable @Valid - public MyFiltersResponseResult getResult() { - return result; + public List getAssetFilters() { + return assetFilters; } - public void setResult(@jakarta.annotation.Nullable MyFiltersResponseResult result) { - this.result = result; + public void setAssetFilters(@jakarta.annotation.Nullable List assetFilters) { + this.assetFilters = assetFilters; } public MyFiltersResponse rateLimits( @@ -165,24 +195,24 @@ public boolean equals(Object o) { return false; } MyFiltersResponse myFiltersResponse = (MyFiltersResponse) o; - return Objects.equals(this.id, myFiltersResponse.id) - && Objects.equals(this.status, myFiltersResponse.status) - && Objects.equals(this.result, myFiltersResponse.result) + return Objects.equals(this.exchangeFilters, myFiltersResponse.exchangeFilters) + && Objects.equals(this.symbolFilters, myFiltersResponse.symbolFilters) + && Objects.equals(this.assetFilters, myFiltersResponse.assetFilters) && Objects.equals(this.rateLimits, myFiltersResponse.rateLimits); } @Override public int hashCode() { - return Objects.hash(id, status, result, rateLimits); + return Objects.hash(exchangeFilters, symbolFilters, assetFilters, rateLimits); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MyFiltersResponse {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" exchangeFilters: ").append(toIndentedString(exchangeFilters)).append("\n"); + sb.append(" symbolFilters: ").append(toIndentedString(symbolFilters)).append("\n"); + sb.append(" assetFilters: ").append(toIndentedString(assetFilters)).append("\n"); sb.append(" rateLimits: ").append(toIndentedString(rateLimits)).append("\n"); sb.append("}"); return sb.toString(); @@ -192,20 +222,20 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - String idValue = getId(); - if (idValue != null) { - String idValueAsString = idValue.toString(); - valMap.put("id", idValueAsString); + List exchangeFiltersValue = getExchangeFilters(); + if (exchangeFiltersValue != null) { + String exchangeFiltersValueAsString = JSON.getGson().toJson(exchangeFiltersValue); + valMap.put("exchangeFilters", exchangeFiltersValueAsString); } - Long statusValue = getStatus(); - if (statusValue != null) { - String statusValueAsString = statusValue.toString(); - valMap.put("status", statusValueAsString); + List symbolFiltersValue = getSymbolFilters(); + if (symbolFiltersValue != null) { + String symbolFiltersValueAsString = JSON.getGson().toJson(symbolFiltersValue); + valMap.put("symbolFilters", symbolFiltersValueAsString); } - MyFiltersResponseResult resultValue = getResult(); - if (resultValue != null) { - String resultValueAsString = JSON.getGson().toJson(resultValue); - valMap.put("result", resultValueAsString); + List assetFiltersValue = getAssetFilters(); + if (assetFiltersValue != null) { + String assetFiltersValueAsString = JSON.getGson().toJson(assetFiltersValue); + valMap.put("assetFilters", assetFiltersValueAsString); } List<@Valid RateLimits> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { @@ -223,17 +253,17 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - Object idValue = getId(); - if (idValue != null) { - valMap.put("id", idValue); + Object exchangeFiltersValue = getExchangeFilters(); + if (exchangeFiltersValue != null) { + valMap.put("exchangeFilters", exchangeFiltersValue); } - Object statusValue = getStatus(); - if (statusValue != null) { - valMap.put("status", statusValue); + Object symbolFiltersValue = getSymbolFilters(); + if (symbolFiltersValue != null) { + valMap.put("symbolFilters", symbolFiltersValue); } - Object resultValue = getResult(); - if (resultValue != null) { - valMap.put("result", resultValue); + Object assetFiltersValue = getAssetFilters(); + if (assetFiltersValue != null) { + valMap.put("assetFilters", assetFiltersValue); } Object rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { @@ -265,9 +295,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("status"); - openapiFields.add("result"); + openapiFields.add("exchangeFilters"); + openapiFields.add("symbolFilters"); + openapiFields.add("assetFilters"); openapiFields.add("rateLimits"); // a set of required properties/fields (JSON key names) @@ -304,17 +334,63 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) - && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); + if (jsonObj.get("exchangeFilters") != null + && !jsonObj.get("exchangeFilters").isJsonNull()) { + JsonArray jsonArrayexchangeFilters = jsonObj.getAsJsonArray("exchangeFilters"); + if (jsonArrayexchangeFilters != null) { + // ensure the json data is an array + if (!jsonObj.get("exchangeFilters").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `exchangeFilters` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("exchangeFilters").toString())); + } + + // validate the optional field `exchangeFilters` (array) + for (int i = 0; i < jsonArrayexchangeFilters.size(); i++) { + ExchangeFilters.validateJsonElement(jsonArrayexchangeFilters.get(i)); + } + ; + } + } + if (jsonObj.get("symbolFilters") != null && !jsonObj.get("symbolFilters").isJsonNull()) { + JsonArray jsonArraysymbolFilters = jsonObj.getAsJsonArray("symbolFilters"); + if (jsonArraysymbolFilters != null) { + // ensure the json data is an array + if (!jsonObj.get("symbolFilters").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbolFilters` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("symbolFilters").toString())); + } + + // validate the optional field `symbolFilters` (array) + for (int i = 0; i < jsonArraysymbolFilters.size(); i++) { + SymbolFilters.validateJsonElement(jsonArraysymbolFilters.get(i)); + } + ; + } } - // validate the optional field `result` - if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { - MyFiltersResponseResult.validateJsonElement(jsonObj.get("result")); + if (jsonObj.get("assetFilters") != null && !jsonObj.get("assetFilters").isJsonNull()) { + JsonArray jsonArrayassetFilters = jsonObj.getAsJsonArray("assetFilters"); + if (jsonArrayassetFilters != null) { + // ensure the json data is an array + if (!jsonObj.get("assetFilters").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `assetFilters` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("assetFilters").toString())); + } + + // validate the optional field `assetFilters` (array) + for (int i = 0; i < jsonArrayassetFilters.size(); i++) { + MaxAssetFilter.validateJsonElement(jsonArrayassetFilters.get(i)); + } + ; + } } if (jsonObj.get("rateLimits") != null && !jsonObj.get("rateLimits").isJsonNull()) { JsonArray jsonArrayrateLimits = jsonObj.getAsJsonArray("rateLimits"); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyFiltersResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyFiltersResponseResult.java deleted file mode 100644 index a7820338a..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyFiltersResponseResult.java +++ /dev/null @@ -1,400 +0,0 @@ -/* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.api.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.api.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** MyFiltersResponseResult */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MyFiltersResponseResult extends BaseDTO { - public static final String SERIALIZED_NAME_EXCHANGE_FILTERS = "exchangeFilters"; - - @SerializedName(SERIALIZED_NAME_EXCHANGE_FILTERS) - @jakarta.annotation.Nullable - private List exchangeFilters; - - public static final String SERIALIZED_NAME_SYMBOL_FILTERS = "symbolFilters"; - - @SerializedName(SERIALIZED_NAME_SYMBOL_FILTERS) - @jakarta.annotation.Nullable - private List symbolFilters; - - public static final String SERIALIZED_NAME_ASSET_FILTERS = "assetFilters"; - - @SerializedName(SERIALIZED_NAME_ASSET_FILTERS) - @jakarta.annotation.Nullable - private List assetFilters; - - public MyFiltersResponseResult() {} - - public MyFiltersResponseResult exchangeFilters( - @jakarta.annotation.Nullable List exchangeFilters) { - this.exchangeFilters = exchangeFilters; - return this; - } - - public MyFiltersResponseResult addExchangeFiltersItem(ExchangeFilters exchangeFiltersItem) { - if (this.exchangeFilters == null) { - this.exchangeFilters = new ArrayList<>(); - } - this.exchangeFilters.add(exchangeFiltersItem); - return this; - } - - /** - * Get exchangeFilters - * - * @return exchangeFilters - */ - @jakarta.annotation.Nullable - @Valid - public List getExchangeFilters() { - return exchangeFilters; - } - - public void setExchangeFilters( - @jakarta.annotation.Nullable List exchangeFilters) { - this.exchangeFilters = exchangeFilters; - } - - public MyFiltersResponseResult symbolFilters( - @jakarta.annotation.Nullable List symbolFilters) { - this.symbolFilters = symbolFilters; - return this; - } - - public MyFiltersResponseResult addSymbolFiltersItem(SymbolFilters symbolFiltersItem) { - if (this.symbolFilters == null) { - this.symbolFilters = new ArrayList<>(); - } - this.symbolFilters.add(symbolFiltersItem); - return this; - } - - /** - * Get symbolFilters - * - * @return symbolFilters - */ - @jakarta.annotation.Nullable - @Valid - public List getSymbolFilters() { - return symbolFilters; - } - - public void setSymbolFilters(@jakarta.annotation.Nullable List symbolFilters) { - this.symbolFilters = symbolFilters; - } - - public MyFiltersResponseResult assetFilters( - @jakarta.annotation.Nullable List assetFilters) { - this.assetFilters = assetFilters; - return this; - } - - public MyFiltersResponseResult addAssetFiltersItem(AssetFilters assetFiltersItem) { - if (this.assetFilters == null) { - this.assetFilters = new ArrayList<>(); - } - this.assetFilters.add(assetFiltersItem); - return this; - } - - /** - * Get assetFilters - * - * @return assetFilters - */ - @jakarta.annotation.Nullable - @Valid - public List getAssetFilters() { - return assetFilters; - } - - public void setAssetFilters(@jakarta.annotation.Nullable List assetFilters) { - this.assetFilters = assetFilters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MyFiltersResponseResult myFiltersResponseResult = (MyFiltersResponseResult) o; - return Objects.equals(this.exchangeFilters, myFiltersResponseResult.exchangeFilters) - && Objects.equals(this.symbolFilters, myFiltersResponseResult.symbolFilters) - && Objects.equals(this.assetFilters, myFiltersResponseResult.assetFilters); - } - - @Override - public int hashCode() { - return Objects.hash(exchangeFilters, symbolFilters, assetFilters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MyFiltersResponseResult {\n"); - sb.append(" exchangeFilters: ").append(toIndentedString(exchangeFilters)).append("\n"); - sb.append(" symbolFilters: ").append(toIndentedString(symbolFilters)).append("\n"); - sb.append(" assetFilters: ").append(toIndentedString(assetFilters)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - List exchangeFiltersValue = getExchangeFilters(); - if (exchangeFiltersValue != null) { - String exchangeFiltersValueAsString = JSON.getGson().toJson(exchangeFiltersValue); - valMap.put("exchangeFilters", exchangeFiltersValueAsString); - } - List symbolFiltersValue = getSymbolFilters(); - if (symbolFiltersValue != null) { - String symbolFiltersValueAsString = JSON.getGson().toJson(symbolFiltersValue); - valMap.put("symbolFilters", symbolFiltersValueAsString); - } - List assetFiltersValue = getAssetFilters(); - if (assetFiltersValue != null) { - String assetFiltersValueAsString = JSON.getGson().toJson(assetFiltersValue); - valMap.put("assetFilters", assetFiltersValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object exchangeFiltersValue = getExchangeFilters(); - if (exchangeFiltersValue != null) { - valMap.put("exchangeFilters", exchangeFiltersValue); - } - Object symbolFiltersValue = getSymbolFilters(); - if (symbolFiltersValue != null) { - valMap.put("symbolFilters", symbolFiltersValue); - } - Object assetFiltersValue = getAssetFilters(); - if (assetFiltersValue != null) { - valMap.put("assetFilters", assetFiltersValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("exchangeFilters"); - openapiFields.add("symbolFilters"); - openapiFields.add("assetFilters"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MyFiltersResponseResult - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MyFiltersResponseResult.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MyFiltersResponseResult is not found" - + " in the empty JSON string", - MyFiltersResponseResult.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MyFiltersResponseResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MyFiltersResponseResult` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("exchangeFilters") != null - && !jsonObj.get("exchangeFilters").isJsonNull()) { - JsonArray jsonArrayexchangeFilters = jsonObj.getAsJsonArray("exchangeFilters"); - if (jsonArrayexchangeFilters != null) { - // ensure the json data is an array - if (!jsonObj.get("exchangeFilters").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `exchangeFilters` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("exchangeFilters").toString())); - } - - // validate the optional field `exchangeFilters` (array) - for (int i = 0; i < jsonArrayexchangeFilters.size(); i++) { - ExchangeFilters.validateJsonElement(jsonArrayexchangeFilters.get(i)); - } - ; - } - } - if (jsonObj.get("symbolFilters") != null && !jsonObj.get("symbolFilters").isJsonNull()) { - JsonArray jsonArraysymbolFilters = jsonObj.getAsJsonArray("symbolFilters"); - if (jsonArraysymbolFilters != null) { - // ensure the json data is an array - if (!jsonObj.get("symbolFilters").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `symbolFilters` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("symbolFilters").toString())); - } - - // validate the optional field `symbolFilters` (array) - for (int i = 0; i < jsonArraysymbolFilters.size(); i++) { - SymbolFilters.validateJsonElement(jsonArraysymbolFilters.get(i)); - } - ; - } - } - if (jsonObj.get("assetFilters") != null && !jsonObj.get("assetFilters").isJsonNull()) { - JsonArray jsonArrayassetFilters = jsonObj.getAsJsonArray("assetFilters"); - if (jsonArrayassetFilters != null) { - // ensure the json data is an array - if (!jsonObj.get("assetFilters").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `assetFilters` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("assetFilters").toString())); - } - - // validate the optional field `assetFilters` (array) - for (int i = 0; i < jsonArrayassetFilters.size(); i++) { - AssetFilters.validateJsonElement(jsonArrayassetFilters.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MyFiltersResponseResult.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MyFiltersResponseResult' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MyFiltersResponseResult.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MyFiltersResponseResult value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MyFiltersResponseResult read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MyFiltersResponseResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of MyFiltersResponseResult - * @throws IOException if the JSON string is invalid with respect to MyFiltersResponseResult - */ - public static MyFiltersResponseResult fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MyFiltersResponseResult.class); - } - - /** - * Convert an instance of MyFiltersResponseResult to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyPreventedMatchesRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyPreventedMatchesRequest.java index 0ab25ba05..25cc503a4 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyPreventedMatchesRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyPreventedMatchesRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** MyPreventedMatchesRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyPreventedMatchesRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -79,6 +85,25 @@ public class MyPreventedMatchesRequest extends BaseDTO { public MyPreventedMatchesRequest() {} + public MyPreventedMatchesRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public MyPreventedMatchesRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -106,7 +131,7 @@ public MyPreventedMatchesRequest preventedMatchId( } /** - * Get preventedMatchId + * Prevented match ID * * @return preventedMatchId */ @@ -125,7 +150,7 @@ public MyPreventedMatchesRequest orderId(@jakarta.annotation.Nullable Long order } /** - * Get orderId + * Order ID * * @return orderId */ @@ -145,7 +170,7 @@ public MyPreventedMatchesRequest fromPreventedMatchId( } /** - * Get fromPreventedMatchId + * Prevented match ID to begin at * * @return fromPreventedMatchId */ @@ -164,11 +189,12 @@ public MyPreventedMatchesRequest limit(@jakarta.annotation.Nullable Integer limi } /** - * Get limit + * Default: 500; Maximum: 1000 maximum: 1000 * * @return limit */ @jakarta.annotation.Nullable + @Max(1000) public Integer getLimit() { return limit; } @@ -183,12 +209,14 @@ public MyPreventedMatchesRequest recvWindow(@jakarta.annotation.Nullable Double } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -206,7 +234,8 @@ public boolean equals(Object o) { return false; } MyPreventedMatchesRequest myPreventedMatchesRequest = (MyPreventedMatchesRequest) o; - return Objects.equals(this.symbol, myPreventedMatchesRequest.symbol) + return Objects.equals(this.id, myPreventedMatchesRequest.id) + && Objects.equals(this.symbol, myPreventedMatchesRequest.symbol) && Objects.equals(this.preventedMatchId, myPreventedMatchesRequest.preventedMatchId) && Objects.equals(this.orderId, myPreventedMatchesRequest.orderId) && Objects.equals( @@ -218,13 +247,14 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - symbol, preventedMatchId, orderId, fromPreventedMatchId, limit, recvWindow); + id, symbol, preventedMatchId, orderId, fromPreventedMatchId, limit, recvWindow); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MyPreventedMatchesRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); @@ -241,6 +271,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -283,6 +318,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -333,6 +372,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("preventedMatchId"); openapiFields.add("orderId"); @@ -385,6 +425,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyPreventedMatchesResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyPreventedMatchesResponse.java index 4b2a0d93e..4fba8ce64 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyPreventedMatchesResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyPreventedMatchesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** MyPreventedMatchesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyPreventedMatchesResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class MyPreventedMatchesResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public MyPreventedMatchesResponse() {} @@ -141,12 +141,14 @@ public void setResult( } public MyPreventedMatchesResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public MyPreventedMatchesResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public MyPreventedMatchesResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -161,11 +163,13 @@ public MyPreventedMatchesResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -220,7 +224,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -359,7 +363,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyPreventedMatchesResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyPreventedMatchesResponseResultInner.java index accd1b132..4255cb1f8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyPreventedMatchesResponseResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyPreventedMatchesResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MyPreventedMatchesResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyPreventedMatchesResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyTradesRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyTradesRequest.java index 3dc60421b..13c388b9e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyTradesRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyTradesRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** MyTradesRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyTradesRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -85,6 +91,25 @@ public class MyTradesRequest extends BaseDTO { public MyTradesRequest() {} + public MyTradesRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public MyTradesRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -111,7 +136,7 @@ public MyTradesRequest orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * This can only be used in combination with `symbol`. * * @return orderId */ @@ -130,7 +155,7 @@ public MyTradesRequest startTime(@jakarta.annotation.Nullable Long startTime) { } /** - * Get startTime + * Timestamp in ms * * @return startTime */ @@ -149,7 +174,7 @@ public MyTradesRequest endTime(@jakarta.annotation.Nullable Long endTime) { } /** - * Get endTime + * Timestamp in ms * * @return endTime */ @@ -168,7 +193,7 @@ public MyTradesRequest fromId(@jakarta.annotation.Nullable Integer fromId) { } /** - * Get fromId + * First trade ID to query * * @return fromId */ @@ -187,11 +212,12 @@ public MyTradesRequest limit(@jakarta.annotation.Nullable Integer limit) { } /** - * Get limit + * Default: 500; Maximum: 1000 maximum: 1000 * * @return limit */ @jakarta.annotation.Nullable + @Max(1000) public Integer getLimit() { return limit; } @@ -206,12 +232,14 @@ public MyTradesRequest recvWindow(@jakarta.annotation.Nullable Double recvWindow } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -229,7 +257,8 @@ public boolean equals(Object o) { return false; } MyTradesRequest myTradesRequest = (MyTradesRequest) o; - return Objects.equals(this.symbol, myTradesRequest.symbol) + return Objects.equals(this.id, myTradesRequest.id) + && Objects.equals(this.symbol, myTradesRequest.symbol) && Objects.equals(this.orderId, myTradesRequest.orderId) && Objects.equals(this.startTime, myTradesRequest.startTime) && Objects.equals(this.endTime, myTradesRequest.endTime) @@ -240,13 +269,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(symbol, orderId, startTime, endTime, fromId, limit, recvWindow); + return Objects.hash(id, symbol, orderId, startTime, endTime, fromId, limit, recvWindow); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MyTradesRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); @@ -262,6 +292,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -309,6 +344,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -363,6 +402,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("orderId"); openapiFields.add("startTime"); @@ -416,6 +456,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyTradesResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyTradesResponse.java index 9f66b0206..2f81dc503 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyTradesResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyTradesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** MyTradesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyTradesResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class MyTradesResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public MyTradesResponse() {} @@ -138,12 +138,14 @@ public void setResult( } public MyTradesResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public MyTradesResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public MyTradesResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -158,11 +160,13 @@ public MyTradesResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -217,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -355,7 +359,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyTradesResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyTradesResponseResultInner.java index 13b660d36..064c89ddb 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyTradesResponseResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/MyTradesResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MyTradesResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MyTradesResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/NewOrderRespType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/NewOrderRespType.java index c7fe8b9b9..354dfeb8f 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/NewOrderRespType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/NewOrderRespType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,18 +21,17 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets newOrderRespType */ +/** + * Set the response JSON. `ACK`, `RESULT`, or `FULL`. Default to + * `FULL`. + */ @JsonAdapter(NewOrderRespType.Adapter.class) public enum NewOrderRespType { ACK("ACK"), RESULT("RESULT"), - FULL("FULL"), - - MARKET("MARKET"), - - LIMIT("LIMIT"); + FULL("FULL"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/NotionalFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/NotionalFilter.java index 0c5a07a95..71fc15a54 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/NotionalFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/NotionalFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** NotionalFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class NotionalFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusRequest.java index 3a9714cd8..32b7aab1a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OpenOrderListsStatusRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenOrderListsStatusRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @SerializedName(SERIALIZED_NAME_RECV_WINDOW) @@ -49,18 +55,39 @@ public class OpenOrderListsStatusRequest extends BaseDTO { public OpenOrderListsStatusRequest() {} + public OpenOrderListsStatusRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OpenOrderListsStatusRequest recvWindow(@jakarta.annotation.Nullable Double recvWindow) { this.recvWindow = recvWindow; return this; } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -78,18 +105,20 @@ public boolean equals(Object o) { return false; } OpenOrderListsStatusRequest openOrderListsStatusRequest = (OpenOrderListsStatusRequest) o; - return Objects.equals(this.recvWindow, openOrderListsStatusRequest.recvWindow); + return Objects.equals(this.id, openOrderListsStatusRequest.id) + && Objects.equals(this.recvWindow, openOrderListsStatusRequest.recvWindow); } @Override public int hashCode() { - return Objects.hash(recvWindow); + return Objects.hash(id, recvWindow); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OpenOrderListsStatusRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); sb.append("}"); return sb.toString(); @@ -99,6 +128,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } Double recvWindowValue = getRecvWindow(); if (recvWindowValue != null) { String recvWindowValueAsString = @@ -116,6 +150,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object recvWindowValue = getRecvWindow(); if (recvWindowValue != null) { valMap.put("recvWindow", recvWindowValue); @@ -146,6 +184,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("recvWindow"); // a set of required properties/fields (JSON key names) @@ -183,6 +222,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponse.java index 0922f7ada..16c0aeeea 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OpenOrderListsStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenOrderListsStatusResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class OpenOrderListsStatusResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public OpenOrderListsStatusResponse() {} @@ -141,12 +141,14 @@ public void setResult( } public OpenOrderListsStatusResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OpenOrderListsStatusResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public OpenOrderListsStatusResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -161,11 +163,13 @@ public OpenOrderListsStatusResponse addRateLimitsItem(RateLimits rateLimitsItem) */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -221,7 +225,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -361,7 +365,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponseResultInner.java index 7c88d97b1..e7b171369 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponseResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OpenOrderListsStatusResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenOrderListsStatusResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponseResultInnerOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponseResultInnerOrdersInner.java index 723450957..bd2acfaf4 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponseResultInnerOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponseResultInnerOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OpenOrderListsStatusResponseResultInnerOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenOrderListsStatusResponseResultInnerOrdersInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllRequest.java index 3293c3d82..fc6fa3a82 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OpenOrdersCancelAllRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenOrdersCancelAllRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -55,6 +61,25 @@ public class OpenOrdersCancelAllRequest extends BaseDTO { public OpenOrdersCancelAllRequest() {} + public OpenOrdersCancelAllRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OpenOrdersCancelAllRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -81,12 +106,14 @@ public OpenOrdersCancelAllRequest recvWindow(@jakarta.annotation.Nullable Double } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -104,19 +131,21 @@ public boolean equals(Object o) { return false; } OpenOrdersCancelAllRequest openOrdersCancelAllRequest = (OpenOrdersCancelAllRequest) o; - return Objects.equals(this.symbol, openOrdersCancelAllRequest.symbol) + return Objects.equals(this.id, openOrdersCancelAllRequest.id) + && Objects.equals(this.symbol, openOrdersCancelAllRequest.symbol) && Objects.equals(this.recvWindow, openOrdersCancelAllRequest.recvWindow); } @Override public int hashCode() { - return Objects.hash(symbol, recvWindow); + return Objects.hash(id, symbol, recvWindow); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OpenOrdersCancelAllRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); sb.append("}"); @@ -127,6 +156,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -149,6 +183,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -183,6 +221,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("recvWindow"); @@ -231,6 +270,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponse.java index 40486fb34..b33d84423 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OpenOrdersCancelAllResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenOrdersCancelAllResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class OpenOrdersCancelAllResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public OpenOrdersCancelAllResponse() {} @@ -141,12 +141,14 @@ public void setResult( } public OpenOrdersCancelAllResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OpenOrdersCancelAllResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public OpenOrdersCancelAllResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -161,11 +163,13 @@ public OpenOrdersCancelAllResponse addRateLimitsItem(RateLimits rateLimitsItem) */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -220,7 +224,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -360,7 +364,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponseResultInner.java index b6d072603..78cd0b53a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponseResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OpenOrdersCancelAllResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenOrdersCancelAllResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; @@ -218,6 +218,60 @@ public class OpenOrdersCancelAllResponseResultInner extends BaseDTO { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OpenOrdersCancelAllResponseResultInner() {} public OpenOrdersCancelAllResponseResultInner orderListId( @@ -692,7 +746,7 @@ public OpenOrdersCancelAllResponseResultInner stopPrice( } /** - * Get stopPrice + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. * * @return stopPrice */ @@ -712,7 +766,7 @@ public OpenOrdersCancelAllResponseResultInner trailingDelta( } /** - * Get trailingDelta + * Delta price change required before order activation. * * @return trailingDelta */ @@ -732,7 +786,7 @@ public OpenOrdersCancelAllResponseResultInner trailingTime( } /** - * Get trailingTime + * Time when the trailing order is now active and tracking price changes. * * @return trailingTime */ @@ -752,7 +806,7 @@ public OpenOrdersCancelAllResponseResultInner icebergQty( } /** - * Get icebergQty + * Appears only if the parameter icebergQty was sent in the request. * * @return icebergQty */ @@ -772,7 +826,7 @@ public OpenOrdersCancelAllResponseResultInner strategyId( } /** - * Get strategyId + * Appears only if the strategyId parameter was provided upon order placement. * * @return strategyId */ @@ -792,7 +846,7 @@ public OpenOrdersCancelAllResponseResultInner strategyType( } /** - * Get strategyType + * Appears only if the strategyType parameter was provided upon order placement. * * @return strategyType */ @@ -826,6 +880,186 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OpenOrdersCancelAllResponseResultInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OpenOrdersCancelAllResponseResultInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public OpenOrdersCancelAllResponseResultInner usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OpenOrdersCancelAllResponseResultInner workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OpenOrdersCancelAllResponseResultInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OpenOrdersCancelAllResponseResultInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OpenOrdersCancelAllResponseResultInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OpenOrdersCancelAllResponseResultInner peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OpenOrdersCancelAllResponseResultInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -891,7 +1125,26 @@ public boolean equals(Object o) { this.strategyType, openOrdersCancelAllResponseResultInner.strategyType) && Objects.equals( this.selfTradePreventionMode, - openOrdersCancelAllResponseResultInner.selfTradePreventionMode); + openOrdersCancelAllResponseResultInner.selfTradePreventionMode) + && Objects.equals( + this.preventedMatchId, + openOrdersCancelAllResponseResultInner.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + openOrdersCancelAllResponseResultInner.preventedQuantity) + && Objects.equals(this.usedSor, openOrdersCancelAllResponseResultInner.usedSor) + && Objects.equals( + this.workingFloor, openOrdersCancelAllResponseResultInner.workingFloor) + && Objects.equals( + this.pegPriceType, openOrdersCancelAllResponseResultInner.pegPriceType) + && Objects.equals( + this.pegOffsetType, openOrdersCancelAllResponseResultInner.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, openOrdersCancelAllResponseResultInner.pegOffsetValue) + && Objects.equals( + this.peggedPrice, openOrdersCancelAllResponseResultInner.peggedPrice) + && Objects.equals( + this.expiryReason, openOrdersCancelAllResponseResultInner.expiryReason); } @Override @@ -925,7 +1178,16 @@ public int hashCode() { icebergQty, strategyId, strategyType, - selfTradePreventionMode); + selfTradePreventionMode, + preventedMatchId, + preventedQuantity, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -965,6 +1227,15 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1119,6 +1390,51 @@ public String toUrlQueryString() { String selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); valMap.put("selfTradePreventionMode", selfTradePreventionModeValueAsString); } + Long preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + String preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + valMap.put("preventedMatchId", preventedMatchIdValueAsString); + } + String preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + String preventedQuantityValueAsString = preventedQuantityValue.toString(); + valMap.put("preventedQuantity", preventedQuantityValueAsString); + } + Boolean usedSorValue = getUsedSor(); + if (usedSorValue != null) { + String usedSorValueAsString = usedSorValue.toString(); + valMap.put("usedSor", usedSorValueAsString); + } + String workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + String workingFloorValueAsString = workingFloorValue.toString(); + valMap.put("workingFloor", workingFloorValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -1246,6 +1562,42 @@ public Map toMap() { if (selfTradePreventionModeValue != null) { valMap.put("selfTradePreventionMode", selfTradePreventionModeValue); } + Object preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + valMap.put("preventedMatchId", preventedMatchIdValue); + } + Object preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + valMap.put("preventedQuantity", preventedQuantityValue); + } + Object usedSorValue = getUsedSor(); + if (usedSorValue != null) { + valMap.put("usedSor", usedSorValue); + } + Object workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + valMap.put("workingFloor", workingFloorValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -1301,6 +1653,15 @@ private String toIndentedString(Object o) { openapiFields.add("strategyId"); openapiFields.add("strategyType"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -1536,6 +1897,55 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponseResultInnerOrderReportsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponseResultInnerOrderReportsInner.java index 8e9d59b07..e6bffb3fb 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponseResultInnerOrderReportsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponseResultInnerOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OpenOrdersCancelAllResponseResultInnerOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenOrdersCancelAllResponseResultInnerOrderReportsInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -136,12 +136,96 @@ public class OpenOrdersCancelAllResponseResultInnerOrderReportsInner extends Bas @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; @SerializedName(SERIALIZED_NAME_STOP_PRICE) @jakarta.annotation.Nullable private String stopPrice; + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OpenOrdersCancelAllResponseResultInnerOrderReportsInner() {} public OpenOrdersCancelAllResponseResultInnerOrderReportsInner symbol( @@ -465,6 +549,66 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OpenOrdersCancelAllResponseResultInnerOrderReportsInner icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OpenOrdersCancelAllResponseResultInnerOrderReportsInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OpenOrdersCancelAllResponseResultInnerOrderReportsInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + public OpenOrdersCancelAllResponseResultInnerOrderReportsInner stopPrice( @jakarta.annotation.Nullable String stopPrice) { this.stopPrice = stopPrice; @@ -472,7 +616,7 @@ public OpenOrdersCancelAllResponseResultInnerOrderReportsInner stopPrice( } /** - * Get stopPrice + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. * * @return stopPrice */ @@ -485,6 +629,226 @@ public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { this.stopPrice = stopPrice; } + public OpenOrdersCancelAllResponseResultInnerOrderReportsInner strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OpenOrdersCancelAllResponseResultInnerOrderReportsInner strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OpenOrdersCancelAllResponseResultInnerOrderReportsInner trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OpenOrdersCancelAllResponseResultInnerOrderReportsInner trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OpenOrdersCancelAllResponseResultInnerOrderReportsInner usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OpenOrdersCancelAllResponseResultInnerOrderReportsInner workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OpenOrdersCancelAllResponseResultInnerOrderReportsInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OpenOrdersCancelAllResponseResultInnerOrderReportsInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OpenOrdersCancelAllResponseResultInnerOrderReportsInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OpenOrdersCancelAllResponseResultInnerOrderReportsInner peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OpenOrdersCancelAllResponseResultInnerOrderReportsInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -540,9 +904,51 @@ public boolean equals(Object o) { this.selfTradePreventionMode, openOrdersCancelAllResponseResultInnerOrderReportsInner .selfTradePreventionMode) + && Objects.equals( + this.icebergQty, + openOrdersCancelAllResponseResultInnerOrderReportsInner.icebergQty) + && Objects.equals( + this.preventedMatchId, + openOrdersCancelAllResponseResultInnerOrderReportsInner.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + openOrdersCancelAllResponseResultInnerOrderReportsInner.preventedQuantity) && Objects.equals( this.stopPrice, - openOrdersCancelAllResponseResultInnerOrderReportsInner.stopPrice); + openOrdersCancelAllResponseResultInnerOrderReportsInner.stopPrice) + && Objects.equals( + this.strategyId, + openOrdersCancelAllResponseResultInnerOrderReportsInner.strategyId) + && Objects.equals( + this.strategyType, + openOrdersCancelAllResponseResultInnerOrderReportsInner.strategyType) + && Objects.equals( + this.trailingDelta, + openOrdersCancelAllResponseResultInnerOrderReportsInner.trailingDelta) + && Objects.equals( + this.trailingTime, + openOrdersCancelAllResponseResultInnerOrderReportsInner.trailingTime) + && Objects.equals( + this.usedSor, + openOrdersCancelAllResponseResultInnerOrderReportsInner.usedSor) + && Objects.equals( + this.workingFloor, + openOrdersCancelAllResponseResultInnerOrderReportsInner.workingFloor) + && Objects.equals( + this.pegPriceType, + openOrdersCancelAllResponseResultInnerOrderReportsInner.pegPriceType) + && Objects.equals( + this.pegOffsetType, + openOrdersCancelAllResponseResultInnerOrderReportsInner.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, + openOrdersCancelAllResponseResultInnerOrderReportsInner.pegOffsetValue) + && Objects.equals( + this.peggedPrice, + openOrdersCancelAllResponseResultInnerOrderReportsInner.peggedPrice) + && Objects.equals( + this.expiryReason, + openOrdersCancelAllResponseResultInnerOrderReportsInner.expiryReason); } @Override @@ -564,7 +970,21 @@ public int hashCode() { type, side, selfTradePreventionMode, - stopPrice); + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -591,7 +1011,21 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -680,11 +1114,81 @@ public String toUrlQueryString() { String selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); valMap.put("selfTradePreventionMode", selfTradePreventionModeValueAsString); } + String icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + String icebergQtyValueAsString = icebergQtyValue.toString(); + valMap.put("icebergQty", icebergQtyValueAsString); + } + Long preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + String preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + valMap.put("preventedMatchId", preventedMatchIdValueAsString); + } + String preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + String preventedQuantityValueAsString = preventedQuantityValue.toString(); + valMap.put("preventedQuantity", preventedQuantityValueAsString); + } String stopPriceValue = getStopPrice(); if (stopPriceValue != null) { String stopPriceValueAsString = stopPriceValue.toString(); valMap.put("stopPrice", stopPriceValueAsString); } + Long strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + String strategyIdValueAsString = strategyIdValue.toString(); + valMap.put("strategyId", strategyIdValueAsString); + } + Long strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + String strategyTypeValueAsString = strategyTypeValue.toString(); + valMap.put("strategyType", strategyTypeValueAsString); + } + Long trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + String trailingDeltaValueAsString = trailingDeltaValue.toString(); + valMap.put("trailingDelta", trailingDeltaValueAsString); + } + Long trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + String trailingTimeValueAsString = trailingTimeValue.toString(); + valMap.put("trailingTime", trailingTimeValueAsString); + } + Boolean usedSorValue = getUsedSor(); + if (usedSorValue != null) { + String usedSorValueAsString = usedSorValue.toString(); + valMap.put("usedSor", usedSorValueAsString); + } + String workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + String workingFloorValueAsString = workingFloorValue.toString(); + valMap.put("workingFloor", workingFloorValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -760,10 +1264,66 @@ public Map toMap() { if (selfTradePreventionModeValue != null) { valMap.put("selfTradePreventionMode", selfTradePreventionModeValue); } + Object icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + valMap.put("icebergQty", icebergQtyValue); + } + Object preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + valMap.put("preventedMatchId", preventedMatchIdValue); + } + Object preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + valMap.put("preventedQuantity", preventedQuantityValue); + } Object stopPriceValue = getStopPrice(); if (stopPriceValue != null) { valMap.put("stopPrice", stopPriceValue); } + Object strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + valMap.put("strategyId", strategyIdValue); + } + Object strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + valMap.put("strategyType", strategyTypeValue); + } + Object trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + valMap.put("trailingDelta", trailingDeltaValue); + } + Object trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + valMap.put("trailingTime", trailingTimeValue); + } + Object usedSorValue = getUsedSor(); + if (usedSorValue != null) { + valMap.put("usedSor", usedSorValue); + } + Object workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + valMap.put("workingFloor", workingFloorValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -806,7 +1366,21 @@ private String toIndentedString(Object o) { openapiFields.add("type"); openapiFields.add("side"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -956,6 +1530,23 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) && !jsonObj.get("stopPrice").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -964,6 +1555,46 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("stopPrice").toString())); } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponseResultInnerOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponseResultInnerOrdersInner.java index 873352e42..387ccacef 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponseResultInnerOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponseResultInnerOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OpenOrdersCancelAllResponseResultInnerOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenOrdersCancelAllResponseResultInnerOrdersInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersStatusRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersStatusRequest.java index 1fa62d12b..3bf9f90a1 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersStatusRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersStatusRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OpenOrdersStatusRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenOrdersStatusRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -55,13 +61,32 @@ public class OpenOrdersStatusRequest extends BaseDTO { public OpenOrdersStatusRequest() {} + public OpenOrdersStatusRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OpenOrdersStatusRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * If omitted, open orders for all symbols are returned * * @return symbol */ @@ -80,12 +105,14 @@ public OpenOrdersStatusRequest recvWindow(@jakarta.annotation.Nullable Double re } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -103,19 +130,21 @@ public boolean equals(Object o) { return false; } OpenOrdersStatusRequest openOrdersStatusRequest = (OpenOrdersStatusRequest) o; - return Objects.equals(this.symbol, openOrdersStatusRequest.symbol) + return Objects.equals(this.id, openOrdersStatusRequest.id) + && Objects.equals(this.symbol, openOrdersStatusRequest.symbol) && Objects.equals(this.recvWindow, openOrdersStatusRequest.recvWindow); } @Override public int hashCode() { - return Objects.hash(symbol, recvWindow); + return Objects.hash(id, symbol, recvWindow); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OpenOrdersStatusRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); sb.append("}"); @@ -126,6 +155,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -148,6 +182,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -182,6 +220,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("recvWindow"); @@ -219,6 +258,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersStatusResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersStatusResponse.java index 3cd78e4f3..33d50b190 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersStatusResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OpenOrdersStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenOrdersStatusResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class OpenOrdersStatusResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public OpenOrdersStatusResponse() {} @@ -138,12 +138,14 @@ public void setResult( } public OpenOrdersStatusResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OpenOrdersStatusResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public OpenOrdersStatusResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -158,11 +160,13 @@ public OpenOrdersStatusResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -217,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -355,7 +359,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersStatusResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersStatusResponseResultInner.java index 434d2b0f7..73c1237a2 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersStatusResponseResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersStatusResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OpenOrdersStatusResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OpenOrdersStatusResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -117,18 +117,6 @@ public class OpenOrdersStatusResponseResultInner extends BaseDTO { @jakarta.annotation.Nullable private String side; - public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; - - @SerializedName(SERIALIZED_NAME_STOP_PRICE) - @jakarta.annotation.Nullable - private String stopPrice; - - public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; - - @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) - @jakarta.annotation.Nullable - private String icebergQty; - public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) @@ -160,6 +148,96 @@ public class OpenOrdersStatusResponseResultInner extends BaseDTO { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + + @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @jakarta.annotation.Nullable + private String stopPrice; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OpenOrdersStatusResponseResultInner() {} public OpenOrdersStatusResponseResultInner symbol(@jakarta.annotation.Nullable String symbol) { @@ -207,7 +285,7 @@ public OpenOrdersStatusResponseResultInner orderListId( } /** - * Get orderListId + * Present only for orders that belong to an order list. * * @return orderListId */ @@ -306,7 +384,7 @@ public OpenOrdersStatusResponseResultInner origQuoteOrderQty( } /** - * Get origQuoteOrderQty + * Always present. Zero if the order type does not use `quoteOrderQty`. * * @return origQuoteOrderQty */ @@ -416,53 +494,13 @@ public void setSide(@jakarta.annotation.Nullable String side) { this.side = side; } - public OpenOrdersStatusResponseResultInner stopPrice( - @jakarta.annotation.Nullable String stopPrice) { - this.stopPrice = stopPrice; - return this; - } - - /** - * Get stopPrice - * - * @return stopPrice - */ - @jakarta.annotation.Nullable - public String getStopPrice() { - return stopPrice; - } - - public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { - this.stopPrice = stopPrice; - } - - public OpenOrdersStatusResponseResultInner icebergQty( - @jakarta.annotation.Nullable String icebergQty) { - this.icebergQty = icebergQty; - return this; - } - - /** - * Get icebergQty - * - * @return icebergQty - */ - @jakarta.annotation.Nullable - public String getIcebergQty() { - return icebergQty; - } - - public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { - this.icebergQty = icebergQty; - } - public OpenOrdersStatusResponseResultInner time(@jakarta.annotation.Nullable Long time) { this.time = time; return this; } /** - * Get time + * Order placement time. * * @return time */ @@ -482,7 +520,7 @@ public OpenOrdersStatusResponseResultInner updateTime( } /** - * Get updateTime + * Time of the last update to the order. * * @return updateTime */ @@ -556,6 +594,306 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OpenOrdersStatusResponseResultInner icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OpenOrdersStatusResponseResultInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OpenOrdersStatusResponseResultInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public OpenOrdersStatusResponseResultInner stopPrice( + @jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + /** + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. + * + * @return stopPrice + */ + @jakarta.annotation.Nullable + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + } + + public OpenOrdersStatusResponseResultInner strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OpenOrdersStatusResponseResultInner strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OpenOrdersStatusResponseResultInner trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OpenOrdersStatusResponseResultInner trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OpenOrdersStatusResponseResultInner usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OpenOrdersStatusResponseResultInner workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OpenOrdersStatusResponseResultInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OpenOrdersStatusResponseResultInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OpenOrdersStatusResponseResultInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OpenOrdersStatusResponseResultInner peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OpenOrdersStatusResponseResultInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -584,15 +922,39 @@ public boolean equals(Object o) { && Objects.equals(this.timeInForce, openOrdersStatusResponseResultInner.timeInForce) && Objects.equals(this.type, openOrdersStatusResponseResultInner.type) && Objects.equals(this.side, openOrdersStatusResponseResultInner.side) - && Objects.equals(this.stopPrice, openOrdersStatusResponseResultInner.stopPrice) - && Objects.equals(this.icebergQty, openOrdersStatusResponseResultInner.icebergQty) && Objects.equals(this.time, openOrdersStatusResponseResultInner.time) && Objects.equals(this.updateTime, openOrdersStatusResponseResultInner.updateTime) && Objects.equals(this.isWorking, openOrdersStatusResponseResultInner.isWorking) && Objects.equals(this.workingTime, openOrdersStatusResponseResultInner.workingTime) && Objects.equals( this.selfTradePreventionMode, - openOrdersStatusResponseResultInner.selfTradePreventionMode); + openOrdersStatusResponseResultInner.selfTradePreventionMode) + && Objects.equals(this.icebergQty, openOrdersStatusResponseResultInner.icebergQty) + && Objects.equals( + this.preventedMatchId, openOrdersStatusResponseResultInner.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + openOrdersStatusResponseResultInner.preventedQuantity) + && Objects.equals(this.stopPrice, openOrdersStatusResponseResultInner.stopPrice) + && Objects.equals(this.strategyId, openOrdersStatusResponseResultInner.strategyId) + && Objects.equals( + this.strategyType, openOrdersStatusResponseResultInner.strategyType) + && Objects.equals( + this.trailingDelta, openOrdersStatusResponseResultInner.trailingDelta) + && Objects.equals( + this.trailingTime, openOrdersStatusResponseResultInner.trailingTime) + && Objects.equals(this.usedSor, openOrdersStatusResponseResultInner.usedSor) + && Objects.equals( + this.workingFloor, openOrdersStatusResponseResultInner.workingFloor) + && Objects.equals( + this.pegPriceType, openOrdersStatusResponseResultInner.pegPriceType) + && Objects.equals( + this.pegOffsetType, openOrdersStatusResponseResultInner.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, openOrdersStatusResponseResultInner.pegOffsetValue) + && Objects.equals(this.peggedPrice, openOrdersStatusResponseResultInner.peggedPrice) + && Objects.equals( + this.expiryReason, openOrdersStatusResponseResultInner.expiryReason); } @Override @@ -611,13 +973,26 @@ public int hashCode() { timeInForce, type, side, - stopPrice, - icebergQty, time, updateTime, isWorking, workingTime, - selfTradePreventionMode); + selfTradePreventionMode, + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -639,8 +1014,6 @@ public String toString() { sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); - sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); - sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); sb.append(" time: ").append(toIndentedString(time)).append("\n"); sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); sb.append(" isWorking: ").append(toIndentedString(isWorking)).append("\n"); @@ -648,6 +1021,21 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -721,16 +1109,6 @@ public String toUrlQueryString() { String sideValueAsString = sideValue.toString(); valMap.put("side", sideValueAsString); } - String stopPriceValue = getStopPrice(); - if (stopPriceValue != null) { - String stopPriceValueAsString = stopPriceValue.toString(); - valMap.put("stopPrice", stopPriceValueAsString); - } - String icebergQtyValue = getIcebergQty(); - if (icebergQtyValue != null) { - String icebergQtyValueAsString = icebergQtyValue.toString(); - valMap.put("icebergQty", icebergQtyValueAsString); - } Long timeValue = getTime(); if (timeValue != null) { String timeValueAsString = timeValue.toString(); @@ -756,6 +1134,81 @@ public String toUrlQueryString() { String selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); valMap.put("selfTradePreventionMode", selfTradePreventionModeValueAsString); } + String icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + String icebergQtyValueAsString = icebergQtyValue.toString(); + valMap.put("icebergQty", icebergQtyValueAsString); + } + Long preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + String preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + valMap.put("preventedMatchId", preventedMatchIdValueAsString); + } + String preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + String preventedQuantityValueAsString = preventedQuantityValue.toString(); + valMap.put("preventedQuantity", preventedQuantityValueAsString); + } + String stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + String stopPriceValueAsString = stopPriceValue.toString(); + valMap.put("stopPrice", stopPriceValueAsString); + } + Long strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + String strategyIdValueAsString = strategyIdValue.toString(); + valMap.put("strategyId", strategyIdValueAsString); + } + Long strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + String strategyTypeValueAsString = strategyTypeValue.toString(); + valMap.put("strategyType", strategyTypeValueAsString); + } + Long trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + String trailingDeltaValueAsString = trailingDeltaValue.toString(); + valMap.put("trailingDelta", trailingDeltaValueAsString); + } + Long trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + String trailingTimeValueAsString = trailingTimeValue.toString(); + valMap.put("trailingTime", trailingTimeValueAsString); + } + Boolean usedSorValue = getUsedSor(); + if (usedSorValue != null) { + String usedSorValueAsString = usedSorValue.toString(); + valMap.put("usedSor", usedSorValueAsString); + } + String workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + String workingFloorValueAsString = workingFloorValue.toString(); + valMap.put("workingFloor", workingFloorValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -819,14 +1272,6 @@ public Map toMap() { if (sideValue != null) { valMap.put("side", sideValue); } - Object stopPriceValue = getStopPrice(); - if (stopPriceValue != null) { - valMap.put("stopPrice", stopPriceValue); - } - Object icebergQtyValue = getIcebergQty(); - if (icebergQtyValue != null) { - valMap.put("icebergQty", icebergQtyValue); - } Object timeValue = getTime(); if (timeValue != null) { valMap.put("time", timeValue); @@ -847,6 +1292,66 @@ public Map toMap() { if (selfTradePreventionModeValue != null) { valMap.put("selfTradePreventionMode", selfTradePreventionModeValue); } + Object icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + valMap.put("icebergQty", icebergQtyValue); + } + Object preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + valMap.put("preventedMatchId", preventedMatchIdValue); + } + Object preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + valMap.put("preventedQuantity", preventedQuantityValue); + } + Object stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + valMap.put("stopPrice", stopPriceValue); + } + Object strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + valMap.put("strategyId", strategyIdValue); + } + Object strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + valMap.put("strategyType", strategyTypeValue); + } + Object trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + valMap.put("trailingDelta", trailingDeltaValue); + } + Object trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + valMap.put("trailingTime", trailingTimeValue); + } + Object usedSorValue = getUsedSor(); + if (usedSorValue != null) { + valMap.put("usedSor", usedSorValue); + } + Object workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + valMap.put("workingFloor", workingFloorValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -886,13 +1391,26 @@ private String toIndentedString(Object o) { openapiFields.add("timeInForce"); openapiFields.add("type"); openapiFields.add("side"); - openapiFields.add("stopPrice"); - openapiFields.add("icebergQty"); openapiFields.add("time"); openapiFields.add("updateTime"); openapiFields.add("isWorking"); openapiFields.add("workingTime"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -1020,6 +1538,32 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("side").toString())); } + if ((jsonObj.get("selfTradePreventionMode") != null + && !jsonObj.get("selfTradePreventionMode").isJsonNull()) + && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `selfTradePreventionMode` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("selfTradePreventionMode").toString())); + } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) && !jsonObj.get("stopPrice").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -1028,22 +1572,45 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("stopPrice").toString())); } - if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) - && !jsonObj.get("icebergQty").isJsonPrimitive()) { + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `icebergQty` to be a primitive type in the JSON" + "Expected the field `workingFloor` to be a primitive type in the JSON" + " string but got `%s`", - jsonObj.get("icebergQty").toString())); + jsonObj.get("workingFloor").toString())); } - if ((jsonObj.get("selfTradePreventionMode") != null - && !jsonObj.get("selfTradePreventionMode").isJsonNull()) - && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `selfTradePreventionMode` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("selfTradePreventionMode").toString())); + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); } } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityRequest.java index 55aec357f..5d7924248 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OrderAmendKeepPriorityRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderAmendKeepPriorityRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -79,6 +85,25 @@ public class OrderAmendKeepPriorityRequest extends BaseDTO { public OrderAmendKeepPriorityRequest() {} + public OrderAmendKeepPriorityRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OrderAmendKeepPriorityRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -105,7 +130,7 @@ public OrderAmendKeepPriorityRequest orderId(@jakarta.annotation.Nullable Long o } /** - * Get orderId + * `orderId` or `origClientOrderId` must be sent * * @return orderId */ @@ -125,7 +150,7 @@ public OrderAmendKeepPriorityRequest origClientOrderId( } /** - * Get origClientOrderId + * `orderId` or `origClientOrderId` must be sent * * @return origClientOrderId */ @@ -145,7 +170,9 @@ public OrderAmendKeepPriorityRequest newClientOrderId( } /** - * Get newClientOrderId + * The new client order ID for the order after being amended. <br> If not sent, one will + * be randomly generated. <br> It is possible to reuse the current clientOrderId by + * sending it as the `newClientOrderId`. * * @return newClientOrderId */ @@ -164,7 +191,7 @@ public OrderAmendKeepPriorityRequest newQty(@jakarta.annotation.Nonnull Double n } /** - * Get newQty + * `newQty` must be greater than 0 and less than the order's quantity. * * @return newQty */ @@ -186,12 +213,14 @@ public OrderAmendKeepPriorityRequest recvWindow( } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -210,7 +239,8 @@ public boolean equals(Object o) { } OrderAmendKeepPriorityRequest orderAmendKeepPriorityRequest = (OrderAmendKeepPriorityRequest) o; - return Objects.equals(this.symbol, orderAmendKeepPriorityRequest.symbol) + return Objects.equals(this.id, orderAmendKeepPriorityRequest.id) + && Objects.equals(this.symbol, orderAmendKeepPriorityRequest.symbol) && Objects.equals(this.orderId, orderAmendKeepPriorityRequest.orderId) && Objects.equals( this.origClientOrderId, orderAmendKeepPriorityRequest.origClientOrderId) @@ -223,13 +253,14 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - symbol, orderId, origClientOrderId, newClientOrderId, newQty, recvWindow); + id, symbol, orderId, origClientOrderId, newClientOrderId, newQty, recvWindow); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderAmendKeepPriorityRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); sb.append(" origClientOrderId: ").append(toIndentedString(origClientOrderId)).append("\n"); @@ -244,6 +275,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -286,6 +322,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -336,6 +376,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("orderId"); openapiFields.add("origClientOrderId"); @@ -390,6 +431,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponse.java index a02fce774..34f06bc80 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderAmendKeepPriorityResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderAmendKeepPriorityResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class OrderAmendKeepPriorityResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public OrderAmendKeepPriorityResponse() {} @@ -130,12 +130,14 @@ public void setResult( } public OrderAmendKeepPriorityResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderAmendKeepPriorityResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public OrderAmendKeepPriorityResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -150,11 +152,13 @@ public OrderAmendKeepPriorityResponse addRateLimitsItem(RateLimits rateLimitsIte */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -210,7 +214,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -334,7 +338,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponseResult.java index a4154dd1a..7e429a7d9 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** OrderAmendKeepPriorityResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderAmendKeepPriorityResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_TRANSACT_TIME = "transactTime"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponseResultAmendedOrder.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponseResultAmendedOrder.java index eebd6f8f5..bdda4274b 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponseResultAmendedOrder.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponseResultAmendedOrder.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderAmendKeepPriorityResponseResultAmendedOrder */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderAmendKeepPriorityResponseResultAmendedOrder extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -142,6 +142,96 @@ public class OrderAmendKeepPriorityResponseResultAmendedOrder extends BaseDTO { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + + @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @jakarta.annotation.Nullable + private String stopPrice; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OrderAmendKeepPriorityResponseResultAmendedOrder() {} public OrderAmendKeepPriorityResponseResultAmendedOrder symbol( @@ -485,6 +575,306 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OrderAmendKeepPriorityResponseResultAmendedOrder icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderAmendKeepPriorityResponseResultAmendedOrder preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderAmendKeepPriorityResponseResultAmendedOrder preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public OrderAmendKeepPriorityResponseResultAmendedOrder stopPrice( + @jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + /** + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. + * + * @return stopPrice + */ + @jakarta.annotation.Nullable + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + } + + public OrderAmendKeepPriorityResponseResultAmendedOrder strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderAmendKeepPriorityResponseResultAmendedOrder strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderAmendKeepPriorityResponseResultAmendedOrder trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderAmendKeepPriorityResponseResultAmendedOrder trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderAmendKeepPriorityResponseResultAmendedOrder usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderAmendKeepPriorityResponseResultAmendedOrder workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderAmendKeepPriorityResponseResultAmendedOrder pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderAmendKeepPriorityResponseResultAmendedOrder pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderAmendKeepPriorityResponseResultAmendedOrder pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderAmendKeepPriorityResponseResultAmendedOrder peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderAmendKeepPriorityResponseResultAmendedOrder expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -535,7 +925,50 @@ public boolean equals(Object o) { orderAmendKeepPriorityResponseResultAmendedOrder.workingTime) && Objects.equals( this.selfTradePreventionMode, - orderAmendKeepPriorityResponseResultAmendedOrder.selfTradePreventionMode); + orderAmendKeepPriorityResponseResultAmendedOrder.selfTradePreventionMode) + && Objects.equals( + this.icebergQty, + orderAmendKeepPriorityResponseResultAmendedOrder.icebergQty) + && Objects.equals( + this.preventedMatchId, + orderAmendKeepPriorityResponseResultAmendedOrder.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + orderAmendKeepPriorityResponseResultAmendedOrder.preventedQuantity) + && Objects.equals( + this.stopPrice, orderAmendKeepPriorityResponseResultAmendedOrder.stopPrice) + && Objects.equals( + this.strategyId, + orderAmendKeepPriorityResponseResultAmendedOrder.strategyId) + && Objects.equals( + this.strategyType, + orderAmendKeepPriorityResponseResultAmendedOrder.strategyType) + && Objects.equals( + this.trailingDelta, + orderAmendKeepPriorityResponseResultAmendedOrder.trailingDelta) + && Objects.equals( + this.trailingTime, + orderAmendKeepPriorityResponseResultAmendedOrder.trailingTime) + && Objects.equals( + this.usedSor, orderAmendKeepPriorityResponseResultAmendedOrder.usedSor) + && Objects.equals( + this.workingFloor, + orderAmendKeepPriorityResponseResultAmendedOrder.workingFloor) + && Objects.equals( + this.pegPriceType, + orderAmendKeepPriorityResponseResultAmendedOrder.pegPriceType) + && Objects.equals( + this.pegOffsetType, + orderAmendKeepPriorityResponseResultAmendedOrder.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, + orderAmendKeepPriorityResponseResultAmendedOrder.pegOffsetValue) + && Objects.equals( + this.peggedPrice, + orderAmendKeepPriorityResponseResultAmendedOrder.peggedPrice) + && Objects.equals( + this.expiryReason, + orderAmendKeepPriorityResponseResultAmendedOrder.expiryReason); } @Override @@ -557,7 +990,22 @@ public int hashCode() { type, side, workingTime, - selfTradePreventionMode); + selfTradePreventionMode, + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -585,6 +1033,21 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -678,6 +1141,81 @@ public String toUrlQueryString() { String selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); valMap.put("selfTradePreventionMode", selfTradePreventionModeValueAsString); } + String icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + String icebergQtyValueAsString = icebergQtyValue.toString(); + valMap.put("icebergQty", icebergQtyValueAsString); + } + Long preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + String preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + valMap.put("preventedMatchId", preventedMatchIdValueAsString); + } + String preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + String preventedQuantityValueAsString = preventedQuantityValue.toString(); + valMap.put("preventedQuantity", preventedQuantityValueAsString); + } + String stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + String stopPriceValueAsString = stopPriceValue.toString(); + valMap.put("stopPrice", stopPriceValueAsString); + } + Long strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + String strategyIdValueAsString = strategyIdValue.toString(); + valMap.put("strategyId", strategyIdValueAsString); + } + Long strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + String strategyTypeValueAsString = strategyTypeValue.toString(); + valMap.put("strategyType", strategyTypeValueAsString); + } + Long trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + String trailingDeltaValueAsString = trailingDeltaValue.toString(); + valMap.put("trailingDelta", trailingDeltaValueAsString); + } + Long trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + String trailingTimeValueAsString = trailingTimeValue.toString(); + valMap.put("trailingTime", trailingTimeValueAsString); + } + Boolean usedSorValue = getUsedSor(); + if (usedSorValue != null) { + String usedSorValueAsString = usedSorValue.toString(); + valMap.put("usedSor", usedSorValueAsString); + } + String workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + String workingFloorValueAsString = workingFloorValue.toString(); + valMap.put("workingFloor", workingFloorValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -757,6 +1295,66 @@ public Map toMap() { if (selfTradePreventionModeValue != null) { valMap.put("selfTradePreventionMode", selfTradePreventionModeValue); } + Object icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + valMap.put("icebergQty", icebergQtyValue); + } + Object preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + valMap.put("preventedMatchId", preventedMatchIdValue); + } + Object preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + valMap.put("preventedQuantity", preventedQuantityValue); + } + Object stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + valMap.put("stopPrice", stopPriceValue); + } + Object strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + valMap.put("strategyId", strategyIdValue); + } + Object strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + valMap.put("strategyType", strategyTypeValue); + } + Object trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + valMap.put("trailingDelta", trailingDeltaValue); + } + Object trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + valMap.put("trailingTime", trailingTimeValue); + } + Object usedSorValue = getUsedSor(); + if (usedSorValue != null) { + valMap.put("usedSor", usedSorValue); + } + Object workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + valMap.put("workingFloor", workingFloorValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -800,6 +1398,21 @@ private String toIndentedString(Object o) { openapiFields.add("side"); openapiFields.add("workingTime"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -956,6 +1569,71 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) + && !jsonObj.get("stopPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `stopPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("stopPrice").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponseResultListStatus.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponseResultListStatus.java index faa9984e1..34dbca02e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponseResultListStatus.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponseResultListStatus.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderAmendKeepPriorityResponseResultListStatus */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderAmendKeepPriorityResponseResultListStatus extends BaseDTO { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponseResultListStatusOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponseResultListStatusOrdersInner.java index 8a50b08ff..e3ec75e13 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponseResultListStatusOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponseResultListStatusOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderAmendKeepPriorityResponseResultListStatusOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderAmendKeepPriorityResponseResultListStatusOrdersInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsRequest.java index 6b81a1bd2..0c387e40a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OrderAmendmentsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderAmendmentsRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -73,6 +79,25 @@ public class OrderAmendmentsRequest extends BaseDTO { public OrderAmendmentsRequest() {} + public OrderAmendmentsRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OrderAmendmentsRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -99,7 +124,7 @@ public OrderAmendmentsRequest orderId(@jakarta.annotation.Nonnull Long orderId) } /** - * Get orderId + * Order ID * * @return orderId */ @@ -120,7 +145,7 @@ public OrderAmendmentsRequest fromExecutionId( } /** - * Get fromExecutionId + * Execution ID to begin at * * @return fromExecutionId */ @@ -139,11 +164,12 @@ public OrderAmendmentsRequest limit(@jakarta.annotation.Nullable Long limit) { } /** - * Get limit + * Default: 500; Maximum: 1000 maximum: 1000 * * @return limit */ @jakarta.annotation.Nullable + @Max(1000L) public Long getLimit() { return limit; } @@ -158,12 +184,14 @@ public OrderAmendmentsRequest recvWindow(@jakarta.annotation.Nullable Double rec } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -181,7 +209,8 @@ public boolean equals(Object o) { return false; } OrderAmendmentsRequest orderAmendmentsRequest = (OrderAmendmentsRequest) o; - return Objects.equals(this.symbol, orderAmendmentsRequest.symbol) + return Objects.equals(this.id, orderAmendmentsRequest.id) + && Objects.equals(this.symbol, orderAmendmentsRequest.symbol) && Objects.equals(this.orderId, orderAmendmentsRequest.orderId) && Objects.equals(this.fromExecutionId, orderAmendmentsRequest.fromExecutionId) && Objects.equals(this.limit, orderAmendmentsRequest.limit) @@ -190,13 +219,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(symbol, orderId, fromExecutionId, limit, recvWindow); + return Objects.hash(id, symbol, orderId, fromExecutionId, limit, recvWindow); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderAmendmentsRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); sb.append(" fromExecutionId: ").append(toIndentedString(fromExecutionId)).append("\n"); @@ -210,6 +240,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -247,6 +282,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -293,6 +332,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("orderId"); openapiFields.add("fromExecutionId"); @@ -345,6 +385,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsResponse.java index 20b280497..67b38bef9 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderAmendmentsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderAmendmentsResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class OrderAmendmentsResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public OrderAmendmentsResponse() {} @@ -138,12 +138,14 @@ public void setResult( } public OrderAmendmentsResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderAmendmentsResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public OrderAmendmentsResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -158,11 +160,13 @@ public OrderAmendmentsResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -217,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -355,7 +359,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsResponseResultInner.java index fc18a1865..668517076 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsResponseResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderAmendmentsResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderAmendmentsResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceRequest.java index 97b93b7f0..9f95802c7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OrderCancelReplaceRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderCancelReplaceRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -197,6 +203,25 @@ public class OrderCancelReplaceRequest extends BaseDTO { public OrderCancelReplaceRequest() {} + public OrderCancelReplaceRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OrderCancelReplaceRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -247,7 +272,12 @@ public OrderCancelReplaceRequest cancelOrderId( } /** - * Get cancelOrderId + * Either `cancelOrderId` or `cancelOrigClientOrderId` must be sent. + * <br></br>If both `cancelOrderId` and + * `cancelOrigClientOrderId` parameters are provided, the `cancelOrderId` is + * searched first, then the `cancelOrigClientOrderId` from that result is checked + * against that order. <br></br>If both conditions are not met the request will be + * rejected. * * @return cancelOrderId */ @@ -267,7 +297,12 @@ public OrderCancelReplaceRequest cancelOrigClientOrderId( } /** - * Get cancelOrigClientOrderId + * Either `cancelOrderId` or `cancelOrigClientOrderId` must be sent. + * <br></br> If both `cancelOrderId` and + * `cancelOrigClientOrderId` parameters are provided, the `cancelOrderId` is + * searched first, then the `cancelOrigClientOrderId` from that result is checked + * against that order. <br></br> If both conditions are not met the request will be + * rejected. * * @return cancelOrigClientOrderId */ @@ -288,7 +323,7 @@ public OrderCancelReplaceRequest cancelNewClientOrderId( } /** - * Get cancelNewClientOrderId + * Used to uniquely identify this cancel. Automatically generated by default. * * @return cancelNewClientOrderId */ @@ -433,7 +468,7 @@ public OrderCancelReplaceRequest newClientOrderId( } /** - * Get newClientOrderId + * Used to identify the new order. * * @return newClientOrderId */ @@ -474,7 +509,8 @@ public OrderCancelReplaceRequest stopPrice(@jakarta.annotation.Nullable Double s } /** - * Get stopPrice + * Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and + * `TAKE_PROFIT_LIMIT` orders. * * @return stopPrice */ @@ -495,7 +531,7 @@ public OrderCancelReplaceRequest trailingDelta( } /** - * Get trailingDelta + * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) * * @return trailingDelta */ @@ -515,7 +551,8 @@ public OrderCancelReplaceRequest icebergQty(@jakarta.annotation.Nullable Double } /** - * Get icebergQty + * Used with `LIMIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` + * to create an iceberg order. * * @return icebergQty */ @@ -555,7 +592,7 @@ public OrderCancelReplaceRequest strategyType( } /** - * Get strategyType + * The value cannot be less than `1000000`. * * @return strategyType */ @@ -662,11 +699,12 @@ public OrderCancelReplaceRequest pegOffsetValue( } /** - * Get pegOffsetValue + * Price level to peg the price to (max: 100) <br> See Pegged Orders maximum: 100 * * @return pegOffsetValue */ @jakarta.annotation.Nullable + @Max(100) public Integer getPegOffsetValue() { return pegOffsetValue; } @@ -702,12 +740,14 @@ public OrderCancelReplaceRequest recvWindow(@jakarta.annotation.Nullable Double } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -725,7 +765,8 @@ public boolean equals(Object o) { return false; } OrderCancelReplaceRequest orderCancelReplaceRequest = (OrderCancelReplaceRequest) o; - return Objects.equals(this.symbol, orderCancelReplaceRequest.symbol) + return Objects.equals(this.id, orderCancelReplaceRequest.id) + && Objects.equals(this.symbol, orderCancelReplaceRequest.symbol) && Objects.equals( this.cancelReplaceMode, orderCancelReplaceRequest.cancelReplaceMode) && Objects.equals(this.cancelOrderId, orderCancelReplaceRequest.cancelOrderId) @@ -765,6 +806,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + id, symbol, cancelReplaceMode, cancelOrderId, @@ -796,6 +838,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderCancelReplaceRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" cancelReplaceMode: ").append(toIndentedString(cancelReplaceMode)).append("\n"); sb.append(" cancelOrderId: ").append(toIndentedString(cancelOrderId)).append("\n"); @@ -839,6 +882,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -981,6 +1029,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -1107,6 +1159,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("cancelReplaceMode"); openapiFields.add("cancelOrderId"); @@ -1181,6 +1234,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponse.java index f66c12d1e..78a54993d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderCancelReplaceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderCancelReplaceResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class OrderCancelReplaceResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public OrderCancelReplaceResponse() {} @@ -129,12 +129,14 @@ public void setResult(@jakarta.annotation.Nullable OrderCancelReplaceResponseRes } public OrderCancelReplaceResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderCancelReplaceResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public OrderCancelReplaceResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -149,11 +151,13 @@ public OrderCancelReplaceResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -208,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -331,7 +335,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResult.java index 81450d715..47a6ff7f7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** OrderCancelReplaceResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderCancelReplaceResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_CANCEL_RESULT = "cancelResult"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResultCancelResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResultCancelResponse.java index d3a3c14dd..6861077ea 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResultCancelResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResultCancelResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderCancelReplaceResponseResultCancelResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderCancelReplaceResponseResultCancelResponse extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -136,6 +136,96 @@ public class OrderCancelReplaceResponseResultCancelResponse extends BaseDTO { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + + @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @jakarta.annotation.Nullable + private String stopPrice; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OrderCancelReplaceResponseResultCancelResponse() {} public OrderCancelReplaceResponseResultCancelResponse symbol( @@ -459,6 +549,306 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OrderCancelReplaceResponseResultCancelResponse icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderCancelReplaceResponseResultCancelResponse preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderCancelReplaceResponseResultCancelResponse preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public OrderCancelReplaceResponseResultCancelResponse stopPrice( + @jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + /** + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. + * + * @return stopPrice + */ + @jakarta.annotation.Nullable + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + } + + public OrderCancelReplaceResponseResultCancelResponse strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderCancelReplaceResponseResultCancelResponse strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderCancelReplaceResponseResultCancelResponse trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderCancelReplaceResponseResultCancelResponse trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderCancelReplaceResponseResultCancelResponse usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderCancelReplaceResponseResultCancelResponse workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderCancelReplaceResponseResultCancelResponse pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderCancelReplaceResponseResultCancelResponse pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderCancelReplaceResponseResultCancelResponse pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderCancelReplaceResponseResultCancelResponse peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderCancelReplaceResponseResultCancelResponse expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -506,7 +896,48 @@ public boolean equals(Object o) { && Objects.equals(this.side, orderCancelReplaceResponseResultCancelResponse.side) && Objects.equals( this.selfTradePreventionMode, - orderCancelReplaceResponseResultCancelResponse.selfTradePreventionMode); + orderCancelReplaceResponseResultCancelResponse.selfTradePreventionMode) + && Objects.equals( + this.icebergQty, orderCancelReplaceResponseResultCancelResponse.icebergQty) + && Objects.equals( + this.preventedMatchId, + orderCancelReplaceResponseResultCancelResponse.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + orderCancelReplaceResponseResultCancelResponse.preventedQuantity) + && Objects.equals( + this.stopPrice, orderCancelReplaceResponseResultCancelResponse.stopPrice) + && Objects.equals( + this.strategyId, orderCancelReplaceResponseResultCancelResponse.strategyId) + && Objects.equals( + this.strategyType, + orderCancelReplaceResponseResultCancelResponse.strategyType) + && Objects.equals( + this.trailingDelta, + orderCancelReplaceResponseResultCancelResponse.trailingDelta) + && Objects.equals( + this.trailingTime, + orderCancelReplaceResponseResultCancelResponse.trailingTime) + && Objects.equals( + this.usedSor, orderCancelReplaceResponseResultCancelResponse.usedSor) + && Objects.equals( + this.workingFloor, + orderCancelReplaceResponseResultCancelResponse.workingFloor) + && Objects.equals( + this.pegPriceType, + orderCancelReplaceResponseResultCancelResponse.pegPriceType) + && Objects.equals( + this.pegOffsetType, + orderCancelReplaceResponseResultCancelResponse.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, + orderCancelReplaceResponseResultCancelResponse.pegOffsetValue) + && Objects.equals( + this.peggedPrice, + orderCancelReplaceResponseResultCancelResponse.peggedPrice) + && Objects.equals( + this.expiryReason, + orderCancelReplaceResponseResultCancelResponse.expiryReason); } @Override @@ -527,7 +958,22 @@ public int hashCode() { timeInForce, type, side, - selfTradePreventionMode); + selfTradePreventionMode, + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -554,6 +1000,21 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -642,6 +1103,81 @@ public String toUrlQueryString() { String selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); valMap.put("selfTradePreventionMode", selfTradePreventionModeValueAsString); } + String icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + String icebergQtyValueAsString = icebergQtyValue.toString(); + valMap.put("icebergQty", icebergQtyValueAsString); + } + Long preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + String preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + valMap.put("preventedMatchId", preventedMatchIdValueAsString); + } + String preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + String preventedQuantityValueAsString = preventedQuantityValue.toString(); + valMap.put("preventedQuantity", preventedQuantityValueAsString); + } + String stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + String stopPriceValueAsString = stopPriceValue.toString(); + valMap.put("stopPrice", stopPriceValueAsString); + } + Long strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + String strategyIdValueAsString = strategyIdValue.toString(); + valMap.put("strategyId", strategyIdValueAsString); + } + Long strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + String strategyTypeValueAsString = strategyTypeValue.toString(); + valMap.put("strategyType", strategyTypeValueAsString); + } + Long trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + String trailingDeltaValueAsString = trailingDeltaValue.toString(); + valMap.put("trailingDelta", trailingDeltaValueAsString); + } + Long trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + String trailingTimeValueAsString = trailingTimeValue.toString(); + valMap.put("trailingTime", trailingTimeValueAsString); + } + Boolean usedSorValue = getUsedSor(); + if (usedSorValue != null) { + String usedSorValueAsString = usedSorValue.toString(); + valMap.put("usedSor", usedSorValueAsString); + } + String workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + String workingFloorValueAsString = workingFloorValue.toString(); + valMap.put("workingFloor", workingFloorValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -717,6 +1253,66 @@ public Map toMap() { if (selfTradePreventionModeValue != null) { valMap.put("selfTradePreventionMode", selfTradePreventionModeValue); } + Object icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + valMap.put("icebergQty", icebergQtyValue); + } + Object preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + valMap.put("preventedMatchId", preventedMatchIdValue); + } + Object preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + valMap.put("preventedQuantity", preventedQuantityValue); + } + Object stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + valMap.put("stopPrice", stopPriceValue); + } + Object strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + valMap.put("strategyId", strategyIdValue); + } + Object strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + valMap.put("strategyType", strategyTypeValue); + } + Object trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + valMap.put("trailingDelta", trailingDeltaValue); + } + Object trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + valMap.put("trailingTime", trailingTimeValue); + } + Object usedSorValue = getUsedSor(); + if (usedSorValue != null) { + valMap.put("usedSor", usedSorValue); + } + Object workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + valMap.put("workingFloor", workingFloorValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -759,6 +1355,21 @@ private String toIndentedString(Object o) { openapiFields.add("type"); openapiFields.add("side"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -907,6 +1518,71 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) + && !jsonObj.get("stopPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `stopPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("stopPrice").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResultNewOrderResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResultNewOrderResponse.java index 1e6afe980..3a9fdbf1f 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResultNewOrderResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResultNewOrderResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderCancelReplaceResponseResultNewOrderResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderCancelReplaceResponseResultNewOrderResponse extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -130,6 +130,96 @@ public class OrderCancelReplaceResponseResultNewOrderResponse extends BaseDTO { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + + @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @jakarta.annotation.Nullable + private String stopPrice; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OrderCancelReplaceResponseResultNewOrderResponse() {} public OrderCancelReplaceResponseResultNewOrderResponse symbol( @@ -433,6 +523,306 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OrderCancelReplaceResponseResultNewOrderResponse icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderCancelReplaceResponseResultNewOrderResponse preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderCancelReplaceResponseResultNewOrderResponse preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public OrderCancelReplaceResponseResultNewOrderResponse stopPrice( + @jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + /** + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. + * + * @return stopPrice + */ + @jakarta.annotation.Nullable + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + } + + public OrderCancelReplaceResponseResultNewOrderResponse strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderCancelReplaceResponseResultNewOrderResponse strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderCancelReplaceResponseResultNewOrderResponse trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderCancelReplaceResponseResultNewOrderResponse trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderCancelReplaceResponseResultNewOrderResponse usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderCancelReplaceResponseResultNewOrderResponse workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderCancelReplaceResponseResultNewOrderResponse pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderCancelReplaceResponseResultNewOrderResponse pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderCancelReplaceResponseResultNewOrderResponse pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderCancelReplaceResponseResultNewOrderResponse peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderCancelReplaceResponseResultNewOrderResponse expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -478,7 +868,50 @@ public boolean equals(Object o) { && Objects.equals(this.side, orderCancelReplaceResponseResultNewOrderResponse.side) && Objects.equals( this.selfTradePreventionMode, - orderCancelReplaceResponseResultNewOrderResponse.selfTradePreventionMode); + orderCancelReplaceResponseResultNewOrderResponse.selfTradePreventionMode) + && Objects.equals( + this.icebergQty, + orderCancelReplaceResponseResultNewOrderResponse.icebergQty) + && Objects.equals( + this.preventedMatchId, + orderCancelReplaceResponseResultNewOrderResponse.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + orderCancelReplaceResponseResultNewOrderResponse.preventedQuantity) + && Objects.equals( + this.stopPrice, orderCancelReplaceResponseResultNewOrderResponse.stopPrice) + && Objects.equals( + this.strategyId, + orderCancelReplaceResponseResultNewOrderResponse.strategyId) + && Objects.equals( + this.strategyType, + orderCancelReplaceResponseResultNewOrderResponse.strategyType) + && Objects.equals( + this.trailingDelta, + orderCancelReplaceResponseResultNewOrderResponse.trailingDelta) + && Objects.equals( + this.trailingTime, + orderCancelReplaceResponseResultNewOrderResponse.trailingTime) + && Objects.equals( + this.usedSor, orderCancelReplaceResponseResultNewOrderResponse.usedSor) + && Objects.equals( + this.workingFloor, + orderCancelReplaceResponseResultNewOrderResponse.workingFloor) + && Objects.equals( + this.pegPriceType, + orderCancelReplaceResponseResultNewOrderResponse.pegPriceType) + && Objects.equals( + this.pegOffsetType, + orderCancelReplaceResponseResultNewOrderResponse.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, + orderCancelReplaceResponseResultNewOrderResponse.pegOffsetValue) + && Objects.equals( + this.peggedPrice, + orderCancelReplaceResponseResultNewOrderResponse.peggedPrice) + && Objects.equals( + this.expiryReason, + orderCancelReplaceResponseResultNewOrderResponse.expiryReason); } @Override @@ -498,7 +931,22 @@ public int hashCode() { timeInForce, type, side, - selfTradePreventionMode); + selfTradePreventionMode, + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -524,6 +972,21 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -607,6 +1070,81 @@ public String toUrlQueryString() { String selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); valMap.put("selfTradePreventionMode", selfTradePreventionModeValueAsString); } + String icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + String icebergQtyValueAsString = icebergQtyValue.toString(); + valMap.put("icebergQty", icebergQtyValueAsString); + } + Long preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + String preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + valMap.put("preventedMatchId", preventedMatchIdValueAsString); + } + String preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + String preventedQuantityValueAsString = preventedQuantityValue.toString(); + valMap.put("preventedQuantity", preventedQuantityValueAsString); + } + String stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + String stopPriceValueAsString = stopPriceValue.toString(); + valMap.put("stopPrice", stopPriceValueAsString); + } + Long strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + String strategyIdValueAsString = strategyIdValue.toString(); + valMap.put("strategyId", strategyIdValueAsString); + } + Long strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + String strategyTypeValueAsString = strategyTypeValue.toString(); + valMap.put("strategyType", strategyTypeValueAsString); + } + Long trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + String trailingDeltaValueAsString = trailingDeltaValue.toString(); + valMap.put("trailingDelta", trailingDeltaValueAsString); + } + Long trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + String trailingTimeValueAsString = trailingTimeValue.toString(); + valMap.put("trailingTime", trailingTimeValueAsString); + } + Boolean usedSorValue = getUsedSor(); + if (usedSorValue != null) { + String usedSorValueAsString = usedSorValue.toString(); + valMap.put("usedSor", usedSorValueAsString); + } + String workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + String workingFloorValueAsString = workingFloorValue.toString(); + valMap.put("workingFloor", workingFloorValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -678,6 +1216,66 @@ public Map toMap() { if (selfTradePreventionModeValue != null) { valMap.put("selfTradePreventionMode", selfTradePreventionModeValue); } + Object icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + valMap.put("icebergQty", icebergQtyValue); + } + Object preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + valMap.put("preventedMatchId", preventedMatchIdValue); + } + Object preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + valMap.put("preventedQuantity", preventedQuantityValue); + } + Object stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + valMap.put("stopPrice", stopPriceValue); + } + Object strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + valMap.put("strategyId", strategyIdValue); + } + Object strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + valMap.put("strategyType", strategyTypeValue); + } + Object trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + valMap.put("trailingDelta", trailingDeltaValue); + } + Object trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + valMap.put("trailingTime", trailingTimeValue); + } + Object usedSorValue = getUsedSor(); + if (usedSorValue != null) { + valMap.put("usedSor", usedSorValue); + } + Object workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + valMap.put("workingFloor", workingFloorValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -719,6 +1317,21 @@ private String toIndentedString(Object o) { openapiFields.add("type"); openapiFields.add("side"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -859,6 +1472,71 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) + && !jsonObj.get("stopPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `stopPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("stopPrice").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelRequest.java index fb3829f61..2d1c9b69e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OrderCancelRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderCancelRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -79,6 +85,25 @@ public class OrderCancelRequest extends BaseDTO { public OrderCancelRequest() {} + public OrderCancelRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OrderCancelRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -145,7 +170,7 @@ public OrderCancelRequest newClientOrderId( } /** - * Get newClientOrderId + * Used to uniquely identify this cancel. Automatically generated by default. * * @return newClientOrderId */ @@ -186,12 +211,14 @@ public OrderCancelRequest recvWindow(@jakarta.annotation.Nullable Double recvWin } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -209,7 +236,8 @@ public boolean equals(Object o) { return false; } OrderCancelRequest orderCancelRequest = (OrderCancelRequest) o; - return Objects.equals(this.symbol, orderCancelRequest.symbol) + return Objects.equals(this.id, orderCancelRequest.id) + && Objects.equals(this.symbol, orderCancelRequest.symbol) && Objects.equals(this.orderId, orderCancelRequest.orderId) && Objects.equals(this.origClientOrderId, orderCancelRequest.origClientOrderId) && Objects.equals(this.newClientOrderId, orderCancelRequest.newClientOrderId) @@ -220,6 +248,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + id, symbol, orderId, origClientOrderId, @@ -232,6 +261,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderCancelRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); sb.append(" origClientOrderId: ").append(toIndentedString(origClientOrderId)).append("\n"); @@ -248,6 +278,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -290,6 +325,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -340,6 +379,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("orderId"); openapiFields.add("origClientOrderId"); @@ -392,6 +432,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelResponse.java index 6d108f3b3..0f3f08b38 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderCancelResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderCancelResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class OrderCancelResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public OrderCancelResponse() {} @@ -129,12 +129,14 @@ public void setResult(@jakarta.annotation.Nullable OrderCancelResponseResult res } public OrderCancelResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderCancelResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public OrderCancelResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -149,11 +151,13 @@ public OrderCancelResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -208,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -331,7 +335,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelResponseResult.java index 53e724f6e..719797054 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderCancelResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderCancelResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -170,6 +170,66 @@ public class OrderCancelResponseResult extends BaseDTO { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public static final String SERIALIZED_NAME_CONTINGENCY_TYPE = "contingencyType"; @SerializedName(SERIALIZED_NAME_CONTINGENCY_TYPE) @@ -509,7 +569,7 @@ public OrderCancelResponseResult stopPrice(@jakarta.annotation.Nullable String s } /** - * Get stopPrice + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. * * @return stopPrice */ @@ -529,7 +589,7 @@ public OrderCancelResponseResult trailingDelta( } /** - * Get trailingDelta + * Delta price change required before order activation. * * @return trailingDelta */ @@ -548,7 +608,7 @@ public OrderCancelResponseResult icebergQty(@jakarta.annotation.Nullable String } /** - * Get icebergQty + * Appears only if the parameter icebergQty was sent in the request. * * @return icebergQty */ @@ -567,7 +627,7 @@ public OrderCancelResponseResult strategyId(@jakarta.annotation.Nullable Long st } /** - * Get strategyId + * Appears only if the strategyId parameter was provided upon order placement. * * @return strategyId */ @@ -586,7 +646,7 @@ public OrderCancelResponseResult strategyType(@jakarta.annotation.Nullable Long } /** - * Get strategyType + * Appears only if the strategyType parameter was provided upon order placement. * * @return strategyType */ @@ -620,6 +680,203 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OrderCancelResponseResult preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderCancelResponseResult preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public OrderCancelResponseResult trailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderCancelResponseResult usedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderCancelResponseResult workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderCancelResponseResult pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderCancelResponseResult pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderCancelResponseResult pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderCancelResponseResult peggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderCancelResponseResult expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + public OrderCancelResponseResult contingencyType( @jakarta.annotation.Nullable String contingencyType) { this.contingencyType = contingencyType; @@ -823,6 +1080,17 @@ public boolean equals(Object o) { && Objects.equals( this.selfTradePreventionMode, orderCancelResponseResult.selfTradePreventionMode) + && Objects.equals(this.preventedMatchId, orderCancelResponseResult.preventedMatchId) + && Objects.equals( + this.preventedQuantity, orderCancelResponseResult.preventedQuantity) + && Objects.equals(this.trailingTime, orderCancelResponseResult.trailingTime) + && Objects.equals(this.usedSor, orderCancelResponseResult.usedSor) + && Objects.equals(this.workingFloor, orderCancelResponseResult.workingFloor) + && Objects.equals(this.pegPriceType, orderCancelResponseResult.pegPriceType) + && Objects.equals(this.pegOffsetType, orderCancelResponseResult.pegOffsetType) + && Objects.equals(this.pegOffsetValue, orderCancelResponseResult.pegOffsetValue) + && Objects.equals(this.peggedPrice, orderCancelResponseResult.peggedPrice) + && Objects.equals(this.expiryReason, orderCancelResponseResult.expiryReason) && Objects.equals(this.contingencyType, orderCancelResponseResult.contingencyType) && Objects.equals(this.listStatusType, orderCancelResponseResult.listStatusType) && Objects.equals(this.listOrderStatus, orderCancelResponseResult.listOrderStatus) @@ -857,6 +1125,16 @@ public int hashCode() { strategyId, strategyType, selfTradePreventionMode, + preventedMatchId, + preventedQuantity, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason, contingencyType, listStatusType, listOrderStatus, @@ -895,6 +1173,16 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append(" contingencyType: ").append(toIndentedString(contingencyType)).append("\n"); sb.append(" listStatusType: ").append(toIndentedString(listStatusType)).append("\n"); sb.append(" listOrderStatus: ").append(toIndentedString(listOrderStatus)).append("\n"); @@ -1015,6 +1303,56 @@ public String toUrlQueryString() { String selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); valMap.put("selfTradePreventionMode", selfTradePreventionModeValueAsString); } + Long preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + String preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + valMap.put("preventedMatchId", preventedMatchIdValueAsString); + } + String preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + String preventedQuantityValueAsString = preventedQuantityValue.toString(); + valMap.put("preventedQuantity", preventedQuantityValueAsString); + } + Long trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + String trailingTimeValueAsString = trailingTimeValue.toString(); + valMap.put("trailingTime", trailingTimeValueAsString); + } + Boolean usedSorValue = getUsedSor(); + if (usedSorValue != null) { + String usedSorValueAsString = usedSorValue.toString(); + valMap.put("usedSor", usedSorValueAsString); + } + String workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + String workingFloorValueAsString = workingFloorValue.toString(); + valMap.put("workingFloor", workingFloorValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } String contingencyTypeValue = getContingencyType(); if (contingencyTypeValue != null) { String contingencyTypeValueAsString = contingencyTypeValue.toString(); @@ -1146,6 +1484,46 @@ public Map toMap() { if (selfTradePreventionModeValue != null) { valMap.put("selfTradePreventionMode", selfTradePreventionModeValue); } + Object preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + valMap.put("preventedMatchId", preventedMatchIdValue); + } + Object preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + valMap.put("preventedQuantity", preventedQuantityValue); + } + Object trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + valMap.put("trailingTime", trailingTimeValue); + } + Object usedSorValue = getUsedSor(); + if (usedSorValue != null) { + valMap.put("usedSor", usedSorValue); + } + Object workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + valMap.put("workingFloor", workingFloorValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } Object contingencyTypeValue = getContingencyType(); if (contingencyTypeValue != null) { valMap.put("contingencyType", contingencyTypeValue); @@ -1221,6 +1599,16 @@ private String toIndentedString(Object o) { openapiFields.add("strategyId"); openapiFields.add("strategyType"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); openapiFields.add("contingencyType"); openapiFields.add("listStatusType"); openapiFields.add("listOrderStatus"); @@ -1387,6 +1775,55 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } if ((jsonObj.get("contingencyType") != null && !jsonObj.get("contingencyType").isJsonNull()) && !jsonObj.get("contingencyType").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelRequest.java index 4848c8123..421c93f93 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OrderListCancelRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListCancelRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -73,6 +79,25 @@ public class OrderListCancelRequest extends BaseDTO { public OrderListCancelRequest() {} + public OrderListCancelRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OrderListCancelRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -99,7 +124,7 @@ public OrderListCancelRequest orderListId(@jakarta.annotation.Nullable Integer o } /** - * Get orderListId + * Either `orderListId` or `listClientOrderId` must be provided * * @return orderListId */ @@ -119,7 +144,7 @@ public OrderListCancelRequest listClientOrderId( } /** - * Get listClientOrderId + * Either `orderListId` or `listClientOrderId` must be provided * * @return listClientOrderId */ @@ -139,7 +164,7 @@ public OrderListCancelRequest newClientOrderId( } /** - * Get newClientOrderId + * Used to uniquely identify this cancel. Automatically generated by default. * * @return newClientOrderId */ @@ -158,12 +183,14 @@ public OrderListCancelRequest recvWindow(@jakarta.annotation.Nullable Double rec } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -181,7 +208,8 @@ public boolean equals(Object o) { return false; } OrderListCancelRequest orderListCancelRequest = (OrderListCancelRequest) o; - return Objects.equals(this.symbol, orderListCancelRequest.symbol) + return Objects.equals(this.id, orderListCancelRequest.id) + && Objects.equals(this.symbol, orderListCancelRequest.symbol) && Objects.equals(this.orderListId, orderListCancelRequest.orderListId) && Objects.equals(this.listClientOrderId, orderListCancelRequest.listClientOrderId) && Objects.equals(this.newClientOrderId, orderListCancelRequest.newClientOrderId) @@ -190,13 +218,15 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(symbol, orderListId, listClientOrderId, newClientOrderId, recvWindow); + return Objects.hash( + id, symbol, orderListId, listClientOrderId, newClientOrderId, recvWindow); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderListCancelRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" orderListId: ").append(toIndentedString(orderListId)).append("\n"); sb.append(" listClientOrderId: ").append(toIndentedString(listClientOrderId)).append("\n"); @@ -210,6 +240,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -247,6 +282,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -293,6 +332,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("orderListId"); openapiFields.add("listClientOrderId"); @@ -344,6 +384,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponse.java index e88531286..9294175eb 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderListCancelResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListCancelResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class OrderListCancelResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public OrderListCancelResponse() {} @@ -129,12 +129,14 @@ public void setResult(@jakarta.annotation.Nullable OrderListCancelResponseResult } public OrderListCancelResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderListCancelResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public OrderListCancelResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -149,11 +151,13 @@ public OrderListCancelResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -208,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -331,7 +335,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponseResult.java index 04dffcc99..a1143b461 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderListCancelResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListCancelResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; @@ -89,7 +89,7 @@ public class OrderListCancelResponseResult extends BaseDTO { @SerializedName(SERIALIZED_NAME_ORDERS) @jakarta.annotation.Nullable - private List<@Valid OrderListCancelResponseResultOrdersInner> orders; + private List<@Valid AllOrderListsResponseResultInnerOrdersInner> orders; public static final String SERIALIZED_NAME_ORDER_REPORTS = "orderReports"; @@ -240,13 +240,13 @@ public void setSymbol(@jakarta.annotation.Nullable String symbol) { public OrderListCancelResponseResult orders( @jakarta.annotation.Nullable - List<@Valid OrderListCancelResponseResultOrdersInner> orders) { + List<@Valid AllOrderListsResponseResultInnerOrdersInner> orders) { this.orders = orders; return this; } public OrderListCancelResponseResult addOrdersItem( - OrderListCancelResponseResultOrdersInner ordersItem) { + AllOrderListsResponseResultInnerOrdersInner ordersItem) { if (this.orders == null) { this.orders = new ArrayList<>(); } @@ -261,13 +261,13 @@ public OrderListCancelResponseResult addOrdersItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid OrderListCancelResponseResultOrdersInner> getOrders() { + public List<@Valid AllOrderListsResponseResultInnerOrdersInner> getOrders() { return orders; } public void setOrders( @jakarta.annotation.Nullable - List<@Valid OrderListCancelResponseResultOrdersInner> orders) { + List<@Valid AllOrderListsResponseResultInnerOrdersInner> orders) { this.orders = orders; } @@ -399,7 +399,7 @@ public String toUrlQueryString() { String symbolValueAsString = symbolValue.toString(); valMap.put("symbol", symbolValueAsString); } - List<@Valid OrderListCancelResponseResultOrdersInner> ordersValue = getOrders(); + List<@Valid AllOrderListsResponseResultInnerOrdersInner> ordersValue = getOrders(); if (ordersValue != null) { String ordersValueAsString = JSON.getGson().toJson(ordersValue); valMap.put("orders", ordersValueAsString); @@ -583,7 +583,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `orders` (array) for (int i = 0; i < jsonArrayorders.size(); i++) { - OrderListCancelResponseResultOrdersInner.validateJsonElement( + AllOrderListsResponseResultInnerOrdersInner.validateJsonElement( jsonArrayorders.get(i)); } ; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponseResultOrderReportsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponseResultOrderReportsInner.java index 6668f0b9e..118fd368d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponseResultOrderReportsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponseResultOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderListCancelResponseResultOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListCancelResponseResultOrderReportsInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -130,12 +130,96 @@ public class OrderListCancelResponseResultOrderReportsInner extends BaseDTO { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; @SerializedName(SERIALIZED_NAME_STOP_PRICE) @jakarta.annotation.Nullable private String stopPrice; + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OrderListCancelResponseResultOrderReportsInner() {} public OrderListCancelResponseResultOrderReportsInner symbol( @@ -439,6 +523,66 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OrderListCancelResponseResultOrderReportsInner icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderListCancelResponseResultOrderReportsInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderListCancelResponseResultOrderReportsInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + public OrderListCancelResponseResultOrderReportsInner stopPrice( @jakarta.annotation.Nullable String stopPrice) { this.stopPrice = stopPrice; @@ -446,7 +590,7 @@ public OrderListCancelResponseResultOrderReportsInner stopPrice( } /** - * Get stopPrice + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. * * @return stopPrice */ @@ -459,6 +603,226 @@ public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { this.stopPrice = stopPrice; } + public OrderListCancelResponseResultOrderReportsInner strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderListCancelResponseResultOrderReportsInner strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderListCancelResponseResultOrderReportsInner trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderListCancelResponseResultOrderReportsInner trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderListCancelResponseResultOrderReportsInner usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderListCancelResponseResultOrderReportsInner workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderListCancelResponseResultOrderReportsInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderListCancelResponseResultOrderReportsInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderListCancelResponseResultOrderReportsInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderListCancelResponseResultOrderReportsInner peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderListCancelResponseResultOrderReportsInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -505,7 +869,46 @@ public boolean equals(Object o) { this.selfTradePreventionMode, orderListCancelResponseResultOrderReportsInner.selfTradePreventionMode) && Objects.equals( - this.stopPrice, orderListCancelResponseResultOrderReportsInner.stopPrice); + this.icebergQty, orderListCancelResponseResultOrderReportsInner.icebergQty) + && Objects.equals( + this.preventedMatchId, + orderListCancelResponseResultOrderReportsInner.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + orderListCancelResponseResultOrderReportsInner.preventedQuantity) + && Objects.equals( + this.stopPrice, orderListCancelResponseResultOrderReportsInner.stopPrice) + && Objects.equals( + this.strategyId, orderListCancelResponseResultOrderReportsInner.strategyId) + && Objects.equals( + this.strategyType, + orderListCancelResponseResultOrderReportsInner.strategyType) + && Objects.equals( + this.trailingDelta, + orderListCancelResponseResultOrderReportsInner.trailingDelta) + && Objects.equals( + this.trailingTime, + orderListCancelResponseResultOrderReportsInner.trailingTime) + && Objects.equals( + this.usedSor, orderListCancelResponseResultOrderReportsInner.usedSor) + && Objects.equals( + this.workingFloor, + orderListCancelResponseResultOrderReportsInner.workingFloor) + && Objects.equals( + this.pegPriceType, + orderListCancelResponseResultOrderReportsInner.pegPriceType) + && Objects.equals( + this.pegOffsetType, + orderListCancelResponseResultOrderReportsInner.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, + orderListCancelResponseResultOrderReportsInner.pegOffsetValue) + && Objects.equals( + this.peggedPrice, + orderListCancelResponseResultOrderReportsInner.peggedPrice) + && Objects.equals( + this.expiryReason, + orderListCancelResponseResultOrderReportsInner.expiryReason); } @Override @@ -526,7 +929,21 @@ public int hashCode() { type, side, selfTradePreventionMode, - stopPrice); + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -552,7 +969,21 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -636,11 +1067,81 @@ public String toUrlQueryString() { String selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); valMap.put("selfTradePreventionMode", selfTradePreventionModeValueAsString); } + String icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + String icebergQtyValueAsString = icebergQtyValue.toString(); + valMap.put("icebergQty", icebergQtyValueAsString); + } + Long preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + String preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + valMap.put("preventedMatchId", preventedMatchIdValueAsString); + } + String preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + String preventedQuantityValueAsString = preventedQuantityValue.toString(); + valMap.put("preventedQuantity", preventedQuantityValueAsString); + } String stopPriceValue = getStopPrice(); if (stopPriceValue != null) { String stopPriceValueAsString = stopPriceValue.toString(); valMap.put("stopPrice", stopPriceValueAsString); } + Long strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + String strategyIdValueAsString = strategyIdValue.toString(); + valMap.put("strategyId", strategyIdValueAsString); + } + Long strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + String strategyTypeValueAsString = strategyTypeValue.toString(); + valMap.put("strategyType", strategyTypeValueAsString); + } + Long trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + String trailingDeltaValueAsString = trailingDeltaValue.toString(); + valMap.put("trailingDelta", trailingDeltaValueAsString); + } + Long trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + String trailingTimeValueAsString = trailingTimeValue.toString(); + valMap.put("trailingTime", trailingTimeValueAsString); + } + Boolean usedSorValue = getUsedSor(); + if (usedSorValue != null) { + String usedSorValueAsString = usedSorValue.toString(); + valMap.put("usedSor", usedSorValueAsString); + } + String workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + String workingFloorValueAsString = workingFloorValue.toString(); + valMap.put("workingFloor", workingFloorValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -712,10 +1213,66 @@ public Map toMap() { if (selfTradePreventionModeValue != null) { valMap.put("selfTradePreventionMode", selfTradePreventionModeValue); } + Object icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + valMap.put("icebergQty", icebergQtyValue); + } + Object preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + valMap.put("preventedMatchId", preventedMatchIdValue); + } + Object preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + valMap.put("preventedQuantity", preventedQuantityValue); + } Object stopPriceValue = getStopPrice(); if (stopPriceValue != null) { valMap.put("stopPrice", stopPriceValue); } + Object strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + valMap.put("strategyId", strategyIdValue); + } + Object strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + valMap.put("strategyType", strategyTypeValue); + } + Object trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + valMap.put("trailingDelta", trailingDeltaValue); + } + Object trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + valMap.put("trailingTime", trailingTimeValue); + } + Object usedSorValue = getUsedSor(); + if (usedSorValue != null) { + valMap.put("usedSor", usedSorValue); + } + Object workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + valMap.put("workingFloor", workingFloorValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -757,7 +1314,21 @@ private String toIndentedString(Object o) { openapiFields.add("type"); openapiFields.add("side"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -897,6 +1468,23 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) && !jsonObj.get("stopPrice").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -905,6 +1493,46 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("stopPrice").toString())); } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponseResultOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponseResultOrdersInner.java deleted file mode 100644 index f1b6bad86..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponseResultOrdersInner.java +++ /dev/null @@ -1,338 +0,0 @@ -/* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.api.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.api.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** OrderListCancelResponseResultOrdersInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OrderListCancelResponseResultOrdersInner extends BaseDTO { - public static final String SERIALIZED_NAME_SYMBOL = "symbol"; - - @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nullable - private String symbol; - - public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; - - @SerializedName(SERIALIZED_NAME_ORDER_ID) - @jakarta.annotation.Nullable - private Long orderId; - - public static final String SERIALIZED_NAME_CLIENT_ORDER_ID = "clientOrderId"; - - @SerializedName(SERIALIZED_NAME_CLIENT_ORDER_ID) - @jakarta.annotation.Nullable - private String clientOrderId; - - public OrderListCancelResponseResultOrdersInner() {} - - public OrderListCancelResponseResultOrdersInner symbol( - @jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - return this; - } - - /** - * Get symbol - * - * @return symbol - */ - @jakarta.annotation.Nullable - public String getSymbol() { - return symbol; - } - - public void setSymbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - } - - public OrderListCancelResponseResultOrdersInner orderId( - @jakarta.annotation.Nullable Long orderId) { - this.orderId = orderId; - return this; - } - - /** - * Get orderId - * - * @return orderId - */ - @jakarta.annotation.Nullable - public Long getOrderId() { - return orderId; - } - - public void setOrderId(@jakarta.annotation.Nullable Long orderId) { - this.orderId = orderId; - } - - public OrderListCancelResponseResultOrdersInner clientOrderId( - @jakarta.annotation.Nullable String clientOrderId) { - this.clientOrderId = clientOrderId; - return this; - } - - /** - * Get clientOrderId - * - * @return clientOrderId - */ - @jakarta.annotation.Nullable - public String getClientOrderId() { - return clientOrderId; - } - - public void setClientOrderId(@jakarta.annotation.Nullable String clientOrderId) { - this.clientOrderId = clientOrderId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrderListCancelResponseResultOrdersInner orderListCancelResponseResultOrdersInner = - (OrderListCancelResponseResultOrdersInner) o; - return Objects.equals(this.symbol, orderListCancelResponseResultOrdersInner.symbol) - && Objects.equals(this.orderId, orderListCancelResponseResultOrdersInner.orderId) - && Objects.equals( - this.clientOrderId, orderListCancelResponseResultOrdersInner.clientOrderId); - } - - @Override - public int hashCode() { - return Objects.hash(symbol, orderId, clientOrderId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrderListCancelResponseResultOrdersInner {\n"); - sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); - sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); - sb.append(" clientOrderId: ").append(toIndentedString(clientOrderId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String symbolValue = getSymbol(); - if (symbolValue != null) { - String symbolValueAsString = symbolValue.toString(); - valMap.put("symbol", symbolValueAsString); - } - Long orderIdValue = getOrderId(); - if (orderIdValue != null) { - String orderIdValueAsString = orderIdValue.toString(); - valMap.put("orderId", orderIdValueAsString); - } - String clientOrderIdValue = getClientOrderId(); - if (clientOrderIdValue != null) { - String clientOrderIdValueAsString = clientOrderIdValue.toString(); - valMap.put("clientOrderId", clientOrderIdValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object symbolValue = getSymbol(); - if (symbolValue != null) { - valMap.put("symbol", symbolValue); - } - Object orderIdValue = getOrderId(); - if (orderIdValue != null) { - valMap.put("orderId", orderIdValue); - } - Object clientOrderIdValue = getClientOrderId(); - if (clientOrderIdValue != null) { - valMap.put("clientOrderId", clientOrderIdValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("symbol"); - openapiFields.add("orderId"); - openapiFields.add("clientOrderId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * OrderListCancelResponseResultOrdersInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OrderListCancelResponseResultOrdersInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " OrderListCancelResponseResultOrdersInner is not found in" - + " the empty JSON string", - OrderListCancelResponseResultOrdersInner.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OrderListCancelResponseResultOrdersInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `OrderListCancelResponseResultOrdersInner` properties." - + " JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) - && !jsonObj.get("symbol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `symbol` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("symbol").toString())); - } - if ((jsonObj.get("clientOrderId") != null && !jsonObj.get("clientOrderId").isJsonNull()) - && !jsonObj.get("clientOrderId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `clientOrderId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("clientOrderId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrderListCancelResponseResultOrdersInner.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'OrderListCancelResponseResultOrdersInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(OrderListCancelResponseResultOrdersInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, OrderListCancelResponseResultOrdersInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OrderListCancelResponseResultOrdersInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OrderListCancelResponseResultOrdersInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrderListCancelResponseResultOrdersInner - * @throws IOException if the JSON string is invalid with respect to - * OrderListCancelResponseResultOrdersInner - */ - public static OrderListCancelResponseResultOrdersInner fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, OrderListCancelResponseResultOrdersInner.class); - } - - /** - * Convert an instance of OrderListCancelResponseResultOrdersInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoRequest.java index 71e36820c..762e85698 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OrderListPlaceOcoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOcoRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -230,6 +236,25 @@ public class OrderListPlaceOcoRequest extends BaseDTO { public OrderListPlaceOcoRequest() {} + public OrderListPlaceOcoRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OrderListPlaceOcoRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -257,7 +282,10 @@ public OrderListPlaceOcoRequest listClientOrderId( } /** - * Get listClientOrderId + * Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order + * list with the same `listClientOrderId` is accepted only when the previous one is + * filled or completely expired. `listClientOrderId` is distinct from the + * `aboveClientOrderId` and the `belowClientOrderId`. * * @return listClientOrderId */ @@ -297,7 +325,7 @@ public OrderListPlaceOcoRequest quantity(@jakarta.annotation.Nonnull Double quan } /** - * Get quantity + * Quantity for both orders of the order list. * * @return quantity */ @@ -340,7 +368,8 @@ public OrderListPlaceOcoRequest aboveClientOrderId( } /** - * Get aboveClientOrderId + * Arbitrary unique ID among open orders for the above order. Automatically generated if not + * sent. * * @return aboveClientOrderId */ @@ -360,7 +389,7 @@ public OrderListPlaceOcoRequest aboveIcebergQty( } /** - * Get aboveIcebergQty + * Note that this can only be used if `aboveTimeInForce` is `GTC`. * * @return aboveIcebergQty */ @@ -379,7 +408,8 @@ public OrderListPlaceOcoRequest abovePrice(@jakarta.annotation.Nullable Double a } /** - * Get abovePrice + * Can be used if `aboveType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, + * or `TAKE_PROFIT_LIMIT` to specify the limit price. * * @return abovePrice */ @@ -400,7 +430,9 @@ public OrderListPlaceOcoRequest aboveStopPrice( } /** - * Get aboveStopPrice + * Can be used if `aboveType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, + * `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `aboveStopPrice` or + * `aboveTrailingDelta` or both, must be specified. * * @return aboveStopPrice */ @@ -421,7 +453,7 @@ public OrderListPlaceOcoRequest aboveTrailingDelta( } /** - * Get aboveTrailingDelta + * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) * * @return aboveTrailingDelta */ @@ -463,7 +495,7 @@ public OrderListPlaceOcoRequest aboveStrategyId( } /** - * Get aboveStrategyId + * Arbitrary numeric value identifying the above order within an order strategy. * * @return aboveStrategyId */ @@ -483,7 +515,8 @@ public OrderListPlaceOcoRequest aboveStrategyType( } /** - * Get aboveStrategyType + * Arbitrary numeric value identifying the above order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return aboveStrategyType */ @@ -547,11 +580,12 @@ public OrderListPlaceOcoRequest abovePegOffsetValue( } /** - * Get abovePegOffsetValue + * Get abovePegOffsetValue maximum: 100 * * @return abovePegOffsetValue */ @jakarta.annotation.Nullable + @Max(100) public Integer getAbovePegOffsetValue() { return abovePegOffsetValue; } @@ -588,7 +622,8 @@ public OrderListPlaceOcoRequest belowClientOrderId( } /** - * Get belowClientOrderId + * Arbitrary unique ID among open orders for the below order. Automatically generated if not + * sent. * * @return belowClientOrderId */ @@ -608,7 +643,7 @@ public OrderListPlaceOcoRequest belowIcebergQty( } /** - * Get belowIcebergQty + * Note that this can only be used if `belowTimeInForce` is `GTC`. * * @return belowIcebergQty */ @@ -627,7 +662,8 @@ public OrderListPlaceOcoRequest belowPrice(@jakarta.annotation.Nullable Double b } /** - * Get belowPrice + * Can be used if `belowType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, + * or `TAKE_PROFIT_LIMIT` to specify the limit price. * * @return belowPrice */ @@ -648,7 +684,9 @@ public OrderListPlaceOcoRequest belowStopPrice( } /** - * Get belowStopPrice + * Can be used if `belowType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, + * `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `belowStopPrice` or + * `belowTrailingDelta` or both, must be specified. * * @return belowStopPrice */ @@ -669,7 +707,7 @@ public OrderListPlaceOcoRequest belowTrailingDelta( } /** - * Get belowTrailingDelta + * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) * * @return belowTrailingDelta */ @@ -711,7 +749,7 @@ public OrderListPlaceOcoRequest belowStrategyId( } /** - * Get belowStrategyId + * Arbitrary numeric value identifying the below order within an order strategy. * * @return belowStrategyId */ @@ -731,7 +769,8 @@ public OrderListPlaceOcoRequest belowStrategyType( } /** - * Get belowStrategyType + * Arbitrary numeric value identifying the below order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return belowStrategyType */ @@ -795,11 +834,12 @@ public OrderListPlaceOcoRequest belowPegOffsetValue( } /** - * Get belowPegOffsetValue + * Get belowPegOffsetValue maximum: 100 * * @return belowPegOffsetValue */ @jakarta.annotation.Nullable + @Max(100) public Integer getBelowPegOffsetValue() { return belowPegOffsetValue; } @@ -858,12 +898,14 @@ public OrderListPlaceOcoRequest recvWindow(@jakarta.annotation.Nullable Double r } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -881,7 +923,8 @@ public boolean equals(Object o) { return false; } OrderListPlaceOcoRequest orderListPlaceOcoRequest = (OrderListPlaceOcoRequest) o; - return Objects.equals(this.symbol, orderListPlaceOcoRequest.symbol) + return Objects.equals(this.id, orderListPlaceOcoRequest.id) + && Objects.equals(this.symbol, orderListPlaceOcoRequest.symbol) && Objects.equals( this.listClientOrderId, orderListPlaceOcoRequest.listClientOrderId) && Objects.equals(this.side, orderListPlaceOcoRequest.side) @@ -932,6 +975,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + id, symbol, listClientOrderId, side, @@ -969,6 +1013,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderListPlaceOcoRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" listClientOrderId: ").append(toIndentedString(listClientOrderId)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); @@ -1026,6 +1071,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -1197,6 +1247,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -1347,6 +1401,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("listClientOrderId"); openapiFields.add("side"); @@ -1428,6 +1483,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponse.java index 1eceec241..402515fd6 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderListPlaceOcoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOcoResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class OrderListPlaceOcoResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public OrderListPlaceOcoResponse() {} @@ -129,12 +129,14 @@ public void setResult(@jakarta.annotation.Nullable OrderListPlaceOcoResponseResu } public OrderListPlaceOcoResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderListPlaceOcoResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public OrderListPlaceOcoResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -149,11 +151,13 @@ public OrderListPlaceOcoResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -208,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -331,7 +335,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponseResult.java index 7344e6da1..2e2ef9b1e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderListPlaceOcoResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOcoResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponseResultOrderReportsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponseResultOrderReportsInner.java index 48c718253..a38e4dcbc 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponseResultOrderReportsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponseResultOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderListPlaceOcoResponseResultOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOcoResponseResultOrderReportsInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -136,12 +136,96 @@ public class OrderListPlaceOcoResponseResultOrderReportsInner extends BaseDTO { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; @SerializedName(SERIALIZED_NAME_STOP_PRICE) @jakarta.annotation.Nullable private String stopPrice; + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OrderListPlaceOcoResponseResultOrderReportsInner() {} public OrderListPlaceOcoResponseResultOrderReportsInner symbol( @@ -465,6 +549,66 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OrderListPlaceOcoResponseResultOrderReportsInner icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderListPlaceOcoResponseResultOrderReportsInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderListPlaceOcoResponseResultOrderReportsInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + public OrderListPlaceOcoResponseResultOrderReportsInner stopPrice( @jakarta.annotation.Nullable String stopPrice) { this.stopPrice = stopPrice; @@ -472,7 +616,7 @@ public OrderListPlaceOcoResponseResultOrderReportsInner stopPrice( } /** - * Get stopPrice + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. * * @return stopPrice */ @@ -485,6 +629,226 @@ public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { this.stopPrice = stopPrice; } + public OrderListPlaceOcoResponseResultOrderReportsInner strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderListPlaceOcoResponseResultOrderReportsInner strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderListPlaceOcoResponseResultOrderReportsInner trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderListPlaceOcoResponseResultOrderReportsInner trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderListPlaceOcoResponseResultOrderReportsInner usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderListPlaceOcoResponseResultOrderReportsInner workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderListPlaceOcoResponseResultOrderReportsInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderListPlaceOcoResponseResultOrderReportsInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderListPlaceOcoResponseResultOrderReportsInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderListPlaceOcoResponseResultOrderReportsInner peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderListPlaceOcoResponseResultOrderReportsInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -535,7 +899,48 @@ public boolean equals(Object o) { this.selfTradePreventionMode, orderListPlaceOcoResponseResultOrderReportsInner.selfTradePreventionMode) && Objects.equals( - this.stopPrice, orderListPlaceOcoResponseResultOrderReportsInner.stopPrice); + this.icebergQty, + orderListPlaceOcoResponseResultOrderReportsInner.icebergQty) + && Objects.equals( + this.preventedMatchId, + orderListPlaceOcoResponseResultOrderReportsInner.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + orderListPlaceOcoResponseResultOrderReportsInner.preventedQuantity) + && Objects.equals( + this.stopPrice, orderListPlaceOcoResponseResultOrderReportsInner.stopPrice) + && Objects.equals( + this.strategyId, + orderListPlaceOcoResponseResultOrderReportsInner.strategyId) + && Objects.equals( + this.strategyType, + orderListPlaceOcoResponseResultOrderReportsInner.strategyType) + && Objects.equals( + this.trailingDelta, + orderListPlaceOcoResponseResultOrderReportsInner.trailingDelta) + && Objects.equals( + this.trailingTime, + orderListPlaceOcoResponseResultOrderReportsInner.trailingTime) + && Objects.equals( + this.usedSor, orderListPlaceOcoResponseResultOrderReportsInner.usedSor) + && Objects.equals( + this.workingFloor, + orderListPlaceOcoResponseResultOrderReportsInner.workingFloor) + && Objects.equals( + this.pegPriceType, + orderListPlaceOcoResponseResultOrderReportsInner.pegPriceType) + && Objects.equals( + this.pegOffsetType, + orderListPlaceOcoResponseResultOrderReportsInner.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, + orderListPlaceOcoResponseResultOrderReportsInner.pegOffsetValue) + && Objects.equals( + this.peggedPrice, + orderListPlaceOcoResponseResultOrderReportsInner.peggedPrice) + && Objects.equals( + this.expiryReason, + orderListPlaceOcoResponseResultOrderReportsInner.expiryReason); } @Override @@ -557,7 +962,21 @@ public int hashCode() { side, workingTime, selfTradePreventionMode, - stopPrice); + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -584,7 +1003,21 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -673,11 +1106,81 @@ public String toUrlQueryString() { String selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); valMap.put("selfTradePreventionMode", selfTradePreventionModeValueAsString); } + String icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + String icebergQtyValueAsString = icebergQtyValue.toString(); + valMap.put("icebergQty", icebergQtyValueAsString); + } + Long preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + String preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + valMap.put("preventedMatchId", preventedMatchIdValueAsString); + } + String preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + String preventedQuantityValueAsString = preventedQuantityValue.toString(); + valMap.put("preventedQuantity", preventedQuantityValueAsString); + } String stopPriceValue = getStopPrice(); if (stopPriceValue != null) { String stopPriceValueAsString = stopPriceValue.toString(); valMap.put("stopPrice", stopPriceValueAsString); } + Long strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + String strategyIdValueAsString = strategyIdValue.toString(); + valMap.put("strategyId", strategyIdValueAsString); + } + Long strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + String strategyTypeValueAsString = strategyTypeValue.toString(); + valMap.put("strategyType", strategyTypeValueAsString); + } + Long trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + String trailingDeltaValueAsString = trailingDeltaValue.toString(); + valMap.put("trailingDelta", trailingDeltaValueAsString); + } + Long trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + String trailingTimeValueAsString = trailingTimeValue.toString(); + valMap.put("trailingTime", trailingTimeValueAsString); + } + Boolean usedSorValue = getUsedSor(); + if (usedSorValue != null) { + String usedSorValueAsString = usedSorValue.toString(); + valMap.put("usedSor", usedSorValueAsString); + } + String workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + String workingFloorValueAsString = workingFloorValue.toString(); + valMap.put("workingFloor", workingFloorValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -753,10 +1256,66 @@ public Map toMap() { if (selfTradePreventionModeValue != null) { valMap.put("selfTradePreventionMode", selfTradePreventionModeValue); } + Object icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + valMap.put("icebergQty", icebergQtyValue); + } + Object preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + valMap.put("preventedMatchId", preventedMatchIdValue); + } + Object preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + valMap.put("preventedQuantity", preventedQuantityValue); + } Object stopPriceValue = getStopPrice(); if (stopPriceValue != null) { valMap.put("stopPrice", stopPriceValue); } + Object strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + valMap.put("strategyId", strategyIdValue); + } + Object strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + valMap.put("strategyType", strategyTypeValue); + } + Object trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + valMap.put("trailingDelta", trailingDeltaValue); + } + Object trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + valMap.put("trailingTime", trailingTimeValue); + } + Object usedSorValue = getUsedSor(); + if (usedSorValue != null) { + valMap.put("usedSor", usedSorValue); + } + Object workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + valMap.put("workingFloor", workingFloorValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -799,7 +1358,21 @@ private String toIndentedString(Object o) { openapiFields.add("side"); openapiFields.add("workingTime"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -940,6 +1513,23 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) && !jsonObj.get("stopPrice").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -948,6 +1538,46 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("stopPrice").toString())); } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponseResultOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponseResultOrdersInner.java index 895ffe978..da33dcba9 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponseResultOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponseResultOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderListPlaceOcoResponseResultOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOcoResponseResultOrdersInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoRequest.java index 6da842eaa..80fb1eb49 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OrderListPlaceOpoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOpoRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -224,6 +230,25 @@ public class OrderListPlaceOpoRequest extends BaseDTO { public OrderListPlaceOpoRequest() {} + public OrderListPlaceOpoRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OrderListPlaceOpoRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -251,7 +276,10 @@ public OrderListPlaceOpoRequest listClientOrderId( } /** - * Get listClientOrderId + * Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order + * list with the same `listClientOrderId` is accepted only when the previous one is + * filled or completely expired. `listClientOrderId` is distinct from the + * `workingClientOrderId` and the `pendingClientOrderId`. * * @return listClientOrderId */ @@ -359,7 +387,8 @@ public OrderListPlaceOpoRequest workingClientOrderId( } /** - * Get workingClientOrderId + * Arbitrary unique ID among open orders for the working order. Automatically generated if not + * sent. * * @return workingClientOrderId */ @@ -378,7 +407,7 @@ public OrderListPlaceOpoRequest workingPrice(@jakarta.annotation.Nonnull Double } /** - * Get workingPrice + * Price for the working order. * * @return workingPrice */ @@ -400,7 +429,7 @@ public OrderListPlaceOpoRequest workingQuantity( } /** - * Get workingQuantity + * Sets the quantity for the working order. * * @return workingQuantity */ @@ -422,7 +451,8 @@ public OrderListPlaceOpoRequest workingIcebergQty( } /** - * Get workingIcebergQty + * This can only be used if `workingTimeInForce` is `GTC`, or if + * `workingType` is `LIMIT_MAKER`. * * @return workingIcebergQty */ @@ -465,7 +495,7 @@ public OrderListPlaceOpoRequest workingStrategyId( } /** - * Get workingStrategyId + * Arbitrary numeric value identifying the working order within an order strategy. * * @return workingStrategyId */ @@ -485,7 +515,8 @@ public OrderListPlaceOpoRequest workingStrategyType( } /** - * Get workingStrategyType + * Arbitrary numeric value identifying the working order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return workingStrategyType */ @@ -549,11 +580,12 @@ public OrderListPlaceOpoRequest workingPegOffsetValue( } /** - * Get workingPegOffsetValue + * Get workingPegOffsetValue maximum: 100 * * @return workingPegOffsetValue */ @jakarta.annotation.Nullable + @Max(100) public Integer getWorkingPegOffsetValue() { return workingPegOffsetValue; } @@ -614,7 +646,8 @@ public OrderListPlaceOpoRequest pendingClientOrderId( } /** - * Get pendingClientOrderId + * Arbitrary unique ID among open orders for the pending order. Automatically generated if not + * sent. * * @return pendingClientOrderId */ @@ -633,7 +666,7 @@ public OrderListPlaceOpoRequest pendingPrice(@jakarta.annotation.Nullable Double } /** - * Get pendingPrice + * Price for the pending order. * * @return pendingPrice */ @@ -654,7 +687,7 @@ public OrderListPlaceOpoRequest pendingStopPrice( } /** - * Get pendingStopPrice + * Stop price for the pending order. * * @return pendingStopPrice */ @@ -675,7 +708,7 @@ public OrderListPlaceOpoRequest pendingTrailingDelta( } /** - * Get pendingTrailingDelta + * Trailing delta for the pending order. * * @return pendingTrailingDelta */ @@ -696,7 +729,8 @@ public OrderListPlaceOpoRequest pendingIcebergQty( } /** - * Get pendingIcebergQty + * This can only be used if `pendingTimeInForce` is `GTC` or if + * `pendingType` is `LIMIT_MAKER`. * * @return pendingIcebergQty */ @@ -739,7 +773,7 @@ public OrderListPlaceOpoRequest pendingStrategyId( } /** - * Get pendingStrategyId + * Arbitrary numeric value identifying the pending order within an order strategy. * * @return pendingStrategyId */ @@ -759,7 +793,8 @@ public OrderListPlaceOpoRequest pendingStrategyType( } /** - * Get pendingStrategyType + * Arbitrary numeric value identifying the pending order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return pendingStrategyType */ @@ -823,11 +858,12 @@ public OrderListPlaceOpoRequest pendingPegOffsetValue( } /** - * Get pendingPegOffsetValue + * Get pendingPegOffsetValue maximum: 100 * * @return pendingPegOffsetValue */ @jakarta.annotation.Nullable + @Max(100) public Integer getPendingPegOffsetValue() { return pendingPegOffsetValue; } @@ -843,12 +879,14 @@ public OrderListPlaceOpoRequest recvWindow(@jakarta.annotation.Nullable Double r } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -866,7 +904,8 @@ public boolean equals(Object o) { return false; } OrderListPlaceOpoRequest orderListPlaceOpoRequest = (OrderListPlaceOpoRequest) o; - return Objects.equals(this.symbol, orderListPlaceOpoRequest.symbol) + return Objects.equals(this.id, orderListPlaceOpoRequest.id) + && Objects.equals(this.symbol, orderListPlaceOpoRequest.symbol) && Objects.equals( this.listClientOrderId, orderListPlaceOpoRequest.listClientOrderId) && Objects.equals(this.newOrderRespType, orderListPlaceOpoRequest.newOrderRespType) @@ -921,6 +960,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + id, symbol, listClientOrderId, newOrderRespType, @@ -957,6 +997,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderListPlaceOpoRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" listClientOrderId: ").append(toIndentedString(listClientOrderId)).append("\n"); sb.append(" newOrderRespType: ").append(toIndentedString(newOrderRespType)).append("\n"); @@ -1023,6 +1064,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -1192,6 +1238,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -1338,6 +1388,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("listClientOrderId"); openapiFields.add("newOrderRespType"); @@ -1420,6 +1471,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoResponse.java index 33dc9421d..676fdf7ad 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** OrderListPlaceOpoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOpoResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoResponseResult.java index 85fa23eb9..edf839382 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderListPlaceOpoResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOpoResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoResponseResultOrderReportsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoResponseResultOrderReportsInner.java index 640532be7..c618afd13 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoResponseResultOrderReportsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoResponseResultOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderListPlaceOpoResponseResultOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOpoResponseResultOrderReportsInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -136,6 +136,96 @@ public class OrderListPlaceOpoResponseResultOrderReportsInner extends BaseDTO { @jakarta.annotation.Nullable private String origQty; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + + @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @jakarta.annotation.Nullable + private String stopPrice; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OrderListPlaceOpoResponseResultOrderReportsInner() {} public OrderListPlaceOpoResponseResultOrderReportsInner symbol( @@ -459,6 +549,306 @@ public void setOrigQty(@jakarta.annotation.Nullable String origQty) { this.origQty = origQty; } + public OrderListPlaceOpoResponseResultOrderReportsInner icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderListPlaceOpoResponseResultOrderReportsInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderListPlaceOpoResponseResultOrderReportsInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public OrderListPlaceOpoResponseResultOrderReportsInner stopPrice( + @jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + /** + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. + * + * @return stopPrice + */ + @jakarta.annotation.Nullable + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + } + + public OrderListPlaceOpoResponseResultOrderReportsInner strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderListPlaceOpoResponseResultOrderReportsInner strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderListPlaceOpoResponseResultOrderReportsInner trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderListPlaceOpoResponseResultOrderReportsInner trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderListPlaceOpoResponseResultOrderReportsInner usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderListPlaceOpoResponseResultOrderReportsInner workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderListPlaceOpoResponseResultOrderReportsInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderListPlaceOpoResponseResultOrderReportsInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderListPlaceOpoResponseResultOrderReportsInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderListPlaceOpoResponseResultOrderReportsInner peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderListPlaceOpoResponseResultOrderReportsInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -507,7 +897,50 @@ public boolean equals(Object o) { this.selfTradePreventionMode, orderListPlaceOpoResponseResultOrderReportsInner.selfTradePreventionMode) && Objects.equals( - this.origQty, orderListPlaceOpoResponseResultOrderReportsInner.origQty); + this.origQty, orderListPlaceOpoResponseResultOrderReportsInner.origQty) + && Objects.equals( + this.icebergQty, + orderListPlaceOpoResponseResultOrderReportsInner.icebergQty) + && Objects.equals( + this.preventedMatchId, + orderListPlaceOpoResponseResultOrderReportsInner.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + orderListPlaceOpoResponseResultOrderReportsInner.preventedQuantity) + && Objects.equals( + this.stopPrice, orderListPlaceOpoResponseResultOrderReportsInner.stopPrice) + && Objects.equals( + this.strategyId, + orderListPlaceOpoResponseResultOrderReportsInner.strategyId) + && Objects.equals( + this.strategyType, + orderListPlaceOpoResponseResultOrderReportsInner.strategyType) + && Objects.equals( + this.trailingDelta, + orderListPlaceOpoResponseResultOrderReportsInner.trailingDelta) + && Objects.equals( + this.trailingTime, + orderListPlaceOpoResponseResultOrderReportsInner.trailingTime) + && Objects.equals( + this.usedSor, orderListPlaceOpoResponseResultOrderReportsInner.usedSor) + && Objects.equals( + this.workingFloor, + orderListPlaceOpoResponseResultOrderReportsInner.workingFloor) + && Objects.equals( + this.pegPriceType, + orderListPlaceOpoResponseResultOrderReportsInner.pegPriceType) + && Objects.equals( + this.pegOffsetType, + orderListPlaceOpoResponseResultOrderReportsInner.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, + orderListPlaceOpoResponseResultOrderReportsInner.pegOffsetValue) + && Objects.equals( + this.peggedPrice, + orderListPlaceOpoResponseResultOrderReportsInner.peggedPrice) + && Objects.equals( + this.expiryReason, + orderListPlaceOpoResponseResultOrderReportsInner.expiryReason); } @Override @@ -528,7 +961,22 @@ public int hashCode() { side, workingTime, selfTradePreventionMode, - origQty); + origQty, + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -555,6 +1003,21 @@ public String toString() { .append(toIndentedString(selfTradePreventionMode)) .append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -643,6 +1106,81 @@ public String toUrlQueryString() { String origQtyValueAsString = origQtyValue.toString(); valMap.put("origQty", origQtyValueAsString); } + String icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + String icebergQtyValueAsString = icebergQtyValue.toString(); + valMap.put("icebergQty", icebergQtyValueAsString); + } + Long preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + String preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + valMap.put("preventedMatchId", preventedMatchIdValueAsString); + } + String preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + String preventedQuantityValueAsString = preventedQuantityValue.toString(); + valMap.put("preventedQuantity", preventedQuantityValueAsString); + } + String stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + String stopPriceValueAsString = stopPriceValue.toString(); + valMap.put("stopPrice", stopPriceValueAsString); + } + Long strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + String strategyIdValueAsString = strategyIdValue.toString(); + valMap.put("strategyId", strategyIdValueAsString); + } + Long strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + String strategyTypeValueAsString = strategyTypeValue.toString(); + valMap.put("strategyType", strategyTypeValueAsString); + } + Long trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + String trailingDeltaValueAsString = trailingDeltaValue.toString(); + valMap.put("trailingDelta", trailingDeltaValueAsString); + } + Long trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + String trailingTimeValueAsString = trailingTimeValue.toString(); + valMap.put("trailingTime", trailingTimeValueAsString); + } + Boolean usedSorValue = getUsedSor(); + if (usedSorValue != null) { + String usedSorValueAsString = usedSorValue.toString(); + valMap.put("usedSor", usedSorValueAsString); + } + String workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + String workingFloorValueAsString = workingFloorValue.toString(); + valMap.put("workingFloor", workingFloorValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -718,6 +1256,66 @@ public Map toMap() { if (origQtyValue != null) { valMap.put("origQty", origQtyValue); } + Object icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + valMap.put("icebergQty", icebergQtyValue); + } + Object preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + valMap.put("preventedMatchId", preventedMatchIdValue); + } + Object preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + valMap.put("preventedQuantity", preventedQuantityValue); + } + Object stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + valMap.put("stopPrice", stopPriceValue); + } + Object strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + valMap.put("strategyId", strategyIdValue); + } + Object strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + valMap.put("strategyType", strategyTypeValue); + } + Object trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + valMap.put("trailingDelta", trailingDeltaValue); + } + Object trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + valMap.put("trailingTime", trailingTimeValue); + } + Object usedSorValue = getUsedSor(); + if (usedSorValue != null) { + valMap.put("usedSor", usedSorValue); + } + Object workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + valMap.put("workingFloor", workingFloorValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -760,6 +1358,21 @@ private String toIndentedString(Object o) { openapiFields.add("workingTime"); openapiFields.add("selfTradePreventionMode"); openapiFields.add("origQty"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -900,6 +1513,71 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("origQty").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) + && !jsonObj.get("stopPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `stopPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("stopPrice").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoResponseResultOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoResponseResultOrdersInner.java index b7a0fc13e..0b4f5793c 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoResponseResultOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpoResponseResultOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderListPlaceOpoResponseResultOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOpoResponseResultOrdersInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoRequest.java index b27f3deea..513560636 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OrderListPlaceOpocoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOpocoRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -310,6 +316,25 @@ public class OrderListPlaceOpocoRequest extends BaseDTO { public OrderListPlaceOpocoRequest() {} + public OrderListPlaceOpocoRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OrderListPlaceOpocoRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -337,7 +362,10 @@ public OrderListPlaceOpocoRequest listClientOrderId( } /** - * Get listClientOrderId + * Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order + * list with the same `listClientOrderId` is accepted only when the previous one is + * filled or completely expired. `listClientOrderId` is distinct from the + * `workingClientOrderId` and the `pendingClientOrderId`. * * @return listClientOrderId */ @@ -445,7 +473,8 @@ public OrderListPlaceOpocoRequest workingClientOrderId( } /** - * Get workingClientOrderId + * Arbitrary unique ID among open orders for the working order. Automatically generated if not + * sent. * * @return workingClientOrderId */ @@ -465,7 +494,7 @@ public OrderListPlaceOpocoRequest workingPrice( } /** - * Get workingPrice + * Price for the working order. * * @return workingPrice */ @@ -487,7 +516,7 @@ public OrderListPlaceOpocoRequest workingQuantity( } /** - * Get workingQuantity + * Sets the quantity for the working order. * * @return workingQuantity */ @@ -509,7 +538,8 @@ public OrderListPlaceOpocoRequest workingIcebergQty( } /** - * Get workingIcebergQty + * This can only be used if `workingTimeInForce` is `GTC`, or if + * `workingType` is `LIMIT_MAKER`. * * @return workingIcebergQty */ @@ -552,7 +582,7 @@ public OrderListPlaceOpocoRequest workingStrategyId( } /** - * Get workingStrategyId + * Arbitrary numeric value identifying the working order within an order strategy. * * @return workingStrategyId */ @@ -572,7 +602,8 @@ public OrderListPlaceOpocoRequest workingStrategyType( } /** - * Get workingStrategyType + * Arbitrary numeric value identifying the working order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return workingStrategyType */ @@ -636,11 +667,13 @@ public OrderListPlaceOpocoRequest workingPegOffsetValue( } /** - * Get workingPegOffsetValue + * Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) + * maximum: 100 * * @return workingPegOffsetValue */ @jakarta.annotation.Nullable + @Max(100) public Integer getWorkingPegOffsetValue() { return workingPegOffsetValue; } @@ -701,7 +734,8 @@ public OrderListPlaceOpocoRequest pendingAboveClientOrderId( } /** - * Get pendingAboveClientOrderId + * Arbitrary unique ID among open orders for the pending above order. Automatically generated if + * not sent. * * @return pendingAboveClientOrderId */ @@ -722,7 +756,8 @@ public OrderListPlaceOpocoRequest pendingAbovePrice( } /** - * Get pendingAbovePrice + * Can be used if `pendingAboveType` is `STOP_LOSS_LIMIT`, + * `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. * * @return pendingAbovePrice */ @@ -743,7 +778,8 @@ public OrderListPlaceOpocoRequest pendingAboveStopPrice( } /** - * Get pendingAboveStopPrice + * Can be used if `pendingAboveType` is `STOP_LOSS`, + * `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. * * @return pendingAboveStopPrice */ @@ -765,7 +801,7 @@ public OrderListPlaceOpocoRequest pendingAboveTrailingDelta( } /** - * Get pendingAboveTrailingDelta + * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) * * @return pendingAboveTrailingDelta */ @@ -787,7 +823,8 @@ public OrderListPlaceOpocoRequest pendingAboveIcebergQty( } /** - * Get pendingAboveIcebergQty + * This can only be used if `pendingAboveTimeInForce` is `GTC` or + * `pendingAboveType` is `LIMIT_MAKER`. * * @return pendingAboveIcebergQty */ @@ -831,7 +868,7 @@ public OrderListPlaceOpocoRequest pendingAboveStrategyId( } /** - * Get pendingAboveStrategyId + * Arbitrary numeric value identifying the pending above order within an order strategy. * * @return pendingAboveStrategyId */ @@ -852,7 +889,8 @@ public OrderListPlaceOpocoRequest pendingAboveStrategyType( } /** - * Get pendingAboveStrategyType + * Arbitrary numeric value identifying the pending above order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return pendingAboveStrategyType */ @@ -917,11 +955,13 @@ public OrderListPlaceOpocoRequest pendingAbovePegOffsetValue( } /** - * Get pendingAbovePegOffsetValue + * Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) + * maximum: 100 * * @return pendingAbovePegOffsetValue */ @jakarta.annotation.Nullable + @Max(100) public Integer getPendingAbovePegOffsetValue() { return pendingAbovePegOffsetValue; } @@ -960,7 +1000,8 @@ public OrderListPlaceOpocoRequest pendingBelowClientOrderId( } /** - * Get pendingBelowClientOrderId + * Arbitrary unique ID among open orders for the pending below order. Automatically generated if + * not sent. * * @return pendingBelowClientOrderId */ @@ -981,7 +1022,8 @@ public OrderListPlaceOpocoRequest pendingBelowPrice( } /** - * Get pendingBelowPrice + * Can be used if `pendingBelowType` is `STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT` to specify the limit price. * * @return pendingBelowPrice */ @@ -1002,7 +1044,10 @@ public OrderListPlaceOpocoRequest pendingBelowStopPrice( } /** - * Get pendingBelowStopPrice + * Can be used if `pendingBelowType` is `STOP_LOSS`, + * `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either + * `pendingBelowStopPrice` or `pendingBelowTrailingDelta` or both, must be + * specified. * * @return pendingBelowStopPrice */ @@ -1024,7 +1069,7 @@ public OrderListPlaceOpocoRequest pendingBelowTrailingDelta( } /** - * Get pendingBelowTrailingDelta + * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) * * @return pendingBelowTrailingDelta */ @@ -1046,7 +1091,8 @@ public OrderListPlaceOpocoRequest pendingBelowIcebergQty( } /** - * Get pendingBelowIcebergQty + * This can only be used if `pendingBelowTimeInForce` is `GTC` or + * `pendingBelowType` is `LIMIT_MAKER`. * * @return pendingBelowIcebergQty */ @@ -1090,7 +1136,7 @@ public OrderListPlaceOpocoRequest pendingBelowStrategyId( } /** - * Get pendingBelowStrategyId + * Arbitrary numeric value identifying the pending below order within an order strategy. * * @return pendingBelowStrategyId */ @@ -1111,7 +1157,8 @@ public OrderListPlaceOpocoRequest pendingBelowStrategyType( } /** - * Get pendingBelowStrategyType + * Arbitrary numeric value identifying the pending below order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return pendingBelowStrategyType */ @@ -1176,11 +1223,12 @@ public OrderListPlaceOpocoRequest pendingBelowPegOffsetValue( } /** - * Get pendingBelowPegOffsetValue + * Get pendingBelowPegOffsetValue maximum: 100 * * @return pendingBelowPegOffsetValue */ @jakarta.annotation.Nullable + @Max(100) public Integer getPendingBelowPegOffsetValue() { return pendingBelowPegOffsetValue; } @@ -1196,12 +1244,14 @@ public OrderListPlaceOpocoRequest recvWindow(@jakarta.annotation.Nullable Double } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -1219,7 +1269,8 @@ public boolean equals(Object o) { return false; } OrderListPlaceOpocoRequest orderListPlaceOpocoRequest = (OrderListPlaceOpocoRequest) o; - return Objects.equals(this.symbol, orderListPlaceOpocoRequest.symbol) + return Objects.equals(this.id, orderListPlaceOpocoRequest.id) + && Objects.equals(this.symbol, orderListPlaceOpocoRequest.symbol) && Objects.equals( this.listClientOrderId, orderListPlaceOpocoRequest.listClientOrderId) && Objects.equals( @@ -1323,6 +1374,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + id, symbol, listClientOrderId, newOrderRespType, @@ -1371,6 +1423,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderListPlaceOpocoRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" listClientOrderId: ").append(toIndentedString(listClientOrderId)).append("\n"); sb.append(" newOrderRespType: ").append(toIndentedString(newOrderRespType)).append("\n"); @@ -1475,6 +1528,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -1714,6 +1772,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -1908,6 +1970,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("listClientOrderId"); openapiFields.add("newOrderRespType"); @@ -2002,6 +2065,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoResponse.java index a956a4d5d..d4cfcb072 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** OrderListPlaceOpocoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOpocoResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoResponseResult.java index cae711a2a..725c5005c 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderListPlaceOpocoResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOpocoResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoResponseResultOrderReportsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoResponseResultOrderReportsInner.java index 150a875d5..79a12abdd 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoResponseResultOrderReportsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoResponseResultOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderListPlaceOpocoResponseResultOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOpocoResponseResultOrderReportsInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -142,6 +142,90 @@ public class OrderListPlaceOpocoResponseResultOrderReportsInner extends BaseDTO @jakarta.annotation.Nullable private String origQty; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OrderListPlaceOpocoResponseResultOrderReportsInner() {} public OrderListPlaceOpocoResponseResultOrderReportsInner symbol( @@ -452,7 +536,7 @@ public OrderListPlaceOpocoResponseResultOrderReportsInner stopPrice( } /** - * Get stopPrice + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. * * @return stopPrice */ @@ -485,6 +569,286 @@ public void setOrigQty(@jakarta.annotation.Nullable String origQty) { this.origQty = origQty; } + public OrderListPlaceOpocoResponseResultOrderReportsInner icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderListPlaceOpocoResponseResultOrderReportsInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderListPlaceOpocoResponseResultOrderReportsInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public OrderListPlaceOpocoResponseResultOrderReportsInner strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderListPlaceOpocoResponseResultOrderReportsInner strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderListPlaceOpocoResponseResultOrderReportsInner trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderListPlaceOpocoResponseResultOrderReportsInner trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderListPlaceOpocoResponseResultOrderReportsInner usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderListPlaceOpocoResponseResultOrderReportsInner workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderListPlaceOpocoResponseResultOrderReportsInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderListPlaceOpocoResponseResultOrderReportsInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderListPlaceOpocoResponseResultOrderReportsInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderListPlaceOpocoResponseResultOrderReportsInner peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderListPlaceOpocoResponseResultOrderReportsInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -539,7 +903,48 @@ public boolean equals(Object o) { this.stopPrice, orderListPlaceOpocoResponseResultOrderReportsInner.stopPrice) && Objects.equals( - this.origQty, orderListPlaceOpocoResponseResultOrderReportsInner.origQty); + this.origQty, orderListPlaceOpocoResponseResultOrderReportsInner.origQty) + && Objects.equals( + this.icebergQty, + orderListPlaceOpocoResponseResultOrderReportsInner.icebergQty) + && Objects.equals( + this.preventedMatchId, + orderListPlaceOpocoResponseResultOrderReportsInner.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + orderListPlaceOpocoResponseResultOrderReportsInner.preventedQuantity) + && Objects.equals( + this.strategyId, + orderListPlaceOpocoResponseResultOrderReportsInner.strategyId) + && Objects.equals( + this.strategyType, + orderListPlaceOpocoResponseResultOrderReportsInner.strategyType) + && Objects.equals( + this.trailingDelta, + orderListPlaceOpocoResponseResultOrderReportsInner.trailingDelta) + && Objects.equals( + this.trailingTime, + orderListPlaceOpocoResponseResultOrderReportsInner.trailingTime) + && Objects.equals( + this.usedSor, orderListPlaceOpocoResponseResultOrderReportsInner.usedSor) + && Objects.equals( + this.workingFloor, + orderListPlaceOpocoResponseResultOrderReportsInner.workingFloor) + && Objects.equals( + this.pegPriceType, + orderListPlaceOpocoResponseResultOrderReportsInner.pegPriceType) + && Objects.equals( + this.pegOffsetType, + orderListPlaceOpocoResponseResultOrderReportsInner.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, + orderListPlaceOpocoResponseResultOrderReportsInner.pegOffsetValue) + && Objects.equals( + this.peggedPrice, + orderListPlaceOpocoResponseResultOrderReportsInner.peggedPrice) + && Objects.equals( + this.expiryReason, + orderListPlaceOpocoResponseResultOrderReportsInner.expiryReason); } @Override @@ -561,7 +966,21 @@ public int hashCode() { workingTime, selfTradePreventionMode, stopPrice, - origQty); + origQty, + icebergQty, + preventedMatchId, + preventedQuantity, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -589,6 +1008,20 @@ public String toString() { .append("\n"); sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -682,6 +1115,76 @@ public String toUrlQueryString() { String origQtyValueAsString = origQtyValue.toString(); valMap.put("origQty", origQtyValueAsString); } + String icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + String icebergQtyValueAsString = icebergQtyValue.toString(); + valMap.put("icebergQty", icebergQtyValueAsString); + } + Long preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + String preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + valMap.put("preventedMatchId", preventedMatchIdValueAsString); + } + String preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + String preventedQuantityValueAsString = preventedQuantityValue.toString(); + valMap.put("preventedQuantity", preventedQuantityValueAsString); + } + Long strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + String strategyIdValueAsString = strategyIdValue.toString(); + valMap.put("strategyId", strategyIdValueAsString); + } + Long strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + String strategyTypeValueAsString = strategyTypeValue.toString(); + valMap.put("strategyType", strategyTypeValueAsString); + } + Long trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + String trailingDeltaValueAsString = trailingDeltaValue.toString(); + valMap.put("trailingDelta", trailingDeltaValueAsString); + } + Long trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + String trailingTimeValueAsString = trailingTimeValue.toString(); + valMap.put("trailingTime", trailingTimeValueAsString); + } + Boolean usedSorValue = getUsedSor(); + if (usedSorValue != null) { + String usedSorValueAsString = usedSorValue.toString(); + valMap.put("usedSor", usedSorValueAsString); + } + String workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + String workingFloorValueAsString = workingFloorValue.toString(); + valMap.put("workingFloor", workingFloorValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -761,6 +1264,62 @@ public Map toMap() { if (origQtyValue != null) { valMap.put("origQty", origQtyValue); } + Object icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + valMap.put("icebergQty", icebergQtyValue); + } + Object preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + valMap.put("preventedMatchId", preventedMatchIdValue); + } + Object preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + valMap.put("preventedQuantity", preventedQuantityValue); + } + Object strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + valMap.put("strategyId", strategyIdValue); + } + Object strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + valMap.put("strategyType", strategyTypeValue); + } + Object trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + valMap.put("trailingDelta", trailingDeltaValue); + } + Object trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + valMap.put("trailingTime", trailingTimeValue); + } + Object usedSorValue = getUsedSor(); + if (usedSorValue != null) { + valMap.put("usedSor", usedSorValue); + } + Object workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + valMap.put("workingFloor", workingFloorValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -804,6 +1363,20 @@ private String toIndentedString(Object o) { openapiFields.add("selfTradePreventionMode"); openapiFields.add("stopPrice"); openapiFields.add("origQty"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -952,6 +1525,63 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("origQty").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoResponseResultOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoResponseResultOrdersInner.java index 027bbe110..96b7c01f0 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoResponseResultOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoResponseResultOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderListPlaceOpocoResponseResultOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOpocoResponseResultOrdersInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoRequest.java index 2346bc738..0098184a4 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OrderListPlaceOtoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOtoRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -230,6 +236,25 @@ public class OrderListPlaceOtoRequest extends BaseDTO { public OrderListPlaceOtoRequest() {} + public OrderListPlaceOtoRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OrderListPlaceOtoRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -257,7 +282,10 @@ public OrderListPlaceOtoRequest listClientOrderId( } /** - * Get listClientOrderId + * Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order + * list with the same `listClientOrderId` is accepted only when the previous one is + * filled or completely expired. `listClientOrderId` is distinct from the + * `workingClientOrderId` and the `pendingClientOrderId`. * * @return listClientOrderId */ @@ -365,7 +393,8 @@ public OrderListPlaceOtoRequest workingClientOrderId( } /** - * Get workingClientOrderId + * Arbitrary unique ID among open orders for the working order. Automatically generated if not + * sent. * * @return workingClientOrderId */ @@ -406,7 +435,7 @@ public OrderListPlaceOtoRequest workingQuantity( } /** - * Get workingQuantity + * Sets the quantity for the working order. * * @return workingQuantity */ @@ -428,7 +457,8 @@ public OrderListPlaceOtoRequest workingIcebergQty( } /** - * Get workingIcebergQty + * This can only be used if `workingTimeInForce` is `GTC`, or if + * `workingType` is `LIMIT_MAKER`. * * @return workingIcebergQty */ @@ -471,7 +501,7 @@ public OrderListPlaceOtoRequest workingStrategyId( } /** - * Get workingStrategyId + * Arbitrary numeric value identifying the working order within an order strategy. * * @return workingStrategyId */ @@ -491,7 +521,8 @@ public OrderListPlaceOtoRequest workingStrategyType( } /** - * Get workingStrategyType + * Arbitrary numeric value identifying the working order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return workingStrategyType */ @@ -555,11 +586,12 @@ public OrderListPlaceOtoRequest workingPegOffsetValue( } /** - * Get workingPegOffsetValue + * Get workingPegOffsetValue maximum: 100 * * @return workingPegOffsetValue */ @jakarta.annotation.Nullable + @Max(100) public Integer getWorkingPegOffsetValue() { return workingPegOffsetValue; } @@ -620,7 +652,8 @@ public OrderListPlaceOtoRequest pendingClientOrderId( } /** - * Get pendingClientOrderId + * Arbitrary unique ID among open orders for the pending order. Automatically generated if not + * sent. * * @return pendingClientOrderId */ @@ -702,7 +735,7 @@ public OrderListPlaceOtoRequest pendingQuantity( } /** - * Get pendingQuantity + * Sets the quantity for the pending order. * * @return pendingQuantity */ @@ -724,7 +757,8 @@ public OrderListPlaceOtoRequest pendingIcebergQty( } /** - * Get pendingIcebergQty + * This can only be used if `pendingTimeInForce` is `GTC` or if + * `pendingType` is `LIMIT_MAKER`. * * @return pendingIcebergQty */ @@ -767,7 +801,7 @@ public OrderListPlaceOtoRequest pendingStrategyId( } /** - * Get pendingStrategyId + * Arbitrary numeric value identifying the pending order within an order strategy. * * @return pendingStrategyId */ @@ -787,7 +821,8 @@ public OrderListPlaceOtoRequest pendingStrategyType( } /** - * Get pendingStrategyType + * Arbitrary numeric value identifying the pending order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return pendingStrategyType */ @@ -851,11 +886,12 @@ public OrderListPlaceOtoRequest pendingPegOffsetValue( } /** - * Get pendingPegOffsetValue + * Get pendingPegOffsetValue maximum: 100 * * @return pendingPegOffsetValue */ @jakarta.annotation.Nullable + @Max(100) public Integer getPendingPegOffsetValue() { return pendingPegOffsetValue; } @@ -871,12 +907,14 @@ public OrderListPlaceOtoRequest recvWindow(@jakarta.annotation.Nullable Double r } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -894,7 +932,8 @@ public boolean equals(Object o) { return false; } OrderListPlaceOtoRequest orderListPlaceOtoRequest = (OrderListPlaceOtoRequest) o; - return Objects.equals(this.symbol, orderListPlaceOtoRequest.symbol) + return Objects.equals(this.id, orderListPlaceOtoRequest.id) + && Objects.equals(this.symbol, orderListPlaceOtoRequest.symbol) && Objects.equals( this.listClientOrderId, orderListPlaceOtoRequest.listClientOrderId) && Objects.equals(this.newOrderRespType, orderListPlaceOtoRequest.newOrderRespType) @@ -950,6 +989,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + id, symbol, listClientOrderId, newOrderRespType, @@ -987,6 +1027,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderListPlaceOtoRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" listClientOrderId: ").append(toIndentedString(listClientOrderId)).append("\n"); sb.append(" newOrderRespType: ").append(toIndentedString(newOrderRespType)).append("\n"); @@ -1054,6 +1095,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -1229,6 +1275,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -1379,6 +1429,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("listClientOrderId"); openapiFields.add("newOrderRespType"); @@ -1463,6 +1514,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponse.java index a8d9f6c09..99308a5c8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderListPlaceOtoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOtoResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class OrderListPlaceOtoResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public OrderListPlaceOtoResponse() {} @@ -129,12 +129,14 @@ public void setResult(@jakarta.annotation.Nullable OrderListPlaceOtoResponseResu } public OrderListPlaceOtoResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderListPlaceOtoResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public OrderListPlaceOtoResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -149,11 +151,13 @@ public OrderListPlaceOtoResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -208,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -331,7 +335,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponseResult.java index e93a41f46..cf9542a08 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderListPlaceOtoResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOtoResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponseResultOrderReportsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponseResultOrderReportsInner.java index dd42417d3..a83783cd8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponseResultOrderReportsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponseResultOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderListPlaceOtoResponseResultOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOtoResponseResultOrderReportsInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -136,6 +136,96 @@ public class OrderListPlaceOtoResponseResultOrderReportsInner extends BaseDTO { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + + @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @jakarta.annotation.Nullable + private String stopPrice; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OrderListPlaceOtoResponseResultOrderReportsInner() {} public OrderListPlaceOtoResponseResultOrderReportsInner symbol( @@ -459,6 +549,306 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OrderListPlaceOtoResponseResultOrderReportsInner icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderListPlaceOtoResponseResultOrderReportsInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderListPlaceOtoResponseResultOrderReportsInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public OrderListPlaceOtoResponseResultOrderReportsInner stopPrice( + @jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + /** + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. + * + * @return stopPrice + */ + @jakarta.annotation.Nullable + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + } + + public OrderListPlaceOtoResponseResultOrderReportsInner strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderListPlaceOtoResponseResultOrderReportsInner strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderListPlaceOtoResponseResultOrderReportsInner trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderListPlaceOtoResponseResultOrderReportsInner trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderListPlaceOtoResponseResultOrderReportsInner usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderListPlaceOtoResponseResultOrderReportsInner workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderListPlaceOtoResponseResultOrderReportsInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderListPlaceOtoResponseResultOrderReportsInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderListPlaceOtoResponseResultOrderReportsInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderListPlaceOtoResponseResultOrderReportsInner peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderListPlaceOtoResponseResultOrderReportsInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -507,7 +897,50 @@ public boolean equals(Object o) { orderListPlaceOtoResponseResultOrderReportsInner.workingTime) && Objects.equals( this.selfTradePreventionMode, - orderListPlaceOtoResponseResultOrderReportsInner.selfTradePreventionMode); + orderListPlaceOtoResponseResultOrderReportsInner.selfTradePreventionMode) + && Objects.equals( + this.icebergQty, + orderListPlaceOtoResponseResultOrderReportsInner.icebergQty) + && Objects.equals( + this.preventedMatchId, + orderListPlaceOtoResponseResultOrderReportsInner.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + orderListPlaceOtoResponseResultOrderReportsInner.preventedQuantity) + && Objects.equals( + this.stopPrice, orderListPlaceOtoResponseResultOrderReportsInner.stopPrice) + && Objects.equals( + this.strategyId, + orderListPlaceOtoResponseResultOrderReportsInner.strategyId) + && Objects.equals( + this.strategyType, + orderListPlaceOtoResponseResultOrderReportsInner.strategyType) + && Objects.equals( + this.trailingDelta, + orderListPlaceOtoResponseResultOrderReportsInner.trailingDelta) + && Objects.equals( + this.trailingTime, + orderListPlaceOtoResponseResultOrderReportsInner.trailingTime) + && Objects.equals( + this.usedSor, orderListPlaceOtoResponseResultOrderReportsInner.usedSor) + && Objects.equals( + this.workingFloor, + orderListPlaceOtoResponseResultOrderReportsInner.workingFloor) + && Objects.equals( + this.pegPriceType, + orderListPlaceOtoResponseResultOrderReportsInner.pegPriceType) + && Objects.equals( + this.pegOffsetType, + orderListPlaceOtoResponseResultOrderReportsInner.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, + orderListPlaceOtoResponseResultOrderReportsInner.pegOffsetValue) + && Objects.equals( + this.peggedPrice, + orderListPlaceOtoResponseResultOrderReportsInner.peggedPrice) + && Objects.equals( + this.expiryReason, + orderListPlaceOtoResponseResultOrderReportsInner.expiryReason); } @Override @@ -528,7 +961,22 @@ public int hashCode() { type, side, workingTime, - selfTradePreventionMode); + selfTradePreventionMode, + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -555,6 +1003,21 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -643,6 +1106,81 @@ public String toUrlQueryString() { String selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); valMap.put("selfTradePreventionMode", selfTradePreventionModeValueAsString); } + String icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + String icebergQtyValueAsString = icebergQtyValue.toString(); + valMap.put("icebergQty", icebergQtyValueAsString); + } + Long preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + String preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + valMap.put("preventedMatchId", preventedMatchIdValueAsString); + } + String preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + String preventedQuantityValueAsString = preventedQuantityValue.toString(); + valMap.put("preventedQuantity", preventedQuantityValueAsString); + } + String stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + String stopPriceValueAsString = stopPriceValue.toString(); + valMap.put("stopPrice", stopPriceValueAsString); + } + Long strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + String strategyIdValueAsString = strategyIdValue.toString(); + valMap.put("strategyId", strategyIdValueAsString); + } + Long strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + String strategyTypeValueAsString = strategyTypeValue.toString(); + valMap.put("strategyType", strategyTypeValueAsString); + } + Long trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + String trailingDeltaValueAsString = trailingDeltaValue.toString(); + valMap.put("trailingDelta", trailingDeltaValueAsString); + } + Long trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + String trailingTimeValueAsString = trailingTimeValue.toString(); + valMap.put("trailingTime", trailingTimeValueAsString); + } + Boolean usedSorValue = getUsedSor(); + if (usedSorValue != null) { + String usedSorValueAsString = usedSorValue.toString(); + valMap.put("usedSor", usedSorValueAsString); + } + String workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + String workingFloorValueAsString = workingFloorValue.toString(); + valMap.put("workingFloor", workingFloorValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -718,6 +1256,66 @@ public Map toMap() { if (selfTradePreventionModeValue != null) { valMap.put("selfTradePreventionMode", selfTradePreventionModeValue); } + Object icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + valMap.put("icebergQty", icebergQtyValue); + } + Object preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + valMap.put("preventedMatchId", preventedMatchIdValue); + } + Object preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + valMap.put("preventedQuantity", preventedQuantityValue); + } + Object stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + valMap.put("stopPrice", stopPriceValue); + } + Object strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + valMap.put("strategyId", strategyIdValue); + } + Object strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + valMap.put("strategyType", strategyTypeValue); + } + Object trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + valMap.put("trailingDelta", trailingDeltaValue); + } + Object trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + valMap.put("trailingTime", trailingTimeValue); + } + Object usedSorValue = getUsedSor(); + if (usedSorValue != null) { + valMap.put("usedSor", usedSorValue); + } + Object workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + valMap.put("workingFloor", workingFloorValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -760,6 +1358,21 @@ private String toIndentedString(Object o) { openapiFields.add("side"); openapiFields.add("workingTime"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -900,6 +1513,71 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) + && !jsonObj.get("stopPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `stopPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("stopPrice").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponseResultOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponseResultOrdersInner.java index 610c90e20..0d882f210 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponseResultOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponseResultOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderListPlaceOtoResponseResultOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOtoResponseResultOrdersInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoRequest.java index 8a7b0124f..548bb8cbc 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OrderListPlaceOtocoRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOtocoRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -316,6 +322,25 @@ public class OrderListPlaceOtocoRequest extends BaseDTO { public OrderListPlaceOtocoRequest() {} + public OrderListPlaceOtocoRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OrderListPlaceOtocoRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -343,7 +368,10 @@ public OrderListPlaceOtocoRequest listClientOrderId( } /** - * Get listClientOrderId + * Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order + * list with the same `listClientOrderId` is accepted only when the previous one is + * filled or completely expired. `listClientOrderId` is distinct from the + * `workingClientOrderId` and the `pendingClientOrderId`. * * @return listClientOrderId */ @@ -451,7 +479,8 @@ public OrderListPlaceOtocoRequest workingClientOrderId( } /** - * Get workingClientOrderId + * Arbitrary unique ID among open orders for the working order. Automatically generated if not + * sent. * * @return workingClientOrderId */ @@ -493,7 +522,7 @@ public OrderListPlaceOtocoRequest workingQuantity( } /** - * Get workingQuantity + * Sets the quantity for the working order. * * @return workingQuantity */ @@ -515,7 +544,8 @@ public OrderListPlaceOtocoRequest workingIcebergQty( } /** - * Get workingIcebergQty + * This can only be used if `workingTimeInForce` is `GTC`, or if + * `workingType` is `LIMIT_MAKER`. * * @return workingIcebergQty */ @@ -558,7 +588,7 @@ public OrderListPlaceOtocoRequest workingStrategyId( } /** - * Get workingStrategyId + * Arbitrary numeric value identifying the working order within an order strategy. * * @return workingStrategyId */ @@ -578,7 +608,8 @@ public OrderListPlaceOtocoRequest workingStrategyType( } /** - * Get workingStrategyType + * Arbitrary numeric value identifying the working order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return workingStrategyType */ @@ -642,11 +673,12 @@ public OrderListPlaceOtocoRequest workingPegOffsetValue( } /** - * Get workingPegOffsetValue + * Get workingPegOffsetValue maximum: 100 * * @return workingPegOffsetValue */ @jakarta.annotation.Nullable + @Max(100) public Integer getWorkingPegOffsetValue() { return workingPegOffsetValue; } @@ -685,7 +717,7 @@ public OrderListPlaceOtocoRequest pendingQuantity( } /** - * Get pendingQuantity + * Sets the quantity for the pending orders. * * @return pendingQuantity */ @@ -729,7 +761,8 @@ public OrderListPlaceOtocoRequest pendingAboveClientOrderId( } /** - * Get pendingAboveClientOrderId + * Arbitrary unique ID among open orders for the pending above order. Automatically generated if + * not sent. * * @return pendingAboveClientOrderId */ @@ -750,7 +783,8 @@ public OrderListPlaceOtocoRequest pendingAbovePrice( } /** - * Get pendingAbovePrice + * Can be used if `pendingAboveType` is `STOP_LOSS_LIMIT`, + * `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. * * @return pendingAbovePrice */ @@ -771,7 +805,8 @@ public OrderListPlaceOtocoRequest pendingAboveStopPrice( } /** - * Get pendingAboveStopPrice + * Can be used if `pendingAboveType` is `STOP_LOSS`, + * `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. * * @return pendingAboveStopPrice */ @@ -793,7 +828,7 @@ public OrderListPlaceOtocoRequest pendingAboveTrailingDelta( } /** - * Get pendingAboveTrailingDelta + * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) * * @return pendingAboveTrailingDelta */ @@ -815,7 +850,8 @@ public OrderListPlaceOtocoRequest pendingAboveIcebergQty( } /** - * Get pendingAboveIcebergQty + * This can only be used if `pendingAboveTimeInForce` is `GTC` or if + * `pendingAboveType` is `LIMIT_MAKER`. * * @return pendingAboveIcebergQty */ @@ -859,7 +895,7 @@ public OrderListPlaceOtocoRequest pendingAboveStrategyId( } /** - * Get pendingAboveStrategyId + * Arbitrary numeric value identifying the pending above order within an order strategy. * * @return pendingAboveStrategyId */ @@ -880,7 +916,8 @@ public OrderListPlaceOtocoRequest pendingAboveStrategyType( } /** - * Get pendingAboveStrategyType + * Arbitrary numeric value identifying the pending above order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return pendingAboveStrategyType */ @@ -945,11 +982,12 @@ public OrderListPlaceOtocoRequest pendingAbovePegOffsetValue( } /** - * Get pendingAbovePegOffsetValue + * Get pendingAbovePegOffsetValue maximum: 100 * * @return pendingAbovePegOffsetValue */ @jakarta.annotation.Nullable + @Max(100) public Integer getPendingAbovePegOffsetValue() { return pendingAbovePegOffsetValue; } @@ -988,7 +1026,8 @@ public OrderListPlaceOtocoRequest pendingBelowClientOrderId( } /** - * Get pendingBelowClientOrderId + * Arbitrary unique ID among open orders for the pending below order. Automatically generated if + * not sent. * * @return pendingBelowClientOrderId */ @@ -1009,7 +1048,8 @@ public OrderListPlaceOtocoRequest pendingBelowPrice( } /** - * Get pendingBelowPrice + * Can be used if `pendingBelowType` is `STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT` to specify the limit price. * * @return pendingBelowPrice */ @@ -1030,7 +1070,10 @@ public OrderListPlaceOtocoRequest pendingBelowStopPrice( } /** - * Get pendingBelowStopPrice + * Can be used if `pendingBelowType` is `STOP_LOSS`, + * `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either + * `pendingBelowStopPrice` or `pendingBelowTrailingDelta` or both, must be + * specified. * * @return pendingBelowStopPrice */ @@ -1052,7 +1095,7 @@ public OrderListPlaceOtocoRequest pendingBelowTrailingDelta( } /** - * Get pendingBelowTrailingDelta + * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) * * @return pendingBelowTrailingDelta */ @@ -1074,7 +1117,8 @@ public OrderListPlaceOtocoRequest pendingBelowIcebergQty( } /** - * Get pendingBelowIcebergQty + * This can only be used if `pendingBelowTimeInForce` is `GTC`, or if + * `pendingBelowType` is `LIMIT_MAKER`. * * @return pendingBelowIcebergQty */ @@ -1118,7 +1162,7 @@ public OrderListPlaceOtocoRequest pendingBelowStrategyId( } /** - * Get pendingBelowStrategyId + * Arbitrary numeric value identifying the pending below order within an order strategy. * * @return pendingBelowStrategyId */ @@ -1139,7 +1183,8 @@ public OrderListPlaceOtocoRequest pendingBelowStrategyType( } /** - * Get pendingBelowStrategyType + * Arbitrary numeric value identifying the pending below order strategy. Values smaller than + * `1000000` are reserved and cannot be used. * * @return pendingBelowStrategyType */ @@ -1204,11 +1249,12 @@ public OrderListPlaceOtocoRequest pendingBelowPegOffsetValue( } /** - * Get pendingBelowPegOffsetValue + * Get pendingBelowPegOffsetValue maximum: 100 * * @return pendingBelowPegOffsetValue */ @jakarta.annotation.Nullable + @Max(100) public Integer getPendingBelowPegOffsetValue() { return pendingBelowPegOffsetValue; } @@ -1224,12 +1270,14 @@ public OrderListPlaceOtocoRequest recvWindow(@jakarta.annotation.Nullable Double } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -1247,7 +1295,8 @@ public boolean equals(Object o) { return false; } OrderListPlaceOtocoRequest orderListPlaceOtocoRequest = (OrderListPlaceOtocoRequest) o; - return Objects.equals(this.symbol, orderListPlaceOtocoRequest.symbol) + return Objects.equals(this.id, orderListPlaceOtocoRequest.id) + && Objects.equals(this.symbol, orderListPlaceOtocoRequest.symbol) && Objects.equals( this.listClientOrderId, orderListPlaceOtocoRequest.listClientOrderId) && Objects.equals( @@ -1352,6 +1401,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + id, symbol, listClientOrderId, newOrderRespType, @@ -1401,6 +1451,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderListPlaceOtocoRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" listClientOrderId: ").append(toIndentedString(listClientOrderId)).append("\n"); sb.append(" newOrderRespType: ").append(toIndentedString(newOrderRespType)).append("\n"); @@ -1506,6 +1557,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -1751,6 +1807,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -1949,6 +2009,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("listClientOrderId"); openapiFields.add("newOrderRespType"); @@ -2045,6 +2106,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponse.java index acfbd805c..fd829dfac 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderListPlaceOtocoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOtocoResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class OrderListPlaceOtocoResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public OrderListPlaceOtocoResponse() {} @@ -129,12 +129,14 @@ public void setResult(@jakarta.annotation.Nullable OrderListPlaceOtocoResponseRe } public OrderListPlaceOtocoResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderListPlaceOtocoResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public OrderListPlaceOtocoResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -149,11 +151,13 @@ public OrderListPlaceOtocoResponse addRateLimitsItem(RateLimits rateLimitsItem) */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -208,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -332,7 +336,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponseResult.java index 9a9172e92..6338c2d8e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderListPlaceOtocoResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOtocoResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponseResultOrderReportsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponseResultOrderReportsInner.java index 7afd1fe8d..688f85f84 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponseResultOrderReportsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponseResultOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderListPlaceOtocoResponseResultOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOtocoResponseResultOrderReportsInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -136,12 +136,96 @@ public class OrderListPlaceOtocoResponseResultOrderReportsInner extends BaseDTO @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; @SerializedName(SERIALIZED_NAME_STOP_PRICE) @jakarta.annotation.Nullable private String stopPrice; + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OrderListPlaceOtocoResponseResultOrderReportsInner() {} public OrderListPlaceOtocoResponseResultOrderReportsInner symbol( @@ -465,6 +549,66 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OrderListPlaceOtocoResponseResultOrderReportsInner icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderListPlaceOtocoResponseResultOrderReportsInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderListPlaceOtocoResponseResultOrderReportsInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + public OrderListPlaceOtocoResponseResultOrderReportsInner stopPrice( @jakarta.annotation.Nullable String stopPrice) { this.stopPrice = stopPrice; @@ -472,7 +616,7 @@ public OrderListPlaceOtocoResponseResultOrderReportsInner stopPrice( } /** - * Get stopPrice + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. * * @return stopPrice */ @@ -485,6 +629,226 @@ public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { this.stopPrice = stopPrice; } + public OrderListPlaceOtocoResponseResultOrderReportsInner strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderListPlaceOtocoResponseResultOrderReportsInner strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderListPlaceOtocoResponseResultOrderReportsInner trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderListPlaceOtocoResponseResultOrderReportsInner trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderListPlaceOtocoResponseResultOrderReportsInner usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderListPlaceOtocoResponseResultOrderReportsInner workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderListPlaceOtocoResponseResultOrderReportsInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderListPlaceOtocoResponseResultOrderReportsInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderListPlaceOtocoResponseResultOrderReportsInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderListPlaceOtocoResponseResultOrderReportsInner peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderListPlaceOtocoResponseResultOrderReportsInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -537,9 +901,50 @@ public boolean equals(Object o) { && Objects.equals( this.selfTradePreventionMode, orderListPlaceOtocoResponseResultOrderReportsInner.selfTradePreventionMode) + && Objects.equals( + this.icebergQty, + orderListPlaceOtocoResponseResultOrderReportsInner.icebergQty) + && Objects.equals( + this.preventedMatchId, + orderListPlaceOtocoResponseResultOrderReportsInner.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + orderListPlaceOtocoResponseResultOrderReportsInner.preventedQuantity) && Objects.equals( this.stopPrice, - orderListPlaceOtocoResponseResultOrderReportsInner.stopPrice); + orderListPlaceOtocoResponseResultOrderReportsInner.stopPrice) + && Objects.equals( + this.strategyId, + orderListPlaceOtocoResponseResultOrderReportsInner.strategyId) + && Objects.equals( + this.strategyType, + orderListPlaceOtocoResponseResultOrderReportsInner.strategyType) + && Objects.equals( + this.trailingDelta, + orderListPlaceOtocoResponseResultOrderReportsInner.trailingDelta) + && Objects.equals( + this.trailingTime, + orderListPlaceOtocoResponseResultOrderReportsInner.trailingTime) + && Objects.equals( + this.usedSor, orderListPlaceOtocoResponseResultOrderReportsInner.usedSor) + && Objects.equals( + this.workingFloor, + orderListPlaceOtocoResponseResultOrderReportsInner.workingFloor) + && Objects.equals( + this.pegPriceType, + orderListPlaceOtocoResponseResultOrderReportsInner.pegPriceType) + && Objects.equals( + this.pegOffsetType, + orderListPlaceOtocoResponseResultOrderReportsInner.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, + orderListPlaceOtocoResponseResultOrderReportsInner.pegOffsetValue) + && Objects.equals( + this.peggedPrice, + orderListPlaceOtocoResponseResultOrderReportsInner.peggedPrice) + && Objects.equals( + this.expiryReason, + orderListPlaceOtocoResponseResultOrderReportsInner.expiryReason); } @Override @@ -561,7 +966,21 @@ public int hashCode() { side, workingTime, selfTradePreventionMode, - stopPrice); + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -588,7 +1007,21 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -677,11 +1110,81 @@ public String toUrlQueryString() { String selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); valMap.put("selfTradePreventionMode", selfTradePreventionModeValueAsString); } + String icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + String icebergQtyValueAsString = icebergQtyValue.toString(); + valMap.put("icebergQty", icebergQtyValueAsString); + } + Long preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + String preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + valMap.put("preventedMatchId", preventedMatchIdValueAsString); + } + String preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + String preventedQuantityValueAsString = preventedQuantityValue.toString(); + valMap.put("preventedQuantity", preventedQuantityValueAsString); + } String stopPriceValue = getStopPrice(); if (stopPriceValue != null) { String stopPriceValueAsString = stopPriceValue.toString(); valMap.put("stopPrice", stopPriceValueAsString); } + Long strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + String strategyIdValueAsString = strategyIdValue.toString(); + valMap.put("strategyId", strategyIdValueAsString); + } + Long strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + String strategyTypeValueAsString = strategyTypeValue.toString(); + valMap.put("strategyType", strategyTypeValueAsString); + } + Long trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + String trailingDeltaValueAsString = trailingDeltaValue.toString(); + valMap.put("trailingDelta", trailingDeltaValueAsString); + } + Long trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + String trailingTimeValueAsString = trailingTimeValue.toString(); + valMap.put("trailingTime", trailingTimeValueAsString); + } + Boolean usedSorValue = getUsedSor(); + if (usedSorValue != null) { + String usedSorValueAsString = usedSorValue.toString(); + valMap.put("usedSor", usedSorValueAsString); + } + String workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + String workingFloorValueAsString = workingFloorValue.toString(); + valMap.put("workingFloor", workingFloorValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -757,10 +1260,66 @@ public Map toMap() { if (selfTradePreventionModeValue != null) { valMap.put("selfTradePreventionMode", selfTradePreventionModeValue); } + Object icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + valMap.put("icebergQty", icebergQtyValue); + } + Object preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + valMap.put("preventedMatchId", preventedMatchIdValue); + } + Object preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + valMap.put("preventedQuantity", preventedQuantityValue); + } Object stopPriceValue = getStopPrice(); if (stopPriceValue != null) { valMap.put("stopPrice", stopPriceValue); } + Object strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + valMap.put("strategyId", strategyIdValue); + } + Object strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + valMap.put("strategyType", strategyTypeValue); + } + Object trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + valMap.put("trailingDelta", trailingDeltaValue); + } + Object trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + valMap.put("trailingTime", trailingTimeValue); + } + Object usedSorValue = getUsedSor(); + if (usedSorValue != null) { + valMap.put("usedSor", usedSorValue); + } + Object workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + valMap.put("workingFloor", workingFloorValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -803,7 +1362,21 @@ private String toIndentedString(Object o) { openapiFields.add("side"); openapiFields.add("workingTime"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -944,6 +1517,23 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) && !jsonObj.get("stopPrice").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -952,6 +1542,46 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("stopPrice").toString())); } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponseResultOrdersInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponseResultOrdersInner.java index faed422e9..846db4d10 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponseResultOrdersInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponseResultOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderListPlaceOtocoResponseResultOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceOtocoResponseResultOrdersInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceRequest.java index 8bdd27887..467142d78 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OrderListPlaceRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -164,6 +170,25 @@ public class OrderListPlaceRequest extends BaseDTO { public OrderListPlaceRequest() {} + public OrderListPlaceRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OrderListPlaceRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -254,7 +279,7 @@ public OrderListPlaceRequest listClientOrderId( } /** - * Get listClientOrderId + * A unique Id for the entire orderList * * @return listClientOrderId */ @@ -274,7 +299,7 @@ public OrderListPlaceRequest limitClientOrderId( } /** - * Get limitClientOrderId + * A unique Id for the limit order * * @return limitClientOrderId */ @@ -294,7 +319,7 @@ public OrderListPlaceRequest limitIcebergQty( } /** - * Get limitIcebergQty + * Used to make the `LIMIT_MAKER` leg an iceberg order. * * @return limitIcebergQty */ @@ -335,7 +360,7 @@ public OrderListPlaceRequest limitStrategyType( } /** - * Get limitStrategyType + * The value cannot be less than `1000000`. * * @return limitStrategyType */ @@ -394,7 +419,7 @@ public OrderListPlaceRequest stopClientOrderId( } /** - * Get stopClientOrderId + * A unique Id for the stop loss/stop loss limit leg * * @return stopClientOrderId */ @@ -414,7 +439,7 @@ public OrderListPlaceRequest stopLimitPrice( } /** - * Get stopLimitPrice + * If provided, `stopLimitTimeInForce` is required. * * @return stopLimitPrice */ @@ -457,7 +482,7 @@ public OrderListPlaceRequest stopIcebergQty( } /** - * Get stopIcebergQty + * Used with `STOP_LOSS_LIMIT` leg to make an iceberg order. * * @return stopIcebergQty */ @@ -497,7 +522,7 @@ public OrderListPlaceRequest stopStrategyType( } /** - * Get stopStrategyType + * The value cannot be less than `1000000`. * * @return stopStrategyType */ @@ -560,12 +585,14 @@ public OrderListPlaceRequest recvWindow(@jakarta.annotation.Nullable Double recv } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -583,7 +610,8 @@ public boolean equals(Object o) { return false; } OrderListPlaceRequest orderListPlaceRequest = (OrderListPlaceRequest) o; - return Objects.equals(this.symbol, orderListPlaceRequest.symbol) + return Objects.equals(this.id, orderListPlaceRequest.id) + && Objects.equals(this.symbol, orderListPlaceRequest.symbol) && Objects.equals(this.side, orderListPlaceRequest.side) && Objects.equals(this.price, orderListPlaceRequest.price) && Objects.equals(this.quantity, orderListPlaceRequest.quantity) @@ -610,6 +638,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + id, symbol, side, price, @@ -636,6 +665,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderListPlaceRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); @@ -670,6 +700,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -785,6 +820,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -891,6 +930,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("side"); openapiFields.add("price"); @@ -960,6 +1000,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceResponse.java index 2d8d1e953..e0e25cc39 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderListPlaceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class OrderListPlaceResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public OrderListPlaceResponse() {} @@ -129,12 +129,14 @@ public void setResult(@jakarta.annotation.Nullable OrderListPlaceResponseResult } public OrderListPlaceResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderListPlaceResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public OrderListPlaceResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -149,11 +151,13 @@ public OrderListPlaceResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -208,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -331,7 +335,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceResponseResult.java index 07402193b..910969631 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderListPlaceResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; @@ -89,7 +89,7 @@ public class OrderListPlaceResponseResult extends BaseDTO { @SerializedName(SERIALIZED_NAME_ORDERS) @jakarta.annotation.Nullable - private List<@Valid OrderListCancelResponseResultOrdersInner> orders; + private List<@Valid AllOrderListsResponseResultInnerOrdersInner> orders; public static final String SERIALIZED_NAME_ORDER_REPORTS = "orderReports"; @@ -239,13 +239,13 @@ public void setSymbol(@jakarta.annotation.Nullable String symbol) { public OrderListPlaceResponseResult orders( @jakarta.annotation.Nullable - List<@Valid OrderListCancelResponseResultOrdersInner> orders) { + List<@Valid AllOrderListsResponseResultInnerOrdersInner> orders) { this.orders = orders; return this; } public OrderListPlaceResponseResult addOrdersItem( - OrderListCancelResponseResultOrdersInner ordersItem) { + AllOrderListsResponseResultInnerOrdersInner ordersItem) { if (this.orders == null) { this.orders = new ArrayList<>(); } @@ -260,13 +260,13 @@ public OrderListPlaceResponseResult addOrdersItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid OrderListCancelResponseResultOrdersInner> getOrders() { + public List<@Valid AllOrderListsResponseResultInnerOrdersInner> getOrders() { return orders; } public void setOrders( @jakarta.annotation.Nullable - List<@Valid OrderListCancelResponseResultOrdersInner> orders) { + List<@Valid AllOrderListsResponseResultInnerOrdersInner> orders) { this.orders = orders; } @@ -398,7 +398,7 @@ public String toUrlQueryString() { String symbolValueAsString = symbolValue.toString(); valMap.put("symbol", symbolValueAsString); } - List<@Valid OrderListCancelResponseResultOrdersInner> ordersValue = getOrders(); + List<@Valid AllOrderListsResponseResultInnerOrdersInner> ordersValue = getOrders(); if (ordersValue != null) { String ordersValueAsString = JSON.getGson().toJson(ordersValue); valMap.put("orders", ordersValueAsString); @@ -582,7 +582,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `orders` (array) for (int i = 0; i < jsonArrayorders.size(); i++) { - OrderListCancelResponseResultOrdersInner.validateJsonElement( + AllOrderListsResponseResultInnerOrdersInner.validateJsonElement( jsonArrayorders.get(i)); } ; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceResponseResultOrderReportsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceResponseResultOrderReportsInner.java index 5991a07fd..32656e8b7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceResponseResultOrderReportsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceResponseResultOrderReportsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderListPlaceResponseResultOrderReportsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListPlaceResponseResultOrderReportsInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -136,12 +136,96 @@ public class OrderListPlaceResponseResultOrderReportsInner extends BaseDTO { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; @SerializedName(SERIALIZED_NAME_STOP_PRICE) @jakarta.annotation.Nullable private String stopPrice; + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OrderListPlaceResponseResultOrderReportsInner() {} public OrderListPlaceResponseResultOrderReportsInner symbol( @@ -465,6 +549,66 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OrderListPlaceResponseResultOrderReportsInner icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderListPlaceResponseResultOrderReportsInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderListPlaceResponseResultOrderReportsInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + public OrderListPlaceResponseResultOrderReportsInner stopPrice( @jakarta.annotation.Nullable String stopPrice) { this.stopPrice = stopPrice; @@ -472,7 +616,7 @@ public OrderListPlaceResponseResultOrderReportsInner stopPrice( } /** - * Get stopPrice + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. * * @return stopPrice */ @@ -485,6 +629,226 @@ public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { this.stopPrice = stopPrice; } + public OrderListPlaceResponseResultOrderReportsInner strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderListPlaceResponseResultOrderReportsInner strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderListPlaceResponseResultOrderReportsInner trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderListPlaceResponseResultOrderReportsInner trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderListPlaceResponseResultOrderReportsInner usedSor( + @jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderListPlaceResponseResultOrderReportsInner workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderListPlaceResponseResultOrderReportsInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderListPlaceResponseResultOrderReportsInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderListPlaceResponseResultOrderReportsInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderListPlaceResponseResultOrderReportsInner peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderListPlaceResponseResultOrderReportsInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -529,7 +893,45 @@ public boolean equals(Object o) { this.selfTradePreventionMode, orderListPlaceResponseResultOrderReportsInner.selfTradePreventionMode) && Objects.equals( - this.stopPrice, orderListPlaceResponseResultOrderReportsInner.stopPrice); + this.icebergQty, orderListPlaceResponseResultOrderReportsInner.icebergQty) + && Objects.equals( + this.preventedMatchId, + orderListPlaceResponseResultOrderReportsInner.preventedMatchId) + && Objects.equals( + this.preventedQuantity, + orderListPlaceResponseResultOrderReportsInner.preventedQuantity) + && Objects.equals( + this.stopPrice, orderListPlaceResponseResultOrderReportsInner.stopPrice) + && Objects.equals( + this.strategyId, orderListPlaceResponseResultOrderReportsInner.strategyId) + && Objects.equals( + this.strategyType, + orderListPlaceResponseResultOrderReportsInner.strategyType) + && Objects.equals( + this.trailingDelta, + orderListPlaceResponseResultOrderReportsInner.trailingDelta) + && Objects.equals( + this.trailingTime, + orderListPlaceResponseResultOrderReportsInner.trailingTime) + && Objects.equals( + this.usedSor, orderListPlaceResponseResultOrderReportsInner.usedSor) + && Objects.equals( + this.workingFloor, + orderListPlaceResponseResultOrderReportsInner.workingFloor) + && Objects.equals( + this.pegPriceType, + orderListPlaceResponseResultOrderReportsInner.pegPriceType) + && Objects.equals( + this.pegOffsetType, + orderListPlaceResponseResultOrderReportsInner.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, + orderListPlaceResponseResultOrderReportsInner.pegOffsetValue) + && Objects.equals( + this.peggedPrice, orderListPlaceResponseResultOrderReportsInner.peggedPrice) + && Objects.equals( + this.expiryReason, + orderListPlaceResponseResultOrderReportsInner.expiryReason); } @Override @@ -551,7 +953,21 @@ public int hashCode() { side, workingTime, selfTradePreventionMode, - stopPrice); + icebergQty, + preventedMatchId, + preventedQuantity, + stopPrice, + strategyId, + strategyType, + trailingDelta, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -578,7 +994,21 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -667,11 +1097,81 @@ public String toUrlQueryString() { String selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); valMap.put("selfTradePreventionMode", selfTradePreventionModeValueAsString); } + String icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + String icebergQtyValueAsString = icebergQtyValue.toString(); + valMap.put("icebergQty", icebergQtyValueAsString); + } + Long preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + String preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + valMap.put("preventedMatchId", preventedMatchIdValueAsString); + } + String preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + String preventedQuantityValueAsString = preventedQuantityValue.toString(); + valMap.put("preventedQuantity", preventedQuantityValueAsString); + } String stopPriceValue = getStopPrice(); if (stopPriceValue != null) { String stopPriceValueAsString = stopPriceValue.toString(); valMap.put("stopPrice", stopPriceValueAsString); } + Long strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + String strategyIdValueAsString = strategyIdValue.toString(); + valMap.put("strategyId", strategyIdValueAsString); + } + Long strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + String strategyTypeValueAsString = strategyTypeValue.toString(); + valMap.put("strategyType", strategyTypeValueAsString); + } + Long trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + String trailingDeltaValueAsString = trailingDeltaValue.toString(); + valMap.put("trailingDelta", trailingDeltaValueAsString); + } + Long trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + String trailingTimeValueAsString = trailingTimeValue.toString(); + valMap.put("trailingTime", trailingTimeValueAsString); + } + Boolean usedSorValue = getUsedSor(); + if (usedSorValue != null) { + String usedSorValueAsString = usedSorValue.toString(); + valMap.put("usedSor", usedSorValueAsString); + } + String workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + String workingFloorValueAsString = workingFloorValue.toString(); + valMap.put("workingFloor", workingFloorValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -747,10 +1247,66 @@ public Map toMap() { if (selfTradePreventionModeValue != null) { valMap.put("selfTradePreventionMode", selfTradePreventionModeValue); } + Object icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + valMap.put("icebergQty", icebergQtyValue); + } + Object preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + valMap.put("preventedMatchId", preventedMatchIdValue); + } + Object preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + valMap.put("preventedQuantity", preventedQuantityValue); + } Object stopPriceValue = getStopPrice(); if (stopPriceValue != null) { valMap.put("stopPrice", stopPriceValue); } + Object strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + valMap.put("strategyId", strategyIdValue); + } + Object strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + valMap.put("strategyType", strategyTypeValue); + } + Object trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + valMap.put("trailingDelta", trailingDeltaValue); + } + Object trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + valMap.put("trailingTime", trailingTimeValue); + } + Object usedSorValue = getUsedSor(); + if (usedSorValue != null) { + valMap.put("usedSor", usedSorValue); + } + Object workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + valMap.put("workingFloor", workingFloorValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -793,7 +1349,21 @@ private String toIndentedString(Object o) { openapiFields.add("side"); openapiFields.add("workingTime"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("icebergQty"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); openapiFields.add("stopPrice"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("trailingDelta"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -933,6 +1503,23 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) && !jsonObj.get("stopPrice").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -941,6 +1528,46 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("stopPrice").toString())); } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListStatusRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListStatusRequest.java index ebce9e2ea..8831b3abc 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListStatusRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListStatusRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OrderListStatusRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListStatusRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_ORIG_CLIENT_ORDER_ID = "origClientOrderId"; @SerializedName(SERIALIZED_NAME_ORIG_CLIENT_ORDER_ID) @@ -61,6 +67,25 @@ public class OrderListStatusRequest extends BaseDTO { public OrderListStatusRequest() {} + public OrderListStatusRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OrderListStatusRequest origClientOrderId( @jakarta.annotation.Nullable String origClientOrderId) { this.origClientOrderId = origClientOrderId; @@ -68,7 +93,8 @@ public OrderListStatusRequest origClientOrderId( } /** - * Get origClientOrderId + * Query order list by `listClientOrderId`. `orderListId` or + * `origClientOrderId` must be provided. * * @return origClientOrderId */ @@ -87,7 +113,8 @@ public OrderListStatusRequest orderListId(@jakarta.annotation.Nullable Integer o } /** - * Get orderListId + * Query order list by `orderListId`. `orderListId` or + * `origClientOrderId` must be provided. * * @return orderListId */ @@ -106,12 +133,14 @@ public OrderListStatusRequest recvWindow(@jakarta.annotation.Nullable Double rec } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -129,20 +158,22 @@ public boolean equals(Object o) { return false; } OrderListStatusRequest orderListStatusRequest = (OrderListStatusRequest) o; - return Objects.equals(this.origClientOrderId, orderListStatusRequest.origClientOrderId) + return Objects.equals(this.id, orderListStatusRequest.id) + && Objects.equals(this.origClientOrderId, orderListStatusRequest.origClientOrderId) && Objects.equals(this.orderListId, orderListStatusRequest.orderListId) && Objects.equals(this.recvWindow, orderListStatusRequest.recvWindow); } @Override public int hashCode() { - return Objects.hash(origClientOrderId, orderListId, recvWindow); + return Objects.hash(id, origClientOrderId, orderListId, recvWindow); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderListStatusRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" origClientOrderId: ").append(toIndentedString(origClientOrderId)).append("\n"); sb.append(" orderListId: ").append(toIndentedString(orderListId)).append("\n"); sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); @@ -154,6 +185,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String origClientOrderIdValue = getOrigClientOrderId(); if (origClientOrderIdValue != null) { String origClientOrderIdValueAsString = origClientOrderIdValue.toString(); @@ -181,6 +217,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object origClientOrderIdValue = getOrigClientOrderId(); if (origClientOrderIdValue != null) { valMap.put("origClientOrderId", origClientOrderIdValue); @@ -219,6 +259,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("origClientOrderId"); openapiFields.add("orderListId"); openapiFields.add("recvWindow"); @@ -257,6 +298,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if ((jsonObj.get("origClientOrderId") != null && !jsonObj.get("origClientOrderId").isJsonNull()) && !jsonObj.get("origClientOrderId").isJsonPrimitive()) { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListStatusResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListStatusResponse.java index 6b85b45ba..83740c157 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListStatusResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderListStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderListStatusResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -59,13 +59,13 @@ public class OrderListStatusResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RESULT) @jakarta.annotation.Nullable - private AllOrderListsResponseResultInner result; + private OrderListStatusResponseResult result; public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public OrderListStatusResponse() {} @@ -108,7 +108,7 @@ public void setStatus(@jakarta.annotation.Nullable Long status) { } public OrderListStatusResponse result( - @jakarta.annotation.Nullable AllOrderListsResponseResultInner result) { + @jakarta.annotation.Nullable OrderListStatusResponseResult result) { this.result = result; return this; } @@ -120,21 +120,23 @@ public OrderListStatusResponse result( */ @jakarta.annotation.Nullable @Valid - public AllOrderListsResponseResultInner getResult() { + public OrderListStatusResponseResult getResult() { return result; } - public void setResult(@jakarta.annotation.Nullable AllOrderListsResponseResultInner result) { + public void setResult(@jakarta.annotation.Nullable OrderListStatusResponseResult result) { this.result = result; } public OrderListStatusResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderListStatusResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public OrderListStatusResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -149,11 +151,13 @@ public OrderListStatusResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -203,12 +207,12 @@ public String toUrlQueryString() { String statusValueAsString = statusValue.toString(); valMap.put("status", statusValueAsString); } - AllOrderListsResponseResultInner resultValue = getResult(); + OrderListStatusResponseResult resultValue = getResult(); if (resultValue != null) { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -315,7 +319,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `result` if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { - AllOrderListsResponseResultInner.validateJsonElement(jsonObj.get("result")); + OrderListStatusResponseResult.validateJsonElement(jsonObj.get("result")); } if (jsonObj.get("rateLimits") != null && !jsonObj.get("rateLimits").isJsonNull()) { JsonArray jsonArrayrateLimits = jsonObj.getAsJsonArray("rateLimits"); @@ -331,7 +335,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListStatusResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListStatusResponseResult.java new file mode 100644 index 000000000..172458adf --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListStatusResponseResult.java @@ -0,0 +1,594 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** OrderListStatusResponseResult */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OrderListStatusResponseResult extends BaseDTO { + public static final String SERIALIZED_NAME_ORDER_LIST_ID = "orderListId"; + + @SerializedName(SERIALIZED_NAME_ORDER_LIST_ID) + @jakarta.annotation.Nullable + private Long orderListId; + + public static final String SERIALIZED_NAME_CONTINGENCY_TYPE = "contingencyType"; + + @SerializedName(SERIALIZED_NAME_CONTINGENCY_TYPE) + @jakarta.annotation.Nullable + private String contingencyType; + + public static final String SERIALIZED_NAME_LIST_STATUS_TYPE = "listStatusType"; + + @SerializedName(SERIALIZED_NAME_LIST_STATUS_TYPE) + @jakarta.annotation.Nullable + private String listStatusType; + + public static final String SERIALIZED_NAME_LIST_ORDER_STATUS = "listOrderStatus"; + + @SerializedName(SERIALIZED_NAME_LIST_ORDER_STATUS) + @jakarta.annotation.Nullable + private String listOrderStatus; + + public static final String SERIALIZED_NAME_LIST_CLIENT_ORDER_ID = "listClientOrderId"; + + @SerializedName(SERIALIZED_NAME_LIST_CLIENT_ORDER_ID) + @jakarta.annotation.Nullable + private String listClientOrderId; + + public static final String SERIALIZED_NAME_TRANSACTION_TIME = "transactionTime"; + + @SerializedName(SERIALIZED_NAME_TRANSACTION_TIME) + @jakarta.annotation.Nullable + private Long transactionTime; + + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_ORDERS = "orders"; + + @SerializedName(SERIALIZED_NAME_ORDERS) + @jakarta.annotation.Nullable + private List<@Valid AllOrderListsResponseResultInnerOrdersInner> orders; + + public OrderListStatusResponseResult() {} + + public OrderListStatusResponseResult orderListId( + @jakarta.annotation.Nullable Long orderListId) { + this.orderListId = orderListId; + return this; + } + + /** + * Get orderListId + * + * @return orderListId + */ + @jakarta.annotation.Nullable + public Long getOrderListId() { + return orderListId; + } + + public void setOrderListId(@jakarta.annotation.Nullable Long orderListId) { + this.orderListId = orderListId; + } + + public OrderListStatusResponseResult contingencyType( + @jakarta.annotation.Nullable String contingencyType) { + this.contingencyType = contingencyType; + return this; + } + + /** + * Get contingencyType + * + * @return contingencyType + */ + @jakarta.annotation.Nullable + public String getContingencyType() { + return contingencyType; + } + + public void setContingencyType(@jakarta.annotation.Nullable String contingencyType) { + this.contingencyType = contingencyType; + } + + public OrderListStatusResponseResult listStatusType( + @jakarta.annotation.Nullable String listStatusType) { + this.listStatusType = listStatusType; + return this; + } + + /** + * Get listStatusType + * + * @return listStatusType + */ + @jakarta.annotation.Nullable + public String getListStatusType() { + return listStatusType; + } + + public void setListStatusType(@jakarta.annotation.Nullable String listStatusType) { + this.listStatusType = listStatusType; + } + + public OrderListStatusResponseResult listOrderStatus( + @jakarta.annotation.Nullable String listOrderStatus) { + this.listOrderStatus = listOrderStatus; + return this; + } + + /** + * Get listOrderStatus + * + * @return listOrderStatus + */ + @jakarta.annotation.Nullable + public String getListOrderStatus() { + return listOrderStatus; + } + + public void setListOrderStatus(@jakarta.annotation.Nullable String listOrderStatus) { + this.listOrderStatus = listOrderStatus; + } + + public OrderListStatusResponseResult listClientOrderId( + @jakarta.annotation.Nullable String listClientOrderId) { + this.listClientOrderId = listClientOrderId; + return this; + } + + /** + * Get listClientOrderId + * + * @return listClientOrderId + */ + @jakarta.annotation.Nullable + public String getListClientOrderId() { + return listClientOrderId; + } + + public void setListClientOrderId(@jakarta.annotation.Nullable String listClientOrderId) { + this.listClientOrderId = listClientOrderId; + } + + public OrderListStatusResponseResult transactionTime( + @jakarta.annotation.Nullable Long transactionTime) { + this.transactionTime = transactionTime; + return this; + } + + /** + * Get transactionTime + * + * @return transactionTime + */ + @jakarta.annotation.Nullable + public Long getTransactionTime() { + return transactionTime; + } + + public void setTransactionTime(@jakarta.annotation.Nullable Long transactionTime) { + this.transactionTime = transactionTime; + } + + public OrderListStatusResponseResult symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Get symbol + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public OrderListStatusResponseResult orders( + @jakarta.annotation.Nullable + List<@Valid AllOrderListsResponseResultInnerOrdersInner> orders) { + this.orders = orders; + return this; + } + + public OrderListStatusResponseResult addOrdersItem( + AllOrderListsResponseResultInnerOrdersInner ordersItem) { + if (this.orders == null) { + this.orders = new ArrayList<>(); + } + this.orders.add(ordersItem); + return this; + } + + /** + * Get orders + * + * @return orders + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid AllOrderListsResponseResultInnerOrdersInner> getOrders() { + return orders; + } + + public void setOrders( + @jakarta.annotation.Nullable + List<@Valid AllOrderListsResponseResultInnerOrdersInner> orders) { + this.orders = orders; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderListStatusResponseResult orderListStatusResponseResult = + (OrderListStatusResponseResult) o; + return Objects.equals(this.orderListId, orderListStatusResponseResult.orderListId) + && Objects.equals( + this.contingencyType, orderListStatusResponseResult.contingencyType) + && Objects.equals(this.listStatusType, orderListStatusResponseResult.listStatusType) + && Objects.equals( + this.listOrderStatus, orderListStatusResponseResult.listOrderStatus) + && Objects.equals( + this.listClientOrderId, orderListStatusResponseResult.listClientOrderId) + && Objects.equals( + this.transactionTime, orderListStatusResponseResult.transactionTime) + && Objects.equals(this.symbol, orderListStatusResponseResult.symbol) + && Objects.equals(this.orders, orderListStatusResponseResult.orders); + } + + @Override + public int hashCode() { + return Objects.hash( + orderListId, + contingencyType, + listStatusType, + listOrderStatus, + listClientOrderId, + transactionTime, + symbol, + orders); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderListStatusResponseResult {\n"); + sb.append(" orderListId: ").append(toIndentedString(orderListId)).append("\n"); + sb.append(" contingencyType: ").append(toIndentedString(contingencyType)).append("\n"); + sb.append(" listStatusType: ").append(toIndentedString(listStatusType)).append("\n"); + sb.append(" listOrderStatus: ").append(toIndentedString(listOrderStatus)).append("\n"); + sb.append(" listClientOrderId: ").append(toIndentedString(listClientOrderId)).append("\n"); + sb.append(" transactionTime: ").append(toIndentedString(transactionTime)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" orders: ").append(toIndentedString(orders)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long orderListIdValue = getOrderListId(); + if (orderListIdValue != null) { + String orderListIdValueAsString = orderListIdValue.toString(); + valMap.put("orderListId", orderListIdValueAsString); + } + String contingencyTypeValue = getContingencyType(); + if (contingencyTypeValue != null) { + String contingencyTypeValueAsString = contingencyTypeValue.toString(); + valMap.put("contingencyType", contingencyTypeValueAsString); + } + String listStatusTypeValue = getListStatusType(); + if (listStatusTypeValue != null) { + String listStatusTypeValueAsString = listStatusTypeValue.toString(); + valMap.put("listStatusType", listStatusTypeValueAsString); + } + String listOrderStatusValue = getListOrderStatus(); + if (listOrderStatusValue != null) { + String listOrderStatusValueAsString = listOrderStatusValue.toString(); + valMap.put("listOrderStatus", listOrderStatusValueAsString); + } + String listClientOrderIdValue = getListClientOrderId(); + if (listClientOrderIdValue != null) { + String listClientOrderIdValueAsString = listClientOrderIdValue.toString(); + valMap.put("listClientOrderId", listClientOrderIdValueAsString); + } + Long transactionTimeValue = getTransactionTime(); + if (transactionTimeValue != null) { + String transactionTimeValueAsString = transactionTimeValue.toString(); + valMap.put("transactionTime", transactionTimeValueAsString); + } + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + List<@Valid AllOrderListsResponseResultInnerOrdersInner> ordersValue = getOrders(); + if (ordersValue != null) { + String ordersValueAsString = JSON.getGson().toJson(ordersValue); + valMap.put("orders", ordersValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object orderListIdValue = getOrderListId(); + if (orderListIdValue != null) { + valMap.put("orderListId", orderListIdValue); + } + Object contingencyTypeValue = getContingencyType(); + if (contingencyTypeValue != null) { + valMap.put("contingencyType", contingencyTypeValue); + } + Object listStatusTypeValue = getListStatusType(); + if (listStatusTypeValue != null) { + valMap.put("listStatusType", listStatusTypeValue); + } + Object listOrderStatusValue = getListOrderStatus(); + if (listOrderStatusValue != null) { + valMap.put("listOrderStatus", listOrderStatusValue); + } + Object listClientOrderIdValue = getListClientOrderId(); + if (listClientOrderIdValue != null) { + valMap.put("listClientOrderId", listClientOrderIdValue); + } + Object transactionTimeValue = getTransactionTime(); + if (transactionTimeValue != null) { + valMap.put("transactionTime", transactionTimeValue); + } + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + Object ordersValue = getOrders(); + if (ordersValue != null) { + valMap.put("orders", ordersValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("orderListId"); + openapiFields.add("contingencyType"); + openapiFields.add("listStatusType"); + openapiFields.add("listOrderStatus"); + openapiFields.add("listClientOrderId"); + openapiFields.add("transactionTime"); + openapiFields.add("symbol"); + openapiFields.add("orders"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * OrderListStatusResponseResult + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderListStatusResponseResult.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OrderListStatusResponseResult is not" + + " found in the empty JSON string", + OrderListStatusResponseResult.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderListStatusResponseResult.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OrderListStatusResponseResult` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("contingencyType") != null && !jsonObj.get("contingencyType").isJsonNull()) + && !jsonObj.get("contingencyType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `contingencyType` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("contingencyType").toString())); + } + if ((jsonObj.get("listStatusType") != null && !jsonObj.get("listStatusType").isJsonNull()) + && !jsonObj.get("listStatusType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `listStatusType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("listStatusType").toString())); + } + if ((jsonObj.get("listOrderStatus") != null && !jsonObj.get("listOrderStatus").isJsonNull()) + && !jsonObj.get("listOrderStatus").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `listOrderStatus` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("listOrderStatus").toString())); + } + if ((jsonObj.get("listClientOrderId") != null + && !jsonObj.get("listClientOrderId").isJsonNull()) + && !jsonObj.get("listClientOrderId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `listClientOrderId` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("listClientOrderId").toString())); + } + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + if (jsonObj.get("orders") != null && !jsonObj.get("orders").isJsonNull()) { + JsonArray jsonArrayorders = jsonObj.getAsJsonArray("orders"); + if (jsonArrayorders != null) { + // ensure the json data is an array + if (!jsonObj.get("orders").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `orders` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("orders").toString())); + } + + // validate the optional field `orders` (array) + for (int i = 0; i < jsonArrayorders.size(); i++) { + AllOrderListsResponseResultInnerOrdersInner.validateJsonElement( + jsonArrayorders.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderListStatusResponseResult.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderListStatusResponseResult' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(OrderListStatusResponseResult.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderListStatusResponseResult value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderListStatusResponseResult read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OrderListStatusResponseResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderListStatusResponseResult + * @throws IOException if the JSON string is invalid with respect to + * OrderListStatusResponseResult + */ + public static OrderListStatusResponseResult fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderListStatusResponseResult.class); + } + + /** + * Convert an instance of OrderListStatusResponseResult to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceRequest.java index 88a65eccd..b8d1fc616 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OrderPlaceRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderPlaceRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -158,6 +164,25 @@ public class OrderPlaceRequest extends BaseDTO { public OrderPlaceRequest() {} + public OrderPlaceRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OrderPlaceRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -307,7 +332,9 @@ public OrderPlaceRequest newClientOrderId( } /** - * Get newClientOrderId + * A unique id among open orders. Automatically generated if not sent.<br/> Orders with + * the same `newClientOrderID` can be accepted only when the previous one is filled, + * otherwise the order will be rejected. * * @return newClientOrderId */ @@ -348,7 +375,8 @@ public OrderPlaceRequest stopPrice(@jakarta.annotation.Nullable Double stopPrice } /** - * Get stopPrice + * Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and + * `TAKE_PROFIT_LIMIT` orders. * * @return stopPrice */ @@ -368,7 +396,7 @@ public OrderPlaceRequest trailingDelta(@jakarta.annotation.Nullable Integer trai } /** - * Get trailingDelta + * See Trailing Stop order FAQ * * @return trailingDelta */ @@ -387,7 +415,8 @@ public OrderPlaceRequest icebergQty(@jakarta.annotation.Nullable Double icebergQ } /** - * Get icebergQty + * Used with `LIMIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` + * to create an iceberg order. * * @return icebergQty */ @@ -426,11 +455,12 @@ public OrderPlaceRequest strategyType(@jakarta.annotation.Nullable Integer strat } /** - * Get strategyType + * The value cannot be less than `1000000`. minimum: 1000000 * * @return strategyType */ @jakarta.annotation.Nullable + @Min(1000000) public Integer getStrategyType() { return strategyType; } @@ -487,11 +517,12 @@ public OrderPlaceRequest pegOffsetValue(@jakarta.annotation.Nullable Integer peg } /** - * Get pegOffsetValue + * Price level to peg the price to (max: 100). See Pegged Orders Info maximum: 100 * * @return pegOffsetValue */ @jakarta.annotation.Nullable + @Max(100) public Integer getPegOffsetValue() { return pegOffsetValue; } @@ -527,12 +558,14 @@ public OrderPlaceRequest recvWindow(@jakarta.annotation.Nullable Double recvWind } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -550,7 +583,8 @@ public boolean equals(Object o) { return false; } OrderPlaceRequest orderPlaceRequest = (OrderPlaceRequest) o; - return Objects.equals(this.symbol, orderPlaceRequest.symbol) + return Objects.equals(this.id, orderPlaceRequest.id) + && Objects.equals(this.symbol, orderPlaceRequest.symbol) && Objects.equals(this.side, orderPlaceRequest.side) && Objects.equals(this.type, orderPlaceRequest.type) && Objects.equals(this.timeInForce, orderPlaceRequest.timeInForce) @@ -575,6 +609,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + id, symbol, side, type, @@ -600,6 +635,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderPlaceRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); @@ -629,6 +665,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -738,6 +779,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -840,6 +885,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("side"); openapiFields.add("type"); @@ -907,6 +953,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponse.java index 7ba024764..cc0576611 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderPlaceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderPlaceResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class OrderPlaceResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public OrderPlaceResponse() {} @@ -128,12 +128,14 @@ public void setResult(@jakarta.annotation.Nullable OrderPlaceResponseResult resu } public OrderPlaceResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderPlaceResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public OrderPlaceResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -148,11 +150,13 @@ public OrderPlaceResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -207,7 +211,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -330,7 +334,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponseResult.java index e20e59a7c..a3c46b147 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderPlaceResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderPlaceResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -140,6 +140,96 @@ public class OrderPlaceResponseResult extends BaseDTO { @jakarta.annotation.Nullable private String selfTradePreventionMode; + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + + @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @jakarta.annotation.Nullable + private String stopPrice; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public static final String SERIALIZED_NAME_FILLS = "fills"; @SerializedName(SERIALIZED_NAME_FILLS) @@ -457,6 +547,295 @@ public void setSelfTradePreventionMode( this.selfTradePreventionMode = selfTradePreventionMode; } + public OrderPlaceResponseResult stopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + /** + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. + * + * @return stopPrice + */ + @jakarta.annotation.Nullable + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + } + + public OrderPlaceResponseResult trailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public OrderPlaceResponseResult icebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public OrderPlaceResponseResult strategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public OrderPlaceResponseResult strategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public OrderPlaceResponseResult preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public OrderPlaceResponseResult preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public OrderPlaceResponseResult trailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public OrderPlaceResponseResult usedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderPlaceResponseResult workingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderPlaceResponseResult pegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderPlaceResponseResult pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderPlaceResponseResult pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderPlaceResponseResult peggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderPlaceResponseResult expiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + public OrderPlaceResponseResult fills( @jakarta.annotation.Nullable List<@Valid OrderPlaceResponseResultFillsInner> fills) { this.fills = fills; @@ -516,6 +895,22 @@ public boolean equals(Object o) { && Objects.equals( this.selfTradePreventionMode, orderPlaceResponseResult.selfTradePreventionMode) + && Objects.equals(this.stopPrice, orderPlaceResponseResult.stopPrice) + && Objects.equals(this.trailingDelta, orderPlaceResponseResult.trailingDelta) + && Objects.equals(this.icebergQty, orderPlaceResponseResult.icebergQty) + && Objects.equals(this.strategyId, orderPlaceResponseResult.strategyId) + && Objects.equals(this.strategyType, orderPlaceResponseResult.strategyType) + && Objects.equals(this.preventedMatchId, orderPlaceResponseResult.preventedMatchId) + && Objects.equals( + this.preventedQuantity, orderPlaceResponseResult.preventedQuantity) + && Objects.equals(this.trailingTime, orderPlaceResponseResult.trailingTime) + && Objects.equals(this.usedSor, orderPlaceResponseResult.usedSor) + && Objects.equals(this.workingFloor, orderPlaceResponseResult.workingFloor) + && Objects.equals(this.pegPriceType, orderPlaceResponseResult.pegPriceType) + && Objects.equals(this.pegOffsetType, orderPlaceResponseResult.pegOffsetType) + && Objects.equals(this.pegOffsetValue, orderPlaceResponseResult.pegOffsetValue) + && Objects.equals(this.peggedPrice, orderPlaceResponseResult.peggedPrice) + && Objects.equals(this.expiryReason, orderPlaceResponseResult.expiryReason) && Objects.equals(this.fills, orderPlaceResponseResult.fills); } @@ -538,6 +933,21 @@ public int hashCode() { side, workingTime, selfTradePreventionMode, + stopPrice, + trailingDelta, + icebergQty, + strategyId, + strategyType, + preventedMatchId, + preventedQuantity, + trailingTime, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason, fills); } @@ -565,6 +975,21 @@ public String toString() { sb.append(" selfTradePreventionMode: ") .append(toIndentedString(selfTradePreventionMode)) .append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append(" fills: ").append(toIndentedString(fills)).append("\n"); sb.append("}"); return sb.toString(); @@ -654,6 +1079,81 @@ public String toUrlQueryString() { String selfTradePreventionModeValueAsString = selfTradePreventionModeValue.toString(); valMap.put("selfTradePreventionMode", selfTradePreventionModeValueAsString); } + String stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + String stopPriceValueAsString = stopPriceValue.toString(); + valMap.put("stopPrice", stopPriceValueAsString); + } + Long trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + String trailingDeltaValueAsString = trailingDeltaValue.toString(); + valMap.put("trailingDelta", trailingDeltaValueAsString); + } + String icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + String icebergQtyValueAsString = icebergQtyValue.toString(); + valMap.put("icebergQty", icebergQtyValueAsString); + } + Long strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + String strategyIdValueAsString = strategyIdValue.toString(); + valMap.put("strategyId", strategyIdValueAsString); + } + Long strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + String strategyTypeValueAsString = strategyTypeValue.toString(); + valMap.put("strategyType", strategyTypeValueAsString); + } + Long preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + String preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + valMap.put("preventedMatchId", preventedMatchIdValueAsString); + } + String preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + String preventedQuantityValueAsString = preventedQuantityValue.toString(); + valMap.put("preventedQuantity", preventedQuantityValueAsString); + } + Long trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + String trailingTimeValueAsString = trailingTimeValue.toString(); + valMap.put("trailingTime", trailingTimeValueAsString); + } + Boolean usedSorValue = getUsedSor(); + if (usedSorValue != null) { + String usedSorValueAsString = usedSorValue.toString(); + valMap.put("usedSor", usedSorValueAsString); + } + String workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + String workingFloorValueAsString = workingFloorValue.toString(); + valMap.put("workingFloor", workingFloorValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } List<@Valid OrderPlaceResponseResultFillsInner> fillsValue = getFills(); if (fillsValue != null) { String fillsValueAsString = JSON.getGson().toJson(fillsValue); @@ -734,6 +1234,66 @@ public Map toMap() { if (selfTradePreventionModeValue != null) { valMap.put("selfTradePreventionMode", selfTradePreventionModeValue); } + Object stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + valMap.put("stopPrice", stopPriceValue); + } + Object trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + valMap.put("trailingDelta", trailingDeltaValue); + } + Object icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + valMap.put("icebergQty", icebergQtyValue); + } + Object strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + valMap.put("strategyId", strategyIdValue); + } + Object strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + valMap.put("strategyType", strategyTypeValue); + } + Object preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + valMap.put("preventedMatchId", preventedMatchIdValue); + } + Object preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + valMap.put("preventedQuantity", preventedQuantityValue); + } + Object trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + valMap.put("trailingTime", trailingTimeValue); + } + Object usedSorValue = getUsedSor(); + if (usedSorValue != null) { + valMap.put("usedSor", usedSorValue); + } + Object workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + valMap.put("workingFloor", workingFloorValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } Object fillsValue = getFills(); if (fillsValue != null) { valMap.put("fills", fillsValue); @@ -780,6 +1340,21 @@ private String toIndentedString(Object o) { openapiFields.add("side"); openapiFields.add("workingTime"); openapiFields.add("selfTradePreventionMode"); + openapiFields.add("stopPrice"); + openapiFields.add("trailingDelta"); + openapiFields.add("icebergQty"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("trailingTime"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); openapiFields.add("fills"); // a set of required properties/fields (JSON key names) @@ -915,6 +1490,71 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) + && !jsonObj.get("stopPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `stopPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("stopPrice").toString())); + } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } if (jsonObj.get("fills") != null && !jsonObj.get("fills").isJsonNull()) { JsonArray jsonArrayfills = jsonObj.getAsJsonArray("fills"); if (jsonArrayfills != null) { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponseResultFillsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponseResultFillsInner.java index e5ee8cd41..10201a2c7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponseResultFillsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponseResultFillsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderPlaceResponseResultFillsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderPlaceResponseResultFillsInner extends BaseDTO { public static final String SERIALIZED_NAME_PRICE = "price"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderRateLimitExceededMode.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderRateLimitExceededMode.java index 94c347f5d..ac7cb82f2 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderRateLimitExceededMode.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderRateLimitExceededMode.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,11 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets orderRateLimitExceededMode */ +/** + * Supported values: <br> `DO_NOTHING` (default)- will only attempt to cancel the + * order if account has not exceeded the unfilled order rate limit<br> `CANCEL_ONLY` + * - will always cancel the order + */ @JsonAdapter(OrderRateLimitExceededMode.Adapter.class) public enum OrderRateLimitExceededMode { DO_NOTHING("DO_NOTHING"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderStatusRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderStatusRequest.java index 257d25a55..1911eb311 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderStatusRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderStatusRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OrderStatusRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderStatusRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -67,6 +73,25 @@ public class OrderStatusRequest extends BaseDTO { public OrderStatusRequest() {} + public OrderStatusRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OrderStatusRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -93,7 +118,7 @@ public OrderStatusRequest orderId(@jakarta.annotation.Nullable Long orderId) { } /** - * Get orderId + * Lookup order by `orderId` * * @return orderId */ @@ -113,7 +138,7 @@ public OrderStatusRequest origClientOrderId( } /** - * Get origClientOrderId + * Lookup order by `clientOrderId` * * @return origClientOrderId */ @@ -132,12 +157,14 @@ public OrderStatusRequest recvWindow(@jakarta.annotation.Nullable Double recvWin } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -155,7 +182,8 @@ public boolean equals(Object o) { return false; } OrderStatusRequest orderStatusRequest = (OrderStatusRequest) o; - return Objects.equals(this.symbol, orderStatusRequest.symbol) + return Objects.equals(this.id, orderStatusRequest.id) + && Objects.equals(this.symbol, orderStatusRequest.symbol) && Objects.equals(this.orderId, orderStatusRequest.orderId) && Objects.equals(this.origClientOrderId, orderStatusRequest.origClientOrderId) && Objects.equals(this.recvWindow, orderStatusRequest.recvWindow); @@ -163,13 +191,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(symbol, orderId, origClientOrderId, recvWindow); + return Objects.hash(id, symbol, orderId, origClientOrderId, recvWindow); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderStatusRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); sb.append(" origClientOrderId: ").append(toIndentedString(origClientOrderId)).append("\n"); @@ -182,6 +211,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -214,6 +248,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -256,6 +294,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("orderId"); openapiFields.add("origClientOrderId"); @@ -306,6 +345,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderStatusResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderStatusResponse.java index 100de1057..dc998a28c 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderStatusResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderStatusResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class OrderStatusResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public OrderStatusResponse() {} @@ -129,12 +129,14 @@ public void setResult(@jakarta.annotation.Nullable OrderStatusResponseResult res } public OrderStatusResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderStatusResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public OrderStatusResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -149,11 +151,13 @@ public OrderStatusResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -208,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -331,7 +335,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderStatusResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderStatusResponseResult.java index aa5585e62..dcd1950f0 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderStatusResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderStatusResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderStatusResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderStatusResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -81,6 +81,12 @@ public class OrderStatusResponseResult extends BaseDTO { @jakarta.annotation.Nullable private String executedQty; + public static final String SERIALIZED_NAME_ORIG_QUOTE_ORDER_QTY = "origQuoteOrderQty"; + + @SerializedName(SERIALIZED_NAME_ORIG_QUOTE_ORDER_QTY) + @jakarta.annotation.Nullable + private String origQuoteOrderQty; + public static final String SERIALIZED_NAME_CUMMULATIVE_QUOTE_QTY = "cummulativeQuoteQty"; @SerializedName(SERIALIZED_NAME_CUMMULATIVE_QUOTE_QTY) @@ -159,12 +165,6 @@ public class OrderStatusResponseResult extends BaseDTO { @jakarta.annotation.Nullable private Long workingTime; - public static final String SERIALIZED_NAME_ORIG_QUOTE_ORDER_QTY = "origQuoteOrderQty"; - - @SerializedName(SERIALIZED_NAME_ORIG_QUOTE_ORDER_QTY) - @jakarta.annotation.Nullable - private String origQuoteOrderQty; - public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; @SerializedName(SERIALIZED_NAME_STRATEGY_ID) @@ -196,6 +196,48 @@ public class OrderStatusResponseResult extends BaseDTO { @jakarta.annotation.Nullable private String preventedQuantity; + public static final String SERIALIZED_NAME_USED_SOR = "usedSor"; + + @SerializedName(SERIALIZED_NAME_USED_SOR) + @jakarta.annotation.Nullable + private Boolean usedSor; + + public static final String SERIALIZED_NAME_WORKING_FLOOR = "workingFloor"; + + @SerializedName(SERIALIZED_NAME_WORKING_FLOOR) + @jakarta.annotation.Nullable + private String workingFloor; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public OrderStatusResponseResult() {} public OrderStatusResponseResult symbol(@jakarta.annotation.Nullable String symbol) { @@ -242,7 +284,7 @@ public OrderStatusResponseResult orderListId(@jakarta.annotation.Nullable Long o } /** - * Get orderListId + * Present only for orders that belong to an order list. * * @return orderListId */ @@ -332,6 +374,26 @@ public void setExecutedQty(@jakarta.annotation.Nullable String executedQty) { this.executedQty = executedQty; } + public OrderStatusResponseResult origQuoteOrderQty( + @jakarta.annotation.Nullable String origQuoteOrderQty) { + this.origQuoteOrderQty = origQuoteOrderQty; + return this; + } + + /** + * Always present. Zero if the order type does not use `quoteOrderQty`. + * + * @return origQuoteOrderQty + */ + @jakarta.annotation.Nullable + public String getOrigQuoteOrderQty() { + return origQuoteOrderQty; + } + + public void setOrigQuoteOrderQty(@jakarta.annotation.Nullable String origQuoteOrderQty) { + this.origQuoteOrderQty = origQuoteOrderQty; + } + public OrderStatusResponseResult cummulativeQuoteQty( @jakarta.annotation.Nullable String cummulativeQuoteQty) { this.cummulativeQuoteQty = cummulativeQuoteQty; @@ -434,7 +496,7 @@ public OrderStatusResponseResult stopPrice(@jakarta.annotation.Nullable String s } /** - * Get stopPrice + * Always present. Zero if the order type does not use `stopPrice`. * * @return stopPrice */ @@ -454,7 +516,7 @@ public OrderStatusResponseResult trailingDelta( } /** - * Get trailingDelta + * Present only if `trailingDelta` was set on the order. * * @return trailingDelta */ @@ -473,7 +535,7 @@ public OrderStatusResponseResult trailingTime(@jakarta.annotation.Nullable Long } /** - * Get trailingTime + * Present only if `trailingDelta` was set on the order. * * @return trailingTime */ @@ -492,7 +554,7 @@ public OrderStatusResponseResult icebergQty(@jakarta.annotation.Nullable String } /** - * Get icebergQty + * Always present. Zero for non-iceberg orders. * * @return icebergQty */ @@ -511,7 +573,7 @@ public OrderStatusResponseResult time(@jakarta.annotation.Nullable Long time) { } /** - * Get time + * Order placement time. * * @return time */ @@ -530,7 +592,7 @@ public OrderStatusResponseResult updateTime(@jakarta.annotation.Nullable Long up } /** - * Get updateTime + * Time of the last update to the order. * * @return updateTime */ @@ -581,33 +643,13 @@ public void setWorkingTime(@jakarta.annotation.Nullable Long workingTime) { this.workingTime = workingTime; } - public OrderStatusResponseResult origQuoteOrderQty( - @jakarta.annotation.Nullable String origQuoteOrderQty) { - this.origQuoteOrderQty = origQuoteOrderQty; - return this; - } - - /** - * Get origQuoteOrderQty - * - * @return origQuoteOrderQty - */ - @jakarta.annotation.Nullable - public String getOrigQuoteOrderQty() { - return origQuoteOrderQty; - } - - public void setOrigQuoteOrderQty(@jakarta.annotation.Nullable String origQuoteOrderQty) { - this.origQuoteOrderQty = origQuoteOrderQty; - } - public OrderStatusResponseResult strategyId(@jakarta.annotation.Nullable Long strategyId) { this.strategyId = strategyId; return this; } /** - * Get strategyId + * Present only if `strategyId` was set on the order. * * @return strategyId */ @@ -626,7 +668,7 @@ public OrderStatusResponseResult strategyType(@jakarta.annotation.Nullable Long } /** - * Get strategyType + * Present only if `strategyType` was set on the order. * * @return strategyType */ @@ -667,7 +709,7 @@ public OrderStatusResponseResult preventedMatchId( } /** - * Get preventedMatchId + * Present only if the order expired due to STP. * * @return preventedMatchId */ @@ -687,7 +729,7 @@ public OrderStatusResponseResult preventedQuantity( } /** - * Get preventedQuantity + * Present only if the order expired due to STP. * * @return preventedQuantity */ @@ -700,6 +742,144 @@ public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQu this.preventedQuantity = preventedQuantity; } + public OrderStatusResponseResult usedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + return this; + } + + /** + * Field that determines whether order used SOR. + * + * @return usedSor + */ + @jakarta.annotation.Nullable + public Boolean getUsedSor() { + return usedSor; + } + + public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { + this.usedSor = usedSor; + } + + public OrderStatusResponseResult workingFloor( + @jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + return this; + } + + /** + * Determines whether the order is being filled by the SOR or by the order book. + * + * @return workingFloor + */ + @jakarta.annotation.Nullable + public String getWorkingFloor() { + return workingFloor; + } + + public void setWorkingFloor(@jakarta.annotation.Nullable String workingFloor) { + this.workingFloor = workingFloor; + } + + public OrderStatusResponseResult pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public OrderStatusResponseResult pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public OrderStatusResponseResult pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public OrderStatusResponseResult peggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public OrderStatusResponseResult expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -716,6 +896,8 @@ public boolean equals(Object o) { && Objects.equals(this.price, orderStatusResponseResult.price) && Objects.equals(this.origQty, orderStatusResponseResult.origQty) && Objects.equals(this.executedQty, orderStatusResponseResult.executedQty) + && Objects.equals( + this.origQuoteOrderQty, orderStatusResponseResult.origQuoteOrderQty) && Objects.equals( this.cummulativeQuoteQty, orderStatusResponseResult.cummulativeQuoteQty) && Objects.equals(this.status, orderStatusResponseResult.status) @@ -730,8 +912,6 @@ public boolean equals(Object o) { && Objects.equals(this.updateTime, orderStatusResponseResult.updateTime) && Objects.equals(this.isWorking, orderStatusResponseResult.isWorking) && Objects.equals(this.workingTime, orderStatusResponseResult.workingTime) - && Objects.equals( - this.origQuoteOrderQty, orderStatusResponseResult.origQuoteOrderQty) && Objects.equals(this.strategyId, orderStatusResponseResult.strategyId) && Objects.equals(this.strategyType, orderStatusResponseResult.strategyType) && Objects.equals( @@ -739,7 +919,14 @@ public boolean equals(Object o) { orderStatusResponseResult.selfTradePreventionMode) && Objects.equals(this.preventedMatchId, orderStatusResponseResult.preventedMatchId) && Objects.equals( - this.preventedQuantity, orderStatusResponseResult.preventedQuantity); + this.preventedQuantity, orderStatusResponseResult.preventedQuantity) + && Objects.equals(this.usedSor, orderStatusResponseResult.usedSor) + && Objects.equals(this.workingFloor, orderStatusResponseResult.workingFloor) + && Objects.equals(this.pegPriceType, orderStatusResponseResult.pegPriceType) + && Objects.equals(this.pegOffsetType, orderStatusResponseResult.pegOffsetType) + && Objects.equals(this.pegOffsetValue, orderStatusResponseResult.pegOffsetValue) + && Objects.equals(this.peggedPrice, orderStatusResponseResult.peggedPrice) + && Objects.equals(this.expiryReason, orderStatusResponseResult.expiryReason); } @Override @@ -752,6 +939,7 @@ public int hashCode() { price, origQty, executedQty, + origQuoteOrderQty, cummulativeQuoteQty, status, timeInForce, @@ -765,12 +953,18 @@ public int hashCode() { updateTime, isWorking, workingTime, - origQuoteOrderQty, strategyId, strategyType, selfTradePreventionMode, preventedMatchId, - preventedQuantity); + preventedQuantity, + usedSor, + workingFloor, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -784,6 +978,7 @@ public String toString() { sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" origQty: ").append(toIndentedString(origQty)).append("\n"); sb.append(" executedQty: ").append(toIndentedString(executedQty)).append("\n"); + sb.append(" origQuoteOrderQty: ").append(toIndentedString(origQuoteOrderQty)).append("\n"); sb.append(" cummulativeQuoteQty: ") .append(toIndentedString(cummulativeQuoteQty)) .append("\n"); @@ -799,7 +994,6 @@ public String toString() { sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); sb.append(" isWorking: ").append(toIndentedString(isWorking)).append("\n"); sb.append(" workingTime: ").append(toIndentedString(workingTime)).append("\n"); - sb.append(" origQuoteOrderQty: ").append(toIndentedString(origQuoteOrderQty)).append("\n"); sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); sb.append(" selfTradePreventionMode: ") @@ -807,6 +1001,13 @@ public String toString() { .append("\n"); sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" workingFloor: ").append(toIndentedString(workingFloor)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -850,6 +1051,11 @@ public String toUrlQueryString() { String executedQtyValueAsString = executedQtyValue.toString(); valMap.put("executedQty", executedQtyValueAsString); } + String origQuoteOrderQtyValue = getOrigQuoteOrderQty(); + if (origQuoteOrderQtyValue != null) { + String origQuoteOrderQtyValueAsString = origQuoteOrderQtyValue.toString(); + valMap.put("origQuoteOrderQty", origQuoteOrderQtyValueAsString); + } String cummulativeQuoteQtyValue = getCummulativeQuoteQty(); if (cummulativeQuoteQtyValue != null) { String cummulativeQuoteQtyValueAsString = cummulativeQuoteQtyValue.toString(); @@ -915,11 +1121,6 @@ public String toUrlQueryString() { String workingTimeValueAsString = workingTimeValue.toString(); valMap.put("workingTime", workingTimeValueAsString); } - String origQuoteOrderQtyValue = getOrigQuoteOrderQty(); - if (origQuoteOrderQtyValue != null) { - String origQuoteOrderQtyValueAsString = origQuoteOrderQtyValue.toString(); - valMap.put("origQuoteOrderQty", origQuoteOrderQtyValueAsString); - } Long strategyIdValue = getStrategyId(); if (strategyIdValue != null) { String strategyIdValueAsString = strategyIdValue.toString(); @@ -945,6 +1146,41 @@ public String toUrlQueryString() { String preventedQuantityValueAsString = preventedQuantityValue.toString(); valMap.put("preventedQuantity", preventedQuantityValueAsString); } + Boolean usedSorValue = getUsedSor(); + if (usedSorValue != null) { + String usedSorValueAsString = usedSorValue.toString(); + valMap.put("usedSor", usedSorValueAsString); + } + String workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + String workingFloorValueAsString = workingFloorValue.toString(); + valMap.put("workingFloor", workingFloorValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -984,6 +1220,10 @@ public Map toMap() { if (executedQtyValue != null) { valMap.put("executedQty", executedQtyValue); } + Object origQuoteOrderQtyValue = getOrigQuoteOrderQty(); + if (origQuoteOrderQtyValue != null) { + valMap.put("origQuoteOrderQty", origQuoteOrderQtyValue); + } Object cummulativeQuoteQtyValue = getCummulativeQuoteQty(); if (cummulativeQuoteQtyValue != null) { valMap.put("cummulativeQuoteQty", cummulativeQuoteQtyValue); @@ -1036,10 +1276,6 @@ public Map toMap() { if (workingTimeValue != null) { valMap.put("workingTime", workingTimeValue); } - Object origQuoteOrderQtyValue = getOrigQuoteOrderQty(); - if (origQuoteOrderQtyValue != null) { - valMap.put("origQuoteOrderQty", origQuoteOrderQtyValue); - } Object strategyIdValue = getStrategyId(); if (strategyIdValue != null) { valMap.put("strategyId", strategyIdValue); @@ -1060,6 +1296,34 @@ public Map toMap() { if (preventedQuantityValue != null) { valMap.put("preventedQuantity", preventedQuantityValue); } + Object usedSorValue = getUsedSor(); + if (usedSorValue != null) { + valMap.put("usedSor", usedSorValue); + } + Object workingFloorValue = getWorkingFloor(); + if (workingFloorValue != null) { + valMap.put("workingFloor", workingFloorValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -1093,6 +1357,7 @@ private String toIndentedString(Object o) { openapiFields.add("price"); openapiFields.add("origQty"); openapiFields.add("executedQty"); + openapiFields.add("origQuoteOrderQty"); openapiFields.add("cummulativeQuoteQty"); openapiFields.add("status"); openapiFields.add("timeInForce"); @@ -1106,12 +1371,18 @@ private String toIndentedString(Object o) { openapiFields.add("updateTime"); openapiFields.add("isWorking"); openapiFields.add("workingTime"); - openapiFields.add("origQuoteOrderQty"); openapiFields.add("strategyId"); openapiFields.add("strategyType"); openapiFields.add("selfTradePreventionMode"); openapiFields.add("preventedMatchId"); openapiFields.add("preventedQuantity"); + openapiFields.add("usedSor"); + openapiFields.add("workingFloor"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -1187,6 +1458,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("executedQty").toString())); } + if ((jsonObj.get("origQuoteOrderQty") != null + && !jsonObj.get("origQuoteOrderQty").isJsonNull()) + && !jsonObj.get("origQuoteOrderQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `origQuoteOrderQty` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("origQuoteOrderQty").toString())); + } if ((jsonObj.get("cummulativeQuoteQty") != null && !jsonObj.get("cummulativeQuoteQty").isJsonNull()) && !jsonObj.get("cummulativeQuoteQty").isJsonPrimitive()) { @@ -1244,15 +1524,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("icebergQty").toString())); } - if ((jsonObj.get("origQuoteOrderQty") != null - && !jsonObj.get("origQuoteOrderQty").isJsonNull()) - && !jsonObj.get("origQuoteOrderQty").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `origQuoteOrderQty` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("origQuoteOrderQty").toString())); - } if ((jsonObj.get("selfTradePreventionMode") != null && !jsonObj.get("selfTradePreventionMode").isJsonNull()) && !jsonObj.get("selfTradePreventionMode").isJsonPrimitive()) { @@ -1271,6 +1542,46 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " JSON string but got `%s`", jsonObj.get("preventedQuantity").toString())); } + if ((jsonObj.get("workingFloor") != null && !jsonObj.get("workingFloor").isJsonNull()) + && !jsonObj.get("workingFloor").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `workingFloor` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("workingFloor").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestRequest.java index a32ab8eaf..e2a7fe7fe 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** OrderTestRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTestRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_COMPUTE_COMMISSION_RATES = "computeCommissionRates"; @SerializedName(SERIALIZED_NAME_COMPUTE_COMMISSION_RATES) @@ -164,6 +170,25 @@ public class OrderTestRequest extends BaseDTO { public OrderTestRequest() {} + public OrderTestRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OrderTestRequest computeCommissionRates( @jakarta.annotation.Nullable Boolean computeCommissionRates) { this.computeCommissionRates = computeCommissionRates; @@ -171,7 +196,8 @@ public OrderTestRequest computeCommissionRates( } /** - * Get computeCommissionRates + * Default: `false` <br> See [Commissions + * FAQ](/products/spot/faqs/commission_faq#test-order-diferences) to learn more. * * @return computeCommissionRates */ @@ -333,7 +359,9 @@ public OrderTestRequest newClientOrderId(@jakarta.annotation.Nullable String new } /** - * Get newClientOrderId + * A unique id among open orders. Automatically generated if not sent. Orders with the same + * `newClientOrderID` can be accepted only when the previous one is filled, otherwise + * the order will be rejected. * * @return newClientOrderId */ @@ -374,7 +402,8 @@ public OrderTestRequest stopPrice(@jakarta.annotation.Nullable Double stopPrice) } /** - * Get stopPrice + * Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and + * `TAKE_PROFIT_LIMIT` orders. * * @return stopPrice */ @@ -394,7 +423,7 @@ public OrderTestRequest trailingDelta(@jakarta.annotation.Nullable Integer trail } /** - * Get trailingDelta + * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) * * @return trailingDelta */ @@ -413,7 +442,8 @@ public OrderTestRequest icebergQty(@jakarta.annotation.Nullable Double icebergQt } /** - * Get icebergQty + * Used with `LIMIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` + * to create an iceberg order. * * @return icebergQty */ @@ -452,11 +482,12 @@ public OrderTestRequest strategyType(@jakarta.annotation.Nullable Integer strate } /** - * Get strategyType + * The value cannot be less than `1000000`. minimum: 1000000 * * @return strategyType */ @jakarta.annotation.Nullable + @Min(1000000) public Integer getStrategyType() { return strategyType; } @@ -513,11 +544,13 @@ public OrderTestRequest pegOffsetValue(@jakarta.annotation.Nullable Integer pegO } /** - * Get pegOffsetValue + * Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) + * maximum: 100 * * @return pegOffsetValue */ @jakarta.annotation.Nullable + @Max(100) public Integer getPegOffsetValue() { return pegOffsetValue; } @@ -553,12 +586,14 @@ public OrderTestRequest recvWindow(@jakarta.annotation.Nullable Double recvWindo } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -576,7 +611,9 @@ public boolean equals(Object o) { return false; } OrderTestRequest orderTestRequest = (OrderTestRequest) o; - return Objects.equals(this.computeCommissionRates, orderTestRequest.computeCommissionRates) + return Objects.equals(this.id, orderTestRequest.id) + && Objects.equals( + this.computeCommissionRates, orderTestRequest.computeCommissionRates) && Objects.equals(this.symbol, orderTestRequest.symbol) && Objects.equals(this.side, orderTestRequest.side) && Objects.equals(this.type, orderTestRequest.type) @@ -602,6 +639,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + id, computeCommissionRates, symbol, side, @@ -628,6 +666,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderTestRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" computeCommissionRates: ") .append(toIndentedString(computeCommissionRates)) .append("\n"); @@ -660,6 +699,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } Boolean computeCommissionRatesValue = getComputeCommissionRates(); if (computeCommissionRatesValue != null) { String computeCommissionRatesValueAsString = computeCommissionRatesValue.toString(); @@ -774,6 +818,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object computeCommissionRatesValue = getComputeCommissionRates(); if (computeCommissionRatesValue != null) { valMap.put("computeCommissionRates", computeCommissionRatesValue); @@ -880,6 +928,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("computeCommissionRates"); openapiFields.add("symbol"); openapiFields.add("side"); @@ -948,6 +997,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponse.java index 27b139a5b..c92519afa 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OrderTestResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTestResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class OrderTestResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public OrderTestResponse() {} @@ -128,12 +128,14 @@ public void setResult(@jakarta.annotation.Nullable OrderTestResponseResult resul } public OrderTestResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderTestResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public OrderTestResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -148,11 +150,13 @@ public OrderTestResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -207,7 +211,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -330,7 +334,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResult.java index bb96e782e..b18ec3055 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** OrderTestResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTestResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_STANDARD_COMMISSION_FOR_ORDER = "standardCommissionForOrder"; @@ -52,7 +52,7 @@ public class OrderTestResponseResult extends BaseDTO { @SerializedName(SERIALIZED_NAME_SPECIAL_COMMISSION_FOR_ORDER) @jakarta.annotation.Nullable - private OrderTestResponseResultSpecialCommissionForOrder specialCommissionForOrder; + private OrderTestResponseResultStandardCommissionForOrder specialCommissionForOrder; public static final String SERIALIZED_NAME_TAX_COMMISSION_FOR_ORDER = "taxCommissionForOrder"; @@ -94,7 +94,7 @@ public void setStandardCommissionForOrder( public OrderTestResponseResult specialCommissionForOrder( @jakarta.annotation.Nullable - OrderTestResponseResultSpecialCommissionForOrder specialCommissionForOrder) { + OrderTestResponseResultStandardCommissionForOrder specialCommissionForOrder) { this.specialCommissionForOrder = specialCommissionForOrder; return this; } @@ -106,13 +106,13 @@ public OrderTestResponseResult specialCommissionForOrder( */ @jakarta.annotation.Nullable @Valid - public OrderTestResponseResultSpecialCommissionForOrder getSpecialCommissionForOrder() { + public OrderTestResponseResultStandardCommissionForOrder getSpecialCommissionForOrder() { return specialCommissionForOrder; } public void setSpecialCommissionForOrder( @jakarta.annotation.Nullable - OrderTestResponseResultSpecialCommissionForOrder specialCommissionForOrder) { + OrderTestResponseResultStandardCommissionForOrder specialCommissionForOrder) { this.specialCommissionForOrder = specialCommissionForOrder; } @@ -219,7 +219,7 @@ public String toUrlQueryString() { JSON.getGson().toJson(standardCommissionForOrderValue); valMap.put("standardCommissionForOrder", standardCommissionForOrderValueAsString); } - OrderTestResponseResultSpecialCommissionForOrder specialCommissionForOrderValue = + OrderTestResponseResultStandardCommissionForOrder specialCommissionForOrderValue = getSpecialCommissionForOrder(); if (specialCommissionForOrderValue != null) { String specialCommissionForOrderValueAsString = @@ -339,7 +339,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `specialCommissionForOrder` if (jsonObj.get("specialCommissionForOrder") != null && !jsonObj.get("specialCommissionForOrder").isJsonNull()) { - OrderTestResponseResultSpecialCommissionForOrder.validateJsonElement( + OrderTestResponseResultStandardCommissionForOrder.validateJsonElement( jsonObj.get("specialCommissionForOrder")); } // validate the optional field `taxCommissionForOrder` diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultDiscount.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultDiscount.java index 431ce08c6..2d9725e47 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultDiscount.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultDiscount.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderTestResponseResultDiscount */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTestResponseResultDiscount extends BaseDTO { public static final String SERIALIZED_NAME_ENABLED_FOR_ACCOUNT = "enabledForAccount"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultSpecialCommissionForOrder.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultSpecialCommissionForOrder.java deleted file mode 100644 index c52d458c9..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultSpecialCommissionForOrder.java +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.api.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.api.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** OrderTestResponseResultSpecialCommissionForOrder */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OrderTestResponseResultSpecialCommissionForOrder extends BaseDTO { - public static final String SERIALIZED_NAME_MAKER = "maker"; - - @SerializedName(SERIALIZED_NAME_MAKER) - @jakarta.annotation.Nullable - private String maker; - - public static final String SERIALIZED_NAME_TAKER = "taker"; - - @SerializedName(SERIALIZED_NAME_TAKER) - @jakarta.annotation.Nullable - private String taker; - - public OrderTestResponseResultSpecialCommissionForOrder() {} - - public OrderTestResponseResultSpecialCommissionForOrder maker( - @jakarta.annotation.Nullable String maker) { - this.maker = maker; - return this; - } - - /** - * Get maker - * - * @return maker - */ - @jakarta.annotation.Nullable - public String getMaker() { - return maker; - } - - public void setMaker(@jakarta.annotation.Nullable String maker) { - this.maker = maker; - } - - public OrderTestResponseResultSpecialCommissionForOrder taker( - @jakarta.annotation.Nullable String taker) { - this.taker = taker; - return this; - } - - /** - * Get taker - * - * @return taker - */ - @jakarta.annotation.Nullable - public String getTaker() { - return taker; - } - - public void setTaker(@jakarta.annotation.Nullable String taker) { - this.taker = taker; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrderTestResponseResultSpecialCommissionForOrder - orderTestResponseResultSpecialCommissionForOrder = - (OrderTestResponseResultSpecialCommissionForOrder) o; - return Objects.equals(this.maker, orderTestResponseResultSpecialCommissionForOrder.maker) - && Objects.equals( - this.taker, orderTestResponseResultSpecialCommissionForOrder.taker); - } - - @Override - public int hashCode() { - return Objects.hash(maker, taker); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrderTestResponseResultSpecialCommissionForOrder {\n"); - sb.append(" maker: ").append(toIndentedString(maker)).append("\n"); - sb.append(" taker: ").append(toIndentedString(taker)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String makerValue = getMaker(); - if (makerValue != null) { - String makerValueAsString = makerValue.toString(); - valMap.put("maker", makerValueAsString); - } - String takerValue = getTaker(); - if (takerValue != null) { - String takerValueAsString = takerValue.toString(); - valMap.put("taker", takerValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object makerValue = getMaker(); - if (makerValue != null) { - valMap.put("maker", makerValue); - } - Object takerValue = getTaker(); - if (takerValue != null) { - valMap.put("taker", takerValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("maker"); - openapiFields.add("taker"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * OrderTestResponseResultSpecialCommissionForOrder - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OrderTestResponseResultSpecialCommissionForOrder.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " OrderTestResponseResultSpecialCommissionForOrder is not" - + " found in the empty JSON string", - OrderTestResponseResultSpecialCommissionForOrder - .openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OrderTestResponseResultSpecialCommissionForOrder.openapiFields.contains( - entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `OrderTestResponseResultSpecialCommissionForOrder`" - + " properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("maker") != null && !jsonObj.get("maker").isJsonNull()) - && !jsonObj.get("maker").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `maker` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("maker").toString())); - } - if ((jsonObj.get("taker") != null && !jsonObj.get("taker").isJsonNull()) - && !jsonObj.get("taker").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `taker` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("taker").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrderTestResponseResultSpecialCommissionForOrder.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'OrderTestResponseResultSpecialCommissionForOrder' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, - TypeToken.get(OrderTestResponseResultSpecialCommissionForOrder.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, - OrderTestResponseResultSpecialCommissionForOrder value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OrderTestResponseResultSpecialCommissionForOrder read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OrderTestResponseResultSpecialCommissionForOrder given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrderTestResponseResultSpecialCommissionForOrder - * @throws IOException if the JSON string is invalid with respect to - * OrderTestResponseResultSpecialCommissionForOrder - */ - public static OrderTestResponseResultSpecialCommissionForOrder fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, OrderTestResponseResultSpecialCommissionForOrder.class); - } - - /** - * Convert an instance of OrderTestResponseResultSpecialCommissionForOrder to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultStandardCommissionForOrder.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultStandardCommissionForOrder.java index cd2784bcb..f2bce237a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultStandardCommissionForOrder.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultStandardCommissionForOrder.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OrderTestResponseResultStandardCommissionForOrder */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderTestResponseResultStandardCommissionForOrder extends BaseDTO { public static final String SERIALIZED_NAME_MAKER = "maker"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderType.java index 4fb46cc22..9187c2912 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,24 +21,12 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets orderType */ +/** Please see [Enums](/products/spot/enums#ordertypes) for supported values. */ @JsonAdapter(OrderType.Adapter.class) public enum OrderType { MARKET("MARKET"), - LIMIT("LIMIT"), - - STOP_LOSS("STOP_LOSS"), - - STOP_LOSS_LIMIT("STOP_LOSS_LIMIT"), - - TAKE_PROFIT("TAKE_PROFIT"), - - TAKE_PROFIT_LIMIT("TAKE_PROFIT_LIMIT"), - - LIMIT_MAKER("LIMIT_MAKER"), - - NON_REPRESENTABLE("NON_REPRESENTABLE"); + LIMIT("LIMIT"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OutboundAccountPosition.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OutboundAccountPosition.java index 4fafffec7..682249d57 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OutboundAccountPosition.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OutboundAccountPosition.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** OutboundAccountPosition */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OutboundAccountPosition extends BaseDTO { public static final String SERIALIZED_NAME_E = "E"; @@ -69,7 +69,7 @@ public OutboundAccountPosition E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event Time * * @return E */ @@ -88,7 +88,7 @@ public OutboundAccountPosition uLowerCase(@jakarta.annotation.Nullable Long uLow } /** - * Get uLowerCase + * Time of last account update * * @return uLowerCase */ @@ -116,7 +116,7 @@ public OutboundAccountPosition addBItem(OutboundAccountPositionBInner BItem) { } /** - * Get B + * Balances Array * * @return B */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OutboundAccountPositionBInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OutboundAccountPositionBInner.java index f1dec0abc..4cabf010e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OutboundAccountPositionBInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OutboundAccountPositionBInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** OutboundAccountPositionBInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OutboundAccountPositionBInner extends BaseDTO { public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; @@ -66,7 +66,7 @@ public OutboundAccountPositionBInner aLowerCase( } /** - * Get aLowerCase + * Asset * * @return aLowerCase */ @@ -86,7 +86,7 @@ public OutboundAccountPositionBInner fLowerCase( } /** - * Get fLowerCase + * Free * * @return fLowerCase */ @@ -106,7 +106,7 @@ public OutboundAccountPositionBInner lLowerCase( } /** - * Get lLowerCase + * Locked * * @return lLowerCase */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PegOffsetType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PegOffsetType.java index 6104b4cb3..3be87cd5e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PegOffsetType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PegOffsetType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,12 +21,12 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pegOffsetType */ +/** + * Only `PRICE_LEVEL` is supported. See [Pegged Orders](/products/spot/faqs/pegged_orders) + */ @JsonAdapter(PegOffsetType.Adapter.class) public enum PegOffsetType { - PRICE_LEVEL("PRICE_LEVEL"), - - NON_REPRESENTABLE("NON_REPRESENTABLE"); + PRICE_LEVEL("PRICE_LEVEL"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PegPriceType.java index fa6ce2984..a275fa18b 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PegPriceType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,14 +21,15 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pegPriceType */ +/** + * `PRIMARY_PEG` or `MARKET_PEG`. See [Pegged + * Orders](/products/spot/faqs/pegged_orders) + */ @JsonAdapter(PegPriceType.Adapter.class) public enum PegPriceType { PRIMARY_PEG("PRIMARY_PEG"), - MARKET_PEG("MARKET_PEG"), - - NON_REPRESENTABLE("NON_REPRESENTABLE"); + MARKET_PEG("MARKET_PEG"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAbovePegOffsetType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAbovePegOffsetType.java index e38471a54..ad820fa70 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAbovePegOffsetType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAbovePegOffsetType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAbovePegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAbovePegPriceType.java index 14b498326..3bd6c0dcb 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAbovePegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAbovePegPriceType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingAbovePegPriceType */ +/** See [Pegged Orders](/products/spot/faqs/pegged_orders) */ @JsonAdapter(PendingAbovePegPriceType.Adapter.class) public enum PendingAbovePegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAboveTimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAboveTimeInForce.java index 25e58b52a..f7b1334e9 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAboveTimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAboveTimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingAboveTimeInForce */ +/** + * Required if `pendingAboveType` is `STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT`. + */ @JsonAdapter(PendingAboveTimeInForce.Adapter.class) public enum PendingAboveTimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAboveType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAboveType.java index cd7bb0b46..8e9583a37 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAboveType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAboveType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingAboveType */ +/** + * Supported values: `STOP_LOSS_LIMIT`, `STOP_LOSS`, `LIMIT_MAKER`, + * `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT` + */ @JsonAdapter(PendingAboveType.Adapter.class) public enum PendingAboveType { STOP_LOSS_LIMIT("STOP_LOSS_LIMIT"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowPegOffsetType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowPegOffsetType.java index ae5f6ec8d..b0e05467e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowPegOffsetType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowPegOffsetType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowPegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowPegPriceType.java index 07baaf364..0c065eb58 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowPegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowPegPriceType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingBelowPegPriceType */ +/** See [Pegged Orders](/products/spot/faqs/pegged_orders) */ @JsonAdapter(PendingBelowPegPriceType.Adapter.class) public enum PendingBelowPegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowTimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowTimeInForce.java index 921c52b04..9973111dc 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowTimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowTimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingBelowTimeInForce */ +/** + * Required if `pendingBelowType` is `STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT`. + */ @JsonAdapter(PendingBelowTimeInForce.Adapter.class) public enum PendingBelowTimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowType.java index 7386af589..057ae1add 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingBelowType */ +/** + * Supported values: `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, + * `TAKE_PROFIT_LIMIT` + */ @JsonAdapter(PendingBelowType.Adapter.class) public enum PendingBelowType { STOP_LOSS("STOP_LOSS"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingPegOffsetType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingPegOffsetType.java index ba80a20bb..d11ef83c5 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingPegOffsetType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingPegOffsetType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingPegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingPegPriceType.java index b72ee3995..673f9db7f 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingPegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingPegPriceType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingPegPriceType */ +/** See [Pegged Orders](/products/spot/faqs/pegged_orders) */ @JsonAdapter(PendingPegPriceType.Adapter.class) public enum PendingPegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingSide.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingSide.java index a0c329174..b40459668 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingSide.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingSide.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingSide */ +/** Supported values: [Order Side](/products/spot/enums#side) */ @JsonAdapter(PendingSide.Adapter.class) public enum PendingSide { BUY("BUY"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingTimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingTimeInForce.java index 8de7d4df7..a5a553354 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingTimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingTimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingTimeInForce */ +/** Supported values: [Time In Force](/products/spot/enums#timeinforce) */ @JsonAdapter(PendingTimeInForce.Adapter.class) public enum PendingTimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingType.java index 37df15114..2b2f3669b 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets pendingType */ +/** + * Supported values: [Order Types](/products/spot/enums#ordertypes). Note that `MARKET` + * orders using `quoteOrderQty` are not supported. + */ @JsonAdapter(PendingType.Adapter.class) public enum PendingType { LIMIT("LIMIT"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PercentPriceBySideFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PercentPriceBySideFilter.java index ce6991fc2..b05af89e8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PercentPriceBySideFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PercentPriceBySideFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** PercentPriceBySideFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PercentPriceBySideFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PercentPriceFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PercentPriceFilter.java index 436fbaf37..484839248 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PercentPriceFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PercentPriceFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** PercentPriceFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PercentPriceFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Permissions.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Permissions.java index 82b80b3ef..9147aa069 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Permissions.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Permissions.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -32,10 +32,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** Permissions */ +/** Filter symbols by permissions */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Permissions extends ArrayList { public Permissions() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PingResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PingResponse.java index 2f60d5e05..bef6a0927 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PingResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PingResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** PingResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PingResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class PingResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public PingResponse() {} @@ -127,12 +127,13 @@ public void setResult(@jakarta.annotation.Nullable Object result) { } public PingResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public PingResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public PingResponse addRateLimitsItem(AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -147,11 +148,13 @@ public PingResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -206,7 +209,7 @@ public String toUrlQueryString() { String resultValueAsString = resultValue.toString(); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -325,7 +328,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PriceFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PriceFilter.java index 8a544b354..891e5fd49 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PriceFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PriceFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** PriceFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PriceFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/RateLimits.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/RateLimits.java index 8452bce96..e7cc6d760 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/RateLimits.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/RateLimits.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** RateLimits */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RateLimits extends BaseDTO { public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceCalculationRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceCalculationRequest.java index 8ba94f393..f5b98feb5 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceCalculationRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceCalculationRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,8 +38,14 @@ /** ReferencePriceCalculationRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ReferencePriceCalculationRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -54,6 +60,25 @@ public class ReferencePriceCalculationRequest extends BaseDTO { public ReferencePriceCalculationRequest() {} + public ReferencePriceCalculationRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public ReferencePriceCalculationRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -105,19 +130,21 @@ public boolean equals(Object o) { } ReferencePriceCalculationRequest referencePriceCalculationRequest = (ReferencePriceCalculationRequest) o; - return Objects.equals(this.symbol, referencePriceCalculationRequest.symbol) + return Objects.equals(this.id, referencePriceCalculationRequest.id) + && Objects.equals(this.symbol, referencePriceCalculationRequest.symbol) && Objects.equals(this.symbolStatus, referencePriceCalculationRequest.symbolStatus); } @Override public int hashCode() { - return Objects.hash(symbol, symbolStatus); + return Objects.hash(id, symbol, symbolStatus); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReferencePriceCalculationRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" symbolStatus: ").append(toIndentedString(symbolStatus)).append("\n"); sb.append("}"); @@ -128,6 +155,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -149,6 +181,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -183,6 +219,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("symbolStatus"); @@ -232,6 +269,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceCalculationResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceCalculationResponse.java index 8db981f2e..993e9f097 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceCalculationResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceCalculationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -15,6 +15,7 @@ import com.binance.connector.client.common.websocket.dtos.BaseDTO; import com.binance.connector.client.spot.websocket.api.JSON; import com.google.gson.Gson; +import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; @@ -27,7 +28,9 @@ import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; +import java.util.ArrayList; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; @@ -38,7 +41,7 @@ /** ReferencePriceCalculationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ReferencePriceCalculationResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -58,6 +61,12 @@ public class ReferencePriceCalculationResponse extends BaseDTO { @jakarta.annotation.Nullable private ReferencePriceCalculationResponseResult result; + public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMITS) + @jakarta.annotation.Nullable + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + public ReferencePriceCalculationResponse() {} public ReferencePriceCalculationResponse id(@jakarta.annotation.Nullable String id) { @@ -120,6 +129,39 @@ public void setResult( this.result = result; } + public ReferencePriceCalculationResponse rateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + this.rateLimits = rateLimits; + return this; + } + + public ReferencePriceCalculationResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { + if (this.rateLimits == null) { + this.rateLimits = new ArrayList<>(); + } + this.rateLimits.add(rateLimitsItem); + return this; + } + + /** + * Get rateLimits + * + * @return rateLimits + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + return rateLimits; + } + + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + this.rateLimits = rateLimits; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -132,12 +174,13 @@ public boolean equals(Object o) { (ReferencePriceCalculationResponse) o; return Objects.equals(this.id, referencePriceCalculationResponse.id) && Objects.equals(this.status, referencePriceCalculationResponse.status) - && Objects.equals(this.result, referencePriceCalculationResponse.result); + && Objects.equals(this.result, referencePriceCalculationResponse.result) + && Objects.equals(this.rateLimits, referencePriceCalculationResponse.rateLimits); } @Override public int hashCode() { - return Objects.hash(id, status, result); + return Objects.hash(id, status, result, rateLimits); } @Override @@ -147,6 +190,7 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" rateLimits: ").append(toIndentedString(rateLimits)).append("\n"); sb.append("}"); return sb.toString(); } @@ -170,6 +214,11 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + if (rateLimitsValue != null) { + String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); + valMap.put("rateLimits", rateLimitsValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -193,6 +242,10 @@ public Map toMap() { if (resultValue != null) { valMap.put("result", resultValue); } + Object rateLimitsValue = getRateLimits(); + if (rateLimitsValue != null) { + valMap.put("rateLimits", rateLimitsValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -222,6 +275,7 @@ private String toIndentedString(Object o) { openapiFields.add("id"); openapiFields.add("status"); openapiFields.add("result"); + openapiFields.add("rateLimits"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -271,6 +325,26 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { ReferencePriceCalculationResponseResult.validateJsonElement(jsonObj.get("result")); } + if (jsonObj.get("rateLimits") != null && !jsonObj.get("rateLimits").isJsonNull()) { + JsonArray jsonArrayrateLimits = jsonObj.getAsJsonArray("rateLimits"); + if (jsonArrayrateLimits != null) { + // ensure the json data is an array + if (!jsonObj.get("rateLimits").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimits` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimits").toString())); + } + + // validate the optional field `rateLimits` (array) + for (int i = 0; i < jsonArrayrateLimits.size(); i++) { + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); + } + ; + } + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceCalculationResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceCalculationResponseResult.java index b8f563ce8..387cafbaf 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceCalculationResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceCalculationResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** ReferencePriceCalculationResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ReferencePriceCalculationResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -118,7 +118,7 @@ public ReferencePriceCalculationResponseResult bucketCount( } /** - * Get bucketCount + * If the reference price is being calculated by the matching engine as an arithmetic mean * * @return bucketCount */ @@ -138,7 +138,7 @@ public ReferencePriceCalculationResponseResult bucketWidthMs( } /** - * Get bucketWidthMs + * If the reference price is being calculated by the matching engine as an arithmetic mean * * @return bucketWidthMs */ @@ -158,7 +158,7 @@ public ReferencePriceCalculationResponseResult externalCalculationId( } /** - * Get externalCalculationId + * If the reference price is being calculated outside the matching engine * * @return externalCalculationId */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceRequest.java index 0dce3ab1b..28a3d788a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,8 +37,14 @@ /** ReferencePriceRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ReferencePriceRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -47,6 +53,25 @@ public class ReferencePriceRequest extends BaseDTO { public ReferencePriceRequest() {} + public ReferencePriceRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public ReferencePriceRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -76,18 +101,20 @@ public boolean equals(Object o) { return false; } ReferencePriceRequest referencePriceRequest = (ReferencePriceRequest) o; - return Objects.equals(this.symbol, referencePriceRequest.symbol); + return Objects.equals(this.id, referencePriceRequest.id) + && Objects.equals(this.symbol, referencePriceRequest.symbol); } @Override public int hashCode() { - return Objects.hash(symbol); + return Objects.hash(id, symbol); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReferencePriceRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append("}"); return sb.toString(); @@ -97,6 +124,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -113,6 +145,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -143,6 +179,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); // a set of required properties/fields (JSON key names) @@ -190,6 +227,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse.java index ff43bf2c7..0bd336ebd 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -15,6 +15,7 @@ import com.binance.connector.client.common.websocket.dtos.BaseDTO; import com.binance.connector.client.spot.websocket.api.JSON; import com.google.gson.Gson; +import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; @@ -27,7 +28,9 @@ import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; +import java.util.ArrayList; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; @@ -38,7 +41,7 @@ /** ReferencePriceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ReferencePriceResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -58,6 +61,12 @@ public class ReferencePriceResponse extends BaseDTO { @jakarta.annotation.Nullable private ReferencePriceResponseResult result; + public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMITS) + @jakarta.annotation.Nullable + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + public ReferencePriceResponse() {} public ReferencePriceResponse id(@jakarta.annotation.Nullable String id) { @@ -119,6 +128,39 @@ public void setResult(@jakarta.annotation.Nullable ReferencePriceResponseResult this.result = result; } + public ReferencePriceResponse rateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + this.rateLimits = rateLimits; + return this; + } + + public ReferencePriceResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { + if (this.rateLimits == null) { + this.rateLimits = new ArrayList<>(); + } + this.rateLimits.add(rateLimitsItem); + return this; + } + + /** + * Get rateLimits + * + * @return rateLimits + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + return rateLimits; + } + + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + this.rateLimits = rateLimits; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -130,12 +172,13 @@ public boolean equals(Object o) { ReferencePriceResponse referencePriceResponse = (ReferencePriceResponse) o; return Objects.equals(this.id, referencePriceResponse.id) && Objects.equals(this.status, referencePriceResponse.status) - && Objects.equals(this.result, referencePriceResponse.result); + && Objects.equals(this.result, referencePriceResponse.result) + && Objects.equals(this.rateLimits, referencePriceResponse.rateLimits); } @Override public int hashCode() { - return Objects.hash(id, status, result); + return Objects.hash(id, status, result, rateLimits); } @Override @@ -145,6 +188,7 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" rateLimits: ").append(toIndentedString(rateLimits)).append("\n"); sb.append("}"); return sb.toString(); } @@ -168,6 +212,11 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + if (rateLimitsValue != null) { + String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); + valMap.put("rateLimits", rateLimitsValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -191,6 +240,10 @@ public Map toMap() { if (resultValue != null) { valMap.put("result", resultValue); } + Object rateLimitsValue = getRateLimits(); + if (rateLimitsValue != null) { + valMap.put("rateLimits", rateLimitsValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -220,6 +273,7 @@ private String toIndentedString(Object o) { openapiFields.add("id"); openapiFields.add("status"); openapiFields.add("result"); + openapiFields.add("rateLimits"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -267,6 +321,26 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { ReferencePriceResponseResult.validateJsonElement(jsonObj.get("result")); } + if (jsonObj.get("rateLimits") != null && !jsonObj.get("rateLimits").isJsonNull()) { + JsonArray jsonArrayrateLimits = jsonObj.getAsJsonArray("rateLimits"); + if (jsonArrayrateLimits != null) { + // ensure the json data is an array + if (!jsonObj.get("rateLimits").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimits` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimits").toString())); + } + + // validate the optional field `rateLimits` (array) + for (int i = 0; i < jsonArrayrateLimits.size(); i++) { + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); + } + ; + } + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponseResult.java index 75468df74..44f734f69 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** ReferencePriceResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ReferencePriceResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -55,7 +55,7 @@ public class ReferencePriceResponseResult extends BaseDTO { @SerializedName(SERIALIZED_NAME_TIMESTAMP) @jakarta.annotation.Nullable - private Long timestamp; + private String timestamp; public static final String SERIALIZED_NAME_CODE = "code"; @@ -110,22 +110,22 @@ public void setReferencePrice(@jakarta.annotation.Nullable String referencePrice this.referencePrice = referencePrice; } - public ReferencePriceResponseResult timestamp(@jakarta.annotation.Nullable Long timestamp) { + public ReferencePriceResponseResult timestamp(@jakarta.annotation.Nullable String timestamp) { this.timestamp = timestamp; return this; } /** - * Get timestamp + * Timestamp when the reference price was valid * * @return timestamp */ @jakarta.annotation.Nullable public String getTimestamp() { - return String.valueOf(timestamp); + return timestamp; } - public void setTimestamp(@jakarta.annotation.Nullable Long timestamp) { + public void setTimestamp(@jakarta.annotation.Nullable String timestamp) { this.timestamp = timestamp; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SelfTradePreventionMode.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SelfTradePreventionMode.java index e05f8e68c..4dfc4fe0f 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SelfTradePreventionMode.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SelfTradePreventionMode.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,10 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets selfTradePreventionMode */ +/** + * The allowed enums is dependent on what is configured on the symbol. Supported values: [STP + * Modes](/products/spot/enums#stpmodes) + */ @JsonAdapter(SelfTradePreventionMode.Adapter.class) public enum SelfTradePreventionMode { NONE("NONE"), @@ -34,7 +37,7 @@ public enum SelfTradePreventionMode { DECREMENT("DECREMENT"), - NON_REPRESENTABLE("NON_REPRESENTABLE"); + TRANSFER("TRANSFER"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogonRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogonRequest.java index 4cbe831c0..30838e197 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogonRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogonRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** SessionLogonRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SessionLogonRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @SerializedName(SERIALIZED_NAME_RECV_WINDOW) @@ -49,18 +55,39 @@ public class SessionLogonRequest extends BaseDTO { public SessionLogonRequest() {} + public SessionLogonRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public SessionLogonRequest recvWindow(@jakarta.annotation.Nullable Double recvWindow) { this.recvWindow = recvWindow; return this; } /** - * Get recvWindow + * The value cannot be greater than `60000`. Supports up to three decimal places of + * precision (e.g., 6000.346) so that microseconds may be specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -78,18 +105,20 @@ public boolean equals(Object o) { return false; } SessionLogonRequest sessionLogonRequest = (SessionLogonRequest) o; - return Objects.equals(this.recvWindow, sessionLogonRequest.recvWindow); + return Objects.equals(this.id, sessionLogonRequest.id) + && Objects.equals(this.recvWindow, sessionLogonRequest.recvWindow); } @Override public int hashCode() { - return Objects.hash(recvWindow); + return Objects.hash(id, recvWindow); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SessionLogonRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); sb.append("}"); return sb.toString(); @@ -99,6 +128,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } Double recvWindowValue = getRecvWindow(); if (recvWindowValue != null) { String recvWindowValueAsString = @@ -116,6 +150,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object recvWindowValue = getRecvWindow(); if (recvWindowValue != null) { valMap.put("recvWindow", recvWindowValue); @@ -146,6 +184,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("recvWindow"); // a set of required properties/fields (JSON key names) @@ -182,6 +221,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogonResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogonResponse.java index a4d34d6ae..ffdf16182 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogonResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogonResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** SessionLogonResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SessionLogonResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogonResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogonResponseResult.java index c5686b773..3da9353fa 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogonResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogonResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** SessionLogonResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SessionLogonResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_API_KEY = "apiKey"; @@ -182,7 +182,7 @@ public SessionLogonResponseResult userDataStream( } /** - * Get userDataStream + * Is User Data Stream subscription active? * * @return userDataStream */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogoutResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogoutResponse.java index 68095f9f9..6fb370e03 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogoutResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogoutResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** SessionLogoutResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SessionLogoutResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogoutResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogoutResponseResult.java index 815bb41b6..e9a0efefe 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogoutResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionLogoutResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** SessionLogoutResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SessionLogoutResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_API_KEY = "apiKey"; @@ -182,7 +182,7 @@ public SessionLogoutResponseResult userDataStream( } /** - * Get userDataStream + * Is User Data Stream subscription active? * * @return userDataStream */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionStatusResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionStatusResponse.java index d81a170d3..b8cddb3c5 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionStatusResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** SessionStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SessionStatusResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionStatusResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionStatusResponseResult.java index 91b29358d..b4e06aed8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionStatusResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionStatusResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** SessionStatusResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SessionStatusResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_API_KEY = "apiKey"; @@ -182,7 +182,7 @@ public SessionStatusResponseResult userDataStream( } /** - * Get userDataStream + * Is User Data Stream subscription active? * * @return userDataStream */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionSubscriptionsResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionSubscriptionsResponse.java index 5872066cc..b66ec362d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionSubscriptionsResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionSubscriptionsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** SessionSubscriptionsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SessionSubscriptionsResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionSubscriptionsResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionSubscriptionsResponseResultInner.java index e4447e171..c441e27cd 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionSubscriptionsResponseResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionSubscriptionsResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** SessionSubscriptionsResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SessionSubscriptionsResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_SUBSCRIPTION_ID = "subscriptionId"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Side.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Side.java index b8cce5fa5..3ce8a259f 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Side.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Side.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets side */ +/** Please see [Enums](/products/spot/enums#side) for supported values. */ @JsonAdapter(Side.Adapter.class) public enum Side { BUY("BUY"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceRequest.java index f4682e98d..1b1e0d20b 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** SorOrderPlaceRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SorOrderPlaceRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -122,6 +128,25 @@ public class SorOrderPlaceRequest extends BaseDTO { public SorOrderPlaceRequest() {} + public SorOrderPlaceRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public SorOrderPlaceRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -252,7 +277,9 @@ public SorOrderPlaceRequest newClientOrderId( } /** - * Get newClientOrderId + * A unique id among open orders. Automatically generated if not sent.<br/> Orders with + * the same `newClientOrderID` can be accepted only when the previous one is filled, + * otherwise the order will be rejected. * * @return newClientOrderId */ @@ -293,7 +320,7 @@ public SorOrderPlaceRequest icebergQty(@jakarta.annotation.Nullable Double icebe } /** - * Get icebergQty + * Used with `LIMIT` to create an iceberg order. * * @return icebergQty */ @@ -332,7 +359,7 @@ public SorOrderPlaceRequest strategyType(@jakarta.annotation.Nullable Integer st } /** - * Get strategyType + * The value cannot be less than `1000000`. * * @return strategyType */ @@ -373,12 +400,14 @@ public SorOrderPlaceRequest recvWindow(@jakarta.annotation.Nullable Double recvW } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -396,7 +425,8 @@ public boolean equals(Object o) { return false; } SorOrderPlaceRequest sorOrderPlaceRequest = (SorOrderPlaceRequest) o; - return Objects.equals(this.symbol, sorOrderPlaceRequest.symbol) + return Objects.equals(this.id, sorOrderPlaceRequest.id) + && Objects.equals(this.symbol, sorOrderPlaceRequest.symbol) && Objects.equals(this.side, sorOrderPlaceRequest.side) && Objects.equals(this.type, sorOrderPlaceRequest.type) && Objects.equals(this.timeInForce, sorOrderPlaceRequest.timeInForce) @@ -415,6 +445,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + id, symbol, side, type, @@ -434,6 +465,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SorOrderPlaceRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" side: ").append(toIndentedString(side)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); @@ -457,6 +489,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -535,6 +572,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -613,6 +654,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("side"); openapiFields.add("type"); @@ -675,6 +717,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceResponse.java index e7b404771..6d47a2e7a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** SorOrderPlaceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SorOrderPlaceResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class SorOrderPlaceResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public SorOrderPlaceResponse() {} @@ -138,12 +138,14 @@ public void setResult( } public SorOrderPlaceResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public SorOrderPlaceResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public SorOrderPlaceResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -158,11 +160,13 @@ public SorOrderPlaceResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -217,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -355,7 +359,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceResponseResultInner.java index 8a402fed3..e51efdd09 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceResponseResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** SorOrderPlaceResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SorOrderPlaceResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -158,6 +158,84 @@ public class SorOrderPlaceResponseResultInner extends BaseDTO { @jakarta.annotation.Nullable private Boolean usedSor; + public static final String SERIALIZED_NAME_STOP_PRICE = "stopPrice"; + + @SerializedName(SERIALIZED_NAME_STOP_PRICE) + @jakarta.annotation.Nullable + private String stopPrice; + + public static final String SERIALIZED_NAME_TRAILING_DELTA = "trailingDelta"; + + @SerializedName(SERIALIZED_NAME_TRAILING_DELTA) + @jakarta.annotation.Nullable + private Long trailingDelta; + + public static final String SERIALIZED_NAME_ICEBERG_QTY = "icebergQty"; + + @SerializedName(SERIALIZED_NAME_ICEBERG_QTY) + @jakarta.annotation.Nullable + private String icebergQty; + + public static final String SERIALIZED_NAME_STRATEGY_ID = "strategyId"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_ID) + @jakarta.annotation.Nullable + private Long strategyId; + + public static final String SERIALIZED_NAME_STRATEGY_TYPE = "strategyType"; + + @SerializedName(SERIALIZED_NAME_STRATEGY_TYPE) + @jakarta.annotation.Nullable + private Long strategyType; + + public static final String SERIALIZED_NAME_PREVENTED_MATCH_ID = "preventedMatchId"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_MATCH_ID) + @jakarta.annotation.Nullable + private Long preventedMatchId; + + public static final String SERIALIZED_NAME_PREVENTED_QUANTITY = "preventedQuantity"; + + @SerializedName(SERIALIZED_NAME_PREVENTED_QUANTITY) + @jakarta.annotation.Nullable + private String preventedQuantity; + + public static final String SERIALIZED_NAME_TRAILING_TIME = "trailingTime"; + + @SerializedName(SERIALIZED_NAME_TRAILING_TIME) + @jakarta.annotation.Nullable + private Long trailingTime; + + public static final String SERIALIZED_NAME_PEG_PRICE_TYPE = "pegPriceType"; + + @SerializedName(SERIALIZED_NAME_PEG_PRICE_TYPE) + @jakarta.annotation.Nullable + private String pegPriceType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_TYPE = "pegOffsetType"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_TYPE) + @jakarta.annotation.Nullable + private String pegOffsetType; + + public static final String SERIALIZED_NAME_PEG_OFFSET_VALUE = "pegOffsetValue"; + + @SerializedName(SERIALIZED_NAME_PEG_OFFSET_VALUE) + @jakarta.annotation.Nullable + private Long pegOffsetValue; + + public static final String SERIALIZED_NAME_PEGGED_PRICE = "peggedPrice"; + + @SerializedName(SERIALIZED_NAME_PEGGED_PRICE) + @jakarta.annotation.Nullable + private String peggedPrice; + + public static final String SERIALIZED_NAME_EXPIRY_REASON = "expiryReason"; + + @SerializedName(SERIALIZED_NAME_EXPIRY_REASON) + @jakarta.annotation.Nullable + private String expiryReason; + public SorOrderPlaceResponseResultInner() {} public SorOrderPlaceResponseResultInner symbol(@jakarta.annotation.Nullable String symbol) { @@ -493,7 +571,7 @@ public SorOrderPlaceResponseResultInner workingFloor( } /** - * Get workingFloor + * Determines whether the order is being filled by the SOR or by the order book. * * @return workingFloor */ @@ -533,7 +611,7 @@ public SorOrderPlaceResponseResultInner usedSor(@jakarta.annotation.Nullable Boo } /** - * Get usedSor + * Field that determines whether order used SOR. * * @return usedSor */ @@ -546,6 +624,266 @@ public void setUsedSor(@jakarta.annotation.Nullable Boolean usedSor) { this.usedSor = usedSor; } + public SorOrderPlaceResponseResultInner stopPrice( + @jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + /** + * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. + * + * @return stopPrice + */ + @jakarta.annotation.Nullable + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(@jakarta.annotation.Nullable String stopPrice) { + this.stopPrice = stopPrice; + } + + public SorOrderPlaceResponseResultInner trailingDelta( + @jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + return this; + } + + /** + * Delta price change required before order activation. + * + * @return trailingDelta + */ + @jakarta.annotation.Nullable + public Long getTrailingDelta() { + return trailingDelta; + } + + public void setTrailingDelta(@jakarta.annotation.Nullable Long trailingDelta) { + this.trailingDelta = trailingDelta; + } + + public SorOrderPlaceResponseResultInner icebergQty( + @jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + return this; + } + + /** + * Appears only if the parameter icebergQty was sent in the request. + * + * @return icebergQty + */ + @jakarta.annotation.Nullable + public String getIcebergQty() { + return icebergQty; + } + + public void setIcebergQty(@jakarta.annotation.Nullable String icebergQty) { + this.icebergQty = icebergQty; + } + + public SorOrderPlaceResponseResultInner strategyId( + @jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + return this; + } + + /** + * Appears only if the strategyId parameter was provided upon order placement. + * + * @return strategyId + */ + @jakarta.annotation.Nullable + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(@jakarta.annotation.Nullable Long strategyId) { + this.strategyId = strategyId; + } + + public SorOrderPlaceResponseResultInner strategyType( + @jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + return this; + } + + /** + * Appears only if the strategyType parameter was provided upon order placement. + * + * @return strategyType + */ + @jakarta.annotation.Nullable + public Long getStrategyType() { + return strategyType; + } + + public void setStrategyType(@jakarta.annotation.Nullable Long strategyType) { + this.strategyType = strategyType; + } + + public SorOrderPlaceResponseResultInner preventedMatchId( + @jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + return this; + } + + /** + * Appears only if the order expired due to STP. + * + * @return preventedMatchId + */ + @jakarta.annotation.Nullable + public Long getPreventedMatchId() { + return preventedMatchId; + } + + public void setPreventedMatchId(@jakarta.annotation.Nullable Long preventedMatchId) { + this.preventedMatchId = preventedMatchId; + } + + public SorOrderPlaceResponseResultInner preventedQuantity( + @jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + return this; + } + + /** + * Order quantity that expired due to STP. + * + * @return preventedQuantity + */ + @jakarta.annotation.Nullable + public String getPreventedQuantity() { + return preventedQuantity; + } + + public void setPreventedQuantity(@jakarta.annotation.Nullable String preventedQuantity) { + this.preventedQuantity = preventedQuantity; + } + + public SorOrderPlaceResponseResultInner trailingTime( + @jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + return this; + } + + /** + * Time when the trailing order is now active and tracking price changes. + * + * @return trailingTime + */ + @jakarta.annotation.Nullable + public Long getTrailingTime() { + return trailingTime; + } + + public void setTrailingTime(@jakarta.annotation.Nullable Long trailingTime) { + this.trailingTime = trailingTime; + } + + public SorOrderPlaceResponseResultInner pegPriceType( + @jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + return this; + } + + /** + * Price peg type. Only for pegged orders. + * + * @return pegPriceType + */ + @jakarta.annotation.Nullable + public String getPegPriceType() { + return pegPriceType; + } + + public void setPegPriceType(@jakarta.annotation.Nullable String pegPriceType) { + this.pegPriceType = pegPriceType; + } + + public SorOrderPlaceResponseResultInner pegOffsetType( + @jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + /** + * Price peg offset type. Only for pegged orders, if requested. + * + * @return pegOffsetType + */ + @jakarta.annotation.Nullable + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(@jakarta.annotation.Nullable String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public SorOrderPlaceResponseResultInner pegOffsetValue( + @jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + return this; + } + + /** + * Price peg offset value. Only for pegged orders, if requested. + * + * @return pegOffsetValue + */ + @jakarta.annotation.Nullable + public Long getPegOffsetValue() { + return pegOffsetValue; + } + + public void setPegOffsetValue(@jakarta.annotation.Nullable Long pegOffsetValue) { + this.pegOffsetValue = pegOffsetValue; + } + + public SorOrderPlaceResponseResultInner peggedPrice( + @jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + return this; + } + + /** + * Current price order is pegged at. Only for pegged orders, once determined. + * + * @return peggedPrice + */ + @jakarta.annotation.Nullable + public String getPeggedPrice() { + return peggedPrice; + } + + public void setPeggedPrice(@jakarta.annotation.Nullable String peggedPrice) { + this.peggedPrice = peggedPrice; + } + + public SorOrderPlaceResponseResultInner expiryReason( + @jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + return this; + } + + /** + * Cause of the order's expiration. Appears when an order has expired. + * + * @return expiryReason + */ + @jakarta.annotation.Nullable + public String getExpiryReason() { + return expiryReason; + } + + public void setExpiryReason(@jakarta.annotation.Nullable String expiryReason) { + this.expiryReason = expiryReason; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -580,7 +918,25 @@ public boolean equals(Object o) { && Objects.equals( this.selfTradePreventionMode, sorOrderPlaceResponseResultInner.selfTradePreventionMode) - && Objects.equals(this.usedSor, sorOrderPlaceResponseResultInner.usedSor); + && Objects.equals(this.usedSor, sorOrderPlaceResponseResultInner.usedSor) + && Objects.equals(this.stopPrice, sorOrderPlaceResponseResultInner.stopPrice) + && Objects.equals( + this.trailingDelta, sorOrderPlaceResponseResultInner.trailingDelta) + && Objects.equals(this.icebergQty, sorOrderPlaceResponseResultInner.icebergQty) + && Objects.equals(this.strategyId, sorOrderPlaceResponseResultInner.strategyId) + && Objects.equals(this.strategyType, sorOrderPlaceResponseResultInner.strategyType) + && Objects.equals( + this.preventedMatchId, sorOrderPlaceResponseResultInner.preventedMatchId) + && Objects.equals( + this.preventedQuantity, sorOrderPlaceResponseResultInner.preventedQuantity) + && Objects.equals(this.trailingTime, sorOrderPlaceResponseResultInner.trailingTime) + && Objects.equals(this.pegPriceType, sorOrderPlaceResponseResultInner.pegPriceType) + && Objects.equals( + this.pegOffsetType, sorOrderPlaceResponseResultInner.pegOffsetType) + && Objects.equals( + this.pegOffsetValue, sorOrderPlaceResponseResultInner.pegOffsetValue) + && Objects.equals(this.peggedPrice, sorOrderPlaceResponseResultInner.peggedPrice) + && Objects.equals(this.expiryReason, sorOrderPlaceResponseResultInner.expiryReason); } @Override @@ -604,7 +960,20 @@ public int hashCode() { fills, workingFloor, selfTradePreventionMode, - usedSor); + usedSor, + stopPrice, + trailingDelta, + icebergQty, + strategyId, + strategyType, + preventedMatchId, + preventedQuantity, + trailingTime, + pegPriceType, + pegOffsetType, + pegOffsetValue, + peggedPrice, + expiryReason); } @Override @@ -634,6 +1003,19 @@ public String toString() { .append(toIndentedString(selfTradePreventionMode)) .append("\n"); sb.append(" usedSor: ").append(toIndentedString(usedSor)).append("\n"); + sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n"); + sb.append(" trailingDelta: ").append(toIndentedString(trailingDelta)).append("\n"); + sb.append(" icebergQty: ").append(toIndentedString(icebergQty)).append("\n"); + sb.append(" strategyId: ").append(toIndentedString(strategyId)).append("\n"); + sb.append(" strategyType: ").append(toIndentedString(strategyType)).append("\n"); + sb.append(" preventedMatchId: ").append(toIndentedString(preventedMatchId)).append("\n"); + sb.append(" preventedQuantity: ").append(toIndentedString(preventedQuantity)).append("\n"); + sb.append(" trailingTime: ").append(toIndentedString(trailingTime)).append("\n"); + sb.append(" pegPriceType: ").append(toIndentedString(pegPriceType)).append("\n"); + sb.append(" pegOffsetType: ").append(toIndentedString(pegOffsetType)).append("\n"); + sb.append(" pegOffsetValue: ").append(toIndentedString(pegOffsetValue)).append("\n"); + sb.append(" peggedPrice: ").append(toIndentedString(peggedPrice)).append("\n"); + sb.append(" expiryReason: ").append(toIndentedString(expiryReason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -737,6 +1119,71 @@ public String toUrlQueryString() { String usedSorValueAsString = usedSorValue.toString(); valMap.put("usedSor", usedSorValueAsString); } + String stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + String stopPriceValueAsString = stopPriceValue.toString(); + valMap.put("stopPrice", stopPriceValueAsString); + } + Long trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + String trailingDeltaValueAsString = trailingDeltaValue.toString(); + valMap.put("trailingDelta", trailingDeltaValueAsString); + } + String icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + String icebergQtyValueAsString = icebergQtyValue.toString(); + valMap.put("icebergQty", icebergQtyValueAsString); + } + Long strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + String strategyIdValueAsString = strategyIdValue.toString(); + valMap.put("strategyId", strategyIdValueAsString); + } + Long strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + String strategyTypeValueAsString = strategyTypeValue.toString(); + valMap.put("strategyType", strategyTypeValueAsString); + } + Long preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + String preventedMatchIdValueAsString = preventedMatchIdValue.toString(); + valMap.put("preventedMatchId", preventedMatchIdValueAsString); + } + String preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + String preventedQuantityValueAsString = preventedQuantityValue.toString(); + valMap.put("preventedQuantity", preventedQuantityValueAsString); + } + Long trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + String trailingTimeValueAsString = trailingTimeValue.toString(); + valMap.put("trailingTime", trailingTimeValueAsString); + } + String pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + String pegPriceTypeValueAsString = pegPriceTypeValue.toString(); + valMap.put("pegPriceType", pegPriceTypeValueAsString); + } + String pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + String pegOffsetTypeValueAsString = pegOffsetTypeValue.toString(); + valMap.put("pegOffsetType", pegOffsetTypeValueAsString); + } + Long pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + String pegOffsetValueValueAsString = pegOffsetValueValue.toString(); + valMap.put("pegOffsetValue", pegOffsetValueValueAsString); + } + String peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + String peggedPriceValueAsString = peggedPriceValue.toString(); + valMap.put("peggedPrice", peggedPriceValueAsString); + } + String expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + String expiryReasonValueAsString = expiryReasonValue.toString(); + valMap.put("expiryReason", expiryReasonValueAsString); + } valMap.put("timestamp", getTimestamp()); return asciiEncode( @@ -824,6 +1271,58 @@ public Map toMap() { if (usedSorValue != null) { valMap.put("usedSor", usedSorValue); } + Object stopPriceValue = getStopPrice(); + if (stopPriceValue != null) { + valMap.put("stopPrice", stopPriceValue); + } + Object trailingDeltaValue = getTrailingDelta(); + if (trailingDeltaValue != null) { + valMap.put("trailingDelta", trailingDeltaValue); + } + Object icebergQtyValue = getIcebergQty(); + if (icebergQtyValue != null) { + valMap.put("icebergQty", icebergQtyValue); + } + Object strategyIdValue = getStrategyId(); + if (strategyIdValue != null) { + valMap.put("strategyId", strategyIdValue); + } + Object strategyTypeValue = getStrategyType(); + if (strategyTypeValue != null) { + valMap.put("strategyType", strategyTypeValue); + } + Object preventedMatchIdValue = getPreventedMatchId(); + if (preventedMatchIdValue != null) { + valMap.put("preventedMatchId", preventedMatchIdValue); + } + Object preventedQuantityValue = getPreventedQuantity(); + if (preventedQuantityValue != null) { + valMap.put("preventedQuantity", preventedQuantityValue); + } + Object trailingTimeValue = getTrailingTime(); + if (trailingTimeValue != null) { + valMap.put("trailingTime", trailingTimeValue); + } + Object pegPriceTypeValue = getPegPriceType(); + if (pegPriceTypeValue != null) { + valMap.put("pegPriceType", pegPriceTypeValue); + } + Object pegOffsetTypeValue = getPegOffsetType(); + if (pegOffsetTypeValue != null) { + valMap.put("pegOffsetType", pegOffsetTypeValue); + } + Object pegOffsetValueValue = getPegOffsetValue(); + if (pegOffsetValueValue != null) { + valMap.put("pegOffsetValue", pegOffsetValueValue); + } + Object peggedPriceValue = getPeggedPrice(); + if (peggedPriceValue != null) { + valMap.put("peggedPrice", peggedPriceValue); + } + Object expiryReasonValue = getExpiryReason(); + if (expiryReasonValue != null) { + valMap.put("expiryReason", expiryReasonValue); + } valMap.put("timestamp", getTimestamp()); return valMap; @@ -869,6 +1368,19 @@ private String toIndentedString(Object o) { openapiFields.add("workingFloor"); openapiFields.add("selfTradePreventionMode"); openapiFields.add("usedSor"); + openapiFields.add("stopPrice"); + openapiFields.add("trailingDelta"); + openapiFields.add("icebergQty"); + openapiFields.add("strategyId"); + openapiFields.add("strategyType"); + openapiFields.add("preventedMatchId"); + openapiFields.add("preventedQuantity"); + openapiFields.add("trailingTime"); + openapiFields.add("pegPriceType"); + openapiFields.add("pegOffsetType"); + openapiFields.add("pegOffsetValue"); + openapiFields.add("peggedPrice"); + openapiFields.add("expiryReason"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -1032,6 +1544,63 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " the JSON string but got `%s`", jsonObj.get("selfTradePreventionMode").toString())); } + if ((jsonObj.get("stopPrice") != null && !jsonObj.get("stopPrice").isJsonNull()) + && !jsonObj.get("stopPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `stopPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("stopPrice").toString())); + } + if ((jsonObj.get("icebergQty") != null && !jsonObj.get("icebergQty").isJsonNull()) + && !jsonObj.get("icebergQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `icebergQty` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("icebergQty").toString())); + } + if ((jsonObj.get("preventedQuantity") != null + && !jsonObj.get("preventedQuantity").isJsonNull()) + && !jsonObj.get("preventedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preventedQuantity` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preventedQuantity").toString())); + } + if ((jsonObj.get("pegPriceType") != null && !jsonObj.get("pegPriceType").isJsonNull()) + && !jsonObj.get("pegPriceType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegPriceType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegPriceType").toString())); + } + if ((jsonObj.get("pegOffsetType") != null && !jsonObj.get("pegOffsetType").isJsonNull()) + && !jsonObj.get("pegOffsetType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pegOffsetType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("pegOffsetType").toString())); + } + if ((jsonObj.get("peggedPrice") != null && !jsonObj.get("peggedPrice").isJsonNull()) + && !jsonObj.get("peggedPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `peggedPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("peggedPrice").toString())); + } + if ((jsonObj.get("expiryReason") != null && !jsonObj.get("expiryReason").isJsonNull()) + && !jsonObj.get("expiryReason").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `expiryReason` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("expiryReason").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceResponseResultInnerFillsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceResponseResultInnerFillsInner.java index 239354404..12b30267e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceResponseResultInnerFillsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceResponseResultInnerFillsInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** SorOrderPlaceResponseResultInnerFillsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SorOrderPlaceResponseResultInnerFillsInner extends BaseDTO { public static final String SERIALIZED_NAME_MATCH_TYPE = "matchType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestRequest.java index 1d44f2133..995541f3c 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -39,8 +39,14 @@ /** SorOrderTestRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SorOrderTestRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_COMPUTE_COMMISSION_RATES = "computeCommissionRates"; @SerializedName(SERIALIZED_NAME_COMPUTE_COMMISSION_RATES) @@ -128,6 +134,25 @@ public class SorOrderTestRequest extends BaseDTO { public SorOrderTestRequest() {} + public SorOrderTestRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public SorOrderTestRequest computeCommissionRates( @jakarta.annotation.Nullable Boolean computeCommissionRates) { this.computeCommissionRates = computeCommissionRates; @@ -135,7 +160,7 @@ public SorOrderTestRequest computeCommissionRates( } /** - * Get computeCommissionRates + * Default: `false` * * @return computeCommissionRates */ @@ -279,7 +304,9 @@ public SorOrderTestRequest newClientOrderId( } /** - * Get newClientOrderId + * A unique id among open orders. Automatically generated if not sent. Orders with the same + * `newClientOrderID` can be accepted only when the previous one is filled, otherwise + * the order will be rejected. * * @return newClientOrderId */ @@ -320,7 +347,7 @@ public SorOrderTestRequest icebergQty(@jakarta.annotation.Nullable Double iceber } /** - * Get icebergQty + * Used with `LIMIT` to create an iceberg order. * * @return icebergQty */ @@ -359,7 +386,7 @@ public SorOrderTestRequest strategyType(@jakarta.annotation.Nullable Integer str } /** - * Get strategyType + * The value cannot be less than `1000000`. * * @return strategyType */ @@ -400,12 +427,14 @@ public SorOrderTestRequest recvWindow(@jakarta.annotation.Nullable Double recvWi } /** - * Get recvWindow + * Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be + * specified. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable @Valid + @DecimalMax("60000") public Double getRecvWindow() { return recvWindow; } @@ -423,7 +452,8 @@ public boolean equals(Object o) { return false; } SorOrderTestRequest sorOrderTestRequest = (SorOrderTestRequest) o; - return Objects.equals( + return Objects.equals(this.id, sorOrderTestRequest.id) + && Objects.equals( this.computeCommissionRates, sorOrderTestRequest.computeCommissionRates) && Objects.equals(this.symbol, sorOrderTestRequest.symbol) && Objects.equals(this.side, sorOrderTestRequest.side) @@ -444,6 +474,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + id, computeCommissionRates, symbol, side, @@ -464,6 +495,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SorOrderTestRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" computeCommissionRates: ") .append(toIndentedString(computeCommissionRates)) .append("\n"); @@ -490,6 +522,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } Boolean computeCommissionRatesValue = getComputeCommissionRates(); if (computeCommissionRatesValue != null) { String computeCommissionRatesValueAsString = computeCommissionRatesValue.toString(); @@ -573,6 +610,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object computeCommissionRatesValue = getComputeCommissionRates(); if (computeCommissionRatesValue != null) { valMap.put("computeCommissionRates", computeCommissionRatesValue); @@ -655,6 +696,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("computeCommissionRates"); openapiFields.add("symbol"); openapiFields.add("side"); @@ -718,6 +760,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestResponse.java index 4e84e9f2f..06163c5be 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** SorOrderTestResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SorOrderTestResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class SorOrderTestResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public SorOrderTestResponse() {} @@ -129,12 +129,14 @@ public void setResult(@jakarta.annotation.Nullable SorOrderTestResponseResult re } public SorOrderTestResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public SorOrderTestResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public SorOrderTestResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -149,11 +151,13 @@ public SorOrderTestResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -208,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -331,7 +335,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestResponseResult.java index c4bff1b33..4fca2c3ab 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** SorOrderTestResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SorOrderTestResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_STANDARD_COMMISSION_FOR_ORDER = "standardCommissionForOrder"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/StopLimitTimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/StopLimitTimeInForce.java index 08acfe2c1..7fac561fb 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/StopLimitTimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/StopLimitTimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets stopLimitTimeInForce */ +/** Valid values are `GTC`/`FOK`/`IOC` */ @JsonAdapter(StopLimitTimeInForce.Adapter.class) public enum StopLimitTimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SymbolFilters.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SymbolFilters.java index 91da7e63b..c4472b4a6 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SymbolFilters.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SymbolFilters.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -33,7 +33,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SymbolFilters extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(SymbolFilters.class.getName()); @@ -333,90 +333,6 @@ public SymbolFilters read(JsonReader in) throws IOException { adapterTPlusSellFilter.fromJsonTree(jsonObject); newSymbolFilters.setActualInstance(deserialized); return newSymbolFilters; - case "IcebergPartsFilter": - deserialized = - adapterIcebergPartsFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "LotSizeFilter": - deserialized = - adapterLotSizeFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MarketLotSizeFilter": - deserialized = - adapterMarketLotSizeFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxNumAlgoOrdersFilter": - deserialized = - adapterMaxNumAlgoOrdersFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxNumIcebergOrdersFilter": - deserialized = - adapterMaxNumIcebergOrdersFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxNumOrderAmendsFilter": - deserialized = - adapterMaxNumOrderAmendsFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxNumOrderListsFilter": - deserialized = - adapterMaxNumOrderListsFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxNumOrdersFilter": - deserialized = - adapterMaxNumOrdersFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxPositionFilter": - deserialized = - adapterMaxPositionFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MinNotionalFilter": - deserialized = - adapterMinNotionalFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "NotionalFilter": - deserialized = - adapterNotionalFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "PercentPriceBySideFilter": - deserialized = - adapterPercentPriceBySideFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "PercentPriceFilter": - deserialized = - adapterPercentPriceFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "PriceFilter": - deserialized = adapterPriceFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "TPlusSellFilter": - deserialized = - adapterTPlusSellFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "TrailingDeltaFilter": - deserialized = - adapterTrailingDeltaFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; default: newSymbolFilters.setActualInstance(jsonElement.toString()); log.log( @@ -431,21 +347,8 @@ public SymbolFilters read(JsonReader in) throws IOException { + " MAX_NUM_ORDER_LISTS MAX_POSITION" + " MIN_NOTIONAL NOTIONAL PERCENT_PRICE" + " PERCENT_PRICE_BY_SIDE PRICE_FILTER" - + " TRAILING_DELTA T_PLUS_SELL" - + " IcebergPartsFilter LotSizeFilter" - + " MarketLotSizeFilter" - + " MaxNumAlgoOrdersFilter" - + " MaxNumIcebergOrdersFilter" - + " MaxNumOrderAmendsFilter" - + " MaxNumOrderListsFilter" - + " MaxNumOrdersFilter" - + " MaxPositionFilter MinNotionalFilter" - + " NotionalFilter" - + " PercentPriceBySideFilter" - + " PercentPriceFilter PriceFilter" - + " TPlusSellFilter" - + " TrailingDeltaFilter. Falling back" - + " to String.", + + " TRAILING_DELTA T_PLUS_SELL. Falling" + + " back to String.", jsonObject .get("filterType") .getAsString())); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SymbolStatus.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SymbolStatus.java index c82bb840b..4260d1b03 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SymbolStatus.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SymbolStatus.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -26,13 +26,9 @@ public enum SymbolStatus { TRADING("TRADING"), - END_OF_DAY("END_OF_DAY"), - HALT("HALT"), - BREAK("BREAK"), - - NON_REPRESENTABLE("NON_REPRESENTABLE"); + BREAK("BREAK"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Symbols.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Symbols.java index c10db9005..0f79ffea0 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Symbols.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Symbols.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** Symbols */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Symbols extends ArrayList { public Symbols() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TPlusSellFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TPlusSellFilter.java index 216a410c9..8e20673aa 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TPlusSellFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TPlusSellFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TPlusSellFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TPlusSellFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrRequest.java index 16dc7d6b8..cc2249bc7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,8 +38,14 @@ /** Ticker24hrRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -52,11 +58,11 @@ public class Ticker24hrRequest extends BaseDTO { @jakarta.annotation.Nullable private Symbols symbols; - public static final String SERIALIZED_NAME_TICKER_TYPE = "tickerType"; + public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TICKER_TYPE) + @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nullable - private TickerType tickerType; + private TickerType type; public static final String SERIALIZED_NAME_SYMBOL_STATUS = "symbolStatus"; @@ -66,6 +72,25 @@ public class Ticker24hrRequest extends BaseDTO { public Ticker24hrRequest() {} + public Ticker24hrRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public Ticker24hrRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; @@ -105,24 +130,24 @@ public void setSymbols(@jakarta.annotation.Nullable Symbols symbols) { this.symbols = symbols; } - public Ticker24hrRequest tickerType(@jakarta.annotation.Nullable TickerType tickerType) { - this.tickerType = tickerType; + public Ticker24hrRequest type(@jakarta.annotation.Nullable TickerType type) { + this.type = type; return this; } /** - * Get tickerType + * Get type * - * @return tickerType + * @return type */ @jakarta.annotation.Nullable @Valid - public TickerType getTickerType() { - return tickerType; + public TickerType getType() { + return type; } - public void setTickerType(@jakarta.annotation.Nullable TickerType tickerType) { - this.tickerType = tickerType; + public void setType(@jakarta.annotation.Nullable TickerType type) { + this.type = type; } public Ticker24hrRequest symbolStatus(@jakarta.annotation.Nullable SymbolStatus symbolStatus) { @@ -154,24 +179,26 @@ public boolean equals(Object o) { return false; } Ticker24hrRequest ticker24hrRequest = (Ticker24hrRequest) o; - return Objects.equals(this.symbol, ticker24hrRequest.symbol) + return Objects.equals(this.id, ticker24hrRequest.id) + && Objects.equals(this.symbol, ticker24hrRequest.symbol) && Objects.equals(this.symbols, ticker24hrRequest.symbols) - && Objects.equals(this.tickerType, ticker24hrRequest.tickerType) + && Objects.equals(this.type, ticker24hrRequest.type) && Objects.equals(this.symbolStatus, ticker24hrRequest.symbolStatus); } @Override public int hashCode() { - return Objects.hash(symbol, symbols, tickerType, symbolStatus); + return Objects.hash(id, symbol, symbols, type, symbolStatus); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Ticker24hrRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" symbols: ").append(toIndentedString(symbols)).append("\n"); - sb.append(" tickerType: ").append(toIndentedString(tickerType)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" symbolStatus: ").append(toIndentedString(symbolStatus)).append("\n"); sb.append("}"); return sb.toString(); @@ -181,6 +208,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -191,10 +223,10 @@ public String toUrlQueryString() { String symbolsValueAsString = JSON.getGson().toJson(symbolsValue); valMap.put("symbols", symbolsValueAsString); } - TickerType tickerTypeValue = getTickerType(); - if (tickerTypeValue != null) { - String tickerTypeValueAsString = tickerTypeValue.toString(); - valMap.put("tickerType", tickerTypeValueAsString); + TickerType typeValue = getType(); + if (typeValue != null) { + String typeValueAsString = typeValue.toString(); + valMap.put("type", typeValueAsString); } SymbolStatus symbolStatusValue = getSymbolStatus(); if (symbolStatusValue != null) { @@ -212,6 +244,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -220,9 +256,9 @@ public Map toMap() { if (symbolsValue != null) { valMap.put("symbols", symbolsValue); } - Object tickerTypeValue = getTickerType(); - if (tickerTypeValue != null) { - valMap.put("tickerType", tickerTypeValue); + Object typeValue = getType(); + if (typeValue != null) { + valMap.put("type", typeValue); } Object symbolStatusValue = getSymbolStatus(); if (symbolStatusValue != null) { @@ -254,9 +290,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("symbols"); - openapiFields.add("tickerType"); + openapiFields.add("type"); openapiFields.add("symbolStatus"); // a set of required properties/fields (JSON key names) @@ -293,6 +330,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -301,9 +346,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("symbol").toString())); } - // validate the optional field `tickerType` - if (jsonObj.get("tickerType") != null && !jsonObj.get("tickerType").isJsonNull()) { - TickerType.validateJsonElement(jsonObj.get("tickerType")); + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TickerType.validateJsonElement(jsonObj.get("type")); } // validate the optional field `symbolStatus` if (jsonObj.get("symbolStatus") != null && !jsonObj.get("symbolStatus").isJsonNull()) { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse.java index 682a1bbfd..398183794 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(Ticker24hrResponse.class.getName()); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse1.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse1.java index 5af68f45e..d64c452a9 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse1.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** Ticker24hrResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrResponse1 extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class Ticker24hrResponse1 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public Ticker24hrResponse1() {} @@ -129,12 +129,14 @@ public void setResult(@jakarta.annotation.Nullable Ticker24hrResponse1Result res } public Ticker24hrResponse1 rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public Ticker24hrResponse1 addRateLimitsItem(RateLimits rateLimitsItem) { + public Ticker24hrResponse1 addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -149,11 +151,13 @@ public Ticker24hrResponse1 addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -208,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -331,7 +335,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse1Result.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse1Result.java index f36bc498b..ec0798145 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse1Result.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse1Result.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** Ticker24hrResponse1Result */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrResponse1Result extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -173,7 +173,7 @@ public Ticker24hrResponse1Result symbol(@jakarta.annotation.Nullable String symb } /** - * Get symbol + * Symbol Name * * @return symbol */ @@ -271,7 +271,7 @@ public Ticker24hrResponse1Result lastPrice(@jakarta.annotation.Nullable String l } /** - * Get lastPrice + * Closing price of the interval * * @return lastPrice */ @@ -385,7 +385,7 @@ public Ticker24hrResponse1Result openPrice(@jakarta.annotation.Nullable String o } /** - * Get openPrice + * Opening price of the Interval * * @return openPrice */ @@ -404,7 +404,7 @@ public Ticker24hrResponse1Result highPrice(@jakarta.annotation.Nullable String h } /** - * Get highPrice + * Highest price in the interval * * @return highPrice */ @@ -423,7 +423,7 @@ public Ticker24hrResponse1Result lowPrice(@jakarta.annotation.Nullable String lo } /** - * Get lowPrice + * Lowest price in the interval * * @return lowPrice */ @@ -442,7 +442,7 @@ public Ticker24hrResponse1Result volume(@jakarta.annotation.Nullable String volu } /** - * Get volume + * Total trade volume (in base asset) * * @return volume */ @@ -461,7 +461,7 @@ public Ticker24hrResponse1Result quoteVolume(@jakarta.annotation.Nullable String } /** - * Get quoteVolume + * Total trade volume (in quote asset) * * @return quoteVolume */ @@ -480,7 +480,7 @@ public Ticker24hrResponse1Result openTime(@jakarta.annotation.Nullable Long open } /** - * Get openTime + * Start of the ticker interval * * @return openTime */ @@ -499,7 +499,7 @@ public Ticker24hrResponse1Result closeTime(@jakarta.annotation.Nullable Long clo } /** - * Get closeTime + * End of the ticker interval * * @return closeTime */ @@ -518,7 +518,7 @@ public Ticker24hrResponse1Result firstId(@jakarta.annotation.Nullable Long first } /** - * Get firstId + * First tradeId * * @return firstId */ @@ -537,7 +537,7 @@ public Ticker24hrResponse1Result lastId(@jakarta.annotation.Nullable Long lastId } /** - * Get lastId + * Last tradeId * * @return lastId */ @@ -556,7 +556,7 @@ public Ticker24hrResponse1Result count(@jakarta.annotation.Nullable Long count) } /** - * Get count + * Trade count * * @return count */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse2.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse2.java index 250b7e67d..c7c13629c 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse2.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** Ticker24hrResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrResponse2 extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class Ticker24hrResponse2 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public Ticker24hrResponse2() {} @@ -138,12 +138,14 @@ public void setResult( } public Ticker24hrResponse2 rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public Ticker24hrResponse2 addRateLimitsItem(RateLimits rateLimitsItem) { + public Ticker24hrResponse2 addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -158,11 +160,13 @@ public Ticker24hrResponse2 addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -217,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -355,7 +359,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse2ResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse2ResultInner.java index 126cc727e..c5454da0f 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse2ResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse2ResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** Ticker24hrResponse2ResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class Ticker24hrResponse2ResultInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -173,7 +173,7 @@ public Ticker24hrResponse2ResultInner symbol(@jakarta.annotation.Nullable String } /** - * Get symbol + * Symbol Name * * @return symbol */ @@ -272,7 +272,7 @@ public Ticker24hrResponse2ResultInner lastPrice(@jakarta.annotation.Nullable Str } /** - * Get lastPrice + * Closing price of the interval * * @return lastPrice */ @@ -386,7 +386,7 @@ public Ticker24hrResponse2ResultInner openPrice(@jakarta.annotation.Nullable Str } /** - * Get openPrice + * Opening price of the Interval * * @return openPrice */ @@ -405,7 +405,7 @@ public Ticker24hrResponse2ResultInner highPrice(@jakarta.annotation.Nullable Str } /** - * Get highPrice + * Highest price in the interval * * @return highPrice */ @@ -424,7 +424,7 @@ public Ticker24hrResponse2ResultInner lowPrice(@jakarta.annotation.Nullable Stri } /** - * Get lowPrice + * Lowest price in the interval * * @return lowPrice */ @@ -443,7 +443,7 @@ public Ticker24hrResponse2ResultInner volume(@jakarta.annotation.Nullable String } /** - * Get volume + * Total trade volume (in base asset) * * @return volume */ @@ -463,7 +463,7 @@ public Ticker24hrResponse2ResultInner quoteVolume( } /** - * Get quoteVolume + * Total trade volume (in quote asset) * * @return quoteVolume */ @@ -482,7 +482,7 @@ public Ticker24hrResponse2ResultInner openTime(@jakarta.annotation.Nullable Long } /** - * Get openTime + * Start of the ticker interval * * @return openTime */ @@ -501,7 +501,7 @@ public Ticker24hrResponse2ResultInner closeTime(@jakarta.annotation.Nullable Lon } /** - * Get closeTime + * End of the ticker interval * * @return closeTime */ @@ -520,7 +520,7 @@ public Ticker24hrResponse2ResultInner firstId(@jakarta.annotation.Nullable Long } /** - * Get firstId + * First tradeId * * @return firstId */ @@ -539,7 +539,7 @@ public Ticker24hrResponse2ResultInner lastId(@jakarta.annotation.Nullable Long l } /** - * Get lastId + * Last tradeId * * @return lastId */ @@ -558,7 +558,7 @@ public Ticker24hrResponse2ResultInner count(@jakarta.annotation.Nullable Long co } /** - * Get count + * Trade count * * @return count */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookRequest.java index 939e574e7..55d002f96 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,8 +38,14 @@ /** TickerBookRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerBookRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -60,13 +66,32 @@ public class TickerBookRequest extends BaseDTO { public TickerBookRequest() {} + public TickerBookRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public TickerBookRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Query ticker for a single symbol * * @return symbol */ @@ -128,20 +153,22 @@ public boolean equals(Object o) { return false; } TickerBookRequest tickerBookRequest = (TickerBookRequest) o; - return Objects.equals(this.symbol, tickerBookRequest.symbol) + return Objects.equals(this.id, tickerBookRequest.id) + && Objects.equals(this.symbol, tickerBookRequest.symbol) && Objects.equals(this.symbols, tickerBookRequest.symbols) && Objects.equals(this.symbolStatus, tickerBookRequest.symbolStatus); } @Override public int hashCode() { - return Objects.hash(symbol, symbols, symbolStatus); + return Objects.hash(id, symbol, symbols, symbolStatus); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TickerBookRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" symbols: ").append(toIndentedString(symbols)).append("\n"); sb.append(" symbolStatus: ").append(toIndentedString(symbolStatus)).append("\n"); @@ -153,6 +180,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -179,6 +211,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -217,6 +253,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("symbols"); openapiFields.add("symbolStatus"); @@ -255,6 +292,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse.java index f465d638c..858841198 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerBookResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(TickerBookResponse.class.getName()); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse1.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse1.java index 242517746..2949d3df8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse1.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** TickerBookResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerBookResponse1 extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class TickerBookResponse1 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public TickerBookResponse1() {} @@ -129,12 +129,14 @@ public void setResult(@jakarta.annotation.Nullable TickerBookResponse1Result res } public TickerBookResponse1 rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public TickerBookResponse1 addRateLimitsItem(RateLimits rateLimitsItem) { + public TickerBookResponse1 addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -149,11 +151,13 @@ public TickerBookResponse1 addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -208,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -331,7 +335,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse1Result.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse1Result.java index 5c1b39b6b..c2001f903 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse1Result.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse1Result.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TickerBookResponse1Result */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerBookResponse1Result extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -96,7 +96,7 @@ public TickerBookResponse1Result bidPrice(@jakarta.annotation.Nullable String bi } /** - * Get bidPrice + * best bid price. * * @return bidPrice */ @@ -115,7 +115,7 @@ public TickerBookResponse1Result bidQty(@jakarta.annotation.Nullable String bidQ } /** - * Get bidQty + * bid/ask qty. * * @return bidQty */ @@ -134,7 +134,7 @@ public TickerBookResponse1Result askPrice(@jakarta.annotation.Nullable String as } /** - * Get askPrice + * best ask price. * * @return askPrice */ @@ -153,7 +153,7 @@ public TickerBookResponse1Result askQty(@jakarta.annotation.Nullable String askQ } /** - * Get askQty + * bid/ask qty. * * @return askQty */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse2.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse2.java index 70d000ef6..fff71ba7b 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse2.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** TickerBookResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerBookResponse2 extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -59,13 +59,13 @@ public class TickerBookResponse2 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RESULT) @jakarta.annotation.Nullable - private List<@Valid TickerBookResponse1Result> result; + private List<@Valid TickerBookResponse2ResultInner> result; public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public TickerBookResponse2() {} @@ -108,12 +108,12 @@ public void setStatus(@jakarta.annotation.Nullable Long status) { } public TickerBookResponse2 result( - @jakarta.annotation.Nullable List<@Valid TickerBookResponse1Result> result) { + @jakarta.annotation.Nullable List<@Valid TickerBookResponse2ResultInner> result) { this.result = result; return this; } - public TickerBookResponse2 addResultItem(TickerBookResponse1Result resultItem) { + public TickerBookResponse2 addResultItem(TickerBookResponse2ResultInner resultItem) { if (this.result == null) { this.result = new ArrayList<>(); } @@ -128,22 +128,24 @@ public TickerBookResponse2 addResultItem(TickerBookResponse1Result resultItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid TickerBookResponse1Result> getResult() { + public List<@Valid TickerBookResponse2ResultInner> getResult() { return result; } public void setResult( - @jakarta.annotation.Nullable List<@Valid TickerBookResponse1Result> result) { + @jakarta.annotation.Nullable List<@Valid TickerBookResponse2ResultInner> result) { this.result = result; } public TickerBookResponse2 rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public TickerBookResponse2 addRateLimitsItem(RateLimits rateLimitsItem) { + public TickerBookResponse2 addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -158,11 +160,13 @@ public TickerBookResponse2 addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -212,12 +216,12 @@ public String toUrlQueryString() { String statusValueAsString = statusValue.toString(); valMap.put("status", statusValueAsString); } - List<@Valid TickerBookResponse1Result> resultValue = getResult(); + List<@Valid TickerBookResponse2ResultInner> resultValue = getResult(); if (resultValue != null) { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -336,7 +340,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `result` (array) for (int i = 0; i < jsonArrayresult.size(); i++) { - TickerBookResponse1Result.validateJsonElement(jsonArrayresult.get(i)); + TickerBookResponse2ResultInner.validateJsonElement(jsonArrayresult.get(i)); } ; } @@ -355,7 +359,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse2ResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse2ResultInner.java new file mode 100644 index 000000000..584161e9c --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse2ResultInner.java @@ -0,0 +1,426 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** TickerBookResponse2ResultInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class TickerBookResponse2ResultInner extends BaseDTO { + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_BID_PRICE = "bidPrice"; + + @SerializedName(SERIALIZED_NAME_BID_PRICE) + @jakarta.annotation.Nullable + private String bidPrice; + + public static final String SERIALIZED_NAME_BID_QTY = "bidQty"; + + @SerializedName(SERIALIZED_NAME_BID_QTY) + @jakarta.annotation.Nullable + private String bidQty; + + public static final String SERIALIZED_NAME_ASK_PRICE = "askPrice"; + + @SerializedName(SERIALIZED_NAME_ASK_PRICE) + @jakarta.annotation.Nullable + private String askPrice; + + public static final String SERIALIZED_NAME_ASK_QTY = "askQty"; + + @SerializedName(SERIALIZED_NAME_ASK_QTY) + @jakarta.annotation.Nullable + private String askQty; + + public TickerBookResponse2ResultInner() {} + + public TickerBookResponse2ResultInner symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Get symbol + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public TickerBookResponse2ResultInner bidPrice(@jakarta.annotation.Nullable String bidPrice) { + this.bidPrice = bidPrice; + return this; + } + + /** + * best bid price. + * + * @return bidPrice + */ + @jakarta.annotation.Nullable + public String getBidPrice() { + return bidPrice; + } + + public void setBidPrice(@jakarta.annotation.Nullable String bidPrice) { + this.bidPrice = bidPrice; + } + + public TickerBookResponse2ResultInner bidQty(@jakarta.annotation.Nullable String bidQty) { + this.bidQty = bidQty; + return this; + } + + /** + * bid/ask qty. + * + * @return bidQty + */ + @jakarta.annotation.Nullable + public String getBidQty() { + return bidQty; + } + + public void setBidQty(@jakarta.annotation.Nullable String bidQty) { + this.bidQty = bidQty; + } + + public TickerBookResponse2ResultInner askPrice(@jakarta.annotation.Nullable String askPrice) { + this.askPrice = askPrice; + return this; + } + + /** + * best ask price. + * + * @return askPrice + */ + @jakarta.annotation.Nullable + public String getAskPrice() { + return askPrice; + } + + public void setAskPrice(@jakarta.annotation.Nullable String askPrice) { + this.askPrice = askPrice; + } + + public TickerBookResponse2ResultInner askQty(@jakarta.annotation.Nullable String askQty) { + this.askQty = askQty; + return this; + } + + /** + * bid/ask qty. + * + * @return askQty + */ + @jakarta.annotation.Nullable + public String getAskQty() { + return askQty; + } + + public void setAskQty(@jakarta.annotation.Nullable String askQty) { + this.askQty = askQty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TickerBookResponse2ResultInner tickerBookResponse2ResultInner = + (TickerBookResponse2ResultInner) o; + return Objects.equals(this.symbol, tickerBookResponse2ResultInner.symbol) + && Objects.equals(this.bidPrice, tickerBookResponse2ResultInner.bidPrice) + && Objects.equals(this.bidQty, tickerBookResponse2ResultInner.bidQty) + && Objects.equals(this.askPrice, tickerBookResponse2ResultInner.askPrice) + && Objects.equals(this.askQty, tickerBookResponse2ResultInner.askQty); + } + + @Override + public int hashCode() { + return Objects.hash(symbol, bidPrice, bidQty, askPrice, askQty); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TickerBookResponse2ResultInner {\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" bidPrice: ").append(toIndentedString(bidPrice)).append("\n"); + sb.append(" bidQty: ").append(toIndentedString(bidQty)).append("\n"); + sb.append(" askPrice: ").append(toIndentedString(askPrice)).append("\n"); + sb.append(" askQty: ").append(toIndentedString(askQty)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + String bidPriceValue = getBidPrice(); + if (bidPriceValue != null) { + String bidPriceValueAsString = bidPriceValue.toString(); + valMap.put("bidPrice", bidPriceValueAsString); + } + String bidQtyValue = getBidQty(); + if (bidQtyValue != null) { + String bidQtyValueAsString = bidQtyValue.toString(); + valMap.put("bidQty", bidQtyValueAsString); + } + String askPriceValue = getAskPrice(); + if (askPriceValue != null) { + String askPriceValueAsString = askPriceValue.toString(); + valMap.put("askPrice", askPriceValueAsString); + } + String askQtyValue = getAskQty(); + if (askQtyValue != null) { + String askQtyValueAsString = askQtyValue.toString(); + valMap.put("askQty", askQtyValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + Object bidPriceValue = getBidPrice(); + if (bidPriceValue != null) { + valMap.put("bidPrice", bidPriceValue); + } + Object bidQtyValue = getBidQty(); + if (bidQtyValue != null) { + valMap.put("bidQty", bidQtyValue); + } + Object askPriceValue = getAskPrice(); + if (askPriceValue != null) { + valMap.put("askPrice", askPriceValue); + } + Object askQtyValue = getAskQty(); + if (askQtyValue != null) { + valMap.put("askQty", askQtyValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("symbol"); + openapiFields.add("bidPrice"); + openapiFields.add("bidQty"); + openapiFields.add("askPrice"); + openapiFields.add("askQty"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * TickerBookResponse2ResultInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TickerBookResponse2ResultInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in TickerBookResponse2ResultInner is not" + + " found in the empty JSON string", + TickerBookResponse2ResultInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TickerBookResponse2ResultInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `TickerBookResponse2ResultInner` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + if ((jsonObj.get("bidPrice") != null && !jsonObj.get("bidPrice").isJsonNull()) + && !jsonObj.get("bidPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `bidPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("bidPrice").toString())); + } + if ((jsonObj.get("bidQty") != null && !jsonObj.get("bidQty").isJsonNull()) + && !jsonObj.get("bidQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `bidQty` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("bidQty").toString())); + } + if ((jsonObj.get("askPrice") != null && !jsonObj.get("askPrice").isJsonNull()) + && !jsonObj.get("askPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `askPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("askPrice").toString())); + } + if ((jsonObj.get("askQty") != null && !jsonObj.get("askQty").isJsonNull()) + && !jsonObj.get("askQty").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `askQty` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("askQty").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TickerBookResponse2ResultInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TickerBookResponse2ResultInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(TickerBookResponse2ResultInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, TickerBookResponse2ResultInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TickerBookResponse2ResultInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of TickerBookResponse2ResultInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of TickerBookResponse2ResultInner + * @throws IOException if the JSON string is invalid with respect to + * TickerBookResponse2ResultInner + */ + public static TickerBookResponse2ResultInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TickerBookResponse2ResultInner.class); + } + + /** + * Convert an instance of TickerBookResponse2ResultInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceRequest.java index db167947a..aadecaccf 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,8 +38,14 @@ /** TickerPriceRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerPriceRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -60,13 +66,32 @@ public class TickerPriceRequest extends BaseDTO { public TickerPriceRequest() {} + public TickerPriceRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public TickerPriceRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Query price for a single symbol * * @return symbol */ @@ -128,20 +153,22 @@ public boolean equals(Object o) { return false; } TickerPriceRequest tickerPriceRequest = (TickerPriceRequest) o; - return Objects.equals(this.symbol, tickerPriceRequest.symbol) + return Objects.equals(this.id, tickerPriceRequest.id) + && Objects.equals(this.symbol, tickerPriceRequest.symbol) && Objects.equals(this.symbols, tickerPriceRequest.symbols) && Objects.equals(this.symbolStatus, tickerPriceRequest.symbolStatus); } @Override public int hashCode() { - return Objects.hash(symbol, symbols, symbolStatus); + return Objects.hash(id, symbol, symbols, symbolStatus); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TickerPriceRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" symbols: ").append(toIndentedString(symbols)).append("\n"); sb.append(" symbolStatus: ").append(toIndentedString(symbolStatus)).append("\n"); @@ -153,6 +180,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -179,6 +211,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -217,6 +253,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("symbols"); openapiFields.add("symbolStatus"); @@ -255,6 +292,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse.java index 583fffead..22fe1ef4d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerPriceResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(TickerPriceResponse.class.getName()); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse1.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse1.java index 2f94b3f19..900e6e402 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse1.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** TickerPriceResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerPriceResponse1 extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class TickerPriceResponse1 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public TickerPriceResponse1() {} @@ -129,12 +129,14 @@ public void setResult(@jakarta.annotation.Nullable TickerPriceResponse1Result re } public TickerPriceResponse1 rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public TickerPriceResponse1 addRateLimitsItem(RateLimits rateLimitsItem) { + public TickerPriceResponse1 addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -149,11 +151,13 @@ public TickerPriceResponse1 addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -208,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -331,7 +335,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse1Result.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse1Result.java index 461a8a92c..ca336d51d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse1Result.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse1Result.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TickerPriceResponse1Result */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerPriceResponse1Result extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse2.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse2.java index 96adc69a7..c4a26ad41 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse2.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** TickerPriceResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerPriceResponse2 extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class TickerPriceResponse2 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public TickerPriceResponse2() {} @@ -138,12 +138,14 @@ public void setResult( } public TickerPriceResponse2 rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public TickerPriceResponse2 addRateLimitsItem(RateLimits rateLimitsItem) { + public TickerPriceResponse2 addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -158,11 +160,13 @@ public TickerPriceResponse2 addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -217,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -355,7 +359,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse2ResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse2ResultInner.java index 62f0d24ac..146110067 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse2ResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse2ResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TickerPriceResponse2ResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerPriceResponse2ResultInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerRequest.java index d32dacf64..7b4279740 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,8 +38,14 @@ /** TickerRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -52,11 +58,11 @@ public class TickerRequest extends BaseDTO { @jakarta.annotation.Nullable private Symbols symbols; - public static final String SERIALIZED_NAME_TICKER_TYPE = "tickerType"; + public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TICKER_TYPE) + @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nullable - private TickerType tickerType; + private TickerType type; public static final String SERIALIZED_NAME_WINDOW_SIZE = "windowSize"; @@ -72,13 +78,32 @@ public class TickerRequest extends BaseDTO { public TickerRequest() {} + public TickerRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public TickerRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Query ticker of a single symbol * * @return symbol */ @@ -111,24 +136,24 @@ public void setSymbols(@jakarta.annotation.Nullable Symbols symbols) { this.symbols = symbols; } - public TickerRequest tickerType(@jakarta.annotation.Nullable TickerType tickerType) { - this.tickerType = tickerType; + public TickerRequest type(@jakarta.annotation.Nullable TickerType type) { + this.type = type; return this; } /** - * Get tickerType + * Get type * - * @return tickerType + * @return type */ @jakarta.annotation.Nullable @Valid - public TickerType getTickerType() { - return tickerType; + public TickerType getType() { + return type; } - public void setTickerType(@jakarta.annotation.Nullable TickerType tickerType) { - this.tickerType = tickerType; + public void setType(@jakarta.annotation.Nullable TickerType type) { + this.type = type; } public TickerRequest windowSize(@jakarta.annotation.Nullable WindowSize windowSize) { @@ -180,25 +205,27 @@ public boolean equals(Object o) { return false; } TickerRequest tickerRequest = (TickerRequest) o; - return Objects.equals(this.symbol, tickerRequest.symbol) + return Objects.equals(this.id, tickerRequest.id) + && Objects.equals(this.symbol, tickerRequest.symbol) && Objects.equals(this.symbols, tickerRequest.symbols) - && Objects.equals(this.tickerType, tickerRequest.tickerType) + && Objects.equals(this.type, tickerRequest.type) && Objects.equals(this.windowSize, tickerRequest.windowSize) && Objects.equals(this.symbolStatus, tickerRequest.symbolStatus); } @Override public int hashCode() { - return Objects.hash(symbol, symbols, tickerType, windowSize, symbolStatus); + return Objects.hash(id, symbol, symbols, type, windowSize, symbolStatus); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TickerRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" symbols: ").append(toIndentedString(symbols)).append("\n"); - sb.append(" tickerType: ").append(toIndentedString(tickerType)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" windowSize: ").append(toIndentedString(windowSize)).append("\n"); sb.append(" symbolStatus: ").append(toIndentedString(symbolStatus)).append("\n"); sb.append("}"); @@ -209,6 +236,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -219,10 +251,10 @@ public String toUrlQueryString() { String symbolsValueAsString = JSON.getGson().toJson(symbolsValue); valMap.put("symbols", symbolsValueAsString); } - TickerType tickerTypeValue = getTickerType(); - if (tickerTypeValue != null) { - String tickerTypeValueAsString = tickerTypeValue.toString(); - valMap.put("tickerType", tickerTypeValueAsString); + TickerType typeValue = getType(); + if (typeValue != null) { + String typeValueAsString = typeValue.toString(); + valMap.put("type", typeValueAsString); } WindowSize windowSizeValue = getWindowSize(); if (windowSizeValue != null) { @@ -245,6 +277,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -253,9 +289,9 @@ public Map toMap() { if (symbolsValue != null) { valMap.put("symbols", symbolsValue); } - Object tickerTypeValue = getTickerType(); - if (tickerTypeValue != null) { - valMap.put("tickerType", tickerTypeValue); + Object typeValue = getType(); + if (typeValue != null) { + valMap.put("type", typeValue); } Object windowSizeValue = getWindowSize(); if (windowSizeValue != null) { @@ -291,9 +327,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("symbols"); - openapiFields.add("tickerType"); + openapiFields.add("type"); openapiFields.add("windowSize"); openapiFields.add("symbolStatus"); @@ -331,6 +368,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -339,9 +384,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("symbol").toString())); } - // validate the optional field `tickerType` - if (jsonObj.get("tickerType") != null && !jsonObj.get("tickerType").isJsonNull()) { - TickerType.validateJsonElement(jsonObj.get("tickerType")); + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TickerType.validateJsonElement(jsonObj.get("type")); } // validate the optional field `windowSize` if (jsonObj.get("windowSize") != null && !jsonObj.get("windowSize").isJsonNull()) { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse.java index 4dfcca01d..0ed926621 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -32,7 +32,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(TickerResponse.class.getName()); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1.java index 256deb129..8e9d357e6 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** TickerResponse1 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerResponse1 extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class TickerResponse1 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public TickerResponse1() {} @@ -128,12 +128,14 @@ public void setResult(@jakarta.annotation.Nullable TickerResponse1Result result) } public TickerResponse1 rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public TickerResponse1 addRateLimitsItem(RateLimits rateLimitsItem) { + public TickerResponse1 addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -148,11 +150,13 @@ public TickerResponse1 addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -207,7 +211,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -330,7 +334,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1Result.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1Result.java index 01aefe54d..dbc11d95b 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1Result.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1Result.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TickerResponse1Result */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerResponse1Result extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -156,7 +156,7 @@ public TickerResponse1Result priceChange(@jakarta.annotation.Nullable String pri } /** - * Get priceChange + * Absolute price change * * @return priceChange */ @@ -176,7 +176,7 @@ public TickerResponse1Result priceChangePercent( } /** - * Get priceChangePercent + * Relative price change in percent * * @return priceChangePercent */ @@ -196,7 +196,7 @@ public TickerResponse1Result weightedAvgPrice( } /** - * Get weightedAvgPrice + * QuoteVolume / Volume * * @return weightedAvgPrice */ @@ -310,7 +310,7 @@ public TickerResponse1Result quoteVolume(@jakarta.annotation.Nullable String quo } /** - * Get quoteVolume + * Sum of (price * volume) for all trades * * @return quoteVolume */ @@ -329,7 +329,7 @@ public TickerResponse1Result openTime(@jakarta.annotation.Nullable Long openTime } /** - * Get openTime + * Open time for ticker window * * @return openTime */ @@ -348,7 +348,7 @@ public TickerResponse1Result closeTime(@jakarta.annotation.Nullable Long closeTi } /** - * Get closeTime + * Close time for ticker window * * @return closeTime */ @@ -367,7 +367,7 @@ public TickerResponse1Result firstId(@jakarta.annotation.Nullable Long firstId) } /** - * Get firstId + * Trade IDs * * @return firstId */ @@ -405,7 +405,7 @@ public TickerResponse1Result count(@jakarta.annotation.Nullable Long count) { } /** - * Get count + * Number of trades in the interval * * @return count */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse2.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse2.java index 779ee723a..05e2cf7ee 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse2.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse2.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** TickerResponse2 */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerResponse2 extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class TickerResponse2 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public TickerResponse2() {} @@ -138,12 +138,14 @@ public void setResult( } public TickerResponse2 rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public TickerResponse2 addRateLimitsItem(RateLimits rateLimitsItem) { + public TickerResponse2 addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -158,11 +160,13 @@ public TickerResponse2 addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -217,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -355,7 +359,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse2ResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse2ResultInner.java index 8814b47fa..d12f7f344 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse2ResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse2ResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TickerResponse2ResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerResponse2ResultInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -156,7 +156,7 @@ public TickerResponse2ResultInner priceChange(@jakarta.annotation.Nullable Strin } /** - * Get priceChange + * Absolute price change * * @return priceChange */ @@ -176,7 +176,7 @@ public TickerResponse2ResultInner priceChangePercent( } /** - * Get priceChangePercent + * Relative price change in percent * * @return priceChangePercent */ @@ -196,7 +196,7 @@ public TickerResponse2ResultInner weightedAvgPrice( } /** - * Get weightedAvgPrice + * QuoteVolume / Volume * * @return weightedAvgPrice */ @@ -310,7 +310,7 @@ public TickerResponse2ResultInner quoteVolume(@jakarta.annotation.Nullable Strin } /** - * Get quoteVolume + * Sum of (price * volume) for all trades * * @return quoteVolume */ @@ -329,7 +329,7 @@ public TickerResponse2ResultInner openTime(@jakarta.annotation.Nullable Long ope } /** - * Get openTime + * Open time for ticker window * * @return openTime */ @@ -348,7 +348,7 @@ public TickerResponse2ResultInner closeTime(@jakarta.annotation.Nullable Long cl } /** - * Get closeTime + * Close time for ticker window * * @return closeTime */ @@ -367,7 +367,7 @@ public TickerResponse2ResultInner firstId(@jakarta.annotation.Nullable Long firs } /** - * Get firstId + * Trade IDs * * @return firstId */ @@ -405,7 +405,7 @@ public TickerResponse2ResultInner count(@jakarta.annotation.Nullable Long count) } /** - * Get count + * Number of trades in the interval * * @return count */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayRequest.java index 70715c894..00419e989 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,8 +38,14 @@ /** TickerTradingDayRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerTradingDayRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -58,11 +64,11 @@ public class TickerTradingDayRequest extends BaseDTO { @jakarta.annotation.Nullable private String timeZone; - public static final String SERIALIZED_NAME_TICKER_TYPE = "tickerType"; + public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TICKER_TYPE) + @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nullable - private TickerType tickerType; + private TickerType type; public static final String SERIALIZED_NAME_SYMBOL_STATUS = "symbolStatus"; @@ -72,6 +78,25 @@ public class TickerTradingDayRequest extends BaseDTO { public TickerTradingDayRequest() {} + public TickerTradingDayRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public TickerTradingDayRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; @@ -117,7 +142,7 @@ public TickerTradingDayRequest timeZone(@jakarta.annotation.Nullable String time } /** - * Get timeZone + * Default: 0 (UTC) * * @return timeZone */ @@ -130,24 +155,24 @@ public void setTimeZone(@jakarta.annotation.Nullable String timeZone) { this.timeZone = timeZone; } - public TickerTradingDayRequest tickerType(@jakarta.annotation.Nullable TickerType tickerType) { - this.tickerType = tickerType; + public TickerTradingDayRequest type(@jakarta.annotation.Nullable TickerType type) { + this.type = type; return this; } /** - * Get tickerType + * Get type * - * @return tickerType + * @return type */ @jakarta.annotation.Nullable @Valid - public TickerType getTickerType() { - return tickerType; + public TickerType getType() { + return type; } - public void setTickerType(@jakarta.annotation.Nullable TickerType tickerType) { - this.tickerType = tickerType; + public void setType(@jakarta.annotation.Nullable TickerType type) { + this.type = type; } public TickerTradingDayRequest symbolStatus( @@ -180,26 +205,28 @@ public boolean equals(Object o) { return false; } TickerTradingDayRequest tickerTradingDayRequest = (TickerTradingDayRequest) o; - return Objects.equals(this.symbol, tickerTradingDayRequest.symbol) + return Objects.equals(this.id, tickerTradingDayRequest.id) + && Objects.equals(this.symbol, tickerTradingDayRequest.symbol) && Objects.equals(this.symbols, tickerTradingDayRequest.symbols) && Objects.equals(this.timeZone, tickerTradingDayRequest.timeZone) - && Objects.equals(this.tickerType, tickerTradingDayRequest.tickerType) + && Objects.equals(this.type, tickerTradingDayRequest.type) && Objects.equals(this.symbolStatus, tickerTradingDayRequest.symbolStatus); } @Override public int hashCode() { - return Objects.hash(symbol, symbols, timeZone, tickerType, symbolStatus); + return Objects.hash(id, symbol, symbols, timeZone, type, symbolStatus); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TickerTradingDayRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" symbols: ").append(toIndentedString(symbols)).append("\n"); sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); - sb.append(" tickerType: ").append(toIndentedString(tickerType)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" symbolStatus: ").append(toIndentedString(symbolStatus)).append("\n"); sb.append("}"); return sb.toString(); @@ -209,6 +236,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -224,10 +256,10 @@ public String toUrlQueryString() { String timeZoneValueAsString = timeZoneValue.toString(); valMap.put("timeZone", timeZoneValueAsString); } - TickerType tickerTypeValue = getTickerType(); - if (tickerTypeValue != null) { - String tickerTypeValueAsString = tickerTypeValue.toString(); - valMap.put("tickerType", tickerTypeValueAsString); + TickerType typeValue = getType(); + if (typeValue != null) { + String typeValueAsString = typeValue.toString(); + valMap.put("type", typeValueAsString); } SymbolStatus symbolStatusValue = getSymbolStatus(); if (symbolStatusValue != null) { @@ -245,6 +277,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -257,9 +293,9 @@ public Map toMap() { if (timeZoneValue != null) { valMap.put("timeZone", timeZoneValue); } - Object tickerTypeValue = getTickerType(); - if (tickerTypeValue != null) { - valMap.put("tickerType", tickerTypeValue); + Object typeValue = getType(); + if (typeValue != null) { + valMap.put("type", typeValue); } Object symbolStatusValue = getSymbolStatus(); if (symbolStatusValue != null) { @@ -291,10 +327,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("symbols"); openapiFields.add("timeZone"); - openapiFields.add("tickerType"); + openapiFields.add("type"); openapiFields.add("symbolStatus"); // a set of required properties/fields (JSON key names) @@ -331,6 +368,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -347,9 +392,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("timeZone").toString())); } - // validate the optional field `tickerType` - if (jsonObj.get("tickerType") != null && !jsonObj.get("tickerType").isJsonNull()) { - TickerType.validateJsonElement(jsonObj.get("tickerType")); + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TickerType.validateJsonElement(jsonObj.get("type")); } // validate the optional field `symbolStatus` if (jsonObj.get("symbolStatus") != null && !jsonObj.get("symbolStatus").isJsonNull()) { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse.java index 63554ab3a..2c2918528 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** TickerTradingDayResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerTradingDayResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class TickerTradingDayResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public TickerTradingDayResponse() {} @@ -138,12 +138,14 @@ public void setResult( } public TickerTradingDayResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public TickerTradingDayResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public TickerTradingDayResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -158,11 +160,13 @@ public TickerTradingDayResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -217,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -355,7 +359,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponseResultInner.java index 7e9d07f02..ec8c57051 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponseResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TickerTradingDayResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerTradingDayResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -157,7 +157,7 @@ public TickerTradingDayResponseResultInner priceChange( } /** - * Get priceChange + * Absolute price change * * @return priceChange */ @@ -177,7 +177,7 @@ public TickerTradingDayResponseResultInner priceChangePercent( } /** - * Get priceChangePercent + * Relative price change in percent * * @return priceChangePercent */ @@ -197,7 +197,7 @@ public TickerTradingDayResponseResultInner weightedAvgPrice( } /** - * Get weightedAvgPrice + * quoteVolume / volume * * @return weightedAvgPrice */ @@ -296,7 +296,7 @@ public TickerTradingDayResponseResultInner volume(@jakarta.annotation.Nullable S } /** - * Get volume + * Volume in base asset * * @return volume */ @@ -316,7 +316,7 @@ public TickerTradingDayResponseResultInner quoteVolume( } /** - * Get quoteVolume + * Volume in quote asset * * @return quoteVolume */ @@ -375,7 +375,7 @@ public TickerTradingDayResponseResultInner firstId(@jakarta.annotation.Nullable } /** - * Get firstId + * Trade ID of the first trade in the interval * * @return firstId */ @@ -394,7 +394,7 @@ public TickerTradingDayResponseResultInner lastId(@jakarta.annotation.Nullable L } /** - * Get lastId + * Trade ID of the last trade in the interval * * @return lastId */ @@ -413,7 +413,7 @@ public TickerTradingDayResponseResultInner count(@jakarta.annotation.Nullable Lo } /** - * Get count + * Number of trades in the interval * * @return count */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerType.java index f9378e2f3..31d2e0b1b 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets tickerType */ +/** Ticker type. Supported values: FULL (default) or MINI */ @JsonAdapter(TickerType.Adapter.class) public enum TickerType { FULL("FULL"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeInForce.java index c4867cb2d..73162c7e5 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,16 +21,14 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets timeInForce */ +/** Please see [Enums](/products/spot/enums#timeinforce) for supported values. */ @JsonAdapter(TimeInForce.Adapter.class) public enum TimeInForce { GTC("GTC"), IOC("IOC"), - FOK("FOK"), - - NON_REPRESENTABLE("NON_REPRESENTABLE"); + FOK("FOK"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeResponse.java index 3cfaa64fb..02b9b374d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** TimeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TimeResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class TimeResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public TimeResponse() {} @@ -128,12 +128,13 @@ public void setResult(@jakarta.annotation.Nullable TimeResponseResult result) { } public TimeResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public TimeResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public TimeResponse addRateLimitsItem(AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -148,11 +149,13 @@ public TimeResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -207,7 +210,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -330,7 +333,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeResponseResult.java index c6c29f47d..93ae70831 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeResponseResult.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TimeResponseResult */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TimeResponseResult extends BaseDTO { public static final String SERIALIZED_NAME_SERVER_TIME = "serverTime"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesAggregateRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesAggregateRequest.java index 5159ef533..dd8e6cb62 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesAggregateRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesAggregateRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,8 +37,14 @@ /** TradesAggregateRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradesAggregateRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -67,10 +73,29 @@ public class TradesAggregateRequest extends BaseDTO { @SerializedName(SERIALIZED_NAME_LIMIT) @jakarta.annotation.Nullable - private Long limit; + private Integer limit; public TradesAggregateRequest() {} + public TradesAggregateRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public TradesAggregateRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -97,7 +122,7 @@ public TradesAggregateRequest fromId(@jakarta.annotation.Nullable Long fromId) { } /** - * Get fromId + * Aggregate trade ID to begin at * * @return fromId */ @@ -116,7 +141,7 @@ public TradesAggregateRequest startTime(@jakarta.annotation.Nullable Long startT } /** - * Get startTime + * Timestamp in ms to get aggregate trades from INCLUSIVE. * * @return startTime */ @@ -135,7 +160,7 @@ public TradesAggregateRequest endTime(@jakarta.annotation.Nullable Long endTime) } /** - * Get endTime + * Timestamp in ms to get aggregate trades until INCLUSIVE. * * @return endTime */ @@ -148,22 +173,23 @@ public void setEndTime(@jakarta.annotation.Nullable Long endTime) { this.endTime = endTime; } - public TradesAggregateRequest limit(@jakarta.annotation.Nullable Long limit) { + public TradesAggregateRequest limit(@jakarta.annotation.Nullable Integer limit) { this.limit = limit; return this; } /** - * Get limit + * Get limit maximum: 1000 * * @return limit */ @jakarta.annotation.Nullable - public Long getLimit() { + @Max(1000) + public Integer getLimit() { return limit; } - public void setLimit(@jakarta.annotation.Nullable Long limit) { + public void setLimit(@jakarta.annotation.Nullable Integer limit) { this.limit = limit; } @@ -176,7 +202,8 @@ public boolean equals(Object o) { return false; } TradesAggregateRequest tradesAggregateRequest = (TradesAggregateRequest) o; - return Objects.equals(this.symbol, tradesAggregateRequest.symbol) + return Objects.equals(this.id, tradesAggregateRequest.id) + && Objects.equals(this.symbol, tradesAggregateRequest.symbol) && Objects.equals(this.fromId, tradesAggregateRequest.fromId) && Objects.equals(this.startTime, tradesAggregateRequest.startTime) && Objects.equals(this.endTime, tradesAggregateRequest.endTime) @@ -185,13 +212,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(symbol, fromId, startTime, endTime, limit); + return Objects.hash(id, symbol, fromId, startTime, endTime, limit); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TradesAggregateRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" fromId: ").append(toIndentedString(fromId)).append("\n"); sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); @@ -205,6 +233,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -225,7 +258,7 @@ public String toUrlQueryString() { String endTimeValueAsString = endTimeValue.toString(); valMap.put("endTime", endTimeValueAsString); } - Long limitValue = getLimit(); + Integer limitValue = getLimit(); if (limitValue != null) { String limitValueAsString = limitValue.toString(); valMap.put("limit", limitValueAsString); @@ -241,6 +274,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -287,6 +324,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("fromId"); openapiFields.add("startTime"); @@ -338,6 +376,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesAggregateResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesAggregateResponse.java index 4e9086b10..7398f8948 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesAggregateResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesAggregateResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** TradesAggregateResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradesAggregateResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class TradesAggregateResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public TradesAggregateResponse() {} @@ -138,12 +138,14 @@ public void setResult( } public TradesAggregateResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public TradesAggregateResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public TradesAggregateResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -158,11 +160,13 @@ public TradesAggregateResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -217,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -355,7 +359,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesAggregateResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesAggregateResponseResultInner.java index b2a175057..b7249865d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesAggregateResponseResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesAggregateResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TradesAggregateResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradesAggregateResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; @@ -96,7 +96,7 @@ public TradesAggregateResponseResultInner aLowerCase( } /** - * Get aLowerCase + * Aggregate tradeId * * @return aLowerCase */ @@ -116,7 +116,7 @@ public TradesAggregateResponseResultInner pLowerCase( } /** - * Get pLowerCase + * Price * * @return pLowerCase */ @@ -136,7 +136,7 @@ public TradesAggregateResponseResultInner qLowerCase( } /** - * Get qLowerCase + * Quantity * * @return qLowerCase */ @@ -156,7 +156,7 @@ public TradesAggregateResponseResultInner fLowerCase( } /** - * Get fLowerCase + * First tradeId * * @return fLowerCase */ @@ -176,7 +176,7 @@ public TradesAggregateResponseResultInner lLowerCase( } /** - * Get lLowerCase + * Last tradeId * * @return lLowerCase */ @@ -195,7 +195,7 @@ public TradesAggregateResponseResultInner T(@jakarta.annotation.Nullable Long T) } /** - * Get T + * Timestamp * * @return T */ @@ -215,7 +215,7 @@ public TradesAggregateResponseResultInner mLowerCase( } /** - * Get mLowerCase + * Was the buyer the maker? * * @return mLowerCase */ @@ -234,7 +234,7 @@ public TradesAggregateResponseResultInner M(@jakarta.annotation.Nullable Boolean } /** - * Get M + * Was the trade the best price match? * * @return M */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalRequest.java index 0aad816d5..1f80981fe 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,8 +37,14 @@ /** TradesHistoricalRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradesHistoricalRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -49,7 +55,7 @@ public class TradesHistoricalRequest extends BaseDTO { @SerializedName(SERIALIZED_NAME_FROM_ID) @jakarta.annotation.Nullable - private Integer fromId; + private Long fromId; public static final String SERIALIZED_NAME_LIMIT = "limit"; @@ -59,6 +65,25 @@ public class TradesHistoricalRequest extends BaseDTO { public TradesHistoricalRequest() {} + public TradesHistoricalRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public TradesHistoricalRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -79,22 +104,22 @@ public void setSymbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; } - public TradesHistoricalRequest fromId(@jakarta.annotation.Nullable Integer fromId) { + public TradesHistoricalRequest fromId(@jakarta.annotation.Nullable Long fromId) { this.fromId = fromId; return this; } /** - * Get fromId + * Trade ID to begin at * * @return fromId */ @jakarta.annotation.Nullable - public Integer getFromId() { + public Long getFromId() { return fromId; } - public void setFromId(@jakarta.annotation.Nullable Integer fromId) { + public void setFromId(@jakarta.annotation.Nullable Long fromId) { this.fromId = fromId; } @@ -104,11 +129,12 @@ public TradesHistoricalRequest limit(@jakarta.annotation.Nullable Integer limit) } /** - * Get limit + * Get limit maximum: 1000 * * @return limit */ @jakarta.annotation.Nullable + @Max(1000) public Integer getLimit() { return limit; } @@ -126,20 +152,22 @@ public boolean equals(Object o) { return false; } TradesHistoricalRequest tradesHistoricalRequest = (TradesHistoricalRequest) o; - return Objects.equals(this.symbol, tradesHistoricalRequest.symbol) + return Objects.equals(this.id, tradesHistoricalRequest.id) + && Objects.equals(this.symbol, tradesHistoricalRequest.symbol) && Objects.equals(this.fromId, tradesHistoricalRequest.fromId) && Objects.equals(this.limit, tradesHistoricalRequest.limit); } @Override public int hashCode() { - return Objects.hash(symbol, fromId, limit); + return Objects.hash(id, symbol, fromId, limit); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TradesHistoricalRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" fromId: ").append(toIndentedString(fromId)).append("\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); @@ -151,12 +179,17 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); valMap.put("symbol", symbolValueAsString); } - Integer fromIdValue = getFromId(); + Long fromIdValue = getFromId(); if (fromIdValue != null) { String fromIdValueAsString = fromIdValue.toString(); valMap.put("fromId", fromIdValueAsString); @@ -177,6 +210,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -215,6 +252,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("fromId"); openapiFields.add("limit"); @@ -264,6 +302,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalResponse.java index 18c88af21..83c62d174 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** TradesHistoricalResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradesHistoricalResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class TradesHistoricalResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public TradesHistoricalResponse() {} @@ -138,12 +138,14 @@ public void setResult( } public TradesHistoricalResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public TradesHistoricalResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public TradesHistoricalResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -158,11 +160,13 @@ public TradesHistoricalResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -217,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -355,7 +359,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalResponseResultInner.java index 06fe39f2d..652b33149 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalResponseResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TradesHistoricalResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradesHistoricalResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesRecentRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesRecentRequest.java index 744869c78..ffd86d2f7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesRecentRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesRecentRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,8 +37,14 @@ /** TradesRecentRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradesRecentRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -53,6 +59,25 @@ public class TradesRecentRequest extends BaseDTO { public TradesRecentRequest() {} + public TradesRecentRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public TradesRecentRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -79,11 +104,12 @@ public TradesRecentRequest limit(@jakarta.annotation.Nullable Integer limit) { } /** - * Get limit + * Get limit maximum: 1000 * * @return limit */ @jakarta.annotation.Nullable + @Max(1000) public Integer getLimit() { return limit; } @@ -101,19 +127,21 @@ public boolean equals(Object o) { return false; } TradesRecentRequest tradesRecentRequest = (TradesRecentRequest) o; - return Objects.equals(this.symbol, tradesRecentRequest.symbol) + return Objects.equals(this.id, tradesRecentRequest.id) + && Objects.equals(this.symbol, tradesRecentRequest.symbol) && Objects.equals(this.limit, tradesRecentRequest.limit); } @Override public int hashCode() { - return Objects.hash(symbol, limit); + return Objects.hash(id, symbol, limit); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TradesRecentRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); sb.append("}"); @@ -124,6 +152,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -145,6 +178,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -179,6 +216,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("limit"); @@ -227,6 +265,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesRecentResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesRecentResponse.java index 4ddbe64c5..5c49894e1 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesRecentResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesRecentResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** TradesRecentResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradesRecentResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -65,7 +65,7 @@ public class TradesRecentResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public TradesRecentResponse() {} @@ -138,12 +138,14 @@ public void setResult( } public TradesRecentResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public TradesRecentResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public TradesRecentResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -158,11 +160,13 @@ public TradesRecentResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -217,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -355,7 +359,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesRecentResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesRecentResponseResultInner.java index 7657857b2..7e072616c 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesRecentResponseResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesRecentResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TradesRecentResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradesRecentResponseResultInner extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TrailingDeltaFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TrailingDeltaFilter.java index 694f3933e..438f15a40 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TrailingDeltaFilter.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TrailingDeltaFilter.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TrailingDeltaFilter */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TrailingDeltaFilter extends BaseDTO { public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UiKlinesItem.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UiKlinesItem.java deleted file mode 100644 index ff462e694..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UiKlinesItem.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.api.model; - -import com.binance.connector.client.spot.websocket.api.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** UiKlinesItem */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UiKlinesItem extends ArrayList { - public UiKlinesItem() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UiKlinesItem {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UiKlinesItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UiKlinesItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UiKlinesItem is not found in the empty" - + " JSON string", - UiKlinesItem.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UiKlinesItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UiKlinesItem` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UiKlinesItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UiKlinesItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UiKlinesItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UiKlinesItem value) throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public UiKlinesItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UiKlinesItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of UiKlinesItem - * @throws IOException if the JSON string is invalid with respect to UiKlinesItem - */ - public static UiKlinesItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UiKlinesItem.class); - } - - /** - * Convert an instance of UiKlinesItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UiKlinesRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UiKlinesRequest.java index 42ba64947..c20315d78 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UiKlinesRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UiKlinesRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,8 +38,14 @@ /** UiKlinesRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UiKlinesRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -78,6 +84,25 @@ public class UiKlinesRequest extends BaseDTO { public UiKlinesRequest() {} + public UiKlinesRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public UiKlinesRequest symbol(@jakarta.annotation.Nonnull String symbol) { this.symbol = symbol; return this; @@ -163,7 +188,7 @@ public UiKlinesRequest timeZone(@jakarta.annotation.Nullable String timeZone) { } /** - * Get timeZone + * Default: 0 (UTC) * * @return timeZone */ @@ -182,11 +207,12 @@ public UiKlinesRequest limit(@jakarta.annotation.Nullable Integer limit) { } /** - * Get limit + * Get limit maximum: 1000 * * @return limit */ @jakarta.annotation.Nullable + @Max(1000) public Integer getLimit() { return limit; } @@ -204,7 +230,8 @@ public boolean equals(Object o) { return false; } UiKlinesRequest uiKlinesRequest = (UiKlinesRequest) o; - return Objects.equals(this.symbol, uiKlinesRequest.symbol) + return Objects.equals(this.id, uiKlinesRequest.id) + && Objects.equals(this.symbol, uiKlinesRequest.symbol) && Objects.equals(this.interval, uiKlinesRequest.interval) && Objects.equals(this.startTime, uiKlinesRequest.startTime) && Objects.equals(this.endTime, uiKlinesRequest.endTime) @@ -214,13 +241,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(symbol, interval, startTime, endTime, timeZone, limit); + return Objects.hash(id, symbol, interval, startTime, endTime, timeZone, limit); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UiKlinesRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); @@ -235,6 +263,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -276,6 +309,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -326,6 +363,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("interval"); openapiFields.add("startTime"); @@ -379,6 +417,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if (!jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UiKlinesResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UiKlinesResponse.java index 0ef303466..36c55dfac 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UiKlinesResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UiKlinesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -41,7 +41,7 @@ /** UiKlinesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UiKlinesResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -59,13 +59,13 @@ public class UiKlinesResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RESULT) @jakarta.annotation.Nullable - private List result; + private List> result; public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid RateLimits> rateLimits; + private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; public UiKlinesResponse() {} @@ -107,12 +107,13 @@ public void setStatus(@jakarta.annotation.Nullable Long status) { this.status = status; } - public UiKlinesResponse result(@jakarta.annotation.Nullable List result) { + public UiKlinesResponse result( + @jakarta.annotation.Nullable List> result) { this.result = result; return this; } - public UiKlinesResponse addResultItem(UiKlinesItem resultItem) { + public UiKlinesResponse addResultItem(List resultItem) { if (this.result == null) { this.result = new ArrayList<>(); } @@ -127,21 +128,24 @@ public UiKlinesResponse addResultItem(UiKlinesItem resultItem) { */ @jakarta.annotation.Nullable @Valid - public List getResult() { + public List> getResult() { return result; } - public void setResult(@jakarta.annotation.Nullable List result) { + public void setResult( + @jakarta.annotation.Nullable List> result) { this.result = result; } public UiKlinesResponse rateLimits( - @jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public UiKlinesResponse addRateLimitsItem(RateLimits rateLimitsItem) { + public UiKlinesResponse addRateLimitsItem( + AccountCommissionResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -156,11 +160,13 @@ public UiKlinesResponse addRateLimitsItem(RateLimits rateLimitsItem) { */ @jakarta.annotation.Nullable @Valid - public List<@Valid RateLimits> getRateLimits() { + public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { return rateLimits; } - public void setRateLimits(@jakarta.annotation.Nullable List<@Valid RateLimits> rateLimits) { + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -210,12 +216,12 @@ public String toUrlQueryString() { String statusValueAsString = statusValue.toString(); valMap.put("status", statusValueAsString); } - List resultValue = getResult(); + List> resultValue = getResult(); if (resultValue != null) { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid RateLimits> rateLimitsValue = getRateLimits(); + List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -344,7 +350,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - RateLimits.validateJsonElement(jsonArrayrateLimits.get(i)); + AccountCommissionResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamEventsResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamEventsResponse.java index c3a8b5d0b..62e3ca197 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamEventsResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamEventsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -33,7 +33,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserDataStreamEventsResponse extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(UserDataStreamEventsResponse.class.getName()); @@ -47,18 +47,18 @@ public TypeAdapter create(Gson gson, TypeToken type) { // subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterOutboundAccountPosition = - gson.getDelegateAdapter(this, TypeToken.get(OutboundAccountPosition.class)); final TypeAdapter adapterBalanceUpdate = gson.getDelegateAdapter(this, TypeToken.get(BalanceUpdate.class)); - final TypeAdapter adapterExecutionReport = - gson.getDelegateAdapter(this, TypeToken.get(ExecutionReport.class)); - final TypeAdapter adapterListStatus = - gson.getDelegateAdapter(this, TypeToken.get(ListStatus.class)); final TypeAdapter adapterEventStreamTerminated = gson.getDelegateAdapter(this, TypeToken.get(EventStreamTerminated.class)); + final TypeAdapter adapterExecutionReport = + gson.getDelegateAdapter(this, TypeToken.get(ExecutionReport.class)); final TypeAdapter adapterExternalLockUpdate = gson.getDelegateAdapter(this, TypeToken.get(ExternalLockUpdate.class)); + final TypeAdapter adapterListStatus = + gson.getDelegateAdapter(this, TypeToken.get(ListStatus.class)); + final TypeAdapter adapterOutboundAccountPosition = + gson.getDelegateAdapter(this, TypeToken.get(OutboundAccountPosition.class)); return (TypeAdapter) new TypeAdapter() { @@ -70,15 +70,6 @@ public void write(JsonWriter out, UserDataStreamEventsResponse value) return; } - // check if the actual instance is of the type `OutboundAccountPosition` - if (value.getActualInstance() instanceof OutboundAccountPosition) { - JsonElement element = - adapterOutboundAccountPosition.toJsonTree( - (OutboundAccountPosition) - value.getActualInstance()); - elementAdapter.write(out, element); - return; - } // check if the actual instance is of the type `BalanceUpdate` if (value.getActualInstance() instanceof BalanceUpdate) { JsonElement element = @@ -87,6 +78,14 @@ public void write(JsonWriter out, UserDataStreamEventsResponse value) elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `EventStreamTerminated` + if (value.getActualInstance() instanceof EventStreamTerminated) { + JsonElement element = + adapterEventStreamTerminated.toJsonTree( + (EventStreamTerminated) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `ExecutionReport` if (value.getActualInstance() instanceof ExecutionReport) { JsonElement element = @@ -95,27 +94,28 @@ public void write(JsonWriter out, UserDataStreamEventsResponse value) elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `ListStatus` - if (value.getActualInstance() instanceof ListStatus) { + // check if the actual instance is of the type `ExternalLockUpdate` + if (value.getActualInstance() instanceof ExternalLockUpdate) { JsonElement element = - adapterListStatus.toJsonTree( - (ListStatus) value.getActualInstance()); + adapterExternalLockUpdate.toJsonTree( + (ExternalLockUpdate) value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `EventStreamTerminated` - if (value.getActualInstance() instanceof EventStreamTerminated) { + // check if the actual instance is of the type `ListStatus` + if (value.getActualInstance() instanceof ListStatus) { JsonElement element = - adapterEventStreamTerminated.toJsonTree( - (EventStreamTerminated) value.getActualInstance()); + adapterListStatus.toJsonTree( + (ListStatus) value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `ExternalLockUpdate` - if (value.getActualInstance() instanceof ExternalLockUpdate) { + // check if the actual instance is of the type `OutboundAccountPosition` + if (value.getActualInstance() instanceof OutboundAccountPosition) { JsonElement element = - adapterExternalLockUpdate.toJsonTree( - (ExternalLockUpdate) value.getActualInstance()); + adapterOutboundAccountPosition.toJsonTree( + (OutboundAccountPosition) + value.getActualInstance()); elementAdapter.write(out, element); return; } @@ -203,45 +203,44 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { ArrayList errorMessages = new ArrayList<>(); TypeAdapter actualAdapter = elementAdapter; - // deserialize OutboundAccountPosition + // deserialize BalanceUpdate try { // validate the JSON object to see if any exception is thrown - OutboundAccountPosition.validateJsonElement(jsonElement); - actualAdapter = adapterOutboundAccountPosition; + BalanceUpdate.validateJsonElement(jsonElement); + actualAdapter = adapterBalanceUpdate; match++; - log.log( - Level.FINER, - "Input data matches schema 'OutboundAccountPosition'"); + log.log(Level.FINER, "Input data matches schema 'BalanceUpdate'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for OutboundAccountPosition failed" - + " with `%s`.", + "Deserialization for BalanceUpdate failed with" + + " `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema" - + " 'OutboundAccountPosition'", + "Input data does not match schema 'BalanceUpdate'", e); } - // deserialize BalanceUpdate + // deserialize EventStreamTerminated try { // validate the JSON object to see if any exception is thrown - BalanceUpdate.validateJsonElement(jsonElement); - actualAdapter = adapterBalanceUpdate; + EventStreamTerminated.validateJsonElement(jsonElement); + actualAdapter = adapterEventStreamTerminated; match++; - log.log(Level.FINER, "Input data matches schema 'BalanceUpdate'"); + log.log( + Level.FINER, + "Input data matches schema 'EventStreamTerminated'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for BalanceUpdate failed with" - + " `%s`.", + "Deserialization for EventStreamTerminated failed" + + " with `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'BalanceUpdate'", + "Input data does not match schema 'EventStreamTerminated'", e); } // deserialize ExecutionReport @@ -263,64 +262,65 @@ public UserDataStreamEventsResponse read(JsonReader in) throws IOException { "Input data does not match schema 'ExecutionReport'", e); } - // deserialize ListStatus + // deserialize ExternalLockUpdate try { // validate the JSON object to see if any exception is thrown - ListStatus.validateJsonElement(jsonElement); - actualAdapter = adapterListStatus; + ExternalLockUpdate.validateJsonElement(jsonElement); + actualAdapter = adapterExternalLockUpdate; match++; - log.log(Level.FINER, "Input data matches schema 'ListStatus'"); + log.log( + Level.FINER, + "Input data matches schema 'ExternalLockUpdate'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for ListStatus failed with `%s`.", + "Deserialization for ExternalLockUpdate failed with" + + " `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'ListStatus'", + "Input data does not match schema 'ExternalLockUpdate'", e); } - // deserialize EventStreamTerminated + // deserialize ListStatus try { // validate the JSON object to see if any exception is thrown - EventStreamTerminated.validateJsonElement(jsonElement); - actualAdapter = adapterEventStreamTerminated; + ListStatus.validateJsonElement(jsonElement); + actualAdapter = adapterListStatus; match++; - log.log( - Level.FINER, - "Input data matches schema 'EventStreamTerminated'"); + log.log(Level.FINER, "Input data matches schema 'ListStatus'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for EventStreamTerminated failed" - + " with `%s`.", + "Deserialization for ListStatus failed with `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'EventStreamTerminated'", + "Input data does not match schema 'ListStatus'", e); } - // deserialize ExternalLockUpdate + // deserialize OutboundAccountPosition try { // validate the JSON object to see if any exception is thrown - ExternalLockUpdate.validateJsonElement(jsonElement); - actualAdapter = adapterExternalLockUpdate; + OutboundAccountPosition.validateJsonElement(jsonElement); + actualAdapter = adapterOutboundAccountPosition; match++; log.log( Level.FINER, - "Input data matches schema 'ExternalLockUpdate'"); + "Input data matches schema 'OutboundAccountPosition'"); } catch (Exception e) { // deserialization failed, continue errorMessages.add( String.format( - "Deserialization for ExternalLockUpdate failed with" - + " `%s`.", + "Deserialization for OutboundAccountPosition failed" + + " with `%s`.", e.getMessage())); log.log( Level.FINER, - "Input data does not match schema 'ExternalLockUpdate'", + "Input data does not match schema" + + " 'OutboundAccountPosition'", e); } @@ -356,12 +356,12 @@ public UserDataStreamEventsResponse(Object o) { } static { - schemas.put("OutboundAccountPosition", OutboundAccountPosition.class); schemas.put("BalanceUpdate", BalanceUpdate.class); - schemas.put("ExecutionReport", ExecutionReport.class); - schemas.put("ListStatus", ListStatus.class); schemas.put("EventStreamTerminated", EventStreamTerminated.class); + schemas.put("ExecutionReport", ExecutionReport.class); schemas.put("ExternalLockUpdate", ExternalLockUpdate.class); + schemas.put("ListStatus", ListStatus.class); + schemas.put("OutboundAccountPosition", OutboundAccountPosition.class); } @Override @@ -378,12 +378,12 @@ public Map> getSchemas() { */ @Override public void setActualInstance(Object instance) { - if (instance instanceof OutboundAccountPosition) { + if (instance instanceof BalanceUpdate) { super.setActualInstance(instance); return; } - if (instance instanceof BalanceUpdate) { + if (instance instanceof EventStreamTerminated) { super.setActualInstance(instance); return; } @@ -393,17 +393,17 @@ public void setActualInstance(Object instance) { return; } - if (instance instanceof ListStatus) { + if (instance instanceof ExternalLockUpdate) { super.setActualInstance(instance); return; } - if (instance instanceof EventStreamTerminated) { + if (instance instanceof ListStatus) { super.setActualInstance(instance); return; } - if (instance instanceof ExternalLockUpdate) { + if (instance instanceof OutboundAccountPosition) { super.setActualInstance(instance); return; } @@ -426,17 +426,6 @@ public Object getActualInstance() { return super.getActualInstance(); } - /** - * Get the actual instance of `OutboundAccountPosition`. If the actual instance is not - * `OutboundAccountPosition`, the ClassCastException will be thrown. - * - * @return The actual instance of `OutboundAccountPosition` - * @throws ClassCastException if the instance is not `OutboundAccountPosition` - */ - public OutboundAccountPosition getOutboundAccountPosition() throws ClassCastException { - return (OutboundAccountPosition) super.getActualInstance(); - } - /** * Get the actual instance of `BalanceUpdate`. If the actual instance is not `BalanceUpdate`, * the ClassCastException will be thrown. @@ -448,6 +437,17 @@ public BalanceUpdate getBalanceUpdate() throws ClassCastException { return (BalanceUpdate) super.getActualInstance(); } + /** + * Get the actual instance of `EventStreamTerminated`. If the actual instance is not + * `EventStreamTerminated`, the ClassCastException will be thrown. + * + * @return The actual instance of `EventStreamTerminated` + * @throws ClassCastException if the instance is not `EventStreamTerminated` + */ + public EventStreamTerminated getEventStreamTerminated() throws ClassCastException { + return (EventStreamTerminated) super.getActualInstance(); + } + /** * Get the actual instance of `ExecutionReport`. If the actual instance is not * `ExecutionReport`, the ClassCastException will be thrown. @@ -459,6 +459,17 @@ public ExecutionReport getExecutionReport() throws ClassCastException { return (ExecutionReport) super.getActualInstance(); } + /** + * Get the actual instance of `ExternalLockUpdate`. If the actual instance is not + * `ExternalLockUpdate`, the ClassCastException will be thrown. + * + * @return The actual instance of `ExternalLockUpdate` + * @throws ClassCastException if the instance is not `ExternalLockUpdate` + */ + public ExternalLockUpdate getExternalLockUpdate() throws ClassCastException { + return (ExternalLockUpdate) super.getActualInstance(); + } + /** * Get the actual instance of `ListStatus`. If the actual instance is not `ListStatus`, the * ClassCastException will be thrown. @@ -471,25 +482,14 @@ public ListStatus getListStatus() throws ClassCastException { } /** - * Get the actual instance of `EventStreamTerminated`. If the actual instance is not - * `EventStreamTerminated`, the ClassCastException will be thrown. - * - * @return The actual instance of `EventStreamTerminated` - * @throws ClassCastException if the instance is not `EventStreamTerminated` - */ - public EventStreamTerminated getEventStreamTerminated() throws ClassCastException { - return (EventStreamTerminated) super.getActualInstance(); - } - - /** - * Get the actual instance of `ExternalLockUpdate`. If the actual instance is not - * `ExternalLockUpdate`, the ClassCastException will be thrown. + * Get the actual instance of `OutboundAccountPosition`. If the actual instance is not + * `OutboundAccountPosition`, the ClassCastException will be thrown. * - * @return The actual instance of `ExternalLockUpdate` - * @throws ClassCastException if the instance is not `ExternalLockUpdate` + * @return The actual instance of `OutboundAccountPosition` + * @throws ClassCastException if the instance is not `OutboundAccountPosition` */ - public ExternalLockUpdate getExternalLockUpdate() throws ClassCastException { - return (ExternalLockUpdate) super.getActualInstance(); + public OutboundAccountPosition getOutboundAccountPosition() throws ClassCastException { + return (OutboundAccountPosition) super.getActualInstance(); } /** @@ -503,25 +503,25 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate oneOf schemas one by one int validCount = 0; ArrayList errorMessages = new ArrayList<>(); - // validate the json string with OutboundAccountPosition + // validate the json string with BalanceUpdate try { - OutboundAccountPosition.validateJsonElement(jsonElement); + BalanceUpdate.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for OutboundAccountPosition failed with `%s`.", - e.getMessage())); + "Deserialization for BalanceUpdate failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with BalanceUpdate + // validate the json string with EventStreamTerminated try { - BalanceUpdate.validateJsonElement(jsonElement); + EventStreamTerminated.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for BalanceUpdate failed with `%s`.", e.getMessage())); + "Deserialization for EventStreamTerminated failed with `%s`.", + e.getMessage())); // continue to the next one } // validate the json string with ExecutionReport @@ -535,35 +535,35 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti e.getMessage())); // continue to the next one } - // validate the json string with ListStatus + // validate the json string with ExternalLockUpdate try { - ListStatus.validateJsonElement(jsonElement); + ExternalLockUpdate.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for ListStatus failed with `%s`.", e.getMessage())); + "Deserialization for ExternalLockUpdate failed with `%s`.", + e.getMessage())); // continue to the next one } - // validate the json string with EventStreamTerminated + // validate the json string with ListStatus try { - EventStreamTerminated.validateJsonElement(jsonElement); + ListStatus.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for EventStreamTerminated failed with `%s`.", - e.getMessage())); + "Deserialization for ListStatus failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with ExternalLockUpdate + // validate the json string with OutboundAccountPosition try { - ExternalLockUpdate.validateJsonElement(jsonElement); + OutboundAccountPosition.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { errorMessages.add( String.format( - "Deserialization for ExternalLockUpdate failed with `%s`.", + "Deserialization for OutboundAccountPosition failed with `%s`.", e.getMessage())); // continue to the next one } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamSubscribeResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamSubscribeResponse.java index 1f179b8fc..edae8b6ad 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamSubscribeResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamSubscribeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** UserDataStreamSubscribeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserDataStreamSubscribeResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -56,7 +56,7 @@ public class UserDataStreamSubscribeResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RESULT) @jakarta.annotation.Nullable - private SessionSubscriptionsResponseResultInner result; + private UserDataStreamSubscribeResponseResult result; public UserDataStreamSubscribeResponse() {} @@ -99,7 +99,7 @@ public void setStatus(@jakarta.annotation.Nullable Long status) { } public UserDataStreamSubscribeResponse result( - @jakarta.annotation.Nullable SessionSubscriptionsResponseResultInner result) { + @jakarta.annotation.Nullable UserDataStreamSubscribeResponseResult result) { this.result = result; return this; } @@ -111,12 +111,12 @@ public UserDataStreamSubscribeResponse result( */ @jakarta.annotation.Nullable @Valid - public SessionSubscriptionsResponseResultInner getResult() { + public UserDataStreamSubscribeResponseResult getResult() { return result; } public void setResult( - @jakarta.annotation.Nullable SessionSubscriptionsResponseResultInner result) { + @jakarta.annotation.Nullable UserDataStreamSubscribeResponseResult result) { this.result = result; } @@ -165,7 +165,7 @@ public String toUrlQueryString() { String statusValueAsString = statusValue.toString(); valMap.put("status", statusValueAsString); } - SessionSubscriptionsResponseResultInner resultValue = getResult(); + UserDataStreamSubscribeResponseResult resultValue = getResult(); if (resultValue != null) { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); @@ -268,7 +268,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `result` if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { - SessionSubscriptionsResponseResultInner.validateJsonElement(jsonObj.get("result")); + UserDataStreamSubscribeResponseResult.validateJsonElement(jsonObj.get("result")); } } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamSubscribeResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamSubscribeResponseResult.java new file mode 100644 index 000000000..d2b5adf09 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamSubscribeResponseResult.java @@ -0,0 +1,244 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** UserDataStreamSubscribeResponseResult */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class UserDataStreamSubscribeResponseResult extends BaseDTO { + public static final String SERIALIZED_NAME_SUBSCRIPTION_ID = "subscriptionId"; + + @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ID) + @jakarta.annotation.Nullable + private Long subscriptionId; + + public UserDataStreamSubscribeResponseResult() {} + + public UserDataStreamSubscribeResponseResult subscriptionId( + @jakarta.annotation.Nullable Long subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get subscriptionId + * + * @return subscriptionId + */ + @jakarta.annotation.Nullable + public Long getSubscriptionId() { + return subscriptionId; + } + + public void setSubscriptionId(@jakarta.annotation.Nullable Long subscriptionId) { + this.subscriptionId = subscriptionId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserDataStreamSubscribeResponseResult userDataStreamSubscribeResponseResult = + (UserDataStreamSubscribeResponseResult) o; + return Objects.equals( + this.subscriptionId, userDataStreamSubscribeResponseResult.subscriptionId); + } + + @Override + public int hashCode() { + return Objects.hash(subscriptionId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserDataStreamSubscribeResponseResult {\n"); + sb.append(" subscriptionId: ").append(toIndentedString(subscriptionId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long subscriptionIdValue = getSubscriptionId(); + if (subscriptionIdValue != null) { + String subscriptionIdValueAsString = subscriptionIdValue.toString(); + valMap.put("subscriptionId", subscriptionIdValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object subscriptionIdValue = getSubscriptionId(); + if (subscriptionIdValue != null) { + valMap.put("subscriptionId", subscriptionIdValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("subscriptionId"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * UserDataStreamSubscribeResponseResult + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserDataStreamSubscribeResponseResult.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UserDataStreamSubscribeResponseResult" + + " is not found in the empty JSON string", + UserDataStreamSubscribeResponseResult.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UserDataStreamSubscribeResponseResult.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `UserDataStreamSubscribeResponseResult` properties. JSON:" + + " %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserDataStreamSubscribeResponseResult.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserDataStreamSubscribeResponseResult' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(UserDataStreamSubscribeResponseResult.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, UserDataStreamSubscribeResponseResult value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UserDataStreamSubscribeResponseResult read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of UserDataStreamSubscribeResponseResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserDataStreamSubscribeResponseResult + * @throws IOException if the JSON string is invalid with respect to + * UserDataStreamSubscribeResponseResult + */ + public static UserDataStreamSubscribeResponseResult fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, UserDataStreamSubscribeResponseResult.class); + } + + /** + * Convert an instance of UserDataStreamSubscribeResponseResult to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamSubscribeSignatureRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamSubscribeSignatureRequest.java deleted file mode 100644 index 892bba6b4..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamSubscribeSignatureRequest.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.api.model; - -import com.binance.connector.client.common.DecimalFormatter; -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.api.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** UserDataStreamSubscribeSignatureRequest */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UserDataStreamSubscribeSignatureRequest extends BaseDTO { - public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; - - @SerializedName(SERIALIZED_NAME_RECV_WINDOW) - @jakarta.annotation.Nullable - private Double recvWindow; - - public UserDataStreamSubscribeSignatureRequest() {} - - public UserDataStreamSubscribeSignatureRequest recvWindow( - @jakarta.annotation.Nullable Double recvWindow) { - this.recvWindow = recvWindow; - return this; - } - - /** - * Get recvWindow - * - * @return recvWindow - */ - @jakarta.annotation.Nullable - @Valid - public Double getRecvWindow() { - return recvWindow; - } - - public void setRecvWindow(@jakarta.annotation.Nullable Double recvWindow) { - this.recvWindow = recvWindow; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserDataStreamSubscribeSignatureRequest userDataStreamSubscribeSignatureRequest = - (UserDataStreamSubscribeSignatureRequest) o; - return Objects.equals(this.recvWindow, userDataStreamSubscribeSignatureRequest.recvWindow); - } - - @Override - public int hashCode() { - return Objects.hash(recvWindow); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserDataStreamSubscribeSignatureRequest {\n"); - sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Double recvWindowValue = getRecvWindow(); - if (recvWindowValue != null) { - String recvWindowValueAsString = - DecimalFormatter.getFormatter().format(recvWindowValue); - valMap.put("recvWindow", recvWindowValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object recvWindowValue = getRecvWindow(); - if (recvWindowValue != null) { - valMap.put("recvWindow", recvWindowValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("recvWindow"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * UserDataStreamSubscribeSignatureRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UserDataStreamSubscribeSignatureRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " UserDataStreamSubscribeSignatureRequest is not found in the" - + " empty JSON string", - UserDataStreamSubscribeSignatureRequest.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UserDataStreamSubscribeSignatureRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UserDataStreamSubscribeSignatureRequest` properties. JSON:" - + " %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UserDataStreamSubscribeSignatureRequest.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes 'UserDataStreamSubscribeSignatureRequest' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UserDataStreamSubscribeSignatureRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, UserDataStreamSubscribeSignatureRequest value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UserDataStreamSubscribeSignatureRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UserDataStreamSubscribeSignatureRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserDataStreamSubscribeSignatureRequest - * @throws IOException if the JSON string is invalid with respect to - * UserDataStreamSubscribeSignatureRequest - */ - public static UserDataStreamSubscribeSignatureRequest fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, UserDataStreamSubscribeSignatureRequest.class); - } - - /** - * Convert an instance of UserDataStreamSubscribeSignatureRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamSubscribeSignatureResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamSubscribeSignatureResponse.java index 34eb895f7..8386113ce 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamSubscribeSignatureResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamSubscribeSignatureResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** UserDataStreamSubscribeSignatureResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserDataStreamSubscribeSignatureResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; @@ -56,7 +56,7 @@ public class UserDataStreamSubscribeSignatureResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RESULT) @jakarta.annotation.Nullable - private SessionSubscriptionsResponseResultInner result; + private UserDataStreamSubscribeResponseResult result; public UserDataStreamSubscribeSignatureResponse() {} @@ -100,7 +100,7 @@ public void setStatus(@jakarta.annotation.Nullable Long status) { } public UserDataStreamSubscribeSignatureResponse result( - @jakarta.annotation.Nullable SessionSubscriptionsResponseResultInner result) { + @jakarta.annotation.Nullable UserDataStreamSubscribeResponseResult result) { this.result = result; return this; } @@ -112,12 +112,12 @@ public UserDataStreamSubscribeSignatureResponse result( */ @jakarta.annotation.Nullable @Valid - public SessionSubscriptionsResponseResultInner getResult() { + public UserDataStreamSubscribeResponseResult getResult() { return result; } public void setResult( - @jakarta.annotation.Nullable SessionSubscriptionsResponseResultInner result) { + @jakarta.annotation.Nullable UserDataStreamSubscribeResponseResult result) { this.result = result; } @@ -166,7 +166,7 @@ public String toUrlQueryString() { String statusValueAsString = statusValue.toString(); valMap.put("status", statusValueAsString); } - SessionSubscriptionsResponseResultInner resultValue = getResult(); + UserDataStreamSubscribeResponseResult resultValue = getResult(); if (resultValue != null) { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); @@ -272,7 +272,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `result` if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { - SessionSubscriptionsResponseResultInner.validateJsonElement(jsonObj.get("result")); + UserDataStreamSubscribeResponseResult.validateJsonElement(jsonObj.get("result")); } } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamUnsubscribeRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamUnsubscribeRequest.java index ec0ea19d2..16e335b36 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamUnsubscribeRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamUnsubscribeRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,8 +37,14 @@ /** UserDataStreamUnsubscribeRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserDataStreamUnsubscribeRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SUBSCRIPTION_ID = "subscriptionId"; @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ID) @@ -47,6 +53,25 @@ public class UserDataStreamUnsubscribeRequest extends BaseDTO { public UserDataStreamUnsubscribeRequest() {} + public UserDataStreamUnsubscribeRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Client-generated request identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public UserDataStreamUnsubscribeRequest subscriptionId( @jakarta.annotation.Nullable Integer subscriptionId) { this.subscriptionId = subscriptionId; @@ -54,7 +79,9 @@ public UserDataStreamUnsubscribeRequest subscriptionId( } /** - * Get subscriptionId + * When called with no parameter, this will close all subscriptions. When called with the + * subscriptionId parameter, this will attempt to close the subscription with that subscription + * id, if it exists. * * @return subscriptionId */ @@ -77,18 +104,21 @@ public boolean equals(Object o) { } UserDataStreamUnsubscribeRequest userDataStreamUnsubscribeRequest = (UserDataStreamUnsubscribeRequest) o; - return Objects.equals(this.subscriptionId, userDataStreamUnsubscribeRequest.subscriptionId); + return Objects.equals(this.id, userDataStreamUnsubscribeRequest.id) + && Objects.equals( + this.subscriptionId, userDataStreamUnsubscribeRequest.subscriptionId); } @Override public int hashCode() { - return Objects.hash(subscriptionId); + return Objects.hash(id, subscriptionId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UserDataStreamUnsubscribeRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" subscriptionId: ").append(toIndentedString(subscriptionId)).append("\n"); sb.append("}"); return sb.toString(); @@ -98,6 +128,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } Integer subscriptionIdValue = getSubscriptionId(); if (subscriptionIdValue != null) { String subscriptionIdValueAsString = subscriptionIdValue.toString(); @@ -114,6 +149,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object subscriptionIdValue = getSubscriptionId(); if (subscriptionIdValue != null) { valMap.put("subscriptionId", subscriptionIdValue); @@ -144,6 +183,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("subscriptionId"); // a set of required properties/fields (JSON key names) @@ -181,6 +221,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamUnsubscribeResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamUnsubscribeResponse.java index cdc2027f2..78640b1e8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamUnsubscribeResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamUnsubscribeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** UserDataStreamUnsubscribeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserDataStreamUnsubscribeResponse extends BaseDTO { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WindowSize.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WindowSize.java index e4c956539..40f13d529 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WindowSize.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WindowSize.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets windowSize */ +/** Defaults to 1d if no parameter provided. */ @JsonAdapter(WindowSize.Adapter.class) public enum WindowSize { WINDOW_SIZE_1m("1m"), @@ -198,7 +198,9 @@ public enum WindowSize { WINDOW_SIZE_5d("5d"), - WINDOW_SIZE_6d("6d"); + WINDOW_SIZE_6d("6d"), + + WINDOW_SIZE_7d("7d"); private String value; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingPegOffsetType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingPegOffsetType.java index e9a7b118d..792393abd 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingPegOffsetType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingPegOffsetType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingPegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingPegPriceType.java index 253c391d1..afc0b1651 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingPegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingPegPriceType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets workingPegPriceType */ +/** See [Pegged Orders](/products/spot/faqs/pegged_orders) */ @JsonAdapter(WorkingPegPriceType.Adapter.class) public enum WorkingPegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingSide.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingSide.java index 0efdea406..2f7a6316a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingSide.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingSide.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets workingSide */ +/** Supported values: [Order Side](/products/spot/enums#side) */ @JsonAdapter(WorkingSide.Adapter.class) public enum WorkingSide { BUY("BUY"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingTimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingTimeInForce.java index 9eef8bf01..95e6efb53 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingTimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingTimeInForce.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets workingTimeInForce */ +/** Supported values: [Time In Force](/products/spot/enums#timeinforce) */ @JsonAdapter(WorkingTimeInForce.Adapter.class) public enum WorkingTimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingType.java index 3d95bc051..0338613fa 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingType.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket API - * OpenAPI Specifications for the Binance Spot WebSocket API API documents: - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Gets or Sets workingType */ +/** Supported values: `LIMIT`, `LIMIT_MAKER` */ @JsonAdapter(WorkingType.Adapter.class) public enum WorkingType { LIMIT("LIMIT"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/JSON.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/JSON.java index 8c2862e9d..6281dadb2 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/JSON.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -64,248 +64,50 @@ public static GsonBuilder createGson() { new GsonFireBuilder() .registerTypeSelector( com.binance.connector.client.spot.websocket.stream.model - .AssetFilters.class, + .UserDataStreamEventsResponse.class, new TypeSelector< com.binance.connector.client.spot.websocket.stream.model - .AssetFilters>() { + .UserDataStreamEventsResponse>() { @Override public Class< ? extends com.binance.connector.client.spot .websocket.stream.model - .AssetFilters> + .UserDataStreamEventsResponse> getClassForElement(JsonElement readElement) { Map classByDiscriminatorValue = new HashMap(); classByDiscriminatorValue.put( - "MAX_ASSET", + "balanceUpdate", com.binance.connector.client.spot.websocket.stream - .model.MaxAssetFilter.class); + .model.BalanceUpdate.class); classByDiscriminatorValue.put( - "MaxAssetFilter", + "eventStreamTerminated", com.binance.connector.client.spot.websocket.stream - .model.MaxAssetFilter.class); + .model.EventStreamTerminated.class); classByDiscriminatorValue.put( - "assetFilters", + "executionReport", com.binance.connector.client.spot.websocket.stream - .model.AssetFilters.class); - return getClassByDiscriminator( - classByDiscriminatorValue, - getDiscriminatorValue(readElement, "filterType")); - } - }) - .registerTypeSelector( - com.binance.connector.client.spot.websocket.stream.model - .ExchangeFilters.class, - new TypeSelector< - com.binance.connector.client.spot.websocket.stream.model - .ExchangeFilters>() { - @Override - public Class< - ? extends - com.binance.connector.client.spot - .websocket.stream.model - .ExchangeFilters> - getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = - new HashMap(); - classByDiscriminatorValue.put( - "EXCHANGE_MAX_NUM_ALGO_ORDERS", - com.binance.connector.client.spot.websocket.stream - .model.ExchangeMaxNumAlgoOrdersFilter - .class); - classByDiscriminatorValue.put( - "EXCHANGE_MAX_NUM_ICEBERG_ORDERS", - com.binance.connector.client.spot.websocket.stream - .model.ExchangeMaxNumIcebergOrdersFilter - .class); - classByDiscriminatorValue.put( - "EXCHANGE_MAX_NUM_ORDERS", - com.binance.connector.client.spot.websocket.stream - .model.ExchangeMaxNumOrdersFilter.class); - classByDiscriminatorValue.put( - "EXCHANGE_MAX_NUM_ORDER_LISTS", - com.binance.connector.client.spot.websocket.stream - .model.ExchangeMaxNumOrderListsFilter - .class); - classByDiscriminatorValue.put( - "ExchangeMaxNumAlgoOrdersFilter", - com.binance.connector.client.spot.websocket.stream - .model.ExchangeMaxNumAlgoOrdersFilter - .class); - classByDiscriminatorValue.put( - "ExchangeMaxNumIcebergOrdersFilter", - com.binance.connector.client.spot.websocket.stream - .model.ExchangeMaxNumIcebergOrdersFilter - .class); - classByDiscriminatorValue.put( - "ExchangeMaxNumOrderListsFilter", - com.binance.connector.client.spot.websocket.stream - .model.ExchangeMaxNumOrderListsFilter - .class); - classByDiscriminatorValue.put( - "ExchangeMaxNumOrdersFilter", - com.binance.connector.client.spot.websocket.stream - .model.ExchangeMaxNumOrdersFilter.class); - classByDiscriminatorValue.put( - "exchangeFilters", - com.binance.connector.client.spot.websocket.stream - .model.ExchangeFilters.class); - return getClassByDiscriminator( - classByDiscriminatorValue, - getDiscriminatorValue(readElement, "filterType")); - } - }) - .registerTypeSelector( - com.binance.connector.client.spot.websocket.stream.model - .SymbolFilters.class, - new TypeSelector< - com.binance.connector.client.spot.websocket.stream.model - .SymbolFilters>() { - @Override - public Class< - ? extends - com.binance.connector.client.spot - .websocket.stream.model - .SymbolFilters> - getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = - new HashMap(); - classByDiscriminatorValue.put( - "ICEBERG_PARTS", - com.binance.connector.client.spot.websocket.stream - .model.IcebergPartsFilter.class); - classByDiscriminatorValue.put( - "LOT_SIZE", - com.binance.connector.client.spot.websocket.stream - .model.LotSizeFilter.class); - classByDiscriminatorValue.put( - "MARKET_LOT_SIZE", - com.binance.connector.client.spot.websocket.stream - .model.MarketLotSizeFilter.class); - classByDiscriminatorValue.put( - "MAX_NUM_ALGO_ORDERS", - com.binance.connector.client.spot.websocket.stream - .model.MaxNumAlgoOrdersFilter.class); - classByDiscriminatorValue.put( - "MAX_NUM_ICEBERG_ORDERS", - com.binance.connector.client.spot.websocket.stream - .model.MaxNumIcebergOrdersFilter.class); - classByDiscriminatorValue.put( - "MAX_NUM_ORDERS", - com.binance.connector.client.spot.websocket.stream - .model.MaxNumOrdersFilter.class); - classByDiscriminatorValue.put( - "MAX_NUM_ORDER_AMENDS", - com.binance.connector.client.spot.websocket.stream - .model.MaxNumOrderAmendsFilter.class); - classByDiscriminatorValue.put( - "MAX_NUM_ORDER_LISTS", - com.binance.connector.client.spot.websocket.stream - .model.MaxNumOrderListsFilter.class); - classByDiscriminatorValue.put( - "MAX_POSITION", - com.binance.connector.client.spot.websocket.stream - .model.MaxPositionFilter.class); - classByDiscriminatorValue.put( - "MIN_NOTIONAL", - com.binance.connector.client.spot.websocket.stream - .model.MinNotionalFilter.class); - classByDiscriminatorValue.put( - "NOTIONAL", - com.binance.connector.client.spot.websocket.stream - .model.NotionalFilter.class); - classByDiscriminatorValue.put( - "PERCENT_PRICE", - com.binance.connector.client.spot.websocket.stream - .model.PercentPriceFilter.class); - classByDiscriminatorValue.put( - "PERCENT_PRICE_BY_SIDE", - com.binance.connector.client.spot.websocket.stream - .model.PercentPriceBySideFilter.class); - classByDiscriminatorValue.put( - "PRICE_FILTER", - com.binance.connector.client.spot.websocket.stream - .model.PriceFilter.class); - classByDiscriminatorValue.put( - "TRAILING_DELTA", - com.binance.connector.client.spot.websocket.stream - .model.TrailingDeltaFilter.class); - classByDiscriminatorValue.put( - "T_PLUS_SELL", - com.binance.connector.client.spot.websocket.stream - .model.TPlusSellFilter.class); - classByDiscriminatorValue.put( - "IcebergPartsFilter", - com.binance.connector.client.spot.websocket.stream - .model.IcebergPartsFilter.class); - classByDiscriminatorValue.put( - "LotSizeFilter", - com.binance.connector.client.spot.websocket.stream - .model.LotSizeFilter.class); - classByDiscriminatorValue.put( - "MarketLotSizeFilter", - com.binance.connector.client.spot.websocket.stream - .model.MarketLotSizeFilter.class); - classByDiscriminatorValue.put( - "MaxNumAlgoOrdersFilter", - com.binance.connector.client.spot.websocket.stream - .model.MaxNumAlgoOrdersFilter.class); - classByDiscriminatorValue.put( - "MaxNumIcebergOrdersFilter", - com.binance.connector.client.spot.websocket.stream - .model.MaxNumIcebergOrdersFilter.class); - classByDiscriminatorValue.put( - "MaxNumOrderAmendsFilter", - com.binance.connector.client.spot.websocket.stream - .model.MaxNumOrderAmendsFilter.class); - classByDiscriminatorValue.put( - "MaxNumOrderListsFilter", - com.binance.connector.client.spot.websocket.stream - .model.MaxNumOrderListsFilter.class); - classByDiscriminatorValue.put( - "MaxNumOrdersFilter", - com.binance.connector.client.spot.websocket.stream - .model.MaxNumOrdersFilter.class); - classByDiscriminatorValue.put( - "MaxPositionFilter", - com.binance.connector.client.spot.websocket.stream - .model.MaxPositionFilter.class); - classByDiscriminatorValue.put( - "MinNotionalFilter", - com.binance.connector.client.spot.websocket.stream - .model.MinNotionalFilter.class); - classByDiscriminatorValue.put( - "NotionalFilter", - com.binance.connector.client.spot.websocket.stream - .model.NotionalFilter.class); + .model.ExecutionReport.class); classByDiscriminatorValue.put( - "PercentPriceBySideFilter", + "externalLockUpdate", com.binance.connector.client.spot.websocket.stream - .model.PercentPriceBySideFilter.class); + .model.ExternalLockUpdate.class); classByDiscriminatorValue.put( - "PercentPriceFilter", + "listStatus", com.binance.connector.client.spot.websocket.stream - .model.PercentPriceFilter.class); + .model.ListStatus.class); classByDiscriminatorValue.put( - "PriceFilter", + "outboundAccountPosition", com.binance.connector.client.spot.websocket.stream - .model.PriceFilter.class); + .model.OutboundAccountPosition.class); classByDiscriminatorValue.put( - "TPlusSellFilter", + "UserDataStreamEventsResponse", com.binance.connector.client.spot.websocket.stream - .model.TPlusSellFilter.class); - classByDiscriminatorValue.put( - "TrailingDeltaFilter", - com.binance.connector.client.spot.websocket.stream - .model.TrailingDeltaFilter.class); - classByDiscriminatorValue.put( - "symbolFilters", - com.binance.connector.client.spot.websocket.stream - .model.SymbolFilters.class); + .model.UserDataStreamEventsResponse.class); return getClassByDiscriminator( classByDiscriminatorValue, - getDiscriminatorValue(readElement, "filterType")); + getDiscriminatorValue(readElement, "e")); } }); GsonBuilder builder = fireBuilder.createGsonBuilder(); @@ -372,21 +174,30 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.stream.model .AllMarketRollingWindowTickerResponseInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.stream.model.AllMiniTickerRequest + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.stream.model.AllMiniTickerResponse .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.stream.model .AllMiniTickerResponseInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.AssetFilters - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.stream.model.AvgPriceRequest .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.stream.model.AvgPriceResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.stream.model.BalanceUpdate + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.stream.model.BlockTradeRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.stream.model.BlockTradeResponse + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.stream.model.BookTickerRequest .CustomTypeAdapterFactory()); @@ -400,22 +211,13 @@ private static Class getClassByDiscriminator( new com.binance.connector.client.spot.websocket.stream.model.DiffBookDepthResponse .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.ExchangeFilters + new com.binance.connector.client.spot.websocket.stream.model.EventStreamTerminated .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model - .ExchangeMaxNumAlgoOrdersFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model - .ExchangeMaxNumIcebergOrdersFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model - .ExchangeMaxNumOrderListsFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model - .ExchangeMaxNumOrdersFilter.CustomTypeAdapterFactory()); + new com.binance.connector.client.spot.websocket.stream.model.ExecutionReport + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.IcebergPartsFilter + new com.binance.connector.client.spot.websocket.stream.model.ExternalLockUpdate .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.stream.model.KlineOffsetRequest @@ -433,34 +235,10 @@ private static Class getClassByDiscriminator( new com.binance.connector.client.spot.websocket.stream.model.KlineResponseK .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.LotSizeFilter - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.MarketLotSizeFilter - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.MaxAssetFilter - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.MaxNumAlgoOrdersFilter - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model - .MaxNumIcebergOrdersFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.MaxNumOrderAmendsFilter + new com.binance.connector.client.spot.websocket.stream.model.ListStatus .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.MaxNumOrderListsFilter - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.MaxNumOrdersFilter - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.MaxPositionFilter - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.MinNotionalFilter + new com.binance.connector.client.spot.websocket.stream.model.ListStatusOInner .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.stream.model.MiniTickerRequest @@ -469,26 +247,17 @@ private static Class getClassByDiscriminator( new com.binance.connector.client.spot.websocket.stream.model.MiniTickerResponse .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.NotionalFilter + new com.binance.connector.client.spot.websocket.stream.model.OutboundAccountPosition .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.stream.model + .OutboundAccountPositionBInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.stream.model.PartialBookDepthRequest .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.stream.model .PartialBookDepthResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model - .PercentPriceBySideFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.PercentPriceFilter - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.PriceFilter - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.RateLimits - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.stream.model.ReferencePriceRequest .CustomTypeAdapterFactory()); @@ -501,12 +270,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.stream.model .RollingWindowTickerResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.SymbolFilters - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.TPlusSellFilter - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.stream.model.TickerRequest .CustomTypeAdapterFactory()); @@ -520,8 +283,8 @@ private static Class getClassByDiscriminator( new com.binance.connector.client.spot.websocket.stream.model.TradeResponse .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.spot.websocket.stream.model.TrailingDeltaFilter - .CustomTypeAdapterFactory()); + new com.binance.connector.client.spot.websocket.stream.model + .UserDataStreamEventsResponse.CustomTypeAdapterFactory()); gson = gsonBuilder.create(); } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/DefaultApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/DefaultApi.java new file mode 100644 index 000000000..d75efae78 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/DefaultApi.java @@ -0,0 +1,1380 @@ +/* + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.stream.api; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.SystemUtil; +import com.binance.connector.client.common.exception.ConstraintViolationException; +import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionInterface; +import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionPoolWrapper; +import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionWrapper; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.dtos.RequestWrapperDTO; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueue; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; +import com.binance.connector.client.spot.websocket.stream.JSON; +import com.binance.connector.client.spot.websocket.stream.model.AggTradeRequest; +import com.binance.connector.client.spot.websocket.stream.model.AggTradeResponse; +import com.binance.connector.client.spot.websocket.stream.model.AllMarketRollingWindowTickerRequest; +import com.binance.connector.client.spot.websocket.stream.model.AllMarketRollingWindowTickerResponse; +import com.binance.connector.client.spot.websocket.stream.model.AllMiniTickerRequest; +import com.binance.connector.client.spot.websocket.stream.model.AllMiniTickerResponse; +import com.binance.connector.client.spot.websocket.stream.model.AvgPriceRequest; +import com.binance.connector.client.spot.websocket.stream.model.AvgPriceResponse; +import com.binance.connector.client.spot.websocket.stream.model.BlockTradeRequest; +import com.binance.connector.client.spot.websocket.stream.model.BlockTradeResponse; +import com.binance.connector.client.spot.websocket.stream.model.BookTickerRequest; +import com.binance.connector.client.spot.websocket.stream.model.BookTickerResponse; +import com.binance.connector.client.spot.websocket.stream.model.DiffBookDepthRequest; +import com.binance.connector.client.spot.websocket.stream.model.DiffBookDepthResponse; +import com.binance.connector.client.spot.websocket.stream.model.KlineOffsetRequest; +import com.binance.connector.client.spot.websocket.stream.model.KlineOffsetResponse; +import com.binance.connector.client.spot.websocket.stream.model.KlineRequest; +import com.binance.connector.client.spot.websocket.stream.model.KlineResponse; +import com.binance.connector.client.spot.websocket.stream.model.MiniTickerRequest; +import com.binance.connector.client.spot.websocket.stream.model.MiniTickerResponse; +import com.binance.connector.client.spot.websocket.stream.model.PartialBookDepthRequest; +import com.binance.connector.client.spot.websocket.stream.model.PartialBookDepthResponse; +import com.binance.connector.client.spot.websocket.stream.model.ReferencePriceRequest; +import com.binance.connector.client.spot.websocket.stream.model.ReferencePriceResponse; +import com.binance.connector.client.spot.websocket.stream.model.RollingWindowTickerRequest; +import com.binance.connector.client.spot.websocket.stream.model.RollingWindowTickerResponse; +import com.binance.connector.client.spot.websocket.stream.model.TickerRequest; +import com.binance.connector.client.spot.websocket.stream.model.TickerResponse; +import com.binance.connector.client.spot.websocket.stream.model.TradeRequest; +import com.binance.connector.client.spot.websocket.stream.model.TradeResponse; +import com.google.gson.reflect.TypeToken; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Validation; +import jakarta.validation.Validator; +import jakarta.validation.constraints.*; +import java.util.Collections; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; + +public class DefaultApi { + private static final String USER_AGENT = + String.format( + "binance-spot/11.0.0 (Java/%s; %s; %s)", + SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); + + private StreamConnectionInterface connection; + + public DefaultApi() {} + + public DefaultApi(WebSocketClientConfiguration configuration) { + this( + configuration.getUsePool() + ? new StreamConnectionPoolWrapper(configuration, JSON.getGson()) + : new StreamConnectionWrapper(configuration, JSON.getGson())); + } + + public DefaultApi(StreamConnectionInterface connection) { + connection.setUserAgent(USER_AGENT); + if (!connection.isConnected()) { + connection.connect(); + } + this.connection = connection; + } + + public StreamConnectionInterface getConnection() { + return connection; + } + + /** + * Aggregate Trade Streams The Aggregate Trade Streams push trade information that is aggregated + * for a single taker order. Update Speed: Real-time + * + * @param aggTradeRequest (required) + * @return AggTradeResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Aggregate Trade Streams -
+ * + * @see Aggregate + * Trade Streams Documentation + */ + public StreamBlockingQueueWrapper aggTrade(AggTradeRequest aggTradeRequest) + throws ApiException { + StreamBlockingQueue queue = aggTradeRaw(aggTradeRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue aggTradeRaw(AggTradeRequest aggTradeRequest) + throws ApiException { + aggTradeValidateBeforeCall(aggTradeRequest); + + String methodName = + "/@aggTrade" + .substring(1) + .replace( + "", + aggTradeRequest.getId() != null + ? aggTradeRequest.getId().toString() + : "") + .replace( + "", + aggTradeRequest.getSymbol() != null + ? aggTradeRequest.getSymbol().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void aggTradeValidateBeforeCall(AggTradeRequest aggTradeRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(aggTradeRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * All Market Rolling Window Statistics Streams Rolling window ticker statistics for all market + * symbols, computed over multiple windows. Note that only tickers that have changed will be + * present in the array. Update Speed: 1000ms + * + * @param allMarketRollingWindowTickerRequest (required) + * @return AllMarketRollingWindowTickerResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 All Market Rolling Window Statistics Streams -
+ * + * @see All + * Market Rolling Window Statistics Streams Documentation + */ + public StreamBlockingQueueWrapper + allMarketRollingWindowTicker( + AllMarketRollingWindowTickerRequest allMarketRollingWindowTickerRequest) + throws ApiException { + StreamBlockingQueue queue = + allMarketRollingWindowTickerRaw(allMarketRollingWindowTickerRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue allMarketRollingWindowTickerRaw( + AllMarketRollingWindowTickerRequest allMarketRollingWindowTickerRequest) + throws ApiException { + allMarketRollingWindowTickerValidateBeforeCall(allMarketRollingWindowTickerRequest); + + String methodName = + "/!ticker_@arr" + .substring(1) + .replace( + "", + allMarketRollingWindowTickerRequest.getId() != null + ? allMarketRollingWindowTickerRequest.getId().toString() + : "") + .replace( + "", + allMarketRollingWindowTickerRequest.getWindowSize() != null + ? allMarketRollingWindowTickerRequest + .getWindowSize() + .toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void allMarketRollingWindowTickerValidateBeforeCall( + AllMarketRollingWindowTickerRequest allMarketRollingWindowTickerRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(allMarketRollingWindowTickerRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * All Market Mini Tickers Stream 24hr rolling window mini-ticker statistics for all symbols + * that changed in an array. These are NOT the statistics of the UTC day, but a 24hr rolling + * window for the previous 24hrs. Note that only tickers that have changed will be present in + * the array. Update Speed: 1000ms + * + * @param allMiniTickerRequest (required) + * @return AllMiniTickerResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 All Market Mini Tickers Stream -
+ * + * @see All + * Market Mini Tickers Stream Documentation + */ + public StreamBlockingQueueWrapper allMiniTicker( + AllMiniTickerRequest allMiniTickerRequest) throws ApiException { + StreamBlockingQueue queue = allMiniTickerRaw(allMiniTickerRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue allMiniTickerRaw(AllMiniTickerRequest allMiniTickerRequest) + throws ApiException { + allMiniTickerValidateBeforeCall(allMiniTickerRequest); + + String methodName = + "/!miniTicker@arr" + .substring(1) + .replace( + "", + allMiniTickerRequest.getId() != null + ? allMiniTickerRequest.getId().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void allMiniTickerValidateBeforeCall(AllMiniTickerRequest allMiniTickerRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(allMiniTickerRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Average Price Average price streams push changes in the average price over a fixed time + * interval. Update Speed: 1000ms + * + * @param avgPriceRequest (required) + * @return AvgPriceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Average Price -
+ * + * @see Average + * Price Documentation + */ + public StreamBlockingQueueWrapper avgPrice(AvgPriceRequest avgPriceRequest) + throws ApiException { + StreamBlockingQueue queue = avgPriceRaw(avgPriceRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue avgPriceRaw(AvgPriceRequest avgPriceRequest) + throws ApiException { + avgPriceValidateBeforeCall(avgPriceRequest); + + String methodName = + "/@avgPrice" + .substring(1) + .replace( + "", + avgPriceRequest.getId() != null + ? avgPriceRequest.getId().toString() + : "") + .replace( + "", + avgPriceRequest.getSymbol() != null + ? avgPriceRequest.getSymbol().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void avgPriceValidateBeforeCall(AvgPriceRequest avgPriceRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(avgPriceRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Block Trade Streams Block Trade Streams push block trade information in real-time. Update + * Speed: Real-time + * + * @param blockTradeRequest (required) + * @return BlockTradeResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Block Trade Streams -
+ * + * @see Block + * Trade Streams Documentation + */ + public StreamBlockingQueueWrapper blockTrade( + BlockTradeRequest blockTradeRequest) throws ApiException { + StreamBlockingQueue queue = blockTradeRaw(blockTradeRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue blockTradeRaw(BlockTradeRequest blockTradeRequest) + throws ApiException { + blockTradeValidateBeforeCall(blockTradeRequest); + + String methodName = + "/@blockTrade" + .substring(1) + .replace( + "", + blockTradeRequest.getId() != null + ? blockTradeRequest.getId().toString() + : "") + .replace( + "", + blockTradeRequest.getSymbol() != null + ? blockTradeRequest.getSymbol().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void blockTradeValidateBeforeCall(BlockTradeRequest blockTradeRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(blockTradeRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Individual Symbol Book Ticker Streams Pushes any update to the best bid or ask's price or + * quantity in real-time for a specified symbol. Multiple `<symbol>@bookTicker` + * streams can be subscribed to over one connection. Update Speed: Real-time + * + * @param bookTickerRequest (required) + * @return BookTickerResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Individual Symbol Book Ticker Streams -
+ * + * @see Individual + * Symbol Book Ticker Streams Documentation + */ + public StreamBlockingQueueWrapper bookTicker( + BookTickerRequest bookTickerRequest) throws ApiException { + StreamBlockingQueue queue = bookTickerRaw(bookTickerRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue bookTickerRaw(BookTickerRequest bookTickerRequest) + throws ApiException { + bookTickerValidateBeforeCall(bookTickerRequest); + + String methodName = + "/@bookTicker" + .substring(1) + .replace( + "", + bookTickerRequest.getId() != null + ? bookTickerRequest.getId().toString() + : "") + .replace( + "", + bookTickerRequest.getSymbol() != null + ? bookTickerRequest.getSymbol().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void bookTickerValidateBeforeCall(BookTickerRequest bookTickerRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(bookTickerRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Diff. Depth Stream Order book price and quantity depth updates used to locally manage an + * order book. Update Speed: 1000ms or 100ms + * + * @param diffBookDepthRequest (required) + * @return DiffBookDepthResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Diff. Depth Stream -
+ * + * @see Diff. + * Depth Stream Documentation + */ + public StreamBlockingQueueWrapper diffBookDepth( + DiffBookDepthRequest diffBookDepthRequest) throws ApiException { + StreamBlockingQueue queue = diffBookDepthRaw(diffBookDepthRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue diffBookDepthRaw(DiffBookDepthRequest diffBookDepthRequest) + throws ApiException { + diffBookDepthValidateBeforeCall(diffBookDepthRequest); + + String methodName = + "/@depth@" + .substring(1) + .replace( + "", + diffBookDepthRequest.getId() != null + ? diffBookDepthRequest.getId().toString() + : "") + .replace( + "", + diffBookDepthRequest.getSymbol() != null + ? diffBookDepthRequest.getSymbol().toString() + : "") + .replace( + "", + diffBookDepthRequest.getUpdateSpeed() != null + ? diffBookDepthRequest.getUpdateSpeed().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void diffBookDepthValidateBeforeCall(DiffBookDepthRequest diffBookDepthRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(diffBookDepthRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Kline/Candlestick Streams for UTC The Kline/Candlestick Stream push updates to the current + * klines/candlestick every second in `UTC+0` timezone Update Speed: 1000ms for + * `1s`, 2000ms for the other intervals + * + * @param klineRequest (required) + * @return KlineResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Kline/Candlestick Streams for UTC -
+ * + * @see Kline/Candlestick + * Streams for UTC Documentation + */ + public StreamBlockingQueueWrapper kline(KlineRequest klineRequest) + throws ApiException { + StreamBlockingQueue queue = klineRaw(klineRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue klineRaw(KlineRequest klineRequest) throws ApiException { + klineValidateBeforeCall(klineRequest); + + String methodName = + "/@kline_" + .substring(1) + .replace( + "", + klineRequest.getId() != null ? klineRequest.getId().toString() : "") + .replace( + "", + klineRequest.getSymbol() != null + ? klineRequest.getSymbol().toString() + : "") + .replace( + "", + klineRequest.getInterval() != null + ? klineRequest.getInterval().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void klineValidateBeforeCall(KlineRequest klineRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = validator.validate(klineRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Kline/Candlestick Streams with timezone offset The Kline/Candlestick Stream push updates to + * the current klines/candlestick every second in `UTC+8` timezone **Kline/Candlestick + * chart intervals:** Supported intervals: See Kline/Candlestick chart intervals **UTC+8 + * timezone offset:** - Kline intervals open and close in the UTC+8 timezone. For example the 1d + * klines will open at the beginning of the UTC+8 day, and close at the end of the UTC+8 day. - + * Note that E (event time), t (start time) and T (close time) in the payload are Unix + * timestamps, which are always interpreted in UTC. Update Speed: 1000ms for `1s`, + * 2000ms for the other intervals + * + * @param klineOffsetRequest (required) + * @return KlineOffsetResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Kline/Candlestick Streams with timezone offset -
+ * + * @see Kline/Candlestick + * Streams with timezone offset Documentation + */ + public StreamBlockingQueueWrapper klineOffset( + KlineOffsetRequest klineOffsetRequest) throws ApiException { + StreamBlockingQueue queue = klineOffsetRaw(klineOffsetRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue klineOffsetRaw(KlineOffsetRequest klineOffsetRequest) + throws ApiException { + klineOffsetValidateBeforeCall(klineOffsetRequest); + + String methodName = + "/@kline_@+08:00" + .substring(1) + .replace( + "", + klineOffsetRequest.getId() != null + ? klineOffsetRequest.getId().toString() + : "") + .replace( + "", + klineOffsetRequest.getSymbol() != null + ? klineOffsetRequest.getSymbol().toString() + : "") + .replace( + "", + klineOffsetRequest.getInterval() != null + ? klineOffsetRequest.getInterval().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void klineOffsetValidateBeforeCall(KlineOffsetRequest klineOffsetRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(klineOffsetRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Individual Symbol Mini Ticker Stream 24hr rolling window mini-ticker statistics. These are + * NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs. Update + * Speed: 1000ms + * + * @param miniTickerRequest (required) + * @return MiniTickerResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Individual Symbol Mini Ticker Stream -
+ * + * @see Individual + * Symbol Mini Ticker Stream Documentation + */ + public StreamBlockingQueueWrapper miniTicker( + MiniTickerRequest miniTickerRequest) throws ApiException { + StreamBlockingQueue queue = miniTickerRaw(miniTickerRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue miniTickerRaw(MiniTickerRequest miniTickerRequest) + throws ApiException { + miniTickerValidateBeforeCall(miniTickerRequest); + + String methodName = + "/@miniTicker" + .substring(1) + .replace( + "", + miniTickerRequest.getId() != null + ? miniTickerRequest.getId().toString() + : "") + .replace( + "", + miniTickerRequest.getSymbol() != null + ? miniTickerRequest.getSymbol().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void miniTickerValidateBeforeCall(MiniTickerRequest miniTickerRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(miniTickerRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * WebSocket Partial Book Depth Streams Top **\\<levels\\>** bids and asks, pushed every + * second. Update Speed: 1000ms or 100ms + * + * @param partialBookDepthRequest (required) + * @return PartialBookDepthResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Partial Book Depth Streams -
+ * + * @see WebSocket + * Partial Book Depth Streams Documentation + */ + public StreamBlockingQueueWrapper partialBookDepth( + PartialBookDepthRequest partialBookDepthRequest) throws ApiException { + StreamBlockingQueue queue = partialBookDepthRaw(partialBookDepthRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue partialBookDepthRaw( + PartialBookDepthRequest partialBookDepthRequest) throws ApiException { + partialBookDepthValidateBeforeCall(partialBookDepthRequest); + + String methodName = + "/@depth@" + .substring(1) + .replace( + "", + partialBookDepthRequest.getId() != null + ? partialBookDepthRequest.getId().toString() + : "") + .replace( + "", + partialBookDepthRequest.getSymbol() != null + ? partialBookDepthRequest.getSymbol().toString() + : "") + .replace( + "", + partialBookDepthRequest.getLevels() != null + ? partialBookDepthRequest.getLevels().toString() + : "") + .replace( + "", + partialBookDepthRequest.getUpdateSpeed() != null + ? partialBookDepthRequest.getUpdateSpeed().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void partialBookDepthValidateBeforeCall(PartialBookDepthRequest partialBookDepthRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(partialBookDepthRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Reference Price Streams Reference price stream for a symbol. Update Speed: 1000ms + * + * @param referencePriceRequest (required) + * @return ReferencePriceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Reference Price Streams -
+ * + * @see Reference + * Price Streams Documentation + */ + public StreamBlockingQueueWrapper referencePrice( + ReferencePriceRequest referencePriceRequest) throws ApiException { + StreamBlockingQueue queue = referencePriceRaw(referencePriceRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue referencePriceRaw( + ReferencePriceRequest referencePriceRequest) throws ApiException { + referencePriceValidateBeforeCall(referencePriceRequest); + + String methodName = + "/@referencePrice" + .substring(1) + .replace( + "", + referencePriceRequest.getId() != null + ? referencePriceRequest.getId().toString() + : "") + .replace( + "", + referencePriceRequest.getSymbol() != null + ? referencePriceRequest.getSymbol().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void referencePriceValidateBeforeCall(ReferencePriceRequest referencePriceRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(referencePriceRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Individual Symbol Rolling Window Statistics Streams Rolling window ticker statistics for a + * single symbol, computed over multiple windows. **Note:** This stream is different from the + * `<symbol>@ticker` stream. The open time `\"O\"` always + * starts on a minute, while the closing time `\"C\"` is the current time of + * the update. As such, the effective window might be up to 59999ms wider than + * `<window_size>`. Update Speed: 1000ms + * + * @param rollingWindowTickerRequest (required) + * @return RollingWindowTickerResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Individual Symbol Rolling Window Statistics Streams -
+ * + * @see Individual + * Symbol Rolling Window Statistics Streams Documentation + */ + public StreamBlockingQueueWrapper rollingWindowTicker( + RollingWindowTickerRequest rollingWindowTickerRequest) throws ApiException { + StreamBlockingQueue queue = rollingWindowTickerRaw(rollingWindowTickerRequest); + + TypeToken typeToken = + new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue rollingWindowTickerRaw( + RollingWindowTickerRequest rollingWindowTickerRequest) throws ApiException { + rollingWindowTickerValidateBeforeCall(rollingWindowTickerRequest); + + String methodName = + "/@ticker_" + .substring(1) + .replace( + "", + rollingWindowTickerRequest.getId() != null + ? rollingWindowTickerRequest.getId().toString() + : "") + .replace( + "", + rollingWindowTickerRequest.getSymbol() != null + ? rollingWindowTickerRequest.getSymbol().toString() + : "") + .replace( + "", + rollingWindowTickerRequest.getWindowSize() != null + ? rollingWindowTickerRequest.getWindowSize().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void rollingWindowTickerValidateBeforeCall( + RollingWindowTickerRequest rollingWindowTickerRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = + validator.validate(rollingWindowTickerRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Individual Symbol Ticker Streams 24hr rolling window ticker statistics for a single symbol. + * These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous + * 24hrs. Update Speed: 1000ms + * + * @param tickerRequest (required) + * @return TickerResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Individual Symbol Ticker Streams -
+ * + * @see Individual + * Symbol Ticker Streams Documentation + */ + public StreamBlockingQueueWrapper ticker(TickerRequest tickerRequest) + throws ApiException { + StreamBlockingQueue queue = tickerRaw(tickerRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue tickerRaw(TickerRequest tickerRequest) throws ApiException { + tickerValidateBeforeCall(tickerRequest); + + String methodName = + "/@ticker" + .substring(1) + .replace( + "", + tickerRequest.getId() != null + ? tickerRequest.getId().toString() + : "") + .replace( + "", + tickerRequest.getSymbol() != null + ? tickerRequest.getSymbol().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void tickerValidateBeforeCall(TickerRequest tickerRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = validator.validate(tickerRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Trade Streams The Trade Streams push raw trade information; each trade has a unique buyer and + * seller. Update Speed: Real-time + * + * @param tradeRequest (required) + * @return TradeResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Trade Streams -
+ * + * @see Trade + * Streams Documentation + */ + public StreamBlockingQueueWrapper trade(TradeRequest tradeRequest) + throws ApiException { + StreamBlockingQueue queue = tradeRaw(tradeRequest); + + TypeToken typeToken = new TypeToken() {}; + + return new StreamBlockingQueueWrapper<>(queue, typeToken); + } + + public StreamBlockingQueue tradeRaw(TradeRequest tradeRequest) throws ApiException { + tradeValidateBeforeCall(tradeRequest); + + String methodName = + "/@trade" + .substring(1) + .replace( + "", + tradeRequest.getId() != null ? tradeRequest.getId().toString() : "") + .replace( + "", + tradeRequest.getSymbol() != null + ? tradeRequest.getSymbol().toString() + : ""); + if ("@".equals(methodName.substring(methodName.length() - 1))) { + methodName = methodName.substring(0, methodName.length() - 1); + } + + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(methodName)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + return queuesMap.get(methodName); + } + + @SuppressWarnings("rawtypes") + private void tradeValidateBeforeCall(TradeRequest tradeRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + + Set> violations = validator.validate(tradeRequest); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + public String getRequestID() { + return UUID.randomUUID().toString(); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/SpotWebSocketStreams.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/SpotWebSocketStreams.java index 0cf99dc56..0dc93fe72 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/SpotWebSocketStreams.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/SpotWebSocketStreams.java @@ -6,15 +6,20 @@ import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionPoolWrapper; import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionWrapper; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.dtos.RequestWrapperDTO; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueue; import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; import com.binance.connector.client.spot.websocket.stream.JSON; import com.binance.connector.client.spot.websocket.stream.model.AggTradeRequest; import com.binance.connector.client.spot.websocket.stream.model.AggTradeResponse; import com.binance.connector.client.spot.websocket.stream.model.AllMarketRollingWindowTickerRequest; import com.binance.connector.client.spot.websocket.stream.model.AllMarketRollingWindowTickerResponse; +import com.binance.connector.client.spot.websocket.stream.model.AllMiniTickerRequest; import com.binance.connector.client.spot.websocket.stream.model.AllMiniTickerResponse; import com.binance.connector.client.spot.websocket.stream.model.AvgPriceRequest; import com.binance.connector.client.spot.websocket.stream.model.AvgPriceResponse; +import com.binance.connector.client.spot.websocket.stream.model.BlockTradeRequest; +import com.binance.connector.client.spot.websocket.stream.model.BlockTradeResponse; import com.binance.connector.client.spot.websocket.stream.model.BookTickerRequest; import com.binance.connector.client.spot.websocket.stream.model.BookTickerResponse; import com.binance.connector.client.spot.websocket.stream.model.DiffBookDepthRequest; @@ -35,17 +40,22 @@ import com.binance.connector.client.spot.websocket.stream.model.TickerResponse; import com.binance.connector.client.spot.websocket.stream.model.TradeRequest; import com.binance.connector.client.spot.websocket.stream.model.TradeResponse; +import com.binance.connector.client.spot.websocket.stream.model.UserDataStreamEventsResponse; +import com.google.gson.reflect.TypeToken; +import java.util.Collections; +import java.util.Map; +import java.util.Set; import java.util.UUID; public class SpotWebSocketStreams { private static final String USER_AGENT = String.format( - "binance-spot/10.1.1 (Java/%s; %s; %s)", + "binance-spot/11.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final StreamConnectionInterface connection; - private WebSocketStreamsApi webSocketStreamsApi; + private DefaultApi defaultApi; public SpotWebSocketStreams(WebSocketClientConfiguration configuration) { this( @@ -61,7 +71,7 @@ public SpotWebSocketStreams(StreamConnectionInterface connection) { } this.connection = connection; - this.webSocketStreamsApi = new WebSocketStreamsApi(connection); + this.defaultApi = new DefaultApi(connection); } public void stop() throws Exception { @@ -72,74 +82,100 @@ public void stop() throws Exception { public StreamBlockingQueueWrapper aggTrade(AggTradeRequest aggTradeRequest) throws ApiException { - return webSocketStreamsApi.aggTrade(aggTradeRequest); + return defaultApi.aggTrade(aggTradeRequest); } public StreamBlockingQueueWrapper allMarketRollingWindowTicker( AllMarketRollingWindowTickerRequest allMarketRollingWindowTickerRequest) throws ApiException { - return webSocketStreamsApi.allMarketRollingWindowTicker( - allMarketRollingWindowTickerRequest); + return defaultApi.allMarketRollingWindowTicker(allMarketRollingWindowTickerRequest); } - public StreamBlockingQueueWrapper allMiniTicker() throws ApiException { - return webSocketStreamsApi.allMiniTicker(); + public StreamBlockingQueueWrapper allMiniTicker( + AllMiniTickerRequest allMiniTickerRequest) throws ApiException { + return defaultApi.allMiniTicker(allMiniTickerRequest); } public StreamBlockingQueueWrapper avgPrice(AvgPriceRequest avgPriceRequest) throws ApiException { - return webSocketStreamsApi.avgPrice(avgPriceRequest); + return defaultApi.avgPrice(avgPriceRequest); + } + + public StreamBlockingQueueWrapper blockTrade( + BlockTradeRequest blockTradeRequest) throws ApiException { + return defaultApi.blockTrade(blockTradeRequest); } public StreamBlockingQueueWrapper bookTicker( BookTickerRequest bookTickerRequest) throws ApiException { - return webSocketStreamsApi.bookTicker(bookTickerRequest); + return defaultApi.bookTicker(bookTickerRequest); } public StreamBlockingQueueWrapper diffBookDepth( DiffBookDepthRequest diffBookDepthRequest) throws ApiException { - return webSocketStreamsApi.diffBookDepth(diffBookDepthRequest); + return defaultApi.diffBookDepth(diffBookDepthRequest); } public StreamBlockingQueueWrapper kline(KlineRequest klineRequest) throws ApiException { - return webSocketStreamsApi.kline(klineRequest); + return defaultApi.kline(klineRequest); } public StreamBlockingQueueWrapper klineOffset( KlineOffsetRequest klineOffsetRequest) throws ApiException { - return webSocketStreamsApi.klineOffset(klineOffsetRequest); + return defaultApi.klineOffset(klineOffsetRequest); } public StreamBlockingQueueWrapper miniTicker( MiniTickerRequest miniTickerRequest) throws ApiException { - return webSocketStreamsApi.miniTicker(miniTickerRequest); + return defaultApi.miniTicker(miniTickerRequest); } public StreamBlockingQueueWrapper partialBookDepth( PartialBookDepthRequest partialBookDepthRequest) throws ApiException { - return webSocketStreamsApi.partialBookDepth(partialBookDepthRequest); + return defaultApi.partialBookDepth(partialBookDepthRequest); } public StreamBlockingQueueWrapper referencePrice( ReferencePriceRequest referencePriceRequest) throws ApiException { - return webSocketStreamsApi.referencePrice(referencePriceRequest); + return defaultApi.referencePrice(referencePriceRequest); } public StreamBlockingQueueWrapper rollingWindowTicker( RollingWindowTickerRequest rollingWindowTickerRequest) throws ApiException { - return webSocketStreamsApi.rollingWindowTicker(rollingWindowTickerRequest); + return defaultApi.rollingWindowTicker(rollingWindowTickerRequest); } public StreamBlockingQueueWrapper ticker(TickerRequest tickerRequest) throws ApiException { - return webSocketStreamsApi.ticker(tickerRequest); + return defaultApi.ticker(tickerRequest); } public StreamBlockingQueueWrapper trade(TradeRequest tradeRequest) throws ApiException { - return webSocketStreamsApi.trade(tradeRequest); + return defaultApi.trade(tradeRequest); + } + + /** + * Subscribes to the user data WebSocket stream using the provided listen key. + * + * @param listenKey - The listen key for the user data WebSocket stream. + * @return A WebSocket stream handler for the user data stream. + */ + public StreamBlockingQueueWrapper userData(String listenKey) { + RequestWrapperDTO, Object> requestWrapperDTO = + new RequestWrapperDTO.Builder, Object>() + .id(getRequestID()) + .method("SUBSCRIBE") + .params(Collections.singleton(listenKey)) + .build(); + Map> queuesMap = + connection.subscribe(requestWrapperDTO); + + TypeToken typeToken = new TypeToken<>() {}; + StreamBlockingQueue queue = queuesMap.get(listenKey); + return new StreamBlockingQueueWrapper<>(queue, typeToken, JSON.getGson()); } public String getRequestID() { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/WebSocketStreamsApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/WebSocketStreamsApi.java deleted file mode 100644 index 2e5482ff0..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/WebSocketStreamsApi.java +++ /dev/null @@ -1,1193 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.api; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.SystemUtil; -import com.binance.connector.client.common.exception.ConstraintViolationException; -import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionInterface; -import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionPoolWrapper; -import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionWrapper; -import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; -import com.binance.connector.client.common.websocket.dtos.RequestWrapperDTO; -import com.binance.connector.client.common.websocket.service.StreamBlockingQueue; -import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.binance.connector.client.spot.websocket.stream.model.AggTradeRequest; -import com.binance.connector.client.spot.websocket.stream.model.AggTradeResponse; -import com.binance.connector.client.spot.websocket.stream.model.AllMarketRollingWindowTickerRequest; -import com.binance.connector.client.spot.websocket.stream.model.AllMarketRollingWindowTickerResponse; -import com.binance.connector.client.spot.websocket.stream.model.AllMiniTickerResponse; -import com.binance.connector.client.spot.websocket.stream.model.AvgPriceRequest; -import com.binance.connector.client.spot.websocket.stream.model.AvgPriceResponse; -import com.binance.connector.client.spot.websocket.stream.model.BookTickerRequest; -import com.binance.connector.client.spot.websocket.stream.model.BookTickerResponse; -import com.binance.connector.client.spot.websocket.stream.model.DiffBookDepthRequest; -import com.binance.connector.client.spot.websocket.stream.model.DiffBookDepthResponse; -import com.binance.connector.client.spot.websocket.stream.model.KlineOffsetRequest; -import com.binance.connector.client.spot.websocket.stream.model.KlineOffsetResponse; -import com.binance.connector.client.spot.websocket.stream.model.KlineRequest; -import com.binance.connector.client.spot.websocket.stream.model.KlineResponse; -import com.binance.connector.client.spot.websocket.stream.model.MiniTickerRequest; -import com.binance.connector.client.spot.websocket.stream.model.MiniTickerResponse; -import com.binance.connector.client.spot.websocket.stream.model.PartialBookDepthRequest; -import com.binance.connector.client.spot.websocket.stream.model.PartialBookDepthResponse; -import com.binance.connector.client.spot.websocket.stream.model.ReferencePriceRequest; -import com.binance.connector.client.spot.websocket.stream.model.ReferencePriceResponse; -import com.binance.connector.client.spot.websocket.stream.model.RollingWindowTickerRequest; -import com.binance.connector.client.spot.websocket.stream.model.RollingWindowTickerResponse; -import com.binance.connector.client.spot.websocket.stream.model.TickerRequest; -import com.binance.connector.client.spot.websocket.stream.model.TickerResponse; -import com.binance.connector.client.spot.websocket.stream.model.TradeRequest; -import com.binance.connector.client.spot.websocket.stream.model.TradeResponse; -import com.google.gson.reflect.TypeToken; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.Validation; -import jakarta.validation.Validator; -import jakarta.validation.constraints.*; -import java.util.Collections; -import java.util.Map; -import java.util.Set; -import java.util.UUID; -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; - -public class WebSocketStreamsApi { - private static final String USER_AGENT = - String.format( - "binance-spot/10.1.1 (Java/%s; %s; %s)", - SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); - - private StreamConnectionInterface connection; - - public WebSocketStreamsApi() {} - - public WebSocketStreamsApi(WebSocketClientConfiguration configuration) { - this( - configuration.getUsePool() - ? new StreamConnectionPoolWrapper(configuration, JSON.getGson()) - : new StreamConnectionWrapper(configuration, JSON.getGson())); - } - - public WebSocketStreamsApi(StreamConnectionInterface connection) { - connection.setUserAgent(USER_AGENT); - if (!connection.isConnected()) { - connection.connect(); - } - this.connection = connection; - } - - public StreamConnectionInterface getConnection() { - return connection; - } - - /** - * WebSocket Aggregate Trade Streams The Aggregate Trade Streams push trade information that is - * aggregated for a single taker order. - * - * @param aggTradeRequest (required) - * @return AggTradeResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Aggregate Trade Streams -
- * - * @see WebSocket - * Aggregate Trade Streams Documentation - */ - public StreamBlockingQueueWrapper aggTrade(AggTradeRequest aggTradeRequest) - throws ApiException { - StreamBlockingQueue queue = aggTradeRaw(aggTradeRequest); - - TypeToken typeToken = new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue aggTradeRaw(AggTradeRequest aggTradeRequest) - throws ApiException { - aggTradeValidateBeforeCall(aggTradeRequest); - - String methodName = - "/@aggTrade" - .substring(1) - .replace( - "", - aggTradeRequest.getSymbol() != null - ? aggTradeRequest.getSymbol().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void aggTradeValidateBeforeCall(AggTradeRequest aggTradeRequest) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(aggTradeRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * WebSocket All Market Rolling Window Statistics Streams Rolling window ticker statistics for - * all market symbols, computed over multiple windows. Note that only tickers that have changed - * will be present in the array. - * - * @param allMarketRollingWindowTickerRequest (required) - * @return AllMarketRollingWindowTickerResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 All Market Rolling Window Statistics Streams -
- * - * @see WebSocket - * All Market Rolling Window Statistics Streams Documentation - */ - public StreamBlockingQueueWrapper - allMarketRollingWindowTicker( - AllMarketRollingWindowTickerRequest allMarketRollingWindowTickerRequest) - throws ApiException { - StreamBlockingQueue queue = - allMarketRollingWindowTickerRaw(allMarketRollingWindowTickerRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue allMarketRollingWindowTickerRaw( - AllMarketRollingWindowTickerRequest allMarketRollingWindowTickerRequest) - throws ApiException { - allMarketRollingWindowTickerValidateBeforeCall(allMarketRollingWindowTickerRequest); - - String methodName = - "/!ticker_@arr" - .substring(1) - .replace( - "", - allMarketRollingWindowTickerRequest.getWindowSize() != null - ? allMarketRollingWindowTickerRequest - .getWindowSize() - .toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void allMarketRollingWindowTickerValidateBeforeCall( - AllMarketRollingWindowTickerRequest allMarketRollingWindowTickerRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(allMarketRollingWindowTickerRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * WebSocket All Market Mini Tickers Stream 24hr rolling window mini-ticker statistics for all - * symbols that changed in an array. These are NOT the statistics of the UTC day, but a 24hr - * rolling window for the previous 24hrs. Note that only tickers that have changed will be - * present in the array. - * - * @return AllMiniTickerResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 All Market Mini Tickers Stream -
- * - * @see WebSocket - * All Market Mini Tickers Stream Documentation - */ - public StreamBlockingQueueWrapper allMiniTicker() throws ApiException { - StreamBlockingQueue queue = allMiniTickerRaw(); - - TypeToken typeToken = new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue allMiniTickerRaw() throws ApiException { - allMiniTickerValidateBeforeCall(); - - String methodName = "/!miniTicker@arr".substring(1); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void allMiniTickerValidateBeforeCall() throws ApiException {} - - /** - * WebSocket Average Price Average price streams push changes in the average price over a fixed - * time interval. - * - * @param avgPriceRequest (required) - * @return AvgPriceResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Average Price -
- * - * @see WebSocket - * Average Price Documentation - */ - public StreamBlockingQueueWrapper avgPrice(AvgPriceRequest avgPriceRequest) - throws ApiException { - StreamBlockingQueue queue = avgPriceRaw(avgPriceRequest); - - TypeToken typeToken = new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue avgPriceRaw(AvgPriceRequest avgPriceRequest) - throws ApiException { - avgPriceValidateBeforeCall(avgPriceRequest); - - String methodName = - "/@avgPrice" - .substring(1) - .replace( - "", - avgPriceRequest.getSymbol() != null - ? avgPriceRequest.getSymbol().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void avgPriceValidateBeforeCall(AvgPriceRequest avgPriceRequest) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(avgPriceRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * WebSocket Individual Symbol Book Ticker Streams Pushes any update to the best bid or - * ask's price or quantity in real-time for a specified symbol. Multiple - * `<symbol>@bookTicker` streams can be subscribed to over one connection. - * - * @param bookTickerRequest (required) - * @return BookTickerResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Individual Symbol Book Ticker Streams -
- * - * @see WebSocket - * Individual Symbol Book Ticker Streams Documentation - */ - public StreamBlockingQueueWrapper bookTicker( - BookTickerRequest bookTickerRequest) throws ApiException { - StreamBlockingQueue queue = bookTickerRaw(bookTickerRequest); - - TypeToken typeToken = new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue bookTickerRaw(BookTickerRequest bookTickerRequest) - throws ApiException { - bookTickerValidateBeforeCall(bookTickerRequest); - - String methodName = - "/@bookTicker" - .substring(1) - .replace( - "", - bookTickerRequest.getSymbol() != null - ? bookTickerRequest.getSymbol().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void bookTickerValidateBeforeCall(BookTickerRequest bookTickerRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(bookTickerRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * WebSocket Diff. Depth Stream Order book price and quantity depth updates used to locally - * manage an order book. - * - * @param diffBookDepthRequest (required) - * @return DiffBookDepthResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Diff. Depth Stream -
- * - * @see WebSocket - * Diff. Depth Stream Documentation - */ - public StreamBlockingQueueWrapper diffBookDepth( - DiffBookDepthRequest diffBookDepthRequest) throws ApiException { - StreamBlockingQueue queue = diffBookDepthRaw(diffBookDepthRequest); - - TypeToken typeToken = new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue diffBookDepthRaw(DiffBookDepthRequest diffBookDepthRequest) - throws ApiException { - diffBookDepthValidateBeforeCall(diffBookDepthRequest); - - String methodName = - "/@depth@" - .substring(1) - .replace( - "", - diffBookDepthRequest.getSymbol() != null - ? diffBookDepthRequest.getSymbol().toString() - : "") - .replace( - "", - diffBookDepthRequest.getUpdateSpeed() != null - ? diffBookDepthRequest.getUpdateSpeed().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void diffBookDepthValidateBeforeCall(DiffBookDepthRequest diffBookDepthRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(diffBookDepthRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * WebSocket Kline/Candlestick Streams for UTC The Kline/Candlestick Stream push updates to the - * current klines/candlestick every second in `UTC+0` timezone <a - * id=\"kline-intervals\"></a> - * - * @param klineRequest (required) - * @return KlineResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Kline/Candlestick Streams for UTC -
- * - * @see WebSocket - * Kline/Candlestick Streams for UTC Documentation - */ - public StreamBlockingQueueWrapper kline(KlineRequest klineRequest) - throws ApiException { - StreamBlockingQueue queue = klineRaw(klineRequest); - - TypeToken typeToken = new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue klineRaw(KlineRequest klineRequest) throws ApiException { - klineValidateBeforeCall(klineRequest); - - String methodName = - "/@kline_" - .substring(1) - .replace( - "", - klineRequest.getSymbol() != null - ? klineRequest.getSymbol().toString() - : "") - .replace( - "", - klineRequest.getInterval() != null - ? klineRequest.getInterval().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void klineValidateBeforeCall(KlineRequest klineRequest) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = validator.validate(klineRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * WebSocket Kline/Candlestick Streams with timezone offset The Kline/Candlestick Stream push - * updates to the current klines/candlestick every second in `UTC+8` timezone - * - * @param klineOffsetRequest (required) - * @return KlineOffsetResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Kline/Candlestick Streams with timezone offset -
- * - * @see WebSocket - * Kline/Candlestick Streams with timezone offset Documentation - */ - public StreamBlockingQueueWrapper klineOffset( - KlineOffsetRequest klineOffsetRequest) throws ApiException { - StreamBlockingQueue queue = klineOffsetRaw(klineOffsetRequest); - - TypeToken typeToken = new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue klineOffsetRaw(KlineOffsetRequest klineOffsetRequest) - throws ApiException { - klineOffsetValidateBeforeCall(klineOffsetRequest); - - String methodName = - "/@kline_@+08:00" - .substring(1) - .replace( - "", - klineOffsetRequest.getSymbol() != null - ? klineOffsetRequest.getSymbol().toString() - : "") - .replace( - "", - klineOffsetRequest.getInterval() != null - ? klineOffsetRequest.getInterval().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void klineOffsetValidateBeforeCall(KlineOffsetRequest klineOffsetRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(klineOffsetRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * WebSocket Individual Symbol Mini Ticker Stream 24hr rolling window mini-ticker statistics. - * These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous - * 24hrs. - * - * @param miniTickerRequest (required) - * @return MiniTickerResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Individual Symbol Mini Ticker Stream -
- * - * @see WebSocket - * Individual Symbol Mini Ticker Stream Documentation - */ - public StreamBlockingQueueWrapper miniTicker( - MiniTickerRequest miniTickerRequest) throws ApiException { - StreamBlockingQueue queue = miniTickerRaw(miniTickerRequest); - - TypeToken typeToken = new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue miniTickerRaw(MiniTickerRequest miniTickerRequest) - throws ApiException { - miniTickerValidateBeforeCall(miniTickerRequest); - - String methodName = - "/@miniTicker" - .substring(1) - .replace( - "", - miniTickerRequest.getSymbol() != null - ? miniTickerRequest.getSymbol().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void miniTickerValidateBeforeCall(MiniTickerRequest miniTickerRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(miniTickerRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * WebSocket Partial Book Depth Streams Top **\\<levels\\>** bids and asks, pushed every - * second. Valid **\\<levels\\>** are 5, 10, or 20. - * - * @param partialBookDepthRequest (required) - * @return PartialBookDepthResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Partial Book Depth Streams -
- * - * @see WebSocket - * Partial Book Depth Streams Documentation - */ - public StreamBlockingQueueWrapper partialBookDepth( - PartialBookDepthRequest partialBookDepthRequest) throws ApiException { - StreamBlockingQueue queue = partialBookDepthRaw(partialBookDepthRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue partialBookDepthRaw( - PartialBookDepthRequest partialBookDepthRequest) throws ApiException { - partialBookDepthValidateBeforeCall(partialBookDepthRequest); - - String methodName = - "/@depth@" - .substring(1) - .replace( - "", - partialBookDepthRequest.getSymbol() != null - ? partialBookDepthRequest.getSymbol().toString() - : "") - .replace( - "", - partialBookDepthRequest.getLevels() != null - ? partialBookDepthRequest.getLevels().toString() - : "") - .replace( - "", - partialBookDepthRequest.getUpdateSpeed() != null - ? partialBookDepthRequest.getUpdateSpeed().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void partialBookDepthValidateBeforeCall(PartialBookDepthRequest partialBookDepthRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(partialBookDepthRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * WebSocket Reference Price Streams - * - * @param referencePriceRequest (required) - * @return ReferencePriceResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Reference Price Streams -
- * - * @see WebSocket - * Reference Price Streams Documentation - */ - public StreamBlockingQueueWrapper referencePrice( - ReferencePriceRequest referencePriceRequest) throws ApiException { - StreamBlockingQueue queue = referencePriceRaw(referencePriceRequest); - - TypeToken typeToken = new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue referencePriceRaw( - ReferencePriceRequest referencePriceRequest) throws ApiException { - referencePriceValidateBeforeCall(referencePriceRequest); - - String methodName = - "/@referencePrice" - .substring(1) - .replace( - "", - referencePriceRequest.getSymbol() != null - ? referencePriceRequest.getSymbol().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void referencePriceValidateBeforeCall(ReferencePriceRequest referencePriceRequest) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(referencePriceRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * WebSocket Individual Symbol Rolling Window Statistics Streams Rolling window ticker - * statistics for a single symbol, computed over multiple windows. - * - * @param rollingWindowTickerRequest (required) - * @return RollingWindowTickerResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Individual Symbol Rolling Window Statistics Streams -
- * - * @see WebSocket - * Individual Symbol Rolling Window Statistics Streams Documentation - */ - public StreamBlockingQueueWrapper rollingWindowTicker( - RollingWindowTickerRequest rollingWindowTickerRequest) throws ApiException { - StreamBlockingQueue queue = rollingWindowTickerRaw(rollingWindowTickerRequest); - - TypeToken typeToken = - new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue rollingWindowTickerRaw( - RollingWindowTickerRequest rollingWindowTickerRequest) throws ApiException { - rollingWindowTickerValidateBeforeCall(rollingWindowTickerRequest); - - String methodName = - "/@ticker_" - .substring(1) - .replace( - "", - rollingWindowTickerRequest.getSymbol() != null - ? rollingWindowTickerRequest.getSymbol().toString() - : "") - .replace( - "", - rollingWindowTickerRequest.getWindowSize() != null - ? rollingWindowTickerRequest.getWindowSize().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void rollingWindowTickerValidateBeforeCall( - RollingWindowTickerRequest rollingWindowTickerRequest) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = - validator.validate(rollingWindowTickerRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * WebSocket Individual Symbol Ticker Streams 24hr rolling window ticker statistics for a single - * symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window for the - * previous 24hrs. - * - * @param tickerRequest (required) - * @return TickerResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Individual Symbol Ticker Streams -
- * - * @see WebSocket - * Individual Symbol Ticker Streams Documentation - */ - public StreamBlockingQueueWrapper ticker(TickerRequest tickerRequest) - throws ApiException { - StreamBlockingQueue queue = tickerRaw(tickerRequest); - - TypeToken typeToken = new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue tickerRaw(TickerRequest tickerRequest) throws ApiException { - tickerValidateBeforeCall(tickerRequest); - - String methodName = - "/@ticker" - .substring(1) - .replace( - "", - tickerRequest.getSymbol() != null - ? tickerRequest.getSymbol().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void tickerValidateBeforeCall(TickerRequest tickerRequest) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = validator.validate(tickerRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * WebSocket Trade Streams The Trade Streams push raw trade information; each trade has a unique - * buyer and seller. - * - * @param tradeRequest (required) - * @return TradeResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Trade Streams -
- * - * @see WebSocket - * Trade Streams Documentation - */ - public StreamBlockingQueueWrapper trade(TradeRequest tradeRequest) - throws ApiException { - StreamBlockingQueue queue = tradeRaw(tradeRequest); - - TypeToken typeToken = new TypeToken() {}; - - return new StreamBlockingQueueWrapper<>(queue, typeToken); - } - - public StreamBlockingQueue tradeRaw(TradeRequest tradeRequest) throws ApiException { - tradeValidateBeforeCall(tradeRequest); - - String methodName = - "/@trade" - .substring(1) - .replace( - "", - tradeRequest.getSymbol() != null - ? tradeRequest.getSymbol().toString() - : ""); - if ("@".equals(methodName.substring(methodName.length() - 1))) { - methodName = methodName.substring(0, methodName.length() - 1); - } - - RequestWrapperDTO, Object> requestWrapperDTO = - new RequestWrapperDTO.Builder, Object>() - .id(getRequestID()) - .method("SUBSCRIBE") - .params(Collections.singleton(methodName)) - .build(); - Map> queuesMap = - connection.subscribe(requestWrapperDTO); - return queuesMap.get(methodName); - } - - @SuppressWarnings("rawtypes") - private void tradeValidateBeforeCall(TradeRequest tradeRequest) throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - - Set> violations = validator.validate(tradeRequest); - - if (!violations.isEmpty()) { - throw new ConstraintViolationException(violations); - } - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - public String getRequestID() { - return UUID.randomUUID().toString(); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AbstractOpenApiSchema.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AbstractOpenApiSchema.java index d868e4590..1dfa66539 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AbstractOpenApiSchema.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AbstractOpenApiSchema.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -18,7 +18,7 @@ /** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AggTradeRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AggTradeRequest.java index f5c77bc02..f224d84c2 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AggTradeRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AggTradeRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,33 +37,57 @@ /** AggTradeRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AggTradeRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public AggTradeRequest() {} - public AggTradeRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public AggTradeRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public AggTradeRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Symbol to query * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -76,18 +100,20 @@ public boolean equals(Object o) { return false; } AggTradeRequest aggTradeRequest = (AggTradeRequest) o; - return Objects.equals(this.symbol, aggTradeRequest.symbol); + return Objects.equals(this.id, aggTradeRequest.id) + && Objects.equals(this.symbol, aggTradeRequest.symbol); } @Override public int hashCode() { - return Objects.hash(symbol); + return Objects.hash(id, symbol); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AggTradeRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append("}"); return sb.toString(); @@ -97,6 +123,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -113,6 +144,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -143,11 +178,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -179,18 +214,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AggTradeRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AggTradeResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AggTradeResponse.java index 2e15add0d..64b67d275 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AggTradeResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AggTradeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AggTradeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AggTradeResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -113,7 +113,7 @@ public AggTradeResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCas } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -132,7 +132,7 @@ public AggTradeResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -151,7 +151,7 @@ public AggTradeResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCas } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -170,7 +170,7 @@ public AggTradeResponse aLowerCase(@jakarta.annotation.Nullable Long aLowerCase) } /** - * Get aLowerCase + * Aggregate trade ID * * @return aLowerCase */ @@ -189,7 +189,7 @@ public AggTradeResponse pLowerCase(@jakarta.annotation.Nullable String pLowerCas } /** - * Get pLowerCase + * Price * * @return pLowerCase */ @@ -208,7 +208,7 @@ public AggTradeResponse qLowerCase(@jakarta.annotation.Nullable String qLowerCas } /** - * Get qLowerCase + * Quantity * * @return qLowerCase */ @@ -227,7 +227,7 @@ public AggTradeResponse fLowerCase(@jakarta.annotation.Nullable Long fLowerCase) } /** - * Get fLowerCase + * First trade ID * * @return fLowerCase */ @@ -246,7 +246,7 @@ public AggTradeResponse lLowerCase(@jakarta.annotation.Nullable Long lLowerCase) } /** - * Get lLowerCase + * Last trade ID * * @return lLowerCase */ @@ -265,7 +265,7 @@ public AggTradeResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Trade time * * @return T */ @@ -284,7 +284,7 @@ public AggTradeResponse mLowerCase(@jakarta.annotation.Nullable Boolean mLowerCa } /** - * Get mLowerCase + * Is the buyer the market maker? * * @return mLowerCase */ @@ -303,7 +303,7 @@ public AggTradeResponse M(@jakarta.annotation.Nullable Boolean M) { } /** - * Get M + * Ignore * * @return M */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMarketRollingWindowTickerRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMarketRollingWindowTickerRequest.java index d6afbb7d2..25ea2412a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMarketRollingWindowTickerRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMarketRollingWindowTickerRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,18 +38,43 @@ /** AllMarketRollingWindowTickerRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketRollingWindowTickerRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_WINDOW_SIZE = "windowSize"; @SerializedName(SERIALIZED_NAME_WINDOW_SIZE) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private WindowSize windowSize; public AllMarketRollingWindowTickerRequest() {} + public AllMarketRollingWindowTickerRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public AllMarketRollingWindowTickerRequest windowSize( - @jakarta.annotation.Nonnull WindowSize windowSize) { + @jakarta.annotation.Nullable WindowSize windowSize) { this.windowSize = windowSize; return this; } @@ -59,14 +84,13 @@ public AllMarketRollingWindowTickerRequest windowSize( * * @return windowSize */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable @Valid public WindowSize getWindowSize() { return windowSize; } - public void setWindowSize(@jakarta.annotation.Nonnull WindowSize windowSize) { + public void setWindowSize(@jakarta.annotation.Nullable WindowSize windowSize) { this.windowSize = windowSize; } @@ -80,18 +104,20 @@ public boolean equals(Object o) { } AllMarketRollingWindowTickerRequest allMarketRollingWindowTickerRequest = (AllMarketRollingWindowTickerRequest) o; - return Objects.equals(this.windowSize, allMarketRollingWindowTickerRequest.windowSize); + return Objects.equals(this.id, allMarketRollingWindowTickerRequest.id) + && Objects.equals(this.windowSize, allMarketRollingWindowTickerRequest.windowSize); } @Override public int hashCode() { - return Objects.hash(windowSize); + return Objects.hash(id, windowSize); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AllMarketRollingWindowTickerRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" windowSize: ").append(toIndentedString(windowSize)).append("\n"); sb.append("}"); return sb.toString(); @@ -101,6 +127,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } WindowSize windowSizeValue = getWindowSize(); if (windowSizeValue != null) { String windowSizeValueAsString = windowSizeValue.toString(); @@ -117,6 +148,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object windowSizeValue = getWindowSize(); if (windowSizeValue != null) { valMap.put("windowSize", windowSizeValue); @@ -147,11 +182,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("windowSize"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("windowSize"); } /** @@ -185,19 +220,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AllMarketRollingWindowTickerRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `windowSize` - WindowSize.validateJsonElement(jsonObj.get("windowSize")); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + // validate the optional field `windowSize` + if (jsonObj.get("windowSize") != null && !jsonObj.get("windowSize").isJsonNull()) { + WindowSize.validateJsonElement(jsonObj.get("windowSize")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMarketRollingWindowTickerResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMarketRollingWindowTickerResponse.java index 411c24a60..9df327a2b 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMarketRollingWindowTickerResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMarketRollingWindowTickerResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** AllMarketRollingWindowTickerResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketRollingWindowTickerResponse extends ArrayList { public AllMarketRollingWindowTickerResponse() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMarketRollingWindowTickerResponseInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMarketRollingWindowTickerResponseInner.java index ea6da1af5..415cde0b3 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMarketRollingWindowTickerResponseInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMarketRollingWindowTickerResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AllMarketRollingWindowTickerResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMarketRollingWindowTickerResponseInner extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -150,7 +150,7 @@ public AllMarketRollingWindowTickerResponseInner eLowerCase( } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -169,7 +169,7 @@ public AllMarketRollingWindowTickerResponseInner E(@jakarta.annotation.Nullable } /** - * Get E + * Event time * * @return E */ @@ -189,7 +189,7 @@ public AllMarketRollingWindowTickerResponseInner sLowerCase( } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -209,7 +209,7 @@ public AllMarketRollingWindowTickerResponseInner pLowerCase( } /** - * Get pLowerCase + * Price change * * @return pLowerCase */ @@ -228,7 +228,7 @@ public AllMarketRollingWindowTickerResponseInner P(@jakarta.annotation.Nullable } /** - * Get P + * Price change percent * * @return P */ @@ -248,7 +248,7 @@ public AllMarketRollingWindowTickerResponseInner oLowerCase( } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -268,7 +268,7 @@ public AllMarketRollingWindowTickerResponseInner hLowerCase( } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -288,7 +288,7 @@ public AllMarketRollingWindowTickerResponseInner lLowerCase( } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -308,7 +308,7 @@ public AllMarketRollingWindowTickerResponseInner cLowerCase( } /** - * Get cLowerCase + * Last price * * @return cLowerCase */ @@ -328,7 +328,7 @@ public AllMarketRollingWindowTickerResponseInner wLowerCase( } /** - * Get wLowerCase + * Weighted average price * * @return wLowerCase */ @@ -348,7 +348,7 @@ public AllMarketRollingWindowTickerResponseInner vLowerCase( } /** - * Get vLowerCase + * Total traded base asset volume * * @return vLowerCase */ @@ -368,7 +368,7 @@ public AllMarketRollingWindowTickerResponseInner qLowerCase( } /** - * Get qLowerCase + * Total traded quote asset volume * * @return qLowerCase */ @@ -387,7 +387,7 @@ public AllMarketRollingWindowTickerResponseInner O(@jakarta.annotation.Nullable } /** - * Get O + * Statistics open time * * @return O */ @@ -406,7 +406,7 @@ public AllMarketRollingWindowTickerResponseInner C(@jakarta.annotation.Nullable } /** - * Get C + * Statistics close time * * @return C */ @@ -425,7 +425,7 @@ public AllMarketRollingWindowTickerResponseInner F(@jakarta.annotation.Nullable } /** - * Get F + * First trade ID * * @return F */ @@ -444,7 +444,7 @@ public AllMarketRollingWindowTickerResponseInner L(@jakarta.annotation.Nullable } /** - * Get L + * Last trade Id * * @return L */ @@ -464,7 +464,7 @@ public AllMarketRollingWindowTickerResponseInner nLowerCase( } /** - * Get nLowerCase + * Total number of trades * * @return nLowerCase */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMiniTickerRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMiniTickerRequest.java new file mode 100644 index 000000000..a2fef3a32 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMiniTickerRequest.java @@ -0,0 +1,240 @@ +/* + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AllMiniTickerRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AllMiniTickerRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + + public AllMiniTickerRequest() {} + + public AllMiniTickerRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllMiniTickerRequest allMiniTickerRequest = (AllMiniTickerRequest) o; + return Objects.equals(this.id, allMiniTickerRequest.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllMiniTickerRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AllMiniTickerRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AllMiniTickerRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AllMiniTickerRequest is not found in" + + " the empty JSON string", + AllMiniTickerRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AllMiniTickerRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AllMiniTickerRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AllMiniTickerRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AllMiniTickerRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AllMiniTickerRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AllMiniTickerRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AllMiniTickerRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AllMiniTickerRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AllMiniTickerRequest + * @throws IOException if the JSON string is invalid with respect to AllMiniTickerRequest + */ + public static AllMiniTickerRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AllMiniTickerRequest.class); + } + + /** + * Convert an instance of AllMiniTickerRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMiniTickerResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMiniTickerResponse.java index 58a0c74a0..107426629 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMiniTickerResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMiniTickerResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** AllMiniTickerResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMiniTickerResponse extends ArrayList { public AllMiniTickerResponse() {} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMiniTickerResponseInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMiniTickerResponseInner.java index 8f1d7c1bb..74edf7808 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMiniTickerResponseInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AllMiniTickerResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AllMiniTickerResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllMiniTickerResponseInner extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -101,7 +101,7 @@ public AllMiniTickerResponseInner eLowerCase(@jakarta.annotation.Nullable String } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -120,7 +120,7 @@ public AllMiniTickerResponseInner E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -139,7 +139,7 @@ public AllMiniTickerResponseInner sLowerCase(@jakarta.annotation.Nullable String } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -158,7 +158,7 @@ public AllMiniTickerResponseInner cLowerCase(@jakarta.annotation.Nullable String } /** - * Get cLowerCase + * Close price * * @return cLowerCase */ @@ -177,7 +177,7 @@ public AllMiniTickerResponseInner oLowerCase(@jakarta.annotation.Nullable String } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -196,7 +196,7 @@ public AllMiniTickerResponseInner hLowerCase(@jakarta.annotation.Nullable String } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -215,7 +215,7 @@ public AllMiniTickerResponseInner lLowerCase(@jakarta.annotation.Nullable String } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -234,7 +234,7 @@ public AllMiniTickerResponseInner vLowerCase(@jakarta.annotation.Nullable String } /** - * Get vLowerCase + * Total traded base asset volume * * @return vLowerCase */ @@ -253,7 +253,7 @@ public AllMiniTickerResponseInner qLowerCase(@jakarta.annotation.Nullable String } /** - * Get qLowerCase + * Total traded quote asset volume * * @return qLowerCase */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AssetFilters.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AssetFilters.java deleted file mode 100644 index 59e7ad22a..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AssetFilters.java +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AssetFilters extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(AssetFilters.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AssetFilters.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AssetFilters' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterMaxAssetFilter = - gson.getDelegateAdapter(this, TypeToken.get(MaxAssetFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AssetFilters value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `MaxAssetFilter` - if (value.getActualInstance() instanceof MaxAssetFilter) { - JsonElement element = - adapterMaxAssetFilter.toJsonTree( - (MaxAssetFilter) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " MaxAssetFilter"); - } - - @Override - public AssetFilters read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - JsonObject jsonObject = jsonElement.getAsJsonObject(); - - // use discriminator value for faster oneOf lookup - AssetFilters newAssetFilters = new AssetFilters(); - if (jsonObject.get("filterType") == null) { - log.log( - Level.WARNING, - "Failed to lookup discriminator value for AssetFilters as" - + " `filterType` was not found in the payload or the" - + " payload is empty."); - } else { - // look up the discriminator value in the field `filterType` - switch (jsonObject.get("filterType").getAsString()) { - case "MAX_ASSET": - deserialized = - adapterMaxAssetFilter.fromJsonTree(jsonObject); - newAssetFilters.setActualInstance(deserialized); - return newAssetFilters; - case "MaxAssetFilter": - deserialized = - adapterMaxAssetFilter.fromJsonTree(jsonObject); - newAssetFilters.setActualInstance(deserialized); - return newAssetFilters; - default: - newAssetFilters.setActualInstance(jsonElement.toString()); - log.log( - Level.WARNING, - String.format( - "Failed to lookup discriminator value `%s`" - + " for AssetFilters. Possible values:" - + " MAX_ASSET MaxAssetFilter. Falling" - + " back to String.", - jsonObject - .get("filterType") - .getAsString())); - } - } - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize MaxAssetFilter - try { - // validate the JSON object to see if any exception is thrown - MaxAssetFilter.validateJsonElement(jsonElement); - actualAdapter = adapterMaxAssetFilter; - match++; - log.log(Level.FINER, "Input data matches schema 'MaxAssetFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for MaxAssetFilter failed with" - + " `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'MaxAssetFilter'", - e); - } - - if (match == 1) { - AssetFilters ret = new AssetFilters(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for AssetFilters: %d classes" - + " match result, expected 1. Detailed failure" - + " message for oneOf schemas: %s. JSON: %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public AssetFilters() { - super("oneOf", Boolean.FALSE); - } - - public AssetFilters(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("MaxAssetFilter", MaxAssetFilter.class); - } - - @Override - public Map> getSchemas() { - return AssetFilters.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: MaxAssetFilter - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof MaxAssetFilter) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be MaxAssetFilter"); - } - - /** - * Get the actual instance, which can be the following: MaxAssetFilter - * - * @return The actual instance (MaxAssetFilter) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `MaxAssetFilter`. If the actual instance is not `MaxAssetFilter`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `MaxAssetFilter` - * @throws ClassCastException if the instance is not `MaxAssetFilter` - */ - public MaxAssetFilter getMaxAssetFilter() throws ClassCastException { - return (MaxAssetFilter) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AssetFilters - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with MaxAssetFilter - try { - MaxAssetFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for MaxAssetFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for AssetFilters with oneOf schemas:" - + " MaxAssetFilter. %d class(es) match the result, expected 1." - + " Detailed failure message for oneOf schemas: %s. JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of AssetFilters given an JSON string - * - * @param jsonString JSON string - * @return An instance of AssetFilters - * @throws IOException if the JSON string is invalid with respect to AssetFilters - */ - public static AssetFilters fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AssetFilters.class); - } - - /** - * Convert an instance of AssetFilters to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AvgPriceRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AvgPriceRequest.java index 1b5db3240..6998f8a5a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AvgPriceRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AvgPriceRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,33 +37,57 @@ /** AvgPriceRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AvgPriceRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public AvgPriceRequest() {} - public AvgPriceRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public AvgPriceRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public AvgPriceRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Symbol to query * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -76,18 +100,20 @@ public boolean equals(Object o) { return false; } AvgPriceRequest avgPriceRequest = (AvgPriceRequest) o; - return Objects.equals(this.symbol, avgPriceRequest.symbol); + return Objects.equals(this.id, avgPriceRequest.id) + && Objects.equals(this.symbol, avgPriceRequest.symbol); } @Override public int hashCode() { - return Objects.hash(symbol); + return Objects.hash(id, symbol); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AvgPriceRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append("}"); return sb.toString(); @@ -97,6 +123,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -113,6 +144,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -143,11 +178,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -179,18 +214,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AvgPriceRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AvgPriceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AvgPriceResponse.java index f5b9bc793..6d6560144 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AvgPriceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/AvgPriceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** AvgPriceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AvgPriceResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -83,7 +83,7 @@ public AvgPriceResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCas } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -102,7 +102,7 @@ public AvgPriceResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -121,7 +121,7 @@ public AvgPriceResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCas } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -140,7 +140,7 @@ public AvgPriceResponse iLowerCase(@jakarta.annotation.Nullable String iLowerCas } /** - * Get iLowerCase + * Average price interval * * @return iLowerCase */ @@ -159,7 +159,7 @@ public AvgPriceResponse wLowerCase(@jakarta.annotation.Nullable String wLowerCas } /** - * Get wLowerCase + * Average price * * @return wLowerCase */ @@ -178,7 +178,7 @@ public AvgPriceResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Last trade time * * @return T */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/BalanceUpdate.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/BalanceUpdate.java new file mode 100644 index 000000000..c0cb42677 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/BalanceUpdate.java @@ -0,0 +1,358 @@ +/* + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** BalanceUpdate */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class BalanceUpdate extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private String aLowerCase; + + public static final String SERIALIZED_NAME_D_LOWER_CASE = "d"; + + @SerializedName(SERIALIZED_NAME_D_LOWER_CASE) + @jakarta.annotation.Nullable + private String dLowerCase; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public BalanceUpdate() {} + + public BalanceUpdate E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public BalanceUpdate aLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + /** + * Asset + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + public String getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + } + + public BalanceUpdate dLowerCase(@jakarta.annotation.Nullable String dLowerCase) { + this.dLowerCase = dLowerCase; + return this; + } + + /** + * Balance Delta + * + * @return dLowerCase + */ + @jakarta.annotation.Nullable + public String getdLowerCase() { + return dLowerCase; + } + + public void setdLowerCase(@jakarta.annotation.Nullable String dLowerCase) { + this.dLowerCase = dLowerCase; + } + + public BalanceUpdate T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * Clear Time + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BalanceUpdate balanceUpdate = (BalanceUpdate) o; + return Objects.equals(this.E, balanceUpdate.E) + && Objects.equals(this.aLowerCase, balanceUpdate.aLowerCase) + && Objects.equals(this.dLowerCase, balanceUpdate.dLowerCase) + && Objects.equals(this.T, balanceUpdate.T); + } + + @Override + public int hashCode() { + return Objects.hash(E, aLowerCase, dLowerCase, T); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BalanceUpdate {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" dLowerCase: ").append(toIndentedString(dLowerCase)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = aLowerCaseValue.toString(); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + String dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + String dLowerCaseValueAsString = dLowerCaseValue.toString(); + valMap.put("dLowerCase", dLowerCaseValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + Object dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + valMap.put("dLowerCase", dLowerCaseValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("a"); + openapiFields.add("d"); + openapiFields.add("T"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BalanceUpdate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BalanceUpdate.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in BalanceUpdate is not found in the" + + " empty JSON string", + BalanceUpdate.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BalanceUpdate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `BalanceUpdate` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) + && !jsonObj.get("a").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `a` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("a").toString())); + } + if ((jsonObj.get("d") != null && !jsonObj.get("d").isJsonNull()) + && !jsonObj.get("d").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `d` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("d").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BalanceUpdate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BalanceUpdate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(BalanceUpdate.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, BalanceUpdate value) throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BalanceUpdate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of BalanceUpdate given an JSON string + * + * @param jsonString JSON string + * @return An instance of BalanceUpdate + * @throws IOException if the JSON string is invalid with respect to BalanceUpdate + */ + public static BalanceUpdate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BalanceUpdate.class); + } + + /** + * Convert an instance of BalanceUpdate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/BlockTradeRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/BlockTradeRequest.java new file mode 100644 index 000000000..36a31913b --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/BlockTradeRequest.java @@ -0,0 +1,285 @@ +/* + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** BlockTradeRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class BlockTradeRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public BlockTradeRequest() {} + + public BlockTradeRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public BlockTradeRequest symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Symbol to query + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BlockTradeRequest blockTradeRequest = (BlockTradeRequest) o; + return Objects.equals(this.id, blockTradeRequest.id) + && Objects.equals(this.symbol, blockTradeRequest.symbol); + } + + @Override + public int hashCode() { + return Objects.hash(id, symbol); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BlockTradeRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("symbol"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BlockTradeRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BlockTradeRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in BlockTradeRequest is not found in the" + + " empty JSON string", + BlockTradeRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BlockTradeRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `BlockTradeRequest` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BlockTradeRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BlockTradeRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(BlockTradeRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, BlockTradeRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BlockTradeRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of BlockTradeRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of BlockTradeRequest + * @throws IOException if the JSON string is invalid with respect to BlockTradeRequest + */ + public static BlockTradeRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BlockTradeRequest.class); + } + + /** + * Convert an instance of BlockTradeRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/BlockTradeResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/BlockTradeResponse.java new file mode 100644 index 000000000..689794fb6 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/BlockTradeResponse.java @@ -0,0 +1,524 @@ +/* + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** BlockTradeResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class BlockTradeResponse extends BaseDTO { + public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; + + @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) + @jakarta.annotation.Nullable + private String eLowerCase; + + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; + + @SerializedName(SERIALIZED_NAME_T_LOWER_CASE) + @jakarta.annotation.Nullable + private Long tLowerCase; + + public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; + + @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) + @jakarta.annotation.Nullable + private String pLowerCase; + + public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; + + @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) + @jakarta.annotation.Nullable + private String qLowerCase; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public static final String SERIALIZED_NAME_M_LOWER_CASE = "m"; + + @SerializedName(SERIALIZED_NAME_M_LOWER_CASE) + @jakarta.annotation.Nullable + private Boolean mLowerCase; + + public BlockTradeResponse() {} + + public BlockTradeResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + return this; + } + + /** + * Event type + * + * @return eLowerCase + */ + @jakarta.annotation.Nullable + public String geteLowerCase() { + return eLowerCase; + } + + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; + } + + public BlockTradeResponse E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public BlockTradeResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * Symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public BlockTradeResponse tLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; + return this; + } + + /** + * Block Trade ID + * + * @return tLowerCase + */ + @jakarta.annotation.Nullable + public Long gettLowerCase() { + return tLowerCase; + } + + public void settLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; + } + + public BlockTradeResponse pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + return this; + } + + /** + * Price + * + * @return pLowerCase + */ + @jakarta.annotation.Nullable + public String getpLowerCase() { + return pLowerCase; + } + + public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + } + + public BlockTradeResponse qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + return this; + } + + /** + * Quantity + * + * @return qLowerCase + */ + @jakarta.annotation.Nullable + public String getqLowerCase() { + return qLowerCase; + } + + public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + } + + public BlockTradeResponse T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * Trade time + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + public BlockTradeResponse mLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { + this.mLowerCase = mLowerCase; + return this; + } + + /** + * Is the buyer the maker? + * + * @return mLowerCase + */ + @jakarta.annotation.Nullable + public Boolean getmLowerCase() { + return mLowerCase; + } + + public void setmLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { + this.mLowerCase = mLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BlockTradeResponse blockTradeResponse = (BlockTradeResponse) o; + return Objects.equals(this.eLowerCase, blockTradeResponse.eLowerCase) + && Objects.equals(this.E, blockTradeResponse.E) + && Objects.equals(this.sLowerCase, blockTradeResponse.sLowerCase) + && Objects.equals(this.tLowerCase, blockTradeResponse.tLowerCase) + && Objects.equals(this.pLowerCase, blockTradeResponse.pLowerCase) + && Objects.equals(this.qLowerCase, blockTradeResponse.qLowerCase) + && Objects.equals(this.T, blockTradeResponse.T) + && Objects.equals(this.mLowerCase, blockTradeResponse.mLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash( + eLowerCase, E, sLowerCase, tLowerCase, pLowerCase, qLowerCase, T, mLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BlockTradeResponse {\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" tLowerCase: ").append(toIndentedString(tLowerCase)).append("\n"); + sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); + sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" mLowerCase: ").append(toIndentedString(mLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); + } + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + Long tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + String tLowerCaseValueAsString = tLowerCaseValue.toString(); + valMap.put("tLowerCase", tLowerCaseValueAsString); + } + String pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + String pLowerCaseValueAsString = pLowerCaseValue.toString(); + valMap.put("pLowerCase", pLowerCaseValueAsString); + } + String qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + String qLowerCaseValueAsString = qLowerCaseValue.toString(); + valMap.put("qLowerCase", qLowerCaseValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + Boolean mLowerCaseValue = getmLowerCase(); + if (mLowerCaseValue != null) { + String mLowerCaseValueAsString = mLowerCaseValue.toString(); + valMap.put("mLowerCase", mLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); + } + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + valMap.put("tLowerCase", tLowerCaseValue); + } + Object pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + valMap.put("pLowerCase", pLowerCaseValue); + } + Object qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + valMap.put("qLowerCase", qLowerCaseValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + Object mLowerCaseValue = getmLowerCase(); + if (mLowerCaseValue != null) { + valMap.put("mLowerCase", mLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("e"); + openapiFields.add("E"); + openapiFields.add("s"); + openapiFields.add("t"); + openapiFields.add("p"); + openapiFields.add("q"); + openapiFields.add("T"); + openapiFields.add("m"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BlockTradeResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BlockTradeResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in BlockTradeResponse is not found in the" + + " empty JSON string", + BlockTradeResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BlockTradeResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `BlockTradeResponse` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("e") != null && !jsonObj.get("e").isJsonNull()) + && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `e` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("e").toString())); + } + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) + && !jsonObj.get("p").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `p` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("p").toString())); + } + if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) + && !jsonObj.get("q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("q").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BlockTradeResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BlockTradeResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(BlockTradeResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, BlockTradeResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BlockTradeResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of BlockTradeResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of BlockTradeResponse + * @throws IOException if the JSON string is invalid with respect to BlockTradeResponse + */ + public static BlockTradeResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BlockTradeResponse.class); + } + + /** + * Convert an instance of BlockTradeResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/BookTickerRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/BookTickerRequest.java index a8d7cb9aa..236014eca 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/BookTickerRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/BookTickerRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,33 +37,57 @@ /** BookTickerRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BookTickerRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public BookTickerRequest() {} - public BookTickerRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public BookTickerRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public BookTickerRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Symbol to query * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -76,18 +100,20 @@ public boolean equals(Object o) { return false; } BookTickerRequest bookTickerRequest = (BookTickerRequest) o; - return Objects.equals(this.symbol, bookTickerRequest.symbol); + return Objects.equals(this.id, bookTickerRequest.id) + && Objects.equals(this.symbol, bookTickerRequest.symbol); } @Override public int hashCode() { - return Objects.hash(symbol); + return Objects.hash(id, symbol); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BookTickerRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append("}"); return sb.toString(); @@ -97,6 +123,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -113,6 +144,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -143,11 +178,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -179,18 +214,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BookTickerRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/BookTickerResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/BookTickerResponse.java index 37777c060..a2c864a16 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/BookTickerResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/BookTickerResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** BookTickerResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BookTickerResponse extends BaseDTO { public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; @@ -83,7 +83,7 @@ public BookTickerResponse uLowerCase(@jakarta.annotation.Nullable Long uLowerCas } /** - * Get uLowerCase + * Order book updateId * * @return uLowerCase */ @@ -102,7 +102,7 @@ public BookTickerResponse sLowerCase(@jakarta.annotation.Nullable String sLowerC } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -121,7 +121,7 @@ public BookTickerResponse bLowerCase(@jakarta.annotation.Nullable String bLowerC } /** - * Get bLowerCase + * Best bid price * * @return bLowerCase */ @@ -140,7 +140,7 @@ public BookTickerResponse B(@jakarta.annotation.Nullable String B) { } /** - * Get B + * Best bid qty * * @return B */ @@ -159,7 +159,7 @@ public BookTickerResponse aLowerCase(@jakarta.annotation.Nullable String aLowerC } /** - * Get aLowerCase + * Best ask price * * @return aLowerCase */ @@ -178,7 +178,7 @@ public BookTickerResponse A(@jakarta.annotation.Nullable String A) { } /** - * Get A + * Best ask qty * * @return A */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/DiffBookDepthRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/DiffBookDepthRequest.java index 32c097a3c..890adf2ab 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/DiffBookDepthRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/DiffBookDepthRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -37,43 +38,67 @@ /** DiffBookDepthRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DiffBookDepthRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_UPDATE_SPEED = "updateSpeed"; @SerializedName(SERIALIZED_NAME_UPDATE_SPEED) @jakarta.annotation.Nullable - private String updateSpeed; + private UpdateSpeed updateSpeed; public DiffBookDepthRequest() {} - public DiffBookDepthRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public DiffBookDepthRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public DiffBookDepthRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Symbol to query * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } - public DiffBookDepthRequest updateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public DiffBookDepthRequest updateSpeed(@jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; return this; } @@ -84,11 +109,12 @@ public DiffBookDepthRequest updateSpeed(@jakarta.annotation.Nullable String upda * @return updateSpeed */ @jakarta.annotation.Nullable - public String getUpdateSpeed() { + @Valid + public UpdateSpeed getUpdateSpeed() { return updateSpeed; } - public void setUpdateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public void setUpdateSpeed(@jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; } @@ -101,19 +127,21 @@ public boolean equals(Object o) { return false; } DiffBookDepthRequest diffBookDepthRequest = (DiffBookDepthRequest) o; - return Objects.equals(this.symbol, diffBookDepthRequest.symbol) + return Objects.equals(this.id, diffBookDepthRequest.id) + && Objects.equals(this.symbol, diffBookDepthRequest.symbol) && Objects.equals(this.updateSpeed, diffBookDepthRequest.updateSpeed); } @Override public int hashCode() { - return Objects.hash(symbol, updateSpeed); + return Objects.hash(id, symbol, updateSpeed); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DiffBookDepthRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" updateSpeed: ").append(toIndentedString(updateSpeed)).append("\n"); sb.append("}"); @@ -124,12 +152,17 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); valMap.put("symbol", symbolValueAsString); } - String updateSpeedValue = getUpdateSpeed(); + UpdateSpeed updateSpeedValue = getUpdateSpeed(); if (updateSpeedValue != null) { String updateSpeedValueAsString = updateSpeedValue.toString(); valMap.put("updateSpeed", updateSpeedValueAsString); @@ -145,6 +178,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -179,12 +216,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("updateSpeed"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -216,31 +253,26 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DiffBookDepthRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - if ((jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) - && !jsonObj.get("updateSpeed").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `updateSpeed` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("updateSpeed").toString())); + // validate the optional field `updateSpeed` + if (jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) { + UpdateSpeed.validateJsonElement(jsonObj.get("updateSpeed")); } } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/DiffBookDepthResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/DiffBookDepthResponse.java index 788ba01af..6b839d3a1 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/DiffBookDepthResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/DiffBookDepthResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** DiffBookDepthResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DiffBookDepthResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -92,7 +92,7 @@ public DiffBookDepthResponse eLowerCase(@jakarta.annotation.Nullable String eLow } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -111,7 +111,7 @@ public DiffBookDepthResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -130,7 +130,7 @@ public DiffBookDepthResponse sLowerCase(@jakarta.annotation.Nullable String sLow } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -149,7 +149,7 @@ public DiffBookDepthResponse U(@jakarta.annotation.Nullable Long U) { } /** - * Get U + * First update ID in event * * @return U */ @@ -168,7 +168,7 @@ public DiffBookDepthResponse uLowerCase(@jakarta.annotation.Nullable Long uLower } /** - * Get uLowerCase + * Final update ID in event * * @return uLowerCase */ @@ -196,7 +196,7 @@ public DiffBookDepthResponse addBLowerCaseItem(List bLowerCaseItem) { } /** - * Get bLowerCase + * Bids to be updated * * @return bLowerCase */ @@ -225,7 +225,7 @@ public DiffBookDepthResponse addALowerCaseItem(List aLowerCaseItem) { } /** - * Get aLowerCase + * Asks to be updated * * @return aLowerCase */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/EventStreamTerminated.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/EventStreamTerminated.java new file mode 100644 index 000000000..6517bc623 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/EventStreamTerminated.java @@ -0,0 +1,232 @@ +/* + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** EventStreamTerminated */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class EventStreamTerminated extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public EventStreamTerminated() {} + + public EventStreamTerminated E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EventStreamTerminated eventStreamTerminated = (EventStreamTerminated) o; + return Objects.equals(this.E, eventStreamTerminated.E); + } + + @Override + public int hashCode() { + return Objects.hash(E); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EventStreamTerminated {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EventStreamTerminated + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EventStreamTerminated.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in EventStreamTerminated is not found in" + + " the empty JSON string", + EventStreamTerminated.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EventStreamTerminated.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `EventStreamTerminated` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EventStreamTerminated.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EventStreamTerminated' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(EventStreamTerminated.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, EventStreamTerminated value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EventStreamTerminated read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of EventStreamTerminated given an JSON string + * + * @param jsonString JSON string + * @return An instance of EventStreamTerminated + * @throws IOException if the JSON string is invalid with respect to EventStreamTerminated + */ + public static EventStreamTerminated fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EventStreamTerminated.class); + } + + /** + * Convert an instance of EventStreamTerminated to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExchangeFilters.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExchangeFilters.java deleted file mode 100644 index e8a3c9fbe..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExchangeFilters.java +++ /dev/null @@ -1,535 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ExchangeFilters extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(ExchangeFilters.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExchangeFilters.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExchangeFilters' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterExchangeMaxNumOrdersFilter = - gson.getDelegateAdapter(this, TypeToken.get(ExchangeMaxNumOrdersFilter.class)); - final TypeAdapter - adapterExchangeMaxNumAlgoOrdersFilter = - gson.getDelegateAdapter( - this, TypeToken.get(ExchangeMaxNumAlgoOrdersFilter.class)); - final TypeAdapter - adapterExchangeMaxNumIcebergOrdersFilter = - gson.getDelegateAdapter( - this, TypeToken.get(ExchangeMaxNumIcebergOrdersFilter.class)); - final TypeAdapter - adapterExchangeMaxNumOrderListsFilter = - gson.getDelegateAdapter( - this, TypeToken.get(ExchangeMaxNumOrderListsFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ExchangeFilters value) - throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type - // `ExchangeMaxNumOrdersFilter` - if (value.getActualInstance() instanceof ExchangeMaxNumOrdersFilter) { - JsonElement element = - adapterExchangeMaxNumOrdersFilter.toJsonTree( - (ExchangeMaxNumOrdersFilter) - value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type - // `ExchangeMaxNumAlgoOrdersFilter` - if (value.getActualInstance() - instanceof ExchangeMaxNumAlgoOrdersFilter) { - JsonElement element = - adapterExchangeMaxNumAlgoOrdersFilter.toJsonTree( - (ExchangeMaxNumAlgoOrdersFilter) - value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type - // `ExchangeMaxNumIcebergOrdersFilter` - if (value.getActualInstance() - instanceof ExchangeMaxNumIcebergOrdersFilter) { - JsonElement element = - adapterExchangeMaxNumIcebergOrdersFilter.toJsonTree( - (ExchangeMaxNumIcebergOrdersFilter) - value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type - // `ExchangeMaxNumOrderListsFilter` - if (value.getActualInstance() - instanceof ExchangeMaxNumOrderListsFilter) { - JsonElement element = - adapterExchangeMaxNumOrderListsFilter.toJsonTree( - (ExchangeMaxNumOrderListsFilter) - value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " ExchangeMaxNumAlgoOrdersFilter," - + " ExchangeMaxNumIcebergOrdersFilter," - + " ExchangeMaxNumOrderListsFilter," - + " ExchangeMaxNumOrdersFilter"); - } - - @Override - public ExchangeFilters read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - JsonObject jsonObject = jsonElement.getAsJsonObject(); - - // use discriminator value for faster oneOf lookup - ExchangeFilters newExchangeFilters = new ExchangeFilters(); - if (jsonObject.get("filterType") == null) { - log.log( - Level.WARNING, - "Failed to lookup discriminator value for ExchangeFilters" - + " as `filterType` was not found in the payload or the" - + " payload is empty."); - } else { - // look up the discriminator value in the field `filterType` - switch (jsonObject.get("filterType").getAsString()) { - case "EXCHANGE_MAX_NUM_ALGO_ORDERS": - deserialized = - adapterExchangeMaxNumAlgoOrdersFilter.fromJsonTree( - jsonObject); - newExchangeFilters.setActualInstance(deserialized); - return newExchangeFilters; - case "EXCHANGE_MAX_NUM_ICEBERG_ORDERS": - deserialized = - adapterExchangeMaxNumIcebergOrdersFilter - .fromJsonTree(jsonObject); - newExchangeFilters.setActualInstance(deserialized); - return newExchangeFilters; - case "EXCHANGE_MAX_NUM_ORDERS": - deserialized = - adapterExchangeMaxNumOrdersFilter.fromJsonTree( - jsonObject); - newExchangeFilters.setActualInstance(deserialized); - return newExchangeFilters; - case "EXCHANGE_MAX_NUM_ORDER_LISTS": - deserialized = - adapterExchangeMaxNumOrderListsFilter.fromJsonTree( - jsonObject); - newExchangeFilters.setActualInstance(deserialized); - return newExchangeFilters; - case "ExchangeMaxNumAlgoOrdersFilter": - deserialized = - adapterExchangeMaxNumAlgoOrdersFilter.fromJsonTree( - jsonObject); - newExchangeFilters.setActualInstance(deserialized); - return newExchangeFilters; - case "ExchangeMaxNumIcebergOrdersFilter": - deserialized = - adapterExchangeMaxNumIcebergOrdersFilter - .fromJsonTree(jsonObject); - newExchangeFilters.setActualInstance(deserialized); - return newExchangeFilters; - case "ExchangeMaxNumOrderListsFilter": - deserialized = - adapterExchangeMaxNumOrderListsFilter.fromJsonTree( - jsonObject); - newExchangeFilters.setActualInstance(deserialized); - return newExchangeFilters; - case "ExchangeMaxNumOrdersFilter": - deserialized = - adapterExchangeMaxNumOrdersFilter.fromJsonTree( - jsonObject); - newExchangeFilters.setActualInstance(deserialized); - return newExchangeFilters; - default: - newExchangeFilters.setActualInstance( - jsonElement.toString()); - log.log( - Level.WARNING, - String.format( - "Failed to lookup discriminator value `%s`" - + " for ExchangeFilters. Possible" - + " values:" - + " EXCHANGE_MAX_NUM_ALGO_ORDERS" - + " EXCHANGE_MAX_NUM_ICEBERG_ORDERS" - + " EXCHANGE_MAX_NUM_ORDERS" - + " EXCHANGE_MAX_NUM_ORDER_LISTS" - + " ExchangeMaxNumAlgoOrdersFilter" - + " ExchangeMaxNumIcebergOrdersFilter" - + " ExchangeMaxNumOrderListsFilter" - + " ExchangeMaxNumOrdersFilter. Falling" - + " back to String.", - jsonObject - .get("filterType") - .getAsString())); - } - } - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize ExchangeMaxNumOrdersFilter - try { - // validate the JSON object to see if any exception is thrown - ExchangeMaxNumOrdersFilter.validateJsonElement(jsonElement); - actualAdapter = adapterExchangeMaxNumOrdersFilter; - match++; - log.log( - Level.FINER, - "Input data matches schema 'ExchangeMaxNumOrdersFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for ExchangeMaxNumOrdersFilter" - + " failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema" - + " 'ExchangeMaxNumOrdersFilter'", - e); - } - // deserialize ExchangeMaxNumAlgoOrdersFilter - try { - // validate the JSON object to see if any exception is thrown - ExchangeMaxNumAlgoOrdersFilter.validateJsonElement(jsonElement); - actualAdapter = adapterExchangeMaxNumAlgoOrdersFilter; - match++; - log.log( - Level.FINER, - "Input data matches schema" - + " 'ExchangeMaxNumAlgoOrdersFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for ExchangeMaxNumAlgoOrdersFilter" - + " failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema" - + " 'ExchangeMaxNumAlgoOrdersFilter'", - e); - } - // deserialize ExchangeMaxNumIcebergOrdersFilter - try { - // validate the JSON object to see if any exception is thrown - ExchangeMaxNumIcebergOrdersFilter.validateJsonElement(jsonElement); - actualAdapter = adapterExchangeMaxNumIcebergOrdersFilter; - match++; - log.log( - Level.FINER, - "Input data matches schema" - + " 'ExchangeMaxNumIcebergOrdersFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for" - + " ExchangeMaxNumIcebergOrdersFilter failed" - + " with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema" - + " 'ExchangeMaxNumIcebergOrdersFilter'", - e); - } - // deserialize ExchangeMaxNumOrderListsFilter - try { - // validate the JSON object to see if any exception is thrown - ExchangeMaxNumOrderListsFilter.validateJsonElement(jsonElement); - actualAdapter = adapterExchangeMaxNumOrderListsFilter; - match++; - log.log( - Level.FINER, - "Input data matches schema" - + " 'ExchangeMaxNumOrderListsFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for ExchangeMaxNumOrderListsFilter" - + " failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema" - + " 'ExchangeMaxNumOrderListsFilter'", - e); - } - - if (match == 1) { - ExchangeFilters ret = new ExchangeFilters(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for ExchangeFilters: %d classes" - + " match result, expected 1. Detailed failure" - + " message for oneOf schemas: %s. JSON: %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public ExchangeFilters() { - super("oneOf", Boolean.FALSE); - } - - public ExchangeFilters(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("ExchangeMaxNumOrdersFilter", ExchangeMaxNumOrdersFilter.class); - schemas.put("ExchangeMaxNumAlgoOrdersFilter", ExchangeMaxNumAlgoOrdersFilter.class); - schemas.put("ExchangeMaxNumIcebergOrdersFilter", ExchangeMaxNumIcebergOrdersFilter.class); - schemas.put("ExchangeMaxNumOrderListsFilter", ExchangeMaxNumOrderListsFilter.class); - } - - @Override - public Map> getSchemas() { - return ExchangeFilters.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: ExchangeMaxNumAlgoOrdersFilter, - * ExchangeMaxNumIcebergOrdersFilter, ExchangeMaxNumOrderListsFilter, ExchangeMaxNumOrdersFilter - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof ExchangeMaxNumOrdersFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof ExchangeMaxNumAlgoOrdersFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof ExchangeMaxNumIcebergOrdersFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof ExchangeMaxNumOrderListsFilter) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException( - "Invalid instance type. Must be ExchangeMaxNumAlgoOrdersFilter," - + " ExchangeMaxNumIcebergOrdersFilter, ExchangeMaxNumOrderListsFilter," - + " ExchangeMaxNumOrdersFilter"); - } - - /** - * Get the actual instance, which can be the following: ExchangeMaxNumAlgoOrdersFilter, - * ExchangeMaxNumIcebergOrdersFilter, ExchangeMaxNumOrderListsFilter, ExchangeMaxNumOrdersFilter - * - * @return The actual instance (ExchangeMaxNumAlgoOrdersFilter, - * ExchangeMaxNumIcebergOrdersFilter, ExchangeMaxNumOrderListsFilter, - * ExchangeMaxNumOrdersFilter) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `ExchangeMaxNumOrdersFilter`. If the actual instance is not - * `ExchangeMaxNumOrdersFilter`, the ClassCastException will be thrown. - * - * @return The actual instance of `ExchangeMaxNumOrdersFilter` - * @throws ClassCastException if the instance is not `ExchangeMaxNumOrdersFilter` - */ - public ExchangeMaxNumOrdersFilter getExchangeMaxNumOrdersFilter() throws ClassCastException { - return (ExchangeMaxNumOrdersFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `ExchangeMaxNumAlgoOrdersFilter`. If the actual instance is not - * `ExchangeMaxNumAlgoOrdersFilter`, the ClassCastException will be thrown. - * - * @return The actual instance of `ExchangeMaxNumAlgoOrdersFilter` - * @throws ClassCastException if the instance is not `ExchangeMaxNumAlgoOrdersFilter` - */ - public ExchangeMaxNumAlgoOrdersFilter getExchangeMaxNumAlgoOrdersFilter() - throws ClassCastException { - return (ExchangeMaxNumAlgoOrdersFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `ExchangeMaxNumIcebergOrdersFilter`. If the actual instance is not - * `ExchangeMaxNumIcebergOrdersFilter`, the ClassCastException will be thrown. - * - * @return The actual instance of `ExchangeMaxNumIcebergOrdersFilter` - * @throws ClassCastException if the instance is not `ExchangeMaxNumIcebergOrdersFilter` - */ - public ExchangeMaxNumIcebergOrdersFilter getExchangeMaxNumIcebergOrdersFilter() - throws ClassCastException { - return (ExchangeMaxNumIcebergOrdersFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `ExchangeMaxNumOrderListsFilter`. If the actual instance is not - * `ExchangeMaxNumOrderListsFilter`, the ClassCastException will be thrown. - * - * @return The actual instance of `ExchangeMaxNumOrderListsFilter` - * @throws ClassCastException if the instance is not `ExchangeMaxNumOrderListsFilter` - */ - public ExchangeMaxNumOrderListsFilter getExchangeMaxNumOrderListsFilter() - throws ClassCastException { - return (ExchangeMaxNumOrderListsFilter) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExchangeFilters - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with ExchangeMaxNumOrdersFilter - try { - ExchangeMaxNumOrdersFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for ExchangeMaxNumOrdersFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - // validate the json string with ExchangeMaxNumAlgoOrdersFilter - try { - ExchangeMaxNumAlgoOrdersFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for ExchangeMaxNumAlgoOrdersFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - // validate the json string with ExchangeMaxNumIcebergOrdersFilter - try { - ExchangeMaxNumIcebergOrdersFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for ExchangeMaxNumIcebergOrdersFilter failed with" - + " `%s`.", - e.getMessage())); - // continue to the next one - } - // validate the json string with ExchangeMaxNumOrderListsFilter - try { - ExchangeMaxNumOrderListsFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for ExchangeMaxNumOrderListsFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for ExchangeFilters with oneOf schemas:" - + " ExchangeMaxNumAlgoOrdersFilter," - + " ExchangeMaxNumIcebergOrdersFilter," - + " ExchangeMaxNumOrderListsFilter, ExchangeMaxNumOrdersFilter. %d" - + " class(es) match the result, expected 1. Detailed failure" - + " message for oneOf schemas: %s. JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of ExchangeFilters given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExchangeFilters - * @throws IOException if the JSON string is invalid with respect to ExchangeFilters - */ - public static ExchangeFilters fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExchangeFilters.class); - } - - /** - * Convert an instance of ExchangeFilters to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExchangeMaxNumAlgoOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExchangeMaxNumAlgoOrdersFilter.java deleted file mode 100644 index 586829182..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExchangeMaxNumAlgoOrdersFilter.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** ExchangeMaxNumAlgoOrdersFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ExchangeMaxNumAlgoOrdersFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_MAX_NUM_ALGO_ORDERS = "maxNumAlgoOrders"; - - @SerializedName(SERIALIZED_NAME_MAX_NUM_ALGO_ORDERS) - @jakarta.annotation.Nullable - private Long maxNumAlgoOrders; - - public ExchangeMaxNumAlgoOrdersFilter() {} - - public ExchangeMaxNumAlgoOrdersFilter filterType( - @jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public ExchangeMaxNumAlgoOrdersFilter maxNumAlgoOrders( - @jakarta.annotation.Nullable Long maxNumAlgoOrders) { - this.maxNumAlgoOrders = maxNumAlgoOrders; - return this; - } - - /** - * Get maxNumAlgoOrders - * - * @return maxNumAlgoOrders - */ - @jakarta.annotation.Nullable - public Long getMaxNumAlgoOrders() { - return maxNumAlgoOrders; - } - - public void setMaxNumAlgoOrders(@jakarta.annotation.Nullable Long maxNumAlgoOrders) { - this.maxNumAlgoOrders = maxNumAlgoOrders; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExchangeMaxNumAlgoOrdersFilter exchangeMaxNumAlgoOrdersFilter = - (ExchangeMaxNumAlgoOrdersFilter) o; - return Objects.equals(this.filterType, exchangeMaxNumAlgoOrdersFilter.filterType) - && Objects.equals( - this.maxNumAlgoOrders, exchangeMaxNumAlgoOrdersFilter.maxNumAlgoOrders); - } - - @Override - public int hashCode() { - return Objects.hash(filterType, maxNumAlgoOrders); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExchangeMaxNumAlgoOrdersFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" maxNumAlgoOrders: ").append(toIndentedString(maxNumAlgoOrders)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Long maxNumAlgoOrdersValue = getMaxNumAlgoOrders(); - if (maxNumAlgoOrdersValue != null) { - String maxNumAlgoOrdersValueAsString = maxNumAlgoOrdersValue.toString(); - valMap.put("maxNumAlgoOrders", maxNumAlgoOrdersValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object maxNumAlgoOrdersValue = getMaxNumAlgoOrders(); - if (maxNumAlgoOrdersValue != null) { - valMap.put("maxNumAlgoOrders", maxNumAlgoOrdersValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("maxNumAlgoOrders"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ExchangeMaxNumAlgoOrdersFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExchangeMaxNumAlgoOrdersFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ExchangeMaxNumAlgoOrdersFilter is not" - + " found in the empty JSON string", - ExchangeMaxNumAlgoOrdersFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExchangeMaxNumAlgoOrdersFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ExchangeMaxNumAlgoOrdersFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExchangeMaxNumAlgoOrdersFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExchangeMaxNumAlgoOrdersFilter' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ExchangeMaxNumAlgoOrdersFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ExchangeMaxNumAlgoOrdersFilter value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExchangeMaxNumAlgoOrdersFilter read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ExchangeMaxNumAlgoOrdersFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExchangeMaxNumAlgoOrdersFilter - * @throws IOException if the JSON string is invalid with respect to - * ExchangeMaxNumAlgoOrdersFilter - */ - public static ExchangeMaxNumAlgoOrdersFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExchangeMaxNumAlgoOrdersFilter.class); - } - - /** - * Convert an instance of ExchangeMaxNumAlgoOrdersFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExchangeMaxNumIcebergOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExchangeMaxNumIcebergOrdersFilter.java deleted file mode 100644 index ade38c8f9..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExchangeMaxNumIcebergOrdersFilter.java +++ /dev/null @@ -1,290 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** ExchangeMaxNumIcebergOrdersFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ExchangeMaxNumIcebergOrdersFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_MAX_NUM_ICEBERG_ORDERS = "maxNumIcebergOrders"; - - @SerializedName(SERIALIZED_NAME_MAX_NUM_ICEBERG_ORDERS) - @jakarta.annotation.Nullable - private Long maxNumIcebergOrders; - - public ExchangeMaxNumIcebergOrdersFilter() {} - - public ExchangeMaxNumIcebergOrdersFilter filterType( - @jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public ExchangeMaxNumIcebergOrdersFilter maxNumIcebergOrders( - @jakarta.annotation.Nullable Long maxNumIcebergOrders) { - this.maxNumIcebergOrders = maxNumIcebergOrders; - return this; - } - - /** - * Get maxNumIcebergOrders - * - * @return maxNumIcebergOrders - */ - @jakarta.annotation.Nullable - public Long getMaxNumIcebergOrders() { - return maxNumIcebergOrders; - } - - public void setMaxNumIcebergOrders(@jakarta.annotation.Nullable Long maxNumIcebergOrders) { - this.maxNumIcebergOrders = maxNumIcebergOrders; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExchangeMaxNumIcebergOrdersFilter exchangeMaxNumIcebergOrdersFilter = - (ExchangeMaxNumIcebergOrdersFilter) o; - return Objects.equals(this.filterType, exchangeMaxNumIcebergOrdersFilter.filterType) - && Objects.equals( - this.maxNumIcebergOrders, - exchangeMaxNumIcebergOrdersFilter.maxNumIcebergOrders); - } - - @Override - public int hashCode() { - return Objects.hash(filterType, maxNumIcebergOrders); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExchangeMaxNumIcebergOrdersFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" maxNumIcebergOrders: ") - .append(toIndentedString(maxNumIcebergOrders)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Long maxNumIcebergOrdersValue = getMaxNumIcebergOrders(); - if (maxNumIcebergOrdersValue != null) { - String maxNumIcebergOrdersValueAsString = maxNumIcebergOrdersValue.toString(); - valMap.put("maxNumIcebergOrders", maxNumIcebergOrdersValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object maxNumIcebergOrdersValue = getMaxNumIcebergOrders(); - if (maxNumIcebergOrdersValue != null) { - valMap.put("maxNumIcebergOrders", maxNumIcebergOrdersValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("maxNumIcebergOrders"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ExchangeMaxNumIcebergOrdersFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExchangeMaxNumIcebergOrdersFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ExchangeMaxNumIcebergOrdersFilter is" - + " not found in the empty JSON string", - ExchangeMaxNumIcebergOrdersFilter.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExchangeMaxNumIcebergOrdersFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ExchangeMaxNumIcebergOrdersFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExchangeMaxNumIcebergOrdersFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExchangeMaxNumIcebergOrdersFilter' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ExchangeMaxNumIcebergOrdersFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ExchangeMaxNumIcebergOrdersFilter value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExchangeMaxNumIcebergOrdersFilter read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ExchangeMaxNumIcebergOrdersFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExchangeMaxNumIcebergOrdersFilter - * @throws IOException if the JSON string is invalid with respect to - * ExchangeMaxNumIcebergOrdersFilter - */ - public static ExchangeMaxNumIcebergOrdersFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExchangeMaxNumIcebergOrdersFilter.class); - } - - /** - * Convert an instance of ExchangeMaxNumIcebergOrdersFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExchangeMaxNumOrderListsFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExchangeMaxNumOrderListsFilter.java deleted file mode 100644 index 5a71b5cc1..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExchangeMaxNumOrderListsFilter.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** ExchangeMaxNumOrderListsFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ExchangeMaxNumOrderListsFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_MAX_NUM_ORDER_LISTS = "maxNumOrderLists"; - - @SerializedName(SERIALIZED_NAME_MAX_NUM_ORDER_LISTS) - @jakarta.annotation.Nullable - private Long maxNumOrderLists; - - public ExchangeMaxNumOrderListsFilter() {} - - public ExchangeMaxNumOrderListsFilter filterType( - @jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public ExchangeMaxNumOrderListsFilter maxNumOrderLists( - @jakarta.annotation.Nullable Long maxNumOrderLists) { - this.maxNumOrderLists = maxNumOrderLists; - return this; - } - - /** - * Get maxNumOrderLists - * - * @return maxNumOrderLists - */ - @jakarta.annotation.Nullable - public Long getMaxNumOrderLists() { - return maxNumOrderLists; - } - - public void setMaxNumOrderLists(@jakarta.annotation.Nullable Long maxNumOrderLists) { - this.maxNumOrderLists = maxNumOrderLists; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExchangeMaxNumOrderListsFilter exchangeMaxNumOrderListsFilter = - (ExchangeMaxNumOrderListsFilter) o; - return Objects.equals(this.filterType, exchangeMaxNumOrderListsFilter.filterType) - && Objects.equals( - this.maxNumOrderLists, exchangeMaxNumOrderListsFilter.maxNumOrderLists); - } - - @Override - public int hashCode() { - return Objects.hash(filterType, maxNumOrderLists); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExchangeMaxNumOrderListsFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" maxNumOrderLists: ").append(toIndentedString(maxNumOrderLists)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Long maxNumOrderListsValue = getMaxNumOrderLists(); - if (maxNumOrderListsValue != null) { - String maxNumOrderListsValueAsString = maxNumOrderListsValue.toString(); - valMap.put("maxNumOrderLists", maxNumOrderListsValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object maxNumOrderListsValue = getMaxNumOrderLists(); - if (maxNumOrderListsValue != null) { - valMap.put("maxNumOrderLists", maxNumOrderListsValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("maxNumOrderLists"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ExchangeMaxNumOrderListsFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExchangeMaxNumOrderListsFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ExchangeMaxNumOrderListsFilter is not" - + " found in the empty JSON string", - ExchangeMaxNumOrderListsFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExchangeMaxNumOrderListsFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ExchangeMaxNumOrderListsFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExchangeMaxNumOrderListsFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExchangeMaxNumOrderListsFilter' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ExchangeMaxNumOrderListsFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ExchangeMaxNumOrderListsFilter value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExchangeMaxNumOrderListsFilter read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ExchangeMaxNumOrderListsFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExchangeMaxNumOrderListsFilter - * @throws IOException if the JSON string is invalid with respect to - * ExchangeMaxNumOrderListsFilter - */ - public static ExchangeMaxNumOrderListsFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExchangeMaxNumOrderListsFilter.class); - } - - /** - * Convert an instance of ExchangeMaxNumOrderListsFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExchangeMaxNumOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExchangeMaxNumOrdersFilter.java deleted file mode 100644 index 558b7bb9e..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExchangeMaxNumOrdersFilter.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** ExchangeMaxNumOrdersFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ExchangeMaxNumOrdersFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_MAX_NUM_ORDERS = "maxNumOrders"; - - @SerializedName(SERIALIZED_NAME_MAX_NUM_ORDERS) - @jakarta.annotation.Nullable - private Long maxNumOrders; - - public ExchangeMaxNumOrdersFilter() {} - - public ExchangeMaxNumOrdersFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public ExchangeMaxNumOrdersFilter maxNumOrders(@jakarta.annotation.Nullable Long maxNumOrders) { - this.maxNumOrders = maxNumOrders; - return this; - } - - /** - * Get maxNumOrders - * - * @return maxNumOrders - */ - @jakarta.annotation.Nullable - public Long getMaxNumOrders() { - return maxNumOrders; - } - - public void setMaxNumOrders(@jakarta.annotation.Nullable Long maxNumOrders) { - this.maxNumOrders = maxNumOrders; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExchangeMaxNumOrdersFilter exchangeMaxNumOrdersFilter = (ExchangeMaxNumOrdersFilter) o; - return Objects.equals(this.filterType, exchangeMaxNumOrdersFilter.filterType) - && Objects.equals(this.maxNumOrders, exchangeMaxNumOrdersFilter.maxNumOrders); - } - - @Override - public int hashCode() { - return Objects.hash(filterType, maxNumOrders); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExchangeMaxNumOrdersFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" maxNumOrders: ").append(toIndentedString(maxNumOrders)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Long maxNumOrdersValue = getMaxNumOrders(); - if (maxNumOrdersValue != null) { - String maxNumOrdersValueAsString = maxNumOrdersValue.toString(); - valMap.put("maxNumOrders", maxNumOrdersValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object maxNumOrdersValue = getMaxNumOrders(); - if (maxNumOrdersValue != null) { - valMap.put("maxNumOrders", maxNumOrdersValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("maxNumOrders"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExchangeMaxNumOrdersFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExchangeMaxNumOrdersFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ExchangeMaxNumOrdersFilter is not" - + " found in the empty JSON string", - ExchangeMaxNumOrdersFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExchangeMaxNumOrdersFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ExchangeMaxNumOrdersFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExchangeMaxNumOrdersFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExchangeMaxNumOrdersFilter' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ExchangeMaxNumOrdersFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ExchangeMaxNumOrdersFilter value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExchangeMaxNumOrdersFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ExchangeMaxNumOrdersFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExchangeMaxNumOrdersFilter - * @throws IOException if the JSON string is invalid with respect to ExchangeMaxNumOrdersFilter - */ - public static ExchangeMaxNumOrdersFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExchangeMaxNumOrdersFilter.class); - } - - /** - * Convert an instance of ExchangeMaxNumOrdersFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExecutionReport.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExecutionReport.java new file mode 100644 index 000000000..16fce9ff9 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExecutionReport.java @@ -0,0 +1,2557 @@ +/* + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ExecutionReport */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ExecutionReport extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; + + @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) + @jakarta.annotation.Nullable + private String cLowerCase; + + public static final String SERIALIZED_NAME_S = "S"; + + @SerializedName(SERIALIZED_NAME_S) + @jakarta.annotation.Nullable + private String S; + + public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; + + @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) + @jakarta.annotation.Nullable + private String oLowerCase; + + public static final String SERIALIZED_NAME_F_LOWER_CASE = "f"; + + @SerializedName(SERIALIZED_NAME_F_LOWER_CASE) + @jakarta.annotation.Nullable + private String fLowerCase; + + public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; + + @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) + @jakarta.annotation.Nullable + private String qLowerCase; + + public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; + + @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) + @jakarta.annotation.Nullable + private String pLowerCase; + + public static final String SERIALIZED_NAME_P = "P"; + + @SerializedName(SERIALIZED_NAME_P) + @jakarta.annotation.Nullable + private String P; + + public static final String SERIALIZED_NAME_F = "F"; + + @SerializedName(SERIALIZED_NAME_F) + @jakarta.annotation.Nullable + private String F; + + public static final String SERIALIZED_NAME_G_LOWER_CASE = "g"; + + @SerializedName(SERIALIZED_NAME_G_LOWER_CASE) + @jakarta.annotation.Nullable + private Long gLowerCase; + + public static final String SERIALIZED_NAME_C = "C"; + + @SerializedName(SERIALIZED_NAME_C) + @jakarta.annotation.Nullable + private String C; + + public static final String SERIALIZED_NAME_X_LOWER_CASE = "x"; + + @SerializedName(SERIALIZED_NAME_X_LOWER_CASE) + @jakarta.annotation.Nullable + private String xLowerCase; + + public static final String SERIALIZED_NAME_X = "X"; + + @SerializedName(SERIALIZED_NAME_X) + @jakarta.annotation.Nullable + private String X; + + public static final String SERIALIZED_NAME_R_LOWER_CASE = "r"; + + @SerializedName(SERIALIZED_NAME_R_LOWER_CASE) + @jakarta.annotation.Nullable + private String rLowerCase; + + public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; + + @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) + @jakarta.annotation.Nullable + private Long iLowerCase; + + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; + + @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) + @jakarta.annotation.Nullable + private String lLowerCase; + + public static final String SERIALIZED_NAME_Z_LOWER_CASE = "z"; + + @SerializedName(SERIALIZED_NAME_Z_LOWER_CASE) + @jakarta.annotation.Nullable + private String zLowerCase; + + public static final String SERIALIZED_NAME_L = "L"; + + @SerializedName(SERIALIZED_NAME_L) + @jakarta.annotation.Nullable + private String L; + + public static final String SERIALIZED_NAME_N_LOWER_CASE = "n"; + + @SerializedName(SERIALIZED_NAME_N_LOWER_CASE) + @jakarta.annotation.Nullable + private String nLowerCase; + + public static final String SERIALIZED_NAME_N = "N"; + + @SerializedName(SERIALIZED_NAME_N) + @jakarta.annotation.Nullable + private String N; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; + + @SerializedName(SERIALIZED_NAME_T_LOWER_CASE) + @jakarta.annotation.Nullable + private Long tLowerCase; + + public static final String SERIALIZED_NAME_V_LOWER_CASE = "v"; + + @SerializedName(SERIALIZED_NAME_V_LOWER_CASE) + @jakarta.annotation.Nullable + private Long vLowerCase; + + public static final String SERIALIZED_NAME_I = "I"; + + @SerializedName(SERIALIZED_NAME_I) + @jakarta.annotation.Nullable + private Long I; + + public static final String SERIALIZED_NAME_W_LOWER_CASE = "w"; + + @SerializedName(SERIALIZED_NAME_W_LOWER_CASE) + @jakarta.annotation.Nullable + private Boolean wLowerCase; + + public static final String SERIALIZED_NAME_M_LOWER_CASE = "m"; + + @SerializedName(SERIALIZED_NAME_M_LOWER_CASE) + @jakarta.annotation.Nullable + private Boolean mLowerCase; + + public static final String SERIALIZED_NAME_M = "M"; + + @SerializedName(SERIALIZED_NAME_M) + @jakarta.annotation.Nullable + private Boolean M; + + public static final String SERIALIZED_NAME_O = "O"; + + @SerializedName(SERIALIZED_NAME_O) + @jakarta.annotation.Nullable + private Long O; + + public static final String SERIALIZED_NAME_Z = "Z"; + + @SerializedName(SERIALIZED_NAME_Z) + @jakarta.annotation.Nullable + private String Z; + + public static final String SERIALIZED_NAME_Y = "Y"; + + @SerializedName(SERIALIZED_NAME_Y) + @jakarta.annotation.Nullable + private String Y; + + public static final String SERIALIZED_NAME_Q = "Q"; + + @SerializedName(SERIALIZED_NAME_Q) + @jakarta.annotation.Nullable + private String Q; + + public static final String SERIALIZED_NAME_W = "W"; + + @SerializedName(SERIALIZED_NAME_W) + @jakarta.annotation.Nullable + private Long W; + + public static final String SERIALIZED_NAME_V = "V"; + + @SerializedName(SERIALIZED_NAME_V) + @jakarta.annotation.Nullable + private String V; + + public static final String SERIALIZED_NAME_D_LOWER_CASE = "d"; + + @SerializedName(SERIALIZED_NAME_D_LOWER_CASE) + @jakarta.annotation.Nullable + private Long dLowerCase; + + public static final String SERIALIZED_NAME_D = "D"; + + @SerializedName(SERIALIZED_NAME_D) + @jakarta.annotation.Nullable + private Long D; + + public static final String SERIALIZED_NAME_J_LOWER_CASE = "j"; + + @SerializedName(SERIALIZED_NAME_J_LOWER_CASE) + @jakarta.annotation.Nullable + private Long jLowerCase; + + public static final String SERIALIZED_NAME_J = "J"; + + @SerializedName(SERIALIZED_NAME_J) + @jakarta.annotation.Nullable + private Long J; + + public static final String SERIALIZED_NAME_A = "A"; + + @SerializedName(SERIALIZED_NAME_A) + @jakarta.annotation.Nullable + private String A; + + public static final String SERIALIZED_NAME_B = "B"; + + @SerializedName(SERIALIZED_NAME_B) + @jakarta.annotation.Nullable + private String B; + + public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; + + @SerializedName(SERIALIZED_NAME_U_LOWER_CASE) + @jakarta.annotation.Nullable + private Long uLowerCase; + + public static final String SERIALIZED_NAME_U = "U"; + + @SerializedName(SERIALIZED_NAME_U) + @jakarta.annotation.Nullable + private Long U; + + public static final String SERIALIZED_NAME_CS = "Cs"; + + @SerializedName(SERIALIZED_NAME_CS) + @jakarta.annotation.Nullable + private String cs; + + public static final String SERIALIZED_NAME_PL = "pl"; + + @SerializedName(SERIALIZED_NAME_PL) + @jakarta.annotation.Nullable + private String pl; + + public static final String SERIALIZED_NAME_P_L = "pL"; + + @SerializedName(SERIALIZED_NAME_P_L) + @jakarta.annotation.Nullable + private String pL; + + public static final String SERIALIZED_NAME_P_Y = "pY"; + + @SerializedName(SERIALIZED_NAME_P_Y) + @jakarta.annotation.Nullable + private String pY; + + public static final String SERIALIZED_NAME_B_LOWER_CASE = "b"; + + @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) + @jakarta.annotation.Nullable + private String bLowerCase; + + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private Long aLowerCase; + + public static final String SERIALIZED_NAME_K_LOWER_CASE = "k"; + + @SerializedName(SERIALIZED_NAME_K_LOWER_CASE) + @jakarta.annotation.Nullable + private String kLowerCase; + + public static final String SERIALIZED_NAME_U_S = "uS"; + + @SerializedName(SERIALIZED_NAME_U_S) + @jakarta.annotation.Nullable + private Boolean uS; + + public static final String SERIALIZED_NAME_G_P = "gP"; + + @SerializedName(SERIALIZED_NAME_G_P) + @jakarta.annotation.Nullable + private String gP; + + public static final String SERIALIZED_NAME_G_O_T = "gOT"; + + @SerializedName(SERIALIZED_NAME_G_O_T) + @jakarta.annotation.Nullable + private String gOT; + + public static final String SERIALIZED_NAME_G_O_V = "gOV"; + + @SerializedName(SERIALIZED_NAME_G_O_V) + @jakarta.annotation.Nullable + private Long gOV; + + public static final String SERIALIZED_NAME_GP = "gp"; + + @SerializedName(SERIALIZED_NAME_GP) + @jakarta.annotation.Nullable + private String gp; + + public static final String SERIALIZED_NAME_E_R = "eR"; + + @SerializedName(SERIALIZED_NAME_E_R) + @jakarta.annotation.Nullable + private String eR; + + public ExecutionReport() {} + + public ExecutionReport E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public ExecutionReport sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * Symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public ExecutionReport cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + return this; + } + + /** + * Client order ID + * + * @return cLowerCase + */ + @jakarta.annotation.Nullable + public String getcLowerCase() { + return cLowerCase; + } + + public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + } + + public ExecutionReport S(@jakarta.annotation.Nullable String S) { + this.S = S; + return this; + } + + /** + * Side + * + * @return S + */ + @jakarta.annotation.Nullable + public String getS() { + return S; + } + + public void setS(@jakarta.annotation.Nullable String S) { + this.S = S; + } + + public ExecutionReport oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + return this; + } + + /** + * Order type + * + * @return oLowerCase + */ + @jakarta.annotation.Nullable + public String getoLowerCase() { + return oLowerCase; + } + + public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; + } + + public ExecutionReport fLowerCase(@jakarta.annotation.Nullable String fLowerCase) { + this.fLowerCase = fLowerCase; + return this; + } + + /** + * Time in force + * + * @return fLowerCase + */ + @jakarta.annotation.Nullable + public String getfLowerCase() { + return fLowerCase; + } + + public void setfLowerCase(@jakarta.annotation.Nullable String fLowerCase) { + this.fLowerCase = fLowerCase; + } + + public ExecutionReport qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + return this; + } + + /** + * Order quantity + * + * @return qLowerCase + */ + @jakarta.annotation.Nullable + public String getqLowerCase() { + return qLowerCase; + } + + public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; + } + + public ExecutionReport pLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + return this; + } + + /** + * Order price + * + * @return pLowerCase + */ + @jakarta.annotation.Nullable + public String getpLowerCase() { + return pLowerCase; + } + + public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; + } + + public ExecutionReport P(@jakarta.annotation.Nullable String P) { + this.P = P; + return this; + } + + /** + * Stop price + * + * @return P + */ + @jakarta.annotation.Nullable + public String getP() { + return P; + } + + public void setP(@jakarta.annotation.Nullable String P) { + this.P = P; + } + + public ExecutionReport F(@jakarta.annotation.Nullable String F) { + this.F = F; + return this; + } + + /** + * Iceberg quantity + * + * @return F + */ + @jakarta.annotation.Nullable + public String getF() { + return F; + } + + public void setF(@jakarta.annotation.Nullable String F) { + this.F = F; + } + + public ExecutionReport gLowerCase(@jakarta.annotation.Nullable Long gLowerCase) { + this.gLowerCase = gLowerCase; + return this; + } + + /** + * OrderListId + * + * @return gLowerCase + */ + @jakarta.annotation.Nullable + public Long getgLowerCase() { + return gLowerCase; + } + + public void setgLowerCase(@jakarta.annotation.Nullable Long gLowerCase) { + this.gLowerCase = gLowerCase; + } + + public ExecutionReport C(@jakarta.annotation.Nullable String C) { + this.C = C; + return this; + } + + /** + * Original client order ID; This is the ID of the order being canceled + * + * @return C + */ + @jakarta.annotation.Nullable + public String getC() { + return C; + } + + public void setC(@jakarta.annotation.Nullable String C) { + this.C = C; + } + + public ExecutionReport xLowerCase(@jakarta.annotation.Nullable String xLowerCase) { + this.xLowerCase = xLowerCase; + return this; + } + + /** + * Current execution type + * + * @return xLowerCase + */ + @jakarta.annotation.Nullable + public String getxLowerCase() { + return xLowerCase; + } + + public void setxLowerCase(@jakarta.annotation.Nullable String xLowerCase) { + this.xLowerCase = xLowerCase; + } + + public ExecutionReport X(@jakarta.annotation.Nullable String X) { + this.X = X; + return this; + } + + /** + * Current order status + * + * @return X + */ + @jakarta.annotation.Nullable + public String getX() { + return X; + } + + public void setX(@jakarta.annotation.Nullable String X) { + this.X = X; + } + + public ExecutionReport rLowerCase(@jakarta.annotation.Nullable String rLowerCase) { + this.rLowerCase = rLowerCase; + return this; + } + + /** + * Order reject reason; Please see Order Reject Reason for more information. + * + * @return rLowerCase + */ + @jakarta.annotation.Nullable + public String getrLowerCase() { + return rLowerCase; + } + + public void setrLowerCase(@jakarta.annotation.Nullable String rLowerCase) { + this.rLowerCase = rLowerCase; + } + + public ExecutionReport iLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { + this.iLowerCase = iLowerCase; + return this; + } + + /** + * Order ID + * + * @return iLowerCase + */ + @jakarta.annotation.Nullable + public Long getiLowerCase() { + return iLowerCase; + } + + public void setiLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { + this.iLowerCase = iLowerCase; + } + + public ExecutionReport lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + return this; + } + + /** + * Last executed quantity + * + * @return lLowerCase + */ + @jakarta.annotation.Nullable + public String getlLowerCase() { + return lLowerCase; + } + + public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + } + + public ExecutionReport zLowerCase(@jakarta.annotation.Nullable String zLowerCase) { + this.zLowerCase = zLowerCase; + return this; + } + + /** + * Cumulative filled quantity + * + * @return zLowerCase + */ + @jakarta.annotation.Nullable + public String getzLowerCase() { + return zLowerCase; + } + + public void setzLowerCase(@jakarta.annotation.Nullable String zLowerCase) { + this.zLowerCase = zLowerCase; + } + + public ExecutionReport L(@jakarta.annotation.Nullable String L) { + this.L = L; + return this; + } + + /** + * Last executed price + * + * @return L + */ + @jakarta.annotation.Nullable + public String getL() { + return L; + } + + public void setL(@jakarta.annotation.Nullable String L) { + this.L = L; + } + + public ExecutionReport nLowerCase(@jakarta.annotation.Nullable String nLowerCase) { + this.nLowerCase = nLowerCase; + return this; + } + + /** + * Commission amount + * + * @return nLowerCase + */ + @jakarta.annotation.Nullable + public String getnLowerCase() { + return nLowerCase; + } + + public void setnLowerCase(@jakarta.annotation.Nullable String nLowerCase) { + this.nLowerCase = nLowerCase; + } + + public ExecutionReport N(@jakarta.annotation.Nullable String N) { + this.N = N; + return this; + } + + /** + * Commission asset + * + * @return N + */ + @jakarta.annotation.Nullable + public String getN() { + return N; + } + + public void setN(@jakarta.annotation.Nullable String N) { + this.N = N; + } + + public ExecutionReport T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * Transaction time + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + public ExecutionReport tLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; + return this; + } + + /** + * Trade ID + * + * @return tLowerCase + */ + @jakarta.annotation.Nullable + public Long gettLowerCase() { + return tLowerCase; + } + + public void settLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; + } + + public ExecutionReport vLowerCase(@jakarta.annotation.Nullable Long vLowerCase) { + this.vLowerCase = vLowerCase; + return this; + } + + /** + * Prevented Match Id; This is only visible if the order expired due to STP + * + * @return vLowerCase + */ + @jakarta.annotation.Nullable + public Long getvLowerCase() { + return vLowerCase; + } + + public void setvLowerCase(@jakarta.annotation.Nullable Long vLowerCase) { + this.vLowerCase = vLowerCase; + } + + public ExecutionReport I(@jakarta.annotation.Nullable Long I) { + this.I = I; + return this; + } + + /** + * Execution Id + * + * @return I + */ + @jakarta.annotation.Nullable + public Long getI() { + return I; + } + + public void setI(@jakarta.annotation.Nullable Long I) { + this.I = I; + } + + public ExecutionReport wLowerCase(@jakarta.annotation.Nullable Boolean wLowerCase) { + this.wLowerCase = wLowerCase; + return this; + } + + /** + * Is the order on the book? + * + * @return wLowerCase + */ + @jakarta.annotation.Nullable + public Boolean getwLowerCase() { + return wLowerCase; + } + + public void setwLowerCase(@jakarta.annotation.Nullable Boolean wLowerCase) { + this.wLowerCase = wLowerCase; + } + + public ExecutionReport mLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { + this.mLowerCase = mLowerCase; + return this; + } + + /** + * Is this trade the maker side? + * + * @return mLowerCase + */ + @jakarta.annotation.Nullable + public Boolean getmLowerCase() { + return mLowerCase; + } + + public void setmLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) { + this.mLowerCase = mLowerCase; + } + + public ExecutionReport M(@jakarta.annotation.Nullable Boolean M) { + this.M = M; + return this; + } + + /** + * Ignore + * + * @return M + */ + @jakarta.annotation.Nullable + public Boolean getM() { + return M; + } + + public void setM(@jakarta.annotation.Nullable Boolean M) { + this.M = M; + } + + public ExecutionReport O(@jakarta.annotation.Nullable Long O) { + this.O = O; + return this; + } + + /** + * Order creation time + * + * @return O + */ + @jakarta.annotation.Nullable + public Long getO() { + return O; + } + + public void setO(@jakarta.annotation.Nullable Long O) { + this.O = O; + } + + public ExecutionReport Z(@jakarta.annotation.Nullable String Z) { + this.Z = Z; + return this; + } + + /** + * Cumulative quote asset transacted quantity + * + * @return Z + */ + @jakarta.annotation.Nullable + public String getZ() { + return Z; + } + + public void setZ(@jakarta.annotation.Nullable String Z) { + this.Z = Z; + } + + public ExecutionReport Y(@jakarta.annotation.Nullable String Y) { + this.Y = Y; + return this; + } + + /** + * Last quote asset transacted quantity (i.e. lastPrice * lastQty) + * + * @return Y + */ + @jakarta.annotation.Nullable + public String getY() { + return Y; + } + + public void setY(@jakarta.annotation.Nullable String Y) { + this.Y = Y; + } + + public ExecutionReport Q(@jakarta.annotation.Nullable String Q) { + this.Q = Q; + return this; + } + + /** + * Quote Order Quantity + * + * @return Q + */ + @jakarta.annotation.Nullable + public String getQ() { + return Q; + } + + public void setQ(@jakarta.annotation.Nullable String Q) { + this.Q = Q; + } + + public ExecutionReport W(@jakarta.annotation.Nullable Long W) { + this.W = W; + return this; + } + + /** + * Working Time; This is only visible if the order has been placed on the book. + * + * @return W + */ + @jakarta.annotation.Nullable + public Long getW() { + return W; + } + + public void setW(@jakarta.annotation.Nullable Long W) { + this.W = W; + } + + public ExecutionReport V(@jakarta.annotation.Nullable String V) { + this.V = V; + return this; + } + + /** + * SelfTradePreventionMode + * + * @return V + */ + @jakarta.annotation.Nullable + public String getV() { + return V; + } + + public void setV(@jakarta.annotation.Nullable String V) { + this.V = V; + } + + public ExecutionReport dLowerCase(@jakarta.annotation.Nullable Long dLowerCase) { + this.dLowerCase = dLowerCase; + return this; + } + + /** + * Trailing Delta + * + * @return dLowerCase + */ + @jakarta.annotation.Nullable + public Long getdLowerCase() { + return dLowerCase; + } + + public void setdLowerCase(@jakarta.annotation.Nullable Long dLowerCase) { + this.dLowerCase = dLowerCase; + } + + public ExecutionReport D(@jakarta.annotation.Nullable Long D) { + this.D = D; + return this; + } + + /** + * Trailing Time + * + * @return D + */ + @jakarta.annotation.Nullable + public Long getD() { + return D; + } + + public void setD(@jakarta.annotation.Nullable Long D) { + this.D = D; + } + + public ExecutionReport jLowerCase(@jakarta.annotation.Nullable Long jLowerCase) { + this.jLowerCase = jLowerCase; + return this; + } + + /** + * Strategy Id + * + * @return jLowerCase + */ + @jakarta.annotation.Nullable + public Long getjLowerCase() { + return jLowerCase; + } + + public void setjLowerCase(@jakarta.annotation.Nullable Long jLowerCase) { + this.jLowerCase = jLowerCase; + } + + public ExecutionReport J(@jakarta.annotation.Nullable Long J) { + this.J = J; + return this; + } + + /** + * Strategy Type + * + * @return J + */ + @jakarta.annotation.Nullable + public Long getJ() { + return J; + } + + public void setJ(@jakarta.annotation.Nullable Long J) { + this.J = J; + } + + public ExecutionReport A(@jakarta.annotation.Nullable String A) { + this.A = A; + return this; + } + + /** + * Prevented Quantity + * + * @return A + */ + @jakarta.annotation.Nullable + public String getA() { + return A; + } + + public void setA(@jakarta.annotation.Nullable String A) { + this.A = A; + } + + public ExecutionReport B(@jakarta.annotation.Nullable String B) { + this.B = B; + return this; + } + + /** + * Last Prevented Quantity + * + * @return B + */ + @jakarta.annotation.Nullable + public String getB() { + return B; + } + + public void setB(@jakarta.annotation.Nullable String B) { + this.B = B; + } + + public ExecutionReport uLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + return this; + } + + /** + * Trade Group Id + * + * @return uLowerCase + */ + @jakarta.annotation.Nullable + public Long getuLowerCase() { + return uLowerCase; + } + + public void setuLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + } + + public ExecutionReport U(@jakarta.annotation.Nullable Long U) { + this.U = U; + return this; + } + + /** + * Counter Order Id + * + * @return U + */ + @jakarta.annotation.Nullable + public Long getU() { + return U; + } + + public void setU(@jakarta.annotation.Nullable Long U) { + this.U = U; + } + + public ExecutionReport cs(@jakarta.annotation.Nullable String cs) { + this.cs = cs; + return this; + } + + /** + * Counter Symbol + * + * @return cs + */ + @jakarta.annotation.Nullable + public String getCs() { + return cs; + } + + public void setCs(@jakarta.annotation.Nullable String cs) { + this.cs = cs; + } + + public ExecutionReport pl(@jakarta.annotation.Nullable String pl) { + this.pl = pl; + return this; + } + + /** + * Prevented Execution Quantity + * + * @return pl + */ + @jakarta.annotation.Nullable + public String getPl() { + return pl; + } + + public void setPl(@jakarta.annotation.Nullable String pl) { + this.pl = pl; + } + + public ExecutionReport pL(@jakarta.annotation.Nullable String pL) { + this.pL = pL; + return this; + } + + /** + * Prevented Execution Price + * + * @return pL + */ + @jakarta.annotation.Nullable + public String getpL() { + return pL; + } + + public void setpL(@jakarta.annotation.Nullable String pL) { + this.pL = pL; + } + + public ExecutionReport pY(@jakarta.annotation.Nullable String pY) { + this.pY = pY; + return this; + } + + /** + * Prevented Execution Quote Qty + * + * @return pY + */ + @jakarta.annotation.Nullable + public String getpY() { + return pY; + } + + public void setpY(@jakarta.annotation.Nullable String pY) { + this.pY = pY; + } + + public ExecutionReport bLowerCase(@jakarta.annotation.Nullable String bLowerCase) { + this.bLowerCase = bLowerCase; + return this; + } + + /** + * Match Type + * + * @return bLowerCase + */ + @jakarta.annotation.Nullable + public String getbLowerCase() { + return bLowerCase; + } + + public void setbLowerCase(@jakarta.annotation.Nullable String bLowerCase) { + this.bLowerCase = bLowerCase; + } + + public ExecutionReport aLowerCase(@jakarta.annotation.Nullable Long aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + /** + * Allocation ID + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + public Long getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable Long aLowerCase) { + this.aLowerCase = aLowerCase; + } + + public ExecutionReport kLowerCase(@jakarta.annotation.Nullable String kLowerCase) { + this.kLowerCase = kLowerCase; + return this; + } + + /** + * Working Floor + * + * @return kLowerCase + */ + @jakarta.annotation.Nullable + public String getkLowerCase() { + return kLowerCase; + } + + public void setkLowerCase(@jakarta.annotation.Nullable String kLowerCase) { + this.kLowerCase = kLowerCase; + } + + public ExecutionReport uS(@jakarta.annotation.Nullable Boolean uS) { + this.uS = uS; + return this; + } + + /** + * UsedSor + * + * @return uS + */ + @jakarta.annotation.Nullable + public Boolean getuS() { + return uS; + } + + public void setuS(@jakarta.annotation.Nullable Boolean uS) { + this.uS = uS; + } + + public ExecutionReport gP(@jakarta.annotation.Nullable String gP) { + this.gP = gP; + return this; + } + + /** + * Pegged Price Type + * + * @return gP + */ + @jakarta.annotation.Nullable + public String getgP() { + return gP; + } + + public void setgP(@jakarta.annotation.Nullable String gP) { + this.gP = gP; + } + + public ExecutionReport gOT(@jakarta.annotation.Nullable String gOT) { + this.gOT = gOT; + return this; + } + + /** + * Pegged Offset Type + * + * @return gOT + */ + @jakarta.annotation.Nullable + public String getgOT() { + return gOT; + } + + public void setgOT(@jakarta.annotation.Nullable String gOT) { + this.gOT = gOT; + } + + public ExecutionReport gOV(@jakarta.annotation.Nullable Long gOV) { + this.gOV = gOV; + return this; + } + + /** + * Pegged Offset Value + * + * @return gOV + */ + @jakarta.annotation.Nullable + public Long getgOV() { + return gOV; + } + + public void setgOV(@jakarta.annotation.Nullable Long gOV) { + this.gOV = gOV; + } + + public ExecutionReport gp(@jakarta.annotation.Nullable String gp) { + this.gp = gp; + return this; + } + + /** + * Pegged Price + * + * @return gp + */ + @jakarta.annotation.Nullable + public String getGp() { + return gp; + } + + public void setGp(@jakarta.annotation.Nullable String gp) { + this.gp = gp; + } + + public ExecutionReport eR(@jakarta.annotation.Nullable String eR) { + this.eR = eR; + return this; + } + + /** + * Expiry Reason. Appears when the order has expired. + * + * @return eR + */ + @jakarta.annotation.Nullable + public String geteR() { + return eR; + } + + public void seteR(@jakarta.annotation.Nullable String eR) { + this.eR = eR; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecutionReport executionReport = (ExecutionReport) o; + return Objects.equals(this.E, executionReport.E) + && Objects.equals(this.sLowerCase, executionReport.sLowerCase) + && Objects.equals(this.cLowerCase, executionReport.cLowerCase) + && Objects.equals(this.S, executionReport.S) + && Objects.equals(this.oLowerCase, executionReport.oLowerCase) + && Objects.equals(this.fLowerCase, executionReport.fLowerCase) + && Objects.equals(this.qLowerCase, executionReport.qLowerCase) + && Objects.equals(this.pLowerCase, executionReport.pLowerCase) + && Objects.equals(this.P, executionReport.P) + && Objects.equals(this.F, executionReport.F) + && Objects.equals(this.gLowerCase, executionReport.gLowerCase) + && Objects.equals(this.C, executionReport.C) + && Objects.equals(this.xLowerCase, executionReport.xLowerCase) + && Objects.equals(this.X, executionReport.X) + && Objects.equals(this.rLowerCase, executionReport.rLowerCase) + && Objects.equals(this.iLowerCase, executionReport.iLowerCase) + && Objects.equals(this.lLowerCase, executionReport.lLowerCase) + && Objects.equals(this.zLowerCase, executionReport.zLowerCase) + && Objects.equals(this.L, executionReport.L) + && Objects.equals(this.nLowerCase, executionReport.nLowerCase) + && Objects.equals(this.N, executionReport.N) + && Objects.equals(this.T, executionReport.T) + && Objects.equals(this.tLowerCase, executionReport.tLowerCase) + && Objects.equals(this.vLowerCase, executionReport.vLowerCase) + && Objects.equals(this.I, executionReport.I) + && Objects.equals(this.wLowerCase, executionReport.wLowerCase) + && Objects.equals(this.mLowerCase, executionReport.mLowerCase) + && Objects.equals(this.M, executionReport.M) + && Objects.equals(this.O, executionReport.O) + && Objects.equals(this.Z, executionReport.Z) + && Objects.equals(this.Y, executionReport.Y) + && Objects.equals(this.Q, executionReport.Q) + && Objects.equals(this.W, executionReport.W) + && Objects.equals(this.V, executionReport.V) + && Objects.equals(this.dLowerCase, executionReport.dLowerCase) + && Objects.equals(this.D, executionReport.D) + && Objects.equals(this.jLowerCase, executionReport.jLowerCase) + && Objects.equals(this.J, executionReport.J) + && Objects.equals(this.A, executionReport.A) + && Objects.equals(this.B, executionReport.B) + && Objects.equals(this.uLowerCase, executionReport.uLowerCase) + && Objects.equals(this.U, executionReport.U) + && Objects.equals(this.cs, executionReport.cs) + && Objects.equals(this.pl, executionReport.pl) + && Objects.equals(this.pL, executionReport.pL) + && Objects.equals(this.pY, executionReport.pY) + && Objects.equals(this.bLowerCase, executionReport.bLowerCase) + && Objects.equals(this.aLowerCase, executionReport.aLowerCase) + && Objects.equals(this.kLowerCase, executionReport.kLowerCase) + && Objects.equals(this.uS, executionReport.uS) + && Objects.equals(this.gP, executionReport.gP) + && Objects.equals(this.gOT, executionReport.gOT) + && Objects.equals(this.gOV, executionReport.gOV) + && Objects.equals(this.gp, executionReport.gp) + && Objects.equals(this.eR, executionReport.eR); + } + + @Override + public int hashCode() { + return Objects.hash( + E, + sLowerCase, + cLowerCase, + S, + oLowerCase, + fLowerCase, + qLowerCase, + pLowerCase, + P, + F, + gLowerCase, + C, + xLowerCase, + X, + rLowerCase, + iLowerCase, + lLowerCase, + zLowerCase, + L, + nLowerCase, + N, + T, + tLowerCase, + vLowerCase, + I, + wLowerCase, + mLowerCase, + M, + O, + Z, + Y, + Q, + W, + V, + dLowerCase, + D, + jLowerCase, + J, + A, + B, + uLowerCase, + U, + cs, + pl, + pL, + pY, + bLowerCase, + aLowerCase, + kLowerCase, + uS, + gP, + gOT, + gOV, + gp, + eR); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecutionReport {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); + sb.append(" S: ").append(toIndentedString(S)).append("\n"); + sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); + sb.append(" fLowerCase: ").append(toIndentedString(fLowerCase)).append("\n"); + sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); + sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); + sb.append(" P: ").append(toIndentedString(P)).append("\n"); + sb.append(" F: ").append(toIndentedString(F)).append("\n"); + sb.append(" gLowerCase: ").append(toIndentedString(gLowerCase)).append("\n"); + sb.append(" C: ").append(toIndentedString(C)).append("\n"); + sb.append(" xLowerCase: ").append(toIndentedString(xLowerCase)).append("\n"); + sb.append(" X: ").append(toIndentedString(X)).append("\n"); + sb.append(" rLowerCase: ").append(toIndentedString(rLowerCase)).append("\n"); + sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append(" zLowerCase: ").append(toIndentedString(zLowerCase)).append("\n"); + sb.append(" L: ").append(toIndentedString(L)).append("\n"); + sb.append(" nLowerCase: ").append(toIndentedString(nLowerCase)).append("\n"); + sb.append(" N: ").append(toIndentedString(N)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" tLowerCase: ").append(toIndentedString(tLowerCase)).append("\n"); + sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); + sb.append(" I: ").append(toIndentedString(I)).append("\n"); + sb.append(" wLowerCase: ").append(toIndentedString(wLowerCase)).append("\n"); + sb.append(" mLowerCase: ").append(toIndentedString(mLowerCase)).append("\n"); + sb.append(" M: ").append(toIndentedString(M)).append("\n"); + sb.append(" O: ").append(toIndentedString(O)).append("\n"); + sb.append(" Z: ").append(toIndentedString(Z)).append("\n"); + sb.append(" Y: ").append(toIndentedString(Y)).append("\n"); + sb.append(" Q: ").append(toIndentedString(Q)).append("\n"); + sb.append(" W: ").append(toIndentedString(W)).append("\n"); + sb.append(" V: ").append(toIndentedString(V)).append("\n"); + sb.append(" dLowerCase: ").append(toIndentedString(dLowerCase)).append("\n"); + sb.append(" D: ").append(toIndentedString(D)).append("\n"); + sb.append(" jLowerCase: ").append(toIndentedString(jLowerCase)).append("\n"); + sb.append(" J: ").append(toIndentedString(J)).append("\n"); + sb.append(" A: ").append(toIndentedString(A)).append("\n"); + sb.append(" B: ").append(toIndentedString(B)).append("\n"); + sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); + sb.append(" U: ").append(toIndentedString(U)).append("\n"); + sb.append(" cs: ").append(toIndentedString(cs)).append("\n"); + sb.append(" pl: ").append(toIndentedString(pl)).append("\n"); + sb.append(" pL: ").append(toIndentedString(pL)).append("\n"); + sb.append(" pY: ").append(toIndentedString(pY)).append("\n"); + sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" kLowerCase: ").append(toIndentedString(kLowerCase)).append("\n"); + sb.append(" uS: ").append(toIndentedString(uS)).append("\n"); + sb.append(" gP: ").append(toIndentedString(gP)).append("\n"); + sb.append(" gOT: ").append(toIndentedString(gOT)).append("\n"); + sb.append(" gOV: ").append(toIndentedString(gOV)).append("\n"); + sb.append(" gp: ").append(toIndentedString(gp)).append("\n"); + sb.append(" eR: ").append(toIndentedString(eR)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + String cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + String cLowerCaseValueAsString = cLowerCaseValue.toString(); + valMap.put("cLowerCase", cLowerCaseValueAsString); + } + String SValue = getS(); + if (SValue != null) { + String SValueAsString = SValue.toString(); + valMap.put("S", SValueAsString); + } + String oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + String oLowerCaseValueAsString = oLowerCaseValue.toString(); + valMap.put("oLowerCase", oLowerCaseValueAsString); + } + String fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + String fLowerCaseValueAsString = fLowerCaseValue.toString(); + valMap.put("fLowerCase", fLowerCaseValueAsString); + } + String qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + String qLowerCaseValueAsString = qLowerCaseValue.toString(); + valMap.put("qLowerCase", qLowerCaseValueAsString); + } + String pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + String pLowerCaseValueAsString = pLowerCaseValue.toString(); + valMap.put("pLowerCase", pLowerCaseValueAsString); + } + String PValue = getP(); + if (PValue != null) { + String PValueAsString = PValue.toString(); + valMap.put("P", PValueAsString); + } + String FValue = getF(); + if (FValue != null) { + String FValueAsString = FValue.toString(); + valMap.put("F", FValueAsString); + } + Long gLowerCaseValue = getgLowerCase(); + if (gLowerCaseValue != null) { + String gLowerCaseValueAsString = gLowerCaseValue.toString(); + valMap.put("gLowerCase", gLowerCaseValueAsString); + } + String CValue = getC(); + if (CValue != null) { + String CValueAsString = CValue.toString(); + valMap.put("C", CValueAsString); + } + String xLowerCaseValue = getxLowerCase(); + if (xLowerCaseValue != null) { + String xLowerCaseValueAsString = xLowerCaseValue.toString(); + valMap.put("xLowerCase", xLowerCaseValueAsString); + } + String XValue = getX(); + if (XValue != null) { + String XValueAsString = XValue.toString(); + valMap.put("X", XValueAsString); + } + String rLowerCaseValue = getrLowerCase(); + if (rLowerCaseValue != null) { + String rLowerCaseValueAsString = rLowerCaseValue.toString(); + valMap.put("rLowerCase", rLowerCaseValueAsString); + } + Long iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + String iLowerCaseValueAsString = iLowerCaseValue.toString(); + valMap.put("iLowerCase", iLowerCaseValueAsString); + } + String lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + String zLowerCaseValue = getzLowerCase(); + if (zLowerCaseValue != null) { + String zLowerCaseValueAsString = zLowerCaseValue.toString(); + valMap.put("zLowerCase", zLowerCaseValueAsString); + } + String LValue = getL(); + if (LValue != null) { + String LValueAsString = LValue.toString(); + valMap.put("L", LValueAsString); + } + String nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + String nLowerCaseValueAsString = nLowerCaseValue.toString(); + valMap.put("nLowerCase", nLowerCaseValueAsString); + } + String NValue = getN(); + if (NValue != null) { + String NValueAsString = NValue.toString(); + valMap.put("N", NValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + Long tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + String tLowerCaseValueAsString = tLowerCaseValue.toString(); + valMap.put("tLowerCase", tLowerCaseValueAsString); + } + Long vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + String vLowerCaseValueAsString = vLowerCaseValue.toString(); + valMap.put("vLowerCase", vLowerCaseValueAsString); + } + Long IValue = getI(); + if (IValue != null) { + String IValueAsString = IValue.toString(); + valMap.put("I", IValueAsString); + } + Boolean wLowerCaseValue = getwLowerCase(); + if (wLowerCaseValue != null) { + String wLowerCaseValueAsString = wLowerCaseValue.toString(); + valMap.put("wLowerCase", wLowerCaseValueAsString); + } + Boolean mLowerCaseValue = getmLowerCase(); + if (mLowerCaseValue != null) { + String mLowerCaseValueAsString = mLowerCaseValue.toString(); + valMap.put("mLowerCase", mLowerCaseValueAsString); + } + Boolean MValue = getM(); + if (MValue != null) { + String MValueAsString = MValue.toString(); + valMap.put("M", MValueAsString); + } + Long OValue = getO(); + if (OValue != null) { + String OValueAsString = OValue.toString(); + valMap.put("O", OValueAsString); + } + String ZValue = getZ(); + if (ZValue != null) { + String ZValueAsString = ZValue.toString(); + valMap.put("Z", ZValueAsString); + } + String YValue = getY(); + if (YValue != null) { + String YValueAsString = YValue.toString(); + valMap.put("Y", YValueAsString); + } + String QValue = getQ(); + if (QValue != null) { + String QValueAsString = QValue.toString(); + valMap.put("Q", QValueAsString); + } + Long WValue = getW(); + if (WValue != null) { + String WValueAsString = WValue.toString(); + valMap.put("W", WValueAsString); + } + String VValue = getV(); + if (VValue != null) { + String VValueAsString = VValue.toString(); + valMap.put("V", VValueAsString); + } + Long dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + String dLowerCaseValueAsString = dLowerCaseValue.toString(); + valMap.put("dLowerCase", dLowerCaseValueAsString); + } + Long DValue = getD(); + if (DValue != null) { + String DValueAsString = DValue.toString(); + valMap.put("D", DValueAsString); + } + Long jLowerCaseValue = getjLowerCase(); + if (jLowerCaseValue != null) { + String jLowerCaseValueAsString = jLowerCaseValue.toString(); + valMap.put("jLowerCase", jLowerCaseValueAsString); + } + Long JValue = getJ(); + if (JValue != null) { + String JValueAsString = JValue.toString(); + valMap.put("J", JValueAsString); + } + String AValue = getA(); + if (AValue != null) { + String AValueAsString = AValue.toString(); + valMap.put("A", AValueAsString); + } + String BValue = getB(); + if (BValue != null) { + String BValueAsString = BValue.toString(); + valMap.put("B", BValueAsString); + } + Long uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + String uLowerCaseValueAsString = uLowerCaseValue.toString(); + valMap.put("uLowerCase", uLowerCaseValueAsString); + } + Long UValue = getU(); + if (UValue != null) { + String UValueAsString = UValue.toString(); + valMap.put("U", UValueAsString); + } + String csValue = getCs(); + if (csValue != null) { + String csValueAsString = csValue.toString(); + valMap.put("cs", csValueAsString); + } + String plValue = getPl(); + if (plValue != null) { + String plValueAsString = plValue.toString(); + valMap.put("pl", plValueAsString); + } + String pLValue = getpL(); + if (pLValue != null) { + String pLValueAsString = pLValue.toString(); + valMap.put("pL", pLValueAsString); + } + String pYValue = getpY(); + if (pYValue != null) { + String pYValueAsString = pYValue.toString(); + valMap.put("pY", pYValueAsString); + } + String bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + String bLowerCaseValueAsString = bLowerCaseValue.toString(); + valMap.put("bLowerCase", bLowerCaseValueAsString); + } + Long aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = aLowerCaseValue.toString(); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + String kLowerCaseValue = getkLowerCase(); + if (kLowerCaseValue != null) { + String kLowerCaseValueAsString = kLowerCaseValue.toString(); + valMap.put("kLowerCase", kLowerCaseValueAsString); + } + Boolean uSValue = getuS(); + if (uSValue != null) { + String uSValueAsString = uSValue.toString(); + valMap.put("uS", uSValueAsString); + } + String gPValue = getgP(); + if (gPValue != null) { + String gPValueAsString = gPValue.toString(); + valMap.put("gP", gPValueAsString); + } + String gOTValue = getgOT(); + if (gOTValue != null) { + String gOTValueAsString = gOTValue.toString(); + valMap.put("gOT", gOTValueAsString); + } + Long gOVValue = getgOV(); + if (gOVValue != null) { + String gOVValueAsString = gOVValue.toString(); + valMap.put("gOV", gOVValueAsString); + } + String gpValue = getGp(); + if (gpValue != null) { + String gpValueAsString = gpValue.toString(); + valMap.put("gp", gpValueAsString); + } + String eRValue = geteR(); + if (eRValue != null) { + String eRValueAsString = eRValue.toString(); + valMap.put("eR", eRValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + valMap.put("cLowerCase", cLowerCaseValue); + } + Object SValue = getS(); + if (SValue != null) { + valMap.put("S", SValue); + } + Object oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + valMap.put("oLowerCase", oLowerCaseValue); + } + Object fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + valMap.put("fLowerCase", fLowerCaseValue); + } + Object qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + valMap.put("qLowerCase", qLowerCaseValue); + } + Object pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + valMap.put("pLowerCase", pLowerCaseValue); + } + Object PValue = getP(); + if (PValue != null) { + valMap.put("P", PValue); + } + Object FValue = getF(); + if (FValue != null) { + valMap.put("F", FValue); + } + Object gLowerCaseValue = getgLowerCase(); + if (gLowerCaseValue != null) { + valMap.put("gLowerCase", gLowerCaseValue); + } + Object CValue = getC(); + if (CValue != null) { + valMap.put("C", CValue); + } + Object xLowerCaseValue = getxLowerCase(); + if (xLowerCaseValue != null) { + valMap.put("xLowerCase", xLowerCaseValue); + } + Object XValue = getX(); + if (XValue != null) { + valMap.put("X", XValue); + } + Object rLowerCaseValue = getrLowerCase(); + if (rLowerCaseValue != null) { + valMap.put("rLowerCase", rLowerCaseValue); + } + Object iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + valMap.put("iLowerCase", iLowerCaseValue); + } + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); + } + Object zLowerCaseValue = getzLowerCase(); + if (zLowerCaseValue != null) { + valMap.put("zLowerCase", zLowerCaseValue); + } + Object LValue = getL(); + if (LValue != null) { + valMap.put("L", LValue); + } + Object nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + valMap.put("nLowerCase", nLowerCaseValue); + } + Object NValue = getN(); + if (NValue != null) { + valMap.put("N", NValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + Object tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + valMap.put("tLowerCase", tLowerCaseValue); + } + Object vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + valMap.put("vLowerCase", vLowerCaseValue); + } + Object IValue = getI(); + if (IValue != null) { + valMap.put("I", IValue); + } + Object wLowerCaseValue = getwLowerCase(); + if (wLowerCaseValue != null) { + valMap.put("wLowerCase", wLowerCaseValue); + } + Object mLowerCaseValue = getmLowerCase(); + if (mLowerCaseValue != null) { + valMap.put("mLowerCase", mLowerCaseValue); + } + Object MValue = getM(); + if (MValue != null) { + valMap.put("M", MValue); + } + Object OValue = getO(); + if (OValue != null) { + valMap.put("O", OValue); + } + Object ZValue = getZ(); + if (ZValue != null) { + valMap.put("Z", ZValue); + } + Object YValue = getY(); + if (YValue != null) { + valMap.put("Y", YValue); + } + Object QValue = getQ(); + if (QValue != null) { + valMap.put("Q", QValue); + } + Object WValue = getW(); + if (WValue != null) { + valMap.put("W", WValue); + } + Object VValue = getV(); + if (VValue != null) { + valMap.put("V", VValue); + } + Object dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + valMap.put("dLowerCase", dLowerCaseValue); + } + Object DValue = getD(); + if (DValue != null) { + valMap.put("D", DValue); + } + Object jLowerCaseValue = getjLowerCase(); + if (jLowerCaseValue != null) { + valMap.put("jLowerCase", jLowerCaseValue); + } + Object JValue = getJ(); + if (JValue != null) { + valMap.put("J", JValue); + } + Object AValue = getA(); + if (AValue != null) { + valMap.put("A", AValue); + } + Object BValue = getB(); + if (BValue != null) { + valMap.put("B", BValue); + } + Object uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + valMap.put("uLowerCase", uLowerCaseValue); + } + Object UValue = getU(); + if (UValue != null) { + valMap.put("U", UValue); + } + Object csValue = getCs(); + if (csValue != null) { + valMap.put("cs", csValue); + } + Object plValue = getPl(); + if (plValue != null) { + valMap.put("pl", plValue); + } + Object pLValue = getpL(); + if (pLValue != null) { + valMap.put("pL", pLValue); + } + Object pYValue = getpY(); + if (pYValue != null) { + valMap.put("pY", pYValue); + } + Object bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + valMap.put("bLowerCase", bLowerCaseValue); + } + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + Object kLowerCaseValue = getkLowerCase(); + if (kLowerCaseValue != null) { + valMap.put("kLowerCase", kLowerCaseValue); + } + Object uSValue = getuS(); + if (uSValue != null) { + valMap.put("uS", uSValue); + } + Object gPValue = getgP(); + if (gPValue != null) { + valMap.put("gP", gPValue); + } + Object gOTValue = getgOT(); + if (gOTValue != null) { + valMap.put("gOT", gOTValue); + } + Object gOVValue = getgOV(); + if (gOVValue != null) { + valMap.put("gOV", gOVValue); + } + Object gpValue = getGp(); + if (gpValue != null) { + valMap.put("gp", gpValue); + } + Object eRValue = geteR(); + if (eRValue != null) { + valMap.put("eR", eRValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("s"); + openapiFields.add("c"); + openapiFields.add("S"); + openapiFields.add("o"); + openapiFields.add("f"); + openapiFields.add("q"); + openapiFields.add("p"); + openapiFields.add("P"); + openapiFields.add("F"); + openapiFields.add("g"); + openapiFields.add("C"); + openapiFields.add("x"); + openapiFields.add("X"); + openapiFields.add("r"); + openapiFields.add("i"); + openapiFields.add("l"); + openapiFields.add("z"); + openapiFields.add("L"); + openapiFields.add("n"); + openapiFields.add("N"); + openapiFields.add("T"); + openapiFields.add("t"); + openapiFields.add("v"); + openapiFields.add("I"); + openapiFields.add("w"); + openapiFields.add("m"); + openapiFields.add("M"); + openapiFields.add("O"); + openapiFields.add("Z"); + openapiFields.add("Y"); + openapiFields.add("Q"); + openapiFields.add("W"); + openapiFields.add("V"); + openapiFields.add("d"); + openapiFields.add("D"); + openapiFields.add("j"); + openapiFields.add("J"); + openapiFields.add("A"); + openapiFields.add("B"); + openapiFields.add("u"); + openapiFields.add("U"); + openapiFields.add("Cs"); + openapiFields.add("pl"); + openapiFields.add("pL"); + openapiFields.add("pY"); + openapiFields.add("b"); + openapiFields.add("a"); + openapiFields.add("k"); + openapiFields.add("uS"); + openapiFields.add("gP"); + openapiFields.add("gOT"); + openapiFields.add("gOV"); + openapiFields.add("gp"); + openapiFields.add("eR"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExecutionReport + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExecutionReport.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ExecutionReport is not found in the" + + " empty JSON string", + ExecutionReport.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExecutionReport.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ExecutionReport` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) + && !jsonObj.get("c").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `c` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("c").toString())); + } + if ((jsonObj.get("S") != null && !jsonObj.get("S").isJsonNull()) + && !jsonObj.get("S").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `S` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("S").toString())); + } + if ((jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) + && !jsonObj.get("o").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `o` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("o").toString())); + } + if ((jsonObj.get("f") != null && !jsonObj.get("f").isJsonNull()) + && !jsonObj.get("f").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `f` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("f").toString())); + } + if ((jsonObj.get("q") != null && !jsonObj.get("q").isJsonNull()) + && !jsonObj.get("q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("q").toString())); + } + if ((jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) + && !jsonObj.get("p").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `p` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("p").toString())); + } + if ((jsonObj.get("P") != null && !jsonObj.get("P").isJsonNull()) + && !jsonObj.get("P").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `P` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("P").toString())); + } + if ((jsonObj.get("F") != null && !jsonObj.get("F").isJsonNull()) + && !jsonObj.get("F").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `F` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("F").toString())); + } + if ((jsonObj.get("C") != null && !jsonObj.get("C").isJsonNull()) + && !jsonObj.get("C").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `C` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("C").toString())); + } + if ((jsonObj.get("x") != null && !jsonObj.get("x").isJsonNull()) + && !jsonObj.get("x").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `x` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("x").toString())); + } + if ((jsonObj.get("X") != null && !jsonObj.get("X").isJsonNull()) + && !jsonObj.get("X").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `X` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("X").toString())); + } + if ((jsonObj.get("r") != null && !jsonObj.get("r").isJsonNull()) + && !jsonObj.get("r").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `r` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("r").toString())); + } + if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) + && !jsonObj.get("l").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `l` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("l").toString())); + } + if ((jsonObj.get("z") != null && !jsonObj.get("z").isJsonNull()) + && !jsonObj.get("z").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `z` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("z").toString())); + } + if ((jsonObj.get("L") != null && !jsonObj.get("L").isJsonNull()) + && !jsonObj.get("L").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `L` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("L").toString())); + } + if ((jsonObj.get("n") != null && !jsonObj.get("n").isJsonNull()) + && !jsonObj.get("n").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `n` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("n").toString())); + } + if ((jsonObj.get("N") != null && !jsonObj.get("N").isJsonNull()) + && !jsonObj.get("N").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `N` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("N").toString())); + } + if ((jsonObj.get("Z") != null && !jsonObj.get("Z").isJsonNull()) + && !jsonObj.get("Z").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Z` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("Z").toString())); + } + if ((jsonObj.get("Y") != null && !jsonObj.get("Y").isJsonNull()) + && !jsonObj.get("Y").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Y` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("Y").toString())); + } + if ((jsonObj.get("Q") != null && !jsonObj.get("Q").isJsonNull()) + && !jsonObj.get("Q").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Q` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("Q").toString())); + } + if ((jsonObj.get("V") != null && !jsonObj.get("V").isJsonNull()) + && !jsonObj.get("V").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `V` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("V").toString())); + } + if ((jsonObj.get("A") != null && !jsonObj.get("A").isJsonNull()) + && !jsonObj.get("A").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `A` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("A").toString())); + } + if ((jsonObj.get("B") != null && !jsonObj.get("B").isJsonNull()) + && !jsonObj.get("B").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `B` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("B").toString())); + } + if ((jsonObj.get("Cs") != null && !jsonObj.get("Cs").isJsonNull()) + && !jsonObj.get("Cs").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Cs` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("Cs").toString())); + } + if ((jsonObj.get("pl") != null && !jsonObj.get("pl").isJsonNull()) + && !jsonObj.get("pl").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pl` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("pl").toString())); + } + if ((jsonObj.get("pL") != null && !jsonObj.get("pL").isJsonNull()) + && !jsonObj.get("pL").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pL` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("pL").toString())); + } + if ((jsonObj.get("pY") != null && !jsonObj.get("pY").isJsonNull()) + && !jsonObj.get("pY").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `pY` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("pY").toString())); + } + if ((jsonObj.get("b") != null && !jsonObj.get("b").isJsonNull()) + && !jsonObj.get("b").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `b` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("b").toString())); + } + if ((jsonObj.get("k") != null && !jsonObj.get("k").isJsonNull()) + && !jsonObj.get("k").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `k` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("k").toString())); + } + if ((jsonObj.get("gP") != null && !jsonObj.get("gP").isJsonNull()) + && !jsonObj.get("gP").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `gP` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("gP").toString())); + } + if ((jsonObj.get("gOT") != null && !jsonObj.get("gOT").isJsonNull()) + && !jsonObj.get("gOT").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `gOT` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("gOT").toString())); + } + if ((jsonObj.get("gp") != null && !jsonObj.get("gp").isJsonNull()) + && !jsonObj.get("gp").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `gp` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("gp").toString())); + } + if ((jsonObj.get("eR") != null && !jsonObj.get("eR").isJsonNull()) + && !jsonObj.get("eR").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `eR` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("eR").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExecutionReport.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExecutionReport' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ExecutionReport.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ExecutionReport value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExecutionReport read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ExecutionReport given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExecutionReport + * @throws IOException if the JSON string is invalid with respect to ExecutionReport + */ + public static ExecutionReport fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExecutionReport.class); + } + + /** + * Convert an instance of ExecutionReport to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExternalLockUpdate.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExternalLockUpdate.java new file mode 100644 index 000000000..ad431009f --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExternalLockUpdate.java @@ -0,0 +1,359 @@ +/* + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ExternalLockUpdate */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ExternalLockUpdate extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private String aLowerCase; + + public static final String SERIALIZED_NAME_D_LOWER_CASE = "d"; + + @SerializedName(SERIALIZED_NAME_D_LOWER_CASE) + @jakarta.annotation.Nullable + private String dLowerCase; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public ExternalLockUpdate() {} + + public ExternalLockUpdate E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public ExternalLockUpdate aLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + /** + * Asset + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + public String getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + } + + public ExternalLockUpdate dLowerCase(@jakarta.annotation.Nullable String dLowerCase) { + this.dLowerCase = dLowerCase; + return this; + } + + /** + * Delta + * + * @return dLowerCase + */ + @jakarta.annotation.Nullable + public String getdLowerCase() { + return dLowerCase; + } + + public void setdLowerCase(@jakarta.annotation.Nullable String dLowerCase) { + this.dLowerCase = dLowerCase; + } + + public ExternalLockUpdate T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * Transaction Time + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExternalLockUpdate externalLockUpdate = (ExternalLockUpdate) o; + return Objects.equals(this.E, externalLockUpdate.E) + && Objects.equals(this.aLowerCase, externalLockUpdate.aLowerCase) + && Objects.equals(this.dLowerCase, externalLockUpdate.dLowerCase) + && Objects.equals(this.T, externalLockUpdate.T); + } + + @Override + public int hashCode() { + return Objects.hash(E, aLowerCase, dLowerCase, T); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExternalLockUpdate {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" dLowerCase: ").append(toIndentedString(dLowerCase)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = aLowerCaseValue.toString(); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + String dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + String dLowerCaseValueAsString = dLowerCaseValue.toString(); + valMap.put("dLowerCase", dLowerCaseValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + Object dLowerCaseValue = getdLowerCase(); + if (dLowerCaseValue != null) { + valMap.put("dLowerCase", dLowerCaseValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("a"); + openapiFields.add("d"); + openapiFields.add("T"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExternalLockUpdate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExternalLockUpdate.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ExternalLockUpdate is not found in the" + + " empty JSON string", + ExternalLockUpdate.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExternalLockUpdate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ExternalLockUpdate` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) + && !jsonObj.get("a").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `a` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("a").toString())); + } + if ((jsonObj.get("d") != null && !jsonObj.get("d").isJsonNull()) + && !jsonObj.get("d").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `d` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("d").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExternalLockUpdate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExternalLockUpdate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ExternalLockUpdate.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ExternalLockUpdate value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExternalLockUpdate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ExternalLockUpdate given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExternalLockUpdate + * @throws IOException if the JSON string is invalid with respect to ExternalLockUpdate + */ + public static ExternalLockUpdate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExternalLockUpdate.class); + } + + /** + * Convert an instance of ExternalLockUpdate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/IcebergPartsFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/IcebergPartsFilter.java deleted file mode 100644 index fd29c9318..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/IcebergPartsFilter.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** IcebergPartsFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class IcebergPartsFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_LIMIT = "limit"; - - @SerializedName(SERIALIZED_NAME_LIMIT) - @jakarta.annotation.Nullable - private Long limit; - - public IcebergPartsFilter() {} - - public IcebergPartsFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public IcebergPartsFilter limit(@jakarta.annotation.Nullable Long limit) { - this.limit = limit; - return this; - } - - /** - * Get limit - * - * @return limit - */ - @jakarta.annotation.Nullable - public Long getLimit() { - return limit; - } - - public void setLimit(@jakarta.annotation.Nullable Long limit) { - this.limit = limit; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IcebergPartsFilter icebergPartsFilter = (IcebergPartsFilter) o; - return Objects.equals(this.filterType, icebergPartsFilter.filterType) - && Objects.equals(this.limit, icebergPartsFilter.limit); - } - - @Override - public int hashCode() { - return Objects.hash(filterType, limit); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IcebergPartsFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Long limitValue = getLimit(); - if (limitValue != null) { - String limitValueAsString = limitValue.toString(); - valMap.put("limit", limitValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object limitValue = getLimit(); - if (limitValue != null) { - valMap.put("limit", limitValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("limit"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IcebergPartsFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IcebergPartsFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in IcebergPartsFilter is not found in the" - + " empty JSON string", - IcebergPartsFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!IcebergPartsFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `IcebergPartsFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IcebergPartsFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IcebergPartsFilter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(IcebergPartsFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, IcebergPartsFilter value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public IcebergPartsFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of IcebergPartsFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of IcebergPartsFilter - * @throws IOException if the JSON string is invalid with respect to IcebergPartsFilter - */ - public static IcebergPartsFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IcebergPartsFilter.class); - } - - /** - * Convert an instance of IcebergPartsFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/Interval.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/Interval.java index a64059dfc..c40ef81b8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/Interval.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/Interval.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineOffsetRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineOffsetRequest.java index 003b10aff..e4d2c6329 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineOffsetRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineOffsetRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,43 +38,67 @@ /** KlineOffsetRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlineOffsetRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_INTERVAL = "interval"; @SerializedName(SERIALIZED_NAME_INTERVAL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private Interval interval; public KlineOffsetRequest() {} - public KlineOffsetRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public KlineOffsetRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public KlineOffsetRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Symbol to query * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } - public KlineOffsetRequest interval(@jakarta.annotation.Nonnull Interval interval) { + public KlineOffsetRequest interval(@jakarta.annotation.Nullable Interval interval) { this.interval = interval; return this; } @@ -84,14 +108,13 @@ public KlineOffsetRequest interval(@jakarta.annotation.Nonnull Interval interval * * @return interval */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable @Valid public Interval getInterval() { return interval; } - public void setInterval(@jakarta.annotation.Nonnull Interval interval) { + public void setInterval(@jakarta.annotation.Nullable Interval interval) { this.interval = interval; } @@ -104,19 +127,21 @@ public boolean equals(Object o) { return false; } KlineOffsetRequest klineOffsetRequest = (KlineOffsetRequest) o; - return Objects.equals(this.symbol, klineOffsetRequest.symbol) + return Objects.equals(this.id, klineOffsetRequest.id) + && Objects.equals(this.symbol, klineOffsetRequest.symbol) && Objects.equals(this.interval, klineOffsetRequest.interval); } @Override public int hashCode() { - return Objects.hash(symbol, interval); + return Objects.hash(id, symbol, interval); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class KlineOffsetRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); sb.append("}"); @@ -127,6 +152,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -148,6 +178,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -182,13 +216,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("interval"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); - openapiRequiredFields.add("interval"); } /** @@ -220,26 +253,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : KlineOffsetRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - // validate the required field `interval` - Interval.validateJsonElement(jsonObj.get("interval")); + // validate the optional field `interval` + if (jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) { + Interval.validateJsonElement(jsonObj.get("interval")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineOffsetResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineOffsetResponse.java index 418a70385..eb44fa191 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineOffsetResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineOffsetResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** KlineOffsetResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlineOffsetResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -72,7 +72,7 @@ public KlineOffsetResponse eLowerCase(@jakarta.annotation.Nullable String eLower } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -91,7 +91,7 @@ public KlineOffsetResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -110,7 +110,7 @@ public KlineOffsetResponse sLowerCase(@jakarta.annotation.Nullable String sLower } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineRequest.java index c91efc7da..5e61d36ca 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,43 +38,67 @@ /** KlineRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlineRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_INTERVAL = "interval"; @SerializedName(SERIALIZED_NAME_INTERVAL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private Interval interval; public KlineRequest() {} - public KlineRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public KlineRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public KlineRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Symbol to query * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } - public KlineRequest interval(@jakarta.annotation.Nonnull Interval interval) { + public KlineRequest interval(@jakarta.annotation.Nullable Interval interval) { this.interval = interval; return this; } @@ -84,14 +108,13 @@ public KlineRequest interval(@jakarta.annotation.Nonnull Interval interval) { * * @return interval */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable @Valid public Interval getInterval() { return interval; } - public void setInterval(@jakarta.annotation.Nonnull Interval interval) { + public void setInterval(@jakarta.annotation.Nullable Interval interval) { this.interval = interval; } @@ -104,19 +127,21 @@ public boolean equals(Object o) { return false; } KlineRequest klineRequest = (KlineRequest) o; - return Objects.equals(this.symbol, klineRequest.symbol) + return Objects.equals(this.id, klineRequest.id) + && Objects.equals(this.symbol, klineRequest.symbol) && Objects.equals(this.interval, klineRequest.interval); } @Override public int hashCode() { - return Objects.hash(symbol, interval); + return Objects.hash(id, symbol, interval); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class KlineRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); sb.append("}"); @@ -127,6 +152,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -148,6 +178,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -182,13 +216,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("interval"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); - openapiRequiredFields.add("interval"); } /** @@ -220,26 +253,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : KlineRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - // validate the required field `interval` - Interval.validateJsonElement(jsonObj.get("interval")); + // validate the optional field `interval` + if (jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) { + Interval.validateJsonElement(jsonObj.get("interval")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineResponse.java index 7cfad460d..91f7d9144 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** KlineResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlineResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -72,7 +72,7 @@ public KlineResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -91,7 +91,7 @@ public KlineResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -110,7 +110,7 @@ public KlineResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineResponseK.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineResponseK.java index 64a4742d7..e8363d672 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineResponseK.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/KlineResponseK.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -34,10 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** KlineResponseK */ +/** Kline payload */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class KlineResponseK extends BaseDTO { public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; @@ -149,7 +149,7 @@ public KlineResponseK tLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { } /** - * Get tLowerCase + * Kline start time * * @return tLowerCase */ @@ -168,7 +168,7 @@ public KlineResponseK T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Kline close time * * @return T */ @@ -187,7 +187,7 @@ public KlineResponseK sLowerCase(@jakarta.annotation.Nullable String sLowerCase) } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -206,7 +206,7 @@ public KlineResponseK iLowerCase(@jakarta.annotation.Nullable String iLowerCase) } /** - * Get iLowerCase + * Interval * * @return iLowerCase */ @@ -225,7 +225,7 @@ public KlineResponseK fLowerCase(@jakarta.annotation.Nullable Long fLowerCase) { } /** - * Get fLowerCase + * First trade ID * * @return fLowerCase */ @@ -244,7 +244,7 @@ public KlineResponseK L(@jakarta.annotation.Nullable Long L) { } /** - * Get L + * Last trade ID * * @return L */ @@ -263,7 +263,7 @@ public KlineResponseK oLowerCase(@jakarta.annotation.Nullable String oLowerCase) } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -282,7 +282,7 @@ public KlineResponseK cLowerCase(@jakarta.annotation.Nullable String cLowerCase) } /** - * Get cLowerCase + * Close price * * @return cLowerCase */ @@ -301,7 +301,7 @@ public KlineResponseK hLowerCase(@jakarta.annotation.Nullable String hLowerCase) } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -320,7 +320,7 @@ public KlineResponseK lLowerCase(@jakarta.annotation.Nullable String lLowerCase) } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -339,7 +339,7 @@ public KlineResponseK vLowerCase(@jakarta.annotation.Nullable String vLowerCase) } /** - * Get vLowerCase + * Base asset volume * * @return vLowerCase */ @@ -358,7 +358,7 @@ public KlineResponseK nLowerCase(@jakarta.annotation.Nullable Long nLowerCase) { } /** - * Get nLowerCase + * Number of trades * * @return nLowerCase */ @@ -377,7 +377,7 @@ public KlineResponseK xLowerCase(@jakarta.annotation.Nullable Boolean xLowerCase } /** - * Get xLowerCase + * Is this kline closed? * * @return xLowerCase */ @@ -396,7 +396,7 @@ public KlineResponseK qLowerCase(@jakarta.annotation.Nullable String qLowerCase) } /** - * Get qLowerCase + * Quote asset volume * * @return qLowerCase */ @@ -415,7 +415,7 @@ public KlineResponseK V(@jakarta.annotation.Nullable String V) { } /** - * Get V + * Taker buy base asset volume * * @return V */ @@ -434,7 +434,7 @@ public KlineResponseK Q(@jakarta.annotation.Nullable String Q) { } /** - * Get Q + * Taker buy quote asset volume * * @return Q */ @@ -453,7 +453,7 @@ public KlineResponseK B(@jakarta.annotation.Nullable String B) { } /** - * Get B + * Ignore * * @return B */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/Levels.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/Levels.java index d3ca0a15e..ba101e66a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/Levels.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/Levels.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ListStatus.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ListStatus.java new file mode 100644 index 000000000..12b7ff01c --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ListStatus.java @@ -0,0 +1,645 @@ +/* + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ListStatus */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ListStatus extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_G_LOWER_CASE = "g"; + + @SerializedName(SERIALIZED_NAME_G_LOWER_CASE) + @jakarta.annotation.Nullable + private Long gLowerCase; + + public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; + + @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) + @jakarta.annotation.Nullable + private String cLowerCase; + + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; + + @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) + @jakarta.annotation.Nullable + private String lLowerCase; + + public static final String SERIALIZED_NAME_L = "L"; + + @SerializedName(SERIALIZED_NAME_L) + @jakarta.annotation.Nullable + private String L; + + public static final String SERIALIZED_NAME_R_LOWER_CASE = "r"; + + @SerializedName(SERIALIZED_NAME_R_LOWER_CASE) + @jakarta.annotation.Nullable + private String rLowerCase; + + public static final String SERIALIZED_NAME_C = "C"; + + @SerializedName(SERIALIZED_NAME_C) + @jakarta.annotation.Nullable + private String C; + + public static final String SERIALIZED_NAME_T = "T"; + + @SerializedName(SERIALIZED_NAME_T) + @jakarta.annotation.Nullable + private Long T; + + public static final String SERIALIZED_NAME_O = "O"; + + @SerializedName(SERIALIZED_NAME_O) + @jakarta.annotation.Nullable + private List<@Valid ListStatusOInner> O; + + public ListStatus() {} + + public ListStatus E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public ListStatus sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * Symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public ListStatus gLowerCase(@jakarta.annotation.Nullable Long gLowerCase) { + this.gLowerCase = gLowerCase; + return this; + } + + /** + * OrderListId + * + * @return gLowerCase + */ + @jakarta.annotation.Nullable + public Long getgLowerCase() { + return gLowerCase; + } + + public void setgLowerCase(@jakarta.annotation.Nullable Long gLowerCase) { + this.gLowerCase = gLowerCase; + } + + public ListStatus cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + return this; + } + + /** + * Contingency Type + * + * @return cLowerCase + */ + @jakarta.annotation.Nullable + public String getcLowerCase() { + return cLowerCase; + } + + public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + } + + public ListStatus lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + return this; + } + + /** + * List Status Type + * + * @return lLowerCase + */ + @jakarta.annotation.Nullable + public String getlLowerCase() { + return lLowerCase; + } + + public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + } + + public ListStatus L(@jakarta.annotation.Nullable String L) { + this.L = L; + return this; + } + + /** + * List Order Status + * + * @return L + */ + @jakarta.annotation.Nullable + public String getL() { + return L; + } + + public void setL(@jakarta.annotation.Nullable String L) { + this.L = L; + } + + public ListStatus rLowerCase(@jakarta.annotation.Nullable String rLowerCase) { + this.rLowerCase = rLowerCase; + return this; + } + + /** + * List Reject Reason + * + * @return rLowerCase + */ + @jakarta.annotation.Nullable + public String getrLowerCase() { + return rLowerCase; + } + + public void setrLowerCase(@jakarta.annotation.Nullable String rLowerCase) { + this.rLowerCase = rLowerCase; + } + + public ListStatus C(@jakarta.annotation.Nullable String C) { + this.C = C; + return this; + } + + /** + * List Client Order ID + * + * @return C + */ + @jakarta.annotation.Nullable + public String getC() { + return C; + } + + public void setC(@jakarta.annotation.Nullable String C) { + this.C = C; + } + + public ListStatus T(@jakarta.annotation.Nullable Long T) { + this.T = T; + return this; + } + + /** + * Transaction Time + * + * @return T + */ + @jakarta.annotation.Nullable + public Long getT() { + return T; + } + + public void setT(@jakarta.annotation.Nullable Long T) { + this.T = T; + } + + public ListStatus O(@jakarta.annotation.Nullable List<@Valid ListStatusOInner> O) { + this.O = O; + return this; + } + + public ListStatus addOItem(ListStatusOInner OItem) { + if (this.O == null) { + this.O = new ArrayList<>(); + } + this.O.add(OItem); + return this; + } + + /** + * An array of objects + * + * @return O + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid ListStatusOInner> getO() { + return O; + } + + public void setO(@jakarta.annotation.Nullable List<@Valid ListStatusOInner> O) { + this.O = O; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListStatus listStatus = (ListStatus) o; + return Objects.equals(this.E, listStatus.E) + && Objects.equals(this.sLowerCase, listStatus.sLowerCase) + && Objects.equals(this.gLowerCase, listStatus.gLowerCase) + && Objects.equals(this.cLowerCase, listStatus.cLowerCase) + && Objects.equals(this.lLowerCase, listStatus.lLowerCase) + && Objects.equals(this.L, listStatus.L) + && Objects.equals(this.rLowerCase, listStatus.rLowerCase) + && Objects.equals(this.C, listStatus.C) + && Objects.equals(this.T, listStatus.T) + && Objects.equals(this.O, listStatus.O); + } + + @Override + public int hashCode() { + return Objects.hash( + E, sLowerCase, gLowerCase, cLowerCase, lLowerCase, L, rLowerCase, C, T, O); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListStatus {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" gLowerCase: ").append(toIndentedString(gLowerCase)).append("\n"); + sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append(" L: ").append(toIndentedString(L)).append("\n"); + sb.append(" rLowerCase: ").append(toIndentedString(rLowerCase)).append("\n"); + sb.append(" C: ").append(toIndentedString(C)).append("\n"); + sb.append(" T: ").append(toIndentedString(T)).append("\n"); + sb.append(" O: ").append(toIndentedString(O)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + Long gLowerCaseValue = getgLowerCase(); + if (gLowerCaseValue != null) { + String gLowerCaseValueAsString = gLowerCaseValue.toString(); + valMap.put("gLowerCase", gLowerCaseValueAsString); + } + String cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + String cLowerCaseValueAsString = cLowerCaseValue.toString(); + valMap.put("cLowerCase", cLowerCaseValueAsString); + } + String lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + String LValue = getL(); + if (LValue != null) { + String LValueAsString = LValue.toString(); + valMap.put("L", LValueAsString); + } + String rLowerCaseValue = getrLowerCase(); + if (rLowerCaseValue != null) { + String rLowerCaseValueAsString = rLowerCaseValue.toString(); + valMap.put("rLowerCase", rLowerCaseValueAsString); + } + String CValue = getC(); + if (CValue != null) { + String CValueAsString = CValue.toString(); + valMap.put("C", CValueAsString); + } + Long TValue = getT(); + if (TValue != null) { + String TValueAsString = TValue.toString(); + valMap.put("T", TValueAsString); + } + List<@Valid ListStatusOInner> OValue = getO(); + if (OValue != null) { + String OValueAsString = JSON.getGson().toJson(OValue); + valMap.put("O", OValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object gLowerCaseValue = getgLowerCase(); + if (gLowerCaseValue != null) { + valMap.put("gLowerCase", gLowerCaseValue); + } + Object cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + valMap.put("cLowerCase", cLowerCaseValue); + } + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); + } + Object LValue = getL(); + if (LValue != null) { + valMap.put("L", LValue); + } + Object rLowerCaseValue = getrLowerCase(); + if (rLowerCaseValue != null) { + valMap.put("rLowerCase", rLowerCaseValue); + } + Object CValue = getC(); + if (CValue != null) { + valMap.put("C", CValue); + } + Object TValue = getT(); + if (TValue != null) { + valMap.put("T", TValue); + } + Object OValue = getO(); + if (OValue != null) { + valMap.put("O", OValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("s"); + openapiFields.add("g"); + openapiFields.add("c"); + openapiFields.add("l"); + openapiFields.add("L"); + openapiFields.add("r"); + openapiFields.add("C"); + openapiFields.add("T"); + openapiFields.add("O"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ListStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ListStatus.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ListStatus is not found in the empty" + + " JSON string", + ListStatus.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ListStatus.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ListStatus` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) + && !jsonObj.get("c").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `c` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("c").toString())); + } + if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) + && !jsonObj.get("l").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `l` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("l").toString())); + } + if ((jsonObj.get("L") != null && !jsonObj.get("L").isJsonNull()) + && !jsonObj.get("L").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `L` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("L").toString())); + } + if ((jsonObj.get("r") != null && !jsonObj.get("r").isJsonNull()) + && !jsonObj.get("r").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `r` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("r").toString())); + } + if ((jsonObj.get("C") != null && !jsonObj.get("C").isJsonNull()) + && !jsonObj.get("C").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `C` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("C").toString())); + } + if (jsonObj.get("O") != null && !jsonObj.get("O").isJsonNull()) { + JsonArray jsonArrayO = jsonObj.getAsJsonArray("O"); + if (jsonArrayO != null) { + // ensure the json data is an array + if (!jsonObj.get("O").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `O` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("O").toString())); + } + + // validate the optional field `O` (array) + for (int i = 0; i < jsonArrayO.size(); i++) { + ListStatusOInner.validateJsonElement(jsonArrayO.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ListStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ListStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ListStatus.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ListStatus value) throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ListStatus read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ListStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of ListStatus + * @throws IOException if the JSON string is invalid with respect to ListStatus + */ + public static ListStatus fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ListStatus.class); + } + + /** + * Convert an instance of ListStatus to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ListStatusOInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ListStatusOInner.java new file mode 100644 index 000000000..1af15718d --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ListStatusOInner.java @@ -0,0 +1,322 @@ +/* + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ListStatusOInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ListStatusOInner extends BaseDTO { + public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; + + @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) + @jakarta.annotation.Nullable + private String sLowerCase; + + public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; + + @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) + @jakarta.annotation.Nullable + private Long iLowerCase; + + public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; + + @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) + @jakarta.annotation.Nullable + private String cLowerCase; + + public ListStatusOInner() {} + + public ListStatusOInner sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + return this; + } + + /** + * Symbol + * + * @return sLowerCase + */ + @jakarta.annotation.Nullable + public String getsLowerCase() { + return sLowerCase; + } + + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; + } + + public ListStatusOInner iLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { + this.iLowerCase = iLowerCase; + return this; + } + + /** + * OrderId + * + * @return iLowerCase + */ + @jakarta.annotation.Nullable + public Long getiLowerCase() { + return iLowerCase; + } + + public void setiLowerCase(@jakarta.annotation.Nullable Long iLowerCase) { + this.iLowerCase = iLowerCase; + } + + public ListStatusOInner cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + return this; + } + + /** + * ClientOrderId + * + * @return cLowerCase + */ + @jakarta.annotation.Nullable + public String getcLowerCase() { + return cLowerCase; + } + + public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListStatusOInner listStatusOInner = (ListStatusOInner) o; + return Objects.equals(this.sLowerCase, listStatusOInner.sLowerCase) + && Objects.equals(this.iLowerCase, listStatusOInner.iLowerCase) + && Objects.equals(this.cLowerCase, listStatusOInner.cLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash(sLowerCase, iLowerCase, cLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListStatusOInner {\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); + sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + Long iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + String iLowerCaseValueAsString = iLowerCaseValue.toString(); + valMap.put("iLowerCase", iLowerCaseValueAsString); + } + String cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + String cLowerCaseValueAsString = cLowerCaseValue.toString(); + valMap.put("cLowerCase", cLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); + } + Object iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + valMap.put("iLowerCase", iLowerCaseValue); + } + Object cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + valMap.put("cLowerCase", cLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("s"); + openapiFields.add("i"); + openapiFields.add("c"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ListStatusOInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ListStatusOInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ListStatusOInner is not found in the" + + " empty JSON string", + ListStatusOInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ListStatusOInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ListStatusOInner` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull()) + && !jsonObj.get("s").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `s` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("s").toString())); + } + if ((jsonObj.get("c") != null && !jsonObj.get("c").isJsonNull()) + && !jsonObj.get("c").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `c` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("c").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ListStatusOInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ListStatusOInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ListStatusOInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ListStatusOInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ListStatusOInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ListStatusOInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ListStatusOInner + * @throws IOException if the JSON string is invalid with respect to ListStatusOInner + */ + public static ListStatusOInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ListStatusOInner.class); + } + + /** + * Convert an instance of ListStatusOInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/LotSizeFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/LotSizeFilter.java deleted file mode 100644 index 44a461237..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/LotSizeFilter.java +++ /dev/null @@ -1,411 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** LotSizeFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class LotSizeFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_QTY_EXPONENT = "qtyExponent"; - - @SerializedName(SERIALIZED_NAME_QTY_EXPONENT) - @jakarta.annotation.Nullable - private Integer qtyExponent; - - public static final String SERIALIZED_NAME_MIN_QTY = "minQty"; - - @SerializedName(SERIALIZED_NAME_MIN_QTY) - @jakarta.annotation.Nullable - private String minQty; - - public static final String SERIALIZED_NAME_MAX_QTY = "maxQty"; - - @SerializedName(SERIALIZED_NAME_MAX_QTY) - @jakarta.annotation.Nullable - private String maxQty; - - public static final String SERIALIZED_NAME_STEP_SIZE = "stepSize"; - - @SerializedName(SERIALIZED_NAME_STEP_SIZE) - @jakarta.annotation.Nullable - private String stepSize; - - public LotSizeFilter() {} - - public LotSizeFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public LotSizeFilter qtyExponent(@jakarta.annotation.Nullable Integer qtyExponent) { - this.qtyExponent = qtyExponent; - return this; - } - - /** - * Get qtyExponent - * - * @return qtyExponent - */ - @jakarta.annotation.Nullable - public Integer getQtyExponent() { - return qtyExponent; - } - - public void setQtyExponent(@jakarta.annotation.Nullable Integer qtyExponent) { - this.qtyExponent = qtyExponent; - } - - public LotSizeFilter minQty(@jakarta.annotation.Nullable String minQty) { - this.minQty = minQty; - return this; - } - - /** - * Get minQty - * - * @return minQty - */ - @jakarta.annotation.Nullable - public String getMinQty() { - return minQty; - } - - public void setMinQty(@jakarta.annotation.Nullable String minQty) { - this.minQty = minQty; - } - - public LotSizeFilter maxQty(@jakarta.annotation.Nullable String maxQty) { - this.maxQty = maxQty; - return this; - } - - /** - * Get maxQty - * - * @return maxQty - */ - @jakarta.annotation.Nullable - public String getMaxQty() { - return maxQty; - } - - public void setMaxQty(@jakarta.annotation.Nullable String maxQty) { - this.maxQty = maxQty; - } - - public LotSizeFilter stepSize(@jakarta.annotation.Nullable String stepSize) { - this.stepSize = stepSize; - return this; - } - - /** - * Get stepSize - * - * @return stepSize - */ - @jakarta.annotation.Nullable - public String getStepSize() { - return stepSize; - } - - public void setStepSize(@jakarta.annotation.Nullable String stepSize) { - this.stepSize = stepSize; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LotSizeFilter lotSizeFilter = (LotSizeFilter) o; - return Objects.equals(this.filterType, lotSizeFilter.filterType) - && Objects.equals(this.qtyExponent, lotSizeFilter.qtyExponent) - && Objects.equals(this.minQty, lotSizeFilter.minQty) - && Objects.equals(this.maxQty, lotSizeFilter.maxQty) - && Objects.equals(this.stepSize, lotSizeFilter.stepSize); - } - - @Override - public int hashCode() { - return Objects.hash(filterType, qtyExponent, minQty, maxQty, stepSize); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LotSizeFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" qtyExponent: ").append(toIndentedString(qtyExponent)).append("\n"); - sb.append(" minQty: ").append(toIndentedString(minQty)).append("\n"); - sb.append(" maxQty: ").append(toIndentedString(maxQty)).append("\n"); - sb.append(" stepSize: ").append(toIndentedString(stepSize)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Integer qtyExponentValue = getQtyExponent(); - if (qtyExponentValue != null) { - String qtyExponentValueAsString = qtyExponentValue.toString(); - valMap.put("qtyExponent", qtyExponentValueAsString); - } - String minQtyValue = getMinQty(); - if (minQtyValue != null) { - String minQtyValueAsString = minQtyValue.toString(); - valMap.put("minQty", minQtyValueAsString); - } - String maxQtyValue = getMaxQty(); - if (maxQtyValue != null) { - String maxQtyValueAsString = maxQtyValue.toString(); - valMap.put("maxQty", maxQtyValueAsString); - } - String stepSizeValue = getStepSize(); - if (stepSizeValue != null) { - String stepSizeValueAsString = stepSizeValue.toString(); - valMap.put("stepSize", stepSizeValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object qtyExponentValue = getQtyExponent(); - if (qtyExponentValue != null) { - valMap.put("qtyExponent", qtyExponentValue); - } - Object minQtyValue = getMinQty(); - if (minQtyValue != null) { - valMap.put("minQty", minQtyValue); - } - Object maxQtyValue = getMaxQty(); - if (maxQtyValue != null) { - valMap.put("maxQty", maxQtyValue); - } - Object stepSizeValue = getStepSize(); - if (stepSizeValue != null) { - valMap.put("stepSize", stepSizeValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("qtyExponent"); - openapiFields.add("minQty"); - openapiFields.add("maxQty"); - openapiFields.add("stepSize"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LotSizeFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LotSizeFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LotSizeFilter is not found in the" - + " empty JSON string", - LotSizeFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!LotSizeFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LotSizeFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - if ((jsonObj.get("minQty") != null && !jsonObj.get("minQty").isJsonNull()) - && !jsonObj.get("minQty").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `minQty` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("minQty").toString())); - } - if ((jsonObj.get("maxQty") != null && !jsonObj.get("maxQty").isJsonNull()) - && !jsonObj.get("maxQty").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `maxQty` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("maxQty").toString())); - } - if ((jsonObj.get("stepSize") != null && !jsonObj.get("stepSize").isJsonNull()) - && !jsonObj.get("stepSize").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `stepSize` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("stepSize").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LotSizeFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LotSizeFilter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LotSizeFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LotSizeFilter value) throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LotSizeFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LotSizeFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of LotSizeFilter - * @throws IOException if the JSON string is invalid with respect to LotSizeFilter - */ - public static LotSizeFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LotSizeFilter.class); - } - - /** - * Convert an instance of LotSizeFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MarketLotSizeFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MarketLotSizeFilter.java deleted file mode 100644 index 6fa43c81d..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MarketLotSizeFilter.java +++ /dev/null @@ -1,412 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** MarketLotSizeFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MarketLotSizeFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_QTY_EXPONENT = "qtyExponent"; - - @SerializedName(SERIALIZED_NAME_QTY_EXPONENT) - @jakarta.annotation.Nullable - private Integer qtyExponent; - - public static final String SERIALIZED_NAME_MIN_QTY = "minQty"; - - @SerializedName(SERIALIZED_NAME_MIN_QTY) - @jakarta.annotation.Nullable - private String minQty; - - public static final String SERIALIZED_NAME_MAX_QTY = "maxQty"; - - @SerializedName(SERIALIZED_NAME_MAX_QTY) - @jakarta.annotation.Nullable - private String maxQty; - - public static final String SERIALIZED_NAME_STEP_SIZE = "stepSize"; - - @SerializedName(SERIALIZED_NAME_STEP_SIZE) - @jakarta.annotation.Nullable - private String stepSize; - - public MarketLotSizeFilter() {} - - public MarketLotSizeFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public MarketLotSizeFilter qtyExponent(@jakarta.annotation.Nullable Integer qtyExponent) { - this.qtyExponent = qtyExponent; - return this; - } - - /** - * Get qtyExponent - * - * @return qtyExponent - */ - @jakarta.annotation.Nullable - public Integer getQtyExponent() { - return qtyExponent; - } - - public void setQtyExponent(@jakarta.annotation.Nullable Integer qtyExponent) { - this.qtyExponent = qtyExponent; - } - - public MarketLotSizeFilter minQty(@jakarta.annotation.Nullable String minQty) { - this.minQty = minQty; - return this; - } - - /** - * Get minQty - * - * @return minQty - */ - @jakarta.annotation.Nullable - public String getMinQty() { - return minQty; - } - - public void setMinQty(@jakarta.annotation.Nullable String minQty) { - this.minQty = minQty; - } - - public MarketLotSizeFilter maxQty(@jakarta.annotation.Nullable String maxQty) { - this.maxQty = maxQty; - return this; - } - - /** - * Get maxQty - * - * @return maxQty - */ - @jakarta.annotation.Nullable - public String getMaxQty() { - return maxQty; - } - - public void setMaxQty(@jakarta.annotation.Nullable String maxQty) { - this.maxQty = maxQty; - } - - public MarketLotSizeFilter stepSize(@jakarta.annotation.Nullable String stepSize) { - this.stepSize = stepSize; - return this; - } - - /** - * Get stepSize - * - * @return stepSize - */ - @jakarta.annotation.Nullable - public String getStepSize() { - return stepSize; - } - - public void setStepSize(@jakarta.annotation.Nullable String stepSize) { - this.stepSize = stepSize; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarketLotSizeFilter marketLotSizeFilter = (MarketLotSizeFilter) o; - return Objects.equals(this.filterType, marketLotSizeFilter.filterType) - && Objects.equals(this.qtyExponent, marketLotSizeFilter.qtyExponent) - && Objects.equals(this.minQty, marketLotSizeFilter.minQty) - && Objects.equals(this.maxQty, marketLotSizeFilter.maxQty) - && Objects.equals(this.stepSize, marketLotSizeFilter.stepSize); - } - - @Override - public int hashCode() { - return Objects.hash(filterType, qtyExponent, minQty, maxQty, stepSize); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MarketLotSizeFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" qtyExponent: ").append(toIndentedString(qtyExponent)).append("\n"); - sb.append(" minQty: ").append(toIndentedString(minQty)).append("\n"); - sb.append(" maxQty: ").append(toIndentedString(maxQty)).append("\n"); - sb.append(" stepSize: ").append(toIndentedString(stepSize)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Integer qtyExponentValue = getQtyExponent(); - if (qtyExponentValue != null) { - String qtyExponentValueAsString = qtyExponentValue.toString(); - valMap.put("qtyExponent", qtyExponentValueAsString); - } - String minQtyValue = getMinQty(); - if (minQtyValue != null) { - String minQtyValueAsString = minQtyValue.toString(); - valMap.put("minQty", minQtyValueAsString); - } - String maxQtyValue = getMaxQty(); - if (maxQtyValue != null) { - String maxQtyValueAsString = maxQtyValue.toString(); - valMap.put("maxQty", maxQtyValueAsString); - } - String stepSizeValue = getStepSize(); - if (stepSizeValue != null) { - String stepSizeValueAsString = stepSizeValue.toString(); - valMap.put("stepSize", stepSizeValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object qtyExponentValue = getQtyExponent(); - if (qtyExponentValue != null) { - valMap.put("qtyExponent", qtyExponentValue); - } - Object minQtyValue = getMinQty(); - if (minQtyValue != null) { - valMap.put("minQty", minQtyValue); - } - Object maxQtyValue = getMaxQty(); - if (maxQtyValue != null) { - valMap.put("maxQty", maxQtyValue); - } - Object stepSizeValue = getStepSize(); - if (stepSizeValue != null) { - valMap.put("stepSize", stepSizeValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("qtyExponent"); - openapiFields.add("minQty"); - openapiFields.add("maxQty"); - openapiFields.add("stepSize"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MarketLotSizeFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MarketLotSizeFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MarketLotSizeFilter is not found in" - + " the empty JSON string", - MarketLotSizeFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MarketLotSizeFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MarketLotSizeFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - if ((jsonObj.get("minQty") != null && !jsonObj.get("minQty").isJsonNull()) - && !jsonObj.get("minQty").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `minQty` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("minQty").toString())); - } - if ((jsonObj.get("maxQty") != null && !jsonObj.get("maxQty").isJsonNull()) - && !jsonObj.get("maxQty").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `maxQty` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("maxQty").toString())); - } - if ((jsonObj.get("stepSize") != null && !jsonObj.get("stepSize").isJsonNull()) - && !jsonObj.get("stepSize").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `stepSize` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("stepSize").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MarketLotSizeFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MarketLotSizeFilter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MarketLotSizeFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MarketLotSizeFilter value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MarketLotSizeFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MarketLotSizeFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of MarketLotSizeFilter - * @throws IOException if the JSON string is invalid with respect to MarketLotSizeFilter - */ - public static MarketLotSizeFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MarketLotSizeFilter.class); - } - - /** - * Convert an instance of MarketLotSizeFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxAssetFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxAssetFilter.java deleted file mode 100644 index 384808679..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxAssetFilter.java +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** MaxAssetFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MaxAssetFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_QTY_EXPONENT = "qtyExponent"; - - @SerializedName(SERIALIZED_NAME_QTY_EXPONENT) - @jakarta.annotation.Nullable - private Integer qtyExponent; - - public static final String SERIALIZED_NAME_LIMIT = "limit"; - - @SerializedName(SERIALIZED_NAME_LIMIT) - @jakarta.annotation.Nullable - private String limit; - - public static final String SERIALIZED_NAME_ASSET = "asset"; - - @SerializedName(SERIALIZED_NAME_ASSET) - @jakarta.annotation.Nullable - private String asset; - - public MaxAssetFilter() {} - - public MaxAssetFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public MaxAssetFilter qtyExponent(@jakarta.annotation.Nullable Integer qtyExponent) { - this.qtyExponent = qtyExponent; - return this; - } - - /** - * Get qtyExponent - * - * @return qtyExponent - */ - @jakarta.annotation.Nullable - public Integer getQtyExponent() { - return qtyExponent; - } - - public void setQtyExponent(@jakarta.annotation.Nullable Integer qtyExponent) { - this.qtyExponent = qtyExponent; - } - - public MaxAssetFilter limit(@jakarta.annotation.Nullable String limit) { - this.limit = limit; - return this; - } - - /** - * Get limit - * - * @return limit - */ - @jakarta.annotation.Nullable - public String getLimit() { - return limit; - } - - public void setLimit(@jakarta.annotation.Nullable String limit) { - this.limit = limit; - } - - public MaxAssetFilter asset(@jakarta.annotation.Nullable String asset) { - this.asset = asset; - return this; - } - - /** - * Get asset - * - * @return asset - */ - @jakarta.annotation.Nullable - public String getAsset() { - return asset; - } - - public void setAsset(@jakarta.annotation.Nullable String asset) { - this.asset = asset; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MaxAssetFilter maxAssetFilter = (MaxAssetFilter) o; - return Objects.equals(this.filterType, maxAssetFilter.filterType) - && Objects.equals(this.qtyExponent, maxAssetFilter.qtyExponent) - && Objects.equals(this.limit, maxAssetFilter.limit) - && Objects.equals(this.asset, maxAssetFilter.asset); - } - - @Override - public int hashCode() { - return Objects.hash(filterType, qtyExponent, limit, asset); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MaxAssetFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" qtyExponent: ").append(toIndentedString(qtyExponent)).append("\n"); - sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); - sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Integer qtyExponentValue = getQtyExponent(); - if (qtyExponentValue != null) { - String qtyExponentValueAsString = qtyExponentValue.toString(); - valMap.put("qtyExponent", qtyExponentValueAsString); - } - String limitValue = getLimit(); - if (limitValue != null) { - String limitValueAsString = limitValue.toString(); - valMap.put("limit", limitValueAsString); - } - String assetValue = getAsset(); - if (assetValue != null) { - String assetValueAsString = assetValue.toString(); - valMap.put("asset", assetValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object qtyExponentValue = getQtyExponent(); - if (qtyExponentValue != null) { - valMap.put("qtyExponent", qtyExponentValue); - } - Object limitValue = getLimit(); - if (limitValue != null) { - valMap.put("limit", limitValue); - } - Object assetValue = getAsset(); - if (assetValue != null) { - valMap.put("asset", assetValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("qtyExponent"); - openapiFields.add("limit"); - openapiFields.add("asset"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MaxAssetFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MaxAssetFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MaxAssetFilter is not found in the" - + " empty JSON string", - MaxAssetFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MaxAssetFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MaxAssetFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - if ((jsonObj.get("limit") != null && !jsonObj.get("limit").isJsonNull()) - && !jsonObj.get("limit").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `limit` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("limit").toString())); - } - if ((jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) - && !jsonObj.get("asset").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `asset` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("asset").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MaxAssetFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MaxAssetFilter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MaxAssetFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MaxAssetFilter value) throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MaxAssetFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MaxAssetFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of MaxAssetFilter - * @throws IOException if the JSON string is invalid with respect to MaxAssetFilter - */ - public static MaxAssetFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MaxAssetFilter.class); - } - - /** - * Convert an instance of MaxAssetFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxNumAlgoOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxNumAlgoOrdersFilter.java deleted file mode 100644 index b06c44362..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxNumAlgoOrdersFilter.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** MaxNumAlgoOrdersFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MaxNumAlgoOrdersFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_MAX_NUM_ALGO_ORDERS = "maxNumAlgoOrders"; - - @SerializedName(SERIALIZED_NAME_MAX_NUM_ALGO_ORDERS) - @jakarta.annotation.Nullable - private Long maxNumAlgoOrders; - - public MaxNumAlgoOrdersFilter() {} - - public MaxNumAlgoOrdersFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public MaxNumAlgoOrdersFilter maxNumAlgoOrders( - @jakarta.annotation.Nullable Long maxNumAlgoOrders) { - this.maxNumAlgoOrders = maxNumAlgoOrders; - return this; - } - - /** - * Get maxNumAlgoOrders - * - * @return maxNumAlgoOrders - */ - @jakarta.annotation.Nullable - public Long getMaxNumAlgoOrders() { - return maxNumAlgoOrders; - } - - public void setMaxNumAlgoOrders(@jakarta.annotation.Nullable Long maxNumAlgoOrders) { - this.maxNumAlgoOrders = maxNumAlgoOrders; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MaxNumAlgoOrdersFilter maxNumAlgoOrdersFilter = (MaxNumAlgoOrdersFilter) o; - return Objects.equals(this.filterType, maxNumAlgoOrdersFilter.filterType) - && Objects.equals(this.maxNumAlgoOrders, maxNumAlgoOrdersFilter.maxNumAlgoOrders); - } - - @Override - public int hashCode() { - return Objects.hash(filterType, maxNumAlgoOrders); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MaxNumAlgoOrdersFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" maxNumAlgoOrders: ").append(toIndentedString(maxNumAlgoOrders)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Long maxNumAlgoOrdersValue = getMaxNumAlgoOrders(); - if (maxNumAlgoOrdersValue != null) { - String maxNumAlgoOrdersValueAsString = maxNumAlgoOrdersValue.toString(); - valMap.put("maxNumAlgoOrders", maxNumAlgoOrdersValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object maxNumAlgoOrdersValue = getMaxNumAlgoOrders(); - if (maxNumAlgoOrdersValue != null) { - valMap.put("maxNumAlgoOrders", maxNumAlgoOrdersValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("maxNumAlgoOrders"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MaxNumAlgoOrdersFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MaxNumAlgoOrdersFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MaxNumAlgoOrdersFilter is not found in" - + " the empty JSON string", - MaxNumAlgoOrdersFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MaxNumAlgoOrdersFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MaxNumAlgoOrdersFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MaxNumAlgoOrdersFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MaxNumAlgoOrdersFilter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MaxNumAlgoOrdersFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MaxNumAlgoOrdersFilter value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MaxNumAlgoOrdersFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MaxNumAlgoOrdersFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of MaxNumAlgoOrdersFilter - * @throws IOException if the JSON string is invalid with respect to MaxNumAlgoOrdersFilter - */ - public static MaxNumAlgoOrdersFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MaxNumAlgoOrdersFilter.class); - } - - /** - * Convert an instance of MaxNumAlgoOrdersFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxNumIcebergOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxNumIcebergOrdersFilter.java deleted file mode 100644 index 433fde5e6..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxNumIcebergOrdersFilter.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** MaxNumIcebergOrdersFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MaxNumIcebergOrdersFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_MAX_NUM_ICEBERG_ORDERS = "maxNumIcebergOrders"; - - @SerializedName(SERIALIZED_NAME_MAX_NUM_ICEBERG_ORDERS) - @jakarta.annotation.Nullable - private Long maxNumIcebergOrders; - - public MaxNumIcebergOrdersFilter() {} - - public MaxNumIcebergOrdersFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public MaxNumIcebergOrdersFilter maxNumIcebergOrders( - @jakarta.annotation.Nullable Long maxNumIcebergOrders) { - this.maxNumIcebergOrders = maxNumIcebergOrders; - return this; - } - - /** - * Get maxNumIcebergOrders - * - * @return maxNumIcebergOrders - */ - @jakarta.annotation.Nullable - public Long getMaxNumIcebergOrders() { - return maxNumIcebergOrders; - } - - public void setMaxNumIcebergOrders(@jakarta.annotation.Nullable Long maxNumIcebergOrders) { - this.maxNumIcebergOrders = maxNumIcebergOrders; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MaxNumIcebergOrdersFilter maxNumIcebergOrdersFilter = (MaxNumIcebergOrdersFilter) o; - return Objects.equals(this.filterType, maxNumIcebergOrdersFilter.filterType) - && Objects.equals( - this.maxNumIcebergOrders, maxNumIcebergOrdersFilter.maxNumIcebergOrders); - } - - @Override - public int hashCode() { - return Objects.hash(filterType, maxNumIcebergOrders); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MaxNumIcebergOrdersFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" maxNumIcebergOrders: ") - .append(toIndentedString(maxNumIcebergOrders)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Long maxNumIcebergOrdersValue = getMaxNumIcebergOrders(); - if (maxNumIcebergOrdersValue != null) { - String maxNumIcebergOrdersValueAsString = maxNumIcebergOrdersValue.toString(); - valMap.put("maxNumIcebergOrders", maxNumIcebergOrdersValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object maxNumIcebergOrdersValue = getMaxNumIcebergOrders(); - if (maxNumIcebergOrdersValue != null) { - valMap.put("maxNumIcebergOrders", maxNumIcebergOrdersValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("maxNumIcebergOrders"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MaxNumIcebergOrdersFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MaxNumIcebergOrdersFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MaxNumIcebergOrdersFilter is not found" - + " in the empty JSON string", - MaxNumIcebergOrdersFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MaxNumIcebergOrdersFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MaxNumIcebergOrdersFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MaxNumIcebergOrdersFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MaxNumIcebergOrdersFilter' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MaxNumIcebergOrdersFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MaxNumIcebergOrdersFilter value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MaxNumIcebergOrdersFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MaxNumIcebergOrdersFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of MaxNumIcebergOrdersFilter - * @throws IOException if the JSON string is invalid with respect to MaxNumIcebergOrdersFilter - */ - public static MaxNumIcebergOrdersFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MaxNumIcebergOrdersFilter.class); - } - - /** - * Convert an instance of MaxNumIcebergOrdersFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxNumOrderAmendsFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxNumOrderAmendsFilter.java deleted file mode 100644 index 3eb6f08b1..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxNumOrderAmendsFilter.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** MaxNumOrderAmendsFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MaxNumOrderAmendsFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_MAX_NUM_ORDER_AMENDS = "maxNumOrderAmends"; - - @SerializedName(SERIALIZED_NAME_MAX_NUM_ORDER_AMENDS) - @jakarta.annotation.Nullable - private Long maxNumOrderAmends; - - public MaxNumOrderAmendsFilter() {} - - public MaxNumOrderAmendsFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public MaxNumOrderAmendsFilter maxNumOrderAmends( - @jakarta.annotation.Nullable Long maxNumOrderAmends) { - this.maxNumOrderAmends = maxNumOrderAmends; - return this; - } - - /** - * Get maxNumOrderAmends - * - * @return maxNumOrderAmends - */ - @jakarta.annotation.Nullable - public Long getMaxNumOrderAmends() { - return maxNumOrderAmends; - } - - public void setMaxNumOrderAmends(@jakarta.annotation.Nullable Long maxNumOrderAmends) { - this.maxNumOrderAmends = maxNumOrderAmends; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MaxNumOrderAmendsFilter maxNumOrderAmendsFilter = (MaxNumOrderAmendsFilter) o; - return Objects.equals(this.filterType, maxNumOrderAmendsFilter.filterType) - && Objects.equals( - this.maxNumOrderAmends, maxNumOrderAmendsFilter.maxNumOrderAmends); - } - - @Override - public int hashCode() { - return Objects.hash(filterType, maxNumOrderAmends); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MaxNumOrderAmendsFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" maxNumOrderAmends: ").append(toIndentedString(maxNumOrderAmends)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Long maxNumOrderAmendsValue = getMaxNumOrderAmends(); - if (maxNumOrderAmendsValue != null) { - String maxNumOrderAmendsValueAsString = maxNumOrderAmendsValue.toString(); - valMap.put("maxNumOrderAmends", maxNumOrderAmendsValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object maxNumOrderAmendsValue = getMaxNumOrderAmends(); - if (maxNumOrderAmendsValue != null) { - valMap.put("maxNumOrderAmends", maxNumOrderAmendsValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("maxNumOrderAmends"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MaxNumOrderAmendsFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MaxNumOrderAmendsFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MaxNumOrderAmendsFilter is not found" - + " in the empty JSON string", - MaxNumOrderAmendsFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MaxNumOrderAmendsFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MaxNumOrderAmendsFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MaxNumOrderAmendsFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MaxNumOrderAmendsFilter' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MaxNumOrderAmendsFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MaxNumOrderAmendsFilter value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MaxNumOrderAmendsFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MaxNumOrderAmendsFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of MaxNumOrderAmendsFilter - * @throws IOException if the JSON string is invalid with respect to MaxNumOrderAmendsFilter - */ - public static MaxNumOrderAmendsFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MaxNumOrderAmendsFilter.class); - } - - /** - * Convert an instance of MaxNumOrderAmendsFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxNumOrderListsFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxNumOrderListsFilter.java deleted file mode 100644 index 1dc19ee28..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxNumOrderListsFilter.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** MaxNumOrderListsFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MaxNumOrderListsFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_MAX_NUM_ORDER_LISTS = "maxNumOrderLists"; - - @SerializedName(SERIALIZED_NAME_MAX_NUM_ORDER_LISTS) - @jakarta.annotation.Nullable - private Long maxNumOrderLists; - - public MaxNumOrderListsFilter() {} - - public MaxNumOrderListsFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public MaxNumOrderListsFilter maxNumOrderLists( - @jakarta.annotation.Nullable Long maxNumOrderLists) { - this.maxNumOrderLists = maxNumOrderLists; - return this; - } - - /** - * Get maxNumOrderLists - * - * @return maxNumOrderLists - */ - @jakarta.annotation.Nullable - public Long getMaxNumOrderLists() { - return maxNumOrderLists; - } - - public void setMaxNumOrderLists(@jakarta.annotation.Nullable Long maxNumOrderLists) { - this.maxNumOrderLists = maxNumOrderLists; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MaxNumOrderListsFilter maxNumOrderListsFilter = (MaxNumOrderListsFilter) o; - return Objects.equals(this.filterType, maxNumOrderListsFilter.filterType) - && Objects.equals(this.maxNumOrderLists, maxNumOrderListsFilter.maxNumOrderLists); - } - - @Override - public int hashCode() { - return Objects.hash(filterType, maxNumOrderLists); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MaxNumOrderListsFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" maxNumOrderLists: ").append(toIndentedString(maxNumOrderLists)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Long maxNumOrderListsValue = getMaxNumOrderLists(); - if (maxNumOrderListsValue != null) { - String maxNumOrderListsValueAsString = maxNumOrderListsValue.toString(); - valMap.put("maxNumOrderLists", maxNumOrderListsValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object maxNumOrderListsValue = getMaxNumOrderLists(); - if (maxNumOrderListsValue != null) { - valMap.put("maxNumOrderLists", maxNumOrderListsValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("maxNumOrderLists"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MaxNumOrderListsFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MaxNumOrderListsFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MaxNumOrderListsFilter is not found in" - + " the empty JSON string", - MaxNumOrderListsFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MaxNumOrderListsFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MaxNumOrderListsFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MaxNumOrderListsFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MaxNumOrderListsFilter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MaxNumOrderListsFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MaxNumOrderListsFilter value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MaxNumOrderListsFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MaxNumOrderListsFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of MaxNumOrderListsFilter - * @throws IOException if the JSON string is invalid with respect to MaxNumOrderListsFilter - */ - public static MaxNumOrderListsFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MaxNumOrderListsFilter.class); - } - - /** - * Convert an instance of MaxNumOrderListsFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxNumOrdersFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxNumOrdersFilter.java deleted file mode 100644 index 68b182ee4..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxNumOrdersFilter.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** MaxNumOrdersFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MaxNumOrdersFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_MAX_NUM_ORDERS = "maxNumOrders"; - - @SerializedName(SERIALIZED_NAME_MAX_NUM_ORDERS) - @jakarta.annotation.Nullable - private Long maxNumOrders; - - public MaxNumOrdersFilter() {} - - public MaxNumOrdersFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public MaxNumOrdersFilter maxNumOrders(@jakarta.annotation.Nullable Long maxNumOrders) { - this.maxNumOrders = maxNumOrders; - return this; - } - - /** - * Get maxNumOrders - * - * @return maxNumOrders - */ - @jakarta.annotation.Nullable - public Long getMaxNumOrders() { - return maxNumOrders; - } - - public void setMaxNumOrders(@jakarta.annotation.Nullable Long maxNumOrders) { - this.maxNumOrders = maxNumOrders; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MaxNumOrdersFilter maxNumOrdersFilter = (MaxNumOrdersFilter) o; - return Objects.equals(this.filterType, maxNumOrdersFilter.filterType) - && Objects.equals(this.maxNumOrders, maxNumOrdersFilter.maxNumOrders); - } - - @Override - public int hashCode() { - return Objects.hash(filterType, maxNumOrders); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MaxNumOrdersFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" maxNumOrders: ").append(toIndentedString(maxNumOrders)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Long maxNumOrdersValue = getMaxNumOrders(); - if (maxNumOrdersValue != null) { - String maxNumOrdersValueAsString = maxNumOrdersValue.toString(); - valMap.put("maxNumOrders", maxNumOrdersValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object maxNumOrdersValue = getMaxNumOrders(); - if (maxNumOrdersValue != null) { - valMap.put("maxNumOrders", maxNumOrdersValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("maxNumOrders"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MaxNumOrdersFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MaxNumOrdersFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MaxNumOrdersFilter is not found in the" - + " empty JSON string", - MaxNumOrdersFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MaxNumOrdersFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MaxNumOrdersFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MaxNumOrdersFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MaxNumOrdersFilter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MaxNumOrdersFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MaxNumOrdersFilter value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MaxNumOrdersFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MaxNumOrdersFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of MaxNumOrdersFilter - * @throws IOException if the JSON string is invalid with respect to MaxNumOrdersFilter - */ - public static MaxNumOrdersFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MaxNumOrdersFilter.class); - } - - /** - * Convert an instance of MaxNumOrdersFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxPositionFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxPositionFilter.java deleted file mode 100644 index 49294bffc..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MaxPositionFilter.java +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** MaxPositionFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MaxPositionFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_QTY_EXPONENT = "qtyExponent"; - - @SerializedName(SERIALIZED_NAME_QTY_EXPONENT) - @jakarta.annotation.Nullable - private Integer qtyExponent; - - public static final String SERIALIZED_NAME_MAX_POSITION = "maxPosition"; - - @SerializedName(SERIALIZED_NAME_MAX_POSITION) - @jakarta.annotation.Nullable - private String maxPosition; - - public MaxPositionFilter() {} - - public MaxPositionFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public MaxPositionFilter qtyExponent(@jakarta.annotation.Nullable Integer qtyExponent) { - this.qtyExponent = qtyExponent; - return this; - } - - /** - * Get qtyExponent - * - * @return qtyExponent - */ - @jakarta.annotation.Nullable - public Integer getQtyExponent() { - return qtyExponent; - } - - public void setQtyExponent(@jakarta.annotation.Nullable Integer qtyExponent) { - this.qtyExponent = qtyExponent; - } - - public MaxPositionFilter maxPosition(@jakarta.annotation.Nullable String maxPosition) { - this.maxPosition = maxPosition; - return this; - } - - /** - * Get maxPosition - * - * @return maxPosition - */ - @jakarta.annotation.Nullable - public String getMaxPosition() { - return maxPosition; - } - - public void setMaxPosition(@jakarta.annotation.Nullable String maxPosition) { - this.maxPosition = maxPosition; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MaxPositionFilter maxPositionFilter = (MaxPositionFilter) o; - return Objects.equals(this.filterType, maxPositionFilter.filterType) - && Objects.equals(this.qtyExponent, maxPositionFilter.qtyExponent) - && Objects.equals(this.maxPosition, maxPositionFilter.maxPosition); - } - - @Override - public int hashCode() { - return Objects.hash(filterType, qtyExponent, maxPosition); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MaxPositionFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" qtyExponent: ").append(toIndentedString(qtyExponent)).append("\n"); - sb.append(" maxPosition: ").append(toIndentedString(maxPosition)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Integer qtyExponentValue = getQtyExponent(); - if (qtyExponentValue != null) { - String qtyExponentValueAsString = qtyExponentValue.toString(); - valMap.put("qtyExponent", qtyExponentValueAsString); - } - String maxPositionValue = getMaxPosition(); - if (maxPositionValue != null) { - String maxPositionValueAsString = maxPositionValue.toString(); - valMap.put("maxPosition", maxPositionValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object qtyExponentValue = getQtyExponent(); - if (qtyExponentValue != null) { - valMap.put("qtyExponent", qtyExponentValue); - } - Object maxPositionValue = getMaxPosition(); - if (maxPositionValue != null) { - valMap.put("maxPosition", maxPositionValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("qtyExponent"); - openapiFields.add("maxPosition"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MaxPositionFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MaxPositionFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MaxPositionFilter is not found in the" - + " empty JSON string", - MaxPositionFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MaxPositionFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MaxPositionFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - if ((jsonObj.get("maxPosition") != null && !jsonObj.get("maxPosition").isJsonNull()) - && !jsonObj.get("maxPosition").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `maxPosition` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("maxPosition").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MaxPositionFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MaxPositionFilter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MaxPositionFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MaxPositionFilter value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MaxPositionFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MaxPositionFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of MaxPositionFilter - * @throws IOException if the JSON string is invalid with respect to MaxPositionFilter - */ - public static MaxPositionFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MaxPositionFilter.class); - } - - /** - * Convert an instance of MaxPositionFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MinNotionalFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MinNotionalFilter.java deleted file mode 100644 index 8dc69c9b9..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MinNotionalFilter.java +++ /dev/null @@ -1,396 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** MinNotionalFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MinNotionalFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_PRICE_EXPONENT = "priceExponent"; - - @SerializedName(SERIALIZED_NAME_PRICE_EXPONENT) - @jakarta.annotation.Nullable - private Integer priceExponent; - - public static final String SERIALIZED_NAME_MIN_NOTIONAL = "minNotional"; - - @SerializedName(SERIALIZED_NAME_MIN_NOTIONAL) - @jakarta.annotation.Nullable - private String minNotional; - - public static final String SERIALIZED_NAME_APPLY_TO_MARKET = "applyToMarket"; - - @SerializedName(SERIALIZED_NAME_APPLY_TO_MARKET) - @jakarta.annotation.Nullable - private Boolean applyToMarket; - - public static final String SERIALIZED_NAME_AVG_PRICE_MINS = "avgPriceMins"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE_MINS) - @jakarta.annotation.Nullable - private Integer avgPriceMins; - - public MinNotionalFilter() {} - - public MinNotionalFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public MinNotionalFilter priceExponent(@jakarta.annotation.Nullable Integer priceExponent) { - this.priceExponent = priceExponent; - return this; - } - - /** - * Get priceExponent - * - * @return priceExponent - */ - @jakarta.annotation.Nullable - public Integer getPriceExponent() { - return priceExponent; - } - - public void setPriceExponent(@jakarta.annotation.Nullable Integer priceExponent) { - this.priceExponent = priceExponent; - } - - public MinNotionalFilter minNotional(@jakarta.annotation.Nullable String minNotional) { - this.minNotional = minNotional; - return this; - } - - /** - * Get minNotional - * - * @return minNotional - */ - @jakarta.annotation.Nullable - public String getMinNotional() { - return minNotional; - } - - public void setMinNotional(@jakarta.annotation.Nullable String minNotional) { - this.minNotional = minNotional; - } - - public MinNotionalFilter applyToMarket(@jakarta.annotation.Nullable Boolean applyToMarket) { - this.applyToMarket = applyToMarket; - return this; - } - - /** - * Get applyToMarket - * - * @return applyToMarket - */ - @jakarta.annotation.Nullable - public Boolean getApplyToMarket() { - return applyToMarket; - } - - public void setApplyToMarket(@jakarta.annotation.Nullable Boolean applyToMarket) { - this.applyToMarket = applyToMarket; - } - - public MinNotionalFilter avgPriceMins(@jakarta.annotation.Nullable Integer avgPriceMins) { - this.avgPriceMins = avgPriceMins; - return this; - } - - /** - * Get avgPriceMins - * - * @return avgPriceMins - */ - @jakarta.annotation.Nullable - public Integer getAvgPriceMins() { - return avgPriceMins; - } - - public void setAvgPriceMins(@jakarta.annotation.Nullable Integer avgPriceMins) { - this.avgPriceMins = avgPriceMins; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MinNotionalFilter minNotionalFilter = (MinNotionalFilter) o; - return Objects.equals(this.filterType, minNotionalFilter.filterType) - && Objects.equals(this.priceExponent, minNotionalFilter.priceExponent) - && Objects.equals(this.minNotional, minNotionalFilter.minNotional) - && Objects.equals(this.applyToMarket, minNotionalFilter.applyToMarket) - && Objects.equals(this.avgPriceMins, minNotionalFilter.avgPriceMins); - } - - @Override - public int hashCode() { - return Objects.hash(filterType, priceExponent, minNotional, applyToMarket, avgPriceMins); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MinNotionalFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" priceExponent: ").append(toIndentedString(priceExponent)).append("\n"); - sb.append(" minNotional: ").append(toIndentedString(minNotional)).append("\n"); - sb.append(" applyToMarket: ").append(toIndentedString(applyToMarket)).append("\n"); - sb.append(" avgPriceMins: ").append(toIndentedString(avgPriceMins)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Integer priceExponentValue = getPriceExponent(); - if (priceExponentValue != null) { - String priceExponentValueAsString = priceExponentValue.toString(); - valMap.put("priceExponent", priceExponentValueAsString); - } - String minNotionalValue = getMinNotional(); - if (minNotionalValue != null) { - String minNotionalValueAsString = minNotionalValue.toString(); - valMap.put("minNotional", minNotionalValueAsString); - } - Boolean applyToMarketValue = getApplyToMarket(); - if (applyToMarketValue != null) { - String applyToMarketValueAsString = applyToMarketValue.toString(); - valMap.put("applyToMarket", applyToMarketValueAsString); - } - Integer avgPriceMinsValue = getAvgPriceMins(); - if (avgPriceMinsValue != null) { - String avgPriceMinsValueAsString = avgPriceMinsValue.toString(); - valMap.put("avgPriceMins", avgPriceMinsValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object priceExponentValue = getPriceExponent(); - if (priceExponentValue != null) { - valMap.put("priceExponent", priceExponentValue); - } - Object minNotionalValue = getMinNotional(); - if (minNotionalValue != null) { - valMap.put("minNotional", minNotionalValue); - } - Object applyToMarketValue = getApplyToMarket(); - if (applyToMarketValue != null) { - valMap.put("applyToMarket", applyToMarketValue); - } - Object avgPriceMinsValue = getAvgPriceMins(); - if (avgPriceMinsValue != null) { - valMap.put("avgPriceMins", avgPriceMinsValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("priceExponent"); - openapiFields.add("minNotional"); - openapiFields.add("applyToMarket"); - openapiFields.add("avgPriceMins"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MinNotionalFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MinNotionalFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MinNotionalFilter is not found in the" - + " empty JSON string", - MinNotionalFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MinNotionalFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MinNotionalFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - if ((jsonObj.get("minNotional") != null && !jsonObj.get("minNotional").isJsonNull()) - && !jsonObj.get("minNotional").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `minNotional` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("minNotional").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MinNotionalFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MinNotionalFilter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MinNotionalFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MinNotionalFilter value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MinNotionalFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MinNotionalFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of MinNotionalFilter - * @throws IOException if the JSON string is invalid with respect to MinNotionalFilter - */ - public static MinNotionalFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MinNotionalFilter.class); - } - - /** - * Convert an instance of MinNotionalFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MiniTickerRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MiniTickerRequest.java index 6f78f9451..07a08700b 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MiniTickerRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MiniTickerRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,33 +37,57 @@ /** MiniTickerRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MiniTickerRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public MiniTickerRequest() {} - public MiniTickerRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public MiniTickerRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public MiniTickerRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Symbol to query * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -76,18 +100,20 @@ public boolean equals(Object o) { return false; } MiniTickerRequest miniTickerRequest = (MiniTickerRequest) o; - return Objects.equals(this.symbol, miniTickerRequest.symbol); + return Objects.equals(this.id, miniTickerRequest.id) + && Objects.equals(this.symbol, miniTickerRequest.symbol); } @Override public int hashCode() { - return Objects.hash(symbol); + return Objects.hash(id, symbol); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MiniTickerRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append("}"); return sb.toString(); @@ -97,6 +123,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -113,6 +144,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -143,11 +178,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -179,18 +214,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MiniTickerRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MiniTickerResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MiniTickerResponse.java index 20ac0ec83..c21b8e0d6 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MiniTickerResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/MiniTickerResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** MiniTickerResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MiniTickerResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -101,7 +101,7 @@ public MiniTickerResponse eLowerCase(@jakarta.annotation.Nullable String eLowerC } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -120,7 +120,7 @@ public MiniTickerResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -139,7 +139,7 @@ public MiniTickerResponse sLowerCase(@jakarta.annotation.Nullable String sLowerC } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -158,7 +158,7 @@ public MiniTickerResponse cLowerCase(@jakarta.annotation.Nullable String cLowerC } /** - * Get cLowerCase + * Close price * * @return cLowerCase */ @@ -177,7 +177,7 @@ public MiniTickerResponse oLowerCase(@jakarta.annotation.Nullable String oLowerC } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -196,7 +196,7 @@ public MiniTickerResponse hLowerCase(@jakarta.annotation.Nullable String hLowerC } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -215,7 +215,7 @@ public MiniTickerResponse lLowerCase(@jakarta.annotation.Nullable String lLowerC } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -234,7 +234,7 @@ public MiniTickerResponse vLowerCase(@jakarta.annotation.Nullable String vLowerC } /** - * Get vLowerCase + * Total traded base asset volume * * @return vLowerCase */ @@ -253,7 +253,7 @@ public MiniTickerResponse qLowerCase(@jakarta.annotation.Nullable String qLowerC } /** - * Get qLowerCase + * Total traded quote asset volume * * @return qLowerCase */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/NotionalFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/NotionalFilter.java deleted file mode 100644 index 87b318251..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/NotionalFilter.java +++ /dev/null @@ -1,484 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** NotionalFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class NotionalFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_PRICE_EXPONENT = "priceExponent"; - - @SerializedName(SERIALIZED_NAME_PRICE_EXPONENT) - @jakarta.annotation.Nullable - private Integer priceExponent; - - public static final String SERIALIZED_NAME_MIN_NOTIONAL = "minNotional"; - - @SerializedName(SERIALIZED_NAME_MIN_NOTIONAL) - @jakarta.annotation.Nullable - private String minNotional; - - public static final String SERIALIZED_NAME_APPLY_MIN_TO_MARKET = "applyMinToMarket"; - - @SerializedName(SERIALIZED_NAME_APPLY_MIN_TO_MARKET) - @jakarta.annotation.Nullable - private Boolean applyMinToMarket; - - public static final String SERIALIZED_NAME_MAX_NOTIONAL = "maxNotional"; - - @SerializedName(SERIALIZED_NAME_MAX_NOTIONAL) - @jakarta.annotation.Nullable - private String maxNotional; - - public static final String SERIALIZED_NAME_APPLY_MAX_TO_MARKET = "applyMaxToMarket"; - - @SerializedName(SERIALIZED_NAME_APPLY_MAX_TO_MARKET) - @jakarta.annotation.Nullable - private Boolean applyMaxToMarket; - - public static final String SERIALIZED_NAME_AVG_PRICE_MINS = "avgPriceMins"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE_MINS) - @jakarta.annotation.Nullable - private Integer avgPriceMins; - - public NotionalFilter() {} - - public NotionalFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public NotionalFilter priceExponent(@jakarta.annotation.Nullable Integer priceExponent) { - this.priceExponent = priceExponent; - return this; - } - - /** - * Get priceExponent - * - * @return priceExponent - */ - @jakarta.annotation.Nullable - public Integer getPriceExponent() { - return priceExponent; - } - - public void setPriceExponent(@jakarta.annotation.Nullable Integer priceExponent) { - this.priceExponent = priceExponent; - } - - public NotionalFilter minNotional(@jakarta.annotation.Nullable String minNotional) { - this.minNotional = minNotional; - return this; - } - - /** - * Get minNotional - * - * @return minNotional - */ - @jakarta.annotation.Nullable - public String getMinNotional() { - return minNotional; - } - - public void setMinNotional(@jakarta.annotation.Nullable String minNotional) { - this.minNotional = minNotional; - } - - public NotionalFilter applyMinToMarket(@jakarta.annotation.Nullable Boolean applyMinToMarket) { - this.applyMinToMarket = applyMinToMarket; - return this; - } - - /** - * Get applyMinToMarket - * - * @return applyMinToMarket - */ - @jakarta.annotation.Nullable - public Boolean getApplyMinToMarket() { - return applyMinToMarket; - } - - public void setApplyMinToMarket(@jakarta.annotation.Nullable Boolean applyMinToMarket) { - this.applyMinToMarket = applyMinToMarket; - } - - public NotionalFilter maxNotional(@jakarta.annotation.Nullable String maxNotional) { - this.maxNotional = maxNotional; - return this; - } - - /** - * Get maxNotional - * - * @return maxNotional - */ - @jakarta.annotation.Nullable - public String getMaxNotional() { - return maxNotional; - } - - public void setMaxNotional(@jakarta.annotation.Nullable String maxNotional) { - this.maxNotional = maxNotional; - } - - public NotionalFilter applyMaxToMarket(@jakarta.annotation.Nullable Boolean applyMaxToMarket) { - this.applyMaxToMarket = applyMaxToMarket; - return this; - } - - /** - * Get applyMaxToMarket - * - * @return applyMaxToMarket - */ - @jakarta.annotation.Nullable - public Boolean getApplyMaxToMarket() { - return applyMaxToMarket; - } - - public void setApplyMaxToMarket(@jakarta.annotation.Nullable Boolean applyMaxToMarket) { - this.applyMaxToMarket = applyMaxToMarket; - } - - public NotionalFilter avgPriceMins(@jakarta.annotation.Nullable Integer avgPriceMins) { - this.avgPriceMins = avgPriceMins; - return this; - } - - /** - * Get avgPriceMins - * - * @return avgPriceMins - */ - @jakarta.annotation.Nullable - public Integer getAvgPriceMins() { - return avgPriceMins; - } - - public void setAvgPriceMins(@jakarta.annotation.Nullable Integer avgPriceMins) { - this.avgPriceMins = avgPriceMins; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NotionalFilter notionalFilter = (NotionalFilter) o; - return Objects.equals(this.filterType, notionalFilter.filterType) - && Objects.equals(this.priceExponent, notionalFilter.priceExponent) - && Objects.equals(this.minNotional, notionalFilter.minNotional) - && Objects.equals(this.applyMinToMarket, notionalFilter.applyMinToMarket) - && Objects.equals(this.maxNotional, notionalFilter.maxNotional) - && Objects.equals(this.applyMaxToMarket, notionalFilter.applyMaxToMarket) - && Objects.equals(this.avgPriceMins, notionalFilter.avgPriceMins); - } - - @Override - public int hashCode() { - return Objects.hash( - filterType, - priceExponent, - minNotional, - applyMinToMarket, - maxNotional, - applyMaxToMarket, - avgPriceMins); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NotionalFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" priceExponent: ").append(toIndentedString(priceExponent)).append("\n"); - sb.append(" minNotional: ").append(toIndentedString(minNotional)).append("\n"); - sb.append(" applyMinToMarket: ").append(toIndentedString(applyMinToMarket)).append("\n"); - sb.append(" maxNotional: ").append(toIndentedString(maxNotional)).append("\n"); - sb.append(" applyMaxToMarket: ").append(toIndentedString(applyMaxToMarket)).append("\n"); - sb.append(" avgPriceMins: ").append(toIndentedString(avgPriceMins)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Integer priceExponentValue = getPriceExponent(); - if (priceExponentValue != null) { - String priceExponentValueAsString = priceExponentValue.toString(); - valMap.put("priceExponent", priceExponentValueAsString); - } - String minNotionalValue = getMinNotional(); - if (minNotionalValue != null) { - String minNotionalValueAsString = minNotionalValue.toString(); - valMap.put("minNotional", minNotionalValueAsString); - } - Boolean applyMinToMarketValue = getApplyMinToMarket(); - if (applyMinToMarketValue != null) { - String applyMinToMarketValueAsString = applyMinToMarketValue.toString(); - valMap.put("applyMinToMarket", applyMinToMarketValueAsString); - } - String maxNotionalValue = getMaxNotional(); - if (maxNotionalValue != null) { - String maxNotionalValueAsString = maxNotionalValue.toString(); - valMap.put("maxNotional", maxNotionalValueAsString); - } - Boolean applyMaxToMarketValue = getApplyMaxToMarket(); - if (applyMaxToMarketValue != null) { - String applyMaxToMarketValueAsString = applyMaxToMarketValue.toString(); - valMap.put("applyMaxToMarket", applyMaxToMarketValueAsString); - } - Integer avgPriceMinsValue = getAvgPriceMins(); - if (avgPriceMinsValue != null) { - String avgPriceMinsValueAsString = avgPriceMinsValue.toString(); - valMap.put("avgPriceMins", avgPriceMinsValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object priceExponentValue = getPriceExponent(); - if (priceExponentValue != null) { - valMap.put("priceExponent", priceExponentValue); - } - Object minNotionalValue = getMinNotional(); - if (minNotionalValue != null) { - valMap.put("minNotional", minNotionalValue); - } - Object applyMinToMarketValue = getApplyMinToMarket(); - if (applyMinToMarketValue != null) { - valMap.put("applyMinToMarket", applyMinToMarketValue); - } - Object maxNotionalValue = getMaxNotional(); - if (maxNotionalValue != null) { - valMap.put("maxNotional", maxNotionalValue); - } - Object applyMaxToMarketValue = getApplyMaxToMarket(); - if (applyMaxToMarketValue != null) { - valMap.put("applyMaxToMarket", applyMaxToMarketValue); - } - Object avgPriceMinsValue = getAvgPriceMins(); - if (avgPriceMinsValue != null) { - valMap.put("avgPriceMins", avgPriceMinsValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("priceExponent"); - openapiFields.add("minNotional"); - openapiFields.add("applyMinToMarket"); - openapiFields.add("maxNotional"); - openapiFields.add("applyMaxToMarket"); - openapiFields.add("avgPriceMins"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to NotionalFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!NotionalFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in NotionalFilter is not found in the" - + " empty JSON string", - NotionalFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!NotionalFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `NotionalFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - if ((jsonObj.get("minNotional") != null && !jsonObj.get("minNotional").isJsonNull()) - && !jsonObj.get("minNotional").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `minNotional` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("minNotional").toString())); - } - if ((jsonObj.get("maxNotional") != null && !jsonObj.get("maxNotional").isJsonNull()) - && !jsonObj.get("maxNotional").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `maxNotional` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("maxNotional").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NotionalFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NotionalFilter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(NotionalFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, NotionalFilter value) throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public NotionalFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of NotionalFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of NotionalFilter - * @throws IOException if the JSON string is invalid with respect to NotionalFilter - */ - public static NotionalFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NotionalFilter.class); - } - - /** - * Convert an instance of NotionalFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/OutboundAccountPosition.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/OutboundAccountPosition.java new file mode 100644 index 000000000..6e74e023a --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/OutboundAccountPosition.java @@ -0,0 +1,340 @@ +/* + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** OutboundAccountPosition */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OutboundAccountPosition extends BaseDTO { + public static final String SERIALIZED_NAME_E = "E"; + + @SerializedName(SERIALIZED_NAME_E) + @jakarta.annotation.Nullable + private Long E; + + public static final String SERIALIZED_NAME_U_LOWER_CASE = "u"; + + @SerializedName(SERIALIZED_NAME_U_LOWER_CASE) + @jakarta.annotation.Nullable + private Long uLowerCase; + + public static final String SERIALIZED_NAME_B = "B"; + + @SerializedName(SERIALIZED_NAME_B) + @jakarta.annotation.Nullable + private List<@Valid OutboundAccountPositionBInner> B; + + public OutboundAccountPosition() {} + + public OutboundAccountPosition E(@jakarta.annotation.Nullable Long E) { + this.E = E; + return this; + } + + /** + * Event Time + * + * @return E + */ + @jakarta.annotation.Nullable + public Long getE() { + return E; + } + + public void setE(@jakarta.annotation.Nullable Long E) { + this.E = E; + } + + public OutboundAccountPosition uLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + return this; + } + + /** + * Time of last account update + * + * @return uLowerCase + */ + @jakarta.annotation.Nullable + public Long getuLowerCase() { + return uLowerCase; + } + + public void setuLowerCase(@jakarta.annotation.Nullable Long uLowerCase) { + this.uLowerCase = uLowerCase; + } + + public OutboundAccountPosition B( + @jakarta.annotation.Nullable List<@Valid OutboundAccountPositionBInner> B) { + this.B = B; + return this; + } + + public OutboundAccountPosition addBItem(OutboundAccountPositionBInner BItem) { + if (this.B == null) { + this.B = new ArrayList<>(); + } + this.B.add(BItem); + return this; + } + + /** + * Balances Array + * + * @return B + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid OutboundAccountPositionBInner> getB() { + return B; + } + + public void setB(@jakarta.annotation.Nullable List<@Valid OutboundAccountPositionBInner> B) { + this.B = B; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OutboundAccountPosition outboundAccountPosition = (OutboundAccountPosition) o; + return Objects.equals(this.E, outboundAccountPosition.E) + && Objects.equals(this.uLowerCase, outboundAccountPosition.uLowerCase) + && Objects.equals(this.B, outboundAccountPosition.B); + } + + @Override + public int hashCode() { + return Objects.hash(E, uLowerCase, B); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OutboundAccountPosition {\n"); + sb.append(" E: ").append(toIndentedString(E)).append("\n"); + sb.append(" uLowerCase: ").append(toIndentedString(uLowerCase)).append("\n"); + sb.append(" B: ").append(toIndentedString(B)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Long EValue = getE(); + if (EValue != null) { + String EValueAsString = EValue.toString(); + valMap.put("E", EValueAsString); + } + Long uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + String uLowerCaseValueAsString = uLowerCaseValue.toString(); + valMap.put("uLowerCase", uLowerCaseValueAsString); + } + List<@Valid OutboundAccountPositionBInner> BValue = getB(); + if (BValue != null) { + String BValueAsString = JSON.getGson().toJson(BValue); + valMap.put("B", BValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object EValue = getE(); + if (EValue != null) { + valMap.put("E", EValue); + } + Object uLowerCaseValue = getuLowerCase(); + if (uLowerCaseValue != null) { + valMap.put("uLowerCase", uLowerCaseValue); + } + Object BValue = getB(); + if (BValue != null) { + valMap.put("B", BValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("E"); + openapiFields.add("u"); + openapiFields.add("B"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OutboundAccountPosition + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OutboundAccountPosition.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OutboundAccountPosition is not found" + + " in the empty JSON string", + OutboundAccountPosition.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OutboundAccountPosition.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OutboundAccountPosition` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("B") != null && !jsonObj.get("B").isJsonNull()) { + JsonArray jsonArrayB = jsonObj.getAsJsonArray("B"); + if (jsonArrayB != null) { + // ensure the json data is an array + if (!jsonObj.get("B").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `B` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("B").toString())); + } + + // validate the optional field `B` (array) + for (int i = 0; i < jsonArrayB.size(); i++) { + OutboundAccountPositionBInner.validateJsonElement(jsonArrayB.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OutboundAccountPosition.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OutboundAccountPosition' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(OutboundAccountPosition.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OutboundAccountPosition value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OutboundAccountPosition read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OutboundAccountPosition given an JSON string + * + * @param jsonString JSON string + * @return An instance of OutboundAccountPosition + * @throws IOException if the JSON string is invalid with respect to OutboundAccountPosition + */ + public static OutboundAccountPosition fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OutboundAccountPosition.class); + } + + /** + * Convert an instance of OutboundAccountPosition to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/OutboundAccountPositionBInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/OutboundAccountPositionBInner.java new file mode 100644 index 000000000..ce5eb19a4 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/OutboundAccountPositionBInner.java @@ -0,0 +1,339 @@ +/* + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.stream.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** OutboundAccountPositionBInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OutboundAccountPositionBInner extends BaseDTO { + public static final String SERIALIZED_NAME_A_LOWER_CASE = "a"; + + @SerializedName(SERIALIZED_NAME_A_LOWER_CASE) + @jakarta.annotation.Nullable + private String aLowerCase; + + public static final String SERIALIZED_NAME_F_LOWER_CASE = "f"; + + @SerializedName(SERIALIZED_NAME_F_LOWER_CASE) + @jakarta.annotation.Nullable + private String fLowerCase; + + public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; + + @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) + @jakarta.annotation.Nullable + private String lLowerCase; + + public OutboundAccountPositionBInner() {} + + public OutboundAccountPositionBInner aLowerCase( + @jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + return this; + } + + /** + * Asset + * + * @return aLowerCase + */ + @jakarta.annotation.Nullable + public String getaLowerCase() { + return aLowerCase; + } + + public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) { + this.aLowerCase = aLowerCase; + } + + public OutboundAccountPositionBInner fLowerCase( + @jakarta.annotation.Nullable String fLowerCase) { + this.fLowerCase = fLowerCase; + return this; + } + + /** + * Free + * + * @return fLowerCase + */ + @jakarta.annotation.Nullable + public String getfLowerCase() { + return fLowerCase; + } + + public void setfLowerCase(@jakarta.annotation.Nullable String fLowerCase) { + this.fLowerCase = fLowerCase; + } + + public OutboundAccountPositionBInner lLowerCase( + @jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + return this; + } + + /** + * Locked + * + * @return lLowerCase + */ + @jakarta.annotation.Nullable + public String getlLowerCase() { + return lLowerCase; + } + + public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OutboundAccountPositionBInner outboundAccountPositionBInner = + (OutboundAccountPositionBInner) o; + return Objects.equals(this.aLowerCase, outboundAccountPositionBInner.aLowerCase) + && Objects.equals(this.fLowerCase, outboundAccountPositionBInner.fLowerCase) + && Objects.equals(this.lLowerCase, outboundAccountPositionBInner.lLowerCase); + } + + @Override + public int hashCode() { + return Objects.hash(aLowerCase, fLowerCase, lLowerCase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OutboundAccountPositionBInner {\n"); + sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n"); + sb.append(" fLowerCase: ").append(toIndentedString(fLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + String aLowerCaseValueAsString = aLowerCaseValue.toString(); + valMap.put("aLowerCase", aLowerCaseValueAsString); + } + String fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + String fLowerCaseValueAsString = fLowerCaseValue.toString(); + valMap.put("fLowerCase", fLowerCaseValueAsString); + } + String lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object aLowerCaseValue = getaLowerCase(); + if (aLowerCaseValue != null) { + valMap.put("aLowerCase", aLowerCaseValue); + } + Object fLowerCaseValue = getfLowerCase(); + if (fLowerCaseValue != null) { + valMap.put("fLowerCase", fLowerCaseValue); + } + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("a"); + openapiFields.add("f"); + openapiFields.add("l"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * OutboundAccountPositionBInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OutboundAccountPositionBInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OutboundAccountPositionBInner is not" + + " found in the empty JSON string", + OutboundAccountPositionBInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OutboundAccountPositionBInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OutboundAccountPositionBInner` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) + && !jsonObj.get("a").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `a` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("a").toString())); + } + if ((jsonObj.get("f") != null && !jsonObj.get("f").isJsonNull()) + && !jsonObj.get("f").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `f` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("f").toString())); + } + if ((jsonObj.get("l") != null && !jsonObj.get("l").isJsonNull()) + && !jsonObj.get("l").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `l` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("l").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OutboundAccountPositionBInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OutboundAccountPositionBInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(OutboundAccountPositionBInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OutboundAccountPositionBInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OutboundAccountPositionBInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OutboundAccountPositionBInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OutboundAccountPositionBInner + * @throws IOException if the JSON string is invalid with respect to + * OutboundAccountPositionBInner + */ + public static OutboundAccountPositionBInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OutboundAccountPositionBInner.class); + } + + /** + * Convert an instance of OutboundAccountPositionBInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/PartialBookDepthRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/PartialBookDepthRequest.java index 7c288ecf3..f8ffd6557 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/PartialBookDepthRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/PartialBookDepthRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,49 +38,73 @@ /** PartialBookDepthRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PartialBookDepthRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_LEVELS = "levels"; @SerializedName(SERIALIZED_NAME_LEVELS) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private Levels levels; public static final String SERIALIZED_NAME_UPDATE_SPEED = "updateSpeed"; @SerializedName(SERIALIZED_NAME_UPDATE_SPEED) @jakarta.annotation.Nullable - private String updateSpeed; + private UpdateSpeed updateSpeed; public PartialBookDepthRequest() {} - public PartialBookDepthRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public PartialBookDepthRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public PartialBookDepthRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Symbol to query * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } - public PartialBookDepthRequest levels(@jakarta.annotation.Nonnull Levels levels) { + public PartialBookDepthRequest levels(@jakarta.annotation.Nullable Levels levels) { this.levels = levels; return this; } @@ -90,18 +114,18 @@ public PartialBookDepthRequest levels(@jakarta.annotation.Nonnull Levels levels) * * @return levels */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable @Valid public Levels getLevels() { return levels; } - public void setLevels(@jakarta.annotation.Nonnull Levels levels) { + public void setLevels(@jakarta.annotation.Nullable Levels levels) { this.levels = levels; } - public PartialBookDepthRequest updateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public PartialBookDepthRequest updateSpeed( + @jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; return this; } @@ -112,11 +136,12 @@ public PartialBookDepthRequest updateSpeed(@jakarta.annotation.Nullable String u * @return updateSpeed */ @jakarta.annotation.Nullable - public String getUpdateSpeed() { + @Valid + public UpdateSpeed getUpdateSpeed() { return updateSpeed; } - public void setUpdateSpeed(@jakarta.annotation.Nullable String updateSpeed) { + public void setUpdateSpeed(@jakarta.annotation.Nullable UpdateSpeed updateSpeed) { this.updateSpeed = updateSpeed; } @@ -129,20 +154,22 @@ public boolean equals(Object o) { return false; } PartialBookDepthRequest partialBookDepthRequest = (PartialBookDepthRequest) o; - return Objects.equals(this.symbol, partialBookDepthRequest.symbol) + return Objects.equals(this.id, partialBookDepthRequest.id) + && Objects.equals(this.symbol, partialBookDepthRequest.symbol) && Objects.equals(this.levels, partialBookDepthRequest.levels) && Objects.equals(this.updateSpeed, partialBookDepthRequest.updateSpeed); } @Override public int hashCode() { - return Objects.hash(symbol, levels, updateSpeed); + return Objects.hash(id, symbol, levels, updateSpeed); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PartialBookDepthRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" levels: ").append(toIndentedString(levels)).append("\n"); sb.append(" updateSpeed: ").append(toIndentedString(updateSpeed)).append("\n"); @@ -154,6 +181,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -164,7 +196,7 @@ public String toUrlQueryString() { String levelsValueAsString = levelsValue.toString(); valMap.put("levels", levelsValueAsString); } - String updateSpeedValue = getUpdateSpeed(); + UpdateSpeed updateSpeedValue = getUpdateSpeed(); if (updateSpeedValue != null) { String updateSpeedValueAsString = updateSpeedValue.toString(); valMap.put("updateSpeed", updateSpeedValueAsString); @@ -180,6 +212,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -218,14 +254,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("levels"); openapiFields.add("updateSpeed"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); - openapiRequiredFields.add("levels"); } /** @@ -257,33 +292,30 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PartialBookDepthRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - // validate the required field `levels` - Levels.validateJsonElement(jsonObj.get("levels")); - if ((jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) - && !jsonObj.get("updateSpeed").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `updateSpeed` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("updateSpeed").toString())); + // validate the optional field `levels` + if (jsonObj.get("levels") != null && !jsonObj.get("levels").isJsonNull()) { + Levels.validateJsonElement(jsonObj.get("levels")); + } + // validate the optional field `updateSpeed` + if (jsonObj.get("updateSpeed") != null && !jsonObj.get("updateSpeed").isJsonNull()) { + UpdateSpeed.validateJsonElement(jsonObj.get("updateSpeed")); } } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/PartialBookDepthResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/PartialBookDepthResponse.java index 645aa0335..8c6345ea9 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/PartialBookDepthResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/PartialBookDepthResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** PartialBookDepthResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class PartialBookDepthResponse extends BaseDTO { public static final String SERIALIZED_NAME_LAST_UPDATE_ID = "lastUpdateId"; @@ -68,7 +68,7 @@ public PartialBookDepthResponse lastUpdateId(@jakarta.annotation.Nullable Long l } /** - * Get lastUpdateId + * Last update ID * * @return lastUpdateId */ @@ -95,7 +95,7 @@ public PartialBookDepthResponse addBidsItem(List bidsItem) { } /** - * Get bids + * Bids to be updated * * @return bids */ @@ -123,7 +123,7 @@ public PartialBookDepthResponse addAsksItem(List asksItem) { } /** - * Get asks + * Asks to be updated * * @return asks */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/PercentPriceBySideFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/PercentPriceBySideFilter.java deleted file mode 100644 index 9a88054b0..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/PercentPriceBySideFilter.java +++ /dev/null @@ -1,515 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** PercentPriceBySideFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PercentPriceBySideFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_MULTIPLIER_EXPONENT = "multiplierExponent"; - - @SerializedName(SERIALIZED_NAME_MULTIPLIER_EXPONENT) - @jakarta.annotation.Nullable - private Integer multiplierExponent; - - public static final String SERIALIZED_NAME_BID_MULTIPLIER_UP = "bidMultiplierUp"; - - @SerializedName(SERIALIZED_NAME_BID_MULTIPLIER_UP) - @jakarta.annotation.Nullable - private String bidMultiplierUp; - - public static final String SERIALIZED_NAME_BID_MULTIPLIER_DOWN = "bidMultiplierDown"; - - @SerializedName(SERIALIZED_NAME_BID_MULTIPLIER_DOWN) - @jakarta.annotation.Nullable - private String bidMultiplierDown; - - public static final String SERIALIZED_NAME_ASK_MULTIPLIER_UP = "askMultiplierUp"; - - @SerializedName(SERIALIZED_NAME_ASK_MULTIPLIER_UP) - @jakarta.annotation.Nullable - private String askMultiplierUp; - - public static final String SERIALIZED_NAME_ASK_MULTIPLIER_DOWN = "askMultiplierDown"; - - @SerializedName(SERIALIZED_NAME_ASK_MULTIPLIER_DOWN) - @jakarta.annotation.Nullable - private String askMultiplierDown; - - public static final String SERIALIZED_NAME_AVG_PRICE_MINS = "avgPriceMins"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE_MINS) - @jakarta.annotation.Nullable - private Integer avgPriceMins; - - public PercentPriceBySideFilter() {} - - public PercentPriceBySideFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public PercentPriceBySideFilter multiplierExponent( - @jakarta.annotation.Nullable Integer multiplierExponent) { - this.multiplierExponent = multiplierExponent; - return this; - } - - /** - * Get multiplierExponent - * - * @return multiplierExponent - */ - @jakarta.annotation.Nullable - public Integer getMultiplierExponent() { - return multiplierExponent; - } - - public void setMultiplierExponent(@jakarta.annotation.Nullable Integer multiplierExponent) { - this.multiplierExponent = multiplierExponent; - } - - public PercentPriceBySideFilter bidMultiplierUp( - @jakarta.annotation.Nullable String bidMultiplierUp) { - this.bidMultiplierUp = bidMultiplierUp; - return this; - } - - /** - * Get bidMultiplierUp - * - * @return bidMultiplierUp - */ - @jakarta.annotation.Nullable - public String getBidMultiplierUp() { - return bidMultiplierUp; - } - - public void setBidMultiplierUp(@jakarta.annotation.Nullable String bidMultiplierUp) { - this.bidMultiplierUp = bidMultiplierUp; - } - - public PercentPriceBySideFilter bidMultiplierDown( - @jakarta.annotation.Nullable String bidMultiplierDown) { - this.bidMultiplierDown = bidMultiplierDown; - return this; - } - - /** - * Get bidMultiplierDown - * - * @return bidMultiplierDown - */ - @jakarta.annotation.Nullable - public String getBidMultiplierDown() { - return bidMultiplierDown; - } - - public void setBidMultiplierDown(@jakarta.annotation.Nullable String bidMultiplierDown) { - this.bidMultiplierDown = bidMultiplierDown; - } - - public PercentPriceBySideFilter askMultiplierUp( - @jakarta.annotation.Nullable String askMultiplierUp) { - this.askMultiplierUp = askMultiplierUp; - return this; - } - - /** - * Get askMultiplierUp - * - * @return askMultiplierUp - */ - @jakarta.annotation.Nullable - public String getAskMultiplierUp() { - return askMultiplierUp; - } - - public void setAskMultiplierUp(@jakarta.annotation.Nullable String askMultiplierUp) { - this.askMultiplierUp = askMultiplierUp; - } - - public PercentPriceBySideFilter askMultiplierDown( - @jakarta.annotation.Nullable String askMultiplierDown) { - this.askMultiplierDown = askMultiplierDown; - return this; - } - - /** - * Get askMultiplierDown - * - * @return askMultiplierDown - */ - @jakarta.annotation.Nullable - public String getAskMultiplierDown() { - return askMultiplierDown; - } - - public void setAskMultiplierDown(@jakarta.annotation.Nullable String askMultiplierDown) { - this.askMultiplierDown = askMultiplierDown; - } - - public PercentPriceBySideFilter avgPriceMins( - @jakarta.annotation.Nullable Integer avgPriceMins) { - this.avgPriceMins = avgPriceMins; - return this; - } - - /** - * Get avgPriceMins - * - * @return avgPriceMins - */ - @jakarta.annotation.Nullable - public Integer getAvgPriceMins() { - return avgPriceMins; - } - - public void setAvgPriceMins(@jakarta.annotation.Nullable Integer avgPriceMins) { - this.avgPriceMins = avgPriceMins; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PercentPriceBySideFilter percentPriceBySideFilter = (PercentPriceBySideFilter) o; - return Objects.equals(this.filterType, percentPriceBySideFilter.filterType) - && Objects.equals( - this.multiplierExponent, percentPriceBySideFilter.multiplierExponent) - && Objects.equals(this.bidMultiplierUp, percentPriceBySideFilter.bidMultiplierUp) - && Objects.equals( - this.bidMultiplierDown, percentPriceBySideFilter.bidMultiplierDown) - && Objects.equals(this.askMultiplierUp, percentPriceBySideFilter.askMultiplierUp) - && Objects.equals( - this.askMultiplierDown, percentPriceBySideFilter.askMultiplierDown) - && Objects.equals(this.avgPriceMins, percentPriceBySideFilter.avgPriceMins); - } - - @Override - public int hashCode() { - return Objects.hash( - filterType, - multiplierExponent, - bidMultiplierUp, - bidMultiplierDown, - askMultiplierUp, - askMultiplierDown, - avgPriceMins); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PercentPriceBySideFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" multiplierExponent: ") - .append(toIndentedString(multiplierExponent)) - .append("\n"); - sb.append(" bidMultiplierUp: ").append(toIndentedString(bidMultiplierUp)).append("\n"); - sb.append(" bidMultiplierDown: ").append(toIndentedString(bidMultiplierDown)).append("\n"); - sb.append(" askMultiplierUp: ").append(toIndentedString(askMultiplierUp)).append("\n"); - sb.append(" askMultiplierDown: ").append(toIndentedString(askMultiplierDown)).append("\n"); - sb.append(" avgPriceMins: ").append(toIndentedString(avgPriceMins)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Integer multiplierExponentValue = getMultiplierExponent(); - if (multiplierExponentValue != null) { - String multiplierExponentValueAsString = multiplierExponentValue.toString(); - valMap.put("multiplierExponent", multiplierExponentValueAsString); - } - String bidMultiplierUpValue = getBidMultiplierUp(); - if (bidMultiplierUpValue != null) { - String bidMultiplierUpValueAsString = bidMultiplierUpValue.toString(); - valMap.put("bidMultiplierUp", bidMultiplierUpValueAsString); - } - String bidMultiplierDownValue = getBidMultiplierDown(); - if (bidMultiplierDownValue != null) { - String bidMultiplierDownValueAsString = bidMultiplierDownValue.toString(); - valMap.put("bidMultiplierDown", bidMultiplierDownValueAsString); - } - String askMultiplierUpValue = getAskMultiplierUp(); - if (askMultiplierUpValue != null) { - String askMultiplierUpValueAsString = askMultiplierUpValue.toString(); - valMap.put("askMultiplierUp", askMultiplierUpValueAsString); - } - String askMultiplierDownValue = getAskMultiplierDown(); - if (askMultiplierDownValue != null) { - String askMultiplierDownValueAsString = askMultiplierDownValue.toString(); - valMap.put("askMultiplierDown", askMultiplierDownValueAsString); - } - Integer avgPriceMinsValue = getAvgPriceMins(); - if (avgPriceMinsValue != null) { - String avgPriceMinsValueAsString = avgPriceMinsValue.toString(); - valMap.put("avgPriceMins", avgPriceMinsValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object multiplierExponentValue = getMultiplierExponent(); - if (multiplierExponentValue != null) { - valMap.put("multiplierExponent", multiplierExponentValue); - } - Object bidMultiplierUpValue = getBidMultiplierUp(); - if (bidMultiplierUpValue != null) { - valMap.put("bidMultiplierUp", bidMultiplierUpValue); - } - Object bidMultiplierDownValue = getBidMultiplierDown(); - if (bidMultiplierDownValue != null) { - valMap.put("bidMultiplierDown", bidMultiplierDownValue); - } - Object askMultiplierUpValue = getAskMultiplierUp(); - if (askMultiplierUpValue != null) { - valMap.put("askMultiplierUp", askMultiplierUpValue); - } - Object askMultiplierDownValue = getAskMultiplierDown(); - if (askMultiplierDownValue != null) { - valMap.put("askMultiplierDown", askMultiplierDownValue); - } - Object avgPriceMinsValue = getAvgPriceMins(); - if (avgPriceMinsValue != null) { - valMap.put("avgPriceMins", avgPriceMinsValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("multiplierExponent"); - openapiFields.add("bidMultiplierUp"); - openapiFields.add("bidMultiplierDown"); - openapiFields.add("askMultiplierUp"); - openapiFields.add("askMultiplierDown"); - openapiFields.add("avgPriceMins"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PercentPriceBySideFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PercentPriceBySideFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PercentPriceBySideFilter is not found" - + " in the empty JSON string", - PercentPriceBySideFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PercentPriceBySideFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PercentPriceBySideFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - if ((jsonObj.get("bidMultiplierUp") != null && !jsonObj.get("bidMultiplierUp").isJsonNull()) - && !jsonObj.get("bidMultiplierUp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `bidMultiplierUp` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("bidMultiplierUp").toString())); - } - if ((jsonObj.get("bidMultiplierDown") != null - && !jsonObj.get("bidMultiplierDown").isJsonNull()) - && !jsonObj.get("bidMultiplierDown").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `bidMultiplierDown` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("bidMultiplierDown").toString())); - } - if ((jsonObj.get("askMultiplierUp") != null && !jsonObj.get("askMultiplierUp").isJsonNull()) - && !jsonObj.get("askMultiplierUp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `askMultiplierUp` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("askMultiplierUp").toString())); - } - if ((jsonObj.get("askMultiplierDown") != null - && !jsonObj.get("askMultiplierDown").isJsonNull()) - && !jsonObj.get("askMultiplierDown").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `askMultiplierDown` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("askMultiplierDown").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PercentPriceBySideFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PercentPriceBySideFilter' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PercentPriceBySideFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PercentPriceBySideFilter value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PercentPriceBySideFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PercentPriceBySideFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of PercentPriceBySideFilter - * @throws IOException if the JSON string is invalid with respect to PercentPriceBySideFilter - */ - public static PercentPriceBySideFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PercentPriceBySideFilter.class); - } - - /** - * Convert an instance of PercentPriceBySideFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/PercentPriceFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/PercentPriceFilter.java deleted file mode 100644 index 1d1616c30..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/PercentPriceFilter.java +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** PercentPriceFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PercentPriceFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_MULTIPLIER_EXPONENT = "multiplierExponent"; - - @SerializedName(SERIALIZED_NAME_MULTIPLIER_EXPONENT) - @jakarta.annotation.Nullable - private Integer multiplierExponent; - - public static final String SERIALIZED_NAME_MULTIPLIER_UP = "multiplierUp"; - - @SerializedName(SERIALIZED_NAME_MULTIPLIER_UP) - @jakarta.annotation.Nullable - private String multiplierUp; - - public static final String SERIALIZED_NAME_MULTIPLIER_DOWN = "multiplierDown"; - - @SerializedName(SERIALIZED_NAME_MULTIPLIER_DOWN) - @jakarta.annotation.Nullable - private String multiplierDown; - - public static final String SERIALIZED_NAME_AVG_PRICE_MINS = "avgPriceMins"; - - @SerializedName(SERIALIZED_NAME_AVG_PRICE_MINS) - @jakarta.annotation.Nullable - private Integer avgPriceMins; - - public PercentPriceFilter() {} - - public PercentPriceFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public PercentPriceFilter multiplierExponent( - @jakarta.annotation.Nullable Integer multiplierExponent) { - this.multiplierExponent = multiplierExponent; - return this; - } - - /** - * Get multiplierExponent - * - * @return multiplierExponent - */ - @jakarta.annotation.Nullable - public Integer getMultiplierExponent() { - return multiplierExponent; - } - - public void setMultiplierExponent(@jakarta.annotation.Nullable Integer multiplierExponent) { - this.multiplierExponent = multiplierExponent; - } - - public PercentPriceFilter multiplierUp(@jakarta.annotation.Nullable String multiplierUp) { - this.multiplierUp = multiplierUp; - return this; - } - - /** - * Get multiplierUp - * - * @return multiplierUp - */ - @jakarta.annotation.Nullable - public String getMultiplierUp() { - return multiplierUp; - } - - public void setMultiplierUp(@jakarta.annotation.Nullable String multiplierUp) { - this.multiplierUp = multiplierUp; - } - - public PercentPriceFilter multiplierDown(@jakarta.annotation.Nullable String multiplierDown) { - this.multiplierDown = multiplierDown; - return this; - } - - /** - * Get multiplierDown - * - * @return multiplierDown - */ - @jakarta.annotation.Nullable - public String getMultiplierDown() { - return multiplierDown; - } - - public void setMultiplierDown(@jakarta.annotation.Nullable String multiplierDown) { - this.multiplierDown = multiplierDown; - } - - public PercentPriceFilter avgPriceMins(@jakarta.annotation.Nullable Integer avgPriceMins) { - this.avgPriceMins = avgPriceMins; - return this; - } - - /** - * Get avgPriceMins - * - * @return avgPriceMins - */ - @jakarta.annotation.Nullable - public Integer getAvgPriceMins() { - return avgPriceMins; - } - - public void setAvgPriceMins(@jakarta.annotation.Nullable Integer avgPriceMins) { - this.avgPriceMins = avgPriceMins; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PercentPriceFilter percentPriceFilter = (PercentPriceFilter) o; - return Objects.equals(this.filterType, percentPriceFilter.filterType) - && Objects.equals(this.multiplierExponent, percentPriceFilter.multiplierExponent) - && Objects.equals(this.multiplierUp, percentPriceFilter.multiplierUp) - && Objects.equals(this.multiplierDown, percentPriceFilter.multiplierDown) - && Objects.equals(this.avgPriceMins, percentPriceFilter.avgPriceMins); - } - - @Override - public int hashCode() { - return Objects.hash( - filterType, multiplierExponent, multiplierUp, multiplierDown, avgPriceMins); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PercentPriceFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" multiplierExponent: ") - .append(toIndentedString(multiplierExponent)) - .append("\n"); - sb.append(" multiplierUp: ").append(toIndentedString(multiplierUp)).append("\n"); - sb.append(" multiplierDown: ").append(toIndentedString(multiplierDown)).append("\n"); - sb.append(" avgPriceMins: ").append(toIndentedString(avgPriceMins)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Integer multiplierExponentValue = getMultiplierExponent(); - if (multiplierExponentValue != null) { - String multiplierExponentValueAsString = multiplierExponentValue.toString(); - valMap.put("multiplierExponent", multiplierExponentValueAsString); - } - String multiplierUpValue = getMultiplierUp(); - if (multiplierUpValue != null) { - String multiplierUpValueAsString = multiplierUpValue.toString(); - valMap.put("multiplierUp", multiplierUpValueAsString); - } - String multiplierDownValue = getMultiplierDown(); - if (multiplierDownValue != null) { - String multiplierDownValueAsString = multiplierDownValue.toString(); - valMap.put("multiplierDown", multiplierDownValueAsString); - } - Integer avgPriceMinsValue = getAvgPriceMins(); - if (avgPriceMinsValue != null) { - String avgPriceMinsValueAsString = avgPriceMinsValue.toString(); - valMap.put("avgPriceMins", avgPriceMinsValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object multiplierExponentValue = getMultiplierExponent(); - if (multiplierExponentValue != null) { - valMap.put("multiplierExponent", multiplierExponentValue); - } - Object multiplierUpValue = getMultiplierUp(); - if (multiplierUpValue != null) { - valMap.put("multiplierUp", multiplierUpValue); - } - Object multiplierDownValue = getMultiplierDown(); - if (multiplierDownValue != null) { - valMap.put("multiplierDown", multiplierDownValue); - } - Object avgPriceMinsValue = getAvgPriceMins(); - if (avgPriceMinsValue != null) { - valMap.put("avgPriceMins", avgPriceMinsValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("multiplierExponent"); - openapiFields.add("multiplierUp"); - openapiFields.add("multiplierDown"); - openapiFields.add("avgPriceMins"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PercentPriceFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PercentPriceFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PercentPriceFilter is not found in the" - + " empty JSON string", - PercentPriceFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PercentPriceFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PercentPriceFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - if ((jsonObj.get("multiplierUp") != null && !jsonObj.get("multiplierUp").isJsonNull()) - && !jsonObj.get("multiplierUp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `multiplierUp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("multiplierUp").toString())); - } - if ((jsonObj.get("multiplierDown") != null && !jsonObj.get("multiplierDown").isJsonNull()) - && !jsonObj.get("multiplierDown").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `multiplierDown` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("multiplierDown").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PercentPriceFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PercentPriceFilter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PercentPriceFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PercentPriceFilter value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PercentPriceFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PercentPriceFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of PercentPriceFilter - * @throws IOException if the JSON string is invalid with respect to PercentPriceFilter - */ - public static PercentPriceFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PercentPriceFilter.class); - } - - /** - * Convert an instance of PercentPriceFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/PriceFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/PriceFilter.java deleted file mode 100644 index eb0c562e8..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/PriceFilter.java +++ /dev/null @@ -1,411 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** PriceFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PriceFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_PRICE_EXPONENT = "priceExponent"; - - @SerializedName(SERIALIZED_NAME_PRICE_EXPONENT) - @jakarta.annotation.Nullable - private Integer priceExponent; - - public static final String SERIALIZED_NAME_MIN_PRICE = "minPrice"; - - @SerializedName(SERIALIZED_NAME_MIN_PRICE) - @jakarta.annotation.Nullable - private String minPrice; - - public static final String SERIALIZED_NAME_MAX_PRICE = "maxPrice"; - - @SerializedName(SERIALIZED_NAME_MAX_PRICE) - @jakarta.annotation.Nullable - private String maxPrice; - - public static final String SERIALIZED_NAME_TICK_SIZE = "tickSize"; - - @SerializedName(SERIALIZED_NAME_TICK_SIZE) - @jakarta.annotation.Nullable - private String tickSize; - - public PriceFilter() {} - - public PriceFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public PriceFilter priceExponent(@jakarta.annotation.Nullable Integer priceExponent) { - this.priceExponent = priceExponent; - return this; - } - - /** - * Get priceExponent - * - * @return priceExponent - */ - @jakarta.annotation.Nullable - public Integer getPriceExponent() { - return priceExponent; - } - - public void setPriceExponent(@jakarta.annotation.Nullable Integer priceExponent) { - this.priceExponent = priceExponent; - } - - public PriceFilter minPrice(@jakarta.annotation.Nullable String minPrice) { - this.minPrice = minPrice; - return this; - } - - /** - * Get minPrice - * - * @return minPrice - */ - @jakarta.annotation.Nullable - public String getMinPrice() { - return minPrice; - } - - public void setMinPrice(@jakarta.annotation.Nullable String minPrice) { - this.minPrice = minPrice; - } - - public PriceFilter maxPrice(@jakarta.annotation.Nullable String maxPrice) { - this.maxPrice = maxPrice; - return this; - } - - /** - * Get maxPrice - * - * @return maxPrice - */ - @jakarta.annotation.Nullable - public String getMaxPrice() { - return maxPrice; - } - - public void setMaxPrice(@jakarta.annotation.Nullable String maxPrice) { - this.maxPrice = maxPrice; - } - - public PriceFilter tickSize(@jakarta.annotation.Nullable String tickSize) { - this.tickSize = tickSize; - return this; - } - - /** - * Get tickSize - * - * @return tickSize - */ - @jakarta.annotation.Nullable - public String getTickSize() { - return tickSize; - } - - public void setTickSize(@jakarta.annotation.Nullable String tickSize) { - this.tickSize = tickSize; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PriceFilter priceFilter = (PriceFilter) o; - return Objects.equals(this.filterType, priceFilter.filterType) - && Objects.equals(this.priceExponent, priceFilter.priceExponent) - && Objects.equals(this.minPrice, priceFilter.minPrice) - && Objects.equals(this.maxPrice, priceFilter.maxPrice) - && Objects.equals(this.tickSize, priceFilter.tickSize); - } - - @Override - public int hashCode() { - return Objects.hash(filterType, priceExponent, minPrice, maxPrice, tickSize); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PriceFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" priceExponent: ").append(toIndentedString(priceExponent)).append("\n"); - sb.append(" minPrice: ").append(toIndentedString(minPrice)).append("\n"); - sb.append(" maxPrice: ").append(toIndentedString(maxPrice)).append("\n"); - sb.append(" tickSize: ").append(toIndentedString(tickSize)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Integer priceExponentValue = getPriceExponent(); - if (priceExponentValue != null) { - String priceExponentValueAsString = priceExponentValue.toString(); - valMap.put("priceExponent", priceExponentValueAsString); - } - String minPriceValue = getMinPrice(); - if (minPriceValue != null) { - String minPriceValueAsString = minPriceValue.toString(); - valMap.put("minPrice", minPriceValueAsString); - } - String maxPriceValue = getMaxPrice(); - if (maxPriceValue != null) { - String maxPriceValueAsString = maxPriceValue.toString(); - valMap.put("maxPrice", maxPriceValueAsString); - } - String tickSizeValue = getTickSize(); - if (tickSizeValue != null) { - String tickSizeValueAsString = tickSizeValue.toString(); - valMap.put("tickSize", tickSizeValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object priceExponentValue = getPriceExponent(); - if (priceExponentValue != null) { - valMap.put("priceExponent", priceExponentValue); - } - Object minPriceValue = getMinPrice(); - if (minPriceValue != null) { - valMap.put("minPrice", minPriceValue); - } - Object maxPriceValue = getMaxPrice(); - if (maxPriceValue != null) { - valMap.put("maxPrice", maxPriceValue); - } - Object tickSizeValue = getTickSize(); - if (tickSizeValue != null) { - valMap.put("tickSize", tickSizeValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("priceExponent"); - openapiFields.add("minPrice"); - openapiFields.add("maxPrice"); - openapiFields.add("tickSize"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PriceFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PriceFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PriceFilter is not found in the empty" - + " JSON string", - PriceFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PriceFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PriceFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - if ((jsonObj.get("minPrice") != null && !jsonObj.get("minPrice").isJsonNull()) - && !jsonObj.get("minPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `minPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("minPrice").toString())); - } - if ((jsonObj.get("maxPrice") != null && !jsonObj.get("maxPrice").isJsonNull()) - && !jsonObj.get("maxPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `maxPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("maxPrice").toString())); - } - if ((jsonObj.get("tickSize") != null && !jsonObj.get("tickSize").isJsonNull()) - && !jsonObj.get("tickSize").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tickSize` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("tickSize").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PriceFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PriceFilter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PriceFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PriceFilter value) throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PriceFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PriceFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of PriceFilter - * @throws IOException if the JSON string is invalid with respect to PriceFilter - */ - public static PriceFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PriceFilter.class); - } - - /** - * Convert an instance of PriceFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/RateLimits.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/RateLimits.java deleted file mode 100644 index 716856363..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/RateLimits.java +++ /dev/null @@ -1,395 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** RateLimits */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RateLimits extends BaseDTO { - public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; - - @SerializedName(SERIALIZED_NAME_RATE_LIMIT_TYPE) - @jakarta.annotation.Nullable - private String rateLimitType; - - public static final String SERIALIZED_NAME_INTERVAL = "interval"; - - @SerializedName(SERIALIZED_NAME_INTERVAL) - @jakarta.annotation.Nullable - private String interval; - - public static final String SERIALIZED_NAME_INTERVAL_NUM = "intervalNum"; - - @SerializedName(SERIALIZED_NAME_INTERVAL_NUM) - @jakarta.annotation.Nullable - private Long intervalNum; - - public static final String SERIALIZED_NAME_LIMIT = "limit"; - - @SerializedName(SERIALIZED_NAME_LIMIT) - @jakarta.annotation.Nullable - private Long limit; - - public static final String SERIALIZED_NAME_COUNT = "count"; - - @SerializedName(SERIALIZED_NAME_COUNT) - @jakarta.annotation.Nullable - private Long count; - - public RateLimits() {} - - public RateLimits rateLimitType(@jakarta.annotation.Nullable String rateLimitType) { - this.rateLimitType = rateLimitType; - return this; - } - - /** - * Get rateLimitType - * - * @return rateLimitType - */ - @jakarta.annotation.Nullable - public String getRateLimitType() { - return rateLimitType; - } - - public void setRateLimitType(@jakarta.annotation.Nullable String rateLimitType) { - this.rateLimitType = rateLimitType; - } - - public RateLimits interval(@jakarta.annotation.Nullable String interval) { - this.interval = interval; - return this; - } - - /** - * Get interval - * - * @return interval - */ - @jakarta.annotation.Nullable - public String getInterval() { - return interval; - } - - public void setInterval(@jakarta.annotation.Nullable String interval) { - this.interval = interval; - } - - public RateLimits intervalNum(@jakarta.annotation.Nullable Long intervalNum) { - this.intervalNum = intervalNum; - return this; - } - - /** - * Get intervalNum - * - * @return intervalNum - */ - @jakarta.annotation.Nullable - public Long getIntervalNum() { - return intervalNum; - } - - public void setIntervalNum(@jakarta.annotation.Nullable Long intervalNum) { - this.intervalNum = intervalNum; - } - - public RateLimits limit(@jakarta.annotation.Nullable Long limit) { - this.limit = limit; - return this; - } - - /** - * Get limit - * - * @return limit - */ - @jakarta.annotation.Nullable - public Long getLimit() { - return limit; - } - - public void setLimit(@jakarta.annotation.Nullable Long limit) { - this.limit = limit; - } - - public RateLimits count(@jakarta.annotation.Nullable Long count) { - this.count = count; - return this; - } - - /** - * Get count - * - * @return count - */ - @jakarta.annotation.Nullable - public Long getCount() { - return count; - } - - public void setCount(@jakarta.annotation.Nullable Long count) { - this.count = count; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RateLimits rateLimits = (RateLimits) o; - return Objects.equals(this.rateLimitType, rateLimits.rateLimitType) - && Objects.equals(this.interval, rateLimits.interval) - && Objects.equals(this.intervalNum, rateLimits.intervalNum) - && Objects.equals(this.limit, rateLimits.limit) - && Objects.equals(this.count, rateLimits.count); - } - - @Override - public int hashCode() { - return Objects.hash(rateLimitType, interval, intervalNum, limit, count); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RateLimits {\n"); - sb.append(" rateLimitType: ").append(toIndentedString(rateLimitType)).append("\n"); - sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); - sb.append(" intervalNum: ").append(toIndentedString(intervalNum)).append("\n"); - sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String rateLimitTypeValue = getRateLimitType(); - if (rateLimitTypeValue != null) { - String rateLimitTypeValueAsString = rateLimitTypeValue.toString(); - valMap.put("rateLimitType", rateLimitTypeValueAsString); - } - String intervalValue = getInterval(); - if (intervalValue != null) { - String intervalValueAsString = intervalValue.toString(); - valMap.put("interval", intervalValueAsString); - } - Long intervalNumValue = getIntervalNum(); - if (intervalNumValue != null) { - String intervalNumValueAsString = intervalNumValue.toString(); - valMap.put("intervalNum", intervalNumValueAsString); - } - Long limitValue = getLimit(); - if (limitValue != null) { - String limitValueAsString = limitValue.toString(); - valMap.put("limit", limitValueAsString); - } - Long countValue = getCount(); - if (countValue != null) { - String countValueAsString = countValue.toString(); - valMap.put("count", countValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object rateLimitTypeValue = getRateLimitType(); - if (rateLimitTypeValue != null) { - valMap.put("rateLimitType", rateLimitTypeValue); - } - Object intervalValue = getInterval(); - if (intervalValue != null) { - valMap.put("interval", intervalValue); - } - Object intervalNumValue = getIntervalNum(); - if (intervalNumValue != null) { - valMap.put("intervalNum", intervalNumValue); - } - Object limitValue = getLimit(); - if (limitValue != null) { - valMap.put("limit", limitValue); - } - Object countValue = getCount(); - if (countValue != null) { - valMap.put("count", countValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("rateLimitType"); - openapiFields.add("interval"); - openapiFields.add("intervalNum"); - openapiFields.add("limit"); - openapiFields.add("count"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RateLimits - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RateLimits.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RateLimits is not found in the empty" - + " JSON string", - RateLimits.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RateLimits.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RateLimits` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("rateLimitType") != null && !jsonObj.get("rateLimitType").isJsonNull()) - && !jsonObj.get("rateLimitType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `rateLimitType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("rateLimitType").toString())); - } - if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) - && !jsonObj.get("interval").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `interval` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("interval").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RateLimits.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RateLimits' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RateLimits.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RateLimits value) throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RateLimits read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RateLimits given an JSON string - * - * @param jsonString JSON string - * @return An instance of RateLimits - * @throws IOException if the JSON string is invalid with respect to RateLimits - */ - public static RateLimits fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RateLimits.class); - } - - /** - * Convert an instance of RateLimits to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ReferencePriceRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ReferencePriceRequest.java index 5d07ee7b6..c005d3913 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ReferencePriceRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ReferencePriceRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,33 +37,57 @@ /** ReferencePriceRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ReferencePriceRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public ReferencePriceRequest() {} - public ReferencePriceRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public ReferencePriceRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public ReferencePriceRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Symbol to query * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -76,18 +100,20 @@ public boolean equals(Object o) { return false; } ReferencePriceRequest referencePriceRequest = (ReferencePriceRequest) o; - return Objects.equals(this.symbol, referencePriceRequest.symbol); + return Objects.equals(this.id, referencePriceRequest.id) + && Objects.equals(this.symbol, referencePriceRequest.symbol); } @Override public int hashCode() { - return Objects.hash(symbol); + return Objects.hash(id, symbol); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReferencePriceRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append("}"); return sb.toString(); @@ -97,6 +123,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -113,6 +144,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -143,11 +178,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -179,18 +214,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReferencePriceRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ReferencePriceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ReferencePriceResponse.java index 658a14349..8a4f05425 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ReferencePriceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ReferencePriceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** ReferencePriceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ReferencePriceResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -71,7 +71,7 @@ public ReferencePriceResponse eLowerCase(@jakarta.annotation.Nullable String eLo } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -90,7 +90,7 @@ public ReferencePriceResponse sLowerCase(@jakarta.annotation.Nullable String sLo } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -109,7 +109,7 @@ public ReferencePriceResponse rLowerCase(@jakarta.annotation.Nullable String rLo } /** - * Get rLowerCase + * Reference price (null if no reference price) * * @return rLowerCase */ @@ -128,7 +128,7 @@ public ReferencePriceResponse tLowerCase(@jakarta.annotation.Nullable Long tLowe } /** - * Get tLowerCase + * Engine timestamp when reference price was valid * * @return tLowerCase */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/RollingWindowTickerRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/RollingWindowTickerRequest.java index 15a9fefd6..adaaacecb 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/RollingWindowTickerRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/RollingWindowTickerRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -38,44 +38,68 @@ /** RollingWindowTickerRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RollingWindowTickerRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public static final String SERIALIZED_NAME_WINDOW_SIZE = "windowSize"; @SerializedName(SERIALIZED_NAME_WINDOW_SIZE) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private WindowSize windowSize; public RollingWindowTickerRequest() {} - public RollingWindowTickerRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public RollingWindowTickerRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public RollingWindowTickerRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Symbol to query * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } public RollingWindowTickerRequest windowSize( - @jakarta.annotation.Nonnull WindowSize windowSize) { + @jakarta.annotation.Nullable WindowSize windowSize) { this.windowSize = windowSize; return this; } @@ -85,14 +109,13 @@ public RollingWindowTickerRequest windowSize( * * @return windowSize */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable @Valid public WindowSize getWindowSize() { return windowSize; } - public void setWindowSize(@jakarta.annotation.Nonnull WindowSize windowSize) { + public void setWindowSize(@jakarta.annotation.Nullable WindowSize windowSize) { this.windowSize = windowSize; } @@ -105,19 +128,21 @@ public boolean equals(Object o) { return false; } RollingWindowTickerRequest rollingWindowTickerRequest = (RollingWindowTickerRequest) o; - return Objects.equals(this.symbol, rollingWindowTickerRequest.symbol) + return Objects.equals(this.id, rollingWindowTickerRequest.id) + && Objects.equals(this.symbol, rollingWindowTickerRequest.symbol) && Objects.equals(this.windowSize, rollingWindowTickerRequest.windowSize); } @Override public int hashCode() { - return Objects.hash(symbol, windowSize); + return Objects.hash(id, symbol, windowSize); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RollingWindowTickerRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" windowSize: ").append(toIndentedString(windowSize)).append("\n"); sb.append("}"); @@ -128,6 +153,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -149,6 +179,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -183,13 +217,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("windowSize"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); - openapiRequiredFields.add("windowSize"); } /** @@ -221,26 +254,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RollingWindowTickerRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" + " but got `%s`", jsonObj.get("symbol").toString())); } - // validate the required field `windowSize` - WindowSize.validateJsonElement(jsonObj.get("windowSize")); + // validate the optional field `windowSize` + if (jsonObj.get("windowSize") != null && !jsonObj.get("windowSize").isJsonNull()) { + WindowSize.validateJsonElement(jsonObj.get("windowSize")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/RollingWindowTickerResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/RollingWindowTickerResponse.java index 384b7fac1..72d65f79a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/RollingWindowTickerResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/RollingWindowTickerResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** RollingWindowTickerResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RollingWindowTickerResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -149,7 +149,7 @@ public RollingWindowTickerResponse eLowerCase(@jakarta.annotation.Nullable Strin } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -168,7 +168,7 @@ public RollingWindowTickerResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -187,7 +187,7 @@ public RollingWindowTickerResponse sLowerCase(@jakarta.annotation.Nullable Strin } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -206,7 +206,7 @@ public RollingWindowTickerResponse pLowerCase(@jakarta.annotation.Nullable Strin } /** - * Get pLowerCase + * Price change * * @return pLowerCase */ @@ -225,7 +225,7 @@ public RollingWindowTickerResponse P(@jakarta.annotation.Nullable String P) { } /** - * Get P + * Price change percent * * @return P */ @@ -244,7 +244,7 @@ public RollingWindowTickerResponse oLowerCase(@jakarta.annotation.Nullable Strin } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -263,7 +263,7 @@ public RollingWindowTickerResponse hLowerCase(@jakarta.annotation.Nullable Strin } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -282,7 +282,7 @@ public RollingWindowTickerResponse lLowerCase(@jakarta.annotation.Nullable Strin } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -301,7 +301,7 @@ public RollingWindowTickerResponse cLowerCase(@jakarta.annotation.Nullable Strin } /** - * Get cLowerCase + * Last price * * @return cLowerCase */ @@ -320,7 +320,7 @@ public RollingWindowTickerResponse wLowerCase(@jakarta.annotation.Nullable Strin } /** - * Get wLowerCase + * Weighted average price * * @return wLowerCase */ @@ -339,7 +339,7 @@ public RollingWindowTickerResponse vLowerCase(@jakarta.annotation.Nullable Strin } /** - * Get vLowerCase + * Total traded base asset volume * * @return vLowerCase */ @@ -358,7 +358,7 @@ public RollingWindowTickerResponse qLowerCase(@jakarta.annotation.Nullable Strin } /** - * Get qLowerCase + * Total traded quote asset volume * * @return qLowerCase */ @@ -377,7 +377,7 @@ public RollingWindowTickerResponse O(@jakarta.annotation.Nullable Long O) { } /** - * Get O + * Statistics open time * * @return O */ @@ -396,7 +396,7 @@ public RollingWindowTickerResponse C(@jakarta.annotation.Nullable Long C) { } /** - * Get C + * Statistics close time * * @return C */ @@ -415,7 +415,7 @@ public RollingWindowTickerResponse F(@jakarta.annotation.Nullable Long F) { } /** - * Get F + * First trade ID * * @return F */ @@ -434,7 +434,7 @@ public RollingWindowTickerResponse L(@jakarta.annotation.Nullable Long L) { } /** - * Get L + * Last trade Id * * @return L */ @@ -453,7 +453,7 @@ public RollingWindowTickerResponse nLowerCase(@jakarta.annotation.Nullable Long } /** - * Get nLowerCase + * Total number of trades * * @return nLowerCase */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/SymbolFilters.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/SymbolFilters.java deleted file mode 100644 index 64230768a..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/SymbolFilters.java +++ /dev/null @@ -1,1358 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.AbstractOpenApiSchema; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.hibernate.validator.constraints.*; - -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SymbolFilters extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(SymbolFilters.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SymbolFilters.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SymbolFilters' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterPriceFilter = - gson.getDelegateAdapter(this, TypeToken.get(PriceFilter.class)); - final TypeAdapter adapterPercentPriceFilter = - gson.getDelegateAdapter(this, TypeToken.get(PercentPriceFilter.class)); - final TypeAdapter adapterPercentPriceBySideFilter = - gson.getDelegateAdapter(this, TypeToken.get(PercentPriceBySideFilter.class)); - final TypeAdapter adapterLotSizeFilter = - gson.getDelegateAdapter(this, TypeToken.get(LotSizeFilter.class)); - final TypeAdapter adapterMinNotionalFilter = - gson.getDelegateAdapter(this, TypeToken.get(MinNotionalFilter.class)); - final TypeAdapter adapterNotionalFilter = - gson.getDelegateAdapter(this, TypeToken.get(NotionalFilter.class)); - final TypeAdapter adapterIcebergPartsFilter = - gson.getDelegateAdapter(this, TypeToken.get(IcebergPartsFilter.class)); - final TypeAdapter adapterMarketLotSizeFilter = - gson.getDelegateAdapter(this, TypeToken.get(MarketLotSizeFilter.class)); - final TypeAdapter adapterMaxNumOrdersFilter = - gson.getDelegateAdapter(this, TypeToken.get(MaxNumOrdersFilter.class)); - final TypeAdapter adapterMaxNumAlgoOrdersFilter = - gson.getDelegateAdapter(this, TypeToken.get(MaxNumAlgoOrdersFilter.class)); - final TypeAdapter adapterMaxNumIcebergOrdersFilter = - gson.getDelegateAdapter(this, TypeToken.get(MaxNumIcebergOrdersFilter.class)); - final TypeAdapter adapterMaxPositionFilter = - gson.getDelegateAdapter(this, TypeToken.get(MaxPositionFilter.class)); - final TypeAdapter adapterTrailingDeltaFilter = - gson.getDelegateAdapter(this, TypeToken.get(TrailingDeltaFilter.class)); - final TypeAdapter adapterTPlusSellFilter = - gson.getDelegateAdapter(this, TypeToken.get(TPlusSellFilter.class)); - final TypeAdapter adapterMaxNumOrderListsFilter = - gson.getDelegateAdapter(this, TypeToken.get(MaxNumOrderListsFilter.class)); - final TypeAdapter adapterMaxNumOrderAmendsFilter = - gson.getDelegateAdapter(this, TypeToken.get(MaxNumOrderAmendsFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SymbolFilters value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `PriceFilter` - if (value.getActualInstance() instanceof PriceFilter) { - JsonElement element = - adapterPriceFilter.toJsonTree( - (PriceFilter) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `PercentPriceFilter` - if (value.getActualInstance() instanceof PercentPriceFilter) { - JsonElement element = - adapterPercentPriceFilter.toJsonTree( - (PercentPriceFilter) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type - // `PercentPriceBySideFilter` - if (value.getActualInstance() instanceof PercentPriceBySideFilter) { - JsonElement element = - adapterPercentPriceBySideFilter.toJsonTree( - (PercentPriceBySideFilter) - value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `LotSizeFilter` - if (value.getActualInstance() instanceof LotSizeFilter) { - JsonElement element = - adapterLotSizeFilter.toJsonTree( - (LotSizeFilter) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `MinNotionalFilter` - if (value.getActualInstance() instanceof MinNotionalFilter) { - JsonElement element = - adapterMinNotionalFilter.toJsonTree( - (MinNotionalFilter) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `NotionalFilter` - if (value.getActualInstance() instanceof NotionalFilter) { - JsonElement element = - adapterNotionalFilter.toJsonTree( - (NotionalFilter) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `IcebergPartsFilter` - if (value.getActualInstance() instanceof IcebergPartsFilter) { - JsonElement element = - adapterIcebergPartsFilter.toJsonTree( - (IcebergPartsFilter) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `MarketLotSizeFilter` - if (value.getActualInstance() instanceof MarketLotSizeFilter) { - JsonElement element = - adapterMarketLotSizeFilter.toJsonTree( - (MarketLotSizeFilter) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `MaxNumOrdersFilter` - if (value.getActualInstance() instanceof MaxNumOrdersFilter) { - JsonElement element = - adapterMaxNumOrdersFilter.toJsonTree( - (MaxNumOrdersFilter) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `MaxNumAlgoOrdersFilter` - if (value.getActualInstance() instanceof MaxNumAlgoOrdersFilter) { - JsonElement element = - adapterMaxNumAlgoOrdersFilter.toJsonTree( - (MaxNumAlgoOrdersFilter) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type - // `MaxNumIcebergOrdersFilter` - if (value.getActualInstance() instanceof MaxNumIcebergOrdersFilter) { - JsonElement element = - adapterMaxNumIcebergOrdersFilter.toJsonTree( - (MaxNumIcebergOrdersFilter) - value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `MaxPositionFilter` - if (value.getActualInstance() instanceof MaxPositionFilter) { - JsonElement element = - adapterMaxPositionFilter.toJsonTree( - (MaxPositionFilter) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `TrailingDeltaFilter` - if (value.getActualInstance() instanceof TrailingDeltaFilter) { - JsonElement element = - adapterTrailingDeltaFilter.toJsonTree( - (TrailingDeltaFilter) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `TPlusSellFilter` - if (value.getActualInstance() instanceof TPlusSellFilter) { - JsonElement element = - adapterTPlusSellFilter.toJsonTree( - (TPlusSellFilter) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `MaxNumOrderListsFilter` - if (value.getActualInstance() instanceof MaxNumOrderListsFilter) { - JsonElement element = - adapterMaxNumOrderListsFilter.toJsonTree( - (MaxNumOrderListsFilter) value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `MaxNumOrderAmendsFilter` - if (value.getActualInstance() instanceof MaxNumOrderAmendsFilter) { - JsonElement element = - adapterMaxNumOrderAmendsFilter.toJsonTree( - (MaxNumOrderAmendsFilter) - value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas:" - + " IcebergPartsFilter, LotSizeFilter, MarketLotSizeFilter," - + " MaxNumAlgoOrdersFilter, MaxNumIcebergOrdersFilter," - + " MaxNumOrderAmendsFilter, MaxNumOrderListsFilter," - + " MaxNumOrdersFilter, MaxPositionFilter," - + " MinNotionalFilter, NotionalFilter," - + " PercentPriceBySideFilter, PercentPriceFilter," - + " PriceFilter, TPlusSellFilter, TrailingDeltaFilter"); - } - - @Override - public SymbolFilters read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - JsonObject jsonObject = jsonElement.getAsJsonObject(); - - // use discriminator value for faster oneOf lookup - SymbolFilters newSymbolFilters = new SymbolFilters(); - if (jsonObject.get("filterType") == null) { - log.log( - Level.WARNING, - "Failed to lookup discriminator value for SymbolFilters as" - + " `filterType` was not found in the payload or the" - + " payload is empty."); - } else { - // look up the discriminator value in the field `filterType` - switch (jsonObject.get("filterType").getAsString()) { - case "ICEBERG_PARTS": - deserialized = - adapterIcebergPartsFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "LOT_SIZE": - deserialized = - adapterLotSizeFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MARKET_LOT_SIZE": - deserialized = - adapterMarketLotSizeFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MAX_NUM_ALGO_ORDERS": - deserialized = - adapterMaxNumAlgoOrdersFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MAX_NUM_ICEBERG_ORDERS": - deserialized = - adapterMaxNumIcebergOrdersFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MAX_NUM_ORDERS": - deserialized = - adapterMaxNumOrdersFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MAX_NUM_ORDER_AMENDS": - deserialized = - adapterMaxNumOrderAmendsFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MAX_NUM_ORDER_LISTS": - deserialized = - adapterMaxNumOrderListsFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MAX_POSITION": - deserialized = - adapterMaxPositionFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MIN_NOTIONAL": - deserialized = - adapterMinNotionalFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "NOTIONAL": - deserialized = - adapterNotionalFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "PERCENT_PRICE": - deserialized = - adapterPercentPriceFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "PERCENT_PRICE_BY_SIDE": - deserialized = - adapterPercentPriceBySideFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "PRICE_FILTER": - deserialized = adapterPriceFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "TRAILING_DELTA": - deserialized = - adapterTrailingDeltaFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "T_PLUS_SELL": - deserialized = - adapterTPlusSellFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "IcebergPartsFilter": - deserialized = - adapterIcebergPartsFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "LotSizeFilter": - deserialized = - adapterLotSizeFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MarketLotSizeFilter": - deserialized = - adapterMarketLotSizeFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxNumAlgoOrdersFilter": - deserialized = - adapterMaxNumAlgoOrdersFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxNumIcebergOrdersFilter": - deserialized = - adapterMaxNumIcebergOrdersFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxNumOrderAmendsFilter": - deserialized = - adapterMaxNumOrderAmendsFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxNumOrderListsFilter": - deserialized = - adapterMaxNumOrderListsFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxNumOrdersFilter": - deserialized = - adapterMaxNumOrdersFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MaxPositionFilter": - deserialized = - adapterMaxPositionFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "MinNotionalFilter": - deserialized = - adapterMinNotionalFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "NotionalFilter": - deserialized = - adapterNotionalFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "PercentPriceBySideFilter": - deserialized = - adapterPercentPriceBySideFilter.fromJsonTree( - jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "PercentPriceFilter": - deserialized = - adapterPercentPriceFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "PriceFilter": - deserialized = adapterPriceFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "TPlusSellFilter": - deserialized = - adapterTPlusSellFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - case "TrailingDeltaFilter": - deserialized = - adapterTrailingDeltaFilter.fromJsonTree(jsonObject); - newSymbolFilters.setActualInstance(deserialized); - return newSymbolFilters; - default: - newSymbolFilters.setActualInstance(jsonElement.toString()); - log.log( - Level.WARNING, - String.format( - "Failed to lookup discriminator value `%s`" - + " for SymbolFilters. Possible values:" - + " ICEBERG_PARTS LOT_SIZE" - + " MARKET_LOT_SIZE MAX_NUM_ALGO_ORDERS" - + " MAX_NUM_ICEBERG_ORDERS" - + " MAX_NUM_ORDERS MAX_NUM_ORDER_AMENDS" - + " MAX_NUM_ORDER_LISTS MAX_POSITION" - + " MIN_NOTIONAL NOTIONAL PERCENT_PRICE" - + " PERCENT_PRICE_BY_SIDE PRICE_FILTER" - + " TRAILING_DELTA T_PLUS_SELL" - + " IcebergPartsFilter LotSizeFilter" - + " MarketLotSizeFilter" - + " MaxNumAlgoOrdersFilter" - + " MaxNumIcebergOrdersFilter" - + " MaxNumOrderAmendsFilter" - + " MaxNumOrderListsFilter" - + " MaxNumOrdersFilter" - + " MaxPositionFilter MinNotionalFilter" - + " NotionalFilter" - + " PercentPriceBySideFilter" - + " PercentPriceFilter PriceFilter" - + " TPlusSellFilter" - + " TrailingDeltaFilter. Falling back" - + " to String.", - jsonObject - .get("filterType") - .getAsString())); - } - } - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize PriceFilter - try { - // validate the JSON object to see if any exception is thrown - PriceFilter.validateJsonElement(jsonElement); - actualAdapter = adapterPriceFilter; - match++; - log.log(Level.FINER, "Input data matches schema 'PriceFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for PriceFilter failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'PriceFilter'", - e); - } - // deserialize PercentPriceFilter - try { - // validate the JSON object to see if any exception is thrown - PercentPriceFilter.validateJsonElement(jsonElement); - actualAdapter = adapterPercentPriceFilter; - match++; - log.log( - Level.FINER, - "Input data matches schema 'PercentPriceFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for PercentPriceFilter failed with" - + " `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'PercentPriceFilter'", - e); - } - // deserialize PercentPriceBySideFilter - try { - // validate the JSON object to see if any exception is thrown - PercentPriceBySideFilter.validateJsonElement(jsonElement); - actualAdapter = adapterPercentPriceBySideFilter; - match++; - log.log( - Level.FINER, - "Input data matches schema 'PercentPriceBySideFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for PercentPriceBySideFilter" - + " failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema" - + " 'PercentPriceBySideFilter'", - e); - } - // deserialize LotSizeFilter - try { - // validate the JSON object to see if any exception is thrown - LotSizeFilter.validateJsonElement(jsonElement); - actualAdapter = adapterLotSizeFilter; - match++; - log.log(Level.FINER, "Input data matches schema 'LotSizeFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for LotSizeFilter failed with" - + " `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'LotSizeFilter'", - e); - } - // deserialize MinNotionalFilter - try { - // validate the JSON object to see if any exception is thrown - MinNotionalFilter.validateJsonElement(jsonElement); - actualAdapter = adapterMinNotionalFilter; - match++; - log.log( - Level.FINER, - "Input data matches schema 'MinNotionalFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for MinNotionalFilter failed with" - + " `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'MinNotionalFilter'", - e); - } - // deserialize NotionalFilter - try { - // validate the JSON object to see if any exception is thrown - NotionalFilter.validateJsonElement(jsonElement); - actualAdapter = adapterNotionalFilter; - match++; - log.log(Level.FINER, "Input data matches schema 'NotionalFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for NotionalFilter failed with" - + " `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'NotionalFilter'", - e); - } - // deserialize IcebergPartsFilter - try { - // validate the JSON object to see if any exception is thrown - IcebergPartsFilter.validateJsonElement(jsonElement); - actualAdapter = adapterIcebergPartsFilter; - match++; - log.log( - Level.FINER, - "Input data matches schema 'IcebergPartsFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for IcebergPartsFilter failed with" - + " `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'IcebergPartsFilter'", - e); - } - // deserialize MarketLotSizeFilter - try { - // validate the JSON object to see if any exception is thrown - MarketLotSizeFilter.validateJsonElement(jsonElement); - actualAdapter = adapterMarketLotSizeFilter; - match++; - log.log( - Level.FINER, - "Input data matches schema 'MarketLotSizeFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for MarketLotSizeFilter failed" - + " with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'MarketLotSizeFilter'", - e); - } - // deserialize MaxNumOrdersFilter - try { - // validate the JSON object to see if any exception is thrown - MaxNumOrdersFilter.validateJsonElement(jsonElement); - actualAdapter = adapterMaxNumOrdersFilter; - match++; - log.log( - Level.FINER, - "Input data matches schema 'MaxNumOrdersFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for MaxNumOrdersFilter failed with" - + " `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'MaxNumOrdersFilter'", - e); - } - // deserialize MaxNumAlgoOrdersFilter - try { - // validate the JSON object to see if any exception is thrown - MaxNumAlgoOrdersFilter.validateJsonElement(jsonElement); - actualAdapter = adapterMaxNumAlgoOrdersFilter; - match++; - log.log( - Level.FINER, - "Input data matches schema 'MaxNumAlgoOrdersFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for MaxNumAlgoOrdersFilter failed" - + " with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'MaxNumAlgoOrdersFilter'", - e); - } - // deserialize MaxNumIcebergOrdersFilter - try { - // validate the JSON object to see if any exception is thrown - MaxNumIcebergOrdersFilter.validateJsonElement(jsonElement); - actualAdapter = adapterMaxNumIcebergOrdersFilter; - match++; - log.log( - Level.FINER, - "Input data matches schema 'MaxNumIcebergOrdersFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for MaxNumIcebergOrdersFilter" - + " failed with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema" - + " 'MaxNumIcebergOrdersFilter'", - e); - } - // deserialize MaxPositionFilter - try { - // validate the JSON object to see if any exception is thrown - MaxPositionFilter.validateJsonElement(jsonElement); - actualAdapter = adapterMaxPositionFilter; - match++; - log.log( - Level.FINER, - "Input data matches schema 'MaxPositionFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for MaxPositionFilter failed with" - + " `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'MaxPositionFilter'", - e); - } - // deserialize TrailingDeltaFilter - try { - // validate the JSON object to see if any exception is thrown - TrailingDeltaFilter.validateJsonElement(jsonElement); - actualAdapter = adapterTrailingDeltaFilter; - match++; - log.log( - Level.FINER, - "Input data matches schema 'TrailingDeltaFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for TrailingDeltaFilter failed" - + " with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'TrailingDeltaFilter'", - e); - } - // deserialize TPlusSellFilter - try { - // validate the JSON object to see if any exception is thrown - TPlusSellFilter.validateJsonElement(jsonElement); - actualAdapter = adapterTPlusSellFilter; - match++; - log.log(Level.FINER, "Input data matches schema 'TPlusSellFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for TPlusSellFilter failed with" - + " `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'TPlusSellFilter'", - e); - } - // deserialize MaxNumOrderListsFilter - try { - // validate the JSON object to see if any exception is thrown - MaxNumOrderListsFilter.validateJsonElement(jsonElement); - actualAdapter = adapterMaxNumOrderListsFilter; - match++; - log.log( - Level.FINER, - "Input data matches schema 'MaxNumOrderListsFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for MaxNumOrderListsFilter failed" - + " with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema 'MaxNumOrderListsFilter'", - e); - } - // deserialize MaxNumOrderAmendsFilter - try { - // validate the JSON object to see if any exception is thrown - MaxNumOrderAmendsFilter.validateJsonElement(jsonElement); - actualAdapter = adapterMaxNumOrderAmendsFilter; - match++; - log.log( - Level.FINER, - "Input data matches schema 'MaxNumOrderAmendsFilter'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add( - String.format( - "Deserialization for MaxNumOrderAmendsFilter failed" - + " with `%s`.", - e.getMessage())); - log.log( - Level.FINER, - "Input data does not match schema" - + " 'MaxNumOrderAmendsFilter'", - e); - } - - if (match == 1) { - SymbolFilters ret = new SymbolFilters(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException( - String.format( - "Failed deserialization for SymbolFilters: %d classes" - + " match result, expected 1. Detailed failure" - + " message for oneOf schemas: %s. JSON: %s", - match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public SymbolFilters() { - super("oneOf", Boolean.FALSE); - } - - public SymbolFilters(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("PriceFilter", PriceFilter.class); - schemas.put("PercentPriceFilter", PercentPriceFilter.class); - schemas.put("PercentPriceBySideFilter", PercentPriceBySideFilter.class); - schemas.put("LotSizeFilter", LotSizeFilter.class); - schemas.put("MinNotionalFilter", MinNotionalFilter.class); - schemas.put("NotionalFilter", NotionalFilter.class); - schemas.put("IcebergPartsFilter", IcebergPartsFilter.class); - schemas.put("MarketLotSizeFilter", MarketLotSizeFilter.class); - schemas.put("MaxNumOrdersFilter", MaxNumOrdersFilter.class); - schemas.put("MaxNumAlgoOrdersFilter", MaxNumAlgoOrdersFilter.class); - schemas.put("MaxNumIcebergOrdersFilter", MaxNumIcebergOrdersFilter.class); - schemas.put("MaxPositionFilter", MaxPositionFilter.class); - schemas.put("TrailingDeltaFilter", TrailingDeltaFilter.class); - schemas.put("TPlusSellFilter", TPlusSellFilter.class); - schemas.put("MaxNumOrderListsFilter", MaxNumOrderListsFilter.class); - schemas.put("MaxNumOrderAmendsFilter", MaxNumOrderAmendsFilter.class); - } - - @Override - public Map> getSchemas() { - return SymbolFilters.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: IcebergPartsFilter, LotSizeFilter, MarketLotSizeFilter, - * MaxNumAlgoOrdersFilter, MaxNumIcebergOrdersFilter, MaxNumOrderAmendsFilter, - * MaxNumOrderListsFilter, MaxNumOrdersFilter, MaxPositionFilter, MinNotionalFilter, - * NotionalFilter, PercentPriceBySideFilter, PercentPriceFilter, PriceFilter, TPlusSellFilter, - * TrailingDeltaFilter - * - *

It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof PriceFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof PercentPriceFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof PercentPriceBySideFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof LotSizeFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof MinNotionalFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof NotionalFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof IcebergPartsFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof MarketLotSizeFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof MaxNumOrdersFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof MaxNumAlgoOrdersFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof MaxNumIcebergOrdersFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof MaxPositionFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof TrailingDeltaFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof TPlusSellFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof MaxNumOrderListsFilter) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof MaxNumOrderAmendsFilter) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException( - "Invalid instance type. Must be IcebergPartsFilter, LotSizeFilter," - + " MarketLotSizeFilter, MaxNumAlgoOrdersFilter, MaxNumIcebergOrdersFilter," - + " MaxNumOrderAmendsFilter, MaxNumOrderListsFilter, MaxNumOrdersFilter," - + " MaxPositionFilter, MinNotionalFilter, NotionalFilter," - + " PercentPriceBySideFilter, PercentPriceFilter, PriceFilter, TPlusSellFilter," - + " TrailingDeltaFilter"); - } - - /** - * Get the actual instance, which can be the following: IcebergPartsFilter, LotSizeFilter, - * MarketLotSizeFilter, MaxNumAlgoOrdersFilter, MaxNumIcebergOrdersFilter, - * MaxNumOrderAmendsFilter, MaxNumOrderListsFilter, MaxNumOrdersFilter, MaxPositionFilter, - * MinNotionalFilter, NotionalFilter, PercentPriceBySideFilter, PercentPriceFilter, PriceFilter, - * TPlusSellFilter, TrailingDeltaFilter - * - * @return The actual instance (IcebergPartsFilter, LotSizeFilter, MarketLotSizeFilter, - * MaxNumAlgoOrdersFilter, MaxNumIcebergOrdersFilter, MaxNumOrderAmendsFilter, - * MaxNumOrderListsFilter, MaxNumOrdersFilter, MaxPositionFilter, MinNotionalFilter, - * NotionalFilter, PercentPriceBySideFilter, PercentPriceFilter, PriceFilter, - * TPlusSellFilter, TrailingDeltaFilter) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `PriceFilter`. If the actual instance is not `PriceFilter`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `PriceFilter` - * @throws ClassCastException if the instance is not `PriceFilter` - */ - public PriceFilter getPriceFilter() throws ClassCastException { - return (PriceFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `PercentPriceFilter`. If the actual instance is not - * `PercentPriceFilter`, the ClassCastException will be thrown. - * - * @return The actual instance of `PercentPriceFilter` - * @throws ClassCastException if the instance is not `PercentPriceFilter` - */ - public PercentPriceFilter getPercentPriceFilter() throws ClassCastException { - return (PercentPriceFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `PercentPriceBySideFilter`. If the actual instance is not - * `PercentPriceBySideFilter`, the ClassCastException will be thrown. - * - * @return The actual instance of `PercentPriceBySideFilter` - * @throws ClassCastException if the instance is not `PercentPriceBySideFilter` - */ - public PercentPriceBySideFilter getPercentPriceBySideFilter() throws ClassCastException { - return (PercentPriceBySideFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `LotSizeFilter`. If the actual instance is not `LotSizeFilter`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `LotSizeFilter` - * @throws ClassCastException if the instance is not `LotSizeFilter` - */ - public LotSizeFilter getLotSizeFilter() throws ClassCastException { - return (LotSizeFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `MinNotionalFilter`. If the actual instance is not - * `MinNotionalFilter`, the ClassCastException will be thrown. - * - * @return The actual instance of `MinNotionalFilter` - * @throws ClassCastException if the instance is not `MinNotionalFilter` - */ - public MinNotionalFilter getMinNotionalFilter() throws ClassCastException { - return (MinNotionalFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `NotionalFilter`. If the actual instance is not `NotionalFilter`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `NotionalFilter` - * @throws ClassCastException if the instance is not `NotionalFilter` - */ - public NotionalFilter getNotionalFilter() throws ClassCastException { - return (NotionalFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `IcebergPartsFilter`. If the actual instance is not - * `IcebergPartsFilter`, the ClassCastException will be thrown. - * - * @return The actual instance of `IcebergPartsFilter` - * @throws ClassCastException if the instance is not `IcebergPartsFilter` - */ - public IcebergPartsFilter getIcebergPartsFilter() throws ClassCastException { - return (IcebergPartsFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `MarketLotSizeFilter`. If the actual instance is not - * `MarketLotSizeFilter`, the ClassCastException will be thrown. - * - * @return The actual instance of `MarketLotSizeFilter` - * @throws ClassCastException if the instance is not `MarketLotSizeFilter` - */ - public MarketLotSizeFilter getMarketLotSizeFilter() throws ClassCastException { - return (MarketLotSizeFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `MaxNumOrdersFilter`. If the actual instance is not - * `MaxNumOrdersFilter`, the ClassCastException will be thrown. - * - * @return The actual instance of `MaxNumOrdersFilter` - * @throws ClassCastException if the instance is not `MaxNumOrdersFilter` - */ - public MaxNumOrdersFilter getMaxNumOrdersFilter() throws ClassCastException { - return (MaxNumOrdersFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `MaxNumAlgoOrdersFilter`. If the actual instance is not - * `MaxNumAlgoOrdersFilter`, the ClassCastException will be thrown. - * - * @return The actual instance of `MaxNumAlgoOrdersFilter` - * @throws ClassCastException if the instance is not `MaxNumAlgoOrdersFilter` - */ - public MaxNumAlgoOrdersFilter getMaxNumAlgoOrdersFilter() throws ClassCastException { - return (MaxNumAlgoOrdersFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `MaxNumIcebergOrdersFilter`. If the actual instance is not - * `MaxNumIcebergOrdersFilter`, the ClassCastException will be thrown. - * - * @return The actual instance of `MaxNumIcebergOrdersFilter` - * @throws ClassCastException if the instance is not `MaxNumIcebergOrdersFilter` - */ - public MaxNumIcebergOrdersFilter getMaxNumIcebergOrdersFilter() throws ClassCastException { - return (MaxNumIcebergOrdersFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `MaxPositionFilter`. If the actual instance is not - * `MaxPositionFilter`, the ClassCastException will be thrown. - * - * @return The actual instance of `MaxPositionFilter` - * @throws ClassCastException if the instance is not `MaxPositionFilter` - */ - public MaxPositionFilter getMaxPositionFilter() throws ClassCastException { - return (MaxPositionFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `TrailingDeltaFilter`. If the actual instance is not - * `TrailingDeltaFilter`, the ClassCastException will be thrown. - * - * @return The actual instance of `TrailingDeltaFilter` - * @throws ClassCastException if the instance is not `TrailingDeltaFilter` - */ - public TrailingDeltaFilter getTrailingDeltaFilter() throws ClassCastException { - return (TrailingDeltaFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `TPlusSellFilter`. If the actual instance is not - * `TPlusSellFilter`, the ClassCastException will be thrown. - * - * @return The actual instance of `TPlusSellFilter` - * @throws ClassCastException if the instance is not `TPlusSellFilter` - */ - public TPlusSellFilter getTPlusSellFilter() throws ClassCastException { - return (TPlusSellFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `MaxNumOrderListsFilter`. If the actual instance is not - * `MaxNumOrderListsFilter`, the ClassCastException will be thrown. - * - * @return The actual instance of `MaxNumOrderListsFilter` - * @throws ClassCastException if the instance is not `MaxNumOrderListsFilter` - */ - public MaxNumOrderListsFilter getMaxNumOrderListsFilter() throws ClassCastException { - return (MaxNumOrderListsFilter) super.getActualInstance(); - } - - /** - * Get the actual instance of `MaxNumOrderAmendsFilter`. If the actual instance is not - * `MaxNumOrderAmendsFilter`, the ClassCastException will be thrown. - * - * @return The actual instance of `MaxNumOrderAmendsFilter` - * @throws ClassCastException if the instance is not `MaxNumOrderAmendsFilter` - */ - public MaxNumOrderAmendsFilter getMaxNumOrderAmendsFilter() throws ClassCastException { - return (MaxNumOrderAmendsFilter) super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SymbolFilters - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with PriceFilter - try { - PriceFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for PriceFilter failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with PercentPriceFilter - try { - PercentPriceFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for PercentPriceFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - // validate the json string with PercentPriceBySideFilter - try { - PercentPriceBySideFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for PercentPriceBySideFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - // validate the json string with LotSizeFilter - try { - LotSizeFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for LotSizeFilter failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with MinNotionalFilter - try { - MinNotionalFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for MinNotionalFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - // validate the json string with NotionalFilter - try { - NotionalFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for NotionalFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - // validate the json string with IcebergPartsFilter - try { - IcebergPartsFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for IcebergPartsFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - // validate the json string with MarketLotSizeFilter - try { - MarketLotSizeFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for MarketLotSizeFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - // validate the json string with MaxNumOrdersFilter - try { - MaxNumOrdersFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for MaxNumOrdersFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - // validate the json string with MaxNumAlgoOrdersFilter - try { - MaxNumAlgoOrdersFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for MaxNumAlgoOrdersFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - // validate the json string with MaxNumIcebergOrdersFilter - try { - MaxNumIcebergOrdersFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for MaxNumIcebergOrdersFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - // validate the json string with MaxPositionFilter - try { - MaxPositionFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for MaxPositionFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - // validate the json string with TrailingDeltaFilter - try { - TrailingDeltaFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for TrailingDeltaFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - // validate the json string with TPlusSellFilter - try { - TPlusSellFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for TPlusSellFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - // validate the json string with MaxNumOrderListsFilter - try { - MaxNumOrderListsFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for MaxNumOrderListsFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - // validate the json string with MaxNumOrderAmendsFilter - try { - MaxNumOrderAmendsFilter.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add( - String.format( - "Deserialization for MaxNumOrderAmendsFilter failed with `%s`.", - e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException( - String.format( - "The JSON string is invalid for SymbolFilters with oneOf schemas:" - + " IcebergPartsFilter, LotSizeFilter, MarketLotSizeFilter," - + " MaxNumAlgoOrdersFilter, MaxNumIcebergOrdersFilter," - + " MaxNumOrderAmendsFilter, MaxNumOrderListsFilter," - + " MaxNumOrdersFilter, MaxPositionFilter, MinNotionalFilter," - + " NotionalFilter, PercentPriceBySideFilter, PercentPriceFilter," - + " PriceFilter, TPlusSellFilter, TrailingDeltaFilter. %d class(es)" - + " match the result, expected 1. Detailed failure message for" - + " oneOf schemas: %s. JSON: %s", - validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of SymbolFilters given an JSON string - * - * @param jsonString JSON string - * @return An instance of SymbolFilters - * @throws IOException if the JSON string is invalid with respect to SymbolFilters - */ - public static SymbolFilters fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SymbolFilters.class); - } - - /** - * Convert an instance of SymbolFilters to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TPlusSellFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TPlusSellFilter.java deleted file mode 100644 index c3135581e..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TPlusSellFilter.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** TPlusSellFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class TPlusSellFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_END_TIME = "endTime"; - - @SerializedName(SERIALIZED_NAME_END_TIME) - @jakarta.annotation.Nullable - private Long endTime; - - public TPlusSellFilter() {} - - public TPlusSellFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public TPlusSellFilter endTime(@jakarta.annotation.Nullable Long endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get endTime - * - * @return endTime - */ - @jakarta.annotation.Nullable - public Long getEndTime() { - return endTime; - } - - public void setEndTime(@jakarta.annotation.Nullable Long endTime) { - this.endTime = endTime; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TPlusSellFilter tplusSellFilter = (TPlusSellFilter) o; - return Objects.equals(this.filterType, tplusSellFilter.filterType) - && Objects.equals(this.endTime, tplusSellFilter.endTime); - } - - @Override - public int hashCode() { - return Objects.hash(filterType, endTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TPlusSellFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Long endTimeValue = getEndTime(); - if (endTimeValue != null) { - String endTimeValueAsString = endTimeValue.toString(); - valMap.put("endTime", endTimeValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object endTimeValue = getEndTime(); - if (endTimeValue != null) { - valMap.put("endTime", endTimeValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("endTime"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TPlusSellFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TPlusSellFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in TPlusSellFilter is not found in the" - + " empty JSON string", - TPlusSellFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TPlusSellFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `TPlusSellFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TPlusSellFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TPlusSellFilter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(TPlusSellFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, TPlusSellFilter value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TPlusSellFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of TPlusSellFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of TPlusSellFilter - * @throws IOException if the JSON string is invalid with respect to TPlusSellFilter - */ - public static TPlusSellFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TPlusSellFilter.class); - } - - /** - * Convert an instance of TPlusSellFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TickerRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TickerRequest.java index 47dbef2c0..295848c73 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TickerRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TickerRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,33 +37,57 @@ /** TickerRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public TickerRequest() {} - public TickerRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public TickerRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public TickerRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Symbol to query * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -76,18 +100,20 @@ public boolean equals(Object o) { return false; } TickerRequest tickerRequest = (TickerRequest) o; - return Objects.equals(this.symbol, tickerRequest.symbol); + return Objects.equals(this.id, tickerRequest.id) + && Objects.equals(this.symbol, tickerRequest.symbol); } @Override public int hashCode() { - return Objects.hash(symbol); + return Objects.hash(id, symbol); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TickerRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append("}"); return sb.toString(); @@ -97,6 +123,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -113,6 +144,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -143,11 +178,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -179,18 +214,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : TickerRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TickerResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TickerResponse.java index b49e99f21..2465dd476 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TickerResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TickerResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TickerResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TickerResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -185,7 +185,7 @@ public TickerResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -204,7 +204,7 @@ public TickerResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -223,7 +223,7 @@ public TickerResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -242,7 +242,7 @@ public TickerResponse pLowerCase(@jakarta.annotation.Nullable String pLowerCase) } /** - * Get pLowerCase + * Price change * * @return pLowerCase */ @@ -261,7 +261,7 @@ public TickerResponse P(@jakarta.annotation.Nullable String P) { } /** - * Get P + * Price change percent * * @return P */ @@ -280,7 +280,7 @@ public TickerResponse wLowerCase(@jakarta.annotation.Nullable String wLowerCase) } /** - * Get wLowerCase + * Weighted average price * * @return wLowerCase */ @@ -299,7 +299,7 @@ public TickerResponse xLowerCase(@jakarta.annotation.Nullable String xLowerCase) } /** - * Get xLowerCase + * First trade(F)-1 price (first trade before the 24hr rolling window) * * @return xLowerCase */ @@ -318,7 +318,7 @@ public TickerResponse cLowerCase(@jakarta.annotation.Nullable String cLowerCase) } /** - * Get cLowerCase + * Last price * * @return cLowerCase */ @@ -337,7 +337,7 @@ public TickerResponse Q(@jakarta.annotation.Nullable String Q) { } /** - * Get Q + * Last quantity * * @return Q */ @@ -356,7 +356,7 @@ public TickerResponse bLowerCase(@jakarta.annotation.Nullable String bLowerCase) } /** - * Get bLowerCase + * Best bid price * * @return bLowerCase */ @@ -375,7 +375,7 @@ public TickerResponse B(@jakarta.annotation.Nullable String B) { } /** - * Get B + * Best bid quantity * * @return B */ @@ -394,7 +394,7 @@ public TickerResponse aLowerCase(@jakarta.annotation.Nullable String aLowerCase) } /** - * Get aLowerCase + * Best ask price * * @return aLowerCase */ @@ -413,7 +413,7 @@ public TickerResponse A(@jakarta.annotation.Nullable String A) { } /** - * Get A + * Best ask quantity * * @return A */ @@ -432,7 +432,7 @@ public TickerResponse oLowerCase(@jakarta.annotation.Nullable String oLowerCase) } /** - * Get oLowerCase + * Open price * * @return oLowerCase */ @@ -451,7 +451,7 @@ public TickerResponse hLowerCase(@jakarta.annotation.Nullable String hLowerCase) } /** - * Get hLowerCase + * High price * * @return hLowerCase */ @@ -470,7 +470,7 @@ public TickerResponse lLowerCase(@jakarta.annotation.Nullable String lLowerCase) } /** - * Get lLowerCase + * Low price * * @return lLowerCase */ @@ -489,7 +489,7 @@ public TickerResponse vLowerCase(@jakarta.annotation.Nullable String vLowerCase) } /** - * Get vLowerCase + * Total traded base asset volume * * @return vLowerCase */ @@ -508,7 +508,7 @@ public TickerResponse qLowerCase(@jakarta.annotation.Nullable String qLowerCase) } /** - * Get qLowerCase + * Total traded quote asset volume * * @return qLowerCase */ @@ -527,7 +527,7 @@ public TickerResponse O(@jakarta.annotation.Nullable Long O) { } /** - * Get O + * Statistics open time * * @return O */ @@ -546,7 +546,7 @@ public TickerResponse C(@jakarta.annotation.Nullable Long C) { } /** - * Get C + * Statistics close time * * @return C */ @@ -565,7 +565,7 @@ public TickerResponse F(@jakarta.annotation.Nullable Long F) { } /** - * Get F + * First trade ID * * @return F */ @@ -584,7 +584,7 @@ public TickerResponse L(@jakarta.annotation.Nullable Long L) { } /** - * Get L + * Last trade Id * * @return L */ @@ -603,7 +603,7 @@ public TickerResponse nLowerCase(@jakarta.annotation.Nullable Long nLowerCase) { } /** - * Get nLowerCase + * Total number of trades * * @return nLowerCase */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TradeRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TradeRequest.java index 5222d25cd..07637500e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TradeRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TradeRequest.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,33 +37,57 @@ /** TradeRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradeRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable private String symbol; public TradeRequest() {} - public TradeRequest symbol(@jakarta.annotation.Nonnull String symbol) { + public TradeRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public TradeRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } /** - * Get symbol + * Symbol to query * * @return symbol */ - @jakarta.annotation.Nonnull - @NotNull + @jakarta.annotation.Nullable public String getSymbol() { return symbol; } - public void setSymbol(@jakarta.annotation.Nonnull String symbol) { + public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } @@ -76,18 +100,20 @@ public boolean equals(Object o) { return false; } TradeRequest tradeRequest = (TradeRequest) o; - return Objects.equals(this.symbol, tradeRequest.symbol); + return Objects.equals(this.id, tradeRequest.id) + && Objects.equals(this.symbol, tradeRequest.symbol); } @Override public int hashCode() { - return Objects.hash(symbol); + return Objects.hash(id, symbol); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TradeRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append("}"); return sb.toString(); @@ -97,6 +123,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -113,6 +144,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -143,11 +178,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("symbol"); } /** @@ -179,18 +214,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : TradeRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("symbol").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( "Expected the field `symbol` to be a primitive type in the JSON string" diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TradeResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TradeResponse.java index 8357a1f93..88749cd4d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TradeResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TradeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -37,7 +37,7 @@ /** TradeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradeResponse extends BaseDTO { public static final String SERIALIZED_NAME_E_LOWER_CASE = "e"; @@ -101,7 +101,7 @@ public TradeResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) } /** - * Get eLowerCase + * Event type * * @return eLowerCase */ @@ -120,7 +120,7 @@ public TradeResponse E(@jakarta.annotation.Nullable Long E) { } /** - * Get E + * Event time * * @return E */ @@ -139,7 +139,7 @@ public TradeResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) } /** - * Get sLowerCase + * Symbol * * @return sLowerCase */ @@ -158,7 +158,7 @@ public TradeResponse tLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { } /** - * Get tLowerCase + * Trade ID * * @return tLowerCase */ @@ -177,7 +177,7 @@ public TradeResponse pLowerCase(@jakarta.annotation.Nullable String pLowerCase) } /** - * Get pLowerCase + * Price * * @return pLowerCase */ @@ -196,7 +196,7 @@ public TradeResponse qLowerCase(@jakarta.annotation.Nullable String qLowerCase) } /** - * Get qLowerCase + * Quantity * * @return qLowerCase */ @@ -215,7 +215,7 @@ public TradeResponse T(@jakarta.annotation.Nullable Long T) { } /** - * Get T + * Trade time * * @return T */ @@ -234,7 +234,7 @@ public TradeResponse mLowerCase(@jakarta.annotation.Nullable Boolean mLowerCase) } /** - * Get mLowerCase + * Is the buyer the market maker? * * @return mLowerCase */ @@ -253,7 +253,7 @@ public TradeResponse M(@jakarta.annotation.Nullable Boolean M) { } /** - * Get M + * Ignore * * @return M */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TrailingDeltaFilter.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TrailingDeltaFilter.java deleted file mode 100644 index 4df9f7953..000000000 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/TrailingDeltaFilter.java +++ /dev/null @@ -1,409 +0,0 @@ -/* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.spot.websocket.stream.model; - -import com.binance.connector.client.common.websocket.dtos.BaseDTO; -import com.binance.connector.client.spot.websocket.stream.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** TrailingDeltaFilter */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class TrailingDeltaFilter extends BaseDTO { - public static final String SERIALIZED_NAME_FILTER_TYPE = "filterType"; - - @SerializedName(SERIALIZED_NAME_FILTER_TYPE) - @jakarta.annotation.Nullable - private String filterType; - - public static final String SERIALIZED_NAME_MIN_TRAILING_ABOVE_DELTA = "minTrailingAboveDelta"; - - @SerializedName(SERIALIZED_NAME_MIN_TRAILING_ABOVE_DELTA) - @jakarta.annotation.Nullable - private Long minTrailingAboveDelta; - - public static final String SERIALIZED_NAME_MAX_TRAILING_ABOVE_DELTA = "maxTrailingAboveDelta"; - - @SerializedName(SERIALIZED_NAME_MAX_TRAILING_ABOVE_DELTA) - @jakarta.annotation.Nullable - private Long maxTrailingAboveDelta; - - public static final String SERIALIZED_NAME_MIN_TRAILING_BELOW_DELTA = "minTrailingBelowDelta"; - - @SerializedName(SERIALIZED_NAME_MIN_TRAILING_BELOW_DELTA) - @jakarta.annotation.Nullable - private Long minTrailingBelowDelta; - - public static final String SERIALIZED_NAME_MAX_TRAILING_BELOW_DELTA = "maxTrailingBelowDelta"; - - @SerializedName(SERIALIZED_NAME_MAX_TRAILING_BELOW_DELTA) - @jakarta.annotation.Nullable - private Long maxTrailingBelowDelta; - - public TrailingDeltaFilter() {} - - public TrailingDeltaFilter filterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - return this; - } - - /** - * Get filterType - * - * @return filterType - */ - @jakarta.annotation.Nullable - public String getFilterType() { - return filterType; - } - - public void setFilterType(@jakarta.annotation.Nullable String filterType) { - this.filterType = filterType; - } - - public TrailingDeltaFilter minTrailingAboveDelta( - @jakarta.annotation.Nullable Long minTrailingAboveDelta) { - this.minTrailingAboveDelta = minTrailingAboveDelta; - return this; - } - - /** - * Get minTrailingAboveDelta - * - * @return minTrailingAboveDelta - */ - @jakarta.annotation.Nullable - public Long getMinTrailingAboveDelta() { - return minTrailingAboveDelta; - } - - public void setMinTrailingAboveDelta(@jakarta.annotation.Nullable Long minTrailingAboveDelta) { - this.minTrailingAboveDelta = minTrailingAboveDelta; - } - - public TrailingDeltaFilter maxTrailingAboveDelta( - @jakarta.annotation.Nullable Long maxTrailingAboveDelta) { - this.maxTrailingAboveDelta = maxTrailingAboveDelta; - return this; - } - - /** - * Get maxTrailingAboveDelta - * - * @return maxTrailingAboveDelta - */ - @jakarta.annotation.Nullable - public Long getMaxTrailingAboveDelta() { - return maxTrailingAboveDelta; - } - - public void setMaxTrailingAboveDelta(@jakarta.annotation.Nullable Long maxTrailingAboveDelta) { - this.maxTrailingAboveDelta = maxTrailingAboveDelta; - } - - public TrailingDeltaFilter minTrailingBelowDelta( - @jakarta.annotation.Nullable Long minTrailingBelowDelta) { - this.minTrailingBelowDelta = minTrailingBelowDelta; - return this; - } - - /** - * Get minTrailingBelowDelta - * - * @return minTrailingBelowDelta - */ - @jakarta.annotation.Nullable - public Long getMinTrailingBelowDelta() { - return minTrailingBelowDelta; - } - - public void setMinTrailingBelowDelta(@jakarta.annotation.Nullable Long minTrailingBelowDelta) { - this.minTrailingBelowDelta = minTrailingBelowDelta; - } - - public TrailingDeltaFilter maxTrailingBelowDelta( - @jakarta.annotation.Nullable Long maxTrailingBelowDelta) { - this.maxTrailingBelowDelta = maxTrailingBelowDelta; - return this; - } - - /** - * Get maxTrailingBelowDelta - * - * @return maxTrailingBelowDelta - */ - @jakarta.annotation.Nullable - public Long getMaxTrailingBelowDelta() { - return maxTrailingBelowDelta; - } - - public void setMaxTrailingBelowDelta(@jakarta.annotation.Nullable Long maxTrailingBelowDelta) { - this.maxTrailingBelowDelta = maxTrailingBelowDelta; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TrailingDeltaFilter trailingDeltaFilter = (TrailingDeltaFilter) o; - return Objects.equals(this.filterType, trailingDeltaFilter.filterType) - && Objects.equals( - this.minTrailingAboveDelta, trailingDeltaFilter.minTrailingAboveDelta) - && Objects.equals( - this.maxTrailingAboveDelta, trailingDeltaFilter.maxTrailingAboveDelta) - && Objects.equals( - this.minTrailingBelowDelta, trailingDeltaFilter.minTrailingBelowDelta) - && Objects.equals( - this.maxTrailingBelowDelta, trailingDeltaFilter.maxTrailingBelowDelta); - } - - @Override - public int hashCode() { - return Objects.hash( - filterType, - minTrailingAboveDelta, - maxTrailingAboveDelta, - minTrailingBelowDelta, - maxTrailingBelowDelta); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TrailingDeltaFilter {\n"); - sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); - sb.append(" minTrailingAboveDelta: ") - .append(toIndentedString(minTrailingAboveDelta)) - .append("\n"); - sb.append(" maxTrailingAboveDelta: ") - .append(toIndentedString(maxTrailingAboveDelta)) - .append("\n"); - sb.append(" minTrailingBelowDelta: ") - .append(toIndentedString(minTrailingBelowDelta)) - .append("\n"); - sb.append(" maxTrailingBelowDelta: ") - .append(toIndentedString(maxTrailingBelowDelta)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - String filterTypeValueAsString = filterTypeValue.toString(); - valMap.put("filterType", filterTypeValueAsString); - } - Long minTrailingAboveDeltaValue = getMinTrailingAboveDelta(); - if (minTrailingAboveDeltaValue != null) { - String minTrailingAboveDeltaValueAsString = minTrailingAboveDeltaValue.toString(); - valMap.put("minTrailingAboveDelta", minTrailingAboveDeltaValueAsString); - } - Long maxTrailingAboveDeltaValue = getMaxTrailingAboveDelta(); - if (maxTrailingAboveDeltaValue != null) { - String maxTrailingAboveDeltaValueAsString = maxTrailingAboveDeltaValue.toString(); - valMap.put("maxTrailingAboveDelta", maxTrailingAboveDeltaValueAsString); - } - Long minTrailingBelowDeltaValue = getMinTrailingBelowDelta(); - if (minTrailingBelowDeltaValue != null) { - String minTrailingBelowDeltaValueAsString = minTrailingBelowDeltaValue.toString(); - valMap.put("minTrailingBelowDelta", minTrailingBelowDeltaValueAsString); - } - Long maxTrailingBelowDeltaValue = getMaxTrailingBelowDelta(); - if (maxTrailingBelowDeltaValue != null) { - String maxTrailingBelowDeltaValueAsString = maxTrailingBelowDeltaValue.toString(); - valMap.put("maxTrailingBelowDelta", maxTrailingBelowDeltaValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object filterTypeValue = getFilterType(); - if (filterTypeValue != null) { - valMap.put("filterType", filterTypeValue); - } - Object minTrailingAboveDeltaValue = getMinTrailingAboveDelta(); - if (minTrailingAboveDeltaValue != null) { - valMap.put("minTrailingAboveDelta", minTrailingAboveDeltaValue); - } - Object maxTrailingAboveDeltaValue = getMaxTrailingAboveDelta(); - if (maxTrailingAboveDeltaValue != null) { - valMap.put("maxTrailingAboveDelta", maxTrailingAboveDeltaValue); - } - Object minTrailingBelowDeltaValue = getMinTrailingBelowDelta(); - if (minTrailingBelowDeltaValue != null) { - valMap.put("minTrailingBelowDelta", minTrailingBelowDeltaValue); - } - Object maxTrailingBelowDeltaValue = getMaxTrailingBelowDelta(); - if (maxTrailingBelowDeltaValue != null) { - valMap.put("maxTrailingBelowDelta", maxTrailingBelowDeltaValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("filterType"); - openapiFields.add("minTrailingAboveDelta"); - openapiFields.add("maxTrailingAboveDelta"); - openapiFields.add("minTrailingBelowDelta"); - openapiFields.add("maxTrailingBelowDelta"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TrailingDeltaFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TrailingDeltaFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in TrailingDeltaFilter is not found in" - + " the empty JSON string", - TrailingDeltaFilter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TrailingDeltaFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `TrailingDeltaFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filterType") != null && !jsonObj.get("filterType").isJsonNull()) - && !jsonObj.get("filterType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filterType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("filterType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TrailingDeltaFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TrailingDeltaFilter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(TrailingDeltaFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, TrailingDeltaFilter value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TrailingDeltaFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of TrailingDeltaFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of TrailingDeltaFilter - * @throws IOException if the JSON string is invalid with respect to TrailingDeltaFilter - */ - public static TrailingDeltaFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TrailingDeltaFilter.class); - } - - /** - * Convert an instance of TrailingDeltaFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/UpdateSpeed.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/UpdateSpeed.java new file mode 100644 index 000000000..3b80f8957 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/UpdateSpeed.java @@ -0,0 +1,71 @@ +/* + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.stream.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets updateSpeed */ +@JsonAdapter(UpdateSpeed.Adapter.class) +public enum UpdateSpeed { + UPDATE_SPEED_100ms("100ms"); + + private String value; + + UpdateSpeed(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static UpdateSpeed fromValue(String value) { + for (UpdateSpeed b : UpdateSpeed.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UpdateSpeed enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UpdateSpeed read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UpdateSpeed.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UpdateSpeed.fromValue(value); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/UserDataStreamEventsResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/UserDataStreamEventsResponse.java new file mode 100644 index 000000000..ea5ed97f4 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/UserDataStreamEventsResponse.java @@ -0,0 +1,602 @@ +/* + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.spot.websocket.stream.model; + +import com.binance.connector.client.common.AbstractOpenApiSchema; +import com.binance.connector.client.spot.websocket.stream.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.hibernate.validator.constraints.*; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class UserDataStreamEventsResponse extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(UserDataStreamEventsResponse.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserDataStreamEventsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserDataStreamEventsResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterBalanceUpdate = + gson.getDelegateAdapter(this, TypeToken.get(BalanceUpdate.class)); + final TypeAdapter adapterEventStreamTerminated = + gson.getDelegateAdapter(this, TypeToken.get(EventStreamTerminated.class)); + final TypeAdapter adapterExecutionReport = + gson.getDelegateAdapter(this, TypeToken.get(ExecutionReport.class)); + final TypeAdapter adapterExternalLockUpdate = + gson.getDelegateAdapter(this, TypeToken.get(ExternalLockUpdate.class)); + final TypeAdapter adapterListStatus = + gson.getDelegateAdapter(this, TypeToken.get(ListStatus.class)); + final TypeAdapter adapterOutboundAccountPosition = + gson.getDelegateAdapter(this, TypeToken.get(OutboundAccountPosition.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UserDataStreamEventsResponse value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `BalanceUpdate` + if (value.getActualInstance() instanceof BalanceUpdate) { + JsonElement element = + adapterBalanceUpdate.toJsonTree( + (BalanceUpdate) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `EventStreamTerminated` + if (value.getActualInstance() instanceof EventStreamTerminated) { + JsonElement element = + adapterEventStreamTerminated.toJsonTree( + (EventStreamTerminated) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `ExecutionReport` + if (value.getActualInstance() instanceof ExecutionReport) { + JsonElement element = + adapterExecutionReport.toJsonTree( + (ExecutionReport) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `ExternalLockUpdate` + if (value.getActualInstance() instanceof ExternalLockUpdate) { + JsonElement element = + adapterExternalLockUpdate.toJsonTree( + (ExternalLockUpdate) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `ListStatus` + if (value.getActualInstance() instanceof ListStatus) { + JsonElement element = + adapterListStatus.toJsonTree( + (ListStatus) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `OutboundAccountPosition` + if (value.getActualInstance() instanceof OutboundAccountPosition) { + JsonElement element = + adapterOutboundAccountPosition.toJsonTree( + (OutboundAccountPosition) + value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " BalanceUpdate, EventStreamTerminated, ExecutionReport," + + " ExternalLockUpdate, ListStatus," + + " OutboundAccountPosition"); + } + + @Override + public UserDataStreamEventsResponse read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + JsonObject jsonObject = jsonElement.getAsJsonObject(); + + // use discriminator value for faster oneOf lookup + UserDataStreamEventsResponse newUserDataStreamEventsResponse = + new UserDataStreamEventsResponse(); + if (jsonObject.get("e") == null) { + log.log( + Level.WARNING, + "Failed to lookup discriminator value for" + + " UserDataStreamEventsResponse as `e` was not found" + + " in the payload or the payload is empty."); + } else { + // look up the discriminator value in the field `e` + switch (jsonObject.get("e").getAsString()) { + case "balanceUpdate": + deserialized = + adapterBalanceUpdate.fromJsonTree(jsonObject); + newUserDataStreamEventsResponse.setActualInstance( + deserialized); + return newUserDataStreamEventsResponse; + case "eventStreamTerminated": + deserialized = + adapterEventStreamTerminated.fromJsonTree( + jsonObject); + newUserDataStreamEventsResponse.setActualInstance( + deserialized); + return newUserDataStreamEventsResponse; + case "executionReport": + deserialized = + adapterExecutionReport.fromJsonTree(jsonObject); + newUserDataStreamEventsResponse.setActualInstance( + deserialized); + return newUserDataStreamEventsResponse; + case "externalLockUpdate": + deserialized = + adapterExternalLockUpdate.fromJsonTree(jsonObject); + newUserDataStreamEventsResponse.setActualInstance( + deserialized); + return newUserDataStreamEventsResponse; + case "listStatus": + deserialized = adapterListStatus.fromJsonTree(jsonObject); + newUserDataStreamEventsResponse.setActualInstance( + deserialized); + return newUserDataStreamEventsResponse; + case "outboundAccountPosition": + deserialized = + adapterOutboundAccountPosition.fromJsonTree( + jsonObject); + newUserDataStreamEventsResponse.setActualInstance( + deserialized); + return newUserDataStreamEventsResponse; + default: + newUserDataStreamEventsResponse.setActualInstance( + jsonElement.toString()); + log.log( + Level.WARNING, + String.format( + "Failed to lookup discriminator value `%s`" + + " for UserDataStreamEventsResponse." + + " Possible values: balanceUpdate" + + " eventStreamTerminated" + + " executionReport externalLockUpdate" + + " listStatus outboundAccountPosition." + + " Falling back to String.", + jsonObject.get("e").getAsString())); + } + } + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize BalanceUpdate + try { + // validate the JSON object to see if any exception is thrown + BalanceUpdate.validateJsonElement(jsonElement); + actualAdapter = adapterBalanceUpdate; + match++; + log.log(Level.FINER, "Input data matches schema 'BalanceUpdate'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for BalanceUpdate failed with" + + " `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'BalanceUpdate'", + e); + } + // deserialize EventStreamTerminated + try { + // validate the JSON object to see if any exception is thrown + EventStreamTerminated.validateJsonElement(jsonElement); + actualAdapter = adapterEventStreamTerminated; + match++; + log.log( + Level.FINER, + "Input data matches schema 'EventStreamTerminated'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for EventStreamTerminated failed" + + " with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'EventStreamTerminated'", + e); + } + // deserialize ExecutionReport + try { + // validate the JSON object to see if any exception is thrown + ExecutionReport.validateJsonElement(jsonElement); + actualAdapter = adapterExecutionReport; + match++; + log.log(Level.FINER, "Input data matches schema 'ExecutionReport'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for ExecutionReport failed with" + + " `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'ExecutionReport'", + e); + } + // deserialize ExternalLockUpdate + try { + // validate the JSON object to see if any exception is thrown + ExternalLockUpdate.validateJsonElement(jsonElement); + actualAdapter = adapterExternalLockUpdate; + match++; + log.log( + Level.FINER, + "Input data matches schema 'ExternalLockUpdate'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for ExternalLockUpdate failed with" + + " `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'ExternalLockUpdate'", + e); + } + // deserialize ListStatus + try { + // validate the JSON object to see if any exception is thrown + ListStatus.validateJsonElement(jsonElement); + actualAdapter = adapterListStatus; + match++; + log.log(Level.FINER, "Input data matches schema 'ListStatus'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for ListStatus failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'ListStatus'", + e); + } + // deserialize OutboundAccountPosition + try { + // validate the JSON object to see if any exception is thrown + OutboundAccountPosition.validateJsonElement(jsonElement); + actualAdapter = adapterOutboundAccountPosition; + match++; + log.log( + Level.FINER, + "Input data matches schema 'OutboundAccountPosition'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for OutboundAccountPosition failed" + + " with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema" + + " 'OutboundAccountPosition'", + e); + } + + if (match == 1) { + UserDataStreamEventsResponse ret = + new UserDataStreamEventsResponse(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for" + + " UserDataStreamEventsResponse: %d classes match" + + " result, expected 1. Detailed failure message" + + " for oneOf schemas: %s. JSON: %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public UserDataStreamEventsResponse() { + super("oneOf", Boolean.FALSE); + } + + public UserDataStreamEventsResponse(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("BalanceUpdate", BalanceUpdate.class); + schemas.put("EventStreamTerminated", EventStreamTerminated.class); + schemas.put("ExecutionReport", ExecutionReport.class); + schemas.put("ExternalLockUpdate", ExternalLockUpdate.class); + schemas.put("ListStatus", ListStatus.class); + schemas.put("OutboundAccountPosition", OutboundAccountPosition.class); + } + + @Override + public Map> getSchemas() { + return UserDataStreamEventsResponse.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: BalanceUpdate, EventStreamTerminated, ExecutionReport, + * ExternalLockUpdate, ListStatus, OutboundAccountPosition + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof BalanceUpdate) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof EventStreamTerminated) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof ExecutionReport) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof ExternalLockUpdate) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof ListStatus) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof OutboundAccountPosition) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be BalanceUpdate, EventStreamTerminated," + + " ExecutionReport, ExternalLockUpdate, ListStatus, OutboundAccountPosition"); + } + + /** + * Get the actual instance, which can be the following: BalanceUpdate, EventStreamTerminated, + * ExecutionReport, ExternalLockUpdate, ListStatus, OutboundAccountPosition + * + * @return The actual instance (BalanceUpdate, EventStreamTerminated, ExecutionReport, + * ExternalLockUpdate, ListStatus, OutboundAccountPosition) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `BalanceUpdate`. If the actual instance is not `BalanceUpdate`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `BalanceUpdate` + * @throws ClassCastException if the instance is not `BalanceUpdate` + */ + public BalanceUpdate getBalanceUpdate() throws ClassCastException { + return (BalanceUpdate) super.getActualInstance(); + } + + /** + * Get the actual instance of `EventStreamTerminated`. If the actual instance is not + * `EventStreamTerminated`, the ClassCastException will be thrown. + * + * @return The actual instance of `EventStreamTerminated` + * @throws ClassCastException if the instance is not `EventStreamTerminated` + */ + public EventStreamTerminated getEventStreamTerminated() throws ClassCastException { + return (EventStreamTerminated) super.getActualInstance(); + } + + /** + * Get the actual instance of `ExecutionReport`. If the actual instance is not + * `ExecutionReport`, the ClassCastException will be thrown. + * + * @return The actual instance of `ExecutionReport` + * @throws ClassCastException if the instance is not `ExecutionReport` + */ + public ExecutionReport getExecutionReport() throws ClassCastException { + return (ExecutionReport) super.getActualInstance(); + } + + /** + * Get the actual instance of `ExternalLockUpdate`. If the actual instance is not + * `ExternalLockUpdate`, the ClassCastException will be thrown. + * + * @return The actual instance of `ExternalLockUpdate` + * @throws ClassCastException if the instance is not `ExternalLockUpdate` + */ + public ExternalLockUpdate getExternalLockUpdate() throws ClassCastException { + return (ExternalLockUpdate) super.getActualInstance(); + } + + /** + * Get the actual instance of `ListStatus`. If the actual instance is not `ListStatus`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `ListStatus` + * @throws ClassCastException if the instance is not `ListStatus` + */ + public ListStatus getListStatus() throws ClassCastException { + return (ListStatus) super.getActualInstance(); + } + + /** + * Get the actual instance of `OutboundAccountPosition`. If the actual instance is not + * `OutboundAccountPosition`, the ClassCastException will be thrown. + * + * @return The actual instance of `OutboundAccountPosition` + * @throws ClassCastException if the instance is not `OutboundAccountPosition` + */ + public OutboundAccountPosition getOutboundAccountPosition() throws ClassCastException { + return (OutboundAccountPosition) super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * UserDataStreamEventsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with BalanceUpdate + try { + BalanceUpdate.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for BalanceUpdate failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with EventStreamTerminated + try { + EventStreamTerminated.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for EventStreamTerminated failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with ExecutionReport + try { + ExecutionReport.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for ExecutionReport failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with ExternalLockUpdate + try { + ExternalLockUpdate.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for ExternalLockUpdate failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with ListStatus + try { + ListStatus.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for ListStatus failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with OutboundAccountPosition + try { + OutboundAccountPosition.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for OutboundAccountPosition failed with `%s`.", + e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for UserDataStreamEventsResponse with oneOf" + + " schemas: BalanceUpdate, EventStreamTerminated, ExecutionReport," + + " ExternalLockUpdate, ListStatus, OutboundAccountPosition. %d" + + " class(es) match the result, expected 1. Detailed failure" + + " message for oneOf schemas: %s. JSON: %s", + validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of UserDataStreamEventsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserDataStreamEventsResponse + * @throws IOException if the JSON string is invalid with respect to + * UserDataStreamEventsResponse + */ + public static UserDataStreamEventsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UserDataStreamEventsResponse.class); + } + + /** + * Convert an instance of UserDataStreamEventsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/WindowSize.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/WindowSize.java index fc6275a01..c26b49fab 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/WindowSize.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/WindowSize.java @@ -1,6 +1,6 @@ /* - * Binance Spot WebSocket Streams - * OpenAPI Specifications for the Binance Spot WebSocket Streams API documents: - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) + * Spot WebSocket Market Streams + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/AccountApiTest.java b/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/AccountApiTest.java index 8aaf9cd28..8f67a0d96 100644 --- a/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/AccountApiTest.java +++ b/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/AccountApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -31,11 +31,14 @@ import com.binance.connector.client.spot.rest.model.GetOrderListResponse; import com.binance.connector.client.spot.rest.model.GetOrderResponse; import com.binance.connector.client.spot.rest.model.MyAllocationsResponse; +import com.binance.connector.client.spot.rest.model.MyFiltersResponse; import com.binance.connector.client.spot.rest.model.MyPreventedMatchesResponse; import com.binance.connector.client.spot.rest.model.MyTradesResponse; import com.binance.connector.client.spot.rest.model.OpenOrderListResponse; +import com.binance.connector.client.spot.rest.model.OrderAmendmentsResponse; import com.binance.connector.client.spot.rest.model.RateLimitOrderResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -87,15 +90,16 @@ public void initApiClient() throws ApiException { } /** - * Query Commission Rates + * Query Commission Rates (USER_DATA) * - *

Get current account commission rates. Weight: 20 + *

Get current account commission rates. Weight(IP): 20 Security Type: USER_DATA Notes: + * **Data Source:** Database * * @throws ApiException if the Api call fails */ @Test - public void accountCommissionTest() throws ApiException, CryptoException { - String symbol = "BNBUSDT"; + public void accountCommissionTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; ApiResponse response = api.accountCommission(symbol); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -108,25 +112,30 @@ public void accountCommissionTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=BNBUSDT×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("symbol=BTCUSDT×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "0ffc690e548c601c0f1fac6208ae531f94448e66a4126acd33db21b4779d0f72", - actualRequest.url().queryParameter("signature")); + "d326342fddb7d8574fa355101500c78ab918b5af9854b62a591963c69dc618a3", actualRequest.url().queryParameter("signature")); assertEquals("/api/v3/account/commission", actualRequest.url().encodedPath()); } /** - * Account information + * Query all Order lists (USER_DATA) * - *

Get current account information. Weight: 20 + *

Retrieves all order lists based on provided optional parameters. Note that the time + * between `startTime` and `endTime` can't be longer than 24 hours. + * Weight(IP): 20 Security Type: USER_DATA Notes: **Data Source:** Database * * @throws ApiException if the Api call fails */ @Test - public void getAccountTest() throws ApiException, CryptoException { - Boolean omitZeroBalances = false; + public void allOrderListTest() throws ApiException, CryptoException, IOException { + Long fromId = 1L; + Long startTime = 1735693200000L; + Long endTime = 1735693200000L; + Integer limit = 1; Double recvWindow = 5000d; - ApiResponse response = api.getAccount(omitZeroBalances, recvWindow); + ApiResponse response = + api.allOrderList(fromId, startTime, endTime, limit, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -138,34 +147,34 @@ public void getAccountTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "omitZeroBalances=false&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "80eb12d82de3d921dc6a83f98a28a092b813f6946f7ce7c57c0540c86607a60c", - actualRequest.url().queryParameter("signature")); - assertEquals("/api/v3/account", actualRequest.url().encodedPath()); + assertEquals("fromId=1&startTime=1735693200000&endTime=1735693200000&limit=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("b0d3d5ea733b29e5bac3bcf00e2abfa9f0676abb83de80942dd3f1b871b491e7", actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/allOrderList", actualRequest.url().encodedPath()); } /** - * Query Allocations + * All orders (USER_DATA) * - *

Retrieves allocations resulting from SOR order placement. Weight: 20 + *

Get all account orders; active, canceled, or filled. Weight(IP): 20 Security Type: + * USER_DATA Notes: **Data Source:** Database - If `orderId` is set, it will get + * orders >= that `orderId`. Otherwise most recent orders are returned. - For + * some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is + * not available at this time. - If `startTime` and/or `endTime` provided, + * `orderId` is not required. - The time between `startTime` and + * `endTime` can't be longer than 24 hours. * * @throws ApiException if the Api call fails */ @Test - public void myAllocationsTest() throws ApiException, CryptoException { - String symbol = "BNBUSDT"; + public void allOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "LTCBTC"; + Long orderId = 1L; Long startTime = 1735693200000L; Long endTime = 1735693200000L; - Integer fromAllocationId = 1; - Integer limit = 500; - Long orderId = 1L; + Integer limit = 1; Double recvWindow = 5000d; - ApiResponse response = - api.myAllocations( - symbol, startTime, endTime, fromAllocationId, limit, orderId, recvWindow); + ApiResponse response = + api.allOrders(symbol, orderId, startTime, endTime, limit, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -177,39 +186,24 @@ public void myAllocationsTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "symbol=BNBUSDT&startTime=1735693200000&endTime=1735693200000&fromAllocationId=1&limit=500&orderId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "e6d3c40d9c6d8b9c03d0a66f5f52d4518182d2e02b8a6471ca535a5478cab087", - actualRequest.url().queryParameter("signature")); - assertEquals("/api/v3/myAllocations", actualRequest.url().encodedPath()); + assertEquals("symbol=LTCBTC&orderId=1&startTime=1735693200000&endTime=1735693200000&limit=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("87a06f10e7f7606cbf5e45fb676a3e7c8a96d82c7d188ded8f21066621c235de", actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/allOrders", actualRequest.url().encodedPath()); } /** - * Query Prevented Matches + * Account information (USER_DATA) * - *

Displays the list of orders that were expired due to STP. These are the combinations - * supported: * `symbol` + `preventedMatchId` * `symbol` + - * `orderId` * `symbol` + `orderId` + - * `fromPreventedMatchId` (`limit` will default to 500) * `symbol` - * + `orderId` + `fromPreventedMatchId` + `limit` Weight: Case | - * Weight ---- | ----- If `symbol` is invalid | 2 Querying by - * `preventedMatchId` | 2 Querying by `orderId` | 20 + *

Get current account information. Weight(IP): 20 Security Type: USER_DATA Notes: **Data + * Source:** Memory => Database * * @throws ApiException if the Api call fails */ @Test - public void myPreventedMatchesTest() throws ApiException, CryptoException { - String symbol = "BNBUSDT"; - Long preventedMatchId = 1L; - Long orderId = 1L; - Long fromPreventedMatchId = 1L; - Integer limit = 500; + public void getAccountTest() throws ApiException, CryptoException, IOException { + Boolean omitZeroBalances = false; Double recvWindow = 5000d; - ApiResponse response = - api.myPreventedMatches( - symbol, preventedMatchId, orderId, fromPreventedMatchId, limit, recvWindow); + ApiResponse response = api.getAccount(omitZeroBalances, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -221,33 +215,26 @@ public void myPreventedMatchesTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "symbol=BNBUSDT&preventedMatchId=1&orderId=1&fromPreventedMatchId=1&limit=500&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "dba5c1473a22f87a0350c80d3754ff03a7e67b8917be6f0a98959cc4c9263b5d", - actualRequest.url().queryParameter("signature")); - assertEquals("/api/v3/myPreventedMatches", actualRequest.url().encodedPath()); + assertEquals("omitZeroBalances=false&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("80eb12d82de3d921dc6a83f98a28a092b813f6946f7ce7c57c0540c86607a60c", actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/account", actualRequest.url().encodedPath()); } /** - * Account trade list + * Current open orders (USER_DATA) * - *

Get trades for a specific account and symbol. Weight: 20 + *

Get all open orders on a symbol. **Careful** when accessing this with no symbol. Weight: 6 + * for a single symbol; 80 when the symbol parameter is omitted Security Type: USER_DATA Notes: + * **Data Source:** Memory => Database - If the symbol is not sent, orders for all + * symbols will be returned in an array. * * @throws ApiException if the Api call fails */ @Test - public void myTradesTest() throws ApiException, CryptoException { - String symbol = "BNBUSDT"; - Long orderId = 1L; - Long startTime = 1735693200000L; - Long endTime = 1735693200000L; - Long fromId = 1L; - Integer limit = 500; + public void getOpenOrdersTest() throws ApiException, CryptoException, IOException { + String symbol = "LTCBTC"; Double recvWindow = 5000d; - ApiResponse response = - api.myTrades(symbol, orderId, startTime, endTime, fromId, limit, recvWindow); + ApiResponse response = api.getOpenOrders(symbol, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -259,26 +246,33 @@ public void myTradesTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "symbol=BNBUSDT&orderId=1&startTime=1735693200000&endTime=1735693200000&fromId=1&limit=500&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "87114efcf71607d26ebed7c7ffab3ea9497a74121ac06151116831a22b8c8263", - actualRequest.url().queryParameter("signature")); - assertEquals("/api/v3/myTrades", actualRequest.url().encodedPath()); + assertEquals("symbol=LTCBTC&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("cdf064a4d97e1bba79b07d4390db761f82d1df0ee1ca8fe41b13d97fabecbc6e", actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/openOrders", actualRequest.url().encodedPath()); } /** - * Query Unfilled Order Count + * Query order (USER_DATA) * - *

Displays the user's unfilled order count for all intervals. Weight: 40 + *

Check an order's status. Weight(IP): 4 Security Type: USER_DATA Notes: **Data + * Source:** Memory => Database - Either `orderId` or + * `origClientOrderId` must be sent. - If both `orderId` and + * `origClientOrderId` are provided, the `orderId` is searched first, then + * the `origClientOrderId` from that result is checked against that order. If both + * conditions are not met the request will be rejected. - For some historical orders + * `cummulativeQuoteQty` will be < 0, meaning the data is not available at this + * time. * * @throws ApiException if the Api call fails */ @Test - public void rateLimitOrderTest() throws ApiException, CryptoException { + public void getOrderTest() throws ApiException, CryptoException, IOException { + String symbol = "LTCBTC"; + Long orderId = 1L; + String origClientOrderId = "myOrder1"; Double recvWindow = 5000d; - ApiResponse response = api.rateLimitOrder(recvWindow); + ApiResponse response = + api.getOrder(symbol, orderId, origClientOrderId, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -290,31 +284,26 @@ public void rateLimitOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); - assertEquals("/api/v3/rateLimit/order", actualRequest.url().encodedPath()); + assertEquals("symbol=LTCBTC&orderId=1&origClientOrderId=myOrder1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("5f1949c59361dd39e56a028ca51f8a1dc65fa1b26fb3405d698193fc177644ec", actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/order", actualRequest.url().encodedPath()); } /** - * Query all Order lists + * Query Order list (USER_DATA) * - *

Retrieves all order lists based on provided optional parameters. Note that the time - * between `startTime` and `endTime` can't be longer than 24 hours. - * Weight: 20 + *

Retrieves a specific order list based on provided optional parameters. Weight(IP): 4 + * Security Type: USER_DATA Notes: **Data Source:** Database * * @throws ApiException if the Api call fails */ @Test - public void allOrderListTest() throws ApiException, CryptoException { - Long fromId = 1L; - Long startTime = 1735693200000L; - Long endTime = 1735693200000L; - Integer limit = 500; + public void getOrderListTest() throws ApiException, CryptoException, IOException { + Long orderListId = 27L; + String origClientOrderId = "1"; Double recvWindow = 5000d; - ApiResponse response = - api.allOrderList(fromId, startTime, endTime, limit, recvWindow); + ApiResponse response = + api.getOrderList(orderListId, origClientOrderId, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -326,32 +315,41 @@ public void allOrderListTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "fromId=1&startTime=1735693200000&endTime=1735693200000&limit=500&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "3f96b521ab45f68dea5e3b363c355bdd37bc2834d4ec7457ac7990d2d75178c2", - actualRequest.url().queryParameter("signature")); - assertEquals("/api/v3/allOrderList", actualRequest.url().encodedPath()); + assertEquals("orderListId=27&origClientOrderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("9ed59e7e6dee62a3db5f16bff4d8ebbeccc616fa5edad9eca251d0ce04f00b94", actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/orderList", actualRequest.url().encodedPath()); } /** - * All orders + * Query Allocations (USER_DATA) * - *

Get all account orders; active, canceled, or filled. Weight: 20 + *

Retrieves allocations resulting from SOR order placement. Weight(IP): 20 Security Type: + * USER_DATA Notes: **Data Source:** Database\" Supported parameter combinations: + * Parameters | Response | ------------------------------------------- | -------- | + * `symbol` | allocations from oldest to newest | `symbol` + + * `startTime` | oldest allocations since `startTime` | `symbol` + + * `endTime` | newest allocations until `endTime` | `symbol` + + * `startTime` + `endTime` | allocations within the time range | + * `symbol` + `fromAllocationId` | allocations by allocation ID | + * `symbol` + `orderId` | allocations related to an order starting with + * oldest | `symbol` + `orderId` + `fromAllocationId` | + * allocations related to an order by allocation ID | **Note:** The time between + * `startTime` and `endTime` can't be longer than 24 hours. * * @throws ApiException if the Api call fails */ @Test - public void allOrdersTest() throws ApiException, CryptoException { - String symbol = "BNBUSDT"; - Long orderId = 1L; + public void myAllocationsTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; Long startTime = 1735693200000L; Long endTime = 1735693200000L; - Integer limit = 500; + Integer fromAllocationId = 0; + Integer limit = 1; + Long orderId = 1L; Double recvWindow = 5000d; - ApiResponse response = - api.allOrders(symbol, orderId, startTime, endTime, limit, recvWindow); + ApiResponse response = + api.myAllocations( + symbol, startTime, endTime, fromAllocationId, limit, orderId, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -363,28 +361,25 @@ public void allOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "symbol=BNBUSDT&orderId=1&startTime=1735693200000&endTime=1735693200000&limit=500&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "7f857866c2bd2678db911c5a1084412d274ea5c0dca24c8cca5c97ba0bc38ea6", - actualRequest.url().queryParameter("signature")); - assertEquals("/api/v3/allOrders", actualRequest.url().encodedPath()); + assertEquals("symbol=BTCUSDT&startTime=1735693200000&endTime=1735693200000&fromAllocationId=0&limit=1&orderId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("fc98097d479832d67c4b52869bf1013fc93ce57965f363d1a094abc20e9f34a9", actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/myAllocations", actualRequest.url().encodedPath()); } /** - * Current open orders + * Query relevant filters (USER_DATA) * - *

Get all open orders on a symbol. **Careful** when accessing this with no symbol. Weight: 6 - * for a single symbol; **80** when the symbol parameter is omitted + *

Retrieves the list of filters relevant to an account on a given symbol. This is the only + * endpoint that shows if an account has `MAX_ASSET` filters applied to it. + * Weight(IP): 40 Security Type: USER_DATA Notes: **Data Source:** Memory * * @throws ApiException if the Api call fails */ @Test - public void getOpenOrdersTest() throws ApiException, CryptoException { + public void myFiltersTest() throws ApiException, CryptoException, IOException { String symbol = "BNBUSDT"; Double recvWindow = 5000d; - ApiResponse response = api.getOpenOrders(symbol, recvWindow); + ApiResponse response = api.myFilters(symbol, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -396,30 +391,36 @@ public void getOpenOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "symbol=BNBUSDT&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "1c2ec70499498e5c5d2f4e98a7e24c74f2801642a8c3743d289dbfc1ca00c7a8", - actualRequest.url().queryParameter("signature")); - assertEquals("/api/v3/openOrders", actualRequest.url().encodedPath()); + assertEquals("symbol=BNBUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("1c2ec70499498e5c5d2f4e98a7e24c74f2801642a8c3743d289dbfc1ca00c7a8", actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/myFilters", actualRequest.url().encodedPath()); } /** - * Query order + * Query Prevented Matches (USER_DATA) * - *

Check an order's status. Weight: 4 + *

Displays the list of orders that were expired due to STP. These are the combinations + * supported: - `symbol` + `preventedMatchId` - `symbol` + + * `orderId` - `symbol` + `orderId` + + * `fromPreventedMatchId` (`limit` will default to 500) - `symbol` + * + `orderId` + `fromPreventedMatchId` + `limit` Weight: Case | + * Weight ---- | ----- If `symbol` is invalid | 2 Querying by + * `preventedMatchId` | 2 Querying by `orderId` | 20 Security Type: + * USER_DATA Notes: **Data Source:** Database * * @throws ApiException if the Api call fails */ @Test - public void getOrderTest() throws ApiException, CryptoException { - String symbol = "BNBUSDT"; + public void myPreventedMatchesTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long preventedMatchId = 1L; Long orderId = 1L; - String origClientOrderId = ""; + Long fromPreventedMatchId = 1L; + Integer limit = 1; Double recvWindow = 5000d; - ApiResponse response = - api.getOrder(symbol, orderId, origClientOrderId, recvWindow); + ApiResponse response = + api.myPreventedMatches( + symbol, preventedMatchId, orderId, fromPreventedMatchId, limit, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -431,29 +432,39 @@ public void getOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BTCUSDT&preventedMatchId=1&orderId=1&fromPreventedMatchId=1&limit=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=BNBUSDT&orderId=1&origClientOrderId=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "7df47f2422bd464ff42ac1a57d75c3296c3fd7867f50fd803ad466992b26ef0c", - actualRequest.url().queryParameter("signature")); - assertEquals("/api/v3/order", actualRequest.url().encodedPath()); + "7eba6eafa1302197c03ccea24061b3f8c23f72f2cedf275cedc419eb64deb959", actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/myPreventedMatches", actualRequest.url().encodedPath()); } /** - * Query Order list + * Account trade list (USER_DATA) * - *

Retrieves a specific order list based on provided optional parameters. Weight: 4 + *

Get trades for a specific account and symbol. Weight: Condition| Weight| ---| --- |Without + * orderId|20| |With orderId|5| Security Type: USER_DATA Notes: **Data Source:** Memory + * => Database **Notes:**: - If `fromId` is set, it will get trades >= + * that `fromId`. Otherwise most recent trades are returned. - The time between + * `startTime` and `endTime` can't be longer than 24 hours. - These are + * the supported combinations of all parameters: - `symbol` - `symbol` + + * `orderId` - `symbol` + `startTime` - `symbol` + + * `endTime` - `symbol` + `fromId` - `symbol` + + * `startTime` + `endTime` - `symbol`+ `orderId` + + * `fromId` * * @throws ApiException if the Api call fails */ @Test - public void getOrderListTest() throws ApiException, CryptoException { - Long orderListId = 1L; - String origClientOrderId = ""; + public void myTradesTest() throws ApiException, CryptoException, IOException { + String symbol = "BNBBTC"; + Long orderId = 100234L; + Long startTime = 1735693200000L; + Long endTime = 1735693200000L; + Long fromId = 1L; + Integer limit = 1; Double recvWindow = 5000d; - ApiResponse response = - api.getOrderList(orderListId, origClientOrderId, recvWindow); + ApiResponse response = + api.myTrades(symbol, orderId, startTime, endTime, fromId, limit, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -465,24 +476,21 @@ public void getOrderListTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "orderListId=1&origClientOrderId=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "6ec9556d1bd19774835e1c8987ff1d260c57f711747a39d4ea50c5e10b099d72", - actualRequest.url().queryParameter("signature")); - assertEquals("/api/v3/orderList", actualRequest.url().encodedPath()); + assertEquals("symbol=BNBBTC&orderId=100234&startTime=1735693200000&endTime=1735693200000&fromId=1&limit=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("a86ed34e96642e901be0dd0ac2506285446d4a1989621bf0ec51abd7e7d00dd4", actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/myTrades", actualRequest.url().encodedPath()); } /** - * Query Open Order lists + * Query Open Order lists (USER_DATA) * - *

Weight: 6 + *

Query Open Order lists Weight(IP): 6 Security Type: USER_DATA Notes: **Data Source:** + * Memory -> Database * * @throws ApiException if the Api call fails */ @Test - public void openOrderListTest() throws ApiException, CryptoException { + public void openOrderListTest() throws ApiException, CryptoException, IOException { Double recvWindow = 5000d; ApiResponse response = api.openOrderList(recvWindow); @@ -497,9 +505,69 @@ public void openOrderListTest() throws ApiException, CryptoException { Request actualRequest = captorValue.request(); assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); + assertEquals("2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); assertEquals("/api/v3/openOrderList", actualRequest.url().encodedPath()); } + + /** + * Query Order Amendments (USER_DATA) + * + *

Queries all amendments of a single order. Weight(IP): 4 Security Type: USER_DATA Notes: + * **Data Source:** Database + * + * @throws ApiException if the Api call fails + */ + @Test + public void orderAmendmentsTest() throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long orderId = 9L; + Long fromExecutionId = 22L; + Long limit = 1L; + Double recvWindow = 5000d; + ApiResponse response = + api.orderAmendments(symbol, orderId, fromExecutionId, limit, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("symbol=BTCUSDT&orderId=9&fromExecutionId=22&limit=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "956a02bd5b19bdf136f678e9376e6fe3dbb433ed31a3966b1c466353e24156c8", actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/order/amendments", actualRequest.url().encodedPath()); + } + + /** + * Query Unfilled Order Count (USER_DATA) + * + *

Displays the user's unfilled order count for all intervals. Weight(IP): 40 Security + * Type: USER_DATA Notes: **Data Source:** Memory + * + * @throws ApiException if the Api call fails + */ + @Test + public void rateLimitOrderTest() throws ApiException, CryptoException, IOException { + Double recvWindow = 5000d; + ApiResponse response = api.rateLimitOrder(recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/rateLimit/order", actualRequest.url().encodedPath()); + } } diff --git a/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/GeneralApiTest.java b/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/GeneralApiTest.java index da8e8af4a..a53802c81 100644 --- a/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/GeneralApiTest.java +++ b/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/GeneralApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -24,11 +24,13 @@ import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; import com.binance.connector.client.spot.rest.model.ExchangeInfoResponse; +import com.binance.connector.client.spot.rest.model.ExecutionRulesResponse; import com.binance.connector.client.spot.rest.model.Permissions; import com.binance.connector.client.spot.rest.model.SymbolStatus; import com.binance.connector.client.spot.rest.model.Symbols; import com.binance.connector.client.spot.rest.model.TimeResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -82,16 +84,35 @@ public void initApiClient() throws ApiException { /** * Exchange information * - *

Current exchange trading rules and symbol information Weight: 20 + *

Current exchange trading rules and symbol information Weight(IP): 20 Security Type: NONE + * Notes: **Data Source:** Memory **Notes:** * If the value provided to `symbol` or + * `symbols` do not exist, the endpoint will throw an error saying the symbol is + * invalid. * All parameters are optional. * `permissions` can support single or + * multiple values (e.g. `SPOT`, + * `[\"MARGIN\",\"LEVERAGED\"]`). This cannot be used in + * combination with `symbol` or `symbols`. * If `permissions` + * parameter not provided, all symbols that have either `SPOT`, `MARGIN`, or + * `LEVERAGED` permission will be exposed. * To display symbols with any permission + * you need to specify them explicitly in `permissions`: (e.g. + * `[\"SPOT\",\"MARGIN\",...]`.). See Account and Symbol + * Permissions for the full list. **Examples of Symbol Permissions Interpretation from the + * Response:** * `[[\"A\",\"B\"]]` means you may place an order if + * your account has either permission \"A\" **or** permission \"B\". * + * `[[\"A\"],[\"B\"]]` means you can place an order if your + * account has permission \"A\" **and** permission \"B\". * + * `[[\"A\"],[\"B\",\"C\"]]` means you can place an + * order if your account has permission \"A\" **and** permission \"B\" or + * permission \"C\". (Inclusive or is applied here, not exclusive or, so your account + * may have both permission \"B\" and permission \"C\".) * * @throws ApiException if the Api call fails */ @Test - public void exchangeInfoTest() throws ApiException, CryptoException { - String symbol = "BNBUSDT"; - Symbols symbols = null; - Permissions permissions = null; - Boolean showPermissionSets = true; + public void exchangeInfoTest() throws ApiException, CryptoException, IOException { + String symbol = "ETHBTC"; + Symbols symbols = Symbols.fromJson("[\"BTCUSDT\",\"BNBUSDT\"]"); + Permissions permissions = Permissions.fromJson("[\"SPOT\"]"); + Boolean showPermissionSets = false; SymbolStatus symbolStatus = SymbolStatus.TRADING; ApiResponse response = api.exchangeInfo(symbol, symbols, permissions, showPermissionSets, symbolStatus); @@ -107,15 +128,44 @@ public void exchangeInfoTest() throws ApiException, CryptoException { assertEquals("/api/v3/exchangeInfo", actualRequest.url().encodedPath()); } + /** + * Query Execution Rules + * + *

Query execution rules for symbols. Weight: Parameter | Weight --- | --- `symbol` + * | 2 `symbols` | 2 for each `symbol`, capped at a max of 40 + * `symbolStatus` | 40 None | 40 Security Type: NONE Notes: **Data Source:** Memory + * **Note:**: No combination of multiple parameters is allowed. + * + * @throws ApiException if the Api call fails + */ + @Test + public void executionRulesTest() throws ApiException, CryptoException, IOException { + String symbol = "BAZUSD"; + Symbols symbols = Symbols.fromJson("[\"BTCUSDT\",\"BNBUSDT\"]"); + SymbolStatus symbolStatus = SymbolStatus.TRADING; + ApiResponse response = + api.executionRules(symbol, symbols, symbolStatus); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/executionRules", actualRequest.url().encodedPath()); + } + /** * Test connectivity * - *

Test connectivity to the Rest API. Weight: 1 + *

Test connectivity to the Rest API. Weight(IP): 1 Security Type: NONE * * @throws ApiException if the Api call fails */ @Test - public void pingTest() throws ApiException, CryptoException { + public void pingTest() throws ApiException, CryptoException, IOException { api.ping(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -131,12 +181,13 @@ public void pingTest() throws ApiException, CryptoException { /** * Check server time * - *

Test connectivity to the Rest API and get the current server time. Weight: 1 + *

Test connectivity to the Rest API and get the current server time. Weight(IP): 1 Security + * Type: NONE * * @throws ApiException if the Api call fails */ @Test - public void timeTest() throws ApiException, CryptoException { + public void timeTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.time(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); diff --git a/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/MarketApiTest.java b/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/MarketApiTest.java index f9f8b4ae7..40e93aa00 100644 --- a/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/MarketApiTest.java +++ b/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/MarketApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -27,9 +27,12 @@ import com.binance.connector.client.spot.rest.model.AvgPriceResponse; import com.binance.connector.client.spot.rest.model.DepthResponse; import com.binance.connector.client.spot.rest.model.GetTradesResponse; +import com.binance.connector.client.spot.rest.model.HistoricalBlockTradesResponse; import com.binance.connector.client.spot.rest.model.HistoricalTradesResponse; import com.binance.connector.client.spot.rest.model.Interval; import com.binance.connector.client.spot.rest.model.KlinesResponse; +import com.binance.connector.client.spot.rest.model.ReferencePriceCalculationResponse; +import com.binance.connector.client.spot.rest.model.ReferencePriceResponse; import com.binance.connector.client.spot.rest.model.SymbolStatus; import com.binance.connector.client.spot.rest.model.Symbols; import com.binance.connector.client.spot.rest.model.Ticker24hrResponse; @@ -41,6 +44,7 @@ import com.binance.connector.client.spot.rest.model.UiKlinesResponse; import com.binance.connector.client.spot.rest.model.WindowSize; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -95,17 +99,19 @@ public void initApiClient() throws ApiException { * Compressed/Aggregate trades list * *

Get compressed, aggregate trades. Trades that fill at the time, from the same taker order, - * with the same price will have the quantity aggregated. Weight: 4 + * with the same price will have the quantity aggregated. Weight(IP): 4 Security Type: NONE + * Notes: **Data Source:** Database - If fromId, startTime, and endTime are not sent, the most + * recent aggregate trades will be returned. * * @throws ApiException if the Api call fails */ @Test - public void aggTradesTest() throws ApiException, CryptoException { + public void aggTradesTest() throws ApiException, CryptoException, IOException { String symbol = "BNBUSDT"; Long fromId = 1L; Long startTime = 1735693200000L; Long endTime = 1735693200000L; - Integer limit = 500; + Integer limit = 1; ApiResponse response = api.aggTrades(symbol, fromId, startTime, endTime, limit); @@ -123,12 +129,13 @@ public void aggTradesTest() throws ApiException, CryptoException { /** * Current average price * - *

Current average price for a symbol. Weight: 2 + *

Current average price for a symbol. Weight(IP): 2 Security Type: NONE Notes: **Data + * Source:** Memory * * @throws ApiException if the Api call fails */ @Test - public void avgPriceTest() throws ApiException, CryptoException { + public void avgPriceTest() throws ApiException, CryptoException, IOException { String symbol = "BNBUSDT"; ApiResponse response = api.avgPrice(symbol); @@ -146,16 +153,17 @@ public void avgPriceTest() throws ApiException, CryptoException { /** * Order book * - *

Weight: Adjusted based on the limit: |Limit|Request Weight ------|------- 1-100| 5 - * 101-500| 25 501-1000| 50 1001-5000| 250 + *

Order book Weight: Adjusted based on the limit: |Limit|Request Weight ------|------- + * 1-100| 5 101-500| 25 501-1000| 50 1001-5000| 250 Security Type: NONE Notes: **Data Source:** + * Memory * * @throws ApiException if the Api call fails */ @Test - public void depthTest() throws ApiException, CryptoException { + public void depthTest() throws ApiException, CryptoException, IOException { String symbol = "BNBUSDT"; - Integer limit = 500; - SymbolStatus symbolStatus = null; + Integer limit = 1; + SymbolStatus symbolStatus = SymbolStatus.TRADING; ApiResponse response = api.depth(symbol, limit, symbolStatus); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -172,14 +180,14 @@ public void depthTest() throws ApiException, CryptoException { /** * Recent trades list * - *

Get recent trades. Weight: 25 + *

Get recent trades. Weight(IP): 25 Security Type: NONE Notes: **Data Source:** Memory * * @throws ApiException if the Api call fails */ @Test - public void getTradesTest() throws ApiException, CryptoException { + public void getTradesTest() throws ApiException, CryptoException, IOException { String symbol = "BNBUSDT"; - Integer limit = 500; + Integer limit = 1; ApiResponse response = api.getTrades(symbol, limit); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -193,17 +201,45 @@ public void getTradesTest() throws ApiException, CryptoException { assertEquals("/api/v3/trades", actualRequest.url().encodedPath()); } + /** + * Historical Block Trades (MARKET_DATA) + * + *

Get block trades. Weight(IP): 25 Security Type: MARKET_DATA Notes: - Data Source: Database + * + * @throws ApiException if the Api call fails + */ + @Test + public void historicalBlockTradesTest() throws ApiException, CryptoException, IOException { + String symbol = "BNBBTC"; + Long fromId = 582L; + Long limit = 500L; + ApiResponse response = + api.historicalBlockTrades(symbol, fromId, limit); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + null, + actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/historicalBlockTrades", actualRequest.url().encodedPath()); + } + /** * Old trade lookup * - *

Get older trades. Weight: 25 + *

Get older trades. Weight(IP): 25 Security Type: NONE Notes: **Data Source:** Database * * @throws ApiException if the Api call fails */ @Test - public void historicalTradesTest() throws ApiException, CryptoException { + public void historicalTradesTest() throws ApiException, CryptoException, IOException { String symbol = "BNBUSDT"; - Integer limit = 500; + Integer limit = 1; Long fromId = 1L; ApiResponse response = api.historicalTrades(symbol, limit, fromId); @@ -215,7 +251,8 @@ public void historicalTradesTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/api/v3/historicalTrades", actualRequest.url().encodedPath()); } @@ -223,18 +260,29 @@ public void historicalTradesTest() throws ApiException, CryptoException { * Kline/Candlestick data * *

Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. - * Weight: 2 + * Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Database Supported kline intervals + * (case-sensitive): Interval | `interval` value --------- | ---------------- seconds + * | `1s` minutes | `1m`, `3m`, `5m`, `15m`, + * `30m` hours | `1h`, `2h`, `4h`, `6h`, + * `8h`, `12h` days | `1d`, `3d` weeks | `1w` + * months | `1M` **Notes:** * If `startTime` and `endTime` are not + * sent, the most recent klines are returned. * Supported values for `timeZone`: * + * Hours and minutes (e.g. `-1:00`, `05:45`) * Only hours (e.g. + * `0`, `8`, `4`) * Accepted range is strictly [-12:00 to +14:00] + * inclusive * If `timeZone` provided, kline intervals are interpreted in that + * timezone instead of UTC. * Note that `startTime` and `endTime` are always + * interpreted in UTC, regardless of `timeZone`. * * @throws ApiException if the Api call fails */ @Test - public void klinesTest() throws ApiException, CryptoException { + public void klinesTest() throws ApiException, CryptoException, IOException { String symbol = "BNBUSDT"; Interval interval = Interval.INTERVAL_1s; Long startTime = 1735693200000L; Long endTime = 1735693200000L; - String timeZone = ""; - Integer limit = 500; + String timeZone = "0"; + Integer limit = 1; ApiResponse response = api.klines(symbol, interval, startTime, endTime, timeZone, limit); @@ -249,23 +297,83 @@ public void klinesTest() throws ApiException, CryptoException { assertEquals("/api/v3/klines", actualRequest.url().encodedPath()); } + /** + * Query Reference Price + * + *

Query the reference price for a symbol. Weight(IP): 2 Security Type: NONE Notes: **Data + * Source:** Memory + * + * @throws ApiException if the Api call fails + */ + @Test + public void referencePriceTest() throws ApiException, CryptoException, IOException { + String symbol = "BNBUSDT"; + ApiResponse response = api.referencePrice(symbol); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/referencePrice", actualRequest.url().encodedPath()); + } + + /** + * Query Reference Price Calculation + * + *

Describes how reference price is calculated for a given symbol. Weight(IP): 2 Security + * Type: NONE Notes: **Data Source:** Memory + * + * @throws ApiException if the Api call fails + */ + @Test + public void referencePriceCalculationTest() throws ApiException, CryptoException, IOException { + String symbol = "BNBUSDT"; + SymbolStatus symbolStatus = SymbolStatus.TRADING; + ApiResponse response = + api.referencePriceCalculation(symbol, symbolStatus); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + null, + actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/referencePrice/calculation", actualRequest.url().encodedPath()); + } + /** * Rolling window price change statistics * - *

Weight: 4 for each requested <tt>symbol</tt> regardless of - * <tt>windowSize</tt>. <br/><br/> The weight for this request will cap - * at 200 once the number of `symbols` in the request is more than 50. + *

**Note:** This endpoint differs from `GET /api/v3/ticker/24hr`. The statistical + * time range of this endpoint can be up to 59999ms longer than the requested + * `windowSize`. `openTime` starts at the beginning of a minute, while the + * end time is the current time. Therefore, the actual interval can be up to 59999ms longer than + * the requested window. For example, if `closeTime` is 1641287867099 (January 04, + * 2022 09:17:47:099 UTC) and `windowSize` is `1d`, then + * `openTime` is 1641201420000 (January 3, 2022, 09:17:00 UTC). Weight: 4 for each + * requested symbol regardless of windowSize. The weight for this request will cap at 200 once + * the number of `symbols` in the request is more than 50. Security Type: NONE Notes: + * **Data Source:** Database * * @throws ApiException if the Api call fails */ @Test - public void tickerTest() throws ApiException, CryptoException { + public void tickerTest() throws ApiException, CryptoException, IOException { String symbol = "BNBUSDT"; - Symbols symbols = null; + Symbols symbols = Symbols.fromJson("[\"BTCUSDT\",\"BNBUSDT\"]"); WindowSize windowSize = WindowSize.WINDOW_SIZE_1m; TickerType type = TickerType.FULL; - SymbolStatus symbolStatus = null; - ApiResponse response = api.ticker(symbol, symbols, windowSize, type, symbolStatus); + SymbolStatus symbolStatus = SymbolStatus.TRADING; + ApiResponse response = + api.ticker(symbol, symbols, windowSize, type, symbolStatus); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -291,17 +399,19 @@ public void tickerTest() throws ApiException, CryptoException { * <td>2</td> </tr> <tr> <td>21-100</td> * <td>40</td> </tr> <tr> <td>101 or more</td> * <td>80</td> </tr> <tr> <td>symbols parameter is - * omitted</td> <td>80</td> </tr> </tbody> </table> + * omitted</td> <td>80</td> </tr> </tbody> </table> Security + * Type: NONE Notes: **Data Source:** Memory * * @throws ApiException if the Api call fails */ @Test - public void ticker24hrTest() throws ApiException, CryptoException { + public void ticker24hrTest() throws ApiException, CryptoException, IOException { String symbol = "BNBUSDT"; - Symbols symbols = null; + Symbols symbols = Symbols.fromJson("[\"BTCUSDT\",\"BNBUSDT\"]"); TickerType type = TickerType.FULL; - SymbolStatus symbolStatus = null; - ApiResponse response = api.ticker24hr(symbol, symbols, type, symbolStatus); + SymbolStatus symbolStatus = SymbolStatus.TRADING; + ApiResponse response = + api.ticker24hr(symbol, symbols, type, symbolStatus); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -317,22 +427,19 @@ public void ticker24hrTest() throws ApiException, CryptoException { /** * Symbol order book ticker * - *

Best price/qty on the order book for a symbol or symbols. Weight: <table> - * <thead> <tr> <th>Parameter</th> <th>Symbols Provided</th> - * <th>Weight</th> </tr> </thead> <tbody> <tr> <td - * rowspan=\"2\">symbol</td> <td>1</td> - * <td>2</td> </tr> <tr> <td>symbol parameter is - * omitted</td> <td>4</td> </tr> <tr> <td>symbols</td> - * <td>Any</td> <td>4</td> </tr> </tbody> </table> + *

Best price/qty on the order book for a symbol or symbols. Weight: |Parameter|Symbols + * Provided|Weight| |---|---|---| |symbol| 1 |2| | |omitted| 4| |symbols| Any |4| Security Type: + * NONE Notes: **Data Source:** Memory * * @throws ApiException if the Api call fails */ @Test - public void tickerBookTickerTest() throws ApiException, CryptoException { + public void tickerBookTickerTest() throws ApiException, CryptoException, IOException { String symbol = "BNBUSDT"; - Symbols symbols = null; - SymbolStatus symbolStatus = null; - ApiResponse response = api.tickerBookTicker(symbol, symbols, symbolStatus); + Symbols symbols = Symbols.fromJson("[\"BTCUSDT\",\"BNBUSDT\"]"); + SymbolStatus symbolStatus = SymbolStatus.TRADING; + ApiResponse response = + api.tickerBookTicker(symbol, symbols, symbolStatus); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -341,28 +448,25 @@ public void tickerBookTickerTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/api/v3/ticker/bookTicker", actualRequest.url().encodedPath()); } /** * Symbol price ticker * - *

Latest price for a symbol or symbols. Weight: <table> <thead> <tr> - * <th>Parameter</th> <th>Symbols Provided</th> - * <th>Weight</th> </tr> </thead> <tbody> <tr> <td - * rowspan=\"2\">symbol</td> <td>1</td> - * <td>2</td> </tr> <tr> <td>symbol parameter is - * omitted</td> <td>4</td> </tr> <tr> <td>symbols</td> - * <td>Any</td> <td>4</td> </tr> </tbody> </table> + *

Latest price for a symbol or symbols. Weight: |Parameter|Symbols Provided|Weight| + * |---|---|---| |symbol| 1 |2| | |omitted| 4| |symbols| Any |4| Security Type: NONE Notes: + * **Data Source:** Memory * * @throws ApiException if the Api call fails */ @Test - public void tickerPriceTest() throws ApiException, CryptoException { + public void tickerPriceTest() throws ApiException, CryptoException, IOException { String symbol = "BNBUSDT"; - Symbols symbols = null; - SymbolStatus symbolStatus = null; + Symbols symbols = Symbols.fromJson("[\"BTCUSDT\",\"BNBUSDT\"]"); + SymbolStatus symbolStatus = SymbolStatus.TRADING; ApiResponse response = api.tickerPrice(symbol, symbols, symbolStatus); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -379,19 +483,21 @@ public void tickerPriceTest() throws ApiException, CryptoException { /** * Trading Day Ticker * - *

Price change statistics for a trading day. Weight: 4 for each requested - * <tt>symbol</tt>. <br/><br/> The weight for this request will cap at - * 200 once the number of `symbols` in the request is more than 50. + *

Price change statistics for a trading day. Weight: 4 for each requested symbol. The weight + * for this request will cap at 200 once the number of symbols in the request is more than 50. + * Security Type: NONE Notes: **Data Source:** Database **Notes:**: - Supported values for + * `timeZone`: - Hours and minutes (e.g. `-1:00`, `05:45`) - Only + * hours (e.g. `0`, `8`, `4`) * * @throws ApiException if the Api call fails */ @Test - public void tickerTradingDayTest() throws ApiException, CryptoException { + public void tickerTradingDayTest() throws ApiException, CryptoException, IOException { String symbol = "BNBUSDT"; - Symbols symbols = null; - String timeZone = ""; + Symbols symbols = Symbols.fromJson("[\"BTCUSDT\",\"BNBUSDT\"]"); + String timeZone = "0"; TickerType type = TickerType.FULL; - SymbolStatus symbolStatus = null; + SymbolStatus symbolStatus = SymbolStatus.TRADING; ApiResponse response = api.tickerTradingDay(symbol, symbols, timeZone, type, symbolStatus); @@ -402,7 +508,8 @@ public void tickerTradingDayTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/api/v3/ticker/tradingDay", actualRequest.url().encodedPath()); } @@ -411,18 +518,25 @@ public void tickerTradingDayTest() throws ApiException, CryptoException { * *

The request is similar to klines having the same parameters and response. * `uiKlines` return modified kline data, optimized for presentation of candlestick - * charts. Weight: 2 + * charts. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Database - If + * `startTime` and `endTime` are not sent, the most recent klines are + * returned. - Supported values for `timeZone`: - Hours and minutes (e.g. + * `-1:00`, `05:45`) - Only hours (e.g. `0`, `8`, + * `4`) - Accepted range is strictly [-12:00 to +14:00] inclusive - If + * `timeZone` provided, kline intervals are interpreted in that timezone instead of + * UTC. - Note that `startTime` and `endTime` are always interpreted in UTC, + * regardless of `timeZone`. * * @throws ApiException if the Api call fails */ @Test - public void uiKlinesTest() throws ApiException, CryptoException { + public void uiKlinesTest() throws ApiException, CryptoException, IOException { String symbol = "BNBUSDT"; Interval interval = Interval.INTERVAL_1s; Long startTime = 1735693200000L; Long endTime = 1735693200000L; - String timeZone = ""; - Integer limit = 500; + String timeZone = "0"; + Integer limit = 1; ApiResponse response = api.uiKlines(symbol, interval, startTime, endTime, timeZone, limit); diff --git a/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/TradeApiTest.java b/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/TradeApiTest.java index f23875081..6ea553282 100644 --- a/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/TradeApiTest.java +++ b/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/TradeApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Spot REST API - * OpenAPI Specifications for the Binance Spot REST API API documents: - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. * * The version of the OpenAPI document: 1.0.0 * @@ -24,24 +24,24 @@ import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; import com.binance.connector.client.spot.rest.model.AboveType; -import com.binance.connector.client.spot.rest.model.AllOrderListResponse; -import com.binance.connector.client.spot.rest.model.AllOrdersResponse; import com.binance.connector.client.spot.rest.model.BelowType; import com.binance.connector.client.spot.rest.model.CancelReplaceMode; import com.binance.connector.client.spot.rest.model.CancelRestrictions; import com.binance.connector.client.spot.rest.model.DeleteOpenOrdersResponse; import com.binance.connector.client.spot.rest.model.DeleteOrderListResponse; import com.binance.connector.client.spot.rest.model.DeleteOrderResponse; -import com.binance.connector.client.spot.rest.model.GetOpenOrdersResponse; -import com.binance.connector.client.spot.rest.model.GetOrderListResponse; -import com.binance.connector.client.spot.rest.model.GetOrderResponse; import com.binance.connector.client.spot.rest.model.NewOrderRequest; import com.binance.connector.client.spot.rest.model.NewOrderResponse; -import com.binance.connector.client.spot.rest.model.OpenOrderListResponse; +import com.binance.connector.client.spot.rest.model.OrderAmendKeepPriorityRequest; +import com.binance.connector.client.spot.rest.model.OrderAmendKeepPriorityResponse; import com.binance.connector.client.spot.rest.model.OrderCancelReplaceRequest; import com.binance.connector.client.spot.rest.model.OrderCancelReplaceResponse; import com.binance.connector.client.spot.rest.model.OrderListOcoRequest; import com.binance.connector.client.spot.rest.model.OrderListOcoResponse; +import com.binance.connector.client.spot.rest.model.OrderListOpoRequest; +import com.binance.connector.client.spot.rest.model.OrderListOpoResponse; +import com.binance.connector.client.spot.rest.model.OrderListOpocoRequest; +import com.binance.connector.client.spot.rest.model.OrderListOpocoResponse; import com.binance.connector.client.spot.rest.model.OrderListOtoRequest; import com.binance.connector.client.spot.rest.model.OrderListOtoResponse; import com.binance.connector.client.spot.rest.model.OrderListOtocoRequest; @@ -62,6 +62,7 @@ import com.binance.connector.client.spot.rest.model.WorkingSide; import com.binance.connector.client.spot.rest.model.WorkingType; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -113,15 +114,15 @@ public void initApiClient() throws ApiException { } /** - * Cancel All Open Orders on a Symbol + * Cancel All Open Orders on a Symbol (TRADE) * *

Cancels all active orders on a symbol. This includes orders that are part of an order - * list. Weight: 1 + * list. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching Engine * * @throws ApiException if the Api call fails */ @Test - public void deleteOpenOrdersTest() throws ApiException, CryptoException { + public void deleteOpenOrdersTest() throws ApiException, CryptoException, IOException { String symbol = "BNBUSDT"; Double recvWindow = 5000d; ApiResponse response = api.deleteOpenOrders(symbol, recvWindow); @@ -136,28 +137,33 @@ public void deleteOpenOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BNBUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=BNBUSDT&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "1c2ec70499498e5c5d2f4e98a7e24c74f2801642a8c3743d289dbfc1ca00c7a8", - actualRequest.url().queryParameter("signature")); + "1c2ec70499498e5c5d2f4e98a7e24c74f2801642a8c3743d289dbfc1ca00c7a8", actualRequest.url().queryParameter("signature")); assertEquals("/api/v3/openOrders", actualRequest.url().encodedPath()); } /** - * Cancel order + * Cancel order (TRADE) * - *

Cancel an active order. Weight: 1 + *

Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** + * Matching Engine - Either `orderId` or `origClientOrderId` must be sent. - + * If both `orderId` and `origClientOrderId` are provided, the + * `orderId` is searched first, then the `origClientOrderId` from that + * result is checked against that order. If both conditions are not met the request will be + * rejected. - The performance for canceling an order (single cancel or as part of a + * cancel-replace) is always better when only `orderId` is sent. Sending + * `origClientOrderId` or both `orderId` + `origClientOrderId` + * will be slower. * * @throws ApiException if the Api call fails */ @Test - public void deleteOrderTest() throws ApiException, CryptoException { + public void deleteOrderTest() throws ApiException, CryptoException, IOException { String symbol = "BNBUSDT"; Long orderId = 1L; - String origClientOrderId = ""; - String newClientOrderId = ""; + String origClientOrderId = "myOrder1"; + String newClientOrderId = "cancelMyOrder1"; CancelRestrictions cancelRestrictions = CancelRestrictions.ONLY_NEW; Double recvWindow = 5000d; ApiResponse response = @@ -179,28 +185,28 @@ public void deleteOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "symbol=BNBUSDT&orderId=1&origClientOrderId=&newClientOrderId=&cancelRestrictions=ONLY_NEW&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "1a431901da232e9e41c7ed069d48d6bcdc05e75d38feb868fe574efa38418c52", - actualRequest.url().queryParameter("signature")); + assertEquals("symbol=BNBUSDT&orderId=1&origClientOrderId=myOrder1&newClientOrderId=cancelMyOrder1&cancelRestrictions=ONLY_NEW&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("13fd107081705dfeb1904dcff57b10a1d45af1f8616c36391cfd016a00b72419", actualRequest.url().queryParameter("signature")); assertEquals("/api/v3/order", actualRequest.url().encodedPath()); } /** - * Cancel Order list + * Cancel Order list (TRADE) * - *

Cancel an entire Order list Weight: 1 + *

Cancel an entire Order list Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** + * Matching Engine **Notes:** - Canceling an individual order from an order list will cancel the + * entire order list. - If both orderListId and listClientOrderId parameters are provided, the + * orderListId is searched first, then the listClientOrderId from that result is checked against + * that order. If both conditions are not met the request will be rejected. * * @throws ApiException if the Api call fails */ @Test - public void deleteOrderListTest() throws ApiException, CryptoException { + public void deleteOrderListTest() throws ApiException, CryptoException, IOException { String symbol = "BNBUSDT"; Long orderListId = 1L; - String listClientOrderId = ""; - String newClientOrderId = ""; + String listClientOrderId = "C3wyj4WVEktd7u9aVBRXcN"; + String newClientOrderId = "cancelMyOrder1"; Double recvWindow = 5000d; ApiResponse response = api.deleteOrderList( @@ -216,26 +222,69 @@ public void deleteOrderListTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("symbol=BNBUSDT&orderListId=1&listClientOrderId=C3wyj4WVEktd7u9aVBRXcN&newClientOrderId=cancelMyOrder1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "symbol=BNBUSDT&orderListId=1&listClientOrderId=&newClientOrderId=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "d9e6088fa5875f4f2e1d36eef74b7b7ac90d41a4e3f0269ff99d18698ddd59a0", - actualRequest.url().queryParameter("signature")); + "a0abdb95c045544160e5eb2c8d08685ee5e1b00f62939d199b50cb012b88f7a8", actualRequest.url().queryParameter("signature")); assertEquals("/api/v3/orderList", actualRequest.url().encodedPath()); } /** - * New order + * New order (TRADE) * - *

Send in a new order. Weight: 1 + *

Send in a new order. This adds 1 order to the `EXCHANGE_MAX_ORDERS` filter and + * the `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 1 Security Type: + * TRADE Notes: **Data Source:** Matching Engine Some additional mandatory parameters based on + * order `type`: Type | Additional mandatory parameters | Additional Information + * ------------ | ------------| ------ `LIMIT` | `timeInForce`, + * `quantity`, `price`| `MARKET` | `quantity` or + * `quoteOrderQty`| `MARKET` orders using the `quantity` field + * specifies the amount of the `base asset` the user wants to buy or sell at the + * market price. <br/> E.g. MARKET order on BTCUSDT will specify how much BTC the user is + * buying or selling. <br/><br/> `MARKET` orders using + * `quoteOrderQty` specifies the amount the user wants to spend (when buying) or + * receive (when selling) the `quote` asset; the correct `quantity` will be + * determined based on the market liquidity and `quoteOrderQty`. <br/> E.g. + * Using the symbol BTCUSDT: <br/> `BUY` side, the order will buy as many BTC as + * `quoteOrderQty` USDT can. <br/> `SELL` side, the order will sell as + * much BTC needed to receive `quoteOrderQty` USDT. `STOP_LOSS` | + * `quantity`, `stopPrice` or `trailingDelta`| This will execute a + * `MARKET` order when the conditions are met. (e.g. `stopPrice` is met or + * `trailingDelta` is activated) `STOP_LOSS_LIMIT` | + * `timeInForce`, `quantity`, `price`, `stopPrice` or + * `trailingDelta` `TAKE_PROFIT` | `quantity`, + * `stopPrice` or `trailingDelta` | This will execute a `MARKET` + * order when the conditions are met. (e.g. `stopPrice` is met or + * `trailingDelta` is activated) `TAKE_PROFIT_LIMIT` | + * `timeInForce`, `quantity`, `price`, `stopPrice` or + * `trailingDelta` | `LIMIT_MAKER` | `quantity`, + * `price`| This is a `LIMIT` order that will be rejected if the order + * immediately matches and trades as a taker. <br/> This is also known as a POST-ONLY + * order. Notes on using parameters for Pegged Orders: * These parameters are allowed for + * `LIMIT`, `LIMIT_MAKER`, `STOP_LOSS_LIMIT`, + * `TAKE_PROFIT_LIMIT` orders. * If `pegPriceType` is specified, + * `price` becomes optional. Otherwise, it is still mandatory. * + * `pegPriceType=PRIMARY_PEG` means the primary peg, that is the best price on + * the same side of the order book as your order. * `pegPriceType=MARKET_PEG` + * means the market peg, that is the best price on the opposite side of the order book from your + * order. * Use `pegOffsetType` and `pegOffsetValue` to request a price + * level other than the best one. These parameters must be specified together. Other info: * Any + * `LIMIT` or `LIMIT_MAKER` type order can be made an iceberg order by + * sending an `icebergQty`. * Any order with an `icebergQty` MUST have + * `timeInForce` set to `GTC`. * For `STOP_LOSS`, + * `STOP_LOSS_LIMIT`, `TAKE_PROFIT_LIMIT` and `TAKE_PROFIT` + * orders, `trailingDelta` can be combined with `stopPrice`. * + * `MARKET` orders using `quoteOrderQty` will not break `LOT_SIZE` + * filter rules; the order will execute a `quantity` that will have the notional value + * as close as possible to `quoteOrderQty`. Trigger order price rules against market + * price for both MARKET and LIMIT versions: * Price above market price: `STOP_LOSS` + * `BUY`, `TAKE_PROFIT` `SELL` * Price below market price: + * `STOP_LOSS` `SELL`, `TAKE_PROFIT` `BUY` * * @throws ApiException if the Api call fails */ @Test - public void newOrderTest() throws ApiException, CryptoException { + public void newOrderTest() throws ApiException, CryptoException, IOException { NewOrderRequest newOrderRequest = new NewOrderRequest(); - newOrderRequest.symbol("BNBUSDT"); newOrderRequest.side(Side.BUY); newOrderRequest.type(OrderType.MARKET); @@ -252,29 +301,167 @@ public void newOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000symbol=BNBUSDT&side=BUY&type=MARKET", signInputCaptor.getValue()); + assertEquals("6486465768232440fc305256c99d50fa366fe8e7f0e7be813f78507f50e0cb4c", actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/order", actualRequest.url().encodedPath()); + } + + /** + * Order Amend Keep Priority (TRADE) + * + *

Reduce the quantity of an existing open order. This adds 0 orders to the + * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read Order + * Amend Keep Priority FAQ to learn more. Weight(IP): 4 Unfilled Order Count: 0 Security Type: + * TRADE Notes: **Data Source:** Matching Engine + * + * @throws ApiException if the Api call fails + */ + @Test + public void orderAmendKeepPriorityTest() throws ApiException, CryptoException, IOException { + OrderAmendKeepPriorityRequest orderAmendKeepPriorityRequest = + new OrderAmendKeepPriorityRequest(); + orderAmendKeepPriorityRequest.symbol("BNBUSDT"); + orderAmendKeepPriorityRequest.newQty(1d); + + ApiResponse response = + api.orderAmendKeepPriority(orderAmendKeepPriorityRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000symbol=BNBUSDT&newQty=1", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000symbol=BNBUSDT&side=BUY&type=MARKET", - signInputCaptor.getValue()); - assertEquals( - "6486465768232440fc305256c99d50fa366fe8e7f0e7be813f78507f50e0cb4c", + "bce2a28518ffdef10f2bab36ddef1de42f72a3ebc64bcbf9438888f6591b7ad8", actualRequest.url().queryParameter("signature")); - assertEquals("/api/v3/order", actualRequest.url().encodedPath()); + assertEquals("/api/v3/order/amend/keepPriority", actualRequest.url().encodedPath()); } /** - * Cancel an Existing Order and Send a New Order + * Cancel an Existing Order and Send a New Order (TRADE) * - *

Cancels an existing order and places a new order on the same symbol. Filters and Order - * Count are evaluated before the processing of the cancellation and order placement occurs. A - * new order that was not attempted (i.e. when `newOrderResult: NOT_ATTEMPTED` ), will - * still increase the order count by 1. Weight: 1 + *

- Cancels an existing order and places a new order on the same symbol. - Filters and Order + * Count are evaluated before the processing of the cancellation and order placement occurs. - A + * new order that was not attempted (i.e. when `newOrderResult: NOT_ATTEMPTED`), will + * still increase the unfilled order count by 1. - You can only cancel an individual order from + * an orderList using this endpoint, but the result is the same as canceling the entire + * orderList. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** + * Matching Engine Similar to `POST /api/v3/order`, additional mandatory parameters + * are determined by `type`. Response format varies depending on whether the + * processing of the message succeeded, partially succeeded, or failed. <table> + * <thead> <tr> <th colspan=3 align=left>Request</th> <th + * colspan=3 align=left>Response</th> </tr> <tr> + * <th><code>cancelReplaceMode</code></th> + * <th><code>orderRateLimitExceededMode</code></th> <th>Unfilled + * Order Count</th> <th><code>cancelResult</code></th> + * <th><code>newOrderResult</code></th> + * <th><code>status</code></th> </tr> </thead> <tbody> + * <tr> <td + * rowspan=\"11\"><code>STOP_ON_FAILURE</code></td> <td + * rowspan=\"6\"><code>DO_NOTHING</code></td> <td + * rowspan=\"3\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"3\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td + * rowspan=\"5\"><code>CANCEL_ONLY</code></td> <td + * rowspan=\"3\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"2\">Exceeds Limits</td> <td>❌ + * <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>429</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>429</code></td> </tr> <tr> <td + * rowspan=\"16\"><code>ALLOW_FAILURE</code></td> <td + * rowspan=\"8\"><code>DO_NOTHING</code></td> <td + * rowspan=\"4\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>409</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"4\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td + * rowspan=\"8\"><CODE>CANCEL_ONLY</CODE></td> <td + * rowspan=\"4\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>409</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"4\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>N/A</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> </tbody> + * </table> **Notes:** - The performance for canceling an order (single cancel or as part + * of a cancel-replace) is always better when only `orderId` is sent. Sending + * `origClientOrderId` or both `orderId` + `origClientOrderId` + * will be slower. * * @throws ApiException if the Api call fails */ @Test - public void orderCancelReplaceTest() throws ApiException, CryptoException { + public void orderCancelReplaceTest() throws ApiException, CryptoException, IOException { OrderCancelReplaceRequest orderCancelReplaceRequest = new OrderCancelReplaceRequest(); - orderCancelReplaceRequest.symbol("BNBUSDT"); orderCancelReplaceRequest.side(Side.BUY); orderCancelReplaceRequest.type(OrderType.MARKET); @@ -293,38 +480,36 @@ public void orderCancelReplaceTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000symbol=BNBUSDT&side=BUY&type=MARKET&cancelReplaceMode=STOP_ON_FAILURE", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000symbol=BNBUSDT&side=BUY&type=MARKET&cancelReplaceMode=STOP_ON_FAILURE", - signInputCaptor.getValue()); - assertEquals( - "b6808573e4dde9e77f712e393259a5802e1ab8bcab3342ac2f50b81cf5c99f38", - actualRequest.url().queryParameter("signature")); + "b6808573e4dde9e77f712e393259a5802e1ab8bcab3342ac2f50b81cf5c99f38", actualRequest.url().queryParameter("signature")); assertEquals("/api/v3/order/cancelReplace", actualRequest.url().encodedPath()); } /** - * New Order list - OCO + * New Order list - OCO (TRADE) * *

Send in an one-cancels-the-other (OCO) pair, where activation of one order immediately - * cancels the other. * An OCO has 2 orders called the **above order** and **below order**. * + * cancels the other. - An OCO has 2 orders called the **above order** and **below order**. - * One of the orders must be a `LIMIT_MAKER/TAKE_PROFIT/TAKE_PROFIT_LIMIT` order and - * the other must be `STOP_LOSS` or `STOP_LOSS_LIMIT` order. * Price - * restrictions * If the OCO is on the `SELL` side: * + * the other must be `STOP_LOSS` or `STOP_LOSS_LIMIT` order. - Price + * restrictions - If the OCO is on the `SELL` side: - * `LIMIT_MAKER/TAKE_PROFIT_LIMIT` `price` > Last Traded Price > - * `STOP_LOSS/STOP_LOSS_LIMIT` `stopPrice` * `TAKE_PROFIT - * stopPrice` > Last Traded Price > `STOP_LOSS/STOP_LOSS_LIMIT stopPrice` * - * If the OCO is on the `BUY` side: * `LIMIT_MAKER/TAKE_PROFIT_LIMIT price` - * < Last Traded Price < `stopPrice` * `TAKE_PROFIT stopPrice` < + * `STOP_LOSS/STOP_LOSS_LIMIT` `stopPrice` - `TAKE_PROFIT + * stopPrice` > Last Traded Price > `STOP_LOSS/STOP_LOSS_LIMIT stopPrice` - + * If the OCO is on the `BUY` side: - `LIMIT_MAKER/TAKE_PROFIT_LIMIT price` + * < Last Traded Price < `stopPrice` - `TAKE_PROFIT stopPrice` < * Last Traded Price < `STOP_LOSS/STOP_LOSS_LIMIT stopPrice` * OCOs add **2 - * orders** to the unfilled order count, `EXCHANGE_MAX_ORDERS` filter, and the - * `MAX_NUM_ORDERS` filter. Weight: 1 + * orders** to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` + * filter. - OCOs add 2 orders to the `EXCHANGE_MAX_ORDERS` filter and the + * `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE + * Notes: **Data Source:** Matching Engine * * @throws ApiException if the Api call fails */ @Test - public void orderListOcoTest() throws ApiException, CryptoException { + public void orderListOcoTest() throws ApiException, CryptoException, IOException { OrderListOcoRequest orderListOcoRequest = new OrderListOcoRequest(); - orderListOcoRequest.symbol("BNBUSDT"); orderListOcoRequest.side(Side.BUY); orderListOcoRequest.quantity(1d); @@ -343,38 +528,118 @@ public void orderListOcoTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "timestamp=1736393892000symbol=BNBUSDT&side=BUY&belowType=STOP_LOSS&quantity=1&aboveType=STOP_LOSS_LIMIT", - signInputCaptor.getValue()); - assertEquals( - "db3271912437d1b5378885950c667387550503b3231f8929081cea96b3dd46bd", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000symbol=BNBUSDT&side=BUY&belowType=STOP_LOSS&quantity=1&aboveType=STOP_LOSS_LIMIT", signInputCaptor.getValue()); + assertEquals("db3271912437d1b5378885950c667387550503b3231f8929081cea96b3dd46bd", actualRequest.url().queryParameter("signature")); assertEquals("/api/v3/orderList/oco", actualRequest.url().encodedPath()); } /** - * New Order list - OTO + * New Order List - OPO (TRADE) * - *

Places an OTO. * An OTO (One-Triggers-the-Other) is an order list comprised of 2 orders. * + *

Place an [OPO](/products/spot/faqs/opo). - OPOs add 2 orders to the + * `EXCHANGE_MAX_NUM_ORDERS`` filter and `MAX_NUM_ORDERS`` filter. + * Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** Matching + * Engine + * + * @throws ApiException if the Api call fails + */ + @Test + public void orderListOpoTest() throws ApiException, CryptoException, IOException { + OrderListOpoRequest orderListOpoRequest = new OrderListOpoRequest(); + orderListOpoRequest.symbol("BNBUSDT"); + orderListOpoRequest.workingType(WorkingType.LIMIT); + orderListOpoRequest.workingSide(WorkingSide.BUY); + orderListOpoRequest.workingPrice(1d); + orderListOpoRequest.workingQuantity(1d); + orderListOpoRequest.pendingType(PendingType.LIMIT); + orderListOpoRequest.pendingSide(PendingSide.BUY); + + ApiResponse response = api.orderListOpo(orderListOpoRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000symbol=BNBUSDT&workingQuantity=1&pendingSide=BUY&pendingType=LIMIT&workingSide=BUY&workingPrice=1&workingType=LIMIT", signInputCaptor.getValue()); + assertEquals("c03aae1a5b89a4016731c8fc6eb025c39b020b0557c81aead5d514431956af22", actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/orderList/opo", actualRequest.url().encodedPath()); + } + + /** + * New Order List - OPOCO (TRADE) + * + *

Place an [OPOCO](/products/spot/faqs/opo). Weight(IP): 1 Unfilled Order Count: 3 Security + * Type: TRADE Notes: **Data Source:** Matching Engine + * + * @throws ApiException if the Api call fails + */ + @Test + public void orderListOpocoTest() throws ApiException, CryptoException, IOException { + OrderListOpocoRequest orderListOpocoRequest = new OrderListOpocoRequest(); + orderListOpocoRequest.symbol("BNBUSDT"); + orderListOpocoRequest.workingType(WorkingType.LIMIT); + orderListOpocoRequest.workingSide(WorkingSide.BUY); + orderListOpocoRequest.workingPrice(1d); + orderListOpocoRequest.workingQuantity(1d); + orderListOpocoRequest.pendingSide(PendingSide.BUY); + orderListOpocoRequest.pendingAboveType(PendingAboveType.STOP_LOSS_LIMIT); + + ApiResponse response = api.orderListOpoco(orderListOpocoRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000symbol=BNBUSDT&workingQuantity=1&pendingSide=BUY&pendingAboveType=STOP_LOSS_LIMIT&workingSide=BUY&workingPrice=1&workingType=LIMIT", signInputCaptor.getValue()); + assertEquals("c73a864db5bba386cda1d3ae78bf1a5a8d17f5ab9c4cd81c0ba66c02d6c04bde", actualRequest.url().queryParameter("signature")); + assertEquals("/api/v3/orderList/opoco", actualRequest.url().encodedPath()); + } + + /** + * New Order list - OTO (TRADE) + * + *

Place an OTO. - An OTO (One-Triggers-the-Other) is an order list comprised of 2 orders. - * The first order is called the **working order** and must be `LIMIT` or - * `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The + * `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The * second order is called the **pending order**. It can be any order type except for * `MARKET` orders using parameter `quoteOrderQty`. The pending order is - * only placed on the order book when the working order gets **fully filled**. * If either the + * only placed on the order book when the working order gets **fully filled**. - If either the * working order or the pending order is cancelled individually, the other order in the order - * list will also be canceled or expired. * When the order list is placed, if the working order + * list will also be canceled or expired. - When the order list is placed, if the working order * gets **immediately fully filled**, the placement response will show the working order as * `FILLED` but the pending order will still appear as `PENDING_NEW`. You - * need to query the status of the pending order again to see its updated status. * OTOs add **2 - * orders** to the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter and - * `MAX_NUM_ORDERS` filter. Weight: 1 + * need to query the status of the pending order again to see its updated status. - OTOs add **2 + * orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` + * filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** + * Matching Engine **Mandatory parameters based on `pendingType` or + * `workingType`** Depending on the `pendingType` or + * `workingType`, some optional parameters will become mandatory. |Type |Additional + * mandatory parameters|Additional information| |---- |---- |------ |`workingType` + * = `LIMIT` |`workingTimeInForce` | |`pendingType` = + * `LIMIT` |`pendingPrice`, `pendingTimeInForce` | + * |`pendingType` = `STOP_LOSS` or `TAKE_PROFIT` + * |`pendingStopPrice` and/or `pendingTrailingDelta`| + * |`pendingType` = `STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT`|`pendingPrice`, `pendingStopPrice` and/or + * `pendingTrailingDelta`, `pendingTimeInForce`| * * @throws ApiException if the Api call fails */ @Test - public void orderListOtoTest() throws ApiException, CryptoException { + public void orderListOtoTest() throws ApiException, CryptoException, IOException { OrderListOtoRequest orderListOtoRequest = new OrderListOtoRequest(); - orderListOtoRequest.symbol("BNBUSDT"); orderListOtoRequest.workingType(WorkingType.LIMIT); orderListOtoRequest.workingSide(WorkingSide.BUY); @@ -396,35 +661,47 @@ public void orderListOtoTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "timestamp=1736393892000symbol=BNBUSDT&workingQuantity=1&pendingSide=BUY&pendingQuantity=1&pendingType=LIMIT&workingSide=BUY&workingPrice=1&workingType=LIMIT", - signInputCaptor.getValue()); - assertEquals( - "85369190863be30874db1641d544803113baaf1fa702db81e7c8515e8b4f03e8", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000symbol=BNBUSDT&workingQuantity=1&pendingSide=BUY&pendingQuantity=1&pendingType=LIMIT&workingSide=BUY&workingPrice=1&workingType=LIMIT", signInputCaptor.getValue()); + assertEquals("85369190863be30874db1641d544803113baaf1fa702db81e7c8515e8b4f03e8", actualRequest.url().queryParameter("signature")); assertEquals("/api/v3/orderList/oto", actualRequest.url().encodedPath()); } /** - * New Order list - OTOCO + * New Order list - OTOCO (TRADE) * - *

Place an OTOCO. * An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised - * of 3 orders. * The first order is called the **working order** and must be `LIMIT` - * or `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The - * behavior of the working order is the same as the [OTO](#new-order-list---oto-trade). * OTOCO - * has 2 pending orders (pending above and pending below), forming an OCO pair. The pending - * orders are only placed on the order book when the working order gets **fully filled**. * The - * rules of the pending above and pending below follow the same rules as the [Order list - * OCO](#new-order-list---oco-trade). * OTOCOs add **3 orders** against the unfilled order - * count, `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter. - * Weight: 1 + *

Place an OTOCO. - An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised + * of 3 orders. - The first order is called the **working order** and must be `LIMIT` + * or `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The + * behavior of the working order is the same as the [OTO](#order-list-oto). - OTOCO has 2 + * pending orders (pending above and pending below), forming an OCO pair. The pending orders are + * only placed on the order book when the working order gets **fully filled**. - The rules of + * the pending above and pending below follow the same rules as the [Order list + * OCO](#order-list-oco). - OTOCOs add **3 orders** to the `EXCHANGE_MAX_NUM_ORDERS` + * filter and `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 3 Security + * Type: TRADE Notes: **Data Source:** Matching Engine **Mandatory parameters based on + * `pendingAboveType`, `pendingBelowType` or `workingType`** + * Depending on the `pendingAboveType`/`pendingBelowType` or + * `workingType`, some optional parameters will become mandatory. |Type |Additional + * mandatory parameters|Additional information| |---- |---- |------ |`workingType` + * = `LIMIT` |`workingTimeInForce` | + * |`pendingAboveType`= `LIMIT_MAKER` |`pendingAbovePrice` | + * |`pendingAboveType` = `STOP_LOSS/TAKE_PROFIT` + * |`pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`| + * |`pendingAboveType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT` + * |`pendingAbovePrice`, `pendingAboveStopPrice` and/or + * `pendingAboveTrailingDelta`, `pendingAboveTimeInForce`| + * |`pendingBelowType`= `LIMIT_MAKER` |`pendingBelowPrice` | + * |`pendingBelowType= STOP_LOSS/TAKE_PROFIT` |`pendingBelowStopPrice` + * and/or `pendingBelowTrailingDelta`| + * |`pendingBelowType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT` + * |`pendingBelowPrice`, `pendingBelowStopPrice` and/or + * `pendingBelowTrailingDelta`, `pendingBelowTimeInForce`| * * @throws ApiException if the Api call fails */ @Test - public void orderListOtocoTest() throws ApiException, CryptoException { + public void orderListOtocoTest() throws ApiException, CryptoException, IOException { OrderListOtocoRequest orderListOtocoRequest = new OrderListOtocoRequest(); - orderListOtocoRequest.symbol("BNBUSDT"); orderListOtocoRequest.workingType(WorkingType.LIMIT); orderListOtocoRequest.workingSide(WorkingSide.BUY); @@ -446,35 +723,30 @@ public void orderListOtocoTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "timestamp=1736393892000symbol=BNBUSDT&workingQuantity=1&pendingSide=BUY&pendingQuantity=1&pendingAboveType=STOP_LOSS_LIMIT&workingSide=BUY&workingPrice=1&workingType=LIMIT", - signInputCaptor.getValue()); - assertEquals( - "d81e48c1257f42a9565c3e55dd2a40190bc0fe8eca7597fe62031e674a2f7213", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000symbol=BNBUSDT&workingQuantity=1&pendingSide=BUY&pendingQuantity=1&pendingAboveType=STOP_LOSS_LIMIT&workingSide=BUY&workingPrice=1&workingType=LIMIT", signInputCaptor.getValue()); + assertEquals("d81e48c1257f42a9565c3e55dd2a40190bc0fe8eca7597fe62031e674a2f7213", actualRequest.url().queryParameter("signature")); assertEquals("/api/v3/orderList/otoco", actualRequest.url().encodedPath()); } /** - * New OCO - Deprecated + * New OCO - Deprecated (TRADE) * - *

Send in a new OCO. * Price Restrictions: * `SELL`: Limit Price > Last Price - * > Stop Price * `BUY`: Limit Price < Last Price < Stop Price * Quantity - * Restrictions: * Both legs must have the same quantity. * `ICEBERG` quantities - * however do not have to be the same * `OCO` adds **2 orders** to the unfilled order - * count, `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. - * Weight: 1 + *

Send in a new OCO. - Price Restrictions: - `SELL`: Limit Price > Last Price + * > Stop Price - `BUY`: Limit Price < Last Price < Stop Price - Quantity + * Restrictions: - Both legs must have the same quantity. - `ICEBERG` quantities + * however do not have to be the same - `OCO` adds **2 orders** to the + * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Weight(IP): + * 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** Matching Engine * * @throws ApiException if the Api call fails */ @Test - public void orderOcoTest() throws ApiException, CryptoException { + public void orderOcoTest() throws ApiException, CryptoException, IOException { OrderOcoRequest orderOcoRequest = new OrderOcoRequest(); - orderOcoRequest.symbol("BNBUSDT"); orderOcoRequest.side(Side.BUY); orderOcoRequest.quantity(1d); - orderOcoRequest.price(400d); + orderOcoRequest.price(1d); orderOcoRequest.stopPrice(1d); ApiResponse response = api.orderOco(orderOcoRequest); @@ -489,37 +761,33 @@ public void orderOcoTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "timestamp=1736393892000symbol=BNBUSDT&side=BUY&stopPrice=1&quantity=1&price=400", - signInputCaptor.getValue()); - assertEquals( - "7a44ec1f11be815620aaa760d66d510d4632c91aedca34aaa382ee4a9ef7f702", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000symbol=BNBUSDT&side=BUY&stopPrice=1&quantity=1&price=1", signInputCaptor.getValue()); + assertEquals("2c496a64bee80f4bc9fb7035e9a037559bcbabb89a8f21e91f789d1a7bfd320b", actualRequest.url().queryParameter("signature")); assertEquals("/api/v3/order/oco", actualRequest.url().encodedPath()); } /** - * Test new order + * Test new order (TRADE) * *

Test new order creation and signature/recvWindow long. Creates and validates a new order - * but does not send it into the matching engine. Weight: |Condition| Request Weight| - * |------------ | ------------ | |Without `computeCommissionRates`| 1| |With - * `computeCommissionRates`|20| + * but does not send it into the matching engine. Weight: |Condition|Weight| |---|---| |Without + * `computeCommissionRates`|1| |With `computeCommissionRates`|20| Security + * Type: TRADE Notes: **Data Source:** Memory * * @throws ApiException if the Api call fails */ @Test - public void orderTestTest() throws ApiException, CryptoException { + public void orderTestTest() throws ApiException, CryptoException, IOException { OrderTestRequest orderTestRequest = new OrderTestRequest(); - orderTestRequest.symbol("BNBUSDT"); orderTestRequest.side(Side.BUY); orderTestRequest.type(OrderType.MARKET); - ApiResponse orderTestResponseApiResponse = api.orderTest(orderTestRequest); + ApiResponse response = api.orderTest(orderTestRequest); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); - Mockito.verify(apiClientSpy).execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); @@ -528,23 +796,25 @@ public void orderTestTest() throws ApiException, CryptoException { Request actualRequest = captorValue.request(); assertEquals("timestamp=1736393892000symbol=BNBUSDT&side=BUY&type=MARKET", signInputCaptor.getValue()); - assertEquals( - "6486465768232440fc305256c99d50fa366fe8e7f0e7be813f78507f50e0cb4c", - actualRequest.url().queryParameter("signature")); + assertEquals("6486465768232440fc305256c99d50fa366fe8e7f0e7be813f78507f50e0cb4c", actualRequest.url().queryParameter("signature")); assertEquals("/api/v3/order/test", actualRequest.url().encodedPath()); } /** - * New order using SOR + * New order using SOR (TRADE) * - *

Places an order using smart order routing (SOR). Weight: 1 + *

Places an order using smart order routing (SOR). This adds 1 order to the + * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [SOR + * FAQ](/products/spot/faqs/sor_faq) to learn more. Weight(IP): 1 Unfilled Order Count: 1 + * Security Type: TRADE Notes: **Data Source:** Matching Engine **Note:** `POST + * /api/v3/sor/order` only supports `LIMIT` and `MARKET` orders. + * `quoteOrderQty` is not supported. * * @throws ApiException if the Api call fails */ @Test - public void sorOrderTest() throws ApiException, CryptoException { + public void sorOrderTest() throws ApiException, CryptoException, IOException { SorOrderRequest sorOrderRequest = new SorOrderRequest(); - sorOrderRequest.symbol("BNBUSDT"); sorOrderRequest.side(Side.BUY); sorOrderRequest.type(OrderType.MARKET); @@ -562,29 +832,24 @@ public void sorOrderTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "timestamp=1736393892000symbol=BNBUSDT&side=BUY&quantity=1&type=MARKET", - signInputCaptor.getValue()); - assertEquals( - "84bb7809eacf584b9d7dccae40864b17ca8fcf3de423b05e0a171b8a0c67ed62", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000symbol=BNBUSDT&side=BUY&quantity=1&type=MARKET", signInputCaptor.getValue()); + assertEquals("84bb7809eacf584b9d7dccae40864b17ca8fcf3de423b05e0a171b8a0c67ed62", actualRequest.url().queryParameter("signature")); assertEquals("/api/v3/sor/order", actualRequest.url().encodedPath()); } /** - * Test new order using SOR + * Test new order using SOR (TRADE) * *

Test new order creation and signature/recvWindow using smart order routing (SOR). Creates - * and validates a new order but does not send it into the matching engine. Weight: | Condition - * | Request Weight | | --------- | -------------- | | Without - * `computeCommissionRates` | 1 | | With `computeCommissionRates` | 20 | + * and validates a new order but does not send it into the matching engine. Weight: + * |Condition|Weight| |---|---| |Without `computeCommissionRates`|1| |With + * `computeCommissionRates`|20| Security Type: TRADE Notes: **Data Source:** Memory * * @throws ApiException if the Api call fails */ @Test - public void sorOrderTestTest() throws ApiException, CryptoException { + public void sorOrderTestTest() throws ApiException, CryptoException, IOException { SorOrderTestRequest sorOrderTestRequest = new SorOrderTestRequest(); - sorOrderTestRequest.symbol("BNBUSDT"); sorOrderTestRequest.side(Side.BUY); sorOrderTestRequest.type(OrderType.MARKET); @@ -602,10 +867,8 @@ public void sorOrderTestTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000symbol=BNBUSDT&side=BUY&quantity=1&type=MARKET", signInputCaptor.getValue()); - assertEquals( - "84bb7809eacf584b9d7dccae40864b17ca8fcf3de423b05e0a171b8a0c67ed62", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000computeCommissionRates=false&symbol=BNBUSDT&side=BUY&quantity=1&type=MARKET", signInputCaptor.getValue()); + assertEquals("af317a0ac951f12999280aa1c3362b23b02460ff5fe5527e86b375a88cc98554", actualRequest.url().queryParameter("signature")); assertEquals("/api/v3/sor/order/test", actualRequest.url().encodedPath()); } } diff --git a/clients/spot/src/test/java/com/binance/connector/client/spot/websocket/stream/api/WebSocketStreamsApiTest.java b/clients/spot/src/test/java/com/binance/connector/client/spot/websocket/stream/api/WebSocketStreamsApiTest.java index 3ed1f3f92..0b556d0ff 100644 --- a/clients/spot/src/test/java/com/binance/connector/client/spot/websocket/stream/api/WebSocketStreamsApiTest.java +++ b/clients/spot/src/test/java/com/binance/connector/client/spot/websocket/stream/api/WebSocketStreamsApiTest.java @@ -19,34 +19,8 @@ import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; import com.binance.connector.client.common.websocket.dtos.RequestWrapperDTO; import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; -import com.binance.connector.client.spot.websocket.stream.model.AggTradeRequest; -import com.binance.connector.client.spot.websocket.stream.model.AggTradeResponse; -import com.binance.connector.client.spot.websocket.stream.model.AllMarketRollingWindowTickerRequest; -import com.binance.connector.client.spot.websocket.stream.model.AllMarketRollingWindowTickerResponse; -import com.binance.connector.client.spot.websocket.stream.model.AllMiniTickerResponse; -import com.binance.connector.client.spot.websocket.stream.model.AvgPriceRequest; -import com.binance.connector.client.spot.websocket.stream.model.AvgPriceResponse; -import com.binance.connector.client.spot.websocket.stream.model.BookTickerRequest; -import com.binance.connector.client.spot.websocket.stream.model.BookTickerResponse; -import com.binance.connector.client.spot.websocket.stream.model.DiffBookDepthRequest; -import com.binance.connector.client.spot.websocket.stream.model.DiffBookDepthResponse; -import com.binance.connector.client.spot.websocket.stream.model.Interval; -import com.binance.connector.client.spot.websocket.stream.model.KlineOffsetRequest; -import com.binance.connector.client.spot.websocket.stream.model.KlineOffsetResponse; -import com.binance.connector.client.spot.websocket.stream.model.KlineRequest; -import com.binance.connector.client.spot.websocket.stream.model.KlineResponse; -import com.binance.connector.client.spot.websocket.stream.model.Levels; -import com.binance.connector.client.spot.websocket.stream.model.MiniTickerRequest; -import com.binance.connector.client.spot.websocket.stream.model.MiniTickerResponse; -import com.binance.connector.client.spot.websocket.stream.model.PartialBookDepthRequest; -import com.binance.connector.client.spot.websocket.stream.model.PartialBookDepthResponse; -import com.binance.connector.client.spot.websocket.stream.model.RollingWindowTickerRequest; -import com.binance.connector.client.spot.websocket.stream.model.RollingWindowTickerResponse; -import com.binance.connector.client.spot.websocket.stream.model.TickerRequest; -import com.binance.connector.client.spot.websocket.stream.model.TickerResponse; -import com.binance.connector.client.spot.websocket.stream.model.TradeRequest; -import com.binance.connector.client.spot.websocket.stream.model.TradeResponse; -import com.binance.connector.client.spot.websocket.stream.model.WindowSize; +import com.binance.connector.client.spot.websocket.stream.model.*; + import java.io.File; import java.io.IOException; import java.net.URISyntaxException; @@ -68,13 +42,13 @@ /** API tests for WebSocketStreamsApi */ public class WebSocketStreamsApiTest { - private WebSocketStreamsApi api; + private DefaultApi api; private StreamConnectionWrapper connectionSpy; private Session sessionMock; @BeforeEach public void initApiClient() throws Exception { - URL resource = WebSocketStreamsApi.class.getResource("/test-ed25519-prv-key.pem"); + URL resource = SpotWebSocketStreams.class.getResource("/test-ed25519-prv-key.pem"); SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); signatureConfiguration.setApiKey("apiKey"); File file = new File(resource.toURI()); @@ -102,7 +76,7 @@ public void initApiClient() throws Exception { Mockito.doNothing().when(connectionSpy).setUserAgent(Mockito.anyString()); Mockito.doReturn(1736393892000L).when(connectionSpy).getTimestamp(); connectionSpy.connect(); - WebSocketStreamsApi accountApi = new WebSocketStreamsApi(connectionSpy); + DefaultApi accountApi = new DefaultApi(connectionSpy); api = Mockito.spy(accountApi); Mockito.doReturn("eaf3292c-64b6-4c04-ad4f-4ca2608b42b4").when(api).getRequestID(); } @@ -185,7 +159,7 @@ public void allMarketRollingWindowTickerTest() */ @Test public void allMiniTickerTest() throws ApiException, URISyntaxException, IOException { - StreamBlockingQueueWrapper lists = api.allMiniTicker(); + StreamBlockingQueueWrapper lists = api.allMiniTicker(new AllMiniTickerRequest()); ArgumentCaptor, AllMiniTickerResponse>> callArgumentCaptor = ArgumentCaptor.forClass(RequestWrapperDTO.class); Mockito.verify(connectionSpy).innerSend(callArgumentCaptor.capture()); @@ -451,7 +425,7 @@ public void partialBookDepthUpdateSpeedTest() PartialBookDepthRequest partialBookDepthRequest = new PartialBookDepthRequest(); partialBookDepthRequest.setLevels(Levels.LEVELS_5); partialBookDepthRequest.setSymbol("btcusdt"); - partialBookDepthRequest.setUpdateSpeed("100ms"); + partialBookDepthRequest.setUpdateSpeed(UpdateSpeed.UPDATE_SPEED_100ms); StreamBlockingQueueWrapper response = api.partialBookDepth(partialBookDepthRequest); ArgumentCaptor, PartialBookDepthResponse>> diff --git a/clients/staking/CHANGELOG.md b/clients/staking/CHANGELOG.md index b41e304b0..557ff80f0 100644 --- a/clients/staking/CHANGELOG.md +++ b/clients/staking/CHANGELOG.md @@ -1,5 +1,35 @@ # Changelog +## 6.0.0 - 2026-07-29 + +### Changed (6) + +- Modified parameter `asset`: + - enum added: `WBETH`, `BETH` + - affected methods: + - `redeemEth()` (`POST /sapi/v1/eth-staking/eth/redeem`) +- Modified parameter `positionId`: + - type `integer` → `string` + - affected methods: + - `getOnChainYieldsLockedRedemptionRecord()` (`GET /sapi/v1/onchain-yields/locked/history/redemptionRecord`) + - `getOnChainYieldsLockedProductPosition()` (`GET /sapi/v1/onchain-yields/locked/position`) +- Modified parameter `redeemTo`: + - enum added: `SPOT`, `FLEXIBLE` + - affected methods: + - `setOnChainYieldsLockedProductRedeemOption()` (`POST /sapi/v1/onchain-yields/locked/setRedeemOption`) +- Modified parameter `redeemTo`: + - enum added: `SPOT`, `FLEXIBLE` + - affected methods: + - `subscribeOnChainYieldsLockedProduct()` (`POST /sapi/v1/onchain-yields/locked/subscribe`) +- Modified parameter `sourceAccount`: + - enum added: `SPOT`, `FUND`, `ALL` + - affected methods: + - `subscribeOnChainYieldsLockedProduct()` (`POST /sapi/v1/onchain-yields/locked/subscribe`) +- Modified parameter `type`: + - enum added: `CLAIM`, `DISTRIBUTE` + - affected methods: + - `getBoostRewardsHistory()` (`GET /sapi/v1/sol-staking/sol/history/boostRewardsHistory`) + ## 5.0.0 - 2026-05-04 ### Changed (6) diff --git a/clients/staking/docs/Asset.md b/clients/staking/docs/Asset.md new file mode 100644 index 000000000..794501294 --- /dev/null +++ b/clients/staking/docs/Asset.md @@ -0,0 +1,13 @@ + + +# Asset + +## Enum + + +* `WBETH` (value: `"WBETH"`) + +* `BETH` (value: `"BETH"`) + + + diff --git a/clients/staking/docs/ClaimBoostRewardsRequest.md b/clients/staking/docs/ClaimBoostRewardsRequest.md index 391c5c727..1bf29584f 100644 --- a/clients/staking/docs/ClaimBoostRewardsRequest.md +++ b/clients/staking/docs/ClaimBoostRewardsRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**recvWindow** | **Long** | | [optional] | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/staking/docs/EthStakingApi.md b/clients/staking/docs/EthStakingApi.md index b96359e72..bbc8fa0e8 100644 --- a/clients/staking/docs/EthStakingApi.md +++ b/clients/staking/docs/EthStakingApi.md @@ -4,26 +4,26 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**ethStakingAccount**](EthStakingApi.md#ethStakingAccount) | **GET** /sapi/v2/eth-staking/account | ETH Staking account(USER_DATA) | -| [**getCurrentEthStakingQuota**](EthStakingApi.md#getCurrentEthStakingQuota) | **GET** /sapi/v1/eth-staking/eth/quota | Get current ETH staking quota(USER_DATA) | -| [**getEthRedemptionHistory**](EthStakingApi.md#getEthRedemptionHistory) | **GET** /sapi/v1/eth-staking/eth/history/redemptionHistory | Get ETH redemption history(USER_DATA) | -| [**getEthStakingHistory**](EthStakingApi.md#getEthStakingHistory) | **GET** /sapi/v1/eth-staking/eth/history/stakingHistory | Get ETH staking history(USER_DATA) | -| [**getWbethRateHistory**](EthStakingApi.md#getWbethRateHistory) | **GET** /sapi/v1/eth-staking/eth/history/rateHistory | Get WBETH Rate History(USER_DATA) | -| [**getWbethRewardsHistory**](EthStakingApi.md#getWbethRewardsHistory) | **GET** /sapi/v1/eth-staking/eth/history/wbethRewardsHistory | Get WBETH rewards history(USER_DATA) | -| [**getWbethUnwrapHistory**](EthStakingApi.md#getWbethUnwrapHistory) | **GET** /sapi/v1/eth-staking/wbeth/history/unwrapHistory | Get WBETH unwrap history(USER_DATA) | -| [**getWbethWrapHistory**](EthStakingApi.md#getWbethWrapHistory) | **GET** /sapi/v1/eth-staking/wbeth/history/wrapHistory | Get WBETH wrap history(USER_DATA) | -| [**redeemEth**](EthStakingApi.md#redeemEth) | **POST** /sapi/v1/eth-staking/eth/redeem | Redeem ETH(TRADE) | -| [**subscribeEthStaking**](EthStakingApi.md#subscribeEthStaking) | **POST** /sapi/v2/eth-staking/eth/stake | Subscribe ETH Staking(TRADE) | -| [**wrapBeth**](EthStakingApi.md#wrapBeth) | **POST** /sapi/v1/eth-staking/wbeth/wrap | Wrap BETH(TRADE) | +| [**ethStakingAccount**](EthStakingApi.md#ethStakingAccount) | **GET** /sapi/v2/eth-staking/account | ETH Staking account (USER_DATA) | +| [**getCurrentEthStakingQuota**](EthStakingApi.md#getCurrentEthStakingQuota) | **GET** /sapi/v1/eth-staking/eth/quota | Get current ETH staking quota (USER_DATA) | +| [**getEthRedemptionHistory**](EthStakingApi.md#getEthRedemptionHistory) | **GET** /sapi/v1/eth-staking/eth/history/redemptionHistory | Get ETH redemption history (USER_DATA) | +| [**getEthStakingHistory**](EthStakingApi.md#getEthStakingHistory) | **GET** /sapi/v1/eth-staking/eth/history/stakingHistory | Get ETH staking history (USER_DATA) | +| [**getWbethRateHistory**](EthStakingApi.md#getWbethRateHistory) | **GET** /sapi/v1/eth-staking/eth/history/rateHistory | Get WBETH Rate History (USER_DATA) | +| [**getWbethRewardsHistory**](EthStakingApi.md#getWbethRewardsHistory) | **GET** /sapi/v1/eth-staking/eth/history/wbethRewardsHistory | Get WBETH rewards history (USER_DATA) | +| [**getWbethUnwrapHistory**](EthStakingApi.md#getWbethUnwrapHistory) | **GET** /sapi/v1/eth-staking/wbeth/history/unwrapHistory | Get WBETH unwrap history (USER_DATA) | +| [**getWbethWrapHistory**](EthStakingApi.md#getWbethWrapHistory) | **GET** /sapi/v1/eth-staking/wbeth/history/wrapHistory | Get WBETH wrap history (USER_DATA) | +| [**redeemEth**](EthStakingApi.md#redeemEth) | **POST** /sapi/v1/eth-staking/eth/redeem | Redeem ETH (TRADE) | +| [**subscribeEthStaking**](EthStakingApi.md#subscribeEthStaking) | **POST** /sapi/v2/eth-staking/eth/stake | Subscribe ETH Staking (TRADE) | +| [**wrapBeth**](EthStakingApi.md#wrapBeth) | **POST** /sapi/v1/eth-staking/wbeth/wrap | Wrap BETH (TRADE) | # **ethStakingAccount** > EthStakingAccountResponse ethStakingAccount(recvWindow) -ETH Staking account(USER_DATA) +ETH Staking account (USER_DATA) -ETH Staking account Weight: 150 +ETH Staking account Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -40,7 +40,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); EthStakingApi apiInstance = new EthStakingApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { EthStakingAccountResponse result = apiInstance.ethStakingAccount(recvWindow); System.out.println(result); @@ -59,7 +59,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -83,9 +83,9 @@ No authorization required # **getCurrentEthStakingQuota** > GetCurrentEthStakingQuotaResponse getCurrentEthStakingQuota(recvWindow) -Get current ETH staking quota(USER_DATA) +Get current ETH staking quota (USER_DATA) -Get current ETH staking quota Weight: 150 +Get current ETH staking quota Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -102,7 +102,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); EthStakingApi apiInstance = new EthStakingApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetCurrentEthStakingQuotaResponse result = apiInstance.getCurrentEthStakingQuota(recvWindow); System.out.println(result); @@ -121,7 +121,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -145,9 +145,9 @@ No authorization required # **getEthRedemptionHistory** > GetEthRedemptionHistoryResponse getEthRedemptionHistory(redeemId, startTime, endTime, current, size, recvWindow) -Get ETH redemption history(USER_DATA) +Get ETH redemption history (USER_DATA) -Get ETH redemption history * The time between `startTime` and `endTime` cannot be longer than 3 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get ETH redemption history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 3 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -164,12 +164,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); EthStakingApi apiInstance = new EthStakingApi(defaultClient); - Long redeemId = 56L; // Long | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + Long redeemId = 1234567L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetEthRedemptionHistoryResponse result = apiInstance.getEthRedemptionHistory(redeemId, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -191,9 +191,9 @@ public class Example { | **redeemId** | **Long**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -217,9 +217,9 @@ No authorization required # **getEthStakingHistory** > GetEthStakingHistoryResponse getEthStakingHistory(purchaseId, startTime, endTime, current, size, recvWindow) -Get ETH staking history(USER_DATA) +Get ETH staking history (USER_DATA) -Get ETH staking history * The time between `startTime` and `endTime` cannot be longer than 3 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get ETH staking history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 3 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -236,12 +236,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); EthStakingApi apiInstance = new EthStakingApi(defaultClient); - Long purchaseId = 56L; // Long | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + Long purchaseId = 1234567L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetEthStakingHistoryResponse result = apiInstance.getEthStakingHistory(purchaseId, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -263,9 +263,9 @@ public class Example { | **purchaseId** | **Long**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -289,9 +289,9 @@ No authorization required # **getWbethRateHistory** > GetWbethRateHistoryResponse getWbethRateHistory(startTime, endTime, current, size, recvWindow) -Get WBETH Rate History(USER_DATA) +Get WBETH Rate History (USER_DATA) -Get WBETH Rate History * The time between `startTime` and `endTime` cannot be longer than 3 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get WBETH Rate History Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 3 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -308,11 +308,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); EthStakingApi apiInstance = new EthStakingApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetWbethRateHistoryResponse result = apiInstance.getWbethRateHistory(startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -333,9 +333,9 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -359,9 +359,9 @@ No authorization required # **getWbethRewardsHistory** > GetWbethRewardsHistoryResponse getWbethRewardsHistory(startTime, endTime, current, size, recvWindow) -Get WBETH rewards history(USER_DATA) +Get WBETH rewards history (USER_DATA) -Get WBETH rewards history * The time between `startTime` and `endTime` cannot be longer than 3 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get WBETH rewards history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 3 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -378,11 +378,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); EthStakingApi apiInstance = new EthStakingApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetWbethRewardsHistoryResponse result = apiInstance.getWbethRewardsHistory(startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -403,9 +403,9 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -429,9 +429,9 @@ No authorization required # **getWbethUnwrapHistory** > GetWbethUnwrapHistoryResponse getWbethUnwrapHistory(startTime, endTime, current, size, recvWindow) -Get WBETH unwrap history(USER_DATA) +Get WBETH unwrap history (USER_DATA) -Get WBETH unwrap history * The time between `startTime` and `endTime` cannot be longer than 3 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get WBETH unwrap history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 3 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -448,11 +448,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); EthStakingApi apiInstance = new EthStakingApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetWbethUnwrapHistoryResponse result = apiInstance.getWbethUnwrapHistory(startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -473,9 +473,9 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -499,9 +499,9 @@ No authorization required # **getWbethWrapHistory** > GetWbethWrapHistoryResponse getWbethWrapHistory(startTime, endTime, current, size, recvWindow) -Get WBETH wrap history(USER_DATA) +Get WBETH wrap history (USER_DATA) -Get WBETH wrap history * The time between `startTime` and `endTime` cannot be longer than 3 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get WBETH wrap history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 3 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -518,11 +518,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); EthStakingApi apiInstance = new EthStakingApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetWbethWrapHistoryResponse result = apiInstance.getWbethWrapHistory(startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -543,9 +543,9 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -569,9 +569,9 @@ No authorization required # **redeemEth** > RedeemEthResponse redeemEth(redeemEthRequest) -Redeem ETH(TRADE) +Redeem ETH (TRADE) -Redeem WBETH or BETH and get ETH * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight: 150 +Redeem WBETH or BETH and get ETH Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. ### Example ```java @@ -631,9 +631,9 @@ No authorization required # **subscribeEthStaking** > SubscribeEthStakingResponse subscribeEthStaking(subscribeEthStakingRequest) -Subscribe ETH Staking(TRADE) +Subscribe ETH Staking (TRADE) -Subscribe ETH Staking * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight: 150 +Subscribe ETH Staking Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. ### Example ```java @@ -693,9 +693,9 @@ No authorization required # **wrapBeth** > WrapBethResponse wrapBeth(wrapBethRequest) -Wrap BETH(TRADE) +Wrap BETH (TRADE) -Wrap BETH * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight: 150 +Wrap BETH Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. ### Example ```java diff --git a/clients/staking/docs/GetCurrentEthStakingQuotaResponse.md b/clients/staking/docs/GetCurrentEthStakingQuotaResponse.md index 64fe3d1c5..464a3170b 100644 --- a/clients/staking/docs/GetCurrentEthStakingQuotaResponse.md +++ b/clients/staking/docs/GetCurrentEthStakingQuotaResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**leftStakingPersonalQuota** | **String** | | [optional] | -|**leftRedemptionPersonalQuota** | **String** | | [optional] | +|**leftStakingPersonalQuota** | **String** | Show min (Daily available limit, total personal staking quota) | [optional] | +|**leftRedemptionPersonalQuota** | **String** | Show min (Daily personal redeem quota, total redemption limit) | [optional] | |**minStakeAmount** | **String** | | [optional] | |**minRedeemAmount** | **String** | | [optional] | |**redeemPeriod** | **Long** | | [optional] | diff --git a/clients/staking/docs/OnChainYieldsApi.md b/clients/staking/docs/OnChainYieldsApi.md index 17e77132b..0bb836c4d 100644 --- a/clients/staking/docs/OnChainYieldsApi.md +++ b/clients/staking/docs/OnChainYieldsApi.md @@ -13,9 +13,9 @@ All URIs are relative to *https://api.binance.com* | [**getOnChainYieldsLockedSubscriptionRecord**](OnChainYieldsApi.md#getOnChainYieldsLockedSubscriptionRecord) | **GET** /sapi/v1/onchain-yields/locked/history/subscriptionRecord | Get On-chain Yields Locked Subscription Record (USER_DATA) | | [**onChainYieldsAccount**](OnChainYieldsApi.md#onChainYieldsAccount) | **GET** /sapi/v1/onchain-yields/account | On-chain Yields Account (USER_DATA) | | [**redeemOnChainYieldsLockedProduct**](OnChainYieldsApi.md#redeemOnChainYieldsLockedProduct) | **POST** /sapi/v1/onchain-yields/locked/redeem | Redeem On-chain Yields Locked Product (TRADE) | -| [**setOnChainYieldsLockedAutoSubscribe**](OnChainYieldsApi.md#setOnChainYieldsLockedAutoSubscribe) | **POST** /sapi/v1/onchain-yields/locked/setAutoSubscribe | Set On-chain Yields Locked Auto Subscribe(USER_DATA) | -| [**setOnChainYieldsLockedProductRedeemOption**](OnChainYieldsApi.md#setOnChainYieldsLockedProductRedeemOption) | **POST** /sapi/v1/onchain-yields/locked/setRedeemOption | Set On-chain Yields Locked Product Redeem Option(USER_DATA) | -| [**subscribeOnChainYieldsLockedProduct**](OnChainYieldsApi.md#subscribeOnChainYieldsLockedProduct) | **POST** /sapi/v1/onchain-yields/locked/subscribe | Subscribe On-chain Yields Locked Product(TRADE) | +| [**setOnChainYieldsLockedAutoSubscribe**](OnChainYieldsApi.md#setOnChainYieldsLockedAutoSubscribe) | **POST** /sapi/v1/onchain-yields/locked/setAutoSubscribe | Set On-chain Yields Locked Auto Subscribe (USER_DATA) | +| [**setOnChainYieldsLockedProductRedeemOption**](OnChainYieldsApi.md#setOnChainYieldsLockedProductRedeemOption) | **POST** /sapi/v1/onchain-yields/locked/setRedeemOption | Set On-chain Yields Locked Product Redeem Option (USER_DATA) | +| [**subscribeOnChainYieldsLockedProduct**](OnChainYieldsApi.md#subscribeOnChainYieldsLockedProduct) | **POST** /sapi/v1/onchain-yields/locked/subscribe | Subscribe On-chain Yields Locked Product (TRADE) | @@ -24,7 +24,7 @@ All URIs are relative to *https://api.binance.com* Get On-chain Yields Locked Personal Left Quota (USER_DATA) -Get On-chain Yields Locked Personal Left Quota Weight: 50 +Get On-chain Yields Locked Personal Left Quota Weight(IP): 50 Security Type: USER_DATA ### Example ```java @@ -41,8 +41,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); OnChainYieldsApi apiInstance = new OnChainYieldsApi(defaultClient); - String projectId = "projectId_example"; // String | - Long recvWindow = 56L; // Long | + String projectId = "1"; // String | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetOnChainYieldsLockedPersonalLeftQuotaResponse result = apiInstance.getOnChainYieldsLockedPersonalLeftQuota(projectId, recvWindow); System.out.println(result); @@ -62,7 +62,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **projectId** | **String**| | | -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -88,7 +88,7 @@ No authorization required Get On-chain Yields Locked Product List (USER_DATA) -Get available On-chain Yields Locked product list * Get available On-chain Yields Locked product list Weight: 50 +Get available On-chain Yields Locked product list Weight(IP): 50 Security Type: USER_DATA Notes: - Get available On-chain Yields Locked product list ### Example ```java @@ -105,10 +105,10 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); OnChainYieldsApi apiInstance = new OnChainYieldsApi(defaultClient); - String asset = "asset_example"; // String | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + String asset = "SOL"; // String | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | Number of results per page. + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetOnChainYieldsLockedProductListResponse result = apiInstance.getOnChainYieldsLockedProductList(asset, current, size, recvWindow); System.out.println(result); @@ -128,9 +128,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **asset** | **String**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| Number of results per page. | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -156,7 +156,7 @@ No authorization required Get On-chain Yields Locked Product Position (USER_DATA) -Get On-chain Yields Locked Product Position Weight: 50 +Get On-chain Yields Locked Product Position Weight(IP): 50 Security Type: USER_DATA ### Example ```java @@ -173,12 +173,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); OnChainYieldsApi apiInstance = new OnChainYieldsApi(defaultClient); - String asset = "asset_example"; // String | - String positionId = "positionId_example"; // String | - String projectId = "projectId_example"; // String | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + String asset = "BTC"; // String | + String positionId = "1"; // String | + String projectId = "1"; // String | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | Number of results per page. + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetOnChainYieldsLockedProductPositionResponse result = apiInstance.getOnChainYieldsLockedProductPosition(asset, positionId, projectId, current, size, recvWindow); System.out.println(result); @@ -200,9 +200,9 @@ public class Example { | **asset** | **String**| | [optional] | | **positionId** | **String**| | [optional] | | **projectId** | **String**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| Number of results per page. | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -228,7 +228,7 @@ No authorization required Get On-chain Yields Locked Redemption Record (USER_DATA) -Get On-chain Yields Locked Redemption Record * The time between `startTime` and `endTime` cannot be longer than 3 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 50 +Get On-chain Yields Locked Redemption Record Weight(IP): 50 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 3 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -245,14 +245,14 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); OnChainYieldsApi apiInstance = new OnChainYieldsApi(defaultClient); - String positionId = "positionId_example"; // String | - String redeemId = "redeemId_example"; // String | - String asset = "asset_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + String positionId = "1"; // String | + String redeemId = "1"; // String | + String asset = "BTC"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetOnChainYieldsLockedRedemptionRecordResponse result = apiInstance.getOnChainYieldsLockedRedemptionRecord(positionId, redeemId, asset, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -276,9 +276,9 @@ public class Example { | **asset** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -304,7 +304,7 @@ No authorization required Get On-chain Yields Locked Rewards History (USER_DATA) -Get On-chain Yields Locked Rewards History * The time between `startTime` and `endTime` cannot be longer than 3 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 50 +Get On-chain Yields Locked Rewards History Weight(IP): 50 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 3 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -321,13 +321,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); OnChainYieldsApi apiInstance = new OnChainYieldsApi(defaultClient); - String positionId = "positionId_example"; // String | - String asset = "asset_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + String positionId = "1"; // String | + String asset = "BTC"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetOnChainYieldsLockedRewardsHistoryResponse result = apiInstance.getOnChainYieldsLockedRewardsHistory(positionId, asset, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -350,9 +350,9 @@ public class Example { | **asset** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -378,7 +378,7 @@ No authorization required Get On-chain Yields Locked Subscription Preview (USER_DATA) -Get On-chain Yields Locked Subscription Preview Weight: 50 +Get On-chain Yields Locked Subscription Preview Weight(IP): 50 Security Type: USER_DATA ### Example ```java @@ -395,10 +395,10 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); OnChainYieldsApi apiInstance = new OnChainYieldsApi(defaultClient); - String projectId = "projectId_example"; // String | - Double amount = 3.4D; // Double | - Boolean autoSubscribe = true; // Boolean | true or false, default true. - Long recvWindow = 56L; // Long | + String projectId = "1"; // String | + Double amount = 1.0D; // Double | + Boolean autoSubscribe = true; // Boolean | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetOnChainYieldsLockedSubscriptionPreviewResponse result = apiInstance.getOnChainYieldsLockedSubscriptionPreview(projectId, amount, autoSubscribe, recvWindow); System.out.println(result); @@ -419,8 +419,8 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **projectId** | **String**| | | | **amount** | **Double**| | | -| **autoSubscribe** | **Boolean**| true or false, default true. | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **autoSubscribe** | **Boolean**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -446,7 +446,7 @@ No authorization required Get On-chain Yields Locked Subscription Record (USER_DATA) -Get On-chain Yields Locked Subscription Record * The time between `startTime` and `endTime` cannot be longer than 3 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 50 +Get On-chain Yields Locked Subscription Record Weight(IP): 50 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 3 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -463,14 +463,14 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); OnChainYieldsApi apiInstance = new OnChainYieldsApi(defaultClient); - String purchaseId = "purchaseId_example"; // String | - String clientId = "clientId_example"; // String | - String asset = "asset_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + String purchaseId = "1"; // String | + String clientId = "1"; // String | + String asset = "BTC"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetOnChainYieldsLockedSubscriptionRecordResponse result = apiInstance.getOnChainYieldsLockedSubscriptionRecord(purchaseId, clientId, asset, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -494,9 +494,9 @@ public class Example { | **asset** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -522,7 +522,7 @@ No authorization required On-chain Yields Account (USER_DATA) -On-chain Yields Account query Weight: 50 +On-chain Yields Account query Weight(IP): 50 Security Type: USER_DATA ### Example ```java @@ -539,7 +539,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); OnChainYieldsApi apiInstance = new OnChainYieldsApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | The value cannot be greater than `60000` try { OnChainYieldsAccountResponse result = apiInstance.onChainYieldsAccount(recvWindow); System.out.println(result); @@ -558,7 +558,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| The value cannot be greater than `60000` | [optional] | ### Return type @@ -584,7 +584,7 @@ No authorization required Redeem On-chain Yields Locked Product (TRADE) -Redeem On-chain Yields Locked Product * You need to open `Enable Spot & Margin Trading` permission for the API Key which requests this endpoint. Weight: 1/3s per account +Redeem On-chain Yields Locked Product Weight(IP): 200 Security Type: TRADE Notes: - You need to open `Enable Spot & Margin Trading` permission for the API Key which requests this endpoint. ### Example ```java @@ -644,9 +644,9 @@ No authorization required # **setOnChainYieldsLockedAutoSubscribe** > SetOnChainYieldsLockedAutoSubscribeResponse setOnChainYieldsLockedAutoSubscribe(setOnChainYieldsLockedAutoSubscribeRequest) -Set On-chain Yields Locked Auto Subscribe(USER_DATA) +Set On-chain Yields Locked Auto Subscribe (USER_DATA) -Set On-chain Yield locked auto subscribe Weight: 50 +Set On-chain Yield locked auto subscribe Weight(IP): 50 Security Type: USER_DATA ### Example ```java @@ -706,9 +706,9 @@ No authorization required # **setOnChainYieldsLockedProductRedeemOption** > SetOnChainYieldsLockedProductRedeemOptionResponse setOnChainYieldsLockedProductRedeemOption(setOnChainYieldsLockedProductRedeemOptionRequest) -Set On-chain Yields Locked Product Redeem Option(USER_DATA) +Set On-chain Yields Locked Product Redeem Option (USER_DATA) -Set On-chain Yields redeem option for Locked product Weight: 50 +Set On-chain Yields redeem option for Locked product Weight(IP): 50 Security Type: USER_DATA ### Example ```java @@ -768,9 +768,9 @@ No authorization required # **subscribeOnChainYieldsLockedProduct** > SubscribeOnChainYieldsLockedProductResponse subscribeOnChainYieldsLockedProduct(subscribeOnChainYieldsLockedProductRequest) -Subscribe On-chain Yields Locked Product(TRADE) +Subscribe On-chain Yields Locked Product (TRADE) -Subscribe On-chain Yields Locked Product * You need to open `Enable Spot & Margin Trading` permission for the API Key which requests this endpoint. Weight: 200 +Subscribe On-chain Yields Locked Product Weight(IP): 200 Security Type: TRADE Notes: - You need to open `Enable Spot & Margin Trading` permission for the API Key which requests this endpoint. ### Example ```java diff --git a/clients/staking/docs/OrderType.md b/clients/staking/docs/OrderType.md new file mode 100644 index 000000000..f2ca6fbe6 --- /dev/null +++ b/clients/staking/docs/OrderType.md @@ -0,0 +1,13 @@ + + +# OrderType + +## Enum + + +* `CLAIM` (value: `"CLAIM"`) + +* `DISTRIBUTE` (value: `"DISTRIBUTE"`) + + + diff --git a/clients/staking/docs/RedeemEthRequest.md b/clients/staking/docs/RedeemEthRequest.md index 9fb962bdf..49cb18206 100644 --- a/clients/staking/docs/RedeemEthRequest.md +++ b/clients/staking/docs/RedeemEthRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amount** | **Double** | | | -|**asset** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**amount** | **Double** | Amount in BETH, limit 8 decimals | | +|**asset** | **Asset** | | [optional] | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/staking/docs/RedeemEthResponse.md b/clients/staking/docs/RedeemEthResponse.md index 38077a238..4b77332af 100644 --- a/clients/staking/docs/RedeemEthResponse.md +++ b/clients/staking/docs/RedeemEthResponse.md @@ -9,9 +9,9 @@ |------------ | ------------- | ------------- | -------------| |**success** | **Boolean** | | [optional] | |**ethAmount** | **String** | | [optional] | +|**redeemId** | **Long** | | [optional] | |**conversionRatio** | **String** | | [optional] | |**arrivalTime** | **Long** | | [optional] | -|**redeemId** | **Long** | | [optional] | diff --git a/clients/staking/docs/RedeemOnChainYieldsLockedProductRequest.md b/clients/staking/docs/RedeemOnChainYieldsLockedProductRequest.md index 7b022f434..97406ba90 100644 --- a/clients/staking/docs/RedeemOnChainYieldsLockedProductRequest.md +++ b/clients/staking/docs/RedeemOnChainYieldsLockedProductRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**positionId** | **String** | | | +|**positionId** | **String** | Locked product position ID | | |**channelId** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/staking/docs/RedeemSolRequest.md b/clients/staking/docs/RedeemSolRequest.md index c587ee3b8..140392e10 100644 --- a/clients/staking/docs/RedeemSolRequest.md +++ b/clients/staking/docs/RedeemSolRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amount** | **Double** | | | -|**recvWindow** | **Long** | | [optional] | +|**amount** | **Double** | Amount in BNSOL, limit 8 decimals | | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/staking/docs/RedeemSolResponse.md b/clients/staking/docs/RedeemSolResponse.md index 631ef075d..286c43248 100644 --- a/clients/staking/docs/RedeemSolResponse.md +++ b/clients/staking/docs/RedeemSolResponse.md @@ -9,9 +9,9 @@ |------------ | ------------- | ------------- | -------------| |**success** | **Boolean** | | [optional] | |**solAmount** | **String** | | [optional] | +|**redeemId** | **Long** | | [optional] | |**exchangeRate** | **String** | | [optional] | |**arrivalTime** | **Long** | | [optional] | -|**redeemId** | **Long** | | [optional] | diff --git a/clients/staking/docs/RedeemTo.md b/clients/staking/docs/RedeemTo.md new file mode 100644 index 000000000..5ebbf054d --- /dev/null +++ b/clients/staking/docs/RedeemTo.md @@ -0,0 +1,13 @@ + + +# RedeemTo + +## Enum + + +* `SPOT` (value: `"SPOT"`) + +* `FLEXIBLE` (value: `"FLEXIBLE"`) + + + diff --git a/clients/staking/docs/SetOnChainYieldsLockedAutoSubscribeRequest.md b/clients/staking/docs/SetOnChainYieldsLockedAutoSubscribeRequest.md index 62d183bae..83148dbe4 100644 --- a/clients/staking/docs/SetOnChainYieldsLockedAutoSubscribeRequest.md +++ b/clients/staking/docs/SetOnChainYieldsLockedAutoSubscribeRequest.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**positionId** | **String** | | | |**autoSubscribe** | **Boolean** | | | -|**recvWindow** | **Long** | | [optional] | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/staking/docs/SetOnChainYieldsLockedProductRedeemOptionRequest.md b/clients/staking/docs/SetOnChainYieldsLockedProductRedeemOptionRequest.md index 4abaa151c..378d049aa 100644 --- a/clients/staking/docs/SetOnChainYieldsLockedProductRedeemOptionRequest.md +++ b/clients/staking/docs/SetOnChainYieldsLockedProductRedeemOptionRequest.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**positionId** | **String** | | | -|**redeemTo** | **String** | | | -|**recvWindow** | **Long** | | [optional] | +|**redeemTo** | **RedeemTo** | | | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/staking/docs/SoftStakingApi.md b/clients/staking/docs/SoftStakingApi.md index 252a2468b..1eb2a2523 100644 --- a/clients/staking/docs/SoftStakingApi.md +++ b/clients/staking/docs/SoftStakingApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**getSoftStakingProductList**](SoftStakingApi.md#getSoftStakingProductList) | **GET** /sapi/v1/soft-staking/list | Get Soft Staking Product List (USER_DATA) | -| [**getSoftStakingRewardsHistory**](SoftStakingApi.md#getSoftStakingRewardsHistory) | **GET** /sapi/v1/soft-staking/history/rewardsRecord | Get Soft Staking Rewards History(USER_DATA) | +| [**getSoftStakingRewardsHistory**](SoftStakingApi.md#getSoftStakingRewardsHistory) | **GET** /sapi/v1/soft-staking/history/rewardsRecord | Get Soft Staking Rewards History (USER_DATA) | | [**setSoftStaking**](SoftStakingApi.md#setSoftStaking) | **GET** /sapi/v1/soft-staking/set | Set Soft Staking (USER_DATA) | @@ -15,7 +15,7 @@ All URIs are relative to *https://api.binance.com* Get Soft Staking Product List (USER_DATA) -Get the available Soft Staking product list. Weight: 50 +Get the available Soft Staking product list. Weight(IP): 50 Security Type: USER_DATA ### Example ```java @@ -32,10 +32,10 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); SoftStakingApi apiInstance = new SoftStakingApi(defaultClient); - String asset = "asset_example"; // String | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + String asset = "BTC"; // String | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetSoftStakingProductListResponse result = apiInstance.getSoftStakingProductList(asset, current, size, recvWindow); System.out.println(result); @@ -55,9 +55,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **asset** | **String**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -81,9 +81,9 @@ No authorization required # **getSoftStakingRewardsHistory** > GetSoftStakingRewardsHistoryResponse getSoftStakingRewardsHistory(asset, startTime, endTime, current, size, recvWindow) -Get Soft Staking Rewards History(USER_DATA) +Get Soft Staking Rewards History (USER_DATA) -* The time between `startTime` and `endTime` cannot be longer than 3 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 50 +Get Soft Staking Rewards History Weight(IP): 50 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 3 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -100,12 +100,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); SoftStakingApi apiInstance = new SoftStakingApi(defaultClient); - String asset = "asset_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + String asset = "BTC"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetSoftStakingRewardsHistoryResponse result = apiInstance.getSoftStakingRewardsHistory(asset, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -127,9 +127,9 @@ public class Example { | **asset** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -155,7 +155,7 @@ No authorization required Set Soft Staking (USER_DATA) -Enable or disable Soft Staking. Weight: 50 +Enable or disable Soft Staking. Weight(IP): 50 Security Type: USER_DATA ### Example ```java @@ -172,8 +172,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); SoftStakingApi apiInstance = new SoftStakingApi(defaultClient); - Boolean softStaking = true; // Boolean | true or false - Long recvWindow = 56L; // Long | + Boolean softStaking = true; // Boolean | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { SetSoftStakingResponse result = apiInstance.setSoftStaking(softStaking, recvWindow); System.out.println(result); @@ -192,8 +192,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **softStaking** | **Boolean**| true or false | | -| **recvWindow** | **Long**| | [optional] | +| **softStaking** | **Boolean**| | | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type diff --git a/clients/staking/docs/SolStakingApi.md b/clients/staking/docs/SolStakingApi.md index ea6629113..cfa0276b8 100644 --- a/clients/staking/docs/SolStakingApi.md +++ b/clients/staking/docs/SolStakingApi.md @@ -4,26 +4,26 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**claimBoostRewards**](SolStakingApi.md#claimBoostRewards) | **POST** /sapi/v1/sol-staking/sol/claim | Claim Boost Rewards(TRADE) | -| [**getBnsolRateHistory**](SolStakingApi.md#getBnsolRateHistory) | **GET** /sapi/v1/sol-staking/sol/history/rateHistory | Get BNSOL Rate History(USER_DATA) | -| [**getBnsolRewardsHistory**](SolStakingApi.md#getBnsolRewardsHistory) | **GET** /sapi/v1/sol-staking/sol/history/bnsolRewardsHistory | Get BNSOL rewards history(USER_DATA) | -| [**getBoostRewardsHistory**](SolStakingApi.md#getBoostRewardsHistory) | **GET** /sapi/v1/sol-staking/sol/history/boostRewardsHistory | Get Boost Rewards History(USER_DATA) | -| [**getSolRedemptionHistory**](SolStakingApi.md#getSolRedemptionHistory) | **GET** /sapi/v1/sol-staking/sol/history/redemptionHistory | Get SOL redemption history(USER_DATA) | -| [**getSolStakingHistory**](SolStakingApi.md#getSolStakingHistory) | **GET** /sapi/v1/sol-staking/sol/history/stakingHistory | Get SOL staking history(USER_DATA) | -| [**getSolStakingQuotaDetails**](SolStakingApi.md#getSolStakingQuotaDetails) | **GET** /sapi/v1/sol-staking/sol/quota | Get SOL staking quota details(USER_DATA) | -| [**getUnclaimedRewards**](SolStakingApi.md#getUnclaimedRewards) | **GET** /sapi/v1/sol-staking/sol/history/unclaimedRewards | Get Unclaimed Rewards(USER_DATA) | -| [**redeemSol**](SolStakingApi.md#redeemSol) | **POST** /sapi/v1/sol-staking/sol/redeem | Redeem SOL(TRADE) | -| [**solStakingAccount**](SolStakingApi.md#solStakingAccount) | **GET** /sapi/v1/sol-staking/account | SOL Staking account(USER_DATA) | -| [**subscribeSolStaking**](SolStakingApi.md#subscribeSolStaking) | **POST** /sapi/v1/sol-staking/sol/stake | Subscribe SOL Staking(TRADE) | +| [**claimBoostRewards**](SolStakingApi.md#claimBoostRewards) | **POST** /sapi/v1/sol-staking/sol/claim | Claim Boost Rewards (TRADE) | +| [**getBnsolRateHistory**](SolStakingApi.md#getBnsolRateHistory) | **GET** /sapi/v1/sol-staking/sol/history/rateHistory | Get BNSOL Rate History (USER_DATA) | +| [**getBnsolRewardsHistory**](SolStakingApi.md#getBnsolRewardsHistory) | **GET** /sapi/v1/sol-staking/sol/history/bnsolRewardsHistory | Get BNSOL rewards history (USER_DATA) | +| [**getBoostRewardsHistory**](SolStakingApi.md#getBoostRewardsHistory) | **GET** /sapi/v1/sol-staking/sol/history/boostRewardsHistory | Get Boost Rewards History (USER_DATA) | +| [**getSolRedemptionHistory**](SolStakingApi.md#getSolRedemptionHistory) | **GET** /sapi/v1/sol-staking/sol/history/redemptionHistory | Get SOL redemption history (USER_DATA) | +| [**getSolStakingHistory**](SolStakingApi.md#getSolStakingHistory) | **GET** /sapi/v1/sol-staking/sol/history/stakingHistory | Get SOL staking history (USER_DATA) | +| [**getSolStakingQuotaDetails**](SolStakingApi.md#getSolStakingQuotaDetails) | **GET** /sapi/v1/sol-staking/sol/quota | Get SOL staking quota details (USER_DATA) | +| [**getUnclaimedRewards**](SolStakingApi.md#getUnclaimedRewards) | **GET** /sapi/v1/sol-staking/sol/history/unclaimedRewards | Get Unclaimed Rewards (USER_DATA) | +| [**redeemSol**](SolStakingApi.md#redeemSol) | **POST** /sapi/v1/sol-staking/sol/redeem | Redeem SOL (TRADE) | +| [**solStakingAccount**](SolStakingApi.md#solStakingAccount) | **GET** /sapi/v1/sol-staking/account | SOL Staking account (USER_DATA) | +| [**subscribeSolStaking**](SolStakingApi.md#subscribeSolStaking) | **POST** /sapi/v1/sol-staking/sol/stake | Subscribe SOL Staking (TRADE) | # **claimBoostRewards** > ClaimBoostRewardsResponse claimBoostRewards(claimBoostRewardsRequest) -Claim Boost Rewards(TRADE) +Claim Boost Rewards (TRADE) -Claim Boost APR Airdrop Rewards * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight: 150 +Claim Boost APR Airdrop Rewards Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. ### Example ```java @@ -59,7 +59,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **claimBoostRewardsRequest** | [**ClaimBoostRewardsRequest**](ClaimBoostRewardsRequest.md)| | | +| **claimBoostRewardsRequest** | [**ClaimBoostRewardsRequest**](ClaimBoostRewardsRequest.md)| | [optional] | ### Return type @@ -83,9 +83,9 @@ No authorization required # **getBnsolRateHistory** > GetBnsolRateHistoryResponse getBnsolRateHistory(startTime, endTime, current, size, recvWindow) -Get BNSOL Rate History(USER_DATA) +Get BNSOL Rate History (USER_DATA) -Get BNSOL Rate History * The time between `startTime` and `endTime` cannot be longer than 3 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get BNSOL Rate History Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 3 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -102,11 +102,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); SolStakingApi apiInstance = new SolStakingApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 try { GetBnsolRateHistoryResponse result = apiInstance.getBnsolRateHistory(startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -127,9 +127,9 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| The value cannot be greater than 60000 | [optional] | ### Return type @@ -153,9 +153,9 @@ No authorization required # **getBnsolRewardsHistory** > GetBnsolRewardsHistoryResponse getBnsolRewardsHistory(startTime, endTime, current, size, recvWindow) -Get BNSOL rewards history(USER_DATA) +Get BNSOL rewards history (USER_DATA) -Get BNSOL rewards history * The time between `startTime` and `endTime` cannot be longer than 3 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get BNSOL rewards history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 3 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -172,11 +172,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); SolStakingApi apiInstance = new SolStakingApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetBnsolRewardsHistoryResponse result = apiInstance.getBnsolRewardsHistory(startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -197,9 +197,9 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -223,9 +223,9 @@ No authorization required # **getBoostRewardsHistory** > GetBoostRewardsHistoryResponse getBoostRewardsHistory(type, startTime, endTime, current, size, recvWindow) -Get Boost Rewards History(USER_DATA) +Get Boost Rewards History (USER_DATA) -Get Boost rewards history * The time between `startTime` and `endTime` cannot be longer than 3 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get Boost rewards history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 3 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -242,12 +242,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); SolStakingApi apiInstance = new SolStakingApi(defaultClient); - String type = "type_example"; // String | \"CLAIM\", \"DISTRIBUTE\", default \"CLAIM\" - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + OrderType type = OrderType.fromValue("CLAIM"); // OrderType | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetBoostRewardsHistoryResponse result = apiInstance.getBoostRewardsHistory(type, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -266,12 +266,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **type** | **String**| \"CLAIM\", \"DISTRIBUTE\", default \"CLAIM\" | | +| **type** | [**OrderType**](.md)| | [default to CLAIM] [enum: CLAIM, DISTRIBUTE] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -295,9 +295,9 @@ No authorization required # **getSolRedemptionHistory** > GetSolRedemptionHistoryResponse getSolRedemptionHistory(redeemId, startTime, endTime, current, size, recvWindow) -Get SOL redemption history(USER_DATA) +Get SOL redemption history (USER_DATA) -Get SOL redemption history * The time between `startTime` and `endTime` cannot be longer than 3 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get SOL redemption history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 3 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -314,12 +314,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); SolStakingApi apiInstance = new SolStakingApi(defaultClient); - Long redeemId = 56L; // Long | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + Long redeemId = 1234567L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetSolRedemptionHistoryResponse result = apiInstance.getSolRedemptionHistory(redeemId, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -341,9 +341,9 @@ public class Example { | **redeemId** | **Long**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -367,9 +367,9 @@ No authorization required # **getSolStakingHistory** > GetSolStakingHistoryResponse getSolStakingHistory(purchaseId, startTime, endTime, current, size, recvWindow) -Get SOL staking history(USER_DATA) +Get SOL staking history (USER_DATA) -Get SOL staking history * The time between `startTime` and `endTime` cannot be longer than 3 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get SOL staking history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 3 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -386,12 +386,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); SolStakingApi apiInstance = new SolStakingApi(defaultClient); - Long purchaseId = 56L; // Long | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Currently querying page. Start from 1. Default:1 - Long size = 56L; // Long | Default:10, Max:100 - Long recvWindow = 56L; // Long | + Long purchaseId = 1234567L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | Currently querying page + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetSolStakingHistoryResponse result = apiInstance.getSolStakingHistory(purchaseId, startTime, endTime, current, size, recvWindow); System.out.println(result); @@ -413,9 +413,9 @@ public class Example { | **purchaseId** | **Long**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| Currently querying page. Start from 1. Default:1 | [optional] | -| **size** | **Long**| Default:10, Max:100 | [optional] | -| **recvWindow** | **Long**| | [optional] | +| **current** | **Long**| Currently querying page | [optional] | +| **size** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -439,9 +439,9 @@ No authorization required # **getSolStakingQuotaDetails** > GetSolStakingQuotaDetailsResponse getSolStakingQuotaDetails(recvWindow) -Get SOL staking quota details(USER_DATA) +Get SOL staking quota details (USER_DATA) -Get SOL staking quota Weight: 150 +Get SOL staking quota Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -458,7 +458,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); SolStakingApi apiInstance = new SolStakingApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 try { GetSolStakingQuotaDetailsResponse result = apiInstance.getSolStakingQuotaDetails(recvWindow); System.out.println(result); @@ -477,7 +477,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| The value cannot be greater than 60000 | [optional] | ### Return type @@ -501,9 +501,9 @@ No authorization required # **getUnclaimedRewards** > GetUnclaimedRewardsResponse getUnclaimedRewards(recvWindow) -Get Unclaimed Rewards(USER_DATA) +Get Unclaimed Rewards (USER_DATA) -Get Unclaimed rewards * The time between `startTime` and `endTime` cannot be longer than 3 months. * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. Weight: 150 +Get Unclaimed rewards Weight(IP): 150 Security Type: USER_DATA Notes: - The time between `startTime` and `endTime` cannot be longer than 3 months. - If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned. - If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned. - If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned. ### Example ```java @@ -520,7 +520,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); SolStakingApi apiInstance = new SolStakingApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | Request validity window in milliseconds. try { GetUnclaimedRewardsResponse result = apiInstance.getUnclaimedRewards(recvWindow); System.out.println(result); @@ -539,7 +539,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| Request validity window in milliseconds. | [optional] | ### Return type @@ -563,9 +563,9 @@ No authorization required # **redeemSol** > RedeemSolResponse redeemSol(redeemSolRequest) -Redeem SOL(TRADE) +Redeem SOL (TRADE) -Redeem BNSOL get SOL * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight: 150 +Redeem BNSOL get SOL Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. ### Example ```java @@ -625,9 +625,9 @@ No authorization required # **solStakingAccount** > SolStakingAccountResponse solStakingAccount(recvWindow) -SOL Staking account(USER_DATA) +SOL Staking account (USER_DATA) -SOL Staking account Weight: 150 +SOL Staking account Weight(IP): 150 Security Type: USER_DATA ### Example ```java @@ -644,7 +644,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); SolStakingApi apiInstance = new SolStakingApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | The value cannot be greater than 60000 try { SolStakingAccountResponse result = apiInstance.solStakingAccount(recvWindow); System.out.println(result); @@ -663,7 +663,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **recvWindow** | **Long**| | [optional] | +| **recvWindow** | **Long**| The value cannot be greater than 60000 | [optional] | ### Return type @@ -687,9 +687,9 @@ No authorization required # **subscribeSolStaking** > SubscribeSolStakingResponse subscribeSolStaking(subscribeSolStakingRequest) -Subscribe SOL Staking(TRADE) +Subscribe SOL Staking (TRADE) -Subscribe SOL Staking * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight: 150 +Subscribe SOL Staking Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. ### Example ```java diff --git a/clients/staking/docs/SourceAccount.md b/clients/staking/docs/SourceAccount.md new file mode 100644 index 000000000..752c54258 --- /dev/null +++ b/clients/staking/docs/SourceAccount.md @@ -0,0 +1,15 @@ + + +# SourceAccount + +## Enum + + +* `SPOT` (value: `"SPOT"`) + +* `FUND` (value: `"FUND"`) + +* `ALL` (value: `"ALL"`) + + + diff --git a/clients/staking/docs/SubscribeEthStakingRequest.md b/clients/staking/docs/SubscribeEthStakingRequest.md index 074fcb736..48b0b8fef 100644 --- a/clients/staking/docs/SubscribeEthStakingRequest.md +++ b/clients/staking/docs/SubscribeEthStakingRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amount** | **Double** | | | -|**recvWindow** | **Long** | | [optional] | +|**amount** | **Double** | Amount in ETH, limit 4 decimals | | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/staking/docs/SubscribeEthStakingResponse.md b/clients/staking/docs/SubscribeEthStakingResponse.md index dc0a28405..98ea327b6 100644 --- a/clients/staking/docs/SubscribeEthStakingResponse.md +++ b/clients/staking/docs/SubscribeEthStakingResponse.md @@ -9,8 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**success** | **Boolean** | | [optional] | |**wbethAmount** | **String** | | [optional] | -|**conversionRatio** | **String** | | [optional] | |**purchaseId** | **Long** | | [optional] | +|**conversionRatio** | **String** | | [optional] | diff --git a/clients/staking/docs/SubscribeOnChainYieldsLockedProductRequest.md b/clients/staking/docs/SubscribeOnChainYieldsLockedProductRequest.md index 20c183125..648451e22 100644 --- a/clients/staking/docs/SubscribeOnChainYieldsLockedProductRequest.md +++ b/clients/staking/docs/SubscribeOnChainYieldsLockedProductRequest.md @@ -10,11 +10,11 @@ |**projectId** | **String** | | | |**amount** | **Double** | | | |**autoSubscribe** | **Boolean** | | [optional] | -|**sourceAccount** | **String** | | [optional] | -|**redeemTo** | **String** | | [optional] | +|**sourceAccount** | **SourceAccount** | | [optional] | +|**redeemTo** | **RedeemTo** | | [optional] | |**channelId** | **String** | | [optional] | |**clientId** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/staking/docs/SubscribeSolStakingRequest.md b/clients/staking/docs/SubscribeSolStakingRequest.md index 575937cfa..aad3859e1 100644 --- a/clients/staking/docs/SubscribeSolStakingRequest.md +++ b/clients/staking/docs/SubscribeSolStakingRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amount** | **Double** | | | -|**recvWindow** | **Long** | | [optional] | +|**amount** | **Double** | Amount in SOL. | | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/staking/docs/SubscribeSolStakingResponse.md b/clients/staking/docs/SubscribeSolStakingResponse.md index 7aab3c5c3..36dd90522 100644 --- a/clients/staking/docs/SubscribeSolStakingResponse.md +++ b/clients/staking/docs/SubscribeSolStakingResponse.md @@ -9,8 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**success** | **Boolean** | | [optional] | |**bnsolAmount** | **String** | | [optional] | -|**exchangeRate** | **String** | | [optional] | |**purchaseId** | **Long** | | [optional] | +|**exchangeRate** | **String** | | [optional] | diff --git a/clients/staking/docs/WrapBethRequest.md b/clients/staking/docs/WrapBethRequest.md index 49cebfd10..6ab830403 100644 --- a/clients/staking/docs/WrapBethRequest.md +++ b/clients/staking/docs/WrapBethRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**amount** | **Double** | | | -|**recvWindow** | **Long** | | [optional] | +|**amount** | **Double** | Amount in BETH, limit 4 decimals | | +|**recvWindow** | **Long** | Request validity window in milliseconds. | [optional] | diff --git a/clients/staking/docs/rest-api/migration-guide.md b/clients/staking/docs/rest-api/migration-guide.md index cb954ac6b..e722d62f3 100644 --- a/clients/staking/docs/rest-api/migration-guide.md +++ b/clients/staking/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-staking - 5.0.0 + 6.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-staking - 5.0.0 + 6.0.0 ``` diff --git a/clients/staking/example_rest.md b/clients/staking/example_rest.md index 001094369..85a3a5a53 100644 --- a/clients/staking/example_rest.md +++ b/clients/staking/example_rest.md @@ -1,82 +1,82 @@ ## EthStaking -[GET /sapi/v2/eth-staking/account](https://developers.binance.com/docs/staking/eth-staking/account/ETH-Staking-account) - ethStakingAccount - [EthStakingAccountExample.java:46](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/EthStakingAccountExample.java#L46) +[GET /sapi/v2/eth-staking/account](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#eth-staking-account) - ethStakingAccount - [EthStakingAccountExample.java:35](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/EthStakingAccountExample.java#L35) -[GET /sapi/v1/eth-staking/eth/quota](https://developers.binance.com/docs/staking/eth-staking/account/Get-current-ETH-staking-quota) - getCurrentEthStakingQuota - [GetCurrentEthStakingQuotaExample.java:46](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetCurrentEthStakingQuotaExample.java#L46) +[GET /sapi/v1/eth-staking/eth/quota](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-current-eth-staking-quota) - getCurrentEthStakingQuota - [GetCurrentEthStakingQuotaExample.java:35](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetCurrentEthStakingQuotaExample.java#L35) -[GET /sapi/v1/eth-staking/eth/history/redemptionHistory](https://developers.binance.com/docs/staking/eth-staking/history/Get-ETH-redemption-history) - getEthRedemptionHistory - [GetEthRedemptionHistoryExample.java:52](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetEthRedemptionHistoryExample.java#L52) +[GET /sapi/v1/eth-staking/eth/history/redemptionHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-eth-redemption-history) - getEthRedemptionHistory - [GetEthRedemptionHistoryExample.java:41](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetEthRedemptionHistoryExample.java#L41) -[GET /sapi/v1/eth-staking/eth/history/stakingHistory](https://developers.binance.com/docs/staking/eth-staking/history/Get-ETH-staking-history) - getEthStakingHistory - [GetEthStakingHistoryExample.java:52](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetEthStakingHistoryExample.java#L52) +[GET /sapi/v1/eth-staking/eth/history/stakingHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-eth-staking-history) - getEthStakingHistory - [GetEthStakingHistoryExample.java:41](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetEthStakingHistoryExample.java#L41) -[GET /sapi/v1/eth-staking/eth/history/rateHistory](https://developers.binance.com/docs/staking/eth-staking/history/Get-BETH-Rate-History) - getWbethRateHistory - [GetWbethRateHistoryExample.java:52](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethRateHistoryExample.java#L52) +[GET /sapi/v1/eth-staking/eth/history/rateHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-wbeth-rate-history) - getWbethRateHistory - [GetWbethRateHistoryExample.java:41](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethRateHistoryExample.java#L41) -[GET /sapi/v1/eth-staking/eth/history/wbethRewardsHistory](https://developers.binance.com/docs/staking/eth-staking/history/Get-WBETH-rewards-history) - getWbethRewardsHistory - [GetWbethRewardsHistoryExample.java:52](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethRewardsHistoryExample.java#L52) +[GET /sapi/v1/eth-staking/eth/history/wbethRewardsHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-wbeth-rewards-history) - getWbethRewardsHistory - [GetWbethRewardsHistoryExample.java:41](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethRewardsHistoryExample.java#L41) -[GET /sapi/v1/eth-staking/wbeth/history/unwrapHistory](https://developers.binance.com/docs/staking/eth-staking/history/Get-WBETH-unwrap-history) - getWbethUnwrapHistory - [GetWbethUnwrapHistoryExample.java:52](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethUnwrapHistoryExample.java#L52) +[GET /sapi/v1/eth-staking/wbeth/history/unwrapHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-wbeth-unwrap-history) - getWbethUnwrapHistory - [GetWbethUnwrapHistoryExample.java:41](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethUnwrapHistoryExample.java#L41) -[GET /sapi/v1/eth-staking/wbeth/history/wrapHistory](https://developers.binance.com/docs/staking/eth-staking/history/Get-WBETH-wrap-history) - getWbethWrapHistory - [GetWbethWrapHistoryExample.java:52](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethWrapHistoryExample.java#L52) +[GET /sapi/v1/eth-staking/wbeth/history/wrapHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-wbeth-wrap-history) - getWbethWrapHistory - [GetWbethWrapHistoryExample.java:41](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethWrapHistoryExample.java#L41) -[POST /sapi/v1/eth-staking/eth/redeem](https://developers.binance.com/docs/staking/eth-staking/staking/Redeem-ETH) - redeemEth - [RedeemEthExample.java:48](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/RedeemEthExample.java#L48) +[POST /sapi/v1/eth-staking/eth/redeem](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#redeem-eth) - redeemEth - [RedeemEthExample.java:38](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/RedeemEthExample.java#L38) -[POST /sapi/v2/eth-staking/eth/stake](https://developers.binance.com/docs/staking/eth-staking/staking/Subscribe-ETH-Staking) - subscribeEthStaking - [SubscribeEthStakingExample.java:48](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/SubscribeEthStakingExample.java#L48) +[POST /sapi/v2/eth-staking/eth/stake](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#subscribe-eth-staking) - subscribeEthStaking - [SubscribeEthStakingExample.java:37](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/SubscribeEthStakingExample.java#L37) -[POST /sapi/v1/eth-staking/wbeth/wrap](https://developers.binance.com/docs/staking/eth-staking/staking/Wrap-BETH) - wrapBeth - [WrapBethExample.java:48](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/WrapBethExample.java#L48) +[POST /sapi/v1/eth-staking/wbeth/wrap](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#wrap-beth) - wrapBeth - [WrapBethExample.java:37](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/WrapBethExample.java#L37) ## OnChainYields -[GET /sapi/v1/onchain-yields/locked/personalLeftQuota](https://developers.binance.com/docs/staking/on-chain-yields/account/Get-Onchain-Locked-Personal-Left-Quota) - getOnChainYieldsLockedPersonalLeftQuota - [GetOnChainYieldsLockedPersonalLeftQuotaExample.java:46](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedPersonalLeftQuotaExample.java#L46) +[GET /sapi/v1/onchain-yields/locked/personalLeftQuota](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-personal-left-quota) - getOnChainYieldsLockedPersonalLeftQuota - [GetOnChainYieldsLockedPersonalLeftQuotaExample.java:35](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedPersonalLeftQuotaExample.java#L35) -[GET /sapi/v1/onchain-yields/locked/list](https://developers.binance.com/docs/staking/on-chain-yields/account/) - getOnChainYieldsLockedProductList - [GetOnChainYieldsLockedProductListExample.java:47](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedProductListExample.java#L47) +[GET /sapi/v1/onchain-yields/locked/list](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-product-list) - getOnChainYieldsLockedProductList - [GetOnChainYieldsLockedProductListExample.java:36](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedProductListExample.java#L36) -[GET /sapi/v1/onchain-yields/locked/position](https://developers.binance.com/docs/staking/on-chain-yields/account/Get-Onchain-Locked-Product-Position) - getOnChainYieldsLockedProductPosition - [GetOnChainYieldsLockedProductPositionExample.java:46](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedProductPositionExample.java#L46) +[GET /sapi/v1/onchain-yields/locked/position](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-product-position) - getOnChainYieldsLockedProductPosition - [GetOnChainYieldsLockedProductPositionExample.java:35](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedProductPositionExample.java#L35) -[GET /sapi/v1/onchain-yields/locked/history/redemptionRecord](https://developers.binance.com/docs/staking/on-chain-yields/history/Get-Onchain-Locked-Redemption-Record) - getOnChainYieldsLockedRedemptionRecord - [GetOnChainYieldsLockedRedemptionRecordExample.java:52](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedRedemptionRecordExample.java#L52) +[GET /sapi/v1/onchain-yields/locked/history/redemptionRecord](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-redemption-record) - getOnChainYieldsLockedRedemptionRecord - [GetOnChainYieldsLockedRedemptionRecordExample.java:42](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedRedemptionRecordExample.java#L42) -[GET /sapi/v1/onchain-yields/locked/history/rewardsRecord](https://developers.binance.com/docs/staking/on-chain-yields/history/Get-Onchain-Locked-Rewards-History) - getOnChainYieldsLockedRewardsHistory - [GetOnChainYieldsLockedRewardsHistoryExample.java:52](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedRewardsHistoryExample.java#L52) +[GET /sapi/v1/onchain-yields/locked/history/rewardsRecord](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-rewards-history) - getOnChainYieldsLockedRewardsHistory - [GetOnChainYieldsLockedRewardsHistoryExample.java:42](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedRewardsHistoryExample.java#L42) -[GET /sapi/v1/onchain-yields/locked/subscriptionPreview](https://developers.binance.com/docs/staking/on-chain-yields/earn/) - getOnChainYieldsLockedSubscriptionPreview - [GetOnChainYieldsLockedSubscriptionPreviewExample.java:46](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedSubscriptionPreviewExample.java#L46) +[GET /sapi/v1/onchain-yields/locked/subscriptionPreview](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-subscription-preview) - getOnChainYieldsLockedSubscriptionPreview - [GetOnChainYieldsLockedSubscriptionPreviewExample.java:35](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedSubscriptionPreviewExample.java#L35) -[GET /sapi/v1/onchain-yields/locked/history/subscriptionRecord](https://developers.binance.com/docs/staking/on-chain-yields/history/) - getOnChainYieldsLockedSubscriptionRecord - [GetOnChainYieldsLockedSubscriptionRecordExample.java:52](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedSubscriptionRecordExample.java#L52) +[GET /sapi/v1/onchain-yields/locked/history/subscriptionRecord](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-subscription-record) - getOnChainYieldsLockedSubscriptionRecord - [GetOnChainYieldsLockedSubscriptionRecordExample.java:42](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedSubscriptionRecordExample.java#L42) -[GET /sapi/v1/onchain-yields/account](https://developers.binance.com/docs/staking/on-chain-yields/account/Onchain-Account) - onChainYieldsAccount - [OnChainYieldsAccountExample.java:46](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/OnChainYieldsAccountExample.java#L46) +[GET /sapi/v1/onchain-yields/account](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#on-chain-yields-account) - onChainYieldsAccount - [OnChainYieldsAccountExample.java:35](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/OnChainYieldsAccountExample.java#L35) -[POST /sapi/v1/onchain-yields/locked/redeem](https://developers.binance.com/docs/staking/on-chain-yields/earn/Redeem-Onchain-Locked-Product) - redeemOnChainYieldsLockedProduct - [RedeemOnChainYieldsLockedProductExample.java:49](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/RedeemOnChainYieldsLockedProductExample.java#L49) +[POST /sapi/v1/onchain-yields/locked/redeem](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#redeem-on-chain-yields-locked-product) - redeemOnChainYieldsLockedProduct - [RedeemOnChainYieldsLockedProductExample.java:38](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/RedeemOnChainYieldsLockedProductExample.java#L38) -[POST /sapi/v1/onchain-yields/locked/setAutoSubscribe](https://developers.binance.com/docs/staking/on-chain-yields/earn/Set-Onchain-Locked-Auto-Subscribe) - setOnChainYieldsLockedAutoSubscribe - [SetOnChainYieldsLockedAutoSubscribeExample.java:47](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SetOnChainYieldsLockedAutoSubscribeExample.java#L47) +[POST /sapi/v1/onchain-yields/locked/setAutoSubscribe](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#set-on-chain-yields-locked-auto-subscribe) - setOnChainYieldsLockedAutoSubscribe - [SetOnChainYieldsLockedAutoSubscribeExample.java:36](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SetOnChainYieldsLockedAutoSubscribeExample.java#L36) -[POST /sapi/v1/onchain-yields/locked/setRedeemOption](https://developers.binance.com/docs/staking/on-chain-yields/earn/Set-Onchain-Locked-Redeem-Option) - setOnChainYieldsLockedProductRedeemOption - [SetOnChainYieldsLockedProductRedeemOptionExample.java:47](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SetOnChainYieldsLockedProductRedeemOptionExample.java#L47) +[POST /sapi/v1/onchain-yields/locked/setRedeemOption](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#set-on-chain-yields-locked-product-redeem-option) - setOnChainYieldsLockedProductRedeemOption - [SetOnChainYieldsLockedProductRedeemOptionExample.java:38](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SetOnChainYieldsLockedProductRedeemOptionExample.java#L38) -[POST /sapi/v1/onchain-yields/locked/subscribe](https://developers.binance.com/docs/staking/on-chain-yields/earn/Subscribe-Onchain-Locked-Product) - subscribeOnChainYieldsLockedProduct - [SubscribeOnChainYieldsLockedProductExample.java:48](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SubscribeOnChainYieldsLockedProductExample.java#L48) +[POST /sapi/v1/onchain-yields/locked/subscribe](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#subscribe-on-chain-yields-locked-product) - subscribeOnChainYieldsLockedProduct - [SubscribeOnChainYieldsLockedProductExample.java:38](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SubscribeOnChainYieldsLockedProductExample.java#L38) ## SoftStaking -[GET /sapi/v1/soft-staking/list](https://developers.binance.com/docs/staking/soft-staking/) - getSoftStakingProductList - [GetSoftStakingProductListExample.java:46](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/GetSoftStakingProductListExample.java#L46) +[GET /sapi/v1/soft-staking/list](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/soft-staking#get-soft-staking-product-list) - getSoftStakingProductList - [GetSoftStakingProductListExample.java:35](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/GetSoftStakingProductListExample.java#L35) -[GET /sapi/v1/soft-staking/history/rewardsRecord](https://developers.binance.com/docs/staking/soft-staking/Get-Soft-Staking-Rewards-History) - getSoftStakingRewardsHistory - [GetSoftStakingRewardsHistoryExample.java:52](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/GetSoftStakingRewardsHistoryExample.java#L52) +[GET /sapi/v1/soft-staking/history/rewardsRecord](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/soft-staking#get-soft-staking-rewards-history) - getSoftStakingRewardsHistory - [GetSoftStakingRewardsHistoryExample.java:41](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/GetSoftStakingRewardsHistoryExample.java#L41) -[GET /sapi/v1/soft-staking/set](https://developers.binance.com/docs/staking/soft-staking/Set-Soft-Staking) - setSoftStaking - [SetSoftStakingExample.java:46](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/SetSoftStakingExample.java#L46) +[GET /sapi/v1/soft-staking/set](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/soft-staking#set-soft-staking) - setSoftStaking - [SetSoftStakingExample.java:35](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/SetSoftStakingExample.java#L35) ## SolStaking -[POST /sapi/v1/sol-staking/sol/claim](https://developers.binance.com/docs/staking/sol-staking/staking/Claim-Boost-Rewards) - claimBoostRewards - [ClaimBoostRewardsExample.java:48](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/ClaimBoostRewardsExample.java#L48) +[POST /sapi/v1/sol-staking/sol/claim](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#claim-boost-rewards) - claimBoostRewards - [ClaimBoostRewardsExample.java:38](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/ClaimBoostRewardsExample.java#L38) -[GET /sapi/v1/sol-staking/sol/history/rateHistory](https://developers.binance.com/docs/staking/sol-staking/history/Get-BNSOL-Rate-History) - getBnsolRateHistory - [GetBnsolRateHistoryExample.java:52](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBnsolRateHistoryExample.java#L52) +[GET /sapi/v1/sol-staking/sol/history/rateHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-bnsol-rate-history) - getBnsolRateHistory - [GetBnsolRateHistoryExample.java:41](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBnsolRateHistoryExample.java#L41) -[GET /sapi/v1/sol-staking/sol/history/bnsolRewardsHistory](https://developers.binance.com/docs/staking/sol-staking/history/Get-BNSOL-rewards-history) - getBnsolRewardsHistory - [GetBnsolRewardsHistoryExample.java:52](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBnsolRewardsHistoryExample.java#L52) +[GET /sapi/v1/sol-staking/sol/history/bnsolRewardsHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-bnsol-rewards-history) - getBnsolRewardsHistory - [GetBnsolRewardsHistoryExample.java:41](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBnsolRewardsHistoryExample.java#L41) -[GET /sapi/v1/sol-staking/sol/history/boostRewardsHistory](https://developers.binance.com/docs/staking/sol-staking/history/Get-Boost-Rewards-History) - getBoostRewardsHistory - [GetBoostRewardsHistoryExample.java:52](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBoostRewardsHistoryExample.java#L52) +[GET /sapi/v1/sol-staking/sol/history/boostRewardsHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-boost-rewards-history) - getBoostRewardsHistory - [GetBoostRewardsHistoryExample.java:42](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBoostRewardsHistoryExample.java#L42) -[GET /sapi/v1/sol-staking/sol/history/redemptionHistory](https://developers.binance.com/docs/staking/sol-staking/history/Get-SOL-redemption-history) - getSolRedemptionHistory - [GetSolRedemptionHistoryExample.java:52](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolRedemptionHistoryExample.java#L52) +[GET /sapi/v1/sol-staking/sol/history/redemptionHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-sol-redemption-history) - getSolRedemptionHistory - [GetSolRedemptionHistoryExample.java:41](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolRedemptionHistoryExample.java#L41) -[GET /sapi/v1/sol-staking/sol/history/stakingHistory](https://developers.binance.com/docs/staking/sol-staking/history/Get-SOL-staking-history) - getSolStakingHistory - [GetSolStakingHistoryExample.java:52](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolStakingHistoryExample.java#L52) +[GET /sapi/v1/sol-staking/sol/history/stakingHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-sol-staking-history) - getSolStakingHistory - [GetSolStakingHistoryExample.java:41](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolStakingHistoryExample.java#L41) -[GET /sapi/v1/sol-staking/sol/quota](https://developers.binance.com/docs/staking/sol-staking/account/Get-SOL-staking-quota-details) - getSolStakingQuotaDetails - [GetSolStakingQuotaDetailsExample.java:46](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolStakingQuotaDetailsExample.java#L46) +[GET /sapi/v1/sol-staking/sol/quota](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-sol-staking-quota-details) - getSolStakingQuotaDetails - [GetSolStakingQuotaDetailsExample.java:35](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolStakingQuotaDetailsExample.java#L35) -[GET /sapi/v1/sol-staking/sol/history/unclaimedRewards](https://developers.binance.com/docs/staking/sol-staking/history/Get-Unclaimed-Rewards) - getUnclaimedRewards - [GetUnclaimedRewardsExample.java:52](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetUnclaimedRewardsExample.java#L52) +[GET /sapi/v1/sol-staking/sol/history/unclaimedRewards](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-unclaimed-rewards) - getUnclaimedRewards - [GetUnclaimedRewardsExample.java:41](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetUnclaimedRewardsExample.java#L41) -[POST /sapi/v1/sol-staking/sol/redeem](https://developers.binance.com/docs/staking/sol-staking/staking/Redeem-SOL) - redeemSol - [RedeemSolExample.java:48](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/RedeemSolExample.java#L48) +[POST /sapi/v1/sol-staking/sol/redeem](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#redeem-sol) - redeemSol - [RedeemSolExample.java:37](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/RedeemSolExample.java#L37) -[GET /sapi/v1/sol-staking/account](https://developers.binance.com/docs/staking/sol-staking/account/SOL-Staking-account) - solStakingAccount - [SolStakingAccountExample.java:46](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/SolStakingAccountExample.java#L46) +[GET /sapi/v1/sol-staking/account](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#sol-staking-account) - solStakingAccount - [SolStakingAccountExample.java:35](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/SolStakingAccountExample.java#L35) -[POST /sapi/v1/sol-staking/sol/stake](https://developers.binance.com/docs/staking/sol-staking/staking/Subscribe-SOL-Staking) - subscribeSolStaking - [SubscribeSolStakingExample.java:48](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/SubscribeSolStakingExample.java#L48) +[POST /sapi/v1/sol-staking/sol/stake](https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#subscribe-sol-staking) - subscribeSolStaking - [SubscribeSolStakingExample.java:37](/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/SubscribeSolStakingExample.java#L37) diff --git a/clients/staking/pom.xml b/clients/staking/pom.xml index 57581c6d6..f4369f465 100644 --- a/clients/staking/pom.xml +++ b/clients/staking/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-staking staking - 5.0.0 + 6.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/JSON.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/JSON.java index af86761e7..934aa54fd 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/JSON.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/EthStakingApi.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/EthStakingApi.java index 47ed6edf2..1a0ad6023 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/EthStakingApi.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/EthStakingApi.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -57,7 +57,7 @@ public class EthStakingApi { private static final String USER_AGENT = String.format( - "binance-staking/5.0.0 (Java/%s; %s; %s)", + "binance-staking/6.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -97,7 +97,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for ethStakingAccount * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -108,8 +108,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see ETH - * Staking account(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#eth-staking-account">ETH + * Staking account (USER_DATA) Documentation */ private okhttp3.Call ethStakingAccountCall(Long recvWindow) throws ApiException { String basePath = null; @@ -201,9 +201,9 @@ private okhttp3.Call ethStakingAccountValidateBeforeCall(Long recvWindow) throws } /** - * ETH Staking account(USER_DATA) ETH Staking account Weight: 150 + * ETH Staking account (USER_DATA) ETH Staking account Weight(IP): 150 Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<EthStakingAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -215,10 +215,10 @@ private okhttp3.Call ethStakingAccountValidateBeforeCall(Long recvWindow) throws * * * @see ETH - * Staking account(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#eth-staking-account">ETH + * Staking account (USER_DATA) Documentation */ - public ApiResponse ethStakingAccount(Long recvWindow) + public ApiResponse ethStakingAccount(@Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = ethStakingAccountValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = @@ -229,7 +229,7 @@ public ApiResponse ethStakingAccount(Long recvWindow) /** * Build call for getCurrentEthStakingQuota * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -240,8 +240,8 @@ public ApiResponse ethStakingAccount(Long recvWindow) * * * @see Get - * current ETH staking quota(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-current-eth-staking-quota">Get + * current ETH staking quota (USER_DATA) Documentation */ private okhttp3.Call getCurrentEthStakingQuotaCall(Long recvWindow) throws ApiException { String basePath = null; @@ -334,9 +334,10 @@ private okhttp3.Call getCurrentEthStakingQuotaValidateBeforeCall(Long recvWindow } /** - * Get current ETH staking quota(USER_DATA) Get current ETH staking quota Weight: 150 + * Get current ETH staking quota (USER_DATA) Get current ETH staking quota Weight(IP): 150 + * Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetCurrentEthStakingQuotaResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -348,11 +349,11 @@ private okhttp3.Call getCurrentEthStakingQuotaValidateBeforeCall(Long recvWindow * * * @see Get - * current ETH staking quota(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-current-eth-staking-quota">Get + * current ETH staking quota (USER_DATA) Documentation */ - public ApiResponse getCurrentEthStakingQuota(Long recvWindow) - throws ApiException { + public ApiResponse getCurrentEthStakingQuota( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getCurrentEthStakingQuotaValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -365,9 +366,9 @@ public ApiResponse getCurrentEthStakingQuota( * @param redeemId (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -378,8 +379,8 @@ public ApiResponse getCurrentEthStakingQuota( * * * @see Get - * ETH redemption history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-eth-redemption-history">Get + * ETH redemption history (USER_DATA) Documentation */ private okhttp3.Call getEthRedemptionHistoryCall( Long redeemId, Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -505,20 +506,21 @@ private okhttp3.Call getEthRedemptionHistoryValidateBeforeCall( } /** - * Get ETH redemption history(USER_DATA) Get ETH redemption history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get ETH redemption history (USER_DATA) Get ETH redemption history Weight(IP): 150 Security + * Type: USER_DATA Notes: - The time between `startTime` and `endTime` + * cannot be longer than 3 months. - If `startTime` and `endTime` are both + * not sent, then the last 30 days' data will be returned. - If `startTime` is + * sent but `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param redeemId (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetEthRedemptionHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -530,11 +532,16 @@ private okhttp3.Call getEthRedemptionHistoryValidateBeforeCall( * * * @see Get - * ETH redemption history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-eth-redemption-history">Get + * ETH redemption history (USER_DATA) Documentation */ public ApiResponse getEthRedemptionHistory( - Long redeemId, Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long redeemId, + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getEthRedemptionHistoryValidateBeforeCall( @@ -550,9 +557,9 @@ public ApiResponse getEthRedemptionHistory( * @param purchaseId (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -563,8 +570,8 @@ public ApiResponse getEthRedemptionHistory( * * * @see Get - * ETH staking history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-eth-staking-history">Get + * ETH staking history (USER_DATA) Documentation */ private okhttp3.Call getEthStakingHistoryCall( Long purchaseId, Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -690,20 +697,21 @@ private okhttp3.Call getEthStakingHistoryValidateBeforeCall( } /** - * Get ETH staking history(USER_DATA) Get ETH staking history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get ETH staking history (USER_DATA) Get ETH staking history Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 3 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param purchaseId (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetEthStakingHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -715,11 +723,16 @@ private okhttp3.Call getEthStakingHistoryValidateBeforeCall( * * * @see Get - * ETH staking history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-eth-staking-history">Get + * ETH staking history (USER_DATA) Documentation */ public ApiResponse getEthStakingHistory( - Long purchaseId, Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long purchaseId, + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getEthStakingHistoryValidateBeforeCall( @@ -734,9 +747,9 @@ public ApiResponse getEthStakingHistory( * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -747,8 +760,8 @@ public ApiResponse getEthStakingHistory( * * * @see Get - * WBETH Rate History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-wbeth-rate-history">Get + * WBETH Rate History (USER_DATA) Documentation */ private okhttp3.Call getWbethRateHistoryCall( Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -868,19 +881,20 @@ private okhttp3.Call getWbethRateHistoryValidateBeforeCall( } /** - * Get WBETH Rate History(USER_DATA) Get WBETH Rate History * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get WBETH Rate History (USER_DATA) Get WBETH Rate History Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 3 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetWbethRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -892,11 +906,15 @@ private okhttp3.Call getWbethRateHistoryValidateBeforeCall( * * * @see Get - * WBETH Rate History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-wbeth-rate-history">Get + * WBETH Rate History (USER_DATA) Documentation */ public ApiResponse getWbethRateHistory( - Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getWbethRateHistoryValidateBeforeCall( @@ -911,9 +929,9 @@ public ApiResponse getWbethRateHistory( * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -924,8 +942,8 @@ public ApiResponse getWbethRateHistory( * * * @see Get - * WBETH rewards history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-wbeth-rewards-history">Get + * WBETH rewards history (USER_DATA) Documentation */ private okhttp3.Call getWbethRewardsHistoryCall( Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -1045,19 +1063,20 @@ private okhttp3.Call getWbethRewardsHistoryValidateBeforeCall( } /** - * Get WBETH rewards history(USER_DATA) Get WBETH rewards history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get WBETH rewards history (USER_DATA) Get WBETH rewards history Weight(IP): 150 Security + * Type: USER_DATA Notes: - The time between `startTime` and `endTime` + * cannot be longer than 3 months. - If `startTime` and `endTime` are both + * not sent, then the last 30 days' data will be returned. - If `startTime` is + * sent but `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetWbethRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1069,11 +1088,15 @@ private okhttp3.Call getWbethRewardsHistoryValidateBeforeCall( * * * @see Get - * WBETH rewards history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-wbeth-rewards-history">Get + * WBETH rewards history (USER_DATA) Documentation */ public ApiResponse getWbethRewardsHistory( - Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getWbethRewardsHistoryValidateBeforeCall( @@ -1088,9 +1111,9 @@ public ApiResponse getWbethRewardsHistory( * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1101,8 +1124,8 @@ public ApiResponse getWbethRewardsHistory( * * * @see Get - * WBETH unwrap history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-wbeth-unwrap-history">Get + * WBETH unwrap history (USER_DATA) Documentation */ private okhttp3.Call getWbethUnwrapHistoryCall( Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -1222,19 +1245,20 @@ private okhttp3.Call getWbethUnwrapHistoryValidateBeforeCall( } /** - * Get WBETH unwrap history(USER_DATA) Get WBETH unwrap history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get WBETH unwrap history (USER_DATA) Get WBETH unwrap history Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 3 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetWbethUnwrapHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1246,11 +1270,15 @@ private okhttp3.Call getWbethUnwrapHistoryValidateBeforeCall( * * * @see Get - * WBETH unwrap history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-wbeth-unwrap-history">Get + * WBETH unwrap history (USER_DATA) Documentation */ public ApiResponse getWbethUnwrapHistory( - Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getWbethUnwrapHistoryValidateBeforeCall( @@ -1265,9 +1293,9 @@ public ApiResponse getWbethUnwrapHistory( * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1278,8 +1306,8 @@ public ApiResponse getWbethUnwrapHistory( * * * @see Get - * WBETH wrap history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-wbeth-wrap-history">Get + * WBETH wrap history (USER_DATA) Documentation */ private okhttp3.Call getWbethWrapHistoryCall( Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -1399,19 +1427,20 @@ private okhttp3.Call getWbethWrapHistoryValidateBeforeCall( } /** - * Get WBETH wrap history(USER_DATA) Get WBETH wrap history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get WBETH wrap history (USER_DATA) Get WBETH wrap history Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 3 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetWbethWrapHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1423,11 +1452,15 @@ private okhttp3.Call getWbethWrapHistoryValidateBeforeCall( * * * @see Get - * WBETH wrap history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-wbeth-wrap-history">Get + * WBETH wrap history (USER_DATA) Documentation */ public ApiResponse getWbethWrapHistory( - Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getWbethWrapHistoryValidateBeforeCall( @@ -1451,8 +1484,8 @@ public ApiResponse getWbethWrapHistory( * * * @see Redeem - * ETH(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#redeem-eth">Redeem + * ETH (TRADE) Documentation */ private okhttp3.Call redeemEthCall(RedeemEthRequest redeemEthRequest) throws ApiException { String basePath = null; @@ -1554,8 +1587,9 @@ private okhttp3.Call redeemEthValidateBeforeCall(RedeemEthRequest redeemEthReque } /** - * Redeem ETH(TRADE) Redeem WBETH or BETH and get ETH * You need to open Enable Spot & - * Margin Trading permission for the API Key which requests this endpoint. Weight: 150 + * Redeem ETH (TRADE) Redeem WBETH or BETH and get ETH Weight(IP): 150 Security Type: TRADE + * Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which + * requests this endpoint. * * @param redeemEthRequest (required) * @return ApiResponse<RedeemEthResponse> @@ -1569,8 +1603,8 @@ private okhttp3.Call redeemEthValidateBeforeCall(RedeemEthRequest redeemEthReque * * * @see Redeem - * ETH(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#redeem-eth">Redeem + * ETH (TRADE) Documentation */ public ApiResponse redeemEth( @Valid @NotNull RedeemEthRequest redeemEthRequest) throws ApiException { @@ -1593,8 +1627,8 @@ public ApiResponse redeemEth( * * * @see Subscribe - * ETH Staking(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#subscribe-eth-staking">Subscribe + * ETH Staking (TRADE) Documentation */ private okhttp3.Call subscribeEthStakingCall( SubscribeEthStakingRequest subscribeEthStakingRequest) throws ApiException { @@ -1696,8 +1730,9 @@ private okhttp3.Call subscribeEthStakingValidateBeforeCall( } /** - * Subscribe ETH Staking(TRADE) Subscribe ETH Staking * You need to open Enable Spot & - * Margin Trading permission for the API Key which requests this endpoint. Weight: 150 + * Subscribe ETH Staking (TRADE) Subscribe ETH Staking Weight(IP): 150 Security Type: TRADE + * Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which + * requests this endpoint. * * @param subscribeEthStakingRequest (required) * @return ApiResponse<SubscribeEthStakingResponse> @@ -1711,8 +1746,8 @@ private okhttp3.Call subscribeEthStakingValidateBeforeCall( * * * @see Subscribe - * ETH Staking(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#subscribe-eth-staking">Subscribe + * ETH Staking (TRADE) Documentation */ public ApiResponse subscribeEthStaking( @Valid @NotNull SubscribeEthStakingRequest subscribeEthStakingRequest) @@ -1737,8 +1772,9 @@ public ApiResponse subscribeEthStaking( * 200 Wrap BETH - * * - * @see Wrap - * BETH(TRADE) Documentation + * @see Wrap + * BETH (TRADE) Documentation */ private okhttp3.Call wrapBethCall(WrapBethRequest wrapBethRequest) throws ApiException { String basePath = null; @@ -1836,8 +1872,8 @@ private okhttp3.Call wrapBethValidateBeforeCall(WrapBethRequest wrapBethRequest) } /** - * Wrap BETH(TRADE) Wrap BETH * You need to open Enable Spot & Margin Trading permission for - * the API Key which requests this endpoint. Weight: 150 + * Wrap BETH (TRADE) Wrap BETH Weight(IP): 150 Security Type: TRADE Notes: - You need to open + * Enable Spot & Margin Trading permission for the API Key which requests this endpoint. * * @param wrapBethRequest (required) * @return ApiResponse<WrapBethResponse> @@ -1850,8 +1886,9 @@ private okhttp3.Call wrapBethValidateBeforeCall(WrapBethRequest wrapBethRequest) * 200 Wrap BETH - * * - * @see Wrap - * BETH(TRADE) Documentation + * @see Wrap + * BETH (TRADE) Documentation */ public ApiResponse wrapBeth(@Valid @NotNull WrapBethRequest wrapBethRequest) throws ApiException { diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/OnChainYieldsApi.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/OnChainYieldsApi.java index cab6c616d..d73317c47 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/OnChainYieldsApi.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/OnChainYieldsApi.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -59,7 +59,7 @@ public class OnChainYieldsApi { private static final String USER_AGENT = String.format( - "binance-staking/5.0.0 (Java/%s; %s; %s)", + "binance-staking/6.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -100,7 +100,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * Build call for getOnChainYieldsLockedPersonalLeftQuota * * @param projectId (required) - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -111,7 +111,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-personal-left-quota">Get * On-chain Yields Locked Personal Left Quota (USER_DATA) Documentation */ private okhttp3.Call getOnChainYieldsLockedPersonalLeftQuotaCall( @@ -216,10 +216,10 @@ private okhttp3.Call getOnChainYieldsLockedPersonalLeftQuotaValidateBeforeCall( /** * Get On-chain Yields Locked Personal Left Quota (USER_DATA) Get On-chain Yields Locked - * Personal Left Quota Weight: 50 + * Personal Left Quota Weight(IP): 50 Security Type: USER_DATA * * @param projectId (required) - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetOnChainYieldsLockedPersonalLeftQuotaResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -231,12 +231,12 @@ private okhttp3.Call getOnChainYieldsLockedPersonalLeftQuotaValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-personal-left-quota">Get * On-chain Yields Locked Personal Left Quota (USER_DATA) Documentation */ public ApiResponse - getOnChainYieldsLockedPersonalLeftQuota(@NotNull String projectId, Long recvWindow) - throws ApiException { + getOnChainYieldsLockedPersonalLeftQuota( + @NotNull String projectId, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getOnChainYieldsLockedPersonalLeftQuotaValidateBeforeCall(projectId, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -248,9 +248,9 @@ private okhttp3.Call getOnChainYieldsLockedPersonalLeftQuotaValidateBeforeCall( * Build call for getOnChainYieldsLockedProductList * * @param asset (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -260,7 +260,8 @@ private okhttp3.Call getOnChainYieldsLockedPersonalLeftQuotaValidateBeforeCall( * 200 Get On-chain Yields Locked Product List - * * - * @see Get + * @see Get * On-chain Yields Locked Product List (USER_DATA) Documentation */ private okhttp3.Call getOnChainYieldsLockedProductListCall( @@ -375,12 +376,13 @@ private okhttp3.Call getOnChainYieldsLockedProductListValidateBeforeCall( /** * Get On-chain Yields Locked Product List (USER_DATA) Get available On-chain Yields Locked - * product list * Get available On-chain Yields Locked product list Weight: 50 + * product list Weight(IP): 50 Security Type: USER_DATA Notes: - Get available On-chain Yields + * Locked product list * * @param asset (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetOnChainYieldsLockedProductListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -391,11 +393,13 @@ private okhttp3.Call getOnChainYieldsLockedProductListValidateBeforeCall( * 200 Get On-chain Yields Locked Product List - * * - * @see Get + * @see Get * On-chain Yields Locked Product List (USER_DATA) Documentation */ public ApiResponse getOnChainYieldsLockedProductList( - String asset, Long current, Long size, Long recvWindow) throws ApiException { + String asset, @Min(1L) Long current, @Max(100L) Long size, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = getOnChainYieldsLockedProductListValidateBeforeCall( asset, current, size, recvWindow); @@ -410,9 +414,9 @@ public ApiResponse getOnChainYieldsLo * @param asset (optional) * @param positionId (optional) * @param projectId (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -423,7 +427,7 @@ public ApiResponse getOnChainYieldsLo * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-product-position">Get * On-chain Yields Locked Product Position (USER_DATA) Documentation */ private okhttp3.Call getOnChainYieldsLockedProductPositionCall( @@ -561,14 +565,14 @@ private okhttp3.Call getOnChainYieldsLockedProductPositionValidateBeforeCall( /** * Get On-chain Yields Locked Product Position (USER_DATA) Get On-chain Yields Locked Product - * Position Weight: 50 + * Position Weight(IP): 50 Security Type: USER_DATA * * @param asset (optional) * @param positionId (optional) * @param projectId (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetOnChainYieldsLockedProductPositionResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -580,7 +584,7 @@ private okhttp3.Call getOnChainYieldsLockedProductPositionValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-product-position">Get * On-chain Yields Locked Product Position (USER_DATA) Documentation */ public ApiResponse @@ -588,9 +592,9 @@ private okhttp3.Call getOnChainYieldsLockedProductPositionValidateBeforeCall( String asset, String positionId, String projectId, - Long current, - Long size, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getOnChainYieldsLockedProductPositionValidateBeforeCall( @@ -608,9 +612,9 @@ private okhttp3.Call getOnChainYieldsLockedProductPositionValidateBeforeCall( * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -621,7 +625,7 @@ private okhttp3.Call getOnChainYieldsLockedProductPositionValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-redemption-record">Get * On-chain Yields Locked Redemption Record (USER_DATA) Documentation */ private okhttp3.Call getOnChainYieldsLockedRedemptionRecordCall( @@ -775,22 +779,22 @@ private okhttp3.Call getOnChainYieldsLockedRedemptionRecordValidateBeforeCall( /** * Get On-chain Yields Locked Redemption Record (USER_DATA) Get On-chain Yields Locked - * Redemption Record * The time between `startTime` and `endTime` cannot be - * longer than 3 months. * If `startTime` and `endTime` are both not sent, - * then the last 30 days' data will be returned. * If `startTime` is sent but - * `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 50 + * Redemption Record Weight(IP): 50 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @param positionId (optional) * @param redeemId (optional) * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetOnChainYieldsLockedRedemptionRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -802,7 +806,7 @@ private okhttp3.Call getOnChainYieldsLockedRedemptionRecordValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-redemption-record">Get * On-chain Yields Locked Redemption Record (USER_DATA) Documentation */ public ApiResponse @@ -812,9 +816,9 @@ private okhttp3.Call getOnChainYieldsLockedRedemptionRecordValidateBeforeCall( String asset, Long startTime, Long endTime, - Long current, - Long size, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getOnChainYieldsLockedRedemptionRecordValidateBeforeCall( @@ -831,9 +835,9 @@ private okhttp3.Call getOnChainYieldsLockedRedemptionRecordValidateBeforeCall( * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -844,7 +848,7 @@ private okhttp3.Call getOnChainYieldsLockedRedemptionRecordValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-rewards-history">Get * On-chain Yields Locked Rewards History (USER_DATA) Documentation */ private okhttp3.Call getOnChainYieldsLockedRewardsHistoryCall( @@ -991,21 +995,21 @@ private okhttp3.Call getOnChainYieldsLockedRewardsHistoryValidateBeforeCall( /** * Get On-chain Yields Locked Rewards History (USER_DATA) Get On-chain Yields Locked Rewards - * History * The time between `startTime` and `endTime` cannot be longer - * than 3 months. * If `startTime` and `endTime` are both not sent, then the - * last 30 days' data will be returned. * If `startTime` is sent but - * `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 50 + * History Weight(IP): 50 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @param positionId (optional) * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetOnChainYieldsLockedRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1017,7 +1021,7 @@ private okhttp3.Call getOnChainYieldsLockedRewardsHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-rewards-history">Get * On-chain Yields Locked Rewards History (USER_DATA) Documentation */ public ApiResponse @@ -1026,9 +1030,9 @@ private okhttp3.Call getOnChainYieldsLockedRewardsHistoryValidateBeforeCall( String asset, Long startTime, Long endTime, - Long current, - Long size, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getOnChainYieldsLockedRewardsHistoryValidateBeforeCall( @@ -1043,8 +1047,8 @@ private okhttp3.Call getOnChainYieldsLockedRewardsHistoryValidateBeforeCall( * * @param projectId (required) * @param amount (required) - * @param autoSubscribe true or false, default true. (optional) - * @param recvWindow (optional) + * @param autoSubscribe (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1054,8 +1058,9 @@ private okhttp3.Call getOnChainYieldsLockedRewardsHistoryValidateBeforeCall( * 200 Get On-chain Yields Locked Subscription Preview - * * - * @see Get On-chain - * Yields Locked Subscription Preview (USER_DATA) Documentation + * @see Get + * On-chain Yields Locked Subscription Preview (USER_DATA) Documentation */ private okhttp3.Call getOnChainYieldsLockedSubscriptionPreviewCall( String projectId, Double amount, Boolean autoSubscribe, Long recvWindow) @@ -1175,12 +1180,12 @@ private okhttp3.Call getOnChainYieldsLockedSubscriptionPreviewValidateBeforeCall /** * Get On-chain Yields Locked Subscription Preview (USER_DATA) Get On-chain Yields Locked - * Subscription Preview Weight: 50 + * Subscription Preview Weight(IP): 50 Security Type: USER_DATA * * @param projectId (required) * @param amount (required) - * @param autoSubscribe true or false, default true. (optional) - * @param recvWindow (optional) + * @param autoSubscribe (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetOnChainYieldsLockedSubscriptionPreviewResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1191,15 +1196,16 @@ private okhttp3.Call getOnChainYieldsLockedSubscriptionPreviewValidateBeforeCall * 200 Get On-chain Yields Locked Subscription Preview - * * - * @see Get On-chain - * Yields Locked Subscription Preview (USER_DATA) Documentation + * @see Get + * On-chain Yields Locked Subscription Preview (USER_DATA) Documentation */ public ApiResponse getOnChainYieldsLockedSubscriptionPreview( @NotNull String projectId, @NotNull Double amount, Boolean autoSubscribe, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getOnChainYieldsLockedSubscriptionPreviewValidateBeforeCall( @@ -1217,9 +1223,9 @@ private okhttp3.Call getOnChainYieldsLockedSubscriptionPreviewValidateBeforeCall * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1229,7 +1235,8 @@ private okhttp3.Call getOnChainYieldsLockedSubscriptionPreviewValidateBeforeCall * 200 Get On-chain Yields Locked Subscription Record - * * - * @see Get + * @see Get * On-chain Yields Locked Subscription Record (USER_DATA) Documentation */ private okhttp3.Call getOnChainYieldsLockedSubscriptionRecordCall( @@ -1383,22 +1390,22 @@ private okhttp3.Call getOnChainYieldsLockedSubscriptionRecordValidateBeforeCall( /** * Get On-chain Yields Locked Subscription Record (USER_DATA) Get On-chain Yields Locked - * Subscription Record * The time between `startTime` and `endTime` cannot - * be longer than 3 months. * If `startTime` and `endTime` are both not - * sent, then the last 30 days' data will be returned. * If `startTime` is sent - * but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 50 + * Subscription Record Weight(IP): 50 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @param purchaseId (optional) * @param clientId (optional) * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetOnChainYieldsLockedSubscriptionRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1409,7 +1416,8 @@ private okhttp3.Call getOnChainYieldsLockedSubscriptionRecordValidateBeforeCall( * 200 Get On-chain Yields Locked Subscription Record - * * - * @see Get + * @see Get * On-chain Yields Locked Subscription Record (USER_DATA) Documentation */ public ApiResponse @@ -1419,9 +1427,9 @@ private okhttp3.Call getOnChainYieldsLockedSubscriptionRecordValidateBeforeCall( String asset, Long startTime, Long endTime, - Long current, - Long size, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getOnChainYieldsLockedSubscriptionRecordValidateBeforeCall( @@ -1434,7 +1442,7 @@ private okhttp3.Call getOnChainYieldsLockedSubscriptionRecordValidateBeforeCall( /** * Build call for onChainYieldsAccount * - * @param recvWindow (optional) + * @param recvWindow The value cannot be greater than `60000` (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1445,7 +1453,7 @@ private okhttp3.Call getOnChainYieldsLockedSubscriptionRecordValidateBeforeCall( * * * @see On-chain + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#on-chain-yields-account">On-chain * Yields Account (USER_DATA) Documentation */ private okhttp3.Call onChainYieldsAccountCall(Long recvWindow) throws ApiException { @@ -1539,9 +1547,10 @@ private okhttp3.Call onChainYieldsAccountValidateBeforeCall(Long recvWindow) } /** - * On-chain Yields Account (USER_DATA) On-chain Yields Account query Weight: 50 + * On-chain Yields Account (USER_DATA) On-chain Yields Account query Weight(IP): 50 Security + * Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow The value cannot be greater than `60000` (optional) * @return ApiResponse<OnChainYieldsAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1553,11 +1562,11 @@ private okhttp3.Call onChainYieldsAccountValidateBeforeCall(Long recvWindow) * * * @see On-chain + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#on-chain-yields-account">On-chain * Yields Account (USER_DATA) Documentation */ - public ApiResponse onChainYieldsAccount(Long recvWindow) - throws ApiException { + public ApiResponse onChainYieldsAccount( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = onChainYieldsAccountValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -1578,7 +1587,7 @@ public ApiResponse onChainYieldsAccount(Long recvW * * * @see Redeem + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#redeem-on-chain-yields-locked-product">Redeem * On-chain Yields Locked Product (TRADE) Documentation */ private okhttp3.Call redeemOnChainYieldsLockedProductCall( @@ -1691,9 +1700,9 @@ private okhttp3.Call redeemOnChainYieldsLockedProductValidateBeforeCall( } /** - * Redeem On-chain Yields Locked Product (TRADE) Redeem On-chain Yields Locked Product * You - * need to open `Enable Spot & Margin Trading` permission for the API Key which - * requests this endpoint. Weight: 1/3s per account + * Redeem On-chain Yields Locked Product (TRADE) Redeem On-chain Yields Locked Product + * Weight(IP): 200 Security Type: TRADE Notes: - You need to open `Enable Spot & Margin + * Trading` permission for the API Key which requests this endpoint. * * @param redeemOnChainYieldsLockedProductRequest (required) * @return ApiResponse<RedeemOnChainYieldsLockedProductResponse> @@ -1707,7 +1716,7 @@ private okhttp3.Call redeemOnChainYieldsLockedProductValidateBeforeCall( * * * @see Redeem + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#redeem-on-chain-yields-locked-product">Redeem * On-chain Yields Locked Product (TRADE) Documentation */ public ApiResponse redeemOnChainYieldsLockedProduct( @@ -1736,8 +1745,8 @@ public ApiResponse redeemOnChainYields * * * @see Set - * On-chain Yields Locked Auto Subscribe(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#set-on-chain-yields-locked-auto-subscribe">Set + * On-chain Yields Locked Auto Subscribe (USER_DATA) Documentation */ private okhttp3.Call setOnChainYieldsLockedAutoSubscribeCall( SetOnChainYieldsLockedAutoSubscribeRequest setOnChainYieldsLockedAutoSubscribeRequest) @@ -1849,8 +1858,8 @@ private okhttp3.Call setOnChainYieldsLockedAutoSubscribeValidateBeforeCall( } /** - * Set On-chain Yields Locked Auto Subscribe(USER_DATA) Set On-chain Yield locked auto subscribe - * Weight: 50 + * Set On-chain Yields Locked Auto Subscribe (USER_DATA) Set On-chain Yield locked auto + * subscribe Weight(IP): 50 Security Type: USER_DATA * * @param setOnChainYieldsLockedAutoSubscribeRequest (required) * @return ApiResponse<SetOnChainYieldsLockedAutoSubscribeResponse> @@ -1864,8 +1873,8 @@ private okhttp3.Call setOnChainYieldsLockedAutoSubscribeValidateBeforeCall( * * * @see Set - * On-chain Yields Locked Auto Subscribe(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#set-on-chain-yields-locked-auto-subscribe">Set + * On-chain Yields Locked Auto Subscribe (USER_DATA) Documentation */ public ApiResponse setOnChainYieldsLockedAutoSubscribe( @@ -1895,8 +1904,8 @@ private okhttp3.Call setOnChainYieldsLockedAutoSubscribeValidateBeforeCall( * * * @see Set - * On-chain Yields Locked Product Redeem Option(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#set-on-chain-yields-locked-product-redeem-option">Set + * On-chain Yields Locked Product Redeem Option (USER_DATA) Documentation */ private okhttp3.Call setOnChainYieldsLockedProductRedeemOptionCall( SetOnChainYieldsLockedProductRedeemOptionRequest @@ -2010,8 +2019,8 @@ private okhttp3.Call setOnChainYieldsLockedProductRedeemOptionValidateBeforeCall } /** - * Set On-chain Yields Locked Product Redeem Option(USER_DATA) Set On-chain Yields redeem option - * for Locked product Weight: 50 + * Set On-chain Yields Locked Product Redeem Option (USER_DATA) Set On-chain Yields redeem + * option for Locked product Weight(IP): 50 Security Type: USER_DATA * * @param setOnChainYieldsLockedProductRedeemOptionRequest (required) * @return ApiResponse<SetOnChainYieldsLockedProductRedeemOptionResponse> @@ -2025,8 +2034,8 @@ private okhttp3.Call setOnChainYieldsLockedProductRedeemOptionValidateBeforeCall * * * @see Set - * On-chain Yields Locked Product Redeem Option(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#set-on-chain-yields-locked-product-redeem-option">Set + * On-chain Yields Locked Product Redeem Option (USER_DATA) Documentation */ public ApiResponse setOnChainYieldsLockedProductRedeemOption( @@ -2056,8 +2065,8 @@ private okhttp3.Call setOnChainYieldsLockedProductRedeemOptionValidateBeforeCall * * * @see Subscribe - * On-chain Yields Locked Product(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#subscribe-on-chain-yields-locked-product">Subscribe + * On-chain Yields Locked Product (TRADE) Documentation */ private okhttp3.Call subscribeOnChainYieldsLockedProductCall( SubscribeOnChainYieldsLockedProductRequest subscribeOnChainYieldsLockedProductRequest) @@ -2196,9 +2205,9 @@ private okhttp3.Call subscribeOnChainYieldsLockedProductValidateBeforeCall( } /** - * Subscribe On-chain Yields Locked Product(TRADE) Subscribe On-chain Yields Locked Product * - * You need to open `Enable Spot & Margin Trading` permission for the API Key - * which requests this endpoint. Weight: 200 + * Subscribe On-chain Yields Locked Product (TRADE) Subscribe On-chain Yields Locked Product + * Weight(IP): 200 Security Type: TRADE Notes: - You need to open `Enable Spot & Margin + * Trading` permission for the API Key which requests this endpoint. * * @param subscribeOnChainYieldsLockedProductRequest (required) * @return ApiResponse<SubscribeOnChainYieldsLockedProductResponse> @@ -2212,8 +2221,8 @@ private okhttp3.Call subscribeOnChainYieldsLockedProductValidateBeforeCall( * * * @see Subscribe - * On-chain Yields Locked Product(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#subscribe-on-chain-yields-locked-product">Subscribe + * On-chain Yields Locked Product (TRADE) Documentation */ public ApiResponse subscribeOnChainYieldsLockedProduct( diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/SoftStakingApi.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/SoftStakingApi.java index 53219dc12..3ae21214c 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/SoftStakingApi.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/SoftStakingApi.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -44,7 +44,7 @@ public class SoftStakingApi { private static final String USER_AGENT = String.format( - "binance-staking/5.0.0 (Java/%s; %s; %s)", + "binance-staking/6.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -85,9 +85,9 @@ public void setCustomBaseUrl(String customBaseUrl) { * Build call for getSoftStakingProductList * * @param asset (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -97,8 +97,9 @@ public void setCustomBaseUrl(String customBaseUrl) { * 200 Get Soft Staking Product List - * * - * @see Get Soft Staking - * Product List (USER_DATA) Documentation + * @see Get + * Soft Staking Product List (USER_DATA) Documentation */ private okhttp3.Call getSoftStakingProductListCall( String asset, Long current, Long size, Long recvWindow) throws ApiException { @@ -212,12 +213,12 @@ private okhttp3.Call getSoftStakingProductListValidateBeforeCall( /** * Get Soft Staking Product List (USER_DATA) Get the available Soft Staking product list. - * Weight: 50 + * Weight(IP): 50 Security Type: USER_DATA * * @param asset (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetSoftStakingProductListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -228,11 +229,13 @@ private okhttp3.Call getSoftStakingProductListValidateBeforeCall( * 200 Get Soft Staking Product List - * * - * @see Get Soft Staking - * Product List (USER_DATA) Documentation + * @see Get + * Soft Staking Product List (USER_DATA) Documentation */ public ApiResponse getSoftStakingProductList( - String asset, Long current, Long size, Long recvWindow) throws ApiException { + String asset, @Min(1L) Long current, @Max(100L) Long size, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = getSoftStakingProductListValidateBeforeCall(asset, current, size, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -246,9 +249,9 @@ public ApiResponse getSoftStakingProductList( * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -259,8 +262,8 @@ public ApiResponse getSoftStakingProductList( * * * @see Get - * Soft Staking Rewards History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/soft-staking#get-soft-staking-rewards-history">Get + * Soft Staking Rewards History (USER_DATA) Documentation */ private okhttp3.Call getSoftStakingRewardsHistoryCall( String asset, Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -386,20 +389,21 @@ private okhttp3.Call getSoftStakingRewardsHistoryValidateBeforeCall( } /** - * Get Soft Staking Rewards History(USER_DATA) * The time between `startTime` and - * `endTime` cannot be longer than 3 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If + * Get Soft Staking Rewards History (USER_DATA) Get Soft Staking Rewards History Weight(IP): 50 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 3 months. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but + * beginning from `startTime` will be returned. - If `endTime` is sent but * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 50 + * returned. * * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetSoftStakingRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -411,11 +415,16 @@ private okhttp3.Call getSoftStakingRewardsHistoryValidateBeforeCall( * * * @see Get - * Soft Staking Rewards History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/soft-staking#get-soft-staking-rewards-history">Get + * Soft Staking Rewards History (USER_DATA) Documentation */ public ApiResponse getSoftStakingRewardsHistory( - String asset, Long startTime, Long endTime, Long current, Long size, Long recvWindow) + String asset, + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getSoftStakingRewardsHistoryValidateBeforeCall( @@ -428,8 +437,8 @@ public ApiResponse getSoftStakingRewardsHi /** * Build call for setSoftStaking * - * @param softStaking true or false (required) - * @param recvWindow (optional) + * @param softStaking (required) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -439,7 +448,8 @@ public ApiResponse getSoftStakingRewardsHi * 200 Set Soft Staking - * * - * @see Set + * @see Set * Soft Staking (USER_DATA) Documentation */ private okhttp3.Call setSoftStakingCall(Boolean softStaking, Long recvWindow) @@ -539,10 +549,11 @@ private okhttp3.Call setSoftStakingValidateBeforeCall(Boolean softStaking, Long } /** - * Set Soft Staking (USER_DATA) Enable or disable Soft Staking. Weight: 50 + * Set Soft Staking (USER_DATA) Enable or disable Soft Staking. Weight(IP): 50 Security Type: + * USER_DATA * - * @param softStaking true or false (required) - * @param recvWindow (optional) + * @param softStaking (required) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<SetSoftStakingResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -553,11 +564,12 @@ private okhttp3.Call setSoftStakingValidateBeforeCall(Boolean softStaking, Long * 200 Set Soft Staking - * * - * @see Set + * @see Set * Soft Staking (USER_DATA) Documentation */ public ApiResponse setSoftStaking( - @NotNull Boolean softStaking, Long recvWindow) throws ApiException { + @NotNull Boolean softStaking, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = setSoftStakingValidateBeforeCall(softStaking, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/SolStakingApi.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/SolStakingApi.java index 18d77048c..7bdd22909 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/SolStakingApi.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/SolStakingApi.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -29,6 +29,7 @@ import com.binance.connector.client.staking.rest.model.GetSolStakingHistoryResponse; import com.binance.connector.client.staking.rest.model.GetSolStakingQuotaDetailsResponse; import com.binance.connector.client.staking.rest.model.GetUnclaimedRewardsResponse; +import com.binance.connector.client.staking.rest.model.OrderType; import com.binance.connector.client.staking.rest.model.RedeemSolRequest; import com.binance.connector.client.staking.rest.model.RedeemSolResponse; import com.binance.connector.client.staking.rest.model.SolStakingAccountResponse; @@ -57,7 +58,7 @@ public class SolStakingApi { private static final String USER_AGENT = String.format( - "binance-staking/5.0.0 (Java/%s; %s; %s)", + "binance-staking/6.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -97,7 +98,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for claimBoostRewards * - * @param claimBoostRewardsRequest (required) + * @param claimBoostRewardsRequest (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -108,8 +109,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Claim - * Boost Rewards(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#claim-boost-rewards">Claim + * Boost Rewards (TRADE) Documentation */ private okhttp3.Call claimBoostRewardsCall(ClaimBoostRewardsRequest claimBoostRewardsRequest) throws ApiException { @@ -204,10 +205,11 @@ private okhttp3.Call claimBoostRewardsValidateBeforeCall( } /** - * Claim Boost Rewards(TRADE) Claim Boost APR Airdrop Rewards * You need to open Enable Spot - * & Margin Trading permission for the API Key which requests this endpoint. Weight: 150 + * Claim Boost Rewards (TRADE) Claim Boost APR Airdrop Rewards Weight(IP): 150 Security Type: + * TRADE Notes: - You need to open Enable Spot & Margin Trading permission for the API Key + * which requests this endpoint. * - * @param claimBoostRewardsRequest (required) + * @param claimBoostRewardsRequest (optional) * @return ApiResponse<ClaimBoostRewardsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -219,11 +221,11 @@ private okhttp3.Call claimBoostRewardsValidateBeforeCall( * * * @see Claim - * Boost Rewards(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#claim-boost-rewards">Claim + * Boost Rewards (TRADE) Documentation */ public ApiResponse claimBoostRewards( - @Valid @NotNull ClaimBoostRewardsRequest claimBoostRewardsRequest) throws ApiException { + @Valid ClaimBoostRewardsRequest claimBoostRewardsRequest) throws ApiException { okhttp3.Call localVarCall = claimBoostRewardsValidateBeforeCall(claimBoostRewardsRequest); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -235,9 +237,9 @@ public ApiResponse claimBoostRewards( * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -248,8 +250,8 @@ public ApiResponse claimBoostRewards( * * * @see Get - * BNSOL Rate History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-bnsol-rate-history">Get + * BNSOL Rate History (USER_DATA) Documentation */ private okhttp3.Call getBnsolRateHistoryCall( Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -369,19 +371,20 @@ private okhttp3.Call getBnsolRateHistoryValidateBeforeCall( } /** - * Get BNSOL Rate History(USER_DATA) Get BNSOL Rate History * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get BNSOL Rate History (USER_DATA) Get BNSOL Rate History Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 3 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return ApiResponse<GetBnsolRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -393,11 +396,15 @@ private okhttp3.Call getBnsolRateHistoryValidateBeforeCall( * * * @see Get - * BNSOL Rate History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-bnsol-rate-history">Get + * BNSOL Rate History (USER_DATA) Documentation */ public ApiResponse getBnsolRateHistory( - Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getBnsolRateHistoryValidateBeforeCall( @@ -412,9 +419,9 @@ public ApiResponse getBnsolRateHistory( * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -425,8 +432,8 @@ public ApiResponse getBnsolRateHistory( * * * @see Get - * BNSOL rewards history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-bnsol-rewards-history">Get + * BNSOL rewards history (USER_DATA) Documentation */ private okhttp3.Call getBnsolRewardsHistoryCall( Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -546,19 +553,20 @@ private okhttp3.Call getBnsolRewardsHistoryValidateBeforeCall( } /** - * Get BNSOL rewards history(USER_DATA) Get BNSOL rewards history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get BNSOL rewards history (USER_DATA) Get BNSOL rewards history Weight(IP): 150 Security + * Type: USER_DATA Notes: - The time between `startTime` and `endTime` + * cannot be longer than 3 months. - If `startTime` and `endTime` are both + * not sent, then the last 30 days' data will be returned. - If `startTime` is + * sent but `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetBnsolRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -570,11 +578,15 @@ private okhttp3.Call getBnsolRewardsHistoryValidateBeforeCall( * * * @see Get - * BNSOL rewards history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-bnsol-rewards-history">Get + * BNSOL rewards history (USER_DATA) Documentation */ public ApiResponse getBnsolRewardsHistory( - Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getBnsolRewardsHistoryValidateBeforeCall( @@ -587,13 +599,12 @@ public ApiResponse getBnsolRewardsHistory( /** * Build call for getBoostRewardsHistory * - * @param type \"CLAIM\", \"DISTRIBUTE\", default \"CLAIM\" - * (required) + * @param type (required) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -604,11 +615,11 @@ public ApiResponse getBnsolRewardsHistory( * * * @see Get - * Boost Rewards History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-boost-rewards-history">Get + * Boost Rewards History (USER_DATA) Documentation */ private okhttp3.Call getBoostRewardsHistoryCall( - String type, Long startTime, Long endTime, Long current, Long size, Long recvWindow) + OrderType type, Long startTime, Long endTime, Long current, Long size, Long recvWindow) throws ApiException { String basePath = null; // Operation Servers @@ -690,7 +701,7 @@ private okhttp3.Call getBoostRewardsHistoryCall( @SuppressWarnings("rawtypes") private okhttp3.Call getBoostRewardsHistoryValidateBeforeCall( - String type, Long startTime, Long endTime, Long current, Long size, Long recvWindow) + OrderType type, Long startTime, Long endTime, Long current, Long size, Long recvWindow) throws ApiException { try { Validator validator = @@ -706,7 +717,7 @@ private okhttp3.Call getBoostRewardsHistoryValidateBeforeCall( this.getClass() .getMethod( "getBoostRewardsHistory", - String.class, + OrderType.class, Long.class, Long.class, Long.class, @@ -731,21 +742,21 @@ private okhttp3.Call getBoostRewardsHistoryValidateBeforeCall( } /** - * Get Boost Rewards History(USER_DATA) Get Boost rewards history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get Boost Rewards History (USER_DATA) Get Boost rewards history Weight(IP): 150 Security + * Type: USER_DATA Notes: - The time between `startTime` and `endTime` + * cannot be longer than 3 months. - If `startTime` and `endTime` are both + * not sent, then the last 30 days' data will be returned. - If `startTime` is + * sent but `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * - * @param type \"CLAIM\", \"DISTRIBUTE\", default \"CLAIM\" - * (required) + * @param type (required) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetBoostRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -757,16 +768,16 @@ private okhttp3.Call getBoostRewardsHistoryValidateBeforeCall( * * * @see Get - * Boost Rewards History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-boost-rewards-history">Get + * Boost Rewards History (USER_DATA) Documentation */ public ApiResponse getBoostRewardsHistory( - @NotNull String type, + @NotNull OrderType type, Long startTime, Long endTime, - Long current, - Long size, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getBoostRewardsHistoryValidateBeforeCall( @@ -782,9 +793,9 @@ public ApiResponse getBoostRewardsHistory( * @param redeemId (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -795,8 +806,8 @@ public ApiResponse getBoostRewardsHistory( * * * @see Get - * SOL redemption history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-sol-redemption-history">Get + * SOL redemption history (USER_DATA) Documentation */ private okhttp3.Call getSolRedemptionHistoryCall( Long redeemId, Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -922,20 +933,21 @@ private okhttp3.Call getSolRedemptionHistoryValidateBeforeCall( } /** - * Get SOL redemption history(USER_DATA) Get SOL redemption history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get SOL redemption history (USER_DATA) Get SOL redemption history Weight(IP): 150 Security + * Type: USER_DATA Notes: - The time between `startTime` and `endTime` + * cannot be longer than 3 months. - If `startTime` and `endTime` are both + * not sent, then the last 30 days' data will be returned. - If `startTime` is + * sent but `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param redeemId (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetSolRedemptionHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -947,11 +959,16 @@ private okhttp3.Call getSolRedemptionHistoryValidateBeforeCall( * * * @see Get - * SOL redemption history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-sol-redemption-history">Get + * SOL redemption history (USER_DATA) Documentation */ public ApiResponse getSolRedemptionHistory( - Long redeemId, Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long redeemId, + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getSolRedemptionHistoryValidateBeforeCall( @@ -967,9 +984,9 @@ public ApiResponse getSolRedemptionHistory( * @param purchaseId (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -980,8 +997,8 @@ public ApiResponse getSolRedemptionHistory( * * * @see Get - * SOL staking history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-sol-staking-history">Get + * SOL staking history (USER_DATA) Documentation */ private okhttp3.Call getSolStakingHistoryCall( Long purchaseId, Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -1107,20 +1124,21 @@ private okhttp3.Call getSolStakingHistoryValidateBeforeCall( } /** - * Get SOL staking history(USER_DATA) Get SOL staking history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get SOL staking history (USER_DATA) Get SOL staking history Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 3 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param purchaseId (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetSolStakingHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1132,11 +1150,16 @@ private okhttp3.Call getSolStakingHistoryValidateBeforeCall( * * * @see Get - * SOL staking history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-sol-staking-history">Get + * SOL staking history (USER_DATA) Documentation */ public ApiResponse getSolStakingHistory( - Long purchaseId, Long startTime, Long endTime, Long current, Long size, Long recvWindow) + Long purchaseId, + Long startTime, + Long endTime, + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getSolStakingHistoryValidateBeforeCall( @@ -1149,7 +1172,7 @@ public ApiResponse getSolStakingHistory( /** * Build call for getSolStakingQuotaDetails * - * @param recvWindow (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1160,8 +1183,8 @@ public ApiResponse getSolStakingHistory( * * * @see Get - * SOL staking quota details(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-sol-staking-quota-details">Get + * SOL staking quota details (USER_DATA) Documentation */ private okhttp3.Call getSolStakingQuotaDetailsCall(Long recvWindow) throws ApiException { String basePath = null; @@ -1254,9 +1277,10 @@ private okhttp3.Call getSolStakingQuotaDetailsValidateBeforeCall(Long recvWindow } /** - * Get SOL staking quota details(USER_DATA) Get SOL staking quota Weight: 150 + * Get SOL staking quota details (USER_DATA) Get SOL staking quota Weight(IP): 150 Security + * Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return ApiResponse<GetSolStakingQuotaDetailsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1268,11 +1292,11 @@ private okhttp3.Call getSolStakingQuotaDetailsValidateBeforeCall(Long recvWindow * * * @see Get - * SOL staking quota details(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-sol-staking-quota-details">Get + * SOL staking quota details (USER_DATA) Documentation */ - public ApiResponse getSolStakingQuotaDetails(Long recvWindow) - throws ApiException { + public ApiResponse getSolStakingQuotaDetails( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getSolStakingQuotaDetailsValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -1282,7 +1306,7 @@ public ApiResponse getSolStakingQuotaDetails( /** * Build call for getUnclaimedRewards * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1293,8 +1317,8 @@ public ApiResponse getSolStakingQuotaDetails( * * * @see Get - * Unclaimed Rewards(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-unclaimed-rewards">Get + * Unclaimed Rewards (USER_DATA) Documentation */ private okhttp3.Call getUnclaimedRewardsCall(Long recvWindow) throws ApiException { String basePath = null; @@ -1387,15 +1411,16 @@ private okhttp3.Call getUnclaimedRewardsValidateBeforeCall(Long recvWindow) } /** - * Get Unclaimed Rewards(USER_DATA) Get Unclaimed rewards * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get Unclaimed Rewards (USER_DATA) Get Unclaimed rewards Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 3 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetUnclaimedRewardsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1407,11 +1432,11 @@ private okhttp3.Call getUnclaimedRewardsValidateBeforeCall(Long recvWindow) * * * @see Get - * Unclaimed Rewards(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-unclaimed-rewards">Get + * Unclaimed Rewards (USER_DATA) Documentation */ - public ApiResponse getUnclaimedRewards(Long recvWindow) - throws ApiException { + public ApiResponse getUnclaimedRewards( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getUnclaimedRewardsValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -1432,8 +1457,8 @@ public ApiResponse getUnclaimedRewards(Long recvWin * * * @see Redeem - * SOL(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#redeem-sol">Redeem + * SOL (TRADE) Documentation */ private okhttp3.Call redeemSolCall(RedeemSolRequest redeemSolRequest) throws ApiException { String basePath = null; @@ -1531,8 +1556,9 @@ private okhttp3.Call redeemSolValidateBeforeCall(RedeemSolRequest redeemSolReque } /** - * Redeem SOL(TRADE) Redeem BNSOL get SOL * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 150 + * Redeem SOL (TRADE) Redeem BNSOL get SOL Weight(IP): 150 Security Type: TRADE Notes: - You + * need to open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. * * @param redeemSolRequest (required) * @return ApiResponse<RedeemSolResponse> @@ -1546,8 +1572,8 @@ private okhttp3.Call redeemSolValidateBeforeCall(RedeemSolRequest redeemSolReque * * * @see Redeem - * SOL(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#redeem-sol">Redeem + * SOL (TRADE) Documentation */ public ApiResponse redeemSol( @Valid @NotNull RedeemSolRequest redeemSolRequest) throws ApiException { @@ -1559,7 +1585,7 @@ public ApiResponse redeemSol( /** * Build call for solStakingAccount * - * @param recvWindow (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1570,8 +1596,8 @@ public ApiResponse redeemSol( * * * @see SOL - * Staking account(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#sol-staking-account">SOL + * Staking account (USER_DATA) Documentation */ private okhttp3.Call solStakingAccountCall(Long recvWindow) throws ApiException { String basePath = null; @@ -1663,9 +1689,9 @@ private okhttp3.Call solStakingAccountValidateBeforeCall(Long recvWindow) throws } /** - * SOL Staking account(USER_DATA) SOL Staking account Weight: 150 + * SOL Staking account (USER_DATA) SOL Staking account Weight(IP): 150 Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return ApiResponse<SolStakingAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1677,10 +1703,10 @@ private okhttp3.Call solStakingAccountValidateBeforeCall(Long recvWindow) throws * * * @see SOL - * Staking account(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#sol-staking-account">SOL + * Staking account (USER_DATA) Documentation */ - public ApiResponse solStakingAccount(Long recvWindow) + public ApiResponse solStakingAccount(@Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = solStakingAccountValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1702,8 +1728,8 @@ public ApiResponse solStakingAccount(Long recvWindow) * * * @see Subscribe - * SOL Staking(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#subscribe-sol-staking">Subscribe + * SOL Staking (TRADE) Documentation */ private okhttp3.Call subscribeSolStakingCall( SubscribeSolStakingRequest subscribeSolStakingRequest) throws ApiException { @@ -1805,8 +1831,9 @@ private okhttp3.Call subscribeSolStakingValidateBeforeCall( } /** - * Subscribe SOL Staking(TRADE) Subscribe SOL Staking * You need to open Enable Spot & - * Margin Trading permission for the API Key which requests this endpoint. Weight: 150 + * Subscribe SOL Staking (TRADE) Subscribe SOL Staking Weight(IP): 150 Security Type: TRADE + * Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which + * requests this endpoint. * * @param subscribeSolStakingRequest (required) * @return ApiResponse<SubscribeSolStakingResponse> @@ -1820,8 +1847,8 @@ private okhttp3.Call subscribeSolStakingValidateBeforeCall( * * * @see Subscribe - * SOL Staking(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#subscribe-sol-staking">Subscribe + * SOL Staking (TRADE) Documentation */ public ApiResponse subscribeSolStaking( @Valid @NotNull SubscribeSolStakingRequest subscribeSolStakingRequest) diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/StakingRestApi.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/StakingRestApi.java index 8f8ed6921..0adf5b3e9 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/StakingRestApi.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/StakingRestApi.java @@ -32,6 +32,7 @@ import com.binance.connector.client.staking.rest.model.GetWbethUnwrapHistoryResponse; import com.binance.connector.client.staking.rest.model.GetWbethWrapHistoryResponse; import com.binance.connector.client.staking.rest.model.OnChainYieldsAccountResponse; +import com.binance.connector.client.staking.rest.model.OrderType; import com.binance.connector.client.staking.rest.model.RedeemEthRequest; import com.binance.connector.client.staking.rest.model.RedeemEthResponse; import com.binance.connector.client.staking.rest.model.RedeemOnChainYieldsLockedProductRequest; @@ -72,9 +73,9 @@ public StakingRestApi(ApiClient apiClient) { } /** - * ETH Staking account(USER_DATA) ETH Staking account Weight: 150 + * ETH Staking account (USER_DATA) ETH Staking account Weight(IP): 150 Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<EthStakingAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -86,8 +87,8 @@ public StakingRestApi(ApiClient apiClient) { * * * @see ETH - * Staking account(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#eth-staking-account">ETH + * Staking account (USER_DATA) Documentation */ public ApiResponse ethStakingAccount(Long recvWindow) throws ApiException { @@ -95,9 +96,10 @@ public ApiResponse ethStakingAccount(Long recvWindow) } /** - * Get current ETH staking quota(USER_DATA) Get current ETH staking quota Weight: 150 + * Get current ETH staking quota (USER_DATA) Get current ETH staking quota Weight(IP): 150 + * Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetCurrentEthStakingQuotaResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -109,8 +111,8 @@ public ApiResponse ethStakingAccount(Long recvWindow) * * * @see Get - * current ETH staking quota(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-current-eth-staking-quota">Get + * current ETH staking quota (USER_DATA) Documentation */ public ApiResponse getCurrentEthStakingQuota(Long recvWindow) throws ApiException { @@ -118,20 +120,21 @@ public ApiResponse getCurrentEthStakingQuota( } /** - * Get ETH redemption history(USER_DATA) Get ETH redemption history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get ETH redemption history (USER_DATA) Get ETH redemption history Weight(IP): 150 Security + * Type: USER_DATA Notes: - The time between `startTime` and `endTime` + * cannot be longer than 3 months. - If `startTime` and `endTime` are both + * not sent, then the last 30 days' data will be returned. - If `startTime` is + * sent but `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param redeemId (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetEthRedemptionHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -143,8 +146,8 @@ public ApiResponse getCurrentEthStakingQuota( * * * @see Get - * ETH redemption history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-eth-redemption-history">Get + * ETH redemption history (USER_DATA) Documentation */ public ApiResponse getEthRedemptionHistory( Long redeemId, Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -154,20 +157,21 @@ public ApiResponse getEthRedemptionHistory( } /** - * Get ETH staking history(USER_DATA) Get ETH staking history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get ETH staking history (USER_DATA) Get ETH staking history Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 3 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param purchaseId (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetEthStakingHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -179,8 +183,8 @@ public ApiResponse getEthRedemptionHistory( * * * @see Get - * ETH staking history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-eth-staking-history">Get + * ETH staking history (USER_DATA) Documentation */ public ApiResponse getEthStakingHistory( Long purchaseId, Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -190,19 +194,20 @@ public ApiResponse getEthStakingHistory( } /** - * Get WBETH Rate History(USER_DATA) Get WBETH Rate History * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get WBETH Rate History (USER_DATA) Get WBETH Rate History Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 3 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetWbethRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -214,8 +219,8 @@ public ApiResponse getEthStakingHistory( * * * @see Get - * WBETH Rate History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-wbeth-rate-history">Get + * WBETH Rate History (USER_DATA) Documentation */ public ApiResponse getWbethRateHistory( Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -224,19 +229,20 @@ public ApiResponse getWbethRateHistory( } /** - * Get WBETH rewards history(USER_DATA) Get WBETH rewards history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get WBETH rewards history (USER_DATA) Get WBETH rewards history Weight(IP): 150 Security + * Type: USER_DATA Notes: - The time between `startTime` and `endTime` + * cannot be longer than 3 months. - If `startTime` and `endTime` are both + * not sent, then the last 30 days' data will be returned. - If `startTime` is + * sent but `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetWbethRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -248,8 +254,8 @@ public ApiResponse getWbethRateHistory( * * * @see Get - * WBETH rewards history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-wbeth-rewards-history">Get + * WBETH rewards history (USER_DATA) Documentation */ public ApiResponse getWbethRewardsHistory( Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -258,19 +264,20 @@ public ApiResponse getWbethRewardsHistory( } /** - * Get WBETH unwrap history(USER_DATA) Get WBETH unwrap history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get WBETH unwrap history (USER_DATA) Get WBETH unwrap history Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 3 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetWbethUnwrapHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -282,8 +289,8 @@ public ApiResponse getWbethRewardsHistory( * * * @see Get - * WBETH unwrap history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-wbeth-unwrap-history">Get + * WBETH unwrap history (USER_DATA) Documentation */ public ApiResponse getWbethUnwrapHistory( Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -292,19 +299,20 @@ public ApiResponse getWbethUnwrapHistory( } /** - * Get WBETH wrap history(USER_DATA) Get WBETH wrap history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get WBETH wrap history (USER_DATA) Get WBETH wrap history Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 3 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetWbethWrapHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -316,8 +324,8 @@ public ApiResponse getWbethUnwrapHistory( * * * @see Get - * WBETH wrap history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#get-wbeth-wrap-history">Get + * WBETH wrap history (USER_DATA) Documentation */ public ApiResponse getWbethWrapHistory( Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -326,8 +334,9 @@ public ApiResponse getWbethWrapHistory( } /** - * Redeem ETH(TRADE) Redeem WBETH or BETH and get ETH * You need to open Enable Spot & - * Margin Trading permission for the API Key which requests this endpoint. Weight: 150 + * Redeem ETH (TRADE) Redeem WBETH or BETH and get ETH Weight(IP): 150 Security Type: TRADE + * Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which + * requests this endpoint. * * @param redeemEthRequest (required) * @return ApiResponse<RedeemEthResponse> @@ -341,8 +350,8 @@ public ApiResponse getWbethWrapHistory( * * * @see Redeem - * ETH(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#redeem-eth">Redeem + * ETH (TRADE) Documentation */ public ApiResponse redeemEth(RedeemEthRequest redeemEthRequest) throws ApiException { @@ -350,8 +359,9 @@ public ApiResponse redeemEth(RedeemEthRequest redeemEthReques } /** - * Subscribe ETH Staking(TRADE) Subscribe ETH Staking * You need to open Enable Spot & - * Margin Trading permission for the API Key which requests this endpoint. Weight: 150 + * Subscribe ETH Staking (TRADE) Subscribe ETH Staking Weight(IP): 150 Security Type: TRADE + * Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which + * requests this endpoint. * * @param subscribeEthStakingRequest (required) * @return ApiResponse<SubscribeEthStakingResponse> @@ -365,8 +375,8 @@ public ApiResponse redeemEth(RedeemEthRequest redeemEthReques * * * @see Subscribe - * ETH Staking(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/eth-staking#subscribe-eth-staking">Subscribe + * ETH Staking (TRADE) Documentation */ public ApiResponse subscribeEthStaking( SubscribeEthStakingRequest subscribeEthStakingRequest) throws ApiException { @@ -374,8 +384,8 @@ public ApiResponse subscribeEthStaking( } /** - * Wrap BETH(TRADE) Wrap BETH * You need to open Enable Spot & Margin Trading permission for - * the API Key which requests this endpoint. Weight: 150 + * Wrap BETH (TRADE) Wrap BETH Weight(IP): 150 Security Type: TRADE Notes: - You need to open + * Enable Spot & Margin Trading permission for the API Key which requests this endpoint. * * @param wrapBethRequest (required) * @return ApiResponse<WrapBethResponse> @@ -388,8 +398,9 @@ public ApiResponse subscribeEthStaking( * 200 Wrap BETH - * * - * @see Wrap - * BETH(TRADE) Documentation + * @see Wrap + * BETH (TRADE) Documentation */ public ApiResponse wrapBeth(WrapBethRequest wrapBethRequest) throws ApiException { @@ -398,10 +409,10 @@ public ApiResponse wrapBeth(WrapBethRequest wrapBethRequest) /** * Get On-chain Yields Locked Personal Left Quota (USER_DATA) Get On-chain Yields Locked - * Personal Left Quota Weight: 50 + * Personal Left Quota Weight(IP): 50 Security Type: USER_DATA * * @param projectId (required) - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetOnChainYieldsLockedPersonalLeftQuotaResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -413,7 +424,7 @@ public ApiResponse wrapBeth(WrapBethRequest wrapBethRequest) * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-personal-left-quota">Get * On-chain Yields Locked Personal Left Quota (USER_DATA) Documentation */ public ApiResponse @@ -424,12 +435,13 @@ public ApiResponse wrapBeth(WrapBethRequest wrapBethRequest) /** * Get On-chain Yields Locked Product List (USER_DATA) Get available On-chain Yields Locked - * product list * Get available On-chain Yields Locked product list Weight: 50 + * product list Weight(IP): 50 Security Type: USER_DATA Notes: - Get available On-chain Yields + * Locked product list * * @param asset (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetOnChainYieldsLockedProductListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -440,7 +452,8 @@ public ApiResponse wrapBeth(WrapBethRequest wrapBethRequest) * 200 Get On-chain Yields Locked Product List - * * - * @see Get + * @see Get * On-chain Yields Locked Product List (USER_DATA) Documentation */ public ApiResponse getOnChainYieldsLockedProductList( @@ -450,14 +463,14 @@ public ApiResponse getOnChainYieldsLo /** * Get On-chain Yields Locked Product Position (USER_DATA) Get On-chain Yields Locked Product - * Position Weight: 50 + * Position Weight(IP): 50 Security Type: USER_DATA * * @param asset (optional) * @param positionId (optional) * @param projectId (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size Number of results per page. (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetOnChainYieldsLockedProductPositionResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -469,7 +482,7 @@ public ApiResponse getOnChainYieldsLo * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-product-position">Get * On-chain Yields Locked Product Position (USER_DATA) Documentation */ public ApiResponse @@ -487,22 +500,22 @@ public ApiResponse getOnChainYieldsLo /** * Get On-chain Yields Locked Redemption Record (USER_DATA) Get On-chain Yields Locked - * Redemption Record * The time between `startTime` and `endTime` cannot be - * longer than 3 months. * If `startTime` and `endTime` are both not sent, - * then the last 30 days' data will be returned. * If `startTime` is sent but - * `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 50 + * Redemption Record Weight(IP): 50 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @param positionId (optional) * @param redeemId (optional) * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetOnChainYieldsLockedRedemptionRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -514,7 +527,7 @@ public ApiResponse getOnChainYieldsLo * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-redemption-record">Get * On-chain Yields Locked Redemption Record (USER_DATA) Documentation */ public ApiResponse @@ -534,21 +547,21 @@ public ApiResponse getOnChainYieldsLo /** * Get On-chain Yields Locked Rewards History (USER_DATA) Get On-chain Yields Locked Rewards - * History * The time between `startTime` and `endTime` cannot be longer - * than 3 months. * If `startTime` and `endTime` are both not sent, then the - * last 30 days' data will be returned. * If `startTime` is sent but - * `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 50 + * History Weight(IP): 50 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @param positionId (optional) * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetOnChainYieldsLockedRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -560,7 +573,7 @@ public ApiResponse getOnChainYieldsLo * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#get-on-chain-yields-locked-rewards-history">Get * On-chain Yields Locked Rewards History (USER_DATA) Documentation */ public ApiResponse @@ -579,12 +592,12 @@ public ApiResponse getOnChainYieldsLo /** * Get On-chain Yields Locked Subscription Preview (USER_DATA) Get On-chain Yields Locked - * Subscription Preview Weight: 50 + * Subscription Preview Weight(IP): 50 Security Type: USER_DATA * * @param projectId (required) * @param amount (required) - * @param autoSubscribe true or false, default true. (optional) - * @param recvWindow (optional) + * @param autoSubscribe (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetOnChainYieldsLockedSubscriptionPreviewResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -595,8 +608,9 @@ public ApiResponse getOnChainYieldsLo * 200 Get On-chain Yields Locked Subscription Preview - * * - * @see Get On-chain - * Yields Locked Subscription Preview (USER_DATA) Documentation + * @see Get + * On-chain Yields Locked Subscription Preview (USER_DATA) Documentation */ public ApiResponse getOnChainYieldsLockedSubscriptionPreview( @@ -608,22 +622,22 @@ public ApiResponse getOnChainYieldsLo /** * Get On-chain Yields Locked Subscription Record (USER_DATA) Get On-chain Yields Locked - * Subscription Record * The time between `startTime` and `endTime` cannot - * be longer than 3 months. * If `startTime` and `endTime` are both not - * sent, then the last 30 days' data will be returned. * If `startTime` is sent - * but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 50 + * Subscription Record Weight(IP): 50 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @param purchaseId (optional) * @param clientId (optional) * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetOnChainYieldsLockedSubscriptionRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -634,7 +648,8 @@ public ApiResponse getOnChainYieldsLo * 200 Get On-chain Yields Locked Subscription Record - * * - * @see Get + * @see Get * On-chain Yields Locked Subscription Record (USER_DATA) Documentation */ public ApiResponse @@ -653,9 +668,10 @@ public ApiResponse getOnChainYieldsLo } /** - * On-chain Yields Account (USER_DATA) On-chain Yields Account query Weight: 50 + * On-chain Yields Account (USER_DATA) On-chain Yields Account query Weight(IP): 50 Security + * Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow The value cannot be greater than `60000` (optional) * @return ApiResponse<OnChainYieldsAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -667,7 +683,7 @@ public ApiResponse getOnChainYieldsLo * * * @see On-chain + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#on-chain-yields-account">On-chain * Yields Account (USER_DATA) Documentation */ public ApiResponse onChainYieldsAccount(Long recvWindow) @@ -676,9 +692,9 @@ public ApiResponse onChainYieldsAccount(Long recvW } /** - * Redeem On-chain Yields Locked Product (TRADE) Redeem On-chain Yields Locked Product * You - * need to open `Enable Spot & Margin Trading` permission for the API Key which - * requests this endpoint. Weight: 1/3s per account + * Redeem On-chain Yields Locked Product (TRADE) Redeem On-chain Yields Locked Product + * Weight(IP): 200 Security Type: TRADE Notes: - You need to open `Enable Spot & Margin + * Trading` permission for the API Key which requests this endpoint. * * @param redeemOnChainYieldsLockedProductRequest (required) * @return ApiResponse<RedeemOnChainYieldsLockedProductResponse> @@ -692,7 +708,7 @@ public ApiResponse onChainYieldsAccount(Long recvW * * * @see Redeem + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#redeem-on-chain-yields-locked-product">Redeem * On-chain Yields Locked Product (TRADE) Documentation */ public ApiResponse redeemOnChainYieldsLockedProduct( @@ -703,8 +719,8 @@ public ApiResponse redeemOnChainYields } /** - * Set On-chain Yields Locked Auto Subscribe(USER_DATA) Set On-chain Yield locked auto subscribe - * Weight: 50 + * Set On-chain Yields Locked Auto Subscribe (USER_DATA) Set On-chain Yield locked auto + * subscribe Weight(IP): 50 Security Type: USER_DATA * * @param setOnChainYieldsLockedAutoSubscribeRequest (required) * @return ApiResponse<SetOnChainYieldsLockedAutoSubscribeResponse> @@ -718,8 +734,8 @@ public ApiResponse redeemOnChainYields * * * @see Set - * On-chain Yields Locked Auto Subscribe(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#set-on-chain-yields-locked-auto-subscribe">Set + * On-chain Yields Locked Auto Subscribe (USER_DATA) Documentation */ public ApiResponse setOnChainYieldsLockedAutoSubscribe( @@ -731,8 +747,8 @@ public ApiResponse redeemOnChainYields } /** - * Set On-chain Yields Locked Product Redeem Option(USER_DATA) Set On-chain Yields redeem option - * for Locked product Weight: 50 + * Set On-chain Yields Locked Product Redeem Option (USER_DATA) Set On-chain Yields redeem + * option for Locked product Weight(IP): 50 Security Type: USER_DATA * * @param setOnChainYieldsLockedProductRedeemOptionRequest (required) * @return ApiResponse<SetOnChainYieldsLockedProductRedeemOptionResponse> @@ -746,8 +762,8 @@ public ApiResponse redeemOnChainYields * * * @see Set - * On-chain Yields Locked Product Redeem Option(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#set-on-chain-yields-locked-product-redeem-option">Set + * On-chain Yields Locked Product Redeem Option (USER_DATA) Documentation */ public ApiResponse setOnChainYieldsLockedProductRedeemOption( @@ -759,9 +775,9 @@ public ApiResponse redeemOnChainYields } /** - * Subscribe On-chain Yields Locked Product(TRADE) Subscribe On-chain Yields Locked Product * - * You need to open `Enable Spot & Margin Trading` permission for the API Key - * which requests this endpoint. Weight: 200 + * Subscribe On-chain Yields Locked Product (TRADE) Subscribe On-chain Yields Locked Product + * Weight(IP): 200 Security Type: TRADE Notes: - You need to open `Enable Spot & Margin + * Trading` permission for the API Key which requests this endpoint. * * @param subscribeOnChainYieldsLockedProductRequest (required) * @return ApiResponse<SubscribeOnChainYieldsLockedProductResponse> @@ -775,8 +791,8 @@ public ApiResponse redeemOnChainYields * * * @see Subscribe - * On-chain Yields Locked Product(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/on-chain-yields#subscribe-on-chain-yields-locked-product">Subscribe + * On-chain Yields Locked Product (TRADE) Documentation */ public ApiResponse subscribeOnChainYieldsLockedProduct( @@ -789,12 +805,12 @@ public ApiResponse redeemOnChainYields /** * Get Soft Staking Product List (USER_DATA) Get the available Soft Staking product list. - * Weight: 50 + * Weight(IP): 50 Security Type: USER_DATA * * @param asset (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetSoftStakingProductListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -805,8 +821,9 @@ public ApiResponse redeemOnChainYields * 200 Get Soft Staking Product List - * * - * @see Get Soft Staking - * Product List (USER_DATA) Documentation + * @see Get + * Soft Staking Product List (USER_DATA) Documentation */ public ApiResponse getSoftStakingProductList( String asset, Long current, Long size, Long recvWindow) throws ApiException { @@ -814,20 +831,21 @@ public ApiResponse getSoftStakingProductList( } /** - * Get Soft Staking Rewards History(USER_DATA) * The time between `startTime` and - * `endTime` cannot be longer than 3 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If + * Get Soft Staking Rewards History (USER_DATA) Get Soft Staking Rewards History Weight(IP): 50 + * Security Type: USER_DATA Notes: - The time between `startTime` and + * `endTime` cannot be longer than 3 months. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but + * beginning from `startTime` will be returned. - If `endTime` is sent but * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 50 + * returned. * * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetSoftStakingRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -839,8 +857,8 @@ public ApiResponse getSoftStakingProductList( * * * @see Get - * Soft Staking Rewards History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/soft-staking#get-soft-staking-rewards-history">Get + * Soft Staking Rewards History (USER_DATA) Documentation */ public ApiResponse getSoftStakingRewardsHistory( String asset, Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -850,10 +868,11 @@ public ApiResponse getSoftStakingRewardsHi } /** - * Set Soft Staking (USER_DATA) Enable or disable Soft Staking. Weight: 50 + * Set Soft Staking (USER_DATA) Enable or disable Soft Staking. Weight(IP): 50 Security Type: + * USER_DATA * - * @param softStaking true or false (required) - * @param recvWindow (optional) + * @param softStaking (required) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<SetSoftStakingResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -864,7 +883,8 @@ public ApiResponse getSoftStakingRewardsHi * 200 Set Soft Staking - * * - * @see Set + * @see Set * Soft Staking (USER_DATA) Documentation */ public ApiResponse setSoftStaking(Boolean softStaking, Long recvWindow) @@ -873,10 +893,11 @@ public ApiResponse setSoftStaking(Boolean softStaking, L } /** - * Claim Boost Rewards(TRADE) Claim Boost APR Airdrop Rewards * You need to open Enable Spot - * & Margin Trading permission for the API Key which requests this endpoint. Weight: 150 + * Claim Boost Rewards (TRADE) Claim Boost APR Airdrop Rewards Weight(IP): 150 Security Type: + * TRADE Notes: - You need to open Enable Spot & Margin Trading permission for the API Key + * which requests this endpoint. * - * @param claimBoostRewardsRequest (required) + * @param claimBoostRewardsRequest (optional) * @return ApiResponse<ClaimBoostRewardsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -888,8 +909,8 @@ public ApiResponse setSoftStaking(Boolean softStaking, L * * * @see Claim - * Boost Rewards(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#claim-boost-rewards">Claim + * Boost Rewards (TRADE) Documentation */ public ApiResponse claimBoostRewards( ClaimBoostRewardsRequest claimBoostRewardsRequest) throws ApiException { @@ -897,19 +918,20 @@ public ApiResponse claimBoostRewards( } /** - * Get BNSOL Rate History(USER_DATA) Get BNSOL Rate History * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get BNSOL Rate History (USER_DATA) Get BNSOL Rate History Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 3 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return ApiResponse<GetBnsolRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -921,8 +943,8 @@ public ApiResponse claimBoostRewards( * * * @see Get - * BNSOL Rate History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-bnsol-rate-history">Get + * BNSOL Rate History (USER_DATA) Documentation */ public ApiResponse getBnsolRateHistory( Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -931,19 +953,20 @@ public ApiResponse getBnsolRateHistory( } /** - * Get BNSOL rewards history(USER_DATA) Get BNSOL rewards history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get BNSOL rewards history (USER_DATA) Get BNSOL rewards history Weight(IP): 150 Security + * Type: USER_DATA Notes: - The time between `startTime` and `endTime` + * cannot be longer than 3 months. - If `startTime` and `endTime` are both + * not sent, then the last 30 days' data will be returned. - If `startTime` is + * sent but `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetBnsolRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -955,8 +978,8 @@ public ApiResponse getBnsolRateHistory( * * * @see Get - * BNSOL rewards history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-bnsol-rewards-history">Get + * BNSOL rewards history (USER_DATA) Documentation */ public ApiResponse getBnsolRewardsHistory( Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -965,21 +988,21 @@ public ApiResponse getBnsolRewardsHistory( } /** - * Get Boost Rewards History(USER_DATA) Get Boost rewards history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get Boost Rewards History (USER_DATA) Get Boost rewards history Weight(IP): 150 Security + * Type: USER_DATA Notes: - The time between `startTime` and `endTime` + * cannot be longer than 3 months. - If `startTime` and `endTime` are both + * not sent, then the last 30 days' data will be returned. - If `startTime` is + * sent but `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * - * @param type \"CLAIM\", \"DISTRIBUTE\", default \"CLAIM\" - * (required) + * @param type (required) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetBoostRewardsHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -991,31 +1014,32 @@ public ApiResponse getBnsolRewardsHistory( * * * @see Get - * Boost Rewards History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-boost-rewards-history">Get + * Boost Rewards History (USER_DATA) Documentation */ public ApiResponse getBoostRewardsHistory( - String type, Long startTime, Long endTime, Long current, Long size, Long recvWindow) + OrderType type, Long startTime, Long endTime, Long current, Long size, Long recvWindow) throws ApiException { return solStakingApi.getBoostRewardsHistory( type, startTime, endTime, current, size, recvWindow); } /** - * Get SOL redemption history(USER_DATA) Get SOL redemption history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get SOL redemption history (USER_DATA) Get SOL redemption history Weight(IP): 150 Security + * Type: USER_DATA Notes: - The time between `startTime` and `endTime` + * cannot be longer than 3 months. - If `startTime` and `endTime` are both + * not sent, then the last 30 days' data will be returned. - If `startTime` is + * sent but `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param redeemId (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetSolRedemptionHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1027,8 +1051,8 @@ public ApiResponse getBoostRewardsHistory( * * * @see Get - * SOL redemption history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-sol-redemption-history">Get + * SOL redemption history (USER_DATA) Documentation */ public ApiResponse getSolRedemptionHistory( Long redeemId, Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -1038,20 +1062,21 @@ public ApiResponse getSolRedemptionHistory( } /** - * Get SOL staking history(USER_DATA) Get SOL staking history * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get SOL staking history (USER_DATA) Get SOL staking history Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 3 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @param purchaseId (optional) * @param startTime (optional) * @param endTime (optional) - * @param current Currently querying page. Start from 1. Default:1 (optional) - * @param size Default:10, Max:100 (optional) - * @param recvWindow (optional) + * @param current Currently querying page (optional) + * @param size (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetSolStakingHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1063,8 +1088,8 @@ public ApiResponse getSolRedemptionHistory( * * * @see Get - * SOL staking history(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-sol-staking-history">Get + * SOL staking history (USER_DATA) Documentation */ public ApiResponse getSolStakingHistory( Long purchaseId, Long startTime, Long endTime, Long current, Long size, Long recvWindow) @@ -1074,9 +1099,10 @@ public ApiResponse getSolStakingHistory( } /** - * Get SOL staking quota details(USER_DATA) Get SOL staking quota Weight: 150 + * Get SOL staking quota details (USER_DATA) Get SOL staking quota Weight(IP): 150 Security + * Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return ApiResponse<GetSolStakingQuotaDetailsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1088,8 +1114,8 @@ public ApiResponse getSolStakingHistory( * * * @see Get - * SOL staking quota details(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-sol-staking-quota-details">Get + * SOL staking quota details (USER_DATA) Documentation */ public ApiResponse getSolStakingQuotaDetails(Long recvWindow) throws ApiException { @@ -1097,15 +1123,16 @@ public ApiResponse getSolStakingQuotaDetails( } /** - * Get Unclaimed Rewards(USER_DATA) Get Unclaimed rewards * The time between - * `startTime` and `endTime` cannot be longer than 3 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, the next 30 days' data beginning from `startTime` will be returned. * If - * `endTime` is sent but `startTime` is not sent, the 30 days' data - * before `endTime` will be returned. Weight: 150 + * Get Unclaimed Rewards (USER_DATA) Get Unclaimed rewards Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 3 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * - * @param recvWindow (optional) + * @param recvWindow Request validity window in milliseconds. (optional) * @return ApiResponse<GetUnclaimedRewardsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1117,8 +1144,8 @@ public ApiResponse getSolStakingQuotaDetails( * * * @see Get - * Unclaimed Rewards(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#get-unclaimed-rewards">Get + * Unclaimed Rewards (USER_DATA) Documentation */ public ApiResponse getUnclaimedRewards(Long recvWindow) throws ApiException { @@ -1126,8 +1153,9 @@ public ApiResponse getUnclaimedRewards(Long recvWin } /** - * Redeem SOL(TRADE) Redeem BNSOL get SOL * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 150 + * Redeem SOL (TRADE) Redeem BNSOL get SOL Weight(IP): 150 Security Type: TRADE Notes: - You + * need to open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. * * @param redeemSolRequest (required) * @return ApiResponse<RedeemSolResponse> @@ -1141,8 +1169,8 @@ public ApiResponse getUnclaimedRewards(Long recvWin * * * @see Redeem - * SOL(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#redeem-sol">Redeem + * SOL (TRADE) Documentation */ public ApiResponse redeemSol(RedeemSolRequest redeemSolRequest) throws ApiException { @@ -1150,9 +1178,9 @@ public ApiResponse redeemSol(RedeemSolRequest redeemSolReques } /** - * SOL Staking account(USER_DATA) SOL Staking account Weight: 150 + * SOL Staking account (USER_DATA) SOL Staking account Weight(IP): 150 Security Type: USER_DATA * - * @param recvWindow (optional) + * @param recvWindow The value cannot be greater than 60000 (optional) * @return ApiResponse<SolStakingAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1164,8 +1192,8 @@ public ApiResponse redeemSol(RedeemSolRequest redeemSolReques * * * @see SOL - * Staking account(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#sol-staking-account">SOL + * Staking account (USER_DATA) Documentation */ public ApiResponse solStakingAccount(Long recvWindow) throws ApiException { @@ -1173,8 +1201,9 @@ public ApiResponse solStakingAccount(Long recvWindow) } /** - * Subscribe SOL Staking(TRADE) Subscribe SOL Staking * You need to open Enable Spot & - * Margin Trading permission for the API Key which requests this endpoint. Weight: 150 + * Subscribe SOL Staking (TRADE) Subscribe SOL Staking Weight(IP): 150 Security Type: TRADE + * Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which + * requests this endpoint. * * @param subscribeSolStakingRequest (required) * @return ApiResponse<SubscribeSolStakingResponse> @@ -1188,8 +1217,8 @@ public ApiResponse solStakingAccount(Long recvWindow) * * * @see Subscribe - * SOL Staking(TRADE) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-staking/api/rest-api/sol-staking#subscribe-sol-staking">Subscribe + * SOL Staking (TRADE) Documentation */ public ApiResponse subscribeSolStaking( SubscribeSolStakingRequest subscribeSolStakingRequest) throws ApiException { diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/Asset.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/Asset.java new file mode 100644 index 000000000..e38834036 --- /dev/null +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/Asset.java @@ -0,0 +1,72 @@ +/* + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.staking.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets asset */ +@JsonAdapter(Asset.Adapter.class) +public enum Asset { + WBETH("WBETH"), + + BETH("BETH"); + + private String value; + + Asset(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Asset fromValue(String value) { + for (Asset b : Asset.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Asset enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Asset read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Asset.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Asset.fromValue(value); + } +} diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/ClaimBoostRewardsRequest.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/ClaimBoostRewardsRequest.java index c84e6d8a2..85cbc8d73 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/ClaimBoostRewardsRequest.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/ClaimBoostRewardsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ClaimBoostRewardsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ClaimBoostRewardsRequest { public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -50,11 +50,12 @@ public ClaimBoostRewardsRequest recvWindow(@jakarta.annotation.Nullable Long rec } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/ClaimBoostRewardsResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/ClaimBoostRewardsResponse.java index d72733d3c..9e11c642a 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/ClaimBoostRewardsResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/ClaimBoostRewardsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ClaimBoostRewardsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ClaimBoostRewardsResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/EthStakingAccountResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/EthStakingAccountResponse.java index 0b643c529..161410ad7 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/EthStakingAccountResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/EthStakingAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** EthStakingAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class EthStakingAccountResponse { public static final String SERIALIZED_NAME_HOLDING_IN_E_T_H = "holdingInETH"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/EthStakingAccountResponseHoldings.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/EthStakingAccountResponseHoldings.java index 44242486b..0fe1a53c8 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/EthStakingAccountResponseHoldings.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/EthStakingAccountResponseHoldings.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** EthStakingAccountResponseHoldings */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class EthStakingAccountResponseHoldings { public static final String SERIALIZED_NAME_WBETH_AMOUNT = "wbethAmount"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/EthStakingAccountResponseProfit.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/EthStakingAccountResponseProfit.java index ae9192dca..9cfafb352 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/EthStakingAccountResponseProfit.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/EthStakingAccountResponseProfit.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** EthStakingAccountResponseProfit */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class EthStakingAccountResponseProfit { public static final String SERIALIZED_NAME_AMOUNT_FROM_W_B_E_T_H = "amountFromWBETH"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRateHistoryResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRateHistoryResponse.java index 2ca5eec0b..8f52473c7 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRateHistoryResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRateHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetBnsolRateHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBnsolRateHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRateHistoryResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRateHistoryResponseRowsInner.java index 0e564b176..066612562 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRateHistoryResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRateHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetBnsolRateHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBnsolRateHistoryResponseRowsInner { public static final String SERIALIZED_NAME_ANNUAL_PERCENTAGE_RATE = "annualPercentageRate"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRateHistoryResponseRowsInnerBoostRewardsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRateHistoryResponseRowsInnerBoostRewardsInner.java index 29d720710..93d76445d 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRateHistoryResponseRowsInnerBoostRewardsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRateHistoryResponseRowsInnerBoostRewardsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetBnsolRateHistoryResponseRowsInnerBoostRewardsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBnsolRateHistoryResponseRowsInnerBoostRewardsInner { public static final String SERIALIZED_NAME_BOOST_A_P_R = "boostAPR"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRewardsHistoryResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRewardsHistoryResponse.java index ca4454943..a070a6311 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRewardsHistoryResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRewardsHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetBnsolRewardsHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBnsolRewardsHistoryResponse { public static final String SERIALIZED_NAME_EST_REWARDS_IN_S_O_L = "estRewardsInSOL"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRewardsHistoryResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRewardsHistoryResponseRowsInner.java index 8e4685d98..2446ab878 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRewardsHistoryResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBnsolRewardsHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetBnsolRewardsHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBnsolRewardsHistoryResponseRowsInner { public static final String SERIALIZED_NAME_TIME = "time"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBoostRewardsHistoryResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBoostRewardsHistoryResponse.java index d1c9cddf6..7481ded40 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBoostRewardsHistoryResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBoostRewardsHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetBoostRewardsHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBoostRewardsHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBoostRewardsHistoryResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBoostRewardsHistoryResponseRowsInner.java index f668b678a..dfa3567fb 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBoostRewardsHistoryResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetBoostRewardsHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetBoostRewardsHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBoostRewardsHistoryResponseRowsInner { public static final String SERIALIZED_NAME_TIME = "time"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetCurrentEthStakingQuotaResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetCurrentEthStakingQuotaResponse.java index 9c0936f0a..333f5f0c4 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetCurrentEthStakingQuotaResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetCurrentEthStakingQuotaResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetCurrentEthStakingQuotaResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCurrentEthStakingQuotaResponse { public static final String SERIALIZED_NAME_LEFT_STAKING_PERSONAL_QUOTA = "leftStakingPersonalQuota"; @@ -101,7 +101,7 @@ public GetCurrentEthStakingQuotaResponse leftStakingPersonalQuota( } /** - * Get leftStakingPersonalQuota + * Show min (Daily available limit, total personal staking quota) * * @return leftStakingPersonalQuota */ @@ -122,7 +122,7 @@ public GetCurrentEthStakingQuotaResponse leftRedemptionPersonalQuota( } /** - * Get leftRedemptionPersonalQuota + * Show min (Daily personal redeem quota, total redemption limit) * * @return leftRedemptionPersonalQuota */ diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetEthRedemptionHistoryResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetEthRedemptionHistoryResponse.java index df27ee9a0..62f9f079e 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetEthRedemptionHistoryResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetEthRedemptionHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetEthRedemptionHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetEthRedemptionHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetEthRedemptionHistoryResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetEthRedemptionHistoryResponseRowsInner.java index 7fb9db6de..18230d72c 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetEthRedemptionHistoryResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetEthRedemptionHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetEthRedemptionHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetEthRedemptionHistoryResponseRowsInner { public static final String SERIALIZED_NAME_TIME = "time"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetEthStakingHistoryResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetEthStakingHistoryResponse.java index f90f738a8..69a73b05f 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetEthStakingHistoryResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetEthStakingHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetEthStakingHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetEthStakingHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetEthStakingHistoryResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetEthStakingHistoryResponseRowsInner.java index f2a968880..bebc154fd 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetEthStakingHistoryResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetEthStakingHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetEthStakingHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetEthStakingHistoryResponseRowsInner { public static final String SERIALIZED_NAME_TIME = "time"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedPersonalLeftQuotaResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedPersonalLeftQuotaResponse.java index 3dfd0fc6c..42aaf0477 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedPersonalLeftQuotaResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedPersonalLeftQuotaResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetOnChainYieldsLockedPersonalLeftQuotaResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOnChainYieldsLockedPersonalLeftQuotaResponse { public static final String SERIALIZED_NAME_LEFT_PERSONAL_QUOTA = "leftPersonalQuota"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductListResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductListResponse.java index 419ebc1fb..39105143c 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductListResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetOnChainYieldsLockedProductListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOnChainYieldsLockedProductListResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductListResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductListResponseRowsInner.java index e1c5a7daa..2b6399c26 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductListResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductListResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetOnChainYieldsLockedProductListResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOnChainYieldsLockedProductListResponseRowsInner { public static final String SERIALIZED_NAME_PROJECT_ID = "projectId"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductListResponseRowsInnerDetail.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductListResponseRowsInnerDetail.java index 4905616fa..2a46371af 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductListResponseRowsInnerDetail.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductListResponseRowsInnerDetail.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetOnChainYieldsLockedProductListResponseRowsInnerDetail */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOnChainYieldsLockedProductListResponseRowsInnerDetail { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductListResponseRowsInnerQuota.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductListResponseRowsInnerQuota.java index 82920bfb6..ba7f8a099 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductListResponseRowsInnerQuota.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductListResponseRowsInnerQuota.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetOnChainYieldsLockedProductListResponseRowsInnerQuota */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOnChainYieldsLockedProductListResponseRowsInnerQuota { public static final String SERIALIZED_NAME_TOTAL_PERSONAL_QUOTA = "totalPersonalQuota"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductPositionResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductPositionResponse.java index 0abb516e8..fc995a527 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductPositionResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductPositionResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetOnChainYieldsLockedProductPositionResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOnChainYieldsLockedProductPositionResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductPositionResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductPositionResponseRowsInner.java index 60e47236a..d2b69597f 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductPositionResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedProductPositionResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetOnChainYieldsLockedProductPositionResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOnChainYieldsLockedProductPositionResponseRowsInner { public static final String SERIALIZED_NAME_POSITION_ID = "positionId"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedRedemptionRecordResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedRedemptionRecordResponse.java index e9f86bca5..9aaed786e 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedRedemptionRecordResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedRedemptionRecordResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetOnChainYieldsLockedRedemptionRecordResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOnChainYieldsLockedRedemptionRecordResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedRedemptionRecordResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedRedemptionRecordResponseRowsInner.java index 405cfabd0..7313d7ca0 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedRedemptionRecordResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedRedemptionRecordResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetOnChainYieldsLockedRedemptionRecordResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOnChainYieldsLockedRedemptionRecordResponseRowsInner { public static final String SERIALIZED_NAME_POSITION_ID = "positionId"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedRewardsHistoryResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedRewardsHistoryResponse.java index 540ac3f51..166218661 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedRewardsHistoryResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedRewardsHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetOnChainYieldsLockedRewardsHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOnChainYieldsLockedRewardsHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedRewardsHistoryResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedRewardsHistoryResponseRowsInner.java index 916fd3885..ee7fe564b 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedRewardsHistoryResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedRewardsHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetOnChainYieldsLockedRewardsHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOnChainYieldsLockedRewardsHistoryResponseRowsInner { public static final String SERIALIZED_NAME_POSITION_ID = "positionId"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedSubscriptionPreviewResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedSubscriptionPreviewResponse.java index d10289cca..6ad7452e5 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedSubscriptionPreviewResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedSubscriptionPreviewResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetOnChainYieldsLockedSubscriptionPreviewResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOnChainYieldsLockedSubscriptionPreviewResponse { public static final String SERIALIZED_NAME_REWARD_ASSET = "rewardAsset"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedSubscriptionRecordResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedSubscriptionRecordResponse.java index 975aa925e..5a5308965 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedSubscriptionRecordResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedSubscriptionRecordResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetOnChainYieldsLockedSubscriptionRecordResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOnChainYieldsLockedSubscriptionRecordResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedSubscriptionRecordResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedSubscriptionRecordResponseRowsInner.java index 5a9d64fd3..636509711 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedSubscriptionRecordResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetOnChainYieldsLockedSubscriptionRecordResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetOnChainYieldsLockedSubscriptionRecordResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOnChainYieldsLockedSubscriptionRecordResponseRowsInner { public static final String SERIALIZED_NAME_POSITION_ID = "positionId"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSoftStakingProductListResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSoftStakingProductListResponse.java index f819a77bb..44ca7545f 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSoftStakingProductListResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSoftStakingProductListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetSoftStakingProductListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSoftStakingProductListResponse { public static final String SERIALIZED_NAME_STATUS = "status"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSoftStakingProductListResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSoftStakingProductListResponseRowsInner.java index cd4a3d416..c5324e5e0 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSoftStakingProductListResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSoftStakingProductListResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSoftStakingProductListResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSoftStakingProductListResponseRowsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSoftStakingRewardsHistoryResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSoftStakingRewardsHistoryResponse.java index b9805e048..471ada4bd 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSoftStakingRewardsHistoryResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSoftStakingRewardsHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetSoftStakingRewardsHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSoftStakingRewardsHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSoftStakingRewardsHistoryResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSoftStakingRewardsHistoryResponseRowsInner.java index a658d9ab5..d09107b65 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSoftStakingRewardsHistoryResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSoftStakingRewardsHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSoftStakingRewardsHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSoftStakingRewardsHistoryResponseRowsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolRedemptionHistoryResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolRedemptionHistoryResponse.java index 61339ee0b..26af07037 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolRedemptionHistoryResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolRedemptionHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetSolRedemptionHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSolRedemptionHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolRedemptionHistoryResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolRedemptionHistoryResponseRowsInner.java index 06225a216..395c81360 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolRedemptionHistoryResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolRedemptionHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSolRedemptionHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSolRedemptionHistoryResponseRowsInner { public static final String SERIALIZED_NAME_TIME = "time"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolStakingHistoryResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolStakingHistoryResponse.java index 4f0cf4a78..27afbbe85 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolStakingHistoryResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolStakingHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetSolStakingHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSolStakingHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolStakingHistoryResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolStakingHistoryResponseRowsInner.java index 7ebd92678..797bef27c 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolStakingHistoryResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolStakingHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSolStakingHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSolStakingHistoryResponseRowsInner { public static final String SERIALIZED_NAME_TIME = "time"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolStakingQuotaDetailsResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolStakingQuotaDetailsResponse.java index 64c0e9630..9418f5086 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolStakingQuotaDetailsResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetSolStakingQuotaDetailsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSolStakingQuotaDetailsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSolStakingQuotaDetailsResponse { public static final String SERIALIZED_NAME_LEFT_STAKING_PERSONAL_QUOTA = "leftStakingPersonalQuota"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetUnclaimedRewardsResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetUnclaimedRewardsResponse.java index 68d574e6d..b800d0b98 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetUnclaimedRewardsResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetUnclaimedRewardsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetUnclaimedRewardsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetUnclaimedRewardsResponse extends ArrayList { public GetUnclaimedRewardsResponse() {} diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetUnclaimedRewardsResponseInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetUnclaimedRewardsResponseInner.java index 59931e404..3d6408fa6 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetUnclaimedRewardsResponseInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetUnclaimedRewardsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetUnclaimedRewardsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetUnclaimedRewardsResponseInner { public static final String SERIALIZED_NAME_AMOUNT = "amount"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethRateHistoryResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethRateHistoryResponse.java index 947450f0a..66c5e8766 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethRateHistoryResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethRateHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetWbethRateHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetWbethRateHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethRateHistoryResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethRateHistoryResponseRowsInner.java index 23eef7309..f6df17651 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethRateHistoryResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethRateHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetWbethRateHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetWbethRateHistoryResponseRowsInner { public static final String SERIALIZED_NAME_ANNUAL_PERCENTAGE_RATE = "annualPercentageRate"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethRewardsHistoryResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethRewardsHistoryResponse.java index 39bad162c..71dddcc70 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethRewardsHistoryResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethRewardsHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetWbethRewardsHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetWbethRewardsHistoryResponse { public static final String SERIALIZED_NAME_EST_REWARDS_IN_E_T_H = "estRewardsInETH"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethRewardsHistoryResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethRewardsHistoryResponseRowsInner.java index f14d1a29e..2f5696e60 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethRewardsHistoryResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethRewardsHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetWbethRewardsHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetWbethRewardsHistoryResponseRowsInner { public static final String SERIALIZED_NAME_TIME = "time"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethUnwrapHistoryResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethUnwrapHistoryResponse.java index 931d2519c..69ee87f4b 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethUnwrapHistoryResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethUnwrapHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetWbethUnwrapHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetWbethUnwrapHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethUnwrapHistoryResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethUnwrapHistoryResponseRowsInner.java index ab24c9af0..0a900ec94 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethUnwrapHistoryResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethUnwrapHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetWbethUnwrapHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetWbethUnwrapHistoryResponseRowsInner { public static final String SERIALIZED_NAME_TIME = "time"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethWrapHistoryResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethWrapHistoryResponse.java index 0fda4d2a9..6b1a57236 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethWrapHistoryResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethWrapHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetWbethWrapHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetWbethWrapHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethWrapHistoryResponseRowsInner.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethWrapHistoryResponseRowsInner.java index c4c3b4c79..182513b49 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethWrapHistoryResponseRowsInner.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/GetWbethWrapHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetWbethWrapHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetWbethWrapHistoryResponseRowsInner { public static final String SERIALIZED_NAME_TIME = "time"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/OnChainYieldsAccountResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/OnChainYieldsAccountResponse.java index f13385f2c..fff5716cf 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/OnChainYieldsAccountResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/OnChainYieldsAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OnChainYieldsAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OnChainYieldsAccountResponse { public static final String SERIALIZED_NAME_TOTAL_AMOUNT_IN_B_T_C = "totalAmountInBTC"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/OrderType.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/OrderType.java new file mode 100644 index 000000000..2b57dfc9d --- /dev/null +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/OrderType.java @@ -0,0 +1,73 @@ +/* + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.staking.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets orderType */ +@JsonAdapter(OrderType.Adapter.class) +public enum OrderType { + CLAIM("CLAIM"), + + DISTRIBUTE("DISTRIBUTE"); + + private String value; + + OrderType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderType fromValue(String value) { + for (OrderType b : OrderType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderType.fromValue(value); + } +} diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemEthRequest.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemEthRequest.java index 64e5b2f34..4268587ba 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemEthRequest.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemEthRequest.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** RedeemEthRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RedeemEthRequest { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -47,7 +47,7 @@ public class RedeemEthRequest { @SerializedName(SERIALIZED_NAME_ASSET) @jakarta.annotation.Nullable - private String asset; + private Asset asset = Asset.BETH; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -63,7 +63,7 @@ public RedeemEthRequest amount(@jakarta.annotation.Nonnull Double amount) { } /** - * Get amount + * Amount in BETH, limit 8 decimals * * @return amount */ @@ -78,7 +78,7 @@ public void setAmount(@jakarta.annotation.Nonnull Double amount) { this.amount = amount; } - public RedeemEthRequest asset(@jakarta.annotation.Nullable String asset) { + public RedeemEthRequest asset(@jakarta.annotation.Nullable Asset asset) { this.asset = asset; return this; } @@ -89,11 +89,12 @@ public RedeemEthRequest asset(@jakarta.annotation.Nullable String asset) { * @return asset */ @jakarta.annotation.Nullable - public String getAsset() { + @Valid + public Asset getAsset() { return asset; } - public void setAsset(@jakarta.annotation.Nullable String asset) { + public void setAsset(@jakarta.annotation.Nullable Asset asset) { this.asset = asset; } @@ -103,11 +104,12 @@ public RedeemEthRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -226,13 +228,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) - && !jsonObj.get("asset").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `asset` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("asset").toString())); + // validate the optional field `asset` + if (jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) { + Asset.validateJsonElement(jsonObj.get("asset")); } } diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemEthResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemEthResponse.java index 3f42e5002..c906a0ea3 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemEthResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemEthResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RedeemEthResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RedeemEthResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; @@ -48,6 +48,12 @@ public class RedeemEthResponse { @jakarta.annotation.Nullable private String ethAmount; + public static final String SERIALIZED_NAME_REDEEM_ID = "redeemId"; + + @SerializedName(SERIALIZED_NAME_REDEEM_ID) + @jakarta.annotation.Nullable + private Long redeemId; + public static final String SERIALIZED_NAME_CONVERSION_RATIO = "conversionRatio"; @SerializedName(SERIALIZED_NAME_CONVERSION_RATIO) @@ -60,12 +66,6 @@ public class RedeemEthResponse { @jakarta.annotation.Nullable private Long arrivalTime; - public static final String SERIALIZED_NAME_REDEEM_ID = "redeemId"; - - @SerializedName(SERIALIZED_NAME_REDEEM_ID) - @jakarta.annotation.Nullable - private Long redeemId; - public RedeemEthResponse() {} public RedeemEthResponse success(@jakarta.annotation.Nullable Boolean success) { @@ -106,6 +106,25 @@ public void setEthAmount(@jakarta.annotation.Nullable String ethAmount) { this.ethAmount = ethAmount; } + public RedeemEthResponse redeemId(@jakarta.annotation.Nullable Long redeemId) { + this.redeemId = redeemId; + return this; + } + + /** + * Get redeemId + * + * @return redeemId + */ + @jakarta.annotation.Nullable + public Long getRedeemId() { + return redeemId; + } + + public void setRedeemId(@jakarta.annotation.Nullable Long redeemId) { + this.redeemId = redeemId; + } + public RedeemEthResponse conversionRatio(@jakarta.annotation.Nullable String conversionRatio) { this.conversionRatio = conversionRatio; return this; @@ -144,25 +163,6 @@ public void setArrivalTime(@jakarta.annotation.Nullable Long arrivalTime) { this.arrivalTime = arrivalTime; } - public RedeemEthResponse redeemId(@jakarta.annotation.Nullable Long redeemId) { - this.redeemId = redeemId; - return this; - } - - /** - * Get redeemId - * - * @return redeemId - */ - @jakarta.annotation.Nullable - public Long getRedeemId() { - return redeemId; - } - - public void setRedeemId(@jakarta.annotation.Nullable Long redeemId) { - this.redeemId = redeemId; - } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,14 +174,14 @@ public boolean equals(Object o) { RedeemEthResponse redeemEthResponse = (RedeemEthResponse) o; return Objects.equals(this.success, redeemEthResponse.success) && Objects.equals(this.ethAmount, redeemEthResponse.ethAmount) + && Objects.equals(this.redeemId, redeemEthResponse.redeemId) && Objects.equals(this.conversionRatio, redeemEthResponse.conversionRatio) - && Objects.equals(this.arrivalTime, redeemEthResponse.arrivalTime) - && Objects.equals(this.redeemId, redeemEthResponse.redeemId); + && Objects.equals(this.arrivalTime, redeemEthResponse.arrivalTime); } @Override public int hashCode() { - return Objects.hash(success, ethAmount, conversionRatio, arrivalTime, redeemId); + return Objects.hash(success, ethAmount, redeemId, conversionRatio, arrivalTime); } @Override @@ -190,9 +190,9 @@ public String toString() { sb.append("class RedeemEthResponse {\n"); sb.append(" success: ").append(toIndentedString(success)).append("\n"); sb.append(" ethAmount: ").append(toIndentedString(ethAmount)).append("\n"); + sb.append(" redeemId: ").append(toIndentedString(redeemId)).append("\n"); sb.append(" conversionRatio: ").append(toIndentedString(conversionRatio)).append("\n"); sb.append(" arrivalTime: ").append(toIndentedString(arrivalTime)).append("\n"); - sb.append(" redeemId: ").append(toIndentedString(redeemId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -208,6 +208,10 @@ public String toUrlQueryString() { String ethAmountValueAsString = ""; ethAmountValueAsString = ethAmountValue.toString(); sb.append("ethAmount=").append(urlEncode(ethAmountValueAsString)).append(""); + Object redeemIdValue = getRedeemId(); + String redeemIdValueAsString = ""; + redeemIdValueAsString = redeemIdValue.toString(); + sb.append("redeemId=").append(urlEncode(redeemIdValueAsString)).append(""); Object conversionRatioValue = getConversionRatio(); String conversionRatioValueAsString = ""; conversionRatioValueAsString = conversionRatioValue.toString(); @@ -216,10 +220,6 @@ public String toUrlQueryString() { String arrivalTimeValueAsString = ""; arrivalTimeValueAsString = arrivalTimeValue.toString(); sb.append("arrivalTime=").append(urlEncode(arrivalTimeValueAsString)).append(""); - Object redeemIdValue = getRedeemId(); - String redeemIdValueAsString = ""; - redeemIdValueAsString = redeemIdValue.toString(); - sb.append("redeemId=").append(urlEncode(redeemIdValueAsString)).append(""); return sb.toString(); } @@ -250,9 +250,9 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("success"); openapiFields.add("ethAmount"); + openapiFields.add("redeemId"); openapiFields.add("conversionRatio"); openapiFields.add("arrivalTime"); - openapiFields.add("redeemId"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemOnChainYieldsLockedProductRequest.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemOnChainYieldsLockedProductRequest.java index 703e40a65..9192216ac 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemOnChainYieldsLockedProductRequest.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemOnChainYieldsLockedProductRequest.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RedeemOnChainYieldsLockedProductRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RedeemOnChainYieldsLockedProductRequest { public static final String SERIALIZED_NAME_POSITION_ID = "positionId"; @@ -63,7 +63,7 @@ public RedeemOnChainYieldsLockedProductRequest positionId( } /** - * Get positionId + * Locked product position ID * * @return positionId */ @@ -104,11 +104,12 @@ public RedeemOnChainYieldsLockedProductRequest recvWindow( } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemOnChainYieldsLockedProductResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemOnChainYieldsLockedProductResponse.java index bd39ea05d..2f02cb9f0 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemOnChainYieldsLockedProductResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemOnChainYieldsLockedProductResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RedeemOnChainYieldsLockedProductResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RedeemOnChainYieldsLockedProductResponse { public static final String SERIALIZED_NAME_REDEEM_ID = "redeemId"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemSolRequest.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemSolRequest.java index 6a7346723..316492987 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemSolRequest.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemSolRequest.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** RedeemSolRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RedeemSolRequest { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -57,7 +57,7 @@ public RedeemSolRequest amount(@jakarta.annotation.Nonnull Double amount) { } /** - * Get amount + * Amount in BNSOL, limit 8 decimals * * @return amount */ @@ -78,11 +78,12 @@ public RedeemSolRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemSolResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemSolResponse.java index 906354cce..96d26186b 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemSolResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemSolResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** RedeemSolResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class RedeemSolResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; @@ -48,6 +48,12 @@ public class RedeemSolResponse { @jakarta.annotation.Nullable private String solAmount; + public static final String SERIALIZED_NAME_REDEEM_ID = "redeemId"; + + @SerializedName(SERIALIZED_NAME_REDEEM_ID) + @jakarta.annotation.Nullable + private Long redeemId; + public static final String SERIALIZED_NAME_EXCHANGE_RATE = "exchangeRate"; @SerializedName(SERIALIZED_NAME_EXCHANGE_RATE) @@ -60,12 +66,6 @@ public class RedeemSolResponse { @jakarta.annotation.Nullable private Long arrivalTime; - public static final String SERIALIZED_NAME_REDEEM_ID = "redeemId"; - - @SerializedName(SERIALIZED_NAME_REDEEM_ID) - @jakarta.annotation.Nullable - private Long redeemId; - public RedeemSolResponse() {} public RedeemSolResponse success(@jakarta.annotation.Nullable Boolean success) { @@ -106,6 +106,25 @@ public void setSolAmount(@jakarta.annotation.Nullable String solAmount) { this.solAmount = solAmount; } + public RedeemSolResponse redeemId(@jakarta.annotation.Nullable Long redeemId) { + this.redeemId = redeemId; + return this; + } + + /** + * Get redeemId + * + * @return redeemId + */ + @jakarta.annotation.Nullable + public Long getRedeemId() { + return redeemId; + } + + public void setRedeemId(@jakarta.annotation.Nullable Long redeemId) { + this.redeemId = redeemId; + } + public RedeemSolResponse exchangeRate(@jakarta.annotation.Nullable String exchangeRate) { this.exchangeRate = exchangeRate; return this; @@ -144,25 +163,6 @@ public void setArrivalTime(@jakarta.annotation.Nullable Long arrivalTime) { this.arrivalTime = arrivalTime; } - public RedeemSolResponse redeemId(@jakarta.annotation.Nullable Long redeemId) { - this.redeemId = redeemId; - return this; - } - - /** - * Get redeemId - * - * @return redeemId - */ - @jakarta.annotation.Nullable - public Long getRedeemId() { - return redeemId; - } - - public void setRedeemId(@jakarta.annotation.Nullable Long redeemId) { - this.redeemId = redeemId; - } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,14 +174,14 @@ public boolean equals(Object o) { RedeemSolResponse redeemSolResponse = (RedeemSolResponse) o; return Objects.equals(this.success, redeemSolResponse.success) && Objects.equals(this.solAmount, redeemSolResponse.solAmount) + && Objects.equals(this.redeemId, redeemSolResponse.redeemId) && Objects.equals(this.exchangeRate, redeemSolResponse.exchangeRate) - && Objects.equals(this.arrivalTime, redeemSolResponse.arrivalTime) - && Objects.equals(this.redeemId, redeemSolResponse.redeemId); + && Objects.equals(this.arrivalTime, redeemSolResponse.arrivalTime); } @Override public int hashCode() { - return Objects.hash(success, solAmount, exchangeRate, arrivalTime, redeemId); + return Objects.hash(success, solAmount, redeemId, exchangeRate, arrivalTime); } @Override @@ -190,9 +190,9 @@ public String toString() { sb.append("class RedeemSolResponse {\n"); sb.append(" success: ").append(toIndentedString(success)).append("\n"); sb.append(" solAmount: ").append(toIndentedString(solAmount)).append("\n"); + sb.append(" redeemId: ").append(toIndentedString(redeemId)).append("\n"); sb.append(" exchangeRate: ").append(toIndentedString(exchangeRate)).append("\n"); sb.append(" arrivalTime: ").append(toIndentedString(arrivalTime)).append("\n"); - sb.append(" redeemId: ").append(toIndentedString(redeemId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -208,6 +208,10 @@ public String toUrlQueryString() { String solAmountValueAsString = ""; solAmountValueAsString = solAmountValue.toString(); sb.append("solAmount=").append(urlEncode(solAmountValueAsString)).append(""); + Object redeemIdValue = getRedeemId(); + String redeemIdValueAsString = ""; + redeemIdValueAsString = redeemIdValue.toString(); + sb.append("redeemId=").append(urlEncode(redeemIdValueAsString)).append(""); Object exchangeRateValue = getExchangeRate(); String exchangeRateValueAsString = ""; exchangeRateValueAsString = exchangeRateValue.toString(); @@ -216,10 +220,6 @@ public String toUrlQueryString() { String arrivalTimeValueAsString = ""; arrivalTimeValueAsString = arrivalTimeValue.toString(); sb.append("arrivalTime=").append(urlEncode(arrivalTimeValueAsString)).append(""); - Object redeemIdValue = getRedeemId(); - String redeemIdValueAsString = ""; - redeemIdValueAsString = redeemIdValue.toString(); - sb.append("redeemId=").append(urlEncode(redeemIdValueAsString)).append(""); return sb.toString(); } @@ -250,9 +250,9 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("success"); openapiFields.add("solAmount"); + openapiFields.add("redeemId"); openapiFields.add("exchangeRate"); openapiFields.add("arrivalTime"); - openapiFields.add("redeemId"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemTo.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemTo.java new file mode 100644 index 000000000..a42dcc889 --- /dev/null +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/RedeemTo.java @@ -0,0 +1,73 @@ +/* + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.staking.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Takes effect when Auto Subscribe is false */ +@JsonAdapter(RedeemTo.Adapter.class) +public enum RedeemTo { + SPOT("SPOT"), + + FLEXIBLE("FLEXIBLE"); + + private String value; + + RedeemTo(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static RedeemTo fromValue(String value) { + for (RedeemTo b : RedeemTo.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final RedeemTo enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public RedeemTo read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return RedeemTo.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + RedeemTo.fromValue(value); + } +} diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetOnChainYieldsLockedAutoSubscribeRequest.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetOnChainYieldsLockedAutoSubscribeRequest.java index b7ce1626b..b1dc991c5 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetOnChainYieldsLockedAutoSubscribeRequest.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetOnChainYieldsLockedAutoSubscribeRequest.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SetOnChainYieldsLockedAutoSubscribeRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SetOnChainYieldsLockedAutoSubscribeRequest { public static final String SERIALIZED_NAME_POSITION_ID = "positionId"; @@ -105,11 +105,12 @@ public SetOnChainYieldsLockedAutoSubscribeRequest recvWindow( } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetOnChainYieldsLockedAutoSubscribeResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetOnChainYieldsLockedAutoSubscribeResponse.java index 1fd730280..fff326d5d 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetOnChainYieldsLockedAutoSubscribeResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetOnChainYieldsLockedAutoSubscribeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SetOnChainYieldsLockedAutoSubscribeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SetOnChainYieldsLockedAutoSubscribeResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetOnChainYieldsLockedProductRedeemOptionRequest.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetOnChainYieldsLockedProductRedeemOptionRequest.java index 389ce486a..6eabd4c84 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetOnChainYieldsLockedProductRedeemOptionRequest.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetOnChainYieldsLockedProductRedeemOptionRequest.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -34,7 +35,7 @@ /** SetOnChainYieldsLockedProductRedeemOptionRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SetOnChainYieldsLockedProductRedeemOptionRequest { public static final String SERIALIZED_NAME_POSITION_ID = "positionId"; @@ -46,7 +47,7 @@ public class SetOnChainYieldsLockedProductRedeemOptionRequest { @SerializedName(SERIALIZED_NAME_REDEEM_TO) @jakarta.annotation.Nonnull - private String redeemTo; + private RedeemTo redeemTo = RedeemTo.FLEXIBLE; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -78,7 +79,7 @@ public void setPositionId(@jakarta.annotation.Nonnull String positionId) { } public SetOnChainYieldsLockedProductRedeemOptionRequest redeemTo( - @jakarta.annotation.Nonnull String redeemTo) { + @jakarta.annotation.Nonnull RedeemTo redeemTo) { this.redeemTo = redeemTo; return this; } @@ -90,11 +91,12 @@ public SetOnChainYieldsLockedProductRedeemOptionRequest redeemTo( */ @jakarta.annotation.Nonnull @NotNull - public String getRedeemTo() { + @Valid + public RedeemTo getRedeemTo() { return redeemTo; } - public void setRedeemTo(@jakarta.annotation.Nonnull String redeemTo) { + public void setRedeemTo(@jakarta.annotation.Nonnull RedeemTo redeemTo) { this.redeemTo = redeemTo; } @@ -105,11 +107,12 @@ public SetOnChainYieldsLockedProductRedeemOptionRequest recvWindow( } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -248,13 +251,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("positionId").toString())); } - if (!jsonObj.get("redeemTo").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `redeemTo` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("redeemTo").toString())); - } + // validate the required field `redeemTo` + RedeemTo.validateJsonElement(jsonObj.get("redeemTo")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetOnChainYieldsLockedProductRedeemOptionResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetOnChainYieldsLockedProductRedeemOptionResponse.java index 34ceb5431..8e0db1276 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetOnChainYieldsLockedProductRedeemOptionResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetOnChainYieldsLockedProductRedeemOptionResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SetOnChainYieldsLockedProductRedeemOptionResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SetOnChainYieldsLockedProductRedeemOptionResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetSoftStakingResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetSoftStakingResponse.java index 11561c534..e4b35e8a5 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetSoftStakingResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SetSoftStakingResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SetSoftStakingResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SetSoftStakingResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SolStakingAccountResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SolStakingAccountResponse.java index 3401450b0..e4c449765 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SolStakingAccountResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SolStakingAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SolStakingAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SolStakingAccountResponse { public static final String SERIALIZED_NAME_BNSOL_AMOUNT = "bnsolAmount"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SourceAccount.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SourceAccount.java new file mode 100644 index 000000000..14c906e22 --- /dev/null +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SourceAccount.java @@ -0,0 +1,75 @@ +/* + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.staking.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets sourceAccount */ +@JsonAdapter(SourceAccount.Adapter.class) +public enum SourceAccount { + SPOT("SPOT"), + + FUND("FUND"), + + ALL("ALL"); + + private String value; + + SourceAccount(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SourceAccount fromValue(String value) { + for (SourceAccount b : SourceAccount.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SourceAccount enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SourceAccount read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SourceAccount.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SourceAccount.fromValue(value); + } +} diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeEthStakingRequest.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeEthStakingRequest.java index 6ddd28a25..c890f6c4a 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeEthStakingRequest.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeEthStakingRequest.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** SubscribeEthStakingRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubscribeEthStakingRequest { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -57,7 +57,7 @@ public SubscribeEthStakingRequest amount(@jakarta.annotation.Nonnull Double amou } /** - * Get amount + * Amount in ETH, limit 4 decimals * * @return amount */ @@ -78,11 +78,12 @@ public SubscribeEthStakingRequest recvWindow(@jakarta.annotation.Nullable Long r } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeEthStakingResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeEthStakingResponse.java index 8a4cbe48c..665de02c4 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeEthStakingResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeEthStakingResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SubscribeEthStakingResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubscribeEthStakingResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; @@ -48,18 +48,18 @@ public class SubscribeEthStakingResponse { @jakarta.annotation.Nullable private String wbethAmount; - public static final String SERIALIZED_NAME_CONVERSION_RATIO = "conversionRatio"; - - @SerializedName(SERIALIZED_NAME_CONVERSION_RATIO) - @jakarta.annotation.Nullable - private String conversionRatio; - public static final String SERIALIZED_NAME_PURCHASE_ID = "purchaseId"; @SerializedName(SERIALIZED_NAME_PURCHASE_ID) @jakarta.annotation.Nullable private Long purchaseId; + public static final String SERIALIZED_NAME_CONVERSION_RATIO = "conversionRatio"; + + @SerializedName(SERIALIZED_NAME_CONVERSION_RATIO) + @jakarta.annotation.Nullable + private String conversionRatio; + public SubscribeEthStakingResponse() {} public SubscribeEthStakingResponse success(@jakarta.annotation.Nullable Boolean success) { @@ -101,43 +101,43 @@ public void setWbethAmount(@jakarta.annotation.Nullable String wbethAmount) { this.wbethAmount = wbethAmount; } - public SubscribeEthStakingResponse conversionRatio( - @jakarta.annotation.Nullable String conversionRatio) { - this.conversionRatio = conversionRatio; + public SubscribeEthStakingResponse purchaseId(@jakarta.annotation.Nullable Long purchaseId) { + this.purchaseId = purchaseId; return this; } /** - * Get conversionRatio + * Get purchaseId * - * @return conversionRatio + * @return purchaseId */ @jakarta.annotation.Nullable - public String getConversionRatio() { - return conversionRatio; + public Long getPurchaseId() { + return purchaseId; } - public void setConversionRatio(@jakarta.annotation.Nullable String conversionRatio) { - this.conversionRatio = conversionRatio; + public void setPurchaseId(@jakarta.annotation.Nullable Long purchaseId) { + this.purchaseId = purchaseId; } - public SubscribeEthStakingResponse purchaseId(@jakarta.annotation.Nullable Long purchaseId) { - this.purchaseId = purchaseId; + public SubscribeEthStakingResponse conversionRatio( + @jakarta.annotation.Nullable String conversionRatio) { + this.conversionRatio = conversionRatio; return this; } /** - * Get purchaseId + * Get conversionRatio * - * @return purchaseId + * @return conversionRatio */ @jakarta.annotation.Nullable - public Long getPurchaseId() { - return purchaseId; + public String getConversionRatio() { + return conversionRatio; } - public void setPurchaseId(@jakarta.annotation.Nullable Long purchaseId) { - this.purchaseId = purchaseId; + public void setConversionRatio(@jakarta.annotation.Nullable String conversionRatio) { + this.conversionRatio = conversionRatio; } @Override @@ -151,13 +151,14 @@ public boolean equals(Object o) { SubscribeEthStakingResponse subscribeEthStakingResponse = (SubscribeEthStakingResponse) o; return Objects.equals(this.success, subscribeEthStakingResponse.success) && Objects.equals(this.wbethAmount, subscribeEthStakingResponse.wbethAmount) - && Objects.equals(this.conversionRatio, subscribeEthStakingResponse.conversionRatio) - && Objects.equals(this.purchaseId, subscribeEthStakingResponse.purchaseId); + && Objects.equals(this.purchaseId, subscribeEthStakingResponse.purchaseId) + && Objects.equals( + this.conversionRatio, subscribeEthStakingResponse.conversionRatio); } @Override public int hashCode() { - return Objects.hash(success, wbethAmount, conversionRatio, purchaseId); + return Objects.hash(success, wbethAmount, purchaseId, conversionRatio); } @Override @@ -166,8 +167,8 @@ public String toString() { sb.append("class SubscribeEthStakingResponse {\n"); sb.append(" success: ").append(toIndentedString(success)).append("\n"); sb.append(" wbethAmount: ").append(toIndentedString(wbethAmount)).append("\n"); - sb.append(" conversionRatio: ").append(toIndentedString(conversionRatio)).append("\n"); sb.append(" purchaseId: ").append(toIndentedString(purchaseId)).append("\n"); + sb.append(" conversionRatio: ").append(toIndentedString(conversionRatio)).append("\n"); sb.append("}"); return sb.toString(); } @@ -183,14 +184,14 @@ public String toUrlQueryString() { String wbethAmountValueAsString = ""; wbethAmountValueAsString = wbethAmountValue.toString(); sb.append("wbethAmount=").append(urlEncode(wbethAmountValueAsString)).append(""); - Object conversionRatioValue = getConversionRatio(); - String conversionRatioValueAsString = ""; - conversionRatioValueAsString = conversionRatioValue.toString(); - sb.append("conversionRatio=").append(urlEncode(conversionRatioValueAsString)).append(""); Object purchaseIdValue = getPurchaseId(); String purchaseIdValueAsString = ""; purchaseIdValueAsString = purchaseIdValue.toString(); sb.append("purchaseId=").append(urlEncode(purchaseIdValueAsString)).append(""); + Object conversionRatioValue = getConversionRatio(); + String conversionRatioValueAsString = ""; + conversionRatioValueAsString = conversionRatioValue.toString(); + sb.append("conversionRatio=").append(urlEncode(conversionRatioValueAsString)).append(""); return sb.toString(); } @@ -221,8 +222,8 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("success"); openapiFields.add("wbethAmount"); - openapiFields.add("conversionRatio"); openapiFields.add("purchaseId"); + openapiFields.add("conversionRatio"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeOnChainYieldsLockedProductRequest.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeOnChainYieldsLockedProductRequest.java index f1cc26bbd..f4546adda 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeOnChainYieldsLockedProductRequest.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeOnChainYieldsLockedProductRequest.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** SubscribeOnChainYieldsLockedProductRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubscribeOnChainYieldsLockedProductRequest { public static final String SERIALIZED_NAME_PROJECT_ID = "projectId"; @@ -53,19 +53,19 @@ public class SubscribeOnChainYieldsLockedProductRequest { @SerializedName(SERIALIZED_NAME_AUTO_SUBSCRIBE) @jakarta.annotation.Nullable - private Boolean autoSubscribe; + private Boolean autoSubscribe = false; public static final String SERIALIZED_NAME_SOURCE_ACCOUNT = "sourceAccount"; @SerializedName(SERIALIZED_NAME_SOURCE_ACCOUNT) @jakarta.annotation.Nullable - private String sourceAccount; + private SourceAccount sourceAccount = SourceAccount.SPOT; public static final String SERIALIZED_NAME_REDEEM_TO = "redeemTo"; @SerializedName(SERIALIZED_NAME_REDEEM_TO) @jakarta.annotation.Nullable - private String redeemTo; + private RedeemTo redeemTo = RedeemTo.FLEXIBLE; public static final String SERIALIZED_NAME_CHANNEL_ID = "channelId"; @@ -151,7 +151,7 @@ public void setAutoSubscribe(@jakarta.annotation.Nullable Boolean autoSubscribe) } public SubscribeOnChainYieldsLockedProductRequest sourceAccount( - @jakarta.annotation.Nullable String sourceAccount) { + @jakarta.annotation.Nullable SourceAccount sourceAccount) { this.sourceAccount = sourceAccount; return this; } @@ -162,16 +162,17 @@ public SubscribeOnChainYieldsLockedProductRequest sourceAccount( * @return sourceAccount */ @jakarta.annotation.Nullable - public String getSourceAccount() { + @Valid + public SourceAccount getSourceAccount() { return sourceAccount; } - public void setSourceAccount(@jakarta.annotation.Nullable String sourceAccount) { + public void setSourceAccount(@jakarta.annotation.Nullable SourceAccount sourceAccount) { this.sourceAccount = sourceAccount; } public SubscribeOnChainYieldsLockedProductRequest redeemTo( - @jakarta.annotation.Nullable String redeemTo) { + @jakarta.annotation.Nullable RedeemTo redeemTo) { this.redeemTo = redeemTo; return this; } @@ -182,11 +183,12 @@ public SubscribeOnChainYieldsLockedProductRequest redeemTo( * @return redeemTo */ @jakarta.annotation.Nullable - public String getRedeemTo() { + @Valid + public RedeemTo getRedeemTo() { return redeemTo; } - public void setRedeemTo(@jakarta.annotation.Nullable String redeemTo) { + public void setRedeemTo(@jakarta.annotation.Nullable RedeemTo redeemTo) { this.redeemTo = redeemTo; } @@ -237,11 +239,12 @@ public SubscribeOnChainYieldsLockedProductRequest recvWindow( } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -424,21 +427,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("projectId").toString())); } - if ((jsonObj.get("sourceAccount") != null && !jsonObj.get("sourceAccount").isJsonNull()) - && !jsonObj.get("sourceAccount").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `sourceAccount` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("sourceAccount").toString())); + // validate the optional field `sourceAccount` + if (jsonObj.get("sourceAccount") != null && !jsonObj.get("sourceAccount").isJsonNull()) { + SourceAccount.validateJsonElement(jsonObj.get("sourceAccount")); } - if ((jsonObj.get("redeemTo") != null && !jsonObj.get("redeemTo").isJsonNull()) - && !jsonObj.get("redeemTo").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `redeemTo` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("redeemTo").toString())); + // validate the optional field `redeemTo` + if (jsonObj.get("redeemTo") != null && !jsonObj.get("redeemTo").isJsonNull()) { + RedeemTo.validateJsonElement(jsonObj.get("redeemTo")); } if ((jsonObj.get("channelId") != null && !jsonObj.get("channelId").isJsonNull()) && !jsonObj.get("channelId").isJsonPrimitive()) { diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeOnChainYieldsLockedProductResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeOnChainYieldsLockedProductResponse.java index 8ec007e58..71b7426ff 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeOnChainYieldsLockedProductResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeOnChainYieldsLockedProductResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SubscribeOnChainYieldsLockedProductResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubscribeOnChainYieldsLockedProductResponse { public static final String SERIALIZED_NAME_PURCHASE_ID = "purchaseId"; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeSolStakingRequest.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeSolStakingRequest.java index b157ee1a1..7100baef1 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeSolStakingRequest.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeSolStakingRequest.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** SubscribeSolStakingRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubscribeSolStakingRequest { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -57,7 +57,7 @@ public SubscribeSolStakingRequest amount(@jakarta.annotation.Nonnull Double amou } /** - * Get amount + * Amount in SOL. * * @return amount */ @@ -78,11 +78,12 @@ public SubscribeSolStakingRequest recvWindow(@jakarta.annotation.Nullable Long r } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeSolStakingResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeSolStakingResponse.java index 8f560e635..1026c1894 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeSolStakingResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/SubscribeSolStakingResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SubscribeSolStakingResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubscribeSolStakingResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; @@ -48,18 +48,18 @@ public class SubscribeSolStakingResponse { @jakarta.annotation.Nullable private String bnsolAmount; - public static final String SERIALIZED_NAME_EXCHANGE_RATE = "exchangeRate"; - - @SerializedName(SERIALIZED_NAME_EXCHANGE_RATE) - @jakarta.annotation.Nullable - private String exchangeRate; - public static final String SERIALIZED_NAME_PURCHASE_ID = "purchaseId"; @SerializedName(SERIALIZED_NAME_PURCHASE_ID) @jakarta.annotation.Nullable private Long purchaseId; + public static final String SERIALIZED_NAME_EXCHANGE_RATE = "exchangeRate"; + + @SerializedName(SERIALIZED_NAME_EXCHANGE_RATE) + @jakarta.annotation.Nullable + private String exchangeRate; + public SubscribeSolStakingResponse() {} public SubscribeSolStakingResponse success(@jakarta.annotation.Nullable Boolean success) { @@ -101,43 +101,43 @@ public void setBnsolAmount(@jakarta.annotation.Nullable String bnsolAmount) { this.bnsolAmount = bnsolAmount; } - public SubscribeSolStakingResponse exchangeRate( - @jakarta.annotation.Nullable String exchangeRate) { - this.exchangeRate = exchangeRate; + public SubscribeSolStakingResponse purchaseId(@jakarta.annotation.Nullable Long purchaseId) { + this.purchaseId = purchaseId; return this; } /** - * Get exchangeRate + * Get purchaseId * - * @return exchangeRate + * @return purchaseId */ @jakarta.annotation.Nullable - public String getExchangeRate() { - return exchangeRate; + public Long getPurchaseId() { + return purchaseId; } - public void setExchangeRate(@jakarta.annotation.Nullable String exchangeRate) { - this.exchangeRate = exchangeRate; + public void setPurchaseId(@jakarta.annotation.Nullable Long purchaseId) { + this.purchaseId = purchaseId; } - public SubscribeSolStakingResponse purchaseId(@jakarta.annotation.Nullable Long purchaseId) { - this.purchaseId = purchaseId; + public SubscribeSolStakingResponse exchangeRate( + @jakarta.annotation.Nullable String exchangeRate) { + this.exchangeRate = exchangeRate; return this; } /** - * Get purchaseId + * Get exchangeRate * - * @return purchaseId + * @return exchangeRate */ @jakarta.annotation.Nullable - public Long getPurchaseId() { - return purchaseId; + public String getExchangeRate() { + return exchangeRate; } - public void setPurchaseId(@jakarta.annotation.Nullable Long purchaseId) { - this.purchaseId = purchaseId; + public void setExchangeRate(@jakarta.annotation.Nullable String exchangeRate) { + this.exchangeRate = exchangeRate; } @Override @@ -151,13 +151,13 @@ public boolean equals(Object o) { SubscribeSolStakingResponse subscribeSolStakingResponse = (SubscribeSolStakingResponse) o; return Objects.equals(this.success, subscribeSolStakingResponse.success) && Objects.equals(this.bnsolAmount, subscribeSolStakingResponse.bnsolAmount) - && Objects.equals(this.exchangeRate, subscribeSolStakingResponse.exchangeRate) - && Objects.equals(this.purchaseId, subscribeSolStakingResponse.purchaseId); + && Objects.equals(this.purchaseId, subscribeSolStakingResponse.purchaseId) + && Objects.equals(this.exchangeRate, subscribeSolStakingResponse.exchangeRate); } @Override public int hashCode() { - return Objects.hash(success, bnsolAmount, exchangeRate, purchaseId); + return Objects.hash(success, bnsolAmount, purchaseId, exchangeRate); } @Override @@ -166,8 +166,8 @@ public String toString() { sb.append("class SubscribeSolStakingResponse {\n"); sb.append(" success: ").append(toIndentedString(success)).append("\n"); sb.append(" bnsolAmount: ").append(toIndentedString(bnsolAmount)).append("\n"); - sb.append(" exchangeRate: ").append(toIndentedString(exchangeRate)).append("\n"); sb.append(" purchaseId: ").append(toIndentedString(purchaseId)).append("\n"); + sb.append(" exchangeRate: ").append(toIndentedString(exchangeRate)).append("\n"); sb.append("}"); return sb.toString(); } @@ -183,14 +183,14 @@ public String toUrlQueryString() { String bnsolAmountValueAsString = ""; bnsolAmountValueAsString = bnsolAmountValue.toString(); sb.append("bnsolAmount=").append(urlEncode(bnsolAmountValueAsString)).append(""); - Object exchangeRateValue = getExchangeRate(); - String exchangeRateValueAsString = ""; - exchangeRateValueAsString = exchangeRateValue.toString(); - sb.append("exchangeRate=").append(urlEncode(exchangeRateValueAsString)).append(""); Object purchaseIdValue = getPurchaseId(); String purchaseIdValueAsString = ""; purchaseIdValueAsString = purchaseIdValue.toString(); sb.append("purchaseId=").append(urlEncode(purchaseIdValueAsString)).append(""); + Object exchangeRateValue = getExchangeRate(); + String exchangeRateValueAsString = ""; + exchangeRateValueAsString = exchangeRateValue.toString(); + sb.append("exchangeRate=").append(urlEncode(exchangeRateValueAsString)).append(""); return sb.toString(); } @@ -221,8 +221,8 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("success"); openapiFields.add("bnsolAmount"); - openapiFields.add("exchangeRate"); openapiFields.add("purchaseId"); + openapiFields.add("exchangeRate"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/WrapBethRequest.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/WrapBethRequest.java index 340719224..4ecb3a586 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/WrapBethRequest.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/WrapBethRequest.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** WrapBethRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class WrapBethRequest { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @@ -57,7 +57,7 @@ public WrapBethRequest amount(@jakarta.annotation.Nonnull Double amount) { } /** - * Get amount + * Amount in BETH, limit 4 decimals * * @return amount */ @@ -78,11 +78,12 @@ public WrapBethRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) } /** - * Get recvWindow + * Request validity window in milliseconds. maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/WrapBethResponse.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/WrapBethResponse.java index 804fbf3b1..40a98d0ff 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/WrapBethResponse.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/model/WrapBethResponse.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** WrapBethResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class WrapBethResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; diff --git a/clients/staking/src/test/java/com/binance/connector/client/staking/rest/api/EthStakingApiTest.java b/clients/staking/src/test/java/com/binance/connector/client/staking/rest/api/EthStakingApiTest.java index 121e4e28e..4bcec73a4 100644 --- a/clients/staking/src/test/java/com/binance/connector/client/staking/rest/api/EthStakingApiTest.java +++ b/clients/staking/src/test/java/com/binance/connector/client/staking/rest/api/EthStakingApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -38,6 +38,7 @@ import com.binance.connector.client.staking.rest.model.WrapBethRequest; import com.binance.connector.client.staking.rest.model.WrapBethResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -89,14 +90,14 @@ public void initApiClient() throws ApiException { } /** - * ETH Staking account(USER_DATA) + * ETH Staking account (USER_DATA) * - *

ETH Staking account Weight: 150 + *

ETH Staking account Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void ethStakingAccountTest() throws ApiException, CryptoException { + public void ethStakingAccountTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.ethStakingAccount(recvWindow); @@ -112,20 +113,19 @@ public void ethStakingAccountTest() throws ApiException, CryptoException { assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v2/eth-staking/account", actualRequest.url().encodedPath()); } /** - * Get current ETH staking quota(USER_DATA) + * Get current ETH staking quota (USER_DATA) * - *

Get current ETH staking quota Weight: 150 + *

Get current ETH staking quota Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getCurrentEthStakingQuotaTest() throws ApiException, CryptoException { + public void getCurrentEthStakingQuotaTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getCurrentEthStakingQuota(recvWindow); @@ -148,28 +148,29 @@ public void getCurrentEthStakingQuotaTest() throws ApiException, CryptoException } /** - * Get ETH redemption history(USER_DATA) + * Get ETH redemption history (USER_DATA) * - *

Get ETH redemption history * The time between `startTime` and - * `endTime` cannot be longer than 3 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get ETH redemption history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void getEthRedemptionHistoryTest() throws ApiException, CryptoException { - Long redeemId = 123L; + public void getEthRedemptionHistoryTest() throws ApiException, CryptoException, IOException { + Long redeemId = 1234567L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; Long size = 10L; Long recvWindow = 5000L; ApiResponse response = - api.getEthRedemptionHistory(redeemId, startTime, endTime, current, size, recvWindow); + api.getEthRedemptionHistory( + redeemId, startTime, endTime, current, size, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -181,33 +182,29 @@ public void getEthRedemptionHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("redeemId=1234567&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "redeemId=123&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "90b22be90fad28e8f5f7cd6af50eb4c523db9c1363ee49915fad9713c0656f0d", + "68bf70ea1fa94c38fd8ef0f28a7ccdc5642f691b3471f9ff861491c93970a5de", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/eth-staking/eth/history/redemptionHistory", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/eth-staking/eth/history/redemptionHistory", actualRequest.url().encodedPath()); } /** - * Get ETH staking history(USER_DATA) + * Get ETH staking history (USER_DATA) * - *

Get ETH staking history * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get ETH staking history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void getEthStakingHistoryTest() throws ApiException, CryptoException { - Long purchaseId = 123L; + public void getEthStakingHistoryTest() throws ApiException, CryptoException, IOException { + Long purchaseId = 1234567L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -226,32 +223,28 @@ public void getEthStakingHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("purchaseId=1234567&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "purchaseId=123&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "35f8697a0b1f039ff660d5b47cb802e92c651d0f135334ec523e176dad5b714b", + "43ce1eef38c940f1f565325261de3d211cbbba816cb7587d872562da5b16ad07", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/eth-staking/eth/history/stakingHistory", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/eth-staking/eth/history/stakingHistory", actualRequest.url().encodedPath()); } /** - * Get WBETH Rate History(USER_DATA) + * Get WBETH Rate History (USER_DATA) * - *

Get WBETH Rate History * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get WBETH Rate History Weight(IP): 150 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void getWbethRateHistoryTest() throws ApiException, CryptoException { + public void getWbethRateHistoryTest() throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -270,31 +263,27 @@ public void getWbethRateHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "2ecc0415a3bdb2963e8030cdf6cf00de6f49d21b71ff939dda42e5756eb8ba66", - actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/eth-staking/eth/history/rateHistory", actualRequest.url().encodedPath()); + "2ecc0415a3bdb2963e8030cdf6cf00de6f49d21b71ff939dda42e5756eb8ba66", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/eth-staking/eth/history/rateHistory", actualRequest.url().encodedPath()); } /** - * Get WBETH rewards history(USER_DATA) + * Get WBETH rewards history (USER_DATA) * - *

Get WBETH rewards history * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get WBETH rewards history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void getWbethRewardsHistoryTest() throws ApiException, CryptoException { + public void getWbethRewardsHistoryTest() throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -313,32 +302,28 @@ public void getWbethRewardsHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + assertEquals("startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "2ecc0415a3bdb2963e8030cdf6cf00de6f49d21b71ff939dda42e5756eb8ba66", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/eth-staking/eth/history/wbethRewardsHistory", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/eth-staking/eth/history/wbethRewardsHistory", actualRequest.url().encodedPath()); } /** - * Get WBETH unwrap history(USER_DATA) + * Get WBETH unwrap history (USER_DATA) * - *

Get WBETH unwrap history * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get WBETH unwrap history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void getWbethUnwrapHistoryTest() throws ApiException, CryptoException { + public void getWbethUnwrapHistoryTest() throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -357,32 +342,28 @@ public void getWbethUnwrapHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + assertEquals("startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "2ecc0415a3bdb2963e8030cdf6cf00de6f49d21b71ff939dda42e5756eb8ba66", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/eth-staking/wbeth/history/unwrapHistory", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/eth-staking/wbeth/history/unwrapHistory", actualRequest.url().encodedPath()); } /** - * Get WBETH wrap history(USER_DATA) + * Get WBETH wrap history (USER_DATA) * - *

Get WBETH wrap history * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get WBETH wrap history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void getWbethWrapHistoryTest() throws ApiException, CryptoException { + public void getWbethWrapHistoryTest() throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -401,30 +382,25 @@ public void getWbethWrapHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "2ecc0415a3bdb2963e8030cdf6cf00de6f49d21b71ff939dda42e5756eb8ba66", - actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/eth-staking/wbeth/history/wrapHistory", - actualRequest.url().encodedPath()); + "2ecc0415a3bdb2963e8030cdf6cf00de6f49d21b71ff939dda42e5756eb8ba66", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/eth-staking/wbeth/history/wrapHistory", actualRequest.url().encodedPath()); } /** - * Redeem ETH(TRADE) + * Redeem ETH (TRADE) * - *

Redeem WBETH or BETH and get ETH * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 150 + *

Redeem WBETH or BETH and get ETH Weight(IP): 150 Security Type: TRADE Notes: - You need to + * open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ @Test - public void redeemEthTest() throws ApiException, CryptoException { + public void redeemEthTest() throws ApiException, CryptoException, IOException { RedeemEthRequest redeemEthRequest = new RedeemEthRequest(); - - redeemEthRequest.amount(1d); + redeemEthRequest.amount(1.0d); ApiResponse response = api.redeemEth(redeemEthRequest); @@ -438,26 +414,23 @@ public void redeemEthTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000amount=1", signInputCaptor.getValue()); - assertEquals( - "50d24733794b928836575c346769be26ee1fb5ffbf73f36933cd22c50116f74e", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000amount=1&asset=BETH", signInputCaptor.getValue()); + assertEquals("1ff8a7cd37584085d8c921503e1959a848713e382f31ee608a0c7eed04c2fac6", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/eth-staking/eth/redeem", actualRequest.url().encodedPath()); } /** - * Subscribe ETH Staking(TRADE) + * Subscribe ETH Staking (TRADE) * - *

Subscribe ETH Staking * You need to open Enable Spot & Margin Trading permission for - * the API Key which requests this endpoint. Weight: 150 + *

Subscribe ETH Staking Weight(IP): 150 Security Type: TRADE Notes: - You need to open + * Enable Spot & Margin Trading permission for the API Key which requests this endpoint. * * @throws ApiException if the Api call fails */ @Test - public void subscribeEthStakingTest() throws ApiException, CryptoException { + public void subscribeEthStakingTest() throws ApiException, CryptoException, IOException { SubscribeEthStakingRequest subscribeEthStakingRequest = new SubscribeEthStakingRequest(); - - subscribeEthStakingRequest.amount(1d); + subscribeEthStakingRequest.amount(1.0d); ApiResponse response = api.subscribeEthStaking(subscribeEthStakingRequest); @@ -474,24 +447,22 @@ public void subscribeEthStakingTest() throws ApiException, CryptoException { assertEquals("timestamp=1736393892000amount=1", signInputCaptor.getValue()); assertEquals( - "50d24733794b928836575c346769be26ee1fb5ffbf73f36933cd22c50116f74e", - actualRequest.url().queryParameter("signature")); + "50d24733794b928836575c346769be26ee1fb5ffbf73f36933cd22c50116f74e", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v2/eth-staking/eth/stake", actualRequest.url().encodedPath()); } /** - * Wrap BETH(TRADE) + * Wrap BETH (TRADE) * - *

Wrap BETH * You need to open Enable Spot & Margin Trading permission for the API Key - * which requests this endpoint. Weight: 150 + *

Wrap BETH Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable Spot & + * Margin Trading permission for the API Key which requests this endpoint. * * @throws ApiException if the Api call fails */ @Test - public void wrapBethTest() throws ApiException, CryptoException { + public void wrapBethTest() throws ApiException, CryptoException, IOException { WrapBethRequest wrapBethRequest = new WrapBethRequest(); - - wrapBethRequest.amount(1d); + wrapBethRequest.amount(1.0d); ApiResponse response = api.wrapBeth(wrapBethRequest); @@ -506,9 +477,7 @@ public void wrapBethTest() throws ApiException, CryptoException { Request actualRequest = captorValue.request(); assertEquals("timestamp=1736393892000amount=1", signInputCaptor.getValue()); - assertEquals( - "50d24733794b928836575c346769be26ee1fb5ffbf73f36933cd22c50116f74e", - actualRequest.url().queryParameter("signature")); + assertEquals("50d24733794b928836575c346769be26ee1fb5ffbf73f36933cd22c50116f74e", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/eth-staking/wbeth/wrap", actualRequest.url().encodedPath()); } } diff --git a/clients/staking/src/test/java/com/binance/connector/client/staking/rest/api/OnChainYieldsApiTest.java b/clients/staking/src/test/java/com/binance/connector/client/staking/rest/api/OnChainYieldsApiTest.java new file mode 100644 index 000000000..3129d71b0 --- /dev/null +++ b/clients/staking/src/test/java/com/binance/connector/client/staking/rest/api/OnChainYieldsApiTest.java @@ -0,0 +1,575 @@ +/* + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.staking.rest.api; + +import static org.junit.Assert.assertEquals; + +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.auth.BinanceAuthenticationFactory; +import com.binance.connector.client.common.auth.SignatureAuthentication; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.common.sign.HmacSignatureGenerator; +import com.binance.connector.client.common.sign.SignatureGenerator; +import com.binance.connector.client.staking.rest.model.GetOnChainYieldsLockedPersonalLeftQuotaResponse; +import com.binance.connector.client.staking.rest.model.GetOnChainYieldsLockedProductListResponse; +import com.binance.connector.client.staking.rest.model.GetOnChainYieldsLockedProductPositionResponse; +import com.binance.connector.client.staking.rest.model.GetOnChainYieldsLockedRedemptionRecordResponse; +import com.binance.connector.client.staking.rest.model.GetOnChainYieldsLockedRewardsHistoryResponse; +import com.binance.connector.client.staking.rest.model.GetOnChainYieldsLockedSubscriptionPreviewResponse; +import com.binance.connector.client.staking.rest.model.GetOnChainYieldsLockedSubscriptionRecordResponse; +import com.binance.connector.client.staking.rest.model.OnChainYieldsAccountResponse; +import com.binance.connector.client.staking.rest.model.RedeemOnChainYieldsLockedProductRequest; +import com.binance.connector.client.staking.rest.model.RedeemOnChainYieldsLockedProductResponse; +import com.binance.connector.client.staking.rest.model.RedeemTo; +import com.binance.connector.client.staking.rest.model.SetOnChainYieldsLockedAutoSubscribeRequest; +import com.binance.connector.client.staking.rest.model.SetOnChainYieldsLockedAutoSubscribeResponse; +import com.binance.connector.client.staking.rest.model.SetOnChainYieldsLockedProductRedeemOptionRequest; +import com.binance.connector.client.staking.rest.model.SetOnChainYieldsLockedProductRedeemOptionResponse; +import com.binance.connector.client.staking.rest.model.SubscribeOnChainYieldsLockedProductRequest; +import com.binance.connector.client.staking.rest.model.SubscribeOnChainYieldsLockedProductResponse; +import jakarta.validation.constraints.*; +import java.io.IOException; +import okhttp3.Call; +import okhttp3.Request; +import org.bouncycastle.crypto.CryptoException; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; + +/** API tests for OnChainYieldsApi */ +public class OnChainYieldsApiTest { + + private OnChainYieldsApi api; + private ApiClient apiClientSpy; + private SignatureGenerator signatureGeneratorSpy; + + @BeforeEach + public void initApiClient() throws ApiException { + ClientConfiguration clientConfiguration = new ClientConfiguration(); + clientConfiguration.setUrl("http://localhost:8080"); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setSecretKey("secretKey"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + + HmacSignatureGenerator signatureGenerator = + new HmacSignatureGenerator(signatureConfiguration.getSecretKey()); + signatureGeneratorSpy = Mockito.spy(signatureGenerator); + SignatureAuthentication signatureAuthentication = + new SignatureAuthentication( + signatureConfiguration.getApiKey(), signatureGeneratorSpy); + SignatureAuthentication authenticationSpy = Mockito.spy(signatureAuthentication); + Mockito.doReturn("1736393892000").when(authenticationSpy).buildTimestamp(); + + BinanceAuthenticationFactory factoryMock = Mockito.mock(BinanceAuthenticationFactory.class); + Mockito.doReturn(authenticationSpy) + .when(factoryMock) + .getAuthentication(signatureConfiguration); + + ApiClient apiClient = new ApiClient(clientConfiguration, factoryMock); + + apiClientSpy = Mockito.spy(apiClient); + Mockito.doReturn(new ApiResponse<>(200, null)) + .when(apiClientSpy) + .execute(Mockito.any(), Mockito.any(java.lang.reflect.Type.class)); + Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); + Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); + + api = new OnChainYieldsApi(apiClientSpy); + } + + /** + * Get On-chain Yields Locked Personal Left Quota (USER_DATA) + * + *

Get On-chain Yields Locked Personal Left Quota Weight(IP): 50 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOnChainYieldsLockedPersonalLeftQuotaTest() + throws ApiException, CryptoException, IOException { + String projectId = "1"; + Long recvWindow = 5000L; + ApiResponse response = + api.getOnChainYieldsLockedPersonalLeftQuota(projectId, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + "projectId=1&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); + assertEquals( + "7df8536b8711da59322819086e27ee0e183d18d1f4d6a68377c9c4a87f835ab8", + actualRequest.url().queryParameter("signature")); + assertEquals( + "/sapi/v1/onchain-yields/locked/personalLeftQuota", + actualRequest.url().encodedPath()); + } + + /** + * Get On-chain Yields Locked Product List (USER_DATA) + * + *

Get available On-chain Yields Locked product list Weight(IP): 50 Security Type: USER_DATA + * Notes: - Get available On-chain Yields Locked product list + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOnChainYieldsLockedProductListTest() + throws ApiException, CryptoException, IOException { + String asset = "SOL"; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getOnChainYieldsLockedProductList(asset, current, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + "asset=SOL¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "0614571df2ce2c99cb13906242913c37c0beb97a8f84eb72e5203e58177eb3eb", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/onchain-yields/locked/list", actualRequest.url().encodedPath()); + } + + /** + * Get On-chain Yields Locked Product Position (USER_DATA) + * + *

Get On-chain Yields Locked Product Position Weight(IP): 50 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOnChainYieldsLockedProductPositionTest() + throws ApiException, CryptoException, IOException { + String asset = "BTC"; + String positionId = "1"; + String projectId = "1"; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getOnChainYieldsLockedProductPosition( + asset, positionId, projectId, current, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + "asset=BTC&positionId=1&projectId=1¤t=1&size=10&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); + assertEquals( + "26491df822593223531140428c8ad55dd92494f711d16ef5e54d0c8fef8552bf", + actualRequest.url().queryParameter("signature")); + assertEquals( + "/sapi/v1/onchain-yields/locked/position", actualRequest.url().encodedPath()); + } + + /** + * Get On-chain Yields Locked Redemption Record (USER_DATA) + * + *

Get On-chain Yields Locked Redemption Record Weight(IP): 50 Security Type: USER_DATA + * Notes: - The time between `startTime` and `endTime` cannot be longer than + * 3 months. - If `startTime` and `endTime` are both not sent, then the last + * 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOnChainYieldsLockedRedemptionRecordTest() + throws ApiException, CryptoException, IOException { + String positionId = "1"; + String redeemId = "1"; + String asset = "BTC"; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getOnChainYieldsLockedRedemptionRecord( + positionId, redeemId, asset, startTime, endTime, current, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + "positionId=1&redeemId=1&asset=BTC&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); + assertEquals( + "1d183a6f1e0cdfa8e69e40b818d8d7f40f5d78816b8785b35281ce987a4112ad", + actualRequest.url().queryParameter("signature")); + assertEquals( + "/sapi/v1/onchain-yields/locked/history/redemptionRecord", actualRequest.url().encodedPath()); + } + + /** + * Get On-chain Yields Locked Rewards History (USER_DATA) + * + *

Get On-chain Yields Locked Rewards History Weight(IP): 50 Security Type: USER_DATA Notes: + * - The time between `startTime` and `endTime` cannot be longer than 3 + * months. - If `startTime` and `endTime` are both not sent, then the last + * 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOnChainYieldsLockedRewardsHistoryTest() + throws ApiException, CryptoException, IOException { + String positionId = "1"; + String asset = "BTC"; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getOnChainYieldsLockedRewardsHistory( + positionId, asset, startTime, endTime, current, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + "positionId=1&asset=BTC&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "409c7bf8794eb5a049caa12f3a505d43a5f87db6f5f8d74d257cd34d20f331ff", + actualRequest.url().queryParameter("signature")); + assertEquals( + "/sapi/v1/onchain-yields/locked/history/rewardsRecord", actualRequest.url().encodedPath()); + } + + /** + * Get On-chain Yields Locked Subscription Preview (USER_DATA) + * + *

Get On-chain Yields Locked Subscription Preview Weight(IP): 50 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOnChainYieldsLockedSubscriptionPreviewTest() + throws ApiException, CryptoException, IOException { + String projectId = "1"; + Double amount = 1.0d; + Boolean autoSubscribe = true; + Long recvWindow = 5000L; + ApiResponse response = + api.getOnChainYieldsLockedSubscriptionPreview( + projectId, amount, autoSubscribe, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + "projectId=1&amount=1&autoSubscribe=true&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); + assertEquals( + "ecc2c9a2d68e05051696f604598a440ee1aeaed7b90bc546e17a9edcdc6ae43a", + actualRequest.url().queryParameter("signature")); + assertEquals( + "/sapi/v1/onchain-yields/locked/subscriptionPreview", + actualRequest.url().encodedPath()); + } + + /** + * Get On-chain Yields Locked Subscription Record (USER_DATA) + * + *

Get On-chain Yields Locked Subscription Record Weight(IP): 50 Security Type: USER_DATA + * Notes: - The time between `startTime` and `endTime` cannot be longer than + * 3 months. - If `startTime` and `endTime` are both not sent, then the last + * 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOnChainYieldsLockedSubscriptionRecordTest() + throws ApiException, CryptoException, IOException { + String purchaseId = "1"; + String clientId = "1"; + String asset = "BTC"; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getOnChainYieldsLockedSubscriptionRecord( + purchaseId, clientId, asset, startTime, endTime, current, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + "purchaseId=1&clientId=1&asset=BTC&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); + assertEquals( + "1229a0f8ac2c76bec7b1a680e20a85bf6227c75f823e248f855203d8ccfc94af", + actualRequest.url().queryParameter("signature")); + assertEquals( + "/sapi/v1/onchain-yields/locked/history/subscriptionRecord", + actualRequest.url().encodedPath()); + } + + /** + * On-chain Yields Account (USER_DATA) + * + *

On-chain Yields Account query Weight(IP): 50 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void onChainYieldsAccountTest() throws ApiException, CryptoException, IOException { + Long recvWindow = 5000L; + ApiResponse response = api.onChainYieldsAccount(recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/onchain-yields/account", actualRequest.url().encodedPath()); + } + + /** + * Redeem On-chain Yields Locked Product (TRADE) + * + *

Redeem On-chain Yields Locked Product Weight(IP): 200 Security Type: TRADE Notes: - You + * need to open `Enable Spot & Margin Trading` permission for the API Key which + * requests this endpoint. + * + * @throws ApiException if the Api call fails + */ + @Test + public void redeemOnChainYieldsLockedProductTest() + throws ApiException, CryptoException, IOException { + RedeemOnChainYieldsLockedProductRequest redeemOnChainYieldsLockedProductRequest = + new RedeemOnChainYieldsLockedProductRequest(); + redeemOnChainYieldsLockedProductRequest.positionId("1"); + + ApiResponse response = + api.redeemOnChainYieldsLockedProduct(redeemOnChainYieldsLockedProductRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + "timestamp=1736393892000positionId=1", signInputCaptor.getValue()); + assertEquals( + "05345189012e725ecf394a569c76b468c3a9d6377f5b644a1b90e1551920ce91", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/onchain-yields/locked/redeem", actualRequest.url().encodedPath()); + } + + /** + * Set On-chain Yields Locked Auto Subscribe (USER_DATA) + * + *

Set On-chain Yield locked auto subscribe Weight(IP): 50 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void setOnChainYieldsLockedAutoSubscribeTest() + throws ApiException, CryptoException, IOException { + SetOnChainYieldsLockedAutoSubscribeRequest setOnChainYieldsLockedAutoSubscribeRequest = + new SetOnChainYieldsLockedAutoSubscribeRequest(); + setOnChainYieldsLockedAutoSubscribeRequest.positionId("1"); + setOnChainYieldsLockedAutoSubscribeRequest.autoSubscribe(true); + + ApiResponse response = + api.setOnChainYieldsLockedAutoSubscribe(setOnChainYieldsLockedAutoSubscribeRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + "timestamp=1736393892000positionId=1&autoSubscribe=true", signInputCaptor.getValue()); + assertEquals( + "ccf4485e39f5a5902d6132dc3dff0cebd2ef3a8bd3920de8ebf5ab46d448213a", + actualRequest.url().queryParameter("signature")); + assertEquals( + "/sapi/v1/onchain-yields/locked/setAutoSubscribe", actualRequest.url().encodedPath()); + } + + /** + * Set On-chain Yields Locked Product Redeem Option (USER_DATA) + * + *

Set On-chain Yields redeem option for Locked product Weight(IP): 50 Security Type: + * USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void setOnChainYieldsLockedProductRedeemOptionTest() + throws ApiException, CryptoException, IOException { + SetOnChainYieldsLockedProductRedeemOptionRequest + setOnChainYieldsLockedProductRedeemOptionRequest = + new SetOnChainYieldsLockedProductRedeemOptionRequest(); + setOnChainYieldsLockedProductRedeemOptionRequest.positionId("1"); + setOnChainYieldsLockedProductRedeemOptionRequest.redeemTo(RedeemTo.SPOT); + + ApiResponse response = + api.setOnChainYieldsLockedProductRedeemOption( + setOnChainYieldsLockedProductRedeemOptionRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + "timestamp=1736393892000positionId=1&redeemTo=SPOT", + signInputCaptor.getValue()); + assertEquals( + "54b4c36882fe7b0b06bb851e208c082cdc9e6d0ca526a21cbb323a3659e02a2e", + actualRequest.url().queryParameter("signature")); + assertEquals( + "/sapi/v1/onchain-yields/locked/setRedeemOption", + actualRequest.url().encodedPath()); + } + + /** + * Subscribe On-chain Yields Locked Product (TRADE) + * + *

Subscribe On-chain Yields Locked Product Weight(IP): 200 Security Type: TRADE Notes: - You + * need to open `Enable Spot & Margin Trading` permission for the API Key which + * requests this endpoint. + * + * @throws ApiException if the Api call fails + */ + @Test + public void subscribeOnChainYieldsLockedProductTest() + throws ApiException, CryptoException, IOException { + SubscribeOnChainYieldsLockedProductRequest subscribeOnChainYieldsLockedProductRequest = + new SubscribeOnChainYieldsLockedProductRequest(); + subscribeOnChainYieldsLockedProductRequest.projectId("1"); + subscribeOnChainYieldsLockedProductRequest.amount(1.0d); + + ApiResponse response = + api.subscribeOnChainYieldsLockedProduct(subscribeOnChainYieldsLockedProductRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + "timestamp=1736393892000amount=1&sourceAccount=SPOT&redeemTo=FLEXIBLE&autoSubscribe=false&projectId=1", signInputCaptor.getValue()); + assertEquals( + "08d0295c51d9b1c64b3d0d607b234347f113741c6e1fc995b31e680001149ee7", + actualRequest.url().queryParameter("signature")); + assertEquals( + "/sapi/v1/onchain-yields/locked/subscribe", actualRequest.url().encodedPath()); + } +} diff --git a/clients/staking/src/test/java/com/binance/connector/client/staking/rest/api/SoftStakingApiTest.java b/clients/staking/src/test/java/com/binance/connector/client/staking/rest/api/SoftStakingApiTest.java new file mode 100644 index 000000000..22bd22b79 --- /dev/null +++ b/clients/staking/src/test/java/com/binance/connector/client/staking/rest/api/SoftStakingApiTest.java @@ -0,0 +1,184 @@ +/* + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.staking.rest.api; + +import static org.junit.Assert.assertEquals; + +import com.binance.connector.client.common.ApiClient; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.auth.BinanceAuthenticationFactory; +import com.binance.connector.client.common.auth.SignatureAuthentication; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.common.sign.HmacSignatureGenerator; +import com.binance.connector.client.common.sign.SignatureGenerator; +import com.binance.connector.client.staking.rest.model.GetSoftStakingProductListResponse; +import com.binance.connector.client.staking.rest.model.GetSoftStakingRewardsHistoryResponse; +import com.binance.connector.client.staking.rest.model.SetSoftStakingResponse; +import jakarta.validation.constraints.*; +import java.io.IOException; +import okhttp3.Call; +import okhttp3.Request; +import org.bouncycastle.crypto.CryptoException; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; + +/** API tests for SoftStakingApi */ +public class SoftStakingApiTest { + + private SoftStakingApi api; + private ApiClient apiClientSpy; + private SignatureGenerator signatureGeneratorSpy; + + @BeforeEach + public void initApiClient() throws ApiException { + ClientConfiguration clientConfiguration = new ClientConfiguration(); + clientConfiguration.setUrl("http://localhost:8080"); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setSecretKey("secretKey"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + + HmacSignatureGenerator signatureGenerator = + new HmacSignatureGenerator(signatureConfiguration.getSecretKey()); + signatureGeneratorSpy = Mockito.spy(signatureGenerator); + SignatureAuthentication signatureAuthentication = + new SignatureAuthentication( + signatureConfiguration.getApiKey(), signatureGeneratorSpy); + SignatureAuthentication authenticationSpy = Mockito.spy(signatureAuthentication); + Mockito.doReturn("1736393892000").when(authenticationSpy).buildTimestamp(); + + BinanceAuthenticationFactory factoryMock = Mockito.mock(BinanceAuthenticationFactory.class); + Mockito.doReturn(authenticationSpy) + .when(factoryMock) + .getAuthentication(signatureConfiguration); + + ApiClient apiClient = new ApiClient(clientConfiguration, factoryMock); + + apiClientSpy = Mockito.spy(apiClient); + Mockito.doReturn(new ApiResponse<>(200, null)) + .when(apiClientSpy) + .execute(Mockito.any(), Mockito.any(java.lang.reflect.Type.class)); + Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); + Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); + + api = new SoftStakingApi(apiClientSpy); + } + + /** + * Get Soft Staking Product List (USER_DATA) + * + *

Get the available Soft Staking product list. Weight(IP): 50 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getSoftStakingProductListTest() throws ApiException, CryptoException, IOException { + String asset = "BTC"; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getSoftStakingProductList(asset, current, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("asset=BTC¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "173c6c95c631b5ff4b4e6d877647e9b9e97845c9a97b29fd5361e293cbf3decd", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/soft-staking/list", actualRequest.url().encodedPath()); + } + + /** + * Get Soft Staking Rewards History (USER_DATA) + * + *

Get Soft Staking Rewards History Weight(IP): 50 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getSoftStakingRewardsHistoryTest() + throws ApiException, CryptoException, IOException { + String asset = "BTC"; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getSoftStakingRewardsHistory( + asset, startTime, endTime, current, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("asset=BTC&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "0b20a61f1a85f055506ef846f2603b507aaa66e4872c3683429f7e2b689f2cdb", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/soft-staking/history/rewardsRecord", actualRequest.url().encodedPath()); + } + + /** + * Set Soft Staking (USER_DATA) + * + *

Enable or disable Soft Staking. Weight(IP): 50 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void setSoftStakingTest() throws ApiException, CryptoException, IOException { + Boolean softStaking = true; + Long recvWindow = 5000L; + ApiResponse response = api.setSoftStaking(softStaking, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("softStaking=true&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("184b50fa1cb6565fe234ae3fd366fda1dead07d6032866cca5c185ec37b29aaa", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/soft-staking/set", actualRequest.url().encodedPath()); + } +} diff --git a/clients/staking/src/test/java/com/binance/connector/client/staking/rest/api/SolStakingApiTest.java b/clients/staking/src/test/java/com/binance/connector/client/staking/rest/api/SolStakingApiTest.java index 1c1dd985e..638a85309 100644 --- a/clients/staking/src/test/java/com/binance/connector/client/staking/rest/api/SolStakingApiTest.java +++ b/clients/staking/src/test/java/com/binance/connector/client/staking/rest/api/SolStakingApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Staking REST API - * OpenAPI Specification for the Binance Staking REST API + * Staking REST API + * Subscribe to staking products, track positions, and query rewards via the Binance Staking API. * * The version of the OpenAPI document: 1.0.0 * @@ -32,12 +32,14 @@ import com.binance.connector.client.staking.rest.model.GetSolStakingHistoryResponse; import com.binance.connector.client.staking.rest.model.GetSolStakingQuotaDetailsResponse; import com.binance.connector.client.staking.rest.model.GetUnclaimedRewardsResponse; +import com.binance.connector.client.staking.rest.model.OrderType; import com.binance.connector.client.staking.rest.model.RedeemSolRequest; import com.binance.connector.client.staking.rest.model.RedeemSolResponse; import com.binance.connector.client.staking.rest.model.SolStakingAccountResponse; import com.binance.connector.client.staking.rest.model.SubscribeSolStakingRequest; import com.binance.connector.client.staking.rest.model.SubscribeSolStakingResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -89,15 +91,16 @@ public void initApiClient() throws ApiException { } /** - * Claim Boost Rewards(TRADE) + * Claim Boost Rewards (TRADE) * - *

Claim Boost APR Airdrop Rewards * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 150 + *

Claim Boost APR Airdrop Rewards Weight(IP): 150 Security Type: TRADE Notes: - You need to + * open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ @Test - public void claimBoostRewardsTest() throws ApiException, CryptoException { + public void claimBoostRewardsTest() throws ApiException, CryptoException, IOException { ClaimBoostRewardsRequest claimBoostRewardsRequest = new ClaimBoostRewardsRequest(); ApiResponse response = @@ -115,26 +118,25 @@ public void claimBoostRewardsTest() throws ApiException, CryptoException { assertEquals("timestamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", - actualRequest.url().queryParameter("signature")); + "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/sol-staking/sol/claim", actualRequest.url().encodedPath()); } /** - * Get BNSOL Rate History(USER_DATA) + * Get BNSOL Rate History (USER_DATA) * - *

Get BNSOL Rate History * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get BNSOL Rate History Weight(IP): 150 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void getBnsolRateHistoryTest() throws ApiException, CryptoException { + public void getBnsolRateHistoryTest() throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -153,31 +155,27 @@ public void getBnsolRateHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "2ecc0415a3bdb2963e8030cdf6cf00de6f49d21b71ff939dda42e5756eb8ba66", - actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/sol-staking/sol/history/rateHistory", actualRequest.url().encodedPath()); + "2ecc0415a3bdb2963e8030cdf6cf00de6f49d21b71ff939dda42e5756eb8ba66", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/sol-staking/sol/history/rateHistory", actualRequest.url().encodedPath()); } /** - * Get BNSOL rewards history(USER_DATA) + * Get BNSOL rewards history (USER_DATA) * - *

Get BNSOL rewards history * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get BNSOL rewards history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void getBnsolRewardsHistoryTest() throws ApiException, CryptoException { + public void getBnsolRewardsHistoryTest() throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -196,33 +194,29 @@ public void getBnsolRewardsHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + assertEquals("startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "2ecc0415a3bdb2963e8030cdf6cf00de6f49d21b71ff939dda42e5756eb8ba66", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/sol-staking/sol/history/bnsolRewardsHistory", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/sol-staking/sol/history/bnsolRewardsHistory", actualRequest.url().encodedPath()); } /** - * Get Boost Rewards History(USER_DATA) + * Get Boost Rewards History (USER_DATA) * - *

Get Boost rewards history * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get Boost rewards history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void getBoostRewardsHistoryTest() throws ApiException, CryptoException { - String type = "CLAIM"; + public void getBoostRewardsHistoryTest() throws ApiException, CryptoException, IOException { + OrderType type = OrderType.CLAIM; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -241,40 +235,37 @@ public void getBoostRewardsHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "type=CLAIM&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + assertEquals("type=CLAIM&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "3b49d920bd981c654e636398f5d2a73462a09fa7360871b5ecb722b787a1a351", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/sol-staking/sol/history/boostRewardsHistory", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/sol-staking/sol/history/boostRewardsHistory", actualRequest.url().encodedPath()); } /** - * Get SOL redemption history(USER_DATA) + * Get SOL redemption history (USER_DATA) * - *

Get SOL redemption history * The time between `startTime` and - * `endTime` cannot be longer than 3 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get SOL redemption history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void getSolRedemptionHistoryTest() throws ApiException, CryptoException { - Long redeemId = 123L; + public void getSolRedemptionHistoryTest() throws ApiException, CryptoException, IOException { + Long redeemId = 1234567L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; Long size = 10L; Long recvWindow = 5000L; ApiResponse response = - api.getSolRedemptionHistory(redeemId, startTime, endTime, current, size, recvWindow); + api.getSolRedemptionHistory( + redeemId, startTime, endTime, current, size, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -286,33 +277,29 @@ public void getSolRedemptionHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("redeemId=1234567&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "redeemId=123&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "90b22be90fad28e8f5f7cd6af50eb4c523db9c1363ee49915fad9713c0656f0d", + "68bf70ea1fa94c38fd8ef0f28a7ccdc5642f691b3471f9ff861491c93970a5de", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/sol-staking/sol/history/redemptionHistory", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/sol-staking/sol/history/redemptionHistory", actualRequest.url().encodedPath()); } /** - * Get SOL staking history(USER_DATA) + * Get SOL staking history (USER_DATA) * - *

Get SOL staking history * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get SOL staking history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void getSolStakingHistoryTest() throws ApiException, CryptoException { - Long purchaseId = 123L; + public void getSolStakingHistoryTest() throws ApiException, CryptoException, IOException { + Long purchaseId = 1234567L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; @@ -331,26 +318,22 @@ public void getSolStakingHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("purchaseId=1234567&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "purchaseId=123&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "35f8697a0b1f039ff660d5b47cb802e92c651d0f135334ec523e176dad5b714b", + "43ce1eef38c940f1f565325261de3d211cbbba816cb7587d872562da5b16ad07", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/sol-staking/sol/history/stakingHistory", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/sol-staking/sol/history/stakingHistory", actualRequest.url().encodedPath()); } /** - * Get SOL staking quota details(USER_DATA) + * Get SOL staking quota details (USER_DATA) * - *

Get SOL staking quota Weight: 150 + *

Get SOL staking quota Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getSolStakingQuotaDetailsTest() throws ApiException, CryptoException { + public void getSolStakingQuotaDetailsTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getSolStakingQuotaDetails(recvWindow); @@ -373,20 +356,20 @@ public void getSolStakingQuotaDetailsTest() throws ApiException, CryptoException } /** - * Get Unclaimed Rewards(USER_DATA) + * Get Unclaimed Rewards (USER_DATA) * - *

Get Unclaimed rewards * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get Unclaimed rewards Weight(IP): 150 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ @Test - public void getUnclaimedRewardsTest() throws ApiException, CryptoException { + public void getUnclaimedRewardsTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getUnclaimedRewards(recvWindow); @@ -402,26 +385,22 @@ public void getUnclaimedRewardsTest() throws ApiException, CryptoException { assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/sol-staking/sol/history/unclaimedRewards", - actualRequest.url().encodedPath()); + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/sol-staking/sol/history/unclaimedRewards", actualRequest.url().encodedPath()); } /** - * Redeem SOL(TRADE) + * Redeem SOL (TRADE) * - *

Redeem BNSOL get SOL * You need to open Enable Spot & Margin Trading permission for - * the API Key which requests this endpoint. Weight: 150 + *

Redeem BNSOL get SOL Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable + * Spot & Margin Trading permission for the API Key which requests this endpoint. * * @throws ApiException if the Api call fails */ @Test - public void redeemSolTest() throws ApiException, CryptoException { + public void redeemSolTest() throws ApiException, CryptoException, IOException { RedeemSolRequest redeemSolRequest = new RedeemSolRequest(); - - redeemSolRequest.amount(1d); + redeemSolRequest.amount(1.0d); ApiResponse response = api.redeemSol(redeemSolRequest); @@ -436,21 +415,19 @@ public void redeemSolTest() throws ApiException, CryptoException { Request actualRequest = captorValue.request(); assertEquals("timestamp=1736393892000amount=1", signInputCaptor.getValue()); - assertEquals( - "50d24733794b928836575c346769be26ee1fb5ffbf73f36933cd22c50116f74e", - actualRequest.url().queryParameter("signature")); + assertEquals("50d24733794b928836575c346769be26ee1fb5ffbf73f36933cd22c50116f74e", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/sol-staking/sol/redeem", actualRequest.url().encodedPath()); } /** - * SOL Staking account(USER_DATA) + * SOL Staking account (USER_DATA) * - *

SOL Staking account Weight: 150 + *

SOL Staking account Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void solStakingAccountTest() throws ApiException, CryptoException { + public void solStakingAccountTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.solStakingAccount(recvWindow); @@ -466,24 +443,22 @@ public void solStakingAccountTest() throws ApiException, CryptoException { assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/sol-staking/account", actualRequest.url().encodedPath()); } /** - * Subscribe SOL Staking(TRADE) + * Subscribe SOL Staking (TRADE) * - *

Subscribe SOL Staking * You need to open Enable Spot & Margin Trading permission for - * the API Key which requests this endpoint. Weight: 150 + *

Subscribe SOL Staking Weight(IP): 150 Security Type: TRADE Notes: - You need to open + * Enable Spot & Margin Trading permission for the API Key which requests this endpoint. * * @throws ApiException if the Api call fails */ @Test - public void subscribeSolStakingTest() throws ApiException, CryptoException { + public void subscribeSolStakingTest() throws ApiException, CryptoException, IOException { SubscribeSolStakingRequest subscribeSolStakingRequest = new SubscribeSolStakingRequest(); - - subscribeSolStakingRequest.amount(1d); + subscribeSolStakingRequest.amount(1.0d); ApiResponse response = api.subscribeSolStaking(subscribeSolStakingRequest); @@ -500,8 +475,7 @@ public void subscribeSolStakingTest() throws ApiException, CryptoException { assertEquals("timestamp=1736393892000amount=1", signInputCaptor.getValue()); assertEquals( - "50d24733794b928836575c346769be26ee1fb5ffbf73f36933cd22c50116f74e", - actualRequest.url().queryParameter("signature")); + "50d24733794b928836575c346769be26ee1fb5ffbf73f36933cd22c50116f74e", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/sol-staking/sol/stake", actualRequest.url().encodedPath()); } } diff --git a/clients/sub-account/CHANGELOG.md b/clients/sub-account/CHANGELOG.md index ff366f74a..22641cee7 100644 --- a/clients/sub-account/CHANGELOG.md +++ b/clients/sub-account/CHANGELOG.md @@ -1,5 +1,43 @@ # Changelog +## 6.0.0 - 2026-07-29 + +### Added (4) + +- `createSubAccountApiKey()` (`POST /sapi/v1/sub-account/subAccountApi`) +- `deleteSubAccountApiKey()` (`DELETE /sapi/v1/sub-account/subAccountApi`) +- `modifySubAccountApiKeyPermission()` (`POST /sapi/v1/sub-account/subAccountApiPermission`) +- `querySubAccountApiKey()` (`GET /sapi/v1/sub-account/subAccountApi`) + +### Changed (6) + +- Modified parameter `fromAccountType`: + - enum added: `SPOT`, `USDT_FUTURE`, `COIN_FUTURE`, `MARGIN`, `ISOLATED_MARGIN` + - affected methods: + - `universalTransfer()` (`POST /sapi/v1/sub-account/universalTransfer`) +- Modified parameter `productType`: + - enum added: `UM` + - affected methods: + - `movePositionForSubAccount()` (`POST /sapi/v1/sub-account/futures/move-position`) +- Modified parameter `status`: + - type `string` → `integer` + - affected methods: + - `addIpRestrictionForSubAccountApiKey()` (`POST /sapi/v2/sub-account/subAccountApi/ipRestriction`) +- Modified parameter `toAccountType`: + - enum added: `SPOT`, `USDT_FUTURE`, `COIN_FUTURE`, `MARGIN`, `ISOLATED_MARGIN` + - affected methods: + - `universalTransfer()` (`POST /sapi/v1/sub-account/universalTransfer`) +- Modified parameter `transferFunctionAccountType`: + - enum added: `SPOT`, `MARGIN`, `ISOLATED_MARGIN`, `USDT_FUTURE`, `COIN_FUTURE` + - affected methods: + - `queryManagedSubAccountTransferLogSubAccountTrading()` (`GET /sapi/v1/managed-subaccount/query-trans-log`) + - `queryManagedSubAccountTransferLogMasterAccountInvestor()` (`GET /sapi/v1/managed-subaccount/queryTransLogForInvestor`) + - `queryManagedSubAccountTransferLogMasterAccountTrading()` (`GET /sapi/v1/managed-subaccount/queryTransLogForTradeParent`) +- Modified parameter `type`: + - enum added: `SPOT`, `MARGIN`, `FUTURES` + - affected methods: + - `queryManagedSubAccountSnapshot()` (`GET /sapi/v1/managed-subaccount/accountSnapshot`) + ## 5.0.1 - 2026-04-30 - Update `binance/common` module to version `2.4.2`. diff --git a/clients/sub-account/docs/AccountManagementApi.md b/clients/sub-account/docs/AccountManagementApi.md index 55a4c6b38..62b5e7ca8 100644 --- a/clients/sub-account/docs/AccountManagementApi.md +++ b/clients/sub-account/docs/AccountManagementApi.md @@ -20,7 +20,7 @@ All URIs are relative to *https://api.binance.com* Create a Virtual Sub-account (For Master Account) (USER_DATA) -Create a Virtual Sub-account * This request will generate a virtual sub account under your master account. * You need to enable \"trade\" option for the API Key which requests this endpoint. Weight: 1 +Create a Virtual Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - This request generates a virtual sub-account under your master account. - The API key used to call this endpoint must have the `trade` option enabled. ### Example ```java @@ -82,7 +82,7 @@ No authorization required Enable Futures for Sub-account (For Master Account) (USER_DATA) -Enable Futures for Sub-account for Master Account Weight: 1 +Enable Futures for Sub-account for Master Account Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -144,7 +144,7 @@ No authorization required Enable Options for Sub-account (For Master Account) (USER_DATA) -Enable Options for Sub-account (For Master Account). Weight: 1 +Enable Options for Sub-account (For Master Account). Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -206,7 +206,7 @@ No authorization required Get Futures Position-Risk of Sub-account (For Master Account) (USER_DATA) -Get Futures Position-Risk of Sub-account Weight: 10 +Get Futures Position-Risk of Sub-account Weight(IP): 10 Security Type: USER_DATA ### Example ```java @@ -223,8 +223,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountManagementApi apiInstance = new AccountManagementApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - Long recvWindow = 56L; // Long | + String email = "123@test.com"; // String | + Long recvWindow = 5000L; // Long | try { GetFuturesPositionRiskOfSubAccountResponse result = apiInstance.getFuturesPositionRiskOfSubAccount(email, recvWindow); System.out.println(result); @@ -243,7 +243,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | +| **email** | **String**| | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -270,7 +270,7 @@ No authorization required Get Futures Position-Risk of Sub-account V2 (For Master Account) (USER_DATA) -Get Futures Position-Risk of Sub-account V2 Weight: 1 +Get Futures Position-Risk of Sub-account V2 Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -287,9 +287,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountManagementApi apiInstance = new AccountManagementApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - Long futuresType = 56L; // Long | 1:USDT-margined Futures,2: Coin-margined Futures - Long recvWindow = 56L; // Long | + String email = "123@test.com"; // String | + Long futuresType = 1L; // Long | 1:USDT-margined Futures,2: Coin-margined Futures + Long recvWindow = 5000L; // Long | try { GetFuturesPositionRiskOfSubAccountV2Response result = apiInstance.getFuturesPositionRiskOfSubAccountV2(email, futuresType, recvWindow); System.out.println(result); @@ -308,7 +308,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | +| **email** | **String**| | | | **futuresType** | **Long**| 1:USDT-margined Futures,2: Coin-margined Futures | | | **recvWindow** | **Long**| | [optional] | @@ -336,7 +336,7 @@ No authorization required Get Sub-account's Status on Margin Or Futures (For Master Account) (USER_DATA) -Get Sub-account's Status on Margin Or Futures * If no email sent, all sub-accounts' information will be returned. Weight: 10 +Get Sub-account's Status on Margin Or Futures Weight(IP): 10 Security Type: USER_DATA Notes: - If no email sent, all sub-accounts' information will be returned. ### Example ```java @@ -353,8 +353,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountManagementApi apiInstance = new AccountManagementApi(defaultClient); - String email = "email_example"; // String | Managed sub-account email - Long recvWindow = 56L; // Long | + String email = "123@test.com"; // String | + Long recvWindow = 5000L; // Long | try { GetSubAccountsStatusOnMarginOrFuturesResponse result = apiInstance.getSubAccountsStatusOnMarginOrFutures(email, recvWindow); System.out.println(result); @@ -373,7 +373,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| Managed sub-account email | [optional] | +| **email** | **String**| | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -400,7 +400,7 @@ No authorization required Query Sub-account List (For Master Account) (USER_DATA) -Query Sub-account List Weight: 1 +Query Sub-account List Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -417,11 +417,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountManagementApi apiInstance = new AccountManagementApi(defaultClient); - String email = "email_example"; // String | Managed sub-account email - String isFreeze = "isFreeze_example"; // String | true or false - Long page = 56L; // Long | Default value: 1 - Long limit = 56L; // Long | Default value: 1, Max value: 200 - Long recvWindow = 56L; // Long | + String email = "123@test.com"; // String | + String isFreeze = "true"; // String | + Long page = 1L; // Long | + Long limit = 10L; // Long | + Long recvWindow = 5000L; // Long | try { QuerySubAccountListResponse result = apiInstance.querySubAccountList(email, isFreeze, page, limit, recvWindow); System.out.println(result); @@ -440,10 +440,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| Managed sub-account email | [optional] | -| **isFreeze** | **String**| true or false | [optional] | -| **page** | **Long**| Default value: 1 | [optional] | -| **limit** | **Long**| Default value: 1, Max value: 200 | [optional] | +| **email** | **String**| | [optional] | +| **isFreeze** | **String**| | [optional] | +| **page** | **Long**| | [optional] | +| **limit** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -470,7 +470,7 @@ No authorization required Query Sub-account Transaction Statistics (For Master Account) (USER_DATA) -Query Sub-account Transaction statistics (For Master Account). Weight: 60 +Query Sub-account Transaction statistics (For Master Account). Weight(IP): 60 Security Type: USER_DATA ### Example ```java @@ -487,8 +487,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountManagementApi apiInstance = new AccountManagementApi(defaultClient); - String email = "email_example"; // String | Managed sub-account email - Long recvWindow = 56L; // Long | + String email = "abc@test.com"; // String | Managed sub-account email + Long recvWindow = 5000L; // Long | try { QuerySubAccountTransactionStatisticsResponse result = apiInstance.querySubAccountTransactionStatistics(email, recvWindow); System.out.println(result); diff --git a/clients/sub-account/docs/AddIPRestrictionForSubAccountAPIKeyRequest.md b/clients/sub-account/docs/AddIPRestrictionForSubAccountAPIKeyRequest.md new file mode 100644 index 000000000..0e5c21641 --- /dev/null +++ b/clients/sub-account/docs/AddIPRestrictionForSubAccountAPIKeyRequest.md @@ -0,0 +1,17 @@ + + +# AddIpRestrictionForSubAccountApiKeyRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**email** | **String** | | | +|**subAccountApiKey** | **String** | | | +|**status** | **Long** | IP Restriction status. 1 = IP Unrestricted. 2 = Restrict access to trusted IPs only. | | +|**ipAddress** | **String** | Insert static IP in batch, separated by commas. | [optional] | +|**recvWindow** | **Long** | | [optional] | + + + diff --git a/clients/sub-account/docs/AddIpRestrictionForSubAccountApiKeyResponse.md b/clients/sub-account/docs/AddIPRestrictionForSubAccountAPIKeyResponse.md similarity index 100% rename from clients/sub-account/docs/AddIpRestrictionForSubAccountApiKeyResponse.md rename to clients/sub-account/docs/AddIPRestrictionForSubAccountAPIKeyResponse.md diff --git a/clients/sub-account/docs/AddIpRestrictionForSubAccountApiKeyRequest.md b/clients/sub-account/docs/AddIpRestrictionForSubAccountApiKeyRequest.md deleted file mode 100644 index 6e41b8785..000000000 --- a/clients/sub-account/docs/AddIpRestrictionForSubAccountApiKeyRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# AddIpRestrictionForSubAccountApiKeyRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**email** | **String** | | | -|**subAccountApiKey** | **String** | | | -|**status** | **Long** | | | -|**ipAddress** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | - - - diff --git a/clients/sub-account/docs/ApiManagementApi.md b/clients/sub-account/docs/ApiManagementApi.md index f98e4cd78..63ac8728b 100644 --- a/clients/sub-account/docs/ApiManagementApi.md +++ b/clients/sub-account/docs/ApiManagementApi.md @@ -5,8 +5,12 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**addIpRestrictionForSubAccountApiKey**](ApiManagementApi.md#addIpRestrictionForSubAccountApiKey) | **POST** /sapi/v2/sub-account/subAccountApi/ipRestriction | Add IP Restriction for Sub-Account API key (For Master Account) (USER_DATA) | +| [**createSubAccountApiKey**](ApiManagementApi.md#createSubAccountApiKey) | **POST** /sapi/v1/sub-account/subAccountApi | Create Sub-account API Key (For Master Account) (USER_DATA) | | [**deleteIpListForASubAccountApiKey**](ApiManagementApi.md#deleteIpListForASubAccountApiKey) | **DELETE** /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList | Delete IP List For a Sub-account API Key (For Master Account) (USER_DATA) | +| [**deleteSubAccountApiKey**](ApiManagementApi.md#deleteSubAccountApiKey) | **DELETE** /sapi/v1/sub-account/subAccountApi | Delete Sub-account API Key (For Master Account) (USER_DATA) | | [**getIpRestrictionForASubAccountApiKey**](ApiManagementApi.md#getIpRestrictionForASubAccountApiKey) | **GET** /sapi/v1/sub-account/subAccountApi/ipRestriction | Get IP Restriction for a Sub-account API Key (For Master Account) (USER_DATA) | +| [**modifySubAccountApiKeyPermission**](ApiManagementApi.md#modifySubAccountApiKeyPermission) | **POST** /sapi/v1/sub-account/subAccountApiPermission | Modify Sub-account API Key Permission (For Master Account) (USER_DATA) | +| [**querySubAccountApiKey**](ApiManagementApi.md#querySubAccountApiKey) | **GET** /sapi/v1/sub-account/subAccountApi | Query Sub-account API Key (For Master Account) (USER_DATA) | @@ -15,7 +19,7 @@ All URIs are relative to *https://api.binance.com* Add IP Restriction for Sub-Account API key (For Master Account) (USER_DATA) -Add IP Restriction for Sub-Account API key * You need to enable Enable Spot & Margin Trading option for the api key which requests this endpoint Weight: 3000 +Add IP Restriction for Sub-Account API key Weight(UID): 3000 Security Type: USER_DATA Notes: - You need to enable Enable Spot & Margin Trading option for the api key which requests this endpoint ### Example ```java @@ -71,13 +75,75 @@ No authorization required |-------------|-------------|------------------| | **200** | Add IP Restriction for Sub-Account API key | - | + +# **createSubAccountApiKey** +> CreateSubAccountApiKeyResponse createSubAccountApiKey(createSubAccountApiKeyRequest) + +Create Sub-account API Key (For Master Account) (USER_DATA) + +Create a new API Key for a sub-account. Weight(UID): 3000 Security Type: USER_DATA Notes: - `status=2` requires `ipAddress` - `status=3` requires `thirdPartyName` - Asset Sub Account is not supported - The caller must pass the KYC IP restriction check + +### Example +```java +// Import classes: +import com.binance.connector.client.sub_account.ApiClient; +import com.binance.connector.client.sub_account.ApiException; +import com.binance.connector.client.sub_account.Configuration; +import com.binance.connector.client.sub_account.models.*; +import com.binance.connector.client.sub_account.rest.api.ApiManagementApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + ApiManagementApi apiInstance = new ApiManagementApi(defaultClient); + CreateSubAccountApiKeyRequest createSubAccountApiKeyRequest = new CreateSubAccountApiKeyRequest(); // CreateSubAccountApiKeyRequest | + try { + CreateSubAccountApiKeyResponse result = apiInstance.createSubAccountApiKey(createSubAccountApiKeyRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApiManagementApi#createSubAccountApiKey"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createSubAccountApiKeyRequest** | [**CreateSubAccountApiKeyRequest**](CreateSubAccountApiKeyRequest.md)| | | + +### Return type + +[**CreateSubAccountApiKeyResponse**](CreateSubAccountApiKeyResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Create Sub-account API Key | - | + # **deleteIpListForASubAccountApiKey** > DeleteIpListForASubAccountApiKeyResponse deleteIpListForASubAccountApiKey(email, subAccountApiKey, ipAddress, recvWindow) Delete IP List For a Sub-account API Key (For Master Account) (USER_DATA) -Delete IP List For a Sub-account API Key * You need to enable Enable Spot & Margin Trading option for the api key which requests this endpoint Weight: 3000 +Delete IP List For a Sub-account API Key Weight(UID): 3000 Security Type: USER_DATA Notes: - You need to enable Enable Spot & Margin Trading option for the api key which requests this endpoint ### Example ```java @@ -94,10 +160,10 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); ApiManagementApi apiInstance = new ApiManagementApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - String subAccountApiKey = "subAccountApiKey_example"; // String | - String ipAddress = "ipAddress_example"; // String | IPs to be deleted. Can be added in batches, separated by commas - Long recvWindow = 56L; // Long | + String email = "123@test.com"; // String | + String subAccountApiKey = "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf"; // String | + String ipAddress = "69.210.67.14"; // String | IPs to be deleted. Can be added in batches, separated by commas + Long recvWindow = 5000L; // Long | try { DeleteIpListForASubAccountApiKeyResponse result = apiInstance.deleteIpListForASubAccountApiKey(email, subAccountApiKey, ipAddress, recvWindow); System.out.println(result); @@ -116,7 +182,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | +| **email** | **String**| | | | **subAccountApiKey** | **String**| | | | **ipAddress** | **String**| IPs to be deleted. Can be added in batches, separated by commas | | | **recvWindow** | **Long**| | [optional] | @@ -139,13 +205,79 @@ No authorization required |-------------|-------------|------------------| | **200** | Delete IP List For a Sub-account API Key | - | + +# **deleteSubAccountApiKey** +> Object deleteSubAccountApiKey(email, subAccountApiKey, recvWindow) + +Delete Sub-account API Key (For Master Account) (USER_DATA) + +Delete an API Key of a sub-account. Weight(UID): 3000 Security Type: USER_DATA Notes: - Asset Sub Account is not supported - The caller must pass the KYC IP restriction check + +### Example +```java +// Import classes: +import com.binance.connector.client.sub_account.ApiClient; +import com.binance.connector.client.sub_account.ApiException; +import com.binance.connector.client.sub_account.Configuration; +import com.binance.connector.client.sub_account.models.*; +import com.binance.connector.client.sub_account.rest.api.ApiManagementApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + ApiManagementApi apiInstance = new ApiManagementApi(defaultClient); + String email = "123@test.com"; // String | Sub-account email + String subAccountApiKey = "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf"; // String | The sub-account API Key to be deleted + Long recvWindow = 5000L; // Long | + try { + Object result = apiInstance.deleteSubAccountApiKey(email, subAccountApiKey, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApiManagementApi#deleteSubAccountApiKey"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **email** | **String**| Sub-account email | | +| **subAccountApiKey** | **String**| The sub-account API Key to be deleted | | +| **recvWindow** | **Long**| | [optional] | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Delete Sub-account API Key | - | + # **getIpRestrictionForASubAccountApiKey** > GetIpRestrictionForASubAccountApiKeyResponse getIpRestrictionForASubAccountApiKey(email, subAccountApiKey, recvWindow) Get IP Restriction for a Sub-account API Key (For Master Account) (USER_DATA) -Get IP Restriction for a Sub-account API Key Weight: 3000 +Get IP Restriction for a Sub-account API Key Weight(UID): 3000 Security Type: USER_DATA ### Example ```java @@ -162,9 +294,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); ApiManagementApi apiInstance = new ApiManagementApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - String subAccountApiKey = "subAccountApiKey_example"; // String | - Long recvWindow = 56L; // Long | + String email = "123@test.com"; // String | + String subAccountApiKey = "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf"; // String | + Long recvWindow = 5000L; // Long | try { GetIpRestrictionForASubAccountApiKeyResponse result = apiInstance.getIpRestrictionForASubAccountApiKey(email, subAccountApiKey, recvWindow); System.out.println(result); @@ -183,7 +315,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | +| **email** | **String**| | | | **subAccountApiKey** | **String**| | | | **recvWindow** | **Long**| | [optional] | @@ -205,3 +337,135 @@ No authorization required |-------------|-------------|------------------| | **200** | Get IP Restriction for a Sub-account API Key | - | + +# **modifySubAccountApiKeyPermission** +> ModifySubAccountApiKeyPermissionResponse modifySubAccountApiKeyPermission(modifySubAccountApiKeyPermissionRequest) + +Modify Sub-account API Key Permission (For Master Account) (USER_DATA) + +Modify the trading permissions of a sub-account API Key. Weight(UID): 3000 Security Type: USER_DATA Notes: - Portfolio Margin Retail User is not supported - Asset Sub Account is not supported - The caller must pass the KYC IP restriction check + +### Example +```java +// Import classes: +import com.binance.connector.client.sub_account.ApiClient; +import com.binance.connector.client.sub_account.ApiException; +import com.binance.connector.client.sub_account.Configuration; +import com.binance.connector.client.sub_account.models.*; +import com.binance.connector.client.sub_account.rest.api.ApiManagementApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + ApiManagementApi apiInstance = new ApiManagementApi(defaultClient); + ModifySubAccountApiKeyPermissionRequest modifySubAccountApiKeyPermissionRequest = new ModifySubAccountApiKeyPermissionRequest(); // ModifySubAccountApiKeyPermissionRequest | + try { + ModifySubAccountApiKeyPermissionResponse result = apiInstance.modifySubAccountApiKeyPermission(modifySubAccountApiKeyPermissionRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApiManagementApi#modifySubAccountApiKeyPermission"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **modifySubAccountApiKeyPermissionRequest** | [**ModifySubAccountApiKeyPermissionRequest**](ModifySubAccountApiKeyPermissionRequest.md)| | | + +### Return type + +[**ModifySubAccountApiKeyPermissionResponse**](ModifySubAccountApiKeyPermissionResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Modify Sub-account API Key Permission | - | + + +# **querySubAccountApiKey** +> QuerySubAccountApiKeyResponse querySubAccountApiKey(email, subAccountApiKey, page, size, recvWindow) + +Query Sub-account API Key (For Master Account) (USER_DATA) + +Query the API Key list of a sub-account. Weight(UID): 3000 Security Type: USER_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.sub_account.ApiClient; +import com.binance.connector.client.sub_account.ApiException; +import com.binance.connector.client.sub_account.Configuration; +import com.binance.connector.client.sub_account.models.*; +import com.binance.connector.client.sub_account.rest.api.ApiManagementApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + ApiManagementApi apiInstance = new ApiManagementApi(defaultClient); + String email = "123@test.com"; // String | Sub-account email + String subAccountApiKey = "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf"; // String | Specify an API Key for exact match + Long page = 1L; // Long | Page number, default 1, minimum 1 + Long size = 30L; // Long | Page size, default 30, maximum 100 + Long recvWindow = 5000L; // Long | + try { + QuerySubAccountApiKeyResponse result = apiInstance.querySubAccountApiKey(email, subAccountApiKey, page, size, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApiManagementApi#querySubAccountApiKey"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **email** | **String**| Sub-account email | | +| **subAccountApiKey** | **String**| Specify an API Key for exact match | [optional] | +| **page** | **Long**| Page number, default 1, minimum 1 | [optional] | +| **size** | **Long**| Page size, default 30, maximum 100 | [optional] | +| **recvWindow** | **Long**| | [optional] | + +### Return type + +[**QuerySubAccountApiKeyResponse**](QuerySubAccountApiKeyResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Query Sub-account API Key | - | + diff --git a/clients/sub-account/docs/AssetManagementApi.md b/clients/sub-account/docs/AssetManagementApi.md index 3d4d5fbac..5ce65cf58 100644 --- a/clients/sub-account/docs/AssetManagementApi.md +++ b/clients/sub-account/docs/AssetManagementApi.md @@ -17,7 +17,7 @@ All URIs are relative to *https://api.binance.com* | [**marginTransferForSubAccount**](AssetManagementApi.md#marginTransferForSubAccount) | **POST** /sapi/v1/sub-account/margin/transfer | Margin Transfer for Sub-account (For Master Account) (USER_DATA) | | [**movePositionForSubAccount**](AssetManagementApi.md#movePositionForSubAccount) | **POST** /sapi/v1/sub-account/futures/move-position | Move Position for Sub-account (For Master Account) (USER_DATA) | | [**querySubAccountAssets**](AssetManagementApi.md#querySubAccountAssets) | **GET** /sapi/v3/sub-account/assets | Query Sub-account Assets (For Master Account) (USER_DATA) | -| [**querySubAccountAssetsAssetManagement**](AssetManagementApi.md#querySubAccountAssetsAssetManagement) | **GET** /sapi/v4/sub-account/assets | Query Sub-account Assets (For Master Account) (USER_DATA) | +| [**querySubAccountAssetsAssetManagement**](AssetManagementApi.md#querySubAccountAssetsAssetManagement) | **GET** /sapi/v4/sub-account/assets | Query Sub-account Assets V4 (For Master Account) (USER_DATA) | | [**querySubAccountFuturesAssetTransferHistory**](AssetManagementApi.md#querySubAccountFuturesAssetTransferHistory) | **GET** /sapi/v1/sub-account/futures/internalTransfer | Query Sub-account Futures Asset Transfer History (For Master Account) (USER_DATA) | | [**querySubAccountSpotAssetTransferHistory**](AssetManagementApi.md#querySubAccountSpotAssetTransferHistory) | **GET** /sapi/v1/sub-account/sub/transfer/history | Query Sub-account Spot Asset Transfer History (For Master Account) (USER_DATA) | | [**querySubAccountSpotAssetsSummary**](AssetManagementApi.md#querySubAccountSpotAssetsSummary) | **GET** /sapi/v1/sub-account/spotSummary | Query Sub-account Spot Assets Summary (For Master Account) (USER_DATA) | @@ -35,7 +35,7 @@ All URIs are relative to *https://api.binance.com* Futures Transfer for Sub-account (For Master Account) (USER_DATA) -Futures Transfer for Sub-account * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight: 1 +Futures Transfer for Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. ### Example ```java @@ -97,7 +97,7 @@ No authorization required Get Detail on Sub-account's Futures Account (For Master Account) (USER_DATA) -Get Detail on Sub-account's Futures Account Weight: 10 +Get Detail on Sub-account's Futures Account Weight(IP): 10 Security Type: USER_DATA ### Example ```java @@ -114,8 +114,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - Long recvWindow = 56L; // Long | + String email = "123@test.com"; // String | + Long recvWindow = 5000L; // Long | try { GetDetailOnSubAccountsFuturesAccountResponse result = apiInstance.getDetailOnSubAccountsFuturesAccount(email, recvWindow); System.out.println(result); @@ -134,7 +134,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | +| **email** | **String**| | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -161,7 +161,7 @@ No authorization required Get Detail on Sub-account's Futures Account V2 (For Master Account) (USER_DATA) -Get Detail on Sub-account's Futures Account Weight: 1 +Get Detail on Sub-account's Futures Account Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -178,9 +178,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - Long futuresType = 56L; // Long | 1:USDT-margined Futures,2: Coin-margined Futures - Long recvWindow = 56L; // Long | + String email = "123@test.com"; // String | + Long futuresType = 1L; // Long | 1:USDT-margined Futures,2: Coin-margined Futures + Long recvWindow = 5000L; // Long | try { GetDetailOnSubAccountsFuturesAccountV2Response result = apiInstance.getDetailOnSubAccountsFuturesAccountV2(email, futuresType, recvWindow); System.out.println(result); @@ -199,7 +199,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | +| **email** | **String**| | | | **futuresType** | **Long**| 1:USDT-margined Futures,2: Coin-margined Futures | | | **recvWindow** | **Long**| | [optional] | @@ -227,7 +227,7 @@ No authorization required Get Detail on Sub-account's Margin Account (For Master Account) (USER_DATA) -Get Detail on Sub-account's Margin Account Weight: 10 +Get Detail on Sub-account's Margin Account Weight(IP): 10 Security Type: USER_DATA ### Example ```java @@ -244,8 +244,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - Long recvWindow = 56L; // Long | + String email = "123@test.com"; // String | + Long recvWindow = 5000L; // Long | try { GetDetailOnSubAccountsMarginAccountResponse result = apiInstance.getDetailOnSubAccountsMarginAccount(email, recvWindow); System.out.println(result); @@ -264,7 +264,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | +| **email** | **String**| | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -287,11 +287,11 @@ No authorization required # **getMovePositionHistoryForSubAccount** -> GetMovePositionHistoryForSubAccountResponse getMovePositionHistoryForSubAccount(symbol, page, row, startTime, endTime, recvWindow) +> GetMovePositionHistoryForSubAccountResponse getMovePositionHistoryForSubAccount(symbol, page, rows, startTime, endTime, recvWindow) Get Move Position History for Sub-account (For Master Account) (USER_DATA) -Query move position history * If `startTime` and `endTime` not sent, return records of the last 90 days by default with 1000 maximum limits * If `startTime` is sent and `endTime` is not sent, return records of [max(startTime, now-90d), now]. * If `startTime` is not sent and `endTime` is sent, return records of [max(now,endTime-90d), endTime]. Weight: 1 +Query move position history Weight(IP): 1 Security Type: USER_DATA Notes: - If `startTime` and `endTime` are both omitted, records from the last 90 days are returned by default (up to 1000 records). - If `startTime` is sent and `endTime` is omitted, records in `[max(startTime, now-90d), now]` are returned. - If `startTime` is omitted and `endTime` is sent, records in `[max(now, endTime-90d), endTime]` are returned. ### Example ```java @@ -308,14 +308,14 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); - String symbol = "symbol_example"; // String | - Long page = 56L; // Long | Page - Long row = 56L; // Long | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long recvWindow = 56L; // Long | + String symbol = "BTCUSDT"; // String | + Long page = 1L; // Long | + Long rows = 1L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long recvWindow = 5000L; // Long | try { - GetMovePositionHistoryForSubAccountResponse result = apiInstance.getMovePositionHistoryForSubAccount(symbol, page, row, startTime, endTime, recvWindow); + GetMovePositionHistoryForSubAccountResponse result = apiInstance.getMovePositionHistoryForSubAccount(symbol, page, rows, startTime, endTime, recvWindow); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AssetManagementApi#getMovePositionHistoryForSubAccount"); @@ -333,8 +333,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **symbol** | **String**| | | -| **page** | **Long**| Page | | -| **row** | **Long**| | | +| **page** | **Long**| | | +| **rows** | **Long**| | | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | @@ -363,7 +363,7 @@ No authorization required Get Sub-account Deposit Address (For Master Account) (USER_DATA) -Fetch sub-account deposit address * `amount` needs to be sent if using LIGHTNING network Weight: 1 +Fetch sub-account deposit address Weight(IP): 1 Security Type: USER_DATA Notes: - `amount` needs to be sent if using LIGHTNING network ### Example ```java @@ -380,11 +380,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - String coin = "coin_example"; // String | + String email = "123@test.com"; // String | + String coin = "BTC"; // String | String network = "network_example"; // String | networks can be found in `GET /sapi/v1/capital/deposit/address` - Double amount = 3.4D; // Double | - Long recvWindow = 56L; // Long | + Double amount = 1.0D; // Double | + Long recvWindow = 5000L; // Long | try { GetSubAccountDepositAddressResponse result = apiInstance.getSubAccountDepositAddress(email, coin, network, amount, recvWindow); System.out.println(result); @@ -403,7 +403,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | +| **email** | **String**| | | | **coin** | **String**| | | | **network** | **String**| networks can be found in `GET /sapi/v1/capital/deposit/address` | [optional] | | **amount** | **Double**| | [optional] | @@ -429,11 +429,11 @@ No authorization required # **getSubAccountDepositHistory** -> GetSubAccountDepositHistoryResponse getSubAccountDepositHistory(email, coin, status, startTime, endTime, limit, offset, recvWindow, txId) +> GetSubAccountDepositHistoryResponse getSubAccountDepositHistory(email, includeSource, coin, status, startTime, endTime, limit, offset, recvWindow, txId) Get Sub-account Deposit History (For Master Account) (USER_DATA) -Fetch sub-account deposit history Weight: 1 +Fetch sub-account deposit history Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -450,17 +450,18 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - String coin = "coin_example"; // String | - Long status = 56L; // Long | 0(0:pending,6: credited but cannot withdraw,7:Wrong Deposit,8:Waiting User confirm,1:success) - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | Default value: 1, Max value: 200 - Long offset = 56L; // Long | default:0 - Long recvWindow = 56L; // Long | - String txId = "txId_example"; // String | + String email = "123@test.com"; // String | + Boolean includeSource = false; // Boolean | Default `false`, return `sourceAddress` field when set to `true` + String coin = "BTC"; // String | + Long status = 0L; // Long | Deposit status: 0=pending, 6=credited but cannot withdraw, 7=wrong deposit, 8=waiting user confirmation, 1=success. + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long limit = 1L; // Long | + Long offset = 0L; // Long | + Long recvWindow = 5000L; // Long | + String txId = "1"; // String | try { - GetSubAccountDepositHistoryResponse result = apiInstance.getSubAccountDepositHistory(email, coin, status, startTime, endTime, limit, offset, recvWindow, txId); + GetSubAccountDepositHistoryResponse result = apiInstance.getSubAccountDepositHistory(email, includeSource, coin, status, startTime, endTime, limit, offset, recvWindow, txId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AssetManagementApi#getSubAccountDepositHistory"); @@ -477,13 +478,14 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | +| **email** | **String**| | | +| **includeSource** | **Boolean**| Default `false`, return `sourceAddress` field when set to `true` | [optional] | | **coin** | **String**| | [optional] | -| **status** | **Long**| 0(0:pending,6: credited but cannot withdraw,7:Wrong Deposit,8:Waiting User confirm,1:success) | [optional] | +| **status** | **Long**| Deposit status: 0=pending, 6=credited but cannot withdraw, 7=wrong deposit, 8=waiting user confirmation, 1=success. | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **limit** | **Long**| Default value: 1, Max value: 200 | [optional] | -| **offset** | **Long**| default:0 | [optional] | +| **limit** | **Long**| | [optional] | +| **offset** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | | **txId** | **String**| | [optional] | @@ -511,7 +513,7 @@ No authorization required Get Summary of Sub-account's Futures Account (For Master Account) (USER_DATA) -Get Summary of Sub-account's Futures Account Weight: 1 +Get Summary of Sub-account's Futures Account Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -528,9 +530,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); - Long page = 56L; // Long | Page - Long limit = 56L; // Long | Limit (Max: 500) - Long recvWindow = 56L; // Long | + Long page = 1L; // Long | + Long limit = 1L; // Long | + Long recvWindow = 5000L; // Long | try { GetSummaryOfSubAccountsFuturesAccountResponse result = apiInstance.getSummaryOfSubAccountsFuturesAccount(page, limit, recvWindow); System.out.println(result); @@ -549,8 +551,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **page** | **Long**| Page | | -| **limit** | **Long**| Limit (Max: 500) | | +| **page** | **Long**| | | +| **limit** | **Long**| | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -577,7 +579,7 @@ No authorization required Get Summary of Sub-account's Futures Account V2 (For Master Account) (USER_DATA) -Get Summary of Sub-account's Futures Account Weight: 10 +Get Summary of Sub-account's Futures Account Weight(IP): 10 Security Type: USER_DATA ### Example ```java @@ -594,10 +596,10 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); - Long futuresType = 56L; // Long | 1:USDT-margined Futures,2: Coin-margined Futures - Long page = 56L; // Long | Default value: 1 - Long limit = 56L; // Long | Default value: 1, Max value: 200 - Long recvWindow = 56L; // Long | + Long futuresType = 1L; // Long | 1:USDT-margined Futures,2: Coin-margined Futures + Long page = 1L; // Long | + Long limit = 10L; // Long | + Long recvWindow = 5000L; // Long | try { GetSummaryOfSubAccountsFuturesAccountV2Response result = apiInstance.getSummaryOfSubAccountsFuturesAccountV2(futuresType, page, limit, recvWindow); System.out.println(result); @@ -617,8 +619,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **futuresType** | **Long**| 1:USDT-margined Futures,2: Coin-margined Futures | | -| **page** | **Long**| Default value: 1 | [optional] | -| **limit** | **Long**| Default value: 1, Max value: 200 | [optional] | +| **page** | **Long**| | [optional] | +| **limit** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -645,7 +647,7 @@ No authorization required Get Summary of Sub-account's Margin Account (For Master Account) (USER_DATA) -Get Summary of Sub-account's Margin Account Weight: 10 +Get Summary of Sub-account's Margin Account Weight(IP): 10 Security Type: USER_DATA ### Example ```java @@ -662,7 +664,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { GetSummaryOfSubAccountsMarginAccountResponse result = apiInstance.getSummaryOfSubAccountsMarginAccount(recvWindow); System.out.println(result); @@ -707,7 +709,7 @@ No authorization required Margin Transfer for Sub-account (For Master Account) (USER_DATA) -Margin Transfer for Sub-account * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight: 1 +Margin Transfer for Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. ### Example ```java @@ -769,7 +771,7 @@ No authorization required Move Position for Sub-account (For Master Account) (USER_DATA) -Move position between sub-master, master-sub, or sub-sub accounts when necessary * You need to Enable Trading permission for the API Key which requests this endpoint. * This function only support VIP level 7-9. * Only master account can use the function * Quantity should be positive number only * The function support normal account, PM PRO and PM PRO SPAN. * Only support for from account has positions * For all orders in the same orderArgs request, if any symbol’s total close position quantity is bigger than the symbol’s current position quantity, all batch orders in the same list will fail simultaneously. * Only support cross margin mode * The price for move position is MarkPrice only. * Not support for MSA. * Not support for the symbol under Reduce-Only. Weight: 1 +Move position between sub-master, master-sub, or sub-sub accounts when necessary Weight(IP): 1 Security Type: USER_DATA Notes: - You need to enable the `Trading` permission for the API key used to call this endpoint. - This function is only available for VIP levels 7-9. - Only master accounts can call this endpoint. - `quantity` must be a positive number. - Supported account types: normal account, PM PRO, PM PRO SPAN, and PM Retail. - The source account must have positions. - For orders in the same `orderArgs` request, if any symbol's total close position quantity exceeds current position quantity, all orders in that batch fail. - Only cross margin mode is supported. - The move position price supports `MARK_PRICE` only. - MSA is not supported. - Symbols configured with `Reduce-Only` are not supported. ### Example ```java @@ -831,7 +833,7 @@ No authorization required Query Sub-account Assets (For Master Account) (USER_DATA) -Fetch sub-account assets Weight: 60 +Fetch sub-account assets Weight(UID): 60 Security Type: USER_DATA ### Example ```java @@ -848,8 +850,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - Long recvWindow = 56L; // Long | + String email = "123@test.com"; // String | + Long recvWindow = 5000L; // Long | try { QuerySubAccountAssetsResponse result = apiInstance.querySubAccountAssets(email, recvWindow); System.out.println(result); @@ -868,7 +870,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | +| **email** | **String**| | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -893,9 +895,9 @@ No authorization required # **querySubAccountAssetsAssetManagement** > QuerySubAccountAssetsAssetManagementResponse querySubAccountAssetsAssetManagement(email, recvWindow) -Query Sub-account Assets (For Master Account) (USER_DATA) +Query Sub-account Assets V4 (For Master Account) (USER_DATA) -Fetch sub-account assets Weight: 60 +Fetch sub-account assets Weight(UID): 60 Security Type: USER_DATA ### Example ```java @@ -912,8 +914,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - Long recvWindow = 56L; // Long | + String email = "123@test.com"; // String | + Long recvWindow = 5000L; // Long | try { QuerySubAccountAssetsAssetManagementResponse result = apiInstance.querySubAccountAssetsAssetManagement(email, recvWindow); System.out.println(result); @@ -932,7 +934,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | +| **email** | **String**| | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -959,7 +961,7 @@ No authorization required Query Sub-account Futures Asset Transfer History (For Master Account) (USER_DATA) -Query Sub-account Futures Asset Transfer History Weight: 1 +Query Sub-account Futures Asset Transfer History Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -976,13 +978,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - Long futuresType = 56L; // Long | 1:USDT-margined Futures,2: Coin-margined Futures - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long page = 56L; // Long | Default value: 1 - Long limit = 56L; // Long | Default value: 1, Max value: 200 - Long recvWindow = 56L; // Long | + String email = "123@test.com"; // String | + Long futuresType = 1L; // Long | 1:USDT-margined Futures,2: Coin-margined Futures + Long startTime = 1623319461670L; // Long | Cannot be earlier than 1 month ago + Long endTime = 1641782889000L; // Long | + Long page = 1L; // Long | + Long limit = 10L; // Long | + Long recvWindow = 5000L; // Long | try { QuerySubAccountFuturesAssetTransferHistoryResponse result = apiInstance.querySubAccountFuturesAssetTransferHistory(email, futuresType, startTime, endTime, page, limit, recvWindow); System.out.println(result); @@ -1001,12 +1003,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | +| **email** | **String**| | | | **futuresType** | **Long**| 1:USDT-margined Futures,2: Coin-margined Futures | | -| **startTime** | **Long**| | [optional] | +| **startTime** | **Long**| Cannot be earlier than 1 month ago | [optional] | | **endTime** | **Long**| | [optional] | -| **page** | **Long**| Default value: 1 | [optional] | -| **limit** | **Long**| Default value: 1, Max value: 200 | [optional] | +| **page** | **Long**| | [optional] | +| **limit** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -1033,7 +1035,7 @@ No authorization required Query Sub-account Spot Asset Transfer History (For Master Account) (USER_DATA) -Query Sub-account Spot Asset Transfer History * fromEmail and toEmail cannot be sent at the same time. * Return fromEmail equal master account email by default. Weight: 1 +Query Sub-account Spot Asset Transfer History Weight(IP): 1 Security Type: USER_DATA Notes: - `fromEmail` and `toEmail` cannot be sent at the same time. - If both `fromEmail` and `toEmail` are omitted, records with `fromEmail` equal to the master account are returned by default. ### Example ```java @@ -1050,13 +1052,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); - String fromEmail = "fromEmail_example"; // String | - String toEmail = "toEmail_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long page = 56L; // Long | Default value: 1 - Long limit = 56L; // Long | Default value: 1, Max value: 200 - Long recvWindow = 56L; // Long | + String fromEmail = "aaa@test.com"; // String | + String toEmail = "bbb@test.com"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long page = 1L; // Long | + Long limit = 10L; // Long | + Long recvWindow = 5000L; // Long | try { QuerySubAccountSpotAssetTransferHistoryResponse result = apiInstance.querySubAccountSpotAssetTransferHistory(fromEmail, toEmail, startTime, endTime, page, limit, recvWindow); System.out.println(result); @@ -1079,8 +1081,8 @@ public class Example { | **toEmail** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **page** | **Long**| Default value: 1 | [optional] | -| **limit** | **Long**| Default value: 1, Max value: 200 | [optional] | +| **page** | **Long**| | [optional] | +| **limit** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -1107,7 +1109,7 @@ No authorization required Query Sub-account Spot Assets Summary (For Master Account) (USER_DATA) -Get BTC valued asset summary of subaccounts. Weight: 1 +Get BTC valued asset summary of subaccounts. Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -1124,10 +1126,10 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); - String email = "email_example"; // String | Managed sub-account email - Long page = 56L; // Long | Default value: 1 - Long size = 56L; // Long | default 10, max 20 - Long recvWindow = 56L; // Long | + String email = "123@test.com"; // String | Managed sub-account email + Long page = 1L; // Long | + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | try { QuerySubAccountSpotAssetsSummaryResponse result = apiInstance.querySubAccountSpotAssetsSummary(email, page, size, recvWindow); System.out.println(result); @@ -1147,8 +1149,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **email** | **String**| Managed sub-account email | [optional] | -| **page** | **Long**| Default value: 1 | [optional] | -| **size** | **Long**| default 10, max 20 | [optional] | +| **page** | **Long**| | [optional] | +| **size** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -1175,7 +1177,7 @@ No authorization required Query Universal Transfer History (For Master Account) (USER_DATA) -Query Universal Transfer History * fromEmail and toEmail cannot be sent at the same time. * Return fromEmail equal master account email by default. * The query time period must be less than 7 days. * If startTime and endTime not sent, return records of the last 7 days by default. Weight: 1 +Query Universal Transfer History Weight(IP): 1 Security Type: USER_DATA Notes: - `fromEmail` and `toEmail` cannot be sent at the same time. - If both `fromEmail` and `toEmail` are omitted, records with `fromEmail` equal to the master account are returned by default. - The query time range must be less than 7 days. - If `startTime` and `endTime` are omitted, records from the last 7 days are returned by default. ### Example ```java @@ -1192,14 +1194,14 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); - String fromEmail = "fromEmail_example"; // String | - String toEmail = "toEmail_example"; // String | - String clientTranId = "clientTranId_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long page = 56L; // Long | Default value: 1 - Long limit = 56L; // Long | Default value: 1, Max value: 200 - Long recvWindow = 56L; // Long | + String fromEmail = "abctest@gmail.com"; // String | + String toEmail = "deftest@gmail.com"; // String | + String clientTranId = "1"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long page = 1L; // Long | + Long limit = 10L; // Long | + Long recvWindow = 5000L; // Long | try { QueryUniversalTransferHistoryResponse result = apiInstance.queryUniversalTransferHistory(fromEmail, toEmail, clientTranId, startTime, endTime, page, limit, recvWindow); System.out.println(result); @@ -1223,8 +1225,8 @@ public class Example { | **clientTranId** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **page** | **Long**| Default value: 1 | [optional] | -| **limit** | **Long**| Default value: 1, Max value: 200 | [optional] | +| **page** | **Long**| | [optional] | +| **limit** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -1251,7 +1253,7 @@ No authorization required Sub-account Futures Asset Transfer (For Master Account) (USER_DATA) -Sub-account Futures Asset Transfer * Master account can transfer max 2000 times a minute * There must be sufficient margin balance in futures wallet to execute transferring. Weight: 1 +Sub-account Futures Asset Transfer Weight(IP): 1 Security Type: USER_DATA Notes: - A master account can transfer at most 2000 times per minute. - The futures wallet must have sufficient margin balance to execute the transfer. ### Example ```java @@ -1313,7 +1315,7 @@ No authorization required Sub-account Transfer History (For Sub-account) (USER_DATA) -Sub-account Transfer History * If type is not sent, the records of type 2: transfer out will be returned by default. * If startTime and endTime are not sent, the recent 30-day data will be returned. Weight: 1 +Sub-account Transfer History Weight(IP): 1 Security Type: USER_DATA Notes: - If `type` is not sent, records of type `2` (transfer out) are returned by default. - If `startTime` and `endTime` are not sent, data from the most recent 30 days is returned. ### Example ```java @@ -1330,13 +1332,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); - String asset = "asset_example"; // String | If not sent, result of all assets will be returned - Long type = 56L; // Long | 1: transfer in, 2: transfer out - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | Default value: 1, Max value: 200 - Boolean returnFailHistory = true; // Boolean | Default `False`, return PROCESS and SUCCESS status history; If `True`,return PROCESS and SUCCESS and FAILURE status history - Long recvWindow = 56L; // Long | + String asset = "BTC"; // String | If not sent, result of all assets will be returned + Long type = 1L; // Long | 1: transfer in, 2: transfer out + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long limit = 10L; // Long | + Boolean returnFailHistory = false; // Boolean | Default `False`, return PROCESS and SUCCESS status history; If `True`,return PROCESS and SUCCESS and FAILURE status history + Long recvWindow = 5000L; // Long | try { SubAccountTransferHistoryResponse result = apiInstance.subAccountTransferHistory(asset, type, startTime, endTime, limit, returnFailHistory, recvWindow); System.out.println(result); @@ -1359,7 +1361,7 @@ public class Example { | **type** | **Long**| 1: transfer in, 2: transfer out | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **limit** | **Long**| Default value: 1, Max value: 200 | [optional] | +| **limit** | **Long**| | [optional] | | **returnFailHistory** | **Boolean**| Default `False`, return PROCESS and SUCCESS status history; If `True`,return PROCESS and SUCCESS and FAILURE status history | [optional] | | **recvWindow** | **Long**| | [optional] | @@ -1387,7 +1389,7 @@ No authorization required Transfer to Master (For Sub-account) (USER_DATA) -Transfer to Master * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight: 1 +Transfer to Master Weight(IP): 1 Security Type: USER_DATA Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. ### Example ```java @@ -1449,7 +1451,7 @@ No authorization required Transfer to Sub-account of Same Master (For Sub-account) (USER_DATA) -Transfer to Sub-account of Same Master * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight: 1 +Transfer to Sub-account of Same Master Weight(IP): 1 Security Type: USER_DATA Notes: - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. ### Example ```java @@ -1511,7 +1513,7 @@ No authorization required Universal Transfer (For Master Account) (USER_DATA) -Universal Transfer * You need to enable \"internal transfer\" option for the api key which requests this endpoint. * Transfer from master account by default if fromEmail is not sent. * Transfer to master account by default if toEmail is not sent. * At least either fromEmail or toEmail need to be sent when the fromAccountType and the toAccountType are the same. * Supported transfer scenarios: * `SPOT` transfer to `SPOT`, `USDT_FUTURE`, `COIN_FUTURE` (regardless of master or sub) * `SPOT`, `USDT_FUTURE`, `COIN_FUTURE` transfer to `SPOT` (regardless of master or sub) * Master account `SPOT` transfer to sub-account `MARGIN(Cross)`, `ISOLATED_MARGIN` * Sub-account `MARGIN(Cross)`, `ISOLATED_MARGIN` transfer to master account `SPOT` * Sub-account `MARGIN(Cross)` transfer to Sub-account `MARGIN(Cross)` * `ALPHA` to `ALPHA` (regardless of master or sub) Weight: 360 +Universal Transfer Weight(IP): 1 Weight(UID): 360 Security Type: USER_DATA Notes: - You need to enable the `internal transfer` option for the API key used to call this endpoint. - If `fromEmail` is not sent, transfer out from the master account by default. - If `toEmail` is not sent, transfer into the master account by default. - When `fromAccountType` and `toAccountType` are the same, at least one of `fromEmail` or `toEmail` must be sent. - Supported transfer scenarios: - `SPOT` -> `SPOT` / `USDT_FUTURE` / `COIN_FUTURE` (master or sub-account). - `SPOT` / `USDT_FUTURE` / `COIN_FUTURE` -> `SPOT` (master or sub-account). - Master account `SPOT` -> sub-account `MARGIN(Cross)` / `ISOLATED_MARGIN`. - Sub-account `MARGIN(Cross)` / `ISOLATED_MARGIN` -> master account `SPOT`. - Sub-account `MARGIN(Cross)` -> sub-account `MARGIN(Cross)`. - `ALPHA` -> `ALPHA` (master or sub-account). ### Example ```java diff --git a/clients/sub-account/docs/CreateAVirtualSubAccountRequest.md b/clients/sub-account/docs/CreateAVirtualSubAccountRequest.md index f72e61ddc..a15ebb8c7 100644 --- a/clients/sub-account/docs/CreateAVirtualSubAccountRequest.md +++ b/clients/sub-account/docs/CreateAVirtualSubAccountRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**subAccountString** | **String** | | | +|**subAccountString** | **String** | Please input a string. We will create a virtual email using that string for you to register | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/sub-account/docs/CreateSubAccountApiKeyRequest.md b/clients/sub-account/docs/CreateSubAccountApiKeyRequest.md new file mode 100644 index 000000000..c2136c33f --- /dev/null +++ b/clients/sub-account/docs/CreateSubAccountApiKeyRequest.md @@ -0,0 +1,24 @@ + + +# CreateSubAccountApiKeyRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**email** | **String** | Sub-account email | | +|**apiName** | **String** | API Key name | | +|**status** | **Long** | IP restriction status. 1 = unrestricted, 2 = restricted to trusted IPs, 3 = third-party IP restriction | | +|**canTrade** | **Boolean** | Spot & Margin trading permission, default false | [optional] | +|**canMarginLoanRepay** | **Boolean** | Margin borrow/repay permission, default false | [optional] | +|**canFuturesTrade** | **Boolean** | Futures trading permission, default false | [optional] | +|**canUniversalTransfer** | **Boolean** | Universal transfer permission, default false | [optional] | +|**canVanillaOptions** | **Boolean** | Vanilla options permission, default false | [optional] | +|**ipAddress** | **String** | Required when status=2. IP address list, max 500 chars | [optional] | +|**thirdPartyName** | **String** | Required when status=3. Third-party name | [optional] | +|**publicKey** | **String** | Ed25519 public key (optional, for Ed25519 type API Key) | [optional] | +|**recvWindow** | **Long** | | [optional] | + + + diff --git a/clients/sub-account/docs/CreateSubAccountApiKeyResponse.md b/clients/sub-account/docs/CreateSubAccountApiKeyResponse.md new file mode 100644 index 000000000..1a77adce4 --- /dev/null +++ b/clients/sub-account/docs/CreateSubAccountApiKeyResponse.md @@ -0,0 +1,22 @@ + + +# CreateSubAccountApiKeyResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**apiName** | **String** | | [optional] | +|**apiKey** | **String** | | [optional] | +|**secretKey** | **String** | Secret Key. Returned only once on creation, please keep it safe. | [optional] | +|**canTrade** | **Boolean** | | [optional] | +|**canMarginLoanRepay** | **Boolean** | | [optional] | +|**canFuturesTrade** | **Boolean** | | [optional] | +|**canUniversalTransfer** | **Boolean** | | [optional] | +|**canVanillaOptions** | **Boolean** | | [optional] | +|**status** | **Long** | | [optional] | +|**ipList** | **List<String>** | | [optional] | + + + diff --git a/clients/sub-account/docs/DeleteIpListForASubAccountApiKeyResponse.md b/clients/sub-account/docs/DeleteIPListForASubAccountAPIKeyResponse.md similarity index 100% rename from clients/sub-account/docs/DeleteIpListForASubAccountApiKeyResponse.md rename to clients/sub-account/docs/DeleteIPListForASubAccountAPIKeyResponse.md diff --git a/clients/sub-account/docs/FromAccountType.md b/clients/sub-account/docs/FromAccountType.md new file mode 100644 index 000000000..4c76e57de --- /dev/null +++ b/clients/sub-account/docs/FromAccountType.md @@ -0,0 +1,19 @@ + + +# FromAccountType + +## Enum + + +* `SPOT` (value: `"SPOT"`) + +* `USDT_FUTURE` (value: `"USDT_FUTURE"`) + +* `COIN_FUTURE` (value: `"COIN_FUTURE"`) + +* `MARGIN` (value: `"MARGIN"`) + +* `ISOLATED_MARGIN` (value: `"ISOLATED_MARGIN"`) + + + diff --git a/clients/sub-account/docs/FuturesTransferForSubAccountRequest.md b/clients/sub-account/docs/FuturesTransferForSubAccountRequest.md index cf45e83dc..70aabdf45 100644 --- a/clients/sub-account/docs/FuturesTransferForSubAccountRequest.md +++ b/clients/sub-account/docs/FuturesTransferForSubAccountRequest.md @@ -8,9 +8,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**email** | **String** | | | -|**asset** | **String** | | | -|**amount** | **Double** | | | -|**type** | **Long** | | | +|**asset** | **String** | The asset being transferred | | +|**amount** | **Double** | The amount to be transferred | | +|**type** | **Long** | 1: transfer from subaccount's spot account to its USDT-margined futures account 2: transfer from subaccount's USDT-margined futures account to its spot account 3: transfer from subaccount's spot account to its COIN-margined futures account 4:transfer from subaccount's COIN-margined futures account to its spot account | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/sub-account/docs/GetDetailOnSubAccountsFuturesAccountResponse.md b/clients/sub-account/docs/GetDetailOnSubAccountsFuturesAccountResponse.md index a6cffb1a8..5981ec5a2 100644 --- a/clients/sub-account/docs/GetDetailOnSubAccountsFuturesAccountResponse.md +++ b/clients/sub-account/docs/GetDetailOnSubAccountsFuturesAccountResponse.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**email** | **String** | | [optional] | |**asset** | **String** | | [optional] | -|**assets** | [**List<GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner>**](GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner.md) | | [optional] | +|**assets** | [**List<GetDetailOnSubAccountsFuturesAccountResponseAssetsInner>**](GetDetailOnSubAccountsFuturesAccountResponseAssetsInner.md) | | [optional] | |**canDeposit** | **Boolean** | | [optional] | |**canTrade** | **Boolean** | | [optional] | |**canWithdraw** | **Boolean** | | [optional] | diff --git a/clients/sub-account/docs/GetDetailOnSubAccountsFuturesAccountResponseAssetsInner.md b/clients/sub-account/docs/GetDetailOnSubAccountsFuturesAccountResponseAssetsInner.md new file mode 100644 index 000000000..155bd8500 --- /dev/null +++ b/clients/sub-account/docs/GetDetailOnSubAccountsFuturesAccountResponseAssetsInner.md @@ -0,0 +1,21 @@ + + +# GetDetailOnSubAccountsFuturesAccountResponseAssetsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**asset** | **String** | | [optional] | +|**initialMargin** | **String** | | [optional] | +|**maintenanceMargin** | **String** | | [optional] | +|**marginBalance** | **String** | | [optional] | +|**maxWithdrawAmount** | **String** | | [optional] | +|**openOrderInitialMargin** | **String** | | [optional] | +|**positionInitialMargin** | **String** | | [optional] | +|**unrealizedProfit** | **String** | | [optional] | +|**walletBalance** | **String** | | [optional] | + + + diff --git a/clients/sub-account/docs/GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp.md b/clients/sub-account/docs/GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp.md index afe3e21a3..22c92ce4d 100644 --- a/clients/sub-account/docs/GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp.md +++ b/clients/sub-account/docs/GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**email** | **String** | | [optional] | -|**assets** | [**List<GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner>**](GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner.md) | | [optional] | +|**assets** | [**List<GetDetailOnSubAccountsFuturesAccountResponseAssetsInner>**](GetDetailOnSubAccountsFuturesAccountResponseAssetsInner.md) | | [optional] | |**canDeposit** | **Boolean** | | [optional] | |**canTrade** | **Boolean** | | [optional] | |**canWithdraw** | **Boolean** | | [optional] | diff --git a/clients/sub-account/docs/GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner.md b/clients/sub-account/docs/GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner.md deleted file mode 100644 index fd8ebc3ad..000000000 --- a/clients/sub-account/docs/GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**initialMargin** | **String** | | [optional] | -|**maintenanceMargin** | **String** | | [optional] | -|**marginBalance** | **String** | | [optional] | -|**maxWithdrawAmount** | **String** | | [optional] | -|**openOrderInitialMargin** | **String** | | [optional] | -|**positionInitialMargin** | **String** | | [optional] | -|**unrealizedProfit** | **String** | | [optional] | -|**walletBalance** | **String** | | [optional] | - - - diff --git a/clients/sub-account/docs/GetFuturesPositionRiskOfSubAccountResponseInner.md b/clients/sub-account/docs/GetFuturesPositionRiskOfSubAccountResponseInner.md new file mode 100644 index 000000000..ed3197a8d --- /dev/null +++ b/clients/sub-account/docs/GetFuturesPositionRiskOfSubAccountResponseInner.md @@ -0,0 +1,20 @@ + + +# GetFuturesPositionRiskOfSubAccountResponseInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**entryPrice** | **String** | | [optional] | +|**leverage** | **String** | | [optional] | +|**maxNotional** | **String** | | [optional] | +|**liquidationPrice** | **String** | | [optional] | +|**markPrice** | **String** | | [optional] | +|**positionAmount** | **String** | | [optional] | +|**symbol** | **String** | | [optional] | +|**unrealizedProfit** | **String** | | [optional] | + + + diff --git a/clients/sub-account/docs/GetFuturesPositionRiskOfSubAccountV2Response.md b/clients/sub-account/docs/GetFuturesPositionRiskOfSubAccountV2Response.md index f400e60bb..d80e7d3b0 100644 --- a/clients/sub-account/docs/GetFuturesPositionRiskOfSubAccountV2Response.md +++ b/clients/sub-account/docs/GetFuturesPositionRiskOfSubAccountV2Response.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**futurePositionRiskVos** | [**List<GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner>**](GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner.md) | | [optional] | +|**futurePositionRiskVos** | [**List<GetFuturesPositionRiskOfSubAccountResponseInner>**](GetFuturesPositionRiskOfSubAccountResponseInner.md) | | [optional] | |**deliveryPositionRiskVos** | [**List<GetFuturesPositionRiskOfSubAccountV2ResponseDeliveryPositionRiskVosInner>**](GetFuturesPositionRiskOfSubAccountV2ResponseDeliveryPositionRiskVosInner.md) | | [optional] | diff --git a/clients/sub-account/docs/GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner.md b/clients/sub-account/docs/GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner.md deleted file mode 100644 index 649cae347..000000000 --- a/clients/sub-account/docs/GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**entryPrice** | **String** | | [optional] | -|**leverage** | **String** | | [optional] | -|**maxNotional** | **String** | | [optional] | -|**liquidationPrice** | **String** | | [optional] | -|**markPrice** | **String** | | [optional] | -|**positionAmount** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | -|**unrealizedProfit** | **String** | | [optional] | - - - diff --git a/clients/sub-account/docs/GetIpRestrictionForASubAccountApiKeyResponse.md b/clients/sub-account/docs/GetIPRestrictionForASubAccountAPIKeyResponse.md similarity index 100% rename from clients/sub-account/docs/GetIpRestrictionForASubAccountApiKeyResponse.md rename to clients/sub-account/docs/GetIPRestrictionForASubAccountAPIKeyResponse.md diff --git a/clients/sub-account/docs/GetSubAccountDepositHistoryResponseInner.md b/clients/sub-account/docs/GetSubAccountDepositHistoryResponseInner.md index dfa5b9d95..2dd491e9d 100644 --- a/clients/sub-account/docs/GetSubAccountDepositHistoryResponseInner.md +++ b/clients/sub-account/docs/GetSubAccountDepositHistoryResponseInner.md @@ -11,7 +11,7 @@ |**amount** | **String** | | [optional] | |**coin** | **String** | | [optional] | |**network** | **String** | | [optional] | -|**status** | **Long** | | [optional] | +|**status** | **Long** | Deposit status: 0=pending, 6=credited but cannot withdraw, 7=wrong deposit, 8=waiting user confirmation, 1=success. | [optional] | |**address** | **String** | | [optional] | |**addressTag** | **String** | | [optional] | |**txId** | **String** | | [optional] | diff --git a/clients/sub-account/docs/GetSummaryOfSubAccountsFuturesAccountResponse.md b/clients/sub-account/docs/GetSummaryOfSubAccountsFuturesAccountResponse.md index 82cab91c3..85369c291 100644 --- a/clients/sub-account/docs/GetSummaryOfSubAccountsFuturesAccountResponse.md +++ b/clients/sub-account/docs/GetSummaryOfSubAccountsFuturesAccountResponse.md @@ -15,7 +15,7 @@ |**totalUnrealizedProfit** | **String** | | [optional] | |**totalWalletBalance** | **String** | | [optional] | |**asset** | **String** | | [optional] | -|**subAccountList** | [**List<GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner>**](GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner.md) | | [optional] | +|**subAccountList** | [**List<GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner>**](GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner.md) | | [optional] | diff --git a/clients/sub-account/docs/GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner.md b/clients/sub-account/docs/GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner.md new file mode 100644 index 000000000..a526a0d56 --- /dev/null +++ b/clients/sub-account/docs/GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner.md @@ -0,0 +1,21 @@ + + +# GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**email** | **String** | | [optional] | +|**totalInitialMargin** | **String** | | [optional] | +|**totalMaintenanceMargin** | **String** | | [optional] | +|**totalMarginBalance** | **String** | | [optional] | +|**totalOpenOrderInitialMargin** | **String** | | [optional] | +|**totalPositionInitialMargin** | **String** | | [optional] | +|**totalUnrealizedProfit** | **String** | | [optional] | +|**totalWalletBalance** | **String** | | [optional] | +|**asset** | **String** | | [optional] | + + + diff --git a/clients/sub-account/docs/GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp.md b/clients/sub-account/docs/GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp.md index a7be12055..4647aa32d 100644 --- a/clients/sub-account/docs/GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp.md +++ b/clients/sub-account/docs/GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp.md @@ -15,7 +15,7 @@ |**totalUnrealizedProfit** | **String** | | [optional] | |**totalWalletBalance** | **String** | | [optional] | |**asset** | **String** | | [optional] | -|**subAccountList** | [**List<GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner>**](GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner.md) | | [optional] | +|**subAccountList** | [**List<GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner>**](GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner.md) | | [optional] | diff --git a/clients/sub-account/docs/GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner.md b/clients/sub-account/docs/GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner.md deleted file mode 100644 index 8edee8fe0..000000000 --- a/clients/sub-account/docs/GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**email** | **String** | | [optional] | -|**totalInitialMargin** | **String** | | [optional] | -|**totalMaintenanceMargin** | **String** | | [optional] | -|**totalMarginBalance** | **String** | | [optional] | -|**totalOpenOrderInitialMargin** | **String** | | [optional] | -|**totalPositionInitialMargin** | **String** | | [optional] | -|**totalUnrealizedProfit** | **String** | | [optional] | -|**totalWalletBalance** | **String** | | [optional] | -|**asset** | **String** | | [optional] | - - - diff --git a/clients/sub-account/docs/ManagedSubAccountApi.md b/clients/sub-account/docs/ManagedSubAccountApi.md index 60add4fcf..c47ebb7e8 100644 --- a/clients/sub-account/docs/ManagedSubAccountApi.md +++ b/clients/sub-account/docs/ManagedSubAccountApi.md @@ -11,8 +11,8 @@ All URIs are relative to *https://api.binance.com* | [**queryManagedSubAccountList**](ManagedSubAccountApi.md#queryManagedSubAccountList) | **GET** /sapi/v1/managed-subaccount/info | Query Managed Sub-account List (For Investor) (USER_DATA) | | [**queryManagedSubAccountMarginAssetDetails**](ManagedSubAccountApi.md#queryManagedSubAccountMarginAssetDetails) | **GET** /sapi/v1/managed-subaccount/marginAsset | Query Managed Sub-account Margin Asset Details (For Investor Master Account) (USER_DATA) | | [**queryManagedSubAccountSnapshot**](ManagedSubAccountApi.md#queryManagedSubAccountSnapshot) | **GET** /sapi/v1/managed-subaccount/accountSnapshot | Query Managed Sub-account Snapshot (For Investor Master Account) (USER_DATA) | -| [**queryManagedSubAccountTransferLogMasterAccountInvestor**](ManagedSubAccountApi.md#queryManagedSubAccountTransferLogMasterAccountInvestor) | **GET** /sapi/v1/managed-subaccount/queryTransLogForInvestor | Query Managed Sub Account Transfer Log (For Investor Master Account) (USER_DATA) | -| [**queryManagedSubAccountTransferLogMasterAccountTrading**](ManagedSubAccountApi.md#queryManagedSubAccountTransferLogMasterAccountTrading) | **GET** /sapi/v1/managed-subaccount/queryTransLogForTradeParent | Query Managed Sub Account Transfer Log (For Trading Team Master Account) (USER_DATA) | +| [**queryManagedSubAccountTransferLogMasterAccountInvestor**](ManagedSubAccountApi.md#queryManagedSubAccountTransferLogMasterAccountInvestor) | **GET** /sapi/v1/managed-subaccount/queryTransLogForInvestor | Query Managed Sub Account Transfer Log For Investor Master Account (USER_DATA) | +| [**queryManagedSubAccountTransferLogMasterAccountTrading**](ManagedSubAccountApi.md#queryManagedSubAccountTransferLogMasterAccountTrading) | **GET** /sapi/v1/managed-subaccount/queryTransLogForTradeParent | Query Managed Sub Account Transfer Log For Trading Team Master Account (USER_DATA) | | [**queryManagedSubAccountTransferLogSubAccountTrading**](ManagedSubAccountApi.md#queryManagedSubAccountTransferLogSubAccountTrading) | **GET** /sapi/v1/managed-subaccount/query-trans-log | Query Managed Sub Account Transfer Log (For Trading Team Sub Account) (USER_DATA) | | [**withdrawlAssetsFromTheManagedSubAccount**](ManagedSubAccountApi.md#withdrawlAssetsFromTheManagedSubAccount) | **POST** /sapi/v1/managed-subaccount/withdraw | Withdrawl Assets From The Managed Sub-account (For Investor Master Account) (USER_DATA) | @@ -23,7 +23,7 @@ All URIs are relative to *https://api.binance.com* Deposit Assets Into The Managed Sub-account (For Investor Master Account) (USER_DATA) -Deposit Assets Into The Managed Sub-account * You need to enable `Enable Spot & Margin Trading` option for the api key which requests this endpoint Weight: 1 +Deposit Assets Into The Managed Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - You need to enable `Enable Spot & Margin Trading` option for the api key which requests this endpoint ### Example ```java @@ -85,7 +85,7 @@ No authorization required Get Managed Sub-account Deposit Address (For Investor Master Account) (USER_DATA) -Get investor's managed sub-account deposit address. * If `network` is not send, return with default `network` of the `coin`. * * `amount` needs to be sent if using LIGHTNING network Weight: 1 +Get investor's managed sub-account deposit address. Weight(UID): 1 Security Type: USER_DATA Notes: - If `network` is not sent, the default `network` for the `coin` is returned. - When using `LIGHTNING`, `amount` must be provided. ### Example ```java @@ -102,11 +102,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); ManagedSubAccountApi apiInstance = new ManagedSubAccountApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - String coin = "coin_example"; // String | - String network = "network_example"; // String | networks can be found in `GET /sapi/v1/capital/deposit/address` - Double amount = 3.4D; // Double | - Long recvWindow = 56L; // Long | + String email = "abc@test.com"; // String | + String coin = "USDT"; // String | + String network = "LIGHTNING"; // String | networks can be found in `GET /sapi/v1/capital/deposit/address` + Double amount = 1.0D; // Double | + Long recvWindow = 5000L; // Long | try { GetManagedSubAccountDepositAddressResponse result = apiInstance.getManagedSubAccountDepositAddress(email, coin, network, amount, recvWindow); System.out.println(result); @@ -125,7 +125,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | +| **email** | **String**| | | | **coin** | **String**| | | | **network** | **String**| networks can be found in `GET /sapi/v1/capital/deposit/address` | [optional] | | **amount** | **Double**| | [optional] | @@ -155,7 +155,7 @@ No authorization required Query Managed Sub-account Asset Details (For Investor Master Account) (USER_DATA) -Query Managed Sub-account Asset Details Weight: 1 +Query Managed Sub-account Asset Details Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -172,8 +172,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); ManagedSubAccountApi apiInstance = new ManagedSubAccountApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - Long recvWindow = 56L; // Long | + String email = "abc@test.com"; // String | + Long recvWindow = 5000L; // Long | try { QueryManagedSubAccountAssetDetailsResponse result = apiInstance.queryManagedSubAccountAssetDetails(email, recvWindow); System.out.println(result); @@ -192,7 +192,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | +| **email** | **String**| | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -219,7 +219,7 @@ No authorization required Query Managed Sub-account Futures Asset Details (For Investor Master Account) (USER_DATA) -Investor can use this api to query managed sub account futures asset details Weight: 60 +Investor can use this api to query managed sub account futures asset details Weight(UID): 60 Security Type: USER_DATA ### Example ```java @@ -236,8 +236,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); ManagedSubAccountApi apiInstance = new ManagedSubAccountApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - String accountType = "accountType_example"; // String | No input or input \"MARGIN\" to get Cross Margin account details. Input \"ISOLATED_MARGIN\" to get Isolated Margin account details. + String email = "abc@test.com"; // String | + String accountType = "MARGIN"; // String | No input or input \"USDT_FUTURE\" to get UM Futures account details. Input \"COIN_FUTURE\" to get CM Futures account details. try { QueryManagedSubAccountFuturesAssetDetailsResponse result = apiInstance.queryManagedSubAccountFuturesAssetDetails(email, accountType); System.out.println(result); @@ -256,8 +256,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | -| **accountType** | **String**| No input or input \"MARGIN\" to get Cross Margin account details. Input \"ISOLATED_MARGIN\" to get Isolated Margin account details. | [optional] | +| **email** | **String**| | | +| **accountType** | **String**| No input or input \"USDT_FUTURE\" to get UM Futures account details. Input \"COIN_FUTURE\" to get CM Futures account details. | [optional] | ### Return type @@ -283,7 +283,7 @@ No authorization required Query Managed Sub-account List (For Investor) (USER_DATA) -Get investor's managed sub-account list. Weight: 60 +Get investor's managed sub-account list. Weight(UID): 60 Security Type: USER_DATA ### Example ```java @@ -300,10 +300,10 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); ManagedSubAccountApi apiInstance = new ManagedSubAccountApi(defaultClient); - String email = "email_example"; // String | Managed sub-account email - Long page = 56L; // Long | Default value: 1 - Long limit = 56L; // Long | Default value: 1, Max value: 200 - Long recvWindow = 56L; // Long | + String email = "abc@test.com"; // String | + Long page = 1L; // Long | + Long limit = 10L; // Long | + Long recvWindow = 5000L; // Long | try { QueryManagedSubAccountListResponse result = apiInstance.queryManagedSubAccountList(email, page, limit, recvWindow); System.out.println(result); @@ -322,9 +322,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| Managed sub-account email | [optional] | -| **page** | **Long**| Default value: 1 | [optional] | -| **limit** | **Long**| Default value: 1, Max value: 200 | [optional] | +| **email** | **String**| | [optional] | +| **page** | **Long**| | [optional] | +| **limit** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -351,7 +351,7 @@ No authorization required Query Managed Sub-account Margin Asset Details (For Investor Master Account) (USER_DATA) -Investor can use this api to query managed sub account margin asset details Weight: 1 +Investor can use this api to query managed sub account margin asset details Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -368,8 +368,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); ManagedSubAccountApi apiInstance = new ManagedSubAccountApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - String accountType = "accountType_example"; // String | No input or input \"MARGIN\" to get Cross Margin account details. Input \"ISOLATED_MARGIN\" to get Isolated Margin account details. + String email = "abc@test.com"; // String | + String accountType = "MARGIN"; // String | No input or input \"MARGIN\" to get Cross Margin account details. Input \"ISOLATED_MARGIN\" to get Isolated Margin account details. try { QueryManagedSubAccountMarginAssetDetailsResponse result = apiInstance.queryManagedSubAccountMarginAssetDetails(email, accountType); System.out.println(result); @@ -388,7 +388,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | +| **email** | **String**| | | | **accountType** | **String**| No input or input \"MARGIN\" to get Cross Margin account details. Input \"ISOLATED_MARGIN\" to get Isolated Margin account details. | [optional] | ### Return type @@ -415,7 +415,7 @@ No authorization required Query Managed Sub-account Snapshot (For Investor Master Account) (USER_DATA) -Query Managed Sub-account Snapshot * The query time period must be less then 30 days * Support query within the last one month only * If startTimeand endTime not sent, return records of the last 7 days by default Weight: 2400 +Query Managed Sub-account Snapshot Weight(IP): 2400 Security Type: USER_DATA Notes: - The query time range must be less than 30 days. - Only data from the most recent month is supported. - If `startTime` and `endTime` are omitted, records from the last 7 days are returned by default. ### Example ```java @@ -432,12 +432,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); ManagedSubAccountApi apiInstance = new ManagedSubAccountApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - String type = "type_example"; // String | \"SPOT\", \"MARGIN\"(cross), \"FUTURES\"(UM) - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | Default value: 1, Max value: 200 - Long recvWindow = 56L; // Long | + String email = "abc@test.com"; // String | + OrderType type = OrderType.fromValue("SPOT"); // OrderType | + Long startTime = 1623319461670L; // Long | Query time range must be within 30 days and only supports data within the last month. + Long endTime = 1641782889000L; // Long | If both startTime and endTime are omitted, records from the last 7 days are returned by default. + Long limit = 10L; // Long | + Long recvWindow = 5000L; // Long | try { QueryManagedSubAccountSnapshotResponse result = apiInstance.queryManagedSubAccountSnapshot(email, type, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -456,11 +456,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | -| **type** | **String**| \"SPOT\", \"MARGIN\"(cross), \"FUTURES\"(UM) | | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **limit** | **Long**| Default value: 1, Max value: 200 | [optional] | +| **email** | **String**| | | +| **type** | [**OrderType**](.md)| | [enum: SPOT, MARGIN, FUTURES] | +| **startTime** | **Long**| Query time range must be within 30 days and only supports data within the last month. | [optional] | +| **endTime** | **Long**| If both startTime and endTime are omitted, records from the last 7 days are returned by default. | [optional] | +| **limit** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -485,9 +485,9 @@ No authorization required # **queryManagedSubAccountTransferLogMasterAccountInvestor** > QueryManagedSubAccountTransferLogMasterAccountInvestorResponse queryManagedSubAccountTransferLogMasterAccountInvestor(email, startTime, endTime, page, limit, transfers, transferFunctionAccountType) -Query Managed Sub Account Transfer Log (For Investor Master Account) (USER_DATA) +Query Managed Sub Account Transfer Log For Investor Master Account (USER_DATA) -Investor can use this api to query managed sub account transfer log. This endpoint is available for investor of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team. Please refer to [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) Weight: 1 +Query Managed Sub Account Transfer Log For Investor Master Account Investor can use this api to query managed sub account transfer log. This endpoint is available for investor of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team. Please refer to [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -504,13 +504,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); ManagedSubAccountApi apiInstance = new ManagedSubAccountApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - Long startTime = 56L; // Long | Start Time - Long endTime = 56L; // Long | End Time (The start time and end time interval cannot exceed half a year) - Long page = 56L; // Long | Page - Long limit = 56L; // Long | Limit (Max: 500) + String email = "abc@test.com"; // String | + Long startTime = 1623319461670L; // Long | Start Time + Long endTime = 1641782889000L; // Long | End Time (The start time and end time interval cannot exceed half a year) + Long page = 1L; // Long | Page + Long limit = 1L; // Long | String transfers = "transfers_example"; // String | Transfer Direction (FROM/TO) - String transferFunctionAccountType = "transferFunctionAccountType_example"; // String | Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) + TransferFunctionAccountType transferFunctionAccountType = TransferFunctionAccountType.fromValue("SPOT"); // TransferFunctionAccountType | try { QueryManagedSubAccountTransferLogMasterAccountInvestorResponse result = apiInstance.queryManagedSubAccountTransferLogMasterAccountInvestor(email, startTime, endTime, page, limit, transfers, transferFunctionAccountType); System.out.println(result); @@ -529,13 +529,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | +| **email** | **String**| | | | **startTime** | **Long**| Start Time | | | **endTime** | **Long**| End Time (The start time and end time interval cannot exceed half a year) | | | **page** | **Long**| Page | | -| **limit** | **Long**| Limit (Max: 500) | | +| **limit** | **Long**| | | | **transfers** | **String**| Transfer Direction (FROM/TO) | [optional] | -| **transferFunctionAccountType** | **String**| Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) | [optional] | +| **transferFunctionAccountType** | [**TransferFunctionAccountType**](.md)| | [optional] [enum: SPOT, MARGIN, ISOLATED_MARGIN, USDT_FUTURE, COIN_FUTURE] | ### Return type @@ -559,9 +559,9 @@ No authorization required # **queryManagedSubAccountTransferLogMasterAccountTrading** > QueryManagedSubAccountTransferLogMasterAccountTradingResponse queryManagedSubAccountTransferLogMasterAccountTrading(email, startTime, endTime, page, limit, transfers, transferFunctionAccountType) -Query Managed Sub Account Transfer Log (For Trading Team Master Account) (USER_DATA) +Query Managed Sub Account Transfer Log For Trading Team Master Account (USER_DATA) -Trading team can use this api to query managed sub account transfer log. This endpoint is available for trading team of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team. Please refer to [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) Weight: 60 +Query Managed Sub Account Transfer Log For Trading Team Master Account Trading team can use this api to query managed sub account transfer log. This endpoint is available for trading team of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team. Please refer to [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) Weight(UID): 60 Security Type: USER_DATA ### Example ```java @@ -578,13 +578,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); ManagedSubAccountApi apiInstance = new ManagedSubAccountApi(defaultClient); - String email = "email_example"; // String | [Sub-account email](#email-address) - Long startTime = 56L; // Long | Start Time - Long endTime = 56L; // Long | End Time (The start time and end time interval cannot exceed half a year) - Long page = 56L; // Long | Page - Long limit = 56L; // Long | Limit (Max: 500) + String email = "abc@test.com"; // String | + Long startTime = 1623319461670L; // Long | Start Time + Long endTime = 1641782889000L; // Long | End Time (The start time and end time interval cannot exceed half a year) + Long page = 1L; // Long | + Long limit = 10L; // Long | String transfers = "transfers_example"; // String | Transfer Direction (FROM/TO) - String transferFunctionAccountType = "transferFunctionAccountType_example"; // String | Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) + TransferFunctionAccountType transferFunctionAccountType = TransferFunctionAccountType.fromValue("SPOT"); // TransferFunctionAccountType | try { QueryManagedSubAccountTransferLogMasterAccountTradingResponse result = apiInstance.queryManagedSubAccountTransferLogMasterAccountTrading(email, startTime, endTime, page, limit, transfers, transferFunctionAccountType); System.out.println(result); @@ -603,13 +603,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **email** | **String**| [Sub-account email](#email-address) | | +| **email** | **String**| | | | **startTime** | **Long**| Start Time | | | **endTime** | **Long**| End Time (The start time and end time interval cannot exceed half a year) | | -| **page** | **Long**| Page | | -| **limit** | **Long**| Limit (Max: 500) | | +| **page** | **Long**| | | +| **limit** | **Long**| | | | **transfers** | **String**| Transfer Direction (FROM/TO) | [optional] | -| **transferFunctionAccountType** | **String**| Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) | [optional] | +| **transferFunctionAccountType** | [**TransferFunctionAccountType**](.md)| | [optional] [enum: SPOT, MARGIN, ISOLATED_MARGIN, USDT_FUTURE, COIN_FUTURE] | ### Return type @@ -635,7 +635,7 @@ No authorization required Query Managed Sub Account Transfer Log (For Trading Team Sub Account) (USER_DATA) -Query Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight: 60 +Query Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight(UID): 60 Security Type: USER_DATA ### Example ```java @@ -652,13 +652,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); ManagedSubAccountApi apiInstance = new ManagedSubAccountApi(defaultClient); - Long startTime = 56L; // Long | Start Time - Long endTime = 56L; // Long | End Time (The start time and end time interval cannot exceed half a year) - Long page = 56L; // Long | Page - Long limit = 56L; // Long | Limit (Max: 500) - String transfers = "transfers_example"; // String | Transfer Direction (FROM/TO) - String transferFunctionAccountType = "transferFunctionAccountType_example"; // String | Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) - Long recvWindow = 56L; // Long | + Long startTime = 1623319461670L; // Long | Start Time + Long endTime = 1641782889000L; // Long | End Time (The start time and end time interval cannot exceed half a year) + Long page = 1L; // Long | + Long limit = 10L; // Long | + String transfers = "transfers_example"; // String | Transfer Direction (from/to) + TransferFunctionAccountType transferFunctionAccountType = TransferFunctionAccountType.fromValue("SPOT"); // TransferFunctionAccountType | + Long recvWindow = 5000L; // Long | try { QueryManagedSubAccountTransferLogSubAccountTradingResponse result = apiInstance.queryManagedSubAccountTransferLogSubAccountTrading(startTime, endTime, page, limit, transfers, transferFunctionAccountType, recvWindow); System.out.println(result); @@ -679,10 +679,10 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **startTime** | **Long**| Start Time | | | **endTime** | **Long**| End Time (The start time and end time interval cannot exceed half a year) | | -| **page** | **Long**| Page | | -| **limit** | **Long**| Limit (Max: 500) | | -| **transfers** | **String**| Transfer Direction (FROM/TO) | [optional] | -| **transferFunctionAccountType** | **String**| Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) | [optional] | +| **page** | **Long**| | | +| **limit** | **Long**| | | +| **transfers** | **String**| Transfer Direction (from/to) | [optional] | +| **transferFunctionAccountType** | [**TransferFunctionAccountType**](.md)| | [optional] [enum: SPOT, MARGIN, ISOLATED_MARGIN, USDT_FUTURE, COIN_FUTURE] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -709,7 +709,7 @@ No authorization required Withdrawl Assets From The Managed Sub-account (For Investor Master Account) (USER_DATA) -Withdrawl Assets From The Managed Sub-account * You need to enable `Enable Spot & Margin Trading` option for the api key which requests this endpoint Weight: 1 +Withdrawl Assets From The Managed Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - Your API key must have the permission `Enable Spot & Margin Trading`. ### Example ```java diff --git a/clients/sub-account/docs/MarginTransferForSubAccountRequest.md b/clients/sub-account/docs/MarginTransferForSubAccountRequest.md index a8295bd75..1c4951fd3 100644 --- a/clients/sub-account/docs/MarginTransferForSubAccountRequest.md +++ b/clients/sub-account/docs/MarginTransferForSubAccountRequest.md @@ -8,9 +8,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**email** | **String** | | | -|**asset** | **String** | | | -|**amount** | **Double** | | | -|**type** | **Long** | | | +|**asset** | **String** | The asset being transferred | | +|**amount** | **Double** | The amount to be transferred | | +|**type** | **Long** | 1: transfer from subaccount's spot account to margin account 2: transfer from subaccount's margin account to its spot account | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/sub-account/docs/ModifySubAccountApiKeyPermissionRequest.md b/clients/sub-account/docs/ModifySubAccountApiKeyPermissionRequest.md new file mode 100644 index 000000000..f20d87f52 --- /dev/null +++ b/clients/sub-account/docs/ModifySubAccountApiKeyPermissionRequest.md @@ -0,0 +1,20 @@ + + +# ModifySubAccountApiKeyPermissionRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**email** | **String** | Sub-account email | | +|**subAccountApiKey** | **String** | Sub-account API Key | | +|**canTrade** | **Boolean** | Spot & Margin trading permission | [optional] | +|**canMarginLoanRepay** | **Boolean** | Margin borrow/repay permission | [optional] | +|**canFuturesTrade** | **Boolean** | Futures trading permission | [optional] | +|**canUniversalTransfer** | **Boolean** | Universal transfer permission | [optional] | +|**canVanillaOptions** | **Boolean** | Vanilla options permission | [optional] | +|**recvWindow** | **Long** | | [optional] | + + + diff --git a/clients/sub-account/docs/ModifySubAccountApiKeyPermissionResponse.md b/clients/sub-account/docs/ModifySubAccountApiKeyPermissionResponse.md new file mode 100644 index 000000000..765f963b8 --- /dev/null +++ b/clients/sub-account/docs/ModifySubAccountApiKeyPermissionResponse.md @@ -0,0 +1,20 @@ + + +# ModifySubAccountApiKeyPermissionResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**apiName** | **String** | | [optional] | +|**apikey** | **String** | | [optional] | +|**canTrade** | **Boolean** | | [optional] | +|**canMarginLoanRepay** | **Boolean** | | [optional] | +|**canFuturesTrade** | **Boolean** | | [optional] | +|**canUniversalTransfer** | **Boolean** | | [optional] | +|**canVanillaOptions** | **Boolean** | | [optional] | +|**timestamp** | **Long** | | [optional] | + + + diff --git a/clients/sub-account/docs/MovePositionForSubAccountRequest.md b/clients/sub-account/docs/MovePositionForSubAccountRequest.md index 4688efd84..44f813976 100644 --- a/clients/sub-account/docs/MovePositionForSubAccountRequest.md +++ b/clients/sub-account/docs/MovePositionForSubAccountRequest.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**fromUserEmail** | **String** | | | |**toUserEmail** | **String** | | | -|**productType** | **String** | | | +|**productType** | **ProductType** | | | |**orderArgs** | **OrderArgs** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/sub-account/docs/OrderArgs.md b/clients/sub-account/docs/OrderArgs.md index c8f4d18df..5825990da 100644 --- a/clients/sub-account/docs/OrderArgs.md +++ b/clients/sub-account/docs/OrderArgs.md @@ -2,6 +2,7 @@ # OrderArgs +Max 10 positions supported. When input request parameter,orderArgs.symbol should be STRING, orderArgs.quantity should be BIGDECIMAL, and orderArgs.positionSide should be STRING, positionSide support BOTH,LONG and SHORT. Each entry should be like orderArgs[0].symbol=BTCUSDT,orderArgs[0].quantity=0.001,orderArgs[0].positionSide=BOTH. Example of the request parameter array: orderArgs[0].symbol=BTCUSDT orderArgs[0].quantity=0.001 orderArgs[0].positionSide=BOTH orderArgs[1].symbol=ETHUSDT orderArgs[1].quantity=0.01 orderArgs[1].positionSide=BOTH ## Properties diff --git a/clients/sub-account/docs/OrderType.md b/clients/sub-account/docs/OrderType.md new file mode 100644 index 000000000..255584950 --- /dev/null +++ b/clients/sub-account/docs/OrderType.md @@ -0,0 +1,15 @@ + + +# OrderType + +## Enum + + +* `SPOT` (value: `"SPOT"`) + +* `MARGIN` (value: `"MARGIN"`) + +* `FUTURES` (value: `"FUTURES"`) + + + diff --git a/clients/sub-account/docs/ProductType.md b/clients/sub-account/docs/ProductType.md new file mode 100644 index 000000000..c760a35e9 --- /dev/null +++ b/clients/sub-account/docs/ProductType.md @@ -0,0 +1,11 @@ + + +# ProductType + +## Enum + + +* `UM` (value: `"UM"`) + + + diff --git a/clients/sub-account/docs/QuerySubAccountApiKeyResponse.md b/clients/sub-account/docs/QuerySubAccountApiKeyResponse.md new file mode 100644 index 000000000..27896ed60 --- /dev/null +++ b/clients/sub-account/docs/QuerySubAccountApiKeyResponse.md @@ -0,0 +1,14 @@ + + +# QuerySubAccountApiKeyResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**total** | **Long** | | [optional] | +|**_list** | [**List<QuerySubAccountApiKeyResponseListInner>**](QuerySubAccountApiKeyResponseListInner.md) | | [optional] | + + + diff --git a/clients/sub-account/docs/QuerySubAccountApiKeyResponseListInner.md b/clients/sub-account/docs/QuerySubAccountApiKeyResponseListInner.md new file mode 100644 index 000000000..a386092e9 --- /dev/null +++ b/clients/sub-account/docs/QuerySubAccountApiKeyResponseListInner.md @@ -0,0 +1,21 @@ + + +# QuerySubAccountApiKeyResponseListInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**email** | **String** | | [optional] | +|**apiName** | **String** | | [optional] | +|**apikey** | **String** | | [optional] | +|**canTrade** | **Boolean** | | [optional] | +|**canMarginLoanRepay** | **Boolean** | | [optional] | +|**canFuturesTrade** | **Boolean** | | [optional] | +|**canUniversalTransfer** | **Boolean** | | [optional] | +|**canVanillaOptions** | **Boolean** | | [optional] | +|**timestamp** | **Long** | | [optional] | + + + diff --git a/clients/sub-account/docs/SubAccountFuturesAssetTransferRequest.md b/clients/sub-account/docs/SubAccountFuturesAssetTransferRequest.md index e1bdf6b6c..a4edd8d3f 100644 --- a/clients/sub-account/docs/SubAccountFuturesAssetTransferRequest.md +++ b/clients/sub-account/docs/SubAccountFuturesAssetTransferRequest.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**fromEmail** | **String** | | | -|**toEmail** | **String** | | | -|**futuresType** | **Long** | | | +|**fromEmail** | **String** | Sender email | | +|**toEmail** | **String** | Recipient email | | +|**futuresType** | **Long** | 1:USDT-margined Futures,2: Coin-margined Futures | | |**asset** | **String** | | | |**amount** | **Double** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/sub-account/docs/ToAccountType.md b/clients/sub-account/docs/ToAccountType.md new file mode 100644 index 000000000..9e5a15c38 --- /dev/null +++ b/clients/sub-account/docs/ToAccountType.md @@ -0,0 +1,19 @@ + + +# ToAccountType + +## Enum + + +* `SPOT` (value: `"SPOT"`) + +* `USDT_FUTURE` (value: `"USDT_FUTURE"`) + +* `COIN_FUTURE` (value: `"COIN_FUTURE"`) + +* `MARGIN` (value: `"MARGIN"`) + +* `ISOLATED_MARGIN` (value: `"ISOLATED_MARGIN"`) + + + diff --git a/clients/sub-account/docs/TransferFunctionAccountType.md b/clients/sub-account/docs/TransferFunctionAccountType.md new file mode 100644 index 000000000..b1722a854 --- /dev/null +++ b/clients/sub-account/docs/TransferFunctionAccountType.md @@ -0,0 +1,19 @@ + + +# TransferFunctionAccountType + +## Enum + + +* `SPOT` (value: `"SPOT"`) + +* `MARGIN` (value: `"MARGIN"`) + +* `ISOLATED_MARGIN` (value: `"ISOLATED_MARGIN"`) + +* `USDT_FUTURE` (value: `"USDT_FUTURE"`) + +* `COIN_FUTURE` (value: `"COIN_FUTURE"`) + + + diff --git a/clients/sub-account/docs/UniversalTransferRequest.md b/clients/sub-account/docs/UniversalTransferRequest.md index cf7fb8ed6..defa040e1 100644 --- a/clients/sub-account/docs/UniversalTransferRequest.md +++ b/clients/sub-account/docs/UniversalTransferRequest.md @@ -9,10 +9,10 @@ |------------ | ------------- | ------------- | -------------| |**fromEmail** | **String** | | [optional] | |**toEmail** | **String** | | [optional] | -|**fromAccountType** | **String** | | | -|**toAccountType** | **String** | | | -|**clientTranId** | **String** | | [optional] | -|**symbol** | **String** | | [optional] | +|**fromAccountType** | **FromAccountType** | | | +|**toAccountType** | **ToAccountType** | | | +|**clientTranId** | **String** | Must be unique | [optional] | +|**symbol** | **String** | Only supported under ISOLATED_MARGIN type | [optional] | |**asset** | **String** | | | |**amount** | **Double** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/sub-account/docs/WithdrawlAssetsFromTheManagedSubAccountRequest.md b/clients/sub-account/docs/WithdrawlAssetsFromTheManagedSubAccountRequest.md index 99ecaa404..5b164d0fa 100644 --- a/clients/sub-account/docs/WithdrawlAssetsFromTheManagedSubAccountRequest.md +++ b/clients/sub-account/docs/WithdrawlAssetsFromTheManagedSubAccountRequest.md @@ -10,7 +10,7 @@ |**fromEmail** | **String** | | | |**asset** | **String** | | | |**amount** | **Double** | | | -|**transferDate** | **Long** | | [optional] | +|**transferDate** | **Long** | Withdrawal will happen automatically on the selected date (UTC 0). If no date is selected, withdrawal takes effect immediately. | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/sub-account/docs/rest-api/migration-guide.md b/clients/sub-account/docs/rest-api/migration-guide.md index 1d625f941..9e987abad 100644 --- a/clients/sub-account/docs/rest-api/migration-guide.md +++ b/clients/sub-account/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-sub-account - 5.0.0 + 6.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-sub-account - 5.0.0 + 6.0.0 ``` diff --git a/clients/sub-account/example_rest.md b/clients/sub-account/example_rest.md index 7cc39b4a6..396b28319 100644 --- a/clients/sub-account/example_rest.md +++ b/clients/sub-account/example_rest.md @@ -1,98 +1,106 @@ ## AccountManagement -[POST /sapi/v1/sub-account/virtualSubAccount](https://developers.binance.com/docs/sub_account/account-management/Create-a-Virtual-Sub-account) - createAVirtualSubAccount - [CreateAVirtualSubAccountExample.java:50](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/CreateAVirtualSubAccountExample.java#L50) +[POST /sapi/v1/sub-account/virtualSubAccount](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#create-avirtual-sub-account) - createAVirtualSubAccount - [CreateAVirtualSubAccountExample.java:39](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/CreateAVirtualSubAccountExample.java#L39) -[POST /sapi/v1/sub-account/futures/enable](https://developers.binance.com/docs/sub_account/account-management/Enable-Futures-for-Sub-account) - enableFuturesForSubAccount - [EnableFuturesForSubAccountExample.java:48](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/EnableFuturesForSubAccountExample.java#L48) +[POST /sapi/v1/sub-account/futures/enable](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#enable-futures-for-sub-account) - enableFuturesForSubAccount - [EnableFuturesForSubAccountExample.java:37](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/EnableFuturesForSubAccountExample.java#L37) -[POST /sapi/v1/sub-account/eoptions/enable](https://developers.binance.com/docs/sub_account/account-management/Enable-Options-for-Sub-account) - enableOptionsForSubAccount - [EnableOptionsForSubAccountExample.java:48](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/EnableOptionsForSubAccountExample.java#L48) +[POST /sapi/v1/sub-account/eoptions/enable](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#enable-options-for-sub-account) - enableOptionsForSubAccount - [EnableOptionsForSubAccountExample.java:38](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/EnableOptionsForSubAccountExample.java#L38) -[GET /sapi/v1/sub-account/futures/positionRisk](https://developers.binance.com/docs/sub_account/account-management/Get-Futures-Position-Risk-of-Sub-account) - getFuturesPositionRiskOfSubAccount - [GetFuturesPositionRiskOfSubAccountExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetFuturesPositionRiskOfSubAccountExample.java#L47) +[GET /sapi/v1/sub-account/futures/positionRisk](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#get-futures-position-risk-of-sub-account) - getFuturesPositionRiskOfSubAccount - [GetFuturesPositionRiskOfSubAccountExample.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetFuturesPositionRiskOfSubAccountExample.java#L36) -[GET /sapi/v2/sub-account/futures/positionRisk](https://developers.binance.com/docs/sub_account/account-management/Get-Futures-Position-Risk-of-Sub-account-V2) - getFuturesPositionRiskOfSubAccountV2 - [GetFuturesPositionRiskOfSubAccountV2Example.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetFuturesPositionRiskOfSubAccountV2Example.java#L47) +[GET /sapi/v2/sub-account/futures/positionRisk](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#get-futures-position-risk-of-sub-account-v2) - getFuturesPositionRiskOfSubAccountV2 - [GetFuturesPositionRiskOfSubAccountV2Example.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetFuturesPositionRiskOfSubAccountV2Example.java#L36) -[GET /sapi/v1/sub-account/status](https://developers.binance.com/docs/sub_account/account-management/Get-Sub-accounts-Status-on-Margin-Or-Futures) - getSubAccountsStatusOnMarginOrFutures - [GetSubAccountsStatusOnMarginOrFuturesExample.java:48](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetSubAccountsStatusOnMarginOrFuturesExample.java#L48) +[GET /sapi/v1/sub-account/status](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#get-sub-accounts-status-on-margin-or-futures) - getSubAccountsStatusOnMarginOrFutures - [GetSubAccountsStatusOnMarginOrFuturesExample.java:37](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetSubAccountsStatusOnMarginOrFuturesExample.java#L37) -[GET /sapi/v1/sub-account/list](https://developers.binance.com/docs/sub_account/account-management/Query-Sub-account-List) - querySubAccountList - [QuerySubAccountListExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/QuerySubAccountListExample.java#L47) +[GET /sapi/v1/sub-account/list](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#query-sub-account-list) - querySubAccountList - [QuerySubAccountListExample.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/QuerySubAccountListExample.java#L36) -[GET /sapi/v1/sub-account/transaction-statistics](https://developers.binance.com/docs/sub_account/account-management/Query-Sub-account-Transaction-Statistics) - querySubAccountTransactionStatistics - [QuerySubAccountTransactionStatisticsExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/QuerySubAccountTransactionStatisticsExample.java#L47) +[GET /sapi/v1/sub-account/transaction-statistics](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#query-sub-account-transaction-statistics) - querySubAccountTransactionStatistics - [QuerySubAccountTransactionStatisticsExample.java:37](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/QuerySubAccountTransactionStatisticsExample.java#L37) ## ApiManagement -[POST /sapi/v2/sub-account/subAccountApi/ipRestriction](https://developers.binance.com/docs/sub_account/api-management/Add-IP-Restriction-for-Sub-Account-API-key) - addIpRestrictionForSubAccountApiKey - [AddIpRestrictionForSubAccountApiKeyExample.java:49](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/AddIpRestrictionForSubAccountApiKeyExample.java#L49) +[POST /sapi/v2/sub-account/subAccountApi/ipRestriction](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/api-management#add-ip-restriction-for-sub-account-api-key) - addIpRestrictionForSubAccountApiKey - [AddIpRestrictionForSubAccountApiKeyExample.java:39](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/AddIpRestrictionForSubAccountApiKeyExample.java#L39) -[DELETE /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList](https://developers.binance.com/docs/sub_account/api-management/Delete-IP-List-For-a-Sub-account-API-Key) - deleteIpListForASubAccountApiKey - [DeleteIpListForASubAccountApiKeyExample.java:48](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/DeleteIpListForASubAccountApiKeyExample.java#L48) +[POST /sapi/v1/sub-account/subAccountApi](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/api-management#create-sub-account-api-key) - createSubAccountApiKey - [CreateSubAccountApiKeyExample.java:40](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/CreateSubAccountApiKeyExample.java#L40) -[GET /sapi/v1/sub-account/subAccountApi/ipRestriction](https://developers.binance.com/docs/sub_account/api-management/Get-IP-Restriction-for-a-Sub-account-API-Key) - getIpRestrictionForASubAccountApiKey - [GetIpRestrictionForASubAccountApiKeyExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/GetIpRestrictionForASubAccountApiKeyExample.java#L47) +[DELETE /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/api-management#delete-ip-list-for-asub-account-api-key) - deleteIpListForASubAccountApiKey - [DeleteIpListForASubAccountApiKeyExample.java:38](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/DeleteIpListForASubAccountApiKeyExample.java#L38) + +[DELETE /sapi/v1/sub-account/subAccountApi](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/api-management#delete-sub-account-api-key) - deleteSubAccountApiKey - [DeleteSubAccountApiKeyExample.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/DeleteSubAccountApiKeyExample.java#L36) + +[GET /sapi/v1/sub-account/subAccountApi/ipRestriction](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/api-management#get-ip-restriction-for-asub-account-api-key) - getIpRestrictionForASubAccountApiKey - [GetIpRestrictionForASubAccountApiKeyExample.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/GetIpRestrictionForASubAccountApiKeyExample.java#L36) + +[POST /sapi/v1/sub-account/subAccountApiPermission](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/api-management#modify-sub-account-api-key-permission) - modifySubAccountApiKeyPermission - [ModifySubAccountApiKeyPermissionExample.java:39](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/ModifySubAccountApiKeyPermissionExample.java#L39) + +[GET /sapi/v1/sub-account/subAccountApi](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/api-management#query-sub-account-api-key) - querySubAccountApiKey - [QuerySubAccountApiKeyExample.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/QuerySubAccountApiKeyExample.java#L36) ## AssetManagement -[POST /sapi/v1/sub-account/futures/transfer](https://developers.binance.com/docs/sub_account/asset-management/Futures-Transfer-for-Sub-account) - futuresTransferForSubAccount - [FuturesTransferForSubAccountExample.java:49](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/FuturesTransferForSubAccountExample.java#L49) +[POST /sapi/v1/sub-account/futures/transfer](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#futures-transfer-for-sub-account) - futuresTransferForSubAccount - [FuturesTransferForSubAccountExample.java:39](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/FuturesTransferForSubAccountExample.java#L39) -[GET /sapi/v1/sub-account/futures/account](https://developers.binance.com/docs/sub_account/asset-management/Get-Detail-on-Sub-accounts-Futures-Account) - getDetailOnSubAccountsFuturesAccount - [GetDetailOnSubAccountsFuturesAccountExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsFuturesAccountExample.java#L47) +[GET /sapi/v1/sub-account/futures/account](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-detail-on-sub-accounts-futures-account) - getDetailOnSubAccountsFuturesAccount - [GetDetailOnSubAccountsFuturesAccountExample.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsFuturesAccountExample.java#L36) -[GET /sapi/v2/sub-account/futures/account](https://developers.binance.com/docs/sub_account/asset-management/Get-Detail-on-Sub-accounts-Futures-Account-V2) - getDetailOnSubAccountsFuturesAccountV2 - [GetDetailOnSubAccountsFuturesAccountV2Example.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsFuturesAccountV2Example.java#L47) +[GET /sapi/v2/sub-account/futures/account](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-detail-on-sub-accounts-futures-account-v2) - getDetailOnSubAccountsFuturesAccountV2 - [GetDetailOnSubAccountsFuturesAccountV2Example.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsFuturesAccountV2Example.java#L36) -[GET /sapi/v1/sub-account/margin/account](https://developers.binance.com/docs/sub_account/asset-management/Get-Detail-on-Sub-accounts-Margin-Account) - getDetailOnSubAccountsMarginAccount - [GetDetailOnSubAccountsMarginAccountExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsMarginAccountExample.java#L47) +[GET /sapi/v1/sub-account/margin/account](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-detail-on-sub-accounts-margin-account) - getDetailOnSubAccountsMarginAccount - [GetDetailOnSubAccountsMarginAccountExample.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsMarginAccountExample.java#L36) -[GET /sapi/v1/sub-account/futures/move-position](https://developers.binance.com/docs/sub_account/asset-management/Get-Move-Position-History-for-Sub-account) - getMovePositionHistoryForSubAccount - [GetMovePositionHistoryForSubAccountExample.java:51](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetMovePositionHistoryForSubAccountExample.java#L51) +[GET /sapi/v1/sub-account/futures/move-position](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-move-position-history-for-sub-account) - getMovePositionHistoryForSubAccount - [GetMovePositionHistoryForSubAccountExample.java:41](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetMovePositionHistoryForSubAccountExample.java#L41) -[GET /sapi/v1/capital/deposit/subAddress](https://developers.binance.com/docs/sub_account/asset-management/Get-Sub-account-Deposit-Address) - getSubAccountDepositAddress - [GetSubAccountDepositAddressExample.java:48](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSubAccountDepositAddressExample.java#L48) +[GET /sapi/v1/capital/deposit/subAddress](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-sub-account-deposit-address) - getSubAccountDepositAddress - [GetSubAccountDepositAddressExample.java:37](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSubAccountDepositAddressExample.java#L37) -[GET /sapi/v1/capital/deposit/subHisrec](https://developers.binance.com/docs/sub_account/asset-management/Get-Sub-account-Deposit-History) - getSubAccountDepositHistory - [GetSubAccountDepositHistoryExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSubAccountDepositHistoryExample.java#L47) +[GET /sapi/v1/capital/deposit/subHisrec](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-sub-account-deposit-history) - getSubAccountDepositHistory - [GetSubAccountDepositHistoryExample.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSubAccountDepositHistoryExample.java#L36) -[GET /sapi/v1/sub-account/futures/accountSummary](https://developers.binance.com/docs/sub_account/asset-management/Get-Summary-of-Sub-accounts-Futures-Account) - getSummaryOfSubAccountsFuturesAccount - [GetSummaryOfSubAccountsFuturesAccountExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsFuturesAccountExample.java#L47) +[GET /sapi/v1/sub-account/futures/accountSummary](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-summary-of-sub-accounts-futures-account) - getSummaryOfSubAccountsFuturesAccount - [GetSummaryOfSubAccountsFuturesAccountExample.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsFuturesAccountExample.java#L36) -[GET /sapi/v2/sub-account/futures/accountSummary](https://developers.binance.com/docs/sub_account/asset-management/Get-Summary-of-Sub-accounts-Futures-Account-V2) - getSummaryOfSubAccountsFuturesAccountV2 - [GetSummaryOfSubAccountsFuturesAccountV2Example.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsFuturesAccountV2Example.java#L47) +[GET /sapi/v2/sub-account/futures/accountSummary](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-summary-of-sub-accounts-futures-account-v2) - getSummaryOfSubAccountsFuturesAccountV2 - [GetSummaryOfSubAccountsFuturesAccountV2Example.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsFuturesAccountV2Example.java#L36) -[GET /sapi/v1/sub-account/margin/accountSummary](https://developers.binance.com/docs/sub_account/asset-management/Get-Summary-of-Sub-accounts-Margin-Account) - getSummaryOfSubAccountsMarginAccount - [GetSummaryOfSubAccountsMarginAccountExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsMarginAccountExample.java#L47) +[GET /sapi/v1/sub-account/margin/accountSummary](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-summary-of-sub-accounts-margin-account) - getSummaryOfSubAccountsMarginAccount - [GetSummaryOfSubAccountsMarginAccountExample.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsMarginAccountExample.java#L36) -[POST /sapi/v1/sub-account/margin/transfer](https://developers.binance.com/docs/sub_account/asset-management/Margin-Transfer-for-Sub-account) - marginTransferForSubAccount - [MarginTransferForSubAccountExample.java:49](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/MarginTransferForSubAccountExample.java#L49) +[POST /sapi/v1/sub-account/margin/transfer](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#margin-transfer-for-sub-account) - marginTransferForSubAccount - [MarginTransferForSubAccountExample.java:39](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/MarginTransferForSubAccountExample.java#L39) -[POST /sapi/v1/sub-account/futures/move-position](https://developers.binance.com/docs/sub_account/asset-management/Move-Position-for-Sub-account) - movePositionForSubAccount - [MovePositionForSubAccountExample.java:57](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/MovePositionForSubAccountExample.java#L57) +[POST /sapi/v1/sub-account/futures/move-position](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#move-position-for-sub-account) - movePositionForSubAccount - [MovePositionForSubAccountExample.java:48](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/MovePositionForSubAccountExample.java#L48) -[GET /sapi/v3/sub-account/assets](https://developers.binance.com/docs/sub_account/asset-management/Query-Sub-account-Assets-V4) - querySubAccountAssets - [QuerySubAccountAssetsExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountAssetsExample.java#L47) +[GET /sapi/v3/sub-account/assets](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-assets) - querySubAccountAssets - [QuerySubAccountAssetsExample.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountAssetsExample.java#L36) -[GET /sapi/v4/sub-account/assets](https://developers.binance.com/docs/sub_account/asset-management/Query-Sub-account-Assets-V4) - querySubAccountAssetsAssetManagement - [QuerySubAccountAssetsAssetManagementExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountAssetsAssetManagementExample.java#L47) +[GET /sapi/v4/sub-account/assets](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-assets-asset-management) - querySubAccountAssetsAssetManagement - [QuerySubAccountAssetsAssetManagementExample.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountAssetsAssetManagementExample.java#L36) -[GET /sapi/v1/sub-account/futures/internalTransfer](https://developers.binance.com/docs/sub_account/asset-management/Query-Sub-account-Futures-Asset-Transfer-History) - querySubAccountFuturesAssetTransferHistory - [QuerySubAccountFuturesAssetTransferHistoryExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountFuturesAssetTransferHistoryExample.java#L47) +[GET /sapi/v1/sub-account/futures/internalTransfer](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-futures-asset-transfer-history) - querySubAccountFuturesAssetTransferHistory - [QuerySubAccountFuturesAssetTransferHistoryExample.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountFuturesAssetTransferHistoryExample.java#L36) -[GET /sapi/v1/sub-account/sub/transfer/history](https://developers.binance.com/docs/sub_account/asset-management/Query-Sub-account-Spot-Asset-Transfer-History) - querySubAccountSpotAssetTransferHistory - [QuerySubAccountSpotAssetTransferHistoryExample.java:48](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountSpotAssetTransferHistoryExample.java#L48) +[GET /sapi/v1/sub-account/sub/transfer/history](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-spot-asset-transfer-history) - querySubAccountSpotAssetTransferHistory - [QuerySubAccountSpotAssetTransferHistoryExample.java:39](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountSpotAssetTransferHistoryExample.java#L39) -[GET /sapi/v1/sub-account/spotSummary](https://developers.binance.com/docs/sub_account/asset-management/Query-Sub-account-Spot-Assets-Summary) - querySubAccountSpotAssetsSummary - [QuerySubAccountSpotAssetsSummaryExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountSpotAssetsSummaryExample.java#L47) +[GET /sapi/v1/sub-account/spotSummary](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-spot-assets-summary) - querySubAccountSpotAssetsSummary - [QuerySubAccountSpotAssetsSummaryExample.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountSpotAssetsSummaryExample.java#L36) -[GET /sapi/v1/sub-account/universalTransfer](https://developers.binance.com/docs/sub_account/asset-management/Query-Universal-Transfer-History) - queryUniversalTransferHistory - [QueryUniversalTransferHistoryExample.java:50](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QueryUniversalTransferHistoryExample.java#L50) +[GET /sapi/v1/sub-account/universalTransfer](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-universal-transfer-history) - queryUniversalTransferHistory - [QueryUniversalTransferHistoryExample.java:41](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QueryUniversalTransferHistoryExample.java#L41) -[POST /sapi/v1/sub-account/futures/internalTransfer](https://developers.binance.com/docs/sub_account/asset-management/Sub-account-Futures-Asset-Transfer) - subAccountFuturesAssetTransfer - [SubAccountFuturesAssetTransferExample.java:49](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/SubAccountFuturesAssetTransferExample.java#L49) +[POST /sapi/v1/sub-account/futures/internalTransfer](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#sub-account-futures-asset-transfer) - subAccountFuturesAssetTransfer - [SubAccountFuturesAssetTransferExample.java:39](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/SubAccountFuturesAssetTransferExample.java#L39) -[GET /sapi/v1/sub-account/transfer/subUserHistory](https://developers.binance.com/docs/sub_account/asset-management/Sub-account-Transfer-History) - subAccountTransferHistory - [SubAccountTransferHistoryExample.java:49](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/SubAccountTransferHistoryExample.java#L49) +[GET /sapi/v1/sub-account/transfer/subUserHistory](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#sub-account-transfer-history) - subAccountTransferHistory - [SubAccountTransferHistoryExample.java:39](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/SubAccountTransferHistoryExample.java#L39) -[POST /sapi/v1/sub-account/transfer/subToMaster](https://developers.binance.com/docs/sub_account/asset-management/Transfer-to-Master) - transferToMaster - [TransferToMasterExample.java:49](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/TransferToMasterExample.java#L49) +[POST /sapi/v1/sub-account/transfer/subToMaster](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#transfer-to-master) - transferToMaster - [TransferToMasterExample.java:38](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/TransferToMasterExample.java#L38) -[POST /sapi/v1/sub-account/transfer/subToSub](https://developers.binance.com/docs/sub_account/asset-management/Transfer-to-Sub-account-of-Same-Master) - transferToSubAccountOfSameMaster - [TransferToSubAccountOfSameMasterExample.java:49](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/TransferToSubAccountOfSameMasterExample.java#L49) +[POST /sapi/v1/sub-account/transfer/subToSub](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#transfer-to-sub-account-of-same-master) - transferToSubAccountOfSameMaster - [TransferToSubAccountOfSameMasterExample.java:39](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/TransferToSubAccountOfSameMasterExample.java#L39) -[POST /sapi/v1/sub-account/universalTransfer](https://developers.binance.com/docs/sub_account/asset-management/Universal-Transfer) - universalTransfer - [UniversalTransferExample.java:60](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/UniversalTransferExample.java#L60) +[POST /sapi/v1/sub-account/universalTransfer](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#universal-transfer) - universalTransfer - [UniversalTransferExample.java:52](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/UniversalTransferExample.java#L52) ## ManagedSubAccount -[POST /sapi/v1/managed-subaccount/deposit](https://developers.binance.com/docs/sub_account/managed-sub-account/Deposit-Assets-Into-The-Managed-Sub-account) - depositAssetsIntoTheManagedSubAccount - [DepositAssetsIntoTheManagedSubAccountExample.java:49](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/DepositAssetsIntoTheManagedSubAccountExample.java#L49) +[POST /sapi/v1/managed-subaccount/deposit](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#deposit-assets-into-the-managed-sub-account) - depositAssetsIntoTheManagedSubAccount - [DepositAssetsIntoTheManagedSubAccountExample.java:39](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/DepositAssetsIntoTheManagedSubAccountExample.java#L39) -[GET /sapi/v1/managed-subaccount/deposit/address](https://developers.binance.com/docs/sub_account/managed-sub-account/Get-Managed-Sub-account-Deposit-Address) - getManagedSubAccountDepositAddress - [GetManagedSubAccountDepositAddressExample.java:49](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/GetManagedSubAccountDepositAddressExample.java#L49) +[GET /sapi/v1/managed-subaccount/deposit/address](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#get-managed-sub-account-deposit-address) - getManagedSubAccountDepositAddress - [GetManagedSubAccountDepositAddressExample.java:39](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/GetManagedSubAccountDepositAddressExample.java#L39) -[GET /sapi/v1/managed-subaccount/asset](https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-account-Asset-Details) - queryManagedSubAccountAssetDetails - [QueryManagedSubAccountAssetDetailsExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountAssetDetailsExample.java#L47) +[GET /sapi/v1/managed-subaccount/asset](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-asset-details) - queryManagedSubAccountAssetDetails - [QueryManagedSubAccountAssetDetailsExample.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountAssetDetailsExample.java#L36) -[GET /sapi/v1/managed-subaccount/fetch-future-asset](https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-account-Futures-Asset-Details) - queryManagedSubAccountFuturesAssetDetails - [QueryManagedSubAccountFuturesAssetDetailsExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountFuturesAssetDetailsExample.java#L47) +[GET /sapi/v1/managed-subaccount/fetch-future-asset](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-futures-asset-details) - queryManagedSubAccountFuturesAssetDetails - [QueryManagedSubAccountFuturesAssetDetailsExample.java:37](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountFuturesAssetDetailsExample.java#L37) -[GET /sapi/v1/managed-subaccount/info](https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-account-List) - queryManagedSubAccountList - [QueryManagedSubAccountListExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountListExample.java#L47) +[GET /sapi/v1/managed-subaccount/info](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-list) - queryManagedSubAccountList - [QueryManagedSubAccountListExample.java:36](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountListExample.java#L36) -[GET /sapi/v1/managed-subaccount/marginAsset](https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-account-Margin-Asset-Details) - queryManagedSubAccountMarginAssetDetails - [QueryManagedSubAccountMarginAssetDetailsExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountMarginAssetDetailsExample.java#L47) +[GET /sapi/v1/managed-subaccount/marginAsset](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-margin-asset-details) - queryManagedSubAccountMarginAssetDetails - [QueryManagedSubAccountMarginAssetDetailsExample.java:37](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountMarginAssetDetailsExample.java#L37) -[GET /sapi/v1/managed-subaccount/accountSnapshot](https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-account-Snapshot) - queryManagedSubAccountSnapshot - [QueryManagedSubAccountSnapshotExample.java:49](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountSnapshotExample.java#L49) +[GET /sapi/v1/managed-subaccount/accountSnapshot](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-snapshot) - queryManagedSubAccountSnapshot - [QueryManagedSubAccountSnapshotExample.java:40](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountSnapshotExample.java#L40) -[GET /sapi/v1/managed-subaccount/queryTransLogForInvestor](https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-Account-Transfer-Log-Investor) - queryManagedSubAccountTransferLogMasterAccountInvestor - [QueryManagedSubAccountTransferLogMasterAccountInvestorExample.java:52](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountInvestorExample.java#L52) +[GET /sapi/v1/managed-subaccount/queryTransLogForInvestor](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-transfer-log-master-account-investor) - queryManagedSubAccountTransferLogMasterAccountInvestor - [QueryManagedSubAccountTransferLogMasterAccountInvestorExample.java:43](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountInvestorExample.java#L43) -[GET /sapi/v1/managed-subaccount/queryTransLogForTradeParent](https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-Account-Transfer-Log-Trading-Team-Master) - queryManagedSubAccountTransferLogMasterAccountTrading - [QueryManagedSubAccountTransferLogMasterAccountTradingExample.java:52](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountTradingExample.java#L52) +[GET /sapi/v1/managed-subaccount/queryTransLogForTradeParent](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-transfer-log-master-account-trading) - queryManagedSubAccountTransferLogMasterAccountTrading - [QueryManagedSubAccountTransferLogMasterAccountTradingExample.java:43](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountTradingExample.java#L43) -[GET /sapi/v1/managed-subaccount/query-trans-log](https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-Account-Transfer-Log-Trading-Team-Sub) - queryManagedSubAccountTransferLogSubAccountTrading - [QueryManagedSubAccountTransferLogSubAccountTradingExample.java:47](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogSubAccountTradingExample.java#L47) +[GET /sapi/v1/managed-subaccount/query-trans-log](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-transfer-log-sub-account-trading) - queryManagedSubAccountTransferLogSubAccountTrading - [QueryManagedSubAccountTransferLogSubAccountTradingExample.java:38](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogSubAccountTradingExample.java#L38) -[POST /sapi/v1/managed-subaccount/withdraw](https://developers.binance.com/docs/sub_account/managed-sub-account/Withdrawl-Assets-From-The-Managed-Sub-account) - withdrawlAssetsFromTheManagedSubAccount - [WithdrawlAssetsFromTheManagedSubAccountExample.java:49](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/WithdrawlAssetsFromTheManagedSubAccountExample.java#L49) +[POST /sapi/v1/managed-subaccount/withdraw](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#withdrawl-assets-from-the-managed-sub-account) - withdrawlAssetsFromTheManagedSubAccount - [WithdrawlAssetsFromTheManagedSubAccountExample.java:38](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/WithdrawlAssetsFromTheManagedSubAccountExample.java#L38) diff --git a/clients/sub-account/pom.xml b/clients/sub-account/pom.xml index 17aeb0859..a09e833ef 100644 --- a/clients/sub-account/pom.xml +++ b/clients/sub-account/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-sub-account sub-account - 5.0.1 + 6.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/JSON.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/JSON.java index 95789a3fe..682d6e78c 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/JSON.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -120,6 +120,12 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.sub_account.rest.model .CreateAVirtualSubAccountResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.sub_account.rest.model + .CreateSubAccountApiKeyRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.sub_account.rest.model + .CreateSubAccountApiKeyResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.sub_account.rest.model .DeleteIpListForASubAccountApiKeyResponse.CustomTypeAdapterFactory()); @@ -150,6 +156,10 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.sub_account.rest.model .GetDetailOnSubAccountsFuturesAccountResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.sub_account.rest.model + .GetDetailOnSubAccountsFuturesAccountResponseAssetsInner + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.sub_account.rest.model .GetDetailOnSubAccountsFuturesAccountV2Response.CustomTypeAdapterFactory()); @@ -165,10 +175,6 @@ private static Class getClassByDiscriminator( new com.binance.connector.client.sub_account.rest.model .GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.sub_account.rest.model - .GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.sub_account.rest.model .GetDetailOnSubAccountsMarginAccountResponse.CustomTypeAdapterFactory()); @@ -185,14 +191,14 @@ private static Class getClassByDiscriminator( .GetFuturesPositionRiskOfSubAccountResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.sub_account.rest.model - .GetFuturesPositionRiskOfSubAccountV2Response.CustomTypeAdapterFactory()); + .GetFuturesPositionRiskOfSubAccountResponseInner + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.sub_account.rest.model - .GetFuturesPositionRiskOfSubAccountV2ResponseDeliveryPositionRiskVosInner - .CustomTypeAdapterFactory()); + .GetFuturesPositionRiskOfSubAccountV2Response.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.sub_account.rest.model - .GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner + .GetFuturesPositionRiskOfSubAccountV2ResponseDeliveryPositionRiskVosInner .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.sub_account.rest.model @@ -226,6 +232,10 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.sub_account.rest.model .GetSummaryOfSubAccountsFuturesAccountResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.sub_account.rest.model + .GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.sub_account.rest.model .GetSummaryOfSubAccountsFuturesAccountV2Response @@ -242,10 +252,6 @@ private static Class getClassByDiscriminator( new com.binance.connector.client.sub_account.rest.model .GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.sub_account.rest.model - .GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.sub_account.rest.model .GetSummaryOfSubAccountsMarginAccountResponse.CustomTypeAdapterFactory()); @@ -259,6 +265,12 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.sub_account.rest.model .MarginTransferForSubAccountResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.sub_account.rest.model + .ModifySubAccountApiKeyPermissionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.sub_account.rest.model + .ModifySubAccountApiKeyPermissionResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.sub_account.rest.model .MovePositionForSubAccountRequest.CustomTypeAdapterFactory()); @@ -360,6 +372,12 @@ private static Class getClassByDiscriminator( new com.binance.connector.client.sub_account.rest.model .QueryManagedSubAccountTransferLogSubAccountTradingResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.sub_account.rest.model + .QuerySubAccountApiKeyResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.sub_account.rest.model + .QuerySubAccountApiKeyResponseListInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.sub_account.rest.model .QuerySubAccountAssetsAssetManagementResponse.CustomTypeAdapterFactory()); diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/AccountManagementApi.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/AccountManagementApi.java index 3b682283a..ee3f6349b 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/AccountManagementApi.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/AccountManagementApi.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -53,7 +53,7 @@ public class AccountManagementApi { private static final String USER_AGENT = String.format( - "binance-sub-account/5.0.0 (Java/%s; %s; %s)", + "binance-sub-account/6.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -104,7 +104,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Create + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#create-avirtual-sub-account">Create * a Virtual Sub-account (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call createAVirtualSubAccountCall( @@ -208,9 +208,10 @@ private okhttp3.Call createAVirtualSubAccountValidateBeforeCall( } /** - * Create a Virtual Sub-account (For Master Account) (USER_DATA) Create a Virtual Sub-account * - * This request will generate a virtual sub account under your master account. * You need to - * enable \"trade\" option for the API Key which requests this endpoint. Weight: 1 + * Create a Virtual Sub-account (For Master Account) (USER_DATA) Create a Virtual Sub-account + * Weight(IP): 1 Security Type: USER_DATA Notes: - This request generates a virtual sub-account + * under your master account. - The API key used to call this endpoint must have the + * `trade` option enabled. * * @param createAVirtualSubAccountRequest (required) * @return ApiResponse<CreateAVirtualSubAccountResponse> @@ -224,7 +225,7 @@ private okhttp3.Call createAVirtualSubAccountValidateBeforeCall( * * * @see Create + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#create-avirtual-sub-account">Create * a Virtual Sub-account (For Master Account) (USER_DATA) Documentation */ public ApiResponse createAVirtualSubAccount( @@ -251,7 +252,7 @@ public ApiResponse createAVirtualSubAccount( * * * @see Enable + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#enable-futures-for-sub-account">Enable * Futures for Sub-account (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call enableFuturesForSubAccountCall( @@ -357,7 +358,7 @@ private okhttp3.Call enableFuturesForSubAccountValidateBeforeCall( /** * Enable Futures for Sub-account (For Master Account) (USER_DATA) Enable Futures for - * Sub-account for Master Account Weight: 1 + * Sub-account for Master Account Weight(IP): 1 Security Type: USER_DATA * * @param enableFuturesForSubAccountRequest (required) * @return ApiResponse<EnableFuturesForSubAccountResponse> @@ -371,7 +372,7 @@ private okhttp3.Call enableFuturesForSubAccountValidateBeforeCall( * * * @see Enable + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#enable-futures-for-sub-account">Enable * Futures for Sub-account (For Master Account) (USER_DATA) Documentation */ public ApiResponse enableFuturesForSubAccount( @@ -398,7 +399,7 @@ public ApiResponse enableFuturesForSubAccoun * * * @see Enable + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#enable-options-for-sub-account">Enable * Options for Sub-account (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call enableOptionsForSubAccountCall( @@ -504,7 +505,7 @@ private okhttp3.Call enableOptionsForSubAccountValidateBeforeCall( /** * Enable Options for Sub-account (For Master Account) (USER_DATA) Enable Options for - * Sub-account (For Master Account). Weight: 1 + * Sub-account (For Master Account). Weight(IP): 1 Security Type: USER_DATA * * @param enableOptionsForSubAccountRequest (required) * @return ApiResponse<EnableOptionsForSubAccountResponse> @@ -518,7 +519,7 @@ private okhttp3.Call enableOptionsForSubAccountValidateBeforeCall( * * * @see Enable + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#enable-options-for-sub-account">Enable * Options for Sub-account (For Master Account) (USER_DATA) Documentation */ public ApiResponse enableOptionsForSubAccount( @@ -534,7 +535,7 @@ public ApiResponse enableOptionsForSubAccoun /** * Build call for getFuturesPositionRiskOfSubAccount * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -546,7 +547,7 @@ public ApiResponse enableOptionsForSubAccoun * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#get-futures-position-risk-of-sub-account">Get * Futures Position-Risk of Sub-account (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call getFuturesPositionRiskOfSubAccountCall(String email, Long recvWindow) @@ -649,9 +650,9 @@ private okhttp3.Call getFuturesPositionRiskOfSubAccountValidateBeforeCall( /** * Get Futures Position-Risk of Sub-account (For Master Account) (USER_DATA) Get Futures - * Position-Risk of Sub-account Weight: 10 + * Position-Risk of Sub-account Weight(IP): 10 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return ApiResponse<GetFuturesPositionRiskOfSubAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -664,11 +665,11 @@ private okhttp3.Call getFuturesPositionRiskOfSubAccountValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#get-futures-position-risk-of-sub-account">Get * Futures Position-Risk of Sub-account (For Master Account) (USER_DATA) Documentation */ public ApiResponse - getFuturesPositionRiskOfSubAccount(@NotNull String email, Long recvWindow) + getFuturesPositionRiskOfSubAccount(@NotNull String email, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFuturesPositionRiskOfSubAccountValidateBeforeCall(email, recvWindow); @@ -680,7 +681,7 @@ private okhttp3.Call getFuturesPositionRiskOfSubAccountValidateBeforeCall( /** * Build call for getFuturesPositionRiskOfSubAccountV2 * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) * @param recvWindow (optional) * @return Call to execute @@ -693,7 +694,7 @@ private okhttp3.Call getFuturesPositionRiskOfSubAccountValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#get-futures-position-risk-of-sub-account-v2">Get * Futures Position-Risk of Sub-account V2 (For Master Account) (USER_DATA) * Documentation */ @@ -805,9 +806,9 @@ private okhttp3.Call getFuturesPositionRiskOfSubAccountV2ValidateBeforeCall( /** * Get Futures Position-Risk of Sub-account V2 (For Master Account) (USER_DATA) Get Futures - * Position-Risk of Sub-account V2 Weight: 1 + * Position-Risk of Sub-account V2 Weight(IP): 1 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) * @param recvWindow (optional) * @return ApiResponse<GetFuturesPositionRiskOfSubAccountV2Response> @@ -821,13 +822,13 @@ private okhttp3.Call getFuturesPositionRiskOfSubAccountV2ValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#get-futures-position-risk-of-sub-account-v2">Get * Futures Position-Risk of Sub-account V2 (For Master Account) (USER_DATA) * Documentation */ public ApiResponse getFuturesPositionRiskOfSubAccountV2( - @NotNull String email, @NotNull Long futuresType, Long recvWindow) + @NotNull String email, @NotNull Long futuresType, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getFuturesPositionRiskOfSubAccountV2ValidateBeforeCall( @@ -840,7 +841,7 @@ private okhttp3.Call getFuturesPositionRiskOfSubAccountV2ValidateBeforeCall( /** * Build call for getSubAccountsStatusOnMarginOrFutures * - * @param email Managed sub-account email (optional) + * @param email (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -852,7 +853,7 @@ private okhttp3.Call getFuturesPositionRiskOfSubAccountV2ValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#get-sub-accounts-status-on-margin-or-futures">Get * Sub-account's Status on Margin Or Futures (For Master Account) (USER_DATA) * Documentation */ @@ -958,10 +959,10 @@ private okhttp3.Call getSubAccountsStatusOnMarginOrFuturesValidateBeforeCall( /** * Get Sub-account's Status on Margin Or Futures (For Master Account) (USER_DATA) Get - * Sub-account's Status on Margin Or Futures * If no email sent, all sub-accounts' - * information will be returned. Weight: 10 + * Sub-account's Status on Margin Or Futures Weight(IP): 10 Security Type: USER_DATA Notes: + * - If no email sent, all sub-accounts' information will be returned. * - * @param email Managed sub-account email (optional) + * @param email (optional) * @param recvWindow (optional) * @return ApiResponse<GetSubAccountsStatusOnMarginOrFuturesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -974,12 +975,12 @@ private okhttp3.Call getSubAccountsStatusOnMarginOrFuturesValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#get-sub-accounts-status-on-margin-or-futures">Get * Sub-account's Status on Margin Or Futures (For Master Account) (USER_DATA) * Documentation */ public ApiResponse - getSubAccountsStatusOnMarginOrFutures(String email, Long recvWindow) + getSubAccountsStatusOnMarginOrFutures(String email, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getSubAccountsStatusOnMarginOrFuturesValidateBeforeCall(email, recvWindow); @@ -991,10 +992,10 @@ private okhttp3.Call getSubAccountsStatusOnMarginOrFuturesValidateBeforeCall( /** * Build call for querySubAccountList * - * @param email Managed sub-account email (optional) - * @param isFreeze true or false (optional) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param email (optional) + * @param isFreeze (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1006,7 +1007,7 @@ private okhttp3.Call getSubAccountsStatusOnMarginOrFuturesValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#query-sub-account-list">Query * Sub-account List (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call querySubAccountListCall( @@ -1127,12 +1128,13 @@ private okhttp3.Call querySubAccountListValidateBeforeCall( } /** - * Query Sub-account List (For Master Account) (USER_DATA) Query Sub-account List Weight: 1 + * Query Sub-account List (For Master Account) (USER_DATA) Query Sub-account List Weight(IP): 1 + * Security Type: USER_DATA * - * @param email Managed sub-account email (optional) - * @param isFreeze true or false (optional) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param email (optional) + * @param isFreeze (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<QuerySubAccountListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1145,11 +1147,15 @@ private okhttp3.Call querySubAccountListValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#query-sub-account-list">Query * Sub-account List (For Master Account) (USER_DATA) Documentation */ public ApiResponse querySubAccountList( - String email, String isFreeze, Long page, Long limit, Long recvWindow) + String email, + String isFreeze, + Long page, + @Max(200L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = querySubAccountListValidateBeforeCall(email, isFreeze, page, limit, recvWindow); @@ -1173,7 +1179,7 @@ public ApiResponse querySubAccountList( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#query-sub-account-transaction-statistics">Query * Sub-account Transaction Statistics (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call querySubAccountTransactionStatisticsCall(String email, Long recvWindow) @@ -1278,7 +1284,7 @@ private okhttp3.Call querySubAccountTransactionStatisticsValidateBeforeCall( /** * Query Sub-account Transaction Statistics (For Master Account) (USER_DATA) Query Sub-account - * Transaction statistics (For Master Account). Weight: 60 + * Transaction statistics (For Master Account). Weight(IP): 60 Security Type: USER_DATA * * @param email Managed sub-account email (optional) * @param recvWindow (optional) @@ -1293,11 +1299,11 @@ private okhttp3.Call querySubAccountTransactionStatisticsValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#query-sub-account-transaction-statistics">Query * Sub-account Transaction Statistics (For Master Account) (USER_DATA) Documentation */ public ApiResponse - querySubAccountTransactionStatistics(String email, Long recvWindow) + querySubAccountTransactionStatistics(String email, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = querySubAccountTransactionStatisticsValidateBeforeCall(email, recvWindow); diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/ApiManagementApi.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/ApiManagementApi.java index 4bd685712..4bb3e7e0b 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/ApiManagementApi.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/ApiManagementApi.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -21,8 +21,13 @@ import com.binance.connector.client.common.exception.ConstraintViolationException; import com.binance.connector.client.sub_account.rest.model.AddIpRestrictionForSubAccountApiKeyRequest; import com.binance.connector.client.sub_account.rest.model.AddIpRestrictionForSubAccountApiKeyResponse; +import com.binance.connector.client.sub_account.rest.model.CreateSubAccountApiKeyRequest; +import com.binance.connector.client.sub_account.rest.model.CreateSubAccountApiKeyResponse; import com.binance.connector.client.sub_account.rest.model.DeleteIpListForASubAccountApiKeyResponse; import com.binance.connector.client.sub_account.rest.model.GetIpRestrictionForASubAccountApiKeyResponse; +import com.binance.connector.client.sub_account.rest.model.ModifySubAccountApiKeyPermissionRequest; +import com.binance.connector.client.sub_account.rest.model.ModifySubAccountApiKeyPermissionResponse; +import com.binance.connector.client.sub_account.rest.model.QuerySubAccountApiKeyResponse; import com.google.gson.reflect.TypeToken; import jakarta.validation.ConstraintViolation; import jakarta.validation.Valid; @@ -46,7 +51,7 @@ public class ApiManagementApi { private static final String USER_AGENT = String.format( - "binance-sub-account/5.0.0 (Java/%s; %s; %s)", + "binance-sub-account/6.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -97,7 +102,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Add + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/api-management#add-ip-restriction-for-sub-account-api-key">Add * IP Restriction for Sub-Account API key (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call addIpRestrictionForSubAccountApiKeyCall( @@ -221,8 +226,9 @@ private okhttp3.Call addIpRestrictionForSubAccountApiKeyValidateBeforeCall( /** * Add IP Restriction for Sub-Account API key (For Master Account) (USER_DATA) Add IP - * Restriction for Sub-Account API key * You need to enable Enable Spot & Margin Trading - * option for the api key which requests this endpoint Weight: 3000 + * Restriction for Sub-Account API key Weight(UID): 3000 Security Type: USER_DATA Notes: - You + * need to enable Enable Spot & Margin Trading option for the api key which requests this + * endpoint * * @param addIpRestrictionForSubAccountApiKeyRequest (required) * @return ApiResponse<AddIpRestrictionForSubAccountApiKeyResponse> @@ -236,7 +242,7 @@ private okhttp3.Call addIpRestrictionForSubAccountApiKeyValidateBeforeCall( * * * @see Add + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/api-management#add-ip-restriction-for-sub-account-api-key">Add * IP Restriction for Sub-Account API key (For Master Account) (USER_DATA) Documentation */ public ApiResponse @@ -253,10 +259,203 @@ private okhttp3.Call addIpRestrictionForSubAccountApiKeyValidateBeforeCall( return localVarApiClient.execute(localVarCall, localVarReturnType); } + /** + * Build call for createSubAccountApiKey + * + * @param createSubAccountApiKeyRequest (required) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Create Sub-account API Key -
+ * + * @see Create + * Sub-account API Key (For Master Account) (USER_DATA) Documentation + */ + private okhttp3.Call createSubAccountApiKeyCall( + CreateSubAccountApiKeyRequest createSubAccountApiKeyRequest) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/sub-account/subAccountApi"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (createSubAccountApiKeyRequest.getEmail() != null) { + localVarFormParams.put("email", createSubAccountApiKeyRequest.getEmail()); + } + + if (createSubAccountApiKeyRequest.getApiName() != null) { + localVarFormParams.put("apiName", createSubAccountApiKeyRequest.getApiName()); + } + + if (createSubAccountApiKeyRequest.getStatus() != null) { + localVarFormParams.put("status", createSubAccountApiKeyRequest.getStatus()); + } + + if (createSubAccountApiKeyRequest.getCanTrade() != null) { + localVarFormParams.put("canTrade", createSubAccountApiKeyRequest.getCanTrade()); + } + + if (createSubAccountApiKeyRequest.getCanMarginLoanRepay() != null) { + localVarFormParams.put( + "canMarginLoanRepay", createSubAccountApiKeyRequest.getCanMarginLoanRepay()); + } + + if (createSubAccountApiKeyRequest.getCanFuturesTrade() != null) { + localVarFormParams.put( + "canFuturesTrade", createSubAccountApiKeyRequest.getCanFuturesTrade()); + } + + if (createSubAccountApiKeyRequest.getCanUniversalTransfer() != null) { + localVarFormParams.put( + "canUniversalTransfer", + createSubAccountApiKeyRequest.getCanUniversalTransfer()); + } + + if (createSubAccountApiKeyRequest.getCanVanillaOptions() != null) { + localVarFormParams.put( + "canVanillaOptions", createSubAccountApiKeyRequest.getCanVanillaOptions()); + } + + if (createSubAccountApiKeyRequest.getIpAddress() != null) { + localVarFormParams.put("ipAddress", createSubAccountApiKeyRequest.getIpAddress()); + } + + if (createSubAccountApiKeyRequest.getThirdPartyName() != null) { + localVarFormParams.put( + "thirdPartyName", createSubAccountApiKeyRequest.getThirdPartyName()); + } + + if (createSubAccountApiKeyRequest.getPublicKey() != null) { + localVarFormParams.put("publicKey", createSubAccountApiKeyRequest.getPublicKey()); + } + + if (createSubAccountApiKeyRequest.getRecvWindow() != null) { + localVarFormParams.put("recvWindow", createSubAccountApiKeyRequest.getRecvWindow()); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createSubAccountApiKeyValidateBeforeCall( + CreateSubAccountApiKeyRequest createSubAccountApiKeyRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {createSubAccountApiKeyRequest}; + Method method = + this.getClass() + .getMethod( + "createSubAccountApiKey", CreateSubAccountApiKeyRequest.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return createSubAccountApiKeyCall(createSubAccountApiKeyRequest); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Create Sub-account API Key (For Master Account) (USER_DATA) Create a new API Key for a + * sub-account. Weight(UID): 3000 Security Type: USER_DATA Notes: - `status=2` + * requires `ipAddress` - `status=3` requires + * `thirdPartyName` - Asset Sub Account is not supported - The caller must pass the + * KYC IP restriction check + * + * @param createSubAccountApiKeyRequest (required) + * @return ApiResponse<CreateSubAccountApiKeyResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Create Sub-account API Key -
+ * + * @see Create + * Sub-account API Key (For Master Account) (USER_DATA) Documentation + */ + public ApiResponse createSubAccountApiKey( + @Valid @NotNull CreateSubAccountApiKeyRequest createSubAccountApiKeyRequest) + throws ApiException { + okhttp3.Call localVarCall = + createSubAccountApiKeyValidateBeforeCall(createSubAccountApiKeyRequest); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + /** * Build call for deleteIpListForASubAccountApiKey * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param subAccountApiKey (required) * @param ipAddress IPs to be deleted. Can be added in batches, separated by commas (required) * @param recvWindow (optional) @@ -270,7 +469,7 @@ private okhttp3.Call addIpRestrictionForSubAccountApiKeyValidateBeforeCall( * * * @see Delete + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/api-management#delete-ip-list-for-asub-account-api-key">Delete * IP List For a Sub-account API Key (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call deleteIpListForASubAccountApiKeyCall( @@ -389,10 +588,10 @@ private okhttp3.Call deleteIpListForASubAccountApiKeyValidateBeforeCall( /** * Delete IP List For a Sub-account API Key (For Master Account) (USER_DATA) Delete IP List For - * a Sub-account API Key * You need to enable Enable Spot & Margin Trading option for the - * api key which requests this endpoint Weight: 3000 + * a Sub-account API Key Weight(UID): 3000 Security Type: USER_DATA Notes: - You need to enable + * Enable Spot & Margin Trading option for the api key which requests this endpoint * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param subAccountApiKey (required) * @param ipAddress IPs to be deleted. Can be added in batches, separated by commas (required) * @param recvWindow (optional) @@ -407,14 +606,14 @@ private okhttp3.Call deleteIpListForASubAccountApiKeyValidateBeforeCall( * * * @see Delete + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/api-management#delete-ip-list-for-asub-account-api-key">Delete * IP List For a Sub-account API Key (For Master Account) (USER_DATA) Documentation */ public ApiResponse deleteIpListForASubAccountApiKey( @NotNull String email, @NotNull String subAccountApiKey, @NotNull String ipAddress, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = deleteIpListForASubAccountApiKeyValidateBeforeCall( @@ -425,10 +624,10 @@ public ApiResponse deleteIpListForASub } /** - * Build call for getIpRestrictionForASubAccountApiKey + * Build call for deleteSubAccountApiKey * - * @param email [Sub-account email](#email-address) (required) - * @param subAccountApiKey (required) + * @param email Sub-account email (required) + * @param subAccountApiKey The sub-account API Key to be deleted (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -436,15 +635,14 @@ public ApiResponse deleteIpListForASub * * * - * + * *
Response Details
Status Code Description Response Headers
200 Get IP Restriction for a Sub-account API Key -
200 Delete Sub-account API Key -
* * @see Get - * IP Restriction for a Sub-account API Key (For Master Account) (USER_DATA) - * Documentation + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/api-management#delete-sub-account-api-key">Delete + * Sub-account API Key (For Master Account) (USER_DATA) Documentation */ - private okhttp3.Call getIpRestrictionForASubAccountApiKeyCall( + private okhttp3.Call deleteSubAccountApiKeyCall( String email, String subAccountApiKey, Long recvWindow) throws ApiException { String basePath = null; // Operation Servers @@ -462,7 +660,7 @@ private okhttp3.Call getIpRestrictionForASubAccountApiKeyCall( Object localVarPostBody = null; // create path and map variables - String localVarPath = "/sapi/v1/sub-account/subAccountApi/ipRestriction"; + String localVarPath = "/sapi/v1/sub-account/subAccountApi"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -503,7 +701,7 @@ private okhttp3.Call getIpRestrictionForASubAccountApiKeyCall( return localVarApiClient.buildCall( basePath, localVarPath, - "GET", + "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, @@ -514,7 +712,7 @@ private okhttp3.Call getIpRestrictionForASubAccountApiKeyCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call getIpRestrictionForASubAccountApiKeyValidateBeforeCall( + private okhttp3.Call deleteSubAccountApiKeyValidateBeforeCall( String email, String subAccountApiKey, Long recvWindow) throws ApiException { try { Validator validator = @@ -529,7 +727,7 @@ private okhttp3.Call getIpRestrictionForASubAccountApiKeyValidateBeforeCall( Method method = this.getClass() .getMethod( - "getIpRestrictionForASubAccountApiKey", + "deleteSubAccountApiKey", String.class, String.class, Long.class); @@ -537,8 +735,7 @@ private okhttp3.Call getIpRestrictionForASubAccountApiKeyValidateBeforeCall( executableValidator.validateParameters(this, method, parameterValues); if (violations.size() == 0) { - return getIpRestrictionForASubAccountApiKeyCall( - email, subAccountApiKey, recvWindow); + return deleteSubAccountApiKeyCall(email, subAccountApiKey, recvWindow); } else { throw new ConstraintViolationException((Set) violations); } @@ -552,36 +749,561 @@ private okhttp3.Call getIpRestrictionForASubAccountApiKeyValidateBeforeCall( } /** - * Get IP Restriction for a Sub-account API Key (For Master Account) (USER_DATA) Get IP - * Restriction for a Sub-account API Key Weight: 3000 + * Delete Sub-account API Key (For Master Account) (USER_DATA) Delete an API Key of a + * sub-account. Weight(UID): 3000 Security Type: USER_DATA Notes: - Asset Sub Account is not + * supported - The caller must pass the KYC IP restriction check * - * @param email [Sub-account email](#email-address) (required) - * @param subAccountApiKey (required) + * @param email Sub-account email (required) + * @param subAccountApiKey The sub-account API Key to be deleted (required) * @param recvWindow (optional) - * @return ApiResponse<GetIpRestrictionForASubAccountApiKeyResponse> + * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * + * + *
Response Details
Status Code Description Response Headers
200 Delete Sub-account API Key -
+ * + * @see Delete + * Sub-account API Key (For Master Account) (USER_DATA) Documentation + */ + public ApiResponse deleteSubAccountApiKey( + @NotNull String email, @NotNull String subAccountApiKey, @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = + deleteSubAccountApiKeyValidateBeforeCall(email, subAccountApiKey, recvWindow); + java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for getIpRestrictionForASubAccountApiKey + * + * @param email (required) + * @param subAccountApiKey (required) + * @param recvWindow (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * * *
Response Details
Status Code Description Response Headers
200 Get IP Restriction for a Sub-account API Key -
* * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/api-management#get-ip-restriction-for-asub-account-api-key">Get * IP Restriction for a Sub-account API Key (For Master Account) (USER_DATA) * Documentation */ - public ApiResponse - getIpRestrictionForASubAccountApiKey( - @NotNull String email, @NotNull String subAccountApiKey, Long recvWindow) - throws ApiException { - okhttp3.Call localVarCall = - getIpRestrictionForASubAccountApiKeyValidateBeforeCall( - email, subAccountApiKey, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); + private okhttp3.Call getIpRestrictionForASubAccountApiKeyCall( + String email, String subAccountApiKey, Long recvWindow) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/sub-account/subAccountApi/ipRestriction"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (email != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("email", email)); + } + + if (subAccountApiKey != null) { + localVarQueryParams.addAll( + localVarApiClient.parameterToPair("subAccountApiKey", subAccountApiKey)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getIpRestrictionForASubAccountApiKeyValidateBeforeCall( + String email, String subAccountApiKey, Long recvWindow) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {email, subAccountApiKey, recvWindow}; + Method method = + this.getClass() + .getMethod( + "getIpRestrictionForASubAccountApiKey", + String.class, + String.class, + Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return getIpRestrictionForASubAccountApiKeyCall( + email, subAccountApiKey, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Get IP Restriction for a Sub-account API Key (For Master Account) (USER_DATA) Get IP + * Restriction for a Sub-account API Key Weight(UID): 3000 Security Type: USER_DATA + * + * @param email (required) + * @param subAccountApiKey (required) + * @param recvWindow (optional) + * @return ApiResponse<GetIpRestrictionForASubAccountApiKeyResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get IP Restriction for a Sub-account API Key -
+ * + * @see Get + * IP Restriction for a Sub-account API Key (For Master Account) (USER_DATA) + * Documentation + */ + public ApiResponse + getIpRestrictionForASubAccountApiKey( + @NotNull String email, + @NotNull String subAccountApiKey, + @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = + getIpRestrictionForASubAccountApiKeyValidateBeforeCall( + email, subAccountApiKey, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for modifySubAccountApiKeyPermission + * + * @param modifySubAccountApiKeyPermissionRequest (required) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Modify Sub-account API Key Permission -
+ * + * @see Modify + * Sub-account API Key Permission (For Master Account) (USER_DATA) Documentation + */ + private okhttp3.Call modifySubAccountApiKeyPermissionCall( + ModifySubAccountApiKeyPermissionRequest modifySubAccountApiKeyPermissionRequest) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/sub-account/subAccountApiPermission"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (modifySubAccountApiKeyPermissionRequest.getEmail() != null) { + localVarFormParams.put("email", modifySubAccountApiKeyPermissionRequest.getEmail()); + } + + if (modifySubAccountApiKeyPermissionRequest.getSubAccountApiKey() != null) { + localVarFormParams.put( + "subAccountApiKey", + modifySubAccountApiKeyPermissionRequest.getSubAccountApiKey()); + } + + if (modifySubAccountApiKeyPermissionRequest.getCanTrade() != null) { + localVarFormParams.put( + "canTrade", modifySubAccountApiKeyPermissionRequest.getCanTrade()); + } + + if (modifySubAccountApiKeyPermissionRequest.getCanMarginLoanRepay() != null) { + localVarFormParams.put( + "canMarginLoanRepay", + modifySubAccountApiKeyPermissionRequest.getCanMarginLoanRepay()); + } + + if (modifySubAccountApiKeyPermissionRequest.getCanFuturesTrade() != null) { + localVarFormParams.put( + "canFuturesTrade", + modifySubAccountApiKeyPermissionRequest.getCanFuturesTrade()); + } + + if (modifySubAccountApiKeyPermissionRequest.getCanUniversalTransfer() != null) { + localVarFormParams.put( + "canUniversalTransfer", + modifySubAccountApiKeyPermissionRequest.getCanUniversalTransfer()); + } + + if (modifySubAccountApiKeyPermissionRequest.getCanVanillaOptions() != null) { + localVarFormParams.put( + "canVanillaOptions", + modifySubAccountApiKeyPermissionRequest.getCanVanillaOptions()); + } + + if (modifySubAccountApiKeyPermissionRequest.getRecvWindow() != null) { + localVarFormParams.put( + "recvWindow", modifySubAccountApiKeyPermissionRequest.getRecvWindow()); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call modifySubAccountApiKeyPermissionValidateBeforeCall( + ModifySubAccountApiKeyPermissionRequest modifySubAccountApiKeyPermissionRequest) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {modifySubAccountApiKeyPermissionRequest}; + Method method = + this.getClass() + .getMethod( + "modifySubAccountApiKeyPermission", + ModifySubAccountApiKeyPermissionRequest.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return modifySubAccountApiKeyPermissionCall( + modifySubAccountApiKeyPermissionRequest); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Modify Sub-account API Key Permission (For Master Account) (USER_DATA) Modify the trading + * permissions of a sub-account API Key. Weight(UID): 3000 Security Type: USER_DATA Notes: - + * Portfolio Margin Retail User is not supported - Asset Sub Account is not supported - The + * caller must pass the KYC IP restriction check + * + * @param modifySubAccountApiKeyPermissionRequest (required) + * @return ApiResponse<ModifySubAccountApiKeyPermissionResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Modify Sub-account API Key Permission -
+ * + * @see Modify + * Sub-account API Key Permission (For Master Account) (USER_DATA) Documentation + */ + public ApiResponse modifySubAccountApiKeyPermission( + @Valid @NotNull + ModifySubAccountApiKeyPermissionRequest modifySubAccountApiKeyPermissionRequest) + throws ApiException { + okhttp3.Call localVarCall = + modifySubAccountApiKeyPermissionValidateBeforeCall( + modifySubAccountApiKeyPermissionRequest); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for querySubAccountApiKey + * + * @param email Sub-account email (required) + * @param subAccountApiKey Specify an API Key for exact match (optional) + * @param page Page number, default 1, minimum 1 (optional) + * @param size Page size, default 30, maximum 100 (optional) + * @param recvWindow (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Query Sub-account API Key -
+ * + * @see Query + * Sub-account API Key (For Master Account) (USER_DATA) Documentation + */ + private okhttp3.Call querySubAccountApiKeyCall( + String email, String subAccountApiKey, Long page, Long size, Long recvWindow) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/sub-account/subAccountApi"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (email != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("email", email)); + } + + if (subAccountApiKey != null) { + localVarQueryParams.addAll( + localVarApiClient.parameterToPair("subAccountApiKey", subAccountApiKey)); + } + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (size != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call querySubAccountApiKeyValidateBeforeCall( + String email, String subAccountApiKey, Long page, Long size, Long recvWindow) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {email, subAccountApiKey, page, size, recvWindow}; + Method method = + this.getClass() + .getMethod( + "querySubAccountApiKey", + String.class, + String.class, + Long.class, + Long.class, + Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return querySubAccountApiKeyCall(email, subAccountApiKey, page, size, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Query Sub-account API Key (For Master Account) (USER_DATA) Query the API Key list of a + * sub-account. Weight(UID): 3000 Security Type: USER_DATA + * + * @param email Sub-account email (required) + * @param subAccountApiKey Specify an API Key for exact match (optional) + * @param page Page number, default 1, minimum 1 (optional) + * @param size Page size, default 30, maximum 100 (optional) + * @param recvWindow (optional) + * @return ApiResponse<QuerySubAccountApiKeyResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Query Sub-account API Key -
+ * + * @see Query + * Sub-account API Key (For Master Account) (USER_DATA) Documentation + */ + public ApiResponse querySubAccountApiKey( + @NotNull String email, + String subAccountApiKey, + @Min(1L) Long page, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = + querySubAccountApiKeyValidateBeforeCall( + email, subAccountApiKey, page, size, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } } diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/AssetManagementApi.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/AssetManagementApi.java index 2cddc0659..b3c848e4c 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/AssetManagementApi.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/AssetManagementApi.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -74,7 +74,7 @@ public class AssetManagementApi { private static final String USER_AGENT = String.format( - "binance-sub-account/5.0.0 (Java/%s; %s; %s)", + "binance-sub-account/6.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -125,7 +125,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Futures + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#futures-transfer-for-sub-account">Futures * Transfer for Sub-account (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call futuresTransferForSubAccountCall( @@ -247,8 +247,8 @@ private okhttp3.Call futuresTransferForSubAccountValidateBeforeCall( /** * Futures Transfer for Sub-account (For Master Account) (USER_DATA) Futures Transfer for - * Sub-account * You need to open Enable Spot & Margin Trading permission for the API Key - * which requests this endpoint. Weight: 1 + * Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - You need to open Enable Spot + * & Margin Trading permission for the API Key which requests this endpoint. * * @param futuresTransferForSubAccountRequest (required) * @return ApiResponse<FuturesTransferForSubAccountResponse> @@ -262,7 +262,7 @@ private okhttp3.Call futuresTransferForSubAccountValidateBeforeCall( * * * @see Futures + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#futures-transfer-for-sub-account">Futures * Transfer for Sub-account (For Master Account) (USER_DATA) Documentation */ public ApiResponse futuresTransferForSubAccount( @@ -278,7 +278,7 @@ public ApiResponse futuresTransferForSubAc /** * Build call for getDetailOnSubAccountsFuturesAccount * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -290,7 +290,7 @@ public ApiResponse futuresTransferForSubAc * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-detail-on-sub-accounts-futures-account">Get * Detail on Sub-account's Futures Account (For Master Account) (USER_DATA) * Documentation */ @@ -396,9 +396,9 @@ private okhttp3.Call getDetailOnSubAccountsFuturesAccountValidateBeforeCall( /** * Get Detail on Sub-account's Futures Account (For Master Account) (USER_DATA) Get Detail - * on Sub-account's Futures Account Weight: 10 + * on Sub-account's Futures Account Weight(IP): 10 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return ApiResponse<GetDetailOnSubAccountsFuturesAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -411,13 +411,13 @@ private okhttp3.Call getDetailOnSubAccountsFuturesAccountValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-detail-on-sub-accounts-futures-account">Get * Detail on Sub-account's Futures Account (For Master Account) (USER_DATA) * Documentation */ public ApiResponse - getDetailOnSubAccountsFuturesAccount(@NotNull String email, Long recvWindow) - throws ApiException { + getDetailOnSubAccountsFuturesAccount( + @NotNull String email, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getDetailOnSubAccountsFuturesAccountValidateBeforeCall(email, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -428,7 +428,7 @@ private okhttp3.Call getDetailOnSubAccountsFuturesAccountValidateBeforeCall( /** * Build call for getDetailOnSubAccountsFuturesAccountV2 * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) * @param recvWindow (optional) * @return Call to execute @@ -441,7 +441,7 @@ private okhttp3.Call getDetailOnSubAccountsFuturesAccountValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-detail-on-sub-accounts-futures-account-v2">Get * Detail on Sub-account's Futures Account V2 (For Master Account) (USER_DATA) * Documentation */ @@ -553,9 +553,9 @@ private okhttp3.Call getDetailOnSubAccountsFuturesAccountV2ValidateBeforeCall( /** * Get Detail on Sub-account's Futures Account V2 (For Master Account) (USER_DATA) Get - * Detail on Sub-account's Futures Account Weight: 1 + * Detail on Sub-account's Futures Account Weight(IP): 1 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) * @param recvWindow (optional) * @return ApiResponse<GetDetailOnSubAccountsFuturesAccountV2Response> @@ -569,13 +569,13 @@ private okhttp3.Call getDetailOnSubAccountsFuturesAccountV2ValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-detail-on-sub-accounts-futures-account-v2">Get * Detail on Sub-account's Futures Account V2 (For Master Account) (USER_DATA) * Documentation */ public ApiResponse getDetailOnSubAccountsFuturesAccountV2( - @NotNull String email, @NotNull Long futuresType, Long recvWindow) + @NotNull String email, @NotNull Long futuresType, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getDetailOnSubAccountsFuturesAccountV2ValidateBeforeCall( @@ -588,7 +588,7 @@ private okhttp3.Call getDetailOnSubAccountsFuturesAccountV2ValidateBeforeCall( /** * Build call for getDetailOnSubAccountsMarginAccount * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -600,7 +600,7 @@ private okhttp3.Call getDetailOnSubAccountsFuturesAccountV2ValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-detail-on-sub-accounts-margin-account">Get * Detail on Sub-account's Margin Account (For Master Account) (USER_DATA) * Documentation */ @@ -706,9 +706,9 @@ private okhttp3.Call getDetailOnSubAccountsMarginAccountValidateBeforeCall( /** * Get Detail on Sub-account's Margin Account (For Master Account) (USER_DATA) Get Detail on - * Sub-account's Margin Account Weight: 10 + * Sub-account's Margin Account Weight(IP): 10 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return ApiResponse<GetDetailOnSubAccountsMarginAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -721,12 +721,12 @@ private okhttp3.Call getDetailOnSubAccountsMarginAccountValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-detail-on-sub-accounts-margin-account">Get * Detail on Sub-account's Margin Account (For Master Account) (USER_DATA) * Documentation */ public ApiResponse - getDetailOnSubAccountsMarginAccount(@NotNull String email, Long recvWindow) + getDetailOnSubAccountsMarginAccount(@NotNull String email, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getDetailOnSubAccountsMarginAccountValidateBeforeCall(email, recvWindow); @@ -739,8 +739,8 @@ private okhttp3.Call getDetailOnSubAccountsMarginAccountValidateBeforeCall( * Build call for getMovePositionHistoryForSubAccount * * @param symbol (required) - * @param page Page (required) - * @param row (required) + * @param page (required) + * @param rows (required) * @param startTime (optional) * @param endTime (optional) * @param recvWindow (optional) @@ -754,11 +754,11 @@ private okhttp3.Call getDetailOnSubAccountsMarginAccountValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-move-position-history-for-sub-account">Get * Move Position History for Sub-account (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call getMovePositionHistoryForSubAccountCall( - String symbol, Long page, Long row, Long startTime, Long endTime, Long recvWindow) + String symbol, Long page, Long rows, Long startTime, Long endTime, Long recvWindow) throws ApiException { String basePath = null; // Operation Servers @@ -800,8 +800,8 @@ private okhttp3.Call getMovePositionHistoryForSubAccountCall( localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); } - if (row != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("row", row)); + if (rows != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("rows", rows)); } if (recvWindow != null) { @@ -840,7 +840,7 @@ private okhttp3.Call getMovePositionHistoryForSubAccountCall( @SuppressWarnings("rawtypes") private okhttp3.Call getMovePositionHistoryForSubAccountValidateBeforeCall( - String symbol, Long page, Long row, Long startTime, Long endTime, Long recvWindow) + String symbol, Long page, Long rows, Long startTime, Long endTime, Long recvWindow) throws ApiException { try { Validator validator = @@ -851,7 +851,7 @@ private okhttp3.Call getMovePositionHistoryForSubAccountValidateBeforeCall( .getValidator(); ExecutableValidator executableValidator = validator.forExecutables(); - Object[] parameterValues = {symbol, page, row, startTime, endTime, recvWindow}; + Object[] parameterValues = {symbol, page, rows, startTime, endTime, recvWindow}; Method method = this.getClass() .getMethod( @@ -867,7 +867,7 @@ private okhttp3.Call getMovePositionHistoryForSubAccountValidateBeforeCall( if (violations.size() == 0) { return getMovePositionHistoryForSubAccountCall( - symbol, page, row, startTime, endTime, recvWindow); + symbol, page, rows, startTime, endTime, recvWindow); } else { throw new ConstraintViolationException((Set) violations); } @@ -882,15 +882,16 @@ private okhttp3.Call getMovePositionHistoryForSubAccountValidateBeforeCall( /** * Get Move Position History for Sub-account (For Master Account) (USER_DATA) Query move - * position history * If `startTime` and `endTime` not sent, return records - * of the last 90 days by default with 1000 maximum limits * If `startTime` is sent - * and `endTime` is not sent, return records of [max(startTime, now-90d), now]. * If - * `startTime` is not sent and `endTime` is sent, return records of - * [max(now,endTime-90d), endTime]. Weight: 1 + * position history Weight(IP): 1 Security Type: USER_DATA Notes: - If `startTime` and + * `endTime` are both omitted, records from the last 90 days are returned by default + * (up to 1000 records). - If `startTime` is sent and `endTime` is omitted, + * records in `[max(startTime, now-90d), now]` are returned. - If + * `startTime` is omitted and `endTime` is sent, records in `[max(now, + * endTime-90d), endTime]` are returned. * * @param symbol (required) - * @param page Page (required) - * @param row (required) + * @param page (required) + * @param rows (required) * @param startTime (optional) * @param endTime (optional) * @param recvWindow (optional) @@ -905,21 +906,21 @@ private okhttp3.Call getMovePositionHistoryForSubAccountValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-move-position-history-for-sub-account">Get * Move Position History for Sub-account (For Master Account) (USER_DATA) Documentation */ public ApiResponse getMovePositionHistoryForSubAccount( @NotNull String symbol, @NotNull Long page, - @NotNull Long row, + @NotNull Long rows, Long startTime, Long endTime, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getMovePositionHistoryForSubAccountValidateBeforeCall( - symbol, page, row, startTime, endTime, recvWindow); + symbol, page, rows, startTime, endTime, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -928,7 +929,7 @@ private okhttp3.Call getMovePositionHistoryForSubAccountValidateBeforeCall( /** * Build call for getSubAccountDepositAddress * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param coin (required) * @param network networks can be found in `GET /sapi/v1/capital/deposit/address` * (optional) @@ -944,7 +945,7 @@ private okhttp3.Call getMovePositionHistoryForSubAccountValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-sub-account-deposit-address">Get * Sub-account Deposit Address (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call getSubAccountDepositAddressCall( @@ -1068,9 +1069,10 @@ private okhttp3.Call getSubAccountDepositAddressValidateBeforeCall( /** * Get Sub-account Deposit Address (For Master Account) (USER_DATA) Fetch sub-account deposit - * address * `amount` needs to be sent if using LIGHTNING network Weight: 1 + * address Weight(IP): 1 Security Type: USER_DATA Notes: - `amount` needs to be sent + * if using LIGHTNING network * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param coin (required) * @param network networks can be found in `GET /sapi/v1/capital/deposit/address` * (optional) @@ -1087,7 +1089,7 @@ private okhttp3.Call getSubAccountDepositAddressValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-sub-account-deposit-address">Get * Sub-account Deposit Address (For Master Account) (USER_DATA) Documentation */ public ApiResponse getSubAccountDepositAddress( @@ -1095,7 +1097,7 @@ public ApiResponse getSubAccountDepositAddr @NotNull String coin, String network, Double amount, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getSubAccountDepositAddressValidateBeforeCall( @@ -1108,14 +1110,16 @@ public ApiResponse getSubAccountDepositAddr /** * Build call for getSubAccountDepositHistory * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) + * @param includeSource Default `false`, return `sourceAddress` field when + * set to `true` (optional) * @param coin (optional) - * @param status 0(0:pending,6: credited but cannot withdraw,7:Wrong Deposit,8:Waiting User - * confirm,1:success) (optional) + * @param status Deposit status: 0=pending, 6=credited but cannot withdraw, + * 7=wrong deposit, 8=waiting user confirmation, 1=success. (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default value: 1, Max value: 200 (optional) - * @param offset default:0 (optional) + * @param limit (optional) + * @param offset (optional) * @param recvWindow (optional) * @param txId (optional) * @return Call to execute @@ -1128,11 +1132,12 @@ public ApiResponse getSubAccountDepositAddr * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-sub-account-deposit-history">Get * Sub-account Deposit History (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call getSubAccountDepositHistoryCall( String email, + Boolean includeSource, String coin, Long status, Long startTime, @@ -1170,6 +1175,11 @@ private okhttp3.Call getSubAccountDepositHistoryCall( localVarQueryParams.addAll(localVarApiClient.parameterToPair("email", email)); } + if (includeSource != null) { + localVarQueryParams.addAll( + localVarApiClient.parameterToPair("includeSource", includeSource)); + } + if (coin != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("coin", coin)); } @@ -1235,6 +1245,7 @@ private okhttp3.Call getSubAccountDepositHistoryCall( @SuppressWarnings("rawtypes") private okhttp3.Call getSubAccountDepositHistoryValidateBeforeCall( String email, + Boolean includeSource, String coin, Long status, Long startTime, @@ -1254,13 +1265,23 @@ private okhttp3.Call getSubAccountDepositHistoryValidateBeforeCall( ExecutableValidator executableValidator = validator.forExecutables(); Object[] parameterValues = { - email, coin, status, startTime, endTime, limit, offset, recvWindow, txId + email, + includeSource, + coin, + status, + startTime, + endTime, + limit, + offset, + recvWindow, + txId }; Method method = this.getClass() .getMethod( "getSubAccountDepositHistory", String.class, + Boolean.class, String.class, Long.class, Long.class, @@ -1274,7 +1295,16 @@ private okhttp3.Call getSubAccountDepositHistoryValidateBeforeCall( if (violations.size() == 0) { return getSubAccountDepositHistoryCall( - email, coin, status, startTime, endTime, limit, offset, recvWindow, txId); + email, + includeSource, + coin, + status, + startTime, + endTime, + limit, + offset, + recvWindow, + txId); } else { throw new ConstraintViolationException((Set) violations); } @@ -1289,16 +1319,18 @@ private okhttp3.Call getSubAccountDepositHistoryValidateBeforeCall( /** * Get Sub-account Deposit History (For Master Account) (USER_DATA) Fetch sub-account deposit - * history Weight: 1 + * history Weight(IP): 1 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) + * @param includeSource Default `false`, return `sourceAddress` field when + * set to `true` (optional) * @param coin (optional) - * @param status 0(0:pending,6: credited but cannot withdraw,7:Wrong Deposit,8:Waiting User - * confirm,1:success) (optional) + * @param status Deposit status: 0=pending, 6=credited but cannot withdraw, + * 7=wrong deposit, 8=waiting user confirmation, 1=success. (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default value: 1, Max value: 200 (optional) - * @param offset default:0 (optional) + * @param limit (optional) + * @param offset (optional) * @param recvWindow (optional) * @param txId (optional) * @return ApiResponse<GetSubAccountDepositHistoryResponse> @@ -1312,23 +1344,33 @@ private okhttp3.Call getSubAccountDepositHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-sub-account-deposit-history">Get * Sub-account Deposit History (For Master Account) (USER_DATA) Documentation */ public ApiResponse getSubAccountDepositHistory( @NotNull String email, + Boolean includeSource, String coin, Long status, Long startTime, Long endTime, - Long limit, + @Max(200L) Long limit, Long offset, - Long recvWindow, + @Max(60000L) Long recvWindow, String txId) throws ApiException { okhttp3.Call localVarCall = getSubAccountDepositHistoryValidateBeforeCall( - email, coin, status, startTime, endTime, limit, offset, recvWindow, txId); + email, + includeSource, + coin, + status, + startTime, + endTime, + limit, + offset, + recvWindow, + txId); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1337,8 +1379,8 @@ public ApiResponse getSubAccountDepositHist /** * Build call for getSummaryOfSubAccountsFuturesAccount * - * @param page Page (required) - * @param limit Limit (Max: 500) (required) + * @param page (required) + * @param limit (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1350,7 +1392,7 @@ public ApiResponse getSubAccountDepositHist * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-summary-of-sub-accounts-futures-account">Get * Summary of Sub-account's Futures Account (For Master Account) (USER_DATA) * Documentation */ @@ -1461,10 +1503,10 @@ private okhttp3.Call getSummaryOfSubAccountsFuturesAccountValidateBeforeCall( /** * Get Summary of Sub-account's Futures Account (For Master Account) (USER_DATA) Get Summary - * of Sub-account's Futures Account Weight: 1 + * of Sub-account's Futures Account Weight(IP): 1 Security Type: USER_DATA * - * @param page Page (required) - * @param limit Limit (Max: 500) (required) + * @param page (required) + * @param limit (required) * @param recvWindow (optional) * @return ApiResponse<GetSummaryOfSubAccountsFuturesAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1477,13 +1519,16 @@ private okhttp3.Call getSummaryOfSubAccountsFuturesAccountValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-summary-of-sub-accounts-futures-account">Get * Summary of Sub-account's Futures Account (For Master Account) (USER_DATA) * Documentation */ public ApiResponse getSummaryOfSubAccountsFuturesAccount( - @NotNull Long page, @NotNull Long limit, Long recvWindow) throws ApiException { + @NotNull Long page, + @NotNull @Max(500L) Long limit, + @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = getSummaryOfSubAccountsFuturesAccountValidateBeforeCall(page, limit, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1495,8 +1540,8 @@ private okhttp3.Call getSummaryOfSubAccountsFuturesAccountValidateBeforeCall( * Build call for getSummaryOfSubAccountsFuturesAccountV2 * * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1508,7 +1553,7 @@ private okhttp3.Call getSummaryOfSubAccountsFuturesAccountValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-summary-of-sub-accounts-futures-account-v2">Get * Summary of Sub-account's Futures Account V2 (For Master Account) (USER_DATA) * Documentation */ @@ -1626,11 +1671,11 @@ private okhttp3.Call getSummaryOfSubAccountsFuturesAccountV2ValidateBeforeCall( /** * Get Summary of Sub-account's Futures Account V2 (For Master Account) (USER_DATA) Get - * Summary of Sub-account's Futures Account Weight: 10 + * Summary of Sub-account's Futures Account Weight(IP): 10 Security Type: USER_DATA * * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<GetSummaryOfSubAccountsFuturesAccountV2Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1643,13 +1688,16 @@ private okhttp3.Call getSummaryOfSubAccountsFuturesAccountV2ValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-summary-of-sub-accounts-futures-account-v2">Get * Summary of Sub-account's Futures Account V2 (For Master Account) (USER_DATA) * Documentation */ public ApiResponse getSummaryOfSubAccountsFuturesAccountV2( - @NotNull Long futuresType, Long page, Long limit, Long recvWindow) + @NotNull Long futuresType, + Long page, + @Max(20L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getSummaryOfSubAccountsFuturesAccountV2ValidateBeforeCall( @@ -1673,7 +1721,7 @@ private okhttp3.Call getSummaryOfSubAccountsFuturesAccountV2ValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-summary-of-sub-accounts-margin-account">Get * Summary of Sub-account's Margin Account (For Master Account) (USER_DATA) * Documentation */ @@ -1771,7 +1819,7 @@ private okhttp3.Call getSummaryOfSubAccountsMarginAccountValidateBeforeCall(Long /** * Get Summary of Sub-account's Margin Account (For Master Account) (USER_DATA) Get Summary - * of Sub-account's Margin Account Weight: 10 + * of Sub-account's Margin Account Weight(IP): 10 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetSummaryOfSubAccountsMarginAccountResponse> @@ -1785,12 +1833,12 @@ private okhttp3.Call getSummaryOfSubAccountsMarginAccountValidateBeforeCall(Long * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-summary-of-sub-accounts-margin-account">Get * Summary of Sub-account's Margin Account (For Master Account) (USER_DATA) * Documentation */ public ApiResponse - getSummaryOfSubAccountsMarginAccount(Long recvWindow) throws ApiException { + getSummaryOfSubAccountsMarginAccount(@Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getSummaryOfSubAccountsMarginAccountValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = @@ -1812,7 +1860,7 @@ private okhttp3.Call getSummaryOfSubAccountsMarginAccountValidateBeforeCall(Long * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#margin-transfer-for-sub-account">Margin * Transfer for Sub-account (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call marginTransferForSubAccountCall( @@ -1934,8 +1982,8 @@ private okhttp3.Call marginTransferForSubAccountValidateBeforeCall( /** * Margin Transfer for Sub-account (For Master Account) (USER_DATA) Margin Transfer for - * Sub-account * You need to open Enable Spot & Margin Trading permission for the API Key - * which requests this endpoint. Weight: 1 + * Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - You need to open Enable Spot + * & Margin Trading permission for the API Key which requests this endpoint. * * @param marginTransferForSubAccountRequest (required) * @return ApiResponse<MarginTransferForSubAccountResponse> @@ -1949,7 +1997,7 @@ private okhttp3.Call marginTransferForSubAccountValidateBeforeCall( * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#margin-transfer-for-sub-account">Margin * Transfer for Sub-account (For Master Account) (USER_DATA) Documentation */ public ApiResponse marginTransferForSubAccount( @@ -1976,7 +2024,7 @@ public ApiResponse marginTransferForSubAcco * * * @see Move + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#move-position-for-sub-account">Move * Position for Sub-account (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call movePositionForSubAccountCall( @@ -2096,15 +2144,16 @@ private okhttp3.Call movePositionForSubAccountValidateBeforeCall( /** * Move Position for Sub-account (For Master Account) (USER_DATA) Move position between - * sub-master, master-sub, or sub-sub accounts when necessary * You need to Enable Trading - * permission for the API Key which requests this endpoint. * This function only support VIP - * level 7-9. * Only master account can use the function * Quantity should be positive number - * only * The function support normal account, PM PRO and PM PRO SPAN. * Only support for from - * account has positions * For all orders in the same orderArgs request, if any symbol’s total - * close position quantity is bigger than the symbol’s current position quantity, all batch - * orders in the same list will fail simultaneously. * Only support cross margin mode * The - * price for move position is MarkPrice only. * Not support for MSA. * Not support for the - * symbol under Reduce-Only. Weight: 1 + * sub-master, master-sub, or sub-sub accounts when necessary Weight(IP): 1 Security Type: + * USER_DATA Notes: - You need to enable the `Trading` permission for the API key used + * to call this endpoint. - This function is only available for VIP levels 7-9. - Only master + * accounts can call this endpoint. - `quantity` must be a positive number. - + * Supported account types: normal account, PM PRO, PM PRO SPAN, and PM Retail. - The source + * account must have positions. - For orders in the same `orderArgs` request, if any + * symbol's total close position quantity exceeds current position quantity, all orders in + * that batch fail. - Only cross margin mode is supported. - The move position price supports + * `MARK_PRICE` only. - MSA is not supported. - Symbols configured with + * `Reduce-Only` are not supported. * * @param movePositionForSubAccountRequest (required) * @return ApiResponse<MovePositionForSubAccountResponse> @@ -2118,7 +2167,7 @@ private okhttp3.Call movePositionForSubAccountValidateBeforeCall( * * * @see Move + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#move-position-for-sub-account">Move * Position for Sub-account (For Master Account) (USER_DATA) Documentation */ public ApiResponse movePositionForSubAccount( @@ -2134,7 +2183,7 @@ public ApiResponse movePositionForSubAccount( /** * Build call for querySubAccountAssets * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2146,7 +2195,7 @@ public ApiResponse movePositionForSubAccount( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-assets">Query * Sub-account Assets (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call querySubAccountAssetsCall(String email, Long recvWindow) @@ -2246,9 +2295,10 @@ private okhttp3.Call querySubAccountAssetsValidateBeforeCall(String email, Long } /** - * Query Sub-account Assets (For Master Account) (USER_DATA) Fetch sub-account assets Weight: 60 + * Query Sub-account Assets (For Master Account) (USER_DATA) Fetch sub-account assets + * Weight(UID): 60 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return ApiResponse<QuerySubAccountAssetsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2261,11 +2311,11 @@ private okhttp3.Call querySubAccountAssetsValidateBeforeCall(String email, Long * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-assets">Query * Sub-account Assets (For Master Account) (USER_DATA) Documentation */ public ApiResponse querySubAccountAssets( - @NotNull String email, Long recvWindow) throws ApiException { + @NotNull String email, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = querySubAccountAssetsValidateBeforeCall(email, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -2275,7 +2325,7 @@ public ApiResponse querySubAccountAssets( /** * Build call for querySubAccountAssetsAssetManagement * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2287,8 +2337,8 @@ public ApiResponse querySubAccountAssets( * * * @see Query - * Sub-account Assets (For Master Account) (USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-assets-asset-management">Query + * Sub-account Assets V4 (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call querySubAccountAssetsAssetManagementCall(String email, Long recvWindow) throws ApiException { @@ -2391,9 +2441,10 @@ private okhttp3.Call querySubAccountAssetsAssetManagementValidateBeforeCall( } /** - * Query Sub-account Assets (For Master Account) (USER_DATA) Fetch sub-account assets Weight: 60 + * Query Sub-account Assets V4 (For Master Account) (USER_DATA) Fetch sub-account assets + * Weight(UID): 60 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return ApiResponse<QuerySubAccountAssetsAssetManagementResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2406,12 +2457,12 @@ private okhttp3.Call querySubAccountAssetsAssetManagementValidateBeforeCall( * * * @see Query - * Sub-account Assets (For Master Account) (USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-assets-asset-management">Query + * Sub-account Assets V4 (For Master Account) (USER_DATA) Documentation */ public ApiResponse - querySubAccountAssetsAssetManagement(@NotNull String email, Long recvWindow) - throws ApiException { + querySubAccountAssetsAssetManagement( + @NotNull String email, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = querySubAccountAssetsAssetManagementValidateBeforeCall(email, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -2422,12 +2473,12 @@ private okhttp3.Call querySubAccountAssetsAssetManagementValidateBeforeCall( /** * Build call for querySubAccountFuturesAssetTransferHistory * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) - * @param startTime (optional) + * @param startTime Cannot be earlier than 1 month ago (optional) * @param endTime (optional) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2439,7 +2490,7 @@ private okhttp3.Call querySubAccountAssetsAssetManagementValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-futures-asset-transfer-history">Query * Sub-account Futures Asset Transfer History (For Master Account) (USER_DATA) * Documentation */ @@ -2588,14 +2639,14 @@ private okhttp3.Call querySubAccountFuturesAssetTransferHistoryValidateBeforeCal /** * Query Sub-account Futures Asset Transfer History (For Master Account) (USER_DATA) Query - * Sub-account Futures Asset Transfer History Weight: 1 + * Sub-account Futures Asset Transfer History Weight(IP): 1 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) - * @param startTime (optional) + * @param startTime Cannot be earlier than 1 month ago (optional) * @param endTime (optional) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<QuerySubAccountFuturesAssetTransferHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2608,7 +2659,7 @@ private okhttp3.Call querySubAccountFuturesAssetTransferHistoryValidateBeforeCal * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-futures-asset-transfer-history">Query * Sub-account Futures Asset Transfer History (For Master Account) (USER_DATA) * Documentation */ @@ -2619,8 +2670,8 @@ private okhttp3.Call querySubAccountFuturesAssetTransferHistoryValidateBeforeCal Long startTime, Long endTime, Long page, - Long limit, - Long recvWindow) + @Max(500L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = querySubAccountFuturesAssetTransferHistoryValidateBeforeCall( @@ -2637,8 +2688,8 @@ private okhttp3.Call querySubAccountFuturesAssetTransferHistoryValidateBeforeCal * @param toEmail (optional) * @param startTime (optional) * @param endTime (optional) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2650,7 +2701,7 @@ private okhttp3.Call querySubAccountFuturesAssetTransferHistoryValidateBeforeCal * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-spot-asset-transfer-history">Query * Sub-account Spot Asset Transfer History (For Master Account) (USER_DATA) * Documentation */ @@ -2798,15 +2849,17 @@ private okhttp3.Call querySubAccountSpotAssetTransferHistoryValidateBeforeCall( /** * Query Sub-account Spot Asset Transfer History (For Master Account) (USER_DATA) Query - * Sub-account Spot Asset Transfer History * fromEmail and toEmail cannot be sent at the same - * time. * Return fromEmail equal master account email by default. Weight: 1 + * Sub-account Spot Asset Transfer History Weight(IP): 1 Security Type: USER_DATA Notes: - + * `fromEmail` and `toEmail` cannot be sent at the same time. - If both + * `fromEmail` and `toEmail` are omitted, records with `fromEmail` + * equal to the master account are returned by default. * * @param fromEmail (optional) * @param toEmail (optional) * @param startTime (optional) * @param endTime (optional) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<QuerySubAccountSpotAssetTransferHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2819,7 +2872,7 @@ private okhttp3.Call querySubAccountSpotAssetTransferHistoryValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-spot-asset-transfer-history">Query * Sub-account Spot Asset Transfer History (For Master Account) (USER_DATA) * Documentation */ @@ -2830,8 +2883,8 @@ private okhttp3.Call querySubAccountSpotAssetTransferHistoryValidateBeforeCall( Long startTime, Long endTime, Long page, - Long limit, - Long recvWindow) + @Max(200L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = querySubAccountSpotAssetTransferHistoryValidateBeforeCall( @@ -2845,8 +2898,8 @@ private okhttp3.Call querySubAccountSpotAssetTransferHistoryValidateBeforeCall( * Build call for querySubAccountSpotAssetsSummary * * @param email Managed sub-account email (optional) - * @param page Default value: 1 (optional) - * @param size default 10, max 20 (optional) + * @param page (optional) + * @param size (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2858,7 +2911,7 @@ private okhttp3.Call querySubAccountSpotAssetTransferHistoryValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-spot-assets-summary">Query * Sub-account Spot Assets Summary (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call querySubAccountSpotAssetsSummaryCall( @@ -2973,11 +3026,11 @@ private okhttp3.Call querySubAccountSpotAssetsSummaryValidateBeforeCall( /** * Query Sub-account Spot Assets Summary (For Master Account) (USER_DATA) Get BTC valued asset - * summary of subaccounts. Weight: 1 + * summary of subaccounts. Weight(IP): 1 Security Type: USER_DATA * * @param email Managed sub-account email (optional) - * @param page Default value: 1 (optional) - * @param size default 10, max 20 (optional) + * @param page (optional) + * @param size (optional) * @param recvWindow (optional) * @return ApiResponse<QuerySubAccountSpotAssetsSummaryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2990,11 +3043,12 @@ private okhttp3.Call querySubAccountSpotAssetsSummaryValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-spot-assets-summary">Query * Sub-account Spot Assets Summary (For Master Account) (USER_DATA) Documentation */ public ApiResponse querySubAccountSpotAssetsSummary( - String email, Long page, Long size, Long recvWindow) throws ApiException { + String email, Long page, @Max(20L) Long size, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = querySubAccountSpotAssetsSummaryValidateBeforeCall(email, page, size, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -3010,8 +3064,8 @@ public ApiResponse querySubAccountSpot * @param clientTranId (optional) * @param startTime (optional) * @param endTime (optional) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3023,7 +3077,7 @@ public ApiResponse querySubAccountSpot * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-universal-transfer-history">Query * Universal Transfer History (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call queryUniversalTransferHistoryCall( @@ -3185,17 +3239,20 @@ private okhttp3.Call queryUniversalTransferHistoryValidateBeforeCall( /** * Query Universal Transfer History (For Master Account) (USER_DATA) Query Universal Transfer - * History * fromEmail and toEmail cannot be sent at the same time. * Return fromEmail equal - * master account email by default. * The query time period must be less than 7 days. * If - * startTime and endTime not sent, return records of the last 7 days by default. Weight: 1 + * History Weight(IP): 1 Security Type: USER_DATA Notes: - `fromEmail` and + * `toEmail` cannot be sent at the same time. - If both `fromEmail` and + * `toEmail` are omitted, records with `fromEmail` equal to the master + * account are returned by default. - The query time range must be less than 7 days. - If + * `startTime` and `endTime` are omitted, records from the last 7 days are + * returned by default. * * @param fromEmail (optional) * @param toEmail (optional) * @param clientTranId (optional) * @param startTime (optional) * @param endTime (optional) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<QueryUniversalTransferHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -3208,7 +3265,7 @@ private okhttp3.Call queryUniversalTransferHistoryValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-universal-transfer-history">Query * Universal Transfer History (For Master Account) (USER_DATA) Documentation */ public ApiResponse queryUniversalTransferHistory( @@ -3218,8 +3275,8 @@ public ApiResponse queryUniversalTransfer Long startTime, Long endTime, Long page, - Long limit, - Long recvWindow) + @Max(500L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryUniversalTransferHistoryValidateBeforeCall( @@ -3250,7 +3307,7 @@ public ApiResponse queryUniversalTransfer * * * @see Sub-account + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#sub-account-futures-asset-transfer">Sub-account * Futures Asset Transfer (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call subAccountFuturesAssetTransferCall( @@ -3378,8 +3435,9 @@ private okhttp3.Call subAccountFuturesAssetTransferValidateBeforeCall( /** * Sub-account Futures Asset Transfer (For Master Account) (USER_DATA) Sub-account Futures Asset - * Transfer * Master account can transfer max 2000 times a minute * There must be sufficient - * margin balance in futures wallet to execute transferring. Weight: 1 + * Transfer Weight(IP): 1 Security Type: USER_DATA Notes: - A master account can transfer at + * most 2000 times per minute. - The futures wallet must have sufficient margin balance to + * execute the transfer. * * @param subAccountFuturesAssetTransferRequest (required) * @return ApiResponse<SubAccountFuturesAssetTransferResponse> @@ -3393,7 +3451,7 @@ private okhttp3.Call subAccountFuturesAssetTransferValidateBeforeCall( * * * @see Sub-account + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#sub-account-futures-asset-transfer">Sub-account * Futures Asset Transfer (For Master Account) (USER_DATA) Documentation */ public ApiResponse subAccountFuturesAssetTransfer( @@ -3415,7 +3473,7 @@ public ApiResponse subAccountFuturesAsse * @param type 1: transfer in, 2: transfer out (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param limit (optional) * @param returnFailHistory Default `False`, return PROCESS and SUCCESS status * history; If `True`,return PROCESS and SUCCESS and FAILURE status history * (optional) @@ -3430,7 +3488,7 @@ public ApiResponse subAccountFuturesAsse * * * @see Sub-account + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#sub-account-transfer-history">Sub-account * Transfer History (For Sub-account) (USER_DATA) Documentation */ private okhttp3.Call subAccountTransferHistoryCall( @@ -3577,15 +3635,16 @@ private okhttp3.Call subAccountTransferHistoryValidateBeforeCall( } /** - * Sub-account Transfer History (For Sub-account) (USER_DATA) Sub-account Transfer History * If - * type is not sent, the records of type 2: transfer out will be returned by default. * If - * startTime and endTime are not sent, the recent 30-day data will be returned. Weight: 1 + * Sub-account Transfer History (For Sub-account) (USER_DATA) Sub-account Transfer History + * Weight(IP): 1 Security Type: USER_DATA Notes: - If `type` is not sent, records of + * type `2` (transfer out) are returned by default. - If `startTime` and + * `endTime` are not sent, data from the most recent 30 days is returned. * * @param asset If not sent, result of all assets will be returned (optional) * @param type 1: transfer in, 2: transfer out (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param limit (optional) * @param returnFailHistory Default `False`, return PROCESS and SUCCESS status * history; If `True`,return PROCESS and SUCCESS and FAILURE status history * (optional) @@ -3601,7 +3660,7 @@ private okhttp3.Call subAccountTransferHistoryValidateBeforeCall( * * * @see Sub-account + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#sub-account-transfer-history">Sub-account * Transfer History (For Sub-account) (USER_DATA) Documentation */ public ApiResponse subAccountTransferHistory( @@ -3609,9 +3668,9 @@ public ApiResponse subAccountTransferHistory( Long type, Long startTime, Long endTime, - Long limit, + @Max(200L) Long limit, Boolean returnFailHistory, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = subAccountTransferHistoryValidateBeforeCall( @@ -3635,7 +3694,7 @@ public ApiResponse subAccountTransferHistory( * * * @see Transfer + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#transfer-to-master">Transfer * to Master (For Sub-account) (USER_DATA) Documentation */ private okhttp3.Call transferToMasterCall(TransferToMasterRequest transferToMasterRequest) @@ -3741,8 +3800,9 @@ private okhttp3.Call transferToMasterValidateBeforeCall( } /** - * Transfer to Master (For Sub-account) (USER_DATA) Transfer to Master * You need to open Enable - * Spot & Margin Trading permission for the API Key which requests this endpoint. Weight: 1 + * Transfer to Master (For Sub-account) (USER_DATA) Transfer to Master Weight(IP): 1 Security + * Type: USER_DATA Notes: - You need to open Enable Spot & Margin Trading permission for the + * API Key which requests this endpoint. * * @param transferToMasterRequest (required) * @return ApiResponse<TransferToMasterResponse> @@ -3756,7 +3816,7 @@ private okhttp3.Call transferToMasterValidateBeforeCall( * * * @see Transfer + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#transfer-to-master">Transfer * to Master (For Sub-account) (USER_DATA) Documentation */ public ApiResponse transferToMaster( @@ -3781,7 +3841,7 @@ public ApiResponse transferToMaster( * * * @see Transfer + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#transfer-to-sub-account-of-same-master">Transfer * to Sub-account of Same Master (For Sub-account) (USER_DATA) Documentation */ private okhttp3.Call transferToSubAccountOfSameMasterCall( @@ -3900,8 +3960,8 @@ private okhttp3.Call transferToSubAccountOfSameMasterValidateBeforeCall( /** * Transfer to Sub-account of Same Master (For Sub-account) (USER_DATA) Transfer to Sub-account - * of Same Master * You need to open Enable Spot & Margin Trading permission for the API Key - * which requests this endpoint. Weight: 1 + * of Same Master Weight(IP): 1 Security Type: USER_DATA Notes: - You need to open Enable Spot + * & Margin Trading permission for the API Key which requests this endpoint. * * @param transferToSubAccountOfSameMasterRequest (required) * @return ApiResponse<TransferToSubAccountOfSameMasterResponse> @@ -3915,7 +3975,7 @@ private okhttp3.Call transferToSubAccountOfSameMasterValidateBeforeCall( * * * @see Transfer + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#transfer-to-sub-account-of-same-master">Transfer * to Sub-account of Same Master (For Sub-account) (USER_DATA) Documentation */ public ApiResponse transferToSubAccountOfSameMaster( @@ -3944,7 +4004,7 @@ public ApiResponse transferToSubAccoun * * * @see Universal + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#universal-transfer">Universal * Transfer (For Master Account) (USER_DATA) Documentation */ private okhttp3.Call universalTransferCall(UniversalTransferRequest universalTransferRequest) @@ -4075,20 +4135,21 @@ private okhttp3.Call universalTransferValidateBeforeCall( } /** - * Universal Transfer (For Master Account) (USER_DATA) Universal Transfer * You need to enable - * \"internal transfer\" option for the api key which requests this endpoint. * - * Transfer from master account by default if fromEmail is not sent. * Transfer to master - * account by default if toEmail is not sent. * At least either fromEmail or toEmail need to be - * sent when the fromAccountType and the toAccountType are the same. * Supported transfer - * scenarios: * `SPOT` transfer to `SPOT`, `USDT_FUTURE`, - * `COIN_FUTURE` (regardless of master or sub) * `SPOT`, - * `USDT_FUTURE`, `COIN_FUTURE` transfer to `SPOT` (regardless of - * master or sub) * Master account `SPOT` transfer to sub-account - * `MARGIN(Cross)`, `ISOLATED_MARGIN` * Sub-account - * `MARGIN(Cross)`, `ISOLATED_MARGIN` transfer to master account - * `SPOT` * Sub-account `MARGIN(Cross)` transfer to Sub-account - * `MARGIN(Cross)` * `ALPHA` to `ALPHA` (regardless of master or - * sub) Weight: 360 + * Universal Transfer (For Master Account) (USER_DATA) Universal Transfer Weight(IP): 1 + * Weight(UID): 360 Security Type: USER_DATA Notes: - You need to enable the `internal + * transfer` option for the API key used to call this endpoint. - If `fromEmail` + * is not sent, transfer out from the master account by default. - If `toEmail` is not + * sent, transfer into the master account by default. - When `fromAccountType` and + * `toAccountType` are the same, at least one of `fromEmail` or + * `toEmail` must be sent. - Supported transfer scenarios: - `SPOT` -> + * `SPOT` / `USDT_FUTURE` / `COIN_FUTURE` (master or sub-account). + * - `SPOT` / `USDT_FUTURE` / `COIN_FUTURE` -> `SPOT` + * (master or sub-account). - Master account `SPOT` -> sub-account + * `MARGIN(Cross)` / `ISOLATED_MARGIN`. - Sub-account + * `MARGIN(Cross)` / `ISOLATED_MARGIN` -> master account + * `SPOT`. - Sub-account `MARGIN(Cross)` -> sub-account + * `MARGIN(Cross)`. - `ALPHA` -> `ALPHA` (master or + * sub-account). * * @param universalTransferRequest (required) * @return ApiResponse<UniversalTransferResponse> @@ -4102,7 +4163,7 @@ private okhttp3.Call universalTransferValidateBeforeCall( * * * @see Universal + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#universal-transfer">Universal * Transfer (For Master Account) (USER_DATA) Documentation */ public ApiResponse universalTransfer( diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/ManagedSubAccountApi.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/ManagedSubAccountApi.java index d658a08cd..c6a6291a2 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/ManagedSubAccountApi.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/ManagedSubAccountApi.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.binance.connector.client.sub_account.rest.model.DepositAssetsIntoTheManagedSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.DepositAssetsIntoTheManagedSubAccountResponse; import com.binance.connector.client.sub_account.rest.model.GetManagedSubAccountDepositAddressResponse; +import com.binance.connector.client.sub_account.rest.model.OrderType; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountAssetDetailsResponse; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountFuturesAssetDetailsResponse; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountListResponse; @@ -31,6 +32,7 @@ import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountTransferLogMasterAccountInvestorResponse; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountTransferLogMasterAccountTradingResponse; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountTransferLogSubAccountTradingResponse; +import com.binance.connector.client.sub_account.rest.model.TransferFunctionAccountType; import com.binance.connector.client.sub_account.rest.model.WithdrawlAssetsFromTheManagedSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.WithdrawlAssetsFromTheManagedSubAccountResponse; import com.google.gson.reflect.TypeToken; @@ -56,7 +58,7 @@ public class ManagedSubAccountApi { private static final String USER_AGENT = String.format( - "binance-sub-account/5.0.0 (Java/%s; %s; %s)", + "binance-sub-account/6.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -107,7 +109,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Deposit + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#deposit-assets-into-the-managed-sub-account">Deposit * Assets Into The Managed Sub-account (For Investor Master Account) (USER_DATA) * Documentation */ @@ -231,8 +233,9 @@ private okhttp3.Call depositAssetsIntoTheManagedSubAccountValidateBeforeCall( /** * Deposit Assets Into The Managed Sub-account (For Investor Master Account) (USER_DATA) Deposit - * Assets Into The Managed Sub-account * You need to enable `Enable Spot & Margin - * Trading` option for the api key which requests this endpoint Weight: 1 + * Assets Into The Managed Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - You need + * to enable `Enable Spot & Margin Trading` option for the api key which requests + * this endpoint * * @param depositAssetsIntoTheManagedSubAccountRequest (required) * @return ApiResponse<DepositAssetsIntoTheManagedSubAccountResponse> @@ -246,7 +249,7 @@ private okhttp3.Call depositAssetsIntoTheManagedSubAccountValidateBeforeCall( * * * @see Deposit + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#deposit-assets-into-the-managed-sub-account">Deposit * Assets Into The Managed Sub-account (For Investor Master Account) (USER_DATA) * Documentation */ @@ -267,7 +270,7 @@ private okhttp3.Call depositAssetsIntoTheManagedSubAccountValidateBeforeCall( /** * Build call for getManagedSubAccountDepositAddress * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param coin (required) * @param network networks can be found in `GET /sapi/v1/capital/deposit/address` * (optional) @@ -283,7 +286,7 @@ private okhttp3.Call depositAssetsIntoTheManagedSubAccountValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#get-managed-sub-account-deposit-address">Get * Managed Sub-account Deposit Address (For Investor Master Account) (USER_DATA) * Documentation */ @@ -409,11 +412,12 @@ private okhttp3.Call getManagedSubAccountDepositAddressValidateBeforeCall( /** * Get Managed Sub-account Deposit Address (For Investor Master Account) (USER_DATA) Get - * investor's managed sub-account deposit address. * If `network` is not send, - * return with default `network` of the `coin`. * * `amount` needs - * to be sent if using LIGHTNING network Weight: 1 + * investor's managed sub-account deposit address. Weight(UID): 1 Security Type: USER_DATA + * Notes: - If `network` is not sent, the default `network` for the + * `coin` is returned. - When using `LIGHTNING`, `amount` must be + * provided. * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param coin (required) * @param network networks can be found in `GET /sapi/v1/capital/deposit/address` * (optional) @@ -430,7 +434,7 @@ private okhttp3.Call getManagedSubAccountDepositAddressValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#get-managed-sub-account-deposit-address">Get * Managed Sub-account Deposit Address (For Investor Master Account) (USER_DATA) * Documentation */ @@ -440,7 +444,7 @@ private okhttp3.Call getManagedSubAccountDepositAddressValidateBeforeCall( @NotNull String coin, String network, Double amount, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getManagedSubAccountDepositAddressValidateBeforeCall( @@ -453,7 +457,7 @@ private okhttp3.Call getManagedSubAccountDepositAddressValidateBeforeCall( /** * Build call for queryManagedSubAccountAssetDetails * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -465,7 +469,7 @@ private okhttp3.Call getManagedSubAccountDepositAddressValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-asset-details">Query * Managed Sub-account Asset Details (For Investor Master Account) (USER_DATA) * Documentation */ @@ -569,9 +573,9 @@ private okhttp3.Call queryManagedSubAccountAssetDetailsValidateBeforeCall( /** * Query Managed Sub-account Asset Details (For Investor Master Account) (USER_DATA) Query - * Managed Sub-account Asset Details Weight: 1 + * Managed Sub-account Asset Details Weight(IP): 1 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return ApiResponse<QueryManagedSubAccountAssetDetailsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -584,12 +588,12 @@ private okhttp3.Call queryManagedSubAccountAssetDetailsValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-asset-details">Query * Managed Sub-account Asset Details (For Investor Master Account) (USER_DATA) * Documentation */ public ApiResponse - queryManagedSubAccountAssetDetails(@NotNull String email, Long recvWindow) + queryManagedSubAccountAssetDetails(@NotNull String email, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryManagedSubAccountAssetDetailsValidateBeforeCall(email, recvWindow); @@ -601,10 +605,9 @@ private okhttp3.Call queryManagedSubAccountAssetDetailsValidateBeforeCall( /** * Build call for queryManagedSubAccountFuturesAssetDetails * - * @param email [Sub-account email](#email-address) (required) - * @param accountType No input or input \"MARGIN\" to get Cross Margin account - * details. Input \"ISOLATED_MARGIN\" to get Isolated Margin account details. - * (optional) + * @param email (required) + * @param accountType No input or input \"USDT_FUTURE\" to get UM Futures account + * details. Input \"COIN_FUTURE\" to get CM Futures account details. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -615,7 +618,7 @@ private okhttp3.Call queryManagedSubAccountAssetDetailsValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-futures-asset-details">Query * Managed Sub-account Futures Asset Details (For Investor Master Account) (USER_DATA) * Documentation */ @@ -722,12 +725,12 @@ private okhttp3.Call queryManagedSubAccountFuturesAssetDetailsValidateBeforeCall /** * Query Managed Sub-account Futures Asset Details (For Investor Master Account) (USER_DATA) - * Investor can use this api to query managed sub account futures asset details Weight: 60 + * Investor can use this api to query managed sub account futures asset details Weight(UID): 60 + * Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) - * @param accountType No input or input \"MARGIN\" to get Cross Margin account - * details. Input \"ISOLATED_MARGIN\" to get Isolated Margin account details. - * (optional) + * @param email (required) + * @param accountType No input or input \"USDT_FUTURE\" to get UM Futures account + * details. Input \"COIN_FUTURE\" to get CM Futures account details. (optional) * @return ApiResponse<QueryManagedSubAccountFuturesAssetDetailsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -739,7 +742,7 @@ private okhttp3.Call queryManagedSubAccountFuturesAssetDetailsValidateBeforeCall * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-futures-asset-details">Query * Managed Sub-account Futures Asset Details (For Investor Master Account) (USER_DATA) * Documentation */ @@ -756,9 +759,9 @@ private okhttp3.Call queryManagedSubAccountFuturesAssetDetailsValidateBeforeCall /** * Build call for queryManagedSubAccountList * - * @param email Managed sub-account email (optional) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param email (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -770,7 +773,7 @@ private okhttp3.Call queryManagedSubAccountFuturesAssetDetailsValidateBeforeCall * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-list">Query * Managed Sub-account List (For Investor) (USER_DATA) Documentation */ private okhttp3.Call queryManagedSubAccountListCall( @@ -885,11 +888,11 @@ private okhttp3.Call queryManagedSubAccountListValidateBeforeCall( /** * Query Managed Sub-account List (For Investor) (USER_DATA) Get investor's managed - * sub-account list. Weight: 60 + * sub-account list. Weight(UID): 60 Security Type: USER_DATA * - * @param email Managed sub-account email (optional) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param email (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<QueryManagedSubAccountListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -902,11 +905,12 @@ private okhttp3.Call queryManagedSubAccountListValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-list">Query * Managed Sub-account List (For Investor) (USER_DATA) Documentation */ public ApiResponse queryManagedSubAccountList( - String email, Long page, Long limit, Long recvWindow) throws ApiException { + String email, Long page, @Max(20L) Long limit, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = queryManagedSubAccountListValidateBeforeCall(email, page, limit, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -917,7 +921,7 @@ public ApiResponse queryManagedSubAccountLis /** * Build call for queryManagedSubAccountMarginAssetDetails * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param accountType No input or input \"MARGIN\" to get Cross Margin account * details. Input \"ISOLATED_MARGIN\" to get Isolated Margin account details. * (optional) @@ -931,7 +935,7 @@ public ApiResponse queryManagedSubAccountLis * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-margin-asset-details">Query * Managed Sub-account Margin Asset Details (For Investor Master Account) (USER_DATA) * Documentation */ @@ -1038,9 +1042,10 @@ private okhttp3.Call queryManagedSubAccountMarginAssetDetailsValidateBeforeCall( /** * Query Managed Sub-account Margin Asset Details (For Investor Master Account) (USER_DATA) - * Investor can use this api to query managed sub account margin asset details Weight: 1 + * Investor can use this api to query managed sub account margin asset details Weight(IP): 1 + * Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param accountType No input or input \"MARGIN\" to get Cross Margin account * details. Input \"ISOLATED_MARGIN\" to get Isolated Margin account details. * (optional) @@ -1055,7 +1060,7 @@ private okhttp3.Call queryManagedSubAccountMarginAssetDetailsValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-margin-asset-details">Query * Managed Sub-account Margin Asset Details (For Investor Master Account) (USER_DATA) * Documentation */ @@ -1072,12 +1077,13 @@ private okhttp3.Call queryManagedSubAccountMarginAssetDetailsValidateBeforeCall( /** * Build call for queryManagedSubAccountSnapshot * - * @param email [Sub-account email](#email-address) (required) - * @param type \"SPOT\", \"MARGIN\"(cross), \"FUTURES\"(UM) - * (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param email (required) + * @param type (required) + * @param startTime Query time range must be within 30 days and only supports data within the + * last month. (optional) + * @param endTime If both startTime and endTime are omitted, records from the last 7 days are + * returned by default. (optional) + * @param limit (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1089,11 +1095,11 @@ private okhttp3.Call queryManagedSubAccountMarginAssetDetailsValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-snapshot">Query * Managed Sub-account Snapshot (For Investor Master Account) (USER_DATA) Documentation */ private okhttp3.Call queryManagedSubAccountSnapshotCall( - String email, String type, Long startTime, Long endTime, Long limit, Long recvWindow) + String email, OrderType type, Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { String basePath = null; // Operation Servers @@ -1175,7 +1181,7 @@ private okhttp3.Call queryManagedSubAccountSnapshotCall( @SuppressWarnings("rawtypes") private okhttp3.Call queryManagedSubAccountSnapshotValidateBeforeCall( - String email, String type, Long startTime, Long endTime, Long limit, Long recvWindow) + String email, OrderType type, Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { try { Validator validator = @@ -1192,7 +1198,7 @@ private okhttp3.Call queryManagedSubAccountSnapshotValidateBeforeCall( .getMethod( "queryManagedSubAccountSnapshot", String.class, - String.class, + OrderType.class, Long.class, Long.class, Long.class, @@ -1217,16 +1223,18 @@ private okhttp3.Call queryManagedSubAccountSnapshotValidateBeforeCall( /** * Query Managed Sub-account Snapshot (For Investor Master Account) (USER_DATA) Query Managed - * Sub-account Snapshot * The query time period must be less then 30 days * Support query within - * the last one month only * If startTimeand endTime not sent, return records of the last 7 days - * by default Weight: 2400 + * Sub-account Snapshot Weight(IP): 2400 Security Type: USER_DATA Notes: - The query time range + * must be less than 30 days. - Only data from the most recent month is supported. - If + * `startTime` and `endTime` are omitted, records from the last 7 days are + * returned by default. * - * @param email [Sub-account email](#email-address) (required) - * @param type \"SPOT\", \"MARGIN\"(cross), \"FUTURES\"(UM) - * (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param email (required) + * @param type (required) + * @param startTime Query time range must be within 30 days and only supports data within the + * last month. (optional) + * @param endTime If both startTime and endTime are omitted, records from the last 7 days are + * returned by default. (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<QueryManagedSubAccountSnapshotResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1239,16 +1247,16 @@ private okhttp3.Call queryManagedSubAccountSnapshotValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-snapshot">Query * Managed Sub-account Snapshot (For Investor Master Account) (USER_DATA) Documentation */ public ApiResponse queryManagedSubAccountSnapshot( @NotNull String email, - @NotNull String type, + @NotNull OrderType type, Long startTime, Long endTime, - Long limit, - Long recvWindow) + @Min(7L) @Max(30L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryManagedSubAccountSnapshotValidateBeforeCall( @@ -1261,15 +1269,14 @@ public ApiResponse queryManagedSubAccoun /** * Build call for queryManagedSubAccountTransferLogMasterAccountInvestor * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param startTime Start Time (required) * @param endTime End Time (The start time and end time interval cannot exceed half a year) * (required) * @param page Page (required) - * @param limit Limit (Max: 500) (required) + * @param limit (required) * @param transfers Transfer Direction (FROM/TO) (optional) - * @param transferFunctionAccountType Transfer function account type - * (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) (optional) + * @param transferFunctionAccountType (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1280,8 +1287,8 @@ public ApiResponse queryManagedSubAccoun * * * @see Query - * Managed Sub Account Transfer Log (For Investor Master Account) (USER_DATA) + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-transfer-log-master-account-investor">Query + * Managed Sub Account Transfer Log For Investor Master Account (USER_DATA) * Documentation */ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountInvestorCall( @@ -1291,7 +1298,7 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountInvestorCall( Long page, Long limit, String transfers, - String transferFunctionAccountType) + TransferFunctionAccountType transferFunctionAccountType) throws ApiException { String basePath = null; // Operation Servers @@ -1385,7 +1392,7 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountInvestorValid Long page, Long limit, String transfers, - String transferFunctionAccountType) + TransferFunctionAccountType transferFunctionAccountType) throws ApiException { try { Validator validator = @@ -1409,7 +1416,7 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountInvestorValid Long.class, Long.class, String.class, - String.class); + TransferFunctionAccountType.class); Set> violations = executableValidator.validateParameters(this, method, parameterValues); @@ -1435,23 +1442,23 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountInvestorValid } /** - * Query Managed Sub Account Transfer Log (For Investor Master Account) (USER_DATA) Investor can - * use this api to query managed sub account transfer log. This endpoint is available for - * investor of Managed Sub-Account. A Managed Sub-Account is an account type for investors who - * value flexibility in asset allocation and account application, while delegating trades to a - * professional trading team. Please refer to + * Query Managed Sub Account Transfer Log For Investor Master Account (USER_DATA) Query Managed + * Sub Account Transfer Log For Investor Master Account Investor can use this api to query + * managed sub account transfer log. This endpoint is available for investor of Managed + * Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in + * asset allocation and account application, while delegating trades to a professional trading + * team. Please refer to * [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) - * Weight: 1 + * Weight(IP): 1 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param startTime Start Time (required) * @param endTime End Time (The start time and end time interval cannot exceed half a year) * (required) * @param page Page (required) - * @param limit Limit (Max: 500) (required) + * @param limit (required) * @param transfers Transfer Direction (FROM/TO) (optional) - * @param transferFunctionAccountType Transfer function account type - * (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) (optional) + * @param transferFunctionAccountType (optional) * @return ApiResponse<QueryManagedSubAccountTransferLogMasterAccountInvestorResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1463,8 +1470,8 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountInvestorValid * * * @see Query - * Managed Sub Account Transfer Log (For Investor Master Account) (USER_DATA) + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-transfer-log-master-account-investor">Query + * Managed Sub Account Transfer Log For Investor Master Account (USER_DATA) * Documentation */ public ApiResponse @@ -1473,9 +1480,9 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountInvestorValid @NotNull Long startTime, @NotNull Long endTime, @NotNull Long page, - @NotNull Long limit, + @NotNull @Max(500L) Long limit, String transfers, - String transferFunctionAccountType) + TransferFunctionAccountType transferFunctionAccountType) throws ApiException { okhttp3.Call localVarCall = queryManagedSubAccountTransferLogMasterAccountInvestorValidateBeforeCall( @@ -1495,15 +1502,14 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountInvestorValid /** * Build call for queryManagedSubAccountTransferLogMasterAccountTrading * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param startTime Start Time (required) * @param endTime End Time (The start time and end time interval cannot exceed half a year) * (required) - * @param page Page (required) - * @param limit Limit (Max: 500) (required) + * @param page (required) + * @param limit (required) * @param transfers Transfer Direction (FROM/TO) (optional) - * @param transferFunctionAccountType Transfer function account type - * (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) (optional) + * @param transferFunctionAccountType (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1514,8 +1520,8 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountInvestorValid * * * @see Query - * Managed Sub Account Transfer Log (For Trading Team Master Account) (USER_DATA) + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-transfer-log-master-account-trading">Query + * Managed Sub Account Transfer Log For Trading Team Master Account (USER_DATA) * Documentation */ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountTradingCall( @@ -1525,7 +1531,7 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountTradingCall( Long page, Long limit, String transfers, - String transferFunctionAccountType) + TransferFunctionAccountType transferFunctionAccountType) throws ApiException { String basePath = null; // Operation Servers @@ -1619,7 +1625,7 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountTradingValida Long page, Long limit, String transfers, - String transferFunctionAccountType) + TransferFunctionAccountType transferFunctionAccountType) throws ApiException { try { Validator validator = @@ -1643,7 +1649,7 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountTradingValida Long.class, Long.class, String.class, - String.class); + TransferFunctionAccountType.class); Set> violations = executableValidator.validateParameters(this, method, parameterValues); @@ -1669,23 +1675,23 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountTradingValida } /** - * Query Managed Sub Account Transfer Log (For Trading Team Master Account) (USER_DATA) Trading - * team can use this api to query managed sub account transfer log. This endpoint is available - * for trading team of Managed Sub-Account. A Managed Sub-Account is an account type for - * investors who value flexibility in asset allocation and account application, while delegating - * trades to a professional trading team. Please refer to + * Query Managed Sub Account Transfer Log For Trading Team Master Account (USER_DATA) Query + * Managed Sub Account Transfer Log For Trading Team Master Account Trading team can use this + * api to query managed sub account transfer log. This endpoint is available for trading team of + * Managed Sub-Account. A Managed Sub-Account is an account type for investors who value + * flexibility in asset allocation and account application, while delegating trades to a + * professional trading team. Please refer to * [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) - * Weight: 60 + * Weight(UID): 60 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param startTime Start Time (required) * @param endTime End Time (The start time and end time interval cannot exceed half a year) * (required) - * @param page Page (required) - * @param limit Limit (Max: 500) (required) + * @param page (required) + * @param limit (required) * @param transfers Transfer Direction (FROM/TO) (optional) - * @param transferFunctionAccountType Transfer function account type - * (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) (optional) + * @param transferFunctionAccountType (optional) * @return ApiResponse<QueryManagedSubAccountTransferLogMasterAccountTradingResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1697,8 +1703,8 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountTradingValida * * * @see Query - * Managed Sub Account Transfer Log (For Trading Team Master Account) (USER_DATA) + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-transfer-log-master-account-trading">Query + * Managed Sub Account Transfer Log For Trading Team Master Account (USER_DATA) * Documentation */ public ApiResponse @@ -1707,9 +1713,9 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountTradingValida @NotNull Long startTime, @NotNull Long endTime, @NotNull Long page, - @NotNull Long limit, + @NotNull @Max(500L) Long limit, String transfers, - String transferFunctionAccountType) + TransferFunctionAccountType transferFunctionAccountType) throws ApiException { okhttp3.Call localVarCall = queryManagedSubAccountTransferLogMasterAccountTradingValidateBeforeCall( @@ -1732,11 +1738,10 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountTradingValida * @param startTime Start Time (required) * @param endTime End Time (The start time and end time interval cannot exceed half a year) * (required) - * @param page Page (required) - * @param limit Limit (Max: 500) (required) - * @param transfers Transfer Direction (FROM/TO) (optional) - * @param transferFunctionAccountType Transfer function account type - * (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) (optional) + * @param page (required) + * @param limit (required) + * @param transfers Transfer Direction (from/to) (optional) + * @param transferFunctionAccountType (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1748,7 +1753,7 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountTradingValida * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-transfer-log-sub-account-trading">Query * Managed Sub Account Transfer Log (For Trading Team Sub Account) (USER_DATA) * Documentation */ @@ -1758,7 +1763,7 @@ private okhttp3.Call queryManagedSubAccountTransferLogSubAccountTradingCall( Long page, Long limit, String transfers, - String transferFunctionAccountType, + TransferFunctionAccountType transferFunctionAccountType, Long recvWindow) throws ApiException { String basePath = null; @@ -1852,7 +1857,7 @@ private okhttp3.Call queryManagedSubAccountTransferLogSubAccountTradingValidateB Long page, Long limit, String transfers, - String transferFunctionAccountType, + TransferFunctionAccountType transferFunctionAccountType, Long recvWindow) throws ApiException { try { @@ -1876,7 +1881,7 @@ private okhttp3.Call queryManagedSubAccountTransferLogSubAccountTradingValidateB Long.class, Long.class, String.class, - String.class, + TransferFunctionAccountType.class, Long.class); Set> violations = executableValidator.validateParameters(this, method, parameterValues); @@ -1904,16 +1909,16 @@ private okhttp3.Call queryManagedSubAccountTransferLogSubAccountTradingValidateB /** * Query Managed Sub Account Transfer Log (For Trading Team Sub Account) (USER_DATA) Query - * Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight: 60 + * Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight(UID): 60 Security + * Type: USER_DATA * * @param startTime Start Time (required) * @param endTime End Time (The start time and end time interval cannot exceed half a year) * (required) - * @param page Page (required) - * @param limit Limit (Max: 500) (required) - * @param transfers Transfer Direction (FROM/TO) (optional) - * @param transferFunctionAccountType Transfer function account type - * (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) (optional) + * @param page (required) + * @param limit (required) + * @param transfers Transfer Direction (from/to) (optional) + * @param transferFunctionAccountType (optional) * @param recvWindow (optional) * @return ApiResponse<QueryManagedSubAccountTransferLogSubAccountTradingResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1926,7 +1931,7 @@ private okhttp3.Call queryManagedSubAccountTransferLogSubAccountTradingValidateB * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-transfer-log-sub-account-trading">Query * Managed Sub Account Transfer Log (For Trading Team Sub Account) (USER_DATA) * Documentation */ @@ -1935,10 +1940,10 @@ private okhttp3.Call queryManagedSubAccountTransferLogSubAccountTradingValidateB @NotNull Long startTime, @NotNull Long endTime, @NotNull Long page, - @NotNull Long limit, + @NotNull @Max(500L) Long limit, String transfers, - String transferFunctionAccountType, - Long recvWindow) + TransferFunctionAccountType transferFunctionAccountType, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryManagedSubAccountTransferLogSubAccountTradingValidateBeforeCall( @@ -1969,7 +1974,7 @@ private okhttp3.Call queryManagedSubAccountTransferLogSubAccountTradingValidateB * * * @see Withdrawl + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#withdrawl-assets-from-the-managed-sub-account">Withdrawl * Assets From The Managed Sub-account (For Investor Master Account) (USER_DATA) * Documentation */ @@ -2099,8 +2104,8 @@ private okhttp3.Call withdrawlAssetsFromTheManagedSubAccountValidateBeforeCall( /** * Withdrawl Assets From The Managed Sub-account (For Investor Master Account) (USER_DATA) - * Withdrawl Assets From The Managed Sub-account * You need to enable `Enable Spot & - * Margin Trading` option for the api key which requests this endpoint Weight: 1 + * Withdrawl Assets From The Managed Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - + * Your API key must have the permission `Enable Spot & Margin Trading`. * * @param withdrawlAssetsFromTheManagedSubAccountRequest (required) * @return ApiResponse<WithdrawlAssetsFromTheManagedSubAccountResponse> @@ -2114,7 +2119,7 @@ private okhttp3.Call withdrawlAssetsFromTheManagedSubAccountValidateBeforeCall( * * * @see Withdrawl + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#withdrawl-assets-from-the-managed-sub-account">Withdrawl * Assets From The Managed Sub-account (For Investor Master Account) (USER_DATA) * Documentation */ diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/SubAccountRestApi.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/SubAccountRestApi.java index a13acbd67..5eb7ba9f7 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/SubAccountRestApi.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/SubAccountRestApi.java @@ -9,6 +9,8 @@ import com.binance.connector.client.sub_account.rest.model.AddIpRestrictionForSubAccountApiKeyResponse; import com.binance.connector.client.sub_account.rest.model.CreateAVirtualSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.CreateAVirtualSubAccountResponse; +import com.binance.connector.client.sub_account.rest.model.CreateSubAccountApiKeyRequest; +import com.binance.connector.client.sub_account.rest.model.CreateSubAccountApiKeyResponse; import com.binance.connector.client.sub_account.rest.model.DeleteIpListForASubAccountApiKeyResponse; import com.binance.connector.client.sub_account.rest.model.DepositAssetsIntoTheManagedSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.DepositAssetsIntoTheManagedSubAccountResponse; @@ -34,8 +36,11 @@ import com.binance.connector.client.sub_account.rest.model.GetSummaryOfSubAccountsMarginAccountResponse; import com.binance.connector.client.sub_account.rest.model.MarginTransferForSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.MarginTransferForSubAccountResponse; +import com.binance.connector.client.sub_account.rest.model.ModifySubAccountApiKeyPermissionRequest; +import com.binance.connector.client.sub_account.rest.model.ModifySubAccountApiKeyPermissionResponse; import com.binance.connector.client.sub_account.rest.model.MovePositionForSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.MovePositionForSubAccountResponse; +import com.binance.connector.client.sub_account.rest.model.OrderType; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountAssetDetailsResponse; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountFuturesAssetDetailsResponse; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountListResponse; @@ -44,6 +49,7 @@ import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountTransferLogMasterAccountInvestorResponse; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountTransferLogMasterAccountTradingResponse; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountTransferLogSubAccountTradingResponse; +import com.binance.connector.client.sub_account.rest.model.QuerySubAccountApiKeyResponse; import com.binance.connector.client.sub_account.rest.model.QuerySubAccountAssetsAssetManagementResponse; import com.binance.connector.client.sub_account.rest.model.QuerySubAccountAssetsResponse; import com.binance.connector.client.sub_account.rest.model.QuerySubAccountFuturesAssetTransferHistoryResponse; @@ -55,6 +61,7 @@ import com.binance.connector.client.sub_account.rest.model.SubAccountFuturesAssetTransferRequest; import com.binance.connector.client.sub_account.rest.model.SubAccountFuturesAssetTransferResponse; import com.binance.connector.client.sub_account.rest.model.SubAccountTransferHistoryResponse; +import com.binance.connector.client.sub_account.rest.model.TransferFunctionAccountType; import com.binance.connector.client.sub_account.rest.model.TransferToMasterRequest; import com.binance.connector.client.sub_account.rest.model.TransferToMasterResponse; import com.binance.connector.client.sub_account.rest.model.TransferToSubAccountOfSameMasterRequest; @@ -83,9 +90,10 @@ public SubAccountRestApi(ApiClient apiClient) { } /** - * Create a Virtual Sub-account (For Master Account) (USER_DATA) Create a Virtual Sub-account * - * This request will generate a virtual sub account under your master account. * You need to - * enable \"trade\" option for the API Key which requests this endpoint. Weight: 1 + * Create a Virtual Sub-account (For Master Account) (USER_DATA) Create a Virtual Sub-account + * Weight(IP): 1 Security Type: USER_DATA Notes: - This request generates a virtual sub-account + * under your master account. - The API key used to call this endpoint must have the + * `trade` option enabled. * * @param createAVirtualSubAccountRequest (required) * @return ApiResponse<CreateAVirtualSubAccountResponse> @@ -99,7 +107,7 @@ public SubAccountRestApi(ApiClient apiClient) { * * * @see Create + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#create-avirtual-sub-account">Create * a Virtual Sub-account (For Master Account) (USER_DATA) Documentation */ public ApiResponse createAVirtualSubAccount( @@ -109,7 +117,7 @@ public ApiResponse createAVirtualSubAccount( /** * Enable Futures for Sub-account (For Master Account) (USER_DATA) Enable Futures for - * Sub-account for Master Account Weight: 1 + * Sub-account for Master Account Weight(IP): 1 Security Type: USER_DATA * * @param enableFuturesForSubAccountRequest (required) * @return ApiResponse<EnableFuturesForSubAccountResponse> @@ -123,7 +131,7 @@ public ApiResponse createAVirtualSubAccount( * * * @see Enable + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#enable-futures-for-sub-account">Enable * Futures for Sub-account (For Master Account) (USER_DATA) Documentation */ public ApiResponse enableFuturesForSubAccount( @@ -134,7 +142,7 @@ public ApiResponse enableFuturesForSubAccoun /** * Enable Options for Sub-account (For Master Account) (USER_DATA) Enable Options for - * Sub-account (For Master Account). Weight: 1 + * Sub-account (For Master Account). Weight(IP): 1 Security Type: USER_DATA * * @param enableOptionsForSubAccountRequest (required) * @return ApiResponse<EnableOptionsForSubAccountResponse> @@ -148,7 +156,7 @@ public ApiResponse enableFuturesForSubAccoun * * * @see Enable + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#enable-options-for-sub-account">Enable * Options for Sub-account (For Master Account) (USER_DATA) Documentation */ public ApiResponse enableOptionsForSubAccount( @@ -159,9 +167,9 @@ public ApiResponse enableOptionsForSubAccoun /** * Get Futures Position-Risk of Sub-account (For Master Account) (USER_DATA) Get Futures - * Position-Risk of Sub-account Weight: 10 + * Position-Risk of Sub-account Weight(IP): 10 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return ApiResponse<GetFuturesPositionRiskOfSubAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -174,7 +182,7 @@ public ApiResponse enableOptionsForSubAccoun * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#get-futures-position-risk-of-sub-account">Get * Futures Position-Risk of Sub-account (For Master Account) (USER_DATA) Documentation */ public ApiResponse @@ -184,9 +192,9 @@ public ApiResponse enableOptionsForSubAccoun /** * Get Futures Position-Risk of Sub-account V2 (For Master Account) (USER_DATA) Get Futures - * Position-Risk of Sub-account V2 Weight: 1 + * Position-Risk of Sub-account V2 Weight(IP): 1 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) * @param recvWindow (optional) * @return ApiResponse<GetFuturesPositionRiskOfSubAccountV2Response> @@ -200,7 +208,7 @@ public ApiResponse enableOptionsForSubAccoun * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#get-futures-position-risk-of-sub-account-v2">Get * Futures Position-Risk of Sub-account V2 (For Master Account) (USER_DATA) * Documentation */ @@ -213,10 +221,10 @@ public ApiResponse enableOptionsForSubAccoun /** * Get Sub-account's Status on Margin Or Futures (For Master Account) (USER_DATA) Get - * Sub-account's Status on Margin Or Futures * If no email sent, all sub-accounts' - * information will be returned. Weight: 10 + * Sub-account's Status on Margin Or Futures Weight(IP): 10 Security Type: USER_DATA Notes: + * - If no email sent, all sub-accounts' information will be returned. * - * @param email Managed sub-account email (optional) + * @param email (optional) * @param recvWindow (optional) * @return ApiResponse<GetSubAccountsStatusOnMarginOrFuturesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -229,7 +237,7 @@ public ApiResponse enableOptionsForSubAccoun * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#get-sub-accounts-status-on-margin-or-futures">Get * Sub-account's Status on Margin Or Futures (For Master Account) (USER_DATA) * Documentation */ @@ -240,12 +248,13 @@ public ApiResponse enableOptionsForSubAccoun } /** - * Query Sub-account List (For Master Account) (USER_DATA) Query Sub-account List Weight: 1 + * Query Sub-account List (For Master Account) (USER_DATA) Query Sub-account List Weight(IP): 1 + * Security Type: USER_DATA * - * @param email Managed sub-account email (optional) - * @param isFreeze true or false (optional) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param email (optional) + * @param isFreeze (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<QuerySubAccountListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -258,7 +267,7 @@ public ApiResponse enableOptionsForSubAccoun * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#query-sub-account-list">Query * Sub-account List (For Master Account) (USER_DATA) Documentation */ public ApiResponse querySubAccountList( @@ -269,7 +278,7 @@ public ApiResponse querySubAccountList( /** * Query Sub-account Transaction Statistics (For Master Account) (USER_DATA) Query Sub-account - * Transaction statistics (For Master Account). Weight: 60 + * Transaction statistics (For Master Account). Weight(IP): 60 Security Type: USER_DATA * * @param email Managed sub-account email (optional) * @param recvWindow (optional) @@ -284,7 +293,7 @@ public ApiResponse querySubAccountList( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/account-management#query-sub-account-transaction-statistics">Query * Sub-account Transaction Statistics (For Master Account) (USER_DATA) Documentation */ public ApiResponse @@ -295,8 +304,9 @@ public ApiResponse querySubAccountList( /** * Add IP Restriction for Sub-Account API key (For Master Account) (USER_DATA) Add IP - * Restriction for Sub-Account API key * You need to enable Enable Spot & Margin Trading - * option for the api key which requests this endpoint Weight: 3000 + * Restriction for Sub-Account API key Weight(UID): 3000 Security Type: USER_DATA Notes: - You + * need to enable Enable Spot & Margin Trading option for the api key which requests this + * endpoint * * @param addIpRestrictionForSubAccountApiKeyRequest (required) * @return ApiResponse<AddIpRestrictionForSubAccountApiKeyResponse> @@ -310,7 +320,7 @@ public ApiResponse querySubAccountList( * * * @see Add + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/api-management#add-ip-restriction-for-sub-account-api-key">Add * IP Restriction for Sub-Account API key (For Master Account) (USER_DATA) Documentation */ public ApiResponse @@ -322,12 +332,39 @@ public ApiResponse querySubAccountList( addIpRestrictionForSubAccountApiKeyRequest); } + /** + * Create Sub-account API Key (For Master Account) (USER_DATA) Create a new API Key for a + * sub-account. Weight(UID): 3000 Security Type: USER_DATA Notes: - `status=2` + * requires `ipAddress` - `status=3` requires + * `thirdPartyName` - Asset Sub Account is not supported - The caller must pass the + * KYC IP restriction check + * + * @param createSubAccountApiKeyRequest (required) + * @return ApiResponse<CreateSubAccountApiKeyResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Create Sub-account API Key -
+ * + * @see Create + * Sub-account API Key (For Master Account) (USER_DATA) Documentation + */ + public ApiResponse createSubAccountApiKey( + CreateSubAccountApiKeyRequest createSubAccountApiKeyRequest) throws ApiException { + return apiManagementApi.createSubAccountApiKey(createSubAccountApiKeyRequest); + } + /** * Delete IP List For a Sub-account API Key (For Master Account) (USER_DATA) Delete IP List For - * a Sub-account API Key * You need to enable Enable Spot & Margin Trading option for the - * api key which requests this endpoint Weight: 3000 + * a Sub-account API Key Weight(UID): 3000 Security Type: USER_DATA Notes: - You need to enable + * Enable Spot & Margin Trading option for the api key which requests this endpoint * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param subAccountApiKey (required) * @param ipAddress IPs to be deleted. Can be added in batches, separated by commas (required) * @param recvWindow (optional) @@ -342,7 +379,7 @@ public ApiResponse querySubAccountList( * * * @see Delete + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/api-management#delete-ip-list-for-asub-account-api-key">Delete * IP List For a Sub-account API Key (For Master Account) (USER_DATA) Documentation */ public ApiResponse deleteIpListForASubAccountApiKey( @@ -352,11 +389,38 @@ public ApiResponse deleteIpListForASub email, subAccountApiKey, ipAddress, recvWindow); } + /** + * Delete Sub-account API Key (For Master Account) (USER_DATA) Delete an API Key of a + * sub-account. Weight(UID): 3000 Security Type: USER_DATA Notes: - Asset Sub Account is not + * supported - The caller must pass the KYC IP restriction check + * + * @param email Sub-account email (required) + * @param subAccountApiKey The sub-account API Key to be deleted (required) + * @param recvWindow (optional) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Delete Sub-account API Key -
+ * + * @see Delete + * Sub-account API Key (For Master Account) (USER_DATA) Documentation + */ + public ApiResponse deleteSubAccountApiKey( + String email, String subAccountApiKey, Long recvWindow) throws ApiException { + return apiManagementApi.deleteSubAccountApiKey(email, subAccountApiKey, recvWindow); + } + /** * Get IP Restriction for a Sub-account API Key (For Master Account) (USER_DATA) Get IP - * Restriction for a Sub-account API Key Weight: 3000 + * Restriction for a Sub-account API Key Weight(UID): 3000 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param subAccountApiKey (required) * @param recvWindow (optional) * @return ApiResponse<GetIpRestrictionForASubAccountApiKeyResponse> @@ -370,7 +434,7 @@ public ApiResponse deleteIpListForASub * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/api-management#get-ip-restriction-for-asub-account-api-key">Get * IP Restriction for a Sub-account API Key (For Master Account) (USER_DATA) * Documentation */ @@ -381,10 +445,68 @@ public ApiResponse deleteIpListForASub email, subAccountApiKey, recvWindow); } + /** + * Modify Sub-account API Key Permission (For Master Account) (USER_DATA) Modify the trading + * permissions of a sub-account API Key. Weight(UID): 3000 Security Type: USER_DATA Notes: - + * Portfolio Margin Retail User is not supported - Asset Sub Account is not supported - The + * caller must pass the KYC IP restriction check + * + * @param modifySubAccountApiKeyPermissionRequest (required) + * @return ApiResponse<ModifySubAccountApiKeyPermissionResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Modify Sub-account API Key Permission -
+ * + * @see Modify + * Sub-account API Key Permission (For Master Account) (USER_DATA) Documentation + */ + public ApiResponse modifySubAccountApiKeyPermission( + ModifySubAccountApiKeyPermissionRequest modifySubAccountApiKeyPermissionRequest) + throws ApiException { + return apiManagementApi.modifySubAccountApiKeyPermission( + modifySubAccountApiKeyPermissionRequest); + } + + /** + * Query Sub-account API Key (For Master Account) (USER_DATA) Query the API Key list of a + * sub-account. Weight(UID): 3000 Security Type: USER_DATA + * + * @param email Sub-account email (required) + * @param subAccountApiKey Specify an API Key for exact match (optional) + * @param page Page number, default 1, minimum 1 (optional) + * @param size Page size, default 30, maximum 100 (optional) + * @param recvWindow (optional) + * @return ApiResponse<QuerySubAccountApiKeyResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Query Sub-account API Key -
+ * + * @see Query + * Sub-account API Key (For Master Account) (USER_DATA) Documentation + */ + public ApiResponse querySubAccountApiKey( + String email, String subAccountApiKey, Long page, Long size, Long recvWindow) + throws ApiException { + return apiManagementApi.querySubAccountApiKey( + email, subAccountApiKey, page, size, recvWindow); + } + /** * Futures Transfer for Sub-account (For Master Account) (USER_DATA) Futures Transfer for - * Sub-account * You need to open Enable Spot & Margin Trading permission for the API Key - * which requests this endpoint. Weight: 1 + * Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - You need to open Enable Spot + * & Margin Trading permission for the API Key which requests this endpoint. * * @param futuresTransferForSubAccountRequest (required) * @return ApiResponse<FuturesTransferForSubAccountResponse> @@ -398,7 +520,7 @@ public ApiResponse deleteIpListForASub * * * @see Futures + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#futures-transfer-for-sub-account">Futures * Transfer for Sub-account (For Master Account) (USER_DATA) Documentation */ public ApiResponse futuresTransferForSubAccount( @@ -409,9 +531,9 @@ public ApiResponse futuresTransferForSubAc /** * Get Detail on Sub-account's Futures Account (For Master Account) (USER_DATA) Get Detail - * on Sub-account's Futures Account Weight: 10 + * on Sub-account's Futures Account Weight(IP): 10 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return ApiResponse<GetDetailOnSubAccountsFuturesAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -424,7 +546,7 @@ public ApiResponse futuresTransferForSubAc * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-detail-on-sub-accounts-futures-account">Get * Detail on Sub-account's Futures Account (For Master Account) (USER_DATA) * Documentation */ @@ -436,9 +558,9 @@ public ApiResponse futuresTransferForSubAc /** * Get Detail on Sub-account's Futures Account V2 (For Master Account) (USER_DATA) Get - * Detail on Sub-account's Futures Account Weight: 1 + * Detail on Sub-account's Futures Account Weight(IP): 1 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) * @param recvWindow (optional) * @return ApiResponse<GetDetailOnSubAccountsFuturesAccountV2Response> @@ -452,7 +574,7 @@ public ApiResponse futuresTransferForSubAc * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-detail-on-sub-accounts-futures-account-v2">Get * Detail on Sub-account's Futures Account V2 (For Master Account) (USER_DATA) * Documentation */ @@ -465,9 +587,9 @@ public ApiResponse futuresTransferForSubAc /** * Get Detail on Sub-account's Margin Account (For Master Account) (USER_DATA) Get Detail on - * Sub-account's Margin Account Weight: 10 + * Sub-account's Margin Account Weight(IP): 10 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return ApiResponse<GetDetailOnSubAccountsMarginAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -480,7 +602,7 @@ public ApiResponse futuresTransferForSubAc * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-detail-on-sub-accounts-margin-account">Get * Detail on Sub-account's Margin Account (For Master Account) (USER_DATA) * Documentation */ @@ -491,15 +613,16 @@ public ApiResponse futuresTransferForSubAc /** * Get Move Position History for Sub-account (For Master Account) (USER_DATA) Query move - * position history * If `startTime` and `endTime` not sent, return records - * of the last 90 days by default with 1000 maximum limits * If `startTime` is sent - * and `endTime` is not sent, return records of [max(startTime, now-90d), now]. * If - * `startTime` is not sent and `endTime` is sent, return records of - * [max(now,endTime-90d), endTime]. Weight: 1 + * position history Weight(IP): 1 Security Type: USER_DATA Notes: - If `startTime` and + * `endTime` are both omitted, records from the last 90 days are returned by default + * (up to 1000 records). - If `startTime` is sent and `endTime` is omitted, + * records in `[max(startTime, now-90d), now]` are returned. - If + * `startTime` is omitted and `endTime` is sent, records in `[max(now, + * endTime-90d), endTime]` are returned. * * @param symbol (required) - * @param page Page (required) - * @param row (required) + * @param page (required) + * @param rows (required) * @param startTime (optional) * @param endTime (optional) * @param recvWindow (optional) @@ -514,27 +637,28 @@ public ApiResponse futuresTransferForSubAc * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-move-position-history-for-sub-account">Get * Move Position History for Sub-account (For Master Account) (USER_DATA) Documentation */ public ApiResponse getMovePositionHistoryForSubAccount( String symbol, Long page, - Long row, + Long rows, Long startTime, Long endTime, Long recvWindow) throws ApiException { return assetManagementApi.getMovePositionHistoryForSubAccount( - symbol, page, row, startTime, endTime, recvWindow); + symbol, page, rows, startTime, endTime, recvWindow); } /** * Get Sub-account Deposit Address (For Master Account) (USER_DATA) Fetch sub-account deposit - * address * `amount` needs to be sent if using LIGHTNING network Weight: 1 + * address Weight(IP): 1 Security Type: USER_DATA Notes: - `amount` needs to be sent + * if using LIGHTNING network * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param coin (required) * @param network networks can be found in `GET /sapi/v1/capital/deposit/address` * (optional) @@ -551,7 +675,7 @@ public ApiResponse futuresTransferForSubAc * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-sub-account-deposit-address">Get * Sub-account Deposit Address (For Master Account) (USER_DATA) Documentation */ public ApiResponse getSubAccountDepositAddress( @@ -563,16 +687,18 @@ public ApiResponse getSubAccountDepositAddr /** * Get Sub-account Deposit History (For Master Account) (USER_DATA) Fetch sub-account deposit - * history Weight: 1 + * history Weight(IP): 1 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) + * @param includeSource Default `false`, return `sourceAddress` field when + * set to `true` (optional) * @param coin (optional) - * @param status 0(0:pending,6: credited but cannot withdraw,7:Wrong Deposit,8:Waiting User - * confirm,1:success) (optional) + * @param status Deposit status: 0=pending, 6=credited but cannot withdraw, + * 7=wrong deposit, 8=waiting user confirmation, 1=success. (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default value: 1, Max value: 200 (optional) - * @param offset default:0 (optional) + * @param limit (optional) + * @param offset (optional) * @param recvWindow (optional) * @param txId (optional) * @return ApiResponse<GetSubAccountDepositHistoryResponse> @@ -586,11 +712,12 @@ public ApiResponse getSubAccountDepositAddr * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-sub-account-deposit-history">Get * Sub-account Deposit History (For Master Account) (USER_DATA) Documentation */ public ApiResponse getSubAccountDepositHistory( String email, + Boolean includeSource, String coin, Long status, Long startTime, @@ -601,15 +728,24 @@ public ApiResponse getSubAccountDepositHist String txId) throws ApiException { return assetManagementApi.getSubAccountDepositHistory( - email, coin, status, startTime, endTime, limit, offset, recvWindow, txId); + email, + includeSource, + coin, + status, + startTime, + endTime, + limit, + offset, + recvWindow, + txId); } /** * Get Summary of Sub-account's Futures Account (For Master Account) (USER_DATA) Get Summary - * of Sub-account's Futures Account Weight: 1 + * of Sub-account's Futures Account Weight(IP): 1 Security Type: USER_DATA * - * @param page Page (required) - * @param limit Limit (Max: 500) (required) + * @param page (required) + * @param limit (required) * @param recvWindow (optional) * @return ApiResponse<GetSummaryOfSubAccountsFuturesAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -622,7 +758,7 @@ public ApiResponse getSubAccountDepositHist * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-summary-of-sub-accounts-futures-account">Get * Summary of Sub-account's Futures Account (For Master Account) (USER_DATA) * Documentation */ @@ -634,11 +770,11 @@ public ApiResponse getSubAccountDepositHist /** * Get Summary of Sub-account's Futures Account V2 (For Master Account) (USER_DATA) Get - * Summary of Sub-account's Futures Account Weight: 10 + * Summary of Sub-account's Futures Account Weight(IP): 10 Security Type: USER_DATA * * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<GetSummaryOfSubAccountsFuturesAccountV2Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -651,7 +787,7 @@ public ApiResponse getSubAccountDepositHist * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-summary-of-sub-accounts-futures-account-v2">Get * Summary of Sub-account's Futures Account V2 (For Master Account) (USER_DATA) * Documentation */ @@ -664,7 +800,7 @@ public ApiResponse getSubAccountDepositHist /** * Get Summary of Sub-account's Margin Account (For Master Account) (USER_DATA) Get Summary - * of Sub-account's Margin Account Weight: 10 + * of Sub-account's Margin Account Weight(IP): 10 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetSummaryOfSubAccountsMarginAccountResponse> @@ -678,7 +814,7 @@ public ApiResponse getSubAccountDepositHist * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#get-summary-of-sub-accounts-margin-account">Get * Summary of Sub-account's Margin Account (For Master Account) (USER_DATA) * Documentation */ @@ -689,8 +825,8 @@ public ApiResponse getSubAccountDepositHist /** * Margin Transfer for Sub-account (For Master Account) (USER_DATA) Margin Transfer for - * Sub-account * You need to open Enable Spot & Margin Trading permission for the API Key - * which requests this endpoint. Weight: 1 + * Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - You need to open Enable Spot + * & Margin Trading permission for the API Key which requests this endpoint. * * @param marginTransferForSubAccountRequest (required) * @return ApiResponse<MarginTransferForSubAccountResponse> @@ -704,7 +840,7 @@ public ApiResponse getSubAccountDepositHist * * * @see Margin + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#margin-transfer-for-sub-account">Margin * Transfer for Sub-account (For Master Account) (USER_DATA) Documentation */ public ApiResponse marginTransferForSubAccount( @@ -715,15 +851,16 @@ public ApiResponse marginTransferForSubAcco /** * Move Position for Sub-account (For Master Account) (USER_DATA) Move position between - * sub-master, master-sub, or sub-sub accounts when necessary * You need to Enable Trading - * permission for the API Key which requests this endpoint. * This function only support VIP - * level 7-9. * Only master account can use the function * Quantity should be positive number - * only * The function support normal account, PM PRO and PM PRO SPAN. * Only support for from - * account has positions * For all orders in the same orderArgs request, if any symbol’s total - * close position quantity is bigger than the symbol’s current position quantity, all batch - * orders in the same list will fail simultaneously. * Only support cross margin mode * The - * price for move position is MarkPrice only. * Not support for MSA. * Not support for the - * symbol under Reduce-Only. Weight: 1 + * sub-master, master-sub, or sub-sub accounts when necessary Weight(IP): 1 Security Type: + * USER_DATA Notes: - You need to enable the `Trading` permission for the API key used + * to call this endpoint. - This function is only available for VIP levels 7-9. - Only master + * accounts can call this endpoint. - `quantity` must be a positive number. - + * Supported account types: normal account, PM PRO, PM PRO SPAN, and PM Retail. - The source + * account must have positions. - For orders in the same `orderArgs` request, if any + * symbol's total close position quantity exceeds current position quantity, all orders in + * that batch fail. - Only cross margin mode is supported. - The move position price supports + * `MARK_PRICE` only. - MSA is not supported. - Symbols configured with + * `Reduce-Only` are not supported. * * @param movePositionForSubAccountRequest (required) * @return ApiResponse<MovePositionForSubAccountResponse> @@ -737,7 +874,7 @@ public ApiResponse marginTransferForSubAcco * * * @see Move + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#move-position-for-sub-account">Move * Position for Sub-account (For Master Account) (USER_DATA) Documentation */ public ApiResponse movePositionForSubAccount( @@ -746,9 +883,10 @@ public ApiResponse movePositionForSubAccount( } /** - * Query Sub-account Assets (For Master Account) (USER_DATA) Fetch sub-account assets Weight: 60 + * Query Sub-account Assets (For Master Account) (USER_DATA) Fetch sub-account assets + * Weight(UID): 60 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return ApiResponse<QuerySubAccountAssetsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -761,7 +899,7 @@ public ApiResponse movePositionForSubAccount( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-assets">Query * Sub-account Assets (For Master Account) (USER_DATA) Documentation */ public ApiResponse querySubAccountAssets( @@ -770,9 +908,10 @@ public ApiResponse querySubAccountAssets( } /** - * Query Sub-account Assets (For Master Account) (USER_DATA) Fetch sub-account assets Weight: 60 + * Query Sub-account Assets V4 (For Master Account) (USER_DATA) Fetch sub-account assets + * Weight(UID): 60 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return ApiResponse<QuerySubAccountAssetsAssetManagementResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -785,8 +924,8 @@ public ApiResponse querySubAccountAssets( * * * @see Query - * Sub-account Assets (For Master Account) (USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-assets-asset-management">Query + * Sub-account Assets V4 (For Master Account) (USER_DATA) Documentation */ public ApiResponse querySubAccountAssetsAssetManagement(String email, Long recvWindow) @@ -796,14 +935,14 @@ public ApiResponse querySubAccountAssets( /** * Query Sub-account Futures Asset Transfer History (For Master Account) (USER_DATA) Query - * Sub-account Futures Asset Transfer History Weight: 1 + * Sub-account Futures Asset Transfer History Weight(IP): 1 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) - * @param startTime (optional) + * @param startTime Cannot be earlier than 1 month ago (optional) * @param endTime (optional) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<QuerySubAccountFuturesAssetTransferHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -816,7 +955,7 @@ public ApiResponse querySubAccountAssets( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-futures-asset-transfer-history">Query * Sub-account Futures Asset Transfer History (For Master Account) (USER_DATA) * Documentation */ @@ -836,15 +975,17 @@ public ApiResponse querySubAccountAssets( /** * Query Sub-account Spot Asset Transfer History (For Master Account) (USER_DATA) Query - * Sub-account Spot Asset Transfer History * fromEmail and toEmail cannot be sent at the same - * time. * Return fromEmail equal master account email by default. Weight: 1 + * Sub-account Spot Asset Transfer History Weight(IP): 1 Security Type: USER_DATA Notes: - + * `fromEmail` and `toEmail` cannot be sent at the same time. - If both + * `fromEmail` and `toEmail` are omitted, records with `fromEmail` + * equal to the master account are returned by default. * * @param fromEmail (optional) * @param toEmail (optional) * @param startTime (optional) * @param endTime (optional) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<QuerySubAccountSpotAssetTransferHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -857,7 +998,7 @@ public ApiResponse querySubAccountAssets( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-spot-asset-transfer-history">Query * Sub-account Spot Asset Transfer History (For Master Account) (USER_DATA) * Documentation */ @@ -877,11 +1018,11 @@ public ApiResponse querySubAccountAssets( /** * Query Sub-account Spot Assets Summary (For Master Account) (USER_DATA) Get BTC valued asset - * summary of subaccounts. Weight: 1 + * summary of subaccounts. Weight(IP): 1 Security Type: USER_DATA * * @param email Managed sub-account email (optional) - * @param page Default value: 1 (optional) - * @param size default 10, max 20 (optional) + * @param page (optional) + * @param size (optional) * @param recvWindow (optional) * @return ApiResponse<QuerySubAccountSpotAssetsSummaryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -894,7 +1035,7 @@ public ApiResponse querySubAccountAssets( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-sub-account-spot-assets-summary">Query * Sub-account Spot Assets Summary (For Master Account) (USER_DATA) Documentation */ public ApiResponse querySubAccountSpotAssetsSummary( @@ -904,17 +1045,20 @@ public ApiResponse querySubAccountSpot /** * Query Universal Transfer History (For Master Account) (USER_DATA) Query Universal Transfer - * History * fromEmail and toEmail cannot be sent at the same time. * Return fromEmail equal - * master account email by default. * The query time period must be less than 7 days. * If - * startTime and endTime not sent, return records of the last 7 days by default. Weight: 1 + * History Weight(IP): 1 Security Type: USER_DATA Notes: - `fromEmail` and + * `toEmail` cannot be sent at the same time. - If both `fromEmail` and + * `toEmail` are omitted, records with `fromEmail` equal to the master + * account are returned by default. - The query time range must be less than 7 days. - If + * `startTime` and `endTime` are omitted, records from the last 7 days are + * returned by default. * * @param fromEmail (optional) * @param toEmail (optional) * @param clientTranId (optional) * @param startTime (optional) * @param endTime (optional) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<QueryUniversalTransferHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -927,7 +1071,7 @@ public ApiResponse querySubAccountSpot * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#query-universal-transfer-history">Query * Universal Transfer History (For Master Account) (USER_DATA) Documentation */ public ApiResponse queryUniversalTransferHistory( @@ -946,8 +1090,9 @@ public ApiResponse queryUniversalTransfer /** * Sub-account Futures Asset Transfer (For Master Account) (USER_DATA) Sub-account Futures Asset - * Transfer * Master account can transfer max 2000 times a minute * There must be sufficient - * margin balance in futures wallet to execute transferring. Weight: 1 + * Transfer Weight(IP): 1 Security Type: USER_DATA Notes: - A master account can transfer at + * most 2000 times per minute. - The futures wallet must have sufficient margin balance to + * execute the transfer. * * @param subAccountFuturesAssetTransferRequest (required) * @return ApiResponse<SubAccountFuturesAssetTransferResponse> @@ -961,7 +1106,7 @@ public ApiResponse queryUniversalTransfer * * * @see Sub-account + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#sub-account-futures-asset-transfer">Sub-account * Futures Asset Transfer (For Master Account) (USER_DATA) Documentation */ public ApiResponse subAccountFuturesAssetTransfer( @@ -972,15 +1117,16 @@ public ApiResponse subAccountFuturesAsse } /** - * Sub-account Transfer History (For Sub-account) (USER_DATA) Sub-account Transfer History * If - * type is not sent, the records of type 2: transfer out will be returned by default. * If - * startTime and endTime are not sent, the recent 30-day data will be returned. Weight: 1 + * Sub-account Transfer History (For Sub-account) (USER_DATA) Sub-account Transfer History + * Weight(IP): 1 Security Type: USER_DATA Notes: - If `type` is not sent, records of + * type `2` (transfer out) are returned by default. - If `startTime` and + * `endTime` are not sent, data from the most recent 30 days is returned. * * @param asset If not sent, result of all assets will be returned (optional) * @param type 1: transfer in, 2: transfer out (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param limit (optional) * @param returnFailHistory Default `False`, return PROCESS and SUCCESS status * history; If `True`,return PROCESS and SUCCESS and FAILURE status history * (optional) @@ -996,7 +1142,7 @@ public ApiResponse subAccountFuturesAsse * * * @see Sub-account + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#sub-account-transfer-history">Sub-account * Transfer History (For Sub-account) (USER_DATA) Documentation */ public ApiResponse subAccountTransferHistory( @@ -1013,8 +1159,9 @@ public ApiResponse subAccountTransferHistory( } /** - * Transfer to Master (For Sub-account) (USER_DATA) Transfer to Master * You need to open Enable - * Spot & Margin Trading permission for the API Key which requests this endpoint. Weight: 1 + * Transfer to Master (For Sub-account) (USER_DATA) Transfer to Master Weight(IP): 1 Security + * Type: USER_DATA Notes: - You need to open Enable Spot & Margin Trading permission for the + * API Key which requests this endpoint. * * @param transferToMasterRequest (required) * @return ApiResponse<TransferToMasterResponse> @@ -1028,7 +1175,7 @@ public ApiResponse subAccountTransferHistory( * * * @see Transfer + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#transfer-to-master">Transfer * to Master (For Sub-account) (USER_DATA) Documentation */ public ApiResponse transferToMaster( @@ -1038,8 +1185,8 @@ public ApiResponse transferToMaster( /** * Transfer to Sub-account of Same Master (For Sub-account) (USER_DATA) Transfer to Sub-account - * of Same Master * You need to open Enable Spot & Margin Trading permission for the API Key - * which requests this endpoint. Weight: 1 + * of Same Master Weight(IP): 1 Security Type: USER_DATA Notes: - You need to open Enable Spot + * & Margin Trading permission for the API Key which requests this endpoint. * * @param transferToSubAccountOfSameMasterRequest (required) * @return ApiResponse<TransferToSubAccountOfSameMasterResponse> @@ -1053,7 +1200,7 @@ public ApiResponse transferToMaster( * * * @see Transfer + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#transfer-to-sub-account-of-same-master">Transfer * to Sub-account of Same Master (For Sub-account) (USER_DATA) Documentation */ public ApiResponse transferToSubAccountOfSameMaster( @@ -1064,20 +1211,21 @@ public ApiResponse transferToSubAccoun } /** - * Universal Transfer (For Master Account) (USER_DATA) Universal Transfer * You need to enable - * \"internal transfer\" option for the api key which requests this endpoint. * - * Transfer from master account by default if fromEmail is not sent. * Transfer to master - * account by default if toEmail is not sent. * At least either fromEmail or toEmail need to be - * sent when the fromAccountType and the toAccountType are the same. * Supported transfer - * scenarios: * `SPOT` transfer to `SPOT`, `USDT_FUTURE`, - * `COIN_FUTURE` (regardless of master or sub) * `SPOT`, - * `USDT_FUTURE`, `COIN_FUTURE` transfer to `SPOT` (regardless of - * master or sub) * Master account `SPOT` transfer to sub-account - * `MARGIN(Cross)`, `ISOLATED_MARGIN` * Sub-account - * `MARGIN(Cross)`, `ISOLATED_MARGIN` transfer to master account - * `SPOT` * Sub-account `MARGIN(Cross)` transfer to Sub-account - * `MARGIN(Cross)` * `ALPHA` to `ALPHA` (regardless of master or - * sub) Weight: 360 + * Universal Transfer (For Master Account) (USER_DATA) Universal Transfer Weight(IP): 1 + * Weight(UID): 360 Security Type: USER_DATA Notes: - You need to enable the `internal + * transfer` option for the API key used to call this endpoint. - If `fromEmail` + * is not sent, transfer out from the master account by default. - If `toEmail` is not + * sent, transfer into the master account by default. - When `fromAccountType` and + * `toAccountType` are the same, at least one of `fromEmail` or + * `toEmail` must be sent. - Supported transfer scenarios: - `SPOT` -> + * `SPOT` / `USDT_FUTURE` / `COIN_FUTURE` (master or sub-account). + * - `SPOT` / `USDT_FUTURE` / `COIN_FUTURE` -> `SPOT` + * (master or sub-account). - Master account `SPOT` -> sub-account + * `MARGIN(Cross)` / `ISOLATED_MARGIN`. - Sub-account + * `MARGIN(Cross)` / `ISOLATED_MARGIN` -> master account + * `SPOT`. - Sub-account `MARGIN(Cross)` -> sub-account + * `MARGIN(Cross)`. - `ALPHA` -> `ALPHA` (master or + * sub-account). * * @param universalTransferRequest (required) * @return ApiResponse<UniversalTransferResponse> @@ -1091,7 +1239,7 @@ public ApiResponse transferToSubAccoun * * * @see Universal + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/asset-management#universal-transfer">Universal * Transfer (For Master Account) (USER_DATA) Documentation */ public ApiResponse universalTransfer( @@ -1101,8 +1249,9 @@ public ApiResponse universalTransfer( /** * Deposit Assets Into The Managed Sub-account (For Investor Master Account) (USER_DATA) Deposit - * Assets Into The Managed Sub-account * You need to enable `Enable Spot & Margin - * Trading` option for the api key which requests this endpoint Weight: 1 + * Assets Into The Managed Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - You need + * to enable `Enable Spot & Margin Trading` option for the api key which requests + * this endpoint * * @param depositAssetsIntoTheManagedSubAccountRequest (required) * @return ApiResponse<DepositAssetsIntoTheManagedSubAccountResponse> @@ -1116,7 +1265,7 @@ public ApiResponse universalTransfer( * * * @see Deposit + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#deposit-assets-into-the-managed-sub-account">Deposit * Assets Into The Managed Sub-account (For Investor Master Account) (USER_DATA) * Documentation */ @@ -1131,11 +1280,12 @@ public ApiResponse universalTransfer( /** * Get Managed Sub-account Deposit Address (For Investor Master Account) (USER_DATA) Get - * investor's managed sub-account deposit address. * If `network` is not send, - * return with default `network` of the `coin`. * * `amount` needs - * to be sent if using LIGHTNING network Weight: 1 + * investor's managed sub-account deposit address. Weight(UID): 1 Security Type: USER_DATA + * Notes: - If `network` is not sent, the default `network` for the + * `coin` is returned. - When using `LIGHTNING`, `amount` must be + * provided. * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param coin (required) * @param network networks can be found in `GET /sapi/v1/capital/deposit/address` * (optional) @@ -1152,7 +1302,7 @@ public ApiResponse universalTransfer( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#get-managed-sub-account-deposit-address">Get * Managed Sub-account Deposit Address (For Investor Master Account) (USER_DATA) * Documentation */ @@ -1166,9 +1316,9 @@ public ApiResponse universalTransfer( /** * Query Managed Sub-account Asset Details (For Investor Master Account) (USER_DATA) Query - * Managed Sub-account Asset Details Weight: 1 + * Managed Sub-account Asset Details Weight(IP): 1 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param recvWindow (optional) * @return ApiResponse<QueryManagedSubAccountAssetDetailsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1181,7 +1331,7 @@ public ApiResponse universalTransfer( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-asset-details">Query * Managed Sub-account Asset Details (For Investor Master Account) (USER_DATA) * Documentation */ @@ -1192,12 +1342,12 @@ public ApiResponse universalTransfer( /** * Query Managed Sub-account Futures Asset Details (For Investor Master Account) (USER_DATA) - * Investor can use this api to query managed sub account futures asset details Weight: 60 + * Investor can use this api to query managed sub account futures asset details Weight(UID): 60 + * Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) - * @param accountType No input or input \"MARGIN\" to get Cross Margin account - * details. Input \"ISOLATED_MARGIN\" to get Isolated Margin account details. - * (optional) + * @param email (required) + * @param accountType No input or input \"USDT_FUTURE\" to get UM Futures account + * details. Input \"COIN_FUTURE\" to get CM Futures account details. (optional) * @return ApiResponse<QueryManagedSubAccountFuturesAssetDetailsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1209,7 +1359,7 @@ public ApiResponse universalTransfer( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-futures-asset-details">Query * Managed Sub-account Futures Asset Details (For Investor Master Account) (USER_DATA) * Documentation */ @@ -1221,11 +1371,11 @@ public ApiResponse universalTransfer( /** * Query Managed Sub-account List (For Investor) (USER_DATA) Get investor's managed - * sub-account list. Weight: 60 + * sub-account list. Weight(UID): 60 Security Type: USER_DATA * - * @param email Managed sub-account email (optional) - * @param page Default value: 1 (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * @param email (optional) + * @param page (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<QueryManagedSubAccountListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1238,7 +1388,7 @@ public ApiResponse universalTransfer( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-list">Query * Managed Sub-account List (For Investor) (USER_DATA) Documentation */ public ApiResponse queryManagedSubAccountList( @@ -1248,9 +1398,10 @@ public ApiResponse queryManagedSubAccountLis /** * Query Managed Sub-account Margin Asset Details (For Investor Master Account) (USER_DATA) - * Investor can use this api to query managed sub account margin asset details Weight: 1 + * Investor can use this api to query managed sub account margin asset details Weight(IP): 1 + * Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param accountType No input or input \"MARGIN\" to get Cross Margin account * details. Input \"ISOLATED_MARGIN\" to get Isolated Margin account details. * (optional) @@ -1265,7 +1416,7 @@ public ApiResponse queryManagedSubAccountLis * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-margin-asset-details">Query * Managed Sub-account Margin Asset Details (For Investor Master Account) (USER_DATA) * Documentation */ @@ -1277,16 +1428,18 @@ public ApiResponse queryManagedSubAccountLis /** * Query Managed Sub-account Snapshot (For Investor Master Account) (USER_DATA) Query Managed - * Sub-account Snapshot * The query time period must be less then 30 days * Support query within - * the last one month only * If startTimeand endTime not sent, return records of the last 7 days - * by default Weight: 2400 - * - * @param email [Sub-account email](#email-address) (required) - * @param type \"SPOT\", \"MARGIN\"(cross), \"FUTURES\"(UM) - * (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default value: 1, Max value: 200 (optional) + * Sub-account Snapshot Weight(IP): 2400 Security Type: USER_DATA Notes: - The query time range + * must be less than 30 days. - Only data from the most recent month is supported. - If + * `startTime` and `endTime` are omitted, records from the last 7 days are + * returned by default. + * + * @param email (required) + * @param type (required) + * @param startTime Query time range must be within 30 days and only supports data within the + * last month. (optional) + * @param endTime If both startTime and endTime are omitted, records from the last 7 days are + * returned by default. (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<QueryManagedSubAccountSnapshotResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1299,34 +1452,34 @@ public ApiResponse queryManagedSubAccountLis * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-snapshot">Query * Managed Sub-account Snapshot (For Investor Master Account) (USER_DATA) Documentation */ public ApiResponse queryManagedSubAccountSnapshot( - String email, String type, Long startTime, Long endTime, Long limit, Long recvWindow) + String email, OrderType type, Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { return managedSubAccountApi.queryManagedSubAccountSnapshot( email, type, startTime, endTime, limit, recvWindow); } /** - * Query Managed Sub Account Transfer Log (For Investor Master Account) (USER_DATA) Investor can - * use this api to query managed sub account transfer log. This endpoint is available for - * investor of Managed Sub-Account. A Managed Sub-Account is an account type for investors who - * value flexibility in asset allocation and account application, while delegating trades to a - * professional trading team. Please refer to + * Query Managed Sub Account Transfer Log For Investor Master Account (USER_DATA) Query Managed + * Sub Account Transfer Log For Investor Master Account Investor can use this api to query + * managed sub account transfer log. This endpoint is available for investor of Managed + * Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in + * asset allocation and account application, while delegating trades to a professional trading + * team. Please refer to * [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) - * Weight: 1 + * Weight(IP): 1 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param startTime Start Time (required) * @param endTime End Time (The start time and end time interval cannot exceed half a year) * (required) * @param page Page (required) - * @param limit Limit (Max: 500) (required) + * @param limit (required) * @param transfers Transfer Direction (FROM/TO) (optional) - * @param transferFunctionAccountType Transfer function account type - * (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) (optional) + * @param transferFunctionAccountType (optional) * @return ApiResponse<QueryManagedSubAccountTransferLogMasterAccountInvestorResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1338,8 +1491,8 @@ public ApiResponse queryManagedSubAccoun * * * @see Query - * Managed Sub Account Transfer Log (For Investor Master Account) (USER_DATA) + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-transfer-log-master-account-investor">Query + * Managed Sub Account Transfer Log For Investor Master Account (USER_DATA) * Documentation */ public ApiResponse @@ -1350,30 +1503,30 @@ public ApiResponse queryManagedSubAccoun Long page, Long limit, String transfers, - String transferFunctionAccountType) + TransferFunctionAccountType transferFunctionAccountType) throws ApiException { return managedSubAccountApi.queryManagedSubAccountTransferLogMasterAccountInvestor( email, startTime, endTime, page, limit, transfers, transferFunctionAccountType); } /** - * Query Managed Sub Account Transfer Log (For Trading Team Master Account) (USER_DATA) Trading - * team can use this api to query managed sub account transfer log. This endpoint is available - * for trading team of Managed Sub-Account. A Managed Sub-Account is an account type for - * investors who value flexibility in asset allocation and account application, while delegating - * trades to a professional trading team. Please refer to + * Query Managed Sub Account Transfer Log For Trading Team Master Account (USER_DATA) Query + * Managed Sub Account Transfer Log For Trading Team Master Account Trading team can use this + * api to query managed sub account transfer log. This endpoint is available for trading team of + * Managed Sub-Account. A Managed Sub-Account is an account type for investors who value + * flexibility in asset allocation and account application, while delegating trades to a + * professional trading team. Please refer to * [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) - * Weight: 60 + * Weight(UID): 60 Security Type: USER_DATA * - * @param email [Sub-account email](#email-address) (required) + * @param email (required) * @param startTime Start Time (required) * @param endTime End Time (The start time and end time interval cannot exceed half a year) * (required) - * @param page Page (required) - * @param limit Limit (Max: 500) (required) + * @param page (required) + * @param limit (required) * @param transfers Transfer Direction (FROM/TO) (optional) - * @param transferFunctionAccountType Transfer function account type - * (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) (optional) + * @param transferFunctionAccountType (optional) * @return ApiResponse<QueryManagedSubAccountTransferLogMasterAccountTradingResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1385,8 +1538,8 @@ public ApiResponse queryManagedSubAccoun * * * @see Query - * Managed Sub Account Transfer Log (For Trading Team Master Account) (USER_DATA) + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-transfer-log-master-account-trading">Query + * Managed Sub Account Transfer Log For Trading Team Master Account (USER_DATA) * Documentation */ public ApiResponse @@ -1397,7 +1550,7 @@ public ApiResponse queryManagedSubAccoun Long page, Long limit, String transfers, - String transferFunctionAccountType) + TransferFunctionAccountType transferFunctionAccountType) throws ApiException { return managedSubAccountApi.queryManagedSubAccountTransferLogMasterAccountTrading( email, startTime, endTime, page, limit, transfers, transferFunctionAccountType); @@ -1405,16 +1558,16 @@ public ApiResponse queryManagedSubAccoun /** * Query Managed Sub Account Transfer Log (For Trading Team Sub Account) (USER_DATA) Query - * Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight: 60 + * Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight(UID): 60 Security + * Type: USER_DATA * * @param startTime Start Time (required) * @param endTime End Time (The start time and end time interval cannot exceed half a year) * (required) - * @param page Page (required) - * @param limit Limit (Max: 500) (required) - * @param transfers Transfer Direction (FROM/TO) (optional) - * @param transferFunctionAccountType Transfer function account type - * (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) (optional) + * @param page (required) + * @param limit (required) + * @param transfers Transfer Direction (from/to) (optional) + * @param transferFunctionAccountType (optional) * @param recvWindow (optional) * @return ApiResponse<QueryManagedSubAccountTransferLogSubAccountTradingResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1427,7 +1580,7 @@ public ApiResponse queryManagedSubAccoun * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-transfer-log-sub-account-trading">Query * Managed Sub Account Transfer Log (For Trading Team Sub Account) (USER_DATA) * Documentation */ @@ -1438,7 +1591,7 @@ public ApiResponse queryManagedSubAccoun Long page, Long limit, String transfers, - String transferFunctionAccountType, + TransferFunctionAccountType transferFunctionAccountType, Long recvWindow) throws ApiException { return managedSubAccountApi.queryManagedSubAccountTransferLogSubAccountTrading( @@ -1453,8 +1606,8 @@ public ApiResponse queryManagedSubAccoun /** * Withdrawl Assets From The Managed Sub-account (For Investor Master Account) (USER_DATA) - * Withdrawl Assets From The Managed Sub-account * You need to enable `Enable Spot & - * Margin Trading` option for the api key which requests this endpoint Weight: 1 + * Withdrawl Assets From The Managed Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - + * Your API key must have the permission `Enable Spot & Margin Trading`. * * @param withdrawlAssetsFromTheManagedSubAccountRequest (required) * @return ApiResponse<WithdrawlAssetsFromTheManagedSubAccountResponse> @@ -1468,7 +1621,7 @@ public ApiResponse queryManagedSubAccoun * * * @see Withdrawl + * href="https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#withdrawl-assets-from-the-managed-sub-account">Withdrawl * Assets From The Managed Sub-account (For Investor Master Account) (USER_DATA) * Documentation */ diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/AddIpRestrictionForSubAccountApiKeyRequest.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/AddIpRestrictionForSubAccountApiKeyRequest.java index 02526117c..aecba3c2b 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/AddIpRestrictionForSubAccountApiKeyRequest.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/AddIpRestrictionForSubAccountApiKeyRequest.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AddIpRestrictionForSubAccountApiKeyRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AddIpRestrictionForSubAccountApiKeyRequest { public static final String SERIALIZED_NAME_EMAIL = "email"; @@ -117,7 +117,8 @@ public AddIpRestrictionForSubAccountApiKeyRequest status( } /** - * Get status + * IP Restriction status. 1 = IP Unrestricted. 2 = Restrict access to trusted IPs + * only. * * @return status */ @@ -138,7 +139,7 @@ public AddIpRestrictionForSubAccountApiKeyRequest ipAddress( } /** - * Get ipAddress + * Insert static IP in batch, separated by commas. * * @return ipAddress */ @@ -158,11 +159,12 @@ public AddIpRestrictionForSubAccountApiKeyRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/AddIpRestrictionForSubAccountApiKeyResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/AddIpRestrictionForSubAccountApiKeyResponse.java index 4cb2069d4..7674b678b 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/AddIpRestrictionForSubAccountApiKeyResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/AddIpRestrictionForSubAccountApiKeyResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** AddIpRestrictionForSubAccountApiKeyResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AddIpRestrictionForSubAccountApiKeyResponse { public static final String SERIALIZED_NAME_STATUS = "status"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/CreateAVirtualSubAccountRequest.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/CreateAVirtualSubAccountRequest.java index 6bca443a3..2817e5821 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/CreateAVirtualSubAccountRequest.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/CreateAVirtualSubAccountRequest.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CreateAVirtualSubAccountRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CreateAVirtualSubAccountRequest { public static final String SERIALIZED_NAME_SUB_ACCOUNT_STRING = "subAccountString"; @@ -57,7 +57,7 @@ public CreateAVirtualSubAccountRequest subAccountString( } /** - * Get subAccountString + * Please input a string. We will create a virtual email using that string for you to register * * @return subAccountString */ @@ -78,11 +78,12 @@ public CreateAVirtualSubAccountRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/CreateAVirtualSubAccountResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/CreateAVirtualSubAccountResponse.java index 0772325a2..be45cc75e 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/CreateAVirtualSubAccountResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/CreateAVirtualSubAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CreateAVirtualSubAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CreateAVirtualSubAccountResponse { public static final String SERIALIZED_NAME_EMAIL = "email"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/CreateSubAccountApiKeyRequest.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/CreateSubAccountApiKeyRequest.java new file mode 100644 index 000000000..382c44026 --- /dev/null +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/CreateSubAccountApiKeyRequest.java @@ -0,0 +1,648 @@ +/* + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.sub_account.rest.model; + +import com.binance.connector.client.sub_account.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** CreateSubAccountApiKeyRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class CreateSubAccountApiKeyRequest { + public static final String SERIALIZED_NAME_EMAIL = "email"; + + @SerializedName(SERIALIZED_NAME_EMAIL) + @jakarta.annotation.Nonnull + private String email; + + public static final String SERIALIZED_NAME_API_NAME = "apiName"; + + @SerializedName(SERIALIZED_NAME_API_NAME) + @jakarta.annotation.Nonnull + private String apiName; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @jakarta.annotation.Nonnull + private Long status; + + public static final String SERIALIZED_NAME_CAN_TRADE = "canTrade"; + + @SerializedName(SERIALIZED_NAME_CAN_TRADE) + @jakarta.annotation.Nullable + private Boolean canTrade; + + public static final String SERIALIZED_NAME_CAN_MARGIN_LOAN_REPAY = "canMarginLoanRepay"; + + @SerializedName(SERIALIZED_NAME_CAN_MARGIN_LOAN_REPAY) + @jakarta.annotation.Nullable + private Boolean canMarginLoanRepay; + + public static final String SERIALIZED_NAME_CAN_FUTURES_TRADE = "canFuturesTrade"; + + @SerializedName(SERIALIZED_NAME_CAN_FUTURES_TRADE) + @jakarta.annotation.Nullable + private Boolean canFuturesTrade; + + public static final String SERIALIZED_NAME_CAN_UNIVERSAL_TRANSFER = "canUniversalTransfer"; + + @SerializedName(SERIALIZED_NAME_CAN_UNIVERSAL_TRANSFER) + @jakarta.annotation.Nullable + private Boolean canUniversalTransfer; + + public static final String SERIALIZED_NAME_CAN_VANILLA_OPTIONS = "canVanillaOptions"; + + @SerializedName(SERIALIZED_NAME_CAN_VANILLA_OPTIONS) + @jakarta.annotation.Nullable + private Boolean canVanillaOptions; + + public static final String SERIALIZED_NAME_IP_ADDRESS = "ipAddress"; + + @SerializedName(SERIALIZED_NAME_IP_ADDRESS) + @jakarta.annotation.Nullable + private String ipAddress; + + public static final String SERIALIZED_NAME_THIRD_PARTY_NAME = "thirdPartyName"; + + @SerializedName(SERIALIZED_NAME_THIRD_PARTY_NAME) + @jakarta.annotation.Nullable + private String thirdPartyName; + + public static final String SERIALIZED_NAME_PUBLIC_KEY = "publicKey"; + + @SerializedName(SERIALIZED_NAME_PUBLIC_KEY) + @jakarta.annotation.Nullable + private String publicKey; + + public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; + + @SerializedName(SERIALIZED_NAME_RECV_WINDOW) + @jakarta.annotation.Nullable + private Long recvWindow; + + public CreateSubAccountApiKeyRequest() {} + + public CreateSubAccountApiKeyRequest email(@jakarta.annotation.Nonnull String email) { + this.email = email; + return this; + } + + /** + * Sub-account email + * + * @return email + */ + @jakarta.annotation.Nonnull + @NotNull + public String getEmail() { + return email; + } + + public void setEmail(@jakarta.annotation.Nonnull String email) { + this.email = email; + } + + public CreateSubAccountApiKeyRequest apiName(@jakarta.annotation.Nonnull String apiName) { + this.apiName = apiName; + return this; + } + + /** + * API Key name + * + * @return apiName + */ + @jakarta.annotation.Nonnull + @NotNull + public String getApiName() { + return apiName; + } + + public void setApiName(@jakarta.annotation.Nonnull String apiName) { + this.apiName = apiName; + } + + public CreateSubAccountApiKeyRequest status(@jakarta.annotation.Nonnull Long status) { + this.status = status; + return this; + } + + /** + * IP restriction status. 1 = unrestricted, 2 = restricted to trusted IPs, 3 = + * third-party IP restriction + * + * @return status + */ + @jakarta.annotation.Nonnull + @NotNull + public Long getStatus() { + return status; + } + + public void setStatus(@jakarta.annotation.Nonnull Long status) { + this.status = status; + } + + public CreateSubAccountApiKeyRequest canTrade(@jakarta.annotation.Nullable Boolean canTrade) { + this.canTrade = canTrade; + return this; + } + + /** + * Spot & Margin trading permission, default false + * + * @return canTrade + */ + @jakarta.annotation.Nullable + public Boolean getCanTrade() { + return canTrade; + } + + public void setCanTrade(@jakarta.annotation.Nullable Boolean canTrade) { + this.canTrade = canTrade; + } + + public CreateSubAccountApiKeyRequest canMarginLoanRepay( + @jakarta.annotation.Nullable Boolean canMarginLoanRepay) { + this.canMarginLoanRepay = canMarginLoanRepay; + return this; + } + + /** + * Margin borrow/repay permission, default false + * + * @return canMarginLoanRepay + */ + @jakarta.annotation.Nullable + public Boolean getCanMarginLoanRepay() { + return canMarginLoanRepay; + } + + public void setCanMarginLoanRepay(@jakarta.annotation.Nullable Boolean canMarginLoanRepay) { + this.canMarginLoanRepay = canMarginLoanRepay; + } + + public CreateSubAccountApiKeyRequest canFuturesTrade( + @jakarta.annotation.Nullable Boolean canFuturesTrade) { + this.canFuturesTrade = canFuturesTrade; + return this; + } + + /** + * Futures trading permission, default false + * + * @return canFuturesTrade + */ + @jakarta.annotation.Nullable + public Boolean getCanFuturesTrade() { + return canFuturesTrade; + } + + public void setCanFuturesTrade(@jakarta.annotation.Nullable Boolean canFuturesTrade) { + this.canFuturesTrade = canFuturesTrade; + } + + public CreateSubAccountApiKeyRequest canUniversalTransfer( + @jakarta.annotation.Nullable Boolean canUniversalTransfer) { + this.canUniversalTransfer = canUniversalTransfer; + return this; + } + + /** + * Universal transfer permission, default false + * + * @return canUniversalTransfer + */ + @jakarta.annotation.Nullable + public Boolean getCanUniversalTransfer() { + return canUniversalTransfer; + } + + public void setCanUniversalTransfer(@jakarta.annotation.Nullable Boolean canUniversalTransfer) { + this.canUniversalTransfer = canUniversalTransfer; + } + + public CreateSubAccountApiKeyRequest canVanillaOptions( + @jakarta.annotation.Nullable Boolean canVanillaOptions) { + this.canVanillaOptions = canVanillaOptions; + return this; + } + + /** + * Vanilla options permission, default false + * + * @return canVanillaOptions + */ + @jakarta.annotation.Nullable + public Boolean getCanVanillaOptions() { + return canVanillaOptions; + } + + public void setCanVanillaOptions(@jakarta.annotation.Nullable Boolean canVanillaOptions) { + this.canVanillaOptions = canVanillaOptions; + } + + public CreateSubAccountApiKeyRequest ipAddress(@jakarta.annotation.Nullable String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Required when status=2. IP address list, max 500 chars + * + * @return ipAddress + */ + @jakarta.annotation.Nullable + public String getIpAddress() { + return ipAddress; + } + + public void setIpAddress(@jakarta.annotation.Nullable String ipAddress) { + this.ipAddress = ipAddress; + } + + public CreateSubAccountApiKeyRequest thirdPartyName( + @jakarta.annotation.Nullable String thirdPartyName) { + this.thirdPartyName = thirdPartyName; + return this; + } + + /** + * Required when status=3. Third-party name + * + * @return thirdPartyName + */ + @jakarta.annotation.Nullable + public String getThirdPartyName() { + return thirdPartyName; + } + + public void setThirdPartyName(@jakarta.annotation.Nullable String thirdPartyName) { + this.thirdPartyName = thirdPartyName; + } + + public CreateSubAccountApiKeyRequest publicKey(@jakarta.annotation.Nullable String publicKey) { + this.publicKey = publicKey; + return this; + } + + /** + * Ed25519 public key (optional, for Ed25519 type API Key) + * + * @return publicKey + */ + @jakarta.annotation.Nullable + public String getPublicKey() { + return publicKey; + } + + public void setPublicKey(@jakarta.annotation.Nullable String publicKey) { + this.publicKey = publicKey; + } + + public CreateSubAccountApiKeyRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) { + this.recvWindow = recvWindow; + return this; + } + + /** + * Get recvWindow maximum: 60000 + * + * @return recvWindow + */ + @jakarta.annotation.Nullable + @Max(60000L) + public Long getRecvWindow() { + return recvWindow; + } + + public void setRecvWindow(@jakarta.annotation.Nullable Long recvWindow) { + this.recvWindow = recvWindow; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSubAccountApiKeyRequest createSubAccountApiKeyRequest = + (CreateSubAccountApiKeyRequest) o; + return Objects.equals(this.email, createSubAccountApiKeyRequest.email) + && Objects.equals(this.apiName, createSubAccountApiKeyRequest.apiName) + && Objects.equals(this.status, createSubAccountApiKeyRequest.status) + && Objects.equals(this.canTrade, createSubAccountApiKeyRequest.canTrade) + && Objects.equals( + this.canMarginLoanRepay, createSubAccountApiKeyRequest.canMarginLoanRepay) + && Objects.equals( + this.canFuturesTrade, createSubAccountApiKeyRequest.canFuturesTrade) + && Objects.equals( + this.canUniversalTransfer, + createSubAccountApiKeyRequest.canUniversalTransfer) + && Objects.equals( + this.canVanillaOptions, createSubAccountApiKeyRequest.canVanillaOptions) + && Objects.equals(this.ipAddress, createSubAccountApiKeyRequest.ipAddress) + && Objects.equals(this.thirdPartyName, createSubAccountApiKeyRequest.thirdPartyName) + && Objects.equals(this.publicKey, createSubAccountApiKeyRequest.publicKey) + && Objects.equals(this.recvWindow, createSubAccountApiKeyRequest.recvWindow); + } + + @Override + public int hashCode() { + return Objects.hash( + email, + apiName, + status, + canTrade, + canMarginLoanRepay, + canFuturesTrade, + canUniversalTransfer, + canVanillaOptions, + ipAddress, + thirdPartyName, + publicKey, + recvWindow); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateSubAccountApiKeyRequest {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" apiName: ").append(toIndentedString(apiName)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" canTrade: ").append(toIndentedString(canTrade)).append("\n"); + sb.append(" canMarginLoanRepay: ") + .append(toIndentedString(canMarginLoanRepay)) + .append("\n"); + sb.append(" canFuturesTrade: ").append(toIndentedString(canFuturesTrade)).append("\n"); + sb.append(" canUniversalTransfer: ") + .append(toIndentedString(canUniversalTransfer)) + .append("\n"); + sb.append(" canVanillaOptions: ").append(toIndentedString(canVanillaOptions)).append("\n"); + sb.append(" ipAddress: ").append(toIndentedString(ipAddress)).append("\n"); + sb.append(" thirdPartyName: ").append(toIndentedString(thirdPartyName)).append("\n"); + sb.append(" publicKey: ").append(toIndentedString(publicKey)).append("\n"); + sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object emailValue = getEmail(); + String emailValueAsString = ""; + emailValueAsString = emailValue.toString(); + sb.append("email=").append(urlEncode(emailValueAsString)).append(""); + Object apiNameValue = getApiName(); + String apiNameValueAsString = ""; + apiNameValueAsString = apiNameValue.toString(); + sb.append("apiName=").append(urlEncode(apiNameValueAsString)).append(""); + Object statusValue = getStatus(); + String statusValueAsString = ""; + statusValueAsString = statusValue.toString(); + sb.append("status=").append(urlEncode(statusValueAsString)).append(""); + Object canTradeValue = getCanTrade(); + String canTradeValueAsString = ""; + canTradeValueAsString = canTradeValue.toString(); + sb.append("canTrade=").append(urlEncode(canTradeValueAsString)).append(""); + Object canMarginLoanRepayValue = getCanMarginLoanRepay(); + String canMarginLoanRepayValueAsString = ""; + canMarginLoanRepayValueAsString = canMarginLoanRepayValue.toString(); + sb.append("canMarginLoanRepay=") + .append(urlEncode(canMarginLoanRepayValueAsString)) + .append(""); + Object canFuturesTradeValue = getCanFuturesTrade(); + String canFuturesTradeValueAsString = ""; + canFuturesTradeValueAsString = canFuturesTradeValue.toString(); + sb.append("canFuturesTrade=").append(urlEncode(canFuturesTradeValueAsString)).append(""); + Object canUniversalTransferValue = getCanUniversalTransfer(); + String canUniversalTransferValueAsString = ""; + canUniversalTransferValueAsString = canUniversalTransferValue.toString(); + sb.append("canUniversalTransfer=") + .append(urlEncode(canUniversalTransferValueAsString)) + .append(""); + Object canVanillaOptionsValue = getCanVanillaOptions(); + String canVanillaOptionsValueAsString = ""; + canVanillaOptionsValueAsString = canVanillaOptionsValue.toString(); + sb.append("canVanillaOptions=") + .append(urlEncode(canVanillaOptionsValueAsString)) + .append(""); + Object ipAddressValue = getIpAddress(); + String ipAddressValueAsString = ""; + ipAddressValueAsString = ipAddressValue.toString(); + sb.append("ipAddress=").append(urlEncode(ipAddressValueAsString)).append(""); + Object thirdPartyNameValue = getThirdPartyName(); + String thirdPartyNameValueAsString = ""; + thirdPartyNameValueAsString = thirdPartyNameValue.toString(); + sb.append("thirdPartyName=").append(urlEncode(thirdPartyNameValueAsString)).append(""); + Object publicKeyValue = getPublicKey(); + String publicKeyValueAsString = ""; + publicKeyValueAsString = publicKeyValue.toString(); + sb.append("publicKey=").append(urlEncode(publicKeyValueAsString)).append(""); + Object recvWindowValue = getRecvWindow(); + String recvWindowValueAsString = ""; + recvWindowValueAsString = recvWindowValue.toString(); + sb.append("recvWindow=").append(urlEncode(recvWindowValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("email"); + openapiFields.add("apiName"); + openapiFields.add("status"); + openapiFields.add("canTrade"); + openapiFields.add("canMarginLoanRepay"); + openapiFields.add("canFuturesTrade"); + openapiFields.add("canUniversalTransfer"); + openapiFields.add("canVanillaOptions"); + openapiFields.add("ipAddress"); + openapiFields.add("thirdPartyName"); + openapiFields.add("publicKey"); + openapiFields.add("recvWindow"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("email"); + openapiRequiredFields.add("apiName"); + openapiRequiredFields.add("status"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * CreateSubAccountApiKeyRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateSubAccountApiKeyRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateSubAccountApiKeyRequest is not" + + " found in the empty JSON string", + CreateSubAccountApiKeyRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateSubAccountApiKeyRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `email` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("email").toString())); + } + if (!jsonObj.get("apiName").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `apiName` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("apiName").toString())); + } + if ((jsonObj.get("ipAddress") != null && !jsonObj.get("ipAddress").isJsonNull()) + && !jsonObj.get("ipAddress").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ipAddress` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("ipAddress").toString())); + } + if ((jsonObj.get("thirdPartyName") != null && !jsonObj.get("thirdPartyName").isJsonNull()) + && !jsonObj.get("thirdPartyName").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `thirdPartyName` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("thirdPartyName").toString())); + } + if ((jsonObj.get("publicKey") != null && !jsonObj.get("publicKey").isJsonNull()) + && !jsonObj.get("publicKey").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `publicKey` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("publicKey").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateSubAccountApiKeyRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateSubAccountApiKeyRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(CreateSubAccountApiKeyRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateSubAccountApiKeyRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateSubAccountApiKeyRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateSubAccountApiKeyRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateSubAccountApiKeyRequest + * @throws IOException if the JSON string is invalid with respect to + * CreateSubAccountApiKeyRequest + */ + public static CreateSubAccountApiKeyRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateSubAccountApiKeyRequest.class); + } + + /** + * Convert an instance of CreateSubAccountApiKeyRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/CreateSubAccountApiKeyResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/CreateSubAccountApiKeyResponse.java new file mode 100644 index 000000000..b1ddd54dc --- /dev/null +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/CreateSubAccountApiKeyResponse.java @@ -0,0 +1,574 @@ +/* + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.sub_account.rest.model; + +import com.binance.connector.client.sub_account.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** CreateSubAccountApiKeyResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class CreateSubAccountApiKeyResponse { + public static final String SERIALIZED_NAME_API_NAME = "apiName"; + + @SerializedName(SERIALIZED_NAME_API_NAME) + @jakarta.annotation.Nullable + private String apiName; + + public static final String SERIALIZED_NAME_API_KEY = "apiKey"; + + @SerializedName(SERIALIZED_NAME_API_KEY) + @jakarta.annotation.Nullable + private String apiKey; + + public static final String SERIALIZED_NAME_SECRET_KEY = "secretKey"; + + @SerializedName(SERIALIZED_NAME_SECRET_KEY) + @jakarta.annotation.Nullable + private String secretKey; + + public static final String SERIALIZED_NAME_CAN_TRADE = "canTrade"; + + @SerializedName(SERIALIZED_NAME_CAN_TRADE) + @jakarta.annotation.Nullable + private Boolean canTrade; + + public static final String SERIALIZED_NAME_CAN_MARGIN_LOAN_REPAY = "canMarginLoanRepay"; + + @SerializedName(SERIALIZED_NAME_CAN_MARGIN_LOAN_REPAY) + @jakarta.annotation.Nullable + private Boolean canMarginLoanRepay; + + public static final String SERIALIZED_NAME_CAN_FUTURES_TRADE = "canFuturesTrade"; + + @SerializedName(SERIALIZED_NAME_CAN_FUTURES_TRADE) + @jakarta.annotation.Nullable + private Boolean canFuturesTrade; + + public static final String SERIALIZED_NAME_CAN_UNIVERSAL_TRANSFER = "canUniversalTransfer"; + + @SerializedName(SERIALIZED_NAME_CAN_UNIVERSAL_TRANSFER) + @jakarta.annotation.Nullable + private Boolean canUniversalTransfer; + + public static final String SERIALIZED_NAME_CAN_VANILLA_OPTIONS = "canVanillaOptions"; + + @SerializedName(SERIALIZED_NAME_CAN_VANILLA_OPTIONS) + @jakarta.annotation.Nullable + private Boolean canVanillaOptions; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @jakarta.annotation.Nullable + private Long status; + + public static final String SERIALIZED_NAME_IP_LIST = "ipList"; + + @SerializedName(SERIALIZED_NAME_IP_LIST) + @jakarta.annotation.Nullable + private List ipList; + + public CreateSubAccountApiKeyResponse() {} + + public CreateSubAccountApiKeyResponse apiName(@jakarta.annotation.Nullable String apiName) { + this.apiName = apiName; + return this; + } + + /** + * Get apiName + * + * @return apiName + */ + @jakarta.annotation.Nullable + public String getApiName() { + return apiName; + } + + public void setApiName(@jakarta.annotation.Nullable String apiName) { + this.apiName = apiName; + } + + public CreateSubAccountApiKeyResponse apiKey(@jakarta.annotation.Nullable String apiKey) { + this.apiKey = apiKey; + return this; + } + + /** + * Get apiKey + * + * @return apiKey + */ + @jakarta.annotation.Nullable + public String getApiKey() { + return apiKey; + } + + public void setApiKey(@jakarta.annotation.Nullable String apiKey) { + this.apiKey = apiKey; + } + + public CreateSubAccountApiKeyResponse secretKey(@jakarta.annotation.Nullable String secretKey) { + this.secretKey = secretKey; + return this; + } + + /** + * Secret Key. Returned only once on creation, please keep it safe. + * + * @return secretKey + */ + @jakarta.annotation.Nullable + public String getSecretKey() { + return secretKey; + } + + public void setSecretKey(@jakarta.annotation.Nullable String secretKey) { + this.secretKey = secretKey; + } + + public CreateSubAccountApiKeyResponse canTrade(@jakarta.annotation.Nullable Boolean canTrade) { + this.canTrade = canTrade; + return this; + } + + /** + * Get canTrade + * + * @return canTrade + */ + @jakarta.annotation.Nullable + public Boolean getCanTrade() { + return canTrade; + } + + public void setCanTrade(@jakarta.annotation.Nullable Boolean canTrade) { + this.canTrade = canTrade; + } + + public CreateSubAccountApiKeyResponse canMarginLoanRepay( + @jakarta.annotation.Nullable Boolean canMarginLoanRepay) { + this.canMarginLoanRepay = canMarginLoanRepay; + return this; + } + + /** + * Get canMarginLoanRepay + * + * @return canMarginLoanRepay + */ + @jakarta.annotation.Nullable + public Boolean getCanMarginLoanRepay() { + return canMarginLoanRepay; + } + + public void setCanMarginLoanRepay(@jakarta.annotation.Nullable Boolean canMarginLoanRepay) { + this.canMarginLoanRepay = canMarginLoanRepay; + } + + public CreateSubAccountApiKeyResponse canFuturesTrade( + @jakarta.annotation.Nullable Boolean canFuturesTrade) { + this.canFuturesTrade = canFuturesTrade; + return this; + } + + /** + * Get canFuturesTrade + * + * @return canFuturesTrade + */ + @jakarta.annotation.Nullable + public Boolean getCanFuturesTrade() { + return canFuturesTrade; + } + + public void setCanFuturesTrade(@jakarta.annotation.Nullable Boolean canFuturesTrade) { + this.canFuturesTrade = canFuturesTrade; + } + + public CreateSubAccountApiKeyResponse canUniversalTransfer( + @jakarta.annotation.Nullable Boolean canUniversalTransfer) { + this.canUniversalTransfer = canUniversalTransfer; + return this; + } + + /** + * Get canUniversalTransfer + * + * @return canUniversalTransfer + */ + @jakarta.annotation.Nullable + public Boolean getCanUniversalTransfer() { + return canUniversalTransfer; + } + + public void setCanUniversalTransfer(@jakarta.annotation.Nullable Boolean canUniversalTransfer) { + this.canUniversalTransfer = canUniversalTransfer; + } + + public CreateSubAccountApiKeyResponse canVanillaOptions( + @jakarta.annotation.Nullable Boolean canVanillaOptions) { + this.canVanillaOptions = canVanillaOptions; + return this; + } + + /** + * Get canVanillaOptions + * + * @return canVanillaOptions + */ + @jakarta.annotation.Nullable + public Boolean getCanVanillaOptions() { + return canVanillaOptions; + } + + public void setCanVanillaOptions(@jakarta.annotation.Nullable Boolean canVanillaOptions) { + this.canVanillaOptions = canVanillaOptions; + } + + public CreateSubAccountApiKeyResponse status(@jakarta.annotation.Nullable Long status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nullable + public Long getStatus() { + return status; + } + + public void setStatus(@jakarta.annotation.Nullable Long status) { + this.status = status; + } + + public CreateSubAccountApiKeyResponse ipList(@jakarta.annotation.Nullable List ipList) { + this.ipList = ipList; + return this; + } + + public CreateSubAccountApiKeyResponse addIpListItem(String ipListItem) { + if (this.ipList == null) { + this.ipList = new ArrayList<>(); + } + this.ipList.add(ipListItem); + return this; + } + + /** + * Get ipList + * + * @return ipList + */ + @jakarta.annotation.Nullable + public List getIpList() { + return ipList; + } + + public void setIpList(@jakarta.annotation.Nullable List ipList) { + this.ipList = ipList; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSubAccountApiKeyResponse createSubAccountApiKeyResponse = + (CreateSubAccountApiKeyResponse) o; + return Objects.equals(this.apiName, createSubAccountApiKeyResponse.apiName) + && Objects.equals(this.apiKey, createSubAccountApiKeyResponse.apiKey) + && Objects.equals(this.secretKey, createSubAccountApiKeyResponse.secretKey) + && Objects.equals(this.canTrade, createSubAccountApiKeyResponse.canTrade) + && Objects.equals( + this.canMarginLoanRepay, createSubAccountApiKeyResponse.canMarginLoanRepay) + && Objects.equals( + this.canFuturesTrade, createSubAccountApiKeyResponse.canFuturesTrade) + && Objects.equals( + this.canUniversalTransfer, + createSubAccountApiKeyResponse.canUniversalTransfer) + && Objects.equals( + this.canVanillaOptions, createSubAccountApiKeyResponse.canVanillaOptions) + && Objects.equals(this.status, createSubAccountApiKeyResponse.status) + && Objects.equals(this.ipList, createSubAccountApiKeyResponse.ipList); + } + + @Override + public int hashCode() { + return Objects.hash( + apiName, + apiKey, + secretKey, + canTrade, + canMarginLoanRepay, + canFuturesTrade, + canUniversalTransfer, + canVanillaOptions, + status, + ipList); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateSubAccountApiKeyResponse {\n"); + sb.append(" apiName: ").append(toIndentedString(apiName)).append("\n"); + sb.append(" apiKey: ").append(toIndentedString(apiKey)).append("\n"); + sb.append(" secretKey: ").append(toIndentedString(secretKey)).append("\n"); + sb.append(" canTrade: ").append(toIndentedString(canTrade)).append("\n"); + sb.append(" canMarginLoanRepay: ") + .append(toIndentedString(canMarginLoanRepay)) + .append("\n"); + sb.append(" canFuturesTrade: ").append(toIndentedString(canFuturesTrade)).append("\n"); + sb.append(" canUniversalTransfer: ") + .append(toIndentedString(canUniversalTransfer)) + .append("\n"); + sb.append(" canVanillaOptions: ").append(toIndentedString(canVanillaOptions)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" ipList: ").append(toIndentedString(ipList)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object apiNameValue = getApiName(); + String apiNameValueAsString = ""; + apiNameValueAsString = apiNameValue.toString(); + sb.append("apiName=").append(urlEncode(apiNameValueAsString)).append(""); + Object apiKeyValue = getApiKey(); + String apiKeyValueAsString = ""; + apiKeyValueAsString = apiKeyValue.toString(); + sb.append("apiKey=").append(urlEncode(apiKeyValueAsString)).append(""); + Object secretKeyValue = getSecretKey(); + String secretKeyValueAsString = ""; + secretKeyValueAsString = secretKeyValue.toString(); + sb.append("secretKey=").append(urlEncode(secretKeyValueAsString)).append(""); + Object canTradeValue = getCanTrade(); + String canTradeValueAsString = ""; + canTradeValueAsString = canTradeValue.toString(); + sb.append("canTrade=").append(urlEncode(canTradeValueAsString)).append(""); + Object canMarginLoanRepayValue = getCanMarginLoanRepay(); + String canMarginLoanRepayValueAsString = ""; + canMarginLoanRepayValueAsString = canMarginLoanRepayValue.toString(); + sb.append("canMarginLoanRepay=") + .append(urlEncode(canMarginLoanRepayValueAsString)) + .append(""); + Object canFuturesTradeValue = getCanFuturesTrade(); + String canFuturesTradeValueAsString = ""; + canFuturesTradeValueAsString = canFuturesTradeValue.toString(); + sb.append("canFuturesTrade=").append(urlEncode(canFuturesTradeValueAsString)).append(""); + Object canUniversalTransferValue = getCanUniversalTransfer(); + String canUniversalTransferValueAsString = ""; + canUniversalTransferValueAsString = canUniversalTransferValue.toString(); + sb.append("canUniversalTransfer=") + .append(urlEncode(canUniversalTransferValueAsString)) + .append(""); + Object canVanillaOptionsValue = getCanVanillaOptions(); + String canVanillaOptionsValueAsString = ""; + canVanillaOptionsValueAsString = canVanillaOptionsValue.toString(); + sb.append("canVanillaOptions=") + .append(urlEncode(canVanillaOptionsValueAsString)) + .append(""); + Object statusValue = getStatus(); + String statusValueAsString = ""; + statusValueAsString = statusValue.toString(); + sb.append("status=").append(urlEncode(statusValueAsString)).append(""); + Object ipListValue = getIpList(); + String ipListValueAsString = ""; + ipListValueAsString = + (String) + ((Collection) ipListValue) + .stream().map(Object::toString).collect(Collectors.joining(",")); + sb.append("ipList=").append(urlEncode(ipListValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("apiName"); + openapiFields.add("apiKey"); + openapiFields.add("secretKey"); + openapiFields.add("canTrade"); + openapiFields.add("canMarginLoanRepay"); + openapiFields.add("canFuturesTrade"); + openapiFields.add("canUniversalTransfer"); + openapiFields.add("canVanillaOptions"); + openapiFields.add("status"); + openapiFields.add("ipList"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * CreateSubAccountApiKeyResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateSubAccountApiKeyResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateSubAccountApiKeyResponse is not" + + " found in the empty JSON string", + CreateSubAccountApiKeyResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("apiName") != null && !jsonObj.get("apiName").isJsonNull()) + && !jsonObj.get("apiName").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `apiName` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("apiName").toString())); + } + if ((jsonObj.get("apiKey") != null && !jsonObj.get("apiKey").isJsonNull()) + && !jsonObj.get("apiKey").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `apiKey` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("apiKey").toString())); + } + if ((jsonObj.get("secretKey") != null && !jsonObj.get("secretKey").isJsonNull()) + && !jsonObj.get("secretKey").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `secretKey` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("secretKey").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("ipList") != null + && !jsonObj.get("ipList").isJsonNull() + && !jsonObj.get("ipList").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `ipList` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("ipList").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateSubAccountApiKeyResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateSubAccountApiKeyResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(CreateSubAccountApiKeyResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateSubAccountApiKeyResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateSubAccountApiKeyResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateSubAccountApiKeyResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateSubAccountApiKeyResponse + * @throws IOException if the JSON string is invalid with respect to + * CreateSubAccountApiKeyResponse + */ + public static CreateSubAccountApiKeyResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateSubAccountApiKeyResponse.class); + } + + /** + * Convert an instance of CreateSubAccountApiKeyResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/DeleteIpListForASubAccountApiKeyResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/DeleteIpListForASubAccountApiKeyResponse.java index 8ae2a796e..6765accd6 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/DeleteIpListForASubAccountApiKeyResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/DeleteIpListForASubAccountApiKeyResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** DeleteIpListForASubAccountApiKeyResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DeleteIpListForASubAccountApiKeyResponse { public static final String SERIALIZED_NAME_IP_RESTRICT = "ipRestrict"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/DepositAssetsIntoTheManagedSubAccountRequest.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/DepositAssetsIntoTheManagedSubAccountRequest.java index 0b5a95be0..24bcab5f8 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/DepositAssetsIntoTheManagedSubAccountRequest.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/DepositAssetsIntoTheManagedSubAccountRequest.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** DepositAssetsIntoTheManagedSubAccountRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DepositAssetsIntoTheManagedSubAccountRequest { public static final String SERIALIZED_NAME_TO_EMAIL = "toEmail"; @@ -134,11 +134,12 @@ public DepositAssetsIntoTheManagedSubAccountRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/DepositAssetsIntoTheManagedSubAccountResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/DepositAssetsIntoTheManagedSubAccountResponse.java index 85ad8c578..b7fb9e0e2 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/DepositAssetsIntoTheManagedSubAccountResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/DepositAssetsIntoTheManagedSubAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DepositAssetsIntoTheManagedSubAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DepositAssetsIntoTheManagedSubAccountResponse { public static final String SERIALIZED_NAME_TRAN_ID = "tranId"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/EnableFuturesForSubAccountRequest.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/EnableFuturesForSubAccountRequest.java index fbc8429e3..489abd06f 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/EnableFuturesForSubAccountRequest.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/EnableFuturesForSubAccountRequest.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** EnableFuturesForSubAccountRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class EnableFuturesForSubAccountRequest { public static final String SERIALIZED_NAME_EMAIL = "email"; @@ -77,11 +77,12 @@ public EnableFuturesForSubAccountRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/EnableFuturesForSubAccountResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/EnableFuturesForSubAccountResponse.java index fe27d6f9f..f81814270 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/EnableFuturesForSubAccountResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/EnableFuturesForSubAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** EnableFuturesForSubAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class EnableFuturesForSubAccountResponse { public static final String SERIALIZED_NAME_EMAIL = "email"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/EnableOptionsForSubAccountRequest.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/EnableOptionsForSubAccountRequest.java index 38c5a2326..cc26d7985 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/EnableOptionsForSubAccountRequest.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/EnableOptionsForSubAccountRequest.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** EnableOptionsForSubAccountRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class EnableOptionsForSubAccountRequest { public static final String SERIALIZED_NAME_EMAIL = "email"; @@ -77,11 +77,12 @@ public EnableOptionsForSubAccountRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/EnableOptionsForSubAccountResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/EnableOptionsForSubAccountResponse.java index 8b10bbb95..3a1d6a58b 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/EnableOptionsForSubAccountResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/EnableOptionsForSubAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** EnableOptionsForSubAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class EnableOptionsForSubAccountResponse { public static final String SERIALIZED_NAME_EMAIL = "email"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/FromAccountType.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/FromAccountType.java new file mode 100644 index 000000000..c93ec2070 --- /dev/null +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/FromAccountType.java @@ -0,0 +1,79 @@ +/* + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.sub_account.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets fromAccountType */ +@JsonAdapter(FromAccountType.Adapter.class) +public enum FromAccountType { + SPOT("SPOT"), + + USDT_FUTURE("USDT_FUTURE"), + + COIN_FUTURE("COIN_FUTURE"), + + MARGIN("MARGIN"), + + ISOLATED_MARGIN("ISOLATED_MARGIN"); + + private String value; + + FromAccountType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FromAccountType fromValue(String value) { + for (FromAccountType b : FromAccountType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FromAccountType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FromAccountType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FromAccountType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FromAccountType.fromValue(value); + } +} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/FuturesTransferForSubAccountRequest.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/FuturesTransferForSubAccountRequest.java index a64cdec68..a48cb1000 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/FuturesTransferForSubAccountRequest.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/FuturesTransferForSubAccountRequest.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** FuturesTransferForSubAccountRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesTransferForSubAccountRequest { public static final String SERIALIZED_NAME_EMAIL = "email"; @@ -95,7 +95,7 @@ public FuturesTransferForSubAccountRequest asset(@jakarta.annotation.Nonnull Str } /** - * Get asset + * The asset being transferred * * @return asset */ @@ -115,7 +115,7 @@ public FuturesTransferForSubAccountRequest amount(@jakarta.annotation.Nonnull Do } /** - * Get amount + * The amount to be transferred * * @return amount */ @@ -136,7 +136,10 @@ public FuturesTransferForSubAccountRequest type(@jakarta.annotation.Nonnull Long } /** - * Get type + * 1: transfer from subaccount's spot account to its USDT-margined futures account 2: + * transfer from subaccount's USDT-margined futures account to its spot account 3: transfer + * from subaccount's spot account to its COIN-margined futures account 4:transfer from + * subaccount's COIN-margined futures account to its spot account * * @return type */ @@ -157,11 +160,12 @@ public FuturesTransferForSubAccountRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/FuturesTransferForSubAccountResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/FuturesTransferForSubAccountResponse.java index 92cf1e53c..9e8fbfa79 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/FuturesTransferForSubAccountResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/FuturesTransferForSubAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FuturesTransferForSubAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FuturesTransferForSubAccountResponse { public static final String SERIALIZED_NAME_TXN_ID = "txnId"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountResponse.java index a4bb28110..3d4d4344a 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetDetailOnSubAccountsFuturesAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDetailOnSubAccountsFuturesAccountResponse { public static final String SERIALIZED_NAME_EMAIL = "email"; @@ -58,8 +58,7 @@ public class GetDetailOnSubAccountsFuturesAccountResponse { @SerializedName(SERIALIZED_NAME_ASSETS) @jakarta.annotation.Nullable - private List<@Valid GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner> - assets; + private List<@Valid GetDetailOnSubAccountsFuturesAccountResponseAssetsInner> assets; public static final String SERIALIZED_NAME_CAN_DEPOSIT = "canDeposit"; @@ -185,16 +184,13 @@ public void setAsset(@jakarta.annotation.Nullable String asset) { public GetDetailOnSubAccountsFuturesAccountResponse assets( @jakarta.annotation.Nullable - List< - @Valid - GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner> - assets) { + List<@Valid GetDetailOnSubAccountsFuturesAccountResponseAssetsInner> assets) { this.assets = assets; return this; } public GetDetailOnSubAccountsFuturesAccountResponse addAssetsItem( - GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner assetsItem) { + GetDetailOnSubAccountsFuturesAccountResponseAssetsInner assetsItem) { if (this.assets == null) { this.assets = new ArrayList<>(); } @@ -209,17 +205,13 @@ public GetDetailOnSubAccountsFuturesAccountResponse addAssetsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner> - getAssets() { + public List<@Valid GetDetailOnSubAccountsFuturesAccountResponseAssetsInner> getAssets() { return assets; } public void setAssets( @jakarta.annotation.Nullable - List< - @Valid - GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner> - assets) { + List<@Valid GetDetailOnSubAccountsFuturesAccountResponseAssetsInner> assets) { this.assets = assets; } @@ -781,8 +773,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `assets` (array) for (int i = 0; i < jsonArrayassets.size(); i++) { - GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - .validateJsonElement(jsonArrayassets.get(i)); + GetDetailOnSubAccountsFuturesAccountResponseAssetsInner.validateJsonElement( + jsonArrayassets.get(i)); } ; } diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountResponseAssetsInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountResponseAssetsInner.java new file mode 100644 index 000000000..e562e51d0 --- /dev/null +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountResponseAssetsInner.java @@ -0,0 +1,607 @@ +/* + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.sub_account.rest.model; + +import com.binance.connector.client.sub_account.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** GetDetailOnSubAccountsFuturesAccountResponseAssetsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class GetDetailOnSubAccountsFuturesAccountResponseAssetsInner { + public static final String SERIALIZED_NAME_ASSET = "asset"; + + @SerializedName(SERIALIZED_NAME_ASSET) + @jakarta.annotation.Nullable + private String asset; + + public static final String SERIALIZED_NAME_INITIAL_MARGIN = "initialMargin"; + + @SerializedName(SERIALIZED_NAME_INITIAL_MARGIN) + @jakarta.annotation.Nullable + private String initialMargin; + + public static final String SERIALIZED_NAME_MAINTENANCE_MARGIN = "maintenanceMargin"; + + @SerializedName(SERIALIZED_NAME_MAINTENANCE_MARGIN) + @jakarta.annotation.Nullable + private String maintenanceMargin; + + public static final String SERIALIZED_NAME_MARGIN_BALANCE = "marginBalance"; + + @SerializedName(SERIALIZED_NAME_MARGIN_BALANCE) + @jakarta.annotation.Nullable + private String marginBalance; + + public static final String SERIALIZED_NAME_MAX_WITHDRAW_AMOUNT = "maxWithdrawAmount"; + + @SerializedName(SERIALIZED_NAME_MAX_WITHDRAW_AMOUNT) + @jakarta.annotation.Nullable + private String maxWithdrawAmount; + + public static final String SERIALIZED_NAME_OPEN_ORDER_INITIAL_MARGIN = "openOrderInitialMargin"; + + @SerializedName(SERIALIZED_NAME_OPEN_ORDER_INITIAL_MARGIN) + @jakarta.annotation.Nullable + private String openOrderInitialMargin; + + public static final String SERIALIZED_NAME_POSITION_INITIAL_MARGIN = "positionInitialMargin"; + + @SerializedName(SERIALIZED_NAME_POSITION_INITIAL_MARGIN) + @jakarta.annotation.Nullable + private String positionInitialMargin; + + public static final String SERIALIZED_NAME_UNREALIZED_PROFIT = "unrealizedProfit"; + + @SerializedName(SERIALIZED_NAME_UNREALIZED_PROFIT) + @jakarta.annotation.Nullable + private String unrealizedProfit; + + public static final String SERIALIZED_NAME_WALLET_BALANCE = "walletBalance"; + + @SerializedName(SERIALIZED_NAME_WALLET_BALANCE) + @jakarta.annotation.Nullable + private String walletBalance; + + public GetDetailOnSubAccountsFuturesAccountResponseAssetsInner() {} + + public GetDetailOnSubAccountsFuturesAccountResponseAssetsInner asset( + @jakarta.annotation.Nullable String asset) { + this.asset = asset; + return this; + } + + /** + * Get asset + * + * @return asset + */ + @jakarta.annotation.Nullable + public String getAsset() { + return asset; + } + + public void setAsset(@jakarta.annotation.Nullable String asset) { + this.asset = asset; + } + + public GetDetailOnSubAccountsFuturesAccountResponseAssetsInner initialMargin( + @jakarta.annotation.Nullable String initialMargin) { + this.initialMargin = initialMargin; + return this; + } + + /** + * Get initialMargin + * + * @return initialMargin + */ + @jakarta.annotation.Nullable + public String getInitialMargin() { + return initialMargin; + } + + public void setInitialMargin(@jakarta.annotation.Nullable String initialMargin) { + this.initialMargin = initialMargin; + } + + public GetDetailOnSubAccountsFuturesAccountResponseAssetsInner maintenanceMargin( + @jakarta.annotation.Nullable String maintenanceMargin) { + this.maintenanceMargin = maintenanceMargin; + return this; + } + + /** + * Get maintenanceMargin + * + * @return maintenanceMargin + */ + @jakarta.annotation.Nullable + public String getMaintenanceMargin() { + return maintenanceMargin; + } + + public void setMaintenanceMargin(@jakarta.annotation.Nullable String maintenanceMargin) { + this.maintenanceMargin = maintenanceMargin; + } + + public GetDetailOnSubAccountsFuturesAccountResponseAssetsInner marginBalance( + @jakarta.annotation.Nullable String marginBalance) { + this.marginBalance = marginBalance; + return this; + } + + /** + * Get marginBalance + * + * @return marginBalance + */ + @jakarta.annotation.Nullable + public String getMarginBalance() { + return marginBalance; + } + + public void setMarginBalance(@jakarta.annotation.Nullable String marginBalance) { + this.marginBalance = marginBalance; + } + + public GetDetailOnSubAccountsFuturesAccountResponseAssetsInner maxWithdrawAmount( + @jakarta.annotation.Nullable String maxWithdrawAmount) { + this.maxWithdrawAmount = maxWithdrawAmount; + return this; + } + + /** + * Get maxWithdrawAmount + * + * @return maxWithdrawAmount + */ + @jakarta.annotation.Nullable + public String getMaxWithdrawAmount() { + return maxWithdrawAmount; + } + + public void setMaxWithdrawAmount(@jakarta.annotation.Nullable String maxWithdrawAmount) { + this.maxWithdrawAmount = maxWithdrawAmount; + } + + public GetDetailOnSubAccountsFuturesAccountResponseAssetsInner openOrderInitialMargin( + @jakarta.annotation.Nullable String openOrderInitialMargin) { + this.openOrderInitialMargin = openOrderInitialMargin; + return this; + } + + /** + * Get openOrderInitialMargin + * + * @return openOrderInitialMargin + */ + @jakarta.annotation.Nullable + public String getOpenOrderInitialMargin() { + return openOrderInitialMargin; + } + + public void setOpenOrderInitialMargin( + @jakarta.annotation.Nullable String openOrderInitialMargin) { + this.openOrderInitialMargin = openOrderInitialMargin; + } + + public GetDetailOnSubAccountsFuturesAccountResponseAssetsInner positionInitialMargin( + @jakarta.annotation.Nullable String positionInitialMargin) { + this.positionInitialMargin = positionInitialMargin; + return this; + } + + /** + * Get positionInitialMargin + * + * @return positionInitialMargin + */ + @jakarta.annotation.Nullable + public String getPositionInitialMargin() { + return positionInitialMargin; + } + + public void setPositionInitialMargin( + @jakarta.annotation.Nullable String positionInitialMargin) { + this.positionInitialMargin = positionInitialMargin; + } + + public GetDetailOnSubAccountsFuturesAccountResponseAssetsInner unrealizedProfit( + @jakarta.annotation.Nullable String unrealizedProfit) { + this.unrealizedProfit = unrealizedProfit; + return this; + } + + /** + * Get unrealizedProfit + * + * @return unrealizedProfit + */ + @jakarta.annotation.Nullable + public String getUnrealizedProfit() { + return unrealizedProfit; + } + + public void setUnrealizedProfit(@jakarta.annotation.Nullable String unrealizedProfit) { + this.unrealizedProfit = unrealizedProfit; + } + + public GetDetailOnSubAccountsFuturesAccountResponseAssetsInner walletBalance( + @jakarta.annotation.Nullable String walletBalance) { + this.walletBalance = walletBalance; + return this; + } + + /** + * Get walletBalance + * + * @return walletBalance + */ + @jakarta.annotation.Nullable + public String getWalletBalance() { + return walletBalance; + } + + public void setWalletBalance(@jakarta.annotation.Nullable String walletBalance) { + this.walletBalance = walletBalance; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDetailOnSubAccountsFuturesAccountResponseAssetsInner + getDetailOnSubAccountsFuturesAccountResponseAssetsInner = + (GetDetailOnSubAccountsFuturesAccountResponseAssetsInner) o; + return Objects.equals( + this.asset, getDetailOnSubAccountsFuturesAccountResponseAssetsInner.asset) + && Objects.equals( + this.initialMargin, + getDetailOnSubAccountsFuturesAccountResponseAssetsInner.initialMargin) + && Objects.equals( + this.maintenanceMargin, + getDetailOnSubAccountsFuturesAccountResponseAssetsInner.maintenanceMargin) + && Objects.equals( + this.marginBalance, + getDetailOnSubAccountsFuturesAccountResponseAssetsInner.marginBalance) + && Objects.equals( + this.maxWithdrawAmount, + getDetailOnSubAccountsFuturesAccountResponseAssetsInner.maxWithdrawAmount) + && Objects.equals( + this.openOrderInitialMargin, + getDetailOnSubAccountsFuturesAccountResponseAssetsInner + .openOrderInitialMargin) + && Objects.equals( + this.positionInitialMargin, + getDetailOnSubAccountsFuturesAccountResponseAssetsInner + .positionInitialMargin) + && Objects.equals( + this.unrealizedProfit, + getDetailOnSubAccountsFuturesAccountResponseAssetsInner.unrealizedProfit) + && Objects.equals( + this.walletBalance, + getDetailOnSubAccountsFuturesAccountResponseAssetsInner.walletBalance); + } + + @Override + public int hashCode() { + return Objects.hash( + asset, + initialMargin, + maintenanceMargin, + marginBalance, + maxWithdrawAmount, + openOrderInitialMargin, + positionInitialMargin, + unrealizedProfit, + walletBalance); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetDetailOnSubAccountsFuturesAccountResponseAssetsInner {\n"); + sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append(" initialMargin: ").append(toIndentedString(initialMargin)).append("\n"); + sb.append(" maintenanceMargin: ").append(toIndentedString(maintenanceMargin)).append("\n"); + sb.append(" marginBalance: ").append(toIndentedString(marginBalance)).append("\n"); + sb.append(" maxWithdrawAmount: ").append(toIndentedString(maxWithdrawAmount)).append("\n"); + sb.append(" openOrderInitialMargin: ") + .append(toIndentedString(openOrderInitialMargin)) + .append("\n"); + sb.append(" positionInitialMargin: ") + .append(toIndentedString(positionInitialMargin)) + .append("\n"); + sb.append(" unrealizedProfit: ").append(toIndentedString(unrealizedProfit)).append("\n"); + sb.append(" walletBalance: ").append(toIndentedString(walletBalance)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object assetValue = getAsset(); + String assetValueAsString = ""; + assetValueAsString = assetValue.toString(); + sb.append("asset=").append(urlEncode(assetValueAsString)).append(""); + Object initialMarginValue = getInitialMargin(); + String initialMarginValueAsString = ""; + initialMarginValueAsString = initialMarginValue.toString(); + sb.append("initialMargin=").append(urlEncode(initialMarginValueAsString)).append(""); + Object maintenanceMarginValue = getMaintenanceMargin(); + String maintenanceMarginValueAsString = ""; + maintenanceMarginValueAsString = maintenanceMarginValue.toString(); + sb.append("maintenanceMargin=") + .append(urlEncode(maintenanceMarginValueAsString)) + .append(""); + Object marginBalanceValue = getMarginBalance(); + String marginBalanceValueAsString = ""; + marginBalanceValueAsString = marginBalanceValue.toString(); + sb.append("marginBalance=").append(urlEncode(marginBalanceValueAsString)).append(""); + Object maxWithdrawAmountValue = getMaxWithdrawAmount(); + String maxWithdrawAmountValueAsString = ""; + maxWithdrawAmountValueAsString = maxWithdrawAmountValue.toString(); + sb.append("maxWithdrawAmount=") + .append(urlEncode(maxWithdrawAmountValueAsString)) + .append(""); + Object openOrderInitialMarginValue = getOpenOrderInitialMargin(); + String openOrderInitialMarginValueAsString = ""; + openOrderInitialMarginValueAsString = openOrderInitialMarginValue.toString(); + sb.append("openOrderInitialMargin=") + .append(urlEncode(openOrderInitialMarginValueAsString)) + .append(""); + Object positionInitialMarginValue = getPositionInitialMargin(); + String positionInitialMarginValueAsString = ""; + positionInitialMarginValueAsString = positionInitialMarginValue.toString(); + sb.append("positionInitialMargin=") + .append(urlEncode(positionInitialMarginValueAsString)) + .append(""); + Object unrealizedProfitValue = getUnrealizedProfit(); + String unrealizedProfitValueAsString = ""; + unrealizedProfitValueAsString = unrealizedProfitValue.toString(); + sb.append("unrealizedProfit=").append(urlEncode(unrealizedProfitValueAsString)).append(""); + Object walletBalanceValue = getWalletBalance(); + String walletBalanceValueAsString = ""; + walletBalanceValueAsString = walletBalanceValue.toString(); + sb.append("walletBalance=").append(urlEncode(walletBalanceValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("asset"); + openapiFields.add("initialMargin"); + openapiFields.add("maintenanceMargin"); + openapiFields.add("marginBalance"); + openapiFields.add("maxWithdrawAmount"); + openapiFields.add("openOrderInitialMargin"); + openapiFields.add("positionInitialMargin"); + openapiFields.add("unrealizedProfit"); + openapiFields.add("walletBalance"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * GetDetailOnSubAccountsFuturesAccountResponseAssetsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetDetailOnSubAccountsFuturesAccountResponseAssetsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " GetDetailOnSubAccountsFuturesAccountResponseAssetsInner is" + + " not found in the empty JSON string", + GetDetailOnSubAccountsFuturesAccountResponseAssetsInner + .openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) + && !jsonObj.get("asset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `asset` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("asset").toString())); + } + if ((jsonObj.get("initialMargin") != null && !jsonObj.get("initialMargin").isJsonNull()) + && !jsonObj.get("initialMargin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `initialMargin` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("initialMargin").toString())); + } + if ((jsonObj.get("maintenanceMargin") != null + && !jsonObj.get("maintenanceMargin").isJsonNull()) + && !jsonObj.get("maintenanceMargin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `maintenanceMargin` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("maintenanceMargin").toString())); + } + if ((jsonObj.get("marginBalance") != null && !jsonObj.get("marginBalance").isJsonNull()) + && !jsonObj.get("marginBalance").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `marginBalance` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("marginBalance").toString())); + } + if ((jsonObj.get("maxWithdrawAmount") != null + && !jsonObj.get("maxWithdrawAmount").isJsonNull()) + && !jsonObj.get("maxWithdrawAmount").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `maxWithdrawAmount` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("maxWithdrawAmount").toString())); + } + if ((jsonObj.get("openOrderInitialMargin") != null + && !jsonObj.get("openOrderInitialMargin").isJsonNull()) + && !jsonObj.get("openOrderInitialMargin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `openOrderInitialMargin` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("openOrderInitialMargin").toString())); + } + if ((jsonObj.get("positionInitialMargin") != null + && !jsonObj.get("positionInitialMargin").isJsonNull()) + && !jsonObj.get("positionInitialMargin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `positionInitialMargin` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("positionInitialMargin").toString())); + } + if ((jsonObj.get("unrealizedProfit") != null + && !jsonObj.get("unrealizedProfit").isJsonNull()) + && !jsonObj.get("unrealizedProfit").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `unrealizedProfit` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("unrealizedProfit").toString())); + } + if ((jsonObj.get("walletBalance") != null && !jsonObj.get("walletBalance").isJsonNull()) + && !jsonObj.get("walletBalance").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `walletBalance` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("walletBalance").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetDetailOnSubAccountsFuturesAccountResponseAssetsInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'GetDetailOnSubAccountsFuturesAccountResponseAssetsInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get( + GetDetailOnSubAccountsFuturesAccountResponseAssetsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, + GetDetailOnSubAccountsFuturesAccountResponseAssetsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetDetailOnSubAccountsFuturesAccountResponseAssetsInner read( + JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetDetailOnSubAccountsFuturesAccountResponseAssetsInner given an JSON + * string + * + * @param jsonString JSON string + * @return An instance of GetDetailOnSubAccountsFuturesAccountResponseAssetsInner + * @throws IOException if the JSON string is invalid with respect to + * GetDetailOnSubAccountsFuturesAccountResponseAssetsInner + */ + public static GetDetailOnSubAccountsFuturesAccountResponseAssetsInner fromJson( + String jsonString) throws IOException { + return JSON.getGson() + .fromJson( + jsonString, GetDetailOnSubAccountsFuturesAccountResponseAssetsInner.class); + } + + /** + * Convert an instance of GetDetailOnSubAccountsFuturesAccountResponseAssetsInner to an JSON + * string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2Response.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2Response.java index 8205c52c8..31211b743 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2Response.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2Response.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetDetailOnSubAccountsFuturesAccountV2Response */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDetailOnSubAccountsFuturesAccountV2Response { public static final String SERIALIZED_NAME_FUTURE_ACCOUNT_RESP = "futureAccountResp"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountResp.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountResp.java index 8b9215d1a..0d7e4b00e 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountResp.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountResp.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountResp */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountResp { public static final String SERIALIZED_NAME_EMAIL = "email"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountRespAssetsInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountRespAssetsInner.java index fd1feba2c..740558da6 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountRespAssetsInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountRespAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountRespAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountRespAssetsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp.java index 32a723942..445937cc4 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp { public static final String SERIALIZED_NAME_EMAIL = "email"; @@ -52,8 +52,7 @@ public class GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp { @SerializedName(SERIALIZED_NAME_ASSETS) @jakarta.annotation.Nullable - private List<@Valid GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner> - assets; + private List<@Valid GetDetailOnSubAccountsFuturesAccountResponseAssetsInner> assets; public static final String SERIALIZED_NAME_CAN_DEPOSIT = "canDeposit"; @@ -159,16 +158,13 @@ public void setEmail(@jakarta.annotation.Nullable String email) { public GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp assets( @jakarta.annotation.Nullable - List< - @Valid - GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner> - assets) { + List<@Valid GetDetailOnSubAccountsFuturesAccountResponseAssetsInner> assets) { this.assets = assets; return this; } public GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp addAssetsItem( - GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner assetsItem) { + GetDetailOnSubAccountsFuturesAccountResponseAssetsInner assetsItem) { if (this.assets == null) { this.assets = new ArrayList<>(); } @@ -183,17 +179,13 @@ public GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp addAssets */ @jakarta.annotation.Nullable @Valid - public List<@Valid GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner> - getAssets() { + public List<@Valid GetDetailOnSubAccountsFuturesAccountResponseAssetsInner> getAssets() { return assets; } public void setAssets( @jakarta.annotation.Nullable - List< - @Valid - GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner> - assets) { + List<@Valid GetDetailOnSubAccountsFuturesAccountResponseAssetsInner> assets) { this.assets = assets; } @@ -761,8 +753,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `assets` (array) for (int i = 0; i < jsonArrayassets.size(); i++) { - GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - .validateJsonElement(jsonArrayassets.get(i)); + GetDetailOnSubAccountsFuturesAccountResponseAssetsInner.validateJsonElement( + jsonArrayassets.get(i)); } ; } diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner.java deleted file mode 100644 index 48e1241ea..000000000 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner.java +++ /dev/null @@ -1,629 +0,0 @@ -/* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.sub_account.rest.model; - -import com.binance.connector.client.sub_account.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner { - public static final String SERIALIZED_NAME_ASSET = "asset"; - - @SerializedName(SERIALIZED_NAME_ASSET) - @jakarta.annotation.Nullable - private String asset; - - public static final String SERIALIZED_NAME_INITIAL_MARGIN = "initialMargin"; - - @SerializedName(SERIALIZED_NAME_INITIAL_MARGIN) - @jakarta.annotation.Nullable - private String initialMargin; - - public static final String SERIALIZED_NAME_MAINTENANCE_MARGIN = "maintenanceMargin"; - - @SerializedName(SERIALIZED_NAME_MAINTENANCE_MARGIN) - @jakarta.annotation.Nullable - private String maintenanceMargin; - - public static final String SERIALIZED_NAME_MARGIN_BALANCE = "marginBalance"; - - @SerializedName(SERIALIZED_NAME_MARGIN_BALANCE) - @jakarta.annotation.Nullable - private String marginBalance; - - public static final String SERIALIZED_NAME_MAX_WITHDRAW_AMOUNT = "maxWithdrawAmount"; - - @SerializedName(SERIALIZED_NAME_MAX_WITHDRAW_AMOUNT) - @jakarta.annotation.Nullable - private String maxWithdrawAmount; - - public static final String SERIALIZED_NAME_OPEN_ORDER_INITIAL_MARGIN = "openOrderInitialMargin"; - - @SerializedName(SERIALIZED_NAME_OPEN_ORDER_INITIAL_MARGIN) - @jakarta.annotation.Nullable - private String openOrderInitialMargin; - - public static final String SERIALIZED_NAME_POSITION_INITIAL_MARGIN = "positionInitialMargin"; - - @SerializedName(SERIALIZED_NAME_POSITION_INITIAL_MARGIN) - @jakarta.annotation.Nullable - private String positionInitialMargin; - - public static final String SERIALIZED_NAME_UNREALIZED_PROFIT = "unrealizedProfit"; - - @SerializedName(SERIALIZED_NAME_UNREALIZED_PROFIT) - @jakarta.annotation.Nullable - private String unrealizedProfit; - - public static final String SERIALIZED_NAME_WALLET_BALANCE = "walletBalance"; - - @SerializedName(SERIALIZED_NAME_WALLET_BALANCE) - @jakarta.annotation.Nullable - private String walletBalance; - - public GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner() {} - - public GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner asset( - @jakarta.annotation.Nullable String asset) { - this.asset = asset; - return this; - } - - /** - * Get asset - * - * @return asset - */ - @jakarta.annotation.Nullable - public String getAsset() { - return asset; - } - - public void setAsset(@jakarta.annotation.Nullable String asset) { - this.asset = asset; - } - - public GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner initialMargin( - @jakarta.annotation.Nullable String initialMargin) { - this.initialMargin = initialMargin; - return this; - } - - /** - * Get initialMargin - * - * @return initialMargin - */ - @jakarta.annotation.Nullable - public String getInitialMargin() { - return initialMargin; - } - - public void setInitialMargin(@jakarta.annotation.Nullable String initialMargin) { - this.initialMargin = initialMargin; - } - - public GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - maintenanceMargin(@jakarta.annotation.Nullable String maintenanceMargin) { - this.maintenanceMargin = maintenanceMargin; - return this; - } - - /** - * Get maintenanceMargin - * - * @return maintenanceMargin - */ - @jakarta.annotation.Nullable - public String getMaintenanceMargin() { - return maintenanceMargin; - } - - public void setMaintenanceMargin(@jakarta.annotation.Nullable String maintenanceMargin) { - this.maintenanceMargin = maintenanceMargin; - } - - public GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner marginBalance( - @jakarta.annotation.Nullable String marginBalance) { - this.marginBalance = marginBalance; - return this; - } - - /** - * Get marginBalance - * - * @return marginBalance - */ - @jakarta.annotation.Nullable - public String getMarginBalance() { - return marginBalance; - } - - public void setMarginBalance(@jakarta.annotation.Nullable String marginBalance) { - this.marginBalance = marginBalance; - } - - public GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - maxWithdrawAmount(@jakarta.annotation.Nullable String maxWithdrawAmount) { - this.maxWithdrawAmount = maxWithdrawAmount; - return this; - } - - /** - * Get maxWithdrawAmount - * - * @return maxWithdrawAmount - */ - @jakarta.annotation.Nullable - public String getMaxWithdrawAmount() { - return maxWithdrawAmount; - } - - public void setMaxWithdrawAmount(@jakarta.annotation.Nullable String maxWithdrawAmount) { - this.maxWithdrawAmount = maxWithdrawAmount; - } - - public GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - openOrderInitialMargin(@jakarta.annotation.Nullable String openOrderInitialMargin) { - this.openOrderInitialMargin = openOrderInitialMargin; - return this; - } - - /** - * Get openOrderInitialMargin - * - * @return openOrderInitialMargin - */ - @jakarta.annotation.Nullable - public String getOpenOrderInitialMargin() { - return openOrderInitialMargin; - } - - public void setOpenOrderInitialMargin( - @jakarta.annotation.Nullable String openOrderInitialMargin) { - this.openOrderInitialMargin = openOrderInitialMargin; - } - - public GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - positionInitialMargin(@jakarta.annotation.Nullable String positionInitialMargin) { - this.positionInitialMargin = positionInitialMargin; - return this; - } - - /** - * Get positionInitialMargin - * - * @return positionInitialMargin - */ - @jakarta.annotation.Nullable - public String getPositionInitialMargin() { - return positionInitialMargin; - } - - public void setPositionInitialMargin( - @jakarta.annotation.Nullable String positionInitialMargin) { - this.positionInitialMargin = positionInitialMargin; - } - - public GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - unrealizedProfit(@jakarta.annotation.Nullable String unrealizedProfit) { - this.unrealizedProfit = unrealizedProfit; - return this; - } - - /** - * Get unrealizedProfit - * - * @return unrealizedProfit - */ - @jakarta.annotation.Nullable - public String getUnrealizedProfit() { - return unrealizedProfit; - } - - public void setUnrealizedProfit(@jakarta.annotation.Nullable String unrealizedProfit) { - this.unrealizedProfit = unrealizedProfit; - } - - public GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner walletBalance( - @jakarta.annotation.Nullable String walletBalance) { - this.walletBalance = walletBalance; - return this; - } - - /** - * Get walletBalance - * - * @return walletBalance - */ - @jakarta.annotation.Nullable - public String getWalletBalance() { - return walletBalance; - } - - public void setWalletBalance(@jakarta.annotation.Nullable String walletBalance) { - this.walletBalance = walletBalance; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - getDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner = - (GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner) - o; - return Objects.equals( - this.asset, - getDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - .asset) - && Objects.equals( - this.initialMargin, - getDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - .initialMargin) - && Objects.equals( - this.maintenanceMargin, - getDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - .maintenanceMargin) - && Objects.equals( - this.marginBalance, - getDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - .marginBalance) - && Objects.equals( - this.maxWithdrawAmount, - getDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - .maxWithdrawAmount) - && Objects.equals( - this.openOrderInitialMargin, - getDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - .openOrderInitialMargin) - && Objects.equals( - this.positionInitialMargin, - getDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - .positionInitialMargin) - && Objects.equals( - this.unrealizedProfit, - getDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - .unrealizedProfit) - && Objects.equals( - this.walletBalance, - getDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - .walletBalance); - } - - @Override - public int hashCode() { - return Objects.hash( - asset, - initialMargin, - maintenanceMargin, - marginBalance, - maxWithdrawAmount, - openOrderInitialMargin, - positionInitialMargin, - unrealizedProfit, - walletBalance); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append( - "class GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner" - + " {\n"); - sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); - sb.append(" initialMargin: ").append(toIndentedString(initialMargin)).append("\n"); - sb.append(" maintenanceMargin: ").append(toIndentedString(maintenanceMargin)).append("\n"); - sb.append(" marginBalance: ").append(toIndentedString(marginBalance)).append("\n"); - sb.append(" maxWithdrawAmount: ").append(toIndentedString(maxWithdrawAmount)).append("\n"); - sb.append(" openOrderInitialMargin: ") - .append(toIndentedString(openOrderInitialMargin)) - .append("\n"); - sb.append(" positionInitialMargin: ") - .append(toIndentedString(positionInitialMargin)) - .append("\n"); - sb.append(" unrealizedProfit: ").append(toIndentedString(unrealizedProfit)).append("\n"); - sb.append(" walletBalance: ").append(toIndentedString(walletBalance)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object assetValue = getAsset(); - String assetValueAsString = ""; - assetValueAsString = assetValue.toString(); - sb.append("asset=").append(urlEncode(assetValueAsString)).append(""); - Object initialMarginValue = getInitialMargin(); - String initialMarginValueAsString = ""; - initialMarginValueAsString = initialMarginValue.toString(); - sb.append("initialMargin=").append(urlEncode(initialMarginValueAsString)).append(""); - Object maintenanceMarginValue = getMaintenanceMargin(); - String maintenanceMarginValueAsString = ""; - maintenanceMarginValueAsString = maintenanceMarginValue.toString(); - sb.append("maintenanceMargin=") - .append(urlEncode(maintenanceMarginValueAsString)) - .append(""); - Object marginBalanceValue = getMarginBalance(); - String marginBalanceValueAsString = ""; - marginBalanceValueAsString = marginBalanceValue.toString(); - sb.append("marginBalance=").append(urlEncode(marginBalanceValueAsString)).append(""); - Object maxWithdrawAmountValue = getMaxWithdrawAmount(); - String maxWithdrawAmountValueAsString = ""; - maxWithdrawAmountValueAsString = maxWithdrawAmountValue.toString(); - sb.append("maxWithdrawAmount=") - .append(urlEncode(maxWithdrawAmountValueAsString)) - .append(""); - Object openOrderInitialMarginValue = getOpenOrderInitialMargin(); - String openOrderInitialMarginValueAsString = ""; - openOrderInitialMarginValueAsString = openOrderInitialMarginValue.toString(); - sb.append("openOrderInitialMargin=") - .append(urlEncode(openOrderInitialMarginValueAsString)) - .append(""); - Object positionInitialMarginValue = getPositionInitialMargin(); - String positionInitialMarginValueAsString = ""; - positionInitialMarginValueAsString = positionInitialMarginValue.toString(); - sb.append("positionInitialMargin=") - .append(urlEncode(positionInitialMarginValueAsString)) - .append(""); - Object unrealizedProfitValue = getUnrealizedProfit(); - String unrealizedProfitValueAsString = ""; - unrealizedProfitValueAsString = unrealizedProfitValue.toString(); - sb.append("unrealizedProfit=").append(urlEncode(unrealizedProfitValueAsString)).append(""); - Object walletBalanceValue = getWalletBalance(); - String walletBalanceValueAsString = ""; - walletBalanceValueAsString = walletBalanceValue.toString(); - sb.append("walletBalance=").append(urlEncode(walletBalanceValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("asset"); - openapiFields.add("initialMargin"); - openapiFields.add("maintenanceMargin"); - openapiFields.add("marginBalance"); - openapiFields.add("maxWithdrawAmount"); - openapiFields.add("openOrderInitialMargin"); - openapiFields.add("positionInitialMargin"); - openapiFields.add("unrealizedProfit"); - openapiFields.add("walletBalance"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - .openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner" - + " is not found in the empty JSON string", - GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - .openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) - && !jsonObj.get("asset").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `asset` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("asset").toString())); - } - if ((jsonObj.get("initialMargin") != null && !jsonObj.get("initialMargin").isJsonNull()) - && !jsonObj.get("initialMargin").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `initialMargin` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("initialMargin").toString())); - } - if ((jsonObj.get("maintenanceMargin") != null - && !jsonObj.get("maintenanceMargin").isJsonNull()) - && !jsonObj.get("maintenanceMargin").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `maintenanceMargin` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("maintenanceMargin").toString())); - } - if ((jsonObj.get("marginBalance") != null && !jsonObj.get("marginBalance").isJsonNull()) - && !jsonObj.get("marginBalance").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `marginBalance` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("marginBalance").toString())); - } - if ((jsonObj.get("maxWithdrawAmount") != null - && !jsonObj.get("maxWithdrawAmount").isJsonNull()) - && !jsonObj.get("maxWithdrawAmount").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `maxWithdrawAmount` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("maxWithdrawAmount").toString())); - } - if ((jsonObj.get("openOrderInitialMargin") != null - && !jsonObj.get("openOrderInitialMargin").isJsonNull()) - && !jsonObj.get("openOrderInitialMargin").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `openOrderInitialMargin` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("openOrderInitialMargin").toString())); - } - if ((jsonObj.get("positionInitialMargin") != null - && !jsonObj.get("positionInitialMargin").isJsonNull()) - && !jsonObj.get("positionInitialMargin").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `positionInitialMargin` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("positionInitialMargin").toString())); - } - if ((jsonObj.get("unrealizedProfit") != null - && !jsonObj.get("unrealizedProfit").isJsonNull()) - && !jsonObj.get("unrealizedProfit").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `unrealizedProfit` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("unrealizedProfit").toString())); - } - if ((jsonObj.get("walletBalance") != null && !jsonObj.get("walletBalance").isJsonNull()) - && !jsonObj.get("walletBalance").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `walletBalance` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("walletBalance").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner.class - .isAssignableFrom(type.getRawType())) { - return null; // this class only serializes - // 'GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter< - GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner> - thisAdapter = - gson.getDelegateAdapter( - this, - TypeToken.get( - GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - .class)); - - return (TypeAdapter) - new TypeAdapter< - GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner>() { - @Override - public void write( - JsonWriter out, - GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public - GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of - * GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner given an JSON - * string - * - * @param jsonString JSON string - * @return An instance of - * GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - * @throws IOException if the JSON string is invalid with respect to - * GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - */ - public static GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - fromJson(String jsonString) throws IOException { - return JSON.getGson() - .fromJson( - jsonString, - GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner - .class); - } - - /** - * Convert an instance of - * GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsMarginAccountResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsMarginAccountResponse.java index e39c20ebc..ffcf4c607 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsMarginAccountResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsMarginAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetDetailOnSubAccountsMarginAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDetailOnSubAccountsMarginAccountResponse { public static final String SERIALIZED_NAME_EMAIL = "email"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsMarginAccountResponseMarginTradeCoeffVo.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsMarginAccountResponseMarginTradeCoeffVo.java index 4c4f6626e..33e3550be 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsMarginAccountResponseMarginTradeCoeffVo.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsMarginAccountResponseMarginTradeCoeffVo.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetDetailOnSubAccountsMarginAccountResponseMarginTradeCoeffVo */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDetailOnSubAccountsMarginAccountResponseMarginTradeCoeffVo { public static final String SERIALIZED_NAME_FORCE_LIQUIDATION_BAR = "forceLiquidationBar"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsMarginAccountResponseMarginUserAssetVoListInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsMarginAccountResponseMarginUserAssetVoListInner.java index 64f639055..8fa45db23 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsMarginAccountResponseMarginUserAssetVoListInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetDetailOnSubAccountsMarginAccountResponseMarginUserAssetVoListInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetDetailOnSubAccountsMarginAccountResponseMarginUserAssetVoListInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetDetailOnSubAccountsMarginAccountResponseMarginUserAssetVoListInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountResponse.java index f730036fa..8a4eb0d03 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,9 +34,9 @@ /** GetFuturesPositionRiskOfSubAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFuturesPositionRiskOfSubAccountResponse - extends ArrayList { + extends ArrayList { public GetFuturesPositionRiskOfSubAccountResponse() {} @Override @@ -118,8 +118,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - .validateJsonElement(element); + GetFuturesPositionRiskOfSubAccountResponseInner.validateJsonElement(element); } if (jsonElement == null) { if (!GetFuturesPositionRiskOfSubAccountResponse.openapiRequiredFields diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountResponseInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountResponseInner.java new file mode 100644 index 000000000..1627ef5ce --- /dev/null +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountResponseInner.java @@ -0,0 +1,536 @@ +/* + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.sub_account.rest.model; + +import com.binance.connector.client.sub_account.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** GetFuturesPositionRiskOfSubAccountResponseInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class GetFuturesPositionRiskOfSubAccountResponseInner { + public static final String SERIALIZED_NAME_ENTRY_PRICE = "entryPrice"; + + @SerializedName(SERIALIZED_NAME_ENTRY_PRICE) + @jakarta.annotation.Nullable + private String entryPrice; + + public static final String SERIALIZED_NAME_LEVERAGE = "leverage"; + + @SerializedName(SERIALIZED_NAME_LEVERAGE) + @jakarta.annotation.Nullable + private String leverage; + + public static final String SERIALIZED_NAME_MAX_NOTIONAL = "maxNotional"; + + @SerializedName(SERIALIZED_NAME_MAX_NOTIONAL) + @jakarta.annotation.Nullable + private String maxNotional; + + public static final String SERIALIZED_NAME_LIQUIDATION_PRICE = "liquidationPrice"; + + @SerializedName(SERIALIZED_NAME_LIQUIDATION_PRICE) + @jakarta.annotation.Nullable + private String liquidationPrice; + + public static final String SERIALIZED_NAME_MARK_PRICE = "markPrice"; + + @SerializedName(SERIALIZED_NAME_MARK_PRICE) + @jakarta.annotation.Nullable + private String markPrice; + + public static final String SERIALIZED_NAME_POSITION_AMOUNT = "positionAmount"; + + @SerializedName(SERIALIZED_NAME_POSITION_AMOUNT) + @jakarta.annotation.Nullable + private String positionAmount; + + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_UNREALIZED_PROFIT = "unrealizedProfit"; + + @SerializedName(SERIALIZED_NAME_UNREALIZED_PROFIT) + @jakarta.annotation.Nullable + private String unrealizedProfit; + + public GetFuturesPositionRiskOfSubAccountResponseInner() {} + + public GetFuturesPositionRiskOfSubAccountResponseInner entryPrice( + @jakarta.annotation.Nullable String entryPrice) { + this.entryPrice = entryPrice; + return this; + } + + /** + * Get entryPrice + * + * @return entryPrice + */ + @jakarta.annotation.Nullable + public String getEntryPrice() { + return entryPrice; + } + + public void setEntryPrice(@jakarta.annotation.Nullable String entryPrice) { + this.entryPrice = entryPrice; + } + + public GetFuturesPositionRiskOfSubAccountResponseInner leverage( + @jakarta.annotation.Nullable String leverage) { + this.leverage = leverage; + return this; + } + + /** + * Get leverage + * + * @return leverage + */ + @jakarta.annotation.Nullable + public String getLeverage() { + return leverage; + } + + public void setLeverage(@jakarta.annotation.Nullable String leverage) { + this.leverage = leverage; + } + + public GetFuturesPositionRiskOfSubAccountResponseInner maxNotional( + @jakarta.annotation.Nullable String maxNotional) { + this.maxNotional = maxNotional; + return this; + } + + /** + * Get maxNotional + * + * @return maxNotional + */ + @jakarta.annotation.Nullable + public String getMaxNotional() { + return maxNotional; + } + + public void setMaxNotional(@jakarta.annotation.Nullable String maxNotional) { + this.maxNotional = maxNotional; + } + + public GetFuturesPositionRiskOfSubAccountResponseInner liquidationPrice( + @jakarta.annotation.Nullable String liquidationPrice) { + this.liquidationPrice = liquidationPrice; + return this; + } + + /** + * Get liquidationPrice + * + * @return liquidationPrice + */ + @jakarta.annotation.Nullable + public String getLiquidationPrice() { + return liquidationPrice; + } + + public void setLiquidationPrice(@jakarta.annotation.Nullable String liquidationPrice) { + this.liquidationPrice = liquidationPrice; + } + + public GetFuturesPositionRiskOfSubAccountResponseInner markPrice( + @jakarta.annotation.Nullable String markPrice) { + this.markPrice = markPrice; + return this; + } + + /** + * Get markPrice + * + * @return markPrice + */ + @jakarta.annotation.Nullable + public String getMarkPrice() { + return markPrice; + } + + public void setMarkPrice(@jakarta.annotation.Nullable String markPrice) { + this.markPrice = markPrice; + } + + public GetFuturesPositionRiskOfSubAccountResponseInner positionAmount( + @jakarta.annotation.Nullable String positionAmount) { + this.positionAmount = positionAmount; + return this; + } + + /** + * Get positionAmount + * + * @return positionAmount + */ + @jakarta.annotation.Nullable + public String getPositionAmount() { + return positionAmount; + } + + public void setPositionAmount(@jakarta.annotation.Nullable String positionAmount) { + this.positionAmount = positionAmount; + } + + public GetFuturesPositionRiskOfSubAccountResponseInner symbol( + @jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Get symbol + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public GetFuturesPositionRiskOfSubAccountResponseInner unrealizedProfit( + @jakarta.annotation.Nullable String unrealizedProfit) { + this.unrealizedProfit = unrealizedProfit; + return this; + } + + /** + * Get unrealizedProfit + * + * @return unrealizedProfit + */ + @jakarta.annotation.Nullable + public String getUnrealizedProfit() { + return unrealizedProfit; + } + + public void setUnrealizedProfit(@jakarta.annotation.Nullable String unrealizedProfit) { + this.unrealizedProfit = unrealizedProfit; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetFuturesPositionRiskOfSubAccountResponseInner + getFuturesPositionRiskOfSubAccountResponseInner = + (GetFuturesPositionRiskOfSubAccountResponseInner) o; + return Objects.equals( + this.entryPrice, getFuturesPositionRiskOfSubAccountResponseInner.entryPrice) + && Objects.equals( + this.leverage, getFuturesPositionRiskOfSubAccountResponseInner.leverage) + && Objects.equals( + this.maxNotional, + getFuturesPositionRiskOfSubAccountResponseInner.maxNotional) + && Objects.equals( + this.liquidationPrice, + getFuturesPositionRiskOfSubAccountResponseInner.liquidationPrice) + && Objects.equals( + this.markPrice, getFuturesPositionRiskOfSubAccountResponseInner.markPrice) + && Objects.equals( + this.positionAmount, + getFuturesPositionRiskOfSubAccountResponseInner.positionAmount) + && Objects.equals( + this.symbol, getFuturesPositionRiskOfSubAccountResponseInner.symbol) + && Objects.equals( + this.unrealizedProfit, + getFuturesPositionRiskOfSubAccountResponseInner.unrealizedProfit); + } + + @Override + public int hashCode() { + return Objects.hash( + entryPrice, + leverage, + maxNotional, + liquidationPrice, + markPrice, + positionAmount, + symbol, + unrealizedProfit); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetFuturesPositionRiskOfSubAccountResponseInner {\n"); + sb.append(" entryPrice: ").append(toIndentedString(entryPrice)).append("\n"); + sb.append(" leverage: ").append(toIndentedString(leverage)).append("\n"); + sb.append(" maxNotional: ").append(toIndentedString(maxNotional)).append("\n"); + sb.append(" liquidationPrice: ").append(toIndentedString(liquidationPrice)).append("\n"); + sb.append(" markPrice: ").append(toIndentedString(markPrice)).append("\n"); + sb.append(" positionAmount: ").append(toIndentedString(positionAmount)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" unrealizedProfit: ").append(toIndentedString(unrealizedProfit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object entryPriceValue = getEntryPrice(); + String entryPriceValueAsString = ""; + entryPriceValueAsString = entryPriceValue.toString(); + sb.append("entryPrice=").append(urlEncode(entryPriceValueAsString)).append(""); + Object leverageValue = getLeverage(); + String leverageValueAsString = ""; + leverageValueAsString = leverageValue.toString(); + sb.append("leverage=").append(urlEncode(leverageValueAsString)).append(""); + Object maxNotionalValue = getMaxNotional(); + String maxNotionalValueAsString = ""; + maxNotionalValueAsString = maxNotionalValue.toString(); + sb.append("maxNotional=").append(urlEncode(maxNotionalValueAsString)).append(""); + Object liquidationPriceValue = getLiquidationPrice(); + String liquidationPriceValueAsString = ""; + liquidationPriceValueAsString = liquidationPriceValue.toString(); + sb.append("liquidationPrice=").append(urlEncode(liquidationPriceValueAsString)).append(""); + Object markPriceValue = getMarkPrice(); + String markPriceValueAsString = ""; + markPriceValueAsString = markPriceValue.toString(); + sb.append("markPrice=").append(urlEncode(markPriceValueAsString)).append(""); + Object positionAmountValue = getPositionAmount(); + String positionAmountValueAsString = ""; + positionAmountValueAsString = positionAmountValue.toString(); + sb.append("positionAmount=").append(urlEncode(positionAmountValueAsString)).append(""); + Object symbolValue = getSymbol(); + String symbolValueAsString = ""; + symbolValueAsString = symbolValue.toString(); + sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); + Object unrealizedProfitValue = getUnrealizedProfit(); + String unrealizedProfitValueAsString = ""; + unrealizedProfitValueAsString = unrealizedProfitValue.toString(); + sb.append("unrealizedProfit=").append(urlEncode(unrealizedProfitValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("entryPrice"); + openapiFields.add("leverage"); + openapiFields.add("maxNotional"); + openapiFields.add("liquidationPrice"); + openapiFields.add("markPrice"); + openapiFields.add("positionAmount"); + openapiFields.add("symbol"); + openapiFields.add("unrealizedProfit"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * GetFuturesPositionRiskOfSubAccountResponseInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetFuturesPositionRiskOfSubAccountResponseInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " GetFuturesPositionRiskOfSubAccountResponseInner is not" + + " found in the empty JSON string", + GetFuturesPositionRiskOfSubAccountResponseInner + .openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("entryPrice") != null && !jsonObj.get("entryPrice").isJsonNull()) + && !jsonObj.get("entryPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `entryPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("entryPrice").toString())); + } + if ((jsonObj.get("leverage") != null && !jsonObj.get("leverage").isJsonNull()) + && !jsonObj.get("leverage").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `leverage` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("leverage").toString())); + } + if ((jsonObj.get("maxNotional") != null && !jsonObj.get("maxNotional").isJsonNull()) + && !jsonObj.get("maxNotional").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `maxNotional` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("maxNotional").toString())); + } + if ((jsonObj.get("liquidationPrice") != null + && !jsonObj.get("liquidationPrice").isJsonNull()) + && !jsonObj.get("liquidationPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `liquidationPrice` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("liquidationPrice").toString())); + } + if ((jsonObj.get("markPrice") != null && !jsonObj.get("markPrice").isJsonNull()) + && !jsonObj.get("markPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `markPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("markPrice").toString())); + } + if ((jsonObj.get("positionAmount") != null && !jsonObj.get("positionAmount").isJsonNull()) + && !jsonObj.get("positionAmount").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `positionAmount` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("positionAmount").toString())); + } + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + if ((jsonObj.get("unrealizedProfit") != null + && !jsonObj.get("unrealizedProfit").isJsonNull()) + && !jsonObj.get("unrealizedProfit").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `unrealizedProfit` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("unrealizedProfit").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetFuturesPositionRiskOfSubAccountResponseInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'GetFuturesPositionRiskOfSubAccountResponseInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get(GetFuturesPositionRiskOfSubAccountResponseInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, + GetFuturesPositionRiskOfSubAccountResponseInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetFuturesPositionRiskOfSubAccountResponseInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetFuturesPositionRiskOfSubAccountResponseInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetFuturesPositionRiskOfSubAccountResponseInner + * @throws IOException if the JSON string is invalid with respect to + * GetFuturesPositionRiskOfSubAccountResponseInner + */ + public static GetFuturesPositionRiskOfSubAccountResponseInner fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, GetFuturesPositionRiskOfSubAccountResponseInner.class); + } + + /** + * Convert an instance of GetFuturesPositionRiskOfSubAccountResponseInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountV2Response.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountV2Response.java index 24651f8bb..fb16958fd 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountV2Response.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountV2Response.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,14 +40,13 @@ /** GetFuturesPositionRiskOfSubAccountV2Response */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFuturesPositionRiskOfSubAccountV2Response { public static final String SERIALIZED_NAME_FUTURE_POSITION_RISK_VOS = "futurePositionRiskVos"; @SerializedName(SERIALIZED_NAME_FUTURE_POSITION_RISK_VOS) @jakarta.annotation.Nullable - private List<@Valid GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner> - futurePositionRiskVos; + private List<@Valid GetFuturesPositionRiskOfSubAccountResponseInner> futurePositionRiskVos; public static final String SERIALIZED_NAME_DELIVERY_POSITION_RISK_VOS = "deliveryPositionRiskVos"; @@ -61,17 +60,14 @@ public GetFuturesPositionRiskOfSubAccountV2Response() {} public GetFuturesPositionRiskOfSubAccountV2Response futurePositionRiskVos( @jakarta.annotation.Nullable - List< - @Valid - GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner> + List<@Valid GetFuturesPositionRiskOfSubAccountResponseInner> futurePositionRiskVos) { this.futurePositionRiskVos = futurePositionRiskVos; return this; } public GetFuturesPositionRiskOfSubAccountV2Response addFuturePositionRiskVosItem( - GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - futurePositionRiskVosItem) { + GetFuturesPositionRiskOfSubAccountResponseInner futurePositionRiskVosItem) { if (this.futurePositionRiskVos == null) { this.futurePositionRiskVos = new ArrayList<>(); } @@ -86,16 +82,13 @@ public GetFuturesPositionRiskOfSubAccountV2Response addFuturePositionRiskVosItem */ @jakarta.annotation.Nullable @Valid - public List<@Valid GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner> - getFuturePositionRiskVos() { + public List<@Valid GetFuturesPositionRiskOfSubAccountResponseInner> getFuturePositionRiskVos() { return futurePositionRiskVos; } public void setFuturePositionRiskVos( @jakarta.annotation.Nullable - List< - @Valid - GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner> + List<@Valid GetFuturesPositionRiskOfSubAccountResponseInner> futurePositionRiskVos) { this.futurePositionRiskVos = futurePositionRiskVos; } @@ -271,8 +264,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `futurePositionRiskVos` (array) for (int i = 0; i < jsonArrayfuturePositionRiskVos.size(); i++) { - GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - .validateJsonElement(jsonArrayfuturePositionRiskVos.get(i)); + GetFuturesPositionRiskOfSubAccountResponseInner.validateJsonElement( + jsonArrayfuturePositionRiskVos.get(i)); } ; } diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountV2ResponseDeliveryPositionRiskVosInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountV2ResponseDeliveryPositionRiskVosInner.java index fb4244878..66958e107 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountV2ResponseDeliveryPositionRiskVosInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountV2ResponseDeliveryPositionRiskVosInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetFuturesPositionRiskOfSubAccountV2ResponseDeliveryPositionRiskVosInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetFuturesPositionRiskOfSubAccountV2ResponseDeliveryPositionRiskVosInner { public static final String SERIALIZED_NAME_ENTRY_PRICE = "entryPrice"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner.java deleted file mode 100644 index 4dd9e7956..000000000 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner.java +++ /dev/null @@ -1,563 +0,0 @@ -/* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.sub_account.rest.model; - -import com.binance.connector.client.sub_account.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner { - public static final String SERIALIZED_NAME_ENTRY_PRICE = "entryPrice"; - - @SerializedName(SERIALIZED_NAME_ENTRY_PRICE) - @jakarta.annotation.Nullable - private String entryPrice; - - public static final String SERIALIZED_NAME_LEVERAGE = "leverage"; - - @SerializedName(SERIALIZED_NAME_LEVERAGE) - @jakarta.annotation.Nullable - private String leverage; - - public static final String SERIALIZED_NAME_MAX_NOTIONAL = "maxNotional"; - - @SerializedName(SERIALIZED_NAME_MAX_NOTIONAL) - @jakarta.annotation.Nullable - private String maxNotional; - - public static final String SERIALIZED_NAME_LIQUIDATION_PRICE = "liquidationPrice"; - - @SerializedName(SERIALIZED_NAME_LIQUIDATION_PRICE) - @jakarta.annotation.Nullable - private String liquidationPrice; - - public static final String SERIALIZED_NAME_MARK_PRICE = "markPrice"; - - @SerializedName(SERIALIZED_NAME_MARK_PRICE) - @jakarta.annotation.Nullable - private String markPrice; - - public static final String SERIALIZED_NAME_POSITION_AMOUNT = "positionAmount"; - - @SerializedName(SERIALIZED_NAME_POSITION_AMOUNT) - @jakarta.annotation.Nullable - private String positionAmount; - - public static final String SERIALIZED_NAME_SYMBOL = "symbol"; - - @SerializedName(SERIALIZED_NAME_SYMBOL) - @jakarta.annotation.Nullable - private String symbol; - - public static final String SERIALIZED_NAME_UNREALIZED_PROFIT = "unrealizedProfit"; - - @SerializedName(SERIALIZED_NAME_UNREALIZED_PROFIT) - @jakarta.annotation.Nullable - private String unrealizedProfit; - - public GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner() {} - - public GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner entryPrice( - @jakarta.annotation.Nullable String entryPrice) { - this.entryPrice = entryPrice; - return this; - } - - /** - * Get entryPrice - * - * @return entryPrice - */ - @jakarta.annotation.Nullable - public String getEntryPrice() { - return entryPrice; - } - - public void setEntryPrice(@jakarta.annotation.Nullable String entryPrice) { - this.entryPrice = entryPrice; - } - - public GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner leverage( - @jakarta.annotation.Nullable String leverage) { - this.leverage = leverage; - return this; - } - - /** - * Get leverage - * - * @return leverage - */ - @jakarta.annotation.Nullable - public String getLeverage() { - return leverage; - } - - public void setLeverage(@jakarta.annotation.Nullable String leverage) { - this.leverage = leverage; - } - - public GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner maxNotional( - @jakarta.annotation.Nullable String maxNotional) { - this.maxNotional = maxNotional; - return this; - } - - /** - * Get maxNotional - * - * @return maxNotional - */ - @jakarta.annotation.Nullable - public String getMaxNotional() { - return maxNotional; - } - - public void setMaxNotional(@jakarta.annotation.Nullable String maxNotional) { - this.maxNotional = maxNotional; - } - - public GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner liquidationPrice( - @jakarta.annotation.Nullable String liquidationPrice) { - this.liquidationPrice = liquidationPrice; - return this; - } - - /** - * Get liquidationPrice - * - * @return liquidationPrice - */ - @jakarta.annotation.Nullable - public String getLiquidationPrice() { - return liquidationPrice; - } - - public void setLiquidationPrice(@jakarta.annotation.Nullable String liquidationPrice) { - this.liquidationPrice = liquidationPrice; - } - - public GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner markPrice( - @jakarta.annotation.Nullable String markPrice) { - this.markPrice = markPrice; - return this; - } - - /** - * Get markPrice - * - * @return markPrice - */ - @jakarta.annotation.Nullable - public String getMarkPrice() { - return markPrice; - } - - public void setMarkPrice(@jakarta.annotation.Nullable String markPrice) { - this.markPrice = markPrice; - } - - public GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner positionAmount( - @jakarta.annotation.Nullable String positionAmount) { - this.positionAmount = positionAmount; - return this; - } - - /** - * Get positionAmount - * - * @return positionAmount - */ - @jakarta.annotation.Nullable - public String getPositionAmount() { - return positionAmount; - } - - public void setPositionAmount(@jakarta.annotation.Nullable String positionAmount) { - this.positionAmount = positionAmount; - } - - public GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner symbol( - @jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - return this; - } - - /** - * Get symbol - * - * @return symbol - */ - @jakarta.annotation.Nullable - public String getSymbol() { - return symbol; - } - - public void setSymbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - } - - public GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner unrealizedProfit( - @jakarta.annotation.Nullable String unrealizedProfit) { - this.unrealizedProfit = unrealizedProfit; - return this; - } - - /** - * Get unrealizedProfit - * - * @return unrealizedProfit - */ - @jakarta.annotation.Nullable - public String getUnrealizedProfit() { - return unrealizedProfit; - } - - public void setUnrealizedProfit(@jakarta.annotation.Nullable String unrealizedProfit) { - this.unrealizedProfit = unrealizedProfit; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - getFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner = - (GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner) o; - return Objects.equals( - this.entryPrice, - getFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - .entryPrice) - && Objects.equals( - this.leverage, - getFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - .leverage) - && Objects.equals( - this.maxNotional, - getFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - .maxNotional) - && Objects.equals( - this.liquidationPrice, - getFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - .liquidationPrice) - && Objects.equals( - this.markPrice, - getFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - .markPrice) - && Objects.equals( - this.positionAmount, - getFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - .positionAmount) - && Objects.equals( - this.symbol, - getFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - .symbol) - && Objects.equals( - this.unrealizedProfit, - getFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - .unrealizedProfit); - } - - @Override - public int hashCode() { - return Objects.hash( - entryPrice, - leverage, - maxNotional, - liquidationPrice, - markPrice, - positionAmount, - symbol, - unrealizedProfit); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append( - "class GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner {\n"); - sb.append(" entryPrice: ").append(toIndentedString(entryPrice)).append("\n"); - sb.append(" leverage: ").append(toIndentedString(leverage)).append("\n"); - sb.append(" maxNotional: ").append(toIndentedString(maxNotional)).append("\n"); - sb.append(" liquidationPrice: ").append(toIndentedString(liquidationPrice)).append("\n"); - sb.append(" markPrice: ").append(toIndentedString(markPrice)).append("\n"); - sb.append(" positionAmount: ").append(toIndentedString(positionAmount)).append("\n"); - sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); - sb.append(" unrealizedProfit: ").append(toIndentedString(unrealizedProfit)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object entryPriceValue = getEntryPrice(); - String entryPriceValueAsString = ""; - entryPriceValueAsString = entryPriceValue.toString(); - sb.append("entryPrice=").append(urlEncode(entryPriceValueAsString)).append(""); - Object leverageValue = getLeverage(); - String leverageValueAsString = ""; - leverageValueAsString = leverageValue.toString(); - sb.append("leverage=").append(urlEncode(leverageValueAsString)).append(""); - Object maxNotionalValue = getMaxNotional(); - String maxNotionalValueAsString = ""; - maxNotionalValueAsString = maxNotionalValue.toString(); - sb.append("maxNotional=").append(urlEncode(maxNotionalValueAsString)).append(""); - Object liquidationPriceValue = getLiquidationPrice(); - String liquidationPriceValueAsString = ""; - liquidationPriceValueAsString = liquidationPriceValue.toString(); - sb.append("liquidationPrice=").append(urlEncode(liquidationPriceValueAsString)).append(""); - Object markPriceValue = getMarkPrice(); - String markPriceValueAsString = ""; - markPriceValueAsString = markPriceValue.toString(); - sb.append("markPrice=").append(urlEncode(markPriceValueAsString)).append(""); - Object positionAmountValue = getPositionAmount(); - String positionAmountValueAsString = ""; - positionAmountValueAsString = positionAmountValue.toString(); - sb.append("positionAmount=").append(urlEncode(positionAmountValueAsString)).append(""); - Object symbolValue = getSymbol(); - String symbolValueAsString = ""; - symbolValueAsString = symbolValue.toString(); - sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); - Object unrealizedProfitValue = getUnrealizedProfit(); - String unrealizedProfitValueAsString = ""; - unrealizedProfitValueAsString = unrealizedProfitValue.toString(); - sb.append("unrealizedProfit=").append(urlEncode(unrealizedProfitValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("entryPrice"); - openapiFields.add("leverage"); - openapiFields.add("maxNotional"); - openapiFields.add("liquidationPrice"); - openapiFields.add("markPrice"); - openapiFields.add("positionAmount"); - openapiFields.add("symbol"); - openapiFields.add("unrealizedProfit"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - .openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner" - + " is not found in the empty JSON string", - GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - .openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("entryPrice") != null && !jsonObj.get("entryPrice").isJsonNull()) - && !jsonObj.get("entryPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `entryPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("entryPrice").toString())); - } - if ((jsonObj.get("leverage") != null && !jsonObj.get("leverage").isJsonNull()) - && !jsonObj.get("leverage").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `leverage` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("leverage").toString())); - } - if ((jsonObj.get("maxNotional") != null && !jsonObj.get("maxNotional").isJsonNull()) - && !jsonObj.get("maxNotional").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `maxNotional` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("maxNotional").toString())); - } - if ((jsonObj.get("liquidationPrice") != null - && !jsonObj.get("liquidationPrice").isJsonNull()) - && !jsonObj.get("liquidationPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `liquidationPrice` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("liquidationPrice").toString())); - } - if ((jsonObj.get("markPrice") != null && !jsonObj.get("markPrice").isJsonNull()) - && !jsonObj.get("markPrice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `markPrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("markPrice").toString())); - } - if ((jsonObj.get("positionAmount") != null && !jsonObj.get("positionAmount").isJsonNull()) - && !jsonObj.get("positionAmount").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `positionAmount` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("positionAmount").toString())); - } - if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) - && !jsonObj.get("symbol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `symbol` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("symbol").toString())); - } - if ((jsonObj.get("unrealizedProfit") != null - && !jsonObj.get("unrealizedProfit").isJsonNull()) - && !jsonObj.get("unrealizedProfit").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `unrealizedProfit` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("unrealizedProfit").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner.class - .isAssignableFrom(type.getRawType())) { - return null; // this class only serializes - // 'GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter< - GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner> - thisAdapter = - gson.getDelegateAdapter( - this, - TypeToken.get( - GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - .class)); - - return (TypeAdapter) - new TypeAdapter< - GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner>() { - @Override - public void write( - JsonWriter out, - GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public - GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner read( - JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - * given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - * @throws IOException if the JSON string is invalid with respect to - * GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - */ - public static GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner fromJson( - String jsonString) throws IOException { - return JSON.getGson() - .fromJson( - jsonString, - GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - .class); - } - - /** - * Convert an instance of GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner - * to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetIpRestrictionForASubAccountApiKeyResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetIpRestrictionForASubAccountApiKeyResponse.java index 0ea52a242..67ac85c63 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetIpRestrictionForASubAccountApiKeyResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetIpRestrictionForASubAccountApiKeyResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** GetIpRestrictionForASubAccountApiKeyResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetIpRestrictionForASubAccountApiKeyResponse { public static final String SERIALIZED_NAME_IP_RESTRICT = "ipRestrict"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetManagedSubAccountDepositAddressResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetManagedSubAccountDepositAddressResponse.java index 37ef6645d..6708d007c 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetManagedSubAccountDepositAddressResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetManagedSubAccountDepositAddressResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetManagedSubAccountDepositAddressResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetManagedSubAccountDepositAddressResponse { public static final String SERIALIZED_NAME_COIN = "coin"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetMovePositionHistoryForSubAccountResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetMovePositionHistoryForSubAccountResponse.java index 0be6373e9..f10f344a7 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetMovePositionHistoryForSubAccountResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetMovePositionHistoryForSubAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetMovePositionHistoryForSubAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetMovePositionHistoryForSubAccountResponse { public static final String SERIALIZED_NAME_TOTAL = "total"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetMovePositionHistoryForSubAccountResponseFutureMovePositionOrderVoListInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetMovePositionHistoryForSubAccountResponseFutureMovePositionOrderVoListInner.java index b8b1b876e..bfb2e8bd6 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetMovePositionHistoryForSubAccountResponseFutureMovePositionOrderVoListInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetMovePositionHistoryForSubAccountResponseFutureMovePositionOrderVoListInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetMovePositionHistoryForSubAccountResponseFutureMovePositionOrderVoListInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetMovePositionHistoryForSubAccountResponseFutureMovePositionOrderVoListInner { public static final String SERIALIZED_NAME_FROM_USER_EMAIL = "fromUserEmail"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountDepositAddressResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountDepositAddressResponse.java index ba84b0919..a55639890 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountDepositAddressResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountDepositAddressResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSubAccountDepositAddressResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSubAccountDepositAddressResponse { public static final String SERIALIZED_NAME_ADDRESS = "address"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountDepositHistoryResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountDepositHistoryResponse.java index d0a6569ce..c4e0dcfd3 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountDepositHistoryResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountDepositHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSubAccountDepositHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSubAccountDepositHistoryResponse extends ArrayList { public GetSubAccountDepositHistoryResponse() {} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountDepositHistoryResponseInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountDepositHistoryResponseInner.java index 5f8a003b2..7826b01ad 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountDepositHistoryResponseInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountDepositHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSubAccountDepositHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSubAccountDepositHistoryResponseInner { public static final String SERIALIZED_NAME_ID = "id"; @@ -201,7 +201,8 @@ public GetSubAccountDepositHistoryResponseInner status( } /** - * Get status + * Deposit status: 0=pending, 6=credited but cannot withdraw, 7=wrong deposit, + * 8=waiting user confirmation, 1=success. * * @return status */ diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountsStatusOnMarginOrFuturesResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountsStatusOnMarginOrFuturesResponse.java index 4d6c1bbea..5fbc8fb37 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountsStatusOnMarginOrFuturesResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountsStatusOnMarginOrFuturesResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSubAccountsStatusOnMarginOrFuturesResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSubAccountsStatusOnMarginOrFuturesResponse extends ArrayList { public GetSubAccountsStatusOnMarginOrFuturesResponse() {} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountsStatusOnMarginOrFuturesResponseInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountsStatusOnMarginOrFuturesResponseInner.java index a83517a5e..063de671b 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountsStatusOnMarginOrFuturesResponseInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSubAccountsStatusOnMarginOrFuturesResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSubAccountsStatusOnMarginOrFuturesResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSubAccountsStatusOnMarginOrFuturesResponseInner { public static final String SERIALIZED_NAME_EMAIL = "email"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountResponse.java index 0946cdecc..7e50e9fa0 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetSummaryOfSubAccountsFuturesAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSummaryOfSubAccountsFuturesAccountResponse { public static final String SERIALIZED_NAME_TOTAL_INITIAL_MARGIN = "totalInitialMargin"; @@ -96,9 +96,7 @@ public class GetSummaryOfSubAccountsFuturesAccountResponse { @SerializedName(SERIALIZED_NAME_SUB_ACCOUNT_LIST) @jakarta.annotation.Nullable - private List< - @Valid - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner> + private List<@Valid GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner> subAccountList; public GetSummaryOfSubAccountsFuturesAccountResponse() {} @@ -269,17 +267,14 @@ public void setAsset(@jakarta.annotation.Nullable String asset) { public GetSummaryOfSubAccountsFuturesAccountResponse subAccountList( @jakarta.annotation.Nullable - List< - @Valid - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner> + List<@Valid GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner> subAccountList) { this.subAccountList = subAccountList; return this; } public GetSummaryOfSubAccountsFuturesAccountResponse addSubAccountListItem( - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - subAccountListItem) { + GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner subAccountListItem) { if (this.subAccountList == null) { this.subAccountList = new ArrayList<>(); } @@ -294,18 +289,14 @@ public GetSummaryOfSubAccountsFuturesAccountResponse addSubAccountListItem( */ @jakarta.annotation.Nullable @Valid - public List< - @Valid - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner> + public List<@Valid GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner> getSubAccountList() { return subAccountList; } public void setSubAccountList( @jakarta.annotation.Nullable - List< - @Valid - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner> + List<@Valid GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner> subAccountList) { this.subAccountList = subAccountList; } @@ -597,7 +588,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `subAccountList` (array) for (int i = 0; i < jsonArraysubAccountList.size(); i++) { - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner + GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner .validateJsonElement(jsonArraysubAccountList.get(i)); } ; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner.java new file mode 100644 index 000000000..70101aaa1 --- /dev/null +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner.java @@ -0,0 +1,643 @@ +/* + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.sub_account.rest.model; + +import com.binance.connector.client.sub_account.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner { + public static final String SERIALIZED_NAME_EMAIL = "email"; + + @SerializedName(SERIALIZED_NAME_EMAIL) + @jakarta.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_TOTAL_INITIAL_MARGIN = "totalInitialMargin"; + + @SerializedName(SERIALIZED_NAME_TOTAL_INITIAL_MARGIN) + @jakarta.annotation.Nullable + private String totalInitialMargin; + + public static final String SERIALIZED_NAME_TOTAL_MAINTENANCE_MARGIN = "totalMaintenanceMargin"; + + @SerializedName(SERIALIZED_NAME_TOTAL_MAINTENANCE_MARGIN) + @jakarta.annotation.Nullable + private String totalMaintenanceMargin; + + public static final String SERIALIZED_NAME_TOTAL_MARGIN_BALANCE = "totalMarginBalance"; + + @SerializedName(SERIALIZED_NAME_TOTAL_MARGIN_BALANCE) + @jakarta.annotation.Nullable + private String totalMarginBalance; + + public static final String SERIALIZED_NAME_TOTAL_OPEN_ORDER_INITIAL_MARGIN = + "totalOpenOrderInitialMargin"; + + @SerializedName(SERIALIZED_NAME_TOTAL_OPEN_ORDER_INITIAL_MARGIN) + @jakarta.annotation.Nullable + private String totalOpenOrderInitialMargin; + + public static final String SERIALIZED_NAME_TOTAL_POSITION_INITIAL_MARGIN = + "totalPositionInitialMargin"; + + @SerializedName(SERIALIZED_NAME_TOTAL_POSITION_INITIAL_MARGIN) + @jakarta.annotation.Nullable + private String totalPositionInitialMargin; + + public static final String SERIALIZED_NAME_TOTAL_UNREALIZED_PROFIT = "totalUnrealizedProfit"; + + @SerializedName(SERIALIZED_NAME_TOTAL_UNREALIZED_PROFIT) + @jakarta.annotation.Nullable + private String totalUnrealizedProfit; + + public static final String SERIALIZED_NAME_TOTAL_WALLET_BALANCE = "totalWalletBalance"; + + @SerializedName(SERIALIZED_NAME_TOTAL_WALLET_BALANCE) + @jakarta.annotation.Nullable + private String totalWalletBalance; + + public static final String SERIALIZED_NAME_ASSET = "asset"; + + @SerializedName(SERIALIZED_NAME_ASSET) + @jakarta.annotation.Nullable + private String asset; + + public GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner() {} + + public GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner email( + @jakarta.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Get email + * + * @return email + */ + @jakarta.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@jakarta.annotation.Nullable String email) { + this.email = email; + } + + public GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner totalInitialMargin( + @jakarta.annotation.Nullable String totalInitialMargin) { + this.totalInitialMargin = totalInitialMargin; + return this; + } + + /** + * Get totalInitialMargin + * + * @return totalInitialMargin + */ + @jakarta.annotation.Nullable + public String getTotalInitialMargin() { + return totalInitialMargin; + } + + public void setTotalInitialMargin(@jakarta.annotation.Nullable String totalInitialMargin) { + this.totalInitialMargin = totalInitialMargin; + } + + public GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner totalMaintenanceMargin( + @jakarta.annotation.Nullable String totalMaintenanceMargin) { + this.totalMaintenanceMargin = totalMaintenanceMargin; + return this; + } + + /** + * Get totalMaintenanceMargin + * + * @return totalMaintenanceMargin + */ + @jakarta.annotation.Nullable + public String getTotalMaintenanceMargin() { + return totalMaintenanceMargin; + } + + public void setTotalMaintenanceMargin( + @jakarta.annotation.Nullable String totalMaintenanceMargin) { + this.totalMaintenanceMargin = totalMaintenanceMargin; + } + + public GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner totalMarginBalance( + @jakarta.annotation.Nullable String totalMarginBalance) { + this.totalMarginBalance = totalMarginBalance; + return this; + } + + /** + * Get totalMarginBalance + * + * @return totalMarginBalance + */ + @jakarta.annotation.Nullable + public String getTotalMarginBalance() { + return totalMarginBalance; + } + + public void setTotalMarginBalance(@jakarta.annotation.Nullable String totalMarginBalance) { + this.totalMarginBalance = totalMarginBalance; + } + + public GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + totalOpenOrderInitialMargin( + @jakarta.annotation.Nullable String totalOpenOrderInitialMargin) { + this.totalOpenOrderInitialMargin = totalOpenOrderInitialMargin; + return this; + } + + /** + * Get totalOpenOrderInitialMargin + * + * @return totalOpenOrderInitialMargin + */ + @jakarta.annotation.Nullable + public String getTotalOpenOrderInitialMargin() { + return totalOpenOrderInitialMargin; + } + + public void setTotalOpenOrderInitialMargin( + @jakarta.annotation.Nullable String totalOpenOrderInitialMargin) { + this.totalOpenOrderInitialMargin = totalOpenOrderInitialMargin; + } + + public GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + totalPositionInitialMargin( + @jakarta.annotation.Nullable String totalPositionInitialMargin) { + this.totalPositionInitialMargin = totalPositionInitialMargin; + return this; + } + + /** + * Get totalPositionInitialMargin + * + * @return totalPositionInitialMargin + */ + @jakarta.annotation.Nullable + public String getTotalPositionInitialMargin() { + return totalPositionInitialMargin; + } + + public void setTotalPositionInitialMargin( + @jakarta.annotation.Nullable String totalPositionInitialMargin) { + this.totalPositionInitialMargin = totalPositionInitialMargin; + } + + public GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner totalUnrealizedProfit( + @jakarta.annotation.Nullable String totalUnrealizedProfit) { + this.totalUnrealizedProfit = totalUnrealizedProfit; + return this; + } + + /** + * Get totalUnrealizedProfit + * + * @return totalUnrealizedProfit + */ + @jakarta.annotation.Nullable + public String getTotalUnrealizedProfit() { + return totalUnrealizedProfit; + } + + public void setTotalUnrealizedProfit( + @jakarta.annotation.Nullable String totalUnrealizedProfit) { + this.totalUnrealizedProfit = totalUnrealizedProfit; + } + + public GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner totalWalletBalance( + @jakarta.annotation.Nullable String totalWalletBalance) { + this.totalWalletBalance = totalWalletBalance; + return this; + } + + /** + * Get totalWalletBalance + * + * @return totalWalletBalance + */ + @jakarta.annotation.Nullable + public String getTotalWalletBalance() { + return totalWalletBalance; + } + + public void setTotalWalletBalance(@jakarta.annotation.Nullable String totalWalletBalance) { + this.totalWalletBalance = totalWalletBalance; + } + + public GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner asset( + @jakarta.annotation.Nullable String asset) { + this.asset = asset; + return this; + } + + /** + * Get asset + * + * @return asset + */ + @jakarta.annotation.Nullable + public String getAsset() { + return asset; + } + + public void setAsset(@jakarta.annotation.Nullable String asset) { + this.asset = asset; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + getSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner = + (GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner) o; + return Objects.equals( + this.email, + getSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner.email) + && Objects.equals( + this.totalInitialMargin, + getSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + .totalInitialMargin) + && Objects.equals( + this.totalMaintenanceMargin, + getSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + .totalMaintenanceMargin) + && Objects.equals( + this.totalMarginBalance, + getSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + .totalMarginBalance) + && Objects.equals( + this.totalOpenOrderInitialMargin, + getSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + .totalOpenOrderInitialMargin) + && Objects.equals( + this.totalPositionInitialMargin, + getSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + .totalPositionInitialMargin) + && Objects.equals( + this.totalUnrealizedProfit, + getSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + .totalUnrealizedProfit) + && Objects.equals( + this.totalWalletBalance, + getSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + .totalWalletBalance) + && Objects.equals( + this.asset, + getSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner.asset); + } + + @Override + public int hashCode() { + return Objects.hash( + email, + totalInitialMargin, + totalMaintenanceMargin, + totalMarginBalance, + totalOpenOrderInitialMargin, + totalPositionInitialMargin, + totalUnrealizedProfit, + totalWalletBalance, + asset); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" totalInitialMargin: ") + .append(toIndentedString(totalInitialMargin)) + .append("\n"); + sb.append(" totalMaintenanceMargin: ") + .append(toIndentedString(totalMaintenanceMargin)) + .append("\n"); + sb.append(" totalMarginBalance: ") + .append(toIndentedString(totalMarginBalance)) + .append("\n"); + sb.append(" totalOpenOrderInitialMargin: ") + .append(toIndentedString(totalOpenOrderInitialMargin)) + .append("\n"); + sb.append(" totalPositionInitialMargin: ") + .append(toIndentedString(totalPositionInitialMargin)) + .append("\n"); + sb.append(" totalUnrealizedProfit: ") + .append(toIndentedString(totalUnrealizedProfit)) + .append("\n"); + sb.append(" totalWalletBalance: ") + .append(toIndentedString(totalWalletBalance)) + .append("\n"); + sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object emailValue = getEmail(); + String emailValueAsString = ""; + emailValueAsString = emailValue.toString(); + sb.append("email=").append(urlEncode(emailValueAsString)).append(""); + Object totalInitialMarginValue = getTotalInitialMargin(); + String totalInitialMarginValueAsString = ""; + totalInitialMarginValueAsString = totalInitialMarginValue.toString(); + sb.append("totalInitialMargin=") + .append(urlEncode(totalInitialMarginValueAsString)) + .append(""); + Object totalMaintenanceMarginValue = getTotalMaintenanceMargin(); + String totalMaintenanceMarginValueAsString = ""; + totalMaintenanceMarginValueAsString = totalMaintenanceMarginValue.toString(); + sb.append("totalMaintenanceMargin=") + .append(urlEncode(totalMaintenanceMarginValueAsString)) + .append(""); + Object totalMarginBalanceValue = getTotalMarginBalance(); + String totalMarginBalanceValueAsString = ""; + totalMarginBalanceValueAsString = totalMarginBalanceValue.toString(); + sb.append("totalMarginBalance=") + .append(urlEncode(totalMarginBalanceValueAsString)) + .append(""); + Object totalOpenOrderInitialMarginValue = getTotalOpenOrderInitialMargin(); + String totalOpenOrderInitialMarginValueAsString = ""; + totalOpenOrderInitialMarginValueAsString = totalOpenOrderInitialMarginValue.toString(); + sb.append("totalOpenOrderInitialMargin=") + .append(urlEncode(totalOpenOrderInitialMarginValueAsString)) + .append(""); + Object totalPositionInitialMarginValue = getTotalPositionInitialMargin(); + String totalPositionInitialMarginValueAsString = ""; + totalPositionInitialMarginValueAsString = totalPositionInitialMarginValue.toString(); + sb.append("totalPositionInitialMargin=") + .append(urlEncode(totalPositionInitialMarginValueAsString)) + .append(""); + Object totalUnrealizedProfitValue = getTotalUnrealizedProfit(); + String totalUnrealizedProfitValueAsString = ""; + totalUnrealizedProfitValueAsString = totalUnrealizedProfitValue.toString(); + sb.append("totalUnrealizedProfit=") + .append(urlEncode(totalUnrealizedProfitValueAsString)) + .append(""); + Object totalWalletBalanceValue = getTotalWalletBalance(); + String totalWalletBalanceValueAsString = ""; + totalWalletBalanceValueAsString = totalWalletBalanceValue.toString(); + sb.append("totalWalletBalance=") + .append(urlEncode(totalWalletBalanceValueAsString)) + .append(""); + Object assetValue = getAsset(); + String assetValueAsString = ""; + assetValueAsString = assetValue.toString(); + sb.append("asset=").append(urlEncode(assetValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("email"); + openapiFields.add("totalInitialMargin"); + openapiFields.add("totalMaintenanceMargin"); + openapiFields.add("totalMarginBalance"); + openapiFields.add("totalOpenOrderInitialMargin"); + openapiFields.add("totalPositionInitialMargin"); + openapiFields.add("totalUnrealizedProfit"); + openapiFields.add("totalWalletBalance"); + openapiFields.add("asset"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + .openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner" + + " is not found in the empty JSON string", + GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + .openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) + && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `email` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("email").toString())); + } + if ((jsonObj.get("totalInitialMargin") != null + && !jsonObj.get("totalInitialMargin").isJsonNull()) + && !jsonObj.get("totalInitialMargin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `totalInitialMargin` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("totalInitialMargin").toString())); + } + if ((jsonObj.get("totalMaintenanceMargin") != null + && !jsonObj.get("totalMaintenanceMargin").isJsonNull()) + && !jsonObj.get("totalMaintenanceMargin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `totalMaintenanceMargin` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("totalMaintenanceMargin").toString())); + } + if ((jsonObj.get("totalMarginBalance") != null + && !jsonObj.get("totalMarginBalance").isJsonNull()) + && !jsonObj.get("totalMarginBalance").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `totalMarginBalance` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("totalMarginBalance").toString())); + } + if ((jsonObj.get("totalOpenOrderInitialMargin") != null + && !jsonObj.get("totalOpenOrderInitialMargin").isJsonNull()) + && !jsonObj.get("totalOpenOrderInitialMargin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `totalOpenOrderInitialMargin` to be a primitive" + + " type in the JSON string but got `%s`", + jsonObj.get("totalOpenOrderInitialMargin").toString())); + } + if ((jsonObj.get("totalPositionInitialMargin") != null + && !jsonObj.get("totalPositionInitialMargin").isJsonNull()) + && !jsonObj.get("totalPositionInitialMargin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `totalPositionInitialMargin` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("totalPositionInitialMargin").toString())); + } + if ((jsonObj.get("totalUnrealizedProfit") != null + && !jsonObj.get("totalUnrealizedProfit").isJsonNull()) + && !jsonObj.get("totalUnrealizedProfit").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `totalUnrealizedProfit` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("totalUnrealizedProfit").toString())); + } + if ((jsonObj.get("totalWalletBalance") != null + && !jsonObj.get("totalWalletBalance").isJsonNull()) + && !jsonObj.get("totalWalletBalance").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `totalWalletBalance` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("totalWalletBalance").toString())); + } + if ((jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) + && !jsonObj.get("asset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `asset` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("asset").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner.class + .isAssignableFrom(type.getRawType())) { + return null; // this class only serializes + // 'GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter + thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get( + GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + .class)); + + return (TypeAdapter) + new TypeAdapter< + GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner>() { + @Override + public void write( + JsonWriter out, + GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner given + * an JSON string + * + * @param jsonString JSON string + * @return An instance of GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + * @throws IOException if the JSON string is invalid with respect to + * GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner + */ + public static GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner fromJson( + String jsonString) throws IOException { + return JSON.getGson() + .fromJson( + jsonString, + GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner.class); + } + + /** + * Convert an instance of GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner to an + * JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2Response.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2Response.java index 901cccfae..193aec15e 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2Response.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2Response.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** GetSummaryOfSubAccountsFuturesAccountV2Response */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSummaryOfSubAccountsFuturesAccountV2Response { public static final String SERIALIZED_NAME_FUTURE_ACCOUNT_SUMMARY_RESP = "futureAccountSummaryResp"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryResp.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryResp.java index f15150841..2b89da230 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryResp.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryResp.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryResp */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryResp { public static final String SERIALIZED_NAME_TOTAL_MARGIN_BALANCE_OF_B_T_C = "totalMarginBalanceOfBTC"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryRespSubAccountListInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryRespSubAccountListInner.java index 06cd7536c..acfe630be 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryRespSubAccountListInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryRespSubAccountListInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryRespSubAccountListInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryRespSubAccountListInner { public static final String SERIALIZED_NAME_EMAIL = "email"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp.java index 942f65382..28a839a21 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp { public static final String SERIALIZED_NAME_TOTAL_INITIAL_MARGIN = "totalInitialMargin"; @@ -96,9 +96,7 @@ public class GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummary @SerializedName(SERIALIZED_NAME_SUB_ACCOUNT_LIST) @jakarta.annotation.Nullable - private List< - @Valid - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner> + private List<@Valid GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner> subAccountList; public GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp() {} @@ -271,9 +269,7 @@ public void setAsset(@jakarta.annotation.Nullable String asset) { public GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp subAccountList( @jakarta.annotation.Nullable - List< - @Valid - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner> + List<@Valid GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner> subAccountList) { this.subAccountList = subAccountList; return this; @@ -281,7 +277,7 @@ public GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp s public GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp addSubAccountListItem( - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner + GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner subAccountListItem) { if (this.subAccountList == null) { this.subAccountList = new ArrayList<>(); @@ -297,18 +293,14 @@ public GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp s */ @jakarta.annotation.Nullable @Valid - public List< - @Valid - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner> + public List<@Valid GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner> getSubAccountList() { return subAccountList; } public void setSubAccountList( @jakarta.annotation.Nullable - List< - @Valid - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner> + List<@Valid GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner> subAccountList) { this.subAccountList = subAccountList; } @@ -615,7 +607,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `subAccountList` (array) for (int i = 0; i < jsonArraysubAccountList.size(); i++) { - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner + GetSummaryOfSubAccountsFuturesAccountResponseSubAccountListInner .validateJsonElement(jsonArraysubAccountList.get(i)); } ; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner.java deleted file mode 100644 index 4b4a0f57c..000000000 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner.java +++ /dev/null @@ -1,667 +0,0 @@ -/* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.sub_account.rest.model; - -import com.binance.connector.client.sub_account.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public -class GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner { - public static final String SERIALIZED_NAME_EMAIL = "email"; - - @SerializedName(SERIALIZED_NAME_EMAIL) - @jakarta.annotation.Nullable - private String email; - - public static final String SERIALIZED_NAME_TOTAL_INITIAL_MARGIN = "totalInitialMargin"; - - @SerializedName(SERIALIZED_NAME_TOTAL_INITIAL_MARGIN) - @jakarta.annotation.Nullable - private String totalInitialMargin; - - public static final String SERIALIZED_NAME_TOTAL_MAINTENANCE_MARGIN = "totalMaintenanceMargin"; - - @SerializedName(SERIALIZED_NAME_TOTAL_MAINTENANCE_MARGIN) - @jakarta.annotation.Nullable - private String totalMaintenanceMargin; - - public static final String SERIALIZED_NAME_TOTAL_MARGIN_BALANCE = "totalMarginBalance"; - - @SerializedName(SERIALIZED_NAME_TOTAL_MARGIN_BALANCE) - @jakarta.annotation.Nullable - private String totalMarginBalance; - - public static final String SERIALIZED_NAME_TOTAL_OPEN_ORDER_INITIAL_MARGIN = - "totalOpenOrderInitialMargin"; - - @SerializedName(SERIALIZED_NAME_TOTAL_OPEN_ORDER_INITIAL_MARGIN) - @jakarta.annotation.Nullable - private String totalOpenOrderInitialMargin; - - public static final String SERIALIZED_NAME_TOTAL_POSITION_INITIAL_MARGIN = - "totalPositionInitialMargin"; - - @SerializedName(SERIALIZED_NAME_TOTAL_POSITION_INITIAL_MARGIN) - @jakarta.annotation.Nullable - private String totalPositionInitialMargin; - - public static final String SERIALIZED_NAME_TOTAL_UNREALIZED_PROFIT = "totalUnrealizedProfit"; - - @SerializedName(SERIALIZED_NAME_TOTAL_UNREALIZED_PROFIT) - @jakarta.annotation.Nullable - private String totalUnrealizedProfit; - - public static final String SERIALIZED_NAME_TOTAL_WALLET_BALANCE = "totalWalletBalance"; - - @SerializedName(SERIALIZED_NAME_TOTAL_WALLET_BALANCE) - @jakarta.annotation.Nullable - private String totalWalletBalance; - - public static final String SERIALIZED_NAME_ASSET = "asset"; - - @SerializedName(SERIALIZED_NAME_ASSET) - @jakarta.annotation.Nullable - private String asset; - - public - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner() {} - - public - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - email(@jakarta.annotation.Nullable String email) { - this.email = email; - return this; - } - - /** - * Get email - * - * @return email - */ - @jakarta.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(@jakarta.annotation.Nullable String email) { - this.email = email; - } - - public - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - totalInitialMargin(@jakarta.annotation.Nullable String totalInitialMargin) { - this.totalInitialMargin = totalInitialMargin; - return this; - } - - /** - * Get totalInitialMargin - * - * @return totalInitialMargin - */ - @jakarta.annotation.Nullable - public String getTotalInitialMargin() { - return totalInitialMargin; - } - - public void setTotalInitialMargin(@jakarta.annotation.Nullable String totalInitialMargin) { - this.totalInitialMargin = totalInitialMargin; - } - - public - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - totalMaintenanceMargin(@jakarta.annotation.Nullable String totalMaintenanceMargin) { - this.totalMaintenanceMargin = totalMaintenanceMargin; - return this; - } - - /** - * Get totalMaintenanceMargin - * - * @return totalMaintenanceMargin - */ - @jakarta.annotation.Nullable - public String getTotalMaintenanceMargin() { - return totalMaintenanceMargin; - } - - public void setTotalMaintenanceMargin( - @jakarta.annotation.Nullable String totalMaintenanceMargin) { - this.totalMaintenanceMargin = totalMaintenanceMargin; - } - - public - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - totalMarginBalance(@jakarta.annotation.Nullable String totalMarginBalance) { - this.totalMarginBalance = totalMarginBalance; - return this; - } - - /** - * Get totalMarginBalance - * - * @return totalMarginBalance - */ - @jakarta.annotation.Nullable - public String getTotalMarginBalance() { - return totalMarginBalance; - } - - public void setTotalMarginBalance(@jakarta.annotation.Nullable String totalMarginBalance) { - this.totalMarginBalance = totalMarginBalance; - } - - public - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - totalOpenOrderInitialMargin( - @jakarta.annotation.Nullable String totalOpenOrderInitialMargin) { - this.totalOpenOrderInitialMargin = totalOpenOrderInitialMargin; - return this; - } - - /** - * Get totalOpenOrderInitialMargin - * - * @return totalOpenOrderInitialMargin - */ - @jakarta.annotation.Nullable - public String getTotalOpenOrderInitialMargin() { - return totalOpenOrderInitialMargin; - } - - public void setTotalOpenOrderInitialMargin( - @jakarta.annotation.Nullable String totalOpenOrderInitialMargin) { - this.totalOpenOrderInitialMargin = totalOpenOrderInitialMargin; - } - - public - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - totalPositionInitialMargin( - @jakarta.annotation.Nullable String totalPositionInitialMargin) { - this.totalPositionInitialMargin = totalPositionInitialMargin; - return this; - } - - /** - * Get totalPositionInitialMargin - * - * @return totalPositionInitialMargin - */ - @jakarta.annotation.Nullable - public String getTotalPositionInitialMargin() { - return totalPositionInitialMargin; - } - - public void setTotalPositionInitialMargin( - @jakarta.annotation.Nullable String totalPositionInitialMargin) { - this.totalPositionInitialMargin = totalPositionInitialMargin; - } - - public - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - totalUnrealizedProfit(@jakarta.annotation.Nullable String totalUnrealizedProfit) { - this.totalUnrealizedProfit = totalUnrealizedProfit; - return this; - } - - /** - * Get totalUnrealizedProfit - * - * @return totalUnrealizedProfit - */ - @jakarta.annotation.Nullable - public String getTotalUnrealizedProfit() { - return totalUnrealizedProfit; - } - - public void setTotalUnrealizedProfit( - @jakarta.annotation.Nullable String totalUnrealizedProfit) { - this.totalUnrealizedProfit = totalUnrealizedProfit; - } - - public - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - totalWalletBalance(@jakarta.annotation.Nullable String totalWalletBalance) { - this.totalWalletBalance = totalWalletBalance; - return this; - } - - /** - * Get totalWalletBalance - * - * @return totalWalletBalance - */ - @jakarta.annotation.Nullable - public String getTotalWalletBalance() { - return totalWalletBalance; - } - - public void setTotalWalletBalance(@jakarta.annotation.Nullable String totalWalletBalance) { - this.totalWalletBalance = totalWalletBalance; - } - - public - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - asset(@jakarta.annotation.Nullable String asset) { - this.asset = asset; - return this; - } - - /** - * Get asset - * - * @return asset - */ - @jakarta.annotation.Nullable - public String getAsset() { - return asset; - } - - public void setAsset(@jakarta.annotation.Nullable String asset) { - this.asset = asset; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - getSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner = - (GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner) - o; - return Objects.equals( - this.email, - getSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - .email) - && Objects.equals( - this.totalInitialMargin, - getSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - .totalInitialMargin) - && Objects.equals( - this.totalMaintenanceMargin, - getSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - .totalMaintenanceMargin) - && Objects.equals( - this.totalMarginBalance, - getSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - .totalMarginBalance) - && Objects.equals( - this.totalOpenOrderInitialMargin, - getSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - .totalOpenOrderInitialMargin) - && Objects.equals( - this.totalPositionInitialMargin, - getSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - .totalPositionInitialMargin) - && Objects.equals( - this.totalUnrealizedProfit, - getSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - .totalUnrealizedProfit) - && Objects.equals( - this.totalWalletBalance, - getSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - .totalWalletBalance) - && Objects.equals( - this.asset, - getSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - .asset); - } - - @Override - public int hashCode() { - return Objects.hash( - email, - totalInitialMargin, - totalMaintenanceMargin, - totalMarginBalance, - totalOpenOrderInitialMargin, - totalPositionInitialMargin, - totalUnrealizedProfit, - totalWalletBalance, - asset); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append( - "class" - + " GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner" - + " {\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" totalInitialMargin: ") - .append(toIndentedString(totalInitialMargin)) - .append("\n"); - sb.append(" totalMaintenanceMargin: ") - .append(toIndentedString(totalMaintenanceMargin)) - .append("\n"); - sb.append(" totalMarginBalance: ") - .append(toIndentedString(totalMarginBalance)) - .append("\n"); - sb.append(" totalOpenOrderInitialMargin: ") - .append(toIndentedString(totalOpenOrderInitialMargin)) - .append("\n"); - sb.append(" totalPositionInitialMargin: ") - .append(toIndentedString(totalPositionInitialMargin)) - .append("\n"); - sb.append(" totalUnrealizedProfit: ") - .append(toIndentedString(totalUnrealizedProfit)) - .append("\n"); - sb.append(" totalWalletBalance: ") - .append(toIndentedString(totalWalletBalance)) - .append("\n"); - sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object emailValue = getEmail(); - String emailValueAsString = ""; - emailValueAsString = emailValue.toString(); - sb.append("email=").append(urlEncode(emailValueAsString)).append(""); - Object totalInitialMarginValue = getTotalInitialMargin(); - String totalInitialMarginValueAsString = ""; - totalInitialMarginValueAsString = totalInitialMarginValue.toString(); - sb.append("totalInitialMargin=") - .append(urlEncode(totalInitialMarginValueAsString)) - .append(""); - Object totalMaintenanceMarginValue = getTotalMaintenanceMargin(); - String totalMaintenanceMarginValueAsString = ""; - totalMaintenanceMarginValueAsString = totalMaintenanceMarginValue.toString(); - sb.append("totalMaintenanceMargin=") - .append(urlEncode(totalMaintenanceMarginValueAsString)) - .append(""); - Object totalMarginBalanceValue = getTotalMarginBalance(); - String totalMarginBalanceValueAsString = ""; - totalMarginBalanceValueAsString = totalMarginBalanceValue.toString(); - sb.append("totalMarginBalance=") - .append(urlEncode(totalMarginBalanceValueAsString)) - .append(""); - Object totalOpenOrderInitialMarginValue = getTotalOpenOrderInitialMargin(); - String totalOpenOrderInitialMarginValueAsString = ""; - totalOpenOrderInitialMarginValueAsString = totalOpenOrderInitialMarginValue.toString(); - sb.append("totalOpenOrderInitialMargin=") - .append(urlEncode(totalOpenOrderInitialMarginValueAsString)) - .append(""); - Object totalPositionInitialMarginValue = getTotalPositionInitialMargin(); - String totalPositionInitialMarginValueAsString = ""; - totalPositionInitialMarginValueAsString = totalPositionInitialMarginValue.toString(); - sb.append("totalPositionInitialMargin=") - .append(urlEncode(totalPositionInitialMarginValueAsString)) - .append(""); - Object totalUnrealizedProfitValue = getTotalUnrealizedProfit(); - String totalUnrealizedProfitValueAsString = ""; - totalUnrealizedProfitValueAsString = totalUnrealizedProfitValue.toString(); - sb.append("totalUnrealizedProfit=") - .append(urlEncode(totalUnrealizedProfitValueAsString)) - .append(""); - Object totalWalletBalanceValue = getTotalWalletBalance(); - String totalWalletBalanceValueAsString = ""; - totalWalletBalanceValueAsString = totalWalletBalanceValue.toString(); - sb.append("totalWalletBalance=") - .append(urlEncode(totalWalletBalanceValueAsString)) - .append(""); - Object assetValue = getAsset(); - String assetValueAsString = ""; - assetValueAsString = assetValue.toString(); - sb.append("asset=").append(urlEncode(assetValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("email"); - openapiFields.add("totalInitialMargin"); - openapiFields.add("totalMaintenanceMargin"); - openapiFields.add("totalMarginBalance"); - openapiFields.add("totalOpenOrderInitialMargin"); - openapiFields.add("totalPositionInitialMargin"); - openapiFields.add("totalUnrealizedProfit"); - openapiFields.add("totalWalletBalance"); - openapiFields.add("asset"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - .openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner" - + " is not found in the empty JSON string", - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - .openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) - && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `email` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("email").toString())); - } - if ((jsonObj.get("totalInitialMargin") != null - && !jsonObj.get("totalInitialMargin").isJsonNull()) - && !jsonObj.get("totalInitialMargin").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `totalInitialMargin` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("totalInitialMargin").toString())); - } - if ((jsonObj.get("totalMaintenanceMargin") != null - && !jsonObj.get("totalMaintenanceMargin").isJsonNull()) - && !jsonObj.get("totalMaintenanceMargin").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `totalMaintenanceMargin` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("totalMaintenanceMargin").toString())); - } - if ((jsonObj.get("totalMarginBalance") != null - && !jsonObj.get("totalMarginBalance").isJsonNull()) - && !jsonObj.get("totalMarginBalance").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `totalMarginBalance` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("totalMarginBalance").toString())); - } - if ((jsonObj.get("totalOpenOrderInitialMargin") != null - && !jsonObj.get("totalOpenOrderInitialMargin").isJsonNull()) - && !jsonObj.get("totalOpenOrderInitialMargin").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `totalOpenOrderInitialMargin` to be a primitive" - + " type in the JSON string but got `%s`", - jsonObj.get("totalOpenOrderInitialMargin").toString())); - } - if ((jsonObj.get("totalPositionInitialMargin") != null - && !jsonObj.get("totalPositionInitialMargin").isJsonNull()) - && !jsonObj.get("totalPositionInitialMargin").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `totalPositionInitialMargin` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("totalPositionInitialMargin").toString())); - } - if ((jsonObj.get("totalUnrealizedProfit") != null - && !jsonObj.get("totalUnrealizedProfit").isJsonNull()) - && !jsonObj.get("totalUnrealizedProfit").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `totalUnrealizedProfit` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("totalUnrealizedProfit").toString())); - } - if ((jsonObj.get("totalWalletBalance") != null - && !jsonObj.get("totalWalletBalance").isJsonNull()) - && !jsonObj.get("totalWalletBalance").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `totalWalletBalance` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("totalWalletBalance").toString())); - } - if ((jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) - && !jsonObj.get("asset").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `asset` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("asset").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - .class - .isAssignableFrom(type.getRawType())) { - return null; // this class only serializes - // 'GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter< - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner> - thisAdapter = - gson.getDelegateAdapter( - this, - TypeToken.get( - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - .class)); - - return (TypeAdapter) - new TypeAdapter< - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner>() { - @Override - public void write( - JsonWriter out, - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of - * GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - * given an JSON string - * - * @param jsonString JSON string - * @return An instance of - * GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - * @throws IOException if the JSON string is invalid with respect to - * GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - */ - public static - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - fromJson(String jsonString) throws IOException { - return JSON.getGson() - .fromJson( - jsonString, - GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner - .class); - } - - /** - * Convert an instance of - * GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner to - * an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsMarginAccountResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsMarginAccountResponse.java index 00266edc9..566bb2a25 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsMarginAccountResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsMarginAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetSummaryOfSubAccountsMarginAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSummaryOfSubAccountsMarginAccountResponse { public static final String SERIALIZED_NAME_TOTAL_ASSET_OF_BTC = "totalAssetOfBtc"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsMarginAccountResponseSubAccountListInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsMarginAccountResponseSubAccountListInner.java index 3d28ed8e4..9cb864408 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsMarginAccountResponseSubAccountListInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/GetSummaryOfSubAccountsMarginAccountResponseSubAccountListInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSummaryOfSubAccountsMarginAccountResponseSubAccountListInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSummaryOfSubAccountsMarginAccountResponseSubAccountListInner { public static final String SERIALIZED_NAME_EMAIL = "email"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MarginTransferForSubAccountRequest.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MarginTransferForSubAccountRequest.java index f7ea1ff3b..ca7c7d7cb 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MarginTransferForSubAccountRequest.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MarginTransferForSubAccountRequest.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** MarginTransferForSubAccountRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginTransferForSubAccountRequest { public static final String SERIALIZED_NAME_EMAIL = "email"; @@ -95,7 +95,7 @@ public MarginTransferForSubAccountRequest asset(@jakarta.annotation.Nonnull Stri } /** - * Get asset + * The asset being transferred * * @return asset */ @@ -115,7 +115,7 @@ public MarginTransferForSubAccountRequest amount(@jakarta.annotation.Nonnull Dou } /** - * Get amount + * The amount to be transferred * * @return amount */ @@ -136,7 +136,8 @@ public MarginTransferForSubAccountRequest type(@jakarta.annotation.Nonnull Long } /** - * Get type + * 1: transfer from subaccount's spot account to margin account 2: transfer from + * subaccount's margin account to its spot account * * @return type */ @@ -157,11 +158,12 @@ public MarginTransferForSubAccountRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MarginTransferForSubAccountResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MarginTransferForSubAccountResponse.java index b6bb6a5f1..ce245825f 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MarginTransferForSubAccountResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MarginTransferForSubAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MarginTransferForSubAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MarginTransferForSubAccountResponse { public static final String SERIALIZED_NAME_TXN_ID = "txnId"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/ModifySubAccountApiKeyPermissionRequest.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/ModifySubAccountApiKeyPermissionRequest.java new file mode 100644 index 000000000..7750c4b6b --- /dev/null +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/ModifySubAccountApiKeyPermissionRequest.java @@ -0,0 +1,502 @@ +/* + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.sub_account.rest.model; + +import com.binance.connector.client.sub_account.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** ModifySubAccountApiKeyPermissionRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ModifySubAccountApiKeyPermissionRequest { + public static final String SERIALIZED_NAME_EMAIL = "email"; + + @SerializedName(SERIALIZED_NAME_EMAIL) + @jakarta.annotation.Nonnull + private String email; + + public static final String SERIALIZED_NAME_SUB_ACCOUNT_API_KEY = "subAccountApiKey"; + + @SerializedName(SERIALIZED_NAME_SUB_ACCOUNT_API_KEY) + @jakarta.annotation.Nonnull + private String subAccountApiKey; + + public static final String SERIALIZED_NAME_CAN_TRADE = "canTrade"; + + @SerializedName(SERIALIZED_NAME_CAN_TRADE) + @jakarta.annotation.Nullable + private Boolean canTrade; + + public static final String SERIALIZED_NAME_CAN_MARGIN_LOAN_REPAY = "canMarginLoanRepay"; + + @SerializedName(SERIALIZED_NAME_CAN_MARGIN_LOAN_REPAY) + @jakarta.annotation.Nullable + private Boolean canMarginLoanRepay; + + public static final String SERIALIZED_NAME_CAN_FUTURES_TRADE = "canFuturesTrade"; + + @SerializedName(SERIALIZED_NAME_CAN_FUTURES_TRADE) + @jakarta.annotation.Nullable + private Boolean canFuturesTrade; + + public static final String SERIALIZED_NAME_CAN_UNIVERSAL_TRANSFER = "canUniversalTransfer"; + + @SerializedName(SERIALIZED_NAME_CAN_UNIVERSAL_TRANSFER) + @jakarta.annotation.Nullable + private Boolean canUniversalTransfer; + + public static final String SERIALIZED_NAME_CAN_VANILLA_OPTIONS = "canVanillaOptions"; + + @SerializedName(SERIALIZED_NAME_CAN_VANILLA_OPTIONS) + @jakarta.annotation.Nullable + private Boolean canVanillaOptions; + + public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; + + @SerializedName(SERIALIZED_NAME_RECV_WINDOW) + @jakarta.annotation.Nullable + private Long recvWindow; + + public ModifySubAccountApiKeyPermissionRequest() {} + + public ModifySubAccountApiKeyPermissionRequest email(@jakarta.annotation.Nonnull String email) { + this.email = email; + return this; + } + + /** + * Sub-account email + * + * @return email + */ + @jakarta.annotation.Nonnull + @NotNull + public String getEmail() { + return email; + } + + public void setEmail(@jakarta.annotation.Nonnull String email) { + this.email = email; + } + + public ModifySubAccountApiKeyPermissionRequest subAccountApiKey( + @jakarta.annotation.Nonnull String subAccountApiKey) { + this.subAccountApiKey = subAccountApiKey; + return this; + } + + /** + * Sub-account API Key + * + * @return subAccountApiKey + */ + @jakarta.annotation.Nonnull + @NotNull + public String getSubAccountApiKey() { + return subAccountApiKey; + } + + public void setSubAccountApiKey(@jakarta.annotation.Nonnull String subAccountApiKey) { + this.subAccountApiKey = subAccountApiKey; + } + + public ModifySubAccountApiKeyPermissionRequest canTrade( + @jakarta.annotation.Nullable Boolean canTrade) { + this.canTrade = canTrade; + return this; + } + + /** + * Spot & Margin trading permission + * + * @return canTrade + */ + @jakarta.annotation.Nullable + public Boolean getCanTrade() { + return canTrade; + } + + public void setCanTrade(@jakarta.annotation.Nullable Boolean canTrade) { + this.canTrade = canTrade; + } + + public ModifySubAccountApiKeyPermissionRequest canMarginLoanRepay( + @jakarta.annotation.Nullable Boolean canMarginLoanRepay) { + this.canMarginLoanRepay = canMarginLoanRepay; + return this; + } + + /** + * Margin borrow/repay permission + * + * @return canMarginLoanRepay + */ + @jakarta.annotation.Nullable + public Boolean getCanMarginLoanRepay() { + return canMarginLoanRepay; + } + + public void setCanMarginLoanRepay(@jakarta.annotation.Nullable Boolean canMarginLoanRepay) { + this.canMarginLoanRepay = canMarginLoanRepay; + } + + public ModifySubAccountApiKeyPermissionRequest canFuturesTrade( + @jakarta.annotation.Nullable Boolean canFuturesTrade) { + this.canFuturesTrade = canFuturesTrade; + return this; + } + + /** + * Futures trading permission + * + * @return canFuturesTrade + */ + @jakarta.annotation.Nullable + public Boolean getCanFuturesTrade() { + return canFuturesTrade; + } + + public void setCanFuturesTrade(@jakarta.annotation.Nullable Boolean canFuturesTrade) { + this.canFuturesTrade = canFuturesTrade; + } + + public ModifySubAccountApiKeyPermissionRequest canUniversalTransfer( + @jakarta.annotation.Nullable Boolean canUniversalTransfer) { + this.canUniversalTransfer = canUniversalTransfer; + return this; + } + + /** + * Universal transfer permission + * + * @return canUniversalTransfer + */ + @jakarta.annotation.Nullable + public Boolean getCanUniversalTransfer() { + return canUniversalTransfer; + } + + public void setCanUniversalTransfer(@jakarta.annotation.Nullable Boolean canUniversalTransfer) { + this.canUniversalTransfer = canUniversalTransfer; + } + + public ModifySubAccountApiKeyPermissionRequest canVanillaOptions( + @jakarta.annotation.Nullable Boolean canVanillaOptions) { + this.canVanillaOptions = canVanillaOptions; + return this; + } + + /** + * Vanilla options permission + * + * @return canVanillaOptions + */ + @jakarta.annotation.Nullable + public Boolean getCanVanillaOptions() { + return canVanillaOptions; + } + + public void setCanVanillaOptions(@jakarta.annotation.Nullable Boolean canVanillaOptions) { + this.canVanillaOptions = canVanillaOptions; + } + + public ModifySubAccountApiKeyPermissionRequest recvWindow( + @jakarta.annotation.Nullable Long recvWindow) { + this.recvWindow = recvWindow; + return this; + } + + /** + * Get recvWindow maximum: 60000 + * + * @return recvWindow + */ + @jakarta.annotation.Nullable + @Max(60000L) + public Long getRecvWindow() { + return recvWindow; + } + + public void setRecvWindow(@jakarta.annotation.Nullable Long recvWindow) { + this.recvWindow = recvWindow; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModifySubAccountApiKeyPermissionRequest modifySubAccountApiKeyPermissionRequest = + (ModifySubAccountApiKeyPermissionRequest) o; + return Objects.equals(this.email, modifySubAccountApiKeyPermissionRequest.email) + && Objects.equals( + this.subAccountApiKey, + modifySubAccountApiKeyPermissionRequest.subAccountApiKey) + && Objects.equals(this.canTrade, modifySubAccountApiKeyPermissionRequest.canTrade) + && Objects.equals( + this.canMarginLoanRepay, + modifySubAccountApiKeyPermissionRequest.canMarginLoanRepay) + && Objects.equals( + this.canFuturesTrade, + modifySubAccountApiKeyPermissionRequest.canFuturesTrade) + && Objects.equals( + this.canUniversalTransfer, + modifySubAccountApiKeyPermissionRequest.canUniversalTransfer) + && Objects.equals( + this.canVanillaOptions, + modifySubAccountApiKeyPermissionRequest.canVanillaOptions) + && Objects.equals( + this.recvWindow, modifySubAccountApiKeyPermissionRequest.recvWindow); + } + + @Override + public int hashCode() { + return Objects.hash( + email, + subAccountApiKey, + canTrade, + canMarginLoanRepay, + canFuturesTrade, + canUniversalTransfer, + canVanillaOptions, + recvWindow); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModifySubAccountApiKeyPermissionRequest {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" subAccountApiKey: ").append(toIndentedString(subAccountApiKey)).append("\n"); + sb.append(" canTrade: ").append(toIndentedString(canTrade)).append("\n"); + sb.append(" canMarginLoanRepay: ") + .append(toIndentedString(canMarginLoanRepay)) + .append("\n"); + sb.append(" canFuturesTrade: ").append(toIndentedString(canFuturesTrade)).append("\n"); + sb.append(" canUniversalTransfer: ") + .append(toIndentedString(canUniversalTransfer)) + .append("\n"); + sb.append(" canVanillaOptions: ").append(toIndentedString(canVanillaOptions)).append("\n"); + sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object emailValue = getEmail(); + String emailValueAsString = ""; + emailValueAsString = emailValue.toString(); + sb.append("email=").append(urlEncode(emailValueAsString)).append(""); + Object subAccountApiKeyValue = getSubAccountApiKey(); + String subAccountApiKeyValueAsString = ""; + subAccountApiKeyValueAsString = subAccountApiKeyValue.toString(); + sb.append("subAccountApiKey=").append(urlEncode(subAccountApiKeyValueAsString)).append(""); + Object canTradeValue = getCanTrade(); + String canTradeValueAsString = ""; + canTradeValueAsString = canTradeValue.toString(); + sb.append("canTrade=").append(urlEncode(canTradeValueAsString)).append(""); + Object canMarginLoanRepayValue = getCanMarginLoanRepay(); + String canMarginLoanRepayValueAsString = ""; + canMarginLoanRepayValueAsString = canMarginLoanRepayValue.toString(); + sb.append("canMarginLoanRepay=") + .append(urlEncode(canMarginLoanRepayValueAsString)) + .append(""); + Object canFuturesTradeValue = getCanFuturesTrade(); + String canFuturesTradeValueAsString = ""; + canFuturesTradeValueAsString = canFuturesTradeValue.toString(); + sb.append("canFuturesTrade=").append(urlEncode(canFuturesTradeValueAsString)).append(""); + Object canUniversalTransferValue = getCanUniversalTransfer(); + String canUniversalTransferValueAsString = ""; + canUniversalTransferValueAsString = canUniversalTransferValue.toString(); + sb.append("canUniversalTransfer=") + .append(urlEncode(canUniversalTransferValueAsString)) + .append(""); + Object canVanillaOptionsValue = getCanVanillaOptions(); + String canVanillaOptionsValueAsString = ""; + canVanillaOptionsValueAsString = canVanillaOptionsValue.toString(); + sb.append("canVanillaOptions=") + .append(urlEncode(canVanillaOptionsValueAsString)) + .append(""); + Object recvWindowValue = getRecvWindow(); + String recvWindowValueAsString = ""; + recvWindowValueAsString = recvWindowValue.toString(); + sb.append("recvWindow=").append(urlEncode(recvWindowValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("email"); + openapiFields.add("subAccountApiKey"); + openapiFields.add("canTrade"); + openapiFields.add("canMarginLoanRepay"); + openapiFields.add("canFuturesTrade"); + openapiFields.add("canUniversalTransfer"); + openapiFields.add("canVanillaOptions"); + openapiFields.add("recvWindow"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("email"); + openapiRequiredFields.add("subAccountApiKey"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ModifySubAccountApiKeyPermissionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ModifySubAccountApiKeyPermissionRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " ModifySubAccountApiKeyPermissionRequest is not found in the" + + " empty JSON string", + ModifySubAccountApiKeyPermissionRequest.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ModifySubAccountApiKeyPermissionRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `email` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("email").toString())); + } + if (!jsonObj.get("subAccountApiKey").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `subAccountApiKey` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("subAccountApiKey").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ModifySubAccountApiKeyPermissionRequest.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes 'ModifySubAccountApiKeyPermissionRequest' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ModifySubAccountApiKeyPermissionRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, ModifySubAccountApiKeyPermissionRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ModifySubAccountApiKeyPermissionRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ModifySubAccountApiKeyPermissionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ModifySubAccountApiKeyPermissionRequest + * @throws IOException if the JSON string is invalid with respect to + * ModifySubAccountApiKeyPermissionRequest + */ + public static ModifySubAccountApiKeyPermissionRequest fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, ModifySubAccountApiKeyPermissionRequest.class); + } + + /** + * Convert an instance of ModifySubAccountApiKeyPermissionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/ModifySubAccountApiKeyPermissionResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/ModifySubAccountApiKeyPermissionResponse.java new file mode 100644 index 000000000..992d5c16b --- /dev/null +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/ModifySubAccountApiKeyPermissionResponse.java @@ -0,0 +1,488 @@ +/* + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.sub_account.rest.model; + +import com.binance.connector.client.sub_account.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** ModifySubAccountApiKeyPermissionResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ModifySubAccountApiKeyPermissionResponse { + public static final String SERIALIZED_NAME_API_NAME = "apiName"; + + @SerializedName(SERIALIZED_NAME_API_NAME) + @jakarta.annotation.Nullable + private String apiName; + + public static final String SERIALIZED_NAME_APIKEY = "apikey"; + + @SerializedName(SERIALIZED_NAME_APIKEY) + @jakarta.annotation.Nullable + private String apikey; + + public static final String SERIALIZED_NAME_CAN_TRADE = "canTrade"; + + @SerializedName(SERIALIZED_NAME_CAN_TRADE) + @jakarta.annotation.Nullable + private Boolean canTrade; + + public static final String SERIALIZED_NAME_CAN_MARGIN_LOAN_REPAY = "canMarginLoanRepay"; + + @SerializedName(SERIALIZED_NAME_CAN_MARGIN_LOAN_REPAY) + @jakarta.annotation.Nullable + private Boolean canMarginLoanRepay; + + public static final String SERIALIZED_NAME_CAN_FUTURES_TRADE = "canFuturesTrade"; + + @SerializedName(SERIALIZED_NAME_CAN_FUTURES_TRADE) + @jakarta.annotation.Nullable + private Boolean canFuturesTrade; + + public static final String SERIALIZED_NAME_CAN_UNIVERSAL_TRANSFER = "canUniversalTransfer"; + + @SerializedName(SERIALIZED_NAME_CAN_UNIVERSAL_TRANSFER) + @jakarta.annotation.Nullable + private Boolean canUniversalTransfer; + + public static final String SERIALIZED_NAME_CAN_VANILLA_OPTIONS = "canVanillaOptions"; + + @SerializedName(SERIALIZED_NAME_CAN_VANILLA_OPTIONS) + @jakarta.annotation.Nullable + private Boolean canVanillaOptions; + + public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; + + @SerializedName(SERIALIZED_NAME_TIMESTAMP) + @jakarta.annotation.Nullable + private Long timestamp; + + public ModifySubAccountApiKeyPermissionResponse() {} + + public ModifySubAccountApiKeyPermissionResponse apiName( + @jakarta.annotation.Nullable String apiName) { + this.apiName = apiName; + return this; + } + + /** + * Get apiName + * + * @return apiName + */ + @jakarta.annotation.Nullable + public String getApiName() { + return apiName; + } + + public void setApiName(@jakarta.annotation.Nullable String apiName) { + this.apiName = apiName; + } + + public ModifySubAccountApiKeyPermissionResponse apikey( + @jakarta.annotation.Nullable String apikey) { + this.apikey = apikey; + return this; + } + + /** + * Get apikey + * + * @return apikey + */ + @jakarta.annotation.Nullable + public String getApikey() { + return apikey; + } + + public void setApikey(@jakarta.annotation.Nullable String apikey) { + this.apikey = apikey; + } + + public ModifySubAccountApiKeyPermissionResponse canTrade( + @jakarta.annotation.Nullable Boolean canTrade) { + this.canTrade = canTrade; + return this; + } + + /** + * Get canTrade + * + * @return canTrade + */ + @jakarta.annotation.Nullable + public Boolean getCanTrade() { + return canTrade; + } + + public void setCanTrade(@jakarta.annotation.Nullable Boolean canTrade) { + this.canTrade = canTrade; + } + + public ModifySubAccountApiKeyPermissionResponse canMarginLoanRepay( + @jakarta.annotation.Nullable Boolean canMarginLoanRepay) { + this.canMarginLoanRepay = canMarginLoanRepay; + return this; + } + + /** + * Get canMarginLoanRepay + * + * @return canMarginLoanRepay + */ + @jakarta.annotation.Nullable + public Boolean getCanMarginLoanRepay() { + return canMarginLoanRepay; + } + + public void setCanMarginLoanRepay(@jakarta.annotation.Nullable Boolean canMarginLoanRepay) { + this.canMarginLoanRepay = canMarginLoanRepay; + } + + public ModifySubAccountApiKeyPermissionResponse canFuturesTrade( + @jakarta.annotation.Nullable Boolean canFuturesTrade) { + this.canFuturesTrade = canFuturesTrade; + return this; + } + + /** + * Get canFuturesTrade + * + * @return canFuturesTrade + */ + @jakarta.annotation.Nullable + public Boolean getCanFuturesTrade() { + return canFuturesTrade; + } + + public void setCanFuturesTrade(@jakarta.annotation.Nullable Boolean canFuturesTrade) { + this.canFuturesTrade = canFuturesTrade; + } + + public ModifySubAccountApiKeyPermissionResponse canUniversalTransfer( + @jakarta.annotation.Nullable Boolean canUniversalTransfer) { + this.canUniversalTransfer = canUniversalTransfer; + return this; + } + + /** + * Get canUniversalTransfer + * + * @return canUniversalTransfer + */ + @jakarta.annotation.Nullable + public Boolean getCanUniversalTransfer() { + return canUniversalTransfer; + } + + public void setCanUniversalTransfer(@jakarta.annotation.Nullable Boolean canUniversalTransfer) { + this.canUniversalTransfer = canUniversalTransfer; + } + + public ModifySubAccountApiKeyPermissionResponse canVanillaOptions( + @jakarta.annotation.Nullable Boolean canVanillaOptions) { + this.canVanillaOptions = canVanillaOptions; + return this; + } + + /** + * Get canVanillaOptions + * + * @return canVanillaOptions + */ + @jakarta.annotation.Nullable + public Boolean getCanVanillaOptions() { + return canVanillaOptions; + } + + public void setCanVanillaOptions(@jakarta.annotation.Nullable Boolean canVanillaOptions) { + this.canVanillaOptions = canVanillaOptions; + } + + public ModifySubAccountApiKeyPermissionResponse timestamp( + @jakarta.annotation.Nullable Long timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get timestamp + * + * @return timestamp + */ + @jakarta.annotation.Nullable + public Long getTimestamp() { + return timestamp; + } + + public void setTimestamp(@jakarta.annotation.Nullable Long timestamp) { + this.timestamp = timestamp; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModifySubAccountApiKeyPermissionResponse modifySubAccountApiKeyPermissionResponse = + (ModifySubAccountApiKeyPermissionResponse) o; + return Objects.equals(this.apiName, modifySubAccountApiKeyPermissionResponse.apiName) + && Objects.equals(this.apikey, modifySubAccountApiKeyPermissionResponse.apikey) + && Objects.equals(this.canTrade, modifySubAccountApiKeyPermissionResponse.canTrade) + && Objects.equals( + this.canMarginLoanRepay, + modifySubAccountApiKeyPermissionResponse.canMarginLoanRepay) + && Objects.equals( + this.canFuturesTrade, + modifySubAccountApiKeyPermissionResponse.canFuturesTrade) + && Objects.equals( + this.canUniversalTransfer, + modifySubAccountApiKeyPermissionResponse.canUniversalTransfer) + && Objects.equals( + this.canVanillaOptions, + modifySubAccountApiKeyPermissionResponse.canVanillaOptions) + && Objects.equals( + this.timestamp, modifySubAccountApiKeyPermissionResponse.timestamp); + } + + @Override + public int hashCode() { + return Objects.hash( + apiName, + apikey, + canTrade, + canMarginLoanRepay, + canFuturesTrade, + canUniversalTransfer, + canVanillaOptions, + timestamp); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModifySubAccountApiKeyPermissionResponse {\n"); + sb.append(" apiName: ").append(toIndentedString(apiName)).append("\n"); + sb.append(" apikey: ").append(toIndentedString(apikey)).append("\n"); + sb.append(" canTrade: ").append(toIndentedString(canTrade)).append("\n"); + sb.append(" canMarginLoanRepay: ") + .append(toIndentedString(canMarginLoanRepay)) + .append("\n"); + sb.append(" canFuturesTrade: ").append(toIndentedString(canFuturesTrade)).append("\n"); + sb.append(" canUniversalTransfer: ") + .append(toIndentedString(canUniversalTransfer)) + .append("\n"); + sb.append(" canVanillaOptions: ").append(toIndentedString(canVanillaOptions)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object apiNameValue = getApiName(); + String apiNameValueAsString = ""; + apiNameValueAsString = apiNameValue.toString(); + sb.append("apiName=").append(urlEncode(apiNameValueAsString)).append(""); + Object apikeyValue = getApikey(); + String apikeyValueAsString = ""; + apikeyValueAsString = apikeyValue.toString(); + sb.append("apikey=").append(urlEncode(apikeyValueAsString)).append(""); + Object canTradeValue = getCanTrade(); + String canTradeValueAsString = ""; + canTradeValueAsString = canTradeValue.toString(); + sb.append("canTrade=").append(urlEncode(canTradeValueAsString)).append(""); + Object canMarginLoanRepayValue = getCanMarginLoanRepay(); + String canMarginLoanRepayValueAsString = ""; + canMarginLoanRepayValueAsString = canMarginLoanRepayValue.toString(); + sb.append("canMarginLoanRepay=") + .append(urlEncode(canMarginLoanRepayValueAsString)) + .append(""); + Object canFuturesTradeValue = getCanFuturesTrade(); + String canFuturesTradeValueAsString = ""; + canFuturesTradeValueAsString = canFuturesTradeValue.toString(); + sb.append("canFuturesTrade=").append(urlEncode(canFuturesTradeValueAsString)).append(""); + Object canUniversalTransferValue = getCanUniversalTransfer(); + String canUniversalTransferValueAsString = ""; + canUniversalTransferValueAsString = canUniversalTransferValue.toString(); + sb.append("canUniversalTransfer=") + .append(urlEncode(canUniversalTransferValueAsString)) + .append(""); + Object canVanillaOptionsValue = getCanVanillaOptions(); + String canVanillaOptionsValueAsString = ""; + canVanillaOptionsValueAsString = canVanillaOptionsValue.toString(); + sb.append("canVanillaOptions=") + .append(urlEncode(canVanillaOptionsValueAsString)) + .append(""); + Object timestampValue = getTimestamp(); + String timestampValueAsString = ""; + timestampValueAsString = timestampValue.toString(); + sb.append("timestamp=").append(urlEncode(timestampValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("apiName"); + openapiFields.add("apikey"); + openapiFields.add("canTrade"); + openapiFields.add("canMarginLoanRepay"); + openapiFields.add("canFuturesTrade"); + openapiFields.add("canUniversalTransfer"); + openapiFields.add("canVanillaOptions"); + openapiFields.add("timestamp"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ModifySubAccountApiKeyPermissionResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ModifySubAccountApiKeyPermissionResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " ModifySubAccountApiKeyPermissionResponse is not found in" + + " the empty JSON string", + ModifySubAccountApiKeyPermissionResponse.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("apiName") != null && !jsonObj.get("apiName").isJsonNull()) + && !jsonObj.get("apiName").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `apiName` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("apiName").toString())); + } + if ((jsonObj.get("apikey") != null && !jsonObj.get("apikey").isJsonNull()) + && !jsonObj.get("apikey").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `apikey` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("apikey").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ModifySubAccountApiKeyPermissionResponse.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'ModifySubAccountApiKeyPermissionResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ModifySubAccountApiKeyPermissionResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, ModifySubAccountApiKeyPermissionResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ModifySubAccountApiKeyPermissionResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ModifySubAccountApiKeyPermissionResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ModifySubAccountApiKeyPermissionResponse + * @throws IOException if the JSON string is invalid with respect to + * ModifySubAccountApiKeyPermissionResponse + */ + public static ModifySubAccountApiKeyPermissionResponse fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, ModifySubAccountApiKeyPermissionResponse.class); + } + + /** + * Convert an instance of ModifySubAccountApiKeyPermissionResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MovePositionForSubAccountRequest.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MovePositionForSubAccountRequest.java index 73a68971b..d582a6444 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MovePositionForSubAccountRequest.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MovePositionForSubAccountRequest.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** MovePositionForSubAccountRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MovePositionForSubAccountRequest { public static final String SERIALIZED_NAME_FROM_USER_EMAIL = "fromUserEmail"; @@ -53,7 +53,7 @@ public class MovePositionForSubAccountRequest { @SerializedName(SERIALIZED_NAME_PRODUCT_TYPE) @jakarta.annotation.Nonnull - private String productType; + private ProductType productType; public static final String SERIALIZED_NAME_ORDER_ARGS = "orderArgs"; @@ -112,7 +112,7 @@ public void setToUserEmail(@jakarta.annotation.Nonnull String toUserEmail) { } public MovePositionForSubAccountRequest productType( - @jakarta.annotation.Nonnull String productType) { + @jakarta.annotation.Nonnull ProductType productType) { this.productType = productType; return this; } @@ -124,11 +124,12 @@ public MovePositionForSubAccountRequest productType( */ @jakarta.annotation.Nonnull @NotNull - public String getProductType() { + @Valid + public ProductType getProductType() { return productType; } - public void setProductType(@jakarta.annotation.Nonnull String productType) { + public void setProductType(@jakarta.annotation.Nonnull ProductType productType) { this.productType = productType; } @@ -161,11 +162,12 @@ public MovePositionForSubAccountRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -317,13 +319,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("toUserEmail").toString())); } - if (!jsonObj.get("productType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `productType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("productType").toString())); - } + // validate the required field `productType` + ProductType.validateJsonElement(jsonObj.get("productType")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MovePositionForSubAccountResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MovePositionForSubAccountResponse.java index eca89d160..592364516 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MovePositionForSubAccountResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MovePositionForSubAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** MovePositionForSubAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MovePositionForSubAccountResponse { public static final String SERIALIZED_NAME_MOVE_POSITION_ORDERS = "movePositionOrders"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MovePositionForSubAccountResponseMovePositionOrdersInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MovePositionForSubAccountResponseMovePositionOrdersInner.java index bce657a95..bcabdfe57 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MovePositionForSubAccountResponseMovePositionOrdersInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/MovePositionForSubAccountResponseMovePositionOrdersInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** MovePositionForSubAccountResponseMovePositionOrdersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class MovePositionForSubAccountResponseMovePositionOrdersInner { public static final String SERIALIZED_NAME_FROM_USER_EMAIL = "fromUserEmail"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/OrderArgs.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/OrderArgs.java index a2bd7fa68..c74422316 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/OrderArgs.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/OrderArgs.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -31,10 +31,19 @@ import java.util.Objects; import org.hibernate.validator.constraints.*; -/** OrderArgs */ +/** + * Max 10 positions supported. When input request parameter,orderArgs.symbol should be STRING, + * orderArgs.quantity should be BIGDECIMAL, and orderArgs.positionSide should be STRING, + * positionSide support BOTH,LONG and SHORT. Each entry should be like + * orderArgs[0].symbol=BTCUSDT,orderArgs[0].quantity=0.001,orderArgs[0].positionSide=BOTH. + * Example of the request parameter array: orderArgs[0].symbol=BTCUSDT + * orderArgs[0].quantity=0.001 orderArgs[0].positionSide=BOTH + * orderArgs[1].symbol=ETHUSDT orderArgs[1].quantity=0.01 + * orderArgs[1].positionSide=BOTH + */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderArgs extends ArrayList { public OrderArgs() {} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/OrderArgsInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/OrderArgsInner.java index 3f5b18abc..75a710bc9 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/OrderArgsInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/OrderArgsInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** OrderArgsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OrderArgsInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/OrderType.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/OrderType.java new file mode 100644 index 000000000..917ab1d61 --- /dev/null +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/OrderType.java @@ -0,0 +1,75 @@ +/* + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.sub_account.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets orderType */ +@JsonAdapter(OrderType.Adapter.class) +public enum OrderType { + SPOT("SPOT"), + + MARGIN("MARGIN"), + + FUTURES("FUTURES"); + + private String value; + + OrderType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderType fromValue(String value) { + for (OrderType b : OrderType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderType.fromValue(value); + } +} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/ProductType.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/ProductType.java new file mode 100644 index 000000000..1e04ac022 --- /dev/null +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/ProductType.java @@ -0,0 +1,71 @@ +/* + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.sub_account.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets productType */ +@JsonAdapter(ProductType.Adapter.class) +public enum ProductType { + UM("UM"); + + private String value; + + ProductType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ProductType fromValue(String value) { + for (ProductType b : ProductType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ProductType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ProductType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ProductType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ProductType.fromValue(value); + } +} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountAssetDetailsResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountAssetDetailsResponse.java index 494d8598c..2e6ec7ac9 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountAssetDetailsResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountAssetDetailsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryManagedSubAccountAssetDetailsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountAssetDetailsResponse extends ArrayList { public QueryManagedSubAccountAssetDetailsResponse() {} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountAssetDetailsResponseInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountAssetDetailsResponseInner.java index 8e9cc5b61..f971bb783 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountAssetDetailsResponseInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountAssetDetailsResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryManagedSubAccountAssetDetailsResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountAssetDetailsResponseInner { public static final String SERIALIZED_NAME_COIN = "coin"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponse.java index 3c04296ff..47b09b797 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryManagedSubAccountFuturesAssetDetailsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountFuturesAssetDetailsResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInner.java index 55a5542f6..7a8115b81 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInner { public static final String SERIALIZED_NAME_TYPE = "type"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerData.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerData.java index 057130f9d..a5f306e17 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerData.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerData.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerData { public static final String SERIALIZED_NAME_ASSETS = "assets"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataAssetsInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataAssetsInner.java index dc5cecf45..09479bbf2 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataAssetsInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataAssetsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataPositionInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataPositionInner.java index 4e90d15e5..28af2be4a 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataPositionInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataPositionInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataPositionInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataPositionInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountListResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountListResponse.java index f6d8259ad..4808ce2df 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountListResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryManagedSubAccountListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountListResponse { public static final String SERIALIZED_NAME_TOTAL = "total"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountListResponseManagerSubUserInfoVoListInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountListResponseManagerSubUserInfoVoListInner.java index 10eed570b..c043fa6cc 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountListResponseManagerSubUserInfoVoListInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountListResponseManagerSubUserInfoVoListInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryManagedSubAccountListResponseManagerSubUserInfoVoListInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountListResponseManagerSubUserInfoVoListInner { public static final String SERIALIZED_NAME_ROOT_USER_ID = "rootUserId"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountMarginAssetDetailsResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountMarginAssetDetailsResponse.java index 3e381a1e3..1ec7c7821 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountMarginAssetDetailsResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountMarginAssetDetailsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryManagedSubAccountMarginAssetDetailsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountMarginAssetDetailsResponse { public static final String SERIALIZED_NAME_MARGIN_LEVEL = "marginLevel"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountMarginAssetDetailsResponseUserAssetsInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountMarginAssetDetailsResponseUserAssetsInner.java index 63d292203..8b2abd002 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountMarginAssetDetailsResponseUserAssetsInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountMarginAssetDetailsResponseUserAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryManagedSubAccountMarginAssetDetailsResponseUserAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountMarginAssetDetailsResponseUserAssetsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponse.java index a0186f9e9..eef03d270 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryManagedSubAccountSnapshotResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountSnapshotResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInner.java index 56b5e2cc8..305a70e18 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** QueryManagedSubAccountSnapshotResponseSnapshotVosInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountSnapshotResponseSnapshotVosInner { public static final String SERIALIZED_NAME_DATA = "data"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerData.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerData.java index 9fc345da9..225813a8b 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerData.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerData.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryManagedSubAccountSnapshotResponseSnapshotVosInnerData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountSnapshotResponseSnapshotVosInnerData { public static final String SERIALIZED_NAME_BALANCES = "balances"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataAssetsInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataAssetsInner.java index 0dc082c9c..389d0fdec 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataAssetsInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataAssetsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataBalancesInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataBalancesInner.java index 4321ae0b2..1eb98c2ba 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataBalancesInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataBalancesInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataBalancesInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataBalancesInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataPositionInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataPositionInner.java index 92a22e028..1be8fe8ce 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataPositionInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataPositionInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataPositionInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataPositionInner { public static final String SERIALIZED_NAME_ENTRY_PRICE = "entryPrice"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner.java index e79b62fe8..3eb503bfd 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountTransferLogMasterAccountInvestorResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountTransferLogMasterAccountInvestorResponse.java index ed9810e01..cc807bbd9 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountTransferLogMasterAccountInvestorResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountTransferLogMasterAccountInvestorResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryManagedSubAccountTransferLogMasterAccountInvestorResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountTransferLogMasterAccountInvestorResponse { public static final String SERIALIZED_NAME_MANAGER_SUB_TRANSFER_HISTORY_VOS = "managerSubTransferHistoryVos"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountTransferLogMasterAccountInvestorResponseManagerSubTransferHistoryVosInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountTransferLogMasterAccountInvestorResponseManagerSubTransferHistoryVosInner.java index c2d0a48a5..814a01e7c 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountTransferLogMasterAccountInvestorResponseManagerSubTransferHistoryVosInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountTransferLogMasterAccountInvestorResponseManagerSubTransferHistoryVosInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -36,7 +36,7 @@ */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountTransferLogMasterAccountInvestorResponseManagerSubTransferHistoryVosInner { public static final String SERIALIZED_NAME_FROM_EMAIL = "fromEmail"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountTransferLogMasterAccountTradingResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountTransferLogMasterAccountTradingResponse.java index ee6b0cfed..8e4449cef 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountTransferLogMasterAccountTradingResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountTransferLogMasterAccountTradingResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryManagedSubAccountTransferLogMasterAccountTradingResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountTransferLogMasterAccountTradingResponse { public static final String SERIALIZED_NAME_MANAGER_SUB_TRANSFER_HISTORY_VOS = "managerSubTransferHistoryVos"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountTransferLogSubAccountTradingResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountTransferLogSubAccountTradingResponse.java index 1786ec6e3..66c3d8633 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountTransferLogSubAccountTradingResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryManagedSubAccountTransferLogSubAccountTradingResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryManagedSubAccountTransferLogSubAccountTradingResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryManagedSubAccountTransferLogSubAccountTradingResponse { public static final String SERIALIZED_NAME_MANAGER_SUB_TRANSFER_HISTORY_VOS = "managerSubTransferHistoryVos"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountApiKeyResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountApiKeyResponse.java new file mode 100644 index 000000000..b15e64a33 --- /dev/null +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountApiKeyResponse.java @@ -0,0 +1,283 @@ +/* + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.sub_account.rest.model; + +import com.binance.connector.client.sub_account.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** QuerySubAccountApiKeyResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class QuerySubAccountApiKeyResponse { + public static final String SERIALIZED_NAME_TOTAL = "total"; + + @SerializedName(SERIALIZED_NAME_TOTAL) + @jakarta.annotation.Nullable + private Long total; + + public static final String SERIALIZED_NAME_LIST = "list"; + + @SerializedName(SERIALIZED_NAME_LIST) + @jakarta.annotation.Nullable + private List<@Valid QuerySubAccountApiKeyResponseListInner> _list; + + public QuerySubAccountApiKeyResponse() {} + + public QuerySubAccountApiKeyResponse total(@jakarta.annotation.Nullable Long total) { + this.total = total; + return this; + } + + /** + * Get total + * + * @return total + */ + @jakarta.annotation.Nullable + public Long getTotal() { + return total; + } + + public void setTotal(@jakarta.annotation.Nullable Long total) { + this.total = total; + } + + public QuerySubAccountApiKeyResponse _list( + @jakarta.annotation.Nullable + List<@Valid QuerySubAccountApiKeyResponseListInner> _list) { + this._list = _list; + return this; + } + + public QuerySubAccountApiKeyResponse addListItem( + QuerySubAccountApiKeyResponseListInner _listItem) { + if (this._list == null) { + this._list = new ArrayList<>(); + } + this._list.add(_listItem); + return this; + } + + /** + * Get _list + * + * @return _list + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid QuerySubAccountApiKeyResponseListInner> getList() { + return _list; + } + + public void setList( + @jakarta.annotation.Nullable + List<@Valid QuerySubAccountApiKeyResponseListInner> _list) { + this._list = _list; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuerySubAccountApiKeyResponse querySubAccountApiKeyResponse = + (QuerySubAccountApiKeyResponse) o; + return Objects.equals(this.total, querySubAccountApiKeyResponse.total) + && Objects.equals(this._list, querySubAccountApiKeyResponse._list); + } + + @Override + public int hashCode() { + return Objects.hash(total, _list); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuerySubAccountApiKeyResponse {\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" _list: ").append(toIndentedString(_list)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object totalValue = getTotal(); + String totalValueAsString = ""; + totalValueAsString = totalValue.toString(); + sb.append("total=").append(urlEncode(totalValueAsString)).append(""); + Object _listValue = getList(); + String _listValueAsString = ""; + _listValueAsString = + (String) + ((Collection) _listValue) + .stream().map(Object::toString).collect(Collectors.joining(",")); + sb.append("_list=").append(urlEncode(_listValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("total"); + openapiFields.add("list"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * QuerySubAccountApiKeyResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuerySubAccountApiKeyResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in QuerySubAccountApiKeyResponse is not" + + " found in the empty JSON string", + QuerySubAccountApiKeyResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("list") != null && !jsonObj.get("list").isJsonNull()) { + JsonArray jsonArray_list = jsonObj.getAsJsonArray("list"); + if (jsonArray_list != null) { + // ensure the json data is an array + if (!jsonObj.get("list").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `list` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("list").toString())); + } + + // validate the optional field `list` (array) + for (int i = 0; i < jsonArray_list.size(); i++) { + QuerySubAccountApiKeyResponseListInner.validateJsonElement( + jsonArray_list.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuerySubAccountApiKeyResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuerySubAccountApiKeyResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(QuerySubAccountApiKeyResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, QuerySubAccountApiKeyResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuerySubAccountApiKeyResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of QuerySubAccountApiKeyResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuerySubAccountApiKeyResponse + * @throws IOException if the JSON string is invalid with respect to + * QuerySubAccountApiKeyResponse + */ + public static QuerySubAccountApiKeyResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuerySubAccountApiKeyResponse.class); + } + + /** + * Convert an instance of QuerySubAccountApiKeyResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountApiKeyResponseListInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountApiKeyResponseListInner.java new file mode 100644 index 000000000..44ff0afa6 --- /dev/null +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountApiKeyResponseListInner.java @@ -0,0 +1,526 @@ +/* + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.sub_account.rest.model; + +import com.binance.connector.client.sub_account.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** QuerySubAccountApiKeyResponseListInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class QuerySubAccountApiKeyResponseListInner { + public static final String SERIALIZED_NAME_EMAIL = "email"; + + @SerializedName(SERIALIZED_NAME_EMAIL) + @jakarta.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_API_NAME = "apiName"; + + @SerializedName(SERIALIZED_NAME_API_NAME) + @jakarta.annotation.Nullable + private String apiName; + + public static final String SERIALIZED_NAME_APIKEY = "apikey"; + + @SerializedName(SERIALIZED_NAME_APIKEY) + @jakarta.annotation.Nullable + private String apikey; + + public static final String SERIALIZED_NAME_CAN_TRADE = "canTrade"; + + @SerializedName(SERIALIZED_NAME_CAN_TRADE) + @jakarta.annotation.Nullable + private Boolean canTrade; + + public static final String SERIALIZED_NAME_CAN_MARGIN_LOAN_REPAY = "canMarginLoanRepay"; + + @SerializedName(SERIALIZED_NAME_CAN_MARGIN_LOAN_REPAY) + @jakarta.annotation.Nullable + private Boolean canMarginLoanRepay; + + public static final String SERIALIZED_NAME_CAN_FUTURES_TRADE = "canFuturesTrade"; + + @SerializedName(SERIALIZED_NAME_CAN_FUTURES_TRADE) + @jakarta.annotation.Nullable + private Boolean canFuturesTrade; + + public static final String SERIALIZED_NAME_CAN_UNIVERSAL_TRANSFER = "canUniversalTransfer"; + + @SerializedName(SERIALIZED_NAME_CAN_UNIVERSAL_TRANSFER) + @jakarta.annotation.Nullable + private Boolean canUniversalTransfer; + + public static final String SERIALIZED_NAME_CAN_VANILLA_OPTIONS = "canVanillaOptions"; + + @SerializedName(SERIALIZED_NAME_CAN_VANILLA_OPTIONS) + @jakarta.annotation.Nullable + private Boolean canVanillaOptions; + + public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; + + @SerializedName(SERIALIZED_NAME_TIMESTAMP) + @jakarta.annotation.Nullable + private Long timestamp; + + public QuerySubAccountApiKeyResponseListInner() {} + + public QuerySubAccountApiKeyResponseListInner email(@jakarta.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Get email + * + * @return email + */ + @jakarta.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@jakarta.annotation.Nullable String email) { + this.email = email; + } + + public QuerySubAccountApiKeyResponseListInner apiName( + @jakarta.annotation.Nullable String apiName) { + this.apiName = apiName; + return this; + } + + /** + * Get apiName + * + * @return apiName + */ + @jakarta.annotation.Nullable + public String getApiName() { + return apiName; + } + + public void setApiName(@jakarta.annotation.Nullable String apiName) { + this.apiName = apiName; + } + + public QuerySubAccountApiKeyResponseListInner apikey( + @jakarta.annotation.Nullable String apikey) { + this.apikey = apikey; + return this; + } + + /** + * Get apikey + * + * @return apikey + */ + @jakarta.annotation.Nullable + public String getApikey() { + return apikey; + } + + public void setApikey(@jakarta.annotation.Nullable String apikey) { + this.apikey = apikey; + } + + public QuerySubAccountApiKeyResponseListInner canTrade( + @jakarta.annotation.Nullable Boolean canTrade) { + this.canTrade = canTrade; + return this; + } + + /** + * Get canTrade + * + * @return canTrade + */ + @jakarta.annotation.Nullable + public Boolean getCanTrade() { + return canTrade; + } + + public void setCanTrade(@jakarta.annotation.Nullable Boolean canTrade) { + this.canTrade = canTrade; + } + + public QuerySubAccountApiKeyResponseListInner canMarginLoanRepay( + @jakarta.annotation.Nullable Boolean canMarginLoanRepay) { + this.canMarginLoanRepay = canMarginLoanRepay; + return this; + } + + /** + * Get canMarginLoanRepay + * + * @return canMarginLoanRepay + */ + @jakarta.annotation.Nullable + public Boolean getCanMarginLoanRepay() { + return canMarginLoanRepay; + } + + public void setCanMarginLoanRepay(@jakarta.annotation.Nullable Boolean canMarginLoanRepay) { + this.canMarginLoanRepay = canMarginLoanRepay; + } + + public QuerySubAccountApiKeyResponseListInner canFuturesTrade( + @jakarta.annotation.Nullable Boolean canFuturesTrade) { + this.canFuturesTrade = canFuturesTrade; + return this; + } + + /** + * Get canFuturesTrade + * + * @return canFuturesTrade + */ + @jakarta.annotation.Nullable + public Boolean getCanFuturesTrade() { + return canFuturesTrade; + } + + public void setCanFuturesTrade(@jakarta.annotation.Nullable Boolean canFuturesTrade) { + this.canFuturesTrade = canFuturesTrade; + } + + public QuerySubAccountApiKeyResponseListInner canUniversalTransfer( + @jakarta.annotation.Nullable Boolean canUniversalTransfer) { + this.canUniversalTransfer = canUniversalTransfer; + return this; + } + + /** + * Get canUniversalTransfer + * + * @return canUniversalTransfer + */ + @jakarta.annotation.Nullable + public Boolean getCanUniversalTransfer() { + return canUniversalTransfer; + } + + public void setCanUniversalTransfer(@jakarta.annotation.Nullable Boolean canUniversalTransfer) { + this.canUniversalTransfer = canUniversalTransfer; + } + + public QuerySubAccountApiKeyResponseListInner canVanillaOptions( + @jakarta.annotation.Nullable Boolean canVanillaOptions) { + this.canVanillaOptions = canVanillaOptions; + return this; + } + + /** + * Get canVanillaOptions + * + * @return canVanillaOptions + */ + @jakarta.annotation.Nullable + public Boolean getCanVanillaOptions() { + return canVanillaOptions; + } + + public void setCanVanillaOptions(@jakarta.annotation.Nullable Boolean canVanillaOptions) { + this.canVanillaOptions = canVanillaOptions; + } + + public QuerySubAccountApiKeyResponseListInner timestamp( + @jakarta.annotation.Nullable Long timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get timestamp + * + * @return timestamp + */ + @jakarta.annotation.Nullable + public Long getTimestamp() { + return timestamp; + } + + public void setTimestamp(@jakarta.annotation.Nullable Long timestamp) { + this.timestamp = timestamp; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuerySubAccountApiKeyResponseListInner querySubAccountApiKeyResponseListInner = + (QuerySubAccountApiKeyResponseListInner) o; + return Objects.equals(this.email, querySubAccountApiKeyResponseListInner.email) + && Objects.equals(this.apiName, querySubAccountApiKeyResponseListInner.apiName) + && Objects.equals(this.apikey, querySubAccountApiKeyResponseListInner.apikey) + && Objects.equals(this.canTrade, querySubAccountApiKeyResponseListInner.canTrade) + && Objects.equals( + this.canMarginLoanRepay, + querySubAccountApiKeyResponseListInner.canMarginLoanRepay) + && Objects.equals( + this.canFuturesTrade, + querySubAccountApiKeyResponseListInner.canFuturesTrade) + && Objects.equals( + this.canUniversalTransfer, + querySubAccountApiKeyResponseListInner.canUniversalTransfer) + && Objects.equals( + this.canVanillaOptions, + querySubAccountApiKeyResponseListInner.canVanillaOptions) + && Objects.equals(this.timestamp, querySubAccountApiKeyResponseListInner.timestamp); + } + + @Override + public int hashCode() { + return Objects.hash( + email, + apiName, + apikey, + canTrade, + canMarginLoanRepay, + canFuturesTrade, + canUniversalTransfer, + canVanillaOptions, + timestamp); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuerySubAccountApiKeyResponseListInner {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" apiName: ").append(toIndentedString(apiName)).append("\n"); + sb.append(" apikey: ").append(toIndentedString(apikey)).append("\n"); + sb.append(" canTrade: ").append(toIndentedString(canTrade)).append("\n"); + sb.append(" canMarginLoanRepay: ") + .append(toIndentedString(canMarginLoanRepay)) + .append("\n"); + sb.append(" canFuturesTrade: ").append(toIndentedString(canFuturesTrade)).append("\n"); + sb.append(" canUniversalTransfer: ") + .append(toIndentedString(canUniversalTransfer)) + .append("\n"); + sb.append(" canVanillaOptions: ").append(toIndentedString(canVanillaOptions)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object emailValue = getEmail(); + String emailValueAsString = ""; + emailValueAsString = emailValue.toString(); + sb.append("email=").append(urlEncode(emailValueAsString)).append(""); + Object apiNameValue = getApiName(); + String apiNameValueAsString = ""; + apiNameValueAsString = apiNameValue.toString(); + sb.append("apiName=").append(urlEncode(apiNameValueAsString)).append(""); + Object apikeyValue = getApikey(); + String apikeyValueAsString = ""; + apikeyValueAsString = apikeyValue.toString(); + sb.append("apikey=").append(urlEncode(apikeyValueAsString)).append(""); + Object canTradeValue = getCanTrade(); + String canTradeValueAsString = ""; + canTradeValueAsString = canTradeValue.toString(); + sb.append("canTrade=").append(urlEncode(canTradeValueAsString)).append(""); + Object canMarginLoanRepayValue = getCanMarginLoanRepay(); + String canMarginLoanRepayValueAsString = ""; + canMarginLoanRepayValueAsString = canMarginLoanRepayValue.toString(); + sb.append("canMarginLoanRepay=") + .append(urlEncode(canMarginLoanRepayValueAsString)) + .append(""); + Object canFuturesTradeValue = getCanFuturesTrade(); + String canFuturesTradeValueAsString = ""; + canFuturesTradeValueAsString = canFuturesTradeValue.toString(); + sb.append("canFuturesTrade=").append(urlEncode(canFuturesTradeValueAsString)).append(""); + Object canUniversalTransferValue = getCanUniversalTransfer(); + String canUniversalTransferValueAsString = ""; + canUniversalTransferValueAsString = canUniversalTransferValue.toString(); + sb.append("canUniversalTransfer=") + .append(urlEncode(canUniversalTransferValueAsString)) + .append(""); + Object canVanillaOptionsValue = getCanVanillaOptions(); + String canVanillaOptionsValueAsString = ""; + canVanillaOptionsValueAsString = canVanillaOptionsValue.toString(); + sb.append("canVanillaOptions=") + .append(urlEncode(canVanillaOptionsValueAsString)) + .append(""); + Object timestampValue = getTimestamp(); + String timestampValueAsString = ""; + timestampValueAsString = timestampValue.toString(); + sb.append("timestamp=").append(urlEncode(timestampValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("email"); + openapiFields.add("apiName"); + openapiFields.add("apikey"); + openapiFields.add("canTrade"); + openapiFields.add("canMarginLoanRepay"); + openapiFields.add("canFuturesTrade"); + openapiFields.add("canUniversalTransfer"); + openapiFields.add("canVanillaOptions"); + openapiFields.add("timestamp"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * QuerySubAccountApiKeyResponseListInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuerySubAccountApiKeyResponseListInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in QuerySubAccountApiKeyResponseListInner" + + " is not found in the empty JSON string", + QuerySubAccountApiKeyResponseListInner.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) + && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `email` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("email").toString())); + } + if ((jsonObj.get("apiName") != null && !jsonObj.get("apiName").isJsonNull()) + && !jsonObj.get("apiName").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `apiName` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("apiName").toString())); + } + if ((jsonObj.get("apikey") != null && !jsonObj.get("apikey").isJsonNull()) + && !jsonObj.get("apikey").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `apikey` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("apikey").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuerySubAccountApiKeyResponseListInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuerySubAccountApiKeyResponseListInner' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(QuerySubAccountApiKeyResponseListInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, QuerySubAccountApiKeyResponseListInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuerySubAccountApiKeyResponseListInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of QuerySubAccountApiKeyResponseListInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuerySubAccountApiKeyResponseListInner + * @throws IOException if the JSON string is invalid with respect to + * QuerySubAccountApiKeyResponseListInner + */ + public static QuerySubAccountApiKeyResponseListInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, QuerySubAccountApiKeyResponseListInner.class); + } + + /** + * Convert an instance of QuerySubAccountApiKeyResponseListInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountAssetsAssetManagementResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountAssetsAssetManagementResponse.java index b5ad0409b..ad235cea3 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountAssetsAssetManagementResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountAssetsAssetManagementResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QuerySubAccountAssetsAssetManagementResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySubAccountAssetsAssetManagementResponse { public static final String SERIALIZED_NAME_BALANCES = "balances"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountAssetsAssetManagementResponseBalancesInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountAssetsAssetManagementResponseBalancesInner.java index 00946bd35..dc5d8f418 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountAssetsAssetManagementResponseBalancesInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountAssetsAssetManagementResponseBalancesInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QuerySubAccountAssetsAssetManagementResponseBalancesInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySubAccountAssetsAssetManagementResponseBalancesInner { public static final String SERIALIZED_NAME_FREEZE = "freeze"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountAssetsResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountAssetsResponse.java index 7dfb4099a..09ceadfcc 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountAssetsResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountAssetsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QuerySubAccountAssetsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySubAccountAssetsResponse { public static final String SERIALIZED_NAME_BALANCES = "balances"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountAssetsResponseBalancesInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountAssetsResponseBalancesInner.java index c93d58180..b80c4255e 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountAssetsResponseBalancesInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountAssetsResponseBalancesInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** QuerySubAccountAssetsResponseBalancesInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySubAccountAssetsResponseBalancesInner { public static final String SERIALIZED_NAME_FREEZE = "freeze"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountFuturesAssetTransferHistoryResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountFuturesAssetTransferHistoryResponse.java index 0084e673e..959a96578 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountFuturesAssetTransferHistoryResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountFuturesAssetTransferHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QuerySubAccountFuturesAssetTransferHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySubAccountFuturesAssetTransferHistoryResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountFuturesAssetTransferHistoryResponseTransfersInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountFuturesAssetTransferHistoryResponseTransfersInner.java index ba09bfcde..3dccabd25 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountFuturesAssetTransferHistoryResponseTransfersInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountFuturesAssetTransferHistoryResponseTransfersInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QuerySubAccountFuturesAssetTransferHistoryResponseTransfersInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySubAccountFuturesAssetTransferHistoryResponseTransfersInner { public static final String SERIALIZED_NAME_FROM = "from"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountListResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountListResponse.java index b1a58e5e7..3f4482ad0 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountListResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QuerySubAccountListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySubAccountListResponse { public static final String SERIALIZED_NAME_SUB_ACCOUNTS = "subAccounts"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountListResponseSubAccountsInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountListResponseSubAccountsInner.java index a78be05a7..6b2677deb 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountListResponseSubAccountsInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountListResponseSubAccountsInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QuerySubAccountListResponseSubAccountsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySubAccountListResponseSubAccountsInner { public static final String SERIALIZED_NAME_SUB_USER_ID = "subUserId"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountSpotAssetTransferHistoryResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountSpotAssetTransferHistoryResponse.java index f5b1dea4e..4944a09e7 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountSpotAssetTransferHistoryResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountSpotAssetTransferHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QuerySubAccountSpotAssetTransferHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySubAccountSpotAssetTransferHistoryResponse extends ArrayList { public QuerySubAccountSpotAssetTransferHistoryResponse() {} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountSpotAssetTransferHistoryResponseInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountSpotAssetTransferHistoryResponseInner.java index 09ba22ba7..f712021b9 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountSpotAssetTransferHistoryResponseInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountSpotAssetTransferHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QuerySubAccountSpotAssetTransferHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySubAccountSpotAssetTransferHistoryResponseInner { public static final String SERIALIZED_NAME_FROM = "from"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountSpotAssetsSummaryResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountSpotAssetsSummaryResponse.java index 2200af99f..e4bc4b005 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountSpotAssetsSummaryResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountSpotAssetsSummaryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QuerySubAccountSpotAssetsSummaryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySubAccountSpotAssetsSummaryResponse { public static final String SERIALIZED_NAME_TOTAL_COUNT = "totalCount"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountSpotAssetsSummaryResponseSpotSubUserAssetBtcVoListInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountSpotAssetsSummaryResponseSpotSubUserAssetBtcVoListInner.java index 50745c467..7a6bc0866 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountSpotAssetsSummaryResponseSpotSubUserAssetBtcVoListInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountSpotAssetsSummaryResponseSpotSubUserAssetBtcVoListInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QuerySubAccountSpotAssetsSummaryResponseSpotSubUserAssetBtcVoListInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySubAccountSpotAssetsSummaryResponseSpotSubUserAssetBtcVoListInner { public static final String SERIALIZED_NAME_EMAIL = "email"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountTransactionStatisticsResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountTransactionStatisticsResponse.java index e39a6e1dc..3d51f4f64 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountTransactionStatisticsResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountTransactionStatisticsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QuerySubAccountTransactionStatisticsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySubAccountTransactionStatisticsResponse { public static final String SERIALIZED_NAME_RECENT30_BTC_TOTAL = "recent30BtcTotal"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountTransactionStatisticsResponseTradeInfoVosInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountTransactionStatisticsResponseTradeInfoVosInner.java index 877a57878..d2035394a 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountTransactionStatisticsResponseTradeInfoVosInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QuerySubAccountTransactionStatisticsResponseTradeInfoVosInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QuerySubAccountTransactionStatisticsResponseTradeInfoVosInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QuerySubAccountTransactionStatisticsResponseTradeInfoVosInner { public static final String SERIALIZED_NAME_USER_ID = "userId"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryUniversalTransferHistoryResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryUniversalTransferHistoryResponse.java index 7de95a90c..a8d322da2 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryUniversalTransferHistoryResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryUniversalTransferHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryUniversalTransferHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUniversalTransferHistoryResponse { public static final String SERIALIZED_NAME_RESULT = "result"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryUniversalTransferHistoryResponseResultInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryUniversalTransferHistoryResponseResultInner.java index d33cdecda..ea497eb27 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryUniversalTransferHistoryResponseResultInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/QueryUniversalTransferHistoryResponseResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUniversalTransferHistoryResponseResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUniversalTransferHistoryResponseResultInner { public static final String SERIALIZED_NAME_TRAN_ID = "tranId"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountFuturesAssetTransferRequest.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountFuturesAssetTransferRequest.java index 3362563af..8196344ce 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountFuturesAssetTransferRequest.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountFuturesAssetTransferRequest.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** SubAccountFuturesAssetTransferRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubAccountFuturesAssetTransferRequest { public static final String SERIALIZED_NAME_FROM_EMAIL = "fromEmail"; @@ -82,7 +82,7 @@ public SubAccountFuturesAssetTransferRequest fromEmail( } /** - * Get fromEmail + * Sender email * * @return fromEmail */ @@ -103,7 +103,7 @@ public SubAccountFuturesAssetTransferRequest toEmail( } /** - * Get toEmail + * Recipient email * * @return toEmail */ @@ -124,7 +124,7 @@ public SubAccountFuturesAssetTransferRequest futuresType( } /** - * Get futuresType + * 1:USDT-margined Futures,2: Coin-margined Futures * * @return futuresType */ @@ -186,11 +186,12 @@ public SubAccountFuturesAssetTransferRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountFuturesAssetTransferResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountFuturesAssetTransferResponse.java index 4c0301d43..ae9ffb6a9 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountFuturesAssetTransferResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountFuturesAssetTransferResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SubAccountFuturesAssetTransferResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubAccountFuturesAssetTransferResponse { public static final String SERIALIZED_NAME_SUCCESS = "success"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountTransferHistoryResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountTransferHistoryResponse.java index 0f2975d7a..7b1cd9610 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountTransferHistoryResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountTransferHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SubAccountTransferHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubAccountTransferHistoryResponse extends ArrayList { public SubAccountTransferHistoryResponse() {} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountTransferHistoryResponseInner.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountTransferHistoryResponseInner.java index 363fd840c..bae10483c 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountTransferHistoryResponseInner.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountTransferHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SubAccountTransferHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubAccountTransferHistoryResponseInner { public static final String SERIALIZED_NAME_COUNTER_PARTY = "counterParty"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/ToAccountType.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/ToAccountType.java new file mode 100644 index 000000000..6f40e3cae --- /dev/null +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/ToAccountType.java @@ -0,0 +1,79 @@ +/* + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.sub_account.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets toAccountType */ +@JsonAdapter(ToAccountType.Adapter.class) +public enum ToAccountType { + SPOT("SPOT"), + + USDT_FUTURE("USDT_FUTURE"), + + COIN_FUTURE("COIN_FUTURE"), + + MARGIN("MARGIN"), + + ISOLATED_MARGIN("ISOLATED_MARGIN"); + + private String value; + + ToAccountType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ToAccountType fromValue(String value) { + for (ToAccountType b : ToAccountType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ToAccountType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ToAccountType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ToAccountType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ToAccountType.fromValue(value); + } +} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferFunctionAccountType.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferFunctionAccountType.java new file mode 100644 index 000000000..2acf19f35 --- /dev/null +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferFunctionAccountType.java @@ -0,0 +1,80 @@ +/* + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.sub_account.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets transferFunctionAccountType */ +@JsonAdapter(TransferFunctionAccountType.Adapter.class) +public enum TransferFunctionAccountType { + SPOT("SPOT"), + + MARGIN("MARGIN"), + + ISOLATED_MARGIN("ISOLATED_MARGIN"), + + USDT_FUTURE("USDT_FUTURE"), + + COIN_FUTURE("COIN_FUTURE"); + + private String value; + + TransferFunctionAccountType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TransferFunctionAccountType fromValue(String value) { + for (TransferFunctionAccountType b : TransferFunctionAccountType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write( + final JsonWriter jsonWriter, final TransferFunctionAccountType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TransferFunctionAccountType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TransferFunctionAccountType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TransferFunctionAccountType.fromValue(value); + } +} diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferToMasterRequest.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferToMasterRequest.java index 812526d87..0da6f957e 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferToMasterRequest.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferToMasterRequest.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** TransferToMasterRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TransferToMasterRequest { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -104,11 +104,12 @@ public TransferToMasterRequest recvWindow(@jakarta.annotation.Nullable Long recv } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferToMasterResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferToMasterResponse.java index adf270f21..766a6b180 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferToMasterResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferToMasterResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TransferToMasterResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TransferToMasterResponse { public static final String SERIALIZED_NAME_TXN_ID = "txnId"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferToSubAccountOfSameMasterRequest.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferToSubAccountOfSameMasterRequest.java index 0dd447424..3e67078cb 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferToSubAccountOfSameMasterRequest.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferToSubAccountOfSameMasterRequest.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** TransferToSubAccountOfSameMasterRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TransferToSubAccountOfSameMasterRequest { public static final String SERIALIZED_NAME_TO_EMAIL = "toEmail"; @@ -133,11 +133,12 @@ public TransferToSubAccountOfSameMasterRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferToSubAccountOfSameMasterResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferToSubAccountOfSameMasterResponse.java index e798c9b4a..1c7af44b5 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferToSubAccountOfSameMasterResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/TransferToSubAccountOfSameMasterResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TransferToSubAccountOfSameMasterResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TransferToSubAccountOfSameMasterResponse { public static final String SERIALIZED_NAME_TXN_ID = "txnId"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/UniversalTransferRequest.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/UniversalTransferRequest.java index c5ce0f61a..e4c96a3e9 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/UniversalTransferRequest.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/UniversalTransferRequest.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** UniversalTransferRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UniversalTransferRequest { public static final String SERIALIZED_NAME_FROM_EMAIL = "fromEmail"; @@ -53,13 +53,13 @@ public class UniversalTransferRequest { @SerializedName(SERIALIZED_NAME_FROM_ACCOUNT_TYPE) @jakarta.annotation.Nonnull - private String fromAccountType; + private FromAccountType fromAccountType; public static final String SERIALIZED_NAME_TO_ACCOUNT_TYPE = "toAccountType"; @SerializedName(SERIALIZED_NAME_TO_ACCOUNT_TYPE) @jakarta.annotation.Nonnull - private String toAccountType; + private ToAccountType toAccountType; public static final String SERIALIZED_NAME_CLIENT_TRAN_ID = "clientTranId"; @@ -132,7 +132,7 @@ public void setToEmail(@jakarta.annotation.Nullable String toEmail) { } public UniversalTransferRequest fromAccountType( - @jakarta.annotation.Nonnull String fromAccountType) { + @jakarta.annotation.Nonnull FromAccountType fromAccountType) { this.fromAccountType = fromAccountType; return this; } @@ -144,16 +144,17 @@ public UniversalTransferRequest fromAccountType( */ @jakarta.annotation.Nonnull @NotNull - public String getFromAccountType() { + @Valid + public FromAccountType getFromAccountType() { return fromAccountType; } - public void setFromAccountType(@jakarta.annotation.Nonnull String fromAccountType) { + public void setFromAccountType(@jakarta.annotation.Nonnull FromAccountType fromAccountType) { this.fromAccountType = fromAccountType; } public UniversalTransferRequest toAccountType( - @jakarta.annotation.Nonnull String toAccountType) { + @jakarta.annotation.Nonnull ToAccountType toAccountType) { this.toAccountType = toAccountType; return this; } @@ -165,11 +166,12 @@ public UniversalTransferRequest toAccountType( */ @jakarta.annotation.Nonnull @NotNull - public String getToAccountType() { + @Valid + public ToAccountType getToAccountType() { return toAccountType; } - public void setToAccountType(@jakarta.annotation.Nonnull String toAccountType) { + public void setToAccountType(@jakarta.annotation.Nonnull ToAccountType toAccountType) { this.toAccountType = toAccountType; } @@ -179,7 +181,7 @@ public UniversalTransferRequest clientTranId(@jakarta.annotation.Nullable String } /** - * Get clientTranId + * Must be unique * * @return clientTranId */ @@ -198,7 +200,7 @@ public UniversalTransferRequest symbol(@jakarta.annotation.Nullable String symbo } /** - * Get symbol + * Only supported under ISOLATED_MARGIN type * * @return symbol */ @@ -258,11 +260,12 @@ public UniversalTransferRequest recvWindow(@jakarta.annotation.Nullable Long rec } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -451,20 +454,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("toEmail").toString())); } - if (!jsonObj.get("fromAccountType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `fromAccountType` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("fromAccountType").toString())); - } - if (!jsonObj.get("toAccountType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `toAccountType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("toAccountType").toString())); - } + // validate the required field `fromAccountType` + FromAccountType.validateJsonElement(jsonObj.get("fromAccountType")); + // validate the required field `toAccountType` + ToAccountType.validateJsonElement(jsonObj.get("toAccountType")); if ((jsonObj.get("clientTranId") != null && !jsonObj.get("clientTranId").isJsonNull()) && !jsonObj.get("clientTranId").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/UniversalTransferResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/UniversalTransferResponse.java index 9efb3740e..61a626b0a 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/UniversalTransferResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/UniversalTransferResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UniversalTransferResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UniversalTransferResponse { public static final String SERIALIZED_NAME_TRAN_ID = "tranId"; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/WithdrawlAssetsFromTheManagedSubAccountRequest.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/WithdrawlAssetsFromTheManagedSubAccountRequest.java index 579502e5a..2ef630d4a 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/WithdrawlAssetsFromTheManagedSubAccountRequest.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/WithdrawlAssetsFromTheManagedSubAccountRequest.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** WithdrawlAssetsFromTheManagedSubAccountRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class WithdrawlAssetsFromTheManagedSubAccountRequest { public static final String SERIALIZED_NAME_FROM_EMAIL = "fromEmail"; @@ -140,7 +140,8 @@ public WithdrawlAssetsFromTheManagedSubAccountRequest transferDate( } /** - * Get transferDate + * Withdrawal will happen automatically on the selected date (UTC 0). If no date is selected, + * withdrawal takes effect immediately. * * @return transferDate */ @@ -160,11 +161,12 @@ public WithdrawlAssetsFromTheManagedSubAccountRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/WithdrawlAssetsFromTheManagedSubAccountResponse.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/WithdrawlAssetsFromTheManagedSubAccountResponse.java index 68dfa939a..b032f5777 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/WithdrawlAssetsFromTheManagedSubAccountResponse.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/WithdrawlAssetsFromTheManagedSubAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** WithdrawlAssetsFromTheManagedSubAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class WithdrawlAssetsFromTheManagedSubAccountResponse { public static final String SERIALIZED_NAME_TRAN_ID = "tranId"; diff --git a/clients/sub-account/src/test/java/com/binance/connector/client/sub_account/rest/api/AccountManagementApiTest.java b/clients/sub-account/src/test/java/com/binance/connector/client/sub_account/rest/api/AccountManagementApiTest.java index 84556f74e..87a91d2ed 100644 --- a/clients/sub-account/src/test/java/com/binance/connector/client/sub_account/rest/api/AccountManagementApiTest.java +++ b/clients/sub-account/src/test/java/com/binance/connector/client/sub_account/rest/api/AccountManagementApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -12,6 +12,8 @@ package com.binance.connector.client.sub_account.rest.api; +import static org.junit.Assert.assertEquals; + import com.binance.connector.client.common.ApiClient; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -32,6 +34,8 @@ import com.binance.connector.client.sub_account.rest.model.GetSubAccountsStatusOnMarginOrFuturesResponse; import com.binance.connector.client.sub_account.rest.model.QuerySubAccountListResponse; import com.binance.connector.client.sub_account.rest.model.QuerySubAccountTransactionStatisticsResponse; +import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -40,8 +44,6 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mockito; -import static org.junit.Assert.assertEquals; - /** API tests for AccountManagementApi */ public class AccountManagementApiTest { @@ -85,20 +87,19 @@ public void initApiClient() throws ApiException { } /** - * Create a Virtual Sub-account(For Master Account) + * Create a Virtual Sub-account (For Master Account) (USER_DATA) * - *

Create a Virtual Sub-account * This request will generate a virtual sub account under your - * master account. * You need to enable \"trade\" option for the API Key which - * requests this endpoint. Weight: 1 + *

Create a Virtual Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - This request + * generates a virtual sub-account under your master account. - The API key used to call this + * endpoint must have the `trade` option enabled. * * @throws ApiException if the Api call fails */ @Test - public void createAVirtualSubAccountTest() throws ApiException, CryptoException { + public void createAVirtualSubAccountTest() throws ApiException, CryptoException, IOException { CreateAVirtualSubAccountRequest createAVirtualSubAccountRequest = new CreateAVirtualSubAccountRequest(); - - createAVirtualSubAccountRequest.subAccountString(""); + createAVirtualSubAccountRequest.subAccountString("testSubAccount"); ApiResponse response = api.createAVirtualSubAccount(createAVirtualSubAccountRequest); @@ -113,26 +114,25 @@ public void createAVirtualSubAccountTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000subAccountString=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000subAccountString=testSubAccount", signInputCaptor.getValue()); assertEquals( - "17957384d6df5c7c6e52eefb50fa8aab7e6c71cb463c5010af594789262b22f5", + "0fe42141d019bd733e2a22a2104d028b3325400af1f9c91486f5a6efe6f05526", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/sub-account/virtualSubAccount", actualRequest.url().encodedPath()); } /** - * Enable Futures for Sub-account(For Master Account) + * Enable Futures for Sub-account (For Master Account) (USER_DATA) * - *

Enable Futures for Sub-account for Master Account Weight: 1 + *

Enable Futures for Sub-account for Master Account Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void enableFuturesForSubAccountTest() throws ApiException, CryptoException { + public void enableFuturesForSubAccountTest() throws ApiException, CryptoException, IOException { EnableFuturesForSubAccountRequest enableFuturesForSubAccountRequest = new EnableFuturesForSubAccountRequest(); - - enableFuturesForSubAccountRequest.email("sub-account-email@email.com"); + enableFuturesForSubAccountRequest.email("123@test.com"); ApiResponse response = api.enableFuturesForSubAccount(enableFuturesForSubAccountRequest); @@ -147,28 +147,26 @@ public void enableFuturesForSubAccountTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000email=123%40test.com", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000email=sub-account-email%40email.com", - signInputCaptor.getValue()); - assertEquals( - "f67b06b499d40c01558e887eeacedf34d4c15093e3369cc524fd961d26d2a511", + "b352a4ac3d81990c97a21d9249ef59c109edd5d7ecc759377bacfb3bbcc91981", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/sub-account/futures/enable", actualRequest.url().encodedPath()); } /** - * Enable Options for Sub-account(For Master Account)(USER_DATA) + * Enable Options for Sub-account (For Master Account) (USER_DATA) * - *

Enable Options for Sub-account (For Master Account). Weight: 1 + *

Enable Options for Sub-account (For Master Account). Weight(IP): 1 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void enableOptionsForSubAccountTest() throws ApiException, CryptoException { + public void enableOptionsForSubAccountTest() throws ApiException, CryptoException, IOException { EnableOptionsForSubAccountRequest enableOptionsForSubAccountRequest = new EnableOptionsForSubAccountRequest(); - - enableOptionsForSubAccountRequest.email("sub-account-email@email.com"); + enableOptionsForSubAccountRequest.email("123@test.com"); ApiResponse response = api.enableOptionsForSubAccount(enableOptionsForSubAccountRequest); @@ -183,25 +181,24 @@ public void enableOptionsForSubAccountTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000email=123%40test.com", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000email=sub-account-email%40email.com", - signInputCaptor.getValue()); - assertEquals( - "f67b06b499d40c01558e887eeacedf34d4c15093e3369cc524fd961d26d2a511", + "b352a4ac3d81990c97a21d9249ef59c109edd5d7ecc759377bacfb3bbcc91981", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/sub-account/eoptions/enable", actualRequest.url().encodedPath()); } /** - * Get Futures Position-Risk of Sub-account(For Master Account) + * Get Futures Position-Risk of Sub-account (For Master Account) (USER_DATA) * - *

Get Futures Position-Risk of Sub-account Weight: 10 + *

Get Futures Position-Risk of Sub-account Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getFuturesPositionRiskOfSubAccountTest() throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; + public void getFuturesPositionRiskOfSubAccountTest() + throws ApiException, CryptoException, IOException { + String email = "123@test.com"; Long recvWindow = 5000L; ApiResponse response = api.getFuturesPositionRiskOfSubAccount(email, recvWindow); @@ -217,26 +214,26 @@ public void getFuturesPositionRiskOfSubAccountTest() throws ApiException, Crypto Request actualRequest = captorValue.request(); assertEquals( - "email=sub-account-email%40email.com&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "email=123%40test.com&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "bbb3a67207210f851b76211eae9566a7b03cd2d37dde4e5b73d48265f7b9197e", + "cd63404bc561d336289e8cb941b7cdf71a2a31b8167ead6c6b6d60e0279653ce", actualRequest.url().queryParameter("signature")); assertEquals( "/sapi/v1/sub-account/futures/positionRisk", actualRequest.url().encodedPath()); } /** - * Get Futures Position-Risk of Sub-account V2(For Master Account) + * Get Futures Position-Risk of Sub-account V2 (For Master Account) (USER_DATA) * - *

Get Futures Position-Risk of Sub-account V2 Weight: 1 + *

Get Futures Position-Risk of Sub-account V2 Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getFuturesPositionRiskOfSubAccountV2Test() throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; - Long futuresType = 0L; + public void getFuturesPositionRiskOfSubAccountV2Test() + throws ApiException, CryptoException, IOException { + String email = "123@test.com"; + Long futuresType = 1L; Long recvWindow = 5000L; ApiResponse response = api.getFuturesPositionRiskOfSubAccountV2(email, futuresType, recvWindow); @@ -252,26 +249,26 @@ public void getFuturesPositionRiskOfSubAccountV2Test() throws ApiException, Cryp Request actualRequest = captorValue.request(); assertEquals( - "email=sub-account-email%40email.com&futuresType=0&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "email=123%40test.com&futuresType=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "cc664677d48539d81fe257dafb4f793b0036ed86f73c1bca867f692c34b6b490", + "26bcd5b994bb829b3a59484013a4fce2a60ba12d6f08fbe5a00173000cbe40c7", actualRequest.url().queryParameter("signature")); assertEquals( "/sapi/v2/sub-account/futures/positionRisk", actualRequest.url().encodedPath()); } /** - * Get Sub-account's Status on Margin Or Futures(For Master Account) + * Get Sub-account's Status on Margin Or Futures (For Master Account) (USER_DATA) * - *

Get Sub-account's Status on Margin Or Futures * If no email sent, all - * sub-accounts' information will be returned. Weight: 10 + *

Get Sub-account's Status on Margin Or Futures Weight(IP): 10 Security Type: USER_DATA + * Notes: - If no email sent, all sub-accounts' information will be returned. * * @throws ApiException if the Api call fails */ @Test - public void getSubAccountsStatusOnMarginOrFuturesTest() throws ApiException, CryptoException { - String email = ""; + public void getSubAccountsStatusOnMarginOrFuturesTest() + throws ApiException, CryptoException, IOException { + String email = "123@test.com"; Long recvWindow = 5000L; ApiResponse response = api.getSubAccountsStatusOnMarginOrFutures(email, recvWindow); @@ -286,26 +283,29 @@ public void getSubAccountsStatusOnMarginOrFuturesTest() throws ApiException, Cry Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("email=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "ca098fe86ad4ca7fbb1763dbb32c5c8f0611c1ee3dd0334fa79e767a306b3ab9", + "email=123%40test.com&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); + assertEquals( + "cd63404bc561d336289e8cb941b7cdf71a2a31b8167ead6c6b6d60e0279653ce", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/sub-account/status", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/sub-account/status", actualRequest.url().encodedPath()); } /** - * Query Sub-account List(For Master Account) + * Query Sub-account List (For Master Account) (USER_DATA) * - *

Query Sub-account List Weight: 1 + *

Query Sub-account List Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void querySubAccountListTest() throws ApiException, CryptoException { - String email = ""; - String isFreeze = ""; + public void querySubAccountListTest() throws ApiException, CryptoException, IOException { + String email = "123@test.com"; + String isFreeze = "true"; Long page = 1L; - Long limit = 1L; + Long limit = 10L; Long recvWindow = 5000L; ApiResponse response = api.querySubAccountList(email, isFreeze, page, limit, recvWindow); @@ -320,25 +320,24 @@ public void querySubAccountListTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("email=123%40test.com&isFreeze=true&page=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "email=&isFreeze=&page=1&limit=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "563b2264a7851ddf9f32d76d6be3966d159a697f45e7ebbafe60f7d561e426c6", - actualRequest.url().queryParameter("signature")); + "d447a745a6b1160ad2e844d97262797f9db645aa97c70aeb73fbd2ac5cb44280", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/sub-account/list", actualRequest.url().encodedPath()); } /** - * Query Sub-account Transaction Statistics(For Master Account)(USER_DATA) + * Query Sub-account Transaction Statistics (For Master Account) (USER_DATA) * - *

Query Sub-account Transaction statistics (For Master Account). Weight: 60 + *

Query Sub-account Transaction statistics (For Master Account). Weight(IP): 60 Security + * Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void querySubAccountTransactionStatisticsTest() throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; + public void querySubAccountTransactionStatisticsTest() + throws ApiException, CryptoException, IOException { + String email = "abc@test.com"; Long recvWindow = 5000L; ApiResponse response = api.querySubAccountTransactionStatistics(email, recvWindow); @@ -354,10 +353,9 @@ public void querySubAccountTransactionStatisticsTest() throws ApiException, Cryp Request actualRequest = captorValue.request(); assertEquals( - "email=sub-account-email%40email.com&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "email=abc%40test.com&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "bbb3a67207210f851b76211eae9566a7b03cd2d37dde4e5b73d48265f7b9197e", + "18e24a62c2fe0e440151dfc8e5f916abc1d41f6895ddeec80f18ff7ee97887f5", actualRequest.url().queryParameter("signature")); assertEquals( "/sapi/v1/sub-account/transaction-statistics", actualRequest.url().encodedPath()); diff --git a/clients/sub-account/src/test/java/com/binance/connector/client/sub_account/rest/api/ApiManagementApiTest.java b/clients/sub-account/src/test/java/com/binance/connector/client/sub_account/rest/api/ApiManagementApiTest.java index 678f55a2a..4aae31963 100644 --- a/clients/sub-account/src/test/java/com/binance/connector/client/sub_account/rest/api/ApiManagementApiTest.java +++ b/clients/sub-account/src/test/java/com/binance/connector/client/sub_account/rest/api/ApiManagementApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -25,9 +25,15 @@ import com.binance.connector.client.common.sign.SignatureGenerator; import com.binance.connector.client.sub_account.rest.model.AddIpRestrictionForSubAccountApiKeyRequest; import com.binance.connector.client.sub_account.rest.model.AddIpRestrictionForSubAccountApiKeyResponse; +import com.binance.connector.client.sub_account.rest.model.CreateSubAccountApiKeyRequest; +import com.binance.connector.client.sub_account.rest.model.CreateSubAccountApiKeyResponse; import com.binance.connector.client.sub_account.rest.model.DeleteIpListForASubAccountApiKeyResponse; import com.binance.connector.client.sub_account.rest.model.GetIpRestrictionForASubAccountApiKeyResponse; +import com.binance.connector.client.sub_account.rest.model.ModifySubAccountApiKeyPermissionRequest; +import com.binance.connector.client.sub_account.rest.model.ModifySubAccountApiKeyPermissionResponse; +import com.binance.connector.client.sub_account.rest.model.QuerySubAccountApiKeyResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -79,21 +85,23 @@ public void initApiClient() throws ApiException { } /** - * Add IP Restriction for Sub-Account API key(For Master Account) + * Add IP Restriction for Sub-Account API key (For Master Account) (USER_DATA) * - *

Add IP Restriction for Sub-Account API key * You need to enable Enable Spot & Margin - * Trading option for the api key which requests this endpoint Weight: 3000 + *

Add IP Restriction for Sub-Account API key Weight(UID): 3000 Security Type: USER_DATA + * Notes: - You need to enable Enable Spot & Margin Trading option for the api key which + * requests this endpoint * * @throws ApiException if the Api call fails */ @Test - public void addIpRestrictionForSubAccountApiKeyTest() throws ApiException, CryptoException { + public void addIpRestrictionForSubAccountApiKeyTest() + throws ApiException, CryptoException, IOException { AddIpRestrictionForSubAccountApiKeyRequest addIpRestrictionForSubAccountApiKeyRequest = new AddIpRestrictionForSubAccountApiKeyRequest(); - - addIpRestrictionForSubAccountApiKeyRequest.email("sub-account-email@email.com"); - addIpRestrictionForSubAccountApiKeyRequest.subAccountApiKey(""); - addIpRestrictionForSubAccountApiKeyRequest.status(0L); + addIpRestrictionForSubAccountApiKeyRequest.email("123@test.com"); + addIpRestrictionForSubAccountApiKeyRequest.subAccountApiKey( + "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf"); + addIpRestrictionForSubAccountApiKeyRequest.status(1L); ApiResponse response = api.addIpRestrictionForSubAccountApiKey(addIpRestrictionForSubAccountApiKeyRequest); @@ -109,29 +117,67 @@ public void addIpRestrictionForSubAccountApiKeyTest() throws ApiException, Crypt Request actualRequest = captorValue.request(); assertEquals( - "timestamp=1736393892000subAccountApiKey=&email=sub-account-email%40email.com&status=0", - signInputCaptor.getValue()); + "timestamp=1736393892000subAccountApiKey=k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf&email=123%40test.com&status=1", signInputCaptor.getValue()); assertEquals( - "d353219f3c6ee7a2df7814796f98e89d858731d4dd62d05bc95115557ac07395", + "10b9be96322a99a8df7350adc4a31ad362107b2424fbc87df0fefb76179c5f71", actualRequest.url().queryParameter("signature")); assertEquals( - "/sapi/v2/sub-account/subAccountApi/ipRestriction", - actualRequest.url().encodedPath()); + "/sapi/v2/sub-account/subAccountApi/ipRestriction", actualRequest.url().encodedPath()); + } + + /** + * Create Sub-account API Key (For Master Account) (USER_DATA) + * + *

Create a new API Key for a sub-account. Weight(UID): 3000 Security Type: USER_DATA Notes: + * - `status=2` requires `ipAddress` - `status=3` + * requires `thirdPartyName` - Asset Sub Account is not supported - The caller must + * pass the KYC IP restriction check + * + * @throws ApiException if the Api call fails + */ + @Test + public void createSubAccountApiKeyTest() throws ApiException, CryptoException, IOException { + CreateSubAccountApiKeyRequest createSubAccountApiKeyRequest = + new CreateSubAccountApiKeyRequest(); + createSubAccountApiKeyRequest.email("123@test.com"); + createSubAccountApiKeyRequest.apiName("myKey"); + createSubAccountApiKeyRequest.status(2L); + + ApiResponse response = + api.createSubAccountApiKey(createSubAccountApiKeyRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000apiName=myKey&email=123%40test.com&status=2", signInputCaptor.getValue()); + assertEquals( + "af3018ac7a726476eede3f9d14eea6149c3520387882cc202a0d111836564410", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/sub-account/subAccountApi", actualRequest.url().encodedPath()); } /** - * Delete IP List For a Sub-account API Key(For Master Account) + * Delete IP List For a Sub-account API Key (For Master Account) (USER_DATA) * - *

Delete IP List For a Sub-account API Key * You need to enable Enable Spot & Margin - * Trading option for the api key which requests this endpoint Weight: 3000 + *

Delete IP List For a Sub-account API Key Weight(UID): 3000 Security Type: USER_DATA Notes: + * - You need to enable Enable Spot & Margin Trading option for the api key which requests + * this endpoint * * @throws ApiException if the Api call fails */ @Test - public void deleteIpListForASubAccountApiKeyTest() throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; - String subAccountApiKey = ""; - String ipAddress = ""; + public void deleteIpListForASubAccountApiKeyTest() + throws ApiException, CryptoException, IOException { + String email = "123@test.com"; + String subAccountApiKey = "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf"; + String ipAddress = "69.210.67.14"; Long recvWindow = 5000L; ApiResponse response = api.deleteIpListForASubAccountApiKey( @@ -148,27 +194,58 @@ public void deleteIpListForASubAccountApiKeyTest() throws ApiException, CryptoEx Request actualRequest = captorValue.request(); assertEquals( - "email=sub-account-email%40email.com&subAccountApiKey=&ipAddress=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "email=123%40test.com&subAccountApiKey=k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf&ipAddress=69.210.67.14&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "dbfd7714cbc071ac272d2f9402317af166eb5054a8365e3e2960cf219547989f", + "fcf6da2e048cde255b743acc675bf3d57be293cec543273c464be1bc04a24bef", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/sub-account/subAccountApi/ipRestriction/ipList", actualRequest.url().encodedPath()); + } + + /** + * Delete Sub-account API Key (For Master Account) (USER_DATA) + * + *

Delete an API Key of a sub-account. Weight(UID): 3000 Security Type: USER_DATA Notes: - + * Asset Sub Account is not supported - The caller must pass the KYC IP restriction check + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteSubAccountApiKeyTest() throws ApiException, CryptoException, IOException { + String email = "123@test.com"; + String subAccountApiKey = "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf"; + Long recvWindow = 5000L; + ApiResponse response = + api.deleteSubAccountApiKey(email, subAccountApiKey, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("email=123%40test.com&subAccountApiKey=k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "/sapi/v1/sub-account/subAccountApi/ipRestriction/ipList", - actualRequest.url().encodedPath()); + "80e6a8dde164d84d85ddb6a4aa6079b30842518b288430f6cf260f1c70069c30", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/sub-account/subAccountApi", actualRequest.url().encodedPath()); } /** - * Get IP Restriction for a Sub-account API Key(For Master Account) + * Get IP Restriction for a Sub-account API Key (For Master Account) (USER_DATA) * - *

Get IP Restriction for a Sub-account API Key Weight: 3000 + *

Get IP Restriction for a Sub-account API Key Weight(UID): 3000 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getIpRestrictionForASubAccountApiKeyTest() throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; - String subAccountApiKey = ""; + public void getIpRestrictionForASubAccountApiKeyTest() + throws ApiException, CryptoException, IOException { + String email = "123@test.com"; + String subAccountApiKey = "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf"; Long recvWindow = 5000L; ApiResponse response = api.getIpRestrictionForASubAccountApiKey(email, subAccountApiKey, recvWindow); @@ -184,13 +261,84 @@ public void getIpRestrictionForASubAccountApiKeyTest() throws ApiException, Cryp Request actualRequest = captorValue.request(); assertEquals( - "email=sub-account-email%40email.com&subAccountApiKey=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "email=123%40test.com&subAccountApiKey=k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "0ed08ff7787abeae64a40e4a8ddebfefa8063a9c5015b702faa20ffa367a3a3e", + "80e6a8dde164d84d85ddb6a4aa6079b30842518b288430f6cf260f1c70069c30", actualRequest.url().queryParameter("signature")); assertEquals( - "/sapi/v1/sub-account/subAccountApi/ipRestriction", - actualRequest.url().encodedPath()); + "/sapi/v1/sub-account/subAccountApi/ipRestriction", actualRequest.url().encodedPath()); + } + + /** + * Modify Sub-account API Key Permission (For Master Account) (USER_DATA) + * + *

Modify the trading permissions of a sub-account API Key. Weight(UID): 3000 Security Type: + * USER_DATA Notes: - Portfolio Margin Retail User is not supported - Asset Sub Account is not + * supported - The caller must pass the KYC IP restriction check + * + * @throws ApiException if the Api call fails + */ + @Test + public void modifySubAccountApiKeyPermissionTest() + throws ApiException, CryptoException, IOException { + ModifySubAccountApiKeyPermissionRequest modifySubAccountApiKeyPermissionRequest = + new ModifySubAccountApiKeyPermissionRequest(); + modifySubAccountApiKeyPermissionRequest.email("123@test.com"); + modifySubAccountApiKeyPermissionRequest.subAccountApiKey( + "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf"); + + ApiResponse response = + api.modifySubAccountApiKeyPermission(modifySubAccountApiKeyPermissionRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals( + "timestamp=1736393892000subAccountApiKey=k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf&email=123%40test.com", signInputCaptor.getValue()); + assertEquals( + "7116a15872faa072b6a520117252274d64df2a4cbd96e08e9e8d0445af0e4b23", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/sub-account/subAccountApiPermission", actualRequest.url().encodedPath()); + } + + /** + * Query Sub-account API Key (For Master Account) (USER_DATA) + * + *

Query the API Key list of a sub-account. Weight(UID): 3000 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void querySubAccountApiKeyTest() throws ApiException, CryptoException, IOException { + String email = "123@test.com"; + String subAccountApiKey = "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf"; + Long page = 1L; + Long size = 30L; + Long recvWindow = 5000L; + ApiResponse response = + api.querySubAccountApiKey(email, subAccountApiKey, page, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("email=123%40test.com&subAccountApiKey=k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf&page=1&size=30&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "352ad470dd82f59a301f0fd900b181fdab2fe9f33c3fd6cad968480b7aa41b28", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/sub-account/subAccountApi", actualRequest.url().encodedPath()); } } diff --git a/clients/sub-account/src/test/java/com/binance/connector/client/sub_account/rest/api/AssetManagementApiTest.java b/clients/sub-account/src/test/java/com/binance/connector/client/sub_account/rest/api/AssetManagementApiTest.java index bfc841108..2cc7bec68 100644 --- a/clients/sub-account/src/test/java/com/binance/connector/client/sub_account/rest/api/AssetManagementApiTest.java +++ b/clients/sub-account/src/test/java/com/binance/connector/client/sub_account/rest/api/AssetManagementApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; +import com.binance.connector.client.sub_account.rest.model.FromAccountType; import com.binance.connector.client.sub_account.rest.model.FuturesTransferForSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.FuturesTransferForSubAccountResponse; import com.binance.connector.client.sub_account.rest.model.GetDetailOnSubAccountsFuturesAccountResponse; @@ -39,6 +40,7 @@ import com.binance.connector.client.sub_account.rest.model.MovePositionForSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.MovePositionForSubAccountResponse; import com.binance.connector.client.sub_account.rest.model.OrderArgs; +import com.binance.connector.client.sub_account.rest.model.ProductType; import com.binance.connector.client.sub_account.rest.model.QuerySubAccountAssetsAssetManagementResponse; import com.binance.connector.client.sub_account.rest.model.QuerySubAccountAssetsResponse; import com.binance.connector.client.sub_account.rest.model.QuerySubAccountFuturesAssetTransferHistoryResponse; @@ -48,6 +50,7 @@ import com.binance.connector.client.sub_account.rest.model.SubAccountFuturesAssetTransferRequest; import com.binance.connector.client.sub_account.rest.model.SubAccountFuturesAssetTransferResponse; import com.binance.connector.client.sub_account.rest.model.SubAccountTransferHistoryResponse; +import com.binance.connector.client.sub_account.rest.model.ToAccountType; import com.binance.connector.client.sub_account.rest.model.TransferToMasterRequest; import com.binance.connector.client.sub_account.rest.model.TransferToMasterResponse; import com.binance.connector.client.sub_account.rest.model.TransferToSubAccountOfSameMasterRequest; @@ -55,6 +58,7 @@ import com.binance.connector.client.sub_account.rest.model.UniversalTransferRequest; import com.binance.connector.client.sub_account.rest.model.UniversalTransferResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -106,22 +110,23 @@ public void initApiClient() throws ApiException { } /** - * Futures Transfer for Sub-account(For Master Account) + * Futures Transfer for Sub-account (For Master Account) (USER_DATA) * - *

Futures Transfer for Sub-account * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 1 + *

Futures Transfer for Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - You need + * to open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ @Test - public void futuresTransferForSubAccountTest() throws ApiException, CryptoException { + public void futuresTransferForSubAccountTest() + throws ApiException, CryptoException, IOException { FuturesTransferForSubAccountRequest futuresTransferForSubAccountRequest = new FuturesTransferForSubAccountRequest(); - - futuresTransferForSubAccountRequest.email("sub-account-email@email.com"); - futuresTransferForSubAccountRequest.asset(""); - futuresTransferForSubAccountRequest.amount(1d); - futuresTransferForSubAccountRequest.type(0L); + futuresTransferForSubAccountRequest.email("123@test.com"); + futuresTransferForSubAccountRequest.asset("USDT"); + futuresTransferForSubAccountRequest.amount(1.0d); + futuresTransferForSubAccountRequest.type(1L); ApiResponse response = api.futuresTransferForSubAccount(futuresTransferForSubAccountRequest); @@ -136,25 +141,24 @@ public void futuresTransferForSubAccountTest() throws ApiException, CryptoExcept Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000amount=1&asset=USDT&type=1&email=123%40test.com", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000amount=1&asset=&type=0&email=sub-account-email%40email.com", - signInputCaptor.getValue()); - assertEquals( - "bf6b436ab70f514d79e64c39ea94336c5d3f4a29f2b5f1208fc22df45e232930", + "7bc8ea3e7875d927c4e38ff8b07f165dc379a617c8aafaee5251e58238257aa1", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/sub-account/futures/transfer", actualRequest.url().encodedPath()); } /** - * Get Detail on Sub-account's Futures Account(For Master Account) + * Get Detail on Sub-account's Futures Account (For Master Account) (USER_DATA) * - *

Get Detail on Sub-account's Futures Account Weight: 10 + *

Get Detail on Sub-account's Futures Account Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getDetailOnSubAccountsFuturesAccountTest() throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; + public void getDetailOnSubAccountsFuturesAccountTest() + throws ApiException, CryptoException, IOException { + String email = "123@test.com"; Long recvWindow = 5000L; ApiResponse response = api.getDetailOnSubAccountsFuturesAccount(email, recvWindow); @@ -170,25 +174,26 @@ public void getDetailOnSubAccountsFuturesAccountTest() throws ApiException, Cryp Request actualRequest = captorValue.request(); assertEquals( - "email=sub-account-email%40email.com&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "email=123%40test.com&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "bbb3a67207210f851b76211eae9566a7b03cd2d37dde4e5b73d48265f7b9197e", + "cd63404bc561d336289e8cb941b7cdf71a2a31b8167ead6c6b6d60e0279653ce", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/sub-account/futures/account", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/sub-account/futures/account", actualRequest.url().encodedPath()); } /** - * Get Detail on Sub-account's Futures Account V2(For Master Account) + * Get Detail on Sub-account's Futures Account V2 (For Master Account) (USER_DATA) * - *

Get Detail on Sub-account's Futures Account Weight: 1 + *

Get Detail on Sub-account's Futures Account Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getDetailOnSubAccountsFuturesAccountV2Test() throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; - Long futuresType = 0L; + public void getDetailOnSubAccountsFuturesAccountV2Test() + throws ApiException, CryptoException, IOException { + String email = "123@test.com"; + Long futuresType = 1L; Long recvWindow = 5000L; ApiResponse response = api.getDetailOnSubAccountsFuturesAccountV2(email, futuresType, recvWindow); @@ -204,24 +209,26 @@ public void getDetailOnSubAccountsFuturesAccountV2Test() throws ApiException, Cr Request actualRequest = captorValue.request(); assertEquals( - "email=sub-account-email%40email.com&futuresType=0&recvWindow=5000×tamp=1736393892000", + "email=123%40test.com&futuresType=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "cc664677d48539d81fe257dafb4f793b0036ed86f73c1bca867f692c34b6b490", + "26bcd5b994bb829b3a59484013a4fce2a60ba12d6f08fbe5a00173000cbe40c7", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v2/sub-account/futures/account", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v2/sub-account/futures/account", actualRequest.url().encodedPath()); } /** - * Get Detail on Sub-account's Margin Account(For Master Account) + * Get Detail on Sub-account's Margin Account (For Master Account) (USER_DATA) * - *

Get Detail on Sub-account's Margin Account Weight: 10 + *

Get Detail on Sub-account's Margin Account Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getDetailOnSubAccountsMarginAccountTest() throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; + public void getDetailOnSubAccountsMarginAccountTest() + throws ApiException, CryptoException, IOException { + String email = "123@test.com"; Long recvWindow = 5000L; ApiResponse response = api.getDetailOnSubAccountsMarginAccount(email, recvWindow); @@ -237,36 +244,38 @@ public void getDetailOnSubAccountsMarginAccountTest() throws ApiException, Crypt Request actualRequest = captorValue.request(); assertEquals( - "email=sub-account-email%40email.com&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "email=123%40test.com&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "bbb3a67207210f851b76211eae9566a7b03cd2d37dde4e5b73d48265f7b9197e", + "cd63404bc561d336289e8cb941b7cdf71a2a31b8167ead6c6b6d60e0279653ce", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/sub-account/margin/account", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/sub-account/margin/account", actualRequest.url().encodedPath()); } /** - * Get Move Position History for Sub-account (For Master Account) + * Get Move Position History for Sub-account (For Master Account) (USER_DATA) * - *

Query move position history * If `startTime` and `endTime` not sent, - * return records of the last 90 days by default with 1000 maximum limits * If - * `startTime` is sent and `endTime` is not sent, return records of - * [max(startTime, now-90d), now]. * If `startTime` is not sent and - * `endTime` is sent, return records of [max(now,endTime-90d), endTime]. Weight: 150 + *

Query move position history Weight(IP): 1 Security Type: USER_DATA Notes: - If + * `startTime` and `endTime` are both omitted, records from the last 90 days + * are returned by default (up to 1000 records). - If `startTime` is sent and + * `endTime` is omitted, records in `[max(startTime, now-90d), now]` are + * returned. - If `startTime` is omitted and `endTime` is sent, records in + * `[max(now, endTime-90d), endTime]` are returned. * * @throws ApiException if the Api call fails */ @Test - public void getMovePositionHistoryForSubAccountTest() throws ApiException, CryptoException { - String symbol = ""; - Long page = 0L; - Long row = 0L; + public void getMovePositionHistoryForSubAccountTest() + throws ApiException, CryptoException, IOException { + String symbol = "BTCUSDT"; + Long page = 1L; + Long rows = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; ApiResponse response = api.getMovePositionHistoryForSubAccount( - symbol, page, row, startTime, endTime, recvWindow); + symbol, page, rows, startTime, endTime, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -279,29 +288,29 @@ public void getMovePositionHistoryForSubAccountTest() throws ApiException, Crypt Request actualRequest = captorValue.request(); assertEquals( - "symbol=&startTime=1623319461670&endTime=1641782889000&page=0&row=0&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "symbol=BTCUSDT&startTime=1623319461670&endTime=1641782889000&page=1&rows=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "18c81a868b2ecf052663446d54492c03815e35deaea39da08a0ba175cb304fa9", + "8de4d8f77b968580be9fba1f25671a319d2930766c4b3aed8a43314b76a99423", actualRequest.url().queryParameter("signature")); assertEquals( "/sapi/v1/sub-account/futures/move-position", actualRequest.url().encodedPath()); } /** - * Get Sub-account Deposit Address(For Master Account) + * Get Sub-account Deposit Address (For Master Account) (USER_DATA) * - *

Fetch sub-account deposit address * `amount` needs to be sent if using LIGHTNING - * network Weight: 1 + *

Fetch sub-account deposit address Weight(IP): 1 Security Type: USER_DATA Notes: - + * `amount` needs to be sent if using LIGHTNING network * * @throws ApiException if the Api call fails */ @Test - public void getSubAccountDepositAddressTest() throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; - String coin = ""; + public void getSubAccountDepositAddressTest() + throws ApiException, CryptoException, IOException { + String email = "123@test.com"; + String coin = "BTC"; String network = ""; - Double amount = 1d; + Double amount = 1.0d; Long recvWindow = 5000L; ApiResponse response = api.getSubAccountDepositAddress(email, coin, network, amount, recvWindow); @@ -316,26 +325,26 @@ public void getSubAccountDepositAddressTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("email=123%40test.com&coin=BTC&network=&amount=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "email=sub-account-email%40email.com&coin=&network=&amount=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "8775619e5f1bf1f99041b1f456c76870f8582b64031236aeb73211e3ad0476e0", + "3880bd931ca909128535fd68a39ef43e7c6ca42f0b85dd57ac2e4cd2095024cf", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/capital/deposit/subAddress", actualRequest.url().encodedPath()); } /** - * Get Sub-account Deposit History(For Master Account) + * Get Sub-account Deposit History (For Master Account) (USER_DATA) * - *

Fetch sub-account deposit history Weight: 1 + *

Fetch sub-account deposit history Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getSubAccountDepositHistoryTest() throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; - String coin = ""; + public void getSubAccountDepositHistoryTest() + throws ApiException, CryptoException, IOException { + String email = "123@test.com"; + Boolean includeSource = false; + String coin = "BTC"; Long status = 0L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; @@ -345,7 +354,16 @@ public void getSubAccountDepositHistoryTest() throws ApiException, CryptoExcepti String txId = "1"; ApiResponse response = api.getSubAccountDepositHistory( - email, coin, status, startTime, endTime, limit, offset, recvWindow, txId); + email, + includeSource, + coin, + status, + startTime, + endTime, + limit, + offset, + recvWindow, + txId); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -357,27 +375,28 @@ public void getSubAccountDepositHistoryTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("email=123%40test.com&includeSource=false&coin=BTC&status=0&startTime=1623319461670&endTime=1641782889000&limit=1&offset=0&recvWindow=5000&txId=1×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "email=sub-account-email%40email.com&coin=&status=0&startTime=1623319461670&endTime=1641782889000&limit=1&offset=0&recvWindow=5000&txId=1×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "102448e6732e78a00d0cbe9a0530ccb1d103db100236b95997288da33bcc321f", + "ad9815d7e54142a951eb3d10e1c96bed6c3aa4e60d63277865b587e5b7d75e83", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/capital/deposit/subHisrec", actualRequest.url().encodedPath()); } /** - * Get Summary of Sub-account's Futures Account(For Master Account) + * Get Summary of Sub-account's Futures Account (For Master Account) (USER_DATA) * - *

Get Summary of Sub-account's Futures Account Weight: 1 + *

Get Summary of Sub-account's Futures Account Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getSummaryOfSubAccountsFuturesAccountTest() throws ApiException, CryptoException { + public void getSummaryOfSubAccountsFuturesAccountTest() + throws ApiException, CryptoException, IOException { + Long page = 1L; + Long limit = 1L; Long recvWindow = 5000L; ApiResponse response = - api.getSummaryOfSubAccountsFuturesAccount(1L, 100L, recvWindow); + api.getSummaryOfSubAccountsFuturesAccount(page, limit, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -389,26 +408,29 @@ public void getSummaryOfSubAccountsFuturesAccountTest() throws ApiException, Cry Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("page=1&limit=100&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "896f98aeecf7fd75f5b6757aac79503b77ce8681d684a02de1677275f4e3217e", + "page=1&limit=1&recvWindow=5000×tamp=1736393892000", + signInputCaptor.getValue()); + assertEquals( + "8a73086a1b7b0b8fdd097b5e9651c03b0a8938014f4aae424ed1db47d1030ab6", actualRequest.url().queryParameter("signature")); assertEquals( "/sapi/v1/sub-account/futures/accountSummary", actualRequest.url().encodedPath()); } /** - * Get Summary of Sub-account's Futures Account V2(For Master Account) + * Get Summary of Sub-account's Futures Account V2 (For Master Account) (USER_DATA) * - *

Get Summary of Sub-account's Futures Account Weight: 10 + *

Get Summary of Sub-account's Futures Account Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getSummaryOfSubAccountsFuturesAccountV2Test() throws ApiException, CryptoException { - Long futuresType = 0L; + public void getSummaryOfSubAccountsFuturesAccountV2Test() + throws ApiException, CryptoException, IOException { + Long futuresType = 1L; Long page = 1L; - Long limit = 1L; + Long limit = 10L; Long recvWindow = 5000L; ApiResponse response = api.getSummaryOfSubAccountsFuturesAccountV2(futuresType, page, limit, recvWindow); @@ -424,24 +446,26 @@ public void getSummaryOfSubAccountsFuturesAccountV2Test() throws ApiException, C Request actualRequest = captorValue.request(); assertEquals( - "futuresType=0&page=1&limit=1&recvWindow=5000×tamp=1736393892000", + "futuresType=1&page=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "91064625cccb59ffc151c9ecf310ad9bab5b73b86da253f2fb2139647c3a43d1", + "92de66901bb7041e94ca3c2b3d89a9d1294d342396506a2a9a89d6958f336b2d", actualRequest.url().queryParameter("signature")); assertEquals( - "/sapi/v2/sub-account/futures/accountSummary", actualRequest.url().encodedPath()); + "/sapi/v2/sub-account/futures/accountSummary", + actualRequest.url().encodedPath()); } /** - * Get Summary of Sub-account's Margin Account(For Master Account) + * Get Summary of Sub-account's Margin Account (For Master Account) (USER_DATA) * - *

Get Summary of Sub-account's Margin Account Weight: 10 + *

Get Summary of Sub-account's Margin Account Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getSummaryOfSubAccountsMarginAccountTest() throws ApiException, CryptoException { + public void getSummaryOfSubAccountsMarginAccountTest() + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getSummaryOfSubAccountsMarginAccount(recvWindow); @@ -456,7 +480,8 @@ public void getSummaryOfSubAccountsMarginAccountTest() throws ApiException, Cryp Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); @@ -465,22 +490,23 @@ public void getSummaryOfSubAccountsMarginAccountTest() throws ApiException, Cryp } /** - * Margin Transfer for Sub-account(For Master Account) + * Margin Transfer for Sub-account (For Master Account) (USER_DATA) * - *

Margin Transfer for Sub-account * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 1 + *

Margin Transfer for Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - You need + * to open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ @Test - public void marginTransferForSubAccountTest() throws ApiException, CryptoException { + public void marginTransferForSubAccountTest() + throws ApiException, CryptoException, IOException { MarginTransferForSubAccountRequest marginTransferForSubAccountRequest = new MarginTransferForSubAccountRequest(); - - marginTransferForSubAccountRequest.email("sub-account-email@email.com"); - marginTransferForSubAccountRequest.asset(""); - marginTransferForSubAccountRequest.amount(1d); - marginTransferForSubAccountRequest.type(0L); + marginTransferForSubAccountRequest.email("123@test.com"); + marginTransferForSubAccountRequest.asset("BTC"); + marginTransferForSubAccountRequest.amount(1.0d); + marginTransferForSubAccountRequest.type(1L); ApiResponse response = api.marginTransferForSubAccount(marginTransferForSubAccountRequest); @@ -495,38 +521,36 @@ public void marginTransferForSubAccountTest() throws ApiException, CryptoExcepti Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000amount=1&asset=BTC&type=1&email=123%40test.com", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000amount=1&asset=&type=0&email=sub-account-email%40email.com", - signInputCaptor.getValue()); - assertEquals( - "bf6b436ab70f514d79e64c39ea94336c5d3f4a29f2b5f1208fc22df45e232930", + "acfe75e73013a95905b1f3ed818f99c7aad3d51ef6077334d13ae3b298542274", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/sub-account/margin/transfer", actualRequest.url().encodedPath()); } /** - * Move Position for Sub-account (For Master Account) - * - *

Move position between sub-master, master-sub, or sub-sub accounts when necessary * You - * need to Enable Trading permission for the API Key which requests this endpoint. * This - * function only support VIP level 7-9. * Only master account can use the function * Quantity - * should be positive number only * The function support normal account, PM PRO and PM PRO SPAN. - * * Only support for from account has positions * For all orders in the same orderArgs request, - * if any symbol’s total close position quantity is bigger than the symbol’s current position - * quantity, all batch orders in the same list will fail simultaneously. * Only support cross - * margin mode * The price for move position is MarkPrice only. * Not support for MSA. * Not - * support for the symbol under Reduce-Only. Weight: 150 + * Move Position for Sub-account (For Master Account) (USER_DATA) + * + *

Move position between sub-master, master-sub, or sub-sub accounts when necessary + * Weight(IP): 1 Security Type: USER_DATA Notes: - You need to enable the `Trading` + * permission for the API key used to call this endpoint. - This function is only available for + * VIP levels 7-9. - Only master accounts can call this endpoint. - `quantity` must be + * a positive number. - Supported account types: normal account, PM PRO, PM PRO SPAN, and PM + * Retail. - The source account must have positions. - For orders in the same + * `orderArgs` request, if any symbol's total close position quantity exceeds + * current position quantity, all orders in that batch fail. - Only cross margin mode is + * supported. - The move position price supports `MARK_PRICE` only. - MSA is not + * supported. - Symbols configured with `Reduce-Only` are not supported. * * @throws ApiException if the Api call fails */ @Test - public void movePositionForSubAccountTest() throws ApiException, CryptoException { + public void movePositionForSubAccountTest() throws ApiException, CryptoException, IOException { MovePositionForSubAccountRequest movePositionForSubAccountRequest = new MovePositionForSubAccountRequest(); - - movePositionForSubAccountRequest.fromUserEmail(""); - movePositionForSubAccountRequest.toUserEmail(""); - movePositionForSubAccountRequest.productType(""); + movePositionForSubAccountRequest.fromUserEmail("testFrom@google.com"); + movePositionForSubAccountRequest.toUserEmail("testTo@google.com"); + movePositionForSubAccountRequest.productType(ProductType.UM); movePositionForSubAccountRequest.orderArgs(new OrderArgs()); ApiResponse response = @@ -542,26 +566,23 @@ public void movePositionForSubAccountTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000toUserEmail=testTo%40google.com&fromUserEmail=testFrom%40google.com&orderArgs=%5B%5D&productType=UM", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000toUserEmail=&fromUserEmail=&orderArgs=%5B%5D&productType=", - signInputCaptor.getValue()); - assertEquals( - "41a35ce40a2e93c910c5f84b1e22985e11da6cf58ae1f75e82d2f00fd6f00ead", + "1320433d6bf5659d9b2271cc06f602deda4c1c404dbc95015240869cd3f28899", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/sub-account/futures/move-position", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/sub-account/futures/move-position", actualRequest.url().encodedPath()); } /** - * Query Sub-account Assets(For Master Account) + * Query Sub-account Assets (For Master Account) (USER_DATA) * - *

Fetch sub-account assets Weight: 60 + *

Fetch sub-account assets Weight(UID): 60 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void querySubAccountAssetsTest() throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; + public void querySubAccountAssetsTest() throws ApiException, CryptoException, IOException { + String email = "123@test.com"; Long recvWindow = 5000L; ApiResponse response = api.querySubAccountAssets(email, recvWindow); @@ -576,25 +597,24 @@ public void querySubAccountAssetsTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("email=123%40test.com&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "email=sub-account-email%40email.com&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "bbb3a67207210f851b76211eae9566a7b03cd2d37dde4e5b73d48265f7b9197e", + "cd63404bc561d336289e8cb941b7cdf71a2a31b8167ead6c6b6d60e0279653ce", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v3/sub-account/assets", actualRequest.url().encodedPath()); } /** - * Query Sub-account Assets (For Master Account)(USER_DATA) + * Query Sub-account Assets V4 (For Master Account) (USER_DATA) * - *

Fetch sub-account assets Weight: 60 + *

Fetch sub-account assets Weight(UID): 60 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void querySubAccountAssetsAssetManagementTest() throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; + public void querySubAccountAssetsAssetManagementTest() + throws ApiException, CryptoException, IOException { + String email = "123@test.com"; Long recvWindow = 5000L; ApiResponse response = api.querySubAccountAssetsAssetManagement(email, recvWindow); @@ -610,30 +630,30 @@ public void querySubAccountAssetsAssetManagementTest() throws ApiException, Cryp Request actualRequest = captorValue.request(); assertEquals( - "email=sub-account-email%40email.com&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "email=123%40test.com&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "bbb3a67207210f851b76211eae9566a7b03cd2d37dde4e5b73d48265f7b9197e", + "cd63404bc561d336289e8cb941b7cdf71a2a31b8167ead6c6b6d60e0279653ce", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v4/sub-account/assets", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v4/sub-account/assets", actualRequest.url().encodedPath()); } /** - * Query Sub-account Futures Asset Transfer History(For Master Account) + * Query Sub-account Futures Asset Transfer History (For Master Account) (USER_DATA) * - *

Query Sub-account Futures Asset Transfer History Weight: 1 + *

Query Sub-account Futures Asset Transfer History Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test public void querySubAccountFuturesAssetTransferHistoryTest() - throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; - Long futuresType = 0L; + throws ApiException, CryptoException, IOException { + String email = "123@test.com"; + Long futuresType = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long page = 1L; - Long limit = 1L; + Long limit = 10L; Long recvWindow = 5000L; ApiResponse response = api.querySubAccountFuturesAssetTransferHistory( @@ -650,31 +670,35 @@ public void querySubAccountFuturesAssetTransferHistoryTest() Request actualRequest = captorValue.request(); assertEquals( - "email=sub-account-email%40email.com&futuresType=0&startTime=1623319461670&endTime=1641782889000&page=1&limit=1&recvWindow=5000×tamp=1736393892000", + "email=123%40test.com&futuresType=1&startTime=1623319461670&endTime=1641782889000&page=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "c4d0e5c4714d29882f1af3ebcc672cfc31cc002bb0830b62109f5aa90e739f99", + "fd0fcd6f5728a7271cffd9fca3460d0702847009aae87971969ac28f728697b7", actualRequest.url().queryParameter("signature")); assertEquals( - "/sapi/v1/sub-account/futures/internalTransfer", actualRequest.url().encodedPath()); + "/sapi/v1/sub-account/futures/internalTransfer", + actualRequest.url().encodedPath()); } /** - * Query Sub-account Spot Asset Transfer History(For Master Account) + * Query Sub-account Spot Asset Transfer History (For Master Account) (USER_DATA) * - *

Query Sub-account Spot Asset Transfer History * fromEmail and toEmail cannot be sent at - * the same time. * Return fromEmail equal master account email by default. Weight: 1 + *

Query Sub-account Spot Asset Transfer History Weight(IP): 1 Security Type: USER_DATA + * Notes: - `fromEmail` and `toEmail` cannot be sent at the same time. - If + * both `fromEmail` and `toEmail` are omitted, records with + * `fromEmail` equal to the master account are returned by default. * * @throws ApiException if the Api call fails */ @Test - public void querySubAccountSpotAssetTransferHistoryTest() throws ApiException, CryptoException { - String fromEmail = ""; - String toEmail = ""; + public void querySubAccountSpotAssetTransferHistoryTest() + throws ApiException, CryptoException, IOException { + String fromEmail = "aaa@test.com"; + String toEmail = "bbb@test.com"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long page = 1L; - Long limit = 1L; + Long limit = 10L; Long recvWindow = 5000L; ApiResponse response = api.querySubAccountSpotAssetTransferHistory( @@ -691,25 +715,27 @@ public void querySubAccountSpotAssetTransferHistoryTest() throws ApiException, C Request actualRequest = captorValue.request(); assertEquals( - "fromEmail=&toEmail=&startTime=1623319461670&endTime=1641782889000&page=1&limit=1&recvWindow=5000×tamp=1736393892000", + "fromEmail=aaa%40test.com&toEmail=bbb%40test.com&startTime=1623319461670&endTime=1641782889000&page=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "5a40d1d45de6e9395280b83d016f73de6f73ff423e20c0fcb787a1bc354e420d", + "380f287e79c1bf8fc0d5d115153310b032b2fbba418a461b6969c0461cb564d6", actualRequest.url().queryParameter("signature")); assertEquals( - "/sapi/v1/sub-account/sub/transfer/history", actualRequest.url().encodedPath()); + "/sapi/v1/sub-account/sub/transfer/history", + actualRequest.url().encodedPath()); } /** - * Query Sub-account Spot Assets Summary(For Master Account) + * Query Sub-account Spot Assets Summary (For Master Account) (USER_DATA) * - *

Get BTC valued asset summary of subaccounts. Weight: 1 + *

Get BTC valued asset summary of subaccounts. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void querySubAccountSpotAssetsSummaryTest() throws ApiException, CryptoException { - String email = ""; + public void querySubAccountSpotAssetsSummaryTest() + throws ApiException, CryptoException, IOException { + String email = "123@test.com"; Long page = 1L; Long size = 10L; Long recvWindow = 5000L; @@ -727,33 +753,35 @@ public void querySubAccountSpotAssetsSummaryTest() throws ApiException, CryptoEx Request actualRequest = captorValue.request(); assertEquals( - "email=&page=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "email=123%40test.com&page=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "30a3e7836aa5dd96d832dd8e3c856015220d2b5a47b1fa45aad6b3529dd17798", + "9029a18d45f4a77c0c74df77bdb6839600bd23be68520dca80fe9697ef906e63", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/sub-account/spotSummary", actualRequest.url().encodedPath()); } /** - * Query Universal Transfer History(For Master Account) + * Query Universal Transfer History (For Master Account) (USER_DATA) * - *

Query Universal Transfer History * fromEmail and toEmail cannot be sent at the same time. - * * Return fromEmail equal master account email by default. * The query time period must be - * less than 7 days. * If startTime and endTime not sent, return records of the last 7 days by - * default. Weight: 1 + *

Query Universal Transfer History Weight(IP): 1 Security Type: USER_DATA Notes: - + * `fromEmail` and `toEmail` cannot be sent at the same time. - If both + * `fromEmail` and `toEmail` are omitted, records with `fromEmail` + * equal to the master account are returned by default. - The query time range must be less than + * 7 days. - If `startTime` and `endTime` are omitted, records from the last + * 7 days are returned by default. * * @throws ApiException if the Api call fails */ @Test - public void queryUniversalTransferHistoryTest() throws ApiException, CryptoException { - String fromEmail = ""; - String toEmail = ""; + public void queryUniversalTransferHistoryTest() + throws ApiException, CryptoException, IOException { + String fromEmail = "abctest@gmail.com"; + String toEmail = "deftest@gmail.com"; String clientTranId = "1"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long page = 1L; - Long limit = 1L; + Long limit = 10L; Long recvWindow = 5000L; ApiResponse response = api.queryUniversalTransferHistory( @@ -776,33 +804,32 @@ public void queryUniversalTransferHistoryTest() throws ApiException, CryptoExcep Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("fromEmail=abctest%40gmail.com&toEmail=deftest%40gmail.com&clientTranId=1&startTime=1623319461670&endTime=1641782889000&page=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "fromEmail=&toEmail=&clientTranId=1&startTime=1623319461670&endTime=1641782889000&page=1&limit=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "ac017b8d58998a26258f4669f08515619a652c0fdf9090a42bc95c0afa358cd6", + "1cd85eef2d15a61441518a575c60a87e65f4f9ea3724d0b7ef7b1889b8a05a39", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/sub-account/universalTransfer", actualRequest.url().encodedPath()); } /** - * Sub-account Futures Asset Transfer(For Master Account) + * Sub-account Futures Asset Transfer (For Master Account) (USER_DATA) * - *

Sub-account Futures Asset Transfer * Master account can transfer max 2000 times a minute * - * There must be sufficient margin balance in futures wallet to execute transferring. Weight: 1 + *

Sub-account Futures Asset Transfer Weight(IP): 1 Security Type: USER_DATA Notes: - A + * master account can transfer at most 2000 times per minute. - The futures wallet must have + * sufficient margin balance to execute the transfer. * * @throws ApiException if the Api call fails */ @Test - public void subAccountFuturesAssetTransferTest() throws ApiException, CryptoException { + public void subAccountFuturesAssetTransferTest() + throws ApiException, CryptoException, IOException { SubAccountFuturesAssetTransferRequest subAccountFuturesAssetTransferRequest = new SubAccountFuturesAssetTransferRequest(); - - subAccountFuturesAssetTransferRequest.fromEmail(""); - subAccountFuturesAssetTransferRequest.toEmail(""); - subAccountFuturesAssetTransferRequest.futuresType(0L); - subAccountFuturesAssetTransferRequest.asset(""); - subAccountFuturesAssetTransferRequest.amount(1d); + subAccountFuturesAssetTransferRequest.fromEmail("abc@test.com"); + subAccountFuturesAssetTransferRequest.toEmail("def@test.com"); + subAccountFuturesAssetTransferRequest.futuresType(1L); + subAccountFuturesAssetTransferRequest.asset("BTC"); + subAccountFuturesAssetTransferRequest.amount(1.0d); ApiResponse response = api.subAccountFuturesAssetTransfer(subAccountFuturesAssetTransferRequest); @@ -817,32 +844,30 @@ public void subAccountFuturesAssetTransferTest() throws ApiException, CryptoExce Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000futuresType=1&amount=1&asset=BTC&toEmail=def%40test.com&fromEmail=abc%40test.com", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000futuresType=0&amount=1&asset=&toEmail=&fromEmail=", - signInputCaptor.getValue()); - assertEquals( - "a51c95722d0cbc7ff57e9310070dd556eda7eb06c2f2475c12de4c0349c9656c", + "807dc89039b8eb976af3c128a2532ea5488569e8b8753ca77923b29cb8a940e1", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/sub-account/futures/internalTransfer", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/sub-account/futures/internalTransfer", actualRequest.url().encodedPath()); } /** - * Sub-account Transfer History(For Sub-account) + * Sub-account Transfer History (For Sub-account) (USER_DATA) * - *

Sub-account Transfer History * If type is not sent, the records of type 2: transfer out - * will be returned by default. * If startTime and endTime are not sent, the recent 30-day data - * will be returned. Weight: 1 + *

Sub-account Transfer History Weight(IP): 1 Security Type: USER_DATA Notes: - If + * `type` is not sent, records of type `2` (transfer out) are returned by + * default. - If `startTime` and `endTime` are not sent, data from the most + * recent 30 days is returned. * * @throws ApiException if the Api call fails */ @Test - public void subAccountTransferHistoryTest() throws ApiException, CryptoException { - String asset = ""; - Long type = 0L; + public void subAccountTransferHistoryTest() throws ApiException, CryptoException, IOException { + String asset = "BTC"; + Long type = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 1L; + Long limit = 10L; Boolean returnFailHistory = false; Long recvWindow = 5000L; ApiResponse response = @@ -859,30 +884,26 @@ public void subAccountTransferHistoryTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("asset=BTC&type=1&startTime=1623319461670&endTime=1641782889000&limit=10&returnFailHistory=false&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "asset=&type=0&startTime=1623319461670&endTime=1641782889000&limit=1&returnFailHistory=false&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "f8ec137c5ce8cc18e82982dd1f3ade0cc6487f4878f4c39fe921a213d2be01e8", + "969bb015eeb3d1ae1acd05e28a092c9d5f1d1174a93d590ac884595fbd0b2c5f", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/sub-account/transfer/subUserHistory", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/sub-account/transfer/subUserHistory", actualRequest.url().encodedPath()); } /** - * Transfer to Master(For Sub-account) + * Transfer to Master (For Sub-account) (USER_DATA) * - *

Transfer to Master * You need to open Enable Spot & Margin Trading permission for the - * API Key which requests this endpoint. Weight: 1 + *

Transfer to Master Weight(IP): 1 Security Type: USER_DATA Notes: - You need to open Enable + * Spot & Margin Trading permission for the API Key which requests this endpoint. * * @throws ApiException if the Api call fails */ @Test - public void transferToMasterTest() throws ApiException, CryptoException { + public void transferToMasterTest() throws ApiException, CryptoException, IOException { TransferToMasterRequest transferToMasterRequest = new TransferToMasterRequest(); - - transferToMasterRequest.asset(""); - transferToMasterRequest.amount(1d); + transferToMasterRequest.asset("BTC"); + transferToMasterRequest.amount(1.0d); ApiResponse response = api.transferToMaster(transferToMasterRequest); @@ -897,30 +918,29 @@ public void transferToMasterTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000amount=1&asset=", signInputCaptor.getValue()); - assertEquals( - "bdf4ac8bca8190f70887c6f51a3651b89a8e693487de037a66a7d489ebcde7a4", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000amount=1&asset=BTC", signInputCaptor.getValue()); assertEquals( - "/sapi/v1/sub-account/transfer/subToMaster", actualRequest.url().encodedPath()); + "401ec13536653d8adc80da2b5661f41137968cfb90e0426e64ad721169840276", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/sub-account/transfer/subToMaster", actualRequest.url().encodedPath()); } /** - * Transfer to Sub-account of Same Master(For Sub-account) + * Transfer to Sub-account of Same Master (For Sub-account) (USER_DATA) * - *

Transfer to Sub-account of Same Master * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 1 + *

Transfer to Sub-account of Same Master Weight(IP): 1 Security Type: USER_DATA Notes: - You + * need to open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ @Test - public void transferToSubAccountOfSameMasterTest() throws ApiException, CryptoException { + public void transferToSubAccountOfSameMasterTest() + throws ApiException, CryptoException, IOException { TransferToSubAccountOfSameMasterRequest transferToSubAccountOfSameMasterRequest = new TransferToSubAccountOfSameMasterRequest(); - - transferToSubAccountOfSameMasterRequest.toEmail(""); - transferToSubAccountOfSameMasterRequest.asset(""); - transferToSubAccountOfSameMasterRequest.amount(1d); + transferToSubAccountOfSameMasterRequest.toEmail("abc@test.com"); + transferToSubAccountOfSameMasterRequest.asset("BTC"); + transferToSubAccountOfSameMasterRequest.amount(1.0d); ApiResponse response = api.transferToSubAccountOfSameMaster(transferToSubAccountOfSameMasterRequest); @@ -935,39 +955,41 @@ public void transferToSubAccountOfSameMasterTest() throws ApiException, CryptoEx Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000amount=1&asset=&toEmail=", signInputCaptor.getValue()); assertEquals( - "227adce1b6fa8cd89964bd4feedcc86fc42fea35068da084d94698405ba251b8", + "timestamp=1736393892000amount=1&asset=BTC&toEmail=abc%40test.com", signInputCaptor.getValue()); + assertEquals( + "f98122953530ecdb9458c84710d33fce8a94aa4ccaca94c66fc06f42265ca416", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/sub-account/transfer/subToSub", actualRequest.url().encodedPath()); } /** - * Universal Transfer(For Master Account) - * - *

Universal Transfer * You need to enable \"internal transfer\" option for the api - * key which requests this endpoint. * Transfer from master account by default if fromEmail is - * not sent. * Transfer to master account by default if toEmail is not sent. * At least either - * fromEmail or toEmail need to be sent when the fromAccountType and the toAccountType are the - * same. * Supported transfer scenarios: * `SPOT` transfer to `SPOT`, - * `USDT_FUTURE`, `COIN_FUTURE` (regardless of master or sub) * - * `SPOT`, `USDT_FUTURE`, `COIN_FUTURE` transfer to - * `SPOT` (regardless of master or sub) * Master account `SPOT` transfer to - * sub-account `MARGIN(Cross)`, `ISOLATED_MARGIN` * Sub-account - * `MARGIN(Cross)`, `ISOLATED_MARGIN` transfer to master account - * `SPOT` * Sub-account `MARGIN(Cross)` transfer to Sub-account - * `MARGIN(Cross)` Weight: 1 + * Universal Transfer (For Master Account) (USER_DATA) + * + *

Universal Transfer Weight(IP): 1 Weight(UID): 360 Security Type: USER_DATA Notes: - You + * need to enable the `internal transfer` option for the API key used to call this + * endpoint. - If `fromEmail` is not sent, transfer out from the master account by + * default. - If `toEmail` is not sent, transfer into the master account by default. - + * When `fromAccountType` and `toAccountType` are the same, at least one of + * `fromEmail` or `toEmail` must be sent. - Supported transfer scenarios: - + * `SPOT` -> `SPOT` / `USDT_FUTURE` / `COIN_FUTURE` + * (master or sub-account). - `SPOT` / `USDT_FUTURE` / + * `COIN_FUTURE` -> `SPOT` (master or sub-account). - Master account + * `SPOT` -> sub-account `MARGIN(Cross)` / `ISOLATED_MARGIN`. - + * Sub-account `MARGIN(Cross)` / `ISOLATED_MARGIN` -> master account + * `SPOT`. - Sub-account `MARGIN(Cross)` -> sub-account + * `MARGIN(Cross)`. - `ALPHA` -> `ALPHA` (master or + * sub-account). * * @throws ApiException if the Api call fails */ @Test - public void universalTransferTest() throws ApiException, CryptoException { + public void universalTransferTest() throws ApiException, CryptoException, IOException { UniversalTransferRequest universalTransferRequest = new UniversalTransferRequest(); - - universalTransferRequest.fromAccountType(""); - universalTransferRequest.toAccountType(""); - universalTransferRequest.asset(""); - universalTransferRequest.amount(1d); + universalTransferRequest.fromAccountType(FromAccountType.SPOT); + universalTransferRequest.toAccountType(ToAccountType.SPOT); + universalTransferRequest.asset("BTC"); + universalTransferRequest.amount(1.0d); ApiResponse response = api.universalTransfer(universalTransferRequest); @@ -982,12 +1004,9 @@ public void universalTransferTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000fromAccountType=SPOT&amount=1&toAccountType=SPOT&asset=BTC", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000fromAccountType=&amount=1&toAccountType=&asset=", - signInputCaptor.getValue()); - assertEquals( - "b299285ec20b4728448d2443690e3837d61e4112f0d26f981519c52d26e32928", - actualRequest.url().queryParameter("signature")); + "a34e9fef9cb7695920bbd303d4ea4c6d1cfe91f4e6cda0d3629f4ab99f8433c4", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/sub-account/universalTransfer", actualRequest.url().encodedPath()); } } diff --git a/clients/sub-account/src/test/java/com/binance/connector/client/sub_account/rest/api/ManagedSubAccountApiTest.java b/clients/sub-account/src/test/java/com/binance/connector/client/sub_account/rest/api/ManagedSubAccountApiTest.java index 7c51bf295..c2c0c7779 100644 --- a/clients/sub-account/src/test/java/com/binance/connector/client/sub_account/rest/api/ManagedSubAccountApiTest.java +++ b/clients/sub-account/src/test/java/com/binance/connector/client/sub_account/rest/api/ManagedSubAccountApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Sub Account REST API - * OpenAPI Specification for the Binance Sub Account REST API + * Sub Account REST API + * Create and manage sub-accounts, control permissions, and transfer assets via the Sub Account API. * * The version of the OpenAPI document: 1.0.0 * @@ -26,6 +26,7 @@ import com.binance.connector.client.sub_account.rest.model.DepositAssetsIntoTheManagedSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.DepositAssetsIntoTheManagedSubAccountResponse; import com.binance.connector.client.sub_account.rest.model.GetManagedSubAccountDepositAddressResponse; +import com.binance.connector.client.sub_account.rest.model.OrderType; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountAssetDetailsResponse; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountFuturesAssetDetailsResponse; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountListResponse; @@ -34,9 +35,11 @@ import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountTransferLogMasterAccountInvestorResponse; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountTransferLogMasterAccountTradingResponse; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountTransferLogSubAccountTradingResponse; +import com.binance.connector.client.sub_account.rest.model.TransferFunctionAccountType; import com.binance.connector.client.sub_account.rest.model.WithdrawlAssetsFromTheManagedSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.WithdrawlAssetsFromTheManagedSubAccountResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -88,21 +91,22 @@ public void initApiClient() throws ApiException { } /** - * Deposit Assets Into The Managed Sub-account(For Investor Master Account) + * Deposit Assets Into The Managed Sub-account (For Investor Master Account) (USER_DATA) * - *

Deposit Assets Into The Managed Sub-account * You need to enable `Enable Spot & - * Margin Trading` option for the api key which requests this endpoint Weight: 1 + *

Deposit Assets Into The Managed Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: + * - You need to enable `Enable Spot & Margin Trading` option for the api key + * which requests this endpoint * * @throws ApiException if the Api call fails */ @Test - public void depositAssetsIntoTheManagedSubAccountTest() throws ApiException, CryptoException { + public void depositAssetsIntoTheManagedSubAccountTest() + throws ApiException, CryptoException, IOException { DepositAssetsIntoTheManagedSubAccountRequest depositAssetsIntoTheManagedSubAccountRequest = new DepositAssetsIntoTheManagedSubAccountRequest(); - - depositAssetsIntoTheManagedSubAccountRequest.toEmail(""); - depositAssetsIntoTheManagedSubAccountRequest.asset(""); - depositAssetsIntoTheManagedSubAccountRequest.amount(1d); + depositAssetsIntoTheManagedSubAccountRequest.toEmail("abc@test.com"); + depositAssetsIntoTheManagedSubAccountRequest.asset("BTC"); + depositAssetsIntoTheManagedSubAccountRequest.amount(1.0d); ApiResponse response = api.depositAssetsIntoTheManagedSubAccount( @@ -118,28 +122,33 @@ public void depositAssetsIntoTheManagedSubAccountTest() throws ApiException, Cry Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000amount=1&asset=&toEmail=", signInputCaptor.getValue()); assertEquals( - "227adce1b6fa8cd89964bd4feedcc86fc42fea35068da084d94698405ba251b8", + "timestamp=1736393892000amount=1&asset=BTC&toEmail=abc%40test.com", + signInputCaptor.getValue()); + assertEquals( + "f98122953530ecdb9458c84710d33fce8a94aa4ccaca94c66fc06f42265ca416", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/managed-subaccount/deposit", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/managed-subaccount/deposit", actualRequest.url().encodedPath()); } /** - * Get Managed Sub-account Deposit Address (For Investor Master Account)(USER_DATA) + * Get Managed Sub-account Deposit Address (For Investor Master Account) (USER_DATA) * - *

Get investor's managed sub-account deposit address. * If `network` is not - * send, return with default `network` of the `coin`. * * `amount` - * needs to be sent if using LIGHTNING network Weight: 1 + *

Get investor's managed sub-account deposit address. Weight(UID): 1 Security Type: + * USER_DATA Notes: - If `network` is not sent, the default `network` for + * the `coin` is returned. - When using `LIGHTNING`, `amount` must + * be provided. * * @throws ApiException if the Api call fails */ @Test - public void getManagedSubAccountDepositAddressTest() throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; - String coin = ""; - String network = ""; - Double amount = 1d; + public void getManagedSubAccountDepositAddressTest() + throws ApiException, CryptoException, IOException { + String email = "abc@test.com"; + String coin = "USDT"; + String network = "LIGHTNING"; + Double amount = 1.0d; Long recvWindow = 5000L; ApiResponse response = api.getManagedSubAccountDepositAddress(email, coin, network, amount, recvWindow); @@ -155,25 +164,25 @@ public void getManagedSubAccountDepositAddressTest() throws ApiException, Crypto Request actualRequest = captorValue.request(); assertEquals( - "email=sub-account-email%40email.com&coin=&network=&amount=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "email=abc%40test.com&coin=USDT&network=LIGHTNING&amount=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "8775619e5f1bf1f99041b1f456c76870f8582b64031236aeb73211e3ad0476e0", + "cb3f10a06dfadc5f2eb0606ded7400862886e6187220e836a9c3eaeb8842a047", actualRequest.url().queryParameter("signature")); assertEquals( "/sapi/v1/managed-subaccount/deposit/address", actualRequest.url().encodedPath()); } /** - * Query Managed Sub-account Asset Details(For Investor Master Account) + * Query Managed Sub-account Asset Details (For Investor Master Account) (USER_DATA) * - *

Query Managed Sub-account Asset Details Weight: 1 + *

Query Managed Sub-account Asset Details Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryManagedSubAccountAssetDetailsTest() throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; + public void queryManagedSubAccountAssetDetailsTest() + throws ApiException, CryptoException, IOException { + String email = "abc@test.com"; Long recvWindow = 5000L; ApiResponse response = api.queryManagedSubAccountAssetDetails(email, recvWindow); @@ -189,26 +198,27 @@ public void queryManagedSubAccountAssetDetailsTest() throws ApiException, Crypto Request actualRequest = captorValue.request(); assertEquals( - "email=sub-account-email%40email.com&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "email=abc%40test.com&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "bbb3a67207210f851b76211eae9566a7b03cd2d37dde4e5b73d48265f7b9197e", + "18e24a62c2fe0e440151dfc8e5f916abc1d41f6895ddeec80f18ff7ee97887f5", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/managed-subaccount/asset", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/managed-subaccount/asset", actualRequest.url().encodedPath()); } /** - * Query Managed Sub-account Futures Asset Details(For Investor Master Account)(USER_DATA) + * Query Managed Sub-account Futures Asset Details (For Investor Master Account) (USER_DATA) * - *

Investor can use this api to query managed sub account futures asset details Weight: 60 + *

Investor can use this api to query managed sub account futures asset details Weight(UID): + * 60 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test public void queryManagedSubAccountFuturesAssetDetailsTest() - throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; - String accountType = ""; + throws ApiException, CryptoException, IOException { + String email = "abc@test.com"; + String accountType = "MARGIN"; ApiResponse response = api.queryManagedSubAccountFuturesAssetDetails(email, accountType); @@ -223,10 +233,10 @@ public void queryManagedSubAccountFuturesAssetDetailsTest() Request actualRequest = captorValue.request(); assertEquals( - "email=sub-account-email%40email.com&accountType=×tamp=1736393892000", + "email=abc%40test.com&accountType=MARGIN×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "f304bae266239f54bc793653d4cd4e29a0c6e08889fc9beae2fcea3db9520660", + "6732d64f372c4f2309691a2f8bf20cc08eb90b3fedfbac6d4ffd5ea70609b613", actualRequest.url().queryParameter("signature")); assertEquals( "/sapi/v1/managed-subaccount/fetch-future-asset", @@ -234,17 +244,17 @@ public void queryManagedSubAccountFuturesAssetDetailsTest() } /** - * Query Managed Sub-account List(For Investor)(USER_DATA) + * Query Managed Sub-account List (For Investor) (USER_DATA) * - *

Get investor's managed sub-account list. Weight: 60 + *

Get investor's managed sub-account list. Weight(UID): 60 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryManagedSubAccountListTest() throws ApiException, CryptoException { - String email = ""; + public void queryManagedSubAccountListTest() throws ApiException, CryptoException, IOException { + String email = "abc@test.com"; Long page = 1L; - Long limit = 1L; + Long limit = 10L; Long recvWindow = 5000L; ApiResponse response = api.queryManagedSubAccountList(email, page, limit, recvWindow); @@ -259,27 +269,26 @@ public void queryManagedSubAccountListTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("email=abc%40test.com&page=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "email=&page=1&limit=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "59d1ab1944836e12ee2d5bb7ff0477b7fef74e6071fc2ceffa8794ad5e0d7a71", + "1aceaa5310991ec4eb8042bafd0250fbf464db288a25afef9082739f1d69552f", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/managed-subaccount/info", actualRequest.url().encodedPath()); } /** - * Query Managed Sub-account Margin Asset Details(For Investor Master Account)(USER_DATA) + * Query Managed Sub-account Margin Asset Details (For Investor Master Account) (USER_DATA) * - *

Investor can use this api to query managed sub account margin asset details Weight: 1 + *

Investor can use this api to query managed sub account margin asset details Weight(IP): 1 + * Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test public void queryManagedSubAccountMarginAssetDetailsTest() - throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; - String accountType = ""; + throws ApiException, CryptoException, IOException { + String email = "abc@test.com"; + String accountType = "MARGIN"; ApiResponse response = api.queryManagedSubAccountMarginAssetDetails(email, accountType); @@ -294,30 +303,34 @@ public void queryManagedSubAccountMarginAssetDetailsTest() Request actualRequest = captorValue.request(); assertEquals( - "email=sub-account-email%40email.com&accountType=×tamp=1736393892000", + "email=abc%40test.com&accountType=MARGIN×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "f304bae266239f54bc793653d4cd4e29a0c6e08889fc9beae2fcea3db9520660", + "6732d64f372c4f2309691a2f8bf20cc08eb90b3fedfbac6d4ffd5ea70609b613", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/managed-subaccount/marginAsset", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/managed-subaccount/marginAsset", + actualRequest.url().encodedPath()); } /** - * Query Managed Sub-account Snapshot(For Investor Master Account) + * Query Managed Sub-account Snapshot (For Investor Master Account) (USER_DATA) * - *

Query Managed Sub-account Snapshot * The query time period must be less then 30 days * - * Support query within the last one month only * If startTimeand endTime not sent, return - * records of the last 7 days by default Weight: 2400 + *

Query Managed Sub-account Snapshot Weight(IP): 2400 Security Type: USER_DATA Notes: - The + * query time range must be less than 30 days. - Only data from the most recent month is + * supported. - If `startTime` and `endTime` are omitted, records from the + * last 7 days are returned by default. * * @throws ApiException if the Api call fails */ @Test - public void queryManagedSubAccountSnapshotTest() throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; - String type = ""; + public void queryManagedSubAccountSnapshotTest() + throws ApiException, CryptoException, IOException { + String email = "abc@test.com"; + OrderType type = OrderType.SPOT; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 1L; + Long limit = 10L; Long recvWindow = 5000L; ApiResponse response = api.queryManagedSubAccountSnapshot( @@ -333,38 +346,36 @@ public void queryManagedSubAccountSnapshotTest() throws ApiException, CryptoExce Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("email=abc%40test.com&type=SPOT&startTime=1623319461670&endTime=1641782889000&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "email=sub-account-email%40email.com&type=&startTime=1623319461670&endTime=1641782889000&limit=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "798f63c636a19b23eafed70bc3b49d260b1a3c84da75aa5a05168e2c182eea14", + "02247e40a39ec060147b4d296a431df42bc116f78d987147aca6a402e2d48350", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/managed-subaccount/accountSnapshot", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/managed-subaccount/accountSnapshot", actualRequest.url().encodedPath()); } /** - * Query Managed Sub Account Transfer Log(For Investor Master Account)(USER_DATA) + * Query Managed Sub Account Transfer Log For Investor Master Account (USER_DATA) * - *

Investor can use this api to query managed sub account transfer log. This endpoint is - * available for investor of Managed Sub-Account. A Managed Sub-Account is an account type for - * investors who value flexibility in asset allocation and account application, while delegating - * trades to a professional trading team. Please refer to + *

Query Managed Sub Account Transfer Log For Investor Master Account Investor can use this + * api to query managed sub account transfer log. This endpoint is available for investor of + * Managed Sub-Account. A Managed Sub-Account is an account type for investors who value + * flexibility in asset allocation and account application, while delegating trades to a + * professional trading team. Please refer to * [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) - * Weight: 1 + * Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test public void queryManagedSubAccountTransferLogMasterAccountInvestorTest() - throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; + throws ApiException, CryptoException, IOException { + String email = "abc@test.com"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long page = 0L; - Long limit = 0L; + Long page = 1L; + Long limit = 1L; String transfers = ""; - String transferFunctionAccountType = ""; + TransferFunctionAccountType transferFunctionAccountType = TransferFunctionAccountType.SPOT; ApiResponse response = api.queryManagedSubAccountTransferLogMasterAccountInvestor( email, @@ -386,10 +397,10 @@ public void queryManagedSubAccountTransferLogMasterAccountInvestorTest() Request actualRequest = captorValue.request(); assertEquals( - "email=sub-account-email%40email.com&startTime=1623319461670&endTime=1641782889000&page=0&limit=0&transfers=&transferFunctionAccountType=×tamp=1736393892000", + "email=abc%40test.com&startTime=1623319461670&endTime=1641782889000&page=1&limit=1&transfers=&transferFunctionAccountType=SPOT×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "c599759baae54f1cbc6819afc54293b31bd6d2b9bfb9d63ef31317dc02d576e9", + "b108a84afb9bb65dddbcf9cbdfb2ab879d3b2878962ca492fbd64b5ddc75a63e", actualRequest.url().queryParameter("signature")); assertEquals( "/sapi/v1/managed-subaccount/queryTransLogForInvestor", @@ -397,27 +408,28 @@ public void queryManagedSubAccountTransferLogMasterAccountInvestorTest() } /** - * Query Managed Sub Account Transfer Log(For Trading Team Master Account)(USER_DATA) + * Query Managed Sub Account Transfer Log For Trading Team Master Account (USER_DATA) * - *

Trading team can use this api to query managed sub account transfer log. This endpoint is - * available for trading team of Managed Sub-Account. A Managed Sub-Account is an account type - * for investors who value flexibility in asset allocation and account application, while - * delegating trades to a professional trading team. Please refer to + *

Query Managed Sub Account Transfer Log For Trading Team Master Account Trading team can + * use this api to query managed sub account transfer log. This endpoint is available for + * trading team of Managed Sub-Account. A Managed Sub-Account is an account type for investors + * who value flexibility in asset allocation and account application, while delegating trades to + * a professional trading team. Please refer to * [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) - * Weight: 60 + * Weight(UID): 60 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test public void queryManagedSubAccountTransferLogMasterAccountTradingTest() - throws ApiException, CryptoException { - String email = "sub-account-email@email.com"; + throws ApiException, CryptoException, IOException { + String email = "abc@test.com"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long page = 0L; - Long limit = 0L; + Long page = 1L; + Long limit = 10L; String transfers = ""; - String transferFunctionAccountType = ""; + TransferFunctionAccountType transferFunctionAccountType = TransferFunctionAccountType.SPOT; ApiResponse response = api.queryManagedSubAccountTransferLogMasterAccountTrading( email, @@ -439,10 +451,10 @@ public void queryManagedSubAccountTransferLogMasterAccountTradingTest() Request actualRequest = captorValue.request(); assertEquals( - "email=sub-account-email%40email.com&startTime=1623319461670&endTime=1641782889000&page=0&limit=0&transfers=&transferFunctionAccountType=×tamp=1736393892000", + "email=abc%40test.com&startTime=1623319461670&endTime=1641782889000&page=1&limit=10&transfers=&transferFunctionAccountType=SPOT×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "c599759baae54f1cbc6819afc54293b31bd6d2b9bfb9d63ef31317dc02d576e9", + "9603c1151956d8d0e9b9febed29de16d1c6edf2dfc71f4ceb525c4dedea4e253", actualRequest.url().queryParameter("signature")); assertEquals( "/sapi/v1/managed-subaccount/queryTransLogForTradeParent", @@ -450,21 +462,22 @@ public void queryManagedSubAccountTransferLogMasterAccountTradingTest() } /** - * Query Managed Sub Account Transfer Log (For Trading Team Sub Account)(USER_DATA) + * Query Managed Sub Account Transfer Log (For Trading Team Sub Account) (USER_DATA) * - *

Query Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight: 60 + *

Query Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight(UID): 60 + * Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test public void queryManagedSubAccountTransferLogSubAccountTradingTest() - throws ApiException, CryptoException { + throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long page = 0L; - Long limit = 0L; + Long page = 1L; + Long limit = 10L; String transfers = ""; - String transferFunctionAccountType = ""; + TransferFunctionAccountType transferFunctionAccountType = TransferFunctionAccountType.SPOT; Long recvWindow = 5000L; ApiResponse response = api.queryManagedSubAccountTransferLogSubAccountTrading( @@ -487,32 +500,33 @@ public void queryManagedSubAccountTransferLogSubAccountTradingTest() Request actualRequest = captorValue.request(); assertEquals( - "startTime=1623319461670&endTime=1641782889000&page=0&limit=0&transfers=&transferFunctionAccountType=&recvWindow=5000×tamp=1736393892000", + "startTime=1623319461670&endTime=1641782889000&page=1&limit=10&transfers=&transferFunctionAccountType=SPOT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "b59ab6777669cdc39572866581590352bd013db054272dfe561a707921813c24", + "8d85395f7d7d07824163ff9fba0f1b1c6a86ea965a102dea111553b25adc1eab", actualRequest.url().queryParameter("signature")); assertEquals( - "/sapi/v1/managed-subaccount/query-trans-log", actualRequest.url().encodedPath()); + "/sapi/v1/managed-subaccount/query-trans-log", + actualRequest.url().encodedPath()); } /** - * Withdrawl Assets From The Managed Sub-account(For Investor Master Account) + * Withdrawl Assets From The Managed Sub-account (For Investor Master Account) (USER_DATA) * - *

Withdrawl Assets From The Managed Sub-account * You need to enable `Enable Spot & - * Margin Trading` option for the api key which requests this endpoint Weight: 1 + *

Withdrawl Assets From The Managed Sub-account Weight(IP): 1 Security Type: USER_DATA + * Notes: - Your API key must have the permission `Enable Spot & Margin Trading`. * * @throws ApiException if the Api call fails */ @Test - public void withdrawlAssetsFromTheManagedSubAccountTest() throws ApiException, CryptoException { + public void withdrawlAssetsFromTheManagedSubAccountTest() + throws ApiException, CryptoException, IOException { WithdrawlAssetsFromTheManagedSubAccountRequest withdrawlAssetsFromTheManagedSubAccountRequest = new WithdrawlAssetsFromTheManagedSubAccountRequest(); - - withdrawlAssetsFromTheManagedSubAccountRequest.fromEmail(""); - withdrawlAssetsFromTheManagedSubAccountRequest.asset(""); - withdrawlAssetsFromTheManagedSubAccountRequest.amount(1d); + withdrawlAssetsFromTheManagedSubAccountRequest.fromEmail("from@test.com"); + withdrawlAssetsFromTheManagedSubAccountRequest.asset("BTC"); + withdrawlAssetsFromTheManagedSubAccountRequest.amount(1.0d); ApiResponse response = api.withdrawlAssetsFromTheManagedSubAccount( @@ -529,10 +543,13 @@ public void withdrawlAssetsFromTheManagedSubAccountTest() throws ApiException, C Request actualRequest = captorValue.request(); assertEquals( - "timestamp=1736393892000amount=1&asset=&fromEmail=", signInputCaptor.getValue()); + "timestamp=1736393892000amount=1&asset=BTC&fromEmail=from%40test.com", + signInputCaptor.getValue()); assertEquals( - "2a0783094485dc7627ebacda95b82dab6b57ddc19fa05930073f93f5f157ae46", + "fe516260cf61d0ed74f43ec43543ac3a08dc6cec55014b4e3c0792bab3232be6", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/managed-subaccount/withdraw", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/managed-subaccount/withdraw", + actualRequest.url().encodedPath()); } } diff --git a/clients/vip-loan/CHANGELOG.md b/clients/vip-loan/CHANGELOG.md index 1a5726041..0d9d604f9 100644 --- a/clients/vip-loan/CHANGELOG.md +++ b/clients/vip-loan/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 4.0.0 - 2026-07-29 + +### Added (1) + +- `getVIPLoanRepaymentHistory()` (`GET /sapi/v1/loan/vip/repay/history`) + ## 3.0.1 - 2026-04-30 - Update `binance/common` module to version `2.4.2`. diff --git a/clients/vip-loan/docs/GetVIPLoanAccruedInterestResponseRowsInner.md b/clients/vip-loan/docs/GetVIPLoanAccruedInterestResponseRowsInner.md index 16150bc7f..ab54f91ce 100644 --- a/clients/vip-loan/docs/GetVIPLoanAccruedInterestResponseRowsInner.md +++ b/clients/vip-loan/docs/GetVIPLoanAccruedInterestResponseRowsInner.md @@ -12,7 +12,7 @@ |**interestAmount** | **String** | | [optional] | |**annualInterestRate** | **String** | | [optional] | |**accrualTime** | **Long** | | [optional] | -|**orderId** | **Long** | | [optional] | +|**orderId** | **Long** | Latest order ID for the renewal order. | [optional] | diff --git a/clients/vip-loan/docs/GetVIPLoanOngoingOrdersResponseRowsInner.md b/clients/vip-loan/docs/GetVIPLoanOngoingOrdersResponseRowsInner.md index 2f6da2cfd..4db8e3b01 100644 --- a/clients/vip-loan/docs/GetVIPLoanOngoingOrdersResponseRowsInner.md +++ b/clients/vip-loan/docs/GetVIPLoanOngoingOrdersResponseRowsInner.md @@ -10,16 +10,16 @@ |**orderId** | **Long** | | [optional] | |**loanCoin** | **String** | | [optional] | |**totalDebt** | **String** | | [optional] | -|**loanRate** | **String** | | [optional] | +|**loanRate** | **String** | For flexible loans, this is the flexible rate. | [optional] | |**residualInterest** | **String** | | [optional] | |**collateralAccountId** | **String** | | [optional] | |**collateralCoin** | **String** | | [optional] | |**totalCollateralValueAfterHaircut** | **String** | | [optional] | |**lockedCollateralValue** | **String** | | [optional] | |**currentLTV** | **String** | | [optional] | -|**expirationTime** | **Long** | | [optional] | +|**expirationTime** | **Long** | For flexible loans, this value is `0`. | [optional] | |**loanDate** | **String** | | [optional] | -|**loanTerm** | **String** | | [optional] | +|**loanTerm** | **String** | For flexible loans, this value is `open term`. | [optional] | diff --git a/clients/vip-loan/docs/GetVIPLoanRepaymentHistoryResponse.md b/clients/vip-loan/docs/GetVIPLoanRepaymentHistoryResponse.md new file mode 100644 index 000000000..5c56c2b60 --- /dev/null +++ b/clients/vip-loan/docs/GetVIPLoanRepaymentHistoryResponse.md @@ -0,0 +1,14 @@ + + +# GetVIPLoanRepaymentHistoryResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rows** | [**List<GetVIPLoanRepaymentHistoryResponseRowsInner>**](GetVIPLoanRepaymentHistoryResponseRowsInner.md) | | [optional] | +|**total** | **Long** | | [optional] | + + + diff --git a/clients/vip-loan/docs/GetVIPLoanRepaymentHistoryResponseRowsInner.md b/clients/vip-loan/docs/GetVIPLoanRepaymentHistoryResponseRowsInner.md new file mode 100644 index 000000000..92d1f1db1 --- /dev/null +++ b/clients/vip-loan/docs/GetVIPLoanRepaymentHistoryResponseRowsInner.md @@ -0,0 +1,19 @@ + + +# GetVIPLoanRepaymentHistoryResponseRowsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**loanCoin** | **String** | | [optional] | +|**repayAmount** | **String** | | [optional] | +|**collateralCoin** | **String** | | [optional] | +|**repayStatus** | **String** | Repayment status (`Repaid`, `Repaying`, `Failed`). | [optional] | +|**loanDate** | **String** | | [optional] | +|**repayTime** | **String** | | [optional] | +|**orderId** | **String** | | [optional] | + + + diff --git a/clients/vip-loan/docs/MarketDataApi.md b/clients/vip-loan/docs/MarketDataApi.md index 1b4f1bdea..5cbcd8bc3 100644 --- a/clients/vip-loan/docs/MarketDataApi.md +++ b/clients/vip-loan/docs/MarketDataApi.md @@ -4,19 +4,20 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getBorrowInterestRate**](MarketDataApi.md#getBorrowInterestRate) | **GET** /sapi/v1/loan/vip/request/interestRate | Get Borrow Interest Rate(USER_DATA) | -| [**getCollateralAssetData**](MarketDataApi.md#getCollateralAssetData) | **GET** /sapi/v1/loan/vip/collateral/data | Get Collateral Asset Data(USER_DATA) | -| [**getLoanableAssetsData**](MarketDataApi.md#getLoanableAssetsData) | **GET** /sapi/v1/loan/vip/loanable/data | Get Loanable Assets Data(USER_DATA) | +| [**getBorrowInterestRate**](MarketDataApi.md#getBorrowInterestRate) | **GET** /sapi/v1/loan/vip/request/interestRate | Get Borrow Interest Rate (USER_DATA) | +| [**getCollateralAssetData**](MarketDataApi.md#getCollateralAssetData) | **GET** /sapi/v1/loan/vip/collateral/data | Get Collateral Asset Data (USER_DATA) | +| [**getLoanableAssetsData**](MarketDataApi.md#getLoanableAssetsData) | **GET** /sapi/v1/loan/vip/loanable/data | Get Loanable Assets Data (USER_DATA) | | [**getVIPLoanInterestRateHistory**](MarketDataApi.md#getVIPLoanInterestRateHistory) | **GET** /sapi/v1/loan/vip/interestRateHistory | Get VIP Loan Interest Rate History (USER_DATA) | +| [**queryVIPLoanFixedRateMarket**](MarketDataApi.md#queryVIPLoanFixedRateMarket) | **GET** /sapi/v1/loan/vip/fixed/market | Query VIP Loan Fixed Rate Market (USER_DATA) | # **getBorrowInterestRate** > GetBorrowInterestRateResponse getBorrowInterestRate(loanCoin, recvWindow) -Get Borrow Interest Rate(USER_DATA) +Get Borrow Interest Rate (USER_DATA) -Get Borrow Interest Rate Weight: 400 +Get Borrow Interest Rate Weight(IP): 400 Security Type: USER_DATA ### Example ```java @@ -33,8 +34,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String loanCoin = "loanCoin_example"; // String | Max 10 assets, Multiple split by \",\" - Long recvWindow = 56L; // Long | + String loanCoin = "BTC"; // String | Max 10 assets, Multiple split by \",\" + Long recvWindow = 5000L; // Long | try { GetBorrowInterestRateResponse result = apiInstance.getBorrowInterestRate(loanCoin, recvWindow); System.out.println(result); @@ -78,9 +79,9 @@ No authorization required # **getCollateralAssetData** > GetCollateralAssetDataResponse getCollateralAssetData(collateralCoin, recvWindow) -Get Collateral Asset Data(USER_DATA) +Get Collateral Asset Data (USER_DATA) -Get Collateral Asset Data Weight: 400 +Get Collateral Asset Data Weight(IP): 400 Security Type: USER_DATA ### Example ```java @@ -97,8 +98,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String collateralCoin = "collateralCoin_example"; // String | - Long recvWindow = 56L; // Long | + String collateralCoin = "BUSD"; // String | + Long recvWindow = 5000L; // Long | try { GetCollateralAssetDataResponse result = apiInstance.getCollateralAssetData(collateralCoin, recvWindow); System.out.println(result); @@ -142,9 +143,9 @@ No authorization required # **getLoanableAssetsData** > GetLoanableAssetsDataResponse getLoanableAssetsData(loanCoin, vipLevel, recvWindow) -Get Loanable Assets Data(USER_DATA) +Get Loanable Assets Data (USER_DATA) -Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight: 400 +Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 Security Type: USER_DATA ### Example ```java @@ -161,9 +162,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String loanCoin = "loanCoin_example"; // String | - Long vipLevel = 56L; // Long | default:user's vip level - Long recvWindow = 56L; // Long | + String loanCoin = "BUSD"; // String | + Long vipLevel = 1L; // Long | Defaults to the user's VIP level. + Long recvWindow = 5000L; // Long | try { GetLoanableAssetsDataResponse result = apiInstance.getLoanableAssetsData(loanCoin, vipLevel, recvWindow); System.out.println(result); @@ -183,7 +184,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **loanCoin** | **String**| | [optional] | -| **vipLevel** | **Long**| default:user's vip level | [optional] | +| **vipLevel** | **Long**| Defaults to the user's VIP level. | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -210,7 +211,7 @@ No authorization required Get VIP Loan Interest Rate History (USER_DATA) -Check VIP Loan flexible interest rate history * If startTime and endTime are not sent, the recent 90-day data will be returned * The max interval between startTime and end Time is 180 days. * Time based on UTC+0. Weight: 400 +Check VIP Loan flexible interest rate history Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and `endTime` are not sent, recent 90-day data is returned. - The maximum interval between `startTime` and `endTime` is 180 days. - Time is based on UTC+0. ### Example ```java @@ -227,12 +228,12 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); MarketDataApi apiInstance = new MarketDataApi(defaultClient); - String coin = "coin_example"; // String | - Long recvWindow = 56L; // Long | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Current querying page. Start from 1; default: 1; max: 1000 - Long limit = 56L; // Long | Default: 10; max: 100 + String coin = "USDT"; // String | + Long recvWindow = 5000L; // Long | + Long startTime = 1623319461670L; // Long | If both startTime and endTime are omitted, the most recent 90 days are returned. + Long endTime = 1641782889000L; // Long | Maximum interval between startTime and endTime is 180 days. Time is based on UTC+0. + Long current = 1L; // Long | Current page number, starting from 1. + Long limit = 10L; // Long | Number of records per page. try { GetVIPLoanInterestRateHistoryResponse result = apiInstance.getVIPLoanInterestRateHistory(coin, recvWindow, startTime, endTime, current, limit); System.out.println(result); @@ -253,10 +254,10 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **coin** | **String**| | | | **recvWindow** | **Long**| | | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **current** | **Long**| Current querying page. Start from 1; default: 1; max: 1000 | [optional] | -| **limit** | **Long**| Default: 10; max: 100 | [optional] | +| **startTime** | **Long**| If both startTime and endTime are omitted, the most recent 90 days are returned. | [optional] | +| **endTime** | **Long**| Maximum interval between startTime and endTime is 180 days. Time is based on UTC+0. | [optional] | +| **current** | **Long**| Current page number, starting from 1. | [optional] | +| **limit** | **Long**| Number of records per page. | [optional] | ### Return type @@ -276,3 +277,73 @@ No authorization required |-------------|-------------|------------------| | **200** | Get VIP Loan Interest Rate History | - | + +# **queryVIPLoanFixedRateMarket** +> QueryVIPLoanFixedRateMarketResponse queryVIPLoanFixedRateMarket(loanCoin, duration, current, size, recvWindow) + +Query VIP Loan Fixed Rate Market (USER_DATA) + +Query the VIP Loan fixed rate market. Returns a paginated list of fixed-rate supply orders. Weight(IP): 6000 Security Type: USER_DATA + +### Example +```java +// Import classes: +import com.binance.connector.client.vip_loan.ApiClient; +import com.binance.connector.client.vip_loan.ApiException; +import com.binance.connector.client.vip_loan.Configuration; +import com.binance.connector.client.vip_loan.models.*; +import com.binance.connector.client.vip_loan.rest.api.MarketDataApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + MarketDataApi apiInstance = new MarketDataApi(defaultClient); + String loanCoin = "USDT"; // String | Loan coin + Long duration = 30L; // Long | Duration in days, minimum 1 + Long current = 1L; // Long | Page number, default 1, minimum 1 + Long size = 10L; // Long | Page size, default 10, range [1, 100] + Long recvWindow = 5000L; // Long | The value cannot be greater than `60000` + try { + QueryVIPLoanFixedRateMarketResponse result = apiInstance.queryVIPLoanFixedRateMarket(loanCoin, duration, current, size, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MarketDataApi#queryVIPLoanFixedRateMarket"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **loanCoin** | **String**| Loan coin | | +| **duration** | **Long**| Duration in days, minimum 1 | [optional] | +| **current** | **Long**| Page number, default 1, minimum 1 | [optional] | +| **size** | **Long**| Page size, default 10, range [1, 100] | [optional] | +| **recvWindow** | **Long**| The value cannot be greater than `60000` | [optional] | + +### Return type + +[**QueryVIPLoanFixedRateMarketResponse**](QueryVIPLoanFixedRateMarketResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Query VIP Loan Fixed Rate Market | - | + diff --git a/clients/vip-loan/docs/QueryApplicationStatusResponseRowsInner.md b/clients/vip-loan/docs/QueryApplicationStatusResponseRowsInner.md index 313abf699..ec955c6cf 100644 --- a/clients/vip-loan/docs/QueryApplicationStatusResponseRowsInner.md +++ b/clients/vip-loan/docs/QueryApplicationStatusResponseRowsInner.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**loanAccountId** | **String** | | [optional] | +|**loanAccountId** | **String** | Loan receiving account. | [optional] | |**orderId** | **String** | | [optional] | |**requestId** | **String** | | [optional] | |**loanCoin** | **String** | | [optional] | @@ -15,7 +15,7 @@ |**collateralAccountId** | **String** | | [optional] | |**collateralCoin** | **String** | | [optional] | |**loanTerm** | **String** | | [optional] | -|**status** | **String** | | [optional] | +|**status** | **String** | Order status (`Accruing_Interest`, `Overdue`, `Liquidating`, `Repaying`, `Repaid`, `Liquidated`, `Pending`, `Failed`). | [optional] | |**loanDate** | **String** | | [optional] | diff --git a/clients/vip-loan/docs/QueryVIPLoanFixedRateMarketResponse.md b/clients/vip-loan/docs/QueryVIPLoanFixedRateMarketResponse.md new file mode 100644 index 000000000..8e868cfea --- /dev/null +++ b/clients/vip-loan/docs/QueryVIPLoanFixedRateMarketResponse.md @@ -0,0 +1,14 @@ + + +# QueryVIPLoanFixedRateMarketResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**total** | **Long** | Total number of records | [optional] | +|**rows** | [**List<QueryVIPLoanFixedRateMarketResponseRowsInner>**](QueryVIPLoanFixedRateMarketResponseRowsInner.md) | Current page data | [optional] | + + + diff --git a/clients/vip-loan/docs/QueryVIPLoanFixedRateMarketResponseRowsInner.md b/clients/vip-loan/docs/QueryVIPLoanFixedRateMarketResponseRowsInner.md new file mode 100644 index 000000000..71450da93 --- /dev/null +++ b/clients/vip-loan/docs/QueryVIPLoanFixedRateMarketResponseRowsInner.md @@ -0,0 +1,20 @@ + + +# QueryVIPLoanFixedRateMarketResponseRowsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestId** | **Long** | Supply request ID | [optional] | +|**requestNo** | **Long** | Request number | [optional] | +|**coin** | **String** | Coin | [optional] | +|**interestRate** | **String** | Annual interest rate | [optional] | +|**duration** | **Long** | Duration in days | [optional] | +|**minimumAmount** | **String** | Minimum borrow amount | [optional] | +|**availableAmount** | **String** | Maximum available borrow amount | [optional] | +|**estimatedInterest** | **String** | Estimated interest | [optional] | + + + diff --git a/clients/vip-loan/docs/TradeApi.md b/clients/vip-loan/docs/TradeApi.md index 2789c3fdd..6a8d61b87 100644 --- a/clients/vip-loan/docs/TradeApi.md +++ b/clients/vip-loan/docs/TradeApi.md @@ -4,18 +4,19 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**vipLoanBorrow**](TradeApi.md#vipLoanBorrow) | **POST** /sapi/v1/loan/vip/borrow | VIP Loan Borrow(TRADE) | -| [**vipLoanRenew**](TradeApi.md#vipLoanRenew) | **POST** /sapi/v1/loan/vip/renew | VIP Loan Renew(TRADE) | -| [**vipLoanRepay**](TradeApi.md#vipLoanRepay) | **POST** /sapi/v1/loan/vip/repay | VIP Loan Repay(TRADE) | +| [**vipLoanBorrow**](TradeApi.md#vipLoanBorrow) | **POST** /sapi/v1/loan/vip/borrow | VIP Loan Borrow (TRADE) | +| [**vipLoanFixedRateBorrow**](TradeApi.md#vipLoanFixedRateBorrow) | **POST** /sapi/v1/loan/vip/fixed/borrow | VIP Loan Fixed Rate Borrow (TRADE) | +| [**vipLoanRenew**](TradeApi.md#vipLoanRenew) | **POST** /sapi/v1/loan/vip/renew | VIP Loan Renew (TRADE) | +| [**vipLoanRepay**](TradeApi.md#vipLoanRepay) | **POST** /sapi/v1/loan/vip/repay | VIP Loan Repay (TRADE) | # **vipLoanBorrow** > VipLoanBorrowResponse vipLoanBorrow(vipLoanBorrowRequest) -VIP Loan Borrow(TRADE) +VIP Loan Borrow (TRADE) -VIP loan is available for VIP users only. * loanAccountId refer to loan receiving account * Only master account applications are supported * loanAccountId and collateralAccountId under same master account * loanTerm is mandatory if user choose stable rate Weight: 0 +VIP loan is available for VIP users only. Weight(UID): 6000 Security Type: TRADE Notes: - `loanAccountId` refers to the loan receiving account. - Only master account applications are supported. - `loanAccountId` and `collateralAccountId` must be under the same master account. - `loanTerm` is mandatory if the user chooses a fixed rate (`isFlexibleRate = FALSE`). ### Example ```java @@ -71,13 +72,75 @@ No authorization required |-------------|-------------|------------------| | **200** | VIP Loan Borrow | - | + +# **vipLoanFixedRateBorrow** +> VipLoanFixedRateBorrowResponse vipLoanFixedRateBorrow(vipLoanFixedRateBorrowRequest) + +VIP Loan Fixed Rate Borrow (TRADE) + +Submit a fixed rate borrow request by matching market supply orders. Weight(UID): 6000 Security Type: TRADE Notes: - **Rate limit:** 2 requests per second per account. - When multiple `supplyRequest` entries are provided, all `requestId` values must correspond to the same `borrowCoin` and `loanTerm` (validated by collateral facade). + +### Example +```java +// Import classes: +import com.binance.connector.client.vip_loan.ApiClient; +import com.binance.connector.client.vip_loan.ApiException; +import com.binance.connector.client.vip_loan.Configuration; +import com.binance.connector.client.vip_loan.models.*; +import com.binance.connector.client.vip_loan.rest.api.TradeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + TradeApi apiInstance = new TradeApi(defaultClient); + VipLoanFixedRateBorrowRequest vipLoanFixedRateBorrowRequest = new VipLoanFixedRateBorrowRequest(); // VipLoanFixedRateBorrowRequest | + try { + VipLoanFixedRateBorrowResponse result = apiInstance.vipLoanFixedRateBorrow(vipLoanFixedRateBorrowRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TradeApi#vipLoanFixedRateBorrow"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **vipLoanFixedRateBorrowRequest** | [**VipLoanFixedRateBorrowRequest**](VipLoanFixedRateBorrowRequest.md)| | | + +### Return type + +[**VipLoanFixedRateBorrowResponse**](VipLoanFixedRateBorrowResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | VIP Loan Fixed Rate Borrow | - | + # **vipLoanRenew** > VipLoanRenewResponse vipLoanRenew(vipLoanRenewRequest) -VIP Loan Renew(TRADE) +VIP Loan Renew (TRADE) -VIP loan is available for VIP users only. Weight: 6000 +VIP loan is available for VIP users only. Weight(UID): 6000 Security Type: TRADE ### Example ```java @@ -137,9 +200,9 @@ No authorization required # **vipLoanRepay** > VipLoanRepayResponse vipLoanRepay(vipLoanRepayRequest) -VIP Loan Repay(TRADE) +VIP Loan Repay (TRADE) -VIP loan is available for VIP users only. Weight: 6000 +VIP loan is available for VIP users only. Weight(UID): 6000 Security Type: TRADE ### Example ```java diff --git a/clients/vip-loan/docs/UserInformationApi.md b/clients/vip-loan/docs/UserInformationApi.md index c5cc67640..63129498a 100644 --- a/clients/vip-loan/docs/UserInformationApi.md +++ b/clients/vip-loan/docs/UserInformationApi.md @@ -6,8 +6,9 @@ All URIs are relative to *https://api.binance.com* |------------- | ------------- | -------------| | [**checkVIPLoanCollateralAccount**](UserInformationApi.md#checkVIPLoanCollateralAccount) | **GET** /sapi/v1/loan/vip/collateral/account | Check VIP Loan Collateral Account (USER_DATA) | | [**getVIPLoanAccruedInterest**](UserInformationApi.md#getVIPLoanAccruedInterest) | **GET** /sapi/v1/loan/vip/accruedInterest | Get VIP Loan Accrued Interest (USER_DATA) | -| [**getVIPLoanOngoingOrders**](UserInformationApi.md#getVIPLoanOngoingOrders) | **GET** /sapi/v1/loan/vip/ongoing/orders | Get VIP Loan Ongoing Orders(USER_DATA) | -| [**queryApplicationStatus**](UserInformationApi.md#queryApplicationStatus) | **GET** /sapi/v1/loan/vip/request/data | Query Application Status(USER_DATA) | +| [**getVIPLoanOngoingOrders**](UserInformationApi.md#getVIPLoanOngoingOrders) | **GET** /sapi/v1/loan/vip/ongoing/orders | Get VIP Loan Ongoing Orders (USER_DATA) | +| [**getVIPLoanRepaymentHistory**](UserInformationApi.md#getVIPLoanRepaymentHistory) | **GET** /sapi/v1/loan/vip/repay/history | Get VIP Loan Repayment History (USER_DATA) | +| [**queryApplicationStatus**](UserInformationApi.md#queryApplicationStatus) | **GET** /sapi/v1/loan/vip/request/data | Query Application Status (USER_DATA) | @@ -16,7 +17,7 @@ All URIs are relative to *https://api.binance.com* Check VIP Loan Collateral Account (USER_DATA) -VIP loan is available for VIP users only * If the login account is loan account, all collateral accounts under the loan account can be queried. * If the login account is collateral account, only the current collateral account can be queried. Weight: 6000 +VIP loan is available for VIP users only Weight(IP): 6000 Security Type: USER_DATA Notes: - If the logged-in account is a borrowing account, all collateral accounts bound to that borrowing account can be queried. - If the logged-in account is a collateral account, only collateral assets under that account can be queried. ### Example ```java @@ -33,9 +34,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); UserInformationApi apiInstance = new UserInformationApi(defaultClient); - Long orderId = 56L; // Long | - Long collateralAccountId = 56L; // Long | - Long recvWindow = 56L; // Long | + Long orderId = 1L; // Long | + Long collateralAccountId = 1L; // Long | + Long recvWindow = 5000L; // Long | try { CheckVIPLoanCollateralAccountResponse result = apiInstance.checkVIPLoanCollateralAccount(orderId, collateralAccountId, recvWindow); System.out.println(result); @@ -82,7 +83,7 @@ No authorization required Get VIP Loan Accrued Interest (USER_DATA) -Check VIP Loan interest record * If startTime and endTime are not sent, the recent 90-day data will be returned. * The max interval between startTime and endTime is 90 days. Weight: 400 +Check VIP Loan interest record Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and `endTime` are not sent, recent 90-day data is returned. - The maximum interval between `startTime` and `endTime` is 90 days. ### Example ```java @@ -99,13 +100,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); UserInformationApi apiInstance = new UserInformationApi(defaultClient); - Long orderId = 56L; // Long | - String loanCoin = "loanCoin_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | Current querying page. Start from 1; default: 1; max: 1000 - Long limit = 56L; // Long | Default: 10; max: 100 - Long recvWindow = 56L; // Long | + Long orderId = 1L; // Long | + String loanCoin = "BTC"; // String | + Long startTime = 1623319461670L; // Long | If both startTime and endTime are omitted, the most recent 90 days are returned. + Long endTime = 1641782889000L; // Long | Maximum interval between startTime and endTime is 90 days. + Long current = 1L; // Long | Current page number, starting from 1. + Long limit = 10L; // Long | Number of records per page. + Long recvWindow = 5000L; // Long | try { GetVIPLoanAccruedInterestResponse result = apiInstance.getVIPLoanAccruedInterest(orderId, loanCoin, startTime, endTime, current, limit, recvWindow); System.out.println(result); @@ -126,10 +127,10 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **orderId** | **Long**| | [optional] | | **loanCoin** | **String**| | [optional] | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **current** | **Long**| Current querying page. Start from 1; default: 1; max: 1000 | [optional] | -| **limit** | **Long**| Default: 10; max: 100 | [optional] | +| **startTime** | **Long**| If both startTime and endTime are omitted, the most recent 90 days are returned. | [optional] | +| **endTime** | **Long**| Maximum interval between startTime and endTime is 90 days. | [optional] | +| **current** | **Long**| Current page number, starting from 1. | [optional] | +| **limit** | **Long**| Number of records per page. | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -154,9 +155,9 @@ No authorization required # **getVIPLoanOngoingOrders** > GetVIPLoanOngoingOrdersResponse getVIPLoanOngoingOrders(orderId, collateralAccountId, loanCoin, collateralCoin, current, limit, recvWindow) -Get VIP Loan Ongoing Orders(USER_DATA) +Get VIP Loan Ongoing Orders (USER_DATA) -VIP loan is available for VIP users only. Weight: 400 +VIP loan is available for VIP users only. Weight(IP): 400 Security Type: USER_DATA ### Example ```java @@ -173,13 +174,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); UserInformationApi apiInstance = new UserInformationApi(defaultClient); - Long orderId = 56L; // Long | - Long collateralAccountId = 56L; // Long | - String loanCoin = "loanCoin_example"; // String | - String collateralCoin = "collateralCoin_example"; // String | - Long current = 56L; // Long | Current querying page. Start from 1; default: 1; max: 1000 - Long limit = 56L; // Long | Default: 10; max: 100 - Long recvWindow = 56L; // Long | + Long orderId = 1L; // Long | + Long collateralAccountId = 1L; // Long | + String loanCoin = "BUSD"; // String | + String collateralCoin = "BNB,BTC,ETH"; // String | + Long current = 1L; // Long | + Long limit = 10L; // Long | + Long recvWindow = 5000L; // Long | try { GetVIPLoanOngoingOrdersResponse result = apiInstance.getVIPLoanOngoingOrders(orderId, collateralAccountId, loanCoin, collateralCoin, current, limit, recvWindow); System.out.println(result); @@ -202,8 +203,8 @@ public class Example { | **collateralAccountId** | **Long**| | [optional] | | **loanCoin** | **String**| | [optional] | | **collateralCoin** | **String**| | [optional] | -| **current** | **Long**| Current querying page. Start from 1; default: 1; max: 1000 | [optional] | -| **limit** | **Long**| Default: 10; max: 100 | [optional] | +| **current** | **Long**| | [optional] | +| **limit** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -224,13 +225,87 @@ No authorization required |-------------|-------------|------------------| | **200** | Get VIP Loan Ongoing Orders | - | + +# **getVIPLoanRepaymentHistory** +> GetVIPLoanRepaymentHistoryResponse getVIPLoanRepaymentHistory(orderId, loanCoin, startTime, endTime, current, limit, recvWindow) + +Get VIP Loan Repayment History (USER_DATA) + +VIP Loans are available only to VIP users. Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and `endTime` are not sent, recent 90-day data is returned. - The maximum interval between `startTime` and `endTime` is 180 days. + +### Example +```java +// Import classes: +import com.binance.connector.client.vip_loan.ApiClient; +import com.binance.connector.client.vip_loan.ApiException; +import com.binance.connector.client.vip_loan.Configuration; +import com.binance.connector.client.vip_loan.models.*; +import com.binance.connector.client.vip_loan.rest.api.UserInformationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + UserInformationApi apiInstance = new UserInformationApi(defaultClient); + Long orderId = 1L; // Long | + String loanCoin = "BUSD"; // String | + Long startTime = 1623319461670L; // Long | If both startTime and endTime are omitted, the most recent 90 days are returned. + Long endTime = 1641782889000L; // Long | Maximum interval between startTime and endTime is 180 days. + Long current = 1L; // Long | Current page number, starting from 1. + Long limit = 10L; // Long | Number of records per page. + Long recvWindow = 5000L; // Long | + try { + GetVIPLoanRepaymentHistoryResponse result = apiInstance.getVIPLoanRepaymentHistory(orderId, loanCoin, startTime, endTime, current, limit, recvWindow); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserInformationApi#getVIPLoanRepaymentHistory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| | [optional] | +| **loanCoin** | **String**| | [optional] | +| **startTime** | **Long**| If both startTime and endTime are omitted, the most recent 90 days are returned. | [optional] | +| **endTime** | **Long**| Maximum interval between startTime and endTime is 180 days. | [optional] | +| **current** | **Long**| Current page number, starting from 1. | [optional] | +| **limit** | **Long**| Number of records per page. | [optional] | +| **recvWindow** | **Long**| | [optional] | + +### Return type + +[**GetVIPLoanRepaymentHistoryResponse**](GetVIPLoanRepaymentHistoryResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Get VIP Loan Repayment History | - | + # **queryApplicationStatus** > QueryApplicationStatusResponse queryApplicationStatus(current, limit, recvWindow) -Query Application Status(USER_DATA) +Query Application Status (USER_DATA) -Query Application Status Weight: 400 +Query Application Status Weight(UID): 400 Security Type: USER_DATA ### Example ```java @@ -247,9 +322,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); UserInformationApi apiInstance = new UserInformationApi(defaultClient); - Long current = 56L; // Long | Current querying page. Start from 1; default: 1; max: 1000 - Long limit = 56L; // Long | Default: 10; max: 100 - Long recvWindow = 56L; // Long | + Long current = 1L; // Long | Current page number, starting from 1. + Long limit = 10L; // Long | + Long recvWindow = 5000L; // Long | try { QueryApplicationStatusResponse result = apiInstance.queryApplicationStatus(current, limit, recvWindow); System.out.println(result); @@ -268,8 +343,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **current** | **Long**| Current querying page. Start from 1; default: 1; max: 1000 | [optional] | -| **limit** | **Long**| Default: 10; max: 100 | [optional] | +| **current** | **Long**| Current page number, starting from 1. | [optional] | +| **limit** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type diff --git a/clients/vip-loan/docs/VIPLoanBorrowRequest.md b/clients/vip-loan/docs/VIPLoanBorrowRequest.md new file mode 100644 index 000000000..7c125819b --- /dev/null +++ b/clients/vip-loan/docs/VIPLoanBorrowRequest.md @@ -0,0 +1,20 @@ + + +# VipLoanBorrowRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**loanAccountId** | **Long** | | | +|**loanCoin** | **String** | | | +|**loanAmount** | **Double** | | | +|**collateralAccountId** | **String** | Collateral account ID(s). Multiple split by `,` | | +|**collateralCoin** | **String** | | | +|**isFlexibleRate** | **Boolean** | TRUE: flexible rate; FALSE: fixed rate | | +|**loanTerm** | **Long** | Mandatory for fixed rate. Optional for flexible rate. e.g. 30/60 days | [optional] | +|**recvWindow** | **Long** | | [optional] | + + + diff --git a/clients/vip-loan/docs/VIPLoanBorrowResponse.md b/clients/vip-loan/docs/VIPLoanBorrowResponse.md new file mode 100644 index 000000000..d2fa62113 --- /dev/null +++ b/clients/vip-loan/docs/VIPLoanBorrowResponse.md @@ -0,0 +1,20 @@ + + +# VipLoanBorrowResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**loanAccountId** | **String** | Loan receiving account. | [optional] | +|**requestId** | **String** | | [optional] | +|**loanCoin** | **String** | | [optional] | +|**isFlexibleRate** | **String** | | [optional] | +|**loanAmount** | **String** | | [optional] | +|**collateralAccountId** | **String** | | [optional] | +|**collateralCoin** | **String** | | [optional] | +|**loanTerm** | **String** | | [optional] | + + + diff --git a/clients/vip-loan/docs/VIPLoanRenewRequest.md b/clients/vip-loan/docs/VIPLoanRenewRequest.md new file mode 100644 index 000000000..7455543d3 --- /dev/null +++ b/clients/vip-loan/docs/VIPLoanRenewRequest.md @@ -0,0 +1,15 @@ + + +# VipLoanRenewRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**orderId** | **Long** | | | +|**loanTerm** | **Long** | 30/60 days | | +|**recvWindow** | **Long** | | [optional] | + + + diff --git a/clients/vip-loan/docs/VIPLoanRenewResponse.md b/clients/vip-loan/docs/VIPLoanRenewResponse.md new file mode 100644 index 000000000..4636c18e5 --- /dev/null +++ b/clients/vip-loan/docs/VIPLoanRenewResponse.md @@ -0,0 +1,18 @@ + + +# VipLoanRenewResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**loanAccountId** | **String** | Loan receiving account. | [optional] | +|**loanCoin** | **String** | | [optional] | +|**loanAmount** | **String** | | [optional] | +|**collateralAccountId** | **String** | | [optional] | +|**collateralCoin** | **String** | | [optional] | +|**loanTerm** | **String** | | [optional] | + + + diff --git a/clients/vip-loan/docs/VipLoanRepayRequest.md b/clients/vip-loan/docs/VIPLoanRepayRequest.md similarity index 100% rename from clients/vip-loan/docs/VipLoanRepayRequest.md rename to clients/vip-loan/docs/VIPLoanRepayRequest.md diff --git a/clients/vip-loan/docs/VIPLoanRepayResponse.md b/clients/vip-loan/docs/VIPLoanRepayResponse.md new file mode 100644 index 000000000..ac533949a --- /dev/null +++ b/clients/vip-loan/docs/VIPLoanRepayResponse.md @@ -0,0 +1,19 @@ + + +# VipLoanRepayResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**loanCoin** | **String** | | [optional] | +|**repayAmount** | **String** | | [optional] | +|**remainingPrincipal** | **String** | | [optional] | +|**remainingInterest** | **String** | | [optional] | +|**collateralCoin** | **String** | | [optional] | +|**currentLTV** | **String** | | [optional] | +|**repayStatus** | **String** | Repayment status (`Repaid`, `Repaying`, `Failed`). | [optional] | + + + diff --git a/clients/vip-loan/docs/VipLoanBorrowRequest.md b/clients/vip-loan/docs/VipLoanBorrowRequest.md deleted file mode 100644 index 63e4fb250..000000000 --- a/clients/vip-loan/docs/VipLoanBorrowRequest.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# VipLoanBorrowRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loanAccountId** | **Long** | | | -|**loanCoin** | **String** | | | -|**loanAmount** | **Double** | | | -|**collateralAccountId** | **Long** | | | -|**collateralCoin** | **String** | | | -|**isFlexibleRate** | **Boolean** | | | -|**loanTerm** | **Long** | | [optional] | -|**recvWindow** | **Long** | | [optional] | - - - diff --git a/clients/vip-loan/docs/VipLoanBorrowResponse.md b/clients/vip-loan/docs/VipLoanBorrowResponse.md deleted file mode 100644 index 279b1db02..000000000 --- a/clients/vip-loan/docs/VipLoanBorrowResponse.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# VipLoanBorrowResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loanAccountId** | **String** | | [optional] | -|**requestId** | **String** | | [optional] | -|**loanCoin** | **String** | | [optional] | -|**isFlexibleRate** | **String** | | [optional] | -|**loanAmount** | **String** | | [optional] | -|**collateralAccountId** | **String** | | [optional] | -|**collateralCoin** | **String** | | [optional] | -|**loanTerm** | **String** | | [optional] | - - - diff --git a/clients/vip-loan/docs/VipLoanFixedRateBorrowRequest.md b/clients/vip-loan/docs/VipLoanFixedRateBorrowRequest.md new file mode 100644 index 000000000..61e47223c --- /dev/null +++ b/clients/vip-loan/docs/VipLoanFixedRateBorrowRequest.md @@ -0,0 +1,20 @@ + + +# VipLoanFixedRateBorrowRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**supplyRequest** | **String** | Supply request string, positional encoding (no key). Multiple entries separated by `;`, fields separated by `:`, order: `<requestId>:<interestRate>:<amount>`. Example: `1212:0.12:100;3434:0.13:50` | | +|**borrowCoin** | **String** | Borrow coin | | +|**loanTerm** | **Long** | Loan term in days | | +|**borrowUid** | **Long** | Borrow receiving account UID | | +|**collateralCoin** | **String** | Collateral coin(s), multiple separated by `,`. Only coin names, no amount (VIP loan collateral amount = entire spot account balance) | | +|**collateralAccountId** | **String** | Collateral account ID(s), multiple separated by `,` | | +|**autoRepay** | **Boolean** | Default: `true`. `true`: auto repay at expiration; `false`: auto-convert to flexible (floating rate) at expiration | [optional] | +|**recvWindow** | **Long** | The value cannot be greater than `60000` | [optional] | + + + diff --git a/clients/vip-loan/docs/VipLoanFixedRateBorrowResponse.md b/clients/vip-loan/docs/VipLoanFixedRateBorrowResponse.md new file mode 100644 index 000000000..5192df355 --- /dev/null +++ b/clients/vip-loan/docs/VipLoanFixedRateBorrowResponse.md @@ -0,0 +1,22 @@ + + +# VipLoanFixedRateBorrowResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**borrowCoin** | **String** | Echo of input parameter | [optional] | +|**borrowAmount** | **String** | Actual total borrow amount (aggregated when multiple supplyRequest) | [optional] | +|**actualReceivedAmount** | **String** | Actual received amount | [optional] | +|**collateralCoin** | **String** | Echo of input parameter, comma-separated | [optional] | +|**collateralAccountId** | **String** | Echo of input parameter, comma-separated | [optional] | +|**borrowInterestRate** | **String** | Actual borrow interest rate (weighted average when multiple) | [optional] | +|**duration** | **String** | `{loanTerm}Days`, e.g. \"30Days\" | [optional] | +|**autoRepay** | **Boolean** | Echo of input parameter | [optional] | +|**orderId** | **Long** | Order ID | [optional] | +|**status** | **String** | `Succeeds` / `Failed` / `Processing` | [optional] | + + + diff --git a/clients/vip-loan/docs/VipLoanRenewRequest.md b/clients/vip-loan/docs/VipLoanRenewRequest.md deleted file mode 100644 index 968c086de..000000000 --- a/clients/vip-loan/docs/VipLoanRenewRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# VipLoanRenewRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**orderId** | **Long** | | | -|**loanTerm** | **Long** | | | -|**recvWindow** | **Long** | | [optional] | - - - diff --git a/clients/vip-loan/docs/VipLoanRenewResponse.md b/clients/vip-loan/docs/VipLoanRenewResponse.md deleted file mode 100644 index 9f379589a..000000000 --- a/clients/vip-loan/docs/VipLoanRenewResponse.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# VipLoanRenewResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loanAccountId** | **String** | | [optional] | -|**loanCoin** | **String** | | [optional] | -|**loanAmount** | **String** | | [optional] | -|**collateralAccountId** | **String** | | [optional] | -|**collateralCoin** | **String** | | [optional] | -|**loanTerm** | **String** | | [optional] | - - - diff --git a/clients/vip-loan/docs/VipLoanRepayResponse.md b/clients/vip-loan/docs/VipLoanRepayResponse.md deleted file mode 100644 index 552a15ccc..000000000 --- a/clients/vip-loan/docs/VipLoanRepayResponse.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# VipLoanRepayResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loanCoin** | **String** | | [optional] | -|**repayAmount** | **String** | | [optional] | -|**remainingPrincipal** | **String** | | [optional] | -|**remainingInterest** | **String** | | [optional] | -|**collateralCoin** | **String** | | [optional] | -|**currentLTV** | **String** | | [optional] | -|**repayStatus** | **String** | | [optional] | - - - diff --git a/clients/vip-loan/docs/rest-api/migration-guide.md b/clients/vip-loan/docs/rest-api/migration-guide.md index 4931d511f..8f89d92b3 100644 --- a/clients/vip-loan/docs/rest-api/migration-guide.md +++ b/clients/vip-loan/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-vip-loan - 3.0.0 + 4.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-vip-loan - 3.0.0 + 4.0.0 ``` diff --git a/clients/vip-loan/example_rest.md b/clients/vip-loan/example_rest.md index 9d23d5f1c..1cb40d4bd 100644 --- a/clients/vip-loan/example_rest.md +++ b/clients/vip-loan/example_rest.md @@ -1,28 +1,34 @@ ## MarketData -[GET /sapi/v1/loan/vip/request/interestRate](https://developers.binance.com/docs/vip_loan/market-data/Get-Borrow-Interest-Rate) - getBorrowInterestRate - [GetBorrowInterestRateExample.java:46](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetBorrowInterestRateExample.java#L46) +[GET /sapi/v1/loan/vip/request/interestRate](https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/market-data#get-borrow-interest-rate) - getBorrowInterestRate - [GetBorrowInterestRateExample.java:35](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetBorrowInterestRateExample.java#L35) -[GET /sapi/v1/loan/vip/collateral/data](https://developers.binance.com/docs/vip_loan/market-data/Get-Collateral-Asset-Data) - getCollateralAssetData - [GetCollateralAssetDataExample.java:46](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetCollateralAssetDataExample.java#L46) +[GET /sapi/v1/loan/vip/collateral/data](https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/market-data#get-collateral-asset-data) - getCollateralAssetData - [GetCollateralAssetDataExample.java:35](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetCollateralAssetDataExample.java#L35) -[GET /sapi/v1/loan/vip/loanable/data](https://developers.binance.com/docs/vip_loan/market-data/Get-Loanable-Assets-Data) - getLoanableAssetsData - [GetLoanableAssetsDataExample.java:47](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetLoanableAssetsDataExample.java#L47) +[GET /sapi/v1/loan/vip/loanable/data](https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/market-data#get-loanable-assets-data) - getLoanableAssetsData - [GetLoanableAssetsDataExample.java:36](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetLoanableAssetsDataExample.java#L36) -[GET /sapi/v1/loan/vip/interestRateHistory](https://developers.binance.com/docs/vip_loan/market-data/Get-VIP-Loan-Interest-Rate-History) - getVIPLoanInterestRateHistory - [GetVIPLoanInterestRateHistoryExample.java:48](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetVIPLoanInterestRateHistoryExample.java#L48) +[GET /sapi/v1/loan/vip/interestRateHistory](https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/market-data#get-viploan-interest-rate-history) - getVIPLoanInterestRateHistory - [GetVIPLoanInterestRateHistoryExample.java:38](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetVIPLoanInterestRateHistoryExample.java#L38) + +[GET /sapi/v1/loan/vip/fixed/market](https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/market-data#query-viploan-fixed-rate-market) - queryVIPLoanFixedRateMarket - [QueryVIPLoanFixedRateMarketExample.java:36](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/QueryVIPLoanFixedRateMarketExample.java#L36) ## Trade -[POST /sapi/v1/loan/vip/borrow](https://developers.binance.com/docs/vip_loan/trade/VIP-Loan-Borrow) - vipLoanBorrow - [VipLoanBorrowExample.java:49](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanBorrowExample.java#L49) +[POST /sapi/v1/loan/vip/borrow](https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/trade#vip-loan-borrow) - vipLoanBorrow - [VipLoanBorrowExample.java:40](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanBorrowExample.java#L40) + +[POST /sapi/v1/loan/vip/fixed/borrow](https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/trade#vip-loan-fixed-rate-borrow) - vipLoanFixedRateBorrow - [VipLoanFixedRateBorrowExample.java:40](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanFixedRateBorrowExample.java#L40) -[POST /sapi/v1/loan/vip/renew](https://developers.binance.com/docs/vip_loan/trade/VIP-Loan-Renew) - vipLoanRenew - [VipLoanRenewExample.java:47](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanRenewExample.java#L47) +[POST /sapi/v1/loan/vip/renew](https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/trade#vip-loan-renew) - vipLoanRenew - [VipLoanRenewExample.java:36](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanRenewExample.java#L36) -[POST /sapi/v1/loan/vip/repay](https://developers.binance.com/docs/vip_loan/trade/VIP-Loan-Repay) - vipLoanRepay - [VipLoanRepayExample.java:47](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanRepayExample.java#L47) +[POST /sapi/v1/loan/vip/repay](https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/trade#vip-loan-repay) - vipLoanRepay - [VipLoanRepayExample.java:36](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanRepayExample.java#L36) ## UserInformation -[GET /sapi/v1/loan/vip/collateral/account](https://developers.binance.com/docs/vip_loan/user-information/Check-Locked-Value-of-VIP-Collateral-Account) - checkVIPLoanCollateralAccount - [CheckVIPLoanCollateralAccountExample.java:48](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/CheckVIPLoanCollateralAccountExample.java#L48) +[GET /sapi/v1/loan/vip/collateral/account](https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/user-information#check-viploan-collateral-account) - checkVIPLoanCollateralAccount - [CheckVIPLoanCollateralAccountExample.java:38](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/CheckVIPLoanCollateralAccountExample.java#L38) + +[GET /sapi/v1/loan/vip/accruedInterest](https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/user-information#get-viploan-accrued-interest) - getVIPLoanAccruedInterest - [GetVIPLoanAccruedInterestExample.java:37](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/GetVIPLoanAccruedInterestExample.java#L37) -[GET /sapi/v1/loan/vip/accruedInterest](https://developers.binance.com/docs/vip_loan/user-information/Get-VIP-Loan-Accrued-Interest) - getVIPLoanAccruedInterest - [GetVIPLoanAccruedInterestExample.java:48](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/GetVIPLoanAccruedInterestExample.java#L48) +[GET /sapi/v1/loan/vip/ongoing/orders](https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/user-information#get-viploan-ongoing-orders) - getVIPLoanOngoingOrders - [GetVIPLoanOngoingOrdersExample.java:35](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/GetVIPLoanOngoingOrdersExample.java#L35) -[GET /sapi/v1/loan/vip/ongoing/orders](https://developers.binance.com/docs/vip_loan/user-information/Get-VIP-Loan-Ongoing-Orders) - getVIPLoanOngoingOrders - [GetVIPLoanOngoingOrdersExample.java:46](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/GetVIPLoanOngoingOrdersExample.java#L46) +[GET /sapi/v1/loan/vip/repay/history](https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/user-information#get-viploan-repayment-history) - getVIPLoanRepaymentHistory - [GetVIPLoanRepaymentHistoryExample.java:38](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/GetVIPLoanRepaymentHistoryExample.java#L38) -[GET /sapi/v1/loan/vip/request/data](https://developers.binance.com/docs/vip_loan/user-information/Query-Application-Status) - queryApplicationStatus - [QueryApplicationStatusExample.java:46](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/QueryApplicationStatusExample.java#L46) +[GET /sapi/v1/loan/vip/request/data](https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/user-information#query-application-status) - queryApplicationStatus - [QueryApplicationStatusExample.java:35](/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/QueryApplicationStatusExample.java#L35) diff --git a/clients/vip-loan/pom.xml b/clients/vip-loan/pom.xml index f1ab48189..65b1f55aa 100644 --- a/clients/vip-loan/pom.xml +++ b/clients/vip-loan/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-vip-loan vip-loan - 3.0.1 + 4.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/JSON.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/JSON.java index 3629e4754..6e07c013f 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/JSON.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -150,18 +150,36 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.vip_loan.rest.model .GetVIPLoanOngoingOrdersResponseRowsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.vip_loan.rest.model + .GetVIPLoanRepaymentHistoryResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.vip_loan.rest.model + .GetVIPLoanRepaymentHistoryResponseRowsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.vip_loan.rest.model.QueryApplicationStatusResponse .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.vip_loan.rest.model .QueryApplicationStatusResponseRowsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.vip_loan.rest.model + .QueryVIPLoanFixedRateMarketResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.vip_loan.rest.model + .QueryVIPLoanFixedRateMarketResponseRowsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.vip_loan.rest.model.VipLoanBorrowRequest .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.vip_loan.rest.model.VipLoanBorrowResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.vip_loan.rest.model.VipLoanFixedRateBorrowRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.vip_loan.rest.model.VipLoanFixedRateBorrowResponse + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.vip_loan.rest.model.VipLoanRenewRequest .CustomTypeAdapterFactory()); diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/MarketDataApi.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/MarketDataApi.java index 62f92f8ff..9b7b76a9f 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/MarketDataApi.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/MarketDataApi.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -23,6 +23,7 @@ import com.binance.connector.client.vip_loan.rest.model.GetCollateralAssetDataResponse; import com.binance.connector.client.vip_loan.rest.model.GetLoanableAssetsDataResponse; import com.binance.connector.client.vip_loan.rest.model.GetVIPLoanInterestRateHistoryResponse; +import com.binance.connector.client.vip_loan.rest.model.QueryVIPLoanFixedRateMarketResponse; import com.google.gson.reflect.TypeToken; import jakarta.validation.ConstraintViolation; import jakarta.validation.Validation; @@ -45,7 +46,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-vip-loan/3.0.0 (Java/%s; %s; %s)", + "binance-vip-loan/4.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -97,8 +98,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Get - * Borrow Interest Rate(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/market-data#get-borrow-interest-rate">Get + * Borrow Interest Rate (USER_DATA) Documentation */ private okhttp3.Call getBorrowInterestRateCall(String loanCoin, Long recvWindow) throws ApiException { @@ -197,7 +198,8 @@ private okhttp3.Call getBorrowInterestRateValidateBeforeCall(String loanCoin, Lo } /** - * Get Borrow Interest Rate(USER_DATA) Get Borrow Interest Rate Weight: 400 + * Get Borrow Interest Rate (USER_DATA) Get Borrow Interest Rate Weight(IP): 400 Security Type: + * USER_DATA * * @param loanCoin Max 10 assets, Multiple split by \",\" (required) * @param recvWindow (optional) @@ -212,11 +214,11 @@ private okhttp3.Call getBorrowInterestRateValidateBeforeCall(String loanCoin, Lo * * * @see Get - * Borrow Interest Rate(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/market-data#get-borrow-interest-rate">Get + * Borrow Interest Rate (USER_DATA) Documentation */ public ApiResponse getBorrowInterestRate( - @NotNull String loanCoin, Long recvWindow) throws ApiException { + @NotNull String loanCoin, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getBorrowInterestRateValidateBeforeCall(loanCoin, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -238,8 +240,8 @@ public ApiResponse getBorrowInterestRate( * * * @see Get - * Collateral Asset Data(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/market-data#get-collateral-asset-data">Get + * Collateral Asset Data (USER_DATA) Documentation */ private okhttp3.Call getCollateralAssetDataCall(String collateralCoin, Long recvWindow) throws ApiException { @@ -339,7 +341,8 @@ private okhttp3.Call getCollateralAssetDataValidateBeforeCall( } /** - * Get Collateral Asset Data(USER_DATA) Get Collateral Asset Data Weight: 400 + * Get Collateral Asset Data (USER_DATA) Get Collateral Asset Data Weight(IP): 400 Security + * Type: USER_DATA * * @param collateralCoin (optional) * @param recvWindow (optional) @@ -354,11 +357,11 @@ private okhttp3.Call getCollateralAssetDataValidateBeforeCall( * * * @see Get - * Collateral Asset Data(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/market-data#get-collateral-asset-data">Get + * Collateral Asset Data (USER_DATA) Documentation */ public ApiResponse getCollateralAssetData( - String collateralCoin, Long recvWindow) throws ApiException { + String collateralCoin, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getCollateralAssetDataValidateBeforeCall(collateralCoin, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -370,7 +373,7 @@ public ApiResponse getCollateralAssetData( * Build call for getLoanableAssetsData * * @param loanCoin (optional) - * @param vipLevel default:user's vip level (optional) + * @param vipLevel Defaults to the user's VIP level. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -382,8 +385,8 @@ public ApiResponse getCollateralAssetData( * * * @see Get - * Loanable Assets Data(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/market-data#get-loanable-assets-data">Get + * Loanable Assets Data (USER_DATA) Documentation */ private okhttp3.Call getLoanableAssetsDataCall(String loanCoin, Long vipLevel, Long recvWindow) throws ApiException { @@ -488,11 +491,11 @@ private okhttp3.Call getLoanableAssetsDataValidateBeforeCall( } /** - * Get Loanable Assets Data(USER_DATA) Get interest rate and borrow limit of loanable assets. - * The borrow limit is shown in USD value. Weight: 400 + * Get Loanable Assets Data (USER_DATA) Get interest rate and borrow limit of loanable assets. + * The borrow limit is shown in USD value. Weight(IP): 400 Security Type: USER_DATA * * @param loanCoin (optional) - * @param vipLevel default:user's vip level (optional) + * @param vipLevel Defaults to the user's VIP level. (optional) * @param recvWindow (optional) * @return ApiResponse<GetLoanableAssetsDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -505,11 +508,11 @@ private okhttp3.Call getLoanableAssetsDataValidateBeforeCall( * * * @see Get - * Loanable Assets Data(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/market-data#get-loanable-assets-data">Get + * Loanable Assets Data (USER_DATA) Documentation */ public ApiResponse getLoanableAssetsData( - String loanCoin, Long vipLevel, Long recvWindow) throws ApiException { + String loanCoin, Long vipLevel, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getLoanableAssetsDataValidateBeforeCall(loanCoin, vipLevel, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -522,10 +525,12 @@ public ApiResponse getLoanableAssetsData( * * @param coin (required) * @param recvWindow (required) - * @param startTime (optional) - * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) + * @param startTime If both startTime and endTime are omitted, the most recent 90 days are + * returned. (optional) + * @param endTime Maximum interval between startTime and endTime is 180 days. Time is based on + * UTC+0. (optional) + * @param current Current page number, starting from 1. (optional) + * @param limit Number of records per page. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -536,7 +541,7 @@ public ApiResponse getLoanableAssetsData( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/market-data#get-viploan-interest-rate-history">Get * VIP Loan Interest Rate History (USER_DATA) Documentation */ private okhttp3.Call getVIPLoanInterestRateHistoryCall( @@ -664,15 +669,18 @@ private okhttp3.Call getVIPLoanInterestRateHistoryValidateBeforeCall( /** * Get VIP Loan Interest Rate History (USER_DATA) Check VIP Loan flexible interest rate history - * * If startTime and endTime are not sent, the recent 90-day data will be returned * The max - * interval between startTime and end Time is 180 days. * Time based on UTC+0. Weight: 400 + * Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and + * `endTime` are not sent, recent 90-day data is returned. - The maximum interval + * between `startTime` and `endTime` is 180 days. - Time is based on UTC+0. * * @param coin (required) * @param recvWindow (required) - * @param startTime (optional) - * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) + * @param startTime If both startTime and endTime are omitted, the most recent 90 days are + * returned. (optional) + * @param endTime Maximum interval between startTime and endTime is 180 days. Time is based on + * UTC+0. (optional) + * @param current Current page number, starting from 1. (optional) + * @param limit Number of records per page. (optional) * @return ApiResponse<GetVIPLoanInterestRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -684,16 +692,16 @@ private okhttp3.Call getVIPLoanInterestRateHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/market-data#get-viploan-interest-rate-history">Get * VIP Loan Interest Rate History (USER_DATA) Documentation */ public ApiResponse getVIPLoanInterestRateHistory( @NotNull String coin, - @NotNull Long recvWindow, + @NotNull @Max(60000L) Long recvWindow, Long startTime, Long endTime, - Long current, - Long limit) + @Max(1000L) Long current, + @Max(100L) Long limit) throws ApiException { okhttp3.Call localVarCall = getVIPLoanInterestRateHistoryValidateBeforeCall( @@ -702,4 +710,181 @@ public ApiResponse getVIPLoanInterestRate new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } + + /** + * Build call for queryVIPLoanFixedRateMarket + * + * @param loanCoin Loan coin (required) + * @param duration Duration in days, minimum 1 (optional) + * @param current Page number, default 1, minimum 1 (optional) + * @param size Page size, default 10, range [1, 100] (optional) + * @param recvWindow The value cannot be greater than `60000` (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Query VIP Loan Fixed Rate Market -
+ * + * @see Query + * VIP Loan Fixed Rate Market (USER_DATA) Documentation + */ + private okhttp3.Call queryVIPLoanFixedRateMarketCall( + String loanCoin, Long duration, Long current, Long size, Long recvWindow) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/loan/vip/fixed/market"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (loanCoin != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("loanCoin", loanCoin)); + } + + if (duration != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("duration", duration)); + } + + if (current != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("current", current)); + } + + if (size != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call queryVIPLoanFixedRateMarketValidateBeforeCall( + String loanCoin, Long duration, Long current, Long size, Long recvWindow) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {loanCoin, duration, current, size, recvWindow}; + Method method = + this.getClass() + .getMethod( + "queryVIPLoanFixedRateMarket", + String.class, + Long.class, + Long.class, + Long.class, + Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return queryVIPLoanFixedRateMarketCall( + loanCoin, duration, current, size, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Query VIP Loan Fixed Rate Market (USER_DATA) Query the VIP Loan fixed rate market. Returns a + * paginated list of fixed-rate supply orders. Weight(IP): 6000 Security Type: USER_DATA + * + * @param loanCoin Loan coin (required) + * @param duration Duration in days, minimum 1 (optional) + * @param current Page number, default 1, minimum 1 (optional) + * @param size Page size, default 10, range [1, 100] (optional) + * @param recvWindow The value cannot be greater than `60000` (optional) + * @return ApiResponse<QueryVIPLoanFixedRateMarketResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Query VIP Loan Fixed Rate Market -
+ * + * @see Query + * VIP Loan Fixed Rate Market (USER_DATA) Documentation + */ + public ApiResponse queryVIPLoanFixedRateMarket( + @NotNull String loanCoin, + Long duration, + Long current, + Long size, + @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = + queryVIPLoanFixedRateMarketValidateBeforeCall( + loanCoin, duration, current, size, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } } diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/TradeApi.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/TradeApi.java index d27645270..2d4c4f626 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/TradeApi.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/TradeApi.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,8 @@ import com.binance.connector.client.common.exception.ConstraintViolationException; import com.binance.connector.client.vip_loan.rest.model.VipLoanBorrowRequest; import com.binance.connector.client.vip_loan.rest.model.VipLoanBorrowResponse; +import com.binance.connector.client.vip_loan.rest.model.VipLoanFixedRateBorrowRequest; +import com.binance.connector.client.vip_loan.rest.model.VipLoanFixedRateBorrowResponse; import com.binance.connector.client.vip_loan.rest.model.VipLoanRenewRequest; import com.binance.connector.client.vip_loan.rest.model.VipLoanRenewResponse; import com.binance.connector.client.vip_loan.rest.model.VipLoanRepayRequest; @@ -49,7 +51,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-vip-loan/3.0.0 (Java/%s; %s; %s)", + "binance-vip-loan/4.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -99,8 +101,9 @@ public void setCustomBaseUrl(String customBaseUrl) { * 200 VIP Loan Borrow - * * - * @see VIP Loan - * Borrow(TRADE) Documentation + * @see VIP + * Loan Borrow (TRADE) Documentation */ private okhttp3.Call vipLoanBorrowCall(VipLoanBorrowRequest vipLoanBorrowRequest) throws ApiException { @@ -225,10 +228,11 @@ private okhttp3.Call vipLoanBorrowValidateBeforeCall(VipLoanBorrowRequest vipLoa } /** - * VIP Loan Borrow(TRADE) VIP loan is available for VIP users only. * loanAccountId refer to - * loan receiving account * Only master account applications are supported * loanAccountId and - * collateralAccountId under same master account * loanTerm is mandatory if user choose stable - * rate Weight: 0 + * VIP Loan Borrow (TRADE) VIP loan is available for VIP users only. Weight(UID): 6000 Security + * Type: TRADE Notes: - `loanAccountId` refers to the loan receiving account. - Only + * master account applications are supported. - `loanAccountId` and + * `collateralAccountId` must be under the same master account. - `loanTerm` + * is mandatory if the user chooses a fixed rate (`isFlexibleRate = FALSE`). * * @param vipLoanBorrowRequest (required) * @return ApiResponse<VipLoanBorrowResponse> @@ -241,8 +245,9 @@ private okhttp3.Call vipLoanBorrowValidateBeforeCall(VipLoanBorrowRequest vipLoa * 200 VIP Loan Borrow - * * - * @see VIP Loan - * Borrow(TRADE) Documentation + * @see VIP + * Loan Borrow (TRADE) Documentation */ public ApiResponse vipLoanBorrow( @Valid @NotNull VipLoanBorrowRequest vipLoanBorrowRequest) throws ApiException { @@ -252,6 +257,180 @@ public ApiResponse vipLoanBorrow( return localVarApiClient.execute(localVarCall, localVarReturnType); } + /** + * Build call for vipLoanFixedRateBorrow + * + * @param vipLoanFixedRateBorrowRequest (required) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 VIP Loan Fixed Rate Borrow -
+ * + * @see VIP + * Loan Fixed Rate Borrow (TRADE) Documentation + */ + private okhttp3.Call vipLoanFixedRateBorrowCall( + VipLoanFixedRateBorrowRequest vipLoanFixedRateBorrowRequest) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/loan/vip/fixed/borrow"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (vipLoanFixedRateBorrowRequest.getSupplyRequest() != null) { + localVarFormParams.put( + "supplyRequest", vipLoanFixedRateBorrowRequest.getSupplyRequest()); + } + + if (vipLoanFixedRateBorrowRequest.getBorrowCoin() != null) { + localVarFormParams.put("borrowCoin", vipLoanFixedRateBorrowRequest.getBorrowCoin()); + } + + if (vipLoanFixedRateBorrowRequest.getLoanTerm() != null) { + localVarFormParams.put("loanTerm", vipLoanFixedRateBorrowRequest.getLoanTerm()); + } + + if (vipLoanFixedRateBorrowRequest.getBorrowUid() != null) { + localVarFormParams.put("borrowUid", vipLoanFixedRateBorrowRequest.getBorrowUid()); + } + + if (vipLoanFixedRateBorrowRequest.getCollateralCoin() != null) { + localVarFormParams.put( + "collateralCoin", vipLoanFixedRateBorrowRequest.getCollateralCoin()); + } + + if (vipLoanFixedRateBorrowRequest.getCollateralAccountId() != null) { + localVarFormParams.put( + "collateralAccountId", vipLoanFixedRateBorrowRequest.getCollateralAccountId()); + } + + if (vipLoanFixedRateBorrowRequest.getAutoRepay() != null) { + localVarFormParams.put("autoRepay", vipLoanFixedRateBorrowRequest.getAutoRepay()); + } + + if (vipLoanFixedRateBorrowRequest.getRecvWindow() != null) { + localVarFormParams.put("recvWindow", vipLoanFixedRateBorrowRequest.getRecvWindow()); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call vipLoanFixedRateBorrowValidateBeforeCall( + VipLoanFixedRateBorrowRequest vipLoanFixedRateBorrowRequest) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {vipLoanFixedRateBorrowRequest}; + Method method = + this.getClass() + .getMethod( + "vipLoanFixedRateBorrow", VipLoanFixedRateBorrowRequest.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return vipLoanFixedRateBorrowCall(vipLoanFixedRateBorrowRequest); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * VIP Loan Fixed Rate Borrow (TRADE) Submit a fixed rate borrow request by matching market + * supply orders. Weight(UID): 6000 Security Type: TRADE Notes: - **Rate limit:** 2 requests per + * second per account. - When multiple `supplyRequest` entries are provided, all + * `requestId` values must correspond to the same `borrowCoin` and + * `loanTerm` (validated by collateral facade). + * + * @param vipLoanFixedRateBorrowRequest (required) + * @return ApiResponse<VipLoanFixedRateBorrowResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 VIP Loan Fixed Rate Borrow -
+ * + * @see VIP + * Loan Fixed Rate Borrow (TRADE) Documentation + */ + public ApiResponse vipLoanFixedRateBorrow( + @Valid @NotNull VipLoanFixedRateBorrowRequest vipLoanFixedRateBorrowRequest) + throws ApiException { + okhttp3.Call localVarCall = + vipLoanFixedRateBorrowValidateBeforeCall(vipLoanFixedRateBorrowRequest); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + /** * Build call for vipLoanRenew * @@ -265,8 +444,9 @@ public ApiResponse vipLoanBorrow( * 200 VIP Loan Renew - * * - * @see VIP Loan - * Renew(TRADE) Documentation + * @see VIP + * Loan Renew (TRADE) Documentation */ private okhttp3.Call vipLoanRenewCall(VipLoanRenewRequest vipLoanRenewRequest) throws ApiException { @@ -368,7 +548,8 @@ private okhttp3.Call vipLoanRenewValidateBeforeCall(VipLoanRenewRequest vipLoanR } /** - * VIP Loan Renew(TRADE) VIP loan is available for VIP users only. Weight: 6000 + * VIP Loan Renew (TRADE) VIP loan is available for VIP users only. Weight(UID): 6000 Security + * Type: TRADE * * @param vipLoanRenewRequest (required) * @return ApiResponse<VipLoanRenewResponse> @@ -381,8 +562,9 @@ private okhttp3.Call vipLoanRenewValidateBeforeCall(VipLoanRenewRequest vipLoanR * 200 VIP Loan Renew - * * - * @see VIP Loan - * Renew(TRADE) Documentation + * @see VIP + * Loan Renew (TRADE) Documentation */ public ApiResponse vipLoanRenew( @Valid @NotNull VipLoanRenewRequest vipLoanRenewRequest) throws ApiException { @@ -405,8 +587,9 @@ public ApiResponse vipLoanRenew( * 200 VIP Loan Repay - * * - * @see VIP Loan - * Repay(TRADE) Documentation + * @see VIP + * Loan Repay (TRADE) Documentation */ private okhttp3.Call vipLoanRepayCall(VipLoanRepayRequest vipLoanRepayRequest) throws ApiException { @@ -510,7 +693,8 @@ private okhttp3.Call vipLoanRepayValidateBeforeCall(VipLoanRepayRequest vipLoanR } /** - * VIP Loan Repay(TRADE) VIP loan is available for VIP users only. Weight: 6000 + * VIP Loan Repay (TRADE) VIP loan is available for VIP users only. Weight(UID): 6000 Security + * Type: TRADE * * @param vipLoanRepayRequest (required) * @return ApiResponse<VipLoanRepayResponse> @@ -523,8 +707,9 @@ private okhttp3.Call vipLoanRepayValidateBeforeCall(VipLoanRepayRequest vipLoanR * 200 VIP Loan Repay - * * - * @see VIP Loan - * Repay(TRADE) Documentation + * @see VIP + * Loan Repay (TRADE) Documentation */ public ApiResponse vipLoanRepay( @Valid @NotNull VipLoanRepayRequest vipLoanRepayRequest) throws ApiException { diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/UserInformationApi.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/UserInformationApi.java index 07266a180..17659b89e 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/UserInformationApi.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/UserInformationApi.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.binance.connector.client.vip_loan.rest.model.CheckVIPLoanCollateralAccountResponse; import com.binance.connector.client.vip_loan.rest.model.GetVIPLoanAccruedInterestResponse; import com.binance.connector.client.vip_loan.rest.model.GetVIPLoanOngoingOrdersResponse; +import com.binance.connector.client.vip_loan.rest.model.GetVIPLoanRepaymentHistoryResponse; import com.binance.connector.client.vip_loan.rest.model.QueryApplicationStatusResponse; import com.google.gson.reflect.TypeToken; import jakarta.validation.ConstraintViolation; @@ -45,7 +46,7 @@ public class UserInformationApi { private static final String USER_AGENT = String.format( - "binance-vip-loan/3.0.0 (Java/%s; %s; %s)", + "binance-vip-loan/4.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -98,7 +99,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/user-information#check-viploan-collateral-account">Check * VIP Loan Collateral Account (USER_DATA) Documentation */ private okhttp3.Call checkVIPLoanCollateralAccountCall( @@ -208,10 +209,11 @@ private okhttp3.Call checkVIPLoanCollateralAccountValidateBeforeCall( } /** - * Check VIP Loan Collateral Account (USER_DATA) VIP loan is available for VIP users only * If - * the login account is loan account, all collateral accounts under the loan account can be - * queried. * If the login account is collateral account, only the current collateral account - * can be queried. Weight: 6000 + * Check VIP Loan Collateral Account (USER_DATA) VIP loan is available for VIP users only + * Weight(IP): 6000 Security Type: USER_DATA Notes: - If the logged-in account is a borrowing + * account, all collateral accounts bound to that borrowing account can be queried. - If the + * logged-in account is a collateral account, only collateral assets under that account can be + * queried. * * @param orderId (optional) * @param collateralAccountId (optional) @@ -227,11 +229,12 @@ private okhttp3.Call checkVIPLoanCollateralAccountValidateBeforeCall( * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/user-information#check-viploan-collateral-account">Check * VIP Loan Collateral Account (USER_DATA) Documentation */ public ApiResponse checkVIPLoanCollateralAccount( - Long orderId, Long collateralAccountId, Long recvWindow) throws ApiException { + Long orderId, Long collateralAccountId, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = checkVIPLoanCollateralAccountValidateBeforeCall( orderId, collateralAccountId, recvWindow); @@ -245,10 +248,11 @@ public ApiResponse checkVIPLoanCollateral * * @param orderId (optional) * @param loanCoin (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) + * @param startTime If both startTime and endTime are omitted, the most recent 90 days are + * returned. (optional) + * @param endTime Maximum interval between startTime and endTime is 90 days. (optional) + * @param current Current page number, starting from 1. (optional) + * @param limit Number of records per page. (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -260,7 +264,7 @@ public ApiResponse checkVIPLoanCollateral * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/user-information#get-viploan-accrued-interest">Get * VIP Loan Accrued Interest (USER_DATA) Documentation */ private okhttp3.Call getVIPLoanAccruedInterestCall( @@ -406,16 +410,18 @@ private okhttp3.Call getVIPLoanAccruedInterestValidateBeforeCall( } /** - * Get VIP Loan Accrued Interest (USER_DATA) Check VIP Loan interest record * If startTime and - * endTime are not sent, the recent 90-day data will be returned. * The max interval between - * startTime and endTime is 90 days. Weight: 400 + * Get VIP Loan Accrued Interest (USER_DATA) Check VIP Loan interest record Weight(IP): 400 + * Security Type: USER_DATA Notes: - If `startTime` and `endTime` are not + * sent, recent 90-day data is returned. - The maximum interval between `startTime` + * and `endTime` is 90 days. * * @param orderId (optional) * @param loanCoin (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) + * @param startTime If both startTime and endTime are omitted, the most recent 90 days are + * returned. (optional) + * @param endTime Maximum interval between startTime and endTime is 90 days. (optional) + * @param current Current page number, starting from 1. (optional) + * @param limit Number of records per page. (optional) * @param recvWindow (optional) * @return ApiResponse<GetVIPLoanAccruedInterestResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -428,7 +434,7 @@ private okhttp3.Call getVIPLoanAccruedInterestValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/user-information#get-viploan-accrued-interest">Get * VIP Loan Accrued Interest (USER_DATA) Documentation */ public ApiResponse getVIPLoanAccruedInterest( @@ -436,9 +442,9 @@ public ApiResponse getVIPLoanAccruedInterest( String loanCoin, Long startTime, Long endTime, - Long current, - Long limit, - Long recvWindow) + @Min(1L) @Max(1000L) Long current, + @Max(100L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getVIPLoanAccruedInterestValidateBeforeCall( @@ -455,8 +461,8 @@ public ApiResponse getVIPLoanAccruedInterest( * @param collateralAccountId (optional) * @param loanCoin (optional) * @param collateralCoin (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) + * @param current (optional) + * @param limit (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -468,8 +474,8 @@ public ApiResponse getVIPLoanAccruedInterest( * * * @see Get - * VIP Loan Ongoing Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/user-information#get-viploan-ongoing-orders">Get + * VIP Loan Ongoing Orders (USER_DATA) Documentation */ private okhttp3.Call getVIPLoanOngoingOrdersCall( Long orderId, @@ -622,14 +628,15 @@ private okhttp3.Call getVIPLoanOngoingOrdersValidateBeforeCall( } /** - * Get VIP Loan Ongoing Orders(USER_DATA) VIP loan is available for VIP users only. Weight: 400 + * Get VIP Loan Ongoing Orders (USER_DATA) VIP loan is available for VIP users only. Weight(IP): + * 400 Security Type: USER_DATA * * @param orderId (optional) * @param collateralAccountId (optional) * @param loanCoin (optional) * @param collateralCoin (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) + * @param current (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<GetVIPLoanOngoingOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -642,17 +649,17 @@ private okhttp3.Call getVIPLoanOngoingOrdersValidateBeforeCall( * * * @see Get - * VIP Loan Ongoing Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/user-information#get-viploan-ongoing-orders">Get + * VIP Loan Ongoing Orders (USER_DATA) Documentation */ public ApiResponse getVIPLoanOngoingOrders( Long orderId, Long collateralAccountId, String loanCoin, String collateralCoin, - Long current, - Long limit, - Long recvWindow) + @Min(1L) @Max(1000L) Long current, + @Max(100L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getVIPLoanOngoingOrdersValidateBeforeCall( @@ -668,11 +675,222 @@ public ApiResponse getVIPLoanOngoingOrders( return localVarApiClient.execute(localVarCall, localVarReturnType); } + /** + * Build call for getVIPLoanRepaymentHistory + * + * @param orderId (optional) + * @param loanCoin (optional) + * @param startTime If both startTime and endTime are omitted, the most recent 90 days are + * returned. (optional) + * @param endTime Maximum interval between startTime and endTime is 180 days. (optional) + * @param current Current page number, starting from 1. (optional) + * @param limit Number of records per page. (optional) + * @param recvWindow (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get VIP Loan Repayment History -
+ * + * @see Get + * VIP Loan Repayment History (USER_DATA) Documentation + */ + private okhttp3.Call getVIPLoanRepaymentHistoryCall( + Long orderId, + String loanCoin, + Long startTime, + Long endTime, + Long current, + Long limit, + Long recvWindow) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/loan/vip/repay/history"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (orderId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("orderId", orderId)); + } + + if (loanCoin != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("loanCoin", loanCoin)); + } + + if (startTime != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("startTime", startTime)); + } + + if (endTime != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endTime", endTime)); + } + + if (current != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("current", current)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getVIPLoanRepaymentHistoryValidateBeforeCall( + Long orderId, + String loanCoin, + Long startTime, + Long endTime, + Long current, + Long limit, + Long recvWindow) + throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = { + orderId, loanCoin, startTime, endTime, current, limit, recvWindow + }; + Method method = + this.getClass() + .getMethod( + "getVIPLoanRepaymentHistory", + Long.class, + String.class, + Long.class, + Long.class, + Long.class, + Long.class, + Long.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return getVIPLoanRepaymentHistoryCall( + orderId, loanCoin, startTime, endTime, current, limit, recvWindow); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Get VIP Loan Repayment History (USER_DATA) VIP Loans are available only to VIP users. + * Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and + * `endTime` are not sent, recent 90-day data is returned. - The maximum interval + * between `startTime` and `endTime` is 180 days. + * + * @param orderId (optional) + * @param loanCoin (optional) + * @param startTime If both startTime and endTime are omitted, the most recent 90 days are + * returned. (optional) + * @param endTime Maximum interval between startTime and endTime is 180 days. (optional) + * @param current Current page number, starting from 1. (optional) + * @param limit Number of records per page. (optional) + * @param recvWindow (optional) + * @return ApiResponse<GetVIPLoanRepaymentHistoryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get VIP Loan Repayment History -
+ * + * @see Get + * VIP Loan Repayment History (USER_DATA) Documentation + */ + public ApiResponse getVIPLoanRepaymentHistory( + Long orderId, + String loanCoin, + Long startTime, + Long endTime, + @Min(1L) @Max(1000L) Long current, + @Max(100L) Long limit, + @Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = + getVIPLoanRepaymentHistoryValidateBeforeCall( + orderId, loanCoin, startTime, endTime, current, limit, recvWindow); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + /** * Build call for queryApplicationStatus * - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) + * @param current Current page number, starting from 1. (optional) + * @param limit (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -684,8 +902,8 @@ public ApiResponse getVIPLoanOngoingOrders( * * * @see Query - * Application Status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/user-information#query-application-status">Query + * Application Status (USER_DATA) Documentation */ private okhttp3.Call queryApplicationStatusCall(Long current, Long limit, Long recvWindow) throws ApiException { @@ -790,10 +1008,11 @@ private okhttp3.Call queryApplicationStatusValidateBeforeCall( } /** - * Query Application Status(USER_DATA) Query Application Status Weight: 400 + * Query Application Status (USER_DATA) Query Application Status Weight(UID): 400 Security Type: + * USER_DATA * - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) + * @param current Current page number, starting from 1. (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<QueryApplicationStatusResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -806,11 +1025,12 @@ private okhttp3.Call queryApplicationStatusValidateBeforeCall( * * * @see Query - * Application Status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/user-information#query-application-status">Query + * Application Status (USER_DATA) Documentation */ public ApiResponse queryApplicationStatus( - Long current, Long limit, Long recvWindow) throws ApiException { + @Min(1L) @Max(1000L) Long current, @Max(100L) Long limit, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = queryApplicationStatusValidateBeforeCall(current, limit, recvWindow); java.lang.reflect.Type localVarReturnType = diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/VipLoanRestApi.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/VipLoanRestApi.java index 6bf6bb8e3..6e69ce6e2 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/VipLoanRestApi.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/VipLoanRestApi.java @@ -12,9 +12,13 @@ import com.binance.connector.client.vip_loan.rest.model.GetVIPLoanAccruedInterestResponse; import com.binance.connector.client.vip_loan.rest.model.GetVIPLoanInterestRateHistoryResponse; import com.binance.connector.client.vip_loan.rest.model.GetVIPLoanOngoingOrdersResponse; +import com.binance.connector.client.vip_loan.rest.model.GetVIPLoanRepaymentHistoryResponse; import com.binance.connector.client.vip_loan.rest.model.QueryApplicationStatusResponse; +import com.binance.connector.client.vip_loan.rest.model.QueryVIPLoanFixedRateMarketResponse; import com.binance.connector.client.vip_loan.rest.model.VipLoanBorrowRequest; import com.binance.connector.client.vip_loan.rest.model.VipLoanBorrowResponse; +import com.binance.connector.client.vip_loan.rest.model.VipLoanFixedRateBorrowRequest; +import com.binance.connector.client.vip_loan.rest.model.VipLoanFixedRateBorrowResponse; import com.binance.connector.client.vip_loan.rest.model.VipLoanRenewRequest; import com.binance.connector.client.vip_loan.rest.model.VipLoanRenewResponse; import com.binance.connector.client.vip_loan.rest.model.VipLoanRepayRequest; @@ -37,7 +41,8 @@ public VipLoanRestApi(ApiClient apiClient) { } /** - * Get Borrow Interest Rate(USER_DATA) Get Borrow Interest Rate Weight: 400 + * Get Borrow Interest Rate (USER_DATA) Get Borrow Interest Rate Weight(IP): 400 Security Type: + * USER_DATA * * @param loanCoin Max 10 assets, Multiple split by \",\" (required) * @param recvWindow (optional) @@ -52,8 +57,8 @@ public VipLoanRestApi(ApiClient apiClient) { * * * @see Get - * Borrow Interest Rate(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/market-data#get-borrow-interest-rate">Get + * Borrow Interest Rate (USER_DATA) Documentation */ public ApiResponse getBorrowInterestRate( String loanCoin, Long recvWindow) throws ApiException { @@ -61,7 +66,8 @@ public ApiResponse getBorrowInterestRate( } /** - * Get Collateral Asset Data(USER_DATA) Get Collateral Asset Data Weight: 400 + * Get Collateral Asset Data (USER_DATA) Get Collateral Asset Data Weight(IP): 400 Security + * Type: USER_DATA * * @param collateralCoin (optional) * @param recvWindow (optional) @@ -76,8 +82,8 @@ public ApiResponse getBorrowInterestRate( * * * @see Get - * Collateral Asset Data(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/market-data#get-collateral-asset-data">Get + * Collateral Asset Data (USER_DATA) Documentation */ public ApiResponse getCollateralAssetData( String collateralCoin, Long recvWindow) throws ApiException { @@ -85,11 +91,11 @@ public ApiResponse getCollateralAssetData( } /** - * Get Loanable Assets Data(USER_DATA) Get interest rate and borrow limit of loanable assets. - * The borrow limit is shown in USD value. Weight: 400 + * Get Loanable Assets Data (USER_DATA) Get interest rate and borrow limit of loanable assets. + * The borrow limit is shown in USD value. Weight(IP): 400 Security Type: USER_DATA * * @param loanCoin (optional) - * @param vipLevel default:user's vip level (optional) + * @param vipLevel Defaults to the user's VIP level. (optional) * @param recvWindow (optional) * @return ApiResponse<GetLoanableAssetsDataResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -102,8 +108,8 @@ public ApiResponse getCollateralAssetData( * * * @see Get - * Loanable Assets Data(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/market-data#get-loanable-assets-data">Get + * Loanable Assets Data (USER_DATA) Documentation */ public ApiResponse getLoanableAssetsData( String loanCoin, Long vipLevel, Long recvWindow) throws ApiException { @@ -112,15 +118,18 @@ public ApiResponse getLoanableAssetsData( /** * Get VIP Loan Interest Rate History (USER_DATA) Check VIP Loan flexible interest rate history - * * If startTime and endTime are not sent, the recent 90-day data will be returned * The max - * interval between startTime and end Time is 180 days. * Time based on UTC+0. Weight: 400 + * Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and + * `endTime` are not sent, recent 90-day data is returned. - The maximum interval + * between `startTime` and `endTime` is 180 days. - Time is based on UTC+0. * * @param coin (required) * @param recvWindow (required) - * @param startTime (optional) - * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) + * @param startTime If both startTime and endTime are omitted, the most recent 90 days are + * returned. (optional) + * @param endTime Maximum interval between startTime and endTime is 180 days. Time is based on + * UTC+0. (optional) + * @param current Current page number, starting from 1. (optional) + * @param limit Number of records per page. (optional) * @return ApiResponse<GetVIPLoanInterestRateHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -132,7 +141,7 @@ public ApiResponse getLoanableAssetsData( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/market-data#get-viploan-interest-rate-history">Get * VIP Loan Interest Rate History (USER_DATA) Documentation */ public ApiResponse getVIPLoanInterestRateHistory( @@ -143,10 +152,41 @@ public ApiResponse getVIPLoanInterestRate } /** - * VIP Loan Borrow(TRADE) VIP loan is available for VIP users only. * loanAccountId refer to - * loan receiving account * Only master account applications are supported * loanAccountId and - * collateralAccountId under same master account * loanTerm is mandatory if user choose stable - * rate Weight: 0 + * Query VIP Loan Fixed Rate Market (USER_DATA) Query the VIP Loan fixed rate market. Returns a + * paginated list of fixed-rate supply orders. Weight(IP): 6000 Security Type: USER_DATA + * + * @param loanCoin Loan coin (required) + * @param duration Duration in days, minimum 1 (optional) + * @param current Page number, default 1, minimum 1 (optional) + * @param size Page size, default 10, range [1, 100] (optional) + * @param recvWindow The value cannot be greater than `60000` (optional) + * @return ApiResponse<QueryVIPLoanFixedRateMarketResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Query VIP Loan Fixed Rate Market -
+ * + * @see Query + * VIP Loan Fixed Rate Market (USER_DATA) Documentation + */ + public ApiResponse queryVIPLoanFixedRateMarket( + String loanCoin, Long duration, Long current, Long size, Long recvWindow) + throws ApiException { + return marketDataApi.queryVIPLoanFixedRateMarket( + loanCoin, duration, current, size, recvWindow); + } + + /** + * VIP Loan Borrow (TRADE) VIP loan is available for VIP users only. Weight(UID): 6000 Security + * Type: TRADE Notes: - `loanAccountId` refers to the loan receiving account. - Only + * master account applications are supported. - `loanAccountId` and + * `collateralAccountId` must be under the same master account. - `loanTerm` + * is mandatory if the user chooses a fixed rate (`isFlexibleRate = FALSE`). * * @param vipLoanBorrowRequest (required) * @return ApiResponse<VipLoanBorrowResponse> @@ -159,8 +199,9 @@ public ApiResponse getVIPLoanInterestRate * 200 VIP Loan Borrow - * * - * @see VIP Loan - * Borrow(TRADE) Documentation + * @see VIP + * Loan Borrow (TRADE) Documentation */ public ApiResponse vipLoanBorrow( VipLoanBorrowRequest vipLoanBorrowRequest) throws ApiException { @@ -168,7 +209,35 @@ public ApiResponse vipLoanBorrow( } /** - * VIP Loan Renew(TRADE) VIP loan is available for VIP users only. Weight: 6000 + * VIP Loan Fixed Rate Borrow (TRADE) Submit a fixed rate borrow request by matching market + * supply orders. Weight(UID): 6000 Security Type: TRADE Notes: - **Rate limit:** 2 requests per + * second per account. - When multiple `supplyRequest` entries are provided, all + * `requestId` values must correspond to the same `borrowCoin` and + * `loanTerm` (validated by collateral facade). + * + * @param vipLoanFixedRateBorrowRequest (required) + * @return ApiResponse<VipLoanFixedRateBorrowResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 VIP Loan Fixed Rate Borrow -
+ * + * @see VIP + * Loan Fixed Rate Borrow (TRADE) Documentation + */ + public ApiResponse vipLoanFixedRateBorrow( + VipLoanFixedRateBorrowRequest vipLoanFixedRateBorrowRequest) throws ApiException { + return tradeApi.vipLoanFixedRateBorrow(vipLoanFixedRateBorrowRequest); + } + + /** + * VIP Loan Renew (TRADE) VIP loan is available for VIP users only. Weight(UID): 6000 Security + * Type: TRADE * * @param vipLoanRenewRequest (required) * @return ApiResponse<VipLoanRenewResponse> @@ -181,8 +250,9 @@ public ApiResponse vipLoanBorrow( * 200 VIP Loan Renew - * * - * @see VIP Loan - * Renew(TRADE) Documentation + * @see VIP + * Loan Renew (TRADE) Documentation */ public ApiResponse vipLoanRenew(VipLoanRenewRequest vipLoanRenewRequest) throws ApiException { @@ -190,7 +260,8 @@ public ApiResponse vipLoanRenew(VipLoanRenewRequest vipLoa } /** - * VIP Loan Repay(TRADE) VIP loan is available for VIP users only. Weight: 6000 + * VIP Loan Repay (TRADE) VIP loan is available for VIP users only. Weight(UID): 6000 Security + * Type: TRADE * * @param vipLoanRepayRequest (required) * @return ApiResponse<VipLoanRepayResponse> @@ -203,8 +274,9 @@ public ApiResponse vipLoanRenew(VipLoanRenewRequest vipLoa * 200 VIP Loan Repay - * * - * @see VIP Loan - * Repay(TRADE) Documentation + * @see VIP + * Loan Repay (TRADE) Documentation */ public ApiResponse vipLoanRepay(VipLoanRepayRequest vipLoanRepayRequest) throws ApiException { @@ -212,10 +284,11 @@ public ApiResponse vipLoanRepay(VipLoanRepayRequest vipLoa } /** - * Check VIP Loan Collateral Account (USER_DATA) VIP loan is available for VIP users only * If - * the login account is loan account, all collateral accounts under the loan account can be - * queried. * If the login account is collateral account, only the current collateral account - * can be queried. Weight: 6000 + * Check VIP Loan Collateral Account (USER_DATA) VIP loan is available for VIP users only + * Weight(IP): 6000 Security Type: USER_DATA Notes: - If the logged-in account is a borrowing + * account, all collateral accounts bound to that borrowing account can be queried. - If the + * logged-in account is a collateral account, only collateral assets under that account can be + * queried. * * @param orderId (optional) * @param collateralAccountId (optional) @@ -231,7 +304,7 @@ public ApiResponse vipLoanRepay(VipLoanRepayRequest vipLoa * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/user-information#check-viploan-collateral-account">Check * VIP Loan Collateral Account (USER_DATA) Documentation */ public ApiResponse checkVIPLoanCollateralAccount( @@ -241,16 +314,18 @@ public ApiResponse checkVIPLoanCollateral } /** - * Get VIP Loan Accrued Interest (USER_DATA) Check VIP Loan interest record * If startTime and - * endTime are not sent, the recent 90-day data will be returned. * The max interval between - * startTime and endTime is 90 days. Weight: 400 + * Get VIP Loan Accrued Interest (USER_DATA) Check VIP Loan interest record Weight(IP): 400 + * Security Type: USER_DATA Notes: - If `startTime` and `endTime` are not + * sent, recent 90-day data is returned. - The maximum interval between `startTime` + * and `endTime` is 90 days. * * @param orderId (optional) * @param loanCoin (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) + * @param startTime If both startTime and endTime are omitted, the most recent 90 days are + * returned. (optional) + * @param endTime Maximum interval between startTime and endTime is 90 days. (optional) + * @param current Current page number, starting from 1. (optional) + * @param limit Number of records per page. (optional) * @param recvWindow (optional) * @return ApiResponse<GetVIPLoanAccruedInterestResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -263,7 +338,7 @@ public ApiResponse checkVIPLoanCollateral * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/user-information#get-viploan-accrued-interest">Get * VIP Loan Accrued Interest (USER_DATA) Documentation */ public ApiResponse getVIPLoanAccruedInterest( @@ -280,14 +355,15 @@ public ApiResponse getVIPLoanAccruedInterest( } /** - * Get VIP Loan Ongoing Orders(USER_DATA) VIP loan is available for VIP users only. Weight: 400 + * Get VIP Loan Ongoing Orders (USER_DATA) VIP loan is available for VIP users only. Weight(IP): + * 400 Security Type: USER_DATA * * @param orderId (optional) * @param collateralAccountId (optional) * @param loanCoin (optional) * @param collateralCoin (optional) - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) + * @param current (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<GetVIPLoanOngoingOrdersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -300,8 +376,8 @@ public ApiResponse getVIPLoanAccruedInterest( * * * @see Get - * VIP Loan Ongoing Orders(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/user-information#get-viploan-ongoing-orders">Get + * VIP Loan Ongoing Orders (USER_DATA) Documentation */ public ApiResponse getVIPLoanOngoingOrders( Long orderId, @@ -317,10 +393,52 @@ public ApiResponse getVIPLoanOngoingOrders( } /** - * Query Application Status(USER_DATA) Query Application Status Weight: 400 + * Get VIP Loan Repayment History (USER_DATA) VIP Loans are available only to VIP users. + * Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and + * `endTime` are not sent, recent 90-day data is returned. - The maximum interval + * between `startTime` and `endTime` is 180 days. + * + * @param orderId (optional) + * @param loanCoin (optional) + * @param startTime If both startTime and endTime are omitted, the most recent 90 days are + * returned. (optional) + * @param endTime Maximum interval between startTime and endTime is 180 days. (optional) + * @param current Current page number, starting from 1. (optional) + * @param limit Number of records per page. (optional) + * @param recvWindow (optional) + * @return ApiResponse<GetVIPLoanRepaymentHistoryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get VIP Loan Repayment History -
+ * + * @see Get + * VIP Loan Repayment History (USER_DATA) Documentation + */ + public ApiResponse getVIPLoanRepaymentHistory( + Long orderId, + String loanCoin, + Long startTime, + Long endTime, + Long current, + Long limit, + Long recvWindow) + throws ApiException { + return userInformationApi.getVIPLoanRepaymentHistory( + orderId, loanCoin, startTime, endTime, current, limit, recvWindow); + } + + /** + * Query Application Status (USER_DATA) Query Application Status Weight(UID): 400 Security Type: + * USER_DATA * - * @param current Current querying page. Start from 1; default: 1; max: 1000 (optional) - * @param limit Default: 10; max: 100 (optional) + * @param current Current page number, starting from 1. (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<QueryApplicationStatusResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -333,8 +451,8 @@ public ApiResponse getVIPLoanOngoingOrders( * * * @see Query - * Application Status(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/user-information#query-application-status">Query + * Application Status (USER_DATA) Documentation */ public ApiResponse queryApplicationStatus( Long current, Long limit, Long recvWindow) throws ApiException { diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/CheckVIPLoanCollateralAccountResponse.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/CheckVIPLoanCollateralAccountResponse.java index 93414830b..274ad9eaf 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/CheckVIPLoanCollateralAccountResponse.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/CheckVIPLoanCollateralAccountResponse.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** CheckVIPLoanCollateralAccountResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CheckVIPLoanCollateralAccountResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/CheckVIPLoanCollateralAccountResponseRowsInner.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/CheckVIPLoanCollateralAccountResponseRowsInner.java index 2136f9000..553215af6 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/CheckVIPLoanCollateralAccountResponseRowsInner.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/CheckVIPLoanCollateralAccountResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CheckVIPLoanCollateralAccountResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CheckVIPLoanCollateralAccountResponseRowsInner { public static final String SERIALIZED_NAME_COLLATERAL_ACCOUNT_ID = "collateralAccountId"; diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetBorrowInterestRateResponse.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetBorrowInterestRateResponse.java index 055ce2a11..d2bc041c6 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetBorrowInterestRateResponse.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetBorrowInterestRateResponse.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetBorrowInterestRateResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBorrowInterestRateResponse extends ArrayList { public GetBorrowInterestRateResponse() {} diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetBorrowInterestRateResponseInner.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetBorrowInterestRateResponseInner.java index 60cb7a5ed..e71d3494d 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetBorrowInterestRateResponseInner.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetBorrowInterestRateResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetBorrowInterestRateResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetBorrowInterestRateResponseInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetCollateralAssetDataResponse.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetCollateralAssetDataResponse.java index 5af99a1a3..84c1b1304 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetCollateralAssetDataResponse.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetCollateralAssetDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetCollateralAssetDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCollateralAssetDataResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetCollateralAssetDataResponseRowsInner.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetCollateralAssetDataResponseRowsInner.java index b5fe277e9..16a15bece 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetCollateralAssetDataResponseRowsInner.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetCollateralAssetDataResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetCollateralAssetDataResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCollateralAssetDataResponseRowsInner { public static final String SERIALIZED_NAME_COLLATERAL_COIN = "collateralCoin"; diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetLoanableAssetsDataResponse.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetLoanableAssetsDataResponse.java index 74ff0a8fb..36138a611 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetLoanableAssetsDataResponse.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetLoanableAssetsDataResponse.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetLoanableAssetsDataResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLoanableAssetsDataResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetLoanableAssetsDataResponseRowsInner.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetLoanableAssetsDataResponseRowsInner.java index aec7874f4..1c80803ce 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetLoanableAssetsDataResponseRowsInner.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetLoanableAssetsDataResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetLoanableAssetsDataResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetLoanableAssetsDataResponseRowsInner { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanAccruedInterestResponse.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanAccruedInterestResponse.java index 790ba8e0f..42936b300 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanAccruedInterestResponse.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanAccruedInterestResponse.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetVIPLoanAccruedInterestResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetVIPLoanAccruedInterestResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanAccruedInterestResponseRowsInner.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanAccruedInterestResponseRowsInner.java index 592c49455..cebfed240 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanAccruedInterestResponseRowsInner.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanAccruedInterestResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetVIPLoanAccruedInterestResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetVIPLoanAccruedInterestResponseRowsInner { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; @@ -181,7 +181,7 @@ public GetVIPLoanAccruedInterestResponseRowsInner orderId( } /** - * Get orderId + * Latest order ID for the renewal order. * * @return orderId */ diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanInterestRateHistoryResponse.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanInterestRateHistoryResponse.java index 9930c4206..4b740a5eb 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanInterestRateHistoryResponse.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanInterestRateHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetVIPLoanInterestRateHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetVIPLoanInterestRateHistoryResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanInterestRateHistoryResponseRowsInner.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanInterestRateHistoryResponseRowsInner.java index 170a79e66..458ad00bc 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanInterestRateHistoryResponseRowsInner.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanInterestRateHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetVIPLoanInterestRateHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetVIPLoanInterestRateHistoryResponseRowsInner { public static final String SERIALIZED_NAME_COIN = "coin"; diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanOngoingOrdersResponse.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanOngoingOrdersResponse.java index 1065183c2..5f8089273 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanOngoingOrdersResponse.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanOngoingOrdersResponse.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetVIPLoanOngoingOrdersResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetVIPLoanOngoingOrdersResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanOngoingOrdersResponseRowsInner.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanOngoingOrdersResponseRowsInner.java index 08c4dcb10..9a813bb9d 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanOngoingOrdersResponseRowsInner.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanOngoingOrdersResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetVIPLoanOngoingOrdersResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetVIPLoanOngoingOrdersResponseRowsInner { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -184,7 +184,7 @@ public GetVIPLoanOngoingOrdersResponseRowsInner loanRate( } /** - * Get loanRate + * For flexible loans, this is the flexible rate. * * @return loanRate */ @@ -326,7 +326,7 @@ public GetVIPLoanOngoingOrdersResponseRowsInner expirationTime( } /** - * Get expirationTime + * For flexible loans, this value is `0`. * * @return expirationTime */ @@ -366,7 +366,7 @@ public GetVIPLoanOngoingOrdersResponseRowsInner loanTerm( } /** - * Get loanTerm + * For flexible loans, this value is `open term`. * * @return loanTerm */ diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanRepaymentHistoryResponse.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanRepaymentHistoryResponse.java new file mode 100644 index 000000000..5a58e6d78 --- /dev/null +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanRepaymentHistoryResponse.java @@ -0,0 +1,285 @@ +/* + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.vip_loan.rest.model; + +import com.binance.connector.client.vip_loan.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** GetVIPLoanRepaymentHistoryResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class GetVIPLoanRepaymentHistoryResponse { + public static final String SERIALIZED_NAME_ROWS = "rows"; + + @SerializedName(SERIALIZED_NAME_ROWS) + @jakarta.annotation.Nullable + private List<@Valid GetVIPLoanRepaymentHistoryResponseRowsInner> rows; + + public static final String SERIALIZED_NAME_TOTAL = "total"; + + @SerializedName(SERIALIZED_NAME_TOTAL) + @jakarta.annotation.Nullable + private Long total; + + public GetVIPLoanRepaymentHistoryResponse() {} + + public GetVIPLoanRepaymentHistoryResponse rows( + @jakarta.annotation.Nullable + List<@Valid GetVIPLoanRepaymentHistoryResponseRowsInner> rows) { + this.rows = rows; + return this; + } + + public GetVIPLoanRepaymentHistoryResponse addRowsItem( + GetVIPLoanRepaymentHistoryResponseRowsInner rowsItem) { + if (this.rows == null) { + this.rows = new ArrayList<>(); + } + this.rows.add(rowsItem); + return this; + } + + /** + * Get rows + * + * @return rows + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid GetVIPLoanRepaymentHistoryResponseRowsInner> getRows() { + return rows; + } + + public void setRows( + @jakarta.annotation.Nullable + List<@Valid GetVIPLoanRepaymentHistoryResponseRowsInner> rows) { + this.rows = rows; + } + + public GetVIPLoanRepaymentHistoryResponse total(@jakarta.annotation.Nullable Long total) { + this.total = total; + return this; + } + + /** + * Get total + * + * @return total + */ + @jakarta.annotation.Nullable + public Long getTotal() { + return total; + } + + public void setTotal(@jakarta.annotation.Nullable Long total) { + this.total = total; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetVIPLoanRepaymentHistoryResponse getVIPLoanRepaymentHistoryResponse = + (GetVIPLoanRepaymentHistoryResponse) o; + return Objects.equals(this.rows, getVIPLoanRepaymentHistoryResponse.rows) + && Objects.equals(this.total, getVIPLoanRepaymentHistoryResponse.total); + } + + @Override + public int hashCode() { + return Objects.hash(rows, total); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetVIPLoanRepaymentHistoryResponse {\n"); + sb.append(" rows: ").append(toIndentedString(rows)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object rowsValue = getRows(); + String rowsValueAsString = ""; + rowsValueAsString = + (String) + ((Collection) rowsValue) + .stream().map(Object::toString).collect(Collectors.joining(",")); + sb.append("rows=").append(urlEncode(rowsValueAsString)).append(""); + Object totalValue = getTotal(); + String totalValueAsString = ""; + totalValueAsString = totalValue.toString(); + sb.append("total=").append(urlEncode(totalValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("rows"); + openapiFields.add("total"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * GetVIPLoanRepaymentHistoryResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetVIPLoanRepaymentHistoryResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetVIPLoanRepaymentHistoryResponse is" + + " not found in the empty JSON string", + GetVIPLoanRepaymentHistoryResponse.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("rows") != null && !jsonObj.get("rows").isJsonNull()) { + JsonArray jsonArrayrows = jsonObj.getAsJsonArray("rows"); + if (jsonArrayrows != null) { + // ensure the json data is an array + if (!jsonObj.get("rows").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rows` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("rows").toString())); + } + + // validate the optional field `rows` (array) + for (int i = 0; i < jsonArrayrows.size(); i++) { + GetVIPLoanRepaymentHistoryResponseRowsInner.validateJsonElement( + jsonArrayrows.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetVIPLoanRepaymentHistoryResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetVIPLoanRepaymentHistoryResponse' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(GetVIPLoanRepaymentHistoryResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GetVIPLoanRepaymentHistoryResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetVIPLoanRepaymentHistoryResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetVIPLoanRepaymentHistoryResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetVIPLoanRepaymentHistoryResponse + * @throws IOException if the JSON string is invalid with respect to + * GetVIPLoanRepaymentHistoryResponse + */ + public static GetVIPLoanRepaymentHistoryResponse fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, GetVIPLoanRepaymentHistoryResponse.class); + } + + /** + * Convert an instance of GetVIPLoanRepaymentHistoryResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanRepaymentHistoryResponseRowsInner.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanRepaymentHistoryResponseRowsInner.java new file mode 100644 index 000000000..8366bcd25 --- /dev/null +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/GetVIPLoanRepaymentHistoryResponseRowsInner.java @@ -0,0 +1,477 @@ +/* + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.vip_loan.rest.model; + +import com.binance.connector.client.vip_loan.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** GetVIPLoanRepaymentHistoryResponseRowsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class GetVIPLoanRepaymentHistoryResponseRowsInner { + public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; + + @SerializedName(SERIALIZED_NAME_LOAN_COIN) + @jakarta.annotation.Nullable + private String loanCoin; + + public static final String SERIALIZED_NAME_REPAY_AMOUNT = "repayAmount"; + + @SerializedName(SERIALIZED_NAME_REPAY_AMOUNT) + @jakarta.annotation.Nullable + private String repayAmount; + + public static final String SERIALIZED_NAME_COLLATERAL_COIN = "collateralCoin"; + + @SerializedName(SERIALIZED_NAME_COLLATERAL_COIN) + @jakarta.annotation.Nullable + private String collateralCoin; + + public static final String SERIALIZED_NAME_REPAY_STATUS = "repayStatus"; + + @SerializedName(SERIALIZED_NAME_REPAY_STATUS) + @jakarta.annotation.Nullable + private String repayStatus; + + public static final String SERIALIZED_NAME_LOAN_DATE = "loanDate"; + + @SerializedName(SERIALIZED_NAME_LOAN_DATE) + @jakarta.annotation.Nullable + private String loanDate; + + public static final String SERIALIZED_NAME_REPAY_TIME = "repayTime"; + + @SerializedName(SERIALIZED_NAME_REPAY_TIME) + @jakarta.annotation.Nullable + private String repayTime; + + public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; + + @SerializedName(SERIALIZED_NAME_ORDER_ID) + @jakarta.annotation.Nullable + private String orderId; + + public GetVIPLoanRepaymentHistoryResponseRowsInner() {} + + public GetVIPLoanRepaymentHistoryResponseRowsInner loanCoin( + @jakarta.annotation.Nullable String loanCoin) { + this.loanCoin = loanCoin; + return this; + } + + /** + * Get loanCoin + * + * @return loanCoin + */ + @jakarta.annotation.Nullable + public String getLoanCoin() { + return loanCoin; + } + + public void setLoanCoin(@jakarta.annotation.Nullable String loanCoin) { + this.loanCoin = loanCoin; + } + + public GetVIPLoanRepaymentHistoryResponseRowsInner repayAmount( + @jakarta.annotation.Nullable String repayAmount) { + this.repayAmount = repayAmount; + return this; + } + + /** + * Get repayAmount + * + * @return repayAmount + */ + @jakarta.annotation.Nullable + public String getRepayAmount() { + return repayAmount; + } + + public void setRepayAmount(@jakarta.annotation.Nullable String repayAmount) { + this.repayAmount = repayAmount; + } + + public GetVIPLoanRepaymentHistoryResponseRowsInner collateralCoin( + @jakarta.annotation.Nullable String collateralCoin) { + this.collateralCoin = collateralCoin; + return this; + } + + /** + * Get collateralCoin + * + * @return collateralCoin + */ + @jakarta.annotation.Nullable + public String getCollateralCoin() { + return collateralCoin; + } + + public void setCollateralCoin(@jakarta.annotation.Nullable String collateralCoin) { + this.collateralCoin = collateralCoin; + } + + public GetVIPLoanRepaymentHistoryResponseRowsInner repayStatus( + @jakarta.annotation.Nullable String repayStatus) { + this.repayStatus = repayStatus; + return this; + } + + /** + * Repayment status (`Repaid`, `Repaying`, `Failed`). + * + * @return repayStatus + */ + @jakarta.annotation.Nullable + public String getRepayStatus() { + return repayStatus; + } + + public void setRepayStatus(@jakarta.annotation.Nullable String repayStatus) { + this.repayStatus = repayStatus; + } + + public GetVIPLoanRepaymentHistoryResponseRowsInner loanDate( + @jakarta.annotation.Nullable String loanDate) { + this.loanDate = loanDate; + return this; + } + + /** + * Get loanDate + * + * @return loanDate + */ + @jakarta.annotation.Nullable + public String getLoanDate() { + return loanDate; + } + + public void setLoanDate(@jakarta.annotation.Nullable String loanDate) { + this.loanDate = loanDate; + } + + public GetVIPLoanRepaymentHistoryResponseRowsInner repayTime( + @jakarta.annotation.Nullable String repayTime) { + this.repayTime = repayTime; + return this; + } + + /** + * Get repayTime + * + * @return repayTime + */ + @jakarta.annotation.Nullable + public String getRepayTime() { + return repayTime; + } + + public void setRepayTime(@jakarta.annotation.Nullable String repayTime) { + this.repayTime = repayTime; + } + + public GetVIPLoanRepaymentHistoryResponseRowsInner orderId( + @jakarta.annotation.Nullable String orderId) { + this.orderId = orderId; + return this; + } + + /** + * Get orderId + * + * @return orderId + */ + @jakarta.annotation.Nullable + public String getOrderId() { + return orderId; + } + + public void setOrderId(@jakarta.annotation.Nullable String orderId) { + this.orderId = orderId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetVIPLoanRepaymentHistoryResponseRowsInner getVIPLoanRepaymentHistoryResponseRowsInner = + (GetVIPLoanRepaymentHistoryResponseRowsInner) o; + return Objects.equals(this.loanCoin, getVIPLoanRepaymentHistoryResponseRowsInner.loanCoin) + && Objects.equals( + this.repayAmount, getVIPLoanRepaymentHistoryResponseRowsInner.repayAmount) + && Objects.equals( + this.collateralCoin, + getVIPLoanRepaymentHistoryResponseRowsInner.collateralCoin) + && Objects.equals( + this.repayStatus, getVIPLoanRepaymentHistoryResponseRowsInner.repayStatus) + && Objects.equals( + this.loanDate, getVIPLoanRepaymentHistoryResponseRowsInner.loanDate) + && Objects.equals( + this.repayTime, getVIPLoanRepaymentHistoryResponseRowsInner.repayTime) + && Objects.equals( + this.orderId, getVIPLoanRepaymentHistoryResponseRowsInner.orderId); + } + + @Override + public int hashCode() { + return Objects.hash( + loanCoin, repayAmount, collateralCoin, repayStatus, loanDate, repayTime, orderId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetVIPLoanRepaymentHistoryResponseRowsInner {\n"); + sb.append(" loanCoin: ").append(toIndentedString(loanCoin)).append("\n"); + sb.append(" repayAmount: ").append(toIndentedString(repayAmount)).append("\n"); + sb.append(" collateralCoin: ").append(toIndentedString(collateralCoin)).append("\n"); + sb.append(" repayStatus: ").append(toIndentedString(repayStatus)).append("\n"); + sb.append(" loanDate: ").append(toIndentedString(loanDate)).append("\n"); + sb.append(" repayTime: ").append(toIndentedString(repayTime)).append("\n"); + sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object loanCoinValue = getLoanCoin(); + String loanCoinValueAsString = ""; + loanCoinValueAsString = loanCoinValue.toString(); + sb.append("loanCoin=").append(urlEncode(loanCoinValueAsString)).append(""); + Object repayAmountValue = getRepayAmount(); + String repayAmountValueAsString = ""; + repayAmountValueAsString = repayAmountValue.toString(); + sb.append("repayAmount=").append(urlEncode(repayAmountValueAsString)).append(""); + Object collateralCoinValue = getCollateralCoin(); + String collateralCoinValueAsString = ""; + collateralCoinValueAsString = collateralCoinValue.toString(); + sb.append("collateralCoin=").append(urlEncode(collateralCoinValueAsString)).append(""); + Object repayStatusValue = getRepayStatus(); + String repayStatusValueAsString = ""; + repayStatusValueAsString = repayStatusValue.toString(); + sb.append("repayStatus=").append(urlEncode(repayStatusValueAsString)).append(""); + Object loanDateValue = getLoanDate(); + String loanDateValueAsString = ""; + loanDateValueAsString = loanDateValue.toString(); + sb.append("loanDate=").append(urlEncode(loanDateValueAsString)).append(""); + Object repayTimeValue = getRepayTime(); + String repayTimeValueAsString = ""; + repayTimeValueAsString = repayTimeValue.toString(); + sb.append("repayTime=").append(urlEncode(repayTimeValueAsString)).append(""); + Object orderIdValue = getOrderId(); + String orderIdValueAsString = ""; + orderIdValueAsString = orderIdValue.toString(); + sb.append("orderId=").append(urlEncode(orderIdValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("loanCoin"); + openapiFields.add("repayAmount"); + openapiFields.add("collateralCoin"); + openapiFields.add("repayStatus"); + openapiFields.add("loanDate"); + openapiFields.add("repayTime"); + openapiFields.add("orderId"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * GetVIPLoanRepaymentHistoryResponseRowsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetVIPLoanRepaymentHistoryResponseRowsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " GetVIPLoanRepaymentHistoryResponseRowsInner is not found in" + + " the empty JSON string", + GetVIPLoanRepaymentHistoryResponseRowsInner.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("loanCoin") != null && !jsonObj.get("loanCoin").isJsonNull()) + && !jsonObj.get("loanCoin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `loanCoin` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("loanCoin").toString())); + } + if ((jsonObj.get("repayAmount") != null && !jsonObj.get("repayAmount").isJsonNull()) + && !jsonObj.get("repayAmount").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `repayAmount` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("repayAmount").toString())); + } + if ((jsonObj.get("collateralCoin") != null && !jsonObj.get("collateralCoin").isJsonNull()) + && !jsonObj.get("collateralCoin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `collateralCoin` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("collateralCoin").toString())); + } + if ((jsonObj.get("repayStatus") != null && !jsonObj.get("repayStatus").isJsonNull()) + && !jsonObj.get("repayStatus").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `repayStatus` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("repayStatus").toString())); + } + if ((jsonObj.get("loanDate") != null && !jsonObj.get("loanDate").isJsonNull()) + && !jsonObj.get("loanDate").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `loanDate` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("loanDate").toString())); + } + if ((jsonObj.get("repayTime") != null && !jsonObj.get("repayTime").isJsonNull()) + && !jsonObj.get("repayTime").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `repayTime` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("repayTime").toString())); + } + if ((jsonObj.get("orderId") != null && !jsonObj.get("orderId").isJsonNull()) + && !jsonObj.get("orderId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `orderId` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("orderId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetVIPLoanRepaymentHistoryResponseRowsInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'GetVIPLoanRepaymentHistoryResponseRowsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(GetVIPLoanRepaymentHistoryResponseRowsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, GetVIPLoanRepaymentHistoryResponseRowsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetVIPLoanRepaymentHistoryResponseRowsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetVIPLoanRepaymentHistoryResponseRowsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetVIPLoanRepaymentHistoryResponseRowsInner + * @throws IOException if the JSON string is invalid with respect to + * GetVIPLoanRepaymentHistoryResponseRowsInner + */ + public static GetVIPLoanRepaymentHistoryResponseRowsInner fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, GetVIPLoanRepaymentHistoryResponseRowsInner.class); + } + + /** + * Convert an instance of GetVIPLoanRepaymentHistoryResponseRowsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/QueryApplicationStatusResponse.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/QueryApplicationStatusResponse.java index 63684ec2a..65710c0d8 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/QueryApplicationStatusResponse.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/QueryApplicationStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryApplicationStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryApplicationStatusResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/QueryApplicationStatusResponseRowsInner.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/QueryApplicationStatusResponseRowsInner.java index 832acd14c..9cf2e9590 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/QueryApplicationStatusResponseRowsInner.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/QueryApplicationStatusResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryApplicationStatusResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryApplicationStatusResponseRowsInner { public static final String SERIALIZED_NAME_LOAN_ACCOUNT_ID = "loanAccountId"; @@ -105,7 +105,7 @@ public QueryApplicationStatusResponseRowsInner loanAccountId( } /** - * Get loanAccountId + * Loan receiving account. * * @return loanAccountId */ @@ -265,7 +265,9 @@ public QueryApplicationStatusResponseRowsInner status( } /** - * Get status + * Order status (`Accruing_Interest`, `Overdue`, `Liquidating`, + * `Repaying`, `Repaid`, `Liquidated`, `Pending`, + * `Failed`). * * @return status */ diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/QueryVIPLoanFixedRateMarketResponse.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/QueryVIPLoanFixedRateMarketResponse.java new file mode 100644 index 000000000..2f75f5e65 --- /dev/null +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/QueryVIPLoanFixedRateMarketResponse.java @@ -0,0 +1,285 @@ +/* + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.vip_loan.rest.model; + +import com.binance.connector.client.vip_loan.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** QueryVIPLoanFixedRateMarketResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class QueryVIPLoanFixedRateMarketResponse { + public static final String SERIALIZED_NAME_TOTAL = "total"; + + @SerializedName(SERIALIZED_NAME_TOTAL) + @jakarta.annotation.Nullable + private Long total; + + public static final String SERIALIZED_NAME_ROWS = "rows"; + + @SerializedName(SERIALIZED_NAME_ROWS) + @jakarta.annotation.Nullable + private List<@Valid QueryVIPLoanFixedRateMarketResponseRowsInner> rows; + + public QueryVIPLoanFixedRateMarketResponse() {} + + public QueryVIPLoanFixedRateMarketResponse total(@jakarta.annotation.Nullable Long total) { + this.total = total; + return this; + } + + /** + * Total number of records + * + * @return total + */ + @jakarta.annotation.Nullable + public Long getTotal() { + return total; + } + + public void setTotal(@jakarta.annotation.Nullable Long total) { + this.total = total; + } + + public QueryVIPLoanFixedRateMarketResponse rows( + @jakarta.annotation.Nullable + List<@Valid QueryVIPLoanFixedRateMarketResponseRowsInner> rows) { + this.rows = rows; + return this; + } + + public QueryVIPLoanFixedRateMarketResponse addRowsItem( + QueryVIPLoanFixedRateMarketResponseRowsInner rowsItem) { + if (this.rows == null) { + this.rows = new ArrayList<>(); + } + this.rows.add(rowsItem); + return this; + } + + /** + * Current page data + * + * @return rows + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid QueryVIPLoanFixedRateMarketResponseRowsInner> getRows() { + return rows; + } + + public void setRows( + @jakarta.annotation.Nullable + List<@Valid QueryVIPLoanFixedRateMarketResponseRowsInner> rows) { + this.rows = rows; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryVIPLoanFixedRateMarketResponse queryVIPLoanFixedRateMarketResponse = + (QueryVIPLoanFixedRateMarketResponse) o; + return Objects.equals(this.total, queryVIPLoanFixedRateMarketResponse.total) + && Objects.equals(this.rows, queryVIPLoanFixedRateMarketResponse.rows); + } + + @Override + public int hashCode() { + return Objects.hash(total, rows); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryVIPLoanFixedRateMarketResponse {\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" rows: ").append(toIndentedString(rows)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object totalValue = getTotal(); + String totalValueAsString = ""; + totalValueAsString = totalValue.toString(); + sb.append("total=").append(urlEncode(totalValueAsString)).append(""); + Object rowsValue = getRows(); + String rowsValueAsString = ""; + rowsValueAsString = + (String) + ((Collection) rowsValue) + .stream().map(Object::toString).collect(Collectors.joining(",")); + sb.append("rows=").append(urlEncode(rowsValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("total"); + openapiFields.add("rows"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * QueryVIPLoanFixedRateMarketResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QueryVIPLoanFixedRateMarketResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in QueryVIPLoanFixedRateMarketResponse is" + + " not found in the empty JSON string", + QueryVIPLoanFixedRateMarketResponse.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("rows") != null && !jsonObj.get("rows").isJsonNull()) { + JsonArray jsonArrayrows = jsonObj.getAsJsonArray("rows"); + if (jsonArrayrows != null) { + // ensure the json data is an array + if (!jsonObj.get("rows").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rows` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("rows").toString())); + } + + // validate the optional field `rows` (array) + for (int i = 0; i < jsonArrayrows.size(); i++) { + QueryVIPLoanFixedRateMarketResponseRowsInner.validateJsonElement( + jsonArrayrows.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QueryVIPLoanFixedRateMarketResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QueryVIPLoanFixedRateMarketResponse' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(QueryVIPLoanFixedRateMarketResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, QueryVIPLoanFixedRateMarketResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QueryVIPLoanFixedRateMarketResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of QueryVIPLoanFixedRateMarketResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of QueryVIPLoanFixedRateMarketResponse + * @throws IOException if the JSON string is invalid with respect to + * QueryVIPLoanFixedRateMarketResponse + */ + public static QueryVIPLoanFixedRateMarketResponse fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, QueryVIPLoanFixedRateMarketResponse.class); + } + + /** + * Convert an instance of QueryVIPLoanFixedRateMarketResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/QueryVIPLoanFixedRateMarketResponseRowsInner.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/QueryVIPLoanFixedRateMarketResponseRowsInner.java new file mode 100644 index 000000000..da33e8d16 --- /dev/null +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/QueryVIPLoanFixedRateMarketResponseRowsInner.java @@ -0,0 +1,509 @@ +/* + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.vip_loan.rest.model; + +import com.binance.connector.client.vip_loan.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** QueryVIPLoanFixedRateMarketResponseRowsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class QueryVIPLoanFixedRateMarketResponseRowsInner { + public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; + + @SerializedName(SERIALIZED_NAME_REQUEST_ID) + @jakarta.annotation.Nullable + private Long requestId; + + public static final String SERIALIZED_NAME_REQUEST_NO = "requestNo"; + + @SerializedName(SERIALIZED_NAME_REQUEST_NO) + @jakarta.annotation.Nullable + private Long requestNo; + + public static final String SERIALIZED_NAME_COIN = "coin"; + + @SerializedName(SERIALIZED_NAME_COIN) + @jakarta.annotation.Nullable + private String coin; + + public static final String SERIALIZED_NAME_INTEREST_RATE = "interestRate"; + + @SerializedName(SERIALIZED_NAME_INTEREST_RATE) + @jakarta.annotation.Nullable + private String interestRate; + + public static final String SERIALIZED_NAME_DURATION = "duration"; + + @SerializedName(SERIALIZED_NAME_DURATION) + @jakarta.annotation.Nullable + private Long duration; + + public static final String SERIALIZED_NAME_MINIMUM_AMOUNT = "minimumAmount"; + + @SerializedName(SERIALIZED_NAME_MINIMUM_AMOUNT) + @jakarta.annotation.Nullable + private String minimumAmount; + + public static final String SERIALIZED_NAME_AVAILABLE_AMOUNT = "availableAmount"; + + @SerializedName(SERIALIZED_NAME_AVAILABLE_AMOUNT) + @jakarta.annotation.Nullable + private String availableAmount; + + public static final String SERIALIZED_NAME_ESTIMATED_INTEREST = "estimatedInterest"; + + @SerializedName(SERIALIZED_NAME_ESTIMATED_INTEREST) + @jakarta.annotation.Nullable + private String estimatedInterest; + + public QueryVIPLoanFixedRateMarketResponseRowsInner() {} + + public QueryVIPLoanFixedRateMarketResponseRowsInner requestId( + @jakarta.annotation.Nullable Long requestId) { + this.requestId = requestId; + return this; + } + + /** + * Supply request ID + * + * @return requestId + */ + @jakarta.annotation.Nullable + public Long getRequestId() { + return requestId; + } + + public void setRequestId(@jakarta.annotation.Nullable Long requestId) { + this.requestId = requestId; + } + + public QueryVIPLoanFixedRateMarketResponseRowsInner requestNo( + @jakarta.annotation.Nullable Long requestNo) { + this.requestNo = requestNo; + return this; + } + + /** + * Request number + * + * @return requestNo + */ + @jakarta.annotation.Nullable + public Long getRequestNo() { + return requestNo; + } + + public void setRequestNo(@jakarta.annotation.Nullable Long requestNo) { + this.requestNo = requestNo; + } + + public QueryVIPLoanFixedRateMarketResponseRowsInner coin( + @jakarta.annotation.Nullable String coin) { + this.coin = coin; + return this; + } + + /** + * Coin + * + * @return coin + */ + @jakarta.annotation.Nullable + public String getCoin() { + return coin; + } + + public void setCoin(@jakarta.annotation.Nullable String coin) { + this.coin = coin; + } + + public QueryVIPLoanFixedRateMarketResponseRowsInner interestRate( + @jakarta.annotation.Nullable String interestRate) { + this.interestRate = interestRate; + return this; + } + + /** + * Annual interest rate + * + * @return interestRate + */ + @jakarta.annotation.Nullable + public String getInterestRate() { + return interestRate; + } + + public void setInterestRate(@jakarta.annotation.Nullable String interestRate) { + this.interestRate = interestRate; + } + + public QueryVIPLoanFixedRateMarketResponseRowsInner duration( + @jakarta.annotation.Nullable Long duration) { + this.duration = duration; + return this; + } + + /** + * Duration in days + * + * @return duration + */ + @jakarta.annotation.Nullable + public Long getDuration() { + return duration; + } + + public void setDuration(@jakarta.annotation.Nullable Long duration) { + this.duration = duration; + } + + public QueryVIPLoanFixedRateMarketResponseRowsInner minimumAmount( + @jakarta.annotation.Nullable String minimumAmount) { + this.minimumAmount = minimumAmount; + return this; + } + + /** + * Minimum borrow amount + * + * @return minimumAmount + */ + @jakarta.annotation.Nullable + public String getMinimumAmount() { + return minimumAmount; + } + + public void setMinimumAmount(@jakarta.annotation.Nullable String minimumAmount) { + this.minimumAmount = minimumAmount; + } + + public QueryVIPLoanFixedRateMarketResponseRowsInner availableAmount( + @jakarta.annotation.Nullable String availableAmount) { + this.availableAmount = availableAmount; + return this; + } + + /** + * Maximum available borrow amount + * + * @return availableAmount + */ + @jakarta.annotation.Nullable + public String getAvailableAmount() { + return availableAmount; + } + + public void setAvailableAmount(@jakarta.annotation.Nullable String availableAmount) { + this.availableAmount = availableAmount; + } + + public QueryVIPLoanFixedRateMarketResponseRowsInner estimatedInterest( + @jakarta.annotation.Nullable String estimatedInterest) { + this.estimatedInterest = estimatedInterest; + return this; + } + + /** + * Estimated interest + * + * @return estimatedInterest + */ + @jakarta.annotation.Nullable + public String getEstimatedInterest() { + return estimatedInterest; + } + + public void setEstimatedInterest(@jakarta.annotation.Nullable String estimatedInterest) { + this.estimatedInterest = estimatedInterest; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryVIPLoanFixedRateMarketResponseRowsInner queryVIPLoanFixedRateMarketResponseRowsInner = + (QueryVIPLoanFixedRateMarketResponseRowsInner) o; + return Objects.equals( + this.requestId, queryVIPLoanFixedRateMarketResponseRowsInner.requestId) + && Objects.equals( + this.requestNo, queryVIPLoanFixedRateMarketResponseRowsInner.requestNo) + && Objects.equals(this.coin, queryVIPLoanFixedRateMarketResponseRowsInner.coin) + && Objects.equals( + this.interestRate, + queryVIPLoanFixedRateMarketResponseRowsInner.interestRate) + && Objects.equals( + this.duration, queryVIPLoanFixedRateMarketResponseRowsInner.duration) + && Objects.equals( + this.minimumAmount, + queryVIPLoanFixedRateMarketResponseRowsInner.minimumAmount) + && Objects.equals( + this.availableAmount, + queryVIPLoanFixedRateMarketResponseRowsInner.availableAmount) + && Objects.equals( + this.estimatedInterest, + queryVIPLoanFixedRateMarketResponseRowsInner.estimatedInterest); + } + + @Override + public int hashCode() { + return Objects.hash( + requestId, + requestNo, + coin, + interestRate, + duration, + minimumAmount, + availableAmount, + estimatedInterest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryVIPLoanFixedRateMarketResponseRowsInner {\n"); + sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n"); + sb.append(" requestNo: ").append(toIndentedString(requestNo)).append("\n"); + sb.append(" coin: ").append(toIndentedString(coin)).append("\n"); + sb.append(" interestRate: ").append(toIndentedString(interestRate)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" minimumAmount: ").append(toIndentedString(minimumAmount)).append("\n"); + sb.append(" availableAmount: ").append(toIndentedString(availableAmount)).append("\n"); + sb.append(" estimatedInterest: ").append(toIndentedString(estimatedInterest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object requestIdValue = getRequestId(); + String requestIdValueAsString = ""; + requestIdValueAsString = requestIdValue.toString(); + sb.append("requestId=").append(urlEncode(requestIdValueAsString)).append(""); + Object requestNoValue = getRequestNo(); + String requestNoValueAsString = ""; + requestNoValueAsString = requestNoValue.toString(); + sb.append("requestNo=").append(urlEncode(requestNoValueAsString)).append(""); + Object coinValue = getCoin(); + String coinValueAsString = ""; + coinValueAsString = coinValue.toString(); + sb.append("coin=").append(urlEncode(coinValueAsString)).append(""); + Object interestRateValue = getInterestRate(); + String interestRateValueAsString = ""; + interestRateValueAsString = interestRateValue.toString(); + sb.append("interestRate=").append(urlEncode(interestRateValueAsString)).append(""); + Object durationValue = getDuration(); + String durationValueAsString = ""; + durationValueAsString = durationValue.toString(); + sb.append("duration=").append(urlEncode(durationValueAsString)).append(""); + Object minimumAmountValue = getMinimumAmount(); + String minimumAmountValueAsString = ""; + minimumAmountValueAsString = minimumAmountValue.toString(); + sb.append("minimumAmount=").append(urlEncode(minimumAmountValueAsString)).append(""); + Object availableAmountValue = getAvailableAmount(); + String availableAmountValueAsString = ""; + availableAmountValueAsString = availableAmountValue.toString(); + sb.append("availableAmount=").append(urlEncode(availableAmountValueAsString)).append(""); + Object estimatedInterestValue = getEstimatedInterest(); + String estimatedInterestValueAsString = ""; + estimatedInterestValueAsString = estimatedInterestValue.toString(); + sb.append("estimatedInterest=") + .append(urlEncode(estimatedInterestValueAsString)) + .append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("requestId"); + openapiFields.add("requestNo"); + openapiFields.add("coin"); + openapiFields.add("interestRate"); + openapiFields.add("duration"); + openapiFields.add("minimumAmount"); + openapiFields.add("availableAmount"); + openapiFields.add("estimatedInterest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * QueryVIPLoanFixedRateMarketResponseRowsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QueryVIPLoanFixedRateMarketResponseRowsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " QueryVIPLoanFixedRateMarketResponseRowsInner is not found" + + " in the empty JSON string", + QueryVIPLoanFixedRateMarketResponseRowsInner.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("coin") != null && !jsonObj.get("coin").isJsonNull()) + && !jsonObj.get("coin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `coin` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("coin").toString())); + } + if ((jsonObj.get("interestRate") != null && !jsonObj.get("interestRate").isJsonNull()) + && !jsonObj.get("interestRate").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `interestRate` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("interestRate").toString())); + } + if ((jsonObj.get("minimumAmount") != null && !jsonObj.get("minimumAmount").isJsonNull()) + && !jsonObj.get("minimumAmount").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `minimumAmount` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("minimumAmount").toString())); + } + if ((jsonObj.get("availableAmount") != null && !jsonObj.get("availableAmount").isJsonNull()) + && !jsonObj.get("availableAmount").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `availableAmount` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("availableAmount").toString())); + } + if ((jsonObj.get("estimatedInterest") != null + && !jsonObj.get("estimatedInterest").isJsonNull()) + && !jsonObj.get("estimatedInterest").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `estimatedInterest` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("estimatedInterest").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QueryVIPLoanFixedRateMarketResponseRowsInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'QueryVIPLoanFixedRateMarketResponseRowsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get(QueryVIPLoanFixedRateMarketResponseRowsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, QueryVIPLoanFixedRateMarketResponseRowsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QueryVIPLoanFixedRateMarketResponseRowsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of QueryVIPLoanFixedRateMarketResponseRowsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of QueryVIPLoanFixedRateMarketResponseRowsInner + * @throws IOException if the JSON string is invalid with respect to + * QueryVIPLoanFixedRateMarketResponseRowsInner + */ + public static QueryVIPLoanFixedRateMarketResponseRowsInner fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, QueryVIPLoanFixedRateMarketResponseRowsInner.class); + } + + /** + * Convert an instance of QueryVIPLoanFixedRateMarketResponseRowsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanBorrowRequest.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanBorrowRequest.java index c91242bce..cba7076f7 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanBorrowRequest.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanBorrowRequest.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** VipLoanBorrowRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class VipLoanBorrowRequest { public static final String SERIALIZED_NAME_LOAN_ACCOUNT_ID = "loanAccountId"; @@ -59,7 +59,7 @@ public class VipLoanBorrowRequest { @SerializedName(SERIALIZED_NAME_COLLATERAL_ACCOUNT_ID) @jakarta.annotation.Nonnull - private Long collateralAccountId; + private String collateralAccountId; public static final String SERIALIZED_NAME_COLLATERAL_COIN = "collateralCoin"; @@ -71,7 +71,7 @@ public class VipLoanBorrowRequest { @SerializedName(SERIALIZED_NAME_IS_FLEXIBLE_RATE) @jakarta.annotation.Nonnull - private Boolean isFlexibleRate; + private Boolean isFlexibleRate = true; public static final String SERIALIZED_NAME_LOAN_TERM = "loanTerm"; @@ -149,23 +149,23 @@ public void setLoanAmount(@jakarta.annotation.Nonnull Double loanAmount) { } public VipLoanBorrowRequest collateralAccountId( - @jakarta.annotation.Nonnull Long collateralAccountId) { + @jakarta.annotation.Nonnull String collateralAccountId) { this.collateralAccountId = collateralAccountId; return this; } /** - * Get collateralAccountId + * Collateral account ID(s). Multiple split by `,` * * @return collateralAccountId */ @jakarta.annotation.Nonnull @NotNull - public Long getCollateralAccountId() { + public String getCollateralAccountId() { return collateralAccountId; } - public void setCollateralAccountId(@jakarta.annotation.Nonnull Long collateralAccountId) { + public void setCollateralAccountId(@jakarta.annotation.Nonnull String collateralAccountId) { this.collateralAccountId = collateralAccountId; } @@ -195,7 +195,7 @@ public VipLoanBorrowRequest isFlexibleRate(@jakarta.annotation.Nonnull Boolean i } /** - * Get isFlexibleRate + * TRUE: flexible rate; FALSE: fixed rate * * @return isFlexibleRate */ @@ -215,7 +215,7 @@ public VipLoanBorrowRequest loanTerm(@jakarta.annotation.Nullable Long loanTerm) } /** - * Get loanTerm + * Mandatory for fixed rate. Optional for flexible rate. e.g. 30/60 days * * @return loanTerm */ @@ -234,11 +234,12 @@ public VipLoanBorrowRequest recvWindow(@jakarta.annotation.Nullable Long recvWin } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -417,6 +418,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("loanCoin").toString())); } + if (!jsonObj.get("collateralAccountId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `collateralAccountId` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("collateralAccountId").toString())); + } if (!jsonObj.get("collateralCoin").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanBorrowResponse.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanBorrowResponse.java index 72e664a8a..eea363a2b 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanBorrowResponse.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanBorrowResponse.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** VipLoanBorrowResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class VipLoanBorrowResponse { public static final String SERIALIZED_NAME_LOAN_ACCOUNT_ID = "loanAccountId"; @@ -92,7 +92,7 @@ public VipLoanBorrowResponse loanAccountId(@jakarta.annotation.Nullable String l } /** - * Get loanAccountId + * Loan receiving account. * * @return loanAccountId */ diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanFixedRateBorrowRequest.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanFixedRateBorrowRequest.java new file mode 100644 index 000000000..ad0ddad83 --- /dev/null +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanFixedRateBorrowRequest.java @@ -0,0 +1,504 @@ +/* + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.vip_loan.rest.model; + +import com.binance.connector.client.vip_loan.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** VipLoanFixedRateBorrowRequest */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class VipLoanFixedRateBorrowRequest { + public static final String SERIALIZED_NAME_SUPPLY_REQUEST = "supplyRequest"; + + @SerializedName(SERIALIZED_NAME_SUPPLY_REQUEST) + @jakarta.annotation.Nonnull + private String supplyRequest; + + public static final String SERIALIZED_NAME_BORROW_COIN = "borrowCoin"; + + @SerializedName(SERIALIZED_NAME_BORROW_COIN) + @jakarta.annotation.Nonnull + private String borrowCoin; + + public static final String SERIALIZED_NAME_LOAN_TERM = "loanTerm"; + + @SerializedName(SERIALIZED_NAME_LOAN_TERM) + @jakarta.annotation.Nonnull + private Long loanTerm; + + public static final String SERIALIZED_NAME_BORROW_UID = "borrowUid"; + + @SerializedName(SERIALIZED_NAME_BORROW_UID) + @jakarta.annotation.Nonnull + private Long borrowUid; + + public static final String SERIALIZED_NAME_COLLATERAL_COIN = "collateralCoin"; + + @SerializedName(SERIALIZED_NAME_COLLATERAL_COIN) + @jakarta.annotation.Nonnull + private String collateralCoin; + + public static final String SERIALIZED_NAME_COLLATERAL_ACCOUNT_ID = "collateralAccountId"; + + @SerializedName(SERIALIZED_NAME_COLLATERAL_ACCOUNT_ID) + @jakarta.annotation.Nonnull + private String collateralAccountId; + + public static final String SERIALIZED_NAME_AUTO_REPAY = "autoRepay"; + + @SerializedName(SERIALIZED_NAME_AUTO_REPAY) + @jakarta.annotation.Nullable + private Boolean autoRepay = true; + + public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; + + @SerializedName(SERIALIZED_NAME_RECV_WINDOW) + @jakarta.annotation.Nullable + private Long recvWindow; + + public VipLoanFixedRateBorrowRequest() {} + + public VipLoanFixedRateBorrowRequest supplyRequest( + @jakarta.annotation.Nonnull String supplyRequest) { + this.supplyRequest = supplyRequest; + return this; + } + + /** + * Supply request string, positional encoding (no key). Multiple entries separated by + * `;`, fields separated by `:`, order: + * `<requestId>:<interestRate>:<amount>`. Example: + * `1212:0.12:100;3434:0.13:50` + * + * @return supplyRequest + */ + @jakarta.annotation.Nonnull + @NotNull + public String getSupplyRequest() { + return supplyRequest; + } + + public void setSupplyRequest(@jakarta.annotation.Nonnull String supplyRequest) { + this.supplyRequest = supplyRequest; + } + + public VipLoanFixedRateBorrowRequest borrowCoin(@jakarta.annotation.Nonnull String borrowCoin) { + this.borrowCoin = borrowCoin; + return this; + } + + /** + * Borrow coin + * + * @return borrowCoin + */ + @jakarta.annotation.Nonnull + @NotNull + public String getBorrowCoin() { + return borrowCoin; + } + + public void setBorrowCoin(@jakarta.annotation.Nonnull String borrowCoin) { + this.borrowCoin = borrowCoin; + } + + public VipLoanFixedRateBorrowRequest loanTerm(@jakarta.annotation.Nonnull Long loanTerm) { + this.loanTerm = loanTerm; + return this; + } + + /** + * Loan term in days + * + * @return loanTerm + */ + @jakarta.annotation.Nonnull + @NotNull + public Long getLoanTerm() { + return loanTerm; + } + + public void setLoanTerm(@jakarta.annotation.Nonnull Long loanTerm) { + this.loanTerm = loanTerm; + } + + public VipLoanFixedRateBorrowRequest borrowUid(@jakarta.annotation.Nonnull Long borrowUid) { + this.borrowUid = borrowUid; + return this; + } + + /** + * Borrow receiving account UID + * + * @return borrowUid + */ + @jakarta.annotation.Nonnull + @NotNull + public Long getBorrowUid() { + return borrowUid; + } + + public void setBorrowUid(@jakarta.annotation.Nonnull Long borrowUid) { + this.borrowUid = borrowUid; + } + + public VipLoanFixedRateBorrowRequest collateralCoin( + @jakarta.annotation.Nonnull String collateralCoin) { + this.collateralCoin = collateralCoin; + return this; + } + + /** + * Collateral coin(s), multiple separated by `,`. Only coin names, no amount (VIP loan + * collateral amount = entire spot account balance) + * + * @return collateralCoin + */ + @jakarta.annotation.Nonnull + @NotNull + public String getCollateralCoin() { + return collateralCoin; + } + + public void setCollateralCoin(@jakarta.annotation.Nonnull String collateralCoin) { + this.collateralCoin = collateralCoin; + } + + public VipLoanFixedRateBorrowRequest collateralAccountId( + @jakarta.annotation.Nonnull String collateralAccountId) { + this.collateralAccountId = collateralAccountId; + return this; + } + + /** + * Collateral account ID(s), multiple separated by `,` + * + * @return collateralAccountId + */ + @jakarta.annotation.Nonnull + @NotNull + public String getCollateralAccountId() { + return collateralAccountId; + } + + public void setCollateralAccountId(@jakarta.annotation.Nonnull String collateralAccountId) { + this.collateralAccountId = collateralAccountId; + } + + public VipLoanFixedRateBorrowRequest autoRepay(@jakarta.annotation.Nullable Boolean autoRepay) { + this.autoRepay = autoRepay; + return this; + } + + /** + * Default: `true`. `true`: auto repay at expiration; `false`: + * auto-convert to flexible (floating rate) at expiration + * + * @return autoRepay + */ + @jakarta.annotation.Nullable + public Boolean getAutoRepay() { + return autoRepay; + } + + public void setAutoRepay(@jakarta.annotation.Nullable Boolean autoRepay) { + this.autoRepay = autoRepay; + } + + public VipLoanFixedRateBorrowRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) { + this.recvWindow = recvWindow; + return this; + } + + /** + * The value cannot be greater than `60000` maximum: 60000 + * + * @return recvWindow + */ + @jakarta.annotation.Nullable + @Max(60000L) + public Long getRecvWindow() { + return recvWindow; + } + + public void setRecvWindow(@jakarta.annotation.Nullable Long recvWindow) { + this.recvWindow = recvWindow; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VipLoanFixedRateBorrowRequest vipLoanFixedRateBorrowRequest = + (VipLoanFixedRateBorrowRequest) o; + return Objects.equals(this.supplyRequest, vipLoanFixedRateBorrowRequest.supplyRequest) + && Objects.equals(this.borrowCoin, vipLoanFixedRateBorrowRequest.borrowCoin) + && Objects.equals(this.loanTerm, vipLoanFixedRateBorrowRequest.loanTerm) + && Objects.equals(this.borrowUid, vipLoanFixedRateBorrowRequest.borrowUid) + && Objects.equals(this.collateralCoin, vipLoanFixedRateBorrowRequest.collateralCoin) + && Objects.equals( + this.collateralAccountId, vipLoanFixedRateBorrowRequest.collateralAccountId) + && Objects.equals(this.autoRepay, vipLoanFixedRateBorrowRequest.autoRepay) + && Objects.equals(this.recvWindow, vipLoanFixedRateBorrowRequest.recvWindow); + } + + @Override + public int hashCode() { + return Objects.hash( + supplyRequest, + borrowCoin, + loanTerm, + borrowUid, + collateralCoin, + collateralAccountId, + autoRepay, + recvWindow); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VipLoanFixedRateBorrowRequest {\n"); + sb.append(" supplyRequest: ").append(toIndentedString(supplyRequest)).append("\n"); + sb.append(" borrowCoin: ").append(toIndentedString(borrowCoin)).append("\n"); + sb.append(" loanTerm: ").append(toIndentedString(loanTerm)).append("\n"); + sb.append(" borrowUid: ").append(toIndentedString(borrowUid)).append("\n"); + sb.append(" collateralCoin: ").append(toIndentedString(collateralCoin)).append("\n"); + sb.append(" collateralAccountId: ") + .append(toIndentedString(collateralAccountId)) + .append("\n"); + sb.append(" autoRepay: ").append(toIndentedString(autoRepay)).append("\n"); + sb.append(" recvWindow: ").append(toIndentedString(recvWindow)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object supplyRequestValue = getSupplyRequest(); + String supplyRequestValueAsString = ""; + supplyRequestValueAsString = supplyRequestValue.toString(); + sb.append("supplyRequest=").append(urlEncode(supplyRequestValueAsString)).append(""); + Object borrowCoinValue = getBorrowCoin(); + String borrowCoinValueAsString = ""; + borrowCoinValueAsString = borrowCoinValue.toString(); + sb.append("borrowCoin=").append(urlEncode(borrowCoinValueAsString)).append(""); + Object loanTermValue = getLoanTerm(); + String loanTermValueAsString = ""; + loanTermValueAsString = loanTermValue.toString(); + sb.append("loanTerm=").append(urlEncode(loanTermValueAsString)).append(""); + Object borrowUidValue = getBorrowUid(); + String borrowUidValueAsString = ""; + borrowUidValueAsString = borrowUidValue.toString(); + sb.append("borrowUid=").append(urlEncode(borrowUidValueAsString)).append(""); + Object collateralCoinValue = getCollateralCoin(); + String collateralCoinValueAsString = ""; + collateralCoinValueAsString = collateralCoinValue.toString(); + sb.append("collateralCoin=").append(urlEncode(collateralCoinValueAsString)).append(""); + Object collateralAccountIdValue = getCollateralAccountId(); + String collateralAccountIdValueAsString = ""; + collateralAccountIdValueAsString = collateralAccountIdValue.toString(); + sb.append("collateralAccountId=") + .append(urlEncode(collateralAccountIdValueAsString)) + .append(""); + Object autoRepayValue = getAutoRepay(); + String autoRepayValueAsString = ""; + autoRepayValueAsString = autoRepayValue.toString(); + sb.append("autoRepay=").append(urlEncode(autoRepayValueAsString)).append(""); + Object recvWindowValue = getRecvWindow(); + String recvWindowValueAsString = ""; + recvWindowValueAsString = recvWindowValue.toString(); + sb.append("recvWindow=").append(urlEncode(recvWindowValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("supplyRequest"); + openapiFields.add("borrowCoin"); + openapiFields.add("loanTerm"); + openapiFields.add("borrowUid"); + openapiFields.add("collateralCoin"); + openapiFields.add("collateralAccountId"); + openapiFields.add("autoRepay"); + openapiFields.add("recvWindow"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("supplyRequest"); + openapiRequiredFields.add("borrowCoin"); + openapiRequiredFields.add("loanTerm"); + openapiRequiredFields.add("borrowUid"); + openapiRequiredFields.add("collateralCoin"); + openapiRequiredFields.add("collateralAccountId"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * VipLoanFixedRateBorrowRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VipLoanFixedRateBorrowRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in VipLoanFixedRateBorrowRequest is not" + + " found in the empty JSON string", + VipLoanFixedRateBorrowRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VipLoanFixedRateBorrowRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("supplyRequest").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `supplyRequest` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("supplyRequest").toString())); + } + if (!jsonObj.get("borrowCoin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `borrowCoin` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("borrowCoin").toString())); + } + if (!jsonObj.get("collateralCoin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `collateralCoin` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("collateralCoin").toString())); + } + if (!jsonObj.get("collateralAccountId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `collateralAccountId` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("collateralAccountId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VipLoanFixedRateBorrowRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VipLoanFixedRateBorrowRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(VipLoanFixedRateBorrowRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VipLoanFixedRateBorrowRequest value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public VipLoanFixedRateBorrowRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of VipLoanFixedRateBorrowRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of VipLoanFixedRateBorrowRequest + * @throws IOException if the JSON string is invalid with respect to + * VipLoanFixedRateBorrowRequest + */ + public static VipLoanFixedRateBorrowRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VipLoanFixedRateBorrowRequest.class); + } + + /** + * Convert an instance of VipLoanFixedRateBorrowRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanFixedRateBorrowResponse.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanFixedRateBorrowResponse.java new file mode 100644 index 000000000..bcab6b31c --- /dev/null +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanFixedRateBorrowResponse.java @@ -0,0 +1,598 @@ +/* + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.vip_loan.rest.model; + +import com.binance.connector.client.vip_loan.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** VipLoanFixedRateBorrowResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class VipLoanFixedRateBorrowResponse { + public static final String SERIALIZED_NAME_BORROW_COIN = "borrowCoin"; + + @SerializedName(SERIALIZED_NAME_BORROW_COIN) + @jakarta.annotation.Nullable + private String borrowCoin; + + public static final String SERIALIZED_NAME_BORROW_AMOUNT = "borrowAmount"; + + @SerializedName(SERIALIZED_NAME_BORROW_AMOUNT) + @jakarta.annotation.Nullable + private String borrowAmount; + + public static final String SERIALIZED_NAME_ACTUAL_RECEIVED_AMOUNT = "actualReceivedAmount"; + + @SerializedName(SERIALIZED_NAME_ACTUAL_RECEIVED_AMOUNT) + @jakarta.annotation.Nullable + private String actualReceivedAmount; + + public static final String SERIALIZED_NAME_COLLATERAL_COIN = "collateralCoin"; + + @SerializedName(SERIALIZED_NAME_COLLATERAL_COIN) + @jakarta.annotation.Nullable + private String collateralCoin; + + public static final String SERIALIZED_NAME_COLLATERAL_ACCOUNT_ID = "collateralAccountId"; + + @SerializedName(SERIALIZED_NAME_COLLATERAL_ACCOUNT_ID) + @jakarta.annotation.Nullable + private String collateralAccountId; + + public static final String SERIALIZED_NAME_BORROW_INTEREST_RATE = "borrowInterestRate"; + + @SerializedName(SERIALIZED_NAME_BORROW_INTEREST_RATE) + @jakarta.annotation.Nullable + private String borrowInterestRate; + + public static final String SERIALIZED_NAME_DURATION = "duration"; + + @SerializedName(SERIALIZED_NAME_DURATION) + @jakarta.annotation.Nullable + private String duration; + + public static final String SERIALIZED_NAME_AUTO_REPAY = "autoRepay"; + + @SerializedName(SERIALIZED_NAME_AUTO_REPAY) + @jakarta.annotation.Nullable + private Boolean autoRepay; + + public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; + + @SerializedName(SERIALIZED_NAME_ORDER_ID) + @jakarta.annotation.Nullable + private Long orderId; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @jakarta.annotation.Nullable + private String status; + + public VipLoanFixedRateBorrowResponse() {} + + public VipLoanFixedRateBorrowResponse borrowCoin( + @jakarta.annotation.Nullable String borrowCoin) { + this.borrowCoin = borrowCoin; + return this; + } + + /** + * Echo of input parameter + * + * @return borrowCoin + */ + @jakarta.annotation.Nullable + public String getBorrowCoin() { + return borrowCoin; + } + + public void setBorrowCoin(@jakarta.annotation.Nullable String borrowCoin) { + this.borrowCoin = borrowCoin; + } + + public VipLoanFixedRateBorrowResponse borrowAmount( + @jakarta.annotation.Nullable String borrowAmount) { + this.borrowAmount = borrowAmount; + return this; + } + + /** + * Actual total borrow amount (aggregated when multiple supplyRequest) + * + * @return borrowAmount + */ + @jakarta.annotation.Nullable + public String getBorrowAmount() { + return borrowAmount; + } + + public void setBorrowAmount(@jakarta.annotation.Nullable String borrowAmount) { + this.borrowAmount = borrowAmount; + } + + public VipLoanFixedRateBorrowResponse actualReceivedAmount( + @jakarta.annotation.Nullable String actualReceivedAmount) { + this.actualReceivedAmount = actualReceivedAmount; + return this; + } + + /** + * Actual received amount + * + * @return actualReceivedAmount + */ + @jakarta.annotation.Nullable + public String getActualReceivedAmount() { + return actualReceivedAmount; + } + + public void setActualReceivedAmount(@jakarta.annotation.Nullable String actualReceivedAmount) { + this.actualReceivedAmount = actualReceivedAmount; + } + + public VipLoanFixedRateBorrowResponse collateralCoin( + @jakarta.annotation.Nullable String collateralCoin) { + this.collateralCoin = collateralCoin; + return this; + } + + /** + * Echo of input parameter, comma-separated + * + * @return collateralCoin + */ + @jakarta.annotation.Nullable + public String getCollateralCoin() { + return collateralCoin; + } + + public void setCollateralCoin(@jakarta.annotation.Nullable String collateralCoin) { + this.collateralCoin = collateralCoin; + } + + public VipLoanFixedRateBorrowResponse collateralAccountId( + @jakarta.annotation.Nullable String collateralAccountId) { + this.collateralAccountId = collateralAccountId; + return this; + } + + /** + * Echo of input parameter, comma-separated + * + * @return collateralAccountId + */ + @jakarta.annotation.Nullable + public String getCollateralAccountId() { + return collateralAccountId; + } + + public void setCollateralAccountId(@jakarta.annotation.Nullable String collateralAccountId) { + this.collateralAccountId = collateralAccountId; + } + + public VipLoanFixedRateBorrowResponse borrowInterestRate( + @jakarta.annotation.Nullable String borrowInterestRate) { + this.borrowInterestRate = borrowInterestRate; + return this; + } + + /** + * Actual borrow interest rate (weighted average when multiple) + * + * @return borrowInterestRate + */ + @jakarta.annotation.Nullable + public String getBorrowInterestRate() { + return borrowInterestRate; + } + + public void setBorrowInterestRate(@jakarta.annotation.Nullable String borrowInterestRate) { + this.borrowInterestRate = borrowInterestRate; + } + + public VipLoanFixedRateBorrowResponse duration(@jakarta.annotation.Nullable String duration) { + this.duration = duration; + return this; + } + + /** + * `{loanTerm}Days`, e.g. \"30Days\" + * + * @return duration + */ + @jakarta.annotation.Nullable + public String getDuration() { + return duration; + } + + public void setDuration(@jakarta.annotation.Nullable String duration) { + this.duration = duration; + } + + public VipLoanFixedRateBorrowResponse autoRepay( + @jakarta.annotation.Nullable Boolean autoRepay) { + this.autoRepay = autoRepay; + return this; + } + + /** + * Echo of input parameter + * + * @return autoRepay + */ + @jakarta.annotation.Nullable + public Boolean getAutoRepay() { + return autoRepay; + } + + public void setAutoRepay(@jakarta.annotation.Nullable Boolean autoRepay) { + this.autoRepay = autoRepay; + } + + public VipLoanFixedRateBorrowResponse orderId(@jakarta.annotation.Nullable Long orderId) { + this.orderId = orderId; + return this; + } + + /** + * Order ID + * + * @return orderId + */ + @jakarta.annotation.Nullable + public Long getOrderId() { + return orderId; + } + + public void setOrderId(@jakarta.annotation.Nullable Long orderId) { + this.orderId = orderId; + } + + public VipLoanFixedRateBorrowResponse status(@jakarta.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * `Succeeds` / `Failed` / `Processing` + * + * @return status + */ + @jakarta.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(@jakarta.annotation.Nullable String status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VipLoanFixedRateBorrowResponse vipLoanFixedRateBorrowResponse = + (VipLoanFixedRateBorrowResponse) o; + return Objects.equals(this.borrowCoin, vipLoanFixedRateBorrowResponse.borrowCoin) + && Objects.equals(this.borrowAmount, vipLoanFixedRateBorrowResponse.borrowAmount) + && Objects.equals( + this.actualReceivedAmount, + vipLoanFixedRateBorrowResponse.actualReceivedAmount) + && Objects.equals( + this.collateralCoin, vipLoanFixedRateBorrowResponse.collateralCoin) + && Objects.equals( + this.collateralAccountId, + vipLoanFixedRateBorrowResponse.collateralAccountId) + && Objects.equals( + this.borrowInterestRate, vipLoanFixedRateBorrowResponse.borrowInterestRate) + && Objects.equals(this.duration, vipLoanFixedRateBorrowResponse.duration) + && Objects.equals(this.autoRepay, vipLoanFixedRateBorrowResponse.autoRepay) + && Objects.equals(this.orderId, vipLoanFixedRateBorrowResponse.orderId) + && Objects.equals(this.status, vipLoanFixedRateBorrowResponse.status); + } + + @Override + public int hashCode() { + return Objects.hash( + borrowCoin, + borrowAmount, + actualReceivedAmount, + collateralCoin, + collateralAccountId, + borrowInterestRate, + duration, + autoRepay, + orderId, + status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VipLoanFixedRateBorrowResponse {\n"); + sb.append(" borrowCoin: ").append(toIndentedString(borrowCoin)).append("\n"); + sb.append(" borrowAmount: ").append(toIndentedString(borrowAmount)).append("\n"); + sb.append(" actualReceivedAmount: ") + .append(toIndentedString(actualReceivedAmount)) + .append("\n"); + sb.append(" collateralCoin: ").append(toIndentedString(collateralCoin)).append("\n"); + sb.append(" collateralAccountId: ") + .append(toIndentedString(collateralAccountId)) + .append("\n"); + sb.append(" borrowInterestRate: ") + .append(toIndentedString(borrowInterestRate)) + .append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" autoRepay: ").append(toIndentedString(autoRepay)).append("\n"); + sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object borrowCoinValue = getBorrowCoin(); + String borrowCoinValueAsString = ""; + borrowCoinValueAsString = borrowCoinValue.toString(); + sb.append("borrowCoin=").append(urlEncode(borrowCoinValueAsString)).append(""); + Object borrowAmountValue = getBorrowAmount(); + String borrowAmountValueAsString = ""; + borrowAmountValueAsString = borrowAmountValue.toString(); + sb.append("borrowAmount=").append(urlEncode(borrowAmountValueAsString)).append(""); + Object actualReceivedAmountValue = getActualReceivedAmount(); + String actualReceivedAmountValueAsString = ""; + actualReceivedAmountValueAsString = actualReceivedAmountValue.toString(); + sb.append("actualReceivedAmount=") + .append(urlEncode(actualReceivedAmountValueAsString)) + .append(""); + Object collateralCoinValue = getCollateralCoin(); + String collateralCoinValueAsString = ""; + collateralCoinValueAsString = collateralCoinValue.toString(); + sb.append("collateralCoin=").append(urlEncode(collateralCoinValueAsString)).append(""); + Object collateralAccountIdValue = getCollateralAccountId(); + String collateralAccountIdValueAsString = ""; + collateralAccountIdValueAsString = collateralAccountIdValue.toString(); + sb.append("collateralAccountId=") + .append(urlEncode(collateralAccountIdValueAsString)) + .append(""); + Object borrowInterestRateValue = getBorrowInterestRate(); + String borrowInterestRateValueAsString = ""; + borrowInterestRateValueAsString = borrowInterestRateValue.toString(); + sb.append("borrowInterestRate=") + .append(urlEncode(borrowInterestRateValueAsString)) + .append(""); + Object durationValue = getDuration(); + String durationValueAsString = ""; + durationValueAsString = durationValue.toString(); + sb.append("duration=").append(urlEncode(durationValueAsString)).append(""); + Object autoRepayValue = getAutoRepay(); + String autoRepayValueAsString = ""; + autoRepayValueAsString = autoRepayValue.toString(); + sb.append("autoRepay=").append(urlEncode(autoRepayValueAsString)).append(""); + Object orderIdValue = getOrderId(); + String orderIdValueAsString = ""; + orderIdValueAsString = orderIdValue.toString(); + sb.append("orderId=").append(urlEncode(orderIdValueAsString)).append(""); + Object statusValue = getStatus(); + String statusValueAsString = ""; + statusValueAsString = statusValue.toString(); + sb.append("status=").append(urlEncode(statusValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("borrowCoin"); + openapiFields.add("borrowAmount"); + openapiFields.add("actualReceivedAmount"); + openapiFields.add("collateralCoin"); + openapiFields.add("collateralAccountId"); + openapiFields.add("borrowInterestRate"); + openapiFields.add("duration"); + openapiFields.add("autoRepay"); + openapiFields.add("orderId"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * VipLoanFixedRateBorrowResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VipLoanFixedRateBorrowResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in VipLoanFixedRateBorrowResponse is not" + + " found in the empty JSON string", + VipLoanFixedRateBorrowResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("borrowCoin") != null && !jsonObj.get("borrowCoin").isJsonNull()) + && !jsonObj.get("borrowCoin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `borrowCoin` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("borrowCoin").toString())); + } + if ((jsonObj.get("borrowAmount") != null && !jsonObj.get("borrowAmount").isJsonNull()) + && !jsonObj.get("borrowAmount").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `borrowAmount` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("borrowAmount").toString())); + } + if ((jsonObj.get("actualReceivedAmount") != null + && !jsonObj.get("actualReceivedAmount").isJsonNull()) + && !jsonObj.get("actualReceivedAmount").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `actualReceivedAmount` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("actualReceivedAmount").toString())); + } + if ((jsonObj.get("collateralCoin") != null && !jsonObj.get("collateralCoin").isJsonNull()) + && !jsonObj.get("collateralCoin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `collateralCoin` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("collateralCoin").toString())); + } + if ((jsonObj.get("collateralAccountId") != null + && !jsonObj.get("collateralAccountId").isJsonNull()) + && !jsonObj.get("collateralAccountId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `collateralAccountId` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("collateralAccountId").toString())); + } + if ((jsonObj.get("borrowInterestRate") != null + && !jsonObj.get("borrowInterestRate").isJsonNull()) + && !jsonObj.get("borrowInterestRate").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `borrowInterestRate` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("borrowInterestRate").toString())); + } + if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) + && !jsonObj.get("duration").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `duration` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("duration").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) + && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VipLoanFixedRateBorrowResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VipLoanFixedRateBorrowResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(VipLoanFixedRateBorrowResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VipLoanFixedRateBorrowResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public VipLoanFixedRateBorrowResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of VipLoanFixedRateBorrowResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of VipLoanFixedRateBorrowResponse + * @throws IOException if the JSON string is invalid with respect to + * VipLoanFixedRateBorrowResponse + */ + public static VipLoanFixedRateBorrowResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VipLoanFixedRateBorrowResponse.class); + } + + /** + * Convert an instance of VipLoanFixedRateBorrowResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanRenewRequest.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanRenewRequest.java index 6e4872ebb..dac15a766 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanRenewRequest.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanRenewRequest.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** VipLoanRenewRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class VipLoanRenewRequest { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -82,7 +82,7 @@ public VipLoanRenewRequest loanTerm(@jakarta.annotation.Nonnull Long loanTerm) { } /** - * Get loanTerm + * 30/60 days * * @return loanTerm */ @@ -102,11 +102,12 @@ public VipLoanRenewRequest recvWindow(@jakarta.annotation.Nullable Long recvWind } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanRenewResponse.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanRenewResponse.java index 54ec5547b..9c49779ea 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanRenewResponse.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanRenewResponse.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** VipLoanRenewResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class VipLoanRenewResponse { public static final String SERIALIZED_NAME_LOAN_ACCOUNT_ID = "loanAccountId"; @@ -80,7 +80,7 @@ public VipLoanRenewResponse loanAccountId(@jakarta.annotation.Nullable String lo } /** - * Get loanAccountId + * Loan receiving account. * * @return loanAccountId */ diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanRepayRequest.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanRepayRequest.java index ab2eadc49..2e1b672c9 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanRepayRequest.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanRepayRequest.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** VipLoanRepayRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class VipLoanRepayRequest { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @@ -104,11 +104,12 @@ public VipLoanRepayRequest recvWindow(@jakarta.annotation.Nullable Long recvWind } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanRepayResponse.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanRepayResponse.java index ba2c7b018..f3a0def11 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanRepayResponse.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/model/VipLoanRepayResponse.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** VipLoanRepayResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class VipLoanRepayResponse { public static final String SERIALIZED_NAME_LOAN_COIN = "loanCoin"; @@ -202,7 +202,7 @@ public VipLoanRepayResponse repayStatus(@jakarta.annotation.Nullable String repa } /** - * Get repayStatus + * Repayment status (`Repaid`, `Repaying`, `Failed`). * * @return repayStatus */ diff --git a/clients/vip-loan/src/test/java/com/binance/connector/client/vip_loan/rest/api/MarketDataApiTest.java b/clients/vip-loan/src/test/java/com/binance/connector/client/vip_loan/rest/api/MarketDataApiTest.java index c56ea36e1..5a800959d 100644 --- a/clients/vip-loan/src/test/java/com/binance/connector/client/vip_loan/rest/api/MarketDataApiTest.java +++ b/clients/vip-loan/src/test/java/com/binance/connector/client/vip_loan/rest/api/MarketDataApiTest.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -26,7 +26,10 @@ import com.binance.connector.client.vip_loan.rest.model.GetBorrowInterestRateResponse; import com.binance.connector.client.vip_loan.rest.model.GetCollateralAssetDataResponse; import com.binance.connector.client.vip_loan.rest.model.GetLoanableAssetsDataResponse; +import com.binance.connector.client.vip_loan.rest.model.GetVIPLoanInterestRateHistoryResponse; +import com.binance.connector.client.vip_loan.rest.model.QueryVIPLoanFixedRateMarketResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -78,15 +81,15 @@ public void initApiClient() throws ApiException { } /** - * Get Borrow Interest Rate(USER_DATA) + * Get Borrow Interest Rate (USER_DATA) * - *

Get Borrow Interest Rate Weight: 400 + *

Get Borrow Interest Rate Weight(IP): 400 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getBorrowInterestRateTest() throws ApiException, CryptoException { - String loanCoin = ""; + public void getBorrowInterestRateTest() throws ApiException, CryptoException, IOException { + String loanCoin = "BTC"; Long recvWindow = 5000L; ApiResponse response = api.getBorrowInterestRate(loanCoin, recvWindow); @@ -101,24 +104,23 @@ public void getBorrowInterestRateTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("loanCoin=BTC&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "loanCoin=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "2a09517b57df001aaf35228b8642b62271321de1e3714ccb1f56606355218630", + "e2df8992565a192c3c5c9627c14a6f6c38f6fa8750a2836baa0d9b9ba4060593", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/loan/vip/request/interestRate", actualRequest.url().encodedPath()); } /** - * Get Collateral Asset Data(USER_DATA) + * Get Collateral Asset Data (USER_DATA) * - *

Get Collateral Asset Data Weight: 400 + *

Get Collateral Asset Data Weight(IP): 400 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getCollateralAssetDataTest() throws ApiException, CryptoException { - String collateralCoin = ""; + public void getCollateralAssetDataTest() throws ApiException, CryptoException, IOException { + String collateralCoin = "BUSD"; Long recvWindow = 5000L; ApiResponse response = api.getCollateralAssetData(collateralCoin, recvWindow); @@ -133,26 +135,24 @@ public void getCollateralAssetDataTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("collateralCoin=BUSD&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "collateralCoin=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "55075b58719a54df8f08bc09d0797b888e135d419c7e19dfe4987b5f83354c8e", + "7ac8cb563757d110aaa5e45f0b34fadad5350dc6296907ea489b6c30ba9bc2ba", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/loan/vip/collateral/data", actualRequest.url().encodedPath()); } /** - * Get Loanable Assets Data(USER_DATA) + * Get Loanable Assets Data (USER_DATA) * *

Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD - * value. Weight: 400 + * value. Weight(IP): 400 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getLoanableAssetsDataTest() throws ApiException, CryptoException { - String loanCoin = ""; + public void getLoanableAssetsDataTest() throws ApiException, CryptoException, IOException { + String loanCoin = "BUSD"; Long vipLevel = 1L; Long recvWindow = 5000L; ApiResponse response = @@ -168,12 +168,86 @@ public void getLoanableAssetsDataTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("loanCoin=BUSD&vipLevel=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "loanCoin=&vipLevel=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "af7c373de8e0d92e5598d25b5891312de4a5d5f936d893524354a27ca60952d2", + "49e6cfbc5d086eaedfd713d095c4e3c4bee9b744235ac4eb289a65a071ec3286", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/loan/vip/loanable/data", actualRequest.url().encodedPath()); } + + /** + * Get VIP Loan Interest Rate History (USER_DATA) + * + *

Check VIP Loan flexible interest rate history Weight(IP): 400 Security Type: USER_DATA + * Notes: - If `startTime` and `endTime` are not sent, recent 90-day data is + * returned. - The maximum interval between `startTime` and `endTime` is 180 + * days. - Time is based on UTC+0. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getVIPLoanInterestRateHistoryTest() + throws ApiException, CryptoException, IOException { + String coin = "USDT"; + Long recvWindow = 5000L; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long limit = 10L; + ApiResponse response = + api.getVIPLoanInterestRateHistory( + coin, recvWindow, startTime, endTime, current, limit); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("coin=USDT&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "280639a911b1fb845012f755918969756593d9854fefaed7dbe1e00020403a61", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/loan/vip/interestRateHistory", actualRequest.url().encodedPath()); + } + + /** + * Query VIP Loan Fixed Rate Market (USER_DATA) + * + *

Query the VIP Loan fixed rate market. Returns a paginated list of fixed-rate supply + * orders. Weight(IP): 6000 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void queryVIPLoanFixedRateMarketTest() + throws ApiException, CryptoException, IOException { + String loanCoin = "USDT"; + Long duration = 30L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.queryVIPLoanFixedRateMarket(loanCoin, duration, current, size, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("loanCoin=USDT&duration=30¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "01adc694e26b9e50057aba0737839f356eb3862794d409335bf00101e0ca02aa", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/loan/vip/fixed/market", actualRequest.url().encodedPath()); + } } diff --git a/clients/vip-loan/src/test/java/com/binance/connector/client/vip_loan/rest/api/TradeApiTest.java b/clients/vip-loan/src/test/java/com/binance/connector/client/vip_loan/rest/api/TradeApiTest.java index bc15b4635..1cf335123 100644 --- a/clients/vip-loan/src/test/java/com/binance/connector/client/vip_loan/rest/api/TradeApiTest.java +++ b/clients/vip-loan/src/test/java/com/binance/connector/client/vip_loan/rest/api/TradeApiTest.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -25,11 +25,14 @@ import com.binance.connector.client.common.sign.SignatureGenerator; import com.binance.connector.client.vip_loan.rest.model.VipLoanBorrowRequest; import com.binance.connector.client.vip_loan.rest.model.VipLoanBorrowResponse; +import com.binance.connector.client.vip_loan.rest.model.VipLoanFixedRateBorrowRequest; +import com.binance.connector.client.vip_loan.rest.model.VipLoanFixedRateBorrowResponse; import com.binance.connector.client.vip_loan.rest.model.VipLoanRenewRequest; import com.binance.connector.client.vip_loan.rest.model.VipLoanRenewResponse; import com.binance.connector.client.vip_loan.rest.model.VipLoanRepayRequest; import com.binance.connector.client.vip_loan.rest.model.VipLoanRepayResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -81,23 +84,24 @@ public void initApiClient() throws ApiException { } /** - * VIP Loan Borrow(TRADE) + * VIP Loan Borrow (TRADE) * - *

VIP loan is available for VIP users only. * loanAccountId refer to loan receiving account - * * Only master account applications are supported * loanAccountId and collateralAccountId - * under same master account * loanTerm is mandatory if user choose stable rate Weight: 0 + *

VIP loan is available for VIP users only. Weight(UID): 6000 Security Type: TRADE Notes: - + * `loanAccountId` refers to the loan receiving account. - Only master account + * applications are supported. - `loanAccountId` and `collateralAccountId` + * must be under the same master account. - `loanTerm` is mandatory if the user + * chooses a fixed rate (`isFlexibleRate = FALSE`). * * @throws ApiException if the Api call fails */ @Test - public void vipLoanBorrowTest() throws ApiException, CryptoException { + public void vipLoanBorrowTest() throws ApiException, CryptoException, IOException { VipLoanBorrowRequest vipLoanBorrowRequest = new VipLoanBorrowRequest(); - vipLoanBorrowRequest.loanAccountId(1L); - vipLoanBorrowRequest.loanCoin(""); - vipLoanBorrowRequest.loanAmount(1d); - vipLoanBorrowRequest.collateralAccountId(1L); - vipLoanBorrowRequest.collateralCoin(""); + vipLoanBorrowRequest.loanCoin("BTC"); + vipLoanBorrowRequest.loanAmount(1.0d); + vipLoanBorrowRequest.collateralAccountId("12345678,12345678,12345678"); + vipLoanBorrowRequest.collateralCoin("BUSD,USDT,ETH"); vipLoanBorrowRequest.isFlexibleRate(true); ApiResponse response = api.vipLoanBorrow(vipLoanBorrowRequest); @@ -112,28 +116,65 @@ public void vipLoanBorrowTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000collateralCoin=BUSD%2CUSDT%2CETH&collateralAccountId=12345678%2C12345678%2C12345678&loanAccountId=1&loanCoin=BTC&isFlexibleRate=true&loanAmount=1", signInputCaptor.getValue()); + assertEquals("8d7058257e6c970f0f7132432401c9b3db9230d407387745c1ad61e501ffbbc3", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/loan/vip/borrow", actualRequest.url().encodedPath()); + } + + /** + * VIP Loan Fixed Rate Borrow (TRADE) + * + *

Submit a fixed rate borrow request by matching market supply orders. Weight(UID): 6000 + * Security Type: TRADE Notes: - **Rate limit:** 2 requests per second per account. - When + * multiple `supplyRequest` entries are provided, all `requestId` values + * must correspond to the same `borrowCoin` and `loanTerm` (validated by + * collateral facade). + * + * @throws ApiException if the Api call fails + */ + @Test + public void vipLoanFixedRateBorrowTest() throws ApiException, CryptoException, IOException { + VipLoanFixedRateBorrowRequest vipLoanFixedRateBorrowRequest = + new VipLoanFixedRateBorrowRequest(); + vipLoanFixedRateBorrowRequest.supplyRequest("1212:0.12:100;3434:0.13:50"); + vipLoanFixedRateBorrowRequest.borrowCoin("BUSD"); + vipLoanFixedRateBorrowRequest.loanTerm(30L); + vipLoanFixedRateBorrowRequest.borrowUid(12345678L); + vipLoanFixedRateBorrowRequest.collateralCoin("BNB,ETH,BTC"); + vipLoanFixedRateBorrowRequest.collateralAccountId("12345,67890,13579"); + + ApiResponse response = + api.vipLoanFixedRateBorrow(vipLoanFixedRateBorrowRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000supplyRequest=1212%3A0.12%3A100%3B3434%3A0.13%3A50&autoRepay=true&loanTerm=30&collateralCoin=BNB%2CETH%2CBTC&collateralAccountId=12345%2C67890%2C13579&borrowCoin=BUSD&borrowUid=12345678", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000collateralCoin=&collateralAccountId=1&loanAccountId=1&loanCoin=&isFlexibleRate=true&loanAmount=1", - signInputCaptor.getValue()); - assertEquals( - "69452f0036610ef01a7af7050eb1363f515110a778f3f4c67ea6ca5e91279705", + "ff1cf1d7f36839a77ef053ba03056c69ed25c2e80ac7f2589003dd434a94ccde", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/loan/vip/borrow", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/loan/vip/fixed/borrow", actualRequest.url().encodedPath()); } /** - * VIP Loan Renew(TRADE) + * VIP Loan Renew (TRADE) * - *

VIP loan is available for VIP users only. Weight: 6000 + *

VIP loan is available for VIP users only. Weight(UID): 6000 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void vipLoanRenewTest() throws ApiException, CryptoException { + public void vipLoanRenewTest() throws ApiException, CryptoException, IOException { VipLoanRenewRequest vipLoanRenewRequest = new VipLoanRenewRequest(); - vipLoanRenewRequest.orderId(1L); - vipLoanRenewRequest.loanTerm(0L); + vipLoanRenewRequest.loanTerm(30L); ApiResponse response = api.vipLoanRenew(vipLoanRenewRequest); @@ -147,26 +188,23 @@ public void vipLoanRenewTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000loanTerm=0&orderId=1", signInputCaptor.getValue()); - assertEquals( - "4c2f7c6679438a09acf96db4e1389b9d73ed86c0a76563de8618cd98f615f721", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000loanTerm=30&orderId=1", signInputCaptor.getValue()); + assertEquals("e1985452130441850073d7c7bd5fa20da0bf9d12cefc8e28f3ccacdb6b118890", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/loan/vip/renew", actualRequest.url().encodedPath()); } /** - * VIP Loan Repay(TRADE) + * VIP Loan Repay (TRADE) * - *

VIP loan is available for VIP users only. Weight: 6000 + *

VIP loan is available for VIP users only. Weight(UID): 6000 Security Type: TRADE * * @throws ApiException if the Api call fails */ @Test - public void vipLoanRepayTest() throws ApiException, CryptoException { + public void vipLoanRepayTest() throws ApiException, CryptoException, IOException { VipLoanRepayRequest vipLoanRepayRequest = new VipLoanRepayRequest(); - vipLoanRepayRequest.orderId(1L); - vipLoanRepayRequest.amount(1d); + vipLoanRepayRequest.amount(1.0d); ApiResponse response = api.vipLoanRepay(vipLoanRepayRequest); @@ -181,9 +219,7 @@ public void vipLoanRepayTest() throws ApiException, CryptoException { Request actualRequest = captorValue.request(); assertEquals("timestamp=1736393892000amount=1&orderId=1", signInputCaptor.getValue()); - assertEquals( - "63a2bd291c903ff313203c537ae5664fa19322a1cd812a2a5267fc7f3c10ef2f", - actualRequest.url().queryParameter("signature")); + assertEquals("63a2bd291c903ff313203c537ae5664fa19322a1cd812a2a5267fc7f3c10ef2f", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/loan/vip/repay", actualRequest.url().encodedPath()); } } diff --git a/clients/vip-loan/src/test/java/com/binance/connector/client/vip_loan/rest/api/UserInformationApiTest.java b/clients/vip-loan/src/test/java/com/binance/connector/client/vip_loan/rest/api/UserInformationApiTest.java index 1f8ee1727..c5513376d 100644 --- a/clients/vip-loan/src/test/java/com/binance/connector/client/vip_loan/rest/api/UserInformationApiTest.java +++ b/clients/vip-loan/src/test/java/com/binance/connector/client/vip_loan/rest/api/UserInformationApiTest.java @@ -1,6 +1,6 @@ /* - * Binance VIP Loan REST API - * OpenAPI Specification for the Binance VIP Loan REST API + * VIP Loan REST API + * Access over-collateralized loan services, manage positions, and monitor collateral via the VIP Loan API. * * The version of the OpenAPI document: 1.0.0 * @@ -24,9 +24,12 @@ import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; import com.binance.connector.client.vip_loan.rest.model.CheckVIPLoanCollateralAccountResponse; +import com.binance.connector.client.vip_loan.rest.model.GetVIPLoanAccruedInterestResponse; import com.binance.connector.client.vip_loan.rest.model.GetVIPLoanOngoingOrdersResponse; +import com.binance.connector.client.vip_loan.rest.model.GetVIPLoanRepaymentHistoryResponse; import com.binance.connector.client.vip_loan.rest.model.QueryApplicationStatusResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -80,14 +83,16 @@ public void initApiClient() throws ApiException { /** * Check VIP Loan Collateral Account (USER_DATA) * - *

VIP loan is available for VIP users only * If the login account is loan account, all - * collateral accounts under the loan account can be queried. * If the login account is - * collateral account, only the current collateral account can be queried. Weight: 6000 + *

VIP loan is available for VIP users only Weight(IP): 6000 Security Type: USER_DATA Notes: + * - If the logged-in account is a borrowing account, all collateral accounts bound to that + * borrowing account can be queried. - If the logged-in account is a collateral account, only + * collateral assets under that account can be queried. * * @throws ApiException if the Api call fails */ @Test - public void checkVIPLoanCollateralAccountTest() throws ApiException, CryptoException { + public void checkVIPLoanCollateralAccountTest() + throws ApiException, CryptoException, IOException { Long orderId = 1L; Long collateralAccountId = 1L; Long recvWindow = 5000L; @@ -104,9 +109,7 @@ public void checkVIPLoanCollateralAccountTest() throws ApiException, CryptoExcep Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "orderId=1&collateralAccountId=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + assertEquals("orderId=1&collateralAccountId=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "28bfbd8d6c88334e71162a34415d7ceee70f9d0f71d87896faa7ae90ffa43745", actualRequest.url().queryParameter("signature")); @@ -114,18 +117,57 @@ public void checkVIPLoanCollateralAccountTest() throws ApiException, CryptoExcep } /** - * Get VIP Loan Ongoing Orders(USER_DATA) + * Get VIP Loan Accrued Interest (USER_DATA) * - *

VIP loan is available for VIP users only. Weight: 400 + *

Check VIP Loan interest record Weight(IP): 400 Security Type: USER_DATA Notes: - If + * `startTime` and `endTime` are not sent, recent 90-day data is returned. - + * The maximum interval between `startTime` and `endTime` is 90 days. * * @throws ApiException if the Api call fails */ @Test - public void getVIPLoanOngoingOrdersTest() throws ApiException, CryptoException { + public void getVIPLoanAccruedInterestTest() throws ApiException, CryptoException, IOException { + Long orderId = 1L; + String loanCoin = "BTC"; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long limit = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getVIPLoanAccruedInterest( + orderId, loanCoin, startTime, endTime, current, limit, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("orderId=1&loanCoin=BTC&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "f5d4ed07d31ac96cb53cbf3ffe13c38d7d92c6d9f61fc4e7f767e3a0e72c98cb", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/loan/vip/accruedInterest", actualRequest.url().encodedPath()); + } + + /** + * Get VIP Loan Ongoing Orders (USER_DATA) + * + *

VIP loan is available for VIP users only. Weight(IP): 400 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getVIPLoanOngoingOrdersTest() throws ApiException, CryptoException, IOException { Long orderId = 1L; Long collateralAccountId = 1L; - String loanCoin = ""; - String collateralCoin = ""; + String loanCoin = "BUSD"; + String collateralCoin = "BNB,BTC,ETH"; Long current = 1L; Long limit = 10L; Long recvWindow = 5000L; @@ -149,24 +191,62 @@ public void getVIPLoanOngoingOrdersTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("orderId=1&collateralAccountId=1&loanCoin=BUSD&collateralCoin=BNB%2CBTC%2CETH¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "orderId=1&collateralAccountId=1&loanCoin=&collateralCoin=¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "34489dba1699cfdcba96f141e403abef1f0835d89a8c2bb504f5b9557cb8017a", + "1a94168923a63f80d345cd72d6b964f85a84d975813a31768c464e98e276a1d2", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/loan/vip/ongoing/orders", actualRequest.url().encodedPath()); } /** - * Query Application Status(USER_DATA) + * Get VIP Loan Repayment History (USER_DATA) * - *

Query Application Status Weight: 400 + *

VIP Loans are available only to VIP users. Weight(IP): 400 Security Type: USER_DATA Notes: + * - If `startTime` and `endTime` are not sent, recent 90-day data is + * returned. - The maximum interval between `startTime` and `endTime` is 180 + * days. * * @throws ApiException if the Api call fails */ @Test - public void queryApplicationStatusTest() throws ApiException, CryptoException { + public void getVIPLoanRepaymentHistoryTest() throws ApiException, CryptoException, IOException { + Long orderId = 1L; + String loanCoin = "BUSD"; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long limit = 10L; + Long recvWindow = 5000L; + ApiResponse response = + api.getVIPLoanRepaymentHistory( + orderId, loanCoin, startTime, endTime, current, limit, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("orderId=1&loanCoin=BUSD&startTime=1623319461670&endTime=1641782889000¤t=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "676297b00401e29332c61933826f410efa70464f7a540389c0f5d8a6f950ad60", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/loan/vip/repay/history", actualRequest.url().encodedPath()); + } + + /** + * Query Application Status (USER_DATA) + * + *

Query Application Status Weight(UID): 400 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void queryApplicationStatusTest() throws ApiException, CryptoException, IOException { Long current = 1L; Long limit = 10L; Long recvWindow = 5000L; @@ -183,9 +263,7 @@ public void queryApplicationStatusTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "current=1&limit=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + assertEquals("current=1&limit=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "b3723d8a4f7ae362bec968406a2a68bdebe8825ae14b03114d3c9b3a4ff37904", actualRequest.url().queryParameter("signature")); diff --git a/clients/w3w-prediction/docs/PositionApi.md b/clients/w3w-prediction/docs/PositionApi.md index c740111f8..ad7254a57 100644 --- a/clients/w3w-prediction/docs/PositionApi.md +++ b/clients/w3w-prediction/docs/PositionApi.md @@ -4,18 +4,18 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getPositionByToken**](PositionApi.md#getPositionByToken) | **GET** /sapi/v1/w3w/wallet/prediction/position/token | Get Position by Token | -| [**queryPnL**](PositionApi.md#queryPnL) | **GET** /sapi/v1/w3w/wallet/prediction/pnl/query | Query PnL | -| [**queryPositions**](PositionApi.md#queryPositions) | **GET** /sapi/v1/w3w/wallet/prediction/position/list | Query Positions | -| [**queryPositionsByFilter**](PositionApi.md#queryPositionsByFilter) | **GET** /sapi/v1/w3w/wallet/prediction/position/filter | Query Positions by Filter | -| [**querySettledPositionHistory**](PositionApi.md#querySettledPositionHistory) | **GET** /sapi/v1/w3w/wallet/prediction/position/settled-history | Query Settled Position History | +| [**getPositionByToken**](PositionApi.md#getPositionByToken) | **GET** /sapi/v1/w3w/wallet/prediction/position/token | Get Position by Token (USER_DATA) | +| [**queryPnL**](PositionApi.md#queryPnL) | **GET** /sapi/v1/w3w/wallet/prediction/pnl/query | Query PnL (USER_DATA) | +| [**queryPositions**](PositionApi.md#queryPositions) | **GET** /sapi/v1/w3w/wallet/prediction/position/list | Query Positions (USER_DATA) | +| [**queryPositionsByFilter**](PositionApi.md#queryPositionsByFilter) | **GET** /sapi/v1/w3w/wallet/prediction/position/filter | Query Positions by Filter (USER_DATA) | +| [**querySettledPositionHistory**](PositionApi.md#querySettledPositionHistory) | **GET** /sapi/v1/w3w/wallet/prediction/position/settled-history | Query Settled Position History (USER_DATA) | # **getPositionByToken** > GetPositionByTokenResponse getPositionByToken(walletAddress, tokenId, recvWindow) -Get Position by Token +Get Position by Token (USER_DATA) Get the authenticated user's position detail for a specific prediction token. Weight(IP): 200 Security Type: USER_DATA @@ -81,7 +81,7 @@ No authorization required # **queryPnL** > QueryPnLResponse queryPnL(walletAddress, tokenId, marketId, marketTopicId, activeOnly, recvWindow) -Query PnL +Query PnL (USER_DATA) Query profit and loss records for the authenticated user's prediction positions. When `tokenId` is provided, returns a single record in `pnl`; otherwise returns a list in `pnlList`. Weight(IP): 200 Security Type: USER_DATA @@ -153,7 +153,7 @@ No authorization required # **queryPositions** > QueryPositionsResponse queryPositions(walletAddress, tab, offset, limit, recvWindow) -Query Positions +Query Positions (USER_DATA) Get the authenticated user's prediction token positions with portfolio summary and tab-based filtering. Weight(IP): 200 Security Type: USER_DATA @@ -223,7 +223,7 @@ No authorization required # **queryPositionsByFilter** > QueryPositionsByFilterResponse queryPositionsByFilter(walletAddress, marketTopicId, recvWindow) -Query Positions by Filter +Query Positions by Filter (USER_DATA) Get prediction positions filtered by wallet address and/or market topic ID. Both parameters are optional. Weight(IP): 200 Security Type: USER_DATA @@ -289,7 +289,7 @@ No authorization required # **querySettledPositionHistory** > QuerySettledPositionHistoryResponse querySettledPositionHistory(walletAddress, l1Category, result, startDate, endDate, offset, limit, recvWindow) -Query Settled Position History +Query Settled Position History (USER_DATA) Get the authenticated user's settled (resolved) prediction position history with optional filters. Weight(IP): 200 Security Type: USER_DATA diff --git a/clients/w3w-prediction/docs/RedeemApi.md b/clients/w3w-prediction/docs/RedeemApi.md index 203e8d6ab..803cdf2b3 100644 --- a/clients/w3w-prediction/docs/RedeemApi.md +++ b/clients/w3w-prediction/docs/RedeemApi.md @@ -4,15 +4,15 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**batchRedeem**](RedeemApi.md#batchRedeem) | **POST** /sapi/v1/w3w/wallet/prediction/batch-redeem | Batch Redeem | -| [**getRedeemStatus**](RedeemApi.md#getRedeemStatus) | **GET** /sapi/v1/w3w/wallet/prediction/redeem/status | Get Redeem Status | +| [**batchRedeem**](RedeemApi.md#batchRedeem) | **POST** /sapi/v1/w3w/wallet/prediction/batch-redeem | Batch Redeem (TRADE) | +| [**getRedeemStatus**](RedeemApi.md#getRedeemStatus) | **GET** /sapi/v1/w3w/wallet/prediction/redeem/status | Get Redeem Status (USER_DATA) | # **batchRedeem** > BatchRedeemResponse batchRedeem(batchRedeemRequest) -Batch Redeem +Batch Redeem (TRADE) Redeem one or more settled prediction tokens on-chain to claim winnings. Requires SAS authorization. Weight(IP): 200 Security Type: TRADE @@ -74,7 +74,7 @@ No authorization required # **getRedeemStatus** > GetRedeemStatusResponse getRedeemStatus(walletAddress, txHash, recvWindow) -Get Redeem Status +Get Redeem Status (USER_DATA) Query the on-chain transaction status of a previously submitted redeem request. Weight(IP): 200 Security Type: USER_DATA Response Notes: - Status values: | Value | Description | | ----------- | -------------------------------------------- | | `PENDING` | Transaction submitted, awaiting confirmation | | `CONFIRMED` | Transaction confirmed on-chain | | `FAILED` | Transaction failed | | `NOT_FOUND` | Transaction hash not found | diff --git a/clients/w3w-prediction/docs/TradeApi.md b/clients/w3w-prediction/docs/TradeApi.md index 116b1e4ba..877239be6 100644 --- a/clients/w3w-prediction/docs/TradeApi.md +++ b/clients/w3w-prediction/docs/TradeApi.md @@ -4,18 +4,18 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**batchCancelOrders**](TradeApi.md#batchCancelOrders) | **POST** /sapi/v1/w3w/wallet/prediction/trade/batch-cancel | Batch Cancel Orders | -| [**getQuote**](TradeApi.md#getQuote) | **POST** /sapi/v1/w3w/wallet/prediction/trade/get-quote | Get Quote | -| [**placeOrder**](TradeApi.md#placeOrder) | **POST** /sapi/v1/w3w/wallet/prediction/trade/place-order-bundle | Place Order | -| [**queryActiveOrders**](TradeApi.md#queryActiveOrders) | **GET** /sapi/v1/w3w/wallet/prediction/order/list | Query Active Orders | -| [**queryOrderHistory**](TradeApi.md#queryOrderHistory) | **GET** /sapi/v1/w3w/wallet/prediction/order/history | Query Order History | +| [**batchCancelOrders**](TradeApi.md#batchCancelOrders) | **POST** /sapi/v1/w3w/wallet/prediction/trade/batch-cancel | Batch Cancel Orders (TRADE) | +| [**getQuote**](TradeApi.md#getQuote) | **POST** /sapi/v1/w3w/wallet/prediction/trade/get-quote | Get Quote (TRADE) | +| [**placeOrder**](TradeApi.md#placeOrder) | **POST** /sapi/v1/w3w/wallet/prediction/trade/place-order-bundle | Place Order (TRADE) | +| [**queryActiveOrders**](TradeApi.md#queryActiveOrders) | **GET** /sapi/v1/w3w/wallet/prediction/order/list | Query Active Orders (USER_DATA) | +| [**queryOrderHistory**](TradeApi.md#queryOrderHistory) | **GET** /sapi/v1/w3w/wallet/prediction/order/history | Query Order History (USER_DATA) | # **batchCancelOrders** > BatchCancelOrdersResponse batchCancelOrders(batchCancelOrdersRequest) -Batch Cancel Orders +Batch Cancel Orders (TRADE) Cancel one or more active prediction orders in a single request. Requires SAS authorization. **Known Issue — Bracket Encoding Incompatibility:** This endpoint uses indexed bracket notation (`cancelInfoList[0].orderId`). Binance SAPI signature verification runs over the **raw, unencoded** canonical string. However, mainstream HTTP libraries (Python `requests`, Java `HttpURLConnection`/`URI`, Go `net/url`, Node.js `url`) automatically percent-encode `[` → `%5B` and `]` → `%5D`, producing a signature mismatch with error `-1022 Signature for this request is not valid`. Postman is unaffected because it does not encode keys. **Workarounds** (use low-level HTTP APIs that do not normalize URLs): - **Python:** use `http.client` (stdlib) and hand-build the body string. - **Java:** use `HttpURLConnection` and write the raw body bytes directly. - **Go:** use `strings.NewReader` with a hand-built body instead of `url.Values.Encode()`. Weight(IP): 200 Security Type: TRADE Notes: - Use dot notation for nested list fields: `cancelInfoList[0].orderId`, `cancelInfoList[1].orderId`, etc. - `vendor` does not need to be supplied. The server automatically sets the correct vendor (`predict_fun`) for every item in the batch. @@ -77,7 +77,7 @@ No authorization required # **getQuote** > GetQuoteResponse getQuote(getQuoteRequest) -Get Quote +Get Quote (TRADE) Get a price quote for a prediction order. The returned `quoteId` must be used in the subsequent Place Order request. Weight(IP): 200 Security Type: TRADE Response Notes: - `feeAmount` is a string because it is denominated in wei (18 decimals) and may exceed JavaScript's safe integer range. `feeDiscountBps` is also a string to allow fractional basis-point values in the future. `feeRateBps` and `slippageBps` are integers and will never exceed safe integer bounds. - **MARKET order minimum amount:** For `MARKET` orders, `amountIn` must be at least approximately **1.5 USDT** (in wei: `1500000000000000000`). The exact minimum varies by market liquidity. If the amount is too small, the server returns `-9000 Your order amount is too small`. This limit does **not** apply to `LIMIT` orders. @@ -139,7 +139,7 @@ No authorization required # **placeOrder** > PlaceOrderResponse placeOrder(placeOrderRequest) -Place Order +Place Order (TRADE) Place a prediction order using a previously obtained quote. Requires SAS authorization. Weight(IP): 200 Security Type: TRADE Notes: - Validation rules: | orderType | timeInForce | priceLimit | | --------- | ------------- | --------------------- | | `MARKET` | Must be `FOK` | Not required | | `LIMIT` | Must be `GTC` | Required, must be > 0 | @@ -201,7 +201,7 @@ No authorization required # **queryActiveOrders** > QueryActiveOrdersResponse queryActiveOrders(walletAddress, tradeSide, l1Category, marketId, offset, limit, recvWindow) -Query Active Orders +Query Active Orders (USER_DATA) Get active (open) prediction orders for the authenticated user. Weight(IP): 200 Security Type: USER_DATA @@ -275,7 +275,7 @@ No authorization required # **queryOrderHistory** > QueryOrderHistoryResponse queryOrderHistory(walletAddress, l1Category, orderType, status, startDate, endDate, offset, limit, recvWindow) -Query Order History +Query Order History (USER_DATA) Get historical prediction orders (all statuses) for the authenticated user, with optional filters. Weight(IP): 200 Security Type: USER_DATA diff --git a/clients/w3w-prediction/docs/TransferApi.md b/clients/w3w-prediction/docs/TransferApi.md index c43633043..dc567d9e1 100644 --- a/clients/w3w-prediction/docs/TransferApi.md +++ b/clients/w3w-prediction/docs/TransferApi.md @@ -4,17 +4,17 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createInboundTransfer**](TransferApi.md#createInboundTransfer) | **POST** /sapi/v1/w3w/wallet/prediction/transfer/inbound | Create Inbound Transfer | -| [**createOutboundTransfer**](TransferApi.md#createOutboundTransfer) | **POST** /sapi/v1/w3w/wallet/prediction/transfer/outbound | Create Outbound Transfer | -| [**queryTransferList**](TransferApi.md#queryTransferList) | **GET** /sapi/v1/w3w/wallet/prediction/transfer/list | Query Transfer List | -| [**queryTransferStatus**](TransferApi.md#queryTransferStatus) | **GET** /sapi/v1/w3w/wallet/prediction/transfer/status | Query Transfer Status | +| [**createInboundTransfer**](TransferApi.md#createInboundTransfer) | **POST** /sapi/v1/w3w/wallet/prediction/transfer/inbound | Create Inbound Transfer (TRADE) | +| [**createOutboundTransfer**](TransferApi.md#createOutboundTransfer) | **POST** /sapi/v1/w3w/wallet/prediction/transfer/outbound | Create Outbound Transfer (TRADE) | +| [**queryTransferList**](TransferApi.md#queryTransferList) | **GET** /sapi/v1/w3w/wallet/prediction/transfer/list | Query Transfer List (USER_DATA) | +| [**queryTransferStatus**](TransferApi.md#queryTransferStatus) | **GET** /sapi/v1/w3w/wallet/prediction/transfer/status | Query Transfer Status (USER_DATA) | # **createInboundTransfer** > CreateInboundTransferResponse createInboundTransfer(createInboundTransferRequest) -Create Inbound Transfer +Create Inbound Transfer (TRADE) Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization. ⚠️ **SAS Authorization Required:** This endpoint enforces SAS (Self-Authorization Service) authorization. If SAS is not enabled for the wallet, the request will be rejected with `-31003 SAS authorization required`. Enable SAS for your wallet before calling this endpoint. Weight(IP): 200 Security Type: TRADE @@ -76,7 +76,7 @@ No authorization required # **createOutboundTransfer** > CreateOutboundTransferResponse createOutboundTransfer(createOutboundTransferRequest) -Create Outbound Transfer +Create Outbound Transfer (TRADE) Transfer funds from the user's CEX account (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization. Weight(IP): 200 Security Type: TRADE @@ -138,7 +138,7 @@ No authorization required # **queryTransferList** > QueryTransferListResponse queryTransferList(walletAddress, startDate, endDate, tokenSymbol, direction, offset, limit, recvWindow) -Query Transfer List +Query Transfer List (USER_DATA) Get the authenticated user's prediction wallet transfer history within a date range. Weight(IP): 200 Security Type: USER_DATA @@ -214,7 +214,7 @@ No authorization required # **queryTransferStatus** > QueryTransferStatusResponse queryTransferStatus(transferId, recvWindow) -Query Transfer Status +Query Transfer Status (USER_DATA) Query the current status of a prediction wallet transfer by transfer ID. **`status` values:** Terminal states are `COMPLETED` and `FAILED`. Intermediate states are `PROCESSING` and `PENDING`. **Do not** poll for `SUCCESS` — it is not a valid terminal state. Weight(IP): 200 Security Type: USER_DATA diff --git a/clients/w3w-prediction/docs/WalletApi.md b/clients/w3w-prediction/docs/WalletApi.md index dc471be28..1e598f64e 100644 --- a/clients/w3w-prediction/docs/WalletApi.md +++ b/clients/w3w-prediction/docs/WalletApi.md @@ -4,17 +4,17 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getPortfolio**](WalletApi.md#getPortfolio) | **GET** /sapi/v1/w3w/wallet/prediction/pnl/portfolio | Get Portfolio | -| [**getQuotaStatus**](WalletApi.md#getQuotaStatus) | **GET** /sapi/v1/w3w/wallet/prediction/quota/limit/status | Get Quota Status | -| [**listPredictionWallets**](WalletApi.md#listPredictionWallets) | **GET** /sapi/v1/w3w/wallet/prediction/wallet/list | List Prediction Wallets | -| [**queryPaymentOptionBalances**](WalletApi.md#queryPaymentOptionBalances) | **GET** /sapi/v1/w3w/wallet/prediction/balance/payment-options | Query Payment Option Balances | +| [**getPortfolio**](WalletApi.md#getPortfolio) | **GET** /sapi/v1/w3w/wallet/prediction/pnl/portfolio | Get Portfolio (USER_DATA) | +| [**getQuotaStatus**](WalletApi.md#getQuotaStatus) | **GET** /sapi/v1/w3w/wallet/prediction/quota/limit/status | Get Quota Status (USER_DATA) | +| [**listPredictionWallets**](WalletApi.md#listPredictionWallets) | **GET** /sapi/v1/w3w/wallet/prediction/wallet/list | List Prediction Wallets (USER_DATA) | +| [**queryPaymentOptionBalances**](WalletApi.md#queryPaymentOptionBalances) | **GET** /sapi/v1/w3w/wallet/prediction/balance/payment-options | Query Payment Option Balances (USER_DATA) | # **getPortfolio** > GetPortfolioResponse getPortfolio(walletAddress, tokenId, marketId, marketTopicId, activeOnly, recvWindow) -Get Portfolio +Get Portfolio (USER_DATA) Get the authenticated user's prediction portfolio overview including active positions count, aggregated PnL, and full position list. Weight(IP): 200 Security Type: USER_DATA @@ -86,7 +86,7 @@ No authorization required # **getQuotaStatus** > GetQuotaStatusResponse getQuotaStatus(recvWindow) -Get Quota Status +Get Quota Status (USER_DATA) Query the current user's daily trading quota limit and remaining allowance for prediction markets. Weight(IP): 200 Security Type: USER_DATA @@ -148,7 +148,7 @@ No authorization required # **listPredictionWallets** > ListPredictionWalletsResponse listPredictionWallets(recvWindow) -List Prediction Wallets +List Prediction Wallets (USER_DATA) Get all prediction wallets registered for the authenticated user. Weight(IP): 200 Security Type: USER_DATA @@ -210,7 +210,7 @@ No authorization required # **queryPaymentOptionBalances** > QueryPaymentOptionBalancesResponse queryPaymentOptionBalances(recvWindow) -Query Payment Option Balances +Query Payment Option Balances (USER_DATA) Get available balances for each payment option that can be used for prediction trading. Weight(IP): 200 Security Type: USER_DATA diff --git a/clients/w3w-prediction/example_rest.md b/clients/w3w-prediction/example_rest.md index e18a9e003..d43b4bb4d 100644 --- a/clients/w3w-prediction/example_rest.md +++ b/clients/w3w-prediction/example_rest.md @@ -1,64 +1,64 @@ ## MarketData -[GET /sapi/v1/w3w/wallet/prediction/market/detail](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#get-market-detail) - getMarketDetail - [GetMarketDetailExample.java:36](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/GetMarketDetailExample.java#L36) +[GET /sapi/v1/w3w/wallet/prediction/market/detail](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#get-market-detail) - getMarketDetail - [GetMarketDetailExample.java:37](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/GetMarketDetailExample.java#L37) -[GET /sapi/v1/w3w/wallet/prediction/category/list](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-categories) - listPredictionCategories - [ListPredictionCategoriesExample.java:35](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionCategoriesExample.java#L35) +[GET /sapi/v1/w3w/wallet/prediction/category/list](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-categories) - listPredictionCategories - [ListPredictionCategoriesExample.java:36](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionCategoriesExample.java#L36) -[GET /sapi/v1/w3w/wallet/prediction/market/list](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-markets) - listPredictionMarkets - [ListPredictionMarketsExample.java:38](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionMarketsExample.java#L38) +[GET /sapi/v1/w3w/wallet/prediction/market/list](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-markets) - listPredictionMarkets - [ListPredictionMarketsExample.java:39](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionMarketsExample.java#L39) -[GET /sapi/v1/w3w/wallet/prediction/market/search](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#market-search) - marketSearch - [MarketSearchExample.java:35](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/MarketSearchExample.java#L35) +[GET /sapi/v1/w3w/wallet/prediction/market/search](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#market-search) - marketSearch - [MarketSearchExample.java:36](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/MarketSearchExample.java#L36) -[GET /sapi/v1/w3w/wallet/prediction/order-book/last-trade-price](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-last-trade-price) - queryLastTradePrice - [QueryLastTradePriceExample.java:35](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryLastTradePriceExample.java#L35) +[GET /sapi/v1/w3w/wallet/prediction/order-book/last-trade-price](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-last-trade-price) - queryLastTradePrice - [QueryLastTradePriceExample.java:36](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryLastTradePriceExample.java#L36) -[GET /sapi/v1/w3w/wallet/prediction/order-book](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-order-book) - queryOrderBook - [QueryOrderBookExample.java:36](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryOrderBookExample.java#L36) +[GET /sapi/v1/w3w/wallet/prediction/order-book](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-order-book) - queryOrderBook - [QueryOrderBookExample.java:37](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryOrderBookExample.java#L37) ## Position -[GET /sapi/v1/w3w/wallet/prediction/position/token](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#get-position-by-token) - getPositionByToken - [GetPositionByTokenExample.java:36](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/GetPositionByTokenExample.java#L36) +[GET /sapi/v1/w3w/wallet/prediction/position/token](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#get-position-by-token) - getPositionByToken - [GetPositionByTokenExample.java:37](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/GetPositionByTokenExample.java#L37) -[GET /sapi/v1/w3w/wallet/prediction/pnl/query](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-pn-l) - queryPnL - [QueryPnLExample.java:37](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPnLExample.java#L37) +[GET /sapi/v1/w3w/wallet/prediction/pnl/query](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-pn-l) - queryPnL - [QueryPnLExample.java:38](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPnLExample.java#L38) -[GET /sapi/v1/w3w/wallet/prediction/position/list](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions) - queryPositions - [QueryPositionsExample.java:36](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsExample.java#L36) +[GET /sapi/v1/w3w/wallet/prediction/position/list](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions) - queryPositions - [QueryPositionsExample.java:37](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsExample.java#L37) -[GET /sapi/v1/w3w/wallet/prediction/position/filter](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions-by-filter) - queryPositionsByFilter - [QueryPositionsByFilterExample.java:36](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsByFilterExample.java#L36) +[GET /sapi/v1/w3w/wallet/prediction/position/filter](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions-by-filter) - queryPositionsByFilter - [QueryPositionsByFilterExample.java:37](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsByFilterExample.java#L37) -[GET /sapi/v1/w3w/wallet/prediction/position/settled-history](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-settled-position-history) - querySettledPositionHistory - [QuerySettledPositionHistoryExample.java:36](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QuerySettledPositionHistoryExample.java#L36) +[GET /sapi/v1/w3w/wallet/prediction/position/settled-history](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-settled-position-history) - querySettledPositionHistory - [QuerySettledPositionHistoryExample.java:37](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QuerySettledPositionHistoryExample.java#L37) ## Redeem -[POST /sapi/v1/w3w/wallet/prediction/batch-redeem](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#batch-redeem) - batchRedeem - [BatchRedeemExample.java:38](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/BatchRedeemExample.java#L38) +[POST /sapi/v1/w3w/wallet/prediction/batch-redeem](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#batch-redeem) - batchRedeem - [BatchRedeemExample.java:39](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/BatchRedeemExample.java#L39) -[GET /sapi/v1/w3w/wallet/prediction/redeem/status](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#get-redeem-status) - getRedeemStatus - [GetRedeemStatusExample.java:40](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/GetRedeemStatusExample.java#L40) +[GET /sapi/v1/w3w/wallet/prediction/redeem/status](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#get-redeem-status) - getRedeemStatus - [GetRedeemStatusExample.java:41](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/GetRedeemStatusExample.java#L41) ## Trade -[POST /sapi/v1/w3w/wallet/prediction/trade/batch-cancel](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#batch-cancel-orders) - batchCancelOrders - [BatchCancelOrdersExample.java:52](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/BatchCancelOrdersExample.java#L52) +[POST /sapi/v1/w3w/wallet/prediction/trade/batch-cancel](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#batch-cancel-orders) - batchCancelOrders - [BatchCancelOrdersExample.java:53](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/BatchCancelOrdersExample.java#L53) -[POST /sapi/v1/w3w/wallet/prediction/trade/get-quote](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#get-quote) - getQuote - [GetQuoteExample.java:47](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/GetQuoteExample.java#L47) +[POST /sapi/v1/w3w/wallet/prediction/trade/get-quote](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#get-quote) - getQuote - [GetQuoteExample.java:48](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/GetQuoteExample.java#L48) -[POST /sapi/v1/w3w/wallet/prediction/trade/place-order-bundle](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#place-order) - placeOrder - [PlaceOrderExample.java:42](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/PlaceOrderExample.java#L42) +[POST /sapi/v1/w3w/wallet/prediction/trade/place-order-bundle](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#place-order) - placeOrder - [PlaceOrderExample.java:43](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/PlaceOrderExample.java#L43) -[GET /sapi/v1/w3w/wallet/prediction/order/list](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-active-orders) - queryActiveOrders - [QueryActiveOrdersExample.java:37](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryActiveOrdersExample.java#L37) +[GET /sapi/v1/w3w/wallet/prediction/order/list](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-active-orders) - queryActiveOrders - [QueryActiveOrdersExample.java:38](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryActiveOrdersExample.java#L38) -[GET /sapi/v1/w3w/wallet/prediction/order/history](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-order-history) - queryOrderHistory - [QueryOrderHistoryExample.java:37](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryOrderHistoryExample.java#L37) +[GET /sapi/v1/w3w/wallet/prediction/order/history](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-order-history) - queryOrderHistory - [QueryOrderHistoryExample.java:38](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryOrderHistoryExample.java#L38) ## Transfer -[POST /sapi/v1/w3w/wallet/prediction/transfer/inbound](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-inbound-transfer) - createInboundTransfer - [CreateInboundTransferExample.java:41](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateInboundTransferExample.java#L41) +[POST /sapi/v1/w3w/wallet/prediction/transfer/inbound](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-inbound-transfer) - createInboundTransfer - [CreateInboundTransferExample.java:42](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateInboundTransferExample.java#L42) -[POST /sapi/v1/w3w/wallet/prediction/transfer/outbound](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-outbound-transfer) - createOutboundTransfer - [CreateOutboundTransferExample.java:39](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateOutboundTransferExample.java#L39) +[POST /sapi/v1/w3w/wallet/prediction/transfer/outbound](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-outbound-transfer) - createOutboundTransfer - [CreateOutboundTransferExample.java:40](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateOutboundTransferExample.java#L40) -[GET /sapi/v1/w3w/wallet/prediction/transfer/list](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-list) - queryTransferList - [QueryTransferListExample.java:37](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferListExample.java#L37) +[GET /sapi/v1/w3w/wallet/prediction/transfer/list](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-list) - queryTransferList - [QueryTransferListExample.java:38](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferListExample.java#L38) -[GET /sapi/v1/w3w/wallet/prediction/transfer/status](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-status) - queryTransferStatus - [QueryTransferStatusExample.java:39](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferStatusExample.java#L39) +[GET /sapi/v1/w3w/wallet/prediction/transfer/status](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-status) - queryTransferStatus - [QueryTransferStatusExample.java:40](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferStatusExample.java#L40) ## Wallet -[GET /sapi/v1/w3w/wallet/prediction/pnl/portfolio](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-portfolio) - getPortfolio - [GetPortfolioExample.java:36](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetPortfolioExample.java#L36) +[GET /sapi/v1/w3w/wallet/prediction/pnl/portfolio](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-portfolio) - getPortfolio - [GetPortfolioExample.java:37](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetPortfolioExample.java#L37) -[GET /sapi/v1/w3w/wallet/prediction/quota/limit/status](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-quota-status) - getQuotaStatus - [GetQuotaStatusExample.java:36](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetQuotaStatusExample.java#L36) +[GET /sapi/v1/w3w/wallet/prediction/quota/limit/status](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-quota-status) - getQuotaStatus - [GetQuotaStatusExample.java:37](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetQuotaStatusExample.java#L37) -[GET /sapi/v1/w3w/wallet/prediction/wallet/list](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#list-prediction-wallets) - listPredictionWallets - [ListPredictionWalletsExample.java:36](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/ListPredictionWalletsExample.java#L36) +[GET /sapi/v1/w3w/wallet/prediction/wallet/list](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#list-prediction-wallets) - listPredictionWallets - [ListPredictionWalletsExample.java:37](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/ListPredictionWalletsExample.java#L37) -[GET /sapi/v1/w3w/wallet/prediction/balance/payment-options](https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#query-payment-option-balances) - queryPaymentOptionBalances - [QueryPaymentOptionBalancesExample.java:36](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/QueryPaymentOptionBalancesExample.java#L36) +[GET /sapi/v1/w3w/wallet/prediction/balance/payment-options](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#query-payment-option-balances) - queryPaymentOptionBalances - [QueryPaymentOptionBalancesExample.java:37](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/QueryPaymentOptionBalancesExample.java#L37) diff --git a/clients/w3w-prediction/pom.xml b/clients/w3w-prediction/pom.xml index df80a7b8b..073b7d6a6 100644 --- a/clients/w3w-prediction/pom.xml +++ b/clients/w3w-prediction/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-w3w-prediction w3w-prediction - 1.0.0 + 2.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/MarketDataApi.java b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/MarketDataApi.java index 617297b97..13ce6bf3f 100644 --- a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/MarketDataApi.java +++ b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/MarketDataApi.java @@ -49,7 +49,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-w3w-prediction/1.0.0 (Java/%s; %s; %s)", + "binance-w3w-prediction/2.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -100,7 +100,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#get-market-detail">Get * Market Detail Documentation */ private okhttp3.Call getMarketDetailCall(Long marketTopicId) throws ApiException { @@ -209,7 +209,7 @@ private okhttp3.Call getMarketDetailValidateBeforeCall(Long marketTopicId) throw * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#get-market-detail">Get * Market Detail Documentation */ public ApiResponse getMarketDetail( @@ -233,7 +233,7 @@ public ApiResponse getMarketDetail( * * * @see List + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-categories">List * Prediction Categories Documentation */ private okhttp3.Call listPredictionCategoriesCall() throws ApiException { @@ -336,7 +336,7 @@ private okhttp3.Call listPredictionCategoriesValidateBeforeCall() throws ApiExce * * * @see List + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-categories">List * Prediction Categories Documentation */ public ApiResponse listPredictionCategories() @@ -367,7 +367,7 @@ public ApiResponse listPredictionCategories() * * * @see List + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-markets">List * Prediction Markets Documentation */ private okhttp3.Call listPredictionMarketsCall( @@ -525,7 +525,7 @@ private okhttp3.Call listPredictionMarketsValidateBeforeCall( * * * @see List + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-markets">List * Prediction Markets Documentation */ public ApiResponse listPredictionMarkets( @@ -559,7 +559,7 @@ public ApiResponse listPredictionMarkets( * * * @see Market + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#market-search">Market * Search Documentation */ private okhttp3.Call marketSearchCall(String query, Integer topK) throws ApiException { @@ -672,7 +672,7 @@ private okhttp3.Call marketSearchValidateBeforeCall(String query, Integer topK) * * * @see Market + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#market-search">Market * Search Documentation */ public ApiResponse marketSearch( @@ -697,7 +697,7 @@ public ApiResponse marketSearch( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-last-trade-price">Query * Last Trade Price Documentation */ private okhttp3.Call queryLastTradePriceCall(Long marketId) throws ApiException { @@ -805,7 +805,7 @@ private okhttp3.Call queryLastTradePriceValidateBeforeCall(Long marketId) throws * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-last-trade-price">Query * Last Trade Price Documentation */ public ApiResponse queryLastTradePrice( @@ -832,7 +832,7 @@ public ApiResponse queryLastTradePrice( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-order-book">Query * Order Book Documentation */ private okhttp3.Call queryOrderBookCall(String vendor, Long marketId, String tokenId) @@ -954,7 +954,7 @@ private okhttp3.Call queryOrderBookValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-order-book">Query * Order Book Documentation */ public ApiResponse queryOrderBook( diff --git a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/PositionApi.java b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/PositionApi.java index dc1b3be85..65d90362a 100644 --- a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/PositionApi.java +++ b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/PositionApi.java @@ -46,7 +46,7 @@ public class PositionApi { private static final String USER_AGENT = String.format( - "binance-w3w-prediction/1.0.0 (Java/%s; %s; %s)", + "binance-w3w-prediction/2.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -99,8 +99,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Get - * Position by Token Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#get-position-by-token">Get + * Position by Token (USER_DATA) Documentation */ private okhttp3.Call getPositionByTokenCall( String walletAddress, String tokenId, Long recvWindow) throws ApiException { @@ -206,8 +206,8 @@ private okhttp3.Call getPositionByTokenValidateBeforeCall( } /** - * Get Position by Token Get the authenticated user's position detail for a specific - * prediction token. Weight(IP): 200 Security Type: USER_DATA + * Get Position by Token (USER_DATA) Get the authenticated user's position detail for a + * specific prediction token. Weight(IP): 200 Security Type: USER_DATA * * @param walletAddress User's prediction wallet address (required) * @param tokenId Prediction outcome token ID (required) @@ -223,8 +223,8 @@ private okhttp3.Call getPositionByTokenValidateBeforeCall( * * * @see Get - * Position by Token Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#get-position-by-token">Get + * Position by Token (USER_DATA) Documentation */ public ApiResponse getPositionByToken( @NotNull String walletAddress, @NotNull String tokenId, @Max(60000L) Long recvWindow) @@ -255,8 +255,8 @@ public ApiResponse getPositionByToken( * * * @see Query - * PnL Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-pn-l">Query + * PnL (USER_DATA) Documentation */ private okhttp3.Call queryPnLCall( String walletAddress, @@ -396,9 +396,10 @@ private okhttp3.Call queryPnLValidateBeforeCall( } /** - * Query PnL Query profit and loss records for the authenticated user's prediction - * positions. When `tokenId` is provided, returns a single record in `pnl`; - * otherwise returns a list in `pnlList`. Weight(IP): 200 Security Type: USER_DATA + * Query PnL (USER_DATA) Query profit and loss records for the authenticated user's + * prediction positions. When `tokenId` is provided, returns a single record in + * `pnl`; otherwise returns a list in `pnlList`. Weight(IP): 200 Security + * Type: USER_DATA * * @param walletAddress User's prediction wallet address (required) * @param tokenId Filter by prediction token ID (optional) @@ -417,8 +418,8 @@ private okhttp3.Call queryPnLValidateBeforeCall( * * * @see Query - * PnL Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-pn-l">Query + * PnL (USER_DATA) Documentation */ public ApiResponse queryPnL( @NotNull String walletAddress, @@ -454,8 +455,8 @@ public ApiResponse queryPnL( * * * @see Query - * Positions Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions">Query + * Positions (USER_DATA) Documentation */ private okhttp3.Call queryPositionsCall( String walletAddress, String tab, Integer offset, Integer limit, Long recvWindow) @@ -576,8 +577,8 @@ private okhttp3.Call queryPositionsValidateBeforeCall( } /** - * Query Positions Get the authenticated user's prediction token positions with portfolio - * summary and tab-based filtering. Weight(IP): 200 Security Type: USER_DATA + * Query Positions (USER_DATA) Get the authenticated user's prediction token positions with + * portfolio summary and tab-based filtering. Weight(IP): 200 Security Type: USER_DATA * * @param walletAddress User's prediction wallet address (required) * @param tab Position status tab. Values from `PositionQueryType`. Default @@ -596,8 +597,8 @@ private okhttp3.Call queryPositionsValidateBeforeCall( * * * @see Query - * Positions Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions">Query + * Positions (USER_DATA) Documentation */ public ApiResponse queryPositions( @NotNull String walletAddress, @@ -629,8 +630,8 @@ public ApiResponse queryPositions( * * * @see Query - * Positions by Filter Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions-by-filter">Query + * Positions by Filter (USER_DATA) Documentation */ private okhttp3.Call queryPositionsByFilterCall( String walletAddress, Long marketTopicId, Long recvWindow) throws ApiException { @@ -737,8 +738,9 @@ private okhttp3.Call queryPositionsByFilterValidateBeforeCall( } /** - * Query Positions by Filter Get prediction positions filtered by wallet address and/or market - * topic ID. Both parameters are optional. Weight(IP): 200 Security Type: USER_DATA + * Query Positions by Filter (USER_DATA) Get prediction positions filtered by wallet address + * and/or market topic ID. Both parameters are optional. Weight(IP): 200 Security Type: + * USER_DATA * * @param walletAddress User's prediction wallet address (optional) * @param marketTopicId Filter by market topic ID (optional) @@ -754,8 +756,8 @@ private okhttp3.Call queryPositionsByFilterValidateBeforeCall( * * * @see Query - * Positions by Filter Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions-by-filter">Query + * Positions by Filter (USER_DATA) Documentation */ public ApiResponse queryPositionsByFilter( String walletAddress, Long marketTopicId, @Max(60000L) Long recvWindow) @@ -790,8 +792,8 @@ public ApiResponse queryPositionsByFilter( * * * @see Query - * Settled Position History Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-settled-position-history">Query + * Settled Position History (USER_DATA) Documentation */ private okhttp3.Call querySettledPositionHistoryCall( String walletAddress, @@ -951,8 +953,9 @@ private okhttp3.Call querySettledPositionHistoryValidateBeforeCall( } /** - * Query Settled Position History Get the authenticated user's settled (resolved) prediction - * position history with optional filters. Weight(IP): 200 Security Type: USER_DATA + * Query Settled Position History (USER_DATA) Get the authenticated user's settled + * (resolved) prediction position history with optional filters. Weight(IP): 200 Security Type: + * USER_DATA * * @param walletAddress User's prediction wallet address (required) * @param l1Category Filter by level-1 category (optional) @@ -975,8 +978,8 @@ private okhttp3.Call querySettledPositionHistoryValidateBeforeCall( * * * @see Query - * Settled Position History Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-settled-position-history">Query + * Settled Position History (USER_DATA) Documentation */ public ApiResponse querySettledPositionHistory( @NotNull String walletAddress, diff --git a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/RedeemApi.java b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/RedeemApi.java index dd32ae8f5..f6a91a24a 100644 --- a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/RedeemApi.java +++ b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/RedeemApi.java @@ -46,7 +46,7 @@ public class RedeemApi { private static final String USER_AGENT = String.format( - "binance-w3w-prediction/1.0.0 (Java/%s; %s; %s)", + "binance-w3w-prediction/2.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -97,8 +97,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Batch - * Redeem Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#batch-redeem">Batch + * Redeem (TRADE) Documentation */ private okhttp3.Call batchRedeemCall(BatchRedeemRequest batchRedeemRequest) throws ApiException { @@ -205,7 +205,7 @@ private okhttp3.Call batchRedeemValidateBeforeCall(BatchRedeemRequest batchRedee } /** - * Batch Redeem Redeem one or more settled prediction tokens on-chain to claim winnings. + * Batch Redeem (TRADE) Redeem one or more settled prediction tokens on-chain to claim winnings. * Requires SAS authorization. Weight(IP): 200 Security Type: TRADE * * @param batchRedeemRequest (required) @@ -220,8 +220,8 @@ private okhttp3.Call batchRedeemValidateBeforeCall(BatchRedeemRequest batchRedee * * * @see Batch - * Redeem Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#batch-redeem">Batch + * Redeem (TRADE) Documentation */ public ApiResponse batchRedeem( @Valid @NotNull BatchRedeemRequest batchRedeemRequest) throws ApiException { @@ -247,8 +247,8 @@ public ApiResponse batchRedeem( * * * @see Get - * Redeem Status Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#get-redeem-status">Get + * Redeem Status (USER_DATA) Documentation */ private okhttp3.Call getRedeemStatusCall(String walletAddress, String txHash, Long recvWindow) throws ApiException { @@ -353,9 +353,9 @@ private okhttp3.Call getRedeemStatusValidateBeforeCall( } /** - * Get Redeem Status Query the on-chain transaction status of a previously submitted redeem - * request. Weight(IP): 200 Security Type: USER_DATA Response Notes: - Status values: | Value | - * Description | | ----------- | -------------------------------------------- | | + * Get Redeem Status (USER_DATA) Query the on-chain transaction status of a previously submitted + * redeem request. Weight(IP): 200 Security Type: USER_DATA Response Notes: - Status values: | + * Value | Description | | ----------- | -------------------------------------------- | | * `PENDING` | Transaction submitted, awaiting confirmation | | `CONFIRMED` * | Transaction confirmed on-chain | | `FAILED` | Transaction failed | | * `NOT_FOUND` | Transaction hash not found | @@ -374,8 +374,8 @@ private okhttp3.Call getRedeemStatusValidateBeforeCall( * * * @see Get - * Redeem Status Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#get-redeem-status">Get + * Redeem Status (USER_DATA) Documentation */ public ApiResponse getRedeemStatus( @NotNull String walletAddress, @NotNull String txHash, @Max(60000L) Long recvWindow) diff --git a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/TradeApi.java b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/TradeApi.java index dc5a88400..a4c982369 100644 --- a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/TradeApi.java +++ b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/TradeApi.java @@ -53,7 +53,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-w3w-prediction/1.0.0 (Java/%s; %s; %s)", + "binance-w3w-prediction/2.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -104,8 +104,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Batch - * Cancel Orders Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#batch-cancel-orders">Batch + * Cancel Orders (TRADE) Documentation */ private okhttp3.Call batchCancelOrdersCall(BatchCancelOrdersRequest batchCancelOrdersRequest) throws ApiException { @@ -209,9 +209,9 @@ private okhttp3.Call batchCancelOrdersValidateBeforeCall( } /** - * Batch Cancel Orders Cancel one or more active prediction orders in a single request. Requires - * SAS authorization. **Known Issue — Bracket Encoding Incompatibility:** This endpoint uses - * indexed bracket notation (`cancelInfoList[0].orderId`). Binance SAPI signature + * Batch Cancel Orders (TRADE) Cancel one or more active prediction orders in a single request. + * Requires SAS authorization. **Known Issue — Bracket Encoding Incompatibility:** This endpoint + * uses indexed bracket notation (`cancelInfoList[0].orderId`). Binance SAPI signature * verification runs over the **raw, unencoded** canonical string. However, mainstream HTTP * libraries (Python `requests`, Java `HttpURLConnection`/`URI`, * Go `net/url`, Node.js `url`) automatically percent-encode `[` → @@ -239,8 +239,8 @@ private okhttp3.Call batchCancelOrdersValidateBeforeCall( * * * @see Batch - * Cancel Orders Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#batch-cancel-orders">Batch + * Cancel Orders (TRADE) Documentation */ public ApiResponse batchCancelOrders( @Valid @NotNull BatchCancelOrdersRequest batchCancelOrdersRequest) throws ApiException { @@ -264,8 +264,8 @@ public ApiResponse batchCancelOrders( * * * @see Get - * Quote Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#get-quote">Get + * Quote (TRADE) Documentation */ private okhttp3.Call getQuoteCall(GetQuoteRequest getQuoteRequest) throws ApiException { String basePath = null; @@ -398,16 +398,17 @@ private okhttp3.Call getQuoteValidateBeforeCall(GetQuoteRequest getQuoteRequest) } /** - * Get Quote Get a price quote for a prediction order. The returned `quoteId` must be - * used in the subsequent Place Order request. Weight(IP): 200 Security Type: TRADE Response - * Notes: - `feeAmount` is a string because it is denominated in wei (18 decimals) and - * may exceed JavaScript's safe integer range. `feeDiscountBps` is also a string - * to allow fractional basis-point values in the future. `feeRateBps` and - * `slippageBps` are integers and will never exceed safe integer bounds. - **MARKET - * order minimum amount:** For `MARKET` orders, `amountIn` must be at least - * approximately **1.5 USDT** (in wei: `1500000000000000000`). The exact minimum - * varies by market liquidity. If the amount is too small, the server returns `-9000 Your - * order amount is too small`. This limit does **not** apply to `LIMIT` orders. + * Get Quote (TRADE) Get a price quote for a prediction order. The returned `quoteId` + * must be used in the subsequent Place Order request. Weight(IP): 200 Security Type: TRADE + * Response Notes: - `feeAmount` is a string because it is denominated in wei (18 + * decimals) and may exceed JavaScript's safe integer range. `feeDiscountBps` is + * also a string to allow fractional basis-point values in the future. `feeRateBps` + * and `slippageBps` are integers and will never exceed safe integer bounds. - + * **MARKET order minimum amount:** For `MARKET` orders, `amountIn` must be + * at least approximately **1.5 USDT** (in wei: `1500000000000000000`). The exact + * minimum varies by market liquidity. If the amount is too small, the server returns + * `-9000 Your order amount is too small`. This limit does **not** apply to + * `LIMIT` orders. * * @param getQuoteRequest (required) * @return ApiResponse<GetQuoteResponse> @@ -421,8 +422,8 @@ private okhttp3.Call getQuoteValidateBeforeCall(GetQuoteRequest getQuoteRequest) * * * @see Get - * Quote Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#get-quote">Get + * Quote (TRADE) Documentation */ public ApiResponse getQuote(@Valid @NotNull GetQuoteRequest getQuoteRequest) throws ApiException { @@ -445,8 +446,8 @@ public ApiResponse getQuote(@Valid @NotNull GetQuoteRequest ge * * * @see Place - * Order Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#place-order">Place + * Order (TRADE) Documentation */ private okhttp3.Call placeOrderCall(PlaceOrderRequest placeOrderRequest) throws ApiException { String basePath = null; @@ -575,7 +576,7 @@ private okhttp3.Call placeOrderValidateBeforeCall(PlaceOrderRequest placeOrderRe } /** - * Place Order Place a prediction order using a previously obtained quote. Requires SAS + * Place Order (TRADE) Place a prediction order using a previously obtained quote. Requires SAS * authorization. Weight(IP): 200 Security Type: TRADE Notes: - Validation rules: | orderType | * timeInForce | priceLimit | | --------- | ------------- | --------------------- | | * `MARKET` | Must be `FOK` | Not required | | `LIMIT` | Must be @@ -593,8 +594,8 @@ private okhttp3.Call placeOrderValidateBeforeCall(PlaceOrderRequest placeOrderRe * * * @see Place - * Order Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#place-order">Place + * Order (TRADE) Documentation */ public ApiResponse placeOrder( @Valid @NotNull PlaceOrderRequest placeOrderRequest) throws ApiException { @@ -624,8 +625,8 @@ public ApiResponse placeOrder( * * * @see Query - * Active Orders Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-active-orders">Query + * Active Orders (USER_DATA) Documentation */ private okhttp3.Call queryActiveOrdersCall( String walletAddress, @@ -771,8 +772,8 @@ private okhttp3.Call queryActiveOrdersValidateBeforeCall( } /** - * Query Active Orders Get active (open) prediction orders for the authenticated user. - * Weight(IP): 200 Security Type: USER_DATA + * Query Active Orders (USER_DATA) Get active (open) prediction orders for the authenticated + * user. Weight(IP): 200 Security Type: USER_DATA * * @param walletAddress User's prediction wallet address (required) * @param tradeSide Filter by trade side. Enum: `BUY`, `SELL` (optional) @@ -792,8 +793,8 @@ private okhttp3.Call queryActiveOrdersValidateBeforeCall( * * * @see Query - * Active Orders Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-active-orders">Query + * Active Orders (USER_DATA) Documentation */ public ApiResponse queryActiveOrders( @NotNull String walletAddress, @@ -836,8 +837,8 @@ public ApiResponse queryActiveOrders( * * * @see Query - * Order History Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-order-history">Query + * Order History (USER_DATA) Documentation */ private okhttp3.Call queryOrderHistoryCall( String walletAddress, @@ -1013,8 +1014,8 @@ private okhttp3.Call queryOrderHistoryValidateBeforeCall( } /** - * Query Order History Get historical prediction orders (all statuses) for the authenticated - * user, with optional filters. Weight(IP): 200 Security Type: USER_DATA + * Query Order History (USER_DATA) Get historical prediction orders (all statuses) for the + * authenticated user, with optional filters. Weight(IP): 200 Security Type: USER_DATA * * @param walletAddress User's prediction wallet address (required) * @param l1Category Filter by level-1 category (optional) @@ -1038,8 +1039,8 @@ private okhttp3.Call queryOrderHistoryValidateBeforeCall( * * * @see Query - * Order History Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-order-history">Query + * Order History (USER_DATA) Documentation */ public ApiResponse queryOrderHistory( @NotNull String walletAddress, diff --git a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/TransferApi.java b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/TransferApi.java index 6b66ea921..6c76e071d 100644 --- a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/TransferApi.java +++ b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/TransferApi.java @@ -49,7 +49,7 @@ public class TransferApi { private static final String USER_AGENT = String.format( - "binance-w3w-prediction/1.0.0 (Java/%s; %s; %s)", + "binance-w3w-prediction/2.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -100,8 +100,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Create - * Inbound Transfer Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-inbound-transfer">Create + * Inbound Transfer (TRADE) Documentation */ private okhttp3.Call createInboundTransferCall( CreateInboundTransferRequest createInboundTransferRequest) throws ApiException { @@ -223,10 +223,10 @@ private okhttp3.Call createInboundTransferValidateBeforeCall( } /** - * Create Inbound Transfer Transfer funds from the prediction wallet back to the user's CEX - * account (SPOT or FUNDING). Requires SAS authorization. ⚠️ **SAS Authorization Required:** - * This endpoint enforces SAS (Self-Authorization Service) authorization. If SAS is not enabled - * for the wallet, the request will be rejected with `-31003 SAS authorization + * Create Inbound Transfer (TRADE) Transfer funds from the prediction wallet back to the + * user's CEX account (SPOT or FUNDING). Requires SAS authorization. ⚠️ **SAS Authorization + * Required:** This endpoint enforces SAS (Self-Authorization Service) authorization. If SAS is + * not enabled for the wallet, the request will be rejected with `-31003 SAS authorization * required`. Enable SAS for your wallet before calling this endpoint. Weight(IP): 200 * Security Type: TRADE * @@ -242,8 +242,8 @@ private okhttp3.Call createInboundTransferValidateBeforeCall( * * * @see Create - * Inbound Transfer Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-inbound-transfer">Create + * Inbound Transfer (TRADE) Documentation */ public ApiResponse createInboundTransfer( @Valid @NotNull CreateInboundTransferRequest createInboundTransferRequest) @@ -269,8 +269,8 @@ public ApiResponse createInboundTransfer( * * * @see Create - * Outbound Transfer Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-outbound-transfer">Create + * Outbound Transfer (TRADE) Documentation */ private okhttp3.Call createOutboundTransferCall( CreateOutboundTransferRequest createOutboundTransferRequest) throws ApiException { @@ -397,8 +397,9 @@ private okhttp3.Call createOutboundTransferValidateBeforeCall( } /** - * Create Outbound Transfer Transfer funds from the user's CEX account (SPOT or FUNDING) - * into the prediction wallet. Requires SAS authorization. Weight(IP): 200 Security Type: TRADE + * Create Outbound Transfer (TRADE) Transfer funds from the user's CEX account (SPOT or + * FUNDING) into the prediction wallet. Requires SAS authorization. Weight(IP): 200 Security + * Type: TRADE * * @param createOutboundTransferRequest (required) * @return ApiResponse<CreateOutboundTransferResponse> @@ -412,8 +413,8 @@ private okhttp3.Call createOutboundTransferValidateBeforeCall( * * * @see Create - * Outbound Transfer Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-outbound-transfer">Create + * Outbound Transfer (TRADE) Documentation */ public ApiResponse createOutboundTransfer( @Valid @NotNull CreateOutboundTransferRequest createOutboundTransferRequest) @@ -449,8 +450,8 @@ public ApiResponse createOutboundTransfer( * * * @see Query - * Transfer List Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-list">Query + * Transfer List (USER_DATA) Documentation */ private okhttp3.Call queryTransferListCall( String walletAddress, @@ -611,8 +612,8 @@ private okhttp3.Call queryTransferListValidateBeforeCall( } /** - * Query Transfer List Get the authenticated user's prediction wallet transfer history - * within a date range. Weight(IP): 200 Security Type: USER_DATA + * Query Transfer List (USER_DATA) Get the authenticated user's prediction wallet transfer + * history within a date range. Weight(IP): 200 Security Type: USER_DATA * * @param walletAddress User's prediction wallet address (required) * @param startDate Start date. Format: `yyyy-MM-dd`. Must be ≤ `endDate` @@ -636,8 +637,8 @@ private okhttp3.Call queryTransferListValidateBeforeCall( * * * @see Query - * Transfer List Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-list">Query + * Transfer List (USER_DATA) Documentation */ public ApiResponse queryTransferList( @NotNull String walletAddress, @@ -679,8 +680,8 @@ public ApiResponse queryTransferList( * * * @see Query - * Transfer Status Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-status">Query + * Transfer Status (USER_DATA) Documentation */ private okhttp3.Call queryTransferStatusCall(String transferId, Long recvWindow) throws ApiException { @@ -779,8 +780,8 @@ private okhttp3.Call queryTransferStatusValidateBeforeCall(String transferId, Lo } /** - * Query Transfer Status Query the current status of a prediction wallet transfer by transfer - * ID. **`status` values:** Terminal states are `COMPLETED` and + * Query Transfer Status (USER_DATA) Query the current status of a prediction wallet transfer by + * transfer ID. **`status` values:** Terminal states are `COMPLETED` and * `FAILED`. Intermediate states are `PROCESSING` and `PENDING`. * **Do not** poll for `SUCCESS` — it is not a valid terminal state. Weight(IP): 200 * Security Type: USER_DATA @@ -798,8 +799,8 @@ private okhttp3.Call queryTransferStatusValidateBeforeCall(String transferId, Lo * * * @see Query - * Transfer Status Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-status">Query + * Transfer Status (USER_DATA) Documentation */ public ApiResponse queryTransferStatus( @NotNull String transferId, @Max(60000L) Long recvWindow) throws ApiException { diff --git a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/W3WPredictionRestApi.java b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/W3WPredictionRestApi.java index e08517d71..b37ceaf48 100644 --- a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/W3WPredictionRestApi.java +++ b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/W3WPredictionRestApi.java @@ -81,7 +81,7 @@ public W3WPredictionRestApi(ApiClient apiClient) { * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#get-market-detail">Get * Market Detail Documentation */ public ApiResponse getMarketDetail(Long marketTopicId) @@ -104,7 +104,7 @@ public ApiResponse getMarketDetail(Long marketTopicId) * * * @see List + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-categories">List * Prediction Categories Documentation */ public ApiResponse listPredictionCategories() @@ -134,7 +134,7 @@ public ApiResponse listPredictionCategories() * * * @see List + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-markets">List * Prediction Markets Documentation */ public ApiResponse listPredictionMarkets( @@ -165,7 +165,7 @@ public ApiResponse listPredictionMarkets( * * * @see Market + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#market-search">Market * Search Documentation */ public ApiResponse marketSearch(String query, Integer topK) @@ -189,7 +189,7 @@ public ApiResponse marketSearch(String query, Integer topK * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-last-trade-price">Query * Last Trade Price Documentation */ public ApiResponse queryLastTradePrice(Long marketId) @@ -215,7 +215,7 @@ public ApiResponse queryLastTradePrice(Long marketI * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-order-book">Query * Order Book Documentation */ public ApiResponse queryOrderBook( @@ -224,8 +224,8 @@ public ApiResponse queryOrderBook( } /** - * Get Position by Token Get the authenticated user's position detail for a specific - * prediction token. Weight(IP): 200 Security Type: USER_DATA + * Get Position by Token (USER_DATA) Get the authenticated user's position detail for a + * specific prediction token. Weight(IP): 200 Security Type: USER_DATA * * @param walletAddress User's prediction wallet address (required) * @param tokenId Prediction outcome token ID (required) @@ -241,8 +241,8 @@ public ApiResponse queryOrderBook( * * * @see Get - * Position by Token Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#get-position-by-token">Get + * Position by Token (USER_DATA) Documentation */ public ApiResponse getPositionByToken( String walletAddress, String tokenId, Long recvWindow) throws ApiException { @@ -250,9 +250,10 @@ public ApiResponse getPositionByToken( } /** - * Query PnL Query profit and loss records for the authenticated user's prediction - * positions. When `tokenId` is provided, returns a single record in `pnl`; - * otherwise returns a list in `pnlList`. Weight(IP): 200 Security Type: USER_DATA + * Query PnL (USER_DATA) Query profit and loss records for the authenticated user's + * prediction positions. When `tokenId` is provided, returns a single record in + * `pnl`; otherwise returns a list in `pnlList`. Weight(IP): 200 Security + * Type: USER_DATA * * @param walletAddress User's prediction wallet address (required) * @param tokenId Filter by prediction token ID (optional) @@ -271,8 +272,8 @@ public ApiResponse getPositionByToken( * * * @see Query - * PnL Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-pn-l">Query + * PnL (USER_DATA) Documentation */ public ApiResponse queryPnL( String walletAddress, @@ -287,8 +288,8 @@ public ApiResponse queryPnL( } /** - * Query Positions Get the authenticated user's prediction token positions with portfolio - * summary and tab-based filtering. Weight(IP): 200 Security Type: USER_DATA + * Query Positions (USER_DATA) Get the authenticated user's prediction token positions with + * portfolio summary and tab-based filtering. Weight(IP): 200 Security Type: USER_DATA * * @param walletAddress User's prediction wallet address (required) * @param tab Position status tab. Values from `PositionQueryType`. Default @@ -307,8 +308,8 @@ public ApiResponse queryPnL( * * * @see Query - * Positions Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions">Query + * Positions (USER_DATA) Documentation */ public ApiResponse queryPositions( String walletAddress, String tab, Integer offset, Integer limit, Long recvWindow) @@ -317,8 +318,9 @@ public ApiResponse queryPositions( } /** - * Query Positions by Filter Get prediction positions filtered by wallet address and/or market - * topic ID. Both parameters are optional. Weight(IP): 200 Security Type: USER_DATA + * Query Positions by Filter (USER_DATA) Get prediction positions filtered by wallet address + * and/or market topic ID. Both parameters are optional. Weight(IP): 200 Security Type: + * USER_DATA * * @param walletAddress User's prediction wallet address (optional) * @param marketTopicId Filter by market topic ID (optional) @@ -334,8 +336,8 @@ public ApiResponse queryPositions( * * * @see Query - * Positions by Filter Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions-by-filter">Query + * Positions by Filter (USER_DATA) Documentation */ public ApiResponse queryPositionsByFilter( String walletAddress, Long marketTopicId, Long recvWindow) throws ApiException { @@ -343,8 +345,9 @@ public ApiResponse queryPositionsByFilter( } /** - * Query Settled Position History Get the authenticated user's settled (resolved) prediction - * position history with optional filters. Weight(IP): 200 Security Type: USER_DATA + * Query Settled Position History (USER_DATA) Get the authenticated user's settled + * (resolved) prediction position history with optional filters. Weight(IP): 200 Security Type: + * USER_DATA * * @param walletAddress User's prediction wallet address (required) * @param l1Category Filter by level-1 category (optional) @@ -367,8 +370,8 @@ public ApiResponse queryPositionsByFilter( * * * @see Query - * Settled Position History Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-settled-position-history">Query + * Settled Position History (USER_DATA) Documentation */ public ApiResponse querySettledPositionHistory( String walletAddress, @@ -385,7 +388,7 @@ public ApiResponse querySettledPositionHist } /** - * Batch Redeem Redeem one or more settled prediction tokens on-chain to claim winnings. + * Batch Redeem (TRADE) Redeem one or more settled prediction tokens on-chain to claim winnings. * Requires SAS authorization. Weight(IP): 200 Security Type: TRADE * * @param batchRedeemRequest (required) @@ -400,8 +403,8 @@ public ApiResponse querySettledPositionHist * * * @see Batch - * Redeem Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#batch-redeem">Batch + * Redeem (TRADE) Documentation */ public ApiResponse batchRedeem(BatchRedeemRequest batchRedeemRequest) throws ApiException { @@ -409,9 +412,9 @@ public ApiResponse batchRedeem(BatchRedeemRequest batchRede } /** - * Get Redeem Status Query the on-chain transaction status of a previously submitted redeem - * request. Weight(IP): 200 Security Type: USER_DATA Response Notes: - Status values: | Value | - * Description | | ----------- | -------------------------------------------- | | + * Get Redeem Status (USER_DATA) Query the on-chain transaction status of a previously submitted + * redeem request. Weight(IP): 200 Security Type: USER_DATA Response Notes: - Status values: | + * Value | Description | | ----------- | -------------------------------------------- | | * `PENDING` | Transaction submitted, awaiting confirmation | | `CONFIRMED` * | Transaction confirmed on-chain | | `FAILED` | Transaction failed | | * `NOT_FOUND` | Transaction hash not found | @@ -430,8 +433,8 @@ public ApiResponse batchRedeem(BatchRedeemRequest batchRede * * * @see Get - * Redeem Status Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#get-redeem-status">Get + * Redeem Status (USER_DATA) Documentation */ public ApiResponse getRedeemStatus( String walletAddress, String txHash, Long recvWindow) throws ApiException { @@ -439,9 +442,9 @@ public ApiResponse getRedeemStatus( } /** - * Batch Cancel Orders Cancel one or more active prediction orders in a single request. Requires - * SAS authorization. **Known Issue — Bracket Encoding Incompatibility:** This endpoint uses - * indexed bracket notation (`cancelInfoList[0].orderId`). Binance SAPI signature + * Batch Cancel Orders (TRADE) Cancel one or more active prediction orders in a single request. + * Requires SAS authorization. **Known Issue — Bracket Encoding Incompatibility:** This endpoint + * uses indexed bracket notation (`cancelInfoList[0].orderId`). Binance SAPI signature * verification runs over the **raw, unencoded** canonical string. However, mainstream HTTP * libraries (Python `requests`, Java `HttpURLConnection`/`URI`, * Go `net/url`, Node.js `url`) automatically percent-encode `[` → @@ -469,8 +472,8 @@ public ApiResponse getRedeemStatus( * * * @see Batch - * Cancel Orders Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#batch-cancel-orders">Batch + * Cancel Orders (TRADE) Documentation */ public ApiResponse batchCancelOrders( BatchCancelOrdersRequest batchCancelOrdersRequest) throws ApiException { @@ -478,16 +481,17 @@ public ApiResponse batchCancelOrders( } /** - * Get Quote Get a price quote for a prediction order. The returned `quoteId` must be - * used in the subsequent Place Order request. Weight(IP): 200 Security Type: TRADE Response - * Notes: - `feeAmount` is a string because it is denominated in wei (18 decimals) and - * may exceed JavaScript's safe integer range. `feeDiscountBps` is also a string - * to allow fractional basis-point values in the future. `feeRateBps` and - * `slippageBps` are integers and will never exceed safe integer bounds. - **MARKET - * order minimum amount:** For `MARKET` orders, `amountIn` must be at least - * approximately **1.5 USDT** (in wei: `1500000000000000000`). The exact minimum - * varies by market liquidity. If the amount is too small, the server returns `-9000 Your - * order amount is too small`. This limit does **not** apply to `LIMIT` orders. + * Get Quote (TRADE) Get a price quote for a prediction order. The returned `quoteId` + * must be used in the subsequent Place Order request. Weight(IP): 200 Security Type: TRADE + * Response Notes: - `feeAmount` is a string because it is denominated in wei (18 + * decimals) and may exceed JavaScript's safe integer range. `feeDiscountBps` is + * also a string to allow fractional basis-point values in the future. `feeRateBps` + * and `slippageBps` are integers and will never exceed safe integer bounds. - + * **MARKET order minimum amount:** For `MARKET` orders, `amountIn` must be + * at least approximately **1.5 USDT** (in wei: `1500000000000000000`). The exact + * minimum varies by market liquidity. If the amount is too small, the server returns + * `-9000 Your order amount is too small`. This limit does **not** apply to + * `LIMIT` orders. * * @param getQuoteRequest (required) * @return ApiResponse<GetQuoteResponse> @@ -501,8 +505,8 @@ public ApiResponse batchCancelOrders( * * * @see Get - * Quote Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#get-quote">Get + * Quote (TRADE) Documentation */ public ApiResponse getQuote(GetQuoteRequest getQuoteRequest) throws ApiException { @@ -510,7 +514,7 @@ public ApiResponse getQuote(GetQuoteRequest getQuoteRequest) } /** - * Place Order Place a prediction order using a previously obtained quote. Requires SAS + * Place Order (TRADE) Place a prediction order using a previously obtained quote. Requires SAS * authorization. Weight(IP): 200 Security Type: TRADE Notes: - Validation rules: | orderType | * timeInForce | priceLimit | | --------- | ------------- | --------------------- | | * `MARKET` | Must be `FOK` | Not required | | `LIMIT` | Must be @@ -528,8 +532,8 @@ public ApiResponse getQuote(GetQuoteRequest getQuoteRequest) * * * @see Place - * Order Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#place-order">Place + * Order (TRADE) Documentation */ public ApiResponse placeOrder(PlaceOrderRequest placeOrderRequest) throws ApiException { @@ -537,8 +541,8 @@ public ApiResponse placeOrder(PlaceOrderRequest placeOrderRe } /** - * Query Active Orders Get active (open) prediction orders for the authenticated user. - * Weight(IP): 200 Security Type: USER_DATA + * Query Active Orders (USER_DATA) Get active (open) prediction orders for the authenticated + * user. Weight(IP): 200 Security Type: USER_DATA * * @param walletAddress User's prediction wallet address (required) * @param tradeSide Filter by trade side. Enum: `BUY`, `SELL` (optional) @@ -558,8 +562,8 @@ public ApiResponse placeOrder(PlaceOrderRequest placeOrderRe * * * @see Query - * Active Orders Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-active-orders">Query + * Active Orders (USER_DATA) Documentation */ public ApiResponse queryActiveOrders( String walletAddress, @@ -575,8 +579,8 @@ public ApiResponse queryActiveOrders( } /** - * Query Order History Get historical prediction orders (all statuses) for the authenticated - * user, with optional filters. Weight(IP): 200 Security Type: USER_DATA + * Query Order History (USER_DATA) Get historical prediction orders (all statuses) for the + * authenticated user, with optional filters. Weight(IP): 200 Security Type: USER_DATA * * @param walletAddress User's prediction wallet address (required) * @param l1Category Filter by level-1 category (optional) @@ -600,8 +604,8 @@ public ApiResponse queryActiveOrders( * * * @see Query - * Order History Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-order-history">Query + * Order History (USER_DATA) Documentation */ public ApiResponse queryOrderHistory( String walletAddress, @@ -627,10 +631,10 @@ public ApiResponse queryOrderHistory( } /** - * Create Inbound Transfer Transfer funds from the prediction wallet back to the user's CEX - * account (SPOT or FUNDING). Requires SAS authorization. ⚠️ **SAS Authorization Required:** - * This endpoint enforces SAS (Self-Authorization Service) authorization. If SAS is not enabled - * for the wallet, the request will be rejected with `-31003 SAS authorization + * Create Inbound Transfer (TRADE) Transfer funds from the prediction wallet back to the + * user's CEX account (SPOT or FUNDING). Requires SAS authorization. ⚠️ **SAS Authorization + * Required:** This endpoint enforces SAS (Self-Authorization Service) authorization. If SAS is + * not enabled for the wallet, the request will be rejected with `-31003 SAS authorization * required`. Enable SAS for your wallet before calling this endpoint. Weight(IP): 200 * Security Type: TRADE * @@ -646,8 +650,8 @@ public ApiResponse queryOrderHistory( * * * @see Create - * Inbound Transfer Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-inbound-transfer">Create + * Inbound Transfer (TRADE) Documentation */ public ApiResponse createInboundTransfer( CreateInboundTransferRequest createInboundTransferRequest) throws ApiException { @@ -655,8 +659,9 @@ public ApiResponse createInboundTransfer( } /** - * Create Outbound Transfer Transfer funds from the user's CEX account (SPOT or FUNDING) - * into the prediction wallet. Requires SAS authorization. Weight(IP): 200 Security Type: TRADE + * Create Outbound Transfer (TRADE) Transfer funds from the user's CEX account (SPOT or + * FUNDING) into the prediction wallet. Requires SAS authorization. Weight(IP): 200 Security + * Type: TRADE * * @param createOutboundTransferRequest (required) * @return ApiResponse<CreateOutboundTransferResponse> @@ -670,8 +675,8 @@ public ApiResponse createInboundTransfer( * * * @see Create - * Outbound Transfer Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-outbound-transfer">Create + * Outbound Transfer (TRADE) Documentation */ public ApiResponse createOutboundTransfer( CreateOutboundTransferRequest createOutboundTransferRequest) throws ApiException { @@ -679,8 +684,8 @@ public ApiResponse createOutboundTransfer( } /** - * Query Transfer List Get the authenticated user's prediction wallet transfer history - * within a date range. Weight(IP): 200 Security Type: USER_DATA + * Query Transfer List (USER_DATA) Get the authenticated user's prediction wallet transfer + * history within a date range. Weight(IP): 200 Security Type: USER_DATA * * @param walletAddress User's prediction wallet address (required) * @param startDate Start date. Format: `yyyy-MM-dd`. Must be ≤ `endDate` @@ -704,8 +709,8 @@ public ApiResponse createOutboundTransfer( * * * @see Query - * Transfer List Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-list">Query + * Transfer List (USER_DATA) Documentation */ public ApiResponse queryTransferList( String walletAddress, @@ -729,8 +734,8 @@ public ApiResponse queryTransferList( } /** - * Query Transfer Status Query the current status of a prediction wallet transfer by transfer - * ID. **`status` values:** Terminal states are `COMPLETED` and + * Query Transfer Status (USER_DATA) Query the current status of a prediction wallet transfer by + * transfer ID. **`status` values:** Terminal states are `COMPLETED` and * `FAILED`. Intermediate states are `PROCESSING` and `PENDING`. * **Do not** poll for `SUCCESS` — it is not a valid terminal state. Weight(IP): 200 * Security Type: USER_DATA @@ -748,8 +753,8 @@ public ApiResponse queryTransferList( * * * @see Query - * Transfer Status Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-status">Query + * Transfer Status (USER_DATA) Documentation */ public ApiResponse queryTransferStatus( String transferId, Long recvWindow) throws ApiException { @@ -757,9 +762,9 @@ public ApiResponse queryTransferStatus( } /** - * Get Portfolio Get the authenticated user's prediction portfolio overview including active - * positions count, aggregated PnL, and full position list. Weight(IP): 200 Security Type: - * USER_DATA + * Get Portfolio (USER_DATA) Get the authenticated user's prediction portfolio overview + * including active positions count, aggregated PnL, and full position list. Weight(IP): 200 + * Security Type: USER_DATA * * @param walletAddress User's prediction wallet address (required) * @param tokenId Filter by prediction token ID (optional) @@ -778,8 +783,8 @@ public ApiResponse queryTransferStatus( * * * @see Get - * Portfolio Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-portfolio">Get + * Portfolio (USER_DATA) Documentation */ public ApiResponse getPortfolio( String walletAddress, @@ -794,8 +799,8 @@ public ApiResponse getPortfolio( } /** - * Get Quota Status Query the current user's daily trading quota limit and remaining - * allowance for prediction markets. Weight(IP): 200 Security Type: USER_DATA + * Get Quota Status (USER_DATA) Query the current user's daily trading quota limit and + * remaining allowance for prediction markets. Weight(IP): 200 Security Type: USER_DATA * * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetQuotaStatusResponse> @@ -809,16 +814,16 @@ public ApiResponse getPortfolio( * * * @see Get - * Quota Status Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-quota-status">Get + * Quota Status (USER_DATA) Documentation */ public ApiResponse getQuotaStatus(Long recvWindow) throws ApiException { return walletApi.getQuotaStatus(recvWindow); } /** - * List Prediction Wallets Get all prediction wallets registered for the authenticated user. - * Weight(IP): 200 Security Type: USER_DATA + * List Prediction Wallets (USER_DATA) Get all prediction wallets registered for the + * authenticated user. Weight(IP): 200 Security Type: USER_DATA * * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<ListPredictionWalletsResponse> @@ -832,8 +837,8 @@ public ApiResponse getQuotaStatus(Long recvWindow) throw * * * @see List - * Prediction Wallets Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#list-prediction-wallets">List + * Prediction Wallets (USER_DATA) Documentation */ public ApiResponse listPredictionWallets(Long recvWindow) throws ApiException { @@ -841,8 +846,8 @@ public ApiResponse listPredictionWallets(Long rec } /** - * Query Payment Option Balances Get available balances for each payment option that can be used - * for prediction trading. Weight(IP): 200 Security Type: USER_DATA + * Query Payment Option Balances (USER_DATA) Get available balances for each payment option that + * can be used for prediction trading. Weight(IP): 200 Security Type: USER_DATA * * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QueryPaymentOptionBalancesResponse> @@ -856,8 +861,8 @@ public ApiResponse listPredictionWallets(Long rec * * * @see Query - * Payment Option Balances Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#query-payment-option-balances">Query + * Payment Option Balances (USER_DATA) Documentation */ public ApiResponse queryPaymentOptionBalances( Long recvWindow) throws ApiException { diff --git a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/WalletApi.java b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/WalletApi.java index 796f54aed..70b000d85 100644 --- a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/WalletApi.java +++ b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/WalletApi.java @@ -45,7 +45,7 @@ public class WalletApi { private static final String USER_AGENT = String.format( - "binance-w3w-prediction/1.0.0 (Java/%s; %s; %s)", + "binance-w3w-prediction/2.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -101,8 +101,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Get - * Portfolio Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-portfolio">Get + * Portfolio (USER_DATA) Documentation */ private okhttp3.Call getPortfolioCall( String walletAddress, @@ -242,9 +242,9 @@ private okhttp3.Call getPortfolioValidateBeforeCall( } /** - * Get Portfolio Get the authenticated user's prediction portfolio overview including active - * positions count, aggregated PnL, and full position list. Weight(IP): 200 Security Type: - * USER_DATA + * Get Portfolio (USER_DATA) Get the authenticated user's prediction portfolio overview + * including active positions count, aggregated PnL, and full position list. Weight(IP): 200 + * Security Type: USER_DATA * * @param walletAddress User's prediction wallet address (required) * @param tokenId Filter by prediction token ID (optional) @@ -263,8 +263,8 @@ private okhttp3.Call getPortfolioValidateBeforeCall( * * * @see Get - * Portfolio Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-portfolio">Get + * Portfolio (USER_DATA) Documentation */ public ApiResponse getPortfolio( @NotNull String walletAddress, @@ -296,8 +296,8 @@ public ApiResponse getPortfolio( * * * @see Get - * Quota Status Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-quota-status">Get + * Quota Status (USER_DATA) Documentation */ private okhttp3.Call getQuotaStatusCall(Long recvWindow) throws ApiException { String basePath = null; @@ -389,8 +389,8 @@ private okhttp3.Call getQuotaStatusValidateBeforeCall(Long recvWindow) throws Ap } /** - * Get Quota Status Query the current user's daily trading quota limit and remaining - * allowance for prediction markets. Weight(IP): 200 Security Type: USER_DATA + * Get Quota Status (USER_DATA) Query the current user's daily trading quota limit and + * remaining allowance for prediction markets. Weight(IP): 200 Security Type: USER_DATA * * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetQuotaStatusResponse> @@ -404,8 +404,8 @@ private okhttp3.Call getQuotaStatusValidateBeforeCall(Long recvWindow) throws Ap * * * @see Get - * Quota Status Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-quota-status">Get + * Quota Status (USER_DATA) Documentation */ public ApiResponse getQuotaStatus(@Max(60000L) Long recvWindow) throws ApiException { @@ -429,8 +429,8 @@ public ApiResponse getQuotaStatus(@Max(60000L) Long recv * * * @see List - * Prediction Wallets Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#list-prediction-wallets">List + * Prediction Wallets (USER_DATA) Documentation */ private okhttp3.Call listPredictionWalletsCall(Long recvWindow) throws ApiException { String basePath = null; @@ -523,8 +523,8 @@ private okhttp3.Call listPredictionWalletsValidateBeforeCall(Long recvWindow) } /** - * List Prediction Wallets Get all prediction wallets registered for the authenticated user. - * Weight(IP): 200 Security Type: USER_DATA + * List Prediction Wallets (USER_DATA) Get all prediction wallets registered for the + * authenticated user. Weight(IP): 200 Security Type: USER_DATA * * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<ListPredictionWalletsResponse> @@ -538,8 +538,8 @@ private okhttp3.Call listPredictionWalletsValidateBeforeCall(Long recvWindow) * * * @see List - * Prediction Wallets Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#list-prediction-wallets">List + * Prediction Wallets (USER_DATA) Documentation */ public ApiResponse listPredictionWallets( @Max(60000L) Long recvWindow) throws ApiException { @@ -563,8 +563,8 @@ public ApiResponse listPredictionWallets( * * * @see Query - * Payment Option Balances Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#query-payment-option-balances">Query + * Payment Option Balances (USER_DATA) Documentation */ private okhttp3.Call queryPaymentOptionBalancesCall(Long recvWindow) throws ApiException { String basePath = null; @@ -657,8 +657,8 @@ private okhttp3.Call queryPaymentOptionBalancesValidateBeforeCall(Long recvWindo } /** - * Query Payment Option Balances Get available balances for each payment option that can be used - * for prediction trading. Weight(IP): 200 Security Type: USER_DATA + * Query Payment Option Balances (USER_DATA) Get available balances for each payment option that + * can be used for prediction trading. Weight(IP): 200 Security Type: USER_DATA * * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QueryPaymentOptionBalancesResponse> @@ -672,8 +672,8 @@ private okhttp3.Call queryPaymentOptionBalancesValidateBeforeCall(Long recvWindo * * * @see Query - * Payment Option Balances Documentation + * href="https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#query-payment-option-balances">Query + * Payment Option Balances (USER_DATA) Documentation */ public ApiResponse queryPaymentOptionBalances( @Max(60000L) Long recvWindow) throws ApiException { diff --git a/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/MarketDataApiTest.java b/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/MarketDataApiTest.java index 450c5c458..38af77dd1 100644 --- a/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/MarketDataApiTest.java +++ b/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/MarketDataApiTest.java @@ -32,6 +32,7 @@ import com.binance.connector.client.w3w_prediction.rest.model.QueryOrderBookResponse; import com.binance.connector.client.w3w_prediction.rest.model.SortBy; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -91,7 +92,7 @@ public void initApiClient() throws ApiException { * @throws ApiException if the Api call fails */ @Test - public void getMarketDetailTest() throws ApiException, CryptoException { + public void getMarketDetailTest() throws ApiException, CryptoException, IOException { Long marketTopicId = 4229564L; ApiResponse response = api.getMarketDetail(marketTopicId); @@ -102,7 +103,6 @@ public void getMarketDetailTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -120,7 +120,7 @@ public void getMarketDetailTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void listPredictionCategoriesTest() throws ApiException, CryptoException { + public void listPredictionCategoriesTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.listPredictionCategories(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -130,7 +130,6 @@ public void listPredictionCategoriesTest() throws ApiException, CryptoException ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -150,7 +149,7 @@ public void listPredictionCategoriesTest() throws ApiException, CryptoException * @throws ApiException if the Api call fails */ @Test - public void listPredictionMarketsTest() throws ApiException, CryptoException { + public void listPredictionMarketsTest() throws ApiException, CryptoException, IOException { String l1Category = "crypto"; String l2Category = "up-down"; SortBy sortBy = SortBy.RECOMMENDED; @@ -167,7 +166,6 @@ public void listPredictionMarketsTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -186,7 +184,7 @@ public void listPredictionMarketsTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void marketSearchTest() throws ApiException, CryptoException { + public void marketSearchTest() throws ApiException, CryptoException, IOException { String query = "BTC price"; Integer topK = 20; ApiResponse response = api.marketSearch(query, topK); @@ -198,7 +196,6 @@ public void marketSearchTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -215,7 +212,7 @@ public void marketSearchTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void queryLastTradePriceTest() throws ApiException, CryptoException { + public void queryLastTradePriceTest() throws ApiException, CryptoException, IOException { Long marketId = 5567895L; ApiResponse response = api.queryLastTradePrice(marketId); @@ -226,7 +223,6 @@ public void queryLastTradePriceTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -245,7 +241,7 @@ public void queryLastTradePriceTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void queryOrderBookTest() throws ApiException, CryptoException { + public void queryOrderBookTest() throws ApiException, CryptoException, IOException { String vendor = "predict_fun"; Long marketId = 5567895L; String tokenId = "112233"; @@ -259,7 +255,6 @@ public void queryOrderBookTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); diff --git a/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/PositionApiTest.java b/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/PositionApiTest.java index fe9484a81..5fc5a81bb 100644 --- a/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/PositionApiTest.java +++ b/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/PositionApiTest.java @@ -29,6 +29,7 @@ import com.binance.connector.client.w3w_prediction.rest.model.QueryPositionsResponse; import com.binance.connector.client.w3w_prediction.rest.model.QuerySettledPositionHistoryResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -80,7 +81,7 @@ public void initApiClient() throws ApiException { } /** - * Get Position by Token + * Get Position by Token (USER_DATA) * *

Get the authenticated user's position detail for a specific prediction token. * Weight(IP): 200 Security Type: USER_DATA @@ -88,7 +89,7 @@ public void initApiClient() throws ApiException { * @throws ApiException if the Api call fails */ @Test - public void getPositionByTokenTest() throws ApiException, CryptoException { + public void getPositionByTokenTest() throws ApiException, CryptoException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; String tokenId = "112233"; Long recvWindow = 5000L; @@ -102,7 +103,6 @@ public void getPositionByTokenTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -113,7 +113,7 @@ public void getPositionByTokenTest() throws ApiException, CryptoException { } /** - * Query PnL + * Query PnL (USER_DATA) * *

Query profit and loss records for the authenticated user's prediction positions. When * `tokenId` is provided, returns a single record in `pnl`; otherwise @@ -122,7 +122,7 @@ public void getPositionByTokenTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void queryPnLTest() throws ApiException, CryptoException { + public void queryPnLTest() throws ApiException, CryptoException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; String tokenId = "112233"; Long marketId = 5567895L; @@ -140,7 +140,6 @@ public void queryPnLTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -150,7 +149,7 @@ public void queryPnLTest() throws ApiException, CryptoException { } /** - * Query Positions + * Query Positions (USER_DATA) * *

Get the authenticated user's prediction token positions with portfolio summary and * tab-based filtering. Weight(IP): 200 Security Type: USER_DATA @@ -158,7 +157,7 @@ public void queryPnLTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void queryPositionsTest() throws ApiException, CryptoException { + public void queryPositionsTest() throws ApiException, CryptoException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; String tab = "ONGOING"; Integer offset = 0; @@ -174,7 +173,6 @@ public void queryPositionsTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -184,7 +182,7 @@ public void queryPositionsTest() throws ApiException, CryptoException { } /** - * Query Positions by Filter + * Query Positions by Filter (USER_DATA) * *

Get prediction positions filtered by wallet address and/or market topic ID. Both * parameters are optional. Weight(IP): 200 Security Type: USER_DATA @@ -192,7 +190,7 @@ public void queryPositionsTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void queryPositionsByFilterTest() throws ApiException, CryptoException { + public void queryPositionsByFilterTest() throws ApiException, CryptoException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; Long marketTopicId = 4229564L; Long recvWindow = 5000L; @@ -206,7 +204,6 @@ public void queryPositionsByFilterTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -218,7 +215,7 @@ public void queryPositionsByFilterTest() throws ApiException, CryptoException { } /** - * Query Settled Position History + * Query Settled Position History (USER_DATA) * *

Get the authenticated user's settled (resolved) prediction position history with * optional filters. Weight(IP): 200 Security Type: USER_DATA @@ -226,7 +223,8 @@ public void queryPositionsByFilterTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void querySettledPositionHistoryTest() throws ApiException, CryptoException { + public void querySettledPositionHistoryTest() + throws ApiException, CryptoException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; String l1Category = "crypto"; Integer result = 1; @@ -253,7 +251,6 @@ public void querySettledPositionHistoryTest() throws ApiException, CryptoExcepti ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); diff --git a/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/RedeemApiTest.java b/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/RedeemApiTest.java index 32ab1ed52..ffb006c72 100644 --- a/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/RedeemApiTest.java +++ b/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/RedeemApiTest.java @@ -28,6 +28,7 @@ import com.binance.connector.client.w3w_prediction.rest.model.GetRedeemStatusResponse; import com.binance.connector.client.w3w_prediction.rest.model.TokenIds; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -79,7 +80,7 @@ public void initApiClient() throws ApiException { } /** - * Batch Redeem + * Batch Redeem (TRADE) * *

Redeem one or more settled prediction tokens on-chain to claim winnings. Requires SAS * authorization. Weight(IP): 200 Security Type: TRADE @@ -87,7 +88,7 @@ public void initApiClient() throws ApiException { * @throws ApiException if the Api call fails */ @Test - public void batchRedeemTest() throws ApiException, CryptoException { + public void batchRedeemTest() throws ApiException, CryptoException, IOException { BatchRedeemRequest batchRedeemRequest = new BatchRedeemRequest(); batchRedeemRequest.walletAddress("0x12e32db8817e292508c34111cbc4b23340df542c"); batchRedeemRequest.walletId("5b5c1ec3be4e4416a5872b21c1ca5d20"); @@ -102,7 +103,6 @@ public void batchRedeemTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -112,7 +112,7 @@ public void batchRedeemTest() throws ApiException, CryptoException { } /** - * Get Redeem Status + * Get Redeem Status (USER_DATA) * *

Query the on-chain transaction status of a previously submitted redeem request. * Weight(IP): 200 Security Type: USER_DATA Response Notes: - Status values: | Value | @@ -124,7 +124,7 @@ public void batchRedeemTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void getRedeemStatusTest() throws ApiException, CryptoException { + public void getRedeemStatusTest() throws ApiException, CryptoException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; String txHash = "0xabc123def456789abcdef123456789abcdef123456789abcdef123456789abcd"; Long recvWindow = 5000L; @@ -138,7 +138,6 @@ public void getRedeemStatusTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); diff --git a/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/TradeApiTest.java b/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/TradeApiTest.java index f89a1db7f..4aa26a670 100644 --- a/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/TradeApiTest.java +++ b/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/TradeApiTest.java @@ -36,6 +36,7 @@ import com.binance.connector.client.w3w_prediction.rest.model.Side; import com.binance.connector.client.w3w_prediction.rest.model.TradeSide; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -87,7 +88,7 @@ public void initApiClient() throws ApiException { } /** - * Batch Cancel Orders + * Batch Cancel Orders (TRADE) * *

Cancel one or more active prediction orders in a single request. Requires SAS * authorization. **Known Issue — Bracket Encoding Incompatibility:** This endpoint uses indexed @@ -110,7 +111,7 @@ public void initApiClient() throws ApiException { * @throws ApiException if the Api call fails */ @Test - public void batchCancelOrdersTest() throws ApiException, CryptoException { + public void batchCancelOrdersTest() throws ApiException, CryptoException, IOException { BatchCancelOrdersRequest batchCancelOrdersRequest = new BatchCancelOrdersRequest(); batchCancelOrdersRequest.walletAddress("0x12e32db8817e292508c34111cbc4b23340df542c"); batchCancelOrdersRequest.walletId("5b5c1ec3be4e4416a5872b21c1ca5d20"); @@ -135,7 +136,7 @@ public void batchCancelOrdersTest() throws ApiException, CryptoException { } /** - * Get Quote + * Get Quote (TRADE) * *

Get a price quote for a prediction order. The returned `quoteId` must be used in * the subsequent Place Order request. Weight(IP): 200 Security Type: TRADE Response Notes: - @@ -151,7 +152,7 @@ public void batchCancelOrdersTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void getQuoteTest() throws ApiException, CryptoException { + public void getQuoteTest() throws ApiException, CryptoException, IOException { GetQuoteRequest getQuoteRequest = new GetQuoteRequest(); getQuoteRequest.walletAddress("0x12e32db8817e292508c34111cbc4b23340df542c"); getQuoteRequest.tokenId("112233"); @@ -169,7 +170,6 @@ public void getQuoteTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -179,7 +179,7 @@ public void getQuoteTest() throws ApiException, CryptoException { } /** - * Place Order + * Place Order (TRADE) * *

Place a prediction order using a previously obtained quote. Requires SAS authorization. * Weight(IP): 200 Security Type: TRADE Notes: - Validation rules: | orderType | timeInForce | @@ -190,7 +190,7 @@ public void getQuoteTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void placeOrderTest() throws ApiException, CryptoException { + public void placeOrderTest() throws ApiException, CryptoException, IOException { PlaceOrderRequest placeOrderRequest = new PlaceOrderRequest(); placeOrderRequest.walletAddress("0x12e32db8817e292508c34111cbc4b23340df542c"); placeOrderRequest.walletId("5b5c1ec3be4e4416a5872b21c1ca5d20"); @@ -209,7 +209,6 @@ public void placeOrderTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -219,7 +218,7 @@ public void placeOrderTest() throws ApiException, CryptoException { } /** - * Query Active Orders + * Query Active Orders (USER_DATA) * *

Get active (open) prediction orders for the authenticated user. Weight(IP): 200 Security * Type: USER_DATA @@ -227,7 +226,7 @@ public void placeOrderTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void queryActiveOrdersTest() throws ApiException, CryptoException { + public void queryActiveOrdersTest() throws ApiException, CryptoException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; TradeSide tradeSide = TradeSide.BUY; String l1Category = "crypto"; @@ -246,7 +245,6 @@ public void queryActiveOrdersTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -257,7 +255,7 @@ public void queryActiveOrdersTest() throws ApiException, CryptoException { } /** - * Query Order History + * Query Order History (USER_DATA) * *

Get historical prediction orders (all statuses) for the authenticated user, with optional * filters. Weight(IP): 200 Security Type: USER_DATA @@ -265,7 +263,7 @@ public void queryActiveOrdersTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void queryOrderHistoryTest() throws ApiException, CryptoException { + public void queryOrderHistoryTest() throws ApiException, CryptoException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; String l1Category = "crypto"; OrderType orderType = OrderType.MARKET; @@ -294,7 +292,6 @@ public void queryOrderHistoryTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); diff --git a/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/TransferApiTest.java b/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/TransferApiTest.java index 9b611d3f8..0904f5c13 100644 --- a/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/TransferApiTest.java +++ b/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/TransferApiTest.java @@ -33,6 +33,7 @@ import com.binance.connector.client.w3w_prediction.rest.model.QueryTransferStatusResponse; import com.binance.connector.client.w3w_prediction.rest.model.SourceBiz; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -84,7 +85,7 @@ public void initApiClient() throws ApiException { } /** - * Create Inbound Transfer + * Create Inbound Transfer (TRADE) * *

Transfer funds from the prediction wallet back to the user's CEX account (SPOT or * FUNDING). Requires SAS authorization. ⚠️ **SAS Authorization Required:** This endpoint @@ -95,7 +96,7 @@ public void initApiClient() throws ApiException { * @throws ApiException if the Api call fails */ @Test - public void createInboundTransferTest() throws ApiException, CryptoException { + public void createInboundTransferTest() throws ApiException, CryptoException, IOException { CreateInboundTransferRequest createInboundTransferRequest = new CreateInboundTransferRequest(); createInboundTransferRequest.walletId("5b5c1ec3be4e4416a5872b21c1ca5d20"); @@ -113,7 +114,6 @@ public void createInboundTransferTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -125,7 +125,7 @@ public void createInboundTransferTest() throws ApiException, CryptoException { } /** - * Create Outbound Transfer + * Create Outbound Transfer (TRADE) * *

Transfer funds from the user's CEX account (SPOT or FUNDING) into the prediction * wallet. Requires SAS authorization. Weight(IP): 200 Security Type: TRADE @@ -133,7 +133,7 @@ public void createInboundTransferTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void createOutboundTransferTest() throws ApiException, CryptoException { + public void createOutboundTransferTest() throws ApiException, CryptoException, IOException { CreateOutboundTransferRequest createOutboundTransferRequest = new CreateOutboundTransferRequest(); createOutboundTransferRequest.walletId("5b5c1ec3be4e4416a5872b21c1ca5d20"); @@ -152,7 +152,6 @@ public void createOutboundTransferTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -164,7 +163,7 @@ public void createOutboundTransferTest() throws ApiException, CryptoException { } /** - * Query Transfer List + * Query Transfer List (USER_DATA) * *

Get the authenticated user's prediction wallet transfer history within a date range. * Weight(IP): 200 Security Type: USER_DATA @@ -172,7 +171,7 @@ public void createOutboundTransferTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void queryTransferListTest() throws ApiException, CryptoException { + public void queryTransferListTest() throws ApiException, CryptoException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; String startDate = "2026-05-01"; String endDate = "2026-05-25"; @@ -199,7 +198,6 @@ public void queryTransferListTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -210,7 +208,7 @@ public void queryTransferListTest() throws ApiException, CryptoException { } /** - * Query Transfer Status + * Query Transfer Status (USER_DATA) * *

Query the current status of a prediction wallet transfer by transfer ID. * **`status` values:** Terminal states are `COMPLETED` and @@ -221,7 +219,7 @@ public void queryTransferListTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void queryTransferStatusTest() throws ApiException, CryptoException { + public void queryTransferStatusTest() throws ApiException, CryptoException, IOException { String transferId = "tf_20260525_out_001"; Long recvWindow = 5000L; ApiResponse response = @@ -234,7 +232,6 @@ public void queryTransferStatusTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); diff --git a/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/WalletApiTest.java b/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/WalletApiTest.java index 6bff5440c..f3dc15529 100644 --- a/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/WalletApiTest.java +++ b/clients/w3w-prediction/src/test/java/com/binance/connector/client/w3w_prediction/rest/api/WalletApiTest.java @@ -28,6 +28,7 @@ import com.binance.connector.client.w3w_prediction.rest.model.ListPredictionWalletsResponse; import com.binance.connector.client.w3w_prediction.rest.model.QueryPaymentOptionBalancesResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -79,7 +80,7 @@ public void initApiClient() throws ApiException { } /** - * Get Portfolio + * Get Portfolio (USER_DATA) * *

Get the authenticated user's prediction portfolio overview including active positions * count, aggregated PnL, and full position list. Weight(IP): 200 Security Type: USER_DATA @@ -87,7 +88,7 @@ public void initApiClient() throws ApiException { * @throws ApiException if the Api call fails */ @Test - public void getPortfolioTest() throws ApiException, CryptoException { + public void getPortfolioTest() throws ApiException, CryptoException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; String tokenId = "112233"; Long marketId = 5567895L; @@ -105,7 +106,6 @@ public void getPortfolioTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -115,7 +115,7 @@ public void getPortfolioTest() throws ApiException, CryptoException { } /** - * Get Quota Status + * Get Quota Status (USER_DATA) * *

Query the current user's daily trading quota limit and remaining allowance for * prediction markets. Weight(IP): 200 Security Type: USER_DATA @@ -123,7 +123,7 @@ public void getPortfolioTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void getQuotaStatusTest() throws ApiException, CryptoException { + public void getQuotaStatusTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getQuotaStatus(recvWindow); @@ -134,7 +134,6 @@ public void getQuotaStatusTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -144,7 +143,7 @@ public void getQuotaStatusTest() throws ApiException, CryptoException { } /** - * List Prediction Wallets + * List Prediction Wallets (USER_DATA) * *

Get all prediction wallets registered for the authenticated user. Weight(IP): 200 Security * Type: USER_DATA @@ -152,7 +151,7 @@ public void getQuotaStatusTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void listPredictionWalletsTest() throws ApiException, CryptoException { + public void listPredictionWalletsTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.listPredictionWallets(recvWindow); @@ -163,7 +162,6 @@ public void listPredictionWalletsTest() throws ApiException, CryptoException { ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); @@ -175,7 +173,7 @@ public void listPredictionWalletsTest() throws ApiException, CryptoException { } /** - * Query Payment Option Balances + * Query Payment Option Balances (USER_DATA) * *

Get available balances for each payment option that can be used for prediction trading. * Weight(IP): 200 Security Type: USER_DATA @@ -183,7 +181,7 @@ public void listPredictionWalletsTest() throws ApiException, CryptoException { * @throws ApiException if the Api call fails */ @Test - public void queryPaymentOptionBalancesTest() throws ApiException, CryptoException { + public void queryPaymentOptionBalancesTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.queryPaymentOptionBalances(recvWindow); @@ -195,7 +193,6 @@ public void queryPaymentOptionBalancesTest() throws ApiException, CryptoExceptio ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); diff --git a/clients/wallet/CHANGELOG.md b/clients/wallet/CHANGELOG.md index 4c73faac7..c4ef76d75 100644 --- a/clients/wallet/CHANGELOG.md +++ b/clients/wallet/CHANGELOG.md @@ -1,5 +1,71 @@ # Changelog +## 6.0.0 - 2026-07-29 + +### Changed (13) + +- Added parameter `recvWindow` + - affected methods: + - `getCountryList()` (`GET /sapi/v1/localentity/country/list`) + - `getRegionList()` (`GET /sapi/v1/localentity/region/list`) +- Deleted parameter `signature` + - affected methods: + - `submitDepositQuestionnaire()` (`PUT /sapi/v1/localentity/broker/deposit/provide-info`) + - `brokerWithdraw()` (`POST /sapi/v1/localentity/broker/withdraw/apply`) +- Modified parameter `accountType`: + - enum added: `SPOT`, `MARGIN` + - affected methods: + - `dustlog()` (`GET /sapi/v1/asset/dribblet`) + - `dustTransfer()` (`POST /sapi/v1/asset/dust`) + - `getAssetsThatCanBeConvertedIntoBnb()` (`POST /sapi/v1/asset/dust-btc`) +- Modified parameter `depositId`: + - type `string` → `integer` + - affected methods: + - `depositHistoryV2()` (`GET /sapi/v2/localentity/deposit/history`) +- Modified parameter `fromSymbol`: + - enum added: `ISOLATEDMARGIN_MARGIN`, `ISOLATEDMARGIN_ISOLATEDMARGIN` + - affected methods: + - `queryUserUniversalTransferHistory()` (`GET /sapi/v1/asset/transfer`) + - `userUniversalTransfer()` (`POST /sapi/v1/asset/transfer`) +- Modified parameter `needBtcValuation`: + - type `string` → `boolean` + - affected methods: + - `fundingWallet()` (`POST /sapi/v1/asset/get-funding-asset`) +- Modified parameter `status`: + - enum added: `0`, `1`, `2`, `6`, `7`, `8` + - affected methods: + - `depositHistory()` (`GET /sapi/v1/capital/deposit/hisrec`) +- Modified parameter `subAccountId`: + - type `integer` → `string` + - affected methods: + - `oneClickArrivalDepositApply()` (`POST /sapi/v1/capital/deposit/credit-apply`) +- Modified parameter `toSymbol`: + - enum added: `MARGIN_ISOLATEDMARGIN`, `ISOLATEDMARGIN_ISOLATEDMARGIN` + - affected methods: + - `queryUserUniversalTransferHistory()` (`GET /sapi/v1/asset/transfer`) + - `userUniversalTransfer()` (`POST /sapi/v1/asset/transfer`) +- Modified parameter `type`: + - enum added: `SPOT`, `MARGIN`, `FUTURES` + - affected methods: + - `dailyAccountSnapshot()` (`GET /sapi/v1/accountSnapshot`) +- Modified parameter `type`: + - enum added: `DELEGATE`, `UNDELEGATE` + - affected methods: + - `queryUserDelegationHistory()` (`GET /sapi/v1/asset/custody/transfer-history`) +- Modified parameter `type`: + - enum added: `MAIN_UMFUTURE`, `MAIN_CMFUTURE`, `MAIN_MARGIN`, `UMFUTURE_MAIN`, `UMFUTURE_MARGIN`, `CMFUTURE_MAIN`, `CMFUTURE_MARGIN`, `MARGIN_MAIN`, `MARGIN_UMFUTURE`, `MARGIN_CMFUTURE`, `ISOLATEDMARGIN_MARGIN`, `MARGIN_ISOLATEDMARGIN`, `ISOLATEDMARGIN_ISOLATEDMARGIN`, `MAIN_FUNDING`, `FUNDING_MAIN`, `FUNDING_UMFUTURE`, `UMFUTURE_FUNDING`, `MARGIN_FUNDING`, `FUNDING_MARGIN`, `FUNDING_CMFUTURE`, `CMFUTURE_FUNDING`, `MAIN_OPTION`, `OPTION_MAIN`, `UMFUTURE_OPTION`, `OPTION_UMFUTURE`, `MARGIN_OPTION`, `OPTION_MARGIN`, `FUNDING_OPTION`, `OPTION_FUNDING`, `MAIN_PORTFOLIO_MARGIN`, `PORTFOLIO_MARGIN_MAIN` + - affected methods: + - `userUniversalTransfer()` (`POST /sapi/v1/asset/transfer`) +- Modified response for `depositHistoryTravelRule()` (`GET /sapi/v1/localentity/deposit/history`): + - items: property `travelRuleStatusV2` added + - items: property `completeTime` added + - items: property `walletType` deleted + - items: property `unlockConfirm` deleted + - items: item property `travelRuleStatusV2` added + - items: item property `completeTime` added + - items: item property `walletType` deleted + - items: item property `unlockConfirm` deleted + ## 5.0.0 - 2026-06-30 ### Added (2) diff --git a/clients/wallet/docs/AccountApiTradingStatusResponse.md b/clients/wallet/docs/AccountAPITradingStatusResponse.md similarity index 100% rename from clients/wallet/docs/AccountApiTradingStatusResponse.md rename to clients/wallet/docs/AccountAPITradingStatusResponse.md diff --git a/clients/wallet/docs/AccountApiTradingStatusResponseData.md b/clients/wallet/docs/AccountAPITradingStatusResponseData.md similarity index 100% rename from clients/wallet/docs/AccountApiTradingStatusResponseData.md rename to clients/wallet/docs/AccountAPITradingStatusResponseData.md diff --git a/clients/wallet/docs/AccountApiTradingStatusResponseDataTriggerCondition.md b/clients/wallet/docs/AccountAPITradingStatusResponseDataTriggerCondition.md similarity index 100% rename from clients/wallet/docs/AccountApiTradingStatusResponseDataTriggerCondition.md rename to clients/wallet/docs/AccountAPITradingStatusResponseDataTriggerCondition.md diff --git a/clients/wallet/docs/AccountApi.md b/clients/wallet/docs/AccountApi.md index 1d1f19315..e58a38441 100644 --- a/clients/wallet/docs/AccountApi.md +++ b/clients/wallet/docs/AccountApi.md @@ -19,7 +19,7 @@ All URIs are relative to *https://api.binance.com* Account API Trading Status (USER_DATA) -Fetch account api trading status detail. Weight: 1 +Fetch account api trading status detail. Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -36,7 +36,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { AccountApiTradingStatusResponse result = apiInstance.accountApiTradingStatus(recvWindow); System.out.println(result); @@ -81,7 +81,7 @@ No authorization required Account info (USER_DATA) -Fetch account info detail. Weight: 1 +Fetch account info detail. Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -98,7 +98,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { AccountInfoResponse result = apiInstance.accountInfo(recvWindow); System.out.println(result); @@ -143,7 +143,7 @@ No authorization required Account Status (USER_DATA) -Fetch account status detail. Weight: 1 +Fetch account status detail. Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -160,7 +160,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { AccountStatusResponse result = apiInstance.accountStatus(recvWindow); System.out.println(result); @@ -205,7 +205,7 @@ No authorization required Daily Account Snapshot (USER_DATA) -Daily account snapshot * The query time period must be less then 30 days * Support query within the last one month only * If startTimeand endTime not sent, return records of the last 7 days by default Weight: 2400 +Daily account snapshot Weight(IP): 2400 Security Type: USER_DATA Notes: - The query time period must be less then 30 days - Support query within the last one month only - If startTimeand endTime not sent, return records of the last 7 days by default ### Example ```java @@ -222,11 +222,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - String type = "type_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | min 7, max 30, default 7 - Long recvWindow = 56L; // Long | + OrderType type = OrderType.fromValue("MAIN_UMFUTURE"); // OrderType | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long limit = 7L; // Long | + Long recvWindow = 5000L; // Long | try { DailyAccountSnapshotResponse result = apiInstance.dailyAccountSnapshot(type, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -245,10 +245,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **type** | **String**| | | +| **type** | [**OrderType**](.md)| | [enum: MAIN_UMFUTURE, MAIN_CMFUTURE, MAIN_MARGIN, UMFUTURE_MAIN, UMFUTURE_MARGIN, CMFUTURE_MAIN, CMFUTURE_MARGIN, MARGIN_MAIN, MARGIN_UMFUTURE, MARGIN_CMFUTURE, ISOLATEDMARGIN_MARGIN, MARGIN_ISOLATEDMARGIN, ISOLATEDMARGIN_ISOLATEDMARGIN, MAIN_FUNDING, FUNDING_MAIN, FUNDING_UMFUTURE, UMFUTURE_FUNDING, MARGIN_FUNDING, FUNDING_MARGIN, FUNDING_CMFUTURE, CMFUTURE_FUNDING, MAIN_OPTION, OPTION_MAIN, UMFUTURE_OPTION, OPTION_UMFUTURE, MARGIN_OPTION, OPTION_MARGIN, FUNDING_OPTION, OPTION_FUNDING, MAIN_PORTFOLIO_MARGIN, PORTFOLIO_MARGIN_MAIN] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **limit** | **Long**| min 7, max 30, default 7 | [optional] | +| **limit** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -275,7 +275,7 @@ No authorization required Disable Fast Withdraw Switch (USER_DATA) - Weight: 1 +Disable Fast Withdraw Switch Weight(IP): 1 Security Type: USER_DATA Notes: - This request will disable fastwithdraw switch under your account. You need to enable \"trade\" option for the api key which requests this endpoint. ### Example ```java @@ -310,7 +310,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **disableFastWithdrawSwitchRequest** | [**DisableFastWithdrawSwitchRequest**](DisableFastWithdrawSwitchRequest.md)| | | +| **disableFastWithdrawSwitchRequest** | [**DisableFastWithdrawSwitchRequest**](DisableFastWithdrawSwitchRequest.md)| | [optional] | ### Return type @@ -336,7 +336,7 @@ No authorization required Enable Fast Withdraw Switch (USER_DATA) -Enable Fast Withdraw Switch (USER_DATA) * This request will enable fastwithdraw switch under your account. <br></br> * When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee. Weight: 1 +Enable Fast Withdraw Switch (USER_DATA) Weight(IP): 1 Security Type: USER_DATA Notes: - This request will enable fastwithdraw switch under your account. You need to enable \"trade\" option for the api key which requests this endpoint. - When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee. ### Example ```java @@ -371,7 +371,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **enableFastWithdrawSwitchRequest** | [**EnableFastWithdrawSwitchRequest**](EnableFastWithdrawSwitchRequest.md)| | | +| **enableFastWithdrawSwitchRequest** | [**EnableFastWithdrawSwitchRequest**](EnableFastWithdrawSwitchRequest.md)| | [optional] | ### Return type @@ -397,7 +397,7 @@ No authorization required Get API Key Permission (USER_DATA) -Get API Key Permission Weight: 1 +Get API Key Permission Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -414,7 +414,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AccountApi apiInstance = new AccountApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { GetApiKeyPermissionResponse result = apiInstance.getApiKeyPermission(recvWindow); System.out.println(result); diff --git a/clients/wallet/docs/AccountType.md b/clients/wallet/docs/AccountType.md new file mode 100644 index 000000000..4033d6efc --- /dev/null +++ b/clients/wallet/docs/AccountType.md @@ -0,0 +1,13 @@ + + +# AccountType + +## Enum + + +* `SPOT` (value: `"SPOT"`) + +* `MARGIN` (value: `"MARGIN"`) + + + diff --git a/clients/wallet/docs/AssetApi.md b/clients/wallet/docs/AssetApi.md index a1e5c83a2..2b3ce8685 100644 --- a/clients/wallet/docs/AssetApi.md +++ b/clients/wallet/docs/AssetApi.md @@ -9,13 +9,13 @@ All URIs are relative to *https://api.binance.com* | [**dustConvert**](AssetApi.md#dustConvert) | **POST** /sapi/v1/asset/dust-convert/convert | Dust Convert (USER_DATA) | | [**dustConvertibleAssets**](AssetApi.md#dustConvertibleAssets) | **POST** /sapi/v1/asset/dust-convert/query-convertible-assets | Dust Convertible Assets (USER_DATA) | | [**dustTransfer**](AssetApi.md#dustTransfer) | **POST** /sapi/v1/asset/dust | Dust Transfer (USER_DATA) | -| [**dustlog**](AssetApi.md#dustlog) | **GET** /sapi/v1/asset/dribblet | DustLog(USER_DATA) | +| [**dustlog**](AssetApi.md#dustlog) | **GET** /sapi/v1/asset/dribblet | DustLog (USER_DATA) | | [**fundingWallet**](AssetApi.md#fundingWallet) | **POST** /sapi/v1/asset/get-funding-asset | Funding Wallet (USER_DATA) | | [**getAssetsThatCanBeConvertedIntoBnb**](AssetApi.md#getAssetsThatCanBeConvertedIntoBnb) | **POST** /sapi/v1/asset/dust-btc | Get Assets That Can Be Converted Into BNB (USER_DATA) | | [**getCloudMiningPaymentAndRefundHistory**](AssetApi.md#getCloudMiningPaymentAndRefundHistory) | **GET** /sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage | Get Cloud-Mining payment and refund history (USER_DATA) | | [**getOpenSymbolList**](AssetApi.md#getOpenSymbolList) | **GET** /sapi/v1/spot/open-symbol-list | Get Open Symbol List (MARKET_DATA) | -| [**queryUserDelegationHistory**](AssetApi.md#queryUserDelegationHistory) | **GET** /sapi/v1/asset/custody/transfer-history | Query User Delegation History(For Master Account)(USER_DATA) | -| [**queryUserUniversalTransferHistory**](AssetApi.md#queryUserUniversalTransferHistory) | **GET** /sapi/v1/asset/transfer | Query User Universal Transfer History(USER_DATA) | +| [**queryUserDelegationHistory**](AssetApi.md#queryUserDelegationHistory) | **GET** /sapi/v1/asset/custody/transfer-history | Query User Delegation History(For Master Account) (USER_DATA) | +| [**queryUserUniversalTransferHistory**](AssetApi.md#queryUserUniversalTransferHistory) | **GET** /sapi/v1/asset/transfer | Query User Universal Transfer History (USER_DATA) | | [**queryUserWalletBalance**](AssetApi.md#queryUserWalletBalance) | **GET** /sapi/v1/asset/wallet/balance | Query User Wallet Balance (USER_DATA) | | [**toggleBnbBurnOnSpotTradeAndMarginInterest**](AssetApi.md#toggleBnbBurnOnSpotTradeAndMarginInterest) | **POST** /sapi/v1/bnbBurn | Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) | | [**tradeFee**](AssetApi.md#tradeFee) | **GET** /sapi/v1/asset/tradeFee | Trade Fee (USER_DATA) | @@ -29,7 +29,7 @@ All URIs are relative to *https://api.binance.com* Asset Detail (USER_DATA) -Fetch details of assets supported on Binance. * Please get network and other deposit or withdraw details from ``GET /sapi/v1/capital/config/getall``. Weight: 1 +Fetch details of assets supported on Binance. Weight(IP): 1 Security Type: USER_DATA Notes: - Please get network and other deposit or withdraw details from `GET /sapi/v1/capital/config/getall`. ### Example ```java @@ -46,8 +46,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetApi apiInstance = new AssetApi(defaultClient); - String asset = "asset_example"; // String | - Long recvWindow = 56L; // Long | + String asset = "BTC"; // String | + Long recvWindow = 5000L; // Long | try { AssetDetailResponse result = apiInstance.assetDetail(asset, recvWindow); System.out.println(result); @@ -93,7 +93,7 @@ No authorization required Asset Dividend Record (USER_DATA) -Query asset dividend record. * There cannot be more than 180 days between parameter `startTime` and `endTime`. Weight: 10 +Query asset dividend record. Weight(IP): 10 Security Type: USER_DATA Notes: - There cannot be more than 180 days between parameter `startTime` and `endTime`. ### Example ```java @@ -110,11 +110,11 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetApi apiInstance = new AssetApi(defaultClient); - String asset = "asset_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | min 7, max 30, default 7 - Long recvWindow = 56L; // Long | + String asset = "BTC"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long limit = 20L; // Long | + Long recvWindow = 5000L; // Long | try { AssetDividendRecordResponse result = apiInstance.assetDividendRecord(asset, startTime, endTime, limit, recvWindow); System.out.println(result); @@ -136,7 +136,7 @@ public class Example { | **asset** | **String**| | [optional] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **limit** | **Long**| min 7, max 30, default 7 | [optional] | +| **limit** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -163,7 +163,7 @@ No authorization required Dust Convert (USER_DATA) -Convert dust assets Weight: 10 +Convert dust assets Weight(UID): 10 Security Type: USER_DATA ### Example ```java @@ -225,7 +225,7 @@ No authorization required Dust Convertible Assets (USER_DATA) -Query dust convertible assets Weight: 1 +Query dust convertible assets Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -287,7 +287,7 @@ No authorization required Dust Transfer (USER_DATA) -Convert dust assets to BNB. * You need to open`Enable Spot & Margin Trading` permission for the API Key which requests this endpoint. Weight: 10 +Convert dust assets to BNB. Weight(UID): 10 Security Type: USER_DATA Notes: - You need to open`Enable Spot & Margin Trading` permission for the API Key which requests this endpoint. ### Example ```java @@ -347,9 +347,9 @@ No authorization required # **dustlog** > DustlogResponse dustlog(accountType, startTime, endTime, recvWindow) -DustLog(USER_DATA) +DustLog (USER_DATA) -Dustlog * Only return last 100 records * Only return records after 2020/12/01 Weight: 1 +Dustlog Weight(IP): 1 Security Type: USER_DATA Notes: - Only return last 100 records - Only return records after 2020/12/01 ### Example ```java @@ -366,10 +366,10 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetApi apiInstance = new AssetApi(defaultClient); - String accountType = "accountType_example"; // String | `SPOT`or`MARGIN`,default`SPOT` - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long recvWindow = 56L; // Long | + AccountType accountType = AccountType.fromValue("SPOT"); // AccountType | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long recvWindow = 5000L; // Long | try { DustlogResponse result = apiInstance.dustlog(accountType, startTime, endTime, recvWindow); System.out.println(result); @@ -388,7 +388,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountType** | **String**| `SPOT`or`MARGIN`,default`SPOT` | [optional] | +| **accountType** | [**AccountType**](.md)| | [optional] [default to SPOT] [enum: SPOT, MARGIN] | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | @@ -417,7 +417,7 @@ No authorization required Funding Wallet (USER_DATA) -Query Funding Wallet * Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token Weight: 1 +Query Funding Wallet Weight(IP): 1 Security Type: USER_DATA Notes: - Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token ### Example ```java @@ -453,7 +453,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **fundingWalletRequest** | [**FundingWalletRequest**](FundingWalletRequest.md)| | | +| **fundingWalletRequest** | [**FundingWalletRequest**](FundingWalletRequest.md)| | [optional] | ### Return type @@ -479,7 +479,7 @@ No authorization required Get Assets That Can Be Converted Into BNB (USER_DATA) -Get Assets That Can Be Converted Into BNB Weight: 1 +Get Assets That Can Be Converted Into BNB Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -515,7 +515,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **getAssetsThatCanBeConvertedIntoBnbRequest** | [**GetAssetsThatCanBeConvertedIntoBnbRequest**](GetAssetsThatCanBeConvertedIntoBnbRequest.md)| | | +| **getAssetsThatCanBeConvertedIntoBnbRequest** | [**GetAssetsThatCanBeConvertedIntoBnbRequest**](GetAssetsThatCanBeConvertedIntoBnbRequest.md)| | [optional] | ### Return type @@ -541,7 +541,7 @@ No authorization required Get Cloud-Mining payment and refund history (USER_DATA) -The query of Cloud-Mining payment and refund history * Just return the SUCCESS records of payment and refund. * For response, type = 248 means payment, type = 249 means refund, status =S means SUCCESS. Weight: 600 +The query of Cloud-Mining payment and refund history Weight(UID): 600 Security Type: USER_DATA Notes: - Just return the SUCCESS records of payment and refund. - For response, type = 248 means payment, type = 249 means refund, status =S means SUCCESS. ### Example ```java @@ -558,13 +558,13 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetApi apiInstance = new AssetApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long tranId = 56L; // Long | The transaction id - String clientTranId = "clientTranId_example"; // String | The unique flag - String asset = "asset_example"; // String | - Long current = 56L; // Long | current page, default 1, the min value is 1 - Long size = 56L; // Long | page size, default 10, the max value is 100 + Long startTime = 1623319461670L; // Long | inclusive, unit: ms + Long endTime = 1641782889000L; // Long | exclusive, unit: ms + Long tranId = 1L; // Long | The transaction id + String clientTranId = "1"; // String | The unique flag + String asset = "BTC"; // String | If it is blank, we will query all assets + Long current = 1L; // Long | + Long size = 10L; // Long | try { GetCloudMiningPaymentAndRefundHistoryResponse result = apiInstance.getCloudMiningPaymentAndRefundHistory(startTime, endTime, tranId, clientTranId, asset, current, size); System.out.println(result); @@ -583,13 +583,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **startTime** | **Long**| | | -| **endTime** | **Long**| | | +| **startTime** | **Long**| inclusive, unit: ms | | +| **endTime** | **Long**| exclusive, unit: ms | | | **tranId** | **Long**| The transaction id | [optional] | | **clientTranId** | **String**| The unique flag | [optional] | -| **asset** | **String**| | [optional] | -| **current** | **Long**| current page, default 1, the min value is 1 | [optional] | -| **size** | **Long**| page size, default 10, the max value is 100 | [optional] | +| **asset** | **String**| If it is blank, we will query all assets | [optional] | +| **current** | **Long**| | [optional] | +| **size** | **Long**| | [optional] | ### Return type @@ -615,7 +615,7 @@ No authorization required Get Open Symbol List (MARKET_DATA) -Get the list of symbols that are scheduled to be opened for trading in the market. Weight: 100 +Get the list of symbols that are scheduled to be opened for trading in the market. Weight(IP): 100 Security Type: MARKET_DATA ### Example ```java @@ -671,9 +671,9 @@ No authorization required # **queryUserDelegationHistory** > QueryUserDelegationHistoryResponse queryUserDelegationHistory(email, startTime, endTime, type, asset, current, size, recvWindow) -Query User Delegation History(For Master Account)(USER_DATA) +Query User Delegation History(For Master Account) (USER_DATA) -Query User Delegation History Weight: 60 +Query User Delegation History Weight(IP): 60 Security Type: USER_DATA ### Example ```java @@ -690,14 +690,14 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetApi apiInstance = new AssetApi(defaultClient); - String email = "email_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - String type = "type_example"; // String | Delegate/Undelegate - String asset = "asset_example"; // String | - Long current = 56L; // Long | current page, default 1, the min value is 1 - Long size = 56L; // Long | page size, default 10, the max value is 100 - Long recvWindow = 56L; // Long | + String email = "abc@test.com"; // String | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + OrderType type = OrderType.fromValue("MAIN_UMFUTURE"); // OrderType | + String asset = "BTC"; // String | + Long current = 1L; // Long | + Long size = 10L; // Long | + Long recvWindow = 5000L; // Long | try { QueryUserDelegationHistoryResponse result = apiInstance.queryUserDelegationHistory(email, startTime, endTime, type, asset, current, size, recvWindow); System.out.println(result); @@ -719,10 +719,10 @@ public class Example { | **email** | **String**| | | | **startTime** | **Long**| | | | **endTime** | **Long**| | | -| **type** | **String**| Delegate/Undelegate | [optional] | +| **type** | [**OrderType**](.md)| | [optional] [enum: MAIN_UMFUTURE, MAIN_CMFUTURE, MAIN_MARGIN, UMFUTURE_MAIN, UMFUTURE_MARGIN, CMFUTURE_MAIN, CMFUTURE_MARGIN, MARGIN_MAIN, MARGIN_UMFUTURE, MARGIN_CMFUTURE, ISOLATEDMARGIN_MARGIN, MARGIN_ISOLATEDMARGIN, ISOLATEDMARGIN_ISOLATEDMARGIN, MAIN_FUNDING, FUNDING_MAIN, FUNDING_UMFUTURE, UMFUTURE_FUNDING, MARGIN_FUNDING, FUNDING_MARGIN, FUNDING_CMFUTURE, CMFUTURE_FUNDING, MAIN_OPTION, OPTION_MAIN, UMFUTURE_OPTION, OPTION_UMFUTURE, MARGIN_OPTION, OPTION_MARGIN, FUNDING_OPTION, OPTION_FUNDING, MAIN_PORTFOLIO_MARGIN, PORTFOLIO_MARGIN_MAIN] | | **asset** | **String**| | [optional] | -| **current** | **Long**| current page, default 1, the min value is 1 | [optional] | -| **size** | **Long**| page size, default 10, the max value is 100 | [optional] | +| **current** | **Long**| | [optional] | +| **size** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -747,9 +747,9 @@ No authorization required # **queryUserUniversalTransferHistory** > QueryUserUniversalTransferHistoryResponse queryUserUniversalTransferHistory(type, startTime, endTime, current, size, fromSymbol, toSymbol, recvWindow) -Query User Universal Transfer History(USER_DATA) +Query User Universal Transfer History (USER_DATA) -Query User Universal Transfer History * `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN * `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN * Support query within the last 6 months only * If `startTime`and `endTime` not sent, return records of the last 7 days by default Weight: 1 +Query User Universal Transfer History Weight(IP): 1 Security Type: USER_DATA Notes: - `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - Support query within the last 6 months only - If `startTime`and `endTime` not sent, return records of the last 7 days by default ### Example ```java @@ -767,13 +767,13 @@ public class Example { AssetApi apiInstance = new AssetApi(defaultClient); String type = "type_example"; // String | - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long current = 56L; // Long | current page, default 1, the min value is 1 - Long size = 56L; // Long | page size, default 10, the max value is 100 - String fromSymbol = "fromSymbol_example"; // String | - String toSymbol = "toSymbol_example"; // String | - Long recvWindow = 56L; // Long | + Long startTime = 1623319461670L; // Long | + Long endTime = 1641782889000L; // Long | + Long current = 1L; // Long | + Long size = 10L; // Long | + FromSymbol fromSymbol = FromSymbol.fromValue("ISOLATEDMARGIN_MARGIN"); // FromSymbol | + ToSymbol toSymbol = ToSymbol.fromValue("MARGIN_ISOLATEDMARGIN"); // ToSymbol | + Long recvWindow = 5000L; // Long | try { QueryUserUniversalTransferHistoryResponse result = apiInstance.queryUserUniversalTransferHistory(type, startTime, endTime, current, size, fromSymbol, toSymbol, recvWindow); System.out.println(result); @@ -795,10 +795,10 @@ public class Example { | **type** | **String**| | | | **startTime** | **Long**| | [optional] | | **endTime** | **Long**| | [optional] | -| **current** | **Long**| current page, default 1, the min value is 1 | [optional] | -| **size** | **Long**| page size, default 10, the max value is 100 | [optional] | -| **fromSymbol** | **String**| | [optional] | -| **toSymbol** | **String**| | [optional] | +| **current** | **Long**| | [optional] | +| **size** | **Long**| | [optional] | +| **fromSymbol** | [**FromSymbol**](.md)| | [optional] [enum: ISOLATEDMARGIN_MARGIN, ISOLATEDMARGIN_ISOLATEDMARGIN] | +| **toSymbol** | [**ToSymbol**](.md)| | [optional] [enum: MARGIN_ISOLATEDMARGIN, ISOLATEDMARGIN_ISOLATEDMARGIN] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -825,7 +825,7 @@ No authorization required Query User Wallet Balance (USER_DATA) -Query User Wallet Balance Weight: 60 +Query User Wallet Balance Weight(IP): 60 Security Type: USER_DATA ### Example ```java @@ -842,8 +842,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetApi apiInstance = new AssetApi(defaultClient); - String quoteAsset = "quoteAsset_example"; // String | `USDT`, `ETH`, `USDC`, `BNB`, etc. default `BTC` - Long recvWindow = 56L; // Long | + String quoteAsset = "BTC"; // String | + Long recvWindow = 5000L; // Long | try { QueryUserWalletBalanceResponse result = apiInstance.queryUserWalletBalance(quoteAsset, recvWindow); System.out.println(result); @@ -862,7 +862,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **quoteAsset** | **String**| `USDT`, `ETH`, `USDC`, `BNB`, etc. default `BTC` | [optional] | +| **quoteAsset** | **String**| | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -889,7 +889,7 @@ No authorization required Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) -Toggle BNB Burn On Spot Trade And Margin Interest * \"spotBNBBurn\" and \"interestBNBBurn\" should be sent at least one. Weight: 1(IP) +Toggle BNB Burn On Spot Trade And Margin Interest Weight(IP): 1 Security Type: USER_DATA Notes: - \"spotBNBBurn\" and \"interestBNBBurn\" should be sent at least one. ### Example ```java @@ -925,7 +925,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **toggleBnbBurnOnSpotTradeAndMarginInterestRequest** | [**ToggleBnbBurnOnSpotTradeAndMarginInterestRequest**](ToggleBnbBurnOnSpotTradeAndMarginInterestRequest.md)| | | +| **toggleBnbBurnOnSpotTradeAndMarginInterestRequest** | [**ToggleBnbBurnOnSpotTradeAndMarginInterestRequest**](ToggleBnbBurnOnSpotTradeAndMarginInterestRequest.md)| | [optional] | ### Return type @@ -951,7 +951,7 @@ No authorization required Trade Fee (USER_DATA) -Fetch trade fee Weight: 1 +Fetch trade fee Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -968,8 +968,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetApi apiInstance = new AssetApi(defaultClient); - String symbol = "symbol_example"; // String | - Long recvWindow = 56L; // Long | + String symbol = "ADABNB"; // String | + Long recvWindow = 5000L; // Long | try { TradeFeeResponse result = apiInstance.tradeFee(symbol, recvWindow); System.out.println(result); @@ -1015,7 +1015,7 @@ No authorization required User Asset (USER_DATA) -Get user assets, just for positive data. * If asset is set, then return this asset, otherwise return all assets positive. * If needBtcValuation is set, then return btcValudation. Weight: 5 +Get user assets, just for positive data. Weight(IP): 5 Security Type: USER_DATA Notes: - If asset is set, then return this asset, otherwise return all assets positive. - If needBtcValuation is set, then return btcValudation. ### Example ```java @@ -1051,7 +1051,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **userAssetRequest** | [**UserAssetRequest**](UserAssetRequest.md)| | | +| **userAssetRequest** | [**UserAssetRequest**](UserAssetRequest.md)| | [optional] | ### Return type @@ -1077,7 +1077,7 @@ No authorization required User Universal Transfer (USER_DATA) -user universal transfer * `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN * `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN * ENUM of transfer types: * MAIN_UMFUTURE Spot account transfer to USDⓈ-M Futures account * MAIN_CMFUTURE Spot account transfer to COIN-M Futures account * MAIN_MARGIN Spot account transfer to Margin(cross)account * UMFUTURE_MAIN USDⓈ-M Futures account transfer to Spot account * UMFUTURE_MARGIN USDⓈ-M Futures account transfer to Margin(cross)account * CMFUTURE_MAIN COIN-M Futures account transfer to Spot account * CMFUTURE_MARGIN COIN-M Futures account transfer to Margin(cross) account * MARGIN_MAIN Margin(cross)account transfer to Spot account * MARGIN_UMFUTURE Margin(cross)account transfer to USDⓈ-M Futures * MARGIN_CMFUTURE Margin(cross)account transfer to COIN-M Futures * ISOLATEDMARGIN_MARGIN Isolated margin account transfer to Margin(cross) account * MARGIN_ISOLATEDMARGIN Margin(cross) account transfer to Isolated margin account * ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account transfer to Isolated margin account * MAIN_FUNDING Spot account transfer to Funding account * FUNDING_MAIN Funding account transfer to Spot account * FUNDING_UMFUTURE Funding account transfer to UMFUTURE account * UMFUTURE_FUNDING UMFUTURE account transfer to Funding account * MARGIN_FUNDING MARGIN account transfer to Funding account * FUNDING_MARGIN Funding account transfer to Margin account * FUNDING_CMFUTURE Funding account transfer to CMFUTURE account * CMFUTURE_FUNDING CMFUTURE account transfer to Funding account * MAIN_OPTION Spot account transfer to Options account * OPTION_MAIN Options account transfer to Spot account * UMFUTURE_OPTION USDⓈ-M Futures account transfer to Options account * OPTION_UMFUTURE Options account transfer to USDⓈ-M Futures account * MARGIN_OPTION Margin(cross)account transfer to Options account * OPTION_MARGIN Options account transfer to Margin(cross)account * FUNDING_OPTION Funding account transfer to Options account * OPTION_FUNDING Options account transfer to Funding account * MAIN_PORTFOLIO_MARGIN Spot account transfer to Portfolio Margin account * PORTFOLIO_MARGIN_MAIN Portfolio Margin account transfer to Spot account Weight: 900 +User universal transfer Weight(UID): 900 Security Type: USER_DATA Notes: - You need to enable Permits Universal Transfer option for the API Key that requests this endpoint. - `fromSymbol` must be sent when type is `ISOLATEDMARGIN_MARGIN` or `ISOLATEDMARGIN_ISOLATEDMARGIN`. - `toSymbol` must be sent when type is `MARGIN_ISOLATEDMARGIN` or `ISOLATEDMARGIN_ISOLATEDMARGIN`. - ENUM of transfer types: - `MAIN_UMFUTURE`: Spot → USDⓈ-M Futures - `MAIN_CMFUTURE`: Spot → COIN-M Futures - `MAIN_MARGIN`: Spot → Margin (cross) - `UMFUTURE_MAIN`: USDⓈ-M Futures → Spot - `UMFUTURE_MARGIN`: USDⓈ-M Futures → Margin (cross) - `CMFUTURE_MAIN`: COIN-M Futures → Spot - `CMFUTURE_MARGIN`: COIN-M Futures → Margin (cross) - `MARGIN_MAIN`: Margin (cross) → Spot - `MARGIN_UMFUTURE`: Margin (cross) → USDⓈ-M Futures - `MARGIN_CMFUTURE`: Margin (cross) → COIN-M Futures - `ISOLATEDMARGIN_MARGIN`: Isolated margin → Margin (cross) - `MARGIN_ISOLATEDMARGIN`: Margin (cross) → Isolated margin - `ISOLATEDMARGIN_ISOLATEDMARGIN`: Isolated margin → Isolated margin - `MAIN_FUNDING`: Spot → Funding - `FUNDING_MAIN`: Funding → Spot - `FUNDING_UMFUTURE`: Funding → USDⓈ-M Futures - `UMFUTURE_FUNDING`: USDⓈ-M Futures → Funding - `MARGIN_FUNDING`: Margin (cross) → Funding - `FUNDING_MARGIN`: Funding → Margin (cross) - `FUNDING_CMFUTURE`: Funding → COIN-M Futures - `CMFUTURE_FUNDING`: COIN-M Futures → Funding - `MAIN_OPTION`: Spot → Options - `OPTION_MAIN`: Options → Spot - `UMFUTURE_OPTION`: USDⓈ-M Futures → Options - `OPTION_UMFUTURE`: Options → USDⓈ-M Futures - `MARGIN_OPTION`: Margin (cross) → Options - `OPTION_MARGIN`: Options → Margin (cross) - `FUNDING_OPTION`: Funding → Options - `OPTION_FUNDING`: Options → Funding - `MAIN_PORTFOLIO_MARGIN`: Spot → Portfolio Margin - `PORTFOLIO_MARGIN_MAIN`: Portfolio Margin → Spot ### Example ```java diff --git a/clients/wallet/docs/BrokerWithdrawRequest.md b/clients/wallet/docs/BrokerWithdrawRequest.md index 96af875c8..8db5b31c1 100644 --- a/clients/wallet/docs/BrokerWithdrawRequest.md +++ b/clients/wallet/docs/BrokerWithdrawRequest.md @@ -8,17 +8,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**address** | **String** | | | -|**addressTag** | **String** | | [optional] | +|**addressTag** | **String** | Secondary address identifier for coins like XRP,XMR etc. | [optional] | |**network** | **String** | | [optional] | |**coin** | **String** | | | -|**addressName** | **String** | | [optional] | +|**addressName** | **String** | Description of the address. Address book cap is 200, space in name should be encoded into `%20` | [optional] | |**amount** | **Double** | | | -|**withdrawOrderId** | **String** | | | -|**transactionFeeFlag** | **Boolean** | | [optional] | -|**walletType** | **Long** | | [optional] | -|**questionnaire** | **String** | | | -|**originatorPii** | **String** | | | -|**signature** | **String** | | | +|**withdrawOrderId** | **String** | withdrawID defined by the client (i.e. client's internal withdrawID) | | +|**transactionFeeFlag** | **Boolean** | When making internal transfer, `true` for returning the fee to the destination account; `false` for returning the fee back to the departure account. Default `false`. | [optional] | +|**walletType** | **Long** | The wallet type for withdraw,0-spot wallet ,1-funding wallet. Default walletType is the current \"selected wallet\" under wallet->Fiat and Spot/Funding->Deposit | [optional] | +|**questionnaire** | **String** | JSON format questionnaire answers. | | +|**originatorPii** | **String** | JSON format originator Pii, see StandardPii section below | | diff --git a/clients/wallet/docs/CapitalApi.md b/clients/wallet/docs/CapitalApi.md index 89a2f35cc..717a9ec24 100644 --- a/clients/wallet/docs/CapitalApi.md +++ b/clients/wallet/docs/CapitalApi.md @@ -7,11 +7,11 @@ All URIs are relative to *https://api.binance.com* | [**allCoinsInformation**](CapitalApi.md#allCoinsInformation) | **GET** /sapi/v1/capital/config/getall | All Coins' Information (USER_DATA) | | [**depositAddress**](CapitalApi.md#depositAddress) | **GET** /sapi/v1/capital/deposit/address | Deposit Address(supporting network) (USER_DATA) | | [**depositHistory**](CapitalApi.md#depositHistory) | **GET** /sapi/v1/capital/deposit/hisrec | Deposit History (supporting network) (USER_DATA) | -| [**fetchDepositAddressListWithNetwork**](CapitalApi.md#fetchDepositAddressListWithNetwork) | **GET** /sapi/v1/capital/deposit/address/list | Fetch deposit address list with network(USER_DATA) | +| [**fetchDepositAddressListWithNetwork**](CapitalApi.md#fetchDepositAddressListWithNetwork) | **GET** /sapi/v1/capital/deposit/address/list | Fetch deposit address list with network (USER_DATA) | | [**fetchWithdrawAddressList**](CapitalApi.md#fetchWithdrawAddressList) | **GET** /sapi/v1/capital/withdraw/address/list | Fetch withdraw address list (USER_DATA) | | [**fetchWithdrawQuota**](CapitalApi.md#fetchWithdrawQuota) | **GET** /sapi/v1/capital/withdraw/quota | Fetch withdraw quota (USER_DATA) | | [**oneClickArrivalDepositApply**](CapitalApi.md#oneClickArrivalDepositApply) | **POST** /sapi/v1/capital/deposit/credit-apply | One click arrival deposit apply (for expired address deposit) (USER_DATA) | -| [**withdraw**](CapitalApi.md#withdraw) | **POST** /sapi/v1/capital/withdraw/apply | Withdraw(USER_DATA) | +| [**withdraw**](CapitalApi.md#withdraw) | **POST** /sapi/v1/capital/withdraw/apply | Withdraw (USER_DATA) | | [**withdrawHistory**](CapitalApi.md#withdrawHistory) | **GET** /sapi/v1/capital/withdraw/history | Withdraw History (supporting network) (USER_DATA) | @@ -21,7 +21,7 @@ All URIs are relative to *https://api.binance.com* All Coins' Information (USER_DATA) -Get information of coins (available for deposit and withdraw) for user. Weight: 10 +Get information of coins (available for deposit and withdraw) for user. Weight(IP): 10 Security Type: USER_DATA ### Example ```java @@ -38,7 +38,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); CapitalApi apiInstance = new CapitalApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { AllCoinsInformationResponse result = apiInstance.allCoinsInformation(recvWindow); System.out.println(result); @@ -83,7 +83,7 @@ No authorization required Deposit Address(supporting network) (USER_DATA) -Fetch deposit address with network. * If `network` is not send, return with default network of the coin. * You can get `network` and `isDefault` in `networkList` in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. * `amount` needs to be sent if using LIGHTNING network Weight: 10 +Fetch deposit address with network. Weight(IP): 10 Security Type: USER_DATA Notes: - If `network` is not send, return with default network of the coin. - You can get `network` and `isDefault` in `networkList` in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. - `amount` needs to be sent if using LIGHTNING network ### Example ```java @@ -100,10 +100,10 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); CapitalApi apiInstance = new CapitalApi(defaultClient); - String coin = "coin_example"; // String | `coin` refers to the parent network address format that the address is using + String coin = "BTC"; // String | `coin` refers to the parent network address format that the address is using String network = "network_example"; // String | - Double amount = 3.4D; // Double | - Long recvWindow = 56L; // Long | + Double amount = 1.0D; // Double | + Long recvWindow = 5000L; // Long | try { DepositAddressResponse result = apiInstance.depositAddress(coin, network, amount, recvWindow); System.out.println(result); @@ -151,7 +151,7 @@ No authorization required Deposit History (supporting network) (USER_DATA) -Fetch deposit history. * Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must be less than 90 days. Weight: 1 +Fetch deposit history. Weight(IP): 1 Security Type: USER_DATA Notes: - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 90 days. ### Example ```java @@ -168,15 +168,15 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); CapitalApi apiInstance = new CapitalApi(defaultClient); - Boolean includeSource = true; // Boolean | Default: `false`, return `sourceAddress`field when set to `true` - String coin = "coin_example"; // String | - Long status = 56L; // Long | 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed) - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long offset = 56L; // Long | Default: 0 - Long limit = 56L; // Long | min 7, max 30, default 7 - Long recvWindow = 56L; // Long | - String txId = "txId_example"; // String | + Boolean includeSource = false; // Boolean | return `sourceAddress` field when set to `true` + String coin = "BTC"; // String | + Status status = Status.fromValue("0"); // Status | 0: pending, 6: credited but cannot withdraw, 7: Wrong Deposit, 8: Waiting User confirm, 1: success + Long startTime = 1623319461670L; // Long | Default: 90 days from current timestamp + Long endTime = 1641782889000L; // Long | Default: present timestamp + Long offset = 0L; // Long | + Long limit = 1000L; // Long | + Long recvWindow = 5000L; // Long | + String txId = "1"; // String | try { DepositHistoryResponse result = apiInstance.depositHistory(includeSource, coin, status, startTime, endTime, offset, limit, recvWindow, txId); System.out.println(result); @@ -195,13 +195,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **includeSource** | **Boolean**| Default: `false`, return `sourceAddress`field when set to `true` | [optional] | +| **includeSource** | **Boolean**| return `sourceAddress` field when set to `true` | [optional] | | **coin** | **String**| | [optional] | -| **status** | **Long**| 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed) | [optional] | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **offset** | **Long**| Default: 0 | [optional] | -| **limit** | **Long**| min 7, max 30, default 7 | [optional] | +| **status** | [**Status**](.md)| 0: pending, 6: credited but cannot withdraw, 7: Wrong Deposit, 8: Waiting User confirm, 1: success | [optional] [enum: 0, 1, 2, 6, 7, 8] | +| **startTime** | **Long**| Default: 90 days from current timestamp | [optional] | +| **endTime** | **Long**| Default: present timestamp | [optional] | +| **offset** | **Long**| | [optional] | +| **limit** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | | **txId** | **String**| | [optional] | @@ -227,9 +227,9 @@ No authorization required # **fetchDepositAddressListWithNetwork** > FetchDepositAddressListWithNetworkResponse fetchDepositAddressListWithNetwork(coin, network) -Fetch deposit address list with network(USER_DATA) +Fetch deposit address list with network (USER_DATA) -Fetch deposit address list with network. * If network is not send, return with default network of the coin. * You can get network and isDefault in networkList in the response of `Get /sapi/v1/capital/config/getall`. Weight: 10 +Fetch deposit address list with network. Weight(IP): 10 Security Type: USER_DATA ### Example ```java @@ -246,8 +246,8 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); CapitalApi apiInstance = new CapitalApi(defaultClient); - String coin = "coin_example"; // String | `coin` refers to the parent network address format that the address is using - String network = "network_example"; // String | + String coin = "BTC"; // String | Coin name + String network = "network_example"; // String | If network is not send, return with default network of the coin. You can get network and isDefault in networkList in the response of `Get /sapi/v1/capital/config/getall` try { FetchDepositAddressListWithNetworkResponse result = apiInstance.fetchDepositAddressListWithNetwork(coin, network); System.out.println(result); @@ -266,8 +266,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **coin** | **String**| `coin` refers to the parent network address format that the address is using | | -| **network** | **String**| | [optional] | +| **coin** | **String**| Coin name | | +| **network** | **String**| If network is not send, return with default network of the coin. You can get network and isDefault in networkList in the response of `Get /sapi/v1/capital/config/getall` | [optional] | ### Return type @@ -293,7 +293,7 @@ No authorization required Fetch withdraw address list (USER_DATA) -Fetch withdraw address list Weight: 10 +Fetch withdraw address list Weight(IP): 10 Security Type: USER_DATA ### Example ```java @@ -351,7 +351,7 @@ No authorization required Fetch withdraw quota (USER_DATA) -Fetch withdraw quota Weight: 10 +Fetch withdraw quota Weight(IP): 10 Security Type: USER_DATA ### Example ```java @@ -409,7 +409,7 @@ No authorization required One click arrival deposit apply (for expired address deposit) (USER_DATA) -Apply deposit credit for expired address (One click arrival) * Params need to be in the POST body Weight: 1 +Apply deposit credit for expired address (One click arrival) Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -445,7 +445,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **oneClickArrivalDepositApplyRequest** | [**OneClickArrivalDepositApplyRequest**](OneClickArrivalDepositApplyRequest.md)| | | +| **oneClickArrivalDepositApplyRequest** | [**OneClickArrivalDepositApplyRequest**](OneClickArrivalDepositApplyRequest.md)| | [optional] | ### Return type @@ -469,9 +469,9 @@ No authorization required # **withdraw** > WithdrawResponse withdraw(withdrawRequest) -Withdraw(USER_DATA) +Withdraw (USER_DATA) -Submit a withdraw request. * If `network` not send, return with default network of the coin. * You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. * To check if travel rule is required, by using `GET /sapi/v1/localentity/questionnaire-requirements` and if it returns anything other than `NIL` you will need update SAPI to `POST /sapi/v1/localentity/withdraw/apply` else you can continue `POST /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to travel rule please refer to the Travel Rule SAPI. * For networks that do not support memo/tag, submitting a withdrawal request with a non-empty `addressTag` will return error `-4106 TAG_NOT_SUPPORTED_FOR_NETWORK`. Please omit the `addressTag` field for such networks. You can check whether a network requires a tag via `GET /sapi/v1/capital/config/getall`: * If `withdrawTag` = `true` → memo/tag is required. * If `withdrawTag` = `false` → memo/tag is not supported; omit `addressTag`. Weight: 900 +Submit a withdraw request Weight(UID): 900 Security Type: USER_DATA Notes: - If `network` not send, return with default network of the coin. - You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. - To check if travel rule is required, by using `GET /sapi/v1/localentity/questionnaire-requirements` and if it returns anything other than `NIL` you will need update SAPI to `POST /sapi/v1/localentity/withdraw/apply` else you can continue `POST /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to travel rule please refer to the Travel Rule SAPI. - \"For networks that do not support memo/tag, submitting a withdrawal request with a non-empty `addressTag` will return error `-4106 TAG_NOT_SUPPORTED_FOR_NETWORK`. Please omit the `addressTag` field for such networks. You can check whether a network requires a tag via `GET /sapi/v1/capital/config/getall`: If `withdrawTag` = `true` → memo/tag is required. If `withdrawTag` = `false` → memo/tag is not supported; omit `addressTag`.\" ### Example ```java @@ -533,7 +533,7 @@ No authorization required Withdraw History (supporting network) (USER_DATA) -Fetch withdraw history. * `network` may not be in the response for old withdraw. * Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less than 90 days. * If `withdrawOrderId` is sent, time between `startTime` and `endTime` must be less than 7 days. * If `withdrawOrderId` is sent, `startTime` and `endTime` are not sent, will return last 7 days records by default. * Maximum support `idList` number is 45. Weight: 18000 Request limit: 10 requests per second +Fetch withdraw history Weight(UID): 18000 (10 requests per second) Security Type: USER_DATA Notes: - `network` may not be in the response for old withdraw. - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less than 90 days. - If `withdrawOrderId` is sent, time between `startTime` and `endTime` must be less than 7 days. - If `withdrawOrderId` is sent, `startTime` and `endTime` are not sent, will return last 7 days records by default. - Maximum support `idList` number is 45. ### Example ```java @@ -550,15 +550,15 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); CapitalApi apiInstance = new CapitalApi(defaultClient); - String coin = "coin_example"; // String | - String withdrawOrderId = "withdrawOrderId_example"; // String | client side id for withdrawal, if provided in POST `/sapi/v1/capital/withdraw/apply`, can be used here for query. - Long status = 56L; // Long | 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed) - Long offset = 56L; // Long | Default: 0 - Long limit = 56L; // Long | min 7, max 30, default 7 + String coin = "BTC"; // String | + String withdrawOrderId = "1"; // String | client side id for withdrawal, if provided in POST `/sapi/v1/capital/withdraw/apply`, can be used here for query. + Long status = 0L; // Long | 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed) + Long offset = 0L; // Long | Default: 0 + Long limit = 1000L; // Long | String idList = "idList_example"; // String | id list returned in the response of POST `/sapi/v1/capital/withdraw/apply`, separated by `,` - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long recvWindow = 56L; // Long | + Long startTime = 1623319461670L; // Long | Default: 90 days from current timestamp + Long endTime = 1641782889000L; // Long | Default: present timestamp + Long recvWindow = 5000L; // Long | try { WithdrawHistoryResponse result = apiInstance.withdrawHistory(coin, withdrawOrderId, status, offset, limit, idList, startTime, endTime, recvWindow); System.out.println(result); @@ -581,10 +581,10 @@ public class Example { | **withdrawOrderId** | **String**| client side id for withdrawal, if provided in POST `/sapi/v1/capital/withdraw/apply`, can be used here for query. | [optional] | | **status** | **Long**| 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed) | [optional] | | **offset** | **Long**| Default: 0 | [optional] | -| **limit** | **Long**| min 7, max 30, default 7 | [optional] | +| **limit** | **Long**| | [optional] | | **idList** | **String**| id list returned in the response of POST `/sapi/v1/capital/withdraw/apply`, separated by `,` | [optional] | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | +| **startTime** | **Long**| Default: 90 days from current timestamp | [optional] | +| **endTime** | **Long**| Default: present timestamp | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type diff --git a/clients/wallet/docs/DepositHistoryTravelRuleResponseInner.md b/clients/wallet/docs/DepositHistoryTravelRuleResponseInner.md index 39f3c5441..ebece4c13 100644 --- a/clients/wallet/docs/DepositHistoryTravelRuleResponseInner.md +++ b/clients/wallet/docs/DepositHistoryTravelRuleResponseInner.md @@ -14,14 +14,14 @@ |**network** | **String** | | [optional] | |**depositStatus** | **Long** | | [optional] | |**travelRuleStatus** | **Long** | | [optional] | +|**travelRuleStatusV2** | **String** | Overall travel rule verification status (GTR + sanctions screening combined). \"PASSED\": verification complete, deposit released. \"PENDING\": verification in progress, deposit frozen. \"REJECTED\": verification failed. | [optional] | |**address** | **String** | | [optional] | |**addressTag** | **String** | | [optional] | |**txId** | **String** | | [optional] | |**insertTime** | **Long** | | [optional] | +|**completeTime** | **Long** | Timestamp when the deposit was fully completed/credited (epoch ms). | [optional] | |**transferType** | **Long** | | [optional] | |**confirmTimes** | **String** | | [optional] | -|**unlockConfirm** | **Long** | | [optional] | -|**walletType** | **Long** | | [optional] | |**requireQuestionnaire** | **Boolean** | | [optional] | |**questionnaire** | **String** | | [optional] | diff --git a/clients/wallet/docs/DustConvertRequest.md b/clients/wallet/docs/DustConvertRequest.md index fcdb16b39..95ee8a7d6 100644 --- a/clients/wallet/docs/DustConvertRequest.md +++ b/clients/wallet/docs/DustConvertRequest.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**asset** | **String** | | | -|**accountType** | **String** | | [optional] | -|**clientId** | **String** | | [optional] | +|**accountType** | **String** | `SPOT` or `MARGIN`, default `SPOT` | [optional] | +|**clientId** | **String** | A unique id for the request | [optional] | |**targetAsset** | **String** | | [optional] | |**thirdPartyClientId** | **String** | | [optional] | |**dustQuotaAssetToTargetAssetPrice** | **Double** | | [optional] | diff --git a/clients/wallet/docs/DustConvertibleAssetsRequest.md b/clients/wallet/docs/DustConvertibleAssetsRequest.md index 94c508978..fe5eb5a04 100644 --- a/clients/wallet/docs/DustConvertibleAssetsRequest.md +++ b/clients/wallet/docs/DustConvertibleAssetsRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**accountType** | **String** | | [optional] | +|**accountType** | **String** | `SPOT` or `MARGIN`, default `SPOT` | [optional] | |**targetAsset** | **String** | | | |**dustQuotaAssetToTargetAssetPrice** | **Double** | | [optional] | diff --git a/clients/wallet/docs/DustlogResponse.md b/clients/wallet/docs/DustLogResponse.md similarity index 100% rename from clients/wallet/docs/DustlogResponse.md rename to clients/wallet/docs/DustLogResponse.md diff --git a/clients/wallet/docs/DustlogResponseUserAssetDribbletsInner.md b/clients/wallet/docs/DustLogResponseUserAssetDribbletsInner.md similarity index 100% rename from clients/wallet/docs/DustlogResponseUserAssetDribbletsInner.md rename to clients/wallet/docs/DustLogResponseUserAssetDribbletsInner.md diff --git a/clients/wallet/docs/DustLogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.md b/clients/wallet/docs/DustLogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.md new file mode 100644 index 000000000..017a6f5a9 --- /dev/null +++ b/clients/wallet/docs/DustLogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.md @@ -0,0 +1,19 @@ + + +# DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**transId** | **Long** | | [optional] | +|**serviceChargeAmount** | **String** | | [optional] | +|**amount** | **String** | | [optional] | +|**operateTime** | **Long** | | [optional] | +|**transferedAmount** | **String** | | [optional] | +|**fromAsset** | **String** | | [optional] | +|**targetAsset** | **String** | | [optional] | + + + diff --git a/clients/wallet/docs/DustTransferRequest.md b/clients/wallet/docs/DustTransferRequest.md index c0fb06b4f..2f6ff0e8d 100644 --- a/clients/wallet/docs/DustTransferRequest.md +++ b/clients/wallet/docs/DustTransferRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | | -|**accountType** | **String** | | [optional] | +|**asset** | **String** | The asset being converted. For example: asset=BTC,USDT | | +|**accountType** | **AccountType** | | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/wallet/docs/DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.md b/clients/wallet/docs/DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.md deleted file mode 100644 index 1e5adacbc..000000000 --- a/clients/wallet/docs/DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**transId** | **Long** | | [optional] | -|**serviceChargeAmount** | **String** | | [optional] | -|**amount** | **String** | | [optional] | -|**operateTime** | **Long** | | [optional] | -|**transferedAmount** | **String** | | [optional] | -|**fromAsset** | **String** | | [optional] | - - - diff --git a/clients/wallet/docs/FromSymbol.md b/clients/wallet/docs/FromSymbol.md new file mode 100644 index 000000000..8513707ce --- /dev/null +++ b/clients/wallet/docs/FromSymbol.md @@ -0,0 +1,13 @@ + + +# FromSymbol + +## Enum + + +* `ISOLATEDMARGIN_MARGIN` (value: `"ISOLATEDMARGIN_MARGIN"`) + +* `ISOLATEDMARGIN_ISOLATEDMARGIN` (value: `"ISOLATEDMARGIN_ISOLATEDMARGIN"`) + + + diff --git a/clients/wallet/docs/GetApiKeyPermissionResponse.md b/clients/wallet/docs/GetAPIKeyPermissionResponse.md similarity index 100% rename from clients/wallet/docs/GetApiKeyPermissionResponse.md rename to clients/wallet/docs/GetAPIKeyPermissionResponse.md diff --git a/clients/wallet/docs/GetAssetsThatCanBeConvertedIntoBNBRequest.md b/clients/wallet/docs/GetAssetsThatCanBeConvertedIntoBNBRequest.md new file mode 100644 index 000000000..503548369 --- /dev/null +++ b/clients/wallet/docs/GetAssetsThatCanBeConvertedIntoBNBRequest.md @@ -0,0 +1,14 @@ + + +# GetAssetsThatCanBeConvertedIntoBnbRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accountType** | **AccountType** | | [optional] | +|**recvWindow** | **Long** | | [optional] | + + + diff --git a/clients/wallet/docs/GetAssetsThatCanBeConvertedIntoBnbResponse.md b/clients/wallet/docs/GetAssetsThatCanBeConvertedIntoBNBResponse.md similarity index 100% rename from clients/wallet/docs/GetAssetsThatCanBeConvertedIntoBnbResponse.md rename to clients/wallet/docs/GetAssetsThatCanBeConvertedIntoBNBResponse.md diff --git a/clients/wallet/docs/GetAssetsThatCanBeConvertedIntoBnbResponseDetailsInner.md b/clients/wallet/docs/GetAssetsThatCanBeConvertedIntoBNBResponseDetailsInner.md similarity index 100% rename from clients/wallet/docs/GetAssetsThatCanBeConvertedIntoBnbResponseDetailsInner.md rename to clients/wallet/docs/GetAssetsThatCanBeConvertedIntoBNBResponseDetailsInner.md diff --git a/clients/wallet/docs/GetAssetsThatCanBeConvertedIntoBnbRequest.md b/clients/wallet/docs/GetAssetsThatCanBeConvertedIntoBnbRequest.md deleted file mode 100644 index 0fcbf08e1..000000000 --- a/clients/wallet/docs/GetAssetsThatCanBeConvertedIntoBnbRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# GetAssetsThatCanBeConvertedIntoBnbRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountType** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | - - - diff --git a/clients/wallet/docs/GetCountryListResponse.md b/clients/wallet/docs/GetCountryListResponse.md index 216d048d3..a6e4ad186 100644 --- a/clients/wallet/docs/GetCountryListResponse.md +++ b/clients/wallet/docs/GetCountryListResponse.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**countries** | [**List<GetCountryListResponseCountriesInner>**](GetCountryListResponseCountriesInner.md) | | [optional] | -|**lastUpdated** | **Long** | | [optional] | +|**lastUpdated** | **Long** | Last data update timestamp (epoch milliseconds); 0 if empty. | [optional] | diff --git a/clients/wallet/docs/GetCountryListResponseCountriesInner.md b/clients/wallet/docs/GetCountryListResponseCountriesInner.md index c3c28a88d..12d4342fd 100644 --- a/clients/wallet/docs/GetCountryListResponseCountriesInner.md +++ b/clients/wallet/docs/GetCountryListResponseCountriesInner.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**countryCode** | **String** | | [optional] | -|**countryName** | **String** | | [optional] | -|**blockType** | **String** | | [optional] | -|**depositAllowed** | **Boolean** | | [optional] | -|**withdrawalAllowed** | **Boolean** | | [optional] | -|**hasRegionRestrictions** | **Boolean** | | [optional] | +|**countryCode** | **String** | ISO 2-digit country code, lowercase. | [optional] | +|**countryName** | **String** | Country display name. | [optional] | +|**blockType** | **String** | `supported`, `limited`, or `blocked`. | [optional] | +|**depositAllowed** | **Boolean** | Whether deposit is allowed for this country. | [optional] | +|**withdrawalAllowed** | **Boolean** | Whether withdrawal is allowed for this country. | [optional] | +|**hasRegionRestrictions** | **Boolean** | Whether this country has region-level restrictions. | [optional] | diff --git a/clients/wallet/docs/GetRegionListResponse.md b/clients/wallet/docs/GetRegionListResponse.md index 77da5c219..4b58b617c 100644 --- a/clients/wallet/docs/GetRegionListResponse.md +++ b/clients/wallet/docs/GetRegionListResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**countryCode** | **String** | | [optional] | +|**countryCode** | **String** | Echoed country code (lowercase). | [optional] | |**regions** | [**List<GetRegionListResponseRegionsInner>**](GetRegionListResponseRegionsInner.md) | | [optional] | -|**lastUpdated** | **Long** | | [optional] | +|**lastUpdated** | **Long** | Last data update timestamp (epoch milliseconds); 0 if empty. | [optional] | diff --git a/clients/wallet/docs/GetRegionListResponseRegionsInner.md b/clients/wallet/docs/GetRegionListResponseRegionsInner.md index 51a0993bc..ebd7eaf4f 100644 --- a/clients/wallet/docs/GetRegionListResponseRegionsInner.md +++ b/clients/wallet/docs/GetRegionListResponseRegionsInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**regionName** | **String** | | [optional] | -|**blockType** | **String** | | [optional] | -|**depositAllowed** | **Boolean** | | [optional] | -|**withdrawalAllowed** | **Boolean** | | [optional] | +|**regionName** | **String** | Region/city display name (use this value in questionnaire answers). | [optional] | +|**blockType** | **String** | `supported`, `limited`, or `blocked`. | [optional] | +|**depositAllowed** | **Boolean** | Whether deposit is allowed for this region. | [optional] | +|**withdrawalAllowed** | **Boolean** | Whether withdrawal is allowed for this region. | [optional] | diff --git a/clients/wallet/docs/GetSpotDelistScheduleResponse.md b/clients/wallet/docs/GetSpotDelistScheduleResponse.md deleted file mode 100644 index 64842f60f..000000000 --- a/clients/wallet/docs/GetSpotDelistScheduleResponse.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# GetSpotDelistScheduleResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/clients/wallet/docs/GetSpotDelistScheduleResponseInner.md b/clients/wallet/docs/GetSpotDelistScheduleResponseInner.md deleted file mode 100644 index 69d3f73b5..000000000 --- a/clients/wallet/docs/GetSpotDelistScheduleResponseInner.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# GetSpotDelistScheduleResponseInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**delistTime** | **Long** | | [optional] | -|**symbols** | **List<String>** | | [optional] | - - - diff --git a/clients/wallet/docs/OneClickArrivalDepositApplyRequest.md b/clients/wallet/docs/OneClickArrivalDepositApplyRequest.md index fd64bbce4..97313dcfc 100644 --- a/clients/wallet/docs/OneClickArrivalDepositApplyRequest.md +++ b/clients/wallet/docs/OneClickArrivalDepositApplyRequest.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**depositId** | **Long** | | [optional] | -|**txId** | **String** | | [optional] | -|**subAccountId** | **String** | | [optional] | -|**subUserId** | **Long** | | [optional] | +|**depositId** | **Long** | Deposit record Id, priority use | [optional] | +|**txId** | **String** | Deposit txId, used when depositId is not specified | [optional] | +|**subAccountId** | **String** | Sub-accountId of Cloud user | [optional] | +|**subUserId** | **Long** | Sub-userId of parent user | [optional] | diff --git a/clients/wallet/docs/OrderType.md b/clients/wallet/docs/OrderType.md new file mode 100644 index 000000000..faaf44414 --- /dev/null +++ b/clients/wallet/docs/OrderType.md @@ -0,0 +1,71 @@ + + +# OrderType + +## Enum + + +* `MAIN_UMFUTURE` (value: `"MAIN_UMFUTURE"`) + +* `MAIN_CMFUTURE` (value: `"MAIN_CMFUTURE"`) + +* `MAIN_MARGIN` (value: `"MAIN_MARGIN"`) + +* `UMFUTURE_MAIN` (value: `"UMFUTURE_MAIN"`) + +* `UMFUTURE_MARGIN` (value: `"UMFUTURE_MARGIN"`) + +* `CMFUTURE_MAIN` (value: `"CMFUTURE_MAIN"`) + +* `CMFUTURE_MARGIN` (value: `"CMFUTURE_MARGIN"`) + +* `MARGIN_MAIN` (value: `"MARGIN_MAIN"`) + +* `MARGIN_UMFUTURE` (value: `"MARGIN_UMFUTURE"`) + +* `MARGIN_CMFUTURE` (value: `"MARGIN_CMFUTURE"`) + +* `ISOLATEDMARGIN_MARGIN` (value: `"ISOLATEDMARGIN_MARGIN"`) + +* `MARGIN_ISOLATEDMARGIN` (value: `"MARGIN_ISOLATEDMARGIN"`) + +* `ISOLATEDMARGIN_ISOLATEDMARGIN` (value: `"ISOLATEDMARGIN_ISOLATEDMARGIN"`) + +* `MAIN_FUNDING` (value: `"MAIN_FUNDING"`) + +* `FUNDING_MAIN` (value: `"FUNDING_MAIN"`) + +* `FUNDING_UMFUTURE` (value: `"FUNDING_UMFUTURE"`) + +* `UMFUTURE_FUNDING` (value: `"UMFUTURE_FUNDING"`) + +* `MARGIN_FUNDING` (value: `"MARGIN_FUNDING"`) + +* `FUNDING_MARGIN` (value: `"FUNDING_MARGIN"`) + +* `FUNDING_CMFUTURE` (value: `"FUNDING_CMFUTURE"`) + +* `CMFUTURE_FUNDING` (value: `"CMFUTURE_FUNDING"`) + +* `MAIN_OPTION` (value: `"MAIN_OPTION"`) + +* `OPTION_MAIN` (value: `"OPTION_MAIN"`) + +* `UMFUTURE_OPTION` (value: `"UMFUTURE_OPTION"`) + +* `OPTION_UMFUTURE` (value: `"OPTION_UMFUTURE"`) + +* `MARGIN_OPTION` (value: `"MARGIN_OPTION"`) + +* `OPTION_MARGIN` (value: `"OPTION_MARGIN"`) + +* `FUNDING_OPTION` (value: `"FUNDING_OPTION"`) + +* `OPTION_FUNDING` (value: `"OPTION_FUNDING"`) + +* `MAIN_PORTFOLIO_MARGIN` (value: `"MAIN_PORTFOLIO_MARGIN"`) + +* `PORTFOLIO_MARGIN_MAIN` (value: `"PORTFOLIO_MARGIN_MAIN"`) + + + diff --git a/clients/wallet/docs/OthersApi.md b/clients/wallet/docs/OthersApi.md index 10bf286f2..03549134a 100644 --- a/clients/wallet/docs/OthersApi.md +++ b/clients/wallet/docs/OthersApi.md @@ -4,17 +4,17 @@ All URIs are relative to *https://api.binance.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getSymbolsDelistScheduleForSpot**](OthersApi.md#getSymbolsDelistScheduleForSpot) | **GET** /sapi/v1/spot/delist-schedule | Get symbols delist schedule for spot (MARKET_DATA) | -| [**systemStatus**](OthersApi.md#systemStatus) | **GET** /sapi/v1/system/status | System Status (System) | +| [**getSymbolsDelistScheduleForSpot**](OthersApi.md#getSymbolsDelistScheduleForSpot) | **GET** /sapi/v1/spot/delist-schedule | Get Spot Delist Schedule (MARKET_DATA) | +| [**systemStatus**](OthersApi.md#systemStatus) | **GET** /sapi/v1/system/status | System Status | # **getSymbolsDelistScheduleForSpot** > GetSymbolsDelistScheduleForSpotResponse getSymbolsDelistScheduleForSpot(recvWindow) -Get symbols delist schedule for spot (MARKET_DATA) +Get Spot Delist Schedule (MARKET_DATA) -Get symbols delist schedule for spot Weight: 100 +Get symbols delist schedule for spot Weight(IP): 100 Security Type: MARKET_DATA ### Example ```java @@ -31,7 +31,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); OthersApi apiInstance = new OthersApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { GetSymbolsDelistScheduleForSpotResponse result = apiInstance.getSymbolsDelistScheduleForSpot(recvWindow); System.out.println(result); @@ -74,9 +74,9 @@ No authorization required # **systemStatus** > SystemStatusResponse systemStatus() -System Status (System) +System Status -Fetch system status. Weight: 1 +Fetch system status. Weight(IP): 1 Security Type: System ### Example ```java diff --git a/clients/wallet/docs/Status.md b/clients/wallet/docs/Status.md new file mode 100644 index 000000000..96f245905 --- /dev/null +++ b/clients/wallet/docs/Status.md @@ -0,0 +1,21 @@ + + +# Status + +## Enum + + +* `STATUS_0` (value: `0l`) + +* `STATUS_1` (value: `1l`) + +* `STATUS_2` (value: `2l`) + +* `STATUS_6` (value: `6l`) + +* `STATUS_7` (value: `7l`) + +* `STATUS_8` (value: `8l`) + + + diff --git a/clients/wallet/docs/SubmitDepositQuestionnaireRequest.md b/clients/wallet/docs/SubmitDepositQuestionnaireRequest.md index 066816dfb..7f883568d 100644 --- a/clients/wallet/docs/SubmitDepositQuestionnaireRequest.md +++ b/clients/wallet/docs/SubmitDepositQuestionnaireRequest.md @@ -7,16 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**subAccountId** | **String** | | | -|**depositId** | **Long** | | | -|**questionnaire** | **String** | | | -|**beneficiaryPii** | **String** | | | +|**subAccountId** | **String** | External user ID. | | +|**depositId** | **Long** | Wallet deposit ID. | | +|**questionnaire** | **String** | JSON format questionnaire answers. | | +|**beneficiaryPii** | **String** | JSON format beneficiary Pii. | | |**network** | **String** | | [optional] | |**coin** | **String** | | [optional] | |**amount** | **Double** | | [optional] | |**address** | **String** | | [optional] | |**addressTag** | **String** | | [optional] | -|**signature** | **String** | | | diff --git a/clients/wallet/docs/SubmitDepositQuestionnaireTravelRuleRequest.md b/clients/wallet/docs/SubmitDepositQuestionnaireTravelRuleRequest.md index 17dcf6b25..98e971de5 100644 --- a/clients/wallet/docs/SubmitDepositQuestionnaireTravelRuleRequest.md +++ b/clients/wallet/docs/SubmitDepositQuestionnaireTravelRuleRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tranId** | **Long** | | | -|**questionnaire** | **String** | | | +|**tranId** | **Long** | Wallet tran ID | | +|**questionnaire** | **String** | JSON format questionnaire answers. | | diff --git a/clients/wallet/docs/SubmitDepositQuestionnaireV2Request.md b/clients/wallet/docs/SubmitDepositQuestionnaireV2Request.md index b56938559..0485fe961 100644 --- a/clients/wallet/docs/SubmitDepositQuestionnaireV2Request.md +++ b/clients/wallet/docs/SubmitDepositQuestionnaireV2Request.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**depositId** | **Long** | | | -|**questionnaire** | **String** | | | +|**depositId** | **Long** | Wallet deposit ID | | +|**questionnaire** | **String** | JSON format questionnaire answers. | | diff --git a/clients/wallet/docs/ToSymbol.md b/clients/wallet/docs/ToSymbol.md new file mode 100644 index 000000000..e37797faf --- /dev/null +++ b/clients/wallet/docs/ToSymbol.md @@ -0,0 +1,13 @@ + + +# ToSymbol + +## Enum + + +* `MARGIN_ISOLATEDMARGIN` (value: `"MARGIN_ISOLATEDMARGIN"`) + +* `ISOLATEDMARGIN_ISOLATEDMARGIN` (value: `"ISOLATEDMARGIN_ISOLATEDMARGIN"`) + + + diff --git a/clients/wallet/docs/ToggleBNBBurnOnSpotTradeAndMarginInterestRequest.md b/clients/wallet/docs/ToggleBNBBurnOnSpotTradeAndMarginInterestRequest.md new file mode 100644 index 000000000..5b89e564c --- /dev/null +++ b/clients/wallet/docs/ToggleBNBBurnOnSpotTradeAndMarginInterestRequest.md @@ -0,0 +1,15 @@ + + +# ToggleBnbBurnOnSpotTradeAndMarginInterestRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**spotBNBBurn** | **String** | Determines whether to use BNB to pay for trading fees on SPOT | [optional] | +|**interestBNBBurn** | **String** | Determines whether to use BNB to pay for margin loan's interest | [optional] | +|**recvWindow** | **Long** | | [optional] | + + + diff --git a/clients/wallet/docs/ToggleBnbBurnOnSpotTradeAndMarginInterestResponse.md b/clients/wallet/docs/ToggleBNBBurnOnSpotTradeAndMarginInterestResponse.md similarity index 100% rename from clients/wallet/docs/ToggleBnbBurnOnSpotTradeAndMarginInterestResponse.md rename to clients/wallet/docs/ToggleBNBBurnOnSpotTradeAndMarginInterestResponse.md diff --git a/clients/wallet/docs/ToggleBnbBurnOnSpotTradeAndMarginInterestRequest.md b/clients/wallet/docs/ToggleBnbBurnOnSpotTradeAndMarginInterestRequest.md deleted file mode 100644 index 7ee4b352f..000000000 --- a/clients/wallet/docs/ToggleBnbBurnOnSpotTradeAndMarginInterestRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ToggleBnbBurnOnSpotTradeAndMarginInterestRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**spotBNBBurn** | **String** | | [optional] | -|**interestBNBBurn** | **String** | | [optional] | -|**recvWindow** | **Long** | | [optional] | - - - diff --git a/clients/wallet/docs/TravelRuleApi.md b/clients/wallet/docs/TravelRuleApi.md index 1ed0ae87e..ba636e98d 100644 --- a/clients/wallet/docs/TravelRuleApi.md +++ b/clients/wallet/docs/TravelRuleApi.md @@ -6,18 +6,18 @@ All URIs are relative to *https://api.binance.com* |------------- | ------------- | -------------| | [**brokerWithdraw**](TravelRuleApi.md#brokerWithdraw) | **POST** /sapi/v1/localentity/broker/withdraw/apply | Broker Withdraw (for brokers of local entities that require travel rule) (USER_DATA) | | [**checkQuestionnaireRequirements**](TravelRuleApi.md#checkQuestionnaireRequirements) | **GET** /sapi/v1/localentity/questionnaire-requirements | Check Questionnaire Requirements (for local entities that require travel rule) (supporting network) (USER_DATA) | -| [**depositHistoryTravelRule**](TravelRuleApi.md#depositHistoryTravelRule) | **GET** /sapi/v1/localentity/deposit/history | Deposit History (for local entities that required travel rule) (supporting network) (USER_DATA) | +| [**depositHistoryTravelRule**](TravelRuleApi.md#depositHistoryTravelRule) | **GET** /sapi/v1/localentity/deposit/history | Deposit History Travel Rule (for local entities that required travel rule) (supporting network) (USER_DATA) | | [**depositHistoryV2**](TravelRuleApi.md#depositHistoryV2) | **GET** /sapi/v2/localentity/deposit/history | Deposit History V2 (for local entities that required travel rule) (supporting network) (USER_DATA) | | [**fetchAddressVerificationList**](TravelRuleApi.md#fetchAddressVerificationList) | **GET** /sapi/v1/addressVerify/list | Fetch address verification list (USER_DATA) | | [**getCountryList**](TravelRuleApi.md#getCountryList) | **GET** /sapi/v1/localentity/country/list | Get Country List (USER_DATA) | | [**getRegionList**](TravelRuleApi.md#getRegionList) | **GET** /sapi/v1/localentity/region/list | Get Region List (USER_DATA) | -| [**submitDepositQuestionnaire**](TravelRuleApi.md#submitDepositQuestionnaire) | **PUT** /sapi/v1/localentity/broker/deposit/provide-info | Submit Deposit Questionnaire (For local entities that require travel rule) (supporting network) (USER_DATA) | +| [**submitDepositQuestionnaire**](TravelRuleApi.md#submitDepositQuestionnaire) | **PUT** /sapi/v1/localentity/broker/deposit/provide-info | Submit Deposit Questionnaire Broker (For local entities that require travel rule) (supporting network) (USER_DATA) | | [**submitDepositQuestionnaireTravelRule**](TravelRuleApi.md#submitDepositQuestionnaireTravelRule) | **PUT** /sapi/v1/localentity/deposit/provide-info | Submit Deposit Questionnaire (For local entities that require travel rule) (supporting network) (USER_DATA) | | [**submitDepositQuestionnaireV2**](TravelRuleApi.md#submitDepositQuestionnaireV2) | **PUT** /sapi/v2/localentity/deposit/provide-info | Submit Deposit Questionnaire V2 (For local entities that require travel rule) (supporting network) (USER_DATA) | | [**vaspList**](TravelRuleApi.md#vaspList) | **GET** /sapi/v1/localentity/vasp | VASP list (for local entities that require travel rule) (supporting network) (USER_DATA) | -| [**withdrawHistoryV1**](TravelRuleApi.md#withdrawHistoryV1) | **GET** /sapi/v1/localentity/withdraw/history | Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA) | +| [**withdrawHistoryV1**](TravelRuleApi.md#withdrawHistoryV1) | **GET** /sapi/v1/localentity/withdraw/history | Withdraw History Travel Rule (supporting network) (USER_DATA) | | [**withdrawHistoryV2**](TravelRuleApi.md#withdrawHistoryV2) | **GET** /sapi/v2/localentity/withdraw/history | Withdraw History V2 (for local entities that require travel rule) (supporting network) (USER_DATA) | -| [**withdrawTravelRule**](TravelRuleApi.md#withdrawTravelRule) | **POST** /sapi/v1/localentity/withdraw/apply | Withdraw (for local entities that require travel rule) (USER_DATA) | +| [**withdrawTravelRule**](TravelRuleApi.md#withdrawTravelRule) | **POST** /sapi/v1/localentity/withdraw/apply | Withdraw Travel Rule (USER_DATA) | @@ -26,7 +26,7 @@ All URIs are relative to *https://api.binance.com* Broker Withdraw (for brokers of local entities that require travel rule) (USER_DATA) -Submit a withdrawal request for brokers of local entities that required travel rule. * If `network` not send, return with default network of the coin, but if the address could not match default network, the withdraw will be rejected. * You can get `network` in `networkList` of a coin in the response * Questionnaire is different for each local entity, please refer to * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`, Weight: 600 +Submit a withdrawal request for brokers of local entities that required travel rule. Weight(UID): 600 Security Type: USER_DATA Notes: - If `network` not send, return with default network of the coin, but if the address could not match default network, the withdraw will be rejected. - You can get `network` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. - Questionnaire is different for each local entity, please refer to the `Withdraw Questionnaire Contents` page. - If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`, please try to verify the format of the questionnaire and use URL-encoded format. ### Example ```java @@ -88,7 +88,7 @@ No authorization required Check Questionnaire Requirements (for local entities that require travel rule) (supporting network) (USER_DATA) -This API will return user-specific Travel Rule questionnaire requirement information in reference to the current API key. Weight: 1 +This API will return user-specific Travel Rule questionnaire requirement information in reference to the current API key. Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -105,7 +105,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TravelRuleApi apiInstance = new TravelRuleApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { CheckQuestionnaireRequirementsResponse result = apiInstance.checkQuestionnaireRequirements(recvWindow); System.out.println(result); @@ -148,9 +148,9 @@ No authorization required # **depositHistoryTravelRule** > DepositHistoryTravelRuleResponse depositHistoryTravelRule(trId, txId, tranId, network, coin, travelRuleStatus, pendingQuestionnaire, startTime, endTime, offset, limit) -Deposit History (for local entities that required travel rule) (supporting network) (USER_DATA) +Deposit History Travel Rule (for local entities that required travel rule) (supporting network) (USER_DATA) -Fetch deposit history for local entities that required travel rule. * Please notice the default `startTime` and `endTime` to make sure that time interval is within * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must * Please, note that due to network-specific characteristics, the returned source address may be inaccurate. If multiple source addresses are found, only the first one will be returned. Weight: 1 +Fetch deposit history for local entities that required travel rule. Weight(IP): 1 Security Type: USER_DATA Notes: - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 90 days. - Please, note that due to network-specific characteristics, the returned source address may be inaccurate. If multiple source addresses are found, only the first one will be returned. ### Example ```java @@ -167,17 +167,17 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TravelRuleApi apiInstance = new TravelRuleApi(defaultClient); - String trId = "trId_example"; // String | Comma(,) separated list of travel rule record Ids. - String txId = "txId_example"; // String | - String tranId = "tranId_example"; // String | Comma(,) separated list of wallet tran Ids. + String trId = "1"; // String | Comma(,) separated list of travel rule record Ids. + String txId = "1"; // String | Comma(,) separated list of transaction Ids. + String tranId = "1"; // String | Comma(,) separated list of wallet tran Ids. String network = "network_example"; // String | - String coin = "coin_example"; // String | - Long travelRuleStatus = 56L; // Long | 0:Completed,1:Pending,2:Failed + String coin = "BTC"; // String | + Long travelRuleStatus = 0L; // Long | 0:Completed,1:Pending,2:Failed Boolean pendingQuestionnaire = true; // Boolean | true: Only return records that pending deposit questionnaire. false/not provided: return all records. - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | + Long startTime = 1623319461670L; // Long | Default: 90 days from current timestamp + Long endTime = 1641782889000L; // Long | Default: present timestamp Long offset = 56L; // Long | Default: 0 - Long limit = 56L; // Long | min 7, max 30, default 7 + Long limit = 1000L; // Long | try { DepositHistoryTravelRuleResponse result = apiInstance.depositHistoryTravelRule(trId, txId, tranId, network, coin, travelRuleStatus, pendingQuestionnaire, startTime, endTime, offset, limit); System.out.println(result); @@ -197,16 +197,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **trId** | **String**| Comma(,) separated list of travel rule record Ids. | [optional] | -| **txId** | **String**| | [optional] | +| **txId** | **String**| Comma(,) separated list of transaction Ids. | [optional] | | **tranId** | **String**| Comma(,) separated list of wallet tran Ids. | [optional] | | **network** | **String**| | [optional] | | **coin** | **String**| | [optional] | | **travelRuleStatus** | **Long**| 0:Completed,1:Pending,2:Failed | [optional] | | **pendingQuestionnaire** | **Boolean**| true: Only return records that pending deposit questionnaire. false/not provided: return all records. | [optional] | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | +| **startTime** | **Long**| Default: 90 days from current timestamp | [optional] | +| **endTime** | **Long**| Default: present timestamp | [optional] | | **offset** | **Long**| Default: 0 | [optional] | -| **limit** | **Long**| min 7, max 30, default 7 | [optional] | +| **limit** | **Long**| | [optional] | ### Return type @@ -232,7 +232,7 @@ No authorization required Deposit History V2 (for local entities that required travel rule) (supporting network) (USER_DATA) -Fetch deposit history for local entities that with required travel rule information. * Please notice the default `startTime` and `endTime` to make sure that time interval is within * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must * Please, note that due to network-specific characteristics, the returned source address may be inaccurate. If multiple source addresses are found, only the first one will be returned. Weight: 1 +Fetch deposit history for local entities that with required travel rule information. Weight(IP): 1 Security Type: USER_DATA Notes: - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 90 days. - Please, note that due to network-specific characteristics, the returned source address may be inaccurate. If multiple source addresses are found, only the first one will be returned. ### Example ```java @@ -249,15 +249,15 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TravelRuleApi apiInstance = new TravelRuleApi(defaultClient); - Long depositId = 56L; // Long | Comma(,) separated list of wallet tran Ids. - String txId = "txId_example"; // String | + Long depositId = 1L; // Long | Comma(,) separated list of wallet tran Ids. + String txId = "1"; // String | Comma(,) separated list of transaction Ids. String network = "network_example"; // String | - String coin = "coin_example"; // String | + String coin = "BTC"; // String | Boolean retrieveQuestionnaire = true; // Boolean | true: return `questionnaire` within response. - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long offset = 56L; // Long | Default: 0 - Long limit = 56L; // Long | min 7, max 30, default 7 + Long startTime = 1623319461670L; // Long | Default: 90 days from current timestamp + Long endTime = 1641782889000L; // Long | Default: present timestamp + Long offset = 0L; // Long | + Long limit = 1000L; // Long | try { DepositHistoryV2Response result = apiInstance.depositHistoryV2(depositId, txId, network, coin, retrieveQuestionnaire, startTime, endTime, offset, limit); System.out.println(result); @@ -277,14 +277,14 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **depositId** | **Long**| Comma(,) separated list of wallet tran Ids. | [optional] | -| **txId** | **String**| | [optional] | +| **txId** | **String**| Comma(,) separated list of transaction Ids. | [optional] | | **network** | **String**| | [optional] | | **coin** | **String**| | [optional] | | **retrieveQuestionnaire** | **Boolean**| true: return `questionnaire` within response. | [optional] | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **offset** | **Long**| Default: 0 | [optional] | -| **limit** | **Long**| min 7, max 30, default 7 | [optional] | +| **startTime** | **Long**| Default: 90 days from current timestamp | [optional] | +| **endTime** | **Long**| Default: present timestamp | [optional] | +| **offset** | **Long**| | [optional] | +| **limit** | **Long**| | [optional] | ### Return type @@ -310,7 +310,7 @@ No authorization required Fetch address verification list (USER_DATA) -Fetch address verification list for user to check on status and other details for the addresses stored in Address Book. Weight: 1 +Fetch address verification list for user to check on status and other details for the addresses stored in Address Book. Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -327,7 +327,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TravelRuleApi apiInstance = new TravelRuleApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { FetchAddressVerificationListResponse result = apiInstance.fetchAddressVerificationList(recvWindow); System.out.println(result); @@ -368,11 +368,11 @@ No authorization required # **getCountryList** -> GetCountryListResponse getCountryList() +> GetCountryListResponse getCountryList(recvWindow) Get Country List (USER_DATA) -Query the active country list for travel rule questionnaires. Currently, only supports AU entity. Weight: 1 +Query the active country list for travel rule questionnaires. Currently, only supports AU entity. Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -389,8 +389,9 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TravelRuleApi apiInstance = new TravelRuleApi(defaultClient); + Long recvWindow = 5000L; // Long | try { - GetCountryListResponse result = apiInstance.getCountryList(); + GetCountryListResponse result = apiInstance.getCountryList(recvWindow); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TravelRuleApi#getCountryList"); @@ -404,7 +405,10 @@ public class Example { ``` ### Parameters -This endpoint does not need any parameter. + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -422,15 +426,15 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Get Country List | - | +| **200** | Country list | - | # **getRegionList** -> GetRegionListResponse getRegionList(countryCode) +> GetRegionListResponse getRegionList(countryCode, recvWindow) Get Region List (USER_DATA) -Query the active region/city list for a given country. Currently, only supports AU entity. Weight: 1 +Query the active region/city list for a given country. Currently, only supports AU entity. Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -447,9 +451,10 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TravelRuleApi apiInstance = new TravelRuleApi(defaultClient); - String countryCode = "countryCode_example"; // String | ISO 2-digit country code (from `Country List` API). + String countryCode = "au"; // String | ISO 2-digit country code (from Country List API). + Long recvWindow = 5000L; // Long | try { - GetRegionListResponse result = apiInstance.getRegionList(countryCode); + GetRegionListResponse result = apiInstance.getRegionList(countryCode, recvWindow); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TravelRuleApi#getRegionList"); @@ -466,7 +471,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **countryCode** | **String**| ISO 2-digit country code (from `Country List` API). | | +| **countryCode** | **String**| ISO 2-digit country code (from Country List API). | | +| **recvWindow** | **Long**| | [optional] | ### Return type @@ -484,15 +490,15 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Get Region List | - | +| **200** | Region list | - | # **submitDepositQuestionnaire** > SubmitDepositQuestionnaireResponse submitDepositQuestionnaire(submitDepositQuestionnaireRequest) -Submit Deposit Questionnaire (For local entities that require travel rule) (supporting network) (USER_DATA) +Submit Deposit Questionnaire Broker (For local entities that require travel rule) (supporting network) (USER_DATA) -Submit questionnaire for brokers of local entities that require travel rule. The questionnaire is only applies to transactions from un-hosted wallets or VASPs that are not yet onboarded with GTR. * Questionnaire is different for each local entity, please refer * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`, Weight: 600 +Submit questionnaire for brokers of local entities that require travel rule. The questionnaire is only applies to transactions from un-hosted wallets or VASPs that are not yet onboarded with GTR. Weight(UID): 600 Security Type: USER_DATA Notes: - Questionnaire is different for each local entity, please refer to `Deposit Questionnaire Content` page. - If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`, please try to verify the format of the questionnaire and use URL-encoded format. ### Example ```java @@ -554,7 +560,7 @@ No authorization required Submit Deposit Questionnaire (For local entities that require travel rule) (supporting network) (USER_DATA) -Submit questionnaire for local entities that require travel rule. The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not yet onboarded with GTR. * Questionnaire is different for each local entity, please refer * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`, Weight: 600 +Submit questionnaire for local entities that require travel rule. The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not yet onboarded with GTR. Weight(UID): 600 Security Type: USER_DATA Notes: - Questionnaire is different for each local entity, please refer to `Deposit Questionnaire Content` page. - If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`, please try to verify the format of the questionnaire and use URL-encoded format. ### Example ```java @@ -616,7 +622,7 @@ No authorization required Submit Deposit Questionnaire V2 (For local entities that require travel rule) (supporting network) (USER_DATA) -Submit questionnaire for local entities that require travel rule. The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not yet onboarded with GTR. * Questionnaire is different for each local entity, please refer * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`, Weight: 600 +Submit questionnaire for local entities that require travel rule. The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not yet onboarded with GTR. Weight(UID): 600 Security Type: USER_DATA Notes: - Questionnaire is different for each local entity, please refer to `Deposit Questionnaire Content` page. - If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`, please try to verify the format of the questionnaire and use URL-encoded format. ### Example ```java @@ -678,7 +684,7 @@ No authorization required VASP list (for local entities that require travel rule) (supporting network) (USER_DATA) -Fetch the VASP list for local entities. Weight: 1 +Fetch the VASP list for local entities. Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -695,7 +701,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TravelRuleApi apiInstance = new TravelRuleApi(defaultClient); - Long recvWindow = 56L; // Long | + Long recvWindow = 5000L; // Long | try { VaspListResponse result = apiInstance.vaspList(recvWindow); System.out.println(result); @@ -738,9 +744,9 @@ No authorization required # **withdrawHistoryV1** > WithdrawHistoryV1Response withdrawHistoryV1(trId, txId, withdrawOrderId, network, coin, travelRuleStatus, offset, limit, startTime, endTime, recvWindow) -Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA) +Withdraw History Travel Rule (supporting network) (USER_DATA) -Fetch withdraw history for local entities that required travel rule. * `network` may not be in the response for old withdraw. * Please notice the default `startTime` and `endTime` to make sure that time interval is within * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less Weight: 1 +Fetch withdraw history for local entities that required travel rule. Weight(IP): 1 Security Type: USER_DATA Notes: - `network` may not be in the response for old withdraw. - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less than 90 days. ### Example ```java @@ -757,17 +763,17 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TravelRuleApi apiInstance = new TravelRuleApi(defaultClient); - String trId = "trId_example"; // String | Comma(,) separated list of travel rule record Ids. - String txId = "txId_example"; // String | - String withdrawOrderId = "withdrawOrderId_example"; // String | client side id for withdrawal, if provided in POST `/sapi/v1/capital/withdraw/apply`, can be used here for query. + String trId = "1"; // String | Comma(,) separated list of travel rule record Ids. + String txId = "1"; // String | Comma(,) separated list of transaction Ids. + String withdrawOrderId = "1"; // String | client side id for withdrawal, if provided in POST `/sapi/v1/capital/withdraw/apply`, can be used here for query. String network = "network_example"; // String | - String coin = "coin_example"; // String | - Long travelRuleStatus = 56L; // Long | 0:Completed,1:Pending,2:Failed - Long offset = 56L; // Long | Default: 0 - Long limit = 56L; // Long | min 7, max 30, default 7 - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long recvWindow = 56L; // Long | + String coin = "BTC"; // String | + Long travelRuleStatus = 0L; // Long | 0:Completed,1:Pending,2:Failed + Long offset = 0L; // Long | + Long limit = 1000L; // Long | + Long startTime = 1623319461670L; // Long | Default: 90 days from current timestamp + Long endTime = 1641782889000L; // Long | Default: present timestamp + Long recvWindow = 5000L; // Long | try { WithdrawHistoryV1Response result = apiInstance.withdrawHistoryV1(trId, txId, withdrawOrderId, network, coin, travelRuleStatus, offset, limit, startTime, endTime, recvWindow); System.out.println(result); @@ -787,15 +793,15 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **trId** | **String**| Comma(,) separated list of travel rule record Ids. | [optional] | -| **txId** | **String**| | [optional] | +| **txId** | **String**| Comma(,) separated list of transaction Ids. | [optional] | | **withdrawOrderId** | **String**| client side id for withdrawal, if provided in POST `/sapi/v1/capital/withdraw/apply`, can be used here for query. | [optional] | | **network** | **String**| | [optional] | | **coin** | **String**| | [optional] | | **travelRuleStatus** | **Long**| 0:Completed,1:Pending,2:Failed | [optional] | -| **offset** | **Long**| Default: 0 | [optional] | -| **limit** | **Long**| min 7, max 30, default 7 | [optional] | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | +| **offset** | **Long**| | [optional] | +| **limit** | **Long**| | [optional] | +| **startTime** | **Long**| Default: 90 days from current timestamp | [optional] | +| **endTime** | **Long**| Default: present timestamp | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -822,7 +828,7 @@ No authorization required Withdraw History V2 (for local entities that require travel rule) (supporting network) (USER_DATA) -Fetch withdraw history for local entities that required travel rule. * `network` may not be in the response for old withdraw. * Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the response. * Please notice the default `startTime` and `endTime` to make sure that time interval is within * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less * If withdrawOrderId is sent, time between startTime and endTime must be less than 7 days. * If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default. * Maximum support trId,txId number is 45. * WithdrawOrderId only support 1. * If responsible does not include withdrawalStatus, please input trId or txId retrieve the data. Weight: 1 +Fetch withdraw history for local entities that required travel rule. Weight(IP): 1 Security Type: USER_DATA Notes: - `network` may not be in the response for old withdraw. - Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the response. - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less than 90 days. - If withdrawOrderId is sent, time between startTime and endTime must be less than 7 days. - If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default. - Maximum support trId,txId number is 45. - WithdrawOrderId only support 1. - If responsible does not include withdrawalStatus, please input trId or txId retrieve the data. ### Example ```java @@ -839,17 +845,17 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TravelRuleApi apiInstance = new TravelRuleApi(defaultClient); - String trId = "trId_example"; // String | Comma(,) separated list of travel rule record Ids. - String txId = "txId_example"; // String | - String withdrawOrderId = "withdrawOrderId_example"; // String | client side id for withdrawal, if provided in POST `/sapi/v1/capital/withdraw/apply`, can be used here for query. + String trId = "1"; // String | Comma(,) separated list of travel rule record Ids. + String txId = "1"; // String | Comma(,) separated list of transaction Ids. + String withdrawOrderId = "1"; // String | client side id for withdrawal, if provided in POST `/sapi/v1/capital/withdraw/apply`, can be used here for query. String network = "network_example"; // String | String coin = "coin_example"; // String | - Long travelRuleStatus = 56L; // Long | 0:Completed,1:Pending,2:Failed - Long offset = 56L; // Long | Default: 0 - Long limit = 56L; // Long | min 7, max 30, default 7 - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long recvWindow = 56L; // Long | + Long travelRuleStatus = 0L; // Long | 0:Completed,1:Pending,2:Failed + Long offset = 0L; // Long | + Long limit = 1000L; // Long | + Long startTime = 1623319461670L; // Long | Default: 90 days from current timestamp + Long endTime = 1641782889000L; // Long | Default: present timestamp + Long recvWindow = 5000L; // Long | try { WithdrawHistoryV2Response result = apiInstance.withdrawHistoryV2(trId, txId, withdrawOrderId, network, coin, travelRuleStatus, offset, limit, startTime, endTime, recvWindow); System.out.println(result); @@ -869,15 +875,15 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **trId** | **String**| Comma(,) separated list of travel rule record Ids. | [optional] | -| **txId** | **String**| | [optional] | +| **txId** | **String**| Comma(,) separated list of transaction Ids. | [optional] | | **withdrawOrderId** | **String**| client side id for withdrawal, if provided in POST `/sapi/v1/capital/withdraw/apply`, can be used here for query. | [optional] | | **network** | **String**| | [optional] | | **coin** | **String**| | [optional] | | **travelRuleStatus** | **Long**| 0:Completed,1:Pending,2:Failed | [optional] | -| **offset** | **Long**| Default: 0 | [optional] | -| **limit** | **Long**| min 7, max 30, default 7 | [optional] | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | +| **offset** | **Long**| | [optional] | +| **limit** | **Long**| | [optional] | +| **startTime** | **Long**| Default: 90 days from current timestamp | [optional] | +| **endTime** | **Long**| Default: present timestamp | [optional] | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -902,9 +908,9 @@ No authorization required # **withdrawTravelRule** > WithdrawTravelRuleResponse withdrawTravelRule(withdrawTravelRuleRequest) -Withdraw (for local entities that require travel rule) (USER_DATA) +Withdraw Travel Rule (USER_DATA) -Submit a withdrawal request for local entities that required travel rule. * If `network` not send, return with default network of the coin, but if the address could not match default network, the withdraw will be rejected. * You can get `network` and `isDefault` in `networkList` of a coin in the response * Questionnaire is different for each local entity, please refer to * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`, Weight: 600 +Submit a withdrawal request for local entities that required travel rule. Weight(UID): 600 Security Type: USER_DATA Notes: - If `network` not send, return with default network of the coin, but if the address could not match default network, the withdraw will be rejected. - You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. - Questionnaire is different for each local entity, please refer to the `Withdraw Questionnaire Contents` page. - If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`, please try to verify the format of the questionnaire and use URL-encoded format. ### Example ```java diff --git a/clients/wallet/docs/UserAssetRequest.md b/clients/wallet/docs/UserAssetRequest.md index a00c5f29f..644ed279b 100644 --- a/clients/wallet/docs/UserAssetRequest.md +++ b/clients/wallet/docs/UserAssetRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**asset** | **String** | | [optional] | -|**needBtcValuation** | **Boolean** | | [optional] | +|**asset** | **String** | If asset is blank, then query all positive assets user have. | [optional] | +|**needBtcValuation** | **Boolean** | Whether need btc valuation or not. | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/wallet/docs/UserUniversalTransferRequest.md b/clients/wallet/docs/UserUniversalTransferRequest.md index 00424be10..0f75965dd 100644 --- a/clients/wallet/docs/UserUniversalTransferRequest.md +++ b/clients/wallet/docs/UserUniversalTransferRequest.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**type** | **String** | | | +|**type** | **OrderType** | | | |**asset** | **String** | | | |**amount** | **Double** | | | -|**fromSymbol** | **String** | | [optional] | -|**toSymbol** | **String** | | [optional] | +|**fromSymbol** | **FromSymbol** | | [optional] | +|**toSymbol** | **ToSymbol** | | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/wallet/docs/VaspListResponseInner.md b/clients/wallet/docs/VaspListResponseInner.md index 6f8251cbd..43142ff27 100644 --- a/clients/wallet/docs/VaspListResponseInner.md +++ b/clients/wallet/docs/VaspListResponseInner.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**vaspCode** | **String** | | [optional] | |**vaspName** | **String** | | [optional] | -|**identifier** | **String** | | [optional] | +|**vaspCode** | **String** | | [optional] | +|**identifier** | **String** | For populating the `vasp` field in the deposit/withdrawal questionnaire | [optional] | diff --git a/clients/wallet/docs/WithdrawHistoryV1ResponseInner.md b/clients/wallet/docs/WithdrawHistoryV1ResponseInner.md new file mode 100644 index 000000000..2f863f29d --- /dev/null +++ b/clients/wallet/docs/WithdrawHistoryV1ResponseInner.md @@ -0,0 +1,31 @@ + + +# WithdrawHistoryV1ResponseInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**trId** | **Long** | | [optional] | +|**amount** | **String** | | [optional] | +|**transactionFee** | **String** | | [optional] | +|**coin** | **String** | | [optional] | +|**withdrawalStatus** | **Long** | | [optional] | +|**travelRuleStatus** | **Long** | | [optional] | +|**address** | **String** | | [optional] | +|**txId** | **String** | | [optional] | +|**applyTime** | **String** | | [optional] | +|**network** | **String** | | [optional] | +|**transferType** | **Long** | | [optional] | +|**withdrawOrderId** | **String** | | [optional] | +|**info** | **String** | | [optional] | +|**confirmNo** | **Long** | | [optional] | +|**walletType** | **Long** | | [optional] | +|**txKey** | **String** | | [optional] | +|**questionnaire** | **String** | | [optional] | +|**completeTime** | **String** | | [optional] | + + + diff --git a/clients/wallet/docs/WithdrawHistoryV2ResponseInner.md b/clients/wallet/docs/WithdrawHistoryV2ResponseInner.md deleted file mode 100644 index 08f3eefb2..000000000 --- a/clients/wallet/docs/WithdrawHistoryV2ResponseInner.md +++ /dev/null @@ -1,31 +0,0 @@ - - -# WithdrawHistoryV2ResponseInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**trId** | **Long** | | [optional] | -|**amount** | **String** | | [optional] | -|**transactionFee** | **String** | | [optional] | -|**coin** | **String** | | [optional] | -|**withdrawalStatus** | **Long** | | [optional] | -|**travelRuleStatus** | **Long** | | [optional] | -|**address** | **String** | | [optional] | -|**txId** | **String** | | [optional] | -|**applyTime** | **String** | | [optional] | -|**network** | **String** | | [optional] | -|**transferType** | **Long** | | [optional] | -|**withdrawOrderId** | **String** | | [optional] | -|**info** | **String** | | [optional] | -|**confirmNo** | **Long** | | [optional] | -|**walletType** | **Long** | | [optional] | -|**txKey** | **String** | | [optional] | -|**questionnaire** | **String** | | [optional] | -|**completeTime** | **String** | | [optional] | - - - diff --git a/clients/wallet/docs/WithdrawRequest.md b/clients/wallet/docs/WithdrawRequest.md index e4210d3c9..68b6e248a 100644 --- a/clients/wallet/docs/WithdrawRequest.md +++ b/clients/wallet/docs/WithdrawRequest.md @@ -8,14 +8,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**coin** | **String** | | | -|**withdrawOrderId** | **String** | | [optional] | -|**network** | **String** | | [optional] | -|**address** | **String** | | | -|**addressTag** | **String** | | [optional] | -|**amount** | **Double** | | | -|**transactionFeeFlag** | **Boolean** | | [optional] | +|**withdrawOrderId** | **String** | client side id for withdrawal, if provide here, can be used in GET `/sapi/v1/capital/withdraw/history` for query. | [optional] | +|**network** | **String** | Withdrawal network | [optional] | +|**address** | **String** | Withdrawal address | | +|**addressTag** | **String** | Secondary address identifier for coins like XRP,XMR etc. | [optional] | +|**amount** | **Double** | Amount | | +|**transactionFeeFlag** | **Boolean** | When making internal transfer, `true` for returning the fee to the destination account; `false` for returning the fee back to the departure account. Default `false`. | [optional] | |**name** | **String** | | [optional] | -|**walletType** | **Long** | | [optional] | +|**walletType** | **Long** | The wallet type for withdraw,0-spot wallet ,1-funding wallet. Default walletType is the current \"selected wallet\" under wallet->Fiat and Spot/Funding->Deposit | [optional] | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/wallet/docs/WithdrawTravelRuleRequest.md b/clients/wallet/docs/WithdrawTravelRuleRequest.md index c0d74a0a3..1eeeee5ac 100644 --- a/clients/wallet/docs/WithdrawTravelRuleRequest.md +++ b/clients/wallet/docs/WithdrawTravelRuleRequest.md @@ -8,16 +8,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**coin** | **String** | | | -|**withdrawOrderId** | **String** | | [optional] | -|**network** | **String** | | [optional] | -|**address** | **String** | | | -|**addressTag** | **String** | | [optional] | -|**amount** | **Double** | | | -|**transactionFeeFlag** | **Boolean** | | [optional] | +|**withdrawOrderId** | **String** | withdrawID defined by the client (i.e. client's internal withdrawID) | [optional] | +|**network** | **String** | Withdrawal network | [optional] | +|**address** | **String** | Withdrawal address | | +|**addressTag** | **String** | Secondary address identifier for coins like XRP,XMR etc. | [optional] | +|**amount** | **Double** | Amount | | +|**transactionFeeFlag** | **Boolean** | When making internal transfer, `true` for returning the fee to the destination account; `false` for returning the fee back to the departure account. Default `false`. | [optional] | |**name** | **String** | | [optional] | -|**walletType** | **Long** | | [optional] | +|**walletType** | **Long** | The wallet type for withdraw,0-spot wallet ,1-funding wallet. Default walletType is the current \"selected wallet\" under wallet->Fiat and Spot/Funding->Deposit | [optional] | |**recvWindow** | **Long** | | [optional] | -|**questionnaire** | **String** | | | +|**questionnaire** | **String** | JSON format questionnaire answers. | | diff --git a/clients/wallet/docs/rest-api/migration-guide.md b/clients/wallet/docs/rest-api/migration-guide.md index a7df0041d..50be5c8e5 100644 --- a/clients/wallet/docs/rest-api/migration-guide.md +++ b/clients/wallet/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-wallet - 5.0.0 + 6.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-wallet - 5.0.0 + 6.0.0 ``` diff --git a/clients/wallet/example_rest.md b/clients/wallet/example_rest.md index 503521fe7..6e8aed31b 100644 --- a/clients/wallet/example_rest.md +++ b/clients/wallet/example_rest.md @@ -1,108 +1,108 @@ ## Account -[GET /sapi/v1/account/apiTradingStatus](https://developers.binance.com/docs/wallet/account/Account-API-Trading-Status) - accountApiTradingStatus - [AccountApiTradingStatusExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountApiTradingStatusExample.java#L34) +[GET /sapi/v1/account/apiTradingStatus](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#account-api-trading-status) - accountApiTradingStatus - [AccountApiTradingStatusExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountApiTradingStatusExample.java#L35) -[GET /sapi/v1/account/info](https://developers.binance.com/docs/wallet/account/Account-info) - accountInfo - [AccountInfoExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountInfoExample.java#L34) +[GET /sapi/v1/account/info](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#account-info) - accountInfo - [AccountInfoExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountInfoExample.java#L35) -[GET /sapi/v1/account/status](https://developers.binance.com/docs/wallet/account/Account-Status) - accountStatus - [AccountStatusExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountStatusExample.java#L34) +[GET /sapi/v1/account/status](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#account-status) - accountStatus - [AccountStatusExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountStatusExample.java#L35) -[GET /sapi/v1/accountSnapshot](https://developers.binance.com/docs/wallet/account/daily-account-snapshoot) - dailyAccountSnapshot - [DailyAccountSnapshotExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/DailyAccountSnapshotExample.java#L36) +[GET /sapi/v1/accountSnapshot](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#daily-account-snapshot) - dailyAccountSnapshot - [DailyAccountSnapshotExample.java:38](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/DailyAccountSnapshotExample.java#L38) -[POST /sapi/v1/account/disableFastWithdrawSwitch](https://developers.binance.com/docs/wallet/account/Disable-Fast-Withdraw-Switch) - disableFastWithdrawSwitch - [DisableFastWithdrawSwitchExample.java:33](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/DisableFastWithdrawSwitchExample.java#L33) +[POST /sapi/v1/account/disableFastWithdrawSwitch](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#disable-fast-withdraw-switch) - disableFastWithdrawSwitch - [DisableFastWithdrawSwitchExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/DisableFastWithdrawSwitchExample.java#L36) -[POST /sapi/v1/account/enableFastWithdrawSwitch](https://developers.binance.com/docs/wallet/account/Enable-Fast-Withdraw-Switch) - enableFastWithdrawSwitch - [EnableFastWithdrawSwitchExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/EnableFastWithdrawSwitchExample.java#L36) +[POST /sapi/v1/account/enableFastWithdrawSwitch](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#enable-fast-withdraw-switch) - enableFastWithdrawSwitch - [EnableFastWithdrawSwitchExample.java:38](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/EnableFastWithdrawSwitchExample.java#L38) -[GET /sapi/v1/account/apiRestrictions](https://developers.binance.com/docs/wallet/account/api-key-permission) - getApiKeyPermission - [GetApiKeyPermissionExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/GetApiKeyPermissionExample.java#L34) +[GET /sapi/v1/account/apiRestrictions](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#get-api-key-permission) - getApiKeyPermission - [GetApiKeyPermissionExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/GetApiKeyPermissionExample.java#L35) ## Asset -[GET /sapi/v1/asset/assetDetail](https://developers.binance.com/docs/wallet/asset/Asset-Detail) - assetDetail - [AssetDetailExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/AssetDetailExample.java#L35) +[GET /sapi/v1/asset/assetDetail](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#asset-detail) - assetDetail - [AssetDetailExample.java:37](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/AssetDetailExample.java#L37) -[GET /sapi/v1/asset/assetDividend](https://developers.binance.com/docs/wallet/asset/assets-divided-record) - assetDividendRecord - [AssetDividendRecordExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/AssetDividendRecordExample.java#L35) +[GET /sapi/v1/asset/assetDividend](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#asset-dividend-record) - assetDividendRecord - [AssetDividendRecordExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/AssetDividendRecordExample.java#L36) -[POST /sapi/v1/asset/dust-convert/convert](https://developers.binance.com/docs/wallet/asset/Dust-Convert) - dustConvert - [DustConvertExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustConvertExample.java#L35) +[POST /sapi/v1/asset/dust-convert/convert](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#dust-convert) - dustConvert - [DustConvertExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustConvertExample.java#L36) -[POST /sapi/v1/asset/dust-convert/query-convertible-assets](https://developers.binance.com/docs/wallet/asset/Dust-Convertible-Assets) - dustConvertibleAssets - [DustConvertibleAssetsExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustConvertibleAssetsExample.java#L35) +[POST /sapi/v1/asset/dust-convert/query-convertible-assets](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#dust-convertible-assets) - dustConvertibleAssets - [DustConvertibleAssetsExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustConvertibleAssetsExample.java#L36) -[POST /sapi/v1/asset/dust](https://developers.binance.com/docs/wallet/asset/Dust-Transfer) - dustTransfer - [DustTransferExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustTransferExample.java#L36) +[POST /sapi/v1/asset/dust](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#dust-transfer) - dustTransfer - [DustTransferExample.java:38](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustTransferExample.java#L38) -[GET /sapi/v1/asset/dribblet](https://developers.binance.com/docs/wallet/asset/dust-log) - dustlog - [DustlogExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustlogExample.java#L34) +[GET /sapi/v1/asset/dribblet](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#dustlog) - dustlog - [DustlogExample.java:37](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustlogExample.java#L37) -[POST /sapi/v1/asset/get-funding-asset](https://developers.binance.com/docs/wallet/asset/Funding-Wallet) - fundingWallet - [FundingWalletExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/FundingWalletExample.java#L36) +[POST /sapi/v1/asset/get-funding-asset](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#funding-wallet) - fundingWallet - [FundingWalletExample.java:38](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/FundingWalletExample.java#L38) -[POST /sapi/v1/asset/dust-btc](https://developers.binance.com/docs/wallet/asset/assets-can-convert-bnb) - getAssetsThatCanBeConvertedIntoBnb - [GetAssetsThatCanBeConvertedIntoBnbExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetAssetsThatCanBeConvertedIntoBnbExample.java#L35) +[POST /sapi/v1/asset/dust-btc](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#get-assets-that-can-be-converted-into-bnb) - getAssetsThatCanBeConvertedIntoBnb - [GetAssetsThatCanBeConvertedIntoBnbExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetAssetsThatCanBeConvertedIntoBnbExample.java#L36) -[GET /sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage](https://developers.binance.com/docs/wallet/asset/cloud-mining-payment-and-refund-history) - getCloudMiningPaymentAndRefundHistory - [GetCloudMiningPaymentAndRefundHistoryExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetCloudMiningPaymentAndRefundHistoryExample.java#L36) +[GET /sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#get-cloud-mining-payment-and-refund-history) - getCloudMiningPaymentAndRefundHistory - [GetCloudMiningPaymentAndRefundHistoryExample.java:37](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetCloudMiningPaymentAndRefundHistoryExample.java#L37) -[GET /sapi/v1/spot/open-symbol-list](https://developers.binance.com/docs/wallet/asset/open-symbol-list) - getOpenSymbolList - [GetOpenSymbolListExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetOpenSymbolListExample.java#L35) +[GET /sapi/v1/spot/open-symbol-list](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#get-open-symbol-list) - getOpenSymbolList - [GetOpenSymbolListExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetOpenSymbolListExample.java#L36) -[GET /sapi/v1/asset/custody/transfer-history](https://developers.binance.com/docs/wallet/asset/query-user-delegation) - queryUserDelegationHistory - [QueryUserDelegationHistoryExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserDelegationHistoryExample.java#L34) +[GET /sapi/v1/asset/custody/transfer-history](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#query-user-delegation-history) - queryUserDelegationHistory - [QueryUserDelegationHistoryExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserDelegationHistoryExample.java#L36) -[GET /sapi/v1/asset/transfer](https://developers.binance.com/docs/wallet/asset/query-user-universal-transfer) - queryUserUniversalTransferHistory - [QueryUserUniversalTransferHistoryExample.java:38](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserUniversalTransferHistoryExample.java#L38) +[GET /sapi/v1/asset/transfer](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#query-user-universal-transfer-history) - queryUserUniversalTransferHistory - [QueryUserUniversalTransferHistoryExample.java:42](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserUniversalTransferHistoryExample.java#L42) -[GET /sapi/v1/asset/wallet/balance](https://developers.binance.com/docs/wallet/asset/Query-User-Wallet-Balance) - queryUserWalletBalance - [QueryUserWalletBalanceExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserWalletBalanceExample.java#L34) +[GET /sapi/v1/asset/wallet/balance](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#query-user-wallet-balance) - queryUserWalletBalance - [QueryUserWalletBalanceExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserWalletBalanceExample.java#L35) -[POST /sapi/v1/bnbBurn](https://developers.binance.com/docs/wallet/asset/Toggle-BNB-Burn-On-Spot-Trade-And-Margin-Interest) - toggleBnbBurnOnSpotTradeAndMarginInterest - [ToggleBnbBurnOnSpotTradeAndMarginInterestExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/ToggleBnbBurnOnSpotTradeAndMarginInterestExample.java#L36) +[POST /sapi/v1/bnbBurn](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#toggle-bnb-burn-on-spot-trade-and-margin-interest) - toggleBnbBurnOnSpotTradeAndMarginInterest - [ToggleBnbBurnOnSpotTradeAndMarginInterestExample.java:38](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/ToggleBnbBurnOnSpotTradeAndMarginInterestExample.java#L38) -[GET /sapi/v1/asset/tradeFee](https://developers.binance.com/docs/wallet/asset/Trade-Fee) - tradeFee - [TradeFeeExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/TradeFeeExample.java#L34) +[GET /sapi/v1/asset/tradeFee](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#trade-fee) - tradeFee - [TradeFeeExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/TradeFeeExample.java#L35) -[POST /sapi/v3/asset/getUserAsset](https://developers.binance.com/docs/wallet/asset/user-assets) - userAsset - [UserAssetExample.java:37](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/UserAssetExample.java#L37) +[POST /sapi/v3/asset/getUserAsset](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#user-asset) - userAsset - [UserAssetExample.java:38](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/UserAssetExample.java#L38) -[POST /sapi/v1/asset/transfer](https://developers.binance.com/docs/wallet/asset/User-Universal-Transfer) - userUniversalTransfer - [UserUniversalTransferExample.java:60](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/UserUniversalTransferExample.java#L60) +[POST /sapi/v1/asset/transfer](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#user-universal-transfer) - userUniversalTransfer - [UserUniversalTransferExample.java:62](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/UserUniversalTransferExample.java#L62) ## Capital -[GET /sapi/v1/capital/config/getall](https://developers.binance.com/docs/wallet/capital/all-coins-info) - allCoinsInformation - [AllCoinsInformationExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/AllCoinsInformationExample.java#L34) +[GET /sapi/v1/capital/config/getall](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#all-coins-information) - allCoinsInformation - [AllCoinsInformationExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/AllCoinsInformationExample.java#L36) -[GET /sapi/v1/capital/deposit/address](https://developers.binance.com/docs/wallet/capital/deposite-address) - depositAddress - [DepositAddressExample.java:37](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/DepositAddressExample.java#L37) +[GET /sapi/v1/capital/deposit/address](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#deposit-address) - depositAddress - [DepositAddressExample.java:39](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/DepositAddressExample.java#L39) -[GET /sapi/v1/capital/deposit/hisrec](https://developers.binance.com/docs/wallet/capital/deposite-history) - depositHistory - [DepositHistoryExample.java:38](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/DepositHistoryExample.java#L38) +[GET /sapi/v1/capital/deposit/hisrec](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#deposit-history) - depositHistory - [DepositHistoryExample.java:39](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/DepositHistoryExample.java#L39) -[GET /sapi/v1/capital/deposit/address/list](https://developers.binance.com/docs/wallet/capital/Fetch-deposit-address-list-with-network) - fetchDepositAddressListWithNetwork - [FetchDepositAddressListWithNetworkExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchDepositAddressListWithNetworkExample.java#L36) +[GET /sapi/v1/capital/deposit/address/list](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#fetch-deposit-address-list-with-network) - fetchDepositAddressListWithNetwork - [FetchDepositAddressListWithNetworkExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchDepositAddressListWithNetworkExample.java#L35) -[GET /sapi/v1/capital/withdraw/address/list](https://developers.binance.com/docs/wallet/capital/fetch-withdraw-address) - fetchWithdrawAddressList - [FetchWithdrawAddressListExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchWithdrawAddressListExample.java#L34) +[GET /sapi/v1/capital/withdraw/address/list](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#fetch-withdraw-address-list) - fetchWithdrawAddressList - [FetchWithdrawAddressListExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchWithdrawAddressListExample.java#L35) -[GET /sapi/v1/capital/withdraw/quota](https://developers.binance.com/docs/wallet/capital/Fetch-withdraw-quota) - fetchWithdrawQuota - [FetchWithdrawQuotaExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchWithdrawQuotaExample.java#L34) +[GET /sapi/v1/capital/withdraw/quota](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#fetch-withdraw-quota) - fetchWithdrawQuota - [FetchWithdrawQuotaExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchWithdrawQuotaExample.java#L35) -[POST /sapi/v1/capital/deposit/credit-apply](https://developers.binance.com/docs/wallet/capital/one-click-arrival-deposite-apply) - oneClickArrivalDepositApply - [OneClickArrivalDepositApplyExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/OneClickArrivalDepositApplyExample.java#L36) +[POST /sapi/v1/capital/deposit/credit-apply](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#one-click-arrival-deposit-apply) - oneClickArrivalDepositApply - [OneClickArrivalDepositApplyExample.java:37](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/OneClickArrivalDepositApplyExample.java#L37) -[POST /sapi/v1/capital/withdraw/apply](https://developers.binance.com/docs/wallet/capital/Withdraw) - withdraw - [WithdrawExample.java:49](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawExample.java#L49) +[POST /sapi/v1/capital/withdraw/apply](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#withdraw) - withdraw - [WithdrawExample.java:51](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawExample.java#L51) -[GET /sapi/v1/capital/withdraw/history](https://developers.binance.com/docs/wallet/capital/Withdraw-History) - withdrawHistory - [WithdrawHistoryExample.java:42](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawHistoryExample.java#L42) +[GET /sapi/v1/capital/withdraw/history](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#withdraw-history) - withdrawHistory - [WithdrawHistoryExample.java:43](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawHistoryExample.java#L43) ## Others -[GET /sapi/v1/spot/delist-schedule](https://developers.binance.com/docs/wallet/others/delist-schedule) - getSymbolsDelistScheduleForSpot - [GetSymbolsDelistScheduleForSpotExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/others/GetSymbolsDelistScheduleForSpotExample.java#L34) +[GET /sapi/v1/spot/delist-schedule](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/others#get-symbols-delist-schedule-for-spot) - getSymbolsDelistScheduleForSpot - [GetSymbolsDelistScheduleForSpotExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/others/GetSymbolsDelistScheduleForSpotExample.java#L35) -[GET /sapi/v1/system/status](https://developers.binance.com/docs/wallet/others/System-Status) - systemStatus - [SystemStatusExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/others/SystemStatusExample.java#L34) +[GET /sapi/v1/system/status](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/others#system-status) - systemStatus - [SystemStatusExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/others/SystemStatusExample.java#L35) ## TravelRule -[POST /sapi/v1/localentity/broker/withdraw/apply](https://developers.binance.com/docs/wallet/travel-rule/Broker-Withdraw) - brokerWithdraw - [BrokerWithdrawExample.java:40](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/BrokerWithdrawExample.java#L40) +[POST /sapi/v1/localentity/broker/withdraw/apply](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#broker-withdraw) - brokerWithdraw - [BrokerWithdrawExample.java:44](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/BrokerWithdrawExample.java#L44) -[GET /sapi/v1/localentity/questionnaire-requirements](https://developers.binance.com/docs/wallet/travel-rule/questionnaire-requirements) - checkQuestionnaireRequirements - [CheckQuestionnaireRequirementsExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/CheckQuestionnaireRequirementsExample.java#L36) +[GET /sapi/v1/localentity/questionnaire-requirements](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#check-questionnaire-requirements) - checkQuestionnaireRequirements - [CheckQuestionnaireRequirementsExample.java:37](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/CheckQuestionnaireRequirementsExample.java#L37) -[GET /sapi/v1/localentity/deposit/history](https://developers.binance.com/docs/wallet/travel-rule/Deposit-History) - depositHistoryTravelRule - [DepositHistoryTravelRuleExample.java:41](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryTravelRuleExample.java#L41) +[GET /sapi/v1/localentity/deposit/history](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#deposit-history-travel-rule) - depositHistoryTravelRule - [DepositHistoryTravelRuleExample.java:42](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryTravelRuleExample.java#L42) -[GET /sapi/v2/localentity/deposit/history](https://developers.binance.com/docs/wallet/travel-rule/Deposit-History-V2) - depositHistoryV2 - [DepositHistoryV2Example.java:41](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryV2Example.java#L41) +[GET /sapi/v2/localentity/deposit/history](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#deposit-history-v2) - depositHistoryV2 - [DepositHistoryV2Example.java:42](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryV2Example.java#L42) -[GET /sapi/v1/addressVerify/list](https://developers.binance.com/docs/wallet/travel-rule/address-verification-list) - fetchAddressVerificationList - [FetchAddressVerificationListExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/FetchAddressVerificationListExample.java#L35) +[GET /sapi/v1/addressVerify/list](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#fetch-address-verification-list) - fetchAddressVerificationList - [FetchAddressVerificationListExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/FetchAddressVerificationListExample.java#L36) -[GET /sapi/v1/localentity/country/list](https://developers.binance.com/docs/wallet/travel-rule/country-list) - getCountryList - [GetCountryListExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetCountryListExample.java#L35) +[GET /sapi/v1/localentity/country/list](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#get-country-list) - getCountryList - [GetCountryListExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetCountryListExample.java#L36) -[GET /sapi/v1/localentity/region/list](https://developers.binance.com/docs/wallet/travel-rule/region-list) - getRegionList - [GetRegionListExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetRegionListExample.java#L35) +[GET /sapi/v1/localentity/region/list](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#get-region-list) - getRegionList - [GetRegionListExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetRegionListExample.java#L36) -[PUT /sapi/v1/localentity/broker/deposit/provide-info](https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info) - submitDepositQuestionnaire - [SubmitDepositQuestionnaireExample.java:40](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireExample.java#L40) +[PUT /sapi/v1/localentity/broker/deposit/provide-info](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#submit-deposit-questionnaire) - submitDepositQuestionnaire - [SubmitDepositQuestionnaireExample.java:43](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireExample.java#L43) -[PUT /sapi/v1/localentity/deposit/provide-info](https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info) - submitDepositQuestionnaireTravelRule - [SubmitDepositQuestionnaireTravelRuleExample.java:40](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireTravelRuleExample.java#L40) +[PUT /sapi/v1/localentity/deposit/provide-info](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#submit-deposit-questionnaire-travel-rule) - submitDepositQuestionnaireTravelRule - [SubmitDepositQuestionnaireTravelRuleExample.java:42](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireTravelRuleExample.java#L42) -[PUT /sapi/v2/localentity/deposit/provide-info](https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info-v2) - submitDepositQuestionnaireV2 - [SubmitDepositQuestionnaireV2Example.java:40](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireV2Example.java#L40) +[PUT /sapi/v2/localentity/deposit/provide-info](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#submit-deposit-questionnaire-v2) - submitDepositQuestionnaireV2 - [SubmitDepositQuestionnaireV2Example.java:42](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireV2Example.java#L42) -[GET /sapi/v1/localentity/vasp](https://developers.binance.com/docs/wallet/travel-rule/onboarded-vasp-list) - vaspList - [VaspListExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/VaspListExample.java#L34) +[GET /sapi/v1/localentity/vasp](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#vasp-list) - vaspList - [VaspListExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/VaspListExample.java#L35) -[GET /sapi/v1/localentity/withdraw/history](https://developers.binance.com/docs/wallet/travel-rule/Withdraw-History) - withdrawHistoryV1 - [WithdrawHistoryV1Example.java:39](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawHistoryV1Example.java#L39) +[GET /sapi/v1/localentity/withdraw/history](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#withdraw-history-v1) - withdrawHistoryV1 - [WithdrawHistoryV1Example.java:40](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawHistoryV1Example.java#L40) -[GET /sapi/v2/localentity/withdraw/history](https://developers.binance.com/docs/wallet/travel-rule/Withdraw-History-V2) - withdrawHistoryV2 - [WithdrawHistoryV2Example.java:44](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawHistoryV2Example.java#L44) +[GET /sapi/v2/localentity/withdraw/history](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#withdraw-history-v2) - withdrawHistoryV2 - [WithdrawHistoryV2Example.java:46](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawHistoryV2Example.java#L46) -[POST /sapi/v1/localentity/withdraw/apply](https://developers.binance.com/docs/wallet/travel-rule/Withdraw) - withdrawTravelRule - [WithdrawTravelRuleExample.java:41](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawTravelRuleExample.java#L41) +[POST /sapi/v1/localentity/withdraw/apply](https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#withdraw-travel-rule) - withdrawTravelRule - [WithdrawTravelRuleExample.java:44](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawTravelRuleExample.java#L44) diff --git a/clients/wallet/pom.xml b/clients/wallet/pom.xml index ed4baac25..68d0d91c5 100644 --- a/clients/wallet/pom.xml +++ b/clients/wallet/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-wallet wallet - 5.0.0 + 6.0.0 jar io.github.binance binance-connector-java-clients - 1.1.2 + 1.1.3 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.4.2 + 2.5.1 \ No newline at end of file diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/JSON.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/JSON.java index 3a2e0f29d..34c1468ac 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/JSON.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/JSON.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -324,12 +324,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.wallet.rest.model.GetRegionListResponseRegionsInner .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.wallet.rest.model.GetSpotDelistScheduleResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.wallet.rest.model - .GetSpotDelistScheduleResponseInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.wallet.rest.model .GetSymbolsDelistScheduleForSpotResponse.CustomTypeAdapterFactory()); @@ -427,10 +421,10 @@ private static Class getClassByDiscriminator( new com.binance.connector.client.wallet.rest.model.WithdrawHistoryV1Response .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.wallet.rest.model.WithdrawHistoryV2Response + new com.binance.connector.client.wallet.rest.model.WithdrawHistoryV1ResponseInner .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.wallet.rest.model.WithdrawHistoryV2ResponseInner + new com.binance.connector.client.wallet.rest.model.WithdrawHistoryV2Response .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.wallet.rest.model.WithdrawRequest diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AccountApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AccountApi.java index 848783fb9..27bfb32c6 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AccountApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AccountApi.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -26,6 +26,7 @@ import com.binance.connector.client.wallet.rest.model.DisableFastWithdrawSwitchRequest; import com.binance.connector.client.wallet.rest.model.EnableFastWithdrawSwitchRequest; import com.binance.connector.client.wallet.rest.model.GetApiKeyPermissionResponse; +import com.binance.connector.client.wallet.rest.model.OrderType; import com.google.gson.reflect.TypeToken; import jakarta.validation.ConstraintViolation; import jakarta.validation.Valid; @@ -49,7 +50,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-wallet/5.0.0 (Java/%s; %s; %s)", + "binance-wallet/6.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -100,7 +101,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#account-api-trading-status">Account * API Trading Status (USER_DATA) Documentation */ private okhttp3.Call accountApiTradingStatusCall(Long recvWindow) throws ApiException { @@ -194,7 +195,8 @@ private okhttp3.Call accountApiTradingStatusValidateBeforeCall(Long recvWindow) } /** - * Account API Trading Status (USER_DATA) Fetch account api trading status detail. Weight: 1 + * Account API Trading Status (USER_DATA) Fetch account api trading status detail. Weight(IP): 1 + * Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<AccountApiTradingStatusResponse> @@ -208,11 +210,11 @@ private okhttp3.Call accountApiTradingStatusValidateBeforeCall(Long recvWindow) * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#account-api-trading-status">Account * API Trading Status (USER_DATA) Documentation */ - public ApiResponse accountApiTradingStatus(Long recvWindow) - throws ApiException { + public ApiResponse accountApiTradingStatus( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = accountApiTradingStatusValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -232,8 +234,9 @@ public ApiResponse accountApiTradingStatus(Long * 200 Account info - * * - * @see Account info - * (USER_DATA) Documentation + * @see Account + * info (USER_DATA) Documentation */ private okhttp3.Call accountInfoCall(Long recvWindow) throws ApiException { String basePath = null; @@ -325,7 +328,7 @@ private okhttp3.Call accountInfoValidateBeforeCall(Long recvWindow) throws ApiEx } /** - * Account info (USER_DATA) Fetch account info detail. Weight: 1 + * Account info (USER_DATA) Fetch account info detail. Weight(IP): 1 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<AccountInfoResponse> @@ -338,10 +341,12 @@ private okhttp3.Call accountInfoValidateBeforeCall(Long recvWindow) throws ApiEx * 200 Account info - * * - * @see Account info - * (USER_DATA) Documentation + * @see Account + * info (USER_DATA) Documentation */ - public ApiResponse accountInfo(Long recvWindow) throws ApiException { + public ApiResponse accountInfo(@Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = accountInfoValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -361,7 +366,8 @@ public ApiResponse accountInfo(Long recvWindow) throws ApiE * 200 Account Status - * * - * @see Account + * @see Account * Status (USER_DATA) Documentation */ private okhttp3.Call accountStatusCall(Long recvWindow) throws ApiException { @@ -454,7 +460,8 @@ private okhttp3.Call accountStatusValidateBeforeCall(Long recvWindow) throws Api } /** - * Account Status (USER_DATA) Fetch account status detail. Weight: 1 + * Account Status (USER_DATA) Fetch account status detail. Weight(IP): 1 Security Type: + * USER_DATA * * @param recvWindow (optional) * @return ApiResponse<AccountStatusResponse> @@ -467,10 +474,12 @@ private okhttp3.Call accountStatusValidateBeforeCall(Long recvWindow) throws Api * 200 Account Status - * * - * @see Account + * @see Account * Status (USER_DATA) Documentation */ - public ApiResponse accountStatus(Long recvWindow) throws ApiException { + public ApiResponse accountStatus(@Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = accountStatusValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -483,7 +492,7 @@ public ApiResponse accountStatus(Long recvWindow) throws * @param type (required) * @param startTime (optional) * @param endTime (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param limit (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -495,11 +504,11 @@ public ApiResponse accountStatus(Long recvWindow) throws * * * @see Daily + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#daily-account-snapshot">Daily * Account Snapshot (USER_DATA) Documentation */ private okhttp3.Call dailyAccountSnapshotCall( - String type, Long startTime, Long endTime, Long limit, Long recvWindow) + OrderType type, Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { String basePath = null; // Operation Servers @@ -577,7 +586,7 @@ private okhttp3.Call dailyAccountSnapshotCall( @SuppressWarnings("rawtypes") private okhttp3.Call dailyAccountSnapshotValidateBeforeCall( - String type, Long startTime, Long endTime, Long limit, Long recvWindow) + OrderType type, Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { try { Validator validator = @@ -593,7 +602,7 @@ private okhttp3.Call dailyAccountSnapshotValidateBeforeCall( this.getClass() .getMethod( "dailyAccountSnapshot", - String.class, + OrderType.class, Long.class, Long.class, Long.class, @@ -616,14 +625,15 @@ private okhttp3.Call dailyAccountSnapshotValidateBeforeCall( } /** - * Daily Account Snapshot (USER_DATA) Daily account snapshot * The query time period must be - * less then 30 days * Support query within the last one month only * If startTimeand endTime - * not sent, return records of the last 7 days by default Weight: 2400 + * Daily Account Snapshot (USER_DATA) Daily account snapshot Weight(IP): 2400 Security Type: + * USER_DATA Notes: - The query time period must be less then 30 days - Support query within the + * last one month only - If startTimeand endTime not sent, return records of the last 7 days by + * default * * @param type (required) * @param startTime (optional) * @param endTime (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<DailyAccountSnapshotResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -636,11 +646,15 @@ private okhttp3.Call dailyAccountSnapshotValidateBeforeCall( * * * @see Daily + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#daily-account-snapshot">Daily * Account Snapshot (USER_DATA) Documentation */ public ApiResponse dailyAccountSnapshot( - @NotNull String type, Long startTime, Long endTime, Long limit, Long recvWindow) + @NotNull OrderType type, + Long startTime, + Long endTime, + @Min(7L) @Max(30L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = dailyAccountSnapshotValidateBeforeCall(type, startTime, endTime, limit, recvWindow); @@ -652,7 +666,7 @@ public ApiResponse dailyAccountSnapshot( /** * Build call for disableFastWithdrawSwitch * - * @param disableFastWithdrawSwitchRequest (required) + * @param disableFastWithdrawSwitchRequest (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -663,7 +677,7 @@ public ApiResponse dailyAccountSnapshot( * * * @see Disable + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#disable-fast-withdraw-switch">Disable * Fast Withdraw Switch (USER_DATA) Documentation */ private okhttp3.Call disableFastWithdrawSwitchCall( @@ -762,9 +776,11 @@ private okhttp3.Call disableFastWithdrawSwitchValidateBeforeCall( } /** - * Disable Fast Withdraw Switch (USER_DATA) Weight: 1 + * Disable Fast Withdraw Switch (USER_DATA) Disable Fast Withdraw Switch Weight(IP): 1 Security + * Type: USER_DATA Notes: - This request will disable fastwithdraw switch under your account. + * You need to enable \"trade\" option for the api key which requests this endpoint. * - * @param disableFastWithdrawSwitchRequest (required) + * @param disableFastWithdrawSwitchRequest (optional) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -776,11 +792,11 @@ private okhttp3.Call disableFastWithdrawSwitchValidateBeforeCall( * * * @see Disable + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#disable-fast-withdraw-switch">Disable * Fast Withdraw Switch (USER_DATA) Documentation */ public ApiResponse disableFastWithdrawSwitch( - @Valid @NotNull DisableFastWithdrawSwitchRequest disableFastWithdrawSwitchRequest) + @Valid DisableFastWithdrawSwitchRequest disableFastWithdrawSwitchRequest) throws ApiException { okhttp3.Call localVarCall = disableFastWithdrawSwitchValidateBeforeCall(disableFastWithdrawSwitchRequest); @@ -790,7 +806,7 @@ public ApiResponse disableFastWithdrawSwitch( /** * Build call for enableFastWithdrawSwitch * - * @param enableFastWithdrawSwitchRequest (required) + * @param enableFastWithdrawSwitchRequest (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -801,7 +817,7 @@ public ApiResponse disableFastWithdrawSwitch( * * * @see Enable + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#enable-fast-withdraw-switch">Enable * Fast Withdraw Switch (USER_DATA) Documentation */ private okhttp3.Call enableFastWithdrawSwitchCall( @@ -900,12 +916,13 @@ private okhttp3.Call enableFastWithdrawSwitchValidateBeforeCall( } /** - * Enable Fast Withdraw Switch (USER_DATA) Enable Fast Withdraw Switch (USER_DATA) * This - * request will enable fastwithdraw switch under your account. <br></br> * When Fast - * Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There - * is no on-chain transaction, no transaction ID and no withdrawal fee. Weight: 1 + * Enable Fast Withdraw Switch (USER_DATA) Enable Fast Withdraw Switch (USER_DATA) Weight(IP): 1 + * Security Type: USER_DATA Notes: - This request will enable fastwithdraw switch under your + * account. You need to enable \"trade\" option for the api key which requests this + * endpoint. - When Fast Withdraw Switch is on, transferring funds to a Binance account will be + * done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee. * - * @param enableFastWithdrawSwitchRequest (required) + * @param enableFastWithdrawSwitchRequest (optional) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -917,11 +934,11 @@ private okhttp3.Call enableFastWithdrawSwitchValidateBeforeCall( * * * @see Enable + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#enable-fast-withdraw-switch">Enable * Fast Withdraw Switch (USER_DATA) Documentation */ public ApiResponse enableFastWithdrawSwitch( - @Valid @NotNull EnableFastWithdrawSwitchRequest enableFastWithdrawSwitchRequest) + @Valid EnableFastWithdrawSwitchRequest enableFastWithdrawSwitchRequest) throws ApiException { okhttp3.Call localVarCall = enableFastWithdrawSwitchValidateBeforeCall(enableFastWithdrawSwitchRequest); @@ -941,8 +958,9 @@ public ApiResponse enableFastWithdrawSwitch( * 200 Get API Key Permission - * * - * @see Get API - * Key Permission (USER_DATA) Documentation + * @see Get + * API Key Permission (USER_DATA) Documentation */ private okhttp3.Call getApiKeyPermissionCall(Long recvWindow) throws ApiException { String basePath = null; @@ -1035,7 +1053,8 @@ private okhttp3.Call getApiKeyPermissionValidateBeforeCall(Long recvWindow) } /** - * Get API Key Permission (USER_DATA) Get API Key Permission Weight: 1 + * Get API Key Permission (USER_DATA) Get API Key Permission Weight(IP): 1 Security Type: + * USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetApiKeyPermissionResponse> @@ -1048,11 +1067,12 @@ private okhttp3.Call getApiKeyPermissionValidateBeforeCall(Long recvWindow) * 200 Get API Key Permission - * * - * @see Get API - * Key Permission (USER_DATA) Documentation + * @see Get + * API Key Permission (USER_DATA) Documentation */ - public ApiResponse getApiKeyPermission(Long recvWindow) - throws ApiException { + public ApiResponse getApiKeyPermission( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getApiKeyPermissionValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AssetApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AssetApi.java index de911b71c..ef0a002ff 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AssetApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AssetApi.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -20,6 +20,7 @@ import com.binance.connector.client.common.SystemUtil; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.exception.ConstraintViolationException; +import com.binance.connector.client.wallet.rest.model.AccountType; import com.binance.connector.client.wallet.rest.model.AssetDetailResponse; import com.binance.connector.client.wallet.rest.model.AssetDividendRecordResponse; import com.binance.connector.client.wallet.rest.model.DustConvertRequest; @@ -29,15 +30,18 @@ import com.binance.connector.client.wallet.rest.model.DustTransferRequest; import com.binance.connector.client.wallet.rest.model.DustTransferResponse; import com.binance.connector.client.wallet.rest.model.DustlogResponse; +import com.binance.connector.client.wallet.rest.model.FromSymbol; import com.binance.connector.client.wallet.rest.model.FundingWalletRequest; import com.binance.connector.client.wallet.rest.model.FundingWalletResponse; import com.binance.connector.client.wallet.rest.model.GetAssetsThatCanBeConvertedIntoBnbRequest; import com.binance.connector.client.wallet.rest.model.GetAssetsThatCanBeConvertedIntoBnbResponse; import com.binance.connector.client.wallet.rest.model.GetCloudMiningPaymentAndRefundHistoryResponse; import com.binance.connector.client.wallet.rest.model.GetOpenSymbolListResponse; +import com.binance.connector.client.wallet.rest.model.OrderType; import com.binance.connector.client.wallet.rest.model.QueryUserDelegationHistoryResponse; import com.binance.connector.client.wallet.rest.model.QueryUserUniversalTransferHistoryResponse; import com.binance.connector.client.wallet.rest.model.QueryUserWalletBalanceResponse; +import com.binance.connector.client.wallet.rest.model.ToSymbol; import com.binance.connector.client.wallet.rest.model.ToggleBnbBurnOnSpotTradeAndMarginInterestRequest; import com.binance.connector.client.wallet.rest.model.ToggleBnbBurnOnSpotTradeAndMarginInterestResponse; import com.binance.connector.client.wallet.rest.model.TradeFeeResponse; @@ -68,7 +72,7 @@ public class AssetApi { private static final String USER_AGENT = String.format( - "binance-wallet/5.0.0 (Java/%s; %s; %s)", + "binance-wallet/6.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -119,8 +123,9 @@ public void setCustomBaseUrl(String customBaseUrl) { * 200 Asset Detail - * * - * @see Asset Detail - * (USER_DATA) Documentation + * @see Asset + * Detail (USER_DATA) Documentation */ private okhttp3.Call assetDetailCall(String asset, Long recvWindow) throws ApiException { String basePath = null; @@ -217,9 +222,9 @@ private okhttp3.Call assetDetailValidateBeforeCall(String asset, Long recvWindow } /** - * Asset Detail (USER_DATA) Fetch details of assets supported on Binance. * Please get network - * and other deposit or withdraw details from ``GET - * /sapi/v1/capital/config/getall``. Weight: 1 + * Asset Detail (USER_DATA) Fetch details of assets supported on Binance. Weight(IP): 1 Security + * Type: USER_DATA Notes: - Please get network and other deposit or withdraw details from + * `GET /sapi/v1/capital/config/getall`. * * @param asset (optional) * @param recvWindow (optional) @@ -233,10 +238,11 @@ private okhttp3.Call assetDetailValidateBeforeCall(String asset, Long recvWindow * 200 Asset Detail - * * - * @see Asset Detail - * (USER_DATA) Documentation + * @see Asset + * Detail (USER_DATA) Documentation */ - public ApiResponse assetDetail(String asset, Long recvWindow) + public ApiResponse assetDetail(String asset, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = assetDetailValidateBeforeCall(asset, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -250,7 +256,7 @@ public ApiResponse assetDetail(String asset, Long recvWindo * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param limit (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -261,7 +267,8 @@ public ApiResponse assetDetail(String asset, Long recvWindo * 200 Asset Dividend Record - * * - * @see Asset + * @see Asset * Dividend Record (USER_DATA) Documentation */ private okhttp3.Call assetDividendRecordCall( @@ -382,13 +389,14 @@ private okhttp3.Call assetDividendRecordValidateBeforeCall( } /** - * Asset Dividend Record (USER_DATA) Query asset dividend record. * There cannot be more than - * 180 days between parameter `startTime` and `endTime`. Weight: 10 + * Asset Dividend Record (USER_DATA) Query asset dividend record. Weight(IP): 10 Security Type: + * USER_DATA Notes: - There cannot be more than 180 days between parameter `startTime` + * and `endTime`. * * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<AssetDividendRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -400,11 +408,16 @@ private okhttp3.Call assetDividendRecordValidateBeforeCall( * 200 Asset Dividend Record - * * - * @see Asset + * @see Asset * Dividend Record (USER_DATA) Documentation */ public ApiResponse assetDividendRecord( - String asset, Long startTime, Long endTime, Long limit, Long recvWindow) + String asset, + Long startTime, + Long endTime, + @Max(500L) Long limit, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = assetDividendRecordValidateBeforeCall(asset, startTime, endTime, limit, recvWindow); @@ -426,8 +439,9 @@ public ApiResponse assetDividendRecord( * 200 Dust Convert - * * - * @see Dust Convert - * (USER_DATA) Documentation + * @see Dust + * Convert (USER_DATA) Documentation */ private okhttp3.Call dustConvertCall(DustConvertRequest dustConvertRequest) throws ApiException { @@ -545,7 +559,7 @@ private okhttp3.Call dustConvertValidateBeforeCall(DustConvertRequest dustConver } /** - * Dust Convert (USER_DATA) Convert dust assets Weight: 10 + * Dust Convert (USER_DATA) Convert dust assets Weight(UID): 10 Security Type: USER_DATA * * @param dustConvertRequest (required) * @return ApiResponse<DustConvertResponse> @@ -558,8 +572,9 @@ private okhttp3.Call dustConvertValidateBeforeCall(DustConvertRequest dustConver * 200 Dust Convert - * * - * @see Dust Convert - * (USER_DATA) Documentation + * @see Dust + * Convert (USER_DATA) Documentation */ public ApiResponse dustConvert( @Valid @NotNull DustConvertRequest dustConvertRequest) throws ApiException { @@ -582,7 +597,8 @@ public ApiResponse dustConvert( * 200 Dust Convertible Assets - * * - * @see Dust + * @see Dust * Convertible Assets (USER_DATA) Documentation */ private okhttp3.Call dustConvertibleAssetsCall( @@ -692,7 +708,8 @@ private okhttp3.Call dustConvertibleAssetsValidateBeforeCall( } /** - * Dust Convertible Assets (USER_DATA) Query dust convertible assets Weight: 1 + * Dust Convertible Assets (USER_DATA) Query dust convertible assets Weight(IP): 1 Security + * Type: USER_DATA * * @param dustConvertibleAssetsRequest (required) * @return ApiResponse<DustConvertibleAssetsResponse> @@ -705,7 +722,8 @@ private okhttp3.Call dustConvertibleAssetsValidateBeforeCall( * 200 Dust Convertible Assets - * * - * @see Dust + * @see Dust * Convertible Assets (USER_DATA) Documentation */ public ApiResponse dustConvertibleAssets( @@ -731,8 +749,9 @@ public ApiResponse dustConvertibleAssets( * 200 Dust Transfer - * * - * @see Dust Transfer - * (USER_DATA) Documentation + * @see Dust + * Transfer (USER_DATA) Documentation */ private okhttp3.Call dustTransferCall(DustTransferRequest dustTransferRequest) throws ApiException { @@ -834,9 +853,9 @@ private okhttp3.Call dustTransferValidateBeforeCall(DustTransferRequest dustTran } /** - * Dust Transfer (USER_DATA) Convert dust assets to BNB. * You need to open`Enable Spot - * & Margin Trading` permission for the API Key which requests this endpoint. Weight: - * 10 + * Dust Transfer (USER_DATA) Convert dust assets to BNB. Weight(UID): 10 Security Type: + * USER_DATA Notes: - You need to open`Enable Spot & Margin Trading` permission + * for the API Key which requests this endpoint. * * @param dustTransferRequest (required) * @return ApiResponse<DustTransferResponse> @@ -849,8 +868,9 @@ private okhttp3.Call dustTransferValidateBeforeCall(DustTransferRequest dustTran * 200 Dust Transfer - * * - * @see Dust Transfer - * (USER_DATA) Documentation + * @see Dust + * Transfer (USER_DATA) Documentation */ public ApiResponse dustTransfer( @Valid @NotNull DustTransferRequest dustTransferRequest) throws ApiException { @@ -863,7 +883,7 @@ public ApiResponse dustTransfer( /** * Build call for dustlog * - * @param accountType `SPOT`or`MARGIN`,default`SPOT` (optional) + * @param accountType (optional, default to SPOT) * @param startTime (optional) * @param endTime (optional) * @param recvWindow (optional) @@ -876,11 +896,13 @@ public ApiResponse dustTransfer( * 200 DustLog - * * - * @see DustLog(USER_DATA) - * Documentation + * @see DustLog + * (USER_DATA) Documentation */ private okhttp3.Call dustlogCall( - String accountType, Long startTime, Long endTime, Long recvWindow) throws ApiException { + AccountType accountType, Long startTime, Long endTime, Long recvWindow) + throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] {}; @@ -954,7 +976,8 @@ private okhttp3.Call dustlogCall( @SuppressWarnings("rawtypes") private okhttp3.Call dustlogValidateBeforeCall( - String accountType, Long startTime, Long endTime, Long recvWindow) throws ApiException { + AccountType accountType, Long startTime, Long endTime, Long recvWindow) + throws ApiException { try { Validator validator = Validation.byDefaultProvider() @@ -967,7 +990,12 @@ private okhttp3.Call dustlogValidateBeforeCall( Object[] parameterValues = {accountType, startTime, endTime, recvWindow}; Method method = this.getClass() - .getMethod("dustlog", String.class, Long.class, Long.class, Long.class); + .getMethod( + "dustlog", + AccountType.class, + Long.class, + Long.class, + Long.class); Set> violations = executableValidator.validateParameters(this, method, parameterValues); @@ -986,10 +1014,10 @@ private okhttp3.Call dustlogValidateBeforeCall( } /** - * DustLog(USER_DATA) Dustlog * Only return last 100 records * Only return records after - * 2020/12/01 Weight: 1 + * DustLog (USER_DATA) Dustlog Weight(IP): 1 Security Type: USER_DATA Notes: - Only return last + * 100 records - Only return records after 2020/12/01 * - * @param accountType `SPOT`or`MARGIN`,default`SPOT` (optional) + * @param accountType (optional, default to SPOT) * @param startTime (optional) * @param endTime (optional) * @param recvWindow (optional) @@ -1003,11 +1031,13 @@ private okhttp3.Call dustlogValidateBeforeCall( * 200 DustLog - * * - * @see DustLog(USER_DATA) - * Documentation + * @see DustLog + * (USER_DATA) Documentation */ public ApiResponse dustlog( - String accountType, Long startTime, Long endTime, Long recvWindow) throws ApiException { + AccountType accountType, Long startTime, Long endTime, @Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = dustlogValidateBeforeCall(accountType, startTime, endTime, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -1017,7 +1047,7 @@ public ApiResponse dustlog( /** * Build call for fundingWallet * - * @param fundingWalletRequest (required) + * @param fundingWalletRequest (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1027,8 +1057,9 @@ public ApiResponse dustlog( * 200 Funding Wallet - * * - * @see Funding Wallet - * (USER_DATA) Documentation + * @see Funding + * Wallet (USER_DATA) Documentation */ private okhttp3.Call fundingWalletCall(FundingWalletRequest fundingWalletRequest) throws ApiException { @@ -1130,10 +1161,11 @@ private okhttp3.Call fundingWalletValidateBeforeCall(FundingWalletRequest fundin } /** - * Funding Wallet (USER_DATA) Query Funding Wallet * Currently supports querying the following - * business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token Weight: 1 + * Funding Wallet (USER_DATA) Query Funding Wallet Weight(IP): 1 Security Type: USER_DATA Notes: + * - Currently supports querying the following business assets:Binance Pay, Binance Card, + * Binance Gift Card, Stock Token * - * @param fundingWalletRequest (required) + * @param fundingWalletRequest (optional) * @return ApiResponse<FundingWalletResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1144,11 +1176,12 @@ private okhttp3.Call fundingWalletValidateBeforeCall(FundingWalletRequest fundin * 200 Funding Wallet - * * - * @see Funding Wallet - * (USER_DATA) Documentation + * @see Funding + * Wallet (USER_DATA) Documentation */ public ApiResponse fundingWallet( - @Valid @NotNull FundingWalletRequest fundingWalletRequest) throws ApiException { + @Valid FundingWalletRequest fundingWalletRequest) throws ApiException { okhttp3.Call localVarCall = fundingWalletValidateBeforeCall(fundingWalletRequest); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -1158,7 +1191,7 @@ public ApiResponse fundingWallet( /** * Build call for getAssetsThatCanBeConvertedIntoBnb * - * @param getAssetsThatCanBeConvertedIntoBnbRequest (required) + * @param getAssetsThatCanBeConvertedIntoBnbRequest (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1168,7 +1201,8 @@ public ApiResponse fundingWallet( * 200 Get Assets That Can Be Converted Into BNB - * * - * @see Get + * @see Get * Assets That Can Be Converted Into BNB (USER_DATA) Documentation */ private okhttp3.Call getAssetsThatCanBeConvertedIntoBnbCall( @@ -1277,9 +1311,9 @@ private okhttp3.Call getAssetsThatCanBeConvertedIntoBnbValidateBeforeCall( /** * Get Assets That Can Be Converted Into BNB (USER_DATA) Get Assets That Can Be Converted Into - * BNB Weight: 1 + * BNB Weight(IP): 1 Security Type: USER_DATA * - * @param getAssetsThatCanBeConvertedIntoBnbRequest (required) + * @param getAssetsThatCanBeConvertedIntoBnbRequest (optional) * @return ApiResponse<GetAssetsThatCanBeConvertedIntoBnbResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1290,12 +1324,13 @@ private okhttp3.Call getAssetsThatCanBeConvertedIntoBnbValidateBeforeCall( * 200 Get Assets That Can Be Converted Into BNB - * * - * @see Get + * @see Get * Assets That Can Be Converted Into BNB (USER_DATA) Documentation */ public ApiResponse getAssetsThatCanBeConvertedIntoBnb( - @Valid @NotNull + @Valid GetAssetsThatCanBeConvertedIntoBnbRequest getAssetsThatCanBeConvertedIntoBnbRequest) throws ApiException { @@ -1310,13 +1345,13 @@ private okhttp3.Call getAssetsThatCanBeConvertedIntoBnbValidateBeforeCall( /** * Build call for getCloudMiningPaymentAndRefundHistory * - * @param startTime (required) - * @param endTime (required) + * @param startTime inclusive, unit: ms (required) + * @param endTime exclusive, unit: ms (required) * @param tranId The transaction id (optional) * @param clientTranId The unique flag (optional) - * @param asset (optional) - * @param current current page, default 1, the min value is 1 (optional) - * @param size page size, default 10, the max value is 100 (optional) + * @param asset If it is blank, we will query all assets (optional) + * @param current (optional) + * @param size (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1327,7 +1362,7 @@ private okhttp3.Call getAssetsThatCanBeConvertedIntoBnbValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#get-cloud-mining-payment-and-refund-history">Get * Cloud-Mining payment and refund history (USER_DATA) Documentation */ private okhttp3.Call getCloudMiningPaymentAndRefundHistoryCall( @@ -1475,17 +1510,17 @@ private okhttp3.Call getCloudMiningPaymentAndRefundHistoryValidateBeforeCall( /** * Get Cloud-Mining payment and refund history (USER_DATA) The query of Cloud-Mining payment and - * refund history * Just return the SUCCESS records of payment and refund. * For response, type - * = 248 means payment, type = 249 means refund, status =S means SUCCESS. Weight: - * 600 + * refund history Weight(UID): 600 Security Type: USER_DATA Notes: - Just return the SUCCESS + * records of payment and refund. - For response, type = 248 means payment, type = 249 + * means refund, status =S means SUCCESS. * - * @param startTime (required) - * @param endTime (required) + * @param startTime inclusive, unit: ms (required) + * @param endTime exclusive, unit: ms (required) * @param tranId The transaction id (optional) * @param clientTranId The unique flag (optional) - * @param asset (optional) - * @param current current page, default 1, the min value is 1 (optional) - * @param size page size, default 10, the max value is 100 (optional) + * @param asset If it is blank, we will query all assets (optional) + * @param current (optional) + * @param size (optional) * @return ApiResponse<GetCloudMiningPaymentAndRefundHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1497,7 +1532,7 @@ private okhttp3.Call getCloudMiningPaymentAndRefundHistoryValidateBeforeCall( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#get-cloud-mining-payment-and-refund-history">Get * Cloud-Mining payment and refund history (USER_DATA) Documentation */ public ApiResponse @@ -1507,8 +1542,8 @@ private okhttp3.Call getCloudMiningPaymentAndRefundHistoryValidateBeforeCall( Long tranId, String clientTranId, String asset, - Long current, - Long size) + @Min(1L) Long current, + @Max(100L) Long size) throws ApiException { okhttp3.Call localVarCall = getCloudMiningPaymentAndRefundHistoryValidateBeforeCall( @@ -1530,8 +1565,9 @@ private okhttp3.Call getCloudMiningPaymentAndRefundHistoryValidateBeforeCall( * 200 Get Open Symbol List - * * - * @see Get Open - * Symbol List (MARKET_DATA) Documentation + * @see Get + * Open Symbol List (MARKET_DATA) Documentation */ private okhttp3.Call getOpenSymbolListCall() throws ApiException { String basePath = null; @@ -1619,7 +1655,7 @@ private okhttp3.Call getOpenSymbolListValidateBeforeCall() throws ApiException { /** * Get Open Symbol List (MARKET_DATA) Get the list of symbols that are scheduled to be opened - * for trading in the market. Weight: 100 + * for trading in the market. Weight(IP): 100 Security Type: MARKET_DATA * * @return ApiResponse<GetOpenSymbolListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1631,8 +1667,9 @@ private okhttp3.Call getOpenSymbolListValidateBeforeCall() throws ApiException { * 200 Get Open Symbol List - * * - * @see Get Open - * Symbol List (MARKET_DATA) Documentation + * @see Get + * Open Symbol List (MARKET_DATA) Documentation */ public ApiResponse getOpenSymbolList() throws ApiException { okhttp3.Call localVarCall = getOpenSymbolListValidateBeforeCall(); @@ -1647,10 +1684,10 @@ public ApiResponse getOpenSymbolList() throws ApiExce * @param email (required) * @param startTime (required) * @param endTime (required) - * @param type Delegate/Undelegate (optional) + * @param type (optional) * @param asset (optional) - * @param current current page, default 1, the min value is 1 (optional) - * @param size page size, default 10, the max value is 100 (optional) + * @param current (optional) + * @param size (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1661,14 +1698,15 @@ public ApiResponse getOpenSymbolList() throws ApiExce * 200 User Delegation History - * * - * @see Query - * User Delegation History(For Master Account)(USER_DATA) Documentation + * @see Query + * User Delegation History(For Master Account) (USER_DATA) Documentation */ private okhttp3.Call queryUserDelegationHistoryCall( String email, Long startTime, Long endTime, - String type, + OrderType type, String asset, Long current, Long size, @@ -1765,7 +1803,7 @@ private okhttp3.Call queryUserDelegationHistoryValidateBeforeCall( String email, Long startTime, Long endTime, - String type, + OrderType type, String asset, Long current, Long size, @@ -1790,7 +1828,7 @@ private okhttp3.Call queryUserDelegationHistoryValidateBeforeCall( String.class, Long.class, Long.class, - String.class, + OrderType.class, String.class, Long.class, Long.class, @@ -1814,16 +1852,16 @@ private okhttp3.Call queryUserDelegationHistoryValidateBeforeCall( } /** - * Query User Delegation History(For Master Account)(USER_DATA) Query User Delegation History - * Weight: 60 + * Query User Delegation History(For Master Account) (USER_DATA) Query User Delegation History + * Weight(IP): 60 Security Type: USER_DATA * * @param email (required) * @param startTime (required) * @param endTime (required) - * @param type Delegate/Undelegate (optional) + * @param type (optional) * @param asset (optional) - * @param current current page, default 1, the min value is 1 (optional) - * @param size page size, default 10, the max value is 100 (optional) + * @param current (optional) + * @param size (optional) * @param recvWindow (optional) * @return ApiResponse<QueryUserDelegationHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1835,18 +1873,19 @@ private okhttp3.Call queryUserDelegationHistoryValidateBeforeCall( * 200 User Delegation History - * * - * @see Query - * User Delegation History(For Master Account)(USER_DATA) Documentation + * @see Query + * User Delegation History(For Master Account) (USER_DATA) Documentation */ public ApiResponse queryUserDelegationHistory( @NotNull String email, @NotNull Long startTime, @NotNull Long endTime, - String type, + OrderType type, String asset, - Long current, - Long size, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryUserDelegationHistoryValidateBeforeCall( @@ -1862,8 +1901,8 @@ public ApiResponse queryUserDelegationHistor * @param type (required) * @param startTime (optional) * @param endTime (optional) - * @param current current page, default 1, the min value is 1 (optional) - * @param size page size, default 10, the max value is 100 (optional) + * @param current (optional) + * @param size (optional) * @param fromSymbol (optional) * @param toSymbol (optional) * @param recvWindow (optional) @@ -1877,8 +1916,8 @@ public ApiResponse queryUserDelegationHistor * * * @see Query - * User Universal Transfer History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#query-user-universal-transfer-history">Query + * User Universal Transfer History (USER_DATA) Documentation */ private okhttp3.Call queryUserUniversalTransferHistoryCall( String type, @@ -1886,8 +1925,8 @@ private okhttp3.Call queryUserUniversalTransferHistoryCall( Long endTime, Long current, Long size, - String fromSymbol, - String toSymbol, + FromSymbol fromSymbol, + ToSymbol toSymbol, Long recvWindow) throws ApiException { String basePath = null; @@ -1983,8 +2022,8 @@ private okhttp3.Call queryUserUniversalTransferHistoryValidateBeforeCall( Long endTime, Long current, Long size, - String fromSymbol, - String toSymbol, + FromSymbol fromSymbol, + ToSymbol toSymbol, Long recvWindow) throws ApiException { try { @@ -2008,8 +2047,8 @@ private okhttp3.Call queryUserUniversalTransferHistoryValidateBeforeCall( Long.class, Long.class, Long.class, - String.class, - String.class, + FromSymbol.class, + ToSymbol.class, Long.class); Set> violations = executableValidator.validateParameters(this, method, parameterValues); @@ -2030,18 +2069,18 @@ private okhttp3.Call queryUserUniversalTransferHistoryValidateBeforeCall( } /** - * Query User Universal Transfer History(USER_DATA) Query User Universal Transfer History * - * `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and - * ISOLATEDMARGIN_ISOLATEDMARGIN * `toSymbol` must be sent when type are - * MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN * Support query within the last 6 - * months only * If `startTime`and `endTime` not sent, return records of the - * last 7 days by default Weight: 1 + * Query User Universal Transfer History (USER_DATA) Query User Universal Transfer History + * Weight(IP): 1 Security Type: USER_DATA Notes: - `fromSymbol` must be sent when type + * are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be + * sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - Support query + * within the last 6 months only - If `startTime`and `endTime` not sent, + * return records of the last 7 days by default * * @param type (required) * @param startTime (optional) * @param endTime (optional) - * @param current current page, default 1, the min value is 1 (optional) - * @param size page size, default 10, the max value is 100 (optional) + * @param current (optional) + * @param size (optional) * @param fromSymbol (optional) * @param toSymbol (optional) * @param recvWindow (optional) @@ -2056,18 +2095,18 @@ private okhttp3.Call queryUserUniversalTransferHistoryValidateBeforeCall( * * * @see Query - * User Universal Transfer History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#query-user-universal-transfer-history">Query + * User Universal Transfer History (USER_DATA) Documentation */ public ApiResponse queryUserUniversalTransferHistory( @NotNull String type, Long startTime, Long endTime, - Long current, - Long size, - String fromSymbol, - String toSymbol, - Long recvWindow) + @Min(1L) Long current, + @Max(100L) Long size, + FromSymbol fromSymbol, + ToSymbol toSymbol, + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryUserUniversalTransferHistoryValidateBeforeCall( @@ -2080,8 +2119,7 @@ public ApiResponse queryUserUniversal /** * Build call for queryUserWalletBalance * - * @param quoteAsset `USDT`, `ETH`, `USDC`, `BNB`, etc. - * default `BTC` (optional) + * @param quoteAsset (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2093,7 +2131,7 @@ public ApiResponse queryUserUniversal * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#query-user-wallet-balance">Query * User Wallet Balance (USER_DATA) Documentation */ private okhttp3.Call queryUserWalletBalanceCall(String quoteAsset, Long recvWindow) @@ -2193,10 +2231,10 @@ private okhttp3.Call queryUserWalletBalanceValidateBeforeCall( } /** - * Query User Wallet Balance (USER_DATA) Query User Wallet Balance Weight: 60 + * Query User Wallet Balance (USER_DATA) Query User Wallet Balance Weight(IP): 60 Security Type: + * USER_DATA * - * @param quoteAsset `USDT`, `ETH`, `USDC`, `BNB`, etc. - * default `BTC` (optional) + * @param quoteAsset (optional) * @param recvWindow (optional) * @return ApiResponse<QueryUserWalletBalanceResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2209,11 +2247,11 @@ private okhttp3.Call queryUserWalletBalanceValidateBeforeCall( * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#query-user-wallet-balance">Query * User Wallet Balance (USER_DATA) Documentation */ public ApiResponse queryUserWalletBalance( - String quoteAsset, Long recvWindow) throws ApiException { + String quoteAsset, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = queryUserWalletBalanceValidateBeforeCall(quoteAsset, recvWindow); java.lang.reflect.Type localVarReturnType = @@ -2224,7 +2262,7 @@ public ApiResponse queryUserWalletBalance( /** * Build call for toggleBnbBurnOnSpotTradeAndMarginInterest * - * @param toggleBnbBurnOnSpotTradeAndMarginInterestRequest (required) + * @param toggleBnbBurnOnSpotTradeAndMarginInterestRequest (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2235,7 +2273,7 @@ public ApiResponse queryUserWalletBalance( * * * @see Toggle + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#toggle-bnb-burn-on-spot-trade-and-margin-interest">Toggle * BNB Burn On Spot Trade And Margin Interest (USER_DATA) Documentation */ private okhttp3.Call toggleBnbBurnOnSpotTradeAndMarginInterestCall( @@ -2353,10 +2391,10 @@ private okhttp3.Call toggleBnbBurnOnSpotTradeAndMarginInterestValidateBeforeCall /** * Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) Toggle BNB Burn On Spot Trade - * And Margin Interest * \"spotBNBBurn\" and \"interestBNBBurn\" should be - * sent at least one. Weight: 1(IP) + * And Margin Interest Weight(IP): 1 Security Type: USER_DATA Notes: - \"spotBNBBurn\" + * and \"interestBNBBurn\" should be sent at least one. * - * @param toggleBnbBurnOnSpotTradeAndMarginInterestRequest (required) + * @param toggleBnbBurnOnSpotTradeAndMarginInterestRequest (optional) * @return ApiResponse<ToggleBnbBurnOnSpotTradeAndMarginInterestResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2368,12 +2406,12 @@ private okhttp3.Call toggleBnbBurnOnSpotTradeAndMarginInterestValidateBeforeCall * * * @see Toggle + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#toggle-bnb-burn-on-spot-trade-and-margin-interest">Toggle * BNB Burn On Spot Trade And Margin Interest (USER_DATA) Documentation */ public ApiResponse toggleBnbBurnOnSpotTradeAndMarginInterest( - @Valid @NotNull + @Valid ToggleBnbBurnOnSpotTradeAndMarginInterestRequest toggleBnbBurnOnSpotTradeAndMarginInterestRequest) throws ApiException { @@ -2399,8 +2437,9 @@ private okhttp3.Call toggleBnbBurnOnSpotTradeAndMarginInterestValidateBeforeCall * 200 Trade Fee - * * - * @see Trade Fee - * (USER_DATA) Documentation + * @see Trade + * Fee (USER_DATA) Documentation */ private okhttp3.Call tradeFeeCall(String symbol, Long recvWindow) throws ApiException { String basePath = null; @@ -2497,7 +2536,7 @@ private okhttp3.Call tradeFeeValidateBeforeCall(String symbol, Long recvWindow) } /** - * Trade Fee (USER_DATA) Fetch trade fee Weight: 1 + * Trade Fee (USER_DATA) Fetch trade fee Weight(IP): 1 Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -2511,10 +2550,11 @@ private okhttp3.Call tradeFeeValidateBeforeCall(String symbol, Long recvWindow) * 200 Trade Fee - * * - * @see Trade Fee - * (USER_DATA) Documentation + * @see Trade + * Fee (USER_DATA) Documentation */ - public ApiResponse tradeFee(String symbol, Long recvWindow) + public ApiResponse tradeFee(String symbol, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = tradeFeeValidateBeforeCall(symbol, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -2524,7 +2564,7 @@ public ApiResponse tradeFee(String symbol, Long recvWindow) /** * Build call for userAsset * - * @param userAssetRequest (required) + * @param userAssetRequest (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -2534,8 +2574,9 @@ public ApiResponse tradeFee(String symbol, Long recvWindow) * 200 User Asset - * * - * @see User Asset - * (USER_DATA) Documentation + * @see User + * Asset (USER_DATA) Documentation */ private okhttp3.Call userAssetCall(UserAssetRequest userAssetRequest) throws ApiException { String basePath = null; @@ -2636,11 +2677,11 @@ private okhttp3.Call userAssetValidateBeforeCall(UserAssetRequest userAssetReque } /** - * User Asset (USER_DATA) Get user assets, just for positive data. * If asset is set, then - * return this asset, otherwise return all assets positive. * If needBtcValuation is set, then - * return btcValudation. Weight: 5 + * User Asset (USER_DATA) Get user assets, just for positive data. Weight(IP): 5 Security Type: + * USER_DATA Notes: - If asset is set, then return this asset, otherwise return all assets + * positive. - If needBtcValuation is set, then return btcValudation. * - * @param userAssetRequest (required) + * @param userAssetRequest (optional) * @return ApiResponse<UserAssetResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -2651,11 +2692,12 @@ private okhttp3.Call userAssetValidateBeforeCall(UserAssetRequest userAssetReque * 200 User Asset - * * - * @see User Asset - * (USER_DATA) Documentation + * @see User + * Asset (USER_DATA) Documentation */ - public ApiResponse userAsset( - @Valid @NotNull UserAssetRequest userAssetRequest) throws ApiException { + public ApiResponse userAsset(@Valid UserAssetRequest userAssetRequest) + throws ApiException { okhttp3.Call localVarCall = userAssetValidateBeforeCall(userAssetRequest); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2674,7 +2716,8 @@ public ApiResponse userAsset( * 200 User Universal Transfer - * * - * @see User + * @see User * Universal Transfer (USER_DATA) Documentation */ private okhttp3.Call userUniversalTransferCall( @@ -2794,33 +2837,32 @@ private okhttp3.Call userUniversalTransferValidateBeforeCall( } /** - * User Universal Transfer (USER_DATA) user universal transfer * `fromSymbol` must be - * sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN * - * `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and - * ISOLATEDMARGIN_ISOLATEDMARGIN * ENUM of transfer types: * MAIN_UMFUTURE Spot account transfer - * to USDⓈ-M Futures account * MAIN_CMFUTURE Spot account transfer to COIN-M Futures account * - * MAIN_MARGIN Spot account transfer to Margin(cross)account * UMFUTURE_MAIN USDⓈ-M Futures - * account transfer to Spot account * UMFUTURE_MARGIN USDⓈ-M Futures account transfer to - * Margin(cross)account * CMFUTURE_MAIN COIN-M Futures account transfer to Spot account * - * CMFUTURE_MARGIN COIN-M Futures account transfer to Margin(cross) account * MARGIN_MAIN - * Margin(cross)account transfer to Spot account * MARGIN_UMFUTURE Margin(cross)account transfer - * to USDⓈ-M Futures * MARGIN_CMFUTURE Margin(cross)account transfer to COIN-M Futures * - * ISOLATEDMARGIN_MARGIN Isolated margin account transfer to Margin(cross) account * - * MARGIN_ISOLATEDMARGIN Margin(cross) account transfer to Isolated margin account * - * ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account transfer to Isolated margin account * - * MAIN_FUNDING Spot account transfer to Funding account * FUNDING_MAIN Funding account transfer - * to Spot account * FUNDING_UMFUTURE Funding account transfer to UMFUTURE account * - * UMFUTURE_FUNDING UMFUTURE account transfer to Funding account * MARGIN_FUNDING MARGIN account - * transfer to Funding account * FUNDING_MARGIN Funding account transfer to Margin account * - * FUNDING_CMFUTURE Funding account transfer to CMFUTURE account * CMFUTURE_FUNDING CMFUTURE - * account transfer to Funding account * MAIN_OPTION Spot account transfer to Options account * - * OPTION_MAIN Options account transfer to Spot account * UMFUTURE_OPTION USDⓈ-M Futures account - * transfer to Options account * OPTION_UMFUTURE Options account transfer to USDⓈ-M Futures - * account * MARGIN_OPTION Margin(cross)account transfer to Options account * OPTION_MARGIN - * Options account transfer to Margin(cross)account * FUNDING_OPTION Funding account transfer to - * Options account * OPTION_FUNDING Options account transfer to Funding account * - * MAIN_PORTFOLIO_MARGIN Spot account transfer to Portfolio Margin account * - * PORTFOLIO_MARGIN_MAIN Portfolio Margin account transfer to Spot account Weight: 900 + * User Universal Transfer (USER_DATA) User universal transfer Weight(UID): 900 Security Type: + * USER_DATA Notes: - You need to enable Permits Universal Transfer option for the API Key that + * requests this endpoint. - `fromSymbol` must be sent when type is + * `ISOLATEDMARGIN_MARGIN` or `ISOLATEDMARGIN_ISOLATEDMARGIN`. - + * `toSymbol` must be sent when type is `MARGIN_ISOLATEDMARGIN` or + * `ISOLATEDMARGIN_ISOLATEDMARGIN`. - ENUM of transfer types: - + * `MAIN_UMFUTURE`: Spot → USDⓈ-M Futures - `MAIN_CMFUTURE`: Spot → COIN-M + * Futures - `MAIN_MARGIN`: Spot → Margin (cross) - `UMFUTURE_MAIN`: USDⓈ-M + * Futures → Spot - `UMFUTURE_MARGIN`: USDⓈ-M Futures → Margin (cross) - + * `CMFUTURE_MAIN`: COIN-M Futures → Spot - `CMFUTURE_MARGIN`: COIN-M + * Futures → Margin (cross) - `MARGIN_MAIN`: Margin (cross) → Spot - + * `MARGIN_UMFUTURE`: Margin (cross) → USDⓈ-M Futures - `MARGIN_CMFUTURE`: + * Margin (cross) → COIN-M Futures - `ISOLATEDMARGIN_MARGIN`: Isolated margin → Margin + * (cross) - `MARGIN_ISOLATEDMARGIN`: Margin (cross) → Isolated margin - + * `ISOLATEDMARGIN_ISOLATEDMARGIN`: Isolated margin → Isolated margin - + * `MAIN_FUNDING`: Spot → Funding - `FUNDING_MAIN`: Funding → Spot - + * `FUNDING_UMFUTURE`: Funding → USDⓈ-M Futures - `UMFUTURE_FUNDING`: USDⓈ-M + * Futures → Funding - `MARGIN_FUNDING`: Margin (cross) → Funding - + * `FUNDING_MARGIN`: Funding → Margin (cross) - `FUNDING_CMFUTURE`: Funding + * → COIN-M Futures - `CMFUTURE_FUNDING`: COIN-M Futures → Funding - + * `MAIN_OPTION`: Spot → Options - `OPTION_MAIN`: Options → Spot - + * `UMFUTURE_OPTION`: USDⓈ-M Futures → Options - `OPTION_UMFUTURE`: Options + * → USDⓈ-M Futures - `MARGIN_OPTION`: Margin (cross) → Options - + * `OPTION_MARGIN`: Options → Margin (cross) - `FUNDING_OPTION`: Funding → + * Options - `OPTION_FUNDING`: Options → Funding - `MAIN_PORTFOLIO_MARGIN`: + * Spot → Portfolio Margin - `PORTFOLIO_MARGIN_MAIN`: Portfolio Margin → Spot * * @param userUniversalTransferRequest (required) * @return ApiResponse<UserUniversalTransferResponse> @@ -2833,7 +2875,8 @@ private okhttp3.Call userUniversalTransferValidateBeforeCall( * 200 User Universal Transfer - * * - * @see User + * @see User * Universal Transfer (USER_DATA) Documentation */ public ApiResponse userUniversalTransfer( diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/CapitalApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/CapitalApi.java index 5ea717d4b..391884947 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/CapitalApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/CapitalApi.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -28,6 +28,7 @@ import com.binance.connector.client.wallet.rest.model.FetchWithdrawQuotaResponse; import com.binance.connector.client.wallet.rest.model.OneClickArrivalDepositApplyRequest; import com.binance.connector.client.wallet.rest.model.OneClickArrivalDepositApplyResponse; +import com.binance.connector.client.wallet.rest.model.Status; import com.binance.connector.client.wallet.rest.model.WithdrawHistoryResponse; import com.binance.connector.client.wallet.rest.model.WithdrawRequest; import com.binance.connector.client.wallet.rest.model.WithdrawResponse; @@ -54,7 +55,7 @@ public class CapitalApi { private static final String USER_AGENT = String.format( - "binance-wallet/5.0.0 (Java/%s; %s; %s)", + "binance-wallet/6.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -104,7 +105,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * 200 All Coins' Information - * * - * @see All + * @see All * Coins' Information (USER_DATA) Documentation */ private okhttp3.Call allCoinsInformationCall(Long recvWindow) throws ApiException { @@ -199,7 +201,7 @@ private okhttp3.Call allCoinsInformationValidateBeforeCall(Long recvWindow) /** * All Coins' Information (USER_DATA) Get information of coins (available for deposit and - * withdraw) for user. Weight: 10 + * withdraw) for user. Weight(IP): 10 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<AllCoinsInformationResponse> @@ -212,11 +214,12 @@ private okhttp3.Call allCoinsInformationValidateBeforeCall(Long recvWindow) * 200 All Coins' Information - * * - * @see All + * @see All * Coins' Information (USER_DATA) Documentation */ - public ApiResponse allCoinsInformation(Long recvWindow) - throws ApiException { + public ApiResponse allCoinsInformation( + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = allCoinsInformationValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -240,7 +243,8 @@ public ApiResponse allCoinsInformation(Long recvWin * 200 Deposit Address - * * - * @see Deposit + * @see Deposit * Address(supporting network) (USER_DATA) Documentation */ private okhttp3.Call depositAddressCall( @@ -356,11 +360,11 @@ private okhttp3.Call depositAddressValidateBeforeCall( } /** - * Deposit Address(supporting network) (USER_DATA) Fetch deposit address with network. * If - * `network` is not send, return with default network of the coin. * You can get - * `network` and `isDefault` in `networkList` in the response of - * `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. * `amount` needs to - * be sent if using LIGHTNING network Weight: 10 + * Deposit Address(supporting network) (USER_DATA) Fetch deposit address with network. + * Weight(IP): 10 Security Type: USER_DATA Notes: - If `network` is not send, return + * with default network of the coin. - You can get `network` and `isDefault` + * in `networkList` in the response of `Get /sapi/v1/capital/config/getall (HMAC + * SHA256)`. - `amount` needs to be sent if using LIGHTNING network * * @param coin `coin` refers to the parent network address format that the address is * using (required) @@ -377,11 +381,12 @@ private okhttp3.Call depositAddressValidateBeforeCall( * 200 Deposit Address - * * - * @see Deposit + * @see Deposit * Address(supporting network) (USER_DATA) Documentation */ public ApiResponse depositAddress( - @NotNull String coin, String network, Double amount, Long recvWindow) + @NotNull String coin, String network, Double amount, @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = depositAddressValidateBeforeCall(coin, network, amount, recvWindow); @@ -393,15 +398,15 @@ public ApiResponse depositAddress( /** * Build call for depositHistory * - * @param includeSource Default: `false`, return `sourceAddress`field when - * set to `true` (optional) - * @param coin (optional) - * @param status 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed) + * @param includeSource return `sourceAddress` field when set to `true` * (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param coin (optional) + * @param status 0: pending, 6: credited but cannot withdraw, 7: Wrong Deposit, 8: Waiting User + * confirm, 1: success (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) + * @param offset (optional) + * @param limit (optional) * @param recvWindow (optional) * @param txId (optional) * @return Call to execute @@ -413,13 +418,14 @@ public ApiResponse depositAddress( * 200 Deposit History - * * - * @see Deposit + * @see Deposit * History (supporting network) (USER_DATA) Documentation */ private okhttp3.Call depositHistoryCall( Boolean includeSource, String coin, - Long status, + Status status, Long startTime, Long endTime, Long offset, @@ -522,7 +528,7 @@ private okhttp3.Call depositHistoryCall( private okhttp3.Call depositHistoryValidateBeforeCall( Boolean includeSource, String coin, - Long status, + Status status, Long startTime, Long endTime, Long offset, @@ -548,7 +554,7 @@ private okhttp3.Call depositHistoryValidateBeforeCall( "depositHistory", Boolean.class, String.class, - Long.class, + Status.class, Long.class, Long.class, Long.class, @@ -582,21 +588,21 @@ private okhttp3.Call depositHistoryValidateBeforeCall( } /** - * Deposit History (supporting network) (USER_DATA) Fetch deposit history. * Please notice the - * default `startTime` and `endTime` to make sure that time interval is - * within 0-90 days. * If both ``startTime`` and - * ``endTime`` are sent, time between ``startTime`` and - * ``endTime`` must be less than 90 days. Weight: 1 + * Deposit History (supporting network) (USER_DATA) Fetch deposit history. Weight(IP): 1 + * Security Type: USER_DATA Notes: - Please notice the default `startTime` and + * `endTime` to make sure that time interval is within 0-90 days. - If both + * `startTime` and `endTime` are sent, time between `startTime` + * and `endTime` must be less than 90 days. * - * @param includeSource Default: `false`, return `sourceAddress`field when - * set to `true` (optional) - * @param coin (optional) - * @param status 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed) + * @param includeSource return `sourceAddress` field when set to `true` * (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param coin (optional) + * @param status 0: pending, 6: credited but cannot withdraw, 7: Wrong Deposit, 8: Waiting User + * confirm, 1: success (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) + * @param offset (optional) + * @param limit (optional) * @param recvWindow (optional) * @param txId (optional) * @return ApiResponse<DepositHistoryResponse> @@ -609,18 +615,19 @@ private okhttp3.Call depositHistoryValidateBeforeCall( * 200 Deposit History - * * - * @see Deposit + * @see Deposit * History (supporting network) (USER_DATA) Documentation */ public ApiResponse depositHistory( Boolean includeSource, String coin, - Long status, + Status status, Long startTime, Long endTime, Long offset, - Long limit, - Long recvWindow, + @Max(1000L) Long limit, + @Max(60000L) Long recvWindow, String txId) throws ApiException { okhttp3.Call localVarCall = @@ -642,9 +649,10 @@ public ApiResponse depositHistory( /** * Build call for fetchDepositAddressListWithNetwork * - * @param coin `coin` refers to the parent network address format that the address is - * using (required) - * @param network (optional) + * @param coin Coin name (required) + * @param network If network is not send, return with default network of the coin. You can get + * network and isDefault in networkList in the response of `Get + * /sapi/v1/capital/config/getall` (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -655,8 +663,8 @@ public ApiResponse depositHistory( * * * @see Fetch - * deposit address list with network(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#fetch-deposit-address-list-with-network">Fetch + * deposit address list with network (USER_DATA) Documentation */ private okhttp3.Call fetchDepositAddressListWithNetworkCall(String coin, String network) throws ApiException { @@ -759,14 +767,13 @@ private okhttp3.Call fetchDepositAddressListWithNetworkValidateBeforeCall( } /** - * Fetch deposit address list with network(USER_DATA) Fetch deposit address list with network. * - * If network is not send, return with default network of the coin. * You can get network and - * isDefault in networkList in the response of `Get /sapi/v1/capital/config/getall`. - * Weight: 10 + * Fetch deposit address list with network (USER_DATA) Fetch deposit address list with network. + * Weight(IP): 10 Security Type: USER_DATA * - * @param coin `coin` refers to the parent network address format that the address is - * using (required) - * @param network (optional) + * @param coin Coin name (required) + * @param network If network is not send, return with default network of the coin. You can get + * network and isDefault in networkList in the response of `Get + * /sapi/v1/capital/config/getall` (optional) * @return ApiResponse<FetchDepositAddressListWithNetworkResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -778,8 +785,8 @@ private okhttp3.Call fetchDepositAddressListWithNetworkValidateBeforeCall( * * * @see Fetch - * deposit address list with network(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#fetch-deposit-address-list-with-network">Fetch + * deposit address list with network (USER_DATA) Documentation */ public ApiResponse fetchDepositAddressListWithNetwork(@NotNull String coin, String network) @@ -804,7 +811,7 @@ private okhttp3.Call fetchDepositAddressListWithNetworkValidateBeforeCall( * * * @see Fetch + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#fetch-withdraw-address-list">Fetch * withdraw address list (USER_DATA) Documentation */ private okhttp3.Call fetchWithdrawAddressListCall() throws ApiException { @@ -893,7 +900,8 @@ private okhttp3.Call fetchWithdrawAddressListValidateBeforeCall() throws ApiExce } /** - * Fetch withdraw address list (USER_DATA) Fetch withdraw address list Weight: 10 + * Fetch withdraw address list (USER_DATA) Fetch withdraw address list Weight(IP): 10 Security + * Type: USER_DATA * * @return ApiResponse<FetchWithdrawAddressListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -906,7 +914,7 @@ private okhttp3.Call fetchWithdrawAddressListValidateBeforeCall() throws ApiExce * * * @see Fetch + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#fetch-withdraw-address-list">Fetch * withdraw address list (USER_DATA) Documentation */ public ApiResponse fetchWithdrawAddressList() @@ -929,7 +937,8 @@ public ApiResponse fetchWithdrawAddressList() * 200 Fetch withdraw quota - * * - * @see Fetch + * @see Fetch * withdraw quota (USER_DATA) Documentation */ private okhttp3.Call fetchWithdrawQuotaCall() throws ApiException { @@ -1018,7 +1027,7 @@ private okhttp3.Call fetchWithdrawQuotaValidateBeforeCall() throws ApiException } /** - * Fetch withdraw quota (USER_DATA) Fetch withdraw quota Weight: 10 + * Fetch withdraw quota (USER_DATA) Fetch withdraw quota Weight(IP): 10 Security Type: USER_DATA * * @return ApiResponse<FetchWithdrawQuotaResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1030,7 +1039,8 @@ private okhttp3.Call fetchWithdrawQuotaValidateBeforeCall() throws ApiException * 200 Fetch withdraw quota - * * - * @see Fetch + * @see Fetch * withdraw quota (USER_DATA) Documentation */ public ApiResponse fetchWithdrawQuota() throws ApiException { @@ -1043,7 +1053,7 @@ public ApiResponse fetchWithdrawQuota() throws ApiEx /** * Build call for oneClickArrivalDepositApply * - * @param oneClickArrivalDepositApplyRequest (required) + * @param oneClickArrivalDepositApplyRequest (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -1054,7 +1064,7 @@ public ApiResponse fetchWithdrawQuota() throws ApiEx * * * @see One + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#one-click-arrival-deposit-apply">One * click arrival deposit apply (for expired address deposit) (USER_DATA) Documentation */ private okhttp3.Call oneClickArrivalDepositApplyCall( @@ -1169,9 +1179,9 @@ private okhttp3.Call oneClickArrivalDepositApplyValidateBeforeCall( /** * One click arrival deposit apply (for expired address deposit) (USER_DATA) Apply deposit - * credit for expired address (One click arrival) * Params need to be in the POST body Weight: 1 + * credit for expired address (One click arrival) Weight(IP): 1 Security Type: USER_DATA * - * @param oneClickArrivalDepositApplyRequest (required) + * @param oneClickArrivalDepositApplyRequest (optional) * @return ApiResponse<OneClickArrivalDepositApplyResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1183,11 +1193,11 @@ private okhttp3.Call oneClickArrivalDepositApplyValidateBeforeCall( * * * @see One + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#one-click-arrival-deposit-apply">One * click arrival deposit apply (for expired address deposit) (USER_DATA) Documentation */ public ApiResponse oneClickArrivalDepositApply( - @Valid @NotNull OneClickArrivalDepositApplyRequest oneClickArrivalDepositApplyRequest) + @Valid OneClickArrivalDepositApplyRequest oneClickArrivalDepositApplyRequest) throws ApiException { okhttp3.Call localVarCall = oneClickArrivalDepositApplyValidateBeforeCall(oneClickArrivalDepositApplyRequest); @@ -1210,8 +1220,8 @@ public ApiResponse oneClickArrivalDepositAp * * * @see Withdraw(USER_DATA) - * Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#withdraw">Withdraw + * (USER_DATA) Documentation */ private okhttp3.Call withdrawCall(WithdrawRequest withdrawRequest) throws ApiException { String basePath = null; @@ -1341,21 +1351,22 @@ private okhttp3.Call withdrawValidateBeforeCall(WithdrawRequest withdrawRequest) } /** - * Withdraw(USER_DATA) Submit a withdraw request. * If `network` not send, return with - * default network of the coin. * You can get `network` and `isDefault` in - * `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall - * (HMAC SHA256)`. * To check if travel rule is required, by using `GET + * Withdraw (USER_DATA) Submit a withdraw request Weight(UID): 900 Security Type: USER_DATA + * Notes: - If `network` not send, return with default network of the coin. - You can + * get `network` and `isDefault` in `networkList` of a coin in the + * response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. - To check if + * travel rule is required, by using `GET * /sapi/v1/localentity/questionnaire-requirements` and if it returns anything other than * `NIL` you will need update SAPI to `POST * /sapi/v1/localentity/withdraw/apply` else you can continue `POST * /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to - * travel rule please refer to the Travel Rule SAPI. * For networks that do not support + * travel rule please refer to the Travel Rule SAPI. - \"For networks that do not support * memo/tag, submitting a withdrawal request with a non-empty `addressTag` will return * error `-4106 TAG_NOT_SUPPORTED_FOR_NETWORK`. Please omit the `addressTag` * field for such networks. You can check whether a network requires a tag via `GET - * /sapi/v1/capital/config/getall`: * If `withdrawTag` = `true` → - * memo/tag is required. * If `withdrawTag` = `false` → memo/tag is not - * supported; omit `addressTag`. Weight: 900 + * /sapi/v1/capital/config/getall`: If `withdrawTag` = `true` → + * memo/tag is required. If `withdrawTag` = `false` → memo/tag is not + * supported; omit `addressTag`.\" * * @param withdrawRequest (required) * @return ApiResponse<WithdrawResponse> @@ -1369,8 +1380,8 @@ private okhttp3.Call withdrawValidateBeforeCall(WithdrawRequest withdrawRequest) * * * @see Withdraw(USER_DATA) - * Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#withdraw">Withdraw + * (USER_DATA) Documentation */ public ApiResponse withdraw(@Valid @NotNull WithdrawRequest withdrawRequest) throws ApiException { @@ -1388,11 +1399,11 @@ public ApiResponse withdraw(@Valid @NotNull WithdrawRequest wi * @param status 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed) * (optional) * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param limit (optional) * @param idList id list returned in the response of POST * `/sapi/v1/capital/withdraw/apply`, separated by `,` (optional) - * @param startTime (optional) - * @param endTime (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1403,7 +1414,8 @@ public ApiResponse withdraw(@Valid @NotNull WithdrawRequest wi * 200 Withdraw History - * * - * @see Withdraw + * @see Withdraw * History (supporting network) (USER_DATA) Documentation */ private okhttp3.Call withdrawHistoryCall( @@ -1572,16 +1584,16 @@ private okhttp3.Call withdrawHistoryValidateBeforeCall( } /** - * Withdraw History (supporting network) (USER_DATA) Fetch withdraw history. * - * `network` may not be in the response for old withdraw. * Please notice the default - * `startTime` and `endTime` to make sure that time interval is within 0-90 - * days. * If both `startTime` and `endTime`are sent, time between - * `startTime`and `endTime`must be less than 90 days. * If - * `withdrawOrderId` is sent, time between `startTime` and - * `endTime` must be less than 7 days. * If `withdrawOrderId` is sent, - * `startTime` and `endTime` are not sent, will return last 7 days records - * by default. * Maximum support `idList` number is 45. Weight: 18000 Request limit: - * 10 requests per second + * Withdraw History (supporting network) (USER_DATA) Fetch withdraw history Weight(UID): 18000 + * (10 requests per second) Security Type: USER_DATA Notes: - `network` may not be in + * the response for old withdraw. - Please notice the default `startTime` and + * `endTime` to make sure that time interval is within 0-90 days. - If both + * `startTime` and `endTime`are sent, time between `startTime`and + * `endTime`must be less than 90 days. - If `withdrawOrderId` is sent, time + * between `startTime` and `endTime` must be less than 7 days. - If + * `withdrawOrderId` is sent, `startTime` and `endTime` are not + * sent, will return last 7 days records by default. - Maximum support `idList` number + * is 45. * * @param coin (optional) * @param withdrawOrderId client side id for withdrawal, if provided in POST @@ -1589,11 +1601,11 @@ private okhttp3.Call withdrawHistoryValidateBeforeCall( * @param status 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed) * (optional) * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param limit (optional) * @param idList id list returned in the response of POST * `/sapi/v1/capital/withdraw/apply`, separated by `,` (optional) - * @param startTime (optional) - * @param endTime (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) * @param recvWindow (optional) * @return ApiResponse<WithdrawHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1605,7 +1617,8 @@ private okhttp3.Call withdrawHistoryValidateBeforeCall( * 200 Withdraw History - * * - * @see Withdraw + * @see Withdraw * History (supporting network) (USER_DATA) Documentation */ public ApiResponse withdrawHistory( @@ -1613,11 +1626,11 @@ public ApiResponse withdrawHistory( String withdrawOrderId, Long status, Long offset, - Long limit, + @Max(1000L) Long limit, String idList, Long startTime, Long endTime, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = withdrawHistoryValidateBeforeCall( diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/OthersApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/OthersApi.java index 03b133fe8..7ee06ed85 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/OthersApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/OthersApi.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -43,7 +43,7 @@ public class OthersApi { private static final String USER_AGENT = String.format( - "binance-wallet/5.0.0 (Java/%s; %s; %s)", + "binance-wallet/6.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -93,8 +93,9 @@ public void setCustomBaseUrl(String customBaseUrl) { * 200 Get symbols delist schedule for spot - * * - * @see Get symbols - * delist schedule for spot (MARKET_DATA) Documentation + * @see Get + * Spot Delist Schedule (MARKET_DATA) Documentation */ private okhttp3.Call getSymbolsDelistScheduleForSpotCall(Long recvWindow) throws ApiException { String basePath = null; @@ -187,8 +188,8 @@ private okhttp3.Call getSymbolsDelistScheduleForSpotValidateBeforeCall(Long recv } /** - * Get symbols delist schedule for spot (MARKET_DATA) Get symbols delist schedule for spot - * Weight: 100 + * Get Spot Delist Schedule (MARKET_DATA) Get symbols delist schedule for spot Weight(IP): 100 + * Security Type: MARKET_DATA * * @param recvWindow (optional) * @return ApiResponse<GetSymbolsDelistScheduleForSpotResponse> @@ -201,11 +202,12 @@ private okhttp3.Call getSymbolsDelistScheduleForSpotValidateBeforeCall(Long recv * 200 Get symbols delist schedule for spot - * * - * @see Get symbols - * delist schedule for spot (MARKET_DATA) Documentation + * @see Get + * Spot Delist Schedule (MARKET_DATA) Documentation */ public ApiResponse getSymbolsDelistScheduleForSpot( - Long recvWindow) throws ApiException { + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = getSymbolsDelistScheduleForSpotValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -224,8 +226,9 @@ public ApiResponse getSymbolsDelistSche * 200 System Status - * * - * @see System Status - * (System) Documentation + * @see System + * Status Documentation */ private okhttp3.Call systemStatusCall() throws ApiException { String basePath = null; @@ -312,7 +315,7 @@ private okhttp3.Call systemStatusValidateBeforeCall() throws ApiException { } /** - * System Status (System) Fetch system status. Weight: 1 + * System Status Fetch system status. Weight(IP): 1 Security Type: System * * @return ApiResponse<SystemStatusResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -324,8 +327,9 @@ private okhttp3.Call systemStatusValidateBeforeCall() throws ApiException { * 200 System Status - * * - * @see System Status - * (System) Documentation + * @see System + * Status Documentation */ public ApiResponse systemStatus() throws ApiException { okhttp3.Call localVarCall = systemStatusValidateBeforeCall(); diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/TravelRuleApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/TravelRuleApi.java index 94bd142d4..19cb1322c 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/TravelRuleApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/TravelRuleApi.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -62,7 +62,7 @@ public class TravelRuleApi { private static final String USER_AGENT = String.format( - "binance-wallet/5.0.0 (Java/%s; %s; %s)", + "binance-wallet/6.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -112,7 +112,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * 200 Broker Withdraw - * * - * @see Broker + * @see Broker * Withdraw (for brokers of local entities that require travel rule) (USER_DATA) * Documentation */ @@ -189,10 +190,6 @@ private okhttp3.Call brokerWithdrawCall(BrokerWithdrawRequest brokerWithdrawRequ localVarFormParams.put("originatorPii", brokerWithdrawRequest.getOriginatorPii()); } - if (brokerWithdrawRequest.getSignature() != null) { - localVarFormParams.put("signature", brokerWithdrawRequest.getSignature()); - } - final String[] localVarAccepts = {"application/json"}; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -257,12 +254,15 @@ private okhttp3.Call brokerWithdrawValidateBeforeCall( /** * Broker Withdraw (for brokers of local entities that require travel rule) (USER_DATA) Submit a - * withdrawal request for brokers of local entities that required travel rule. * If - * `network` not send, return with default network of the coin, but if the address - * could not match default network, the withdraw will be rejected. * You can get - * `network` in `networkList` of a coin in the response * Questionnaire is - * different for each local entity, please refer to * If getting error like `Questionnaire - * format not valid.` or `Questionnaire must not be blank`, Weight: 600 + * withdrawal request for brokers of local entities that required travel rule. Weight(UID): 600 + * Security Type: USER_DATA Notes: - If `network` not send, return with default + * network of the coin, but if the address could not match default network, the withdraw will be + * rejected. - You can get `network` in `networkList` of a coin in the + * response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. - Questionnaire is + * different for each local entity, please refer to the `Withdraw Questionnaire + * Contents` page. - If getting error like `Questionnaire format not valid.` or + * `Questionnaire must not be blank`, please try to verify the format of the + * questionnaire and use URL-encoded format. * * @param brokerWithdrawRequest (required) * @return ApiResponse<BrokerWithdrawResponse> @@ -275,7 +275,8 @@ private okhttp3.Call brokerWithdrawValidateBeforeCall( * 200 Broker Withdraw - * * - * @see Broker + * @see Broker * Withdraw (for brokers of local entities that require travel rule) (USER_DATA) * Documentation */ @@ -301,7 +302,7 @@ public ApiResponse brokerWithdraw( * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#check-questionnaire-requirements">Check * Questionnaire Requirements (for local entities that require travel rule) (supporting * network) (USER_DATA) Documentation */ @@ -398,7 +399,7 @@ private okhttp3.Call checkQuestionnaireRequirementsValidateBeforeCall(Long recvW /** * Check Questionnaire Requirements (for local entities that require travel rule) (supporting * network) (USER_DATA) This API will return user-specific Travel Rule questionnaire requirement - * information in reference to the current API key. Weight: 1 + * information in reference to the current API key. Weight(IP): 1 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<CheckQuestionnaireRequirementsResponse> @@ -412,12 +413,12 @@ private okhttp3.Call checkQuestionnaireRequirementsValidateBeforeCall(Long recvW * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#check-questionnaire-requirements">Check * Questionnaire Requirements (for local entities that require travel rule) (supporting * network) (USER_DATA) Documentation */ public ApiResponse checkQuestionnaireRequirements( - Long recvWindow) throws ApiException { + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = checkQuestionnaireRequirementsValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -428,17 +429,17 @@ public ApiResponse checkQuestionnaireReq * Build call for depositHistoryTravelRule * * @param trId Comma(,) separated list of travel rule record Ids. (optional) - * @param txId (optional) + * @param txId Comma(,) separated list of transaction Ids. (optional) * @param tranId Comma(,) separated list of wallet tran Ids. (optional) * @param network (optional) * @param coin (optional) * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) * @param pendingQuestionnaire true: Only return records that pending deposit questionnaire. * false/not provided: return all records. (optional) - * @param startTime (optional) - * @param endTime (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param limit (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -448,9 +449,10 @@ public ApiResponse checkQuestionnaireReq * 200 Deposit History - * * - * @see Deposit - * History (for local entities that required travel rule) (supporting network) (USER_DATA) - * Documentation + * @see Deposit + * History Travel Rule (for local entities that required travel rule) (supporting network) + * (USER_DATA) Documentation */ private okhttp3.Call depositHistoryTravelRuleCall( String trId, @@ -646,27 +648,27 @@ private okhttp3.Call depositHistoryTravelRuleValidateBeforeCall( } /** - * Deposit History (for local entities that required travel rule) (supporting network) - * (USER_DATA) Fetch deposit history for local entities that required travel rule. * Please - * notice the default `startTime` and `endTime` to make sure that time - * interval is within * If both ``startTime`` and - * ``endTime`` are sent, time between ``startTime`` and - * ``endTime`` must * Please, note that due to network-specific - * characteristics, the returned source address may be inaccurate. If multiple source addresses - * are found, only the first one will be returned. Weight: 1 + * Deposit History Travel Rule (for local entities that required travel rule) (supporting + * network) (USER_DATA) Fetch deposit history for local entities that required travel rule. + * Weight(IP): 1 Security Type: USER_DATA Notes: - Please notice the default + * `startTime` and `endTime` to make sure that time interval is within 0-90 + * days. - If both `startTime` and `endTime` are sent, time between + * `startTime` and `endTime` must be less than 90 days. - Please, note that + * due to network-specific characteristics, the returned source address may be inaccurate. If + * multiple source addresses are found, only the first one will be returned. * * @param trId Comma(,) separated list of travel rule record Ids. (optional) - * @param txId (optional) + * @param txId Comma(,) separated list of transaction Ids. (optional) * @param tranId Comma(,) separated list of wallet tran Ids. (optional) * @param network (optional) * @param coin (optional) * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) * @param pendingQuestionnaire true: Only return records that pending deposit questionnaire. * false/not provided: return all records. (optional) - * @param startTime (optional) - * @param endTime (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param limit (optional) * @return ApiResponse<DepositHistoryTravelRuleResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -677,9 +679,10 @@ private okhttp3.Call depositHistoryTravelRuleValidateBeforeCall( * 200 Deposit History - * * - * @see Deposit - * History (for local entities that required travel rule) (supporting network) (USER_DATA) - * Documentation + * @see Deposit + * History Travel Rule (for local entities that required travel rule) (supporting network) + * (USER_DATA) Documentation */ public ApiResponse depositHistoryTravelRule( String trId, @@ -692,7 +695,7 @@ public ApiResponse depositHistoryTravelRule( Long startTime, Long endTime, Long offset, - Long limit) + @Max(1000L) Long limit) throws ApiException { okhttp3.Call localVarCall = depositHistoryTravelRuleValidateBeforeCall( @@ -716,15 +719,15 @@ public ApiResponse depositHistoryTravelRule( * Build call for depositHistoryV2 * * @param depositId Comma(,) separated list of wallet tran Ids. (optional) - * @param txId (optional) + * @param txId Comma(,) separated list of transaction Ids. (optional) * @param network (optional) * @param coin (optional) * @param retrieveQuestionnaire true: return `questionnaire` within response. * (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) + * @param offset (optional) + * @param limit (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details @@ -735,7 +738,7 @@ public ApiResponse depositHistoryTravelRule( * * * @see Deposit + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#deposit-history-v2">Deposit * History V2 (for local entities that required travel rule) (supporting network) * (USER_DATA) Documentation */ @@ -916,23 +919,23 @@ private okhttp3.Call depositHistoryV2ValidateBeforeCall( /** * Deposit History V2 (for local entities that required travel rule) (supporting network) * (USER_DATA) Fetch deposit history for local entities that with required travel rule - * information. * Please notice the default `startTime` and `endTime` to - * make sure that time interval is within * If both ``startTime`` and - * ``endTime`` are sent, time between ``startTime`` and - * ``endTime`` must * Please, note that due to network-specific - * characteristics, the returned source address may be inaccurate. If multiple source addresses - * are found, only the first one will be returned. Weight: 1 + * information. Weight(IP): 1 Security Type: USER_DATA Notes: - Please notice the default + * `startTime` and `endTime` to make sure that time interval is within 0-90 + * days. - If both `startTime` and `endTime` are sent, time between + * `startTime` and `endTime` must be less than 90 days. - Please, note that + * due to network-specific characteristics, the returned source address may be inaccurate. If + * multiple source addresses are found, only the first one will be returned. * * @param depositId Comma(,) separated list of wallet tran Ids. (optional) - * @param txId (optional) + * @param txId Comma(,) separated list of transaction Ids. (optional) * @param network (optional) * @param coin (optional) * @param retrieveQuestionnaire true: return `questionnaire` within response. * (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) + * @param offset (optional) + * @param limit (optional) * @return ApiResponse<DepositHistoryV2Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -944,7 +947,7 @@ private okhttp3.Call depositHistoryV2ValidateBeforeCall( * * * @see Deposit + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#deposit-history-v2">Deposit * History V2 (for local entities that required travel rule) (supporting network) * (USER_DATA) Documentation */ @@ -957,7 +960,7 @@ public ApiResponse depositHistoryV2( Long startTime, Long endTime, Long offset, - Long limit) + @Max(1000L) Long limit) throws ApiException { okhttp3.Call localVarCall = depositHistoryV2ValidateBeforeCall( @@ -989,7 +992,7 @@ public ApiResponse depositHistoryV2( * * * @see Fetch + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#fetch-address-verification-list">Fetch * address verification list (USER_DATA) Documentation */ private okhttp3.Call fetchAddressVerificationListCall(Long recvWindow) throws ApiException { @@ -1084,7 +1087,8 @@ private okhttp3.Call fetchAddressVerificationListValidateBeforeCall(Long recvWin /** * Fetch address verification list (USER_DATA) Fetch address verification list for user to check - * on status and other details for the addresses stored in Address Book. Weight: 1 + * on status and other details for the addresses stored in Address Book. Weight(IP): 1 Security + * Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<FetchAddressVerificationListResponse> @@ -1098,11 +1102,11 @@ private okhttp3.Call fetchAddressVerificationListValidateBeforeCall(Long recvWin * * * @see Fetch + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#fetch-address-verification-list">Fetch * address verification list (USER_DATA) Documentation */ public ApiResponse fetchAddressVerificationList( - Long recvWindow) throws ApiException { + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = fetchAddressVerificationListValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); @@ -1112,19 +1116,21 @@ public ApiResponse fetchAddressVerificatio /** * Build call for getCountryList * + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details * * * - * + * *
Response Details
Status Code Description Response Headers
200 Get Country List -
200 Country list -
* - * @see Get + * @see Get * Country List (USER_DATA) Documentation */ - private okhttp3.Call getCountryListCall() throws ApiException { + private okhttp3.Call getCountryListCall(Long recvWindow) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] {}; @@ -1149,6 +1155,10 @@ private okhttp3.Call getCountryListCall() throws ApiException { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + final String[] localVarAccepts = {"application/json"}; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1180,7 +1190,7 @@ private okhttp3.Call getCountryListCall() throws ApiException { } @SuppressWarnings("rawtypes") - private okhttp3.Call getCountryListValidateBeforeCall() throws ApiException { + private okhttp3.Call getCountryListValidateBeforeCall(Long recvWindow) throws ApiException { try { Validator validator = Validation.byDefaultProvider() @@ -1190,13 +1200,13 @@ private okhttp3.Call getCountryListValidateBeforeCall() throws ApiException { .getValidator(); ExecutableValidator executableValidator = validator.forExecutables(); - Object[] parameterValues = {}; - Method method = this.getClass().getMethod("getCountryList"); + Object[] parameterValues = {recvWindow}; + Method method = this.getClass().getMethod("getCountryList", Long.class); Set> violations = executableValidator.validateParameters(this, method, parameterValues); if (violations.size() == 0) { - return getCountryListCall(); + return getCountryListCall(recvWindow); } else { throw new ConstraintViolationException((Set) violations); } @@ -1211,8 +1221,9 @@ private okhttp3.Call getCountryListValidateBeforeCall() throws ApiException { /** * Get Country List (USER_DATA) Query the active country list for travel rule questionnaires. - * Currently, only supports AU entity. Weight: 1 + * Currently, only supports AU entity. Weight(IP): 1 Security Type: USER_DATA * + * @param recvWindow (optional) * @return ApiResponse<GetCountryListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1220,14 +1231,16 @@ private okhttp3.Call getCountryListValidateBeforeCall() throws ApiException { * * * - * + * *
Response Details
Status Code Description Response Headers
200 Get Country List -
200 Country list -
* - * @see Get + * @see Get * Country List (USER_DATA) Documentation */ - public ApiResponse getCountryList() throws ApiException { - okhttp3.Call localVarCall = getCountryListValidateBeforeCall(); + public ApiResponse getCountryList(@Max(60000L) Long recvWindow) + throws ApiException { + okhttp3.Call localVarCall = getCountryListValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1236,20 +1249,23 @@ public ApiResponse getCountryList() throws ApiException /** * Build call for getRegionList * - * @param countryCode ISO 2-digit country code (from `Country List` API). (required) + * @param countryCode ISO 2-digit country code (from Country List API). (required) + * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details * * * - * + * *
Response Details
Status Code Description Response Headers
200 Get Region List -
200 Region list -
* - * @see Get Region - * List (USER_DATA) Documentation + * @see Get + * Region List (USER_DATA) Documentation */ - private okhttp3.Call getRegionListCall(String countryCode) throws ApiException { + private okhttp3.Call getRegionListCall(String countryCode, Long recvWindow) + throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] {}; @@ -1279,6 +1295,10 @@ private okhttp3.Call getRegionListCall(String countryCode) throws ApiException { localVarApiClient.parameterToPair("countryCode", countryCode)); } + if (recvWindow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); + } + final String[] localVarAccepts = {"application/json"}; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1310,7 +1330,8 @@ private okhttp3.Call getRegionListCall(String countryCode) throws ApiException { } @SuppressWarnings("rawtypes") - private okhttp3.Call getRegionListValidateBeforeCall(String countryCode) throws ApiException { + private okhttp3.Call getRegionListValidateBeforeCall(String countryCode, Long recvWindow) + throws ApiException { try { Validator validator = Validation.byDefaultProvider() @@ -1320,13 +1341,13 @@ private okhttp3.Call getRegionListValidateBeforeCall(String countryCode) throws .getValidator(); ExecutableValidator executableValidator = validator.forExecutables(); - Object[] parameterValues = {countryCode}; - Method method = this.getClass().getMethod("getRegionList", String.class); + Object[] parameterValues = {countryCode, recvWindow}; + Method method = this.getClass().getMethod("getRegionList", String.class, Long.class); Set> violations = executableValidator.validateParameters(this, method, parameterValues); if (violations.size() == 0) { - return getRegionListCall(countryCode); + return getRegionListCall(countryCode, recvWindow); } else { throw new ConstraintViolationException((Set) violations); } @@ -1341,9 +1362,10 @@ private okhttp3.Call getRegionListValidateBeforeCall(String countryCode) throws /** * Get Region List (USER_DATA) Query the active region/city list for a given country. Currently, - * only supports AU entity. Weight: 1 + * only supports AU entity. Weight(IP): 1 Security Type: USER_DATA * - * @param countryCode ISO 2-digit country code (from `Country List` API). (required) + * @param countryCode ISO 2-digit country code (from Country List API). (required) + * @param recvWindow (optional) * @return ApiResponse<GetRegionListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1351,15 +1373,16 @@ private okhttp3.Call getRegionListValidateBeforeCall(String countryCode) throws * * * - * + * *
Response Details
Status Code Description Response Headers
200 Get Region List -
200 Region list -
* - * @see Get Region - * List (USER_DATA) Documentation + * @see Get + * Region List (USER_DATA) Documentation */ - public ApiResponse getRegionList(@NotNull String countryCode) - throws ApiException { - okhttp3.Call localVarCall = getRegionListValidateBeforeCall(countryCode); + public ApiResponse getRegionList( + @NotNull String countryCode, @Max(60000L) Long recvWindow) throws ApiException { + okhttp3.Call localVarCall = getRegionListValidateBeforeCall(countryCode, recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1379,9 +1402,9 @@ public ApiResponse getRegionList(@NotNull String countryC * * * @see Submit - * Deposit Questionnaire (For local entities that require travel rule) (supporting network) - * (USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#submit-deposit-questionnaire">Submit + * Deposit Questionnaire Broker (For local entities that require travel rule) (supporting + * network) (USER_DATA) Documentation */ private okhttp3.Call submitDepositQuestionnaireCall( SubmitDepositQuestionnaireRequest submitDepositQuestionnaireRequest) @@ -1452,10 +1475,6 @@ private okhttp3.Call submitDepositQuestionnaireCall( localVarFormParams.put("addressTag", submitDepositQuestionnaireRequest.getAddressTag()); } - if (submitDepositQuestionnaireRequest.getSignature() != null) { - localVarFormParams.put("signature", submitDepositQuestionnaireRequest.getSignature()); - } - final String[] localVarAccepts = {"application/json"}; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1523,12 +1542,14 @@ private okhttp3.Call submitDepositQuestionnaireValidateBeforeCall( } /** - * Submit Deposit Questionnaire (For local entities that require travel rule) (supporting + * Submit Deposit Questionnaire Broker (For local entities that require travel rule) (supporting * network) (USER_DATA) Submit questionnaire for brokers of local entities that require travel * rule. The questionnaire is only applies to transactions from un-hosted wallets or VASPs that - * are not yet onboarded with GTR. * Questionnaire is different for each local entity, please - * refer * If getting error like `Questionnaire format not valid.` or - * `Questionnaire must not be blank`, Weight: 600 + * are not yet onboarded with GTR. Weight(UID): 600 Security Type: USER_DATA Notes: - + * Questionnaire is different for each local entity, please refer to `Deposit Questionnaire + * Content` page. - If getting error like `Questionnaire format not valid.` or + * `Questionnaire must not be blank`, please try to verify the format of the + * questionnaire and use URL-encoded format. * * @param submitDepositQuestionnaireRequest (required) * @return ApiResponse<SubmitDepositQuestionnaireResponse> @@ -1542,9 +1563,9 @@ private okhttp3.Call submitDepositQuestionnaireValidateBeforeCall( * * * @see Submit - * Deposit Questionnaire (For local entities that require travel rule) (supporting network) - * (USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#submit-deposit-questionnaire">Submit + * Deposit Questionnaire Broker (For local entities that require travel rule) (supporting + * network) (USER_DATA) Documentation */ public ApiResponse submitDepositQuestionnaire( @Valid @NotNull SubmitDepositQuestionnaireRequest submitDepositQuestionnaireRequest) @@ -1570,7 +1591,7 @@ public ApiResponse submitDepositQuestionnair * * * @see Submit + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#submit-deposit-questionnaire-travel-rule">Submit * Deposit Questionnaire (For local entities that require travel rule) (supporting network) * (USER_DATA) Documentation */ @@ -1683,9 +1704,11 @@ private okhttp3.Call submitDepositQuestionnaireTravelRuleValidateBeforeCall( * Submit Deposit Questionnaire (For local entities that require travel rule) (supporting * network) (USER_DATA) Submit questionnaire for local entities that require travel rule. The * questionnaire is only applies to transactions from unhosted wallets or VASPs that are not yet - * onboarded with GTR. * Questionnaire is different for each local entity, please refer * If - * getting error like `Questionnaire format not valid.` or `Questionnaire must - * not be blank`, Weight: 600 + * onboarded with GTR. Weight(UID): 600 Security Type: USER_DATA Notes: - Questionnaire is + * different for each local entity, please refer to `Deposit Questionnaire Content` + * page. - If getting error like `Questionnaire format not valid.` or + * `Questionnaire must not be blank`, please try to verify the format of the + * questionnaire and use URL-encoded format. * * @param submitDepositQuestionnaireTravelRuleRequest (required) * @return ApiResponse<SubmitDepositQuestionnaireTravelRuleResponse> @@ -1699,7 +1722,7 @@ private okhttp3.Call submitDepositQuestionnaireTravelRuleValidateBeforeCall( * * * @see Submit + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#submit-deposit-questionnaire-travel-rule">Submit * Deposit Questionnaire (For local entities that require travel rule) (supporting network) * (USER_DATA) Documentation */ @@ -1731,7 +1754,7 @@ private okhttp3.Call submitDepositQuestionnaireTravelRuleValidateBeforeCall( * * * @see Submit + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#submit-deposit-questionnaire-v2">Submit * Deposit Questionnaire V2 (For local entities that require travel rule) (supporting * network) (USER_DATA) Documentation */ @@ -1841,9 +1864,11 @@ private okhttp3.Call submitDepositQuestionnaireV2ValidateBeforeCall( * Submit Deposit Questionnaire V2 (For local entities that require travel rule) (supporting * network) (USER_DATA) Submit questionnaire for local entities that require travel rule. The * questionnaire is only applies to transactions from unhosted wallets or VASPs that are not yet - * onboarded with GTR. * Questionnaire is different for each local entity, please refer * If - * getting error like `Questionnaire format not valid.` or `Questionnaire must - * not be blank`, Weight: 600 + * onboarded with GTR. Weight(UID): 600 Security Type: USER_DATA Notes: - Questionnaire is + * different for each local entity, please refer to `Deposit Questionnaire Content` + * page. - If getting error like `Questionnaire format not valid.` or + * `Questionnaire must not be blank`, please try to verify the format of the + * questionnaire and use URL-encoded format. * * @param submitDepositQuestionnaireV2Request (required) * @return ApiResponse<SubmitDepositQuestionnaireV2Response> @@ -1857,7 +1882,7 @@ private okhttp3.Call submitDepositQuestionnaireV2ValidateBeforeCall( * * * @see Submit + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#submit-deposit-questionnaire-v2">Submit * Deposit Questionnaire V2 (For local entities that require travel rule) (supporting * network) (USER_DATA) Documentation */ @@ -1885,7 +1910,7 @@ public ApiResponse submitDepositQuestionna * * * @see VASP + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#vasp-list">VASP * list (for local entities that require travel rule) (supporting network) (USER_DATA) * Documentation */ @@ -1980,7 +2005,7 @@ private okhttp3.Call vaspListValidateBeforeCall(Long recvWindow) throws ApiExcep /** * VASP list (for local entities that require travel rule) (supporting network) (USER_DATA) - * Fetch the VASP list for local entities. Weight: 1 + * Fetch the VASP list for local entities. Weight(IP): 1 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<VaspListResponse> @@ -1994,11 +2019,12 @@ private okhttp3.Call vaspListValidateBeforeCall(Long recvWindow) throws ApiExcep * * * @see VASP + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#vasp-list">VASP * list (for local entities that require travel rule) (supporting network) (USER_DATA) * Documentation */ - public ApiResponse vaspList(Long recvWindow) throws ApiException { + public ApiResponse vaspList(@Max(60000L) Long recvWindow) + throws ApiException { okhttp3.Call localVarCall = vaspListValidateBeforeCall(recvWindow); java.lang.reflect.Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2008,16 +2034,16 @@ public ApiResponse vaspList(Long recvWindow) throws ApiExcepti * Build call for withdrawHistoryV1 * * @param trId Comma(,) separated list of travel rule record Ids. (optional) - * @param txId (optional) + * @param txId Comma(,) separated list of transaction Ids. (optional) * @param withdrawOrderId client side id for withdrawal, if provided in POST * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) * @param network (optional) * @param coin (optional) * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) - * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) - * @param startTime (optional) - * @param endTime (optional) + * @param offset (optional) + * @param limit (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2029,9 +2055,8 @@ public ApiResponse vaspList(Long recvWindow) throws ApiExcepti * * * @see Withdraw - * History (for local entities that require travel rule) (supporting network) (USER_DATA) - * Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#withdraw-history-v1">Withdraw + * History Travel Rule (supporting network) (USER_DATA) Documentation */ private okhttp3.Call withdrawHistoryV1Call( String trId, @@ -2226,24 +2251,24 @@ private okhttp3.Call withdrawHistoryV1ValidateBeforeCall( } /** - * Withdraw History (for local entities that require travel rule) (supporting network) - * (USER_DATA) Fetch withdraw history for local entities that required travel rule. * - * `network` may not be in the response for old withdraw. * Please notice the default - * `startTime` and `endTime` to make sure that time interval is within * If - * both `startTime` and `endTime`are sent, time between - * `startTime`and `endTime`must be less Weight: 1 + * Withdraw History Travel Rule (supporting network) (USER_DATA) Fetch withdraw history for + * local entities that required travel rule. Weight(IP): 1 Security Type: USER_DATA Notes: - + * `network` may not be in the response for old withdraw. - Please notice the default + * `startTime` and `endTime` to make sure that time interval is within 0-90 + * days. - If both `startTime` and `endTime`are sent, time between + * `startTime`and `endTime`must be less than 90 days. * * @param trId Comma(,) separated list of travel rule record Ids. (optional) - * @param txId (optional) + * @param txId Comma(,) separated list of transaction Ids. (optional) * @param withdrawOrderId client side id for withdrawal, if provided in POST * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) * @param network (optional) * @param coin (optional) * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) - * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) - * @param startTime (optional) - * @param endTime (optional) + * @param offset (optional) + * @param limit (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) * @param recvWindow (optional) * @return ApiResponse<WithdrawHistoryV1Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2256,9 +2281,8 @@ private okhttp3.Call withdrawHistoryV1ValidateBeforeCall( * * * @see Withdraw - * History (for local entities that require travel rule) (supporting network) (USER_DATA) - * Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#withdraw-history-v1">Withdraw + * History Travel Rule (supporting network) (USER_DATA) Documentation */ public ApiResponse withdrawHistoryV1( String trId, @@ -2268,10 +2292,10 @@ public ApiResponse withdrawHistoryV1( String coin, Long travelRuleStatus, Long offset, - Long limit, + @Max(1000L) Long limit, Long startTime, Long endTime, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = withdrawHistoryV1ValidateBeforeCall( @@ -2295,16 +2319,16 @@ public ApiResponse withdrawHistoryV1( * Build call for withdrawHistoryV2 * * @param trId Comma(,) separated list of travel rule record Ids. (optional) - * @param txId (optional) + * @param txId Comma(,) separated list of transaction Ids. (optional) * @param withdrawOrderId client side id for withdrawal, if provided in POST * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) * @param network (optional) * @param coin (optional) * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) - * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) - * @param startTime (optional) - * @param endTime (optional) + * @param offset (optional) + * @param limit (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2316,7 +2340,7 @@ public ApiResponse withdrawHistoryV1( * * * @see Withdraw + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#withdraw-history-v2">Withdraw * History V2 (for local entities that require travel rule) (supporting network) (USER_DATA) * Documentation */ @@ -2514,28 +2538,29 @@ private okhttp3.Call withdrawHistoryV2ValidateBeforeCall( /** * Withdraw History V2 (for local entities that require travel rule) (supporting network) - * (USER_DATA) Fetch withdraw history for local entities that required travel rule. * - * `network` may not be in the response for old withdraw. * Withdrawal made through - * /sapi/v1/capital/withdraw/apply may not be in the response. * Please notice the default - * `startTime` and `endTime` to make sure that time interval is within * If - * both `startTime` and `endTime`are sent, time between - * `startTime`and `endTime`must be less * If withdrawOrderId is sent, time - * between startTime and endTime must be less than 7 days. * If withdrawOrderId is sent, - * startTime and endTime are not sent, will return last 7 days records by default. * Maximum - * support trId,txId number is 45. * WithdrawOrderId only support 1. * If responsible does not - * include withdrawalStatus, please input trId or txId retrieve the data. Weight: 1 + * (USER_DATA) Fetch withdraw history for local entities that required travel rule. Weight(IP): + * 1 Security Type: USER_DATA Notes: - `network` may not be in the response for old + * withdraw. - Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the + * response. - Please notice the default `startTime` and `endTime` to make + * sure that time interval is within 0-90 days. - If both `startTime` and + * `endTime`are sent, time between `startTime`and `endTime`must be + * less than 90 days. - If withdrawOrderId is sent, time between startTime and endTime must be + * less than 7 days. - If withdrawOrderId is sent, startTime and endTime are not sent, will + * return last 7 days records by default. - Maximum support trId,txId number is 45. - + * WithdrawOrderId only support 1. - If responsible does not include withdrawalStatus, please + * input trId or txId retrieve the data. * * @param trId Comma(,) separated list of travel rule record Ids. (optional) - * @param txId (optional) + * @param txId Comma(,) separated list of transaction Ids. (optional) * @param withdrawOrderId client side id for withdrawal, if provided in POST * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) * @param network (optional) * @param coin (optional) * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) - * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) - * @param startTime (optional) - * @param endTime (optional) + * @param offset (optional) + * @param limit (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) * @param recvWindow (optional) * @return ApiResponse<WithdrawHistoryV2Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2548,7 +2573,7 @@ private okhttp3.Call withdrawHistoryV2ValidateBeforeCall( * * * @see Withdraw + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#withdraw-history-v2">Withdraw * History V2 (for local entities that require travel rule) (supporting network) (USER_DATA) * Documentation */ @@ -2560,10 +2585,10 @@ public ApiResponse withdrawHistoryV2( String coin, Long travelRuleStatus, Long offset, - Long limit, + @Max(1000L) Long limit, Long startTime, Long endTime, - Long recvWindow) + @Max(60000L) Long recvWindow) throws ApiException { okhttp3.Call localVarCall = withdrawHistoryV2ValidateBeforeCall( @@ -2596,8 +2621,9 @@ public ApiResponse withdrawHistoryV2( * 200 Withdraw - * * - * @see Withdraw (for - * local entities that require travel rule) (USER_DATA) Documentation + * @see Withdraw + * Travel Rule (USER_DATA) Documentation */ private okhttp3.Call withdrawTravelRuleCall(WithdrawTravelRuleRequest withdrawTravelRuleRequest) throws ApiException { @@ -2737,13 +2763,16 @@ private okhttp3.Call withdrawTravelRuleValidateBeforeCall( } /** - * Withdraw (for local entities that require travel rule) (USER_DATA) Submit a withdrawal - * request for local entities that required travel rule. * If `network` not send, - * return with default network of the coin, but if the address could not match default network, - * the withdraw will be rejected. * You can get `network` and `isDefault` in - * `networkList` of a coin in the response * Questionnaire is different for each local - * entity, please refer to * If getting error like `Questionnaire format not valid.` - * or `Questionnaire must not be blank`, Weight: 600 + * Withdraw Travel Rule (USER_DATA) Submit a withdrawal request for local entities that required + * travel rule. Weight(UID): 600 Security Type: USER_DATA Notes: - If `network` not + * send, return with default network of the coin, but if the address could not match default + * network, the withdraw will be rejected. - You can get `network` and + * `isDefault` in `networkList` of a coin in the response of `Get + * /sapi/v1/capital/config/getall (HMAC SHA256)`. - Questionnaire is different for each + * local entity, please refer to the `Withdraw Questionnaire Contents` page. - If + * getting error like `Questionnaire format not valid.` or `Questionnaire must + * not be blank`, please try to verify the format of the questionnaire and use URL-encoded + * format. * * @param withdrawTravelRuleRequest (required) * @return ApiResponse<WithdrawTravelRuleResponse> @@ -2756,8 +2785,9 @@ private okhttp3.Call withdrawTravelRuleValidateBeforeCall( * 200 Withdraw - * * - * @see Withdraw (for - * local entities that require travel rule) (USER_DATA) Documentation + * @see Withdraw + * Travel Rule (USER_DATA) Documentation */ public ApiResponse withdrawTravelRule( @Valid @NotNull WithdrawTravelRuleRequest withdrawTravelRuleRequest) diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/WalletRestApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/WalletRestApi.java index a97a83b11..f572af2c5 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/WalletRestApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/WalletRestApi.java @@ -8,6 +8,7 @@ import com.binance.connector.client.wallet.rest.model.AccountApiTradingStatusResponse; import com.binance.connector.client.wallet.rest.model.AccountInfoResponse; import com.binance.connector.client.wallet.rest.model.AccountStatusResponse; +import com.binance.connector.client.wallet.rest.model.AccountType; import com.binance.connector.client.wallet.rest.model.AllCoinsInformationResponse; import com.binance.connector.client.wallet.rest.model.AssetDetailResponse; import com.binance.connector.client.wallet.rest.model.AssetDividendRecordResponse; @@ -32,6 +33,7 @@ import com.binance.connector.client.wallet.rest.model.FetchDepositAddressListWithNetworkResponse; import com.binance.connector.client.wallet.rest.model.FetchWithdrawAddressListResponse; import com.binance.connector.client.wallet.rest.model.FetchWithdrawQuotaResponse; +import com.binance.connector.client.wallet.rest.model.FromSymbol; import com.binance.connector.client.wallet.rest.model.FundingWalletRequest; import com.binance.connector.client.wallet.rest.model.FundingWalletResponse; import com.binance.connector.client.wallet.rest.model.GetApiKeyPermissionResponse; @@ -44,9 +46,11 @@ import com.binance.connector.client.wallet.rest.model.GetSymbolsDelistScheduleForSpotResponse; import com.binance.connector.client.wallet.rest.model.OneClickArrivalDepositApplyRequest; import com.binance.connector.client.wallet.rest.model.OneClickArrivalDepositApplyResponse; +import com.binance.connector.client.wallet.rest.model.OrderType; import com.binance.connector.client.wallet.rest.model.QueryUserDelegationHistoryResponse; import com.binance.connector.client.wallet.rest.model.QueryUserUniversalTransferHistoryResponse; import com.binance.connector.client.wallet.rest.model.QueryUserWalletBalanceResponse; +import com.binance.connector.client.wallet.rest.model.Status; import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireRequest; import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireResponse; import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireTravelRuleRequest; @@ -54,6 +58,7 @@ import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireV2Request; import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireV2Response; import com.binance.connector.client.wallet.rest.model.SystemStatusResponse; +import com.binance.connector.client.wallet.rest.model.ToSymbol; import com.binance.connector.client.wallet.rest.model.ToggleBnbBurnOnSpotTradeAndMarginInterestRequest; import com.binance.connector.client.wallet.rest.model.ToggleBnbBurnOnSpotTradeAndMarginInterestResponse; import com.binance.connector.client.wallet.rest.model.TradeFeeResponse; @@ -91,7 +96,8 @@ public WalletRestApi(ApiClient apiClient) { } /** - * Account API Trading Status (USER_DATA) Fetch account api trading status detail. Weight: 1 + * Account API Trading Status (USER_DATA) Fetch account api trading status detail. Weight(IP): 1 + * Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<AccountApiTradingStatusResponse> @@ -105,7 +111,7 @@ public WalletRestApi(ApiClient apiClient) { * * * @see Account + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#account-api-trading-status">Account * API Trading Status (USER_DATA) Documentation */ public ApiResponse accountApiTradingStatus(Long recvWindow) @@ -114,7 +120,7 @@ public ApiResponse accountApiTradingStatus(Long } /** - * Account info (USER_DATA) Fetch account info detail. Weight: 1 + * Account info (USER_DATA) Fetch account info detail. Weight(IP): 1 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<AccountInfoResponse> @@ -127,15 +133,17 @@ public ApiResponse accountApiTradingStatus(Long * 200 Account info - * * - * @see Account info - * (USER_DATA) Documentation + * @see Account + * info (USER_DATA) Documentation */ public ApiResponse accountInfo(Long recvWindow) throws ApiException { return accountApi.accountInfo(recvWindow); } /** - * Account Status (USER_DATA) Fetch account status detail. Weight: 1 + * Account Status (USER_DATA) Fetch account status detail. Weight(IP): 1 Security Type: + * USER_DATA * * @param recvWindow (optional) * @return ApiResponse<AccountStatusResponse> @@ -148,7 +156,8 @@ public ApiResponse accountInfo(Long recvWindow) throws ApiE * 200 Account Status - * * - * @see Account + * @see Account * Status (USER_DATA) Documentation */ public ApiResponse accountStatus(Long recvWindow) throws ApiException { @@ -156,14 +165,15 @@ public ApiResponse accountStatus(Long recvWindow) throws } /** - * Daily Account Snapshot (USER_DATA) Daily account snapshot * The query time period must be - * less then 30 days * Support query within the last one month only * If startTimeand endTime - * not sent, return records of the last 7 days by default Weight: 2400 + * Daily Account Snapshot (USER_DATA) Daily account snapshot Weight(IP): 2400 Security Type: + * USER_DATA Notes: - The query time period must be less then 30 days - Support query within the + * last one month only - If startTimeand endTime not sent, return records of the last 7 days by + * default * * @param type (required) * @param startTime (optional) * @param endTime (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<DailyAccountSnapshotResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -176,19 +186,21 @@ public ApiResponse accountStatus(Long recvWindow) throws * * * @see Daily + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#daily-account-snapshot">Daily * Account Snapshot (USER_DATA) Documentation */ public ApiResponse dailyAccountSnapshot( - String type, Long startTime, Long endTime, Long limit, Long recvWindow) + OrderType type, Long startTime, Long endTime, Long limit, Long recvWindow) throws ApiException { return accountApi.dailyAccountSnapshot(type, startTime, endTime, limit, recvWindow); } /** - * Disable Fast Withdraw Switch (USER_DATA) Weight: 1 + * Disable Fast Withdraw Switch (USER_DATA) Disable Fast Withdraw Switch Weight(IP): 1 Security + * Type: USER_DATA Notes: - This request will disable fastwithdraw switch under your account. + * You need to enable \"trade\" option for the api key which requests this endpoint. * - * @param disableFastWithdrawSwitchRequest (required) + * @param disableFastWithdrawSwitchRequest (optional) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -200,7 +212,7 @@ public ApiResponse dailyAccountSnapshot( * * * @see Disable + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#disable-fast-withdraw-switch">Disable * Fast Withdraw Switch (USER_DATA) Documentation */ public void disableFastWithdrawSwitch( @@ -209,12 +221,13 @@ public void disableFastWithdrawSwitch( } /** - * Enable Fast Withdraw Switch (USER_DATA) Enable Fast Withdraw Switch (USER_DATA) * This - * request will enable fastwithdraw switch under your account. <br></br> * When Fast - * Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There - * is no on-chain transaction, no transaction ID and no withdrawal fee. Weight: 1 + * Enable Fast Withdraw Switch (USER_DATA) Enable Fast Withdraw Switch (USER_DATA) Weight(IP): 1 + * Security Type: USER_DATA Notes: - This request will enable fastwithdraw switch under your + * account. You need to enable \"trade\" option for the api key which requests this + * endpoint. - When Fast Withdraw Switch is on, transferring funds to a Binance account will be + * done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee. * - * @param enableFastWithdrawSwitchRequest (required) + * @param enableFastWithdrawSwitchRequest (optional) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -226,7 +239,7 @@ public void disableFastWithdrawSwitch( * * * @see Enable + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/account#enable-fast-withdraw-switch">Enable * Fast Withdraw Switch (USER_DATA) Documentation */ public void enableFastWithdrawSwitch( @@ -235,7 +248,8 @@ public void enableFastWithdrawSwitch( } /** - * Get API Key Permission (USER_DATA) Get API Key Permission Weight: 1 + * Get API Key Permission (USER_DATA) Get API Key Permission Weight(IP): 1 Security Type: + * USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetApiKeyPermissionResponse> @@ -248,8 +262,9 @@ public void enableFastWithdrawSwitch( * 200 Get API Key Permission - * * - * @see Get API - * Key Permission (USER_DATA) Documentation + * @see Get + * API Key Permission (USER_DATA) Documentation */ public ApiResponse getApiKeyPermission(Long recvWindow) throws ApiException { @@ -257,9 +272,9 @@ public ApiResponse getApiKeyPermission(Long recvWin } /** - * Asset Detail (USER_DATA) Fetch details of assets supported on Binance. * Please get network - * and other deposit or withdraw details from ``GET - * /sapi/v1/capital/config/getall``. Weight: 1 + * Asset Detail (USER_DATA) Fetch details of assets supported on Binance. Weight(IP): 1 Security + * Type: USER_DATA Notes: - Please get network and other deposit or withdraw details from + * `GET /sapi/v1/capital/config/getall`. * * @param asset (optional) * @param recvWindow (optional) @@ -273,8 +288,9 @@ public ApiResponse getApiKeyPermission(Long recvWin * 200 Asset Detail - * * - * @see Asset Detail - * (USER_DATA) Documentation + * @see Asset + * Detail (USER_DATA) Documentation */ public ApiResponse assetDetail(String asset, Long recvWindow) throws ApiException { @@ -282,13 +298,14 @@ public ApiResponse assetDetail(String asset, Long recvWindo } /** - * Asset Dividend Record (USER_DATA) Query asset dividend record. * There cannot be more than - * 180 days between parameter `startTime` and `endTime`. Weight: 10 + * Asset Dividend Record (USER_DATA) Query asset dividend record. Weight(IP): 10 Security Type: + * USER_DATA Notes: - There cannot be more than 180 days between parameter `startTime` + * and `endTime`. * * @param asset (optional) * @param startTime (optional) * @param endTime (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param limit (optional) * @param recvWindow (optional) * @return ApiResponse<AssetDividendRecordResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -300,7 +317,8 @@ public ApiResponse assetDetail(String asset, Long recvWindo * 200 Asset Dividend Record - * * - * @see Asset + * @see Asset * Dividend Record (USER_DATA) Documentation */ public ApiResponse assetDividendRecord( @@ -310,7 +328,7 @@ public ApiResponse assetDividendRecord( } /** - * Dust Convert (USER_DATA) Convert dust assets Weight: 10 + * Dust Convert (USER_DATA) Convert dust assets Weight(UID): 10 Security Type: USER_DATA * * @param dustConvertRequest (required) * @return ApiResponse<DustConvertResponse> @@ -323,8 +341,9 @@ public ApiResponse assetDividendRecord( * 200 Dust Convert - * * - * @see Dust Convert - * (USER_DATA) Documentation + * @see Dust + * Convert (USER_DATA) Documentation */ public ApiResponse dustConvert(DustConvertRequest dustConvertRequest) throws ApiException { @@ -332,7 +351,8 @@ public ApiResponse dustConvert(DustConvertRequest dustConve } /** - * Dust Convertible Assets (USER_DATA) Query dust convertible assets Weight: 1 + * Dust Convertible Assets (USER_DATA) Query dust convertible assets Weight(IP): 1 Security + * Type: USER_DATA * * @param dustConvertibleAssetsRequest (required) * @return ApiResponse<DustConvertibleAssetsResponse> @@ -345,7 +365,8 @@ public ApiResponse dustConvert(DustConvertRequest dustConve * 200 Dust Convertible Assets - * * - * @see Dust + * @see Dust * Convertible Assets (USER_DATA) Documentation */ public ApiResponse dustConvertibleAssets( @@ -354,9 +375,9 @@ public ApiResponse dustConvertibleAssets( } /** - * Dust Transfer (USER_DATA) Convert dust assets to BNB. * You need to open`Enable Spot - * & Margin Trading` permission for the API Key which requests this endpoint. Weight: - * 10 + * Dust Transfer (USER_DATA) Convert dust assets to BNB. Weight(UID): 10 Security Type: + * USER_DATA Notes: - You need to open`Enable Spot & Margin Trading` permission + * for the API Key which requests this endpoint. * * @param dustTransferRequest (required) * @return ApiResponse<DustTransferResponse> @@ -369,8 +390,9 @@ public ApiResponse dustConvertibleAssets( * 200 Dust Transfer - * * - * @see Dust Transfer - * (USER_DATA) Documentation + * @see Dust + * Transfer (USER_DATA) Documentation */ public ApiResponse dustTransfer(DustTransferRequest dustTransferRequest) throws ApiException { @@ -378,10 +400,10 @@ public ApiResponse dustTransfer(DustTransferRequest dustTr } /** - * DustLog(USER_DATA) Dustlog * Only return last 100 records * Only return records after - * 2020/12/01 Weight: 1 + * DustLog (USER_DATA) Dustlog Weight(IP): 1 Security Type: USER_DATA Notes: - Only return last + * 100 records - Only return records after 2020/12/01 * - * @param accountType `SPOT`or`MARGIN`,default`SPOT` (optional) + * @param accountType (optional, default to SPOT) * @param startTime (optional) * @param endTime (optional) * @param recvWindow (optional) @@ -395,19 +417,22 @@ public ApiResponse dustTransfer(DustTransferRequest dustTr * 200 DustLog - * * - * @see DustLog(USER_DATA) - * Documentation + * @see DustLog + * (USER_DATA) Documentation */ public ApiResponse dustlog( - String accountType, Long startTime, Long endTime, Long recvWindow) throws ApiException { + AccountType accountType, Long startTime, Long endTime, Long recvWindow) + throws ApiException { return assetApi.dustlog(accountType, startTime, endTime, recvWindow); } /** - * Funding Wallet (USER_DATA) Query Funding Wallet * Currently supports querying the following - * business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token Weight: 1 + * Funding Wallet (USER_DATA) Query Funding Wallet Weight(IP): 1 Security Type: USER_DATA Notes: + * - Currently supports querying the following business assets:Binance Pay, Binance Card, + * Binance Gift Card, Stock Token * - * @param fundingWalletRequest (required) + * @param fundingWalletRequest (optional) * @return ApiResponse<FundingWalletResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -418,8 +443,9 @@ public ApiResponse dustlog( * 200 Funding Wallet - * * - * @see Funding Wallet - * (USER_DATA) Documentation + * @see Funding + * Wallet (USER_DATA) Documentation */ public ApiResponse fundingWallet( FundingWalletRequest fundingWalletRequest) throws ApiException { @@ -428,9 +454,9 @@ public ApiResponse fundingWallet( /** * Get Assets That Can Be Converted Into BNB (USER_DATA) Get Assets That Can Be Converted Into - * BNB Weight: 1 + * BNB Weight(IP): 1 Security Type: USER_DATA * - * @param getAssetsThatCanBeConvertedIntoBnbRequest (required) + * @param getAssetsThatCanBeConvertedIntoBnbRequest (optional) * @return ApiResponse<GetAssetsThatCanBeConvertedIntoBnbResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -441,7 +467,8 @@ public ApiResponse fundingWallet( * 200 Get Assets That Can Be Converted Into BNB - * * - * @see Get + * @see Get * Assets That Can Be Converted Into BNB (USER_DATA) Documentation */ public ApiResponse @@ -455,17 +482,17 @@ public ApiResponse fundingWallet( /** * Get Cloud-Mining payment and refund history (USER_DATA) The query of Cloud-Mining payment and - * refund history * Just return the SUCCESS records of payment and refund. * For response, type - * = 248 means payment, type = 249 means refund, status =S means SUCCESS. Weight: - * 600 + * refund history Weight(UID): 600 Security Type: USER_DATA Notes: - Just return the SUCCESS + * records of payment and refund. - For response, type = 248 means payment, type = 249 + * means refund, status =S means SUCCESS. * - * @param startTime (required) - * @param endTime (required) + * @param startTime inclusive, unit: ms (required) + * @param endTime exclusive, unit: ms (required) * @param tranId The transaction id (optional) * @param clientTranId The unique flag (optional) - * @param asset (optional) - * @param current current page, default 1, the min value is 1 (optional) - * @param size page size, default 10, the max value is 100 (optional) + * @param asset If it is blank, we will query all assets (optional) + * @param current (optional) + * @param size (optional) * @return ApiResponse<GetCloudMiningPaymentAndRefundHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -477,7 +504,7 @@ public ApiResponse fundingWallet( * * * @see Get + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#get-cloud-mining-payment-and-refund-history">Get * Cloud-Mining payment and refund history (USER_DATA) Documentation */ public ApiResponse @@ -496,7 +523,7 @@ public ApiResponse fundingWallet( /** * Get Open Symbol List (MARKET_DATA) Get the list of symbols that are scheduled to be opened - * for trading in the market. Weight: 100 + * for trading in the market. Weight(IP): 100 Security Type: MARKET_DATA * * @return ApiResponse<GetOpenSymbolListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -508,24 +535,25 @@ public ApiResponse fundingWallet( * 200 Get Open Symbol List - * * - * @see Get Open - * Symbol List (MARKET_DATA) Documentation + * @see Get + * Open Symbol List (MARKET_DATA) Documentation */ public ApiResponse getOpenSymbolList() throws ApiException { return assetApi.getOpenSymbolList(); } /** - * Query User Delegation History(For Master Account)(USER_DATA) Query User Delegation History - * Weight: 60 + * Query User Delegation History(For Master Account) (USER_DATA) Query User Delegation History + * Weight(IP): 60 Security Type: USER_DATA * * @param email (required) * @param startTime (required) * @param endTime (required) - * @param type Delegate/Undelegate (optional) + * @param type (optional) * @param asset (optional) - * @param current current page, default 1, the min value is 1 (optional) - * @param size page size, default 10, the max value is 100 (optional) + * @param current (optional) + * @param size (optional) * @param recvWindow (optional) * @return ApiResponse<QueryUserDelegationHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -537,14 +565,15 @@ public ApiResponse getOpenSymbolList() throws ApiExce * 200 User Delegation History - * * - * @see Query - * User Delegation History(For Master Account)(USER_DATA) Documentation + * @see Query + * User Delegation History(For Master Account) (USER_DATA) Documentation */ public ApiResponse queryUserDelegationHistory( String email, Long startTime, Long endTime, - String type, + OrderType type, String asset, Long current, Long size, @@ -555,18 +584,18 @@ public ApiResponse queryUserDelegationHistor } /** - * Query User Universal Transfer History(USER_DATA) Query User Universal Transfer History * - * `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and - * ISOLATEDMARGIN_ISOLATEDMARGIN * `toSymbol` must be sent when type are - * MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN * Support query within the last 6 - * months only * If `startTime`and `endTime` not sent, return records of the - * last 7 days by default Weight: 1 + * Query User Universal Transfer History (USER_DATA) Query User Universal Transfer History + * Weight(IP): 1 Security Type: USER_DATA Notes: - `fromSymbol` must be sent when type + * are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be + * sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - Support query + * within the last 6 months only - If `startTime`and `endTime` not sent, + * return records of the last 7 days by default * * @param type (required) * @param startTime (optional) * @param endTime (optional) - * @param current current page, default 1, the min value is 1 (optional) - * @param size page size, default 10, the max value is 100 (optional) + * @param current (optional) + * @param size (optional) * @param fromSymbol (optional) * @param toSymbol (optional) * @param recvWindow (optional) @@ -581,8 +610,8 @@ public ApiResponse queryUserDelegationHistor * * * @see Query - * User Universal Transfer History(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#query-user-universal-transfer-history">Query + * User Universal Transfer History (USER_DATA) Documentation */ public ApiResponse queryUserUniversalTransferHistory( String type, @@ -590,8 +619,8 @@ public ApiResponse queryUserUniversal Long endTime, Long current, Long size, - String fromSymbol, - String toSymbol, + FromSymbol fromSymbol, + ToSymbol toSymbol, Long recvWindow) throws ApiException { return assetApi.queryUserUniversalTransferHistory( @@ -599,10 +628,10 @@ public ApiResponse queryUserUniversal } /** - * Query User Wallet Balance (USER_DATA) Query User Wallet Balance Weight: 60 + * Query User Wallet Balance (USER_DATA) Query User Wallet Balance Weight(IP): 60 Security Type: + * USER_DATA * - * @param quoteAsset `USDT`, `ETH`, `USDC`, `BNB`, etc. - * default `BTC` (optional) + * @param quoteAsset (optional) * @param recvWindow (optional) * @return ApiResponse<QueryUserWalletBalanceResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -615,7 +644,7 @@ public ApiResponse queryUserUniversal * * * @see Query + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#query-user-wallet-balance">Query * User Wallet Balance (USER_DATA) Documentation */ public ApiResponse queryUserWalletBalance( @@ -625,10 +654,10 @@ public ApiResponse queryUserWalletBalance( /** * Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) Toggle BNB Burn On Spot Trade - * And Margin Interest * \"spotBNBBurn\" and \"interestBNBBurn\" should be - * sent at least one. Weight: 1(IP) + * And Margin Interest Weight(IP): 1 Security Type: USER_DATA Notes: - \"spotBNBBurn\" + * and \"interestBNBBurn\" should be sent at least one. * - * @param toggleBnbBurnOnSpotTradeAndMarginInterestRequest (required) + * @param toggleBnbBurnOnSpotTradeAndMarginInterestRequest (optional) * @return ApiResponse<ToggleBnbBurnOnSpotTradeAndMarginInterestResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -640,7 +669,7 @@ public ApiResponse queryUserWalletBalance( * * * @see Toggle + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#toggle-bnb-burn-on-spot-trade-and-margin-interest">Toggle * BNB Burn On Spot Trade And Margin Interest (USER_DATA) Documentation */ public ApiResponse @@ -653,7 +682,7 @@ public ApiResponse queryUserWalletBalance( } /** - * Trade Fee (USER_DATA) Fetch trade fee Weight: 1 + * Trade Fee (USER_DATA) Fetch trade fee Weight(IP): 1 Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) @@ -667,8 +696,9 @@ public ApiResponse queryUserWalletBalance( * 200 Trade Fee - * * - * @see Trade Fee - * (USER_DATA) Documentation + * @see Trade + * Fee (USER_DATA) Documentation */ public ApiResponse tradeFee(String symbol, Long recvWindow) throws ApiException { @@ -676,11 +706,11 @@ public ApiResponse tradeFee(String symbol, Long recvWindow) } /** - * User Asset (USER_DATA) Get user assets, just for positive data. * If asset is set, then - * return this asset, otherwise return all assets positive. * If needBtcValuation is set, then - * return btcValudation. Weight: 5 + * User Asset (USER_DATA) Get user assets, just for positive data. Weight(IP): 5 Security Type: + * USER_DATA Notes: - If asset is set, then return this asset, otherwise return all assets + * positive. - If needBtcValuation is set, then return btcValudation. * - * @param userAssetRequest (required) + * @param userAssetRequest (optional) * @return ApiResponse<UserAssetResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -691,8 +721,9 @@ public ApiResponse tradeFee(String symbol, Long recvWindow) * 200 User Asset - * * - * @see User Asset - * (USER_DATA) Documentation + * @see User + * Asset (USER_DATA) Documentation */ public ApiResponse userAsset(UserAssetRequest userAssetRequest) throws ApiException { @@ -700,33 +731,32 @@ public ApiResponse userAsset(UserAssetRequest userAssetReques } /** - * User Universal Transfer (USER_DATA) user universal transfer * `fromSymbol` must be - * sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN * - * `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and - * ISOLATEDMARGIN_ISOLATEDMARGIN * ENUM of transfer types: * MAIN_UMFUTURE Spot account transfer - * to USDⓈ-M Futures account * MAIN_CMFUTURE Spot account transfer to COIN-M Futures account * - * MAIN_MARGIN Spot account transfer to Margin(cross)account * UMFUTURE_MAIN USDⓈ-M Futures - * account transfer to Spot account * UMFUTURE_MARGIN USDⓈ-M Futures account transfer to - * Margin(cross)account * CMFUTURE_MAIN COIN-M Futures account transfer to Spot account * - * CMFUTURE_MARGIN COIN-M Futures account transfer to Margin(cross) account * MARGIN_MAIN - * Margin(cross)account transfer to Spot account * MARGIN_UMFUTURE Margin(cross)account transfer - * to USDⓈ-M Futures * MARGIN_CMFUTURE Margin(cross)account transfer to COIN-M Futures * - * ISOLATEDMARGIN_MARGIN Isolated margin account transfer to Margin(cross) account * - * MARGIN_ISOLATEDMARGIN Margin(cross) account transfer to Isolated margin account * - * ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account transfer to Isolated margin account * - * MAIN_FUNDING Spot account transfer to Funding account * FUNDING_MAIN Funding account transfer - * to Spot account * FUNDING_UMFUTURE Funding account transfer to UMFUTURE account * - * UMFUTURE_FUNDING UMFUTURE account transfer to Funding account * MARGIN_FUNDING MARGIN account - * transfer to Funding account * FUNDING_MARGIN Funding account transfer to Margin account * - * FUNDING_CMFUTURE Funding account transfer to CMFUTURE account * CMFUTURE_FUNDING CMFUTURE - * account transfer to Funding account * MAIN_OPTION Spot account transfer to Options account * - * OPTION_MAIN Options account transfer to Spot account * UMFUTURE_OPTION USDⓈ-M Futures account - * transfer to Options account * OPTION_UMFUTURE Options account transfer to USDⓈ-M Futures - * account * MARGIN_OPTION Margin(cross)account transfer to Options account * OPTION_MARGIN - * Options account transfer to Margin(cross)account * FUNDING_OPTION Funding account transfer to - * Options account * OPTION_FUNDING Options account transfer to Funding account * - * MAIN_PORTFOLIO_MARGIN Spot account transfer to Portfolio Margin account * - * PORTFOLIO_MARGIN_MAIN Portfolio Margin account transfer to Spot account Weight: 900 + * User Universal Transfer (USER_DATA) User universal transfer Weight(UID): 900 Security Type: + * USER_DATA Notes: - You need to enable Permits Universal Transfer option for the API Key that + * requests this endpoint. - `fromSymbol` must be sent when type is + * `ISOLATEDMARGIN_MARGIN` or `ISOLATEDMARGIN_ISOLATEDMARGIN`. - + * `toSymbol` must be sent when type is `MARGIN_ISOLATEDMARGIN` or + * `ISOLATEDMARGIN_ISOLATEDMARGIN`. - ENUM of transfer types: - + * `MAIN_UMFUTURE`: Spot → USDⓈ-M Futures - `MAIN_CMFUTURE`: Spot → COIN-M + * Futures - `MAIN_MARGIN`: Spot → Margin (cross) - `UMFUTURE_MAIN`: USDⓈ-M + * Futures → Spot - `UMFUTURE_MARGIN`: USDⓈ-M Futures → Margin (cross) - + * `CMFUTURE_MAIN`: COIN-M Futures → Spot - `CMFUTURE_MARGIN`: COIN-M + * Futures → Margin (cross) - `MARGIN_MAIN`: Margin (cross) → Spot - + * `MARGIN_UMFUTURE`: Margin (cross) → USDⓈ-M Futures - `MARGIN_CMFUTURE`: + * Margin (cross) → COIN-M Futures - `ISOLATEDMARGIN_MARGIN`: Isolated margin → Margin + * (cross) - `MARGIN_ISOLATEDMARGIN`: Margin (cross) → Isolated margin - + * `ISOLATEDMARGIN_ISOLATEDMARGIN`: Isolated margin → Isolated margin - + * `MAIN_FUNDING`: Spot → Funding - `FUNDING_MAIN`: Funding → Spot - + * `FUNDING_UMFUTURE`: Funding → USDⓈ-M Futures - `UMFUTURE_FUNDING`: USDⓈ-M + * Futures → Funding - `MARGIN_FUNDING`: Margin (cross) → Funding - + * `FUNDING_MARGIN`: Funding → Margin (cross) - `FUNDING_CMFUTURE`: Funding + * → COIN-M Futures - `CMFUTURE_FUNDING`: COIN-M Futures → Funding - + * `MAIN_OPTION`: Spot → Options - `OPTION_MAIN`: Options → Spot - + * `UMFUTURE_OPTION`: USDⓈ-M Futures → Options - `OPTION_UMFUTURE`: Options + * → USDⓈ-M Futures - `MARGIN_OPTION`: Margin (cross) → Options - + * `OPTION_MARGIN`: Options → Margin (cross) - `FUNDING_OPTION`: Funding → + * Options - `OPTION_FUNDING`: Options → Funding - `MAIN_PORTFOLIO_MARGIN`: + * Spot → Portfolio Margin - `PORTFOLIO_MARGIN_MAIN`: Portfolio Margin → Spot * * @param userUniversalTransferRequest (required) * @return ApiResponse<UserUniversalTransferResponse> @@ -739,7 +769,8 @@ public ApiResponse userAsset(UserAssetRequest userAssetReques * 200 User Universal Transfer - * * - * @see User + * @see User * Universal Transfer (USER_DATA) Documentation */ public ApiResponse userUniversalTransfer( @@ -749,7 +780,7 @@ public ApiResponse userUniversalTransfer( /** * All Coins' Information (USER_DATA) Get information of coins (available for deposit and - * withdraw) for user. Weight: 10 + * withdraw) for user. Weight(IP): 10 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<AllCoinsInformationResponse> @@ -762,7 +793,8 @@ public ApiResponse userUniversalTransfer( * 200 All Coins' Information - * * - * @see All + * @see All * Coins' Information (USER_DATA) Documentation */ public ApiResponse allCoinsInformation(Long recvWindow) @@ -771,11 +803,11 @@ public ApiResponse allCoinsInformation(Long recvWin } /** - * Deposit Address(supporting network) (USER_DATA) Fetch deposit address with network. * If - * `network` is not send, return with default network of the coin. * You can get - * `network` and `isDefault` in `networkList` in the response of - * `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. * `amount` needs to - * be sent if using LIGHTNING network Weight: 10 + * Deposit Address(supporting network) (USER_DATA) Fetch deposit address with network. + * Weight(IP): 10 Security Type: USER_DATA Notes: - If `network` is not send, return + * with default network of the coin. - You can get `network` and `isDefault` + * in `networkList` in the response of `Get /sapi/v1/capital/config/getall (HMAC + * SHA256)`. - `amount` needs to be sent if using LIGHTNING network * * @param coin `coin` refers to the parent network address format that the address is * using (required) @@ -792,7 +824,8 @@ public ApiResponse allCoinsInformation(Long recvWin * 200 Deposit Address - * * - * @see Deposit + * @see Deposit * Address(supporting network) (USER_DATA) Documentation */ public ApiResponse depositAddress( @@ -801,21 +834,21 @@ public ApiResponse depositAddress( } /** - * Deposit History (supporting network) (USER_DATA) Fetch deposit history. * Please notice the - * default `startTime` and `endTime` to make sure that time interval is - * within 0-90 days. * If both ``startTime`` and - * ``endTime`` are sent, time between ``startTime`` and - * ``endTime`` must be less than 90 days. Weight: 1 - * - * @param includeSource Default: `false`, return `sourceAddress`field when - * set to `true` (optional) - * @param coin (optional) - * @param status 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed) + * Deposit History (supporting network) (USER_DATA) Fetch deposit history. Weight(IP): 1 + * Security Type: USER_DATA Notes: - Please notice the default `startTime` and + * `endTime` to make sure that time interval is within 0-90 days. - If both + * `startTime` and `endTime` are sent, time between `startTime` + * and `endTime` must be less than 90 days. + * + * @param includeSource return `sourceAddress` field when set to `true` * (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param coin (optional) + * @param status 0: pending, 6: credited but cannot withdraw, 7: Wrong Deposit, 8: Waiting User + * confirm, 1: success (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) + * @param offset (optional) + * @param limit (optional) * @param recvWindow (optional) * @param txId (optional) * @return ApiResponse<DepositHistoryResponse> @@ -828,13 +861,14 @@ public ApiResponse depositAddress( * 200 Deposit History - * * - * @see Deposit + * @see Deposit * History (supporting network) (USER_DATA) Documentation */ public ApiResponse depositHistory( Boolean includeSource, String coin, - Long status, + Status status, Long startTime, Long endTime, Long offset, @@ -847,14 +881,13 @@ public ApiResponse depositHistory( } /** - * Fetch deposit address list with network(USER_DATA) Fetch deposit address list with network. * - * If network is not send, return with default network of the coin. * You can get network and - * isDefault in networkList in the response of `Get /sapi/v1/capital/config/getall`. - * Weight: 10 + * Fetch deposit address list with network (USER_DATA) Fetch deposit address list with network. + * Weight(IP): 10 Security Type: USER_DATA * - * @param coin `coin` refers to the parent network address format that the address is - * using (required) - * @param network (optional) + * @param coin Coin name (required) + * @param network If network is not send, return with default network of the coin. You can get + * network and isDefault in networkList in the response of `Get + * /sapi/v1/capital/config/getall` (optional) * @return ApiResponse<FetchDepositAddressListWithNetworkResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -866,8 +899,8 @@ public ApiResponse depositHistory( * * * @see Fetch - * deposit address list with network(USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#fetch-deposit-address-list-with-network">Fetch + * deposit address list with network (USER_DATA) Documentation */ public ApiResponse fetchDepositAddressListWithNetwork(String coin, String network) throws ApiException { @@ -875,7 +908,8 @@ public ApiResponse depositHistory( } /** - * Fetch withdraw address list (USER_DATA) Fetch withdraw address list Weight: 10 + * Fetch withdraw address list (USER_DATA) Fetch withdraw address list Weight(IP): 10 Security + * Type: USER_DATA * * @return ApiResponse<FetchWithdrawAddressListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -888,7 +922,7 @@ public ApiResponse depositHistory( * * * @see Fetch + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#fetch-withdraw-address-list">Fetch * withdraw address list (USER_DATA) Documentation */ public ApiResponse fetchWithdrawAddressList() @@ -897,7 +931,7 @@ public ApiResponse fetchWithdrawAddressList() } /** - * Fetch withdraw quota (USER_DATA) Fetch withdraw quota Weight: 10 + * Fetch withdraw quota (USER_DATA) Fetch withdraw quota Weight(IP): 10 Security Type: USER_DATA * * @return ApiResponse<FetchWithdrawQuotaResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -909,7 +943,8 @@ public ApiResponse fetchWithdrawAddressList() * 200 Fetch withdraw quota - * * - * @see Fetch + * @see Fetch * withdraw quota (USER_DATA) Documentation */ public ApiResponse fetchWithdrawQuota() throws ApiException { @@ -918,9 +953,9 @@ public ApiResponse fetchWithdrawQuota() throws ApiEx /** * One click arrival deposit apply (for expired address deposit) (USER_DATA) Apply deposit - * credit for expired address (One click arrival) * Params need to be in the POST body Weight: 1 + * credit for expired address (One click arrival) Weight(IP): 1 Security Type: USER_DATA * - * @param oneClickArrivalDepositApplyRequest (required) + * @param oneClickArrivalDepositApplyRequest (optional) * @return ApiResponse<OneClickArrivalDepositApplyResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -932,7 +967,7 @@ public ApiResponse fetchWithdrawQuota() throws ApiEx * * * @see One + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#one-click-arrival-deposit-apply">One * click arrival deposit apply (for expired address deposit) (USER_DATA) Documentation */ public ApiResponse oneClickArrivalDepositApply( @@ -942,21 +977,22 @@ public ApiResponse oneClickArrivalDepositAp } /** - * Withdraw(USER_DATA) Submit a withdraw request. * If `network` not send, return with - * default network of the coin. * You can get `network` and `isDefault` in - * `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall - * (HMAC SHA256)`. * To check if travel rule is required, by using `GET + * Withdraw (USER_DATA) Submit a withdraw request Weight(UID): 900 Security Type: USER_DATA + * Notes: - If `network` not send, return with default network of the coin. - You can + * get `network` and `isDefault` in `networkList` of a coin in the + * response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. - To check if + * travel rule is required, by using `GET * /sapi/v1/localentity/questionnaire-requirements` and if it returns anything other than * `NIL` you will need update SAPI to `POST * /sapi/v1/localentity/withdraw/apply` else you can continue `POST * /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to - * travel rule please refer to the Travel Rule SAPI. * For networks that do not support + * travel rule please refer to the Travel Rule SAPI. - \"For networks that do not support * memo/tag, submitting a withdrawal request with a non-empty `addressTag` will return * error `-4106 TAG_NOT_SUPPORTED_FOR_NETWORK`. Please omit the `addressTag` * field for such networks. You can check whether a network requires a tag via `GET - * /sapi/v1/capital/config/getall`: * If `withdrawTag` = `true` → - * memo/tag is required. * If `withdrawTag` = `false` → memo/tag is not - * supported; omit `addressTag`. Weight: 900 + * /sapi/v1/capital/config/getall`: If `withdrawTag` = `true` → + * memo/tag is required. If `withdrawTag` = `false` → memo/tag is not + * supported; omit `addressTag`.\" * * @param withdrawRequest (required) * @return ApiResponse<WithdrawResponse> @@ -970,8 +1006,8 @@ public ApiResponse oneClickArrivalDepositAp * * * @see Withdraw(USER_DATA) - * Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#withdraw">Withdraw + * (USER_DATA) Documentation */ public ApiResponse withdraw(WithdrawRequest withdrawRequest) throws ApiException { @@ -979,16 +1015,16 @@ public ApiResponse withdraw(WithdrawRequest withdrawRequest) } /** - * Withdraw History (supporting network) (USER_DATA) Fetch withdraw history. * - * `network` may not be in the response for old withdraw. * Please notice the default - * `startTime` and `endTime` to make sure that time interval is within 0-90 - * days. * If both `startTime` and `endTime`are sent, time between - * `startTime`and `endTime`must be less than 90 days. * If - * `withdrawOrderId` is sent, time between `startTime` and - * `endTime` must be less than 7 days. * If `withdrawOrderId` is sent, - * `startTime` and `endTime` are not sent, will return last 7 days records - * by default. * Maximum support `idList` number is 45. Weight: 18000 Request limit: - * 10 requests per second + * Withdraw History (supporting network) (USER_DATA) Fetch withdraw history Weight(UID): 18000 + * (10 requests per second) Security Type: USER_DATA Notes: - `network` may not be in + * the response for old withdraw. - Please notice the default `startTime` and + * `endTime` to make sure that time interval is within 0-90 days. - If both + * `startTime` and `endTime`are sent, time between `startTime`and + * `endTime`must be less than 90 days. - If `withdrawOrderId` is sent, time + * between `startTime` and `endTime` must be less than 7 days. - If + * `withdrawOrderId` is sent, `startTime` and `endTime` are not + * sent, will return last 7 days records by default. - Maximum support `idList` number + * is 45. * * @param coin (optional) * @param withdrawOrderId client side id for withdrawal, if provided in POST @@ -996,11 +1032,11 @@ public ApiResponse withdraw(WithdrawRequest withdrawRequest) * @param status 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed) * (optional) * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param limit (optional) * @param idList id list returned in the response of POST * `/sapi/v1/capital/withdraw/apply`, separated by `,` (optional) - * @param startTime (optional) - * @param endTime (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) * @param recvWindow (optional) * @return ApiResponse<WithdrawHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1012,7 +1048,8 @@ public ApiResponse withdraw(WithdrawRequest withdrawRequest) * 200 Withdraw History - * * - * @see Withdraw + * @see Withdraw * History (supporting network) (USER_DATA) Documentation */ public ApiResponse withdrawHistory( @@ -1039,8 +1076,8 @@ public ApiResponse withdrawHistory( } /** - * Get symbols delist schedule for spot (MARKET_DATA) Get symbols delist schedule for spot - * Weight: 100 + * Get Spot Delist Schedule (MARKET_DATA) Get symbols delist schedule for spot Weight(IP): 100 + * Security Type: MARKET_DATA * * @param recvWindow (optional) * @return ApiResponse<GetSymbolsDelistScheduleForSpotResponse> @@ -1053,8 +1090,9 @@ public ApiResponse withdrawHistory( * 200 Get symbols delist schedule for spot - * * - * @see Get symbols - * delist schedule for spot (MARKET_DATA) Documentation + * @see Get + * Spot Delist Schedule (MARKET_DATA) Documentation */ public ApiResponse getSymbolsDelistScheduleForSpot( Long recvWindow) throws ApiException { @@ -1062,7 +1100,7 @@ public ApiResponse getSymbolsDelistSche } /** - * System Status (System) Fetch system status. Weight: 1 + * System Status Fetch system status. Weight(IP): 1 Security Type: System * * @return ApiResponse<SystemStatusResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1074,8 +1112,9 @@ public ApiResponse getSymbolsDelistSche * 200 System Status - * * - * @see System Status - * (System) Documentation + * @see System + * Status Documentation */ public ApiResponse systemStatus() throws ApiException { return othersApi.systemStatus(); @@ -1083,12 +1122,15 @@ public ApiResponse systemStatus() throws ApiException { /** * Broker Withdraw (for brokers of local entities that require travel rule) (USER_DATA) Submit a - * withdrawal request for brokers of local entities that required travel rule. * If - * `network` not send, return with default network of the coin, but if the address - * could not match default network, the withdraw will be rejected. * You can get - * `network` in `networkList` of a coin in the response * Questionnaire is - * different for each local entity, please refer to * If getting error like `Questionnaire - * format not valid.` or `Questionnaire must not be blank`, Weight: 600 + * withdrawal request for brokers of local entities that required travel rule. Weight(UID): 600 + * Security Type: USER_DATA Notes: - If `network` not send, return with default + * network of the coin, but if the address could not match default network, the withdraw will be + * rejected. - You can get `network` in `networkList` of a coin in the + * response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. - Questionnaire is + * different for each local entity, please refer to the `Withdraw Questionnaire + * Contents` page. - If getting error like `Questionnaire format not valid.` or + * `Questionnaire must not be blank`, please try to verify the format of the + * questionnaire and use URL-encoded format. * * @param brokerWithdrawRequest (required) * @return ApiResponse<BrokerWithdrawResponse> @@ -1101,7 +1143,8 @@ public ApiResponse systemStatus() throws ApiException { * 200 Broker Withdraw - * * - * @see Broker + * @see Broker * Withdraw (for brokers of local entities that require travel rule) (USER_DATA) * Documentation */ @@ -1113,7 +1156,7 @@ public ApiResponse brokerWithdraw( /** * Check Questionnaire Requirements (for local entities that require travel rule) (supporting * network) (USER_DATA) This API will return user-specific Travel Rule questionnaire requirement - * information in reference to the current API key. Weight: 1 + * information in reference to the current API key. Weight(IP): 1 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<CheckQuestionnaireRequirementsResponse> @@ -1127,7 +1170,7 @@ public ApiResponse brokerWithdraw( * * * @see Check + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#check-questionnaire-requirements">Check * Questionnaire Requirements (for local entities that require travel rule) (supporting * network) (USER_DATA) Documentation */ @@ -1137,27 +1180,27 @@ public ApiResponse checkQuestionnaireReq } /** - * Deposit History (for local entities that required travel rule) (supporting network) - * (USER_DATA) Fetch deposit history for local entities that required travel rule. * Please - * notice the default `startTime` and `endTime` to make sure that time - * interval is within * If both ``startTime`` and - * ``endTime`` are sent, time between ``startTime`` and - * ``endTime`` must * Please, note that due to network-specific - * characteristics, the returned source address may be inaccurate. If multiple source addresses - * are found, only the first one will be returned. Weight: 1 + * Deposit History Travel Rule (for local entities that required travel rule) (supporting + * network) (USER_DATA) Fetch deposit history for local entities that required travel rule. + * Weight(IP): 1 Security Type: USER_DATA Notes: - Please notice the default + * `startTime` and `endTime` to make sure that time interval is within 0-90 + * days. - If both `startTime` and `endTime` are sent, time between + * `startTime` and `endTime` must be less than 90 days. - Please, note that + * due to network-specific characteristics, the returned source address may be inaccurate. If + * multiple source addresses are found, only the first one will be returned. * * @param trId Comma(,) separated list of travel rule record Ids. (optional) - * @param txId (optional) + * @param txId Comma(,) separated list of transaction Ids. (optional) * @param tranId Comma(,) separated list of wallet tran Ids. (optional) * @param network (optional) * @param coin (optional) * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) * @param pendingQuestionnaire true: Only return records that pending deposit questionnaire. * false/not provided: return all records. (optional) - * @param startTime (optional) - * @param endTime (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param limit (optional) * @return ApiResponse<DepositHistoryTravelRuleResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1168,9 +1211,10 @@ public ApiResponse checkQuestionnaireReq * 200 Deposit History - * * - * @see Deposit - * History (for local entities that required travel rule) (supporting network) (USER_DATA) - * Documentation + * @see Deposit + * History Travel Rule (for local entities that required travel rule) (supporting network) + * (USER_DATA) Documentation */ public ApiResponse depositHistoryTravelRule( String trId, @@ -1202,23 +1246,23 @@ public ApiResponse depositHistoryTravelRule( /** * Deposit History V2 (for local entities that required travel rule) (supporting network) * (USER_DATA) Fetch deposit history for local entities that with required travel rule - * information. * Please notice the default `startTime` and `endTime` to - * make sure that time interval is within * If both ``startTime`` and - * ``endTime`` are sent, time between ``startTime`` and - * ``endTime`` must * Please, note that due to network-specific - * characteristics, the returned source address may be inaccurate. If multiple source addresses - * are found, only the first one will be returned. Weight: 1 + * information. Weight(IP): 1 Security Type: USER_DATA Notes: - Please notice the default + * `startTime` and `endTime` to make sure that time interval is within 0-90 + * days. - If both `startTime` and `endTime` are sent, time between + * `startTime` and `endTime` must be less than 90 days. - Please, note that + * due to network-specific characteristics, the returned source address may be inaccurate. If + * multiple source addresses are found, only the first one will be returned. * * @param depositId Comma(,) separated list of wallet tran Ids. (optional) - * @param txId (optional) + * @param txId Comma(,) separated list of transaction Ids. (optional) * @param network (optional) * @param coin (optional) * @param retrieveQuestionnaire true: return `questionnaire` within response. * (optional) - * @param startTime (optional) - * @param endTime (optional) - * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) + * @param offset (optional) + * @param limit (optional) * @return ApiResponse<DepositHistoryV2Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1230,7 +1274,7 @@ public ApiResponse depositHistoryTravelRule( * * * @see Deposit + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#deposit-history-v2">Deposit * History V2 (for local entities that required travel rule) (supporting network) * (USER_DATA) Documentation */ @@ -1259,7 +1303,8 @@ public ApiResponse depositHistoryV2( /** * Fetch address verification list (USER_DATA) Fetch address verification list for user to check - * on status and other details for the addresses stored in Address Book. Weight: 1 + * on status and other details for the addresses stored in Address Book. Weight(IP): 1 Security + * Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<FetchAddressVerificationListResponse> @@ -1273,7 +1318,7 @@ public ApiResponse depositHistoryV2( * * * @see Fetch + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#fetch-address-verification-list">Fetch * address verification list (USER_DATA) Documentation */ public ApiResponse fetchAddressVerificationList( @@ -1283,8 +1328,9 @@ public ApiResponse fetchAddressVerificatio /** * Get Country List (USER_DATA) Query the active country list for travel rule questionnaires. - * Currently, only supports AU entity. Weight: 1 + * Currently, only supports AU entity. Weight(IP): 1 Security Type: USER_DATA * + * @param recvWindow (optional) * @return ApiResponse<GetCountryListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1292,21 +1338,23 @@ public ApiResponse fetchAddressVerificatio * * * - * + * *
Response Details
Status Code Description Response Headers
200 Get Country List -
200 Country list -
* - * @see Get + * @see Get * Country List (USER_DATA) Documentation */ - public ApiResponse getCountryList() throws ApiException { - return travelRuleApi.getCountryList(); + public ApiResponse getCountryList(Long recvWindow) throws ApiException { + return travelRuleApi.getCountryList(recvWindow); } /** * Get Region List (USER_DATA) Query the active region/city list for a given country. Currently, - * only supports AU entity. Weight: 1 + * only supports AU entity. Weight(IP): 1 Security Type: USER_DATA * - * @param countryCode ISO 2-digit country code (from `Country List` API). (required) + * @param countryCode ISO 2-digit country code (from Country List API). (required) + * @param recvWindow (optional) * @return ApiResponse<GetRegionListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -1314,24 +1362,27 @@ public ApiResponse getCountryList() throws ApiException * * * - * + * *
Response Details
Status Code Description Response Headers
200 Get Region List -
200 Region list -
* - * @see Get Region - * List (USER_DATA) Documentation + * @see Get + * Region List (USER_DATA) Documentation */ - public ApiResponse getRegionList(String countryCode) + public ApiResponse getRegionList(String countryCode, Long recvWindow) throws ApiException { - return travelRuleApi.getRegionList(countryCode); + return travelRuleApi.getRegionList(countryCode, recvWindow); } /** - * Submit Deposit Questionnaire (For local entities that require travel rule) (supporting + * Submit Deposit Questionnaire Broker (For local entities that require travel rule) (supporting * network) (USER_DATA) Submit questionnaire for brokers of local entities that require travel * rule. The questionnaire is only applies to transactions from un-hosted wallets or VASPs that - * are not yet onboarded with GTR. * Questionnaire is different for each local entity, please - * refer * If getting error like `Questionnaire format not valid.` or - * `Questionnaire must not be blank`, Weight: 600 + * are not yet onboarded with GTR. Weight(UID): 600 Security Type: USER_DATA Notes: - + * Questionnaire is different for each local entity, please refer to `Deposit Questionnaire + * Content` page. - If getting error like `Questionnaire format not valid.` or + * `Questionnaire must not be blank`, please try to verify the format of the + * questionnaire and use URL-encoded format. * * @param submitDepositQuestionnaireRequest (required) * @return ApiResponse<SubmitDepositQuestionnaireResponse> @@ -1345,9 +1396,9 @@ public ApiResponse getRegionList(String countryCode) * * * @see Submit - * Deposit Questionnaire (For local entities that require travel rule) (supporting network) - * (USER_DATA) Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#submit-deposit-questionnaire">Submit + * Deposit Questionnaire Broker (For local entities that require travel rule) (supporting + * network) (USER_DATA) Documentation */ public ApiResponse submitDepositQuestionnaire( SubmitDepositQuestionnaireRequest submitDepositQuestionnaireRequest) @@ -1359,9 +1410,11 @@ public ApiResponse submitDepositQuestionnair * Submit Deposit Questionnaire (For local entities that require travel rule) (supporting * network) (USER_DATA) Submit questionnaire for local entities that require travel rule. The * questionnaire is only applies to transactions from unhosted wallets or VASPs that are not yet - * onboarded with GTR. * Questionnaire is different for each local entity, please refer * If - * getting error like `Questionnaire format not valid.` or `Questionnaire must - * not be blank`, Weight: 600 + * onboarded with GTR. Weight(UID): 600 Security Type: USER_DATA Notes: - Questionnaire is + * different for each local entity, please refer to `Deposit Questionnaire Content` + * page. - If getting error like `Questionnaire format not valid.` or + * `Questionnaire must not be blank`, please try to verify the format of the + * questionnaire and use URL-encoded format. * * @param submitDepositQuestionnaireTravelRuleRequest (required) * @return ApiResponse<SubmitDepositQuestionnaireTravelRuleResponse> @@ -1375,7 +1428,7 @@ public ApiResponse submitDepositQuestionnair * * * @see Submit + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#submit-deposit-questionnaire-travel-rule">Submit * Deposit Questionnaire (For local entities that require travel rule) (supporting network) * (USER_DATA) Documentation */ @@ -1392,9 +1445,11 @@ public ApiResponse submitDepositQuestionnair * Submit Deposit Questionnaire V2 (For local entities that require travel rule) (supporting * network) (USER_DATA) Submit questionnaire for local entities that require travel rule. The * questionnaire is only applies to transactions from unhosted wallets or VASPs that are not yet - * onboarded with GTR. * Questionnaire is different for each local entity, please refer * If - * getting error like `Questionnaire format not valid.` or `Questionnaire must - * not be blank`, Weight: 600 + * onboarded with GTR. Weight(UID): 600 Security Type: USER_DATA Notes: - Questionnaire is + * different for each local entity, please refer to `Deposit Questionnaire Content` + * page. - If getting error like `Questionnaire format not valid.` or + * `Questionnaire must not be blank`, please try to verify the format of the + * questionnaire and use URL-encoded format. * * @param submitDepositQuestionnaireV2Request (required) * @return ApiResponse<SubmitDepositQuestionnaireV2Response> @@ -1408,7 +1463,7 @@ public ApiResponse submitDepositQuestionnair * * * @see Submit + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#submit-deposit-questionnaire-v2">Submit * Deposit Questionnaire V2 (For local entities that require travel rule) (supporting * network) (USER_DATA) Documentation */ @@ -1420,7 +1475,7 @@ public ApiResponse submitDepositQuestionna /** * VASP list (for local entities that require travel rule) (supporting network) (USER_DATA) - * Fetch the VASP list for local entities. Weight: 1 + * Fetch the VASP list for local entities. Weight(IP): 1 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<VaspListResponse> @@ -1434,7 +1489,7 @@ public ApiResponse submitDepositQuestionna * * * @see VASP + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#vasp-list">VASP * list (for local entities that require travel rule) (supporting network) (USER_DATA) * Documentation */ @@ -1443,24 +1498,24 @@ public ApiResponse vaspList(Long recvWindow) throws ApiExcepti } /** - * Withdraw History (for local entities that require travel rule) (supporting network) - * (USER_DATA) Fetch withdraw history for local entities that required travel rule. * - * `network` may not be in the response for old withdraw. * Please notice the default - * `startTime` and `endTime` to make sure that time interval is within * If - * both `startTime` and `endTime`are sent, time between - * `startTime`and `endTime`must be less Weight: 1 + * Withdraw History Travel Rule (supporting network) (USER_DATA) Fetch withdraw history for + * local entities that required travel rule. Weight(IP): 1 Security Type: USER_DATA Notes: - + * `network` may not be in the response for old withdraw. - Please notice the default + * `startTime` and `endTime` to make sure that time interval is within 0-90 + * days. - If both `startTime` and `endTime`are sent, time between + * `startTime`and `endTime`must be less than 90 days. * * @param trId Comma(,) separated list of travel rule record Ids. (optional) - * @param txId (optional) + * @param txId Comma(,) separated list of transaction Ids. (optional) * @param withdrawOrderId client side id for withdrawal, if provided in POST * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) * @param network (optional) * @param coin (optional) * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) - * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) - * @param startTime (optional) - * @param endTime (optional) + * @param offset (optional) + * @param limit (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) * @param recvWindow (optional) * @return ApiResponse<WithdrawHistoryV1Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1473,9 +1528,8 @@ public ApiResponse vaspList(Long recvWindow) throws ApiExcepti * * * @see Withdraw - * History (for local entities that require travel rule) (supporting network) (USER_DATA) - * Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#withdraw-history-v1">Withdraw + * History Travel Rule (supporting network) (USER_DATA) Documentation */ public ApiResponse withdrawHistoryV1( String trId, @@ -1506,28 +1560,29 @@ public ApiResponse withdrawHistoryV1( /** * Withdraw History V2 (for local entities that require travel rule) (supporting network) - * (USER_DATA) Fetch withdraw history for local entities that required travel rule. * - * `network` may not be in the response for old withdraw. * Withdrawal made through - * /sapi/v1/capital/withdraw/apply may not be in the response. * Please notice the default - * `startTime` and `endTime` to make sure that time interval is within * If - * both `startTime` and `endTime`are sent, time between - * `startTime`and `endTime`must be less * If withdrawOrderId is sent, time - * between startTime and endTime must be less than 7 days. * If withdrawOrderId is sent, - * startTime and endTime are not sent, will return last 7 days records by default. * Maximum - * support trId,txId number is 45. * WithdrawOrderId only support 1. * If responsible does not - * include withdrawalStatus, please input trId or txId retrieve the data. Weight: 1 + * (USER_DATA) Fetch withdraw history for local entities that required travel rule. Weight(IP): + * 1 Security Type: USER_DATA Notes: - `network` may not be in the response for old + * withdraw. - Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the + * response. - Please notice the default `startTime` and `endTime` to make + * sure that time interval is within 0-90 days. - If both `startTime` and + * `endTime`are sent, time between `startTime`and `endTime`must be + * less than 90 days. - If withdrawOrderId is sent, time between startTime and endTime must be + * less than 7 days. - If withdrawOrderId is sent, startTime and endTime are not sent, will + * return last 7 days records by default. - Maximum support trId,txId number is 45. - + * WithdrawOrderId only support 1. - If responsible does not include withdrawalStatus, please + * input trId or txId retrieve the data. * * @param trId Comma(,) separated list of travel rule record Ids. (optional) - * @param txId (optional) + * @param txId Comma(,) separated list of transaction Ids. (optional) * @param withdrawOrderId client side id for withdrawal, if provided in POST * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) * @param network (optional) * @param coin (optional) * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) - * @param offset Default: 0 (optional) - * @param limit min 7, max 30, default 7 (optional) - * @param startTime (optional) - * @param endTime (optional) + * @param offset (optional) + * @param limit (optional) + * @param startTime Default: 90 days from current timestamp (optional) + * @param endTime Default: present timestamp (optional) * @param recvWindow (optional) * @return ApiResponse<WithdrawHistoryV2Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1540,7 +1595,7 @@ public ApiResponse withdrawHistoryV1( * * * @see Withdraw + * href="https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/travel-rule#withdraw-history-v2">Withdraw * History V2 (for local entities that require travel rule) (supporting network) (USER_DATA) * Documentation */ @@ -1572,13 +1627,16 @@ public ApiResponse withdrawHistoryV2( } /** - * Withdraw (for local entities that require travel rule) (USER_DATA) Submit a withdrawal - * request for local entities that required travel rule. * If `network` not send, - * return with default network of the coin, but if the address could not match default network, - * the withdraw will be rejected. * You can get `network` and `isDefault` in - * `networkList` of a coin in the response * Questionnaire is different for each local - * entity, please refer to * If getting error like `Questionnaire format not valid.` - * or `Questionnaire must not be blank`, Weight: 600 + * Withdraw Travel Rule (USER_DATA) Submit a withdrawal request for local entities that required + * travel rule. Weight(UID): 600 Security Type: USER_DATA Notes: - If `network` not + * send, return with default network of the coin, but if the address could not match default + * network, the withdraw will be rejected. - You can get `network` and + * `isDefault` in `networkList` of a coin in the response of `Get + * /sapi/v1/capital/config/getall (HMAC SHA256)`. - Questionnaire is different for each + * local entity, please refer to the `Withdraw Questionnaire Contents` page. - If + * getting error like `Questionnaire format not valid.` or `Questionnaire must + * not be blank`, please try to verify the format of the questionnaire and use URL-encoded + * format. * * @param withdrawTravelRuleRequest (required) * @return ApiResponse<WithdrawTravelRuleResponse> @@ -1591,8 +1649,9 @@ public ApiResponse withdrawHistoryV2( * 200 Withdraw - * * - * @see Withdraw (for - * local entities that require travel rule) (USER_DATA) Documentation + * @see Withdraw + * Travel Rule (USER_DATA) Documentation */ public ApiResponse withdrawTravelRule( WithdrawTravelRuleRequest withdrawTravelRuleRequest) throws ApiException { diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountApiTradingStatusResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountApiTradingStatusResponse.java index 794ab5d6f..304c09856 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountApiTradingStatusResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountApiTradingStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** AccountApiTradingStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountApiTradingStatusResponse { public static final String SERIALIZED_NAME_DATA = "data"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountApiTradingStatusResponseData.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountApiTradingStatusResponseData.java index 17eadd106..4b4a1afe4 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountApiTradingStatusResponseData.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountApiTradingStatusResponseData.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** AccountApiTradingStatusResponseData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountApiTradingStatusResponseData { public static final String SERIALIZED_NAME_IS_LOCKED = "isLocked"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountApiTradingStatusResponseDataTriggerCondition.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountApiTradingStatusResponseDataTriggerCondition.java index 533ec50be..86ae5472d 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountApiTradingStatusResponseDataTriggerCondition.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountApiTradingStatusResponseDataTriggerCondition.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountApiTradingStatusResponseDataTriggerCondition */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountApiTradingStatusResponseDataTriggerCondition { public static final String SERIALIZED_NAME_G_C_R = "GCR"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountInfoResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountInfoResponse.java index df6d3590c..7405f6e16 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountInfoResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountInfoResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountInfoResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountInfoResponse { public static final String SERIALIZED_NAME_VIP_LEVEL = "vipLevel"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountStatusResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountStatusResponse.java index 9ef1e540d..f06dcd7f7 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountStatusResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AccountStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AccountStatusResponse { public static final String SERIALIZED_NAME_DATA = "data"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountType.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountType.java new file mode 100644 index 000000000..007ae8022 --- /dev/null +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AccountType.java @@ -0,0 +1,73 @@ +/* + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.wallet.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets accountType */ +@JsonAdapter(AccountType.Adapter.class) +public enum AccountType { + SPOT("SPOT"), + + MARGIN("MARGIN"); + + private String value; + + AccountType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AccountType fromValue(String value) { + for (AccountType b : AccountType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AccountType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountType.fromValue(value); + } +} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AllCoinsInformationResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AllCoinsInformationResponse.java index 95dc7f719..2b5ff1537 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AllCoinsInformationResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AllCoinsInformationResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AllCoinsInformationResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllCoinsInformationResponse extends ArrayList { public AllCoinsInformationResponse() {} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AllCoinsInformationResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AllCoinsInformationResponseInner.java index 85f4de4a8..0fa8d93ec 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AllCoinsInformationResponseInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AllCoinsInformationResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** AllCoinsInformationResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllCoinsInformationResponseInner { public static final String SERIALIZED_NAME_COIN = "coin"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AllCoinsInformationResponseInnerNetworkListInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AllCoinsInformationResponseInnerNetworkListInner.java index 5b031fc6b..1481ea8d9 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AllCoinsInformationResponseInnerNetworkListInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AllCoinsInformationResponseInnerNetworkListInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AllCoinsInformationResponseInnerNetworkListInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AllCoinsInformationResponseInnerNetworkListInner { public static final String SERIALIZED_NAME_NETWORK = "network"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDetailResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDetailResponse.java index e9756d8bc..0b4938018 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDetailResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDetailResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** AssetDetailResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AssetDetailResponse { public static final String SERIALIZED_NAME_C_T_R = "CTR"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDetailResponseCTR.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDetailResponseCTR.java index 1794cb333..6a7e2c9ac 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDetailResponseCTR.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDetailResponseCTR.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AssetDetailResponseCTR */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AssetDetailResponseCTR { public static final String SERIALIZED_NAME_MIN_WITHDRAW_AMOUNT = "minWithdrawAmount"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDetailResponseSKY.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDetailResponseSKY.java index b1ef14fcc..140786a40 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDetailResponseSKY.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDetailResponseSKY.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** AssetDetailResponseSKY */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AssetDetailResponseSKY { public static final String SERIALIZED_NAME_MIN_WITHDRAW_AMOUNT = "minWithdrawAmount"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDividendRecordResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDividendRecordResponse.java index 70b579175..ee5e1f559 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDividendRecordResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDividendRecordResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** AssetDividendRecordResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AssetDividendRecordResponse { public static final String SERIALIZED_NAME_ROWS = "rows"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDividendRecordResponseRowsInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDividendRecordResponseRowsInner.java index de9ada888..af66ee48a 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDividendRecordResponseRowsInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/AssetDividendRecordResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** AssetDividendRecordResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class AssetDividendRecordResponseRowsInner { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/BrokerWithdrawRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/BrokerWithdrawRequest.java index 2950f97b4..d280e2d09 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/BrokerWithdrawRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/BrokerWithdrawRequest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** BrokerWithdrawRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BrokerWithdrawRequest { public static final String SERIALIZED_NAME_ADDRESS = "address"; @@ -103,12 +103,6 @@ public class BrokerWithdrawRequest { @jakarta.annotation.Nonnull private String originatorPii; - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - - @SerializedName(SERIALIZED_NAME_SIGNATURE) - @jakarta.annotation.Nonnull - private String signature; - public BrokerWithdrawRequest() {} public BrokerWithdrawRequest address(@jakarta.annotation.Nonnull String address) { @@ -137,7 +131,7 @@ public BrokerWithdrawRequest addressTag(@jakarta.annotation.Nullable String addr } /** - * Get addressTag + * Secondary address identifier for coins like XRP,XMR etc. * * @return addressTag */ @@ -195,7 +189,8 @@ public BrokerWithdrawRequest addressName(@jakarta.annotation.Nullable String add } /** - * Get addressName + * Description of the address. Address book cap is 200, space in name should be encoded into + * `%20` * * @return addressName */ @@ -236,7 +231,7 @@ public BrokerWithdrawRequest withdrawOrderId( } /** - * Get withdrawOrderId + * withdrawID defined by the client (i.e. client's internal withdrawID) * * @return withdrawOrderId */ @@ -257,7 +252,9 @@ public BrokerWithdrawRequest transactionFeeFlag( } /** - * Get transactionFeeFlag + * When making internal transfer, `true` for returning the fee to the destination + * account; `false` for returning the fee back to the departure account. Default + * `false`. * * @return transactionFeeFlag */ @@ -276,7 +273,8 @@ public BrokerWithdrawRequest walletType(@jakarta.annotation.Nullable Long wallet } /** - * Get walletType + * The wallet type for withdraw,0-spot wallet ,1-funding wallet. Default walletType is the + * current \"selected wallet\" under wallet->Fiat and Spot/Funding->Deposit * * @return walletType */ @@ -295,7 +293,7 @@ public BrokerWithdrawRequest questionnaire(@jakarta.annotation.Nonnull String qu } /** - * Get questionnaire + * JSON format questionnaire answers. * * @return questionnaire */ @@ -315,7 +313,7 @@ public BrokerWithdrawRequest originatorPii(@jakarta.annotation.Nonnull String or } /** - * Get originatorPii + * JSON format originator Pii, see StandardPii section below * * @return originatorPii */ @@ -329,26 +327,6 @@ public void setOriginatorPii(@jakarta.annotation.Nonnull String originatorPii) { this.originatorPii = originatorPii; } - public BrokerWithdrawRequest signature(@jakarta.annotation.Nonnull String signature) { - this.signature = signature; - return this; - } - - /** - * Get signature - * - * @return signature - */ - @jakarta.annotation.Nonnull - @NotNull - public String getSignature() { - return signature; - } - - public void setSignature(@jakarta.annotation.Nonnull String signature) { - this.signature = signature; - } - @Override public boolean equals(Object o) { if (this == o) { @@ -368,8 +346,7 @@ public boolean equals(Object o) { && Objects.equals(this.transactionFeeFlag, brokerWithdrawRequest.transactionFeeFlag) && Objects.equals(this.walletType, brokerWithdrawRequest.walletType) && Objects.equals(this.questionnaire, brokerWithdrawRequest.questionnaire) - && Objects.equals(this.originatorPii, brokerWithdrawRequest.originatorPii) - && Objects.equals(this.signature, brokerWithdrawRequest.signature); + && Objects.equals(this.originatorPii, brokerWithdrawRequest.originatorPii); } @Override @@ -385,8 +362,7 @@ public int hashCode() { transactionFeeFlag, walletType, questionnaire, - originatorPii, - signature); + originatorPii); } @Override @@ -406,7 +382,6 @@ public String toString() { sb.append(" walletType: ").append(toIndentedString(walletType)).append("\n"); sb.append(" questionnaire: ").append(toIndentedString(questionnaire)).append("\n"); sb.append(" originatorPii: ").append(toIndentedString(originatorPii)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append("}"); return sb.toString(); } @@ -460,10 +435,6 @@ public String toUrlQueryString() { String originatorPiiValueAsString = ""; originatorPiiValueAsString = originatorPiiValue.toString(); sb.append("originatorPii=").append(urlEncode(originatorPiiValueAsString)).append(""); - Object signatureValue = getSignature(); - String signatureValueAsString = ""; - signatureValueAsString = signatureValue.toString(); - sb.append("signature=").append(urlEncode(signatureValueAsString)).append(""); return sb.toString(); } @@ -503,7 +474,6 @@ private String toIndentedString(Object o) { openapiFields.add("walletType"); openapiFields.add("questionnaire"); openapiFields.add("originatorPii"); - openapiFields.add("signature"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -513,7 +483,6 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("withdrawOrderId"); openapiRequiredFields.add("questionnaire"); openapiRequiredFields.add("originatorPii"); - openapiRequiredFields.add("signature"); } /** @@ -603,13 +572,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("originatorPii").toString())); } - if (!jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `signature` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("signature").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/BrokerWithdrawResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/BrokerWithdrawResponse.java index 5def1782d..9682be3e3 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/BrokerWithdrawResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/BrokerWithdrawResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** BrokerWithdrawResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class BrokerWithdrawResponse { public static final String SERIALIZED_NAME_TR_ID = "trId"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/CheckQuestionnaireRequirementsResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/CheckQuestionnaireRequirementsResponse.java index 00b665bd3..632008e21 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/CheckQuestionnaireRequirementsResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/CheckQuestionnaireRequirementsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** CheckQuestionnaireRequirementsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class CheckQuestionnaireRequirementsResponse { public static final String SERIALIZED_NAME_QUESTIONNAIRE_COUNTRY_CODE = "questionnaireCountryCode"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponse.java index 73c5ce12a..8733186ad 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** DailyAccountSnapshotResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DailyAccountSnapshotResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInner.java index 2b0cb7fb4..e5c8e1e6b 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** DailyAccountSnapshotResponseSnapshotVosInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DailyAccountSnapshotResponseSnapshotVosInner { public static final String SERIALIZED_NAME_DATA = "data"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerData.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerData.java index 8d4d459fd..5d9761d8b 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerData.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerData.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** DailyAccountSnapshotResponseSnapshotVosInnerData */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DailyAccountSnapshotResponseSnapshotVosInnerData { public static final String SERIALIZED_NAME_BALANCES = "balances"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerDataAssetsInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerDataAssetsInner.java index 520696c3c..d0767575f 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerDataAssetsInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerDataAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DailyAccountSnapshotResponseSnapshotVosInnerDataAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DailyAccountSnapshotResponseSnapshotVosInnerDataAssetsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerDataBalancesInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerDataBalancesInner.java index ae4ab4ce2..d56f3bb35 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerDataBalancesInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerDataBalancesInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DailyAccountSnapshotResponseSnapshotVosInnerDataBalancesInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DailyAccountSnapshotResponseSnapshotVosInnerDataBalancesInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerDataPositionInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerDataPositionInner.java index 0d328f1f1..1665a195a 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerDataPositionInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerDataPositionInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DailyAccountSnapshotResponseSnapshotVosInnerDataPositionInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DailyAccountSnapshotResponseSnapshotVosInnerDataPositionInner { public static final String SERIALIZED_NAME_ENTRY_PRICE = "entryPrice"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner.java index 534c6e882..6bbace12f 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DailyAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DailyAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DailyAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositAddressResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositAddressResponse.java index ece5357df..acd87aa57 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositAddressResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositAddressResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DepositAddressResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DepositAddressResponse { public static final String SERIALIZED_NAME_ADDRESS = "address"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryResponse.java index a15fde4e3..8d9ee6be1 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DepositHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DepositHistoryResponse extends ArrayList { public DepositHistoryResponse() {} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryResponseInner.java index 0e81ff6b7..a4ab62767 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryResponseInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DepositHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DepositHistoryResponseInner { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryTravelRuleResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryTravelRuleResponse.java index 05b0f4865..46dc3118d 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryTravelRuleResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryTravelRuleResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DepositHistoryTravelRuleResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DepositHistoryTravelRuleResponse extends ArrayList { public DepositHistoryTravelRuleResponse() {} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryTravelRuleResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryTravelRuleResponseInner.java index 04676535e..1c7e77e01 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryTravelRuleResponseInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryTravelRuleResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DepositHistoryTravelRuleResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DepositHistoryTravelRuleResponseInner { public static final String SERIALIZED_NAME_TR_ID = "trId"; @@ -78,6 +78,12 @@ public class DepositHistoryTravelRuleResponseInner { @jakarta.annotation.Nullable private Long travelRuleStatus; + public static final String SERIALIZED_NAME_TRAVEL_RULE_STATUS_V2 = "travelRuleStatusV2"; + + @SerializedName(SERIALIZED_NAME_TRAVEL_RULE_STATUS_V2) + @jakarta.annotation.Nullable + private String travelRuleStatusV2; + public static final String SERIALIZED_NAME_ADDRESS = "address"; @SerializedName(SERIALIZED_NAME_ADDRESS) @@ -102,6 +108,12 @@ public class DepositHistoryTravelRuleResponseInner { @jakarta.annotation.Nullable private Long insertTime; + public static final String SERIALIZED_NAME_COMPLETE_TIME = "completeTime"; + + @SerializedName(SERIALIZED_NAME_COMPLETE_TIME) + @jakarta.annotation.Nullable + private Long completeTime; + public static final String SERIALIZED_NAME_TRANSFER_TYPE = "transferType"; @SerializedName(SERIALIZED_NAME_TRANSFER_TYPE) @@ -114,18 +126,6 @@ public class DepositHistoryTravelRuleResponseInner { @jakarta.annotation.Nullable private String confirmTimes; - public static final String SERIALIZED_NAME_UNLOCK_CONFIRM = "unlockConfirm"; - - @SerializedName(SERIALIZED_NAME_UNLOCK_CONFIRM) - @jakarta.annotation.Nullable - private Long unlockConfirm; - - public static final String SERIALIZED_NAME_WALLET_TYPE = "walletType"; - - @SerializedName(SERIALIZED_NAME_WALLET_TYPE) - @jakarta.annotation.Nullable - private Long walletType; - public static final String SERIALIZED_NAME_REQUIRE_QUESTIONNAIRE = "requireQuestionnaire"; @SerializedName(SERIALIZED_NAME_REQUIRE_QUESTIONNAIRE) @@ -277,6 +277,28 @@ public void setTravelRuleStatus(@jakarta.annotation.Nullable Long travelRuleStat this.travelRuleStatus = travelRuleStatus; } + public DepositHistoryTravelRuleResponseInner travelRuleStatusV2( + @jakarta.annotation.Nullable String travelRuleStatusV2) { + this.travelRuleStatusV2 = travelRuleStatusV2; + return this; + } + + /** + * Overall travel rule verification status (GTR + sanctions screening combined). + * \"PASSED\": verification complete, deposit released. \"PENDING\": + * verification in progress, deposit frozen. \"REJECTED\": verification failed. + * + * @return travelRuleStatusV2 + */ + @jakarta.annotation.Nullable + public String getTravelRuleStatusV2() { + return travelRuleStatusV2; + } + + public void setTravelRuleStatusV2(@jakarta.annotation.Nullable String travelRuleStatusV2) { + this.travelRuleStatusV2 = travelRuleStatusV2; + } + public DepositHistoryTravelRuleResponseInner address( @jakarta.annotation.Nullable String address) { this.address = address; @@ -356,6 +378,26 @@ public void setInsertTime(@jakarta.annotation.Nullable Long insertTime) { this.insertTime = insertTime; } + public DepositHistoryTravelRuleResponseInner completeTime( + @jakarta.annotation.Nullable Long completeTime) { + this.completeTime = completeTime; + return this; + } + + /** + * Timestamp when the deposit was fully completed/credited (epoch ms). + * + * @return completeTime + */ + @jakarta.annotation.Nullable + public Long getCompleteTime() { + return completeTime; + } + + public void setCompleteTime(@jakarta.annotation.Nullable Long completeTime) { + this.completeTime = completeTime; + } + public DepositHistoryTravelRuleResponseInner transferType( @jakarta.annotation.Nullable Long transferType) { this.transferType = transferType; @@ -396,46 +438,6 @@ public void setConfirmTimes(@jakarta.annotation.Nullable String confirmTimes) { this.confirmTimes = confirmTimes; } - public DepositHistoryTravelRuleResponseInner unlockConfirm( - @jakarta.annotation.Nullable Long unlockConfirm) { - this.unlockConfirm = unlockConfirm; - return this; - } - - /** - * Get unlockConfirm - * - * @return unlockConfirm - */ - @jakarta.annotation.Nullable - public Long getUnlockConfirm() { - return unlockConfirm; - } - - public void setUnlockConfirm(@jakarta.annotation.Nullable Long unlockConfirm) { - this.unlockConfirm = unlockConfirm; - } - - public DepositHistoryTravelRuleResponseInner walletType( - @jakarta.annotation.Nullable Long walletType) { - this.walletType = walletType; - return this; - } - - /** - * Get walletType - * - * @return walletType - */ - @jakarta.annotation.Nullable - public Long getWalletType() { - return walletType; - } - - public void setWalletType(@jakarta.annotation.Nullable Long walletType) { - this.walletType = walletType; - } - public DepositHistoryTravelRuleResponseInner requireQuestionnaire( @jakarta.annotation.Nullable Boolean requireQuestionnaire) { this.requireQuestionnaire = requireQuestionnaire; @@ -496,17 +498,19 @@ public boolean equals(Object o) { && Objects.equals( this.travelRuleStatus, depositHistoryTravelRuleResponseInner.travelRuleStatus) + && Objects.equals( + this.travelRuleStatusV2, + depositHistoryTravelRuleResponseInner.travelRuleStatusV2) && Objects.equals(this.address, depositHistoryTravelRuleResponseInner.address) && Objects.equals(this.addressTag, depositHistoryTravelRuleResponseInner.addressTag) && Objects.equals(this.txId, depositHistoryTravelRuleResponseInner.txId) && Objects.equals(this.insertTime, depositHistoryTravelRuleResponseInner.insertTime) + && Objects.equals( + this.completeTime, depositHistoryTravelRuleResponseInner.completeTime) && Objects.equals( this.transferType, depositHistoryTravelRuleResponseInner.transferType) && Objects.equals( this.confirmTimes, depositHistoryTravelRuleResponseInner.confirmTimes) - && Objects.equals( - this.unlockConfirm, depositHistoryTravelRuleResponseInner.unlockConfirm) - && Objects.equals(this.walletType, depositHistoryTravelRuleResponseInner.walletType) && Objects.equals( this.requireQuestionnaire, depositHistoryTravelRuleResponseInner.requireQuestionnaire) @@ -524,14 +528,14 @@ public int hashCode() { network, depositStatus, travelRuleStatus, + travelRuleStatusV2, address, addressTag, txId, insertTime, + completeTime, transferType, confirmTimes, - unlockConfirm, - walletType, requireQuestionnaire, questionnaire); } @@ -547,14 +551,16 @@ public String toString() { sb.append(" network: ").append(toIndentedString(network)).append("\n"); sb.append(" depositStatus: ").append(toIndentedString(depositStatus)).append("\n"); sb.append(" travelRuleStatus: ").append(toIndentedString(travelRuleStatus)).append("\n"); + sb.append(" travelRuleStatusV2: ") + .append(toIndentedString(travelRuleStatusV2)) + .append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" addressTag: ").append(toIndentedString(addressTag)).append("\n"); sb.append(" txId: ").append(toIndentedString(txId)).append("\n"); sb.append(" insertTime: ").append(toIndentedString(insertTime)).append("\n"); + sb.append(" completeTime: ").append(toIndentedString(completeTime)).append("\n"); sb.append(" transferType: ").append(toIndentedString(transferType)).append("\n"); sb.append(" confirmTimes: ").append(toIndentedString(confirmTimes)).append("\n"); - sb.append(" unlockConfirm: ").append(toIndentedString(unlockConfirm)).append("\n"); - sb.append(" walletType: ").append(toIndentedString(walletType)).append("\n"); sb.append(" requireQuestionnaire: ") .append(toIndentedString(requireQuestionnaire)) .append("\n"); @@ -594,6 +600,12 @@ public String toUrlQueryString() { String travelRuleStatusValueAsString = ""; travelRuleStatusValueAsString = travelRuleStatusValue.toString(); sb.append("travelRuleStatus=").append(urlEncode(travelRuleStatusValueAsString)).append(""); + Object travelRuleStatusV2Value = getTravelRuleStatusV2(); + String travelRuleStatusV2ValueAsString = ""; + travelRuleStatusV2ValueAsString = travelRuleStatusV2Value.toString(); + sb.append("travelRuleStatusV2=") + .append(urlEncode(travelRuleStatusV2ValueAsString)) + .append(""); Object addressValue = getAddress(); String addressValueAsString = ""; addressValueAsString = addressValue.toString(); @@ -610,6 +622,10 @@ public String toUrlQueryString() { String insertTimeValueAsString = ""; insertTimeValueAsString = insertTimeValue.toString(); sb.append("insertTime=").append(urlEncode(insertTimeValueAsString)).append(""); + Object completeTimeValue = getCompleteTime(); + String completeTimeValueAsString = ""; + completeTimeValueAsString = completeTimeValue.toString(); + sb.append("completeTime=").append(urlEncode(completeTimeValueAsString)).append(""); Object transferTypeValue = getTransferType(); String transferTypeValueAsString = ""; transferTypeValueAsString = transferTypeValue.toString(); @@ -618,14 +634,6 @@ public String toUrlQueryString() { String confirmTimesValueAsString = ""; confirmTimesValueAsString = confirmTimesValue.toString(); sb.append("confirmTimes=").append(urlEncode(confirmTimesValueAsString)).append(""); - Object unlockConfirmValue = getUnlockConfirm(); - String unlockConfirmValueAsString = ""; - unlockConfirmValueAsString = unlockConfirmValue.toString(); - sb.append("unlockConfirm=").append(urlEncode(unlockConfirmValueAsString)).append(""); - Object walletTypeValue = getWalletType(); - String walletTypeValueAsString = ""; - walletTypeValueAsString = walletTypeValue.toString(); - sb.append("walletType=").append(urlEncode(walletTypeValueAsString)).append(""); Object requireQuestionnaireValue = getRequireQuestionnaire(); String requireQuestionnaireValueAsString = ""; requireQuestionnaireValueAsString = requireQuestionnaireValue.toString(); @@ -671,14 +679,14 @@ private String toIndentedString(Object o) { openapiFields.add("network"); openapiFields.add("depositStatus"); openapiFields.add("travelRuleStatus"); + openapiFields.add("travelRuleStatusV2"); openapiFields.add("address"); openapiFields.add("addressTag"); openapiFields.add("txId"); openapiFields.add("insertTime"); + openapiFields.add("completeTime"); openapiFields.add("transferType"); openapiFields.add("confirmTimes"); - openapiFields.add("unlockConfirm"); - openapiFields.add("walletType"); openapiFields.add("requireQuestionnaire"); openapiFields.add("questionnaire"); @@ -730,6 +738,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("network").toString())); } + if ((jsonObj.get("travelRuleStatusV2") != null + && !jsonObj.get("travelRuleStatusV2").isJsonNull()) + && !jsonObj.get("travelRuleStatusV2").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `travelRuleStatusV2` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("travelRuleStatusV2").toString())); + } if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryV2Response.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryV2Response.java index 86e05e219..e69121e1f 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryV2Response.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryV2Response.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DepositHistoryV2Response */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DepositHistoryV2Response extends ArrayList { public DepositHistoryV2Response() {} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryV2ResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryV2ResponseInner.java index 1046f8a3f..355c8944d 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryV2ResponseInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryV2ResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** DepositHistoryV2ResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DepositHistoryV2ResponseInner { public static final String SERIALIZED_NAME_DEPOSIT_ID = "depositId"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryV2ResponseInnerQuestionnaire.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryV2ResponseInnerQuestionnaire.java index 8c49c9a59..b073e631a 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryV2ResponseInnerQuestionnaire.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DepositHistoryV2ResponseInnerQuestionnaire.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DepositHistoryV2ResponseInnerQuestionnaire */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DepositHistoryV2ResponseInnerQuestionnaire { public static final String SERIALIZED_NAME_VASP_NAME = "vaspName"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DisableFastWithdrawSwitchRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DisableFastWithdrawSwitchRequest.java index 319a3ea64..0c7691683 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DisableFastWithdrawSwitchRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DisableFastWithdrawSwitchRequest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DisableFastWithdrawSwitchRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DisableFastWithdrawSwitchRequest { public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -51,11 +51,12 @@ public DisableFastWithdrawSwitchRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertRequest.java index 874ea614e..1c847a28b 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertRequest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** DustConvertRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DustConvertRequest { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -102,7 +102,7 @@ public DustConvertRequest accountType(@jakarta.annotation.Nullable String accoun } /** - * Get accountType + * `SPOT` or `MARGIN`, default `SPOT` * * @return accountType */ @@ -121,7 +121,7 @@ public DustConvertRequest clientId(@jakarta.annotation.Nullable String clientId) } /** - * Get clientId + * A unique id for the request * * @return clientId */ diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertResponse.java index 5be2b00a6..4d08e6cfa 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** DustConvertResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DustConvertResponse { public static final String SERIALIZED_NAME_TOTAL_TRANSFERED = "totalTransfered"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertResponseTransferResultInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertResponseTransferResultInner.java index 38a969764..a9ca6604e 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertResponseTransferResultInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertResponseTransferResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DustConvertResponseTransferResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DustConvertResponseTransferResultInner { public static final String SERIALIZED_NAME_TRAN_ID = "tranId"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertibleAssetsRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertibleAssetsRequest.java index dc602a0b1..872724121 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertibleAssetsRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertibleAssetsRequest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** DustConvertibleAssetsRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DustConvertibleAssetsRequest { public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "accountType"; @@ -65,7 +65,7 @@ public DustConvertibleAssetsRequest accountType( } /** - * Get accountType + * `SPOT` or `MARGIN`, default `SPOT` * * @return accountType */ diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertibleAssetsResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertibleAssetsResponse.java index 5c5c22b2f..a12ef7085 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertibleAssetsResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertibleAssetsResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** DustConvertibleAssetsResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DustConvertibleAssetsResponse { public static final String SERIALIZED_NAME_DRIBBLET_PERCENTAGE = "dribbletPercentage"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertibleAssetsResponseDetailsInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertibleAssetsResponseDetailsInner.java index c46dd555d..b47569fea 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertibleAssetsResponseDetailsInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertibleAssetsResponseDetailsInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DustConvertibleAssetsResponseDetailsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DustConvertibleAssetsResponseDetailsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustTransferRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustTransferRequest.java index 7592537cc..453530644 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustTransferRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustTransferRequest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -34,7 +35,7 @@ /** DustTransferRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DustTransferRequest { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -46,7 +47,7 @@ public class DustTransferRequest { @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) @jakarta.annotation.Nullable - private String accountType; + private AccountType accountType = AccountType.SPOT; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -62,7 +63,7 @@ public DustTransferRequest asset(@jakarta.annotation.Nonnull String asset) { } /** - * Get asset + * The asset being converted. For example: asset=BTC,USDT * * @return asset */ @@ -76,7 +77,7 @@ public void setAsset(@jakarta.annotation.Nonnull String asset) { this.asset = asset; } - public DustTransferRequest accountType(@jakarta.annotation.Nullable String accountType) { + public DustTransferRequest accountType(@jakarta.annotation.Nullable AccountType accountType) { this.accountType = accountType; return this; } @@ -87,11 +88,12 @@ public DustTransferRequest accountType(@jakarta.annotation.Nullable String accou * @return accountType */ @jakarta.annotation.Nullable - public String getAccountType() { + @Valid + public AccountType getAccountType() { return accountType; } - public void setAccountType(@jakarta.annotation.Nullable String accountType) { + public void setAccountType(@jakarta.annotation.Nullable AccountType accountType) { this.accountType = accountType; } @@ -101,11 +103,12 @@ public DustTransferRequest recvWindow(@jakarta.annotation.Nullable Long recvWind } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -231,13 +234,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("asset").toString())); } - if ((jsonObj.get("accountType") != null && !jsonObj.get("accountType").isJsonNull()) - && !jsonObj.get("accountType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `accountType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("accountType").toString())); + // validate the optional field `accountType` + if (jsonObj.get("accountType") != null && !jsonObj.get("accountType").isJsonNull()) { + AccountType.validateJsonElement(jsonObj.get("accountType")); } } diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustTransferResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustTransferResponse.java index dbc73831f..b2c4a58e6 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustTransferResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustTransferResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** DustTransferResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DustTransferResponse { public static final String SERIALIZED_NAME_TOTAL_SERVICE_CHARGE = "totalServiceCharge"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustTransferResponseTransferResultInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustTransferResponseTransferResultInner.java index 056fbfbca..46aaabdd7 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustTransferResponseTransferResultInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustTransferResponseTransferResultInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DustTransferResponseTransferResultInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DustTransferResponseTransferResultInner { public static final String SERIALIZED_NAME_AMOUNT = "amount"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustlogResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustlogResponse.java index 3364bf41e..16a8fde92 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustlogResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustlogResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** DustlogResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DustlogResponse { public static final String SERIALIZED_NAME_TOTAL = "total"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustlogResponseUserAssetDribbletsInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustlogResponseUserAssetDribbletsInner.java index a5a2bb01f..2b4b775bd 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustlogResponseUserAssetDribbletsInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustlogResponseUserAssetDribbletsInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** DustlogResponseUserAssetDribbletsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DustlogResponseUserAssetDribbletsInner { public static final String SERIALIZED_NAME_OPERATE_TIME = "operateTime"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.java index 1f9bfee2b..24f4fdd9b 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner { public static final String SERIALIZED_NAME_TRANS_ID = "transId"; @@ -72,6 +72,12 @@ public class DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner @jakarta.annotation.Nullable private String fromAsset; + public static final String SERIALIZED_NAME_TARGET_ASSET = "targetAsset"; + + @SerializedName(SERIALIZED_NAME_TARGET_ASSET) + @jakarta.annotation.Nullable + private String targetAsset; + public DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner() {} public DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner transId( @@ -194,6 +200,26 @@ public void setFromAsset(@jakarta.annotation.Nullable String fromAsset) { this.fromAsset = fromAsset; } + public DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner targetAsset( + @jakarta.annotation.Nullable String targetAsset) { + this.targetAsset = targetAsset; + return this; + } + + /** + * Get targetAsset + * + * @return targetAsset + */ + @jakarta.annotation.Nullable + public String getTargetAsset() { + return targetAsset; + } + + public void setTargetAsset(@jakarta.annotation.Nullable String targetAsset) { + this.targetAsset = targetAsset; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -226,13 +252,23 @@ public boolean equals(Object o) { && Objects.equals( this.fromAsset, dustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner - .fromAsset); + .fromAsset) + && Objects.equals( + this.targetAsset, + dustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner + .targetAsset); } @Override public int hashCode() { return Objects.hash( - transId, serviceChargeAmount, amount, operateTime, transferedAmount, fromAsset); + transId, + serviceChargeAmount, + amount, + operateTime, + transferedAmount, + fromAsset, + targetAsset); } @Override @@ -247,6 +283,7 @@ public String toString() { sb.append(" operateTime: ").append(toIndentedString(operateTime)).append("\n"); sb.append(" transferedAmount: ").append(toIndentedString(transferedAmount)).append("\n"); sb.append(" fromAsset: ").append(toIndentedString(fromAsset)).append("\n"); + sb.append(" targetAsset: ").append(toIndentedString(targetAsset)).append("\n"); sb.append("}"); return sb.toString(); } @@ -280,6 +317,10 @@ public String toUrlQueryString() { String fromAssetValueAsString = ""; fromAssetValueAsString = fromAssetValue.toString(); sb.append("fromAsset=").append(urlEncode(fromAssetValueAsString)).append(""); + Object targetAssetValue = getTargetAsset(); + String targetAssetValueAsString = ""; + targetAssetValueAsString = targetAssetValue.toString(); + sb.append("targetAsset=").append(urlEncode(targetAssetValueAsString)).append(""); return sb.toString(); } @@ -314,6 +355,7 @@ private String toIndentedString(Object o) { openapiFields.add("operateTime"); openapiFields.add("transferedAmount"); openapiFields.add("fromAsset"); + openapiFields.add("targetAsset"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -376,6 +418,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("fromAsset").toString())); } + if ((jsonObj.get("targetAsset") != null && !jsonObj.get("targetAsset").isJsonNull()) + && !jsonObj.get("targetAsset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `targetAsset` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("targetAsset").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/EnableFastWithdrawSwitchRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/EnableFastWithdrawSwitchRequest.java index d59d98e71..43fee2ce6 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/EnableFastWithdrawSwitchRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/EnableFastWithdrawSwitchRequest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** EnableFastWithdrawSwitchRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class EnableFastWithdrawSwitchRequest { public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -51,11 +51,12 @@ public EnableFastWithdrawSwitchRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchAddressVerificationListResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchAddressVerificationListResponse.java index ddfe84b2a..517bc807e 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchAddressVerificationListResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchAddressVerificationListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FetchAddressVerificationListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FetchAddressVerificationListResponse extends ArrayList { public FetchAddressVerificationListResponse() {} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchAddressVerificationListResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchAddressVerificationListResponseInner.java index 934a84dde..2b1bbc19b 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchAddressVerificationListResponseInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchAddressVerificationListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** FetchAddressVerificationListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FetchAddressVerificationListResponseInner { public static final String SERIALIZED_NAME_STATUS = "status"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchAddressVerificationListResponseInnerAddressQuestionnaire.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchAddressVerificationListResponseInnerAddressQuestionnaire.java index 412dcaafd..13ddc427e 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchAddressVerificationListResponseInnerAddressQuestionnaire.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchAddressVerificationListResponseInnerAddressQuestionnaire.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FetchAddressVerificationListResponseInnerAddressQuestionnaire */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FetchAddressVerificationListResponseInnerAddressQuestionnaire { public static final String SERIALIZED_NAME_SEND_TO = "sendTo"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchDepositAddressListWithNetworkResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchDepositAddressListWithNetworkResponse.java index 5fdd80c11..1caa91571 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchDepositAddressListWithNetworkResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchDepositAddressListWithNetworkResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FetchDepositAddressListWithNetworkResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FetchDepositAddressListWithNetworkResponse extends ArrayList { public FetchDepositAddressListWithNetworkResponse() {} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchDepositAddressListWithNetworkResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchDepositAddressListWithNetworkResponseInner.java index 3e3cf3dcc..ef727676c 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchDepositAddressListWithNetworkResponseInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchDepositAddressListWithNetworkResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FetchDepositAddressListWithNetworkResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FetchDepositAddressListWithNetworkResponseInner { public static final String SERIALIZED_NAME_COIN = "coin"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchWithdrawAddressListResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchWithdrawAddressListResponse.java index 79ef33ad1..760d1470f 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchWithdrawAddressListResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchWithdrawAddressListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FetchWithdrawAddressListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FetchWithdrawAddressListResponse extends ArrayList { public FetchWithdrawAddressListResponse() {} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchWithdrawAddressListResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchWithdrawAddressListResponseInner.java index ea9075c87..0439ec5d1 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchWithdrawAddressListResponseInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchWithdrawAddressListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FetchWithdrawAddressListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FetchWithdrawAddressListResponseInner { public static final String SERIALIZED_NAME_ADDRESS = "address"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchWithdrawQuotaResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchWithdrawQuotaResponse.java index d50956be7..664423c74 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchWithdrawQuotaResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FetchWithdrawQuotaResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FetchWithdrawQuotaResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FetchWithdrawQuotaResponse { public static final String SERIALIZED_NAME_WD_QUOTA = "wdQuota"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FromSymbol.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FromSymbol.java new file mode 100644 index 000000000..1d8e7152a --- /dev/null +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FromSymbol.java @@ -0,0 +1,73 @@ +/* + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.wallet.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets fromSymbol */ +@JsonAdapter(FromSymbol.Adapter.class) +public enum FromSymbol { + ISOLATEDMARGIN_MARGIN("ISOLATEDMARGIN_MARGIN"), + + ISOLATEDMARGIN_ISOLATEDMARGIN("ISOLATEDMARGIN_ISOLATEDMARGIN"); + + private String value; + + FromSymbol(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FromSymbol fromValue(String value) { + for (FromSymbol b : FromSymbol.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FromSymbol enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FromSymbol read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FromSymbol.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FromSymbol.fromValue(value); + } +} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FundingWalletRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FundingWalletRequest.java index 55aeca125..7e60cddcd 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FundingWalletRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FundingWalletRequest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FundingWalletRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FundingWalletRequest { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -101,11 +101,12 @@ public FundingWalletRequest recvWindow(@jakarta.annotation.Nullable Long recvWin } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FundingWalletResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FundingWalletResponse.java index f94ef3014..7a92c4efa 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FundingWalletResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FundingWalletResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FundingWalletResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FundingWalletResponse extends ArrayList { public FundingWalletResponse() {} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FundingWalletResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FundingWalletResponseInner.java index fb024df16..a4418123b 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FundingWalletResponseInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/FundingWalletResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** FundingWalletResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class FundingWalletResponseInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetApiKeyPermissionResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetApiKeyPermissionResponse.java index f77b831ab..d5754cd78 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetApiKeyPermissionResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetApiKeyPermissionResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetApiKeyPermissionResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetApiKeyPermissionResponse { public static final String SERIALIZED_NAME_IP_RESTRICT = "ipRestrict"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetAssetsThatCanBeConvertedIntoBnbRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetAssetsThatCanBeConvertedIntoBnbRequest.java index 22dfdd2c2..719444807 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetAssetsThatCanBeConvertedIntoBnbRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetAssetsThatCanBeConvertedIntoBnbRequest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -34,13 +35,13 @@ /** GetAssetsThatCanBeConvertedIntoBnbRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetAssetsThatCanBeConvertedIntoBnbRequest { public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "accountType"; @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) @jakarta.annotation.Nullable - private String accountType; + private AccountType accountType = AccountType.SPOT; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -51,7 +52,7 @@ public class GetAssetsThatCanBeConvertedIntoBnbRequest { public GetAssetsThatCanBeConvertedIntoBnbRequest() {} public GetAssetsThatCanBeConvertedIntoBnbRequest accountType( - @jakarta.annotation.Nullable String accountType) { + @jakarta.annotation.Nullable AccountType accountType) { this.accountType = accountType; return this; } @@ -62,11 +63,12 @@ public GetAssetsThatCanBeConvertedIntoBnbRequest accountType( * @return accountType */ @jakarta.annotation.Nullable - public String getAccountType() { + @Valid + public AccountType getAccountType() { return accountType; } - public void setAccountType(@jakarta.annotation.Nullable String accountType) { + public void setAccountType(@jakarta.annotation.Nullable AccountType accountType) { this.accountType = accountType; } @@ -77,11 +79,12 @@ public GetAssetsThatCanBeConvertedIntoBnbRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -188,13 +191,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("accountType") != null && !jsonObj.get("accountType").isJsonNull()) - && !jsonObj.get("accountType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `accountType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("accountType").toString())); + // validate the optional field `accountType` + if (jsonObj.get("accountType") != null && !jsonObj.get("accountType").isJsonNull()) { + AccountType.validateJsonElement(jsonObj.get("accountType")); } } diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetAssetsThatCanBeConvertedIntoBnbResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetAssetsThatCanBeConvertedIntoBnbResponse.java index a1c75df53..084bb9589 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetAssetsThatCanBeConvertedIntoBnbResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetAssetsThatCanBeConvertedIntoBnbResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetAssetsThatCanBeConvertedIntoBnbResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetAssetsThatCanBeConvertedIntoBnbResponse { public static final String SERIALIZED_NAME_DETAILS = "details"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetAssetsThatCanBeConvertedIntoBnbResponseDetailsInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetAssetsThatCanBeConvertedIntoBnbResponseDetailsInner.java index d260fa285..86cda7fc9 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetAssetsThatCanBeConvertedIntoBnbResponseDetailsInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetAssetsThatCanBeConvertedIntoBnbResponseDetailsInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetAssetsThatCanBeConvertedIntoBnbResponseDetailsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetAssetsThatCanBeConvertedIntoBnbResponseDetailsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCloudMiningPaymentAndRefundHistoryResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCloudMiningPaymentAndRefundHistoryResponse.java index 224edaf67..3cdb0c624 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCloudMiningPaymentAndRefundHistoryResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCloudMiningPaymentAndRefundHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetCloudMiningPaymentAndRefundHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCloudMiningPaymentAndRefundHistoryResponse { public static final String SERIALIZED_NAME_TOTAL = "total"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCloudMiningPaymentAndRefundHistoryResponseRowsInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCloudMiningPaymentAndRefundHistoryResponseRowsInner.java index 48ec65f01..d5dd261fe 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCloudMiningPaymentAndRefundHistoryResponseRowsInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCloudMiningPaymentAndRefundHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetCloudMiningPaymentAndRefundHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCloudMiningPaymentAndRefundHistoryResponseRowsInner { public static final String SERIALIZED_NAME_CREATE_TIME = "createTime"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponse.java index f513d1752..04ee41091 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetCountryListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCountryListResponse { public static final String SERIALIZED_NAME_COUNTRIES = "countries"; @@ -95,7 +95,7 @@ public GetCountryListResponse lastUpdated(@jakarta.annotation.Nullable Long last } /** - * Get lastUpdated + * Last data update timestamp (epoch milliseconds); 0 if empty. * * @return lastUpdated */ diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponseCountriesInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponseCountriesInner.java index bab1b044b..c04aca7ca 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponseCountriesInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponseCountriesInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetCountryListResponseCountriesInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetCountryListResponseCountriesInner { public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; @@ -81,7 +81,7 @@ public GetCountryListResponseCountriesInner countryCode( } /** - * Get countryCode + * ISO 2-digit country code, lowercase. * * @return countryCode */ @@ -101,7 +101,7 @@ public GetCountryListResponseCountriesInner countryName( } /** - * Get countryName + * Country display name. * * @return countryName */ @@ -121,7 +121,7 @@ public GetCountryListResponseCountriesInner blockType( } /** - * Get blockType + * `supported`, `limited`, or `blocked`. * * @return blockType */ @@ -141,7 +141,7 @@ public GetCountryListResponseCountriesInner depositAllowed( } /** - * Get depositAllowed + * Whether deposit is allowed for this country. * * @return depositAllowed */ @@ -161,7 +161,7 @@ public GetCountryListResponseCountriesInner withdrawalAllowed( } /** - * Get withdrawalAllowed + * Whether withdrawal is allowed for this country. * * @return withdrawalAllowed */ @@ -181,7 +181,7 @@ public GetCountryListResponseCountriesInner hasRegionRestrictions( } /** - * Get hasRegionRestrictions + * Whether this country has region-level restrictions. * * @return hasRegionRestrictions */ diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetOpenSymbolListResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetOpenSymbolListResponse.java index 89cad8a13..916a8fdc1 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetOpenSymbolListResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetOpenSymbolListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetOpenSymbolListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOpenSymbolListResponse extends ArrayList { public GetOpenSymbolListResponse() {} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetOpenSymbolListResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetOpenSymbolListResponseInner.java index d6ad2da7b..ccdc4472e 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetOpenSymbolListResponseInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetOpenSymbolListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** GetOpenSymbolListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetOpenSymbolListResponseInner { public static final String SERIALIZED_NAME_OPEN_TIME = "openTime"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetRegionListResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetRegionListResponse.java index 4533861b7..da76727cf 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetRegionListResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetRegionListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** GetRegionListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetRegionListResponse { public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; @@ -68,7 +68,7 @@ public GetRegionListResponse countryCode(@jakarta.annotation.Nullable String cou } /** - * Get countryCode + * Echoed country code (lowercase). * * @return countryCode */ @@ -117,7 +117,7 @@ public GetRegionListResponse lastUpdated(@jakarta.annotation.Nullable Long lastU } /** - * Get lastUpdated + * Last data update timestamp (epoch milliseconds); 0 if empty. * * @return lastUpdated */ diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetRegionListResponseRegionsInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetRegionListResponseRegionsInner.java index 09f1b3ae0..a3d373192 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetRegionListResponseRegionsInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetRegionListResponseRegionsInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetRegionListResponseRegionsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetRegionListResponseRegionsInner { public static final String SERIALIZED_NAME_REGION_NAME = "regionName"; @@ -69,7 +69,7 @@ public GetRegionListResponseRegionsInner regionName( } /** - * Get regionName + * Region/city display name (use this value in questionnaire answers). * * @return regionName */ @@ -89,7 +89,7 @@ public GetRegionListResponseRegionsInner blockType( } /** - * Get blockType + * `supported`, `limited`, or `blocked`. * * @return blockType */ @@ -109,7 +109,7 @@ public GetRegionListResponseRegionsInner depositAllowed( } /** - * Get depositAllowed + * Whether deposit is allowed for this region. * * @return depositAllowed */ @@ -129,7 +129,7 @@ public GetRegionListResponseRegionsInner withdrawalAllowed( } /** - * Get withdrawalAllowed + * Whether withdrawal is allowed for this region. * * @return withdrawalAllowed */ diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetSpotDelistScheduleResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetSpotDelistScheduleResponse.java deleted file mode 100644 index fe330934e..000000000 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetSpotDelistScheduleResponse.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.wallet.rest.model; - -import com.binance.connector.client.wallet.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** GetSpotDelistScheduleResponse */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetSpotDelistScheduleResponse extends ArrayList { - public GetSpotDelistScheduleResponse() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetSpotDelistScheduleResponse {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetSpotDelistScheduleResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (!jsonElement.isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected json element to be a array type in the JSON string but got" - + " `%s`", - jsonElement.toString())); - } - JsonArray array = jsonElement.getAsJsonArray(); - // validate array items - for (JsonElement element : array) { - GetSpotDelistScheduleResponseInner.validateJsonElement(element); - } - if (jsonElement == null) { - if (!GetSpotDelistScheduleResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GetSpotDelistScheduleResponse is not" - + " found in the empty JSON string", - GetSpotDelistScheduleResponse.openapiRequiredFields.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetSpotDelistScheduleResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetSpotDelistScheduleResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(GetSpotDelistScheduleResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GetSpotDelistScheduleResponse value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonArray(); - elementAdapter.write(out, obj); - } - - @Override - public GetSpotDelistScheduleResponse read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetSpotDelistScheduleResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetSpotDelistScheduleResponse - * @throws IOException if the JSON string is invalid with respect to - * GetSpotDelistScheduleResponse - */ - public static GetSpotDelistScheduleResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetSpotDelistScheduleResponse.class); - } - - /** - * Convert an instance of GetSpotDelistScheduleResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetSpotDelistScheduleResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetSpotDelistScheduleResponseInner.java deleted file mode 100644 index d289476f9..000000000 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetSpotDelistScheduleResponseInner.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.wallet.rest.model; - -import com.binance.connector.client.wallet.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** GetSpotDelistScheduleResponseInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetSpotDelistScheduleResponseInner { - public static final String SERIALIZED_NAME_DELIST_TIME = "delistTime"; - - @SerializedName(SERIALIZED_NAME_DELIST_TIME) - @jakarta.annotation.Nullable - private Long delistTime; - - public static final String SERIALIZED_NAME_SYMBOLS = "symbols"; - - @SerializedName(SERIALIZED_NAME_SYMBOLS) - @jakarta.annotation.Nullable - private List symbols; - - public GetSpotDelistScheduleResponseInner() {} - - public GetSpotDelistScheduleResponseInner delistTime( - @jakarta.annotation.Nullable Long delistTime) { - this.delistTime = delistTime; - return this; - } - - /** - * Get delistTime - * - * @return delistTime - */ - @jakarta.annotation.Nullable - public Long getDelistTime() { - return delistTime; - } - - public void setDelistTime(@jakarta.annotation.Nullable Long delistTime) { - this.delistTime = delistTime; - } - - public GetSpotDelistScheduleResponseInner symbols( - @jakarta.annotation.Nullable List symbols) { - this.symbols = symbols; - return this; - } - - public GetSpotDelistScheduleResponseInner addSymbolsItem(String symbolsItem) { - if (this.symbols == null) { - this.symbols = new ArrayList<>(); - } - this.symbols.add(symbolsItem); - return this; - } - - /** - * Get symbols - * - * @return symbols - */ - @jakarta.annotation.Nullable - public List getSymbols() { - return symbols; - } - - public void setSymbols(@jakarta.annotation.Nullable List symbols) { - this.symbols = symbols; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSpotDelistScheduleResponseInner getSpotDelistScheduleResponseInner = - (GetSpotDelistScheduleResponseInner) o; - return Objects.equals(this.delistTime, getSpotDelistScheduleResponseInner.delistTime) - && Objects.equals(this.symbols, getSpotDelistScheduleResponseInner.symbols); - } - - @Override - public int hashCode() { - return Objects.hash(delistTime, symbols); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetSpotDelistScheduleResponseInner {\n"); - sb.append(" delistTime: ").append(toIndentedString(delistTime)).append("\n"); - sb.append(" symbols: ").append(toIndentedString(symbols)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object delistTimeValue = getDelistTime(); - String delistTimeValueAsString = ""; - delistTimeValueAsString = delistTimeValue.toString(); - sb.append("delistTime=").append(urlEncode(delistTimeValueAsString)).append(""); - Object symbolsValue = getSymbols(); - String symbolsValueAsString = ""; - symbolsValueAsString = - (String) - ((Collection) symbolsValue) - .stream().map(Object::toString).collect(Collectors.joining(",")); - sb.append("symbols=").append(urlEncode(symbolsValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("delistTime"); - openapiFields.add("symbols"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetSpotDelistScheduleResponseInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetSpotDelistScheduleResponseInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GetSpotDelistScheduleResponseInner is" - + " not found in the empty JSON string", - GetSpotDelistScheduleResponseInner.openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("symbols") != null - && !jsonObj.get("symbols").isJsonNull() - && !jsonObj.get("symbols").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `symbols` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("symbols").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetSpotDelistScheduleResponseInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetSpotDelistScheduleResponseInner' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(GetSpotDelistScheduleResponseInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GetSpotDelistScheduleResponseInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetSpotDelistScheduleResponseInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetSpotDelistScheduleResponseInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetSpotDelistScheduleResponseInner - * @throws IOException if the JSON string is invalid with respect to - * GetSpotDelistScheduleResponseInner - */ - public static GetSpotDelistScheduleResponseInner fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, GetSpotDelistScheduleResponseInner.class); - } - - /** - * Convert an instance of GetSpotDelistScheduleResponseInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetSymbolsDelistScheduleForSpotResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetSymbolsDelistScheduleForSpotResponse.java index 49423839d..c916d206b 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetSymbolsDelistScheduleForSpotResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetSymbolsDelistScheduleForSpotResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** GetSymbolsDelistScheduleForSpotResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSymbolsDelistScheduleForSpotResponse extends ArrayList { public GetSymbolsDelistScheduleForSpotResponse() {} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetSymbolsDelistScheduleForSpotResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetSymbolsDelistScheduleForSpotResponseInner.java index 83c63307c..1b6314e20 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetSymbolsDelistScheduleForSpotResponseInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetSymbolsDelistScheduleForSpotResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -38,7 +38,7 @@ /** GetSymbolsDelistScheduleForSpotResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class GetSymbolsDelistScheduleForSpotResponseInner { public static final String SERIALIZED_NAME_DELIST_TIME = "delistTime"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/OneClickArrivalDepositApplyRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/OneClickArrivalDepositApplyRequest.java index 4ade06746..ba3cdcb19 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/OneClickArrivalDepositApplyRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/OneClickArrivalDepositApplyRequest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OneClickArrivalDepositApplyRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OneClickArrivalDepositApplyRequest { public static final String SERIALIZED_NAME_DEPOSIT_ID = "depositId"; @@ -69,7 +69,7 @@ public OneClickArrivalDepositApplyRequest depositId( } /** - * Get depositId + * Deposit record Id, priority use * * @return depositId */ @@ -88,7 +88,7 @@ public OneClickArrivalDepositApplyRequest txId(@jakarta.annotation.Nullable Stri } /** - * Get txId + * Deposit txId, used when depositId is not specified * * @return txId */ @@ -108,7 +108,7 @@ public OneClickArrivalDepositApplyRequest subAccountId( } /** - * Get subAccountId + * Sub-accountId of Cloud user * * @return subAccountId */ @@ -128,7 +128,7 @@ public OneClickArrivalDepositApplyRequest subUserId( } /** - * Get subUserId + * Sub-userId of parent user * * @return subUserId */ diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/OneClickArrivalDepositApplyResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/OneClickArrivalDepositApplyResponse.java index 9470363cc..7ed587f51 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/OneClickArrivalDepositApplyResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/OneClickArrivalDepositApplyResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** OneClickArrivalDepositApplyResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class OneClickArrivalDepositApplyResponse { public static final String SERIALIZED_NAME_CODE = "code"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/OrderType.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/OrderType.java new file mode 100644 index 000000000..51d1c8ca9 --- /dev/null +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/OrderType.java @@ -0,0 +1,131 @@ +/* + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.wallet.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets orderType */ +@JsonAdapter(OrderType.Adapter.class) +public enum OrderType { + MAIN_UMFUTURE("MAIN_UMFUTURE"), + + MAIN_CMFUTURE("MAIN_CMFUTURE"), + + MAIN_MARGIN("MAIN_MARGIN"), + + UMFUTURE_MAIN("UMFUTURE_MAIN"), + + UMFUTURE_MARGIN("UMFUTURE_MARGIN"), + + CMFUTURE_MAIN("CMFUTURE_MAIN"), + + CMFUTURE_MARGIN("CMFUTURE_MARGIN"), + + MARGIN_MAIN("MARGIN_MAIN"), + + MARGIN_UMFUTURE("MARGIN_UMFUTURE"), + + MARGIN_CMFUTURE("MARGIN_CMFUTURE"), + + ISOLATEDMARGIN_MARGIN("ISOLATEDMARGIN_MARGIN"), + + MARGIN_ISOLATEDMARGIN("MARGIN_ISOLATEDMARGIN"), + + ISOLATEDMARGIN_ISOLATEDMARGIN("ISOLATEDMARGIN_ISOLATEDMARGIN"), + + MAIN_FUNDING("MAIN_FUNDING"), + + FUNDING_MAIN("FUNDING_MAIN"), + + FUNDING_UMFUTURE("FUNDING_UMFUTURE"), + + UMFUTURE_FUNDING("UMFUTURE_FUNDING"), + + MARGIN_FUNDING("MARGIN_FUNDING"), + + FUNDING_MARGIN("FUNDING_MARGIN"), + + FUNDING_CMFUTURE("FUNDING_CMFUTURE"), + + CMFUTURE_FUNDING("CMFUTURE_FUNDING"), + + MAIN_OPTION("MAIN_OPTION"), + + OPTION_MAIN("OPTION_MAIN"), + + UMFUTURE_OPTION("UMFUTURE_OPTION"), + + OPTION_UMFUTURE("OPTION_UMFUTURE"), + + MARGIN_OPTION("MARGIN_OPTION"), + + OPTION_MARGIN("OPTION_MARGIN"), + + FUNDING_OPTION("FUNDING_OPTION"), + + OPTION_FUNDING("OPTION_FUNDING"), + + MAIN_PORTFOLIO_MARGIN("MAIN_PORTFOLIO_MARGIN"), + + PORTFOLIO_MARGIN_MAIN("PORTFOLIO_MARGIN_MAIN"); + + private String value; + + OrderType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderType fromValue(String value) { + for (OrderType b : OrderType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderType enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderType.fromValue(value); + } +} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserDelegationHistoryResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserDelegationHistoryResponse.java index 31c36c30b..0634e6109 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserDelegationHistoryResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserDelegationHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryUserDelegationHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUserDelegationHistoryResponse { public static final String SERIALIZED_NAME_TOTAL = "total"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserDelegationHistoryResponseRowsInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserDelegationHistoryResponseRowsInner.java index 7bfb53a30..1a3e32316 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserDelegationHistoryResponseRowsInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserDelegationHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUserDelegationHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUserDelegationHistoryResponseRowsInner { public static final String SERIALIZED_NAME_CLIENT_TRAN_ID = "clientTranId"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserUniversalTransferHistoryResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserUniversalTransferHistoryResponse.java index c142111d7..0ad848ff6 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserUniversalTransferHistoryResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserUniversalTransferHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -40,7 +40,7 @@ /** QueryUserUniversalTransferHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUserUniversalTransferHistoryResponse { public static final String SERIALIZED_NAME_TOTAL = "total"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserUniversalTransferHistoryResponseRowsInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserUniversalTransferHistoryResponseRowsInner.java index 95d42acdb..98675b5c1 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserUniversalTransferHistoryResponseRowsInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserUniversalTransferHistoryResponseRowsInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUserUniversalTransferHistoryResponseRowsInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUserUniversalTransferHistoryResponseRowsInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserWalletBalanceResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserWalletBalanceResponse.java index 8078a788a..6c6a99c04 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserWalletBalanceResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserWalletBalanceResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUserWalletBalanceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUserWalletBalanceResponse extends ArrayList { public QueryUserWalletBalanceResponse() {} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserWalletBalanceResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserWalletBalanceResponseInner.java index 034f60343..490e12345 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserWalletBalanceResponseInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/QueryUserWalletBalanceResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** QueryUserWalletBalanceResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class QueryUserWalletBalanceResponseInner { public static final String SERIALIZED_NAME_ACTIVATE = "activate"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/Status.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/Status.java new file mode 100644 index 000000000..df25074d7 --- /dev/null +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/Status.java @@ -0,0 +1,81 @@ +/* + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.wallet.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets status */ +@JsonAdapter(Status.Adapter.class) +public enum Status { + STATUS_0(0l), + + STATUS_1(1l), + + STATUS_2(2l), + + STATUS_6(6l), + + STATUS_7(7l), + + STATUS_8(8l); + + private Long value; + + Status(Long value) { + this.value = value; + } + + public Long getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Status fromValue(Long value) { + for (Status b : Status.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Status enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Status read(final JsonReader jsonReader) throws IOException { + Long value = jsonReader.nextLong(); + return Status.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + Long value = jsonElement.getAsLong(); + Status.fromValue(value); + } +} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireRequest.java index 671ebdc2f..d170c53d0 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireRequest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** SubmitDepositQuestionnaireRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubmitDepositQuestionnaireRequest { public static final String SERIALIZED_NAME_SUB_ACCOUNT_ID = "subAccountId"; @@ -91,12 +91,6 @@ public class SubmitDepositQuestionnaireRequest { @jakarta.annotation.Nullable private String addressTag; - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - - @SerializedName(SERIALIZED_NAME_SIGNATURE) - @jakarta.annotation.Nonnull - private String signature; - public SubmitDepositQuestionnaireRequest() {} public SubmitDepositQuestionnaireRequest subAccountId( @@ -106,7 +100,7 @@ public SubmitDepositQuestionnaireRequest subAccountId( } /** - * Get subAccountId + * External user ID. * * @return subAccountId */ @@ -126,7 +120,7 @@ public SubmitDepositQuestionnaireRequest depositId(@jakarta.annotation.Nonnull L } /** - * Get depositId + * Wallet deposit ID. * * @return depositId */ @@ -147,7 +141,7 @@ public SubmitDepositQuestionnaireRequest questionnaire( } /** - * Get questionnaire + * JSON format questionnaire answers. * * @return questionnaire */ @@ -168,7 +162,7 @@ public SubmitDepositQuestionnaireRequest beneficiaryPii( } /** - * Get beneficiaryPii + * JSON format beneficiary Pii. * * @return beneficiaryPii */ @@ -279,27 +273,6 @@ public void setAddressTag(@jakarta.annotation.Nullable String addressTag) { this.addressTag = addressTag; } - public SubmitDepositQuestionnaireRequest signature( - @jakarta.annotation.Nonnull String signature) { - this.signature = signature; - return this; - } - - /** - * Get signature - * - * @return signature - */ - @jakarta.annotation.Nonnull - @NotNull - public String getSignature() { - return signature; - } - - public void setSignature(@jakarta.annotation.Nonnull String signature) { - this.signature = signature; - } - @Override public boolean equals(Object o) { if (this == o) { @@ -320,8 +293,7 @@ public boolean equals(Object o) { && Objects.equals(this.coin, submitDepositQuestionnaireRequest.coin) && Objects.equals(this.amount, submitDepositQuestionnaireRequest.amount) && Objects.equals(this.address, submitDepositQuestionnaireRequest.address) - && Objects.equals(this.addressTag, submitDepositQuestionnaireRequest.addressTag) - && Objects.equals(this.signature, submitDepositQuestionnaireRequest.signature); + && Objects.equals(this.addressTag, submitDepositQuestionnaireRequest.addressTag); } @Override @@ -335,8 +307,7 @@ public int hashCode() { coin, amount, address, - addressTag, - signature); + addressTag); } @Override @@ -352,7 +323,6 @@ public String toString() { sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" addressTag: ").append(toIndentedString(addressTag)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append("}"); return sb.toString(); } @@ -396,10 +366,6 @@ public String toUrlQueryString() { String addressTagValueAsString = ""; addressTagValueAsString = addressTagValue.toString(); sb.append("addressTag=").append(urlEncode(addressTagValueAsString)).append(""); - Object signatureValue = getSignature(); - String signatureValueAsString = ""; - signatureValueAsString = signatureValue.toString(); - sb.append("signature=").append(urlEncode(signatureValueAsString)).append(""); return sb.toString(); } @@ -437,7 +403,6 @@ private String toIndentedString(Object o) { openapiFields.add("amount"); openapiFields.add("address"); openapiFields.add("addressTag"); - openapiFields.add("signature"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -445,7 +410,6 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("depositId"); openapiRequiredFields.add("questionnaire"); openapiRequiredFields.add("beneficiaryPii"); - openapiRequiredFields.add("signature"); } /** @@ -531,13 +495,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("addressTag").toString())); } - if (!jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `signature` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("signature").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireResponse.java index e02b511de..439e85d7c 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SubmitDepositQuestionnaireResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubmitDepositQuestionnaireResponse { public static final String SERIALIZED_NAME_TR_ID = "trId"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireTravelRuleRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireTravelRuleRequest.java index 9c42f6f2a..144abee95 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireTravelRuleRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireTravelRuleRequest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SubmitDepositQuestionnaireTravelRuleRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubmitDepositQuestionnaireTravelRuleRequest { public static final String SERIALIZED_NAME_TRAN_ID = "tranId"; @@ -57,7 +57,7 @@ public SubmitDepositQuestionnaireTravelRuleRequest tranId( } /** - * Get tranId + * Wallet tran ID * * @return tranId */ @@ -78,7 +78,7 @@ public SubmitDepositQuestionnaireTravelRuleRequest questionnaire( } /** - * Get questionnaire + * JSON format questionnaire answers. * * @return questionnaire */ diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireTravelRuleResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireTravelRuleResponse.java index e62c6c2ce..aa06a5747 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireTravelRuleResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireTravelRuleResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SubmitDepositQuestionnaireTravelRuleResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubmitDepositQuestionnaireTravelRuleResponse { public static final String SERIALIZED_NAME_TR_ID = "trId"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireV2Request.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireV2Request.java index f53926794..c614ec805 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireV2Request.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireV2Request.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SubmitDepositQuestionnaireV2Request */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubmitDepositQuestionnaireV2Request { public static final String SERIALIZED_NAME_DEPOSIT_ID = "depositId"; @@ -57,7 +57,7 @@ public SubmitDepositQuestionnaireV2Request depositId( } /** - * Get depositId + * Wallet deposit ID * * @return depositId */ @@ -78,7 +78,7 @@ public SubmitDepositQuestionnaireV2Request questionnaire( } /** - * Get questionnaire + * JSON format questionnaire answers. * * @return questionnaire */ diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireV2Response.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireV2Response.java index 15695a664..03ccd3d80 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireV2Response.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SubmitDepositQuestionnaireV2Response.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SubmitDepositQuestionnaireV2Response */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SubmitDepositQuestionnaireV2Response { public static final String SERIALIZED_NAME_TR_ID = "trId"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SystemStatusResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SystemStatusResponse.java index a3a533996..36a7705f9 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SystemStatusResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/SystemStatusResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** SystemStatusResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class SystemStatusResponse { public static final String SERIALIZED_NAME_STATUS = "status"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/ToSymbol.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/ToSymbol.java new file mode 100644 index 000000000..011151c8a --- /dev/null +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/ToSymbol.java @@ -0,0 +1,73 @@ +/* + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.wallet.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets toSymbol */ +@JsonAdapter(ToSymbol.Adapter.class) +public enum ToSymbol { + MARGIN_ISOLATEDMARGIN("MARGIN_ISOLATEDMARGIN"), + + ISOLATEDMARGIN_ISOLATEDMARGIN("ISOLATEDMARGIN_ISOLATEDMARGIN"); + + private String value; + + ToSymbol(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ToSymbol fromValue(String value) { + for (ToSymbol b : ToSymbol.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ToSymbol enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ToSymbol read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ToSymbol.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ToSymbol.fromValue(value); + } +} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/ToggleBnbBurnOnSpotTradeAndMarginInterestRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/ToggleBnbBurnOnSpotTradeAndMarginInterestRequest.java index ffb7aa542..85e301947 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/ToggleBnbBurnOnSpotTradeAndMarginInterestRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/ToggleBnbBurnOnSpotTradeAndMarginInterestRequest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ToggleBnbBurnOnSpotTradeAndMarginInterestRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ToggleBnbBurnOnSpotTradeAndMarginInterestRequest { public static final String SERIALIZED_NAME_SPOT_B_N_B_BURN = "spotBNBBurn"; @@ -63,7 +63,7 @@ public ToggleBnbBurnOnSpotTradeAndMarginInterestRequest spotBNBBurn( } /** - * Get spotBNBBurn + * Determines whether to use BNB to pay for trading fees on SPOT * * @return spotBNBBurn */ @@ -83,7 +83,7 @@ public ToggleBnbBurnOnSpotTradeAndMarginInterestRequest interestBNBBurn( } /** - * Get interestBNBBurn + * Determines whether to use BNB to pay for margin loan's interest * * @return interestBNBBurn */ @@ -103,11 +103,12 @@ public ToggleBnbBurnOnSpotTradeAndMarginInterestRequest recvWindow( } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/ToggleBnbBurnOnSpotTradeAndMarginInterestResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/ToggleBnbBurnOnSpotTradeAndMarginInterestResponse.java index 44c351d80..db7112e03 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/ToggleBnbBurnOnSpotTradeAndMarginInterestResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/ToggleBnbBurnOnSpotTradeAndMarginInterestResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** ToggleBnbBurnOnSpotTradeAndMarginInterestResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class ToggleBnbBurnOnSpotTradeAndMarginInterestResponse { public static final String SERIALIZED_NAME_SPOT_B_N_B_BURN = "spotBNBBurn"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/TradeFeeResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/TradeFeeResponse.java index ec65979a7..94e09abd1 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/TradeFeeResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/TradeFeeResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TradeFeeResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradeFeeResponse extends ArrayList { public TradeFeeResponse() {} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/TradeFeeResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/TradeFeeResponseInner.java index ca3bf7df5..4e4ff3f68 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/TradeFeeResponseInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/TradeFeeResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** TradeFeeResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class TradeFeeResponseInner { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserAssetRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserAssetRequest.java index c0532d08a..0fc1a4ab6 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserAssetRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserAssetRequest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UserAssetRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserAssetRequest { public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -62,7 +62,7 @@ public UserAssetRequest asset(@jakarta.annotation.Nullable String asset) { } /** - * Get asset + * If asset is blank, then query all positive assets user have. * * @return asset */ @@ -82,7 +82,7 @@ public UserAssetRequest needBtcValuation( } /** - * Get needBtcValuation + * Whether need btc valuation or not. * * @return needBtcValuation */ @@ -101,11 +101,12 @@ public UserAssetRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserAssetResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserAssetResponse.java index eac82276b..d974e890d 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserAssetResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserAssetResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UserAssetResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserAssetResponse extends ArrayList { public UserAssetResponse() {} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserAssetResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserAssetResponseInner.java index eb06c6537..193428fcf 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserAssetResponseInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserAssetResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UserAssetResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserAssetResponseInner { public static final String SERIALIZED_NAME_ASSET = "asset"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserUniversalTransferRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserUniversalTransferRequest.java index 9c696ff2f..8848077ad 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserUniversalTransferRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserUniversalTransferRequest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,13 +35,13 @@ /** UserUniversalTransferRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserUniversalTransferRequest { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @jakarta.annotation.Nonnull - private String type; + private OrderType type; public static final String SERIALIZED_NAME_ASSET = "asset"; @@ -59,13 +59,13 @@ public class UserUniversalTransferRequest { @SerializedName(SERIALIZED_NAME_FROM_SYMBOL) @jakarta.annotation.Nullable - private String fromSymbol; + private FromSymbol fromSymbol; public static final String SERIALIZED_NAME_TO_SYMBOL = "toSymbol"; @SerializedName(SERIALIZED_NAME_TO_SYMBOL) @jakarta.annotation.Nullable - private String toSymbol; + private ToSymbol toSymbol; public static final String SERIALIZED_NAME_RECV_WINDOW = "recvWindow"; @@ -75,7 +75,7 @@ public class UserUniversalTransferRequest { public UserUniversalTransferRequest() {} - public UserUniversalTransferRequest type(@jakarta.annotation.Nonnull String type) { + public UserUniversalTransferRequest type(@jakarta.annotation.Nonnull OrderType type) { this.type = type; return this; } @@ -87,11 +87,12 @@ public UserUniversalTransferRequest type(@jakarta.annotation.Nonnull String type */ @jakarta.annotation.Nonnull @NotNull - public String getType() { + @Valid + public OrderType getType() { return type; } - public void setType(@jakarta.annotation.Nonnull String type) { + public void setType(@jakarta.annotation.Nonnull OrderType type) { this.type = type; } @@ -136,7 +137,8 @@ public void setAmount(@jakarta.annotation.Nonnull Double amount) { this.amount = amount; } - public UserUniversalTransferRequest fromSymbol(@jakarta.annotation.Nullable String fromSymbol) { + public UserUniversalTransferRequest fromSymbol( + @jakarta.annotation.Nullable FromSymbol fromSymbol) { this.fromSymbol = fromSymbol; return this; } @@ -147,15 +149,16 @@ public UserUniversalTransferRequest fromSymbol(@jakarta.annotation.Nullable Stri * @return fromSymbol */ @jakarta.annotation.Nullable - public String getFromSymbol() { + @Valid + public FromSymbol getFromSymbol() { return fromSymbol; } - public void setFromSymbol(@jakarta.annotation.Nullable String fromSymbol) { + public void setFromSymbol(@jakarta.annotation.Nullable FromSymbol fromSymbol) { this.fromSymbol = fromSymbol; } - public UserUniversalTransferRequest toSymbol(@jakarta.annotation.Nullable String toSymbol) { + public UserUniversalTransferRequest toSymbol(@jakarta.annotation.Nullable ToSymbol toSymbol) { this.toSymbol = toSymbol; return this; } @@ -166,11 +169,12 @@ public UserUniversalTransferRequest toSymbol(@jakarta.annotation.Nullable String * @return toSymbol */ @jakarta.annotation.Nullable - public String getToSymbol() { + @Valid + public ToSymbol getToSymbol() { return toSymbol; } - public void setToSymbol(@jakarta.annotation.Nullable String toSymbol) { + public void setToSymbol(@jakarta.annotation.Nullable ToSymbol toSymbol) { this.toSymbol = toSymbol; } @@ -180,11 +184,12 @@ public UserUniversalTransferRequest recvWindow(@jakarta.annotation.Nullable Long } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -328,13 +333,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } + // validate the required field `type` + OrderType.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("asset").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( @@ -342,21 +342,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("asset").toString())); } - if ((jsonObj.get("fromSymbol") != null && !jsonObj.get("fromSymbol").isJsonNull()) - && !jsonObj.get("fromSymbol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `fromSymbol` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("fromSymbol").toString())); + // validate the optional field `fromSymbol` + if (jsonObj.get("fromSymbol") != null && !jsonObj.get("fromSymbol").isJsonNull()) { + FromSymbol.validateJsonElement(jsonObj.get("fromSymbol")); } - if ((jsonObj.get("toSymbol") != null && !jsonObj.get("toSymbol").isJsonNull()) - && !jsonObj.get("toSymbol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `toSymbol` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("toSymbol").toString())); + // validate the optional field `toSymbol` + if (jsonObj.get("toSymbol") != null && !jsonObj.get("toSymbol").isJsonNull()) { + ToSymbol.validateJsonElement(jsonObj.get("toSymbol")); } } diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserUniversalTransferResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserUniversalTransferResponse.java index 0d87a5b79..937eb6985 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserUniversalTransferResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/UserUniversalTransferResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** UserUniversalTransferResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class UserUniversalTransferResponse { public static final String SERIALIZED_NAME_TRAN_ID = "tranId"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/VaspListResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/VaspListResponse.java index 9adcff3d9..e300e9859 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/VaspListResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/VaspListResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** VaspListResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class VaspListResponse extends ArrayList { public VaspListResponse() {} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/VaspListResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/VaspListResponseInner.java index f7bc530e1..9538d50b7 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/VaspListResponseInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/VaspListResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,20 +34,20 @@ /** VaspListResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class VaspListResponseInner { - public static final String SERIALIZED_NAME_VASP_CODE = "vaspCode"; - - @SerializedName(SERIALIZED_NAME_VASP_CODE) - @jakarta.annotation.Nullable - private String vaspCode; - public static final String SERIALIZED_NAME_VASP_NAME = "vaspName"; @SerializedName(SERIALIZED_NAME_VASP_NAME) @jakarta.annotation.Nullable private String vaspName; + public static final String SERIALIZED_NAME_VASP_CODE = "vaspCode"; + + @SerializedName(SERIALIZED_NAME_VASP_CODE) + @jakarta.annotation.Nullable + private String vaspCode; + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; @SerializedName(SERIALIZED_NAME_IDENTIFIER) @@ -56,42 +56,42 @@ public class VaspListResponseInner { public VaspListResponseInner() {} - public VaspListResponseInner vaspCode(@jakarta.annotation.Nullable String vaspCode) { - this.vaspCode = vaspCode; + public VaspListResponseInner vaspName(@jakarta.annotation.Nullable String vaspName) { + this.vaspName = vaspName; return this; } /** - * Get vaspCode + * Get vaspName * - * @return vaspCode + * @return vaspName */ @jakarta.annotation.Nullable - public String getVaspCode() { - return vaspCode; + public String getVaspName() { + return vaspName; } - public void setVaspCode(@jakarta.annotation.Nullable String vaspCode) { - this.vaspCode = vaspCode; + public void setVaspName(@jakarta.annotation.Nullable String vaspName) { + this.vaspName = vaspName; } - public VaspListResponseInner vaspName(@jakarta.annotation.Nullable String vaspName) { - this.vaspName = vaspName; + public VaspListResponseInner vaspCode(@jakarta.annotation.Nullable String vaspCode) { + this.vaspCode = vaspCode; return this; } /** - * Get vaspName + * Get vaspCode * - * @return vaspName + * @return vaspCode */ @jakarta.annotation.Nullable - public String getVaspName() { - return vaspName; + public String getVaspCode() { + return vaspCode; } - public void setVaspName(@jakarta.annotation.Nullable String vaspName) { - this.vaspName = vaspName; + public void setVaspCode(@jakarta.annotation.Nullable String vaspCode) { + this.vaspCode = vaspCode; } public VaspListResponseInner identifier(@jakarta.annotation.Nullable String identifier) { @@ -100,7 +100,7 @@ public VaspListResponseInner identifier(@jakarta.annotation.Nullable String iden } /** - * Get identifier + * For populating the `vasp` field in the deposit/withdrawal questionnaire * * @return identifier */ @@ -122,22 +122,22 @@ public boolean equals(Object o) { return false; } VaspListResponseInner vaspListResponseInner = (VaspListResponseInner) o; - return Objects.equals(this.vaspCode, vaspListResponseInner.vaspCode) - && Objects.equals(this.vaspName, vaspListResponseInner.vaspName) + return Objects.equals(this.vaspName, vaspListResponseInner.vaspName) + && Objects.equals(this.vaspCode, vaspListResponseInner.vaspCode) && Objects.equals(this.identifier, vaspListResponseInner.identifier); } @Override public int hashCode() { - return Objects.hash(vaspCode, vaspName, identifier); + return Objects.hash(vaspName, vaspCode, identifier); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class VaspListResponseInner {\n"); - sb.append(" vaspCode: ").append(toIndentedString(vaspCode)).append("\n"); sb.append(" vaspName: ").append(toIndentedString(vaspName)).append("\n"); + sb.append(" vaspCode: ").append(toIndentedString(vaspCode)).append("\n"); sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); sb.append("}"); return sb.toString(); @@ -146,14 +146,14 @@ public String toString() { public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); - Object vaspCodeValue = getVaspCode(); - String vaspCodeValueAsString = ""; - vaspCodeValueAsString = vaspCodeValue.toString(); - sb.append("vaspCode=").append(urlEncode(vaspCodeValueAsString)).append(""); Object vaspNameValue = getVaspName(); String vaspNameValueAsString = ""; vaspNameValueAsString = vaspNameValue.toString(); sb.append("vaspName=").append(urlEncode(vaspNameValueAsString)).append(""); + Object vaspCodeValue = getVaspCode(); + String vaspCodeValueAsString = ""; + vaspCodeValueAsString = vaspCodeValue.toString(); + sb.append("vaspCode=").append(urlEncode(vaspCodeValueAsString)).append(""); Object identifierValue = getIdentifier(); String identifierValueAsString = ""; identifierValueAsString = identifierValue.toString(); @@ -186,8 +186,8 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("vaspCode"); openapiFields.add("vaspName"); + openapiFields.add("vaspCode"); openapiFields.add("identifier"); // a set of required properties/fields (JSON key names) @@ -212,14 +212,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("vaspCode") != null && !jsonObj.get("vaspCode").isJsonNull()) - && !jsonObj.get("vaspCode").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `vaspCode` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("vaspCode").toString())); - } if ((jsonObj.get("vaspName") != null && !jsonObj.get("vaspName").isJsonNull()) && !jsonObj.get("vaspName").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -228,6 +220,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("vaspName").toString())); } + if ((jsonObj.get("vaspCode") != null && !jsonObj.get("vaspCode").isJsonNull()) + && !jsonObj.get("vaspCode").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `vaspCode` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("vaspCode").toString())); + } if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) && !jsonObj.get("identifier").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryResponse.java index e82b9fb6c..aa1ea1d9d 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** WithdrawHistoryResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class WithdrawHistoryResponse extends ArrayList { public WithdrawHistoryResponse() {} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryResponseInner.java index fa6b92863..25aa2f229 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryResponseInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryResponseInner.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** WithdrawHistoryResponseInner */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class WithdrawHistoryResponseInner { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryV1Response.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryV1Response.java index 149ecfef6..786e871dd 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryV1Response.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryV1Response.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,8 +34,8 @@ /** WithdrawHistoryV1Response */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class WithdrawHistoryV1Response extends ArrayList { + comments = "Generator version: 7.22.0") +public class WithdrawHistoryV1Response extends ArrayList { public WithdrawHistoryV1Response() {} @Override @@ -116,7 +116,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - WithdrawHistoryV2ResponseInner.validateJsonElement(element); + WithdrawHistoryV1ResponseInner.validateJsonElement(element); } if (jsonElement == null) { if (!WithdrawHistoryV1Response.openapiRequiredFields diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryV1ResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryV1ResponseInner.java new file mode 100644 index 000000000..15020e088 --- /dev/null +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryV1ResponseInner.java @@ -0,0 +1,918 @@ +/* + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.wallet.rest.model; + +import com.binance.connector.client.wallet.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** WithdrawHistoryV1ResponseInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class WithdrawHistoryV1ResponseInner { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_TR_ID = "trId"; + + @SerializedName(SERIALIZED_NAME_TR_ID) + @jakarta.annotation.Nullable + private Long trId; + + public static final String SERIALIZED_NAME_AMOUNT = "amount"; + + @SerializedName(SERIALIZED_NAME_AMOUNT) + @jakarta.annotation.Nullable + private String amount; + + public static final String SERIALIZED_NAME_TRANSACTION_FEE = "transactionFee"; + + @SerializedName(SERIALIZED_NAME_TRANSACTION_FEE) + @jakarta.annotation.Nullable + private String transactionFee; + + public static final String SERIALIZED_NAME_COIN = "coin"; + + @SerializedName(SERIALIZED_NAME_COIN) + @jakarta.annotation.Nullable + private String coin; + + public static final String SERIALIZED_NAME_WITHDRAWAL_STATUS = "withdrawalStatus"; + + @SerializedName(SERIALIZED_NAME_WITHDRAWAL_STATUS) + @jakarta.annotation.Nullable + private Long withdrawalStatus; + + public static final String SERIALIZED_NAME_TRAVEL_RULE_STATUS = "travelRuleStatus"; + + @SerializedName(SERIALIZED_NAME_TRAVEL_RULE_STATUS) + @jakarta.annotation.Nullable + private Long travelRuleStatus; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + + @SerializedName(SERIALIZED_NAME_ADDRESS) + @jakarta.annotation.Nullable + private String address; + + public static final String SERIALIZED_NAME_TX_ID = "txId"; + + @SerializedName(SERIALIZED_NAME_TX_ID) + @jakarta.annotation.Nullable + private String txId; + + public static final String SERIALIZED_NAME_APPLY_TIME = "applyTime"; + + @SerializedName(SERIALIZED_NAME_APPLY_TIME) + @jakarta.annotation.Nullable + private String applyTime; + + public static final String SERIALIZED_NAME_NETWORK = "network"; + + @SerializedName(SERIALIZED_NAME_NETWORK) + @jakarta.annotation.Nullable + private String network; + + public static final String SERIALIZED_NAME_TRANSFER_TYPE = "transferType"; + + @SerializedName(SERIALIZED_NAME_TRANSFER_TYPE) + @jakarta.annotation.Nullable + private Long transferType; + + public static final String SERIALIZED_NAME_WITHDRAW_ORDER_ID = "withdrawOrderId"; + + @SerializedName(SERIALIZED_NAME_WITHDRAW_ORDER_ID) + @jakarta.annotation.Nullable + private String withdrawOrderId; + + public static final String SERIALIZED_NAME_INFO = "info"; + + @SerializedName(SERIALIZED_NAME_INFO) + @jakarta.annotation.Nullable + private String info; + + public static final String SERIALIZED_NAME_CONFIRM_NO = "confirmNo"; + + @SerializedName(SERIALIZED_NAME_CONFIRM_NO) + @jakarta.annotation.Nullable + private Long confirmNo; + + public static final String SERIALIZED_NAME_WALLET_TYPE = "walletType"; + + @SerializedName(SERIALIZED_NAME_WALLET_TYPE) + @jakarta.annotation.Nullable + private Long walletType; + + public static final String SERIALIZED_NAME_TX_KEY = "txKey"; + + @SerializedName(SERIALIZED_NAME_TX_KEY) + @jakarta.annotation.Nullable + private String txKey; + + public static final String SERIALIZED_NAME_QUESTIONNAIRE = "questionnaire"; + + @SerializedName(SERIALIZED_NAME_QUESTIONNAIRE) + @jakarta.annotation.Nullable + private String questionnaire; + + public static final String SERIALIZED_NAME_COMPLETE_TIME = "completeTime"; + + @SerializedName(SERIALIZED_NAME_COMPLETE_TIME) + @jakarta.annotation.Nullable + private String completeTime; + + public WithdrawHistoryV1ResponseInner() {} + + public WithdrawHistoryV1ResponseInner id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public WithdrawHistoryV1ResponseInner trId(@jakarta.annotation.Nullable Long trId) { + this.trId = trId; + return this; + } + + /** + * Get trId + * + * @return trId + */ + @jakarta.annotation.Nullable + public Long getTrId() { + return trId; + } + + public void setTrId(@jakarta.annotation.Nullable Long trId) { + this.trId = trId; + } + + public WithdrawHistoryV1ResponseInner amount(@jakarta.annotation.Nullable String amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * + * @return amount + */ + @jakarta.annotation.Nullable + public String getAmount() { + return amount; + } + + public void setAmount(@jakarta.annotation.Nullable String amount) { + this.amount = amount; + } + + public WithdrawHistoryV1ResponseInner transactionFee( + @jakarta.annotation.Nullable String transactionFee) { + this.transactionFee = transactionFee; + return this; + } + + /** + * Get transactionFee + * + * @return transactionFee + */ + @jakarta.annotation.Nullable + public String getTransactionFee() { + return transactionFee; + } + + public void setTransactionFee(@jakarta.annotation.Nullable String transactionFee) { + this.transactionFee = transactionFee; + } + + public WithdrawHistoryV1ResponseInner coin(@jakarta.annotation.Nullable String coin) { + this.coin = coin; + return this; + } + + /** + * Get coin + * + * @return coin + */ + @jakarta.annotation.Nullable + public String getCoin() { + return coin; + } + + public void setCoin(@jakarta.annotation.Nullable String coin) { + this.coin = coin; + } + + public WithdrawHistoryV1ResponseInner withdrawalStatus( + @jakarta.annotation.Nullable Long withdrawalStatus) { + this.withdrawalStatus = withdrawalStatus; + return this; + } + + /** + * Get withdrawalStatus + * + * @return withdrawalStatus + */ + @jakarta.annotation.Nullable + public Long getWithdrawalStatus() { + return withdrawalStatus; + } + + public void setWithdrawalStatus(@jakarta.annotation.Nullable Long withdrawalStatus) { + this.withdrawalStatus = withdrawalStatus; + } + + public WithdrawHistoryV1ResponseInner travelRuleStatus( + @jakarta.annotation.Nullable Long travelRuleStatus) { + this.travelRuleStatus = travelRuleStatus; + return this; + } + + /** + * Get travelRuleStatus + * + * @return travelRuleStatus + */ + @jakarta.annotation.Nullable + public Long getTravelRuleStatus() { + return travelRuleStatus; + } + + public void setTravelRuleStatus(@jakarta.annotation.Nullable Long travelRuleStatus) { + this.travelRuleStatus = travelRuleStatus; + } + + public WithdrawHistoryV1ResponseInner address(@jakarta.annotation.Nullable String address) { + this.address = address; + return this; + } + + /** + * Get address + * + * @return address + */ + @jakarta.annotation.Nullable + public String getAddress() { + return address; + } + + public void setAddress(@jakarta.annotation.Nullable String address) { + this.address = address; + } + + public WithdrawHistoryV1ResponseInner txId(@jakarta.annotation.Nullable String txId) { + this.txId = txId; + return this; + } + + /** + * Get txId + * + * @return txId + */ + @jakarta.annotation.Nullable + public String getTxId() { + return txId; + } + + public void setTxId(@jakarta.annotation.Nullable String txId) { + this.txId = txId; + } + + public WithdrawHistoryV1ResponseInner applyTime(@jakarta.annotation.Nullable String applyTime) { + this.applyTime = applyTime; + return this; + } + + /** + * Get applyTime + * + * @return applyTime + */ + @jakarta.annotation.Nullable + public String getApplyTime() { + return applyTime; + } + + public void setApplyTime(@jakarta.annotation.Nullable String applyTime) { + this.applyTime = applyTime; + } + + public WithdrawHistoryV1ResponseInner network(@jakarta.annotation.Nullable String network) { + this.network = network; + return this; + } + + /** + * Get network + * + * @return network + */ + @jakarta.annotation.Nullable + public String getNetwork() { + return network; + } + + public void setNetwork(@jakarta.annotation.Nullable String network) { + this.network = network; + } + + public WithdrawHistoryV1ResponseInner transferType( + @jakarta.annotation.Nullable Long transferType) { + this.transferType = transferType; + return this; + } + + /** + * Get transferType + * + * @return transferType + */ + @jakarta.annotation.Nullable + public Long getTransferType() { + return transferType; + } + + public void setTransferType(@jakarta.annotation.Nullable Long transferType) { + this.transferType = transferType; + } + + public WithdrawHistoryV1ResponseInner withdrawOrderId( + @jakarta.annotation.Nullable String withdrawOrderId) { + this.withdrawOrderId = withdrawOrderId; + return this; + } + + /** + * Get withdrawOrderId + * + * @return withdrawOrderId + */ + @jakarta.annotation.Nullable + public String getWithdrawOrderId() { + return withdrawOrderId; + } + + public void setWithdrawOrderId(@jakarta.annotation.Nullable String withdrawOrderId) { + this.withdrawOrderId = withdrawOrderId; + } + + public WithdrawHistoryV1ResponseInner info(@jakarta.annotation.Nullable String info) { + this.info = info; + return this; + } + + /** + * Get info + * + * @return info + */ + @jakarta.annotation.Nullable + public String getInfo() { + return info; + } + + public void setInfo(@jakarta.annotation.Nullable String info) { + this.info = info; + } + + public WithdrawHistoryV1ResponseInner confirmNo(@jakarta.annotation.Nullable Long confirmNo) { + this.confirmNo = confirmNo; + return this; + } + + /** + * Get confirmNo + * + * @return confirmNo + */ + @jakarta.annotation.Nullable + public Long getConfirmNo() { + return confirmNo; + } + + public void setConfirmNo(@jakarta.annotation.Nullable Long confirmNo) { + this.confirmNo = confirmNo; + } + + public WithdrawHistoryV1ResponseInner walletType(@jakarta.annotation.Nullable Long walletType) { + this.walletType = walletType; + return this; + } + + /** + * Get walletType + * + * @return walletType + */ + @jakarta.annotation.Nullable + public Long getWalletType() { + return walletType; + } + + public void setWalletType(@jakarta.annotation.Nullable Long walletType) { + this.walletType = walletType; + } + + public WithdrawHistoryV1ResponseInner txKey(@jakarta.annotation.Nullable String txKey) { + this.txKey = txKey; + return this; + } + + /** + * Get txKey + * + * @return txKey + */ + @jakarta.annotation.Nullable + public String getTxKey() { + return txKey; + } + + public void setTxKey(@jakarta.annotation.Nullable String txKey) { + this.txKey = txKey; + } + + public WithdrawHistoryV1ResponseInner questionnaire( + @jakarta.annotation.Nullable String questionnaire) { + this.questionnaire = questionnaire; + return this; + } + + /** + * Get questionnaire + * + * @return questionnaire + */ + @jakarta.annotation.Nullable + public String getQuestionnaire() { + return questionnaire; + } + + public void setQuestionnaire(@jakarta.annotation.Nullable String questionnaire) { + this.questionnaire = questionnaire; + } + + public WithdrawHistoryV1ResponseInner completeTime( + @jakarta.annotation.Nullable String completeTime) { + this.completeTime = completeTime; + return this; + } + + /** + * Get completeTime + * + * @return completeTime + */ + @jakarta.annotation.Nullable + public String getCompleteTime() { + return completeTime; + } + + public void setCompleteTime(@jakarta.annotation.Nullable String completeTime) { + this.completeTime = completeTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WithdrawHistoryV1ResponseInner withdrawHistoryV1ResponseInner = + (WithdrawHistoryV1ResponseInner) o; + return Objects.equals(this.id, withdrawHistoryV1ResponseInner.id) + && Objects.equals(this.trId, withdrawHistoryV1ResponseInner.trId) + && Objects.equals(this.amount, withdrawHistoryV1ResponseInner.amount) + && Objects.equals( + this.transactionFee, withdrawHistoryV1ResponseInner.transactionFee) + && Objects.equals(this.coin, withdrawHistoryV1ResponseInner.coin) + && Objects.equals( + this.withdrawalStatus, withdrawHistoryV1ResponseInner.withdrawalStatus) + && Objects.equals( + this.travelRuleStatus, withdrawHistoryV1ResponseInner.travelRuleStatus) + && Objects.equals(this.address, withdrawHistoryV1ResponseInner.address) + && Objects.equals(this.txId, withdrawHistoryV1ResponseInner.txId) + && Objects.equals(this.applyTime, withdrawHistoryV1ResponseInner.applyTime) + && Objects.equals(this.network, withdrawHistoryV1ResponseInner.network) + && Objects.equals(this.transferType, withdrawHistoryV1ResponseInner.transferType) + && Objects.equals( + this.withdrawOrderId, withdrawHistoryV1ResponseInner.withdrawOrderId) + && Objects.equals(this.info, withdrawHistoryV1ResponseInner.info) + && Objects.equals(this.confirmNo, withdrawHistoryV1ResponseInner.confirmNo) + && Objects.equals(this.walletType, withdrawHistoryV1ResponseInner.walletType) + && Objects.equals(this.txKey, withdrawHistoryV1ResponseInner.txKey) + && Objects.equals(this.questionnaire, withdrawHistoryV1ResponseInner.questionnaire) + && Objects.equals(this.completeTime, withdrawHistoryV1ResponseInner.completeTime); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + trId, + amount, + transactionFee, + coin, + withdrawalStatus, + travelRuleStatus, + address, + txId, + applyTime, + network, + transferType, + withdrawOrderId, + info, + confirmNo, + walletType, + txKey, + questionnaire, + completeTime); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WithdrawHistoryV1ResponseInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" trId: ").append(toIndentedString(trId)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" transactionFee: ").append(toIndentedString(transactionFee)).append("\n"); + sb.append(" coin: ").append(toIndentedString(coin)).append("\n"); + sb.append(" withdrawalStatus: ").append(toIndentedString(withdrawalStatus)).append("\n"); + sb.append(" travelRuleStatus: ").append(toIndentedString(travelRuleStatus)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" txId: ").append(toIndentedString(txId)).append("\n"); + sb.append(" applyTime: ").append(toIndentedString(applyTime)).append("\n"); + sb.append(" network: ").append(toIndentedString(network)).append("\n"); + sb.append(" transferType: ").append(toIndentedString(transferType)).append("\n"); + sb.append(" withdrawOrderId: ").append(toIndentedString(withdrawOrderId)).append("\n"); + sb.append(" info: ").append(toIndentedString(info)).append("\n"); + sb.append(" confirmNo: ").append(toIndentedString(confirmNo)).append("\n"); + sb.append(" walletType: ").append(toIndentedString(walletType)).append("\n"); + sb.append(" txKey: ").append(toIndentedString(txKey)).append("\n"); + sb.append(" questionnaire: ").append(toIndentedString(questionnaire)).append("\n"); + sb.append(" completeTime: ").append(toIndentedString(completeTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object idValue = getId(); + String idValueAsString = ""; + idValueAsString = idValue.toString(); + sb.append("id=").append(urlEncode(idValueAsString)).append(""); + Object trIdValue = getTrId(); + String trIdValueAsString = ""; + trIdValueAsString = trIdValue.toString(); + sb.append("trId=").append(urlEncode(trIdValueAsString)).append(""); + Object amountValue = getAmount(); + String amountValueAsString = ""; + amountValueAsString = amountValue.toString(); + sb.append("amount=").append(urlEncode(amountValueAsString)).append(""); + Object transactionFeeValue = getTransactionFee(); + String transactionFeeValueAsString = ""; + transactionFeeValueAsString = transactionFeeValue.toString(); + sb.append("transactionFee=").append(urlEncode(transactionFeeValueAsString)).append(""); + Object coinValue = getCoin(); + String coinValueAsString = ""; + coinValueAsString = coinValue.toString(); + sb.append("coin=").append(urlEncode(coinValueAsString)).append(""); + Object withdrawalStatusValue = getWithdrawalStatus(); + String withdrawalStatusValueAsString = ""; + withdrawalStatusValueAsString = withdrawalStatusValue.toString(); + sb.append("withdrawalStatus=").append(urlEncode(withdrawalStatusValueAsString)).append(""); + Object travelRuleStatusValue = getTravelRuleStatus(); + String travelRuleStatusValueAsString = ""; + travelRuleStatusValueAsString = travelRuleStatusValue.toString(); + sb.append("travelRuleStatus=").append(urlEncode(travelRuleStatusValueAsString)).append(""); + Object addressValue = getAddress(); + String addressValueAsString = ""; + addressValueAsString = addressValue.toString(); + sb.append("address=").append(urlEncode(addressValueAsString)).append(""); + Object txIdValue = getTxId(); + String txIdValueAsString = ""; + txIdValueAsString = txIdValue.toString(); + sb.append("txId=").append(urlEncode(txIdValueAsString)).append(""); + Object applyTimeValue = getApplyTime(); + String applyTimeValueAsString = ""; + applyTimeValueAsString = applyTimeValue.toString(); + sb.append("applyTime=").append(urlEncode(applyTimeValueAsString)).append(""); + Object networkValue = getNetwork(); + String networkValueAsString = ""; + networkValueAsString = networkValue.toString(); + sb.append("network=").append(urlEncode(networkValueAsString)).append(""); + Object transferTypeValue = getTransferType(); + String transferTypeValueAsString = ""; + transferTypeValueAsString = transferTypeValue.toString(); + sb.append("transferType=").append(urlEncode(transferTypeValueAsString)).append(""); + Object withdrawOrderIdValue = getWithdrawOrderId(); + String withdrawOrderIdValueAsString = ""; + withdrawOrderIdValueAsString = withdrawOrderIdValue.toString(); + sb.append("withdrawOrderId=").append(urlEncode(withdrawOrderIdValueAsString)).append(""); + Object infoValue = getInfo(); + String infoValueAsString = ""; + infoValueAsString = infoValue.toString(); + sb.append("info=").append(urlEncode(infoValueAsString)).append(""); + Object confirmNoValue = getConfirmNo(); + String confirmNoValueAsString = ""; + confirmNoValueAsString = confirmNoValue.toString(); + sb.append("confirmNo=").append(urlEncode(confirmNoValueAsString)).append(""); + Object walletTypeValue = getWalletType(); + String walletTypeValueAsString = ""; + walletTypeValueAsString = walletTypeValue.toString(); + sb.append("walletType=").append(urlEncode(walletTypeValueAsString)).append(""); + Object txKeyValue = getTxKey(); + String txKeyValueAsString = ""; + txKeyValueAsString = txKeyValue.toString(); + sb.append("txKey=").append(urlEncode(txKeyValueAsString)).append(""); + Object questionnaireValue = getQuestionnaire(); + String questionnaireValueAsString = ""; + questionnaireValueAsString = questionnaireValue.toString(); + sb.append("questionnaire=").append(urlEncode(questionnaireValueAsString)).append(""); + Object completeTimeValue = getCompleteTime(); + String completeTimeValueAsString = ""; + completeTimeValueAsString = completeTimeValue.toString(); + sb.append("completeTime=").append(urlEncode(completeTimeValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("trId"); + openapiFields.add("amount"); + openapiFields.add("transactionFee"); + openapiFields.add("coin"); + openapiFields.add("withdrawalStatus"); + openapiFields.add("travelRuleStatus"); + openapiFields.add("address"); + openapiFields.add("txId"); + openapiFields.add("applyTime"); + openapiFields.add("network"); + openapiFields.add("transferType"); + openapiFields.add("withdrawOrderId"); + openapiFields.add("info"); + openapiFields.add("confirmNo"); + openapiFields.add("walletType"); + openapiFields.add("txKey"); + openapiFields.add("questionnaire"); + openapiFields.add("completeTime"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * WithdrawHistoryV1ResponseInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WithdrawHistoryV1ResponseInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WithdrawHistoryV1ResponseInner is not" + + " found in the empty JSON string", + WithdrawHistoryV1ResponseInner.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("amount") != null && !jsonObj.get("amount").isJsonNull()) + && !jsonObj.get("amount").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `amount` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("amount").toString())); + } + if ((jsonObj.get("transactionFee") != null && !jsonObj.get("transactionFee").isJsonNull()) + && !jsonObj.get("transactionFee").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `transactionFee` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("transactionFee").toString())); + } + if ((jsonObj.get("coin") != null && !jsonObj.get("coin").isJsonNull()) + && !jsonObj.get("coin").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `coin` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("coin").toString())); + } + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) + && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `address` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("address").toString())); + } + if ((jsonObj.get("txId") != null && !jsonObj.get("txId").isJsonNull()) + && !jsonObj.get("txId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `txId` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("txId").toString())); + } + if ((jsonObj.get("applyTime") != null && !jsonObj.get("applyTime").isJsonNull()) + && !jsonObj.get("applyTime").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `applyTime` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("applyTime").toString())); + } + if ((jsonObj.get("network") != null && !jsonObj.get("network").isJsonNull()) + && !jsonObj.get("network").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `network` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("network").toString())); + } + if ((jsonObj.get("withdrawOrderId") != null && !jsonObj.get("withdrawOrderId").isJsonNull()) + && !jsonObj.get("withdrawOrderId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `withdrawOrderId` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("withdrawOrderId").toString())); + } + if ((jsonObj.get("info") != null && !jsonObj.get("info").isJsonNull()) + && !jsonObj.get("info").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `info` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("info").toString())); + } + if ((jsonObj.get("txKey") != null && !jsonObj.get("txKey").isJsonNull()) + && !jsonObj.get("txKey").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `txKey` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("txKey").toString())); + } + if ((jsonObj.get("questionnaire") != null && !jsonObj.get("questionnaire").isJsonNull()) + && !jsonObj.get("questionnaire").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `questionnaire` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("questionnaire").toString())); + } + if ((jsonObj.get("completeTime") != null && !jsonObj.get("completeTime").isJsonNull()) + && !jsonObj.get("completeTime").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `completeTime` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("completeTime").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WithdrawHistoryV1ResponseInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WithdrawHistoryV1ResponseInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(WithdrawHistoryV1ResponseInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WithdrawHistoryV1ResponseInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public WithdrawHistoryV1ResponseInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of WithdrawHistoryV1ResponseInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of WithdrawHistoryV1ResponseInner + * @throws IOException if the JSON string is invalid with respect to + * WithdrawHistoryV1ResponseInner + */ + public static WithdrawHistoryV1ResponseInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WithdrawHistoryV1ResponseInner.class); + } + + /** + * Convert an instance of WithdrawHistoryV1ResponseInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryV2Response.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryV2Response.java index 392583309..83f436ba8 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryV2Response.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryV2Response.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,8 +34,8 @@ /** WithdrawHistoryV2Response */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class WithdrawHistoryV2Response extends ArrayList { + comments = "Generator version: 7.22.0") +public class WithdrawHistoryV2Response extends ArrayList { public WithdrawHistoryV2Response() {} @Override @@ -116,7 +116,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray array = jsonElement.getAsJsonArray(); // validate array items for (JsonElement element : array) { - WithdrawHistoryV2ResponseInner.validateJsonElement(element); + WithdrawHistoryV1ResponseInner.validateJsonElement(element); } if (jsonElement == null) { if (!WithdrawHistoryV2Response.openapiRequiredFields diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryV2ResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryV2ResponseInner.java deleted file mode 100644 index 68d21b544..000000000 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawHistoryV2ResponseInner.java +++ /dev/null @@ -1,918 +0,0 @@ -/* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.binance.connector.client.wallet.rest.model; - -import com.binance.connector.client.wallet.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** WithdrawHistoryV2ResponseInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class WithdrawHistoryV2ResponseInner { - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @jakarta.annotation.Nullable - private String id; - - public static final String SERIALIZED_NAME_TR_ID = "trId"; - - @SerializedName(SERIALIZED_NAME_TR_ID) - @jakarta.annotation.Nullable - private Long trId; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - - @SerializedName(SERIALIZED_NAME_AMOUNT) - @jakarta.annotation.Nullable - private String amount; - - public static final String SERIALIZED_NAME_TRANSACTION_FEE = "transactionFee"; - - @SerializedName(SERIALIZED_NAME_TRANSACTION_FEE) - @jakarta.annotation.Nullable - private String transactionFee; - - public static final String SERIALIZED_NAME_COIN = "coin"; - - @SerializedName(SERIALIZED_NAME_COIN) - @jakarta.annotation.Nullable - private String coin; - - public static final String SERIALIZED_NAME_WITHDRAWAL_STATUS = "withdrawalStatus"; - - @SerializedName(SERIALIZED_NAME_WITHDRAWAL_STATUS) - @jakarta.annotation.Nullable - private Long withdrawalStatus; - - public static final String SERIALIZED_NAME_TRAVEL_RULE_STATUS = "travelRuleStatus"; - - @SerializedName(SERIALIZED_NAME_TRAVEL_RULE_STATUS) - @jakarta.annotation.Nullable - private Long travelRuleStatus; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - - @SerializedName(SERIALIZED_NAME_ADDRESS) - @jakarta.annotation.Nullable - private String address; - - public static final String SERIALIZED_NAME_TX_ID = "txId"; - - @SerializedName(SERIALIZED_NAME_TX_ID) - @jakarta.annotation.Nullable - private String txId; - - public static final String SERIALIZED_NAME_APPLY_TIME = "applyTime"; - - @SerializedName(SERIALIZED_NAME_APPLY_TIME) - @jakarta.annotation.Nullable - private String applyTime; - - public static final String SERIALIZED_NAME_NETWORK = "network"; - - @SerializedName(SERIALIZED_NAME_NETWORK) - @jakarta.annotation.Nullable - private String network; - - public static final String SERIALIZED_NAME_TRANSFER_TYPE = "transferType"; - - @SerializedName(SERIALIZED_NAME_TRANSFER_TYPE) - @jakarta.annotation.Nullable - private Long transferType; - - public static final String SERIALIZED_NAME_WITHDRAW_ORDER_ID = "withdrawOrderId"; - - @SerializedName(SERIALIZED_NAME_WITHDRAW_ORDER_ID) - @jakarta.annotation.Nullable - private String withdrawOrderId; - - public static final String SERIALIZED_NAME_INFO = "info"; - - @SerializedName(SERIALIZED_NAME_INFO) - @jakarta.annotation.Nullable - private String info; - - public static final String SERIALIZED_NAME_CONFIRM_NO = "confirmNo"; - - @SerializedName(SERIALIZED_NAME_CONFIRM_NO) - @jakarta.annotation.Nullable - private Long confirmNo; - - public static final String SERIALIZED_NAME_WALLET_TYPE = "walletType"; - - @SerializedName(SERIALIZED_NAME_WALLET_TYPE) - @jakarta.annotation.Nullable - private Long walletType; - - public static final String SERIALIZED_NAME_TX_KEY = "txKey"; - - @SerializedName(SERIALIZED_NAME_TX_KEY) - @jakarta.annotation.Nullable - private String txKey; - - public static final String SERIALIZED_NAME_QUESTIONNAIRE = "questionnaire"; - - @SerializedName(SERIALIZED_NAME_QUESTIONNAIRE) - @jakarta.annotation.Nullable - private String questionnaire; - - public static final String SERIALIZED_NAME_COMPLETE_TIME = "completeTime"; - - @SerializedName(SERIALIZED_NAME_COMPLETE_TIME) - @jakarta.annotation.Nullable - private String completeTime; - - public WithdrawHistoryV2ResponseInner() {} - - public WithdrawHistoryV2ResponseInner id(@jakarta.annotation.Nullable String id) { - this.id = id; - return this; - } - - /** - * Get id - * - * @return id - */ - @jakarta.annotation.Nullable - public String getId() { - return id; - } - - public void setId(@jakarta.annotation.Nullable String id) { - this.id = id; - } - - public WithdrawHistoryV2ResponseInner trId(@jakarta.annotation.Nullable Long trId) { - this.trId = trId; - return this; - } - - /** - * Get trId - * - * @return trId - */ - @jakarta.annotation.Nullable - public Long getTrId() { - return trId; - } - - public void setTrId(@jakarta.annotation.Nullable Long trId) { - this.trId = trId; - } - - public WithdrawHistoryV2ResponseInner amount(@jakarta.annotation.Nullable String amount) { - this.amount = amount; - return this; - } - - /** - * Get amount - * - * @return amount - */ - @jakarta.annotation.Nullable - public String getAmount() { - return amount; - } - - public void setAmount(@jakarta.annotation.Nullable String amount) { - this.amount = amount; - } - - public WithdrawHistoryV2ResponseInner transactionFee( - @jakarta.annotation.Nullable String transactionFee) { - this.transactionFee = transactionFee; - return this; - } - - /** - * Get transactionFee - * - * @return transactionFee - */ - @jakarta.annotation.Nullable - public String getTransactionFee() { - return transactionFee; - } - - public void setTransactionFee(@jakarta.annotation.Nullable String transactionFee) { - this.transactionFee = transactionFee; - } - - public WithdrawHistoryV2ResponseInner coin(@jakarta.annotation.Nullable String coin) { - this.coin = coin; - return this; - } - - /** - * Get coin - * - * @return coin - */ - @jakarta.annotation.Nullable - public String getCoin() { - return coin; - } - - public void setCoin(@jakarta.annotation.Nullable String coin) { - this.coin = coin; - } - - public WithdrawHistoryV2ResponseInner withdrawalStatus( - @jakarta.annotation.Nullable Long withdrawalStatus) { - this.withdrawalStatus = withdrawalStatus; - return this; - } - - /** - * Get withdrawalStatus - * - * @return withdrawalStatus - */ - @jakarta.annotation.Nullable - public Long getWithdrawalStatus() { - return withdrawalStatus; - } - - public void setWithdrawalStatus(@jakarta.annotation.Nullable Long withdrawalStatus) { - this.withdrawalStatus = withdrawalStatus; - } - - public WithdrawHistoryV2ResponseInner travelRuleStatus( - @jakarta.annotation.Nullable Long travelRuleStatus) { - this.travelRuleStatus = travelRuleStatus; - return this; - } - - /** - * Get travelRuleStatus - * - * @return travelRuleStatus - */ - @jakarta.annotation.Nullable - public Long getTravelRuleStatus() { - return travelRuleStatus; - } - - public void setTravelRuleStatus(@jakarta.annotation.Nullable Long travelRuleStatus) { - this.travelRuleStatus = travelRuleStatus; - } - - public WithdrawHistoryV2ResponseInner address(@jakarta.annotation.Nullable String address) { - this.address = address; - return this; - } - - /** - * Get address - * - * @return address - */ - @jakarta.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(@jakarta.annotation.Nullable String address) { - this.address = address; - } - - public WithdrawHistoryV2ResponseInner txId(@jakarta.annotation.Nullable String txId) { - this.txId = txId; - return this; - } - - /** - * Get txId - * - * @return txId - */ - @jakarta.annotation.Nullable - public String getTxId() { - return txId; - } - - public void setTxId(@jakarta.annotation.Nullable String txId) { - this.txId = txId; - } - - public WithdrawHistoryV2ResponseInner applyTime(@jakarta.annotation.Nullable String applyTime) { - this.applyTime = applyTime; - return this; - } - - /** - * Get applyTime - * - * @return applyTime - */ - @jakarta.annotation.Nullable - public String getApplyTime() { - return applyTime; - } - - public void setApplyTime(@jakarta.annotation.Nullable String applyTime) { - this.applyTime = applyTime; - } - - public WithdrawHistoryV2ResponseInner network(@jakarta.annotation.Nullable String network) { - this.network = network; - return this; - } - - /** - * Get network - * - * @return network - */ - @jakarta.annotation.Nullable - public String getNetwork() { - return network; - } - - public void setNetwork(@jakarta.annotation.Nullable String network) { - this.network = network; - } - - public WithdrawHistoryV2ResponseInner transferType( - @jakarta.annotation.Nullable Long transferType) { - this.transferType = transferType; - return this; - } - - /** - * Get transferType - * - * @return transferType - */ - @jakarta.annotation.Nullable - public Long getTransferType() { - return transferType; - } - - public void setTransferType(@jakarta.annotation.Nullable Long transferType) { - this.transferType = transferType; - } - - public WithdrawHistoryV2ResponseInner withdrawOrderId( - @jakarta.annotation.Nullable String withdrawOrderId) { - this.withdrawOrderId = withdrawOrderId; - return this; - } - - /** - * Get withdrawOrderId - * - * @return withdrawOrderId - */ - @jakarta.annotation.Nullable - public String getWithdrawOrderId() { - return withdrawOrderId; - } - - public void setWithdrawOrderId(@jakarta.annotation.Nullable String withdrawOrderId) { - this.withdrawOrderId = withdrawOrderId; - } - - public WithdrawHistoryV2ResponseInner info(@jakarta.annotation.Nullable String info) { - this.info = info; - return this; - } - - /** - * Get info - * - * @return info - */ - @jakarta.annotation.Nullable - public String getInfo() { - return info; - } - - public void setInfo(@jakarta.annotation.Nullable String info) { - this.info = info; - } - - public WithdrawHistoryV2ResponseInner confirmNo(@jakarta.annotation.Nullable Long confirmNo) { - this.confirmNo = confirmNo; - return this; - } - - /** - * Get confirmNo - * - * @return confirmNo - */ - @jakarta.annotation.Nullable - public Long getConfirmNo() { - return confirmNo; - } - - public void setConfirmNo(@jakarta.annotation.Nullable Long confirmNo) { - this.confirmNo = confirmNo; - } - - public WithdrawHistoryV2ResponseInner walletType(@jakarta.annotation.Nullable Long walletType) { - this.walletType = walletType; - return this; - } - - /** - * Get walletType - * - * @return walletType - */ - @jakarta.annotation.Nullable - public Long getWalletType() { - return walletType; - } - - public void setWalletType(@jakarta.annotation.Nullable Long walletType) { - this.walletType = walletType; - } - - public WithdrawHistoryV2ResponseInner txKey(@jakarta.annotation.Nullable String txKey) { - this.txKey = txKey; - return this; - } - - /** - * Get txKey - * - * @return txKey - */ - @jakarta.annotation.Nullable - public String getTxKey() { - return txKey; - } - - public void setTxKey(@jakarta.annotation.Nullable String txKey) { - this.txKey = txKey; - } - - public WithdrawHistoryV2ResponseInner questionnaire( - @jakarta.annotation.Nullable String questionnaire) { - this.questionnaire = questionnaire; - return this; - } - - /** - * Get questionnaire - * - * @return questionnaire - */ - @jakarta.annotation.Nullable - public String getQuestionnaire() { - return questionnaire; - } - - public void setQuestionnaire(@jakarta.annotation.Nullable String questionnaire) { - this.questionnaire = questionnaire; - } - - public WithdrawHistoryV2ResponseInner completeTime( - @jakarta.annotation.Nullable String completeTime) { - this.completeTime = completeTime; - return this; - } - - /** - * Get completeTime - * - * @return completeTime - */ - @jakarta.annotation.Nullable - public String getCompleteTime() { - return completeTime; - } - - public void setCompleteTime(@jakarta.annotation.Nullable String completeTime) { - this.completeTime = completeTime; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WithdrawHistoryV2ResponseInner withdrawHistoryV2ResponseInner = - (WithdrawHistoryV2ResponseInner) o; - return Objects.equals(this.id, withdrawHistoryV2ResponseInner.id) - && Objects.equals(this.trId, withdrawHistoryV2ResponseInner.trId) - && Objects.equals(this.amount, withdrawHistoryV2ResponseInner.amount) - && Objects.equals( - this.transactionFee, withdrawHistoryV2ResponseInner.transactionFee) - && Objects.equals(this.coin, withdrawHistoryV2ResponseInner.coin) - && Objects.equals( - this.withdrawalStatus, withdrawHistoryV2ResponseInner.withdrawalStatus) - && Objects.equals( - this.travelRuleStatus, withdrawHistoryV2ResponseInner.travelRuleStatus) - && Objects.equals(this.address, withdrawHistoryV2ResponseInner.address) - && Objects.equals(this.txId, withdrawHistoryV2ResponseInner.txId) - && Objects.equals(this.applyTime, withdrawHistoryV2ResponseInner.applyTime) - && Objects.equals(this.network, withdrawHistoryV2ResponseInner.network) - && Objects.equals(this.transferType, withdrawHistoryV2ResponseInner.transferType) - && Objects.equals( - this.withdrawOrderId, withdrawHistoryV2ResponseInner.withdrawOrderId) - && Objects.equals(this.info, withdrawHistoryV2ResponseInner.info) - && Objects.equals(this.confirmNo, withdrawHistoryV2ResponseInner.confirmNo) - && Objects.equals(this.walletType, withdrawHistoryV2ResponseInner.walletType) - && Objects.equals(this.txKey, withdrawHistoryV2ResponseInner.txKey) - && Objects.equals(this.questionnaire, withdrawHistoryV2ResponseInner.questionnaire) - && Objects.equals(this.completeTime, withdrawHistoryV2ResponseInner.completeTime); - } - - @Override - public int hashCode() { - return Objects.hash( - id, - trId, - amount, - transactionFee, - coin, - withdrawalStatus, - travelRuleStatus, - address, - txId, - applyTime, - network, - transferType, - withdrawOrderId, - info, - confirmNo, - walletType, - txKey, - questionnaire, - completeTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WithdrawHistoryV2ResponseInner {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" trId: ").append(toIndentedString(trId)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" transactionFee: ").append(toIndentedString(transactionFee)).append("\n"); - sb.append(" coin: ").append(toIndentedString(coin)).append("\n"); - sb.append(" withdrawalStatus: ").append(toIndentedString(withdrawalStatus)).append("\n"); - sb.append(" travelRuleStatus: ").append(toIndentedString(travelRuleStatus)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" txId: ").append(toIndentedString(txId)).append("\n"); - sb.append(" applyTime: ").append(toIndentedString(applyTime)).append("\n"); - sb.append(" network: ").append(toIndentedString(network)).append("\n"); - sb.append(" transferType: ").append(toIndentedString(transferType)).append("\n"); - sb.append(" withdrawOrderId: ").append(toIndentedString(withdrawOrderId)).append("\n"); - sb.append(" info: ").append(toIndentedString(info)).append("\n"); - sb.append(" confirmNo: ").append(toIndentedString(confirmNo)).append("\n"); - sb.append(" walletType: ").append(toIndentedString(walletType)).append("\n"); - sb.append(" txKey: ").append(toIndentedString(txKey)).append("\n"); - sb.append(" questionnaire: ").append(toIndentedString(questionnaire)).append("\n"); - sb.append(" completeTime: ").append(toIndentedString(completeTime)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object idValue = getId(); - String idValueAsString = ""; - idValueAsString = idValue.toString(); - sb.append("id=").append(urlEncode(idValueAsString)).append(""); - Object trIdValue = getTrId(); - String trIdValueAsString = ""; - trIdValueAsString = trIdValue.toString(); - sb.append("trId=").append(urlEncode(trIdValueAsString)).append(""); - Object amountValue = getAmount(); - String amountValueAsString = ""; - amountValueAsString = amountValue.toString(); - sb.append("amount=").append(urlEncode(amountValueAsString)).append(""); - Object transactionFeeValue = getTransactionFee(); - String transactionFeeValueAsString = ""; - transactionFeeValueAsString = transactionFeeValue.toString(); - sb.append("transactionFee=").append(urlEncode(transactionFeeValueAsString)).append(""); - Object coinValue = getCoin(); - String coinValueAsString = ""; - coinValueAsString = coinValue.toString(); - sb.append("coin=").append(urlEncode(coinValueAsString)).append(""); - Object withdrawalStatusValue = getWithdrawalStatus(); - String withdrawalStatusValueAsString = ""; - withdrawalStatusValueAsString = withdrawalStatusValue.toString(); - sb.append("withdrawalStatus=").append(urlEncode(withdrawalStatusValueAsString)).append(""); - Object travelRuleStatusValue = getTravelRuleStatus(); - String travelRuleStatusValueAsString = ""; - travelRuleStatusValueAsString = travelRuleStatusValue.toString(); - sb.append("travelRuleStatus=").append(urlEncode(travelRuleStatusValueAsString)).append(""); - Object addressValue = getAddress(); - String addressValueAsString = ""; - addressValueAsString = addressValue.toString(); - sb.append("address=").append(urlEncode(addressValueAsString)).append(""); - Object txIdValue = getTxId(); - String txIdValueAsString = ""; - txIdValueAsString = txIdValue.toString(); - sb.append("txId=").append(urlEncode(txIdValueAsString)).append(""); - Object applyTimeValue = getApplyTime(); - String applyTimeValueAsString = ""; - applyTimeValueAsString = applyTimeValue.toString(); - sb.append("applyTime=").append(urlEncode(applyTimeValueAsString)).append(""); - Object networkValue = getNetwork(); - String networkValueAsString = ""; - networkValueAsString = networkValue.toString(); - sb.append("network=").append(urlEncode(networkValueAsString)).append(""); - Object transferTypeValue = getTransferType(); - String transferTypeValueAsString = ""; - transferTypeValueAsString = transferTypeValue.toString(); - sb.append("transferType=").append(urlEncode(transferTypeValueAsString)).append(""); - Object withdrawOrderIdValue = getWithdrawOrderId(); - String withdrawOrderIdValueAsString = ""; - withdrawOrderIdValueAsString = withdrawOrderIdValue.toString(); - sb.append("withdrawOrderId=").append(urlEncode(withdrawOrderIdValueAsString)).append(""); - Object infoValue = getInfo(); - String infoValueAsString = ""; - infoValueAsString = infoValue.toString(); - sb.append("info=").append(urlEncode(infoValueAsString)).append(""); - Object confirmNoValue = getConfirmNo(); - String confirmNoValueAsString = ""; - confirmNoValueAsString = confirmNoValue.toString(); - sb.append("confirmNo=").append(urlEncode(confirmNoValueAsString)).append(""); - Object walletTypeValue = getWalletType(); - String walletTypeValueAsString = ""; - walletTypeValueAsString = walletTypeValue.toString(); - sb.append("walletType=").append(urlEncode(walletTypeValueAsString)).append(""); - Object txKeyValue = getTxKey(); - String txKeyValueAsString = ""; - txKeyValueAsString = txKeyValue.toString(); - sb.append("txKey=").append(urlEncode(txKeyValueAsString)).append(""); - Object questionnaireValue = getQuestionnaire(); - String questionnaireValueAsString = ""; - questionnaireValueAsString = questionnaireValue.toString(); - sb.append("questionnaire=").append(urlEncode(questionnaireValueAsString)).append(""); - Object completeTimeValue = getCompleteTime(); - String completeTimeValueAsString = ""; - completeTimeValueAsString = completeTimeValue.toString(); - sb.append("completeTime=").append(urlEncode(completeTimeValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("trId"); - openapiFields.add("amount"); - openapiFields.add("transactionFee"); - openapiFields.add("coin"); - openapiFields.add("withdrawalStatus"); - openapiFields.add("travelRuleStatus"); - openapiFields.add("address"); - openapiFields.add("txId"); - openapiFields.add("applyTime"); - openapiFields.add("network"); - openapiFields.add("transferType"); - openapiFields.add("withdrawOrderId"); - openapiFields.add("info"); - openapiFields.add("confirmNo"); - openapiFields.add("walletType"); - openapiFields.add("txKey"); - openapiFields.add("questionnaire"); - openapiFields.add("completeTime"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * WithdrawHistoryV2ResponseInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!WithdrawHistoryV2ResponseInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in WithdrawHistoryV2ResponseInner is not" - + " found in the empty JSON string", - WithdrawHistoryV2ResponseInner.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) - && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if ((jsonObj.get("amount") != null && !jsonObj.get("amount").isJsonNull()) - && !jsonObj.get("amount").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `amount` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("amount").toString())); - } - if ((jsonObj.get("transactionFee") != null && !jsonObj.get("transactionFee").isJsonNull()) - && !jsonObj.get("transactionFee").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `transactionFee` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("transactionFee").toString())); - } - if ((jsonObj.get("coin") != null && !jsonObj.get("coin").isJsonNull()) - && !jsonObj.get("coin").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `coin` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("coin").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) - && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `address` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("address").toString())); - } - if ((jsonObj.get("txId") != null && !jsonObj.get("txId").isJsonNull()) - && !jsonObj.get("txId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `txId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("txId").toString())); - } - if ((jsonObj.get("applyTime") != null && !jsonObj.get("applyTime").isJsonNull()) - && !jsonObj.get("applyTime").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `applyTime` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("applyTime").toString())); - } - if ((jsonObj.get("network") != null && !jsonObj.get("network").isJsonNull()) - && !jsonObj.get("network").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `network` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("network").toString())); - } - if ((jsonObj.get("withdrawOrderId") != null && !jsonObj.get("withdrawOrderId").isJsonNull()) - && !jsonObj.get("withdrawOrderId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `withdrawOrderId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("withdrawOrderId").toString())); - } - if ((jsonObj.get("info") != null && !jsonObj.get("info").isJsonNull()) - && !jsonObj.get("info").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `info` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("info").toString())); - } - if ((jsonObj.get("txKey") != null && !jsonObj.get("txKey").isJsonNull()) - && !jsonObj.get("txKey").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `txKey` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("txKey").toString())); - } - if ((jsonObj.get("questionnaire") != null && !jsonObj.get("questionnaire").isJsonNull()) - && !jsonObj.get("questionnaire").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `questionnaire` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("questionnaire").toString())); - } - if ((jsonObj.get("completeTime") != null && !jsonObj.get("completeTime").isJsonNull()) - && !jsonObj.get("completeTime").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `completeTime` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("completeTime").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!WithdrawHistoryV2ResponseInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'WithdrawHistoryV2ResponseInner' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(WithdrawHistoryV2ResponseInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, WithdrawHistoryV2ResponseInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public WithdrawHistoryV2ResponseInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of WithdrawHistoryV2ResponseInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of WithdrawHistoryV2ResponseInner - * @throws IOException if the JSON string is invalid with respect to - * WithdrawHistoryV2ResponseInner - */ - public static WithdrawHistoryV2ResponseInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, WithdrawHistoryV2ResponseInner.class); - } - - /** - * Convert an instance of WithdrawHistoryV2ResponseInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawRequest.java index 89a144dbf..dc18d0e88 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawRequest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** WithdrawRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class WithdrawRequest { public static final String SERIALIZED_NAME_COIN = "coin"; @@ -125,7 +125,8 @@ public WithdrawRequest withdrawOrderId(@jakarta.annotation.Nullable String withd } /** - * Get withdrawOrderId + * client side id for withdrawal, if provide here, can be used in GET + * `/sapi/v1/capital/withdraw/history` for query. * * @return withdrawOrderId */ @@ -144,7 +145,7 @@ public WithdrawRequest network(@jakarta.annotation.Nullable String network) { } /** - * Get network + * Withdrawal network * * @return network */ @@ -163,7 +164,7 @@ public WithdrawRequest address(@jakarta.annotation.Nonnull String address) { } /** - * Get address + * Withdrawal address * * @return address */ @@ -183,7 +184,7 @@ public WithdrawRequest addressTag(@jakarta.annotation.Nullable String addressTag } /** - * Get addressTag + * Secondary address identifier for coins like XRP,XMR etc. * * @return addressTag */ @@ -202,7 +203,7 @@ public WithdrawRequest amount(@jakarta.annotation.Nonnull Double amount) { } /** - * Get amount + * Amount * * @return amount */ @@ -224,7 +225,9 @@ public WithdrawRequest transactionFeeFlag( } /** - * Get transactionFeeFlag + * When making internal transfer, `true` for returning the fee to the destination + * account; `false` for returning the fee back to the departure account. Default + * `false`. * * @return transactionFeeFlag */ @@ -262,7 +265,8 @@ public WithdrawRequest walletType(@jakarta.annotation.Nullable Long walletType) } /** - * Get walletType + * The wallet type for withdraw,0-spot wallet ,1-funding wallet. Default walletType is the + * current \"selected wallet\" under wallet->Fiat and Spot/Funding->Deposit * * @return walletType */ @@ -281,11 +285,12 @@ public WithdrawRequest recvWindow(@jakarta.annotation.Nullable Long recvWindow) } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawResponse.java index 0f4379a02..d6bdf7f3e 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** WithdrawResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class WithdrawResponse { public static final String SERIALIZED_NAME_ID = "id"; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawTravelRuleRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawTravelRuleRequest.java index aa187da06..38c60f52e 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawTravelRuleRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawTravelRuleRequest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -35,7 +35,7 @@ /** WithdrawTravelRuleRequest */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class WithdrawTravelRuleRequest { public static final String SERIALIZED_NAME_COIN = "coin"; @@ -132,7 +132,7 @@ public WithdrawTravelRuleRequest withdrawOrderId( } /** - * Get withdrawOrderId + * withdrawID defined by the client (i.e. client's internal withdrawID) * * @return withdrawOrderId */ @@ -151,7 +151,7 @@ public WithdrawTravelRuleRequest network(@jakarta.annotation.Nullable String net } /** - * Get network + * Withdrawal network * * @return network */ @@ -170,7 +170,7 @@ public WithdrawTravelRuleRequest address(@jakarta.annotation.Nonnull String addr } /** - * Get address + * Withdrawal address * * @return address */ @@ -190,7 +190,7 @@ public WithdrawTravelRuleRequest addressTag(@jakarta.annotation.Nullable String } /** - * Get addressTag + * Secondary address identifier for coins like XRP,XMR etc. * * @return addressTag */ @@ -209,7 +209,7 @@ public WithdrawTravelRuleRequest amount(@jakarta.annotation.Nonnull Double amoun } /** - * Get amount + * Amount * * @return amount */ @@ -231,7 +231,9 @@ public WithdrawTravelRuleRequest transactionFeeFlag( } /** - * Get transactionFeeFlag + * When making internal transfer, `true` for returning the fee to the destination + * account; `false` for returning the fee back to the departure account. Default + * `false`. * * @return transactionFeeFlag */ @@ -269,7 +271,8 @@ public WithdrawTravelRuleRequest walletType(@jakarta.annotation.Nullable Long wa } /** - * Get walletType + * The wallet type for withdraw,0-spot wallet ,1-funding wallet. Default walletType is the + * current \"selected wallet\" under wallet->Fiat and Spot/Funding->Deposit * * @return walletType */ @@ -288,11 +291,12 @@ public WithdrawTravelRuleRequest recvWindow(@jakarta.annotation.Nullable Long re } /** - * Get recvWindow + * Get recvWindow maximum: 60000 * * @return recvWindow */ @jakarta.annotation.Nullable + @Max(60000L) public Long getRecvWindow() { return recvWindow; } @@ -308,7 +312,7 @@ public WithdrawTravelRuleRequest questionnaire( } /** - * Get questionnaire + * JSON format questionnaire answers. * * @return questionnaire */ diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawTravelRuleResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawTravelRuleResponse.java index 41a21b0c0..509264719 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawTravelRuleResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawTravelRuleResponse.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,7 @@ /** WithdrawTravelRuleResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") + comments = "Generator version: 7.22.0") public class WithdrawTravelRuleResponse { public static final String SERIALIZED_NAME_TR_ID = "trId"; diff --git a/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/AccountApiTest.java b/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/AccountApiTest.java index cea35a1c2..ff99289bb 100644 --- a/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/AccountApiTest.java +++ b/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/AccountApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -30,7 +30,9 @@ import com.binance.connector.client.wallet.rest.model.DisableFastWithdrawSwitchRequest; import com.binance.connector.client.wallet.rest.model.EnableFastWithdrawSwitchRequest; import com.binance.connector.client.wallet.rest.model.GetApiKeyPermissionResponse; +import com.binance.connector.client.wallet.rest.model.OrderType; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -84,12 +86,12 @@ public void initApiClient() throws ApiException { /** * Account API Trading Status (USER_DATA) * - *

Fetch account api trading status detail. Weight: 1 + *

Fetch account api trading status detail. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void accountApiTradingStatusTest() throws ApiException, CryptoException { + public void accountApiTradingStatusTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.accountApiTradingStatus(recvWindow); @@ -114,12 +116,12 @@ public void accountApiTradingStatusTest() throws ApiException, CryptoException { /** * Account info (USER_DATA) * - *

Fetch account info detail. Weight: 1 + *

Fetch account info detail. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void accountInfoTest() throws ApiException, CryptoException { + public void accountInfoTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.accountInfo(recvWindow); @@ -134,21 +136,19 @@ public void accountInfoTest() throws ApiException, CryptoException { Request actualRequest = captorValue.request(); assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); + assertEquals("2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/account/info", actualRequest.url().encodedPath()); } /** * Account Status (USER_DATA) * - *

Fetch account status detail. Weight: 1 + *

Fetch account status detail. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void accountStatusTest() throws ApiException, CryptoException { + public void accountStatusTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.accountStatus(recvWindow); @@ -163,24 +163,22 @@ public void accountStatusTest() throws ApiException, CryptoException { Request actualRequest = captorValue.request(); assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); + assertEquals("2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/account/status", actualRequest.url().encodedPath()); } /** * Daily Account Snapshot (USER_DATA) * - *

Daily account snapshot * The query time period must be less then 30 days * Support query - * within the last one month only * If startTimeand endTime not sent, return records of the last - * 7 days by default Weight: 2400 + *

Daily account snapshot Weight(IP): 2400 Security Type: USER_DATA Notes: - The query time + * period must be less then 30 days - Support query within the last one month only - If + * startTimeand endTime not sent, return records of the last 7 days by default * * @throws ApiException if the Api call fails */ @Test - public void dailyAccountSnapshotTest() throws ApiException, CryptoException { - String type = ""; + public void dailyAccountSnapshotTest() throws ApiException, CryptoException, IOException { + OrderType type = OrderType.MAIN_UMFUTURE; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long limit = 7L; @@ -198,11 +196,9 @@ public void dailyAccountSnapshotTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("type=MAIN_UMFUTURE&startTime=1623319461670&endTime=1641782889000&limit=7&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "type=&startTime=1623319461670&endTime=1641782889000&limit=7&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "7f5d880300068afcaef8978dcf0b77c58c8307d0f2de2302fd75872e33a68f9e", + "97945237d0cc061e7b59a9d456b4b1f3a89788de5f86d77b87b93fdf212918e7", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/accountSnapshot", actualRequest.url().encodedPath()); } @@ -210,12 +206,14 @@ public void dailyAccountSnapshotTest() throws ApiException, CryptoException { /** * Disable Fast Withdraw Switch (USER_DATA) * - *

Weight: 1 + *

Disable Fast Withdraw Switch Weight(IP): 1 Security Type: USER_DATA Notes: - This request + * will disable fastwithdraw switch under your account. You need to enable \"trade\" + * option for the api key which requests this endpoint. * * @throws ApiException if the Api call fails */ @Test - public void disableFastWithdrawSwitchTest() throws ApiException, CryptoException { + public void disableFastWithdrawSwitchTest() throws ApiException, CryptoException, IOException { DisableFastWithdrawSwitchRequest disableFastWithdrawSwitchRequest = new DisableFastWithdrawSwitchRequest(); @@ -234,22 +232,22 @@ public void disableFastWithdrawSwitchTest() throws ApiException, CryptoException assertEquals( "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/account/disableFastWithdrawSwitch", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/account/disableFastWithdrawSwitch", actualRequest.url().encodedPath()); } /** * Enable Fast Withdraw Switch (USER_DATA) * - *

Enable Fast Withdraw Switch (USER_DATA) * This request will enable fastwithdraw switch - * under your account. <br></br> * When Fast Withdraw Switch is on, transferring - * funds to a Binance account will be done instantly. There is no on-chain transaction, no - * transaction ID and no withdrawal fee. Weight: 1 + *

Enable Fast Withdraw Switch (USER_DATA) Weight(IP): 1 Security Type: USER_DATA Notes: - + * This request will enable fastwithdraw switch under your account. You need to enable + * \"trade\" option for the api key which requests this endpoint. - When Fast Withdraw + * Switch is on, transferring funds to a Binance account will be done instantly. There is no + * on-chain transaction, no transaction ID and no withdrawal fee. * * @throws ApiException if the Api call fails */ @Test - public void enableFastWithdrawSwitchTest() throws ApiException, CryptoException { + public void enableFastWithdrawSwitchTest() throws ApiException, CryptoException, IOException { EnableFastWithdrawSwitchRequest enableFastWithdrawSwitchRequest = new EnableFastWithdrawSwitchRequest(); @@ -268,19 +266,18 @@ public void enableFastWithdrawSwitchTest() throws ApiException, CryptoException assertEquals( "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/account/enableFastWithdrawSwitch", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/account/enableFastWithdrawSwitch", actualRequest.url().encodedPath()); } /** * Get API Key Permission (USER_DATA) * - *

Get API Key Permission Weight: 1 + *

Get API Key Permission Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getApiKeyPermissionTest() throws ApiException, CryptoException { + public void getApiKeyPermissionTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getApiKeyPermission(recvWindow); @@ -296,8 +293,7 @@ public void getApiKeyPermissionTest() throws ApiException, CryptoException { assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/account/apiRestrictions", actualRequest.url().encodedPath()); } } diff --git a/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/AssetApiTest.java b/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/AssetApiTest.java index d62414d6c..42b867137 100644 --- a/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/AssetApiTest.java +++ b/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/AssetApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -23,20 +23,28 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.common.sign.HmacSignatureGenerator; import com.binance.connector.client.common.sign.SignatureGenerator; +import com.binance.connector.client.wallet.rest.model.AccountType; import com.binance.connector.client.wallet.rest.model.AssetDetailResponse; import com.binance.connector.client.wallet.rest.model.AssetDividendRecordResponse; +import com.binance.connector.client.wallet.rest.model.DustConvertRequest; +import com.binance.connector.client.wallet.rest.model.DustConvertResponse; +import com.binance.connector.client.wallet.rest.model.DustConvertibleAssetsRequest; +import com.binance.connector.client.wallet.rest.model.DustConvertibleAssetsResponse; import com.binance.connector.client.wallet.rest.model.DustTransferRequest; import com.binance.connector.client.wallet.rest.model.DustTransferResponse; import com.binance.connector.client.wallet.rest.model.DustlogResponse; +import com.binance.connector.client.wallet.rest.model.FromSymbol; import com.binance.connector.client.wallet.rest.model.FundingWalletRequest; import com.binance.connector.client.wallet.rest.model.FundingWalletResponse; import com.binance.connector.client.wallet.rest.model.GetAssetsThatCanBeConvertedIntoBnbRequest; import com.binance.connector.client.wallet.rest.model.GetAssetsThatCanBeConvertedIntoBnbResponse; import com.binance.connector.client.wallet.rest.model.GetCloudMiningPaymentAndRefundHistoryResponse; import com.binance.connector.client.wallet.rest.model.GetOpenSymbolListResponse; +import com.binance.connector.client.wallet.rest.model.OrderType; import com.binance.connector.client.wallet.rest.model.QueryUserDelegationHistoryResponse; import com.binance.connector.client.wallet.rest.model.QueryUserUniversalTransferHistoryResponse; import com.binance.connector.client.wallet.rest.model.QueryUserWalletBalanceResponse; +import com.binance.connector.client.wallet.rest.model.ToSymbol; import com.binance.connector.client.wallet.rest.model.ToggleBnbBurnOnSpotTradeAndMarginInterestRequest; import com.binance.connector.client.wallet.rest.model.ToggleBnbBurnOnSpotTradeAndMarginInterestResponse; import com.binance.connector.client.wallet.rest.model.TradeFeeResponse; @@ -45,6 +53,7 @@ import com.binance.connector.client.wallet.rest.model.UserUniversalTransferRequest; import com.binance.connector.client.wallet.rest.model.UserUniversalTransferResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -98,15 +107,17 @@ public void initApiClient() throws ApiException { /** * Asset Detail (USER_DATA) * - *

Fetch details of assets supported on Binance. * Please get network and other deposit or - * withdraw details from ``GET /sapi/v1/capital/config/getall``. Weight: 1 + *

Fetch details of assets supported on Binance. Weight(IP): 1 Security Type: USER_DATA + * Notes: - Please get network and other deposit or withdraw details from `GET + * /sapi/v1/capital/config/getall`. * * @throws ApiException if the Api call fails */ @Test - public void assetDetailTest() throws ApiException, CryptoException { + public void assetDetailTest() throws ApiException, CryptoException, IOException { + String asset = "BTC"; Long recvWindow = 5000L; - ApiResponse response = api.assetDetail("BTCUSDT", recvWindow); + ApiResponse response = api.assetDetail(asset, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -118,27 +129,25 @@ public void assetDetailTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("asset=BTCUSDT&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "016fc03fd04451f16c6eba4bd92c9769396a6229a5fb8ca539d2ba74e3038a25", - actualRequest.url().queryParameter("signature")); + assertEquals("asset=BTC&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("34cb82e49b7593f1656dc5e9f9c353c60ac924411707c46e3d5a527235965fe5", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/asset/assetDetail", actualRequest.url().encodedPath()); } /** * Asset Dividend Record (USER_DATA) * - *

Query asset dividend record. * There cannot be more than 180 days between parameter - * `startTime` and `endTime`. Weight: 10 + *

Query asset dividend record. Weight(IP): 10 Security Type: USER_DATA Notes: - There cannot + * be more than 180 days between parameter `startTime` and `endTime`. * * @throws ApiException if the Api call fails */ @Test - public void assetDividendRecordTest() throws ApiException, CryptoException { - String asset = ""; + public void assetDividendRecordTest() throws ApiException, CryptoException, IOException { + String asset = "BTC"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 7L; + Long limit = 20L; Long recvWindow = 5000L; ApiResponse response = api.assetDividendRecord(asset, startTime, endTime, limit, recvWindow); @@ -153,28 +162,87 @@ public void assetDividendRecordTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("asset=BTC&startTime=1623319461670&endTime=1641782889000&limit=20&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "asset=&startTime=1623319461670&endTime=1641782889000&limit=7&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "2b571831eba7db2fe1ac62252bacd3f5fa7e856d45ae16710993408424684a5a", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/asset/assetDividend", actualRequest.url().encodedPath()); + } + + /** + * Dust Convert (USER_DATA) + * + *

Convert dust assets Weight(UID): 10 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void dustConvertTest() throws ApiException, CryptoException, IOException { + DustConvertRequest dustConvertRequest = new DustConvertRequest(); + dustConvertRequest.asset("USDT"); + + ApiResponse response = api.dustConvert(dustConvertRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000asset=USDT", signInputCaptor.getValue()); + assertEquals("e1f5de10e9064f8425b012d548b9d16e21b37b194141422bc9ae05b8ed5f1c68", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/asset/dust-convert/convert", actualRequest.url().encodedPath()); + } + + /** + * Dust Convertible Assets (USER_DATA) + * + *

Query dust convertible assets Weight(IP): 1 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void dustConvertibleAssetsTest() throws ApiException, CryptoException, IOException { + DustConvertibleAssetsRequest dustConvertibleAssetsRequest = + new DustConvertibleAssetsRequest(); + dustConvertibleAssetsRequest.targetAsset("BTC"); + + ApiResponse response = + api.dustConvertibleAssets(dustConvertibleAssetsRequest); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000targetAsset=BTC", signInputCaptor.getValue()); assertEquals( - "68e772371d381d772449272107ff583a7c33dce3bd72ee211bd0ff3e4d9de7d9", + "f15138b7fd156b5048ecb8b8b87f3d371e65ee6d2a468b5d3e9dd13c1cefbb71", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/asset/assetDividend", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/asset/dust-convert/query-convertible-assets", actualRequest.url().encodedPath()); } /** * Dust Transfer (USER_DATA) * - *

Convert dust assets to BNB. * You need to open`Enable Spot & Margin Trading` - * permission for the API Key which requests this endpoint. Weight: 10 + *

Convert dust assets to BNB. Weight(UID): 10 Security Type: USER_DATA Notes: - You need to + * open`Enable Spot & Margin Trading` permission for the API Key which requests + * this endpoint. * * @throws ApiException if the Api call fails */ @Test - public void dustTransferTest() throws ApiException, CryptoException { + public void dustTransferTest() throws ApiException, CryptoException, IOException { DustTransferRequest dustTransferRequest = new DustTransferRequest(); - - dustTransferRequest.asset(""); + dustTransferRequest.asset("BTC"); ApiResponse response = api.dustTransfer(dustTransferRequest); @@ -188,26 +256,27 @@ public void dustTransferTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000asset=", signInputCaptor.getValue()); - assertEquals( - "733c2733b75fbea096af9abd7a6e22ac4cce318248e66e514087362c82db2bf1", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000accountType=SPOT&asset=BTC", signInputCaptor.getValue()); + assertEquals("08d5ff4bb8057b68a02c2a1af2d0ac776fb05e4f3e00d1d45e4589a23665f92f", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/asset/dust", actualRequest.url().encodedPath()); } /** - * DustLog(USER_DATA) + * DustLog (USER_DATA) * - *

Dustlog * Only return last 100 records * Only return records after 2020/12/01 Weight: 1 + *

Dustlog Weight(IP): 1 Security Type: USER_DATA Notes: - Only return last 100 records - + * Only return records after 2020/12/01 * * @throws ApiException if the Api call fails */ @Test - public void dustlogTest() throws ApiException, CryptoException { + public void dustlogTest() throws ApiException, CryptoException, IOException { + AccountType accountType = AccountType.SPOT; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; - ApiResponse response = api.dustlog("", startTime, endTime, recvWindow); + ApiResponse response = + api.dustlog(accountType, startTime, endTime, recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -219,25 +288,22 @@ public void dustlogTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "accountType=&startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "80bec9d0114cf17ecc91114a2fa12987d44598afe1067a64d0a4641af84b67bc", - actualRequest.url().queryParameter("signature")); + assertEquals("accountType=SPOT&startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("8d08897a225fad28d0edf49ccf59ae39ddb3b03af9cd70fb4c7c3686250cad3f", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/asset/dribblet", actualRequest.url().encodedPath()); } /** * Funding Wallet (USER_DATA) * - *

Query Funding Wallet * Currently supports querying the following business assets:Binance - * Pay, Binance Card, Binance Gift Card, Stock Token Weight: 1 + *

Query Funding Wallet Weight(IP): 1 Security Type: USER_DATA Notes: - Currently supports + * querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock + * Token * * @throws ApiException if the Api call fails */ @Test - public void fundingWalletTest() throws ApiException, CryptoException { + public void fundingWalletTest() throws ApiException, CryptoException, IOException { FundingWalletRequest fundingWalletRequest = new FundingWalletRequest(); ApiResponse response = api.fundingWallet(fundingWalletRequest); @@ -253,21 +319,20 @@ public void fundingWalletTest() throws ApiException, CryptoException { Request actualRequest = captorValue.request(); assertEquals("timestamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", - actualRequest.url().queryParameter("signature")); + assertEquals("53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/asset/get-funding-asset", actualRequest.url().encodedPath()); } /** * Get Assets That Can Be Converted Into BNB (USER_DATA) * - *

Get Assets That Can Be Converted Into BNB Weight: 1 + *

Get Assets That Can Be Converted Into BNB Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void getAssetsThatCanBeConvertedIntoBnbTest() throws ApiException, CryptoException { + public void getAssetsThatCanBeConvertedIntoBnbTest() + throws ApiException, CryptoException, IOException { GetAssetsThatCanBeConvertedIntoBnbRequest getAssetsThatCanBeConvertedIntoBnbRequest = new GetAssetsThatCanBeConvertedIntoBnbRequest(); @@ -284,29 +349,32 @@ public void getAssetsThatCanBeConvertedIntoBnbTest() throws ApiException, Crypto Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", + "timestamp=1736393892000accountType=SPOT", signInputCaptor.getValue()); + assertEquals( + "bf71615afc0579c36115b574fac3b21da2bfbbc2f6a306983b4525b4e4867581", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/asset/dust-btc", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/asset/dust-btc", actualRequest.url().encodedPath()); } /** * Get Cloud-Mining payment and refund history (USER_DATA) * - *

The query of Cloud-Mining payment and refund history * Just return the SUCCESS records of - * payment and refund. * For response, type = 248 means payment, type = 249 means - * refund, status =S means SUCCESS. Weight: 600 + *

The query of Cloud-Mining payment and refund history Weight(UID): 600 Security Type: + * USER_DATA Notes: - Just return the SUCCESS records of payment and refund. - For response, + * type = 248 means payment, type = 249 means refund, status =S means SUCCESS. * * @throws ApiException if the Api call fails */ @Test - public void getCloudMiningPaymentAndRefundHistoryTest() throws ApiException, CryptoException { + public void getCloudMiningPaymentAndRefundHistoryTest() + throws ApiException, CryptoException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long tranId = 1L; String clientTranId = "1"; - String asset = ""; + String asset = "BTC"; Long current = 1L; Long size = 10L; ApiResponse response = @@ -324,26 +392,25 @@ public void getCloudMiningPaymentAndRefundHistoryTest() throws ApiException, Cry Request actualRequest = captorValue.request(); assertEquals( - "tranId=1&clientTranId=1&asset=&startTime=1623319461670&endTime=1641782889000¤t=1&size=10×tamp=1736393892000", + "tranId=1&clientTranId=1&asset=BTC&startTime=1623319461670&endTime=1641782889000¤t=1&size=10×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "8ef5140dd72003ac47e15d9ab53c2d9f14ce6cdcd5ad9c8f13aad7ff76691f2d", + "f4276d5d65c60e3b05fb5a38d21b75fa4fff9a7642cb39f8135e705b6741793c", actualRequest.url().queryParameter("signature")); assertEquals( - "/sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage", - actualRequest.url().encodedPath()); + "/sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage", actualRequest.url().encodedPath()); } /** * Get Open Symbol List (MARKET_DATA) * - *

Get the list of symbols that are scheduled to be opened for trading in the market. Weight: - * 100 + *

Get the list of symbols that are scheduled to be opened for trading in the market. + * Weight(IP): 100 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ @Test - public void getOpenSymbolListTest() throws ApiException, CryptoException { + public void getOpenSymbolListTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.getOpenSymbolList(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -353,25 +420,25 @@ public void getOpenSymbolListTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/spot/open-symbol-list", actualRequest.url().encodedPath()); } /** - * Query User Delegation History(For Master Account)(USER_DATA) + * Query User Delegation History(For Master Account) (USER_DATA) * - *

Query User Delegation History * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint Weight: 60 + *

Query User Delegation History Weight(IP): 60 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryUserDelegationHistoryTest() throws ApiException, CryptoException { - String email = ""; + public void queryUserDelegationHistoryTest() throws ApiException, CryptoException, IOException { + String email = "abc@test.com"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - String type = ""; - String asset = ""; + OrderType type = OrderType.MAIN_UMFUTURE; + String asset = "BTC"; Long current = 1L; Long size = 10L; Long recvWindow = 5000L; @@ -389,35 +456,35 @@ public void queryUserDelegationHistoryTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("email=abc%40test.com&startTime=1623319461670&endTime=1641782889000&type=MAIN_UMFUTURE&asset=BTC¤t=1&size=10&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "email=&startTime=1623319461670&endTime=1641782889000&type=&asset=¤t=1&size=10&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "275c21d8b18284d8e829a5b0cbde5f90d8fbf2213ab01193deaf7129ec87a1d8", + "62cc22829c5c10a160845d7676893226ebf1a387c209114e55180df2bac4d2d8", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/asset/custody/transfer-history", actualRequest.url().encodedPath()); } /** - * Query User Universal Transfer History(USER_DATA) + * Query User Universal Transfer History (USER_DATA) * - *

Query User Universal Transfer History * `fromSymbol` must be sent when type are - * ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN * `toSymbol` must be sent - * when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN * Support query within - * the last 6 months only * If `startTime`and `endTime` not sent, return - * records of the last 7 days by default Weight: 1 + *

Query User Universal Transfer History Weight(IP): 1 Security Type: USER_DATA Notes: - + * `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and + * ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be sent when type are + * MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - Support query within the last 6 + * months only - If `startTime`and `endTime` not sent, return records of the + * last 7 days by default * * @throws ApiException if the Api call fails */ @Test - public void queryUserUniversalTransferHistoryTest() throws ApiException, CryptoException { + public void queryUserUniversalTransferHistoryTest() + throws ApiException, CryptoException, IOException { String type = ""; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; Long size = 10L; - String fromSymbol = ""; - String toSymbol = ""; + FromSymbol fromSymbol = FromSymbol.ISOLATEDMARGIN_MARGIN; + ToSymbol toSymbol = ToSymbol.MARGIN_ISOLATEDMARGIN; Long recvWindow = 5000L; ApiResponse response = api.queryUserUniversalTransferHistory( @@ -434,10 +501,9 @@ public void queryUserUniversalTransferHistoryTest() throws ApiException, CryptoE Request actualRequest = captorValue.request(); assertEquals( - "type=&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&fromSymbol=&toSymbol=&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + "type=&startTime=1623319461670&endTime=1641782889000¤t=1&size=10&fromSymbol=ISOLATEDMARGIN_MARGIN&toSymbol=MARGIN_ISOLATEDMARGIN&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "ffae64ec239a949e8770619077f2814a553facac70bc81b25a3a04c9947dde91", + "3ab935d5af37f84ea291184b5fb086e173a9baca86673e619c27336d0e1503fd", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/asset/transfer", actualRequest.url().encodedPath()); } @@ -445,13 +511,12 @@ public void queryUserUniversalTransferHistoryTest() throws ApiException, CryptoE /** * Query User Wallet Balance (USER_DATA) * - *

Query User Wallet Balance * You need to open Permits Universal Transfer permission for the - * API Key which requests this endpoint. Weight: 60 + *

Query User Wallet Balance Weight(IP): 60 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void queryUserWalletBalanceTest() throws ApiException, CryptoException { + public void queryUserWalletBalanceTest() throws ApiException, CryptoException, IOException { String quoteAsset = "BTC"; Long recvWindow = 5000L; ApiResponse response = @@ -467,9 +532,7 @@ public void queryUserWalletBalanceTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "quoteAsset=BTC&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); + assertEquals("quoteAsset=BTC&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( "fb7a854542348a3445f9dbdab6d6639e8d3dedbacc4a203868c4bb12fe280d54", actualRequest.url().queryParameter("signature")); @@ -479,14 +542,15 @@ public void queryUserWalletBalanceTest() throws ApiException, CryptoException { /** * Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) * - *

Toggle BNB Burn On Spot Trade And Margin Interest * \"spotBNBBurn\" and - * \"interestBNBBurn\" should be sent at least one. Weight: 1(IP) + *

Toggle BNB Burn On Spot Trade And Margin Interest Weight(IP): 1 Security Type: USER_DATA + * Notes: - \"spotBNBBurn\" and \"interestBNBBurn\" should be sent at least + * one. * * @throws ApiException if the Api call fails */ @Test public void toggleBnbBurnOnSpotTradeAndMarginInterestTest() - throws ApiException, CryptoException { + throws ApiException, CryptoException, IOException { ToggleBnbBurnOnSpotTradeAndMarginInterestRequest toggleBnbBurnOnSpotTradeAndMarginInterestRequest = new ToggleBnbBurnOnSpotTradeAndMarginInterestRequest(); @@ -505,23 +569,27 @@ public void toggleBnbBurnOnSpotTradeAndMarginInterestTest() Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "timestamp=1736393892000", + signInputCaptor.getValue()); assertEquals( "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/bnbBurn", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/bnbBurn", + actualRequest.url().encodedPath()); } /** * Trade Fee (USER_DATA) * - *

Fetch trade fee Weight: 1 + *

Fetch trade fee Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void tradeFeeTest() throws ApiException, CryptoException { - String symbol = ""; + public void tradeFeeTest() throws ApiException, CryptoException, IOException { + String symbol = "ADABNB"; Long recvWindow = 5000L; ApiResponse response = api.tradeFee(symbol, recvWindow); @@ -535,24 +603,22 @@ public void tradeFeeTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("symbol=&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "db1a455af0a2e82b4ec79595d994eb2e7f6b8a93c91a67a2aa59e2b2eae4bc68", - actualRequest.url().queryParameter("signature")); + assertEquals("symbol=ADABNB&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("84d2f23cb20862b24e7548b23c3e8e6cca380b58d553dd5f7589220f9e6c66bb", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/asset/tradeFee", actualRequest.url().encodedPath()); } /** * User Asset (USER_DATA) * - *

Get user assets, just for positive data. * If asset is set, then return this asset, - * otherwise return all assets positive. * If needBtcValuation is set, then return - * btcValudation. Weight: 5 + *

Get user assets, just for positive data. Weight(IP): 5 Security Type: USER_DATA Notes: - + * If asset is set, then return this asset, otherwise return all assets positive. - If + * needBtcValuation is set, then return btcValudation. * * @throws ApiException if the Api call fails */ @Test - public void userAssetTest() throws ApiException, CryptoException { + public void userAssetTest() throws ApiException, CryptoException, IOException { UserAssetRequest userAssetRequest = new UserAssetRequest(); ApiResponse response = api.userAsset(userAssetRequest); @@ -568,52 +634,49 @@ public void userAssetTest() throws ApiException, CryptoException { Request actualRequest = captorValue.request(); assertEquals("timestamp=1736393892000", signInputCaptor.getValue()); - assertEquals( - "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", - actualRequest.url().queryParameter("signature")); + assertEquals("53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v3/asset/getUserAsset", actualRequest.url().encodedPath()); } /** * User Universal Transfer (USER_DATA) * - *

user universal transfer * `fromSymbol` must be sent when type are - * ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN * `toSymbol` must be sent - * when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN * ENUM of transfer - * types: * MAIN_UMFUTURE Spot account transfer to USDⓈ-M Futures account * MAIN_CMFUTURE Spot - * account transfer to COIN-M Futures account * MAIN_MARGIN Spot account transfer to - * Margin(cross)account * UMFUTURE_MAIN USDⓈ-M Futures account transfer to Spot account * - * UMFUTURE_MARGIN USDⓈ-M Futures account transfer to Margin(cross)account * CMFUTURE_MAIN - * COIN-M Futures account transfer to Spot account * CMFUTURE_MARGIN COIN-M Futures account - * transfer to Margin(cross) account * MARGIN_MAIN Margin(cross)account transfer to Spot account - * * MARGIN_UMFUTURE Margin(cross)account transfer to USDⓈ-M Futures * MARGIN_CMFUTURE - * Margin(cross)account transfer to COIN-M Futures * ISOLATEDMARGIN_MARGIN Isolated margin - * account transfer to Margin(cross) account * MARGIN_ISOLATEDMARGIN Margin(cross) account - * transfer to Isolated margin account * ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account - * transfer to Isolated margin account * MAIN_FUNDING Spot account transfer to Funding account * - * FUNDING_MAIN Funding account transfer to Spot account * FUNDING_UMFUTURE Funding account - * transfer to UMFUTURE account * UMFUTURE_FUNDING UMFUTURE account transfer to Funding account - * * MARGIN_FUNDING MARGIN account transfer to Funding account * FUNDING_MARGIN Funding account - * transfer to Margin account * FUNDING_CMFUTURE Funding account transfer to CMFUTURE account * - * CMFUTURE_FUNDING CMFUTURE account transfer to Funding account * MAIN_OPTION Spot account - * transfer to Options account * OPTION_MAIN Options account transfer to Spot account * - * UMFUTURE_OPTION USDⓈ-M Futures account transfer to Options account * OPTION_UMFUTURE Options - * account transfer to USDⓈ-M Futures account * MARGIN_OPTION Margin(cross)account transfer to - * Options account * OPTION_MARGIN Options account transfer to Margin(cross)account * - * FUNDING_OPTION Funding account transfer to Options account * OPTION_FUNDING Options account - * transfer to Funding account * MAIN_PORTFOLIO_MARGIN Spot account transfer to Portfolio Margin - * account * PORTFOLIO_MARGIN_MAIN Portfolio Margin account transfer to Spot account Weight: 900 + *

User universal transfer Weight(UID): 900 Security Type: USER_DATA Notes: - You need to + * enable Permits Universal Transfer option for the API Key that requests this endpoint. - + * `fromSymbol` must be sent when type is `ISOLATEDMARGIN_MARGIN` or + * `ISOLATEDMARGIN_ISOLATEDMARGIN`. - `toSymbol` must be sent when type is + * `MARGIN_ISOLATEDMARGIN` or `ISOLATEDMARGIN_ISOLATEDMARGIN`. - ENUM of + * transfer types: - `MAIN_UMFUTURE`: Spot → USDⓈ-M Futures - + * `MAIN_CMFUTURE`: Spot → COIN-M Futures - `MAIN_MARGIN`: Spot → Margin + * (cross) - `UMFUTURE_MAIN`: USDⓈ-M Futures → Spot - `UMFUTURE_MARGIN`: + * USDⓈ-M Futures → Margin (cross) - `CMFUTURE_MAIN`: COIN-M Futures → Spot - + * `CMFUTURE_MARGIN`: COIN-M Futures → Margin (cross) - `MARGIN_MAIN`: + * Margin (cross) → Spot - `MARGIN_UMFUTURE`: Margin (cross) → USDⓈ-M Futures - + * `MARGIN_CMFUTURE`: Margin (cross) → COIN-M Futures - + * `ISOLATEDMARGIN_MARGIN`: Isolated margin → Margin (cross) - + * `MARGIN_ISOLATEDMARGIN`: Margin (cross) → Isolated margin - + * `ISOLATEDMARGIN_ISOLATEDMARGIN`: Isolated margin → Isolated margin - + * `MAIN_FUNDING`: Spot → Funding - `FUNDING_MAIN`: Funding → Spot - + * `FUNDING_UMFUTURE`: Funding → USDⓈ-M Futures - `UMFUTURE_FUNDING`: USDⓈ-M + * Futures → Funding - `MARGIN_FUNDING`: Margin (cross) → Funding - + * `FUNDING_MARGIN`: Funding → Margin (cross) - `FUNDING_CMFUTURE`: Funding + * → COIN-M Futures - `CMFUTURE_FUNDING`: COIN-M Futures → Funding - + * `MAIN_OPTION`: Spot → Options - `OPTION_MAIN`: Options → Spot - + * `UMFUTURE_OPTION`: USDⓈ-M Futures → Options - `OPTION_UMFUTURE`: Options + * → USDⓈ-M Futures - `MARGIN_OPTION`: Margin (cross) → Options - + * `OPTION_MARGIN`: Options → Margin (cross) - `FUNDING_OPTION`: Funding → + * Options - `OPTION_FUNDING`: Options → Funding - `MAIN_PORTFOLIO_MARGIN`: + * Spot → Portfolio Margin - `PORTFOLIO_MARGIN_MAIN`: Portfolio Margin → Spot * * @throws ApiException if the Api call fails */ @Test - public void userUniversalTransferTest() throws ApiException, CryptoException { + public void userUniversalTransferTest() throws ApiException, CryptoException, IOException { UserUniversalTransferRequest userUniversalTransferRequest = new UserUniversalTransferRequest(); - - userUniversalTransferRequest.type(""); - userUniversalTransferRequest.asset(""); - userUniversalTransferRequest.amount(1d); + userUniversalTransferRequest.type(OrderType.MAIN_UMFUTURE); + userUniversalTransferRequest.asset("BTC"); + userUniversalTransferRequest.amount(1.0d); ApiResponse response = api.userUniversalTransfer(userUniversalTransferRequest); @@ -628,9 +691,9 @@ public void userUniversalTransferTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000amount=1&type=&asset=", signInputCaptor.getValue()); + assertEquals("timestamp=1736393892000amount=1&type=MAIN_UMFUTURE&asset=BTC", signInputCaptor.getValue()); assertEquals( - "99b384ce1ec34b5e4e6569c568238a6da2b12e52e022fe55e390faf2d1ce3e60", + "6cc8439cfda358f95d88a28a7cfbedf428c482e32913ab4b293a5da300a29e63", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/asset/transfer", actualRequest.url().encodedPath()); } diff --git a/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/CapitalApiTest.java b/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/CapitalApiTest.java index f359769df..8c6078612 100644 --- a/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/CapitalApiTest.java +++ b/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/CapitalApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -28,12 +28,15 @@ import com.binance.connector.client.wallet.rest.model.DepositHistoryResponse; import com.binance.connector.client.wallet.rest.model.FetchDepositAddressListWithNetworkResponse; import com.binance.connector.client.wallet.rest.model.FetchWithdrawAddressListResponse; +import com.binance.connector.client.wallet.rest.model.FetchWithdrawQuotaResponse; import com.binance.connector.client.wallet.rest.model.OneClickArrivalDepositApplyRequest; import com.binance.connector.client.wallet.rest.model.OneClickArrivalDepositApplyResponse; +import com.binance.connector.client.wallet.rest.model.Status; import com.binance.connector.client.wallet.rest.model.WithdrawHistoryResponse; import com.binance.connector.client.wallet.rest.model.WithdrawRequest; import com.binance.connector.client.wallet.rest.model.WithdrawResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -87,12 +90,13 @@ public void initApiClient() throws ApiException { /** * All Coins' Information (USER_DATA) * - *

Get information of coins (available for deposit and withdraw) for user. Weight: 10 + *

Get information of coins (available for deposit and withdraw) for user. Weight(IP): 10 + * Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void allCoinsInformationTest() throws ApiException, CryptoException { + public void allCoinsInformationTest() throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.allCoinsInformation(recvWindow); @@ -108,26 +112,26 @@ public void allCoinsInformationTest() throws ApiException, CryptoException { assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", - actualRequest.url().queryParameter("signature")); + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/capital/config/getall", actualRequest.url().encodedPath()); } /** * Deposit Address(supporting network) (USER_DATA) * - *

Fetch deposit address with network. * If `network` is not send, return with - * default network of the coin. * You can get `network` and `isDefault` in - * `networkList` in the response of `Get /sapi/v1/capital/config/getall (HMAC - * SHA256)`. * `amount` needs to be sent if using LIGHTNING network Weight: 10 + *

Fetch deposit address with network. Weight(IP): 10 Security Type: USER_DATA Notes: - If + * `network` is not send, return with default network of the coin. - You can get + * `network` and `isDefault` in `networkList` in the response of + * `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. - `amount` needs to + * be sent if using LIGHTNING network * * @throws ApiException if the Api call fails */ @Test - public void depositAddressTest() throws ApiException, CryptoException { - String coin = ""; + public void depositAddressTest() throws ApiException, CryptoException, IOException { + String coin = "BTC"; String network = ""; - Double amount = 1d; + Double amount = 1.0d; Long recvWindow = 5000L; ApiResponse response = api.depositAddress(coin, network, amount, recvWindow); @@ -142,35 +146,30 @@ public void depositAddressTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "coin=&network=&amount=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "3adaccf2f8a7839589008cce4f4800c18fb1549a804794ea5cb13d10bee74f3f", - actualRequest.url().queryParameter("signature")); + assertEquals("coin=BTC&network=&amount=1&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("9e0dd5c7acc331253bb576e9dea6fc1c3071515afe865b07e8390ebec1ce1320", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/capital/deposit/address", actualRequest.url().encodedPath()); } /** * Deposit History (supporting network) (USER_DATA) * - *

Fetch deposit history. * Please notice the default `startTime` and - * `endTime` to make sure that time interval is within 0-90 days. * If both - * ``startTime`` and ``endTime`` are sent, time between - * ``startTime`` and ``endTime`` must be less than 90 - * days. Weight: 1 + *

Fetch deposit history. Weight(IP): 1 Security Type: USER_DATA Notes: - Please notice the + * default `startTime` and `endTime` to make sure that time interval is + * within 0-90 days. - If both `startTime` and `endTime` are sent, time + * between `startTime` and `endTime` must be less than 90 days. * * @throws ApiException if the Api call fails */ @Test - public void depositHistoryTest() throws ApiException, CryptoException { + public void depositHistoryTest() throws ApiException, CryptoException, IOException { Boolean includeSource = false; - String coin = ""; - Long status = 0L; + String coin = "BTC"; + Status status = Status.STATUS_0; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long offset = 0L; - Long limit = 7L; + Long limit = 1000L; Long recvWindow = 5000L; String txId = "1"; ApiResponse response = @@ -195,27 +194,22 @@ public void depositHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "includeSource=false&coin=&status=0&startTime=1623319461670&endTime=1641782889000&offset=0&limit=7&recvWindow=5000&txId=1×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "0435c2811a4c783522fbf39f90a5899f56064cd717e2dcab5f6d7c79e129d91a", - actualRequest.url().queryParameter("signature")); + assertEquals("includeSource=false&coin=BTC&status=0&startTime=1623319461670&endTime=1641782889000&offset=0&limit=1000&recvWindow=5000&txId=1×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("bad13e622d024e33416c2a6e24ae4ba8e2de46c575930ba3434e228a95a233aa", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/capital/deposit/hisrec", actualRequest.url().encodedPath()); } /** - * Fetch deposit address list with network(USER_DATA) + * Fetch deposit address list with network (USER_DATA) * - *

Fetch deposit address list with network. * If network is not send, return with default - * network of the coin. * You can get network and isDefault in networkList in the response of - * `Get /sapi/v1/capital/config/getall`. Weight: 10 + *

Fetch deposit address list with network. Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void fetchDepositAddressListWithNetworkTest() throws ApiException, CryptoException { - String coin = ""; + public void fetchDepositAddressListWithNetworkTest() + throws ApiException, CryptoException, IOException { + String coin = "BTC"; String network = ""; ApiResponse response = api.fetchDepositAddressListWithNetwork(coin, network); @@ -230,22 +224,24 @@ public void fetchDepositAddressListWithNetworkTest() throws ApiException, Crypto Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("coin=&network=×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "0176fed7f72375816de60776e13e1182b649bb73bb0770b876035ecc14111a5d", + "coin=BTC&network=×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "b5bcbfae14c716af93dda2f84658cd1a1b31bc17cda9f92e69ac72b0f5c17551", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/capital/deposit/address/list", actualRequest.url().encodedPath()); + assertEquals( + "/sapi/v1/capital/deposit/address/list", actualRequest.url().encodedPath()); } /** * Fetch withdraw address list (USER_DATA) * - *

Fetch withdraw address list Weight: 10 + *

Fetch withdraw address list Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void fetchWithdrawAddressListTest() throws ApiException, CryptoException { + public void fetchWithdrawAddressListTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.fetchWithdrawAddressList(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); @@ -265,16 +261,44 @@ public void fetchWithdrawAddressListTest() throws ApiException, CryptoException assertEquals("/sapi/v1/capital/withdraw/address/list", actualRequest.url().encodedPath()); } + /** + * Fetch withdraw quota (USER_DATA) + * + *

Fetch withdraw quota Weight(IP): 10 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchWithdrawQuotaTest() throws ApiException, CryptoException, IOException { + ApiResponse response = api.fetchWithdrawQuota(); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "53668e00dc92eb93de0b253c301e9fc0c20042b13db384a0ad94b38688a5a84c", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/capital/withdraw/quota", actualRequest.url().encodedPath()); + } + /** * One click arrival deposit apply (for expired address deposit) (USER_DATA) * - *

Apply deposit credit for expired address (One click arrival) * Params need to be in the - * POST body Weight: 1 + *

Apply deposit credit for expired address (One click arrival) Weight(IP): 1 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void oneClickArrivalDepositApplyTest() throws ApiException, CryptoException { + public void oneClickArrivalDepositApplyTest() + throws ApiException, CryptoException, IOException { OneClickArrivalDepositApplyRequest oneClickArrivalDepositApplyRequest = new OneClickArrivalDepositApplyRequest(); @@ -299,22 +323,33 @@ public void oneClickArrivalDepositApplyTest() throws ApiException, CryptoExcepti } /** - * Withdraw(USER_DATA) + * Withdraw (USER_DATA) * - *

Submit a withdraw request. * If `network` not send, return with default network - * of the coin. * You can get `network` and `isDefault` in - * `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall - * (HMAC SHA256)`. Weight: 900 + *

Submit a withdraw request Weight(UID): 900 Security Type: USER_DATA Notes: - If + * `network` not send, return with default network of the coin. - You can get + * `network` and `isDefault` in `networkList` of a coin in the + * response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. - To check if + * travel rule is required, by using `GET + * /sapi/v1/localentity/questionnaire-requirements` and if it returns anything other than + * `NIL` you will need update SAPI to `POST + * /sapi/v1/localentity/withdraw/apply` else you can continue `POST + * /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to + * travel rule please refer to the Travel Rule SAPI. - \"For networks that do not support + * memo/tag, submitting a withdrawal request with a non-empty `addressTag` will return + * error `-4106 TAG_NOT_SUPPORTED_FOR_NETWORK`. Please omit the `addressTag` + * field for such networks. You can check whether a network requires a tag via `GET + * /sapi/v1/capital/config/getall`: If `withdrawTag` = `true` → + * memo/tag is required. If `withdrawTag` = `false` → memo/tag is not + * supported; omit `addressTag`.\" * * @throws ApiException if the Api call fails */ @Test - public void withdrawTest() throws ApiException, CryptoException { + public void withdrawTest() throws ApiException, CryptoException, IOException { WithdrawRequest withdrawRequest = new WithdrawRequest(); - - withdrawRequest.coin(""); + withdrawRequest.coin("BTC"); withdrawRequest.address(""); - withdrawRequest.amount(1d); + withdrawRequest.amount(1.0d); ApiResponse response = api.withdraw(withdrawRequest); @@ -328,36 +363,33 @@ public void withdrawTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals( - "timestamp=1736393892000amount=1&address=&coin=", signInputCaptor.getValue()); - assertEquals( - "b319fbc9f958d7a76c51c032ba547c695396ecf0df024768f7e6e09caddf6791", - actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000amount=1&address=&coin=BTC", signInputCaptor.getValue()); + assertEquals("f361d8a2e998683dccab8fc54ea11531f4a6048d71f8e86252e2f478e3b29913", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/capital/withdraw/apply", actualRequest.url().encodedPath()); } /** * Withdraw History (supporting network) (USER_DATA) * - *

Fetch withdraw history. * `network` may not be in the response for old withdraw. - * * Please notice the default `startTime` and `endTime` to make sure that - * time interval is within 0-90 days. * If both `startTime` and `endTime`are - * sent, time between `startTime`and `endTime`must be less than 90 days. * + *

Fetch withdraw history Weight(UID): 18000 (10 requests per second) Security Type: + * USER_DATA Notes: - `network` may not be in the response for old withdraw. - Please + * notice the default `startTime` and `endTime` to make sure that time + * interval is within 0-90 days. - If both `startTime` and `endTime`are + * sent, time between `startTime`and `endTime`must be less than 90 days. - * If `withdrawOrderId` is sent, time between `startTime` and - * `endTime` must be less than 7 days. * If `withdrawOrderId` is sent, + * `endTime` must be less than 7 days. - If `withdrawOrderId` is sent, * `startTime` and `endTime` are not sent, will return last 7 days records - * by default. * Maximum support `idList` number is 45. Weight: 18000 Request limit: - * 10 requests per second + * by default. - Maximum support `idList` number is 45. * * @throws ApiException if the Api call fails */ @Test - public void withdrawHistoryTest() throws ApiException, CryptoException { - String coin = ""; + public void withdrawHistoryTest() throws ApiException, CryptoException, IOException { + String coin = "BTC"; String withdrawOrderId = "1"; Long status = 0L; Long offset = 0L; - Long limit = 7L; + Long limit = 1000L; String idList = ""; Long startTime = 1623319461670L; Long endTime = 1641782889000L; @@ -384,12 +416,9 @@ public void withdrawHistoryTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("coin=BTC&withdrawOrderId=1&status=0&offset=0&limit=1000&idList=&startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "coin=&withdrawOrderId=1&status=0&offset=0&limit=7&idList=&startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "9af7ab926930c86200dd40a05b8103457f5d21cffb03b6305d662d8126b7108f", - actualRequest.url().queryParameter("signature")); + "b2c182847368433b0223ce7bd91fd028a70ca36e9dd7032422d5eb7de2519505", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/capital/withdraw/history", actualRequest.url().encodedPath()); } } diff --git a/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/OthersApiTest.java b/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/OthersApiTest.java index d9a09588f..9eb46d252 100644 --- a/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/OthersApiTest.java +++ b/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/OthersApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -26,6 +26,7 @@ import com.binance.connector.client.wallet.rest.model.GetSymbolsDelistScheduleForSpotResponse; import com.binance.connector.client.wallet.rest.model.SystemStatusResponse; import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -77,14 +78,15 @@ public void initApiClient() throws ApiException { } /** - * Get symbols delist schedule for spot (MARKET_DATA) + * Get Spot Delist Schedule (MARKET_DATA) * - *

Get symbols delist schedule for spot Weight: 100 + *

Get symbols delist schedule for spot Weight(IP): 100 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ @Test - public void getSymbolsDelistScheduleForSpotTest() throws ApiException, CryptoException { + public void getSymbolsDelistScheduleForSpotTest() + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; ApiResponse response = api.getSymbolsDelistScheduleForSpot(recvWindow); @@ -96,19 +98,21 @@ public void getSymbolsDelistScheduleForSpotTest() throws ApiException, CryptoExc Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals(null, actualRequest.url().queryParameter("signature")); + assertEquals( + null, + actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/spot/delist-schedule", actualRequest.url().encodedPath()); } /** - * System Status (System) + * System Status * - *

Fetch system status. Weight: 1 + *

Fetch system status. Weight(IP): 1 Security Type: System * * @throws ApiException if the Api call fails */ @Test - public void systemStatusTest() throws ApiException, CryptoException { + public void systemStatusTest() throws ApiException, CryptoException, IOException { ApiResponse response = api.systemStatus(); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); diff --git a/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/TravelRuleApiTest.java b/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/TravelRuleApiTest.java index 72fd32c5f..e21d62f7c 100644 --- a/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/TravelRuleApiTest.java +++ b/clients/wallet/src/test/java/com/binance/connector/client/wallet/rest/api/TravelRuleApiTest.java @@ -1,6 +1,6 @@ /* - * Binance Wallet REST API - * OpenAPI Specification for the Binance Wallet REST API + * Wallet REST API + * Query balances, manage assets, and perform wallet operations via the Binance Wallet API. * * The version of the OpenAPI document: 1.0.0 * @@ -12,6 +12,8 @@ package com.binance.connector.client.wallet.rest.api; +import static org.junit.Assert.assertEquals; + import com.binance.connector.client.common.ApiClient; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -23,16 +25,25 @@ import com.binance.connector.client.common.sign.SignatureGenerator; import com.binance.connector.client.wallet.rest.model.BrokerWithdrawRequest; import com.binance.connector.client.wallet.rest.model.BrokerWithdrawResponse; +import com.binance.connector.client.wallet.rest.model.CheckQuestionnaireRequirementsResponse; import com.binance.connector.client.wallet.rest.model.DepositHistoryTravelRuleResponse; +import com.binance.connector.client.wallet.rest.model.DepositHistoryV2Response; +import com.binance.connector.client.wallet.rest.model.FetchAddressVerificationListResponse; +import com.binance.connector.client.wallet.rest.model.GetCountryListResponse; +import com.binance.connector.client.wallet.rest.model.GetRegionListResponse; import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireRequest; import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireResponse; import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireTravelRuleRequest; import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireTravelRuleResponse; +import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireV2Request; +import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireV2Response; import com.binance.connector.client.wallet.rest.model.VaspListResponse; import com.binance.connector.client.wallet.rest.model.WithdrawHistoryV1Response; import com.binance.connector.client.wallet.rest.model.WithdrawHistoryV2Response; import com.binance.connector.client.wallet.rest.model.WithdrawTravelRuleRequest; import com.binance.connector.client.wallet.rest.model.WithdrawTravelRuleResponse; +import jakarta.validation.constraints.*; +import java.io.IOException; import okhttp3.Call; import okhttp3.Request; import org.bouncycastle.crypto.CryptoException; @@ -41,8 +52,6 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mockito; -import static org.junit.Assert.assertEquals; - /** API tests for TravelRuleApi */ public class TravelRuleApiTest { @@ -88,26 +97,27 @@ public void initApiClient() throws ApiException { /** * Broker Withdraw (for brokers of local entities that require travel rule) (USER_DATA) * - *

Submit a withdrawal request for brokers of local entities that required travel rule. * If - * `network` not send, return with default network of the coin, but if the address - * could not match default network, the withdraw will be rejected. * You can get - * `network` in `networkList` of a coin in the response * Questionnaire is - * different for each local entity, please refer to * If getting error like `Questionnaire - * format not valid.` or `Questionnaire must not be blank`, Weight: 600 + *

Submit a withdrawal request for brokers of local entities that required travel rule. + * Weight(UID): 600 Security Type: USER_DATA Notes: - If `network` not send, return + * with default network of the coin, but if the address could not match default network, the + * withdraw will be rejected. - You can get `network` in `networkList` of a + * coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. - + * Questionnaire is different for each local entity, please refer to the `Withdraw + * Questionnaire Contents` page. - If getting error like `Questionnaire format not + * valid.` or `Questionnaire must not be blank`, please try to verify the format + * of the questionnaire and use URL-encoded format. * * @throws ApiException if the Api call fails */ @Test - public void brokerWithdrawTest() throws ApiException, CryptoException { + public void brokerWithdrawTest() throws ApiException, CryptoException, IOException { BrokerWithdrawRequest brokerWithdrawRequest = new BrokerWithdrawRequest(); - brokerWithdrawRequest.address(""); - brokerWithdrawRequest.coin(""); - brokerWithdrawRequest.amount(1d); + brokerWithdrawRequest.coin("BTC"); + brokerWithdrawRequest.amount(1.0d); brokerWithdrawRequest.withdrawOrderId("1"); brokerWithdrawRequest.questionnaire(""); brokerWithdrawRequest.originatorPii(""); - brokerWithdrawRequest.signature(""); ApiResponse response = api.brokerWithdraw(brokerWithdrawRequest); @@ -121,41 +131,71 @@ public void brokerWithdrawTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000amount=1&questionnaire=&address=&originatorPii=&withdrawOrderId=1&coin=BTC", signInputCaptor.getValue()); + assertEquals("63b56878ca09cee069222535c18988282c0997f226a7b25126c65c04ec83dd66", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/localentity/broker/withdraw/apply", actualRequest.url().encodedPath()); + } + + /** + * Check Questionnaire Requirements (for local entities that require travel rule) (supporting + * network) (USER_DATA) + * + *

This API will return user-specific Travel Rule questionnaire requirement information in + * reference to the current API key. Weight(IP): 1 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void checkQuestionnaireRequirementsTest() + throws ApiException, CryptoException, IOException { + Long recvWindow = 5000L; + ApiResponse response = + api.checkQuestionnaireRequirements(recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000amount=1&questionnaire=&address=&originatorPii=&signature=&withdrawOrderId=1&coin=", - signInputCaptor.getValue()); - assertEquals( - "6ce402e604ac1f40520a2141d76058ffdf83f05b607f6d223735777372cc792a", + "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/localentity/broker/withdraw/apply", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/localentity/questionnaire-requirements", actualRequest.url().encodedPath()); } /** - * Deposit History (for local entities that required travel rule) (supporting network) - * (USER_DATA) + * Deposit History Travel Rule (for local entities that required travel rule) (supporting + * network) (USER_DATA) * - *

Fetch deposit history for local entities that required travel rule. * Please notice the - * default `startTime` and `endTime` to make sure that time interval is - * within * If both ``startTime`` and ``endTime`` are - * sent, time between ``startTime`` and ``endTime`` must - * Weight: 1 + *

Fetch deposit history for local entities that required travel rule. Weight(IP): 1 Security + * Type: USER_DATA Notes: - Please notice the default `startTime` and + * `endTime` to make sure that time interval is within 0-90 days. - If both + * `startTime` and `endTime` are sent, time between `startTime` + * and `endTime` must be less than 90 days. - Please, note that due to + * network-specific characteristics, the returned source address may be inaccurate. If multiple + * source addresses are found, only the first one will be returned. * * @throws ApiException if the Api call fails */ @Test - public void depositHistoryTravelRuleTest() throws ApiException, CryptoException { + public void depositHistoryTravelRuleTest() throws ApiException, CryptoException, IOException { String trId = "1"; String txId = "1"; String tranId = "1"; String network = ""; - String coin = ""; + String coin = "BTC"; Long travelRuleStatus = 0L; Boolean pendingQuestionnaire = true; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long offset = 0L; - Long limit = 7L; + Long limit = 1000L; ApiResponse response = api.depositHistoryTravelRule( trId, @@ -180,32 +220,80 @@ public void depositHistoryTravelRuleTest() throws ApiException, CryptoException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("trId=1&txId=1&tranId=1&network=&coin=BTC&travelRuleStatus=0&pendingQuestionnaire=true&startTime=1623319461670&endTime=1641782889000&offset=0&limit=1000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "trId=1&txId=1&tranId=1&network=&coin=&travelRuleStatus=0&pendingQuestionnaire=true&startTime=1623319461670&endTime=1641782889000&offset=0&limit=7×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "bf7c19baf5be02bb16000deb65b9564080523e751dc8e0b4bdd740b8d4106acd", + "b5007a774e9f14cef87b41144e3fb1c3ce553325908aaa686818bacf47dc23d1", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/localentity/deposit/history", actualRequest.url().encodedPath()); } /** - * Onboarded VASP list (for local entities that require travel rule) (supporting network) + * Deposit History V2 (for local entities that required travel rule) (supporting network) * (USER_DATA) * - *

Fetch the onboarded VASP list for local entities that required travel rule. * This - * endpoint specifically uses per second IP rate limit, user's total second level IP rate - * Weight: 18000 Request limit: 10 requests per second > * This endpoint specifically uses - * per second IP rate limit, user's total second level IP rate limit is 180000/second. - * Response from the endpoint contains header key X-SAPI-USED-IP-WEIGHT-1S, which defines weight - * used by the current IP. + *

Fetch deposit history for local entities that with required travel rule information. + * Weight(IP): 1 Security Type: USER_DATA Notes: - Please notice the default + * `startTime` and `endTime` to make sure that time interval is within 0-90 + * days. - If both `startTime` and `endTime` are sent, time between + * `startTime` and `endTime` must be less than 90 days. - Please, note that + * due to network-specific characteristics, the returned source address may be inaccurate. If + * multiple source addresses are found, only the first one will be returned. * * @throws ApiException if the Api call fails */ @Test - public void onboardedVaspListTest() throws ApiException, CryptoException { + public void depositHistoryV2Test() throws ApiException, CryptoException, IOException { + Long depositId = 1L; + String txId = "1"; + String network = ""; + String coin = "BTC"; + Boolean retrieveQuestionnaire = true; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long offset = 0L; + Long limit = 1000L; + ApiResponse response = + api.depositHistoryV2( + depositId, + txId, + network, + coin, + retrieveQuestionnaire, + startTime, + endTime, + offset, + limit); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("depositId=1&txId=1&network=&coin=BTC&retrieveQuestionnaire=true&startTime=1623319461670&endTime=1641782889000&offset=0&limit=1000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals( + "7b773da0b9c8b90cbeeeb9b510e20abd034071a59bbfd68cc7a711ce098d2260", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v2/localentity/deposit/history", actualRequest.url().encodedPath()); + } + + /** + * Fetch address verification list (USER_DATA) + * + *

Fetch address verification list for user to check on status and other details for the + * addresses stored in Address Book. Weight(IP): 1 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchAddressVerificationListTest() + throws ApiException, CryptoException, IOException { Long recvWindow = 5000L; - ApiResponse vaspListResponseApiResponse = api.vaspList(recvWindow); + ApiResponse response = + api.fetchAddressVerificationList(recvWindow); ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); Mockito.verify(apiClientSpy) @@ -221,31 +309,88 @@ public void onboardedVaspListTest() throws ApiException, CryptoException { assertEquals( "2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/localentity/vasp", actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/addressVerify/list", actualRequest.url().encodedPath()); } /** - * Submit Deposit Questionnaire (For local entities that require travel rule) (supporting + * Get Country List (USER_DATA) + * + *

Query the active country list for travel rule questionnaires. Currently, only supports AU + * entity. Weight(IP): 1 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getCountryListTest() throws ApiException, CryptoException, IOException { + Long recvWindow = 5000L; + ApiResponse response = api.getCountryList(recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/localentity/country/list", actualRequest.url().encodedPath()); + } + + /** + * Get Region List (USER_DATA) + * + *

Query the active region/city list for a given country. Currently, only supports AU entity. + * Weight(IP): 1 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + @Test + public void getRegionListTest() throws ApiException, CryptoException, IOException { + String countryCode = "au"; + Long recvWindow = 5000L; + ApiResponse response = api.getRegionList(countryCode, recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("countryCode=au&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("5a770e1be4f7ae33475170a7d414899f5f6272d739c94acd2c9535dae8676acd", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/localentity/region/list", actualRequest.url().encodedPath()); + } + + /** + * Submit Deposit Questionnaire Broker (For local entities that require travel rule) (supporting * network) (USER_DATA) * *

Submit questionnaire for brokers of local entities that require travel rule. The * questionnaire is only applies to transactions from un-hosted wallets or VASPs that are not - * yet onboarded with GTR. * Questionnaire is different for each local entity, please refer * If - * getting error like `Questionnaire format not valid.` or `Questionnaire must - * not be blank`, Weight: 600 + * yet onboarded with GTR. Weight(UID): 600 Security Type: USER_DATA Notes: - Questionnaire is + * different for each local entity, please refer to `Deposit Questionnaire Content` + * page. - If getting error like `Questionnaire format not valid.` or + * `Questionnaire must not be blank`, please try to verify the format of the + * questionnaire and use URL-encoded format. * * @throws ApiException if the Api call fails */ @Test - public void submitDepositQuestionnaireTest() throws ApiException, CryptoException { + public void submitDepositQuestionnaireTest() throws ApiException, CryptoException, IOException { SubmitDepositQuestionnaireRequest submitDepositQuestionnaireRequest = new SubmitDepositQuestionnaireRequest(); - submitDepositQuestionnaireRequest.subAccountId("1"); submitDepositQuestionnaireRequest.depositId(1L); submitDepositQuestionnaireRequest.questionnaire(""); submitDepositQuestionnaireRequest.beneficiaryPii(""); - submitDepositQuestionnaireRequest.signature(""); ApiResponse response = api.submitDepositQuestionnaire(submitDepositQuestionnaireRequest); @@ -260,15 +405,11 @@ public void submitDepositQuestionnaireTest() throws ApiException, CryptoExceptio Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000depositId=1&questionnaire=&subAccountId=1&beneficiaryPii=", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000depositId=1&questionnaire=&subAccountId=1&signature=&beneficiaryPii=", - signInputCaptor.getValue()); - assertEquals( - "c4bbb7027534c11fe660c1aa3f3389c8dc17e536410954b4f9d83978c3962d8b", + "cb327a0dd670185553e76229bfcb3bafdb7e0eee33158e781cb35b97b0c5215b", actualRequest.url().queryParameter("signature")); - assertEquals( - "/sapi/v1/localentity/broker/deposit/provide-info", - actualRequest.url().encodedPath()); + assertEquals("/sapi/v1/localentity/broker/deposit/provide-info", actualRequest.url().encodedPath()); } /** @@ -277,17 +418,18 @@ public void submitDepositQuestionnaireTest() throws ApiException, CryptoExceptio * *

Submit questionnaire for local entities that require travel rule. The questionnaire is * only applies to transactions from unhosted wallets or VASPs that are not yet onboarded with - * GTR. * Questionnaire is different for each local entity, please refer * If getting error like - * `Questionnaire format not valid.` or `Questionnaire must not be blank`, - * Weight: 600 + * GTR. Weight(UID): 600 Security Type: USER_DATA Notes: - Questionnaire is different for each + * local entity, please refer to `Deposit Questionnaire Content` page. - If getting + * error like `Questionnaire format not valid.` or `Questionnaire must not be + * blank`, please try to verify the format of the questionnaire and use URL-encoded format. * * @throws ApiException if the Api call fails */ @Test - public void submitDepositQuestionnaireTravelRuleTest() throws ApiException, CryptoException { + public void submitDepositQuestionnaireTravelRuleTest() + throws ApiException, CryptoException, IOException { SubmitDepositQuestionnaireTravelRuleRequest submitDepositQuestionnaireTravelRuleRequest = new SubmitDepositQuestionnaireTravelRuleRequest(); - submitDepositQuestionnaireTravelRuleRequest.tranId(1L); submitDepositQuestionnaireTravelRuleRequest.questionnaire(""); @@ -305,7 +447,8 @@ public void submitDepositQuestionnaireTravelRuleTest() throws ApiException, Cryp Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000tranId=1&questionnaire=", signInputCaptor.getValue()); + assertEquals( + "timestamp=1736393892000tranId=1&questionnaire=", signInputCaptor.getValue()); assertEquals( "020cf8035001d243dd7a11f2af50c753cad954902892ef59cb222ea644dd54cf", actualRequest.url().queryParameter("signature")); @@ -314,31 +457,95 @@ public void submitDepositQuestionnaireTravelRuleTest() throws ApiException, Cryp } /** - * Withdraw History (for local entities that require travel rule) (supporting network) - * (USER_DATA) + * Submit Deposit Questionnaire V2 (For local entities that require travel rule) (supporting + * network) (USER_DATA) + * + *

Submit questionnaire for local entities that require travel rule. The questionnaire is + * only applies to transactions from unhosted wallets or VASPs that are not yet onboarded with + * GTR. Weight(UID): 600 Security Type: USER_DATA Notes: - Questionnaire is different for each + * local entity, please refer to `Deposit Questionnaire Content` page. - If getting + * error like `Questionnaire format not valid.` or `Questionnaire must not be + * blank`, please try to verify the format of the questionnaire and use URL-encoded format. + * + * @throws ApiException if the Api call fails + */ + @Test + public void submitDepositQuestionnaireV2Test() + throws ApiException, CryptoException, IOException { + SubmitDepositQuestionnaireV2Request submitDepositQuestionnaireV2Request = + new SubmitDepositQuestionnaireV2Request(); + submitDepositQuestionnaireV2Request.depositId(1L); + submitDepositQuestionnaireV2Request.questionnaire(""); + + ApiResponse response = + api.submitDepositQuestionnaireV2(submitDepositQuestionnaireV2Request); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("timestamp=1736393892000depositId=1&questionnaire=", signInputCaptor.getValue()); + assertEquals( + "cd809c3893fa9bc85fce1b5b615b51c00be3f21be5768050475d6a03943bb2fc", + actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v2/localentity/deposit/provide-info", actualRequest.url().encodedPath()); + } + + /** + * VASP list (for local entities that require travel rule) (supporting network) (USER_DATA) * - *

Fetch withdraw history for local entities that required travel rule. * This endpoint - * specifically uses per second IP rate limit, user's total second level IP rate * - * `network` may not be in the response for old withdraw. * Please notice the default - * `startTime` and `endTime` to make sure that time interval is within * If - * both `startTime` and `endTime`are sent, time between - * `startTime`and `endTime`must be less Weight: 18000 Request limit: 10 - * requests per second > * This endpoint specifically uses per second IP rate limit, - * user's total second level IP rate limit is 180000/second. Response from the endpoint - * contains header key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP. + *

Fetch the VASP list for local entities. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ @Test - public void withdrawHistoryV1Test() throws ApiException, CryptoException { + public void vaspListTest() throws ApiException, CryptoException, IOException { + Long recvWindow = 5000L; + ApiResponse response = api.vaspList(recvWindow); + + ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); + Mockito.verify(apiClientSpy) + .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); + + ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); + Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); + + Call captorValue = callArgumentCaptor.getValue(); + Request actualRequest = captorValue.request(); + + assertEquals("recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); + assertEquals("2cdd1e484bce80021437bee6b762e6a276b1954c3a0c011a16f6f2f6a47aba75", actualRequest.url().queryParameter("signature")); + assertEquals("/sapi/v1/localentity/vasp", actualRequest.url().encodedPath()); + } + + /** + * Withdraw History Travel Rule (supporting network) (USER_DATA) + * + *

Fetch withdraw history for local entities that required travel rule. Weight(IP): 1 + * Security Type: USER_DATA Notes: - `network` may not be in the response for old + * withdraw. - Please notice the default `startTime` and `endTime` to make + * sure that time interval is within 0-90 days. - If both `startTime` and + * `endTime`are sent, time between `startTime`and `endTime`must be + * less than 90 days. + * + * @throws ApiException if the Api call fails + */ + @Test + public void withdrawHistoryV1Test() throws ApiException, CryptoException, IOException { String trId = "1"; String txId = "1"; String withdrawOrderId = "1"; String network = ""; - String coin = ""; + String coin = "BTC"; Long travelRuleStatus = 0L; Long offset = 0L; - Long limit = 7L; + Long limit = 1000L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; @@ -366,12 +573,9 @@ public void withdrawHistoryV1Test() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("trId=1&txId=1&withdrawOrderId=1&network=&coin=BTC&travelRuleStatus=0&offset=0&limit=1000&startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "trId=1&txId=1&withdrawOrderId=1&network=&coin=&travelRuleStatus=0&offset=0&limit=7&startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "c9d943d585057bc16f31e43b0069bc8759c99f467198f5992994ff387ca4384b", - actualRequest.url().queryParameter("signature")); + "d59bafdbf2e62ed5cdf82da8e0fd12acbdf571336f7dbcea07db60c1fc972063", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/localentity/withdraw/history", actualRequest.url().encodedPath()); } @@ -379,26 +583,22 @@ public void withdrawHistoryV1Test() throws ApiException, CryptoException { * Withdraw History V2 (for local entities that require travel rule) (supporting network) * (USER_DATA) * - *

Fetch withdraw history for local entities that required travel rule. * This endpoint - * specifically uses per second IP rate limit, user's total second level IP rate * - * `network` may not be in the response for old withdraw. * Withdrawal made through - * /sapi/v1/capital/withdraw/apply may not be in the response. * Please notice the default - * `startTime` and `endTime` to make sure that time interval is within * If - * both `startTime` and `endTime`are sent, time between - * `startTime`and `endTime`must be less * If withdrawOrderId is sent, time - * between startTime and endTime must be less than 7 days. * If withdrawOrderId is sent, - * startTime and endTime are not sent, will return last 7 days records by default. * Maximum - * support trId,txId number is 45. * WithdrawOrderId only support 1. * If responsible does not - * include withdrawalStatus, please input trId or txId retrieve the data. Weight: 18000 Request - * limit: 10 requests per second > * This endpoint specifically uses per second IP rate - * limit, user's total second level IP rate limit is 180000/second. Response from the - * endpoint contains header key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the - * current IP. + *

Fetch withdraw history for local entities that required travel rule. Weight(IP): 1 + * Security Type: USER_DATA Notes: - `network` may not be in the response for old + * withdraw. - Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the + * response. - Please notice the default `startTime` and `endTime` to make + * sure that time interval is within 0-90 days. - If both `startTime` and + * `endTime`are sent, time between `startTime`and `endTime`must be + * less than 90 days. - If withdrawOrderId is sent, time between startTime and endTime must be + * less than 7 days. - If withdrawOrderId is sent, startTime and endTime are not sent, will + * return last 7 days records by default. - Maximum support trId,txId number is 45. - + * WithdrawOrderId only support 1. - If responsible does not include withdrawalStatus, please + * input trId or txId retrieve the data. * * @throws ApiException if the Api call fails */ @Test - public void withdrawHistoryV2Test() throws ApiException, CryptoException { + public void withdrawHistoryV2Test() throws ApiException, CryptoException, IOException { String trId = "1"; String txId = "1"; String withdrawOrderId = "1"; @@ -406,7 +606,7 @@ public void withdrawHistoryV2Test() throws ApiException, CryptoException { String coin = ""; Long travelRuleStatus = 0L; Long offset = 0L; - Long limit = 7L; + Long limit = 1000L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; @@ -434,35 +634,33 @@ public void withdrawHistoryV2Test() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("trId=1&txId=1&withdrawOrderId=1&network=&coin=&travelRuleStatus=0&offset=0&limit=1000&startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", signInputCaptor.getValue()); assertEquals( - "trId=1&txId=1&withdrawOrderId=1&network=&coin=&travelRuleStatus=0&offset=0&limit=7&startTime=1623319461670&endTime=1641782889000&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "c9d943d585057bc16f31e43b0069bc8759c99f467198f5992994ff387ca4384b", - actualRequest.url().queryParameter("signature")); + "c38fc7b6c6e24de355dc76617ac10af1b4404502f0b30563f28d3b7f4dbb5a07", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v2/localentity/withdraw/history", actualRequest.url().encodedPath()); } /** - * Withdraw (for local entities that require travel rule) (USER_DATA) + * Withdraw Travel Rule (USER_DATA) * - *

Submit a withdrawal request for local entities that required travel rule. * If - * `network` not send, return with default network of the coin, but if the address - * could not match default network, the withdraw will be rejected. * You can get - * `network` and `isDefault` in `networkList` of a coin in the - * response * Questionnaire is different for each local entity, please refer to * If getting - * error like `Questionnaire format not valid.` or `Questionnaire must not be - * blank`, Weight: 600 + *

Submit a withdrawal request for local entities that required travel rule. Weight(UID): 600 + * Security Type: USER_DATA Notes: - If `network` not send, return with default + * network of the coin, but if the address could not match default network, the withdraw will be + * rejected. - You can get `network` and `isDefault` in + * `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall + * (HMAC SHA256)`. - Questionnaire is different for each local entity, please refer to the + * `Withdraw Questionnaire Contents` page. - If getting error like `Questionnaire + * format not valid.` or `Questionnaire must not be blank`, please try to verify + * the format of the questionnaire and use URL-encoded format. * * @throws ApiException if the Api call fails */ @Test - public void withdrawTravelRuleTest() throws ApiException, CryptoException { + public void withdrawTravelRuleTest() throws ApiException, CryptoException, IOException { WithdrawTravelRuleRequest withdrawTravelRuleRequest = new WithdrawTravelRuleRequest(); - - withdrawTravelRuleRequest.coin(""); + withdrawTravelRuleRequest.coin("BTC"); withdrawTravelRuleRequest.address(""); - withdrawTravelRuleRequest.amount(1d); + withdrawTravelRuleRequest.amount(1.0d); withdrawTravelRuleRequest.questionnaire(""); ApiResponse response = @@ -478,12 +676,9 @@ public void withdrawTravelRuleTest() throws ApiException, CryptoException { Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); + assertEquals("timestamp=1736393892000amount=1&questionnaire=&address=&coin=BTC", signInputCaptor.getValue()); assertEquals( - "timestamp=1736393892000amount=1&questionnaire=&address=&coin=", - signInputCaptor.getValue()); - assertEquals( - "30a5f51ebf4cf7070fe2301951f7720bba2ab127a668eab66e65c551e67a0963", - actualRequest.url().queryParameter("signature")); + "68705ae3a25f489e2389148c6b560acddecbdfa9566aa38c35d114316dd93400", actualRequest.url().queryParameter("signature")); assertEquals("/sapi/v1/localentity/withdraw/apply", actualRequest.url().encodedPath()); } } diff --git a/examples/algo/pom.xml b/examples/algo/pom.xml index 8389115ed..58cb01023 100644 --- a/examples/algo/pom.xml +++ b/examples/algo/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-algo - 1.2.1 + 2.0.0 \ No newline at end of file diff --git a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/CancelAlgoOrderFutureAlgoExample.java b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/CancelAlgoOrderFutureAlgoExample.java index e6f996494..d23a4955a 100644 --- a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/CancelAlgoOrderFutureAlgoExample.java +++ b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/CancelAlgoOrderFutureAlgoExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; /** API examples for FutureAlgoApi */ public class CancelAlgoOrderFutureAlgoExample { @@ -25,14 +26,15 @@ public AlgoRestApi getApi() { } /** - * Cancel Algo Order(TRADE) + * Cancel Futures Algo Order (TRADE) * - *

Cancel an active order. * You need to enable `Futures Trading Permission` for - * the api key which requests this endpoint. * Base URL: https://api.binance.com Weight: 1 + *

Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - You need to enable + * `Futures Trading Permission` for the API key that requests this endpoint. - Base + * URL: `https://api.binance.com` * * @throws ApiException if the Api call fails */ - public void cancelAlgoOrderFutureAlgoExample() throws ApiException { + public void cancelAlgoOrderFutureAlgoExample() throws ApiException, IOException { Long algoId = 1L; Long recvWindow = 5000L; ApiResponse response = diff --git a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QueryCurrentAlgoOpenOrdersFutureAlgoExample.java b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QueryCurrentAlgoOpenOrdersFutureAlgoExample.java index b558e30db..7f0584d8e 100644 --- a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QueryCurrentAlgoOpenOrdersFutureAlgoExample.java +++ b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QueryCurrentAlgoOpenOrdersFutureAlgoExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; /** API examples for FutureAlgoApi */ public class QueryCurrentAlgoOpenOrdersFutureAlgoExample { @@ -25,14 +26,15 @@ public AlgoRestApi getApi() { } /** - * Query Current Algo Open Orders(USER_DATA) + * Query Current Futures Algo Open Orders (USER_DATA) * - *

Query Current Algo Open Orders * You need to enable `Futures Trading Permission` - * for the api key which requests this endpoint. * Base URL: https://api.binance.com Weight: 1 + *

Query Current Algo Open Orders Weight(IP): 1 Security Type: USER_DATA Notes: - You need to + * enable `Futures Trading Permission` for the API key that requests this endpoint. - + * Base URL: `https://api.binance.com` * * @throws ApiException if the Api call fails */ - public void queryCurrentAlgoOpenOrdersFutureAlgoExample() throws ApiException { + public void queryCurrentAlgoOpenOrdersFutureAlgoExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().queryCurrentAlgoOpenOrdersFutureAlgo(recvWindow); diff --git a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QueryHistoricalAlgoOrdersFutureAlgoExample.java b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QueryHistoricalAlgoOrdersFutureAlgoExample.java index dee89efd8..d5877d918 100644 --- a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QueryHistoricalAlgoOrdersFutureAlgoExample.java +++ b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QueryHistoricalAlgoOrdersFutureAlgoExample.java @@ -3,10 +3,12 @@ import com.binance.connector.client.algo.rest.AlgoRestApiUtil; import com.binance.connector.client.algo.rest.api.AlgoRestApi; import com.binance.connector.client.algo.rest.model.QueryHistoricalAlgoOrdersFutureAlgoResponse; +import com.binance.connector.client.algo.rest.model.Side; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; /** API examples for FutureAlgoApi */ public class QueryHistoricalAlgoOrdersFutureAlgoExample { @@ -25,16 +27,17 @@ public AlgoRestApi getApi() { } /** - * Query Historical Algo Orders(USER_DATA) + * Query Historical Futures Algo Orders (USER_DATA) * - *

Query Historical Algo Order * You need to enable `Futures Trading Permission` - * for the api key which requests this endpoint. * Base URL: https://api.binance.com Weight: 1 + *

Query Historical Algo Order Weight(IP): 1 Security Type: USER_DATA Notes: - You need to + * enable `Futures Trading Permission` for the API key that requests this endpoint. - + * Base URL: `https://api.binance.com` * * @throws ApiException if the Api call fails */ - public void queryHistoricalAlgoOrdersFutureAlgoExample() throws ApiException { + public void queryHistoricalAlgoOrdersFutureAlgoExample() throws ApiException, IOException { String symbol = "BTCUSDT"; - String side = "BUY"; + Side side = Side.BUY; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long page = 1L; diff --git a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QuerySubOrdersFutureAlgoExample.java b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QuerySubOrdersFutureAlgoExample.java index 8b2d04515..16012bfb6 100644 --- a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QuerySubOrdersFutureAlgoExample.java +++ b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/QuerySubOrdersFutureAlgoExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; /** API examples for FutureAlgoApi */ public class QuerySubOrdersFutureAlgoExample { @@ -25,15 +26,15 @@ public AlgoRestApi getApi() { } /** - * Query Sub Orders(USER_DATA) + * Query Futures Sub Orders (USER_DATA) * - *

Get respective sub orders for a specified algoId * You need to enable `Futures - * Trading Permission` for the api key which requests this endpoint. * Base URL: - * https://api.binance.com Weight: 1 + *

Get respective sub orders for a specified algoId Weight(IP): 1 Security Type: USER_DATA + * Notes: - You need to enable `Futures Trading Permission` for the API key that + * requests this endpoint. - Base URL: `https://api.binance.com` * * @throws ApiException if the Api call fails */ - public void querySubOrdersFutureAlgoExample() throws ApiException { + public void querySubOrdersFutureAlgoExample() throws ApiException, IOException { Long algoId = 1L; Long page = 1L; Long pageSize = 100L; diff --git a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/TimeWeightedAveragePriceFutureAlgoExample.java b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/TimeWeightedAveragePriceFutureAlgoExample.java index ce0a8f997..3e27fb914 100644 --- a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/TimeWeightedAveragePriceFutureAlgoExample.java +++ b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/TimeWeightedAveragePriceFutureAlgoExample.java @@ -2,12 +2,14 @@ import com.binance.connector.client.algo.rest.AlgoRestApiUtil; import com.binance.connector.client.algo.rest.api.AlgoRestApi; +import com.binance.connector.client.algo.rest.model.Side; import com.binance.connector.client.algo.rest.model.TimeWeightedAveragePriceFutureAlgoRequest; import com.binance.connector.client.algo.rest.model.TimeWeightedAveragePriceFutureAlgoResponse; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; /** API examples for FutureAlgoApi */ public class TimeWeightedAveragePriceFutureAlgoExample { @@ -26,31 +28,29 @@ public AlgoRestApi getApi() { } /** - * Time-Weighted Average Price(Twap) New Order(TRADE) + * Time-Weighted Futures Average Price (Twap) New Order (TRADE) * - *

Send in a Twap new order. Only support on USDⓈ-M Contracts. * Total Algo open orders max - * allowed: `30` orders. * Leverage of symbols and position mode will be the same as - * your futures account settings. You can set up through the trading page or fapi. * Receiving - * `\"success\": true` does not mean that your order will be executed. - * Please use the query order endpoints(`GET sapi/v1/algo/futures/openOrders` or - * `GET sapi/v1/algo/futures/historicalOrders`) to check the order status. For - * example: Your futures balance is insufficient, or open position with reduce only or position - * side is inconsistent with your own setting. In these cases you will receive - * `\"success\": true`, but the order status will be `expired` - * after we check it. * `quantity` * 60 / `duration` should be larger than - * minQty * `duration` cannot be less than 5 mins or more than 24 hours. * For - * delivery contracts, TWAP end time should be one hour earlier than the delivery time of the - * symbol. * You need to enable `Futures Trading Permission` for the api key which - * requests this endpoint. * Base URL: https://api.binance.com Weight: 3000 + *

Send in a Twap new order. Only support on USDⓈ-M Contracts. Weight(UID): 3000 Security + * Type: TRADE Notes: - Other info: - Total Algo open orders max allowed: `30` orders. + * - Leverage and position mode follow your futures account settings. - Receiving + * `\"success\": true` does not guarantee execution; query order endpoints + * for final status. - If balance/position constraints fail, response may still return success + * but order status becomes `expired`. - `quantity * 60 / duration` must be + * greater than `minQty`. - `duration` cannot be less than 5 minutes or + * greater than 24 hours. - For delivery contracts, TWAP end time should be one hour earlier + * than symbol delivery time. - You need to enable the corresponding permission for the API key + * requesting this endpoint: - `Futures Trading Permission` — for Classic Trading + * Account mode - `Portfolio Margin Trading Permission` — for Portfolio Margin Account + * mode - Base URL: `https://api.binance.com` * * @throws ApiException if the Api call fails */ - public void timeWeightedAveragePriceFutureAlgoExample() throws ApiException { + public void timeWeightedAveragePriceFutureAlgoExample() throws ApiException, IOException { TimeWeightedAveragePriceFutureAlgoRequest timeWeightedAveragePriceFutureAlgoRequest = new TimeWeightedAveragePriceFutureAlgoRequest(); timeWeightedAveragePriceFutureAlgoRequest.symbol("BTCUSDT"); - timeWeightedAveragePriceFutureAlgoRequest.side("BUY"); - timeWeightedAveragePriceFutureAlgoRequest.quantity(1.0d); + timeWeightedAveragePriceFutureAlgoRequest.side(Side.BUY); + timeWeightedAveragePriceFutureAlgoRequest.quantity(1d); timeWeightedAveragePriceFutureAlgoRequest.duration(5000L); ApiResponse response = getApi().timeWeightedAveragePriceFutureAlgo( diff --git a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/VolumeParticipationFutureAlgoExample.java b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/VolumeParticipationFutureAlgoExample.java index 2d281763b..219bd9821 100644 --- a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/VolumeParticipationFutureAlgoExample.java +++ b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/futurealgo/VolumeParticipationFutureAlgoExample.java @@ -2,12 +2,15 @@ import com.binance.connector.client.algo.rest.AlgoRestApiUtil; import com.binance.connector.client.algo.rest.api.AlgoRestApi; +import com.binance.connector.client.algo.rest.model.Side; +import com.binance.connector.client.algo.rest.model.Urgency; import com.binance.connector.client.algo.rest.model.VolumeParticipationFutureAlgoRequest; import com.binance.connector.client.algo.rest.model.VolumeParticipationFutureAlgoResponse; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; /** API examples for FutureAlgoApi */ public class VolumeParticipationFutureAlgoExample { @@ -26,29 +29,27 @@ public AlgoRestApi getApi() { } /** - * Volume Participation(VP) New Order (TRADE) + * Volume Participation (VP) New Order (TRADE) * - *

Send in a VP new order. Only support on USDⓈ-M Contracts. * Total Algo open orders max - * allowed: `10` orders. * Leverage of symbols and position mode will be the same as - * your futures account settings. You can set up through the trading page or fapi. * Receiving - * `\"success\": true` does not mean that your order will be executed. - * Please use the query order endpoints(`GET sapi/v1/algo/futures/openOrders` or - * `GET sapi/v1/algo/futures/historicalOrders`) to check the order status. For - * example: Your futures balance is insufficient, or open position with reduce only or position - * side is inconsistent with your own setting. In these cases you will receive - * `\"success\": true`, but the order status will be `expired` - * after we check it. * You need to enable `Futures Trading Permission` for the api - * key which requests this endpoint. * Base URL: https://api.binance.com Weight: 300 + *

Send in a VP new order. Only support on USDⓈ-M Contracts. Weight(UID): 300 Security Type: + * TRADE Notes: - Other info: - Total Algo open orders max allowed: `10` orders. - + * Leverage and position mode follow your futures account settings. - Receiving + * `\"success\": true` does not guarantee execution; query order endpoints + * for final status. - If balance/position constraints fail, response may still return success + * but order status becomes `expired`. - You need to enable the corresponding + * permission for the API key requesting this endpoint: - `Futures Trading Permission` + * — for Classic Trading Account mode - `Portfolio Margin Trading Permission` — for + * Portfolio Margin Account mode - Base URL: `https://api.binance.com` * * @throws ApiException if the Api call fails */ - public void volumeParticipationFutureAlgoExample() throws ApiException { + public void volumeParticipationFutureAlgoExample() throws ApiException, IOException { VolumeParticipationFutureAlgoRequest volumeParticipationFutureAlgoRequest = new VolumeParticipationFutureAlgoRequest(); volumeParticipationFutureAlgoRequest.symbol("BTCUSDT"); - volumeParticipationFutureAlgoRequest.side("BUY"); - volumeParticipationFutureAlgoRequest.quantity(1.0d); - volumeParticipationFutureAlgoRequest.urgency("LOW"); + volumeParticipationFutureAlgoRequest.side(Side.BUY); + volumeParticipationFutureAlgoRequest.quantity(1d); + volumeParticipationFutureAlgoRequest.urgency(Urgency.LOW); ApiResponse response = getApi().volumeParticipationFutureAlgo(volumeParticipationFutureAlgoRequest); System.out.println(response.getData()); diff --git a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/CancelAlgoOrderSpotAlgoExample.java b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/CancelAlgoOrderSpotAlgoExample.java index d54ee53dc..0cbc44ec3 100644 --- a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/CancelAlgoOrderSpotAlgoExample.java +++ b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/CancelAlgoOrderSpotAlgoExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; /** API examples for SpotAlgoApi */ public class CancelAlgoOrderSpotAlgoExample { @@ -25,14 +26,14 @@ public AlgoRestApi getApi() { } /** - * Cancel Algo Order(TRADE) + * Cancel Spot Algo Order (TRADE) * - *

Cancel an open TWAP order Weight: 1 + *

Cancel an open TWAP order Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void cancelAlgoOrderSpotAlgoExample() throws ApiException { - Long algoId = 1L; + public void cancelAlgoOrderSpotAlgoExample() throws ApiException, IOException { + Long algoId = 14511L; Long recvWindow = 5000L; ApiResponse response = getApi().cancelAlgoOrderSpotAlgo(algoId, recvWindow); diff --git a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QueryCurrentAlgoOpenOrdersSpotAlgoExample.java b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QueryCurrentAlgoOpenOrdersSpotAlgoExample.java index 57773e8bd..d0b99d7e9 100644 --- a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QueryCurrentAlgoOpenOrdersSpotAlgoExample.java +++ b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QueryCurrentAlgoOpenOrdersSpotAlgoExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; /** API examples for SpotAlgoApi */ public class QueryCurrentAlgoOpenOrdersSpotAlgoExample { @@ -25,13 +26,13 @@ public AlgoRestApi getApi() { } /** - * Query Current Algo Open Orders(USER_DATA) + * Query Current Spot Algo Open Orders (USER_DATA) * - *

Get all open SPOT TWAP orders Weight: 1 + *

Get all open SPOT TWAP orders Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryCurrentAlgoOpenOrdersSpotAlgoExample() throws ApiException { + public void queryCurrentAlgoOpenOrdersSpotAlgoExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().queryCurrentAlgoOpenOrdersSpotAlgo(recvWindow); diff --git a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QueryHistoricalAlgoOrdersSpotAlgoExample.java b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QueryHistoricalAlgoOrdersSpotAlgoExample.java index 64d8d1c0e..0c60e4533 100644 --- a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QueryHistoricalAlgoOrdersSpotAlgoExample.java +++ b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QueryHistoricalAlgoOrdersSpotAlgoExample.java @@ -3,10 +3,12 @@ import com.binance.connector.client.algo.rest.AlgoRestApiUtil; import com.binance.connector.client.algo.rest.api.AlgoRestApi; import com.binance.connector.client.algo.rest.model.QueryHistoricalAlgoOrdersSpotAlgoResponse; +import com.binance.connector.client.algo.rest.model.Side; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; /** API examples for SpotAlgoApi */ public class QueryHistoricalAlgoOrdersSpotAlgoExample { @@ -25,19 +27,19 @@ public AlgoRestApi getApi() { } /** - * Query Historical Algo Orders(USER_DATA) + * Query Historical Spot Algo Orders (USER_DATA) * - *

Get all historical SPOT TWAP orders Weight: 1 + *

Get all historical SPOT TWAP orders Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryHistoricalAlgoOrdersSpotAlgoExample() throws ApiException { + public void queryHistoricalAlgoOrdersSpotAlgoExample() throws ApiException, IOException { String symbol = "BTCUSDT"; - String side = "BUY"; + Side side = Side.BUY; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long page = 1L; - Long pageSize = 100L; + Long pageSize = 10L; Long recvWindow = 5000L; ApiResponse response = getApi().queryHistoricalAlgoOrdersSpotAlgo( diff --git a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QuerySubOrdersSpotAlgoExample.java b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QuerySubOrdersSpotAlgoExample.java index c8ff2e2ae..8175f0c88 100644 --- a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QuerySubOrdersSpotAlgoExample.java +++ b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/QuerySubOrdersSpotAlgoExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; /** API examples for SpotAlgoApi */ public class QuerySubOrdersSpotAlgoExample { @@ -25,16 +26,16 @@ public AlgoRestApi getApi() { } /** - * Query Sub Orders(USER_DATA) + * Query Spot Sub Orders (USER_DATA) * - *

Get respective sub orders for a specified algoId Weight: 1 + *

Get respective sub orders for a specified algoId Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void querySubOrdersSpotAlgoExample() throws ApiException { + public void querySubOrdersSpotAlgoExample() throws ApiException, IOException { Long algoId = 1L; Long page = 1L; - Long pageSize = 100L; + Long pageSize = 10L; Long recvWindow = 5000L; ApiResponse response = getApi().querySubOrdersSpotAlgo(algoId, page, pageSize, recvWindow); diff --git a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/TimeWeightedAveragePriceSpotAlgoExample.java b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/TimeWeightedAveragePriceSpotAlgoExample.java index e60dd0443..f3baf8e52 100644 --- a/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/TimeWeightedAveragePriceSpotAlgoExample.java +++ b/examples/algo/src/main/java/com/binance/connector/client/algo/rest/spotalgo/TimeWeightedAveragePriceSpotAlgoExample.java @@ -2,12 +2,14 @@ import com.binance.connector.client.algo.rest.AlgoRestApiUtil; import com.binance.connector.client.algo.rest.api.AlgoRestApi; +import com.binance.connector.client.algo.rest.model.Side; import com.binance.connector.client.algo.rest.model.TimeWeightedAveragePriceSpotAlgoRequest; import com.binance.connector.client.algo.rest.model.TimeWeightedAveragePriceSpotAlgoResponse; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; /** API examples for SpotAlgoApi */ public class TimeWeightedAveragePriceSpotAlgoExample { @@ -26,19 +28,19 @@ public AlgoRestApi getApi() { } /** - * Time-Weighted Average Price(Twap) New Order(TRADE) + * Time-Weighted Spot Average Price(Twap) New Order (TRADE) * - *

Place a new spot TWAP order with Algo service. * Total Algo open orders max allowed: - * `20` orders. Weight: 3000 + *

Place a new spot TWAP order with Algo service. Weight(UID): 3000 Security Type: TRADE + * Notes: - Total Algo open orders max allowed: `20` orders. * * @throws ApiException if the Api call fails */ - public void timeWeightedAveragePriceSpotAlgoExample() throws ApiException { + public void timeWeightedAveragePriceSpotAlgoExample() throws ApiException, IOException { TimeWeightedAveragePriceSpotAlgoRequest timeWeightedAveragePriceSpotAlgoRequest = new TimeWeightedAveragePriceSpotAlgoRequest(); timeWeightedAveragePriceSpotAlgoRequest.symbol("BTCUSDT"); - timeWeightedAveragePriceSpotAlgoRequest.side("BUY"); - timeWeightedAveragePriceSpotAlgoRequest.quantity(1.0d); + timeWeightedAveragePriceSpotAlgoRequest.side(Side.BUY); + timeWeightedAveragePriceSpotAlgoRequest.quantity(1d); timeWeightedAveragePriceSpotAlgoRequest.duration(5000L); ApiResponse response = getApi().timeWeightedAveragePriceSpotAlgo(timeWeightedAveragePriceSpotAlgoRequest); diff --git a/examples/alpha/pom.xml b/examples/alpha/pom.xml index 95581b08b..60b6db99e 100644 --- a/examples/alpha/pom.xml +++ b/examples/alpha/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-alpha - 1.0.0 + 2.0.0 \ No newline at end of file diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/AggregatedTradesExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/AggregatedTradesExample.java index 6d4962bd0..f7f3145b2 100644 --- a/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/AggregatedTradesExample.java +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/AggregatedTradesExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; /** API examples for MarketDataApi */ public class AggregatedTradesExample { @@ -28,15 +29,15 @@ public AlphaRestApi getApi() { * Aggregated Trades * *

Retrieves compressed, aggregated historical trades for a specific symbol. Useful for - * recent trade history. Weight: 0 + * recent trade history. * * @throws ApiException if the Api call fails */ - public void aggregatedTradesExample() throws ApiException { - String symbol = ""; - Long fromId = 1L; - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; + public void aggregatedTradesExample() throws ApiException, IOException { + String symbol = "ALPHA_118USDC"; + Long fromId = 58470L; + Long startTime = 1752568680000L; + Long endTime = 1752572280000L; Long limit = 500L; ApiResponse response = getApi().aggregatedTrades(symbol, fromId, startTime, endTime, limit); diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/FullDepthExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/FullDepthExample.java new file mode 100644 index 000000000..db2131a81 --- /dev/null +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/FullDepthExample.java @@ -0,0 +1,43 @@ +package com.binance.connector.client.alpha.rest.marketdata; + +import com.binance.connector.client.alpha.rest.AlphaRestApiUtil; +import com.binance.connector.client.alpha.rest.api.AlphaRestApi; +import com.binance.connector.client.alpha.rest.model.FullDepthResponse; +import com.binance.connector.client.alpha.rest.model.Limit; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; + +/** API examples for MarketDataApi */ +public class FullDepthExample { + private AlphaRestApi api; + + public AlphaRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = AlphaRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new AlphaRestApi(clientConfiguration); + } + return api; + } + + /** + * Full Depth + * + *

Fetches the full order book depth (UI & API orders) for a symbol, including bid and + * ask orders with their prices and quantities. + * + * @throws ApiException if the Api call fails + */ + public void fullDepthExample() throws ApiException, IOException { + String symbol = "ALPHA_175USDT"; + Limit limit = Limit.LIMIT_5; + ApiResponse response = getApi().fullDepth(symbol, limit); + System.out.println(response.getData()); + } +} diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/GetExchangeInfoExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/GetExchangeInfoExample.java index 71b19ef48..61f9ae5d3 100644 --- a/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/GetExchangeInfoExample.java +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/GetExchangeInfoExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetExchangeInfoExample { @@ -28,11 +29,11 @@ public AlphaRestApi getApi() { * Get Exchange Info * *

Fetches general exchange information, such as supported symbols, rate limits, and server - * time. Weight: 0 + * time. * * @throws ApiException if the Api call fails */ - public void getExchangeInfoExample() throws ApiException { + public void getExchangeInfoExample() throws ApiException, IOException { ApiResponse response = getApi().getExchangeInfo(); System.out.println(response.getData()); } diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/KlinesExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/KlinesExample.java index 82965c48f..4c1312331 100644 --- a/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/KlinesExample.java +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/KlinesExample.java @@ -2,11 +2,13 @@ import com.binance.connector.client.alpha.rest.AlphaRestApiUtil; import com.binance.connector.client.alpha.rest.api.AlphaRestApi; +import com.binance.connector.client.alpha.rest.model.Interval; import com.binance.connector.client.alpha.rest.model.KlinesResponse; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; /** API examples for MarketDataApi */ public class KlinesExample { @@ -25,19 +27,19 @@ public AlphaRestApi getApi() { } /** - * Klines (Candlestick Data) + * Klines * *

Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and - * volume over intervals. Useful for charting and analysis. Weight: 0 + * volume over intervals. Useful for charting and analysis. * * @throws ApiException if the Api call fails */ - public void klinesExample() throws ApiException { - String symbol = ""; - String interval = ""; + public void klinesExample() throws ApiException, IOException { + String symbol = "ALPHA_175USDT"; + Interval interval = Interval.INTERVAL_1s; Long limit = 500L; - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; + Long startTime = 1752642000000L; + Long endTime = 1752645599999L; ApiResponse response = getApi().klines(symbol, interval, limit, startTime, endTime); System.out.println(response.getData()); diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/TickerExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/TickerExample.java index 0a0e1fa1e..7505292d6 100644 --- a/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/TickerExample.java +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/TickerExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; /** API examples for MarketDataApi */ public class TickerExample { @@ -25,15 +26,15 @@ public AlphaRestApi getApi() { } /** - * Ticker (24hr Price Statistics) + * Ticker * *

Gets the 24-hour rolling window price change statistics for a symbol, including volume and - * price changes. Weight: 0 + * price changes. * * @throws ApiException if the Api call fails */ - public void tickerExample() throws ApiException { - String symbol = ""; + public void tickerExample() throws ApiException, IOException { + String symbol = "ALPHA_175USDT"; ApiResponse response = getApi().ticker(symbol); System.out.println(response.getData()); } diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/TokenListExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/TokenListExample.java index a8f27d391..6d859696a 100644 --- a/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/TokenListExample.java +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/rest/marketdata/TokenListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; /** API examples for MarketDataApi */ public class TokenListExample { @@ -28,11 +29,11 @@ public AlphaRestApi getApi() { * Token List * *

Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this - * to find the token ID for constructing symbols in other endpoints. Weight: 0 + * to find the token ID for constructing symbols in other endpoints. * * @throws ApiException if the Api call fails */ - public void tokenListExample() throws ApiException { + public void tokenListExample() throws ApiException, IOException { ApiResponse response = getApi().tokenList(); System.out.println(response.getData()); } diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AggregateTradeStreamExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AggregateTradeStreamExample.java new file mode 100644 index 000000000..f82ead838 --- /dev/null +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AggregateTradeStreamExample.java @@ -0,0 +1,39 @@ +package com.binance.connector.client.alpha.websocket.stream.defaultpkg; + +import com.binance.connector.client.alpha.websocket.stream.AlphaWebSocketStreamsUtil; +import com.binance.connector.client.alpha.websocket.stream.api.AlphaWebSocketStreams; +import com.binance.connector.client.alpha.websocket.stream.model.AggregateTradeStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.AggregateTradeStreamResponse; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; + +/** API examples for DefaultApi */ +public class AggregateTradeStreamExample { + private AlphaWebSocketStreams api; + + public AlphaWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + AlphaWebSocketStreamsUtil.getClientConfiguration(); + api = new AlphaWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * Aggregate Trade Stream + * + *

Pushes aggregate trade updates for a symbol. + * + * @throws ApiException if the Api call fails + */ + public void aggregateTradeStreamExample() throws ApiException, InterruptedException { + AggregateTradeStreamRequest aggregateTradeStreamRequest = new AggregateTradeStreamRequest(); + StreamBlockingQueueWrapper response = + getApi().aggregateTradeStream(aggregateTradeStreamRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AllBookTickerStreamExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AllBookTickerStreamExample.java new file mode 100644 index 000000000..8094f97dd --- /dev/null +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AllBookTickerStreamExample.java @@ -0,0 +1,39 @@ +package com.binance.connector.client.alpha.websocket.stream.defaultpkg; + +import com.binance.connector.client.alpha.websocket.stream.AlphaWebSocketStreamsUtil; +import com.binance.connector.client.alpha.websocket.stream.api.AlphaWebSocketStreams; +import com.binance.connector.client.alpha.websocket.stream.model.AllBookTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.AllBookTickerStreamResponse; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; + +/** API examples for DefaultApi */ +public class AllBookTickerStreamExample { + private AlphaWebSocketStreams api; + + public AlphaWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + AlphaWebSocketStreamsUtil.getClientConfiguration(); + api = new AlphaWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * All Book Ticker Stream + * + *

Pushes best bid/ask updates for all symbols. + * + * @throws ApiException if the Api call fails + */ + public void allBookTickerStreamExample() throws ApiException, InterruptedException { + AllBookTickerStreamRequest allBookTickerStreamRequest = new AllBookTickerStreamRequest(); + StreamBlockingQueueWrapper response = + getApi().allBookTickerStream(allBookTickerStreamRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AllMiniTickerStreamExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AllMiniTickerStreamExample.java new file mode 100644 index 000000000..105ac2c10 --- /dev/null +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AllMiniTickerStreamExample.java @@ -0,0 +1,39 @@ +package com.binance.connector.client.alpha.websocket.stream.defaultpkg; + +import com.binance.connector.client.alpha.websocket.stream.AlphaWebSocketStreamsUtil; +import com.binance.connector.client.alpha.websocket.stream.api.AlphaWebSocketStreams; +import com.binance.connector.client.alpha.websocket.stream.model.AllMiniTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.AllMiniTickerStreamResponse; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; + +/** API examples for DefaultApi */ +public class AllMiniTickerStreamExample { + private AlphaWebSocketStreams api; + + public AlphaWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + AlphaWebSocketStreamsUtil.getClientConfiguration(); + api = new AlphaWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * All Mini Ticker Stream + * + *

Pushes mini ticker statistics for all symbols. + * + * @throws ApiException if the Api call fails + */ + public void allMiniTickerStreamExample() throws ApiException, InterruptedException { + AllMiniTickerStreamRequest allMiniTickerStreamRequest = new AllMiniTickerStreamRequest(); + StreamBlockingQueueWrapper response = + getApi().allMiniTickerStream(allMiniTickerStreamRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AllTickerStreamExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AllTickerStreamExample.java new file mode 100644 index 000000000..223919621 --- /dev/null +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AllTickerStreamExample.java @@ -0,0 +1,39 @@ +package com.binance.connector.client.alpha.websocket.stream.defaultpkg; + +import com.binance.connector.client.alpha.websocket.stream.AlphaWebSocketStreamsUtil; +import com.binance.connector.client.alpha.websocket.stream.api.AlphaWebSocketStreams; +import com.binance.connector.client.alpha.websocket.stream.model.AllTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.AllTickerStreamResponse; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; + +/** API examples for DefaultApi */ +public class AllTickerStreamExample { + private AlphaWebSocketStreams api; + + public AlphaWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + AlphaWebSocketStreamsUtil.getClientConfiguration(); + api = new AlphaWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * All Ticker Stream + * + *

Pushes full ticker statistics for all symbols. + * + * @throws ApiException if the Api call fails + */ + public void allTickerStreamExample() throws ApiException, InterruptedException { + AllTickerStreamRequest allTickerStreamRequest = new AllTickerStreamRequest(); + StreamBlockingQueueWrapper response = + getApi().allTickerStream(allTickerStreamRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AllTokens24hTickerStreamExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AllTokens24hTickerStreamExample.java new file mode 100644 index 000000000..4f93ea268 --- /dev/null +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/AllTokens24hTickerStreamExample.java @@ -0,0 +1,40 @@ +package com.binance.connector.client.alpha.websocket.stream.defaultpkg; + +import com.binance.connector.client.alpha.websocket.stream.AlphaWebSocketStreamsUtil; +import com.binance.connector.client.alpha.websocket.stream.api.AlphaWebSocketStreams; +import com.binance.connector.client.alpha.websocket.stream.model.AllTokens24hTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.AllTokens24hTickerStreamResponse; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; + +/** API examples for DefaultApi */ +public class AllTokens24hTickerStreamExample { + private AlphaWebSocketStreams api; + + public AlphaWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + AlphaWebSocketStreamsUtil.getClientConfiguration(); + api = new AlphaWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * All Tokens 24h Ticker Stream + * + *

Pushes 24h ticker-like metrics for all tokens. + * + * @throws ApiException if the Api call fails + */ + public void allTokens24hTickerStreamExample() throws ApiException, InterruptedException { + AllTokens24hTickerStreamRequest allTokens24hTickerStreamRequest = + new AllTokens24hTickerStreamRequest(); + StreamBlockingQueueWrapper response = + getApi().allTokens24hTickerStream(allTokens24hTickerStreamRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/BookTickerStreamExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/BookTickerStreamExample.java new file mode 100644 index 000000000..1b2eecf19 --- /dev/null +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/BookTickerStreamExample.java @@ -0,0 +1,39 @@ +package com.binance.connector.client.alpha.websocket.stream.defaultpkg; + +import com.binance.connector.client.alpha.websocket.stream.AlphaWebSocketStreamsUtil; +import com.binance.connector.client.alpha.websocket.stream.api.AlphaWebSocketStreams; +import com.binance.connector.client.alpha.websocket.stream.model.BookTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.BookTickerStreamResponse; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; + +/** API examples for DefaultApi */ +public class BookTickerStreamExample { + private AlphaWebSocketStreams api; + + public AlphaWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + AlphaWebSocketStreamsUtil.getClientConfiguration(); + api = new AlphaWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * Book Ticker Stream + * + *

Pushes best bid/ask updates for a symbol. + * + * @throws ApiException if the Api call fails + */ + public void bookTickerStreamExample() throws ApiException, InterruptedException { + BookTickerStreamRequest bookTickerStreamRequest = new BookTickerStreamRequest(); + StreamBlockingQueueWrapper response = + getApi().bookTickerStream(bookTickerStreamRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/ContractKlineStreamExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/ContractKlineStreamExample.java new file mode 100644 index 000000000..32f744cb1 --- /dev/null +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/ContractKlineStreamExample.java @@ -0,0 +1,39 @@ +package com.binance.connector.client.alpha.websocket.stream.defaultpkg; + +import com.binance.connector.client.alpha.websocket.stream.AlphaWebSocketStreamsUtil; +import com.binance.connector.client.alpha.websocket.stream.api.AlphaWebSocketStreams; +import com.binance.connector.client.alpha.websocket.stream.model.ContractKlineStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.ContractKlineStreamResponse; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; + +/** API examples for DefaultApi */ +public class ContractKlineStreamExample { + private AlphaWebSocketStreams api; + + public AlphaWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + AlphaWebSocketStreamsUtil.getClientConfiguration(); + api = new AlphaWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * Contract Kline Stream + * + *

Pushes kline updates by contractAddress@chainId. + * + * @throws ApiException if the Api call fails + */ + public void contractKlineStreamExample() throws ApiException, InterruptedException { + ContractKlineStreamRequest contractKlineStreamRequest = new ContractKlineStreamRequest(); + StreamBlockingQueueWrapper response = + getApi().contractKlineStream(contractKlineStreamRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/FullDepthStreamExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/FullDepthStreamExample.java new file mode 100644 index 000000000..77bcdb3b8 --- /dev/null +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/FullDepthStreamExample.java @@ -0,0 +1,39 @@ +package com.binance.connector.client.alpha.websocket.stream.defaultpkg; + +import com.binance.connector.client.alpha.websocket.stream.AlphaWebSocketStreamsUtil; +import com.binance.connector.client.alpha.websocket.stream.api.AlphaWebSocketStreams; +import com.binance.connector.client.alpha.websocket.stream.model.FullDepthStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.FullDepthStreamResponse; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; + +/** API examples for DefaultApi */ +public class FullDepthStreamExample { + private AlphaWebSocketStreams api; + + public AlphaWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + AlphaWebSocketStreamsUtil.getClientConfiguration(); + api = new AlphaWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * Full Depth Stream + * + *

Returns all available depth, including UI and API orders. + * + * @throws ApiException if the Api call fails + */ + public void fullDepthStreamExample() throws ApiException, InterruptedException { + FullDepthStreamRequest fullDepthStreamRequest = new FullDepthStreamRequest(); + StreamBlockingQueueWrapper response = + getApi().fullDepthStream(fullDepthStreamRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/KlineStreamExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/KlineStreamExample.java new file mode 100644 index 000000000..12577950f --- /dev/null +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/KlineStreamExample.java @@ -0,0 +1,39 @@ +package com.binance.connector.client.alpha.websocket.stream.defaultpkg; + +import com.binance.connector.client.alpha.websocket.stream.AlphaWebSocketStreamsUtil; +import com.binance.connector.client.alpha.websocket.stream.api.AlphaWebSocketStreams; +import com.binance.connector.client.alpha.websocket.stream.model.KlineStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.KlineStreamResponse; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; + +/** API examples for DefaultApi */ +public class KlineStreamExample { + private AlphaWebSocketStreams api; + + public AlphaWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + AlphaWebSocketStreamsUtil.getClientConfiguration(); + api = new AlphaWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * Kline Stream + * + *

Pushes kline updates for a symbol. + * + * @throws ApiException if the Api call fails + */ + public void klineStreamExample() throws ApiException, InterruptedException { + KlineStreamRequest klineStreamRequest = new KlineStreamRequest(); + StreamBlockingQueueWrapper response = + getApi().klineStream(klineStreamRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/MiniTickerStreamExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/MiniTickerStreamExample.java new file mode 100644 index 000000000..c4bc8cf0e --- /dev/null +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/MiniTickerStreamExample.java @@ -0,0 +1,39 @@ +package com.binance.connector.client.alpha.websocket.stream.defaultpkg; + +import com.binance.connector.client.alpha.websocket.stream.AlphaWebSocketStreamsUtil; +import com.binance.connector.client.alpha.websocket.stream.api.AlphaWebSocketStreams; +import com.binance.connector.client.alpha.websocket.stream.model.MiniTickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.MiniTickerStreamResponse; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; + +/** API examples for DefaultApi */ +public class MiniTickerStreamExample { + private AlphaWebSocketStreams api; + + public AlphaWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + AlphaWebSocketStreamsUtil.getClientConfiguration(); + api = new AlphaWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * Mini Ticker Stream + * + *

Pushes 24h rolling mini ticker statistics. + * + * @throws ApiException if the Api call fails + */ + public void miniTickerStreamExample() throws ApiException, InterruptedException { + MiniTickerStreamRequest miniTickerStreamRequest = new MiniTickerStreamRequest(); + StreamBlockingQueueWrapper response = + getApi().miniTickerStream(miniTickerStreamRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/PartialDepthStreamExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/PartialDepthStreamExample.java new file mode 100644 index 000000000..1096b9484 --- /dev/null +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/PartialDepthStreamExample.java @@ -0,0 +1,39 @@ +package com.binance.connector.client.alpha.websocket.stream.defaultpkg; + +import com.binance.connector.client.alpha.websocket.stream.AlphaWebSocketStreamsUtil; +import com.binance.connector.client.alpha.websocket.stream.api.AlphaWebSocketStreams; +import com.binance.connector.client.alpha.websocket.stream.model.PartialDepthStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.PartialDepthStreamResponse; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; + +/** API examples for DefaultApi */ +public class PartialDepthStreamExample { + private AlphaWebSocketStreams api; + + public AlphaWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + AlphaWebSocketStreamsUtil.getClientConfiguration(); + api = new AlphaWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * Partial Depth Stream + * + *

Pushes partial depth updates (UI orders only). + * + * @throws ApiException if the Api call fails + */ + public void partialDepthStreamExample() throws ApiException, InterruptedException { + PartialDepthStreamRequest partialDepthStreamRequest = new PartialDepthStreamRequest(); + StreamBlockingQueueWrapper response = + getApi().partialDepthStream(partialDepthStreamRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/TickerStreamExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/TickerStreamExample.java new file mode 100644 index 000000000..91585411d --- /dev/null +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/TickerStreamExample.java @@ -0,0 +1,39 @@ +package com.binance.connector.client.alpha.websocket.stream.defaultpkg; + +import com.binance.connector.client.alpha.websocket.stream.AlphaWebSocketStreamsUtil; +import com.binance.connector.client.alpha.websocket.stream.api.AlphaWebSocketStreams; +import com.binance.connector.client.alpha.websocket.stream.model.TickerStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.TickerStreamResponse; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; + +/** API examples for DefaultApi */ +public class TickerStreamExample { + private AlphaWebSocketStreams api; + + public AlphaWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + AlphaWebSocketStreamsUtil.getClientConfiguration(); + api = new AlphaWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * Ticker Stream + * + *

Pushes full 24h rolling ticker statistics. + * + * @throws ApiException if the Api call fails + */ + public void tickerStreamExample() throws ApiException, InterruptedException { + TickerStreamRequest tickerStreamRequest = new TickerStreamRequest(); + StreamBlockingQueueWrapper response = + getApi().tickerStream(tickerStreamRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/TradeStreamExample.java b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/TradeStreamExample.java new file mode 100644 index 000000000..7170a4bca --- /dev/null +++ b/examples/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/defaultpkg/TradeStreamExample.java @@ -0,0 +1,39 @@ +package com.binance.connector.client.alpha.websocket.stream.defaultpkg; + +import com.binance.connector.client.alpha.websocket.stream.AlphaWebSocketStreamsUtil; +import com.binance.connector.client.alpha.websocket.stream.api.AlphaWebSocketStreams; +import com.binance.connector.client.alpha.websocket.stream.model.TradeStreamRequest; +import com.binance.connector.client.alpha.websocket.stream.model.TradeStreamResponse; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; + +/** API examples for DefaultApi */ +public class TradeStreamExample { + private AlphaWebSocketStreams api; + + public AlphaWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + AlphaWebSocketStreamsUtil.getClientConfiguration(); + api = new AlphaWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * Trade Stream + * + *

Pushes raw trade updates for a symbol. + * + * @throws ApiException if the Api call fails + */ + public void tradeStreamExample() throws ApiException, InterruptedException { + TradeStreamRequest tradeStreamRequest = new TradeStreamRequest(); + StreamBlockingQueueWrapper response = + getApi().tradeStream(tradeStreamRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/c2c/pom.xml b/examples/c2c/pom.xml index 324214289..6c307b06f 100644 --- a/examples/c2c/pom.xml +++ b/examples/c2c/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-c2c - 3.0.0 + 4.0.0 \ No newline at end of file diff --git a/examples/c2c/src/main/java/com/binance/connector/client/c2c/rest/c2c/GetC2CTradeHistoryExample.java b/examples/c2c/src/main/java/com/binance/connector/client/c2c/rest/c2c/GetC2CTradeHistoryExample.java deleted file mode 100644 index a833a6a55..000000000 --- a/examples/c2c/src/main/java/com/binance/connector/client/c2c/rest/c2c/GetC2CTradeHistoryExample.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.binance.connector.client.c2c.rest.c2c; - -import com.binance.connector.client.c2c.rest.C2cRestApiUtil; -import com.binance.connector.client.c2c.rest.api.C2cRestApi; -import com.binance.connector.client.c2c.rest.model.GetC2CTradeHistoryResponse; -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; - -/** API examples for C2CApi */ -public class GetC2CTradeHistoryExample { - private C2cRestApi api; - - public C2cRestApi getApi() { - if (api == null) { - ClientConfiguration clientConfiguration = C2cRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - api = new C2cRestApi(clientConfiguration); - } - return api; - } - - /** - * Get C2C Trade History (USER_DATA) - * - *

Get C2C Trade History * The max interval between startTimestamp and endTimestamp is 30 - * days. * If startTimestamp and endTimestamp are not sent, the recent 30 days' data will be - * returned. * You can only view data from the past 6 months. To see all C2C orders, please - * check https://c2c.binance.com/en/fiatOrder Weight: 1 - * - * @throws ApiException if the Api call fails - */ - public void getC2CTradeHistoryExample() throws ApiException { - String tradeType = ""; - Long startTimestamp = 0L; - Long endTimestamp = 0L; - Long page = 1L; - Long rows = 100L; - Long recvWindow = 5000L; - ApiResponse response = - getApi().getC2CTradeHistory( - tradeType, startTimestamp, endTimestamp, page, rows, recvWindow); - System.out.println(response.getData()); - } -} diff --git a/examples/c2c/src/main/java/com/binance/connector/client/c2c/rest/defaultpkg/GetC2CTradeHistoryExample.java b/examples/c2c/src/main/java/com/binance/connector/client/c2c/rest/defaultpkg/GetC2CTradeHistoryExample.java new file mode 100644 index 000000000..385b82b11 --- /dev/null +++ b/examples/c2c/src/main/java/com/binance/connector/client/c2c/rest/defaultpkg/GetC2CTradeHistoryExample.java @@ -0,0 +1,50 @@ +package com.binance.connector.client.c2c.rest.defaultpkg; + +import com.binance.connector.client.c2c.rest.C2cRestApiUtil; +import com.binance.connector.client.c2c.rest.api.C2cRestApi; +import com.binance.connector.client.c2c.rest.model.GetC2CTradeHistoryResponse; +import com.binance.connector.client.c2c.rest.model.TradeType; +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import java.io.IOException; + +/** API examples for DefaultApi */ +public class GetC2CTradeHistoryExample { + private C2cRestApi api; + + public C2cRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = C2cRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new C2cRestApi(clientConfiguration); + } + return api; + } + + /** + * Get C2C Trade History (USER_DATA) + * + *

Get C2C Trade History Weight(IP): 1 Security Type: USER_DATA Notes: - The max interval + * between `startTimestamp` and `endTimestamp` is 30 days. - If + * `startTimestamp` and `endTimestamp` are not sent, the recent 30 days' + * data is returned. - You can only view data from the past 6 months. For all C2C orders, check + * `https://c2c.binance.com/en/fiatOrder`. + * + * @throws ApiException if the Api call fails + */ + public void getC2CTradeHistoryExample() throws ApiException, IOException { + TradeType tradeType = TradeType.BUY; + Long startTimestamp = 1770736694138L; + Long endTimestamp = 1770736694138L; + Long page = 1L; + Long rows = 100L; + ApiResponse response = + getApi().getC2CTradeHistory(tradeType, startTimestamp, endTimestamp, page, rows); + System.out.println(response.getData()); + } +} diff --git a/examples/convert/pom.xml b/examples/convert/pom.xml index b37bc3851..7e7ed3c29 100644 --- a/examples/convert/pom.xml +++ b/examples/convert/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-convert - 2.0.0 + 3.0.0 \ No newline at end of file diff --git a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/marketdata/ListAllConvertPairsExample.java b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/marketdata/ListAllConvertPairsExample.java index 8d83cac10..50c9b5bf2 100644 --- a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/marketdata/ListAllConvertPairsExample.java +++ b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/marketdata/ListAllConvertPairsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.convert.rest.ConvertRestApiUtil; import com.binance.connector.client.convert.rest.api.ConvertRestApi; import com.binance.connector.client.convert.rest.model.ListAllConvertPairsResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class ListAllConvertPairsExample { @@ -27,15 +28,16 @@ public ConvertRestApi getApi() { /** * List All Convert Pairs * - *

Query for all convertible token pairs and the tokens’ respective upper/lower limits * User - * needs to supply either or both of the input parameter * If not defined for both fromAsset and - * toAsset, only partial token pairs will be returned Weight: 3000(IP) + *

Query for all convertible token pairs and the tokens’ respective upper/lower limits + * Weight(IP): 3000 Notes: - User needs to supply either or both input parameters. - If only one + * of `fromAsset` and `toAsset` is provided, only partial token pairs are + * returned. * * @throws ApiException if the Api call fails */ - public void listAllConvertPairsExample() throws ApiException { - String fromAsset = ""; - String toAsset = ""; + public void listAllConvertPairsExample() throws ApiException, IOException { + String fromAsset = "BTC"; + String toAsset = "USDT"; ApiResponse response = getApi().listAllConvertPairs(fromAsset, toAsset); System.out.println(response.getData()); diff --git a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/marketdata/QueryOrderQuantityPrecisionPerAssetExample.java b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/marketdata/QueryOrderQuantityPrecisionPerAssetExample.java index d1d60a4c8..2160dbcbe 100644 --- a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/marketdata/QueryOrderQuantityPrecisionPerAssetExample.java +++ b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/marketdata/QueryOrderQuantityPrecisionPerAssetExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.convert.rest.ConvertRestApiUtil; import com.binance.connector.client.convert.rest.api.ConvertRestApi; import com.binance.connector.client.convert.rest.model.QueryOrderQuantityPrecisionPerAssetResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class QueryOrderQuantityPrecisionPerAssetExample { @@ -25,13 +26,13 @@ public ConvertRestApi getApi() { } /** - * Query order quantity precision per asset(USER_DATA) + * Query order quantity precision per asset (USER_DATA) * - *

Query for supported asset’s precision information Weight: 100(IP) + *

Query for supported asset’s precision information Weight(IP): 100 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryOrderQuantityPrecisionPerAssetExample() throws ApiException { + public void queryOrderQuantityPrecisionPerAssetExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().queryOrderQuantityPrecisionPerAsset(recvWindow); diff --git a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/AcceptQuoteExample.java b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/AcceptQuoteExample.java index 16bdb197c..6bd2f4e9c 100644 --- a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/AcceptQuoteExample.java +++ b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/AcceptQuoteExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.convert.rest.api.ConvertRestApi; import com.binance.connector.client.convert.rest.model.AcceptQuoteRequest; import com.binance.connector.client.convert.rest.model.AcceptQuoteResponse; +import java.io.IOException; /** API examples for TradeApi */ public class AcceptQuoteExample { @@ -28,11 +29,11 @@ public ConvertRestApi getApi() { /** * Accept Quote (TRADE) * - *

Accept the offered quote by quote ID. Weight: 500(UID) + *

Accept the offered quote by quote ID. Weight(UID): 500 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void acceptQuoteExample() throws ApiException { + public void acceptQuoteExample() throws ApiException, IOException { AcceptQuoteRequest acceptQuoteRequest = new AcceptQuoteRequest(); acceptQuoteRequest.quoteId("1"); ApiResponse response = getApi().acceptQuote(acceptQuoteRequest); diff --git a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/CancelLimitOrderExample.java b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/CancelLimitOrderExample.java index 9b5fc7b86..a69ab9845 100644 --- a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/CancelLimitOrderExample.java +++ b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/CancelLimitOrderExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.convert.rest.api.ConvertRestApi; import com.binance.connector.client.convert.rest.model.CancelLimitOrderRequest; import com.binance.connector.client.convert.rest.model.CancelLimitOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelLimitOrderExample { @@ -26,15 +27,15 @@ public ConvertRestApi getApi() { } /** - * Cancel limit order (USER_DATA) + * Cancel limit order (TRADE) * - *

Enable users to cancel a limit order Weight: 200(UID) + *

Enable users to cancel a limit order Weight(UID): 200 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void cancelLimitOrderExample() throws ApiException { + public void cancelLimitOrderExample() throws ApiException, IOException { CancelLimitOrderRequest cancelLimitOrderRequest = new CancelLimitOrderRequest(); - cancelLimitOrderRequest.orderId("1"); + cancelLimitOrderRequest.orderId(1603680255057330400L); ApiResponse response = getApi().cancelLimitOrder(cancelLimitOrderRequest); System.out.println(response.getData()); diff --git a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/GetConvertTradeHistoryExample.java b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/GetConvertTradeHistoryExample.java index 87fa7682d..5f19673ca 100644 --- a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/GetConvertTradeHistoryExample.java +++ b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/GetConvertTradeHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.convert.rest.ConvertRestApiUtil; import com.binance.connector.client.convert.rest.api.ConvertRestApi; import com.binance.connector.client.convert.rest.model.GetConvertTradeHistoryResponse; +import java.io.IOException; /** API examples for TradeApi */ public class GetConvertTradeHistoryExample { @@ -25,14 +26,14 @@ public ConvertRestApi getApi() { } /** - * Get Convert Trade History(USER_DATA) + * Get Convert Trade History (USER_DATA) * - *

Get Convert Trade History * The max interval between startTime and endTime is 30 days. - * Weight: 3000 + *

Get Convert Trade History Weight(UID): 3000 Security Type: USER_DATA Notes: - The max + * interval between `startTime` and `endTime` is 30 days. * * @throws ApiException if the Api call fails */ - public void getConvertTradeHistoryExample() throws ApiException { + public void getConvertTradeHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long limit = 100L; diff --git a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/OrderStatusExample.java b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/OrderStatusExample.java index b04f1a387..d1b6e6737 100644 --- a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/OrderStatusExample.java +++ b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/OrderStatusExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.convert.rest.ConvertRestApiUtil; import com.binance.connector.client.convert.rest.api.ConvertRestApi; import com.binance.connector.client.convert.rest.model.OrderStatusResponse; +import java.io.IOException; /** API examples for TradeApi */ public class OrderStatusExample { @@ -25,13 +26,13 @@ public ConvertRestApi getApi() { } /** - * Order status(USER_DATA) + * Order status (USER_DATA) * - *

Query order status by order ID. Weight: 100(UID) + *

Query order status by order ID. Weight(UID): 100 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void orderStatusExample() throws ApiException { + public void orderStatusExample() throws ApiException, IOException { String orderId = "1"; String quoteId = "1"; ApiResponse response = getApi().orderStatus(orderId, quoteId); diff --git a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/PlaceLimitOrderExample.java b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/PlaceLimitOrderExample.java index d98be7e94..dba11d21d 100644 --- a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/PlaceLimitOrderExample.java +++ b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/PlaceLimitOrderExample.java @@ -6,8 +6,11 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.convert.rest.ConvertRestApiUtil; import com.binance.connector.client.convert.rest.api.ConvertRestApi; +import com.binance.connector.client.convert.rest.model.ExpiredType; import com.binance.connector.client.convert.rest.model.PlaceLimitOrderRequest; import com.binance.connector.client.convert.rest.model.PlaceLimitOrderResponse; +import com.binance.connector.client.convert.rest.model.Side; +import java.io.IOException; /** API examples for TradeApi */ public class PlaceLimitOrderExample { @@ -26,22 +29,23 @@ public ConvertRestApi getApi() { } /** - * Place limit order (USER_DATA) + * Place limit order (TRADE) * - *

Enable users to place a limit order * `baseAsset` or `quoteAsset` can - * be determined via `exchangeInfo` endpoint. * Limit price is defined from - * `baseAsset` to `quoteAsset`. * Either `baseAmount` or - * `quoteAmount` is used. Weight: 500(UID) + *

Enable users to place a limit order Weight(UID): 500 Security Type: TRADE Notes: - + * `baseAsset` and `quoteAsset` can be determined via the + * `exchangeInfo` endpoint. - Limit price is defined from `baseAsset` to + * `quoteAsset`. - Exactly one of `baseAmount` or `quoteAmount` + * should be sent. * * @throws ApiException if the Api call fails */ - public void placeLimitOrderExample() throws ApiException { + public void placeLimitOrderExample() throws ApiException, IOException { PlaceLimitOrderRequest placeLimitOrderRequest = new PlaceLimitOrderRequest(); - placeLimitOrderRequest.baseAsset(""); - placeLimitOrderRequest.quoteAsset(""); - placeLimitOrderRequest.limitPrice(1.0d); - placeLimitOrderRequest.side("BUY"); - placeLimitOrderRequest.expiredType(""); + placeLimitOrderRequest.baseAsset("BTC"); + placeLimitOrderRequest.quoteAsset("USDT"); + placeLimitOrderRequest.limitPrice(1d); + placeLimitOrderRequest.side(Side.BUY); + placeLimitOrderRequest.expiredType(ExpiredType.EXPIRED_TYPE_1_D); ApiResponse response = getApi().placeLimitOrder(placeLimitOrderRequest); System.out.println(response.getData()); diff --git a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/QueryLimitOpenOrdersExample.java b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/QueryLimitOpenOrdersExample.java index bd94e01c6..59a18c082 100644 --- a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/QueryLimitOpenOrdersExample.java +++ b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/QueryLimitOpenOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.convert.rest.ConvertRestApiUtil; import com.binance.connector.client.convert.rest.api.ConvertRestApi; import com.binance.connector.client.convert.rest.model.QueryLimitOpenOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryLimitOpenOrdersExample { @@ -27,11 +28,11 @@ public ConvertRestApi getApi() { /** * Query limit open orders (USER_DATA) * - *

Request a quote for the requested token pairs Weight: 3000(UID) + *

Query current open limit orders Weight(UID): 3000 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryLimitOpenOrdersExample() throws ApiException { + public void queryLimitOpenOrdersExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().queryLimitOpenOrders(recvWindow); diff --git a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/SendQuoteRequestExample.java b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/SendQuoteRequestExample.java index bcc33afb6..5e9fd8029 100644 --- a/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/SendQuoteRequestExample.java +++ b/examples/convert/src/main/java/com/binance/connector/client/convert/rest/trade/SendQuoteRequestExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.convert.rest.api.ConvertRestApi; import com.binance.connector.client.convert.rest.model.SendQuoteRequestRequest; import com.binance.connector.client.convert.rest.model.SendQuoteRequestResponse; +import java.io.IOException; /** API examples for TradeApi */ public class SendQuoteRequestExample { @@ -26,18 +27,18 @@ public ConvertRestApi getApi() { } /** - * Send Quote Request(USER_DATA) + * Send Quote Request (TRADE) * - *

Request a quote for the requested token pairs * Either fromAmount or toAmount should be - * sent * `quoteId` will be returned only if you have enough funds to convert Weight: - * 200(UID) + *

Request a quote for the requested token pairs Weight(UID): 200 Security Type: TRADE Notes: + * - Either `fromAmount` or `toAmount` should be sent. - `quoteId` + * is returned only if you have enough funds to convert. * * @throws ApiException if the Api call fails */ - public void sendQuoteRequestExample() throws ApiException { + public void sendQuoteRequestExample() throws ApiException, IOException { SendQuoteRequestRequest sendQuoteRequestRequest = new SendQuoteRequestRequest(); - sendQuoteRequestRequest.fromAsset(""); - sendQuoteRequestRequest.toAsset(""); + sendQuoteRequestRequest.fromAsset("BTC"); + sendQuoteRequestRequest.toAsset("USDT"); ApiResponse response = getApi().sendQuoteRequest(sendQuoteRequestRequest); System.out.println(response.getData()); diff --git a/examples/copy-trading/pom.xml b/examples/copy-trading/pom.xml index da2b0ed9f..e556a4fdd 100644 --- a/examples/copy-trading/pom.xml +++ b/examples/copy-trading/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-copy-trading - 1.2.1 + 2.0.0 \ No newline at end of file diff --git a/examples/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/futurecopytrading/GetFuturesLeadTraderStatusExample.java b/examples/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/futurecopytrading/GetFuturesLeadTraderStatusExample.java index 2370b714b..82ad267f7 100644 --- a/examples/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/futurecopytrading/GetFuturesLeadTraderStatusExample.java +++ b/examples/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/futurecopytrading/GetFuturesLeadTraderStatusExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.copy_trading.rest.CopyTradingRestApiUtil; import com.binance.connector.client.copy_trading.rest.api.CopyTradingRestApi; import com.binance.connector.client.copy_trading.rest.model.GetFuturesLeadTraderStatusResponse; +import java.io.IOException; /** API examples for FutureCopyTradingApi */ public class GetFuturesLeadTraderStatusExample { @@ -26,13 +27,13 @@ public CopyTradingRestApi getApi() { } /** - * Get Futures Lead Trader Status(TRADE) + * Get Futures Lead Trader Status (TRADE) * - *

Get Futures Lead Trader Status Weight: 20 + *

Get Futures Lead Trader Status Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void getFuturesLeadTraderStatusExample() throws ApiException { + public void getFuturesLeadTraderStatusExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getFuturesLeadTraderStatus(recvWindow); diff --git a/examples/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/futurecopytrading/GetFuturesLeadTradingSymbolWhitelistExample.java b/examples/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/futurecopytrading/GetFuturesLeadTradingSymbolWhitelistExample.java index b3b0bf2f5..ef62256f0 100644 --- a/examples/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/futurecopytrading/GetFuturesLeadTradingSymbolWhitelistExample.java +++ b/examples/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/futurecopytrading/GetFuturesLeadTradingSymbolWhitelistExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.copy_trading.rest.CopyTradingRestApiUtil; import com.binance.connector.client.copy_trading.rest.api.CopyTradingRestApi; import com.binance.connector.client.copy_trading.rest.model.GetFuturesLeadTradingSymbolWhitelistResponse; +import java.io.IOException; /** API examples for FutureCopyTradingApi */ public class GetFuturesLeadTradingSymbolWhitelistExample { @@ -26,13 +27,13 @@ public CopyTradingRestApi getApi() { } /** - * Get Futures Lead Trading Symbol Whitelist(USER_DATA) + * Get Futures Lead Trading Symbol Whitelist (USER_DATA) * - *

Get Futures Lead Trading Symbol Whitelist Weight: 20 + *

Get Futures Lead Trading Symbol Whitelist Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getFuturesLeadTradingSymbolWhitelistExample() throws ApiException { + public void getFuturesLeadTradingSymbolWhitelistExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getFuturesLeadTradingSymbolWhitelist(recvWindow); diff --git a/examples/crypto-loan/pom.xml b/examples/crypto-loan/pom.xml index 51ae1baae..91562041e 100644 --- a/examples/crypto-loan/pom.xml +++ b/examples/crypto-loan/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-crypto-loan - 4.0.0 + 5.0.0 \ No newline at end of file diff --git a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/CheckCollateralRepayRateExample.java b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/CheckCollateralRepayRateExample.java index 6ab8fa57c..faafabe02 100644 --- a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/CheckCollateralRepayRateExample.java +++ b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/CheckCollateralRepayRateExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.crypto_loan.rest.CryptoLoanRestApiUtil; import com.binance.connector.client.crypto_loan.rest.api.CryptoLoanRestApi; import com.binance.connector.client.crypto_loan.rest.model.CheckCollateralRepayRateResponse; +import java.io.IOException; /** API examples for FlexibleRateApi */ public class CheckCollateralRepayRateExample { @@ -26,15 +27,16 @@ public CryptoLoanRestApi getApi() { } /** - * Check Collateral Repay Rate (USER_DATA) + * Check Collateral Flexible Repay Rate (USER_DATA) * - *

Weight: 6000 + *

Get the latest rate of collateral coin/loan coin when using collateral repay. Weight(IP): + * 6000 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void checkCollateralRepayRateExample() throws ApiException { - String loanCoin = ""; - String collateralCoin = ""; + public void checkCollateralRepayRateExample() throws ApiException, IOException { + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long recvWindow = 5000L; ApiResponse response = getApi().checkCollateralRepayRate(loanCoin, collateralCoin, recvWindow); diff --git a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanAdjustLtvExample.java b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanAdjustLtvExample.java index f95312470..0e381da86 100644 --- a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanAdjustLtvExample.java +++ b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanAdjustLtvExample.java @@ -6,8 +6,10 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.crypto_loan.rest.CryptoLoanRestApiUtil; import com.binance.connector.client.crypto_loan.rest.api.CryptoLoanRestApi; +import com.binance.connector.client.crypto_loan.rest.model.Direction; import com.binance.connector.client.crypto_loan.rest.model.FlexibleLoanAdjustLtvRequest; import com.binance.connector.client.crypto_loan.rest.model.FlexibleLoanAdjustLtvResponse; +import java.io.IOException; /** API examples for FlexibleRateApi */ public class FlexibleLoanAdjustLtvExample { @@ -27,20 +29,20 @@ public CryptoLoanRestApi getApi() { } /** - * Flexible Loan Adjust LTV(TRADE) + * Flexible Loan Adjust LTV (TRADE) * - *

Flexible Loan Adjust LTV * API Key needs Spot & Margin Trading permission for this - * endpoint Weight: 6000 + *

Flexible Loan Adjust LTV Weight(UID): 6000 Security Type: TRADE Notes: - API key needs + * Spot & Margin Trading permission for this endpoint. * * @throws ApiException if the Api call fails */ - public void flexibleLoanAdjustLtvExample() throws ApiException { + public void flexibleLoanAdjustLtvExample() throws ApiException, IOException { FlexibleLoanAdjustLtvRequest flexibleLoanAdjustLtvRequest = new FlexibleLoanAdjustLtvRequest(); - flexibleLoanAdjustLtvRequest.loanCoin(""); - flexibleLoanAdjustLtvRequest.collateralCoin(""); - flexibleLoanAdjustLtvRequest.adjustmentAmount(1.0d); - flexibleLoanAdjustLtvRequest.direction(""); + flexibleLoanAdjustLtvRequest.loanCoin("BUSD"); + flexibleLoanAdjustLtvRequest.collateralCoin("BNB"); + flexibleLoanAdjustLtvRequest.adjustmentAmount(1d); + flexibleLoanAdjustLtvRequest.direction(Direction.ADDITIONAL); ApiResponse response = getApi().flexibleLoanAdjustLtv(flexibleLoanAdjustLtvRequest); System.out.println(response.getData()); diff --git a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanBorrowExample.java b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanBorrowExample.java index dd31965c9..c9baf2242 100644 --- a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanBorrowExample.java +++ b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanBorrowExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.crypto_loan.rest.api.CryptoLoanRestApi; import com.binance.connector.client.crypto_loan.rest.model.FlexibleLoanBorrowRequest; import com.binance.connector.client.crypto_loan.rest.model.FlexibleLoanBorrowResponse; +import java.io.IOException; /** API examples for FlexibleRateApi */ public class FlexibleLoanBorrowExample { @@ -27,17 +28,18 @@ public CryptoLoanRestApi getApi() { } /** - * Flexible Loan Borrow(TRADE) + * Flexible Loan Borrow (TRADE) * - *

Borrow Flexible Loan * Only available for master account * You can customize LTV by - * entering loanAmount and collateralAmount. Weight: 6000 + *

Borrow Flexible Loan Weight(IP): 6000 Security Type: TRADE Notes: - This endpoint is + * available for both master and sub-accounts. - You can customize LTV by entering + * `loanAmount` and `collateralAmount`. * * @throws ApiException if the Api call fails */ - public void flexibleLoanBorrowExample() throws ApiException { + public void flexibleLoanBorrowExample() throws ApiException, IOException { FlexibleLoanBorrowRequest flexibleLoanBorrowRequest = new FlexibleLoanBorrowRequest(); - flexibleLoanBorrowRequest.loanCoin(""); - flexibleLoanBorrowRequest.collateralCoin(""); + flexibleLoanBorrowRequest.loanCoin("BUSD"); + flexibleLoanBorrowRequest.collateralCoin("BNB"); ApiResponse response = getApi().flexibleLoanBorrow(flexibleLoanBorrowRequest); System.out.println(response.getData()); diff --git a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanRepayExample.java b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanRepayExample.java index f89afd436..16a4e3c00 100644 --- a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanRepayExample.java +++ b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/FlexibleLoanRepayExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.crypto_loan.rest.api.CryptoLoanRestApi; import com.binance.connector.client.crypto_loan.rest.model.FlexibleLoanRepayRequest; import com.binance.connector.client.crypto_loan.rest.model.FlexibleLoanRepayResponse; +import java.io.IOException; /** API examples for FlexibleRateApi */ public class FlexibleLoanRepayExample { @@ -27,18 +28,18 @@ public CryptoLoanRestApi getApi() { } /** - * Flexible Loan Repay(TRADE) + * Flexible Loan Repay (TRADE) * - *

Flexible Loan Repay * repayAmount is mandatory even fullRepayment = FALSE Weight: - * 6000 + *

Flexible Loan Repay Weight(IP): 6000 Security Type: TRADE Notes: - `repayAmount` + * is mandatory even when `fullRepayment = FALSE`. * * @throws ApiException if the Api call fails */ - public void flexibleLoanRepayExample() throws ApiException { + public void flexibleLoanRepayExample() throws ApiException, IOException { FlexibleLoanRepayRequest flexibleLoanRepayRequest = new FlexibleLoanRepayRequest(); - flexibleLoanRepayRequest.loanCoin(""); - flexibleLoanRepayRequest.collateralCoin(""); - flexibleLoanRepayRequest.repayAmount(1.0d); + flexibleLoanRepayRequest.loanCoin("BUSD"); + flexibleLoanRepayRequest.collateralCoin("BNB"); + flexibleLoanRepayRequest.repayAmount(1d); ApiResponse response = getApi().flexibleLoanRepay(flexibleLoanRepayRequest); System.out.println(response.getData()); diff --git a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanAssetsDataExample.java b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanAssetsDataExample.java index 7004695ac..ce509d1bc 100644 --- a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanAssetsDataExample.java +++ b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanAssetsDataExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.crypto_loan.rest.CryptoLoanRestApiUtil; import com.binance.connector.client.crypto_loan.rest.api.CryptoLoanRestApi; import com.binance.connector.client.crypto_loan.rest.model.GetFlexibleLoanAssetsDataResponse; +import java.io.IOException; /** API examples for FlexibleRateApi */ public class GetFlexibleLoanAssetsDataExample { @@ -26,15 +27,15 @@ public CryptoLoanRestApi getApi() { } /** - * Get Flexible Loan Assets Data(USER_DATA) + * Get Flexible Loan Assets Data (USER_DATA) * *

Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown - * in USD value. Weight: 400 + * in USD value. Weight(IP): 400 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getFlexibleLoanAssetsDataExample() throws ApiException { - String loanCoin = ""; + public void getFlexibleLoanAssetsDataExample() throws ApiException, IOException { + String loanCoin = "BUSD"; Long recvWindow = 5000L; ApiResponse response = getApi().getFlexibleLoanAssetsData(loanCoin, recvWindow); diff --git a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanBorrowHistoryExample.java b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanBorrowHistoryExample.java index a7c27b704..c8c8668c8 100644 --- a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanBorrowHistoryExample.java +++ b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanBorrowHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.crypto_loan.rest.CryptoLoanRestApiUtil; import com.binance.connector.client.crypto_loan.rest.api.CryptoLoanRestApi; import com.binance.connector.client.crypto_loan.rest.model.GetFlexibleLoanBorrowHistoryResponse; +import java.io.IOException; /** API examples for FlexibleRateApi */ public class GetFlexibleLoanBorrowHistoryExample { @@ -26,17 +27,18 @@ public CryptoLoanRestApi getApi() { } /** - * Get Flexible Loan Borrow History(USER_DATA) + * Get Flexible Loan Borrow History (USER_DATA) * - *

Get Flexible Loan Borrow History * If startTime and endTime are not sent, the recent - * 90-day data will be returned. * The max interval between startTime and endTime is 180 days. - * Weight: 400 + *

Get Flexible Loan Borrow History. It can be used to check history before 2024-02-27 08:00. + * Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and + * `endTime` are not sent, the recent 90-day data is returned. - The max interval + * between `startTime` and `endTime` is 180 days. * * @throws ApiException if the Api call fails */ - public void getFlexibleLoanBorrowHistoryExample() throws ApiException { - String loanCoin = ""; - String collateralCoin = ""; + public void getFlexibleLoanBorrowHistoryExample() throws ApiException, IOException { + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanCollateralAssetsDataExample.java b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanCollateralAssetsDataExample.java index d01bdaf88..3b71887b6 100644 --- a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanCollateralAssetsDataExample.java +++ b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanCollateralAssetsDataExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.crypto_loan.rest.CryptoLoanRestApiUtil; import com.binance.connector.client.crypto_loan.rest.api.CryptoLoanRestApi; import com.binance.connector.client.crypto_loan.rest.model.GetFlexibleLoanCollateralAssetsDataResponse; +import java.io.IOException; /** API examples for FlexibleRateApi */ public class GetFlexibleLoanCollateralAssetsDataExample { @@ -26,15 +27,15 @@ public CryptoLoanRestApi getApi() { } /** - * Get Flexible Loan Collateral Assets Data(USER_DATA) + * Get Flexible Loan Collateral Assets Data (USER_DATA) * *

Get LTV information and collateral limit of flexible loan's collateral assets. The - * collateral limit is shown in USD value. Weight: 400 + * collateral limit is shown in USD value. Weight(IP): 400 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getFlexibleLoanCollateralAssetsDataExample() throws ApiException { - String collateralCoin = ""; + public void getFlexibleLoanCollateralAssetsDataExample() throws ApiException, IOException { + String collateralCoin = "BNB"; Long recvWindow = 5000L; ApiResponse response = getApi().getFlexibleLoanCollateralAssetsData(collateralCoin, recvWindow); diff --git a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanInterestRateHistoryExample.java b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanInterestRateHistoryExample.java index 25f5899ab..ac9d55f10 100644 --- a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanInterestRateHistoryExample.java +++ b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanInterestRateHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.crypto_loan.rest.CryptoLoanRestApiUtil; import com.binance.connector.client.crypto_loan.rest.api.CryptoLoanRestApi; import com.binance.connector.client.crypto_loan.rest.model.GetFlexibleLoanInterestRateHistoryResponse; +import java.io.IOException; /** API examples for FlexibleRateApi */ public class GetFlexibleLoanInterestRateHistoryExample { @@ -28,14 +29,15 @@ public CryptoLoanRestApi getApi() { /** * Get Flexible Loan Interest Rate History (USER_DATA) * - *

Check Flexible Loan interest rate history * If startTime and endTime are not sent, the - * recent 90-day data will be returned * The max interval between startTime and endTime is 90 - * days. * Time based on UTC+0. Weight: 400 + *

Check Flexible Loan interest rate history Weight(IP): 400 Security Type: USER_DATA Notes: + * - If `startTime` and `endTime` are not sent, the recent 90-day data is + * returned. - The max interval between `startTime` and `endTime` is 90 + * days. - Time is based on UTC+0. * * @throws ApiException if the Api call fails */ - public void getFlexibleLoanInterestRateHistoryExample() throws ApiException { - String coin = ""; + public void getFlexibleLoanInterestRateHistoryExample() throws ApiException, IOException { + String coin = "USDT"; Long recvWindow = 5000L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; diff --git a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanLiquidationHistoryExample.java b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanLiquidationHistoryExample.java index a80cc0669..24f60b4af 100644 --- a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanLiquidationHistoryExample.java +++ b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanLiquidationHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.crypto_loan.rest.CryptoLoanRestApiUtil; import com.binance.connector.client.crypto_loan.rest.api.CryptoLoanRestApi; import com.binance.connector.client.crypto_loan.rest.model.GetFlexibleLoanLiquidationHistoryResponse; +import java.io.IOException; /** API examples for FlexibleRateApi */ public class GetFlexibleLoanLiquidationHistoryExample { @@ -28,13 +29,13 @@ public CryptoLoanRestApi getApi() { /** * Get Flexible Loan Liquidation History (USER_DATA) * - *

Weight: 400 + *

Get Flexible Loan Liquidation History Weight(IP): 400 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getFlexibleLoanLiquidationHistoryExample() throws ApiException { - String loanCoin = ""; - String collateralCoin = ""; + public void getFlexibleLoanLiquidationHistoryExample() throws ApiException, IOException { + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanLtvAdjustmentHistoryExample.java b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanLtvAdjustmentHistoryExample.java index 6c7662a43..862166846 100644 --- a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanLtvAdjustmentHistoryExample.java +++ b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanLtvAdjustmentHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.crypto_loan.rest.CryptoLoanRestApiUtil; import com.binance.connector.client.crypto_loan.rest.api.CryptoLoanRestApi; import com.binance.connector.client.crypto_loan.rest.model.GetFlexibleLoanLtvAdjustmentHistoryResponse; +import java.io.IOException; /** API examples for FlexibleRateApi */ public class GetFlexibleLoanLtvAdjustmentHistoryExample { @@ -26,17 +27,18 @@ public CryptoLoanRestApi getApi() { } /** - * Get Flexible Loan LTV Adjustment History(USER_DATA) + * Get Flexible Loan LTV Adjustment History (USER_DATA) * - *

Get Flexible Loan LTV Adjustment History * If startTime and endTime are not sent, the - * recent 90-day data will be returned. * The max interval between startTime and endTime is 180 - * days. Weight: 400 + *

Get Flexible Loan LTV Adjustment History. It can be used to check history before + * 2024-02-27 08:00. Weight(UID): 400 Security Type: USER_DATA Notes: - If `startTime` + * and `endTime` are not sent, the recent 90-day data is returned. - The max interval + * between `startTime` and `endTime` is 180 days. * * @throws ApiException if the Api call fails */ - public void getFlexibleLoanLtvAdjustmentHistoryExample() throws ApiException { - String loanCoin = ""; - String collateralCoin = ""; + public void getFlexibleLoanLtvAdjustmentHistoryExample() throws ApiException, IOException { + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanOngoingOrdersExample.java b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanOngoingOrdersExample.java index 082df63a7..6efe6b263 100644 --- a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanOngoingOrdersExample.java +++ b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanOngoingOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.crypto_loan.rest.CryptoLoanRestApiUtil; import com.binance.connector.client.crypto_loan.rest.api.CryptoLoanRestApi; import com.binance.connector.client.crypto_loan.rest.model.GetFlexibleLoanOngoingOrdersResponse; +import java.io.IOException; /** API examples for FlexibleRateApi */ public class GetFlexibleLoanOngoingOrdersExample { @@ -26,15 +27,15 @@ public CryptoLoanRestApi getApi() { } /** - * Get Flexible Loan Ongoing Orders(USER_DATA) + * Get Flexible Loan Ongoing Orders (USER_DATA) * - *

Get Flexible Loan Ongoing Orders Weight: 300 + *

Get Flexible Loan Ongoing Orders Weight(IP): 300 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getFlexibleLoanOngoingOrdersExample() throws ApiException { - String loanCoin = ""; - String collateralCoin = ""; + public void getFlexibleLoanOngoingOrdersExample() throws ApiException, IOException { + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long current = 1L; Long limit = 10L; Long recvWindow = 5000L; diff --git a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanRepaymentHistoryExample.java b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanRepaymentHistoryExample.java index 2ff899ced..1c797ed2c 100644 --- a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanRepaymentHistoryExample.java +++ b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/flexiblerate/GetFlexibleLoanRepaymentHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.crypto_loan.rest.CryptoLoanRestApiUtil; import com.binance.connector.client.crypto_loan.rest.api.CryptoLoanRestApi; import com.binance.connector.client.crypto_loan.rest.model.GetFlexibleLoanRepaymentHistoryResponse; +import java.io.IOException; /** API examples for FlexibleRateApi */ public class GetFlexibleLoanRepaymentHistoryExample { @@ -26,17 +27,18 @@ public CryptoLoanRestApi getApi() { } /** - * Get Flexible Loan Repayment History(USER_DATA) + * Get Flexible Loan Repayment History (USER_DATA) * - *

Get Flexible Loan Repayment History * If startTime and endTime are not sent, the recent - * 90-day data will be returned. * The max interval between startTime and endTime is 180 days. - * Weight: 400 + *

Get Flexible Loan Repayment History. It can be used to check history before 2024-02-27 + * 08:00. Weight(IP): 400 Security Type: USER_DATA Notes: - If `startTime` and + * `endTime` are not sent, the recent 90-day data is returned. - The max interval + * between `startTime` and `endTime` is 180 days. * * @throws ApiException if the Api call fails */ - public void getFlexibleLoanRepaymentHistoryExample() throws ApiException { - String loanCoin = ""; - String collateralCoin = ""; + public void getFlexibleLoanRepaymentHistoryExample() throws ApiException, IOException { + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/CheckCollateralRepayRateStableRateExample.java b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/CheckCollateralRepayRateStableRateExample.java deleted file mode 100644 index 1d3975dbe..000000000 --- a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/CheckCollateralRepayRateStableRateExample.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.binance.connector.client.crypto_loan.rest.stablerate; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; -import com.binance.connector.client.crypto_loan.rest.CryptoLoanRestApiUtil; -import com.binance.connector.client.crypto_loan.rest.api.CryptoLoanRestApi; -import com.binance.connector.client.crypto_loan.rest.model.CheckCollateralRepayRateStableRateResponse; - -/** API examples for StableRateApi */ -public class CheckCollateralRepayRateStableRateExample { - private CryptoLoanRestApi api; - - public CryptoLoanRestApi getApi() { - if (api == null) { - ClientConfiguration clientConfiguration = - CryptoLoanRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - api = new CryptoLoanRestApi(clientConfiguration); - } - return api; - } - - /** - * Check Collateral Repay Rate(USER_DATA) - * - *

Get the the rate of collateral coin / loan coin when using collateral repay, the rate will - * be valid within 8 second. Weight: 6000 - * - * @throws ApiException if the Api call fails - */ - public void checkCollateralRepayRateStableRateExample() throws ApiException { - String loanCoin = ""; - String collateralCoin = ""; - Double repayAmount = 1.0d; - Long recvWindow = 5000L; - ApiResponse response = - getApi().checkCollateralRepayRateStableRate( - loanCoin, collateralCoin, repayAmount, recvWindow); - System.out.println(response.getData()); - } -} diff --git a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetCryptoLoansIncomeHistoryExample.java b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetCryptoLoansIncomeHistoryExample.java index 8b6cc8abb..21917f7f2 100644 --- a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetCryptoLoansIncomeHistoryExample.java +++ b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetCryptoLoansIncomeHistoryExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.crypto_loan.rest.CryptoLoanRestApiUtil; import com.binance.connector.client.crypto_loan.rest.api.CryptoLoanRestApi; import com.binance.connector.client.crypto_loan.rest.model.GetCryptoLoansIncomeHistoryResponse; +import com.binance.connector.client.crypto_loan.rest.model.OrderType; +import java.io.IOException; /** API examples for StableRateApi */ public class GetCryptoLoansIncomeHistoryExample { @@ -26,17 +28,18 @@ public CryptoLoanRestApi getApi() { } /** - * Get Crypto Loans Income History(USER_DATA) + * Get Crypto Loans Income History (USER_DATA) * - *

Get Crypto Loans Income History * If startTime and endTime are not sent, the recent 7-day - * data will be returned. * The max interval between startTime and endTime is 30 days. Weight: - * 6000 + *

Get Crypto Loans Income History Weight(UID): 6000 Security Type: USER_DATA Notes: - If + * `startTime` and `endTime` are both omitted, the most recent 7 days of + * data are returned. - The maximum interval between `startTime` and + * `endTime` is 30 days. * * @throws ApiException if the Api call fails */ - public void getCryptoLoansIncomeHistoryExample() throws ApiException { - String asset = ""; - String type = "0"; + public void getCryptoLoansIncomeHistoryExample() throws ApiException, IOException { + String asset = "BUSD"; + OrderType type = OrderType.borrowIn; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long limit = 10L; diff --git a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanBorrowHistoryExample.java b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanBorrowHistoryExample.java index 1427556b1..ab8d635d9 100644 --- a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanBorrowHistoryExample.java +++ b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanBorrowHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.crypto_loan.rest.CryptoLoanRestApiUtil; import com.binance.connector.client.crypto_loan.rest.api.CryptoLoanRestApi; import com.binance.connector.client.crypto_loan.rest.model.GetLoanBorrowHistoryResponse; +import java.io.IOException; /** API examples for StableRateApi */ public class GetLoanBorrowHistoryExample { @@ -26,17 +27,19 @@ public CryptoLoanRestApi getApi() { } /** - * Get Loan Borrow History(USER_DATA) + * Get Loan Borrow History (USER_DATA) * - *

Get Loan Borrow History * If startTime and endTime are not sent, the recent 90-day data - * will be returned. * The max interval between startTime and endTime is 180 days. Weight: 400 + *

Get Loan Borrow History Weight(IP): 400 Security Type: USER_DATA Notes: - If + * `startTime` and `endTime` are not sent, the recent 90-day data is + * returned. - The max interval between `startTime` and `endTime` is 180 + * days. * * @throws ApiException if the Api call fails */ - public void getLoanBorrowHistoryExample() throws ApiException { + public void getLoanBorrowHistoryExample() throws ApiException, IOException { Long orderId = 1L; - String loanCoin = ""; - String collateralCoin = ""; + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanLtvAdjustmentHistoryExample.java b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanLtvAdjustmentHistoryExample.java index 4d4de3f5b..320750a83 100644 --- a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanLtvAdjustmentHistoryExample.java +++ b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanLtvAdjustmentHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.crypto_loan.rest.CryptoLoanRestApiUtil; import com.binance.connector.client.crypto_loan.rest.api.CryptoLoanRestApi; import com.binance.connector.client.crypto_loan.rest.model.GetLoanLtvAdjustmentHistoryResponse; +import java.io.IOException; /** API examples for StableRateApi */ public class GetLoanLtvAdjustmentHistoryExample { @@ -26,18 +27,19 @@ public CryptoLoanRestApi getApi() { } /** - * Get Loan LTV Adjustment History(USER_DATA) + * Get Loan LTV Adjustment History (USER_DATA) * - *

Get Loan LTV Adjustment History * If startTime and endTime are not sent, the recent 90-day - * data will be returned. * The max interval between startTime and endTime is 180 days. Weight: - * 400 + *

Get Loan LTV Adjustment History Weight(IP): 400 Security Type: USER_DATA Notes: - If + * `startTime` and `endTime` are not sent, the recent 90-day data is + * returned. - The max interval between `startTime` and `endTime` is 180 + * days. * * @throws ApiException if the Api call fails */ - public void getLoanLtvAdjustmentHistoryExample() throws ApiException { + public void getLoanLtvAdjustmentHistoryExample() throws ApiException, IOException { Long orderId = 1L; - String loanCoin = ""; - String collateralCoin = ""; + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanRepaymentHistoryExample.java b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanRepaymentHistoryExample.java index b06e65ce5..8d300e539 100644 --- a/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanRepaymentHistoryExample.java +++ b/examples/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/stablerate/GetLoanRepaymentHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.crypto_loan.rest.CryptoLoanRestApiUtil; import com.binance.connector.client.crypto_loan.rest.api.CryptoLoanRestApi; import com.binance.connector.client.crypto_loan.rest.model.GetLoanRepaymentHistoryResponse; +import java.io.IOException; /** API examples for StableRateApi */ public class GetLoanRepaymentHistoryExample { @@ -26,17 +27,19 @@ public CryptoLoanRestApi getApi() { } /** - * Get Loan Repayment History(USER_DATA) + * Get Loan Repayment History (USER_DATA) * - *

Get Loan Repayment History * If startTime and endTime are not sent, the recent 90-day data - * will be returned. * The max interval between startTime and endTime is 180 days. Weight: 400 + *

Get Loan Repayment History Weight(IP): 400 Security Type: USER_DATA Notes: - If + * `startTime` and `endTime` are not sent, the recent 90-day data is + * returned. - The max interval between `startTime` and `endTime` is 180 + * days. * * @throws ApiException if the Api call fails */ - public void getLoanRepaymentHistoryExample() throws ApiException { + public void getLoanRepaymentHistoryExample() throws ApiException, IOException { Long orderId = 1L; - String loanCoin = ""; - String collateralCoin = ""; + String loanCoin = "BUSD"; + String collateralCoin = "BNB"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/derivatives-trading-coin-futures/pom.xml b/examples/derivatives-trading-coin-futures/pom.xml index dae0c09e0..7ef846f46 100644 --- a/examples/derivatives-trading-coin-futures/pom.xml +++ b/examples/derivatives-trading-coin-futures/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-derivatives-trading-coin-futures - 7.1.1 + 8.0.0 \ No newline at end of file diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/AccountInformationExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/AccountInformationExample.java index aa620ff0e..8a4cc5573 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/AccountInformationExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/AccountInformationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.AccountInformationResponse; +import java.io.IOException; /** API examples for AccountApi */ public class AccountInformationExample { @@ -28,14 +29,14 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Account Information (USER_DATA) * - *

Get current account information. * for One-way Mode user, the \"positions\" will - * only show the \"BOTH\" positions * for Hedge Mode user, the \"positions\" - * will show \"BOTH\", \"LONG\", and \"SHORT\" positions. Weight: - * 5 + *

Get current account information. Weight(IP): 5 Security Type: USER_DATA Notes: - for + * One-way Mode user, the \"positions\" will only show the \"BOTH\" + * positions - for Hedge Mode user, the \"positions\" will show \"BOTH\", + * \"LONG\", and \"SHORT\" positions. * * @throws ApiException if the Api call fails */ - public void accountInformationExample() throws ApiException { + public void accountInformationExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().accountInformation(recvWindow); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/FuturesAccountBalanceExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/FuturesAccountBalanceExample.java index f7186ff93..bbb42f726 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/FuturesAccountBalanceExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/FuturesAccountBalanceExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.FuturesAccountBalanceResponse; +import java.io.IOException; /** API examples for AccountApi */ public class FuturesAccountBalanceExample { @@ -28,11 +29,11 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Futures Account Balance (USER_DATA) * - *

Check futures account balance Weight: 1 + *

Check futures account balance Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void futuresAccountBalanceExample() throws ApiException { + public void futuresAccountBalanceExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().futuresAccountBalance(recvWindow); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetCurrentPositionModeExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetCurrentPositionModeExample.java index ee2dbbb4b..ee13d433b 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetCurrentPositionModeExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetCurrentPositionModeExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetCurrentPositionModeResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetCurrentPositionModeExample { @@ -26,14 +27,14 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Get Current Position Mode(USER_DATA) + * Get Current Position Mode (USER_DATA) * - *

Get user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol*** Weight: - * 30 + *

Get user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol*** + * Weight(IP): 30 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getCurrentPositionModeExample() throws ApiException { + public void getCurrentPositionModeExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getCurrentPositionMode(recvWindow); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesOrderHistoryExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesOrderHistoryExample.java index 0247ef5d9..9b5954f74 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesOrderHistoryExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesOrderHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetDownloadIdForFuturesOrderHistoryResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetDownloadIdForFuturesOrderHistoryExample { @@ -28,13 +29,15 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Get Download Id For Futures Order History (USER_DATA) * - *

Get Download Id For Futures Order History * Request Limitation is 10 times per month, - * shared by front end download page and rest api * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 5 + *

Get Download Id For Futures Order History Weight(IP): 1000 Security Type: USER_DATA Notes: + * - Request Limitation is 8 times per month, shared by front end download page and rest api - + * This endpoint uses the IP rate limit bucket and costs 1000 weight per call. The maximum is 2 + * calls per minute; the 3rd call within the same minute will trigger a ban. - The time between + * `startTime` and `endTime` can not be longer than 1 year * * @throws ApiException if the Api call fails */ - public void getDownloadIdForFuturesOrderHistoryExample() throws ApiException { + public void getDownloadIdForFuturesOrderHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesTradeHistoryExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesTradeHistoryExample.java index f7a2bffcb..1827d8467 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesTradeHistoryExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesTradeHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetDownloadIdForFuturesTradeHistoryResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetDownloadIdForFuturesTradeHistoryExample { @@ -28,13 +29,15 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Get Download Id For Futures Trade History (USER_DATA) * - *

Get download id for futures trade history * Request Limitation is 5 times per month, - * shared by front end download page and rest api * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 5 + *

Get download id for futures trade history Weight(IP): 1000 Security Type: USER_DATA Notes: + * - Request Limitation is 8 times per month, shared by front end download page and rest api - + * This endpoint uses the IP rate limit bucket and costs 1000 weight per call. The maximum is 2 + * calls per minute; the 3rd call within the same minute will trigger a ban. - The time between + * `startTime` and `endTime` can not be longer than 1 year * * @throws ApiException if the Api call fails */ - public void getDownloadIdForFuturesTradeHistoryExample() throws ApiException { + public void getDownloadIdForFuturesTradeHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesTransactionHistoryExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesTransactionHistoryExample.java index f3eb13685..44e4596b6 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesTransactionHistoryExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetDownloadIdForFuturesTransactionHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetDownloadIdForFuturesTransactionHistoryResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetDownloadIdForFuturesTransactionHistoryExample { @@ -26,15 +27,18 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Get Download Id For Futures Transaction History(USER_DATA) + * Get Download Id For Futures Transaction History (USER_DATA) * - *

Get download id for futures transaction history * Request Limitation is 5 times per month, - * shared by front end download page and rest api * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 5 + *

Get download id for futures transaction history Weight(IP): 1000 Security Type: USER_DATA + * Notes: - Request Limitation is 8 times per month, shared by front end download page and rest + * api - This endpoint uses the IP rate limit bucket and costs 1000 weight per call. The maximum + * is 2 calls per minute; the 3rd call within the same minute will trigger a ban. - The time + * between `startTime` and `endTime` can not be longer than 1 year * * @throws ApiException if the Api call fails */ - public void getDownloadIdForFuturesTransactionHistoryExample() throws ApiException { + public void getDownloadIdForFuturesTransactionHistoryExample() + throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesOrderHistoryDownloadLinkByIdExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesOrderHistoryDownloadLinkByIdExample.java index d98b76c79..9e062a189 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesOrderHistoryDownloadLinkByIdExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesOrderHistoryDownloadLinkByIdExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetFuturesOrderHistoryDownloadLinkByIdResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetFuturesOrderHistoryDownloadLinkByIdExample { @@ -28,12 +29,13 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Get Futures Order History Download Link by Id (USER_DATA) * - *

Get futures order history download link by Id * Download link expiration: 24h Weight: 5 + *

Get futures order history download link by Id Weight(IP): 5 Security Type: USER_DATA + * Notes: - Download link expiration: 7 days * * @throws ApiException if the Api call fails */ - public void getFuturesOrderHistoryDownloadLinkByIdExample() throws ApiException { - String downloadId = "1"; + public void getFuturesOrderHistoryDownloadLinkByIdExample() throws ApiException, IOException { + String downloadId = "545923594199212032"; Long recvWindow = 5000L; ApiResponse response = getApi().getFuturesOrderHistoryDownloadLinkById(downloadId, recvWindow); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesTradeDownloadLinkByIdExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesTradeDownloadLinkByIdExample.java index a928001b8..7babfa2f6 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesTradeDownloadLinkByIdExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesTradeDownloadLinkByIdExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetFuturesTradeDownloadLinkByIdResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetFuturesTradeDownloadLinkByIdExample { @@ -26,14 +27,15 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Get Futures Trade Download Link by Id(USER_DATA) + * Get Futures Trade Download Link by Id (USER_DATA) * - *

Get futures trade download link by Id * Download link expiration: 24h Weight: 5 + *

Get futures trade download link by Id Weight(IP): 5 Security Type: USER_DATA Notes: - + * Download link expiration: 7 days * * @throws ApiException if the Api call fails */ - public void getFuturesTradeDownloadLinkByIdExample() throws ApiException { - String downloadId = "1"; + public void getFuturesTradeDownloadLinkByIdExample() throws ApiException, IOException { + String downloadId = "545923594199212032"; Long recvWindow = 5000L; ApiResponse response = getApi().getFuturesTradeDownloadLinkById(downloadId, recvWindow); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesTransactionHistoryDownloadLinkByIdExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesTransactionHistoryDownloadLinkByIdExample.java index ea785e4cd..f14deaff1 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesTransactionHistoryDownloadLinkByIdExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetFuturesTransactionHistoryDownloadLinkByIdExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetFuturesTransactionHistoryDownloadLinkByIdResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetFuturesTransactionHistoryDownloadLinkByIdExample { @@ -28,13 +29,14 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Get Futures Transaction History Download Link by Id (USER_DATA) * - *

Get futures transaction history download link by Id * Download link expiration: 24h - * Weight: 5 + *

Get futures transaction history download link by Id Weight(IP): 5 Security Type: USER_DATA + * Notes: - Download link expiration: 7 days * * @throws ApiException if the Api call fails */ - public void getFuturesTransactionHistoryDownloadLinkByIdExample() throws ApiException { - String downloadId = "1"; + public void getFuturesTransactionHistoryDownloadLinkByIdExample() + throws ApiException, IOException { + String downloadId = "545923594199212032"; Long recvWindow = 5000L; ApiResponse response = getApi().getFuturesTransactionHistoryDownloadLinkById(downloadId, recvWindow); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetIncomeHistoryExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetIncomeHistoryExample.java index bf976107c..3c3882a6c 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetIncomeHistoryExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/GetIncomeHistoryExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetIncomeHistoryResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.IncomeType; +import java.io.IOException; /** API examples for AccountApi */ public class GetIncomeHistoryExample { @@ -26,22 +28,22 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Get Income History(USER_DATA) + * Get Income History (USER_DATA) * - *

Get income history * If `incomeType ` is not sent, all kinds of flow will be - * returned * \"trandId\" is unique in the same \"incomeType\" for a user * - * The time between `startTime` and `endTime` can not be longer than 1 year - * Weight: 20 + *

Get income history Weight(IP): 20 Security Type: USER_DATA Notes: - If `incomeType + * ` is not sent, all kinds of flow will be returned - \"trandId\" is unique in + * the same \"incomeType\" for a user - The time between `startTime` and + * `endTime` can not be longer than 1 year * * @throws ApiException if the Api call fails */ - public void getIncomeHistoryExample() throws ApiException { - String symbol = ""; - String incomeType = ""; + public void getIncomeHistoryExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + IncomeType incomeType = IncomeType.TRANSFER; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long page = 0L; - Long limit = 100L; + Long page = 1L; + Long limit = 30L; Long recvWindow = 5000L; ApiResponse response = getApi().getIncomeHistory( diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/NotionalBracketForPairExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/NotionalBracketForPairExample.java index 28f70bb5e..92ab98e63 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/NotionalBracketForPairExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/NotionalBracketForPairExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.NotionalBracketForPairResponse; +import java.io.IOException; /** API examples for AccountApi */ public class NotionalBracketForPairExample { @@ -26,18 +27,18 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Notional Bracket for Pair(USER_DATA) + * Notional Bracket for Pair (USER_DATA) * *

**Not recommended to continue using this v1 endpoint** Get the pair's default notional * bracket list, may return ambiguous values when there have been multiple different * `symbol` brackets under the `pair`, suggest using the following `GET * /dapi/v2/leverageBracket` query instead to get the specific `symbol` notional - * bracket list. Weight: 1 + * bracket list. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void notionalBracketForPairExample() throws ApiException { - String pair = ""; + public void notionalBracketForPairExample() throws ApiException, IOException { + String pair = "BTCUSD"; Long recvWindow = 5000L; ApiResponse response = getApi().notionalBracketForPair(pair, recvWindow); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/NotionalBracketForSymbolExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/NotionalBracketForSymbolExample.java index 8aed0ee31..2e62b6d5b 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/NotionalBracketForSymbolExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/NotionalBracketForSymbolExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.NotionalBracketForSymbolResponse; +import java.io.IOException; /** API examples for AccountApi */ public class NotionalBracketForSymbolExample { @@ -26,14 +27,15 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Notional Bracket for Symbol(USER_DATA) + * Notional Bracket for Symbol (USER_DATA) * - *

Get the symbol's notional bracket list. Weight: 1 + *

Get the symbol's notional bracket list. Weight: 1 (after CM migration: 1 with + * `symbol` / 2 without `symbol`) Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void notionalBracketForSymbolExample() throws ApiException { - String symbol = ""; + public void notionalBracketForSymbolExample() throws ApiException, IOException { + String symbol = "BTCUSD_PERP"; Long recvWindow = 5000L; ApiResponse response = getApi().notionalBracketForSymbol(symbol, recvWindow); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/UserCommissionRateExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/UserCommissionRateExample.java index 9d5e9f5e4..6c6aa5416 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/UserCommissionRateExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/account/UserCommissionRateExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.UserCommissionRateResponse; +import java.io.IOException; /** API examples for AccountApi */ public class UserCommissionRateExample { @@ -28,12 +29,12 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * User Commission Rate (USER_DATA) * - *

Query user commission rate Weight: 20 + *

Query user commission rate Weight(IP): 20 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void userCommissionRateExample() throws ApiException { - String symbol = ""; + public void userCommissionRateExample() throws ApiException, IOException { + String symbol = "BTCUSD_PERP"; Long recvWindow = 5000L; ApiResponse response = getApi().userCommissionRate(symbol, recvWindow); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/BasisExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/BasisExample.java index 429c03180..5e0ff196a 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/BasisExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/BasisExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.BasisResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ContractType; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Period; +import java.io.IOException; /** API examples for MarketDataApi */ public class BasisExample { @@ -30,16 +31,16 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Basis * - *

Query basis * If startTime and endTime are not sent, the most recent data is returned. * - * Only the data of the latest 30 days is available. Weight: 1 + *

Query basis Weight(IP): 1 Notes: - If startTime and endTime are not sent, the most recent + * data is returned. - Only the data of the latest 30 days is available. * * @throws ApiException if the Api call fails */ - public void basisExample() throws ApiException { + public void basisExample() throws ApiException, IOException { String pair = ""; - ContractType contractType = ContractType.PERPETUAL; + ContractType contractType = ContractType.ALL; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 30L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/CheckServerTimeExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/CheckServerTimeExample.java index e3d6349dd..bdf74e7e4 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/CheckServerTimeExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/CheckServerTimeExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.CheckServerTimeResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class CheckServerTimeExample { @@ -28,11 +29,11 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Check Server time * - *

Test connectivity to the Rest API and get the current server time. Weight: 1 + *

Test connectivity to the Rest API and get the current server time. Weight(IP): 1 * * @throws ApiException if the Api call fails */ - public void checkServerTimeExample() throws ApiException { + public void checkServerTimeExample() throws ApiException, IOException { ApiResponse response = getApi().checkServerTime(); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/CompressedAggregateTradesListExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/CompressedAggregateTradesListExample.java index 5f52a28ac..617afa355 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/CompressedAggregateTradesListExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/CompressedAggregateTradesListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.CompressedAggregateTradesListResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class CompressedAggregateTradesListExample { @@ -29,24 +30,24 @@ public DerivativesTradingCoinFuturesRestApi getApi() { * Compressed/Aggregate Trades List * *

Get compressed, aggregate trades. Market trades that fill in 100ms with the same price and - * the same taking side will have the quantity aggregated. * support querying futures trade - * histories that are not older than one year * If both `startTime` and - * `endTime` are sent, time between `startTime` and `endTime` must - * be less than 1 hour. * If `fromId`, `startTime`, and `endTime` - * are not sent, the most recent aggregate trades will be returned. * Only market trades will be - * aggregated and returned, which means the insurance fund trades and ADL trades won't be - * aggregated. * Sending both `startTime`/`endTime` and `fromId` - * might cause response timeout, please send either `fromId` or - * `startTime`/`endTime` Weight: 20 + * the same taking side will have the quantity aggregated. Weight(IP): 20 Notes: - support + * querying futures trade histories that are not older than 24 hours - If both + * `startTime` and `endTime` are sent, time between `startTime` + * and `endTime` must be less than 1 hour. - If `fromId`, + * `startTime`, and `endTime` are not sent, the most recent aggregate trades + * will be returned. - Only market trades will be aggregated and returned, which means the + * insurance fund trades and ADL trades won't be aggregated. - Sending both + * `startTime`/`endTime` and `fromId` might cause response + * timeout, please send either `fromId` or `startTime`/`endTime` * * @throws ApiException if the Api call fails */ - public void compressedAggregateTradesListExample() throws ApiException { + public void compressedAggregateTradesListExample() throws ApiException, IOException { String symbol = ""; Long fromId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; ApiResponse response = getApi().compressedAggregateTradesList(symbol, fromId, startTime, endTime, limit); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/ContinuousContractKlineCandlestickDataExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/ContinuousContractKlineCandlestickDataExample.java index 23a14d231..9e36d032d 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/ContinuousContractKlineCandlestickDataExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/ContinuousContractKlineCandlestickDataExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ContinuousContractKlineCandlestickDataResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ContractType; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Interval; +import java.io.IOException; /** API examples for MarketDataApi */ public class ContinuousContractKlineCandlestickDataExample { @@ -31,26 +32,26 @@ public DerivativesTradingCoinFuturesRestApi getApi() { * Continuous Contract Kline/Candlestick Data * *

Kline/candlestick bars for a specific contract type. Klines are uniquely identified by - * their open time. * Contract type: * PERPETUAL * CURRENT_QUARTER * NEXT_QUARTER 1000 | 10 * - * The difference between `startTime` and `endTime` can only be up to 200 - * days * Between `startTime` and `endTime`, the most recent - * `limit` data from `endTime` will be returned: * If `startTime` - * and `endTime` are not sent, current timestamp will be set as `endTime`, - * and the most recent data will be returned. * If `startTime` is sent only, the - * timestamp of 200 days after `startTime` will be set as `endTime`(up to - * the current time) * If `endTime` is sent only, the timestamp of 200 days before - * `endTime` will be set as `startTime` Weight: based on parameter LIMIT - * LIMIT | weight ---|--- [1,100) | 1 [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 + * their open time. Weight: based on parameter `LIMIT` | LIMIT | weight | | --- | --- + * | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - The + * difference between `startTime` and `endTime` can only be up to 200 days - + * Between `startTime` and `endTime`, the most recent `limit` data + * from `endTime` will be returned: - If `startTime` and `endTime` + * are not sent, current timestamp will be set as `endTime`, and the most recent data + * will be returned. - If `startTime` is sent only, the timestamp of 200 days after + * `startTime` will be set as `endTime`(up to the current time) - If + * `endTime` is sent only, the timestamp of 200 days before `endTime` will + * be set as `startTime` * * @throws ApiException if the Api call fails */ - public void continuousContractKlineCandlestickDataExample() throws ApiException { - String pair = ""; - ContractType contractType = ContractType.PERPETUAL; + public void continuousContractKlineCandlestickDataExample() throws ApiException, IOException { + String pair = "BTCUSD"; + ContractType contractType = ContractType.ALL; Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; ApiResponse response = getApi().continuousContractKlineCandlestickData( pair, contractType, interval, startTime, endTime, limit); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/ExchangeInformationExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/ExchangeInformationExample.java index a4b2f81ee..fdd26c358 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/ExchangeInformationExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/ExchangeInformationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ExchangeInformationResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class ExchangeInformationExample { @@ -28,11 +29,11 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Exchange Information * - *

Current exchange trading rules and symbol information Weight: 1 + *

Current exchange trading rules and symbol information Weight(IP): 1 * * @throws ApiException if the Api call fails */ - public void exchangeInformationExample() throws ApiException { + public void exchangeInformationExample() throws ApiException, IOException { ApiResponse response = getApi().exchangeInformation(); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/GetFundingRateHistoryOfPerpetualFuturesExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/GetFundingRateHistoryOfPerpetualFuturesExample.java index 80b9ae063..e193b44ac 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/GetFundingRateHistoryOfPerpetualFuturesExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/GetFundingRateHistoryOfPerpetualFuturesExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetFundingRateHistoryOfPerpetualFuturesResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetFundingRateHistoryOfPerpetualFuturesExample { @@ -28,16 +29,16 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Get Funding Rate History of Perpetual Futures * - *

Get Funding Rate History of Perpetual Futures * empty array will be returned for delivery - * symbols. Weight: 1 + *

Get Funding Rate History of Perpetual Futures Weight(IP): 1 Notes: - empty array will be + * returned for delivery symbols. * * @throws ApiException if the Api call fails */ - public void getFundingRateHistoryOfPerpetualFuturesExample() throws ApiException { + public void getFundingRateHistoryOfPerpetualFuturesExample() throws ApiException, IOException { String symbol = ""; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; ApiResponse response = getApi().getFundingRateHistoryOfPerpetualFutures(symbol, startTime, endTime, limit); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/GetFundingRateInfoExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/GetFundingRateInfoExample.java index 2ed192010..061a2c349 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/GetFundingRateInfoExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/GetFundingRateInfoExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetFundingRateInfoResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetFundingRateInfoExample { @@ -28,12 +29,12 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Get Funding Rate Info * - *

Query funding rate info for symbols that had FundingRateCap/ FundingRateFloor / - * fundingIntervalHours adjustment Weight: 0 + *

Query funding rate info for symbols that had + * FundingRateCap/FundingRateFloor/fundingIntervalHours adjustment * * @throws ApiException if the Api call fails */ - public void getFundingRateInfoExample() throws ApiException { + public void getFundingRateInfoExample() throws ApiException, IOException { ApiResponse response = getApi().getFundingRateInfo(); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/IndexPriceAndMarkPriceExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/IndexPriceAndMarkPriceExample.java index dca9aa621..2aa9b63be 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/IndexPriceAndMarkPriceExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/IndexPriceAndMarkPriceExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.IndexPriceAndMarkPriceResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class IndexPriceAndMarkPriceExample { @@ -28,13 +29,13 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Index Price and Mark Price * - *

Query index price and mark price Weight: 10 + *

Query index price and mark price Weight(IP): 10 * * @throws ApiException if the Api call fails */ - public void indexPriceAndMarkPriceExample() throws ApiException { - String symbol = ""; - String pair = ""; + public void indexPriceAndMarkPriceExample() throws ApiException, IOException { + String symbol = "BTCUSD_PERP"; + String pair = "BTCUSD"; ApiResponse response = getApi().indexPriceAndMarkPrice(symbol, pair); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/IndexPriceKlineCandlestickDataExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/IndexPriceKlineCandlestickDataExample.java index e5fed363d..24a80ee16 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/IndexPriceKlineCandlestickDataExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/IndexPriceKlineCandlestickDataExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.IndexPriceKlineCandlestickDataResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Interval; +import java.io.IOException; /** API examples for MarketDataApi */ public class IndexPriceKlineCandlestickDataExample { @@ -30,25 +31,25 @@ public DerivativesTradingCoinFuturesRestApi getApi() { * Index Price Kline/Candlestick Data * *

Kline/candlestick bars for the index price of a pair. Klines are uniquely identified by - * their open time. 1000 | 10 * The difference between `startTime` and - * `endTime` can only be up to 200 days * Between `startTime` and - * `endTime`, the most recent `limit` data from `endTime` will be - * returned: * If `startTime` and `endTime` are not sent, current timestamp - * will be set as `endTime`, and the most recent data will be returned. * If - * `startTime` is sent only, the timestamp of 200 days after `startTime` - * will be set as `endTime`(up to the current time) * If `endTime` is sent - * only, the timestamp of 200 days before `endTime` will be set as - * `startTime` Weight: based on parameter LIMIT LIMIT | weight ---|--- [1,100) | 1 - * [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 + * their open time. Weight: Based on parameter `LIMIT` | LIMIT | weight | | --- | --- + * | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - The + * difference between `startTime` and `endTime` can only be up to 200 days - + * Between `startTime` and `endTime`, the most recent `limit` data + * from `endTime` will be returned: - If `startTime` and `endTime` + * are not sent, current timestamp will be set as `endTime`, and the most recent data + * will be returned. - If `startTime` is sent only, the timestamp of 200 days after + * `startTime` will be set as `endTime`(up to the current time) - If + * `endTime` is sent only, the timestamp of 200 days before `endTime` will + * be set as `startTime` * * @throws ApiException if the Api call fails */ - public void indexPriceKlineCandlestickDataExample() throws ApiException { - String pair = ""; + public void indexPriceKlineCandlestickDataExample() throws ApiException, IOException { + String pair = "BTCUSD"; Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; ApiResponse response = getApi().indexPriceKlineCandlestickData(pair, interval, startTime, endTime, limit); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/KlineCandlestickDataExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/KlineCandlestickDataExample.java index c64d42517..2d3532a36 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/KlineCandlestickDataExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/KlineCandlestickDataExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Interval; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.KlineCandlestickDataResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class KlineCandlestickDataExample { @@ -30,24 +31,25 @@ public DerivativesTradingCoinFuturesRestApi getApi() { * Kline/Candlestick Data * *

Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. - * 1000 | 10 * The difference between `startTime` and `endTime` can only be - * up to 200 days * Between `startTime` and `endTime`, the most recent - * `limit` data from `endTime` will be returned: * If `startTime` - * and `endTime` are not sent, current timestamp will be set as `endTime`, - * and the most recent data will be returned. * If `startTime` is sent only, the - * timestamp of 200 days after `startTime` will be set as `endTime`(up to - * the current time) * If `endTime` is sent only, the timestamp of 200 days before - * `endTime` will be set as `startTime` Weight: based on parameter LIMIT - * LIMIT | weight ---|--- [1,100) | 1 [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 + * Weight: Based on parameter `LIMIT` | LIMIT | weight | | --- | --- | | [1,100) | 1 | + * | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - The difference between + * `startTime` and `endTime` can only be up to 200 days - Between + * `startTime` and `endTime`, the most recent `limit` data from + * `endTime` will be returned: - If `startTime` and `endTime` are + * not sent, current timestamp will be set as `endTime`, and the most recent data will + * be returned. - If `startTime` is sent only, the timestamp of 200 days after + * `startTime` will be set as `endTime`(up to the current time) - If + * `endTime` is sent only, the timestamp of 200 days before `endTime` will + * be set as `startTime` * * @throws ApiException if the Api call fails */ - public void klineCandlestickDataExample() throws ApiException { - String symbol = ""; + public void klineCandlestickDataExample() throws ApiException, IOException { + String symbol = "BTCUSD"; Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; ApiResponse response = getApi().klineCandlestickData(symbol, interval, startTime, endTime, limit); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/LongShortRatioExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/LongShortRatioExample.java index 23b8f8cdc..1e1dee18f 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/LongShortRatioExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/LongShortRatioExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.LongShortRatioResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Period; +import java.io.IOException; /** API examples for MarketDataApi */ public class LongShortRatioExample { @@ -29,15 +30,15 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Long/Short Ratio * - *

Query symbol Long/Short Ratio * If startTime and endTime are not sent, the most recent - * data is returned. * Only the data of the latest 30 days is available. Weight: 1 + *

Query symbol Long/Short Ratio Weight(IP): 1 Notes: - If startTime and endTime are not + * sent, the most recent data is returned. - Only the data of the latest 30 days is available. * * @throws ApiException if the Api call fails */ - public void longShortRatioExample() throws ApiException { + public void longShortRatioExample() throws ApiException, IOException { String pair = ""; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 30L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/MarkPriceKlineCandlestickDataExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/MarkPriceKlineCandlestickDataExample.java index 1d6b5c924..30f059bde 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/MarkPriceKlineCandlestickDataExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/MarkPriceKlineCandlestickDataExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Interval; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.MarkPriceKlineCandlestickDataResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class MarkPriceKlineCandlestickDataExample { @@ -30,25 +31,25 @@ public DerivativesTradingCoinFuturesRestApi getApi() { * Mark Price Kline/Candlestick Data * *

Kline/candlestick bars for the mark price of a symbol. Klines are uniquely identified by - * their open time. 1000 | 10 * The difference between `startTime` and - * `endTime` can only be up to 200 days * Between `startTime` and - * `endTime`, the most recent `limit` data from `endTime` will be - * returned: * If `startTime` and `endTime` are not sent, current timestamp - * will be set as `endTime`, and the most recent data will be returned. * If - * `startTime` is sent only, the timestamp of 200 days after `startTime` - * will be set as `endTime`(up to the current time) * If `endTime` is sent - * only, the timestamp of 200 days before `endTime` will be set as - * `startTime` Weight: based on parameter LIMIT LIMIT | weight ---|--- [1,100) | 1 - * [100, 500) | 2 [500, 1000] | 5 > 1000 | 10 + * their open time. Weight: Based on parameter `LIMIT` | LIMIT | weight | | --- | --- + * | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - The + * difference between `startTime` and `endTime` can only be up to 200 days - + * Between `startTime` and `endTime`, the most recent `limit` data + * from `endTime` will be returned: - If `startTime` and `endTime` + * are not sent, current timestamp will be set as `endTime`, and the most recent data + * will be returned. - If `startTime` is sent only, the timestamp of 200 days after + * `startTime` will be set as `endTime`(up to the current time) - If + * `endTime` is sent only, the timestamp of 200 days before `endTime` will + * be set as `startTime` * * @throws ApiException if the Api call fails */ - public void markPriceKlineCandlestickDataExample() throws ApiException { - String symbol = ""; + public void markPriceKlineCandlestickDataExample() throws ApiException, IOException { + String symbol = "BTCUSD"; Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; ApiResponse response = getApi().markPriceKlineCandlestickData(symbol, interval, startTime, endTime, limit); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OldTradesLookupExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OldTradesLookupExample.java index 65c09ddbd..6deb8beef 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OldTradesLookupExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OldTradesLookupExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.OldTradesLookupResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class OldTradesLookupExample { @@ -26,18 +27,19 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Old Trades Lookup(MARKET_DATA) + * Old Trades Lookup (MARKET_DATA) * - *

Get older market historical trades. * Market trades means trades filled in the order book. - * Only market trades will be returned, which means the insurance fund trades and ADL trades - * won't be returned. Weight: 20 + *

Get older market historical trades. Weight(IP): 20 Security Type: MARKET_DATA Notes: - + * Market trades means trades filled in the order book. Only market trades will be returned, + * which means the insurance fund trades and ADL trades won't be returned. - Only supports + * data from within the last one month * * @throws ApiException if the Api call fails */ - public void oldTradesLookupExample() throws ApiException { + public void oldTradesLookupExample() throws ApiException, IOException { String symbol = ""; - Long limit = 100L; - Long fromId = 1L; + Long limit = 30L; + Long fromId = 595103L; ApiResponse response = getApi().oldTradesLookup(symbol, limit, fromId); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OpenInterestExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OpenInterestExample.java index c3e20f4d3..e5e5d4db6 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OpenInterestExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OpenInterestExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.OpenInterestResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class OpenInterestExample { @@ -28,12 +29,12 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Open Interest * - *

Get present open interest of a specific symbol. Weight: 1 + *

Get present open interest of a specific symbol. Weight(IP): 1 * * @throws ApiException if the Api call fails */ - public void openInterestExample() throws ApiException { - String symbol = ""; + public void openInterestExample() throws ApiException, IOException { + String symbol = "BTCUSD_200626"; ApiResponse response = getApi().openInterest(symbol); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OpenInterestStatisticsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OpenInterestStatisticsExample.java index 83c05eb0d..bda026996 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OpenInterestStatisticsExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OpenInterestStatisticsExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ContractType; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.OpenInterestStatisticsResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Period; +import java.io.IOException; /** API examples for MarketDataApi */ public class OpenInterestStatisticsExample { @@ -30,16 +31,16 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Open Interest Statistics * - *

Query open interest stats * If startTime and endTime are not sent, the most recent data is - * returned. * Only the data of the latest 30 days is available. Weight: 1 + *

Query open interest stats Weight(IP): 1 Notes: - If startTime and endTime are not sent, + * the most recent data is returned. - Only the data of the latest 30 days is available. * * @throws ApiException if the Api call fails */ - public void openInterestStatisticsExample() throws ApiException { - String pair = ""; - ContractType contractType = ContractType.PERPETUAL; + public void openInterestStatisticsExample() throws ApiException, IOException { + String pair = "BTCUSD"; + ContractType contractType = ContractType.ALL; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 30L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OrderBookExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OrderBookExample.java index 8a724b8e4..55cf890d3 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OrderBookExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/OrderBookExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.OrderBookResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class OrderBookExample { @@ -28,14 +29,14 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Order Book * - *

Query orderbook on specific symbol Weight: Adjusted based on the limit: Limit | Weight - * ------------ | ------------ 5, 10, 20, 50 | 2 100 | 5 500 | 10 1000 | 20 + *

Query orderbook on specific symbol Weight: Adjusted based on the limit: | Limit | Weight | + * | ------------ | ------------ | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | 20 | * * @throws ApiException if the Api call fails */ - public void orderBookExample() throws ApiException { - String symbol = ""; - Long limit = 100L; + public void orderBookExample() throws ApiException, IOException { + String symbol = "BTCUSD_PERP"; + Long limit = 500L; ApiResponse response = getApi().orderBook(symbol, limit); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/PremiumIndexKlineDataExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/PremiumIndexKlineDataExample.java index f14a0786a..3ac8856cc 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/PremiumIndexKlineDataExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/PremiumIndexKlineDataExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Interval; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.PremiumIndexKlineDataResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class PremiumIndexKlineDataExample { @@ -29,19 +30,19 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Premium index Kline Data * - *

Premium index kline bars of a symbol. Klines are uniquely identified by their open time. * - * If startTime and endTime are not sent, the most recent klines are returned. Weight: based on - * parameter LIMIT | LIMIT | weight | | ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 - * | | [500, 1000] | 5 | | > 1000 | 10 | + *

Premium index kline bars of a symbol. Klines are uniquely identified by their open time. + * Weight: Based on parameter `LIMIT` | LIMIT | weight | | ----------- | ------ | | + * [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - If startTime + * and endTime are not sent, the most recent klines are returned. * * @throws ApiException if the Api call fails */ - public void premiumIndexKlineDataExample() throws ApiException { - String symbol = ""; + public void premiumIndexKlineDataExample() throws ApiException, IOException { + String symbol = "BTCUSD"; Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; ApiResponse response = getApi().premiumIndexKlineData(symbol, interval, startTime, endTime, limit); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/QueryIndexPriceConstituentsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/QueryIndexPriceConstituentsExample.java index b0ab6e266..8406423aa 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/QueryIndexPriceConstituentsExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/QueryIndexPriceConstituentsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.QueryIndexPriceConstituentsResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class QueryIndexPriceConstituentsExample { @@ -28,12 +29,12 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Query Index Price Constituents * - *

Query index price constituents Weight: 1 + *

Query index price constituents Weight(IP): 1 * * @throws ApiException if the Api call fails */ - public void queryIndexPriceConstituentsExample() throws ApiException { - String symbol = ""; + public void queryIndexPriceConstituentsExample() throws ApiException, IOException { + String symbol = "BTCUSD"; ApiResponse response = getApi().queryIndexPriceConstituents(symbol); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/RecentTradesListExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/RecentTradesListExample.java index e7d1d5b77..7cca3b3b7 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/RecentTradesListExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/RecentTradesListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.RecentTradesListResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class RecentTradesListExample { @@ -28,15 +29,15 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Recent Trades List * - *

Get recent market trades * Market trades means trades filled in the order book. Only - * market trades will be returned, which means the insurance fund trades and ADL trades - * won't be returned. Weight: 5 + *

Get recent market trades Weight(IP): 5 Notes: - Market trades means trades filled in the + * order book. Only market trades will be returned, which means the insurance fund trades and + * ADL trades won't be returned. * * @throws ApiException if the Api call fails */ - public void recentTradesListExample() throws ApiException { - String symbol = ""; - Long limit = 100L; + public void recentTradesListExample() throws ApiException, IOException { + String symbol = "BTCUSD"; + Long limit = 30L; ApiResponse response = getApi().recentTradesList(symbol, limit); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/SymbolOrderBookTickerExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/SymbolOrderBookTickerExample.java index 4572f2e7a..5ef2a3b94 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/SymbolOrderBookTickerExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/SymbolOrderBookTickerExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.SymbolOrderBookTickerResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class SymbolOrderBookTickerExample { @@ -28,16 +29,16 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Symbol Order Book Ticker * - *

Best price/qty on the order book for a symbol or symbols. * Symbol and pair cannot be sent - * together * If a pair is sent,tickers for all symbols of the pair will be returned * If either - * a pair or symbol is sent, tickers for all symbols of all pairs will be returned Weight: 2 for - * a single symbol, 5 when the symbol parameter is omitted + *

Best price/qty on the order book for a symbol or symbols. Weight: **2** for a single + * symbol, **5** when the symbol parameter is omitted Notes: - Symbol and pair cannot be sent + * together - If a pair is sent,tickers for all symbols of the pair will be returned - If either + * a pair or symbol is sent, tickers for all symbols of all pairs will be returned * * @throws ApiException if the Api call fails */ - public void symbolOrderBookTickerExample() throws ApiException { - String symbol = ""; - String pair = ""; + public void symbolOrderBookTickerExample() throws ApiException, IOException { + String symbol = "BTCUSD_200626"; + String pair = "BTCUSD"; ApiResponse response = getApi().symbolOrderBookTicker(symbol, pair); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/SymbolPriceTickerExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/SymbolPriceTickerExample.java index 7df98d004..b6bc1bea6 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/SymbolPriceTickerExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/SymbolPriceTickerExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.SymbolPriceTickerResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class SymbolPriceTickerExample { @@ -28,16 +29,16 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Symbol Price Ticker * - *

Latest price for a symbol or symbols. * Symbol and pair cannot be sent together * If a - * pair is sent,tickers for all symbols of the pair will be returned * If either a pair or - * symbol is sent, tickers for all symbols of all pairs will be returned Weight: 1 for a single - * symbol, 2 when the symbol parameter is omitted + *

Latest price for a symbol or symbols. Weight: **1** for a single symbol, **2** when the + * symbol parameter is omitted Notes: - Symbol and pair cannot be sent together - If a pair is + * sent,tickers for all symbols of the pair will be returned - If either a pair or symbol is + * sent, tickers for all symbols of all pairs will be returned * * @throws ApiException if the Api call fails */ - public void symbolPriceTickerExample() throws ApiException { - String symbol = ""; - String pair = ""; + public void symbolPriceTickerExample() throws ApiException, IOException { + String symbol = "BTCUSD_200626"; + String pair = "BTCUSD"; ApiResponse response = getApi().symbolPriceTicker(symbol, pair); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TakerBuySellVolumeExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TakerBuySellVolumeExample.java index 08c9b3800..b099b9a92 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TakerBuySellVolumeExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TakerBuySellVolumeExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ContractType; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Period; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.TakerBuySellVolumeResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class TakerBuySellVolumeExample { @@ -31,17 +32,17 @@ public DerivativesTradingCoinFuturesRestApi getApi() { * Taker Buy/Sell Volume * *

Taker Buy Volume: the total volume of buy orders filled by takers within the period. Taker - * Sell Volume: the total volume of sell orders filled by takers within the period. * If - * startTime and endTime are not sent, the most recent data is returned. * Only the data of the - * latest 30 days is available. Weight: 1 + * Sell Volume: the total volume of sell orders filled by takers within the period. Weight(IP): + * 1 Notes: - If startTime and endTime are not sent, the most recent data is returned. - Only + * the data of the latest 30 days is available. * * @throws ApiException if the Api call fails */ - public void takerBuySellVolumeExample() throws ApiException { - String pair = ""; - ContractType contractType = ContractType.PERPETUAL; + public void takerBuySellVolumeExample() throws ApiException, IOException { + String pair = "BTCUSD"; + ContractType contractType = ContractType.ALL; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 30L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TestConnectivityExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TestConnectivityExample.java index b3be7353c..5c177b217 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TestConnectivityExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TestConnectivityExample.java @@ -5,6 +5,7 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; +import java.io.IOException; /** API examples for MarketDataApi */ public class TestConnectivityExample { @@ -26,11 +27,11 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Test Connectivity * - *

Test connectivity to the Rest API. Weight: 1 + *

Test connectivity to the Rest API. Weight(IP): 1 * * @throws ApiException if the Api call fails */ - public void testConnectivityExample() throws ApiException { + public void testConnectivityExample() throws ApiException, IOException { getApi().testConnectivity(); } } diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java index 441ba50bc..91fa64137 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Ticker24hrPriceChangeStatisticsResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class Ticker24hrPriceChangeStatisticsExample { @@ -28,17 +29,17 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * 24hr Ticker Price Change Statistics * - *

24 hour rolling window price change statistics. * Symbol and pair cannot be sent together - * * If a pair is sent,tickers for all symbols of the pair will be returned * If either a pair - * or symbol is sent, tickers for all symbols of all pairs will be returned Weight: 1 for a - * single symbol, 40 when the symbol parameter is omitted Careful when accessing this with no - * symbol. + *

24 hour rolling window price change statistics. Weight: **1** for a single symbol, **40** + * when the symbol parameter is omitted **Careful** when accessing this with no symbol. Notes: - + * Symbol and pair cannot be sent together - If a pair is sent,tickers for all symbols of the + * pair will be returned - If either a pair or symbol is sent, tickers for all symbols of all + * pairs will be returned * * @throws ApiException if the Api call fails */ - public void ticker24hrPriceChangeStatisticsExample() throws ApiException { - String symbol = ""; - String pair = ""; + public void ticker24hrPriceChangeStatisticsExample() throws ApiException, IOException { + String symbol = "BTCUSD_200925"; + String pair = "BTCUSD"; ApiResponse response = getApi().ticker24hrPriceChangeStatistics(symbol, pair); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TopTraderLongShortRatioAccountsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TopTraderLongShortRatioAccountsExample.java index 8ca1c4931..92cd90dc1 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TopTraderLongShortRatioAccountsExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TopTraderLongShortRatioAccountsExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Period; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.TopTraderLongShortRatioAccountsResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class TopTraderLongShortRatioAccountsExample { @@ -27,22 +28,23 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Top Trader Long/Short Ratio (Accounts) + * Top Trader Long/Short Account Ratio * *

The proportion of net long and net short accounts to total accounts of the top 20% users * with the highest margin balance. Each account is counted once only. Long Account % = * Accounts of top traders with net long positions / Total accounts of top traders with open * positions Short Account % = Accounts of top traders with net short positions / Total * accounts of top traders with open positions Long/Short Ratio (Accounts) = Long Account % - * / Short Account % * If startTime and endTime are not sent, the most recent data is returned. - * * Only the data of the latest 30 days is available. Weight: 1 + * / Short Account % Weight(IP): 1 Security Type: Accounts Notes: - If startTime and endTime are + * not sent, the most recent data is returned. - Only the data of the latest 30 days is + * available. * * @throws ApiException if the Api call fails */ - public void topTraderLongShortRatioAccountsExample() throws ApiException { + public void topTraderLongShortRatioAccountsExample() throws ApiException, IOException { String symbol = ""; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 30L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TopTraderLongShortRatioPositionsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TopTraderLongShortRatioPositionsExample.java index 6bcd8afb4..1278f285f 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TopTraderLongShortRatioPositionsExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/marketdata/TopTraderLongShortRatioPositionsExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Period; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.TopTraderLongShortRatioPositionsResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class TopTraderLongShortRatioPositionsExample { @@ -27,21 +28,22 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Top Trader Long/Short Ratio (Positions) + * Top Trader Long/Short Position Ratio * *

The proportion of net long and net short positions to total open positions of the top 20% * users with the highest margin balance. Long Position % = Long positions of top traders / * Total open positions of top traders Short Position % = Short positions of top traders / * Total open positions of top traders Long/Short Ratio (Positions) = Long Position % / - * Short Position % * If startTime and endTime are not sent, the most recent data is returned. * - * Only the data of the latest 30 days is available. Weight: 1 + * Short Position % Weight(IP): 1 Security Type: Positions Notes: - If startTime and endTime are + * not sent, the most recent data is returned. - Only the data of the latest 30 days is + * available. * * @throws ApiException if the Api call fails */ - public void topTraderLongShortRatioPositionsExample() throws ApiException { - String pair = ""; + public void topTraderLongShortRatioPositionsExample() throws ApiException, IOException { + String pair = "BTCUSD"; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 30L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/portfoliomarginendpoints/ClassicPortfolioMarginAccountInformationExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/portfoliomarginendpoints/ClassicPortfolioMarginAccountInformationExample.java deleted file mode 100644 index 2a2c002f3..000000000 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/portfoliomarginendpoints/ClassicPortfolioMarginAccountInformationExample.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.rest.portfoliomarginendpoints; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ClassicPortfolioMarginAccountInformationResponse; - -/** API examples for PortfolioMarginEndpointsApi */ -public class ClassicPortfolioMarginAccountInformationExample { - private DerivativesTradingCoinFuturesRestApi api; - - public DerivativesTradingCoinFuturesRestApi getApi() { - if (api == null) { - ClientConfiguration clientConfiguration = - DerivativesTradingCoinFuturesRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - api = new DerivativesTradingCoinFuturesRestApi(clientConfiguration); - } - return api; - } - - /** - * Classic Portfolio Margin Account Information (USER_DATA) - * - *

Get Classic Portfolio Margin current account information. * maxWithdrawAmount is for asset - * transfer out to the spot wallet. Weight: 5 - * - * @throws ApiException if the Api call fails - */ - public void classicPortfolioMarginAccountInformationExample() throws ApiException { - String asset = ""; - Long recvWindow = 5000L; - ApiResponse response = - getApi().classicPortfolioMarginAccountInformation(asset, recvWindow); - System.out.println(response.getData()); - } -} diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AccountTradeListExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AccountTradeListExample.java index a692e4271..b3d686709 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AccountTradeListExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AccountTradeListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.AccountTradeListResponse; +import java.io.IOException; /** API examples for TradeApi */ public class AccountTradeListExample { @@ -28,24 +29,25 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Account Trade List (USER_DATA) * - *

Get trades for a specific account and symbol. * Either symbol or pair must be sent * - * Symbol and pair cannot be sent together * Pair and fromId cannot be sent together * OrderId - * can only be sent together with symbol * If a pair is sent,tickers for all symbols of the pair - * will be returned * The parameter `fromId` cannot be sent with `startTime` - * or `endTime` * If startTime and endTime are both not sent, then the last 7 - * days' data will be returned. * The time between startTime and endTime cannot be longer - * than 7 days. Weight: 20 with symbol,40 with pair + *

Get trades for a specific account and symbol. Weight: **20** with symbol,**40** with pair + * (after CM migration: **5** flat) Security Type: USER_DATA Notes: - Either symbol or pair must + * be sent - Symbol and pair cannot be sent together - Pair and fromId cannot be sent together - + * OrderId can only be sent together with symbol - If a pair is sent,tickers for all symbols of + * the pair will be returned - The parameter `fromId` cannot be sent with + * `startTime` or `endTime` - If startTime and endTime are both not sent, + * then the last 7 days' data will be returned. - The time between startTime and endTime + * cannot be longer than 7 days. * * @throws ApiException if the Api call fails */ - public void accountTradeListExample() throws ApiException { - String symbol = ""; - String pair = ""; - Long orderId = 1L; + public void accountTradeListExample() throws ApiException, IOException { + String symbol = "BTCUSD_200626"; + String pair = "BTCUSD"; + String orderId = "1"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long fromId = 1L; - Long limit = 100L; + Long fromId = 6L; + Long limit = 30L; Long recvWindow = 5000L; ApiResponse response = getApi().accountTradeList( diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AllOrdersExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AllOrdersExample.java index 23aaf6f23..abe12232f 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AllOrdersExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AllOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.AllOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class AllOrdersExample { @@ -30,23 +31,23 @@ public DerivativesTradingCoinFuturesRestApi getApi() { * *

Get all account orders; active, canceled, or filled. * These orders will not be found: * * order status is CANCELED or EXPIRED AND order has NO filled trade AND created time + 3 days - * < current time * order create time + 90 days < current time * Either `symbol` - * or `pair` must be sent. * `pair` can't be sent with - * `orderId` * If `orderId` is set, it will get orders >= that - * `orderId`. Otherwise most recent orders are returned. * If orderId is set, it will - * get orders >= that orderId. Otherwise most recent orders are returned. * The query - * time period must be less then 7 days( default as the recent 7 days). Weight: 20 with symbol, - * 40 with pair + * < current time * order create time + 90 days < current time Weight: **20** with symbol, + * **40** with pair (after CM migration: **5** flat) Security Type: USER_DATA Notes: - Either + * `symbol` or `pair` must be sent. - `pair` can't be sent + * with `orderId` - If `orderId` is set, it will get orders >= that + * `orderId`. Otherwise most recent orders are returned. - If orderId is set, it will + * get orders >= that orderId. Otherwise most recent orders are returned. - The query + * time period must be less then 7 days( default as the recent 7 days). * * @throws ApiException if the Api call fails */ - public void allOrdersExample() throws ApiException { - String symbol = ""; - String pair = ""; - Long orderId = 1L; + public void allOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSD_200925"; + String pair = "BTCUSD"; + Long orderId = 1917641L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; Long recvWindow = 5000L; ApiResponse response = getApi().allOrders(symbol, pair, orderId, startTime, endTime, limit, recvWindow); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AutoCancelAllOpenOrdersExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AutoCancelAllOpenOrdersExample.java index 688dcda49..4ee0379bd 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AutoCancelAllOpenOrdersExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AutoCancelAllOpenOrdersExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.AutoCancelAllOpenOrdersRequest; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.AutoCancelAllOpenOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class AutoCancelAllOpenOrdersExample { @@ -38,15 +39,15 @@ public DerivativesTradingCoinFuturesRestApi getApi() { * small. * Example usage: Call this endpoint at 30s intervals with an countdownTime of 120000 * (120s). If this endpoint is not called within 120 seconds, all your orders of the specified * symbol will be automatically canceled. If this endpoint is called with an countdownTime of 0, - * the countdown timer will be stopped. Weight: 10 + * the countdown timer will be stopped. Weight(IP): 10 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void autoCancelAllOpenOrdersExample() throws ApiException { + public void autoCancelAllOpenOrdersExample() throws ApiException, IOException { AutoCancelAllOpenOrdersRequest autoCancelAllOpenOrdersRequest = new AutoCancelAllOpenOrdersRequest(); - autoCancelAllOpenOrdersRequest.symbol(""); - autoCancelAllOpenOrdersRequest.countdownTime(0L); + autoCancelAllOpenOrdersRequest.symbol("BTCUSD_200925"); + autoCancelAllOpenOrdersRequest.countdownTime(1000L); ApiResponse response = getApi().autoCancelAllOpenOrders(autoCancelAllOpenOrdersRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelAllOpenOrdersExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelAllOpenOrdersExample.java index 29551b0e9..9dd08f3f5 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelAllOpenOrdersExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelAllOpenOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.CancelAllOpenOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelAllOpenOrdersExample { @@ -26,14 +27,14 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Cancel All Open Orders(TRADE) + * Cancel All Open Orders (TRADE) * - *

Cancel All Open Orders Weight: 1 + *

Cancel All Open Orders Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void cancelAllOpenOrdersExample() throws ApiException { - String symbol = ""; + public void cancelAllOpenOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSD_200925"; Long recvWindow = 5000L; ApiResponse response = getApi().cancelAllOpenOrders(symbol, recvWindow); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelMultipleOrdersExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelMultipleOrdersExample.java index d049a33f9..60950143d 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelMultipleOrdersExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelMultipleOrdersExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.CancelMultipleOrdersResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.OrderIdList; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.OrigClientOrderIdList; +import java.io.IOException; /** API examples for TradeApi */ public class CancelMultipleOrdersExample { @@ -28,17 +29,18 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Cancel Multiple Orders(TRADE) + * Cancel Multiple Orders (TRADE) * - *

Cancel Multiple Orders * Either `orderIdList` or `origClientOrderIdList - * ` must be sent. Weight: 1 + *

Cancel Multiple Orders Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderIdList` or `origClientOrderIdList ` must be sent. * * @throws ApiException if the Api call fails */ - public void cancelMultipleOrdersExample() throws ApiException { - String symbol = ""; - OrderIdList orderIdList = null; - OrigClientOrderIdList origClientOrderIdList = null; + public void cancelMultipleOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSD_200925"; + OrderIdList orderIdList = OrderIdList.fromJson("[1234567,2345678]"); + OrigClientOrderIdList origClientOrderIdList = + OrigClientOrderIdList.fromJson("[\"my_id_1\",\"my_id_2\"]"); Long recvWindow = 5000L; ApiResponse response = getApi().cancelMultipleOrders( diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelOrderExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelOrderExample.java index 37334076b..5e992d72a 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelOrderExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CancelOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.CancelOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelOrderExample { @@ -28,15 +29,15 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Cancel Order (TRADE) * - *

Cancel an active order. * Either `orderId` or `origClientOrderId` must - * be sent. Weight: 1 + *

Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent. * * @throws ApiException if the Api call fails */ - public void cancelOrderExample() throws ApiException { - String symbol = ""; - Long orderId = 1L; - String origClientOrderId = "1"; + public void cancelOrderExample() throws ApiException, IOException { + String symbol = "BTCUSD_200925"; + Long orderId = 283194212L; + String origClientOrderId = "myOrder1"; Long recvWindow = 5000L; ApiResponse response = getApi().cancelOrder(symbol, orderId, origClientOrderId, recvWindow); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangeInitialLeverageExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangeInitialLeverageExample.java index cf286cc8e..5029b97ad 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangeInitialLeverageExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangeInitialLeverageExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ChangeInitialLeverageRequest; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ChangeInitialLeverageResponse; +import java.io.IOException; /** API examples for TradeApi */ public class ChangeInitialLeverageExample { @@ -31,15 +32,15 @@ public DerivativesTradingCoinFuturesRestApi getApi() { * *

Change user's initial leverage in the specific symbol market. For Hedge Mode, LONG and * SHORT positions of one symbol use the same initial leverage and share a total notional value. - * Weight: 1 + * Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void changeInitialLeverageExample() throws ApiException { + public void changeInitialLeverageExample() throws ApiException, IOException { ChangeInitialLeverageRequest changeInitialLeverageRequest = new ChangeInitialLeverageRequest(); - changeInitialLeverageRequest.symbol(""); - changeInitialLeverageRequest.leverage(0L); + changeInitialLeverageRequest.symbol("BTCUSD_200925"); + changeInitialLeverageRequest.leverage(1L); ApiResponse response = getApi().changeInitialLeverage(changeInitialLeverageRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangeMarginTypeExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangeMarginTypeExample.java index 4623e42fa..32d2e7da6 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangeMarginTypeExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangeMarginTypeExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ChangeMarginTypeRequest; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ChangeMarginTypeResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.MarginType; +import java.io.IOException; /** API examples for TradeApi */ public class ChangeMarginTypeExample { @@ -32,13 +33,13 @@ public DerivativesTradingCoinFuturesRestApi getApi() { * *

Change user's margin type in the specific symbol market.For Hedge Mode, LONG and SHORT * positions of one symbol use the same margin type. With ISOLATED margin type, margins of the - * LONG and SHORT positions are isolated from each other. Weight: 1 + * LONG and SHORT positions are isolated from each other. Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void changeMarginTypeExample() throws ApiException { + public void changeMarginTypeExample() throws ApiException, IOException { ChangeMarginTypeRequest changeMarginTypeRequest = new ChangeMarginTypeRequest(); - changeMarginTypeRequest.symbol(""); + changeMarginTypeRequest.symbol("BTCUSD_200925"); changeMarginTypeRequest.marginType(MarginType.ISOLATED); ApiResponse response = getApi().changeMarginType(changeMarginTypeRequest); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangePositionModeExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangePositionModeExample.java index 38e84e416..ad3645e68 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangePositionModeExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ChangePositionModeExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ChangePositionModeRequest; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ChangePositionModeResponse; +import java.io.IOException; /** API examples for TradeApi */ public class ChangePositionModeExample { @@ -27,16 +28,19 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Change Position Mode(TRADE) + * Change Position Mode (TRADE) * - *

Change user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol*** - * Weight: 1 + *

Change user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol***. + * **After CM migration**, UM and CM share the **same** `dualSidePosition` setting. + * Calling this endpoint flips both UM and CM at once. If either side has any open order or open + * position, the change is rejected: - `-4067` (open orders exist) - `-4068` + * (open position exists) Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void changePositionModeExample() throws ApiException { + public void changePositionModeExample() throws ApiException, IOException { ChangePositionModeRequest changePositionModeRequest = new ChangePositionModeRequest(); - changePositionModeRequest.dualSidePosition(""); + changePositionModeRequest.dualSidePosition("true"); ApiResponse response = getApi().changePositionMode(changePositionModeRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CurrentAllOpenOrdersExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CurrentAllOpenOrdersExample.java index bd033848e..0b1513e57 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CurrentAllOpenOrdersExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/CurrentAllOpenOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.CurrentAllOpenOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CurrentAllOpenOrdersExample { @@ -28,14 +29,15 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Current All Open Orders (USER_DATA) * - *

Get all open orders on a symbol. **Careful** when accessing this with no symbol. Weight: 1 - * for a single symbol, 40 for mutltiple symbols + *

Get all open orders on a symbol. **Careful** when accessing this with no symbol. + * Weight(IP): null Weight: **1** for a single symbol, **40** for mutltiple symbols Security + * Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void currentAllOpenOrdersExample() throws ApiException { - String symbol = ""; - String pair = ""; + public void currentAllOpenOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSD_200925"; + String pair = "BTCUSD"; Long recvWindow = 5000L; ApiResponse response = getApi().currentAllOpenOrders(symbol, pair, recvWindow); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/GetOrderModifyHistoryExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/GetOrderModifyHistoryExample.java index c122159b3..b192f515f 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/GetOrderModifyHistoryExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/GetOrderModifyHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetOrderModifyHistoryResponse; +import java.io.IOException; /** API examples for TradeApi */ public class GetOrderModifyHistoryExample { @@ -28,19 +29,20 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * Get Order Modify History (USER_DATA) * - *

Get order modification history * Either `orderId` or - * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. * Order modify history longer than 3 month is not avaliable Weight: 1 + *

Get order modification history Weight(IP): 1 Security Type: USER_DATA Notes: - Either + * `orderId` or `origClientOrderId` must be sent, and the + * `orderId` will prevail if both are sent. - Order modify history longer than 3 month + * is not avaliable * * @throws ApiException if the Api call fails */ - public void getOrderModifyHistoryExample() throws ApiException { - String symbol = ""; - Long orderId = 1L; - String origClientOrderId = "1"; + public void getOrderModifyHistoryExample() throws ApiException, IOException { + String symbol = "BTCUSD_PERP"; + Long orderId = 20072994037L; + String origClientOrderId = "LJ9R4QZDihCaS8UAOOLpgW"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; Long recvWindow = 5000L; ApiResponse response = getApi().getOrderModifyHistory( diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/GetPositionMarginChangeHistoryExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/GetPositionMarginChangeHistoryExample.java index dfa9baf20..e02fddee4 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/GetPositionMarginChangeHistoryExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/GetPositionMarginChangeHistoryExample.java @@ -7,7 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.GetPositionMarginChangeHistoryResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Type; +import java.io.IOException; /** API examples for TradeApi */ public class GetPositionMarginChangeHistoryExample { @@ -27,18 +27,18 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Get Position Margin Change History(TRADE) + * Get Position Margin Change History (TRADE) * - *

Get position margin change history Weight: 1 + *

Get position margin change history Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void getPositionMarginChangeHistoryExample() throws ApiException { - String symbol = ""; - Type type = Type.LIMIT; + public void getPositionMarginChangeHistoryExample() throws ApiException, IOException { + String symbol = "BTCUSD"; + Long type = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; Long recvWindow = 5000L; ApiResponse response = getApi().getPositionMarginChangeHistory( diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyIsolatedPositionMarginExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyIsolatedPositionMarginExample.java index d8cb54288..637862742 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyIsolatedPositionMarginExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyIsolatedPositionMarginExample.java @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ModifyIsolatedPositionMarginRequest; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ModifyIsolatedPositionMarginResponse; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Type; +import java.io.IOException; /** API examples for TradeApi */ public class ModifyIsolatedPositionMarginExample { @@ -28,18 +28,19 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Modify Isolated Position Margin(TRADE) + * Modify Isolated Position Margin (TRADE) * - *

Modify Isolated Position Margin * Only for isolated symbol Weight: 1 + *

Modify Isolated Position Margin Weight(IP): 1 Security Type: TRADE Notes: - Only for + * isolated symbol * * @throws ApiException if the Api call fails */ - public void modifyIsolatedPositionMarginExample() throws ApiException { + public void modifyIsolatedPositionMarginExample() throws ApiException, IOException { ModifyIsolatedPositionMarginRequest modifyIsolatedPositionMarginRequest = new ModifyIsolatedPositionMarginRequest(); - modifyIsolatedPositionMarginRequest.symbol(""); + modifyIsolatedPositionMarginRequest.symbol("BTCUSDT"); modifyIsolatedPositionMarginRequest.amount(1.0d); - modifyIsolatedPositionMarginRequest.type(Type.LIMIT); + modifyIsolatedPositionMarginRequest.type(1L); ApiResponse response = getApi().modifyIsolatedPositionMargin(modifyIsolatedPositionMarginRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyMultipleOrdersExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyMultipleOrdersExample.java index ccf0d87ab..b4c53d230 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyMultipleOrdersExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyMultipleOrdersExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.BatchOrders; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ModifyMultipleOrdersRequest; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ModifyMultipleOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class ModifyMultipleOrdersExample { @@ -28,16 +29,19 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Modify Multiple Orders(TRADE) + * Modify Multiple Orders (TRADE) * - *

Modify Multiple Orders * Parameter rules are same with `Modify Order` * Batch - * modify orders are processed concurrently, and the order of matching is not guaranteed. * The - * order of returned contents for batch modify orders is the same as the order of the order - * list. * One order can only be modfied for less than 10000 times Weight: 5 + *

Modify Multiple Orders Weight(IP): 5 Security Type: TRADE Notes: - Parameter rules are + * same with `Modify Order` - Batch modify orders are processed concurrently, and the + * order of matching is not guaranteed. - The order of returned contents for batch modify orders + * is the same as the order of the order list. - One order can only be modfied for less than + * 10000 times - `modifyId` is an optional user-defined identifier passed through + * as-is; the server does not validate its uniqueness. If omitted, it is not included in the + * response. * * @throws ApiException if the Api call fails */ - public void modifyMultipleOrdersExample() throws ApiException { + public void modifyMultipleOrdersExample() throws ApiException, IOException { ModifyMultipleOrdersRequest modifyMultipleOrdersRequest = new ModifyMultipleOrdersRequest(); modifyMultipleOrdersRequest.batchOrders(new BatchOrders()); ApiResponse response = diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyOrderExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyOrderExample.java index 0a9028c94..5ca7d8fb2 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyOrderExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/ModifyOrderExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ModifyOrderRequest; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.ModifyOrderResponse; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Side; +import java.io.IOException; /** API examples for TradeApi */ public class ModifyOrderExample { @@ -31,21 +32,22 @@ public DerivativesTradingCoinFuturesRestApi getApi() { * Modify Order (TRADE) * *

Order modify function, currently only LIMIT order modification is supported, modified - * orders will be reordered in the match queue * Either `orderId` or - * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. * Either `quantity` or `price` must be sent. * When the new - * `quantity` or `price` doesn'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 `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 Weight: 1 + * orders will be reordered in the match queue Weight(IP): 1 Security Type: TRADE Notes: - + * Either `orderId` or `origClientOrderId` must be sent, and the + * `orderId` will prevail if both are sent. - Either `quantity` or + * `price` must be sent. *(After CM migration, both `quantity` and + * `price` are required.)* - When the new `quantity` or `price` + * doesn'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 + * `quantity` - 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 * * @throws ApiException if the Api call fails */ - public void modifyOrderExample() throws ApiException { + public void modifyOrderExample() throws ApiException, IOException { ModifyOrderRequest modifyOrderRequest = new ModifyOrderRequest(); - modifyOrderRequest.symbol(""); + modifyOrderRequest.symbol("BTCUSD_PERP"); modifyOrderRequest.side(Side.BUY); ApiResponse response = getApi().modifyOrder(modifyOrderRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/NewOrderExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/NewOrderExample.java index 94cb16ae1..daaabd977 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/NewOrderExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/NewOrderExample.java @@ -8,8 +8,9 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.NewOrderRequest; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.NewOrderResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.OrderType; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Side; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.Type; +import java.io.IOException; /** API examples for TradeApi */ public class NewOrderExample { @@ -31,50 +32,50 @@ public DerivativesTradingCoinFuturesRestApi getApi() { /** * New Order (TRADE) * - *

Send in a new order. * Order with type `STOP`, parameter `timeInForce` - * can be sent ( default `GTC`). * Order with type `TAKE_PROFIT`, parameter - * `timeInForce` can be sent ( default `GTC`). * Condition orders will be - * triggered when: * If parameter`priceProtect`is sent as true: * when price reaches - * the `stopPrice` ,the difference rate between \"MARK_PRICE\" and + *

Send in a new order. Weight: 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: - Additional mandatory parameters + * based on `type`: - Order with type `STOP`, parameter + * `timeInForce` can be sent ( default `GTC`). - Order with type + * `TAKE_PROFIT`, parameter `timeInForce` can be sent ( default + * `GTC`). - Condition orders will be triggered when: - If + * parameter`priceProtect`is sent as true: - when price reaches the + * `stopPrice` ,the difference rate between \"MARK_PRICE\" and * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /dapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed `<= - * `activationPrice`, and the latest price >`= the lowest price * (1 + - * `callbackRate`) * SELL: the highest price after order placed >= - * `activationPrice`, and the latest price <= the highest price * (1 - - * `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. - * ``{\"code\": -2021, \"msg\": \"Order would immediately - * trigger.\"}`` means that the parameters you send do not meet the following - * requirements: * BUY: `activationPrice` should be smaller than latest price. * SELL: - * `activationPrice` should be larger than latest price. * If `newOrderRespType - * ` is sent as `RESULT` : * `MARKET` order: the final FILLED result of - * the order will be return directly. * `LIMIT` order with special + * symbol - \"triggerProtect\" of a symbol can be got from `GET + * /dapi/v1/exchangeInfo` - `STOP`, `STOP_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - + * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") + * -`TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - + * `TRAILING_STOP_MARKET`: - BUY: the lowest price after order placed + * ``= the lowest price * (1 + `callbackRate`) - SELL: the highest + * price after order placed >= `activationPrice`, and the latest price - For + * `TRAILING_STOP_MARKET`, if you got such error code. > `{\"code\": + * -2021, \"msg\": \"Order would immediately trigger.\"}` > means + * that the parameters you send do not meet the following requirements: - BUY: + * `activationPrice` should be smaller than latest price. - SELL: + * `activationPrice` should be larger than latest price. - If `newOrderRespType + * ` is sent as `RESULT` : - `MARKET` order: the final FILLED result of + * the order will be return directly. - `LIMIT` order with special * `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be - * returned directly. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` parameter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with + * returned directly. - `STOP_MARKET`, `TAKE_PROFIT_MARKET` with + * `closePosition`=`true`: - Follow the same rules for condition + * orders. - If triggered,**close all** current long position( if `SELL`) or current + * short position( if `BUY`). - Cannot be used with `quantity` parameter - + * Cannot be used with `reduceOnly` parameter - In Hedge Mode,cannot be used with * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * + * `SELL` orders in `SHORT` position side - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC`. Weight: 1 on 1min order rate - * limit(X-MBX-ORDER-COUNT-1M)\\ 0 on IP rate limit(x-mbx-used-weight-1m) + * `IOC` or `GTC`. * * @throws ApiException if the Api call fails */ - public void newOrderExample() throws ApiException { + public void newOrderExample() throws ApiException, IOException { NewOrderRequest newOrderRequest = new NewOrderRequest(); - newOrderRequest.symbol(""); + newOrderRequest.symbol("BTCUSD_200925"); newOrderRequest.side(Side.BUY); - newOrderRequest.type(Type.LIMIT); + newOrderRequest.type(OrderType.LIMIT); ApiResponse response = getApi().newOrder(newOrderRequest); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PlaceMultipleOrdersExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PlaceMultipleOrdersExample.java index 35e73fc06..a2a789785 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PlaceMultipleOrdersExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PlaceMultipleOrdersExample.java @@ -6,9 +6,10 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; -import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.BatchOrdersPlaceMultipleOrders; +import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.BatchOrders; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.PlaceMultipleOrdersRequest; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.PlaceMultipleOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class PlaceMultipleOrdersExample { @@ -28,17 +29,20 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Place Multiple Orders(TRADE) + * Place Multiple Orders (TRADE) * *

Place multiple orders * Parameter rules are same with `New Order` * Batch orders * are processed concurrently, and the order of matching is not guaranteed. * The order of - * returned contents for batch orders is the same as the order of the order list. Weight: 5 + * returned contents for batch orders is the same as the order of the order list. Weight(IP): 5 + * Security Type: TRADE Notes: - `batchOrders` must be a JSON array of order parameter + * objects. - Example: + * `/dapi/v1/batchOrders?batchOrders=[{\"type\":\"LIMIT\",\"timeInForce\":\"GTC\",\"symbol\":\"BTCUSD_PERP\",\"side\":\"BUY\",\"price\":\"10001\",\"quantity\":\"1\"}]` * * @throws ApiException if the Api call fails */ - public void placeMultipleOrdersExample() throws ApiException { + public void placeMultipleOrdersExample() throws ApiException, IOException { PlaceMultipleOrdersRequest placeMultipleOrdersRequest = new PlaceMultipleOrdersRequest(); - placeMultipleOrdersRequest.batchOrders(new BatchOrdersPlaceMultipleOrders()); + placeMultipleOrdersRequest.batchOrders(new BatchOrders()); ApiResponse response = getApi().placeMultipleOrders(placeMultipleOrdersRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PositionAdlQuantileEstimationExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PositionAdlQuantileEstimationExample.java index df10e4113..4c72eea9e 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PositionAdlQuantileEstimationExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PositionAdlQuantileEstimationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.PositionAdlQuantileEstimationResponse; +import java.io.IOException; /** API examples for TradeApi */ public class PositionAdlQuantileEstimationExample { @@ -26,7 +27,7 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Position ADL Quantile Estimation(USER_DATA) + * Position ADL Quantile Estimation (USER_DATA) * *

Query position ADL quantile estimation * Values update every 30s. * Values 0, 1, 2, 3, 4 * shows the queue position and possibility of ADL from low to high. * For positions of the @@ -36,12 +37,12 @@ public DerivativesTradingCoinFuturesRestApi getApi() { * in Hedge Mode: * \"HEDGE\" as a sign will be returned instead of * \"BOTH\"; * A same value caculated on unrealized pnls on long and short sides' * positions will be shown for \"LONG\" and \"SHORT\" when there are - * positions in both of long and short sides. Weight: 5 + * positions in both of long and short sides. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void positionAdlQuantileEstimationExample() throws ApiException { - String symbol = ""; + public void positionAdlQuantileEstimationExample() throws ApiException, IOException { + String symbol = "BTCUSD_200925"; Long recvWindow = 5000L; ApiResponse response = getApi().positionAdlQuantileEstimation(symbol, recvWindow); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PositionInformationExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PositionInformationExample.java index e29b166f7..b54f74f1b 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PositionInformationExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/PositionInformationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.PositionInformationResponse; +import java.io.IOException; /** API examples for TradeApi */ public class PositionInformationExample { @@ -26,20 +27,22 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Position Information(USER_DATA) + * Position Information (USER_DATA) * - *

Get current account information. * If neither `marginAsset` nor `pair` - * is sent, positions of all symbols with `TRADING` status will be returned. * for - * One-way Mode user, the response will only show the \"BOTH\" positions * for Hedge - * Mode user, the response will show \"BOTH\", \"LONG\", and - * \"SHORT\" positions. Please use with user data stream `ACCOUNT_UPDATE` to - * meet your timeliness and accuracy needs. Weight: 1 + *

Get current account information. Weight(IP): 1 Security Type: USER_DATA Notes: - If + * neither `marginAsset` nor `pair` is sent, positions of all symbols with + * `TRADING` status will be returned. - for One-way Mode user, the response will only + * show the \"BOTH\" positions - for Hedge Mode user, the response will show + * \"BOTH\", \"LONG\", and \"SHORT\" positions. **Note** > + * Please use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and + * accuracy needs. - Please use with user data stream ACCOUNT_UPDATE to meet your timeliness and + * accuracy needs. * * @throws ApiException if the Api call fails */ - public void positionInformationExample() throws ApiException { - String marginAsset = ""; - String pair = ""; + public void positionInformationExample() throws ApiException, IOException { + String marginAsset = "USDT"; + String pair = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().positionInformation(marginAsset, pair, recvWindow); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/QueryCurrentOpenOrderExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/QueryCurrentOpenOrderExample.java index 5b120ffe8..01b972914 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/QueryCurrentOpenOrderExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/QueryCurrentOpenOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.QueryCurrentOpenOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryCurrentOpenOrderExample { @@ -26,16 +27,17 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Query Current Open Order(USER_DATA) + * Query Current Open Order (USER_DATA) * - *

Query Current Open Order * Either`orderId` or `origClientOrderId` must - * be sent * If the queried order has been filled or cancelled, the error message \"Order - * does not exist\" will be returned. Weight: 1 + *

Query Current Open Order Weight(IP): 1 Security Type: USER_DATA Notes: - + * Either`orderId` or `origClientOrderId` must be sent - If the queried + * order has been filled or cancelled, the error message \"Order does not exist\" will + * be returned. * * @throws ApiException if the Api call fails */ - public void queryCurrentOpenOrderExample() throws ApiException { - String symbol = ""; + public void queryCurrentOpenOrderExample() throws ApiException, IOException { + String symbol = "BTCUSD_200925"; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/QueryOrderExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/QueryOrderExample.java index 439fe5193..017be3840 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/QueryOrderExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/QueryOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.QueryOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryOrderExample { @@ -30,13 +31,13 @@ public DerivativesTradingCoinFuturesRestApi getApi() { * *

Check an order's status. * These orders will not be found: * order status is CANCELED * or EXPIRED AND order has NO filled trade AND created time + 3 days < current time * order - * create time + 90 days < current time * Either `orderId` or - * `origClientOrderId` must be sent. Weight: 1 + * create time + 90 days < current time Weight(IP): 1 Security Type: USER_DATA Notes: - + * Either `orderId` or `origClientOrderId` must be sent. * * @throws ApiException if the Api call fails */ - public void queryOrderExample() throws ApiException { - String symbol = ""; + public void queryOrderExample() throws ApiException, IOException { + String symbol = "BTCUSD_200925"; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/UsersForceOrdersExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/UsersForceOrdersExample.java index 13c77352f..df723af9e 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/UsersForceOrdersExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/UsersForceOrdersExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.AutoCloseType; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.UsersForceOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class UsersForceOrdersExample { @@ -27,20 +28,21 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * User's Force Orders(USER_DATA) + * User's Force Orders (USER_DATA) * - *

User's Force Orders * If \"autoCloseType\" is not sent, orders with both of - * the types will be returned * If \"startTime\" is not sent, data within 200 days - * before \"endTime\" can be queried Weight: 20 with symbol, 50 without symbol + *

User's Force Orders Weight: **20** (after CM migration: **20** with symbol / **50** + * without symbol) Security Type: USER_DATA Notes: - If \"autoCloseType\" is not sent, + * orders with both of the types will be returned - Only support querying data in the past 90 + * days * * @throws ApiException if the Api call fails */ - public void usersForceOrdersExample() throws ApiException { - String symbol = ""; + public void usersForceOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSD_200925"; AutoCloseType autoCloseType = AutoCloseType.LIQUIDATION; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 30L; Long recvWindow = 5000L; ApiResponse response = getApi().usersForceOrders( diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/CloseUserDataStreamExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/CloseUserDataStreamExample.java index 3bc0b4afb..94c7fb357 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/CloseUserDataStreamExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/CloseUserDataStreamExample.java @@ -5,6 +5,7 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; +import java.io.IOException; /** API examples for UserDataStreamsApi */ public class CloseUserDataStreamExample { @@ -24,13 +25,13 @@ public DerivativesTradingCoinFuturesRestApi getApi() { } /** - * Close User Data Stream(USER_STREAM) + * Close User Data Stream (USER_STREAM) * - *

Close out a user data stream. Weight: 1 + *

Close out a user data stream. Weight(IP): 1 Security Type: USER_STREAM * * @throws ApiException if the Api call fails */ - public void closeUserDataStreamExample() throws ApiException { + public void closeUserDataStreamExample() throws ApiException, IOException { getApi().closeUserDataStream(); } } diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/KeepaliveUserDataStreamExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/KeepaliveUserDataStreamExample.java index 6b2454ec0..c3774d641 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/KeepaliveUserDataStreamExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/KeepaliveUserDataStreamExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.KeepaliveUserDataStreamResponse; +import java.io.IOException; /** API examples for UserDataStreamsApi */ public class KeepaliveUserDataStreamExample { @@ -29,11 +30,11 @@ public DerivativesTradingCoinFuturesRestApi getApi() { * Keepalive User Data Stream (USER_STREAM) * *

Keepalive a user data stream to prevent a time out. User data streams will close after 60 - * minutes. Weight: 1 + * minutes. Weight(IP): 1 Security Type: USER_STREAM * * @throws ApiException if the Api call fails */ - public void keepaliveUserDataStreamExample() throws ApiException { + public void keepaliveUserDataStreamExample() throws ApiException, IOException { ApiResponse response = getApi().keepaliveUserDataStream(); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/StartUserDataStreamExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/StartUserDataStreamExample.java index 28cee903f..783a1a677 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/StartUserDataStreamExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/userdatastreams/StartUserDataStreamExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.rest.DerivativesTradingCoinFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_coin_futures.rest.api.DerivativesTradingCoinFuturesRestApi; import com.binance.connector.client.derivatives_trading_coin_futures.rest.model.StartUserDataStreamResponse; +import java.io.IOException; /** API examples for UserDataStreamsApi */ public class StartUserDataStreamExample { @@ -30,11 +31,12 @@ public DerivativesTradingCoinFuturesRestApi getApi() { * *

Start a new user data stream. The stream will close after 60 minutes unless a keepalive is * sent. If the account has an active `listenKey`, that `listenKey` will be - * returned and its validity will be extended for 60 minutes. Weight: 1 + * returned and its validity will be extended for 60 minutes. Weight(IP): 1 Security Type: + * USER_STREAM * * @throws ApiException if the Api call fails */ - public void startUserDataStreamExample() throws ApiException { + public void startUserDataStreamExample() throws ApiException, IOException { ApiResponse response = getApi().startUserDataStream(); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/account/AccountInformationExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/account/AccountInformationExample.java index 07e0a1a9f..56d85d532 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/account/AccountInformationExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/account/AccountInformationExample.java @@ -29,10 +29,11 @@ public DerivativesTradingCoinFuturesWebSocketApi getApi() { } /** - * Account Information(USER_DATA) + * Account Information (USER_DATA) * *

Get current account information. User in single-asset/ multi-assets mode will see - * different value, see comments in response section for detail. Weight: 5 + * different value, see comments in response section for detail. Weight(IP): 5 Security Type: + * USER_DATA */ public void accountInformationExampleAsync() { AccountInformationRequest accountInformationRequest = new AccountInformationRequest(); @@ -49,10 +50,11 @@ public void accountInformationExampleAsync() { } /** - * Account Information(USER_DATA) + * Account Information (USER_DATA) * *

Get current account information. User in single-asset/ multi-assets mode will see - * different value, see comments in response section for detail. Weight: 5 + * different value, see comments in response section for detail. Weight(IP): 5 Security Type: + * USER_DATA */ public void accountInformationExampleSync() { AccountInformationRequest accountInformationRequest = new AccountInformationRequest(); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/account/FuturesAccountBalanceExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/account/FuturesAccountBalanceExample.java index 88c1b7a93..1810fdf23 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/account/FuturesAccountBalanceExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/account/FuturesAccountBalanceExample.java @@ -29,9 +29,9 @@ public DerivativesTradingCoinFuturesWebSocketApi getApi() { } /** - * Futures Account Balance(USER_DATA) + * Futures Account Balance (USER_DATA) * - *

Query account balance info Weight: 5 + *

Futures Account Balance Weight(IP): 5 Security Type: USER_DATA */ public void futuresAccountBalanceExampleAsync() { FuturesAccountBalanceRequest futuresAccountBalanceRequest = @@ -49,9 +49,9 @@ public void futuresAccountBalanceExampleAsync() { } /** - * Futures Account Balance(USER_DATA) + * Futures Account Balance (USER_DATA) * - *

Query account balance info Weight: 5 + *

Futures Account Balance Weight(IP): 5 Security Type: USER_DATA */ public void futuresAccountBalanceExampleSync() { FuturesAccountBalanceRequest futuresAccountBalanceRequest = diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/CancelOrderExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/CancelOrderExample.java index eeb7c6795..1ae4fd4c9 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/CancelOrderExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/CancelOrderExample.java @@ -31,12 +31,12 @@ public DerivativesTradingCoinFuturesWebSocketApi getApi() { /** * Cancel Order (TRADE) * - *

Cancel an active order. * Either `orderId` or `origClientOrderId` must - * be sent. Weight: 1 + *

Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent. */ public void cancelOrderExampleAsync() { CancelOrderRequest cancelOrderRequest = new CancelOrderRequest(); - cancelOrderRequest.symbol(""); + cancelOrderRequest.symbol("BTCUSD_PERP"); CompletableFuture future = getApi().cancelOrder(cancelOrderRequest); future.handle( (response, error) -> { @@ -51,12 +51,12 @@ public void cancelOrderExampleAsync() { /** * Cancel Order (TRADE) * - *

Cancel an active order. * Either `orderId` or `origClientOrderId` must - * be sent. Weight: 1 + *

Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent. */ public void cancelOrderExampleSync() { CancelOrderRequest cancelOrderRequest = new CancelOrderRequest(); - cancelOrderRequest.symbol(""); + cancelOrderRequest.symbol("BTCUSD_PERP"); CompletableFuture future = getApi().cancelOrder(cancelOrderRequest); CancelOrderResponse response = future.join(); System.out.println(response); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/ModifyOrderExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/ModifyOrderExample.java index 0c3bc255a..54d561f33 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/ModifyOrderExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/ModifyOrderExample.java @@ -33,21 +33,22 @@ public DerivativesTradingCoinFuturesWebSocketApi getApi() { * Modify Order (TRADE) * *

Order modify function, currently only LIMIT order modification is supported, modified - * orders will be reordered in the match queue * Either `orderId` or + * 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); 1 on IP rate + * limit(x-mbx-used-weight-1m) Security Type: TRADE Notes: - Either `orderId` or * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. * Both `quantity` and `price` must be sent, which is different - * from dapi modify order endpoint. * When the new `quantity` or `price` - * doesn'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 - * `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 Weight: 1 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min - * order rate limit(X-MBX-ORDER-COUNT-1M); 1 on IP rate limit(x-mbx-used-weight-1m) + * are sent. - Both `quantity` and `price` must be sent. - When the new + * `quantity` or `price` doesn'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 `quantity` + * <= `executedQty` - When the order is `GTX` and the new price will + * cause it to be executed immediately - One order can only be modified for less than 10000 + * times. */ public void modifyOrderExampleAsync() { ModifyOrderRequest modifyOrderRequest = new ModifyOrderRequest(); - modifyOrderRequest.symbol(""); + modifyOrderRequest.symbol("BTCUSD_PERP"); modifyOrderRequest.side(Side.BUY); modifyOrderRequest.quantity(1.0d); modifyOrderRequest.price(1.0d); @@ -66,21 +67,22 @@ public void modifyOrderExampleAsync() { * Modify Order (TRADE) * *

Order modify function, currently only LIMIT order modification is supported, modified - * orders will be reordered in the match queue * Either `orderId` or + * 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); 1 on IP rate + * limit(x-mbx-used-weight-1m) Security Type: TRADE Notes: - Either `orderId` or * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. * Both `quantity` and `price` must be sent, which is different - * from dapi modify order endpoint. * When the new `quantity` or `price` - * doesn'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 - * `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 Weight: 1 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min - * order rate limit(X-MBX-ORDER-COUNT-1M); 1 on IP rate limit(x-mbx-used-weight-1m) + * are sent. - Both `quantity` and `price` must be sent. - When the new + * `quantity` or `price` doesn'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 `quantity` + * <= `executedQty` - When the order is `GTX` and the new price will + * cause it to be executed immediately - One order can only be modified for less than 10000 + * times. */ public void modifyOrderExampleSync() { ModifyOrderRequest modifyOrderRequest = new ModifyOrderRequest(); - modifyOrderRequest.symbol(""); + modifyOrderRequest.symbol("BTCUSD_PERP"); modifyOrderRequest.side(Side.BUY); modifyOrderRequest.quantity(1.0d); modifyOrderRequest.price(1.0d); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/NewOrderExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/NewOrderExample.java index 6f8ac2b72..1bd12f357 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/NewOrderExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/NewOrderExample.java @@ -6,8 +6,8 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.api.DerivativesTradingCoinFuturesWebSocketApi; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.NewOrderRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.NewOrderResponse; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.OrderType; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.Side; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.api.model.Type; import java.util.concurrent.CompletableFuture; /** API examples for TradeApi */ @@ -31,45 +31,51 @@ public DerivativesTradingCoinFuturesWebSocketApi getApi() { } /** - * New Order(TRADE) + * New Order (TRADE) * - *

Send in a new order. * Order with type `STOP`, parameter `timeInForce` - * can be sent ( default `GTC`). * Order with type `TAKE_PROFIT`, parameter - * `timeInForce` can be sent ( default `GTC`). * Condition orders will be - * triggered when: * If parameter `priceProtect` is sent as true: * when price reaches - * the `stopPrice`,the difference rate between \"MARK_PRICE\" and - * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /dapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed <= - * `activationPrice`, and the latest price >= the lowest price * (1 + - * `callbackRate`) * SELL: the highest price after order placed >= - * `activationPrice`, and the latest price <= the highest price * (1 - - * `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. - * * BUY: `activationPrice` should be smaller than latest price. * SELL: - * `activationPrice` should be larger than latest price. * If - * `newOrderRespType` is sent as `RESULT`: * `MARKET` order: the - * final FILLED result of the order will be return directly. * `LIMIT` order with + *

Send in a new order. Weight(IP): 0 Security Type: TRADE Notes: - Additional mandatory + * parameters based on `type`: | Type | Additional mandatory parameters | | :---: | + * --- | | `LIMIT` | `timeInForce`, `quantity`, `price` + * | | `MARKET` | `quantity` | | `STOP/TAKE_PROFIT` | + * `quantity`, `price`, `stopPrice` | | + * `STOP_MARKET/TAKE_PROFIT_MARKET` | `stopPrice` | | + * `TRAILING_STOP_MARKET` | `callbackRate` | - Order with type + * `STOP`, parameter `timeInForce` can be sent ( default `GTC`). * + * Order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent ( + * default `GTC`). * Condition orders will be triggered when: - If parameter + * `priceProtect` is sent as true: - when price reaches the `stopPrice`,the + * difference rate between \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be + * larger than the \"triggerProtect\" of the symbol - \"triggerProtect\" of + * a symbol can be got from `GET /dapi/v1/exchangeInfo` - `STOP`, + * `STOP_MARKET`: - BUY: latest price (\"MARK_PRICE\" or + * \"CONTRACT_PRICE\") >= `stopPrice` - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` - + * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` - + * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= + * `stopPrice` - `TRAILING_STOP_MARKET`: - BUY: the lowest price after order + * placed <= `activationPrice`, and the latest price >= the lowest + * price * (1 + `callbackRate`) - SELL: the highest price after order placed + * >= `activationPrice`, and the latest price <= the highest price * + * (1 - `callbackRate`) - For `TRAILING_STOP_MARKET`, if you got such error + * code. - BUY: `activationPrice` should be smaller than latest price. - SELL: + * `activationPrice` should be larger than latest price. - If + * `newOrderRespType` is sent as `RESULT`: - `MARKET` order: the + * final FILLED result of the order will be return directly. - `LIMIT` order with * special `timeInForce`: the final status result of the order(FILLED or EXPIRED) will - * be returned directly. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition=true`: * Follow the same rules for condition orders. * If + * be returned directly. - `STOP_MARKET`, `TAKE_PROFIT_MARKET` with + * `closePosition=true`: - Follow the same rules for condition orders. - If * triggered,**close all** current long position(if `SELL`) or current short - * position(if `BUY`). * Cannot be used with `quantity` parameter * Cannot - * be used with `reduceOnly` parameter * In Hedge Mode, cannot be used with + * position(if `BUY`). - Cannot be used with `quantity` parameter - Cannot + * be used with `reduceOnly` parameter - In Hedge Mode, cannot be used with * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side Weight: 0 + * `SELL` orders in `SHORT` position side */ public void newOrderExampleAsync() { NewOrderRequest newOrderRequest = new NewOrderRequest(); - newOrderRequest.symbol(""); + newOrderRequest.symbol("BTCUSD_PERP"); newOrderRequest.side(Side.BUY); - newOrderRequest.type(Type.LIMIT); + newOrderRequest.type(OrderType.LIMIT); CompletableFuture future = getApi().newOrder(newOrderRequest); future.handle( (response, error) -> { @@ -82,45 +88,51 @@ public void newOrderExampleAsync() { } /** - * New Order(TRADE) + * New Order (TRADE) * - *

Send in a new order. * Order with type `STOP`, parameter `timeInForce` - * can be sent ( default `GTC`). * Order with type `TAKE_PROFIT`, parameter - * `timeInForce` can be sent ( default `GTC`). * Condition orders will be - * triggered when: * If parameter `priceProtect` is sent as true: * when price reaches - * the `stopPrice`,the difference rate between \"MARK_PRICE\" and - * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /dapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed <= - * `activationPrice`, and the latest price >= the lowest price * (1 + - * `callbackRate`) * SELL: the highest price after order placed >= - * `activationPrice`, and the latest price <= the highest price * (1 - - * `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. - * * BUY: `activationPrice` should be smaller than latest price. * SELL: - * `activationPrice` should be larger than latest price. * If - * `newOrderRespType` is sent as `RESULT`: * `MARKET` order: the - * final FILLED result of the order will be return directly. * `LIMIT` order with + *

Send in a new order. Weight(IP): 0 Security Type: TRADE Notes: - Additional mandatory + * parameters based on `type`: | Type | Additional mandatory parameters | | :---: | + * --- | | `LIMIT` | `timeInForce`, `quantity`, `price` + * | | `MARKET` | `quantity` | | `STOP/TAKE_PROFIT` | + * `quantity`, `price`, `stopPrice` | | + * `STOP_MARKET/TAKE_PROFIT_MARKET` | `stopPrice` | | + * `TRAILING_STOP_MARKET` | `callbackRate` | - Order with type + * `STOP`, parameter `timeInForce` can be sent ( default `GTC`). * + * Order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent ( + * default `GTC`). * Condition orders will be triggered when: - If parameter + * `priceProtect` is sent as true: - when price reaches the `stopPrice`,the + * difference rate between \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be + * larger than the \"triggerProtect\" of the symbol - \"triggerProtect\" of + * a symbol can be got from `GET /dapi/v1/exchangeInfo` - `STOP`, + * `STOP_MARKET`: - BUY: latest price (\"MARK_PRICE\" or + * \"CONTRACT_PRICE\") >= `stopPrice` - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` - + * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= `stopPrice` - + * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= + * `stopPrice` - `TRAILING_STOP_MARKET`: - BUY: the lowest price after order + * placed <= `activationPrice`, and the latest price >= the lowest + * price * (1 + `callbackRate`) - SELL: the highest price after order placed + * >= `activationPrice`, and the latest price <= the highest price * + * (1 - `callbackRate`) - For `TRAILING_STOP_MARKET`, if you got such error + * code. - BUY: `activationPrice` should be smaller than latest price. - SELL: + * `activationPrice` should be larger than latest price. - If + * `newOrderRespType` is sent as `RESULT`: - `MARKET` order: the + * final FILLED result of the order will be return directly. - `LIMIT` order with * special `timeInForce`: the final status result of the order(FILLED or EXPIRED) will - * be returned directly. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition=true`: * Follow the same rules for condition orders. * If + * be returned directly. - `STOP_MARKET`, `TAKE_PROFIT_MARKET` with + * `closePosition=true`: - Follow the same rules for condition orders. - If * triggered,**close all** current long position(if `SELL`) or current short - * position(if `BUY`). * Cannot be used with `quantity` parameter * Cannot - * be used with `reduceOnly` parameter * In Hedge Mode, cannot be used with + * position(if `BUY`). - Cannot be used with `quantity` parameter - Cannot + * be used with `reduceOnly` parameter - In Hedge Mode, cannot be used with * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side Weight: 0 + * `SELL` orders in `SHORT` position side */ public void newOrderExampleSync() { NewOrderRequest newOrderRequest = new NewOrderRequest(); - newOrderRequest.symbol(""); + newOrderRequest.symbol("BTCUSD_PERP"); newOrderRequest.side(Side.BUY); - newOrderRequest.type(Type.LIMIT); + newOrderRequest.type(OrderType.LIMIT); CompletableFuture future = getApi().newOrder(newOrderRequest); NewOrderResponse response = future.join(); System.out.println(response); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/PositionInformationExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/PositionInformationExample.java index fe650c208..d7b3d0609 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/PositionInformationExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/PositionInformationExample.java @@ -29,10 +29,11 @@ public DerivativesTradingCoinFuturesWebSocketApi getApi() { } /** - * Position Information(USER_DATA) + * Position Information (USER_DATA) * - *

Get current position information. * Please use with user data stream - * `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 5 + *

Get current position information. Weight(IP): 5 Security Type: USER_DATA Notes: - Please + * use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy + * needs. */ public void positionInformationExampleAsync() { PositionInformationRequest positionInformationRequest = new PositionInformationRequest(); @@ -49,10 +50,11 @@ public void positionInformationExampleAsync() { } /** - * Position Information(USER_DATA) + * Position Information (USER_DATA) * - *

Get current position information. * Please use with user data stream - * `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 5 + *

Get current position information. Weight(IP): 5 Security Type: USER_DATA Notes: - Please + * use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy + * needs. */ public void positionInformationExampleSync() { PositionInformationRequest positionInformationRequest = new PositionInformationRequest(); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/QueryOrderExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/QueryOrderExample.java index ce2f687a8..9aa606878 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/QueryOrderExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/QueryOrderExample.java @@ -33,13 +33,13 @@ public DerivativesTradingCoinFuturesWebSocketApi getApi() { * *

Check an order's status. * These orders will not be found: * order status is * `CANCELED` or `EXPIRED` **AND** order has NO filled trade **AND** created - * time + 3 days < current time * order create time + 90 days < current time * Either - * `orderId` or `origClientOrderId` must be sent. * `orderId` is - * self-increment for each specific `symbol` Weight: 1 + * time + 3 days < current time * order create time + 90 days < current time Weight(IP): 1 + * Security Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` + * must be sent. */ public void queryOrderExampleAsync() { QueryOrderRequest queryOrderRequest = new QueryOrderRequest(); - queryOrderRequest.symbol(""); + queryOrderRequest.symbol("BTCUSD_PERP"); CompletableFuture future = getApi().queryOrder(queryOrderRequest); future.handle( (response, error) -> { @@ -56,13 +56,13 @@ public void queryOrderExampleAsync() { * *

Check an order's status. * These orders will not be found: * order status is * `CANCELED` or `EXPIRED` **AND** order has NO filled trade **AND** created - * time + 3 days < current time * order create time + 90 days < current time * Either - * `orderId` or `origClientOrderId` must be sent. * `orderId` is - * self-increment for each specific `symbol` Weight: 1 + * time + 3 days < current time * order create time + 90 days < current time Weight(IP): 1 + * Security Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` + * must be sent. */ public void queryOrderExampleSync() { QueryOrderRequest queryOrderRequest = new QueryOrderRequest(); - queryOrderRequest.symbol(""); + queryOrderRequest.symbol("BTCUSD_PERP"); CompletableFuture future = getApi().queryOrder(queryOrderRequest); QueryOrderResponse response = future.join(); System.out.println(response); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/CloseUserDataStreamExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/CloseUserDataStreamExample.java index c04b21af6..8964ad79c 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/CloseUserDataStreamExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/CloseUserDataStreamExample.java @@ -31,7 +31,7 @@ public DerivativesTradingCoinFuturesWebSocketApi getApi() { /** * Close User Data Stream (USER_STREAM) * - *

Close out a user data stream. Weight: 1 + *

Close out a user data stream. Weight(IP): 1 Security Type: USER_STREAM */ public void closeUserDataStreamExampleAsync() { CloseUserDataStreamRequest closeUserDataStreamRequest = new CloseUserDataStreamRequest(); @@ -50,7 +50,7 @@ public void closeUserDataStreamExampleAsync() { /** * Close User Data Stream (USER_STREAM) * - *

Close out a user data stream. Weight: 1 + *

Close out a user data stream. Weight(IP): 1 Security Type: USER_STREAM */ public void closeUserDataStreamExampleSync() { CloseUserDataStreamRequest closeUserDataStreamRequest = new CloseUserDataStreamRequest(); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/KeepaliveUserDataStreamExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/KeepaliveUserDataStreamExample.java index 233e7c91f..d50d3f8f5 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/KeepaliveUserDataStreamExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/KeepaliveUserDataStreamExample.java @@ -32,7 +32,8 @@ public DerivativesTradingCoinFuturesWebSocketApi getApi() { * Keepalive User Data Stream (USER_STREAM) * *

Keepalive a user data stream to prevent a time out. User data streams will close after 60 - * minutes. It's recommended to send a ping about every 60 minutes. Weight: 1 + * minutes. It's recommended to send a ping about every 60 minutes. Weight(IP): 1 Security + * Type: USER_STREAM */ public void keepaliveUserDataStreamExampleAsync() { KeepaliveUserDataStreamRequest keepaliveUserDataStreamRequest = @@ -53,7 +54,8 @@ public void keepaliveUserDataStreamExampleAsync() { * Keepalive User Data Stream (USER_STREAM) * *

Keepalive a user data stream to prevent a time out. User data streams will close after 60 - * minutes. It's recommended to send a ping about every 60 minutes. Weight: 1 + * minutes. It's recommended to send a ping about every 60 minutes. Weight(IP): 1 Security + * Type: USER_STREAM */ public void keepaliveUserDataStreamExampleSync() { KeepaliveUserDataStreamRequest keepaliveUserDataStreamRequest = diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/StartUserDataStreamExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/StartUserDataStreamExample.java index 752b82b46..268c8168d 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/StartUserDataStreamExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/StartUserDataStreamExample.java @@ -33,7 +33,8 @@ public DerivativesTradingCoinFuturesWebSocketApi getApi() { * *

Start a new user data stream. The stream will close after 60 minutes unless a keepalive is * sent. If the account has an active `listenKey`, that `listenKey` will be - * returned and its validity will be extended for 60 minutes. Weight: 1 + * returned and its validity will be extended for 60 minutes. Weight(IP): 1 Security Type: + * USER_STREAM */ public void startUserDataStreamExampleAsync() { StartUserDataStreamRequest startUserDataStreamRequest = new StartUserDataStreamRequest(); @@ -54,7 +55,8 @@ public void startUserDataStreamExampleAsync() { * *

Start a new user data stream. The stream will close after 60 minutes unless a keepalive is * sent. If the account has an active `listenKey`, that `listenKey` will be - * returned and its validity will be extended for 60 minutes. Weight: 1 + * returned and its validity will be extended for 60 minutes. Weight(IP): 1 Security Type: + * USER_STREAM */ public void startUserDataStreamExampleSync() { StartUserDataStreamRequest startUserDataStreamRequest = new StartUserDataStreamRequest(); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AggregateTradeStreamsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AggregateTradeStreamsExample.java similarity index 86% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AggregateTradeStreamsExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AggregateTradeStreamsExample.java index 784fb9dc8..be58b62f3 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AggregateTradeStreamsExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AggregateTradeStreamsExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AggregateTradeStreamsRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AggregateTradeStreamsResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class AggregateTradeStreamsExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -25,14 +25,15 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { * Aggregate Trade Streams * *

The Aggregate Trade Streams push market trade information that is aggregated for fills - * with same price and taking side every 100 milliseconds. Update Speed: 100ms + * with same price and taking side every 100 milliseconds. > **After CM migration**, the + * payload is appended with a new `st` field (`1` = UM, `2` + * = CM). Update Speed: 100ms * * @throws ApiException if the Api call fails */ public void aggregateTradeStreamsExample() throws ApiException, InterruptedException { AggregateTradeStreamsRequest aggregateTradeStreamsRequest = new AggregateTradeStreamsRequest(); - aggregateTradeStreamsRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().aggregateTradeStreams(aggregateTradeStreamsRequest); while (true) { diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AllBookTickersStreamExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AllBookTickersStreamExample.java similarity index 83% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AllBookTickersStreamExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AllBookTickersStreamExample.java index 6953cbee4..c5102a624 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AllBookTickersStreamExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AllBookTickersStreamExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllBookTickersStreamRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllBookTickersStreamResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class AllBookTickersStreamExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -25,7 +25,10 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { * All Book Tickers Stream * *

Pushes any update to the best bid or ask's price or quantity in real-time for all - * symbols. Update Speed: Real-time + * symbols. > **After CM migration**, this stream pushes the merged UM + CM universe + * (subscribable on both `fstream` and `dstream`); each payload is appended + * with a new `st` field (`1` = UM, `2` = CM). Update + * Speed: Real-time * * @throws ApiException if the Api call fails */ diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AllMarketLiquidationOrderStreamsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AllMarketLiquidationOrderStreamsExample.java similarity index 85% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AllMarketLiquidationOrderStreamsExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AllMarketLiquidationOrderStreamsExample.java index 9899b8191..199f8a56c 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AllMarketLiquidationOrderStreamsExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AllMarketLiquidationOrderStreamsExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketLiquidationOrderStreamsRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketLiquidationOrderStreamsResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class AllMarketLiquidationOrderStreamsExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -27,7 +27,10 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { *

The All Liquidation Order Snapshot Streams push force liquidation order information for * all symbols in the market. For each symbol,only the latest one liquidation order within * 1000ms will be pushed as the snapshot. If no liquidation happens in the interval of 1000ms, - * no stream will be pushed. Update Speed: 1000ms + * no stream will be pushed. > **After CM migration**, this stream pushes the merged UM + CM + * universe (subscribable on both `fstream` and `dstream`); each payload is + * appended with a new `st` field (`1` = UM, `2` = CM). + * Update Speed: 1000ms * * @throws ApiException if the Api call fails */ diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AllMarketMiniTickersStreamExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AllMarketMiniTickersStreamExample.java similarity index 83% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AllMarketMiniTickersStreamExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AllMarketMiniTickersStreamExample.java index db5a324cf..54c85ec23 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AllMarketMiniTickersStreamExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AllMarketMiniTickersStreamExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketMiniTickersStreamRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketMiniTickersStreamResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class AllMarketMiniTickersStreamExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -26,7 +26,10 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { * *

24hr rolling window mini-ticker statistics for all symbols. These are NOT the statistics * of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Note that only - * tickers that have changed will be present in the array. Update Speed: 1000ms + * tickers that have changed will be present in the array. > **After CM migration**, this + * stream pushes the merged UM + CM universe (subscribable on both `fstream` and + * `dstream`); each payload is appended with a new `st` field (`1` + * = UM, `2` = CM). Update Speed: 1000ms * * @throws ApiException if the Api call fails */ diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AllMarketTickersStreamsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AllMarketTickersStreamsExample.java similarity index 83% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AllMarketTickersStreamsExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AllMarketTickersStreamsExample.java index 61d75bc9c..f014e45be 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/AllMarketTickersStreamsExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/AllMarketTickersStreamsExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketTickersStreamsRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AllMarketTickersStreamsResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class AllMarketTickersStreamsExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -26,7 +26,10 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { * *

24hr rolling window ticker statistics for all symbols. These are NOT the statistics of the * UTC day, but a 24hr rolling window from requestTime to 24hrs before. Note that only tickers - * that have changed will be present in the array. Update Speed: 1000ms + * that have changed will be present in the array. > **After CM migration**, this stream + * pushes the merged UM + CM universe (subscribable on both `fstream` and + * `dstream`); each payload is appended with a new `st` field (`1` + * = UM, `2` = CM). Update Speed: 1000ms * * @throws ApiException if the Api call fails */ diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/ContinuousContractKlineCandlestickStreamsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/ContinuousContractKlineCandlestickStreamsExample.java similarity index 84% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/ContinuousContractKlineCandlestickStreamsExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/ContinuousContractKlineCandlestickStreamsExample.java index 5411245af..0df95e6eb 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/ContinuousContractKlineCandlestickStreamsExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/ContinuousContractKlineCandlestickStreamsExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.ContinuousContractKlineCandlestickStreamsRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.ContinuousContractKlineCandlestickStreamsResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class ContinuousContractKlineCandlestickStreamsExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -24,7 +24,9 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { /** * Continuous Contract Kline/Candlestick Streams * - *

Kline update every second Update Speed: 250ms + *

Kline update every second > **After CM migration**, both `fstream` and + * `dstream` may subscribe to either UM or CM symbols on this stream. Update Speed: + * 250ms * * @throws ApiException if the Api call fails */ @@ -33,9 +35,6 @@ public void continuousContractKlineCandlestickStreamsExample() ContinuousContractKlineCandlestickStreamsRequest continuousContractKlineCandlestickStreamsRequest = new ContinuousContractKlineCandlestickStreamsRequest(); - continuousContractKlineCandlestickStreamsRequest.pair("btcusdt"); - continuousContractKlineCandlestickStreamsRequest.contractType("next_quarter"); - continuousContractKlineCandlestickStreamsRequest.interval("1m"); StreamBlockingQueueWrapper response = getApi().continuousContractKlineCandlestickStreams( continuousContractKlineCandlestickStreamsRequest); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/ContractInfoStreamExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/ContractInfoStreamExample.java similarity index 81% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/ContractInfoStreamExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/ContractInfoStreamExample.java index 19d08cff9..5d9092c0f 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/ContractInfoStreamExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/ContractInfoStreamExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.ContractInfoStreamRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.ContractInfoStreamResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class ContractInfoStreamExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -25,8 +25,10 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { * Contract Info Stream * *

ContractInfo stream pushes when contract info updates(listing/settlement/contract bracket - * update). `bks` field only shows up when bracket gets updated. Update Speed: - * Real-time + * update). bks field only shows up when bracket gets updated. > **After CM migration**, this + * stream pushes the merged UM + CM universe (subscribable on both `fstream` and + * `dstream`); each payload is appended with a new `st` field (`1` + * = UM, `2` = CM). Update Speed: Real-time * * @throws ApiException if the Api call fails */ diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/DiffBookDepthStreamsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/DiffBookDepthStreamsExample.java similarity index 86% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/DiffBookDepthStreamsExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/DiffBookDepthStreamsExample.java index 07a5945a8..fc67d757b 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/DiffBookDepthStreamsExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/DiffBookDepthStreamsExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.DiffBookDepthStreamsRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.DiffBookDepthStreamsResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class DiffBookDepthStreamsExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -24,14 +24,14 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { /** * Diff. Book Depth Streams * - *

Bids and asks, pushed every 250 milliseconds, 500 milliseconds, or 100 milliseconds Update - * Speed: 250ms or 500ms or 100ms + *

Bids and asks, pushed every 250 milliseconds, 500 milliseconds, or 100 milliseconds > + * **After CM migration**, the payload is appended with a new `st` field + * (`1` = UM, `2` = CM). Update Speed: 250ms or 500ms or 100ms * * @throws ApiException if the Api call fails */ public void diffBookDepthStreamsExample() throws ApiException, InterruptedException { DiffBookDepthStreamsRequest diffBookDepthStreamsRequest = new DiffBookDepthStreamsRequest(); - diffBookDepthStreamsRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().diffBookDepthStreams(diffBookDepthStreamsRequest); while (true) { diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndexKlineCandlestickStreamsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndexKlineCandlestickStreamsExample.java similarity index 87% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndexKlineCandlestickStreamsExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndexKlineCandlestickStreamsExample.java index 02bef6859..d84f78cd4 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndexKlineCandlestickStreamsExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndexKlineCandlestickStreamsExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndexKlineCandlestickStreamsRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndexKlineCandlestickStreamsResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class IndexKlineCandlestickStreamsExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -24,15 +24,14 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { /** * Index Kline/Candlestick Streams * - *

Index Kline/Candlestick Streams Update Speed: 250ms + *

Index Kline/Candlestick Streams > **After CM migration**, both `fstream` and + * `dstream` may subscribe to CM symbols on this stream. Update Speed: 250ms * * @throws ApiException if the Api call fails */ public void indexKlineCandlestickStreamsExample() throws ApiException, InterruptedException { IndexKlineCandlestickStreamsRequest indexKlineCandlestickStreamsRequest = new IndexKlineCandlestickStreamsRequest(); - indexKlineCandlestickStreamsRequest.pair("btcusdt"); - indexKlineCandlestickStreamsRequest.interval("1m"); StreamBlockingQueueWrapper response = getApi().indexKlineCandlestickStreams(indexKlineCandlestickStreamsRequest); while (true) { diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndexPriceStreamExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndexPriceStreamExample.java similarity index 92% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndexPriceStreamExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndexPriceStreamExample.java index 85a85a043..ecb7ee0f2 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndexPriceStreamExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndexPriceStreamExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndexPriceStreamRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndexPriceStreamResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class IndexPriceStreamExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -30,7 +30,6 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { */ public void indexPriceStreamExample() throws ApiException, InterruptedException { IndexPriceStreamRequest indexPriceStreamRequest = new IndexPriceStreamRequest(); - indexPriceStreamRequest.pair("btcusdt"); StreamBlockingQueueWrapper response = getApi().indexPriceStream(indexPriceStreamRequest); while (true) { diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndividualSymbolBookTickerStreamsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndividualSymbolBookTickerStreamsExample.java similarity index 88% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndividualSymbolBookTickerStreamsExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndividualSymbolBookTickerStreamsExample.java index 770ae73bf..16ea7ba31 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndividualSymbolBookTickerStreamsExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndividualSymbolBookTickerStreamsExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolBookTickerStreamsRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolBookTickerStreamsResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class IndividualSymbolBookTickerStreamsExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -25,7 +25,9 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { * Individual Symbol Book Ticker Streams * *

Pushes any update to the best bid or ask's price or quantity in real-time for a - * specified symbol. Update Speed: Real-time + * specified symbol. > **After CM migration**, the payload is appended with a new + * `st` field (`1` = UM, `2` = CM). Update Speed: + * Real-time * * @throws ApiException if the Api call fails */ @@ -33,7 +35,6 @@ public void individualSymbolBookTickerStreamsExample() throws ApiException, InterruptedException { IndividualSymbolBookTickerStreamsRequest individualSymbolBookTickerStreamsRequest = new IndividualSymbolBookTickerStreamsRequest(); - individualSymbolBookTickerStreamsRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().individualSymbolBookTickerStreams( individualSymbolBookTickerStreamsRequest); diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndividualSymbolMiniTickerStreamExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndividualSymbolMiniTickerStreamExample.java similarity index 88% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndividualSymbolMiniTickerStreamExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndividualSymbolMiniTickerStreamExample.java index 7fa6b661f..532377af8 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndividualSymbolMiniTickerStreamExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndividualSymbolMiniTickerStreamExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolMiniTickerStreamRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolMiniTickerStreamResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class IndividualSymbolMiniTickerStreamExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -25,8 +25,9 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { * Individual Symbol Mini Ticker Stream * *

24hr rolling window mini-ticker statistics for a single symbol. These are NOT the - * statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Update - * Speed: 500ms + * statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. > + * **After CM migration**, the payload is appended with a new `st` field + * (`1` = UM, `2` = CM). Update Speed: 500ms * * @throws ApiException if the Api call fails */ @@ -34,7 +35,6 @@ public void individualSymbolMiniTickerStreamExample() throws ApiException, InterruptedException { IndividualSymbolMiniTickerStreamRequest individualSymbolMiniTickerStreamRequest = new IndividualSymbolMiniTickerStreamRequest(); - individualSymbolMiniTickerStreamRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().individualSymbolMiniTickerStream(individualSymbolMiniTickerStreamRequest); while (true) { diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndividualSymbolTickerStreamsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndividualSymbolTickerStreamsExample.java similarity index 89% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndividualSymbolTickerStreamsExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndividualSymbolTickerStreamsExample.java index ed4f117b3..89ae808e8 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/IndividualSymbolTickerStreamsExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/IndividualSymbolTickerStreamsExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolTickerStreamsRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.IndividualSymbolTickerStreamsResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class IndividualSymbolTickerStreamsExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -25,14 +25,15 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { * Individual Symbol Ticker Streams * *

24hr rolling window ticker statistics for a single symbol. These are NOT the statistics of - * the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Update Speed: 500ms + * the UTC day, but a 24hr rolling window from requestTime to 24hrs before. > **After CM + * migration**, the payload is appended with a new `st` field (`1` = + * UM, `2` = CM). Update Speed: 500ms * * @throws ApiException if the Api call fails */ public void individualSymbolTickerStreamsExample() throws ApiException, InterruptedException { IndividualSymbolTickerStreamsRequest individualSymbolTickerStreamsRequest = new IndividualSymbolTickerStreamsRequest(); - individualSymbolTickerStreamsRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().individualSymbolTickerStreams(individualSymbolTickerStreamsRequest); while (true) { diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/KlineCandlestickStreamsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/KlineCandlestickStreamsExample.java similarity index 87% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/KlineCandlestickStreamsExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/KlineCandlestickStreamsExample.java index 72a618121..e47f1e1a1 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/KlineCandlestickStreamsExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/KlineCandlestickStreamsExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.KlineCandlestickStreamsRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.KlineCandlestickStreamsResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class KlineCandlestickStreamsExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -25,15 +25,15 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { * Kline/Candlestick Streams * *

The Kline/Candlestick Stream push updates to the current klines/candlestick every 250 - * milliseconds (if existing). Update Speed: 250ms + * milliseconds (if existing). > **After CM migration**, both `fstream` and + * `dstream` may subscribe to either UM or CM symbols on this stream. Update Speed: + * 250ms * * @throws ApiException if the Api call fails */ public void klineCandlestickStreamsExample() throws ApiException, InterruptedException { KlineCandlestickStreamsRequest klineCandlestickStreamsRequest = new KlineCandlestickStreamsRequest(); - klineCandlestickStreamsRequest.symbol("btcusdt"); - klineCandlestickStreamsRequest.interval("1m"); StreamBlockingQueueWrapper response = getApi().klineCandlestickStreams(klineCandlestickStreamsRequest); while (true) { diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/MarkPriceKlineCandlestickStreamsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/MarkPriceKlineCandlestickStreamsExample.java similarity index 87% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/MarkPriceKlineCandlestickStreamsExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/MarkPriceKlineCandlestickStreamsExample.java index c0e6d269b..c7c365a19 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/MarkPriceKlineCandlestickStreamsExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/MarkPriceKlineCandlestickStreamsExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceKlineCandlestickStreamsRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceKlineCandlestickStreamsResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class MarkPriceKlineCandlestickStreamsExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -24,7 +24,8 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { /** * Mark Price Kline/Candlestick Streams * - *

Mark Price Kline/Candlestick Streams Update Speed: 250ms + *

Mark Price Kline/Candlestick Streams > **After CM migration**, both `fstream` + * and `dstream` may subscribe to CM symbols on this stream. Update Speed: 250ms * * @throws ApiException if the Api call fails */ @@ -32,8 +33,6 @@ public void markPriceKlineCandlestickStreamsExample() throws ApiException, InterruptedException { MarkPriceKlineCandlestickStreamsRequest markPriceKlineCandlestickStreamsRequest = new MarkPriceKlineCandlestickStreamsRequest(); - markPriceKlineCandlestickStreamsRequest.symbol("btcusdt"); - markPriceKlineCandlestickStreamsRequest.interval("1m"); StreamBlockingQueueWrapper response = getApi().markPriceKlineCandlestickStreams(markPriceKlineCandlestickStreamsRequest); while (true) { diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/MarkPriceOfAllSymbolsOfAPairExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/MarkPriceOfAllSymbolsOfAPairExample.java similarity index 82% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/MarkPriceOfAllSymbolsOfAPairExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/MarkPriceOfAllSymbolsOfAPairExample.java index 70b7454e8..eb7322cf5 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/MarkPriceOfAllSymbolsOfAPairExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/MarkPriceOfAllSymbolsOfAPairExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceOfAllSymbolsOfAPairRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceOfAllSymbolsOfAPairResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class MarkPriceOfAllSymbolsOfAPairExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -24,14 +24,16 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { /** * Mark Price of All Symbols of a Pair * - *

Mark Price of All Symbols of a Pair Update Speed: 3000ms OR 1000ms + *

Mark Price of All Symbols of a Pair > **After CM migration**, the payload is appended + * with a new `st` field (`1` = UM, `2` = CM); both + * `fstream` and `dstream` may subscribe to either UM or CM symbols on this + * stream. Update Speed: 3000ms OR 1000ms * * @throws ApiException if the Api call fails */ public void markPriceOfAllSymbolsOfAPairExample() throws ApiException, InterruptedException { MarkPriceOfAllSymbolsOfAPairRequest markPriceOfAllSymbolsOfAPairRequest = new MarkPriceOfAllSymbolsOfAPairRequest(); - markPriceOfAllSymbolsOfAPairRequest.pair("btcusdt"); StreamBlockingQueueWrapper response = getApi().markPriceOfAllSymbolsOfAPair(markPriceOfAllSymbolsOfAPairRequest); while (true) { diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/MarkPriceStreamExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/MarkPriceStreamExample.java similarity index 81% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/MarkPriceStreamExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/MarkPriceStreamExample.java index 52006ce92..dc802f68b 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/MarkPriceStreamExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/MarkPriceStreamExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceStreamRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceStreamResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class MarkPriceStreamExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -24,13 +24,15 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { /** * Mark Price Stream * - *

Mark price update stream Update Speed: 3000ms OR 1000ms + *

Mark price update stream > **After CM migration**, the payload is appended with a new + * `st` field (`1` = UM, `2` = CM); both + * `fstream` and `dstream` may subscribe to either UM or CM symbols on this + * stream. Update Speed: 3000ms OR 1000ms * * @throws ApiException if the Api call fails */ public void markPriceStreamExample() throws ApiException, InterruptedException { MarkPriceStreamRequest markPriceStreamRequest = new MarkPriceStreamRequest(); - markPriceStreamRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().markPriceStream(markPriceStreamRequest); while (true) { diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/MarketLiquidationOrderStreamsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/MarketLiquidationOrderStreamsExample.java new file mode 100644 index 000000000..78336fb39 --- /dev/null +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/MarketLiquidationOrderStreamsExample.java @@ -0,0 +1,43 @@ +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.DerivativesTradingCoinFuturesWebSocketStreamsUtil; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DerivativesTradingCoinFuturesWebSocketStreams; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarketLiquidationOrderStreamsRequest; +import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarketLiquidationOrderStreamsResponse; + +/** API examples for DefaultApi */ +public class MarketLiquidationOrderStreamsExample { + private DerivativesTradingCoinFuturesWebSocketStreams api; + + public DerivativesTradingCoinFuturesWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + DerivativesTradingCoinFuturesWebSocketStreamsUtil.getClientConfiguration(); + api = new DerivativesTradingCoinFuturesWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * Market Liquidation Order Streams + * + *

The Liquidation Order Snapshot Streams push force liquidation order information for + * specific symbol. For each symbol,only the latest one liquidation order within 1000ms will be + * pushed as the snapshot. If no liquidation happens in the interval of 1000ms, no stream will + * be pushed. Update Speed: 1000ms + * + * @throws ApiException if the Api call fails + */ + public void marketLiquidationOrderStreamsExample() throws ApiException, InterruptedException { + MarketLiquidationOrderStreamsRequest marketLiquidationOrderStreamsRequest = + new MarketLiquidationOrderStreamsRequest(); + StreamBlockingQueueWrapper response = + getApi().marketLiquidationOrderStreams(marketLiquidationOrderStreamsRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/PartialBookDepthStreamsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/PartialBookDepthStreamsExample.java similarity index 84% rename from examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/PartialBookDepthStreamsExample.java rename to examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/PartialBookDepthStreamsExample.java index 530ee41ff..c53762390 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/PartialBookDepthStreamsExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/defaultpkg/PartialBookDepthStreamsExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; +package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.PartialBookDepthStreamsRequest; import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.PartialBookDepthStreamsResponse; -/** API examples for WebsocketMarketStreamsApi */ +/** API examples for DefaultApi */ public class PartialBookDepthStreamsExample { private DerivativesTradingCoinFuturesWebSocketStreams api; @@ -24,16 +24,15 @@ public DerivativesTradingCoinFuturesWebSocketStreams getApi() { /** * Partial Book Depth Streams * - *

Top **<levels\\>** bids and asks, Valid **<levels\\>** are 5, 10, or 20. - * Update Speed: 250ms, 500ms or 100ms + *

Top levels bids and asks. > **After CM migration**, the payload is appended with a new + * `st` field (`1` = UM, `2` = CM). Update Speed: 250ms, + * 500ms or 100ms * * @throws ApiException if the Api call fails */ public void partialBookDepthStreamsExample() throws ApiException, InterruptedException { PartialBookDepthStreamsRequest partialBookDepthStreamsRequest = new PartialBookDepthStreamsRequest(); - partialBookDepthStreamsRequest.symbol("btcusdt"); - partialBookDepthStreamsRequest.levels(10L); StreamBlockingQueueWrapper response = getApi().partialBookDepthStreams(partialBookDepthStreamsRequest); while (true) { diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/LiquidationOrderStreamsExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/LiquidationOrderStreamsExample.java deleted file mode 100644 index de61718f4..000000000 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/websocketmarketstreams/LiquidationOrderStreamsExample.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.websocketmarketstreams; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; -import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.DerivativesTradingCoinFuturesWebSocketStreamsUtil; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.api.DerivativesTradingCoinFuturesWebSocketStreams; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.LiquidationOrderStreamsRequest; -import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.LiquidationOrderStreamsResponse; - -/** API examples for WebsocketMarketStreamsApi */ -public class LiquidationOrderStreamsExample { - private DerivativesTradingCoinFuturesWebSocketStreams api; - - public DerivativesTradingCoinFuturesWebSocketStreams getApi() { - if (api == null) { - WebSocketClientConfiguration clientConfiguration = - DerivativesTradingCoinFuturesWebSocketStreamsUtil.getClientConfiguration(); - api = new DerivativesTradingCoinFuturesWebSocketStreams(clientConfiguration); - } - return api; - } - - /** - * Liquidation Order Streams - * - *

The Liquidation Order Snapshot Streams push force liquidation order information for - * specific symbol. For each symbol,only the latest one liquidation order within 1000ms will be - * pushed as the snapshot. If no liquidation happens in the interval of 1000ms, no stream will - * be pushed. Update Speed: 1000ms - * - * @throws ApiException if the Api call fails - */ - public void liquidationOrderStreamsExample() throws ApiException, InterruptedException { - LiquidationOrderStreamsRequest liquidationOrderStreamsRequest = - new LiquidationOrderStreamsRequest(); - liquidationOrderStreamsRequest.symbol("btcusdt"); - StreamBlockingQueueWrapper response = - getApi().liquidationOrderStreams(liquidationOrderStreamsRequest); - while (true) { - System.out.println(response.take()); - } - } -} diff --git a/examples/derivatives-trading-options/pom.xml b/examples/derivatives-trading-options/pom.xml index be5fa05ec..47313fae5 100644 --- a/examples/derivatives-trading-options/pom.xml +++ b/examples/derivatives-trading-options/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-derivatives-trading-options - 8.0.0 + 9.0.0 \ No newline at end of file diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/account/AccountFundingFlowExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/account/AccountFundingFlowExample.java index f5319b368..d95a374b5 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/account/AccountFundingFlowExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/account/AccountFundingFlowExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.AccountFundingFlowResponse; +import com.binance.connector.client.derivatives_trading_options.rest.model.Currency; +import java.io.IOException; /** API examples for AccountApi */ public class AccountFundingFlowExample { @@ -28,16 +30,17 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Account Funding Flow (USER_DATA) * - *

Query account funding flows. * Only support querying data in the past 3 months Weight: 1 + *

Query account funding flows. Weight(IP): 1 Security Type: USER_DATA Notes: - Only support + * querying data in the past 3 months * * @throws ApiException if the Api call fails */ - public void accountFundingFlowExample() throws ApiException { - String currency = ""; - Long recordId = 1L; + public void accountFundingFlowExample() throws ApiException, IOException { + Currency currency = Currency.USDT; + Long recordId = 100000L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 20L; Long recvWindow = 5000L; ApiResponse response = getApi().accountFundingFlow( diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/account/OptionMarginAccountInformationExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/account/OptionMarginAccountInformationExample.java index 633131c0a..e8ec5a5ed 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/account/OptionMarginAccountInformationExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/account/OptionMarginAccountInformationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.OptionMarginAccountInformationResponse; +import java.io.IOException; /** API examples for AccountApi */ public class OptionMarginAccountInformationExample { @@ -28,11 +29,11 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Option Margin Account Information (USER_DATA) * - *

Get current account information. Weight: 3 + *

Get current account information. Weight(IP): 3 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void optionMarginAccountInformationExample() throws ApiException { + public void optionMarginAccountInformationExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().optionMarginAccountInformation(recvWindow); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/CheckServerTimeExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/CheckServerTimeExample.java index 3060df798..bddb4ea03 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/CheckServerTimeExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/CheckServerTimeExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.CheckServerTimeResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class CheckServerTimeExample { @@ -28,11 +29,11 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Check Server Time * - *

Test connectivity to the Rest API and get the current server time. Weight: 1 + *

Test connectivity to the Rest API and get the current server time. Weight(IP): 1 * * @throws ApiException if the Api call fails */ - public void checkServerTimeExample() throws ApiException { + public void checkServerTimeExample() throws ApiException, IOException { ApiResponse response = getApi().checkServerTime(); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/ExchangeInformationExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/ExchangeInformationExample.java index a0f3e2db6..b2595f4b7 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/ExchangeInformationExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/ExchangeInformationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.ExchangeInformationResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class ExchangeInformationExample { @@ -28,11 +29,11 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Exchange Information * - *

Current exchange trading rules and symbol information Weight: 1 + *

Current exchange trading rules and symbol information Weight(IP): 1 * * @throws ApiException if the Api call fails */ - public void exchangeInformationExample() throws ApiException { + public void exchangeInformationExample() throws ApiException, IOException { ApiResponse response = getApi().exchangeInformation(); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/HistoricalExerciseRecordsExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/HistoricalExerciseRecordsExample.java index fae97db33..0561df730 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/HistoricalExerciseRecordsExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/HistoricalExerciseRecordsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.HistoricalExerciseRecordsResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class HistoricalExerciseRecordsExample { @@ -29,15 +30,15 @@ public DerivativesTradingOptionsRestApi getApi() { * Historical Exercise Records * *

Get historical exercise records. * REALISTIC_VALUE_STRICKEN -> Exercised * - * EXTRINSIC_VALUE_EXPIRED -> Expired OTM Weight: 3 + * EXTRINSIC_VALUE_EXPIRED -> Expired OTM Weight(IP): 3 * * @throws ApiException if the Api call fails */ - public void historicalExerciseRecordsExample() throws ApiException { - String underlying = ""; + public void historicalExerciseRecordsExample() throws ApiException, IOException { + String underlying = "BTCUSDT"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 20L; ApiResponse response = getApi().historicalExerciseRecords(underlying, startTime, endTime, limit); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/IndexPriceExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/IndexPriceExample.java index b0883f1bb..0c8826619 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/IndexPriceExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/IndexPriceExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.IndexPriceResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class IndexPriceExample { @@ -28,12 +29,12 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Index Price * - *

Get spot index price for option underlying. Weight: 1 + *

Get spot index price for option underlying. Weight(IP): 1 * * @throws ApiException if the Api call fails */ - public void indexPriceExample() throws ApiException { - String underlying = ""; + public void indexPriceExample() throws ApiException, IOException { + String underlying = "BTCUSDT"; ApiResponse response = getApi().indexPrice(underlying); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/KlineCandlestickDataExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/KlineCandlestickDataExample.java index afd490edb..c5e399467 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/KlineCandlestickDataExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/KlineCandlestickDataExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; +import com.binance.connector.client.derivatives_trading_options.rest.model.Interval; import com.binance.connector.client.derivatives_trading_options.rest.model.KlineCandlestickDataResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class KlineCandlestickDataExample { @@ -29,16 +31,17 @@ public DerivativesTradingOptionsRestApi getApi() { * Kline/Candlestick Data * *

Kline/candlestick bars for an option symbol. Klines are uniquely identified by their open - * time. * If startTime and endTime are not sent, the most recent klines are returned. Weight: 1 + * time. Weight(IP): 1 Notes: - If startTime and endTime are not sent, the most recent klines + * are returned. * * @throws ApiException if the Api call fails */ - public void klineCandlestickDataExample() throws ApiException { - String symbol = ""; - String interval = ""; + public void klineCandlestickDataExample() throws ApiException, IOException { + String symbol = "BTC-200730-9000-C"; + Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 20L; ApiResponse response = getApi().klineCandlestickData(symbol, interval, startTime, endTime, limit); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OpenInterestExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OpenInterestExample.java index a84d0df75..47918309c 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OpenInterestExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OpenInterestExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.OpenInterestResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class OpenInterestExample { @@ -28,13 +29,13 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Open Interest * - *

Get open interest for specific underlying asset on specific expiration date. Weight: 0 + *

Get open interest for specific underlying asset on specific expiration date. Weight(IP): 0 * * @throws ApiException if the Api call fails */ - public void openInterestExample() throws ApiException { - String underlyingAsset = ""; - String expiration = ""; + public void openInterestExample() throws ApiException, IOException { + String underlyingAsset = "ETH/BTC"; + String expiration = "221225"; ApiResponse response = getApi().openInterest(underlyingAsset, expiration); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OptionMarkPriceExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OptionMarkPriceExample.java index 25f4adfda..e76ad7dfc 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OptionMarkPriceExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OptionMarkPriceExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.OptionMarkPriceResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class OptionMarkPriceExample { @@ -28,12 +29,12 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Option Mark Price * - *

Option mark price and greek info. Weight: 5 + *

Option mark price and greek info. Weight(IP): 5 * * @throws ApiException if the Api call fails */ - public void optionMarkPriceExample() throws ApiException { - String symbol = ""; + public void optionMarkPriceExample() throws ApiException, IOException { + String symbol = "BTC-200730-9000-C"; ApiResponse response = getApi().optionMarkPrice(symbol); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OrderBookExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OrderBookExample.java index 9d3c4d8d7..efc69ed03 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OrderBookExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/OrderBookExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.OrderBookResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class OrderBookExample { @@ -33,9 +34,9 @@ public DerivativesTradingOptionsRestApi getApi() { * * @throws ApiException if the Api call fails */ - public void orderBookExample() throws ApiException { - String symbol = ""; - Long limit = 100L; + public void orderBookExample() throws ApiException, IOException { + String symbol = "BTC-200730-9000-C"; + Long limit = 20L; ApiResponse response = getApi().orderBook(symbol, limit); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/RecentBlockTradesListExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/RecentBlockTradesListExample.java index 6476d964c..af52ca23b 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/RecentBlockTradesListExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/RecentBlockTradesListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.RecentBlockTradesListResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class RecentBlockTradesListExample { @@ -28,13 +29,13 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Recent Block Trades List * - *

Get recent block trades Weight: 5 + *

Get recent block trades Weight(IP): 5 * * @throws ApiException if the Api call fails */ - public void recentBlockTradesListExample() throws ApiException { - String symbol = ""; - Long limit = 100L; + public void recentBlockTradesListExample() throws ApiException, IOException { + String symbol = "BTC-200730-9000-C"; + Long limit = 20L; ApiResponse response = getApi().recentBlockTradesList(symbol, limit); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/RecentTradesListExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/RecentTradesListExample.java index 96fed7d33..7b7928a22 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/RecentTradesListExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/RecentTradesListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.RecentTradesListResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class RecentTradesListExample { @@ -28,13 +29,13 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Recent Trades List * - *

Get recent market trades Weight: 5 + *

Get recent market trades Weight(IP): 5 * * @throws ApiException if the Api call fails */ - public void recentTradesListExample() throws ApiException { - String symbol = ""; - Long limit = 100L; + public void recentTradesListExample() throws ApiException, IOException { + String symbol = "BTC-200730-9000-C"; + Long limit = 20L; ApiResponse response = getApi().recentTradesList(symbol, limit); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/TestConnectivityExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/TestConnectivityExample.java index 41e3d9e05..665faf394 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/TestConnectivityExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/TestConnectivityExample.java @@ -5,6 +5,7 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; +import java.io.IOException; /** API examples for MarketDataApi */ public class TestConnectivityExample { @@ -26,11 +27,11 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Test Connectivity * - *

Test connectivity to the Rest API. Weight: 1 + *

Test connectivity to the Rest API. Weight(IP): 1 * * @throws ApiException if the Api call fails */ - public void testConnectivityExample() throws ApiException { + public void testConnectivityExample() throws ApiException, IOException { getApi().testConnectivity(); } } diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java index 0fb85b3fd..1481c0c87 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.Ticker24hrPriceChangeStatisticsResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class Ticker24hrPriceChangeStatisticsExample { @@ -28,12 +29,13 @@ public DerivativesTradingOptionsRestApi getApi() { /** * 24hr Ticker Price Change Statistics * - *

24 hour rolling window price change statistics. Weight: 5 + *

24 hour rolling window price change statistics. Weight: 1 for a single symbol; 40 when the + * symbol parameter is omitted * * @throws ApiException if the Api call fails */ - public void ticker24hrPriceChangeStatisticsExample() throws ApiException { - String symbol = ""; + public void ticker24hrPriceChangeStatisticsExample() throws ApiException, IOException { + String symbol = "BTC-200730-9000-C"; ApiResponse response = getApi().ticker24hrPriceChangeStatistics(symbol); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/AcceptBlockTradeOrderExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/AcceptBlockTradeOrderExample.java index 8803c1c25..30963f11f 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/AcceptBlockTradeOrderExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/AcceptBlockTradeOrderExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.AcceptBlockTradeOrderRequest; import com.binance.connector.client.derivatives_trading_options.rest.model.AcceptBlockTradeOrderResponse; +import java.io.IOException; /** API examples for MarketMakerBlockTradeApi */ public class AcceptBlockTradeOrderExample { @@ -29,14 +30,14 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Accept Block Trade Order (TRADE) * - *

Accept a block trade order Weight: 5 + *

Accept a block trade order Weight(IP): 5 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void acceptBlockTradeOrderExample() throws ApiException { + public void acceptBlockTradeOrderExample() throws ApiException, IOException { AcceptBlockTradeOrderRequest acceptBlockTradeOrderRequest = new AcceptBlockTradeOrderRequest(); - acceptBlockTradeOrderRequest.blockOrderMatchingKey(""); + acceptBlockTradeOrderRequest.blockOrderMatchingKey("7d046e6e-a429-4335-ab9d-6a681febcde5"); ApiResponse response = getApi().acceptBlockTradeOrder(acceptBlockTradeOrderRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/AccountBlockTradeListExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/AccountBlockTradeListExample.java index 8b88a778d..7a3b15566 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/AccountBlockTradeListExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/AccountBlockTradeListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.AccountBlockTradeListResponse; +import java.io.IOException; /** API examples for MarketMakerBlockTradeApi */ public class AccountBlockTradeListExample { @@ -28,14 +29,14 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Account Block Trade List (USER_DATA) * - *

Gets block trades for a specific account. Weight: 5 + *

Gets block trades for a specific account. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void accountBlockTradeListExample() throws ApiException { + public void accountBlockTradeListExample() throws ApiException, IOException { Long endTime = 1641782889000L; Long startTime = 1623319461670L; - String underlying = ""; + String underlying = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().accountBlockTradeList(endTime, startTime, underlying, recvWindow); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/CancelBlockTradeOrderExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/CancelBlockTradeOrderExample.java index b0905520a..743d255b1 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/CancelBlockTradeOrderExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/CancelBlockTradeOrderExample.java @@ -5,6 +5,7 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; +import java.io.IOException; /** API examples for MarketMakerBlockTradeApi */ public class CancelBlockTradeOrderExample { @@ -26,12 +27,12 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Cancel Block Trade Order (TRADE) * - *

Cancel a block trade order. Weight: 5 + *

Cancel a block trade order. Weight(IP): 5 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void cancelBlockTradeOrderExample() throws ApiException { - String blockOrderMatchingKey = ""; + public void cancelBlockTradeOrderExample() throws ApiException, IOException { + String blockOrderMatchingKey = "7d046e6e-a429-4335-ab9d-6a681febcde5"; Long recvWindow = 5000L; getApi().cancelBlockTradeOrder(blockOrderMatchingKey, recvWindow); } diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/ExtendBlockTradeOrderExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/ExtendBlockTradeOrderExample.java index fb425e756..7c8137eb1 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/ExtendBlockTradeOrderExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/ExtendBlockTradeOrderExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.ExtendBlockTradeOrderRequest; import com.binance.connector.client.derivatives_trading_options.rest.model.ExtendBlockTradeOrderResponse; +import java.io.IOException; /** API examples for MarketMakerBlockTradeApi */ public class ExtendBlockTradeOrderExample { @@ -29,14 +30,15 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Extend Block Trade Order (TRADE) * - *

Extends a block trade expire time by 30 mins from the current time. Weight: 5 + *

Extends a block trade expire time by 30 mins from the current time. Weight(IP): 5 Security + * Type: TRADE * * @throws ApiException if the Api call fails */ - public void extendBlockTradeOrderExample() throws ApiException { + public void extendBlockTradeOrderExample() throws ApiException, IOException { ExtendBlockTradeOrderRequest extendBlockTradeOrderRequest = new ExtendBlockTradeOrderRequest(); - extendBlockTradeOrderRequest.blockOrderMatchingKey(""); + extendBlockTradeOrderRequest.blockOrderMatchingKey("3668822b8-1baa-6a2f-adb8-d3de6289b361"); ApiResponse response = getApi().extendBlockTradeOrder(extendBlockTradeOrderRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/NewBlockTradeOrderExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/NewBlockTradeOrderExample.java index 09d287c6b..3a6f64c82 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/NewBlockTradeOrderExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/NewBlockTradeOrderExample.java @@ -7,8 +7,10 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.Legs; +import com.binance.connector.client.derivatives_trading_options.rest.model.Liquidity; import com.binance.connector.client.derivatives_trading_options.rest.model.NewBlockTradeOrderRequest; import com.binance.connector.client.derivatives_trading_options.rest.model.NewBlockTradeOrderResponse; +import java.io.IOException; /** API examples for MarketMakerBlockTradeApi */ public class NewBlockTradeOrderExample { @@ -30,13 +32,13 @@ public DerivativesTradingOptionsRestApi getApi() { /** * New Block Trade Order (TRADE) * - *

Send in a new block trade order. Weight: 5 + *

Send in a new block trade order. Weight(IP): 5 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void newBlockTradeOrderExample() throws ApiException { + public void newBlockTradeOrderExample() throws ApiException, IOException { NewBlockTradeOrderRequest newBlockTradeOrderRequest = new NewBlockTradeOrderRequest(); - newBlockTradeOrderRequest.liquidity(""); + newBlockTradeOrderRequest.liquidity(Liquidity.MAKER); newBlockTradeOrderRequest.legs(new Legs()); ApiResponse response = getApi().newBlockTradeOrder(newBlockTradeOrderRequest); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/QueryBlockTradeDetailsExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/QueryBlockTradeDetailsExample.java index 729560133..a7620e9d8 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/QueryBlockTradeDetailsExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/QueryBlockTradeDetailsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.QueryBlockTradeDetailsResponse; +import java.io.IOException; /** API examples for MarketMakerBlockTradeApi */ public class QueryBlockTradeDetailsExample { @@ -29,12 +30,12 @@ public DerivativesTradingOptionsRestApi getApi() { * Query Block Trade Details (USER_DATA) * *

Query block trade details; returns block trade details from counterparty's - * perspective. Weight: 5 + * perspective. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryBlockTradeDetailsExample() throws ApiException { - String blockOrderMatchingKey = ""; + public void queryBlockTradeDetailsExample() throws ApiException, IOException { + String blockOrderMatchingKey = "12b96c28-ba05-8906-c89t-703215cfb2e6"; Long recvWindow = 5000L; ApiResponse response = getApi().queryBlockTradeDetails(blockOrderMatchingKey, recvWindow); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/QueryBlockTradeOrderExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/QueryBlockTradeOrderExample.java index 832279431..14646b7ec 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/QueryBlockTradeOrderExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerblocktrade/QueryBlockTradeOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.QueryBlockTradeOrderResponse; +import java.io.IOException; /** API examples for MarketMakerBlockTradeApi */ public class QueryBlockTradeOrderExample { @@ -28,15 +29,15 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Query Block Trade Order (TRADE) * - *

Check block trade order status. Weight: 5 + *

Check block trade order status. Weight(IP): 5 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void queryBlockTradeOrderExample() throws ApiException { - String blockOrderMatchingKey = ""; + public void queryBlockTradeOrderExample() throws ApiException, IOException { + String blockOrderMatchingKey = "7d046e6e-a429-4335-ab9d-6a681febcde5"; Long endTime = 1641782889000L; Long startTime = 1623319461670L; - String underlying = ""; + String underlying = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().queryBlockTradeOrder( diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/AutoCancelAllOpenOrdersExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/AutoCancelAllOpenOrdersExample.java index 5bda303ee..72811f539 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/AutoCancelAllOpenOrdersExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/AutoCancelAllOpenOrdersExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.AutoCancelAllOpenOrdersRequest; import com.binance.connector.client.derivatives_trading_options.rest.model.AutoCancelAllOpenOrdersResponse; +import java.io.IOException; /** API examples for MarketMakerEndpointsApi */ public class AutoCancelAllOpenOrdersExample { @@ -32,15 +33,15 @@ public DerivativesTradingOptionsRestApi getApi() { *

This endpoint resets the time from which the countdown will begin to the time this * messaged is received. It should be called repeatedly as heartbeats. Multiple heartbeats can * be updated at once by specifying the underlying symbols as a list (ex. BTCUSDT,ETHUSDT) in - * the underlyings parameter. * The response will only include underlying symbols where the - * heartbeat has been successfully updated. Weight: 10 + * the underlyings parameter. Weight(IP): 10 Security Type: TRADE Notes: - The response will + * only include underlying symbols where the heartbeat has been successfully updated. * * @throws ApiException if the Api call fails */ - public void autoCancelAllOpenOrdersExample() throws ApiException { + public void autoCancelAllOpenOrdersExample() throws ApiException, IOException { AutoCancelAllOpenOrdersRequest autoCancelAllOpenOrdersRequest = new AutoCancelAllOpenOrdersRequest(); - autoCancelAllOpenOrdersRequest.underlyings(""); + autoCancelAllOpenOrdersRequest.underlyings("BTCUSDT,ETHUSDT"); ApiResponse response = getApi().autoCancelAllOpenOrders(autoCancelAllOpenOrdersRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/GetAutoCancelAllOpenOrdersExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/GetAutoCancelAllOpenOrdersExample.java index 2a2dcd834..a78d3d89f 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/GetAutoCancelAllOpenOrdersExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/GetAutoCancelAllOpenOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.GetAutoCancelAllOpenOrdersResponse; +import java.io.IOException; /** API examples for MarketMakerEndpointsApi */ public class GetAutoCancelAllOpenOrdersExample { @@ -31,13 +32,13 @@ public DerivativesTradingOptionsRestApi getApi() { *

This endpoint returns the auto-cancel parameters for each underlying symbol. Note only * active auto-cancel parameters will be returned, if countdownTime is set to 0 (ie. * countdownTime has been turned off), the underlying symbol and corresponding countdownTime - * parameter will not be returned in the response. * countdownTime = 0 means the function - * is disabled. Weight: 1 + * parameter will not be returned in the response. Weight(IP): 1 Security Type: TRADE Notes: - + * countdownTime = 0 means the function is disabled. * * @throws ApiException if the Api call fails */ - public void getAutoCancelAllOpenOrdersExample() throws ApiException { - String underlying = ""; + public void getAutoCancelAllOpenOrdersExample() throws ApiException, IOException { + String underlying = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().getAutoCancelAllOpenOrders(underlying, recvWindow); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/GetMarketMakerProtectionConfigExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/GetMarketMakerProtectionConfigExample.java index 4c174f4b4..931b05ab2 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/GetMarketMakerProtectionConfigExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/GetMarketMakerProtectionConfigExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.GetMarketMakerProtectionConfigResponse; +import java.io.IOException; /** API examples for MarketMakerEndpointsApi */ public class GetMarketMakerProtectionConfigExample { @@ -28,12 +29,12 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Get Market Maker Protection Config (TRADE) * - *

Get config for MMP. Weight: 1 + *

Get config for MMP. Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void getMarketMakerProtectionConfigExample() throws ApiException { - String underlying = ""; + public void getMarketMakerProtectionConfigExample() throws ApiException, IOException { + String underlying = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().getMarketMakerProtectionConfig(underlying, recvWindow); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/ResetMarketMakerProtectionConfigExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/ResetMarketMakerProtectionConfigExample.java index aeb9418ca..7bdbaf8cd 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/ResetMarketMakerProtectionConfigExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/ResetMarketMakerProtectionConfigExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.ResetMarketMakerProtectionConfigRequest; import com.binance.connector.client.derivatives_trading_options.rest.model.ResetMarketMakerProtectionConfigResponse; +import java.io.IOException; /** API examples for MarketMakerEndpointsApi */ public class ResetMarketMakerProtectionConfigExample { @@ -29,13 +30,14 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Reset Market Maker Protection Config (TRADE) * - *

Reset MMP, start MMP order again. Weight: 1 + *

Reset MMP, start MMP order again. Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void resetMarketMakerProtectionConfigExample() throws ApiException { + public void resetMarketMakerProtectionConfigExample() throws ApiException, IOException { ResetMarketMakerProtectionConfigRequest resetMarketMakerProtectionConfigRequest = new ResetMarketMakerProtectionConfigRequest(); + resetMarketMakerProtectionConfigRequest.underlying("BTCUSDT"); ApiResponse response = getApi().resetMarketMakerProtectionConfig(resetMarketMakerProtectionConfigRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/SetAutoCancelAllOpenOrdersExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/SetAutoCancelAllOpenOrdersExample.java index 4b16aaa12..3c96409b1 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/SetAutoCancelAllOpenOrdersExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/SetAutoCancelAllOpenOrdersExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.SetAutoCancelAllOpenOrdersRequest; import com.binance.connector.client.derivatives_trading_options.rest.model.SetAutoCancelAllOpenOrdersResponse; +import java.io.IOException; /** API examples for MarketMakerEndpointsApi */ public class SetAutoCancelAllOpenOrdersExample { @@ -34,24 +35,24 @@ public DerivativesTradingOptionsRestApi getApi() { * symbol at the end of the specified countdown time period if no heartbeat message is sent. * After the countdown time period, all open orders will be cancelled and new orders will be * rejected with error code -2010 until either a heartbeat message is sent or the auto-cancel - * feature is turned off by setting countdownTime to 0. * This rest endpoint sets up the - * parameters to cancel your open orders in case of an outage or disconnection. * Example usage: - * Call this endpoint with a countdownTime value of 10000 (10 seconds) to turn on the - * auto-cancel feature. If the corresponding countdownCancelAllHeartBeat endpoint is not called - * within 10 seconds with the specified underlying symbol, all open orders of the specified - * symbol will be automatically canceled. If this endpoint is called with an countdownTime of 0, - * the countdown timer will be stopped. * The system will check all countdowns approximately - * every 100 milliseconds, **please note that sufficient redundancy should be considered when - * using this function**. We do not recommend setting the countdown time to be too precise or - * too small. Weight: 1 + * feature is turned off by setting countdownTime to 0. Weight(IP): 1 Security Type: TRADE + * Notes: - This rest endpoint sets up the parameters to cancel your open orders in case of an + * outage or disconnection. - Example usage: > Call this endpoint with a countdownTime value + * of 10000 (10 seconds) to turn on the auto-cancel feature. If the corresponding + * countdownCancelAllHeartBeat endpoint is not called within 10 seconds with the specified + * underlying symbol, all open orders of the specified symbol will be automatically canceled. If + * this endpoint is called with an countdownTime of 0, the countdown timer will be stopped. - + * The system will check all countdowns approximately every 100 milliseconds, **please note that + * sufficient redundancy should be considered when using this function**. We do not recommend + * setting the countdown time to be too precise or too small. * * @throws ApiException if the Api call fails */ - public void setAutoCancelAllOpenOrdersExample() throws ApiException { + public void setAutoCancelAllOpenOrdersExample() throws ApiException, IOException { SetAutoCancelAllOpenOrdersRequest setAutoCancelAllOpenOrdersRequest = new SetAutoCancelAllOpenOrdersRequest(); - setAutoCancelAllOpenOrdersRequest.underlying(""); - setAutoCancelAllOpenOrdersRequest.countdownTime(0L); + setAutoCancelAllOpenOrdersRequest.underlying("BTCUSDT"); + setAutoCancelAllOpenOrdersRequest.countdownTime(5000L); ApiResponse response = getApi().setAutoCancelAllOpenOrders(setAutoCancelAllOpenOrdersRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/SetMarketMakerProtectionConfigExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/SetMarketMakerProtectionConfigExample.java index 77691e238..283fcf988 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/SetMarketMakerProtectionConfigExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/marketmakerendpoints/SetMarketMakerProtectionConfigExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.SetMarketMakerProtectionConfigRequest; import com.binance.connector.client.derivatives_trading_options.rest.model.SetMarketMakerProtectionConfigResponse; +import java.io.IOException; /** API examples for MarketMakerEndpointsApi */ public class SetMarketMakerProtectionConfigExample { @@ -34,13 +35,18 @@ public DerivativesTradingOptionsRestApi getApi() { * Once market maker's account branches the threshold, the Market Maker Protection will be * triggered. When Market Maker Protection triggers, all the current MMP orders will be * canceled, new MMP orders will be rejected. Market maker can use this time to reevaluate - * market and modify order price. Weight: 1 + * market and modify order price. Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void setMarketMakerProtectionConfigExample() throws ApiException { + public void setMarketMakerProtectionConfigExample() throws ApiException, IOException { SetMarketMakerProtectionConfigRequest setMarketMakerProtectionConfigRequest = new SetMarketMakerProtectionConfigRequest(); + setMarketMakerProtectionConfigRequest.underlying("BTCUSDT"); + setMarketMakerProtectionConfigRequest.windowTimeInMilliseconds(1000L); + setMarketMakerProtectionConfigRequest.frozenTimeInMilliseconds(1000L); + setMarketMakerProtectionConfigRequest.qtyLimit(1.0d); + setMarketMakerProtectionConfigRequest.deltaLimit(1.0d); ApiResponse response = getApi().setMarketMakerProtectionConfig(setMarketMakerProtectionConfigRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/AccountTradeListExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/AccountTradeListExample.java index 8f60e71cc..d473b7188 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/AccountTradeListExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/AccountTradeListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.AccountTradeListResponse; +import java.io.IOException; /** API examples for TradeApi */ public class AccountTradeListExample { @@ -28,17 +29,16 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Account Trade List (USER_DATA) * - *

Get trades for a specific account and symbol. * Only support querying trades in the past 3 - * months Weight: 5 + *

Get trades for a specific account and symbol. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void accountTradeListExample() throws ApiException { - String symbol = ""; + public void accountTradeListExample() throws ApiException, IOException { + String symbol = "BTC-200730-9000-C"; Long fromId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 20L; Long recvWindow = 5000L; ApiResponse response = getApi().accountTradeList(symbol, fromId, startTime, endTime, limit, recvWindow); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelAllOptionOrdersByUnderlyingExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelAllOptionOrdersByUnderlyingExample.java index e97023a88..5849f5a98 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelAllOptionOrdersByUnderlyingExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelAllOptionOrdersByUnderlyingExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.CancelAllOptionOrdersByUnderlyingResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelAllOptionOrdersByUnderlyingExample { @@ -28,12 +29,12 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Cancel All Option Orders By Underlying (TRADE) * - *

Cancel all active orders on specified underlying. Weight: 1 + *

Cancel all active orders on specified underlying. Weight(IP): 5 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void cancelAllOptionOrdersByUnderlyingExample() throws ApiException { - String underlying = ""; + public void cancelAllOptionOrdersByUnderlyingExample() throws ApiException, IOException { + String underlying = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().cancelAllOptionOrdersByUnderlying(underlying, recvWindow); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelAllOptionOrdersOnSpecificSymbolExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelAllOptionOrdersOnSpecificSymbolExample.java index 7f828dadb..52fe5d63a 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelAllOptionOrdersOnSpecificSymbolExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelAllOptionOrdersOnSpecificSymbolExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.CancelAllOptionOrdersOnSpecificSymbolResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelAllOptionOrdersOnSpecificSymbolExample { @@ -28,12 +29,12 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Cancel all Option orders on specific symbol (TRADE) * - *

Cancel all active order on a symbol. Weight: 5 + *

Cancel all active order on a symbol. Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void cancelAllOptionOrdersOnSpecificSymbolExample() throws ApiException { - String symbol = ""; + public void cancelAllOptionOrdersOnSpecificSymbolExample() throws ApiException, IOException { + String symbol = "BTC-200730-9000-C"; Long recvWindow = 5000L; ApiResponse response = getApi().cancelAllOptionOrdersOnSpecificSymbol(symbol, recvWindow); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelMultipleOptionOrdersExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelMultipleOptionOrdersExample.java index 49ede8c35..4e352861b 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelMultipleOptionOrdersExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelMultipleOptionOrdersExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.model.CancelMultipleOptionOrdersResponse; import com.binance.connector.client.derivatives_trading_options.rest.model.ClientOrderIds; import com.binance.connector.client.derivatives_trading_options.rest.model.OrderIds; +import java.io.IOException; /** API examples for TradeApi */ public class CancelMultipleOptionOrdersExample { @@ -30,15 +31,15 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Cancel Multiple Option Orders (TRADE) * - *

Cancel multiple orders. * At least one instance of `orderId` and - * `clientOrderId` must be sent. Weight: 1 + *

Cancel multiple orders. Weight(IP): 5 Security Type: TRADE Notes: - At least one instance + * of `orderId` and `clientOrderId` must be sent. * * @throws ApiException if the Api call fails */ - public void cancelMultipleOptionOrdersExample() throws ApiException { - String symbol = ""; - OrderIds orderIds = null; - ClientOrderIds clientOrderIds = null; + public void cancelMultipleOptionOrdersExample() throws ApiException, IOException { + String symbol = "BTC-200730-9000-C"; + OrderIds orderIds = OrderIds.fromJson(""); + ClientOrderIds clientOrderIds = ClientOrderIds.fromJson(""); Long recvWindow = 5000L; ApiResponse response = getApi().cancelMultipleOptionOrders(symbol, orderIds, clientOrderIds, recvWindow); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelOptionOrderExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelOptionOrderExample.java index cbe69b152..a1236804c 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelOptionOrderExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelOptionOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.CancelOptionOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelOptionOrderExample { @@ -28,15 +29,15 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Cancel Option Order (TRADE) * - *

Cancel an active order. * At least one instance of `orderId` and - * `clientOrderId` must be sent. Weight: 1 + *

Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - At least one instance + * of `orderId` and `clientOrderId` must be sent. * * @throws ApiException if the Api call fails */ - public void cancelOptionOrderExample() throws ApiException { - String symbol = ""; - Long orderId = 1L; - String clientOrderId = "1"; + public void cancelOptionOrderExample() throws ApiException, IOException { + String symbol = "BTC-200730-9000-C"; + Long orderId = 4611875134427365000L; + String clientOrderId = "10000"; Long recvWindow = 5000L; ApiResponse response = getApi().cancelOptionOrder(symbol, orderId, clientOrderId, recvWindow); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/NewOrderExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/NewOrderExample.java index 2afcdd5ce..e6035754d 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/NewOrderExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/NewOrderExample.java @@ -8,8 +8,9 @@ import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.NewOrderRequest; import com.binance.connector.client.derivatives_trading_options.rest.model.NewOrderResponse; +import com.binance.connector.client.derivatives_trading_options.rest.model.OrderType; import com.binance.connector.client.derivatives_trading_options.rest.model.Side; -import com.binance.connector.client.derivatives_trading_options.rest.model.Type; +import java.io.IOException; /** API examples for TradeApi */ public class NewOrderExample { @@ -31,15 +32,17 @@ public DerivativesTradingOptionsRestApi getApi() { /** * New Order (TRADE) * - *

Send a new order. Weight: 0 + *

Send a new order. Weight(IP): 0 Security Type: TRADE Notes: Some parameters are mandatory + * depending on the order type as follows: Type | Mandatory parameters ------------ | + * ------------ LIMIT | timeInForce, quantity, price * * @throws ApiException if the Api call fails */ - public void newOrderExample() throws ApiException { + public void newOrderExample() throws ApiException, IOException { NewOrderRequest newOrderRequest = new NewOrderRequest(); - newOrderRequest.symbol(""); + newOrderRequest.symbol("BTC-200730-9000-C"); newOrderRequest.side(Side.BUY); - newOrderRequest.type(Type.LIMIT); + newOrderRequest.type(OrderType.LIMIT); newOrderRequest.quantity(1.0d); ApiResponse response = getApi().newOrder(newOrderRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/OptionPositionInformationExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/OptionPositionInformationExample.java index c815f5b13..e2a8548be 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/OptionPositionInformationExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/OptionPositionInformationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.OptionPositionInformationResponse; +import java.io.IOException; /** API examples for TradeApi */ public class OptionPositionInformationExample { @@ -28,12 +29,12 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Option Position Information (USER_DATA) * - *

Get current position information. Weight: 5 + *

Get current position information. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void optionPositionInformationExample() throws ApiException { - String symbol = ""; + public void optionPositionInformationExample() throws ApiException, IOException { + String symbol = "BTC-200730-9000-C"; Long recvWindow = 5000L; ApiResponse response = getApi().optionPositionInformation(symbol, recvWindow); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/PlaceMultipleOrdersExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/PlaceMultipleOrdersExample.java index e8aed4ddb..14ab7b61b 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/PlaceMultipleOrdersExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/PlaceMultipleOrdersExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.model.Orders; import com.binance.connector.client.derivatives_trading_options.rest.model.PlaceMultipleOrdersRequest; import com.binance.connector.client.derivatives_trading_options.rest.model.PlaceMultipleOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class PlaceMultipleOrdersExample { @@ -28,14 +29,16 @@ public DerivativesTradingOptionsRestApi getApi() { } /** - * Place Multiple Orders(TRADE) + * Place Multiple Orders (TRADE) * - *

Send multiple option orders. * Parameter rules are same with New Order * Batch orders are - * processed concurrently, and the order of matching is not guaranteed. Weight: 5 + *

Send multiple option orders. Weight(IP): 5 Security Type: TRADE Notes: Some parameters are + * mandatory depending on the order type as follows: Type | Mandatory parameters ------------ | + * ------------ LIMIT | timeInForce, quantity, price - Parameter rules are same with New Order - + * Batch orders are processed concurrently, and the order of matching is not guaranteed. * * @throws ApiException if the Api call fails */ - public void placeMultipleOrdersExample() throws ApiException { + public void placeMultipleOrdersExample() throws ApiException, IOException { PlaceMultipleOrdersRequest placeMultipleOrdersRequest = new PlaceMultipleOrdersRequest(); placeMultipleOrdersRequest.orders(new Orders()); ApiResponse response = diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QueryCurrentOpenOptionOrdersExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QueryCurrentOpenOptionOrdersExample.java index 9a004dd76..21939b67c 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QueryCurrentOpenOptionOrdersExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QueryCurrentOpenOptionOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.QueryCurrentOpenOptionOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryCurrentOpenOptionOrdersExample { @@ -29,13 +30,13 @@ public DerivativesTradingOptionsRestApi getApi() { * Query Current Open Option Orders (USER_DATA) * *

Query current all open orders, status: ACCEPTED PARTIALLY_FILLED Weight: 1 for a single - * symbol; 40 when the symbol parameter is omitted + * symbol; 40 when the symbol parameter is omitted Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryCurrentOpenOptionOrdersExample() throws ApiException { - String symbol = ""; - Long orderId = 1L; + public void queryCurrentOpenOptionOrdersExample() throws ApiException, IOException { + String symbol = "BTC-200730-9000-C"; + Long orderId = 4611875134427365000L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QueryOptionOrderHistoryExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QueryOptionOrderHistoryExample.java index 9a2a899cf..ce1887dbc 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QueryOptionOrderHistoryExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QueryOptionOrderHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.QueryOptionOrderHistoryResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryOptionOrderHistoryExample { @@ -29,16 +30,16 @@ public DerivativesTradingOptionsRestApi getApi() { * Query Option Order History (TRADE) * *

Query all finished orders within 5 days, finished status: CANCELLED FILLED REJECTED. - * Weight: 3 + * Weight(IP): 3 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void queryOptionOrderHistoryExample() throws ApiException { - String symbol = ""; - Long orderId = 1L; + public void queryOptionOrderHistoryExample() throws ApiException, IOException { + String symbol = "BTC-200730-9000-C"; + Long orderId = 4611875134427365000L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 20L; Long recvWindow = 5000L; ApiResponse response = getApi().queryOptionOrderHistory( diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QuerySingleOrderExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QuerySingleOrderExample.java index b0bf482db..7524231c5 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QuerySingleOrderExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/QuerySingleOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.QuerySingleOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QuerySingleOrderExample { @@ -30,15 +31,15 @@ public DerivativesTradingOptionsRestApi getApi() { * *

Check an order status. * These orders will not be found: * order status is * `CANCELED` or `REJECTED`, **AND** * order has NO filled trade, **AND** * - * created time + 3 days < current time * Either `orderId` or `clientOrderId - * ` must be sent. Weight: 1 + * created time + 3 days < current time Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `clientOrderId ` must be sent. * * @throws ApiException if the Api call fails */ - public void querySingleOrderExample() throws ApiException { - String symbol = ""; - Long orderId = 1L; - String clientOrderId = "1"; + public void querySingleOrderExample() throws ApiException, IOException { + String symbol = "BTC-200730-9000-C"; + Long orderId = 4611875134427365000L; + String clientOrderId = "abc123"; Long recvWindow = 5000L; ApiResponse response = getApi().querySingleOrder(symbol, orderId, clientOrderId, recvWindow); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/TradfiOptionsContractExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/TradfiOptionsContractExample.java new file mode 100644 index 000000000..e81d0b9d6 --- /dev/null +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/TradfiOptionsContractExample.java @@ -0,0 +1,44 @@ +package com.binance.connector.client.derivatives_trading_options.rest.trade; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; +import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; +import com.binance.connector.client.derivatives_trading_options.rest.model.TradfiOptionsContractRequest; +import com.binance.connector.client.derivatives_trading_options.rest.model.TradfiOptionsContractResponse; +import java.io.IOException; + +/** API examples for TradeApi */ +public class TradfiOptionsContractExample { + private DerivativesTradingOptionsRestApi api; + + public DerivativesTradingOptionsRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = + DerivativesTradingOptionsRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new DerivativesTradingOptionsRestApi(clientConfiguration); + } + return api; + } + + /** + * TradFi Options Contract (USER_DATA) + * + *

Sign TradFi Options agreement contract Weight(IP): 50 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + public void tradfiOptionsContractExample() throws ApiException, IOException { + TradfiOptionsContractRequest tradfiOptionsContractRequest = + new TradfiOptionsContractRequest(); + ApiResponse response = + getApi().tradfiOptionsContract(tradfiOptionsContractRequest); + System.out.println(response.getData()); + } +} diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/UserCommissionExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/UserCommissionExample.java index 0bc562062..ed6f80c79 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/UserCommissionExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/UserCommissionExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.UserCommissionResponse; +import java.io.IOException; /** API examples for TradeApi */ public class UserCommissionExample { @@ -28,11 +29,11 @@ public DerivativesTradingOptionsRestApi getApi() { /** * User Commission (USER_DATA) * - *

Get account commission. Weight: 5 + *

Get account commission. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void userCommissionExample() throws ApiException { + public void userCommissionExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().userCommission(recvWindow); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/UserExerciseRecordExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/UserExerciseRecordExample.java index e83835b3e..c650d5da4 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/UserExerciseRecordExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/UserExerciseRecordExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.UserExerciseRecordResponse; +import java.io.IOException; /** API examples for TradeApi */ public class UserExerciseRecordExample { @@ -28,15 +29,15 @@ public DerivativesTradingOptionsRestApi getApi() { /** * User Exercise Record (USER_DATA) * - *

Get account exercise records. Weight: 5 + *

Get account exercise records. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void userExerciseRecordExample() throws ApiException { - String symbol = ""; + public void userExerciseRecordExample() throws ApiException, IOException { + String symbol = "BTC-200730-9000-C"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 20L; Long recvWindow = 5000L; ApiResponse response = getApi().userExerciseRecord(symbol, startTime, endTime, limit, recvWindow); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/CloseUserDataStreamExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/CloseUserDataStreamExample.java index 5ffbddd8c..70bbf94a2 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/CloseUserDataStreamExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/CloseUserDataStreamExample.java @@ -5,6 +5,7 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; +import java.io.IOException; /** API examples for UserDataStreamsApi */ public class CloseUserDataStreamExample { @@ -26,11 +27,11 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Close User Data Stream (USER_STREAM) * - *

Close out a user data stream. Weight: 1 + *

Close out a user data stream. Weight(IP): 1 Security Type: USER_STREAM * * @throws ApiException if the Api call fails */ - public void closeUserDataStreamExample() throws ApiException { + public void closeUserDataStreamExample() throws ApiException, IOException { getApi().closeUserDataStream(); } } diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/KeepaliveUserDataStreamExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/KeepaliveUserDataStreamExample.java index ddaa05675..0235c651f 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/KeepaliveUserDataStreamExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/KeepaliveUserDataStreamExample.java @@ -5,6 +5,7 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; +import java.io.IOException; /** API examples for UserDataStreamsApi */ public class KeepaliveUserDataStreamExample { @@ -27,11 +28,12 @@ public DerivativesTradingOptionsRestApi getApi() { * Keepalive User Data Stream (USER_STREAM) * *

Keepalive a user data stream to prevent a time out. User data streams will close after 60 - * minutes. It's recommended to send a ping about every 60 minutes. Weight: 1 + * minutes. It's recommended to send a ping about every 60 minutes. Weight(IP): 1 Security + * Type: USER_STREAM * * @throws ApiException if the Api call fails */ - public void keepaliveUserDataStreamExample() throws ApiException { + public void keepaliveUserDataStreamExample() throws ApiException, IOException { getApi().keepaliveUserDataStream(); } } diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/StartUserDataStreamExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/StartUserDataStreamExample.java index 1a068f7a4..36f160463 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/StartUserDataStreamExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/userdatastreams/StartUserDataStreamExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_options.rest.DerivativesTradingOptionsRestApiUtil; import com.binance.connector.client.derivatives_trading_options.rest.api.DerivativesTradingOptionsRestApi; import com.binance.connector.client.derivatives_trading_options.rest.model.StartUserDataStreamResponse; +import java.io.IOException; /** API examples for UserDataStreamsApi */ public class StartUserDataStreamExample { @@ -30,11 +31,12 @@ public DerivativesTradingOptionsRestApi getApi() { * *

Start a new user data stream. The stream will close after 60 minutes unless a keepalive is * sent. If the account has an active `listenKey`, that `listenKey` will be - * returned and its validity will be extended for 60 minutes. Weight: 1 + * returned and its validity will be extended for 60 minutes. Weight(IP): 1 Security Type: + * USER_STREAM * * @throws ApiException if the Api call fails */ - public void startUserDataStreamExample() throws ApiException { + public void startUserDataStreamExample() throws ApiException, IOException { ApiResponse response = getApi().startUserDataStream(); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/KlineCandlestickStreamsExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/KlineCandlestickStreamsExample.java index bdd8ca5e9..090755d56 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/KlineCandlestickStreamsExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/KlineCandlestickStreamsExample.java @@ -32,8 +32,6 @@ public DerivativesTradingOptionsWebSocketStreams getApi() { public void klineCandlestickStreamsExample() throws ApiException, InterruptedException { KlineCandlestickStreamsRequest klineCandlestickStreamsRequest = new KlineCandlestickStreamsRequest(); - klineCandlestickStreamsRequest.symbol("btcusdt"); - klineCandlestickStreamsRequest.interval("1m"); StreamBlockingQueueWrapper response = getApi().klineCandlestickStreams(klineCandlestickStreamsRequest); while (true) { diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/MarkPriceExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/MarkPriceExample.java deleted file mode 100644 index f87620380..000000000 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/MarkPriceExample.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.binance.connector.client.derivatives_trading_options.websocket.stream.market; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; -import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.DerivativesTradingOptionsWebSocketStreamsUtil; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.api.DerivativesTradingOptionsWebSocketStreams; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.MarkPriceRequest; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.MarkPriceResponse; - -/** API examples for MarketApi */ -public class MarkPriceExample { - private DerivativesTradingOptionsWebSocketStreams api; - - public DerivativesTradingOptionsWebSocketStreams getApi() { - if (api == null) { - WebSocketClientConfiguration clientConfiguration = - DerivativesTradingOptionsWebSocketStreamsUtil.getClientConfiguration(); - api = new DerivativesTradingOptionsWebSocketStreams(clientConfiguration); - } - return api; - } - - /** - * Mark Price - * - *

The mark price for all option symbols on specific underlying asset. - * E.g.[btcusdt@optionMarkPrice](wss://fstream.binance.com/market/stream?streams=btcusdt@optionMarkPrice) - * Update Speed: 1000ms - * - * @throws ApiException if the Api call fails - */ - public void markPriceExample() throws ApiException, InterruptedException { - MarkPriceRequest markPriceRequest = new MarkPriceRequest(); - markPriceRequest.underlying("btcusdt"); - StreamBlockingQueueWrapper response = - getApi().markPrice(markPriceRequest); - while (true) { - System.out.println(response.take()); - } - } -} diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OpenInterestExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OpenInterestExample.java index 5c63ebd25..cbd92182e 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OpenInterestExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OpenInterestExample.java @@ -32,7 +32,6 @@ public DerivativesTradingOptionsWebSocketStreams getApi() { */ public void openInterestExample() throws ApiException, InterruptedException { OpenInterestRequest openInterestRequest = new OpenInterestRequest(); - openInterestRequest.expirationDate("220930"); StreamBlockingQueueWrapper response = getApi().openInterest(openInterestRequest); while (true) { diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OptionMarkPriceExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OptionMarkPriceExample.java new file mode 100644 index 000000000..8af15bc79 --- /dev/null +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OptionMarkPriceExample.java @@ -0,0 +1,41 @@ +package com.binance.connector.client.derivatives_trading_options.websocket.stream.market; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.DerivativesTradingOptionsWebSocketStreamsUtil; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.api.DerivativesTradingOptionsWebSocketStreams; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.OptionMarkPriceRequest; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.OptionMarkPriceResponse; + +/** API examples for MarketApi */ +public class OptionMarkPriceExample { + private DerivativesTradingOptionsWebSocketStreams api; + + public DerivativesTradingOptionsWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + DerivativesTradingOptionsWebSocketStreamsUtil.getClientConfiguration(); + api = new DerivativesTradingOptionsWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * Option Mark Price + * + *

The mark price for all option symbols on specific underlying asset. + * E.g.[btcusdt@optionMarkPrice](wss://fstream.binance.com/market/stream?streams=btcusdt@optionMarkPrice) + * Update Speed: 1000ms + * + * @throws ApiException if the Api call fails + */ + public void optionMarkPriceExample() throws ApiException, InterruptedException { + OptionMarkPriceRequest optionMarkPriceRequest = new OptionMarkPriceRequest(); + StreamBlockingQueueWrapper response = + getApi().optionMarkPrice(optionMarkPriceRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/DiffBookDepthStreamsExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/DiffBookDepthStreamsExample.java index 19c9b2bfe..e389219ef 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/DiffBookDepthStreamsExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/DiffBookDepthStreamsExample.java @@ -31,7 +31,6 @@ public DerivativesTradingOptionsWebSocketStreams getApi() { */ public void diffBookDepthStreamsExample() throws ApiException, InterruptedException { DiffBookDepthStreamsRequest diffBookDepthStreamsRequest = new DiffBookDepthStreamsRequest(); - diffBookDepthStreamsRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().diffBookDepthStreams(diffBookDepthStreamsRequest); while (true) { diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/Hour24TickerExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/Hour24TickerExample.java new file mode 100644 index 000000000..12eae3016 --- /dev/null +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/Hour24TickerExample.java @@ -0,0 +1,40 @@ +package com.binance.connector.client.derivatives_trading_options.websocket.stream.publicpkg; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.DerivativesTradingOptionsWebSocketStreamsUtil; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.api.DerivativesTradingOptionsWebSocketStreams; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.Hour24TickerRequest; +import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.Hour24TickerResponse; + +/** API examples for PublicApi */ +public class Hour24TickerExample { + private DerivativesTradingOptionsWebSocketStreams api; + + public DerivativesTradingOptionsWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + DerivativesTradingOptionsWebSocketStreamsUtil.getClientConfiguration(); + api = new DerivativesTradingOptionsWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * 24-hour TICKER + * + *

24hr ticker info for all symbols. Only symbols whose ticker info changed will be sent. + * Update Speed: 1000ms + * + * @throws ApiException if the Api call fails + */ + public void hour24TickerExample() throws ApiException, InterruptedException { + Hour24TickerRequest hour24TickerRequest = new Hour24TickerRequest(); + StreamBlockingQueueWrapper response = + getApi().hour24Ticker(hour24TickerRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/IndividualSymbolBookTickerStreamsExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/IndividualSymbolBookTickerStreamsExample.java index 0a50ce118..e21045d47 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/IndividualSymbolBookTickerStreamsExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/IndividualSymbolBookTickerStreamsExample.java @@ -33,7 +33,6 @@ public void individualSymbolBookTickerStreamsExample() throws ApiException, InterruptedException { IndividualSymbolBookTickerStreamsRequest individualSymbolBookTickerStreamsRequest = new IndividualSymbolBookTickerStreamsRequest(); - individualSymbolBookTickerStreamsRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().individualSymbolBookTickerStreams( individualSymbolBookTickerStreamsRequest); diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/PartialBookDepthStreamsExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/PartialBookDepthStreamsExample.java index bf77ce2fd..b835b4976 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/PartialBookDepthStreamsExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/PartialBookDepthStreamsExample.java @@ -24,16 +24,14 @@ public DerivativesTradingOptionsWebSocketStreams getApi() { /** * Partial Book Depth Streams * - *

Top **<levels\\>** bids and asks, Valid levels are **<levels\\>** are 5, 10, - * 20. Update Speed: 100ms or 500ms + *

Top <levels> bids and asks. Valid <levels> are 5, 10, 20. Update Speed: 100ms + * or 500ms * * @throws ApiException if the Api call fails */ public void partialBookDepthStreamsExample() throws ApiException, InterruptedException { PartialBookDepthStreamsRequest partialBookDepthStreamsRequest = new PartialBookDepthStreamsRequest(); - partialBookDepthStreamsRequest.symbol("btcusdt"); - partialBookDepthStreamsRequest.level("example_value"); StreamBlockingQueueWrapper response = getApi().partialBookDepthStreams(partialBookDepthStreamsRequest); while (true) { diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/Ticker24HourExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/Ticker24HourExample.java deleted file mode 100644 index 55d70eed1..000000000 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/Ticker24HourExample.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.binance.connector.client.derivatives_trading_options.websocket.stream.publicpkg; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; -import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.DerivativesTradingOptionsWebSocketStreamsUtil; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.api.DerivativesTradingOptionsWebSocketStreams; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.Ticker24HourRequest; -import com.binance.connector.client.derivatives_trading_options.websocket.stream.model.Ticker24HourResponse; - -/** API examples for PublicApi */ -public class Ticker24HourExample { - private DerivativesTradingOptionsWebSocketStreams api; - - public DerivativesTradingOptionsWebSocketStreams getApi() { - if (api == null) { - WebSocketClientConfiguration clientConfiguration = - DerivativesTradingOptionsWebSocketStreamsUtil.getClientConfiguration(); - api = new DerivativesTradingOptionsWebSocketStreams(clientConfiguration); - } - return api; - } - - /** - * 24-hour TICKER - * - *

24hr ticker info for all symbols. Only symbols whose ticker info changed will be sent. - * Update Speed: 1000ms - * - * @throws ApiException if the Api call fails - */ - public void ticker24HourExample() throws ApiException, InterruptedException { - Ticker24HourRequest ticker24HourRequest = new Ticker24HourRequest(); - ticker24HourRequest.symbol("btcusdt"); - StreamBlockingQueueWrapper response = - getApi().ticker24Hour(ticker24HourRequest); - while (true) { - System.out.println(response.take()); - } - } -} diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/TradeStreamsExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/TradeStreamsExample.java index 18aed55ec..46e180162 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/TradeStreamsExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/TradeStreamsExample.java @@ -32,7 +32,6 @@ public DerivativesTradingOptionsWebSocketStreams getApi() { */ public void tradeStreamsExample() throws ApiException, InterruptedException { TradeStreamsRequest tradeStreamsRequest = new TradeStreamsRequest(); - tradeStreamsRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().tradeStreams(tradeStreamsRequest); while (true) { diff --git a/examples/derivatives-trading-portfolio-margin-pro/pom.xml b/examples/derivatives-trading-portfolio-margin-pro/pom.xml index 989bc6477..998499bc2 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/pom.xml +++ b/examples/derivatives-trading-portfolio-margin-pro/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-derivatives-trading-portfolio-margin-pro - 7.0.0 + 8.0.0 \ No newline at end of file diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/BnbTransferExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/BnbTransferExample.java index 835884980..d291d9534 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/BnbTransferExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/BnbTransferExample.java @@ -8,6 +8,8 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.BnbTransferRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.BnbTransferResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.TransferSide; +import java.io.IOException; /** API examples for AccountApi */ public class BnbTransferExample { @@ -27,17 +29,18 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * BNB transfer(USER_DATA) + * BNB transfer (USER_DATA) * - *

BNB transfer can be between Margin Account and USDM Account * You can only use this - * function 2 times per 10 minutes in a rolling manner Weight: 1500 + *

BNB transfer can be between Margin Account and USDM Account Weight(IP): 1500 Security + * Type: USER_DATA Notes: - You can only use this function 2 times per 10 minutes in a rolling + * manner * * @throws ApiException if the Api call fails */ - public void bnbTransferExample() throws ApiException { + public void bnbTransferExample() throws ApiException, IOException { BnbTransferRequest bnbTransferRequest = new BnbTransferRequest(); bnbTransferRequest.amount(1.0d); - bnbTransferRequest.transferSide(""); + bnbTransferRequest.transferSide(TransferSide.TO_UM); ApiResponse response = getApi().bnbTransfer(bnbTransferRequest); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/ChangeAutoRepayFuturesStatusExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/ChangeAutoRepayFuturesStatusExample.java index 220b6a295..eb5d9a12d 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/ChangeAutoRepayFuturesStatusExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/ChangeAutoRepayFuturesStatusExample.java @@ -6,8 +6,10 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.AutoRepay; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.ChangeAutoRepayFuturesStatusRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.ChangeAutoRepayFuturesStatusResponse; +import java.io.IOException; /** API examples for AccountApi */ public class ChangeAutoRepayFuturesStatusExample { @@ -27,16 +29,16 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Change Auto-repay-futures Status(TRADE) + * Change Auto-repay-futures Status (TRADE) * - *

Change Auto-repay-futures Status Weight: 1500 + *

Change Auto-repay-futures Status Weight(IP): 1500 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void changeAutoRepayFuturesStatusExample() throws ApiException { + public void changeAutoRepayFuturesStatusExample() throws ApiException, IOException { ChangeAutoRepayFuturesStatusRequest changeAutoRepayFuturesStatusRequest = new ChangeAutoRepayFuturesStatusRequest(); - changeAutoRepayFuturesStatusRequest.autoRepay("true"); + changeAutoRepayFuturesStatusRequest.autoRepay(AutoRepay.TRUE); ApiResponse response = getApi().changeAutoRepayFuturesStatus(changeAutoRepayFuturesStatusRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/DeleteMarginCallLevelExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/DeleteMarginCallLevelExample.java index 01dbc9227..a5ad5399c 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/DeleteMarginCallLevelExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/DeleteMarginCallLevelExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.DeleteMarginCallLevelResponse; +import java.io.IOException; /** API examples for AccountApi */ public class DeleteMarginCallLevelExample { @@ -28,11 +29,12 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { /** * Delete Margin Call Level (USER_DATA) * - *

Delete the margin call level for a Portfolio Margin account. Weight: 1500 + *

Delete the margin call level for a Portfolio Margin account. Weight(IP): 1500 Security + * Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void deleteMarginCallLevelExample() throws ApiException { + public void deleteMarginCallLevelExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().deleteMarginCallLevel(recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/FundAutoCollectionExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/FundAutoCollectionExample.java index f043b69e7..55d94dd05 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/FundAutoCollectionExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/FundAutoCollectionExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.FundAutoCollectionRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.FundAutoCollectionResponse; +import java.io.IOException; /** API examples for AccountApi */ public class FundAutoCollectionExample { @@ -27,15 +28,15 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Fund Auto-collection(USER_DATA) + * Fund Auto-collection (USER_DATA) * - *

Transfers all assets from Futures Account to Margin account * The BNB would not be - * collected from UM-PM account to the Portfolio Margin account. * You can only use this - * function 500 times per hour in a rolling manner. Weight: 1500 + *

Transfers all assets from Futures Account to Margin account Weight(IP): 1500 Security + * Type: USER_DATA Notes: - The BNB would not be collected from UM-PM account to the Portfolio + * Margin account. - You can only use this function 500 times per hour in a rolling manner. * * @throws ApiException if the Api call fails */ - public void fundAutoCollectionExample() throws ApiException { + public void fundAutoCollectionExample() throws ApiException, IOException { FundAutoCollectionRequest fundAutoCollectionRequest = new FundAutoCollectionRequest(); ApiResponse response = getApi().fundAutoCollection(fundAutoCollectionRequest); diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/FundCollectionByAssetExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/FundCollectionByAssetExample.java index cc2f2adf8..0c5fd9c69 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/FundCollectionByAssetExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/FundCollectionByAssetExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.FundCollectionByAssetRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.FundCollectionByAssetResponse; +import java.io.IOException; /** API examples for AccountApi */ public class FundCollectionByAssetExample { @@ -27,17 +28,17 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Fund Collection by Asset(USER_DATA) + * Fund Collection by Asset (USER_DATA) * - *

Transfers specific asset from Futures Account to Margin account * The BNB transfer is not - * be supported Weight: 60 + *

Transfers specific asset from Futures Account to Margin account Weight(IP): 60 Security + * Type: USER_DATA Notes: - The BNB transfer is not be supported * * @throws ApiException if the Api call fails */ - public void fundCollectionByAssetExample() throws ApiException { + public void fundCollectionByAssetExample() throws ApiException, IOException { FundCollectionByAssetRequest fundCollectionByAssetRequest = new FundCollectionByAssetRequest(); - fundCollectionByAssetRequest.asset(""); + fundCollectionByAssetRequest.asset("USDT"); ApiResponse response = getApi().fundCollectionByAsset(fundCollectionByAssetRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetAutoRepayFuturesStatusExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetAutoRepayFuturesStatusExample.java index 11df10a38..b13e2c294 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetAutoRepayFuturesStatusExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetAutoRepayFuturesStatusExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.GetAutoRepayFuturesStatusResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetAutoRepayFuturesStatusExample { @@ -26,13 +27,13 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Get Auto-repay-futures Status(USER_DATA) + * Get Auto-repay-futures Status (USER_DATA) * - *

Query Auto-repay-futures Status Weight: 30 + *

Query Auto-repay-futures Status Weight(IP): 30 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getAutoRepayFuturesStatusExample() throws ApiException { + public void getAutoRepayFuturesStatusExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getAutoRepayFuturesStatus(recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetDeltaModeStatusExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetDeltaModeStatusExample.java index 95a39a1b8..77b2239e9 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetDeltaModeStatusExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetDeltaModeStatusExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.GetDeltaModeStatusResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetDeltaModeStatusExample { @@ -26,13 +27,13 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Get Delta Mode Status(USER_DATA) + * Get Delta Mode Status (USER_DATA) * - *

Query the Delta mode status of current account. Weight: 1500 + *

Query the Delta mode status of current account. Weight(IP): 1500 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getDeltaModeStatusExample() throws ApiException { + public void getDeltaModeStatusExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getDeltaModeStatus(recvWindow); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetMarginCallLevelExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetMarginCallLevelExample.java index fa1fd09bf..b1a189004 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetMarginCallLevelExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetMarginCallLevelExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.GetMarginCallLevelResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetMarginCallLevelExample { @@ -28,11 +29,12 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { /** * Get Margin Call Level (USER_DATA) * - *

Get the margin call level for a Portfolio Margin account. Weight: 1500 + *

Get the margin call level for a Portfolio Margin account. Weight(IP): 1500 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ - public void getMarginCallLevelExample() throws ApiException { + public void getMarginCallLevelExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getMarginCallLevel(recvWindow); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProAccountBalanceExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProAccountBalanceExample.java index 7d5d551e7..2393ffe8c 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProAccountBalanceExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProAccountBalanceExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.GetPortfolioMarginProAccountBalanceResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetPortfolioMarginProAccountBalanceExample { @@ -26,14 +27,14 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Get Portfolio Margin Pro Account Balance(USER_DATA) + * Get Portfolio Margin Pro Account Balance (USER_DATA) * - *

Query Portfolio Margin Pro account balance Weight: 20 + *

Query Portfolio Margin Pro account balance Weight(IP): 20 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getPortfolioMarginProAccountBalanceExample() throws ApiException { - String asset = ""; + public void getPortfolioMarginProAccountBalanceExample() throws ApiException, IOException { + String asset = "BTC"; Long recvWindow = 5000L; ApiResponse response = getApi().getPortfolioMarginProAccountBalance(asset, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProAccountInfoExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProAccountInfoExample.java index 37c085c60..1b45ca410 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProAccountInfoExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProAccountInfoExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.GetPortfolioMarginProAccountInfoResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetPortfolioMarginProAccountInfoExample { @@ -26,13 +27,13 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Get Portfolio Margin Pro Account Info(USER_DATA) + * Get Portfolio Margin Pro Account Info (USER_DATA) * - *

Get Portfolio Margin Pro Account Info Weight: 5 + *

Get Portfolio Margin Pro Account Info Weight(UID): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getPortfolioMarginProAccountInfoExample() throws ApiException { + public void getPortfolioMarginProAccountInfoExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getPortfolioMarginProAccountInfo(recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProSpanAccountInfoExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProSpanAccountInfoExample.java index 84cb81fa2..64179ff35 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProSpanAccountInfoExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetPortfolioMarginProSpanAccountInfoExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.GetPortfolioMarginProSpanAccountInfoResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetPortfolioMarginProSpanAccountInfoExample { @@ -26,14 +27,14 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Get Portfolio Margin Pro SPAN Account Info(USER_DATA) + * Get Portfolio Margin Pro SPAN Account Info (USER_DATA) * *

Get Portfolio Margin Pro SPAN Account Info (For Portfolio Margin Pro SPAN users only) - * Weight: 5 + * Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getPortfolioMarginProSpanAccountInfoExample() throws ApiException { + public void getPortfolioMarginProSpanAccountInfoExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getPortfolioMarginProSpanAccountInfo(recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetTransferableEarnAssetBalanceForPortfolioMarginExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetTransferableEarnAssetBalanceForPortfolioMarginExample.java index 18425673b..572c3d862 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetTransferableEarnAssetBalanceForPortfolioMarginExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/GetTransferableEarnAssetBalanceForPortfolioMarginExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.GetTransferableEarnAssetBalanceForPortfolioMarginResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.TransferType; +import java.io.IOException; /** API examples for AccountApi */ public class GetTransferableEarnAssetBalanceForPortfolioMarginExample { @@ -28,13 +30,15 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { /** * Get Transferable Earn Asset Balance for Portfolio Margin (USER_DATA) * - *

Get transferable earn asset balance for all types of Portfolio Margin account Weight: 1500 + *

Get transferable earn asset balance for all types of Portfolio Margin account Weight(IP): + * 1500 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getTransferableEarnAssetBalanceForPortfolioMarginExample() throws ApiException { - String asset = ""; - String transferType = ""; + public void getTransferableEarnAssetBalanceForPortfolioMarginExample() + throws ApiException, IOException { + String asset = "LDUSDT"; + TransferType transferType = TransferType.EARN_TO_FUTURE; Long recvWindow = 5000L; ApiResponse response = getApi().getTransferableEarnAssetBalanceForPortfolioMargin( diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/PortfolioMarginProBankruptcyLoanRepayExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/PortfolioMarginProBankruptcyLoanRepayExample.java index 1cf8ff841..94dfb5bdd 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/PortfolioMarginProBankruptcyLoanRepayExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/PortfolioMarginProBankruptcyLoanRepayExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.PortfolioMarginProBankruptcyLoanRepayRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.PortfolioMarginProBankruptcyLoanRepayResponse; +import java.io.IOException; /** API examples for AccountApi */ public class PortfolioMarginProBankruptcyLoanRepayExample { @@ -27,14 +28,15 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Portfolio Margin Pro Bankruptcy Loan Repay + * Portfolio Margin Pro Bankruptcy Loan Repay (TRADE) * - *

Repay Portfolio Margin Pro Bankruptcy Loan * Please note that the API Key has enabled Spot - * & Margin Trading permissions to access this endpoint. Weight: 3000 + *

Repay Portfolio Margin Pro Bankruptcy Loan Weight(UID): 3000 Security Type: TRADE Notes: - + * Please note that the API Key has enabled Spot & Margin Trading permissions to access this + * endpoint. * * @throws ApiException if the Api call fails */ - public void portfolioMarginProBankruptcyLoanRepayExample() throws ApiException { + public void portfolioMarginProBankruptcyLoanRepayExample() throws ApiException, IOException { PortfolioMarginProBankruptcyLoanRepayRequest portfolioMarginProBankruptcyLoanRepayRequest = new PortfolioMarginProBankruptcyLoanRepayRequest(); ApiResponse response = diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProBankruptcyLoanAmountExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProBankruptcyLoanAmountExample.java index 0a074aa2d..e0dd5f79b 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProBankruptcyLoanAmountExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProBankruptcyLoanAmountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.QueryPortfolioMarginProBankruptcyLoanAmountResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryPortfolioMarginProBankruptcyLoanAmountExample { @@ -26,14 +27,16 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Query Portfolio Margin Pro Bankruptcy Loan Amount(USER_DATA) + * Query Portfolio Margin Pro Bankruptcy Loan Amount (USER_DATA) * - *

Query Portfolio Margin Pro Bankruptcy Loan Amount * If there’s no classic portfolio margin - * bankruptcy loan, the amount would be 0 Weight: 500 + *

Query Portfolio Margin Pro Bankruptcy Loan Amount Weight(UID): 500 Security Type: + * USER_DATA Notes: - If there’s no classic portfolio margin bankruptcy loan, the amount would + * be 0 * * @throws ApiException if the Api call fails */ - public void queryPortfolioMarginProBankruptcyLoanAmountExample() throws ApiException { + public void queryPortfolioMarginProBankruptcyLoanAmountExample() + throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().queryPortfolioMarginProBankruptcyLoanAmount(recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProBankruptcyLoanRepayHistoryExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProBankruptcyLoanRepayHistoryExample.java index 15e59586a..f216bd5b8 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProBankruptcyLoanRepayHistoryExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProBankruptcyLoanRepayHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryPortfolioMarginProBankruptcyLoanRepayHistoryExample { @@ -26,26 +27,27 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Query Portfolio Margin Pro Bankruptcy Loan Repay History(USER_DATA) + * Query Portfolio Margin Pro Bankruptcy Loan Repay History (USER_DATA) * - *

Query repay history of pmloan for portfolio margin pro. * `startTime` and - * `endTime` cannot be longer than 360 days * If `startTime` and - * `endTime` not sent, return records of the last 30 days by default. * If - * `startTime`is sent and `endTime` is not sent, return records of - * [startTime, startTime+30d]. * If `startTime` is not sent and `endTime` is - * sent, return records of [endTime-30d, endTime]. Weight: 500 + *

Query repay history of pmloan for portfolio margin pro. Weight(IP): 500 Security Type: + * USER_DATA Notes: - `startTime` and `endTime` cannot be longer than 360 + * days - If `startTime` and `endTime` not sent, return records of the last + * 30 days by default. - If `startTime`is sent and `endTime` is not sent, + * return records of [startTime, startTime+30d]. - If `startTime` is not sent and + * `endTime` is sent, return records of [endTime-30d, endTime]. * * @throws ApiException if the Api call fails */ - public void queryPortfolioMarginProBankruptcyLoanRepayHistoryExample() throws ApiException { + public void queryPortfolioMarginProBankruptcyLoanRepayHistoryExample() + throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long current = 1L; Long size = 10L; + Long current = 1L; Long recvWindow = 5000L; ApiResponse response = getApi().queryPortfolioMarginProBankruptcyLoanRepayHistory( - startTime, endTime, current, size, recvWindow); + startTime, endTime, size, current, recvWindow); System.out.println(response.getData()); } } diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProNegativeBalanceInterestHistoryExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProNegativeBalanceInterestHistoryExample.java index ef7ee9b05..7b1a63b24 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProNegativeBalanceInterestHistoryExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/QueryPortfolioMarginProNegativeBalanceInterestHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.QueryPortfolioMarginProNegativeBalanceInterestHistoryResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryPortfolioMarginProNegativeBalanceInterestHistoryExample { @@ -26,14 +27,16 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Query Portfolio Margin Pro Negative Balance Interest History(USER_DATA) + * Query Portfolio Margin Pro Negative Balance Interest History (USER_DATA) * - *

Query interest history of negative balance for portfolio margin. Weight: 50 + *

Query interest history of negative balance for portfolio margin. Weight(IP): 50 Security + * Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryPortfolioMarginProNegativeBalanceInterestHistoryExample() throws ApiException { - String asset = ""; + public void queryPortfolioMarginProNegativeBalanceInterestHistoryExample() + throws ApiException, IOException { + String asset = "USDT"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long size = 10L; diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/RepayFuturesNegativeBalanceExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/RepayFuturesNegativeBalanceExample.java index 4c4fc5eaf..7743ab676 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/RepayFuturesNegativeBalanceExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/RepayFuturesNegativeBalanceExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.RepayFuturesNegativeBalanceRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.RepayFuturesNegativeBalanceResponse; +import java.io.IOException; /** API examples for AccountApi */ public class RepayFuturesNegativeBalanceExample { @@ -27,13 +28,13 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Repay futures Negative Balance(USER_DATA) + * Repay futures Negative Balance (USER_DATA) * - *

Repay futures Negative Balance Weight: 1500 + *

Repay futures Negative Balance Weight(IP): 1500 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void repayFuturesNegativeBalanceExample() throws ApiException { + public void repayFuturesNegativeBalanceExample() throws ApiException, IOException { RepayFuturesNegativeBalanceRequest repayFuturesNegativeBalanceRequest = new RepayFuturesNegativeBalanceRequest(); ApiResponse response = diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/SetMarginCallLevelExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/SetMarginCallLevelExample.java index 98d1767b8..5fe60cd49 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/SetMarginCallLevelExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/SetMarginCallLevelExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.SetMarginCallLevelRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.SetMarginCallLevelResponse; +import java.io.IOException; /** API examples for AccountApi */ public class SetMarginCallLevelExample { @@ -30,13 +31,14 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { * Set Margin Call Level (USER_DATA) * *

Set the margin call level for a Portfolio Margin account. When the account's uniMMR - * drops to the specified level, a notification will be sent via email and SMS. Weight: 1500 + * drops to the specified level, a notification will be sent via email and SMS. Weight(IP): 1500 + * Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void setMarginCallLevelExample() throws ApiException { + public void setMarginCallLevelExample() throws ApiException, IOException { SetMarginCallLevelRequest setMarginCallLevelRequest = new SetMarginCallLevelRequest(); - setMarginCallLevelRequest.marginCallLevel(5000.0d); + setMarginCallLevelRequest.marginCallLevel(1.5d); ApiResponse response = getApi().setMarginCallLevel(setMarginCallLevelRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/SwitchDeltaModeExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/SwitchDeltaModeExample.java index e2e851fb0..05d305953 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/SwitchDeltaModeExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/SwitchDeltaModeExample.java @@ -6,8 +6,10 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.DeltaEnabled; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.SwitchDeltaModeRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.SwitchDeltaModeResponse; +import java.io.IOException; /** API examples for AccountApi */ public class SwitchDeltaModeExample { @@ -27,15 +29,16 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Switch Delta Mode(TRADE) + * Switch Delta Mode (TRADE) * - *

Switch the Delta mode for existing PM PRO / PM RETAIL accounts. Weight: 1500 + *

Switch the Delta mode for existing PM PRO / PM RETAIL accounts. Weight(IP): 1500 Security + * Type: TRADE * * @throws ApiException if the Api call fails */ - public void switchDeltaModeExample() throws ApiException { + public void switchDeltaModeExample() throws ApiException, IOException { SwitchDeltaModeRequest switchDeltaModeRequest = new SwitchDeltaModeRequest(); - switchDeltaModeRequest.deltaEnabled(""); + switchDeltaModeRequest.deltaEnabled(DeltaEnabled.TRUE); ApiResponse response = getApi().switchDeltaMode(switchDeltaModeRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/TransferLdusdtRwusdForPortfolioMarginExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/TransferLdusdtRwusdForPortfolioMarginExample.java index 1064f06f7..afb7c8264 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/TransferLdusdtRwusdForPortfolioMarginExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/TransferLdusdtRwusdForPortfolioMarginExample.java @@ -6,8 +6,11 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.Asset; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.TransferLdusdtRwusdForPortfolioMarginRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.TransferLdusdtRwusdForPortfolioMarginResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.TransferType; +import java.io.IOException; /** API examples for AccountApi */ public class TransferLdusdtRwusdForPortfolioMarginExample { @@ -27,18 +30,19 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Transfer LDUSDT/RWUSD for Portfolio Margin(TRADE) + * Transfer LDUSDT/RWUSD for Portfolio Margin (TRADE) * - *

Transfer LDUSDT/RWUSD as collateral for all types of Portfolio Margin account Weight: 1500 + *

Transfer LDUSDT/RWUSD as collateral for all types of Portfolio Margin account Weight(UID): + * 1500 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void transferLdusdtRwusdForPortfolioMarginExample() throws ApiException { + public void transferLdusdtRwusdForPortfolioMarginExample() throws ApiException, IOException { TransferLdusdtRwusdForPortfolioMarginRequest transferLdusdtRwusdForPortfolioMarginRequest = new TransferLdusdtRwusdForPortfolioMarginRequest(); - transferLdusdtRwusdForPortfolioMarginRequest.asset(""); - transferLdusdtRwusdForPortfolioMarginRequest.transferType(""); - transferLdusdtRwusdForPortfolioMarginRequest.amount(1.0d); + transferLdusdtRwusdForPortfolioMarginRequest.asset(Asset.LDUSDT); + transferLdusdtRwusdForPortfolioMarginRequest.transferType(TransferType.EARN_TO_FUTURE); + transferLdusdtRwusdForPortfolioMarginRequest.amount(1d); ApiResponse response = getApi().transferLdusdtRwusdForPortfolioMargin( transferLdusdtRwusdForPortfolioMarginRequest); diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/GetPortfolioMarginAssetLeverageExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/GetPortfolioMarginAssetLeverageExample.java index c0c53124a..73759c081 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/GetPortfolioMarginAssetLeverageExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/GetPortfolioMarginAssetLeverageExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.GetPortfolioMarginAssetLeverageResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetPortfolioMarginAssetLeverageExample { @@ -26,13 +27,13 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Get Portfolio Margin Asset Leverage(USER_DATA) + * Get Portfolio Margin Asset Leverage (USER_DATA) * - *

Get Portfolio Margin Asset Leverage Weight: 50 + *

Get Portfolio Margin Asset Leverage Weight(IP): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getPortfolioMarginAssetLeverageExample() throws ApiException { + public void getPortfolioMarginAssetLeverageExample() throws ApiException, IOException { ApiResponse response = getApi().getPortfolioMarginAssetLeverage(); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/PortfolioMarginCollateralRateExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/PortfolioMarginCollateralRateExample.java index 1981f157c..dcebac9e6 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/PortfolioMarginCollateralRateExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/PortfolioMarginCollateralRateExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.PortfolioMarginCollateralRateResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class PortfolioMarginCollateralRateExample { @@ -26,13 +27,13 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Portfolio Margin Collateral Rate(MARKET_DATA) + * Portfolio Margin Collateral Rate (MARKET_DATA) * - *

Portfolio Margin Collateral Rate Weight: 50 + *

Portfolio Margin Collateral Rate Weight(IP): 50 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ - public void portfolioMarginCollateralRateExample() throws ApiException { + public void portfolioMarginCollateralRateExample() throws ApiException, IOException { ApiResponse response = getApi().portfolioMarginCollateralRate(); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/PortfolioMarginProTieredCollateralRateExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/PortfolioMarginProTieredCollateralRateExample.java index ba52860f1..3215937cf 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/PortfolioMarginProTieredCollateralRateExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/PortfolioMarginProTieredCollateralRateExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.PortfolioMarginProTieredCollateralRateResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class PortfolioMarginProTieredCollateralRateExample { @@ -26,13 +27,13 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { } /** - * Portfolio Margin Pro Tiered Collateral Rate(USER_DATA) + * Portfolio Margin Pro Tiered Collateral Rate (USER_DATA) * - *

Portfolio Margin PRO Tiered Collateral Rate Weight: 50 + *

Portfolio Margin PRO Tiered Collateral Rate Weight(IP): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void portfolioMarginProTieredCollateralRateExample() throws ApiException { + public void portfolioMarginProTieredCollateralRateExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().portfolioMarginProTieredCollateralRate(recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/QueryPortfolioMarginAssetIndexPriceExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/QueryPortfolioMarginAssetIndexPriceExample.java index 83e49a46c..9a436b939 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/QueryPortfolioMarginAssetIndexPriceExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/marketdata/QueryPortfolioMarginAssetIndexPriceExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.DerivativesTradingPortfolioMarginProRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.api.DerivativesTradingPortfolioMarginProRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin_pro.rest.model.QueryPortfolioMarginAssetIndexPriceResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class QueryPortfolioMarginAssetIndexPriceExample { @@ -28,12 +29,13 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { /** * Query Portfolio Margin Asset Index Price (MARKET_DATA) * - *

Query Portfolio Margin Asset Index Price Weight: 1 if send asset or 50 if not send asset + *

Query Portfolio Margin Asset Index Price Weight: - 1 if `asset` is sent - 50 if + * `asset` is not sent Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ - public void queryPortfolioMarginAssetIndexPriceExample() throws ApiException { - String asset = ""; + public void queryPortfolioMarginAssetIndexPriceExample() throws ApiException, IOException { + String asset = "BTC"; ApiResponse response = getApi().queryPortfolioMarginAssetIndexPrice(asset); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin/pom.xml b/examples/derivatives-trading-portfolio-margin/pom.xml index 57b31138a..4e7d3d3ce 100644 --- a/examples/derivatives-trading-portfolio-margin/pom.xml +++ b/examples/derivatives-trading-portfolio-margin/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-derivatives-trading-portfolio-margin - 6.0.0 + 7.0.0 \ No newline at end of file diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/AccountBalanceExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/AccountBalanceExample.java index 0ccedb9a8..c7eef1968 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/AccountBalanceExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/AccountBalanceExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.AccountBalanceResponse; +import java.io.IOException; /** API examples for AccountApi */ public class AccountBalanceExample { @@ -26,14 +27,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Account Balance(USER_DATA) + * Account Balance (USER_DATA) * - *

Query account balance Weight: 20 + *

Query account balance Weight(IP): 20 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void accountBalanceExample() throws ApiException { - String asset = ""; + public void accountBalanceExample() throws ApiException, IOException { + String asset = "USDT"; Long recvWindow = 5000L; ApiResponse response = getApi().accountBalance(asset, recvWindow); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/AccountInformationExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/AccountInformationExample.java index 822ea9e3e..e23166190 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/AccountInformationExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/AccountInformationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.AccountInformationResponse; +import java.io.IOException; /** API examples for AccountApi */ public class AccountInformationExample { @@ -26,13 +27,13 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Account Information(USER_DATA) + * Account Information (USER_DATA) * - *

Query account information Weight: 20 + *

Query account information Weight(IP): 20 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void accountInformationExample() throws ApiException { + public void accountInformationExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().accountInformation(recvWindow); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/BnbTransferExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/BnbTransferExample.java index 95adcc5c3..0708c68a5 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/BnbTransferExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/BnbTransferExample.java @@ -8,6 +8,8 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.BnbTransferRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.BnbTransferResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.TransferSide; +import java.io.IOException; /** API examples for AccountApi */ public class BnbTransferExample { @@ -29,15 +31,15 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * BNB transfer (TRADE) * - *

Transfer BNB in and out of UM * The endpoint can only be called 10 times per 10 minutes in - * a rolling manner Weight: 750 + *

Transfer BNB in and out of UM Weight(IP): 750 Security Type: TRADE Notes: - The endpoint + * can only be called 10 times per 10 minutes in a rolling manner * * @throws ApiException if the Api call fails */ - public void bnbTransferExample() throws ApiException { + public void bnbTransferExample() throws ApiException, IOException { BnbTransferRequest bnbTransferRequest = new BnbTransferRequest(); bnbTransferRequest.amount(1.0d); - bnbTransferRequest.transferSide(""); + bnbTransferRequest.transferSide(TransferSide.TO_UM); ApiResponse response = getApi().bnbTransfer(bnbTransferRequest); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeAutoRepayFuturesStatusExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeAutoRepayFuturesStatusExample.java index 452a01a6a..7be32e19d 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeAutoRepayFuturesStatusExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeAutoRepayFuturesStatusExample.java @@ -6,8 +6,10 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.AutoRepay; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ChangeAutoRepayFuturesStatusRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ChangeAutoRepayFuturesStatusResponse; +import java.io.IOException; /** API examples for AccountApi */ public class ChangeAutoRepayFuturesStatusExample { @@ -27,16 +29,16 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Change Auto-repay-futures Status(TRADE) + * Change Auto-repay-futures Status (TRADE) * - *

Change Auto-repay-futures Status Weight: 750 + *

Change Auto-repay-futures Status Weight(IP): 750 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void changeAutoRepayFuturesStatusExample() throws ApiException { + public void changeAutoRepayFuturesStatusExample() throws ApiException, IOException { ChangeAutoRepayFuturesStatusRequest changeAutoRepayFuturesStatusRequest = new ChangeAutoRepayFuturesStatusRequest(); - changeAutoRepayFuturesStatusRequest.autoRepay("true"); + changeAutoRepayFuturesStatusRequest.autoRepay(AutoRepay.TRUE); ApiResponse response = getApi().changeAutoRepayFuturesStatus(changeAutoRepayFuturesStatusRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeCmInitialLeverageExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeCmInitialLeverageExample.java index ce0a39ca1..02f4a0e96 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeCmInitialLeverageExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeCmInitialLeverageExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ChangeCmInitialLeverageRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ChangeCmInitialLeverageResponse; +import java.io.IOException; /** API examples for AccountApi */ public class ChangeCmInitialLeverageExample { @@ -29,15 +30,16 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Change CM Initial Leverage (TRADE) * - *

Change user's initial leverage of specific symbol in CM. Weight: 1 + *

Change user's initial leverage of specific symbol in CM. Weight(IP): 1 Security Type: + * TRADE * * @throws ApiException if the Api call fails */ - public void changeCmInitialLeverageExample() throws ApiException { + public void changeCmInitialLeverageExample() throws ApiException, IOException { ChangeCmInitialLeverageRequest changeCmInitialLeverageRequest = new ChangeCmInitialLeverageRequest(); - changeCmInitialLeverageRequest.symbol(""); - changeCmInitialLeverageRequest.leverage(0L); + changeCmInitialLeverageRequest.symbol("BTCUSD_200925"); + changeCmInitialLeverageRequest.leverage(21L); ApiResponse response = getApi().changeCmInitialLeverage(changeCmInitialLeverageRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeCmPositionModeExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeCmPositionModeExample.java index 510610a40..07f5c79f8 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeCmPositionModeExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeCmPositionModeExample.java @@ -8,6 +8,8 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ChangeCmPositionModeRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ChangeCmPositionModeResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.DualSidePosition; +import java.io.IOException; /** API examples for AccountApi */ public class ChangeCmPositionModeExample { @@ -27,16 +29,16 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Change CM Position Mode(TRADE) + * Change CM Position Mode (TRADE) * *

Change user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in CM - * Weight: 1 + * Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void changeCmPositionModeExample() throws ApiException { + public void changeCmPositionModeExample() throws ApiException, IOException { ChangeCmPositionModeRequest changeCmPositionModeRequest = new ChangeCmPositionModeRequest(); - changeCmPositionModeRequest.dualSidePosition(""); + changeCmPositionModeRequest.dualSidePosition(DualSidePosition.TRUE); ApiResponse response = getApi().changeCmPositionMode(changeCmPositionModeRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeUmInitialLeverageExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeUmInitialLeverageExample.java index e20b98a1a..bb426d763 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeUmInitialLeverageExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeUmInitialLeverageExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ChangeUmInitialLeverageRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ChangeUmInitialLeverageResponse; +import java.io.IOException; /** API examples for AccountApi */ public class ChangeUmInitialLeverageExample { @@ -27,17 +28,18 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Change UM Initial Leverage(TRADE) + * Change UM Initial Leverage (TRADE) * - *

Change user's initial leverage of specific symbol in UM. Weight: 1 + *

Change user's initial leverage of specific symbol in UM. Weight(IP): 1 Security Type: + * TRADE * * @throws ApiException if the Api call fails */ - public void changeUmInitialLeverageExample() throws ApiException { + public void changeUmInitialLeverageExample() throws ApiException, IOException { ChangeUmInitialLeverageRequest changeUmInitialLeverageRequest = new ChangeUmInitialLeverageRequest(); - changeUmInitialLeverageRequest.symbol(""); - changeUmInitialLeverageRequest.leverage(0L); + changeUmInitialLeverageRequest.symbol("BTCUSDT"); + changeUmInitialLeverageRequest.leverage(21L); ApiResponse response = getApi().changeUmInitialLeverage(changeUmInitialLeverageRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeUmPositionModeExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeUmPositionModeExample.java index 5f016a74a..6447e6706 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeUmPositionModeExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/ChangeUmPositionModeExample.java @@ -8,6 +8,8 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ChangeUmPositionModeRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ChangeUmPositionModeResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.DualSidePosition; +import java.io.IOException; /** API examples for AccountApi */ public class ChangeUmPositionModeExample { @@ -27,16 +29,16 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Change UM Position Mode(TRADE) + * Change UM Position Mode (TRADE) * *

Change user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in UM - * Weight: 1 + * Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void changeUmPositionModeExample() throws ApiException { + public void changeUmPositionModeExample() throws ApiException, IOException { ChangeUmPositionModeRequest changeUmPositionModeRequest = new ChangeUmPositionModeRequest(); - changeUmPositionModeRequest.dualSidePosition(""); + changeUmPositionModeRequest.dualSidePosition(DualSidePosition.TRUE); ApiResponse response = getApi().changeUmPositionMode(changeUmPositionModeRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/CmNotionalAndLeverageBracketsExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/CmNotionalAndLeverageBracketsExample.java index e64782ab5..b6a1977ba 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/CmNotionalAndLeverageBracketsExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/CmNotionalAndLeverageBracketsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CmNotionalAndLeverageBracketsResponse; +import java.io.IOException; /** API examples for AccountApi */ public class CmNotionalAndLeverageBracketsExample { @@ -26,14 +27,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * CM Notional and Leverage Brackets(USER_DATA) + * CM Notional and Leverage Brackets (USER_DATA) * - *

Query CM notional and leverage brackets Weight: 1 + *

Query CM notional and leverage brackets Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void cmNotionalAndLeverageBracketsExample() throws ApiException { - String symbol = ""; + public void cmNotionalAndLeverageBracketsExample() throws ApiException, IOException { + String symbol = "BTCUSD_PERP"; Long recvWindow = 5000L; ApiResponse response = getApi().cmNotionalAndLeverageBrackets(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/FundAutoCollectionExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/FundAutoCollectionExample.java index 5dd890512..e42030a18 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/FundAutoCollectionExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/FundAutoCollectionExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.FundAutoCollectionRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.FundAutoCollectionResponse; +import java.io.IOException; /** API examples for AccountApi */ public class FundAutoCollectionExample { @@ -27,15 +28,15 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Fund Auto-collection(TRADE) + * Fund Auto-collection (TRADE) * - *

Fund collection for Portfolio Margin * The BNB would not be collected from UM-PM account - * to the Portfolio Margin account. * You can only use this function 500 times per hour in a - * rolling manner. Weight: 750 + *

Fund collection for Portfolio Margin Weight(IP): 750 Security Type: TRADE Notes: - BNB + * assets will not be auto-collected. - Rolling window endpoint can be called at most 500 times + * per hour. * * @throws ApiException if the Api call fails */ - public void fundAutoCollectionExample() throws ApiException { + public void fundAutoCollectionExample() throws ApiException, IOException { FundAutoCollectionRequest fundAutoCollectionRequest = new FundAutoCollectionRequest(); ApiResponse response = getApi().fundAutoCollection(fundAutoCollectionRequest); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/FundCollectionByAssetExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/FundCollectionByAssetExample.java index 155729564..4be2b4f0b 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/FundCollectionByAssetExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/FundCollectionByAssetExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.FundCollectionByAssetRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.FundCollectionByAssetResponse; +import java.io.IOException; /** API examples for AccountApi */ public class FundCollectionByAssetExample { @@ -27,17 +28,17 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Fund Collection by Asset(TRADE) + * Fund Collection by Asset (TRADE) * - *

Transfers specific asset from Futures Account to Margin account * The BNB transfer is not - * be supported Weight: 30 + *

Transfers specific asset from Futures Account to Margin account Weight(IP): 30 Security + * Type: TRADE Notes: - The BNB transfer is not be supported * * @throws ApiException if the Api call fails */ - public void fundCollectionByAssetExample() throws ApiException { + public void fundCollectionByAssetExample() throws ApiException, IOException { FundCollectionByAssetRequest fundCollectionByAssetRequest = new FundCollectionByAssetRequest(); - fundCollectionByAssetRequest.asset(""); + fundCollectionByAssetRequest.asset("BTC"); ApiResponse response = getApi().fundCollectionByAsset(fundCollectionByAssetRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetAutoRepayFuturesStatusExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetAutoRepayFuturesStatusExample.java index 7312749b8..45096f9a4 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetAutoRepayFuturesStatusExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetAutoRepayFuturesStatusExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetAutoRepayFuturesStatusResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetAutoRepayFuturesStatusExample { @@ -26,13 +27,13 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Get Auto-repay-futures Status(USER_DATA) + * Get Auto-repay-futures Status (USER_DATA) * - *

Query Auto-repay-futures Status Weight: 30 + *

Query Auto-repay-futures Status Weight(IP): 30 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getAutoRepayFuturesStatusExample() throws ApiException { + public void getAutoRepayFuturesStatusExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getAutoRepayFuturesStatus(recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmAccountDetailExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmAccountDetailExample.java index 32005f7a3..56e074496 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmAccountDetailExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmAccountDetailExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetCmAccountDetailResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetCmAccountDetailExample { @@ -26,13 +27,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Get CM Account Detail(USER_DATA) + * Get CM Account Detail (USER_DATA) * - *

Get current CM account asset and position information. Weight: 5 + *

Get current CM account asset and position information. Weight(IP): 5 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ - public void getCmAccountDetailExample() throws ApiException { + public void getCmAccountDetailExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getCmAccountDetail(recvWindow); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmCurrentPositionModeExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmCurrentPositionModeExample.java index cf85a4935..0093254cb 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmCurrentPositionModeExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmCurrentPositionModeExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetCmCurrentPositionModeResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetCmCurrentPositionModeExample { @@ -26,14 +27,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Get CM Current Position Mode(USER_DATA) + * Get CM Current Position Mode (USER_DATA) * - *

Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in CM Weight: - * 30 + *

Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in CM + * Weight(IP): 30 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getCmCurrentPositionModeExample() throws ApiException { + public void getCmCurrentPositionModeExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getCmCurrentPositionMode(recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmIncomeHistoryExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmIncomeHistoryExample.java index aec7f95ec..3b853c194 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmIncomeHistoryExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetCmIncomeHistoryExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetCmIncomeHistoryResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.IncomeType; +import java.io.IOException; /** API examples for AccountApi */ public class GetCmIncomeHistoryExample { @@ -26,22 +28,23 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Get CM Income History(USER_DATA) + * Get CM Income History (USER_DATA) * - *

Get CM Income History * If `incomeType` is not sent, all kinds of flow will be - * returned * \"trandId\" is unique in the same \"incomeType\" for a user * - * The interval between `startTime` and `endTime` can not exceed 200 days: * - * If `startTime` and `endTime` are not sent, the last 200 days will be - * returned Weight: 30 + *

Get CM Income History. Weight(IP): 30 Security Type: USER_DATA Notes: - If + * `incomeType` is not sent, all kinds of flow will be returned - + * \"trandId\" is unique in the same \"incomeType\" for a user - The + * interval between `startTime` and `endTime` can not exceed 200 days: - If + * `startTime` and `endTime` are not sent, the last 200 days will be + * returned * * @throws ApiException if the Api call fails */ - public void getCmIncomeHistoryExample() throws ApiException { - String symbol = ""; - String incomeType = ""; + public void getCmIncomeHistoryExample() throws ApiException, IOException { + String symbol = "BTCUSD_200925"; + IncomeType incomeType = IncomeType.TRANSFER; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long page = 0L; + Long page = 1L; Long limit = 100L; Long recvWindow = 5000L; ApiResponse response = diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesOrderHistoryExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesOrderHistoryExample.java index 27ba5dc2f..ec8529b1a 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesOrderHistoryExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesOrderHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetDownloadIdForUmFuturesOrderHistoryResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetDownloadIdForUmFuturesOrderHistoryExample { @@ -28,13 +29,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Get Download Id For UM Futures Order History (USER_DATA) * - *

Get download id for UM futures order history * Request Limitation is 10 times per month, - * shared by front end download page and rest api * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 1500 + *

Get download id for UM futures order history Weight(IP): 1500 Security Type: USER_DATA + * Notes: - Request Limitation is 10 times per month, shared by front end download page and rest + * api - The time between `startTime` and `endTime` can not be longer than 1 + * year * * @throws ApiException if the Api call fails */ - public void getDownloadIdForUmFuturesOrderHistoryExample() throws ApiException { + public void getDownloadIdForUmFuturesOrderHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesTradeHistoryExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesTradeHistoryExample.java index 3282bb343..7c88b4567 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesTradeHistoryExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesTradeHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetDownloadIdForUmFuturesTradeHistoryResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetDownloadIdForUmFuturesTradeHistoryExample { @@ -28,13 +29,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Get Download Id For UM Futures Trade History (USER_DATA) * - *

Get download id for UM futures trade history * Request Limitation is 5 times per month, - * shared by front end download page and rest api * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 1500 + *

Get download id for UM futures trade history Weight(IP): 1500 Security Type: USER_DATA + * Notes: - Request Limitation is 5 times per month, shared by front end download page and rest + * api - The time between `startTime` and `endTime` can not be longer than 1 + * year * * @throws ApiException if the Api call fails */ - public void getDownloadIdForUmFuturesTradeHistoryExample() throws ApiException { + public void getDownloadIdForUmFuturesTradeHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesTransactionHistoryExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesTransactionHistoryExample.java index 79f86977f..a5c6ea8fb 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesTransactionHistoryExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetDownloadIdForUmFuturesTransactionHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetDownloadIdForUmFuturesTransactionHistoryResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetDownloadIdForUmFuturesTransactionHistoryExample { @@ -28,13 +29,15 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Get Download Id For UM Futures Transaction History (USER_DATA) * - *

Get download id for UM futures transaction history * Request Limitation is 5 times per - * month, shared by front end download page and rest api * The time between - * `startTime` and `endTime` can not be longer than 1 year Weight: 1500 + *

Get download id for UM futures transaction history Weight(IP): 1500 Security Type: + * USER_DATA Notes: - Request Limitation is 5 times per month, shared by front end download page + * and rest api - The time between `startTime` and `endTime` can not be + * longer than 1 year * * @throws ApiException if the Api call fails */ - public void getDownloadIdForUmFuturesTransactionHistoryExample() throws ApiException { + public void getDownloadIdForUmFuturesTransactionHistoryExample() + throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetMarginBorrowLoanInterestHistoryExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetMarginBorrowLoanInterestHistoryExample.java index 9ac7614da..dd0a5258b 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetMarginBorrowLoanInterestHistoryExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetMarginBorrowLoanInterestHistoryExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Archived; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetMarginBorrowLoanInterestHistoryResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetMarginBorrowLoanInterestHistoryExample { @@ -26,30 +28,30 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Get Margin Borrow/Loan Interest History(USER_DATA) + * Get Margin Borrow/Loan Interest History (USER_DATA) * - *

Get Margin Borrow/Loan Interest History * Response in descending order * The max interval - * between startTime and endTime is 30 days. It is a MUST to ensure data correctness. * If - * `startTime` and `endTime` not sent, return records of the last 7 days by - * default * If `startTime` is sent and `endTime` is not sent, the records - * from `startTime` to the present will be returned; if `startTime` is more - * than 30 days ago, the records of the past 30 days will be returned. * If - * `startTime` is not sent and `endTime` is sent, the records of the 7 days - * before `endTime` is returned. * Type in response has 5 enums: * - * `PERIODIC` interest charged per hour * `ON_BORROW` first interest charged - * on borrow * `PERIODIC_CONVERTED` interest charged per hour converted into BNB * - * `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB * - * `PORTFOLIO` Portfolio Margin negative balance daily interest Weight: 1 + *

Get Margin Borrow/Loan Interest History Weight(IP): 1 Security Type: USER_DATA Notes: - + * Response in descending order - The max interval between startTime and endTime is 30 days. It + * is a MUST to ensure data correctness. - If `startTime` and `endTime` not + * sent, return records of the last 7 days by default - If `startTime` is sent and + * `endTime` is not sent, the records from `startTime` to the present will + * be returned; if `startTime` is more than 30 days ago, the records of the past 30 + * days will be returned. - If `startTime` is not sent and `endTime` is + * sent, the records of the 7 days before `endTime` is returned. - Type in response + * has 5 enums: - `PERIODIC` interest charged per hour - `ON_BORROW` first + * interest charged on borrow - `PERIODIC_CONVERTED` interest charged per hour + * converted into BNB - `ON_BORROW_CONVERTED` first interest charged on borrow + * converted into BNB - `PORTFOLIO` Portfolio Margin negative balance daily interest * * @throws ApiException if the Api call fails */ - public void getMarginBorrowLoanInterestHistoryExample() throws ApiException { - String asset = ""; + public void getMarginBorrowLoanInterestHistoryExample() throws ApiException, IOException { + String asset = "USDT"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; Long size = 10L; - String archived = ""; + Archived archived = Archived.TRUE; Long recvWindow = 5000L; ApiResponse response = getApi().getMarginBorrowLoanInterestHistory( diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmAccountDetailExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmAccountDetailExample.java index 0910aec22..323f9a75c 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmAccountDetailExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmAccountDetailExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUmAccountDetailResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetUmAccountDetailExample { @@ -26,13 +27,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Get UM Account Detail(USER_DATA) + * Get UM Account Detail (USER_DATA) * - *

Get current UM account asset and position information. Weight: 5 + *

Get current UM account asset and position information. Weight(IP): 5 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ - public void getUmAccountDetailExample() throws ApiException { + public void getUmAccountDetailExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getUmAccountDetail(recvWindow); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmAccountDetailV2Example.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmAccountDetailV2Example.java index 053292e0c..5e986ec5f 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmAccountDetailV2Example.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmAccountDetailV2Example.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUmAccountDetailV2Response; +import java.io.IOException; /** API examples for AccountApi */ public class GetUmAccountDetailV2Example { @@ -26,13 +27,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Get UM Account Detail V2(USER_DATA) + * Get UM Account Detail V2 (USER_DATA) * - *

Get current UM account asset and position information. Weight: 5 + *

Get current UM account asset and position information. Weight(IP): 5 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ - public void getUmAccountDetailV2Example() throws ApiException { + public void getUmAccountDetailV2Example() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getUmAccountDetailV2(recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmCurrentPositionModeExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmCurrentPositionModeExample.java index cb5460861..403108125 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmCurrentPositionModeExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmCurrentPositionModeExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUmCurrentPositionModeResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetUmCurrentPositionModeExample { @@ -26,14 +27,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Get UM Current Position Mode(USER_DATA) + * Get UM Current Position Mode (USER_DATA) * - *

Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in UM Weight: - * 30 + *

Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in UM + * Weight(IP): 30 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getUmCurrentPositionModeExample() throws ApiException { + public void getUmCurrentPositionModeExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getUmCurrentPositionMode(recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesOrderDownloadLinkByIdExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesOrderDownloadLinkByIdExample.java index b2e42d649..f707d9bca 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesOrderDownloadLinkByIdExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesOrderDownloadLinkByIdExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUmFuturesOrderDownloadLinkByIdResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetUmFuturesOrderDownloadLinkByIdExample { @@ -26,14 +27,15 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Get UM Futures Order Download Link by Id(USER_DATA) + * Get UM Futures Order Download Link by Id (USER_DATA) * - *

Get UM futures order download link by Id * Download link expiration: 7 days Weight: 10 + *

Get UM futures order download link by Id Weight(IP): 10 Security Type: USER_DATA Notes: - + * Download link expiration: 7 days * * @throws ApiException if the Api call fails */ - public void getUmFuturesOrderDownloadLinkByIdExample() throws ApiException { - String downloadId = "1"; + public void getUmFuturesOrderDownloadLinkByIdExample() throws ApiException, IOException { + String downloadId = "545923594199212032"; Long recvWindow = 5000L; ApiResponse response = getApi().getUmFuturesOrderDownloadLinkById(downloadId, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesTradeDownloadLinkByIdExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesTradeDownloadLinkByIdExample.java index 96ae9c4f8..7780db26d 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesTradeDownloadLinkByIdExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesTradeDownloadLinkByIdExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUmFuturesTradeDownloadLinkByIdResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetUmFuturesTradeDownloadLinkByIdExample { @@ -26,14 +27,15 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Get UM Futures Trade Download Link by Id(USER_DATA) + * Get UM Futures Trade Download Link by Id (USER_DATA) * - *

Get UM futures trade download link by Id * Download link expiration: 7 days Weight: 10 + *

Get UM futures trade download link by Id Weight(IP): 10 Security Type: USER_DATA Notes: - + * Download link expiration: 7 days * * @throws ApiException if the Api call fails */ - public void getUmFuturesTradeDownloadLinkByIdExample() throws ApiException { - String downloadId = "1"; + public void getUmFuturesTradeDownloadLinkByIdExample() throws ApiException, IOException { + String downloadId = "545923594199212032"; Long recvWindow = 5000L; ApiResponse response = getApi().getUmFuturesTradeDownloadLinkById(downloadId, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesTransactionDownloadLinkByIdExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesTransactionDownloadLinkByIdExample.java index dd19cd312..5faa2d965 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesTransactionDownloadLinkByIdExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmFuturesTransactionDownloadLinkByIdExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUmFuturesTransactionDownloadLinkByIdResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetUmFuturesTransactionDownloadLinkByIdExample { @@ -26,14 +27,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Get UM Futures Transaction Download Link by Id(USER_DATA) + * Get UM Futures Transaction Download Link by Id (USER_DATA) * - *

Get UM futures Transaction download link by Id * Download link expiration: 7 days Weight: - * 10 + *

Get UM futures Transaction download link by Id Weight(IP): 10 Security Type: USER_DATA + * Notes: - Download link expiration: 7 days * * @throws ApiException if the Api call fails */ - public void getUmFuturesTransactionDownloadLinkByIdExample() throws ApiException { + public void getUmFuturesTransactionDownloadLinkByIdExample() throws ApiException, IOException { String downloadId = "1"; Long recvWindow = 5000L; ApiResponse response = diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmIncomeHistoryExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmIncomeHistoryExample.java index c5d840e7f..f71835060 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmIncomeHistoryExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUmIncomeHistoryExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUmIncomeHistoryResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.IncomeType; +import java.io.IOException; /** API examples for AccountApi */ public class GetUmIncomeHistoryExample { @@ -26,21 +28,22 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Get UM Income History(USER_DATA) + * Get UM Income History (USER_DATA) * - *

Get UM Income History * If neither `startTime` nor `endTime` is sent, - * the recent 7-day data will be returned. * If `incomeType` is not sent, all kinds of - * flow will be returned * \"trandId\" is unique in the same incomeType for a user * - * Income history only contains data for the last three months Weight: 30 + *

Get UM Income History. Weight(IP): 30 Security Type: USER_DATA Notes: - If neither + * `startTime` nor `endTime` is sent, the recent 7-day data will be + * returned. - If `incomeType` is not sent, all kinds of flow will be returned - + * \"trandId\" is unique in the same incomeType for a user - Income history only + * contains data for the last three months * * @throws ApiException if the Api call fails */ - public void getUmIncomeHistoryExample() throws ApiException { + public void getUmIncomeHistoryExample() throws ApiException, IOException { String symbol = ""; - String incomeType = ""; + IncomeType incomeType = IncomeType.TRANSFER; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long page = 0L; + Long page = 1L; Long limit = 100L; Long recvWindow = 5000L; ApiResponse response = diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUserCommissionRateForCmExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUserCommissionRateForCmExample.java index 35666bc4f..31961894a 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUserCommissionRateForCmExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUserCommissionRateForCmExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUserCommissionRateForCmResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetUserCommissionRateForCmExample { @@ -26,14 +27,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Get User Commission Rate for CM(USER_DATA) + * Get User Commission Rate for CM (USER_DATA) * - *

Get User Commission Rate for CM Weight: 20 + *

Get User Commission Rate for CM Weight(IP): 20 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getUserCommissionRateForCmExample() throws ApiException { - String symbol = ""; + public void getUserCommissionRateForCmExample() throws ApiException, IOException { + String symbol = "BTCUSD_PERP"; Long recvWindow = 5000L; ApiResponse response = getApi().getUserCommissionRateForCm(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUserCommissionRateForUmExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUserCommissionRateForUmExample.java index 4b426bfbd..c04f26847 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUserCommissionRateForUmExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/GetUserCommissionRateForUmExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUserCommissionRateForUmResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetUserCommissionRateForUmExample { @@ -26,14 +27,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Get User Commission Rate for UM(USER_DATA) + * Get User Commission Rate for UM (USER_DATA) * - *

Get User Commission Rate for UM Weight: 20 + *

Get User Commission Rate for UM Weight(IP): 20 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getUserCommissionRateForUmExample() throws ApiException { - String symbol = ""; + public void getUserCommissionRateForUmExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().getUserCommissionRateForUm(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/MarginMaxBorrowExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/MarginMaxBorrowExample.java index 2be42b483..a7d1de159 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/MarginMaxBorrowExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/MarginMaxBorrowExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.MarginMaxBorrowResponse; +import java.io.IOException; /** API examples for AccountApi */ public class MarginMaxBorrowExample { @@ -26,14 +27,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Margin Max Borrow(USER_DATA) + * Margin Max Borrow (USER_DATA) * - *

Query margin max borrow Weight: 5 + *

Query margin max borrow Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void marginMaxBorrowExample() throws ApiException { - String asset = ""; + public void marginMaxBorrowExample() throws ApiException, IOException { + String asset = "USDT"; Long recvWindow = 5000L; ApiResponse response = getApi().marginMaxBorrow(asset, recvWindow); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/PortfolioMarginUmTradingQuantitativeRulesIndicatorsExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/PortfolioMarginUmTradingQuantitativeRulesIndicatorsExample.java index f30f66135..285cef472 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/PortfolioMarginUmTradingQuantitativeRulesIndicatorsExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/PortfolioMarginUmTradingQuantitativeRulesIndicatorsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse; +import java.io.IOException; /** API examples for AccountApi */ public class PortfolioMarginUmTradingQuantitativeRulesIndicatorsExample { @@ -26,15 +27,16 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Portfolio Margin UM Trading Quantitative Rules Indicators(USER_DATA) + * Portfolio Margin UM Trading Quantitative Rules Indicators (USER_DATA) * - *

Portfolio Margin UM Trading Quantitative Rules Indicators Weight: 1 for a single symbol 10 - * when the symbol parameter is omitted + *

Portfolio Margin UM Trading Quantitative Rules Indicators Weight: - 1 for a single + * `symbol` - 10 when `symbol` is omitted Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void portfolioMarginUmTradingQuantitativeRulesIndicatorsExample() throws ApiException { - String symbol = ""; + public void portfolioMarginUmTradingQuantitativeRulesIndicatorsExample() + throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().portfolioMarginUmTradingQuantitativeRulesIndicators(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryCmPositionInformationExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryCmPositionInformationExample.java index 446ac8417..3e5a1bd7f 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryCmPositionInformationExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryCmPositionInformationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCmPositionInformationResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryCmPositionInformationExample { @@ -26,20 +27,20 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query CM Position Information(USER_DATA) + * Query CM Position Information (USER_DATA) * - *

Get current CM position information. * If neither `marginAsset` nor - * `pair` is sent, positions of all symbols with `TRADING` status will be - * returned. * for One-way Mode user, the response will only show the \"BOTH\" - * positions * for Hedge Mode user, the response will show \"LONG\", and - * \"SHORT\" positions. * Please use with user data stream `ACCOUNT_UPDATE` - * to meet your timeliness and accuracy needs. Weight: 1 + *

Get current CM position information. Weight(IP): 1 Security Type: USER_DATA Notes: - If + * neither `marginAsset` nor `pair` is sent, positions of all symbols with + * `TRADING` status will be returned. - for One-way Mode user, the response will only + * show the \"BOTH\" positions - for Hedge Mode user, the response will show + * \"LONG\", and \"SHORT\" positions. **Note** - Please use with user data + * stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. * * @throws ApiException if the Api call fails */ - public void queryCmPositionInformationExample() throws ApiException { - String marginAsset = ""; - String pair = ""; + public void queryCmPositionInformationExample() throws ApiException, IOException { + String marginAsset = "USDT"; + String pair = "BTCUSD_201225"; Long recvWindow = 5000L; ApiResponse response = getApi().queryCmPositionInformation(marginAsset, pair, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginLoanRecordExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginLoanRecordExample.java index 4036749b1..9109540c3 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginLoanRecordExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginLoanRecordExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Archived; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryMarginLoanRecordResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryMarginLoanRecordExample { @@ -26,24 +28,24 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query Margin Loan Record(USER_DATA) + * Query Margin Loan Record (USER_DATA) * - *

Query margin loan record * txId or startTime must be sent. txId takes precedence. * - * Response in descending order * The max interval between `startTime` and - * `endTime` is 30 days. * If `startTime` and `endTime` not sent, - * return records of the last 7 days by default * Set `archived` to `true` - * to query data from 6 months ago Weight: 10 + *

Query margin loan record Weight(IP): 10 Security Type: USER_DATA Notes: - txId or + * startTime must be sent. txId takes precedence. - Response in descending order - The max + * interval between `startTime` and `endTime` is 30 days. - If + * `startTime` and `endTime` not sent, return records of the last 7 days by + * default - Set `archived` to `true` to query data from 6 months ago * * @throws ApiException if the Api call fails */ - public void queryMarginLoanRecordExample() throws ApiException { - String asset = ""; + public void queryMarginLoanRecordExample() throws ApiException, IOException { + String asset = "USDT"; Long txId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; Long size = 10L; - String archived = ""; + Archived archived = Archived.TRUE; Long recvWindow = 5000L; ApiResponse response = getApi().queryMarginLoanRecord( diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginMaxWithdrawExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginMaxWithdrawExample.java index 5e0b252e1..8c67d11d3 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginMaxWithdrawExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginMaxWithdrawExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryMarginMaxWithdrawResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryMarginMaxWithdrawExample { @@ -26,14 +27,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query Margin Max Withdraw(USER_DATA) + * Query Margin Max Withdraw (USER_DATA) * - *

Query Margin Max Withdraw Weight: 5 + *

Query Margin Max Withdraw Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryMarginMaxWithdrawExample() throws ApiException { - String asset = ""; + public void queryMarginMaxWithdrawExample() throws ApiException, IOException { + String asset = "USDT"; Long recvWindow = 5000L; ApiResponse response = getApi().queryMarginMaxWithdraw(asset, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginRepayRecordExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginRepayRecordExample.java index d186544c9..15e755992 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginRepayRecordExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryMarginRepayRecordExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Archived; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryMarginRepayRecordResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryMarginRepayRecordExample { @@ -26,24 +28,24 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query Margin repay Record(USER_DATA) + * Query Margin repay Record (USER_DATA) * - *

Query margin repay record. * txId or startTime must be sent. txId takes precedence. * - * Response in descending order * The max interval between `startTime` and - * `endTime` is 30 days. * If `startTime` and `endTime` not sent, - * return records of the last 7 days by default * Set `archived` to `true` - * to query data from 6 months ago Weight: 10 + *

Query margin repay record. Weight(IP): 10 Security Type: USER_DATA Notes: - txId or + * startTime must be sent. txId takes precedence. - Response in descending order - The max + * interval between `startTime` and `endTime` is 30 days. - If + * `startTime` and `endTime` not sent, return records of the last 7 days by + * default - Set `archived` to `true` to query data from 6 months ago * * @throws ApiException if the Api call fails */ - public void queryMarginRepayRecordExample() throws ApiException { - String asset = ""; + public void queryMarginRepayRecordExample() throws ApiException, IOException { + String asset = "USDT"; Long txId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; Long size = 10L; - String archived = ""; + Archived archived = Archived.TRUE; Long recvWindow = 5000L; ApiResponse response = getApi().queryMarginRepayRecord( diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryPortfolioMarginNegativeBalanceInterestHistoryExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryPortfolioMarginNegativeBalanceInterestHistoryExample.java index 74ff7232b..66d3d73b2 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryPortfolioMarginNegativeBalanceInterestHistoryExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryPortfolioMarginNegativeBalanceInterestHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryPortfolioMarginNegativeBalanceInterestHistoryResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryPortfolioMarginNegativeBalanceInterestHistoryExample { @@ -26,21 +27,22 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query Portfolio Margin Negative Balance Interest History(USER_DATA) + * Query Portfolio Margin Negative Balance Interest History (USER_DATA) * - *

Query interest history of negative balance for portfolio margin. * Response in descending - * order * The max interval between startTime and endTime is 30 days. It is a MUST to ensure - * data correctness. * If `startTime` and `endTime` not sent, return records - * of the last 7 days by default * If `startTime` is sent and `endTime` is - * not sent, the records from `startTime` to the present will be returned; if - * `startTime` is more than 30 days ago, the records of the past 30 days will be - * returned. * If `startTime` is not sent and `endTime` is sent, the records - * of the 7 days before `endTime` is returned. Weight: 50 + *

Query interest history of negative balance for portfolio margin. Weight(IP): 50 Security + * Type: USER_DATA Notes: - Results are returned in descending order. - The query range cannot + * exceed 30 days to ensure data correctness. - If both `startTime` and + * `endTime` are omitted, the most recent 7 days are returned by default. - If + * `startTime` is provided but `endTime` is omitted, records from + * `startTime` to now are returned; if that exceeds 30 days, only the most recent 30 + * days are returned. - If `endTime` is provided but `startTime` is omitted, + * records from the 7 days before `endTime` are returned. * * @throws ApiException if the Api call fails */ - public void queryPortfolioMarginNegativeBalanceInterestHistoryExample() throws ApiException { - String asset = ""; + public void queryPortfolioMarginNegativeBalanceInterestHistoryExample() + throws ApiException, IOException { + String asset = "USDT"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long size = 10L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUmPositionInformationExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUmPositionInformationExample.java index 97135fb82..57fe1597a 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUmPositionInformationExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUmPositionInformationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryUmPositionInformationResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryUmPositionInformationExample { @@ -26,17 +27,17 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query UM Position Information(USER_DATA) + * Query UM Position Information (USER_DATA) * - *

Get current UM position information. * Please use with user data stream - * `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. * for One-way Mode - * user, the response will only show the \"BOTH\" positions * for Hedge Mode user, the - * response will show \"LONG\", and \"SHORT\" positions. Weight: 5 + *

Get current UM position information. Weight(IP): 5 Security Type: USER_DATA Notes: - + * Please use with account push event `ACCOUNT_UPDATE` for timeliness and accuracy. - + * In One-way Mode, only positions with side `BOTH` are shown. - In Hedge Mode, + * positions with sides `BOTH`, `LONG`, and `SHORT` are shown. * * @throws ApiException if the Api call fails */ - public void queryUmPositionInformationExample() throws ApiException { - String symbol = ""; + public void queryUmPositionInformationExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().queryUmPositionInformation(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUserNegativeBalanceAutoExchangeRecordExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUserNegativeBalanceAutoExchangeRecordExample.java index 663f61cf2..d74ecf9ad 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUserNegativeBalanceAutoExchangeRecordExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUserNegativeBalanceAutoExchangeRecordExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryUserNegativeBalanceAutoExchangeRecordResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryUserNegativeBalanceAutoExchangeRecordExample { @@ -28,12 +29,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Query User Negative Balance Auto Exchange Record (USER_DATA) * - *

Query user negative balance auto exchange record * Response in descending order * The max - * interval between `startTime` and `endTime` is 3 months. Weight: 100 + *

Query user negative balance auto exchange record Weight(IP): 100 Security Type: USER_DATA + * Notes: - Response in descending order - The max interval between `startTime` and + * `endTime` is 3 months. * * @throws ApiException if the Api call fails */ - public void queryUserNegativeBalanceAutoExchangeRecordExample() throws ApiException { + public void queryUserNegativeBalanceAutoExchangeRecordExample() + throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUserRateLimitExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUserRateLimitExample.java index d1b790d92..22fcf53cf 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUserRateLimitExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/QueryUserRateLimitExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryUserRateLimitResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryUserRateLimitExample { @@ -28,11 +29,11 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Query User Rate Limit (USER_DATA) * - *

Query User Rate Limit Weight: 1 + *

Query User Rate Limit Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryUserRateLimitExample() throws ApiException { + public void queryUserRateLimitExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().queryUserRateLimit(recvWindow); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/RepayFuturesNegativeBalanceExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/RepayFuturesNegativeBalanceExample.java index 5a51cda48..c6d481b14 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/RepayFuturesNegativeBalanceExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/RepayFuturesNegativeBalanceExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.RepayFuturesNegativeBalanceRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.RepayFuturesNegativeBalanceResponse; +import java.io.IOException; /** API examples for AccountApi */ public class RepayFuturesNegativeBalanceExample { @@ -27,13 +28,13 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Repay futures Negative Balance(USER_DATA) + * Repay futures Negative Balance (USER_DATA) * - *

Repay futures Negative Balance Weight: 750 + *

Repay futures Negative Balance Weight(IP): 750 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void repayFuturesNegativeBalanceExample() throws ApiException { + public void repayFuturesNegativeBalanceExample() throws ApiException, IOException { RepayFuturesNegativeBalanceRequest repayFuturesNegativeBalanceRequest = new RepayFuturesNegativeBalanceRequest(); ApiResponse response = diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmFuturesAccountConfigurationExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmFuturesAccountConfigurationExample.java index 51a7bc547..1ff8e678d 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmFuturesAccountConfigurationExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmFuturesAccountConfigurationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.UmFuturesAccountConfigurationResponse; +import java.io.IOException; /** API examples for AccountApi */ public class UmFuturesAccountConfigurationExample { @@ -26,13 +27,13 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * UM Futures Account Configuration(USER_DATA) + * UM Futures Account Configuration (USER_DATA) * - *

Query UM Futures account configuration Weight: 5 + *

Query UM Futures account configuration Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void umFuturesAccountConfigurationExample() throws ApiException { + public void umFuturesAccountConfigurationExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().umFuturesAccountConfiguration(recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmFuturesSymbolConfigurationExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmFuturesSymbolConfigurationExample.java index e7b0505ec..938a8e202 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmFuturesSymbolConfigurationExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmFuturesSymbolConfigurationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.UmFuturesSymbolConfigurationResponse; +import java.io.IOException; /** API examples for AccountApi */ public class UmFuturesSymbolConfigurationExample { @@ -26,14 +27,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * UM Futures Symbol Configuration(USER_DATA) + * UM Futures Symbol Configuration (USER_DATA) * - *

Get current UM account symbol configuration. Weight: 5 + *

Get current UM account symbol configuration. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void umFuturesSymbolConfigurationExample() throws ApiException { - String symbol = ""; + public void umFuturesSymbolConfigurationExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().umFuturesSymbolConfiguration(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmNotionalAndLeverageBracketsExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmNotionalAndLeverageBracketsExample.java index d325d55ce..23ada360b 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmNotionalAndLeverageBracketsExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/account/UmNotionalAndLeverageBracketsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.UmNotionalAndLeverageBracketsResponse; +import java.io.IOException; /** API examples for AccountApi */ public class UmNotionalAndLeverageBracketsExample { @@ -28,12 +29,12 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * UM Notional and Leverage Brackets (USER_DATA) * - *

Query UM notional and leverage brackets Weight: 1 + *

Query UM notional and leverage brackets Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void umNotionalAndLeverageBracketsExample() throws ApiException { - String symbol = ""; + public void umNotionalAndLeverageBracketsExample() throws ApiException, IOException { + String symbol = "ETHUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().umNotionalAndLeverageBrackets(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/marketdata/TestConnectivityExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/marketdata/TestConnectivityExample.java index 88ab762e5..dbb32467b 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/marketdata/TestConnectivityExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/marketdata/TestConnectivityExample.java @@ -5,6 +5,7 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; +import java.io.IOException; /** API examples for MarketDataApi */ public class TestConnectivityExample { @@ -26,11 +27,11 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Test Connectivity * - *

Test connectivity to the Rest API. Weight: 1 + *

Test connectivity to the Rest API. Weight(IP): 1 * * @throws ApiException if the Api call fails */ - public void testConnectivityExample() throws ApiException { + public void testConnectivityExample() throws ApiException, IOException { getApi().testConnectivity(); } } diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllCmOpenConditionalOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllCmOpenConditionalOrdersExample.java index 442b25024..5e49d9b1f 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllCmOpenConditionalOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllCmOpenConditionalOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelAllCmOpenConditionalOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelAllCmOpenConditionalOrdersExample { @@ -26,14 +27,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Cancel All CM Open Conditional Orders(TRADE) + * Cancel All CM Open Conditional Orders (TRADE) * - *

Cancel All CM Open Conditional Orders Weight: 1 + *

Cancel All CM Open Conditional Orders Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void cancelAllCmOpenConditionalOrdersExample() throws ApiException { - String symbol = ""; + public void cancelAllCmOpenConditionalOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().cancelAllCmOpenConditionalOrders(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllCmOpenOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllCmOpenOrdersExample.java index f0b171618..f59cef7a7 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllCmOpenOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllCmOpenOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelAllCmOpenOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelAllCmOpenOrdersExample { @@ -26,14 +27,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Cancel All CM Open Orders(TRADE) + * Cancel All CM Open Orders (TRADE) * - *

Cancel all active LIMIT orders on specific symbol Weight: 1 + *

Cancel all active LIMIT orders on specific symbol Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void cancelAllCmOpenOrdersExample() throws ApiException { - String symbol = ""; + public void cancelAllCmOpenOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().cancelAllCmOpenOrders(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmAlgoOpenOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmAlgoOpenOrdersExample.java index 494589b35..5d9e4d680 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmAlgoOpenOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmAlgoOpenOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelAllUmAlgoOpenOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelAllUmAlgoOpenOrdersExample { @@ -28,12 +29,12 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Cancel All UM Algo Open Orders (TRADE) * - *

Cancel All UM Algo Open Orders Weight: 1 + *

Cancel All UM Algo Open Orders Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void cancelAllUmAlgoOpenOrdersExample() throws ApiException { - String symbol = ""; + public void cancelAllUmAlgoOpenOrdersExample() throws ApiException, IOException { + String symbol = "BNBUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().cancelAllUmAlgoOpenOrders(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmOpenConditionalOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmOpenConditionalOrdersExample.java index 95c54c61b..7e0570409 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmOpenConditionalOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmOpenConditionalOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelAllUmOpenConditionalOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelAllUmOpenConditionalOrdersExample { @@ -26,14 +27,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Cancel All UM Open Conditional Orders + * Cancel All UM Open Conditional Orders (TRADE) * - *

Cancel All UM Open Conditional Orders Weight: 1 + *

Cancel All UM Open Conditional Orders Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void cancelAllUmOpenConditionalOrdersExample() throws ApiException { - String symbol = ""; + public void cancelAllUmOpenConditionalOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().cancelAllUmOpenConditionalOrders(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmOpenOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmOpenOrdersExample.java index 4ce5abdc0..ce61bef77 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmOpenOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelAllUmOpenOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelAllUmOpenOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelAllUmOpenOrdersExample { @@ -26,14 +27,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Cancel All UM Open Orders(TRADE) + * Cancel All UM Open Orders (TRADE) * - *

Cancel all active LIMIT orders on specific symbol Weight: 1 + *

Cancel all active LIMIT orders on specific symbol Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void cancelAllUmOpenOrdersExample() throws ApiException { - String symbol = ""; + public void cancelAllUmOpenOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().cancelAllUmOpenOrders(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelCmConditionalOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelCmConditionalOrderExample.java index f8899a8a3..eb6da6b51 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelCmConditionalOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelCmConditionalOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelCmConditionalOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelCmConditionalOrderExample { @@ -26,15 +27,15 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Cancel CM Conditional Order(TRADE) + * Cancel CM Conditional Order (TRADE) * - *

Cancel CM Conditional Order * Either `strategyId` or - * `newClientStrategyId` must be sent. Weight: 1 + *

Cancel CM Conditional Order Weight(IP): 1 Security Type: TRADE Notes: - Either + * `strategyId` or `newClientStrategyId` must be sent. * * @throws ApiException if the Api call fails */ - public void cancelCmConditionalOrderExample() throws ApiException { - String symbol = ""; + public void cancelCmConditionalOrderExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long strategyId = 1L; String newClientStrategyId = "1"; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelCmOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelCmOrderExample.java index 14b3d4566..3f55b2467 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelCmOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelCmOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelCmOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelCmOrderExample { @@ -26,15 +27,15 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Cancel CM Order(TRADE) + * Cancel CM Order (TRADE) * - *

Cancel an active LIMIT order * Either `orderId` or `origClientOrderId` - * must be sent. Weight: 1 + *

Cancel an active LIMIT order Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent. * * @throws ApiException if the Api call fails */ - public void cancelCmOrderExample() throws ApiException { - String symbol = ""; + public void cancelCmOrderExample() throws ApiException, IOException { + String symbol = "BTCUSD_200925"; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountAllOpenOrdersOnASymbolExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountAllOpenOrdersOnASymbolExample.java index 40a1a67ac..2e73c60ba 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountAllOpenOrdersOnASymbolExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountAllOpenOrdersOnASymbolExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelMarginAccountAllOpenOrdersOnASymbolResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelMarginAccountAllOpenOrdersOnASymbolExample { @@ -26,14 +27,15 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Cancel Margin Account All Open Orders on a Symbol(TRADE) + * Cancel Margin Account All Open Orders on a Symbol (TRADE) * - *

Cancel Margin Account All Open Orders on a Symbol Weight: 5 + *

Cancel Margin Account All Open Orders on a Symbol Weight(IP): 5 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void cancelMarginAccountAllOpenOrdersOnASymbolExample() throws ApiException { - String symbol = ""; + public void cancelMarginAccountAllOpenOrdersOnASymbolExample() + throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().cancelMarginAccountAllOpenOrdersOnASymbol(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountOcoOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountOcoOrdersExample.java index 76a16b1e6..3ddf8f433 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountOcoOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountOcoOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelMarginAccountOcoOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelMarginAccountOcoOrdersExample { @@ -26,15 +27,15 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Cancel Margin Account OCO Orders(TRADE) + * Cancel Margin Account OCO Orders (TRADE) * - *

Cancel Margin Account OCO Orders * Additional notes: Canceling an individual leg will - * cancel the entire OCO Weight: 2 + *

Cancel Margin Account OCO Orders Weight(IP): 2 Security Type: TRADE Notes: - Additional + * notes: Canceling an individual leg will cancel the entire OCO * * @throws ApiException if the Api call fails */ - public void cancelMarginAccountOcoOrdersExample() throws ApiException { - String symbol = ""; + public void cancelMarginAccountOcoOrdersExample() throws ApiException, IOException { + String symbol = "LTCBTC"; Long orderListId = 1L; String listClientOrderId = "1"; String newClientOrderId = "1"; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountOrderExample.java index dc8609627..671d033dc 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelMarginAccountOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelMarginAccountOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelMarginAccountOrderExample { @@ -26,15 +27,15 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Cancel Margin Account Order(TRADE) + * Cancel Margin Account Order (TRADE) * - *

Cancel Margin Account Order * Either `orderId` or `origClientOrderId` - * must be sent. Weight: 2 + *

Cancel Margin Account Order Weight(IP): 2 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent. * * @throws ApiException if the Api call fails */ - public void cancelMarginAccountOrderExample() throws ApiException { - String symbol = ""; + public void cancelMarginAccountOrderExample() throws ApiException, IOException { + String symbol = "LTCBTC"; Long orderId = 1L; String origClientOrderId = "1"; String newClientOrderId = "1"; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmAlgoOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmAlgoOrderExample.java index 48c338ec5..793661519 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmAlgoOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmAlgoOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelUmAlgoOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelUmAlgoOrderExample { @@ -28,14 +29,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Cancel UM Algo Order (TRADE) * - *

Cancel an active UM algo order. * Either `algoId` or `clientAlgoId` - * must be sent. Weight: 1 + *

Cancel an active UM algo order Weight(IP): 1 Security Type: TRADE Notes: - Either + * `algoId` or `clientAlgoId` must be sent. * * @throws ApiException if the Api call fails */ - public void cancelUmAlgoOrderExample() throws ApiException { - Long algoId = 1L; - String clientAlgoId = "1"; + public void cancelUmAlgoOrderExample() throws ApiException, IOException { + Long algoId = 2146760L; + String clientAlgoId = "6B2I9XVcJpCjqPAJ4YoFX7"; Long recvWindow = 5000L; ApiResponse response = getApi().cancelUmAlgoOrder(algoId, clientAlgoId, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmConditionalOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmConditionalOrderExample.java index 01b8e8736..1553bf920 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmConditionalOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmConditionalOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelUmConditionalOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelUmConditionalOrderExample { @@ -26,15 +27,15 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Cancel UM Conditional Order + * Cancel UM Conditional Order (TRADE) * - *

Cancel UM Conditional Order * Either `strategyId` or - * `newClientStrategyId` must be sent. Weight: 1 + *

Cancel UM Conditional Order Weight(IP): 1 Security Type: TRADE Notes: - Either + * `strategyId` or `newClientStrategyId` must be sent. * * @throws ApiException if the Api call fails */ - public void cancelUmConditionalOrderExample() throws ApiException { - String symbol = ""; + public void cancelUmConditionalOrderExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long strategyId = 1L; String newClientStrategyId = "1"; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmOrderExample.java index 5bacb0b1f..e7382b078 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CancelUmOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CancelUmOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelUmOrderExample { @@ -26,15 +27,15 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Cancel UM Order(TRADE) + * Cancel UM Order (TRADE) * - *

Cancel an active UM LIMIT order * Either `orderId` or - * `origClientOrderId` must be sent. Weight: 1 + *

Cancel an active UM LIMIT order Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent. * * @throws ApiException if the Api call fails */ - public void cancelUmOrderExample() throws ApiException { - String symbol = ""; + public void cancelUmOrderExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CmAccountTradeListExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CmAccountTradeListExample.java index 1dda7f9cf..7aed71d1a 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CmAccountTradeListExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CmAccountTradeListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CmAccountTradeListResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CmAccountTradeListExample { @@ -26,27 +27,28 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * CM Account Trade List(USER_DATA) + * CM Account Trade List (USER_DATA) * - *

Get trades for a specific account and CM symbol. * Either `symbol` or - * `pair` must be sent * `symbol` and `pair` cannot be sent - * together * `pair` and `fromId` cannot be sent together * - * `OrderId` can only be sent together with symbol * If a `pair` is sent, - * tickers for all symbols of the `pair` will be returned * The parameter - * `fromId` cannot be sent with `startTime` or `endTime` * If + *

Get trades for a specific account and CM symbol. Weight: - 20 with `symbol` - 40 + * with `pair` Security Type: USER_DATA Notes: - Either `symbol` or + * `pair` must be sent - `symbol` and `pair` cannot be sent + * together - `pair` and `fromId` cannot be sent together - + * `OrderId` can only be sent together with symbol - If a `pair` is sent, + * tickers for all symbols of the `pair` will be returned - The parameter + * `fromId` cannot be sent with `startTime` or `endTime` - If * `startTime` and `endTime` are both not sent, then the last '24 - * hours' data will be returned. * The time between `startTime` and - * `endTime` cannot be longer than 24 hours. Weight: 20 with symbol, 40 with pair + * hours' data will be returned. - The time between `startTime` and + * `endTime` cannot be longer than 24 hours. * * @throws ApiException if the Api call fails */ - public void cmAccountTradeListExample() throws ApiException { - String symbol = ""; - String pair = ""; + public void cmAccountTradeListExample() throws ApiException, IOException { + String symbol = "BTCUSD_200626"; + String pair = "BTCUSD"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long fromId = 1L; - Long limit = 100L; + Long limit = 50L; Long recvWindow = 5000L; ApiResponse response = getApi().cmAccountTradeList( diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CmPositionAdlQuantileEstimationExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CmPositionAdlQuantileEstimationExample.java index 4e2cbc9d1..fdc59b66b 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CmPositionAdlQuantileEstimationExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/CmPositionAdlQuantileEstimationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.CmPositionAdlQuantileEstimationResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CmPositionAdlQuantileEstimationExample { @@ -26,7 +27,7 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * CM Position ADL Quantile Estimation(USER_DATA) + * CM Position ADL Quantile Estimation (USER_DATA) * *

Query CM Position ADL Quantile Estimation * Values update every 30s. * Values 0, 1, 2, 3, * 4 shows the queue position and possibility of ADL from low to high. * For positions of the @@ -36,12 +37,12 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { * in Hedge Mode: * \"HEDGE\" as a sign will be returned instead of * \"BOTH\"; * A same value caculated on unrealized pnls on long and short sides' * positions will be shown for \"LONG\" and \"SHORT\" when there are - * positions in both of long and short sides. Weight: 5 + * positions in both of long and short sides. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void cmPositionAdlQuantileEstimationExample() throws ApiException { - String symbol = ""; + public void cmPositionAdlQuantileEstimationExample() throws ApiException, IOException { + String symbol = "BTCUSD_201225"; Long recvWindow = 5000L; ApiResponse response = getApi().cmPositionAdlQuantileEstimation(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/FuturesTradfiPerpsContractExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/FuturesTradfiPerpsContractExample.java index 31b326312..55873b88b 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/FuturesTradfiPerpsContractExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/FuturesTradfiPerpsContractExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.FuturesTradfiPerpsContractRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.FuturesTradfiPerpsContractResponse; +import java.io.IOException; /** API examples for TradeApi */ public class FuturesTradfiPerpsContractExample { @@ -27,13 +28,13 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Futures TradFi Perps Contract(USER_DATA) + * Futures TradFi Perps Contract (USER_DATA) * - *

Sign TradFi-Perps agreement contract Weight: 5 + *

Sign TradFi-Perps agreement contract Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void futuresTradfiPerpsContractExample() throws ApiException { + public void futuresTradfiPerpsContractExample() throws ApiException, IOException { FuturesTradfiPerpsContractRequest futuresTradfiPerpsContractRequest = new FuturesTradfiPerpsContractRequest(); ApiResponse response = diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/GetUmFuturesBnbBurnStatusExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/GetUmFuturesBnbBurnStatusExample.java index ed4feb79e..4d7fef040 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/GetUmFuturesBnbBurnStatusExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/GetUmFuturesBnbBurnStatusExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.GetUmFuturesBnbBurnStatusResponse; +import java.io.IOException; /** API examples for TradeApi */ public class GetUmFuturesBnbBurnStatusExample { @@ -29,11 +30,11 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { * Get UM Futures BNB Burn Status (USER_DATA) * *

Get user's BNB Fee Discount for UM Futures (Fee Discount On or Fee Discount Off ) - * Weight: 30 + * Weight(IP): 30 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getUmFuturesBnbBurnStatusExample() throws ApiException { + public void getUmFuturesBnbBurnStatusExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getUmFuturesBnbBurnStatus(recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountBorrowExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountBorrowExample.java index a94065402..9368de71b 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountBorrowExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountBorrowExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.MarginAccountBorrowRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.MarginAccountBorrowResponse; +import java.io.IOException; /** API examples for TradeApi */ public class MarginAccountBorrowExample { @@ -27,15 +28,15 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Margin Account Borrow(MARGIN) + * Margin Account Borrow (MARGIN) * - *

Apply for a margin loan. Weight: 100 + *

Apply for a margin loan. Weight(IP): 100 Security Type: MARGIN * * @throws ApiException if the Api call fails */ - public void marginAccountBorrowExample() throws ApiException { + public void marginAccountBorrowExample() throws ApiException, IOException { MarginAccountBorrowRequest marginAccountBorrowRequest = new MarginAccountBorrowRequest(); - marginAccountBorrowRequest.asset(""); + marginAccountBorrowRequest.asset("USDT"); marginAccountBorrowRequest.amount(1.0d); ApiResponse response = getApi().marginAccountBorrow(marginAccountBorrowRequest); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountNewOcoExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountNewOcoExample.java index 6f8496f85..3c7dc2fb8 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountNewOcoExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountNewOcoExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.MarginAccountNewOcoRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.MarginAccountNewOcoResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Side; +import java.io.IOException; /** API examples for TradeApi */ public class MarginAccountNewOcoExample { @@ -28,19 +29,19 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Margin Account New OCO(TRADE) + * Margin Account New OCO (TRADE) * - *

Send in a new OCO for a margin account * Price Restrictions: * `SELL`: Limit - * Price > Last Price > Stop Price * `BUY`: Limit Price < Last Price < - * Stop Price * Quantity Restrictions: * Both legs must have the same quantity * - * `ICEBERG` quantities however do not have to be the same. * Order Rate Limit * - * `OCO` counts as 2 orders against the order rate limit. Weight: 1 + *

Send in a new OCO for a margin account Weight(IP): 1 Security Type: TRADE Notes: - Other + * Info: - Price Restrictions: - `SELL`: Limit Price > Last Price > Stop Price - + * `BUY`: Limit Price * Quantity Restrictions: - Both legs must have the same quantity + * - `ICEBERG` quantities however do not have to be the same. - Order Rate Limit - + * `OCO` counts as 2 orders against the order rate limit. * * @throws ApiException if the Api call fails */ - public void marginAccountNewOcoExample() throws ApiException { + public void marginAccountNewOcoExample() throws ApiException, IOException { MarginAccountNewOcoRequest marginAccountNewOcoRequest = new MarginAccountNewOcoRequest(); - marginAccountNewOcoRequest.symbol(""); + marginAccountNewOcoRequest.symbol("LTCBTC"); marginAccountNewOcoRequest.side(Side.BUY); marginAccountNewOcoRequest.quantity(1.0d); marginAccountNewOcoRequest.price(1.0d); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountRepayDebtExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountRepayDebtExample.java index 7a48ea6f7..807ed7a49 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountRepayDebtExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountRepayDebtExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.MarginAccountRepayDebtRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.MarginAccountRepayDebtResponse; +import java.io.IOException; /** API examples for TradeApi */ public class MarginAccountRepayDebtExample { @@ -27,21 +28,22 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Margin Account Repay Debt(TRADE) + * Margin Account Repay Debt (TRADE) * - *

Repay debt for a margin loan. * The repay asset amount cannot exceed 50000 USD equivalent - * value for a single request. * If `amount` is not sent, all the asset loan will be - * repaid if having enough specific repay assets. * If `amount` is sent, only the - * certain amount of the asset loan will be repaid if having enough specific repay assets. * The - * system will use the same asset to repay the loan first (if have) no matter whether put the - * asset in `specifyRepayAssets` Weight: 3000 + *

Repay debt for a margin loan. Weight(IP): 3000 Security Type: TRADE Notes: - The repay + * asset amount cannot exceed 50000 USD equivalent value for a single request. - If + * `amount` is not sent, all the asset loan will be repaid if having enough specific + * repay assets. - If `amount` is sent, only the certain amount of the asset loan will + * be repaid if having enough specific repay assets. - The system will use the same asset to + * repay the loan first (if have) no matter whether put the asset in + * `specifyRepayAssets` * * @throws ApiException if the Api call fails */ - public void marginAccountRepayDebtExample() throws ApiException { + public void marginAccountRepayDebtExample() throws ApiException, IOException { MarginAccountRepayDebtRequest marginAccountRepayDebtRequest = new MarginAccountRepayDebtRequest(); - marginAccountRepayDebtRequest.asset(""); + marginAccountRepayDebtRequest.asset("USDT"); ApiResponse response = getApi().marginAccountRepayDebt(marginAccountRepayDebtRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountRepayExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountRepayExample.java index 1efd3b39f..a3116a3d1 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountRepayExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountRepayExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.MarginAccountRepayRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.MarginAccountRepayResponse; +import java.io.IOException; /** API examples for TradeApi */ public class MarginAccountRepayExample { @@ -27,15 +28,15 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Margin Account Repay(MARGIN) + * Margin Account Repay (MARGIN) * - *

Repay for a margin loan. Weight: 100 + *

Repay for a margin loan. Weight(IP): 100 Security Type: MARGIN * * @throws ApiException if the Api call fails */ - public void marginAccountRepayExample() throws ApiException { + public void marginAccountRepayExample() throws ApiException, IOException { MarginAccountRepayRequest marginAccountRepayRequest = new MarginAccountRepayRequest(); - marginAccountRepayRequest.asset(""); + marginAccountRepayRequest.asset("USDT"); marginAccountRepayRequest.amount(1.0d); ApiResponse response = getApi().marginAccountRepay(marginAccountRepayRequest); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountTradeListExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountTradeListExample.java index 503c39583..4b5762cd0 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountTradeListExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/MarginAccountTradeListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.MarginAccountTradeListResponse; +import java.io.IOException; /** API examples for TradeApi */ public class MarginAccountTradeListExample { @@ -28,17 +29,20 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Margin Account Trade List (USER_DATA) * - *

Margin Account Trade List Weight: 5 + *

Margin Account Trade List Weight(IP): 5 Security Type: USER_DATA Notes: - **Note:** * If + * `fromId` is set, returns orders with id >= `fromId`; otherwise + * returns recent order history. - The interval between `startTime` and + * `endTime` must be less than 24 hours. * * @throws ApiException if the Api call fails */ - public void marginAccountTradeListExample() throws ApiException { - String symbol = ""; + public void marginAccountTradeListExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long fromId = 1L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = getApi().marginAccountTradeList( diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ModifyCmOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ModifyCmOrderExample.java index 60e4c03f9..c7b83593a 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ModifyCmOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ModifyCmOrderExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ModifyCmOrderRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ModifyCmOrderResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Side; +import java.io.IOException; /** API examples for TradeApi */ public class ModifyCmOrderExample { @@ -28,24 +29,24 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Modify CM Order(TRADE) + * Modify CM Order (TRADE) * *

Order modify function, currently only LIMIT order modification is supported, modified - * orders will be reordered in the match queue * Either `orderId` or - * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. * Both `quantity` and `price` must be sent * When the new - * `quantity` or `price` doesn'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 `quantity` <= `executedQty` * - * When the order is `GTX` and the new price will cause it to be executed immediately - * Weight: 1 + * orders will be reordered in the match queue Weight(IP): 1 Security Type: TRADE Notes: - + * Either `orderId` or `origClientOrderId` must be sent, and the + * `orderId` will prevail if both are sent. - Both `quantity` and + * `price` must be sent - When the new `quantity` or `price` + * doesn'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 + * `quantity` * When the order is `GTX` and the new price will cause it to + * be executed immediately * * @throws ApiException if the Api call fails */ - public void modifyCmOrderExample() throws ApiException { + public void modifyCmOrderExample() throws ApiException, IOException { ModifyCmOrderRequest modifyCmOrderRequest = new ModifyCmOrderRequest(); - modifyCmOrderRequest.symbol(""); + modifyCmOrderRequest.symbol("BTCUSD_PERP"); modifyCmOrderRequest.side(Side.BUY); modifyCmOrderRequest.quantity(1.0d); modifyCmOrderRequest.price(1.0d); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ModifyUmOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ModifyUmOrderExample.java index 9c5ff9207..1fbf8f48f 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ModifyUmOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ModifyUmOrderExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ModifyUmOrderRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ModifyUmOrderResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Side; +import java.io.IOException; /** API examples for TradeApi */ public class ModifyUmOrderExample { @@ -28,22 +29,22 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Modify UM Order(TRADE) + * Modify UM Order (TRADE) * *

Order modify function, currently only LIMIT order modification is supported, modified - * orders will be reordered in the match queue * Either orderId or origClientOrderId must be - * sent, and the orderId will prevail if both are sent. * Both quantity and price must be sent * - * When the new quantity or price doesn'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 quantity <= executedQty * When the order is GTX and the new - * price will cause it to be executed immediately Weight: 1 + * orders will be reordered in the match queue Weight(IP): 1 Security Type: TRADE Notes: - + * Either orderId or origClientOrderId must be sent, and the orderId will prevail if both are + * sent. - Both quantity and price must be sent - When the new quantity or price doesn'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 quantity * When the + * order is GTX and the new price will cause it to be executed immediately * * @throws ApiException if the Api call fails */ - public void modifyUmOrderExample() throws ApiException { + public void modifyUmOrderExample() throws ApiException, IOException { ModifyUmOrderRequest modifyUmOrderRequest = new ModifyUmOrderRequest(); - modifyUmOrderRequest.symbol(""); + modifyUmOrderRequest.symbol("BTCUSDT"); modifyUmOrderRequest.side(Side.BUY); modifyUmOrderRequest.quantity(1.0d); modifyUmOrderRequest.price(1.0d); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewCmConditionalOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewCmConditionalOrderExample.java index 96c71379a..40e9a33db 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewCmConditionalOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewCmConditionalOrderExample.java @@ -10,6 +10,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewCmConditionalOrderResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Side; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.StrategyType; +import java.io.IOException; /** API examples for TradeApi */ public class NewCmConditionalOrderExample { @@ -29,42 +30,25 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * New CM Conditional Order(TRADE) + * New CM Conditional Order (TRADE) * - *

New CM Conditional Order * Order with type `STOP/TAKE_PROFIT`, parameter - * `timeInForce` can be sent ( default `GTC`). * Condition orders will be - * triggered when: * `STOP`, `STOP_MARKET`: * BUY: \"MARK_PRICE\" - * >= `stopPrice` * SELL: \"MARK_PRICE\" <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * \"MARK_PRICE\" <= `stopPrice` * SELL: \"MARK_PRICE\" - * >= `stopPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest mark - * price after order placed `<= `activationPrice`, and the latest mark - * price >`= the lowest mark price * (1 + `callbackRate`) * SELL: the - * highest mark price after order placed >= `activationPrice`, and the latest - * mark price <= the highest mark price * (1 - `callbackRate`) * For - * `TRAILING_STOP_MARKET`, if you got such error code. `{\"code\": - * -2021, \"msg\": \"Order would immediately trigger.\"}` means that - * the parameters you send do not meet the following requirements: * BUY: - * `activationPrice` should be smaller than latest mark price. * SELL: - * `activationPrice` should be larger than latest mark price. * Condition orders will - * be triggered when: * If parameter`priceProtect`is sent as true: * when price - * reaches the `stopPrice` ,the difference rate between \"MARK_PRICE\" and - * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` Weight: 1 + *

New CM Conditional Order Weight(IP): 1 Security Type: TRADE Notes: - Additional mandatory + * parameters based on type: - Order with type `STOP/TAKE_PROFIT`, parameter + * `timeInForce` can be sent ( default `GTC`). - Condition orders will be + * triggered when: - `STOP`, `STOP_MARKET`: - BUY: \"MARK_PRICE\" + * >= `stopPrice` - SELL: \"MARK_PRICE\" = + * `stopPrice` - `TRAILING_STOP_MARKET`: - BUY: the lowest mark price after + * order placed ``= the lowest mark price - (1 + `callbackRate`) - + * SELL: the highest mark price after order placed >= `activationPrice`, and + * the latest mark price = `stopPrice` - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") = `stopPrice` * * @throws ApiException if the Api call fails */ - public void newCmConditionalOrderExample() throws ApiException { + public void newCmConditionalOrderExample() throws ApiException, IOException { NewCmConditionalOrderRequest newCmConditionalOrderRequest = new NewCmConditionalOrderRequest(); - newCmConditionalOrderRequest.symbol(""); + newCmConditionalOrderRequest.symbol("BTCUSDT"); newCmConditionalOrderRequest.side(Side.BUY); newCmConditionalOrderRequest.strategyType(StrategyType.STOP); ApiResponse response = diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewCmOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewCmOrderExample.java index 1546ee057..f2229d129 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewCmOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewCmOrderExample.java @@ -8,8 +8,9 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewCmOrderRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewCmOrderResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.OrderType; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Side; -import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Type; +import java.io.IOException; /** API examples for TradeApi */ public class NewCmOrderExample { @@ -29,20 +30,21 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * New CM Order(TRADE) + * New CM Order (TRADE) * - *

Place new CM order * If `newOrderRespType` is sent as `RESULT` : * - * `MARKET` order: the final FILLED result of the order will be return directly. * - * `LIMIT` order with special `timeInForce`: the final status result of the - * order(FILLED or EXPIRED) will be returned directly. Weight: 1 + *

Place new CM order Weight(IP): 1 Security Type: TRADE Notes: - Additional mandatory + * parameters based on `type`: - If `newOrderRespType` is sent as + * `RESULT` : - `MARKET` order: the final FILLED result of the order will be + * return directly. - `LIMIT` order with special `timeInForce`: the final + * status result of the order(FILLED or EXPIRED) will be returned directly. * * @throws ApiException if the Api call fails */ - public void newCmOrderExample() throws ApiException { + public void newCmOrderExample() throws ApiException, IOException { NewCmOrderRequest newCmOrderRequest = new NewCmOrderRequest(); - newCmOrderRequest.symbol(""); + newCmOrderRequest.symbol("BTCUSDT"); newCmOrderRequest.side(Side.BUY); - newCmOrderRequest.type(Type.LIMIT); + newCmOrderRequest.type(OrderType.STOP); ApiResponse response = getApi().newCmOrder(newCmOrderRequest); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewMarginOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewMarginOrderExample.java index b11224634..680b30c6c 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewMarginOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewMarginOrderExample.java @@ -8,8 +8,9 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewMarginOrderRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewMarginOrderResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.OrderType; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Side; -import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Type; +import java.io.IOException; /** API examples for TradeApi */ public class NewMarginOrderExample { @@ -29,17 +30,17 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * New Margin Order(TRADE) + * New Margin Order (TRADE) * - *

New Margin Order Weight: 1 + *

New Margin Order Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void newMarginOrderExample() throws ApiException { + public void newMarginOrderExample() throws ApiException, IOException { NewMarginOrderRequest newMarginOrderRequest = new NewMarginOrderRequest(); - newMarginOrderRequest.symbol(""); + newMarginOrderRequest.symbol("BTCUSDT"); newMarginOrderRequest.side(Side.BUY); - newMarginOrderRequest.type(Type.LIMIT); + newMarginOrderRequest.type(OrderType.STOP); ApiResponse response = getApi().newMarginOrder(newMarginOrderRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmAlgoOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmAlgoOrderExample.java index 8beb9895e..863302d4e 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmAlgoOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmAlgoOrderExample.java @@ -6,10 +6,12 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.AlgoType; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewUmAlgoOrderRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewUmAlgoOrderResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.OrderType; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Side; -import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Type; +import java.io.IOException; /** API examples for TradeApi */ public class NewUmAlgoOrderExample { @@ -31,48 +33,30 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * New UM Algo Order (TRADE) * - *

Place new UM conditional order * Algo order with type `STOP`, parameter - * `timeInForce` can be sent ( default `GTC`). * Algo order with type - * `TAKE_PROFIT`, parameter `timeInForce` can be sent ( default - * `GTC`). * Condition orders will be triggered when: * If - * parameter`priceProtect`is sent as true: * when price reaches the - * `triggerPrice` , the difference rate between \"MARK_PRICE\" and - * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * `TAKE_PROFIT`, - * `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * SELL: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest price after - * order placed <= `activatePrice`, and the latest price >= the lowest - * price * (1 + `callbackRate`) * SELL: the highest price after order placed - * >= `activatePrice`, and the latest price <= the highest price * (1 - * - `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error - * code. ``{\"code\": -2021, \"msg\": \"Order would - * immediately trigger.\"}`` means that the parameters you send do not meet the - * following requirements: * BUY: `activatePrice` should be smaller than latest price. - * * SELL: `activatePrice` should be larger than latest price. * - * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered, **close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` paremeter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with - * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. Weight: 1 + *

Place new UM conditional order Weight(IP): 1 Security Type: TRADE Notes: - Algo order with + * type `STOP`, parameter `timeInForce` can be sent (default + * `GTC`). - Algo order with type `TAKE_PROFIT`, parameter + * `timeInForce` can be sent (default `GTC`). - Condition orders will be + * triggered when price reaches the `triggerPrice`. - `STOP`, + * `STOP_MARKET`: BUY: latest price >= `triggerPrice`; SELL: latest + * price <= `triggerPrice`. - `TAKE_PROFIT`, + * `TAKE_PROFIT_MARKET`: BUY: latest price <= `triggerPrice`; SELL: + * latest price >= `triggerPrice`. - `TRAILING_STOP_MARKET`: BUY: + * lowest price after order placed <= `activatePrice`, and latest price + * >= lowest price * (1 + `callbackRate`); SELL: highest price after order + * placed >= `activatePrice`, and latest price <= highest price * (1 - + * `callbackRate`). - `selfTradePreventionMode` is only effective when + * `timeInForce` set to `IOC` or `GTC` or `GTD`. * * @throws ApiException if the Api call fails */ - public void newUmAlgoOrderExample() throws ApiException { + public void newUmAlgoOrderExample() throws ApiException, IOException { NewUmAlgoOrderRequest newUmAlgoOrderRequest = new NewUmAlgoOrderRequest(); - newUmAlgoOrderRequest.algoType(""); - newUmAlgoOrderRequest.symbol(""); + newUmAlgoOrderRequest.algoType(AlgoType.CONDITIONAL); + newUmAlgoOrderRequest.symbol("BNBUSDT"); newUmAlgoOrderRequest.side(Side.BUY); - newUmAlgoOrderRequest.type(Type.LIMIT); + newUmAlgoOrderRequest.type(OrderType.STOP); + newUmAlgoOrderRequest.quantity(0.01d); ApiResponse response = getApi().newUmAlgoOrder(newUmAlgoOrderRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmConditionalOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmConditionalOrderExample.java index 1f07bb5d8..e29841d07 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmConditionalOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmConditionalOrderExample.java @@ -10,6 +10,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewUmConditionalOrderResponse; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Side; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.StrategyType; +import java.io.IOException; /** API examples for TradeApi */ public class NewUmConditionalOrderExample { @@ -29,46 +30,29 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * New UM Conditional Order + * New UM Conditional Order (TRADE) * - *

Place new UM conditional order * Order with type `STOP/TAKE_PROFIT`, parameter - * `timeInForce` can be sent ( default `GTC`). * Condition orders will be - * triggered when: * `STOP`, `STOP_MARKET`: * BUY: \"MARK_PRICE\" - * >= `stopPrice` * SELL: \"MARK_PRICE\" <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * \"MARK_PRICE\" <= `stopPrice` * SELL: \"MARK_PRICE\" - * >= `stopPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest mark - * price after order placed `<= `activationPrice`, and the latest mark - * price >`= the lowest mark price * (1 + `callbackRate`) * SELL: the - * highest mark price after order placed >= `activationPrice`, and the latest - * mark price <= the highest mark price * (1 - `callbackRate`) * For - * `TRAILING_STOP_MARKET`, if you got such error code. `{\"code\": - * -2021, \"msg\": \"Order would immediately trigger.\"}` means that - * the parameters you send do not meet the following requirements: * BUY: - * `activationPrice` should be smaller than latest mark price. * SELL: - * `activationPrice` should be larger than latest mark price. * Condition orders will - * be triggered when: * If parameter`priceProtect`is sent as true: * when price - * reaches the `stopPrice` ,the difference rate between \"MARK_PRICE\" and - * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` * + *

Place new UM conditional order Weight(IP): 1 Security Type: TRADE Notes: - Additional + * mandatory parameters based on type: - Order with type `STOP/TAKE_PROFIT`, parameter + * `timeInForce` can be sent ( default `GTC`). - Condition orders will be + * triggered when: - `STOP`, `STOP_MARKET`: - BUY: \"MARK_PRICE\" + * >= `stopPrice` - SELL: \"MARK_PRICE\" = + * `stopPrice` - `TRAILING_STOP_MARKET`: - BUY: the lowest mark price after + * order placed ``= the lowest mark price - (1 + `callbackRate`) - + * SELL: the highest mark price after order placed >= `activationPrice`, and + * the latest mark price = `stopPrice` - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") = `stopPrice` - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. * In extreme market conditions, + * `IOC` or `GTC` or `GTD`. - In extreme market conditions, * timeInForce `GTD` order auto cancel time might be delayed comparing to - * `goodTillDate` Weight: 1 + * `goodTillDate` * * @throws ApiException if the Api call fails */ - public void newUmConditionalOrderExample() throws ApiException { + public void newUmConditionalOrderExample() throws ApiException, IOException { NewUmConditionalOrderRequest newUmConditionalOrderRequest = new NewUmConditionalOrderRequest(); - newUmConditionalOrderRequest.symbol(""); + newUmConditionalOrderRequest.symbol("BTCUSDT"); newUmConditionalOrderRequest.side(Side.BUY); newUmConditionalOrderRequest.strategyType(StrategyType.STOP); ApiResponse response = diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmOrderExample.java index 6f91e7a12..dc86cc0a4 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/NewUmOrderExample.java @@ -8,8 +8,9 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewUmOrderRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.NewUmOrderResponse; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.OrderType; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Side; -import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.Type; +import java.io.IOException; /** API examples for TradeApi */ public class NewUmOrderExample { @@ -31,21 +32,22 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * New UM Order (TRADE) * - *

Place new UM order * If `newOrderRespType` is sent as `RESULT` : * - * `MARKET` order: the final FILLED result of the order will be return directly. * + *

Place new UM order Weight(IP): 1 Security Type: TRADE Notes: - Additional mandatory + * parameters based on type: - If `newOrderRespType` is sent as `RESULT` : - + * `MARKET` order: the final FILLED result of the order will be return directly. - * `LIMIT` order with special `timeInForce`: the final status result of the - * order(FILLED or EXPIRED) will be returned directly. * `selfTradePreventionMode` is + * order(FILLED or EXPIRED) will be returned directly. - `selfTradePreventionMode` is * only effective when `timeInForce` set to `IOC` or `GTC` or - * `GTD`. * In extreme market conditions, timeInForce `GTD` order auto - * cancel time might be delayed comparing to `goodTillDate` Weight: 1 + * `GTD`. - In extreme market conditions, timeInForce `GTD` order auto + * cancel time might be delayed comparing to `goodTillDate` * * @throws ApiException if the Api call fails */ - public void newUmOrderExample() throws ApiException { + public void newUmOrderExample() throws ApiException, IOException { NewUmOrderRequest newUmOrderRequest = new NewUmOrderRequest(); - newUmOrderRequest.symbol(""); + newUmOrderRequest.symbol("BTCUSDT"); newUmOrderRequest.side(Side.BUY); - newUmOrderRequest.type(Type.LIMIT); + newUmOrderRequest.type(OrderType.STOP); ApiResponse response = getApi().newUmOrder(newUmOrderRequest); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCmConditionalOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCmConditionalOrdersExample.java index 9cef4926c..6d436c32a 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCmConditionalOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCmConditionalOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllCmConditionalOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryAllCmConditionalOrdersExample { @@ -26,22 +27,22 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query All CM Conditional Orders(USER_DATA) + * Query All CM Conditional Orders (USER_DATA) * - *

Query All CM Conditional Orders * These orders will not be found: * order strategyStatus - * is `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** - * * created time + 7 days < current time * The query time period must be less than 7 days( - * default as the recent 7 days). Weight: 1 for a single symbol; 40 when the symbol parameter is - * omitted + *

Query All CM Conditional Orders Weight: - 1 for a single `symbol` - 40 when + * `symbol` is omitted Security Type: USER_DATA Notes: - These orders will not be + * found: - order strategyStatus is `CANCELED` or `EXPIRED`, **AND** - order + * has NO filled trade, **AND** - created time + 7 days * The query time period must be less + * than 7 days( default as the recent 7 days). * * @throws ApiException if the Api call fails */ - public void queryAllCmConditionalOrdersExample() throws ApiException { - String symbol = ""; + public void queryAllCmConditionalOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long strategyId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = getApi().queryAllCmConditionalOrders( diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCmOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCmOrdersExample.java index 0da5b709d..c5c1c1128 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCmOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCmOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllCmOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryAllCmOrdersExample { @@ -28,21 +29,22 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Query All CM Orders (USER_DATA) * - *

Get all account CM orders; active, canceled, or filled. * Either `symbol` or - * `pair` must be sent. * If `orderId` is set, it will get orders >= - * that orderId. Otherwise most recent orders are returned. * These orders will not be found: * - * order status is `CANCELED` or `EXPIRED`, **AND** * order has NO filled - * trade, **AND** * created time + 3 days < current time Weight: 20 with symbol, 40 with pair + *

Get all account CM orders; active, canceled, or filled. Weight: - 20 with + * `symbol` - 40 with `pair` Security Type: USER_DATA Notes: - Either + * `symbol` or `pair` must be sent. - If `orderId` is set, it will + * get orders >= that orderId. Otherwise most recent orders are returned. - These orders + * will not be found: - order status is `CANCELED` or `EXPIRED`, **AND** - + * order has NO filled trade, **AND** - created time + 3 days < current time * * @throws ApiException if the Api call fails */ - public void queryAllCmOrdersExample() throws ApiException { - String symbol = ""; - String pair = ""; + public void queryAllCmOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSD_200925"; + String pair = "BTCUSD"; Long orderId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = getApi().queryAllCmOrders( diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentCmOpenConditionalOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentCmOpenConditionalOrdersExample.java index eb2fe06e3..b526c1ce8 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentCmOpenConditionalOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentCmOpenConditionalOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllCurrentCmOpenConditionalOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryAllCurrentCmOpenConditionalOrdersExample { @@ -29,13 +30,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { * Query All Current CM Open Conditional Orders (USER_DATA) * *

Get all open conditional orders on a symbol. **Careful** when accessing this with no - * symbol. * If the symbol is not sent, orders for all symbols will be returned in an array. - * Weight: 1 for a single symbol; 40 when the symbol parameter is omitted + * symbol. Weight: - 1 for a single `symbol` - 40 when `symbol` is omitted + * Security Type: USER_DATA Notes: - If the symbol is not sent, orders for all symbols will be + * returned in an array. * * @throws ApiException if the Api call fails */ - public void queryAllCurrentCmOpenConditionalOrdersExample() throws ApiException { - String symbol = ""; + public void queryAllCurrentCmOpenConditionalOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSD"; Long recvWindow = 5000L; ApiResponse response = getApi().queryAllCurrentCmOpenConditionalOrders(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentCmOpenOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentCmOpenOrdersExample.java index fd37b9207..e8aef8627 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentCmOpenOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentCmOpenOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllCurrentCmOpenOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryAllCurrentCmOpenOrdersExample { @@ -26,17 +27,17 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query All Current CM Open Orders(USER_DATA) + * Query All Current CM Open Orders (USER_DATA) * *

Get all open orders on a symbol. * If the symbol is not sent, orders for all symbols will - * be returned in an array. Weight: 1 for a single symbol; 40 when the symbol parameter is - * omitted Careful when accessing this with no symbol. + * be returned in an array. Weight: - 1 for a single `symbol` - 40 when + * `symbol` is omitted Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryAllCurrentCmOpenOrdersExample() throws ApiException { - String symbol = ""; - String pair = ""; + public void queryAllCurrentCmOpenOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSD_200925"; + String pair = "BTCUSD"; Long recvWindow = 5000L; ApiResponse response = getApi().queryAllCurrentCmOpenOrders(symbol, pair, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenAlgoOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenAlgoOrdersExample.java index c64da3f78..73e3cbfd2 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenAlgoOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenAlgoOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllCurrentUmOpenAlgoOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryAllCurrentUmOpenAlgoOrdersExample { @@ -28,16 +29,16 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Query All Current UM Open Algo Orders (USER_DATA) * - *

Get all UM open algo orders on a symbol. * If the symbol is not sent, orders for all - * symbols will be returned in an array. Weight: 1 for a single symbol; 40 when the symbol - * parameter is omitted Careful when accessing this with no symbol. + *

Get all UM open algo orders on a symbol. If the symbol is not sent, orders for all symbols + * will be returned. Weight(IP): 1 Security Type: USER_DATA Notes: - Weight: 1 for a single + * symbol; 40 when the symbol parameter is omitted. * * @throws ApiException if the Api call fails */ - public void queryAllCurrentUmOpenAlgoOrdersExample() throws ApiException { - String algoType = ""; - String symbol = ""; - Long algoId = 1L; + public void queryAllCurrentUmOpenAlgoOrdersExample() throws ApiException, IOException { + String algoType = "CONDITIONAL"; + String symbol = "BNBUSDT"; + Long algoId = 2146760L; Long recvWindow = 5000L; ApiResponse response = getApi().queryAllCurrentUmOpenAlgoOrders(algoType, symbol, algoId, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenConditionalOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenConditionalOrdersExample.java index 1b338059a..6f321efde 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenConditionalOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenConditionalOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllCurrentUmOpenConditionalOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryAllCurrentUmOpenConditionalOrdersExample { @@ -26,16 +27,16 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query All Current UM Open Conditional Orders + * Query All Current UM Open Conditional Orders (USER_DATA) * - *

Get all open conditional orders on a symbol. * If the symbol is not sent, orders for all - * symbols will be returned in an array. Weight: 1 for a single symbol; 40 when the symbol - * parameter is omitted Careful when accessing this with no symbol. + *

Get all open conditional orders on a symbol. Weight: - 1 for a single `symbol` - + * 40 when `symbol` is omitted Security Type: USER_DATA Notes: - If `symbol` + * is not provided, conditional open orders for all symbols are returned. * * @throws ApiException if the Api call fails */ - public void queryAllCurrentUmOpenConditionalOrdersExample() throws ApiException { - String symbol = ""; + public void queryAllCurrentUmOpenConditionalOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().queryAllCurrentUmOpenConditionalOrders(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenOrdersExample.java index 4e4a7af01..ddc9b16fc 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllCurrentUmOpenOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllCurrentUmOpenOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryAllCurrentUmOpenOrdersExample { @@ -26,16 +27,16 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query All Current UM Open Orders(USER_DATA) + * Query All Current UM Open Orders (USER_DATA) * - *

Get all open orders on a symbol. * If the symbol is not sent, orders for all symbols will - * be returned in an array. Weight: 1 for a single symbol; 40 when the symbol parameter is - * omitted + *

Get all open orders on a symbol. Weight: - 1 for a single `symbol` - 40 when + * `symbol` is omitted Security Type: USER_DATA Notes: - If the symbol is not sent, + * orders for all symbols will be returned in an array. * * @throws ApiException if the Api call fails */ - public void queryAllCurrentUmOpenOrdersExample() throws ApiException { - String symbol = ""; + public void queryAllCurrentUmOpenOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().queryAllCurrentUmOpenOrders(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllMarginAccountOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllMarginAccountOrdersExample.java index 6525f95a5..00eda5818 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllMarginAccountOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllMarginAccountOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllMarginAccountOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryAllMarginAccountOrdersExample { @@ -28,16 +29,19 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Query All Margin Account Orders (USER_DATA) * - *

Query All Margin Account Orders Weight: 100 + *

Query All Margin Account Orders Weight(IP): 100 Security Type: USER_DATA Notes: - If + * `orderId` is set, returns orders with id >= `orderId`; otherwise + * returns recent order history. - For some historical orders, `cummulativeQuoteQty < + * 0` means the data is unavailable at this time. * * @throws ApiException if the Api call fails */ - public void queryAllMarginAccountOrdersExample() throws ApiException { - String symbol = ""; + public void queryAllMarginAccountOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = getApi().queryAllMarginAccountOrders( diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllUmConditionalOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllUmConditionalOrdersExample.java index a77b77ca1..267eb9311 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllUmConditionalOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllUmConditionalOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllUmConditionalOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryAllUmConditionalOrdersExample { @@ -26,22 +27,22 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query All UM Conditional Orders + * Query All UM Conditional Orders (USER_DATA) * - *

Query All UM Conditional Orders * These orders will not be found: * order strategyStatus - * is `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** - * * created time + 7 days < current time * The query time period must be less than 7 days( - * default as the recent 7 days). Weight: 1 for a single symbol; 40 when the symbol parameter is - * omitted + *

Query All UM Conditional Orders Weight: - 1 for a single `symbol` - 40 when + * `symbol` is omitted Security Type: USER_DATA Notes: - These orders will not be + * found: - order strategyStatus is `CANCELED` or `EXPIRED`, **AND** - order + * has NO filled trade, **AND** - created time + 7 days * The query time period must be less + * than 7 days( default as the recent 7 days). * * @throws ApiException if the Api call fails */ - public void queryAllUmConditionalOrdersExample() throws ApiException { - String symbol = ""; + public void queryAllUmConditionalOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long strategyId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = getApi().queryAllUmConditionalOrders( diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllUmOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllUmOrdersExample.java index 920aadba1..c120385d8 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllUmOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryAllUmOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryAllUmOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryAllUmOrdersExample { @@ -26,22 +27,21 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query All UM Orders(USER_DATA) + * Query All UM Orders (USER_DATA) * - *

Get all account UM orders; active, canceled, or filled. * These orders will not be found: - * * order status is `CANCELED` or `EXPIRED`, **AND** * order has NO filled - * trade, **AND** * created time + 3 days < current time * If `orderId` is set, it - * will get orders >= that orderId. Otherwise most recent orders are returned. * The - * query time period must be less then 7 days( default as the recent 7 days). Weight: 5 + *

Get all account UM orders; active, canceled, or filled. Weight(IP): 5 Security Type: + * USER_DATA Notes: - If `orderId` is set, it will get orders >= that orderId. + * Otherwise most recent orders are returned. - The query time period must be less then 7 days( + * default as the recent 7 days). * * @throws ApiException if the Api call fails */ - public void queryAllUmOrdersExample() throws ApiException { - String symbol = ""; + public void queryAllUmOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = getApi().queryAllUmOrders(symbol, orderId, startTime, endTime, limit, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmConditionalOrderHistoryExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmConditionalOrderHistoryExample.java index 35017e3e5..0480078b3 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmConditionalOrderHistoryExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmConditionalOrderHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCmConditionalOrderHistoryResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryCmConditionalOrderHistoryExample { @@ -26,18 +27,18 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query CM Conditional Order History(USER_DATA) + * Query CM Conditional Order History (USER_DATA) * - *

Query CM Conditional Order History * Either `strategyId` or - * `newClientStrategyId` must be sent. * `NEW` orders will not be found. * - * These orders will not be found: * order status is `CANCELED` or - * `EXPIRED`, **AND** * order has NO filled trade, **AND** * created time + 7 days - * < current time Weight: 1 + *

Query CM Conditional Order History Weight(IP): 1 Security Type: USER_DATA Notes: - Either + * `strategyId` or `newClientStrategyId` must be sent. - `NEW` + * orders will not be found. - These orders will not be found: - order status is + * `CANCELED` or `EXPIRED`, **AND** - order has NO filled trade, **AND** - + * created time + 7 days < current time * * @throws ApiException if the Api call fails */ - public void queryCmConditionalOrderHistoryExample() throws ApiException { - String symbol = ""; + public void queryCmConditionalOrderHistoryExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long strategyId = 1L; String newClientStrategyId = "1"; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmModifyOrderHistoryExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmModifyOrderHistoryExample.java index d47841e01..0425469fa 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmModifyOrderHistoryExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmModifyOrderHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCmModifyOrderHistoryResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryCmModifyOrderHistoryExample { @@ -26,21 +27,21 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query CM Modify Order History(TRADE) + * Query CM Modify Order History (TRADE) * - *

Get order modification history * Either `orderId` or - * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. Weight: 1 + *

Get order modification history Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent, and the + * `orderId` will prevail if both are sent. * * @throws ApiException if the Api call fails */ - public void queryCmModifyOrderHistoryExample() throws ApiException { - String symbol = ""; + public void queryCmModifyOrderHistoryExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; String origClientOrderId = "1"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = getApi().queryCmModifyOrderHistory( diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmOrderExample.java index 218eeaf88..9db4ebbfe 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCmOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCmOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryCmOrderExample { @@ -26,17 +27,17 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query CM Order(USER_DATA) + * Query CM Order (USER_DATA) * - *

Check an CM order's status. * Either `orderId` or - * `origClientOrderId` must be sent. * These orders will not be found: * order status - * is `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** - * * created time + 3 days < current time Weight: 1 + *

Check an CM order's status. Weight(IP): 1 Security Type: USER_DATA Notes: - Either + * `orderId` or `origClientOrderId` must be sent. - These orders will not be + * found: - order status is `CANCELED` or `EXPIRED`, **AND** - order has NO + * filled trade, **AND** - created time + 3 days < current time * * @throws ApiException if the Api call fails */ - public void queryCmOrderExample() throws ApiException { - String symbol = ""; + public void queryCmOrderExample() throws ApiException, IOException { + String symbol = "BTCUSD_200925"; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentCmOpenConditionalOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentCmOpenConditionalOrderExample.java index 1779d681c..0d18752f8 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentCmOpenConditionalOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentCmOpenConditionalOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCurrentCmOpenConditionalOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryCurrentCmOpenConditionalOrderExample { @@ -26,17 +27,17 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query Current CM Open Conditional Order(USER_DATA) + * Query Current CM Open Conditional Order (USER_DATA) * - *

Query Current CM Open Conditional Order * Either `strategyId` or - * `newClientStrategyId` must be sent. * If the queried order has been triggered, - * cancelled or expired, the error message \"Order does not exist\" will be returned. - * Weight: 1 + *

Query Current CM Open Conditional Order Weight(IP): 1 Security Type: USER_DATA Notes: - + * Either `strategyId` or `newClientStrategyId` must be sent. - If the + * queried order has been triggered, cancelled or expired, the error message \"Order does + * not exist\" will be returned. * * @throws ApiException if the Api call fails */ - public void queryCurrentCmOpenConditionalOrderExample() throws ApiException { - String symbol = ""; + public void queryCurrentCmOpenConditionalOrderExample() throws ApiException, IOException { + String symbol = "BTCUSD_200925"; Long strategyId = 1L; String newClientStrategyId = "1"; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentCmOpenOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentCmOpenOrderExample.java index 804322998..3bd2e6e1e 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentCmOpenOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentCmOpenOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCurrentCmOpenOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryCurrentCmOpenOrderExample { @@ -28,16 +29,17 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Query Current CM Open Order (USER_DATA) * - *

Query current CM open order * Either `orderId` or `origClientOrderId` - * must be sent. * If the queried order has been filled or cancelled, the error message - * \"Order does not exist\" will be returned. Weight: 1 + *

Query current CM open order Weight(IP): 1 Security Type: USER_DATA Notes: - Either + * `orderId` or `origClientOrderId` must be sent. - If the queried order has + * been filled or cancelled, the error message \"Order does not exist\" will be + * returned. * * @throws ApiException if the Api call fails */ - public void queryCurrentCmOpenOrderExample() throws ApiException { - String symbol = ""; - Long orderId = 1L; - String origClientOrderId = "1"; + public void queryCurrentCmOpenOrderExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Long orderId = 1917641L; + String origClientOrderId = "abc"; Long recvWindow = 5000L; ApiResponse response = getApi().queryCurrentCmOpenOrder(symbol, orderId, origClientOrderId, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentMarginOpenOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentMarginOpenOrderExample.java index baaa243ff..3c31efb0b 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentMarginOpenOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentMarginOpenOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCurrentMarginOpenOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryCurrentMarginOpenOrderExample { @@ -28,12 +29,15 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Query Current Margin Open Order (USER_DATA) * - *

Query Current Margin Open Order Weight: 5 + *

Query Current Margin Open Order Weight(IP): 5 Security Type: USER_DATA Notes: - If + * `symbol` is not sent, order records for all symbols are returned. - When returning + * all symbols, the request count charged to the rate limiter equals the number of symbols + * currently trading on the exchange. * * @throws ApiException if the Api call fails */ - public void queryCurrentMarginOpenOrderExample() throws ApiException { - String symbol = ""; + public void queryCurrentMarginOpenOrderExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().queryCurrentMarginOpenOrder(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenAlgoOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenAlgoOrderExample.java index e9754f8ab..6b64fe9cf 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenAlgoOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenAlgoOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCurrentUmOpenAlgoOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryCurrentUmOpenAlgoOrderExample { @@ -28,17 +29,16 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Query Current UM Open Algo Order (USER_DATA) * - *

Check an UM algo order's status. * These orders will not be found: * order status is - * `CANCELED` or `EXPIRED` **AND** order has NO filled trade **AND** created - * time + 3 days < current time * order create time + 90 days < current time * Either - * `algoId` or `clientAlgoId` must be sent. * `algoId` is - * self-increment for each specific `symbol` Weight: 1 + *

Check an UM algo order's status. Orders will not be found if: status is + * CANCELED/EXPIRED with no fills and created 3+ days ago; or created 90+ days ago. Weight(IP): + * 1 Security Type: USER_DATA Notes: - Either `algoId` or `clientAlgoId` + * must be sent. `algoId` is self-increment for each specific `symbol`. * * @throws ApiException if the Api call fails */ - public void queryCurrentUmOpenAlgoOrderExample() throws ApiException { - Long algoId = 1L; - String clientAlgoId = "1"; + public void queryCurrentUmOpenAlgoOrderExample() throws ApiException, IOException { + Long algoId = 2146760L; + String clientAlgoId = "6B2I9XVcJpCjqPAJ4YoFX7"; Long recvWindow = 5000L; ApiResponse response = getApi().queryCurrentUmOpenAlgoOrder(algoId, clientAlgoId, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenConditionalOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenConditionalOrderExample.java index 74fb64d5f..178f99655 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenConditionalOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenConditionalOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCurrentUmOpenConditionalOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryCurrentUmOpenConditionalOrderExample { @@ -26,17 +27,17 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query Current UM Open Conditional Order + * Query Current UM Open Conditional Order (USER_DATA) * - *

Query Current UM Open Conditional Order * Either `strategyId` or - * `newClientStrategyId` must be sent. * If the queried order has been - * `CANCELED`, `TRIGGERED` or `EXPIRED`, the error message - * \"Order does not exist\" will be returned. Weight: 1 + *

Query Current UM Open Conditional Order Weight(IP): 1 Security Type: USER_DATA Notes: - + * Either `strategyId` or `newClientStrategyId` must be sent. - If the + * queried order has been `CANCELED`, `TRIGGERED` or `EXPIRED`, + * the error message \"Order does not exist\" will be returned. * * @throws ApiException if the Api call fails */ - public void queryCurrentUmOpenConditionalOrderExample() throws ApiException { - String symbol = ""; + public void queryCurrentUmOpenConditionalOrderExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long strategyId = 1L; String newClientStrategyId = "1"; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenOrderExample.java index c3ab339b8..7ce712b83 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryCurrentUmOpenOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryCurrentUmOpenOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryCurrentUmOpenOrderExample { @@ -26,16 +27,17 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query Current UM Open Order(USER_DATA) + * Query Current UM Open Order (USER_DATA) * - *

Query current UM open order * Either `orderId` or `origClientOrderId` - * must be sent. * If the queried order has been filled or cancelled, the error message - * \"Order does not exist\" will be returned. Weight: 1 + *

Query current UM open order Weight(IP): 1 Security Type: USER_DATA Notes: - Either + * `orderId` or `origClientOrderId` must be sent. - If the queried order has + * been filled or cancelled, the error message \"Order does not exist\" will be + * returned. * * @throws ApiException if the Api call fails */ - public void queryCurrentUmOpenOrderExample() throws ApiException { - String symbol = ""; + public void queryCurrentUmOpenOrderExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountOrderExample.java index cc206dbeb..29ebd91cd 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryMarginAccountOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryMarginAccountOrderExample { @@ -28,12 +29,14 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Query Margin Account Order (USER_DATA) * - *

Query Margin Account Order Weight: 10 + *

Query Margin Account Order Weight(IP): 10 Security Type: USER_DATA Notes: - Either + * `orderId` or `origClientOrderId` must be sent. - For some historical + * orders, `cummulativeQuoteQty < 0` means the data is unavailable at this time. * * @throws ApiException if the Api call fails */ - public void queryMarginAccountOrderExample() throws ApiException { - String symbol = ""; + public void queryMarginAccountOrderExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsAllOcoExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsAllOcoExample.java index c1fdc795d..7d860605e 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsAllOcoExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsAllOcoExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryMarginAccountsAllOcoResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryMarginAccountsAllOcoExample { @@ -28,16 +29,16 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Query Margin Account's all OCO (USER_DATA) * - *

Query all OCO for a specific margin account based on provided optional parameters Weight: - * 100 + *

Query all OCO for a specific margin account based on provided optional parameters + * Weight(IP): 100 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryMarginAccountsAllOcoExample() throws ApiException { + public void queryMarginAccountsAllOcoExample() throws ApiException, IOException { Long fromId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = getApi().queryMarginAccountsAllOco(fromId, startTime, endTime, limit, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsOcoExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsOcoExample.java index d8d66fe06..8c6d7cc48 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsOcoExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsOcoExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryMarginAccountsOcoResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryMarginAccountsOcoExample { @@ -28,11 +29,12 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Query Margin Account's OCO (USER_DATA) * - *

Retrieves a specific OCO based on provided optional parameters Weight: 5 + *

Retrieves a specific OCO based on provided optional parameters Weight(IP): 5 Security + * Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryMarginAccountsOcoExample() throws ApiException { + public void queryMarginAccountsOcoExample() throws ApiException, IOException { Long orderListId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsOpenOcoExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsOpenOcoExample.java index a7a42f55c..493bd4094 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsOpenOcoExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryMarginAccountsOpenOcoExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryMarginAccountsOpenOcoResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryMarginAccountsOpenOcoExample { @@ -28,11 +29,11 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Query Margin Account's Open OCO (USER_DATA) * - *

Query Margin Account's Open OCO Weight: 5 + *

Query Margin Account's Open OCO Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryMarginAccountsOpenOcoExample() throws ApiException { + public void queryMarginAccountsOpenOcoExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().queryMarginAccountsOpenOco(recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmAlgoOrderHistoryExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmAlgoOrderHistoryExample.java index 9571900f2..99c4a7061 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmAlgoOrderHistoryExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmAlgoOrderHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryUmAlgoOrderHistoryResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryUmAlgoOrderHistoryExample { @@ -28,19 +29,19 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Query UM Algo Order History (USER_DATA) * - *

Get all algo orders; ACTIVE, CANCELED, TRIGGERED or FINISHED . * If `algoId` is - * set, it will get orders >= that `algoId`. Otherwise most recent orders are - * returned. * The query time period must be less then 7 days( default as the recent 7 days). - * Weight: 5 + *

Get all algo orders: ACTIVE, CANCELED, TRIGGERED or FINISHED. Weight(IP): 5 Security Type: + * USER_DATA Notes: - If `algoId` is set, it will get orders >= that + * `algoId`. Otherwise most recent orders are returned. - The query time period must + * be less than 7 days (default as the recent 7 days). * * @throws ApiException if the Api call fails */ - public void queryUmAlgoOrderHistoryExample() throws ApiException { - String symbol = ""; - Long algoId = 1L; - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; - Long limit = 100L; + public void queryUmAlgoOrderHistoryExample() throws ApiException, IOException { + String symbol = "BNBUSDT"; + Long algoId = 2146760L; + Long startTime = 1770130294138L; + Long endTime = 1770736694138L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = getApi().queryUmAlgoOrderHistory( diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmConditionalOrderHistoryExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmConditionalOrderHistoryExample.java index 211b90211..53c1d2805 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmConditionalOrderHistoryExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmConditionalOrderHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryUmConditionalOrderHistoryResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryUmConditionalOrderHistoryExample { @@ -26,18 +27,18 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query UM Conditional Order History + * Query UM Conditional Order History (USER_DATA) * - *

Query UM Conditional Order History * Either `strategyId` or - * `newClientStrategyId` must be sent. * `NEW` orders will not be found. * - * These orders will not be found: * order status is `CANCELED` or - * `EXPIRED`, **AND** * order has NO filled trade, **AND** * created time + 7 days - * < current time Weight: 1 + *

Query UM Conditional Order History Weight(IP): 1 Security Type: USER_DATA Notes: - Either + * `strategyId` or `newClientStrategyId` must be sent. - `NEW` + * orders will not be found. - These orders will not be found: - order status is + * `CANCELED` or `EXPIRED`, **AND** - order has NO filled trade, **AND** - + * created time + 7 days < current time * * @throws ApiException if the Api call fails */ - public void queryUmConditionalOrderHistoryExample() throws ApiException { - String symbol = ""; + public void queryUmConditionalOrderHistoryExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long strategyId = 1L; String newClientStrategyId = "1"; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmModifyOrderHistoryExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmModifyOrderHistoryExample.java index 2bad6eaf1..98f5299b4 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmModifyOrderHistoryExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmModifyOrderHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryUmModifyOrderHistoryResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryUmModifyOrderHistoryExample { @@ -26,21 +27,21 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query UM Modify Order History(TRADE) + * Query UM Modify Order History (TRADE) * - *

Get order modification history * Either `orderId` or - * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. Weight: 1 + *

Get order modification history Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent, and the + * `orderId` will prevail if both are sent. * * @throws ApiException if the Api call fails */ - public void queryUmModifyOrderHistoryExample() throws ApiException { - String symbol = ""; + public void queryUmModifyOrderHistoryExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; String origClientOrderId = "1"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = getApi().queryUmModifyOrderHistory( diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmOrderExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmOrderExample.java index 98fe46041..9b2feb67f 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmOrderExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUmOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryUmOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryUmOrderExample { @@ -28,15 +29,15 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Query UM Order (USER_DATA) * - *

Check an UM order's status. * These orders will not be found: * Either - * `orderId` or `origClientOrderId` must be sent. * order status is - * `CANCELED` or `EXPIRED`, **AND** * order has NO filled trade, **AND** * - * created time + 3 days < current time Weight: 1 + *

Check an UM order's status. Weight(IP): 1 Security Type: USER_DATA Notes: - These + * orders will not be found: - Either `orderId` or `origClientOrderId` must + * be sent. - order status is `CANCELED` or `EXPIRED`, **AND** - order has + * NO filled trade, **AND** - created time + 3 days < current time * * @throws ApiException if the Api call fails */ - public void queryUmOrderExample() throws ApiException { - String symbol = ""; + public void queryUmOrderExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersCmForceOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersCmForceOrdersExample.java index f41987747..f08465a96 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersCmForceOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersCmForceOrdersExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.AutoCloseType; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryUsersCmForceOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryUsersCmForceOrdersExample { @@ -27,21 +28,21 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query User's CM Force Orders(USER_DATA) + * Query User's CM Force Orders (USER_DATA) * - *

Query User's CM Force Orders * If \"autoCloseType\" is not sent, orders with - * both of the types will be returned * If \"startTime\" is not sent, data within 7 - * days before \"endTime\" can be queried * Only support querying data in the past 90 - * days Weight: 20 with symbol, 50 without symbol + *

Query User's CM Force Orders Weight: - 20 with `symbol` - 50 without + * `symbol` Security Type: USER_DATA Notes: - If \"autoCloseType\" is not + * sent, orders with both of the types will be returned - If \"startTime\" is not + * sent, data within 7 days before \"endTime\" can be queried * * @throws ApiException if the Api call fails */ - public void queryUsersCmForceOrdersExample() throws ApiException { - String symbol = ""; + public void queryUsersCmForceOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; AutoCloseType autoCloseType = AutoCloseType.LIQUIDATION; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = getApi().queryUsersCmForceOrders( diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersMarginForceOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersMarginForceOrdersExample.java index 59926050e..2bd21d62c 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersMarginForceOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersMarginForceOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryUsersMarginForceOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryUsersMarginForceOrdersExample { @@ -26,13 +27,13 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Query User's Margin Force Orders(USER_DATA) + * Query User's Margin Force Orders (USER_DATA) * - *

Query user's margin force orders Weight: 1 + *

Query user's margin force orders Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryUsersMarginForceOrdersExample() throws ApiException { + public void queryUsersMarginForceOrdersExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersUmForceOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersUmForceOrdersExample.java index 8c950845f..faacd531b 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersUmForceOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersUmForceOrdersExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.AutoCloseType; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.QueryUsersUmForceOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryUsersUmForceOrdersExample { @@ -29,19 +30,19 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { /** * Query User's UM Force Orders (USER_DATA) * - *

Query User's UM Force Orders * If `autoCloseType` is not sent, orders with - * both of the types will be returned * If `startTime` is not sent, data within 7 days - * before `endTime` can be queried * Only support querying data in the past 90 days - * Weight: 20 with symbol, 50 without symbol + *

Query User's UM Force Orders Weight: - 20 with `symbol` - 50 without + * `symbol` Security Type: USER_DATA Notes: - If `autoCloseType` is not + * sent, orders with both of the types will be returned - If `startTime` is not sent, + * data within 7 days before `endTime` can be queried * * @throws ApiException if the Api call fails */ - public void queryUsersUmForceOrdersExample() throws ApiException { - String symbol = ""; + public void queryUsersUmForceOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; AutoCloseType autoCloseType = AutoCloseType.LIQUIDATION; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = getApi().queryUsersUmForceOrders( diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ToggleBnbBurnOnUmFuturesTradeExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ToggleBnbBurnOnUmFuturesTradeExample.java index 65e2b0907..ebc1d1717 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ToggleBnbBurnOnUmFuturesTradeExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/ToggleBnbBurnOnUmFuturesTradeExample.java @@ -6,8 +6,10 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; +import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.FeeBurn; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ToggleBnbBurnOnUmFuturesTradeRequest; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.ToggleBnbBurnOnUmFuturesTradeResponse; +import java.io.IOException; /** API examples for TradeApi */ public class ToggleBnbBurnOnUmFuturesTradeExample { @@ -30,15 +32,15 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { * Toggle BNB Burn On UM Futures Trade (TRADE) * *

Change user's BNB Fee Discount for UM Futures (Fee Discount On or Fee Discount Off ) - * on ***EVERY symbol*** * The BNB would not be collected from UM-PM account to the Portfolio - * Margin account. Weight: 1 + * on ***EVERY symbol*** Weight(IP): 1 Security Type: TRADE Notes: - The BNB would not be + * collected from UM-PM account to the Portfolio Margin account. * * @throws ApiException if the Api call fails */ - public void toggleBnbBurnOnUmFuturesTradeExample() throws ApiException { + public void toggleBnbBurnOnUmFuturesTradeExample() throws ApiException, IOException { ToggleBnbBurnOnUmFuturesTradeRequest toggleBnbBurnOnUmFuturesTradeRequest = new ToggleBnbBurnOnUmFuturesTradeRequest(); - toggleBnbBurnOnUmFuturesTradeRequest.feeBurn(""); + toggleBnbBurnOnUmFuturesTradeRequest.feeBurn(FeeBurn.TRUE); ApiResponse response = getApi().toggleBnbBurnOnUmFuturesTrade(toggleBnbBurnOnUmFuturesTradeRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/UmAccountTradeListExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/UmAccountTradeListExample.java index 09e021142..ceb8d5215 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/UmAccountTradeListExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/UmAccountTradeListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.UmAccountTradeListResponse; +import java.io.IOException; /** API examples for TradeApi */ public class UmAccountTradeListExample { @@ -26,22 +27,22 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * UM Account Trade List(USER_DATA) + * UM Account Trade List (USER_DATA) * - *

Get trades for a specific account and UM symbol. * If `startTime` and - * `endTime` are both not sent, then the last '7 days' data will be returned. - * * The time between `startTime` and `endTime` cannot be longer than 7 - * days. * The parameter `fromId` cannot be sent with `startTime` or - * `endTime`. Weight: 5 + *

Get trades for a specific account and UM symbol. Weight(IP): 5 Security Type: USER_DATA + * Notes: - If `startTime` and `endTime` are both not sent, then the last + * '7 days' data will be returned. - The time between `startTime` and + * `endTime` cannot be longer than 7 days. - The parameter `fromId` cannot + * be sent with `startTime` or `endTime`. * * @throws ApiException if the Api call fails */ - public void umAccountTradeListExample() throws ApiException { - String symbol = ""; + public void umAccountTradeListExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long fromId = 1L; - Long limit = 100L; + Long limit = 500L; Long recvWindow = 5000L; ApiResponse response = getApi().umAccountTradeList(symbol, startTime, endTime, fromId, limit, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/UmPositionAdlQuantileEstimationExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/UmPositionAdlQuantileEstimationExample.java index 739707976..80a426e9d 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/UmPositionAdlQuantileEstimationExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/UmPositionAdlQuantileEstimationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.UmPositionAdlQuantileEstimationResponse; +import java.io.IOException; /** API examples for TradeApi */ public class UmPositionAdlQuantileEstimationExample { @@ -26,7 +27,7 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * UM Position ADL Quantile Estimation(USER_DATA) + * UM Position ADL Quantile Estimation (USER_DATA) * *

Query UM Position ADL Quantile Estimation * Values update every 30s. * Values 0, 1, 2, 3, * 4 shows the queue position and possibility of ADL from low to high. * For positions of the @@ -36,12 +37,12 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { * in Hedge Mode: * \"HEDGE\" as a sign will be returned instead of * \"BOTH\"; * A same value caculated on unrealized pnls on long and short sides' * positions will be shown for \"LONG\" and \"SHORT\" when there are - * positions in both of long and short sides. Weight: 5 + * positions in both of long and short sides. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void umPositionAdlQuantileEstimationExample() throws ApiException { - String symbol = ""; + public void umPositionAdlQuantileEstimationExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().umPositionAdlQuantileEstimation(symbol, recvWindow); diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/CloseUserDataStreamExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/CloseUserDataStreamExample.java index a8f6d28fb..a305a361e 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/CloseUserDataStreamExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/CloseUserDataStreamExample.java @@ -5,6 +5,7 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; +import java.io.IOException; /** API examples for UserDataStreamsApi */ public class CloseUserDataStreamExample { @@ -24,13 +25,13 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Close User Data Stream(USER_STREAM) + * Close User Data Stream (USER_STREAM) * - *

Close out a user data stream. Weight: 1 + *

Close out a user data stream. Weight(IP): 1 Security Type: USER_STREAM * * @throws ApiException if the Api call fails */ - public void closeUserDataStreamExample() throws ApiException { + public void closeUserDataStreamExample() throws ApiException, IOException { getApi().closeUserDataStream(); } } diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/KeepaliveUserDataStreamExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/KeepaliveUserDataStreamExample.java index f0252c75a..c4739c7d3 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/KeepaliveUserDataStreamExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/KeepaliveUserDataStreamExample.java @@ -5,6 +5,7 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; +import java.io.IOException; /** API examples for UserDataStreamsApi */ public class KeepaliveUserDataStreamExample { @@ -27,11 +28,12 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { * Keepalive User Data Stream (USER_STREAM) * *

Keepalive a user data stream to prevent a time out. User data streams will close after 60 - * minutes. It's recommended to send a ping about every 60 minutes. Weight: 1 + * minutes. It's recommended to send a ping about every 60 minutes. Weight(IP): 1 Security + * Type: USER_STREAM * * @throws ApiException if the Api call fails */ - public void keepaliveUserDataStreamExample() throws ApiException { + public void keepaliveUserDataStreamExample() throws ApiException, IOException { getApi().keepaliveUserDataStream(); } } diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/StartUserDataStreamExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/StartUserDataStreamExample.java index 9f134e4a8..8a02f5cb5 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/StartUserDataStreamExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/userdatastreams/StartUserDataStreamExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.DerivativesTradingPortfolioMarginRestApiUtil; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.api.DerivativesTradingPortfolioMarginRestApi; import com.binance.connector.client.derivatives_trading_portfolio_margin.rest.model.StartUserDataStreamResponse; +import java.io.IOException; /** API examples for UserDataStreamsApi */ public class StartUserDataStreamExample { @@ -26,15 +27,16 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { } /** - * Start User Data Stream(USER_STREAM) + * Start User Data Stream (USER_STREAM) * *

Start a new user data stream. The stream will close after 60 minutes unless a keepalive is * sent. If the account has an active `listenKey`, that `listenKey` will be - * returned and its validity will be extended for 60 minutes. Weight: 1 + * returned and its validity will be extended for 60 minutes. Weight(IP): 1 Security Type: + * USER_STREAM * * @throws ApiException if the Api call fails */ - public void startUserDataStreamExample() throws ApiException { + public void startUserDataStreamExample() throws ApiException, IOException { ApiResponse response = getApi().startUserDataStream(); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/pom.xml b/examples/derivatives-trading-usds-futures/pom.xml index dea6db20d..cba895973 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 - 11.0.0 + 12.0.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/account/AccountInformationV2Example.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/AccountInformationV2Example.java index f585361be..3e3504f9d 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/AccountInformationV2Example.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/AccountInformationV2Example.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AccountInformationV2Response; +import java.io.IOException; /** API examples for AccountApi */ public class AccountInformationV2Example { @@ -26,14 +27,15 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Account Information V2(USER_DATA) + * Account Information V2 (USER_DATA) * *

Get current account information. User in single-asset/ multi-assets mode will see - * different value, see comments in response section for detail. Weight: 5 + * different value, see comments in response section for detail. Weight(IP): 5 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ - public void accountInformationV2Example() throws ApiException { + public void accountInformationV2Example() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().accountInformationV2(recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/AccountInformationV3Example.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/AccountInformationV3Example.java index 69ae28faf..9668aeeed 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/AccountInformationV3Example.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/AccountInformationV3Example.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AccountInformationV3Response; +import java.io.IOException; /** API examples for AccountApi */ public class AccountInformationV3Example { @@ -26,14 +27,15 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Account Information V3(USER_DATA) + * Account Information V3 (USER_DATA) * *

Get current account information. User in single-asset/ multi-assets mode will see - * different value, see comments in response section for detail. Weight: 5 + * different value, see comments in response section for detail. Weight(IP): 5 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ - public void accountInformationV3Example() throws ApiException { + public void accountInformationV3Example() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().accountInformationV3(recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountBalanceV2Example.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountBalanceV2Example.java index ad22c0751..13111c44e 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountBalanceV2Example.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountBalanceV2Example.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.FuturesAccountBalanceV2Response; +import java.io.IOException; /** API examples for AccountApi */ public class FuturesAccountBalanceV2Example { @@ -28,11 +29,11 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Futures Account Balance V2 (USER_DATA) * - *

Query account balance info Weight: 5 + *

Query account balance information. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void futuresAccountBalanceV2Example() throws ApiException { + public void futuresAccountBalanceV2Example() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().futuresAccountBalanceV2(recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountBalanceV3Example.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountBalanceV3Example.java index cc633c945..35eee09ef 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountBalanceV3Example.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountBalanceV3Example.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.FuturesAccountBalanceV3Response; +import java.io.IOException; /** API examples for AccountApi */ public class FuturesAccountBalanceV3Example { @@ -28,11 +29,11 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Futures Account Balance V3 (USER_DATA) * - *

Query account balance info Weight: 5 + *

Query account balance information. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void futuresAccountBalanceV3Example() throws ApiException { + public void futuresAccountBalanceV3Example() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().futuresAccountBalanceV3(recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountConfigurationExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountConfigurationExample.java index ac91adbf8..59d37112d 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountConfigurationExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountConfigurationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.FuturesAccountConfigurationResponse; +import java.io.IOException; /** API examples for AccountApi */ public class FuturesAccountConfigurationExample { @@ -26,13 +27,13 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Futures Account Configuration(USER_DATA) + * Futures Account Configuration (USER_DATA) * - *

Query account configuration Weight: 5 + *

Query account configuration Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void futuresAccountConfigurationExample() throws ApiException { + public void futuresAccountConfigurationExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().futuresAccountConfiguration(recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesTradingQuantitativeRulesIndicatorsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesTradingQuantitativeRulesIndicatorsExample.java index 6a55a0c23..ca55654a0 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesTradingQuantitativeRulesIndicatorsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesTradingQuantitativeRulesIndicatorsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.FuturesTradingQuantitativeRulesIndicatorsResponse; +import java.io.IOException; /** API examples for AccountApi */ public class FuturesTradingQuantitativeRulesIndicatorsExample { @@ -30,13 +31,15 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * *

Futures trading quantitative rules indicators, for more information on this, please refer * to the [Futures Trading Quantitative - * Rules](https://www.binance.com/en/support/faq/4f462ebe6ff445d4a170be7d9e897272) Weight: - 1 - * for a single symbol - 10 when the symbol parameter is omitted + * Rules](https://www.binance.com/en/support/faq/4f462ebe6ff445d4a170be7d9e897272) Weight: - + * **1** for a single symbol - **10** when the symbol parameter is omitted Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ - public void futuresTradingQuantitativeRulesIndicatorsExample() throws ApiException { - String symbol = ""; + public void futuresTradingQuantitativeRulesIndicatorsExample() + throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().futuresTradingQuantitativeRulesIndicators(symbol, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetBnbBurnStatusExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetBnbBurnStatusExample.java index 16c484379..6527db7fa 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetBnbBurnStatusExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetBnbBurnStatusExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetBnbBurnStatusResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetBnbBurnStatusExample { @@ -28,11 +29,12 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Get BNB Burn Status (USER_DATA) * - *

Get user's BNB Fee Discount (Fee Discount On or Fee Discount Off ) Weight: 30 + *

Get user's BNB Fee Discount (Fee Discount On or Fee Discount Off ) Weight(IP): 30 + * Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getBnbBurnStatusExample() throws ApiException { + public void getBnbBurnStatusExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getBnbBurnStatus(recvWindow); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetCurrentMultiAssetsModeExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetCurrentMultiAssetsModeExample.java index a41e2b7d0..f281d452d 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetCurrentMultiAssetsModeExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetCurrentMultiAssetsModeExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetCurrentMultiAssetsModeResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetCurrentMultiAssetsModeExample { @@ -29,11 +30,11 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * Get Current Multi-Assets Mode (USER_DATA) * *

Get user's Multi-Assets mode (Multi-Assets Mode or Single-Asset Mode) on ***Every - * symbol*** Weight: 30 + * symbol*** Weight(IP): 30 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getCurrentMultiAssetsModeExample() throws ApiException { + public void getCurrentMultiAssetsModeExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getCurrentMultiAssetsMode(recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetCurrentPositionModeExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetCurrentPositionModeExample.java index 7c1c35b05..d8fe45369 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetCurrentPositionModeExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetCurrentPositionModeExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetCurrentPositionModeResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetCurrentPositionModeExample { @@ -26,14 +27,14 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Get Current Position Mode(USER_DATA) + * Get Current Position Mode (USER_DATA) * - *

Get user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol*** Weight: - * 30 + *

Get user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol*** + * Weight(IP): 30 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getCurrentPositionModeExample() throws ApiException { + public void getCurrentPositionModeExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getCurrentPositionMode(recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesOrderHistoryExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesOrderHistoryExample.java index c296a2906..a3ea106f0 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesOrderHistoryExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesOrderHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetDownloadIdForFuturesOrderHistoryResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetDownloadIdForFuturesOrderHistoryExample { @@ -28,13 +29,13 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Get Download Id For Futures Order History (USER_DATA) * - *

Get Download Id For Futures Order History * Request Limitation is 10 times per month, - * shared by front end download page and rest api * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 1000 + *

Get Download Id For Futures Order History Weight(IP): 1000 Security Type: USER_DATA Notes: + * - Request Limitation is 10 times per month, shared by front end download page and rest api - + * The time between `startTime` and `endTime` can not be longer than 1 year * * @throws ApiException if the Api call fails */ - public void getDownloadIdForFuturesOrderHistoryExample() throws ApiException { + public void getDownloadIdForFuturesOrderHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesTradeHistoryExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesTradeHistoryExample.java index 1983fc4f2..12a400e25 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesTradeHistoryExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesTradeHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetDownloadIdForFuturesTradeHistoryResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetDownloadIdForFuturesTradeHistoryExample { @@ -28,13 +29,13 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Get Download Id For Futures Trade History (USER_DATA) * - *

Get download id for futures trade history * Request Limitation is 5 times per month, - * shared by front end download page and rest api * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 1000 + *

Get download id for futures trade history Weight(IP): 1000 Security Type: USER_DATA Notes: + * - Request Limitation is 5 times per month, shared by front end download page and rest api - + * The time between `startTime` and `endTime` can not be longer than 1 year * * @throws ApiException if the Api call fails */ - public void getDownloadIdForFuturesTradeHistoryExample() throws ApiException { + public void getDownloadIdForFuturesTradeHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesTransactionHistoryExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesTransactionHistoryExample.java index 36fb13afa..57f9c18a2 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesTransactionHistoryExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetDownloadIdForFuturesTransactionHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetDownloadIdForFuturesTransactionHistoryResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetDownloadIdForFuturesTransactionHistoryExample { @@ -26,15 +27,17 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Get Download Id For Futures Transaction History(USER_DATA) + * Get Download Id For Futures Transaction History (USER_DATA) * - *

Get download id for futures transaction history * Request Limitation is 5 times per month, - * shared by front end download page and rest api * The time between `startTime` and - * `endTime` can not be longer than 1 year Weight: 1000 + *

Get download id for futures transaction history Weight(IP): 1000 Security Type: USER_DATA + * Notes: - Request Limitation is 5 times per month, shared by front end download page and rest + * api - The time between `startTime` and `endTime` can not be longer than 1 + * year * * @throws ApiException if the Api call fails */ - public void getDownloadIdForFuturesTransactionHistoryExample() throws ApiException { + public void getDownloadIdForFuturesTransactionHistoryExample() + throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesOrderHistoryDownloadLinkByIdExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesOrderHistoryDownloadLinkByIdExample.java index 6dc29686c..f41b5a506 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesOrderHistoryDownloadLinkByIdExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesOrderHistoryDownloadLinkByIdExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetFuturesOrderHistoryDownloadLinkByIdResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetFuturesOrderHistoryDownloadLinkByIdExample { @@ -28,12 +29,13 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Get Futures Order History Download Link by Id (USER_DATA) * - *

Get futures order history download link by Id * Download link expiration: 24h Weight: 10 + *

Get futures order history download link by Id Weight(IP): 10 Security Type: USER_DATA + * Notes: - Download link expiration: 7 days * * @throws ApiException if the Api call fails */ - public void getFuturesOrderHistoryDownloadLinkByIdExample() throws ApiException { - String downloadId = "1"; + public void getFuturesOrderHistoryDownloadLinkByIdExample() throws ApiException, IOException { + String downloadId = "545923594199212032"; Long recvWindow = 5000L; ApiResponse response = getApi().getFuturesOrderHistoryDownloadLinkById(downloadId, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesTradeDownloadLinkByIdExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesTradeDownloadLinkByIdExample.java index 8bce884c8..d7c4de009 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesTradeDownloadLinkByIdExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesTradeDownloadLinkByIdExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetFuturesTradeDownloadLinkByIdResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetFuturesTradeDownloadLinkByIdExample { @@ -26,14 +27,15 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Get Futures Trade Download Link by Id(USER_DATA) + * Get Futures Trade Download Link by Id (USER_DATA) * - *

Get futures trade download link by Id * Download link expiration: 24h Weight: 10 + *

Get futures trade download link by Id Weight(IP): 10 Security Type: USER_DATA Notes: - + * Download link expiration: 7 days * * @throws ApiException if the Api call fails */ - public void getFuturesTradeDownloadLinkByIdExample() throws ApiException { - String downloadId = "1"; + public void getFuturesTradeDownloadLinkByIdExample() throws ApiException, IOException { + String downloadId = "545923594199212032"; Long recvWindow = 5000L; ApiResponse response = getApi().getFuturesTradeDownloadLinkById(downloadId, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesTransactionHistoryDownloadLinkByIdExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesTransactionHistoryDownloadLinkByIdExample.java index 84b444dbc..2e8ff57dd 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesTransactionHistoryDownloadLinkByIdExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetFuturesTransactionHistoryDownloadLinkByIdExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetFuturesTransactionHistoryDownloadLinkByIdResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetFuturesTransactionHistoryDownloadLinkByIdExample { @@ -28,13 +29,14 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Get Futures Transaction History Download Link by Id (USER_DATA) * - *

Get futures transaction history download link by Id * Download link expiration: 24h - * Weight: 10 + *

Get futures transaction history download link by Id Weight(IP): 10 Security Type: + * USER_DATA Notes: - Download link expiration: 7 days * * @throws ApiException if the Api call fails */ - public void getFuturesTransactionHistoryDownloadLinkByIdExample() throws ApiException { - String downloadId = "1"; + public void getFuturesTransactionHistoryDownloadLinkByIdExample() + throws ApiException, IOException { + String downloadId = "545923594199212032"; Long recvWindow = 5000L; ApiResponse response = getApi().getFuturesTransactionHistoryDownloadLinkById(downloadId, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetIncomeHistoryExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetIncomeHistoryExample.java index 6c7e05cc6..c57c10115 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetIncomeHistoryExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetIncomeHistoryExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetIncomeHistoryResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.IncomeType; +import java.io.IOException; /** API examples for AccountApi */ public class GetIncomeHistoryExample { @@ -28,20 +30,21 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Get Income History (USER_DATA) * - *

Query income history * If neither `startTime` nor `endTime` is sent, - * the recent 7-day data will be returned. * If `incomeType ` is not sent, all kinds - * of flow will be returned * \"trandId\" is unique in the same incomeType for a user - * * Income history only contains data for the last three months Weight: 30 + *

Query income history Weight(IP): 30 Security Type: USER_DATA Notes: - If `incomeType + * ` is not sent, all kinds of flow will be returned - If `startTime` and + * `endTime` are not sent, the recent 7-day data will be returned. - + * `trandId` is unique in the same `incomeType` for a user. - Income history + * only contains data for the last three months. * * @throws ApiException if the Api call fails */ - public void getIncomeHistoryExample() throws ApiException { - String symbol = ""; - String incomeType = ""; + public void getIncomeHistoryExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + IncomeType incomeType = IncomeType.TRANSFER; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long page = 0L; - Long limit = 100L; + Long page = 1L; + Long limit = 30L; Long recvWindow = 5000L; ApiResponse response = getApi().getIncomeHistory( diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/NotionalAndLeverageBracketsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/NotionalAndLeverageBracketsExample.java index 42895dab7..93719a669 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/NotionalAndLeverageBracketsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/NotionalAndLeverageBracketsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.NotionalAndLeverageBracketsResponse; +import java.io.IOException; /** API examples for AccountApi */ public class NotionalAndLeverageBracketsExample { @@ -28,12 +29,13 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Notional and Leverage Brackets (USER_DATA) * - *

Query user notional and leverage bracket on speicfic symbol Weight: 1 + *

Query user notional and leverage bracket on speicfic symbol Weight(IP): 1 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ - public void notionalAndLeverageBracketsExample() throws ApiException { - String symbol = ""; + public void notionalAndLeverageBracketsExample() throws ApiException, IOException { + String symbol = "ETHUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().notionalAndLeverageBrackets(symbol, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/QueryUserRateLimitExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/QueryUserRateLimitExample.java index 173274a04..ac79222cd 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/QueryUserRateLimitExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/QueryUserRateLimitExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.QueryUserRateLimitResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryUserRateLimitExample { @@ -28,11 +29,11 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Query User Rate Limit (USER_DATA) * - *

Query User Rate Limit Weight: 1 + *

Query User Rate Limit Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryUserRateLimitExample() throws ApiException { + public void queryUserRateLimitExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().queryUserRateLimit(recvWindow); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/SymbolConfigurationExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/SymbolConfigurationExample.java index d038b54e5..65400d260 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/SymbolConfigurationExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/SymbolConfigurationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.SymbolConfigurationResponse; +import java.io.IOException; /** API examples for AccountApi */ public class SymbolConfigurationExample { @@ -26,14 +27,14 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Symbol Configuration(USER_DATA) + * Symbol Configuration (USER_DATA) * - *

Get current account symbol configuration. Weight: 5 + *

Get current account symbol configuration. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void symbolConfigurationExample() throws ApiException { - String symbol = ""; + public void symbolConfigurationExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().symbolConfiguration(symbol, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/ToggleBnbBurnOnFuturesTradeExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/ToggleBnbBurnOnFuturesTradeExample.java index 1ecf78933..1f9e4c670 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/ToggleBnbBurnOnFuturesTradeExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/ToggleBnbBurnOnFuturesTradeExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ToggleBnbBurnOnFuturesTradeRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ToggleBnbBurnOnFuturesTradeResponse; +import java.io.IOException; /** API examples for AccountApi */ public class ToggleBnbBurnOnFuturesTradeExample { @@ -30,14 +31,14 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * Toggle BNB Burn On Futures Trade (TRADE) * *

Change user's BNB Fee Discount (Fee Discount On or Fee Discount Off ) on ***EVERY - * symbol*** Weight: 1 + * symbol*** Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void toggleBnbBurnOnFuturesTradeExample() throws ApiException { + public void toggleBnbBurnOnFuturesTradeExample() throws ApiException, IOException { ToggleBnbBurnOnFuturesTradeRequest toggleBnbBurnOnFuturesTradeRequest = new ToggleBnbBurnOnFuturesTradeRequest(); - toggleBnbBurnOnFuturesTradeRequest.feeBurn(""); + toggleBnbBurnOnFuturesTradeRequest.feeBurn("true"); ApiResponse response = getApi().toggleBnbBurnOnFuturesTrade(toggleBnbBurnOnFuturesTradeRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/UserCommissionRateExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/UserCommissionRateExample.java index 54edcf440..08b5b5334 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/UserCommissionRateExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/UserCommissionRateExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.UserCommissionRateResponse; +import java.io.IOException; /** API examples for AccountApi */ public class UserCommissionRateExample { @@ -28,12 +29,12 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * User Commission Rate (USER_DATA) * - *

Get User Commission Rate Weight: 20 + *

Get User Commission Rate Weight(IP): 20 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void userCommissionRateExample() throws ApiException { - String symbol = ""; + public void userCommissionRateExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().userCommissionRate(symbol, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/AcceptTheOfferedQuoteExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/AcceptTheOfferedQuoteExample.java index 79a2f16ba..47d527ba4 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/AcceptTheOfferedQuoteExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/AcceptTheOfferedQuoteExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AcceptTheOfferedQuoteRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AcceptTheOfferedQuoteResponse; +import java.io.IOException; /** API examples for ConvertApi */ public class AcceptTheOfferedQuoteExample { @@ -29,11 +30,11 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Accept the offered quote (USER_DATA) * - *

Accept the offered quote by quote ID. Weight: 200(IP) + *

Accept the offered quote by quote ID. Weight(IP): 200 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void acceptTheOfferedQuoteExample() throws ApiException { + public void acceptTheOfferedQuoteExample() throws ApiException, IOException { AcceptTheOfferedQuoteRequest acceptTheOfferedQuoteRequest = new AcceptTheOfferedQuoteRequest(); acceptTheOfferedQuoteRequest.quoteId("1"); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/ListAllConvertPairsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/ListAllConvertPairsExample.java index bdc738b4b..3fd1b7045 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/ListAllConvertPairsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/ListAllConvertPairsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ListAllConvertPairsResponse; +import java.io.IOException; /** API examples for ConvertApi */ public class ListAllConvertPairsExample { @@ -28,16 +29,16 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * List All Convert Pairs * - *

Query for all convertible token pairs and the tokens’ respective upper/lower limits * User - * needs to supply either or both of the input parameter * If not defined for both fromAsset and - * toAsset, only partial token pairs will be returned * Asset BNFCR is only available to convert - * for MICA region users. Weight: 20(IP) + *

Query for all convertible token pairs and the tokens’ respective upper/lower limits + * Weight(IP): 20 Notes: - User needs to supply either or both of the input parameter - If not + * defined for both fromAsset and toAsset, only partial token pairs will be returned - Asset + * BNFCR is only available to convert for MICA region users. * * @throws ApiException if the Api call fails */ - public void listAllConvertPairsExample() throws ApiException { - String fromAsset = ""; - String toAsset = ""; + public void listAllConvertPairsExample() throws ApiException, IOException { + String fromAsset = "BTC"; + String toAsset = "USDT"; ApiResponse response = getApi().listAllConvertPairs(fromAsset, toAsset); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/OrderStatusExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/OrderStatusExample.java index 7174fce15..d47877489 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/OrderStatusExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/OrderStatusExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OrderStatusResponse; +import java.io.IOException; /** API examples for ConvertApi */ public class OrderStatusExample { @@ -26,14 +27,14 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Order status(USER_DATA) + * Order status (USER_DATA) * - *

Query order status by order ID. Weight: 50(IP) + *

Query order status by order ID. Weight(IP): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void orderStatusExample() throws ApiException { - Long orderId = 1L; + public void orderStatusExample() throws ApiException, IOException { + String orderId = "933256278426274400"; String quoteId = "1"; ApiResponse response = getApi().orderStatus(orderId, quoteId); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/SendQuoteRequestExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/SendQuoteRequestExample.java index 824418acb..1820e96f8 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/SendQuoteRequestExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/convert/SendQuoteRequestExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.SendQuoteRequestRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.SendQuoteRequestResponse; +import java.io.IOException; /** API examples for ConvertApi */ public class SendQuoteRequestExample { @@ -27,18 +28,18 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Send Quote Request(USER_DATA) + * Send Quote Request (USER_DATA) * - *

Request a quote for the requested token pairs * Either fromAmount or toAmount should be - * sent * `quoteId` will be returned only if you have enough funds to convert Weight: - * 50(IP) + *

Request a quote for the requested token pairs Weight: 50(IP) 360/hour, 500/day Security + * Type: USER_DATA Notes: - Either fromAmount or toAmount should be sent - `quoteId` + * will be returned only if you have enough funds to convert * * @throws ApiException if the Api call fails */ - public void sendQuoteRequestExample() throws ApiException { + public void sendQuoteRequestExample() throws ApiException, IOException { SendQuoteRequestRequest sendQuoteRequestRequest = new SendQuoteRequestRequest(); - sendQuoteRequestRequest.fromAsset(""); - sendQuoteRequestRequest.toAsset(""); + sendQuoteRequestRequest.fromAsset("BTC"); + sendQuoteRequestRequest.toAsset("USDT"); ApiResponse response = getApi().sendQuoteRequest(sendQuoteRequestRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/AdlRiskExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/AdlRiskExample.java index 7594054a4..063f4366e 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/AdlRiskExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/AdlRiskExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AdlRiskResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class AdlRiskExample { @@ -32,12 +33,12 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * during liquidation, and the rating takes into account the insurance fund balance, position * concentration on the symbol, order book depth, price volatility, average leverage, unrealized * PnL, and margin utilization at the symbol level. The rating can be high, medium and low, and - * is updated every 30 minutes. Weight: 1 + * is updated every 30 minutes. Weight(IP): 1 * * @throws ApiException if the Api call fails */ - public void adlRiskExample() throws ApiException { - String symbol = ""; + public void adlRiskExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; ApiResponse response = getApi().adlRisk(symbol); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/AssetIndexExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/AssetIndexExample.java new file mode 100644 index 000000000..411ba2d9c --- /dev/null +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/AssetIndexExample.java @@ -0,0 +1,45 @@ +package com.binance.connector.client.derivatives_trading_usds_futures.rest.marketdata; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AssetIndexResponse; +import java.io.IOException; + +/** API examples for MarketDataApi */ +public class AssetIndexExample { + private DerivativesTradingUsdsFuturesRestApi api; + + public DerivativesTradingUsdsFuturesRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = + DerivativesTradingUsdsFuturesRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new DerivativesTradingUsdsFuturesRestApi(clientConfiguration); + } + return api; + } + + /** + * Multi-Assets Mode Asset Index + * + *

Asset index price. > **CM-UM Integration (Effective 2026-06-30):** Renamed from + * *Multi-Assets Mode Asset Index*. The response now additionally pushes COIN-M settlement-asset + * price index entries (e.g., `BTCUSD`, `ETHUSD`, `BNBUSD`). The + * endpoint path `/fapi/v1/assetIndex` is unchanged. Weight: **1** for a single + * symbol; **10** when the symbol parameter is omitted + * + * @throws ApiException if the Api call fails + */ + public void assetIndexExample() throws ApiException, IOException { + String symbol = "ADAUSD"; + ApiResponse response = getApi().assetIndex(symbol); + System.out.println(response.getData()); + } +} diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/BasisExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/BasisExample.java index 17e5a142b..a9ef501b9 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/BasisExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/BasisExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.BasisResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ContractType; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Period; +import java.io.IOException; /** API examples for MarketDataApi */ public class BasisExample { @@ -30,16 +31,16 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Basis * - *

Query future basis * If startTime and endTime are not sent, the most recent data is - * returned. * Only the data of the latest 30 days is available. Weight: 0 + *

Query future basis Weight(IP): 0 Notes: - If startTime and endTime are not sent, the most + * recent data is returned. - Only the data of the latest 30 days is available. * * @throws ApiException if the Api call fails */ - public void basisExample() throws ApiException { - String pair = ""; + public void basisExample() throws ApiException, IOException { + String pair = "BTCUSDT"; ContractType contractType = ContractType.PERPETUAL; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 30L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CheckServerTimeExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CheckServerTimeExample.java index d908d0f3f..8ff6e4da2 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CheckServerTimeExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CheckServerTimeExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CheckServerTimeResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class CheckServerTimeExample { @@ -28,11 +29,11 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Check Server Time * - *

Test connectivity to the Rest API and get the current server time. Weight: 1 + *

Test connectivity to the Rest API and get the current server time. Weight(IP): 1 * * @throws ApiException if the Api call fails */ - public void checkServerTimeExample() throws ApiException { + public void checkServerTimeExample() throws ApiException, IOException { ApiResponse response = getApi().checkServerTime(); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CompositeIndexSymbolInformationExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CompositeIndexSymbolInformationExample.java index 8d0dc5ad3..183c60b65 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CompositeIndexSymbolInformationExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CompositeIndexSymbolInformationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CompositeIndexSymbolInformationResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class CompositeIndexSymbolInformationExample { @@ -28,12 +29,13 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Composite Index Symbol Information * - *

Query composite index symbol information * Only for composite index symbols Weight: 1 + *

Query composite index symbol information Weight(IP): 1 Notes: - Only for composite index + * symbols * * @throws ApiException if the Api call fails */ - public void compositeIndexSymbolInformationExample() throws ApiException { - String symbol = ""; + public void compositeIndexSymbolInformationExample() throws ApiException, IOException { + String symbol = "DEFIUSDT"; ApiResponse response = getApi().compositeIndexSymbolInformation(symbol); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CompressedAggregateTradesListExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CompressedAggregateTradesListExample.java index db639856c..9311ad114 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CompressedAggregateTradesListExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/CompressedAggregateTradesListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CompressedAggregateTradesListResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class CompressedAggregateTradesListExample { @@ -30,25 +31,25 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * *

Get compressed, aggregate market trades. Market trades that fill in 100ms with the same * price and the same taking side will have the quantity aggregated. Retail Price - * Improvement(RPI) orders are aggregated and without special tags to be distinguished. * - * support querying futures trade histories that are not older than one year * If both - * `startTime` and `endTime` are sent, time between `startTime` - * and `endTime` must be less than 1 hour. * If `fromId`, - * `startTime`, and `endTime` are not sent, the most recent aggregate trades - * will be returned. * Only market trades will be aggregated and returned, which means the - * insurance fund trades and ADL trades won't be aggregated. * Sending both - * `startTime`/`endTime` and `fromId` might cause response - * timeout, please send either `fromId` or `startTime`/`endTime` - * Weight: 20 + * Improvement(RPI) orders are aggregated and without special tags to be distinguished. + * Weight(IP): 20 Notes: - support querying futures trade histories that are not older than 24 + * hours - If both `startTime` and `endTime` are sent, time between + * `startTime` and `endTime` must be less than 1 hour. - If + * `fromId`, `startTime`, and `endTime` are not sent, the most + * recent aggregate trades will be returned. - Only market trades will be aggregated and + * returned, which means the insurance fund trades and ADL trades won't be aggregated. - + * Sending both `startTime`/`endTime` and `fromId` might cause + * response timeout, please send either `fromId` or + * `startTime`/`endTime` * * @throws ApiException if the Api call fails */ - public void compressedAggregateTradesListExample() throws ApiException { - String symbol = ""; + public void compressedAggregateTradesListExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long fromId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; ApiResponse response = getApi().compressedAggregateTradesList(symbol, fromId, startTime, endTime, limit); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/ContinuousContractKlineCandlestickDataExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/ContinuousContractKlineCandlestickDataExample.java index 380f6c34a..e65992e2d 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/ContinuousContractKlineCandlestickDataExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/ContinuousContractKlineCandlestickDataExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ContinuousContractKlineCandlestickDataResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ContractType; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Interval; +import java.io.IOException; /** API examples for MarketDataApi */ public class ContinuousContractKlineCandlestickDataExample { @@ -31,20 +32,19 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * Continuous Contract Kline/Candlestick Data * *

Kline/candlestick bars for a specific contract type. Klines are uniquely identified by - * their open time. * If startTime and endTime are not sent, the most recent klines are - * returned. * Contract type: * PERPETUAL * CURRENT_QUARTER * NEXT_QUARTER * TRADIFI_PERPETUAL - * Weight: based on parameter LIMIT | LIMIT | weight | | ----------- | ------ | | [1,100) | 1 | - * | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | + * their open time. Weight: based on parameter `LIMIT` | LIMIT | weight | | + * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | + * 10 | Notes: - If startTime and endTime are not sent, the most recent klines are returned. * * @throws ApiException if the Api call fails */ - public void continuousContractKlineCandlestickDataExample() throws ApiException { - String pair = ""; + public void continuousContractKlineCandlestickDataExample() throws ApiException, IOException { + String pair = "BTCUSDT"; ContractType contractType = ContractType.PERPETUAL; - Interval interval = Interval.INTERVAL_1s; + Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; ApiResponse response = getApi().continuousContractKlineCandlestickData( pair, contractType, interval, startTime, endTime, limit); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/ExchangeInformationExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/ExchangeInformationExample.java index 88c222299..3725488d1 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/ExchangeInformationExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/ExchangeInformationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ExchangeInformationResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class ExchangeInformationExample { @@ -28,11 +29,11 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Exchange Information * - *

Current exchange trading rules and symbol information Weight: 1 + *

Current exchange trading rules and symbol information Weight(IP): 1 * * @throws ApiException if the Api call fails */ - public void exchangeInformationExample() throws ApiException { + public void exchangeInformationExample() throws ApiException, IOException { ApiResponse response = getApi().exchangeInformation(); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/GetFundingRateHistoryExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/GetFundingRateHistoryExample.java index 7d49fe1b7..5253a4d87 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/GetFundingRateHistoryExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/GetFundingRateHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetFundingRateHistoryResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetFundingRateHistoryExample { @@ -28,19 +29,19 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Get Funding Rate History * - *

Get Funding Rate History * If `startTime` and `endTime` are not sent, - * the most recent 200 records are returned. * If the number of data between + *

Get Funding Rate History Weight: share 500/5min/IP rate limit with GET + * /fapi/v1/fundingInfo Notes: - If `startTime` and `endTime` are not sent, + * the most recent 200 records are returned. - If the number of data between * `startTime` and `endTime` is larger than `limit`, return as - * `startTime` + `limit`. * In ascending order. Weight: share 500/5min/IP - * rate limit with GET /fapi/v1/fundingInfo + * `startTime` + `limit`. - In ascending order. * * @throws ApiException if the Api call fails */ - public void getFundingRateHistoryExample() throws ApiException { - String symbol = ""; + public void getFundingRateHistoryExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; ApiResponse response = getApi().getFundingRateHistory(symbol, startTime, endTime, limit); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/GetFundingRateInfoExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/GetFundingRateInfoExample.java index 15b10972a..5cc941153 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/GetFundingRateInfoExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/GetFundingRateInfoExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetFundingRateInfoResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetFundingRateInfoExample { @@ -28,13 +29,13 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Get Funding Rate Info * - *

Query funding rate info for symbols that had FundingRateCap/ FundingRateFloor / - * fundingIntervalHours adjustment Weight: 0 share 500/5min/IP rate limit with GET - * /fapi/v1/fundingRate + *

Query funding rate info for symbols that had FundingRateCap/FundingRateFloor / + * fundingIntervalHours adjustment Weight: **0** share 500/5min/IP rate limit with `GET + * /fapi/v1/fundingRate` * * @throws ApiException if the Api call fails */ - public void getFundingRateInfoExample() throws ApiException { + public void getFundingRateInfoExample() throws ApiException, IOException { ApiResponse response = getApi().getFundingRateInfo(); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/IndexPriceKlineCandlestickDataExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/IndexPriceKlineCandlestickDataExample.java index 4d0f88123..5a6a63cb3 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/IndexPriceKlineCandlestickDataExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/IndexPriceKlineCandlestickDataExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.IndexPriceKlineCandlestickDataResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Interval; +import java.io.IOException; /** API examples for MarketDataApi */ public class IndexPriceKlineCandlestickDataExample { @@ -30,18 +31,18 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * Index Price Kline/Candlestick Data * *

Kline/candlestick bars for the index price of a pair. Klines are uniquely identified by - * their open time. * If startTime and endTime are not sent, the most recent klines are - * returned. Weight: based on parameter LIMIT | LIMIT | weight | | ----------- | ------ | | - * [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | + * their open time. Weight: based on parameter `LIMIT` | LIMIT | weight | | + * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | + * 10 | Notes: - If startTime and endTime are not sent, the most recent klines are returned. * * @throws ApiException if the Api call fails */ - public void indexPriceKlineCandlestickDataExample() throws ApiException { - String pair = ""; - Interval interval = Interval.INTERVAL_1s; + public void indexPriceKlineCandlestickDataExample() throws ApiException, IOException { + String pair = "BTCUSDT"; + Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; ApiResponse response = getApi().indexPriceKlineCandlestickData(pair, interval, startTime, endTime, limit); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/KlineCandlestickDataExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/KlineCandlestickDataExample.java index fdb888eea..62cfcafc3 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/KlineCandlestickDataExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/KlineCandlestickDataExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Interval; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.KlineCandlestickDataResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class KlineCandlestickDataExample { @@ -29,19 +30,19 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Kline/Candlestick Data * - *

Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. * - * If startTime and endTime are not sent, the most recent klines are returned. Weight: based on - * parameter LIMIT | LIMIT | weight | | ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 - * | | [500, 1000] | 5 | | > 1000 | 10 | + *

Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. + * Weight: based on parameter `LIMIT` | LIMIT | weight | | ----------- | ------ | | + * [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - If startTime + * and endTime are not sent, the most recent klines are returned. * * @throws ApiException if the Api call fails */ - public void klineCandlestickDataExample() throws ApiException { - String symbol = ""; - Interval interval = Interval.INTERVAL_1s; + public void klineCandlestickDataExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; ApiResponse response = getApi().klineCandlestickData(symbol, interval, startTime, endTime, limit); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/LongShortRatioExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/LongShortRatioExample.java index 5440dcef1..1ea681259 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/LongShortRatioExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/LongShortRatioExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.LongShortRatioResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Period; +import java.io.IOException; /** API examples for MarketDataApi */ public class LongShortRatioExample { @@ -29,16 +30,16 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Long/Short Ratio * - *

Query symbol Long/Short Ratio * If startTime and endTime are not sent, the most recent - * data is returned. * Only the data of the latest 30 days is available. * IP rate limit 1000 - * requests/5min Weight: 0 + *

Query symbol Long/Short Ratio Weight(IP): 0 Notes: - If startTime and endTime are not + * sent, the most recent data is returned. - Only the data of the latest 30 days is available. - + * IP rate limit 1000 requests/5min * * @throws ApiException if the Api call fails */ - public void longShortRatioExample() throws ApiException { - String symbol = ""; + public void longShortRatioExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 50L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/MarkPriceExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/MarkPriceExample.java index 5be32ae57..6bc9d51b0 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/MarkPriceExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/MarkPriceExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.MarkPriceResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class MarkPriceExample { @@ -28,12 +29,12 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Mark Price * - *

Mark Price and Funding Rate Weight: 1 with symbol, 10 without symbol + *

Mark Price and Funding Rate Weight: **1** with symbol, **10** without symbol * * @throws ApiException if the Api call fails */ - public void markPriceExample() throws ApiException { - String symbol = ""; + public void markPriceExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; ApiResponse response = getApi().markPrice(symbol); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/MarkPriceKlineCandlestickDataExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/MarkPriceKlineCandlestickDataExample.java index fed1e2d4a..f70d2c9dc 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/MarkPriceKlineCandlestickDataExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/MarkPriceKlineCandlestickDataExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Interval; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.MarkPriceKlineCandlestickDataResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class MarkPriceKlineCandlestickDataExample { @@ -30,18 +31,18 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * Mark Price Kline/Candlestick Data * *

Kline/candlestick bars for the mark price of a symbol. Klines are uniquely identified by - * their open time. * If startTime and endTime are not sent, the most recent klines are - * returned. Weight: based on parameter LIMIT | LIMIT | weight | | ----------- | ------ | | - * [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | + * their open time. Weight: based on parameter `LIMIT` | LIMIT | weight | | + * ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | + * 10 | Notes: - If startTime and endTime are not sent, the most recent klines are returned. * * @throws ApiException if the Api call fails */ - public void markPriceKlineCandlestickDataExample() throws ApiException { - String symbol = ""; - Interval interval = Interval.INTERVAL_1s; + public void markPriceKlineCandlestickDataExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; ApiResponse response = getApi().markPriceKlineCandlestickData(symbol, interval, startTime, endTime, limit); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/MultiAssetsModeAssetIndexExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/MultiAssetsModeAssetIndexExample.java deleted file mode 100644 index 0615064cb..000000000 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/MultiAssetsModeAssetIndexExample.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.binance.connector.client.derivatives_trading_usds_futures.rest.marketdata; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; -import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; -import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; -import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.MultiAssetsModeAssetIndexResponse; - -/** API examples for MarketDataApi */ -public class MultiAssetsModeAssetIndexExample { - private DerivativesTradingUsdsFuturesRestApi api; - - public DerivativesTradingUsdsFuturesRestApi getApi() { - if (api == null) { - ClientConfiguration clientConfiguration = - DerivativesTradingUsdsFuturesRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - api = new DerivativesTradingUsdsFuturesRestApi(clientConfiguration); - } - return api; - } - - /** - * Multi-Assets Mode Asset Index - * - *

asset index for Multi-Assets mode Weight: 1 for a single symbol; 10 when the symbol - * parameter is omitted - * - * @throws ApiException if the Api call fails - */ - public void multiAssetsModeAssetIndexExample() throws ApiException { - String symbol = ""; - ApiResponse response = - getApi().multiAssetsModeAssetIndex(symbol); - System.out.println(response.getData()); - } -} diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OldTradesLookupExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OldTradesLookupExample.java index ff3dd9d1a..338870532 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OldTradesLookupExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OldTradesLookupExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OldTradesLookupResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class OldTradesLookupExample { @@ -28,15 +29,16 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Old Trades Lookup (MARKET_DATA) * - *

Get older market historical trades. * Market trades means trades filled in the order book. - * Only market trades will be returned, which means the insurance fund trades and ADL trades - * won't be returned. * Only supports data from within the last one month Weight: 20 + *

Get older market historical trades. Weight(IP): 20 Security Type: MARKET_DATA Notes: - + * Market trades means trades filled in the order book. Only market trades will be returned, + * which means the insurance fund trades and ADL trades won't be returned. - Only supports + * data from within the last one month * * @throws ApiException if the Api call fails */ - public void oldTradesLookupExample() throws ApiException { - String symbol = ""; - Long limit = 100L; + public void oldTradesLookupExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Long limit = 50L; Long fromId = 1L; ApiResponse response = getApi().oldTradesLookup(symbol, limit, fromId); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OpenInterestExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OpenInterestExample.java index b9112008d..2102f49f5 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OpenInterestExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OpenInterestExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OpenInterestResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class OpenInterestExample { @@ -28,12 +29,12 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Open Interest * - *

Get present open interest of a specific symbol. Weight: 1 + *

Get present open interest of a specific symbol. Weight(IP): 1 * * @throws ApiException if the Api call fails */ - public void openInterestExample() throws ApiException { - String symbol = ""; + public void openInterestExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; ApiResponse response = getApi().openInterest(symbol); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OpenInterestStatisticsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OpenInterestStatisticsExample.java index 595655d64..cf20828e0 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OpenInterestStatisticsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OpenInterestStatisticsExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OpenInterestStatisticsResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Period; +import java.io.IOException; /** API examples for MarketDataApi */ public class OpenInterestStatisticsExample { @@ -29,16 +30,16 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Open Interest Statistics * - *

Open Interest Statistics * If startTime and endTime are not sent, the most recent data is - * returned. * Only the data of the latest 1 month is available. * IP rate limit 1000 - * requests/5min Weight: 0 + *

Open Interest Statistics Weight(IP): 0 Notes: - If startTime and endTime are not sent, the + * most recent data is returned. - Only the data of the latest 1 month is available. - IP rate + * limit 1000 requests/5min * * @throws ApiException if the Api call fails */ - public void openInterestStatisticsExample() throws ApiException { - String symbol = ""; + public void openInterestStatisticsExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 50L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OrderBookExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OrderBookExample.java index 8cff3c50b..ec9e01705 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OrderBookExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/OrderBookExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OrderBookResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class OrderBookExample { @@ -34,9 +35,9 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * * @throws ApiException if the Api call fails */ - public void orderBookExample() throws ApiException { - String symbol = ""; - Long limit = 100L; + public void orderBookExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Long limit = 50L; ApiResponse response = getApi().orderBook(symbol, limit); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/PremiumIndexKlineDataExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/PremiumIndexKlineDataExample.java index 38f5d7838..6326f1b56 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/PremiumIndexKlineDataExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/PremiumIndexKlineDataExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Interval; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.PremiumIndexKlineDataResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class PremiumIndexKlineDataExample { @@ -29,19 +30,19 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Premium index Kline Data * - *

Premium index kline bars of a symbol. Klines are uniquely identified by their open time. * - * If startTime and endTime are not sent, the most recent klines are returned. Weight: based on - * parameter LIMIT | LIMIT | weight | | ----------- | ------ | | [1,100) | 1 | | [100, 500) | 2 - * | | [500, 1000] | 5 | | > 1000 | 10 | + *

Premium index kline bars of a symbol. Klines are uniquely identified by their open time. + * Weight: based on parameter `LIMIT` | LIMIT | weight | | ----------- | ------ | | + * [1,100) | 1 | | [100, 500) | 2 | | [500, 1000] | 5 | | > 1000 | 10 | Notes: - If startTime + * and endTime are not sent, the most recent klines are returned. * * @throws ApiException if the Api call fails */ - public void premiumIndexKlineDataExample() throws ApiException { - String symbol = ""; - Interval interval = Interval.INTERVAL_1s; + public void premiumIndexKlineDataExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Interval interval = Interval.INTERVAL_1m; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; ApiResponse response = getApi().premiumIndexKlineData(symbol, interval, startTime, endTime, limit); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QuarterlyContractSettlementPriceExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QuarterlyContractSettlementPriceExample.java index 27ca83cf9..5821088af 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QuarterlyContractSettlementPriceExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QuarterlyContractSettlementPriceExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.QuarterlyContractSettlementPriceResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class QuarterlyContractSettlementPriceExample { @@ -28,12 +29,12 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Quarterly Contract Settlement Price * - *

Latest price for a symbol or symbols. Weight: 0 + *

Latest price for a symbol or symbols. Weight(IP): 0 * * @throws ApiException if the Api call fails */ - public void quarterlyContractSettlementPriceExample() throws ApiException { - String pair = ""; + public void quarterlyContractSettlementPriceExample() throws ApiException, IOException { + String pair = "BTCUSDT"; ApiResponse response = getApi().quarterlyContractSettlementPrice(pair); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QueryIndexPriceConstituentsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QueryIndexPriceConstituentsExample.java index 09bad1772..ad6631623 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QueryIndexPriceConstituentsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QueryIndexPriceConstituentsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.QueryIndexPriceConstituentsResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class QueryIndexPriceConstituentsExample { @@ -29,12 +30,12 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * Query Index Price Constituents * *

Query index price constituents **Note**: Prices from constituents of TradFi perps will be - * hiden and displayed as -1. Weight: 2 + * hiden and displayed as -1. Weight(IP): 2 * * @throws ApiException if the Api call fails */ - public void queryIndexPriceConstituentsExample() throws ApiException { - String symbol = ""; + public void queryIndexPriceConstituentsExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; ApiResponse response = getApi().queryIndexPriceConstituents(symbol); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QueryInsuranceFundBalanceSnapshotExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QueryInsuranceFundBalanceSnapshotExample.java index 0c36650b7..a414b6aea 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QueryInsuranceFundBalanceSnapshotExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/QueryInsuranceFundBalanceSnapshotExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.QueryInsuranceFundBalanceSnapshotResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class QueryInsuranceFundBalanceSnapshotExample { @@ -28,12 +29,12 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Query Insurance Fund Balance Snapshot * - *

Query Insurance Fund Balance Snapshot Weight: 1 + *

Query Insurance Fund Balance Snapshot Weight(IP): 1 * * @throws ApiException if the Api call fails */ - public void queryInsuranceFundBalanceSnapshotExample() throws ApiException { - String symbol = ""; + public void queryInsuranceFundBalanceSnapshotExample() throws ApiException, IOException { + String symbol = "BNBUSDT"; ApiResponse response = getApi().queryInsuranceFundBalanceSnapshot(symbol); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/RecentTradesListExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/RecentTradesListExample.java index bd42c99a8..25a9d8191 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/RecentTradesListExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/RecentTradesListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.RecentTradesListResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class RecentTradesListExample { @@ -28,15 +29,15 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Recent Trades List * - *

Get recent market trades * Market trades means trades filled in the order book. Only - * market trades will be returned, which means the insurance fund trades and ADL trades - * won't be returned. Weight: 5 + *

Get recent market trades Weight(IP): 5 Notes: - Market trades means trades filled in the + * order book. Only market trades will be returned, which means the insurance fund trades and + * ADL trades won't be returned. * * @throws ApiException if the Api call fails */ - public void recentTradesListExample() throws ApiException { - String symbol = ""; - Long limit = 100L; + public void recentTradesListExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Long limit = 50L; ApiResponse response = getApi().recentTradesList(symbol, limit); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/RpiOrderBookExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/RpiOrderBookExample.java index cd21a16d9..d36287f6f 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/RpiOrderBookExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/RpiOrderBookExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.RpiOrderBookResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class RpiOrderBookExample { @@ -34,9 +35,9 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * * @throws ApiException if the Api call fails */ - public void rpiOrderBookExample() throws ApiException { - String symbol = ""; - Long limit = 100L; + public void rpiOrderBookExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Long limit = 1000L; ApiResponse response = getApi().rpiOrderBook(symbol, limit); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolOrderBookTickerExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolOrderBookTickerExample.java index c79739101..a2c8a9f35 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolOrderBookTickerExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolOrderBookTickerExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.SymbolOrderBookTickerResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class SymbolOrderBookTickerExample { @@ -29,15 +30,16 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * Symbol Order Book Ticker * *

Best price/qty on the order book for a symbol or symbols. Retail Price Improvement(RPI) - * orders are not visible and excluded in the response message. * If the symbol is not sent, - * bookTickers for all symbols will be returned in an array. * The field + * orders are not visible and excluded in the response message. Weight: **2** for a single + * symbol; **5** when the symbol parameter is omitted Notes: - If the symbol is not sent, + * bookTickers for all symbols will be returned in an array. - The field * `X-MBX-USED-WEIGHT-1M` in response header is not accurate from this endpoint, - * please ignore. Weight: 2 for a single symbol; 5 when the symbol parameter is omitted + * please ignore. * * @throws ApiException if the Api call fails */ - public void symbolOrderBookTickerExample() throws ApiException { - String symbol = ""; + public void symbolOrderBookTickerExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; ApiResponse response = getApi().symbolOrderBookTicker(symbol); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolPriceTickerExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolPriceTickerExample.java index a498d9615..2ff65d04f 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolPriceTickerExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolPriceTickerExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.SymbolPriceTickerResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class SymbolPriceTickerExample { @@ -28,14 +29,14 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Symbol Price Ticker * - *

Latest price for a symbol or symbols. * If the symbol is not sent, prices for all symbols - * will be returned in an array. Weight: 1 for a single symbol; 2 when the symbol parameter is - * omitted + *

Latest price for a symbol or symbols. Weight: 1 for a single symbol; 2 when the symbol + * parameter is omitted Notes: - If the symbol is not sent, prices for all symbols will be + * returned in an array. * * @throws ApiException if the Api call fails */ - public void symbolPriceTickerExample() throws ApiException { - String symbol = ""; + public void symbolPriceTickerExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; ApiResponse response = getApi().symbolPriceTicker(symbol); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolPriceTickerV2Example.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolPriceTickerV2Example.java index 610a03656..b0fc7fee0 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolPriceTickerV2Example.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/SymbolPriceTickerV2Example.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.SymbolPriceTickerV2Response; +import java.io.IOException; /** API examples for MarketDataApi */ public class SymbolPriceTickerV2Example { @@ -28,15 +29,15 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Symbol Price Ticker V2 * - *

Latest price for a symbol or symbols. * If the symbol is not sent, prices for all symbols - * will be returned in an array. * The field `X-MBX-USED-WEIGHT-1M` in response header - * is not accurate from this endpoint, please ignore. Weight: 1 for a single symbol; 2 when the - * symbol parameter is omitted + *

Latest price for a symbol or symbols. Weight: 1 for a single symbol; 2 when the symbol + * parameter is omitted Notes: - If the symbol is not sent, prices for all symbols will be + * returned in an array. - The field `X-MBX-USED-WEIGHT-1M` in response header is not + * accurate from this endpoint, please ignore. * * @throws ApiException if the Api call fails */ - public void symbolPriceTickerV2Example() throws ApiException { - String symbol = ""; + public void symbolPriceTickerV2Example() throws ApiException, IOException { + String symbol = "BTCUSDT"; ApiResponse response = getApi().symbolPriceTickerV2(symbol); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TakerBuySellVolumeExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TakerBuySellVolumeExample.java index 21c83add3..7a9434415 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TakerBuySellVolumeExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TakerBuySellVolumeExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Period; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.TakerBuySellVolumeResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class TakerBuySellVolumeExample { @@ -29,16 +30,16 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Taker Buy/Sell Volume * - *

Taker Buy/Sell Volume * If startTime and endTime are not sent, the most recent data is - * returned. * Only the data of the latest 30 days is available. * IP rate limit 1000 - * requests/5min Weight: 0 + *

Taker Buy/Sell Volume Weight(IP): 0 Notes: - If startTime and endTime are not sent, the + * most recent data is returned. - Only the data of the latest 30 days is available. - IP rate + * limit 1000 requests/5min * * @throws ApiException if the Api call fails */ - public void takerBuySellVolumeExample() throws ApiException { - String symbol = ""; + public void takerBuySellVolumeExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 50L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TestConnectivityExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TestConnectivityExample.java index 2feb1d951..70c39460f 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TestConnectivityExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TestConnectivityExample.java @@ -5,6 +5,7 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; +import java.io.IOException; /** API examples for MarketDataApi */ public class TestConnectivityExample { @@ -26,11 +27,11 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Test Connectivity * - *

Test connectivity to the Rest API. Weight: 1 + *

Test connectivity to the Rest API. Weight(IP): 1 * * @throws ApiException if the Api call fails */ - public void testConnectivityExample() throws ApiException { + public void testConnectivityExample() throws ApiException, IOException { getApi().testConnectivity(); } } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java index 4a0f75c1c..d45a7aef2 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/Ticker24hrPriceChangeStatisticsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Ticker24hrPriceChangeStatisticsResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class Ticker24hrPriceChangeStatisticsExample { @@ -29,13 +30,13 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * 24hr Ticker Price Change Statistics * *

24 hour rolling window price change statistics. **Careful** when accessing this with no - * symbol. * If the symbol is not sent, tickers for all symbols will be returned in an array. - * Weight: 1 for a single symbol; 40 when the symbol parameter is omitted + * symbol. Weight: **1** for a single symbol; **40** when the symbol parameter is omitted Notes: + * - If the symbol is not sent, tickers for all symbols will be returned in an array. * * @throws ApiException if the Api call fails */ - public void ticker24hrPriceChangeStatisticsExample() throws ApiException { - String symbol = ""; + public void ticker24hrPriceChangeStatisticsExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; ApiResponse response = getApi().ticker24hrPriceChangeStatistics(symbol); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TopTraderLongShortRatioAccountsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TopTraderLongShortRatioAccountsExample.java index ba95379de..c52e93191 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TopTraderLongShortRatioAccountsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TopTraderLongShortRatioAccountsExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Period; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.TopTraderLongShortRatioAccountsResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class TopTraderLongShortRatioAccountsExample { @@ -27,23 +28,23 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Top Trader Long/Short Ratio (Accounts) + * Top Trader Long/Short Account Ratio (MARKET_DATA) * *

The proportion of net long and net short accounts to total accounts of the top 20% users * with the highest margin balance. Each account is counted once only. Long Account % = * Accounts of top traders with net long positions / Total accounts of top traders with open * positions Short Account % = Accounts of top traders with net short positions / Total * accounts of top traders with open positions Long/Short Ratio (Accounts) = Long Account % - * / Short Account % * If startTime and endTime are not sent, the most recent data is returned. - * * Only the data of the latest 30 days is available. * IP rate limit 1000 requests/5min - * Weight: 0 + * / Short Account % Security Type: MARKET_DATA Notes: - If startTime and endTime are not sent, + * the most recent data is returned. - Only the data of the latest 30 days is available. - IP + * rate limit 1000 requests/5min * * @throws ApiException if the Api call fails */ - public void topTraderLongShortRatioAccountsExample() throws ApiException { - String symbol = ""; + public void topTraderLongShortRatioAccountsExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 50L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TopTraderLongShortRatioPositionsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TopTraderLongShortRatioPositionsExample.java index 10b4289e0..e0d6f3bb5 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TopTraderLongShortRatioPositionsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TopTraderLongShortRatioPositionsExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Period; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.TopTraderLongShortRatioPositionsResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class TopTraderLongShortRatioPositionsExample { @@ -27,22 +28,22 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Top Trader Long/Short Ratio (Positions) + * Top Trader Long/Short Position Ratio (MARKET_DATA) * *

The proportion of net long and net short positions to total open positions of the top 20% * users with the highest margin balance. Long Position % = Long positions of top traders / * Total open positions of top traders Short Position % = Short positions of top traders / * Total open positions of top traders Long/Short Ratio (Positions) = Long Position % / - * Short Position % * If startTime and endTime are not sent, the most recent data is returned. * - * Only the data of the latest 30 days is available. * IP rate limit 1000 requests/5min Weight: - * 0 + * Short Position % Weight(IP): 0 Security Type: MARKET_DATA Notes: - If startTime and endTime + * are not sent, the most recent data is returned. - Only the data of the latest 30 days is + * available. - IP rate limit 1000 requests/5min * * @throws ApiException if the Api call fails */ - public void topTraderLongShortRatioPositionsExample() throws ApiException { - String symbol = ""; + public void topTraderLongShortRatioPositionsExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Period period = Period.PERIOD_5m; - Long limit = 100L; + Long limit = 50L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; ApiResponse response = 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 48e36f3cd..fc57f0381 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 @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.TradingScheduleResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class TradingScheduleExample { @@ -29,15 +30,18 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * Trading Schedule * *

Trading session schedules for the underlying assets of TradFi Perps are provided for a - * one-week period starting from the day prior to the query time, covering both the U.S. equity - * and commodity markets. Equity market session types include \"PRE_MARKET\", - * \"REGULAR\", \"AFTER_MARKET\", \"OVERNIGHT\", and - * \"NO_TRADING\", while commodity market session types include \"REGULAR\" - * and \"NO_TRADING\". Weight: 5 + * 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, and the + * commodity 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\". Weight(IP): 5 * * @throws ApiException if the Api call fails */ - public void tradingScheduleExample() throws ApiException { + public void tradingScheduleExample() throws ApiException, IOException { ApiResponse response = getApi().tradingSchedule(); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/portfoliomarginendpoints/ClassicPortfolioMarginAccountInformationExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/portfoliomarginendpoints/ClassicPortfolioMarginAccountInformationExample.java index 73d8d09ee..d95c5a255 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/portfoliomarginendpoints/ClassicPortfolioMarginAccountInformationExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/portfoliomarginendpoints/ClassicPortfolioMarginAccountInformationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ClassicPortfolioMarginAccountInformationResponse; +import java.io.IOException; /** API examples for PortfolioMarginEndpointsApi */ public class ClassicPortfolioMarginAccountInformationExample { @@ -28,13 +29,13 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Classic Portfolio Margin Account Information (USER_DATA) * - *

Get Classic Portfolio Margin current account information. * maxWithdrawAmount is for asset - * transfer out to the spot wallet. Weight: 5 + *

Get Classic Portfolio Margin current account information. Weight(IP): 5 Security Type: + * USER_DATA Notes: - maxWithdrawAmount is for asset transfer out to the spot wallet. * * @throws ApiException if the Api call fails */ - public void classicPortfolioMarginAccountInformationExample() throws ApiException { - String asset = ""; + public void classicPortfolioMarginAccountInformationExample() throws ApiException, IOException { + String asset = "BTC"; Long recvWindow = 5000L; ApiResponse response = getApi().classicPortfolioMarginAccountInformation(asset, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AccountTradeListExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AccountTradeListExample.java index 922b6b2d1..50806907c 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AccountTradeListExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AccountTradeListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AccountTradeListResponse; +import java.io.IOException; /** API examples for TradeApi */ public class AccountTradeListExample { @@ -28,21 +29,22 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Account Trade List (USER_DATA) * - *

Get trades for a specific account and symbol. * If `startTime` and - * `endTime` are both not sent, then the last 7 days' data will be returned. * The - * time between `startTime` and `endTime` cannot be longer than 7 days. * - * The parameter `fromId` cannot be sent with `startTime` or - * `endTime`. * Only support querying trade in the past 6 months Weight: 5 + *

Get trades for a specific account and symbol. Weight(IP): 5 Security Type: USER_DATA + * Notes: - If `startTime` and `endTime` are both not sent, then the last 7 + * days' data will be returned. - The time between `startTime` and + * `endTime` cannot be longer than 7 days. - The parameter `fromId` cannot + * be sent with `startTime` or `endTime`. - Only support querying trade in + * the past 6 months * * @throws ApiException if the Api call fails */ - public void accountTradeListExample() throws ApiException { - String symbol = ""; - Long orderId = 1L; + public void accountTradeListExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Long orderId = 25851813L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long fromId = 1L; - Long limit = 100L; + Long limit = 50L; Long recvWindow = 5000L; ApiResponse response = getApi().accountTradeList( diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AllOrdersExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AllOrdersExample.java index 9da9807a3..f5502e327 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AllOrdersExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AllOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AllOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class AllOrdersExample { @@ -28,21 +29,21 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * All Orders (USER_DATA) * - *

Get all account orders; active, canceled, or filled. * These orders will not be found: * + *

Get all account orders; active, canceled, or filled. - These orders will not be found: - * order status is `CANCELED` or `EXPIRED` **AND** order has NO filled trade - * **AND** created time + 3 days < current time * order create time + 90 days < current - * time * If `orderId` is set, it will get orders >= that `orderId`. - * Otherwise most recent orders are returned. * The query time period must be less then 7 days( - * default as the recent 7 days). Weight: 5 + * **AND** created time + 3 days < current time - order create time + 90 days < current + * time Weight(IP): 5 Security Type: USER_DATA Notes: - If `orderId` is set, it will + * get orders >= that `orderId`. Otherwise most recent orders are returned. - + * The query time period must be less then 7 days( default as the recent 7 days). * * @throws ApiException if the Api call fails */ - public void allOrdersExample() throws ApiException { - String symbol = ""; - Long orderId = 1L; + public void allOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Long orderId = 1917641L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; Long recvWindow = 5000L; ApiResponse response = getApi().allOrders(symbol, orderId, startTime, endTime, limit, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AutoCancelAllOpenOrdersExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AutoCancelAllOpenOrdersExample.java index 7d9c67abe..fcf014d1e 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AutoCancelAllOpenOrdersExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/AutoCancelAllOpenOrdersExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AutoCancelAllOpenOrdersRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AutoCancelAllOpenOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class AutoCancelAllOpenOrdersExample { @@ -31,21 +32,21 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * *

Cancel all open orders of the specified symbol at the end of the specified countdown. The * endpoint should be called repeatedly as heartbeats so that the existing countdown time can be - * canceled and replaced by a new one. * Example usage: Call this endpoint at 30s intervals with + * canceled and replaced by a new one. Example usage: Call this endpoint at 30s intervals with * an countdownTime of 120000 (120s). If this endpoint is not called within 120 seconds, all * your orders of the specified symbol will be automatically canceled. If this endpoint is * called with an countdownTime of 0, the countdown timer will be stopped. The system will check * all countdowns **approximately every 10 milliseconds**, so please note that sufficient * redundancy should be considered when using this function. We do not recommend setting the - * countdown time to be too precise or too small. Weight: 10 + * countdown time to be too precise or too small. Weight(IP): 10 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void autoCancelAllOpenOrdersExample() throws ApiException { + public void autoCancelAllOpenOrdersExample() throws ApiException, IOException { AutoCancelAllOpenOrdersRequest autoCancelAllOpenOrdersRequest = new AutoCancelAllOpenOrdersRequest(); - autoCancelAllOpenOrdersRequest.symbol(""); - autoCancelAllOpenOrdersRequest.countdownTime(0L); + autoCancelAllOpenOrdersRequest.symbol("BTCUSDT"); + autoCancelAllOpenOrdersRequest.countdownTime(1000L); ApiResponse response = getApi().autoCancelAllOpenOrders(autoCancelAllOpenOrdersRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAlgoOrderExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAlgoOrderExample.java index 58d067301..f8a7928cc 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAlgoOrderExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAlgoOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CancelAlgoOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelAlgoOrderExample { @@ -28,14 +29,15 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Cancel Algo Order (TRADE) * - *

Cancel an active algo order. * Either `algoId` or `clientAlgoId` must - * be sent. Weight: 1 + *

Cancel an active algo (conditional) order, including TP/SL (Take Profit / Stop Loss) and + * trailing stop orders on USD-M Futures. Weight(IP): 1 Security Type: TRADE Notes: - Either + * `algoId` or `clientAlgoId` must be sent. * * @throws ApiException if the Api call fails */ - public void cancelAlgoOrderExample() throws ApiException { - Long algoId = 1L; - String clientAlgoId = "1"; + public void cancelAlgoOrderExample() throws ApiException, IOException { + Long algoId = 2146760L; + String clientAlgoId = "6B2I9XVcJpCjqPAJ4YoFX7"; Long recvWindow = 5000L; ApiResponse response = getApi().cancelAlgoOrder(algoId, clientAlgoId, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAllAlgoOpenOrdersExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAllAlgoOpenOrdersExample.java index 229ba880a..a31ecab98 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAllAlgoOpenOrdersExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAllAlgoOpenOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CancelAllAlgoOpenOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelAllAlgoOpenOrdersExample { @@ -28,12 +29,13 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Cancel All Algo Open Orders (TRADE) * - *

Cancel All Algo Open Orders Weight: 1 + *

Cancel all open algo (conditional) orders on a symbol, including TP/SL (Take Profit / Stop + * Loss) and trailing stop orders on USD-M Futures. Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void cancelAllAlgoOpenOrdersExample() throws ApiException { - String symbol = ""; + public void cancelAllAlgoOpenOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().cancelAllAlgoOpenOrders(symbol, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAllOpenOrdersExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAllOpenOrdersExample.java index c703c8a30..50e3f7a06 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAllOpenOrdersExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelAllOpenOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CancelAllOpenOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelAllOpenOrdersExample { @@ -28,12 +29,12 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Cancel All Open Orders (TRADE) * - *

Cancel All Open Orders Weight: 1 + *

Cancel All Open Orders Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void cancelAllOpenOrdersExample() throws ApiException { - String symbol = ""; + public void cancelAllOpenOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().cancelAllOpenOrders(symbol, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelMultipleOrdersExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelMultipleOrdersExample.java index 8d82110f3..0253eb230 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelMultipleOrdersExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelMultipleOrdersExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CancelMultipleOrdersResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OrderIdList; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OrigClientOrderIdList; +import java.io.IOException; /** API examples for TradeApi */ public class CancelMultipleOrdersExample { @@ -30,15 +31,16 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Cancel Multiple Orders (TRADE) * - *

Cancel Multiple Orders * Either `orderIdList` or `origClientOrderIdList - * ` must be sent. Weight: 1 + *

Cancel Multiple Orders Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderIdList` or `origClientOrderIdList ` must be sent. * * @throws ApiException if the Api call fails */ - public void cancelMultipleOrdersExample() throws ApiException { - String symbol = ""; - OrderIdList orderIdList = null; - OrigClientOrderIdList origClientOrderIdList = null; + public void cancelMultipleOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + OrderIdList orderIdList = OrderIdList.fromJson("[1234567]"); + OrigClientOrderIdList origClientOrderIdList = + OrigClientOrderIdList.fromJson("[\"my_id_1\"]"); Long recvWindow = 5000L; ApiResponse response = getApi().cancelMultipleOrders( diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelOrderExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelOrderExample.java index 8904a3a1b..d1ab4c5b1 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelOrderExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CancelOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CancelOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CancelOrderExample { @@ -28,15 +29,15 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Cancel Order (TRADE) * - *

Cancel an active order. * Either `orderId` or `origClientOrderId` must - * be sent. Weight: 1 + *

Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent. * * @throws ApiException if the Api call fails */ - public void cancelOrderExample() throws ApiException { - String symbol = ""; - Long orderId = 1L; - String origClientOrderId = "1"; + public void cancelOrderExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Long orderId = 283194212L; + String origClientOrderId = "myOrder1"; Long recvWindow = 5000L; ApiResponse response = getApi().cancelOrder(symbol, orderId, origClientOrderId, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeInitialLeverageExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeInitialLeverageExample.java index 1356fd46f..b877d3f88 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeInitialLeverageExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeInitialLeverageExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ChangeInitialLeverageRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ChangeInitialLeverageResponse; +import java.io.IOException; /** API examples for TradeApi */ public class ChangeInitialLeverageExample { @@ -27,17 +28,18 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Change Initial Leverage(TRADE) + * Change Initial Leverage (TRADE) * - *

Change user's initial leverage of specific symbol market. Weight: 1 + *

Change user's initial leverage of specific symbol market. Weight(IP): 1 Security Type: + * TRADE * * @throws ApiException if the Api call fails */ - public void changeInitialLeverageExample() throws ApiException { + public void changeInitialLeverageExample() throws ApiException, IOException { ChangeInitialLeverageRequest changeInitialLeverageRequest = new ChangeInitialLeverageRequest(); - changeInitialLeverageRequest.symbol(""); - changeInitialLeverageRequest.leverage(0L); + changeInitialLeverageRequest.symbol("BTCUSDT"); + changeInitialLeverageRequest.leverage(1L); ApiResponse response = getApi().changeInitialLeverage(changeInitialLeverageRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeMarginTypeExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeMarginTypeExample.java index b54b6eee7..77eb31799 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeMarginTypeExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeMarginTypeExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ChangeMarginTypeRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ChangeMarginTypeResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.MarginType; +import java.io.IOException; /** API examples for TradeApi */ public class ChangeMarginTypeExample { @@ -28,15 +29,15 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Change Margin Type(TRADE) + * Change Margin Type (TRADE) * - *

Change symbol level margin type Weight: 1 + *

Change symbol level margin type Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void changeMarginTypeExample() throws ApiException { + public void changeMarginTypeExample() throws ApiException, IOException { ChangeMarginTypeRequest changeMarginTypeRequest = new ChangeMarginTypeRequest(); - changeMarginTypeRequest.symbol(""); + changeMarginTypeRequest.symbol("BTCUSDT"); changeMarginTypeRequest.marginType(MarginType.ISOLATED); ApiResponse response = getApi().changeMarginType(changeMarginTypeRequest); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeMultiAssetsModeExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeMultiAssetsModeExample.java index 786a1ebf7..89a70a79a 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeMultiAssetsModeExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangeMultiAssetsModeExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ChangeMultiAssetsModeRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ChangeMultiAssetsModeResponse; +import java.io.IOException; /** API examples for TradeApi */ public class ChangeMultiAssetsModeExample { @@ -30,14 +31,14 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * Change Multi-Assets Mode (TRADE) * *

Change user's Multi-Assets mode (Multi-Assets Mode or Single-Asset Mode) on ***Every - * symbol*** Weight: 1 + * symbol*** Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void changeMultiAssetsModeExample() throws ApiException { + public void changeMultiAssetsModeExample() throws ApiException, IOException { ChangeMultiAssetsModeRequest changeMultiAssetsModeRequest = new ChangeMultiAssetsModeRequest(); - changeMultiAssetsModeRequest.multiAssetsMargin(""); + changeMultiAssetsModeRequest.multiAssetsMargin("true"); ApiResponse response = getApi().changeMultiAssetsMode(changeMultiAssetsModeRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangePositionModeExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangePositionModeExample.java index 1b9fac38b..ec4e19774 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangePositionModeExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ChangePositionModeExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ChangePositionModeRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ChangePositionModeResponse; +import java.io.IOException; /** API examples for TradeApi */ public class ChangePositionModeExample { @@ -27,16 +28,19 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Change Position Mode(TRADE) + * Change Position Mode (TRADE) * - *

Change user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol*** - * Weight: 1 + *

Change user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol***. + * **After CM migration**, UM and CM share the **same** `dualSidePosition` setting. + * Calling this endpoint flips both UM and CM at once. If either side has any open order or open + * position, the change is rejected: - `-4067` (open orders exist) - `-4068` + * (open position exists) Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void changePositionModeExample() throws ApiException { + public void changePositionModeExample() throws ApiException, IOException { ChangePositionModeRequest changePositionModeRequest = new ChangePositionModeRequest(); - changePositionModeRequest.dualSidePosition(""); + changePositionModeRequest.dualSidePosition("true"); ApiResponse response = getApi().changePositionMode(changePositionModeRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CurrentAllAlgoOpenOrdersExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CurrentAllAlgoOpenOrdersExample.java index ea2478bbf..b113a7409 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CurrentAllAlgoOpenOrdersExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CurrentAllAlgoOpenOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CurrentAllAlgoOpenOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CurrentAllAlgoOpenOrdersExample { @@ -28,16 +29,18 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Current All Algo Open Orders (USER_DATA) * - *

Get all algo open orders on a symbol. * If the symbol is not sent, orders for all symbols - * will be returned in an array. Weight: 1 for a single symbol; 40 when the symbol parameter is - * omitted Careful when accessing this with no symbol. + *

Get all open algo (conditional) orders on a symbol, including TP/SL (Take Profit / Stop + * Loss) and trailing stop orders on USD-M Futures. Weight: **1** for a single symbol; **40** + * when the symbol parameter is omitted **Careful** when accessing this with no symbol. Security + * Type: USER_DATA Notes: - If the symbol is not sent, orders for all symbols will be returned + * in an array. * * @throws ApiException if the Api call fails */ - public void currentAllAlgoOpenOrdersExample() throws ApiException { - String algoType = ""; - String symbol = ""; - Long algoId = 1L; + public void currentAllAlgoOpenOrdersExample() throws ApiException, IOException { + String algoType = "CONDITIONAL"; + String symbol = "BTCUSDT"; + Long algoId = 2148627L; Long recvWindow = 5000L; ApiResponse response = getApi().currentAllAlgoOpenOrders(algoType, symbol, algoId, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CurrentAllOpenOrdersExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CurrentAllOpenOrdersExample.java index 3a12b47be..5916742d3 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CurrentAllOpenOrdersExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/CurrentAllOpenOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.CurrentAllOpenOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CurrentAllOpenOrdersExample { @@ -28,14 +29,14 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Current All Open Orders (USER_DATA) * - *

Get all open orders on a symbol. * If the symbol is not sent, orders for all symbols will - * be returned in an array. Weight: 1 for a single symbol; 40 when the symbol parameter is - * omitted Careful when accessing this with no symbol. + *

Get all open orders on a symbol. Weight: **1** for a single symbol; **40** when the symbol + * parameter is omitted **Careful** when accessing this with no symbol. Security Type: USER_DATA + * Notes: - If the symbol is not sent, orders for all symbols will be returned in an array. * * @throws ApiException if the Api call fails */ - public void currentAllOpenOrdersExample() throws ApiException { - String symbol = ""; + public void currentAllOpenOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().currentAllOpenOrders(symbol, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/FuturesTradfiPerpsContractExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/FuturesTradfiPerpsContractExample.java index 2f7517150..1c4476806 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/FuturesTradfiPerpsContractExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/FuturesTradfiPerpsContractExample.java @@ -1,11 +1,14 @@ package com.binance.connector.client.derivatives_trading_usds_futures.rest.trade; import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.FuturesTradfiPerpsContractRequest; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.FuturesTradfiPerpsContractResponse; +import java.io.IOException; /** API examples for TradeApi */ public class FuturesTradfiPerpsContractExample { @@ -25,15 +28,17 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Futures TradFi Perps Contract(USER_DATA) + * Futures TradFi Perps Contract (USER_DATA) * - *

Sign TradFi-Perps agreement contract Weight: 0 + *

Sign TradFi-Perps agreement contract Weight(IP): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void futuresTradfiPerpsContractExample() throws ApiException { + public void futuresTradfiPerpsContractExample() throws ApiException, IOException { FuturesTradfiPerpsContractRequest futuresTradfiPerpsContractRequest = new FuturesTradfiPerpsContractRequest(); - getApi().futuresTradfiPerpsContract(futuresTradfiPerpsContractRequest); + ApiResponse response = + getApi().futuresTradfiPerpsContract(futuresTradfiPerpsContractRequest); + System.out.println(response.getData()); } } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/GetOrderModifyHistoryExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/GetOrderModifyHistoryExample.java index 10099e3e1..ea73edcf2 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/GetOrderModifyHistoryExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/GetOrderModifyHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetOrderModifyHistoryResponse; +import java.io.IOException; /** API examples for TradeApi */ public class GetOrderModifyHistoryExample { @@ -28,19 +29,20 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Get Order Modify History (USER_DATA) * - *

Get order modification history * Either `orderId` or - * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. * Order modify history longer than 3 month is not avaliable Weight: 1 + *

Get order modification history Weight(IP): 1 Security Type: USER_DATA Notes: - Either + * `orderId` or `origClientOrderId` must be sent, and the + * `orderId` will prevail if both are sent. - Order modify history longer than 3 month + * is not avaliable * * @throws ApiException if the Api call fails */ - public void getOrderModifyHistoryExample() throws ApiException { - String symbol = ""; - Long orderId = 1L; - String origClientOrderId = "1"; + public void getOrderModifyHistoryExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Long orderId = 20072994037L; + String origClientOrderId = "LJ9R4QZDihCaS8UAOOLpgW"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; Long recvWindow = 5000L; ApiResponse response = getApi().getOrderModifyHistory( diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/GetPositionMarginChangeHistoryExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/GetPositionMarginChangeHistoryExample.java index 69ee525f5..37c008426 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/GetPositionMarginChangeHistoryExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/GetPositionMarginChangeHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.GetPositionMarginChangeHistoryResponse; +import java.io.IOException; /** API examples for TradeApi */ public class GetPositionMarginChangeHistoryExample { @@ -28,18 +29,18 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Get Position Margin Change History (TRADE) * - *

Get Position Margin Change History * Support querying future histories that are not older - * than 30 days * The time between `startTime` and `endTime`can't be - * more than 30 days Weight: 1 + *

Get Position Margin Change History Weight(IP): 1 Security Type: TRADE Notes: - Support + * querying future histories that are not older than 30 days - The time between + * `startTime` and `endTime`can't be more than 30 days * * @throws ApiException if the Api call fails */ - public void getPositionMarginChangeHistoryExample() throws ApiException { - String symbol = ""; - String type = ""; + public void getPositionMarginChangeHistoryExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + String type = "1"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; Long recvWindow = 5000L; ApiResponse response = getApi().getPositionMarginChangeHistory( diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyIsolatedPositionMarginExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyIsolatedPositionMarginExample.java index 5fdcc4281..4c9331905 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyIsolatedPositionMarginExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyIsolatedPositionMarginExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ModifyIsolatedPositionMarginRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ModifyIsolatedPositionMarginResponse; +import java.io.IOException; /** API examples for TradeApi */ public class ModifyIsolatedPositionMarginExample { @@ -27,18 +28,19 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Modify Isolated Position Margin(TRADE) + * Modify Isolated Position Margin (TRADE) * - *

Modify Isolated Position Margin * Only for isolated symbol Weight: 1 + *

Modify Isolated Position Margin Weight(IP): 1 Security Type: TRADE Notes: - Only for + * isolated symbol * * @throws ApiException if the Api call fails */ - public void modifyIsolatedPositionMarginExample() throws ApiException { + public void modifyIsolatedPositionMarginExample() throws ApiException, IOException { ModifyIsolatedPositionMarginRequest modifyIsolatedPositionMarginRequest = new ModifyIsolatedPositionMarginRequest(); - modifyIsolatedPositionMarginRequest.symbol(""); + modifyIsolatedPositionMarginRequest.symbol("BTCUSDT"); modifyIsolatedPositionMarginRequest.amount(1.0d); - modifyIsolatedPositionMarginRequest.type(""); + modifyIsolatedPositionMarginRequest.type(1); ApiResponse response = getApi().modifyIsolatedPositionMargin(modifyIsolatedPositionMarginRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyMultipleOrdersExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyMultipleOrdersExample.java index 90167bdb3..b420faf3d 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyMultipleOrdersExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyMultipleOrdersExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.BatchOrders; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ModifyMultipleOrdersRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ModifyMultipleOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class ModifyMultipleOrdersExample { @@ -28,18 +29,18 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Modify Multiple Orders(TRADE) + * Modify Multiple Orders (TRADE) * - *

Modify Multiple Orders (TRADE) * Parameter rules are same with `Modify Order` * - * Batch modify orders are processed concurrently, and the order of matching is not guaranteed. - * * The order of returned contents for batch modify orders is the same as the order of the - * order list. * One order can only be modfied for less than 10000 times Weight: 5 on 10s order - * rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 5 on IP - * rate limit(x-mbx-used-weight-1m); + *

Modify Multiple Orders (TRADE) Weight: 5 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 + * on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate limit(x-mbx-used-weight-1m); + * Security Type: TRADE Notes: - Parameter rules are same with `Modify Order` - Batch + * modify orders are processed concurrently, and the order of matching is not guaranteed. - The + * order of returned contents for batch modify orders is the same as the order of the order + * list. - One order can only be modfied for less than 10000 times * * @throws ApiException if the Api call fails */ - public void modifyMultipleOrdersExample() throws ApiException { + public void modifyMultipleOrdersExample() throws ApiException, IOException { ModifyMultipleOrdersRequest modifyMultipleOrdersRequest = new ModifyMultipleOrdersRequest(); modifyMultipleOrdersRequest.batchOrders(new BatchOrders()); ApiResponse response = 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 47c6c8931..fd740da16 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 @@ -9,6 +9,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ModifyOrderRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.ModifyOrderResponse; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Side; +import java.io.IOException; /** API examples for TradeApi */ public class ModifyOrderExample { @@ -31,26 +32,27 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * Modify Order (TRADE) * *

Order modify function, currently only LIMIT order modification is supported, modified - * orders will be reordered in the match queue * Either `orderId` or + * 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 `orderId` or * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. * Both `quantity` and `price` must be sent, which is different - * from dapi modify order endpoint. * When the new `quantity` or `price` + * are sent. - Both `quantity` and `price` must be sent, which is different + * from dapi modify order endpoint. - When the new `quantity` or `price` * doesn'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 - * `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 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) + * 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 + * `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 * * @throws ApiException if the Api call fails */ - public void modifyOrderExample() throws ApiException { + public void modifyOrderExample() throws ApiException, IOException { ModifyOrderRequest modifyOrderRequest = new ModifyOrderRequest(); - modifyOrderRequest.symbol(""); + modifyOrderRequest.symbol("BTCUSDT"); modifyOrderRequest.side(Side.BUY); modifyOrderRequest.quantity(1.0d); - modifyOrderRequest.price(1.0d); + modifyOrderRequest.price(30005d); ApiResponse response = getApi().modifyOrder(modifyOrderRequest); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/NewAlgoOrderExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/NewAlgoOrderExample.java index 45f9928e5..c7c0a0158 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/NewAlgoOrderExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/NewAlgoOrderExample.java @@ -6,9 +6,12 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AlgoType; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.NewAlgoOrderRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.NewAlgoOrderResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OrderType; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Side; +import java.io.IOException; /** API examples for TradeApi */ public class NewAlgoOrderExample { @@ -28,51 +31,53 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * New Algo Order(TRADE) + * New Algo Order (TRADE) * - *

Send in a new Algo order. * Algo order with type `STOP`, parameter - * `timeInForce` can be sent ( default `GTC`). * Algo order with type + *

Send in a new algo (conditional) order. Use this endpoint to place **TP/SL (Take Profit / + * Stop Loss)** and trailing stop orders on USD-M Futures. Supported order types under + * `algoType=CONDITIONAL` are `STOP_MARKET`, + * `TAKE_PROFIT_MARKET`, `STOP`, `TAKE_PROFIT`, and + * `TRAILING_STOP_MARKET`. 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: - Algo order with type `STOP`, parameter + * `timeInForce` can be sent (default `GTC`). - Algo order with type * `TAKE_PROFIT`, parameter `timeInForce` can be sent ( default - * `GTC`). * Condition orders will be triggered when: * If - * parameter`priceProtect`is sent as true: * when price reaches the + * `GTC`). - Condition orders will be triggered when: - If + * parameter`priceProtect`is sent as true: - when price reaches the * `triggerPrice` ,the difference rate between \"MARK_PRICE\" and * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price + * symbol - \"triggerProtect\" of a symbol can be got from `GET + * /fapi/v1/exchangeInfo` - `STOP`, `STOP_MARKET`: - BUY: latest price * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * `TAKE_PROFIT`, - * `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * SELL: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest price after - * order placed <= `activatePrice`, and the latest price >= the lowest - * price * (1 + `callbackRate`) * SELL: the highest price after order placed - * >= `activatePrice`, and the latest price <= the highest price * (1 - * - `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error - * code. ``{\"code\": -2021, \"msg\": \"Order would - * immediately trigger.\"}`` means that the parameters you send do not meet the - * following requirements: * BUY: `activatePrice` should be smaller than latest price. - * * SELL: `activatePrice` should be larger than latest price. * - * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` paremeter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with - * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * + * `triggerPrice` - SELL: latest price (\"MARK_PRICE\" or + * \"CONTRACT_PRICE\") - `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - + * BUY: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") - SELL: latest + * price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= + * `triggerPrice` - `TRAILING_STOP_MARKET`: - BUY: the lowest price after + * order placed = the lowest price * (1 + `callbackRate`) - SELL: the highest + * price after order placed >= `activatePrice`, and the latest price - For + * `TRAILING_STOP_MARKET`, if you got such error code. > `{\"code\": + * -2021, \"msg\": \"Order would immediately trigger.\"}` > means + * that the parameters you send do not meet the following requirements: - BUY: + * `activatePrice` should be smaller than latest price. - SELL: + * `activatePrice` should be larger than latest price. - `STOP_MARKET`, + * `TAKE_PROFIT_MARKET` with `closePosition`=`true`: - Follow + * the same rules for condition orders. - If triggered,**close all** current long position( if + * `SELL`) or current short position( if `BUY`). - Cannot be used with + * `quantity` paremeter - Cannot be used with `reduceOnly` parameter - In + * Hedge Mode,cannot be used with `BUY` orders in `LONG` position side. and + * cannot be used with `SELL` orders in `SHORT` position side - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. Weight: 0 on IP rate - * limit(x-mbx-used-weight-1m) + * `IOC` or `GTC` or `GTD`. * * @throws ApiException if the Api call fails */ - public void newAlgoOrderExample() throws ApiException { + public void newAlgoOrderExample() throws ApiException, IOException { NewAlgoOrderRequest newAlgoOrderRequest = new NewAlgoOrderRequest(); - newAlgoOrderRequest.algoType(""); - newAlgoOrderRequest.symbol(""); + newAlgoOrderRequest.algoType(AlgoType.CONDITIONAL); + newAlgoOrderRequest.symbol("BNBUSDT"); newAlgoOrderRequest.side(Side.BUY); - newAlgoOrderRequest.type(""); + newAlgoOrderRequest.type(OrderType.LIMIT); ApiResponse response = getApi().newAlgoOrder(newAlgoOrderRequest); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/NewOrderExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/NewOrderExample.java index a2c14bb3f..a367da95d 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/NewOrderExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/NewOrderExample.java @@ -8,7 +8,9 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.NewOrderRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.NewOrderResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OrderType; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Side; +import java.io.IOException; /** API examples for TradeApi */ public class NewOrderExample { @@ -28,25 +30,29 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * New Order(TRADE) + * New Order (TRADE) * - *

Send in a new order. * If `newOrderRespType ` is sent as `RESULT` : * - * `MARKET` order: the final FILLED result of the order will be return directly. * - * `LIMIT` order with special `timeInForce`: the final status result of the - * order(FILLED or EXPIRED) will be returned directly. * `selfTradePreventionMode` is - * only effective when `timeInForce` set to `IOC` or `GTC` or - * `GTD`. * In extreme market conditions, timeInForce `GTD` order auto - * cancel time might be delayed comparing to `goodTillDate` 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) + *

Send in a new order. 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: Additional mandatory parameters based on `type`: | Type | + * Additional mandatory parameters | |------|----------------------------------| | + * `LIMIT` | `timeInForce`, `quantity`, `price` | | + * `MARKET` | `quantity` | - If `newOrderRespType` is sent as + * `RESULT`: - `MARKET` order: the final FILLED result of the order will be + * returned directly. - `LIMIT` order with special `timeInForce`: the final + * status result of the order (FILLED or EXPIRED) will be returned directly. - + * `selfTradePreventionMode` is only effective when `timeInForce` is set to + * `IOC`, `GTC`, or `GTD`. - In extreme market conditions, + * `timeInForce` `GTD` order auto-cancel time might be delayed compared to + * `goodTillDate`. * * @throws ApiException if the Api call fails */ - public void newOrderExample() throws ApiException { + public void newOrderExample() throws ApiException, IOException { NewOrderRequest newOrderRequest = new NewOrderRequest(); - newOrderRequest.symbol(""); + newOrderRequest.symbol("BTCUSDT"); newOrderRequest.side(Side.BUY); - newOrderRequest.type(""); + newOrderRequest.type(OrderType.LIMIT); ApiResponse response = getApi().newOrder(newOrderRequest); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PlaceMultipleOrdersExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PlaceMultipleOrdersExample.java index a661f09aa..ffa49ebb3 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PlaceMultipleOrdersExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PlaceMultipleOrdersExample.java @@ -6,9 +6,10 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; -import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.BatchOrdersPlaceMultipleOrders; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.BatchOrders; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.PlaceMultipleOrdersRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.PlaceMultipleOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class PlaceMultipleOrdersExample { @@ -28,19 +29,19 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Place Multiple Orders(TRADE) + * Place Multiple Orders (TRADE) * - *

Place Multiple Orders * Paremeter rules are same with `New Order` * Batch orders - * are processed concurrently, and the order of matching is not guaranteed. * The order of - * returned contents for batch orders is the same as the order of the order list. Weight: 5 on - * 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate - * limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate limit(x-mbx-used-weight-1m); + *

Place Multiple Orders Weight: 5 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min + * order rate limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate limit(x-mbx-used-weight-1m); Security + * Type: TRADE Notes: - Paremeter rules are same with `New Order` - Batch orders are + * processed concurrently, and the order of matching is not guaranteed. - The order of returned + * contents for batch orders is the same as the order of the order list. * * @throws ApiException if the Api call fails */ - public void placeMultipleOrdersExample() throws ApiException { + public void placeMultipleOrdersExample() throws ApiException, IOException { PlaceMultipleOrdersRequest placeMultipleOrdersRequest = new PlaceMultipleOrdersRequest(); - placeMultipleOrdersRequest.batchOrders(new BatchOrdersPlaceMultipleOrders()); + placeMultipleOrdersRequest.batchOrders(new BatchOrders()); ApiResponse response = getApi().placeMultipleOrders(placeMultipleOrdersRequest); System.out.println(response.getData()); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionAdlQuantileEstimationExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionAdlQuantileEstimationExample.java index c49f538a2..796239b6e 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionAdlQuantileEstimationExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionAdlQuantileEstimationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.PositionAdlQuantileEstimationResponse; +import java.io.IOException; /** API examples for TradeApi */ public class PositionAdlQuantileEstimationExample { @@ -26,7 +27,7 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Position ADL Quantile Estimation(USER_DATA) + * Position ADL Quantile Estimation (USER_DATA) * *

Position ADL Quantile Estimation * Values update every 30s. * Values 0, 1, 2, 3, 4 shows * the queue position and possibility of ADL from low to high. * For positions of the symbol are @@ -36,12 +37,12 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * \"HEDGE\" as a sign will be returned instead of \"BOTH\"; * A same value * caculated on unrealized pnls on long and short sides' positions will be shown for * \"LONG\" and \"SHORT\" when there are positions in both of long and short - * sides. Weight: 5 + * sides. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void positionAdlQuantileEstimationExample() throws ApiException { - String symbol = ""; + public void positionAdlQuantileEstimationExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().positionAdlQuantileEstimation(symbol, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionInformationV2Example.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionInformationV2Example.java index c98886b09..21cc6d3e5 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionInformationV2Example.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionInformationV2Example.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.PositionInformationV2Response; +import java.io.IOException; /** API examples for TradeApi */ public class PositionInformationV2Example { @@ -28,13 +29,14 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Position Information V2 (USER_DATA) * - *

Get current position information. Please use with user data stream - * `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 5 + *

Get current position information. Weight(IP): 5 Security Type: USER_DATA Notes: - Please + * use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy + * needs. * * @throws ApiException if the Api call fails */ - public void positionInformationV2Example() throws ApiException { - String symbol = ""; + public void positionInformationV2Example() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().positionInformationV2(symbol, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionInformationV3Example.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionInformationV3Example.java index 174282a12..17c04bd9e 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionInformationV3Example.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/PositionInformationV3Example.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.PositionInformationV3Response; +import java.io.IOException; /** API examples for TradeApi */ public class PositionInformationV3Example { @@ -29,13 +30,13 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * Position Information V3 (USER_DATA) * *

Get current position information(only symbol that has position or open orders will be - * returned). Please use with user data stream `ACCOUNT_UPDATE` to meet your - * timeliness and accuracy needs. Weight: 5 + * returned). Weight(IP): 5 Security Type: USER_DATA Notes: - Please use with user data stream + * `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. * * @throws ApiException if the Api call fails */ - public void positionInformationV3Example() throws ApiException { - String symbol = ""; + public void positionInformationV3Example() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().positionInformationV3(symbol, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryAlgoOrderExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryAlgoOrderExample.java index 232ad3b29..3dbd5aef0 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryAlgoOrderExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryAlgoOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.QueryAlgoOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryAlgoOrderExample { @@ -28,15 +29,16 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Query Algo Order (USER_DATA) * - *

Check an algo order's status. * These orders will not be found: * order status is + *

Check the status of an algo (conditional) order, such as TP/SL (Take Profit / Stop Loss) + * or trailing stop orders on USD-M Futures. * These orders will not be found: * order status is * `CANCELED` or `EXPIRED` **AND** order has NO filled trade **AND** created - * time + 3 days < current time * order create time + 90 days < current time * Either - * `algoId` or `clientAlgoId` must be sent. * `algoId` is - * self-increment for each specific `symbol` Weight: 1 + * time + 3 days < current time * order create time + 90 days < current time Weight(IP): 1 + * Security Type: USER_DATA Notes: - Either `algoId` or `clientAlgoId` must + * be sent. - `algoId` is self-increment for each specific `symbol` * * @throws ApiException if the Api call fails */ - public void queryAlgoOrderExample() throws ApiException { + public void queryAlgoOrderExample() throws ApiException, IOException { Long algoId = 1L; String clientAlgoId = "1"; Long recvWindow = 5000L; diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryAllAlgoOrdersExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryAllAlgoOrdersExample.java index fb60b7417..d0963b735 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryAllAlgoOrdersExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryAllAlgoOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.QueryAllAlgoOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryAllAlgoOrdersExample { @@ -28,21 +29,23 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Query All Algo Orders (USER_DATA) * - *

Get all algo orders; active, CANCELED, TRIGGERED or FINISHED . * These orders will not be - * found: * order status is `CANCELED` or `EXPIRED` **AND** order has NO - * filled trade **AND** created time + 3 days < current time * order create time + 90 days - * < current time * If `algoId` is set, it will get orders >= that - * `algoId`. Otherwise most recent orders are returned. * The query time period must - * be less then 7 days( default as the recent 7 days). Weight: 5 + *

Get all algo (conditional) orders — active, CANCELED, TRIGGERED, or FINISHED — including + * TP/SL (Take Profit / Stop Loss) and trailing stop orders on USD-M Futures. * These orders + * will not be found: * order status is `CANCELED` or `EXPIRED` **AND** + * order has NO filled trade **AND** created time + 3 days < current time * order create time + * + 90 days < current time Weight(IP): 5 Security Type: USER_DATA Notes: - If + * `algoId` is set, it will get orders >= that `algoId`. Otherwise + * most recent orders are returned. - The query time period must be less then 7 days( default as + * the recent 7 days). * * @throws ApiException if the Api call fails */ - public void queryAllAlgoOrdersExample() throws ApiException { - String symbol = ""; - Long algoId = 1L; + public void queryAllAlgoOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Long algoId = 2146760L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; Long recvWindow = 5000L; ApiResponse response = getApi().queryAllAlgoOrders(symbol, algoId, startTime, endTime, limit, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryCurrentOpenOrderExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryCurrentOpenOrderExample.java index b016dc203..79deed84f 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryCurrentOpenOrderExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryCurrentOpenOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.QueryCurrentOpenOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryCurrentOpenOrderExample { @@ -28,16 +29,16 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Query Current Open Order (USER_DATA) * - *

Query open order * Either`orderId` or `origClientOrderId` must be sent - * * If the queried order has been filled or cancelled, the error message \"Order does not - * exist\" will be returned. Weight: 1 + *

Query open order Weight(IP): 1 Security Type: USER_DATA Notes: - Either`orderId` + * or `origClientOrderId` must be sent - If the queried order has been filled or + * cancelled, the error message \"Order does not exist\" will be returned. * * @throws ApiException if the Api call fails */ - public void queryCurrentOpenOrderExample() throws ApiException { - String symbol = ""; - Long orderId = 1L; - String origClientOrderId = "1"; + public void queryCurrentOpenOrderExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Long orderId = 1917641L; + String origClientOrderId = "abc"; Long recvWindow = 5000L; ApiResponse response = getApi().queryCurrentOpenOrder(symbol, orderId, origClientOrderId, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryOrderExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryOrderExample.java index 385db4f57..4e22da000 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryOrderExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/QueryOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.QueryOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryOrderExample { @@ -30,16 +31,16 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * *

Check an order's status. * These orders will not be found: * order status is * `CANCELED` or `EXPIRED` **AND** order has NO filled trade **AND** created - * time + 3 days < current time * order create time + 90 days < current time * Either - * `orderId` or `origClientOrderId` must be sent. * `orderId` is - * self-increment for each specific `symbol` Weight: 1 + * time + 3 days < current time * order create time + 90 days < current time Weight(IP): 1 + * Security Type: USER_DATA Notes: - Either `orderId` or `origClientOrderId` + * must be sent. - `orderId` is self-increment for each specific `symbol` * * @throws ApiException if the Api call fails */ - public void queryOrderExample() throws ApiException { - String symbol = ""; - Long orderId = 1L; - String origClientOrderId = "1"; + public void queryOrderExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Long orderId = 1917641L; + String origClientOrderId = "abc"; Long recvWindow = 5000L; ApiResponse response = getApi().queryOrder(symbol, orderId, origClientOrderId, recvWindow); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/TestOrderExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/TestOrderExample.java index 72d8210cf..bc8c08e02 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/TestOrderExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/TestOrderExample.java @@ -6,9 +6,11 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; +import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.OrderType; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.Side; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.TestOrderRequest; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.TestOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class TestOrderExample { @@ -28,54 +30,59 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { } /** - * Test Order(TRADE) + * Test Order (TRADE) * - *

Testing order request, this order will not be submitted to matching engine * Order with - * type `STOP`, parameter `timeInForce` can be sent ( default - * `GTC`). * Order with type `TAKE_PROFIT`, parameter - * `timeInForce` can be sent ( default `GTC`). * Condition orders will be - * triggered when: * If parameter`priceProtect`is sent as true: * when price reaches - * the `stopPrice` ,the difference rate between \"MARK_PRICE\" and + *

Testing order request, this order will not be submitted to matching engine Security Type: + * TRADE Notes: Additional mandatory parameters based on `type`: | Type | Additional + * mandatory parameters | | -------------------------------- | + * ---------------------------------- | | `LIMIT` | `timeInForce`, + * `quantity`, `price` | | `MARKET` | `quantity` | | + * `STOP/TAKE_PROFIT` | `quantity`, `price`, `stopPrice` + * | | `STOP_MARKET/TAKE_PROFIT_MARKET` | `stopPrice` | | + * `TRAILING_STOP_MARKET` | `callbackRate` | - Order with type + * `STOP`, parameter `timeInForce` can be sent ( default `GTC`). - + * Order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent + * (default `GTC`). - Condition orders will be triggered when: - If + * parameter`priceProtect`is sent as true: - when price reaches the + * `stopPrice` ,the difference rate between \"MARK_PRICE\" and * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed `<= - * `activationPrice`, and the latest price >`= the lowest price * (1 + - * `callbackRate`) * SELL: the highest price after order placed >= - * `activationPrice`, and the latest price <= the highest price * (1 - - * `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. - * ``{\"code\": -2021, \"msg\": \"Order would immediately - * trigger.\"}`` means that the parameters you send do not meet the following - * requirements: * BUY: `activationPrice` should be smaller than latest price. * SELL: - * `activationPrice` should be larger than latest price. * If `newOrderRespType - * ` is sent as `RESULT` : * `MARKET` order: the final FILLED result of - * the order will be return directly. * `LIMIT` order with special + * symbol - \"triggerProtect\" of a symbol can be got from `GET + * /fapi/v1/exchangeInfo` - `STOP`, `STOP_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - + * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") - + * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - BUY: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` - + * `TRAILING_STOP_MARKET`: - BUY: the lowest price after order placed + * ``= the lowest price * (1 + `callbackRate`) - SELL: the highest + * price after order placed >= `activationPrice`, and the latest price - For + * `TRAILING_STOP_MARKET`, if you got such error code. > `{\"code\": + * -2021, \"msg\": \"Order would immediately trigger.\"}` > means + * that the parameters you send do not meet the following requirements: - BUY: + * `activationPrice` should be smaller than latest price. - SELL: + * `activationPrice` should be larger than latest price. - If `newOrderRespType + * ` is sent as `RESULT` : - `MARKET` order: the final FILLED result of + * the order will be return directly. - `LIMIT` order with special * `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be - * returned directly. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` paremeter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with + * returned directly. - `STOP_MARKET`, `TAKE_PROFIT_MARKET` with + * `closePosition`=`true`: - Follow the same rules for condition + * orders. - If triggered,**close all** current long position( if `SELL`) or current + * short position( if `BUY`). - Cannot be used with `quantity` paremeter - + * Cannot be used with `reduceOnly` parameter - In Hedge Mode,cannot be used with * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * + * `SELL` orders in `SHORT` position side - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. * In extreme market conditions, + * `IOC` or `GTC` or `GTD`. - In extreme market conditions, * timeInForce `GTD` order auto cancel time might be delayed comparing to - * `goodTillDate` Weight: 0 + * `goodTillDate` * * @throws ApiException if the Api call fails */ - public void testOrderExample() throws ApiException { + public void testOrderExample() throws ApiException, IOException { TestOrderRequest testOrderRequest = new TestOrderRequest(); - testOrderRequest.symbol(""); + testOrderRequest.symbol("BTCUSDT"); testOrderRequest.side(Side.BUY); - testOrderRequest.type(""); + testOrderRequest.type(OrderType.LIMIT); ApiResponse response = getApi().testOrder(testOrderRequest); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/UsersForceOrdersExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/UsersForceOrdersExample.java index 3bedff5ae..49ade0879 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/UsersForceOrdersExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/UsersForceOrdersExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.AutoCloseType; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.UsersForceOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class UsersForceOrdersExample { @@ -29,19 +30,19 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * User's Force Orders (USER_DATA) * - *

Query user's Force Orders * If \"autoCloseType\" is not sent, orders with - * both of the types will be returned * If \"startTime\" is not sent, data within 7 - * days before \"endTime\" can be queried * Only support querying data in the past 90 - * days Weight: 20 with symbol, 50 without symbol + *

Query user's Force Orders Weight: **20** with symbol, **50** without symbol Security + * Type: USER_DATA Notes: - If \"autoCloseType\" is not sent, orders with both of the + * types will be returned - If \"startTime\" is not sent, data within 7 days before + * \"endTime\" can be queried * * @throws ApiException if the Api call fails */ - public void usersForceOrdersExample() throws ApiException { - String symbol = ""; + public void usersForceOrdersExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; AutoCloseType autoCloseType = AutoCloseType.LIQUIDATION; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 100L; + Long limit = 50L; Long recvWindow = 5000L; ApiResponse response = getApi().usersForceOrders( diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/CloseUserDataStreamExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/CloseUserDataStreamExample.java index 1300d3ba2..70ef0f839 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/CloseUserDataStreamExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/CloseUserDataStreamExample.java @@ -5,6 +5,7 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; +import java.io.IOException; /** API examples for UserDataStreamsApi */ public class CloseUserDataStreamExample { @@ -26,11 +27,11 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { /** * Close User Data Stream (USER_STREAM) * - *

Close out a user data stream. Weight: 1 + *

Close out a user data stream. Weight(IP): 1 Security Type: USER_STREAM * * @throws ApiException if the Api call fails */ - public void closeUserDataStreamExample() throws ApiException { + public void closeUserDataStreamExample() throws ApiException, IOException { getApi().closeUserDataStream(); } } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/KeepaliveUserDataStreamExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/KeepaliveUserDataStreamExample.java index 5fc08a240..0c2033ddb 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/KeepaliveUserDataStreamExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/KeepaliveUserDataStreamExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.KeepaliveUserDataStreamResponse; +import java.io.IOException; /** API examples for UserDataStreamsApi */ public class KeepaliveUserDataStreamExample { @@ -29,11 +30,12 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * Keepalive User Data Stream (USER_STREAM) * *

Keepalive a user data stream to prevent a time out. User data streams will close after 60 - * minutes. It's recommended to send a ping about every 60 minutes. Weight: 1 + * minutes. It's recommended to send a ping about every 60 minutes. Weight(IP): 1 Security + * Type: USER_STREAM * * @throws ApiException if the Api call fails */ - public void keepaliveUserDataStreamExample() throws ApiException { + public void keepaliveUserDataStreamExample() throws ApiException, IOException { ApiResponse response = getApi().keepaliveUserDataStream(); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/StartUserDataStreamExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/StartUserDataStreamExample.java index 18a2ee517..8380c64d4 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/StartUserDataStreamExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/userdatastreams/StartUserDataStreamExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.rest.DerivativesTradingUsdsFuturesRestApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.rest.api.DerivativesTradingUsdsFuturesRestApi; import com.binance.connector.client.derivatives_trading_usds_futures.rest.model.StartUserDataStreamResponse; +import java.io.IOException; /** API examples for UserDataStreamsApi */ public class StartUserDataStreamExample { @@ -30,11 +31,12 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * *

Start a new user data stream. The stream will close after 60 minutes unless a keepalive is * sent. If the account has an active `listenKey`, that `listenKey` will be - * returned and its validity will be extended for 60 minutes. Weight: 1 + * returned and its validity will be extended for 60 minutes. Weight(IP): 1 Security Type: + * USER_STREAM * * @throws ApiException if the Api call fails */ - public void startUserDataStreamExample() throws ApiException { + public void startUserDataStreamExample() throws ApiException, IOException { ApiResponse response = getApi().startUserDataStream(); System.out.println(response.getData()); } diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/AccountInformationExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/AccountInformationExample.java index 721eb3b2f..8cb196f95 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/AccountInformationExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/AccountInformationExample.java @@ -29,10 +29,11 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { } /** - * Account Information(USER_DATA) + * Account Information (USER_DATA) * *

Get current account information. User in single-asset/ multi-assets mode will see - * different value, see comments in response section for detail. Weight: 5 + * different value, see comments in response section for detail. Weight(IP): 5 Security Type: + * USER_DATA */ public void accountInformationExampleAsync() { AccountInformationRequest accountInformationRequest = new AccountInformationRequest(); @@ -49,10 +50,11 @@ public void accountInformationExampleAsync() { } /** - * Account Information(USER_DATA) + * Account Information (USER_DATA) * *

Get current account information. User in single-asset/ multi-assets mode will see - * different value, see comments in response section for detail. Weight: 5 + * different value, see comments in response section for detail. Weight(IP): 5 Security Type: + * USER_DATA */ public void accountInformationExampleSync() { AccountInformationRequest accountInformationRequest = new AccountInformationRequest(); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/AccountInformationV2Example.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/AccountInformationV2Example.java index e0c18d619..a4452f119 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/AccountInformationV2Example.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/AccountInformationV2Example.java @@ -29,10 +29,11 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { } /** - * Account Information V2(USER_DATA) + * Account Information V2 (USER_DATA) * *

Get current account information. User in single-asset/ multi-assets mode will see - * different value, see comments in response section for detail. Weight: 5 + * different value, see comments in response section for detail. Weight(IP): 5 Security Type: + * USER_DATA */ public void accountInformationV2ExampleAsync() { AccountInformationV2Request accountInformationV2Request = new AccountInformationV2Request(); @@ -49,10 +50,11 @@ public void accountInformationV2ExampleAsync() { } /** - * Account Information V2(USER_DATA) + * Account Information V2 (USER_DATA) * *

Get current account information. User in single-asset/ multi-assets mode will see - * different value, see comments in response section for detail. Weight: 5 + * different value, see comments in response section for detail. Weight(IP): 5 Security Type: + * USER_DATA */ public void accountInformationV2ExampleSync() { AccountInformationV2Request accountInformationV2Request = new AccountInformationV2Request(); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/FuturesAccountBalanceExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/FuturesAccountBalanceExample.java index 28cf7dab2..40591c7dc 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/FuturesAccountBalanceExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/FuturesAccountBalanceExample.java @@ -29,9 +29,9 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { } /** - * Futures Account Balance(USER_DATA) + * Futures Account Balance (USER_DATA) * - *

Query account balance info Weight: 5 + *

Futures Account Balance Weight(IP): 5 Security Type: USER_DATA */ public void futuresAccountBalanceExampleAsync() { FuturesAccountBalanceRequest futuresAccountBalanceRequest = @@ -49,9 +49,9 @@ public void futuresAccountBalanceExampleAsync() { } /** - * Futures Account Balance(USER_DATA) + * Futures Account Balance (USER_DATA) * - *

Query account balance info Weight: 5 + *

Futures Account Balance Weight(IP): 5 Security Type: USER_DATA */ public void futuresAccountBalanceExampleSync() { FuturesAccountBalanceRequest futuresAccountBalanceRequest = diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/FuturesAccountBalanceV2Example.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/FuturesAccountBalanceV2Example.java index 9df91db2a..c2e75a41b 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/FuturesAccountBalanceV2Example.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/account/FuturesAccountBalanceV2Example.java @@ -29,9 +29,9 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { } /** - * Futures Account Balance V2(USER_DATA) + * Futures Account Balance V2 (USER_DATA) * - *

Query account balance info Weight: 5 + *

Futures Account Balance V2 Weight(IP): 5 Security Type: USER_DATA */ public void futuresAccountBalanceV2ExampleAsync() { FuturesAccountBalanceV2Request futuresAccountBalanceV2Request = @@ -49,9 +49,9 @@ public void futuresAccountBalanceV2ExampleAsync() { } /** - * Futures Account Balance V2(USER_DATA) + * Futures Account Balance V2 (USER_DATA) * - *

Query account balance info Weight: 5 + *

Futures Account Balance V2 Weight(IP): 5 Security Type: USER_DATA */ public void futuresAccountBalanceV2ExampleSync() { FuturesAccountBalanceV2Request futuresAccountBalanceV2Request = diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/OrderBookExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/OrderBookExample.java index 7a166eec9..8ea2a1723 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/OrderBookExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/OrderBookExample.java @@ -35,13 +35,13 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { * to continuously monitor order book updates, please consider using Websocket Market Streams: * * `<symbol>@depth<levels>` * `<symbol>@depth` You can use * `depth` request together with `<symbol>@depth` streams to maintain - * a local order book. Retail Price Improvement(RPI) orders are not visible and excluded in the - * response message. Weight: Adjusted based on the limit: | Limit | Weight | | ------------- | - * ------ | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | 20 | + * a local order book. **Note:** - Retail Price Improvement(RPI) orders are not visible and + * excluded in the response message. Weight: Adjusted based on the limit: | Limit | Weight | | + * ------------- | ------ | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | 20 | */ public void orderBookExampleAsync() { OrderBookRequest orderBookRequest = new OrderBookRequest(); - orderBookRequest.symbol(""); + orderBookRequest.symbol("BTCUSDT"); CompletableFuture future = getApi().orderBook(orderBookRequest); future.handle( (response, error) -> { @@ -60,13 +60,13 @@ public void orderBookExampleAsync() { * to continuously monitor order book updates, please consider using Websocket Market Streams: * * `<symbol>@depth<levels>` * `<symbol>@depth` You can use * `depth` request together with `<symbol>@depth` streams to maintain - * a local order book. Retail Price Improvement(RPI) orders are not visible and excluded in the - * response message. Weight: Adjusted based on the limit: | Limit | Weight | | ------------- | - * ------ | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | 20 | + * a local order book. **Note:** - Retail Price Improvement(RPI) orders are not visible and + * excluded in the response message. Weight: Adjusted based on the limit: | Limit | Weight | | + * ------------- | ------ | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | 20 | */ public void orderBookExampleSync() { OrderBookRequest orderBookRequest = new OrderBookRequest(); - orderBookRequest.symbol(""); + orderBookRequest.symbol("BTCUSDT"); CompletableFuture future = getApi().orderBook(orderBookRequest); OrderBookResponse response = future.join(); System.out.println(response); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/SymbolOrderBookTickerExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/SymbolOrderBookTickerExample.java index 5b513b765..c7b4e14e4 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/SymbolOrderBookTickerExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/SymbolOrderBookTickerExample.java @@ -31,11 +31,12 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { /** * Symbol Order Book Ticker * - *

Best price/qty on the order book for a symbol or symbols. Retail Price Improvement(RPI) - * orders are not visible and excluded in the response message. * If the symbol is not sent, - * bookTickers for all symbols will be returned in an array. * The field + *

Best price/qty on the order book for a symbol or symbols. **Note:** - Retail Price + * Improvement(RPI) orders are not visible and excluded in the response message. Weight: **2** + * for a single symbol; **5** when the symbol parameter is omitted Notes: - If the symbol is not + * sent, bookTickers for all symbols will be returned in an array. - The field * `X-MBX-USED-WEIGHT-1M` in response header is not accurate from this endpoint, - * please ignore. Weight: 2 for a single symbol; 5 when the symbol parameter is omitted + * please ignore. */ public void symbolOrderBookTickerExampleAsync() { SymbolOrderBookTickerRequest symbolOrderBookTickerRequest = @@ -55,11 +56,12 @@ public void symbolOrderBookTickerExampleAsync() { /** * Symbol Order Book Ticker * - *

Best price/qty on the order book for a symbol or symbols. Retail Price Improvement(RPI) - * orders are not visible and excluded in the response message. * If the symbol is not sent, - * bookTickers for all symbols will be returned in an array. * The field + *

Best price/qty on the order book for a symbol or symbols. **Note:** - Retail Price + * Improvement(RPI) orders are not visible and excluded in the response message. Weight: **2** + * for a single symbol; **5** when the symbol parameter is omitted Notes: - If the symbol is not + * sent, bookTickers for all symbols will be returned in an array. - The field * `X-MBX-USED-WEIGHT-1M` in response header is not accurate from this endpoint, - * please ignore. Weight: 2 for a single symbol; 5 when the symbol parameter is omitted + * please ignore. */ public void symbolOrderBookTickerExampleSync() { SymbolOrderBookTickerRequest symbolOrderBookTickerRequest = diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/SymbolPriceTickerExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/SymbolPriceTickerExample.java index c5308c2ab..2ac79a35b 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/SymbolPriceTickerExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/marketdata/SymbolPriceTickerExample.java @@ -31,9 +31,9 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { /** * Symbol Price Ticker * - *

Latest price for a symbol or symbols. * If the symbol is not sent, prices for all symbols - * will be returned in an array. Weight: 1 for a single symbol; 2 when the symbol parameter is - * omitted + *

Latest price for a symbol or symbols. Weight: **1** for a single symbol; **2** when the + * symbol parameter is omitted Notes: - If the symbol is not sent, prices for all symbols will + * be returned in an array. */ public void symbolPriceTickerExampleAsync() { SymbolPriceTickerRequest symbolPriceTickerRequest = new SymbolPriceTickerRequest(); @@ -52,9 +52,9 @@ public void symbolPriceTickerExampleAsync() { /** * Symbol Price Ticker * - *

Latest price for a symbol or symbols. * If the symbol is not sent, prices for all symbols - * will be returned in an array. Weight: 1 for a single symbol; 2 when the symbol parameter is - * omitted + *

Latest price for a symbol or symbols. Weight: **1** for a single symbol; **2** when the + * symbol parameter is omitted Notes: - If the symbol is not sent, prices for all symbols will + * be returned in an array. */ public void symbolPriceTickerExampleSync() { SymbolPriceTickerRequest symbolPriceTickerRequest = new SymbolPriceTickerRequest(); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/CancelAlgoOrderExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/CancelAlgoOrderExample.java index 17558c517..d91c574a6 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/CancelAlgoOrderExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/CancelAlgoOrderExample.java @@ -31,8 +31,8 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { /** * Cancel Algo Order (TRADE) * - *

Cancel an active algo order. * Either `algoId` or `clientAlgoId` must - * be sent. Weight: 1 + *

Cancel an active algo order. Weight(IP): 1 Security Type: TRADE Notes: - Either + * `algoId` or `clientAlgoId` must be sent. */ public void cancelAlgoOrderExampleAsync() { CancelAlgoOrderRequest cancelAlgoOrderRequest = new CancelAlgoOrderRequest(); @@ -51,8 +51,8 @@ public void cancelAlgoOrderExampleAsync() { /** * Cancel Algo Order (TRADE) * - *

Cancel an active algo order. * Either `algoId` or `clientAlgoId` must - * be sent. Weight: 1 + *

Cancel an active algo order. Weight(IP): 1 Security Type: TRADE Notes: - Either + * `algoId` or `clientAlgoId` must be sent. */ public void cancelAlgoOrderExampleSync() { CancelAlgoOrderRequest cancelAlgoOrderRequest = new CancelAlgoOrderRequest(); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/CancelOrderExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/CancelOrderExample.java index 98e101f1f..2e5e267cb 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/CancelOrderExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/CancelOrderExample.java @@ -31,12 +31,12 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { /** * Cancel Order (TRADE) * - *

Cancel an active order. * Either `orderId` or `origClientOrderId` must - * be sent. Weight: 1 + *

Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent. */ public void cancelOrderExampleAsync() { CancelOrderRequest cancelOrderRequest = new CancelOrderRequest(); - cancelOrderRequest.symbol(""); + cancelOrderRequest.symbol("BTCUSDT"); CompletableFuture future = getApi().cancelOrder(cancelOrderRequest); future.handle( (response, error) -> { @@ -51,12 +51,12 @@ public void cancelOrderExampleAsync() { /** * Cancel Order (TRADE) * - *

Cancel an active order. * Either `orderId` or `origClientOrderId` must - * be sent. Weight: 1 + *

Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: - Either + * `orderId` or `origClientOrderId` must be sent. */ public void cancelOrderExampleSync() { CancelOrderRequest cancelOrderRequest = new CancelOrderRequest(); - cancelOrderRequest.symbol(""); + cancelOrderRequest.symbol("BTCUSDT"); CompletableFuture future = getApi().cancelOrder(cancelOrderRequest); CancelOrderResponse response = future.join(); System.out.println(response); 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 0d7a1a926..8efb26a54 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 @@ -33,21 +33,22 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { * Modify Order (TRADE) * *

Order modify function, currently only LIMIT order modification is supported, modified - * orders will be reordered in the match queue * Either `orderId` or + * 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 `orderId` or * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. * Both `quantity` and `price` must be sent, which is different - * from dapi modify order endpoint. * When the new `quantity` or `price` - * doesn'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 - * `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 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) + * are sent. - Both `quantity` and `price` must be sent. *(After CM + * migration, the dapi modify order endpoint follows the same rule.)* - When the new + * `quantity` or `price` doesn'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 `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 */ public void modifyOrderExampleAsync() { ModifyOrderRequest modifyOrderRequest = new ModifyOrderRequest(); - modifyOrderRequest.symbol(""); + modifyOrderRequest.symbol("BTCUSDT"); modifyOrderRequest.side(Side.BUY); modifyOrderRequest.quantity(1.0d); modifyOrderRequest.price(1.0d); @@ -66,21 +67,22 @@ public void modifyOrderExampleAsync() { * Modify Order (TRADE) * *

Order modify function, currently only LIMIT order modification is supported, modified - * orders will be reordered in the match queue * Either `orderId` or + * 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 `orderId` or * `origClientOrderId` must be sent, and the `orderId` will prevail if both - * are sent. * Both `quantity` and `price` must be sent, which is different - * from dapi modify order endpoint. * When the new `quantity` or `price` - * doesn'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 - * `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 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) + * are sent. - Both `quantity` and `price` must be sent. *(After CM + * migration, the dapi modify order endpoint follows the same rule.)* - When the new + * `quantity` or `price` doesn'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 `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 */ public void modifyOrderExampleSync() { ModifyOrderRequest modifyOrderRequest = new ModifyOrderRequest(); - modifyOrderRequest.symbol(""); + modifyOrderRequest.symbol("BTCUSDT"); modifyOrderRequest.side(Side.BUY); modifyOrderRequest.quantity(1.0d); modifyOrderRequest.price(1.0d); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/NewAlgoOrderExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/NewAlgoOrderExample.java index 1dfa8bfba..01cadd6e1 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/NewAlgoOrderExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/NewAlgoOrderExample.java @@ -4,8 +4,10 @@ import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.DerivativesTradingUsdsFuturesWebSocketApiUtil; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.api.DerivativesTradingUsdsFuturesWebSocketApi; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.AlgoType; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.NewAlgoOrderRequest; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.NewAlgoOrderResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.OrderType; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.Side; import java.util.concurrent.CompletableFuture; @@ -30,45 +32,46 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { } /** - * New Algo Order(TRADE) + * New Algo Order (TRADE) * - *

Send in a new algo order. * Condition orders will be triggered when: * If - * parameter`priceProtect`is sent as true: * when price reaches the - * `triggerPrice` ,the difference rate between \"MARK_PRICE\" and - * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * `TAKE_PROFIT`, - * `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * SELL: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest price after - * order placed <= `activatePrice`, and the latest price >= the lowest - * price * (1 + `callbackRate`) * SELL: the highest price after order placed - * >= `activatePrice`, and the latest price <= the highest price * (1 - * - `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error - * code. ``{\"code\": -2021, \"msg\": \"Order would - * immediately trigger.\"}`` means that the parameters you send do not meet the - * following requirements: * BUY: `activatePrice` should be smaller than latest price. - * * SELL: `activatePrice` should be larger than latest price. * + *

Send in a new algo order. Weight(IP): 0 Security Type: TRADE Notes: - Condition orders + * will be triggered when: > - If parameter`priceProtect`is sent as true: - when + * price reaches the `triggerPrice` ,the difference rate between + * \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be larger than the + * \"triggerProtect\" of the symbol - \"triggerProtect\" of a symbol can be + * got from `GET /fapi/v1/exchangeInfo` > - `STOP`, + * `STOP_MARKET`: - BUY: latest price (\"MARK_PRICE\" or + * \"CONTRACT_PRICE\") >= `triggerPrice` - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= + * `triggerPrice` - `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - BUY: + * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= + * `triggerPrice` - SELL: latest price (\"MARK_PRICE\" or + * \"CONTRACT_PRICE\") >= `triggerPrice` - + * `TRAILING_STOP_MARKET`: - BUY: the lowest price after order placed <= + * `activatePrice`, and the latest price >= the lowest price * (1 + + * `callbackRate`) - SELL: the highest price after order placed >= + * `activatePrice`, and the latest price <= the highest price * (1 - + * `callbackRate`) > - For `TRAILING_STOP_MARKET`, if you got such error + * code. > ``{\"code\": -2021, \"msg\": \"Order would + * immediately trigger.\"}`` > means that the parameters you send do not meet + * the following requirements: - BUY: `activatePrice` should be smaller than latest + * price. - SELL: `activatePrice` should be larger than latest price. > - * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` paremeter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with + * `closePosition`=`true`: - Follow the same rules for condition + * orders. - If triggered,**close all** current long position( if `SELL`) or current + * short position( if `BUY`). - Cannot be used with `quantity` paremeter - + * Cannot be used with `reduceOnly` parameter - In Hedge Mode,cannot be used with * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * + * `SELL` orders in `SHORT` position side - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. Weight: 0 + * `IOC` or `GTC` or `GTD`. */ public void newAlgoOrderExampleAsync() { NewAlgoOrderRequest newAlgoOrderRequest = new NewAlgoOrderRequest(); - newAlgoOrderRequest.algoType(""); - newAlgoOrderRequest.symbol(""); + newAlgoOrderRequest.algoType(AlgoType.CONDITIONAL); + newAlgoOrderRequest.symbol("BTCUSDT"); newAlgoOrderRequest.side(Side.BUY); - newAlgoOrderRequest.type(""); + newAlgoOrderRequest.type(OrderType.LIMIT); CompletableFuture future = getApi().newAlgoOrder(newAlgoOrderRequest); future.handle( (response, error) -> { @@ -81,45 +84,46 @@ public void newAlgoOrderExampleAsync() { } /** - * New Algo Order(TRADE) + * New Algo Order (TRADE) * - *

Send in a new algo order. * Condition orders will be triggered when: * If - * parameter`priceProtect`is sent as true: * when price reaches the - * `triggerPrice` ,the difference rate between \"MARK_PRICE\" and - * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * `TAKE_PROFIT`, - * `TAKE_PROFIT_MARKET`: * BUY: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") <= `triggerPrice` * SELL: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= - * `triggerPrice` * `TRAILING_STOP_MARKET`: * BUY: the lowest price after - * order placed <= `activatePrice`, and the latest price >= the lowest - * price * (1 + `callbackRate`) * SELL: the highest price after order placed - * >= `activatePrice`, and the latest price <= the highest price * (1 - * - `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error - * code. ``{\"code\": -2021, \"msg\": \"Order would - * immediately trigger.\"}`` means that the parameters you send do not meet the - * following requirements: * BUY: `activatePrice` should be smaller than latest price. - * * SELL: `activatePrice` should be larger than latest price. * + *

Send in a new algo order. Weight(IP): 0 Security Type: TRADE Notes: - Condition orders + * will be triggered when: > - If parameter`priceProtect`is sent as true: - when + * price reaches the `triggerPrice` ,the difference rate between + * \"MARK_PRICE\" and \"CONTRACT_PRICE\" cannot be larger than the + * \"triggerProtect\" of the symbol - \"triggerProtect\" of a symbol can be + * got from `GET /fapi/v1/exchangeInfo` > - `STOP`, + * `STOP_MARKET`: - BUY: latest price (\"MARK_PRICE\" or + * \"CONTRACT_PRICE\") >= `triggerPrice` - SELL: latest price + * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= + * `triggerPrice` - `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: - BUY: + * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= + * `triggerPrice` - SELL: latest price (\"MARK_PRICE\" or + * \"CONTRACT_PRICE\") >= `triggerPrice` - + * `TRAILING_STOP_MARKET`: - BUY: the lowest price after order placed <= + * `activatePrice`, and the latest price >= the lowest price * (1 + + * `callbackRate`) - SELL: the highest price after order placed >= + * `activatePrice`, and the latest price <= the highest price * (1 - + * `callbackRate`) > - For `TRAILING_STOP_MARKET`, if you got such error + * code. > ``{\"code\": -2021, \"msg\": \"Order would + * immediately trigger.\"}`` > means that the parameters you send do not meet + * the following requirements: - BUY: `activatePrice` should be smaller than latest + * price. - SELL: `activatePrice` should be larger than latest price. > - * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` paremeter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with + * `closePosition`=`true`: - Follow the same rules for condition + * orders. - If triggered,**close all** current long position( if `SELL`) or current + * short position( if `BUY`). - Cannot be used with `quantity` paremeter - + * Cannot be used with `reduceOnly` parameter - In Hedge Mode,cannot be used with * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side * + * `SELL` orders in `SHORT` position side - * `selfTradePreventionMode` is only effective when `timeInForce` set to - * `IOC` or `GTC` or `GTD`. Weight: 0 + * `IOC` or `GTC` or `GTD`. */ public void newAlgoOrderExampleSync() { NewAlgoOrderRequest newAlgoOrderRequest = new NewAlgoOrderRequest(); - newAlgoOrderRequest.algoType(""); - newAlgoOrderRequest.symbol(""); + newAlgoOrderRequest.algoType(AlgoType.CONDITIONAL); + newAlgoOrderRequest.symbol("BTCUSDT"); newAlgoOrderRequest.side(Side.BUY); - newAlgoOrderRequest.type(""); + newAlgoOrderRequest.type(OrderType.LIMIT); CompletableFuture future = getApi().newAlgoOrder(newAlgoOrderRequest); NewAlgoOrderResponse response = future.join(); System.out.println(response); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/NewOrderExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/NewOrderExample.java index a267acf75..90783a9e1 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/NewOrderExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/NewOrderExample.java @@ -6,6 +6,7 @@ import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.api.DerivativesTradingUsdsFuturesWebSocketApi; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.NewOrderRequest; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.NewOrderResponse; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.OrderType; import com.binance.connector.client.derivatives_trading_usds_futures.websocket.api.model.Side; import java.util.concurrent.CompletableFuture; @@ -30,47 +31,24 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { } /** - * New Order(TRADE) + * New Order (TRADE) * - *

Send in a new order. * Order with type `STOP`, parameter `timeInForce` - * can be sent ( default `GTC`). * Order with type `TAKE_PROFIT`, parameter - * `timeInForce` can be sent ( default `GTC`). * Condition orders will be - * triggered when: * If parameter`priceProtect`is sent as true: * when price reaches - * the `stopPrice` ,the difference rate between \"MARK_PRICE\" and - * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed `<= - * `activationPrice`, and the latest price >`= the lowest price * (1 + - * `callbackRate`) * SELL: the highest price after order placed >= - * `activationPrice`, and the latest price <= the highest price * (1 - - * `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. - * ``{\"code\": -2021, \"msg\": \"Order would immediately - * trigger.\"}`` means that the parameters you send do not meet the following - * requirements: * BUY: `activationPrice` should be smaller than latest price. * SELL: - * `activationPrice` should be larger than latest price. * If `newOrderRespType - * ` is sent as `RESULT` : * `MARKET` order: the final FILLED result of - * the order will be return directly. * `LIMIT` order with special - * `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be - * returned directly. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` paremeter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with - * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side Weight: 0 + *

Send in a new order. Weight(IP): 0 Security Type: TRADE Notes: Additional mandatory + * parameters based on `type`: - `LIMIT`: `timeInForce`, + * `quantity`, `price` - `MARKET`: `quantity` > * If + * `newOrderRespType` is sent as `RESULT`: > * `MARKET` order: + * the final FILLED result of the order will be return directly. > * `LIMIT` order + * with special `timeInForce`: the final status result of the order(FILLED or EXPIRED) + * will be returned directly. > > * `selfTradePreventionMode` is only effective + * when `timeInForce` set to `IOC` or `GTC` or `GTD`. + * > * In extreme market conditions, timeInForce `GTD` order auto cancel time might + * be delayed comparing to `goodTillDate` */ public void newOrderExampleAsync() { NewOrderRequest newOrderRequest = new NewOrderRequest(); - newOrderRequest.symbol(""); + newOrderRequest.symbol("BTCUSDT"); newOrderRequest.side(Side.BUY); - newOrderRequest.type(""); + newOrderRequest.type(OrderType.LIMIT); CompletableFuture future = getApi().newOrder(newOrderRequest); future.handle( (response, error) -> { @@ -83,47 +61,24 @@ public void newOrderExampleAsync() { } /** - * New Order(TRADE) + * New Order (TRADE) * - *

Send in a new order. * Order with type `STOP`, parameter `timeInForce` - * can be sent ( default `GTC`). * Order with type `TAKE_PROFIT`, parameter - * `timeInForce` can be sent ( default `GTC`). * Condition orders will be - * triggered when: * If parameter`priceProtect`is sent as true: * when price reaches - * the `stopPrice` ,the difference rate between \"MARK_PRICE\" and - * \"CONTRACT_PRICE\" cannot be larger than the \"triggerProtect\" of the - * symbol * \"triggerProtect\" of a symbol can be got from `GET - * /fapi/v1/exchangeInfo` * `STOP`, `STOP_MARKET`: * BUY: latest price - * (\"MARK_PRICE\" or \"CONTRACT_PRICE\") >= `stopPrice` * - * SELL: latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: * BUY: - * latest price (\"MARK_PRICE\" or \"CONTRACT_PRICE\") <= - * `stopPrice` * SELL: latest price (\"MARK_PRICE\" or - * \"CONTRACT_PRICE\") >= `stopPrice` * - * `TRAILING_STOP_MARKET`: * BUY: the lowest price after order placed `<= - * `activationPrice`, and the latest price >`= the lowest price * (1 + - * `callbackRate`) * SELL: the highest price after order placed >= - * `activationPrice`, and the latest price <= the highest price * (1 - - * `callbackRate`) * For `TRAILING_STOP_MARKET`, if you got such error code. - * ``{\"code\": -2021, \"msg\": \"Order would immediately - * trigger.\"}`` means that the parameters you send do not meet the following - * requirements: * BUY: `activationPrice` should be smaller than latest price. * SELL: - * `activationPrice` should be larger than latest price. * If `newOrderRespType - * ` is sent as `RESULT` : * `MARKET` order: the final FILLED result of - * the order will be return directly. * `LIMIT` order with special - * `timeInForce`: the final status result of the order(FILLED or EXPIRED) will be - * returned directly. * `STOP_MARKET`, `TAKE_PROFIT_MARKET` with - * `closePosition`=`true`: * Follow the same rules for condition - * orders. * If triggered,**close all** current long position( if `SELL`) or current - * short position( if `BUY`). * Cannot be used with `quantity` paremeter * - * Cannot be used with `reduceOnly` parameter * In Hedge Mode,cannot be used with - * `BUY` orders in `LONG` position side. and cannot be used with - * `SELL` orders in `SHORT` position side Weight: 0 + *

Send in a new order. Weight(IP): 0 Security Type: TRADE Notes: Additional mandatory + * parameters based on `type`: - `LIMIT`: `timeInForce`, + * `quantity`, `price` - `MARKET`: `quantity` > * If + * `newOrderRespType` is sent as `RESULT`: > * `MARKET` order: + * the final FILLED result of the order will be return directly. > * `LIMIT` order + * with special `timeInForce`: the final status result of the order(FILLED or EXPIRED) + * will be returned directly. > > * `selfTradePreventionMode` is only effective + * when `timeInForce` set to `IOC` or `GTC` or `GTD`. + * > * In extreme market conditions, timeInForce `GTD` order auto cancel time might + * be delayed comparing to `goodTillDate` */ public void newOrderExampleSync() { NewOrderRequest newOrderRequest = new NewOrderRequest(); - newOrderRequest.symbol(""); + newOrderRequest.symbol("BTCUSDT"); newOrderRequest.side(Side.BUY); - newOrderRequest.type(""); + newOrderRequest.type(OrderType.LIMIT); CompletableFuture future = getApi().newOrder(newOrderRequest); NewOrderResponse response = future.join(); System.out.println(response); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/PositionInformationExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/PositionInformationExample.java index ca8ccd61e..c135bfe5a 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/PositionInformationExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/PositionInformationExample.java @@ -31,8 +31,9 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { /** * Position Information (USER_DATA) * - *

Get current position information. * Please use with user data stream - * `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 5 + *

Get current position information. Weight(IP): 5 Security Type: USER_DATA Notes: - Please + * use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy + * needs. */ public void positionInformationExampleAsync() { PositionInformationRequest positionInformationRequest = new PositionInformationRequest(); @@ -51,8 +52,9 @@ public void positionInformationExampleAsync() { /** * Position Information (USER_DATA) * - *

Get current position information. * Please use with user data stream - * `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. Weight: 5 + *

Get current position information. Weight(IP): 5 Security Type: USER_DATA Notes: - Please + * use with user data stream `ACCOUNT_UPDATE` to meet your timeliness and accuracy + * needs. */ public void positionInformationExampleSync() { PositionInformationRequest positionInformationRequest = new PositionInformationRequest(); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/PositionInformationV2Example.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/PositionInformationV2Example.java index bfce30024..b07324c2d 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/PositionInformationV2Example.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/PositionInformationV2Example.java @@ -32,8 +32,8 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { * Position Information V2 (USER_DATA) * *

Get current position information(only symbol that has position or open orders will be - * returned). * Please use with user data stream `ACCOUNT_UPDATE` to meet your - * timeliness and accuracy needs. Weight: 5 + * returned). Weight(IP): 5 Security Type: USER_DATA Notes: - Please use with user data stream + * `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. */ public void positionInformationV2ExampleAsync() { PositionInformationV2Request positionInformationV2Request = @@ -54,8 +54,8 @@ public void positionInformationV2ExampleAsync() { * Position Information V2 (USER_DATA) * *

Get current position information(only symbol that has position or open orders will be - * returned). * Please use with user data stream `ACCOUNT_UPDATE` to meet your - * timeliness and accuracy needs. Weight: 5 + * returned). Weight(IP): 5 Security Type: USER_DATA Notes: - Please use with user data stream + * `ACCOUNT_UPDATE` to meet your timeliness and accuracy needs. */ public void positionInformationV2ExampleSync() { PositionInformationV2Request positionInformationV2Request = diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/QueryOrderExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/QueryOrderExample.java index f295c1723..ebf78d58f 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/QueryOrderExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/QueryOrderExample.java @@ -33,13 +33,14 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { * *

Check an order's status. * These orders will not be found: * order status is * `CANCELED` or `EXPIRED` **AND** order has NO filled trade **AND** created - * time + 3 days < current time * order create time + 90 days < current time * Either - * `orderId` or `origClientOrderId` must be sent. * `orderId` is - * self-increment for each specific `symbol` Weight: 1 + * time + 3 days < current time * order create time + 90 days < current time Weight(IP): 1 + * Security Type: USER_DATA Notes: Notes: - Either `orderId` or + * `origClientOrderId` must be sent. - `orderId` is self-increment for each + * specific `symbol` */ public void queryOrderExampleAsync() { QueryOrderRequest queryOrderRequest = new QueryOrderRequest(); - queryOrderRequest.symbol(""); + queryOrderRequest.symbol("BTCUSDT"); CompletableFuture future = getApi().queryOrder(queryOrderRequest); future.handle( (response, error) -> { @@ -56,13 +57,14 @@ public void queryOrderExampleAsync() { * *

Check an order's status. * These orders will not be found: * order status is * `CANCELED` or `EXPIRED` **AND** order has NO filled trade **AND** created - * time + 3 days < current time * order create time + 90 days < current time * Either - * `orderId` or `origClientOrderId` must be sent. * `orderId` is - * self-increment for each specific `symbol` Weight: 1 + * time + 3 days < current time * order create time + 90 days < current time Weight(IP): 1 + * Security Type: USER_DATA Notes: Notes: - Either `orderId` or + * `origClientOrderId` must be sent. - `orderId` is self-increment for each + * specific `symbol` */ public void queryOrderExampleSync() { QueryOrderRequest queryOrderRequest = new QueryOrderRequest(); - queryOrderRequest.symbol(""); + queryOrderRequest.symbol("BTCUSDT"); CompletableFuture future = getApi().queryOrder(queryOrderRequest); QueryOrderResponse response = future.join(); System.out.println(response); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/CloseUserDataStreamExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/CloseUserDataStreamExample.java index d70648fa7..5d812d9d2 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/CloseUserDataStreamExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/CloseUserDataStreamExample.java @@ -31,7 +31,7 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { /** * Close User Data Stream (USER_STREAM) * - *

Close out a user data stream. Weight: 1 + *

Close out a user data stream. Weight(IP): 1 Security Type: USER_STREAM */ public void closeUserDataStreamExampleAsync() { CloseUserDataStreamRequest closeUserDataStreamRequest = new CloseUserDataStreamRequest(); @@ -50,7 +50,7 @@ public void closeUserDataStreamExampleAsync() { /** * Close User Data Stream (USER_STREAM) * - *

Close out a user data stream. Weight: 1 + *

Close out a user data stream. Weight(IP): 1 Security Type: USER_STREAM */ public void closeUserDataStreamExampleSync() { CloseUserDataStreamRequest closeUserDataStreamRequest = new CloseUserDataStreamRequest(); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/KeepaliveUserDataStreamExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/KeepaliveUserDataStreamExample.java index d5608ee8b..cbe17bfe9 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/KeepaliveUserDataStreamExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/KeepaliveUserDataStreamExample.java @@ -32,7 +32,8 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { * Keepalive User Data Stream (USER_STREAM) * *

Keepalive a user data stream to prevent a time out. User data streams will close after 60 - * minutes. It's recommended to send a ping about every 60 minutes. Weight: 1 + * minutes. It's recommended to send a ping about every 60 minutes. Weight(IP): 1 Security + * Type: USER_STREAM */ public void keepaliveUserDataStreamExampleAsync() { KeepaliveUserDataStreamRequest keepaliveUserDataStreamRequest = @@ -53,7 +54,8 @@ public void keepaliveUserDataStreamExampleAsync() { * Keepalive User Data Stream (USER_STREAM) * *

Keepalive a user data stream to prevent a time out. User data streams will close after 60 - * minutes. It's recommended to send a ping about every 60 minutes. Weight: 1 + * minutes. It's recommended to send a ping about every 60 minutes. Weight(IP): 1 Security + * Type: USER_STREAM */ public void keepaliveUserDataStreamExampleSync() { KeepaliveUserDataStreamRequest keepaliveUserDataStreamRequest = diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/StartUserDataStreamExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/StartUserDataStreamExample.java index 256233cc9..46f135efd 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/StartUserDataStreamExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/userdatastreams/StartUserDataStreamExample.java @@ -33,7 +33,8 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() { * *

Start a new user data stream. The stream will close after 60 minutes unless a keepalive is * sent. If the account has an active `listenKey`, that `listenKey` will be - * returned and its validity will be extended for 60 minutes. Weight: 1 + * returned and its validity will be extended for 60 minutes. Weight(IP): 1 Security Type: + * USER_STREAM */ public void startUserDataStreamExampleAsync() { StartUserDataStreamRequest startUserDataStreamRequest = new StartUserDataStreamRequest(); @@ -54,7 +55,8 @@ public void startUserDataStreamExampleAsync() { * *

Start a new user data stream. The stream will close after 60 minutes unless a keepalive is * sent. If the account has an active `listenKey`, that `listenKey` will be - * returned and its validity will be extended for 60 minutes. Weight: 1 + * returned and its validity will be extended for 60 minutes. Weight(IP): 1 Security Type: + * USER_STREAM */ public void startUserDataStreamExampleSync() { StartUserDataStreamRequest startUserDataStreamRequest = new StartUserDataStreamRequest(); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AggregateTradeStreamsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AggregateTradeStreamsExample.java index 05fe9bbf2..f28c89575 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AggregateTradeStreamsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AggregateTradeStreamsExample.java @@ -27,15 +27,16 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { *

The Aggregate Trade Streams push market trade information that is aggregated for fills * with same price and taking side every 100 milliseconds. Only market trades will be * aggregated, which means the insurance fund trades and ADL trades won't be aggregated. - * Retail Price Improvement(RPI) orders are aggregated into field `q` and without - * special tags to be distinguished. Update Speed: 100ms + * > **After CM migration**, the payload is appended with a new `st` field + * (`1` = UM, `2` = CM). Update Speed: 100ms Response Notes: - + * Retail Price Improvement(RPI) orders are aggregated into field q and without special tags to + * be distinguished. * * @throws ApiException if the Api call fails */ public void aggregateTradeStreamsExample() throws ApiException, InterruptedException { AggregateTradeStreamsRequest aggregateTradeStreamsRequest = new AggregateTradeStreamsRequest(); - aggregateTradeStreamsRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().aggregateTradeStreams(aggregateTradeStreamsRequest); while (true) { diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AllMarketLiquidationOrderStreamsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AllMarketLiquidationOrderStreamsExample.java index fe54126c1..9de33e266 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AllMarketLiquidationOrderStreamsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AllMarketLiquidationOrderStreamsExample.java @@ -25,9 +25,12 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { * All Market Liquidation Order Streams * *

The All Liquidation Order Snapshot Streams push force liquidation order information for - * all symbols in the market. For each symbol,only the largest one liquidation order within + * all symbols in the market. For each symbol,only the latest one liquidation order within * 1000ms will be pushed as the snapshot. If no liquidation happens in the interval of 1000ms, - * no stream will be pushed. Update Speed: 1000ms + * no stream will be pushed. > **After CM migration**, this stream pushes the merged UM + CM + * universe (subscribable on both `fstream` and `dstream`); each payload is + * appended with a new `st` field (`1` = UM, `2` = CM) + * and a new `ps` field (pair symbol). Update Speed: 1000ms * * @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/stream/market/AllMarketMiniTickersStreamExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AllMarketMiniTickersStreamExample.java index 392f6d6d7..9b484933c 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AllMarketMiniTickersStreamExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AllMarketMiniTickersStreamExample.java @@ -26,7 +26,11 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { * *

24hr rolling window mini-ticker statistics for all symbols. These are NOT the statistics * of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Note that only - * tickers that have changed will be present in the array. Update Speed: 1000ms + * tickers that have changed will be present in the array. > **After CM migration**, this + * stream pushes the merged UM + CM universe (subscribable on both `fstream` and + * `dstream`); each payload is appended with a new `st` field (`1` + * = UM, `2` = CM) and a new `ps` field (pair symbol). Update + * Speed: 1000ms * * @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/stream/market/AllMarketTickersStreamsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AllMarketTickersStreamsExample.java index 9954dfabf..18dac4825 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AllMarketTickersStreamsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AllMarketTickersStreamsExample.java @@ -26,7 +26,11 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { * *

24hr rolling window ticker statistics for all symbols. These are NOT the statistics of the * UTC day, but a 24hr rolling window from requestTime to 24hrs before. Note that only tickers - * that have changed will be present in the array. Update Speed: 1000ms + * that have changed will be present in the array. > **After CM migration**, this stream + * pushes the merged UM + CM universe (subscribable on both `fstream` and + * `dstream`); each payload is appended with a new `st` field (`1` + * = UM, `2` = CM) and a new `ps` field (pair symbol). Update + * Speed: 1000ms * * @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/stream/market/AssetIndexExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AssetIndexExample.java new file mode 100644 index 000000000..4297a0199 --- /dev/null +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/AssetIndexExample.java @@ -0,0 +1,44 @@ +package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.market; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.DerivativesTradingUsdsFuturesWebSocketStreamsUtil; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.api.DerivativesTradingUsdsFuturesWebSocketStreams; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AssetIndexRequest; +import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.AssetIndexResponse; + +/** API examples for MarketApi */ +public class AssetIndexExample { + private DerivativesTradingUsdsFuturesWebSocketStreams api; + + public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + DerivativesTradingUsdsFuturesWebSocketStreamsUtil.getClientConfiguration(); + api = new DerivativesTradingUsdsFuturesWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * Multi-Assets Mode Asset Index + * + *

Asset index price. Subscribe with `!assetIndex@arr` for all assets, or + * `<assetSymbol>@assetIndex` for a specific asset. > **CM-UM Integration + * (Effective 2026-06-30):** Renamed from *Multi-Assets Mode Asset Index*. The stream + * `!assetIndex@arr` now additionally pushes COIN-M settlement-asset price index + * entries (e.g., `BTCUSD`, `ETHUSD`, `BNBUSD`). The on-the-wire + * stream key is unchanged; existing subscriptions continue to work. Update Speed: 1s + * + * @throws ApiException if the Api call fails + */ + public void assetIndexExample() throws ApiException, InterruptedException { + AssetIndexRequest assetIndexRequest = new AssetIndexRequest(); + StreamBlockingQueueWrapper response = + getApi().assetIndex(assetIndexRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/CompositeIndexSymbolInformationStreamsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/CompositeIndexSymbolInformationStreamsExample.java index 1700c75f3..08d18b91a 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/CompositeIndexSymbolInformationStreamsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/CompositeIndexSymbolInformationStreamsExample.java @@ -33,7 +33,6 @@ public void compositeIndexSymbolInformationStreamsExample() CompositeIndexSymbolInformationStreamsRequest compositeIndexSymbolInformationStreamsRequest = new CompositeIndexSymbolInformationStreamsRequest(); - compositeIndexSymbolInformationStreamsRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().compositeIndexSymbolInformationStreams( compositeIndexSymbolInformationStreamsRequest); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/ContinuousContractKlineCandlestickStreamsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/ContinuousContractKlineCandlestickStreamsExample.java index 95ac80f25..2018b0d82 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/ContinuousContractKlineCandlestickStreamsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/ContinuousContractKlineCandlestickStreamsExample.java @@ -24,7 +24,9 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { /** * Continuous Contract Kline/Candlestick Streams * - *

Update Speed: 250ms + *

Continuous Contract Kline/Candlestick Streams > **After CM migration**, both + * `fstream` and `dstream` may subscribe to either UM or CM symbols on this + * stream. Update Speed: 250ms * * @throws ApiException if the Api call fails */ @@ -33,9 +35,6 @@ public void continuousContractKlineCandlestickStreamsExample() ContinuousContractKlineCandlestickStreamsRequest continuousContractKlineCandlestickStreamsRequest = new ContinuousContractKlineCandlestickStreamsRequest(); - continuousContractKlineCandlestickStreamsRequest.pair("btcusdt"); - continuousContractKlineCandlestickStreamsRequest.contractType("next_quarter"); - continuousContractKlineCandlestickStreamsRequest.interval("1m"); StreamBlockingQueueWrapper response = getApi().continuousContractKlineCandlestickStreams( continuousContractKlineCandlestickStreamsRequest); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/ContractInfoStreamExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/ContractInfoStreamExample.java index a02e2d4f5..1ce03e171 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/ContractInfoStreamExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/ContractInfoStreamExample.java @@ -25,8 +25,10 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { * Contract Info Stream * *

ContractInfo stream pushes when contract info updates(listing/settlement/contract bracket - * update). `bks` field only shows up when bracket gets updated. Update Speed: - * Real-time + * update). bks field only shows up when bracket gets updated. > **After CM migration**, this + * stream pushes the merged UM + CM universe (subscribable on both `fstream` and + * `dstream`); each payload is appended with a new `st` field (`1` + * = UM, `2` = CM). Update Speed: Real-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/stream/market/IndividualSymbolMiniTickerStreamExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/IndividualSymbolMiniTickerStreamExample.java index 1532f2a0f..c5e221e6e 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/IndividualSymbolMiniTickerStreamExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/IndividualSymbolMiniTickerStreamExample.java @@ -25,8 +25,10 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { * Individual Symbol Mini Ticker Stream * *

24hr rolling window mini-ticker statistics for a single symbol. These are NOT the - * statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Update - * Speed: 2s + * statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. > + * **After CM migration**, the payload is appended with a new `st` field + * (`1` = UM, `2` = CM) and a new `ps` field (pair + * symbol). Update Speed: 2s * * @throws ApiException if the Api call fails */ @@ -34,7 +36,6 @@ public void individualSymbolMiniTickerStreamExample() throws ApiException, InterruptedException { IndividualSymbolMiniTickerStreamRequest individualSymbolMiniTickerStreamRequest = new IndividualSymbolMiniTickerStreamRequest(); - individualSymbolMiniTickerStreamRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().individualSymbolMiniTickerStream(individualSymbolMiniTickerStreamRequest); while (true) { diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/IndividualSymbolTickerStreamsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/IndividualSymbolTickerStreamsExample.java index 6ebff240a..f5394e9a7 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/IndividualSymbolTickerStreamsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/IndividualSymbolTickerStreamsExample.java @@ -25,14 +25,16 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { * Individual Symbol Ticker Streams * *

24hr rolling window ticker statistics for a single symbol. These are NOT the statistics of - * the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Update Speed: 2000ms + * the UTC day, but a 24hr rolling window from requestTime to 24hrs before. > **After CM + * migration**, the payload is appended with a new `st` field (`1` = + * UM, `2` = CM) and a new `ps` field (pair symbol). Update Speed: + * 2000ms * * @throws ApiException if the Api call fails */ public void individualSymbolTickerStreamsExample() throws ApiException, InterruptedException { IndividualSymbolTickerStreamsRequest individualSymbolTickerStreamsRequest = new IndividualSymbolTickerStreamsRequest(); - individualSymbolTickerStreamsRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().individualSymbolTickerStreams(individualSymbolTickerStreamsRequest); while (true) { diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/KlineCandlestickStreamsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/KlineCandlestickStreamsExample.java index 4391d3ce3..6f7c655b6 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/KlineCandlestickStreamsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/KlineCandlestickStreamsExample.java @@ -25,15 +25,15 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { * Kline/Candlestick Streams * *

The Kline/Candlestick Stream push updates to the current klines/candlestick every 250 - * milliseconds (if existing). Update Speed: 250ms + * milliseconds (if existing). > **After CM migration**, both `fstream` and + * `dstream` may subscribe to either UM or CM symbols on this stream. Update Speed: + * 250ms * * @throws ApiException if the Api call fails */ public void klineCandlestickStreamsExample() throws ApiException, InterruptedException { KlineCandlestickStreamsRequest klineCandlestickStreamsRequest = new KlineCandlestickStreamsRequest(); - klineCandlestickStreamsRequest.symbol("btcusdt"); - klineCandlestickStreamsRequest.interval("1m"); StreamBlockingQueueWrapper response = getApi().klineCandlestickStreams(klineCandlestickStreamsRequest); while (true) { diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/LiquidationOrderStreamsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/LiquidationOrderStreamsExample.java index d6dedd704..8d7d12a8f 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/LiquidationOrderStreamsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/LiquidationOrderStreamsExample.java @@ -25,7 +25,7 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { * Liquidation Order Streams * *

The Liquidation Order Snapshot Streams push force liquidation order information for - * specific symbol. For each symbol,only the largest one liquidation order within 1000ms will be + * specific symbol. For each symbol,only the latest one liquidation order within 1000ms will be * pushed as the snapshot. If no liquidation happens in the interval of 1000ms, no stream will * be pushed. Update Speed: 1000ms * @@ -34,7 +34,6 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { public void liquidationOrderStreamsExample() throws ApiException, InterruptedException { LiquidationOrderStreamsRequest liquidationOrderStreamsRequest = new LiquidationOrderStreamsRequest(); - liquidationOrderStreamsRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().liquidationOrderStreams(liquidationOrderStreamsRequest); while (true) { diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/MarkPriceStreamExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/MarkPriceStreamExample.java index a04c705ec..6412a4d9c 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/MarkPriceStreamExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/MarkPriceStreamExample.java @@ -25,13 +25,14 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { * Mark Price Stream * *

Mark price and funding rate for a single symbol pushed every 3 seconds or every second. - * Update Speed: 3000ms or 1000ms + * > **After CM migration**, the payload is appended with a new `st` field + * (`1` = UM, `2` = CM); both `fstream` and + * `dstream` may subscribe to either UM or CM symbols on this stream. * * @throws ApiException if the Api call fails */ public void markPriceStreamExample() throws ApiException, InterruptedException { MarkPriceStreamRequest markPriceStreamRequest = new MarkPriceStreamRequest(); - markPriceStreamRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().markPriceStream(markPriceStreamRequest); while (true) { diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/MarkPriceStreamForAllMarketExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/MarkPriceStreamForAllMarketExample.java index 7e6f58ec2..f94bda59d 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/MarkPriceStreamForAllMarketExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/MarkPriceStreamForAllMarketExample.java @@ -25,8 +25,10 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { * Mark Price Stream for All market * *

Mark price and funding rate for all symbols pushed every 3 seconds or every second. - * **Note**: TradFi symbols will be pushed through a seperate message. Update Speed: 3000ms or - * 1000ms + * **Note:** - TradFi symbols will be pushed through a seperate message. > **After CM + * migration**, the payload is appended with a new `st` field (`1` = + * UM, `2` = CM); both `fstream` and `dstream` may subscribe + * to either UM or CM symbols on this stream. Update Speed: 3s or 1s * * @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/stream/market/MultiAssetsModeAssetIndexExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/MultiAssetsModeAssetIndexExample.java deleted file mode 100644 index dbafe6cfe..000000000 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/MultiAssetsModeAssetIndexExample.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.market; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; -import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.DerivativesTradingUsdsFuturesWebSocketStreamsUtil; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.api.DerivativesTradingUsdsFuturesWebSocketStreams; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MultiAssetsModeAssetIndexRequest; -import com.binance.connector.client.derivatives_trading_usds_futures.websocket.stream.model.MultiAssetsModeAssetIndexResponse; - -/** API examples for MarketApi */ -public class MultiAssetsModeAssetIndexExample { - private DerivativesTradingUsdsFuturesWebSocketStreams api; - - public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { - if (api == null) { - WebSocketClientConfiguration clientConfiguration = - DerivativesTradingUsdsFuturesWebSocketStreamsUtil.getClientConfiguration(); - api = new DerivativesTradingUsdsFuturesWebSocketStreams(clientConfiguration); - } - return api; - } - - /** - * Multi-Assets Mode Asset Index - * - *

Asset index for multi-assets mode user Update Speed: 1s - * - * @throws ApiException if the Api call fails - */ - public void multiAssetsModeAssetIndexExample() throws ApiException, InterruptedException { - MultiAssetsModeAssetIndexRequest multiAssetsModeAssetIndexRequest = - new MultiAssetsModeAssetIndexRequest(); - StreamBlockingQueueWrapper response = - getApi().multiAssetsModeAssetIndex(multiAssetsModeAssetIndexRequest); - while (true) { - System.out.println(response.take()); - } - } -} 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 03f67584a..9786bef82 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 @@ -24,13 +24,18 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { /** * Trading Session Stream * - *

Trading session information for the underlying assets of TradFi Perpetual - * contracts—covering the U.S. equity market and the commodity market—is updated every second. - * Trading session information for different underlying markets is pushed in separate messages. - * Session types for the equity market include \"PRE_MARKET\", \"REGULAR\", - * \"AFTER_MARKET\", \"OVERNIGHT\", and \"NO_TRADING\". Session - * types for the commodity market include \"REGULAR\" and \"NO_TRADING\". - * 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, 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\", + * \"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\". Update Speed: 1s * * @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/stream/publicpkg/AllBookTickersStreamExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/AllBookTickersStreamExample.java index e9388bf1e..f994ad60d 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/AllBookTickersStreamExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/AllBookTickersStreamExample.java @@ -25,8 +25,11 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { * All Book Tickers Stream * *

Pushes any update to the best bid or ask's price or quantity in real-time for all - * symbols. Retail Price Improvement(RPI) orders are not visible and excluded in the response - * message. Update Speed: 5s + * symbols. > **After CM migration**, this stream pushes the merged UM + CM universe + * (subscribable on both `fstream` and `dstream`); each payload is appended + * with a new `st` field (`1` = UM, `2` = CM) and a new + * `ps` field (pair symbol). Update Speed: 5s Response Notes: - Retail Price + * Improvement(RPI) orders are not visible and excluded in the response message. * * @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/stream/publicpkg/DiffBookDepthStreamsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/DiffBookDepthStreamsExample.java index e7075c823..81987f206 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/DiffBookDepthStreamsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/DiffBookDepthStreamsExample.java @@ -25,14 +25,15 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { * Diff. Book Depth Streams * *

Bids and asks, pushed every 250 milliseconds, 500 milliseconds, 100 milliseconds (if - * existing) Retail Price Improvement(RPI) orders are not visible and excluded in the response - * message. Update Speed: 250ms, 500ms, 100ms + * existing). > **After CM migration**, the payload is appended with a new `st` + * field (`1` = UM, `2` = CM) and a new `ps` field (pair + * symbol). Update Speed: 250ms, 500ms, 100ms Response Notes: - Retail Price Improvement(RPI) + * orders are not visible and excluded in the response message. * * @throws ApiException if the Api call fails */ public void diffBookDepthStreamsExample() throws ApiException, InterruptedException { DiffBookDepthStreamsRequest diffBookDepthStreamsRequest = new DiffBookDepthStreamsRequest(); - diffBookDepthStreamsRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().diffBookDepthStreams(diffBookDepthStreamsRequest); while (true) { diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/IndividualSymbolBookTickerStreamsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/IndividualSymbolBookTickerStreamsExample.java index 722acc178..b67c9252a 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/IndividualSymbolBookTickerStreamsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/IndividualSymbolBookTickerStreamsExample.java @@ -25,8 +25,10 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { * Individual Symbol Book Ticker Streams * *

Pushes any update to the best bid or ask's price or quantity in real-time for a - * specified symbol. Retail Price Improvement(RPI) orders are not visible and excluded in the - * response message. Update Speed: Real-time + * specified symbol. > **After CM migration**, the payload is appended with a new + * `st` field (`1` = UM, `2` = CM). Update Speed: + * Real-time Response Notes: Retail Price Improvement (RPI) orders are not visible and excluded + * in the response message. * * @throws ApiException if the Api call fails */ @@ -34,7 +36,6 @@ public void individualSymbolBookTickerStreamsExample() throws ApiException, InterruptedException { IndividualSymbolBookTickerStreamsRequest individualSymbolBookTickerStreamsRequest = new IndividualSymbolBookTickerStreamsRequest(); - individualSymbolBookTickerStreamsRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().individualSymbolBookTickerStreams( individualSymbolBookTickerStreamsRequest); diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/PartialBookDepthStreamsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/PartialBookDepthStreamsExample.java index 3ff39e6d5..940976e3f 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/PartialBookDepthStreamsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/PartialBookDepthStreamsExample.java @@ -24,17 +24,16 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { /** * Partial Book Depth Streams * - *

Top **<levels\\>** bids and asks, Valid **<levels\\>** are 5, 10, or 20. - * Retail Price Improvement(RPI) orders are not visible and excluded in the response message. - * Update Speed: 250ms, 500ms or 100ms + *

Top <levels> bids and asks > **After CM migration**, the payload is appended with + * a new `st` field (`1` = UM, `2` = CM) and a new + * `ps` field (pair symbol). Update Speed: 250ms or 500ms or 100ms Response Notes: + * Retail Price Improvement (RPI) orders are not visible and excluded in the response message. * * @throws ApiException if the Api call fails */ public void partialBookDepthStreamsExample() throws ApiException, InterruptedException { PartialBookDepthStreamsRequest partialBookDepthStreamsRequest = new PartialBookDepthStreamsRequest(); - partialBookDepthStreamsRequest.symbol("btcusdt"); - partialBookDepthStreamsRequest.levels(10L); StreamBlockingQueueWrapper response = getApi().partialBookDepthStreams(partialBookDepthStreamsRequest); while (true) { diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/RpiDiffBookDepthStreamsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/RpiDiffBookDepthStreamsExample.java index 6a73f7c59..032ed4398 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/RpiDiffBookDepthStreamsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/publicpkg/RpiDiffBookDepthStreamsExample.java @@ -24,18 +24,19 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() { /** * RPI Diff. Book Depth Streams * - *

Bids and asks including RPI orders, pushed every 500 milliseconds RPI(Retail Price - * Improvement) orders are included and aggreated in the response message. When the quantity of - * a price level to be updated is equal to 0, it means either all quotations for this price have - * been filled/canceled, or the quantity of crossed RPI orders for this price are hidden Update - * Speed: 500ms + *

Bids and asks including RPI orders, pushed every 500 milliseconds > **After CM + * migration**, the payload is appended with a new `st` field (`1` = + * UM, `2` = CM) and a new `ps` field (pair symbol). Update Speed: + * 500ms Response Notes: - RPI(Retail Price Improvement) orders are included and aggreated in + * the response message. When the quantity of a price level to be updated is equal to 0, it + * means either all quotations for this price have been filled/canceled, or the quantity of + * crossed RPI orders for this price are hidden * * @throws ApiException if the Api call fails */ public void rpiDiffBookDepthStreamsExample() throws ApiException, InterruptedException { RpiDiffBookDepthStreamsRequest rpiDiffBookDepthStreamsRequest = new RpiDiffBookDepthStreamsRequest(); - rpiDiffBookDepthStreamsRequest.symbol("btcusdt"); StreamBlockingQueueWrapper response = getApi().rpiDiffBookDepthStreams(rpiDiffBookDepthStreamsRequest); while (true) { diff --git a/examples/dual-investment/pom.xml b/examples/dual-investment/pom.xml index b9c8cc8c5..3e000d236 100644 --- a/examples/dual-investment/pom.xml +++ b/examples/dual-investment/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-dual-investment - 2.1.1 + 3.0.0 \ No newline at end of file diff --git a/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/marketdata/GetDualInvestmentProductListExample.java b/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/marketdata/GetDualInvestmentProductListExample.java index 0cb51375d..e662cc07d 100644 --- a/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/marketdata/GetDualInvestmentProductListExample.java +++ b/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/marketdata/GetDualInvestmentProductListExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.dual_investment.rest.DualInvestmentRestApiUtil; import com.binance.connector.client.dual_investment.rest.api.DualInvestmentRestApi; import com.binance.connector.client.dual_investment.rest.model.GetDualInvestmentProductListResponse; +import com.binance.connector.client.dual_investment.rest.model.OptionType; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetDualInvestmentProductListExample { @@ -28,14 +30,14 @@ public DualInvestmentRestApi getApi() { /** * Get Dual Investment product list * - *

Get Dual Investment product list Weight: 1(IP) + *

Get Dual Investment product list Weight(IP): 1 * * @throws ApiException if the Api call fails */ - public void getDualInvestmentProductListExample() throws ApiException { - String optionType = ""; - String exercisedCoin = ""; - String investCoin = ""; + public void getDualInvestmentProductListExample() throws ApiException, IOException { + OptionType optionType = OptionType.CALL; + String exercisedCoin = "USDT"; + String investCoin = "BNB"; Long pageSize = 10L; Long pageIndex = 1L; Long recvWindow = 5000L; diff --git a/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/ChangeAutoCompoundStatusExample.java b/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/ChangeAutoCompoundStatusExample.java index a4d586ebf..4ca23647a 100644 --- a/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/ChangeAutoCompoundStatusExample.java +++ b/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/ChangeAutoCompoundStatusExample.java @@ -6,8 +6,10 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.dual_investment.rest.DualInvestmentRestApiUtil; import com.binance.connector.client.dual_investment.rest.api.DualInvestmentRestApi; +import com.binance.connector.client.dual_investment.rest.model.AutoCompoundPlan; import com.binance.connector.client.dual_investment.rest.model.ChangeAutoCompoundStatusRequest; import com.binance.connector.client.dual_investment.rest.model.ChangeAutoCompoundStatusResponse; +import java.io.IOException; /** API examples for TradeApi */ public class ChangeAutoCompoundStatusExample { @@ -27,16 +29,18 @@ public DualInvestmentRestApi getApi() { } /** - * Change Auto-Compound status(USER_DATA) + * Change Auto-Compound status (USER_DATA) * - *

Change Auto-Compound status Weight: 1(IP) + *

Change Auto-Compound status Weight(IP): 1 Security Type: USER_DATA Notes: - 15:31 ~ 16:00 + * UTC+8: This function is disabled. * * @throws ApiException if the Api call fails */ - public void changeAutoCompoundStatusExample() throws ApiException { + public void changeAutoCompoundStatusExample() throws ApiException, IOException { ChangeAutoCompoundStatusRequest changeAutoCompoundStatusRequest = new ChangeAutoCompoundStatusRequest(); - changeAutoCompoundStatusRequest.positionId("1"); + changeAutoCompoundStatusRequest.positionId("741590"); + changeAutoCompoundStatusRequest.autoCompoundPlan(AutoCompoundPlan.NONE); ApiResponse response = getApi().changeAutoCompoundStatus(changeAutoCompoundStatusRequest); System.out.println(response.getData()); diff --git a/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/CheckDualInvestmentAccountsExample.java b/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/CheckDualInvestmentAccountsExample.java index 3663eac0c..134ba367a 100644 --- a/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/CheckDualInvestmentAccountsExample.java +++ b/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/CheckDualInvestmentAccountsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.dual_investment.rest.DualInvestmentRestApiUtil; import com.binance.connector.client.dual_investment.rest.api.DualInvestmentRestApi; import com.binance.connector.client.dual_investment.rest.model.CheckDualInvestmentAccountsResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CheckDualInvestmentAccountsExample { @@ -26,13 +27,13 @@ public DualInvestmentRestApi getApi() { } /** - * Check Dual Investment accounts(USER_DATA) + * Check Dual Investment accounts (USER_DATA) * - *

Check Dual Investment accounts Weight: 1(IP) + *

Check Dual Investment accounts Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void checkDualInvestmentAccountsExample() throws ApiException { + public void checkDualInvestmentAccountsExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().checkDualInvestmentAccounts(recvWindow); diff --git a/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/GetDualInvestmentPositionsExample.java b/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/GetDualInvestmentPositionsExample.java index 4e69d64b4..cf026a417 100644 --- a/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/GetDualInvestmentPositionsExample.java +++ b/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/GetDualInvestmentPositionsExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.dual_investment.rest.DualInvestmentRestApiUtil; import com.binance.connector.client.dual_investment.rest.api.DualInvestmentRestApi; import com.binance.connector.client.dual_investment.rest.model.GetDualInvestmentPositionsResponse; +import com.binance.connector.client.dual_investment.rest.model.Status; +import java.io.IOException; /** API examples for TradeApi */ public class GetDualInvestmentPositionsExample { @@ -26,14 +28,14 @@ public DualInvestmentRestApi getApi() { } /** - * Get Dual Investment positions(USER_DATA) + * Get Dual Investment positions (USER_DATA) * - *

Get Dual Investment positions (batch) Weight: 1(IP) + *

Get Dual Investment positions (batch) Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getDualInvestmentPositionsExample() throws ApiException { - String status = ""; + public void getDualInvestmentPositionsExample() throws ApiException, IOException { + Status status = Status.PENDING; Long pageSize = 10L; Long pageIndex = 1L; Long recvWindow = 5000L; diff --git a/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/SubscribeDualInvestmentProductsExample.java b/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/SubscribeDualInvestmentProductsExample.java index f5fede89f..ae4528680 100644 --- a/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/SubscribeDualInvestmentProductsExample.java +++ b/examples/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/trade/SubscribeDualInvestmentProductsExample.java @@ -6,8 +6,10 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.dual_investment.rest.DualInvestmentRestApiUtil; import com.binance.connector.client.dual_investment.rest.api.DualInvestmentRestApi; +import com.binance.connector.client.dual_investment.rest.model.AutoCompoundPlan; import com.binance.connector.client.dual_investment.rest.model.SubscribeDualInvestmentProductsRequest; import com.binance.connector.client.dual_investment.rest.model.SubscribeDualInvestmentProductsResponse; +import java.io.IOException; /** API examples for TradeApi */ public class SubscribeDualInvestmentProductsExample { @@ -27,21 +29,21 @@ public DualInvestmentRestApi getApi() { } /** - * Subscribe Dual Investment products(USER_DATA) + * Subscribe Dual Investment products (USER_DATA) * - *

Subscribe Dual Investment products * Products are not available. // this means APR changes - * to lower value, or orders are not unavailable. * Failed. This means System or network errors. - * Weight: 1(IP) + *

Subscribe Dual Investment products Weight(IP): 1 Security Type: USER_DATA Notes: - Failed + * messages: - Products are not available. This means APR changed to a lower value, or the order + * is unavailable. - Failed. This means system or network errors. * * @throws ApiException if the Api call fails */ - public void subscribeDualInvestmentProductsExample() throws ApiException { + public void subscribeDualInvestmentProductsExample() throws ApiException, IOException { SubscribeDualInvestmentProductsRequest subscribeDualInvestmentProductsRequest = new SubscribeDualInvestmentProductsRequest(); - subscribeDualInvestmentProductsRequest.id(""); - subscribeDualInvestmentProductsRequest.orderId("1"); - subscribeDualInvestmentProductsRequest.depositAmount(1.0d); - subscribeDualInvestmentProductsRequest.autoCompoundPlan("NONE"); + subscribeDualInvestmentProductsRequest.id("741590"); + subscribeDualInvestmentProductsRequest.orderId("8257205859"); + subscribeDualInvestmentProductsRequest.depositAmount(1d); + subscribeDualInvestmentProductsRequest.autoCompoundPlan(AutoCompoundPlan.NONE); ApiResponse response = getApi().subscribeDualInvestmentProducts(subscribeDualInvestmentProductsRequest); System.out.println(response.getData()); diff --git a/examples/fiat/pom.xml b/examples/fiat/pom.xml index 82aa34aa6..150f89630 100644 --- a/examples/fiat/pom.xml +++ b/examples/fiat/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-fiat - 2.0.0 + 3.0.0 \ No newline at end of file diff --git a/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/DepositExample.java b/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/DepositExample.java new file mode 100644 index 000000000..f69e452f5 --- /dev/null +++ b/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/DepositExample.java @@ -0,0 +1,53 @@ +package com.binance.connector.client.fiat.rest.defaultpkg; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.fiat.rest.FiatRestApiUtil; +import com.binance.connector.client.fiat.rest.api.FiatRestApi; +import com.binance.connector.client.fiat.rest.model.ApiPaymentMethod; +import com.binance.connector.client.fiat.rest.model.DepositRequest; +import com.binance.connector.client.fiat.rest.model.DepositResponse; +import java.io.IOException; + +/** API examples for DefaultApi */ +public class DepositExample { + private FiatRestApi api; + + public FiatRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = FiatRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new FiatRestApi(clientConfiguration); + } + return api; + } + + /** + * Deposit (TRADE) + * + *

Submit deposit request, in this version, we only support BRL deposit via pix. For BRL + * deposit via pix, you need to place an order before making a transfer from your bank. Before + * calling this api, please make sure you have already completed your KYC or KYB, and already + * activated your fiat service on our website. Weight(UID): 45000 Security Type: TRADE Notes: - + * `timestamp`, `signature` and `recvWindow` are sent as + * query-string parameters, while the business fields (`currency`, + * `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON + * request body with `Content-Type: application/json`. + * + * @throws ApiException if the Api call fails + */ + public void depositExample() throws ApiException, IOException { + DepositRequest depositRequest = new DepositRequest(); + depositRequest.currency("BRL"); + depositRequest.apiPaymentMethod(ApiPaymentMethod.bank_transfer); + depositRequest.amount("1"); + Long recvWindow = 5000L; + ApiResponse response = getApi().deposit(depositRequest, recvWindow); + System.out.println(response.getData()); + } +} diff --git a/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/FiatWithdrawExample.java b/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/FiatWithdrawExample.java new file mode 100644 index 000000000..87756f3d7 --- /dev/null +++ b/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/FiatWithdrawExample.java @@ -0,0 +1,53 @@ +package com.binance.connector.client.fiat.rest.defaultpkg; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.fiat.rest.FiatRestApiUtil; +import com.binance.connector.client.fiat.rest.api.FiatRestApi; +import com.binance.connector.client.fiat.rest.model.ApiPaymentMethod; +import com.binance.connector.client.fiat.rest.model.FiatWithdrawRequest; +import com.binance.connector.client.fiat.rest.model.FiatWithdrawRequestAccountInfo; +import com.binance.connector.client.fiat.rest.model.FiatWithdrawResponse; +import java.io.IOException; + +/** API examples for DefaultApi */ +public class FiatWithdrawExample { + private FiatRestApi api; + + public FiatRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = FiatRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new FiatRestApi(clientConfiguration); + } + return api; + } + + /** + * Fiat Withdraw (TRADE) + * + *

Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via + * bank_transfer. You need to call this api first, and call query order detail api in a loop to + * get the status of the order until this order is successful. Before calling this api, please + * make sure you have already completed your KYC or KYB, and already activated your fiat service + * on our website. Weight(UID): 45000 Security Type: TRADE + * + * @throws ApiException if the Api call fails + */ + public void fiatWithdrawExample() throws ApiException, IOException { + FiatWithdrawRequest fiatWithdrawRequest = new FiatWithdrawRequest(); + fiatWithdrawRequest.currency("BRL"); + fiatWithdrawRequest.apiPaymentMethod(ApiPaymentMethod.bank_transfer); + fiatWithdrawRequest.amount(10L); + fiatWithdrawRequest.accountInfo(new FiatWithdrawRequestAccountInfo()); + Long recvWindow = 5000L; + ApiResponse response = + getApi().fiatWithdraw(fiatWithdrawRequest, recvWindow); + System.out.println(response.getData()); + } +} diff --git a/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/GetFiatDepositWithdrawHistoryExample.java b/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/GetFiatDepositWithdrawHistoryExample.java similarity index 80% rename from examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/GetFiatDepositWithdrawHistoryExample.java rename to examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/GetFiatDepositWithdrawHistoryExample.java index 36af49efe..5731617f3 100644 --- a/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/GetFiatDepositWithdrawHistoryExample.java +++ b/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/GetFiatDepositWithdrawHistoryExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.fiat.rest.fiat; +package com.binance.connector.client.fiat.rest.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -7,8 +7,9 @@ import com.binance.connector.client.fiat.rest.FiatRestApiUtil; import com.binance.connector.client.fiat.rest.api.FiatRestApi; import com.binance.connector.client.fiat.rest.model.GetFiatDepositWithdrawHistoryResponse; +import java.io.IOException; -/** API examples for FiatApi */ +/** API examples for DefaultApi */ public class GetFiatDepositWithdrawHistoryExample { private FiatRestApi api; @@ -27,14 +28,14 @@ public FiatRestApi getApi() { /** * Get Fiat Deposit/Withdraw History (USER_DATA) * - *

Get Fiat Deposit/Withdraw History * If beginTime and endTime are not sent, the recent - * 30-day data will be returned. Weight: 45000 + *

Get Fiat Deposit/Withdraw History Weight(UID): 45000 Security Type: USER_DATA Notes: - If + * `beginTime` and `endTime` are not sent, recent 30-day data is returned. * * @throws ApiException if the Api call fails */ - public void getFiatDepositWithdrawHistoryExample() throws ApiException { - String transactionType = ""; - Long beginTime = 0L; + public void getFiatDepositWithdrawHistoryExample() throws ApiException, IOException { + String transactionType = "0"; + Long beginTime = 1641782889000L; Long endTime = 1641782889000L; Long page = 1L; Long rows = 100L; diff --git a/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/GetFiatPaymentsHistoryExample.java b/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/GetFiatPaymentsHistoryExample.java new file mode 100644 index 000000000..e54baaa84 --- /dev/null +++ b/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/GetFiatPaymentsHistoryExample.java @@ -0,0 +1,51 @@ +package com.binance.connector.client.fiat.rest.defaultpkg; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.fiat.rest.FiatRestApiUtil; +import com.binance.connector.client.fiat.rest.api.FiatRestApi; +import com.binance.connector.client.fiat.rest.model.GetFiatPaymentsHistoryResponse; +import java.io.IOException; + +/** API examples for DefaultApi */ +public class GetFiatPaymentsHistoryExample { + private FiatRestApi api; + + public FiatRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = FiatRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new FiatRestApi(clientConfiguration); + } + return api; + } + + /** + * Get Fiat Payments History (USER_DATA) + * + *

Get Fiat Payments History Weight(IP): 1 Security Type: USER_DATA Notes: - If + * `beginTime` and `endTime` are not sent, recent 30-day data is returned. - + * `paymentMethod` is returned only when querying buy history + * (`transactionType=0`). - Supported payment methods: `Cash Balance`, + * `Credit Card`, `Online Banking`, `Bank Transfer`. + * + * @throws ApiException if the Api call fails + */ + public void getFiatPaymentsHistoryExample() throws ApiException, IOException { + String transactionType = "0"; + Long beginTime = 1641782889000L; + Long endTime = 1641782889000L; + Long page = 1L; + Long rows = 100L; + Long recvWindow = 5000L; + ApiResponse response = + getApi().getFiatPaymentsHistory( + transactionType, beginTime, endTime, page, rows, recvWindow); + System.out.println(response.getData()); + } +} diff --git a/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/GetOrderDetailExample.java b/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/GetOrderDetailExample.java similarity index 82% rename from examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/GetOrderDetailExample.java rename to examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/GetOrderDetailExample.java index 2697733d0..aac9252e4 100644 --- a/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/GetOrderDetailExample.java +++ b/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/defaultpkg/GetOrderDetailExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.fiat.rest.fiat; +package com.binance.connector.client.fiat.rest.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -7,8 +7,9 @@ import com.binance.connector.client.fiat.rest.FiatRestApiUtil; import com.binance.connector.client.fiat.rest.api.FiatRestApi; import com.binance.connector.client.fiat.rest.model.GetOrderDetailResponse; +import java.io.IOException; -/** API examples for FiatApi */ +/** API examples for DefaultApi */ public class GetOrderDetailExample { private FiatRestApi api; @@ -25,15 +26,16 @@ public FiatRestApi getApi() { } /** - * Get Order Detail(USER_DATA) + * Get Order Detail (USER_DATA) * *

Get Order Detail Before calling this api, please make sure you have already completed your - * KYC or KYB, and already activated your fiat service on our website. Weight: 1 + * KYC or KYB, and already activated your fiat service on our website. Weight(IP): 1 Security + * Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getOrderDetailExample() throws ApiException { - String orderNo = ""; + public void getOrderDetailExample() throws ApiException, IOException { + String orderNo = "036752*678"; Long recvWindow = 5000L; ApiResponse response = getApi().getOrderDetail(orderNo, recvWindow); System.out.println(response.getData()); diff --git a/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/DepositExample.java b/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/DepositExample.java deleted file mode 100644 index bcf05112b..000000000 --- a/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/DepositExample.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.binance.connector.client.fiat.rest.fiat; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; -import com.binance.connector.client.fiat.rest.FiatRestApiUtil; -import com.binance.connector.client.fiat.rest.api.FiatRestApi; -import com.binance.connector.client.fiat.rest.model.DepositRequest; -import com.binance.connector.client.fiat.rest.model.DepositResponse; - -/** API examples for FiatApi */ -public class DepositExample { - private FiatRestApi api; - - public FiatRestApi getApi() { - if (api == null) { - ClientConfiguration clientConfiguration = FiatRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - api = new FiatRestApi(clientConfiguration); - } - return api; - } - - /** - * Deposit(TRADE) - * - *

Submit deposit request, in this version, we only support BRL deposit via pix. For BRL - * deposit via pix, you need to place an order before making a transfer from your bank. Before - * calling this api, please make sure you have already completed your KYC or KYB, and already - * activated your fiat service on our website. Weight: 45000 - * - * @throws ApiException if the Api call fails - */ - public void depositExample() throws ApiException { - DepositRequest depositRequest = new DepositRequest(); - depositRequest.currency(""); - depositRequest.apiPaymentMethod(""); - depositRequest.amount(0L); - ApiResponse response = getApi().deposit(depositRequest); - System.out.println(response.getData()); - } -} diff --git a/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/FiatWithdrawExample.java b/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/FiatWithdrawExample.java deleted file mode 100644 index 23a136c50..000000000 --- a/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/FiatWithdrawExample.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.binance.connector.client.fiat.rest.fiat; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; -import com.binance.connector.client.fiat.rest.FiatRestApiUtil; -import com.binance.connector.client.fiat.rest.api.FiatRestApi; -import com.binance.connector.client.fiat.rest.model.AccountInfo; -import com.binance.connector.client.fiat.rest.model.FiatWithdrawRequest; -import com.binance.connector.client.fiat.rest.model.FiatWithdrawResponse; - -/** API examples for FiatApi */ -public class FiatWithdrawExample { - private FiatRestApi api; - - public FiatRestApi getApi() { - if (api == null) { - ClientConfiguration clientConfiguration = FiatRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - api = new FiatRestApi(clientConfiguration); - } - return api; - } - - /** - * Fiat Withdraw(WITHDRAW) - * - *

Submit withdraw request, in this version, we only support BRL withdrawal via - * bank_transfer. You need to call this api first, and call query order detail api in a loop to - * get the status of the order until this order is successful. Before calling this api, please - * make sure you have already completed your KYC or KYB, and already activated your fiat service - * on our website. you need to bind your bank account on web/app before using the corresponding - * account number Weight: 45000 - * - * @throws ApiException if the Api call fails - */ - public void fiatWithdrawExample() throws ApiException { - FiatWithdrawRequest fiatWithdrawRequest = new FiatWithdrawRequest(); - fiatWithdrawRequest.currency(""); - fiatWithdrawRequest.apiPaymentMethod(""); - fiatWithdrawRequest.amount(0L); - fiatWithdrawRequest.accountInfo(new AccountInfo()); - ApiResponse response = getApi().fiatWithdraw(fiatWithdrawRequest); - System.out.println(response.getData()); - } -} diff --git a/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/GetFiatPaymentsHistoryExample.java b/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/GetFiatPaymentsHistoryExample.java deleted file mode 100644 index 93523043e..000000000 --- a/examples/fiat/src/main/java/com/binance/connector/client/fiat/rest/fiat/GetFiatPaymentsHistoryExample.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.binance.connector.client.fiat.rest.fiat; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; -import com.binance.connector.client.fiat.rest.FiatRestApiUtil; -import com.binance.connector.client.fiat.rest.api.FiatRestApi; -import com.binance.connector.client.fiat.rest.model.GetFiatPaymentsHistoryResponse; - -/** API examples for FiatApi */ -public class GetFiatPaymentsHistoryExample { - private FiatRestApi api; - - public FiatRestApi getApi() { - if (api == null) { - ClientConfiguration clientConfiguration = FiatRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - api = new FiatRestApi(clientConfiguration); - } - return api; - } - - /** - * Get Fiat Payments History (USER_DATA) - * - *

Get Fiat Deposit/Withdraw History * If beginTime and endTime are not sent, the recent - * 30-day data will be returned. * paymentMethod: Only when requesting payments history for buy - * (transactionType=0), response contains paymentMethod representing the way of purchase. - * Now we have: * Cash Balance * Credit Card * Online Banking * Bank Transfer Weight: 1 - * - * @throws ApiException if the Api call fails - */ - public void getFiatPaymentsHistoryExample() throws ApiException { - String transactionType = ""; - Long beginTime = 0L; - Long endTime = 1641782889000L; - Long page = 1L; - Long rows = 100L; - Long recvWindow = 5000L; - ApiResponse response = - getApi().getFiatPaymentsHistory( - transactionType, beginTime, endTime, page, rows, recvWindow); - System.out.println(response.getData()); - } -} diff --git a/examples/gift-card/pom.xml b/examples/gift-card/pom.xml index bf374bcac..8d9bfb282 100644 --- a/examples/gift-card/pom.xml +++ b/examples/gift-card/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-gift-card - 1.2.1 + 2.0.0 \ No newline at end of file diff --git a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateADualTokenGiftCardExample.java b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateADualTokenGiftCardExample.java index faab88020..e0c288a12 100644 --- a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateADualTokenGiftCardExample.java +++ b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateADualTokenGiftCardExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.gift_card.rest.api.GiftCardRestApi; import com.binance.connector.client.gift_card.rest.model.CreateADualTokenGiftCardRequest; import com.binance.connector.client.gift_card.rest.model.CreateADualTokenGiftCardResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class CreateADualTokenGiftCardExample { @@ -26,27 +27,27 @@ public GiftCardRestApi getApi() { } /** - * Create a dual-token gift card(fixed value, discount feature)(TRADE) + * Create a dual-token gift card (fixed value, discount feature) (TRADE) * *

* This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You * may create a gift card using USDT as baseToken, that is redeemable to another designated * token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 - * USDT plus 1 USDT fee. This gift card can keep the value fixed at 100 USDT before redemption, + * USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, * and will be redeemable to BTC equivalent to 100 USDT upon redemption. * Once successfully * created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee * would be deducted from your funding wallet. * To get started with, please make sure: * You * have a Binance account * You have passed KYB * You have a sufficient balance(Gift Card amount * and fee amount) in your Binance funding wallet * You need Enable Withdrawals for the API Key - * which requests this endpoint. Weight: 1 + * which requests this endpoint. Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void createADualTokenGiftCardExample() throws ApiException { + public void createADualTokenGiftCardExample() throws ApiException, IOException { CreateADualTokenGiftCardRequest createADualTokenGiftCardRequest = new CreateADualTokenGiftCardRequest(); - createADualTokenGiftCardRequest.baseToken(""); - createADualTokenGiftCardRequest.faceToken(""); - createADualTokenGiftCardRequest.baseTokenAmount(1.0d); + createADualTokenGiftCardRequest.baseToken("BUSD"); + createADualTokenGiftCardRequest.faceToken("BNB"); + createADualTokenGiftCardRequest.baseTokenAmount(1d); ApiResponse response = getApi().createADualTokenGiftCard(createADualTokenGiftCardRequest); System.out.println(response.getData()); diff --git a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateASingleTokenGiftCardExample.java b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateASingleTokenGiftCardExample.java index f8fd4fcbd..faa545098 100644 --- a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateASingleTokenGiftCardExample.java +++ b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateASingleTokenGiftCardExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.gift_card.rest.api.GiftCardRestApi; import com.binance.connector.client.gift_card.rest.model.CreateASingleTokenGiftCardRequest; import com.binance.connector.client.gift_card.rest.model.CreateASingleTokenGiftCardResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class CreateASingleTokenGiftCardExample { @@ -31,15 +32,15 @@ public GiftCardRestApi getApi() { *

This API is for creating a Binance Gift Card. To get started with, please make sure: * You * have a Binance account * You have passed KYB * You have a sufficient balance(Gift Card amount * and fee amount) in your Binance funding wallet * You need `Enable Withdrawals` for - * the API Key which requests this endpoint. Weight: 1 + * the API Key which requests this endpoint. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void createASingleTokenGiftCardExample() throws ApiException { + public void createASingleTokenGiftCardExample() throws ApiException, IOException { CreateASingleTokenGiftCardRequest createASingleTokenGiftCardRequest = new CreateASingleTokenGiftCardRequest(); - createASingleTokenGiftCardRequest.token(""); - createASingleTokenGiftCardRequest.amount(1.0d); + createASingleTokenGiftCardRequest.token("BNB"); + createASingleTokenGiftCardRequest.amount(1d); ApiResponse response = getApi().createASingleTokenGiftCard(createASingleTokenGiftCardRequest); System.out.println(response.getData()); diff --git a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/FetchRsaPublicKeyExample.java b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/FetchRsaPublicKeyExample.java index 3d262d965..fbb67902d 100644 --- a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/FetchRsaPublicKeyExample.java +++ b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/FetchRsaPublicKeyExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.gift_card.rest.GiftCardRestApiUtil; import com.binance.connector.client.gift_card.rest.api.GiftCardRestApi; import com.binance.connector.client.gift_card.rest.model.FetchRsaPublicKeyResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class FetchRsaPublicKeyExample { @@ -25,15 +26,15 @@ public GiftCardRestApi getApi() { } /** - * Fetch RSA Public Key(USER_DATA) + * Fetch RSA Public Key (USER_DATA) * *

This API is for fetching the RSA Public Key. This RSA Public key will be used to encrypt * the card code. **Please note that the RSA Public key fetched is valid only for the current - * day.** Weight: 1 + * day.** Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void fetchRsaPublicKeyExample() throws ApiException { + public void fetchRsaPublicKeyExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().fetchRsaPublicKey(recvWindow); System.out.println(response.getData()); diff --git a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/FetchTokenLimitExample.java b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/FetchTokenLimitExample.java index 378a13f21..6f383b250 100644 --- a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/FetchTokenLimitExample.java +++ b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/FetchTokenLimitExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.gift_card.rest.GiftCardRestApiUtil; import com.binance.connector.client.gift_card.rest.api.GiftCardRestApi; import com.binance.connector.client.gift_card.rest.model.FetchTokenLimitResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class FetchTokenLimitExample { @@ -25,15 +26,16 @@ public GiftCardRestApi getApi() { } /** - * Fetch Token Limit(USER_DATA) + * Fetch Token Limit (USER_DATA) * *

This API is to help you verify which tokens are available for you to create - * Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation. Weight: 1 + * Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation. Weight(IP): + * 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void fetchTokenLimitExample() throws ApiException { - String baseToken = ""; + public void fetchTokenLimitExample() throws ApiException, IOException { + String baseToken = "BUSD"; Long recvWindow = 5000L; ApiResponse response = getApi().fetchTokenLimit(baseToken, recvWindow); diff --git a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/RedeemABinanceGiftCardExample.java b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/RedeemABinanceGiftCardExample.java index 5bbfecaa3..08a0cecd1 100644 --- a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/RedeemABinanceGiftCardExample.java +++ b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/RedeemABinanceGiftCardExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.gift_card.rest.api.GiftCardRestApi; import com.binance.connector.client.gift_card.rest.model.RedeemABinanceGiftCardRequest; import com.binance.connector.client.gift_card.rest.model.RedeemABinanceGiftCardResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class RedeemABinanceGiftCardExample { @@ -26,23 +27,23 @@ public GiftCardRestApi getApi() { } /** - * Redeem a Binance Gift Card(USER_DATA) + * Redeem a Binance Gift Card (USER_DATA) * - *

This API is for redeeming a Binance Gift Card Once redeemed, the coins will be deposited - * in your funding wallet. * Parameter code can be sent in two formats: * Plaintext * Encrypted - * * Sending code in Encrypted format provides more security than sending it as a plaintext. To - * send card code in encrypted format the following steps must be followed: * Fetch RSA public - * key from api stated below. * Use the below algorithm to encrypt the card code using the RSA - * public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding` **A sample code - * snippet (JAVA) is stated below for reference, the same approach can be used for different - * languages like C#, PERL, PYTHON, SHELL etc.:** Weight: 1 + *

This API is for redeeming a Binance Gift Card. Once redeemed, the coins will be deposited + * in your funding wallet. Weight(IP): 1 Security Type: USER_DATA Notes: - Parameter + * `code` can be sent in two formats: `Plaintext` and `Encrypted`. + * - Sending `code` in encrypted format is more secure than plaintext. - To send + * encrypted `code`: - Fetch RSA public key from `GET + * /sapi/v1/giftcard/cryptography/rsa-public-key`. - Encrypt card code using + * `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`. - If you enter the wrong redemption code 5 + * times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day. * * @throws ApiException if the Api call fails */ - public void redeemABinanceGiftCardExample() throws ApiException { + public void redeemABinanceGiftCardExample() throws ApiException, IOException { RedeemABinanceGiftCardRequest redeemABinanceGiftCardRequest = new RedeemABinanceGiftCardRequest(); - redeemABinanceGiftCardRequest.code(""); + redeemABinanceGiftCardRequest.code("6H9EKF5ECCWFBHGE"); ApiResponse response = getApi().redeemABinanceGiftCard(redeemABinanceGiftCardRequest); System.out.println(response.getData()); diff --git a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/VerifyBinanceGiftCardByGiftCardNumberExample.java b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/VerifyBinanceGiftCardByGiftCardNumberExample.java index 65f763509..f2d4baab4 100644 --- a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/VerifyBinanceGiftCardByGiftCardNumberExample.java +++ b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/VerifyBinanceGiftCardByGiftCardNumberExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.gift_card.rest.GiftCardRestApiUtil; import com.binance.connector.client.gift_card.rest.api.GiftCardRestApi; import com.binance.connector.client.gift_card.rest.model.VerifyBinanceGiftCardByGiftCardNumberResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class VerifyBinanceGiftCardByGiftCardNumberExample { @@ -25,16 +26,17 @@ public GiftCardRestApi getApi() { } /** - * Verify Binance Gift Card by Gift Card Number(USER_DATA) + * Verify Binance Gift Card by Gift Card Number (USER_DATA) * *

This API is for verifying whether the Binance Gift Card is valid or not by entering Gift * Card Number. **Please note that if you enter the wrong Gift Card Number 5 times within an - * hour, you will no longer be able to verify any Gift Card Number for that hour.** Weight: 1 + * hour, you will no longer be able to verify any Gift Card Number for that hour.** Weight(IP): + * 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void verifyBinanceGiftCardByGiftCardNumberExample() throws ApiException { - String referenceNo = ""; + public void verifyBinanceGiftCardByGiftCardNumberExample() throws ApiException, IOException { + String referenceNo = "0033002328060227"; Long recvWindow = 5000L; ApiResponse response = getApi().verifyBinanceGiftCardByGiftCardNumber(referenceNo, recvWindow); diff --git a/examples/margin-trading/pom.xml b/examples/margin-trading/pom.xml index 0f7263e30..8a28f4aba 100644 --- a/examples/margin-trading/pom.xml +++ b/examples/margin-trading/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-margin-trading - 6.1.0 + 7.0.0 \ No newline at end of file diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/AdjustCrossMarginMaxLeverageExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/AdjustCrossMarginMaxLeverageExample.java index 405437bfa..c1f463255 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/AdjustCrossMarginMaxLeverageExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/AdjustCrossMarginMaxLeverageExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.AdjustCrossMarginMaxLeverageRequest; import com.binance.connector.client.margin_trading.rest.model.AdjustCrossMarginMaxLeverageResponse; +import java.io.IOException; /** API examples for AccountApi */ public class AdjustCrossMarginMaxLeverageExample { @@ -29,19 +30,19 @@ public MarginTradingRestApi getApi() { /** * Adjust cross margin max leverage (USER_DATA) * - *

Adjust cross margin max leverage * The margin level need higher than the initial risk - * ratio of adjusted leverage, the initial risk ratio of 3x is 1.5 , the initial risk ratio of - * 5x is 1.25; The detail conditions on how to switch between Cross Margin Classic and Cross - * Margin Pro can refer to [the + *

Adjust cross margin max leverage Weight(UID): 3000, 1 times/min per IP Security Type: + * USER_DATA Notes: - The margin level need higher than the initial risk ratio of adjusted + * leverage, the initial risk ratio of 3x is 1.5 , the initial risk ratio of 5x is 1.25; The + * detail conditions on how to switch between Cross Margin Classic and Cross Margin Pro can + * refer to [the * FAQ](https://www.binance.com/en/support/faq/how-to-activate-the-cross-margin-pro-mode-on-binance-e27786da05e743a694b8c625b3bc475d). - * Weight: 3000 * * @throws ApiException if the Api call fails */ - public void adjustCrossMarginMaxLeverageExample() throws ApiException { + public void adjustCrossMarginMaxLeverageExample() throws ApiException, IOException { AdjustCrossMarginMaxLeverageRequest adjustCrossMarginMaxLeverageRequest = new AdjustCrossMarginMaxLeverageRequest(); - adjustCrossMarginMaxLeverageRequest.maxLeverage(0L); + adjustCrossMarginMaxLeverageRequest.maxLeverage(3L); ApiResponse response = getApi().adjustCrossMarginMaxLeverage(adjustCrossMarginMaxLeverageRequest); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/DisableIsolatedMarginAccountExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/DisableIsolatedMarginAccountExample.java index 28a389918..c5e9ce800 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/DisableIsolatedMarginAccountExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/DisableIsolatedMarginAccountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.DisableIsolatedMarginAccountResponse; +import java.io.IOException; /** API examples for AccountApi */ public class DisableIsolatedMarginAccountExample { @@ -29,12 +30,12 @@ public MarginTradingRestApi getApi() { * Disable Isolated Margin Account (TRADE) * *

Disable isolated margin account for a specific symbol. Each trading pair can only be - * deactivated once every 24 hours. Weight: 300(UID) + * deactivated once every 24 hours. Weight(UID): 300 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void disableIsolatedMarginAccountExample() throws ApiException { - String symbol = ""; + public void disableIsolatedMarginAccountExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().disableIsolatedMarginAccount(symbol, recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/EnableIsolatedMarginAccountExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/EnableIsolatedMarginAccountExample.java index 78269612b..6755d9713 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/EnableIsolatedMarginAccountExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/EnableIsolatedMarginAccountExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.EnableIsolatedMarginAccountRequest; import com.binance.connector.client.margin_trading.rest.model.EnableIsolatedMarginAccountResponse; +import java.io.IOException; /** API examples for AccountApi */ public class EnableIsolatedMarginAccountExample { @@ -30,14 +31,14 @@ public MarginTradingRestApi getApi() { * Enable Isolated Margin Account (TRADE) * *

Enable isolated margin account for a specific symbol(Only supports activation of - * previously disabled accounts). Weight: 300(UID) + * previously disabled accounts). Weight(UID): 300 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void enableIsolatedMarginAccountExample() throws ApiException { + public void enableIsolatedMarginAccountExample() throws ApiException, IOException { EnableIsolatedMarginAccountRequest enableIsolatedMarginAccountRequest = new EnableIsolatedMarginAccountRequest(); - enableIsolatedMarginAccountRequest.symbol(""); + enableIsolatedMarginAccountRequest.symbol("BTCUSDT"); ApiResponse response = getApi().enableIsolatedMarginAccount(enableIsolatedMarginAccountRequest); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/GetBnbBurnStatusExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/GetBnbBurnStatusExample.java index 5571b45b8..c4f32be65 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/GetBnbBurnStatusExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/GetBnbBurnStatusExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.GetBnbBurnStatusResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetBnbBurnStatusExample { @@ -28,11 +29,11 @@ public MarginTradingRestApi getApi() { /** * Get BNB Burn Status (USER_DATA) * - *

Get BNB Burn Status Weight: 1(IP) + *

Get BNB Burn Status Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getBnbBurnStatusExample() throws ApiException { + public void getBnbBurnStatusExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getBnbBurnStatus(recvWindow); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/GetSummaryOfMarginAccountExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/GetSummaryOfMarginAccountExample.java index a228c721e..5e1908120 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/GetSummaryOfMarginAccountExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/GetSummaryOfMarginAccountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.GetSummaryOfMarginAccountResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetSummaryOfMarginAccountExample { @@ -28,11 +29,11 @@ public MarginTradingRestApi getApi() { /** * Get Summary of Margin account (USER_DATA) * - *

Get personal margin level information Weight: 10(IP) + *

Get personal margin level information Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getSummaryOfMarginAccountExample() throws ApiException { + public void getSummaryOfMarginAccountExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getSummaryOfMarginAccount(recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossIsolatedMarginCapitalFlowExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossIsolatedMarginCapitalFlowExample.java index 510a9ebba..63de114dd 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossIsolatedMarginCapitalFlowExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossIsolatedMarginCapitalFlowExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.OrderType; import com.binance.connector.client.margin_trading.rest.model.QueryCrossIsolatedMarginCapitalFlowResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryCrossIsolatedMarginCapitalFlowExample { @@ -28,14 +30,18 @@ public MarginTradingRestApi getApi() { /** * Query Cross Isolated Margin Capital Flow (USER_DATA) * - *

Query Cross Isolated Margin Capital Flow Weight: 100(IP) + *

Query Cross Isolated Margin Capital Flow Weight(IP): 100 Security Type: USER_DATA Notes: - + * Only supports querying the data of the last 90 days - The time between startTime and endTime + * cannot be longer than 7 days. - If fromId is set, the data with id > fromId will be + * returned. Otherwise the latest data will be returned - To query isolated data, Symbol needs + * to be entered. * * @throws ApiException if the Api call fails */ - public void queryCrossIsolatedMarginCapitalFlowExample() throws ApiException { - String asset = ""; - String symbol = ""; - String type = ""; + public void queryCrossIsolatedMarginCapitalFlowExample() throws ApiException, IOException { + String asset = "USDT"; + String symbol = "BTCUSDT"; + OrderType type = OrderType.ROLL_IN; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long fromId = 1L; diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossMarginAccountDetailsExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossMarginAccountDetailsExample.java index 3d7816a96..ed62a5f3c 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossMarginAccountDetailsExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossMarginAccountDetailsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.QueryCrossMarginAccountDetailsResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryCrossMarginAccountDetailsExample { @@ -28,11 +29,11 @@ public MarginTradingRestApi getApi() { /** * Query Cross Margin Account Details (USER_DATA) * - *

Query Cross Margin Account Details Weight: 10(IP) + *

Query Cross Margin Account Details Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryCrossMarginAccountDetailsExample() throws ApiException { + public void queryCrossMarginAccountDetailsExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().queryCrossMarginAccountDetails(recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossMarginFeeDataExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossMarginFeeDataExample.java index 6822b0973..c69ee2119 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossMarginFeeDataExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossMarginFeeDataExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.QueryCrossMarginFeeDataResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryCrossMarginFeeDataExample { @@ -29,13 +30,14 @@ public MarginTradingRestApi getApi() { * Query Cross Margin Fee Data (USER_DATA) * *

Get cross margin fee data collection with any vip level or user's current specific - * data as https://www.binance.com/en/margin-fee Weight: 1 when coin is specified;(IP) + * data as https://www.binance.com/en/margin-fee Weight: 1 when coin is specified;(IP) 5 when + * the coin parameter is omitted(IP) Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryCrossMarginFeeDataExample() throws ApiException { + public void queryCrossMarginFeeDataExample() throws ApiException, IOException { Long vipLevel = 1L; - String coin = ""; + String coin = "BTC"; Long recvWindow = 5000L; ApiResponse response = getApi().queryCrossMarginFeeData(vipLevel, coin, recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryEnabledIsolatedMarginAccountLimitExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryEnabledIsolatedMarginAccountLimitExample.java index 054f14f8e..c1e10eb1c 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryEnabledIsolatedMarginAccountLimitExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryEnabledIsolatedMarginAccountLimitExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.QueryEnabledIsolatedMarginAccountLimitResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryEnabledIsolatedMarginAccountLimitExample { @@ -28,11 +29,11 @@ public MarginTradingRestApi getApi() { /** * Query Enabled Isolated Margin Account Limit (USER_DATA) * - *

Query enabled isolated margin account limit. Weight: 1(IP) + *

Query enabled isolated margin account limit. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryEnabledIsolatedMarginAccountLimitExample() throws ApiException { + public void queryEnabledIsolatedMarginAccountLimitExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().queryEnabledIsolatedMarginAccountLimit(recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryIsolatedMarginAccountInfoExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryIsolatedMarginAccountInfoExample.java index 09fd6f10a..8502e5c15 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryIsolatedMarginAccountInfoExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryIsolatedMarginAccountInfoExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.QueryIsolatedMarginAccountInfoResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryIsolatedMarginAccountInfoExample { @@ -28,14 +29,14 @@ public MarginTradingRestApi getApi() { /** * Query Isolated Margin Account Info (USER_DATA) * - *

Query Isolated Margin Account Info * If \"symbols\" is not sent, all isolated - * assets will be returned. * If \"symbols\" is sent, only the isolated assets of the - * sent symbols will be returned. Weight: 10(IP) + *

Query Isolated Margin Account Info Weight(IP): 10 Security Type: USER_DATA Notes: - If + * \"symbols\" is not sent, all isolated assets will be returned. - If + * \"symbols\" is sent, only the isolated assets of the sent symbols will be returned. * * @throws ApiException if the Api call fails */ - public void queryIsolatedMarginAccountInfoExample() throws ApiException { - String symbols = ""; + public void queryIsolatedMarginAccountInfoExample() throws ApiException, IOException { + String symbols = "BTCUSDT,BNBUSDT,ADAUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().queryIsolatedMarginAccountInfo(symbols, recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryIsolatedMarginFeeDataExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryIsolatedMarginFeeDataExample.java index 0d7f9553f..6ff18ebe1 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryIsolatedMarginFeeDataExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryIsolatedMarginFeeDataExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.QueryIsolatedMarginFeeDataResponse; +import java.io.IOException; /** API examples for AccountApi */ public class QueryIsolatedMarginFeeDataExample { @@ -29,13 +30,14 @@ public MarginTradingRestApi getApi() { * Query Isolated Margin Fee Data (USER_DATA) * *

Get isolated margin fee data collection with any vip level or user's current specific - * data as https://www.binance.com/en/margin-fee Weight: 1 when a single is specified;(IP) + * data as https://www.binance.com/en/margin-fee Weight: 1 when a single is specified;(IP) 10 + * when the symbol parameter is omitted(IP) Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryIsolatedMarginFeeDataExample() throws ApiException { + public void queryIsolatedMarginFeeDataExample() throws ApiException, IOException { Long vipLevel = 1L; - String symbol = ""; + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().queryIsolatedMarginFeeData(vipLevel, symbol, recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/GetFutureHourlyInterestRateExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/GetFutureHourlyInterestRateExample.java index 47a5dac3a..6281eda2b 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/GetFutureHourlyInterestRateExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/GetFutureHourlyInterestRateExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.GetFutureHourlyInterestRateResponse; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; +import java.io.IOException; /** API examples for BorrowRepayApi */ public class GetFutureHourlyInterestRateExample { @@ -28,13 +30,13 @@ public MarginTradingRestApi getApi() { /** * Get future hourly interest rate (USER_DATA) * - *

Get future hourly interest rate Weight: 100 + *

Get future hourly interest rate Weight(IP): 100 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getFutureHourlyInterestRateExample() throws ApiException { - String assets = ""; - String isIsolated = "false"; + public void getFutureHourlyInterestRateExample() throws ApiException, IOException { + String assets = "BTC,ETH"; + IsIsolated isIsolated = IsIsolated.TRUE; ApiResponse response = getApi().getFutureHourlyInterestRate(assets, isIsolated); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/GetInterestHistoryExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/GetInterestHistoryExample.java index 65f5f0281..a932988fb 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/GetInterestHistoryExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/GetInterestHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.GetInterestHistoryResponse; +import java.io.IOException; /** API examples for BorrowRepayApi */ public class GetInterestHistoryExample { @@ -28,25 +29,24 @@ public MarginTradingRestApi getApi() { /** * Get Interest History (USER_DATA) * - *

Get Interest History * Response in descending order * If isolatedSymbol is not sent, - * crossed margin data will be returned * The max interval between `startTime` and - * `endTime` is 30 days. It is a MUST to ensure data correctness. * If - * `startTime`and `endTime` not sent, return records of the last 7 days by - * default. * If `startTime` is sent and `endTime` is not sent, return - * records of [max(`startTime`, now-30d), now]. * If `startTime` is not sent - * and `endTime` is sent, return records of [`endTime`-7, - * `endTime`] * `type` in response has 4 enums: * `PERIODIC` - * interest charged per hour * `ON_BORROW` first interest charged on borrow * - * `PERIODIC_CONVERTED` interest charged per hour converted into BNB * - * `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB * - * `PORTFOLIO` interest charged daily on the portfolio margin negative balance Weight: - * 1(IP) + *

Get Interest History Weight(IP): 1 Security Type: USER_DATA Notes: - Response in + * descending order - If isolatedSymbol is not sent, crossed margin data will be returned - The + * max interval between `startTime` and `endTime` is 30 days. It is a MUST + * to ensure data correctness. - If `startTime`and `endTime` not sent, + * return records of the last 7 days by default. - If `startTime` is sent and + * `endTime` is not sent, return records of [max(`startTime`, now-30d), + * now]. - If `startTime` is not sent and `endTime` is sent, return records + * of [`endTime`-7, `endTime`] - `type` in response has 4 enums: - + * `PERIODIC` interest charged per hour - `ON_BORROW` first interest charged + * on borrow - `PERIODIC_CONVERTED` interest charged per hour converted into BNB - + * `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB - + * `PORTFOLIO` interest charged daily on the portfolio margin negative balance * * @throws ApiException if the Api call fails */ - public void getInterestHistoryExample() throws ApiException { - String asset = ""; - String isolatedSymbol = ""; + public void getInterestHistoryExample() throws ApiException, IOException { + String asset = "USDT"; + String isolatedSymbol = "BNBUSDT"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/MarginAccountBorrowRepayExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/MarginAccountBorrowRepayExample.java index 52f348d67..060226da0 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/MarginAccountBorrowRepayExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/MarginAccountBorrowRepayExample.java @@ -6,8 +6,11 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; import com.binance.connector.client.margin_trading.rest.model.MarginAccountBorrowRepayRequest; import com.binance.connector.client.margin_trading.rest.model.MarginAccountBorrowRepayResponse; +import com.binance.connector.client.margin_trading.rest.model.OrderType; +import java.io.IOException; /** API examples for BorrowRepayApi */ public class MarginAccountBorrowRepayExample { @@ -27,20 +30,19 @@ public MarginTradingRestApi getApi() { } /** - * Margin account borrow/repay(MARGIN) + * Margin account borrow/repay (USER_DATA) * - *

Margin account borrow/repay(MARGIN) Weight: 1500 + *

Margin account borrow/repay Weight(UID): 1500 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void marginAccountBorrowRepayExample() throws ApiException { + public void marginAccountBorrowRepayExample() throws ApiException, IOException { MarginAccountBorrowRepayRequest marginAccountBorrowRepayRequest = new MarginAccountBorrowRepayRequest(); - marginAccountBorrowRepayRequest.asset(""); - marginAccountBorrowRepayRequest.isIsolated("false"); - marginAccountBorrowRepayRequest.symbol(""); - marginAccountBorrowRepayRequest.amount(""); - marginAccountBorrowRepayRequest.type(""); + marginAccountBorrowRepayRequest.asset("USDT"); + marginAccountBorrowRepayRequest.isIsolated(IsIsolated.TRUE); + marginAccountBorrowRepayRequest.amount("1.0"); + marginAccountBorrowRepayRequest.type(OrderType.ROLL_IN); ApiResponse response = getApi().marginAccountBorrowRepay(marginAccountBorrowRepayRequest); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryBorrowRepayRecordsInMarginAccountExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryBorrowRepayRecordsInMarginAccountExample.java index 4e95d2a30..f3447dbe1 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryBorrowRepayRecordsInMarginAccountExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryBorrowRepayRecordsInMarginAccountExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.OrderType; import com.binance.connector.client.margin_trading.rest.model.QueryBorrowRepayRecordsInMarginAccountResponse; +import java.io.IOException; /** API examples for BorrowRepayApi */ public class QueryBorrowRepayRecordsInMarginAccountExample { @@ -26,21 +28,22 @@ public MarginTradingRestApi getApi() { } /** - * Query borrow/repay records in Margin account(USER_DATA) + * Query borrow/repay records in Margin account (USER_DATA) * - *

Query borrow/repay records in Margin account * `txId` or `startTime` - * must be sent. `txId` takes precedence. * If an asset is sent, data within 30 days - * before `endTime`; If an asset is not sent, data within 7 days before - * `endTime` * If neither `startTime` nor `endTime` is sent, the - * recent 7-day data will be returned. * `startTime` set as `endTime` - - * 7days by default, `endTime` set as current time by default Weight: 10(IP) + *

Query borrow/repay records in Margin account Weight(IP): 10 Security Type: USER_DATA + * Notes: - `txId` or `startTime` must be sent. `txId` takes + * precedence. - Response in descending order - If an asset is sent, data within 30 days before + * `endTime`; If an asset is not sent, data within 7 days before `endTime` - + * If neither `startTime` nor `endTime` is sent, the recent 7-day data will + * be returned. - `startTime` set as `endTime` - 7 days by default, + * `endTime` set as current time by default * * @throws ApiException if the Api call fails */ - public void queryBorrowRepayRecordsInMarginAccountExample() throws ApiException { - String type = ""; - String asset = ""; - String isolatedSymbol = ""; + public void queryBorrowRepayRecordsInMarginAccountExample() throws ApiException, IOException { + OrderType type = OrderType.ROLL_IN; + String asset = "BNB"; + String isolatedSymbol = "BNBUSDT"; Long txId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryMarginInterestRateHistoryExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryMarginInterestRateHistoryExample.java index 41bed8284..83e97860f 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryMarginInterestRateHistoryExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryMarginInterestRateHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.QueryMarginInterestRateHistoryResponse; +import java.io.IOException; /** API examples for BorrowRepayApi */ public class QueryMarginInterestRateHistoryExample { @@ -28,12 +29,12 @@ public MarginTradingRestApi getApi() { /** * Query Margin Interest Rate History (USER_DATA) * - *

Query Margin Interest Rate History Weight: 1(IP) + *

Query Margin Interest Rate History Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryMarginInterestRateHistoryExample() throws ApiException { - String asset = ""; + public void queryMarginInterestRateHistoryExample() throws ApiException, IOException { + String asset = "BTC"; Long vipLevel = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryMaxBorrowExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryMaxBorrowExample.java index ec028a0a5..9ebb81f19 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryMaxBorrowExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryMaxBorrowExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.QueryMaxBorrowResponse; +import java.io.IOException; /** API examples for BorrowRepayApi */ public class QueryMaxBorrowExample { @@ -28,15 +29,15 @@ public MarginTradingRestApi getApi() { /** * Query Max Borrow (USER_DATA) * - *

Query Max Borrow * If isolatedSymbol is not sent, crossed margin data will be sent. * - * `borrowLimit` is also available from - * [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee) Weight: 50(IP) + *

Query Max Borrow Weight(IP): 50 Security Type: USER_DATA Notes: - If isolatedSymbol is not + * sent, crossed margin data will be sent. - `borrowLimit` is also available from + * [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee) * * @throws ApiException if the Api call fails */ - public void queryMaxBorrowExample() throws ApiException { - String asset = ""; - String isolatedSymbol = ""; + public void queryMaxBorrowExample() throws ApiException, IOException { + String asset = "BTC"; + String isolatedSymbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().queryMaxBorrow(asset, isolatedSymbol, recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/CrossMarginCollateralRatioExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/CrossMarginCollateralRatioExample.java index e61dded1f..8b30ac76b 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/CrossMarginCollateralRatioExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/CrossMarginCollateralRatioExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.CrossMarginCollateralRatioResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class CrossMarginCollateralRatioExample { @@ -28,11 +29,11 @@ public MarginTradingRestApi getApi() { /** * Cross margin collateral ratio (MARKET_DATA) * - *

Cross margin collateral ratio Weight: 100(IP) + *

Cross margin collateral ratio Weight(IP): 100 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ - public void crossMarginCollateralRatioExample() throws ApiException { + public void crossMarginCollateralRatioExample() throws ApiException, IOException { ApiResponse response = getApi().crossMarginCollateralRatio(); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllCrossMarginPairsExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllCrossMarginPairsExample.java index dd4f3470e..6346aa450 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllCrossMarginPairsExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllCrossMarginPairsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.GetAllCrossMarginPairsResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetAllCrossMarginPairsExample { @@ -28,12 +29,12 @@ public MarginTradingRestApi getApi() { /** * Get All Cross Margin Pairs (MARKET_DATA) * - *

Get All Cross Margin Pairs Weight: 1(IP) + *

Get All Cross Margin Pairs Weight(IP): 1 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ - public void getAllCrossMarginPairsExample() throws ApiException { - String symbol = ""; + public void getAllCrossMarginPairsExample() throws ApiException, IOException { + String symbol = "BNBBTC"; ApiResponse response = getApi().getAllCrossMarginPairs(symbol); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllIsolatedMarginSymbolExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllIsolatedMarginSymbolExample.java index ea6bbc67f..5342f20be 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllIsolatedMarginSymbolExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllIsolatedMarginSymbolExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.GetAllIsolatedMarginSymbolResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetAllIsolatedMarginSymbolExample { @@ -26,14 +27,14 @@ public MarginTradingRestApi getApi() { } /** - * Get All Isolated Margin Symbol(MARKET_DATA) + * Get All Isolated Margin Symbol (MARKET_DATA) * - *

Get All Isolated Margin Symbol Weight: 10(IP) + *

Get All Isolated Margin Symbol Weight(IP): 10 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ - public void getAllIsolatedMarginSymbolExample() throws ApiException { - String symbol = ""; + public void getAllIsolatedMarginSymbolExample() throws ApiException, IOException { + String symbol = "BNBBTC"; Long recvWindow = 5000L; ApiResponse response = getApi().getAllIsolatedMarginSymbol(symbol, recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllMarginAssetsExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllMarginAssetsExample.java index 27a51a1a6..236442b6f 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllMarginAssetsExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetAllMarginAssetsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.GetAllMarginAssetsResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetAllMarginAssetsExample { @@ -28,12 +29,12 @@ public MarginTradingRestApi getApi() { /** * Get All Margin Assets (MARKET_DATA) * - *

Get All Margin Assets. Weight: 1(IP) + *

Get All Margin Assets. Weight(IP): 1 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ - public void getAllMarginAssetsExample() throws ApiException { - String asset = ""; + public void getAllMarginAssetsExample() throws ApiException, IOException { + String asset = "USDC"; ApiResponse response = getApi().getAllMarginAssets(asset); System.out.println(response.getData()); } diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetDelistScheduleExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetDelistScheduleExample.java index dfd9b9f2b..83527c561 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetDelistScheduleExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetDelistScheduleExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.GetDelistScheduleResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetDelistScheduleExample { @@ -28,11 +29,12 @@ public MarginTradingRestApi getApi() { /** * Get Delist Schedule (MARKET_DATA) * - *

Get tokens or symbols delist schedule for cross margin and isolated margin Weight: 100 + *

Get tokens or symbols delist schedule for cross margin and isolated margin Weight(IP): 100 + * Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ - public void getDelistScheduleExample() throws ApiException { + public void getDelistScheduleExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getDelistSchedule(recvWindow); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetLimitPricePairsExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetLimitPricePairsExample.java index 68ffde086..62825f00b 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetLimitPricePairsExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetLimitPricePairsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.GetLimitPricePairsResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetLimitPricePairsExample { @@ -26,7 +27,7 @@ public MarginTradingRestApi getApi() { } /** - * Get Limit Price Pairs(MARKET_DATA) + * Get Limit Price Pairs (MARKET_DATA) * *

Query trading pairs with restriction on limit price range. In margin trading, you can * place orders with limit price. Limit price should be within (-15%, 15%) of current index @@ -37,11 +38,11 @@ public MarginTradingRestApi getApi() { * order will be rejected with an error message notification if the limit price is 15% below the * index price. Please review the limit price order placing strategy, backtest and calibrate the * planned order size with the trading volume and order book depth to prevent trading loss. - * Weight: 1 + * Weight(IP): 1 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ - public void getLimitPricePairsExample() throws ApiException { + public void getLimitPricePairsExample() throws ApiException, IOException { ApiResponse response = getApi().getLimitPricePairs(); System.out.println(response.getData()); } diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetListScheduleExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetListScheduleExample.java index 3774ae793..f43381ab3 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetListScheduleExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetListScheduleExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.GetListScheduleResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetListScheduleExample { @@ -29,11 +30,11 @@ public MarginTradingRestApi getApi() { * Get list Schedule (MARKET_DATA) * *

Get the upcoming tokens or symbols listing schedule for Cross Margin and Isolated Margin. - * Weight: 100 + * Weight(IP): 100 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ - public void getListScheduleExample() throws ApiException { + public void getListScheduleExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getListSchedule(recvWindow); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetMarginAssetRiskBasedLiquidationRatioExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetMarginAssetRiskBasedLiquidationRatioExample.java index c2548204f..365ee1c1e 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetMarginAssetRiskBasedLiquidationRatioExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetMarginAssetRiskBasedLiquidationRatioExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.GetMarginAssetRiskBasedLiquidationRatioResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetMarginAssetRiskBasedLiquidationRatioExample { @@ -28,11 +29,11 @@ public MarginTradingRestApi getApi() { /** * Get Margin Asset Risk-Based Liquidation Ratio (MARKET_DATA) * - *

Get Margin Asset Risk-Based Liquidation Ratio Weight: 1 + *

Get Margin Asset Risk-Based Liquidation Ratio Weight(IP): 1 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ - public void getMarginAssetRiskBasedLiquidationRatioExample() throws ApiException { + public void getMarginAssetRiskBasedLiquidationRatioExample() throws ApiException, IOException { ApiResponse response = getApi().getMarginAssetRiskBasedLiquidationRatio(); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetMarginRestrictedAssetsExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetMarginRestrictedAssetsExample.java index 4a4e8583f..0766285d1 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetMarginRestrictedAssetsExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetMarginRestrictedAssetsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.GetMarginRestrictedAssetsResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetMarginRestrictedAssetsExample { @@ -28,11 +29,11 @@ public MarginTradingRestApi getApi() { /** * Get Margin Restricted Assets (MARKET_DATA) * - *

Get Margin Restricted Assets Weight: 1 + *

Get the list of margin-restricted assets. Weight(IP): 1 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ - public void getMarginRestrictedAssetsExample() throws ApiException { + public void getMarginRestrictedAssetsExample() throws ApiException, IOException { ApiResponse response = getApi().getMarginRestrictedAssets(); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryIsolatedMarginTierDataExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryIsolatedMarginTierDataExample.java index 88dc8730e..98cf32959 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryIsolatedMarginTierDataExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryIsolatedMarginTierDataExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.QueryIsolatedMarginTierDataResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class QueryIsolatedMarginTierDataExample { @@ -29,13 +30,13 @@ public MarginTradingRestApi getApi() { * Query Isolated Margin Tier Data (USER_DATA) * *

Get isolated margin tier data collection with any tier as - * https://www.binance.com/en/margin-data Weight: 1(IP) + * https://www.binance.com/en/margin-data Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryIsolatedMarginTierDataExample() throws ApiException { - String symbol = ""; - Long tier = 0L; + public void queryIsolatedMarginTierDataExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Long tier = 1L; Long recvWindow = 5000L; ApiResponse response = getApi().queryIsolatedMarginTierData(symbol, tier, recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryLiabilityCoinLeverageBracketInCrossMarginProModeExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryLiabilityCoinLeverageBracketInCrossMarginProModeExample.java index 6bc602a9b..9951e1834 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryLiabilityCoinLeverageBracketInCrossMarginProModeExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryLiabilityCoinLeverageBracketInCrossMarginProModeExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class QueryLiabilityCoinLeverageBracketInCrossMarginProModeExample { @@ -26,13 +27,15 @@ public MarginTradingRestApi getApi() { } /** - * Query Liability Coin Leverage Bracket in Cross Margin Pro Mode(MARKET_DATA) + * Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) * - *

Liability Coin Leverage Bracket in Cross Margin Pro Mode Weight: 1 + *

Liability Coin Leverage Bracket in Cross Margin Pro Mode Weight(IP): 1 Security Type: + * MARKET_DATA * * @throws ApiException if the Api call fails */ - public void queryLiabilityCoinLeverageBracketInCrossMarginProModeExample() throws ApiException { + public void queryLiabilityCoinLeverageBracketInCrossMarginProModeExample() + throws ApiException, IOException { ApiResponse response = getApi().queryLiabilityCoinLeverageBracketInCrossMarginProMode(); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryMarginAvailableInventoryExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryMarginAvailableInventoryExample.java index b69efe4e4..a2da904c6 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryMarginAvailableInventoryExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryMarginAvailableInventoryExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.OrderType; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAvailableInventoryResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class QueryMarginAvailableInventoryExample { @@ -26,14 +28,14 @@ public MarginTradingRestApi getApi() { } /** - * Query Margin Available Inventory(USER_DATA) + * Query Margin Available Inventory (USER_DATA) * - *

Margin available Inventory query Weight: 50 + *

Margin available Inventory query Weight(UID): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryMarginAvailableInventoryExample() throws ApiException { - String type = ""; + public void queryMarginAvailableInventoryExample() throws ApiException, IOException { + OrderType type = OrderType.ROLL_IN; ApiResponse response = getApi().queryMarginAvailableInventory(type); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryMarginPriceindexExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryMarginPriceindexExample.java index 548d42063..5a812af7e 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryMarginPriceindexExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryMarginPriceindexExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.QueryMarginPriceindexResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class QueryMarginPriceindexExample { @@ -28,12 +29,12 @@ public MarginTradingRestApi getApi() { /** * Query Margin PriceIndex (MARKET_DATA) * - *

Query Margin PriceIndex Weight: 10(IP) + *

Query Margin PriceIndex Weight(IP): 10 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ - public void queryMarginPriceindexExample() throws ApiException { - String symbol = ""; + public void queryMarginPriceindexExample() throws ApiException, IOException { + String symbol = "BNBBTC"; ApiResponse response = getApi().queryMarginPriceindex(symbol); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/CreateSpecialKeyExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/CreateSpecialKeyExample.java index 4db7a3de4..6726e1d5a 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/CreateSpecialKeyExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/CreateSpecialKeyExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.CreateSpecialKeyRequest; import com.binance.connector.client.margin_trading.rest.model.CreateSpecialKeyResponse; +import java.io.IOException; /** API examples for TradeApi */ public class CreateSpecialKeyExample { @@ -27,26 +28,45 @@ public MarginTradingRestApi getApi() { } /** - * Create Special Key(Low-Latency Trading)(TRADE) + * Create Special Key(Low-Latency Trading) (TRADE) * - *

- Binance Margin offers low-latency trading through a [special + *

**Eligibility** - Binance Margin offers low-latency trading through a [special * key](https://www.binance.com/en/support/faq/frequently-asked-questions-on-margin-special-api-key-3208663e900d4d2e9fec4140e1832f4e), - * available exclusively to users with VIP level 4 or higher. - If you are VIP level 3 or below, - * please contact your VIP manager for eligibility criterias.** **Supported Products:** - Cross - * Margin - Isolated Margin - Portfolio Margin Pro - Cross Margin Pro (Additional agreement - * required and subject to meeting eligibility criteria) **Unsupported Products:** - Portfolio - * Margin We support several types of API keys: * Ed25519 (recommended) * HMAC * RSA We - * recommend to **use Ed25519 API keys** as it should provide the best performance and security - * out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). For how to generate an - * RSA key pair to send API requests on Binance. Please refer to the document below + * available exclusively to users with VIP level 7 or higher. - If you are VIP level 6 or below, + * please contact your VIP manager for eligibility criterias. - All new Margin Special Key users + * are required to read, understand, and agree to the Margin Special Key Supplemental Product + * Terms at the master account level before creating a Margin Special Key. - Once signed at the + * master account level, the agreement applies to all sub-accounts. The master account and all + * sub-accounts (Cross Margin Classic and Portfolio Margin Pro) are authorized to create a + * Margin Special Key and are subject to the LiquidationLoan policy. For more information, + * please refer to + * [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). + * **Supported Products:** - Cross Margin - Isolated Margin - Portfolio Margin Pro **Unsupported + * Products:** - Portfolio Margin We support several types of API keys: * Ed25519 (recommended) + * * HMAC * RSA We recommend to **use Ed25519 API keys** as it should provide the best + * performance and security out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). + * For how to generate an RSA key pair to send API requests on Binance. Please refer to the + * document below * [FAQ](https://www.binance.com/en/support/faq/how-to-generate-an-rsa-key-pair-to-send-api-requests-on-binance-2b79728f331e43079b27440d9d15c5db) - * . Weight: 1(UID) + * . **How to use the Margin Special Key** - Use the below `sapi` endpoint to create + * your margin special API Key. - For accessing the Cross Margin account, do not send the + * `symbol` parameter. - For accessing the Isolated Margin account(s), pass the + * relevant `symbol` parameter in the API Key creation request. - Use the generated + * API Key (and Secret key, if applicable) to perform margin trading and listenKey generation + * via **Spot** REST API (`https://api.binance.com/api/v3/_*`) endpoints. Read [REST + * API](/products/spot/rest-api#signed-trade-and-user_data-endpoint-security) or [WebSocket + * API](/products/spot/web-socket-api#request-security) documentation to learn how to use + * different API keys You need to enable Permits “Enable Spot & Margin Trading” option for + * the API Key which requests this endpoint. Weight(UID): 1 Security Type: TRADE Response Notes: + * - Error Code Description - **UNSUPPORTED_OPERATION** : Portfolio Margin is an unsupported + * product, please change the account type to a supported margin product. - **Forbidden**: Cross + * Margin Pro accounts require additional agreements, please contact your relationship manager. * * @throws ApiException if the Api call fails */ - public void createSpecialKeyExample() throws ApiException { + public void createSpecialKeyExample() throws ApiException, IOException { CreateSpecialKeyRequest createSpecialKeyRequest = new CreateSpecialKeyRequest(); - createSpecialKeyRequest.apiName(""); + createSpecialKeyRequest.apiName("apiName"); ApiResponse response = getApi().createSpecialKey(createSpecialKeyRequest); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/DeleteSpecialKeyExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/DeleteSpecialKeyExample.java index 064b85b5c..aa259b54d 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/DeleteSpecialKeyExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/DeleteSpecialKeyExample.java @@ -5,6 +5,7 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import java.io.IOException; /** API examples for TradeApi */ public class DeleteSpecialKeyExample { @@ -24,18 +25,24 @@ public MarginTradingRestApi getApi() { } /** - * Delete Special Key(Low-Latency Trading)(TRADE) + * Delete Special Key(Low-Latency Trading) (TRADE) * - *

This only applies to Special Key for Low Latency Trading. If apiKey is given, apiName will - * be ignored. If apiName is given with no apiKey, all apikeys with given apiName will be - * deleted. You need to enable Permits “Enable Spot & Margin Trading” option for the API Key - * which requests this endpoint. Weight: 1(UID) + *

Deleting your Margin Special Key alone does not exit you from the Margin Special Key + * framework or discharge your obligations under the Margin Special Key Supplemental Product + * Terms. To fully exit, you must: 1. Delete your Margin Special Key. 2. Ensure there are no + * outstanding liabilities on the account. 3. Call the Exit Margin Special Key API endpoint. 4. + * Confirm the exit status via the API response. Only after step 4 is completed and the exit + * status is confirmed by Binance will your account revert to standard liquidation logic and no + * longer be subject to the Margin Special Key Supplemental Product Terms. If apiKey is given, + * apiName will be ignored. If apiName is given with no apiKey, all apikeys with given apiName + * will be deleted. You need to enable Permits “Enable Spot & Margin” option for the API Key + * which requests this endpoint. Weight(UID): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void deleteSpecialKeyExample() throws ApiException { - String apiName = ""; - String symbol = ""; + public void deleteSpecialKeyExample() throws ApiException, IOException { + String apiName = "apiName"; + String symbol = "BTCUSDT"; Long recvWindow = 5000L; getApi().deleteSpecialKey(apiName, symbol, recvWindow); } diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/EditIpForSpecialKeyExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/EditIpForSpecialKeyExample.java index 218970bb2..5e3a7f67f 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/EditIpForSpecialKeyExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/EditIpForSpecialKeyExample.java @@ -6,6 +6,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.EditIpForSpecialKeyRequest; +import java.io.IOException; /** API examples for TradeApi */ public class EditIpForSpecialKeyExample { @@ -25,17 +26,17 @@ public MarginTradingRestApi getApi() { } /** - * Edit ip for Special Key(Low-Latency Trading)(TRADE) + * Edit ip for Special Key(Low-Latency Trading) (TRADE) * *

Edit ip restriction. This only applies to Special Key for Low Latency Trading. You need to - * enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this - * endpoint. Weight: 1(UID) + * enable Permits “Enable Spot & Margin” option for the API Key which requests this + * endpoint. Weight(UID): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void editIpForSpecialKeyExample() throws ApiException { + public void editIpForSpecialKeyExample() throws ApiException, IOException { EditIpForSpecialKeyRequest editIpForSpecialKeyRequest = new EditIpForSpecialKeyRequest(); - editIpForSpecialKeyRequest.ip(""); + editIpForSpecialKeyRequest.ip("24.156.99.202"); getApi().editIpForSpecialKey(editIpForSpecialKeyRequest); } } diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/ExitSpecialKeyModeExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/ExitSpecialKeyModeExample.java new file mode 100644 index 000000000..de758c98b --- /dev/null +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/ExitSpecialKeyModeExample.java @@ -0,0 +1,57 @@ +package com.binance.connector.client.margin_trading.rest.trade; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; +import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.ExitSpecialKeyModeRequest; +import java.io.IOException; + +/** API examples for TradeApi */ +public class ExitSpecialKeyModeExample { + private MarginTradingRestApi api; + + public MarginTradingRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = + MarginTradingRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new MarginTradingRestApi(clientConfiguration); + } + return api; + } + + /** + * Exit Special Key Mode (TRADE) + * + *

Exit the Margin Special Key mode for Cross Margin Classic accounts. **All outstanding + * liabilities under the Cross Margin Classic account must be fully repaid before calling this + * endpoint.** Deleting the Margin Special Key alone does not constitute a valid exit. When a + * user creates a Margin Special API Key, the account enters \"Special Key Mode\". + * Upon a successful request, the following actions will be performed atomically: 1. All + * existing Margin Special API Keys under the Cross Margin Classic mode account will be deleted. + * 2. All pre-execution margin checks (including Open-order-loss calculation) will revert to + * standard mode. 3. A cooldown period (default: 24 hours) will be enforced, during which the + * account will not be permitted to create new Margin Special API Keys. For more information, + * please refer to + * [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). + * **Preconditions:** The following conditions must be met; otherwise the request will be + * rejected: - Account type must be **Cross Margin Classic**. - Account must currently be in + * **Special Key Mode**. If not, the request silently succeeds. - Account must **not be in + * liquidation**. - Account must **have no liability**. You need to enable \"Permits Enable + * Spot & Margin Trading\" option for the API Key which requests this endpoint. + * Weight(UID): 10 Security Type: TRADE + * + * @throws ApiException if the Api call fails + */ + public void exitSpecialKeyModeExample() throws ApiException, IOException { + ExitSpecialKeyModeRequest exitSpecialKeyModeRequest = new ExitSpecialKeyModeRequest(); + ApiResponse response = getApi().exitSpecialKeyMode(exitSpecialKeyModeRequest); + System.out.println(response.getData()); + } +} diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetForceLiquidationRecordExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetForceLiquidationRecordExample.java index bca2ee98c..028d166ce 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetForceLiquidationRecordExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetForceLiquidationRecordExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.GetForceLiquidationRecordResponse; +import java.io.IOException; /** API examples for TradeApi */ public class GetForceLiquidationRecordExample { @@ -28,14 +29,15 @@ public MarginTradingRestApi getApi() { /** * Get Force Liquidation Record (USER_DATA) * - *

Get Force Liquidation Record * Response in descending order Weight: 1(IP) + *

Get Force Liquidation Record Weight(IP): 1 Security Type: USER_DATA Notes: - Response in + * descending order * * @throws ApiException if the Api call fails */ - public void getForceLiquidationRecordExample() throws ApiException { + public void getForceLiquidationRecordExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; - String isolatedSymbol = ""; + String isolatedSymbol = "BTCUSDT"; Long current = 1L; Long size = 10L; Long recvWindow = 5000L; diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetSmallLiabilityExchangeCoinListExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetSmallLiabilityExchangeCoinListExample.java index 84744545d..3440acc24 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetSmallLiabilityExchangeCoinListExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetSmallLiabilityExchangeCoinListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.GetSmallLiabilityExchangeCoinListResponse; +import java.io.IOException; /** API examples for TradeApi */ public class GetSmallLiabilityExchangeCoinListExample { @@ -28,11 +29,12 @@ public MarginTradingRestApi getApi() { /** * Get Small Liability Exchange Coin List (USER_DATA) * - *

Query the coins which can be small liability exchange Weight: 100 + *

Query the coins which can be small liability exchange Weight(IP): 100 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ - public void getSmallLiabilityExchangeCoinListExample() throws ApiException { + public void getSmallLiabilityExchangeCoinListExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getSmallLiabilityExchangeCoinList(recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetSmallLiabilityExchangeHistoryExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetSmallLiabilityExchangeHistoryExample.java index 6068ba02c..4595a003b 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetSmallLiabilityExchangeHistoryExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetSmallLiabilityExchangeHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.GetSmallLiabilityExchangeHistoryResponse; +import java.io.IOException; /** API examples for TradeApi */ public class GetSmallLiabilityExchangeHistoryExample { @@ -28,11 +29,11 @@ public MarginTradingRestApi getApi() { /** * Get Small Liability Exchange History (USER_DATA) * - *

Get Small liability Exchange History Weight: 100(UID) + *

Get Small liability Exchange History Weight(UID): 100 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getSmallLiabilityExchangeHistoryExample() throws ApiException { + public void getSmallLiabilityExchangeHistoryExample() throws ApiException, IOException { Long current = 1L; Long size = 10L; Long startTime = 1623319461670L; diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/LiquidationLoanRepayExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/LiquidationLoanRepayExample.java new file mode 100644 index 000000000..b59182ce2 --- /dev/null +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/LiquidationLoanRepayExample.java @@ -0,0 +1,49 @@ +package com.binance.connector.client.margin_trading.rest.trade; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; +import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.LiquidationLoanRepayRequest; +import com.binance.connector.client.margin_trading.rest.model.LiquidationLoanRepayResponse; +import java.io.IOException; + +/** API examples for TradeApi */ +public class LiquidationLoanRepayExample { + private MarginTradingRestApi api; + + public MarginTradingRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = + MarginTradingRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new MarginTradingRestApi(clientConfiguration); + } + return api; + } + + /** + * Liquidation Loan Repay (MARGIN) + * + *

Repays the outstanding cross-margin liquidation loan from the user's spot wallet. A + * liquidation loan represents the account deficit incurred when account equity turns negative + * during liquidation (bankruptcy). The repayment amount must be greater than 0 and cannot + * exceed the remaining loan balance. If the Spot Account has insufficient USDC balance, the + * repayment will fail. Weight(UID): 100 Security Type: MARGIN + * + * @throws ApiException if the Api call fails + */ + public void liquidationLoanRepayExample() throws ApiException, IOException { + LiquidationLoanRepayRequest liquidationLoanRepayRequest = new LiquidationLoanRepayRequest(); + liquidationLoanRepayRequest.asset("USDT"); + liquidationLoanRepayRequest.amount(300.00d); + ApiResponse response = + getApi().liquidationLoanRepay(liquidationLoanRepayRequest); + System.out.println(response.getData()); + } +} diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelAllOpenOrdersOnASymbolExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelAllOpenOrdersOnASymbolExample.java index 38048ef63..72fcaa352 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelAllOpenOrdersOnASymbolExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelAllOpenOrdersOnASymbolExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; import com.binance.connector.client.margin_trading.rest.model.MarginAccountCancelAllOpenOrdersOnASymbolResponse; +import java.io.IOException; /** API examples for TradeApi */ public class MarginAccountCancelAllOpenOrdersOnASymbolExample { @@ -29,13 +31,14 @@ public MarginTradingRestApi getApi() { * Margin Account Cancel all Open Orders on a Symbol (TRADE) * *

Cancels all active orders on a symbol for margin account.<br></br> This - * includes OCO orders. Weight: 1 + * includes OCO orders. Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void marginAccountCancelAllOpenOrdersOnASymbolExample() throws ApiException { - String symbol = ""; - String isIsolated = "false"; + public void marginAccountCancelAllOpenOrdersOnASymbolExample() + throws ApiException, IOException { + String symbol = "BTCUSDT"; + IsIsolated isIsolated = IsIsolated.TRUE; Long recvWindow = 5000L; ApiResponse response = getApi().marginAccountCancelAllOpenOrdersOnASymbol(symbol, isIsolated, recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelOcoExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelOcoExample.java index 13cf485ea..d9310b729 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelOcoExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelOcoExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; import com.binance.connector.client.margin_trading.rest.model.MarginAccountCancelOcoResponse; +import java.io.IOException; /** API examples for TradeApi */ public class MarginAccountCancelOcoExample { @@ -28,14 +30,14 @@ public MarginTradingRestApi getApi() { /** * Margin Account Cancel OCO (TRADE) * - *

Cancel an entire Order List for a margin account. * Canceling an individual leg will - * cancel the entire OCO Weight: 1(UID) + *

Cancel an entire Order List for a margin account. Weight(UID): 1 Security Type: TRADE + * Notes: - Canceling an individual leg will cancel the entire OCO * * @throws ApiException if the Api call fails */ - public void marginAccountCancelOcoExample() throws ApiException { - String symbol = ""; - String isIsolated = "false"; + public void marginAccountCancelOcoExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + IsIsolated isIsolated = IsIsolated.TRUE; Long orderListId = 1L; String listClientOrderId = "1"; String newClientOrderId = "1"; diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelOrderExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelOrderExample.java index 1ff1dab49..a8ba297c6 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelOrderExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountCancelOrderExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; import com.binance.connector.client.margin_trading.rest.model.MarginAccountCancelOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class MarginAccountCancelOrderExample { @@ -28,14 +30,14 @@ public MarginTradingRestApi getApi() { /** * Margin Account Cancel Order (TRADE) * - *

Cancel an active order for margin account. * Either orderId or origClientOrderId must be - * sent. Weight: 10(IP) + *

Cancel an active order for margin account. Weight(IP): 10 Security Type: TRADE Notes: - + * Either orderId or origClientOrderId must be sent. * * @throws ApiException if the Api call fails */ - public void marginAccountCancelOrderExample() throws ApiException { - String symbol = ""; - String isIsolated = "false"; + public void marginAccountCancelOrderExample() throws ApiException, IOException { + String symbol = "LTCBTC"; + IsIsolated isIsolated = IsIsolated.TRUE; Long orderId = 1L; String origClientOrderId = "1"; String newClientOrderId = "1"; diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOcoExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOcoExample.java index 89dacce36..64a04c30e 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOcoExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOcoExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.margin_trading.rest.model.MarginAccountNewOcoRequest; import com.binance.connector.client.margin_trading.rest.model.MarginAccountNewOcoResponse; import com.binance.connector.client.margin_trading.rest.model.Side; +import java.io.IOException; /** API examples for TradeApi */ public class MarginAccountNewOcoExample { @@ -30,15 +31,16 @@ public MarginTradingRestApi getApi() { /** * Margin Account New OCO (TRADE) * - *

Send in a new OCO for a margin account * autoRepayAtCancel is suggested to set as “FALSE” - * to keep liability unrepaid under high frequent new order/cancel order execution Weight: - * 6(UID) + *

Send in a new OCO for a margin account Weight: 6(UID) or 1500(UID) when sideEffectType is + * MARGIN_BUY or AUTO_BORROW_REPAY Security Type: TRADE Notes: - autoRepayAtCancel is suggested + * to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order + * execution * * @throws ApiException if the Api call fails */ - public void marginAccountNewOcoExample() throws ApiException { + public void marginAccountNewOcoExample() throws ApiException, IOException { MarginAccountNewOcoRequest marginAccountNewOcoRequest = new MarginAccountNewOcoRequest(); - marginAccountNewOcoRequest.symbol(""); + marginAccountNewOcoRequest.symbol("LTCBTC"); marginAccountNewOcoRequest.side(Side.BUY); marginAccountNewOcoRequest.quantity(1.0d); marginAccountNewOcoRequest.price(1.0d); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOrderExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOrderExample.java index 7eb867e91..4a37eb6a1 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOrderExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOrderExample.java @@ -8,7 +8,9 @@ import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.MarginAccountNewOrderRequest; import com.binance.connector.client.margin_trading.rest.model.MarginAccountNewOrderResponse; +import com.binance.connector.client.margin_trading.rest.model.OrderType; import com.binance.connector.client.margin_trading.rest.model.Side; +import java.io.IOException; /** API examples for TradeApi */ public class MarginAccountNewOrderExample { @@ -30,17 +32,19 @@ public MarginTradingRestApi getApi() { /** * Margin Account New Order (TRADE) * - *

Post a new order for margin account. * autoRepayAtCancel is suggested to set as “FALSE” to - * keep liability unrepaid under high frequent new order/cancel order execution Weight: 6(UID) + *

Post a new order for margin account. Weight: 6(UID) or 1500(UID) when sideEffectType is + * MARGIN_BUY or AUTO_BORROW_REPAY Security Type: TRADE Notes: - autoRepayAtCancel is suggested + * to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order + * execution * * @throws ApiException if the Api call fails */ - public void marginAccountNewOrderExample() throws ApiException { + public void marginAccountNewOrderExample() throws ApiException, IOException { MarginAccountNewOrderRequest marginAccountNewOrderRequest = new MarginAccountNewOrderRequest(); - marginAccountNewOrderRequest.symbol(""); + marginAccountNewOrderRequest.symbol("BTCUSDT"); marginAccountNewOrderRequest.side(Side.BUY); - marginAccountNewOrderRequest.type(""); + marginAccountNewOrderRequest.type(OrderType.ROLL_IN); ApiResponse response = getApi().marginAccountNewOrder(marginAccountNewOrderRequest); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtoExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtoExample.java index 25041eccb..e6f3baeb3 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtoExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtoExample.java @@ -8,6 +8,11 @@ import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.MarginAccountNewOtoRequest; import com.binance.connector.client.margin_trading.rest.model.MarginAccountNewOtoResponse; +import com.binance.connector.client.margin_trading.rest.model.PendingSide; +import com.binance.connector.client.margin_trading.rest.model.PendingType; +import com.binance.connector.client.margin_trading.rest.model.WorkingSide; +import com.binance.connector.client.margin_trading.rest.model.WorkingType; +import java.io.IOException; /** API examples for TradeApi */ public class MarginAccountNewOtoExample { @@ -41,23 +46,36 @@ public MarginTradingRestApi getApi() { * order as `FILLED` but the pending order will still appear as * `PENDING_NEW`. You need to query the status of the pending order again to see its * updated status. - OTOs add **2 orders** to the unfilled order count, - * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. * - * autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high - * frequent new order/cancel order execution * Depending on the `pendingType` or - * `workingType`, some optional parameters will become mandatory: Weight: 6(UID) + * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight: + * 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: + * TRADE Notes: - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid + * under high frequent new order/cancel order execution - Depending on the + * `pendingType` or `workingType`, some optional - parameters will become + * mandatory: | Type | Additional mandatory parameters | Additional information | | + * -------------------------------------------------------- | + * ------------------------------------------------------------ | ---------------------- | | + * `workingType` = `LIMIT` | `workingTimeInForce` | | | + * `pendingType` = `LIMIT` | `pendingPrice`, + * `pendingTimeInForce` | | | `pendingType` = `STOP_LOSS` or + * `TAKE_PROFIT` | `pendingStopPrice` and/or + * `pendingTrailingDelta` | | | `pendingType` = + * `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT` | `pendingPrice`, + * `pendingStopPrice` and/or `pendingTrailingDelta`, + * `pendingTimeInForce` | | | `pendingTrailingDelta` is provided | + * `pendingPrice` | | * * @throws ApiException if the Api call fails */ - public void marginAccountNewOtoExample() throws ApiException { + public void marginAccountNewOtoExample() throws ApiException, IOException { MarginAccountNewOtoRequest marginAccountNewOtoRequest = new MarginAccountNewOtoRequest(); - marginAccountNewOtoRequest.symbol(""); - marginAccountNewOtoRequest.workingType(""); - marginAccountNewOtoRequest.workingSide(""); + marginAccountNewOtoRequest.symbol("BTCUSDT"); + marginAccountNewOtoRequest.workingType(WorkingType.LIMIT); + marginAccountNewOtoRequest.workingSide(WorkingSide.BUY); marginAccountNewOtoRequest.workingPrice(1.0d); marginAccountNewOtoRequest.workingQuantity(1.0d); marginAccountNewOtoRequest.workingIcebergQty(1.0d); - marginAccountNewOtoRequest.pendingType("Order Types"); - marginAccountNewOtoRequest.pendingSide(""); + marginAccountNewOtoRequest.pendingType(PendingType.LIMIT); + marginAccountNewOtoRequest.pendingSide(PendingSide.BUY); marginAccountNewOtoRequest.pendingQuantity(1.0d); ApiResponse response = getApi().marginAccountNewOto(marginAccountNewOtoRequest); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtocoExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtocoExample.java index 6f0a15a9b..aefd82ca7 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtocoExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtocoExample.java @@ -8,6 +8,11 @@ import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.MarginAccountNewOtocoRequest; import com.binance.connector.client.margin_trading.rest.model.MarginAccountNewOtocoResponse; +import com.binance.connector.client.margin_trading.rest.model.PendingAboveType; +import com.binance.connector.client.margin_trading.rest.model.PendingSide; +import com.binance.connector.client.margin_trading.rest.model.WorkingSide; +import com.binance.connector.client.margin_trading.rest.model.WorkingType; +import java.io.IOException; /** API examples for TradeApi */ public class MarginAccountNewOtocoExample { @@ -36,26 +41,45 @@ public MarginTradingRestApi getApi() { * pending orders (pending above and pending below), forming an OCO pair. The pending orders are * only placed on the order book when the working order gets **fully filled**. - The rules of * the pending above and pending below follow the same rules as the [Order List - * OCO](https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OCO). - - * OTOCOs add **3 orders** against the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` - * filter, and `MAX_NUM_ORDERS` filter. * autoRepayAtCancel is suggested to set as - * “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution * - * Depending on the `pendingAboveType`/`pendingBelowType` or - * `workingType`, some optional parameters will become mandatory: Weight: 6(UID) + * OCO](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco). + * - OTOCOs add **3 orders** against the unfilled order count, + * `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter. Weight: + * 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: + * TRADE Notes: - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid + * under high frequent new order/cancel order execution - Depending on the + * `pendingAboveType`/`pendingBelowType` or `workingType`, some + * optional parameters will become mandatory: | Type | Additional mandatory parameters | + * Additional information | | ------------------------------------ | + * ------------------------------------------------------------ | ---------------------- | | + * `workingType` = `LIMIT` | `workingTimeInForce` | | | + * `pendingAboveType`= `LIMIT_MAKER` | `pendingAbovePrice` | + * | | `pendingAboveType`= `STOP_LOSS` | + * `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta` | | | + * `pendingAboveType`=`STOP_LOSS_LIMIT` | + * `pendingAbovePrice`, `pendingAboveStopPrice` and/or + * `pendingAboveTrailingDelta`, `pendingAboveTimeInForce` | | | + * `pendingBelowType`= `LIMIT_MAKER` | `pendingBelowPrice` | + * | | `pendingBelowType`= `STOP_LOSS` | + * `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta` | | | + * `pendingBelowType`=`STOP_LOSS_LIMIT` | + * `pendingBelowPrice`, `pendingBelowStopPrice` and/or + * `pendingBelowTrailingDelta`, `pendingBelowTimeInForce` | | | + * `pendingAboveTrailingDelta` is provided | `pendingAbovePrice` | | | + * `pendingBelowTrailingDelta` is provided | `pendingBelowPrice` | | * * @throws ApiException if the Api call fails */ - public void marginAccountNewOtocoExample() throws ApiException { + public void marginAccountNewOtocoExample() throws ApiException, IOException { MarginAccountNewOtocoRequest marginAccountNewOtocoRequest = new MarginAccountNewOtocoRequest(); - marginAccountNewOtocoRequest.symbol(""); - marginAccountNewOtocoRequest.workingType(""); - marginAccountNewOtocoRequest.workingSide(""); + marginAccountNewOtocoRequest.symbol("BTCUSDT"); + marginAccountNewOtocoRequest.workingType(WorkingType.LIMIT); + marginAccountNewOtocoRequest.workingSide(WorkingSide.BUY); marginAccountNewOtocoRequest.workingPrice(1.0d); marginAccountNewOtocoRequest.workingQuantity(1.0d); - marginAccountNewOtocoRequest.pendingSide(""); + marginAccountNewOtocoRequest.pendingSide(PendingSide.BUY); marginAccountNewOtocoRequest.pendingQuantity(1.0d); - marginAccountNewOtocoRequest.pendingAboveType(""); + marginAccountNewOtocoRequest.pendingAboveType(PendingAboveType.LIMIT_MAKER); ApiResponse response = getApi().marginAccountNewOtoco(marginAccountNewOtocoRequest); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginManualLiquidationExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginManualLiquidationExample.java index 096497c61..cfecd02cc 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginManualLiquidationExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginManualLiquidationExample.java @@ -8,6 +8,8 @@ import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.MarginManualLiquidationRequest; import com.binance.connector.client.margin_trading.rest.model.MarginManualLiquidationResponse; +import com.binance.connector.client.margin_trading.rest.model.OrderType; +import java.io.IOException; /** API examples for TradeApi */ public class MarginManualLiquidationExample { @@ -27,17 +29,18 @@ public MarginTradingRestApi getApi() { } /** - * Margin Manual Liquidation(MARGIN) + * Margin Manual Liquidation (TRADE) * - *

Margin Manual Liquidation * This endpoint can support Cross Margin Classic Mode and Pro - * Mode. * And only support Isolated Margin for restricted region. Weight: 3000 + *

Margin Manual Liquidation Weight(UID): 3000 Security Type: TRADE Notes: - This endpoint + * supports Cross Margin Classic Mode and Pro Mode. - Isolated Margin is only supported in + * restricted regions. * * @throws ApiException if the Api call fails */ - public void marginManualLiquidationExample() throws ApiException { + public void marginManualLiquidationExample() throws ApiException, IOException { MarginManualLiquidationRequest marginManualLiquidationRequest = new MarginManualLiquidationRequest(); - marginManualLiquidationRequest.type(""); + marginManualLiquidationRequest.type(OrderType.ROLL_IN); ApiResponse response = getApi().marginManualLiquidation(marginManualLiquidationRequest); System.out.println(response.getData()); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryCurrentMarginOrderCountUsageExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryCurrentMarginOrderCountUsageExample.java index aa5aeb38c..51418c219 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryCurrentMarginOrderCountUsageExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryCurrentMarginOrderCountUsageExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; import com.binance.connector.client.margin_trading.rest.model.QueryCurrentMarginOrderCountUsageResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryCurrentMarginOrderCountUsageExample { @@ -28,13 +30,14 @@ public MarginTradingRestApi getApi() { /** * Query Current Margin Order Count Usage (TRADE) * - *

Displays the user's current margin order count usage for all intervals. Weight: 20(IP) + *

Displays the user's current margin order count usage for all intervals. Weight(IP): 20 + * Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void queryCurrentMarginOrderCountUsageExample() throws ApiException { - String isIsolated = "false"; - String symbol = ""; + public void queryCurrentMarginOrderCountUsageExample() throws ApiException, IOException { + IsIsolated isIsolated = IsIsolated.TRUE; + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().queryCurrentMarginOrderCountUsage(isIsolated, symbol, recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryLiquidationLoanExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryLiquidationLoanExample.java new file mode 100644 index 000000000..5a880aba2 --- /dev/null +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryLiquidationLoanExample.java @@ -0,0 +1,46 @@ +package com.binance.connector.client.margin_trading.rest.trade; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; +import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.QueryLiquidationLoanResponse; +import java.io.IOException; + +/** API examples for TradeApi */ +public class QueryLiquidationLoanExample { + private MarginTradingRestApi api; + + public MarginTradingRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = + MarginTradingRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new MarginTradingRestApi(clientConfiguration); + } + return api; + } + + /** + * Query Liquidation Loan (USER_DATA) + * + *

Query the current user's cross-margin liquidation loan information, including the + * original loan amount, repaid amount, and remaining amount. When a cross-margin account is + * liquidated and the account equity turns negative (bankruptcy), the system generates a + * liquidation loan record representing the deficit. This represents the shortfall amount + * denominated in USDC. Weight(UID): 100 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + public void queryLiquidationLoanExample() throws ApiException, IOException { + Long recvWindow = 5000L; + ApiResponse response = + getApi().queryLiquidationLoan(recvWindow); + System.out.println(response.getData()); + } +} diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryLiquidationLoanRepayHistoryExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryLiquidationLoanRepayHistoryExample.java new file mode 100644 index 000000000..23a5dab89 --- /dev/null +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryLiquidationLoanRepayHistoryExample.java @@ -0,0 +1,52 @@ +package com.binance.connector.client.margin_trading.rest.trade; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; +import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.QueryLiquidationLoanRepayHistoryResponse; +import java.io.IOException; + +/** API examples for TradeApi */ +public class QueryLiquidationLoanRepayHistoryExample { + private MarginTradingRestApi api; + + public MarginTradingRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = + MarginTradingRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new MarginTradingRestApi(clientConfiguration); + } + return api; + } + + /** + * Query Liquidation Loan Repay History (USER_DATA) + * + *

Query the repayment history of cross-margin liquidation loans (deficit caused by + * bankruptcy during liquidation). Supports time-range filtering and pagination. Weight(UID): + * 100 Security Type: USER_DATA Notes: - The maximum query range is 90 days. If + * `startTime` is earlier than 90 days ago, it will be clamped to 90 days ago. - Only + * records with status `SUCCESS` or `PENDING` are returned. Failed repayment + * records are excluded. + * + * @throws ApiException if the Api call fails + */ + public void queryLiquidationLoanRepayHistoryExample() throws ApiException, IOException { + Long startTime = 1714492800000L; + Long endTime = 1714579200000L; + Long current = 1L; + Long size = 50L; + Long recvWindow = 5000L; + ApiResponse response = + getApi().queryLiquidationLoanRepayHistory( + startTime, endTime, current, size, recvWindow); + System.out.println(response.getData()); + } +} diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsAllOcoExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsAllOcoExample.java index 4cc669acb..2480eadd9 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsAllOcoExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsAllOcoExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsAllOcoResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryMarginAccountsAllOcoExample { @@ -29,17 +31,17 @@ public MarginTradingRestApi getApi() { * Query Margin Account's all OCO (USER_DATA) * *

Retrieves all OCO for a specific margin account based on provided optional parameters - * Weight: 200(IP) + * Weight(IP): 200 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryMarginAccountsAllOcoExample() throws ApiException { - String isIsolated = "false"; - String symbol = ""; + public void queryMarginAccountsAllOcoExample() throws ApiException, IOException { + IsIsolated isIsolated = IsIsolated.TRUE; + String symbol = "LTCBTC"; Long fromId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 500L; + Long limit = 100L; Long recvWindow = 5000L; ApiResponse response = getApi().queryMarginAccountsAllOco( diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsAllOrdersExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsAllOrdersExample.java index 4fdf0fe3e..480fc281b 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsAllOrdersExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsAllOrdersExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsAllOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryMarginAccountsAllOrdersExample { @@ -28,20 +30,20 @@ public MarginTradingRestApi getApi() { /** * Query Margin Account's All Orders (USER_DATA) * - *

Query Margin Account's All Orders * If orderId is set, it will get orders >= - * that orderId. Otherwise the orders within 24 hours are returned. * For some historical orders - * cummulativeQuoteQty will be < 0, meaning the data is not available at this time. * Less - * than 24 hours between startTime and endTime. Weight: 200(IP) + *

Query Margin Account's All Orders Weight(IP): 200 Security Type: USER_DATA Notes: - If + * orderId is set, it will get orders >= that orderId. Otherwise the orders within 24 + * hours are returned. - For some historical orders cummulativeQuoteQty will be < 0, meaning + * the data is not available at this time. - Less than 24 hours between startTime and endTime. * * @throws ApiException if the Api call fails */ - public void queryMarginAccountsAllOrdersExample() throws ApiException { - String symbol = ""; - String isIsolated = "false"; + public void queryMarginAccountsAllOrdersExample() throws ApiException, IOException { + String symbol = "BNBBTC"; + IsIsolated isIsolated = IsIsolated.TRUE; Long orderId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 500L; + Long limit = 100L; Long recvWindow = 5000L; ApiResponse response = getApi().queryMarginAccountsAllOrders( diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOcoExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOcoExample.java index f5e81e49d..970d60c97 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOcoExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOcoExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsOcoResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryMarginAccountsOcoExample { @@ -28,13 +30,14 @@ public MarginTradingRestApi getApi() { /** * Query Margin Account's OCO (USER_DATA) * - *

Retrieves a specific OCO based on provided optional parameters Weight: 10(IP) + *

Retrieves a specific OCO based on provided optional parameters Weight(IP): 10 Security + * Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryMarginAccountsOcoExample() throws ApiException { - String isIsolated = "false"; - String symbol = ""; + public void queryMarginAccountsOcoExample() throws ApiException, IOException { + IsIsolated isIsolated = IsIsolated.TRUE; + String symbol = "LTCBTC"; Long orderListId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOpenOcoExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOpenOcoExample.java index 34bb4e1a3..330024899 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOpenOcoExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOpenOcoExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsOpenOcoResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryMarginAccountsOpenOcoExample { @@ -28,13 +30,13 @@ public MarginTradingRestApi getApi() { /** * Query Margin Account's Open OCO (USER_DATA) * - *

Query Margin Account's Open OCO Weight: 10(IP) + *

Query Margin Account's Open OCO Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryMarginAccountsOpenOcoExample() throws ApiException { - String isIsolated = "false"; - String symbol = ""; + public void queryMarginAccountsOpenOcoExample() throws ApiException, IOException { + IsIsolated isIsolated = IsIsolated.TRUE; + String symbol = "LTCBTC"; Long recvWindow = 5000L; ApiResponse response = getApi().queryMarginAccountsOpenOco(isIsolated, symbol, recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOpenOrdersExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOpenOrdersExample.java index 4bc4ae972..524debb9f 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOpenOrdersExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOpenOrdersExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsOpenOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryMarginAccountsOpenOrdersExample { @@ -28,16 +30,17 @@ public MarginTradingRestApi getApi() { /** * Query Margin Account's Open Orders (USER_DATA) * - *

Query Margin Account's Open Orders * If the symbol is not sent, orders for all symbols - * will be returned in an array. * When all symbols are returned, the number of requests counted - * against the rate limiter is equal to the number of symbols currently trading on the exchange. - * * If isIsolated =\"TRUE\", symbol must be sent. Weight: 10(IP) + *

Query Margin Account's Open Orders Weight(IP): 10 Security Type: USER_DATA Notes: - If + * the symbol is not sent, orders for all symbols will be returned in an array. - When all + * symbols are returned, the number of requests counted against the rate limiter is equal to the + * number of symbols currently trading on the exchange. - If isIsolated + * =\"TRUE\", symbol must be sent. * * @throws ApiException if the Api call fails */ - public void queryMarginAccountsOpenOrdersExample() throws ApiException { - String symbol = ""; - String isIsolated = "false"; + public void queryMarginAccountsOpenOrdersExample() throws ApiException, IOException { + String symbol = "BNBBTC"; + IsIsolated isIsolated = IsIsolated.TRUE; Long recvWindow = 5000L; ApiResponse response = getApi().queryMarginAccountsOpenOrders(symbol, isIsolated, recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOrderExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOrderExample.java index a0cd349cf..4906e21f1 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOrderExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsOrderExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryMarginAccountsOrderExample { @@ -28,15 +30,15 @@ public MarginTradingRestApi getApi() { /** * Query Margin Account's Order (USER_DATA) * - *

Query Margin Account's Order * Either orderId or origClientOrderId must be sent. * For - * some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available - * at this time. Weight: 10(IP) + *

Query Margin Account's Order Weight(IP): 10 Security Type: USER_DATA Notes: - Either + * orderId or origClientOrderId must be sent. - For some historical orders cummulativeQuoteQty + * will be < 0, meaning the data is not available at this time. * * @throws ApiException if the Api call fails */ - public void queryMarginAccountsOrderExample() throws ApiException { - String symbol = ""; - String isIsolated = "false"; + public void queryMarginAccountsOrderExample() throws ApiException, IOException { + String symbol = "BNBBTC"; + IsIsolated isIsolated = IsIsolated.TRUE; Long orderId = 1L; String origClientOrderId = "1"; Long recvWindow = 5000L; diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsTradeListExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsTradeListExample.java index de7cc2174..4ac044d6f 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsTradeListExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryMarginAccountsTradeListExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; import com.binance.connector.client.margin_trading.rest.model.QueryMarginAccountsTradeListResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryMarginAccountsTradeListExample { @@ -28,15 +30,15 @@ public MarginTradingRestApi getApi() { /** * Query Margin Account's Trade List (USER_DATA) * - *

Query Margin Account's Trade List * If fromId is set, it will get trades >= - * that fromId. Otherwise the trades within 24 hours are returned. * Less than 24 hours between - * startTime and endTime. Weight: 10(IP) + *

Query Margin Account's Trade List Weight(IP): 10 Security Type: USER_DATA Notes: - If + * fromId is set, it will get trades >= that fromId. Otherwise the trades within 24 + * hours are returned. - Less than 24 hours between startTime and endTime. * * @throws ApiException if the Api call fails */ - public void queryMarginAccountsTradeListExample() throws ApiException { - String symbol = ""; - String isIsolated = "false"; + public void queryMarginAccountsTradeListExample() throws ApiException, IOException { + String symbol = "BNBBTC"; + IsIsolated isIsolated = IsIsolated.TRUE; Long orderId = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryPreventedMatchesExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryPreventedMatchesExample.java index 3e91bf3b2..956af5045 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryPreventedMatchesExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QueryPreventedMatchesExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import com.binance.connector.client.margin_trading.rest.model.IsIsolated; import com.binance.connector.client.margin_trading.rest.model.QueryPreventedMatchesResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryPreventedMatchesExample { @@ -26,27 +28,35 @@ public MarginTradingRestApi getApi() { } /** - * Query Prevented Matches(USER_DATA) + * Query Prevented Matches (USER_DATA) * - *

Weight: 10(IP) + *

Displays the list of orders that were expired due to STP. (Self-Trade Prevention). + * Weight(IP): 10 Security Type: USER_DATA Notes: - Supported parameter combinations: - + * `symbol` + `preventedMatchId` - `symbol` + `orderId` + * - `symbol` + `orderId` + `fromPreventedMatchId` - If + * `orderId` is provided, all prevented matches for that order will be returned. - If + * `preventedMatchId` is provided, the specific prevented match will be returned. - A + * single request returns a maximum of 500 records. If there are more than 500 records, use + * `symbol` + `orderId` + `fromPreventedMatchId` combination for + * pagination. * * @throws ApiException if the Api call fails */ - public void queryPreventedMatchesExample() throws ApiException { - String symbol = ""; + public void queryPreventedMatchesExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long preventedMatchId = 1L; Long orderId = 1L; Long fromPreventedMatchId = 1L; + IsIsolated isIsolated = IsIsolated.TRUE; Long recvWindow = 5000L; - String isIsolated = "false"; ApiResponse response = getApi().queryPreventedMatches( symbol, preventedMatchId, orderId, fromPreventedMatchId, - recvWindow, - isIsolated); + isIsolated, + recvWindow); System.out.println(response.getData()); } } diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QuerySpecialKeyExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QuerySpecialKeyExample.java index 1446ffaab..383b3213f 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QuerySpecialKeyExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QuerySpecialKeyExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.QuerySpecialKeyResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QuerySpecialKeyExample { @@ -26,15 +27,15 @@ public MarginTradingRestApi getApi() { } /** - * Query Special key(Low Latency Trading)(TRADE) + * Query Special key(Low Latency Trading) (TRADE) * *

Query Special Key Information. This only applies to Special Key for Low Latency Trading. - * Weight: 1(UID) + * Weight(UID): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void querySpecialKeyExample() throws ApiException { - String symbol = ""; + public void querySpecialKeyExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().querySpecialKey(symbol, recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QuerySpecialKeyListExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QuerySpecialKeyListExample.java index 8f782634a..21b158c5f 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QuerySpecialKeyListExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/QuerySpecialKeyListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.QuerySpecialKeyListResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QuerySpecialKeyListExample { @@ -26,14 +27,15 @@ public MarginTradingRestApi getApi() { } /** - * Query Special key List(Low Latency Trading)(TRADE) + * Query Special key List(Low Latency Trading) (TRADE) * - *

This only applies to Special Key for Low Latency Trading. Weight: 1(UID) + *

This only applies to Special Key for Low Latency Trading. Weight(UID): 1 Security Type: + * TRADE * * @throws ApiException if the Api call fails */ - public void querySpecialKeyListExample() throws ApiException { - String symbol = ""; + public void querySpecialKeyListExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().querySpecialKeyList(symbol, recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/SmallLiabilityExchangeExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/SmallLiabilityExchangeExample.java index e0923cff3..15b5ddbea 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/SmallLiabilityExchangeExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/SmallLiabilityExchangeExample.java @@ -5,8 +5,8 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; -import com.binance.connector.client.margin_trading.rest.model.AssetNames; import com.binance.connector.client.margin_trading.rest.model.SmallLiabilityExchangeRequest; +import java.io.IOException; /** API examples for TradeApi */ public class SmallLiabilityExchangeExample { @@ -28,15 +28,16 @@ public MarginTradingRestApi getApi() { /** * Small Liability Exchange (MARGIN) * - *

Small Liability Exchange * Only convert once within 6 hours * Only liability valuation - * less than 10 USDT are supported * The maximum number of coin is 10 Weight: 3000(UID) + *

Small Liability Exchange Weight(UID): 3000 Security Type: MARGIN Notes: - Only convert + * once within 6 hours - Only liability valuation less than 10 USDT are supported - The maximum + * number of coin is 10 * * @throws ApiException if the Api call fails */ - public void smallLiabilityExchangeExample() throws ApiException { + public void smallLiabilityExchangeExample() throws ApiException, IOException { SmallLiabilityExchangeRequest smallLiabilityExchangeRequest = new SmallLiabilityExchangeRequest(); - smallLiabilityExchangeRequest.assetNames(new AssetNames()); + smallLiabilityExchangeRequest.assetNames("BTC,ETH"); getApi().smallLiabilityExchange(smallLiabilityExchangeRequest); } } diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/transfer/GetCrossMarginTransferHistoryExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/transfer/GetCrossMarginTransferHistoryExample.java index 8a0f7cd6b..789e24e9d 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/transfer/GetCrossMarginTransferHistoryExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/transfer/GetCrossMarginTransferHistoryExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.GetCrossMarginTransferHistoryResponse; +import com.binance.connector.client.margin_trading.rest.model.OrderType; +import java.io.IOException; /** API examples for TransferApi */ public class GetCrossMarginTransferHistoryExample { @@ -28,20 +30,20 @@ public MarginTradingRestApi getApi() { /** * Get Cross Margin Transfer History (USER_DATA) * - *

Get Cross Margin Transfer History * Response in descending order * The max interval - * between `startTime` and `endTime` is 30 days. * Returns data for last 7 - * days by default Weight: 1(IP) + *

Get Cross Margin Transfer History Weight(IP): 1 Security Type: USER_DATA Notes: - Response + * in descending order - The max interval between `startTime` and `endTime` + * is 30 days. - Returns data for last 7 days by default * * @throws ApiException if the Api call fails */ - public void getCrossMarginTransferHistoryExample() throws ApiException { - String asset = ""; - String type = ""; + public void getCrossMarginTransferHistoryExample() throws ApiException, IOException { + String asset = "BNB"; + OrderType type = OrderType.ROLL_IN; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; Long size = 10L; - String isolatedSymbol = ""; + String isolatedSymbol = "BNBUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().getCrossMarginTransferHistory( diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/transfer/QueryMaxTransferOutAmountExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/transfer/QueryMaxTransferOutAmountExample.java index af75012d6..321caf360 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/transfer/QueryMaxTransferOutAmountExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/transfer/QueryMaxTransferOutAmountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.QueryMaxTransferOutAmountResponse; +import java.io.IOException; /** API examples for TransferApi */ public class QueryMaxTransferOutAmountExample { @@ -28,14 +29,14 @@ public MarginTradingRestApi getApi() { /** * Query Max Transfer-Out Amount (USER_DATA) * - *

Query Max Transfer-Out Amount * If isolatedSymbol is not sent, crossed margin data will be - * sent. Weight: 50(IP) + *

Query Max Transfer-Out Amount Weight(IP): 50 Security Type: USER_DATA Notes: - If + * isolatedSymbol is not sent, crossed margin data will be sent. * * @throws ApiException if the Api call fails */ - public void queryMaxTransferOutAmountExample() throws ApiException { - String asset = ""; - String isolatedSymbol = ""; + public void queryMaxTransferOutAmountExample() throws ApiException, IOException { + String asset = "BTC"; + String isolatedSymbol = "BTCUSDT"; Long recvWindow = 5000L; ApiResponse response = getApi().queryMaxTransferOutAmount(asset, isolatedSymbol, recvWindow); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/riskdatastream/CloseUserDataStreamExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/userdatastream/CloseUserDataStreamExample.java similarity index 84% rename from examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/riskdatastream/CloseUserDataStreamExample.java rename to examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/userdatastream/CloseUserDataStreamExample.java index ae2cec14a..06c78b6e4 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/riskdatastream/CloseUserDataStreamExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/userdatastream/CloseUserDataStreamExample.java @@ -1,12 +1,13 @@ -package com.binance.connector.client.margin_trading.rest.riskdatastream; +package com.binance.connector.client.margin_trading.rest.userdatastream; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; +import java.io.IOException; -/** API examples for RiskDataStreamApi */ +/** API examples for UserDataStreamApi */ public class CloseUserDataStreamExample { private MarginTradingRestApi api; @@ -26,11 +27,11 @@ public MarginTradingRestApi getApi() { /** * Close User Data Stream (USER_STREAM) * - *

Close out a user data stream. Weight: 3000 + *

Close out a user data stream. Weight(UID): 3000 Security Type: USER_STREAM * * @throws ApiException if the Api call fails */ - public void closeUserDataStreamExample() throws ApiException { + public void closeUserDataStreamExample() throws ApiException, IOException { getApi().closeUserDataStream(); } } diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/riskdatastream/KeepaliveUserDataStreamExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/userdatastream/KeepaliveUserDataStreamExample.java similarity index 89% rename from examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/riskdatastream/KeepaliveUserDataStreamExample.java rename to examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/userdatastream/KeepaliveUserDataStreamExample.java index a2d2a9009..d27e30dfd 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/riskdatastream/KeepaliveUserDataStreamExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/userdatastream/KeepaliveUserDataStreamExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.margin_trading.rest.riskdatastream; +package com.binance.connector.client.margin_trading.rest.userdatastream; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.configuration.ClientConfiguration; @@ -6,8 +6,9 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.KeepaliveUserDataStreamRequest; +import java.io.IOException; -/** API examples for RiskDataStreamApi */ +/** API examples for UserDataStreamApi */ public class KeepaliveUserDataStreamExample { private MarginTradingRestApi api; @@ -27,11 +28,12 @@ public MarginTradingRestApi getApi() { /** * Keepalive User Data Stream (USER_STREAM) * - *

Keepalive a user data stream to prevent a time out. Weight: 1 + *

Keepalive a user data stream to prevent a time out. Weight(UID): 1 Security Type: + * USER_STREAM * * @throws ApiException if the Api call fails */ - public void keepaliveUserDataStreamExample() throws ApiException { + public void keepaliveUserDataStreamExample() throws ApiException, IOException { KeepaliveUserDataStreamRequest keepaliveUserDataStreamRequest = new KeepaliveUserDataStreamRequest(); keepaliveUserDataStreamRequest.listenKey(""); diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/riskdatastream/StartUserDataStreamExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/userdatastream/StartUserDataStreamExample.java similarity index 87% rename from examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/riskdatastream/StartUserDataStreamExample.java rename to examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/userdatastream/StartUserDataStreamExample.java index cd49a1b49..dae0c9a4b 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/riskdatastream/StartUserDataStreamExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/userdatastream/StartUserDataStreamExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.margin_trading.rest.riskdatastream; +package com.binance.connector.client.margin_trading.rest.userdatastream; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -7,8 +7,9 @@ import com.binance.connector.client.margin_trading.rest.MarginTradingRestApiUtil; import com.binance.connector.client.margin_trading.rest.api.MarginTradingRestApi; import com.binance.connector.client.margin_trading.rest.model.StartUserDataStreamResponse; +import java.io.IOException; -/** API examples for RiskDataStreamApi */ +/** API examples for UserDataStreamApi */ public class StartUserDataStreamExample { private MarginTradingRestApi api; @@ -28,11 +29,11 @@ public MarginTradingRestApi getApi() { /** * Start User Data Stream (USER_STREAM) * - *

Start a new user data stream. Weight: 1 + *

Start a new user data stream. Weight(UID): 1 Security Type: USER_STREAM * * @throws ApiException if the Api call fails */ - public void startUserDataStreamExample() throws ApiException { + public void startUserDataStreamExample() throws ApiException, IOException { ApiResponse response = getApi().startUserDataStream(); System.out.println(response.getData()); } diff --git a/examples/mining/pom.xml b/examples/mining/pom.xml index 8053cfa80..b6d9fb3fc 100644 --- a/examples/mining/pom.xml +++ b/examples/mining/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-mining - 3.0.0 + 4.0.0 \ No newline at end of file diff --git a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/AccountListExample.java b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/AccountListExample.java similarity index 79% rename from examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/AccountListExample.java rename to examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/AccountListExample.java index 2c9fd1618..d3d2c77c9 100644 --- a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/AccountListExample.java +++ b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/AccountListExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.mining.rest.mining; +package com.binance.connector.client.mining.rest.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -7,8 +7,9 @@ import com.binance.connector.client.mining.rest.MiningRestApiUtil; import com.binance.connector.client.mining.rest.api.MiningRestApi; import com.binance.connector.client.mining.rest.model.AccountListResponse; +import java.io.IOException; -/** API examples for MiningApi */ +/** API examples for DefaultApi */ public class AccountListExample { private MiningRestApi api; @@ -25,15 +26,15 @@ public MiningRestApi getApi() { } /** - * Account List(USER_DATA) + * Account List (USER_DATA) * - *

Query Account List Weight: 5 + *

Query Account List Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void accountListExample() throws ApiException { - String algo = ""; - String userName = ""; + public void accountListExample() throws ApiException, IOException { + String algo = "sha256"; + String userName = "test"; Long recvWindow = 5000L; ApiResponse response = getApi().accountList(algo, userName, recvWindow); diff --git a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/AcquiringAlgorithmExample.java b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/AcquiringAlgorithmExample.java similarity index 81% rename from examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/AcquiringAlgorithmExample.java rename to examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/AcquiringAlgorithmExample.java index a0ce50e13..b4504e03f 100644 --- a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/AcquiringAlgorithmExample.java +++ b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/AcquiringAlgorithmExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.mining.rest.mining; +package com.binance.connector.client.mining.rest.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -7,8 +7,9 @@ import com.binance.connector.client.mining.rest.MiningRestApiUtil; import com.binance.connector.client.mining.rest.api.MiningRestApi; import com.binance.connector.client.mining.rest.model.AcquiringAlgorithmResponse; +import java.io.IOException; -/** API examples for MiningApi */ +/** API examples for DefaultApi */ public class AcquiringAlgorithmExample { private MiningRestApi api; @@ -25,13 +26,13 @@ public MiningRestApi getApi() { } /** - * Acquiring Algorithm(MARKET_DATA) + * Acquiring Algorithm (MARKET_DATA) * - *

Acquiring Algorithm Weight: 1 + *

Acquiring Algorithm Weight(IP): 1 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ - public void acquiringAlgorithmExample() throws ApiException { + public void acquiringAlgorithmExample() throws ApiException, IOException { ApiResponse response = getApi().acquiringAlgorithm(); System.out.println(response.getData()); } diff --git a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/AcquiringCoinnameExample.java b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/AcquiringCoinnameExample.java similarity index 81% rename from examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/AcquiringCoinnameExample.java rename to examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/AcquiringCoinnameExample.java index 97e488594..2c8dad94c 100644 --- a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/AcquiringCoinnameExample.java +++ b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/AcquiringCoinnameExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.mining.rest.mining; +package com.binance.connector.client.mining.rest.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -7,8 +7,9 @@ import com.binance.connector.client.mining.rest.MiningRestApiUtil; import com.binance.connector.client.mining.rest.api.MiningRestApi; import com.binance.connector.client.mining.rest.model.AcquiringCoinnameResponse; +import java.io.IOException; -/** API examples for MiningApi */ +/** API examples for DefaultApi */ public class AcquiringCoinnameExample { private MiningRestApi api; @@ -25,13 +26,13 @@ public MiningRestApi getApi() { } /** - * Acquiring CoinName(MARKET_DATA) + * Acquiring CoinName (MARKET_DATA) * - *

Acquiring CoinName Weight: 1 + *

Acquiring CoinName Weight(IP): 1 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ - public void acquiringCoinnameExample() throws ApiException { + public void acquiringCoinnameExample() throws ApiException, IOException { ApiResponse response = getApi().acquiringCoinname(); System.out.println(response.getData()); } diff --git a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/CancelHashrateResaleConfigurationExample.java b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/CancelHashrateResaleConfigurationExample.java similarity index 80% rename from examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/CancelHashrateResaleConfigurationExample.java rename to examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/CancelHashrateResaleConfigurationExample.java index f7ad916ad..3342aecd7 100644 --- a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/CancelHashrateResaleConfigurationExample.java +++ b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/CancelHashrateResaleConfigurationExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.mining.rest.mining; +package com.binance.connector.client.mining.rest.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -8,8 +8,9 @@ import com.binance.connector.client.mining.rest.api.MiningRestApi; import com.binance.connector.client.mining.rest.model.CancelHashrateResaleConfigurationRequest; import com.binance.connector.client.mining.rest.model.CancelHashrateResaleConfigurationResponse; +import java.io.IOException; -/** API examples for MiningApi */ +/** API examples for DefaultApi */ public class CancelHashrateResaleConfigurationExample { private MiningRestApi api; @@ -26,17 +27,17 @@ public MiningRestApi getApi() { } /** - * Cancel hashrate resale configuration(USER_DATA) + * Cancel hashrate resale configuration (USER_DATA) * - *

Weight: 5 + *

Cancel hashrate resale configuration Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void cancelHashrateResaleConfigurationExample() throws ApiException { + public void cancelHashrateResaleConfigurationExample() throws ApiException, IOException { CancelHashrateResaleConfigurationRequest cancelHashrateResaleConfigurationRequest = new CancelHashrateResaleConfigurationRequest(); - cancelHashrateResaleConfigurationRequest.configId(1L); - cancelHashrateResaleConfigurationRequest.userName(""); + cancelHashrateResaleConfigurationRequest.configId(168L); + cancelHashrateResaleConfigurationRequest.userName("test"); ApiResponse response = getApi().cancelHashrateResaleConfiguration( cancelHashrateResaleConfigurationRequest); diff --git a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/EarningsListExample.java b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/EarningsListExample.java similarity index 77% rename from examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/EarningsListExample.java rename to examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/EarningsListExample.java index 9f28fe022..3082e2c2a 100644 --- a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/EarningsListExample.java +++ b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/EarningsListExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.mining.rest.mining; +package com.binance.connector.client.mining.rest.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -7,8 +7,9 @@ import com.binance.connector.client.mining.rest.MiningRestApiUtil; import com.binance.connector.client.mining.rest.api.MiningRestApi; import com.binance.connector.client.mining.rest.model.EarningsListResponse; +import java.io.IOException; -/** API examples for MiningApi */ +/** API examples for DefaultApi */ public class EarningsListExample { private MiningRestApi api; @@ -25,20 +26,20 @@ public MiningRestApi getApi() { } /** - * Earnings List(USER_DATA) + * Earnings List (USER_DATA) * - *

Query Earnings List Weight: 5 + *

Query Earnings List Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void earningsListExample() throws ApiException { - String algo = ""; - String userName = ""; - String coin = ""; - Long startDate = 0L; - Long endDate = 0L; + public void earningsListExample() throws ApiException, IOException { + String algo = "sha256"; + String userName = "test"; + String coin = "BTC"; + Long startDate = 1770736694138L; + Long endDate = 1770736694138L; Long pageIndex = 1L; - Long pageSize = 0L; + Long pageSize = 10L; Long recvWindow = 5000L; ApiResponse response = getApi().earningsList( diff --git a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/ExtraBonusListExample.java b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/ExtraBonusListExample.java similarity index 77% rename from examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/ExtraBonusListExample.java rename to examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/ExtraBonusListExample.java index 8abab0a40..c637e097d 100644 --- a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/ExtraBonusListExample.java +++ b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/ExtraBonusListExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.mining.rest.mining; +package com.binance.connector.client.mining.rest.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -7,8 +7,9 @@ import com.binance.connector.client.mining.rest.MiningRestApiUtil; import com.binance.connector.client.mining.rest.api.MiningRestApi; import com.binance.connector.client.mining.rest.model.ExtraBonusListResponse; +import java.io.IOException; -/** API examples for MiningApi */ +/** API examples for DefaultApi */ public class ExtraBonusListExample { private MiningRestApi api; @@ -25,20 +26,20 @@ public MiningRestApi getApi() { } /** - * Extra Bonus List(USER_DATA) + * Extra Bonus List (USER_DATA) * - *

Extra Bonus List Weight: 5 + *

Extra Bonus List Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void extraBonusListExample() throws ApiException { - String algo = ""; - String userName = ""; - String coin = ""; - Long startDate = 0L; - Long endDate = 0L; + public void extraBonusListExample() throws ApiException, IOException { + String algo = "sha256"; + String userName = "test"; + String coin = "BTC"; + Long startDate = 1770736694138L; + Long endDate = 1770736694138L; Long pageIndex = 1L; - Long pageSize = 0L; + Long pageSize = 10L; Long recvWindow = 5000L; ApiResponse response = getApi().extraBonusList( diff --git a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/HashrateResaleDetailExample.java b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/HashrateResaleDetailExample.java similarity index 82% rename from examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/HashrateResaleDetailExample.java rename to examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/HashrateResaleDetailExample.java index fa91b9410..36caedba7 100644 --- a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/HashrateResaleDetailExample.java +++ b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/HashrateResaleDetailExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.mining.rest.mining; +package com.binance.connector.client.mining.rest.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -7,8 +7,9 @@ import com.binance.connector.client.mining.rest.MiningRestApiUtil; import com.binance.connector.client.mining.rest.api.MiningRestApi; import com.binance.connector.client.mining.rest.model.HashrateResaleDetailResponse; +import java.io.IOException; -/** API examples for MiningApi */ +/** API examples for DefaultApi */ public class HashrateResaleDetailExample { private MiningRestApi api; @@ -25,16 +26,16 @@ public MiningRestApi getApi() { } /** - * Hashrate Resale Detail(USER_DATA) + * Hashrate Resale Detail (USER_DATA) * - *

Hashrate Resale Detail(USER_DATA) Weight: 5 + *

Hashrate Resale Detail(USER_DATA) Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void hashrateResaleDetailExample() throws ApiException { - Long configId = 1L; + public void hashrateResaleDetailExample() throws ApiException, IOException { + Long configId = 168L; Long pageIndex = 1L; - Long pageSize = 0L; + Long pageSize = 10L; Long recvWindow = 5000L; ApiResponse response = getApi().hashrateResaleDetail(configId, pageIndex, pageSize, recvWindow); diff --git a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/HashrateResaleListExample.java b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/HashrateResaleListExample.java similarity index 80% rename from examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/HashrateResaleListExample.java rename to examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/HashrateResaleListExample.java index 39cb79ab2..923a35902 100644 --- a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/HashrateResaleListExample.java +++ b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/HashrateResaleListExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.mining.rest.mining; +package com.binance.connector.client.mining.rest.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -7,8 +7,9 @@ import com.binance.connector.client.mining.rest.MiningRestApiUtil; import com.binance.connector.client.mining.rest.api.MiningRestApi; import com.binance.connector.client.mining.rest.model.HashrateResaleListResponse; +import java.io.IOException; -/** API examples for MiningApi */ +/** API examples for DefaultApi */ public class HashrateResaleListExample { private MiningRestApi api; @@ -25,15 +26,15 @@ public MiningRestApi getApi() { } /** - * Hashrate Resale List + * Hashrate Resale List (USER_DATA) * - *

Hashrate Resale List Weight: 5 + *

Hashrate Resale List Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void hashrateResaleListExample() throws ApiException { + public void hashrateResaleListExample() throws ApiException, IOException { Long pageIndex = 1L; - Long pageSize = 0L; + Long pageSize = 10L; Long recvWindow = 5000L; ApiResponse response = getApi().hashrateResaleList(pageIndex, pageSize, recvWindow); diff --git a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/HashrateResaleRequestExample.java b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/HashrateResaleRequestExample.java new file mode 100644 index 000000000..4e300c138 --- /dev/null +++ b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/HashrateResaleRequestExample.java @@ -0,0 +1,49 @@ +package com.binance.connector.client.mining.rest.defaultpkg; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.mining.rest.MiningRestApiUtil; +import com.binance.connector.client.mining.rest.api.MiningRestApi; +import com.binance.connector.client.mining.rest.model.HashrateResaleRequestRequest; +import com.binance.connector.client.mining.rest.model.HashrateResaleRequestResponse; +import java.io.IOException; + +/** API examples for DefaultApi */ +public class HashrateResaleRequestExample { + private MiningRestApi api; + + public MiningRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = MiningRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new MiningRestApi(clientConfiguration); + } + return api; + } + + /** + * Hashrate Resale Request (USER_DATA) + * + *

Hashrate Resale Request Weight(IP): 1 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + public void hashrateResaleRequestExample() throws ApiException, IOException { + HashrateResaleRequestRequest hashrateResaleRequestRequest = + new HashrateResaleRequestRequest(); + hashrateResaleRequestRequest.userName("test"); + hashrateResaleRequestRequest.algo("sha256"); + hashrateResaleRequestRequest.endDate(1770736694138L); + hashrateResaleRequestRequest.startDate(1770736694138L); + hashrateResaleRequestRequest.toPoolUser("S19pro"); + hashrateResaleRequestRequest.hashRate(100000000L); + ApiResponse response = + getApi().hashrateResaleRequest(hashrateResaleRequestRequest); + System.out.println(response.getData()); + } +} diff --git a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/MiningAccountEarningExample.java b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/MiningAccountEarningExample.java similarity index 80% rename from examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/MiningAccountEarningExample.java rename to examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/MiningAccountEarningExample.java index e80def584..1a144aa4f 100644 --- a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/MiningAccountEarningExample.java +++ b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/MiningAccountEarningExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.mining.rest.mining; +package com.binance.connector.client.mining.rest.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -7,8 +7,9 @@ import com.binance.connector.client.mining.rest.MiningRestApiUtil; import com.binance.connector.client.mining.rest.api.MiningRestApi; import com.binance.connector.client.mining.rest.model.MiningAccountEarningResponse; +import java.io.IOException; -/** API examples for MiningApi */ +/** API examples for DefaultApi */ public class MiningAccountEarningExample { private MiningRestApi api; @@ -25,18 +26,18 @@ public MiningRestApi getApi() { } /** - * Mining Account Earning(USER_DATA) + * Mining Account Earning (USER_DATA) * - *

Mining Account Earning Weight: 5 + *

Mining Account Earning Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void miningAccountEarningExample() throws ApiException { - String algo = ""; - Long startDate = 0L; - Long endDate = 0L; + public void miningAccountEarningExample() throws ApiException, IOException { + String algo = "sha256"; + Long startDate = 1770736694138L; + Long endDate = 1770736694138L; Long pageIndex = 1L; - Long pageSize = 0L; + Long pageSize = 10L; Long recvWindow = 5000L; ApiResponse response = getApi().miningAccountEarning( diff --git a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/RequestForDetailMinerListExample.java b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/RequestForDetailMinerListExample.java similarity index 79% rename from examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/RequestForDetailMinerListExample.java rename to examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/RequestForDetailMinerListExample.java index 48337f119..f0ff1d9ee 100644 --- a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/RequestForDetailMinerListExample.java +++ b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/RequestForDetailMinerListExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.mining.rest.mining; +package com.binance.connector.client.mining.rest.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -7,8 +7,9 @@ import com.binance.connector.client.mining.rest.MiningRestApiUtil; import com.binance.connector.client.mining.rest.api.MiningRestApi; import com.binance.connector.client.mining.rest.model.RequestForDetailMinerListResponse; +import java.io.IOException; -/** API examples for MiningApi */ +/** API examples for DefaultApi */ public class RequestForDetailMinerListExample { private MiningRestApi api; @@ -25,16 +26,16 @@ public MiningRestApi getApi() { } /** - * Request for Detail Miner List(USER_DATA) + * Request for Detail Miner List (USER_DATA) * - *

Request for Detail Miner List Weight: 5 + *

Request for Detail Miner List Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void requestForDetailMinerListExample() throws ApiException { - String algo = ""; - String userName = ""; - String workerName = ""; + public void requestForDetailMinerListExample() throws ApiException, IOException { + String algo = "sha256"; + String userName = "test"; + String workerName = "bhdc1.16A10404B"; Long recvWindow = 5000L; ApiResponse response = getApi().requestForDetailMinerList(algo, userName, workerName, recvWindow); diff --git a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/RequestForMinerListExample.java b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/RequestForMinerListExample.java similarity index 85% rename from examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/RequestForMinerListExample.java rename to examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/RequestForMinerListExample.java index f666d1080..cbfec6a7c 100644 --- a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/RequestForMinerListExample.java +++ b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/RequestForMinerListExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.mining.rest.mining; +package com.binance.connector.client.mining.rest.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -7,8 +7,9 @@ import com.binance.connector.client.mining.rest.MiningRestApiUtil; import com.binance.connector.client.mining.rest.api.MiningRestApi; import com.binance.connector.client.mining.rest.model.RequestForMinerListResponse; +import java.io.IOException; -/** API examples for MiningApi */ +/** API examples for DefaultApi */ public class RequestForMinerListExample { private MiningRestApi api; @@ -25,15 +26,15 @@ public MiningRestApi getApi() { } /** - * Request for Miner List(USER_DATA) + * Request for Miner List (USER_DATA) * - *

Request for Miner List Weight: 5 + *

Request for Miner List Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void requestForMinerListExample() throws ApiException { - String algo = ""; - String userName = ""; + public void requestForMinerListExample() throws ApiException, IOException { + String algo = "sha256"; + String userName = "test"; Long pageIndex = 1L; Long sort = 0L; Long sortColumn = 1L; diff --git a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/StatisticListExample.java b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/StatisticListExample.java similarity index 79% rename from examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/StatisticListExample.java rename to examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/StatisticListExample.java index 916ca2221..63e146337 100644 --- a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/StatisticListExample.java +++ b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/defaultpkg/StatisticListExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.mining.rest.mining; +package com.binance.connector.client.mining.rest.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.ApiResponse; @@ -7,8 +7,9 @@ import com.binance.connector.client.mining.rest.MiningRestApiUtil; import com.binance.connector.client.mining.rest.api.MiningRestApi; import com.binance.connector.client.mining.rest.model.StatisticListResponse; +import java.io.IOException; -/** API examples for MiningApi */ +/** API examples for DefaultApi */ public class StatisticListExample { private MiningRestApi api; @@ -25,15 +26,15 @@ public MiningRestApi getApi() { } /** - * Statistic List(USER_DATA) + * Statistic List (USER_DATA) * - *

Statistic List Weight: 5 + *

Statistic List Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void statisticListExample() throws ApiException { - String algo = ""; - String userName = ""; + public void statisticListExample() throws ApiException, IOException { + String algo = "sha256"; + String userName = "test"; Long recvWindow = 5000L; ApiResponse response = getApi().statisticList(algo, userName, recvWindow); diff --git a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/HashrateResaleRequestExample.java b/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/HashrateResaleRequestExample.java deleted file mode 100644 index 36056b511..000000000 --- a/examples/mining/src/main/java/com/binance/connector/client/mining/rest/mining/HashrateResaleRequestExample.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.binance.connector.client.mining.rest.mining; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; -import com.binance.connector.client.mining.rest.MiningRestApiUtil; -import com.binance.connector.client.mining.rest.api.MiningRestApi; -import com.binance.connector.client.mining.rest.model.HashrateResaleRequestRequest; -import com.binance.connector.client.mining.rest.model.HashrateResaleRequestResponse; - -/** API examples for MiningApi */ -public class HashrateResaleRequestExample { - private MiningRestApi api; - - public MiningRestApi getApi() { - if (api == null) { - ClientConfiguration clientConfiguration = MiningRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - api = new MiningRestApi(clientConfiguration); - } - return api; - } - - /** - * Hashrate Resale Request(USER_DATA) - * - *

Hashrate Resale Request Weight: 5 - * - * @throws ApiException if the Api call fails - */ - public void hashrateResaleRequestExample() throws ApiException { - HashrateResaleRequestRequest hashrateResaleRequestRequest = - new HashrateResaleRequestRequest(); - hashrateResaleRequestRequest.userName(""); - hashrateResaleRequestRequest.algo(""); - hashrateResaleRequestRequest.endDate(0L); - hashrateResaleRequestRequest.startDate(0L); - hashrateResaleRequestRequest.toPoolUser(""); - hashrateResaleRequestRequest.hashRate(0L); - ApiResponse response = - getApi().hashrateResaleRequest(hashrateResaleRequestRequest); - System.out.println(response.getData()); - } -} diff --git a/examples/pay/pom.xml b/examples/pay/pom.xml index 9eb737760..e1eb1196f 100644 --- a/examples/pay/pom.xml +++ b/examples/pay/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-pay - 4.0.0 + 5.0.0 \ No newline at end of file diff --git a/examples/pay/src/main/java/com/binance/connector/client/pay/rest/defaultpkg/GetPayTradeHistoryExample.java b/examples/pay/src/main/java/com/binance/connector/client/pay/rest/defaultpkg/GetPayTradeHistoryExample.java new file mode 100644 index 000000000..25ad1eb2b --- /dev/null +++ b/examples/pay/src/main/java/com/binance/connector/client/pay/rest/defaultpkg/GetPayTradeHistoryExample.java @@ -0,0 +1,65 @@ +package com.binance.connector.client.pay.rest.defaultpkg; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.pay.rest.PayRestApiUtil; +import com.binance.connector.client.pay.rest.api.PayRestApi; +import com.binance.connector.client.pay.rest.model.GetPayTradeHistoryResponse; +import java.io.IOException; + +/** API examples for DefaultApi */ +public class GetPayTradeHistoryExample { + private PayRestApi api; + + public PayRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = PayRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new PayRestApi(clientConfiguration); + } + return api; + } + + /** + * Get Pay Trade History + * + *

Get Pay Trade History Weight(UID): 3000 Notes: - If `startTime` and + * `endTime` are not sent, the recent 90 days' data will be returned. - The max + * interval between `startTime` and `endTime` is 90 days. - Support for + * querying orders within the last 18 months. - `payerInfo` and + * `receiverInfo` return different fields in different `orderType` values: - + * C2C sender: `payerInfo=binanceId`; `receiverInfo=name, + * binanceId/accountId/email/countryCode/phoneNumber/mobileCode` (based on user input). - + * C2C receiver: `payerInfo=name`; `receiverInfo=binanceId`. - + * CRYPTO_BOX sender: `payerInfo=binanceId`; `receiverInfo=name` + * (always `\"Crypto Box\"`). - CRYPTO_BOX receiver: + * `payerInfo=name`; `receiverInfo=binanceId`. - PAY sender: + * `payerInfo=binanceId`; `receiverInfo=name`. - PAY receiver: + * `payerInfo=name`; `receiverInfo=binanceId, name`. - PAY_REFUND + * sender: `payerInfo=binanceId, name`; `receiverInfo=name, + * accountId`. - PAY_REFUND receiver: `payerInfo=name`; + * `receiverInfo=binanceId`. - PAYOUT sender: `payerInfo=binanceId, + * name`; `receiverInfo=name, accountId`. - PAYOUT receiver: + * `payerInfo=name`; `receiverInfo=binanceId`. - CRYPTO_BOX_RF + * receiver: `payerInfo=name` (always `\"Crypto Box\"`); + * `receiverInfo=binanceId`. - REMITTANCE sender: + * `payerInfo=binanceId`; `receiverInfo=name, institutionName, + * cardNumber, digitalWalletId`. + * + * @throws ApiException if the Api call fails + */ + public void getPayTradeHistoryExample() throws ApiException, IOException { + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long limit = 100L; + Long recvWindow = 5000L; + ApiResponse response = + getApi().getPayTradeHistory(startTime, endTime, limit, recvWindow); + System.out.println(response.getData()); + } +} diff --git a/examples/pay/src/main/java/com/binance/connector/client/pay/rest/pay/GetPayTradeHistoryExample.java b/examples/pay/src/main/java/com/binance/connector/client/pay/rest/pay/GetPayTradeHistoryExample.java deleted file mode 100644 index 4cb21f9ab..000000000 --- a/examples/pay/src/main/java/com/binance/connector/client/pay/rest/pay/GetPayTradeHistoryExample.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.binance.connector.client.pay.rest.pay; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; -import com.binance.connector.client.pay.rest.PayRestApiUtil; -import com.binance.connector.client.pay.rest.api.PayRestApi; -import com.binance.connector.client.pay.rest.model.GetPayTradeHistoryResponse; - -/** API examples for PayApi */ -public class GetPayTradeHistoryExample { - private PayRestApi api; - - public PayRestApi getApi() { - if (api == null) { - ClientConfiguration clientConfiguration = PayRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - api = new PayRestApi(clientConfiguration); - } - return api; - } - - /** - * Get Pay Trade History - * - *

Get Pay Trade History * If startTime and endTime are not sent, the recent 90 days' - * data will be returned. * The max interval between startTime and endTime is 90 days. * Support - * for querying orders within the last 18 months. * For payerInfo and receiverInfo,there are - * different return values in different orderTypes. * Sender's perspective when orderType is - * C2C * payerInfo : binanceId * receiverInfo : name, - * binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input) * - * Receiver's perspective when orderType is C2C * payerInfo : name * receiverInfo : - * binanceId * Sender's perspective when orderType is CRYPTO_BOX * payerInfo : binanceId * - * receiverInfo : name(the value is always \"Crypto Box\") * Receiver's - * perspective when orderType is CRYPTO_BOX * payerInfo : name * receiverInfo : binanceId * - * Sender's perspective when orderType is PAY * payerInfo : binanceId * receiverInfo : name - * * Receiver's perspective when orderType is PAY * payerInfo : name * receiverInfo : - * binanceId, name * Sender's perspective when orderType is PAY_REFUND * payerInfo : - * binanceId, name * receiverInfo : name, accountId * Receiver's perspective when orderType - * is PAY_REFUND * payerInfo : name * receiverInfo : binanceId * Sender's perspective when - * orderType is PAYOUT * payerInfo : binanceId, name * receiverInfo : name, accountId * - * Receiver's perspective when orderType is PAYOUT * payerInfo : name * receiverInfo : - * binanceId * Receiver's perspective when orderType is CRYPTO_BOX_RF * payerInfo : name(the - * value is always \"Crypto Box\") * receiverInfo : binanceId * Sender's - * perspective when orderType is REMITTANCE * payerInfo : binanceId * receiverInfo : name, - * institutionName, cardNumber, digitalWalletId Weight: 3000 - * - * @throws ApiException if the Api call fails - */ - public void getPayTradeHistoryExample() throws ApiException { - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; - Long limit = 100L; - Long recvWindow = 5000L; - ApiResponse response = - getApi().getPayTradeHistory(startTime, endTime, limit, recvWindow); - System.out.println(response.getData()); - } -} diff --git a/examples/rebate/pom.xml b/examples/rebate/pom.xml index fb265bb43..e878750e3 100644 --- a/examples/rebate/pom.xml +++ b/examples/rebate/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-rebate - 1.2.1 + 2.0.0 \ No newline at end of file diff --git a/examples/rebate/src/main/java/com/binance/connector/client/rebate/rest/defaultpkg/GetSpotRebateHistoryRecordsExample.java b/examples/rebate/src/main/java/com/binance/connector/client/rebate/rest/defaultpkg/GetSpotRebateHistoryRecordsExample.java new file mode 100644 index 000000000..5aba69054 --- /dev/null +++ b/examples/rebate/src/main/java/com/binance/connector/client/rebate/rest/defaultpkg/GetSpotRebateHistoryRecordsExample.java @@ -0,0 +1,48 @@ +package com.binance.connector.client.rebate.rest.defaultpkg; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.rebate.rest.RebateRestApiUtil; +import com.binance.connector.client.rebate.rest.api.RebateRestApi; +import com.binance.connector.client.rebate.rest.model.GetSpotRebateHistoryRecordsResponse; +import java.io.IOException; + +/** API examples for DefaultApi */ +public class GetSpotRebateHistoryRecordsExample { + private RebateRestApi api; + + public RebateRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = RebateRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new RebateRestApi(clientConfiguration); + } + return api; + } + + /** + * Get Spot Rebate History Records (USER_DATA) + * + *

Get Spot Rebate History Records Weight(UID): 12000 Security Type: USER_DATA Notes: - The + * max interval between `startTime` and `endTime` is 30 days. - If + * `startTime` and `endTime` are not sent, the recent 7 days' data will + * be returned. - The earliest supported `startTime` is June 10, 2020. - Return up to + * 200 records per request. + * + * @throws ApiException if the Api call fails + */ + public void getSpotRebateHistoryRecordsExample() throws ApiException, IOException { + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long page = 1L; + Long recvWindow = 5000L; + ApiResponse response = + getApi().getSpotRebateHistoryRecords(startTime, endTime, page, recvWindow); + System.out.println(response.getData()); + } +} diff --git a/examples/rebate/src/main/java/com/binance/connector/client/rebate/rest/rebate/GetSpotRebateHistoryRecordsExample.java b/examples/rebate/src/main/java/com/binance/connector/client/rebate/rest/rebate/GetSpotRebateHistoryRecordsExample.java deleted file mode 100644 index 81256e644..000000000 --- a/examples/rebate/src/main/java/com/binance/connector/client/rebate/rest/rebate/GetSpotRebateHistoryRecordsExample.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.binance.connector.client.rebate.rest.rebate; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; -import com.binance.connector.client.rebate.rest.RebateRestApiUtil; -import com.binance.connector.client.rebate.rest.api.RebateRestApi; -import com.binance.connector.client.rebate.rest.model.GetSpotRebateHistoryRecordsResponse; - -/** API examples for RebateApi */ -public class GetSpotRebateHistoryRecordsExample { - private RebateRestApi api; - - public RebateRestApi getApi() { - if (api == null) { - ClientConfiguration clientConfiguration = RebateRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - api = new RebateRestApi(clientConfiguration); - } - return api; - } - - /** - * Get Spot Rebate History Records (USER_DATA) - * - *

Get Spot Rebate History Records * The max interval between startTime and endTime is 30 - * days. * If startTime and endTime are not sent, the recent 7 days' data will be returned. - * * The earliest startTime is supported on June 10, 2020 * Return up to 200 records per - * request. Weight: 12000 - * - * @throws ApiException if the Api call fails - */ - public void getSpotRebateHistoryRecordsExample() throws ApiException { - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; - Long page = 1L; - Long recvWindow = 5000L; - ApiResponse response = - getApi().getSpotRebateHistoryRecords(startTime, endTime, page, recvWindow); - System.out.println(response.getData()); - } -} diff --git a/examples/simple-earn/pom.xml b/examples/simple-earn/pom.xml index 445d3ec62..cc6a401d0 100644 --- a/examples/simple-earn/pom.xml +++ b/examples/simple-earn/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-simple-earn - 6.0.0 + 7.0.0 \ No newline at end of file diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdAccountExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdAccountExample.java index 27c0bd17c..bca9392c6 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdAccountExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdAccountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetBfusdAccountResponse; +import java.io.IOException; /** API examples for BfusdApi */ public class GetBfusdAccountExample { @@ -28,11 +29,11 @@ public SimpleEarnRestApi getApi() { /** * Get BFUSD Account (USER_DATA) * - *

Get BFUSD account information. Weight: 150 + *

Get BFUSD account information. Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getBfusdAccountExample() throws ApiException { + public void getBfusdAccountExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getBfusdAccount(recvWindow); System.out.println(response.getData()); diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdQuotaDetailsExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdQuotaDetailsExample.java index eb7e25f2d..26a322a41 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdQuotaDetailsExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdQuotaDetailsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetBfusdQuotaDetailsResponse; +import java.io.IOException; /** API examples for BfusdApi */ public class GetBfusdQuotaDetailsExample { @@ -28,12 +29,12 @@ public SimpleEarnRestApi getApi() { /** * Get BFUSD Quota Details (USER_DATA) * - *

Get BFUSD quota details including subscription quota, fast redemption quota and standard - * redemption quota. Weight: 150 + *

Get BFUSD quota details including subscription quota, fast redemption quota, and standard + * redemption quota. Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getBfusdQuotaDetailsExample() throws ApiException { + public void getBfusdQuotaDetailsExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getBfusdQuotaDetails(recvWindow); diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRateHistoryExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRateHistoryExample.java index 221cc8539..db139f1e7 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRateHistoryExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRateHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetBfusdRateHistoryResponse; +import java.io.IOException; /** API examples for BfusdApi */ public class GetBfusdRateHistoryExample { @@ -28,19 +29,19 @@ public SimpleEarnRestApi getApi() { /** * Get BFUSD Rate History (USER_DATA) * - *

Get BFUSD rate history sorted by descending order. * The time between - * `startTime` and `endTime` cannot be longer than 6 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time minus - * one month, and data between `startTime` and `endTime` will be returned. - * Weight: 150 + *

Get BFUSD rate history sorted by descending order. Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 6 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, `endTime` will default to current time, and + * results from `startTime` onward will be returned. - If `endTime` is sent + * but `startTime` is not sent, `startTime` defaults to the current time + * minus one month, and data between `startTime` and `endTime` will be + * returned. * * @throws ApiException if the Api call fails */ - public void getBfusdRateHistoryExample() throws ApiException { + public void getBfusdRateHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRedemptionHistoryExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRedemptionHistoryExample.java index c03bf4777..1428dcc71 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRedemptionHistoryExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRedemptionHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetBfusdRedemptionHistoryResponse; +import java.io.IOException; /** API examples for BfusdApi */ public class GetBfusdRedemptionHistoryExample { @@ -28,18 +29,18 @@ public SimpleEarnRestApi getApi() { /** * Get BFUSD Redemption History (USER_DATA) * - *

Get BFUSD redemption history. * The time between `startTime` and - * `endTime` cannot be longer than 6 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, `endTime` will - * default to current time, and results from `startTime` onward will be returned. * If - * `endTime` is sent but `startTime` is not sent, `startTime` - * defaults to the current time minus one month, and data between `startTime` and - * `endTime` will be returned. Weight: 150 + *

Get BFUSD redemption history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 6 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, `endTime` will default to current time, and results from + * `startTime` onward will be returned. - If `endTime` is sent but + * `startTime` is not sent, `startTime` defaults to the current time minus + * one month, and data between `startTime` and `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getBfusdRedemptionHistoryExample() throws ApiException { + public void getBfusdRedemptionHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRewardsHistoryExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRewardsHistoryExample.java index 2dc4e86d7..61241e7e4 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRewardsHistoryExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdRewardsHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetBfusdRewardsHistoryResponse; +import java.io.IOException; /** API examples for BfusdApi */ public class GetBfusdRewardsHistoryExample { @@ -28,18 +29,18 @@ public SimpleEarnRestApi getApi() { /** * Get BFUSD Rewards History (USER_DATA) * - *

Get BFUSD rewards history. * The time between `startTime` and - * `endTime` cannot be longer than 6 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, `endTime` will - * default to current time, and results from `startTime` onward will be returned. * If - * `endTime` is sent but `startTime` is not sent, `startTime` - * defaults to the current time minus one month, and data between `startTime` and - * `endTime` will be returned. Weight: 150 + *

Get BFUSD rewards history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 6 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, `endTime` will default to current time, and results from + * `startTime` onward will be returned. - If `endTime` is sent but + * `startTime` is not sent, `startTime` defaults to the current time minus + * one month, and data between `startTime` and `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getBfusdRewardsHistoryExample() throws ApiException { + public void getBfusdRewardsHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdSubscriptionHistoryExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdSubscriptionHistoryExample.java index b92dea0c0..8226a2473 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdSubscriptionHistoryExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/GetBfusdSubscriptionHistoryExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; +import com.binance.connector.client.simple_earn.rest.model.Asset; import com.binance.connector.client.simple_earn.rest.model.GetBfusdSubscriptionHistoryResponse; +import java.io.IOException; /** API examples for BfusdApi */ public class GetBfusdSubscriptionHistoryExample { @@ -26,21 +28,22 @@ public SimpleEarnRestApi getApi() { } /** - * Get BFUSD subscription history(USER_DATA) + * Get BFUSD subscription history (USER_DATA) * - *

Get BFUSD subscription history * The time between `startTime` and - * `endTime` cannot be longer than 6 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, `endTime` will - * default to current time, and results from `startTime` onward will be returned. * If - * `endTime` is sent but `startTime` is not sent, `startTime` - * defaults to the current time advanced by one month, and data between `startTime` - * and `endTime` will be returned. Weight: 150 + *

Get BFUSD subscription history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 6 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, `endTime` will default to current time, and results from + * `startTime` onward will be returned. - If `endTime` is sent but + * `startTime` is not sent, `startTime` defaults to the current time + * advanced by one month, and data between `startTime` and `endTime` will be + * returned. * * @throws ApiException if the Api call fails */ - public void getBfusdSubscriptionHistoryExample() throws ApiException { - String asset = ""; + public void getBfusdSubscriptionHistoryExample() throws ApiException, IOException { + Asset asset = Asset.USDT; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/RedeemBfusdExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/RedeemBfusdExample.java index ebdc0703a..69a65c3ea 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/RedeemBfusdExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/RedeemBfusdExample.java @@ -6,8 +6,10 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; +import com.binance.connector.client.simple_earn.rest.model.OrderType; import com.binance.connector.client.simple_earn.rest.model.RedeemBfusdRequest; import com.binance.connector.client.simple_earn.rest.model.RedeemBfusdResponse; +import java.io.IOException; /** API examples for BfusdApi */ public class RedeemBfusdExample { @@ -27,17 +29,19 @@ public SimpleEarnRestApi getApi() { } /** - * Redeem BFUSD(TRADE) + * Redeem BFUSD (TRADE) * - *

Redeem BFUSD to USDT * You need to open Enable Spot & Margin Trading permission for - * the API Key which requests this endpoint. Weight: 150 + *

Redeem BFUSD to USDT Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable + * Spot & Margin Trading permission for the API Key which requests this endpoint. - This API + * only supports BFUSD redemption to the Spot Account. Redemptions to the Funding Account or any + * other account type are not supported. * * @throws ApiException if the Api call fails */ - public void redeemBfusdExample() throws ApiException { + public void redeemBfusdExample() throws ApiException, IOException { RedeemBfusdRequest redeemBfusdRequest = new RedeemBfusdRequest(); redeemBfusdRequest.amount(1.0d); - redeemBfusdRequest.type("s"); + redeemBfusdRequest.type(OrderType.FAST); ApiResponse response = getApi().redeemBfusd(redeemBfusdRequest); System.out.println(response.getData()); } diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/SubscribeBfusdExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/SubscribeBfusdExample.java index bf6bba6dd..745a2ebb0 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/SubscribeBfusdExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/bfusd/SubscribeBfusdExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.SubscribeBfusdRequest; import com.binance.connector.client.simple_earn.rest.model.SubscribeBfusdResponse; +import java.io.IOException; /** API examples for BfusdApi */ public class SubscribeBfusdExample { @@ -27,16 +28,18 @@ public SimpleEarnRestApi getApi() { } /** - * Subscribe BFUSD(TRADE) + * Subscribe BFUSD (TRADE) * - *

Subscribe BFUSD * You need to open Enable Spot & Margin Trading permission for the API - * Key which requests this endpoint. Weight: 150 + *

Subscribe BFUSD Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable Spot + * & Margin Trading permission for the API Key which requests this endpoint. - This API only + * supports BFUSD subscription using assets held in the Spot Account. Subscriptions initiated + * from the Funding Account or any other account type are not supported. * * @throws ApiException if the Api call fails */ - public void subscribeBfusdExample() throws ApiException { + public void subscribeBfusdExample() throws ApiException, IOException { SubscribeBfusdRequest subscribeBfusdRequest = new SubscribeBfusdRequest(); - subscribeBfusdRequest.asset(""); + subscribeBfusdRequest.asset("USDT"); subscribeBfusdRequest.amount(1.0d); ApiResponse response = getApi().subscribeBfusd(subscribeBfusdRequest); diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetCollateralRecordExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetCollateralRecordExample.java index 4b0fa3803..7db0c1518 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetCollateralRecordExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetCollateralRecordExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetCollateralRecordResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class GetCollateralRecordExample { @@ -26,19 +27,19 @@ public SimpleEarnRestApi getApi() { } /** - * Get Collateral Record(USER_DATA) + * Get Collateral Record (USER_DATA) * - *

Get Collateral Record * The time between `startTime` and `endTime` - * cannot be longer than 30 days. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 1 + *

Get Collateral Record Weight(IP): 1 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 30 days. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getCollateralRecordExample() throws ApiException { + public void getCollateralRecordExample() throws ApiException, IOException { String productId = "1"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexiblePersonalLeftQuotaExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexiblePersonalLeftQuotaExample.java index 8f667ede0..68e7d8ac3 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexiblePersonalLeftQuotaExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexiblePersonalLeftQuotaExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetFlexiblePersonalLeftQuotaResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class GetFlexiblePersonalLeftQuotaExample { @@ -26,13 +27,13 @@ public SimpleEarnRestApi getApi() { } /** - * Get Flexible Personal Left Quota(USER_DATA) + * Get Flexible Personal Left Quota (USER_DATA) * - *

Get Flexible Personal Left Quota Weight: 150 + *

Get Flexible Personal Left Quota Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getFlexiblePersonalLeftQuotaExample() throws ApiException { + public void getFlexiblePersonalLeftQuotaExample() throws ApiException, IOException { String productId = "1"; Long recvWindow = 5000L; ApiResponse response = diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleProductPositionExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleProductPositionExample.java index e1dc5520c..8f512111f 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleProductPositionExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleProductPositionExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetFlexibleProductPositionResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class GetFlexibleProductPositionExample { @@ -26,14 +27,14 @@ public SimpleEarnRestApi getApi() { } /** - * Get Flexible Product Position(USER_DATA) + * Get Flexible Product Position (USER_DATA) * - *

Get Flexible Product Position Weight: 150 + *

Get Flexible Product Position Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getFlexibleProductPositionExample() throws ApiException { - String asset = ""; + public void getFlexibleProductPositionExample() throws ApiException, IOException { + String asset = "USDC"; String productId = "1"; Long current = 1L; Long size = 10L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleRedemptionRecordExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleRedemptionRecordExample.java index 0aed46f7d..ee420ab09 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleRedemptionRecordExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleRedemptionRecordExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetFlexibleRedemptionRecordResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class GetFlexibleRedemptionRecordExample { @@ -26,22 +27,22 @@ public SimpleEarnRestApi getApi() { } /** - * Get Flexible Redemption Record(USER_DATA) + * Get Flexible Redemption Record (USER_DATA) * - *

Get Flexible Redemption Record * The time between `startTime` and - * `endTime` cannot be longer than 30 days. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get Flexible Redemption Record Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 30 days. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getFlexibleRedemptionRecordExample() throws ApiException { + public void getFlexibleRedemptionRecordExample() throws ApiException, IOException { String productId = "1"; String redeemId = "1"; - String asset = ""; + String asset = "USDC"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleRewardsHistoryExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleRewardsHistoryExample.java index d30a2e0e5..4e4cbc58b 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleRewardsHistoryExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleRewardsHistoryExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetFlexibleRewardsHistoryResponse; +import com.binance.connector.client.simple_earn.rest.model.OrderType; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class GetFlexibleRewardsHistoryExample { @@ -26,34 +28,34 @@ public SimpleEarnRestApi getApi() { } /** - * Get Flexible Rewards History(USER_DATA) + * Get Flexible Rewards History (USER_DATA) * - *

Get Flexible Rewards History * The time between `startTime` and - * `endTime` cannot be longer than 30 days. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get Flexible Rewards History Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 30 days. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getFlexibleRewardsHistoryExample() throws ApiException { - String type = "s"; + public void getFlexibleRewardsHistoryExample() throws ApiException, IOException { String productId = "1"; - String asset = ""; + String asset = "USDC"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; + OrderType type = OrderType.FAST; Long current = 1L; Long size = 10L; Long recvWindow = 5000L; ApiResponse response = getApi().getFlexibleRewardsHistory( - type, productId, asset, startTime, endTime, + type, current, size, recvWindow); diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleSubscriptionPreviewExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleSubscriptionPreviewExample.java index 7f7d0a1b2..6d2106da8 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleSubscriptionPreviewExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleSubscriptionPreviewExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetFlexibleSubscriptionPreviewResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class GetFlexibleSubscriptionPreviewExample { @@ -26,13 +27,13 @@ public SimpleEarnRestApi getApi() { } /** - * Get Flexible Subscription Preview(USER_DATA) + * Get Flexible Subscription Preview (USER_DATA) * - *

Get Flexible Subscription Preview Weight: 150 + *

Get Flexible Subscription Preview Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getFlexibleSubscriptionPreviewExample() throws ApiException { + public void getFlexibleSubscriptionPreviewExample() throws ApiException, IOException { String productId = "1"; Double amount = 1.0d; Long recvWindow = 5000L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleSubscriptionRecordExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleSubscriptionRecordExample.java index 961e838cd..37cab042f 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleSubscriptionRecordExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetFlexibleSubscriptionRecordExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetFlexibleSubscriptionRecordResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class GetFlexibleSubscriptionRecordExample { @@ -26,22 +27,22 @@ public SimpleEarnRestApi getApi() { } /** - * Get Flexible Subscription Record(USER_DATA) + * Get Flexible Subscription Record (USER_DATA) * - *

Get Flexible Subscription Record * The time between `startTime` and - * `endTime` cannot be longer than 30 days. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get Flexible Subscription Record Weight(IP): 150 Security Type: USER_DATA Notes: - The + * time between `startTime` and `endTime` cannot be longer than 30 days. - + * If `startTime` and `endTime` are both not sent, then the last 30 + * days' data will be returned. - If `startTime` is sent but `endTime` + * is not sent, the next 30 days' data beginning from `startTime` will be + * returned. - If `endTime` is sent but `startTime` is not sent, the 30 + * days' data before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getFlexibleSubscriptionRecordExample() throws ApiException { + public void getFlexibleSubscriptionRecordExample() throws ApiException, IOException { String productId = "1"; String purchaseId = "1"; - String asset = ""; + String asset = "USDC"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedPersonalLeftQuotaExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedPersonalLeftQuotaExample.java index 87cc92332..a93d3192e 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedPersonalLeftQuotaExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedPersonalLeftQuotaExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetLockedPersonalLeftQuotaResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class GetLockedPersonalLeftQuotaExample { @@ -26,13 +27,13 @@ public SimpleEarnRestApi getApi() { } /** - * Get Locked Personal Left Quota(USER_DATA) + * Get Locked Personal Left Quota (USER_DATA) * - *

Get Locked Personal Left Quota Weight: 150 + *

Get Locked Personal Left Quota Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getLockedPersonalLeftQuotaExample() throws ApiException { + public void getLockedPersonalLeftQuotaExample() throws ApiException, IOException { String projectId = "1"; Long recvWindow = 5000L; ApiResponse response = diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedProductPositionExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedProductPositionExample.java index f39827620..85dd7a54c 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedProductPositionExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedProductPositionExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetLockedProductPositionResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class GetLockedProductPositionExample { @@ -26,14 +27,14 @@ public SimpleEarnRestApi getApi() { } /** - * Get Locked Product Position + * Get Locked Product Position (USER_DATA) * - *

Get Locked Product Position Weight: 150 + *

Get Locked Product Position Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getLockedProductPositionExample() throws ApiException { - String asset = ""; + public void getLockedProductPositionExample() throws ApiException, IOException { + String asset = "USDC"; String positionId = "1"; String projectId = "1"; Long current = 1L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedRedemptionRecordExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedRedemptionRecordExample.java index 05fd097b4..a961f885b 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedRedemptionRecordExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedRedemptionRecordExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetLockedRedemptionRecordResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class GetLockedRedemptionRecordExample { @@ -26,22 +27,22 @@ public SimpleEarnRestApi getApi() { } /** - * Get Locked Redemption Record(USER_DATA) + * Get Locked Redemption Record (USER_DATA) * - *

Get Locked Redemption Record * The time between `startTime` and - * `endTime` cannot be longer than 30 days. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get Locked Redemption Record Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 30 days. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getLockedRedemptionRecordExample() throws ApiException { + public void getLockedRedemptionRecordExample() throws ApiException, IOException { String positionId = "1"; String redeemId = "1"; - String asset = ""; + String asset = "USDC"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedRewardsHistoryExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedRewardsHistoryExample.java index 8edfabc9a..aa1527b60 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedRewardsHistoryExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedRewardsHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetLockedRewardsHistoryResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class GetLockedRewardsHistoryExample { @@ -26,21 +27,21 @@ public SimpleEarnRestApi getApi() { } /** - * Get Locked Rewards History(USER_DATA) + * Get Locked Rewards History (USER_DATA) * - *

Get Locked Rewards History * The time between `startTime` and - * `endTime` cannot be longer than 30 days. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get Locked Rewards History Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 30 days. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getLockedRewardsHistoryExample() throws ApiException { + public void getLockedRewardsHistoryExample() throws ApiException, IOException { String positionId = "1"; - String asset = ""; + String asset = "USDC"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedSubscriptionPreviewExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedSubscriptionPreviewExample.java index 9b5235b3a..69ab56668 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedSubscriptionPreviewExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedSubscriptionPreviewExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetLockedSubscriptionPreviewResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class GetLockedSubscriptionPreviewExample { @@ -26,16 +27,16 @@ public SimpleEarnRestApi getApi() { } /** - * Get Locked Subscription Preview(USER_DATA) + * Get Locked Subscription Preview (USER_DATA) * - *

Get Locked Subscription Preview Weight: 150 + *

Get Locked Subscription Preview Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getLockedSubscriptionPreviewExample() throws ApiException { + public void getLockedSubscriptionPreviewExample() throws ApiException, IOException { String projectId = "1"; Double amount = 1.0d; - Boolean autoSubscribe = false; + Boolean autoSubscribe = true; Long recvWindow = 5000L; ApiResponse response = getApi().getLockedSubscriptionPreview(projectId, amount, autoSubscribe, recvWindow); diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedSubscriptionRecordExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedSubscriptionRecordExample.java index 8b295c20c..7f88bc56e 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedSubscriptionRecordExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetLockedSubscriptionRecordExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetLockedSubscriptionRecordResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class GetLockedSubscriptionRecordExample { @@ -26,21 +27,21 @@ public SimpleEarnRestApi getApi() { } /** - * Get Locked Subscription Record(USER_DATA) + * Get Locked Subscription Record (USER_DATA) * - *

Get Locked Subscription Record * The time between `startTime` and - * `endTime` cannot be longer than 30 days. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get Locked Subscription Record Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 30 days. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getLockedSubscriptionRecordExample() throws ApiException { + public void getLockedSubscriptionRecordExample() throws ApiException, IOException { String purchaseId = "1"; - String asset = ""; + String asset = "USDC"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetRateHistoryExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetRateHistoryExample.java index 890a032a0..a5d4d1d7c 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetRateHistoryExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetRateHistoryExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; +import com.binance.connector.client.simple_earn.rest.model.AprPeriod; import com.binance.connector.client.simple_earn.rest.model.GetRateHistoryResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class GetRateHistoryExample { @@ -26,20 +28,21 @@ public SimpleEarnRestApi getApi() { } /** - * Get Rate History(USER_DATA) + * Get Rate History (USER_DATA) * - *

Get Rate History * The time between startTime and endTime cannot be longer than 1 year. * - * If `startTime` and `endTime` are both not sent, then the last 30 - * days' data will be returned. * If `startTime` is sent but `endTime` - * is not sent, the next 30 days' data beginning from `startTime` will be - * returned. * If `endTime` is sent but `startTime` is not sent, the 30 - * days' data before `endTime` will be returned. Weight: 150 + *

Get Rate History Weight(IP): 150 Security Type: USER_DATA Notes: - The time between + * startTime and endTime cannot be longer than 1 year. - If `startTime` and + * `endTime` are both not sent, then the last 30 days' data will be returned. - If + * `startTime` is sent but `endTime` is not sent, the next 30 days' data + * beginning from `startTime` will be returned. - If `endTime` is sent but + * `startTime` is not sent, the 30 days' data before `endTime` will be + * returned. * * @throws ApiException if the Api call fails */ - public void getRateHistoryExample() throws ApiException { + public void getRateHistoryExample() throws ApiException, IOException { String productId = "1"; - String aprPeriod = "DAY"; + AprPeriod aprPeriod = AprPeriod.DAY; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetSimpleEarnFlexibleProductListExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetSimpleEarnFlexibleProductListExample.java index d469c1225..28af0d0e9 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetSimpleEarnFlexibleProductListExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetSimpleEarnFlexibleProductListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetSimpleEarnFlexibleProductListResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class GetSimpleEarnFlexibleProductListExample { @@ -26,14 +27,14 @@ public SimpleEarnRestApi getApi() { } /** - * Get Simple Earn Flexible Product List(USER_DATA) + * Get Simple Earn Flexible Product List (USER_DATA) * - *

Get available Simple Earn flexible product list Weight: 150 + *

Get available Simple Earn flexible product list Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getSimpleEarnFlexibleProductListExample() throws ApiException { - String asset = ""; + public void getSimpleEarnFlexibleProductListExample() throws ApiException, IOException { + String asset = "USDC"; Long current = 1L; Long size = 10L; Long recvWindow = 5000L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetSimpleEarnLockedProductListExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetSimpleEarnLockedProductListExample.java index ebcc63939..5b33e924e 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetSimpleEarnLockedProductListExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/GetSimpleEarnLockedProductListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetSimpleEarnLockedProductListResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class GetSimpleEarnLockedProductListExample { @@ -26,15 +27,15 @@ public SimpleEarnRestApi getApi() { } /** - * Get Simple Earn Locked Product List(USER_DATA) + * Get Simple Earn Locked Product List (USER_DATA) * - *

Get Simple Earn Locked Product List * Get available Simple Earn locked product list - * Weight: 150 + *

Get Simple Earn Locked Product List Weight(IP): 150 Security Type: USER_DATA Notes: - Get + * available Simple Earn locked product list * * @throws ApiException if the Api call fails */ - public void getSimpleEarnLockedProductListExample() throws ApiException { - String asset = ""; + public void getSimpleEarnLockedProductListExample() throws ApiException, IOException { + String asset = "USDC"; Long current = 1L; Long size = 10L; Long recvWindow = 5000L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/RedeemFlexibleProductExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/RedeemFlexibleProductExample.java index e5f6cb9f8..ca7992121 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/RedeemFlexibleProductExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/RedeemFlexibleProductExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.RedeemFlexibleProductRequest; import com.binance.connector.client.simple_earn.rest.model.RedeemFlexibleProductResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class RedeemFlexibleProductExample { @@ -27,14 +28,15 @@ public SimpleEarnRestApi getApi() { } /** - * Redeem Flexible Product(TRADE) + * Redeem Flexible Product (TRADE) * - *

Redeem Flexible Product * You need to open `Enable Spot & Margin Trading` - * permission for the API Key which requests this endpoint. Weight: 1 + *

Redeem Flexible Product Weight(IP): 1 Security Type: TRADE Notes: - You need to open + * `Enable Spot & Margin Trading` permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ - public void redeemFlexibleProductExample() throws ApiException { + public void redeemFlexibleProductExample() throws ApiException, IOException { RedeemFlexibleProductRequest redeemFlexibleProductRequest = new RedeemFlexibleProductRequest(); redeemFlexibleProductRequest.productId("1"); diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/RedeemLockedProductExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/RedeemLockedProductExample.java index 7eebca0c1..b0c3c9099 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/RedeemLockedProductExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/RedeemLockedProductExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.RedeemLockedProductRequest; import com.binance.connector.client.simple_earn.rest.model.RedeemLockedProductResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class RedeemLockedProductExample { @@ -27,14 +28,15 @@ public SimpleEarnRestApi getApi() { } /** - * Redeem Locked Product(TRADE) + * Redeem Locked Product (TRADE) * - *

Redeem Locked Product * You need to open `Enable Spot & Margin Trading` - * permission for the API Key which requests this endpoint. Weight: 1/3s per account + *

Redeem Locked Product Weight(IP): 1 Security Type: TRADE Notes: - You need to open + * `Enable Spot & Margin Trading` permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ - public void redeemLockedProductExample() throws ApiException { + public void redeemLockedProductExample() throws ApiException, IOException { RedeemLockedProductRequest redeemLockedProductRequest = new RedeemLockedProductRequest(); redeemLockedProductRequest.positionId("1"); ApiResponse response = diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetFlexibleAutoSubscribeExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetFlexibleAutoSubscribeExample.java index 8c3f24821..742b4371a 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetFlexibleAutoSubscribeExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetFlexibleAutoSubscribeExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.SetFlexibleAutoSubscribeRequest; import com.binance.connector.client.simple_earn.rest.model.SetFlexibleAutoSubscribeResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class SetFlexibleAutoSubscribeExample { @@ -27,17 +28,17 @@ public SimpleEarnRestApi getApi() { } /** - * Set Flexible Auto Subscribe(USER_DATA) + * Set Flexible Auto Subscribe (USER_DATA) * - *

Set Flexible Auto Subscribe Weight: 150 + *

Set Flexible Auto Subscribe Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void setFlexibleAutoSubscribeExample() throws ApiException { + public void setFlexibleAutoSubscribeExample() throws ApiException, IOException { SetFlexibleAutoSubscribeRequest setFlexibleAutoSubscribeRequest = new SetFlexibleAutoSubscribeRequest(); setFlexibleAutoSubscribeRequest.productId("1"); - setFlexibleAutoSubscribeRequest.autoSubscribe(false); + setFlexibleAutoSubscribeRequest.autoSubscribe(true); ApiResponse response = getApi().setFlexibleAutoSubscribe(setFlexibleAutoSubscribeRequest); System.out.println(response.getData()); diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetLockedAutoSubscribeExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetLockedAutoSubscribeExample.java index 984622bc7..f2fffd042 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetLockedAutoSubscribeExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetLockedAutoSubscribeExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.SetLockedAutoSubscribeRequest; import com.binance.connector.client.simple_earn.rest.model.SetLockedAutoSubscribeResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class SetLockedAutoSubscribeExample { @@ -27,17 +28,17 @@ public SimpleEarnRestApi getApi() { } /** - * Set Locked Auto Subscribe(USER_DATA) + * Set Locked Auto Subscribe (USER_DATA) * - *

Set locked auto subscribe Weight: 150 + *

Set locked auto subscribe Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void setLockedAutoSubscribeExample() throws ApiException { + public void setLockedAutoSubscribeExample() throws ApiException, IOException { SetLockedAutoSubscribeRequest setLockedAutoSubscribeRequest = new SetLockedAutoSubscribeRequest(); setLockedAutoSubscribeRequest.positionId("1"); - setLockedAutoSubscribeRequest.autoSubscribe(false); + setLockedAutoSubscribeRequest.autoSubscribe(true); ApiResponse response = getApi().setLockedAutoSubscribe(setLockedAutoSubscribeRequest); System.out.println(response.getData()); diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetLockedProductRedeemOptionExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetLockedProductRedeemOptionExample.java index 00fa55e4f..61f59bd77 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetLockedProductRedeemOptionExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SetLockedProductRedeemOptionExample.java @@ -6,8 +6,10 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; +import com.binance.connector.client.simple_earn.rest.model.RedeemTo; import com.binance.connector.client.simple_earn.rest.model.SetLockedProductRedeemOptionRequest; import com.binance.connector.client.simple_earn.rest.model.SetLockedProductRedeemOptionResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class SetLockedProductRedeemOptionExample { @@ -27,17 +29,17 @@ public SimpleEarnRestApi getApi() { } /** - * Set Locked Product Redeem Option(USER_DATA) + * Set Locked Product Redeem Option (USER_DATA) * - *

Set redeem option for Locked product Weight: 50 + *

Set redeem option for Locked product Weight(IP): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void setLockedProductRedeemOptionExample() throws ApiException { + public void setLockedProductRedeemOptionExample() throws ApiException, IOException { SetLockedProductRedeemOptionRequest setLockedProductRedeemOptionRequest = new SetLockedProductRedeemOptionRequest(); setLockedProductRedeemOptionRequest.positionId("1"); - setLockedProductRedeemOptionRequest.redeemTo("SPOT"); + setLockedProductRedeemOptionRequest.redeemTo(RedeemTo.SPOT); ApiResponse response = getApi().setLockedProductRedeemOption(setLockedProductRedeemOptionRequest); System.out.println(response.getData()); diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SimpleAccountExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SimpleAccountExample.java index 9c90ef2cf..b27b33f3e 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SimpleAccountExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SimpleAccountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.SimpleAccountResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class SimpleAccountExample { @@ -26,13 +27,13 @@ public SimpleEarnRestApi getApi() { } /** - * Simple Account(USER_DATA) + * Simple Account (USER_DATA) * - *

Simple Account query Weight: 150 + *

Simple Account query Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void simpleAccountExample() throws ApiException { + public void simpleAccountExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().simpleAccount(recvWindow); System.out.println(response.getData()); diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SubscribeFlexibleProductExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SubscribeFlexibleProductExample.java index e9886c5a5..fae24cf86 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SubscribeFlexibleProductExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SubscribeFlexibleProductExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.SubscribeFlexibleProductRequest; import com.binance.connector.client.simple_earn.rest.model.SubscribeFlexibleProductResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class SubscribeFlexibleProductExample { @@ -27,14 +28,15 @@ public SimpleEarnRestApi getApi() { } /** - * Subscribe Flexible Product(TRADE) + * Subscribe Flexible Product (TRADE) * - *

Subscribe Flexible Product * You need to open `Enable Spot & Margin Trading` - * permission for the API Key which requests this endpoint. Weight: 1 + *

Subscribe Flexible Product Weight(IP): 1 Security Type: TRADE Notes: - You need to open + * `Enable Spot & Margin Trading` permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ - public void subscribeFlexibleProductExample() throws ApiException { + public void subscribeFlexibleProductExample() throws ApiException, IOException { SubscribeFlexibleProductRequest subscribeFlexibleProductRequest = new SubscribeFlexibleProductRequest(); subscribeFlexibleProductRequest.productId("1"); diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SubscribeLockedProductExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SubscribeLockedProductExample.java index 99d1a6130..fbc660711 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SubscribeLockedProductExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/flexiblelocked/SubscribeLockedProductExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.SubscribeLockedProductRequest; import com.binance.connector.client.simple_earn.rest.model.SubscribeLockedProductResponse; +import java.io.IOException; /** API examples for FlexibleLockedApi */ public class SubscribeLockedProductExample { @@ -27,14 +28,15 @@ public SimpleEarnRestApi getApi() { } /** - * Subscribe Locked Product(TRADE) + * Subscribe Locked Product (TRADE) * - *

Subscribe Locked Product * You need to open `Enable Spot & Margin Trading` - * permission for the API Key which requests this endpoint. Weight: 1 + *

Subscribe Locked Product Weight(IP): 1 Security Type: TRADE Notes: - You need to open + * `Enable Spot & Margin Trading` permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ - public void subscribeLockedProductExample() throws ApiException { + public void subscribeLockedProductExample() throws ApiException, IOException { SubscribeLockedProductRequest subscribeLockedProductRequest = new SubscribeLockedProductRequest(); subscribeLockedProductRequest.projectId("1"); diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdAccountExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdAccountExample.java index 893056edf..62f46ef32 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdAccountExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdAccountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetRwusdAccountResponse; +import java.io.IOException; /** API examples for RwusdApi */ public class GetRwusdAccountExample { @@ -28,11 +29,11 @@ public SimpleEarnRestApi getApi() { /** * Get RWUSD Account (USER_DATA) * - *

Get RWUSD account information. Weight: 150 + *

Get RWUSD account information. Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getRwusdAccountExample() throws ApiException { + public void getRwusdAccountExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getRwusdAccount(recvWindow); System.out.println(response.getData()); diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdQuotaDetailsExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdQuotaDetailsExample.java index a60fbff72..9fb8bcd29 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdQuotaDetailsExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdQuotaDetailsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetRwusdQuotaDetailsResponse; +import java.io.IOException; /** API examples for RwusdApi */ public class GetRwusdQuotaDetailsExample { @@ -29,11 +30,11 @@ public SimpleEarnRestApi getApi() { * Get RWUSD Quota Details (USER_DATA) * *

Get RWUSD quota details including subscription quota, fast redemption quota, and standard - * redemption quota. Weight: 150 + * redemption quota. Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getRwusdQuotaDetailsExample() throws ApiException { + public void getRwusdQuotaDetailsExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getRwusdQuotaDetails(recvWindow); diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRateHistoryExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRateHistoryExample.java index 893ed6b78..278ee7445 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRateHistoryExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRateHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetRwusdRateHistoryResponse; +import java.io.IOException; /** API examples for RwusdApi */ public class GetRwusdRateHistoryExample { @@ -28,19 +29,19 @@ public SimpleEarnRestApi getApi() { /** * Get RWUSD Rate History (USER_DATA) * - *

Get RWUSD rate history sorted by descending order. * The time between - * `startTime` and `endTime` cannot be longer than 6 months. * If - * `startTime` and `endTime` are both not sent, then the last 30 days' - * data will be returned. * If `startTime` is sent but `endTime` is not - * sent, `endTime` will default to current time, and results from - * `startTime` onward will be returned. * If `endTime` is sent but - * `startTime` is not sent, `startTime` defaults to the current time minus - * one month, and data between `startTime` and `endTime` will be returned. - * Weight: 150 + *

Get RWUSD rate history sorted by descending order. Weight(IP): 150 Security Type: + * USER_DATA Notes: - The time between `startTime` and `endTime` cannot be + * longer than 6 months. - If `startTime` and `endTime` are both not sent, + * then the last 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, `endTime` will default to current time, and + * results from `startTime` onward will be returned. - If `endTime` is sent + * but `startTime` is not sent, `startTime` defaults to the current time + * minus one month, and data between `startTime` and `endTime` will be + * returned. * * @throws ApiException if the Api call fails */ - public void getRwusdRateHistoryExample() throws ApiException { + public void getRwusdRateHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRedemptionHistoryExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRedemptionHistoryExample.java index f824c230d..242ad1907 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRedemptionHistoryExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRedemptionHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetRwusdRedemptionHistoryResponse; +import java.io.IOException; /** API examples for RwusdApi */ public class GetRwusdRedemptionHistoryExample { @@ -28,18 +29,18 @@ public SimpleEarnRestApi getApi() { /** * Get RWUSD Redemption History (USER_DATA) * - *

Get RWUSD redemption history. * The time between `startTime` and - * `endTime` cannot be longer than 6 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, `endTime` will - * default to current time, and results from `startTime` onward will be returned. * If - * `endTime` is sent but `startTime` is not sent, `startTime` - * defaults to the current time minus one month, and data between `startTime` and - * `endTime` will be returned. Weight: 150 + *

Get RWUSD redemption history. Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 6 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, `endTime` will default to current time, and results from + * `startTime` onward will be returned. - If `endTime` is sent but + * `startTime` is not sent, `startTime` defaults to the current time minus + * one month, and data between `startTime` and `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getRwusdRedemptionHistoryExample() throws ApiException { + public void getRwusdRedemptionHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRewardsHistoryExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRewardsHistoryExample.java index 959e23f1f..973d14d95 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRewardsHistoryExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdRewardsHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; import com.binance.connector.client.simple_earn.rest.model.GetRwusdRewardsHistoryResponse; +import java.io.IOException; /** API examples for RwusdApi */ public class GetRwusdRewardsHistoryExample { @@ -28,18 +29,18 @@ public SimpleEarnRestApi getApi() { /** * Get RWUSD Rewards History (USER_DATA) * - *

Get RWUSD rewards history. * The time between `startTime` and - * `endTime` cannot be longer than 6 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, `endTime` will - * default to current time, and results from `startTime` onward will be returned. * If - * `endTime` is sent but `startTime` is not sent, `startTime` - * defaults to the current time minus one month, and data between `startTime` and - * `endTime` will be returned. Weight: 150 + *

Get RWUSD rewards history. Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 6 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, `endTime` will default to current time, and results from + * `startTime` onward will be returned. - If `endTime` is sent but + * `startTime` is not sent, `startTime` defaults to the current time minus + * one month, and data between `startTime` and `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getRwusdRewardsHistoryExample() throws ApiException { + public void getRwusdRewardsHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdSubscriptionHistoryExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdSubscriptionHistoryExample.java index dcaccca48..8a6b24572 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdSubscriptionHistoryExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/GetRwusdSubscriptionHistoryExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; +import com.binance.connector.client.simple_earn.rest.model.Asset; import com.binance.connector.client.simple_earn.rest.model.GetRwusdSubscriptionHistoryResponse; +import java.io.IOException; /** API examples for RwusdApi */ public class GetRwusdSubscriptionHistoryExample { @@ -26,21 +28,22 @@ public SimpleEarnRestApi getApi() { } /** - * Get RWUSD subscription history(USER_DATA) + * Get RWUSD subscription history (USER_DATA) * - *

Get RWUSD subscription history * The time between `startTime` and - * `endTime` cannot be longer than 6 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, `endTime` will - * default to current time, and results from `startTime` onward will be returned. * If - * `endTime` is sent but `startTime` is not sent, `startTime` - * defaults to the current time advanced by one month, and data between `startTime` - * and `endTime` will be returned. Weight: 150 + *

Get RWUSD subscription history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 6 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, `endTime` will default to current time, and results from + * `startTime` onward will be returned. - If `endTime` is sent but + * `startTime` is not sent, `startTime` defaults to the current time + * advanced by one month, and data between `startTime` and `endTime` will be + * returned. * * @throws ApiException if the Api call fails */ - public void getRwusdSubscriptionHistoryExample() throws ApiException { - String asset = ""; + public void getRwusdSubscriptionHistoryExample() throws ApiException, IOException { + Asset asset = Asset.USDT; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/RedeemRwusdExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/RedeemRwusdExample.java index aec74fc04..7f6a22302 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/RedeemRwusdExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/RedeemRwusdExample.java @@ -6,8 +6,10 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; +import com.binance.connector.client.simple_earn.rest.model.OrderType; import com.binance.connector.client.simple_earn.rest.model.RedeemRwusdRequest; import com.binance.connector.client.simple_earn.rest.model.RedeemRwusdResponse; +import java.io.IOException; /** API examples for RwusdApi */ public class RedeemRwusdExample { @@ -27,17 +29,19 @@ public SimpleEarnRestApi getApi() { } /** - * Redeem RWUSD(TRADE) + * Redeem RWUSD (TRADE) * - *

Redeem RWUSD to USDC * You need to open Enable Spot & Margin Trading permission for - * the API Key which requests this endpoint. Weight: 150 + *

Redeem RWUSD to USDC Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable + * Spot & Margin Trading permission for the API Key which requests this endpoint. - This API + * only supports RWUSD redemption to the Spot Account. Redemptions to the Funding Account or any + * other account type are not supported. * * @throws ApiException if the Api call fails */ - public void redeemRwusdExample() throws ApiException { + public void redeemRwusdExample() throws ApiException, IOException { RedeemRwusdRequest redeemRwusdRequest = new RedeemRwusdRequest(); redeemRwusdRequest.amount(1.0d); - redeemRwusdRequest.type("s"); + redeemRwusdRequest.type(OrderType.FAST); ApiResponse response = getApi().redeemRwusd(redeemRwusdRequest); System.out.println(response.getData()); } diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/SubscribeRwusdExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/SubscribeRwusdExample.java index f63453e29..a7a711c41 100644 --- a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/SubscribeRwusdExample.java +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/rwusd/SubscribeRwusdExample.java @@ -6,8 +6,10 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; +import com.binance.connector.client.simple_earn.rest.model.Asset; import com.binance.connector.client.simple_earn.rest.model.SubscribeRwusdRequest; import com.binance.connector.client.simple_earn.rest.model.SubscribeRwusdResponse; +import java.io.IOException; /** API examples for RwusdApi */ public class SubscribeRwusdExample { @@ -27,16 +29,18 @@ public SimpleEarnRestApi getApi() { } /** - * Subscribe RWUSD(TRADE) + * Subscribe RWUSD (TRADE) * - *

Subscribe RWUSD * You need to open Enable Spot & Margin Trading permission for the API - * Key which requests this endpoint. Weight: 150 + *

Subscribe RWUSD Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable Spot + * & Margin Trading permission for the API Key which requests this endpoint. - This API only + * supports RWUSD subscription using assets held in the Spot Account. Subscriptions initiated + * from the Funding Account or any other account type are not supported. * * @throws ApiException if the Api call fails */ - public void subscribeRwusdExample() throws ApiException { + public void subscribeRwusdExample() throws ApiException, IOException { SubscribeRwusdRequest subscribeRwusdRequest = new SubscribeRwusdRequest(); - subscribeRwusdRequest.asset(""); + subscribeRwusdRequest.asset(Asset.USDT); subscribeRwusdRequest.amount(1.0d); ApiResponse response = getApi().subscribeRwusd(subscribeRwusdRequest); diff --git a/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/yieldarena/GetYieldArenaActivitiesExample.java b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/yieldarena/GetYieldArenaActivitiesExample.java new file mode 100644 index 000000000..de5de8f4b --- /dev/null +++ b/examples/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/yieldarena/GetYieldArenaActivitiesExample.java @@ -0,0 +1,44 @@ +package com.binance.connector.client.simple_earn.rest.yieldarena; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.simple_earn.rest.SimpleEarnRestApiUtil; +import com.binance.connector.client.simple_earn.rest.api.SimpleEarnRestApi; +import com.binance.connector.client.simple_earn.rest.model.GetYieldArenaActivitiesResponse; +import java.io.IOException; + +/** API examples for YieldArenaApi */ +public class GetYieldArenaActivitiesExample { + private SimpleEarnRestApi api; + + public SimpleEarnRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = + SimpleEarnRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new SimpleEarnRestApi(clientConfiguration); + } + return api; + } + + /** + * Get Yield Arena Activities (USER_DATA) + * + *

Get the list of Earn Yield Arena giveaway activities currently available to the user. + * Weight(IP): 150 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + public void getYieldArenaActivitiesExample() throws ApiException, IOException { + String lang = "en"; + Long recvWindow = 5000L; + ApiResponse response = + getApi().getYieldArenaActivities(lang, recvWindow); + System.out.println(response.getData()); + } +} diff --git a/examples/spot/pom.xml b/examples/spot/pom.xml index 1d09678dc..e4ee4085b 100644 --- a/examples/spot/pom.xml +++ b/examples/spot/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-spot - 10.1.1 + 11.0.0 \ No newline at end of file diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AccountCommissionExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AccountCommissionExample.java index 814ab3188..55ec66cf1 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AccountCommissionExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AccountCommissionExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.AccountCommissionResponse; +import java.io.IOException; /** API examples for AccountApi */ public class AccountCommissionExample { @@ -25,14 +26,15 @@ public SpotRestApi getApi() { } /** - * Query Commission Rates + * Query Commission Rates (USER_DATA) * - *

Get current account commission rates. Weight: 20 + *

Get current account commission rates. Weight(IP): 20 Security Type: USER_DATA Notes: + * **Data Source:** Database * * @throws ApiException if the Api call fails */ - public void accountCommissionExample() throws ApiException { - String symbol = "BNBUSDT"; + public void accountCommissionExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; ApiResponse response = getApi().accountCommission(symbol); System.out.println(response.getData()); } diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrderListExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrderListExample.java index 0d2b6682d..208bbef68 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrderListExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrderListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.AllOrderListResponse; +import java.io.IOException; /** API examples for AccountApi */ public class AllOrderListExample { @@ -25,20 +26,20 @@ public SpotRestApi getApi() { } /** - * Query all Order lists + * Query all Order lists (USER_DATA) * *

Retrieves all order lists based on provided optional parameters. Note that the time * between `startTime` and `endTime` can't be longer than 24 hours. - * Weight: 20 + * Weight(IP): 20 Security Type: USER_DATA Notes: **Data Source:** Database * * @throws ApiException if the Api call fails */ - public void allOrderListExample() throws ApiException { + public void allOrderListExample() throws ApiException, IOException { Long fromId = 1L; Long startTime = 1735693200000L; Long endTime = 1735693200000L; - Integer limit = 500; - Double recvWindow = 5000.0d; + Integer limit = 1; + Double recvWindow = 5000d; ApiResponse response = getApi().allOrderList(fromId, startTime, endTime, limit, recvWindow); System.out.println(response.getData()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrdersExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrdersExample.java index 9e0d1868a..2b8f09b74 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrdersExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.AllOrdersResponse; +import java.io.IOException; /** API examples for AccountApi */ public class AllOrdersExample { @@ -25,19 +26,25 @@ public SpotRestApi getApi() { } /** - * All orders + * All orders (USER_DATA) * - *

Get all account orders; active, canceled, or filled. Weight: 20 + *

Get all account orders; active, canceled, or filled. Weight(IP): 20 Security Type: + * USER_DATA Notes: **Data Source:** Database - If `orderId` is set, it will get + * orders >= that `orderId`. Otherwise most recent orders are returned. - For + * some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is + * not available at this time. - If `startTime` and/or `endTime` provided, + * `orderId` is not required. - The time between `startTime` and + * `endTime` can't be longer than 24 hours. * * @throws ApiException if the Api call fails */ - public void allOrdersExample() throws ApiException { - String symbol = "BNBUSDT"; + public void allOrdersExample() throws ApiException, IOException { + String symbol = "LTCBTC"; Long orderId = 1L; Long startTime = 1735693200000L; Long endTime = 1735693200000L; - Integer limit = 500; - Double recvWindow = 5000.0d; + Integer limit = 1; + Double recvWindow = 5000d; ApiResponse response = getApi().allOrders(symbol, orderId, startTime, endTime, limit, recvWindow); System.out.println(response.getData()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetAccountExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetAccountExample.java index dff56d928..98bd66291 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetAccountExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetAccountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.GetAccountResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetAccountExample { @@ -25,15 +26,16 @@ public SpotRestApi getApi() { } /** - * Account information + * Account information (USER_DATA) * - *

Get current account information. Weight: 20 + *

Get current account information. Weight(IP): 20 Security Type: USER_DATA Notes: **Data + * Source:** Memory => Database * * @throws ApiException if the Api call fails */ - public void getAccountExample() throws ApiException { + public void getAccountExample() throws ApiException, IOException { Boolean omitZeroBalances = false; - Double recvWindow = 5000.0d; + Double recvWindow = 5000d; ApiResponse response = getApi().getAccount(omitZeroBalances, recvWindow); System.out.println(response.getData()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOpenOrdersExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOpenOrdersExample.java index df8bd740a..bd70b6e9c 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOpenOrdersExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOpenOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.GetOpenOrdersResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetOpenOrdersExample { @@ -25,16 +26,18 @@ public SpotRestApi getApi() { } /** - * Current open orders + * Current open orders (USER_DATA) * *

Get all open orders on a symbol. **Careful** when accessing this with no symbol. Weight: 6 - * for a single symbol; **80** when the symbol parameter is omitted + * for a single symbol; 80 when the symbol parameter is omitted Security Type: USER_DATA Notes: + * **Data Source:** Memory => Database - If the symbol is not sent, orders for all + * symbols will be returned in an array. * * @throws ApiException if the Api call fails */ - public void getOpenOrdersExample() throws ApiException { - String symbol = "BNBUSDT"; - Double recvWindow = 5000.0d; + public void getOpenOrdersExample() throws ApiException, IOException { + String symbol = "LTCBTC"; + Double recvWindow = 5000d; ApiResponse response = getApi().getOpenOrders(symbol, recvWindow); System.out.println(response.getData()); } diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderExample.java index 8a173f17f..434c32eb3 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.GetOrderResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetOrderExample { @@ -25,17 +26,24 @@ public SpotRestApi getApi() { } /** - * Query order + * Query order (USER_DATA) * - *

Check an order's status. Weight: 4 + *

Check an order's status. Weight(IP): 4 Security Type: USER_DATA Notes: **Data + * Source:** Memory => Database - Either `orderId` or + * `origClientOrderId` must be sent. - If both `orderId` and + * `origClientOrderId` are provided, the `orderId` is searched first, then + * the `origClientOrderId` from that result is checked against that order. If both + * conditions are not met the request will be rejected. - For some historical orders + * `cummulativeQuoteQty` will be < 0, meaning the data is not available at this + * time. * * @throws ApiException if the Api call fails */ - public void getOrderExample() throws ApiException { - String symbol = "BNBUSDT"; + public void getOrderExample() throws ApiException, IOException { + String symbol = "LTCBTC"; Long orderId = 1L; - String origClientOrderId = ""; - Double recvWindow = 5000.0d; + String origClientOrderId = "myOrder1"; + Double recvWindow = 5000d; ApiResponse response = getApi().getOrder(symbol, orderId, origClientOrderId, recvWindow); System.out.println(response.getData()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderListExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderListExample.java index e31ef8f19..5cf28b657 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderListExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.GetOrderListResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetOrderListExample { @@ -25,16 +26,17 @@ public SpotRestApi getApi() { } /** - * Query Order list + * Query Order list (USER_DATA) * - *

Retrieves a specific order list based on provided optional parameters. Weight: 4 + *

Retrieves a specific order list based on provided optional parameters. Weight(IP): 4 + * Security Type: USER_DATA Notes: **Data Source:** Database * * @throws ApiException if the Api call fails */ - public void getOrderListExample() throws ApiException { - Long orderListId = 1L; - String origClientOrderId = ""; - Double recvWindow = 5000.0d; + public void getOrderListExample() throws ApiException, IOException { + Long orderListId = 27L; + String origClientOrderId = "1"; + Double recvWindow = 5000d; ApiResponse response = getApi().getOrderList(orderListId, origClientOrderId, recvWindow); System.out.println(response.getData()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyAllocationsExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyAllocationsExample.java index e8f514a6b..5f6dd3dcb 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyAllocationsExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyAllocationsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.MyAllocationsResponse; +import java.io.IOException; /** API examples for AccountApi */ public class MyAllocationsExample { @@ -25,20 +26,31 @@ public SpotRestApi getApi() { } /** - * Query Allocations + * Query Allocations (USER_DATA) * - *

Retrieves allocations resulting from SOR order placement. Weight: 20 + *

Retrieves allocations resulting from SOR order placement. Weight(IP): 20 Security Type: + * USER_DATA Notes: **Data Source:** Database\" Supported parameter combinations: + * Parameters | Response | ------------------------------------------- | -------- | + * `symbol` | allocations from oldest to newest | `symbol` + + * `startTime` | oldest allocations since `startTime` | `symbol` + + * `endTime` | newest allocations until `endTime` | `symbol` + + * `startTime` + `endTime` | allocations within the time range | + * `symbol` + `fromAllocationId` | allocations by allocation ID | + * `symbol` + `orderId` | allocations related to an order starting with + * oldest | `symbol` + `orderId` + `fromAllocationId` | + * allocations related to an order by allocation ID | **Note:** The time between + * `startTime` and `endTime` can't be longer than 24 hours. * * @throws ApiException if the Api call fails */ - public void myAllocationsExample() throws ApiException { - String symbol = "BNBUSDT"; + public void myAllocationsExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long startTime = 1735693200000L; Long endTime = 1735693200000L; - Integer fromAllocationId = 1; - Integer limit = 500; + Integer fromAllocationId = 0; + Integer limit = 1; Long orderId = 1L; - Double recvWindow = 5000.0d; + Double recvWindow = 5000d; ApiResponse response = getApi().myAllocations( symbol, diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyFiltersExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyFiltersExample.java index 62a9bc4db..4807a98f1 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyFiltersExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyFiltersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.MyFiltersResponse; +import java.io.IOException; /** API examples for AccountApi */ public class MyFiltersExample { @@ -25,17 +26,17 @@ public SpotRestApi getApi() { } /** - * Query relevant filters + * Query relevant filters (USER_DATA) * - *

Retrieves the list of [filters](filters.md) relevant to an account on a given symbol. This - * is the only endpoint that shows if an account has `MAX_ASSET` filters applied to - * it. Weight: 40 + *

Retrieves the list of filters relevant to an account on a given symbol. This is the only + * endpoint that shows if an account has `MAX_ASSET` filters applied to it. + * Weight(IP): 40 Security Type: USER_DATA Notes: **Data Source:** Memory * * @throws ApiException if the Api call fails */ - public void myFiltersExample() throws ApiException { + public void myFiltersExample() throws ApiException, IOException { String symbol = "BNBUSDT"; - Double recvWindow = 5000.0d; + Double recvWindow = 5000d; ApiResponse response = getApi().myFilters(symbol, recvWindow); System.out.println(response.getData()); } diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyPreventedMatchesExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyPreventedMatchesExample.java index 97cfa6caf..a66b04e0e 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyPreventedMatchesExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyPreventedMatchesExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.MyPreventedMatchesResponse; +import java.io.IOException; /** API examples for AccountApi */ public class MyPreventedMatchesExample { @@ -25,25 +26,26 @@ public SpotRestApi getApi() { } /** - * Query Prevented Matches + * Query Prevented Matches (USER_DATA) * *

Displays the list of orders that were expired due to STP. These are the combinations - * supported: * `symbol` + `preventedMatchId` * `symbol` + - * `orderId` * `symbol` + `orderId` + - * `fromPreventedMatchId` (`limit` will default to 500) * `symbol` + * supported: - `symbol` + `preventedMatchId` - `symbol` + + * `orderId` - `symbol` + `orderId` + + * `fromPreventedMatchId` (`limit` will default to 500) - `symbol` * + `orderId` + `fromPreventedMatchId` + `limit` Weight: Case | * Weight ---- | ----- If `symbol` is invalid | 2 Querying by - * `preventedMatchId` | 2 Querying by `orderId` | 20 + * `preventedMatchId` | 2 Querying by `orderId` | 20 Security Type: + * USER_DATA Notes: **Data Source:** Database * * @throws ApiException if the Api call fails */ - public void myPreventedMatchesExample() throws ApiException { - String symbol = "BNBUSDT"; + public void myPreventedMatchesExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; Long preventedMatchId = 1L; Long orderId = 1L; Long fromPreventedMatchId = 1L; - Integer limit = 500; - Double recvWindow = 5000.0d; + Integer limit = 1; + Double recvWindow = 5000d; ApiResponse response = getApi().myPreventedMatches( symbol, diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyTradesExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyTradesExample.java index 4433840cd..72e107a9e 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyTradesExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/MyTradesExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.MyTradesResponse; +import java.io.IOException; /** API examples for AccountApi */ public class MyTradesExample { @@ -25,21 +26,29 @@ public SpotRestApi getApi() { } /** - * Account trade list + * Account trade list (USER_DATA) * *

Get trades for a specific account and symbol. Weight: Condition| Weight| ---| --- |Without - * orderId|20| |With orderId|5| + * orderId|20| |With orderId|5| Security Type: USER_DATA Notes: **Data Source:** Memory + * => Database **Notes:**: - If `fromId` is set, it will get trades >= + * that `fromId`. Otherwise most recent trades are returned. - The time between + * `startTime` and `endTime` can't be longer than 24 hours. - These are + * the supported combinations of all parameters: - `symbol` - `symbol` + + * `orderId` - `symbol` + `startTime` - `symbol` + + * `endTime` - `symbol` + `fromId` - `symbol` + + * `startTime` + `endTime` - `symbol`+ `orderId` + + * `fromId` * * @throws ApiException if the Api call fails */ - public void myTradesExample() throws ApiException { - String symbol = "BNBUSDT"; - Long orderId = 1L; + public void myTradesExample() throws ApiException, IOException { + String symbol = "BNBBTC"; + Long orderId = 100234L; Long startTime = 1735693200000L; Long endTime = 1735693200000L; Long fromId = 1L; - Integer limit = 500; - Double recvWindow = 5000.0d; + Integer limit = 1; + Double recvWindow = 5000d; ApiResponse response = getApi().myTrades(symbol, orderId, startTime, endTime, fromId, limit, recvWindow); System.out.println(response.getData()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/OpenOrderListExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/OpenOrderListExample.java index 2a3e38d10..9d0a2ce1c 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/OpenOrderListExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/OpenOrderListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.OpenOrderListResponse; +import java.io.IOException; /** API examples for AccountApi */ public class OpenOrderListExample { @@ -25,14 +26,15 @@ public SpotRestApi getApi() { } /** - * Query Open Order lists + * Query Open Order lists (USER_DATA) * - *

Weight: 6 + *

Query Open Order lists Weight(IP): 6 Security Type: USER_DATA Notes: **Data Source:** + * Memory -> Database * * @throws ApiException if the Api call fails */ - public void openOrderListExample() throws ApiException { - Double recvWindow = 5000.0d; + public void openOrderListExample() throws ApiException, IOException { + Double recvWindow = 5000d; ApiResponse response = getApi().openOrderList(recvWindow); System.out.println(response.getData()); } diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/OrderAmendmentsExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/OrderAmendmentsExample.java index 8217fcdfb..ff2ae2197 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/OrderAmendmentsExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/OrderAmendmentsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.OrderAmendmentsResponse; +import java.io.IOException; /** API examples for AccountApi */ public class OrderAmendmentsExample { @@ -25,18 +26,19 @@ public SpotRestApi getApi() { } /** - * Query Order Amendments + * Query Order Amendments (USER_DATA) * - *

Queries all amendments of a single order. Weight: 4 + *

Queries all amendments of a single order. Weight(IP): 4 Security Type: USER_DATA Notes: + * **Data Source:** Database * * @throws ApiException if the Api call fails */ - public void orderAmendmentsExample() throws ApiException { - String symbol = "BNBUSDT"; - Long orderId = 1L; - Long fromExecutionId = 1L; - Long limit = 500L; - Double recvWindow = 5000.0d; + public void orderAmendmentsExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Long orderId = 9L; + Long fromExecutionId = 22L; + Long limit = 1L; + Double recvWindow = 5000d; ApiResponse response = getApi().orderAmendments(symbol, orderId, fromExecutionId, limit, recvWindow); System.out.println(response.getData()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/RateLimitOrderExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/RateLimitOrderExample.java index 199d90d69..28cf03efc 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/RateLimitOrderExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/RateLimitOrderExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.RateLimitOrderResponse; +import java.io.IOException; /** API examples for AccountApi */ public class RateLimitOrderExample { @@ -25,14 +26,15 @@ public SpotRestApi getApi() { } /** - * Query Unfilled Order Count + * Query Unfilled Order Count (USER_DATA) * - *

Displays the user's unfilled order count for all intervals. Weight: 40 + *

Displays the user's unfilled order count for all intervals. Weight(IP): 40 Security + * Type: USER_DATA Notes: **Data Source:** Memory * * @throws ApiException if the Api call fails */ - public void rateLimitOrderExample() throws ApiException { - Double recvWindow = 5000.0d; + public void rateLimitOrderExample() throws ApiException, IOException { + Double recvWindow = 5000d; ApiResponse response = getApi().rateLimitOrder(recvWindow); System.out.println(response.getData()); } diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/ExchangeInfoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/ExchangeInfoExample.java index 96f3400a4..757e31255 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/ExchangeInfoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/ExchangeInfoExample.java @@ -10,6 +10,7 @@ import com.binance.connector.client.spot.rest.model.Permissions; import com.binance.connector.client.spot.rest.model.SymbolStatus; import com.binance.connector.client.spot.rest.model.Symbols; +import java.io.IOException; /** API examples for GeneralApi */ public class ExchangeInfoExample { @@ -30,15 +31,34 @@ public SpotRestApi getApi() { /** * Exchange information * - *

Current exchange trading rules and symbol information Weight: 20 + *

Current exchange trading rules and symbol information Weight(IP): 20 Security Type: NONE + * Notes: **Data Source:** Memory **Notes:** * If the value provided to `symbol` or + * `symbols` do not exist, the endpoint will throw an error saying the symbol is + * invalid. * All parameters are optional. * `permissions` can support single or + * multiple values (e.g. `SPOT`, + * `[\"MARGIN\",\"LEVERAGED\"]`). This cannot be used in + * combination with `symbol` or `symbols`. * If `permissions` + * parameter not provided, all symbols that have either `SPOT`, `MARGIN`, or + * `LEVERAGED` permission will be exposed. * To display symbols with any permission + * you need to specify them explicitly in `permissions`: (e.g. + * `[\"SPOT\",\"MARGIN\",...]`.). See Account and Symbol + * Permissions for the full list. **Examples of Symbol Permissions Interpretation from the + * Response:** * `[[\"A\",\"B\"]]` means you may place an order if + * your account has either permission \"A\" **or** permission \"B\". * + * `[[\"A\"],[\"B\"]]` means you can place an order if your + * account has permission \"A\" **and** permission \"B\". * + * `[[\"A\"],[\"B\",\"C\"]]` means you can place an + * order if your account has permission \"A\" **and** permission \"B\" or + * permission \"C\". (Inclusive or is applied here, not exclusive or, so your account + * may have both permission \"B\" and permission \"C\".) * * @throws ApiException if the Api call fails */ - public void exchangeInfoExample() throws ApiException { - String symbol = "BNBUSDT"; - Symbols symbols = null; - Permissions permissions = null; - Boolean showPermissionSets = true; + public void exchangeInfoExample() throws ApiException, IOException { + String symbol = "ETHBTC"; + Symbols symbols = Symbols.fromJson("[\"BTCUSDT\",\"BNBUSDT\"]"); + Permissions permissions = Permissions.fromJson("[\"SPOT\"]"); + Boolean showPermissionSets = false; SymbolStatus symbolStatus = SymbolStatus.TRADING; ApiResponse response = getApi().exchangeInfo( diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/ExecutionRulesExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/ExecutionRulesExample.java index 3d191d344..47aab46a1 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/ExecutionRulesExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/ExecutionRulesExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.spot.rest.model.ExecutionRulesResponse; import com.binance.connector.client.spot.rest.model.SymbolStatus; import com.binance.connector.client.spot.rest.model.Symbols; +import java.io.IOException; /** API examples for GeneralApi */ public class ExecutionRulesExample { @@ -29,14 +30,16 @@ public SpotRestApi getApi() { /** * Query Execution Rules * - *

Weight: Parameter | Weight| --- | --- `symbol` | 2 `symbols` | 2 for - * each `symbol`, capped at a max of 40| `symbolStatus` |40| None |40| + *

Query execution rules for symbols. Weight: Parameter | Weight --- | --- `symbol` + * | 2 `symbols` | 2 for each `symbol`, capped at a max of 40 + * `symbolStatus` | 40 None | 40 Security Type: NONE Notes: **Data Source:** Memory + * **Note:**: No combination of multiple parameters is allowed. * * @throws ApiException if the Api call fails */ - public void executionRulesExample() throws ApiException { - String symbol = "BNBUSDT"; - Symbols symbols = null; + public void executionRulesExample() throws ApiException, IOException { + String symbol = "BAZUSD"; + Symbols symbols = Symbols.fromJson("[\"BTCUSDT\",\"BNBUSDT\"]"); SymbolStatus symbolStatus = SymbolStatus.TRADING; ApiResponse response = getApi().executionRules(symbol, symbols, symbolStatus); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/PingExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/PingExample.java index 30ec7fcf9..a90f21122 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/PingExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/PingExample.java @@ -5,6 +5,7 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; +import java.io.IOException; /** API examples for GeneralApi */ public class PingExample { @@ -25,11 +26,11 @@ public SpotRestApi getApi() { /** * Test connectivity * - *

Test connectivity to the Rest API. Weight: 1 + *

Test connectivity to the Rest API. Weight(IP): 1 Security Type: NONE * * @throws ApiException if the Api call fails */ - public void pingExample() throws ApiException { + public void pingExample() throws ApiException, IOException { getApi().ping(); } } diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/TimeExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/TimeExample.java index a5c54eb20..1b1d2d65f 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/TimeExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/TimeExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.TimeResponse; +import java.io.IOException; /** API examples for GeneralApi */ public class TimeExample { @@ -27,11 +28,12 @@ public SpotRestApi getApi() { /** * Check server time * - *

Test connectivity to the Rest API and get the current server time. Weight: 1 + *

Test connectivity to the Rest API and get the current server time. Weight(IP): 1 Security + * Type: NONE * * @throws ApiException if the Api call fails */ - public void timeExample() throws ApiException { + public void timeExample() throws ApiException, IOException { ApiResponse response = getApi().time(); System.out.println(response.getData()); } diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/AggTradesExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/AggTradesExample.java index 62476dfda..0ad7db114 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/AggTradesExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/AggTradesExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.AggTradesResponse; +import java.io.IOException; /** API examples for MarketApi */ public class AggTradesExample { @@ -28,16 +29,18 @@ public SpotRestApi getApi() { * Compressed/Aggregate trades list * *

Get compressed, aggregate trades. Trades that fill at the time, from the same taker order, - * with the same price will have the quantity aggregated. Weight: 4 + * with the same price will have the quantity aggregated. Weight(IP): 4 Security Type: NONE + * Notes: **Data Source:** Database - If fromId, startTime, and endTime are not sent, the most + * recent aggregate trades will be returned. * * @throws ApiException if the Api call fails */ - public void aggTradesExample() throws ApiException { + public void aggTradesExample() throws ApiException, IOException { String symbol = "BNBUSDT"; Long fromId = 1L; Long startTime = 1735693200000L; Long endTime = 1735693200000L; - Integer limit = 500; + Integer limit = 1; ApiResponse response = getApi().aggTrades(symbol, fromId, startTime, endTime, limit); System.out.println(response.getData()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/AvgPriceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/AvgPriceExample.java index 119b1b94a..edc41e111 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/AvgPriceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/AvgPriceExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.AvgPriceResponse; +import java.io.IOException; /** API examples for MarketApi */ public class AvgPriceExample { @@ -27,11 +28,12 @@ public SpotRestApi getApi() { /** * Current average price * - *

Current average price for a symbol. Weight: 2 + *

Current average price for a symbol. Weight(IP): 2 Security Type: NONE Notes: **Data + * Source:** Memory * * @throws ApiException if the Api call fails */ - public void avgPriceExample() throws ApiException { + public void avgPriceExample() throws ApiException, IOException { String symbol = "BNBUSDT"; ApiResponse response = getApi().avgPrice(symbol); System.out.println(response.getData()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/DepthExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/DepthExample.java index aa5e339c7..94de47212 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/DepthExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/DepthExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.DepthResponse; import com.binance.connector.client.spot.rest.model.SymbolStatus; +import java.io.IOException; /** API examples for MarketApi */ public class DepthExample { @@ -28,14 +29,15 @@ public SpotRestApi getApi() { /** * Order book * - *

Weight: Adjusted based on the limit: |Limit|Request Weight ------|------- 1-100| 5 - * 101-500| 25 501-1000| 50 1001-5000| 250 + *

Order book Weight: Adjusted based on the limit: |Limit|Request Weight ------|------- + * 1-100| 5 101-500| 25 501-1000| 50 1001-5000| 250 Security Type: NONE Notes: **Data Source:** + * Memory * * @throws ApiException if the Api call fails */ - public void depthExample() throws ApiException { + public void depthExample() throws ApiException, IOException { String symbol = "BNBUSDT"; - Integer limit = 500; + Integer limit = 1; SymbolStatus symbolStatus = SymbolStatus.TRADING; ApiResponse response = getApi().depth(symbol, limit, symbolStatus); System.out.println(response.getData()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/GetTradesExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/GetTradesExample.java index 5d4cfad72..d12f24397 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/GetTradesExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/GetTradesExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.GetTradesResponse; +import java.io.IOException; /** API examples for MarketApi */ public class GetTradesExample { @@ -27,13 +28,13 @@ public SpotRestApi getApi() { /** * Recent trades list * - *

Get recent trades. Weight: 25 + *

Get recent trades. Weight(IP): 25 Security Type: NONE Notes: **Data Source:** Memory * * @throws ApiException if the Api call fails */ - public void getTradesExample() throws ApiException { + public void getTradesExample() throws ApiException, IOException { String symbol = "BNBUSDT"; - Integer limit = 500; + Integer limit = 1; ApiResponse response = getApi().getTrades(symbol, limit); System.out.println(response.getData()); } diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/HistoricalBlockTradesExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/HistoricalBlockTradesExample.java new file mode 100644 index 000000000..fa60b233f --- /dev/null +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/HistoricalBlockTradesExample.java @@ -0,0 +1,43 @@ +package com.binance.connector.client.spot.rest.market; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.spot.rest.SpotRestApiUtil; +import com.binance.connector.client.spot.rest.api.SpotRestApi; +import com.binance.connector.client.spot.rest.model.HistoricalBlockTradesResponse; +import java.io.IOException; + +/** API examples for MarketApi */ +public class HistoricalBlockTradesExample { + private SpotRestApi api; + + public SpotRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = SpotRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new SpotRestApi(clientConfiguration); + } + return api; + } + + /** + * Historical Block Trades (MARKET_DATA) + * + *

Get block trades. Weight(IP): 25 Security Type: MARKET_DATA Notes: - Data Source: Database + * + * @throws ApiException if the Api call fails + */ + public void historicalBlockTradesExample() throws ApiException, IOException { + String symbol = "BNBBTC"; + Long fromId = 582L; + Long limit = 500L; + ApiResponse response = + getApi().historicalBlockTrades(symbol, fromId, limit); + System.out.println(response.getData()); + } +} diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/HistoricalTradesExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/HistoricalTradesExample.java index 9c17dd383..08818488b 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/HistoricalTradesExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/HistoricalTradesExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.HistoricalTradesResponse; +import java.io.IOException; /** API examples for MarketApi */ public class HistoricalTradesExample { @@ -27,13 +28,13 @@ public SpotRestApi getApi() { /** * Old trade lookup * - *

Get older trades. Weight: 25 + *

Get older trades. Weight(IP): 25 Security Type: NONE Notes: **Data Source:** Database * * @throws ApiException if the Api call fails */ - public void historicalTradesExample() throws ApiException { + public void historicalTradesExample() throws ApiException, IOException { String symbol = "BNBUSDT"; - Integer limit = 500; + Integer limit = 1; Long fromId = 1L; ApiResponse response = getApi().historicalTrades(symbol, limit, fromId); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/KlinesExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/KlinesExample.java index 178a30e6b..e4c24e1e4 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/KlinesExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/KlinesExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.Interval; import com.binance.connector.client.spot.rest.model.KlinesResponse; +import java.io.IOException; /** API examples for MarketApi */ public class KlinesExample { @@ -29,17 +30,28 @@ public SpotRestApi getApi() { * Kline/Candlestick data * *

Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. - * Weight: 2 + * Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Database Supported kline intervals + * (case-sensitive): Interval | `interval` value --------- | ---------------- seconds + * | `1s` minutes | `1m`, `3m`, `5m`, `15m`, + * `30m` hours | `1h`, `2h`, `4h`, `6h`, + * `8h`, `12h` days | `1d`, `3d` weeks | `1w` + * months | `1M` **Notes:** * If `startTime` and `endTime` are not + * sent, the most recent klines are returned. * Supported values for `timeZone`: * + * Hours and minutes (e.g. `-1:00`, `05:45`) * Only hours (e.g. + * `0`, `8`, `4`) * Accepted range is strictly [-12:00 to +14:00] + * inclusive * If `timeZone` provided, kline intervals are interpreted in that + * timezone instead of UTC. * Note that `startTime` and `endTime` are always + * interpreted in UTC, regardless of `timeZone`. * * @throws ApiException if the Api call fails */ - public void klinesExample() throws ApiException { + public void klinesExample() throws ApiException, IOException { String symbol = "BNBUSDT"; Interval interval = Interval.INTERVAL_1s; Long startTime = 1735693200000L; Long endTime = 1735693200000L; - String timeZone = ""; - Integer limit = 500; + String timeZone = "0"; + Integer limit = 1; ApiResponse response = getApi().klines(symbol, interval, startTime, endTime, timeZone, limit); System.out.println(response.getData()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceCalculationExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceCalculationExample.java index bc6fe9664..6d881010e 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceCalculationExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceCalculationExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.ReferencePriceCalculationResponse; import com.binance.connector.client.spot.rest.model.SymbolStatus; +import java.io.IOException; /** API examples for MarketApi */ public class ReferencePriceCalculationExample { @@ -28,11 +29,12 @@ public SpotRestApi getApi() { /** * Query Reference Price Calculation * - *

Describes how reference price is calculated for a given symbol. Weight: 2 + *

Describes how reference price is calculated for a given symbol. Weight(IP): 2 Security + * Type: NONE Notes: **Data Source:** Memory * * @throws ApiException if the Api call fails */ - public void referencePriceCalculationExample() throws ApiException { + public void referencePriceCalculationExample() throws ApiException, IOException { String symbol = "BNBUSDT"; SymbolStatus symbolStatus = SymbolStatus.TRADING; ApiResponse response = diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceExample.java index 57ca224c1..119aff5b8 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.ReferencePriceResponse; +import java.io.IOException; /** API examples for MarketApi */ public class ReferencePriceExample { @@ -27,11 +28,12 @@ public SpotRestApi getApi() { /** * Query Reference Price * - *

Weight: 2 + *

Query the reference price for a symbol. Weight(IP): 2 Security Type: NONE Notes: **Data + * Source:** Memory * * @throws ApiException if the Api call fails */ - public void referencePriceExample() throws ApiException { + public void referencePriceExample() throws ApiException, IOException { String symbol = "BNBUSDT"; ApiResponse response = getApi().referencePrice(symbol); System.out.println(response.getData()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/Ticker24hrExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/Ticker24hrExample.java index 487845f88..9f3b56bfd 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/Ticker24hrExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/Ticker24hrExample.java @@ -10,6 +10,7 @@ import com.binance.connector.client.spot.rest.model.Symbols; import com.binance.connector.client.spot.rest.model.Ticker24hrResponse; import com.binance.connector.client.spot.rest.model.TickerType; +import java.io.IOException; /** API examples for MarketApi */ public class Ticker24hrExample { @@ -40,13 +41,14 @@ public SpotRestApi getApi() { * <td>2</td> </tr> <tr> <td>21-100</td> * <td>40</td> </tr> <tr> <td>101 or more</td> * <td>80</td> </tr> <tr> <td>symbols parameter is - * omitted</td> <td>80</td> </tr> </tbody> </table> + * omitted</td> <td>80</td> </tr> </tbody> </table> Security + * Type: NONE Notes: **Data Source:** Memory * * @throws ApiException if the Api call fails */ - public void ticker24hrExample() throws ApiException { + public void ticker24hrExample() throws ApiException, IOException { String symbol = "BNBUSDT"; - Symbols symbols = null; + Symbols symbols = Symbols.fromJson("[\"BTCUSDT\",\"BNBUSDT\"]"); TickerType type = TickerType.FULL; SymbolStatus symbolStatus = SymbolStatus.TRADING; ApiResponse response = diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerBookTickerExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerBookTickerExample.java index 19fdeb9ee..e086e4be2 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerBookTickerExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerBookTickerExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.spot.rest.model.SymbolStatus; import com.binance.connector.client.spot.rest.model.Symbols; import com.binance.connector.client.spot.rest.model.TickerBookTickerResponse; +import java.io.IOException; /** API examples for MarketApi */ public class TickerBookTickerExample { @@ -29,19 +30,15 @@ public SpotRestApi getApi() { /** * Symbol order book ticker * - *

Best price/qty on the order book for a symbol or symbols. Weight: <table> - * <thead> <tr> <th>Parameter</th> <th>Symbols Provided</th> - * <th>Weight</th> </tr> </thead> <tbody> <tr> <td - * rowspan=\"2\">symbol</td> <td>1</td> - * <td>2</td> </tr> <tr> <td>symbol parameter is - * omitted</td> <td>4</td> </tr> <tr> <td>symbols</td> - * <td>Any</td> <td>4</td> </tr> </tbody> </table> + *

Best price/qty on the order book for a symbol or symbols. Weight: |Parameter|Symbols + * Provided|Weight| |---|---|---| |symbol| 1 |2| | |omitted| 4| |symbols| Any |4| Security Type: + * NONE Notes: **Data Source:** Memory * * @throws ApiException if the Api call fails */ - public void tickerBookTickerExample() throws ApiException { + public void tickerBookTickerExample() throws ApiException, IOException { String symbol = "BNBUSDT"; - Symbols symbols = null; + Symbols symbols = Symbols.fromJson("[\"BTCUSDT\",\"BNBUSDT\"]"); SymbolStatus symbolStatus = SymbolStatus.TRADING; ApiResponse response = getApi().tickerBookTicker(symbol, symbols, symbolStatus); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerExample.java index 6e8192b90..22675c891 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerExample.java @@ -11,6 +11,7 @@ import com.binance.connector.client.spot.rest.model.TickerResponse; import com.binance.connector.client.spot.rest.model.TickerType; import com.binance.connector.client.spot.rest.model.WindowSize; +import java.io.IOException; /** API examples for MarketApi */ public class TickerExample { @@ -31,15 +32,22 @@ public SpotRestApi getApi() { /** * Rolling window price change statistics * - *

Weight: 4 for each requested <tt>symbol</tt> regardless of - * <tt>windowSize</tt>. <br/><br/> The weight for this request will cap - * at 200 once the number of `symbols` in the request is more than 50. + *

**Note:** This endpoint differs from `GET /api/v3/ticker/24hr`. The statistical + * time range of this endpoint can be up to 59999ms longer than the requested + * `windowSize`. `openTime` starts at the beginning of a minute, while the + * end time is the current time. Therefore, the actual interval can be up to 59999ms longer than + * the requested window. For example, if `closeTime` is 1641287867099 (January 04, + * 2022 09:17:47:099 UTC) and `windowSize` is `1d`, then + * `openTime` is 1641201420000 (January 3, 2022, 09:17:00 UTC). Weight: 4 for each + * requested symbol regardless of windowSize. The weight for this request will cap at 200 once + * the number of `symbols` in the request is more than 50. Security Type: NONE Notes: + * **Data Source:** Database * * @throws ApiException if the Api call fails */ - public void tickerExample() throws ApiException { + public void tickerExample() throws ApiException, IOException { String symbol = "BNBUSDT"; - Symbols symbols = null; + Symbols symbols = Symbols.fromJson("[\"BTCUSDT\",\"BNBUSDT\"]"); WindowSize windowSize = WindowSize.WINDOW_SIZE_1m; TickerType type = TickerType.FULL; SymbolStatus symbolStatus = SymbolStatus.TRADING; diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerPriceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerPriceExample.java index 6d1e1fdf5..1336a56dd 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerPriceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerPriceExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.spot.rest.model.SymbolStatus; import com.binance.connector.client.spot.rest.model.Symbols; import com.binance.connector.client.spot.rest.model.TickerPriceResponse; +import java.io.IOException; /** API examples for MarketApi */ public class TickerPriceExample { @@ -29,19 +30,15 @@ public SpotRestApi getApi() { /** * Symbol price ticker * - *

Latest price for a symbol or symbols. Weight: <table> <thead> <tr> - * <th>Parameter</th> <th>Symbols Provided</th> - * <th>Weight</th> </tr> </thead> <tbody> <tr> <td - * rowspan=\"2\">symbol</td> <td>1</td> - * <td>2</td> </tr> <tr> <td>symbol parameter is - * omitted</td> <td>4</td> </tr> <tr> <td>symbols</td> - * <td>Any</td> <td>4</td> </tr> </tbody> </table> + *

Latest price for a symbol or symbols. Weight: |Parameter|Symbols Provided|Weight| + * |---|---|---| |symbol| 1 |2| | |omitted| 4| |symbols| Any |4| Security Type: NONE Notes: + * **Data Source:** Memory * * @throws ApiException if the Api call fails */ - public void tickerPriceExample() throws ApiException { + public void tickerPriceExample() throws ApiException, IOException { String symbol = "BNBUSDT"; - Symbols symbols = null; + Symbols symbols = Symbols.fromJson("[\"BTCUSDT\",\"BNBUSDT\"]"); SymbolStatus symbolStatus = SymbolStatus.TRADING; ApiResponse response = getApi().tickerPrice(symbol, symbols, symbolStatus); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerTradingDayExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerTradingDayExample.java index 891cd5a58..7495cf755 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerTradingDayExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/TickerTradingDayExample.java @@ -10,6 +10,7 @@ import com.binance.connector.client.spot.rest.model.Symbols; import com.binance.connector.client.spot.rest.model.TickerTradingDayResponse; import com.binance.connector.client.spot.rest.model.TickerType; +import java.io.IOException; /** API examples for MarketApi */ public class TickerTradingDayExample { @@ -30,16 +31,18 @@ public SpotRestApi getApi() { /** * Trading Day Ticker * - *

Price change statistics for a trading day. Weight: 4 for each requested - * <tt>symbol</tt>. <br/><br/> The weight for this request will cap at - * 200 once the number of `symbols` in the request is more than 50. + *

Price change statistics for a trading day. Weight: 4 for each requested symbol. The weight + * for this request will cap at 200 once the number of symbols in the request is more than 50. + * Security Type: NONE Notes: **Data Source:** Database **Notes:**: - Supported values for + * `timeZone`: - Hours and minutes (e.g. `-1:00`, `05:45`) - Only + * hours (e.g. `0`, `8`, `4`) * * @throws ApiException if the Api call fails */ - public void tickerTradingDayExample() throws ApiException { + public void tickerTradingDayExample() throws ApiException, IOException { String symbol = "BNBUSDT"; - Symbols symbols = null; - String timeZone = ""; + Symbols symbols = Symbols.fromJson("[\"BTCUSDT\",\"BNBUSDT\"]"); + String timeZone = "0"; TickerType type = TickerType.FULL; SymbolStatus symbolStatus = SymbolStatus.TRADING; ApiResponse response = diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/UiKlinesExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/UiKlinesExample.java index eaa6a16c9..e8111db0e 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/UiKlinesExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/UiKlinesExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.Interval; import com.binance.connector.client.spot.rest.model.UiKlinesResponse; +import java.io.IOException; /** API examples for MarketApi */ public class UiKlinesExample { @@ -30,17 +31,24 @@ public SpotRestApi getApi() { * *

The request is similar to klines having the same parameters and response. * `uiKlines` return modified kline data, optimized for presentation of candlestick - * charts. Weight: 2 + * charts. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Database - If + * `startTime` and `endTime` are not sent, the most recent klines are + * returned. - Supported values for `timeZone`: - Hours and minutes (e.g. + * `-1:00`, `05:45`) - Only hours (e.g. `0`, `8`, + * `4`) - Accepted range is strictly [-12:00 to +14:00] inclusive - If + * `timeZone` provided, kline intervals are interpreted in that timezone instead of + * UTC. - Note that `startTime` and `endTime` are always interpreted in UTC, + * regardless of `timeZone`. * * @throws ApiException if the Api call fails */ - public void uiKlinesExample() throws ApiException { + public void uiKlinesExample() throws ApiException, IOException { String symbol = "BNBUSDT"; Interval interval = Interval.INTERVAL_1s; Long startTime = 1735693200000L; Long endTime = 1735693200000L; - String timeZone = ""; - Integer limit = 500; + String timeZone = "0"; + Integer limit = 1; ApiResponse response = getApi().uiKlines(symbol, interval, startTime, endTime, timeZone, limit); System.out.println(response.getData()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOpenOrdersExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOpenOrdersExample.java index 53c12cedd..b4f9cfd58 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOpenOrdersExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOpenOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.DeleteOpenOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class DeleteOpenOrdersExample { @@ -25,16 +26,16 @@ public SpotRestApi getApi() { } /** - * Cancel All Open Orders on a Symbol + * Cancel All Open Orders on a Symbol (TRADE) * *

Cancels all active orders on a symbol. This includes orders that are part of an order - * list. Weight: 1 + * list. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching Engine * * @throws ApiException if the Api call fails */ - public void deleteOpenOrdersExample() throws ApiException { + public void deleteOpenOrdersExample() throws ApiException, IOException { String symbol = "BNBUSDT"; - Double recvWindow = 5000.0d; + Double recvWindow = 5000d; ApiResponse response = getApi().deleteOpenOrders(symbol, recvWindow); System.out.println(response.getData()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderExample.java index 2a453e0ca..8921902e7 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.CancelRestrictions; import com.binance.connector.client.spot.rest.model.DeleteOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class DeleteOrderExample { @@ -26,19 +27,27 @@ public SpotRestApi getApi() { } /** - * Cancel order + * Cancel order (TRADE) * - *

Cancel an active order. Weight: 1 + *

Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** + * Matching Engine - Either `orderId` or `origClientOrderId` must be sent. - + * If both `orderId` and `origClientOrderId` are provided, the + * `orderId` is searched first, then the `origClientOrderId` from that + * result is checked against that order. If both conditions are not met the request will be + * rejected. - The performance for canceling an order (single cancel or as part of a + * cancel-replace) is always better when only `orderId` is sent. Sending + * `origClientOrderId` or both `orderId` + `origClientOrderId` + * will be slower. * * @throws ApiException if the Api call fails */ - public void deleteOrderExample() throws ApiException { + public void deleteOrderExample() throws ApiException, IOException { String symbol = "BNBUSDT"; Long orderId = 1L; - String origClientOrderId = ""; - String newClientOrderId = ""; + String origClientOrderId = "myOrder1"; + String newClientOrderId = "cancelMyOrder1"; CancelRestrictions cancelRestrictions = CancelRestrictions.ONLY_NEW; - Double recvWindow = 5000.0d; + Double recvWindow = 5000d; ApiResponse response = getApi().deleteOrder( symbol, diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderListExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderListExample.java index 158df8923..ba95895ef 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderListExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.spot.rest.SpotRestApiUtil; import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.DeleteOrderListResponse; +import java.io.IOException; /** API examples for TradeApi */ public class DeleteOrderListExample { @@ -25,18 +26,22 @@ public SpotRestApi getApi() { } /** - * Cancel Order list + * Cancel Order list (TRADE) * - *

Cancel an entire Order list Weight: 1 + *

Cancel an entire Order list Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** + * Matching Engine **Notes:** - Canceling an individual order from an order list will cancel the + * entire order list. - If both orderListId and listClientOrderId parameters are provided, the + * orderListId is searched first, then the listClientOrderId from that result is checked against + * that order. If both conditions are not met the request will be rejected. * * @throws ApiException if the Api call fails */ - public void deleteOrderListExample() throws ApiException { + public void deleteOrderListExample() throws ApiException, IOException { String symbol = "BNBUSDT"; Long orderListId = 1L; - String listClientOrderId = ""; - String newClientOrderId = ""; - Double recvWindow = 5000.0d; + String listClientOrderId = "C3wyj4WVEktd7u9aVBRXcN"; + String newClientOrderId = "cancelMyOrder1"; + Double recvWindow = 5000d; ApiResponse response = getApi().deleteOrderList( symbol, diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/NewOrderExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/NewOrderExample.java index ad1e66925..96dee612f 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/NewOrderExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/NewOrderExample.java @@ -10,6 +10,7 @@ import com.binance.connector.client.spot.rest.model.NewOrderResponse; import com.binance.connector.client.spot.rest.model.OrderType; import com.binance.connector.client.spot.rest.model.Side; +import java.io.IOException; /** API examples for TradeApi */ public class NewOrderExample { @@ -28,14 +29,60 @@ public SpotRestApi getApi() { } /** - * New order + * New order (TRADE) * *

Send in a new order. This adds 1 order to the `EXCHANGE_MAX_ORDERS` filter and - * the `MAX_NUM_ORDERS` filter. Weight: 1 + * the `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 1 Security Type: + * TRADE Notes: **Data Source:** Matching Engine Some additional mandatory parameters based on + * order `type`: Type | Additional mandatory parameters | Additional Information + * ------------ | ------------| ------ `LIMIT` | `timeInForce`, + * `quantity`, `price`| `MARKET` | `quantity` or + * `quoteOrderQty`| `MARKET` orders using the `quantity` field + * specifies the amount of the `base asset` the user wants to buy or sell at the + * market price. <br/> E.g. MARKET order on BTCUSDT will specify how much BTC the user is + * buying or selling. <br/><br/> `MARKET` orders using + * `quoteOrderQty` specifies the amount the user wants to spend (when buying) or + * receive (when selling) the `quote` asset; the correct `quantity` will be + * determined based on the market liquidity and `quoteOrderQty`. <br/> E.g. + * Using the symbol BTCUSDT: <br/> `BUY` side, the order will buy as many BTC as + * `quoteOrderQty` USDT can. <br/> `SELL` side, the order will sell as + * much BTC needed to receive `quoteOrderQty` USDT. `STOP_LOSS` | + * `quantity`, `stopPrice` or `trailingDelta`| This will execute a + * `MARKET` order when the conditions are met. (e.g. `stopPrice` is met or + * `trailingDelta` is activated) `STOP_LOSS_LIMIT` | + * `timeInForce`, `quantity`, `price`, `stopPrice` or + * `trailingDelta` `TAKE_PROFIT` | `quantity`, + * `stopPrice` or `trailingDelta` | This will execute a `MARKET` + * order when the conditions are met. (e.g. `stopPrice` is met or + * `trailingDelta` is activated) `TAKE_PROFIT_LIMIT` | + * `timeInForce`, `quantity`, `price`, `stopPrice` or + * `trailingDelta` | `LIMIT_MAKER` | `quantity`, + * `price`| This is a `LIMIT` order that will be rejected if the order + * immediately matches and trades as a taker. <br/> This is also known as a POST-ONLY + * order. Notes on using parameters for Pegged Orders: * These parameters are allowed for + * `LIMIT`, `LIMIT_MAKER`, `STOP_LOSS_LIMIT`, + * `TAKE_PROFIT_LIMIT` orders. * If `pegPriceType` is specified, + * `price` becomes optional. Otherwise, it is still mandatory. * + * `pegPriceType=PRIMARY_PEG` means the primary peg, that is the best price on + * the same side of the order book as your order. * `pegPriceType=MARKET_PEG` + * means the market peg, that is the best price on the opposite side of the order book from your + * order. * Use `pegOffsetType` and `pegOffsetValue` to request a price + * level other than the best one. These parameters must be specified together. Other info: * Any + * `LIMIT` or `LIMIT_MAKER` type order can be made an iceberg order by + * sending an `icebergQty`. * Any order with an `icebergQty` MUST have + * `timeInForce` set to `GTC`. * For `STOP_LOSS`, + * `STOP_LOSS_LIMIT`, `TAKE_PROFIT_LIMIT` and `TAKE_PROFIT` + * orders, `trailingDelta` can be combined with `stopPrice`. * + * `MARKET` orders using `quoteOrderQty` will not break `LOT_SIZE` + * filter rules; the order will execute a `quantity` that will have the notional value + * as close as possible to `quoteOrderQty`. Trigger order price rules against market + * price for both MARKET and LIMIT versions: * Price above market price: `STOP_LOSS` + * `BUY`, `TAKE_PROFIT` `SELL` * Price below market price: + * `STOP_LOSS` `SELL`, `TAKE_PROFIT` `BUY` * * @throws ApiException if the Api call fails */ - public void newOrderExample() throws ApiException { + public void newOrderExample() throws ApiException, IOException { NewOrderRequest newOrderRequest = new NewOrderRequest(); newOrderRequest.symbol("BNBUSDT"); newOrderRequest.side(Side.BUY); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderAmendKeepPriorityExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderAmendKeepPriorityExample.java index 9bef0eb52..2db3e6ca6 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderAmendKeepPriorityExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderAmendKeepPriorityExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.spot.rest.api.SpotRestApi; import com.binance.connector.client.spot.rest.model.OrderAmendKeepPriorityRequest; import com.binance.connector.client.spot.rest.model.OrderAmendKeepPriorityResponse; +import java.io.IOException; /** API examples for TradeApi */ public class OrderAmendKeepPriorityExample { @@ -26,19 +27,20 @@ public SpotRestApi getApi() { } /** - * Order Amend Keep Priority + * Order Amend Keep Priority (TRADE) * *

Reduce the quantity of an existing open order. This adds 0 orders to the - * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [Order - * Amend Keep Priority FAQ](faqs/order_amend_keep_priority.md) to learn more. Weight: 4 + * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read Order + * Amend Keep Priority FAQ to learn more. Weight(IP): 4 Unfilled Order Count: 0 Security Type: + * TRADE Notes: **Data Source:** Matching Engine * * @throws ApiException if the Api call fails */ - public void orderAmendKeepPriorityExample() throws ApiException { + public void orderAmendKeepPriorityExample() throws ApiException, IOException { OrderAmendKeepPriorityRequest orderAmendKeepPriorityRequest = new OrderAmendKeepPriorityRequest(); orderAmendKeepPriorityRequest.symbol("BNBUSDT"); - orderAmendKeepPriorityRequest.newQty(1.0d); + orderAmendKeepPriorityRequest.newQty(1d); ApiResponse response = getApi().orderAmendKeepPriority(orderAmendKeepPriorityRequest); System.out.println(response.getData()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderCancelReplaceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderCancelReplaceExample.java index 59b373c57..53e0912f2 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderCancelReplaceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderCancelReplaceExample.java @@ -11,6 +11,7 @@ import com.binance.connector.client.spot.rest.model.OrderCancelReplaceResponse; import com.binance.connector.client.spot.rest.model.OrderType; import com.binance.connector.client.spot.rest.model.Side; +import java.io.IOException; /** API examples for TradeApi */ public class OrderCancelReplaceExample { @@ -29,18 +30,122 @@ public SpotRestApi getApi() { } /** - * Cancel an Existing Order and Send a New Order + * Cancel an Existing Order and Send a New Order (TRADE) * - *

* Cancels an existing order and places a new order on the same symbol. * Filters and Order - * Count are evaluated before the processing of the cancellation and order placement occurs. * A + *

- Cancels an existing order and places a new order on the same symbol. - Filters and Order + * Count are evaluated before the processing of the cancellation and order placement occurs. - A * new order that was not attempted (i.e. when `newOrderResult: NOT_ATTEMPTED`), will - * still increase the unfilled order count by 1. * You can only cancel an individual order from + * still increase the unfilled order count by 1. - You can only cancel an individual order from * an orderList using this endpoint, but the result is the same as canceling the entire - * orderList. Weight: 1 + * orderList. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** + * Matching Engine Similar to `POST /api/v3/order`, additional mandatory parameters + * are determined by `type`. Response format varies depending on whether the + * processing of the message succeeded, partially succeeded, or failed. <table> + * <thead> <tr> <th colspan=3 align=left>Request</th> <th + * colspan=3 align=left>Response</th> </tr> <tr> + * <th><code>cancelReplaceMode</code></th> + * <th><code>orderRateLimitExceededMode</code></th> <th>Unfilled + * Order Count</th> <th><code>cancelResult</code></th> + * <th><code>newOrderResult</code></th> + * <th><code>status</code></th> </tr> </thead> <tbody> + * <tr> <td + * rowspan=\"11\"><code>STOP_ON_FAILURE</code></td> <td + * rowspan=\"6\"><code>DO_NOTHING</code></td> <td + * rowspan=\"3\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"3\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td + * rowspan=\"5\"><code>CANCEL_ONLY</code></td> <td + * rowspan=\"3\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"2\">Exceeds Limits</td> <td>❌ + * <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>429</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>429</code></td> </tr> <tr> <td + * rowspan=\"16\"><code>ALLOW_FAILURE</code></td> <td + * rowspan=\"8\"><code>DO_NOTHING</code></td> <td + * rowspan=\"4\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>409</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"4\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td + * rowspan=\"8\"><CODE>CANCEL_ONLY</CODE></td> <td + * rowspan=\"4\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>409</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"4\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>N/A</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> </tbody> + * </table> **Notes:** - The performance for canceling an order (single cancel or as part + * of a cancel-replace) is always better when only `orderId` is sent. Sending + * `origClientOrderId` or both `orderId` + `origClientOrderId` + * will be slower. * * @throws ApiException if the Api call fails */ - public void orderCancelReplaceExample() throws ApiException { + public void orderCancelReplaceExample() throws ApiException, IOException { OrderCancelReplaceRequest orderCancelReplaceRequest = new OrderCancelReplaceRequest(); orderCancelReplaceRequest.symbol("BNBUSDT"); orderCancelReplaceRequest.side(Side.BUY); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOcoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOcoExample.java index 5a265dad6..6642a6607 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOcoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOcoExample.java @@ -11,6 +11,7 @@ import com.binance.connector.client.spot.rest.model.OrderListOcoRequest; import com.binance.connector.client.spot.rest.model.OrderListOcoResponse; import com.binance.connector.client.spot.rest.model.Side; +import java.io.IOException; /** API examples for TradeApi */ public class OrderListOcoExample { @@ -29,29 +30,31 @@ public SpotRestApi getApi() { } /** - * New Order list - OCO + * New Order list - OCO (TRADE) * *

Send in an one-cancels-the-other (OCO) pair, where activation of one order immediately - * cancels the other. * An OCO has 2 orders called the **above order** and **below order**. * + * cancels the other. - An OCO has 2 orders called the **above order** and **below order**. - * One of the orders must be a `LIMIT_MAKER/TAKE_PROFIT/TAKE_PROFIT_LIMIT` order and - * the other must be `STOP_LOSS` or `STOP_LOSS_LIMIT` order. * Price - * restrictions * If the OCO is on the `SELL` side: * + * the other must be `STOP_LOSS` or `STOP_LOSS_LIMIT` order. - Price + * restrictions - If the OCO is on the `SELL` side: - * `LIMIT_MAKER/TAKE_PROFIT_LIMIT` `price` > Last Traded Price > - * `STOP_LOSS/STOP_LOSS_LIMIT` `stopPrice` * `TAKE_PROFIT - * stopPrice` > Last Traded Price > `STOP_LOSS/STOP_LOSS_LIMIT stopPrice` * - * If the OCO is on the `BUY` side: * `LIMIT_MAKER/TAKE_PROFIT_LIMIT price` - * < Last Traded Price < `stopPrice` * `TAKE_PROFIT stopPrice` < + * `STOP_LOSS/STOP_LOSS_LIMIT` `stopPrice` - `TAKE_PROFIT + * stopPrice` > Last Traded Price > `STOP_LOSS/STOP_LOSS_LIMIT stopPrice` - + * If the OCO is on the `BUY` side: - `LIMIT_MAKER/TAKE_PROFIT_LIMIT price` + * < Last Traded Price < `stopPrice` - `TAKE_PROFIT stopPrice` < * Last Traded Price < `STOP_LOSS/STOP_LOSS_LIMIT stopPrice` * OCOs add **2 * orders** to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` - * filter. Weight: 1 Unfilled Order Count: 2 + * filter. - OCOs add 2 orders to the `EXCHANGE_MAX_ORDERS` filter and the + * `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE + * Notes: **Data Source:** Matching Engine * * @throws ApiException if the Api call fails */ - public void orderListOcoExample() throws ApiException { + public void orderListOcoExample() throws ApiException, IOException { OrderListOcoRequest orderListOcoRequest = new OrderListOcoRequest(); orderListOcoRequest.symbol("BNBUSDT"); orderListOcoRequest.side(Side.BUY); - orderListOcoRequest.quantity(1.0d); + orderListOcoRequest.quantity(1d); orderListOcoRequest.aboveType(AboveType.STOP_LOSS_LIMIT); orderListOcoRequest.belowType(BelowType.STOP_LOSS); ApiResponse response = getApi().orderListOco(orderListOcoRequest); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpoExample.java index 7b74ca0e6..ce503a800 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpoExample.java @@ -12,6 +12,7 @@ import com.binance.connector.client.spot.rest.model.PendingType; import com.binance.connector.client.spot.rest.model.WorkingSide; import com.binance.connector.client.spot.rest.model.WorkingType; +import java.io.IOException; /** API examples for TradeApi */ public class OrderListOpoExample { @@ -30,20 +31,22 @@ public SpotRestApi getApi() { } /** - * New Order List - OPO + * New Order List - OPO (TRADE) * - *

Place an [OPO](./faqs/opo.md). * OPOs add 2 orders to the EXCHANGE_MAX_NUM_ORDERS filter - * and MAX_NUM_ORDERS filter. Weight: 1 Unfilled Order Count: 2 + *

Place an [OPO](/products/spot/faqs/opo). - OPOs add 2 orders to the + * `EXCHANGE_MAX_NUM_ORDERS`` filter and `MAX_NUM_ORDERS`` filter. + * Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** Matching + * Engine * * @throws ApiException if the Api call fails */ - public void orderListOpoExample() throws ApiException { + public void orderListOpoExample() throws ApiException, IOException { OrderListOpoRequest orderListOpoRequest = new OrderListOpoRequest(); orderListOpoRequest.symbol("BNBUSDT"); orderListOpoRequest.workingType(WorkingType.LIMIT); orderListOpoRequest.workingSide(WorkingSide.BUY); - orderListOpoRequest.workingPrice(1.0d); - orderListOpoRequest.workingQuantity(1.0d); + orderListOpoRequest.workingPrice(1d); + orderListOpoRequest.workingQuantity(1d); orderListOpoRequest.pendingType(PendingType.LIMIT); orderListOpoRequest.pendingSide(PendingSide.BUY); ApiResponse response = getApi().orderListOpo(orderListOpoRequest); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpocoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpocoExample.java index 6050ab2d8..28870d14c 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpocoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpocoExample.java @@ -12,6 +12,7 @@ import com.binance.connector.client.spot.rest.model.PendingSide; import com.binance.connector.client.spot.rest.model.WorkingSide; import com.binance.connector.client.spot.rest.model.WorkingType; +import java.io.IOException; /** API examples for TradeApi */ public class OrderListOpocoExample { @@ -30,19 +31,20 @@ public SpotRestApi getApi() { } /** - * New Order List - OPOCO + * New Order List - OPOCO (TRADE) * - *

Place an [OPOCO](./faqs/opo.md). Weight: 1 Unfilled Order Count: 3 + *

Place an [OPOCO](/products/spot/faqs/opo). Weight(IP): 1 Unfilled Order Count: 3 Security + * Type: TRADE Notes: **Data Source:** Matching Engine * * @throws ApiException if the Api call fails */ - public void orderListOpocoExample() throws ApiException { + public void orderListOpocoExample() throws ApiException, IOException { OrderListOpocoRequest orderListOpocoRequest = new OrderListOpocoRequest(); orderListOpocoRequest.symbol("BNBUSDT"); orderListOpocoRequest.workingType(WorkingType.LIMIT); orderListOpocoRequest.workingSide(WorkingSide.BUY); - orderListOpocoRequest.workingPrice(1.0d); - orderListOpocoRequest.workingQuantity(1.0d); + orderListOpocoRequest.workingPrice(1d); + orderListOpocoRequest.workingQuantity(1d); orderListOpocoRequest.pendingSide(PendingSide.BUY); orderListOpocoRequest.pendingAboveType(PendingAboveType.STOP_LOSS_LIMIT); ApiResponse response = diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtoExample.java index 4762db398..3339bc771 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtoExample.java @@ -12,6 +12,7 @@ import com.binance.connector.client.spot.rest.model.PendingType; import com.binance.connector.client.spot.rest.model.WorkingSide; import com.binance.connector.client.spot.rest.model.WorkingType; +import java.io.IOException; /** API examples for TradeApi */ public class OrderListOtoExample { @@ -30,34 +31,45 @@ public SpotRestApi getApi() { } /** - * New Order list - OTO + * New Order list - OTO (TRADE) * - *

Place an OTO. * An OTO (One-Triggers-the-Other) is an order list comprised of 2 orders. * + *

Place an OTO. - An OTO (One-Triggers-the-Other) is an order list comprised of 2 orders. - * The first order is called the **working order** and must be `LIMIT` or - * `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The + * `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The * second order is called the **pending order**. It can be any order type except for * `MARKET` orders using parameter `quoteOrderQty`. The pending order is - * only placed on the order book when the working order gets **fully filled**. * If either the + * only placed on the order book when the working order gets **fully filled**. - If either the * working order or the pending order is cancelled individually, the other order in the order - * list will also be canceled or expired. * When the order list is placed, if the working order + * list will also be canceled or expired. - When the order list is placed, if the working order * gets **immediately fully filled**, the placement response will show the working order as * `FILLED` but the pending order will still appear as `PENDING_NEW`. You - * need to query the status of the pending order again to see its updated status. * OTOs add **2 + * need to query the status of the pending order again to see its updated status. - OTOs add **2 * orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` - * filter. Weight: 1 Unfilled Order Count: 2 + * filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** + * Matching Engine **Mandatory parameters based on `pendingType` or + * `workingType`** Depending on the `pendingType` or + * `workingType`, some optional parameters will become mandatory. |Type |Additional + * mandatory parameters|Additional information| |---- |---- |------ |`workingType` + * = `LIMIT` |`workingTimeInForce` | |`pendingType` = + * `LIMIT` |`pendingPrice`, `pendingTimeInForce` | + * |`pendingType` = `STOP_LOSS` or `TAKE_PROFIT` + * |`pendingStopPrice` and/or `pendingTrailingDelta`| + * |`pendingType` = `STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT`|`pendingPrice`, `pendingStopPrice` and/or + * `pendingTrailingDelta`, `pendingTimeInForce`| * * @throws ApiException if the Api call fails */ - public void orderListOtoExample() throws ApiException { + public void orderListOtoExample() throws ApiException, IOException { OrderListOtoRequest orderListOtoRequest = new OrderListOtoRequest(); orderListOtoRequest.symbol("BNBUSDT"); orderListOtoRequest.workingType(WorkingType.LIMIT); orderListOtoRequest.workingSide(WorkingSide.BUY); - orderListOtoRequest.workingPrice(1.0d); - orderListOtoRequest.workingQuantity(1.0d); + orderListOtoRequest.workingPrice(1d); + orderListOtoRequest.workingQuantity(1d); orderListOtoRequest.pendingType(PendingType.LIMIT); orderListOtoRequest.pendingSide(PendingSide.BUY); - orderListOtoRequest.pendingQuantity(1.0d); + orderListOtoRequest.pendingQuantity(1d); ApiResponse response = getApi().orderListOto(orderListOtoRequest); System.out.println(response.getData()); } diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtocoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtocoExample.java index 25f921941..38f73ddc9 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtocoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtocoExample.java @@ -12,6 +12,7 @@ import com.binance.connector.client.spot.rest.model.PendingSide; import com.binance.connector.client.spot.rest.model.WorkingSide; import com.binance.connector.client.spot.rest.model.WorkingType; +import java.io.IOException; /** API examples for TradeApi */ public class OrderListOtocoExample { @@ -30,30 +31,47 @@ public SpotRestApi getApi() { } /** - * New Order list - OTOCO + * New Order list - OTOCO (TRADE) * - *

Place an OTOCO. * An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised - * of 3 orders. * The first order is called the **working order** and must be `LIMIT` - * or `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The - * behavior of the working order is the same as the [OTO](#new-order-list---oto-trade). * OTOCO - * has 2 pending orders (pending above and pending below), forming an OCO pair. The pending - * orders are only placed on the order book when the working order gets **fully filled**. * The - * rules of the pending above and pending below follow the same rules as the [Order list - * OCO](#new-order-list---oco-trade). * OTOCOs add **3 orders** to the - * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight: 1 - * Unfilled Order Count: 3 + *

Place an OTOCO. - An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised + * of 3 orders. - The first order is called the **working order** and must be `LIMIT` + * or `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The + * behavior of the working order is the same as the [OTO](#order-list-oto). - OTOCO has 2 + * pending orders (pending above and pending below), forming an OCO pair. The pending orders are + * only placed on the order book when the working order gets **fully filled**. - The rules of + * the pending above and pending below follow the same rules as the [Order list + * OCO](#order-list-oco). - OTOCOs add **3 orders** to the `EXCHANGE_MAX_NUM_ORDERS` + * filter and `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 3 Security + * Type: TRADE Notes: **Data Source:** Matching Engine **Mandatory parameters based on + * `pendingAboveType`, `pendingBelowType` or `workingType`** + * Depending on the `pendingAboveType`/`pendingBelowType` or + * `workingType`, some optional parameters will become mandatory. |Type |Additional + * mandatory parameters|Additional information| |---- |---- |------ |`workingType` + * = `LIMIT` |`workingTimeInForce` | + * |`pendingAboveType`= `LIMIT_MAKER` |`pendingAbovePrice` | + * |`pendingAboveType` = `STOP_LOSS/TAKE_PROFIT` + * |`pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`| + * |`pendingAboveType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT` + * |`pendingAbovePrice`, `pendingAboveStopPrice` and/or + * `pendingAboveTrailingDelta`, `pendingAboveTimeInForce`| + * |`pendingBelowType`= `LIMIT_MAKER` |`pendingBelowPrice` | + * |`pendingBelowType= STOP_LOSS/TAKE_PROFIT` |`pendingBelowStopPrice` + * and/or `pendingBelowTrailingDelta`| + * |`pendingBelowType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT` + * |`pendingBelowPrice`, `pendingBelowStopPrice` and/or + * `pendingBelowTrailingDelta`, `pendingBelowTimeInForce`| * * @throws ApiException if the Api call fails */ - public void orderListOtocoExample() throws ApiException { + public void orderListOtocoExample() throws ApiException, IOException { OrderListOtocoRequest orderListOtocoRequest = new OrderListOtocoRequest(); orderListOtocoRequest.symbol("BNBUSDT"); orderListOtocoRequest.workingType(WorkingType.LIMIT); orderListOtocoRequest.workingSide(WorkingSide.BUY); - orderListOtocoRequest.workingPrice(1.0d); - orderListOtocoRequest.workingQuantity(1.0d); + orderListOtocoRequest.workingPrice(1d); + orderListOtocoRequest.workingQuantity(1d); orderListOtocoRequest.pendingSide(PendingSide.BUY); - orderListOtocoRequest.pendingQuantity(1.0d); + orderListOtocoRequest.pendingQuantity(1d); orderListOtocoRequest.pendingAboveType(PendingAboveType.STOP_LOSS_LIMIT); ApiResponse response = getApi().orderListOtoco(orderListOtocoRequest); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderOcoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderOcoExample.java index 904c2c11a..47efff807 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderOcoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderOcoExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.spot.rest.model.OrderOcoRequest; import com.binance.connector.client.spot.rest.model.OrderOcoResponse; import com.binance.connector.client.spot.rest.model.Side; +import java.io.IOException; /** API examples for TradeApi */ public class OrderOcoExample { @@ -27,24 +28,24 @@ public SpotRestApi getApi() { } /** - * New OCO - Deprecated + * New OCO - Deprecated (TRADE) * - *

Send in a new OCO. * Price Restrictions: * `SELL`: Limit Price > Last Price - * > Stop Price * `BUY`: Limit Price < Last Price < Stop Price * Quantity - * Restrictions: * Both legs must have the same quantity. * `ICEBERG` quantities - * however do not have to be the same * `OCO` adds **2 orders** to the - * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Weight: 1 - * Unfilled Order Count: 2 + *

Send in a new OCO. - Price Restrictions: - `SELL`: Limit Price > Last Price + * > Stop Price - `BUY`: Limit Price < Last Price < Stop Price - Quantity + * Restrictions: - Both legs must have the same quantity. - `ICEBERG` quantities + * however do not have to be the same - `OCO` adds **2 orders** to the + * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Weight(IP): + * 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** Matching Engine * * @throws ApiException if the Api call fails */ - public void orderOcoExample() throws ApiException { + public void orderOcoExample() throws ApiException, IOException { OrderOcoRequest orderOcoRequest = new OrderOcoRequest(); orderOcoRequest.symbol("BNBUSDT"); orderOcoRequest.side(Side.BUY); - orderOcoRequest.quantity(1.0d); - orderOcoRequest.price(1.0d); - orderOcoRequest.stopPrice(1.0d); + orderOcoRequest.quantity(1d); + orderOcoRequest.price(1d); + orderOcoRequest.stopPrice(1d); ApiResponse response = getApi().orderOco(orderOcoRequest); System.out.println(response.getData()); } diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderTestExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderTestExample.java index 2e187ae48..1d2085c4b 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderTestExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderTestExample.java @@ -10,6 +10,7 @@ import com.binance.connector.client.spot.rest.model.OrderTestResponse; import com.binance.connector.client.spot.rest.model.OrderType; import com.binance.connector.client.spot.rest.model.Side; +import java.io.IOException; /** API examples for TradeApi */ public class OrderTestExample { @@ -28,16 +29,16 @@ public SpotRestApi getApi() { } /** - * Test new order + * Test new order (TRADE) * *

Test new order creation and signature/recvWindow long. Creates and validates a new order - * but does not send it into the matching engine. Weight: |Condition| Request Weight| - * |------------ | ------------ | |Without `computeCommissionRates`| 1| |With - * `computeCommissionRates`|20| + * but does not send it into the matching engine. Weight: |Condition|Weight| |---|---| |Without + * `computeCommissionRates`|1| |With `computeCommissionRates`|20| Security + * Type: TRADE Notes: **Data Source:** Memory * * @throws ApiException if the Api call fails */ - public void orderTestExample() throws ApiException { + public void orderTestExample() throws ApiException, IOException { OrderTestRequest orderTestRequest = new OrderTestRequest(); orderTestRequest.symbol("BNBUSDT"); orderTestRequest.side(Side.BUY); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderExample.java index 99109f303..15c3405d3 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderExample.java @@ -10,6 +10,7 @@ import com.binance.connector.client.spot.rest.model.Side; import com.binance.connector.client.spot.rest.model.SorOrderRequest; import com.binance.connector.client.spot.rest.model.SorOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class SorOrderExample { @@ -28,20 +29,23 @@ public SpotRestApi getApi() { } /** - * New order using SOR + * New order using SOR (TRADE) * *

Places an order using smart order routing (SOR). This adds 1 order to the * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [SOR - * FAQ](faqs/sor_faq.md) to learn more. Weight: 1 Unfilled Order Count: 1 + * FAQ](/products/spot/faqs/sor_faq) to learn more. Weight(IP): 1 Unfilled Order Count: 1 + * Security Type: TRADE Notes: **Data Source:** Matching Engine **Note:** `POST + * /api/v3/sor/order` only supports `LIMIT` and `MARKET` orders. + * `quoteOrderQty` is not supported. * * @throws ApiException if the Api call fails */ - public void sorOrderExample() throws ApiException { + public void sorOrderExample() throws ApiException, IOException { SorOrderRequest sorOrderRequest = new SorOrderRequest(); sorOrderRequest.symbol("BNBUSDT"); sorOrderRequest.side(Side.BUY); sorOrderRequest.type(OrderType.MARKET); - sorOrderRequest.quantity(1.0d); + sorOrderRequest.quantity(1d); ApiResponse response = getApi().sorOrder(sorOrderRequest); System.out.println(response.getData()); } diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderTestExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderTestExample.java index fe8b5d0e0..1b6fa466e 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderTestExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderTestExample.java @@ -10,6 +10,7 @@ import com.binance.connector.client.spot.rest.model.Side; import com.binance.connector.client.spot.rest.model.SorOrderTestRequest; import com.binance.connector.client.spot.rest.model.SorOrderTestResponse; +import java.io.IOException; /** API examples for TradeApi */ public class SorOrderTestExample { @@ -28,21 +29,21 @@ public SpotRestApi getApi() { } /** - * Test new order using SOR + * Test new order using SOR (TRADE) * *

Test new order creation and signature/recvWindow using smart order routing (SOR). Creates - * and validates a new order but does not send it into the matching engine. Weight: | Condition - * | Request Weight | | --------- | -------------- | | Without - * `computeCommissionRates` | 1 | | With `computeCommissionRates` | 20 | + * and validates a new order but does not send it into the matching engine. Weight: + * |Condition|Weight| |---|---| |Without `computeCommissionRates`|1| |With + * `computeCommissionRates`|20| Security Type: TRADE Notes: **Data Source:** Memory * * @throws ApiException if the Api call fails */ - public void sorOrderTestExample() throws ApiException { + public void sorOrderTestExample() throws ApiException, IOException { SorOrderTestRequest sorOrderTestRequest = new SorOrderTestRequest(); sorOrderTestRequest.symbol("BNBUSDT"); sorOrderTestRequest.side(Side.BUY); sorOrderTestRequest.type(OrderType.MARKET); - sorOrderTestRequest.quantity(1.0d); + sorOrderTestRequest.quantity(1d); ApiResponse response = getApi().sorOrderTest(sorOrderTestRequest); System.out.println(response.getData()); } diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountCommissionExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountCommissionExample.java index bcd95b50a..d9b4d0e79 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountCommissionExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountCommissionExample.java @@ -29,9 +29,10 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Account Commission Rates + * Account Commission Rates (USER_DATA) * - *

Get current account commission rates. Weight: 20 + *

Get current account commission rates. Weight(IP): 20 Security Type: USER_DATA Notes: + * **Data Source:** Database */ public void accountCommissionExampleAsync() { AccountCommissionRequest accountCommissionRequest = new AccountCommissionRequest(); @@ -49,9 +50,10 @@ public void accountCommissionExampleAsync() { } /** - * WebSocket Account Commission Rates + * Account Commission Rates (USER_DATA) * - *

Get current account commission rates. Weight: 20 + *

Get current account commission rates. Weight(IP): 20 Security Type: USER_DATA Notes: + * **Data Source:** Database */ public void accountCommissionExampleSync() { AccountCommissionRequest accountCommissionRequest = new AccountCommissionRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountRateLimitsOrdersExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountRateLimitsOrdersExample.java index 79a23900c..ddfb259e8 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountRateLimitsOrdersExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountRateLimitsOrdersExample.java @@ -29,9 +29,10 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Unfilled Order Count + * Unfilled Order Count (USER_DATA) * - *

Query your current unfilled order count for all intervals. Weight: 40 + *

Query your current unfilled order count for all intervals. Weight(IP): 40 Security Type: + * USER_DATA Notes: **Data Source:** Memory */ public void accountRateLimitsOrdersExampleAsync() { AccountRateLimitsOrdersRequest accountRateLimitsOrdersRequest = @@ -49,9 +50,10 @@ public void accountRateLimitsOrdersExampleAsync() { } /** - * WebSocket Unfilled Order Count + * Unfilled Order Count (USER_DATA) * - *

Query your current unfilled order count for all intervals. Weight: 40 + *

Query your current unfilled order count for all intervals. Weight(IP): 40 Security Type: + * USER_DATA Notes: **Data Source:** Memory */ public void accountRateLimitsOrdersExampleSync() { AccountRateLimitsOrdersRequest accountRateLimitsOrdersRequest = diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountStatusExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountStatusExample.java index df5b17ed0..a94589a7b 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountStatusExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AccountStatusExample.java @@ -29,9 +29,10 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Account information + * Account information (USER_DATA) * - *

Query information about your account. Weight: 20 + *

Query information about your account. Weight(IP): 20 Security Type: USER_DATA Notes: + * **Data Source:** Memory => Database */ public void accountStatusExampleAsync() { AccountStatusRequest accountStatusRequest = new AccountStatusRequest(); @@ -48,9 +49,10 @@ public void accountStatusExampleAsync() { } /** - * WebSocket Account information + * Account information (USER_DATA) * - *

Query information about your account. Weight: 20 + *

Query information about your account. Weight(IP): 20 Security Type: USER_DATA Notes: + * **Data Source:** Memory => Database */ public void accountStatusExampleSync() { AccountStatusRequest accountStatusRequest = new AccountStatusRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AllOrderListsExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AllOrderListsExample.java index c36e74b79..34fb65a4f 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AllOrderListsExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AllOrderListsExample.java @@ -29,9 +29,16 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Account order list history + * Account order list history (USER_DATA) * - *

Query information about all your order lists, filtered by time range. Weight: 20 + *

Query information about all your order lists, filtered by time range. Weight(IP): 20 + * Security Type: USER_DATA Notes: **Data Source:** Database Notes: * If `startTime` + * and/or `endTime` are specified, `fromId` is ignored. Order lists are + * filtered by `transactionTime` of the last order list execution status update. * If + * `fromId` is specified, return order lists with order list ID >= + * `fromId`. * If no condition is specified, the most recent order lists are returned. + * * The time between `startTime` and `endTime` can't be longer than 24 + * hours. */ public void allOrderListsExampleAsync() { AllOrderListsRequest allOrderListsRequest = new AllOrderListsRequest(); @@ -48,9 +55,16 @@ public void allOrderListsExampleAsync() { } /** - * WebSocket Account order list history + * Account order list history (USER_DATA) * - *

Query information about all your order lists, filtered by time range. Weight: 20 + *

Query information about all your order lists, filtered by time range. Weight(IP): 20 + * Security Type: USER_DATA Notes: **Data Source:** Database Notes: * If `startTime` + * and/or `endTime` are specified, `fromId` is ignored. Order lists are + * filtered by `transactionTime` of the last order list execution status update. * If + * `fromId` is specified, return order lists with order list ID >= + * `fromId`. * If no condition is specified, the most recent order lists are returned. + * * The time between `startTime` and `endTime` can't be longer than 24 + * hours. */ public void allOrderListsExampleSync() { AllOrderListsRequest allOrderListsRequest = new AllOrderListsRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AllOrdersExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AllOrdersExample.java index c7ffe16eb..05f5d78bf 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AllOrdersExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/AllOrdersExample.java @@ -29,10 +29,17 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Account order history + * Account order history (USER_DATA) * *

Query information about all your orders – active, canceled, filled – filtered by time - * range. Weight: 20 + * range. Weight(IP): 20 Security Type: USER_DATA Notes: **Data Source:** Database Notes: * If + * `startTime` and/or `endTime` are specified, `orderId` is + * ignored. Orders are filtered by `time` of the last execution status update. * If + * `orderId` is specified, return orders with order ID >= `orderId`. + * * If no condition is specified, the most recent orders are returned. * For some historical + * orders the `cummulativeQuoteQty` response field may be negative, meaning the data + * is not available at this time. * The time between `startTime` and + * `endTime` can't be longer than 24 hours. */ public void allOrdersExampleAsync() { AllOrdersRequest allOrdersRequest = new AllOrdersRequest(); @@ -49,10 +56,17 @@ public void allOrdersExampleAsync() { } /** - * WebSocket Account order history + * Account order history (USER_DATA) * *

Query information about all your orders – active, canceled, filled – filtered by time - * range. Weight: 20 + * range. Weight(IP): 20 Security Type: USER_DATA Notes: **Data Source:** Database Notes: * If + * `startTime` and/or `endTime` are specified, `orderId` is + * ignored. Orders are filtered by `time` of the last execution status update. * If + * `orderId` is specified, return orders with order ID >= `orderId`. + * * If no condition is specified, the most recent orders are returned. * For some historical + * orders the `cummulativeQuoteQty` response field may be negative, meaning the data + * is not available at this time. * The time between `startTime` and + * `endTime` can't be longer than 24 hours. */ public void allOrdersExampleSync() { AllOrdersRequest allOrdersRequest = new AllOrdersRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyAllocationsExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyAllocationsExample.java index 0f7fb3e15..62d8cc9e2 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyAllocationsExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyAllocationsExample.java @@ -29,9 +29,20 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Account allocations + * Account allocations (USER_DATA) * - *

Retrieves allocations resulting from SOR order placement. Weight: 20 + *

Retrieves allocations resulting from SOR order placement. Weight(IP): 20 Security Type: + * USER_DATA Notes: **Data Source:** Database Supported parameter combinations: Parameters | + * Response | ------------------------------------------- | -------- | `symbol` | + * allocations from oldest to newest | `symbol` + `startTime` | oldest + * allocations since `startTime` | `symbol` + `endTime` | newest + * allocations until `endTime` | `symbol` + `startTime` + + * `endTime` | allocations within the time range | `symbol` + + * `fromAllocationId` | allocations by allocation ID | `symbol` + + * `orderId` | allocations related to an order starting with oldest | + * `symbol` + `orderId` + `fromAllocationId` | allocations related + * to an order by allocation ID | **Note:** The time between `startTime` and + * `endTime` can't be longer than 24 hours. */ public void myAllocationsExampleAsync() { MyAllocationsRequest myAllocationsRequest = new MyAllocationsRequest(); @@ -49,9 +60,20 @@ public void myAllocationsExampleAsync() { } /** - * WebSocket Account allocations + * Account allocations (USER_DATA) * - *

Retrieves allocations resulting from SOR order placement. Weight: 20 + *

Retrieves allocations resulting from SOR order placement. Weight(IP): 20 Security Type: + * USER_DATA Notes: **Data Source:** Database Supported parameter combinations: Parameters | + * Response | ------------------------------------------- | -------- | `symbol` | + * allocations from oldest to newest | `symbol` + `startTime` | oldest + * allocations since `startTime` | `symbol` + `endTime` | newest + * allocations until `endTime` | `symbol` + `startTime` + + * `endTime` | allocations within the time range | `symbol` + + * `fromAllocationId` | allocations by allocation ID | `symbol` + + * `orderId` | allocations related to an order starting with oldest | + * `symbol` + `orderId` + `fromAllocationId` | allocations related + * to an order by allocation ID | **Note:** The time between `startTime` and + * `endTime` can't be longer than 24 hours. */ public void myAllocationsExampleSync() { MyAllocationsRequest myAllocationsRequest = new MyAllocationsRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyFiltersExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyFiltersExample.java index e01f28bff..e082dc151 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyFiltersExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyFiltersExample.java @@ -29,11 +29,12 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Query Relevant Filters + * Query Relevant Filters (USER_DATA) * - *

Retrieves the list of [filters](filters.md) relevant to an account on a given symbol. This - * is the only method that shows if an account has `MAX_ASSET` filters applied to it. - * Weight: 40 + *

Retrieves the list of [filters](/products/spot/filters) relevant to an account on a given + * symbol. This is the only method that shows if an account has + * [`MAX_ASSET`](/products/spot/filters#max_asset) filters applied to it. Weight(IP): + * 40 Security Type: USER_DATA Notes: **Data Source:** Memory */ public void myFiltersExampleAsync() { MyFiltersRequest myFiltersRequest = new MyFiltersRequest(); @@ -50,11 +51,12 @@ public void myFiltersExampleAsync() { } /** - * WebSocket Query Relevant Filters + * Query Relevant Filters (USER_DATA) * - *

Retrieves the list of [filters](filters.md) relevant to an account on a given symbol. This - * is the only method that shows if an account has `MAX_ASSET` filters applied to it. - * Weight: 40 + *

Retrieves the list of [filters](/products/spot/filters) relevant to an account on a given + * symbol. This is the only method that shows if an account has + * [`MAX_ASSET`](/products/spot/filters#max_asset) filters applied to it. Weight(IP): + * 40 Security Type: USER_DATA Notes: **Data Source:** Memory */ public void myFiltersExampleSync() { MyFiltersRequest myFiltersRequest = new MyFiltersRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyPreventedMatchesExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyPreventedMatchesExample.java index 87a4d64a2..7579c20d1 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyPreventedMatchesExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyPreventedMatchesExample.java @@ -29,7 +29,7 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Account prevented matches + * Account prevented matches (USER_DATA) * *

Displays the list of orders that were expired due to STP. These are the combinations * supported: * `symbol` + `preventedMatchId` * `symbol` + @@ -37,7 +37,8 @@ public SpotWebSocketApi getApi() { * `fromPreventedMatchId` (`limit` will default to 500) * `symbol` * + `orderId` + `fromPreventedMatchId` + `limit` Weight: Case | * Weight ---- | ----- If `symbol` is invalid | 2 Querying by - * `preventedMatchId` | 2 Querying by `orderId` | 20 + * `preventedMatchId` | 2 Querying by `orderId` | 20 Security Type: + * USER_DATA Notes: **Data Source:** Database */ public void myPreventedMatchesExampleAsync() { MyPreventedMatchesRequest myPreventedMatchesRequest = new MyPreventedMatchesRequest(); @@ -55,7 +56,7 @@ public void myPreventedMatchesExampleAsync() { } /** - * WebSocket Account prevented matches + * Account prevented matches (USER_DATA) * *

Displays the list of orders that were expired due to STP. These are the combinations * supported: * `symbol` + `preventedMatchId` * `symbol` + @@ -63,7 +64,8 @@ public void myPreventedMatchesExampleAsync() { * `fromPreventedMatchId` (`limit` will default to 500) * `symbol` * + `orderId` + `fromPreventedMatchId` + `limit` Weight: Case | * Weight ---- | ----- If `symbol` is invalid | 2 Querying by - * `preventedMatchId` | 2 Querying by `orderId` | 20 + * `preventedMatchId` | 2 Querying by `orderId` | 20 Security Type: + * USER_DATA Notes: **Data Source:** Database */ public void myPreventedMatchesExampleSync() { MyPreventedMatchesRequest myPreventedMatchesRequest = new MyPreventedMatchesRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyTradesExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyTradesExample.java index 61c0ee1c8..b9fe0acf7 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyTradesExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyTradesExample.java @@ -29,10 +29,19 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Account trade history + * Account trade history (USER_DATA) * *

Query information about all your trades, filtered by time range. Weight: Condition| - * Weight| ---| --- |Without orderId|20| |With orderId|5| + * Weight| ---| --- |Without orderId|20| |With orderId|5| Security Type: USER_DATA Notes: Data + * Source: Memory => Database Notes: - If `fromId` is specified, return trades + * with trade ID >= `fromId`. - If `startTime` and/or + * `endTime` are specified, trades are filtered by execution time (`time`). + * - `fromId` cannot be used together with `startTime` and + * `endTime`. - If `orderId` is specified, only trades related to that order + * are returned. - `startTime` and `endTime` cannot be used together with + * `orderId`. - If no condition is specified, the most recent trades are returned. - + * The time between `startTime` and `endTime` can't be longer than 24 + * hours. */ public void myTradesExampleAsync() { MyTradesRequest myTradesRequest = new MyTradesRequest(); @@ -49,10 +58,19 @@ public void myTradesExampleAsync() { } /** - * WebSocket Account trade history + * Account trade history (USER_DATA) * *

Query information about all your trades, filtered by time range. Weight: Condition| - * Weight| ---| --- |Without orderId|20| |With orderId|5| + * Weight| ---| --- |Without orderId|20| |With orderId|5| Security Type: USER_DATA Notes: Data + * Source: Memory => Database Notes: - If `fromId` is specified, return trades + * with trade ID >= `fromId`. - If `startTime` and/or + * `endTime` are specified, trades are filtered by execution time (`time`). + * - `fromId` cannot be used together with `startTime` and + * `endTime`. - If `orderId` is specified, only trades related to that order + * are returned. - `startTime` and `endTime` cannot be used together with + * `orderId`. - If no condition is specified, the most recent trades are returned. - + * The time between `startTime` and `endTime` can't be longer than 24 + * hours. */ public void myTradesExampleSync() { MyTradesRequest myTradesRequest = new MyTradesRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrderListsStatusExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrderListsStatusExample.java index be500aed9..1265dd1bd 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrderListsStatusExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrderListsStatusExample.java @@ -29,11 +29,13 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Current open Order lists + * Current open Order lists (USER_DATA) * *

Query execution status of all open order lists. If you need to continuously monitor order - * status updates, please consider using WebSocket Streams: * `userDataStream.start` - * request * `executionReport` user data stream event Weight: 6 + * status updates, please consider using WebSocket Streams: * + * `userDataStream.subscribe` if on an authenticated session * + * `userDataStream.subscribe.signature` if subscribing through signature subscription + * Weight(IP): 6 Security Type: USER_DATA Notes: **Data Source:** Memory -> Database */ public void openOrderListsStatusExampleAsync() { OpenOrderListsStatusRequest openOrderListsStatusRequest = new OpenOrderListsStatusRequest(); @@ -50,11 +52,13 @@ public void openOrderListsStatusExampleAsync() { } /** - * WebSocket Current open Order lists + * Current open Order lists (USER_DATA) * *

Query execution status of all open order lists. If you need to continuously monitor order - * status updates, please consider using WebSocket Streams: * `userDataStream.start` - * request * `executionReport` user data stream event Weight: 6 + * status updates, please consider using WebSocket Streams: * + * `userDataStream.subscribe` if on an authenticated session * + * `userDataStream.subscribe.signature` if subscribing through signature subscription + * Weight(IP): 6 Security Type: USER_DATA Notes: **Data Source:** Memory -> Database */ public void openOrderListsStatusExampleSync() { OpenOrderListsStatusRequest openOrderListsStatusRequest = new OpenOrderListsStatusRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrdersStatusExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrdersStatusExample.java index 0f8d8cd42..8be8e55a8 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrdersStatusExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrdersStatusExample.java @@ -29,13 +29,14 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Current open orders + * Current open orders (USER_DATA) * *

Query execution status of all open orders. If you need to continuously monitor order - * status updates, please consider using WebSocket Streams: * `userDataStream.start` - * request * `executionReport` user data stream event Weight: Adjusted based on the - * number of requested symbols: | Parameter | Weight | | --------- | ------ | | - * `symbol` | 6 | | none | 80 | + * status updates, please consider using WebSocket Streams: * + * `userDataStream.subscribe` if on an authenticated session * + * `userDataStream.subscribe.signature` if subscribing through signature subscription + * Weight: | Parameter | Weight | | --------- | ------ | | `symbol` | 6 | | none | 80 + * | Security Type: USER_DATA Notes: Data Source: Memory => Database */ public void openOrdersStatusExampleAsync() { OpenOrdersStatusRequest openOrdersStatusRequest = new OpenOrdersStatusRequest(); @@ -52,13 +53,14 @@ public void openOrdersStatusExampleAsync() { } /** - * WebSocket Current open orders + * Current open orders (USER_DATA) * *

Query execution status of all open orders. If you need to continuously monitor order - * status updates, please consider using WebSocket Streams: * `userDataStream.start` - * request * `executionReport` user data stream event Weight: Adjusted based on the - * number of requested symbols: | Parameter | Weight | | --------- | ------ | | - * `symbol` | 6 | | none | 80 | + * status updates, please consider using WebSocket Streams: * + * `userDataStream.subscribe` if on an authenticated session * + * `userDataStream.subscribe.signature` if subscribing through signature subscription + * Weight: | Parameter | Weight | | --------- | ------ | | `symbol` | 6 | | none | 80 + * | Security Type: USER_DATA Notes: Data Source: Memory => Database */ public void openOrdersStatusExampleSync() { OpenOrdersStatusRequest openOrdersStatusRequest = new OpenOrdersStatusRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderAmendmentsExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderAmendmentsExample.java index 1d6a79a8a..204c5fece 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderAmendmentsExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderAmendmentsExample.java @@ -29,9 +29,10 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Query Order Amendments + * Query Order Amendments (USER_DATA) * - *

Queries all amendments of a single order. Weight: 4 + *

Queries all amendments of a single order. Weight(IP): 4 Security Type: USER_DATA Notes: + * **Data Source:** Database */ public void orderAmendmentsExampleAsync() { OrderAmendmentsRequest orderAmendmentsRequest = new OrderAmendmentsRequest(); @@ -50,9 +51,10 @@ public void orderAmendmentsExampleAsync() { } /** - * WebSocket Query Order Amendments + * Query Order Amendments (USER_DATA) * - *

Queries all amendments of a single order. Weight: 4 + *

Queries all amendments of a single order. Weight(IP): 4 Security Type: USER_DATA Notes: + * **Data Source:** Database */ public void orderAmendmentsExampleSync() { OrderAmendmentsRequest orderAmendmentsRequest = new OrderAmendmentsRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderListStatusExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderListStatusExample.java index 17d324457..cf0096057 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderListStatusExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderListStatusExample.java @@ -29,10 +29,14 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Query Order list + * Query Order list (USER_DATA) * *

Check execution status of an Order list. For execution status of individual orders, use - * `order.status`. Weight: 4 + * `order.status`. Weight(IP): 4 Security Type: USER_DATA Notes: **Data Source:** + * Database Notes: * `origClientOrderId` refers to `listClientOrderId` of + * the order list itself. * If both `origClientOrderId` and `orderListId` + * parameters are specified, only `origClientOrderId` is used and + * `orderListId` is ignored. */ public void orderListStatusExampleAsync() { OrderListStatusRequest orderListStatusRequest = new OrderListStatusRequest(); @@ -49,10 +53,14 @@ public void orderListStatusExampleAsync() { } /** - * WebSocket Query Order list + * Query Order list (USER_DATA) * *

Check execution status of an Order list. For execution status of individual orders, use - * `order.status`. Weight: 4 + * `order.status`. Weight(IP): 4 Security Type: USER_DATA Notes: **Data Source:** + * Database Notes: * `origClientOrderId` refers to `listClientOrderId` of + * the order list itself. * If both `origClientOrderId` and `orderListId` + * parameters are specified, only `origClientOrderId` is used and + * `orderListId` is ignored. */ public void orderListStatusExampleSync() { OrderListStatusRequest orderListStatusRequest = new OrderListStatusRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderStatusExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderStatusExample.java index e019c2525..f3df58ada 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderStatusExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderStatusExample.java @@ -29,9 +29,15 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Query order + * Query order (USER_DATA) * - *

Check execution status of an order. Weight: 4 + *

Check execution status of an order. Weight(IP): 4 Security Type: USER_DATA Notes: **Data + * Source:** Memory => Database Notes: * If both `orderId` and + * `origClientOrderId` are provided, the `orderId` is searched first, then + * the `origClientOrderId` from that result is checked against that order. If both + * conditions are not met the request will be rejected. * For some historical orders the + * `cummulativeQuoteQty` response field may be negative, meaning the data is not + * available at this time. */ public void orderStatusExampleAsync() { OrderStatusRequest orderStatusRequest = new OrderStatusRequest(); @@ -48,9 +54,15 @@ public void orderStatusExampleAsync() { } /** - * WebSocket Query order + * Query order (USER_DATA) * - *

Check execution status of an order. Weight: 4 + *

Check execution status of an order. Weight(IP): 4 Security Type: USER_DATA Notes: **Data + * Source:** Memory => Database Notes: * If both `orderId` and + * `origClientOrderId` are provided, the `orderId` is searched first, then + * the `origClientOrderId` from that result is checked against that order. If both + * conditions are not met the request will be rejected. * For some historical orders the + * `cummulativeQuoteQty` response field may be negative, meaning the data is not + * available at this time. */ public void orderStatusExampleSync() { OrderStatusRequest orderStatusRequest = new OrderStatusRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionLogonExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionLogonExample.java index 27af5cb59..024a51552 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionLogonExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionLogonExample.java @@ -29,13 +29,14 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Log in with API key + * Log in with API key (USER_DATA) * *

Authenticate WebSocket connection using the provided API key. After calling * `session.logon`, you can omit `apiKey` and `signature` * parameters for future requests that require them. Note that only one API key can be * authenticated. Calling `session.logon` multiple times changes the current - * authenticated API key. Weight: 2 + * authenticated API key. **Note:** Only Ed25519 keys are supported for this feature. + * Weight(IP): 2 Security Type: USER_DATA Notes: **Data Source:** Memory */ public void sessionLogonExampleAsync() { SessionLogonRequest sessionLogonRequest = new SessionLogonRequest(); @@ -51,13 +52,14 @@ public void sessionLogonExampleAsync() { } /** - * WebSocket Log in with API key + * Log in with API key (USER_DATA) * *

Authenticate WebSocket connection using the provided API key. After calling * `session.logon`, you can omit `apiKey` and `signature` * parameters for future requests that require them. Note that only one API key can be * authenticated. Calling `session.logon` multiple times changes the current - * authenticated API key. Weight: 2 + * authenticated API key. **Note:** Only Ed25519 keys are supported for this feature. + * Weight(IP): 2 Security Type: USER_DATA Notes: **Data Source:** Memory */ public void sessionLogonExampleSync() { SessionLogonRequest sessionLogonRequest = new SessionLogonRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionLogoutExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionLogoutExample.java index fe97f5c2a..a0523b421 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionLogoutExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionLogoutExample.java @@ -28,13 +28,13 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Log out of the session + * Log out of the session * *

Forget the API key previously authenticated. If the connection is not authenticated, this * request does nothing. Note that the WebSocket connection stays open after * `session.logout` request. You can continue using the connection, but now you will * have to explicitly provide the `apiKey` and `signature` parameters where - * needed. Weight: 2 + * needed. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory */ public void sessionLogoutExampleAsync() { CompletableFuture future = getApi().sessionLogout(); @@ -49,13 +49,13 @@ public void sessionLogoutExampleAsync() { } /** - * WebSocket Log out of the session + * Log out of the session * *

Forget the API key previously authenticated. If the connection is not authenticated, this * request does nothing. Note that the WebSocket connection stays open after * `session.logout` request. You can continue using the connection, but now you will * have to explicitly provide the `apiKey` and `signature` parameters where - * needed. Weight: 2 + * needed. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory */ public void sessionLogoutExampleSync() { CompletableFuture future = getApi().sessionLogout(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionStatusExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionStatusExample.java index 5ada10ceb..3453f46f9 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionStatusExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/auth/SessionStatusExample.java @@ -28,10 +28,10 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Query session status + * Query session status * *

Query the status of the WebSocket connection, inspecting which API key (if any) is used to - * authorize requests. Weight: 2 + * authorize requests. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory */ public void sessionStatusExampleAsync() { CompletableFuture future = getApi().sessionStatus(); @@ -46,10 +46,10 @@ public void sessionStatusExampleAsync() { } /** - * WebSocket Query session status + * Query session status * *

Query the status of the WebSocket connection, inspecting which API key (if any) is used to - * authorize requests. Weight: 2 + * authorize requests. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory */ public void sessionStatusExampleSync() { CompletableFuture future = getApi().sessionStatus(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/ExchangeInfoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/ExchangeInfoExample.java index 120873c0c..c601ed429 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/ExchangeInfoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/ExchangeInfoExample.java @@ -29,9 +29,26 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Exchange information + * Exchange information * - *

Query current exchange trading rules, rate limits, and symbol information. Weight: 20 + *

Query current exchange trading rules, rate limits, and symbol information. Weight(IP): 20 + * Security Type: NONE Notes: **Data Source:** Memory **Notes:** * If the value provided to + * `symbol` or `symbols` do not exist, the endpoint will throw an error + * saying the symbol is invalid. * All parameters are optional. * Only one of + * `symbol`, `symbols`, `permissions` parameters can be specified. + * * Without parameters, `exchangeInfo` displays all symbols with + * `[\"SPOT\", \"MARGIN\", \"LEVERAGED\"]` permissions. + * * In order to list *all* active symbols on the exchange, you need to explicitly request all + * permissions. * `permissions` accepts either a list of permissions, or a single + * permission name. E.g. `\"SPOT\"`. **Examples of Symbol Permissions + * Interpretation from the Response:** * `[[\"A\",\"B\"]]` means + * you may place an order if your account has either permission \"A\" **or** + * permission \"B\". * `[[\"A\"],[\"B\"]]` means you can + * place an order if your account has permission \"A\" **and** permission + * \"B\". * `[[\"A\"],[\"B\",\"C\"]]` means + * you can place an order if your account has permission \"A\" **and** permission + * \"B\" or permission \"C\". (Inclusive or is applied here, not exclusive + * or, so your account may have both permission \"B\" and permission \"C\".) */ public void exchangeInfoExampleAsync() { ExchangeInfoRequest exchangeInfoRequest = new ExchangeInfoRequest(); @@ -47,9 +64,26 @@ public void exchangeInfoExampleAsync() { } /** - * WebSocket Exchange information + * Exchange information * - *

Query current exchange trading rules, rate limits, and symbol information. Weight: 20 + *

Query current exchange trading rules, rate limits, and symbol information. Weight(IP): 20 + * Security Type: NONE Notes: **Data Source:** Memory **Notes:** * If the value provided to + * `symbol` or `symbols` do not exist, the endpoint will throw an error + * saying the symbol is invalid. * All parameters are optional. * Only one of + * `symbol`, `symbols`, `permissions` parameters can be specified. + * * Without parameters, `exchangeInfo` displays all symbols with + * `[\"SPOT\", \"MARGIN\", \"LEVERAGED\"]` permissions. + * * In order to list *all* active symbols on the exchange, you need to explicitly request all + * permissions. * `permissions` accepts either a list of permissions, or a single + * permission name. E.g. `\"SPOT\"`. **Examples of Symbol Permissions + * Interpretation from the Response:** * `[[\"A\",\"B\"]]` means + * you may place an order if your account has either permission \"A\" **or** + * permission \"B\". * `[[\"A\"],[\"B\"]]` means you can + * place an order if your account has permission \"A\" **and** permission + * \"B\". * `[[\"A\"],[\"B\",\"C\"]]` means + * you can place an order if your account has permission \"A\" **and** permission + * \"B\" or permission \"C\". (Inclusive or is applied here, not exclusive + * or, so your account may have both permission \"B\" and permission \"C\".) */ public void exchangeInfoExampleSync() { ExchangeInfoRequest exchangeInfoRequest = new ExchangeInfoRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/ExecutionRulesExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/ExecutionRulesExample.java index ac94e6d9f..5ad7b86cc 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/ExecutionRulesExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/ExecutionRulesExample.java @@ -29,10 +29,12 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Query Execution Rules + * Query Execution Rules * - *

Weight: Parameter | Weight| --- | --- `symbol` | 2 `symbols` | 2 for - * each `symbol`, capped at a max of 40| `symbolStatus` |40| None |40| + *

Query execution rules for symbols. Weight: Parameter | Weight --- | --- `symbol` + * | 2 `symbols` | 2 for each `symbol`, capped at a max of 40 + * `symbolStatus` | 40 None | 40 Security Type: NONE Notes: **Data Source:** Memory + * **Note:** No combination of multiple parameters is allowed. */ public void executionRulesExampleAsync() { ExecutionRulesRequest executionRulesRequest = new ExecutionRulesRequest(); @@ -49,10 +51,12 @@ public void executionRulesExampleAsync() { } /** - * WebSocket Query Execution Rules + * Query Execution Rules * - *

Weight: Parameter | Weight| --- | --- `symbol` | 2 `symbols` | 2 for - * each `symbol`, capped at a max of 40| `symbolStatus` |40| None |40| + *

Query execution rules for symbols. Weight: Parameter | Weight --- | --- `symbol` + * | 2 `symbols` | 2 for each `symbol`, capped at a max of 40 + * `symbolStatus` | 40 None | 40 Security Type: NONE Notes: **Data Source:** Memory + * **Note:** No combination of multiple parameters is allowed. */ public void executionRulesExampleSync() { ExecutionRulesRequest executionRulesRequest = new ExecutionRulesRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/PingExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/PingExample.java index 5fa1f5d84..a8bf36c25 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/PingExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/PingExample.java @@ -28,9 +28,12 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Test connectivity + * Test connectivity * - *

Test connectivity to the WebSocket API. Weight: 1 + *

Test connectivity to the WebSocket API. Note: You can use regular WebSocket ping frames to + * test connectivity as well, WebSocket API will respond with pong frames as soon as possible. + * ping request along with time is a safe way to test request-response handling in your + * application. Weight(IP): 1 Security Type: NONE Notes: **Data Source:** Memory */ public void pingExampleAsync() { CompletableFuture future = getApi().ping(); @@ -45,9 +48,12 @@ public void pingExampleAsync() { } /** - * WebSocket Test connectivity + * Test connectivity * - *

Test connectivity to the WebSocket API. Weight: 1 + *

Test connectivity to the WebSocket API. Note: You can use regular WebSocket ping frames to + * test connectivity as well, WebSocket API will respond with pong frames as soon as possible. + * ping request along with time is a safe way to test request-response handling in your + * application. Weight(IP): 1 Security Type: NONE Notes: **Data Source:** Memory */ public void pingExampleSync() { CompletableFuture future = getApi().ping(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/TimeExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/TimeExample.java index bcabc2aad..ee291cebb 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/TimeExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/general/TimeExample.java @@ -28,9 +28,10 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Check server time + * Check server time * - *

Test connectivity to the WebSocket API and get the current server time. Weight: 1 + *

Test connectivity to the WebSocket API and get the current server time. Weight(IP): 1 + * Security Type: NONE Notes: **Data Source:** Memory */ public void timeExampleAsync() { CompletableFuture future = getApi().time(); @@ -45,9 +46,10 @@ public void timeExampleAsync() { } /** - * WebSocket Check server time + * Check server time * - *

Test connectivity to the WebSocket API and get the current server time. Weight: 1 + *

Test connectivity to the WebSocket API and get the current server time. Weight(IP): 1 + * Security Type: NONE Notes: **Data Source:** Memory */ public void timeExampleSync() { CompletableFuture future = getApi().time(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/AvgPriceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/AvgPriceExample.java index 28a94aff2..c1744d3e5 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/AvgPriceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/AvgPriceExample.java @@ -29,9 +29,10 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Current average price + * Current average price * - *

Get current average price for a symbol. Weight: 2 + *

Get current average price for a symbol. Weight(IP): 2 Security Type: NONE Notes: **Data + * Source:** Memory */ public void avgPriceExampleAsync() { AvgPriceRequest avgPriceRequest = new AvgPriceRequest(); @@ -48,9 +49,10 @@ public void avgPriceExampleAsync() { } /** - * WebSocket Current average price + * Current average price * - *

Get current average price for a symbol. Weight: 2 + *

Get current average price for a symbol. Weight(IP): 2 Security Type: NONE Notes: **Data + * Source:** Memory */ public void avgPriceExampleSync() { AvgPriceRequest avgPriceRequest = new AvgPriceRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/BlockTradesHistoricalExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/BlockTradesHistoricalExample.java new file mode 100644 index 000000000..b681fcd7f --- /dev/null +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/BlockTradesHistoricalExample.java @@ -0,0 +1,68 @@ +package com.binance.connector.client.spot.websocket.api.market; + +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.spot.websocket.api.SpotWebSocketApiUtil; +import com.binance.connector.client.spot.websocket.api.api.SpotWebSocketApi; +import com.binance.connector.client.spot.websocket.api.model.BlockTradesHistoricalRequest; +import com.binance.connector.client.spot.websocket.api.model.BlockTradesHistoricalResponse; +import java.util.concurrent.CompletableFuture; + +/** API examples for MarketApi */ +public class BlockTradesHistoricalExample { + private SpotWebSocketApi api; + + public SpotWebSocketApi getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + SpotWebSocketApiUtil.getClientConfiguration(); + // if you want the connection to be auto logged on: + // https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/authentication-requests + clientConfiguration.setAutoLogon(true); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("/path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new SpotWebSocketApi(clientConfiguration); + } + return api; + } + + /** + * Historical Block Trades + * + *

Get block trades. Weight(IP): 25 Security Type: NONE Notes: - Data Source: Database + */ + public void blockTradesHistoricalExampleAsync() { + BlockTradesHistoricalRequest blockTradesHistoricalRequest = + new BlockTradesHistoricalRequest(); + blockTradesHistoricalRequest.symbol("BNBBTC"); + blockTradesHistoricalRequest.fromId(582L); + CompletableFuture future = + getApi().blockTradesHistorical(blockTradesHistoricalRequest); + future.handle( + (response, error) -> { + if (error != null) { + System.err.println(error); + } + System.out.println(response); + return response; + }); + } + + /** + * Historical Block Trades + * + *

Get block trades. Weight(IP): 25 Security Type: NONE Notes: - Data Source: Database + */ + public void blockTradesHistoricalExampleSync() { + BlockTradesHistoricalRequest blockTradesHistoricalRequest = + new BlockTradesHistoricalRequest(); + blockTradesHistoricalRequest.symbol("BNBBTC"); + blockTradesHistoricalRequest.fromId(582L); + CompletableFuture future = + getApi().blockTradesHistorical(blockTradesHistoricalRequest); + BlockTradesHistoricalResponse response = future.join(); + System.out.println(response); + } +} diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/DepthExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/DepthExample.java index 616f32634..44f31efea 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/DepthExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/DepthExample.java @@ -29,15 +29,16 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Order book + * Order book * *

Get current order book. Note that this request returns limited market depth. If you need * to continuously monitor order book updates, please consider using WebSocket Streams: * * `<symbol>@depth<levels>` * `<symbol>@depth` You can use * `depth` request together with `<symbol>@depth` streams to [maintain - * a local order book](web-socket-streams.md#how-to-manage-a-local-order-book-correctly). - * Weight: Adjusted based on the limit: | Limit | Weight | |:---------:|:------:| | 1–100 | 5 | - * | 101–500 | 25| | 501–1000 | 50 | | 1001–5000 | 250 | + * a local order + * book](/products/spot/web-socket-streams#how-to-manage-a-local-order-book-correctly). Weight: + * Adjusted based on the limit: |Limit|Request Weight ------|------- 1-100| 5 101-500| 25 + * 501-1000| 50 1001-5000| 250 Security Type: NONE Notes: **Data Source:** Memory */ public void depthExampleAsync() { DepthRequest depthRequest = new DepthRequest(); @@ -54,15 +55,16 @@ public void depthExampleAsync() { } /** - * WebSocket Order book + * Order book * *

Get current order book. Note that this request returns limited market depth. If you need * to continuously monitor order book updates, please consider using WebSocket Streams: * * `<symbol>@depth<levels>` * `<symbol>@depth` You can use * `depth` request together with `<symbol>@depth` streams to [maintain - * a local order book](web-socket-streams.md#how-to-manage-a-local-order-book-correctly). - * Weight: Adjusted based on the limit: | Limit | Weight | |:---------:|:------:| | 1–100 | 5 | - * | 101–500 | 25| | 501–1000 | 50 | | 1001–5000 | 250 | + * a local order + * book](/products/spot/web-socket-streams#how-to-manage-a-local-order-book-correctly). Weight: + * Adjusted based on the limit: |Limit|Request Weight ------|------- 1-100| 5 101-500| 25 + * 501-1000| 50 1001-5000| 250 Security Type: NONE Notes: **Data Source:** Memory */ public void depthExampleSync() { DepthRequest depthRequest = new DepthRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/KlinesExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/KlinesExample.java index a87e80ca1..0b5612ded 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/KlinesExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/KlinesExample.java @@ -30,13 +30,24 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Klines + * Klines * *

Get klines (candlestick bars). Klines are uniquely identified by their open & close * time. If you need access to real-time kline updates, please consider using WebSocket Streams: * * `<symbol>@kline_<interval>` If you need historical kline data, please * consider using [data.binance.vision](https://github.com/binance/binance-public-data/#klines). - * Weight: 2 + * Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Database Supported kline intervals + * (case-sensitive): Interval | `interval` value --------- | ---------------- seconds + * | `1s` minutes | `1m`, `3m`, `5m`, `15m`, + * `30m` hours | `1h`, `2h`, `4h`, `6h`, + * `8h`, `12h` days | `1d`, `3d` weeks | `1w` + * months | `1M` **Notes:** * If `startTime` and `endTime` are not + * sent, the most recent klines are returned. * Supported values for `timeZone`: * + * Hours and minutes (e.g. `-1:00`, `05:45`) * Only hours (e.g. + * `0`, `8`, `4`) * Accepted range is strictly [-12:00 to +14:00] + * inclusive * If `timeZone` provided, kline intervals are interpreted in that + * timezone instead of UTC. * Note that `startTime` and `endTime` are always + * interpreted in UTC, regardless of `timeZone`. */ public void klinesExampleAsync() { KlinesRequest klinesRequest = new KlinesRequest(); @@ -54,13 +65,24 @@ public void klinesExampleAsync() { } /** - * WebSocket Klines + * Klines * *

Get klines (candlestick bars). Klines are uniquely identified by their open & close * time. If you need access to real-time kline updates, please consider using WebSocket Streams: * * `<symbol>@kline_<interval>` If you need historical kline data, please * consider using [data.binance.vision](https://github.com/binance/binance-public-data/#klines). - * Weight: 2 + * Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Database Supported kline intervals + * (case-sensitive): Interval | `interval` value --------- | ---------------- seconds + * | `1s` minutes | `1m`, `3m`, `5m`, `15m`, + * `30m` hours | `1h`, `2h`, `4h`, `6h`, + * `8h`, `12h` days | `1d`, `3d` weeks | `1w` + * months | `1M` **Notes:** * If `startTime` and `endTime` are not + * sent, the most recent klines are returned. * Supported values for `timeZone`: * + * Hours and minutes (e.g. `-1:00`, `05:45`) * Only hours (e.g. + * `0`, `8`, `4`) * Accepted range is strictly [-12:00 to +14:00] + * inclusive * If `timeZone` provided, kline intervals are interpreted in that + * timezone instead of UTC. * Note that `startTime` and `endTime` are always + * interpreted in UTC, regardless of `timeZone`. */ public void klinesExampleSync() { KlinesRequest klinesRequest = new KlinesRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceCalculationExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceCalculationExample.java index 7f8cc883b..364f043e7 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceCalculationExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceCalculationExample.java @@ -29,14 +29,15 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Query Reference Price Calculation + * Query Reference Price Calculation * - *

Describes how reference price is calculated for a given symbol. Weight: 2 + *

Query Reference Price Calculation Weight(IP): 2 Security Type: NONE Notes: **Data + * Source:** Memory */ public void referencePriceCalculationExampleAsync() { ReferencePriceCalculationRequest referencePriceCalculationRequest = new ReferencePriceCalculationRequest(); - referencePriceCalculationRequest.symbol("BNBUSDT"); + referencePriceCalculationRequest.symbol("BAZUSD"); CompletableFuture future = getApi().referencePriceCalculation(referencePriceCalculationRequest); future.handle( @@ -50,14 +51,15 @@ public void referencePriceCalculationExampleAsync() { } /** - * WebSocket Query Reference Price Calculation + * Query Reference Price Calculation * - *

Describes how reference price is calculated for a given symbol. Weight: 2 + *

Query Reference Price Calculation Weight(IP): 2 Security Type: NONE Notes: **Data + * Source:** Memory */ public void referencePriceCalculationExampleSync() { ReferencePriceCalculationRequest referencePriceCalculationRequest = new ReferencePriceCalculationRequest(); - referencePriceCalculationRequest.symbol("BNBUSDT"); + referencePriceCalculationRequest.symbol("BAZUSD"); CompletableFuture future = getApi().referencePriceCalculation(referencePriceCalculationRequest); ReferencePriceCalculationResponse response = future.join(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceExample.java index 897659f26..21c847798 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceExample.java @@ -29,13 +29,13 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Query Reference Price + * Query Reference Price * - *

Weight: 2 + *

Query Reference Price Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory */ public void referencePriceExampleAsync() { ReferencePriceRequest referencePriceRequest = new ReferencePriceRequest(); - referencePriceRequest.symbol("BNBUSDT"); + referencePriceRequest.symbol("BAZUSD"); CompletableFuture future = getApi().referencePrice(referencePriceRequest); future.handle( @@ -49,13 +49,13 @@ public void referencePriceExampleAsync() { } /** - * WebSocket Query Reference Price + * Query Reference Price * - *

Weight: 2 + *

Query Reference Price Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory */ public void referencePriceExampleSync() { ReferencePriceRequest referencePriceRequest = new ReferencePriceRequest(); - referencePriceRequest.symbol("BNBUSDT"); + referencePriceRequest.symbol("BAZUSD"); CompletableFuture future = getApi().referencePrice(referencePriceRequest); ReferencePriceResponse response = future.join(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/Ticker24hrExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/Ticker24hrExample.java index dd8de5cd5..a9df4e0e0 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/Ticker24hrExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/Ticker24hrExample.java @@ -29,15 +29,18 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket 24hr ticker price change statistics + * 24hr ticker price change statistics * *

Get 24-hour rolling window price change statistics. If you need to continuously monitor * trading statistics, please consider using WebSocket Streams: * * `<symbol>@ticker` or `!ticker@arr` * * `<symbol>@miniTicker` or `!miniTicker@arr` If you need different * window sizes, use the `ticker` request. Weight: Adjusted based on the number of - * requested symbols: | Symbols | Weight | |:-----------:|:------:| | 1–20 | 2 | | 21–100 | 40 | - * | 101 or more | 80 | | all symbols | 80 | + * requested symbols: |Parameter|Symbols Provided|Weight| |---|---|---| |symbol| 1 |2| | + * |omitted| 80| |symbols| 1-20 |2| | | 21-100 |40| | | 101+ |80| | |omitted| 80| Security Type: + * NONE Notes: **Data Source:** Memory Notes: * `symbol` and `symbols` + * cannot be used together. * If no symbol is specified, returns information about all symbols + * currently trading on the exchange. */ public void ticker24hrExampleAsync() { Ticker24hrRequest ticker24hrRequest = new Ticker24hrRequest(); @@ -53,15 +56,18 @@ public void ticker24hrExampleAsync() { } /** - * WebSocket 24hr ticker price change statistics + * 24hr ticker price change statistics * *

Get 24-hour rolling window price change statistics. If you need to continuously monitor * trading statistics, please consider using WebSocket Streams: * * `<symbol>@ticker` or `!ticker@arr` * * `<symbol>@miniTicker` or `!miniTicker@arr` If you need different * window sizes, use the `ticker` request. Weight: Adjusted based on the number of - * requested symbols: | Symbols | Weight | |:-----------:|:------:| | 1–20 | 2 | | 21–100 | 40 | - * | 101 or more | 80 | | all symbols | 80 | + * requested symbols: |Parameter|Symbols Provided|Weight| |---|---|---| |symbol| 1 |2| | + * |omitted| 80| |symbols| 1-20 |2| | | 21-100 |40| | | 101+ |80| | |omitted| 80| Security Type: + * NONE Notes: **Data Source:** Memory Notes: * `symbol` and `symbols` + * cannot be used together. * If no symbol is specified, returns information about all symbols + * currently trading on the exchange. */ public void ticker24hrExampleSync() { Ticker24hrRequest ticker24hrRequest = new Ticker24hrRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerBookExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerBookExample.java index 9c4018483..83674056e 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerBookExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerBookExample.java @@ -29,13 +29,15 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Symbol order book ticker + * Symbol order book ticker * *

Get the current best price and quantity on the order book. If you need access to real-time * order book ticker updates, please consider using WebSocket Streams: * * `<symbol>@bookTicker` Weight: Adjusted based on the number of requested - * symbols: | Parameter | Weight | | --------- |:------:| | `symbol` | 2 | | - * `symbols` | 4 | | none | 4 | + * symbols: |Parameter|Symbols Provided|Weight| |---|---|---| |symbol| 1 |2| | |omitted| 4| + * |symbols| Any |4| Security Type: NONE Notes: **Data Source:** Memory Notes: * + * `symbol` and `symbols` cannot be used together. * If no symbol is + * specified, returns information about all symbols currently trading on the exchange. */ public void tickerBookExampleAsync() { TickerBookRequest tickerBookRequest = new TickerBookRequest(); @@ -51,13 +53,15 @@ public void tickerBookExampleAsync() { } /** - * WebSocket Symbol order book ticker + * Symbol order book ticker * *

Get the current best price and quantity on the order book. If you need access to real-time * order book ticker updates, please consider using WebSocket Streams: * * `<symbol>@bookTicker` Weight: Adjusted based on the number of requested - * symbols: | Parameter | Weight | | --------- |:------:| | `symbol` | 2 | | - * `symbols` | 4 | | none | 4 | + * symbols: |Parameter|Symbols Provided|Weight| |---|---|---| |symbol| 1 |2| | |omitted| 4| + * |symbols| Any |4| Security Type: NONE Notes: **Data Source:** Memory Notes: * + * `symbol` and `symbols` cannot be used together. * If no symbol is + * specified, returns information about all symbols currently trading on the exchange. */ public void tickerBookExampleSync() { TickerBookRequest tickerBookRequest = new TickerBookRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerExample.java index 3dc749ab6..7d54d17dc 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerExample.java @@ -29,12 +29,31 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Rolling window price change statistics + * Rolling window price change statistics * *

Get rolling window price change statistics with a custom window. This request is similar - * to `ticker.24hr`, but statistics are computed on demand using the arbitrary window - * you specify. Weight: Adjusted based on the number of requested symbols: | Symbols | Weight | - * |:-------:|:------:| | 1–50 | 4 per symbol | | 51–100 | 200 | + * to `ticker.24hr` but statistics are computed on demand using the arbitrary window + * you specify. **Note:** Window size precision is limited to 1 minute. While the + * `closeTime` is the current time of the request, `openTime` always start + * on a minute boundary. As such, the effective window might be up to 59999 ms wider than the + * requested `windowSize`. <details> <summary>Window computation + * example</summary> For example, a request for `\"windowSize\": + * \"7d\"` might result in the following window: ```javascript { + * \"openTime\": 1659580020000, \"closeTime\": 1660184865291 } + * ``` Time of the request – `closeTime` – is 1660184865291 (August 11, + * 2022 02:27:45.291). Requested window size should put the `openTime` 7 days before + * that – August 4, 02:27:45.291 – but due to limited precision it ends up a bit earlier: + * 1659580020000 (August 4, 2022 02:27:00), exactly at the start of a minute. </details> + * If you need to continuously monitor trading statistics, please consider using WebSocket + * Streams: * `<symbol>@ticker_<window_size>` or + * `!ticker_<window-size>@arr` Weight: Adjusted based on the number of requested + * symbols: | Symbols | Weight | |:-------:|:------:| | 1–50 | 4 per symbol | | 51–100 | 200 | + * Security Type: NONE Notes: **Data Source:** Database Supported window sizes: Unit | + * `windowSize` value ------- | ------------------ minutes | `1m`, + * `2m` ... `59m` hours | `1h`, `2h` ... `23h` + * days | `1d`, `2d` ... `7d` Notes: * Either `symbol` + * or `symbols` must be specified. * Maximum number of symbols in one request: 200. * + * Window size units cannot be combined. E.g., <code>1d 2h</code> is not supported. */ public void tickerExampleAsync() { TickerRequest tickerRequest = new TickerRequest(); @@ -50,12 +69,31 @@ public void tickerExampleAsync() { } /** - * WebSocket Rolling window price change statistics + * Rolling window price change statistics * *

Get rolling window price change statistics with a custom window. This request is similar - * to `ticker.24hr`, but statistics are computed on demand using the arbitrary window - * you specify. Weight: Adjusted based on the number of requested symbols: | Symbols | Weight | - * |:-------:|:------:| | 1–50 | 4 per symbol | | 51–100 | 200 | + * to `ticker.24hr` but statistics are computed on demand using the arbitrary window + * you specify. **Note:** Window size precision is limited to 1 minute. While the + * `closeTime` is the current time of the request, `openTime` always start + * on a minute boundary. As such, the effective window might be up to 59999 ms wider than the + * requested `windowSize`. <details> <summary>Window computation + * example</summary> For example, a request for `\"windowSize\": + * \"7d\"` might result in the following window: ```javascript { + * \"openTime\": 1659580020000, \"closeTime\": 1660184865291 } + * ``` Time of the request – `closeTime` – is 1660184865291 (August 11, + * 2022 02:27:45.291). Requested window size should put the `openTime` 7 days before + * that – August 4, 02:27:45.291 – but due to limited precision it ends up a bit earlier: + * 1659580020000 (August 4, 2022 02:27:00), exactly at the start of a minute. </details> + * If you need to continuously monitor trading statistics, please consider using WebSocket + * Streams: * `<symbol>@ticker_<window_size>` or + * `!ticker_<window-size>@arr` Weight: Adjusted based on the number of requested + * symbols: | Symbols | Weight | |:-------:|:------:| | 1–50 | 4 per symbol | | 51–100 | 200 | + * Security Type: NONE Notes: **Data Source:** Database Supported window sizes: Unit | + * `windowSize` value ------- | ------------------ minutes | `1m`, + * `2m` ... `59m` hours | `1h`, `2h` ... `23h` + * days | `1d`, `2d` ... `7d` Notes: * Either `symbol` + * or `symbols` must be specified. * Maximum number of symbols in one request: 200. * + * Window size units cannot be combined. E.g., <code>1d 2h</code> is not supported. */ public void tickerExampleSync() { TickerRequest tickerRequest = new TickerRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerPriceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerPriceExample.java index 64bee6d1c..d8a239cd4 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerPriceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerPriceExample.java @@ -29,13 +29,15 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Symbol price ticker + * Symbol price ticker * *

Get the latest market price for a symbol. If you need access to real-time price updates, * please consider using WebSocket Streams: * `<symbol>@aggTrade` * - * `<symbol>@trade` Weight: Adjusted based on the number of requested symbols: | - * Parameter | Weight | | --------- |:------:| | `symbol` | 2 | | `symbols` - * | 4 | | none | 4 | + * `<symbol>@trade` Weight: Adjusted based on the number of requested symbols: + * |Parameter|Symbols Provided|Weight| |---|---|---| |symbol| 1 |2| | |omitted| 4| |symbols| Any + * |4| Security Type: NONE Notes: **Data Source:** Memory Notes: * `symbol` and + * `symbols` cannot be used together. * If no symbol is specified, returns information + * about all symbols currently trading on the exchange. */ public void tickerPriceExampleAsync() { TickerPriceRequest tickerPriceRequest = new TickerPriceRequest(); @@ -51,13 +53,15 @@ public void tickerPriceExampleAsync() { } /** - * WebSocket Symbol price ticker + * Symbol price ticker * *

Get the latest market price for a symbol. If you need access to real-time price updates, * please consider using WebSocket Streams: * `<symbol>@aggTrade` * - * `<symbol>@trade` Weight: Adjusted based on the number of requested symbols: | - * Parameter | Weight | | --------- |:------:| | `symbol` | 2 | | `symbols` - * | 4 | | none | 4 | + * `<symbol>@trade` Weight: Adjusted based on the number of requested symbols: + * |Parameter|Symbols Provided|Weight| |---|---|---| |symbol| 1 |2| | |omitted| 4| |symbols| Any + * |4| Security Type: NONE Notes: **Data Source:** Memory Notes: * `symbol` and + * `symbols` cannot be used together. * If no symbol is specified, returns information + * about all symbols currently trading on the exchange. */ public void tickerPriceExampleSync() { TickerPriceRequest tickerPriceRequest = new TickerPriceRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerTradingDayExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerTradingDayExample.java index 2d083f2f7..36523abc0 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerTradingDayExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerTradingDayExample.java @@ -29,11 +29,13 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Trading Day Ticker + * Trading Day Ticker * - *

Price change statistics for a trading day. Weight: 4 for each requested - * <tt>symbol</tt>. <br/><br/> The weight for this request will cap at - * 200 once the number of `symbols` in the request is more than 50. + *

Price change statistics for a trading day. Weight: 4 for each requested symbol regardless + * of windowSize. The weight for this request will cap at 200 once the number of symbols in the + * request is more than 50. Security Type: NONE Notes: **Data Source:** Database **Notes:** * + * Supported values for `timeZone`: * Hours and minutes (e.g. `-1:00`, + * `05:45`) * Only hours (e.g. `0`, `8`, `4`) */ public void tickerTradingDayExampleAsync() { TickerTradingDayRequest tickerTradingDayRequest = new TickerTradingDayRequest(); @@ -50,11 +52,13 @@ public void tickerTradingDayExampleAsync() { } /** - * WebSocket Trading Day Ticker + * Trading Day Ticker * - *

Price change statistics for a trading day. Weight: 4 for each requested - * <tt>symbol</tt>. <br/><br/> The weight for this request will cap at - * 200 once the number of `symbols` in the request is more than 50. + *

Price change statistics for a trading day. Weight: 4 for each requested symbol regardless + * of windowSize. The weight for this request will cap at 200 once the number of symbols in the + * request is more than 50. Security Type: NONE Notes: **Data Source:** Database **Notes:** * + * Supported values for `timeZone`: * Hours and minutes (e.g. `-1:00`, + * `05:45`) * Only hours (e.g. `0`, `8`, `4`) */ public void tickerTradingDayExampleSync() { TickerTradingDayRequest tickerTradingDayRequest = new TickerTradingDayRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesAggregateExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesAggregateExample.java index 238c0e2bd..49081becf 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesAggregateExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesAggregateExample.java @@ -29,7 +29,7 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Aggregate trades + * Aggregate trades * *

Get aggregate trades. An *aggregate trade* (aggtrade) represents one or more individual * trades. Trades that fill at the same time, from the same taker order, with the same price – @@ -37,7 +37,14 @@ public SpotWebSocketApi getApi() { * trades. If you need access to real-time trading activity, please consider using WebSocket * Streams: * `<symbol>@aggTrade` If you need historical aggregate trade data, * please consider using - * [data.binance.vision](https://github.com/binance/binance-public-data/#aggtrades). Weight: 4 + * [data.binance.vision](https://github.com/binance/binance-public-data/#aggtrades). Weight(IP): + * 4 Security Type: NONE Notes: **Data Source:** Database - If `fromId` is specified, + * return aggtrades with aggregate trade ID >= `fromId`. Use + * `fromId` and `limit` to page through all aggtrades. - If + * `startTime` and/or `endTime` are specified, aggtrades are filtered by + * execution time (`T`). `fromId` cannot be used together with + * `startTime` and `endTime`. - If no condition is specified, the most + * recent aggregate trades are returned. */ public void tradesAggregateExampleAsync() { TradesAggregateRequest tradesAggregateRequest = new TradesAggregateRequest(); @@ -55,7 +62,7 @@ public void tradesAggregateExampleAsync() { } /** - * WebSocket Aggregate trades + * Aggregate trades * *

Get aggregate trades. An *aggregate trade* (aggtrade) represents one or more individual * trades. Trades that fill at the same time, from the same taker order, with the same price – @@ -63,7 +70,14 @@ public void tradesAggregateExampleAsync() { * trades. If you need access to real-time trading activity, please consider using WebSocket * Streams: * `<symbol>@aggTrade` If you need historical aggregate trade data, * please consider using - * [data.binance.vision](https://github.com/binance/binance-public-data/#aggtrades). Weight: 4 + * [data.binance.vision](https://github.com/binance/binance-public-data/#aggtrades). Weight(IP): + * 4 Security Type: NONE Notes: **Data Source:** Database - If `fromId` is specified, + * return aggtrades with aggregate trade ID >= `fromId`. Use + * `fromId` and `limit` to page through all aggtrades. - If + * `startTime` and/or `endTime` are specified, aggtrades are filtered by + * execution time (`T`). `fromId` cannot be used together with + * `startTime` and `endTime`. - If no condition is specified, the most + * recent aggregate trades are returned. */ public void tradesAggregateExampleSync() { TradesAggregateRequest tradesAggregateRequest = new TradesAggregateRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesHistoricalExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesHistoricalExample.java index 33620439a..f2cc4f25e 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesHistoricalExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesHistoricalExample.java @@ -29,9 +29,10 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Historical trades + * Historical trades * - *

Get historical trades. Weight: 25 + *

Get historical trades. Weight(IP): 25 Security Type: NONE Notes: **Data Source:** Database + * Notes: * If `fromId` is not specified, the most recent trades are returned. */ public void tradesHistoricalExampleAsync() { TradesHistoricalRequest tradesHistoricalRequest = new TradesHistoricalRequest(); @@ -49,9 +50,10 @@ public void tradesHistoricalExampleAsync() { } /** - * WebSocket Historical trades + * Historical trades * - *

Get historical trades. Weight: 25 + *

Get historical trades. Weight(IP): 25 Security Type: NONE Notes: **Data Source:** Database + * Notes: * If `fromId` is not specified, the most recent trades are returned. */ public void tradesHistoricalExampleSync() { TradesHistoricalRequest tradesHistoricalRequest = new TradesHistoricalRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesRecentExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesRecentExample.java index 294585c35..9a2cf3e1d 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesRecentExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesRecentExample.java @@ -29,10 +29,11 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Recent trades + * Recent trades * *

Get recent trades. If you need access to real-time trading activity, please consider using - * WebSocket Streams: * `<symbol>@trade` Weight: 25 + * WebSocket Streams: * `<symbol>@trade` Weight(IP): 25 Security Type: NONE + * Notes: **Data Source:** Memory */ public void tradesRecentExampleAsync() { TradesRecentRequest tradesRecentRequest = new TradesRecentRequest(); @@ -49,10 +50,11 @@ public void tradesRecentExampleAsync() { } /** - * WebSocket Recent trades + * Recent trades * *

Get recent trades. If you need access to real-time trading activity, please consider using - * WebSocket Streams: * `<symbol>@trade` Weight: 25 + * WebSocket Streams: * `<symbol>@trade` Weight(IP): 25 Security Type: NONE + * Notes: **Data Source:** Memory */ public void tradesRecentExampleSync() { TradesRecentRequest tradesRecentRequest = new TradesRecentRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/UiKlinesExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/UiKlinesExample.java index 1253ec191..2d6841d27 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/UiKlinesExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/UiKlinesExample.java @@ -30,11 +30,18 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket UI Klines + * UI Klines * *

Get klines (candlestick bars) optimized for presentation. This request is similar to * `klines`, having the same parameters and response. `uiKlines` return - * modified kline data, optimized for presentation of candlestick charts. Weight: 2 + * modified kline data, optimized for presentation of candlestick charts. Weight(IP): 2 Security + * Type: NONE Notes: **Data Source:** Database - If `startTime` and + * `endTime` are not sent, the most recent klines are returned. - Supported values for + * `timeZone`: - Hours and minutes (e.g. `-1:00`, `05:45`) - Only + * hours (e.g. `0`, `8`, `4`) - Accepted range is strictly [-12:00 + * to +14:00] inclusive - If `timeZone` provided, kline intervals are interpreted in + * that timezone instead of UTC. - Note that `startTime` and `endTime` are + * always interpreted in UTC, regardless of `timeZone`. */ public void uiKlinesExampleAsync() { UiKlinesRequest uiKlinesRequest = new UiKlinesRequest(); @@ -52,11 +59,18 @@ public void uiKlinesExampleAsync() { } /** - * WebSocket UI Klines + * UI Klines * *

Get klines (candlestick bars) optimized for presentation. This request is similar to * `klines`, having the same parameters and response. `uiKlines` return - * modified kline data, optimized for presentation of candlestick charts. Weight: 2 + * modified kline data, optimized for presentation of candlestick charts. Weight(IP): 2 Security + * Type: NONE Notes: **Data Source:** Database - If `startTime` and + * `endTime` are not sent, the most recent klines are returned. - Supported values for + * `timeZone`: - Hours and minutes (e.g. `-1:00`, `05:45`) - Only + * hours (e.g. `0`, `8`, `4`) - Accepted range is strictly [-12:00 + * to +14:00] inclusive - If `timeZone` provided, kline intervals are interpreted in + * that timezone instead of UTC. - Note that `startTime` and `endTime` are + * always interpreted in UTC, regardless of `timeZone`. */ public void uiKlinesExampleSync() { UiKlinesRequest uiKlinesRequest = new UiKlinesRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OpenOrdersCancelAllExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OpenOrdersCancelAllExample.java index c00134f42..b959f9c29 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OpenOrdersCancelAllExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OpenOrdersCancelAllExample.java @@ -29,10 +29,10 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Cancel open orders + * Cancel open orders (TRADE) * *

Cancel all open orders on a symbol. This includes orders that are part of an order list. - * Weight: 1 + * Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching Engine */ public void openOrdersCancelAllExampleAsync() { OpenOrdersCancelAllRequest openOrdersCancelAllRequest = new OpenOrdersCancelAllRequest(); @@ -50,10 +50,10 @@ public void openOrdersCancelAllExampleAsync() { } /** - * WebSocket Cancel open orders + * Cancel open orders (TRADE) * *

Cancel all open orders on a symbol. This includes orders that are part of an order list. - * Weight: 1 + * Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching Engine */ public void openOrdersCancelAllExampleSync() { OpenOrdersCancelAllRequest openOrdersCancelAllRequest = new OpenOrdersCancelAllRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderAmendKeepPriorityExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderAmendKeepPriorityExample.java index 495f2d57b..92f050127 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderAmendKeepPriorityExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderAmendKeepPriorityExample.java @@ -29,17 +29,19 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Order Amend Keep Priority + * Order Amend Keep Priority (TRADE) * *

Reduce the quantity of an existing open order. This adds 0 orders to the * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [Order - * Amend Keep Priority FAQ](faqs/order_amend_keep_priority.md) to learn more. Weight: 4 + * Amend Keep Priority FAQ](/products/spot/faqs/order_amend_keep_priority) to learn more. + * Weight(IP): 4 Unfilled Order Count: 0 Security Type: TRADE Notes: **Data Source:** Matching + * Engine */ public void orderAmendKeepPriorityExampleAsync() { OrderAmendKeepPriorityRequest orderAmendKeepPriorityRequest = new OrderAmendKeepPriorityRequest(); orderAmendKeepPriorityRequest.symbol("BNBUSDT"); - orderAmendKeepPriorityRequest.newQty(1.0d); + orderAmendKeepPriorityRequest.newQty(1d); CompletableFuture future = getApi().orderAmendKeepPriority(orderAmendKeepPriorityRequest); future.handle( @@ -53,17 +55,19 @@ public void orderAmendKeepPriorityExampleAsync() { } /** - * WebSocket Order Amend Keep Priority + * Order Amend Keep Priority (TRADE) * *

Reduce the quantity of an existing open order. This adds 0 orders to the * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [Order - * Amend Keep Priority FAQ](faqs/order_amend_keep_priority.md) to learn more. Weight: 4 + * Amend Keep Priority FAQ](/products/spot/faqs/order_amend_keep_priority) to learn more. + * Weight(IP): 4 Unfilled Order Count: 0 Security Type: TRADE Notes: **Data Source:** Matching + * Engine */ public void orderAmendKeepPriorityExampleSync() { OrderAmendKeepPriorityRequest orderAmendKeepPriorityRequest = new OrderAmendKeepPriorityRequest(); orderAmendKeepPriorityRequest.symbol("BNBUSDT"); - orderAmendKeepPriorityRequest.newQty(1.0d); + orderAmendKeepPriorityRequest.newQty(1d); CompletableFuture future = getApi().orderAmendKeepPriority(orderAmendKeepPriorityRequest); OrderAmendKeepPriorityResponse response = future.join(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelExample.java index c771555c0..4af8c0f14 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelExample.java @@ -29,9 +29,18 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Cancel order + * Cancel order (TRADE) * - *

Cancel an active order. Weight: 1 + *

Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** + * Matching Engine Notes: * If both `orderId` and `origClientOrderId` + * parameters are provided, the `orderId` is searched first, then the + * `origClientOrderId` from that result is checked against that order. If both + * conditions are not met the request will be rejected. * `newClientOrderId` will + * replace `clientOrderId` of the canceled order, freeing it up for new orders. * If + * you cancel an order that is a part of an order list, the entire order list is canceled. * The + * performance for canceling an order (single cancel or as part of a cancel-replace) is always + * better when only `orderId` is sent. Sending `origClientOrderId` or both + * `orderId` + `origClientOrderId` will be slower. */ public void orderCancelExampleAsync() { OrderCancelRequest orderCancelRequest = new OrderCancelRequest(); @@ -48,9 +57,18 @@ public void orderCancelExampleAsync() { } /** - * WebSocket Cancel order + * Cancel order (TRADE) * - *

Cancel an active order. Weight: 1 + *

Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** + * Matching Engine Notes: * If both `orderId` and `origClientOrderId` + * parameters are provided, the `orderId` is searched first, then the + * `origClientOrderId` from that result is checked against that order. If both + * conditions are not met the request will be rejected. * `newClientOrderId` will + * replace `clientOrderId` of the canceled order, freeing it up for new orders. * If + * you cancel an order that is a part of an order list, the entire order list is canceled. * The + * performance for canceling an order (single cancel or as part of a cancel-replace) is always + * better when only `orderId` is sent. Sending `origClientOrderId` or both + * `orderId` + `origClientOrderId` will be slower. */ public void orderCancelExampleSync() { OrderCancelRequest orderCancelRequest = new OrderCancelRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelReplaceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelReplaceExample.java index df62027e2..ad567fff4 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelReplaceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelReplaceExample.java @@ -32,13 +32,136 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Cancel and replace order + * Cancel and replace order (TRADE) * *

* Cancel an existing order and immediately place a new order instead of the canceled one. * * A new order that was not attempted (i.e. when `newOrderResult: NOT_ATTEMPTED`), * will still increase the unfilled order count by 1. * You can only cancel an individual order * from an orderList using this method, but the result is the same as canceling the entire - * orderList. Weight: 1 + * orderList.not attempted (i.e. when `newOrderResult: NOT_ATTEMPTED`), will still + * increase the unfilled order count by 1. Weight(IP): 1 Unfilled Order Count: 1 Security Type: + * TRADE Notes: **Data Source:** Matching Engine Similar to the + * [`order.place`](#order-place) request, additional mandatory parameters (*) are + * determined by the new order `type`. Available `cancelReplaceMode` + * options: * `STOP_ON_FAILURE` – if cancellation request fails, new order placement + * will not be attempted. * `ALLOW_FAILURE` – new order placement will be attempted + * even if the cancel request fails. <table> <thead> <tr> <th + * colspan=3 align=left>Request</th> <th colspan=3 + * align=left>Response</th> </tr> <tr> + * <th><code>cancelReplaceMode</code></th> + * <th><code>orderRateLimitExceededMode</code></th> <th>Unfilled + * Order Count</th> <th><code>cancelResult</code></th> + * <th><code>newOrderResult</code></th> + * <th><code>status</code></th> </tr> </thead> <tbody> + * <tr> <td + * rowspan=\"11\"><code>STOP_ON_FAILURE</code></td> <td + * rowspan=\"6\"><code>DO_NOTHING</code></td> <td + * rowspan=\"3\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"3\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td + * rowspan=\"5\"><code>CANCEL_ONLY</code></td> <td + * rowspan=\"3\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"2\">Exceeds Limits</td> <td>❌ + * <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>429</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>429</code></td> </tr> <tr> <td + * rowspan=\"16\"><code>ALLOW_FAILURE</code></td> <td + * rowspan=\"8\"><code>DO_NOTHING</code></td> <td + * rowspan=\"4\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>409</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"4\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td + * rowspan=\"8\"><CODE>CANCEL_ONLY</CODE></td> <td + * rowspan=\"4\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>409</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"4\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> </tbody> + * </table> Notes: * If both `cancelOrderId` and + * `cancelOrigClientOrderId` parameters are provided, the `cancelOrderId` is + * searched first, then the `cancelOrigClientOrderId` from that result is checked + * against that order. If both conditions are not met the request will be rejected. * + * `cancelNewClientOrderId` will replace `clientOrderId` of the canceled + * order, freeing it up for new orders. * `newClientOrderId` specifies + * `clientOrderId` value for the placed order. A new order with the same + * `clientOrderId` is accepted only when the previous one is filled or expired. The + * new order can reuse old `clientOrderId` of the canceled order. * This + * cancel-replace operation is **not transactional**. If one operation succeeds but the other + * one fails, the successful operation is still executed. For example, in + * `STOP_ON_FAILURE` mode, if the new order placement fails, the old order is still + * canceled. * Filters and order count limits are evaluated before cancellation and order + * placement occurs. * If new order placement is not attempted, your order count is still + * incremented. * Like [`order.cancel`](#order-cancel), if you cancel an individual + * order from an order list, the entire order list is canceled. * The performance for canceling + * an order (single cancel or as part of a cancel-replace) is always better when only + * `orderId` is sent. Sending `origClientOrderId` or both + * `orderId` + `origClientOrderId` will be slower. */ public void orderCancelReplaceExampleAsync() { OrderCancelReplaceRequest orderCancelReplaceRequest = new OrderCancelReplaceRequest(); @@ -59,13 +182,136 @@ public void orderCancelReplaceExampleAsync() { } /** - * WebSocket Cancel and replace order + * Cancel and replace order (TRADE) * *

* Cancel an existing order and immediately place a new order instead of the canceled one. * * A new order that was not attempted (i.e. when `newOrderResult: NOT_ATTEMPTED`), * will still increase the unfilled order count by 1. * You can only cancel an individual order * from an orderList using this method, but the result is the same as canceling the entire - * orderList. Weight: 1 + * orderList.not attempted (i.e. when `newOrderResult: NOT_ATTEMPTED`), will still + * increase the unfilled order count by 1. Weight(IP): 1 Unfilled Order Count: 1 Security Type: + * TRADE Notes: **Data Source:** Matching Engine Similar to the + * [`order.place`](#order-place) request, additional mandatory parameters (*) are + * determined by the new order `type`. Available `cancelReplaceMode` + * options: * `STOP_ON_FAILURE` – if cancellation request fails, new order placement + * will not be attempted. * `ALLOW_FAILURE` – new order placement will be attempted + * even if the cancel request fails. <table> <thead> <tr> <th + * colspan=3 align=left>Request</th> <th colspan=3 + * align=left>Response</th> </tr> <tr> + * <th><code>cancelReplaceMode</code></th> + * <th><code>orderRateLimitExceededMode</code></th> <th>Unfilled + * Order Count</th> <th><code>cancelResult</code></th> + * <th><code>newOrderResult</code></th> + * <th><code>status</code></th> </tr> </thead> <tbody> + * <tr> <td + * rowspan=\"11\"><code>STOP_ON_FAILURE</code></td> <td + * rowspan=\"6\"><code>DO_NOTHING</code></td> <td + * rowspan=\"3\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"3\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td + * rowspan=\"5\"><code>CANCEL_ONLY</code></td> <td + * rowspan=\"3\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"2\">Exceeds Limits</td> <td>❌ + * <code>FAILURE</code></td> <td>➖ + * <code>NOT_ATTEMPTED</code></td> <td + * align=right><code>429</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>429</code></td> </tr> <tr> <td + * rowspan=\"16\"><code>ALLOW_FAILURE</code></td> <td + * rowspan=\"8\"><code>DO_NOTHING</code></td> <td + * rowspan=\"4\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>409</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"4\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td align=right>N/A</td> + * </tr> <tr> <td + * rowspan=\"8\"><CODE>CANCEL_ONLY</CODE></td> <td + * rowspan=\"4\">Within Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>409</code></td> </tr> <tr> + * <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> <tr> <td + * rowspan=\"4\">Exceeds Limits</td> <td>✅ + * <code>SUCCESS</code></td> <td>✅ + * <code>SUCCESS</code></td> <td + * align=right><code>200</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>400</code></td> </tr> <tr> + * <td>❌ <code>FAILURE</code></td> <td>✅ + * <code>SUCCESS</code></td> <td align=right>N/A</td> + * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ + * <code>FAILURE</code></td> <td + * align=right><code>409</code></td> </tr> </tbody> + * </table> Notes: * If both `cancelOrderId` and + * `cancelOrigClientOrderId` parameters are provided, the `cancelOrderId` is + * searched first, then the `cancelOrigClientOrderId` from that result is checked + * against that order. If both conditions are not met the request will be rejected. * + * `cancelNewClientOrderId` will replace `clientOrderId` of the canceled + * order, freeing it up for new orders. * `newClientOrderId` specifies + * `clientOrderId` value for the placed order. A new order with the same + * `clientOrderId` is accepted only when the previous one is filled or expired. The + * new order can reuse old `clientOrderId` of the canceled order. * This + * cancel-replace operation is **not transactional**. If one operation succeeds but the other + * one fails, the successful operation is still executed. For example, in + * `STOP_ON_FAILURE` mode, if the new order placement fails, the old order is still + * canceled. * Filters and order count limits are evaluated before cancellation and order + * placement occurs. * If new order placement is not attempted, your order count is still + * incremented. * Like [`order.cancel`](#order-cancel), if you cancel an individual + * order from an order list, the entire order list is canceled. * The performance for canceling + * an order (single cancel or as part of a cancel-replace) is always better when only + * `orderId` is sent. Sending `origClientOrderId` or both + * `orderId` + `origClientOrderId` will be slower. */ public void orderCancelReplaceExampleSync() { OrderCancelReplaceRequest orderCancelReplaceRequest = new OrderCancelReplaceRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListCancelExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListCancelExample.java index 3475ab615..aeb31fede 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListCancelExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListCancelExample.java @@ -29,9 +29,14 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Cancel Order list + * Cancel Order list (TRADE) * - *

Cancel an active order list. Weight: 1 + *

Cancel an active order list. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** + * Matching Engine Notes: * If both `orderListId` and `listClientOrderId` + * parameters are provided, the `orderListId` is searched first, then the + * `listClientOrderId` from that result is checked against that order. If both + * conditions are not met the request will be rejected. * Canceling an individual order with + * [`order.cancel`](#order-cancel) will cancel the entire order list as well. */ public void orderListCancelExampleAsync() { OrderListCancelRequest orderListCancelRequest = new OrderListCancelRequest(); @@ -49,9 +54,14 @@ public void orderListCancelExampleAsync() { } /** - * WebSocket Cancel Order list + * Cancel Order list (TRADE) * - *

Cancel an active order list. Weight: 1 + *

Cancel an active order list. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** + * Matching Engine Notes: * If both `orderListId` and `listClientOrderId` + * parameters are provided, the `orderListId` is searched first, then the + * `listClientOrderId` from that result is checked against that order. If both + * conditions are not met the request will be rejected. * Canceling an individual order with + * [`order.cancel`](#order-cancel) will cancel the entire order list as well. */ public void orderListCancelExampleSync() { OrderListCancelRequest orderListCancelRequest = new OrderListCancelRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceExample.java index 80d1ad408..9010e5dce 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceExample.java @@ -30,19 +30,33 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Place new OCO - Deprecated + * Place new OCO - Deprecated (TRADE) * *

Send in a new one-cancels-the-other (OCO) pair: `LIMIT_MAKER` + * `STOP_LOSS`/`STOP_LOSS_LIMIT` orders (called *legs*), where activation of * one order immediately cancels the other. This adds 1 order to `EXCHANGE_MAX_ORDERS` - * filter and the `MAX_NUM_ORDERS` filter Weight: 1 Unfilled Order Count: 1 + * filter and the `MAX_NUM_ORDERS` filter Weight(IP): 1 Unfilled Order Count: 1 + * Security Type: TRADE Notes: **Data Source:** Matching Engine Notes: * + * `listClientOrderId` parameter specifies `listClientOrderId` for the OCO + * pair. A new OCO with the same `listClientOrderId` is accepted only when the + * previous one is filled or completely expired. `listClientOrderId` is distinct from + * `clientOrderId` of individual orders. * `limitClientOrderId` and + * `stopClientOrderId` specify `clientOrderId` values for both legs of the + * OCO. A new order with the same `clientOrderId` is accepted only when the previous + * one is filled or expired. * Price restrictions on the legs: | `side` | Price + * relation | | ------ | -------------- | | `BUY` | `price` < market + * price < `stopPrice` | | `SELL` | `price` > market price + * > `stopPrice` | * Both legs have the same `quantity`. However, you can + * set different iceberg quantity for individual legs. If `stopIcebergQty` is used, + * `stopLimitTimeInForce` must be `GTC`. * `trailingDelta` applies + * only to the `STOP_LOSS`/`STOP_LOSS_LIMIT` leg of the OCO. */ public void orderListPlaceExampleAsync() { OrderListPlaceRequest orderListPlaceRequest = new OrderListPlaceRequest(); orderListPlaceRequest.symbol("BNBUSDT"); orderListPlaceRequest.side(Side.BUY); - orderListPlaceRequest.price(1.0d); - orderListPlaceRequest.quantity(1.0d); + orderListPlaceRequest.price(1d); + orderListPlaceRequest.quantity(1d); CompletableFuture future = getApi().orderListPlace(orderListPlaceRequest); future.handle( @@ -56,19 +70,33 @@ public void orderListPlaceExampleAsync() { } /** - * WebSocket Place new OCO - Deprecated + * Place new OCO - Deprecated (TRADE) * *

Send in a new one-cancels-the-other (OCO) pair: `LIMIT_MAKER` + * `STOP_LOSS`/`STOP_LOSS_LIMIT` orders (called *legs*), where activation of * one order immediately cancels the other. This adds 1 order to `EXCHANGE_MAX_ORDERS` - * filter and the `MAX_NUM_ORDERS` filter Weight: 1 Unfilled Order Count: 1 + * filter and the `MAX_NUM_ORDERS` filter Weight(IP): 1 Unfilled Order Count: 1 + * Security Type: TRADE Notes: **Data Source:** Matching Engine Notes: * + * `listClientOrderId` parameter specifies `listClientOrderId` for the OCO + * pair. A new OCO with the same `listClientOrderId` is accepted only when the + * previous one is filled or completely expired. `listClientOrderId` is distinct from + * `clientOrderId` of individual orders. * `limitClientOrderId` and + * `stopClientOrderId` specify `clientOrderId` values for both legs of the + * OCO. A new order with the same `clientOrderId` is accepted only when the previous + * one is filled or expired. * Price restrictions on the legs: | `side` | Price + * relation | | ------ | -------------- | | `BUY` | `price` < market + * price < `stopPrice` | | `SELL` | `price` > market price + * > `stopPrice` | * Both legs have the same `quantity`. However, you can + * set different iceberg quantity for individual legs. If `stopIcebergQty` is used, + * `stopLimitTimeInForce` must be `GTC`. * `trailingDelta` applies + * only to the `STOP_LOSS`/`STOP_LOSS_LIMIT` leg of the OCO. */ public void orderListPlaceExampleSync() { OrderListPlaceRequest orderListPlaceRequest = new OrderListPlaceRequest(); orderListPlaceRequest.symbol("BNBUSDT"); orderListPlaceRequest.side(Side.BUY); - orderListPlaceRequest.price(1.0d); - orderListPlaceRequest.quantity(1.0d); + orderListPlaceRequest.price(1d); + orderListPlaceRequest.quantity(1d); CompletableFuture future = getApi().orderListPlace(orderListPlaceRequest); OrderListPlaceResponse response = future.join(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOcoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOcoExample.java index 61750e2db..dcbe221eb 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOcoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOcoExample.java @@ -32,7 +32,7 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Place new Order list - OCO + * Place new Order list - OCO (TRADE) * *

Send in an one-cancels-the-other (OCO) pair, where activation of one order immediately * cancels the other. * An OCO has 2 orders called the **above order** and **below order**. * @@ -46,13 +46,14 @@ public SpotWebSocketApi getApi() { * Last Traded Price < `STOP_LOSS/STOP_LOSS_LIMIT` `stopPrice` * * `TAKE_PROFIT stopPrice` > Last Traded Price > `STOP_LOSS/STOP_LOSS_LIMIT * stopPrice` * OCOs add **2 orders** to the `EXCHANGE_MAX_ORDERS` filter and - * `MAX_NUM_ORDERS` filter. Weight: 1 Unfilled Order Count: 2 + * `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE + * Notes: **Data Source:** Matching Engine */ public void orderListPlaceOcoExampleAsync() { OrderListPlaceOcoRequest orderListPlaceOcoRequest = new OrderListPlaceOcoRequest(); orderListPlaceOcoRequest.symbol("BNBUSDT"); orderListPlaceOcoRequest.side(Side.BUY); - orderListPlaceOcoRequest.quantity(1.0d); + orderListPlaceOcoRequest.quantity(1d); orderListPlaceOcoRequest.aboveType(AboveType.STOP_LOSS_LIMIT); orderListPlaceOcoRequest.belowType(BelowType.STOP_LOSS); CompletableFuture future = @@ -68,7 +69,7 @@ public void orderListPlaceOcoExampleAsync() { } /** - * WebSocket Place new Order list - OCO + * Place new Order list - OCO (TRADE) * *

Send in an one-cancels-the-other (OCO) pair, where activation of one order immediately * cancels the other. * An OCO has 2 orders called the **above order** and **below order**. * @@ -82,13 +83,14 @@ public void orderListPlaceOcoExampleAsync() { * Last Traded Price < `STOP_LOSS/STOP_LOSS_LIMIT` `stopPrice` * * `TAKE_PROFIT stopPrice` > Last Traded Price > `STOP_LOSS/STOP_LOSS_LIMIT * stopPrice` * OCOs add **2 orders** to the `EXCHANGE_MAX_ORDERS` filter and - * `MAX_NUM_ORDERS` filter. Weight: 1 Unfilled Order Count: 2 + * `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE + * Notes: **Data Source:** Matching Engine */ public void orderListPlaceOcoExampleSync() { OrderListPlaceOcoRequest orderListPlaceOcoRequest = new OrderListPlaceOcoRequest(); orderListPlaceOcoRequest.symbol("BNBUSDT"); orderListPlaceOcoRequest.side(Side.BUY); - orderListPlaceOcoRequest.quantity(1.0d); + orderListPlaceOcoRequest.quantity(1d); orderListPlaceOcoRequest.aboveType(AboveType.STOP_LOSS_LIMIT); orderListPlaceOcoRequest.belowType(BelowType.STOP_LOSS); CompletableFuture future = diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpoExample.java index 7816810c0..c11df1280 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpoExample.java @@ -33,18 +33,19 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket OPO + * OPO (TRADE) * - *

Place an [OPO](./faqs/opo.md). * OPOs add 2 orders to the EXCHANGE_MAX_NUM_ORDERS filter - * and MAX_NUM_ORDERS filter. Weight: 1 Unfilled Order Count: 2 + *

Place an [OPO](/products/spot/faqs/opo). * OPOs add 2 orders to the + * EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS filter. Weight(IP): 1 Unfilled Order Count: + * 2 Security Type: TRADE Notes: **Data Source:** Matching Engine */ public void orderListPlaceOpoExampleAsync() { OrderListPlaceOpoRequest orderListPlaceOpoRequest = new OrderListPlaceOpoRequest(); orderListPlaceOpoRequest.symbol("BNBUSDT"); orderListPlaceOpoRequest.workingType(WorkingType.LIMIT); orderListPlaceOpoRequest.workingSide(WorkingSide.BUY); - orderListPlaceOpoRequest.workingPrice(1.0d); - orderListPlaceOpoRequest.workingQuantity(1.0d); + orderListPlaceOpoRequest.workingPrice(1d); + orderListPlaceOpoRequest.workingQuantity(1d); orderListPlaceOpoRequest.pendingType(PendingType.LIMIT); orderListPlaceOpoRequest.pendingSide(PendingSide.BUY); CompletableFuture future = @@ -60,18 +61,19 @@ public void orderListPlaceOpoExampleAsync() { } /** - * WebSocket OPO + * OPO (TRADE) * - *

Place an [OPO](./faqs/opo.md). * OPOs add 2 orders to the EXCHANGE_MAX_NUM_ORDERS filter - * and MAX_NUM_ORDERS filter. Weight: 1 Unfilled Order Count: 2 + *

Place an [OPO](/products/spot/faqs/opo). * OPOs add 2 orders to the + * EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS filter. Weight(IP): 1 Unfilled Order Count: + * 2 Security Type: TRADE Notes: **Data Source:** Matching Engine */ public void orderListPlaceOpoExampleSync() { OrderListPlaceOpoRequest orderListPlaceOpoRequest = new OrderListPlaceOpoRequest(); orderListPlaceOpoRequest.symbol("BNBUSDT"); orderListPlaceOpoRequest.workingType(WorkingType.LIMIT); orderListPlaceOpoRequest.workingSide(WorkingSide.BUY); - orderListPlaceOpoRequest.workingPrice(1.0d); - orderListPlaceOpoRequest.workingQuantity(1.0d); + orderListPlaceOpoRequest.workingPrice(1d); + orderListPlaceOpoRequest.workingQuantity(1d); orderListPlaceOpoRequest.pendingType(PendingType.LIMIT); orderListPlaceOpoRequest.pendingSide(PendingSide.BUY); CompletableFuture future = diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpocoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpocoExample.java index ce019411b..f9635e349 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpocoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpocoExample.java @@ -33,17 +33,18 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket OPOCO + * OPOCO (TRADE) * - *

Place an [OPOCO](./faqs/opo.md). Weight: 1 Unfilled Order Count: 3 + *

Place an [OPOCO](/products/spot/faqs/opo). Weight(IP): 1 Unfilled Order Count: 3 Security + * Type: TRADE Notes: **Data Source:** Matching Engine */ public void orderListPlaceOpocoExampleAsync() { OrderListPlaceOpocoRequest orderListPlaceOpocoRequest = new OrderListPlaceOpocoRequest(); orderListPlaceOpocoRequest.symbol("BNBUSDT"); orderListPlaceOpocoRequest.workingType(WorkingType.LIMIT); orderListPlaceOpocoRequest.workingSide(WorkingSide.BUY); - orderListPlaceOpocoRequest.workingPrice(1.0d); - orderListPlaceOpocoRequest.workingQuantity(1.0d); + orderListPlaceOpocoRequest.workingPrice(1d); + orderListPlaceOpocoRequest.workingQuantity(1d); orderListPlaceOpocoRequest.pendingSide(PendingSide.BUY); orderListPlaceOpocoRequest.pendingAboveType(PendingAboveType.STOP_LOSS_LIMIT); CompletableFuture future = @@ -59,17 +60,18 @@ public void orderListPlaceOpocoExampleAsync() { } /** - * WebSocket OPOCO + * OPOCO (TRADE) * - *

Place an [OPOCO](./faqs/opo.md). Weight: 1 Unfilled Order Count: 3 + *

Place an [OPOCO](/products/spot/faqs/opo). Weight(IP): 1 Unfilled Order Count: 3 Security + * Type: TRADE Notes: **Data Source:** Matching Engine */ public void orderListPlaceOpocoExampleSync() { OrderListPlaceOpocoRequest orderListPlaceOpocoRequest = new OrderListPlaceOpocoRequest(); orderListPlaceOpocoRequest.symbol("BNBUSDT"); orderListPlaceOpocoRequest.workingType(WorkingType.LIMIT); orderListPlaceOpocoRequest.workingSide(WorkingSide.BUY); - orderListPlaceOpocoRequest.workingPrice(1.0d); - orderListPlaceOpocoRequest.workingQuantity(1.0d); + orderListPlaceOpocoRequest.workingPrice(1d); + orderListPlaceOpocoRequest.workingQuantity(1d); orderListPlaceOpocoRequest.pendingSide(PendingSide.BUY); orderListPlaceOpocoRequest.pendingAboveType(PendingAboveType.STOP_LOSS_LIMIT); CompletableFuture future = diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtoExample.java index d7669ebfc..8b943e6bf 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtoExample.java @@ -33,7 +33,7 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Place new Order list - OTO + * Place new Order list - OTO (TRADE) * *

Places an OTO. * An OTO (One-Triggers-the-Other) is an order list comprised of 2 orders. * * The first order is called the **working order** and must be `LIMIT` or @@ -47,18 +47,29 @@ public SpotWebSocketApi getApi() { * `FILLED` but the pending order will still appear as `PENDING_NEW`. You * need to query the status of the pending order again to see its updated status. * OTOs add **2 * orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` - * filter. Weight: 1 Unfilled Order Count: 2 + * filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** + * Matching Engine **Mandatory parameters based on `pendingType` or + * `workingType`** Depending on the `pendingType` or + * `workingType`, some optional parameters will become mandatory. |Type |Additional + * mandatory parameters|Additional information| |---- |---- |------ |`workingType` + * = `LIMIT` |`workingTimeInForce` | |`pendingType` = + * `LIMIT` |`pendingPrice`, `pendingTimeInForce` | + * |`pendingType` = `STOP_LOSS` or `TAKE_PROFIT` + * |`pendingStopPrice` and/or `pendingTrailingDelta`| + * |`pendingType` =`STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT`|`pendingPrice`, `pendingStopPrice` and/or + * `pendingTrailingDelta`, `pendingTimeInForce`| */ public void orderListPlaceOtoExampleAsync() { OrderListPlaceOtoRequest orderListPlaceOtoRequest = new OrderListPlaceOtoRequest(); orderListPlaceOtoRequest.symbol("BNBUSDT"); orderListPlaceOtoRequest.workingType(WorkingType.LIMIT); orderListPlaceOtoRequest.workingSide(WorkingSide.BUY); - orderListPlaceOtoRequest.workingPrice(1.0d); - orderListPlaceOtoRequest.workingQuantity(1.0d); + orderListPlaceOtoRequest.workingPrice(1d); + orderListPlaceOtoRequest.workingQuantity(1d); orderListPlaceOtoRequest.pendingType(PendingType.LIMIT); orderListPlaceOtoRequest.pendingSide(PendingSide.BUY); - orderListPlaceOtoRequest.pendingQuantity(1.0d); + orderListPlaceOtoRequest.pendingQuantity(1d); CompletableFuture future = getApi().orderListPlaceOto(orderListPlaceOtoRequest); future.handle( @@ -72,7 +83,7 @@ public void orderListPlaceOtoExampleAsync() { } /** - * WebSocket Place new Order list - OTO + * Place new Order list - OTO (TRADE) * *

Places an OTO. * An OTO (One-Triggers-the-Other) is an order list comprised of 2 orders. * * The first order is called the **working order** and must be `LIMIT` or @@ -86,18 +97,29 @@ public void orderListPlaceOtoExampleAsync() { * `FILLED` but the pending order will still appear as `PENDING_NEW`. You * need to query the status of the pending order again to see its updated status. * OTOs add **2 * orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` - * filter. Weight: 1 Unfilled Order Count: 2 + * filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** + * Matching Engine **Mandatory parameters based on `pendingType` or + * `workingType`** Depending on the `pendingType` or + * `workingType`, some optional parameters will become mandatory. |Type |Additional + * mandatory parameters|Additional information| |---- |---- |------ |`workingType` + * = `LIMIT` |`workingTimeInForce` | |`pendingType` = + * `LIMIT` |`pendingPrice`, `pendingTimeInForce` | + * |`pendingType` = `STOP_LOSS` or `TAKE_PROFIT` + * |`pendingStopPrice` and/or `pendingTrailingDelta`| + * |`pendingType` =`STOP_LOSS_LIMIT` or + * `TAKE_PROFIT_LIMIT`|`pendingPrice`, `pendingStopPrice` and/or + * `pendingTrailingDelta`, `pendingTimeInForce`| */ public void orderListPlaceOtoExampleSync() { OrderListPlaceOtoRequest orderListPlaceOtoRequest = new OrderListPlaceOtoRequest(); orderListPlaceOtoRequest.symbol("BNBUSDT"); orderListPlaceOtoRequest.workingType(WorkingType.LIMIT); orderListPlaceOtoRequest.workingSide(WorkingSide.BUY); - orderListPlaceOtoRequest.workingPrice(1.0d); - orderListPlaceOtoRequest.workingQuantity(1.0d); + orderListPlaceOtoRequest.workingPrice(1d); + orderListPlaceOtoRequest.workingQuantity(1d); orderListPlaceOtoRequest.pendingType(PendingType.LIMIT); orderListPlaceOtoRequest.pendingSide(PendingSide.BUY); - orderListPlaceOtoRequest.pendingQuantity(1.0d); + orderListPlaceOtoRequest.pendingQuantity(1d); CompletableFuture future = getApi().orderListPlaceOto(orderListPlaceOtoRequest); OrderListPlaceOtoResponse response = future.join(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtocoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtocoExample.java index 912537dee..8a3b096e0 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtocoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtocoExample.java @@ -33,28 +33,46 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Place new Order list - OTOCO + * Place new Order list - OTOCO (TRADE) * *

Place an OTOCO. * An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised * of 3 orders. * The first order is called the **working order** and must be `LIMIT` * or `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The - * behavior of the working order is the same as the [OTO](#place-new-order-list---oto-trade). * - * OTOCO has 2 pending orders (pending above and pending below), forming an OCO pair. The - * pending orders are only placed on the order book when the working order gets **fully - * filled**. * The rules of the pending above and pending below follow the same rules as the - * [Order list OCO](#new-order-list---oco-trade). * OTOCOs add **3 orders** to the - * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight: 1 - * Unfilled Order Count: 3 + * behavior of the working order is the same as the [OTO](#order-list-place-oto). * OTOCO has 2 + * pending orders (pending above and pending below), forming an OCO pair. The pending orders are + * only placed on the order book when the working order gets **fully filled**. * The rules of + * the pending above and pending below follow the same rules as the [Order list + * OCO](#order-list-place-oco). * OTOCOs add **3 orders** to the + * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight(IP): + * 1 Unfilled Order Count: 3 Security Type: TRADE Notes: **Data Source:** Matching Engine + * **Mandatory parameters based on `pendingAboveType`, `pendingBelowType` or + * `workingType`** Depending on the + * `pendingAboveType`/`pendingBelowType` or `workingType`, some + * optional parameters will become mandatory. |Type |Additional mandatory parameters|Additional + * information| |---- |---- |------ |`workingType` = `LIMIT` + * |`workingTimeInForce` | |`pendingAboveType`= `LIMIT_MAKER` + * |`pendingAbovePrice` | |`pendingAboveType` = + * `STOP_LOSS/TAKE_PROFIT` |`pendingAboveStopPrice` and/or + * `pendingAboveTrailingDelta`| + * |`pendingAboveType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT`|`pendingAbovePrice`, + * `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`, + * `pendingAboveTimeInForce`| |`pendingBelowType`= + * `LIMIT_MAKER` |`pendingBelowPrice` | `pendingBelowType= + * STOP_LOSS/TAKE_PROFIT` |`pendingBelowStopPrice` and/or + * `pendingBelowTrailingDelta`| + * |`pendingBelowType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT`|`pendingBelowPrice`, + * `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`, + * `pendingBelowTimeInForce`| */ public void orderListPlaceOtocoExampleAsync() { OrderListPlaceOtocoRequest orderListPlaceOtocoRequest = new OrderListPlaceOtocoRequest(); orderListPlaceOtocoRequest.symbol("BNBUSDT"); orderListPlaceOtocoRequest.workingType(WorkingType.LIMIT); orderListPlaceOtocoRequest.workingSide(WorkingSide.BUY); - orderListPlaceOtocoRequest.workingPrice(1.0d); - orderListPlaceOtocoRequest.workingQuantity(1.0d); + orderListPlaceOtocoRequest.workingPrice(1d); + orderListPlaceOtocoRequest.workingQuantity(1d); orderListPlaceOtocoRequest.pendingSide(PendingSide.BUY); - orderListPlaceOtocoRequest.pendingQuantity(1.0d); + orderListPlaceOtocoRequest.pendingQuantity(1d); orderListPlaceOtocoRequest.pendingAboveType(PendingAboveType.STOP_LOSS_LIMIT); CompletableFuture future = getApi().orderListPlaceOtoco(orderListPlaceOtocoRequest); @@ -69,28 +87,46 @@ public void orderListPlaceOtocoExampleAsync() { } /** - * WebSocket Place new Order list - OTOCO + * Place new Order list - OTOCO (TRADE) * *

Place an OTOCO. * An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised * of 3 orders. * The first order is called the **working order** and must be `LIMIT` * or `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The - * behavior of the working order is the same as the [OTO](#place-new-order-list---oto-trade). * - * OTOCO has 2 pending orders (pending above and pending below), forming an OCO pair. The - * pending orders are only placed on the order book when the working order gets **fully - * filled**. * The rules of the pending above and pending below follow the same rules as the - * [Order list OCO](#new-order-list---oco-trade). * OTOCOs add **3 orders** to the - * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight: 1 - * Unfilled Order Count: 3 + * behavior of the working order is the same as the [OTO](#order-list-place-oto). * OTOCO has 2 + * pending orders (pending above and pending below), forming an OCO pair. The pending orders are + * only placed on the order book when the working order gets **fully filled**. * The rules of + * the pending above and pending below follow the same rules as the [Order list + * OCO](#order-list-place-oco). * OTOCOs add **3 orders** to the + * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight(IP): + * 1 Unfilled Order Count: 3 Security Type: TRADE Notes: **Data Source:** Matching Engine + * **Mandatory parameters based on `pendingAboveType`, `pendingBelowType` or + * `workingType`** Depending on the + * `pendingAboveType`/`pendingBelowType` or `workingType`, some + * optional parameters will become mandatory. |Type |Additional mandatory parameters|Additional + * information| |---- |---- |------ |`workingType` = `LIMIT` + * |`workingTimeInForce` | |`pendingAboveType`= `LIMIT_MAKER` + * |`pendingAbovePrice` | |`pendingAboveType` = + * `STOP_LOSS/TAKE_PROFIT` |`pendingAboveStopPrice` and/or + * `pendingAboveTrailingDelta`| + * |`pendingAboveType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT`|`pendingAbovePrice`, + * `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`, + * `pendingAboveTimeInForce`| |`pendingBelowType`= + * `LIMIT_MAKER` |`pendingBelowPrice` | `pendingBelowType= + * STOP_LOSS/TAKE_PROFIT` |`pendingBelowStopPrice` and/or + * `pendingBelowTrailingDelta`| + * |`pendingBelowType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT`|`pendingBelowPrice`, + * `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`, + * `pendingBelowTimeInForce`| */ public void orderListPlaceOtocoExampleSync() { OrderListPlaceOtocoRequest orderListPlaceOtocoRequest = new OrderListPlaceOtocoRequest(); orderListPlaceOtocoRequest.symbol("BNBUSDT"); orderListPlaceOtocoRequest.workingType(WorkingType.LIMIT); orderListPlaceOtocoRequest.workingSide(WorkingSide.BUY); - orderListPlaceOtocoRequest.workingPrice(1.0d); - orderListPlaceOtocoRequest.workingQuantity(1.0d); + orderListPlaceOtocoRequest.workingPrice(1d); + orderListPlaceOtocoRequest.workingQuantity(1d); orderListPlaceOtocoRequest.pendingSide(PendingSide.BUY); - orderListPlaceOtocoRequest.pendingQuantity(1.0d); + orderListPlaceOtocoRequest.pendingQuantity(1d); orderListPlaceOtocoRequest.pendingAboveType(PendingAboveType.STOP_LOSS_LIMIT); CompletableFuture future = getApi().orderListPlaceOtoco(orderListPlaceOtocoRequest); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderPlaceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderPlaceExample.java index ced450ffd..2855b6a27 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderPlaceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderPlaceExample.java @@ -31,10 +31,115 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Place new order + * Place new order (TRADE) * *

Send in a new order. This adds 1 order to the `EXCHANGE_MAX_ORDERS` filter and - * the `MAX_NUM_ORDERS` filter. Weight: 1 + * the `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 1 Security Type: + * TRADE Notes: **Data Source:** Matching Engine <a + * id=\"order-type\">Certain parameters (*)</a> become mandatory based + * on the order `type`: <table> <thead> <tr> <th>Order + * <code>type</code></th> <th>Mandatory parameters</th> + * </tr> </thead> <tbody> <tr> + * <td><code>LIMIT</code></td> <td> <ul> + * <li><code>timeInForce</code></li> + * <li><code>price</code></li> + * <li><code>quantity</code></li> </ul> </td> </tr> + * <tr> <td><code>LIMIT_MAKER</code></td> <td> <ul> + * <li><code>price</code></li> + * <li><code>quantity</code></li> </ul> </td> </tr> + * <tr> <td><code>MARKET</code></td> <td> <ul> + * <li><code>quantity</code> or + * <code>quoteOrderQty</code></li> </ul> </td> </tr> + * <tr> <td><code>STOP_LOSS</code></td> <td> <ul> + * <li><code>quantity</code></li> + * <li><code>stopPrice</code> or + * <code>trailingDelta</code></li> </ul> </td> </tr> + * <tr> <td><code>STOP_LOSS_LIMIT</code></td> <td> + * <ul> <li><code>timeInForce</code></li> + * <li><code>price</code></li> + * <li><code>quantity</code></li> + * <li><code>stopPrice</code> or + * <code>trailingDelta</code></li> </ul> </td> </tr> + * <tr> <td><code>TAKE_PROFIT</code></td> <td> <ul> + * <li><code>quantity</code></li> + * <li><code>stopPrice</code> or + * <code>trailingDelta</code></li> </ul> </td> </tr> + * <tr> <td><code>TAKE_PROFIT_LIMIT</code></td> <td> + * <ul> <li><code>timeInForce</code></li> + * <li><code>price</code></li> + * <li><code>quantity</code></li> + * <li><code>stopPrice</code> or + * <code>trailingDelta</code></li> </ul> </td> </tr> + * </tbody> </table> Supported order types: <table> <thead> <tr> + * <th>Order <code>type</code></th> <th>Description</th> + * </tr> </thead> <tbody> <tr> + * <td><code>LIMIT</code></td> <td> <p> Buy or sell + * <code>quantity</code> at the specified <code>price</code> or better. + * </p> </td> </tr> <tr> + * <td><code>LIMIT_MAKER</code></td> <td> <p> + * <code>LIMIT</code> order that will be rejected if it immediately matches and + * trades as a taker. </p> <p> This order type is also known as a POST-ONLY order. + * </p> </td> </tr> <tr> + * <td><code>MARKET</code></td> <td> <p> Buy or sell at the + * best available market price. </p> <ul> <li> <p> + * <code>MARKET</code> order with <code>quantity</code> parameter + * specifies the amount of the <em>base asset</em> you want to buy or sell. Actually + * executed quantity of the quote asset will be determined by available market liquidity. + * </p> <p> E.g., a MARKET BUY order on BTCUSDT for + * <code>\"quantity\": \"0.1000\"</code> specifies that you want + * to buy 0.1 BTC at the best available price. If there is not enough BTC at the best price, + * keep buying at the next best price, until either your order is filled, or you run out of + * USDT, or market runs out of BTC. </p> </li> <li> <p> + * <code>MARKET</code> order with <code>quoteOrderQty</code> parameter + * specifies the amount of the <em>quote asset</em> you want to spend (when buying) + * or receive (when selling). Actually executed quantity of the base asset will be determined by + * available market liquidity. </p> <p> E.g., a MARKET BUY on BTCUSDT for + * <code>\"quoteOrderQty\": \"100.00\"</code> specifies that you + * want to buy as much BTC as you can for 100 USDT at the best available price. Similarly, a + * SELL order will sell as much available BTC as needed for you to receive 100 USDT (before + * commission). </p> </li> </ul> </td> </tr> <tr> + * <td><code>STOP_LOSS</code></td> <td> <p> Execute a + * <code>MARKET</code> order for given <code>quantity</code> when + * specified conditions are met. </p> <p> I.e., when + * <code>stopPrice</code> is reached, or when <code>trailingDelta</code> + * is activated. </p> </td> </tr> <tr> + * <td><code>STOP_LOSS_LIMIT</code></td> <td> <p> Place a + * <code>LIMIT</code> order with given parameters when specified conditions are met. + * </p> </td> </tr> <tr> + * <td><code>TAKE_PROFIT</code></td> <td> <p> Like + * <code>STOP_LOSS</code> but activates when market price moves in the favorable + * direction. </p> </td> </tr> <tr> + * <td><code>TAKE_PROFIT_LIMIT</code></td> <td> <p> Like + * <code>STOP_LOSS_LIMIT</code> but activates when market price moves in the + * favorable direction. </p> </td> </tr> </tbody> </table> <a + * id=\"pegged-orders-info\"></a> Notes on using parameters for Pegged + * Orders: * These parameters are allowed for `LIMIT`, `LIMIT_MAKER`, + * `STOP_LOSS_LIMIT`, `TAKE_PROFIT_LIMIT` orders. * If + * `pegPriceType` is specified, `price` becomes optional. Otherwise, it is + * still mandatory. * `pegPriceType=PRIMARY_PEG` means the primary peg, that is + * the best price on the same side of the order book as your order. * + * `pegPriceType=MARKET_PEG` means the market peg, that is the best price on the + * opposite side of the order book from your order. * Use `pegOffsetType` and + * `pegOffsetValue` to request a price level other than the best one. These parameters + * must be specified together. <a id=\"timeInForce\"></a> Available + * `timeInForce` options, setting how long the order should be active before + * expiration: TIF | Description ----- | -------------- `GTC` | **Good 'til + * Canceled** – the order will remain on the book until you cancel it, or the order is + * completely filled. `IOC` | **Immediate or Cancel** – the order will be filled for + * as much as possible, the unfilled quantity immediately expires. `FOK` | **Fill or + * Kill** – the order will expire unless it cannot be immediately filled for the entire + * quantity. Notes: * `newClientOrderId` specifies `clientOrderId` value for + * the order. A new order with the same `clientOrderId` is accepted only when the + * previous one is filled or expired. * Any `LIMIT` or `LIMIT_MAKER` order + * can be made into an iceberg order by specifying the `icebergQty`. An order with an + * `icebergQty` must have `timeInForce` set to `GTC`. * Trigger + * order price rules for `STOP_LOSS`/`TAKE_PROFIT` orders: * + * `stopPrice` must be above market price: `STOP_LOSS BUY`, + * `TAKE_PROFIT SELL` * `stopPrice` must be below market price: + * `STOP_LOSS SELL`, `TAKE_PROFIT BUY` * `MARKET` orders using + * `quoteOrderQty` follow [`LOT_SIZE`](/products/spot/filters#lot_size) + * filter rules. The order will execute a quantity that has notional value as close as possible + * to requested `quoteOrderQty`. */ public void orderPlaceExampleAsync() { OrderPlaceRequest orderPlaceRequest = new OrderPlaceRequest(); @@ -53,10 +158,115 @@ public void orderPlaceExampleAsync() { } /** - * WebSocket Place new order + * Place new order (TRADE) * *

Send in a new order. This adds 1 order to the `EXCHANGE_MAX_ORDERS` filter and - * the `MAX_NUM_ORDERS` filter. Weight: 1 + * the `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 1 Security Type: + * TRADE Notes: **Data Source:** Matching Engine <a + * id=\"order-type\">Certain parameters (*)</a> become mandatory based + * on the order `type`: <table> <thead> <tr> <th>Order + * <code>type</code></th> <th>Mandatory parameters</th> + * </tr> </thead> <tbody> <tr> + * <td><code>LIMIT</code></td> <td> <ul> + * <li><code>timeInForce</code></li> + * <li><code>price</code></li> + * <li><code>quantity</code></li> </ul> </td> </tr> + * <tr> <td><code>LIMIT_MAKER</code></td> <td> <ul> + * <li><code>price</code></li> + * <li><code>quantity</code></li> </ul> </td> </tr> + * <tr> <td><code>MARKET</code></td> <td> <ul> + * <li><code>quantity</code> or + * <code>quoteOrderQty</code></li> </ul> </td> </tr> + * <tr> <td><code>STOP_LOSS</code></td> <td> <ul> + * <li><code>quantity</code></li> + * <li><code>stopPrice</code> or + * <code>trailingDelta</code></li> </ul> </td> </tr> + * <tr> <td><code>STOP_LOSS_LIMIT</code></td> <td> + * <ul> <li><code>timeInForce</code></li> + * <li><code>price</code></li> + * <li><code>quantity</code></li> + * <li><code>stopPrice</code> or + * <code>trailingDelta</code></li> </ul> </td> </tr> + * <tr> <td><code>TAKE_PROFIT</code></td> <td> <ul> + * <li><code>quantity</code></li> + * <li><code>stopPrice</code> or + * <code>trailingDelta</code></li> </ul> </td> </tr> + * <tr> <td><code>TAKE_PROFIT_LIMIT</code></td> <td> + * <ul> <li><code>timeInForce</code></li> + * <li><code>price</code></li> + * <li><code>quantity</code></li> + * <li><code>stopPrice</code> or + * <code>trailingDelta</code></li> </ul> </td> </tr> + * </tbody> </table> Supported order types: <table> <thead> <tr> + * <th>Order <code>type</code></th> <th>Description</th> + * </tr> </thead> <tbody> <tr> + * <td><code>LIMIT</code></td> <td> <p> Buy or sell + * <code>quantity</code> at the specified <code>price</code> or better. + * </p> </td> </tr> <tr> + * <td><code>LIMIT_MAKER</code></td> <td> <p> + * <code>LIMIT</code> order that will be rejected if it immediately matches and + * trades as a taker. </p> <p> This order type is also known as a POST-ONLY order. + * </p> </td> </tr> <tr> + * <td><code>MARKET</code></td> <td> <p> Buy or sell at the + * best available market price. </p> <ul> <li> <p> + * <code>MARKET</code> order with <code>quantity</code> parameter + * specifies the amount of the <em>base asset</em> you want to buy or sell. Actually + * executed quantity of the quote asset will be determined by available market liquidity. + * </p> <p> E.g., a MARKET BUY order on BTCUSDT for + * <code>\"quantity\": \"0.1000\"</code> specifies that you want + * to buy 0.1 BTC at the best available price. If there is not enough BTC at the best price, + * keep buying at the next best price, until either your order is filled, or you run out of + * USDT, or market runs out of BTC. </p> </li> <li> <p> + * <code>MARKET</code> order with <code>quoteOrderQty</code> parameter + * specifies the amount of the <em>quote asset</em> you want to spend (when buying) + * or receive (when selling). Actually executed quantity of the base asset will be determined by + * available market liquidity. </p> <p> E.g., a MARKET BUY on BTCUSDT for + * <code>\"quoteOrderQty\": \"100.00\"</code> specifies that you + * want to buy as much BTC as you can for 100 USDT at the best available price. Similarly, a + * SELL order will sell as much available BTC as needed for you to receive 100 USDT (before + * commission). </p> </li> </ul> </td> </tr> <tr> + * <td><code>STOP_LOSS</code></td> <td> <p> Execute a + * <code>MARKET</code> order for given <code>quantity</code> when + * specified conditions are met. </p> <p> I.e., when + * <code>stopPrice</code> is reached, or when <code>trailingDelta</code> + * is activated. </p> </td> </tr> <tr> + * <td><code>STOP_LOSS_LIMIT</code></td> <td> <p> Place a + * <code>LIMIT</code> order with given parameters when specified conditions are met. + * </p> </td> </tr> <tr> + * <td><code>TAKE_PROFIT</code></td> <td> <p> Like + * <code>STOP_LOSS</code> but activates when market price moves in the favorable + * direction. </p> </td> </tr> <tr> + * <td><code>TAKE_PROFIT_LIMIT</code></td> <td> <p> Like + * <code>STOP_LOSS_LIMIT</code> but activates when market price moves in the + * favorable direction. </p> </td> </tr> </tbody> </table> <a + * id=\"pegged-orders-info\"></a> Notes on using parameters for Pegged + * Orders: * These parameters are allowed for `LIMIT`, `LIMIT_MAKER`, + * `STOP_LOSS_LIMIT`, `TAKE_PROFIT_LIMIT` orders. * If + * `pegPriceType` is specified, `price` becomes optional. Otherwise, it is + * still mandatory. * `pegPriceType=PRIMARY_PEG` means the primary peg, that is + * the best price on the same side of the order book as your order. * + * `pegPriceType=MARKET_PEG` means the market peg, that is the best price on the + * opposite side of the order book from your order. * Use `pegOffsetType` and + * `pegOffsetValue` to request a price level other than the best one. These parameters + * must be specified together. <a id=\"timeInForce\"></a> Available + * `timeInForce` options, setting how long the order should be active before + * expiration: TIF | Description ----- | -------------- `GTC` | **Good 'til + * Canceled** – the order will remain on the book until you cancel it, or the order is + * completely filled. `IOC` | **Immediate or Cancel** – the order will be filled for + * as much as possible, the unfilled quantity immediately expires. `FOK` | **Fill or + * Kill** – the order will expire unless it cannot be immediately filled for the entire + * quantity. Notes: * `newClientOrderId` specifies `clientOrderId` value for + * the order. A new order with the same `clientOrderId` is accepted only when the + * previous one is filled or expired. * Any `LIMIT` or `LIMIT_MAKER` order + * can be made into an iceberg order by specifying the `icebergQty`. An order with an + * `icebergQty` must have `timeInForce` set to `GTC`. * Trigger + * order price rules for `STOP_LOSS`/`TAKE_PROFIT` orders: * + * `stopPrice` must be above market price: `STOP_LOSS BUY`, + * `TAKE_PROFIT SELL` * `stopPrice` must be below market price: + * `STOP_LOSS SELL`, `TAKE_PROFIT BUY` * `MARKET` orders using + * `quoteOrderQty` follow [`LOT_SIZE`](/products/spot/filters#lot_size) + * filter rules. The order will execute a quantity that has notional value as close as possible + * to requested `quoteOrderQty`. */ public void orderPlaceExampleSync() { OrderPlaceRequest orderPlaceRequest = new OrderPlaceRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderTestExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderTestExample.java index 6bb26ad95..4e9bb6323 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderTestExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderTestExample.java @@ -31,12 +31,12 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Test new order + * Test new order (TRADE) * *

Test order placement. Validates new order parameters and verifies your signature but does - * not send the order into the matching engine. Weight: |Condition| Request Weight| - * |------------ | ------------ | |Without `computeCommissionRates`| 1| |With - * `computeCommissionRates`|20| + * not send the order into the matching engine. Weight: | Condition | Request Weight | | --- | + * --- | | Without `computeCommissionRates` | 1 | | With + * `computeCommissionRates` | 20 | Security Type: TRADE Notes: **Data Source:** Memory */ public void orderTestExampleAsync() { OrderTestRequest orderTestRequest = new OrderTestRequest(); @@ -55,12 +55,12 @@ public void orderTestExampleAsync() { } /** - * WebSocket Test new order + * Test new order (TRADE) * *

Test order placement. Validates new order parameters and verifies your signature but does - * not send the order into the matching engine. Weight: |Condition| Request Weight| - * |------------ | ------------ | |Without `computeCommissionRates`| 1| |With - * `computeCommissionRates`|20| + * not send the order into the matching engine. Weight: | Condition | Request Weight | | --- | + * --- | | Without `computeCommissionRates` | 1 | | With + * `computeCommissionRates` | 20 | Security Type: TRADE Notes: **Data Source:** Memory */ public void orderTestExampleSync() { OrderTestRequest orderTestRequest = new OrderTestRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderPlaceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderPlaceExample.java index 32d938832..c332410a3 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderPlaceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderPlaceExample.java @@ -31,18 +31,21 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Place new order using SOR + * Place new order using SOR (TRADE) * *

Places an order using smart order routing (SOR). This adds 1 order to the * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [SOR - * FAQ](../faqs/sor_faq.md) to learn more. Weight: 1 Unfilled Order Count: 1 + * FAQ](/products/spot/faqs/sor_faq) to learn more. Weight(IP): 1 Unfilled Order Count: 1 + * Security Type: TRADE Notes: **Data Source:** Matching Engine **Note:** + * `sor.order.place` only supports `LIMIT` and `MARKET` orders. + * `quoteOrderQty` is not supported. */ public void sorOrderPlaceExampleAsync() { SorOrderPlaceRequest sorOrderPlaceRequest = new SorOrderPlaceRequest(); sorOrderPlaceRequest.symbol("BNBUSDT"); sorOrderPlaceRequest.side(Side.BUY); sorOrderPlaceRequest.type(OrderType.MARKET); - sorOrderPlaceRequest.quantity(1.0d); + sorOrderPlaceRequest.quantity(1d); CompletableFuture future = getApi().sorOrderPlace(sorOrderPlaceRequest); future.handle( @@ -56,18 +59,21 @@ public void sorOrderPlaceExampleAsync() { } /** - * WebSocket Place new order using SOR + * Place new order using SOR (TRADE) * *

Places an order using smart order routing (SOR). This adds 1 order to the * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [SOR - * FAQ](../faqs/sor_faq.md) to learn more. Weight: 1 Unfilled Order Count: 1 + * FAQ](/products/spot/faqs/sor_faq) to learn more. Weight(IP): 1 Unfilled Order Count: 1 + * Security Type: TRADE Notes: **Data Source:** Matching Engine **Note:** + * `sor.order.place` only supports `LIMIT` and `MARKET` orders. + * `quoteOrderQty` is not supported. */ public void sorOrderPlaceExampleSync() { SorOrderPlaceRequest sorOrderPlaceRequest = new SorOrderPlaceRequest(); sorOrderPlaceRequest.symbol("BNBUSDT"); sorOrderPlaceRequest.side(Side.BUY); sorOrderPlaceRequest.type(OrderType.MARKET); - sorOrderPlaceRequest.quantity(1.0d); + sorOrderPlaceRequest.quantity(1d); CompletableFuture future = getApi().sorOrderPlace(sorOrderPlaceRequest); SorOrderPlaceResponse response = future.join(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderTestExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderTestExample.java index 9ae4a5ab4..c3796143b 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderTestExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderTestExample.java @@ -31,19 +31,19 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Test new order using SOR + * Test new order using SOR (TRADE) * *

Test new order creation and signature/recvWindow using smart order routing (SOR). Creates - * and validates a new order but does not send it into the matching engine. Weight: |Condition | - * Request Weight| |------------ | ------------ | |Without `computeCommissionRates`| 1 - * | |With `computeCommissionRates` |20 | + * and validates a new order but does not send it into the matching engine. Weight: | Condition + * | Request Weight | | --- | --- | | Without `computeCommissionRates` | 1 | | With + * `computeCommissionRates` | 20 | Security Type: TRADE Notes: **Data Source:** Memory */ public void sorOrderTestExampleAsync() { SorOrderTestRequest sorOrderTestRequest = new SorOrderTestRequest(); sorOrderTestRequest.symbol("BNBUSDT"); sorOrderTestRequest.side(Side.BUY); sorOrderTestRequest.type(OrderType.MARKET); - sorOrderTestRequest.quantity(1.0d); + sorOrderTestRequest.quantity(1d); CompletableFuture future = getApi().sorOrderTest(sorOrderTestRequest); future.handle( (response, error) -> { @@ -56,19 +56,19 @@ public void sorOrderTestExampleAsync() { } /** - * WebSocket Test new order using SOR + * Test new order using SOR (TRADE) * *

Test new order creation and signature/recvWindow using smart order routing (SOR). Creates - * and validates a new order but does not send it into the matching engine. Weight: |Condition | - * Request Weight| |------------ | ------------ | |Without `computeCommissionRates`| 1 - * | |With `computeCommissionRates` |20 | + * and validates a new order but does not send it into the matching engine. Weight: | Condition + * | Request Weight | | --- | --- | | Without `computeCommissionRates` | 1 | | With + * `computeCommissionRates` | 20 | Security Type: TRADE Notes: **Data Source:** Memory */ public void sorOrderTestExampleSync() { SorOrderTestRequest sorOrderTestRequest = new SorOrderTestRequest(); sorOrderTestRequest.symbol("BNBUSDT"); sorOrderTestRequest.side(Side.BUY); sorOrderTestRequest.type(OrderType.MARKET); - sorOrderTestRequest.quantity(1.0d); + sorOrderTestRequest.quantity(1d); CompletableFuture future = getApi().sorOrderTest(sorOrderTestRequest); SorOrderTestResponse response = future.join(); System.out.println(response); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/SessionSubscriptionsExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/SessionSubscriptionsExample.java index b970f04e9..0cfd984ec 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/SessionSubscriptionsExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/SessionSubscriptionsExample.java @@ -28,9 +28,10 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Listing all subscriptions + * Listing all subscriptions * - *

Weight: 2 **Data Source**: Memory + *

**Note:** * Users should track the corresponding subscription status of related accounts + * as needed. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory */ public void sessionSubscriptionsExampleAsync() { CompletableFuture future = getApi().sessionSubscriptions(); @@ -45,9 +46,10 @@ public void sessionSubscriptionsExampleAsync() { } /** - * WebSocket Listing all subscriptions + * Listing all subscriptions * - *

Weight: 2 **Data Source**: Memory + *

**Note:** * Users should track the corresponding subscription status of related accounts + * as needed. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory */ public void sessionSubscriptionsExampleSync() { CompletableFuture future = getApi().sessionSubscriptions(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeExample.java index 89a835c1d..50f9557d5 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeExample.java @@ -30,9 +30,18 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Subscribe to User Data Stream + * Subscribe to User Data Stream * - *

Subscribe to the User Data Stream in the current WebSocket connection. Weight: 2 + *

Subscribe to the User Data Stream in the current WebSocket connection. **Notes:** - This + * method requires an authenticated WebSocket connection using Ed25519 keys. Please refer to + * [`session.logon`](/catalog/core-trading-spot-trading/api/ws-api/auth#session-logon). + * - To check the subscription status, use + * [`session.status`](/catalog/core-trading-spot-trading/api/ws-api/auth#session-status), + * see the `userDataStream` flag indicating you have have an active subscription. - + * User Data Stream events are available in both JSON and [SBE](/products/spot/faqs/sbe_faq) + * sessions. - Please refer to [User Data Streams](/products/spot/user-data-stream) for the + * event format details. - For SBE, only SBE schema 2:1 or later is supported. Weight(IP): 2 + * Security Type: NONE */ public void userDataStreamSubscribeExampleStream() throws InterruptedException { StreamResponse resp = diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeSignatureExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeSignatureExample.java index 54f468e73..60859fe91 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeSignatureExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeSignatureExample.java @@ -7,7 +7,6 @@ import com.binance.connector.client.spot.websocket.api.SpotWebSocketApiUtil; import com.binance.connector.client.spot.websocket.api.api.SpotWebSocketApi; import com.binance.connector.client.spot.websocket.api.model.UserDataStreamEventsResponse; -import com.binance.connector.client.spot.websocket.api.model.UserDataStreamSubscribeSignatureRequest; import com.binance.connector.client.spot.websocket.api.model.UserDataStreamSubscribeSignatureResponse; /** API examples for UserDataStreamApi */ @@ -31,14 +30,13 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Subscribe to User Data Stream through signature subscription + * Subscribe to User Data Stream through signature subscription (USER_STREAM) * - *

Weight: 2 + *

Weight(IP): 2 Security Type: USER_STREAM Notes: **Data Source:** Memory */ public void userDataStreamSubscribeSignatureExampleStream() throws InterruptedException { - StreamResponse - resp = getApi().userDataStreamSubscribeSignature(new UserDataStreamSubscribeSignatureRequest()); + resp = getApi().userDataStreamSubscribeSignature(); resp.getResponse() .thenAccept( responseResult -> { diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamUnsubscribeExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamUnsubscribeExample.java index 10c52f24f..4c428026d 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamUnsubscribeExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamUnsubscribeExample.java @@ -34,7 +34,7 @@ public SpotWebSocketApi getApi() { *

Stop listening to the User Data Stream in the current WebSocket connection. Note that * `session.logout` will only close the subscription created with * `userDataStream.subscribe` but not subscriptions opened with - * `userDataStream.subscribe.signature`. Weight: 2 + * `userDataStream.subscribe.signature`. Weight(IP): 2 */ public void userDataStreamUnsubscribeExampleAsync() { UserDataStreamUnsubscribeRequest userDataStreamUnsubscribeRequest = @@ -57,7 +57,7 @@ public void userDataStreamUnsubscribeExampleAsync() { *

Stop listening to the User Data Stream in the current WebSocket connection. Note that * `session.logout` will only close the subscription created with * `userDataStream.subscribe` but not subscriptions opened with - * `userDataStream.subscribe.signature`. Weight: 2 + * `userDataStream.subscribe.signature`. Weight(IP): 2 */ public void userDataStreamUnsubscribeExampleSync() { UserDataStreamUnsubscribeRequest userDataStreamUnsubscribeRequest = diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/AggTradeExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/AggTradeExample.java similarity index 86% rename from examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/AggTradeExample.java rename to examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/AggTradeExample.java index 4c14bcd55..c314e7365 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/AggTradeExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/AggTradeExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.spot.websocket.stream.websocketstreams; +package com.binance.connector.client.spot.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.spot.websocket.stream.model.AggTradeRequest; import com.binance.connector.client.spot.websocket.stream.model.AggTradeResponse; -/** API examples for WebSocketStreamsApi */ +/** API examples for DefaultApi */ public class AggTradeExample { private SpotWebSocketStreams api; @@ -22,16 +22,15 @@ public SpotWebSocketStreams getApi() { } /** - * WebSocket Aggregate Trade Streams + * Aggregate Trade Streams * *

The Aggregate Trade Streams push trade information that is aggregated for a single taker - * order. + * order. Update Speed: Real-time * * @throws ApiException if the Api call fails */ public void aggTradeExample() throws ApiException, InterruptedException { AggTradeRequest aggTradeRequest = new AggTradeRequest(); - aggTradeRequest.symbol("bnbusdt"); StreamBlockingQueueWrapper response = getApi().aggTrade(aggTradeRequest); while (true) { System.out.println(response.take()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/AllMarketRollingWindowTickerExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/AllMarketRollingWindowTickerExample.java similarity index 83% rename from examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/AllMarketRollingWindowTickerExample.java rename to examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/AllMarketRollingWindowTickerExample.java index b31c569cc..2fe4e98ff 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/AllMarketRollingWindowTickerExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/AllMarketRollingWindowTickerExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.spot.websocket.stream.websocketstreams; +package com.binance.connector.client.spot.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -7,9 +7,8 @@ import com.binance.connector.client.spot.websocket.stream.api.SpotWebSocketStreams; import com.binance.connector.client.spot.websocket.stream.model.AllMarketRollingWindowTickerRequest; import com.binance.connector.client.spot.websocket.stream.model.AllMarketRollingWindowTickerResponse; -import com.binance.connector.client.spot.websocket.stream.model.WindowSize; -/** API examples for WebSocketStreamsApi */ +/** API examples for DefaultApi */ public class AllMarketRollingWindowTickerExample { private SpotWebSocketStreams api; @@ -23,17 +22,16 @@ public SpotWebSocketStreams getApi() { } /** - * WebSocket All Market Rolling Window Statistics Streams + * All Market Rolling Window Statistics Streams * *

Rolling window ticker statistics for all market symbols, computed over multiple windows. - * Note that only tickers that have changed will be present in the array. + * Note that only tickers that have changed will be present in the array. Update Speed: 1000ms * * @throws ApiException if the Api call fails */ public void allMarketRollingWindowTickerExample() throws ApiException, InterruptedException { AllMarketRollingWindowTickerRequest allMarketRollingWindowTickerRequest = new AllMarketRollingWindowTickerRequest(); - allMarketRollingWindowTickerRequest.windowSize(WindowSize.WINDOW_SIZE_1h); StreamBlockingQueueWrapper response = getApi().allMarketRollingWindowTicker(allMarketRollingWindowTickerRequest); while (true) { diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/AllMiniTickerExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/AllMiniTickerExample.java similarity index 78% rename from examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/AllMiniTickerExample.java rename to examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/AllMiniTickerExample.java index ac041ddcd..88472e068 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/AllMiniTickerExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/AllMiniTickerExample.java @@ -1,13 +1,14 @@ -package com.binance.connector.client.spot.websocket.stream.websocketstreams; +package com.binance.connector.client.spot.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; import com.binance.connector.client.spot.websocket.stream.SpotWebSocketStreamsUtil; import com.binance.connector.client.spot.websocket.stream.api.SpotWebSocketStreams; +import com.binance.connector.client.spot.websocket.stream.model.AllMiniTickerRequest; import com.binance.connector.client.spot.websocket.stream.model.AllMiniTickerResponse; -/** API examples for WebSocketStreamsApi */ +/** API examples for DefaultApi */ public class AllMiniTickerExample { private SpotWebSocketStreams api; @@ -21,16 +22,18 @@ public SpotWebSocketStreams getApi() { } /** - * WebSocket All Market Mini Tickers Stream + * All Market Mini Tickers Stream * *

24hr rolling window mini-ticker statistics for all symbols that changed in an array. These * are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs. Note - * that only tickers that have changed will be present in the array. + * that only tickers that have changed will be present in the array. Update Speed: 1000ms * * @throws ApiException if the Api call fails */ public void allMiniTickerExample() throws ApiException, InterruptedException { - StreamBlockingQueueWrapper response = getApi().allMiniTicker(); + AllMiniTickerRequest allMiniTickerRequest = new AllMiniTickerRequest(); + StreamBlockingQueueWrapper response = + getApi().allMiniTicker(allMiniTickerRequest); while (true) { System.out.println(response.take()); } diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/AvgPriceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/AvgPriceExample.java similarity index 86% rename from examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/AvgPriceExample.java rename to examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/AvgPriceExample.java index 227fcea15..44ee19c89 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/AvgPriceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/AvgPriceExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.spot.websocket.stream.websocketstreams; +package com.binance.connector.client.spot.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.spot.websocket.stream.model.AvgPriceRequest; import com.binance.connector.client.spot.websocket.stream.model.AvgPriceResponse; -/** API examples for WebSocketStreamsApi */ +/** API examples for DefaultApi */ public class AvgPriceExample { private SpotWebSocketStreams api; @@ -22,15 +22,15 @@ public SpotWebSocketStreams getApi() { } /** - * WebSocket Average Price + * Average Price * - *

Average price streams push changes in the average price over a fixed time interval. + *

Average price streams push changes in the average price over a fixed time interval. Update + * Speed: 1000ms * * @throws ApiException if the Api call fails */ public void avgPriceExample() throws ApiException, InterruptedException { AvgPriceRequest avgPriceRequest = new AvgPriceRequest(); - avgPriceRequest.symbol("bnbusdt"); StreamBlockingQueueWrapper response = getApi().avgPrice(avgPriceRequest); while (true) { System.out.println(response.take()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/BlockTradeExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/BlockTradeExample.java new file mode 100644 index 000000000..0c8198e74 --- /dev/null +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/BlockTradeExample.java @@ -0,0 +1,39 @@ +package com.binance.connector.client.spot.websocket.stream.defaultpkg; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; +import com.binance.connector.client.spot.websocket.stream.SpotWebSocketStreamsUtil; +import com.binance.connector.client.spot.websocket.stream.api.SpotWebSocketStreams; +import com.binance.connector.client.spot.websocket.stream.model.BlockTradeRequest; +import com.binance.connector.client.spot.websocket.stream.model.BlockTradeResponse; + +/** API examples for DefaultApi */ +public class BlockTradeExample { + private SpotWebSocketStreams api; + + public SpotWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + SpotWebSocketStreamsUtil.getClientConfiguration(); + api = new SpotWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * Block Trade Streams + * + *

Block Trade Streams push block trade information in real-time. Update Speed: Real-time + * + * @throws ApiException if the Api call fails + */ + public void blockTradeExample() throws ApiException, InterruptedException { + BlockTradeRequest blockTradeRequest = new BlockTradeRequest(); + StreamBlockingQueueWrapper response = + getApi().blockTrade(blockTradeRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/BookTickerExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/BookTickerExample.java similarity index 86% rename from examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/BookTickerExample.java rename to examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/BookTickerExample.java index 40856d6a7..a52d66a18 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/BookTickerExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/BookTickerExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.spot.websocket.stream.websocketstreams; +package com.binance.connector.client.spot.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.spot.websocket.stream.model.BookTickerRequest; import com.binance.connector.client.spot.websocket.stream.model.BookTickerResponse; -/** API examples for WebSocketStreamsApi */ +/** API examples for DefaultApi */ public class BookTickerExample { private SpotWebSocketStreams api; @@ -22,17 +22,16 @@ public SpotWebSocketStreams getApi() { } /** - * WebSocket Individual Symbol Book Ticker Streams + * Individual Symbol Book Ticker Streams * *

Pushes any update to the best bid or ask's price or quantity in real-time for a * specified symbol. Multiple `<symbol>@bookTicker` streams can be subscribed to - * over one connection. + * over one connection. Update Speed: Real-time * * @throws ApiException if the Api call fails */ public void bookTickerExample() throws ApiException, InterruptedException { BookTickerRequest bookTickerRequest = new BookTickerRequest(); - bookTickerRequest.symbol("bnbusdt"); StreamBlockingQueueWrapper response = getApi().bookTicker(bookTickerRequest); while (true) { diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/DiffBookDepthExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/DiffBookDepthExample.java similarity index 86% rename from examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/DiffBookDepthExample.java rename to examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/DiffBookDepthExample.java index 5ecfec680..b2dc114bb 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/DiffBookDepthExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/DiffBookDepthExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.spot.websocket.stream.websocketstreams; +package com.binance.connector.client.spot.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.spot.websocket.stream.model.DiffBookDepthRequest; import com.binance.connector.client.spot.websocket.stream.model.DiffBookDepthResponse; -/** API examples for WebSocketStreamsApi */ +/** API examples for DefaultApi */ public class DiffBookDepthExample { private SpotWebSocketStreams api; @@ -22,15 +22,15 @@ public SpotWebSocketStreams getApi() { } /** - * WebSocket Diff. Depth Stream + * Diff. Depth Stream * - *

Order book price and quantity depth updates used to locally manage an order book. + *

Order book price and quantity depth updates used to locally manage an order book. Update + * Speed: 1000ms or 100ms * * @throws ApiException if the Api call fails */ public void diffBookDepthExample() throws ApiException, InterruptedException { DiffBookDepthRequest diffBookDepthRequest = new DiffBookDepthRequest(); - diffBookDepthRequest.symbol("bnbusdt"); StreamBlockingQueueWrapper response = getApi().diffBookDepth(diffBookDepthRequest); while (true) { diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/KlineExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/KlineExample.java similarity index 76% rename from examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/KlineExample.java rename to examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/KlineExample.java index c05e8afe9..4c8c7d4f1 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/KlineExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/KlineExample.java @@ -1,15 +1,14 @@ -package com.binance.connector.client.spot.websocket.stream.websocketstreams; +package com.binance.connector.client.spot.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; import com.binance.connector.client.spot.websocket.stream.SpotWebSocketStreamsUtil; import com.binance.connector.client.spot.websocket.stream.api.SpotWebSocketStreams; -import com.binance.connector.client.spot.websocket.stream.model.Interval; import com.binance.connector.client.spot.websocket.stream.model.KlineRequest; import com.binance.connector.client.spot.websocket.stream.model.KlineResponse; -/** API examples for WebSocketStreamsApi */ +/** API examples for DefaultApi */ public class KlineExample { private SpotWebSocketStreams api; @@ -23,17 +22,16 @@ public SpotWebSocketStreams getApi() { } /** - * WebSocket Kline/Candlestick Streams for UTC + * Kline/Candlestick Streams for UTC * *

The Kline/Candlestick Stream push updates to the current klines/candlestick every second - * in `UTC+0` timezone <a id=\"kline-intervals\"></a> + * in `UTC+0` timezone Update Speed: 1000ms for `1s`, 2000ms for the other + * intervals * * @throws ApiException if the Api call fails */ public void klineExample() throws ApiException, InterruptedException { KlineRequest klineRequest = new KlineRequest(); - klineRequest.symbol("bnbusdt"); - klineRequest.interval(Interval.INTERVAL_1s); StreamBlockingQueueWrapper response = getApi().kline(klineRequest); while (true) { System.out.println(response.take()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/KlineOffsetExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/KlineOffsetExample.java new file mode 100644 index 000000000..fd04cfe46 --- /dev/null +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/KlineOffsetExample.java @@ -0,0 +1,45 @@ +package com.binance.connector.client.spot.websocket.stream.defaultpkg; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; +import com.binance.connector.client.spot.websocket.stream.SpotWebSocketStreamsUtil; +import com.binance.connector.client.spot.websocket.stream.api.SpotWebSocketStreams; +import com.binance.connector.client.spot.websocket.stream.model.KlineOffsetRequest; +import com.binance.connector.client.spot.websocket.stream.model.KlineOffsetResponse; + +/** API examples for DefaultApi */ +public class KlineOffsetExample { + private SpotWebSocketStreams api; + + public SpotWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + SpotWebSocketStreamsUtil.getClientConfiguration(); + api = new SpotWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * Kline/Candlestick Streams with timezone offset + * + *

The Kline/Candlestick Stream push updates to the current klines/candlestick every second + * in `UTC+8` timezone **Kline/Candlestick chart intervals:** Supported intervals: See + * Kline/Candlestick chart intervals **UTC+8 timezone offset:** - Kline intervals open and close + * in the UTC+8 timezone. For example the 1d klines will open at the beginning of the UTC+8 day, + * and close at the end of the UTC+8 day. - Note that E (event time), t (start time) and T + * (close time) in the payload are Unix timestamps, which are always interpreted in UTC. Update + * Speed: 1000ms for `1s`, 2000ms for the other intervals + * + * @throws ApiException if the Api call fails + */ + public void klineOffsetExample() throws ApiException, InterruptedException { + KlineOffsetRequest klineOffsetRequest = new KlineOffsetRequest(); + StreamBlockingQueueWrapper response = + getApi().klineOffset(klineOffsetRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/MiniTickerExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/MiniTickerExample.java similarity index 84% rename from examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/MiniTickerExample.java rename to examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/MiniTickerExample.java index b156c965b..e3132d717 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/MiniTickerExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/MiniTickerExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.spot.websocket.stream.websocketstreams; +package com.binance.connector.client.spot.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.spot.websocket.stream.model.MiniTickerRequest; import com.binance.connector.client.spot.websocket.stream.model.MiniTickerResponse; -/** API examples for WebSocketStreamsApi */ +/** API examples for DefaultApi */ public class MiniTickerExample { private SpotWebSocketStreams api; @@ -22,16 +22,15 @@ public SpotWebSocketStreams getApi() { } /** - * WebSocket Individual Symbol Mini Ticker Stream + * Individual Symbol Mini Ticker Stream * *

24hr rolling window mini-ticker statistics. These are NOT the statistics of the UTC day, - * but a 24hr rolling window for the previous 24hrs. + * but a 24hr rolling window for the previous 24hrs. Update Speed: 1000ms * * @throws ApiException if the Api call fails */ public void miniTickerExample() throws ApiException, InterruptedException { MiniTickerRequest miniTickerRequest = new MiniTickerRequest(); - miniTickerRequest.symbol("bnbusdt"); StreamBlockingQueueWrapper response = getApi().miniTicker(miniTickerRequest); while (true) { diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/PartialBookDepthExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/PartialBookDepthExample.java similarity index 81% rename from examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/PartialBookDepthExample.java rename to examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/PartialBookDepthExample.java index da6785427..d9c0b2593 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/PartialBookDepthExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/PartialBookDepthExample.java @@ -1,15 +1,14 @@ -package com.binance.connector.client.spot.websocket.stream.websocketstreams; +package com.binance.connector.client.spot.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; import com.binance.connector.client.spot.websocket.stream.SpotWebSocketStreamsUtil; import com.binance.connector.client.spot.websocket.stream.api.SpotWebSocketStreams; -import com.binance.connector.client.spot.websocket.stream.model.Levels; import com.binance.connector.client.spot.websocket.stream.model.PartialBookDepthRequest; import com.binance.connector.client.spot.websocket.stream.model.PartialBookDepthResponse; -/** API examples for WebSocketStreamsApi */ +/** API examples for DefaultApi */ public class PartialBookDepthExample { private SpotWebSocketStreams api; @@ -25,15 +24,13 @@ public SpotWebSocketStreams getApi() { /** * WebSocket Partial Book Depth Streams * - *

Top **\\<levels\\>** bids and asks, pushed every second. Valid - * **\\<levels\\>** are 5, 10, or 20. + *

Top **\\<levels\\>** bids and asks, pushed every second. Update Speed: 1000ms or + * 100ms * * @throws ApiException if the Api call fails */ public void partialBookDepthExample() throws ApiException, InterruptedException { PartialBookDepthRequest partialBookDepthRequest = new PartialBookDepthRequest(); - partialBookDepthRequest.symbol("bnbusdt"); - partialBookDepthRequest.levels(Levels.LEVELS_5); StreamBlockingQueueWrapper response = getApi().partialBookDepth(partialBookDepthRequest); while (true) { diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/ReferencePriceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/ReferencePriceExample.java similarity index 87% rename from examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/ReferencePriceExample.java rename to examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/ReferencePriceExample.java index f1edaf7ca..dd068100f 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/ReferencePriceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/ReferencePriceExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.spot.websocket.stream.websocketstreams; +package com.binance.connector.client.spot.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.spot.websocket.stream.model.ReferencePriceRequest; import com.binance.connector.client.spot.websocket.stream.model.ReferencePriceResponse; -/** API examples for WebSocketStreamsApi */ +/** API examples for DefaultApi */ public class ReferencePriceExample { private SpotWebSocketStreams api; @@ -22,13 +22,14 @@ public SpotWebSocketStreams getApi() { } /** - * WebSocket Reference Price Streams + * Reference Price Streams + * + *

Reference price stream for a symbol. Update Speed: 1000ms * * @throws ApiException if the Api call fails */ public void referencePriceExample() throws ApiException, InterruptedException { ReferencePriceRequest referencePriceRequest = new ReferencePriceRequest(); - referencePriceRequest.symbol("bnbusdt"); StreamBlockingQueueWrapper response = getApi().referencePrice(referencePriceRequest); while (true) { diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/RollingWindowTickerExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/RollingWindowTickerExample.java new file mode 100644 index 000000000..330854b60 --- /dev/null +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/RollingWindowTickerExample.java @@ -0,0 +1,43 @@ +package com.binance.connector.client.spot.websocket.stream.defaultpkg; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; +import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; +import com.binance.connector.client.spot.websocket.stream.SpotWebSocketStreamsUtil; +import com.binance.connector.client.spot.websocket.stream.api.SpotWebSocketStreams; +import com.binance.connector.client.spot.websocket.stream.model.RollingWindowTickerRequest; +import com.binance.connector.client.spot.websocket.stream.model.RollingWindowTickerResponse; + +/** API examples for DefaultApi */ +public class RollingWindowTickerExample { + private SpotWebSocketStreams api; + + public SpotWebSocketStreams getApi() { + if (api == null) { + WebSocketClientConfiguration clientConfiguration = + SpotWebSocketStreamsUtil.getClientConfiguration(); + api = new SpotWebSocketStreams(clientConfiguration); + } + return api; + } + + /** + * Individual Symbol Rolling Window Statistics Streams + * + *

Rolling window ticker statistics for a single symbol, computed over multiple windows. + * **Note:** This stream is different from the `<symbol>@ticker` stream. The + * open time `\"O\"` always starts on a minute, while the closing time + * `\"C\"` is the current time of the update. As such, the effective window + * might be up to 59999ms wider than `<window_size>`. Update Speed: 1000ms + * + * @throws ApiException if the Api call fails + */ + public void rollingWindowTickerExample() throws ApiException, InterruptedException { + RollingWindowTickerRequest rollingWindowTickerRequest = new RollingWindowTickerRequest(); + StreamBlockingQueueWrapper response = + getApi().rollingWindowTicker(rollingWindowTickerRequest); + while (true) { + System.out.println(response.take()); + } + } +} diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/TickerExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/TickerExample.java similarity index 87% rename from examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/TickerExample.java rename to examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/TickerExample.java index 09923a6b4..6b54f5b89 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/TickerExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/TickerExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.spot.websocket.stream.websocketstreams; +package com.binance.connector.client.spot.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.spot.websocket.stream.model.TickerRequest; import com.binance.connector.client.spot.websocket.stream.model.TickerResponse; -/** API examples for WebSocketStreamsApi */ +/** API examples for DefaultApi */ public class TickerExample { private SpotWebSocketStreams api; @@ -22,16 +22,15 @@ public SpotWebSocketStreams getApi() { } /** - * WebSocket Individual Symbol Ticker Streams + * Individual Symbol Ticker Streams * *

24hr rolling window ticker statistics for a single symbol. These are NOT the statistics of - * the UTC day, but a 24hr rolling window for the previous 24hrs. + * the UTC day, but a 24hr rolling window for the previous 24hrs. Update Speed: 1000ms * * @throws ApiException if the Api call fails */ public void tickerExample() throws ApiException, InterruptedException { TickerRequest tickerRequest = new TickerRequest(); - tickerRequest.symbol("bnbusdt"); StreamBlockingQueueWrapper response = getApi().ticker(tickerRequest); while (true) { System.out.println(response.take()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/TradeExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/TradeExample.java similarity index 88% rename from examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/TradeExample.java rename to examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/TradeExample.java index 0cb496216..fe2d6b38b 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/TradeExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/TradeExample.java @@ -1,4 +1,4 @@ -package com.binance.connector.client.spot.websocket.stream.websocketstreams; +package com.binance.connector.client.spot.websocket.stream.defaultpkg; import com.binance.connector.client.common.ApiException; import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; @@ -8,7 +8,7 @@ import com.binance.connector.client.spot.websocket.stream.model.TradeRequest; import com.binance.connector.client.spot.websocket.stream.model.TradeResponse; -/** API examples for WebSocketStreamsApi */ +/** API examples for DefaultApi */ public class TradeExample { private SpotWebSocketStreams api; @@ -22,15 +22,15 @@ public SpotWebSocketStreams getApi() { } /** - * WebSocket Trade Streams + * Trade Streams * *

The Trade Streams push raw trade information; each trade has a unique buyer and seller. + * Update Speed: Real-time * * @throws ApiException if the Api call fails */ public void tradeExample() throws ApiException, InterruptedException { TradeRequest tradeRequest = new TradeRequest(); - tradeRequest.symbol("bnbusdt"); StreamBlockingQueueWrapper response = getApi().trade(tradeRequest); while (true) { System.out.println(response.take()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/KlineOffsetExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/KlineOffsetExample.java deleted file mode 100644 index c2c57f125..000000000 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/KlineOffsetExample.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.binance.connector.client.spot.websocket.stream.websocketstreams; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; -import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; -import com.binance.connector.client.spot.websocket.stream.SpotWebSocketStreamsUtil; -import com.binance.connector.client.spot.websocket.stream.api.SpotWebSocketStreams; -import com.binance.connector.client.spot.websocket.stream.model.Interval; -import com.binance.connector.client.spot.websocket.stream.model.KlineOffsetRequest; -import com.binance.connector.client.spot.websocket.stream.model.KlineOffsetResponse; - -/** API examples for WebSocketStreamsApi */ -public class KlineOffsetExample { - private SpotWebSocketStreams api; - - public SpotWebSocketStreams getApi() { - if (api == null) { - WebSocketClientConfiguration clientConfiguration = - SpotWebSocketStreamsUtil.getClientConfiguration(); - api = new SpotWebSocketStreams(clientConfiguration); - } - return api; - } - - /** - * WebSocket Kline/Candlestick Streams with timezone offset - * - *

The Kline/Candlestick Stream push updates to the current klines/candlestick every second - * in `UTC+8` timezone - * - * @throws ApiException if the Api call fails - */ - public void klineOffsetExample() throws ApiException, InterruptedException { - KlineOffsetRequest klineOffsetRequest = new KlineOffsetRequest(); - klineOffsetRequest.symbol("bnbusdt"); - klineOffsetRequest.interval(Interval.INTERVAL_1s); - StreamBlockingQueueWrapper response = - getApi().klineOffset(klineOffsetRequest); - while (true) { - System.out.println(response.take()); - } - } -} diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/RollingWindowTickerExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/RollingWindowTickerExample.java deleted file mode 100644 index 573bf395f..000000000 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/websocketstreams/RollingWindowTickerExample.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.binance.connector.client.spot.websocket.stream.websocketstreams; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration; -import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper; -import com.binance.connector.client.spot.websocket.stream.SpotWebSocketStreamsUtil; -import com.binance.connector.client.spot.websocket.stream.api.SpotWebSocketStreams; -import com.binance.connector.client.spot.websocket.stream.model.RollingWindowTickerRequest; -import com.binance.connector.client.spot.websocket.stream.model.RollingWindowTickerResponse; -import com.binance.connector.client.spot.websocket.stream.model.WindowSize; - -/** API examples for WebSocketStreamsApi */ -public class RollingWindowTickerExample { - private SpotWebSocketStreams api; - - public SpotWebSocketStreams getApi() { - if (api == null) { - WebSocketClientConfiguration clientConfiguration = - SpotWebSocketStreamsUtil.getClientConfiguration(); - api = new SpotWebSocketStreams(clientConfiguration); - } - return api; - } - - /** - * WebSocket Individual Symbol Rolling Window Statistics Streams - * - *

Rolling window ticker statistics for a single symbol, computed over multiple windows. - * - * @throws ApiException if the Api call fails - */ - public void rollingWindowTickerExample() throws ApiException, InterruptedException { - RollingWindowTickerRequest rollingWindowTickerRequest = new RollingWindowTickerRequest(); - rollingWindowTickerRequest.symbol("bnbusdt"); - rollingWindowTickerRequest.windowSize(WindowSize.WINDOW_SIZE_1h); - StreamBlockingQueueWrapper response = - getApi().rollingWindowTicker(rollingWindowTickerRequest); - while (true) { - System.out.println(response.take()); - } - } -} diff --git a/examples/staking/pom.xml b/examples/staking/pom.xml index 754bb493e..badde75a9 100644 --- a/examples/staking/pom.xml +++ b/examples/staking/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-staking - 5.0.0 + 6.0.0 \ No newline at end of file diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/EthStakingAccountExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/EthStakingAccountExample.java index 270d4defa..6a6e90ace 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/EthStakingAccountExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/EthStakingAccountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.EthStakingAccountResponse; +import java.io.IOException; /** API examples for EthStakingApi */ public class EthStakingAccountExample { @@ -25,13 +26,13 @@ public StakingRestApi getApi() { } /** - * ETH Staking account(USER_DATA) + * ETH Staking account (USER_DATA) * - *

ETH Staking account Weight: 150 + *

ETH Staking account Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void ethStakingAccountExample() throws ApiException { + public void ethStakingAccountExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().ethStakingAccount(recvWindow); System.out.println(response.getData()); diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetCurrentEthStakingQuotaExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetCurrentEthStakingQuotaExample.java index 2a20ef571..fc8f58b23 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetCurrentEthStakingQuotaExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetCurrentEthStakingQuotaExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetCurrentEthStakingQuotaResponse; +import java.io.IOException; /** API examples for EthStakingApi */ public class GetCurrentEthStakingQuotaExample { @@ -25,13 +26,13 @@ public StakingRestApi getApi() { } /** - * Get current ETH staking quota(USER_DATA) + * Get current ETH staking quota (USER_DATA) * - *

Get current ETH staking quota Weight: 150 + *

Get current ETH staking quota Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getCurrentEthStakingQuotaExample() throws ApiException { + public void getCurrentEthStakingQuotaExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getCurrentEthStakingQuota(recvWindow); diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetEthRedemptionHistoryExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetEthRedemptionHistoryExample.java index 2f5617198..b06b3da56 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetEthRedemptionHistoryExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetEthRedemptionHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetEthRedemptionHistoryResponse; +import java.io.IOException; /** API examples for EthStakingApi */ public class GetEthRedemptionHistoryExample { @@ -25,20 +26,20 @@ public StakingRestApi getApi() { } /** - * Get ETH redemption history(USER_DATA) + * Get ETH redemption history (USER_DATA) * - *

Get ETH redemption history * The time between `startTime` and - * `endTime` cannot be longer than 3 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get ETH redemption history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getEthRedemptionHistoryExample() throws ApiException { - Long redeemId = 1L; + public void getEthRedemptionHistoryExample() throws ApiException, IOException { + Long redeemId = 1234567L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetEthStakingHistoryExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetEthStakingHistoryExample.java index ca78840f9..cd8e0dd1a 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetEthStakingHistoryExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetEthStakingHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetEthStakingHistoryResponse; +import java.io.IOException; /** API examples for EthStakingApi */ public class GetEthStakingHistoryExample { @@ -25,20 +26,20 @@ public StakingRestApi getApi() { } /** - * Get ETH staking history(USER_DATA) + * Get ETH staking history (USER_DATA) * - *

Get ETH staking history * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get ETH staking history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getEthStakingHistoryExample() throws ApiException { - Long purchaseId = 1L; + public void getEthStakingHistoryExample() throws ApiException, IOException { + Long purchaseId = 1234567L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethRateHistoryExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethRateHistoryExample.java index 6d57e7a4c..fa0744da1 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethRateHistoryExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethRateHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetWbethRateHistoryResponse; +import java.io.IOException; /** API examples for EthStakingApi */ public class GetWbethRateHistoryExample { @@ -25,19 +26,19 @@ public StakingRestApi getApi() { } /** - * Get WBETH Rate History(USER_DATA) + * Get WBETH Rate History (USER_DATA) * - *

Get WBETH Rate History * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get WBETH Rate History Weight(IP): 150 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getWbethRateHistoryExample() throws ApiException { + public void getWbethRateHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethRewardsHistoryExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethRewardsHistoryExample.java index 22342e1e7..b3c5b6154 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethRewardsHistoryExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethRewardsHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetWbethRewardsHistoryResponse; +import java.io.IOException; /** API examples for EthStakingApi */ public class GetWbethRewardsHistoryExample { @@ -25,19 +26,19 @@ public StakingRestApi getApi() { } /** - * Get WBETH rewards history(USER_DATA) + * Get WBETH rewards history (USER_DATA) * - *

Get WBETH rewards history * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get WBETH rewards history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getWbethRewardsHistoryExample() throws ApiException { + public void getWbethRewardsHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethUnwrapHistoryExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethUnwrapHistoryExample.java index 5a94bdabd..61e8a64ec 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethUnwrapHistoryExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethUnwrapHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetWbethUnwrapHistoryResponse; +import java.io.IOException; /** API examples for EthStakingApi */ public class GetWbethUnwrapHistoryExample { @@ -25,19 +26,19 @@ public StakingRestApi getApi() { } /** - * Get WBETH unwrap history(USER_DATA) + * Get WBETH unwrap history (USER_DATA) * - *

Get WBETH unwrap history * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get WBETH unwrap history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getWbethUnwrapHistoryExample() throws ApiException { + public void getWbethUnwrapHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethWrapHistoryExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethWrapHistoryExample.java index 407baf61a..03ccb3fc7 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethWrapHistoryExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/GetWbethWrapHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetWbethWrapHistoryResponse; +import java.io.IOException; /** API examples for EthStakingApi */ public class GetWbethWrapHistoryExample { @@ -25,19 +26,19 @@ public StakingRestApi getApi() { } /** - * Get WBETH wrap history(USER_DATA) + * Get WBETH wrap history (USER_DATA) * - *

Get WBETH wrap history * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get WBETH wrap history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getWbethWrapHistoryExample() throws ApiException { + public void getWbethWrapHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/RedeemEthExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/RedeemEthExample.java index 9198b849b..48d9cf4c2 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/RedeemEthExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/RedeemEthExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.RedeemEthRequest; import com.binance.connector.client.staking.rest.model.RedeemEthResponse; +import java.io.IOException; /** API examples for EthStakingApi */ public class RedeemEthExample { @@ -26,14 +27,15 @@ public StakingRestApi getApi() { } /** - * Redeem ETH(TRADE) + * Redeem ETH (TRADE) * - *

Redeem WBETH or BETH and get ETH * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 150 + *

Redeem WBETH or BETH and get ETH Weight(IP): 150 Security Type: TRADE Notes: - You need to + * open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ - public void redeemEthExample() throws ApiException { + public void redeemEthExample() throws ApiException, IOException { RedeemEthRequest redeemEthRequest = new RedeemEthRequest(); redeemEthRequest.amount(1.0d); ApiResponse response = getApi().redeemEth(redeemEthRequest); diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/SubscribeEthStakingExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/SubscribeEthStakingExample.java index e2e5da4ce..4fc399966 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/SubscribeEthStakingExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/SubscribeEthStakingExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.SubscribeEthStakingRequest; import com.binance.connector.client.staking.rest.model.SubscribeEthStakingResponse; +import java.io.IOException; /** API examples for EthStakingApi */ public class SubscribeEthStakingExample { @@ -26,14 +27,14 @@ public StakingRestApi getApi() { } /** - * Subscribe ETH Staking(TRADE) + * Subscribe ETH Staking (TRADE) * - *

Subscribe ETH Staking * You need to open Enable Spot & Margin Trading permission for - * the API Key which requests this endpoint. Weight: 150 + *

Subscribe ETH Staking Weight(IP): 150 Security Type: TRADE Notes: - You need to open + * Enable Spot & Margin Trading permission for the API Key which requests this endpoint. * * @throws ApiException if the Api call fails */ - public void subscribeEthStakingExample() throws ApiException { + public void subscribeEthStakingExample() throws ApiException, IOException { SubscribeEthStakingRequest subscribeEthStakingRequest = new SubscribeEthStakingRequest(); subscribeEthStakingRequest.amount(1.0d); ApiResponse response = diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/WrapBethExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/WrapBethExample.java index 20cf083f1..248242998 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/WrapBethExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/ethstaking/WrapBethExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.WrapBethRequest; import com.binance.connector.client.staking.rest.model.WrapBethResponse; +import java.io.IOException; /** API examples for EthStakingApi */ public class WrapBethExample { @@ -26,14 +27,14 @@ public StakingRestApi getApi() { } /** - * Wrap BETH(TRADE) + * Wrap BETH (TRADE) * - *

Wrap BETH * You need to open Enable Spot & Margin Trading permission for the API Key - * which requests this endpoint. Weight: 150 + *

Wrap BETH Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable Spot & + * Margin Trading permission for the API Key which requests this endpoint. * * @throws ApiException if the Api call fails */ - public void wrapBethExample() throws ApiException { + public void wrapBethExample() throws ApiException, IOException { WrapBethRequest wrapBethRequest = new WrapBethRequest(); wrapBethRequest.amount(1.0d); ApiResponse response = getApi().wrapBeth(wrapBethRequest); diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedPersonalLeftQuotaExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedPersonalLeftQuotaExample.java index 594d1c9f8..ab2c4e6af 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedPersonalLeftQuotaExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedPersonalLeftQuotaExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetOnChainYieldsLockedPersonalLeftQuotaResponse; +import java.io.IOException; /** API examples for OnChainYieldsApi */ public class GetOnChainYieldsLockedPersonalLeftQuotaExample { @@ -27,11 +28,11 @@ public StakingRestApi getApi() { /** * Get On-chain Yields Locked Personal Left Quota (USER_DATA) * - *

Get On-chain Yields Locked Personal Left Quota Weight: 50 + *

Get On-chain Yields Locked Personal Left Quota Weight(IP): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getOnChainYieldsLockedPersonalLeftQuotaExample() throws ApiException { + public void getOnChainYieldsLockedPersonalLeftQuotaExample() throws ApiException, IOException { String projectId = "1"; Long recvWindow = 5000L; ApiResponse response = diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedProductListExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedProductListExample.java index 9c3539b83..567d1e6c3 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedProductListExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedProductListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetOnChainYieldsLockedProductListResponse; +import java.io.IOException; /** API examples for OnChainYieldsApi */ public class GetOnChainYieldsLockedProductListExample { @@ -27,13 +28,13 @@ public StakingRestApi getApi() { /** * Get On-chain Yields Locked Product List (USER_DATA) * - *

Get available On-chain Yields Locked product list * Get available On-chain Yields Locked - * product list Weight: 50 + *

Get available On-chain Yields Locked product list Weight(IP): 50 Security Type: USER_DATA + * Notes: - Get available On-chain Yields Locked product list * * @throws ApiException if the Api call fails */ - public void getOnChainYieldsLockedProductListExample() throws ApiException { - String asset = ""; + public void getOnChainYieldsLockedProductListExample() throws ApiException, IOException { + String asset = "SOL"; Long current = 1L; Long size = 10L; Long recvWindow = 5000L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedProductPositionExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedProductPositionExample.java index 79d040438..fe437e226 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedProductPositionExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedProductPositionExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetOnChainYieldsLockedProductPositionResponse; +import java.io.IOException; /** API examples for OnChainYieldsApi */ public class GetOnChainYieldsLockedProductPositionExample { @@ -27,12 +28,12 @@ public StakingRestApi getApi() { /** * Get On-chain Yields Locked Product Position (USER_DATA) * - *

Get On-chain Yields Locked Product Position Weight: 50 + *

Get On-chain Yields Locked Product Position Weight(IP): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getOnChainYieldsLockedProductPositionExample() throws ApiException { - String asset = ""; + public void getOnChainYieldsLockedProductPositionExample() throws ApiException, IOException { + String asset = "BTC"; String positionId = "1"; String projectId = "1"; Long current = 1L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedRedemptionRecordExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedRedemptionRecordExample.java index 82e299361..a09da3b1a 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedRedemptionRecordExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedRedemptionRecordExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetOnChainYieldsLockedRedemptionRecordResponse; +import java.io.IOException; /** API examples for OnChainYieldsApi */ public class GetOnChainYieldsLockedRedemptionRecordExample { @@ -27,20 +28,21 @@ public StakingRestApi getApi() { /** * Get On-chain Yields Locked Redemption Record (USER_DATA) * - *

Get On-chain Yields Locked Redemption Record * The time between `startTime` and - * `endTime` cannot be longer than 3 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but + *

Get On-chain Yields Locked Redemption Record Weight(IP): 50 Security Type: USER_DATA + * Notes: - The time between `startTime` and `endTime` cannot be longer than + * 3 months. - If `startTime` and `endTime` are both not sent, then the last + * 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 50 + * returned. * * @throws ApiException if the Api call fails */ - public void getOnChainYieldsLockedRedemptionRecordExample() throws ApiException { + public void getOnChainYieldsLockedRedemptionRecordExample() throws ApiException, IOException { String positionId = "1"; String redeemId = "1"; - String asset = ""; + String asset = "BTC"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedRewardsHistoryExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedRewardsHistoryExample.java index a6a4cf647..19e12de30 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedRewardsHistoryExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedRewardsHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetOnChainYieldsLockedRewardsHistoryResponse; +import java.io.IOException; /** API examples for OnChainYieldsApi */ public class GetOnChainYieldsLockedRewardsHistoryExample { @@ -27,19 +28,20 @@ public StakingRestApi getApi() { /** * Get On-chain Yields Locked Rewards History (USER_DATA) * - *

Get On-chain Yields Locked Rewards History * The time between `startTime` and - * `endTime` cannot be longer than 3 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but + *

Get On-chain Yields Locked Rewards History Weight(IP): 50 Security Type: USER_DATA Notes: + * - The time between `startTime` and `endTime` cannot be longer than 3 + * months. - If `startTime` and `endTime` are both not sent, then the last + * 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 50 + * returned. * * @throws ApiException if the Api call fails */ - public void getOnChainYieldsLockedRewardsHistoryExample() throws ApiException { + public void getOnChainYieldsLockedRewardsHistoryExample() throws ApiException, IOException { String positionId = "1"; - String asset = ""; + String asset = "BTC"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedSubscriptionPreviewExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedSubscriptionPreviewExample.java index f710f44b7..4337c2b56 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedSubscriptionPreviewExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedSubscriptionPreviewExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetOnChainYieldsLockedSubscriptionPreviewResponse; +import java.io.IOException; /** API examples for OnChainYieldsApi */ public class GetOnChainYieldsLockedSubscriptionPreviewExample { @@ -27,14 +28,15 @@ public StakingRestApi getApi() { /** * Get On-chain Yields Locked Subscription Preview (USER_DATA) * - *

Get On-chain Yields Locked Subscription Preview Weight: 50 + *

Get On-chain Yields Locked Subscription Preview Weight(IP): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getOnChainYieldsLockedSubscriptionPreviewExample() throws ApiException { + public void getOnChainYieldsLockedSubscriptionPreviewExample() + throws ApiException, IOException { String projectId = "1"; Double amount = 1.0d; - Boolean autoSubscribe = false; + Boolean autoSubscribe = true; Long recvWindow = 5000L; ApiResponse response = getApi().getOnChainYieldsLockedSubscriptionPreview( diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedSubscriptionRecordExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedSubscriptionRecordExample.java index 471dcfe8b..4edf4ec6f 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedSubscriptionRecordExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/GetOnChainYieldsLockedSubscriptionRecordExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetOnChainYieldsLockedSubscriptionRecordResponse; +import java.io.IOException; /** API examples for OnChainYieldsApi */ public class GetOnChainYieldsLockedSubscriptionRecordExample { @@ -27,20 +28,21 @@ public StakingRestApi getApi() { /** * Get On-chain Yields Locked Subscription Record (USER_DATA) * - *

Get On-chain Yields Locked Subscription Record * The time between `startTime` - * and `endTime` cannot be longer than 3 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but + *

Get On-chain Yields Locked Subscription Record Weight(IP): 50 Security Type: USER_DATA + * Notes: - The time between `startTime` and `endTime` cannot be longer than + * 3 months. - If `startTime` and `endTime` are both not sent, then the last + * 30 days' data will be returned. - If `startTime` is sent but + * `endTime` is not sent, the next 30 days' data beginning from + * `startTime` will be returned. - If `endTime` is sent but * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 50 + * returned. * * @throws ApiException if the Api call fails */ - public void getOnChainYieldsLockedSubscriptionRecordExample() throws ApiException { + public void getOnChainYieldsLockedSubscriptionRecordExample() throws ApiException, IOException { String purchaseId = "1"; String clientId = "1"; - String asset = ""; + String asset = "BTC"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/OnChainYieldsAccountExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/OnChainYieldsAccountExample.java index 5d6e5a3ca..2fa6ffb55 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/OnChainYieldsAccountExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/OnChainYieldsAccountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.OnChainYieldsAccountResponse; +import java.io.IOException; /** API examples for OnChainYieldsApi */ public class OnChainYieldsAccountExample { @@ -27,11 +28,11 @@ public StakingRestApi getApi() { /** * On-chain Yields Account (USER_DATA) * - *

On-chain Yields Account query Weight: 50 + *

On-chain Yields Account query Weight(IP): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void onChainYieldsAccountExample() throws ApiException { + public void onChainYieldsAccountExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().onChainYieldsAccount(recvWindow); diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/RedeemOnChainYieldsLockedProductExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/RedeemOnChainYieldsLockedProductExample.java index d77bdd8ee..23ca17bcf 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/RedeemOnChainYieldsLockedProductExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/RedeemOnChainYieldsLockedProductExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.RedeemOnChainYieldsLockedProductRequest; import com.binance.connector.client.staking.rest.model.RedeemOnChainYieldsLockedProductResponse; +import java.io.IOException; /** API examples for OnChainYieldsApi */ public class RedeemOnChainYieldsLockedProductExample { @@ -28,13 +29,13 @@ public StakingRestApi getApi() { /** * Redeem On-chain Yields Locked Product (TRADE) * - *

Redeem On-chain Yields Locked Product * You need to open `Enable Spot & Margin - * Trading` permission for the API Key which requests this endpoint. Weight: 1/3s per - * account + *

Redeem On-chain Yields Locked Product Weight(IP): 200 Security Type: TRADE Notes: - You + * need to open `Enable Spot & Margin Trading` permission for the API Key which + * requests this endpoint. * * @throws ApiException if the Api call fails */ - public void redeemOnChainYieldsLockedProductExample() throws ApiException { + public void redeemOnChainYieldsLockedProductExample() throws ApiException, IOException { RedeemOnChainYieldsLockedProductRequest redeemOnChainYieldsLockedProductRequest = new RedeemOnChainYieldsLockedProductRequest(); redeemOnChainYieldsLockedProductRequest.positionId("1"); diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SetOnChainYieldsLockedAutoSubscribeExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SetOnChainYieldsLockedAutoSubscribeExample.java index f171a3719..a22230911 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SetOnChainYieldsLockedAutoSubscribeExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SetOnChainYieldsLockedAutoSubscribeExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.SetOnChainYieldsLockedAutoSubscribeRequest; import com.binance.connector.client.staking.rest.model.SetOnChainYieldsLockedAutoSubscribeResponse; +import java.io.IOException; /** API examples for OnChainYieldsApi */ public class SetOnChainYieldsLockedAutoSubscribeExample { @@ -26,17 +27,17 @@ public StakingRestApi getApi() { } /** - * Set On-chain Yields Locked Auto Subscribe(USER_DATA) + * Set On-chain Yields Locked Auto Subscribe (USER_DATA) * - *

Set On-chain Yield locked auto subscribe Weight: 50 + *

Set On-chain Yield locked auto subscribe Weight(IP): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void setOnChainYieldsLockedAutoSubscribeExample() throws ApiException { + public void setOnChainYieldsLockedAutoSubscribeExample() throws ApiException, IOException { SetOnChainYieldsLockedAutoSubscribeRequest setOnChainYieldsLockedAutoSubscribeRequest = new SetOnChainYieldsLockedAutoSubscribeRequest(); setOnChainYieldsLockedAutoSubscribeRequest.positionId("1"); - setOnChainYieldsLockedAutoSubscribeRequest.autoSubscribe(false); + setOnChainYieldsLockedAutoSubscribeRequest.autoSubscribe(true); ApiResponse response = getApi().setOnChainYieldsLockedAutoSubscribe( setOnChainYieldsLockedAutoSubscribeRequest); diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SetOnChainYieldsLockedProductRedeemOptionExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SetOnChainYieldsLockedProductRedeemOptionExample.java index 1aa387f42..15bcc6dec 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SetOnChainYieldsLockedProductRedeemOptionExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SetOnChainYieldsLockedProductRedeemOptionExample.java @@ -6,8 +6,10 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; +import com.binance.connector.client.staking.rest.model.RedeemTo; import com.binance.connector.client.staking.rest.model.SetOnChainYieldsLockedProductRedeemOptionRequest; import com.binance.connector.client.staking.rest.model.SetOnChainYieldsLockedProductRedeemOptionResponse; +import java.io.IOException; /** API examples for OnChainYieldsApi */ public class SetOnChainYieldsLockedProductRedeemOptionExample { @@ -26,18 +28,20 @@ public StakingRestApi getApi() { } /** - * Set On-chain Yields Locked Product Redeem Option(USER_DATA) + * Set On-chain Yields Locked Product Redeem Option (USER_DATA) * - *

Set On-chain Yields redeem option for Locked product Weight: 50 + *

Set On-chain Yields redeem option for Locked product Weight(IP): 50 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ - public void setOnChainYieldsLockedProductRedeemOptionExample() throws ApiException { + public void setOnChainYieldsLockedProductRedeemOptionExample() + throws ApiException, IOException { SetOnChainYieldsLockedProductRedeemOptionRequest setOnChainYieldsLockedProductRedeemOptionRequest = new SetOnChainYieldsLockedProductRedeemOptionRequest(); setOnChainYieldsLockedProductRedeemOptionRequest.positionId("1"); - setOnChainYieldsLockedProductRedeemOptionRequest.redeemTo(""); + setOnChainYieldsLockedProductRedeemOptionRequest.redeemTo(RedeemTo.SPOT); ApiResponse response = getApi().setOnChainYieldsLockedProductRedeemOption( setOnChainYieldsLockedProductRedeemOptionRequest); diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SubscribeOnChainYieldsLockedProductExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SubscribeOnChainYieldsLockedProductExample.java index 5b4f14ba9..5fbee4f8d 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SubscribeOnChainYieldsLockedProductExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/onchainyields/SubscribeOnChainYieldsLockedProductExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.SubscribeOnChainYieldsLockedProductRequest; import com.binance.connector.client.staking.rest.model.SubscribeOnChainYieldsLockedProductResponse; +import java.io.IOException; /** API examples for OnChainYieldsApi */ public class SubscribeOnChainYieldsLockedProductExample { @@ -26,14 +27,15 @@ public StakingRestApi getApi() { } /** - * Subscribe On-chain Yields Locked Product(TRADE) + * Subscribe On-chain Yields Locked Product (TRADE) * - *

Subscribe On-chain Yields Locked Product * You need to open `Enable Spot & Margin - * Trading` permission for the API Key which requests this endpoint. Weight: 200 + *

Subscribe On-chain Yields Locked Product Weight(IP): 200 Security Type: TRADE Notes: - You + * need to open `Enable Spot & Margin Trading` permission for the API Key which + * requests this endpoint. * * @throws ApiException if the Api call fails */ - public void subscribeOnChainYieldsLockedProductExample() throws ApiException { + public void subscribeOnChainYieldsLockedProductExample() throws ApiException, IOException { SubscribeOnChainYieldsLockedProductRequest subscribeOnChainYieldsLockedProductRequest = new SubscribeOnChainYieldsLockedProductRequest(); subscribeOnChainYieldsLockedProductRequest.projectId("1"); diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/GetSoftStakingProductListExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/GetSoftStakingProductListExample.java index 4465ada8b..7e2bcf808 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/GetSoftStakingProductListExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/GetSoftStakingProductListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetSoftStakingProductListResponse; +import java.io.IOException; /** API examples for SoftStakingApi */ public class GetSoftStakingProductListExample { @@ -27,12 +28,12 @@ public StakingRestApi getApi() { /** * Get Soft Staking Product List (USER_DATA) * - *

Get the available Soft Staking product list. Weight: 50 + *

Get the available Soft Staking product list. Weight(IP): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getSoftStakingProductListExample() throws ApiException { - String asset = ""; + public void getSoftStakingProductListExample() throws ApiException, IOException { + String asset = "BTC"; Long current = 1L; Long size = 10L; Long recvWindow = 5000L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/GetSoftStakingRewardsHistoryExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/GetSoftStakingRewardsHistoryExample.java index 97f46eb7b..f5d5c0a02 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/GetSoftStakingRewardsHistoryExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/GetSoftStakingRewardsHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetSoftStakingRewardsHistoryResponse; +import java.io.IOException; /** API examples for SoftStakingApi */ public class GetSoftStakingRewardsHistoryExample { @@ -25,20 +26,20 @@ public StakingRestApi getApi() { } /** - * Get Soft Staking Rewards History(USER_DATA) + * Get Soft Staking Rewards History (USER_DATA) * - *

* The time between `startTime` and `endTime` cannot be longer than 3 - * months. * If `startTime` and `endTime` are both not sent, then the last - * 30 days' data will be returned. * If `startTime` is sent but - * `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 50 + *

Get Soft Staking Rewards History Weight(IP): 50 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getSoftStakingRewardsHistoryExample() throws ApiException { - String asset = ""; + public void getSoftStakingRewardsHistoryExample() throws ApiException, IOException { + String asset = "BTC"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/SetSoftStakingExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/SetSoftStakingExample.java index 2ee365cf9..1a6166e82 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/SetSoftStakingExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/softstaking/SetSoftStakingExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.SetSoftStakingResponse; +import java.io.IOException; /** API examples for SoftStakingApi */ public class SetSoftStakingExample { @@ -27,11 +28,11 @@ public StakingRestApi getApi() { /** * Set Soft Staking (USER_DATA) * - *

Enable or disable Soft Staking. Weight: 50 + *

Enable or disable Soft Staking. Weight(IP): 50 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void setSoftStakingExample() throws ApiException { + public void setSoftStakingExample() throws ApiException, IOException { Boolean softStaking = true; Long recvWindow = 5000L; ApiResponse response = diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/ClaimBoostRewardsExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/ClaimBoostRewardsExample.java index 00c64a53b..4e78cee56 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/ClaimBoostRewardsExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/ClaimBoostRewardsExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.ClaimBoostRewardsRequest; import com.binance.connector.client.staking.rest.model.ClaimBoostRewardsResponse; +import java.io.IOException; /** API examples for SolStakingApi */ public class ClaimBoostRewardsExample { @@ -26,14 +27,15 @@ public StakingRestApi getApi() { } /** - * Claim Boost Rewards(TRADE) + * Claim Boost Rewards (TRADE) * - *

Claim Boost APR Airdrop Rewards * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 150 + *

Claim Boost APR Airdrop Rewards Weight(IP): 150 Security Type: TRADE Notes: - You need to + * open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ - public void claimBoostRewardsExample() throws ApiException { + public void claimBoostRewardsExample() throws ApiException, IOException { ClaimBoostRewardsRequest claimBoostRewardsRequest = new ClaimBoostRewardsRequest(); ApiResponse response = getApi().claimBoostRewards(claimBoostRewardsRequest); diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBnsolRateHistoryExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBnsolRateHistoryExample.java index c176b057d..46047d0b8 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBnsolRateHistoryExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBnsolRateHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetBnsolRateHistoryResponse; +import java.io.IOException; /** API examples for SolStakingApi */ public class GetBnsolRateHistoryExample { @@ -25,19 +26,19 @@ public StakingRestApi getApi() { } /** - * Get BNSOL Rate History(USER_DATA) + * Get BNSOL Rate History (USER_DATA) * - *

Get BNSOL Rate History * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get BNSOL Rate History Weight(IP): 150 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getBnsolRateHistoryExample() throws ApiException { + public void getBnsolRateHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBnsolRewardsHistoryExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBnsolRewardsHistoryExample.java index 15ff62802..79fbea318 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBnsolRewardsHistoryExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBnsolRewardsHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetBnsolRewardsHistoryResponse; +import java.io.IOException; /** API examples for SolStakingApi */ public class GetBnsolRewardsHistoryExample { @@ -25,19 +26,19 @@ public StakingRestApi getApi() { } /** - * Get BNSOL rewards history(USER_DATA) + * Get BNSOL rewards history (USER_DATA) * - *

Get BNSOL rewards history * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get BNSOL rewards history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getBnsolRewardsHistoryExample() throws ApiException { + public void getBnsolRewardsHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBoostRewardsHistoryExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBoostRewardsHistoryExample.java index 383f8576a..1bfb62127 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBoostRewardsHistoryExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetBoostRewardsHistoryExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetBoostRewardsHistoryResponse; +import com.binance.connector.client.staking.rest.model.OrderType; +import java.io.IOException; /** API examples for SolStakingApi */ public class GetBoostRewardsHistoryExample { @@ -25,20 +27,20 @@ public StakingRestApi getApi() { } /** - * Get Boost Rewards History(USER_DATA) + * Get Boost Rewards History (USER_DATA) * - *

Get Boost rewards history * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get Boost rewards history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getBoostRewardsHistoryExample() throws ApiException { - String type = "CLAIM"; + public void getBoostRewardsHistoryExample() throws ApiException, IOException { + OrderType type = OrderType.CLAIM; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolRedemptionHistoryExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolRedemptionHistoryExample.java index 125b8d15f..5a6d7219d 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolRedemptionHistoryExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolRedemptionHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetSolRedemptionHistoryResponse; +import java.io.IOException; /** API examples for SolStakingApi */ public class GetSolRedemptionHistoryExample { @@ -25,20 +26,20 @@ public StakingRestApi getApi() { } /** - * Get SOL redemption history(USER_DATA) + * Get SOL redemption history (USER_DATA) * - *

Get SOL redemption history * The time between `startTime` and - * `endTime` cannot be longer than 3 months. * If `startTime` and - * `endTime` are both not sent, then the last 30 days' data will be returned. * If - * `startTime` is sent but `endTime` is not sent, the next 30 days' data - * beginning from `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get SOL redemption history Weight(IP): 150 Security Type: USER_DATA Notes: - The time + * between `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getSolRedemptionHistoryExample() throws ApiException { - Long redeemId = 1L; + public void getSolRedemptionHistoryExample() throws ApiException, IOException { + Long redeemId = 1234567L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolStakingHistoryExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolStakingHistoryExample.java index 0834714fc..16774b511 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolStakingHistoryExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolStakingHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetSolStakingHistoryResponse; +import java.io.IOException; /** API examples for SolStakingApi */ public class GetSolStakingHistoryExample { @@ -25,20 +26,20 @@ public StakingRestApi getApi() { } /** - * Get SOL staking history(USER_DATA) + * Get SOL staking history (USER_DATA) * - *

Get SOL staking history * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get SOL staking history Weight(IP): 150 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getSolStakingHistoryExample() throws ApiException { - Long purchaseId = 1L; + public void getSolStakingHistoryExample() throws ApiException, IOException { + Long purchaseId = 1234567L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolStakingQuotaDetailsExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolStakingQuotaDetailsExample.java index 43c0035f5..1b143f880 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolStakingQuotaDetailsExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetSolStakingQuotaDetailsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetSolStakingQuotaDetailsResponse; +import java.io.IOException; /** API examples for SolStakingApi */ public class GetSolStakingQuotaDetailsExample { @@ -25,13 +26,13 @@ public StakingRestApi getApi() { } /** - * Get SOL staking quota details(USER_DATA) + * Get SOL staking quota details (USER_DATA) * - *

Get SOL staking quota Weight: 150 + *

Get SOL staking quota Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getSolStakingQuotaDetailsExample() throws ApiException { + public void getSolStakingQuotaDetailsExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getSolStakingQuotaDetails(recvWindow); diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetUnclaimedRewardsExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetUnclaimedRewardsExample.java index cc295135d..0bfbcf306 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetUnclaimedRewardsExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/GetUnclaimedRewardsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.GetUnclaimedRewardsResponse; +import java.io.IOException; /** API examples for SolStakingApi */ public class GetUnclaimedRewardsExample { @@ -25,19 +26,19 @@ public StakingRestApi getApi() { } /** - * Get Unclaimed Rewards(USER_DATA) + * Get Unclaimed Rewards (USER_DATA) * - *

Get Unclaimed rewards * The time between `startTime` and `endTime` - * cannot be longer than 3 months. * If `startTime` and `endTime` are both - * not sent, then the last 30 days' data will be returned. * If `startTime` is - * sent but `endTime` is not sent, the next 30 days' data beginning from - * `startTime` will be returned. * If `endTime` is sent but - * `startTime` is not sent, the 30 days' data before `endTime` will be - * returned. Weight: 150 + *

Get Unclaimed rewards Weight(IP): 150 Security Type: USER_DATA Notes: - The time between + * `startTime` and `endTime` cannot be longer than 3 months. - If + * `startTime` and `endTime` are both not sent, then the last 30 days' + * data will be returned. - If `startTime` is sent but `endTime` is not + * sent, the next 30 days' data beginning from `startTime` will be returned. - If + * `endTime` is sent but `startTime` is not sent, the 30 days' data + * before `endTime` will be returned. * * @throws ApiException if the Api call fails */ - public void getUnclaimedRewardsExample() throws ApiException { + public void getUnclaimedRewardsExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getUnclaimedRewards(recvWindow); diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/RedeemSolExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/RedeemSolExample.java index 983ff8f7c..47a268aa4 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/RedeemSolExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/RedeemSolExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.RedeemSolRequest; import com.binance.connector.client.staking.rest.model.RedeemSolResponse; +import java.io.IOException; /** API examples for SolStakingApi */ public class RedeemSolExample { @@ -26,14 +27,14 @@ public StakingRestApi getApi() { } /** - * Redeem SOL(TRADE) + * Redeem SOL (TRADE) * - *

Redeem BNSOL get SOL * You need to open Enable Spot & Margin Trading permission for - * the API Key which requests this endpoint. Weight: 150 + *

Redeem BNSOL get SOL Weight(IP): 150 Security Type: TRADE Notes: - You need to open Enable + * Spot & Margin Trading permission for the API Key which requests this endpoint. * * @throws ApiException if the Api call fails */ - public void redeemSolExample() throws ApiException { + public void redeemSolExample() throws ApiException, IOException { RedeemSolRequest redeemSolRequest = new RedeemSolRequest(); redeemSolRequest.amount(1.0d); ApiResponse response = getApi().redeemSol(redeemSolRequest); diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/SolStakingAccountExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/SolStakingAccountExample.java index 560093101..4a9f14928 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/SolStakingAccountExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/SolStakingAccountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.staking.rest.StakingRestApiUtil; import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.SolStakingAccountResponse; +import java.io.IOException; /** API examples for SolStakingApi */ public class SolStakingAccountExample { @@ -25,13 +26,13 @@ public StakingRestApi getApi() { } /** - * SOL Staking account(USER_DATA) + * SOL Staking account (USER_DATA) * - *

SOL Staking account Weight: 150 + *

SOL Staking account Weight(IP): 150 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void solStakingAccountExample() throws ApiException { + public void solStakingAccountExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().solStakingAccount(recvWindow); System.out.println(response.getData()); diff --git a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/SubscribeSolStakingExample.java b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/SubscribeSolStakingExample.java index 0d274c84c..ae0d5563a 100644 --- a/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/SubscribeSolStakingExample.java +++ b/examples/staking/src/main/java/com/binance/connector/client/staking/rest/solstaking/SubscribeSolStakingExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.staking.rest.api.StakingRestApi; import com.binance.connector.client.staking.rest.model.SubscribeSolStakingRequest; import com.binance.connector.client.staking.rest.model.SubscribeSolStakingResponse; +import java.io.IOException; /** API examples for SolStakingApi */ public class SubscribeSolStakingExample { @@ -26,14 +27,14 @@ public StakingRestApi getApi() { } /** - * Subscribe SOL Staking(TRADE) + * Subscribe SOL Staking (TRADE) * - *

Subscribe SOL Staking * You need to open Enable Spot & Margin Trading permission for - * the API Key which requests this endpoint. Weight: 150 + *

Subscribe SOL Staking Weight(IP): 150 Security Type: TRADE Notes: - You need to open + * Enable Spot & Margin Trading permission for the API Key which requests this endpoint. * * @throws ApiException if the Api call fails */ - public void subscribeSolStakingExample() throws ApiException { + public void subscribeSolStakingExample() throws ApiException, IOException { SubscribeSolStakingRequest subscribeSolStakingRequest = new SubscribeSolStakingRequest(); subscribeSolStakingRequest.amount(1.0d); ApiResponse response = diff --git a/examples/sub-account/pom.xml b/examples/sub-account/pom.xml index 0fb7557f3..bfe30446f 100644 --- a/examples/sub-account/pom.xml +++ b/examples/sub-account/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-sub-account - 5.0.0 + 6.0.0 \ No newline at end of file diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/CreateAVirtualSubAccountExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/CreateAVirtualSubAccountExample.java index 5051df779..9e01fef7f 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/CreateAVirtualSubAccountExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/CreateAVirtualSubAccountExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.CreateAVirtualSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.CreateAVirtualSubAccountResponse; +import java.io.IOException; /** API examples for AccountManagementApi */ public class CreateAVirtualSubAccountExample { @@ -29,16 +30,16 @@ public SubAccountRestApi getApi() { /** * Create a Virtual Sub-account (For Master Account) (USER_DATA) * - *

Create a Virtual Sub-account * This request will generate a virtual sub account under your - * master account. * You need to enable \"trade\" option for the API Key which - * requests this endpoint. Weight: 1 + *

Create a Virtual Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - This request + * generates a virtual sub-account under your master account. - The API key used to call this + * endpoint must have the `trade` option enabled. * * @throws ApiException if the Api call fails */ - public void createAVirtualSubAccountExample() throws ApiException { + public void createAVirtualSubAccountExample() throws ApiException, IOException { CreateAVirtualSubAccountRequest createAVirtualSubAccountRequest = new CreateAVirtualSubAccountRequest(); - createAVirtualSubAccountRequest.subAccountString(""); + createAVirtualSubAccountRequest.subAccountString("testSubAccount"); ApiResponse response = getApi().createAVirtualSubAccount(createAVirtualSubAccountRequest); System.out.println(response.getData()); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/EnableFuturesForSubAccountExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/EnableFuturesForSubAccountExample.java index 6c9f0f09a..7b3934514 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/EnableFuturesForSubAccountExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/EnableFuturesForSubAccountExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.EnableFuturesForSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.EnableFuturesForSubAccountResponse; +import java.io.IOException; /** API examples for AccountManagementApi */ public class EnableFuturesForSubAccountExample { @@ -29,14 +30,14 @@ public SubAccountRestApi getApi() { /** * Enable Futures for Sub-account (For Master Account) (USER_DATA) * - *

Enable Futures for Sub-account for Master Account Weight: 1 + *

Enable Futures for Sub-account for Master Account Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void enableFuturesForSubAccountExample() throws ApiException { + public void enableFuturesForSubAccountExample() throws ApiException, IOException { EnableFuturesForSubAccountRequest enableFuturesForSubAccountRequest = new EnableFuturesForSubAccountRequest(); - enableFuturesForSubAccountRequest.email("sub-account-email@email.com"); + enableFuturesForSubAccountRequest.email("123@test.com"); ApiResponse response = getApi().enableFuturesForSubAccount(enableFuturesForSubAccountRequest); System.out.println(response.getData()); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/EnableOptionsForSubAccountExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/EnableOptionsForSubAccountExample.java index 50e01dc83..0ed0b3a45 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/EnableOptionsForSubAccountExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/EnableOptionsForSubAccountExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.EnableOptionsForSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.EnableOptionsForSubAccountResponse; +import java.io.IOException; /** API examples for AccountManagementApi */ public class EnableOptionsForSubAccountExample { @@ -29,14 +30,15 @@ public SubAccountRestApi getApi() { /** * Enable Options for Sub-account (For Master Account) (USER_DATA) * - *

Enable Options for Sub-account (For Master Account). Weight: 1 + *

Enable Options for Sub-account (For Master Account). Weight(IP): 1 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ - public void enableOptionsForSubAccountExample() throws ApiException { + public void enableOptionsForSubAccountExample() throws ApiException, IOException { EnableOptionsForSubAccountRequest enableOptionsForSubAccountRequest = new EnableOptionsForSubAccountRequest(); - enableOptionsForSubAccountRequest.email("sub-account-email@email.com"); + enableOptionsForSubAccountRequest.email("123@test.com"); ApiResponse response = getApi().enableOptionsForSubAccount(enableOptionsForSubAccountRequest); System.out.println(response.getData()); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetFuturesPositionRiskOfSubAccountExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetFuturesPositionRiskOfSubAccountExample.java index 807d7ff9c..07ded488d 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetFuturesPositionRiskOfSubAccountExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetFuturesPositionRiskOfSubAccountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.GetFuturesPositionRiskOfSubAccountResponse; +import java.io.IOException; /** API examples for AccountManagementApi */ public class GetFuturesPositionRiskOfSubAccountExample { @@ -28,12 +29,12 @@ public SubAccountRestApi getApi() { /** * Get Futures Position-Risk of Sub-account (For Master Account) (USER_DATA) * - *

Get Futures Position-Risk of Sub-account Weight: 10 + *

Get Futures Position-Risk of Sub-account Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getFuturesPositionRiskOfSubAccountExample() throws ApiException { - String email = "sub-account-email@email.com"; + public void getFuturesPositionRiskOfSubAccountExample() throws ApiException, IOException { + String email = "123@test.com"; Long recvWindow = 5000L; ApiResponse response = getApi().getFuturesPositionRiskOfSubAccount(email, recvWindow); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetFuturesPositionRiskOfSubAccountV2Example.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetFuturesPositionRiskOfSubAccountV2Example.java index 77620ee93..c9514f910 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetFuturesPositionRiskOfSubAccountV2Example.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetFuturesPositionRiskOfSubAccountV2Example.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.GetFuturesPositionRiskOfSubAccountV2Response; +import java.io.IOException; /** API examples for AccountManagementApi */ public class GetFuturesPositionRiskOfSubAccountV2Example { @@ -28,13 +29,13 @@ public SubAccountRestApi getApi() { /** * Get Futures Position-Risk of Sub-account V2 (For Master Account) (USER_DATA) * - *

Get Futures Position-Risk of Sub-account V2 Weight: 1 + *

Get Futures Position-Risk of Sub-account V2 Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getFuturesPositionRiskOfSubAccountV2Example() throws ApiException { - String email = "sub-account-email@email.com"; - Long futuresType = 0L; + public void getFuturesPositionRiskOfSubAccountV2Example() throws ApiException, IOException { + String email = "123@test.com"; + Long futuresType = 1L; Long recvWindow = 5000L; ApiResponse response = getApi().getFuturesPositionRiskOfSubAccountV2(email, futuresType, recvWindow); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetSubAccountsStatusOnMarginOrFuturesExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetSubAccountsStatusOnMarginOrFuturesExample.java index c83d4a546..443c5343f 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetSubAccountsStatusOnMarginOrFuturesExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/GetSubAccountsStatusOnMarginOrFuturesExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.GetSubAccountsStatusOnMarginOrFuturesResponse; +import java.io.IOException; /** API examples for AccountManagementApi */ public class GetSubAccountsStatusOnMarginOrFuturesExample { @@ -28,13 +29,13 @@ public SubAccountRestApi getApi() { /** * Get Sub-account's Status on Margin Or Futures (For Master Account) (USER_DATA) * - *

Get Sub-account's Status on Margin Or Futures * If no email sent, all - * sub-accounts' information will be returned. Weight: 10 + *

Get Sub-account's Status on Margin Or Futures Weight(IP): 10 Security Type: USER_DATA + * Notes: - If no email sent, all sub-accounts' information will be returned. * * @throws ApiException if the Api call fails */ - public void getSubAccountsStatusOnMarginOrFuturesExample() throws ApiException { - String email = ""; + public void getSubAccountsStatusOnMarginOrFuturesExample() throws ApiException, IOException { + String email = "123@test.com"; Long recvWindow = 5000L; ApiResponse response = getApi().getSubAccountsStatusOnMarginOrFutures(email, recvWindow); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/QuerySubAccountListExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/QuerySubAccountListExample.java index ef8427992..d9d92db3f 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/QuerySubAccountListExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/QuerySubAccountListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.QuerySubAccountListResponse; +import java.io.IOException; /** API examples for AccountManagementApi */ public class QuerySubAccountListExample { @@ -28,15 +29,15 @@ public SubAccountRestApi getApi() { /** * Query Sub-account List (For Master Account) (USER_DATA) * - *

Query Sub-account List Weight: 1 + *

Query Sub-account List Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void querySubAccountListExample() throws ApiException { - String email = ""; - String isFreeze = ""; + public void querySubAccountListExample() throws ApiException, IOException { + String email = "123@test.com"; + String isFreeze = "true"; Long page = 1L; - Long limit = 1L; + Long limit = 10L; Long recvWindow = 5000L; ApiResponse response = getApi().querySubAccountList(email, isFreeze, page, limit, recvWindow); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/QuerySubAccountTransactionStatisticsExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/QuerySubAccountTransactionStatisticsExample.java index f52d2d201..0ec29f0f8 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/QuerySubAccountTransactionStatisticsExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/accountmanagement/QuerySubAccountTransactionStatisticsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.QuerySubAccountTransactionStatisticsResponse; +import java.io.IOException; /** API examples for AccountManagementApi */ public class QuerySubAccountTransactionStatisticsExample { @@ -28,12 +29,13 @@ public SubAccountRestApi getApi() { /** * Query Sub-account Transaction Statistics (For Master Account) (USER_DATA) * - *

Query Sub-account Transaction statistics (For Master Account). Weight: 60 + *

Query Sub-account Transaction statistics (For Master Account). Weight(IP): 60 Security + * Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void querySubAccountTransactionStatisticsExample() throws ApiException { - String email = ""; + public void querySubAccountTransactionStatisticsExample() throws ApiException, IOException { + String email = "abc@test.com"; Long recvWindow = 5000L; ApiResponse response = getApi().querySubAccountTransactionStatistics(email, recvWindow); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/AddIpRestrictionForSubAccountApiKeyExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/AddIpRestrictionForSubAccountApiKeyExample.java index c30c95da1..1883b7c44 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/AddIpRestrictionForSubAccountApiKeyExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/AddIpRestrictionForSubAccountApiKeyExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.AddIpRestrictionForSubAccountApiKeyRequest; import com.binance.connector.client.sub_account.rest.model.AddIpRestrictionForSubAccountApiKeyResponse; +import java.io.IOException; /** API examples for ApiManagementApi */ public class AddIpRestrictionForSubAccountApiKeyExample { @@ -29,17 +30,19 @@ public SubAccountRestApi getApi() { /** * Add IP Restriction for Sub-Account API key (For Master Account) (USER_DATA) * - *

Add IP Restriction for Sub-Account API key * You need to enable Enable Spot & Margin - * Trading option for the api key which requests this endpoint Weight: 3000 + *

Add IP Restriction for Sub-Account API key Weight(UID): 3000 Security Type: USER_DATA + * Notes: - You need to enable Enable Spot & Margin Trading option for the api key which + * requests this endpoint * * @throws ApiException if the Api call fails */ - public void addIpRestrictionForSubAccountApiKeyExample() throws ApiException { + public void addIpRestrictionForSubAccountApiKeyExample() throws ApiException, IOException { AddIpRestrictionForSubAccountApiKeyRequest addIpRestrictionForSubAccountApiKeyRequest = new AddIpRestrictionForSubAccountApiKeyRequest(); - addIpRestrictionForSubAccountApiKeyRequest.email("sub-account-email@email.com"); - addIpRestrictionForSubAccountApiKeyRequest.subAccountApiKey(""); - addIpRestrictionForSubAccountApiKeyRequest.status(0L); + addIpRestrictionForSubAccountApiKeyRequest.email("123@test.com"); + addIpRestrictionForSubAccountApiKeyRequest.subAccountApiKey( + "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf"); + addIpRestrictionForSubAccountApiKeyRequest.status(1L); ApiResponse response = getApi().addIpRestrictionForSubAccountApiKey( addIpRestrictionForSubAccountApiKeyRequest); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/CreateSubAccountApiKeyExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/CreateSubAccountApiKeyExample.java new file mode 100644 index 000000000..98245f15f --- /dev/null +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/CreateSubAccountApiKeyExample.java @@ -0,0 +1,50 @@ +package com.binance.connector.client.sub_account.rest.apimanagement; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; +import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; +import com.binance.connector.client.sub_account.rest.model.CreateSubAccountApiKeyRequest; +import com.binance.connector.client.sub_account.rest.model.CreateSubAccountApiKeyResponse; +import java.io.IOException; + +/** API examples for ApiManagementApi */ +public class CreateSubAccountApiKeyExample { + private SubAccountRestApi api; + + public SubAccountRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = + SubAccountRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new SubAccountRestApi(clientConfiguration); + } + return api; + } + + /** + * Create Sub-account API Key (For Master Account) (USER_DATA) + * + *

Create a new API Key for a sub-account. Weight(UID): 3000 Security Type: USER_DATA Notes: + * - `status=2` requires `ipAddress` - `status=3` + * requires `thirdPartyName` - Asset Sub Account is not supported - The caller must + * pass the KYC IP restriction check + * + * @throws ApiException if the Api call fails + */ + public void createSubAccountApiKeyExample() throws ApiException, IOException { + CreateSubAccountApiKeyRequest createSubAccountApiKeyRequest = + new CreateSubAccountApiKeyRequest(); + createSubAccountApiKeyRequest.email("123@test.com"); + createSubAccountApiKeyRequest.apiName("myKey"); + createSubAccountApiKeyRequest.status(2L); + ApiResponse response = + getApi().createSubAccountApiKey(createSubAccountApiKeyRequest); + System.out.println(response.getData()); + } +} diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/DeleteIpListForASubAccountApiKeyExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/DeleteIpListForASubAccountApiKeyExample.java index c3cfdafd0..303539694 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/DeleteIpListForASubAccountApiKeyExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/DeleteIpListForASubAccountApiKeyExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.DeleteIpListForASubAccountApiKeyResponse; +import java.io.IOException; /** API examples for ApiManagementApi */ public class DeleteIpListForASubAccountApiKeyExample { @@ -28,15 +29,16 @@ public SubAccountRestApi getApi() { /** * Delete IP List For a Sub-account API Key (For Master Account) (USER_DATA) * - *

Delete IP List For a Sub-account API Key * You need to enable Enable Spot & Margin - * Trading option for the api key which requests this endpoint Weight: 3000 + *

Delete IP List For a Sub-account API Key Weight(UID): 3000 Security Type: USER_DATA Notes: + * - You need to enable Enable Spot & Margin Trading option for the api key which requests + * this endpoint * * @throws ApiException if the Api call fails */ - public void deleteIpListForASubAccountApiKeyExample() throws ApiException { - String email = "sub-account-email@email.com"; - String subAccountApiKey = ""; - String ipAddress = ""; + public void deleteIpListForASubAccountApiKeyExample() throws ApiException, IOException { + String email = "123@test.com"; + String subAccountApiKey = "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf"; + String ipAddress = "69.210.67.14"; Long recvWindow = 5000L; ApiResponse response = getApi().deleteIpListForASubAccountApiKey( diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/DeleteSubAccountApiKeyExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/DeleteSubAccountApiKeyExample.java new file mode 100644 index 000000000..c554e7724 --- /dev/null +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/DeleteSubAccountApiKeyExample.java @@ -0,0 +1,44 @@ +package com.binance.connector.client.sub_account.rest.apimanagement; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; +import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; +import java.io.IOException; + +/** API examples for ApiManagementApi */ +public class DeleteSubAccountApiKeyExample { + private SubAccountRestApi api; + + public SubAccountRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = + SubAccountRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new SubAccountRestApi(clientConfiguration); + } + return api; + } + + /** + * Delete Sub-account API Key (For Master Account) (USER_DATA) + * + *

Delete an API Key of a sub-account. Weight(UID): 3000 Security Type: USER_DATA Notes: - + * Asset Sub Account is not supported - The caller must pass the KYC IP restriction check + * + * @throws ApiException if the Api call fails + */ + public void deleteSubAccountApiKeyExample() throws ApiException, IOException { + String email = "123@test.com"; + String subAccountApiKey = "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf"; + Long recvWindow = 5000L; + ApiResponse response = + getApi().deleteSubAccountApiKey(email, subAccountApiKey, recvWindow); + System.out.println(response.getData()); + } +} diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/GetIpRestrictionForASubAccountApiKeyExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/GetIpRestrictionForASubAccountApiKeyExample.java index 765a4d3f8..86c45bd90 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/GetIpRestrictionForASubAccountApiKeyExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/GetIpRestrictionForASubAccountApiKeyExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.GetIpRestrictionForASubAccountApiKeyResponse; +import java.io.IOException; /** API examples for ApiManagementApi */ public class GetIpRestrictionForASubAccountApiKeyExample { @@ -28,13 +29,13 @@ public SubAccountRestApi getApi() { /** * Get IP Restriction for a Sub-account API Key (For Master Account) (USER_DATA) * - *

Get IP Restriction for a Sub-account API Key Weight: 3000 + *

Get IP Restriction for a Sub-account API Key Weight(UID): 3000 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getIpRestrictionForASubAccountApiKeyExample() throws ApiException { - String email = "sub-account-email@email.com"; - String subAccountApiKey = ""; + public void getIpRestrictionForASubAccountApiKeyExample() throws ApiException, IOException { + String email = "123@test.com"; + String subAccountApiKey = "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf"; Long recvWindow = 5000L; ApiResponse response = getApi().getIpRestrictionForASubAccountApiKey(email, subAccountApiKey, recvWindow); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/ModifySubAccountApiKeyPermissionExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/ModifySubAccountApiKeyPermissionExample.java new file mode 100644 index 000000000..dad8b9970 --- /dev/null +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/ModifySubAccountApiKeyPermissionExample.java @@ -0,0 +1,49 @@ +package com.binance.connector.client.sub_account.rest.apimanagement; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; +import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; +import com.binance.connector.client.sub_account.rest.model.ModifySubAccountApiKeyPermissionRequest; +import com.binance.connector.client.sub_account.rest.model.ModifySubAccountApiKeyPermissionResponse; +import java.io.IOException; + +/** API examples for ApiManagementApi */ +public class ModifySubAccountApiKeyPermissionExample { + private SubAccountRestApi api; + + public SubAccountRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = + SubAccountRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new SubAccountRestApi(clientConfiguration); + } + return api; + } + + /** + * Modify Sub-account API Key Permission (For Master Account) (USER_DATA) + * + *

Modify the trading permissions of a sub-account API Key. Weight(UID): 3000 Security Type: + * USER_DATA Notes: - Portfolio Margin Retail User is not supported - Asset Sub Account is not + * supported - The caller must pass the KYC IP restriction check + * + * @throws ApiException if the Api call fails + */ + public void modifySubAccountApiKeyPermissionExample() throws ApiException, IOException { + ModifySubAccountApiKeyPermissionRequest modifySubAccountApiKeyPermissionRequest = + new ModifySubAccountApiKeyPermissionRequest(); + modifySubAccountApiKeyPermissionRequest.email("123@test.com"); + modifySubAccountApiKeyPermissionRequest.subAccountApiKey( + "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf"); + ApiResponse response = + getApi().modifySubAccountApiKeyPermission(modifySubAccountApiKeyPermissionRequest); + System.out.println(response.getData()); + } +} diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/QuerySubAccountApiKeyExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/QuerySubAccountApiKeyExample.java new file mode 100644 index 000000000..be98bc44c --- /dev/null +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/apimanagement/QuerySubAccountApiKeyExample.java @@ -0,0 +1,46 @@ +package com.binance.connector.client.sub_account.rest.apimanagement; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; +import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; +import com.binance.connector.client.sub_account.rest.model.QuerySubAccountApiKeyResponse; +import java.io.IOException; + +/** API examples for ApiManagementApi */ +public class QuerySubAccountApiKeyExample { + private SubAccountRestApi api; + + public SubAccountRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = + SubAccountRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new SubAccountRestApi(clientConfiguration); + } + return api; + } + + /** + * Query Sub-account API Key (For Master Account) (USER_DATA) + * + *

Query the API Key list of a sub-account. Weight(UID): 3000 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + public void querySubAccountApiKeyExample() throws ApiException, IOException { + String email = "123@test.com"; + String subAccountApiKey = "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf"; + Long page = 1L; + Long size = 30L; + Long recvWindow = 5000L; + ApiResponse response = + getApi().querySubAccountApiKey(email, subAccountApiKey, page, size, recvWindow); + System.out.println(response.getData()); + } +} diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/FuturesTransferForSubAccountExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/FuturesTransferForSubAccountExample.java index 9ef8a0fb4..035ebb6a6 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/FuturesTransferForSubAccountExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/FuturesTransferForSubAccountExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.FuturesTransferForSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.FuturesTransferForSubAccountResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class FuturesTransferForSubAccountExample { @@ -29,18 +30,19 @@ public SubAccountRestApi getApi() { /** * Futures Transfer for Sub-account (For Master Account) (USER_DATA) * - *

Futures Transfer for Sub-account * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 1 + *

Futures Transfer for Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - You need + * to open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ - public void futuresTransferForSubAccountExample() throws ApiException { + public void futuresTransferForSubAccountExample() throws ApiException, IOException { FuturesTransferForSubAccountRequest futuresTransferForSubAccountRequest = new FuturesTransferForSubAccountRequest(); - futuresTransferForSubAccountRequest.email("sub-account-email@email.com"); - futuresTransferForSubAccountRequest.asset(""); + futuresTransferForSubAccountRequest.email("123@test.com"); + futuresTransferForSubAccountRequest.asset("USDT"); futuresTransferForSubAccountRequest.amount(1.0d); - futuresTransferForSubAccountRequest.type(0L); + futuresTransferForSubAccountRequest.type(1L); ApiResponse response = getApi().futuresTransferForSubAccount(futuresTransferForSubAccountRequest); System.out.println(response.getData()); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsFuturesAccountExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsFuturesAccountExample.java index fc26cf1d7..e9da4ae63 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsFuturesAccountExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsFuturesAccountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.GetDetailOnSubAccountsFuturesAccountResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class GetDetailOnSubAccountsFuturesAccountExample { @@ -28,12 +29,12 @@ public SubAccountRestApi getApi() { /** * Get Detail on Sub-account's Futures Account (For Master Account) (USER_DATA) * - *

Get Detail on Sub-account's Futures Account Weight: 10 + *

Get Detail on Sub-account's Futures Account Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getDetailOnSubAccountsFuturesAccountExample() throws ApiException { - String email = "sub-account-email@email.com"; + public void getDetailOnSubAccountsFuturesAccountExample() throws ApiException, IOException { + String email = "123@test.com"; Long recvWindow = 5000L; ApiResponse response = getApi().getDetailOnSubAccountsFuturesAccount(email, recvWindow); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsFuturesAccountV2Example.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsFuturesAccountV2Example.java index 15897721a..ca44c70ca 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsFuturesAccountV2Example.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsFuturesAccountV2Example.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.GetDetailOnSubAccountsFuturesAccountV2Response; +import java.io.IOException; /** API examples for AssetManagementApi */ public class GetDetailOnSubAccountsFuturesAccountV2Example { @@ -28,13 +29,13 @@ public SubAccountRestApi getApi() { /** * Get Detail on Sub-account's Futures Account V2 (For Master Account) (USER_DATA) * - *

Get Detail on Sub-account's Futures Account Weight: 1 + *

Get Detail on Sub-account's Futures Account Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getDetailOnSubAccountsFuturesAccountV2Example() throws ApiException { - String email = "sub-account-email@email.com"; - Long futuresType = 0L; + public void getDetailOnSubAccountsFuturesAccountV2Example() throws ApiException, IOException { + String email = "123@test.com"; + Long futuresType = 1L; Long recvWindow = 5000L; ApiResponse response = getApi().getDetailOnSubAccountsFuturesAccountV2(email, futuresType, recvWindow); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsMarginAccountExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsMarginAccountExample.java index 29b28b704..7abb0ad37 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsMarginAccountExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetDetailOnSubAccountsMarginAccountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.GetDetailOnSubAccountsMarginAccountResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class GetDetailOnSubAccountsMarginAccountExample { @@ -28,12 +29,12 @@ public SubAccountRestApi getApi() { /** * Get Detail on Sub-account's Margin Account (For Master Account) (USER_DATA) * - *

Get Detail on Sub-account's Margin Account Weight: 10 + *

Get Detail on Sub-account's Margin Account Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getDetailOnSubAccountsMarginAccountExample() throws ApiException { - String email = "sub-account-email@email.com"; + public void getDetailOnSubAccountsMarginAccountExample() throws ApiException, IOException { + String email = "123@test.com"; Long recvWindow = 5000L; ApiResponse response = getApi().getDetailOnSubAccountsMarginAccount(email, recvWindow); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetMovePositionHistoryForSubAccountExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetMovePositionHistoryForSubAccountExample.java index 0ebcf373c..8184bd0e5 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetMovePositionHistoryForSubAccountExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetMovePositionHistoryForSubAccountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.GetMovePositionHistoryForSubAccountResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class GetMovePositionHistoryForSubAccountExample { @@ -28,24 +29,25 @@ public SubAccountRestApi getApi() { /** * Get Move Position History for Sub-account (For Master Account) (USER_DATA) * - *

Query move position history * If `startTime` and `endTime` not sent, - * return records of the last 90 days by default with 1000 maximum limits * If - * `startTime` is sent and `endTime` is not sent, return records of - * [max(startTime, now-90d), now]. * If `startTime` is not sent and - * `endTime` is sent, return records of [max(now,endTime-90d), endTime]. Weight: 1 + *

Query move position history Weight(IP): 1 Security Type: USER_DATA Notes: - If + * `startTime` and `endTime` are both omitted, records from the last 90 days + * are returned by default (up to 1000 records). - If `startTime` is sent and + * `endTime` is omitted, records in `[max(startTime, now-90d), now]` are + * returned. - If `startTime` is omitted and `endTime` is sent, records in + * `[max(now, endTime-90d), endTime]` are returned. * * @throws ApiException if the Api call fails */ - public void getMovePositionHistoryForSubAccountExample() throws ApiException { - String symbol = ""; - Long page = 0L; - Long row = 0L; + public void getMovePositionHistoryForSubAccountExample() throws ApiException, IOException { + String symbol = "BTCUSDT"; + Long page = 1L; + Long rows = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; ApiResponse response = getApi().getMovePositionHistoryForSubAccount( - symbol, page, row, startTime, endTime, recvWindow); + symbol, page, rows, startTime, endTime, recvWindow); System.out.println(response.getData()); } } diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSubAccountDepositAddressExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSubAccountDepositAddressExample.java index 04b00056d..334f18c0e 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSubAccountDepositAddressExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSubAccountDepositAddressExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.GetSubAccountDepositAddressResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class GetSubAccountDepositAddressExample { @@ -28,14 +29,14 @@ public SubAccountRestApi getApi() { /** * Get Sub-account Deposit Address (For Master Account) (USER_DATA) * - *

Fetch sub-account deposit address * `amount` needs to be sent if using LIGHTNING - * network Weight: 1 + *

Fetch sub-account deposit address Weight(IP): 1 Security Type: USER_DATA Notes: - + * `amount` needs to be sent if using LIGHTNING network * * @throws ApiException if the Api call fails */ - public void getSubAccountDepositAddressExample() throws ApiException { - String email = "sub-account-email@email.com"; - String coin = ""; + public void getSubAccountDepositAddressExample() throws ApiException, IOException { + String email = "123@test.com"; + String coin = "BTC"; String network = ""; Double amount = 1.0d; Long recvWindow = 5000L; diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSubAccountDepositHistoryExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSubAccountDepositHistoryExample.java index 1c8be6ac1..b4582254a 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSubAccountDepositHistoryExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSubAccountDepositHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.GetSubAccountDepositHistoryResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class GetSubAccountDepositHistoryExample { @@ -28,13 +29,14 @@ public SubAccountRestApi getApi() { /** * Get Sub-account Deposit History (For Master Account) (USER_DATA) * - *

Fetch sub-account deposit history Weight: 1 + *

Fetch sub-account deposit history Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getSubAccountDepositHistoryExample() throws ApiException { - String email = "sub-account-email@email.com"; - String coin = ""; + public void getSubAccountDepositHistoryExample() throws ApiException, IOException { + String email = "123@test.com"; + Boolean includeSource = false; + String coin = "BTC"; Long status = 0L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; @@ -45,6 +47,7 @@ public void getSubAccountDepositHistoryExample() throws ApiException { ApiResponse response = getApi().getSubAccountDepositHistory( email, + includeSource, coin, status, startTime, diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsFuturesAccountExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsFuturesAccountExample.java index 7d3ba459f..5b2fd4717 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsFuturesAccountExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsFuturesAccountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.GetSummaryOfSubAccountsFuturesAccountResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class GetSummaryOfSubAccountsFuturesAccountExample { @@ -28,13 +29,13 @@ public SubAccountRestApi getApi() { /** * Get Summary of Sub-account's Futures Account (For Master Account) (USER_DATA) * - *

Get Summary of Sub-account's Futures Account Weight: 1 + *

Get Summary of Sub-account's Futures Account Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getSummaryOfSubAccountsFuturesAccountExample() throws ApiException { - Long page = 0L; - Long limit = 0L; + public void getSummaryOfSubAccountsFuturesAccountExample() throws ApiException, IOException { + Long page = 1L; + Long limit = 1L; Long recvWindow = 5000L; ApiResponse response = getApi().getSummaryOfSubAccountsFuturesAccount(page, limit, recvWindow); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsFuturesAccountV2Example.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsFuturesAccountV2Example.java index 2ae4fd197..5835f7ce7 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsFuturesAccountV2Example.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsFuturesAccountV2Example.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.GetSummaryOfSubAccountsFuturesAccountV2Response; +import java.io.IOException; /** API examples for AssetManagementApi */ public class GetSummaryOfSubAccountsFuturesAccountV2Example { @@ -28,14 +29,14 @@ public SubAccountRestApi getApi() { /** * Get Summary of Sub-account's Futures Account V2 (For Master Account) (USER_DATA) * - *

Get Summary of Sub-account's Futures Account Weight: 10 + *

Get Summary of Sub-account's Futures Account Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getSummaryOfSubAccountsFuturesAccountV2Example() throws ApiException { - Long futuresType = 0L; + public void getSummaryOfSubAccountsFuturesAccountV2Example() throws ApiException, IOException { + Long futuresType = 1L; Long page = 1L; - Long limit = 1L; + Long limit = 10L; Long recvWindow = 5000L; ApiResponse response = getApi().getSummaryOfSubAccountsFuturesAccountV2( diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsMarginAccountExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsMarginAccountExample.java index 6c2c8c82c..9400f0245 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsMarginAccountExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/GetSummaryOfSubAccountsMarginAccountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.GetSummaryOfSubAccountsMarginAccountResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class GetSummaryOfSubAccountsMarginAccountExample { @@ -28,11 +29,11 @@ public SubAccountRestApi getApi() { /** * Get Summary of Sub-account's Margin Account (For Master Account) (USER_DATA) * - *

Get Summary of Sub-account's Margin Account Weight: 10 + *

Get Summary of Sub-account's Margin Account Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getSummaryOfSubAccountsMarginAccountExample() throws ApiException { + public void getSummaryOfSubAccountsMarginAccountExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getSummaryOfSubAccountsMarginAccount(recvWindow); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/MarginTransferForSubAccountExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/MarginTransferForSubAccountExample.java index bc7ca86af..00e6d48ab 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/MarginTransferForSubAccountExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/MarginTransferForSubAccountExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.MarginTransferForSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.MarginTransferForSubAccountResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class MarginTransferForSubAccountExample { @@ -29,18 +30,19 @@ public SubAccountRestApi getApi() { /** * Margin Transfer for Sub-account (For Master Account) (USER_DATA) * - *

Margin Transfer for Sub-account * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 1 + *

Margin Transfer for Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: - You need + * to open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ - public void marginTransferForSubAccountExample() throws ApiException { + public void marginTransferForSubAccountExample() throws ApiException, IOException { MarginTransferForSubAccountRequest marginTransferForSubAccountRequest = new MarginTransferForSubAccountRequest(); - marginTransferForSubAccountRequest.email("sub-account-email@email.com"); - marginTransferForSubAccountRequest.asset(""); + marginTransferForSubAccountRequest.email("123@test.com"); + marginTransferForSubAccountRequest.asset("BTC"); marginTransferForSubAccountRequest.amount(1.0d); - marginTransferForSubAccountRequest.type(0L); + marginTransferForSubAccountRequest.type(1L); ApiResponse response = getApi().marginTransferForSubAccount(marginTransferForSubAccountRequest); System.out.println(response.getData()); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/MovePositionForSubAccountExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/MovePositionForSubAccountExample.java index a81095fe7..542b0b33d 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/MovePositionForSubAccountExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/MovePositionForSubAccountExample.java @@ -9,6 +9,8 @@ import com.binance.connector.client.sub_account.rest.model.MovePositionForSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.MovePositionForSubAccountResponse; import com.binance.connector.client.sub_account.rest.model.OrderArgs; +import com.binance.connector.client.sub_account.rest.model.ProductType; +import java.io.IOException; /** API examples for AssetManagementApi */ public class MovePositionForSubAccountExample { @@ -30,24 +32,25 @@ public SubAccountRestApi getApi() { /** * Move Position for Sub-account (For Master Account) (USER_DATA) * - *

Move position between sub-master, master-sub, or sub-sub accounts when necessary * You - * need to Enable Trading permission for the API Key which requests this endpoint. * This - * function only support VIP level 7-9. * Only master account can use the function * Quantity - * should be positive number only * The function support normal account, PM PRO and PM PRO SPAN. - * * Only support for from account has positions * For all orders in the same orderArgs request, - * if any symbol’s total close position quantity is bigger than the symbol’s current position - * quantity, all batch orders in the same list will fail simultaneously. * Only support cross - * margin mode * The price for move position is MarkPrice only. * Not support for MSA. * Not - * support for the symbol under Reduce-Only. Weight: 1 + *

Move position between sub-master, master-sub, or sub-sub accounts when necessary + * Weight(IP): 1 Security Type: USER_DATA Notes: - You need to enable the `Trading` + * permission for the API key used to call this endpoint. - This function is only available for + * VIP levels 7-9. - Only master accounts can call this endpoint. - `quantity` must be + * a positive number. - Supported account types: normal account, PM PRO, PM PRO SPAN, and PM + * Retail. - The source account must have positions. - For orders in the same + * `orderArgs` request, if any symbol's total close position quantity exceeds + * current position quantity, all orders in that batch fail. - Only cross margin mode is + * supported. - The move position price supports `MARK_PRICE` only. - MSA is not + * supported. - Symbols configured with `Reduce-Only` are not supported. * * @throws ApiException if the Api call fails */ - public void movePositionForSubAccountExample() throws ApiException { + public void movePositionForSubAccountExample() throws ApiException, IOException { MovePositionForSubAccountRequest movePositionForSubAccountRequest = new MovePositionForSubAccountRequest(); - movePositionForSubAccountRequest.fromUserEmail(""); - movePositionForSubAccountRequest.toUserEmail(""); - movePositionForSubAccountRequest.productType(""); + movePositionForSubAccountRequest.fromUserEmail("testFrom@google.com"); + movePositionForSubAccountRequest.toUserEmail("testTo@google.com"); + movePositionForSubAccountRequest.productType(ProductType.UM); movePositionForSubAccountRequest.orderArgs(new OrderArgs()); ApiResponse response = getApi().movePositionForSubAccount(movePositionForSubAccountRequest); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountAssetsAssetManagementExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountAssetsAssetManagementExample.java index d38f4dd65..01b194643 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountAssetsAssetManagementExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountAssetsAssetManagementExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.QuerySubAccountAssetsAssetManagementResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class QuerySubAccountAssetsAssetManagementExample { @@ -26,14 +27,14 @@ public SubAccountRestApi getApi() { } /** - * Query Sub-account Assets (For Master Account) (USER_DATA) + * Query Sub-account Assets V4 (For Master Account) (USER_DATA) * - *

Fetch sub-account assets Weight: 60 + *

Fetch sub-account assets Weight(UID): 60 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void querySubAccountAssetsAssetManagementExample() throws ApiException { - String email = "sub-account-email@email.com"; + public void querySubAccountAssetsAssetManagementExample() throws ApiException, IOException { + String email = "123@test.com"; Long recvWindow = 5000L; ApiResponse response = getApi().querySubAccountAssetsAssetManagement(email, recvWindow); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountAssetsExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountAssetsExample.java index e91ad2fb8..3e3b19b33 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountAssetsExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountAssetsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.QuerySubAccountAssetsResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class QuerySubAccountAssetsExample { @@ -28,12 +29,12 @@ public SubAccountRestApi getApi() { /** * Query Sub-account Assets (For Master Account) (USER_DATA) * - *

Fetch sub-account assets Weight: 60 + *

Fetch sub-account assets Weight(UID): 60 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void querySubAccountAssetsExample() throws ApiException { - String email = "sub-account-email@email.com"; + public void querySubAccountAssetsExample() throws ApiException, IOException { + String email = "123@test.com"; Long recvWindow = 5000L; ApiResponse response = getApi().querySubAccountAssets(email, recvWindow); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountFuturesAssetTransferHistoryExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountFuturesAssetTransferHistoryExample.java index b5c13c8c4..b1e384014 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountFuturesAssetTransferHistoryExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountFuturesAssetTransferHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.QuerySubAccountFuturesAssetTransferHistoryResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class QuerySubAccountFuturesAssetTransferHistoryExample { @@ -28,17 +29,18 @@ public SubAccountRestApi getApi() { /** * Query Sub-account Futures Asset Transfer History (For Master Account) (USER_DATA) * - *

Query Sub-account Futures Asset Transfer History Weight: 1 + *

Query Sub-account Futures Asset Transfer History Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void querySubAccountFuturesAssetTransferHistoryExample() throws ApiException { - String email = "sub-account-email@email.com"; - Long futuresType = 0L; + public void querySubAccountFuturesAssetTransferHistoryExample() + throws ApiException, IOException { + String email = "123@test.com"; + Long futuresType = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long page = 1L; - Long limit = 1L; + Long limit = 10L; Long recvWindow = 5000L; ApiResponse response = getApi().querySubAccountFuturesAssetTransferHistory( diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountSpotAssetTransferHistoryExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountSpotAssetTransferHistoryExample.java index d1004242d..e2f82a6cd 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountSpotAssetTransferHistoryExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountSpotAssetTransferHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.QuerySubAccountSpotAssetTransferHistoryResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class QuerySubAccountSpotAssetTransferHistoryExample { @@ -28,18 +29,20 @@ public SubAccountRestApi getApi() { /** * Query Sub-account Spot Asset Transfer History (For Master Account) (USER_DATA) * - *

Query Sub-account Spot Asset Transfer History * fromEmail and toEmail cannot be sent at - * the same time. * Return fromEmail equal master account email by default. Weight: 1 + *

Query Sub-account Spot Asset Transfer History Weight(IP): 1 Security Type: USER_DATA + * Notes: - `fromEmail` and `toEmail` cannot be sent at the same time. - If + * both `fromEmail` and `toEmail` are omitted, records with + * `fromEmail` equal to the master account are returned by default. * * @throws ApiException if the Api call fails */ - public void querySubAccountSpotAssetTransferHistoryExample() throws ApiException { - String fromEmail = ""; - String toEmail = ""; + public void querySubAccountSpotAssetTransferHistoryExample() throws ApiException, IOException { + String fromEmail = "aaa@test.com"; + String toEmail = "bbb@test.com"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long page = 1L; - Long limit = 1L; + Long limit = 10L; Long recvWindow = 5000L; ApiResponse response = getApi().querySubAccountSpotAssetTransferHistory( diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountSpotAssetsSummaryExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountSpotAssetsSummaryExample.java index 6866e9bba..1757c1347 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountSpotAssetsSummaryExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QuerySubAccountSpotAssetsSummaryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.QuerySubAccountSpotAssetsSummaryResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class QuerySubAccountSpotAssetsSummaryExample { @@ -28,12 +29,12 @@ public SubAccountRestApi getApi() { /** * Query Sub-account Spot Assets Summary (For Master Account) (USER_DATA) * - *

Get BTC valued asset summary of subaccounts. Weight: 1 + *

Get BTC valued asset summary of subaccounts. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void querySubAccountSpotAssetsSummaryExample() throws ApiException { - String email = ""; + public void querySubAccountSpotAssetsSummaryExample() throws ApiException, IOException { + String email = "123@test.com"; Long page = 1L; Long size = 10L; Long recvWindow = 5000L; diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QueryUniversalTransferHistoryExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QueryUniversalTransferHistoryExample.java index 716702c75..a6858b84c 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QueryUniversalTransferHistoryExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/QueryUniversalTransferHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.QueryUniversalTransferHistoryResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class QueryUniversalTransferHistoryExample { @@ -28,21 +29,23 @@ public SubAccountRestApi getApi() { /** * Query Universal Transfer History (For Master Account) (USER_DATA) * - *

Query Universal Transfer History * fromEmail and toEmail cannot be sent at the same time. - * * Return fromEmail equal master account email by default. * The query time period must be - * less than 7 days. * If startTime and endTime not sent, return records of the last 7 days by - * default. Weight: 1 + *

Query Universal Transfer History Weight(IP): 1 Security Type: USER_DATA Notes: - + * `fromEmail` and `toEmail` cannot be sent at the same time. - If both + * `fromEmail` and `toEmail` are omitted, records with `fromEmail` + * equal to the master account are returned by default. - The query time range must be less than + * 7 days. - If `startTime` and `endTime` are omitted, records from the last + * 7 days are returned by default. * * @throws ApiException if the Api call fails */ - public void queryUniversalTransferHistoryExample() throws ApiException { - String fromEmail = ""; - String toEmail = ""; + public void queryUniversalTransferHistoryExample() throws ApiException, IOException { + String fromEmail = "abctest@gmail.com"; + String toEmail = "deftest@gmail.com"; String clientTranId = "1"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long page = 1L; - Long limit = 1L; + Long limit = 10L; Long recvWindow = 5000L; ApiResponse response = getApi().queryUniversalTransferHistory( diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/SubAccountFuturesAssetTransferExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/SubAccountFuturesAssetTransferExample.java index 76ced1d6e..233c83246 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/SubAccountFuturesAssetTransferExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/SubAccountFuturesAssetTransferExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.SubAccountFuturesAssetTransferRequest; import com.binance.connector.client.sub_account.rest.model.SubAccountFuturesAssetTransferResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class SubAccountFuturesAssetTransferExample { @@ -29,18 +30,19 @@ public SubAccountRestApi getApi() { /** * Sub-account Futures Asset Transfer (For Master Account) (USER_DATA) * - *

Sub-account Futures Asset Transfer * Master account can transfer max 2000 times a minute * - * There must be sufficient margin balance in futures wallet to execute transferring. Weight: 1 + *

Sub-account Futures Asset Transfer Weight(IP): 1 Security Type: USER_DATA Notes: - A + * master account can transfer at most 2000 times per minute. - The futures wallet must have + * sufficient margin balance to execute the transfer. * * @throws ApiException if the Api call fails */ - public void subAccountFuturesAssetTransferExample() throws ApiException { + public void subAccountFuturesAssetTransferExample() throws ApiException, IOException { SubAccountFuturesAssetTransferRequest subAccountFuturesAssetTransferRequest = new SubAccountFuturesAssetTransferRequest(); - subAccountFuturesAssetTransferRequest.fromEmail(""); - subAccountFuturesAssetTransferRequest.toEmail(""); - subAccountFuturesAssetTransferRequest.futuresType(0L); - subAccountFuturesAssetTransferRequest.asset(""); + subAccountFuturesAssetTransferRequest.fromEmail("abc@test.com"); + subAccountFuturesAssetTransferRequest.toEmail("def@test.com"); + subAccountFuturesAssetTransferRequest.futuresType(1L); + subAccountFuturesAssetTransferRequest.asset("BTC"); subAccountFuturesAssetTransferRequest.amount(1.0d); ApiResponse response = getApi().subAccountFuturesAssetTransfer(subAccountFuturesAssetTransferRequest); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/SubAccountTransferHistoryExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/SubAccountTransferHistoryExample.java index 63272865e..7a3b0ad0f 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/SubAccountTransferHistoryExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/SubAccountTransferHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.SubAccountTransferHistoryResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class SubAccountTransferHistoryExample { @@ -28,18 +29,19 @@ public SubAccountRestApi getApi() { /** * Sub-account Transfer History (For Sub-account) (USER_DATA) * - *

Sub-account Transfer History * If type is not sent, the records of type 2: transfer out - * will be returned by default. * If startTime and endTime are not sent, the recent 30-day data - * will be returned. Weight: 1 + *

Sub-account Transfer History Weight(IP): 1 Security Type: USER_DATA Notes: - If + * `type` is not sent, records of type `2` (transfer out) are returned by + * default. - If `startTime` and `endTime` are not sent, data from the most + * recent 30 days is returned. * * @throws ApiException if the Api call fails */ - public void subAccountTransferHistoryExample() throws ApiException { - String asset = ""; - Long type = 0L; + public void subAccountTransferHistoryExample() throws ApiException, IOException { + String asset = "BTC"; + Long type = 1L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 1L; + Long limit = 10L; Boolean returnFailHistory = false; Long recvWindow = 5000L; ApiResponse response = diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/TransferToMasterExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/TransferToMasterExample.java index a7f14be26..446d13512 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/TransferToMasterExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/TransferToMasterExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.TransferToMasterRequest; import com.binance.connector.client.sub_account.rest.model.TransferToMasterResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class TransferToMasterExample { @@ -29,14 +30,14 @@ public SubAccountRestApi getApi() { /** * Transfer to Master (For Sub-account) (USER_DATA) * - *

Transfer to Master * You need to open Enable Spot & Margin Trading permission for the - * API Key which requests this endpoint. Weight: 1 + *

Transfer to Master Weight(IP): 1 Security Type: USER_DATA Notes: - You need to open Enable + * Spot & Margin Trading permission for the API Key which requests this endpoint. * * @throws ApiException if the Api call fails */ - public void transferToMasterExample() throws ApiException { + public void transferToMasterExample() throws ApiException, IOException { TransferToMasterRequest transferToMasterRequest = new TransferToMasterRequest(); - transferToMasterRequest.asset(""); + transferToMasterRequest.asset("BTC"); transferToMasterRequest.amount(1.0d); ApiResponse response = getApi().transferToMaster(transferToMasterRequest); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/TransferToSubAccountOfSameMasterExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/TransferToSubAccountOfSameMasterExample.java index 237c13d19..bd344a7ea 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/TransferToSubAccountOfSameMasterExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/TransferToSubAccountOfSameMasterExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.TransferToSubAccountOfSameMasterRequest; import com.binance.connector.client.sub_account.rest.model.TransferToSubAccountOfSameMasterResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class TransferToSubAccountOfSameMasterExample { @@ -29,16 +30,17 @@ public SubAccountRestApi getApi() { /** * Transfer to Sub-account of Same Master (For Sub-account) (USER_DATA) * - *

Transfer to Sub-account of Same Master * You need to open Enable Spot & Margin Trading - * permission for the API Key which requests this endpoint. Weight: 1 + *

Transfer to Sub-account of Same Master Weight(IP): 1 Security Type: USER_DATA Notes: - You + * need to open Enable Spot & Margin Trading permission for the API Key which requests this + * endpoint. * * @throws ApiException if the Api call fails */ - public void transferToSubAccountOfSameMasterExample() throws ApiException { + public void transferToSubAccountOfSameMasterExample() throws ApiException, IOException { TransferToSubAccountOfSameMasterRequest transferToSubAccountOfSameMasterRequest = new TransferToSubAccountOfSameMasterRequest(); - transferToSubAccountOfSameMasterRequest.toEmail(""); - transferToSubAccountOfSameMasterRequest.asset(""); + transferToSubAccountOfSameMasterRequest.toEmail("abc@test.com"); + transferToSubAccountOfSameMasterRequest.asset("BTC"); transferToSubAccountOfSameMasterRequest.amount(1.0d); ApiResponse response = getApi().transferToSubAccountOfSameMaster(transferToSubAccountOfSameMasterRequest); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/UniversalTransferExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/UniversalTransferExample.java index c8da7e944..c1eec0f68 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/UniversalTransferExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/assetmanagement/UniversalTransferExample.java @@ -6,8 +6,11 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; +import com.binance.connector.client.sub_account.rest.model.FromAccountType; +import com.binance.connector.client.sub_account.rest.model.ToAccountType; import com.binance.connector.client.sub_account.rest.model.UniversalTransferRequest; import com.binance.connector.client.sub_account.rest.model.UniversalTransferResponse; +import java.io.IOException; /** API examples for AssetManagementApi */ public class UniversalTransferExample { @@ -29,27 +32,28 @@ public SubAccountRestApi getApi() { /** * Universal Transfer (For Master Account) (USER_DATA) * - *

Universal Transfer * You need to enable \"internal transfer\" option for the api - * key which requests this endpoint. * Transfer from master account by default if fromEmail is - * not sent. * Transfer to master account by default if toEmail is not sent. * At least either - * fromEmail or toEmail need to be sent when the fromAccountType and the toAccountType are the - * same. * Supported transfer scenarios: * `SPOT` transfer to `SPOT`, - * `USDT_FUTURE`, `COIN_FUTURE` (regardless of master or sub) * - * `SPOT`, `USDT_FUTURE`, `COIN_FUTURE` transfer to - * `SPOT` (regardless of master or sub) * Master account `SPOT` transfer to - * sub-account `MARGIN(Cross)`, `ISOLATED_MARGIN` * Sub-account - * `MARGIN(Cross)`, `ISOLATED_MARGIN` transfer to master account - * `SPOT` * Sub-account `MARGIN(Cross)` transfer to Sub-account - * `MARGIN(Cross)` * `ALPHA` to `ALPHA` (regardless of master or - * sub) Weight: 360 + *

Universal Transfer Weight(IP): 1 Weight(UID): 360 Security Type: USER_DATA Notes: - You + * need to enable the `internal transfer` option for the API key used to call this + * endpoint. - If `fromEmail` is not sent, transfer out from the master account by + * default. - If `toEmail` is not sent, transfer into the master account by default. - + * When `fromAccountType` and `toAccountType` are the same, at least one of + * `fromEmail` or `toEmail` must be sent. - Supported transfer scenarios: - + * `SPOT` -> `SPOT` / `USDT_FUTURE` / `COIN_FUTURE` + * (master or sub-account). - `SPOT` / `USDT_FUTURE` / + * `COIN_FUTURE` -> `SPOT` (master or sub-account). - Master account + * `SPOT` -> sub-account `MARGIN(Cross)` / `ISOLATED_MARGIN`. - + * Sub-account `MARGIN(Cross)` / `ISOLATED_MARGIN` -> master account + * `SPOT`. - Sub-account `MARGIN(Cross)` -> sub-account + * `MARGIN(Cross)`. - `ALPHA` -> `ALPHA` (master or + * sub-account). * * @throws ApiException if the Api call fails */ - public void universalTransferExample() throws ApiException { + public void universalTransferExample() throws ApiException, IOException { UniversalTransferRequest universalTransferRequest = new UniversalTransferRequest(); - universalTransferRequest.fromAccountType(""); - universalTransferRequest.toAccountType(""); - universalTransferRequest.asset(""); + universalTransferRequest.fromAccountType(FromAccountType.SPOT); + universalTransferRequest.toAccountType(ToAccountType.SPOT); + universalTransferRequest.asset("BTC"); universalTransferRequest.amount(1.0d); ApiResponse response = getApi().universalTransfer(universalTransferRequest); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/DepositAssetsIntoTheManagedSubAccountExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/DepositAssetsIntoTheManagedSubAccountExample.java index 8e1aa7ee2..6126f448b 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/DepositAssetsIntoTheManagedSubAccountExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/DepositAssetsIntoTheManagedSubAccountExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.DepositAssetsIntoTheManagedSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.DepositAssetsIntoTheManagedSubAccountResponse; +import java.io.IOException; /** API examples for ManagedSubAccountApi */ public class DepositAssetsIntoTheManagedSubAccountExample { @@ -29,16 +30,17 @@ public SubAccountRestApi getApi() { /** * Deposit Assets Into The Managed Sub-account (For Investor Master Account) (USER_DATA) * - *

Deposit Assets Into The Managed Sub-account * You need to enable `Enable Spot & - * Margin Trading` option for the api key which requests this endpoint Weight: 1 + *

Deposit Assets Into The Managed Sub-account Weight(IP): 1 Security Type: USER_DATA Notes: + * - You need to enable `Enable Spot & Margin Trading` option for the api key + * which requests this endpoint * * @throws ApiException if the Api call fails */ - public void depositAssetsIntoTheManagedSubAccountExample() throws ApiException { + public void depositAssetsIntoTheManagedSubAccountExample() throws ApiException, IOException { DepositAssetsIntoTheManagedSubAccountRequest depositAssetsIntoTheManagedSubAccountRequest = new DepositAssetsIntoTheManagedSubAccountRequest(); - depositAssetsIntoTheManagedSubAccountRequest.toEmail(""); - depositAssetsIntoTheManagedSubAccountRequest.asset(""); + depositAssetsIntoTheManagedSubAccountRequest.toEmail("abc@test.com"); + depositAssetsIntoTheManagedSubAccountRequest.asset("BTC"); depositAssetsIntoTheManagedSubAccountRequest.amount(1.0d); ApiResponse response = getApi().depositAssetsIntoTheManagedSubAccount( diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/GetManagedSubAccountDepositAddressExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/GetManagedSubAccountDepositAddressExample.java index 2a489f6e5..0a0394e0e 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/GetManagedSubAccountDepositAddressExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/GetManagedSubAccountDepositAddressExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.GetManagedSubAccountDepositAddressResponse; +import java.io.IOException; /** API examples for ManagedSubAccountApi */ public class GetManagedSubAccountDepositAddressExample { @@ -28,16 +29,17 @@ public SubAccountRestApi getApi() { /** * Get Managed Sub-account Deposit Address (For Investor Master Account) (USER_DATA) * - *

Get investor's managed sub-account deposit address. * If `network` is not - * send, return with default `network` of the `coin`. * * `amount` - * needs to be sent if using LIGHTNING network Weight: 1 + *

Get investor's managed sub-account deposit address. Weight(UID): 1 Security Type: + * USER_DATA Notes: - If `network` is not sent, the default `network` for + * the `coin` is returned. - When using `LIGHTNING`, `amount` must + * be provided. * * @throws ApiException if the Api call fails */ - public void getManagedSubAccountDepositAddressExample() throws ApiException { - String email = "sub-account-email@email.com"; - String coin = ""; - String network = ""; + public void getManagedSubAccountDepositAddressExample() throws ApiException, IOException { + String email = "abc@test.com"; + String coin = "USDT"; + String network = "LIGHTNING"; Double amount = 1.0d; Long recvWindow = 5000L; ApiResponse response = diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountAssetDetailsExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountAssetDetailsExample.java index a24190fce..b49935d5e 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountAssetDetailsExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountAssetDetailsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountAssetDetailsResponse; +import java.io.IOException; /** API examples for ManagedSubAccountApi */ public class QueryManagedSubAccountAssetDetailsExample { @@ -28,12 +29,12 @@ public SubAccountRestApi getApi() { /** * Query Managed Sub-account Asset Details (For Investor Master Account) (USER_DATA) * - *

Query Managed Sub-account Asset Details Weight: 1 + *

Query Managed Sub-account Asset Details Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryManagedSubAccountAssetDetailsExample() throws ApiException { - String email = "sub-account-email@email.com"; + public void queryManagedSubAccountAssetDetailsExample() throws ApiException, IOException { + String email = "abc@test.com"; Long recvWindow = 5000L; ApiResponse response = getApi().queryManagedSubAccountAssetDetails(email, recvWindow); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountFuturesAssetDetailsExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountFuturesAssetDetailsExample.java index 4df536a44..01ad9d794 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountFuturesAssetDetailsExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountFuturesAssetDetailsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountFuturesAssetDetailsResponse; +import java.io.IOException; /** API examples for ManagedSubAccountApi */ public class QueryManagedSubAccountFuturesAssetDetailsExample { @@ -28,13 +29,15 @@ public SubAccountRestApi getApi() { /** * Query Managed Sub-account Futures Asset Details (For Investor Master Account) (USER_DATA) * - *

Investor can use this api to query managed sub account futures asset details Weight: 60 + *

Investor can use this api to query managed sub account futures asset details Weight(UID): + * 60 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryManagedSubAccountFuturesAssetDetailsExample() throws ApiException { - String email = "sub-account-email@email.com"; - String accountType = ""; + public void queryManagedSubAccountFuturesAssetDetailsExample() + throws ApiException, IOException { + String email = "abc@test.com"; + String accountType = "MARGIN"; ApiResponse response = getApi().queryManagedSubAccountFuturesAssetDetails(email, accountType); System.out.println(response.getData()); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountListExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountListExample.java index 8ac9d8fad..6942002b4 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountListExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountListResponse; +import java.io.IOException; /** API examples for ManagedSubAccountApi */ public class QueryManagedSubAccountListExample { @@ -28,14 +29,14 @@ public SubAccountRestApi getApi() { /** * Query Managed Sub-account List (For Investor) (USER_DATA) * - *

Get investor's managed sub-account list. Weight: 60 + *

Get investor's managed sub-account list. Weight(UID): 60 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryManagedSubAccountListExample() throws ApiException { - String email = ""; + public void queryManagedSubAccountListExample() throws ApiException, IOException { + String email = "abc@test.com"; Long page = 1L; - Long limit = 1L; + Long limit = 10L; Long recvWindow = 5000L; ApiResponse response = getApi().queryManagedSubAccountList(email, page, limit, recvWindow); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountMarginAssetDetailsExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountMarginAssetDetailsExample.java index 6e12b13d5..3cb5086c4 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountMarginAssetDetailsExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountMarginAssetDetailsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountMarginAssetDetailsResponse; +import java.io.IOException; /** API examples for ManagedSubAccountApi */ public class QueryManagedSubAccountMarginAssetDetailsExample { @@ -28,13 +29,14 @@ public SubAccountRestApi getApi() { /** * Query Managed Sub-account Margin Asset Details (For Investor Master Account) (USER_DATA) * - *

Investor can use this api to query managed sub account margin asset details Weight: 1 + *

Investor can use this api to query managed sub account margin asset details Weight(IP): 1 + * Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryManagedSubAccountMarginAssetDetailsExample() throws ApiException { - String email = "sub-account-email@email.com"; - String accountType = ""; + public void queryManagedSubAccountMarginAssetDetailsExample() throws ApiException, IOException { + String email = "abc@test.com"; + String accountType = "MARGIN"; ApiResponse response = getApi().queryManagedSubAccountMarginAssetDetails(email, accountType); System.out.println(response.getData()); diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountSnapshotExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountSnapshotExample.java index e084b1393..791cad652 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountSnapshotExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountSnapshotExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; +import com.binance.connector.client.sub_account.rest.model.OrderType; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountSnapshotResponse; +import java.io.IOException; /** API examples for ManagedSubAccountApi */ public class QueryManagedSubAccountSnapshotExample { @@ -28,18 +30,19 @@ public SubAccountRestApi getApi() { /** * Query Managed Sub-account Snapshot (For Investor Master Account) (USER_DATA) * - *

Query Managed Sub-account Snapshot * The query time period must be less then 30 days * - * Support query within the last one month only * If startTimeand endTime not sent, return - * records of the last 7 days by default Weight: 2400 + *

Query Managed Sub-account Snapshot Weight(IP): 2400 Security Type: USER_DATA Notes: - The + * query time range must be less than 30 days. - Only data from the most recent month is + * supported. - If `startTime` and `endTime` are omitted, records from the + * last 7 days are returned by default. * * @throws ApiException if the Api call fails */ - public void queryManagedSubAccountSnapshotExample() throws ApiException { - String email = "sub-account-email@email.com"; - String type = ""; + public void queryManagedSubAccountSnapshotExample() throws ApiException, IOException { + String email = "abc@test.com"; + OrderType type = OrderType.SPOT; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 1L; + Long limit = 10L; Long recvWindow = 5000L; ApiResponse response = getApi().queryManagedSubAccountSnapshot( diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountInvestorExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountInvestorExample.java index a7391874c..46d9fd6eb 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountInvestorExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountInvestorExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountTransferLogMasterAccountInvestorResponse; +import com.binance.connector.client.sub_account.rest.model.TransferFunctionAccountType; +import java.io.IOException; /** API examples for ManagedSubAccountApi */ public class QueryManagedSubAccountTransferLogMasterAccountInvestorExample { @@ -26,26 +28,27 @@ public SubAccountRestApi getApi() { } /** - * Query Managed Sub Account Transfer Log (For Investor Master Account) (USER_DATA) + * Query Managed Sub Account Transfer Log For Investor Master Account (USER_DATA) * - *

Investor can use this api to query managed sub account transfer log. This endpoint is - * available for investor of Managed Sub-Account. A Managed Sub-Account is an account type for - * investors who value flexibility in asset allocation and account application, while delegating - * trades to a professional trading team. Please refer to + *

Query Managed Sub Account Transfer Log For Investor Master Account Investor can use this + * api to query managed sub account transfer log. This endpoint is available for investor of + * Managed Sub-Account. A Managed Sub-Account is an account type for investors who value + * flexibility in asset allocation and account application, while delegating trades to a + * professional trading team. Please refer to * [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) - * Weight: 1 + * Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ public void queryManagedSubAccountTransferLogMasterAccountInvestorExample() - throws ApiException { - String email = "sub-account-email@email.com"; + throws ApiException, IOException { + String email = "abc@test.com"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long page = 0L; - Long limit = 0L; + Long page = 1L; + Long limit = 1L; String transfers = ""; - String transferFunctionAccountType = ""; + TransferFunctionAccountType transferFunctionAccountType = TransferFunctionAccountType.SPOT; ApiResponse response = getApi().queryManagedSubAccountTransferLogMasterAccountInvestor( email, diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountTradingExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountTradingExample.java index 8cb18703c..c4a6ee3fc 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountTradingExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountTradingExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountTransferLogMasterAccountTradingResponse; +import com.binance.connector.client.sub_account.rest.model.TransferFunctionAccountType; +import java.io.IOException; /** API examples for ManagedSubAccountApi */ public class QueryManagedSubAccountTransferLogMasterAccountTradingExample { @@ -26,25 +28,27 @@ public SubAccountRestApi getApi() { } /** - * Query Managed Sub Account Transfer Log (For Trading Team Master Account) (USER_DATA) + * Query Managed Sub Account Transfer Log For Trading Team Master Account (USER_DATA) * - *

Trading team can use this api to query managed sub account transfer log. This endpoint is - * available for trading team of Managed Sub-Account. A Managed Sub-Account is an account type - * for investors who value flexibility in asset allocation and account application, while - * delegating trades to a professional trading team. Please refer to + *

Query Managed Sub Account Transfer Log For Trading Team Master Account Trading team can + * use this api to query managed sub account transfer log. This endpoint is available for + * trading team of Managed Sub-Account. A Managed Sub-Account is an account type for investors + * who value flexibility in asset allocation and account application, while delegating trades to + * a professional trading team. Please refer to * [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) - * Weight: 60 + * Weight(UID): 60 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryManagedSubAccountTransferLogMasterAccountTradingExample() throws ApiException { - String email = "sub-account-email@email.com"; + public void queryManagedSubAccountTransferLogMasterAccountTradingExample() + throws ApiException, IOException { + String email = "abc@test.com"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long page = 0L; - Long limit = 0L; + Long page = 1L; + Long limit = 10L; String transfers = ""; - String transferFunctionAccountType = ""; + TransferFunctionAccountType transferFunctionAccountType = TransferFunctionAccountType.SPOT; ApiResponse response = getApi().queryManagedSubAccountTransferLogMasterAccountTrading( email, diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogSubAccountTradingExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogSubAccountTradingExample.java index 6912856c6..a5141177a 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogSubAccountTradingExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogSubAccountTradingExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.sub_account.rest.SubAccountRestApiUtil; import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.QueryManagedSubAccountTransferLogSubAccountTradingResponse; +import com.binance.connector.client.sub_account.rest.model.TransferFunctionAccountType; +import java.io.IOException; /** API examples for ManagedSubAccountApi */ public class QueryManagedSubAccountTransferLogSubAccountTradingExample { @@ -28,17 +30,19 @@ public SubAccountRestApi getApi() { /** * Query Managed Sub Account Transfer Log (For Trading Team Sub Account) (USER_DATA) * - *

Query Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight: 60 + *

Query Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight(UID): 60 + * Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryManagedSubAccountTransferLogSubAccountTradingExample() throws ApiException { + public void queryManagedSubAccountTransferLogSubAccountTradingExample() + throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long page = 0L; - Long limit = 0L; + Long page = 1L; + Long limit = 10L; String transfers = ""; - String transferFunctionAccountType = ""; + TransferFunctionAccountType transferFunctionAccountType = TransferFunctionAccountType.SPOT; Long recvWindow = 5000L; ApiResponse response = getApi().queryManagedSubAccountTransferLogSubAccountTrading( diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/WithdrawlAssetsFromTheManagedSubAccountExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/WithdrawlAssetsFromTheManagedSubAccountExample.java index 2701927d7..3353e7a5d 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/WithdrawlAssetsFromTheManagedSubAccountExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/WithdrawlAssetsFromTheManagedSubAccountExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.sub_account.rest.api.SubAccountRestApi; import com.binance.connector.client.sub_account.rest.model.WithdrawlAssetsFromTheManagedSubAccountRequest; import com.binance.connector.client.sub_account.rest.model.WithdrawlAssetsFromTheManagedSubAccountResponse; +import java.io.IOException; /** API examples for ManagedSubAccountApi */ public class WithdrawlAssetsFromTheManagedSubAccountExample { @@ -29,17 +30,17 @@ public SubAccountRestApi getApi() { /** * Withdrawl Assets From The Managed Sub-account (For Investor Master Account) (USER_DATA) * - *

Withdrawl Assets From The Managed Sub-account * You need to enable `Enable Spot & - * Margin Trading` option for the api key which requests this endpoint Weight: 1 + *

Withdrawl Assets From The Managed Sub-account Weight(IP): 1 Security Type: USER_DATA + * Notes: - Your API key must have the permission `Enable Spot & Margin Trading`. * * @throws ApiException if the Api call fails */ - public void withdrawlAssetsFromTheManagedSubAccountExample() throws ApiException { + public void withdrawlAssetsFromTheManagedSubAccountExample() throws ApiException, IOException { WithdrawlAssetsFromTheManagedSubAccountRequest withdrawlAssetsFromTheManagedSubAccountRequest = new WithdrawlAssetsFromTheManagedSubAccountRequest(); - withdrawlAssetsFromTheManagedSubAccountRequest.fromEmail(""); - withdrawlAssetsFromTheManagedSubAccountRequest.asset(""); + withdrawlAssetsFromTheManagedSubAccountRequest.fromEmail("from@test.com"); + withdrawlAssetsFromTheManagedSubAccountRequest.asset("BTC"); withdrawlAssetsFromTheManagedSubAccountRequest.amount(1.0d); ApiResponse response = getApi().withdrawlAssetsFromTheManagedSubAccount( diff --git a/examples/vip-loan/pom.xml b/examples/vip-loan/pom.xml index ca30ba331..d080216ef 100644 --- a/examples/vip-loan/pom.xml +++ b/examples/vip-loan/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-vip-loan - 3.0.0 + 4.0.0 \ No newline at end of file diff --git a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetBorrowInterestRateExample.java b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetBorrowInterestRateExample.java index 548378367..b303b233c 100644 --- a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetBorrowInterestRateExample.java +++ b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetBorrowInterestRateExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.vip_loan.rest.VipLoanRestApiUtil; import com.binance.connector.client.vip_loan.rest.api.VipLoanRestApi; import com.binance.connector.client.vip_loan.rest.model.GetBorrowInterestRateResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetBorrowInterestRateExample { @@ -25,14 +26,14 @@ public VipLoanRestApi getApi() { } /** - * Get Borrow Interest Rate(USER_DATA) + * Get Borrow Interest Rate (USER_DATA) * - *

Get Borrow Interest Rate Weight: 400 + *

Get Borrow Interest Rate Weight(IP): 400 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getBorrowInterestRateExample() throws ApiException { - String loanCoin = ""; + public void getBorrowInterestRateExample() throws ApiException, IOException { + String loanCoin = "BTC"; Long recvWindow = 5000L; ApiResponse response = getApi().getBorrowInterestRate(loanCoin, recvWindow); diff --git a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetCollateralAssetDataExample.java b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetCollateralAssetDataExample.java index b0021cfe3..77abd1240 100644 --- a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetCollateralAssetDataExample.java +++ b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetCollateralAssetDataExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.vip_loan.rest.VipLoanRestApiUtil; import com.binance.connector.client.vip_loan.rest.api.VipLoanRestApi; import com.binance.connector.client.vip_loan.rest.model.GetCollateralAssetDataResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetCollateralAssetDataExample { @@ -25,14 +26,14 @@ public VipLoanRestApi getApi() { } /** - * Get Collateral Asset Data(USER_DATA) + * Get Collateral Asset Data (USER_DATA) * - *

Get Collateral Asset Data Weight: 400 + *

Get Collateral Asset Data Weight(IP): 400 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getCollateralAssetDataExample() throws ApiException { - String collateralCoin = ""; + public void getCollateralAssetDataExample() throws ApiException, IOException { + String collateralCoin = "BUSD"; Long recvWindow = 5000L; ApiResponse response = getApi().getCollateralAssetData(collateralCoin, recvWindow); diff --git a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetLoanableAssetsDataExample.java b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetLoanableAssetsDataExample.java index b325126eb..4b2987a60 100644 --- a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetLoanableAssetsDataExample.java +++ b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetLoanableAssetsDataExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.vip_loan.rest.VipLoanRestApiUtil; import com.binance.connector.client.vip_loan.rest.api.VipLoanRestApi; import com.binance.connector.client.vip_loan.rest.model.GetLoanableAssetsDataResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetLoanableAssetsDataExample { @@ -25,15 +26,15 @@ public VipLoanRestApi getApi() { } /** - * Get Loanable Assets Data(USER_DATA) + * Get Loanable Assets Data (USER_DATA) * *

Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD - * value. Weight: 400 + * value. Weight(IP): 400 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getLoanableAssetsDataExample() throws ApiException { - String loanCoin = ""; + public void getLoanableAssetsDataExample() throws ApiException, IOException { + String loanCoin = "BUSD"; Long vipLevel = 1L; Long recvWindow = 5000L; ApiResponse response = diff --git a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetVIPLoanInterestRateHistoryExample.java b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetVIPLoanInterestRateHistoryExample.java index be92c3b27..c6525989c 100644 --- a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetVIPLoanInterestRateHistoryExample.java +++ b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/GetVIPLoanInterestRateHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.vip_loan.rest.VipLoanRestApiUtil; import com.binance.connector.client.vip_loan.rest.api.VipLoanRestApi; import com.binance.connector.client.vip_loan.rest.model.GetVIPLoanInterestRateHistoryResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetVIPLoanInterestRateHistoryExample { @@ -27,14 +28,15 @@ public VipLoanRestApi getApi() { /** * Get VIP Loan Interest Rate History (USER_DATA) * - *

Check VIP Loan flexible interest rate history * If startTime and endTime are not sent, the - * recent 90-day data will be returned * The max interval between startTime and end Time is 180 - * days. * Time based on UTC+0. Weight: 400 + *

Check VIP Loan flexible interest rate history Weight(IP): 400 Security Type: USER_DATA + * Notes: - If `startTime` and `endTime` are not sent, recent 90-day data is + * returned. - The maximum interval between `startTime` and `endTime` is 180 + * days. - Time is based on UTC+0. * * @throws ApiException if the Api call fails */ - public void getVIPLoanInterestRateHistoryExample() throws ApiException { - String coin = ""; + public void getVIPLoanInterestRateHistoryExample() throws ApiException, IOException { + String coin = "USDT"; Long recvWindow = 5000L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; diff --git a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/QueryVIPLoanFixedRateMarketExample.java b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/QueryVIPLoanFixedRateMarketExample.java new file mode 100644 index 000000000..b553e73f0 --- /dev/null +++ b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/marketdata/QueryVIPLoanFixedRateMarketExample.java @@ -0,0 +1,46 @@ +package com.binance.connector.client.vip_loan.rest.marketdata; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.vip_loan.rest.VipLoanRestApiUtil; +import com.binance.connector.client.vip_loan.rest.api.VipLoanRestApi; +import com.binance.connector.client.vip_loan.rest.model.QueryVIPLoanFixedRateMarketResponse; +import java.io.IOException; + +/** API examples for MarketDataApi */ +public class QueryVIPLoanFixedRateMarketExample { + private VipLoanRestApi api; + + public VipLoanRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = VipLoanRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new VipLoanRestApi(clientConfiguration); + } + return api; + } + + /** + * Query VIP Loan Fixed Rate Market (USER_DATA) + * + *

Query the VIP Loan fixed rate market. Returns a paginated list of fixed-rate supply + * orders. Weight(IP): 6000 Security Type: USER_DATA + * + * @throws ApiException if the Api call fails + */ + public void queryVIPLoanFixedRateMarketExample() throws ApiException, IOException { + String loanCoin = "USDT"; + Long duration = 30L; + Long current = 1L; + Long size = 10L; + Long recvWindow = 5000L; + ApiResponse response = + getApi().queryVIPLoanFixedRateMarket(loanCoin, duration, current, size, recvWindow); + System.out.println(response.getData()); + } +} diff --git a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanBorrowExample.java b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanBorrowExample.java index 163d31daa..43ceb4544 100644 --- a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanBorrowExample.java +++ b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanBorrowExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.vip_loan.rest.api.VipLoanRestApi; import com.binance.connector.client.vip_loan.rest.model.VipLoanBorrowRequest; import com.binance.connector.client.vip_loan.rest.model.VipLoanBorrowResponse; +import java.io.IOException; /** API examples for TradeApi */ public class VipLoanBorrowExample { @@ -26,21 +27,23 @@ public VipLoanRestApi getApi() { } /** - * VIP Loan Borrow(TRADE) + * VIP Loan Borrow (TRADE) * - *

VIP loan is available for VIP users only. * loanAccountId refer to loan receiving account - * * Only master account applications are supported * loanAccountId and collateralAccountId - * under same master account * loanTerm is mandatory if user choose stable rate Weight: 0 + *

VIP loan is available for VIP users only. Weight(UID): 6000 Security Type: TRADE Notes: - + * `loanAccountId` refers to the loan receiving account. - Only master account + * applications are supported. - `loanAccountId` and `collateralAccountId` + * must be under the same master account. - `loanTerm` is mandatory if the user + * chooses a fixed rate (`isFlexibleRate = FALSE`). * * @throws ApiException if the Api call fails */ - public void vipLoanBorrowExample() throws ApiException { + public void vipLoanBorrowExample() throws ApiException, IOException { VipLoanBorrowRequest vipLoanBorrowRequest = new VipLoanBorrowRequest(); vipLoanBorrowRequest.loanAccountId(1L); - vipLoanBorrowRequest.loanCoin(""); + vipLoanBorrowRequest.loanCoin("BTC"); vipLoanBorrowRequest.loanAmount(1.0d); - vipLoanBorrowRequest.collateralAccountId(1L); - vipLoanBorrowRequest.collateralCoin(""); + vipLoanBorrowRequest.collateralAccountId("12345678,12345678,12345678"); + vipLoanBorrowRequest.collateralCoin("BUSD,USDT,ETH"); vipLoanBorrowRequest.isFlexibleRate(true); ApiResponse response = getApi().vipLoanBorrow(vipLoanBorrowRequest); System.out.println(response.getData()); diff --git a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanFixedRateBorrowExample.java b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanFixedRateBorrowExample.java new file mode 100644 index 000000000..ff3c37554 --- /dev/null +++ b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanFixedRateBorrowExample.java @@ -0,0 +1,53 @@ +package com.binance.connector.client.vip_loan.rest.trade; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.vip_loan.rest.VipLoanRestApiUtil; +import com.binance.connector.client.vip_loan.rest.api.VipLoanRestApi; +import com.binance.connector.client.vip_loan.rest.model.VipLoanFixedRateBorrowRequest; +import com.binance.connector.client.vip_loan.rest.model.VipLoanFixedRateBorrowResponse; +import java.io.IOException; + +/** API examples for TradeApi */ +public class VipLoanFixedRateBorrowExample { + private VipLoanRestApi api; + + public VipLoanRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = VipLoanRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new VipLoanRestApi(clientConfiguration); + } + return api; + } + + /** + * VIP Loan Fixed Rate Borrow (TRADE) + * + *

Submit a fixed rate borrow request by matching market supply orders. Weight(UID): 6000 + * Security Type: TRADE Notes: - **Rate limit:** 2 requests per second per account. - When + * multiple `supplyRequest` entries are provided, all `requestId` values + * must correspond to the same `borrowCoin` and `loanTerm` (validated by + * collateral facade). + * + * @throws ApiException if the Api call fails + */ + public void vipLoanFixedRateBorrowExample() throws ApiException, IOException { + VipLoanFixedRateBorrowRequest vipLoanFixedRateBorrowRequest = + new VipLoanFixedRateBorrowRequest(); + vipLoanFixedRateBorrowRequest.supplyRequest("1212:0.12:100;3434:0.13:50"); + vipLoanFixedRateBorrowRequest.borrowCoin("BUSD"); + vipLoanFixedRateBorrowRequest.loanTerm(30L); + vipLoanFixedRateBorrowRequest.borrowUid(12345678L); + vipLoanFixedRateBorrowRequest.collateralCoin("BNB,ETH,BTC"); + vipLoanFixedRateBorrowRequest.collateralAccountId("12345,67890,13579"); + ApiResponse response = + getApi().vipLoanFixedRateBorrow(vipLoanFixedRateBorrowRequest); + System.out.println(response.getData()); + } +} diff --git a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanRenewExample.java b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanRenewExample.java index 4ad728ae1..ed92add0d 100644 --- a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanRenewExample.java +++ b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanRenewExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.vip_loan.rest.api.VipLoanRestApi; import com.binance.connector.client.vip_loan.rest.model.VipLoanRenewRequest; import com.binance.connector.client.vip_loan.rest.model.VipLoanRenewResponse; +import java.io.IOException; /** API examples for TradeApi */ public class VipLoanRenewExample { @@ -26,16 +27,16 @@ public VipLoanRestApi getApi() { } /** - * VIP Loan Renew(TRADE) + * VIP Loan Renew (TRADE) * - *

VIP loan is available for VIP users only. Weight: 6000 + *

VIP loan is available for VIP users only. Weight(UID): 6000 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void vipLoanRenewExample() throws ApiException { + public void vipLoanRenewExample() throws ApiException, IOException { VipLoanRenewRequest vipLoanRenewRequest = new VipLoanRenewRequest(); vipLoanRenewRequest.orderId(1L); - vipLoanRenewRequest.loanTerm(0L); + vipLoanRenewRequest.loanTerm(30L); ApiResponse response = getApi().vipLoanRenew(vipLoanRenewRequest); System.out.println(response.getData()); } diff --git a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanRepayExample.java b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanRepayExample.java index fb8aec0f7..0f25ed980 100644 --- a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanRepayExample.java +++ b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/trade/VipLoanRepayExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.vip_loan.rest.api.VipLoanRestApi; import com.binance.connector.client.vip_loan.rest.model.VipLoanRepayRequest; import com.binance.connector.client.vip_loan.rest.model.VipLoanRepayResponse; +import java.io.IOException; /** API examples for TradeApi */ public class VipLoanRepayExample { @@ -26,13 +27,13 @@ public VipLoanRestApi getApi() { } /** - * VIP Loan Repay(TRADE) + * VIP Loan Repay (TRADE) * - *

VIP loan is available for VIP users only. Weight: 6000 + *

VIP loan is available for VIP users only. Weight(UID): 6000 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void vipLoanRepayExample() throws ApiException { + public void vipLoanRepayExample() throws ApiException, IOException { VipLoanRepayRequest vipLoanRepayRequest = new VipLoanRepayRequest(); vipLoanRepayRequest.orderId(1L); vipLoanRepayRequest.amount(1.0d); diff --git a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/CheckVIPLoanCollateralAccountExample.java b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/CheckVIPLoanCollateralAccountExample.java index 1ea84776a..d6153776f 100644 --- a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/CheckVIPLoanCollateralAccountExample.java +++ b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/CheckVIPLoanCollateralAccountExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.vip_loan.rest.VipLoanRestApiUtil; import com.binance.connector.client.vip_loan.rest.api.VipLoanRestApi; import com.binance.connector.client.vip_loan.rest.model.CheckVIPLoanCollateralAccountResponse; +import java.io.IOException; /** API examples for UserInformationApi */ public class CheckVIPLoanCollateralAccountExample { @@ -27,13 +28,14 @@ public VipLoanRestApi getApi() { /** * Check VIP Loan Collateral Account (USER_DATA) * - *

VIP loan is available for VIP users only * If the login account is loan account, all - * collateral accounts under the loan account can be queried. * If the login account is - * collateral account, only the current collateral account can be queried. Weight: 6000 + *

VIP loan is available for VIP users only Weight(IP): 6000 Security Type: USER_DATA Notes: + * - If the logged-in account is a borrowing account, all collateral accounts bound to that + * borrowing account can be queried. - If the logged-in account is a collateral account, only + * collateral assets under that account can be queried. * * @throws ApiException if the Api call fails */ - public void checkVIPLoanCollateralAccountExample() throws ApiException { + public void checkVIPLoanCollateralAccountExample() throws ApiException, IOException { Long orderId = 1L; Long collateralAccountId = 1L; Long recvWindow = 5000L; diff --git a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/GetVIPLoanAccruedInterestExample.java b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/GetVIPLoanAccruedInterestExample.java index eeb6eff4a..7add98be6 100644 --- a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/GetVIPLoanAccruedInterestExample.java +++ b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/GetVIPLoanAccruedInterestExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.vip_loan.rest.VipLoanRestApiUtil; import com.binance.connector.client.vip_loan.rest.api.VipLoanRestApi; import com.binance.connector.client.vip_loan.rest.model.GetVIPLoanAccruedInterestResponse; +import java.io.IOException; /** API examples for UserInformationApi */ public class GetVIPLoanAccruedInterestExample { @@ -27,15 +28,15 @@ public VipLoanRestApi getApi() { /** * Get VIP Loan Accrued Interest (USER_DATA) * - *

Check VIP Loan interest record * If startTime and endTime are not sent, the recent 90-day - * data will be returned. * The max interval between startTime and endTime is 90 days. Weight: - * 400 + *

Check VIP Loan interest record Weight(IP): 400 Security Type: USER_DATA Notes: - If + * `startTime` and `endTime` are not sent, recent 90-day data is returned. - + * The maximum interval between `startTime` and `endTime` is 90 days. * * @throws ApiException if the Api call fails */ - public void getVIPLoanAccruedInterestExample() throws ApiException { + public void getVIPLoanAccruedInterestExample() throws ApiException, IOException { Long orderId = 1L; - String loanCoin = ""; + String loanCoin = "BTC"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; diff --git a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/GetVIPLoanOngoingOrdersExample.java b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/GetVIPLoanOngoingOrdersExample.java index 946e84c98..62a07c5c7 100644 --- a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/GetVIPLoanOngoingOrdersExample.java +++ b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/GetVIPLoanOngoingOrdersExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.vip_loan.rest.VipLoanRestApiUtil; import com.binance.connector.client.vip_loan.rest.api.VipLoanRestApi; import com.binance.connector.client.vip_loan.rest.model.GetVIPLoanOngoingOrdersResponse; +import java.io.IOException; /** API examples for UserInformationApi */ public class GetVIPLoanOngoingOrdersExample { @@ -25,17 +26,17 @@ public VipLoanRestApi getApi() { } /** - * Get VIP Loan Ongoing Orders(USER_DATA) + * Get VIP Loan Ongoing Orders (USER_DATA) * - *

VIP loan is available for VIP users only. Weight: 400 + *

VIP loan is available for VIP users only. Weight(IP): 400 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getVIPLoanOngoingOrdersExample() throws ApiException { + public void getVIPLoanOngoingOrdersExample() throws ApiException, IOException { Long orderId = 1L; Long collateralAccountId = 1L; - String loanCoin = ""; - String collateralCoin = ""; + String loanCoin = "BUSD"; + String collateralCoin = "BNB,BTC,ETH"; Long current = 1L; Long limit = 10L; Long recvWindow = 5000L; diff --git a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/GetVIPLoanRepaymentHistoryExample.java b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/GetVIPLoanRepaymentHistoryExample.java new file mode 100644 index 000000000..5fadb9346 --- /dev/null +++ b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/GetVIPLoanRepaymentHistoryExample.java @@ -0,0 +1,51 @@ +package com.binance.connector.client.vip_loan.rest.userinformation; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.vip_loan.rest.VipLoanRestApiUtil; +import com.binance.connector.client.vip_loan.rest.api.VipLoanRestApi; +import com.binance.connector.client.vip_loan.rest.model.GetVIPLoanRepaymentHistoryResponse; +import java.io.IOException; + +/** API examples for UserInformationApi */ +public class GetVIPLoanRepaymentHistoryExample { + private VipLoanRestApi api; + + public VipLoanRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = VipLoanRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new VipLoanRestApi(clientConfiguration); + } + return api; + } + + /** + * Get VIP Loan Repayment History (USER_DATA) + * + *

VIP Loans are available only to VIP users. Weight(IP): 400 Security Type: USER_DATA Notes: + * - If `startTime` and `endTime` are not sent, recent 90-day data is + * returned. - The maximum interval between `startTime` and `endTime` is 180 + * days. + * + * @throws ApiException if the Api call fails + */ + public void getVIPLoanRepaymentHistoryExample() throws ApiException, IOException { + Long orderId = 1L; + String loanCoin = "BUSD"; + Long startTime = 1623319461670L; + Long endTime = 1641782889000L; + Long current = 1L; + Long limit = 10L; + Long recvWindow = 5000L; + ApiResponse response = + getApi().getVIPLoanRepaymentHistory( + orderId, loanCoin, startTime, endTime, current, limit, recvWindow); + System.out.println(response.getData()); + } +} diff --git a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/QueryApplicationStatusExample.java b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/QueryApplicationStatusExample.java index 3a21a4f48..51ae2b972 100644 --- a/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/QueryApplicationStatusExample.java +++ b/examples/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/userinformation/QueryApplicationStatusExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.vip_loan.rest.VipLoanRestApiUtil; import com.binance.connector.client.vip_loan.rest.api.VipLoanRestApi; import com.binance.connector.client.vip_loan.rest.model.QueryApplicationStatusResponse; +import java.io.IOException; /** API examples for UserInformationApi */ public class QueryApplicationStatusExample { @@ -25,13 +26,13 @@ public VipLoanRestApi getApi() { } /** - * Query Application Status(USER_DATA) + * Query Application Status (USER_DATA) * - *

Query Application Status Weight: 400 + *

Query Application Status Weight(UID): 400 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryApplicationStatusExample() throws ApiException { + public void queryApplicationStatusExample() throws ApiException, IOException { Long current = 1L; Long limit = 10L; Long recvWindow = 5000L; diff --git a/examples/w3w-prediction/pom.xml b/examples/w3w-prediction/pom.xml index c0c474239..0aa41eeb8 100644 --- a/examples/w3w-prediction/pom.xml +++ b/examples/w3w-prediction/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-w3w-prediction - 1.0.0 + 2.0.0 \ No newline at end of file diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/GetMarketDetailExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/GetMarketDetailExample.java index 4a98ffea8..b3e1ecb93 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/GetMarketDetailExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/GetMarketDetailExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.w3w_prediction.rest.W3WPredictionRestApiUtil; import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.GetMarketDetailResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class GetMarketDetailExample { @@ -33,7 +34,7 @@ public W3WPredictionRestApi getApi() { * * @throws ApiException if the Api call fails */ - public void getMarketDetailExample() throws ApiException { + public void getMarketDetailExample() throws ApiException, IOException { Long marketTopicId = 4229564L; ApiResponse response = getApi().getMarketDetail(marketTopicId); System.out.println(response.getData()); diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionCategoriesExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionCategoriesExample.java index 9f1c0725c..0dcf8f008 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionCategoriesExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionCategoriesExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.w3w_prediction.rest.W3WPredictionRestApiUtil; import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.ListPredictionCategoriesResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class ListPredictionCategoriesExample { @@ -32,7 +33,7 @@ public W3WPredictionRestApi getApi() { * * @throws ApiException if the Api call fails */ - public void listPredictionCategoriesExample() throws ApiException { + public void listPredictionCategoriesExample() throws ApiException, IOException { ApiResponse response = getApi().listPredictionCategories(); System.out.println(response.getData()); diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionMarketsExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionMarketsExample.java index dcaaea103..34c401997 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionMarketsExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionMarketsExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.w3w_prediction.rest.model.ListPredictionMarketsResponse; import com.binance.connector.client.w3w_prediction.rest.model.OrderBy; import com.binance.connector.client.w3w_prediction.rest.model.SortBy; +import java.io.IOException; /** API examples for MarketDataApi */ public class ListPredictionMarketsExample { @@ -35,7 +36,7 @@ public W3WPredictionRestApi getApi() { * * @throws ApiException if the Api call fails */ - public void listPredictionMarketsExample() throws ApiException { + public void listPredictionMarketsExample() throws ApiException, IOException { String l1Category = "crypto"; String l2Category = "up-down"; SortBy sortBy = SortBy.RECOMMENDED; diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/MarketSearchExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/MarketSearchExample.java index 325a2a3ec..89a302bdd 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/MarketSearchExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/MarketSearchExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.w3w_prediction.rest.W3WPredictionRestApiUtil; import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.MarketSearchResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class MarketSearchExample { @@ -32,7 +33,7 @@ public W3WPredictionRestApi getApi() { * * @throws ApiException if the Api call fails */ - public void marketSearchExample() throws ApiException { + public void marketSearchExample() throws ApiException, IOException { String query = "BTC price"; Integer topK = 20; ApiResponse response = getApi().marketSearch(query, topK); diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryLastTradePriceExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryLastTradePriceExample.java index f445628ca..b709937f4 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryLastTradePriceExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryLastTradePriceExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.w3w_prediction.rest.W3WPredictionRestApiUtil; import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.QueryLastTradePriceResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class QueryLastTradePriceExample { @@ -32,7 +33,7 @@ public W3WPredictionRestApi getApi() { * * @throws ApiException if the Api call fails */ - public void queryLastTradePriceExample() throws ApiException { + public void queryLastTradePriceExample() throws ApiException, IOException { Long marketId = 5567895L; ApiResponse response = getApi().queryLastTradePrice(marketId); System.out.println(response.getData()); diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryOrderBookExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryOrderBookExample.java index e3516abcd..67f058726 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryOrderBookExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryOrderBookExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.w3w_prediction.rest.W3WPredictionRestApiUtil; import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.QueryOrderBookResponse; +import java.io.IOException; /** API examples for MarketDataApi */ public class QueryOrderBookExample { @@ -33,7 +34,7 @@ public W3WPredictionRestApi getApi() { * * @throws ApiException if the Api call fails */ - public void queryOrderBookExample() throws ApiException { + public void queryOrderBookExample() throws ApiException, IOException { String vendor = "predict_fun"; Long marketId = 5567895L; String tokenId = "112233"; diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/GetPositionByTokenExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/GetPositionByTokenExample.java index 4dfaeb626..67290a1eb 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/GetPositionByTokenExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/GetPositionByTokenExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.w3w_prediction.rest.W3WPredictionRestApiUtil; import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.GetPositionByTokenResponse; +import java.io.IOException; /** API examples for PositionApi */ public class GetPositionByTokenExample { @@ -26,14 +27,14 @@ public W3WPredictionRestApi getApi() { } /** - * Get Position by Token + * Get Position by Token (USER_DATA) * *

Get the authenticated user's position detail for a specific prediction token. * Weight(IP): 200 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getPositionByTokenExample() throws ApiException { + public void getPositionByTokenExample() throws ApiException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; String tokenId = "112233"; Long recvWindow = 5000L; diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPnLExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPnLExample.java index 1cfbd6b27..7d5d7649a 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPnLExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPnLExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.w3w_prediction.rest.W3WPredictionRestApiUtil; import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.QueryPnLResponse; +import java.io.IOException; /** API examples for PositionApi */ public class QueryPnLExample { @@ -26,7 +27,7 @@ public W3WPredictionRestApi getApi() { } /** - * Query PnL + * Query PnL (USER_DATA) * *

Query profit and loss records for the authenticated user's prediction positions. When * `tokenId` is provided, returns a single record in `pnl`; otherwise @@ -34,7 +35,7 @@ public W3WPredictionRestApi getApi() { * * @throws ApiException if the Api call fails */ - public void queryPnLExample() throws ApiException { + public void queryPnLExample() throws ApiException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; String tokenId = "112233"; Long marketId = 5567895L; diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsByFilterExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsByFilterExample.java index 50f820e54..a27c56b0f 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsByFilterExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsByFilterExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.w3w_prediction.rest.W3WPredictionRestApiUtil; import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.QueryPositionsByFilterResponse; +import java.io.IOException; /** API examples for PositionApi */ public class QueryPositionsByFilterExample { @@ -26,14 +27,14 @@ public W3WPredictionRestApi getApi() { } /** - * Query Positions by Filter + * Query Positions by Filter (USER_DATA) * *

Get prediction positions filtered by wallet address and/or market topic ID. Both * parameters are optional. Weight(IP): 200 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryPositionsByFilterExample() throws ApiException { + public void queryPositionsByFilterExample() throws ApiException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; Long marketTopicId = 4229564L; Long recvWindow = 5000L; diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsExample.java index b0429fa4c..e9231bf75 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.w3w_prediction.rest.W3WPredictionRestApiUtil; import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.QueryPositionsResponse; +import java.io.IOException; /** API examples for PositionApi */ public class QueryPositionsExample { @@ -26,14 +27,14 @@ public W3WPredictionRestApi getApi() { } /** - * Query Positions + * Query Positions (USER_DATA) * *

Get the authenticated user's prediction token positions with portfolio summary and * tab-based filtering. Weight(IP): 200 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryPositionsExample() throws ApiException { + public void queryPositionsExample() throws ApiException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; String tab = "ONGOING"; Integer offset = 0; diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QuerySettledPositionHistoryExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QuerySettledPositionHistoryExample.java index 9a6d470f6..705e71936 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QuerySettledPositionHistoryExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QuerySettledPositionHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.w3w_prediction.rest.W3WPredictionRestApiUtil; import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.QuerySettledPositionHistoryResponse; +import java.io.IOException; /** API examples for PositionApi */ public class QuerySettledPositionHistoryExample { @@ -26,14 +27,14 @@ public W3WPredictionRestApi getApi() { } /** - * Query Settled Position History + * Query Settled Position History (USER_DATA) * *

Get the authenticated user's settled (resolved) prediction position history with * optional filters. Weight(IP): 200 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void querySettledPositionHistoryExample() throws ApiException { + public void querySettledPositionHistoryExample() throws ApiException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; String l1Category = "crypto"; Integer result = 1; diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/BatchRedeemExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/BatchRedeemExample.java index 0cf425b50..bc3f659e5 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/BatchRedeemExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/BatchRedeemExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.w3w_prediction.rest.model.BatchRedeemRequest; import com.binance.connector.client.w3w_prediction.rest.model.BatchRedeemResponse; import com.binance.connector.client.w3w_prediction.rest.model.TokenIds; +import java.io.IOException; /** API examples for RedeemApi */ public class BatchRedeemExample { @@ -28,14 +29,14 @@ public W3WPredictionRestApi getApi() { } /** - * Batch Redeem + * Batch Redeem (TRADE) * *

Redeem one or more settled prediction tokens on-chain to claim winnings. Requires SAS * authorization. Weight(IP): 200 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void batchRedeemExample() throws ApiException { + public void batchRedeemExample() throws ApiException, IOException { BatchRedeemRequest batchRedeemRequest = new BatchRedeemRequest(); batchRedeemRequest.walletAddress("0x12e32db8817e292508c34111cbc4b23340df542c"); batchRedeemRequest.walletId("5b5c1ec3be4e4416a5872b21c1ca5d20"); diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/GetRedeemStatusExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/GetRedeemStatusExample.java index 8309dde5a..c81aeb9db 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/GetRedeemStatusExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/GetRedeemStatusExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.w3w_prediction.rest.W3WPredictionRestApiUtil; import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.GetRedeemStatusResponse; +import java.io.IOException; /** API examples for RedeemApi */ public class GetRedeemStatusExample { @@ -26,7 +27,7 @@ public W3WPredictionRestApi getApi() { } /** - * Get Redeem Status + * Get Redeem Status (USER_DATA) * *

Query the on-chain transaction status of a previously submitted redeem request. * Weight(IP): 200 Security Type: USER_DATA Response Notes: - Status values: | Value | @@ -37,7 +38,7 @@ public W3WPredictionRestApi getApi() { * * @throws ApiException if the Api call fails */ - public void getRedeemStatusExample() throws ApiException { + public void getRedeemStatusExample() throws ApiException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; String txHash = "0xabc123def456789abcdef123456789abcdef123456789abcdef123456789abcd"; Long recvWindow = 5000L; diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/BatchCancelOrdersExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/BatchCancelOrdersExample.java index 894842ef8..93cd4ed83 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/BatchCancelOrdersExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/BatchCancelOrdersExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.BatchCancelOrdersRequest; import com.binance.connector.client.w3w_prediction.rest.model.BatchCancelOrdersResponse; +import java.io.IOException; /** API examples for TradeApi */ public class BatchCancelOrdersExample { @@ -27,7 +28,7 @@ public W3WPredictionRestApi getApi() { } /** - * Batch Cancel Orders + * Batch Cancel Orders (TRADE) * *

Cancel one or more active prediction orders in a single request. Requires SAS * authorization. **Known Issue — Bracket Encoding Incompatibility:** This endpoint uses indexed @@ -49,7 +50,7 @@ public W3WPredictionRestApi getApi() { * * @throws ApiException if the Api call fails */ - public void batchCancelOrdersExample() throws ApiException { + public void batchCancelOrdersExample() throws ApiException, IOException { BatchCancelOrdersRequest batchCancelOrdersRequest = new BatchCancelOrdersRequest(); batchCancelOrdersRequest.walletAddress("0x12e32db8817e292508c34111cbc4b23340df542c"); batchCancelOrdersRequest.walletId("5b5c1ec3be4e4416a5872b21c1ca5d20"); diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/GetQuoteExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/GetQuoteExample.java index 4ecc0d617..fc31b5019 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/GetQuoteExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/GetQuoteExample.java @@ -10,6 +10,7 @@ import com.binance.connector.client.w3w_prediction.rest.model.GetQuoteResponse; import com.binance.connector.client.w3w_prediction.rest.model.OrderType; import com.binance.connector.client.w3w_prediction.rest.model.Side; +import java.io.IOException; /** API examples for TradeApi */ public class GetQuoteExample { @@ -29,7 +30,7 @@ public W3WPredictionRestApi getApi() { } /** - * Get Quote + * Get Quote (TRADE) * *

Get a price quote for a prediction order. The returned `quoteId` must be used in * the subsequent Place Order request. Weight(IP): 200 Security Type: TRADE Response Notes: - @@ -44,7 +45,7 @@ public W3WPredictionRestApi getApi() { * * @throws ApiException if the Api call fails */ - public void getQuoteExample() throws ApiException { + public void getQuoteExample() throws ApiException, IOException { GetQuoteRequest getQuoteRequest = new GetQuoteRequest(); getQuoteRequest.walletAddress("0x12e32db8817e292508c34111cbc4b23340df542c"); getQuoteRequest.tokenId("112233"); diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/PlaceOrderExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/PlaceOrderExample.java index a5fc9f8d0..0fe724d8c 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/PlaceOrderExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/PlaceOrderExample.java @@ -10,6 +10,7 @@ import com.binance.connector.client.w3w_prediction.rest.model.OrderType; import com.binance.connector.client.w3w_prediction.rest.model.PlaceOrderRequest; import com.binance.connector.client.w3w_prediction.rest.model.PlaceOrderResponse; +import java.io.IOException; /** API examples for TradeApi */ public class PlaceOrderExample { @@ -29,7 +30,7 @@ public W3WPredictionRestApi getApi() { } /** - * Place Order + * Place Order (TRADE) * *

Place a prediction order using a previously obtained quote. Requires SAS authorization. * Weight(IP): 200 Security Type: TRADE Notes: - Validation rules: | orderType | timeInForce | @@ -39,7 +40,7 @@ public W3WPredictionRestApi getApi() { * * @throws ApiException if the Api call fails */ - public void placeOrderExample() throws ApiException { + public void placeOrderExample() throws ApiException, IOException { PlaceOrderRequest placeOrderRequest = new PlaceOrderRequest(); placeOrderRequest.walletAddress("0x12e32db8817e292508c34111cbc4b23340df542c"); placeOrderRequest.walletId("5b5c1ec3be4e4416a5872b21c1ca5d20"); diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryActiveOrdersExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryActiveOrdersExample.java index 7c113d379..2019f7ee7 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryActiveOrdersExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryActiveOrdersExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.QueryActiveOrdersResponse; import com.binance.connector.client.w3w_prediction.rest.model.TradeSide; +import java.io.IOException; /** API examples for TradeApi */ public class QueryActiveOrdersExample { @@ -27,14 +28,14 @@ public W3WPredictionRestApi getApi() { } /** - * Query Active Orders + * Query Active Orders (USER_DATA) * *

Get active (open) prediction orders for the authenticated user. Weight(IP): 200 Security * Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryActiveOrdersExample() throws ApiException { + public void queryActiveOrdersExample() throws ApiException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; TradeSide tradeSide = TradeSide.BUY; String l1Category = "crypto"; diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryOrderHistoryExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryOrderHistoryExample.java index bfbed6091..0a5c76e25 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryOrderHistoryExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryOrderHistoryExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.OrderType; import com.binance.connector.client.w3w_prediction.rest.model.QueryOrderHistoryResponse; +import java.io.IOException; /** API examples for TradeApi */ public class QueryOrderHistoryExample { @@ -27,14 +28,14 @@ public W3WPredictionRestApi getApi() { } /** - * Query Order History + * Query Order History (USER_DATA) * *

Get historical prediction orders (all statuses) for the authenticated user, with optional * filters. Weight(IP): 200 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryOrderHistoryExample() throws ApiException { + public void queryOrderHistoryExample() throws ApiException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; String l1Category = "crypto"; OrderType orderType = OrderType.MARKET; diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateInboundTransferExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateInboundTransferExample.java index b471bafe4..6875b2251 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateInboundTransferExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateInboundTransferExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.w3w_prediction.rest.model.AccountType; import com.binance.connector.client.w3w_prediction.rest.model.CreateInboundTransferRequest; import com.binance.connector.client.w3w_prediction.rest.model.CreateInboundTransferResponse; +import java.io.IOException; /** API examples for TransferApi */ public class CreateInboundTransferExample { @@ -28,7 +29,7 @@ public W3WPredictionRestApi getApi() { } /** - * Create Inbound Transfer + * Create Inbound Transfer (TRADE) * *

Transfer funds from the prediction wallet back to the user's CEX account (SPOT or * FUNDING). Requires SAS authorization. ⚠️ **SAS Authorization Required:** This endpoint @@ -38,7 +39,7 @@ public W3WPredictionRestApi getApi() { * * @throws ApiException if the Api call fails */ - public void createInboundTransferExample() throws ApiException { + public void createInboundTransferExample() throws ApiException, IOException { CreateInboundTransferRequest createInboundTransferRequest = new CreateInboundTransferRequest(); createInboundTransferRequest.walletId("5b5c1ec3be4e4416a5872b21c1ca5d20"); diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateOutboundTransferExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateOutboundTransferExample.java index 10bc79f2b..502f68633 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateOutboundTransferExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateOutboundTransferExample.java @@ -10,6 +10,7 @@ import com.binance.connector.client.w3w_prediction.rest.model.CreateOutboundTransferRequest; import com.binance.connector.client.w3w_prediction.rest.model.CreateOutboundTransferResponse; import com.binance.connector.client.w3w_prediction.rest.model.SourceBiz; +import java.io.IOException; /** API examples for TransferApi */ public class CreateOutboundTransferExample { @@ -29,14 +30,14 @@ public W3WPredictionRestApi getApi() { } /** - * Create Outbound Transfer + * Create Outbound Transfer (TRADE) * *

Transfer funds from the user's CEX account (SPOT or FUNDING) into the prediction * wallet. Requires SAS authorization. Weight(IP): 200 Security Type: TRADE * * @throws ApiException if the Api call fails */ - public void createOutboundTransferExample() throws ApiException { + public void createOutboundTransferExample() throws ApiException, IOException { CreateOutboundTransferRequest createOutboundTransferRequest = new CreateOutboundTransferRequest(); createOutboundTransferRequest.walletId("5b5c1ec3be4e4416a5872b21c1ca5d20"); diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferListExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferListExample.java index fd19f7724..e9e177116 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferListExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferListExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.Direction; import com.binance.connector.client.w3w_prediction.rest.model.QueryTransferListResponse; +import java.io.IOException; /** API examples for TransferApi */ public class QueryTransferListExample { @@ -27,14 +28,14 @@ public W3WPredictionRestApi getApi() { } /** - * Query Transfer List + * Query Transfer List (USER_DATA) * *

Get the authenticated user's prediction wallet transfer history within a date range. * Weight(IP): 200 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryTransferListExample() throws ApiException { + public void queryTransferListExample() throws ApiException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; String startDate = "2026-05-01"; String endDate = "2026-05-25"; diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferStatusExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferStatusExample.java index 33a233133..2f3237064 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferStatusExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferStatusExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.w3w_prediction.rest.W3WPredictionRestApiUtil; import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.QueryTransferStatusResponse; +import java.io.IOException; /** API examples for TransferApi */ public class QueryTransferStatusExample { @@ -26,7 +27,7 @@ public W3WPredictionRestApi getApi() { } /** - * Query Transfer Status + * Query Transfer Status (USER_DATA) * *

Query the current status of a prediction wallet transfer by transfer ID. * **`status` values:** Terminal states are `COMPLETED` and @@ -36,7 +37,7 @@ public W3WPredictionRestApi getApi() { * * @throws ApiException if the Api call fails */ - public void queryTransferStatusExample() throws ApiException { + public void queryTransferStatusExample() throws ApiException, IOException { String transferId = "tf_20260525_out_001"; Long recvWindow = 5000L; ApiResponse response = diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetPortfolioExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetPortfolioExample.java index 855b4478d..c888c60ef 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetPortfolioExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetPortfolioExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.w3w_prediction.rest.W3WPredictionRestApiUtil; import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.GetPortfolioResponse; +import java.io.IOException; /** API examples for WalletApi */ public class GetPortfolioExample { @@ -26,14 +27,14 @@ public W3WPredictionRestApi getApi() { } /** - * Get Portfolio + * Get Portfolio (USER_DATA) * *

Get the authenticated user's prediction portfolio overview including active positions * count, aggregated PnL, and full position list. Weight(IP): 200 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getPortfolioExample() throws ApiException { + public void getPortfolioExample() throws ApiException, IOException { String walletAddress = "0x12e32db8817e292508c34111cbc4b23340df542c"; String tokenId = "112233"; Long marketId = 5567895L; diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetQuotaStatusExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetQuotaStatusExample.java index bc9c7a97e..3d27dbe32 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetQuotaStatusExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetQuotaStatusExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.w3w_prediction.rest.W3WPredictionRestApiUtil; import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.GetQuotaStatusResponse; +import java.io.IOException; /** API examples for WalletApi */ public class GetQuotaStatusExample { @@ -26,14 +27,14 @@ public W3WPredictionRestApi getApi() { } /** - * Get Quota Status + * Get Quota Status (USER_DATA) * *

Query the current user's daily trading quota limit and remaining allowance for * prediction markets. Weight(IP): 200 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getQuotaStatusExample() throws ApiException { + public void getQuotaStatusExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getQuotaStatus(recvWindow); System.out.println(response.getData()); diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/ListPredictionWalletsExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/ListPredictionWalletsExample.java index 8e7a39ea1..85667b10d 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/ListPredictionWalletsExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/ListPredictionWalletsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.w3w_prediction.rest.W3WPredictionRestApiUtil; import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.ListPredictionWalletsResponse; +import java.io.IOException; /** API examples for WalletApi */ public class ListPredictionWalletsExample { @@ -26,14 +27,14 @@ public W3WPredictionRestApi getApi() { } /** - * List Prediction Wallets + * List Prediction Wallets (USER_DATA) * *

Get all prediction wallets registered for the authenticated user. Weight(IP): 200 Security * Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void listPredictionWalletsExample() throws ApiException { + public void listPredictionWalletsExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().listPredictionWallets(recvWindow); diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/QueryPaymentOptionBalancesExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/QueryPaymentOptionBalancesExample.java index eb862d313..60e89200d 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/QueryPaymentOptionBalancesExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/QueryPaymentOptionBalancesExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.w3w_prediction.rest.W3WPredictionRestApiUtil; import com.binance.connector.client.w3w_prediction.rest.api.W3WPredictionRestApi; import com.binance.connector.client.w3w_prediction.rest.model.QueryPaymentOptionBalancesResponse; +import java.io.IOException; /** API examples for WalletApi */ public class QueryPaymentOptionBalancesExample { @@ -26,14 +27,14 @@ public W3WPredictionRestApi getApi() { } /** - * Query Payment Option Balances + * Query Payment Option Balances (USER_DATA) * *

Get available balances for each payment option that can be used for prediction trading. * Weight(IP): 200 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryPaymentOptionBalancesExample() throws ApiException { + public void queryPaymentOptionBalancesExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().queryPaymentOptionBalances(recvWindow); diff --git a/examples/wallet/pom.xml b/examples/wallet/pom.xml index 1c71e41dc..26625c5e1 100644 --- a/examples/wallet/pom.xml +++ b/examples/wallet/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-wallet - 5.0.0 + 6.0.0 \ No newline at end of file diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountApiTradingStatusExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountApiTradingStatusExample.java index f8348df57..c872c9676 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountApiTradingStatusExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountApiTradingStatusExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.AccountApiTradingStatusResponse; +import java.io.IOException; /** API examples for AccountApi */ public class AccountApiTradingStatusExample { @@ -27,11 +28,11 @@ public WalletRestApi getApi() { /** * Account API Trading Status (USER_DATA) * - *

Fetch account api trading status detail. Weight: 1 + *

Fetch account api trading status detail. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void accountApiTradingStatusExample() throws ApiException { + public void accountApiTradingStatusExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().accountApiTradingStatus(recvWindow); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountInfoExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountInfoExample.java index 708661c78..61665de63 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountInfoExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountInfoExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.AccountInfoResponse; +import java.io.IOException; /** API examples for AccountApi */ public class AccountInfoExample { @@ -27,11 +28,11 @@ public WalletRestApi getApi() { /** * Account info (USER_DATA) * - *

Fetch account info detail. Weight: 1 + *

Fetch account info detail. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void accountInfoExample() throws ApiException { + public void accountInfoExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().accountInfo(recvWindow); System.out.println(response.getData()); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountStatusExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountStatusExample.java index fc3d6c47e..51db3cf8e 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountStatusExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountStatusExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.AccountStatusResponse; +import java.io.IOException; /** API examples for AccountApi */ public class AccountStatusExample { @@ -27,11 +28,11 @@ public WalletRestApi getApi() { /** * Account Status (USER_DATA) * - *

Fetch account status detail. Weight: 1 + *

Fetch account status detail. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void accountStatusExample() throws ApiException { + public void accountStatusExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().accountStatus(recvWindow); System.out.println(response.getData()); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/DailyAccountSnapshotExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/DailyAccountSnapshotExample.java index f41d4e2d4..7126fbdec 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/DailyAccountSnapshotExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/DailyAccountSnapshotExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.DailyAccountSnapshotResponse; +import com.binance.connector.client.wallet.rest.model.OrderType; +import java.io.IOException; /** API examples for AccountApi */ public class DailyAccountSnapshotExample { @@ -27,14 +29,14 @@ public WalletRestApi getApi() { /** * Daily Account Snapshot (USER_DATA) * - *

Daily account snapshot * The query time period must be less then 30 days * Support query - * within the last one month only * If startTimeand endTime not sent, return records of the last - * 7 days by default Weight: 2400 + *

Daily account snapshot Weight(IP): 2400 Security Type: USER_DATA Notes: - The query time + * period must be less then 30 days - Support query within the last one month only - If + * startTimeand endTime not sent, return records of the last 7 days by default * * @throws ApiException if the Api call fails */ - public void dailyAccountSnapshotExample() throws ApiException { - String type = ""; + public void dailyAccountSnapshotExample() throws ApiException, IOException { + OrderType type = OrderType.MAIN_UMFUTURE; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long limit = 7L; diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/DisableFastWithdrawSwitchExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/DisableFastWithdrawSwitchExample.java index 24553e985..044fc777b 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/DisableFastWithdrawSwitchExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/DisableFastWithdrawSwitchExample.java @@ -6,6 +6,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.DisableFastWithdrawSwitchRequest; +import java.io.IOException; /** API examples for AccountApi */ public class DisableFastWithdrawSwitchExample { @@ -26,11 +27,13 @@ public WalletRestApi getApi() { /** * Disable Fast Withdraw Switch (USER_DATA) * - *

Weight: 1 + *

Disable Fast Withdraw Switch Weight(IP): 1 Security Type: USER_DATA Notes: - This request + * will disable fastwithdraw switch under your account. You need to enable \"trade\" + * option for the api key which requests this endpoint. * * @throws ApiException if the Api call fails */ - public void disableFastWithdrawSwitchExample() throws ApiException { + public void disableFastWithdrawSwitchExample() throws ApiException, IOException { DisableFastWithdrawSwitchRequest disableFastWithdrawSwitchRequest = new DisableFastWithdrawSwitchRequest(); getApi().disableFastWithdrawSwitch(disableFastWithdrawSwitchRequest); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/EnableFastWithdrawSwitchExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/EnableFastWithdrawSwitchExample.java index 4be9029bb..9b6b44ede 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/EnableFastWithdrawSwitchExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/EnableFastWithdrawSwitchExample.java @@ -6,6 +6,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.EnableFastWithdrawSwitchRequest; +import java.io.IOException; /** API examples for AccountApi */ public class EnableFastWithdrawSwitchExample { @@ -26,14 +27,15 @@ public WalletRestApi getApi() { /** * Enable Fast Withdraw Switch (USER_DATA) * - *

Enable Fast Withdraw Switch (USER_DATA) * This request will enable fastwithdraw switch - * under your account. <br></br> * When Fast Withdraw Switch is on, transferring - * funds to a Binance account will be done instantly. There is no on-chain transaction, no - * transaction ID and no withdrawal fee. Weight: 1 + *

Enable Fast Withdraw Switch (USER_DATA) Weight(IP): 1 Security Type: USER_DATA Notes: - + * This request will enable fastwithdraw switch under your account. You need to enable + * \"trade\" option for the api key which requests this endpoint. - When Fast Withdraw + * Switch is on, transferring funds to a Binance account will be done instantly. There is no + * on-chain transaction, no transaction ID and no withdrawal fee. * * @throws ApiException if the Api call fails */ - public void enableFastWithdrawSwitchExample() throws ApiException { + public void enableFastWithdrawSwitchExample() throws ApiException, IOException { EnableFastWithdrawSwitchRequest enableFastWithdrawSwitchRequest = new EnableFastWithdrawSwitchRequest(); getApi().enableFastWithdrawSwitch(enableFastWithdrawSwitchRequest); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/GetApiKeyPermissionExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/GetApiKeyPermissionExample.java index c30c99737..7f2f6146f 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/GetApiKeyPermissionExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/GetApiKeyPermissionExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.GetApiKeyPermissionResponse; +import java.io.IOException; /** API examples for AccountApi */ public class GetApiKeyPermissionExample { @@ -27,11 +28,11 @@ public WalletRestApi getApi() { /** * Get API Key Permission (USER_DATA) * - *

Get API Key Permission Weight: 1 + *

Get API Key Permission Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getApiKeyPermissionExample() throws ApiException { + public void getApiKeyPermissionExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getApiKeyPermission(recvWindow); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/AssetDetailExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/AssetDetailExample.java index 65d71d3ae..b85241bb1 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/AssetDetailExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/AssetDetailExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.AssetDetailResponse; +import java.io.IOException; /** API examples for AssetApi */ public class AssetDetailExample { @@ -27,13 +28,14 @@ public WalletRestApi getApi() { /** * Asset Detail (USER_DATA) * - *

Fetch details of assets supported on Binance. * Please get network and other deposit or - * withdraw details from ``GET /sapi/v1/capital/config/getall``. Weight: 1 + *

Fetch details of assets supported on Binance. Weight(IP): 1 Security Type: USER_DATA + * Notes: - Please get network and other deposit or withdraw details from `GET + * /sapi/v1/capital/config/getall`. * * @throws ApiException if the Api call fails */ - public void assetDetailExample() throws ApiException { - String asset = ""; + public void assetDetailExample() throws ApiException, IOException { + String asset = "BTC"; Long recvWindow = 5000L; ApiResponse response = getApi().assetDetail(asset, recvWindow); System.out.println(response.getData()); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/AssetDividendRecordExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/AssetDividendRecordExample.java index e604f8c51..bd1f0ef30 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/AssetDividendRecordExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/AssetDividendRecordExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.AssetDividendRecordResponse; +import java.io.IOException; /** API examples for AssetApi */ public class AssetDividendRecordExample { @@ -27,16 +28,16 @@ public WalletRestApi getApi() { /** * Asset Dividend Record (USER_DATA) * - *

Query asset dividend record. * There cannot be more than 180 days between parameter - * `startTime` and `endTime`. Weight: 10 + *

Query asset dividend record. Weight(IP): 10 Security Type: USER_DATA Notes: - There cannot + * be more than 180 days between parameter `startTime` and `endTime`. * * @throws ApiException if the Api call fails */ - public void assetDividendRecordExample() throws ApiException { - String asset = ""; + public void assetDividendRecordExample() throws ApiException, IOException { + String asset = "BTC"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - Long limit = 7L; + Long limit = 20L; Long recvWindow = 5000L; ApiResponse response = getApi().assetDividendRecord(asset, startTime, endTime, limit, recvWindow); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustConvertExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustConvertExample.java index 2d7d893ef..8c89444c3 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustConvertExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustConvertExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.DustConvertRequest; import com.binance.connector.client.wallet.rest.model.DustConvertResponse; +import java.io.IOException; /** API examples for AssetApi */ public class DustConvertExample { @@ -28,13 +29,13 @@ public WalletRestApi getApi() { /** * Dust Convert (USER_DATA) * - *

Convert dust assets Weight: 10 + *

Convert dust assets Weight(UID): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void dustConvertExample() throws ApiException { + public void dustConvertExample() throws ApiException, IOException { DustConvertRequest dustConvertRequest = new DustConvertRequest(); - dustConvertRequest.asset(""); + dustConvertRequest.asset("USDT"); ApiResponse response = getApi().dustConvert(dustConvertRequest); System.out.println(response.getData()); } diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustConvertibleAssetsExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustConvertibleAssetsExample.java index 359d5c089..24df3ae3f 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustConvertibleAssetsExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustConvertibleAssetsExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.DustConvertibleAssetsRequest; import com.binance.connector.client.wallet.rest.model.DustConvertibleAssetsResponse; +import java.io.IOException; /** API examples for AssetApi */ public class DustConvertibleAssetsExample { @@ -28,14 +29,14 @@ public WalletRestApi getApi() { /** * Dust Convertible Assets (USER_DATA) * - *

Query dust convertible assets Weight: 1 + *

Query dust convertible assets Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void dustConvertibleAssetsExample() throws ApiException { + public void dustConvertibleAssetsExample() throws ApiException, IOException { DustConvertibleAssetsRequest dustConvertibleAssetsRequest = new DustConvertibleAssetsRequest(); - dustConvertibleAssetsRequest.targetAsset(""); + dustConvertibleAssetsRequest.targetAsset("BTC"); ApiResponse response = getApi().dustConvertibleAssets(dustConvertibleAssetsRequest); System.out.println(response.getData()); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustTransferExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustTransferExample.java index f5db36e47..060453cd0 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustTransferExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustTransferExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.DustTransferRequest; import com.binance.connector.client.wallet.rest.model.DustTransferResponse; +import java.io.IOException; /** API examples for AssetApi */ public class DustTransferExample { @@ -28,14 +29,15 @@ public WalletRestApi getApi() { /** * Dust Transfer (USER_DATA) * - *

Convert dust assets to BNB. * You need to open`Enable Spot & Margin Trading` - * permission for the API Key which requests this endpoint. Weight: 10 + *

Convert dust assets to BNB. Weight(UID): 10 Security Type: USER_DATA Notes: - You need to + * open`Enable Spot & Margin Trading` permission for the API Key which requests + * this endpoint. * * @throws ApiException if the Api call fails */ - public void dustTransferExample() throws ApiException { + public void dustTransferExample() throws ApiException, IOException { DustTransferRequest dustTransferRequest = new DustTransferRequest(); - dustTransferRequest.asset(""); + dustTransferRequest.asset("BTC"); ApiResponse response = getApi().dustTransfer(dustTransferRequest); System.out.println(response.getData()); } diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustlogExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustlogExample.java index 8f71c103c..843dc115a 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustlogExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustlogExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; +import com.binance.connector.client.wallet.rest.model.AccountType; import com.binance.connector.client.wallet.rest.model.DustlogResponse; +import java.io.IOException; /** API examples for AssetApi */ public class DustlogExample { @@ -25,14 +27,15 @@ public WalletRestApi getApi() { } /** - * DustLog(USER_DATA) + * DustLog (USER_DATA) * - *

Dustlog * Only return last 100 records * Only return records after 2020/12/01 Weight: 1 + *

Dustlog Weight(IP): 1 Security Type: USER_DATA Notes: - Only return last 100 records - + * Only return records after 2020/12/01 * * @throws ApiException if the Api call fails */ - public void dustlogExample() throws ApiException { - String accountType = "SPOT"; + public void dustlogExample() throws ApiException, IOException { + AccountType accountType = AccountType.SPOT; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/FundingWalletExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/FundingWalletExample.java index e19d65d50..75e80baef 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/FundingWalletExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/FundingWalletExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.FundingWalletRequest; import com.binance.connector.client.wallet.rest.model.FundingWalletResponse; +import java.io.IOException; /** API examples for AssetApi */ public class FundingWalletExample { @@ -28,12 +29,13 @@ public WalletRestApi getApi() { /** * Funding Wallet (USER_DATA) * - *

Query Funding Wallet * Currently supports querying the following business assets:Binance - * Pay, Binance Card, Binance Gift Card, Stock Token Weight: 1 + *

Query Funding Wallet Weight(IP): 1 Security Type: USER_DATA Notes: - Currently supports + * querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock + * Token * * @throws ApiException if the Api call fails */ - public void fundingWalletExample() throws ApiException { + public void fundingWalletExample() throws ApiException, IOException { FundingWalletRequest fundingWalletRequest = new FundingWalletRequest(); ApiResponse response = getApi().fundingWallet(fundingWalletRequest); System.out.println(response.getData()); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetAssetsThatCanBeConvertedIntoBnbExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetAssetsThatCanBeConvertedIntoBnbExample.java index 5fdb2f11d..42b33b558 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetAssetsThatCanBeConvertedIntoBnbExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetAssetsThatCanBeConvertedIntoBnbExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.GetAssetsThatCanBeConvertedIntoBnbRequest; import com.binance.connector.client.wallet.rest.model.GetAssetsThatCanBeConvertedIntoBnbResponse; +import java.io.IOException; /** API examples for AssetApi */ public class GetAssetsThatCanBeConvertedIntoBnbExample { @@ -28,11 +29,11 @@ public WalletRestApi getApi() { /** * Get Assets That Can Be Converted Into BNB (USER_DATA) * - *

Get Assets That Can Be Converted Into BNB Weight: 1 + *

Get Assets That Can Be Converted Into BNB Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getAssetsThatCanBeConvertedIntoBnbExample() throws ApiException { + public void getAssetsThatCanBeConvertedIntoBnbExample() throws ApiException, IOException { GetAssetsThatCanBeConvertedIntoBnbRequest getAssetsThatCanBeConvertedIntoBnbRequest = new GetAssetsThatCanBeConvertedIntoBnbRequest(); ApiResponse response = diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetCloudMiningPaymentAndRefundHistoryExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetCloudMiningPaymentAndRefundHistoryExample.java index a57d55b00..b8ce525ba 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetCloudMiningPaymentAndRefundHistoryExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetCloudMiningPaymentAndRefundHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.GetCloudMiningPaymentAndRefundHistoryResponse; +import java.io.IOException; /** API examples for AssetApi */ public class GetCloudMiningPaymentAndRefundHistoryExample { @@ -27,18 +28,18 @@ public WalletRestApi getApi() { /** * Get Cloud-Mining payment and refund history (USER_DATA) * - *

The query of Cloud-Mining payment and refund history * Just return the SUCCESS records of - * payment and refund. * For response, type = 248 means payment, type = 249 means - * refund, status =S means SUCCESS. Weight: 600 + *

The query of Cloud-Mining payment and refund history Weight(UID): 600 Security Type: + * USER_DATA Notes: - Just return the SUCCESS records of payment and refund. - For response, + * type = 248 means payment, type = 249 means refund, status =S means SUCCESS. * * @throws ApiException if the Api call fails */ - public void getCloudMiningPaymentAndRefundHistoryExample() throws ApiException { + public void getCloudMiningPaymentAndRefundHistoryExample() throws ApiException, IOException { Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long tranId = 1L; String clientTranId = "1"; - String asset = ""; + String asset = "BTC"; Long current = 1L; Long size = 10L; ApiResponse response = diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetOpenSymbolListExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetOpenSymbolListExample.java index 033169569..c6cd87968 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetOpenSymbolListExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetOpenSymbolListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.GetOpenSymbolListResponse; +import java.io.IOException; /** API examples for AssetApi */ public class GetOpenSymbolListExample { @@ -27,12 +28,12 @@ public WalletRestApi getApi() { /** * Get Open Symbol List (MARKET_DATA) * - *

Get the list of symbols that are scheduled to be opened for trading in the market. Weight: - * 100 + *

Get the list of symbols that are scheduled to be opened for trading in the market. + * Weight(IP): 100 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ - public void getOpenSymbolListExample() throws ApiException { + public void getOpenSymbolListExample() throws ApiException, IOException { ApiResponse response = getApi().getOpenSymbolList(); System.out.println(response.getData()); } diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserDelegationHistoryExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserDelegationHistoryExample.java index 19f627821..86e42eb6e 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserDelegationHistoryExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserDelegationHistoryExample.java @@ -6,7 +6,9 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; +import com.binance.connector.client.wallet.rest.model.OrderType; import com.binance.connector.client.wallet.rest.model.QueryUserDelegationHistoryResponse; +import java.io.IOException; /** API examples for AssetApi */ public class QueryUserDelegationHistoryExample { @@ -25,18 +27,18 @@ public WalletRestApi getApi() { } /** - * Query User Delegation History(For Master Account)(USER_DATA) + * Query User Delegation History(For Master Account) (USER_DATA) * - *

Query User Delegation History Weight: 60 + *

Query User Delegation History Weight(IP): 60 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryUserDelegationHistoryExample() throws ApiException { - String email = ""; + public void queryUserDelegationHistoryExample() throws ApiException, IOException { + String email = "abc@test.com"; Long startTime = 1623319461670L; Long endTime = 1641782889000L; - String type = ""; - String asset = ""; + OrderType type = OrderType.MAIN_UMFUTURE; + String asset = "BTC"; Long current = 1L; Long size = 10L; Long recvWindow = 5000L; diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserUniversalTransferHistoryExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserUniversalTransferHistoryExample.java index 600005c09..7e232e114 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserUniversalTransferHistoryExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserUniversalTransferHistoryExample.java @@ -6,7 +6,10 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; +import com.binance.connector.client.wallet.rest.model.FromSymbol; import com.binance.connector.client.wallet.rest.model.QueryUserUniversalTransferHistoryResponse; +import com.binance.connector.client.wallet.rest.model.ToSymbol; +import java.io.IOException; /** API examples for AssetApi */ public class QueryUserUniversalTransferHistoryExample { @@ -25,24 +28,25 @@ public WalletRestApi getApi() { } /** - * Query User Universal Transfer History(USER_DATA) + * Query User Universal Transfer History (USER_DATA) * - *

Query User Universal Transfer History * `fromSymbol` must be sent when type are - * ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN * `toSymbol` must be sent - * when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN * Support query within - * the last 6 months only * If `startTime`and `endTime` not sent, return - * records of the last 7 days by default Weight: 1 + *

Query User Universal Transfer History Weight(IP): 1 Security Type: USER_DATA Notes: - + * `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and + * ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be sent when type are + * MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - Support query within the last 6 + * months only - If `startTime`and `endTime` not sent, return records of the + * last 7 days by default * * @throws ApiException if the Api call fails */ - public void queryUserUniversalTransferHistoryExample() throws ApiException { + public void queryUserUniversalTransferHistoryExample() throws ApiException, IOException { String type = ""; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long current = 1L; Long size = 10L; - String fromSymbol = ""; - String toSymbol = ""; + FromSymbol fromSymbol = FromSymbol.ISOLATEDMARGIN_MARGIN; + ToSymbol toSymbol = ToSymbol.MARGIN_ISOLATEDMARGIN; Long recvWindow = 5000L; ApiResponse response = getApi().queryUserUniversalTransferHistory( diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserWalletBalanceExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserWalletBalanceExample.java index 9cc69fbf6..900db82a0 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserWalletBalanceExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserWalletBalanceExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.QueryUserWalletBalanceResponse; +import java.io.IOException; /** API examples for AssetApi */ public class QueryUserWalletBalanceExample { @@ -27,11 +28,11 @@ public WalletRestApi getApi() { /** * Query User Wallet Balance (USER_DATA) * - *

Query User Wallet Balance Weight: 60 + *

Query User Wallet Balance Weight(IP): 60 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void queryUserWalletBalanceExample() throws ApiException { + public void queryUserWalletBalanceExample() throws ApiException, IOException { String quoteAsset = "BTC"; Long recvWindow = 5000L; ApiResponse response = diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/ToggleBnbBurnOnSpotTradeAndMarginInterestExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/ToggleBnbBurnOnSpotTradeAndMarginInterestExample.java index 418267dac..6061e9491 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/ToggleBnbBurnOnSpotTradeAndMarginInterestExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/ToggleBnbBurnOnSpotTradeAndMarginInterestExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.ToggleBnbBurnOnSpotTradeAndMarginInterestRequest; import com.binance.connector.client.wallet.rest.model.ToggleBnbBurnOnSpotTradeAndMarginInterestResponse; +import java.io.IOException; /** API examples for AssetApi */ public class ToggleBnbBurnOnSpotTradeAndMarginInterestExample { @@ -28,12 +29,14 @@ public WalletRestApi getApi() { /** * Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) * - *

Toggle BNB Burn On Spot Trade And Margin Interest * \"spotBNBBurn\" and - * \"interestBNBBurn\" should be sent at least one. Weight: 1(IP) + *

Toggle BNB Burn On Spot Trade And Margin Interest Weight(IP): 1 Security Type: USER_DATA + * Notes: - \"spotBNBBurn\" and \"interestBNBBurn\" should be sent at least + * one. * * @throws ApiException if the Api call fails */ - public void toggleBnbBurnOnSpotTradeAndMarginInterestExample() throws ApiException { + public void toggleBnbBurnOnSpotTradeAndMarginInterestExample() + throws ApiException, IOException { ToggleBnbBurnOnSpotTradeAndMarginInterestRequest toggleBnbBurnOnSpotTradeAndMarginInterestRequest = new ToggleBnbBurnOnSpotTradeAndMarginInterestRequest(); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/TradeFeeExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/TradeFeeExample.java index 25a0f8b48..aa27312b6 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/TradeFeeExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/TradeFeeExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.TradeFeeResponse; +import java.io.IOException; /** API examples for AssetApi */ public class TradeFeeExample { @@ -27,12 +28,12 @@ public WalletRestApi getApi() { /** * Trade Fee (USER_DATA) * - *

Fetch trade fee Weight: 1 + *

Fetch trade fee Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void tradeFeeExample() throws ApiException { - String symbol = ""; + public void tradeFeeExample() throws ApiException, IOException { + String symbol = "ADABNB"; Long recvWindow = 5000L; ApiResponse response = getApi().tradeFee(symbol, recvWindow); System.out.println(response.getData()); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/UserAssetExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/UserAssetExample.java index 03c85a6cf..39f753ee2 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/UserAssetExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/UserAssetExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.UserAssetRequest; import com.binance.connector.client.wallet.rest.model.UserAssetResponse; +import java.io.IOException; /** API examples for AssetApi */ public class UserAssetExample { @@ -28,13 +29,13 @@ public WalletRestApi getApi() { /** * User Asset (USER_DATA) * - *

Get user assets, just for positive data. * If asset is set, then return this asset, - * otherwise return all assets positive. * If needBtcValuation is set, then return - * btcValudation. Weight: 5 + *

Get user assets, just for positive data. Weight(IP): 5 Security Type: USER_DATA Notes: - + * If asset is set, then return this asset, otherwise return all assets positive. - If + * needBtcValuation is set, then return btcValudation. * * @throws ApiException if the Api call fails */ - public void userAssetExample() throws ApiException { + public void userAssetExample() throws ApiException, IOException { UserAssetRequest userAssetRequest = new UserAssetRequest(); ApiResponse response = getApi().userAsset(userAssetRequest); System.out.println(response.getData()); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/UserUniversalTransferExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/UserUniversalTransferExample.java index cc1b055d0..104bb0c30 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/UserUniversalTransferExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/UserUniversalTransferExample.java @@ -6,8 +6,10 @@ import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; +import com.binance.connector.client.wallet.rest.model.OrderType; import com.binance.connector.client.wallet.rest.model.UserUniversalTransferRequest; import com.binance.connector.client.wallet.rest.model.UserUniversalTransferResponse; +import java.io.IOException; /** API examples for AssetApi */ public class UserUniversalTransferExample { @@ -28,40 +30,40 @@ public WalletRestApi getApi() { /** * User Universal Transfer (USER_DATA) * - *

user universal transfer * `fromSymbol` must be sent when type are - * ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN * `toSymbol` must be sent - * when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN * ENUM of transfer - * types: * MAIN_UMFUTURE Spot account transfer to USDⓈ-M Futures account * MAIN_CMFUTURE Spot - * account transfer to COIN-M Futures account * MAIN_MARGIN Spot account transfer to - * Margin(cross)account * UMFUTURE_MAIN USDⓈ-M Futures account transfer to Spot account * - * UMFUTURE_MARGIN USDⓈ-M Futures account transfer to Margin(cross)account * CMFUTURE_MAIN - * COIN-M Futures account transfer to Spot account * CMFUTURE_MARGIN COIN-M Futures account - * transfer to Margin(cross) account * MARGIN_MAIN Margin(cross)account transfer to Spot account - * * MARGIN_UMFUTURE Margin(cross)account transfer to USDⓈ-M Futures * MARGIN_CMFUTURE - * Margin(cross)account transfer to COIN-M Futures * ISOLATEDMARGIN_MARGIN Isolated margin - * account transfer to Margin(cross) account * MARGIN_ISOLATEDMARGIN Margin(cross) account - * transfer to Isolated margin account * ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account - * transfer to Isolated margin account * MAIN_FUNDING Spot account transfer to Funding account * - * FUNDING_MAIN Funding account transfer to Spot account * FUNDING_UMFUTURE Funding account - * transfer to UMFUTURE account * UMFUTURE_FUNDING UMFUTURE account transfer to Funding account - * * MARGIN_FUNDING MARGIN account transfer to Funding account * FUNDING_MARGIN Funding account - * transfer to Margin account * FUNDING_CMFUTURE Funding account transfer to CMFUTURE account * - * CMFUTURE_FUNDING CMFUTURE account transfer to Funding account * MAIN_OPTION Spot account - * transfer to Options account * OPTION_MAIN Options account transfer to Spot account * - * UMFUTURE_OPTION USDⓈ-M Futures account transfer to Options account * OPTION_UMFUTURE Options - * account transfer to USDⓈ-M Futures account * MARGIN_OPTION Margin(cross)account transfer to - * Options account * OPTION_MARGIN Options account transfer to Margin(cross)account * - * FUNDING_OPTION Funding account transfer to Options account * OPTION_FUNDING Options account - * transfer to Funding account * MAIN_PORTFOLIO_MARGIN Spot account transfer to Portfolio Margin - * account * PORTFOLIO_MARGIN_MAIN Portfolio Margin account transfer to Spot account Weight: 900 + *

User universal transfer Weight(UID): 900 Security Type: USER_DATA Notes: - You need to + * enable Permits Universal Transfer option for the API Key that requests this endpoint. - + * `fromSymbol` must be sent when type is `ISOLATEDMARGIN_MARGIN` or + * `ISOLATEDMARGIN_ISOLATEDMARGIN`. - `toSymbol` must be sent when type is + * `MARGIN_ISOLATEDMARGIN` or `ISOLATEDMARGIN_ISOLATEDMARGIN`. - ENUM of + * transfer types: - `MAIN_UMFUTURE`: Spot → USDⓈ-M Futures - + * `MAIN_CMFUTURE`: Spot → COIN-M Futures - `MAIN_MARGIN`: Spot → Margin + * (cross) - `UMFUTURE_MAIN`: USDⓈ-M Futures → Spot - `UMFUTURE_MARGIN`: + * USDⓈ-M Futures → Margin (cross) - `CMFUTURE_MAIN`: COIN-M Futures → Spot - + * `CMFUTURE_MARGIN`: COIN-M Futures → Margin (cross) - `MARGIN_MAIN`: + * Margin (cross) → Spot - `MARGIN_UMFUTURE`: Margin (cross) → USDⓈ-M Futures - + * `MARGIN_CMFUTURE`: Margin (cross) → COIN-M Futures - + * `ISOLATEDMARGIN_MARGIN`: Isolated margin → Margin (cross) - + * `MARGIN_ISOLATEDMARGIN`: Margin (cross) → Isolated margin - + * `ISOLATEDMARGIN_ISOLATEDMARGIN`: Isolated margin → Isolated margin - + * `MAIN_FUNDING`: Spot → Funding - `FUNDING_MAIN`: Funding → Spot - + * `FUNDING_UMFUTURE`: Funding → USDⓈ-M Futures - `UMFUTURE_FUNDING`: USDⓈ-M + * Futures → Funding - `MARGIN_FUNDING`: Margin (cross) → Funding - + * `FUNDING_MARGIN`: Funding → Margin (cross) - `FUNDING_CMFUTURE`: Funding + * → COIN-M Futures - `CMFUTURE_FUNDING`: COIN-M Futures → Funding - + * `MAIN_OPTION`: Spot → Options - `OPTION_MAIN`: Options → Spot - + * `UMFUTURE_OPTION`: USDⓈ-M Futures → Options - `OPTION_UMFUTURE`: Options + * → USDⓈ-M Futures - `MARGIN_OPTION`: Margin (cross) → Options - + * `OPTION_MARGIN`: Options → Margin (cross) - `FUNDING_OPTION`: Funding → + * Options - `OPTION_FUNDING`: Options → Funding - `MAIN_PORTFOLIO_MARGIN`: + * Spot → Portfolio Margin - `PORTFOLIO_MARGIN_MAIN`: Portfolio Margin → Spot * * @throws ApiException if the Api call fails */ - public void userUniversalTransferExample() throws ApiException { + public void userUniversalTransferExample() throws ApiException, IOException { UserUniversalTransferRequest userUniversalTransferRequest = new UserUniversalTransferRequest(); - userUniversalTransferRequest.type(""); - userUniversalTransferRequest.asset(""); + userUniversalTransferRequest.type(OrderType.MAIN_UMFUTURE); + userUniversalTransferRequest.asset("BTC"); userUniversalTransferRequest.amount(1.0d); ApiResponse response = getApi().userUniversalTransfer(userUniversalTransferRequest); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/AllCoinsInformationExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/AllCoinsInformationExample.java index a1ed8a2b9..9cf13cd26 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/AllCoinsInformationExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/AllCoinsInformationExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.AllCoinsInformationResponse; +import java.io.IOException; /** API examples for CapitalApi */ public class AllCoinsInformationExample { @@ -27,11 +28,12 @@ public WalletRestApi getApi() { /** * All Coins' Information (USER_DATA) * - *

Get information of coins (available for deposit and withdraw) for user. Weight: 10 + *

Get information of coins (available for deposit and withdraw) for user. Weight(IP): 10 + * Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void allCoinsInformationExample() throws ApiException { + public void allCoinsInformationExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().allCoinsInformation(recvWindow); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/DepositAddressExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/DepositAddressExample.java index 232c24f51..d8becb4af 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/DepositAddressExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/DepositAddressExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.DepositAddressResponse; +import java.io.IOException; /** API examples for CapitalApi */ public class DepositAddressExample { @@ -27,15 +28,16 @@ public WalletRestApi getApi() { /** * Deposit Address(supporting network) (USER_DATA) * - *

Fetch deposit address with network. * If `network` is not send, return with - * default network of the coin. * You can get `network` and `isDefault` in - * `networkList` in the response of `Get /sapi/v1/capital/config/getall (HMAC - * SHA256)`. * `amount` needs to be sent if using LIGHTNING network Weight: 10 + *

Fetch deposit address with network. Weight(IP): 10 Security Type: USER_DATA Notes: - If + * `network` is not send, return with default network of the coin. - You can get + * `network` and `isDefault` in `networkList` in the response of + * `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. - `amount` needs to + * be sent if using LIGHTNING network * * @throws ApiException if the Api call fails */ - public void depositAddressExample() throws ApiException { - String coin = ""; + public void depositAddressExample() throws ApiException, IOException { + String coin = "BTC"; String network = ""; Double amount = 1.0d; Long recvWindow = 5000L; diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/DepositHistoryExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/DepositHistoryExample.java index 21616911f..297a3b0f6 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/DepositHistoryExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/DepositHistoryExample.java @@ -7,6 +7,8 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.DepositHistoryResponse; +import com.binance.connector.client.wallet.rest.model.Status; +import java.io.IOException; /** API examples for CapitalApi */ public class DepositHistoryExample { @@ -27,22 +29,21 @@ public WalletRestApi getApi() { /** * Deposit History (supporting network) (USER_DATA) * - *

Fetch deposit history. * Please notice the default `startTime` and - * `endTime` to make sure that time interval is within 0-90 days. * If both - * ``startTime`` and ``endTime`` are sent, time between - * ``startTime`` and ``endTime`` must be less than 90 - * days. Weight: 1 + *

Fetch deposit history. Weight(IP): 1 Security Type: USER_DATA Notes: - Please notice the + * default `startTime` and `endTime` to make sure that time interval is + * within 0-90 days. - If both `startTime` and `endTime` are sent, time + * between `startTime` and `endTime` must be less than 90 days. * * @throws ApiException if the Api call fails */ - public void depositHistoryExample() throws ApiException { + public void depositHistoryExample() throws ApiException, IOException { Boolean includeSource = false; - String coin = ""; - Long status = 0L; + String coin = "BTC"; + Status status = Status.STATUS_0; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long offset = 0L; - Long limit = 7L; + Long limit = 1000L; Long recvWindow = 5000L; String txId = "1"; ApiResponse response = diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchDepositAddressListWithNetworkExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchDepositAddressListWithNetworkExample.java index baad14e41..31052c37d 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchDepositAddressListWithNetworkExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchDepositAddressListWithNetworkExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.FetchDepositAddressListWithNetworkResponse; +import java.io.IOException; /** API examples for CapitalApi */ public class FetchDepositAddressListWithNetworkExample { @@ -25,16 +26,14 @@ public WalletRestApi getApi() { } /** - * Fetch deposit address list with network(USER_DATA) + * Fetch deposit address list with network (USER_DATA) * - *

Fetch deposit address list with network. * If network is not send, return with default - * network of the coin. * You can get network and isDefault in networkList in the response of - * `Get /sapi/v1/capital/config/getall`. Weight: 10 + *

Fetch deposit address list with network. Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void fetchDepositAddressListWithNetworkExample() throws ApiException { - String coin = ""; + public void fetchDepositAddressListWithNetworkExample() throws ApiException, IOException { + String coin = "BTC"; String network = ""; ApiResponse response = getApi().fetchDepositAddressListWithNetwork(coin, network); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchWithdrawAddressListExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchWithdrawAddressListExample.java index 4e6e6ab1a..bc55b46da 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchWithdrawAddressListExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchWithdrawAddressListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.FetchWithdrawAddressListResponse; +import java.io.IOException; /** API examples for CapitalApi */ public class FetchWithdrawAddressListExample { @@ -27,11 +28,11 @@ public WalletRestApi getApi() { /** * Fetch withdraw address list (USER_DATA) * - *

Fetch withdraw address list Weight: 10 + *

Fetch withdraw address list Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void fetchWithdrawAddressListExample() throws ApiException { + public void fetchWithdrawAddressListExample() throws ApiException, IOException { ApiResponse response = getApi().fetchWithdrawAddressList(); System.out.println(response.getData()); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchWithdrawQuotaExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchWithdrawQuotaExample.java index 0a35f337a..afaa53659 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchWithdrawQuotaExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchWithdrawQuotaExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.FetchWithdrawQuotaResponse; +import java.io.IOException; /** API examples for CapitalApi */ public class FetchWithdrawQuotaExample { @@ -27,11 +28,11 @@ public WalletRestApi getApi() { /** * Fetch withdraw quota (USER_DATA) * - *

Fetch withdraw quota Weight: 10 + *

Fetch withdraw quota Weight(IP): 10 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void fetchWithdrawQuotaExample() throws ApiException { + public void fetchWithdrawQuotaExample() throws ApiException, IOException { ApiResponse response = getApi().fetchWithdrawQuota(); System.out.println(response.getData()); } diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/OneClickArrivalDepositApplyExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/OneClickArrivalDepositApplyExample.java index 789119fc7..d6601ee77 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/OneClickArrivalDepositApplyExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/OneClickArrivalDepositApplyExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.OneClickArrivalDepositApplyRequest; import com.binance.connector.client.wallet.rest.model.OneClickArrivalDepositApplyResponse; +import java.io.IOException; /** API examples for CapitalApi */ public class OneClickArrivalDepositApplyExample { @@ -28,12 +29,12 @@ public WalletRestApi getApi() { /** * One click arrival deposit apply (for expired address deposit) (USER_DATA) * - *

Apply deposit credit for expired address (One click arrival) * Params need to be in the - * POST body Weight: 1 + *

Apply deposit credit for expired address (One click arrival) Weight(IP): 1 Security Type: + * USER_DATA * * @throws ApiException if the Api call fails */ - public void oneClickArrivalDepositApplyExample() throws ApiException { + public void oneClickArrivalDepositApplyExample() throws ApiException, IOException { OneClickArrivalDepositApplyRequest oneClickArrivalDepositApplyRequest = new OneClickArrivalDepositApplyRequest(); ApiResponse response = diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawExample.java index bf5f73992..76314d490 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.WithdrawRequest; import com.binance.connector.client.wallet.rest.model.WithdrawResponse; +import java.io.IOException; /** API examples for CapitalApi */ public class WithdrawExample { @@ -26,29 +27,30 @@ public WalletRestApi getApi() { } /** - * Withdraw(USER_DATA) + * Withdraw (USER_DATA) * - *

Submit a withdraw request. * If `network` not send, return with default network - * of the coin. * You can get `network` and `isDefault` in - * `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall - * (HMAC SHA256)`. * To check if travel rule is required, by using `GET + *

Submit a withdraw request Weight(UID): 900 Security Type: USER_DATA Notes: - If + * `network` not send, return with default network of the coin. - You can get + * `network` and `isDefault` in `networkList` of a coin in the + * response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. - To check if + * travel rule is required, by using `GET * /sapi/v1/localentity/questionnaire-requirements` and if it returns anything other than * `NIL` you will need update SAPI to `POST * /sapi/v1/localentity/withdraw/apply` else you can continue `POST * /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to - * travel rule please refer to the Travel Rule SAPI. * For networks that do not support + * travel rule please refer to the Travel Rule SAPI. - \"For networks that do not support * memo/tag, submitting a withdrawal request with a non-empty `addressTag` will return * error `-4106 TAG_NOT_SUPPORTED_FOR_NETWORK`. Please omit the `addressTag` * field for such networks. You can check whether a network requires a tag via `GET - * /sapi/v1/capital/config/getall`: * If `withdrawTag` = `true` → - * memo/tag is required. * If `withdrawTag` = `false` → memo/tag is not - * supported; omit `addressTag`. Weight: 900 + * /sapi/v1/capital/config/getall`: If `withdrawTag` = `true` → + * memo/tag is required. If `withdrawTag` = `false` → memo/tag is not + * supported; omit `addressTag`.\" * * @throws ApiException if the Api call fails */ - public void withdrawExample() throws ApiException { + public void withdrawExample() throws ApiException, IOException { WithdrawRequest withdrawRequest = new WithdrawRequest(); - withdrawRequest.coin(""); + withdrawRequest.coin("BTC"); withdrawRequest.address(""); withdrawRequest.amount(1.0d); ApiResponse response = getApi().withdraw(withdrawRequest); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawHistoryExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawHistoryExample.java index 846507313..76d42bd41 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawHistoryExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawHistoryExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.WithdrawHistoryResponse; +import java.io.IOException; /** API examples for CapitalApi */ public class WithdrawHistoryExample { @@ -27,24 +28,24 @@ public WalletRestApi getApi() { /** * Withdraw History (supporting network) (USER_DATA) * - *

Fetch withdraw history. * `network` may not be in the response for old withdraw. - * * Please notice the default `startTime` and `endTime` to make sure that - * time interval is within 0-90 days. * If both `startTime` and `endTime`are - * sent, time between `startTime`and `endTime`must be less than 90 days. * + *

Fetch withdraw history Weight(UID): 18000 (10 requests per second) Security Type: + * USER_DATA Notes: - `network` may not be in the response for old withdraw. - Please + * notice the default `startTime` and `endTime` to make sure that time + * interval is within 0-90 days. - If both `startTime` and `endTime`are + * sent, time between `startTime`and `endTime`must be less than 90 days. - * If `withdrawOrderId` is sent, time between `startTime` and - * `endTime` must be less than 7 days. * If `withdrawOrderId` is sent, + * `endTime` must be less than 7 days. - If `withdrawOrderId` is sent, * `startTime` and `endTime` are not sent, will return last 7 days records - * by default. * Maximum support `idList` number is 45. Weight: 18000 Request limit: - * 10 requests per second + * by default. - Maximum support `idList` number is 45. * * @throws ApiException if the Api call fails */ - public void withdrawHistoryExample() throws ApiException { - String coin = ""; + public void withdrawHistoryExample() throws ApiException, IOException { + String coin = "BTC"; String withdrawOrderId = "1"; Long status = 0L; Long offset = 0L; - Long limit = 7L; + Long limit = 1000L; String idList = ""; Long startTime = 1623319461670L; Long endTime = 1641782889000L; diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/others/GetSymbolsDelistScheduleForSpotExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/others/GetSymbolsDelistScheduleForSpotExample.java index 494307319..474614dc5 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/others/GetSymbolsDelistScheduleForSpotExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/others/GetSymbolsDelistScheduleForSpotExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.GetSymbolsDelistScheduleForSpotResponse; +import java.io.IOException; /** API examples for OthersApi */ public class GetSymbolsDelistScheduleForSpotExample { @@ -25,13 +26,13 @@ public WalletRestApi getApi() { } /** - * Get symbols delist schedule for spot (MARKET_DATA) + * Get Spot Delist Schedule (MARKET_DATA) * - *

Get symbols delist schedule for spot Weight: 100 + *

Get symbols delist schedule for spot Weight(IP): 100 Security Type: MARKET_DATA * * @throws ApiException if the Api call fails */ - public void getSymbolsDelistScheduleForSpotExample() throws ApiException { + public void getSymbolsDelistScheduleForSpotExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().getSymbolsDelistScheduleForSpot(recvWindow); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/others/SystemStatusExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/others/SystemStatusExample.java index 1392422f9..9da8a7ed4 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/others/SystemStatusExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/others/SystemStatusExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.SystemStatusResponse; +import java.io.IOException; /** API examples for OthersApi */ public class SystemStatusExample { @@ -25,13 +26,13 @@ public WalletRestApi getApi() { } /** - * System Status (System) + * System Status * - *

Fetch system status. Weight: 1 + *

Fetch system status. Weight(IP): 1 Security Type: System * * @throws ApiException if the Api call fails */ - public void systemStatusExample() throws ApiException { + public void systemStatusExample() throws ApiException, IOException { ApiResponse response = getApi().systemStatus(); System.out.println(response.getData()); } diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/BrokerWithdrawExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/BrokerWithdrawExample.java index 608628201..c33e427b4 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/BrokerWithdrawExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/BrokerWithdrawExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.BrokerWithdrawRequest; import com.binance.connector.client.wallet.rest.model.BrokerWithdrawResponse; +import java.io.IOException; /** API examples for TravelRuleApi */ public class BrokerWithdrawExample { @@ -28,24 +29,26 @@ public WalletRestApi getApi() { /** * Broker Withdraw (for brokers of local entities that require travel rule) (USER_DATA) * - *

Submit a withdrawal request for brokers of local entities that required travel rule. * If - * `network` not send, return with default network of the coin, but if the address - * could not match default network, the withdraw will be rejected. * You can get - * `network` in `networkList` of a coin in the response * Questionnaire is - * different for each local entity, please refer to * If getting error like `Questionnaire - * format not valid.` or `Questionnaire must not be blank`, Weight: 600 + *

Submit a withdrawal request for brokers of local entities that required travel rule. + * Weight(UID): 600 Security Type: USER_DATA Notes: - If `network` not send, return + * with default network of the coin, but if the address could not match default network, the + * withdraw will be rejected. - You can get `network` in `networkList` of a + * coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. - + * Questionnaire is different for each local entity, please refer to the `Withdraw + * Questionnaire Contents` page. - If getting error like `Questionnaire format not + * valid.` or `Questionnaire must not be blank`, please try to verify the format + * of the questionnaire and use URL-encoded format. * * @throws ApiException if the Api call fails */ - public void brokerWithdrawExample() throws ApiException { + public void brokerWithdrawExample() throws ApiException, IOException { BrokerWithdrawRequest brokerWithdrawRequest = new BrokerWithdrawRequest(); brokerWithdrawRequest.address(""); - brokerWithdrawRequest.coin(""); + brokerWithdrawRequest.coin("BTC"); brokerWithdrawRequest.amount(1.0d); brokerWithdrawRequest.withdrawOrderId("1"); brokerWithdrawRequest.questionnaire(""); brokerWithdrawRequest.originatorPii(""); - brokerWithdrawRequest.signature(""); ApiResponse response = getApi().brokerWithdraw(brokerWithdrawRequest); System.out.println(response.getData()); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/CheckQuestionnaireRequirementsExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/CheckQuestionnaireRequirementsExample.java index a77b79049..1a88caeb8 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/CheckQuestionnaireRequirementsExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/CheckQuestionnaireRequirementsExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.CheckQuestionnaireRequirementsResponse; +import java.io.IOException; /** API examples for TravelRuleApi */ public class CheckQuestionnaireRequirementsExample { @@ -29,11 +30,11 @@ public WalletRestApi getApi() { * network) (USER_DATA) * *

This API will return user-specific Travel Rule questionnaire requirement information in - * reference to the current API key. Weight: 1 + * reference to the current API key. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void checkQuestionnaireRequirementsExample() throws ApiException { + public void checkQuestionnaireRequirementsExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().checkQuestionnaireRequirements(recvWindow); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryTravelRuleExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryTravelRuleExample.java index e95bdac3d..faec3ea00 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryTravelRuleExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryTravelRuleExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.DepositHistoryTravelRuleResponse; +import java.io.IOException; /** API examples for TravelRuleApi */ public class DepositHistoryTravelRuleExample { @@ -25,31 +26,31 @@ public WalletRestApi getApi() { } /** - * Deposit History (for local entities that required travel rule) (supporting network) - * (USER_DATA) + * Deposit History Travel Rule (for local entities that required travel rule) (supporting + * network) (USER_DATA) * - *

Fetch deposit history for local entities that required travel rule. * Please notice the - * default `startTime` and `endTime` to make sure that time interval is - * within * If both ``startTime`` and ``endTime`` are - * sent, time between ``startTime`` and ``endTime`` must - * * Please, note that due to network-specific characteristics, the returned source address may - * be inaccurate. If multiple source addresses are found, only the first one will be returned. - * Weight: 1 + *

Fetch deposit history for local entities that required travel rule. Weight(IP): 1 Security + * Type: USER_DATA Notes: - Please notice the default `startTime` and + * `endTime` to make sure that time interval is within 0-90 days. - If both + * `startTime` and `endTime` are sent, time between `startTime` + * and `endTime` must be less than 90 days. - Please, note that due to + * network-specific characteristics, the returned source address may be inaccurate. If multiple + * source addresses are found, only the first one will be returned. * * @throws ApiException if the Api call fails */ - public void depositHistoryTravelRuleExample() throws ApiException { + public void depositHistoryTravelRuleExample() throws ApiException, IOException { String trId = "1"; String txId = "1"; String tranId = "1"; String network = ""; - String coin = ""; + String coin = "BTC"; Long travelRuleStatus = 0L; Boolean pendingQuestionnaire = true; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long offset = 0L; - Long limit = 7L; + Long limit = 1000L; ApiResponse response = getApi().depositHistoryTravelRule( trId, diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryV2Example.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryV2Example.java index 8b60c37dc..df84a706c 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryV2Example.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryV2Example.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.DepositHistoryV2Response; +import java.io.IOException; /** API examples for TravelRuleApi */ public class DepositHistoryV2Example { @@ -28,26 +29,26 @@ public WalletRestApi getApi() { * Deposit History V2 (for local entities that required travel rule) (supporting network) * (USER_DATA) * - *

Fetch deposit history for local entities that with required travel rule information. * - * Please notice the default `startTime` and `endTime` to make sure that - * time interval is within * If both ``startTime`` and - * ``endTime`` are sent, time between ``startTime`` and - * ``endTime`` must * Please, note that due to network-specific - * characteristics, the returned source address may be inaccurate. If multiple source addresses - * are found, only the first one will be returned. Weight: 1 + *

Fetch deposit history for local entities that with required travel rule information. + * Weight(IP): 1 Security Type: USER_DATA Notes: - Please notice the default + * `startTime` and `endTime` to make sure that time interval is within 0-90 + * days. - If both `startTime` and `endTime` are sent, time between + * `startTime` and `endTime` must be less than 90 days. - Please, note that + * due to network-specific characteristics, the returned source address may be inaccurate. If + * multiple source addresses are found, only the first one will be returned. * * @throws ApiException if the Api call fails */ - public void depositHistoryV2Example() throws ApiException { + public void depositHistoryV2Example() throws ApiException, IOException { Long depositId = 1L; String txId = "1"; String network = ""; - String coin = ""; + String coin = "BTC"; Boolean retrieveQuestionnaire = true; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long offset = 0L; - Long limit = 7L; + Long limit = 1000L; ApiResponse response = getApi().depositHistoryV2( depositId, diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/FetchAddressVerificationListExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/FetchAddressVerificationListExample.java index 352822a40..b8ac8e1fc 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/FetchAddressVerificationListExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/FetchAddressVerificationListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.FetchAddressVerificationListResponse; +import java.io.IOException; /** API examples for TravelRuleApi */ public class FetchAddressVerificationListExample { @@ -28,11 +29,11 @@ public WalletRestApi getApi() { * Fetch address verification list (USER_DATA) * *

Fetch address verification list for user to check on status and other details for the - * addresses stored in Address Book. Weight: 1 + * addresses stored in Address Book. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void fetchAddressVerificationListExample() throws ApiException { + public void fetchAddressVerificationListExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().fetchAddressVerificationList(recvWindow); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetCountryListExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetCountryListExample.java index 73d720f0b..4d2517020 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetCountryListExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetCountryListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.GetCountryListResponse; +import java.io.IOException; /** API examples for TravelRuleApi */ public class GetCountryListExample { @@ -28,12 +29,13 @@ public WalletRestApi getApi() { * Get Country List (USER_DATA) * *

Query the active country list for travel rule questionnaires. Currently, only supports AU - * entity. Weight: 1 + * entity. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getCountryListExample() throws ApiException { - ApiResponse response = getApi().getCountryList(); + public void getCountryListExample() throws ApiException, IOException { + Long recvWindow = 5000L; + ApiResponse response = getApi().getCountryList(recvWindow); System.out.println(response.getData()); } } diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetRegionListExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetRegionListExample.java index 515a0ba03..027be7572 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetRegionListExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetRegionListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.GetRegionListResponse; +import java.io.IOException; /** API examples for TravelRuleApi */ public class GetRegionListExample { @@ -28,13 +29,15 @@ public WalletRestApi getApi() { * Get Region List (USER_DATA) * *

Query the active region/city list for a given country. Currently, only supports AU entity. - * Weight: 1 + * Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void getRegionListExample() throws ApiException { - String countryCode = ""; - ApiResponse response = getApi().getRegionList(countryCode); + public void getRegionListExample() throws ApiException, IOException { + String countryCode = "au"; + Long recvWindow = 5000L; + ApiResponse response = + getApi().getRegionList(countryCode, recvWindow); System.out.println(response.getData()); } } diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireExample.java index e98a9e39f..a6ea53ee8 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireRequest; import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireResponse; +import java.io.IOException; /** API examples for TravelRuleApi */ public class SubmitDepositQuestionnaireExample { @@ -26,25 +27,26 @@ public WalletRestApi getApi() { } /** - * Submit Deposit Questionnaire (For local entities that require travel rule) (supporting + * Submit Deposit Questionnaire Broker (For local entities that require travel rule) (supporting * network) (USER_DATA) * *

Submit questionnaire for brokers of local entities that require travel rule. The * questionnaire is only applies to transactions from un-hosted wallets or VASPs that are not - * yet onboarded with GTR. * Questionnaire is different for each local entity, please refer * If - * getting error like `Questionnaire format not valid.` or `Questionnaire must - * not be blank`, Weight: 600 + * yet onboarded with GTR. Weight(UID): 600 Security Type: USER_DATA Notes: - Questionnaire is + * different for each local entity, please refer to `Deposit Questionnaire Content` + * page. - If getting error like `Questionnaire format not valid.` or + * `Questionnaire must not be blank`, please try to verify the format of the + * questionnaire and use URL-encoded format. * * @throws ApiException if the Api call fails */ - public void submitDepositQuestionnaireExample() throws ApiException { + public void submitDepositQuestionnaireExample() throws ApiException, IOException { SubmitDepositQuestionnaireRequest submitDepositQuestionnaireRequest = new SubmitDepositQuestionnaireRequest(); submitDepositQuestionnaireRequest.subAccountId("1"); submitDepositQuestionnaireRequest.depositId(1L); submitDepositQuestionnaireRequest.questionnaire(""); submitDepositQuestionnaireRequest.beneficiaryPii(""); - submitDepositQuestionnaireRequest.signature(""); ApiResponse response = getApi().submitDepositQuestionnaire(submitDepositQuestionnaireRequest); System.out.println(response.getData()); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireTravelRuleExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireTravelRuleExample.java index 1c66747a4..be3f463db 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireTravelRuleExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireTravelRuleExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireTravelRuleRequest; import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireTravelRuleResponse; +import java.io.IOException; /** API examples for TravelRuleApi */ public class SubmitDepositQuestionnaireTravelRuleExample { @@ -31,13 +32,14 @@ public WalletRestApi getApi() { * *

Submit questionnaire for local entities that require travel rule. The questionnaire is * only applies to transactions from unhosted wallets or VASPs that are not yet onboarded with - * GTR. * Questionnaire is different for each local entity, please refer * If getting error like - * `Questionnaire format not valid.` or `Questionnaire must not be blank`, - * Weight: 600 + * GTR. Weight(UID): 600 Security Type: USER_DATA Notes: - Questionnaire is different for each + * local entity, please refer to `Deposit Questionnaire Content` page. - If getting + * error like `Questionnaire format not valid.` or `Questionnaire must not be + * blank`, please try to verify the format of the questionnaire and use URL-encoded format. * * @throws ApiException if the Api call fails */ - public void submitDepositQuestionnaireTravelRuleExample() throws ApiException { + public void submitDepositQuestionnaireTravelRuleExample() throws ApiException, IOException { SubmitDepositQuestionnaireTravelRuleRequest submitDepositQuestionnaireTravelRuleRequest = new SubmitDepositQuestionnaireTravelRuleRequest(); submitDepositQuestionnaireTravelRuleRequest.tranId(1L); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireV2Example.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireV2Example.java index f5fa981d5..4c1a4ba96 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireV2Example.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireV2Example.java @@ -8,6 +8,7 @@ import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireV2Request; import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireV2Response; +import java.io.IOException; /** API examples for TravelRuleApi */ public class SubmitDepositQuestionnaireV2Example { @@ -31,13 +32,14 @@ public WalletRestApi getApi() { * *

Submit questionnaire for local entities that require travel rule. The questionnaire is * only applies to transactions from unhosted wallets or VASPs that are not yet onboarded with - * GTR. * Questionnaire is different for each local entity, please refer * If getting error like - * `Questionnaire format not valid.` or `Questionnaire must not be blank`, - * Weight: 600 + * GTR. Weight(UID): 600 Security Type: USER_DATA Notes: - Questionnaire is different for each + * local entity, please refer to `Deposit Questionnaire Content` page. - If getting + * error like `Questionnaire format not valid.` or `Questionnaire must not be + * blank`, please try to verify the format of the questionnaire and use URL-encoded format. * * @throws ApiException if the Api call fails */ - public void submitDepositQuestionnaireV2Example() throws ApiException { + public void submitDepositQuestionnaireV2Example() throws ApiException, IOException { SubmitDepositQuestionnaireV2Request submitDepositQuestionnaireV2Request = new SubmitDepositQuestionnaireV2Request(); submitDepositQuestionnaireV2Request.depositId(1L); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/VaspListExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/VaspListExample.java index 03be9ef9b..2824907f3 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/VaspListExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/VaspListExample.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.VaspListResponse; +import java.io.IOException; /** API examples for TravelRuleApi */ public class VaspListExample { @@ -27,11 +28,11 @@ public WalletRestApi getApi() { /** * VASP list (for local entities that require travel rule) (supporting network) (USER_DATA) * - *

Fetch the VASP list for local entities. Weight: 1 + *

Fetch the VASP list for local entities. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ - public void vaspListExample() throws ApiException { + public void vaspListExample() throws ApiException, IOException { Long recvWindow = 5000L; ApiResponse response = getApi().vaspList(recvWindow); System.out.println(response.getData()); diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawHistoryV1Example.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawHistoryV1Example.java index 64e3d91e8..b1a43591d 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawHistoryV1Example.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawHistoryV1Example.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.WithdrawHistoryV1Response; +import java.io.IOException; /** API examples for TravelRuleApi */ public class WithdrawHistoryV1Example { @@ -25,26 +26,26 @@ public WalletRestApi getApi() { } /** - * Withdraw History (for local entities that require travel rule) (supporting network) - * (USER_DATA) + * Withdraw History Travel Rule (supporting network) (USER_DATA) * - *

Fetch withdraw history for local entities that required travel rule. * `network` - * may not be in the response for old withdraw. * Please notice the default - * `startTime` and `endTime` to make sure that time interval is within * If - * both `startTime` and `endTime`are sent, time between - * `startTime`and `endTime`must be less Weight: 1 + *

Fetch withdraw history for local entities that required travel rule. Weight(IP): 1 + * Security Type: USER_DATA Notes: - `network` may not be in the response for old + * withdraw. - Please notice the default `startTime` and `endTime` to make + * sure that time interval is within 0-90 days. - If both `startTime` and + * `endTime`are sent, time between `startTime`and `endTime`must be + * less than 90 days. * * @throws ApiException if the Api call fails */ - public void withdrawHistoryV1Example() throws ApiException { + public void withdrawHistoryV1Example() throws ApiException, IOException { String trId = "1"; String txId = "1"; String withdrawOrderId = "1"; String network = ""; - String coin = ""; + String coin = "BTC"; Long travelRuleStatus = 0L; Long offset = 0L; - Long limit = 7L; + Long limit = 1000L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawHistoryV2Example.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawHistoryV2Example.java index 88306709d..37be0054a 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawHistoryV2Example.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawHistoryV2Example.java @@ -7,6 +7,7 @@ import com.binance.connector.client.wallet.rest.WalletRestApiUtil; import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.WithdrawHistoryV2Response; +import java.io.IOException; /** API examples for TravelRuleApi */ public class WithdrawHistoryV2Example { @@ -28,20 +29,21 @@ public WalletRestApi getApi() { * Withdraw History V2 (for local entities that require travel rule) (supporting network) * (USER_DATA) * - *

Fetch withdraw history for local entities that required travel rule. * `network` - * may not be in the response for old withdraw. * Withdrawal made through - * /sapi/v1/capital/withdraw/apply may not be in the response. * Please notice the default - * `startTime` and `endTime` to make sure that time interval is within * If - * both `startTime` and `endTime`are sent, time between - * `startTime`and `endTime`must be less * If withdrawOrderId is sent, time - * between startTime and endTime must be less than 7 days. * If withdrawOrderId is sent, - * startTime and endTime are not sent, will return last 7 days records by default. * Maximum - * support trId,txId number is 45. * WithdrawOrderId only support 1. * If responsible does not - * include withdrawalStatus, please input trId or txId retrieve the data. Weight: 1 + *

Fetch withdraw history for local entities that required travel rule. Weight(IP): 1 + * Security Type: USER_DATA Notes: - `network` may not be in the response for old + * withdraw. - Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the + * response. - Please notice the default `startTime` and `endTime` to make + * sure that time interval is within 0-90 days. - If both `startTime` and + * `endTime`are sent, time between `startTime`and `endTime`must be + * less than 90 days. - If withdrawOrderId is sent, time between startTime and endTime must be + * less than 7 days. - If withdrawOrderId is sent, startTime and endTime are not sent, will + * return last 7 days records by default. - Maximum support trId,txId number is 45. - + * WithdrawOrderId only support 1. - If responsible does not include withdrawalStatus, please + * input trId or txId retrieve the data. * * @throws ApiException if the Api call fails */ - public void withdrawHistoryV2Example() throws ApiException { + public void withdrawHistoryV2Example() throws ApiException, IOException { String trId = "1"; String txId = "1"; String withdrawOrderId = "1"; @@ -49,7 +51,7 @@ public void withdrawHistoryV2Example() throws ApiException { String coin = ""; Long travelRuleStatus = 0L; Long offset = 0L; - Long limit = 7L; + Long limit = 1000L; Long startTime = 1623319461670L; Long endTime = 1641782889000L; Long recvWindow = 5000L; diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawTravelRuleExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawTravelRuleExample.java index f285fd86d..ea430b0dd 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawTravelRuleExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawTravelRuleExample.java @@ -8,6 +8,7 @@ import com.binance.connector.client.wallet.rest.api.WalletRestApi; import com.binance.connector.client.wallet.rest.model.WithdrawTravelRuleRequest; import com.binance.connector.client.wallet.rest.model.WithdrawTravelRuleResponse; +import java.io.IOException; /** API examples for TravelRuleApi */ public class WithdrawTravelRuleExample { @@ -26,21 +27,23 @@ public WalletRestApi getApi() { } /** - * Withdraw (for local entities that require travel rule) (USER_DATA) + * Withdraw Travel Rule (USER_DATA) * - *

Submit a withdrawal request for local entities that required travel rule. * If - * `network` not send, return with default network of the coin, but if the address - * could not match default network, the withdraw will be rejected. * You can get - * `network` and `isDefault` in `networkList` of a coin in the - * response * Questionnaire is different for each local entity, please refer to * If getting - * error like `Questionnaire format not valid.` or `Questionnaire must not be - * blank`, Weight: 600 + *

Submit a withdrawal request for local entities that required travel rule. Weight(UID): 600 + * Security Type: USER_DATA Notes: - If `network` not send, return with default + * network of the coin, but if the address could not match default network, the withdraw will be + * rejected. - You can get `network` and `isDefault` in + * `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall + * (HMAC SHA256)`. - Questionnaire is different for each local entity, please refer to the + * `Withdraw Questionnaire Contents` page. - If getting error like `Questionnaire + * format not valid.` or `Questionnaire must not be blank`, please try to verify + * the format of the questionnaire and use URL-encoded format. * * @throws ApiException if the Api call fails */ - public void withdrawTravelRuleExample() throws ApiException { + public void withdrawTravelRuleExample() throws ApiException, IOException { WithdrawTravelRuleRequest withdrawTravelRuleRequest = new WithdrawTravelRuleRequest(); - withdrawTravelRuleRequest.coin(""); + withdrawTravelRuleRequest.coin("BTC"); withdrawTravelRuleRequest.address(""); withdrawTravelRuleRequest.amount(1.0d); withdrawTravelRuleRequest.questionnaire("");